@lzzjokerzzl/react-ui-components 1.3.3 → 1.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +13 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +265 -8
- package/dist/index.js +3131 -2791
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react/jsx-runtime"),p=require("react"),ra=require("react-router"),Jn=require("react-dom");function pd(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const Lr=pd(p),Qn=p.createContext({});function ht(e){const t=p.useRef(null);return t.current===null&&(t.current=e()),t.current}const es=typeof window<"u",nr=es?p.useLayoutEffect:p.useEffect,Or=p.createContext(null);function ts(e,t){e.indexOf(t)===-1&&e.push(t)}function zr(e,t){const r=e.indexOf(t);r>-1&&e.splice(r,1)}const Fe=(e,t,r)=>r>t?t:r<e?e:r;function xn(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let Mt=()=>{},be=()=>{};process.env.NODE_ENV!=="production"&&(Mt=(e,t,r)=>{!e&&typeof console<"u"&&console.warn(xn(t,r))},be=(e,t,r)=>{if(!e)throw new Error(xn(t,r))});const Ke={},qo=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Zo(e){return typeof e=="object"&&e!==null}const Jo=e=>/^0[^.\s]+$/u.test(e);function rs(e){let t;return()=>(t===void 0&&(t=e()),t)}const Ce=e=>e,hd=(e,t)=>r=>t(e(r)),sr=(...e)=>e.reduce(hd),pt=(e,t,r)=>{const n=t-e;return n===0?1:(r-e)/n};class ns{constructor(){this.subscriptions=[]}add(t){return ts(this.subscriptions,t),()=>zr(this.subscriptions,t)}notify(t,r,n){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,r,n);else for(let a=0;a<s;a++){const o=this.subscriptions[a];o&&o(t,r,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Ie=e=>e*1e3,Ee=e=>e/1e3;function ss(e,t){return t?e*(1e3/t):0}const na=new Set;function $r(e,t,r){e||na.has(t)||(console.warn(xn(t,r)),na.add(t))}const md=(e,t,r)=>{const n=t-e;return((r-e)%n+n)%n+e},Qo=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,gd=1e-7,bd=12;function yd(e,t,r,n,s){let a,o,i=0;do o=t+(r-t)/2,a=Qo(o,n,s)-e,a>0?r=o:t=o;while(Math.abs(a)>gd&&++i<bd);return o}function ar(e,t,r,n){if(e===t&&r===n)return Ce;const s=a=>yd(a,0,1,e,r);return a=>a===0||a===1?a:Qo(s(a),t,n)}const ei=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ti=e=>t=>1-e(1-t),ri=ar(.33,1.53,.69,.99),as=ti(ri),ni=ei(as),si=e=>(e*=2)<1?.5*as(e):.5*(2-Math.pow(2,-10*(e-1))),os=e=>1-Math.sin(Math.acos(e)),ai=ti(os),oi=ei(os),xd=ar(.42,0,1,1),vd=ar(0,0,.58,1),ii=ar(.42,0,.58,1),li=e=>Array.isArray(e)&&typeof e[0]!="number";function ci(e,t){return li(e)?e[md(0,e.length,t)]:e}const di=e=>Array.isArray(e)&&typeof e[0]=="number",sa={linear:Ce,easeIn:xd,easeInOut:ii,easeOut:vd,circIn:os,circInOut:oi,circOut:ai,backIn:as,backInOut:ni,backOut:ri,anticipate:si},wd=e=>typeof e=="string",aa=e=>{if(di(e)){be(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,r,n,s]=e;return ar(t,r,n,s)}else if(wd(e))return be(sa[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),sa[e];return e},fr=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Cd(e,t){let r=new Set,n=new Set,s=!1,a=!1;const o=new WeakSet;let i={delta:0,timestamp:0,isProcessing:!1};function l(d){o.has(d)&&(c.schedule(d),e()),d(i)}const c={schedule:(d,u=!1,h=!1)=>{const g=h&&s?r:n;return u&&o.add(d),g.has(d)||g.add(d),d},cancel:d=>{n.delete(d),o.delete(d)},process:d=>{if(i=d,s){a=!0;return}s=!0,[r,n]=[n,r],r.forEach(l),r.clear(),s=!1,a&&(a=!1,c.process(d))}};return c}const kd=40;function ui(e,t){let r=!1,n=!0;const s={delta:0,timestamp:0,isProcessing:!1},a=()=>r=!0,o=fr.reduce((v,C)=>(v[C]=Cd(a),v),{}),{setup:i,read:l,resolveKeyframes:c,preUpdate:d,update:u,preRender:h,render:m,postRender:g}=o,w=()=>{const v=Ke.useManualTiming?s.timestamp:performance.now();r=!1,Ke.useManualTiming||(s.delta=n?1e3/60:Math.max(Math.min(v-s.timestamp,kd),1)),s.timestamp=v,s.isProcessing=!0,i.process(s),l.process(s),c.process(s),d.process(s),u.process(s),h.process(s),m.process(s),g.process(s),s.isProcessing=!1,r&&t&&(n=!1,e(w))},x=()=>{r=!0,n=!0,s.isProcessing||e(w)};return{schedule:fr.reduce((v,C)=>{const S=o[C];return v[C]=(j,A=!1,k=!1)=>(r||x(),S.schedule(j,A,k)),v},{}),cancel:v=>{for(let C=0;C<fr.length;C++)o[fr[C]].cancel(v)},state:s,steps:o}}const{schedule:re,cancel:Be,state:me,steps:Qr}=ui(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ce,!0);let kr;function Sd(){kr=void 0}const we={now:()=>(kr===void 0&&we.set(me.isProcessing||Ke.useManualTiming?me.timestamp:performance.now()),kr),set:e=>{kr=e,queueMicrotask(Sd)}},fi=e=>t=>typeof t=="string"&&t.startsWith(e),is=fi("--"),jd=fi("var(--"),ls=e=>jd(e)?Td.test(e.split("/*")[0].trim()):!1,Td=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Vt={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Yt={...Vt,transform:e=>Fe(0,1,e)},pr={...Vt,default:1},_t=e=>Math.round(e*1e5)/1e5,cs=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Ad(e){return e==null}const Md=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,ds=(e,t)=>r=>!!(typeof r=="string"&&Md.test(r)&&r.startsWith(e)||t&&!Ad(r)&&Object.prototype.hasOwnProperty.call(r,t)),pi=(e,t,r)=>n=>{if(typeof n!="string")return n;const[s,a,o,i]=n.match(cs);return{[e]:parseFloat(s),[t]:parseFloat(a),[r]:parseFloat(o),alpha:i!==void 0?parseFloat(i):1}},Vd=e=>Fe(0,255,e),en={...Vt,transform:e=>Math.round(Vd(e))},ct={test:ds("rgb","red"),parse:pi("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:n=1})=>"rgba("+en.transform(e)+", "+en.transform(t)+", "+en.transform(r)+", "+_t(Yt.transform(n))+")"};function Pd(e){let t="",r="",n="",s="";return e.length>5?(t=e.substring(1,3),r=e.substring(3,5),n=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),r=e.substring(2,3),n=e.substring(3,4),s=e.substring(4,5),t+=t,r+=r,n+=n,s+=s),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:s?parseInt(s,16)/255:1}}const vn={test:ds("#"),parse:Pd,transform:ct.transform},or=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Qe=or("deg"),$e=or("%"),X=or("px"),Ed=or("vh"),Id=or("vw"),oa={...$e,parse:e=>$e.parse(e)/100,transform:e=>$e.transform(e*100)},yt={test:ds("hsl","hue"),parse:pi("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:n=1})=>"hsla("+Math.round(e)+", "+$e.transform(_t(t))+", "+$e.transform(_t(r))+", "+_t(Yt.transform(n))+")"},ue={test:e=>ct.test(e)||vn.test(e)||yt.test(e),parse:e=>ct.test(e)?ct.parse(e):yt.test(e)?yt.parse(e):vn.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ct.transform(e):yt.transform(e),getAnimatableNone:e=>{const t=ue.parse(e);return t.alpha=0,ue.transform(t)}},Nd=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Rd(e){return isNaN(e)&&typeof e=="string"&&(e.match(cs)?.length||0)+(e.match(Nd)?.length||0)>0}const hi="number",mi="color",Dd="var",Bd="var(",ia="${}",Ld=/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(e){const t=e.toString(),r=[],n={color:[],number:[],var:[]},s=[];let a=0;const i=t.replace(Ld,l=>(ue.test(l)?(n.color.push(a),s.push(mi),r.push(ue.parse(l))):l.startsWith(Bd)?(n.var.push(a),s.push(Dd),r.push(l)):(n.number.push(a),s.push(hi),r.push(parseFloat(l))),++a,ia)).split(ia);return{values:r,split:i,indexes:n,types:s}}function gi(e){return qt(e).values}function bi(e){const{split:t,types:r}=qt(e),n=t.length;return s=>{let a="";for(let o=0;o<n;o++)if(a+=t[o],s[o]!==void 0){const i=r[o];i===hi?a+=_t(s[o]):i===mi?a+=ue.transform(s[o]):a+=s[o]}return a}}const Od=e=>typeof e=="number"?0:ue.test(e)?ue.getAnimatableNone(e):e;function zd(e){const t=gi(e);return bi(e)(t.map(Od))}const tt={test:Rd,parse:gi,createTransformer:bi,getAnimatableNone:zd};function tn(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function $d({hue:e,saturation:t,lightness:r,alpha:n}){e/=360,t/=100,r/=100;let s=0,a=0,o=0;if(!t)s=a=o=r;else{const i=r<.5?r*(1+t):r+t-r*t,l=2*r-i;s=tn(l,i,e+1/3),a=tn(l,i,e),o=tn(l,i,e-1/3)}return{red:Math.round(s*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:n}}function Pr(e,t){return r=>r>0?t:e}const oe=(e,t,r)=>e+(t-e)*r,rn=(e,t,r)=>{const n=e*e,s=r*(t*t-n)+n;return s<0?0:Math.sqrt(s)},Fd=[vn,ct,yt],Wd=e=>Fd.find(t=>t.test(e));function la(e){const t=Wd(e);if(Mt(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let r=t.parse(e);return t===yt&&(r=$d(r)),r}const ca=(e,t)=>{const r=la(e),n=la(t);if(!r||!n)return Pr(e,t);const s={...r};return a=>(s.red=rn(r.red,n.red,a),s.green=rn(r.green,n.green,a),s.blue=rn(r.blue,n.blue,a),s.alpha=oe(r.alpha,n.alpha,a),ct.transform(s))},wn=new Set(["none","hidden"]);function _d(e,t){return wn.has(e)?r=>r<=0?e:t:r=>r>=1?t:e}function Gd(e,t){return r=>oe(e,t,r)}function us(e){return typeof e=="number"?Gd:typeof e=="string"?ls(e)?Pr:ue.test(e)?ca:Hd:Array.isArray(e)?yi:typeof e=="object"?ue.test(e)?ca:Ud:Pr}function yi(e,t){const r=[...e],n=r.length,s=e.map((a,o)=>us(a)(a,t[o]));return a=>{for(let o=0;o<n;o++)r[o]=s[o](a);return r}}function Ud(e,t){const r={...e,...t},n={};for(const s in r)e[s]!==void 0&&t[s]!==void 0&&(n[s]=us(e[s])(e[s],t[s]));return s=>{for(const a in n)r[a]=n[a](s);return r}}function Kd(e,t){const r=[],n={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const a=t.types[s],o=e.indexes[a][n[a]],i=e.values[o]??0;r[s]=i,n[a]++}return r}const Hd=(e,t)=>{const r=tt.createTransformer(t),n=qt(e),s=qt(t);return n.indexes.var.length===s.indexes.var.length&&n.indexes.color.length===s.indexes.color.length&&n.indexes.number.length>=s.indexes.number.length?wn.has(e)&&!s.values.length||wn.has(t)&&!n.values.length?_d(e,t):sr(yi(Kd(n,s),s.values),r):(Mt(!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"),Pr(e,t))};function xi(e,t,r){return typeof e=="number"&&typeof t=="number"&&typeof r=="number"?oe(e,t,r):us(e)(e,t)}const Xd=e=>{const t=({timestamp:r})=>e(r);return{start:(r=!0)=>re.update(t,r),stop:()=>Be(t),now:()=>me.isProcessing?me.timestamp:we.now()}},vi=(e,t,r=10)=>{let n="";const s=Math.max(Math.round(t/r),2);for(let a=0;a<s;a++)n+=Math.round(e(a/(s-1))*1e4)/1e4+", ";return`linear(${n.substring(0,n.length-2)})`},Er=2e4;function fs(e){let t=0;const r=50;let n=e.next(t);for(;!n.done&&t<Er;)t+=r,n=e.next(t);return t>=Er?1/0:t}function wi(e,t=100,r){const n=r({...e,keyframes:[0,t]}),s=Math.min(fs(n),Er);return{type:"keyframes",ease:a=>n.next(s*a).value/t,duration:Ee(s)}}const Yd=5;function Ci(e,t,r){const n=Math.max(t-Yd,0);return ss(r-e(n),t-n)}const le={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},nn=.001;function qd({duration:e=le.duration,bounce:t=le.bounce,velocity:r=le.velocity,mass:n=le.mass}){let s,a;Mt(e<=Ie(le.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-t;o=Fe(le.minDamping,le.maxDamping,o),e=Fe(le.minDuration,le.maxDuration,Ee(e)),o<1?(s=c=>{const d=c*o,u=d*e,h=d-r,m=Cn(c,o),g=Math.exp(-u);return nn-h/m*g},a=c=>{const u=c*o*e,h=u*r+r,m=Math.pow(o,2)*Math.pow(c,2)*e,g=Math.exp(-u),w=Cn(Math.pow(c,2),o);return(-s(c)+nn>0?-1:1)*((h-m)*g)/w}):(s=c=>{const d=Math.exp(-c*e),u=(c-r)*e+1;return-nn+d*u},a=c=>{const d=Math.exp(-c*e),u=(r-c)*(e*e);return d*u});const i=5/e,l=Jd(s,a,i);if(e=Ie(e),isNaN(l))return{stiffness:le.stiffness,damping:le.damping,duration:e};{const c=Math.pow(l,2)*n;return{stiffness:c,damping:o*2*Math.sqrt(n*c),duration:e}}}const Zd=12;function Jd(e,t,r){let n=r;for(let s=1;s<Zd;s++)n=n-e(n)/t(n);return n}function Cn(e,t){return e*Math.sqrt(1-t*t)}const Qd=["duration","bounce"],eu=["stiffness","damping","mass"];function da(e,t){return t.some(r=>e[r]!==void 0)}function tu(e){let t={velocity:le.velocity,stiffness:le.stiffness,damping:le.damping,mass:le.mass,isResolvedFromDuration:!1,...e};if(!da(e,eu)&&da(e,Qd))if(e.visualDuration){const r=e.visualDuration,n=2*Math.PI/(r*1.2),s=n*n,a=2*Fe(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:le.mass,stiffness:s,damping:a}}else{const r=qd(e);t={...t,...r,mass:le.mass},t.isResolvedFromDuration=!0}return t}function Zt(e=le.visualDuration,t=le.bounce){const r=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:n,restDelta:s}=r;const a=r.keyframes[0],o=r.keyframes[r.keyframes.length-1],i={done:!1,value:a},{stiffness:l,damping:c,mass:d,duration:u,velocity:h,isResolvedFromDuration:m}=tu({...r,velocity:-Ee(r.velocity||0)}),g=h||0,w=c/(2*Math.sqrt(l*d)),x=o-a,b=Ee(Math.sqrt(l/d)),y=Math.abs(x)<5;n||(n=y?le.restSpeed.granular:le.restSpeed.default),s||(s=y?le.restDelta.granular:le.restDelta.default);let v;if(w<1){const S=Cn(b,w);v=j=>{const A=Math.exp(-w*b*j);return o-A*((g+w*b*x)/S*Math.sin(S*j)+x*Math.cos(S*j))}}else if(w===1)v=S=>o-Math.exp(-b*S)*(x+(g+b*x)*S);else{const S=b*Math.sqrt(w*w-1);v=j=>{const A=Math.exp(-w*b*j),k=Math.min(S*j,300);return o-A*((g+w*b*x)*Math.sinh(k)+S*x*Math.cosh(k))/S}}const C={calculatedDuration:m&&u||null,next:S=>{const j=v(S);if(m)i.done=S>=u;else{let A=S===0?g:0;w<1&&(A=S===0?Ie(g):Ci(v,S,j));const k=Math.abs(A)<=n,V=Math.abs(o-j)<=s;i.done=k&&V}return i.value=i.done?o:j,i},toString:()=>{const S=Math.min(fs(C),Er),j=vi(A=>C.next(S*A).value,S,30);return S+"ms "+j},toTransition:()=>{}};return C}Zt.applyToOptions=e=>{const t=wi(e,100,Zt);return e.ease=t.ease,e.duration=Ie(t.duration),e.type="keyframes",e};function kn({keyframes:e,velocity:t=0,power:r=.8,timeConstant:n=325,bounceDamping:s=10,bounceStiffness:a=500,modifyTarget:o,min:i,max:l,restDelta:c=.5,restSpeed:d}){const u=e[0],h={done:!1,value:u},m=k=>i!==void 0&&k<i||l!==void 0&&k>l,g=k=>i===void 0?l:l===void 0||Math.abs(i-k)<Math.abs(l-k)?i:l;let w=r*t;const x=u+w,b=o===void 0?x:o(x);b!==x&&(w=b-u);const y=k=>-w*Math.exp(-k/n),v=k=>b+y(k),C=k=>{const V=y(k),M=v(k);h.done=Math.abs(V)<=c,h.value=h.done?b:M};let S,j;const A=k=>{m(h.value)&&(S=k,j=Zt({keyframes:[h.value,g(h.value)],velocity:Ci(v,k,h.value),damping:s,stiffness:a,restDelta:c,restSpeed:d}))};return A(0),{calculatedDuration:null,next:k=>{let V=!1;return!j&&S===void 0&&(V=!0,C(k),A(k)),S!==void 0&&k>=S?j.next(k-S):(!V&&C(k),h)}}}function ru(e,t,r){const n=[],s=r||Ke.mix||xi,a=e.length-1;for(let o=0;o<a;o++){let i=s(e[o],e[o+1]);if(t){const l=Array.isArray(t)?t[o]||Ce:t;i=sr(l,i)}n.push(i)}return n}function ps(e,t,{clamp:r=!0,ease:n,mixer:s}={}){const a=e.length;if(be(a===t.length,"Both input and output ranges must be the same length","range-length"),a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());const i=ru(t,n,s),l=i.length,c=d=>{if(o&&d<e[0])return t[0];let u=0;if(l>1)for(;u<e.length-2&&!(d<e[u+1]);u++);const h=pt(e[u],e[u+1],d);return i[u](h)};return r?d=>c(Fe(e[0],e[a-1],d)):c}function ki(e,t){const r=e[e.length-1];for(let n=1;n<=t;n++){const s=pt(0,t,n);e.push(oe(r,1,s))}}function hs(e){const t=[0];return ki(t,e.length-1),t}function nu(e,t){return e.map(r=>r*t)}function su(e,t){return e.map(()=>t||ii).splice(0,e.length-1)}function xt({duration:e=300,keyframes:t,times:r,ease:n="easeInOut"}){const s=li(n)?n.map(aa):aa(n),a={done:!1,value:t[0]},o=nu(r&&r.length===t.length?r:hs(t),e),i=ps(o,t,{ease:Array.isArray(s)?s:su(t,s)});return{calculatedDuration:e,next:l=>(a.value=i(l),a.done=l>=e,a)}}const au=e=>e!==null;function ms(e,{repeat:t,repeatType:r="loop"},n,s=1){const a=e.filter(au),i=s<0||t&&r!=="loop"&&t%2===1?0:a.length-1;return!i||n===void 0?a[i]:n}const ou={decay:kn,inertia:kn,tween:xt,keyframes:xt,spring:Zt};function Si(e){typeof e.type=="string"&&(e.type=ou[e.type])}class gs{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,r){return this.finished.then(t,r)}}const iu=e=>e/100;class Fr extends gs{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:r}=this.options;r&&r.updatedAt!==we.now()&&this.tick(we.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Si(t);const{type:r=xt,repeat:n=0,repeatDelay:s=0,repeatType:a,velocity:o=0}=t;let{keyframes:i}=t;const l=r||xt;process.env.NODE_ENV!=="production"&&l!==xt&&be(i.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${i}`,"spring-two-frames"),l!==xt&&typeof i[0]!="number"&&(this.mixKeyframes=sr(iu,xi(i[0],i[1])),i=[0,100]);const c=l({...t,keyframes:i});a==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...i].reverse(),velocity:-o})),c.calculatedDuration===null&&(c.calculatedDuration=fs(c));const{calculatedDuration:d}=c;this.calculatedDuration=d,this.resolvedDuration=d+s,this.totalDuration=this.resolvedDuration*(n+1)-s,this.generator=c}updateTime(t){const r=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=r}tick(t,r=!1){const{generator:n,totalDuration:s,mixKeyframes:a,mirroredGenerator:o,resolvedDuration:i,calculatedDuration:l}=this;if(this.startTime===null)return n.next(0);const{delay:c=0,keyframes:d,repeat:u,repeatType:h,repeatDelay:m,type:g,onUpdate:w,finalKeyframe:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),r?this.currentTime=t:this.updateTime(t);const b=this.currentTime-c*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?b<0:b>s;this.currentTime=Math.max(b,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let v=this.currentTime,C=n;if(u){const k=Math.min(this.currentTime,s)/i;let V=Math.floor(k),M=k%1;!M&&k>=1&&(M=1),M===1&&V--,V=Math.min(V,u+1),!!(V%2)&&(h==="reverse"?(M=1-M,m&&(M-=m/i)):h==="mirror"&&(C=o)),v=Fe(0,1,M)*i}const S=y?{done:!1,value:d[0]}:C.next(v);a&&(S.value=a(S.value));let{done:j}=S;!y&&l!==null&&(j=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const A=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&j);return A&&g!==kn&&(S.value=ms(d,this.options,x,this.speed)),w&&w(S.value),A&&this.finish(),S}then(t,r){return this.finished.then(t,r)}get duration(){return Ee(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Ee(t)}get time(){return Ee(this.currentTime)}set time(t){t=Ie(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(we.now());const r=this.playbackSpeed!==t;this.playbackSpeed=t,r&&(this.time=Ee(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Xd,startTime:r}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),this.options.onPlay?.();const n=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=n):this.holdTime!==null?this.startTime=n-this.holdTime:this.startTime||(this.startTime=r??n),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(we.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}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){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function lu(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const dt=e=>e*180/Math.PI,Sn=e=>{const t=dt(Math.atan2(e[1],e[0]));return jn(t)},cu={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Sn,rotateZ:Sn,skewX:e=>dt(Math.atan(e[1])),skewY:e=>dt(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},jn=e=>(e=e%360,e<0&&(e+=360),e),ua=Sn,fa=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),pa=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),du={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:fa,scaleY:pa,scale:e=>(fa(e)+pa(e))/2,rotateX:e=>jn(dt(Math.atan2(e[6],e[5]))),rotateY:e=>jn(dt(Math.atan2(-e[2],e[0]))),rotateZ:ua,rotate:ua,skewX:e=>dt(Math.atan(e[4])),skewY:e=>dt(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Tn(e){return e.includes("scale")?1:0}function An(e,t){if(!e||e==="none")return Tn(t);const r=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let n,s;if(r)n=du,s=r;else{const i=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=cu,s=i}if(!s)return Tn(t);const a=n[t],o=s[1].split(",").map(fu);return typeof a=="function"?a(o):o[a]}const uu=(e,t)=>{const{transform:r="none"}=getComputedStyle(e);return An(r,t)};function fu(e){return parseFloat(e.trim())}const Pt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Et=new Set(Pt),ha=e=>e===Vt||e===X,pu=new Set(["x","y","z"]),hu=Pt.filter(e=>!pu.has(e));function mu(e){const t=[];return hu.forEach(r=>{const n=e.getValue(r);n!==void 0&&(t.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))}),t}const ut={width:({x:e},{paddingLeft:t="0",paddingRight:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),height:({y:e},{paddingTop:t="0",paddingBottom:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),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})=>An(t,"x"),y:(e,{transform:t})=>An(t,"y")};ut.translateX=ut.x;ut.translateY=ut.y;const ft=new Set;let Mn=!1,Vn=!1,Pn=!1;function ji(){if(Vn){const e=Array.from(ft).filter(n=>n.needsMeasurement),t=new Set(e.map(n=>n.element)),r=new Map;t.forEach(n=>{const s=mu(n);s.length&&(r.set(n,s),n.render())}),e.forEach(n=>n.measureInitialState()),t.forEach(n=>{n.render();const s=r.get(n);s&&s.forEach(([a,o])=>{n.getValue(a)?.set(o)})}),e.forEach(n=>n.measureEndState()),e.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}Vn=!1,Mn=!1,ft.forEach(e=>e.complete(Pn)),ft.clear()}function Ti(){ft.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Vn=!0)})}function gu(){Pn=!0,Ti(),ji(),Pn=!1}class bs{constructor(t,r,n,s,a,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=r,this.name=n,this.motionValue=s,this.element=a,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(ft.add(this),Mn||(Mn=!0,re.read(Ti),re.resolveKeyframes(ji))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:r,element:n,motionValue:s}=this;if(t[0]===null){const a=s?.get(),o=t[t.length-1];if(a!==void 0)t[0]=a;else if(n&&r){const i=n.readValue(r,o);i!=null&&(t[0]=i)}t[0]===void 0&&(t[0]=o),s&&a===void 0&&s.set(t[0])}lu(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),ft.delete(this)}cancel(){this.state==="scheduled"&&(ft.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const bu=e=>e.startsWith("--");function yu(e,t,r){bu(t)?e.style.setProperty(t,r):e.style[t]=r}const Ai=rs(()=>window.ScrollTimeline!==void 0),xu={};function vu(e,t){const r=rs(e);return()=>xu[t]??r()}const Mi=vu(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Ft=([e,t,r,n])=>`cubic-bezier(${e}, ${t}, ${r}, ${n})`,ma={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ft([0,.65,.55,1]),circOut:Ft([.55,0,1,.45]),backIn:Ft([.31,.01,.66,-.59]),backOut:Ft([.33,1.53,.69,.99])};function Vi(e,t){if(e)return typeof e=="function"?Mi()?vi(e,t):"ease-out":di(e)?Ft(e):Array.isArray(e)?e.map(r=>Vi(r,t)||ma.easeOut):ma[e]}function wu(e,t,r,{delay:n=0,duration:s=300,repeat:a=0,repeatType:o="loop",ease:i="easeOut",times:l}={},c=void 0){const d={[t]:r};l&&(d.offset=l);const u=Vi(i,s);Array.isArray(u)&&(d.easing=u);const h={delay:n,duration:s,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:a+1,direction:o==="reverse"?"alternate":"normal"};return c&&(h.pseudoElement=c),e.animate(d,h)}function ys(e){return typeof e=="function"&&"applyToOptions"in e}function Cu({type:e,...t}){return ys(e)&&Mi()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class ku extends gs{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:r,name:n,keyframes:s,pseudoElement:a,allowFlatten:o=!1,finalKeyframe:i,onComplete:l}=t;this.isPseudoElement=!!a,this.allowFlatten=o,this.options=t,be(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const c=Cu(t);this.animation=wu(r,n,s,c,a),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){const d=ms(s,this.options,i,this.speed);this.updateMotionValue?this.updateMotionValue(d):yu(r,n,d),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}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(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return Ee(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Ee(t)}get time(){return Ee(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Ie(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:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&Ai()?(this.animation.timeline=t,Ce):r(this)}}const Pi={anticipate:si,backInOut:ni,circInOut:oi};function Su(e){return e in Pi}function ju(e){typeof e.ease=="string"&&Su(e.ease)&&(e.ease=Pi[e.ease])}const ga=10;class Tu extends ku{constructor(t){ju(t),Si(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:r,onUpdate:n,onComplete:s,element:a,...o}=this.options;if(!r)return;if(t!==void 0){r.set(t);return}const i=new Fr({...o,autoplay:!1}),l=Ie(this.finishedTime??this.time);r.setWithVelocity(i.sample(l-ga).value,i.sample(l).value,ga),i.stop()}}const ba=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(tt.test(e)||e==="0")&&!e.startsWith("url("));function Au(e){const t=e[0];if(e.length===1)return!0;for(let r=0;r<e.length;r++)if(e[r]!==t)return!0}function Mu(e,t,r,n){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const a=e[e.length-1],o=ba(s,t),i=ba(a,t);return Mt(o===i,`You are trying to animate ${t} from "${s}" to "${a}". "${o?a:s}" is not an animatable value.`,"value-not-animatable"),!o||!i?!1:Au(e)||(r==="spring"||ys(r))&&n}function En(e){e.duration=0,e.type="keyframes"}const Vu=new Set(["opacity","clipPath","filter","transform"]),Pu=rs(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Eu(e){const{motionValue:t,name:r,repeatDelay:n,repeatType:s,damping:a,type:o}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=t.owner.getProps();return Pu()&&r&&Vu.has(r)&&(r!=="transform"||!c)&&!l&&!n&&s!=="mirror"&&a!==0&&o!=="inertia"}const Iu=40;class Nu extends gs{constructor({autoplay:t=!0,delay:r=0,type:n="keyframes",repeat:s=0,repeatDelay:a=0,repeatType:o="loop",keyframes:i,name:l,motionValue:c,element:d,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=we.now();const h={autoplay:t,delay:r,type:n,repeat:s,repeatDelay:a,repeatType:o,name:l,motionValue:c,element:d,...u},m=d?.KeyframeResolver||bs;this.keyframeResolver=new m(i,(g,w,x)=>this.onKeyframesResolved(g,w,h,!x),l,c,d),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,r,n,s){this.keyframeResolver=void 0;const{name:a,type:o,velocity:i,delay:l,isHandoff:c,onUpdate:d}=n;this.resolvedAt=we.now(),Mu(t,a,o,i)||((Ke.instantAnimations||!l)&&d?.(ms(t,n,r)),t[0]=t[t.length-1],En(n),n.repeat=0);const h={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>Iu?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:r,...n,keyframes:t},m=!c&&Eu(h)?new Tu({...h,element:h.motionValue.owner.current}):new Fr(h);m.finished.then(()=>this.notifyFinished()).catch(Ce),this.pendingTimeline&&(this.stopTimeline=m.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(t,r){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),gu()),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(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}class Ru{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,r){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=r}attachTimeline(t){const r=this.animations.map(n=>n.attachTimeline(t));return()=>{r.forEach((n,s)=>{n&&n(),this.animations[s].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return ya(this.animations,"duration")}get iterationDuration(){return ya(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(r=>r[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function ya(e,t){let r=0;for(let n=0;n<e.length;n++){const s=e[n][t];s!==null&&s>r&&(r=s)}return r}class Du extends Ru{then(t,r){return this.finished.finally(t).then(()=>{})}}const Bu=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Lu(e){const t=Bu.exec(e);if(!t)return[,];const[,r,n,s]=t;return[`--${r??n}`,s]}const Ou=4;function Ei(e,t,r=1){be(r<=Ou,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[n,s]=Lu(e);if(!n)return;const a=window.getComputedStyle(t).getPropertyValue(n);if(a){const o=a.trim();return qo(o)?parseFloat(o):o}return ls(s)?Ei(s,t,r+1):s}function xs(e,t){return e?.[t]??e?.default??e}const Ii=new Set(["width","height","top","left","right","bottom",...Pt]),zu={test:e=>e==="auto",parse:e=>e},Ni=e=>t=>t.test(e),Ri=[Vt,X,$e,Qe,Id,Ed,zu],xa=e=>Ri.find(Ni(e));function $u(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Jo(e):!0}const Fu=new Set(["brightness","contrast","saturate","opacity"]);function Wu(e){const[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[n]=r.match(cs)||[];if(!n)return e;const s=r.replace(n,"");let a=Fu.has(t)?1:0;return n!==r&&(a*=100),t+"("+a+s+")"}const _u=/\b([a-z-]*)\(.*?\)/gu,In={...tt,getAnimatableNone:e=>{const t=e.match(_u);return t?t.map(Wu).join(" "):e}},va={...Vt,transform:Math.round},Gu={rotate:Qe,rotateX:Qe,rotateY:Qe,rotateZ:Qe,scale:pr,scaleX:pr,scaleY:pr,scaleZ:pr,skew:Qe,skewX:Qe,skewY:Qe,distance:X,translateX:X,translateY:X,translateZ:X,x:X,y:X,z:X,perspective:X,transformPerspective:X,opacity:Yt,originX:oa,originY:oa,originZ:X},vs={borderWidth:X,borderTopWidth:X,borderRightWidth:X,borderBottomWidth:X,borderLeftWidth:X,borderRadius:X,radius:X,borderTopLeftRadius:X,borderTopRightRadius:X,borderBottomRightRadius:X,borderBottomLeftRadius:X,width:X,maxWidth:X,height:X,maxHeight:X,top:X,right:X,bottom:X,left:X,padding:X,paddingTop:X,paddingRight:X,paddingBottom:X,paddingLeft:X,margin:X,marginTop:X,marginRight:X,marginBottom:X,marginLeft:X,backgroundPositionX:X,backgroundPositionY:X,...Gu,zIndex:va,fillOpacity:Yt,strokeOpacity:Yt,numOctaves:va},Uu={...vs,color:ue,backgroundColor:ue,outlineColor:ue,fill:ue,stroke:ue,borderColor:ue,borderTopColor:ue,borderRightColor:ue,borderBottomColor:ue,borderLeftColor:ue,filter:In,WebkitFilter:In},Di=e=>Uu[e];function Bi(e,t){let r=Di(e);return r!==In&&(r=tt),r.getAnimatableNone?r.getAnimatableNone(t):void 0}const Ku=new Set(["auto","none","0"]);function Hu(e,t,r){let n=0,s;for(;n<e.length&&!s;){const a=e[n];typeof a=="string"&&!Ku.has(a)&&qt(a).values.length&&(s=e[n]),n++}if(s&&r)for(const a of t)e[a]=Bi(r,s)}class Xu extends bs{constructor(t,r,n,s,a){super(t,r,n,s,a,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:r,name:n}=this;if(!r||!r.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),ls(c))){const d=Ei(c,r.current);d!==void 0&&(t[l]=d),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!Ii.has(n)||t.length!==2)return;const[s,a]=t,o=xa(s),i=xa(a);if(o!==i)if(ha(o)&&ha(i))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else ut[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:r}=this,n=[];for(let s=0;s<t.length;s++)(t[s]===null||$u(t[s]))&&n.push(s);n.length&&Hu(t,n,r)}measureInitialState(){const{element:t,unresolvedKeyframes:r,name:n}=this;if(!t||!t.current)return;n==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ut[n](t.measureViewportBox(),window.getComputedStyle(t.current)),r[0]=this.measuredOrigin;const s=r[r.length-1];s!==void 0&&t.getValue(n,s).jump(s,!1)}measureEndState(){const{element:t,name:r,unresolvedKeyframes:n}=this;if(!t||!t.current)return;const s=t.getValue(r);s&&s.jump(this.measuredOrigin,!1);const a=n.length-1,o=n[a];n[a]=ut[r](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEach(([i,l])=>{t.getValue(i).set(l)}),this.resolveNoneKeyframes()}}function Wr(e,t,r){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let n=document;const s=r?.[e]??n.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e)}const Li=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function ws(e){return Zo(e)&&"offsetHeight"in e}const wa=30,Yu=e=>!isNaN(parseFloat(e)),Gt={current:void 0};class qu{constructor(t,r={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=n=>{const s=we.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const a of this.dependents)a.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=r.owner}setCurrent(t){this.current=t,this.updatedAt=we.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Yu(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&$r(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,r){this.events[t]||(this.events[t]=new ns);const n=this.events[t].add(r);return t==="change"?()=>{n(),re.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,r){this.passiveEffect=t,this.stopPassiveEffect=r}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,r,n){this.set(r),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,r=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,r&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.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 Gt.current&&Gt.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=we.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>wa)return 0;const r=Math.min(this.updatedAt-this.prevUpdatedAt,wa);return ss(parseFloat(this.current)-parseFloat(this.prevFrameValue),r)}start(t){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=t(r),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(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function De(e,t){return new qu(e,t)}const{schedule:Cs}=ui(queueMicrotask,!1),Re={x:!1,y:!1};function Oi(){return Re.x||Re.y}function Zu(e){return e==="x"||e==="y"?Re[e]?null:(Re[e]=!0,()=>{Re[e]=!1}):Re.x||Re.y?null:(Re.x=Re.y=!0,()=>{Re.x=Re.y=!1})}function zi(e,t){const r=Wr(e),n=new AbortController,s={passive:!0,...t,signal:n.signal};return[r,s,()=>n.abort()]}function Ca(e){return!(e.pointerType==="touch"||Oi())}function Ju(e,t,r={}){const[n,s,a]=zi(e,r),o=i=>{if(!Ca(i))return;const{target:l}=i,c=t(l,i);if(typeof c!="function"||!l)return;const d=u=>{Ca(u)&&(c(u),l.removeEventListener("pointerleave",d))};l.addEventListener("pointerleave",d,s)};return n.forEach(i=>{i.addEventListener("pointerenter",o,s)}),a}const $i=(e,t)=>t?e===t?!0:$i(e,t.parentElement):!1,ks=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Qu=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function ef(e){return Qu.has(e.tagName)||e.tabIndex!==-1}const Sr=new WeakSet;function ka(e){return t=>{t.key==="Enter"&&e(t)}}function sn(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const tf=(e,t)=>{const r=e.currentTarget;if(!r)return;const n=ka(()=>{if(Sr.has(r))return;sn(r,"down");const s=ka(()=>{sn(r,"up")}),a=()=>sn(r,"cancel");r.addEventListener("keyup",s,t),r.addEventListener("blur",a,t)});r.addEventListener("keydown",n,t),r.addEventListener("blur",()=>r.removeEventListener("keydown",n),t)};function Sa(e){return ks(e)&&!Oi()}function rf(e,t,r={}){const[n,s,a]=zi(e,r),o=i=>{const l=i.currentTarget;if(!Sa(i))return;Sr.add(l);const c=t(l,i),d=(m,g)=>{window.removeEventListener("pointerup",u),window.removeEventListener("pointercancel",h),Sr.has(l)&&Sr.delete(l),Sa(m)&&typeof c=="function"&&c(m,{success:g})},u=m=>{d(m,l===window||l===document||r.useGlobalTarget||$i(l,m.target))},h=m=>{d(m,!1)};window.addEventListener("pointerup",u,s),window.addEventListener("pointercancel",h,s)};return n.forEach(i=>{(r.useGlobalTarget?window:i).addEventListener("pointerdown",o,s),ws(i)&&(i.addEventListener("focus",c=>tf(c,s)),!ef(i)&&!i.hasAttribute("tabindex")&&(i.tabIndex=0))}),a}function _r(e){return Zo(e)&&"ownerSVGElement"in e}const jr=new WeakMap;let Tr;const Fi=(e,t,r)=>(n,s)=>s&&s[0]?s[0][e+"Size"]:_r(n)&&"getBBox"in n?n.getBBox()[t]:n[r],nf=Fi("inline","width","offsetWidth"),sf=Fi("block","height","offsetHeight");function af({target:e,borderBoxSize:t}){jr.get(e)?.forEach(r=>{r(e,{get width(){return nf(e,t)},get height(){return sf(e,t)}})})}function of(e){e.forEach(af)}function lf(){typeof ResizeObserver>"u"||(Tr=new ResizeObserver(of))}function cf(e,t){Tr||lf();const r=Wr(e);return r.forEach(n=>{let s=jr.get(n);s||(s=new Set,jr.set(n,s)),s.add(t),Tr?.observe(n)}),()=>{r.forEach(n=>{const s=jr.get(n);s?.delete(t),s?.size||Tr?.unobserve(n)})}}const Ar=new Set;let vt;function df(){vt=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Ar.forEach(t=>t(e))},window.addEventListener("resize",vt)}function uf(e){return Ar.add(e),vt||df(),()=>{Ar.delete(e),!Ar.size&&typeof vt=="function"&&(window.removeEventListener("resize",vt),vt=void 0)}}function ff(e,t){return typeof e=="function"?uf(e):cf(e,t)}function Wi(e,t){let r;const n=()=>{const{currentTime:s}=t,o=(s===null?0:s.value)/100;r!==o&&e(o),r=o};return re.preUpdate(n,!0),()=>Be(n)}function _i(e){return _r(e)&&e.tagName==="svg"}function pf(...e){const t=!Array.isArray(e[0]),r=t?0:-1,n=e[0+r],s=e[1+r],a=e[2+r],o=e[3+r],i=ps(s,a,o);return t?i(n):i}const fe=e=>!!(e&&e.getVelocity);function hf(e,t,r){const n=e.get();let s=null,a=n,o;const i=typeof n=="string"?n.replace(/[\d.-]/g,""):void 0,l=()=>{s&&(s.stop(),s=null)},c=()=>{l(),s=new Fr({keyframes:[Ta(e.get()),Ta(a)],velocity:e.getVelocity(),type:"spring",restDelta:.001,restSpeed:.01,...r,onUpdate:o})};if(e.attach((d,u)=>{a=d,o=h=>u(ja(h,i)),re.postRender(c)},l),fe(t)){const d=t.on("change",h=>e.set(ja(h,i))),u=e.on("destroy",d);return()=>{d(),u()}}return l}function ja(e,t){return t?e+t:e}function Ta(e){return typeof e=="number"?e:parseFloat(e)}const mf=[...Ri,ue,tt],gf=e=>mf.find(Ni(e)),ir=p.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Aa(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function bf(...e){return t=>{let r=!1;const n=e.map(s=>{const a=Aa(s,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let s=0;s<n.length;s++){const a=n[s];typeof a=="function"?a():Aa(e[s],null)}}}}function yf(...e){return Lr.useCallback(bf(...e),e)}class xf extends Lr.Component{getSnapshotBeforeUpdate(t){const r=this.props.childRef.current;if(r&&t.isPresent&&!this.props.isPresent){const n=r.offsetParent,s=ws(n)&&n.offsetWidth||0,a=this.props.sizeRef.current;a.height=r.offsetHeight||0,a.width=r.offsetWidth||0,a.top=r.offsetTop,a.left=r.offsetLeft,a.right=s-a.width-a.left}return null}componentDidUpdate(){}render(){return this.props.children}}function vf({children:e,isPresent:t,anchorX:r,root:n}){const s=p.useId(),a=p.useRef(null),o=p.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:i}=p.useContext(ir),l=yf(a,e?.ref);return p.useInsertionEffect(()=>{const{width:c,height:d,top:u,left:h,right:m}=o.current;if(t||!a.current||!c||!d)return;const g=r==="left"?`left: ${h}`:`right: ${m}`;a.current.dataset.motionPopId=s;const w=document.createElement("style");i&&(w.nonce=i);const x=n??document.head;return x.appendChild(w),w.sheet&&w.sheet.insertRule(`
|
|
2
|
-
[data-motion-pop-id="${
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react/jsx-runtime"),h=require("react"),Er=require("react-router"),tn=require("react-dom");function Ed(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const $r=Ed(h),rn=h.createContext({});function pt(e){const t=h.useRef(null);return t.current===null&&(t.current=e()),t.current}const sn=typeof window<"u",nr=sn?h.useLayoutEffect:h.useEffect,zr=h.createContext(null);function nn(e,t){e.indexOf(t)===-1&&e.push(t)}function Fr(e,t){const r=e.indexOf(t);r>-1&&e.splice(r,1)}const Fe=(e,t,r)=>r>t?t:r<e?e:r;function vs(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let At=()=>{},be=()=>{};process.env.NODE_ENV!=="production"&&(At=(e,t,r)=>{!e&&typeof console<"u"&&console.warn(vs(t,r))},be=(e,t,r)=>{if(!e)throw new Error(vs(t,r))});const He={},ti=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function ri(e){return typeof e=="object"&&e!==null}const si=e=>/^0[^.\s]+$/u.test(e);function an(e){let t;return()=>(t===void 0&&(t=e()),t)}const Ce=e=>e,Id=(e,t)=>r=>t(e(r)),ar=(...e)=>e.reduce(Id),ht=(e,t,r)=>{const s=t-e;return s===0?1:(r-e)/s};class on{constructor(){this.subscriptions=[]}add(t){return nn(this.subscriptions,t),()=>Fr(this.subscriptions,t)}notify(t,r,s){const n=this.subscriptions.length;if(n)if(n===1)this.subscriptions[0](t,r,s);else for(let a=0;a<n;a++){const o=this.subscriptions[a];o&&o(t,r,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Ie=e=>e*1e3,Ee=e=>e/1e3;function ln(e,t){return t?e*(1e3/t):0}const ia=new Set;function Wr(e,t,r){e||ia.has(t)||(console.warn(vs(t,r)),ia.add(t))}const Nd=(e,t,r)=>{const s=t-e;return((r-e)%s+s)%s+e},ni=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,Rd=1e-7,Bd=12;function Dd(e,t,r,s,n){let a,o,i=0;do o=t+(r-t)/2,a=ni(o,s,n)-e,a>0?r=o:t=o;while(Math.abs(a)>Rd&&++i<Bd);return o}function or(e,t,r,s){if(e===t&&r===s)return Ce;const n=a=>Dd(a,0,1,e,r);return a=>a===0||a===1?a:ni(n(a),t,s)}const ai=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,oi=e=>t=>1-e(1-t),ii=or(.33,1.53,.69,.99),cn=oi(ii),li=ai(cn),ci=e=>(e*=2)<1?.5*cn(e):.5*(2-Math.pow(2,-10*(e-1))),dn=e=>1-Math.sin(Math.acos(e)),di=oi(dn),ui=ai(dn),Ld=or(.42,0,1,1),Od=or(0,0,.58,1),fi=or(.42,0,.58,1),hi=e=>Array.isArray(e)&&typeof e[0]!="number";function pi(e,t){return hi(e)?e[Nd(0,e.length,t)]:e}const mi=e=>Array.isArray(e)&&typeof e[0]=="number",la={linear:Ce,easeIn:Ld,easeInOut:fi,easeOut:Od,circIn:dn,circInOut:ui,circOut:di,backIn:cn,backInOut:li,backOut:ii,anticipate:ci},$d=e=>typeof e=="string",ca=e=>{if(mi(e)){be(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,r,s,n]=e;return or(t,r,s,n)}else if($d(e))return be(la[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),la[e];return e},hr=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function zd(e,t){let r=new Set,s=new Set,n=!1,a=!1;const o=new WeakSet;let i={delta:0,timestamp:0,isProcessing:!1};function l(d){o.has(d)&&(c.schedule(d),e()),d(i)}const c={schedule:(d,u=!1,p=!1)=>{const g=p&&n?r:s;return u&&o.add(d),g.has(d)||g.add(d),d},cancel:d=>{s.delete(d),o.delete(d)},process:d=>{if(i=d,n){a=!0;return}n=!0,[r,s]=[s,r],r.forEach(l),r.clear(),n=!1,a&&(a=!1,c.process(d))}};return c}const Fd=40;function gi(e,t){let r=!1,s=!0;const n={delta:0,timestamp:0,isProcessing:!1},a=()=>r=!0,o=hr.reduce((w,C)=>(w[C]=zd(a),w),{}),{setup:i,read:l,resolveKeyframes:c,preUpdate:d,update:u,preRender:p,render:m,postRender:g}=o,v=()=>{const w=He.useManualTiming?n.timestamp:performance.now();r=!1,He.useManualTiming||(n.delta=s?1e3/60:Math.max(Math.min(w-n.timestamp,Fd),1)),n.timestamp=w,n.isProcessing=!0,i.process(n),l.process(n),c.process(n),d.process(n),u.process(n),p.process(n),m.process(n),g.process(n),n.isProcessing=!1,r&&t&&(s=!1,e(v))},x=()=>{r=!0,s=!0,n.isProcessing||e(v)};return{schedule:hr.reduce((w,C)=>{const j=o[C];return w[C]=(S,T=!1,k=!1)=>(r||x(),j.schedule(S,T,k)),w},{}),cancel:w=>{for(let C=0;C<hr.length;C++)o[hr[C]].cancel(w)},state:n,steps:o}}const{schedule:re,cancel:De,state:me,steps:ts}=gi(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ce,!0);let jr;function Wd(){jr=void 0}const we={now:()=>(jr===void 0&&we.set(me.isProcessing||He.useManualTiming?me.timestamp:performance.now()),jr),set:e=>{jr=e,queueMicrotask(Wd)}},bi=e=>t=>typeof t=="string"&&t.startsWith(e),un=bi("--"),_d=bi("var(--"),fn=e=>_d(e)?Gd.test(e.split("/*")[0].trim()):!1,Gd=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Vt={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},qt={...Vt,transform:e=>Fe(0,1,e)},pr={...Vt,default:1},Gt=e=>Math.round(e*1e5)/1e5,hn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Ud(e){return e==null}const Hd=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,pn=(e,t)=>r=>!!(typeof r=="string"&&Hd.test(r)&&r.startsWith(e)||t&&!Ud(r)&&Object.prototype.hasOwnProperty.call(r,t)),yi=(e,t,r)=>s=>{if(typeof s!="string")return s;const[n,a,o,i]=s.match(hn);return{[e]:parseFloat(n),[t]:parseFloat(a),[r]:parseFloat(o),alpha:i!==void 0?parseFloat(i):1}},Kd=e=>Fe(0,255,e),rs={...Vt,transform:e=>Math.round(Kd(e))},ct={test:pn("rgb","red"),parse:yi("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:s=1})=>"rgba("+rs.transform(e)+", "+rs.transform(t)+", "+rs.transform(r)+", "+Gt(qt.transform(s))+")"};function Xd(e){let t="",r="",s="",n="";return e.length>5?(t=e.substring(1,3),r=e.substring(3,5),s=e.substring(5,7),n=e.substring(7,9)):(t=e.substring(1,2),r=e.substring(2,3),s=e.substring(3,4),n=e.substring(4,5),t+=t,r+=r,s+=s,n+=n),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(s,16),alpha:n?parseInt(n,16)/255:1}}const ws={test:pn("#"),parse:Xd,transform:ct.transform},ir=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Qe=ir("deg"),ze=ir("%"),X=ir("px"),Yd=ir("vh"),qd=ir("vw"),da={...ze,parse:e=>ze.parse(e)/100,transform:e=>ze.transform(e*100)},yt={test:pn("hsl","hue"),parse:yi("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:s=1})=>"hsla("+Math.round(e)+", "+ze.transform(Gt(t))+", "+ze.transform(Gt(r))+", "+Gt(qt.transform(s))+")"},ue={test:e=>ct.test(e)||ws.test(e)||yt.test(e),parse:e=>ct.test(e)?ct.parse(e):yt.test(e)?yt.parse(e):ws.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ct.transform(e):yt.transform(e),getAnimatableNone:e=>{const t=ue.parse(e);return t.alpha=0,ue.transform(t)}},Zd=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Jd(e){return isNaN(e)&&typeof e=="string"&&(e.match(hn)?.length||0)+(e.match(Zd)?.length||0)>0}const xi="number",vi="color",Qd="var",eu="var(",ua="${}",tu=/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 Zt(e){const t=e.toString(),r=[],s={color:[],number:[],var:[]},n=[];let a=0;const i=t.replace(tu,l=>(ue.test(l)?(s.color.push(a),n.push(vi),r.push(ue.parse(l))):l.startsWith(eu)?(s.var.push(a),n.push(Qd),r.push(l)):(s.number.push(a),n.push(xi),r.push(parseFloat(l))),++a,ua)).split(ua);return{values:r,split:i,indexes:s,types:n}}function wi(e){return Zt(e).values}function Ci(e){const{split:t,types:r}=Zt(e),s=t.length;return n=>{let a="";for(let o=0;o<s;o++)if(a+=t[o],n[o]!==void 0){const i=r[o];i===xi?a+=Gt(n[o]):i===vi?a+=ue.transform(n[o]):a+=n[o]}return a}}const ru=e=>typeof e=="number"?0:ue.test(e)?ue.getAnimatableNone(e):e;function su(e){const t=wi(e);return Ci(e)(t.map(ru))}const tt={test:Jd,parse:wi,createTransformer:Ci,getAnimatableNone:su};function ss(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function nu({hue:e,saturation:t,lightness:r,alpha:s}){e/=360,t/=100,r/=100;let n=0,a=0,o=0;if(!t)n=a=o=r;else{const i=r<.5?r*(1+t):r+t-r*t,l=2*r-i;n=ss(l,i,e+1/3),a=ss(l,i,e),o=ss(l,i,e-1/3)}return{red:Math.round(n*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:s}}function Ir(e,t){return r=>r>0?t:e}const oe=(e,t,r)=>e+(t-e)*r,ns=(e,t,r)=>{const s=e*e,n=r*(t*t-s)+s;return n<0?0:Math.sqrt(n)},au=[ws,ct,yt],ou=e=>au.find(t=>t.test(e));function fa(e){const t=ou(e);if(At(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let r=t.parse(e);return t===yt&&(r=nu(r)),r}const ha=(e,t)=>{const r=fa(e),s=fa(t);if(!r||!s)return Ir(e,t);const n={...r};return a=>(n.red=ns(r.red,s.red,a),n.green=ns(r.green,s.green,a),n.blue=ns(r.blue,s.blue,a),n.alpha=oe(r.alpha,s.alpha,a),ct.transform(n))},Cs=new Set(["none","hidden"]);function iu(e,t){return Cs.has(e)?r=>r<=0?e:t:r=>r>=1?t:e}function lu(e,t){return r=>oe(e,t,r)}function mn(e){return typeof e=="number"?lu:typeof e=="string"?fn(e)?Ir:ue.test(e)?ha:uu:Array.isArray(e)?ki:typeof e=="object"?ue.test(e)?ha:cu:Ir}function ki(e,t){const r=[...e],s=r.length,n=e.map((a,o)=>mn(a)(a,t[o]));return a=>{for(let o=0;o<s;o++)r[o]=n[o](a);return r}}function cu(e,t){const r={...e,...t},s={};for(const n in r)e[n]!==void 0&&t[n]!==void 0&&(s[n]=mn(e[n])(e[n],t[n]));return n=>{for(const a in s)r[a]=s[a](n);return r}}function du(e,t){const r=[],s={color:0,var:0,number:0};for(let n=0;n<t.values.length;n++){const a=t.types[n],o=e.indexes[a][s[a]],i=e.values[o]??0;r[n]=i,s[a]++}return r}const uu=(e,t)=>{const r=tt.createTransformer(t),s=Zt(e),n=Zt(t);return s.indexes.var.length===n.indexes.var.length&&s.indexes.color.length===n.indexes.color.length&&s.indexes.number.length>=n.indexes.number.length?Cs.has(e)&&!n.values.length||Cs.has(t)&&!s.values.length?iu(e,t):ar(ki(du(s,n),n.values),r):(At(!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"),Ir(e,t))};function ji(e,t,r){return typeof e=="number"&&typeof t=="number"&&typeof r=="number"?oe(e,t,r):mn(e)(e,t)}const fu=e=>{const t=({timestamp:r})=>e(r);return{start:(r=!0)=>re.update(t,r),stop:()=>De(t),now:()=>me.isProcessing?me.timestamp:we.now()}},Si=(e,t,r=10)=>{let s="";const n=Math.max(Math.round(t/r),2);for(let a=0;a<n;a++)s+=Math.round(e(a/(n-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},Nr=2e4;function gn(e){let t=0;const r=50;let s=e.next(t);for(;!s.done&&t<Nr;)t+=r,s=e.next(t);return t>=Nr?1/0:t}function Ti(e,t=100,r){const s=r({...e,keyframes:[0,t]}),n=Math.min(gn(s),Nr);return{type:"keyframes",ease:a=>s.next(n*a).value/t,duration:Ee(n)}}const hu=5;function Mi(e,t,r){const s=Math.max(t-hu,0);return ln(r-e(s),t-s)}const le={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},as=.001;function pu({duration:e=le.duration,bounce:t=le.bounce,velocity:r=le.velocity,mass:s=le.mass}){let n,a;At(e<=Ie(le.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-t;o=Fe(le.minDamping,le.maxDamping,o),e=Fe(le.minDuration,le.maxDuration,Ee(e)),o<1?(n=c=>{const d=c*o,u=d*e,p=d-r,m=ks(c,o),g=Math.exp(-u);return as-p/m*g},a=c=>{const u=c*o*e,p=u*r+r,m=Math.pow(o,2)*Math.pow(c,2)*e,g=Math.exp(-u),v=ks(Math.pow(c,2),o);return(-n(c)+as>0?-1:1)*((p-m)*g)/v}):(n=c=>{const d=Math.exp(-c*e),u=(c-r)*e+1;return-as+d*u},a=c=>{const d=Math.exp(-c*e),u=(r-c)*(e*e);return d*u});const i=5/e,l=gu(n,a,i);if(e=Ie(e),isNaN(l))return{stiffness:le.stiffness,damping:le.damping,duration:e};{const c=Math.pow(l,2)*s;return{stiffness:c,damping:o*2*Math.sqrt(s*c),duration:e}}}const mu=12;function gu(e,t,r){let s=r;for(let n=1;n<mu;n++)s=s-e(s)/t(s);return s}function ks(e,t){return e*Math.sqrt(1-t*t)}const bu=["duration","bounce"],yu=["stiffness","damping","mass"];function pa(e,t){return t.some(r=>e[r]!==void 0)}function xu(e){let t={velocity:le.velocity,stiffness:le.stiffness,damping:le.damping,mass:le.mass,isResolvedFromDuration:!1,...e};if(!pa(e,yu)&&pa(e,bu))if(e.visualDuration){const r=e.visualDuration,s=2*Math.PI/(r*1.2),n=s*s,a=2*Fe(.05,1,1-(e.bounce||0))*Math.sqrt(n);t={...t,mass:le.mass,stiffness:n,damping:a}}else{const r=pu(e);t={...t,...r,mass:le.mass},t.isResolvedFromDuration=!0}return t}function Jt(e=le.visualDuration,t=le.bounce){const r=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:s,restDelta:n}=r;const a=r.keyframes[0],o=r.keyframes[r.keyframes.length-1],i={done:!1,value:a},{stiffness:l,damping:c,mass:d,duration:u,velocity:p,isResolvedFromDuration:m}=xu({...r,velocity:-Ee(r.velocity||0)}),g=p||0,v=c/(2*Math.sqrt(l*d)),x=o-a,b=Ee(Math.sqrt(l/d)),y=Math.abs(x)<5;s||(s=y?le.restSpeed.granular:le.restSpeed.default),n||(n=y?le.restDelta.granular:le.restDelta.default);let w;if(v<1){const j=ks(b,v);w=S=>{const T=Math.exp(-v*b*S);return o-T*((g+v*b*x)/j*Math.sin(j*S)+x*Math.cos(j*S))}}else if(v===1)w=j=>o-Math.exp(-b*j)*(x+(g+b*x)*j);else{const j=b*Math.sqrt(v*v-1);w=S=>{const T=Math.exp(-v*b*S),k=Math.min(j*S,300);return o-T*((g+v*b*x)*Math.sinh(k)+j*x*Math.cosh(k))/j}}const C={calculatedDuration:m&&u||null,next:j=>{const S=w(j);if(m)i.done=j>=u;else{let T=j===0?g:0;v<1&&(T=j===0?Ie(g):Mi(w,j,S));const k=Math.abs(T)<=s,V=Math.abs(o-S)<=n;i.done=k&&V}return i.value=i.done?o:S,i},toString:()=>{const j=Math.min(gn(C),Nr),S=Si(T=>C.next(j*T).value,j,30);return j+"ms "+S},toTransition:()=>{}};return C}Jt.applyToOptions=e=>{const t=Ti(e,100,Jt);return e.ease=t.ease,e.duration=Ie(t.duration),e.type="keyframes",e};function js({keyframes:e,velocity:t=0,power:r=.8,timeConstant:s=325,bounceDamping:n=10,bounceStiffness:a=500,modifyTarget:o,min:i,max:l,restDelta:c=.5,restSpeed:d}){const u=e[0],p={done:!1,value:u},m=k=>i!==void 0&&k<i||l!==void 0&&k>l,g=k=>i===void 0?l:l===void 0||Math.abs(i-k)<Math.abs(l-k)?i:l;let v=r*t;const x=u+v,b=o===void 0?x:o(x);b!==x&&(v=b-u);const y=k=>-v*Math.exp(-k/s),w=k=>b+y(k),C=k=>{const V=y(k),A=w(k);p.done=Math.abs(V)<=c,p.value=p.done?b:A};let j,S;const T=k=>{m(p.value)&&(j=k,S=Jt({keyframes:[p.value,g(p.value)],velocity:Mi(w,k,p.value),damping:n,stiffness:a,restDelta:c,restSpeed:d}))};return T(0),{calculatedDuration:null,next:k=>{let V=!1;return!S&&j===void 0&&(V=!0,C(k),T(k)),j!==void 0&&k>=j?S.next(k-j):(!V&&C(k),p)}}}function vu(e,t,r){const s=[],n=r||He.mix||ji,a=e.length-1;for(let o=0;o<a;o++){let i=n(e[o],e[o+1]);if(t){const l=Array.isArray(t)?t[o]||Ce:t;i=ar(l,i)}s.push(i)}return s}function bn(e,t,{clamp:r=!0,ease:s,mixer:n}={}){const a=e.length;if(be(a===t.length,"Both input and output ranges must be the same length","range-length"),a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());const i=vu(t,s,n),l=i.length,c=d=>{if(o&&d<e[0])return t[0];let u=0;if(l>1)for(;u<e.length-2&&!(d<e[u+1]);u++);const p=ht(e[u],e[u+1],d);return i[u](p)};return r?d=>c(Fe(e[0],e[a-1],d)):c}function Ai(e,t){const r=e[e.length-1];for(let s=1;s<=t;s++){const n=ht(0,t,s);e.push(oe(r,1,n))}}function yn(e){const t=[0];return Ai(t,e.length-1),t}function wu(e,t){return e.map(r=>r*t)}function Cu(e,t){return e.map(()=>t||fi).splice(0,e.length-1)}function xt({duration:e=300,keyframes:t,times:r,ease:s="easeInOut"}){const n=hi(s)?s.map(ca):ca(s),a={done:!1,value:t[0]},o=wu(r&&r.length===t.length?r:yn(t),e),i=bn(o,t,{ease:Array.isArray(n)?n:Cu(t,n)});return{calculatedDuration:e,next:l=>(a.value=i(l),a.done=l>=e,a)}}const ku=e=>e!==null;function xn(e,{repeat:t,repeatType:r="loop"},s,n=1){const a=e.filter(ku),i=n<0||t&&r!=="loop"&&t%2===1?0:a.length-1;return!i||s===void 0?a[i]:s}const ju={decay:js,inertia:js,tween:xt,keyframes:xt,spring:Jt};function Vi(e){typeof e.type=="string"&&(e.type=ju[e.type])}class vn{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,r){return this.finished.then(t,r)}}const Su=e=>e/100;class _r extends vn{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:r}=this.options;r&&r.updatedAt!==we.now()&&this.tick(we.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;Vi(t);const{type:r=xt,repeat:s=0,repeatDelay:n=0,repeatType:a,velocity:o=0}=t;let{keyframes:i}=t;const l=r||xt;process.env.NODE_ENV!=="production"&&l!==xt&&be(i.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${i}`,"spring-two-frames"),l!==xt&&typeof i[0]!="number"&&(this.mixKeyframes=ar(Su,ji(i[0],i[1])),i=[0,100]);const c=l({...t,keyframes:i});a==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...i].reverse(),velocity:-o})),c.calculatedDuration===null&&(c.calculatedDuration=gn(c));const{calculatedDuration:d}=c;this.calculatedDuration=d,this.resolvedDuration=d+n,this.totalDuration=this.resolvedDuration*(s+1)-n,this.generator=c}updateTime(t){const r=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=r}tick(t,r=!1){const{generator:s,totalDuration:n,mixKeyframes:a,mirroredGenerator:o,resolvedDuration:i,calculatedDuration:l}=this;if(this.startTime===null)return s.next(0);const{delay:c=0,keyframes:d,repeat:u,repeatType:p,repeatDelay:m,type:g,onUpdate:v,finalKeyframe:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-n/this.speed,this.startTime)),r?this.currentTime=t:this.updateTime(t);const b=this.currentTime-c*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?b<0:b>n;this.currentTime=Math.max(b,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=n);let w=this.currentTime,C=s;if(u){const k=Math.min(this.currentTime,n)/i;let V=Math.floor(k),A=k%1;!A&&k>=1&&(A=1),A===1&&V--,V=Math.min(V,u+1),!!(V%2)&&(p==="reverse"?(A=1-A,m&&(A-=m/i)):p==="mirror"&&(C=o)),w=Fe(0,1,A)*i}const j=y?{done:!1,value:d[0]}:C.next(w);a&&(j.value=a(j.value));let{done:S}=j;!y&&l!==null&&(S=this.playbackSpeed>=0?this.currentTime>=n:this.currentTime<=0);const T=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&S);return T&&g!==js&&(j.value=xn(d,this.options,x,this.speed)),v&&v(j.value),T&&this.finish(),j}then(t,r){return this.finished.then(t,r)}get duration(){return Ee(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Ee(t)}get time(){return Ee(this.currentTime)}set time(t){t=Ie(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(we.now());const r=this.playbackSpeed!==t;this.playbackSpeed=t,r&&(this.time=Ee(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=fu,startTime:r}=this.options;this.driver||(this.driver=t(n=>this.tick(n))),this.options.onPlay?.();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=r??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(we.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}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){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function Tu(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const dt=e=>e*180/Math.PI,Ss=e=>{const t=dt(Math.atan2(e[1],e[0]));return Ts(t)},Mu={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Ss,rotateZ:Ss,skewX:e=>dt(Math.atan(e[1])),skewY:e=>dt(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Ts=e=>(e=e%360,e<0&&(e+=360),e),ma=Ss,ga=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),ba=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Au={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ga,scaleY:ba,scale:e=>(ga(e)+ba(e))/2,rotateX:e=>Ts(dt(Math.atan2(e[6],e[5]))),rotateY:e=>Ts(dt(Math.atan2(-e[2],e[0]))),rotateZ:ma,rotate:ma,skewX:e=>dt(Math.atan(e[4])),skewY:e=>dt(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Ms(e){return e.includes("scale")?1:0}function As(e,t){if(!e||e==="none")return Ms(t);const r=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,n;if(r)s=Au,n=r;else{const i=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Mu,n=i}if(!n)return Ms(t);const a=s[t],o=n[1].split(",").map(Pu);return typeof a=="function"?a(o):o[a]}const Vu=(e,t)=>{const{transform:r="none"}=getComputedStyle(e);return As(r,t)};function Pu(e){return parseFloat(e.trim())}const Pt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Et=new Set(Pt),ya=e=>e===Vt||e===X,Eu=new Set(["x","y","z"]),Iu=Pt.filter(e=>!Eu.has(e));function Nu(e){const t=[];return Iu.forEach(r=>{const s=e.getValue(r);s!==void 0&&(t.push([r,s.get()]),s.set(r.startsWith("scale")?1:0))}),t}const ut={width:({x:e},{paddingLeft:t="0",paddingRight:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),height:({y:e},{paddingTop:t="0",paddingBottom:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),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})=>As(t,"x"),y:(e,{transform:t})=>As(t,"y")};ut.translateX=ut.x;ut.translateY=ut.y;const ft=new Set;let Vs=!1,Ps=!1,Es=!1;function Pi(){if(Ps){const e=Array.from(ft).filter(s=>s.needsMeasurement),t=new Set(e.map(s=>s.element)),r=new Map;t.forEach(s=>{const n=Nu(s);n.length&&(r.set(s,n),s.render())}),e.forEach(s=>s.measureInitialState()),t.forEach(s=>{s.render();const n=r.get(s);n&&n.forEach(([a,o])=>{s.getValue(a)?.set(o)})}),e.forEach(s=>s.measureEndState()),e.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}Ps=!1,Vs=!1,ft.forEach(e=>e.complete(Es)),ft.clear()}function Ei(){ft.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Ps=!0)})}function Ru(){Es=!0,Ei(),Pi(),Es=!1}class wn{constructor(t,r,s,n,a,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=r,this.name=s,this.motionValue=n,this.element=a,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(ft.add(this),Vs||(Vs=!0,re.read(Ei),re.resolveKeyframes(Pi))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:r,element:s,motionValue:n}=this;if(t[0]===null){const a=n?.get(),o=t[t.length-1];if(a!==void 0)t[0]=a;else if(s&&r){const i=s.readValue(r,o);i!=null&&(t[0]=i)}t[0]===void 0&&(t[0]=o),n&&a===void 0&&n.set(t[0])}Tu(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),ft.delete(this)}cancel(){this.state==="scheduled"&&(ft.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Bu=e=>e.startsWith("--");function Du(e,t,r){Bu(t)?e.style.setProperty(t,r):e.style[t]=r}const Ii=an(()=>window.ScrollTimeline!==void 0),Lu={};function Ou(e,t){const r=an(e);return()=>Lu[t]??r()}const Ni=Ou(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Wt=([e,t,r,s])=>`cubic-bezier(${e}, ${t}, ${r}, ${s})`,xa={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Wt([0,.65,.55,1]),circOut:Wt([.55,0,1,.45]),backIn:Wt([.31,.01,.66,-.59]),backOut:Wt([.33,1.53,.69,.99])};function Ri(e,t){if(e)return typeof e=="function"?Ni()?Si(e,t):"ease-out":mi(e)?Wt(e):Array.isArray(e)?e.map(r=>Ri(r,t)||xa.easeOut):xa[e]}function $u(e,t,r,{delay:s=0,duration:n=300,repeat:a=0,repeatType:o="loop",ease:i="easeOut",times:l}={},c=void 0){const d={[t]:r};l&&(d.offset=l);const u=Ri(i,n);Array.isArray(u)&&(d.easing=u);const p={delay:s,duration:n,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:a+1,direction:o==="reverse"?"alternate":"normal"};return c&&(p.pseudoElement=c),e.animate(d,p)}function Cn(e){return typeof e=="function"&&"applyToOptions"in e}function zu({type:e,...t}){return Cn(e)&&Ni()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Fu extends vn{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:r,name:s,keyframes:n,pseudoElement:a,allowFlatten:o=!1,finalKeyframe:i,onComplete:l}=t;this.isPseudoElement=!!a,this.allowFlatten=o,this.options=t,be(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const c=zu(t);this.animation=$u(r,s,n,c,a),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){const d=xn(n,this.options,i,this.speed);this.updateMotionValue?this.updateMotionValue(d):Du(r,s,d),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}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(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return Ee(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Ee(t)}get time(){return Ee(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Ie(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:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&Ii()?(this.animation.timeline=t,Ce):r(this)}}const Bi={anticipate:ci,backInOut:li,circInOut:ui};function Wu(e){return e in Bi}function _u(e){typeof e.ease=="string"&&Wu(e.ease)&&(e.ease=Bi[e.ease])}const va=10;class Gu extends Fu{constructor(t){_u(t),Vi(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:r,onUpdate:s,onComplete:n,element:a,...o}=this.options;if(!r)return;if(t!==void 0){r.set(t);return}const i=new _r({...o,autoplay:!1}),l=Ie(this.finishedTime??this.time);r.setWithVelocity(i.sample(l-va).value,i.sample(l).value,va),i.stop()}}const wa=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(tt.test(e)||e==="0")&&!e.startsWith("url("));function Uu(e){const t=e[0];if(e.length===1)return!0;for(let r=0;r<e.length;r++)if(e[r]!==t)return!0}function Hu(e,t,r,s){const n=e[0];if(n===null)return!1;if(t==="display"||t==="visibility")return!0;const a=e[e.length-1],o=wa(n,t),i=wa(a,t);return At(o===i,`You are trying to animate ${t} from "${n}" to "${a}". "${o?a:n}" is not an animatable value.`,"value-not-animatable"),!o||!i?!1:Uu(e)||(r==="spring"||Cn(r))&&s}function Is(e){e.duration=0,e.type="keyframes"}const Ku=new Set(["opacity","clipPath","filter","transform"]),Xu=an(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Yu(e){const{motionValue:t,name:r,repeatDelay:s,repeatType:n,damping:a,type:o}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=t.owner.getProps();return Xu()&&r&&Ku.has(r)&&(r!=="transform"||!c)&&!l&&!s&&n!=="mirror"&&a!==0&&o!=="inertia"}const qu=40;class Zu extends vn{constructor({autoplay:t=!0,delay:r=0,type:s="keyframes",repeat:n=0,repeatDelay:a=0,repeatType:o="loop",keyframes:i,name:l,motionValue:c,element:d,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=we.now();const p={autoplay:t,delay:r,type:s,repeat:n,repeatDelay:a,repeatType:o,name:l,motionValue:c,element:d,...u},m=d?.KeyframeResolver||wn;this.keyframeResolver=new m(i,(g,v,x)=>this.onKeyframesResolved(g,v,p,!x),l,c,d),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,r,s,n){this.keyframeResolver=void 0;const{name:a,type:o,velocity:i,delay:l,isHandoff:c,onUpdate:d}=s;this.resolvedAt=we.now(),Hu(t,a,o,i)||((He.instantAnimations||!l)&&d?.(xn(t,s,r)),t[0]=t[t.length-1],Is(s),s.repeat=0);const p={startTime:n?this.resolvedAt?this.resolvedAt-this.createdAt>qu?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:r,...s,keyframes:t},m=!c&&Yu(p)?new Gu({...p,element:p.motionValue.owner.current}):new _r(p);m.finished.then(()=>this.notifyFinished()).catch(Ce),this.pendingTimeline&&(this.stopTimeline=m.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(t,r){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Ru()),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(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}class Ju{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,r){for(let s=0;s<this.animations.length;s++)this.animations[s][t]=r}attachTimeline(t){const r=this.animations.map(s=>s.attachTimeline(t));return()=>{r.forEach((s,n)=>{s&&s(),this.animations[n].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return Ca(this.animations,"duration")}get iterationDuration(){return Ca(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(r=>r[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function Ca(e,t){let r=0;for(let s=0;s<e.length;s++){const n=e[s][t];n!==null&&n>r&&(r=n)}return r}class Qu extends Ju{then(t,r){return this.finished.finally(t).then(()=>{})}}const ef=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function tf(e){const t=ef.exec(e);if(!t)return[,];const[,r,s,n]=t;return[`--${r??s}`,n]}const rf=4;function Di(e,t,r=1){be(r<=rf,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,n]=tf(e);if(!s)return;const a=window.getComputedStyle(t).getPropertyValue(s);if(a){const o=a.trim();return ti(o)?parseFloat(o):o}return fn(n)?Di(n,t,r+1):n}function kn(e,t){return e?.[t]??e?.default??e}const Li=new Set(["width","height","top","left","right","bottom",...Pt]),sf={test:e=>e==="auto",parse:e=>e},Oi=e=>t=>t.test(e),$i=[Vt,X,ze,Qe,qd,Yd,sf],ka=e=>$i.find(Oi(e));function nf(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||si(e):!0}const af=new Set(["brightness","contrast","saturate","opacity"]);function of(e){const[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[s]=r.match(hn)||[];if(!s)return e;const n=r.replace(s,"");let a=af.has(t)?1:0;return s!==r&&(a*=100),t+"("+a+n+")"}const lf=/\b([a-z-]*)\(.*?\)/gu,Ns={...tt,getAnimatableNone:e=>{const t=e.match(lf);return t?t.map(of).join(" "):e}},ja={...Vt,transform:Math.round},cf={rotate:Qe,rotateX:Qe,rotateY:Qe,rotateZ:Qe,scale:pr,scaleX:pr,scaleY:pr,scaleZ:pr,skew:Qe,skewX:Qe,skewY:Qe,distance:X,translateX:X,translateY:X,translateZ:X,x:X,y:X,z:X,perspective:X,transformPerspective:X,opacity:qt,originX:da,originY:da,originZ:X},jn={borderWidth:X,borderTopWidth:X,borderRightWidth:X,borderBottomWidth:X,borderLeftWidth:X,borderRadius:X,radius:X,borderTopLeftRadius:X,borderTopRightRadius:X,borderBottomRightRadius:X,borderBottomLeftRadius:X,width:X,maxWidth:X,height:X,maxHeight:X,top:X,right:X,bottom:X,left:X,padding:X,paddingTop:X,paddingRight:X,paddingBottom:X,paddingLeft:X,margin:X,marginTop:X,marginRight:X,marginBottom:X,marginLeft:X,backgroundPositionX:X,backgroundPositionY:X,...cf,zIndex:ja,fillOpacity:qt,strokeOpacity:qt,numOctaves:ja},df={...jn,color:ue,backgroundColor:ue,outlineColor:ue,fill:ue,stroke:ue,borderColor:ue,borderTopColor:ue,borderRightColor:ue,borderBottomColor:ue,borderLeftColor:ue,filter:Ns,WebkitFilter:Ns},zi=e=>df[e];function Fi(e,t){let r=zi(e);return r!==Ns&&(r=tt),r.getAnimatableNone?r.getAnimatableNone(t):void 0}const uf=new Set(["auto","none","0"]);function ff(e,t,r){let s=0,n;for(;s<e.length&&!n;){const a=e[s];typeof a=="string"&&!uf.has(a)&&Zt(a).values.length&&(n=e[s]),s++}if(n&&r)for(const a of t)e[a]=Fi(r,n)}class hf extends wn{constructor(t,r,s,n,a){super(t,r,s,n,a,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:r,name:s}=this;if(!r||!r.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),fn(c))){const d=Di(c,r.current);d!==void 0&&(t[l]=d),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!Li.has(s)||t.length!==2)return;const[n,a]=t,o=ka(n),i=ka(a);if(o!==i)if(ya(o)&&ya(i))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else ut[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:r}=this,s=[];for(let n=0;n<t.length;n++)(t[n]===null||nf(t[n]))&&s.push(n);s.length&&ff(t,s,r)}measureInitialState(){const{element:t,unresolvedKeyframes:r,name:s}=this;if(!t||!t.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ut[s](t.measureViewportBox(),window.getComputedStyle(t.current)),r[0]=this.measuredOrigin;const n=r[r.length-1];n!==void 0&&t.getValue(s,n).jump(n,!1)}measureEndState(){const{element:t,name:r,unresolvedKeyframes:s}=this;if(!t||!t.current)return;const n=t.getValue(r);n&&n.jump(this.measuredOrigin,!1);const a=s.length-1,o=s[a];s[a]=ut[r](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEach(([i,l])=>{t.getValue(i).set(l)}),this.resolveNoneKeyframes()}}function Gr(e,t,r){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let s=document;const n=r?.[e]??s.querySelectorAll(e);return n?Array.from(n):[]}return Array.from(e)}const Wi=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Sn(e){return ri(e)&&"offsetHeight"in e}const Sa=30,pf=e=>!isNaN(parseFloat(e)),Ut={current:void 0};class mf{constructor(t,r={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{const n=we.now();if(this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const a of this.dependents)a.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=r.owner}setCurrent(t){this.current=t,this.updatedAt=we.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=pf(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Wr(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,r){this.events[t]||(this.events[t]=new on);const s=this.events[t].add(r);return t==="change"?()=>{s(),re.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,r){this.passiveEffect=t,this.stopPassiveEffect=r}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,r,s){this.set(r),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-s}jump(t,r=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,r&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.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 Ut.current&&Ut.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=we.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Sa)return 0;const r=Math.min(this.updatedAt-this.prevUpdatedAt,Sa);return ln(parseFloat(this.current)-parseFloat(this.prevFrameValue),r)}start(t){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=t(r),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(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Be(e,t){return new mf(e,t)}const{schedule:Tn}=gi(queueMicrotask,!1),Re={x:!1,y:!1};function _i(){return Re.x||Re.y}function gf(e){return e==="x"||e==="y"?Re[e]?null:(Re[e]=!0,()=>{Re[e]=!1}):Re.x||Re.y?null:(Re.x=Re.y=!0,()=>{Re.x=Re.y=!1})}function Gi(e,t){const r=Gr(e),s=new AbortController,n={passive:!0,...t,signal:s.signal};return[r,n,()=>s.abort()]}function Ta(e){return!(e.pointerType==="touch"||_i())}function bf(e,t,r={}){const[s,n,a]=Gi(e,r),o=i=>{if(!Ta(i))return;const{target:l}=i,c=t(l,i);if(typeof c!="function"||!l)return;const d=u=>{Ta(u)&&(c(u),l.removeEventListener("pointerleave",d))};l.addEventListener("pointerleave",d,n)};return s.forEach(i=>{i.addEventListener("pointerenter",o,n)}),a}const Ui=(e,t)=>t?e===t?!0:Ui(e,t.parentElement):!1,Mn=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,yf=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function xf(e){return yf.has(e.tagName)||e.tabIndex!==-1}const Sr=new WeakSet;function Ma(e){return t=>{t.key==="Enter"&&e(t)}}function os(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const vf=(e,t)=>{const r=e.currentTarget;if(!r)return;const s=Ma(()=>{if(Sr.has(r))return;os(r,"down");const n=Ma(()=>{os(r,"up")}),a=()=>os(r,"cancel");r.addEventListener("keyup",n,t),r.addEventListener("blur",a,t)});r.addEventListener("keydown",s,t),r.addEventListener("blur",()=>r.removeEventListener("keydown",s),t)};function Aa(e){return Mn(e)&&!_i()}function wf(e,t,r={}){const[s,n,a]=Gi(e,r),o=i=>{const l=i.currentTarget;if(!Aa(i))return;Sr.add(l);const c=t(l,i),d=(m,g)=>{window.removeEventListener("pointerup",u),window.removeEventListener("pointercancel",p),Sr.has(l)&&Sr.delete(l),Aa(m)&&typeof c=="function"&&c(m,{success:g})},u=m=>{d(m,l===window||l===document||r.useGlobalTarget||Ui(l,m.target))},p=m=>{d(m,!1)};window.addEventListener("pointerup",u,n),window.addEventListener("pointercancel",p,n)};return s.forEach(i=>{(r.useGlobalTarget?window:i).addEventListener("pointerdown",o,n),Sn(i)&&(i.addEventListener("focus",c=>vf(c,n)),!xf(i)&&!i.hasAttribute("tabindex")&&(i.tabIndex=0))}),a}function Ur(e){return ri(e)&&"ownerSVGElement"in e}const Tr=new WeakMap;let Mr;const Hi=(e,t,r)=>(s,n)=>n&&n[0]?n[0][e+"Size"]:Ur(s)&&"getBBox"in s?s.getBBox()[t]:s[r],Cf=Hi("inline","width","offsetWidth"),kf=Hi("block","height","offsetHeight");function jf({target:e,borderBoxSize:t}){Tr.get(e)?.forEach(r=>{r(e,{get width(){return Cf(e,t)},get height(){return kf(e,t)}})})}function Sf(e){e.forEach(jf)}function Tf(){typeof ResizeObserver>"u"||(Mr=new ResizeObserver(Sf))}function Mf(e,t){Mr||Tf();const r=Gr(e);return r.forEach(s=>{let n=Tr.get(s);n||(n=new Set,Tr.set(s,n)),n.add(t),Mr?.observe(s)}),()=>{r.forEach(s=>{const n=Tr.get(s);n?.delete(t),n?.size||Mr?.unobserve(s)})}}const Ar=new Set;let vt;function Af(){vt=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Ar.forEach(t=>t(e))},window.addEventListener("resize",vt)}function Vf(e){return Ar.add(e),vt||Af(),()=>{Ar.delete(e),!Ar.size&&typeof vt=="function"&&(window.removeEventListener("resize",vt),vt=void 0)}}function Pf(e,t){return typeof e=="function"?Vf(e):Mf(e,t)}function Ki(e,t){let r;const s=()=>{const{currentTime:n}=t,o=(n===null?0:n.value)/100;r!==o&&e(o),r=o};return re.preUpdate(s,!0),()=>De(s)}function Xi(e){return Ur(e)&&e.tagName==="svg"}function Ef(...e){const t=!Array.isArray(e[0]),r=t?0:-1,s=e[0+r],n=e[1+r],a=e[2+r],o=e[3+r],i=bn(n,a,o);return t?i(s):i}const fe=e=>!!(e&&e.getVelocity);function If(e,t,r){const s=e.get();let n=null,a=s,o;const i=typeof s=="string"?s.replace(/[\d.-]/g,""):void 0,l=()=>{n&&(n.stop(),n=null)},c=()=>{l(),n=new _r({keyframes:[Pa(e.get()),Pa(a)],velocity:e.getVelocity(),type:"spring",restDelta:.001,restSpeed:.01,...r,onUpdate:o})};if(e.attach((d,u)=>{a=d,o=p=>u(Va(p,i)),re.postRender(c)},l),fe(t)){const d=t.on("change",p=>e.set(Va(p,i))),u=e.on("destroy",d);return()=>{d(),u()}}return l}function Va(e,t){return t?e+t:e}function Pa(e){return typeof e=="number"?e:parseFloat(e)}const Nf=[...$i,ue,tt],Rf=e=>Nf.find(Oi(e)),lr=h.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Ea(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Bf(...e){return t=>{let r=!1;const s=e.map(n=>{const a=Ea(n,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let n=0;n<s.length;n++){const a=s[n];typeof a=="function"?a():Ea(e[n],null)}}}}function Df(...e){return $r.useCallback(Bf(...e),e)}class Lf extends $r.Component{getSnapshotBeforeUpdate(t){const r=this.props.childRef.current;if(r&&t.isPresent&&!this.props.isPresent){const s=r.offsetParent,n=Sn(s)&&s.offsetWidth||0,a=this.props.sizeRef.current;a.height=r.offsetHeight||0,a.width=r.offsetWidth||0,a.top=r.offsetTop,a.left=r.offsetLeft,a.right=n-a.width-a.left}return null}componentDidUpdate(){}render(){return this.props.children}}function Of({children:e,isPresent:t,anchorX:r,root:s}){const n=h.useId(),a=h.useRef(null),o=h.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:i}=h.useContext(lr),l=Df(a,e?.ref);return h.useInsertionEffect(()=>{const{width:c,height:d,top:u,left:p,right:m}=o.current;if(t||!a.current||!c||!d)return;const g=r==="left"?`left: ${p}`:`right: ${m}`;a.current.dataset.motionPopId=n;const v=document.createElement("style");i&&(v.nonce=i);const x=s??document.head;return x.appendChild(v),v.sheet&&v.sheet.insertRule(`
|
|
2
|
+
[data-motion-pop-id="${n}"] {
|
|
3
3
|
position: absolute !important;
|
|
4
4
|
width: ${c}px !important;
|
|
5
5
|
height: ${d}px !important;
|
|
6
6
|
${g}px !important;
|
|
7
7
|
top: ${u}px !important;
|
|
8
8
|
}
|
|
9
|
-
`),()=>{x.contains(w)&&x.removeChild(w)}},[t]),f.jsx(xf,{isPresent:t,childRef:a,sizeRef:o,children:Lr.cloneElement(e,{ref:l})})}const wf=({children:e,initial:t,isPresent:r,onExitComplete:n,custom:s,presenceAffectsLayout:a,mode:o,anchorX:i,root:l})=>{const c=ht(Cf),d=p.useId();let u=!0,h=p.useMemo(()=>(u=!1,{id:d,initial:t,isPresent:r,custom:s,onExitComplete:m=>{c.set(m,!0);for(const g of c.values())if(!g)return;n&&n()},register:m=>(c.set(m,!1),()=>c.delete(m))}),[r,c,n]);return a&&u&&(h={...h}),p.useMemo(()=>{c.forEach((m,g)=>c.set(g,!1))},[r]),Lr.useEffect(()=>{!r&&!c.size&&n&&n()},[r]),o==="popLayout"&&(e=f.jsx(vf,{isPresent:r,anchorX:i,root:l,children:e})),f.jsx(Or.Provider,{value:h,children:e})};function Cf(){return new Map}function Gi(e=!0){const t=p.useContext(Or);if(t===null)return[!0,null];const{isPresent:r,onExitComplete:n,register:s}=t,a=p.useId();p.useEffect(()=>{if(e)return s(a)},[e]);const o=p.useCallback(()=>e&&n&&n(a),[a,n,e]);return!r&&n?[!1,o]:[!0]}const hr=e=>e.key||"";function Ma(e){const t=[];return p.Children.forEach(e,r=>{p.isValidElement(r)&&t.push(r)}),t}const We=({children:e,custom:t,initial:r=!0,onExitComplete:n,presenceAffectsLayout:s=!0,mode:a="sync",propagate:o=!1,anchorX:i="left",root:l})=>{const[c,d]=Gi(o),u=p.useMemo(()=>Ma(e),[e]),h=o&&!c?[]:u.map(hr),m=p.useRef(!0),g=p.useRef(u),w=ht(()=>new Map),[x,b]=p.useState(u),[y,v]=p.useState(u);nr(()=>{m.current=!1,g.current=u;for(let j=0;j<y.length;j++){const A=hr(y[j]);h.includes(A)?w.delete(A):w.get(A)!==!0&&w.set(A,!1)}},[y,h.length,h.join("-")]);const C=[];if(u!==x){let j=[...u];for(let A=0;A<y.length;A++){const k=y[A],V=hr(k);h.includes(V)||(j.splice(A,0,k),C.push(k))}return a==="wait"&&C.length&&(j=C),v(Ma(j)),b(u),null}process.env.NODE_ENV!=="production"&&a==="wait"&&y.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:S}=p.useContext(Qn);return f.jsx(f.Fragment,{children:y.map(j=>{const A=hr(j),k=o&&!c?!1:u===y||h.includes(A),V=()=>{if(w.has(A))w.set(A,!0);else return;let M=!0;w.forEach(D=>{D||(M=!1)}),M&&(S?.(),v(g.current),o&&d?.(),n&&n())};return f.jsx(wf,{isPresent:k,initial:!m.current||r?void 0:!1,custom:t,presenceAffectsLayout:s,mode:a,root:l,onExitComplete:k?void 0:V,anchorX:i,children:j},A)})})},Ui=p.createContext({strict:!1}),Va={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"]},Tt={};for(const e in Va)Tt[e]={isEnabled:t=>Va[e].some(r=>!!t[r])};function kf(e){for(const t in e)Tt[t]={...Tt[t],...e[t]}}const Sf=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 Ir(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Sf.has(e)}let Ki=e=>!Ir(e);function jf(e){typeof e=="function"&&(Ki=t=>t.startsWith("on")?!Ir(t):e(t))}try{jf(require("@emotion/is-prop-valid").default)}catch{}function Tf(e,t,r){const n={};for(const s in e)s==="values"&&typeof e.values=="object"||(Ki(s)||r===!0&&Ir(s)||!t&&!Ir(s)||e.draggable&&s.startsWith("onDrag"))&&(n[s]=e[s]);return n}const Gr=p.createContext({});function Ur(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Jt(e){return typeof e=="string"||Array.isArray(e)}const Ss=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],js=["initial",...Ss];function Kr(e){return Ur(e.animate)||js.some(t=>Jt(e[t]))}function Hi(e){return!!(Kr(e)||e.variants)}function Af(e,t){if(Kr(e)){const{initial:r,animate:n}=e;return{initial:r===!1||Jt(r)?r:void 0,animate:Jt(n)?n:void 0}}return e.inherit!==!1?t:{}}function Mf(e){const{initial:t,animate:r}=Af(e,p.useContext(Gr));return p.useMemo(()=>({initial:t,animate:r}),[Pa(t),Pa(r)])}function Pa(e){return Array.isArray(e)?e.join(" "):e}const Qt={};function Vf(e){for(const t in e)Qt[t]=e[t],is(t)&&(Qt[t].isCSSVariable=!0)}function Xi(e,{layout:t,layoutId:r}){return Et.has(e)||e.startsWith("origin")||(t||r!==void 0)&&(!!Qt[e]||e==="opacity")}const Pf={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Ef=Pt.length;function If(e,t,r){let n="",s=!0;for(let a=0;a<Ef;a++){const o=Pt[a],i=e[o];if(i===void 0)continue;let l=!0;if(typeof i=="number"?l=i===(o.startsWith("scale")?1:0):l=parseFloat(i)===0,!l||r){const c=Li(i,vs[o]);if(!l){s=!1;const d=Pf[o]||o;n+=`${d}(${c}) `}r&&(t[o]=c)}}return n=n.trim(),r?n=r(t,s?"":n):s&&(n="none"),n}function Ts(e,t,r){const{style:n,vars:s,transformOrigin:a}=e;let o=!1,i=!1;for(const l in t){const c=t[l];if(Et.has(l)){o=!0;continue}else if(is(l)){s[l]=c;continue}else{const d=Li(c,vs[l]);l.startsWith("origin")?(i=!0,a[l]=d):n[l]=d}}if(t.transform||(o||r?n.transform=If(t,e.transform,r):n.transform&&(n.transform="none")),i){const{originX:l="50%",originY:c="50%",originZ:d=0}=a;n.transformOrigin=`${l} ${c} ${d}`}}const As=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Yi(e,t,r){for(const n in t)!fe(t[n])&&!Xi(n,r)&&(e[n]=t[n])}function Nf({transformTemplate:e},t){return p.useMemo(()=>{const r=As();return Ts(r,t,e),Object.assign({},r.vars,r.style)},[t])}function Rf(e,t){const r=e.style||{},n={};return Yi(n,r,e),Object.assign(n,Nf(e,t)),n}function Df(e,t){const r={},n=Rf(e,t);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=n,r}const Bf={offset:"stroke-dashoffset",array:"stroke-dasharray"},Lf={offset:"strokeDashoffset",array:"strokeDasharray"};function Of(e,t,r=1,n=0,s=!0){e.pathLength=1;const a=s?Bf:Lf;e[a.offset]=X.transform(-n);const o=X.transform(t),i=X.transform(r);e[a.array]=`${o} ${i}`}function qi(e,{attrX:t,attrY:r,attrScale:n,pathLength:s,pathSpacing:a=1,pathOffset:o=0,...i},l,c,d){if(Ts(e,i,c),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:u,style:h}=e;u.transform&&(h.transform=u.transform,delete u.transform),(h.transform||u.transformOrigin)&&(h.transformOrigin=u.transformOrigin??"50% 50%",delete u.transformOrigin),h.transform&&(h.transformBox=d?.transformBox??"fill-box",delete u.transformBox),t!==void 0&&(u.x=t),r!==void 0&&(u.y=r),n!==void 0&&(u.scale=n),s!==void 0&&Of(u,s,a,o,!1)}const Zi=()=>({...As(),attrs:{}}),Ji=e=>typeof e=="string"&&e.toLowerCase()==="svg";function zf(e,t,r,n){const s=p.useMemo(()=>{const a=Zi();return qi(a,t,Ji(n),e.transformTemplate,e.style),{...a.attrs,style:{...a.style}}},[t]);if(e.style){const a={};Yi(a,e.style,e),s.style={...a,...s.style}}return s}const $f=["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 Ms(e){return typeof e!="string"||e.includes("-")?!1:!!($f.indexOf(e)>-1||/[A-Z]/u.test(e))}function Ff(e,t,r,{latestValues:n},s,a=!1){const i=(Ms(e)?zf:Df)(t,n,s,e),l=Tf(t,typeof e=="string",a),c=e!==p.Fragment?{...l,...i,ref:r}:{},{children:d}=t,u=p.useMemo(()=>fe(d)?d.get():d,[d]);return p.createElement(e,{...c,children:u})}function Ea(e){const t=[{},{}];return e?.values.forEach((r,n)=>{t[0][n]=r.get(),t[1][n]=r.getVelocity()}),t}function Vs(e,t,r,n){if(typeof t=="function"){const[s,a]=Ea(n);t=t(r!==void 0?r:e.custom,s,a)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,a]=Ea(n);t=t(r!==void 0?r:e.custom,s,a)}return t}function Mr(e){return fe(e)?e.get():e}function Wf({scrapeMotionValuesFromProps:e,createRenderState:t},r,n,s){return{latestValues:_f(r,n,s,e),renderState:t()}}function _f(e,t,r,n){const s={},a=n(e,{});for(const h in a)s[h]=Mr(a[h]);let{initial:o,animate:i}=e;const l=Kr(e),c=Hi(e);t&&c&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),i===void 0&&(i=t.animate));let d=r?r.initial===!1:!1;d=d||o===!1;const u=d?i:o;if(u&&typeof u!="boolean"&&!Ur(u)){const h=Array.isArray(u)?u:[u];for(let m=0;m<h.length;m++){const g=Vs(e,h[m]);if(g){const{transitionEnd:w,transition:x,...b}=g;for(const y in b){let v=b[y];if(Array.isArray(v)){const C=d?v.length-1:0;v=v[C]}v!==null&&(s[y]=v)}for(const y in w)s[y]=w[y]}}}return s}const Qi=e=>(t,r)=>{const n=p.useContext(Gr),s=p.useContext(Or),a=()=>Wf(e,t,n,s);return r?a():ht(a)};function Ps(e,t,r){const{style:n}=e,s={};for(const a in n)(fe(n[a])||t.style&&fe(t.style[a])||Xi(a,e)||r?.getValue(a)?.liveStyle!==void 0)&&(s[a]=n[a]);return s}const Gf=Qi({scrapeMotionValuesFromProps:Ps,createRenderState:As});function el(e,t,r){const n=Ps(e,t,r);for(const s in e)if(fe(e[s])||fe(t[s])){const a=Pt.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;n[a]=e[s]}return n}const Uf=Qi({scrapeMotionValuesFromProps:el,createRenderState:Zi}),Kf=Symbol.for("motionComponentSymbol");function wt(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Hf(e,t,r){return p.useCallback(n=>{n&&e.onMount&&e.onMount(n),t&&(n?t.mount(n):t.unmount()),r&&(typeof r=="function"?r(n):wt(r)&&(r.current=n))},[t])}const Es=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Xf="framerAppearId",tl="data-"+Es(Xf),rl=p.createContext({});function Yf(e,t,r,n,s){const{visualElement:a}=p.useContext(Gr),o=p.useContext(Ui),i=p.useContext(Or),l=p.useContext(ir).reducedMotion,c=p.useRef(null);n=n||o.renderer,!c.current&&n&&(c.current=n(e,{visualState:t,parent:a,props:r,presenceContext:i,blockInitialAnimation:i?i.initial===!1:!1,reducedMotionConfig:l}));const d=c.current,u=p.useContext(rl);d&&!d.projection&&s&&(d.type==="html"||d.type==="svg")&&qf(c.current,r,s,u);const h=p.useRef(!1);p.useInsertionEffect(()=>{d&&h.current&&d.update(r,i)});const m=r[tl],g=p.useRef(!!m&&!window.MotionHandoffIsComplete?.(m)&&window.MotionHasOptimisedAnimation?.(m));return nr(()=>{d&&(h.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),d.scheduleRenderMicrotask(),g.current&&d.animationState&&d.animationState.animateChanges())}),p.useEffect(()=>{d&&(!g.current&&d.animationState&&d.animationState.animateChanges(),g.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(m)}),g.current=!1),d.enteringChildren=void 0)}),d}function qf(e,t,r,n){const{layoutId:s,layout:a,drag:o,dragConstraints:i,layoutScroll:l,layoutRoot:c,layoutCrossfade:d}=t;e.projection=new r(e.latestValues,t["data-framer-portal-id"]?void 0:nl(e.parent)),e.projection.setOptions({layoutId:s,layout:a,alwaysMeasureLayout:!!o||i&&wt(i),visualElement:e,animationType:typeof a=="string"?a:"both",initialPromotionConfig:n,crossfade:d,layoutScroll:l,layoutRoot:c})}function nl(e){if(e)return e.options.allowProjection!==!1?e.projection:nl(e.parent)}function an(e,{forwardMotionProps:t=!1}={},r,n){r&&kf(r);const s=Ms(e)?Uf:Gf;function a(i,l){let c;const d={...p.useContext(ir),...i,layoutId:Zf(i)},{isStatic:u}=d,h=Mf(i),m=s(i,u);if(!u&&es){Jf(d,r);const g=Qf(d);c=g.MeasureLayout,h.visualElement=Yf(e,m,d,n,g.ProjectionNode)}return f.jsxs(Gr.Provider,{value:h,children:[c&&h.visualElement?f.jsx(c,{visualElement:h.visualElement,...d}):null,Ff(e,i,Hf(m,h.visualElement,l),m,u,t)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const o=p.forwardRef(a);return o[Kf]=e,o}function Zf({layoutId:e}){const t=p.useContext(Qn).id;return t&&e!==void 0?t+"-"+e:e}function Jf(e,t){const r=p.useContext(Ui).strict;if(process.env.NODE_ENV!=="production"&&t&&r){const n="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?Mt(!1,n,"lazy-strict-mode"):be(!1,n,"lazy-strict-mode")}}function Qf(e){const{drag:t,layout:r}=Tt;if(!t&&!r)return{};const n={...t,...r};return{MeasureLayout:t?.isEnabled(e)||r?.isEnabled(e)?n.MeasureLayout:void 0,ProjectionNode:n.ProjectionNode}}function ep(e,t){if(typeof Proxy>"u")return an;const r=new Map,n=(a,o)=>an(a,o,e,t),s=(a,o)=>(process.env.NODE_ENV!=="production"&&$r(!1,"motion() is deprecated. Use motion.create() instead."),n(a,o));return new Proxy(s,{get:(a,o)=>o==="create"?n:(r.has(o)||r.set(o,an(o,void 0,e,t)),r.get(o))})}function sl({top:e,left:t,right:r,bottom:n}){return{x:{min:t,max:r},y:{min:e,max:n}}}function tp({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function rp(e,t){if(!t)return e;const r=t({x:e.left,y:e.top}),n=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:n.y,right:n.x}}function on(e){return e===void 0||e===1}function Nn({scale:e,scaleX:t,scaleY:r}){return!on(e)||!on(t)||!on(r)}function lt(e){return Nn(e)||al(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function al(e){return Ia(e.x)||Ia(e.y)}function Ia(e){return e&&e!=="0%"}function Nr(e,t,r){const n=e-r,s=t*n;return r+s}function Na(e,t,r,n,s){return s!==void 0&&(e=Nr(e,s,n)),Nr(e,r,n)+t}function Rn(e,t=0,r=1,n,s){e.min=Na(e.min,t,r,n,s),e.max=Na(e.max,t,r,n,s)}function ol(e,{x:t,y:r}){Rn(e.x,t.translate,t.scale,t.originPoint),Rn(e.y,r.translate,r.scale,r.originPoint)}const Ra=.999999999999,Da=1.0000000000001;function np(e,t,r,n=!1){const s=r.length;if(!s)return;t.x=t.y=1;let a,o;for(let i=0;i<s;i++){a=r[i],o=a.projectionDelta;const{visualElement:l}=a.options;l&&l.props.style&&l.props.style.display==="contents"||(n&&a.options.layoutScroll&&a.scroll&&a!==a.root&&kt(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,ol(e,o)),n&<(a.latestValues)&&kt(e,a.latestValues))}t.x<Da&&t.x>Ra&&(t.x=1),t.y<Da&&t.y>Ra&&(t.y=1)}function Ct(e,t){e.min=e.min+t,e.max=e.max+t}function Ba(e,t,r,n,s=.5){const a=oe(e.min,e.max,s);Rn(e,t,r,a,n)}function kt(e,t){Ba(e.x,t.x,t.scaleX,t.scale,t.originX),Ba(e.y,t.y,t.scaleY,t.scale,t.originY)}function il(e,t){return sl(rp(e.getBoundingClientRect(),t))}function sp(e,t,r){const n=il(e,r),{scroll:s}=t;return s&&(Ct(n.x,s.offset.x),Ct(n.y,s.offset.y)),n}const La=()=>({translate:0,scale:1,origin:0,originPoint:0}),St=()=>({x:La(),y:La()}),Oa=()=>({min:0,max:0}),ce=()=>({x:Oa(),y:Oa()}),Dn={current:null},ll={current:!1};function ap(){if(ll.current=!0,!!es)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Dn.current=e.matches;e.addEventListener("change",t),t()}else Dn.current=!1}const er=new WeakMap;function op(e,t,r){for(const n in t){const s=t[n],a=r[n];if(fe(s))e.addValue(n,s);else if(fe(a))e.addValue(n,De(s,{owner:e}));else if(a!==s)if(e.hasValue(n)){const o=e.getValue(n);o.liveStyle===!0?o.jump(s):o.hasAnimated||o.set(s)}else{const o=e.getStaticValue(n);e.addValue(n,De(o!==void 0?o:s,{owner:e}))}}for(const n in r)t[n]===void 0&&e.removeValue(n);return t}const za=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class cl{scrapeMotionValuesFromProps(t,r,n){return{}}constructor({parent:t,props:r,presenceContext:n,reducedMotionConfig:s,blockInitialAnimation:a,visualState:o},i={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=bs,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 h=we.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,re.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=o;this.latestValues=l,this.baseTarget={...l},this.initialValues=r.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=r,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=i,this.blockInitialAnimation=!!a,this.isControllingVariants=Kr(r),this.isVariantNode=Hi(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...u}=this.scrapeMotionValuesFromProps(r,{},this);for(const h in u){const m=u[h];l[h]!==void 0&&fe(m)&&m.set(l[h])}}mount(t){this.current=t,er.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,n)=>this.bindToMotionValue(n,r)),ll.current||ap(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Dn.current,process.env.NODE_ENV!=="production"&&$r(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Be(this.notifyUpdate),Be(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const r=this.features[t];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,r){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=Et.has(t);n&&this.onBindTransform&&this.onBindTransform();const s=r.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&re.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,r)),this.valueSubscriptions.set(t,()=>{s(),a&&a(),r.owner&&r.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 Tt){const r=Tt[t];if(!r)continue;const{isEnabled:n,Feature:s}=r;if(!this.features[t]&&s&&n(this.props)&&(this.features[t]=new s(this)),this.features[t]){const a=this.features[t];a.isMounted?a.update():(a.mount(),a.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):ce()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,r){this.latestValues[t]=r}update(t,r){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=r;for(let n=0;n<za.length;n++){const s=za[n];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const a="on"+s,o=t[a];o&&(this.propEventSubscriptions[s]=this.on(s,o))}this.prevMotionValues=op(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 r=this.getClosestVariantNode();if(r)return r.variantChildren&&r.variantChildren.add(t),()=>r.variantChildren.delete(t)}addValue(t,r){const n=this.values.get(t);r!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,r),this.values.set(t,r),this.latestValues[t]=r.get())}removeValue(t){this.values.delete(t);const r=this.valueSubscriptions.get(t);r&&(r(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,r){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return n===void 0&&r!==void 0&&(n=De(r===null?void 0:r,{owner:this}),this.addValue(t,n)),n}readValue(t,r){let n=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return n!=null&&(typeof n=="string"&&(qo(n)||Jo(n))?n=parseFloat(n):!gf(n)&&tt.test(r)&&(n=Bi(t,r)),this.setBaseTarget(t,fe(n)?n.get():n)),fe(n)?n.get():n}setBaseTarget(t,r){this.baseTarget[t]=r}getBaseTarget(t){const{initial:r}=this.props;let n;if(typeof r=="string"||typeof r=="object"){const a=Vs(this.props,r,this.presenceContext?.custom);a&&(n=a[t])}if(r&&n!==void 0)return n;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!fe(s)?s:this.initialValues[t]!==void 0&&n===void 0?void 0:this.baseTarget[t]}on(t,r){return this.events[t]||(this.events[t]=new ns),this.events[t].add(r)}notify(t,...r){this.events[t]&&this.events[t].notify(...r)}scheduleRenderMicrotask(){Cs.render(this.render)}}class dl extends cl{constructor(){super(...arguments),this.KeyframeResolver=Xu}sortInstanceNodePosition(t,r){return t.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(t,r){return t.style?t.style[r]:void 0}removeValueFromRenderState(t,{vars:r,style:n}){delete r[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;fe(t)&&(this.childSubscription=t.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}}function ul(e,{style:t,vars:r},n,s){const a=e.style;let o;for(o in t)a[o]=t[o];s?.applyProjectionStyles(a,n);for(o in r)a.setProperty(o,r[o])}function ip(e){return window.getComputedStyle(e)}class fl extends dl{constructor(){super(...arguments),this.type="html",this.renderInstance=ul}readValueFromInstance(t,r){if(Et.has(r))return this.projection?.isProjecting?Tn(r):uu(t,r);{const n=ip(t),s=(is(r)?n.getPropertyValue(r):n[r])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:r}){return il(t,r)}build(t,r,n){Ts(t,r,n.transformTemplate)}scrapeMotionValuesFromProps(t,r,n){return Ps(t,r,n)}}const pl=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 lp(e,t,r,n){ul(e,t,void 0,n);for(const s in t.attrs)e.setAttribute(pl.has(s)?s:Es(s),t.attrs[s])}class hl extends dl{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ce}getBaseTargetFromProps(t,r){return t[r]}readValueFromInstance(t,r){if(Et.has(r)){const n=Di(r);return n&&n.default||0}return r=pl.has(r)?r:Es(r),t.getAttribute(r)}scrapeMotionValuesFromProps(t,r,n){return el(t,r,n)}build(t,r,n){qi(t,r,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,r,n,s){lp(t,r,n,s)}mount(t){this.isSVGTag=Ji(t.tagName),super.mount(t)}}const cp=(e,t)=>Ms(e)?new hl(t):new fl(t,{allowProjection:e!==p.Fragment});function jt(e,t,r){const n=e.getProps();return Vs(n,t,r!==void 0?r:n.custom,e)}const Bn=e=>Array.isArray(e);function dp(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,De(r))}function up(e){return Bn(e)?e[e.length-1]||0:e}function Is(e,t){const r=jt(e,t);let{transitionEnd:n={},transition:s={},...a}=r||{};a={...a,...n};for(const o in a){const i=up(a[o]);dp(e,o,i)}}function fp(e){return!!(fe(e)&&e.add)}function Ln(e,t){const r=e.getValue("willChange");if(fp(r))return r.add(t);if(!r&&Ke.WillChange){const n=new Ke.WillChange("auto");e.addValue("willChange",n),n.add(t)}}function ml(e){return e.props[tl]}const pp=e=>e!==null;function hp(e,{repeat:t,repeatType:r="loop"},n){const s=e.filter(pp),a=t&&r!=="loop"&&t%2===1?0:s.length-1;return s[a]}const mp={type:"spring",stiffness:500,damping:25,restSpeed:10},gp=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),bp={type:"keyframes",duration:.8},yp={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},xp=(e,{keyframes:t})=>t.length>2?bp:Et.has(e)?e.startsWith("scale")?gp(t[1]):mp:yp;function vp({when:e,delay:t,delayChildren:r,staggerChildren:n,staggerDirection:s,repeat:a,repeatType:o,repeatDelay:i,from:l,elapsed:c,...d}){return!!Object.keys(d).length}const Ns=(e,t,r,n={},s,a)=>o=>{const i=xs(n,e)||{},l=i.delay||n.delay||0;let{elapsed:c=0}=n;c=c-Ie(l);const d={keyframes:Array.isArray(r)?r:[null,r],ease:"easeOut",velocity:t.getVelocity(),...i,delay:-c,onUpdate:h=>{t.set(h),i.onUpdate&&i.onUpdate(h)},onComplete:()=>{o(),i.onComplete&&i.onComplete()},name:e,motionValue:t,element:a?void 0:s};vp(i)||Object.assign(d,xp(e,d)),d.duration&&(d.duration=Ie(d.duration)),d.repeatDelay&&(d.repeatDelay=Ie(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let u=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(En(d),d.delay===0&&(u=!0)),(Ke.instantAnimations||Ke.skipAnimations)&&(u=!0,En(d),d.delay=0),d.allowFlatten=!i.type&&!i.ease,u&&!a&&t.get()!==void 0){const h=hp(d.keyframes,i);if(h!==void 0){re.update(()=>{d.onUpdate(h),d.onComplete()});return}}return i.isSync?new Fr(d):new Nu(d)};function wp({protectedKeys:e,needsAnimating:t},r){const n=e.hasOwnProperty(r)&&t[r]!==!0;return t[r]=!1,n}function Rs(e,t,{delay:r=0,transitionOverride:n,type:s}={}){let{transition:a=e.getDefaultTransition(),transitionEnd:o,...i}=t;n&&(a=n);const l=[],c=s&&e.animationState&&e.animationState.getState()[s];for(const d in i){const u=e.getValue(d,e.latestValues[d]??null),h=i[d];if(h===void 0||c&&wp(c,d))continue;const m={delay:r,...xs(a||{},d)},g=u.get();if(g!==void 0&&!u.isAnimating&&!Array.isArray(h)&&h===g&&!m.velocity)continue;let w=!1;if(window.MotionHandoffAnimation){const b=ml(e);if(b){const y=window.MotionHandoffAnimation(b,d,re);y!==null&&(m.startTime=y,w=!0)}}Ln(e,d),u.start(Ns(d,u,h,e.shouldReduceMotion&&Ii.has(d)?{type:!1}:m,e,w));const x=u.animation;x&&l.push(x)}return o&&Promise.all(l).then(()=>{re.update(()=>{o&&Is(e,o)})}),l}function gl(e,t,r,n=0,s=1){const a=Array.from(e).sort((c,d)=>c.sortNodePosition(d)).indexOf(t),o=e.size,i=(o-1)*n;return typeof r=="function"?r(a,o):s===1?a*n:i-a*n}function On(e,t,r={}){const n=jt(e,t,r.type==="exit"?e.presenceContext?.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=n||{};r.transitionOverride&&(s=r.transitionOverride);const a=n?()=>Promise.all(Rs(e,n,r)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:d,staggerDirection:u}=s;return Cp(e,t,l,c,d,u,r)}:()=>Promise.resolve(),{when:i}=s;if(i){const[l,c]=i==="beforeChildren"?[a,o]:[o,a];return l().then(()=>c())}else return Promise.all([a(),o(r.delay)])}function Cp(e,t,r=0,n=0,s=0,a=1,o){const i=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),i.push(On(l,t,{...o,delay:r+(typeof n=="function"?0:n)+gl(e.variantChildren,l,n,s,a)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(i)}function bl(e,t,r={}){e.notify("AnimationStart",t);let n;if(Array.isArray(t)){const s=t.map(a=>On(e,a,r));n=Promise.all(s)}else if(typeof t=="string")n=On(e,t,r);else{const s=typeof t=="function"?jt(e,t,r.custom):t;n=Promise.all(Rs(e,s,r))}return n.then(()=>{e.notify("AnimationComplete",t)})}function yl(e,t){if(!Array.isArray(t))return!1;const r=t.length;if(r!==e.length)return!1;for(let n=0;n<r;n++)if(t[n]!==e[n])return!1;return!0}const kp=js.length;function xl(e){if(!e)return;if(!e.isControllingVariants){const r=e.parent?xl(e.parent)||{}:{};return e.props.initial!==void 0&&(r.initial=e.props.initial),r}const t={};for(let r=0;r<kp;r++){const n=js[r],s=e.props[n];(Jt(s)||s===!1)&&(t[n]=s)}return t}const Sp=[...Ss].reverse(),jp=Ss.length;function Tp(e){return t=>Promise.all(t.map(({animation:r,options:n})=>bl(e,r,n)))}function Ap(e){let t=Tp(e),r=$a(),n=!0;const s=l=>(c,d)=>{const u=jt(e,d,l==="exit"?e.presenceContext?.custom:void 0);if(u){const{transition:h,transitionEnd:m,...g}=u;c={...c,...g,...m}}return c};function a(l){t=l(e)}function o(l){const{props:c}=e,d=xl(e.parent)||{},u=[],h=new Set;let m={},g=1/0;for(let x=0;x<jp;x++){const b=Sp[x],y=r[b],v=c[b]!==void 0?c[b]:d[b],C=Jt(v),S=b===l?y.isActive:null;S===!1&&(g=x);let j=v===d[b]&&v!==c[b]&&C;if(j&&n&&e.manuallyAnimateOnMount&&(j=!1),y.protectedKeys={...m},!y.isActive&&S===null||!v&&!y.prevProp||Ur(v)||typeof v=="boolean")continue;const A=Mp(y.prevProp,v);let k=A||b===l&&y.isActive&&!j&&C||x>g&&C,V=!1;const M=Array.isArray(v)?v:[v];let D=M.reduce(s(b),{});S===!1&&(D={});const{prevResolvedValues:z={}}=y,L={...z,...D},I=P=>{k=!0,h.has(P)&&(V=!0,h.delete(P)),y.needsAnimating[P]=!0;const T=e.getValue(P);T&&(T.liveStyle=!1)};for(const P in L){const T=D[P],N=z[P];if(m.hasOwnProperty(P))continue;let E=!1;Bn(T)&&Bn(N)?E=!yl(T,N):E=T!==N,E?T!=null?I(P):h.add(P):T!==void 0&&h.has(P)?I(P):y.protectedKeys[P]=!0}y.prevProp=v,y.prevResolvedValues=D,y.isActive&&(m={...m,...D}),n&&e.blockInitialAnimation&&(k=!1);const R=j&&A;k&&(!R||V)&&u.push(...M.map(P=>{const T={type:b};if(typeof P=="string"&&n&&!R&&e.manuallyAnimateOnMount&&e.parent){const{parent:N}=e,E=jt(N,P);if(N.enteringChildren&&E){const{delayChildren:F}=E.transition||{};T.delay=gl(N.enteringChildren,e,F)}}return{animation:P,options:T}}))}if(h.size){const x={};if(typeof c.initial!="boolean"){const b=jt(e,Array.isArray(c.initial)?c.initial[0]:c.initial);b&&b.transition&&(x.transition=b.transition)}h.forEach(b=>{const y=e.getBaseTarget(b),v=e.getValue(b);v&&(v.liveStyle=!0),x[b]=y??null}),u.push({animation:x})}let w=!!u.length;return n&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(w=!1),n=!1,w?t(u):Promise.resolve()}function i(l,c){if(r[l].isActive===c)return Promise.resolve();e.variantChildren?.forEach(u=>u.animationState?.setActive(l,c)),r[l].isActive=c;const d=o(l);for(const u in r)r[u].protectedKeys={};return d}return{animateChanges:o,setActive:i,setAnimateFunction:a,getState:()=>r,reset:()=>{r=$a()}}}function Mp(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!yl(t,e):!1}function ot(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function $a(){return{animate:ot(!0),whileInView:ot(),whileHover:ot(),whileTap:ot(),whileDrag:ot(),whileFocus:ot(),exit:ot()}}class rt{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Vp extends rt{constructor(t){super(t),t.animationState||(t.animationState=Ap(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Ur(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:r}=this.node.prevProps||{};t!==r&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let Pp=0;class Ep extends rt{constructor(){super(...arguments),this.id=Pp++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:r}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;const s=this.node.animationState.setActive("exit",!t);r&&!t&&s.then(()=>{r(this.id)})}mount(){const{register:t,onExitComplete:r}=this.node.presenceContext||{};r&&r(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const Ip={animation:{Feature:Vp},exit:{Feature:Ep}};function tr(e,t,r,n={passive:!0}){return e.addEventListener(t,r,n),()=>e.removeEventListener(t,r)}function lr(e){return{point:{x:e.pageX,y:e.pageY}}}const Np=e=>t=>ks(t)&&e(t,lr(t));function Ut(e,t,r,n){return tr(e,t,Np(r),n)}const vl=1e-4,Rp=1-vl,Dp=1+vl,wl=.01,Bp=0-wl,Lp=0+wl;function xe(e){return e.max-e.min}function Op(e,t,r){return Math.abs(e-t)<=r}function Fa(e,t,r,n=.5){e.origin=n,e.originPoint=oe(t.min,t.max,e.origin),e.scale=xe(r)/xe(t),e.translate=oe(r.min,r.max,e.origin)-e.originPoint,(e.scale>=Rp&&e.scale<=Dp||isNaN(e.scale))&&(e.scale=1),(e.translate>=Bp&&e.translate<=Lp||isNaN(e.translate))&&(e.translate=0)}function Kt(e,t,r,n){Fa(e.x,t.x,r.x,n?n.originX:void 0),Fa(e.y,t.y,r.y,n?n.originY:void 0)}function Wa(e,t,r){e.min=r.min+t.min,e.max=e.min+xe(t)}function zp(e,t,r){Wa(e.x,t.x,r.x),Wa(e.y,t.y,r.y)}function _a(e,t,r){e.min=t.min-r.min,e.max=e.min+xe(t)}function Ht(e,t,r){_a(e.x,t.x,r.x),_a(e.y,t.y,r.y)}function Pe(e){return[e("x"),e("y")]}const Cl=({current:e})=>e?e.ownerDocument.defaultView:null,Ga=(e,t)=>Math.abs(e-t);function $p(e,t){const r=Ga(e.x,t.x),n=Ga(e.y,t.y);return Math.sqrt(r**2+n**2)}class kl{constructor(t,r,{transformPagePoint:n,contextWindow:s=window,dragSnapToOrigin:a=!1,distanceThreshold:o=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 h=cn(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,g=$p(h.offset,{x:0,y:0})>=this.distanceThreshold;if(!m&&!g)return;const{point:w}=h,{timestamp:x}=me;this.history.push({...w,timestamp:x});const{onStart:b,onMove:y}=this.handlers;m||(b&&b(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,h)},this.handlePointerMove=(h,m)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=ln(m,this.transformPagePoint),re.update(this.updatePoint,!0)},this.handlePointerUp=(h,m)=>{this.end();const{onEnd:g,onSessionEnd:w,resumeAnimation:x}=this.handlers;if(this.dragSnapToOrigin&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=cn(h.type==="pointercancel"?this.lastMoveEventInfo:ln(m,this.transformPagePoint),this.history);this.startEvent&&g&&g(h,b),w&&w(h,b)},!ks(t))return;this.dragSnapToOrigin=a,this.handlers=r,this.transformPagePoint=n,this.distanceThreshold=o,this.contextWindow=s||window;const i=lr(t),l=ln(i,this.transformPagePoint),{point:c}=l,{timestamp:d}=me;this.history=[{...c,timestamp:d}];const{onSessionStart:u}=r;u&&u(t,cn(l,this.history)),this.removeListeners=sr(Ut(this.contextWindow,"pointermove",this.handlePointerMove),Ut(this.contextWindow,"pointerup",this.handlePointerUp),Ut(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Be(this.updatePoint)}}function ln(e,t){return t?{point:t(e.point)}:e}function Ua(e,t){return{x:e.x-t.x,y:e.y-t.y}}function cn({point:e},t){return{point:e,delta:Ua(e,Sl(t)),offset:Ua(e,Fp(t)),velocity:Wp(t,.1)}}function Fp(e){return e[0]}function Sl(e){return e[e.length-1]}function Wp(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,n=null;const s=Sl(e);for(;r>=0&&(n=e[r],!(s.timestamp-n.timestamp>Ie(t)));)r--;if(!n)return{x:0,y:0};const a=Ee(s.timestamp-n.timestamp);if(a===0)return{x:0,y:0};const o={x:(s.x-n.x)/a,y:(s.y-n.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function _p(e,{min:t,max:r},n){return t!==void 0&&e<t?e=n?oe(t,e,n.min):Math.max(e,t):r!==void 0&&e>r&&(e=n?oe(r,e,n.max):Math.min(e,r)),e}function Ka(e,t,r){return{min:t!==void 0?e.min+t:void 0,max:r!==void 0?e.max+r-(e.max-e.min):void 0}}function Gp(e,{top:t,left:r,bottom:n,right:s}){return{x:Ka(e.x,r,s),y:Ka(e.y,t,n)}}function Ha(e,t){let r=t.min-e.min,n=t.max-e.max;return t.max-t.min<e.max-e.min&&([r,n]=[n,r]),{min:r,max:n}}function Up(e,t){return{x:Ha(e.x,t.x),y:Ha(e.y,t.y)}}function Kp(e,t){let r=.5;const n=xe(e),s=xe(t);return s>n?r=pt(t.min,t.max-n,e.min):n>s&&(r=pt(e.min,e.max-s,t.min)),Fe(0,1,r)}function Hp(e,t){const r={};return t.min!==void 0&&(r.min=t.min-e.min),t.max!==void 0&&(r.max=t.max-e.min),r}const zn=.35;function Xp(e=zn){return e===!1?e=0:e===!0&&(e=zn),{x:Xa(e,"left","right"),y:Xa(e,"top","bottom")}}function Xa(e,t,r){return{min:Ya(e,t),max:Ya(e,r)}}function Ya(e,t){return typeof e=="number"?e:e[t]||0}const Yp=new WeakMap;class qp{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=ce(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:r=!1,distanceThreshold:n}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const a=u=>{const{dragSnapToOrigin:h}=this.getProps();h?this.pauseAnimation():this.stopAnimation(),r&&this.snapToCursor(lr(u).point)},o=(u,h)=>{const{drag:m,dragPropagation:g,onDragStart:w}=this.getProps();if(m&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Zu(m),!this.openDragLock))return;this.latestPointerEvent=u,this.latestPanInfo=h,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Pe(b=>{let y=this.getAxisMotionValue(b).get()||0;if($e.test(y)){const{projection:v}=this.visualElement;if(v&&v.layout){const C=v.layout.layoutBox[b];C&&(y=xe(C)*(parseFloat(y)/100))}}this.originPoint[b]=y}),w&&re.postRender(()=>w(u,h)),Ln(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},i=(u,h)=>{this.latestPointerEvent=u,this.latestPanInfo=h;const{dragPropagation:m,dragDirectionLock:g,onDirectionLock:w,onDrag:x}=this.getProps();if(!m&&!this.openDragLock)return;const{offset:b}=h;if(g&&this.currentDirection===null){this.currentDirection=Zp(b),this.currentDirection!==null&&w&&w(this.currentDirection);return}this.updateAxis("x",h.point,b),this.updateAxis("y",h.point,b),this.visualElement.render(),x&&x(u,h)},l=(u,h)=>{this.latestPointerEvent=u,this.latestPanInfo=h,this.stop(u,h),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>Pe(u=>this.getAnimationState(u)==="paused"&&this.getAxisMotionValue(u).animation?.play()),{dragSnapToOrigin:d}=this.getProps();this.panSession=new kl(t,{onSessionStart:a,onStart:o,onMove:i,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,distanceThreshold:n,contextWindow:Cl(this.visualElement)})}stop(t,r){const n=t||this.latestPointerEvent,s=r||this.latestPanInfo,a=this.isDragging;if(this.cancel(),!a||!s||!n)return;const{velocity:o}=s;this.startAnimation(o);const{onDragEnd:i}=this.getProps();i&&re.postRender(()=>i(n,s))}cancel(){this.isDragging=!1;const{projection:t,animationState:r}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),r&&r.setActive("whileDrag",!1)}updateAxis(t,r,n){const{drag:s}=this.getProps();if(!n||!mr(t,s,this.currentDirection))return;const a=this.getAxisMotionValue(t);let o=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(o=_p(o,this.constraints[t],this.elastic[t])),a.set(o)}resolveConstraints(){const{dragConstraints:t,dragElastic:r}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,s=this.constraints;t&&wt(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&n?this.constraints=Gp(n.layoutBox,t):this.constraints=!1,this.elastic=Xp(r),s!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&Pe(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=Hp(n.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:r}=this.getProps();if(!t||!wt(t))return!1;const n=t.current;be(n!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const a=sp(n,s.root,this.visualElement.getTransformPagePoint());let o=Up(s.layout.layoutBox,a);if(r){const i=r(tp(o));this.hasMutatedConstraints=!!i,i&&(o=sl(i))}return o}startAnimation(t){const{drag:r,dragMomentum:n,dragElastic:s,dragTransition:a,dragSnapToOrigin:o,onDragTransitionEnd:i}=this.getProps(),l=this.constraints||{},c=Pe(d=>{if(!mr(d,r,this.currentDirection))return;let u=l&&l[d]||{};o&&(u={min:0,max:0});const h=s?200:1e6,m=s?40:1e7,g={type:"inertia",velocity:n?t[d]:0,bounceStiffness:h,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...a,...u};return this.startAxisValueAnimation(d,g)});return Promise.all(c).then(i)}startAxisValueAnimation(t,r){const n=this.getAxisMotionValue(t);return Ln(this.visualElement,t),n.start(Ns(t,n,0,r,this.visualElement,!1))}stopAnimation(){Pe(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Pe(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const r=`_drag${t.toUpperCase()}`,n=this.visualElement.getProps(),s=n[r];return s||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){Pe(r=>{const{drag:n}=this.getProps();if(!mr(r,n,this.currentDirection))return;const{projection:s}=this.visualElement,a=this.getAxisMotionValue(r);if(s&&s.layout){const{min:o,max:i}=s.layout.layoutBox[r];a.set(t[r]-oe(o,i,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:r}=this.getProps(),{projection:n}=this.visualElement;if(!wt(r)||!n||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};Pe(o=>{const i=this.getAxisMotionValue(o);if(i&&this.constraints!==!1){const l=i.get();s[o]=Kp({min:l,max:l},this.constraints[o])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),Pe(o=>{if(!mr(o,t,null))return;const i=this.getAxisMotionValue(o),{min:l,max:c}=this.constraints[o];i.set(oe(l,c,s[o]))})}addListeners(){if(!this.visualElement.current)return;Yp.set(this.visualElement,this);const t=this.visualElement.current,r=Ut(t,"pointerdown",l=>{const{drag:c,dragListener:d=!0}=this.getProps();c&&d&&this.start(l)}),n=()=>{const{dragConstraints:l}=this.getProps();wt(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,a=s.addEventListener("measure",n);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),re.read(n);const o=tr(window,"resize",()=>this.scalePositionWithinConstraints()),i=s.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(Pe(d=>{const u=this.getAxisMotionValue(d);u&&(this.originPoint[d]+=l[d].translate,u.set(u.get()+l[d].translate))}),this.visualElement.render())}));return()=>{o(),r(),a(),i&&i()}}getProps(){const t=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:n=!1,dragPropagation:s=!1,dragConstraints:a=!1,dragElastic:o=zn,dragMomentum:i=!0}=t;return{...t,drag:r,dragDirectionLock:n,dragPropagation:s,dragConstraints:a,dragElastic:o,dragMomentum:i}}}function mr(e,t,r){return(t===!0||t===e)&&(r===null||r===e)}function Zp(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}class Jp extends rt{constructor(t){super(t),this.removeGroupControls=Ce,this.removeListeners=Ce,this.controls=new qp(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ce}unmount(){this.removeGroupControls(),this.removeListeners()}}const qa=e=>(t,r)=>{e&&re.postRender(()=>e(t,r))};class Qp extends rt{constructor(){super(...arguments),this.removePointerDownListener=Ce}onPointerDown(t){this.session=new kl(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Cl(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:r,onPan:n,onPanEnd:s}=this.node.getProps();return{onSessionStart:qa(t),onStart:qa(r),onMove:n,onEnd:(a,o)=>{delete this.session,s&&re.postRender(()=>s(a,o))}}}mount(){this.removePointerDownListener=Ut(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 Vr={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Za(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ot={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(X.test(e))e=parseFloat(e);else return e;const r=Za(e,t.target.x),n=Za(e,t.target.y);return`${r}% ${n}%`}},eh={correct:(e,{treeScale:t,projectionDelta:r})=>{const n=e,s=tt.parse(e);if(s.length>5)return n;const a=tt.createTransformer(e),o=typeof s[0]!="number"?1:0,i=r.x.scale*t.x,l=r.y.scale*t.y;s[0+o]/=i,s[1+o]/=l;const c=oe(i,l,.5);return typeof s[2+o]=="number"&&(s[2+o]/=c),typeof s[3+o]=="number"&&(s[3+o]/=c),a(s)}};let dn=!1;class th extends p.Component{componentDidMount(){const{visualElement:t,layoutGroup:r,switchLayoutGroup:n,layoutId:s}=this.props,{projection:a}=t;Vf(rh),a&&(r.group&&r.group.add(a),n&&n.register&&s&&n.register(a),dn&&a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,onExitComplete:()=>this.safeToRemove()})),Vr.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:r,visualElement:n,drag:s,isPresent:a}=this.props,{projection:o}=n;return o&&(o.isPresent=a,dn=!0,s||t.layoutDependency!==r||r===void 0||t.isPresent!==a?o.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?o.promote():o.relegate()||re.postRender(()=>{const i=o.getStack();(!i||!i.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Cs.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:r,switchLayoutGroup:n}=this.props,{projection:s}=t;dn=!0,s&&(s.scheduleCheckAfterUnmount(),r&&r.group&&r.group.remove(s),n&&n.deregister&&n.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function jl(e){const[t,r]=Gi(),n=p.useContext(Qn);return f.jsx(th,{...e,layoutGroup:n,switchLayoutGroup:p.useContext(rl),isPresent:t,safeToRemove:r})}const rh={borderRadius:{...Ot,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ot,borderTopRightRadius:Ot,borderBottomLeftRadius:Ot,borderBottomRightRadius:Ot,boxShadow:eh};function Tl(e,t,r){const n=fe(e)?e:De(e);return n.start(Ns("",n,t,r)),n.animation}const nh=(e,t)=>e.depth-t.depth;class sh{constructor(){this.children=[],this.isDirty=!1}add(t){ts(this.children,t),this.isDirty=!0}remove(t){zr(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(nh),this.isDirty=!1,this.children.forEach(t)}}function ah(e,t){const r=we.now(),n=({timestamp:s})=>{const a=s-r;a>=t&&(Be(n),e(a-t))};return re.setup(n,!0),()=>Be(n)}const Al=["TopLeft","TopRight","BottomLeft","BottomRight"],oh=Al.length,Ja=e=>typeof e=="string"?parseFloat(e):e,Qa=e=>typeof e=="number"||X.test(e);function ih(e,t,r,n,s,a){s?(e.opacity=oe(0,r.opacity??1,lh(n)),e.opacityExit=oe(t.opacity??1,0,ch(n))):a&&(e.opacity=oe(t.opacity??1,r.opacity??1,n));for(let o=0;o<oh;o++){const i=`border${Al[o]}Radius`;let l=eo(t,i),c=eo(r,i);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Qa(l)===Qa(c)?(e[i]=Math.max(oe(Ja(l),Ja(c),n),0),($e.test(c)||$e.test(l))&&(e[i]+="%")):e[i]=c}(t.rotate||r.rotate)&&(e.rotate=oe(t.rotate||0,r.rotate||0,n))}function eo(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const lh=Ml(0,.5,ai),ch=Ml(.5,.95,Ce);function Ml(e,t,r){return n=>n<e?0:n>t?1:r(pt(e,t,n))}function to(e,t){e.min=t.min,e.max=t.max}function Me(e,t){to(e.x,t.x),to(e.y,t.y)}function ro(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function no(e,t,r,n,s){return e-=t,e=Nr(e,1/r,n),s!==void 0&&(e=Nr(e,1/s,n)),e}function dh(e,t=0,r=1,n=.5,s,a=e,o=e){if($e.test(t)&&(t=parseFloat(t),t=oe(o.min,o.max,t/100)-o.min),typeof t!="number")return;let i=oe(a.min,a.max,n);e===a&&(i-=t),e.min=no(e.min,t,r,i,s),e.max=no(e.max,t,r,i,s)}function so(e,t,[r,n,s],a,o){dh(e,t[r],t[n],t[s],t.scale,a,o)}const uh=["x","scaleX","originX"],fh=["y","scaleY","originY"];function ao(e,t,r,n){so(e.x,t,uh,r?r.x:void 0,n?n.x:void 0),so(e.y,t,fh,r?r.y:void 0,n?n.y:void 0)}function oo(e){return e.translate===0&&e.scale===1}function Vl(e){return oo(e.x)&&oo(e.y)}function io(e,t){return e.min===t.min&&e.max===t.max}function ph(e,t){return io(e.x,t.x)&&io(e.y,t.y)}function lo(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Pl(e,t){return lo(e.x,t.x)&&lo(e.y,t.y)}function co(e){return xe(e.x)/xe(e.y)}function uo(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class hh{constructor(){this.members=[]}add(t){ts(this.members,t),t.scheduleRender()}remove(t){if(zr(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const r=this.members[this.members.length-1];r&&this.promote(r)}}relegate(t){const r=this.members.findIndex(s=>t===s);if(r===0)return!1;let n;for(let s=r;s>=0;s--){const a=this.members[s];if(a.isPresent!==!1){n=a;break}}return n?(this.promote(n),!0):!1}promote(t,r){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,r&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:s}=t.options;s===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:r,resumingFrom:n}=t;r.onExitComplete&&r.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function mh(e,t,r){let n="";const s=e.x.translate/t.x,a=e.y.translate/t.y,o=r?.z||0;if((s||a||o)&&(n=`translate3d(${s}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(n+=`scale(${1/t.x}, ${1/t.y}) `),r){const{transformPerspective:c,rotate:d,rotateX:u,rotateY:h,skewX:m,skewY:g}=r;c&&(n=`perspective(${c}px) ${n}`),d&&(n+=`rotate(${d}deg) `),u&&(n+=`rotateX(${u}deg) `),h&&(n+=`rotateY(${h}deg) `),m&&(n+=`skewX(${m}deg) `),g&&(n+=`skewY(${g}deg) `)}const i=e.x.scale*t.x,l=e.y.scale*t.y;return(i!==1||l!==1)&&(n+=`scale(${i}, ${l})`),n||"none"}const un=["","X","Y","Z"],gh=1e3;let bh=0;function fn(e,t,r,n){const{latestValues:s}=t;s[e]&&(r[e]=s[e],t.setStaticValue(e,0),n&&(n[e]=0))}function El(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const r=ml(t);if(window.MotionHasOptimisedAnimation(r,"transform")){const{layout:s,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(r,"transform",re,!(s||a))}const{parent:n}=e;n&&!n.hasCheckedOptimisedAppear&&El(n)}function Il({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:n,resetTransform:s}){return class{constructor(o={},i=t?.()){this.id=bh++,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(vh),this.nodes.forEach(Sh),this.nodes.forEach(jh),this.nodes.forEach(wh)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,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 l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new sh)}addEventListener(o,i){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new ns),this.eventHandlers.get(o).add(i)}notifyListeners(o,...i){const l=this.eventHandlers.get(o);l&&l.notify(...i)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=_r(o)&&!_i(o),this.instance=o;const{layoutId:i,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||i)&&(this.isLayoutDirty=!0),e){let d,u=0;const h=()=>this.root.updateBlockedByResize=!1;re.read(()=>{u=window.innerWidth}),e(o,()=>{const m=window.innerWidth;m!==u&&(u=m,this.root.updateBlockedByResize=!0,d&&d(),d=ah(h,250),Vr.hasAnimatedSinceResize&&(Vr.hasAnimatedSinceResize=!1,this.nodes.forEach(ho)))})}i&&this.root.registerSharedNode(i,this),this.options.animate!==!1&&c&&(i||l)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:u,hasRelativeLayoutChanged:h,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||c.getDefaultTransition()||Ph,{onLayoutAnimationStart:w,onLayoutAnimationComplete:x}=c.getProps(),b=!this.targetLayout||!Pl(this.targetLayout,m),y=!u&&h;if(this.options.layoutRoot||this.resumeFrom||y||u&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const v={...xs(g,"layout"),onPlay:w,onComplete:x};(c.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v),this.setAnimationOrigin(d,y)}else u||ho(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Be(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(Th),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&El(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const u=this.path[d];u.shouldResetTransform=!0,u.updateScroll("snapshot"),u.options.layoutRoot&&u.willUpdate(!1)}const{layoutId:i,layout:l}=this.options;if(i===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(fo);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(po);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(kh),this.nodes.forEach(yh),this.nodes.forEach(xh)):this.nodes.forEach(po),this.clearAllSnapshots();const i=we.now();me.delta=Fe(0,1e3/60,i-me.timestamp),me.timestamp=i,me.isProcessing=!0,Qr.update.process(me),Qr.preRender.process(me),Qr.render.process(me),me.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Cs.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Ch),this.sharedNodes.forEach(Ah)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,re.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){re.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!xe(this.snapshot.measuredBox.x)&&!xe(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 l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=ce(),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,o?o.layoutBox:void 0)}updateScroll(o="measure"){let i=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(i=!1),i&&this.instance){const l=n(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:r(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!s)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,i=this.projectionDelta&&!Vl(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,d=c!==this.prevTransformTemplateValue;o&&this.instance&&(i||lt(this.latestValues)||d)&&(s(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const i=this.measurePageBox();let l=this.removeElementScroll(i);return o&&(l=this.removeTransform(l)),Eh(l),{animationId:this.root.animationId,measuredBox:i,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:o}=this.options;if(!o)return ce();const i=o.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Ih))){const{scroll:c}=this.root;c&&(Ct(i.x,c.offset.x),Ct(i.y,c.offset.y))}return i}removeElementScroll(o){const i=ce();if(Me(i,o),this.scroll?.wasRoot)return i;for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:d,options:u}=c;c!==this.root&&d&&u.layoutScroll&&(d.wasRoot&&Me(i,o),Ct(i.x,d.offset.x),Ct(i.y,d.offset.y))}return i}applyTransform(o,i=!1){const l=ce();Me(l,o);for(let c=0;c<this.path.length;c++){const d=this.path[c];!i&&d.options.layoutScroll&&d.scroll&&d!==d.root&&kt(l,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),lt(d.latestValues)&&kt(l,d.latestValues)}return lt(this.latestValues)&&kt(l,this.latestValues),l}removeTransform(o){const i=ce();Me(i,o);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!lt(c.latestValues))continue;Nn(c.latestValues)&&c.updateSnapshot();const d=ce(),u=c.measurePageBox();Me(d,u),ao(i,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,d)}return lt(this.latestValues)&&ao(i,this.latestValues),i}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==me.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){const i=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=i.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=i.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=i.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==i;if(!(o||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:u}=this.options;if(!(!this.layout||!(d||u))){if(this.resolvedRelativeTargetAt=me.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ce(),this.relativeTargetOrigin=ce(),Ht(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),Me(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=ce(),this.targetWithTransforms=ce()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),zp(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Me(this.target,this.layout.layoutBox),ol(this.target,this.targetDelta)):Me(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=ce(),this.relativeTargetOrigin=ce(),Ht(this.relativeTargetOrigin,this.target,h.target),Me(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Nn(this.parent.latestValues)||al(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){const o=this.getLead(),i=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),i&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===me.timestamp&&(l=!1),l)return;const{layout:c,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||d))return;Me(this.layoutCorrected,this.layout.layoutBox);const u=this.treeScale.x,h=this.treeScale.y;np(this.layoutCorrected,this.treeScale,this.path,i),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=ce());const{target:m}=o;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(ro(this.prevProjectionDelta.x,this.projectionDelta.x),ro(this.prevProjectionDelta.y,this.projectionDelta.y)),Kt(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==u||this.treeScale.y!==h||!uo(this.projectionDelta.x,this.prevProjectionDelta.x)||!uo(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){if(this.options.visualElement?.scheduleRender(),o){const i=this.getStack();i&&i.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=St(),this.projectionDelta=St(),this.projectionDeltaWithTransform=St()}setAnimationOrigin(o,i=!1){const l=this.snapshot,c=l?l.latestValues:{},d={...this.latestValues},u=St();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!i;const h=ce(),m=l?l.source:void 0,g=this.layout?this.layout.source:void 0,w=m!==g,x=this.getStack(),b=!x||x.members.length<=1,y=!!(w&&!b&&this.options.crossfade===!0&&!this.path.some(Vh));this.animationProgress=0;let v;this.mixTargetDelta=C=>{const S=C/1e3;mo(u.x,o.x,S),mo(u.y,o.y,S),this.setTargetDelta(u),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ht(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Mh(this.relativeTarget,this.relativeTargetOrigin,h,S),v&&ph(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=ce()),Me(v,this.relativeTarget)),w&&(this.animationValues=d,ih(d,c,this.latestValues,S,y,b)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Be(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=re.update(()=>{Vr.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=De(0)),this.currentAnimation=Tl(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:i=>{this.mixTargetDelta(i),o.onUpdate&&o.onUpdate(i)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(gh),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:i,target:l,layout:c,latestValues:d}=o;if(!(!i||!l||!c)){if(this!==o&&this.layout&&c&&Nl(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||ce();const u=xe(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+u;const h=xe(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+h}Me(i,l),kt(i,d),Kt(this.projectionDeltaWithTransform,this.layoutCorrected,i,d)}}registerSharedNode(o,i){this.sharedNodes.has(o)||this.sharedNodes.set(o,new hh),this.sharedNodes.get(o).add(i);const c=i.options.initialPromotionConfig;i.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(i):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){const{layoutId:o}=this.options;return o?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:o}=this.options;return o?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:i,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),i&&this.setOptions({transition:i})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let i=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(i=!0),!i)return;const c={};l.z&&fn("z",o,c,this.animationValues);for(let d=0;d<un.length;d++)fn(`rotate${un[d]}`,o,c,this.animationValues),fn(`skew${un[d]}`,o,c,this.animationValues);o.render();for(const d in c)o.setStaticValue(d,c[d]),this.animationValues&&(this.animationValues[d]=c[d]);o.scheduleRender()}applyProjectionStyles(o,i){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=Mr(i?.pointerEvents)||"",o.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=Mr(i?.pointerEvents)||""),this.hasProjected&&!lt(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";const d=c.animationValues||c.latestValues;this.applyTransformsToTarget();let u=mh(this.projectionDeltaWithTransform,this.treeScale,d);l&&(u=l(d,u)),o.transform=u;const{x:h,y:m}=this.projectionDelta;o.transformOrigin=`${h.origin*100}% ${m.origin*100}% 0`,c.animationValues?o.opacity=c===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:o.opacity=c===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const g in Qt){if(d[g]===void 0)continue;const{correct:w,applyTo:x,isCSSVariable:b}=Qt[g],y=u==="none"?d[g]:w(d[g],c);if(x){const v=x.length;for(let C=0;C<v;C++)o[x[C]]=y}else b?this.options.visualElement.renderState.vars[g]=y:o[g]=y}this.options.layoutId&&(o.pointerEvents=c===this?Mr(i?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>o.currentAnimation?.stop()),this.root.nodes.forEach(fo),this.root.sharedNodes.clear()}}}function yh(e){e.updateLayout()}function xh(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:n}=e.layout,{animationType:s}=e.options,a=t.source!==e.layout.source;s==="size"?Pe(d=>{const u=a?t.measuredBox[d]:t.layoutBox[d],h=xe(u);u.min=r[d].min,u.max=u.min+h}):Nl(s,t.layoutBox,r)&&Pe(d=>{const u=a?t.measuredBox[d]:t.layoutBox[d],h=xe(r[d]);u.max=u.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+h)});const o=St();Kt(o,r,t.layoutBox);const i=St();a?Kt(i,e.applyTransform(n,!0),t.measuredBox):Kt(i,r,t.layoutBox);const l=!Vl(o);let c=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:u,layout:h}=d;if(u&&h){const m=ce();Ht(m,t.layoutBox,u.layoutBox);const g=ce();Ht(g,r,h.layoutBox),Pl(m,g)||(c=!0),d.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=m,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:i,layoutDelta:o,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function vh(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 wh(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Ch(e){e.clearSnapshot()}function fo(e){e.clearMeasurements()}function po(e){e.isLayoutDirty=!1}function kh(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function ho(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Sh(e){e.resolveTargetDelta()}function jh(e){e.calcProjection()}function Th(e){e.resetSkewAndRotation()}function Ah(e){e.removeLeadSnapshot()}function mo(e,t,r){e.translate=oe(t.translate,0,r),e.scale=oe(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function go(e,t,r,n){e.min=oe(t.min,r.min,n),e.max=oe(t.max,r.max,n)}function Mh(e,t,r,n){go(e.x,t.x,r.x,n),go(e.y,t.y,r.y,n)}function Vh(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Ph={duration:.45,ease:[.4,0,.1,1]},bo=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),yo=bo("applewebkit/")&&!bo("chrome/")?Math.round:Ce;function xo(e){e.min=yo(e.min),e.max=yo(e.max)}function Eh(e){xo(e.x),xo(e.y)}function Nl(e,t,r){return e==="position"||e==="preserve-aspect"&&!Op(co(t),co(r),.2)}function Ih(e){return e!==e.root&&e.scroll?.wasRoot}const Nh=Il({attachResizeListener:(e,t)=>tr(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),pn={current:void 0},Rl=Il({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!pn.current){const e=new Nh({});e.mount(window),e.setOptions({layoutScroll:!0}),pn.current=e}return pn.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Rh={pan:{Feature:Qp},drag:{Feature:Jp,ProjectionNode:Rl,MeasureLayout:jl}};function vo(e,t,r){const{props:n}=e;e.animationState&&n.whileHover&&e.animationState.setActive("whileHover",r==="Start");const s="onHover"+r,a=n[s];a&&re.postRender(()=>a(t,lr(t)))}class Dh extends rt{mount(){const{current:t}=this.node;t&&(this.unmount=Ju(t,(r,n)=>(vo(this.node,n,"Start"),s=>vo(this.node,s,"End"))))}unmount(){}}class Bh extends rt{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=sr(tr(this.node.current,"focus",()=>this.onFocus()),tr(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function wo(e,t,r){const{props:n}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&n.whileTap&&e.animationState.setActive("whileTap",r==="Start");const s="onTap"+(r==="End"?"":r),a=n[s];a&&re.postRender(()=>a(t,lr(t)))}class Lh extends rt{mount(){const{current:t}=this.node;t&&(this.unmount=rf(t,(r,n)=>(wo(this.node,n,"Start"),(s,{success:a})=>wo(this.node,s,a?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const $n=new WeakMap,hn=new WeakMap,Oh=e=>{const t=$n.get(e.target);t&&t(e)},zh=e=>{e.forEach(Oh)};function $h({root:e,...t}){const r=e||document;hn.has(r)||hn.set(r,{});const n=hn.get(r),s=JSON.stringify(t);return n[s]||(n[s]=new IntersectionObserver(zh,{root:e,...t})),n[s]}function Fh(e,t,r){const n=$h(t);return $n.set(e,r),n.observe(e),()=>{$n.delete(e),n.unobserve(e)}}const Wh={some:0,all:1};class _h extends rt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:r,margin:n,amount:s="some",once:a}=t,o={root:r?r.current:void 0,rootMargin:n,threshold:typeof s=="number"?s:Wh[s]},i=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,a&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:d,onViewportLeave:u}=this.node.getProps(),h=c?d:u;h&&h(l)};return Fh(this.node.current,o,i)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:r}=this.node;["amount","margin","root"].some(Gh(t,r))&&this.startObserver()}unmount(){}}function Gh({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}const Uh={inView:{Feature:_h},tap:{Feature:Lh},focus:{Feature:Bh},hover:{Feature:Dh}},Kh={layout:{ProjectionNode:Rl,MeasureLayout:jl}},Hh={...Ip,...Uh,...Rh,...Kh},_=ep(Hh,cp),Xh=50,Co=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),Yh=()=>({time:0,x:Co(),y:Co()}),qh={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function ko(e,t,r,n){const s=r[t],{length:a,position:o}=qh[t],i=s.current,l=r.time;s.current=e[`scroll${o}`],s.scrollLength=e[`scroll${a}`]-e[`client${a}`],s.offset.length=0,s.offset[0]=0,s.offset[1]=s.scrollLength,s.progress=pt(0,s.scrollLength,s.current);const c=n-l;s.velocity=c>Xh?0:ss(s.current-i,c)}function Zh(e,t,r){ko(e,"x",t,r),ko(e,"y",t,r),t.time=r}function Jh(e,t){const r={x:0,y:0};let n=e;for(;n&&n!==t;)if(ws(n))r.x+=n.offsetLeft,r.y+=n.offsetTop,n=n.offsetParent;else if(n.tagName==="svg"){const s=n.getBoundingClientRect();n=n.parentElement;const a=n.getBoundingClientRect();r.x+=s.left-a.left,r.y+=s.top-a.top}else if(n instanceof SVGGraphicsElement){const{x:s,y:a}=n.getBBox();r.x+=s,r.y+=a;let o=null,i=n.parentNode;for(;!o;)i.tagName==="svg"&&(o=i),i=n.parentNode;n=o}else break;return r}const Fn={start:0,center:.5,end:1};function So(e,t,r=0){let n=0;if(e in Fn&&(e=Fn[e]),typeof e=="string"){const s=parseFloat(e);e.endsWith("px")?n=s:e.endsWith("%")?e=s/100:e.endsWith("vw")?n=s/100*document.documentElement.clientWidth:e.endsWith("vh")?n=s/100*document.documentElement.clientHeight:e=s}return typeof e=="number"&&(n=t*e),r+n}const Qh=[0,0];function e0(e,t,r,n){let s=Array.isArray(e)?e:Qh,a=0,o=0;return typeof e=="number"?s=[e,e]:typeof e=="string"&&(e=e.trim(),e.includes(" ")?s=e.split(" "):s=[e,Fn[e]?e:"0"]),a=So(s[0],r,n),o=So(s[1],t),a-o}const t0={All:[[0,0],[1,1]]},r0={x:0,y:0};function n0(e){return"getBBox"in e&&e.tagName!=="svg"?e.getBBox():{width:e.clientWidth,height:e.clientHeight}}function s0(e,t,r){const{offset:n=t0.All}=r,{target:s=e,axis:a="y"}=r,o=a==="y"?"height":"width",i=s!==e?Jh(s,e):r0,l=s===e?{width:e.scrollWidth,height:e.scrollHeight}:n0(s),c={width:e.clientWidth,height:e.clientHeight};t[a].offset.length=0;let d=!t[a].interpolate;const u=n.length;for(let h=0;h<u;h++){const m=e0(n[h],c[o],l[o],i[a]);!d&&m!==t[a].interpolatorOffsets[h]&&(d=!0),t[a].offset[h]=m}d&&(t[a].interpolate=ps(t[a].offset,hs(n),{clamp:!1}),t[a].interpolatorOffsets=[...t[a].offset]),t[a].progress=Fe(0,1,t[a].interpolate(t[a].current))}function a0(e,t=e,r){if(r.x.targetOffset=0,r.y.targetOffset=0,t!==e){let n=t;for(;n&&n!==e;)r.x.targetOffset+=n.offsetLeft,r.y.targetOffset+=n.offsetTop,n=n.offsetParent}r.x.targetLength=t===e?t.scrollWidth:t.clientWidth,r.y.targetLength=t===e?t.scrollHeight:t.clientHeight,r.x.containerLength=e.clientWidth,r.y.containerLength=e.clientHeight,process.env.NODE_ENV!=="production"&&e&&t&&t!==e&&$r(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 o0(e,t,r,n={}){return{measure:s=>{a0(e,n.target,r),Zh(e,r,s),(n.offset||n.target)&&s0(e,r,n)},notify:()=>t(r)}}const zt=new WeakMap,jo=new WeakMap,mn=new WeakMap,To=e=>e===document.scrollingElement?window:e;function Dl(e,{container:t=document.scrollingElement,...r}={}){if(!t)return Ce;let n=mn.get(t);n||(n=new Set,mn.set(t,n));const s=Yh(),a=o0(t,e,s,r);if(n.add(a),!zt.has(t)){const i=()=>{for(const u of n)u.measure(me.timestamp);re.preUpdate(l)},l=()=>{for(const u of n)u.notify()},c=()=>re.read(i);zt.set(t,c);const d=To(t);window.addEventListener("resize",c,{passive:!0}),t!==document.documentElement&&jo.set(t,ff(t,c)),d.addEventListener("scroll",c,{passive:!0}),c()}const o=zt.get(t);return re.read(o,!1,!0),()=>{Be(o);const i=mn.get(t);if(!i||(i.delete(a),i.size))return;const l=zt.get(t);zt.delete(t),l&&(To(t).removeEventListener("scroll",l),jo.get(t)?.(),window.removeEventListener("resize",l))}}const Ao=new Map;function i0(e){const t={value:0},r=Dl(n=>{t.value=n[e.axis].progress*100},e);return{currentTime:t,cancel:r}}function Bl({source:e,container:t,...r}){const{axis:n}=r;e&&(t=e);const s=Ao.get(t)??new Map;Ao.set(t,s);const a=r.target??"self",o=s.get(a)??{},i=n+(r.offset??[]).join(",");return o[i]||(o[i]=!r.target&&Ai()?new ScrollTimeline({source:t,axis:n}):i0({container:t,...r})),o[i]}function l0(e,t){const r=Bl(t);return e.attachTimeline({timeline:t.target?void 0:r,observe:n=>(n.pause(),Wi(s=>{n.time=n.iterationDuration*s},r))})}function c0(e){return e.length===2}function d0(e,t){return c0(e)?Dl(r=>{e(r[t.axis].progress,r)},t):Wi(e,Bl(t))}function u0(e,{axis:t="y",container:r=document.scrollingElement,...n}={}){if(!r)return Ce;const s={axis:t,container:r,...n};return typeof e=="function"?d0(e,s):l0(e,s)}const f0=()=>({scrollX:De(0),scrollY:De(0),scrollXProgress:De(0),scrollYProgress:De(0)}),gr=e=>e?!e.current:!1;function Ll({container:e,target:t,...r}={}){const n=ht(f0),s=p.useRef(null),a=p.useRef(!1),o=p.useCallback(()=>(s.current=u0((i,{x:l,y:c})=>{n.scrollX.set(l.current),n.scrollXProgress.set(l.progress),n.scrollY.set(c.current),n.scrollYProgress.set(c.progress)},{...r,container:e?.current||void 0,target:t?.current||void 0}),()=>{s.current?.()}),[e,t,JSON.stringify(r.offset)]);return nr(()=>{if(a.current=!1,gr(e)||gr(t)){a.current=!0;return}else return o()},[o]),p.useEffect(()=>{if(a.current)return be(!gr(e),"Container ref is defined but not hydrated","use-scroll-ref"),be(!gr(t),"Target ref is defined but not hydrated","use-scroll-ref"),o()},[o]),n}function Ds(e){const t=ht(()=>De(e)),{isStatic:r}=p.useContext(ir);if(r){const[,n]=p.useState(e);p.useEffect(()=>t.on("change",n),[])}return t}function Ol(e,t){const r=Ds(t()),n=()=>r.set(t());return n(),nr(()=>{const s=()=>re.preRender(n,!1,!0),a=e.map(o=>o.on("change",s));return()=>{a.forEach(o=>o()),Be(n)}}),r}function p0(e){Gt.current=[],e();const t=Ol(Gt.current,e);return Gt.current=void 0,t}function At(e,t,r,n){if(typeof e=="function")return p0(e);const s=typeof t=="function"?t:pf(t,r,n);return Array.isArray(e)?Mo(e,s):Mo([e],([a])=>s(a))}function Mo(e,t){const r=ht(()=>[]);return Ol(e,()=>{r.length=0;const n=e.length;for(let s=0;s<n;s++)r[s]=e[s].get();return t(r)})}function Rr(e,t={}){const{isStatic:r}=p.useContext(ir),n=()=>fe(e)?e.get():e;if(r)return At(n);const s=Ds(n());return p.useInsertionEffect(()=>hf(s,e,t),[s,JSON.stringify(t)]),s}function h0(e){e.values.forEach(t=>t.stop())}function Wn(e,t){[...t].reverse().forEach(n=>{const s=e.getVariant(n);s&&Is(e,s),e.variantChildren&&e.variantChildren.forEach(a=>{Wn(a,t)})})}function m0(e,t){if(Array.isArray(t))return Wn(e,t);if(typeof t=="string")return Wn(e,[t]);Is(e,t)}function g0(){let e=!1;const t=new Set,r={subscribe(n){return t.add(n),()=>void t.delete(n)},start(n,s){be(e,"controls.start() should only be called after a component has mounted. Consider calling within a useEffect hook.");const a=[];return t.forEach(o=>{a.push(bl(o,n,{transitionOverride:s}))}),Promise.all(a)},set(n){return be(e,"controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook."),t.forEach(s=>{m0(s,n)})},stop(){t.forEach(n=>{h0(n)})},mount(){return e=!0,()=>{e=!1,r.stop()}}};return r}function Bs(e){return typeof e=="object"&&!Array.isArray(e)}function zl(e,t,r,n){return typeof e=="string"&&Bs(t)?Wr(e,r,n):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function b0(e,t,r){return e*(t+1)}function Vo(e,t,r,n){return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?r:t.startsWith("<")?Math.max(0,r+parseFloat(t.slice(1))):n.get(t)??e}function y0(e,t,r){for(let n=0;n<e.length;n++){const s=e[n];s.at>t&&s.at<r&&(zr(e,s),n--)}}function x0(e,t,r,n,s,a){y0(e,s,a);for(let o=0;o<t.length;o++)e.push({value:t[o],at:oe(s,a,n[o]),easing:ci(r,o)})}function v0(e,t){for(let r=0;r<e.length;r++)e[r]=e[r]/(t+1)}function w0(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const C0="easeInOut",k0=20;function S0(e,{defaultTransition:t={},...r}={},n,s){const a=t.duration||.3,o=new Map,i=new Map,l={},c=new Map;let d=0,u=0,h=0;for(let m=0;m<e.length;m++){const g=e[m];if(typeof g=="string"){c.set(g,u);continue}else if(!Array.isArray(g)){c.set(g.name,Vo(u,g.at,d,c));continue}let[w,x,b={}]=g;b.at!==void 0&&(u=Vo(u,b.at,d,c));let y=0;const v=(C,S,j,A=0,k=0)=>{const V=j0(C),{delay:M=0,times:D=hs(V),type:z="keyframes",repeat:L,repeatType:I,repeatDelay:R=0,...B}=S;let{ease:P=t.ease||"easeOut",duration:T}=S;const N=typeof M=="function"?M(A,k):M,E=V.length,F=ys(z)?z:s?.[z||"keyframes"];if(E<=2&&F){let W=100;if(E===2&&M0(V)){const Z=V[1]-V[0];W=Math.abs(Z)}const J={...B};T!==void 0&&(J.duration=Ie(T));const Y=wi(J,W,F);P=Y.ease,T=Y.duration}T??(T=a);const $=u+N;D.length===1&&D[0]===0&&(D[1]=1);const O=D.length-V.length;if(O>0&&ki(D,O),V.length===1&&V.unshift(null),L){be(L<k0,"Repeat count too high, must be less than 20","repeat-count-high"),T=b0(T,L);const W=[...V],J=[...D];P=Array.isArray(P)?[...P]:[P];const Y=[...P];for(let Z=0;Z<L;Z++){V.push(...W);for(let ne=0;ne<W.length;ne++)D.push(J[ne]+(Z+1)),P.push(ne===0?"linear":ci(Y,ne-1))}v0(D,L)}const K=$+T;x0(j,V,P,D,$,K),y=Math.max(N+T,y),h=Math.max(K,h)};if(fe(w)){const C=Po(w,i);v(x,b,Eo("default",C))}else{const C=zl(w,x,n,l),S=C.length;for(let j=0;j<S;j++){x=x,b=b;const A=C[j],k=Po(A,i);for(const V in x)v(x[V],T0(b,V),Eo(V,k),j,S)}}d=u,u+=y}return i.forEach((m,g)=>{for(const w in m){const x=m[w];x.sort(w0);const b=[],y=[],v=[];for(let S=0;S<x.length;S++){const{at:j,value:A,easing:k}=x[S];b.push(A),y.push(pt(0,h,j)),v.push(k||"easeOut")}y[0]!==0&&(y.unshift(0),b.unshift(b[0]),v.unshift(C0)),y[y.length-1]!==1&&(y.push(1),b.push(null)),o.has(g)||o.set(g,{keyframes:{},transition:{}});const C=o.get(g);C.keyframes[w]=b,C.transition[w]={...t,duration:h,ease:v,times:y,...r}}}),o}function Po(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function Eo(e,t){return t[e]||(t[e]=[]),t[e]}function j0(e){return Array.isArray(e)?e:[e]}function T0(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const A0=e=>typeof e=="number",M0=e=>e.every(A0);function V0(e,t){return e in t}class P0 extends cl{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,r){if(V0(r,t)){const n=t[r];if(typeof n=="string"||typeof n=="number")return n}}getBaseTargetFromProps(){}removeValueFromRenderState(t,r){delete r.output[t]}measureInstanceViewportBox(){return ce()}build(t,r){Object.assign(t.output,r)}renderInstance(t,{output:r}){Object.assign(t,r)}sortInstanceNodePosition(){return 0}}function E0(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},r=_r(e)&&!_i(e)?new hl(t):new fl(t);r.mount(e),er.set(e,r)}function I0(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},r=new P0(t);r.mount(e),er.set(e,r)}function N0(e,t){return fe(e)||typeof e=="number"||typeof e=="string"&&!Bs(t)}function $l(e,t,r,n){const s=[];if(N0(e,t))s.push(Tl(e,Bs(t)&&t.default||t,r&&(r.default||r)));else{const a=zl(e,t,n),o=a.length;be(!!o,"No valid elements provided.","no-valid-elements");for(let i=0;i<o;i++){const l=a[i];be(l!==null,"You're trying to perform an animation on null. Ensure that selectors are correctly finding elements and refs are correctly hydrated.","animate-null");const c=l instanceof Element?E0:I0;er.has(l)||c(l);const d=er.get(l),u={...r};"delay"in u&&typeof u.delay=="function"&&(u.delay=u.delay(i,o)),s.push(...Rs(d,{...t,transition:u},{}))}}return s}function R0(e,t,r){const n=[];return S0(e,t,r,{spring:Zt}).forEach(({keyframes:a,transition:o},i)=>{n.push(...$l(i,a,o))}),n}function D0(e){return Array.isArray(e)&&e.some(Array.isArray)}function B0(e){function t(r,n,s){let a=[],o;if(D0(r))a=R0(r,n,e);else{const{onComplete:l,...c}=s||{};typeof l=="function"&&(o=l),a=$l(r,n,c,e)}const i=new Du(a);return o&&i.finished.then(o),i}return t}const L0=B0();function O0(){const e=ht(g0);return nr(e.mount,[]),e}const Ye=O0,z0={some:0,all:1};function $0(e,t,{root:r,margin:n,amount:s="some"}={}){const a=Wr(e),o=new WeakMap,i=c=>{c.forEach(d=>{const u=o.get(d.target);if(d.isIntersecting!==!!u)if(d.isIntersecting){const h=t(d.target,d);typeof h=="function"?o.set(d.target,h):l.unobserve(d.target)}else typeof u=="function"&&(u(d),o.delete(d.target))})},l=new IntersectionObserver(i,{root:r,rootMargin:n,threshold:typeof s=="number"?s:z0[s]});return a.forEach(c=>l.observe(c)),()=>l.disconnect()}function ke(e,{root:t,margin:r,amount:n,once:s=!1,initial:a=!1}={}){const[o,i]=p.useState(a);return p.useEffect(()=>{if(!e.current||s&&o)return;const l=()=>(i(!0),s?void 0:()=>i(!1)),c={root:t&&t.current||void 0,margin:r,amount:n};return $0(e.current,l,c)},[t,e,r,s,n]),o}const Fl=(e={})=>{const{selectionMode:t="single",defaultExpandedKeys:r=[],expandedKeys:n,onExpandedChange:s,onSelectionChange:a,isDisabled:o=!1}=e,[i,l]=p.useState(r),c=n!==void 0,d=c?n:i,u=p.useCallback(v=>{o||(c||l(v),s?.(v))},[c,o,s]),h=p.useCallback(v=>d.includes(v),[d]),m=p.useCallback(v=>{if(o)return;let C;if(t==="single")C=h(v)?[]:[v],a&&a(h(v)?"":v);else if(t==="multiple")C=h(v)?d.filter(S=>S!==v):[...d,v];else return;u(C)},[o,t,h,d,u,a]),g=p.useCallback(v=>{if(o||h(v))return;let C;if(t==="single")C=[v],a?.(v);else if(t==="multiple")C=[...d,v];else return;u(C)},[o,t,h,d,u,a]),w=p.useCallback(v=>{if(o||!h(v))return;const C=d.filter(S=>S!==v);u(C),t==="single"&&a&&a("")},[o,h,d,u,t,a]),x=p.useCallback((v=[])=>{o||t!=="multiple"||u(v)},[o,t,u]),b=p.useCallback(()=>{o||(u([]),t==="single"&&a&&a(""))},[o,u,t,a]),y=p.useCallback(v=>{u(v)},[u]);return p.useMemo(()=>({expandedKeys:d,isExpanded:h,toggle:m,expand:g,collapse:w,expandAll:x,collapseAll:b,setExpandedKeys:y}),[d,h,m,g,w,x,b,y])},Ls={xs:{base:"text-xs",header:"px-2 py-1.5 min-h-8",content:"px-2 pb-2",indicator:"text-xs w-3 h-3",gap:"gap-1"},sm:{base:"text-sm",header:"px-3 py-2 min-h-10",content:"px-3 pb-3",indicator:"text-sm w-4 h-4",gap:"gap-1.5"},md:{base:"text-base",header:"px-4 py-3 min-h-12",content:"px-4 pb-4",indicator:"text-base w-5 h-5",gap:"gap-2"},lg:{base:"text-lg",header:"px-5 py-4 min-h-14",content:"px-5 pb-5",indicator:"text-lg w-6 h-6",gap:"gap-2.5"},xl:{base:"text-xl",header:"px-6 py-5 min-h-16",content:"px-6 pb-6",indicator:"text-xl w-7 h-7",gap:"gap-3"}},Wl={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl",full:"rounded-2xl"},F0=(e="default",t="flat",r=!1)=>{const n="transition-colors duration-200";return r?`${n} opacity-50 cursor-not-allowed`:`${n} ${{default:{flat:"bg-gray-100 text-gray-900 hover:bg-gray-200",bordered:"bg-transparent border-2 border-gray-200 text-gray-900 hover:border-gray-300 hover:bg-gray-50",shadow:"bg-white text-gray-900 shadow-md hover:shadow-lg",splitted:"bg-gray-50 text-gray-900 hover:bg-gray-100 shadow-sm"},primary:{flat:"bg-blue-100 text-blue-900 hover:bg-blue-200",bordered:"bg-transparent border-2 border-blue-200 text-blue-900 hover:border-blue-300 hover:bg-blue-50",shadow:"bg-white text-blue-900 shadow-md shadow-blue-100 hover:shadow-lg hover:shadow-blue-200",splitted:"bg-blue-50 text-blue-900 hover:bg-blue-100 shadow-sm shadow-blue-100"},secondary:{flat:"bg-purple-100 text-purple-900 hover:bg-purple-200",bordered:"bg-transparent border-2 border-purple-200 text-purple-900 hover:border-purple-300 hover:bg-purple-50",shadow:"bg-white text-purple-900 shadow-md shadow-purple-100 hover:shadow-lg hover:shadow-purple-200",splitted:"bg-purple-50 text-purple-900 hover:bg-purple-100 shadow-sm shadow-purple-100"},success:{flat:"bg-green-100 text-green-900 hover:bg-green-200",bordered:"bg-transparent border-2 border-green-200 text-green-900 hover:border-green-300 hover:bg-green-50",shadow:"bg-white text-green-900 shadow-md shadow-green-100 hover:shadow-lg hover:shadow-green-200",splitted:"bg-green-50 text-green-900 hover:bg-green-100 shadow-sm shadow-green-100"},warning:{flat:"bg-amber-100 text-amber-900 hover:bg-amber-200",bordered:"bg-transparent border-2 border-amber-200 text-amber-900 hover:border-amber-300 hover:bg-amber-50",shadow:"bg-white text-amber-900 shadow-md shadow-amber-100 hover:shadow-lg hover:shadow-amber-200",splitted:"bg-amber-50 text-amber-900 hover:bg-amber-100 shadow-sm shadow-amber-100"},danger:{flat:"bg-red-100 text-red-900 hover:bg-red-200",bordered:"bg-transparent border-2 border-red-200 text-red-900 hover:border-red-300 hover:bg-red-50",shadow:"bg-white text-red-900 shadow-md shadow-red-100 hover:shadow-lg hover:shadow-red-200",splitted:"bg-red-50 text-red-900 hover:bg-red-100 shadow-sm shadow-red-100"}}[e][t]}`},W0=(e="default",t="flat",r=!1,n=!1)=>{const s="flex items-center justify-between w-full text-left font-medium transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2";if(n)return`${s} opacity-50 cursor-not-allowed focus:ring-gray-300`;const a={default:"focus:ring-gray-500",primary:"focus:ring-blue-500",secondary:"focus:ring-purple-500",success:"focus:ring-green-500",warning:"focus:ring-amber-500",danger:"focus:ring-red-500"},o=r?"font-semibold":"",i=t==="bordered"?"hover:bg-opacity-10":"";return`${s} ${a[e]} ${o} ${i} cursor-pointer`},_0=(e="default",t="flat")=>`overflow-hidden transition-all duration-300 ease-in-out ${{default:{flat:"text-gray-700",bordered:"text-gray-700",shadow:"text-gray-700",splitted:"text-gray-700"},primary:{flat:"text-blue-800",bordered:"text-blue-800",shadow:"text-blue-800",splitted:"text-blue-800"},secondary:{flat:"text-purple-800",bordered:"text-purple-800",shadow:"text-purple-800",splitted:"text-purple-800"},success:{flat:"text-green-800",bordered:"text-green-800",shadow:"text-green-800",splitted:"text-green-800"},warning:{flat:"text-amber-800",bordered:"text-amber-800",shadow:"text-amber-800",splitted:"text-amber-800"},danger:{flat:"text-red-800",bordered:"text-red-800",shadow:"text-red-800",splitted:"text-red-800"}}[e][t]}`,G0=(e="default",t=!1,r=!1)=>{const n="flex-shrink-0 transition-transform duration-200 ease-in-out";if(r)return`${n} opacity-50 text-gray-400`;const s={default:"text-gray-600",primary:"text-blue-600",secondary:"text-purple-600",success:"text-green-600",warning:"text-amber-600",danger:"text-red-600"},a=t?"rotate-180":"rotate-0";return`${n} ${s[e]} ${a}`},U0=(e="default",t="flat")=>t==="splitted"?"":`border-t ${{default:"border-gray-200",primary:"border-blue-200",secondary:"border-purple-200",success:"border-green-200",warning:"border-amber-200",danger:"border-red-200"}[e]}`,K0=(e="flat")=>`accordion-item ${{flat:"border-0",bordered:"border border-gray-200 first:border-t last:border-b",shadow:"shadow-sm",splitted:"mb-2 last:mb-0 shadow-sm border border-gray-100"}[e]}`,H0=(e="flat",t="md",r=!1,n="")=>{const s="accordion w-full",a=Wl[t],o="space-y-0",i={flat:"space-y-0",bordered:`space-y-0 ${a} overflow-hidden`,shadow:"space-y-2",splitted:"space-y-2"};return`${s} ${i[e]} ${o} ${n}`.trim()},Ve={size:"md",color:"default",variant:"flat",radius:"md",selectionMode:"single",indicatorPlacement:"end",itemPlacement:"outside",showDivider:!0,disableAnimation:!1,disableIndicatorAnimation:!1,keepContentMounted:!1,isCompact:!1},_l={spring:{preset:"spring",spring:{stiffness:280,damping:25,duration:.4},staggerDelay:.1,enableStagger:!0},tween:{preset:"tween",spring:{stiffness:180,damping:22,duration:.5},staggerDelay:.08,enableStagger:!0},smooth:{preset:"smooth",spring:{stiffness:240,damping:28,duration:.45},staggerDelay:.12,enableStagger:!0},bouncy:{preset:"bouncy",spring:{stiffness:400,damping:18,duration:.6},staggerDelay:.15,enableStagger:!0},slow:{preset:"slow",spring:{stiffness:150,damping:30,duration:.7},staggerDelay:.2,enableStagger:!0}},X0=_l.spring,Hr=(e,t)=>{const r=t?_l[t]:X0;return e?{...r,...e,spring:{...r.spring,...e.spring}}:r},Y0=e=>{const{spring:t}=e,r={type:"spring",stiffness:t?.stiffness||280,damping:t?.damping||25};return{collapsed:{rotate:0,scale:1,transition:r},expanded:{rotate:180,scale:1.05,transition:r}}},Io=(e,t=0)=>e.enableStagger?{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:t*(e.staggerDelay||.1),duration:e.spring?.duration?e.spring.duration*.5:.3,ease:"easeOut"}}:{},Gl=e=>{const t={type:"spring",stiffness:280,damping:25},r={spring:{scale:1.002,transition:t},tween:{scale:1.001,transition:t},smooth:{scale:1.002,transition:t},bouncy:{scale:1.005,transition:t},slow:{scale:1.001,transition:t}};return r[e]||r.spring},Ul=e=>{const t={type:"spring",stiffness:280,damping:25},r={spring:{scale:.998,transition:t},tween:{scale:.999,transition:t},smooth:{scale:.998,transition:t},bouncy:{scale:.995,transition:t},slow:{scale:.999,transition:t}};return r[e]||r.spring},No=({className:e="",isExpanded:t=!1,disableAnimation:r=!1,animationConfig:n})=>{const s=p.useMemo(()=>n?Y0(n):{},[n]);return r?f.jsx("svg",{className:`${e} ${t?"rotate-180":""} transition-transform duration-200`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})}):f.jsx(_.svg,{className:e,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,animate:t?"expanded":"collapsed",variants:s,children:f.jsx(_.path,{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7",animate:{pathLength:1,opacity:1},initial:{pathLength:.8,opacity:.8},transition:{type:"spring",stiffness:n?.spring?.stiffness||280,damping:n?.spring?.damping||25}})})},_n=({isExpanded:e,isDisabled:t=!1,className:r="",children:n,"data-testid":s})=>{const{color:a,size:o,disableIndicatorAnimation:i,animationConfig:l}=Xr(),c=p.useMemo(()=>Hr(l,"spring"),[l]),d=p.useMemo(()=>Gl(c.preset||"spring"),[c.preset]),u=p.useMemo(()=>Ul(c.preset||"spring"),[c.preset]),h=Ls[o],g=`${G0(a,e,t)} ${h.indicator} ${r}`.trim();return i?f.jsx("span",{className:g,"data-testid":s,"aria-hidden":"true",children:n||f.jsx(No,{className:"w-full h-full"})}):f.jsx(_.span,{className:g,"data-testid":s,"aria-hidden":"true",whileHover:d,whileTap:u,children:n||f.jsx(No,{className:"w-full h-full",isExpanded:e,disableAnimation:i,animationConfig:c})})},Os=({children:e,isExpanded:t,isDisabled:r=!1,onClick:n,className:s="",ariaLabel:a,"data-testid":o})=>{const{color:i,variant:l,size:c,indicatorPlacement:d,animationConfig:u}=Xr(),h=p.useMemo(()=>Hr(u,"spring"),[u]),m=p.useMemo(()=>Gl(h.preset||"spring"),[h.preset]),g=p.useMemo(()=>Ul(h.preset||"spring"),[h.preset]),w=Ls[c],b=`${W0(i,l,t,r)} ${w.header} ${s}`.trim(),y=()=>{!r&&n&&n()},v=C=>{!r&&(C.key==="Enter"||C.key===" ")&&(C.preventDefault(),n?.())};return f.jsxs(_.button,{type:"button",className:b,onClick:y,onKeyDown:v,disabled:r,"aria-expanded":t,"aria-label":a,"data-testid":o,role:"tab",tabIndex:r?-1:0,whileHover:r?void 0:m,whileTap:r?void 0:g,children:[d==="start"&&f.jsx(_n,{isExpanded:t,isDisabled:r}),f.jsx(_.span,{className:"flex-1 text-left",animate:{opacity:r?.5:1},transition:{type:"spring",stiffness:280,damping:25},children:e}),d==="end"&&f.jsx(_n,{isExpanded:t,isDisabled:r})]})};Os.displayName="AccordionHeader";_n.displayName="AccordionIndicator";const Ro=({isExpanded:e,disableAnimation:t=!1,children:r,className:n="",style:s,animationConfig:a})=>{const o=p.useRef(null),i=p.useMemo(()=>Hr(a,"spring"),[a]);if(t)return f.jsx("div",{className:n,style:s,children:r});const l=p.useMemo(()=>{const{spring:d}=i,u={type:"spring",stiffness:d?.stiffness||280,damping:d?.damping||25};return{closed:{opacity:0,transformOrigin:"top",transition:u},open:{opacity:1,transformOrigin:"top",transition:u}}},[i]),c={overflow:"hidden",...s};return f.jsx(_.div,{ref:o,className:n,style:c,initial:"closed",animate:e?"open":"closed",variants:l,children:r})},zs=({children:e,isExpanded:t,className:r="",style:n,"data-testid":s})=>{const{color:a,variant:o,size:i,disableAnimation:l,keepContentMounted:c,animationConfig:d}=Xr(),u=Ls[i],m=`${_0(a,o)} ${u.content} ${r}`.trim();return l?t?f.jsx("div",{className:m,style:n,"data-testid":s,role:"tabpanel",children:e}):null:c?f.jsx(Ro,{isExpanded:t,disableAnimation:l,className:m,style:n,animationConfig:d,children:f.jsx("div",{"data-testid":s,role:"tabpanel","aria-hidden":!t,children:e})}):f.jsx(We,{initial:!1,children:t&&f.jsx(Ro,{isExpanded:t,disableAnimation:l,className:m,style:n,animationConfig:d,children:f.jsx("div",{"data-testid":s,role:"tabpanel","aria-hidden":!t,children:e})},"accordion-content")})};zs.displayName="AccordionContent";const $s=({itemKey:e,title:t,children:r,isExpanded:n,isDisabled:s=!1,showDivider:a,header:o,onToggle:i,className:l="",style:c,ariaLabel:d,"data-testid":u})=>{const h=Xr(),{expandedKeys:m,toggle:g,variant:w,color:x,radius:b,isDisabled:y,showDivider:v}=h,C=n!==void 0?n:m.includes(e),S=y||s,j=a!==void 0?a:v,A=()=>{S||(i?i(e):g(e))},k=K0(w),V=F0(x,w,S),M=Wl[b],D=U0(x,w),z=p.useMemo(()=>{const L=[k,V,M,l];return w==="splitted"&&L.push("border rounded-lg overflow-hidden"),L.filter(Boolean).join(" ").trim()},[k,V,M,l,w]);return f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:z,style:c,"data-testid":u,"data-expanded":C,"data-disabled":S,children:[f.jsx(Os,{isExpanded:C,isDisabled:S,onClick:A,ariaLabel:d||`Toggle ${t}`,"data-testid":u?`${u}-header`:void 0,children:o||t}),f.jsx(zs,{isExpanded:C,"data-testid":u?`${u}-content`:void 0,children:r})]}),j&&w!=="splitted"&&f.jsx("div",{className:D})]})};$s.displayName="AccordionItem";const Kl=p.createContext(null),Xr=()=>{const e=p.useContext(Kl);if(!e)throw new Error("useAccordionContext must be used within an Accordion component");return e},Hl=({items:e,children:t,selectionMode:r=Ve.selectionMode,defaultExpandedKeys:n,expandedKeys:s,onExpandedChange:a,onSelectionChange:o,size:i=Ve.size,color:l=Ve.color,variant:c=Ve.variant,radius:d=Ve.radius,isDisabled:u=!1,showDivider:h=Ve.showDivider,disableAnimation:m=Ve.disableAnimation,disableIndicatorAnimation:g=Ve.disableIndicatorAnimation,keepContentMounted:w=Ve.keepContentMounted,animationConfig:x,indicatorPlacement:b=Ve.indicatorPlacement,itemPlacement:y=Ve.itemPlacement,isCompact:v=Ve.isCompact,className:C="",style:S,"aria-label":j="Accordion","data-testid":A,...k})=>{const V=Fl({selectionMode:r,defaultExpandedKeys:n,expandedKeys:s,onExpandedChange:a,onSelectionChange:o,isDisabled:u}),M=p.useMemo(()=>({expandedKeys:V.expandedKeys,toggle:V.toggle,selectionMode:r,size:i,color:l,variant:c,radius:d,isDisabled:u,showDivider:h,disableAnimation:m,disableIndicatorAnimation:g,keepContentMounted:w,indicatorPlacement:b,itemPlacement:y,isCompact:v,animationConfig:x}),[V.expandedKeys,V.toggle,r,i,l,c,d,u,h,m,g,w,b,y,v,x]),D=H0(c,d,v,C),z=p.useMemo(()=>Hr(x,"spring"),[x]),L=()=>e&&e.length>0?e.map((I,R)=>{const B=Io(z,R);return f.jsx(_.div,{...m?{}:B,children:f.jsx($s,{itemKey:I.key,title:I.title,isDisabled:I.isDisabled,className:I.className,style:I.style,ariaLabel:I.ariaLabel,children:I.content})},I.key)}):t&&!m?p.Children.toArray(t).map((R,B)=>{const P=Io(z,B);return f.jsx(_.div,{...P,children:R},B)}):t;return f.jsx(Kl.Provider,{value:M,children:f.jsx(_.div,{className:D,style:S,"aria-label":j,"data-testid":A,role:"tablist",initial:{opacity:0},animate:{opacity:1},transition:{type:"spring",stiffness:280,damping:25},...k,children:L()})})};Hl.displayName="Accordion";const q0={linear:[0,0,1,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1],backIn:[.6,-.28,.735,.045],backOut:[.175,.885,.32,1.275],backInOut:[.68,-.55,.265,1.55],bounceIn:[.6,-.28,.735,.045],bounceOut:[.175,.885,.32,1.275],bounceInOut:[.68,-.55,.265,1.55],elasticIn:[.5,-.25,.75,1.25],elasticOut:[.25,.46,.45,.94],elasticInOut:[.5,-.25,.75,1.25]},mt=(e,t=.5)=>({duration:t,ease:q0[e]}),Z0=(e,t=50)=>({up:{x:0,y:-t},down:{x:0,y:t},left:{x:-t,y:0},right:{x:t,y:0},upLeft:{x:-t,y:-t},upRight:{x:t,y:-t},downLeft:{x:-t,y:t},downRight:{x:t,y:t}})[e],J0=e=>{switch(e){case"horizontal":return{rotateY:180};case"vertical":return{rotateX:180};case"both":return{rotateX:180,rotateY:180};default:return{}}},Q0={hidden:e=>({opacity:e.startOpacity,filter:e.blur?`blur(${e.blurAmount}px)`:"blur(0px)"}),visible:e=>({opacity:e.endOpacity,filter:"blur(0px)"})},em={hidden:e=>{const{x:t,y:r}=Z0(e.direction,e.distance);return{x:e.overshoot?t*1.2:t,y:e.overshoot?r*1.2:r,opacity:0}},visible:{x:0,y:0,opacity:1}},tm={hidden:e=>({scale:e.startScale,opacity:0}),visible:e=>({scale:e.endScale,opacity:1,transition:{type:e.bounce?"spring":"tween",stiffness:e.bounce?300:100,damping:e.bounce?20:10}})},rm={hidden:e=>({scale:e.startScale,opacity:0,y:-20}),visible:e=>({scale:1,opacity:1,y:0,transition:{type:"spring",...{low:{stiffness:200,damping:15},medium:{stiffness:300,damping:12},high:{stiffness:400,damping:8}}[e.intensity],bounce:.4}})},nm={hidden:e=>({...J0(e.direction),opacity:e.backfaceVisible?1:0,transformPerspective:e.perspective,backfaceVisibility:e.backfaceVisible?"visible":"hidden"}),visible:{rotateX:0,rotateY:0,opacity:1}},sm={hidden:{opacity:0},visible:e=>({opacity:1,transition:{staggerChildren:e.staggerDelay,staggerDirection:e.staggerDirection==="reverse"?-1:1,delayChildren:.1}})},am={hidden:{opacity:0,y:20,scale:.8},visible:{opacity:1,y:0,scale:1,transition:{type:"spring",stiffness:300,damping:20}}},om=e=>{const t={initial:e[0]||{}};return e.forEach((r,n)=>{t[`morph${n}`]={...r,transition:{type:"spring",stiffness:200,damping:20}}}),t},im={hidden:{opacity:0},visible:{opacity:1}},qe=()=>typeof window>"u"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches,He=e=>{e.style.willChange="transform, opacity",e.style.backfaceVisibility="hidden",e.style.perspective="1000px"},Xe=e=>{e.style.willChange="auto",e.style.backfaceVisibility="visible",e.style.perspective="none"},ie=(e,t)=>{const r=performance.now();return{animationDuration:t,frameRate:Math.round(1e3/(r-e)),renderTime:r-e}},te=(e,t,r)=>{try{switch(t){case"start":e.onStart?.(r);break;case"update":e.onUpdate?.(r);break;case"complete":e.onComplete?.(r);break;case"error":e.onError?.(r);break}}catch(n){console.warn("Error handling animation event:",n)}},nt=e=>({}),Do=e=>e.startsWith(">")?`:scope ${e}`:e,lm=({children:e,trigger:t="inView",delay:r=0,duration:n=.6,easing:s="easeOut",disabled:a=!1,startOpacity:o=0,endOpacity:i=1,blur:l=!1,blurAmount:c=5,variants:d,transition:u,className:h="",style:m={},onAnimationStart:g,onAnimationComplete:w,...x})=>{const b=p.useRef(null),y=Ye(),v=ke(b,{once:!0,margin:"0px 0px -10% 0px"}),C=qe(),S=p.useRef(0),j=d||Q0,A={startOpacity:o,endOpacity:i,blur:l,blurAmount:c};p.useEffect(()=>{if(a||C){y.set("visible");return}(async()=>{try{switch(S.current=performance.now(),b.current&&He(b.current),t){case"immediate":te({onStart:g},"start",ie(S.current,n)),await y.start("visible");break;case"inView":v&&(te({onStart:g},"start",ie(S.current,n)),await y.start("visible"));break;case"manual":break;default:await y.start("visible")}b.current&&Xe(b.current),te({onComplete:w},"complete",ie(S.current,n))}catch(E){console.warn("Error in FadeContainer animation:",E),te({onError:console.error},"error",E)}})()},[v,t,y,a,C,n,g,w]);const k=u||{...mt(s,n),delay:r},M={...nt(),...m},D=()=>{t==="hover"&&!a&&!C&&y.start("visible")},z=()=>{t==="hover"&&!a&&!C&&y.start("hidden")},L=()=>{t==="focus"&&!a&&!C&&y.start("visible")},I=()=>{t==="focus"&&!a&&!C&&y.start("hidden")},{onDrag:R,onDragEnd:B,onDragStart:P,...T}=x;return f.jsx(_.div,{ref:b,custom:A,variants:j,initial:a||C?"visible":"hidden",animate:y,transition:k,onMouseEnter:D,onMouseLeave:z,onFocus:L,onBlur:I,className:h,style:M,...T,children:e})},cm=({children:e,trigger:t="inView",delay:r=0,duration:n=.6,easing:s="easeOut",disabled:a=!1,direction:o="up",distance:i=50,overshoot:l=!1,variants:c,transition:d,className:u="",style:h={},onAnimationStart:m,onAnimationComplete:g,...w})=>{const x=p.useRef(null),b=Ye(),y=ke(x,{once:!0,margin:"0px 0px -10% 0px"}),v=qe(),C=p.useRef(0),S=c||em,j={direction:o,distance:i,overshoot:l};p.useEffect(()=>{if(a||v){b.set("visible");return}(async()=>{try{switch(C.current=performance.now(),x.current&&He(x.current),t){case"immediate":te({onStart:m},"start",ie(C.current,n)),await b.start("visible");break;case"inView":y&&(te({onStart:m},"start",ie(C.current,n)),await b.start("visible"));break;case"manual":break;default:await b.start("visible")}x.current&&Xe(x.current),te({onComplete:g},"complete",ie(C.current,n))}catch(N){console.warn("Error in SlideContainer animation:",N),te({onError:console.error},"error",N)}})()},[y,t,b,a,v,n,m,g]);const A=d||{...mt(s,n),delay:r,...l&&{type:"spring",stiffness:200,damping:20}},V={...nt(),...h},M=()=>{t==="hover"&&!a&&!v&&b.start("visible")},D=()=>{t==="hover"&&!a&&!v&&b.start("hidden")},z=()=>{t==="focus"&&!a&&!v&&b.start("visible")},L=()=>{t==="focus"&&!a&&!v&&b.start("hidden")},{onDrag:I,onDragEnd:R,onDragStart:B,...P}=w;return f.jsx(_.div,{ref:x,custom:j,variants:S,initial:a||v?"visible":"hidden",animate:b,transition:A,onMouseEnter:M,onMouseLeave:D,onFocus:z,onBlur:L,className:u,style:V,...P,children:e})},dm=({children:e,trigger:t="inView",delay:r=0,duration:n=.6,easing:s="easeOut",disabled:a=!1,startScale:o=.8,endScale:i=1,scaleOrigin:l="center",bounce:c=!1,variants:d,transition:u,className:h="",style:m={},onAnimationStart:g,onAnimationComplete:w,...x})=>{const b=p.useRef(null),y=Ye(),v=ke(b,{once:!0,margin:"0px 0px -10% 0px"}),C=qe(),S=p.useRef(0),j=d||tm,A={startScale:o,endScale:i,bounce:c};p.useEffect(()=>{if(a||C){y.set("visible");return}(async()=>{try{switch(S.current=performance.now(),b.current&&He(b.current),t){case"immediate":te({onStart:g},"start",ie(S.current,n)),await y.start("visible");break;case"inView":v&&(te({onStart:g},"start",ie(S.current,n)),await y.start("visible"));break;case"manual":break;default:await y.start("visible")}b.current&&Xe(b.current),te({onComplete:w},"complete",ie(S.current,n))}catch(E){console.warn("Error in ScaleContainer animation:",E),te({onError:console.error},"error",E)}})()},[v,t,y,a,C,n,g,w]);const k=u||{...mt(s,n),delay:r,...c&&{type:"spring",stiffness:300,damping:20,bounce:.3}},V=nt(),M={transformOrigin:l,...V,...m},D=()=>{t==="hover"&&!a&&!C&&y.start("visible")},z=()=>{t==="hover"&&!a&&!C&&y.start("hidden")},L=()=>{t==="focus"&&!a&&!C&&y.start("visible")},I=()=>{t==="focus"&&!a&&!C&&y.start("hidden")},{onDrag:R,onDragEnd:B,onDragStart:P,...T}=x;return f.jsx(_.div,{ref:b,custom:A,variants:j,initial:a||C?"visible":"hidden",animate:y,transition:k,onMouseEnter:D,onMouseLeave:z,onFocus:L,onBlur:I,className:h,style:M,...T,children:e})},um=({children:e,trigger:t="inView",delay:r=0,duration:n=.8,easing:s="easeOut",disabled:a=!1,intensity:o="medium",bounceCount:i=1,startScale:l=.3,variants:c,transition:d,className:u="",style:h={},onAnimationStart:m,onAnimationComplete:g,...w})=>{const x=p.useRef(null),b=Ye(),y=ke(x,{once:!0,margin:"0px 0px -10% 0px"}),v=qe(),C=p.useRef(0),S=c||rm,j={intensity:o,bounceCount:i,startScale:l};p.useEffect(()=>{if(a||v){b.set("visible");return}(async()=>{try{switch(C.current=performance.now(),x.current&&He(x.current),t){case"immediate":te({onStart:m},"start",ie(C.current,n)),await b.start("visible");break;case"inView":y&&(te({onStart:m},"start",ie(C.current,n)),await b.start("visible"));break;case"manual":break;default:await b.start("visible")}x.current&&Xe(x.current),te({onComplete:g},"complete",ie(C.current,n))}catch(E){console.warn("Error in BounceContainer animation:",E),te({onError:console.error},"error",E)}})()},[y,t,b,a,v,n,m,g]);const k=d||{type:"spring",...{low:{stiffness:200,damping:15,bounce:.2},medium:{stiffness:300,damping:12,bounce:.4},high:{stiffness:400,damping:8,bounce:.6}}[o],delay:r,duration:n},M={...nt(),...h},D=()=>{t==="hover"&&!a&&!v&&b.start("visible")},z=()=>{t==="hover"&&!a&&!v&&b.start("hidden")},L=()=>{t==="focus"&&!a&&!v&&b.start("visible")},I=()=>{t==="focus"&&!a&&!v&&b.start("hidden")},{onDrag:R,onDragEnd:B,onDragStart:P,...T}=w;return f.jsx(_.div,{ref:x,custom:j,variants:S,initial:a||v?"visible":"hidden",animate:b,transition:k,onMouseEnter:D,onMouseLeave:z,onFocus:L,onBlur:I,className:u,style:M,...T,children:e})},fm=({children:e,trigger:t="inView",delay:r=0,duration:n=.8,easing:s="easeOut",disabled:a=!1,direction:o="horizontal",perspective:i=1e3,backfaceVisible:l=!1,variants:c,transition:d,className:u="",style:h={},onAnimationStart:m,onAnimationComplete:g,...w})=>{const x=p.useRef(null),b=Ye(),y=ke(x,{once:!0,margin:"0px 0px -10% 0px"}),v=qe(),C=p.useRef(0),S=c||nm,j={direction:o,perspective:i,backfaceVisible:l};p.useEffect(()=>{if(a||v){b.set("visible");return}(async()=>{try{switch(C.current=performance.now(),x.current&&He(x.current),t){case"immediate":te({onStart:m},"start",ie(C.current,n)),await b.start("visible");break;case"inView":y&&(te({onStart:m},"start",ie(C.current,n)),await b.start("visible"));break;case"manual":break;default:await b.start("visible")}x.current&&Xe(x.current),te({onComplete:g},"complete",ie(C.current,n))}catch(N){console.warn("Error in FlipContainer animation:",N),te({onError:console.error},"error",N)}})()},[y,t,b,a,v,n,m,g]);const A=d||{...mt(s,n),delay:r},k=nt(),V={perspective:`${i}px`,transformStyle:"preserve-3d",...k,...h},M=()=>{t==="hover"&&!a&&!v&&b.start("visible")},D=()=>{t==="hover"&&!a&&!v&&b.start("hidden")},z=()=>{t==="focus"&&!a&&!v&&b.start("visible")},L=()=>{t==="focus"&&!a&&!v&&b.start("hidden")},{onDrag:I,onDragEnd:R,onDragStart:B,...P}=w;return f.jsx(_.div,{ref:x,custom:j,variants:S,initial:a||v?"visible":"hidden",animate:b,transition:A,onMouseEnter:M,onMouseLeave:D,onFocus:z,onBlur:L,className:u,style:V,...P,children:e})},pm=({children:e,trigger:t="inView",delay:r=0,duration:n=.6,easing:s="easeOut",disabled:a=!1,staggerDelay:o=.1,staggerDirection:i="normal",childSelector:l="> *",variants:c,transition:d,className:u="",style:h={},onAnimationStart:m,onAnimationComplete:g,...w})=>{const x=p.useRef(null),b=Ye(),y=ke(x,{once:!0,margin:"0px 0px -10% 0px"}),v=qe(),C=p.useRef(0),S=c||sm,j={staggerDelay:o,staggerDirection:i};p.useEffect(()=>{if(a||v){b.set("visible");return}(async()=>{try{switch(C.current=performance.now(),x.current&&(He(x.current),x.current.querySelectorAll(Do(l)).forEach(F=>{F instanceof HTMLElement&&He(F)})),t){case"immediate":te({onStart:m},"start",ie(C.current,n)),await b.start("visible");break;case"inView":y&&(te({onStart:m},"start",ie(C.current,n)),await b.start("visible"));break;case"manual":break;default:await b.start("visible")}x.current&&(Xe(x.current),x.current.querySelectorAll(Do(l)).forEach(F=>{F instanceof HTMLElement&&Xe(F)})),te({onComplete:g},"complete",ie(C.current,n))}catch(E){console.warn("Error in StaggerContainer animation:",E),te({onError:console.error},"error",E)}})()},[y,t,b,a,v,n,m,g,l]);const A=d||{...mt(s,n),delay:r},V={...nt(),...h},M=()=>{t==="hover"&&!a&&!v&&b.start("visible")},D=()=>{t==="hover"&&!a&&!v&&b.start("hidden")},z=()=>{t==="focus"&&!a&&!v&&b.start("visible")},L=()=>{t==="focus"&&!a&&!v&&b.start("hidden")},I=()=>p.Children.map(e,(N,E)=>p.isValidElement(N)?f.jsx(_.div,{variants:am,style:{display:"contents"},children:N},E):N),{onDrag:R,onDragEnd:B,onDragStart:P,...T}=w;return f.jsx(_.div,{ref:x,custom:j,variants:S,initial:a||v?"visible":"hidden",animate:b,transition:A,onMouseEnter:M,onMouseLeave:D,onFocus:z,onBlur:L,className:u,style:V,...T,children:I()})},hm=({children:e,trigger:t="inView",delay:r=0,duration:n=1,easing:s="easeInOut",disabled:a=!1,morphStates:o=[{width:"200px",height:"200px",borderRadius:"0px",backgroundColor:"#3b82f6"},{width:"300px",height:"150px",borderRadius:"20px",backgroundColor:"#ef4444"},{width:"250px",height:"250px",borderRadius:"50%",backgroundColor:"#10b981"}],morphInterval:i=3e3,autoMorph:l=!0,variants:c,transition:d,className:u="",style:h={},onAnimationStart:m,onAnimationComplete:g,...w})=>{const x=p.useRef(null),b=Ye(),y=ke(x,{once:!0,margin:"0px 0px -10% 0px"}),v=qe(),[C,S]=p.useState(0),j=p.useRef(0),A=p.useRef(void 0),k=c||om(o);p.useEffect(()=>{if(a||v){b.set("initial");return}return(async()=>{try{switch(j.current=performance.now(),x.current&&He(x.current),t){case"immediate":te({onStart:m},"start",ie(j.current,n)),await b.start("initial"),V();break;case"inView":y&&(te({onStart:m},"start",ie(j.current,n)),await b.start("initial"),V());break;case"manual":await b.start("initial");break;default:await b.start("initial"),V()}te({onComplete:g},"complete",ie(j.current,n))}catch(O){console.warn("Error in MorphingContainer animation:",O),te({onError:console.error},"error",O)}})(),()=>{A.current&&clearInterval(A.current)}},[y,t,b,a,v,n,m,g]);const V=()=>{!l||o.length<=1||(A.current=window.setInterval(()=>{S($=>{const O=($+1)%o.length;return b.start(`morph${O}`),O})},i))},M=$=>{$>=0&&$<o.length&&(S($),b.start(`morph${$}`))},D=d||{...mt(s,n),delay:r},L={display:"flex",alignItems:"center",justifyContent:"center",...nt(),...h},I=()=>{if(t==="hover"&&!a&&!v){const $=(C+1)%o.length;M($)}},R=()=>{t==="hover"&&!a&&!v&&M(0)},B=()=>{if(t==="focus"&&!a&&!v){const $=(C+1)%o.length;M($)}},P=()=>{t==="focus"&&!a&&!v&&M(0)};p.useEffect(()=>()=>{x.current&&Xe(x.current),A.current&&clearInterval(A.current)},[]);const{onDrag:T,onDragEnd:N,onDragStart:E,...F}=w;return f.jsx(_.div,{ref:x,variants:k,initial:"initial",animate:b,transition:D,onMouseEnter:I,onMouseLeave:R,onFocus:B,onBlur:P,className:u,style:L,...F,children:e})},mm=e=>{const[t,r]=p.useState(0),n=Ye();return{currentIndex:t,controls:n,morphToNext:()=>{const i=(t+1)%e.length;r(i),n.start(`morph${i}`)},morphToPrevious:()=>{const i=t===0?e.length-1:t-1;r(i),n.start(`morph${i}`)},morphToIndex:i=>{i>=0&&i<e.length&&(r(i),n.start(`morph${i}`))}}},gm=({children:e,trigger:t="inView",delay:r=0,duration:n=1,easing:s="easeInOut",disabled:a=!1,speed:o=.5,direction:i="vertical",offset:l=0,enableOnMobile:c=!1,variants:d,transition:u,className:h="",style:m={},onAnimationStart:g,onAnimationComplete:w,...x})=>{const b=p.useRef(null),y=Ye(),v=ke(b,{once:!0,margin:"0px 0px -10% 0px"}),C=qe(),[S,j]=p.useState(!1),A=p.useRef(0),{scrollY:k}=Ll(),V=d||im;p.useEffect(()=>{const Y=()=>{j(window.innerWidth<=768)};return Y(),window.addEventListener("resize",Y),()=>{window.removeEventListener("resize",Y)}},[]);const M=At(k,[0,1e3],[0,-o*100]),D=At(k,[0,1e3],[0,-o*100]),z=Rr(M,{stiffness:100,damping:30,mass:1}),L=Rr(D,{stiffness:100,damping:30,mass:1}),I=!a&&!C&&(c||!S);p.useEffect(()=>{if(a||C||S&&!c){y.set("visible");return}(async()=>{try{switch(A.current=performance.now(),b.current&&He(b.current),t){case"immediate":te({onStart:g},"start",ie(A.current,n)),await y.start("visible");break;case"inView":v&&(te({onStart:g},"start",ie(A.current,n)),await y.start("visible"));break;case"manual":await y.start("hidden");break;default:await y.start("visible")}te({onComplete:w},"complete",ie(A.current,n))}catch(Z){console.warn("Error in ParallaxContainer animation:",Z),te({onError:console.error},"error",Z)}})()},[v,t,y,a,C,S,c,n,g,w]);const R=u||{...mt(s,n),delay:r},P={...nt(),...m},T=()=>{if(!I)return{};switch(i){case"horizontal":return{x:L};case"both":return{x:L,y:z};case"vertical":default:return{y:z}}},N=()=>{t==="hover"&&!a&&!C&&y.start("visible")},E=()=>{t==="hover"&&!a&&!C&&y.start("hidden")},F=()=>{t==="focus"&&!a&&!C&&y.start("visible")},$=()=>{t==="focus"&&!a&&!C&&y.start("hidden")};p.useEffect(()=>()=>{b.current&&Xe(b.current)},[]);const{onDrag:O,onDragEnd:K,onDragStart:W,...J}=x;return f.jsx(_.div,{ref:b,variants:V,initial:a||C?"visible":"hidden",animate:y,transition:R,style:{...P,...T()},onMouseEnter:N,onMouseLeave:E,onFocus:F,onBlur:$,className:h,...J,children:e})},bm=e=>{const{scrollY:t}=Ll(),[r,n]=p.useState(!1),s=qe(),{speed:a=.5,direction:o="vertical",enableOnMobile:i=!1}=e||{};p.useEffect(()=>{const g=()=>{n(window.innerWidth<=768)};return g(),window.addEventListener("resize",g),()=>{window.removeEventListener("resize",g)}},[]);const l=!s&&(i||!r),c=At(t,[0,1e3],[0,-a*100]),d=At(t,[0,1e3],[0,-a*100]),u=Rr(c,{stiffness:100,damping:30,mass:1}),h=Rr(d,{stiffness:100,damping:30,mass:1});return{isActive:l,isMobile:r,scrollY:t,transformValue:(()=>{if(!l)return{};switch(o){case"horizontal":return{x:h};case"both":return{x:h,y:u};case"vertical":default:return{y:u}}})(),smoothY:u,smoothX:h}},It={smooth:{type:"tween",duration:.3,ease:"easeOut"},bounce:{type:"spring",damping:10,stiffness:400,mass:1}},ym={initial:(e=0)=>({opacity:e}),animate:(e=1)=>({opacity:e}),exit:{opacity:0}},xm={initial:({direction:e="up",distance:t=50})=>{switch(e){case"up":return{y:t,opacity:0};case"down":return{y:-t,opacity:0};case"left":return{x:t,opacity:0};case"right":return{x:-t,opacity:0};default:return{y:t,opacity:0}}},animate:{x:0,y:0,opacity:1},exit:({direction:e="up",distance:t=50})=>{switch(e){case"up":return{y:-t,opacity:0};case"down":return{y:t,opacity:0};case"left":return{x:-t,opacity:0};case"right":return{x:t,opacity:0};default:return{y:-t,opacity:0}}}},vm={initial:(e=0)=>({scale:e,opacity:0}),animate:(e=1)=>({scale:e,opacity:1}),exit:{scale:0,opacity:0},hover:{scale:1.05},tap:{scale:.95}},wm={initial:({direction:e="clockwise",degrees:t=180})=>({rotate:e==="clockwise"?-t:t,opacity:0}),animate:{rotate:0,opacity:1},exit:({direction:e="clockwise",degrees:t=180})=>({rotate:e==="clockwise"?t:-t,opacity:0})},Cm={initial:{y:0,opacity:0},animate:({amplitude:e=20,frequency:t=2})=>({y:[0,-e,0,-e*.5,0],opacity:1,transition:{duration:.6,times:[0,.2,.4,.6,1],repeat:t-1}}),exit:{y:0,opacity:0}},km=({children:e,className:t="",delay:r=0,duration:n=.3,disabled:s=!1,trigger:a="inView",once:o=!0,threshold:i=.1,from:l=0,to:c=1,style:d})=>{const u=p.useRef(null),h=ke(u,{once:o,amount:i});if(s)return f.jsx("div",{className:t,style:d,children:e});const m=()=>{switch(a){case"inView":return h?"animate":"initial";case"manual":return"initial";case"hover":case"tap":return"animate";default:return"animate"}},g={...It.smooth,duration:n,delay:r};return f.jsx(_.div,{ref:u,className:t,style:d,variants:ym,initial:"initial",animate:m(),exit:"exit",custom:{from:l,to:c},transition:g,whileHover:a==="hover"?"animate":void 0,whileTap:a==="tap"?"animate":void 0,children:e})},Sm=({children:e,className:t="",delay:r=0,duration:n=.3,disabled:s=!1,trigger:a="inView",once:o=!0,threshold:i=.1,direction:l="up",distance:c=50,style:d})=>{const u=p.useRef(null),h=ke(u,{once:o,amount:i});if(s)return f.jsx("div",{className:t,style:d,children:e});const m=()=>{switch(a){case"inView":return h?"animate":"initial";case"manual":return"initial";case"hover":case"tap":return"animate";default:return"animate"}},g={...It.smooth,duration:n,delay:r},w={direction:l,distance:c};return f.jsx(_.div,{ref:u,className:t,style:d,variants:xm,initial:"initial",animate:m(),exit:"exit",custom:w,transition:g,whileHover:a==="hover"?"animate":void 0,whileTap:a==="tap"?"animate":void 0,children:e})},jm=({children:e,className:t="",delay:r=0,duration:n=.3,disabled:s=!1,trigger:a="inView",once:o=!0,threshold:i=.1,from:l=0,to:c=1,transformOrigin:d="center",style:u})=>{const h=p.useRef(null),m=ke(h,{once:o,amount:i});if(s)return f.jsx("div",{className:t,style:u,children:e});const g=()=>{switch(a){case"inView":return m?"animate":"initial";case"manual":return"initial";case"hover":case"tap":return"animate";default:return"animate"}},w={...It.bounce,duration:n,delay:r},x={from:l,to:c},b={...u,transformOrigin:d};return f.jsx(_.div,{ref:h,className:t,style:b,variants:vm,initial:"initial",animate:g(),exit:"exit",custom:x,transition:w,whileHover:a==="hover"?"hover":void 0,whileTap:a==="tap"?"tap":void 0,children:e})},Tm=({children:e,className:t="",delay:r=0,duration:n=.5,disabled:s=!1,trigger:a="inView",once:o=!0,threshold:i=.1,direction:l="clockwise",degrees:c=180,transformOrigin:d="center",style:u})=>{const h=p.useRef(null),m=ke(h,{once:o,amount:i});if(s)return f.jsx("div",{className:t,style:u,children:e});const g=()=>{switch(a){case"inView":return m?"animate":"initial";case"manual":return"initial";case"hover":case"tap":return"animate";default:return"animate"}},w={...It.smooth,duration:n,delay:r},x={direction:l,degrees:c},b={...u,transformOrigin:d};return f.jsx(_.div,{ref:h,className:t,style:b,variants:wm,initial:"initial",animate:g(),exit:"exit",custom:x,transition:w,whileHover:a==="hover"?"animate":void 0,whileTap:a==="tap"?"animate":void 0,children:e})},Am=({children:e,className:t="",delay:r=0,duration:n=.6,disabled:s=!1,trigger:a="inView",once:o=!0,threshold:i=.1,amplitude:l=20,frequency:c=1,damping:d=.8,style:u})=>{const h=p.useRef(null),m=ke(h,{once:o,amount:i});if(s)return f.jsx("div",{className:t,style:u,children:e});const g=()=>{switch(a){case"inView":return m?"animate":"initial";case"manual":return"initial";case"hover":case"tap":return"animate";default:return"animate"}},w={...It.bounce,duration:n,delay:r,damping:d},x={amplitude:l,frequency:c};return f.jsx(_.div,{ref:h,className:t,style:u,variants:Cm,initial:"initial",animate:g(),exit:"exit",custom:x,transition:w,whileHover:a==="hover"?"animate":void 0,whileTap:a==="tap"?"animate":void 0,children:e})},Mm=({children:e,className:t="",staggerDelay:r=.1,animationType:n="fadeIn",direction:s="up",duration:a=.3,threshold:o=.1})=>{const i=p.useRef(null),l=ke(i,{once:!0,amount:o}),c={initial:{},animate:{transition:{staggerChildren:r}}},u=(()=>{switch(n){case"slideIn":return{initial:(()=>{switch(s){case"up":return{y:50,opacity:0};case"down":return{y:-50,opacity:0};case"left":return{x:50,opacity:0};case"right":return{x:-50,opacity:0};default:return{y:50,opacity:0}}})(),animate:{x:0,y:0,opacity:1}};case"scaleIn":return{initial:{scale:0,opacity:0},animate:{scale:1,opacity:1}};case"fadeIn":default:return{initial:{opacity:0},animate:{opacity:1}}}})(),h={...It.smooth,duration:a};return f.jsx(_.div,{ref:i,className:t,variants:c,initial:"initial",animate:l?"animate":"initial",children:e.map((m,g)=>f.jsx(_.div,{variants:u,transition:h,children:m},g))})};var Vm=/\s+/g,Gn=e=>typeof e!="string"||!e?e:e.replace(Vm," ").trim(),Dr=(...e)=>{let t=[],r=n=>{if(!n&&n!==0&&n!==0n)return;if(Array.isArray(n)){for(let a=0,o=n.length;a<o;a++)r(n[a]);return}let s=typeof n;if(s==="string"||s==="number"||s==="bigint"){if(s==="number"&&n!==n)return;t.push(String(n))}else if(s==="object"){let a=Object.keys(n);for(let o=0,i=a.length;o<i;o++){let l=a[o];n[l]&&t.push(l)}}};for(let n=0,s=e.length;n<s;n++){let a=e[n];a!=null&&r(a)}return t.length>0?Gn(t.join(" ")):void 0},Bo=e=>e===!1?"false":e===!0?"true":e===0?"0":e,ve=e=>{if(!e||typeof e!="object")return!0;for(let t in e)return!1;return!0},Pm=(e,t)=>{if(e===t)return!0;if(!e||!t)return!1;let r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let s=0;s<r.length;s++){let a=r[s];if(!n.includes(a)||e[a]!==t[a])return!1}return!0},Lo=(e,t)=>{for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r)){let n=t[r];r in e?e[r]=Dr(e[r],n):e[r]=n}return e},Xl=(e,t)=>{for(let r=0;r<e.length;r++){let n=e[r];Array.isArray(n)?Xl(n,t):n&&t.push(n)}},Yl=(...e)=>{let t=[];Xl(e,t);let r=[];for(let n=0;n<t.length;n++)t[n]&&r.push(t[n]);return r},Un=(e,t)=>{let r={};for(let n in e){let s=e[n];if(n in t){let a=t[n];Array.isArray(s)||Array.isArray(a)?r[n]=Yl(a,s):typeof s=="object"&&typeof a=="object"&&s&&a?r[n]=Un(s,a):r[n]=a+" "+s}else r[n]=s}for(let n in t)n in e||(r[n]=t[n]);return r},Em={twMerge:!0,twMergeConfig:{},responsiveVariants:!1};function Im(){let e=null,t={},r=!1;return{get cachedTwMerge(){return e},set cachedTwMerge(n){e=n},get cachedTwMergeConfig(){return t},set cachedTwMergeConfig(n){t=n},get didTwMergeConfigChange(){return r},set didTwMergeConfigChange(n){r=n},reset(){e=null,t={},r=!1}}}var Ue=Im(),Nm=e=>{let t=(r,n)=>{let{extend:s=null,slots:a={},variants:o={},compoundVariants:i=[],compoundSlots:l=[],defaultVariants:c={}}=r,d={...Em,...n},u=s?.base?Dr(s.base,r?.base):r?.base,h=s?.variants&&!ve(s.variants)?Un(o,s.variants):o,m=s?.defaultVariants&&!ve(s.defaultVariants)?{...s.defaultVariants,...c}:c;!ve(d.twMergeConfig)&&!Pm(d.twMergeConfig,Ue.cachedTwMergeConfig)&&(Ue.didTwMergeConfigChange=!0,Ue.cachedTwMergeConfig=d.twMergeConfig);let g=ve(s?.slots),w=ve(a)?{}:{base:Dr(r?.base,g&&s?.base),...a},x=g?w:Lo({...s?.slots},ve(w)?{base:r?.base}:w),b=ve(s?.compoundVariants)?i:Yl(s?.compoundVariants,i),y=C=>{if(ve(h)&&ve(a)&&g)return e(u,C?.class,C?.className)(d);if(b&&!Array.isArray(b))throw new TypeError(`The "compoundVariants" prop must be an array. Received: ${typeof b}`);if(l&&!Array.isArray(l))throw new TypeError(`The "compoundSlots" prop must be an array. Received: ${typeof l}`);let S=(I,R,B=[],P)=>{let T=B;if(typeof R=="string"){let N=Gn(R).split(" ");for(let E=0;E<N.length;E++)T.push(`${I}:${N[E]}`)}else if(Array.isArray(R))for(let N=0;N<R.length;N++)T.push(`${I}:${R[N]}`);else if(typeof R=="object"&&typeof P=="string"&&P in R){let N=R[P];if(N&&typeof N=="string"){let E=Gn(N).split(" "),F=[];for(let $=0;$<E.length;$++)F.push(`${I}:${E[$]}`);T[P]=T[P]?T[P].concat(F):F}else if(Array.isArray(N)&&N.length>0){let E=[];for(let F=0;F<N.length;F++)E.push(`${I}:${N[F]}`);T[P]=E}}return T},j=(I,R=h,B=null,P=null)=>{let T=R[I];if(!T||ve(T))return null;let N=P?.[I]??C?.[I];if(N===null)return null;let E=Bo(N),F=Array.isArray(d.responsiveVariants)&&d.responsiveVariants.length>0||d.responsiveVariants===!0,$=m?.[I],O=[];if(typeof E=="object"&&F)for(let[J,Y]of Object.entries(E)){let Z=T[Y];if(J==="initial"){$=Y;continue}Array.isArray(d.responsiveVariants)&&!d.responsiveVariants.includes(J)||(O=S(J,Z,O,B))}let K=E!=null&&typeof E!="object"?E:Bo($),W=T[K||"false"];return typeof O=="object"&&typeof B=="string"&&O[B]?Lo(O,W):O.length>0?(O.push(W),B==="base"?O.join(" "):O):W},A=()=>{if(!h)return null;let I=Object.keys(h),R=[];for(let B=0;B<I.length;B++){let P=j(I[B],h);P&&R.push(P)}return R},k=(I,R)=>{if(!h||typeof h!="object")return null;let B=[];for(let P in h){let T=j(P,h,I,R),N=I==="base"&&typeof T=="string"?T:T&&T[I];N&&B.push(N)}return B},V={};for(let I in C){let R=C[I];R!==void 0&&(V[I]=R)}let M=(I,R)=>{let B=typeof C?.[I]=="object"?{[I]:C[I]?.initial}:{};return{...m,...V,...B,...R}},D=(I=[],R)=>{let B=[],P=I.length;for(let T=0;T<P;T++){let{class:N,className:E,...F}=I[T],$=!0,O=M(null,R);for(let K in F){let W=F[K],J=O[K];if(Array.isArray(W)){if(!W.includes(J)){$=!1;break}}else{if((W==null||W===!1)&&(J==null||J===!1))continue;if(J!==W){$=!1;break}}}$&&(N&&B.push(N),E&&B.push(E))}return B},z=I=>{let R=D(b,I);if(!Array.isArray(R))return R;let B={},P=e;for(let T=0;T<R.length;T++){let N=R[T];if(typeof N=="string")B.base=P(B.base,N)(d);else if(typeof N=="object")for(let E in N)B[E]=P(B[E],N[E])(d)}return B},L=I=>{if(l.length<1)return null;let R={},B=M(null,I);for(let P=0;P<l.length;P++){let{slots:T=[],class:N,className:E,...F}=l[P];if(!ve(F)){let $=!0;for(let O in F){let K=B[O],W=F[O];if(K===void 0||(Array.isArray(W)?!W.includes(K):W!==K)){$=!1;break}}if(!$)continue}for(let $=0;$<T.length;$++){let O=T[$];R[O]||(R[O]=[]),R[O].push([N,E])}}return R};if(!ve(a)||!g){let I={};if(typeof x=="object"&&!ve(x)){let R=e;for(let B in x)I[B]=P=>{let T=z(P),N=L(P);return R(x[B],k(B,P),T?T[B]:void 0,N?N[B]:void 0,P?.class,P?.className)(d)}}return I}return e(u,A(),D(b),C?.class,C?.className)(d)},v=()=>{if(!(!h||typeof h!="object"))return Object.keys(h)};return y.variantKeys=v(),y.extend=s,y.base=u,y.slots=x,y.variants=h,y.defaultVariants=m,y.compoundSlots=l,y.compoundVariants=b,y};return{tv:t,createTV:r=>(n,s)=>t(n,s?Un(r,s):r)}};const Fs="-",Rm=e=>{const t=Bm(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:o=>{const i=o.split(Fs);return i[0]===""&&i.length!==1&&i.shift(),ql(i,t)||Dm(o)},getConflictingClassGroupIds:(o,i)=>{const l=r[o]||[];return i&&n[o]?[...l,...n[o]]:l}}},ql=(e,t)=>{if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),s=n?ql(e.slice(1),n):void 0;if(s)return s;if(t.validators.length===0)return;const a=e.join(Fs);return t.validators.find(({validator:o})=>o(a))?.classGroupId},Oo=/^\[(.+)\]$/,Dm=e=>{if(Oo.test(e)){const t=Oo.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Bm=e=>{const{theme:t,classGroups:r}=e,n={nextPart:new Map,validators:[]};for(const s in r)Kn(r[s],n,s,t);return n},Kn=(e,t,r,n)=>{e.forEach(s=>{if(typeof s=="string"){const a=s===""?t:zo(t,s);a.classGroupId=r;return}if(typeof s=="function"){if(Lm(s)){Kn(s(n),t,r,n);return}t.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([a,o])=>{Kn(o,zo(t,a),r,n)})})},zo=(e,t)=>{let r=e;return t.split(Fs).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},Lm=e=>e.isThemeGetter,Om=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const s=(a,o)=>{r.set(a,o),t++,t>e&&(t=0,n=r,r=new Map)};return{get(a){let o=r.get(a);if(o!==void 0)return o;if((o=n.get(a))!==void 0)return s(a,o),o},set(a,o){r.has(a)?r.set(a,o):s(a,o)}}},Hn="!",Xn=":",zm=Xn.length,$m=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=s=>{const a=[];let o=0,i=0,l=0,c;for(let g=0;g<s.length;g++){let w=s[g];if(o===0&&i===0){if(w===Xn){a.push(s.slice(l,g)),l=g+zm;continue}if(w==="/"){c=g;continue}}w==="["?o++:w==="]"?o--:w==="("?i++:w===")"&&i--}const d=a.length===0?s:s.substring(l),u=Fm(d),h=u!==d,m=c&&c>l?c-l:void 0;return{modifiers:a,hasImportantModifier:h,baseClassName:u,maybePostfixModifierPosition:m}};if(t){const s=t+Xn,a=n;n=o=>o.startsWith(s)?a(o.substring(s.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:o,maybePostfixModifierPosition:void 0}}if(r){const s=n;n=a=>r({className:a,parseClassName:s})}return n},Fm=e=>e.endsWith(Hn)?e.substring(0,e.length-1):e.startsWith(Hn)?e.substring(1):e,Wm=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(n=>[n,!0]));return n=>{if(n.length<=1)return n;const s=[];let a=[];return n.forEach(o=>{o[0]==="["||t[o]?(s.push(...a.sort(),o),a=[]):a.push(o)}),s.push(...a.sort()),s}},_m=e=>({cache:Om(e.cacheSize),parseClassName:$m(e),sortModifiers:Wm(e),...Rm(e)}),Gm=/\s+/,Um=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s,sortModifiers:a}=t,o=[],i=e.trim().split(Gm);let l="";for(let c=i.length-1;c>=0;c-=1){const d=i[c],{isExternal:u,modifiers:h,hasImportantModifier:m,baseClassName:g,maybePostfixModifierPosition:w}=r(d);if(u){l=d+(l.length>0?" "+l:l);continue}let x=!!w,b=n(x?g.substring(0,w):g);if(!b){if(!x){l=d+(l.length>0?" "+l:l);continue}if(b=n(g),!b){l=d+(l.length>0?" "+l:l);continue}x=!1}const y=a(h).join(":"),v=m?y+Hn:y,C=v+b;if(o.includes(C))continue;o.push(C);const S=s(b,x);for(let j=0;j<S.length;++j){const A=S[j];o.push(v+A)}l=d+(l.length>0?" "+l:l)}return l};function Km(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Zl(t))&&(n&&(n+=" "),n+=r);return n}const Zl=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Zl(e[n]))&&(r&&(r+=" "),r+=t);return r};function Yn(e,...t){let r,n,s,a=o;function o(l){const c=t.reduce((d,u)=>u(d),e());return r=_m(c),n=r.cache.get,s=r.cache.set,a=i,i(l)}function i(l){const c=n(l);if(c)return c;const d=Um(l,r);return s(l,d),d}return function(){return a(Km.apply(null,arguments))}}const pe=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},Jl=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ql=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Hm=/^\d+\/\d+$/,Xm=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ym=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,qm=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Zm=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Jm=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,gt=e=>Hm.test(e),ee=e=>!!e&&!Number.isNaN(Number(e)),Je=e=>!!e&&Number.isInteger(Number(e)),gn=e=>e.endsWith("%")&&ee(e.slice(0,-1)),Ge=e=>Xm.test(e),Qm=()=>!0,eg=e=>Ym.test(e)&&!qm.test(e),ec=()=>!1,tg=e=>Zm.test(e),rg=e=>Jm.test(e),ng=e=>!G(e)&&!U(e),sg=e=>Nt(e,nc,ec),G=e=>Jl.test(e),it=e=>Nt(e,sc,eg),bn=e=>Nt(e,cg,ee),$o=e=>Nt(e,tc,ec),ag=e=>Nt(e,rc,rg),br=e=>Nt(e,ac,tg),U=e=>Ql.test(e),$t=e=>Rt(e,sc),og=e=>Rt(e,dg),Fo=e=>Rt(e,tc),ig=e=>Rt(e,nc),lg=e=>Rt(e,rc),yr=e=>Rt(e,ac,!0),Nt=(e,t,r)=>{const n=Jl.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},Rt=(e,t,r=!1)=>{const n=Ql.exec(e);return n?n[1]?t(n[1]):r:!1},tc=e=>e==="position"||e==="percentage",rc=e=>e==="image"||e==="url",nc=e=>e==="length"||e==="size"||e==="bg-size",sc=e=>e==="length",cg=e=>e==="number",dg=e=>e==="family-name",ac=e=>e==="shadow",qn=()=>{const e=pe("color"),t=pe("font"),r=pe("text"),n=pe("font-weight"),s=pe("tracking"),a=pe("leading"),o=pe("breakpoint"),i=pe("container"),l=pe("spacing"),c=pe("radius"),d=pe("shadow"),u=pe("inset-shadow"),h=pe("text-shadow"),m=pe("drop-shadow"),g=pe("blur"),w=pe("perspective"),x=pe("aspect"),b=pe("ease"),y=pe("animate"),v=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],S=()=>[...C(),U,G],j=()=>["auto","hidden","clip","visible","scroll"],A=()=>["auto","contain","none"],k=()=>[U,G,l],V=()=>[gt,"full","auto",...k()],M=()=>[Je,"none","subgrid",U,G],D=()=>["auto",{span:["full",Je,U,G]},Je,U,G],z=()=>[Je,"auto",U,G],L=()=>["auto","min","max","fr",U,G],I=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],R=()=>["start","end","center","stretch","center-safe","end-safe"],B=()=>["auto",...k()],P=()=>[gt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...k()],T=()=>[e,U,G],N=()=>[...C(),Fo,$o,{position:[U,G]}],E=()=>["no-repeat",{repeat:["","x","y","space","round"]}],F=()=>["auto","cover","contain",ig,sg,{size:[U,G]}],$=()=>[gn,$t,it],O=()=>["","none","full",c,U,G],K=()=>["",ee,$t,it],W=()=>["solid","dashed","dotted","double"],J=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Y=()=>[ee,gn,Fo,$o],Z=()=>["","none",g,U,G],ne=()=>["none",ee,U,G],ae=()=>["none",ee,U,G],Te=()=>[ee,U,G],he=()=>[gt,"full",...k()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ge],breakpoint:[Ge],color:[Qm],container:[Ge],"drop-shadow":[Ge],ease:["in","out","in-out"],font:[ng],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ge],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ge],shadow:[Ge],spacing:["px",ee],text:[Ge],"text-shadow":[Ge],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",gt,G,U,x]}],container:["container"],columns:[{columns:[ee,G,U,i]}],"break-after":[{"break-after":v()}],"break-before":[{"break-before":v()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:S()}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:V()}],"inset-x":[{"inset-x":V()}],"inset-y":[{"inset-y":V()}],start:[{start:V()}],end:[{end:V()}],top:[{top:V()}],right:[{right:V()}],bottom:[{bottom:V()}],left:[{left:V()}],visibility:["visible","invisible","collapse"],z:[{z:[Je,"auto",U,G]}],basis:[{basis:[gt,"full","auto",i,...k()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ee,gt,"auto","initial","none",G]}],grow:[{grow:["",ee,U,G]}],shrink:[{shrink:["",ee,U,G]}],order:[{order:[Je,"first","last","none",U,G]}],"grid-cols":[{"grid-cols":M()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":z()}],"col-end":[{"col-end":z()}],"grid-rows":[{"grid-rows":M()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":z()}],"row-end":[{"row-end":z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":L()}],"auto-rows":[{"auto-rows":L()}],gap:[{gap:k()}],"gap-x":[{"gap-x":k()}],"gap-y":[{"gap-y":k()}],"justify-content":[{justify:[...I(),"normal"]}],"justify-items":[{"justify-items":[...R(),"normal"]}],"justify-self":[{"justify-self":["auto",...R()]}],"align-content":[{content:["normal",...I()]}],"align-items":[{items:[...R(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...R(),{baseline:["","last"]}]}],"place-content":[{"place-content":I()}],"place-items":[{"place-items":[...R(),"baseline"]}],"place-self":[{"place-self":["auto",...R()]}],p:[{p:k()}],px:[{px:k()}],py:[{py:k()}],ps:[{ps:k()}],pe:[{pe:k()}],pt:[{pt:k()}],pr:[{pr:k()}],pb:[{pb:k()}],pl:[{pl:k()}],m:[{m:B()}],mx:[{mx:B()}],my:[{my:B()}],ms:[{ms:B()}],me:[{me:B()}],mt:[{mt:B()}],mr:[{mr:B()}],mb:[{mb:B()}],ml:[{ml:B()}],"space-x":[{"space-x":k()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":k()}],"space-y-reverse":["space-y-reverse"],size:[{size:P()}],w:[{w:[i,"screen",...P()]}],"min-w":[{"min-w":[i,"screen","none",...P()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[o]},...P()]}],h:[{h:["screen","lh",...P()]}],"min-h":[{"min-h":["screen","lh","none",...P()]}],"max-h":[{"max-h":["screen","lh",...P()]}],"font-size":[{text:["base",r,$t,it]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,U,bn]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",gn,G]}],"font-family":[{font:[og,G,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,U,G]}],"line-clamp":[{"line-clamp":[ee,"none",U,bn]}],leading:[{leading:[a,...k()]}],"list-image":[{"list-image":["none",U,G]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",U,G]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:T()}],"text-color":[{text:T()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...W(),"wavy"]}],"text-decoration-thickness":[{decoration:[ee,"from-font","auto",U,it]}],"text-decoration-color":[{decoration:T()}],"underline-offset":[{"underline-offset":[ee,"auto",U,G]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",U,G]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",U,G]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:N()}],"bg-repeat":[{bg:E()}],"bg-size":[{bg:F()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Je,U,G],radial:["",U,G],conic:[Je,U,G]},lg,ag]}],"bg-color":[{bg:T()}],"gradient-from-pos":[{from:$()}],"gradient-via-pos":[{via:$()}],"gradient-to-pos":[{to:$()}],"gradient-from":[{from:T()}],"gradient-via":[{via:T()}],"gradient-to":[{to:T()}],rounded:[{rounded:O()}],"rounded-s":[{"rounded-s":O()}],"rounded-e":[{"rounded-e":O()}],"rounded-t":[{"rounded-t":O()}],"rounded-r":[{"rounded-r":O()}],"rounded-b":[{"rounded-b":O()}],"rounded-l":[{"rounded-l":O()}],"rounded-ss":[{"rounded-ss":O()}],"rounded-se":[{"rounded-se":O()}],"rounded-ee":[{"rounded-ee":O()}],"rounded-es":[{"rounded-es":O()}],"rounded-tl":[{"rounded-tl":O()}],"rounded-tr":[{"rounded-tr":O()}],"rounded-br":[{"rounded-br":O()}],"rounded-bl":[{"rounded-bl":O()}],"border-w":[{border:K()}],"border-w-x":[{"border-x":K()}],"border-w-y":[{"border-y":K()}],"border-w-s":[{"border-s":K()}],"border-w-e":[{"border-e":K()}],"border-w-t":[{"border-t":K()}],"border-w-r":[{"border-r":K()}],"border-w-b":[{"border-b":K()}],"border-w-l":[{"border-l":K()}],"divide-x":[{"divide-x":K()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":K()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...W(),"hidden","none"]}],"divide-style":[{divide:[...W(),"hidden","none"]}],"border-color":[{border:T()}],"border-color-x":[{"border-x":T()}],"border-color-y":[{"border-y":T()}],"border-color-s":[{"border-s":T()}],"border-color-e":[{"border-e":T()}],"border-color-t":[{"border-t":T()}],"border-color-r":[{"border-r":T()}],"border-color-b":[{"border-b":T()}],"border-color-l":[{"border-l":T()}],"divide-color":[{divide:T()}],"outline-style":[{outline:[...W(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ee,U,G]}],"outline-w":[{outline:["",ee,$t,it]}],"outline-color":[{outline:T()}],shadow:[{shadow:["","none",d,yr,br]}],"shadow-color":[{shadow:T()}],"inset-shadow":[{"inset-shadow":["none",u,yr,br]}],"inset-shadow-color":[{"inset-shadow":T()}],"ring-w":[{ring:K()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:T()}],"ring-offset-w":[{"ring-offset":[ee,it]}],"ring-offset-color":[{"ring-offset":T()}],"inset-ring-w":[{"inset-ring":K()}],"inset-ring-color":[{"inset-ring":T()}],"text-shadow":[{"text-shadow":["none",h,yr,br]}],"text-shadow-color":[{"text-shadow":T()}],opacity:[{opacity:[ee,U,G]}],"mix-blend":[{"mix-blend":[...J(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":J()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ee]}],"mask-image-linear-from-pos":[{"mask-linear-from":Y()}],"mask-image-linear-to-pos":[{"mask-linear-to":Y()}],"mask-image-linear-from-color":[{"mask-linear-from":T()}],"mask-image-linear-to-color":[{"mask-linear-to":T()}],"mask-image-t-from-pos":[{"mask-t-from":Y()}],"mask-image-t-to-pos":[{"mask-t-to":Y()}],"mask-image-t-from-color":[{"mask-t-from":T()}],"mask-image-t-to-color":[{"mask-t-to":T()}],"mask-image-r-from-pos":[{"mask-r-from":Y()}],"mask-image-r-to-pos":[{"mask-r-to":Y()}],"mask-image-r-from-color":[{"mask-r-from":T()}],"mask-image-r-to-color":[{"mask-r-to":T()}],"mask-image-b-from-pos":[{"mask-b-from":Y()}],"mask-image-b-to-pos":[{"mask-b-to":Y()}],"mask-image-b-from-color":[{"mask-b-from":T()}],"mask-image-b-to-color":[{"mask-b-to":T()}],"mask-image-l-from-pos":[{"mask-l-from":Y()}],"mask-image-l-to-pos":[{"mask-l-to":Y()}],"mask-image-l-from-color":[{"mask-l-from":T()}],"mask-image-l-to-color":[{"mask-l-to":T()}],"mask-image-x-from-pos":[{"mask-x-from":Y()}],"mask-image-x-to-pos":[{"mask-x-to":Y()}],"mask-image-x-from-color":[{"mask-x-from":T()}],"mask-image-x-to-color":[{"mask-x-to":T()}],"mask-image-y-from-pos":[{"mask-y-from":Y()}],"mask-image-y-to-pos":[{"mask-y-to":Y()}],"mask-image-y-from-color":[{"mask-y-from":T()}],"mask-image-y-to-color":[{"mask-y-to":T()}],"mask-image-radial":[{"mask-radial":[U,G]}],"mask-image-radial-from-pos":[{"mask-radial-from":Y()}],"mask-image-radial-to-pos":[{"mask-radial-to":Y()}],"mask-image-radial-from-color":[{"mask-radial-from":T()}],"mask-image-radial-to-color":[{"mask-radial-to":T()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":C()}],"mask-image-conic-pos":[{"mask-conic":[ee]}],"mask-image-conic-from-pos":[{"mask-conic-from":Y()}],"mask-image-conic-to-pos":[{"mask-conic-to":Y()}],"mask-image-conic-from-color":[{"mask-conic-from":T()}],"mask-image-conic-to-color":[{"mask-conic-to":T()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:N()}],"mask-repeat":[{mask:E()}],"mask-size":[{mask:F()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",U,G]}],filter:[{filter:["","none",U,G]}],blur:[{blur:Z()}],brightness:[{brightness:[ee,U,G]}],contrast:[{contrast:[ee,U,G]}],"drop-shadow":[{"drop-shadow":["","none",m,yr,br]}],"drop-shadow-color":[{"drop-shadow":T()}],grayscale:[{grayscale:["",ee,U,G]}],"hue-rotate":[{"hue-rotate":[ee,U,G]}],invert:[{invert:["",ee,U,G]}],saturate:[{saturate:[ee,U,G]}],sepia:[{sepia:["",ee,U,G]}],"backdrop-filter":[{"backdrop-filter":["","none",U,G]}],"backdrop-blur":[{"backdrop-blur":Z()}],"backdrop-brightness":[{"backdrop-brightness":[ee,U,G]}],"backdrop-contrast":[{"backdrop-contrast":[ee,U,G]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ee,U,G]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ee,U,G]}],"backdrop-invert":[{"backdrop-invert":["",ee,U,G]}],"backdrop-opacity":[{"backdrop-opacity":[ee,U,G]}],"backdrop-saturate":[{"backdrop-saturate":[ee,U,G]}],"backdrop-sepia":[{"backdrop-sepia":["",ee,U,G]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":k()}],"border-spacing-x":[{"border-spacing-x":k()}],"border-spacing-y":[{"border-spacing-y":k()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",U,G]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ee,"initial",U,G]}],ease:[{ease:["linear","initial",b,U,G]}],delay:[{delay:[ee,U,G]}],animate:[{animate:["none",y,U,G]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,U,G]}],"perspective-origin":[{"perspective-origin":S()}],rotate:[{rotate:ne()}],"rotate-x":[{"rotate-x":ne()}],"rotate-y":[{"rotate-y":ne()}],"rotate-z":[{"rotate-z":ne()}],scale:[{scale:ae()}],"scale-x":[{"scale-x":ae()}],"scale-y":[{"scale-y":ae()}],"scale-z":[{"scale-z":ae()}],"scale-3d":["scale-3d"],skew:[{skew:Te()}],"skew-x":[{"skew-x":Te()}],"skew-y":[{"skew-y":Te()}],transform:[{transform:[U,G,"","none","gpu","cpu"]}],"transform-origin":[{origin:S()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:he()}],"translate-x":[{"translate-x":he()}],"translate-y":[{"translate-y":he()}],"translate-z":[{"translate-z":he()}],"translate-none":["translate-none"],accent:[{accent:T()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:T()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",U,G]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",U,G]}],fill:[{fill:["none",...T()]}],"stroke-w":[{stroke:[ee,$t,it,bn]}],stroke:[{stroke:["none",...T()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},ug=(e,{cacheSize:t,prefix:r,experimentalParseClassName:n,extend:s={},override:a={}})=>(Wt(e,"cacheSize",t),Wt(e,"prefix",r),Wt(e,"experimentalParseClassName",n),xr(e.theme,a.theme),xr(e.classGroups,a.classGroups),xr(e.conflictingClassGroups,a.conflictingClassGroups),xr(e.conflictingClassGroupModifiers,a.conflictingClassGroupModifiers),Wt(e,"orderSensitiveModifiers",a.orderSensitiveModifiers),vr(e.theme,s.theme),vr(e.classGroups,s.classGroups),vr(e.conflictingClassGroups,s.conflictingClassGroups),vr(e.conflictingClassGroupModifiers,s.conflictingClassGroupModifiers),oc(e,s,"orderSensitiveModifiers"),e),Wt=(e,t,r)=>{r!==void 0&&(e[t]=r)},xr=(e,t)=>{if(t)for(const r in t)Wt(e,r,t[r])},vr=(e,t)=>{if(t)for(const r in t)oc(e,t,r)},oc=(e,t,r)=>{const n=t[r];n!==void 0&&(e[r]=e[r]?e[r].concat(n):n)},fg=(e,...t)=>typeof e=="function"?Yn(qn,e,...t):Yn(()=>ug(qn(),e),...t),q=Yn(qn);var pg=e=>ve(e)?q:fg({...e,extend:{theme:e.theme,classGroups:e.classGroups,conflictingClassGroupModifiers:e.conflictingClassGroupModifiers,conflictingClassGroups:e.conflictingClassGroups,...e.extend}}),hg=(...e)=>t=>{let r=Dr(e);return!r||!t.twMerge?r:((!Ue.cachedTwMerge||Ue.didTwMergeConfigChange)&&(Ue.didTwMergeConfigChange=!1,Ue.cachedTwMerge=pg(Ue.cachedTwMergeConfig)),Ue.cachedTwMerge(r)||void 0)},{tv:H}=Nm(hg);const mg=H({base:["relative inline-flex items-center justify-center overflow-hidden font-medium","text-center align-middle","box-border select-none","focus:outline-none focus:ring-2 focus:ring-offset-2","transition-all duration-200 ease-in-out"],variants:{size:{sm:"w-8 h-8 text-xs",md:"w-10 h-10 text-sm",lg:"w-14 h-14 text-base"},color:{default:["bg-default-100 text-default-foreground","focus:ring-default-500"],primary:["bg-primary-100 text-primary-foreground","focus:ring-primary-500"],secondary:["bg-secondary-100 text-secondary-foreground","focus:ring-secondary-500"],success:["bg-success-100 text-success-foreground","focus:ring-success-500"],warning:["bg-warning-100 text-warning-foreground","focus:ring-warning-500"],danger:["bg-danger-100 text-danger-foreground","focus:ring-danger-500"]},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"},isBordered:{true:"ring-2 ring-offset-2 ring-white dark:ring-offset-background",false:""},isDisabled:{true:"opacity-30 cursor-not-allowed pointer-events-none",false:"cursor-pointer"},isFocusable:{true:"cursor-pointer",false:""}},compoundVariants:[{color:"default",isBordered:!0,class:"ring-default-300 dark:ring-default-600"},{color:"primary",isBordered:!0,class:"ring-primary-300 dark:ring-primary-600"},{color:"secondary",isBordered:!0,class:"ring-secondary-300 dark:ring-secondary-600"},{color:"success",isBordered:!0,class:"ring-success-300 dark:ring-success-600"},{color:"warning",isBordered:!0,class:"ring-warning-300 dark:ring-warning-600"},{color:"danger",isBordered:!0,class:"ring-danger-300 dark:ring-danger-600"},{isDisabled:!0,isFocusable:!0,class:"cursor-not-allowed"}],defaultVariants:{size:"md",color:"default",radius:"full",isBordered:!1,isDisabled:!1,isFocusable:!1}}),gg=H({base:["w-full h-full object-cover","transition-opacity duration-200 ease-in-out"]}),bg=H({base:["w-full h-full flex items-center justify-center","bg-inherit text-inherit"]}),yg=H({base:["font-medium uppercase select-none","text-inherit leading-none"]}),xg=H({base:["w-1/2 h-1/2 text-inherit","flex items-center justify-center"]}),vg=H({base:["flex items-center"],variants:{isGrid:{true:"flex-wrap gap-2",false:"flex-row"}},defaultVariants:{isGrid:!1}}),wg=H({base:["inline-flex items-center justify-center font-medium","bg-default-100 text-default-foreground","border border-background","select-none transition-all duration-200"],variants:{size:{sm:"w-8 h-8 text-xs ml-[-8px]",md:"w-10 h-10 text-sm ml-[-10px]",lg:"w-14 h-14 text-base ml-[-14px]"},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"},isGrid:{true:"ml-0",false:""}},defaultVariants:{size:"md",radius:"full",isGrid:!1}}),Cg=e=>mg(e),kg=e=>vg(e),Sg=e=>wg(e),jg=e=>{if(!e)return"";const t=e.trim().split(/\s+/);return t.length===1?t[0].substring(0,2).toUpperCase():t.slice(0,2).map(r=>r.charAt(0)).join("").toUpperCase()},Tg=e=>{if(!e)return"";let t=0;for(let n=0;n<e.length;n++){const s=e.charCodeAt(n);t=(t<<5)-t+s,t=t&t}return`hsl(${Math.abs(t)%360}, 70%, 80%)`},ze={size:"md",color:"default",radius:"full",isBordered:!1,isDisabled:!1,isFocusable:!1,showFallback:!1},et={max:5,isGrid:!1,isDisabled:!1,isBordered:!1},ic=e=>{const{src:t,name:r,showFallback:n=ze.showFallback,getInitials:s=jg,ImgComponent:a="img",imgProps:o={},isFocusable:i=ze.isFocusable,isDisabled:l=ze.isDisabled,className:c="","data-testid":d,...u}=e,[h,m]=p.useState(!1),[g,w]=p.useState(!1);p.useEffect(()=>{if(!t){m(!1),w(!1);return}m(!1),w(!1);const j=new Image;return j.onload=()=>{m(!0),w(!1)},j.onerror=()=>{m(!1),w(!0)},j.src=t,()=>{j.onload=null,j.onerror=null}},[t]);const x=p.useMemo(()=>r?s(r):"",[r,s]),b=p.useMemo(()=>!!(n&&(!t||g)||r&&!t||t&&g),[n,t,g,r]),y=p.useMemo(()=>{if(!(!r||t))return Tg(r)},[r,t]),v=p.useMemo(()=>({...o,src:t,alt:r||"Avatar",onLoad:p.useCallback(j=>{m(!0),w(!1),o.onLoad?.(j)},[o]),onError:p.useCallback(j=>{m(!1),w(!0),o.onError?.(j)},[o])}),[o,t,r]),C=p.useMemo(()=>({...u,className:c,"data-testid":d,"data-hover":void 0,"data-focus":void 0,"data-focus-visible":void 0,tabIndex:i&&!l?0:void 0,role:i?"button":"img","aria-label":r||"Avatar",style:{...u.style,...y&&b&&r&&!t?{backgroundColor:y}:{}}}),[u,c,d,i,l,r,y,b,t]),S=p.useMemo(()=>({"aria-hidden":!0,style:{backgroundColor:"inherit"}}),[]);return{isImgLoaded:h,shouldShowFallback:b,initials:x,imgProps:v,baseProps:C,fallbackProps:S}},Ws=({size:e=24,className:t="",...r})=>{const n=xg({className:t});return f.jsx("svg",{className:n,width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r,children:f.jsx("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z",fill:"currentColor"})})};Ws.displayName="AvatarIcon";const lc=p.forwardRef(({src:e,name:t,icon:r,fallback:n,color:s=ze.color,size:a=ze.size,radius:o=ze.radius,isBordered:i=ze.isBordered,isDisabled:l=ze.isDisabled,isFocusable:c=ze.isFocusable,showFallback:d=ze.showFallback,ImgComponent:u="img",imgProps:h={},getInitials:m,classNames:g={},as:w="div",...x},b)=>{const{isImgLoaded:y,shouldShowFallback:v,initials:C,imgProps:S,baseProps:j,fallbackProps:A}=ic({src:e,name:t,showFallback:d,getInitials:m,ImgComponent:u,imgProps:h,isFocusable:c,isDisabled:l,...x}),k=p.useMemo(()=>{const P=Cg({color:s,size:a,radius:o,isBordered:i,isDisabled:l,isFocusable:c});return q(P,g.base)},[s,a,o,i,l,c,g.base]),V=p.useMemo(()=>{const P=gg();return q(P,g.img)},[g.img]),M=p.useMemo(()=>{const P=bg();return q(P,g.fallback)},[g.fallback]),D=p.useMemo(()=>{const P=yg();return q(P,g.name)},[g.name]),z=p.useMemo(()=>q("w-1/2 h-1/2",g.icon),[g.icon]),L=()=>!e||!y?null:p.createElement(u,{...S,className:V}),I=()=>v?f.jsxs("div",{...A,className:M,children:[n,!n&&t&&f.jsx("span",{className:D,"aria-label":`${t} initials`,children:C}),!n&&!t&&r&&f.jsx("span",{className:z,"aria-hidden":"true",children:r}),!n&&!t&&!r&&f.jsx(Ws,{className:z})]}):null,R={hidden:{opacity:0,scale:1.1},visible:{opacity:1,scale:1,transition:{duration:.2,ease:[.4,0,.2,1]}}},B={hidden:{opacity:0,scale:.9},visible:{opacity:1,scale:1,transition:{duration:.2,ease:[.4,0,.2,1]}}};return f.jsxs(w,{ref:b,...j,className:k,children:[e&&f.jsx(_.div,{className:"absolute inset-0",variants:R,initial:"hidden",animate:y?"visible":"hidden",children:L()}),f.jsx(_.div,{className:"absolute inset-0",variants:B,initial:"hidden",animate:v?"visible":"hidden",children:I()})]})});lc.displayName="Avatar";const cc=e=>{const{max:t=et.max,total:r,size:n,color:s,radius:a,isGrid:o=et.isGrid,isDisabled:i=et.isDisabled,isBordered:l=et.isBordered,renderCount:c,children:d,className:u="","data-testid":h,...m}=e,g=p.useMemo(()=>p.Children.count(d),[d]),w=p.useMemo(()=>typeof r=="number"?Math.max(0,r-t):Math.max(0,g-t),[r,t,g]),x=p.useMemo(()=>typeof r=="number"?r>t:g>t,[r,t,g]),b=p.useMemo(()=>({size:n,color:s,radius:a,isDisabled:i,isBordered:l,max:t,total:r,isGrid:o,renderCount:c}),[n,s,a,i,l,t,r,o,c]),y=p.useMemo(()=>({...m,className:u,"data-testid":h,role:"group","aria-label":`Avatar group${r?` of ${r} users`:""}`}),[m,u,h,r]),v=p.useMemo(()=>({"aria-label":`${w} more users`,role:"img"}),[w]);return{context:b,remainingCount:w,shouldShowCount:x,baseProps:y,countProps:v}},Ag=p.createContext(null),Mg=({value:e,children:t})=>f.jsx(Ag.Provider,{value:e,children:t}),dc=p.forwardRef(({max:e=et.max,total:t,size:r,color:n,radius:s,isGrid:a=et.isGrid,isDisabled:o=et.isDisabled,isBordered:i=et.isBordered,renderCount:l,classNames:c={},children:d,...u},h)=>{const{context:m,remainingCount:g,shouldShowCount:w,baseProps:x,countProps:b}=cc({max:e,total:t,size:r,color:n,radius:s,isGrid:a,isDisabled:o,isBordered:i,renderCount:l,children:d,...u}),y=p.useMemo(()=>{const j=kg({isGrid:a});return q(j,c.base)},[a,c.base]),v=p.useMemo(()=>{const j=Sg({size:r,radius:s,isGrid:a});return q(j,c.count)},[r,s,a,c.count]),C=p.useMemo(()=>{if(!d)return null;const A=p.Children.toArray(d).slice(0,e);return A.map((k,V)=>a?f.jsx(_.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},transition:{delay:V*.05,duration:.2,ease:[.4,0,.2,1]},children:k},V):f.jsx(_.div,{className:V>0?"-ml-2":"",initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{delay:V*.05,duration:.2,ease:[.4,0,.2,1]},style:{zIndex:A.length-V},children:k},V))},[d,e,a]),S=()=>{if(!w)return null;if(l){const j=l(g);return f.jsx(_.div,{className:v,"aria-label":b["aria-label"],role:b.role,initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},transition:{delay:e*.05,duration:.2,ease:[.4,0,.2,1]},children:j})}return f.jsxs(_.div,{className:v,"aria-label":b["aria-label"],role:b.role,initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},transition:{delay:e*.05,duration:.2,ease:[.4,0,.2,1]},children:["+",g]})};return f.jsx(Mg,{value:m,children:f.jsxs("div",{ref:h,...x,className:y,children:[C,S()]})})});dc.displayName="AvatarGroup";const Vg=H({slots:{base:["relative","inline-flex","shrink-0"],badge:["flex","z-10","absolute","items-center","justify-center","whitespace-nowrap","origin-center","text-tiny","font-medium","subpixel-antialiased","scale-100","select-none","transition-transform","!duration-200","!ease-soft-spring"]},variants:{variant:{solid:{badge:"text-white"},flat:{badge:""},faded:{badge:""},shadow:{badge:"text-white shadow-lg"}},color:{default:{},primary:{},secondary:{},success:{},warning:{},danger:{}},size:{sm:{badge:"min-w-4 h-4 text-tiny px-1"},md:{badge:"min-w-5 h-5 text-tiny px-1"},lg:{badge:"min-w-6 h-6 text-small px-1.5"}},shape:{circle:{badge:"rounded-full"},rectangle:{badge:"rounded-md"}},placement:{"top-right":{badge:"top-0 right-0 translate-x-1/2 -translate-y-1/2"},"top-left":{badge:"top-0 left-0 -translate-x-1/2 -translate-y-1/2"},"bottom-right":{badge:"bottom-0 right-0 translate-x-1/2 translate-y-1/2"},"bottom-left":{badge:"bottom-0 left-0 -translate-x-1/2 translate-y-1/2"}},isInvisible:{true:{badge:"scale-0"},false:{badge:"scale-100"}},showOutline:{true:{badge:"ring-2 ring-background"},false:{}},disableAnimation:{true:{badge:"transition-none"},false:{}},isOneChar:{true:{},false:{}}},compoundVariants:[{variant:"solid",color:"default",class:{badge:"bg-default text-default-foreground"}},{variant:"solid",color:"primary",class:{badge:"bg-primary text-primary-foreground"}},{variant:"solid",color:"secondary",class:{badge:"bg-secondary text-secondary-foreground"}},{variant:"solid",color:"success",class:{badge:"bg-success text-success-foreground"}},{variant:"solid",color:"warning",class:{badge:"bg-warning text-warning-foreground"}},{variant:"solid",color:"danger",class:{badge:"bg-danger text-danger-foreground"}},{variant:"flat",color:"default",class:{badge:"bg-default/20 text-default-600"}},{variant:"flat",color:"primary",class:{badge:"bg-primary/20 text-primary-600"}},{variant:"flat",color:"secondary",class:{badge:"bg-secondary/20 text-secondary-600"}},{variant:"flat",color:"success",class:{badge:"bg-success/20 text-success-600 dark:text-success-500"}},{variant:"flat",color:"warning",class:{badge:"bg-warning/20 text-warning-600 dark:text-warning-500"}},{variant:"flat",color:"danger",class:{badge:"bg-danger/20 text-danger-500"}},{variant:"faded",color:"default",class:{badge:"border-small border-default bg-default-50 text-default-foreground"}},{variant:"faded",color:"primary",class:{badge:"border-small border-primary bg-primary-50 text-primary-600"}},{variant:"faded",color:"secondary",class:{badge:"border-small border-secondary bg-secondary-50 text-secondary-600"}},{variant:"faded",color:"success",class:{badge:"border-small border-success bg-success-50 text-success-600 dark:text-success-500"}},{variant:"faded",color:"warning",class:{badge:"border-small border-warning bg-warning-50 text-warning-600 dark:text-warning-500"}},{variant:"faded",color:"danger",class:{badge:"border-small border-danger bg-danger-50 text-danger-500"}},{variant:"shadow",color:"default",class:{badge:"shadow-lg shadow-default/50 bg-default text-default-foreground"}},{variant:"shadow",color:"primary",class:{badge:"shadow-lg shadow-primary/40 bg-primary text-primary-foreground"}},{variant:"shadow",color:"secondary",class:{badge:"shadow-lg shadow-secondary/40 bg-secondary text-secondary-foreground"}},{variant:"shadow",color:"success",class:{badge:"shadow-lg shadow-success/40 bg-success text-success-foreground"}},{variant:"shadow",color:"warning",class:{badge:"shadow-lg shadow-warning/40 bg-warning text-warning-foreground"}},{variant:"shadow",color:"danger",class:{badge:"shadow-lg shadow-danger/40 bg-danger text-danger-foreground"}},{isOneChar:!0,size:"sm",class:{badge:"w-4 h-4 min-w-4 px-0"}},{isOneChar:!0,size:"md",class:{badge:"w-5 h-5 min-w-5 px-0"}},{isOneChar:!0,size:"lg",class:{badge:"w-6 h-6 min-w-6 px-0"}}],defaultVariants:{variant:"solid",color:"default",size:"md",shape:"rectangle",placement:"top-right",isInvisible:!1,showOutline:!1,disableAnimation:!1,isOneChar:!1}}),uc=p.forwardRef(({children:e,content:t,variant:r="solid",color:n="default",size:s="md",shape:a="rectangle",placement:o="top-right",isOneChar:i=!1,showOutline:l=!1,isInvisible:c=!1,disableAnimation:d=!1,classNames:u,className:h,...m},g)=>{const w=p.useMemo(()=>i?!0:typeof t=="string"||typeof t=="number"?String(t).length===1:!1,[t,i]),x=p.useMemo(()=>Vg({variant:r,color:n,size:s,shape:a,placement:o,isOneChar:w,showOutline:l,isInvisible:c,disableAnimation:d}),[r,n,s,a,o,w,l,c,d]);return!t&&e?f.jsx(f.Fragment,{children:e}):t&&!e?f.jsx("span",{ref:g,className:q(x.badge(),u?.badge,h),...m,children:t}):f.jsxs("div",{ref:g,className:q(x.base(),u?.base,h),...m,children:[e,t&&f.jsx("span",{className:q(x.badge(),u?.badge),"aria-label":typeof t=="string"?t:"Badge",children:t})]})});uc.displayName="Badge";const fc=H({slots:{base:["flex","items-center","justify-start","max-w-fit","relative","overflow-hidden"],list:["flex","flex-wrap","items-center","list-none","p-0","m-0"],item:["flex","items-center","text-inherit","whitespace-nowrap","box-border","outline-none","tap-highlight-transparent"],link:["flex","items-center","gap-1","outline-none","cursor-pointer","transition-colors","tap-highlight-transparent","rounded-small","relative","inline-flex","shrink-0","text-inherit","no-underline","hover:opacity-80","active:opacity-disabled","focus-visible:z-10","focus-visible:outline-2","focus-visible:outline-focus","focus-visible:outline-offset-2"],separator:["flex","items-center","justify-center","pointer-events-none","shrink-0","text-inherit","select-none"],ellipsis:["flex","items-center","justify-center","cursor-pointer","text-inherit","rounded-small","transition-colors","hover:opacity-80","active:opacity-disabled","outline-none","focus-visible:z-10","focus-visible:outline-2","focus-visible:outline-focus","focus-visible:outline-offset-2"]},variants:{size:{sm:{base:"text-xs",item:"h-6",link:"px-1 h-6 text-xs min-h-6",separator:"px-1 text-xs",ellipsis:"w-6 h-6 text-xs"},md:{base:"text-sm",item:"h-8",link:"px-2 h-8 text-sm min-h-8",separator:"px-1.5 text-sm",ellipsis:"w-8 h-8 text-sm"},lg:{base:"text-base",item:"h-10",link:"px-3 h-10 text-base min-h-10",separator:"px-2 text-base",ellipsis:"w-10 h-10 text-base"}},color:{default:{item:"text-foreground",link:"text-foreground data-[current=true]:text-foreground data-[current=true]:font-medium",separator:"text-foreground-400"},primary:{item:"text-primary",link:"text-primary data-[current=true]:text-primary data-[current=true]:font-medium",separator:"text-primary-300"},secondary:{item:"text-secondary",link:"text-secondary data-[current=true]:text-secondary data-[current=true]:font-medium",separator:"text-secondary-300"},success:{item:"text-success",link:"text-success data-[current=true]:text-success data-[current=true]:font-medium",separator:"text-success-300"},warning:{item:"text-warning",link:"text-warning data-[current=true]:text-warning data-[current=true]:font-medium",separator:"text-warning-300"},danger:{item:"text-danger",link:"text-danger data-[current=true]:text-danger data-[current=true]:font-medium",separator:"text-danger-300"}},variant:{solid:{link:["data-[current=true]:bg-foreground","data-[current=true]:text-background"]},bordered:{link:["border-2","border-transparent","data-[current=true]:border-foreground"]},light:{link:["data-[current=true]:bg-foreground/10"]},flat:{link:["data-[current=true]:bg-foreground/20"]}},isDisabled:{true:{base:"opacity-disabled pointer-events-none",link:"cursor-default pointer-events-none"}},hideSeparator:{true:{separator:"hidden"}}},compoundVariants:[{color:"primary",variant:"solid",class:{link:["data-[current=true]:bg-primary","data-[current=true]:text-primary-foreground"]}},{color:"primary",variant:"bordered",class:{link:"data-[current=true]:border-primary"}},{color:"primary",variant:"light",class:{link:"data-[current=true]:bg-primary/10"}},{color:"primary",variant:"flat",class:{link:"data-[current=true]:bg-primary/20"}},{color:"secondary",variant:"solid",class:{link:["data-[current=true]:bg-secondary","data-[current=true]:text-secondary-foreground"]}},{color:"secondary",variant:"bordered",class:{link:"data-[current=true]:border-secondary"}},{color:"secondary",variant:"light",class:{link:"data-[current=true]:bg-secondary/10"}},{color:"secondary",variant:"flat",class:{link:"data-[current=true]:bg-secondary/20"}},{color:"success",variant:"solid",class:{link:["data-[current=true]:bg-success","data-[current=true]:text-success-foreground"]}},{color:"success",variant:"bordered",class:{link:"data-[current=true]:border-success"}},{color:"success",variant:"light",class:{link:"data-[current=true]:bg-success/10"}},{color:"success",variant:"flat",class:{link:"data-[current=true]:bg-success/20"}},{color:"warning",variant:"solid",class:{link:["data-[current=true]:bg-warning","data-[current=true]:text-warning-foreground"]}},{color:"warning",variant:"bordered",class:{link:"data-[current=true]:border-warning"}},{color:"warning",variant:"light",class:{link:"data-[current=true]:bg-warning/10"}},{color:"warning",variant:"flat",class:{link:"data-[current=true]:bg-warning/20"}},{color:"danger",variant:"solid",class:{link:["data-[current=true]:bg-danger","data-[current=true]:text-danger-foreground"]}},{color:"danger",variant:"bordered",class:{link:"data-[current=true]:border-danger"}},{color:"danger",variant:"light",class:{link:"data-[current=true]:bg-danger/10"}},{color:"danger",variant:"flat",class:{link:"data-[current=true]:bg-danger/20"}}],defaultVariants:{size:"md",color:"default",variant:"flat",isDisabled:!1,hideSeparator:!1}}),Pg=H({base:["flex","items-center","justify-center","pointer-events-none","shrink-0","select-none"],variants:{type:{slash:"",chevron:"",arrow:"",dot:"",custom:""},size:{sm:"w-3 h-3 text-xs",md:"w-4 h-4 text-sm",lg:"w-5 h-5 text-base"},color:{default:"text-foreground-400",primary:"text-primary-300",secondary:"text-secondary-300",success:"text-success-300",warning:"text-warning-300",danger:"text-danger-300"}},defaultVariants:{type:"slash",size:"md",color:"default"}});H({slots:{item:"",separator:""},variants:{animation:{none:{},fade:{item:"animate-in fade-in duration-300",separator:"animate-in fade-in duration-300"},slide:{item:"animate-in slide-in-from-left-2 duration-300",separator:"animate-in slide-in-from-left-1 duration-300"},scale:{item:"animate-in zoom-in-95 duration-300",separator:"animate-in zoom-in-95 duration-300"}},stagger:{true:{},false:{}}},compoundVariants:[{animation:"fade",stagger:!0,class:{item:"animate-in fade-in duration-300 fill-mode-both",separator:"animate-in fade-in duration-300 fill-mode-both"}},{animation:"slide",stagger:!0,class:{item:"animate-in slide-in-from-left-2 duration-300 fill-mode-both",separator:"animate-in slide-in-from-left-1 duration-300 fill-mode-both"}},{animation:"scale",stagger:!0,class:{item:"animate-in zoom-in-95 duration-300 fill-mode-both",separator:"animate-in zoom-in-95 duration-300 fill-mode-both"}}],defaultVariants:{animation:"none",stagger:!1}});const Wo=e=>{const t={slash:"/",chevron:"›",arrow:"→",dot:"•",custom:""};return t[e]||t.slash},pc=p.createContext(void 0),hc=()=>{const e=p.useContext(pc);if(!e)throw new Error("useBreadcrumbContext must be used within a Breadcrumb component");return e},Eg=e=>{const{children:t,size:r="md",color:n="default",variant:s="flat",separator:a="slash",separatorClassName:o,itemsClassName:i,hideSeparator:l=!1,maxItems:c,showRoot:d=!0,isDisabled:u=!1,itemsBeforeCollapse:h=1,itemsAfterCollapse:m=1,renderEllipsis:g,className:w,listProps:x,...b}=e,y=p.Children.toArray(t),v=p.useMemo(()=>{if(!c||y.length<=c)return y;const j=y.length,A=Math.max(2,c-1);if(j<=A)return y;const k=y.slice(0,h),V=y.slice(j-m),M=j-h-m,D=g?g(M):f.jsx("span",{"aria-label":`${M} more items`,children:"..."},"ellipsis");return[...k,D,...V]},[y,c,h,m,g]),C=p.useMemo(()=>fc({size:r,color:n,variant:s,isDisabled:u,hideSeparator:l}),[r,n,s,u,l]),S=p.useMemo(()=>({size:r,color:n,variant:s,separator:a,separatorClassName:o,isDisabled:u}),[r,n,s,a,o,u]);return{processedChildren:v,slots:C,contextValue:S,itemsClassName:i,className:w,listProps:x,otherProps:b}},mc=p.forwardRef((e,t)=>{const{processedChildren:r,slots:n,contextValue:s,itemsClassName:a,className:o,listProps:i,otherProps:l}=Eg(e);return f.jsx(pc.Provider,{value:s,children:f.jsx("nav",{ref:t,className:n.base({className:o}),"aria-label":"Breadcrumb",...l,children:f.jsx("ol",{className:n.list({className:a}),...i,children:r.map((c,d)=>{const u=d===r.length-1;return f.jsxs(p.Fragment,{children:[f.jsx("li",{className:n.item(),children:p.isValidElement(c)?p.cloneElement(c,{isCurrent:c.props?.isCurrent??u}):c}),!u&&!e.hideSeparator&&f.jsx("li",{className:n.separator({className:s.separatorClassName}),children:p.isValidElement(s.separator)?s.separator:f.jsxs("span",{"aria-hidden":"true",role:"separator",className:"flex items-center justify-center",children:[s.separator==="slash"&&f.jsx("span",{className:"text-inherit",children:"/"}),s.separator==="chevron"&&f.jsx("svg",{className:`${s.size==="sm"?"w-3 h-3":s.size==="lg"?"w-5 h-5":"w-4 h-4"} text-inherit`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:f.jsx("polyline",{points:"9,18 15,12 9,6",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),s.separator==="arrow"&&f.jsxs("svg",{className:`${s.size==="sm"?"w-3 h-3":s.size==="lg"?"w-5 h-5":"w-4 h-4"} text-inherit`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[f.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),f.jsx("polyline",{points:"12,5 19,12 12,19",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),s.separator==="dot"&&f.jsx("svg",{className:`${s.size==="sm"?"w-3 h-3":s.size==="lg"?"w-5 h-5":"w-4 h-4"} text-inherit`,fill:"currentColor",viewBox:"0 0 24 24",children:f.jsx("circle",{cx:"12",cy:"12",r:"3"})})]})})]},d)})})})})});mc.displayName="Breadcrumb";const Yr=({to:e,children:t,className:r="",activeClassName:n="",exact:s=!1,replace:a=!1,onClick:o})=>{const i=ra.useLocation(),l=s?i.pathname===e:i.pathname.startsWith(e),c=[r,l&&n].filter(Boolean).join(" "),d=u=>{o?.(u)};return f.jsx(ra.Link,{to:e,className:c,replace:a,onClick:d,children:t})},Ig=e=>{const t=hc(),{children:r,href:n,to:s,isDisabled:a,isCurrent:o=!1,startContent:i,endContent:l,className:c,itemClassName:d,linkClassName:u,size:h,color:m,variant:g,onPress:w,...x}=e,b=s||n,y=h||t.size||"md",v=m||t.color||"default",C=g||t.variant||"flat",S=a||t.isDisabled||!1,j=p.useMemo(()=>fc({size:y,color:v,variant:C,isDisabled:S}),[y,v,C,S]),A=p.useCallback(V=>{if(S||o){V.preventDefault();return}w&&w(V)},[S,o,w]);return{children:r,href:n,to:s,isDisabled:S,isCurrent:o,startContent:i,endContent:l,className:c,itemClassName:d,linkClassName:u,slots:j,handlePress:A,shouldRenderAsLink:!!(b&&!S&&!o),otherProps:x}},gc=p.forwardRef((e,t)=>{const{children:r,href:n,to:s,isDisabled:a,isCurrent:o,startContent:i,endContent:l,linkClassName:c,slots:d,handlePress:u,shouldRenderAsLink:h,otherProps:m}=Ig(e),g=f.jsxs(f.Fragment,{children:[i,f.jsx("span",{children:r}),l]}),w={ref:t,className:d.link({className:c}),"data-current":o,"data-disabled":a,"aria-current":o?"page":void 0,"aria-disabled":a,tabIndex:a?-1:0,onClick:u,...m};if(h){if(s)return f.jsx(f.Fragment,{children:f.jsx(Yr,{to:s,className:d.link({className:c}),onClick:u,children:g})});if(n)return f.jsx(f.Fragment,{children:f.jsx("a",{href:n,...w,children:g})})}return f.jsx(f.Fragment,{children:f.jsx("span",{...w,role:"link",children:g})})});gc.displayName="BreadcrumbItem";const Ng={slash:()=>f.jsx("span",{children:"/"}),chevron:()=>f.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"w-full h-full",children:f.jsx("polyline",{points:"9,18 15,12 9,6"})}),arrow:()=>f.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"w-full h-full",children:[f.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),f.jsx("polyline",{points:"12,5 19,12 12,19"})]}),dot:()=>f.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:"w-full h-full",children:f.jsx("circle",{cx:"12",cy:"12",r:"3"})})},Rg=e=>{const t=hc(),{type:r,customIcon:n,className:s,size:a,color:o}=e,i=r||(typeof t.separator=="string"?t.separator:"slash"),l=a||t.size||"md",c=o||t.color||"default",d=p.useMemo(()=>Pg({type:i,size:l,color:c}),[i,l,c]),u=p.useMemo(()=>{if(p.isValidElement(t.separator))return t.separator;if(n)return n;if(i==="custom")return f.jsx("span",{children:Wo(i)});const h=Ng[i];return h?f.jsx(h,{}):f.jsx("span",{children:Wo(i)})},[t.separator,n,i]);return{separatorClasses:d,separatorContent:u,className:s}},bc=p.forwardRef((e,t)=>{const{separatorClasses:r,separatorContent:n,className:s}=Rg(e);return f.jsx("span",{ref:t,className:`${r} ${s||""}`,"aria-hidden":"true",role:"separator",children:n})});bc.displayName="BreadcrumbSeparator";const Dg={xs:"px-2 py-1 text-xs",sm:"px-3 py-1.5 text-sm",md:"px-4 py-2 text-base",lg:"px-6 py-3 text-lg",xl:"px-8 py-4 text-xl"},Bg={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl",full:"rounded-full"},Lg=(e,t)=>{const r=t==="faded"||t==="light"?"ghost":t==="bordered"||t==="outlined"?"outline":t;return{default:{solid:"bg-gray-600 hover:bg-gray-700 active:bg-gray-800 text-white border-gray-600 hover:border-gray-700 dark:bg-gray-700 dark:hover:bg-gray-600 dark:active:bg-gray-500 dark:border-gray-700 dark:hover:border-gray-600",outline:"bg-transparent hover:bg-gray-50 active:bg-gray-100 text-gray-600 border-2 border-gray-600 hover:border-gray-700 dark:hover:bg-gray-800 dark:active:bg-gray-700 dark:text-gray-300 dark:border-gray-400 dark:hover:border-gray-300",ghost:"bg-transparent hover:bg-gray-100 active:bg-gray-200 text-gray-600 border-transparent dark:hover:bg-gray-800 dark:active:bg-gray-700 dark:text-gray-300",link:"bg-transparent hover:bg-gray-50 active:bg-gray-100 text-gray-600 border-transparent underline hover:no-underline dark:hover:bg-gray-800 dark:active:bg-gray-700 dark:text-gray-300",gradient:"bg-gradient-to-r from-gray-500 to-gray-600 hover:from-gray-600 hover:to-gray-700 text-white border-transparent dark:from-gray-600 dark:to-gray-700 dark:hover:from-gray-500 dark:hover:to-gray-600"},primary:{solid:"bg-blue-600 hover:bg-blue-700 active:bg-blue-800 text-white border-blue-600 hover:border-blue-700 dark:bg-blue-600 dark:hover:bg-blue-500 dark:active:bg-blue-400",outline:"bg-transparent hover:bg-blue-50 active:bg-blue-100 text-blue-600 border-2 border-blue-600 hover:border-blue-700 dark:hover:bg-blue-900 dark:active:bg-blue-800 dark:text-blue-400 dark:border-blue-500 dark:hover:border-blue-400",ghost:"bg-transparent hover:bg-blue-100 active:bg-blue-200 text-blue-600 border-transparent dark:hover:bg-blue-900 dark:active:bg-blue-800 dark:text-blue-400",link:"bg-transparent hover:bg-blue-50 active:bg-blue-100 text-blue-600 border-transparent underline hover:no-underline dark:hover:bg-blue-900 dark:active:bg-blue-800 dark:text-blue-400",gradient:"bg-gradient-to-r from-blue-500 to-blue-600 hover:from-blue-600 hover:to-blue-700 text-white border-transparent dark:from-blue-600 dark:to-blue-700 dark:hover:from-blue-500 dark:hover:to-blue-600"},secondary:{solid:"bg-purple-600 hover:bg-purple-700 active:bg-purple-800 text-white border-purple-600 hover:border-purple-700 dark:bg-purple-600 dark:hover:bg-purple-500 dark:active:bg-purple-400",outline:"bg-transparent hover:bg-purple-50 active:bg-purple-100 text-purple-600 border-2 border-purple-600 hover:border-purple-700 dark:hover:bg-purple-900 dark:active:bg-purple-800 dark:text-purple-400 dark:border-purple-500 dark:hover:border-purple-400",ghost:"bg-transparent hover:bg-purple-100 active:bg-purple-200 text-purple-600 border-transparent dark:hover:bg-purple-900 dark:active:bg-purple-800 dark:text-purple-400",link:"bg-transparent hover:bg-purple-50 active:bg-purple-100 text-purple-600 border-transparent underline hover:no-underline dark:hover:bg-purple-900 dark:active:bg-purple-800 dark:text-purple-400",gradient:"bg-gradient-to-r from-purple-500 to-purple-600 hover:from-purple-600 hover:to-purple-700 text-white border-transparent dark:from-purple-600 dark:to-purple-700 dark:hover:from-purple-500 dark:hover:to-purple-600"},success:{solid:"bg-green-600 hover:bg-green-700 active:bg-green-800 text-white border-green-600 hover:border-green-700 dark:bg-green-600 dark:hover:bg-green-500 dark:active:bg-green-400",outline:"bg-transparent hover:bg-green-50 active:bg-green-100 text-green-600 border-2 border-green-600 hover:border-green-700 dark:hover:bg-green-900 dark:active:bg-green-800 dark:text-green-400 dark:border-green-500 dark:hover:border-green-400",ghost:"bg-transparent hover:bg-green-100 active:bg-green-200 text-green-600 border-transparent dark:hover:bg-green-900 dark:active:bg-green-800 dark:text-green-400",link:"bg-transparent hover:bg-green-50 active:bg-green-100 text-green-600 border-transparent underline hover:no-underline dark:hover:bg-green-900 dark:active:bg-green-800 dark:text-green-400",gradient:"bg-gradient-to-r from-green-500 to-green-600 hover:from-green-600 hover:to-green-700 text-white border-transparent dark:from-green-600 dark:to-green-700 dark:hover:from-green-500 dark:hover:to-green-600"},warning:{solid:"bg-yellow-500 hover:bg-yellow-600 active:bg-yellow-700 text-white border-yellow-500 hover:border-yellow-600 dark:bg-yellow-600 dark:hover:bg-yellow-500 dark:active:bg-yellow-400",outline:"bg-transparent hover:bg-yellow-50 active:bg-yellow-100 text-yellow-600 border-2 border-yellow-500 hover:border-yellow-600 dark:hover:bg-yellow-900 dark:active:bg-yellow-800 dark:text-yellow-400 dark:border-yellow-500 dark:hover:border-yellow-400",ghost:"bg-transparent hover:bg-yellow-100 active:bg-yellow-200 text-yellow-600 border-transparent dark:hover:bg-yellow-900 dark:active:bg-yellow-800 dark:text-yellow-400",link:"bg-transparent hover:bg-yellow-50 active:bg-yellow-100 text-yellow-600 border-transparent underline hover:no-underline dark:hover:bg-yellow-900 dark:active:bg-yellow-800 dark:text-yellow-400",gradient:"bg-gradient-to-r from-yellow-400 to-yellow-500 hover:from-yellow-500 hover:to-yellow-600 text-white border-transparent dark:from-yellow-500 dark:to-yellow-600 dark:hover:from-yellow-400 dark:hover:to-yellow-500"},danger:{solid:"bg-red-600 hover:bg-red-700 active:bg-red-800 text-white border-red-600 hover:border-red-700 dark:bg-red-600 dark:hover:bg-red-500 dark:active:bg-red-400",outline:"bg-transparent hover:bg-red-50 active:bg-red-100 text-red-600 border-2 border-red-600 hover:border-red-700 dark:hover:bg-red-900 dark:active:bg-red-800 dark:text-red-400 dark:border-red-500 dark:hover:border-red-400",ghost:"bg-transparent hover:bg-red-100 active:bg-red-200 text-red-600 border-transparent dark:hover:bg-red-900 dark:active:bg-red-800 dark:text-red-400",link:"bg-transparent hover:bg-red-50 active:bg-red-100 text-red-600 border-transparent underline hover:no-underline dark:hover:bg-red-900 dark:active:bg-red-800 dark:text-red-400",gradient:"bg-gradient-to-r from-red-500 to-red-600 hover:from-red-600 hover:to-red-700 text-white border-transparent dark:from-red-600 dark:to-red-700 dark:hover:from-red-500 dark:hover:to-red-600"}}[e][r]},Og=(e=!1)=>e?"cursor-wait opacity-70 pointer-events-none":"",zg=(e=!1)=>e?"opacity-50 cursor-not-allowed pointer-events-none":"",$g=(e=!1)=>e?"w-full":"",Fg=e=>({default:"focus:ring-gray-500 dark:focus:ring-gray-400",primary:"focus:ring-blue-500 dark:focus:ring-blue-400",secondary:"focus:ring-purple-500 dark:focus:ring-purple-400",success:"focus:ring-green-500 dark:focus:ring-green-400",warning:"focus:ring-yellow-500 dark:focus:ring-yellow-400",danger:"focus:ring-red-500 dark:focus:ring-red-400"})[e],Wg=(e=!1,t=!1,r=!1,n="primary")=>{if(e||t)return"";const a=`cursor-pointer focus:outline-none focus:ring-2 focus:ring-offset-2 ${Fg(n)}`,o="transition-colors duration-200 ease-in-out";return r?`${a} ${o}`:`${a} ${o}`},_g=(e=!1)=>e?"flex [&>*:not(:first-child)]:rounded-l-none [&>*:not(:last-child)]:rounded-r-none [&>*:not(:first-child)]:-ml-px":"flex gap-2",Gg={none:{},scale:{scale:1.05,transition:{duration:.2,ease:"easeOut"}},lift:{y:-2,scale:1.02,transition:{duration:.2,ease:"easeOut"}},bounce:{scale:[1,1.1,1.05],transition:{duration:.4,ease:"easeOut",times:[0,.6,1]}},pulse:{scale:[1,1.03,1],transition:{duration:1.5,ease:"easeInOut",repeat:1/0}},shake:{x:[-2,2,-2,2,0],transition:{duration:.4,ease:"easeInOut"}},rotate:{rotate:[0,-2,2,0],transition:{duration:.3,ease:"easeInOut"}},glow:{boxShadow:["0 0 0 0px rgba(59, 130, 246, 0)","0 0 0 4px rgba(59, 130, 246, 0.1)","0 0 20px 8px rgba(59, 130, 246, 0.15)"],transition:{duration:.3,ease:"easeOut"}}},Ug={none:{},scale:{scale:.95,transition:{duration:.1,ease:"easeInOut"}},bounce:{scale:[1,.9,1.1,1],transition:{duration:.4,ease:"easeOut",times:[0,.3,.7,1]}},ripple:{scale:[1,1.05],transition:{duration:.6,ease:"easeOut"}},press:{scale:.9,y:1,transition:{duration:.1,ease:"easeInOut"}},punch:{scale:[1,1.2,1],rotate:[0,-5,5,0],transition:{duration:.4,ease:"easeOut",times:[0,.4,1]}},wiggle:{rotate:[0,-10,10,-5,5,0],transition:{duration:.5,ease:"easeInOut"}}},Kg=e=>{const t={default:"107, 114, 128",primary:"59, 130, 246",secondary:"147, 51, 234",success:"34, 197, 94",warning:"234, 179, 8",danger:"239, 68, 68"};return t[e]||t.primary},Hg=e=>{const t=Kg(e);return{boxShadow:[`0 0 0 0px rgba(${t}, 0)`,`0 0 0 4px rgba(${t}, 0.1)`,`0 0 20px 8px rgba(${t}, 0.15)`],transition:{duration:.3,ease:"easeOut"}}},Xg={initial:{scale:1},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20}},yc=({children:e,className:t="",ariaLabel:r,color:n="primary",disabled:s=!1,isLoading:a=!1,onClick:o,type:i="button",size:l="md",variant:c="solid",radius:d="md",startIcon:u,endIcon:h,fullWidth:m=!1,disableAnimation:g=!1,hoverAnimation:w="scale",clickAnimation:x="scale","data-testid":b})=>{const[y,v]=p.useState(!1),C="inline-flex items-center justify-center font-medium border",S=Dg[l],j=Bg[d],A=Lg(n,c),k=Og(a),V=zg(s),M=$g(m),D=Wg(s,a,g,n),z=[C,S,j,A,k,V,M,D,t].filter(Boolean).join(" "),L=g?{}:w==="glow"?Hg(n):Gg[w],I=g?{}:Ug[x],R=()=>{s||a||(v(!0),setTimeout(()=>v(!1),300),o?.())};return f.jsxs(_.button,{"aria-label":r,disabled:s||a,className:z,onClick:R,type:i,"data-testid":b,...Xg,whileHover:s||a?{}:L,animate:y?I:{},children:[u&&f.jsx(Zn,{position:"start",children:u}),f.jsx(xc,{children:e}),h&&f.jsx(Zn,{position:"end",children:h}),a&&f.jsx(_.div,{className:"ml-2",initial:{opacity:0,scale:0},animate:{opacity:1,scale:1},transition:{duration:.2},children:f.jsx(_.div,{className:"rounded-full h-4 w-4 border-b-2 border-current",animate:{rotate:360},transition:{duration:1,repeat:1/0,ease:"linear"}})})]})},Yg=({children:e,className:t="",size:r="md",color:n="primary",variant:s="solid",radius:a="md",isAttached:o=!1,disabled:i=!1,disableAnimation:l=!1,"data-testid":c})=>{const u=[_g(o),t].filter(Boolean).join(" "),h=p.Children.map(e,m=>p.isValidElement(m)&&m.type===yc?p.cloneElement(m,{size:m.props.size||r,color:m.props.color||n,variant:m.props.variant||s,radius:m.props.radius||a,disabled:m.props.disabled||i,disableAnimation:m.props.disableAnimation??l}):m);return f.jsx("div",{className:u,"data-testid":c,children:h})},xc=({children:e,className:t="","data-testid":r})=>f.jsx("span",{className:`${t}`,"data-testid":r,children:e}),Zn=({children:e,className:t="",position:r="start","data-testid":n})=>{const s=r==="start"?"mr-2":"ml-2";return f.jsx("span",{className:`inline-flex items-center ${s} ${t}`,"data-testid":n,children:e})},qg=({children:e,className:t="","data-testid":r})=>f.jsx("span",{className:`${t}`,"data-testid":r,children:e}),Zg={sm:"p-3",md:"p-4",lg:"p-6",xl:"p-8"},Jg={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl",full:"rounded-full"},Qg=(e,t)=>({default:{elevated:"bg-white shadow-lg hover:shadow-xl border-gray-200 dark:bg-gray-800 dark:border-gray-600 dark:shadow-gray-900/20 dark:hover:shadow-gray-900/30",bordered:"bg-white border-2 border-gray-200 hover:border-gray-300 dark:bg-gray-800 dark:border-gray-600 dark:hover:border-gray-500",shadow:"bg-white shadow-md hover:shadow-lg dark:bg-gray-800 dark:shadow-gray-900/20 dark:hover:shadow-gray-900/30",flat:"bg-gray-50 hover:bg-gray-100 dark:bg-gray-900 dark:hover:bg-gray-800"},primary:{elevated:"bg-blue-50 shadow-lg hover:shadow-xl border-blue-200 dark:bg-blue-900/20 dark:border-blue-700 dark:shadow-blue-900/30 dark:hover:shadow-blue-900/40",bordered:"bg-blue-50 border-2 border-blue-200 hover:border-blue-300 dark:bg-blue-900/20 dark:border-blue-700 dark:hover:border-blue-600",shadow:"bg-blue-50 shadow-md shadow-blue-100 hover:shadow-lg hover:shadow-blue-200 dark:bg-blue-900/20 dark:shadow-blue-900/30 dark:hover:shadow-blue-900/40",flat:"bg-blue-100 hover:bg-blue-200 dark:bg-blue-900/30 dark:hover:bg-blue-900/40"},secondary:{elevated:"bg-purple-50 shadow-lg hover:shadow-xl border-purple-200 dark:bg-purple-900/20 dark:border-purple-700 dark:shadow-purple-900/30 dark:hover:shadow-purple-900/40",bordered:"bg-purple-50 border-2 border-purple-200 hover:border-purple-300 dark:bg-purple-900/20 dark:border-purple-700 dark:hover:border-purple-600",shadow:"bg-purple-50 shadow-md shadow-purple-100 hover:shadow-lg hover:shadow-purple-200 dark:bg-purple-900/20 dark:shadow-purple-900/30 dark:hover:shadow-purple-900/40",flat:"bg-purple-100 hover:bg-purple-200 dark:bg-purple-900/30 dark:hover:bg-purple-900/40"},success:{elevated:"bg-green-50 shadow-lg hover:shadow-xl border-green-200 dark:bg-green-900/20 dark:border-green-700 dark:shadow-green-900/30 dark:hover:shadow-green-900/40",bordered:"bg-green-50 border-2 border-green-200 hover:border-green-300 dark:bg-green-900/20 dark:border-green-700 dark:hover:border-green-600",shadow:"bg-green-50 shadow-md shadow-green-100 hover:shadow-lg hover:shadow-green-200 dark:bg-green-900/20 dark:shadow-green-900/30 dark:hover:shadow-green-900/40",flat:"bg-green-100 hover:bg-green-200 dark:bg-green-900/30 dark:hover:bg-green-900/40"},warning:{elevated:"bg-yellow-50 shadow-lg hover:shadow-xl border-yellow-200 dark:bg-yellow-900/20 dark:border-yellow-700 dark:shadow-yellow-900/30 dark:hover:shadow-yellow-900/40",bordered:"bg-yellow-50 border-2 border-yellow-200 hover:border-yellow-300 dark:bg-yellow-900/20 dark:border-yellow-700 dark:hover:border-yellow-600",shadow:"bg-yellow-50 shadow-md shadow-yellow-100 hover:shadow-lg hover:shadow-yellow-200 dark:bg-yellow-900/20 dark:shadow-yellow-900/30 dark:hover:shadow-yellow-900/40",flat:"bg-yellow-100 hover:bg-yellow-200 dark:bg-yellow-900/30 dark:hover:bg-yellow-900/40"},danger:{elevated:"bg-red-50 shadow-lg hover:shadow-xl border-red-200 dark:bg-red-900/20 dark:border-red-700 dark:shadow-red-900/30 dark:hover:shadow-red-900/40",bordered:"bg-red-50 border-2 border-red-200 hover:border-red-300 dark:bg-red-900/20 dark:border-red-700 dark:hover:border-red-600",shadow:"bg-red-50 shadow-md shadow-red-100 hover:shadow-lg hover:shadow-red-200 dark:bg-red-900/20 dark:shadow-red-900/30 dark:hover:shadow-red-900/40",flat:"bg-red-100 hover:bg-red-200 dark:bg-red-900/30 dark:hover:bg-red-900/40"}})[e][t],eb=(e=!1,t=!1,r=!1)=>{let n="";return r?"opacity-50 cursor-not-allowed":(e&&(n+="cursor-pointer focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 dark:focus:ring-blue-400 dark:focus:ring-offset-gray-800 "),(t||e)&&(n+="transition-all duration-200 ease-in-out "),n.trim())},tb=({children:e,className:t="",size:r="md",variant:n="elevated",color:s="default",radius:a="lg",isClickable:o=!1,isDisabled:i=!1,isHoverable:l=!1,onClick:c,"data-testid":d})=>{const u="relative overflow-hidden",h=Zg[r],m=Jg[a],g=Qg(s,n),w=eb(o,l,i),x=[u,h,m,g,w,t].filter(Boolean).join(" "),b=o?"button":"div";return f.jsx(b,{className:x,onClick:o&&!i?c:void 0,disabled:o&&i,"data-testid":d,children:e})},_s={sm:{wrapper:"w-4 h-4",icon:"w-3 h-3 text-xs",label:"text-sm"},md:{wrapper:"w-5 h-5",icon:"w-4 h-4 text-sm",label:"text-base"},lg:{wrapper:"w-6 h-6",icon:"w-5 h-5 text-base",label:"text-lg"}},rb={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"},nb=(e="primary",t=!1,r=!1,n=!1)=>{if(r)return t?"bg-gray-300 border-gray-300 text-gray-500":"bg-gray-100 border-gray-300";if(n)return t?"bg-red-500 border-red-500 text-white":"bg-white border-red-500 hover:border-red-600";const s={default:{selected:"bg-gray-600 border-gray-600 text-white hover:bg-gray-700 hover:border-gray-700",unselected:"bg-white border-gray-300 hover:border-gray-400"},primary:{selected:"bg-blue-600 border-blue-600 text-white hover:bg-blue-700 hover:border-blue-700",unselected:"bg-white border-gray-300 hover:border-blue-400"},secondary:{selected:"bg-purple-600 border-purple-600 text-white hover:bg-purple-700 hover:border-purple-700",unselected:"bg-white border-gray-300 hover:border-purple-400"},success:{selected:"bg-green-600 border-green-600 text-white hover:bg-green-700 hover:border-green-700",unselected:"bg-white border-gray-300 hover:border-green-400"},warning:{selected:"bg-yellow-500 border-yellow-500 text-white hover:bg-yellow-600 hover:border-yellow-600",unselected:"bg-white border-gray-300 hover:border-yellow-400"},danger:{selected:"bg-red-600 border-red-600 text-white hover:bg-red-700 hover:border-red-700",unselected:"bg-white border-gray-300 hover:border-red-400"}};return t?s[e].selected:s[e].unselected},sb=(e="md",t="md",r="primary",n=!1,s=!1,a=!1,o=!1)=>{const i=_s[e].wrapper,l=rb[t],c=nb(r,n,s,a);return["relative inline-flex items-center justify-center border-2 shrink-0",i,l,c,s?"cursor-not-allowed":"cursor-pointer focus-within:ring-2 focus-within:ring-offset-2 focus-within:ring-blue-500",!o&&!s?"transition-all duration-200 ease-in-out transform hover:scale-105 active:scale-95":"transition-colors duration-200 ease-in-out"].filter(Boolean).join(" ")},ab=(e="md",t=!1,r=!1,n=!1)=>["absolute flex items-center justify-center",_s[e].icon,t||r?"opacity-100 scale-100":"opacity-0 scale-75",n?"":"transition-all duration-200 ease-in-out"].filter(Boolean).join(" "),ob=(e="md",t=!1,r=!1,n=!1)=>["ml-2 select-none",_s[e].label,t?"text-gray-400 cursor-not-allowed":"text-gray-700",r&&n?"line-through":""].filter(Boolean).join(" "),ib=(e=!1)=>["inline-flex items-center",e?"opacity-60":""].filter(Boolean).join(" "),lb=()=>"absolute inset-0 w-full h-full opacity-0 cursor-pointer z-10",cb=({children:e,icon:t,value:r,name:n,size:s="md",color:a="primary",radius:o="md",lineThrough:i=!1,isSelected:l,defaultSelected:c=!1,isRequired:d=!1,isReadOnly:u=!1,isDisabled:h=!1,isIndeterminate:m=!1,isInvalid:g=!1,validationState:w,disableAnimation:x=!1,className:b="",classNames:y,onChange:v,onValueChange:C,"data-testid":S})=>{const[j,A]=p.useState(c),k=p.useRef(null),V=l!==void 0,M=V?l:j,D=g||w==="invalid",z=K=>{if(h||u)return;const W=K.target.checked;V||A(W),v?.(K),C?.(W)},I=[ib(h),y?.base,b].filter(Boolean).join(" "),B=[sb(s,o,a,M||m,h,D,x),y?.wrapper].filter(Boolean).join(" "),T=[ab(s,M,m,x),y?.icon].filter(Boolean).join(" "),E=[ob(s,h,i,M),y?.label].filter(Boolean).join(" "),$=[lb(),y?.hiddenInput].filter(Boolean).join(" "),O=()=>t?f.jsx(t,{isSelected:M,isIndeterminate:m,disableAnimation:x,className:T,"data-testid":`${S}-custom-icon`}):f.jsx(ub,{isSelected:M,isIndeterminate:m,disableAnimation:x,className:T,"data-testid":`${S}-icon`});return f.jsxs("label",{className:I,"data-testid":S,children:[f.jsxs(db,{className:B,"data-testid":`${S}-wrapper`,children:[f.jsx("input",{ref:k,type:"checkbox",value:r,name:n,checked:M||m,onChange:z,disabled:h,readOnly:u,required:d,"aria-invalid":D,"aria-checked":m?"mixed":M,className:$,"data-testid":`${S}-input`}),O()]}),e&&f.jsx("span",{className:E,"data-testid":`${S}-label`,children:e})]})},db=({children:e,className:t="","data-testid":r})=>f.jsx("div",{className:t,"data-testid":r,children:e}),ub=({isSelected:e=!1,isIndeterminate:t=!1,className:r="","data-testid":n})=>t?f.jsx("svg",{className:r,viewBox:"0 0 24 24",fill:"currentColor","data-testid":n,children:f.jsx("rect",{x:"6",y:"11",width:"12",height:"2",rx:"1"})}):e?f.jsx("svg",{className:r,viewBox:"0 0 24 24",fill:"currentColor","data-testid":n,children:f.jsx("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"})}):null,fb=H({slots:{base:["max-w-fit","min-w-min","inline-flex","items-center","justify-between","box-border","whitespace-nowrap","px-1","h-7","text-small","rounded-full","subpixel-antialiased","transition-colors","cursor-default","tap-highlight-transparent"],content:["flex-1","text-inherit","font-normal","px-2"],dot:["w-2","h-2","ml-1","rounded-full"],avatar:["flex","shrink-0","w-5","h-5","ml-1"],closeButton:["z-10","appearance-none","outline-none","select-none","transition-opacity","opacity-70","cursor-pointer","active:opacity-disabled","hover:opacity-100","rounded-full","flex","items-center","justify-center","box-border","w-5","h-5","mr-1"]},variants:{variant:{solid:{},bordered:{base:"border-medium bg-transparent"},light:{base:"bg-transparent"},flat:{},faded:{base:"border-small"},shadow:{base:"shadow-lg"},dot:{base:"border-medium border-default bg-transparent"}},color:{default:{},primary:{},secondary:{},success:{},warning:{},danger:{}},size:{sm:{base:"px-1 h-6 text-tiny",content:"px-1",closeButton:"w-4 h-4",avatar:"w-4 h-4"},md:{base:"px-1 h-7 text-small",content:"px-2",closeButton:"w-5 h-5",avatar:"w-5 h-5"},lg:{base:"px-1 h-8 text-medium",content:"px-2",closeButton:"w-6 h-6",avatar:"w-6 h-6"}},radius:{none:{base:"rounded-none"},sm:{base:"rounded-small"},md:{base:"rounded-medium"},lg:{base:"rounded-large"},full:{base:"rounded-full"}},isDisabled:{true:{base:"opacity-disabled pointer-events-none"},false:{}},isCloseButtonVisible:{true:{},false:{}}},compoundVariants:[{variant:"solid",color:"default",class:{base:"bg-default text-default-foreground"}},{variant:"solid",color:"primary",class:{base:"bg-primary text-primary-foreground"}},{variant:"solid",color:"secondary",class:{base:"bg-secondary text-secondary-foreground"}},{variant:"solid",color:"success",class:{base:"bg-success text-success-foreground"}},{variant:"solid",color:"warning",class:{base:"bg-warning text-warning-foreground"}},{variant:"solid",color:"danger",class:{base:"bg-danger text-danger-foreground"}},{variant:"bordered",color:"default",class:{base:"border-default text-foreground"}},{variant:"bordered",color:"primary",class:{base:"border-primary text-primary"}},{variant:"bordered",color:"secondary",class:{base:"border-secondary text-secondary"}},{variant:"bordered",color:"success",class:{base:"border-success text-success"}},{variant:"bordered",color:"warning",class:{base:"border-warning text-warning"}},{variant:"bordered",color:"danger",class:{base:"border-danger text-danger"}},{variant:"light",color:"default",class:{base:"text-default-600"}},{variant:"light",color:"primary",class:{base:"text-primary"}},{variant:"light",color:"secondary",class:{base:"text-secondary"}},{variant:"light",color:"success",class:{base:"text-success"}},{variant:"light",color:"warning",class:{base:"text-warning"}},{variant:"light",color:"danger",class:{base:"text-danger"}},{variant:"flat",color:"default",class:{base:"bg-default/20 text-default-600"}},{variant:"flat",color:"primary",class:{base:"bg-primary/20 text-primary-600"}},{variant:"flat",color:"secondary",class:{base:"bg-secondary/20 text-secondary-600"}},{variant:"flat",color:"success",class:{base:"bg-success/20 text-success-600 dark:text-success-500"}},{variant:"flat",color:"warning",class:{base:"bg-warning/20 text-warning-600 dark:text-warning-500"}},{variant:"flat",color:"danger",class:{base:"bg-danger/20 text-danger-500"}},{variant:"faded",color:"default",class:{base:"border-default bg-default-50 text-default-foreground"}},{variant:"faded",color:"primary",class:{base:"border-primary bg-primary-50 text-primary-600"}},{variant:"faded",color:"secondary",class:{base:"border-secondary bg-secondary-50 text-secondary-600"}},{variant:"faded",color:"success",class:{base:"border-success bg-success-50 text-success-600 dark:text-success-500"}},{variant:"faded",color:"warning",class:{base:"border-warning bg-warning-50 text-warning-600 dark:text-warning-500"}},{variant:"faded",color:"danger",class:{base:"border-danger bg-danger-50 text-danger-500"}},{variant:"shadow",color:"default",class:{base:"shadow-lg shadow-default/50 bg-default text-default-foreground"}},{variant:"shadow",color:"primary",class:{base:"shadow-lg shadow-primary/40 bg-primary text-primary-foreground"}},{variant:"shadow",color:"secondary",class:{base:"shadow-lg shadow-secondary/40 bg-secondary text-secondary-foreground"}},{variant:"shadow",color:"success",class:{base:"shadow-lg shadow-success/40 bg-success text-success-foreground"}},{variant:"shadow",color:"warning",class:{base:"shadow-lg shadow-warning/40 bg-warning text-warning-foreground"}},{variant:"shadow",color:"danger",class:{base:"shadow-lg shadow-danger/40 bg-danger text-danger-foreground"}},{variant:"dot",color:"default",class:{base:"text-default-foreground",dot:"bg-default-400"}},{variant:"dot",color:"primary",class:{base:"text-foreground",dot:"bg-primary"}},{variant:"dot",color:"secondary",class:{base:"text-foreground",dot:"bg-secondary"}},{variant:"dot",color:"success",class:{base:"text-foreground",dot:"bg-success"}},{variant:"dot",color:"warning",class:{base:"text-foreground",dot:"bg-warning"}},{variant:"dot",color:"danger",class:{base:"text-foreground",dot:"bg-danger"}}],defaultVariants:{variant:"solid",color:"default",size:"md",radius:"full",isDisabled:!1,isCloseButtonVisible:!1}}),pb=({className:e})=>f.jsx("svg",{className:e,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),vc=p.forwardRef(({children:e,variant:t="solid",color:r="default",size:n="md",radius:s="full",avatar:a,startContent:o,endContent:i,isDisabled:l=!1,classNames:c,className:d,onClose:u,...h},m)=>{const g=!!u,w=p.useMemo(()=>fb({variant:t,color:r,size:n,radius:s,isDisabled:l,isCloseButtonVisible:g}),[t,r,n,s,l,g]),x=()=>t!=="dot"?null:f.jsx("span",{className:q(w.dot(),c?.dot),"aria-hidden":"true"}),b=()=>a?f.jsx("span",{className:q(w.avatar(),c?.avatar),children:a}):null,y=()=>o||null,v=()=>u?f.jsx("button",{type:"button",className:q(w.closeButton(),c?.closeButton),onClick:u,"aria-label":"Close",disabled:l,children:i||f.jsx(pb,{className:"w-3 h-3"})}):i||null;return f.jsxs("div",{ref:m,className:q(w.base(),c?.base,d),...h,children:[x(),b(),y(),f.jsx("span",{className:q(w.content(),c?.content),children:e}),v()]})});vc.displayName="Chip";const Gs={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"},hb={none:"",sm:"shadow-sm",md:"shadow-md",lg:"shadow-lg"},mb=(e=!1)=>["relative inline-block",e?"overflow-hidden cursor-pointer transition-transform duration-300 ease-in-out hover:scale-105":""].filter(Boolean).join(" "),gb=(e="lg",t="none",r=!1)=>{const n=Gs[e],s=hb[t];return["relative z-10 max-w-full h-auto object-cover",n,s,r?"opacity-0 transition-opacity duration-500 ease-in-out":"opacity-100 transition-opacity duration-500 ease-in-out"].filter(Boolean).join(" ")},bb=(e="lg")=>["absolute inset-0 w-full h-full object-cover blur-2xl scale-125 opacity-70 z-0",Gs[e]].filter(Boolean).join(" "),yb=(e="lg")=>["animate-pulse bg-gray-200 dark:bg-gray-700",Gs[e]].filter(Boolean).join(" "),xb=({src:e,srcSet:t,sizes:r,alt:n,width:s,height:a,radius:o="lg",shadow:i="none",loading:l="lazy",fallbackSrc:c,isBlurred:d=!1,isZoomed:u=!1,removeWrapper:h=!1,disableSkeleton:m=!1,className:g="",classNames:w,onLoad:x,onError:b,"data-testid":y})=>{const[v,C]=p.useState(!m),[S,j]=p.useState(!1),[A,k]=p.useState(e),V=p.useRef(null),M=E=>{C(!1),j(!1),x?.(E)},D=()=>{j(!0),C(!1),c&&A!==c&&(k(c),C(!m)),b?.()};p.useEffect(()=>{e!==A&&!S&&(k(e),C(!m),j(!1))},[e,A,S,m]),p.useEffect(()=>{m&&C(!1)},[m]);const L=[gb(o,i,v),w?.img,g].filter(Boolean).join(" "),I=v&&!m&&f.jsx("div",{className:`${yb(o)} ${w?.wrapper||""}`,style:{width:s,height:a},"data-testid":`${y}-skeleton`}),R=f.jsx("img",{ref:V,src:A,srcSet:t,sizes:r,alt:n,width:s,height:a,loading:l,className:L,onLoad:M,onError:D,"data-testid":y}),B=d&&!v&&!S&&f.jsx(Cb,{src:A,alt:`${n} (blurred background)`,className:`${bb(o)} ${w?.blurredImg||""}`,"data-testid":`${y}-blurred`});if(h)return f.jsxs(f.Fragment,{children:[I,!v&&R]});const P=u?wb:vb,T=[mb(u),d?"p-2":""].filter(Boolean).join(" "),N=u?[T,w?.wrapper].filter(Boolean).join(" "):"";return f.jsxs(P,{className:u?N:`${T} ${w?.wrapper||""}`.trim(),isZoomed:u,"data-testid":`${y}-wrapper`,children:[I,!v&&f.jsxs(f.Fragment,{children:[B,R]})]})},vb=({children:e,className:t="","data-testid":r})=>f.jsx("div",{className:t,"data-testid":r,children:e}),wb=({children:e,className:t="","data-testid":r})=>f.jsx("div",{className:t,"data-testid":r,children:e}),Cb=({src:e,alt:t,className:r="","data-testid":n})=>f.jsx("img",{src:e,alt:t,className:r,"aria-hidden":"true","data-testid":n}),kb=(e=!0,t=!1,r="inside")=>{const n=["group","flex","flex-col"];return e&&n.push("w-full"),t&&n.push("opacity-disabled","pointer-events-none"),(r==="outside"||r==="outside-left")&&n.push("gap-2"),n.join(" ")},Sb=(e="inside")=>{const t=["flex"];return e==="outside-left"?t.push("flex-row","items-center","gap-4"):t.push("flex-col","gap-2"),t.join(" ")},jb=(e="md",t="default",r="inside",n=!1,s=!1)=>{const a=["select-none","font-medium","transition-colors","duration-200"],o={sm:"text-xs",md:"text-sm",lg:"text-base"};if(a.push(o[e]),s)a.push("text-danger");else{const i={default:"text-foreground-600",primary:"text-primary",secondary:"text-secondary",success:"text-success",warning:"text-warning",danger:"text-danger"};a.push(i[t])}if(r==="inside"){a.push("absolute","origin-top-left","left-3","pointer-events-none","transform-gpu","transition-all","duration-200","ease-out","group-data-[filled=true]:scale-85","group-data-[filled=true]:-translate-y-1.5","group-data-[focus=true]:scale-85","group-data-[focus=true]:-translate-y-1.5");const i={sm:"top-1.5",md:"top-2.5",lg:"top-3.5"};a.push(i[e])}else r==="outside-left"&&a.push("flex-shrink-0","w-32");return n&&a.push("after:content-['*']","after:text-danger","after:ml-0.5"),a.join(" ")},Tb=(e="flat",t="default",r="md",n="md",s=!1,a=!1,o=!1)=>{const i=["relative","inline-flex","items-center","w-full","transition-all","duration-200","ease-in-out","group-data-[focus=true]:z-10"],l={sm:"h-13 min-h-8 px-2.5",md:"h-15 min-h-10 px-3",lg:"h-18 min-h-12 px-4"};i.push(l[r]);const c={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"};if(i.push(c[n]),a)switch(e){case"flat":i.push("bg-danger-50","hover:bg-danger-100");break;case"bordered":i.push("border-2","border-danger","hover:border-danger-hover");break;case"faded":i.push("bg-danger-50","border-2","border-danger-200","hover:border-danger");break;case"underlined":i.push("border-b-2","border-danger","hover:border-danger-hover");break}else switch(e){case"flat":const d={default:"bg-default-100 hover:bg-default-200",primary:"bg-primary-50 hover:bg-primary-100",secondary:"bg-secondary-50 hover:bg-secondary-100",success:"bg-success-50 hover:bg-success-100",warning:"bg-warning-50 hover:bg-warning-100",danger:"bg-danger-50 hover:bg-danger-100"};i.push(d[t]);break;case"bordered":if(i.push("border-2"),s){const h={default:"border-default-400",primary:"border-primary",secondary:"border-secondary",success:"border-success",warning:"border-warning",danger:"border-danger"};i.push(h[t])}else i.push("border-default-200","hover:border-default-400");break;case"faded":const u={default:"bg-default-100 border-2 border-default-200 hover:border-default-400",primary:"bg-primary-50 border-2 border-primary-200 hover:border-primary",secondary:"bg-secondary-50 border-2 border-secondary-200 hover:border-secondary",success:"bg-success-50 border-2 border-success-200 hover:border-success",warning:"bg-warning-50 border-2 border-warning-200 hover:border-warning",danger:"bg-danger-50 border-2 border-danger-200 hover:border-danger"};i.push(u[t]);break;case"underlined":if(i.push("border-b-2","rounded-none"),s){const h={default:"border-default-400",primary:"border-primary",secondary:"border-secondary",success:"border-success",warning:"border-warning",danger:"border-danger"};i.push(h[t])}else i.push("border-default-300","hover:border-default-400");break}return o&&i.push("opacity-50","cursor-not-allowed"),i.join(" ")},Ab=()=>["inline-flex","items-center","w-full","gap-1.5","h-full"].join(" "),Mb=(e="md",t="inside")=>{const r=["w-full","font-normal","text-foreground","bg-transparent","outline-none","placeholder:text-foreground-500","focus-visible:outline-none","data-[has-start-content=true]:ps-1","data-[has-end-content=true]:pe-1"],n={sm:"text-sm",md:"text-sm",lg:"text-base"};return r.push(n[e]),t==="inside"&&r.push("group-data-[has-label=true]:pt-1"),r.join(" ")},Vb=(e="md")=>{const t=["p-1","rounded-full","text-foreground-400","hover:text-foreground-600","hover:bg-default-100","active:bg-default-200","transition-all","duration-150","cursor-pointer","flex-shrink-0"],r={sm:"w-4 h-4 text-xs",md:"w-5 h-5 text-sm",lg:"w-6 h-6 text-base"};return t.push(r[e]),t.join(" ")},Pb=()=>["flex","flex-col","gap-1.5","px-1"].join(" "),Eb=(e="md")=>{const t=["text-foreground-400"],r={sm:"text-xs",md:"text-sm",lg:"text-sm"};return t.push(r[e]),t.join(" ")},Ib=(e="md")=>{const t=["text-danger"],r={sm:"text-xs",md:"text-sm",lg:"text-sm"};return t.push(r[e]),t.join(" ")},Nb=(e="md")=>{const t=["flex-shrink-0","text-foreground-400"],r={sm:"text-sm",md:"text-base",lg:"text-lg"};return t.push(r[e]),t.join(" ")},Rb=(e,t)=>{const r=[];if(t.isRequired&&(!e||e.trim().length===0)&&r.push("This field is required"),!e||e.trim().length===0)return{isValid:r.length===0,errors:r};if(t.minLength&&e.length<t.minLength&&r.push(`Minimum length is ${t.minLength} characters`),t.maxLength&&e.length>t.maxLength&&r.push(`Maximum length is ${t.maxLength} characters`),t.pattern&&(new RegExp(t.pattern).test(e)||r.push("Invalid format")),t.type==="email"&&(/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)||r.push("Please enter a valid email address")),t.type==="url")try{new URL(e)}catch{r.push("Please enter a valid URL")}if(t.customValidate){const n=t.customValidate(e);n!==!0&&n!==null&&n!==void 0&&(Array.isArray(n)?r.push(...n):typeof n=="string"&&r.push(n))}return{isValid:r.length===0,errors:r}},wc=p.forwardRef(({label:e,placeholder:t,description:r,errorMessage:n,startContent:s,endContent:a,value:o,defaultValue:i,variant:l="flat",color:c="default",size:d="md",radius:u="md",labelPlacement:h="inside",fullWidth:m=!0,type:g="text",minLength:w,maxLength:x,pattern:b,isRequired:y=!1,isDisabled:v=!1,isReadOnly:C=!1,isInvalid:S=!1,isClearable:j=!1,disableAnimation:A=!1,classNames:k,className:V,validate:M,validationBehavior:D="native",baseRef:z,onChange:L,onValueChange:I,onClear:R,onFocus:B,onBlur:P,onKeyDown:T,onKeyUp:N,"data-testid":E,"aria-label":F,"aria-labelledby":$,"aria-describedby":O,...K},W)=>{const[J,Y]=p.useState(i||""),[Z,ne]=p.useState(!1),[ae,Te]=p.useState(!1),[he,at]=p.useState([]),Le=p.useRef(null),se=o!==void 0,Se=se?o:J,ye=Se&&Se.length>0,Ze=ye||Z,Oe=g==="password",Zr=Oe&&ae?"text":g,ur=M!==void 0,Ae=(S||he.length>0)&&!v,Q=`input-label-${Math.random().toString(36).substring(2,11)}`,de=r?`input-description-${Math.random().toString(36).substring(2,11)}`:void 0,ge=Ae?`input-error-${Math.random().toString(36).substring(2,11)}`:void 0;p.useEffect(()=>{if(ur||y||w||x||b){const Ne=Rb(Se,{isRequired:y,minLength:w,maxLength:x,pattern:b,type:g,customValidate:M});at(Ne.errors)}},[Se,y,w,x,b,g,M,ur]);const _e=Ne=>{const ta=Ne.target.value;se||Y(ta),L?.(Ne),I?.(ta)},Lt=Ne=>{ne(!0),B?.(Ne)},Zc=Ne=>{ne(!1),P?.(Ne)},Jc=()=>{se||Y(""),R?.(),I?.(""),Le.current?.focus()},Qc=()=>{Te(!ae)},ed=[kb(m,v,h),k?.base,V].filter(Boolean).join(" "),td=[Sb(h),k?.mainWrapper].filter(Boolean).join(" "),rd=[jb(d,c,h,y,Ae),k?.label].filter(Boolean).join(" "),nd=[Tb(l,c,d,u,Z,Ae,v),k?.inputWrapper].filter(Boolean).join(" "),sd=[Ab(),k?.innerWrapper].filter(Boolean).join(" "),ad=[Mb(d,h),k?.input].filter(Boolean).join(" "),Qs=[Vb(d),k?.clearButton].filter(Boolean).join(" "),od=[Pb(),k?.helperWrapper].filter(Boolean).join(" "),id=[Eb(d),k?.description].filter(Boolean).join(" "),ld=[Ib(d),k?.errorMessage].filter(Boolean).join(" "),ea=Nb(d),cd=()=>{if(!Ae)return null;if(typeof n=="function"){const Ne={isInvalid:Ae,validationErrors:he,validationDetails:{valid:he.length===0,valueMissing:y&&!ye,tooShort:w?Se.length<w:void 0,tooLong:x?Se.length>x:void 0,patternMismatch:b?!new RegExp(b).test(Se):void 0}};return n(Ne)}return n||(he.length>0?he[0]:null)},dd=()=>!j||!ye||v||C?null:f.jsx("button",{type:"button",className:Qs,onClick:Jc,tabIndex:-1,"data-testid":E?`${E}-clear-button`:void 0,children:f.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[f.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),f.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}),ud=()=>Oe?f.jsx("button",{type:"button",className:Qs,onClick:Qc,tabIndex:-1,"data-testid":E?`${E}-password-toggle`:void 0,children:ae?f.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[f.jsx("path",{d:"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94L17.94 17.94z"}),f.jsx("line",{x1:"1",y1:"1",x2:"23",y2:"23"}),f.jsx("path",{d:"M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19l-6.84-6.84z"})]}):f.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[f.jsx("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),f.jsx("circle",{cx:"12",cy:"12",r:"3"})]})}):null,Jr=()=>e?h==="inside"?f.jsxs("label",{id:Q,className:`
|
|
9
|
+
`),()=>{x.contains(v)&&x.removeChild(v)}},[t]),f.jsx(Lf,{isPresent:t,childRef:a,sizeRef:o,children:$r.cloneElement(e,{ref:l})})}const $f=({children:e,initial:t,isPresent:r,onExitComplete:s,custom:n,presenceAffectsLayout:a,mode:o,anchorX:i,root:l})=>{const c=pt(zf),d=h.useId();let u=!0,p=h.useMemo(()=>(u=!1,{id:d,initial:t,isPresent:r,custom:n,onExitComplete:m=>{c.set(m,!0);for(const g of c.values())if(!g)return;s&&s()},register:m=>(c.set(m,!1),()=>c.delete(m))}),[r,c,s]);return a&&u&&(p={...p}),h.useMemo(()=>{c.forEach((m,g)=>c.set(g,!1))},[r]),$r.useEffect(()=>{!r&&!c.size&&s&&s()},[r]),o==="popLayout"&&(e=f.jsx(Of,{isPresent:r,anchorX:i,root:l,children:e})),f.jsx(zr.Provider,{value:p,children:e})};function zf(){return new Map}function Yi(e=!0){const t=h.useContext(zr);if(t===null)return[!0,null];const{isPresent:r,onExitComplete:s,register:n}=t,a=h.useId();h.useEffect(()=>{if(e)return n(a)},[e]);const o=h.useCallback(()=>e&&s&&s(a),[a,s,e]);return!r&&s?[!1,o]:[!0]}const mr=e=>e.key||"";function Ia(e){const t=[];return h.Children.forEach(e,r=>{h.isValidElement(r)&&t.push(r)}),t}const We=({children:e,custom:t,initial:r=!0,onExitComplete:s,presenceAffectsLayout:n=!0,mode:a="sync",propagate:o=!1,anchorX:i="left",root:l})=>{const[c,d]=Yi(o),u=h.useMemo(()=>Ia(e),[e]),p=o&&!c?[]:u.map(mr),m=h.useRef(!0),g=h.useRef(u),v=pt(()=>new Map),[x,b]=h.useState(u),[y,w]=h.useState(u);nr(()=>{m.current=!1,g.current=u;for(let S=0;S<y.length;S++){const T=mr(y[S]);p.includes(T)?v.delete(T):v.get(T)!==!0&&v.set(T,!1)}},[y,p.length,p.join("-")]);const C=[];if(u!==x){let S=[...u];for(let T=0;T<y.length;T++){const k=y[T],V=mr(k);p.includes(V)||(S.splice(T,0,k),C.push(k))}return a==="wait"&&C.length&&(S=C),w(Ia(S)),b(u),null}process.env.NODE_ENV!=="production"&&a==="wait"&&y.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:j}=h.useContext(rn);return f.jsx(f.Fragment,{children:y.map(S=>{const T=mr(S),k=o&&!c?!1:u===y||p.includes(T),V=()=>{if(v.has(T))v.set(T,!0);else return;let A=!0;v.forEach(B=>{B||(A=!1)}),A&&(j?.(),w(g.current),o&&d?.(),s&&s())};return f.jsx($f,{isPresent:k,initial:!m.current||r?void 0:!1,custom:t,presenceAffectsLayout:n,mode:a,root:l,onExitComplete:k?void 0:V,anchorX:i,children:S},T)})})},qi=h.createContext({strict:!1}),Na={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"]},Tt={};for(const e in Na)Tt[e]={isEnabled:t=>Na[e].some(r=>!!t[r])};function Ff(e){for(const t in e)Tt[t]={...Tt[t],...e[t]}}const Wf=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 Rr(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Wf.has(e)}let Zi=e=>!Rr(e);function _f(e){typeof e=="function"&&(Zi=t=>t.startsWith("on")?!Rr(t):e(t))}try{_f(require("@emotion/is-prop-valid").default)}catch{}function Gf(e,t,r){const s={};for(const n in e)n==="values"&&typeof e.values=="object"||(Zi(n)||r===!0&&Rr(n)||!t&&!Rr(n)||e.draggable&&n.startsWith("onDrag"))&&(s[n]=e[n]);return s}const Hr=h.createContext({});function Kr(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Qt(e){return typeof e=="string"||Array.isArray(e)}const An=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Vn=["initial",...An];function Xr(e){return Kr(e.animate)||Vn.some(t=>Qt(e[t]))}function Ji(e){return!!(Xr(e)||e.variants)}function Uf(e,t){if(Xr(e)){const{initial:r,animate:s}=e;return{initial:r===!1||Qt(r)?r:void 0,animate:Qt(s)?s:void 0}}return e.inherit!==!1?t:{}}function Hf(e){const{initial:t,animate:r}=Uf(e,h.useContext(Hr));return h.useMemo(()=>({initial:t,animate:r}),[Ra(t),Ra(r)])}function Ra(e){return Array.isArray(e)?e.join(" "):e}const er={};function Kf(e){for(const t in e)er[t]=e[t],un(t)&&(er[t].isCSSVariable=!0)}function Qi(e,{layout:t,layoutId:r}){return Et.has(e)||e.startsWith("origin")||(t||r!==void 0)&&(!!er[e]||e==="opacity")}const Xf={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Yf=Pt.length;function qf(e,t,r){let s="",n=!0;for(let a=0;a<Yf;a++){const o=Pt[a],i=e[o];if(i===void 0)continue;let l=!0;if(typeof i=="number"?l=i===(o.startsWith("scale")?1:0):l=parseFloat(i)===0,!l||r){const c=Wi(i,jn[o]);if(!l){n=!1;const d=Xf[o]||o;s+=`${d}(${c}) `}r&&(t[o]=c)}}return s=s.trim(),r?s=r(t,n?"":s):n&&(s="none"),s}function Pn(e,t,r){const{style:s,vars:n,transformOrigin:a}=e;let o=!1,i=!1;for(const l in t){const c=t[l];if(Et.has(l)){o=!0;continue}else if(un(l)){n[l]=c;continue}else{const d=Wi(c,jn[l]);l.startsWith("origin")?(i=!0,a[l]=d):s[l]=d}}if(t.transform||(o||r?s.transform=qf(t,e.transform,r):s.transform&&(s.transform="none")),i){const{originX:l="50%",originY:c="50%",originZ:d=0}=a;s.transformOrigin=`${l} ${c} ${d}`}}const En=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function el(e,t,r){for(const s in t)!fe(t[s])&&!Qi(s,r)&&(e[s]=t[s])}function Zf({transformTemplate:e},t){return h.useMemo(()=>{const r=En();return Pn(r,t,e),Object.assign({},r.vars,r.style)},[t])}function Jf(e,t){const r=e.style||{},s={};return el(s,r,e),Object.assign(s,Zf(e,t)),s}function Qf(e,t){const r={},s=Jf(e,t);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=s,r}const e0={offset:"stroke-dashoffset",array:"stroke-dasharray"},t0={offset:"strokeDashoffset",array:"strokeDasharray"};function r0(e,t,r=1,s=0,n=!0){e.pathLength=1;const a=n?e0:t0;e[a.offset]=X.transform(-s);const o=X.transform(t),i=X.transform(r);e[a.array]=`${o} ${i}`}function tl(e,{attrX:t,attrY:r,attrScale:s,pathLength:n,pathSpacing:a=1,pathOffset:o=0,...i},l,c,d){if(Pn(e,i,c),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:u,style:p}=e;u.transform&&(p.transform=u.transform,delete u.transform),(p.transform||u.transformOrigin)&&(p.transformOrigin=u.transformOrigin??"50% 50%",delete u.transformOrigin),p.transform&&(p.transformBox=d?.transformBox??"fill-box",delete u.transformBox),t!==void 0&&(u.x=t),r!==void 0&&(u.y=r),s!==void 0&&(u.scale=s),n!==void 0&&r0(u,n,a,o,!1)}const rl=()=>({...En(),attrs:{}}),sl=e=>typeof e=="string"&&e.toLowerCase()==="svg";function s0(e,t,r,s){const n=h.useMemo(()=>{const a=rl();return tl(a,t,sl(s),e.transformTemplate,e.style),{...a.attrs,style:{...a.style}}},[t]);if(e.style){const a={};el(a,e.style,e),n.style={...a,...n.style}}return n}const n0=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function In(e){return typeof e!="string"||e.includes("-")?!1:!!(n0.indexOf(e)>-1||/[A-Z]/u.test(e))}function a0(e,t,r,{latestValues:s},n,a=!1){const i=(In(e)?s0:Qf)(t,s,n,e),l=Gf(t,typeof e=="string",a),c=e!==h.Fragment?{...l,...i,ref:r}:{},{children:d}=t,u=h.useMemo(()=>fe(d)?d.get():d,[d]);return h.createElement(e,{...c,children:u})}function Ba(e){const t=[{},{}];return e?.values.forEach((r,s)=>{t[0][s]=r.get(),t[1][s]=r.getVelocity()}),t}function Nn(e,t,r,s){if(typeof t=="function"){const[n,a]=Ba(s);t=t(r!==void 0?r:e.custom,n,a)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[n,a]=Ba(s);t=t(r!==void 0?r:e.custom,n,a)}return t}function Vr(e){return fe(e)?e.get():e}function o0({scrapeMotionValuesFromProps:e,createRenderState:t},r,s,n){return{latestValues:i0(r,s,n,e),renderState:t()}}function i0(e,t,r,s){const n={},a=s(e,{});for(const p in a)n[p]=Vr(a[p]);let{initial:o,animate:i}=e;const l=Xr(e),c=Ji(e);t&&c&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),i===void 0&&(i=t.animate));let d=r?r.initial===!1:!1;d=d||o===!1;const u=d?i:o;if(u&&typeof u!="boolean"&&!Kr(u)){const p=Array.isArray(u)?u:[u];for(let m=0;m<p.length;m++){const g=Nn(e,p[m]);if(g){const{transitionEnd:v,transition:x,...b}=g;for(const y in b){let w=b[y];if(Array.isArray(w)){const C=d?w.length-1:0;w=w[C]}w!==null&&(n[y]=w)}for(const y in v)n[y]=v[y]}}}return n}const nl=e=>(t,r)=>{const s=h.useContext(Hr),n=h.useContext(zr),a=()=>o0(e,t,s,n);return r?a():pt(a)};function Rn(e,t,r){const{style:s}=e,n={};for(const a in s)(fe(s[a])||t.style&&fe(t.style[a])||Qi(a,e)||r?.getValue(a)?.liveStyle!==void 0)&&(n[a]=s[a]);return n}const l0=nl({scrapeMotionValuesFromProps:Rn,createRenderState:En});function al(e,t,r){const s=Rn(e,t,r);for(const n in e)if(fe(e[n])||fe(t[n])){const a=Pt.indexOf(n)!==-1?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n;s[a]=e[n]}return s}const c0=nl({scrapeMotionValuesFromProps:al,createRenderState:rl}),d0=Symbol.for("motionComponentSymbol");function wt(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function u0(e,t,r){return h.useCallback(s=>{s&&e.onMount&&e.onMount(s),t&&(s?t.mount(s):t.unmount()),r&&(typeof r=="function"?r(s):wt(r)&&(r.current=s))},[t])}const Bn=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),f0="framerAppearId",ol="data-"+Bn(f0),il=h.createContext({});function h0(e,t,r,s,n){const{visualElement:a}=h.useContext(Hr),o=h.useContext(qi),i=h.useContext(zr),l=h.useContext(lr).reducedMotion,c=h.useRef(null);s=s||o.renderer,!c.current&&s&&(c.current=s(e,{visualState:t,parent:a,props:r,presenceContext:i,blockInitialAnimation:i?i.initial===!1:!1,reducedMotionConfig:l}));const d=c.current,u=h.useContext(il);d&&!d.projection&&n&&(d.type==="html"||d.type==="svg")&&p0(c.current,r,n,u);const p=h.useRef(!1);h.useInsertionEffect(()=>{d&&p.current&&d.update(r,i)});const m=r[ol],g=h.useRef(!!m&&!window.MotionHandoffIsComplete?.(m)&&window.MotionHasOptimisedAnimation?.(m));return nr(()=>{d&&(p.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),d.scheduleRenderMicrotask(),g.current&&d.animationState&&d.animationState.animateChanges())}),h.useEffect(()=>{d&&(!g.current&&d.animationState&&d.animationState.animateChanges(),g.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(m)}),g.current=!1),d.enteringChildren=void 0)}),d}function p0(e,t,r,s){const{layoutId:n,layout:a,drag:o,dragConstraints:i,layoutScroll:l,layoutRoot:c,layoutCrossfade:d}=t;e.projection=new r(e.latestValues,t["data-framer-portal-id"]?void 0:ll(e.parent)),e.projection.setOptions({layoutId:n,layout:a,alwaysMeasureLayout:!!o||i&&wt(i),visualElement:e,animationType:typeof a=="string"?a:"both",initialPromotionConfig:s,crossfade:d,layoutScroll:l,layoutRoot:c})}function ll(e){if(e)return e.options.allowProjection!==!1?e.projection:ll(e.parent)}function is(e,{forwardMotionProps:t=!1}={},r,s){r&&Ff(r);const n=In(e)?c0:l0;function a(i,l){let c;const d={...h.useContext(lr),...i,layoutId:m0(i)},{isStatic:u}=d,p=Hf(i),m=n(i,u);if(!u&&sn){g0(d,r);const g=b0(d);c=g.MeasureLayout,p.visualElement=h0(e,m,d,s,g.ProjectionNode)}return f.jsxs(Hr.Provider,{value:p,children:[c&&p.visualElement?f.jsx(c,{visualElement:p.visualElement,...d}):null,a0(e,i,u0(m,p.visualElement,l),m,u,t)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const o=h.forwardRef(a);return o[d0]=e,o}function m0({layoutId:e}){const t=h.useContext(rn).id;return t&&e!==void 0?t+"-"+e:e}function g0(e,t){const r=h.useContext(qi).strict;if(process.env.NODE_ENV!=="production"&&t&&r){const s="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?At(!1,s,"lazy-strict-mode"):be(!1,s,"lazy-strict-mode")}}function b0(e){const{drag:t,layout:r}=Tt;if(!t&&!r)return{};const s={...t,...r};return{MeasureLayout:t?.isEnabled(e)||r?.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function y0(e,t){if(typeof Proxy>"u")return is;const r=new Map,s=(a,o)=>is(a,o,e,t),n=(a,o)=>(process.env.NODE_ENV!=="production"&&Wr(!1,"motion() is deprecated. Use motion.create() instead."),s(a,o));return new Proxy(n,{get:(a,o)=>o==="create"?s:(r.has(o)||r.set(o,is(o,void 0,e,t)),r.get(o))})}function cl({top:e,left:t,right:r,bottom:s}){return{x:{min:t,max:r},y:{min:e,max:s}}}function x0({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function v0(e,t){if(!t)return e;const r=t({x:e.left,y:e.top}),s=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:s.y,right:s.x}}function ls(e){return e===void 0||e===1}function Rs({scale:e,scaleX:t,scaleY:r}){return!ls(e)||!ls(t)||!ls(r)}function lt(e){return Rs(e)||dl(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function dl(e){return Da(e.x)||Da(e.y)}function Da(e){return e&&e!=="0%"}function Br(e,t,r){const s=e-r,n=t*s;return r+n}function La(e,t,r,s,n){return n!==void 0&&(e=Br(e,n,s)),Br(e,r,s)+t}function Bs(e,t=0,r=1,s,n){e.min=La(e.min,t,r,s,n),e.max=La(e.max,t,r,s,n)}function ul(e,{x:t,y:r}){Bs(e.x,t.translate,t.scale,t.originPoint),Bs(e.y,r.translate,r.scale,r.originPoint)}const Oa=.999999999999,$a=1.0000000000001;function w0(e,t,r,s=!1){const n=r.length;if(!n)return;t.x=t.y=1;let a,o;for(let i=0;i<n;i++){a=r[i],o=a.projectionDelta;const{visualElement:l}=a.options;l&&l.props.style&&l.props.style.display==="contents"||(s&&a.options.layoutScroll&&a.scroll&&a!==a.root&&kt(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,ul(e,o)),s&<(a.latestValues)&&kt(e,a.latestValues))}t.x<$a&&t.x>Oa&&(t.x=1),t.y<$a&&t.y>Oa&&(t.y=1)}function Ct(e,t){e.min=e.min+t,e.max=e.max+t}function za(e,t,r,s,n=.5){const a=oe(e.min,e.max,n);Bs(e,t,r,a,s)}function kt(e,t){za(e.x,t.x,t.scaleX,t.scale,t.originX),za(e.y,t.y,t.scaleY,t.scale,t.originY)}function fl(e,t){return cl(v0(e.getBoundingClientRect(),t))}function C0(e,t,r){const s=fl(e,r),{scroll:n}=t;return n&&(Ct(s.x,n.offset.x),Ct(s.y,n.offset.y)),s}const Fa=()=>({translate:0,scale:1,origin:0,originPoint:0}),jt=()=>({x:Fa(),y:Fa()}),Wa=()=>({min:0,max:0}),ce=()=>({x:Wa(),y:Wa()}),Ds={current:null},hl={current:!1};function k0(){if(hl.current=!0,!!sn)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Ds.current=e.matches;e.addEventListener("change",t),t()}else Ds.current=!1}const tr=new WeakMap;function j0(e,t,r){for(const s in t){const n=t[s],a=r[s];if(fe(n))e.addValue(s,n);else if(fe(a))e.addValue(s,Be(n,{owner:e}));else if(a!==n)if(e.hasValue(s)){const o=e.getValue(s);o.liveStyle===!0?o.jump(n):o.hasAnimated||o.set(n)}else{const o=e.getStaticValue(s);e.addValue(s,Be(o!==void 0?o:n,{owner:e}))}}for(const s in r)t[s]===void 0&&e.removeValue(s);return t}const _a=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class pl{scrapeMotionValuesFromProps(t,r,s){return{}}constructor({parent:t,props:r,presenceContext:s,reducedMotionConfig:n,blockInitialAnimation:a,visualState:o},i={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=wn,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 p=we.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,re.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=o;this.latestValues=l,this.baseTarget={...l},this.initialValues=r.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=r,this.presenceContext=s,this.depth=t?t.depth+1:0,this.reducedMotionConfig=n,this.options=i,this.blockInitialAnimation=!!a,this.isControllingVariants=Xr(r),this.isVariantNode=Ji(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...u}=this.scrapeMotionValuesFromProps(r,{},this);for(const p in u){const m=u[p];l[p]!==void 0&&fe(m)&&m.set(l[p])}}mount(t){this.current=t,tr.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,s)=>this.bindToMotionValue(s,r)),hl.current||k0(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Ds.current,process.env.NODE_ENV!=="production"&&Wr(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),De(this.notifyUpdate),De(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const r=this.features[t];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,r){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const s=Et.has(t);s&&this.onBindTransform&&this.onBindTransform();const n=r.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&re.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,r)),this.valueSubscriptions.set(t,()=>{n(),a&&a(),r.owner&&r.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 Tt){const r=Tt[t];if(!r)continue;const{isEnabled:s,Feature:n}=r;if(!this.features[t]&&n&&s(this.props)&&(this.features[t]=new n(this)),this.features[t]){const a=this.features[t];a.isMounted?a.update():(a.mount(),a.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):ce()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,r){this.latestValues[t]=r}update(t,r){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=r;for(let s=0;s<_a.length;s++){const n=_a[s];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const a="on"+n,o=t[a];o&&(this.propEventSubscriptions[n]=this.on(n,o))}this.prevMotionValues=j0(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 r=this.getClosestVariantNode();if(r)return r.variantChildren&&r.variantChildren.add(t),()=>r.variantChildren.delete(t)}addValue(t,r){const s=this.values.get(t);r!==s&&(s&&this.removeValue(t),this.bindToMotionValue(t,r),this.values.set(t,r),this.latestValues[t]=r.get())}removeValue(t){this.values.delete(t);const r=this.valueSubscriptions.get(t);r&&(r(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,r){if(this.props.values&&this.props.values[t])return this.props.values[t];let s=this.values.get(t);return s===void 0&&r!==void 0&&(s=Be(r===null?void 0:r,{owner:this}),this.addValue(t,s)),s}readValue(t,r){let s=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return s!=null&&(typeof s=="string"&&(ti(s)||si(s))?s=parseFloat(s):!Rf(s)&&tt.test(r)&&(s=Fi(t,r)),this.setBaseTarget(t,fe(s)?s.get():s)),fe(s)?s.get():s}setBaseTarget(t,r){this.baseTarget[t]=r}getBaseTarget(t){const{initial:r}=this.props;let s;if(typeof r=="string"||typeof r=="object"){const a=Nn(this.props,r,this.presenceContext?.custom);a&&(s=a[t])}if(r&&s!==void 0)return s;const n=this.getBaseTargetFromProps(this.props,t);return n!==void 0&&!fe(n)?n:this.initialValues[t]!==void 0&&s===void 0?void 0:this.baseTarget[t]}on(t,r){return this.events[t]||(this.events[t]=new on),this.events[t].add(r)}notify(t,...r){this.events[t]&&this.events[t].notify(...r)}scheduleRenderMicrotask(){Tn.render(this.render)}}class ml extends pl{constructor(){super(...arguments),this.KeyframeResolver=hf}sortInstanceNodePosition(t,r){return t.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(t,r){return t.style?t.style[r]:void 0}removeValueFromRenderState(t,{vars:r,style:s}){delete r[t],delete s[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;fe(t)&&(this.childSubscription=t.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}}function gl(e,{style:t,vars:r},s,n){const a=e.style;let o;for(o in t)a[o]=t[o];n?.applyProjectionStyles(a,s);for(o in r)a.setProperty(o,r[o])}function S0(e){return window.getComputedStyle(e)}class bl extends ml{constructor(){super(...arguments),this.type="html",this.renderInstance=gl}readValueFromInstance(t,r){if(Et.has(r))return this.projection?.isProjecting?Ms(r):Vu(t,r);{const s=S0(t),n=(un(r)?s.getPropertyValue(r):s[r])||0;return typeof n=="string"?n.trim():n}}measureInstanceViewportBox(t,{transformPagePoint:r}){return fl(t,r)}build(t,r,s){Pn(t,r,s.transformTemplate)}scrapeMotionValuesFromProps(t,r,s){return Rn(t,r,s)}}const yl=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 T0(e,t,r,s){gl(e,t,void 0,s);for(const n in t.attrs)e.setAttribute(yl.has(n)?n:Bn(n),t.attrs[n])}class xl extends ml{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ce}getBaseTargetFromProps(t,r){return t[r]}readValueFromInstance(t,r){if(Et.has(r)){const s=zi(r);return s&&s.default||0}return r=yl.has(r)?r:Bn(r),t.getAttribute(r)}scrapeMotionValuesFromProps(t,r,s){return al(t,r,s)}build(t,r,s){tl(t,r,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(t,r,s,n){T0(t,r,s,n)}mount(t){this.isSVGTag=sl(t.tagName),super.mount(t)}}const M0=(e,t)=>In(e)?new xl(t):new bl(t,{allowProjection:e!==h.Fragment});function St(e,t,r){const s=e.getProps();return Nn(s,t,r!==void 0?r:s.custom,e)}const Ls=e=>Array.isArray(e);function A0(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,Be(r))}function V0(e){return Ls(e)?e[e.length-1]||0:e}function Dn(e,t){const r=St(e,t);let{transitionEnd:s={},transition:n={},...a}=r||{};a={...a,...s};for(const o in a){const i=V0(a[o]);A0(e,o,i)}}function P0(e){return!!(fe(e)&&e.add)}function Os(e,t){const r=e.getValue("willChange");if(P0(r))return r.add(t);if(!r&&He.WillChange){const s=new He.WillChange("auto");e.addValue("willChange",s),s.add(t)}}function vl(e){return e.props[ol]}const E0=e=>e!==null;function I0(e,{repeat:t,repeatType:r="loop"},s){const n=e.filter(E0),a=t&&r!=="loop"&&t%2===1?0:n.length-1;return n[a]}const N0={type:"spring",stiffness:500,damping:25,restSpeed:10},R0=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),B0={type:"keyframes",duration:.8},D0={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},L0=(e,{keyframes:t})=>t.length>2?B0:Et.has(e)?e.startsWith("scale")?R0(t[1]):N0:D0;function O0({when:e,delay:t,delayChildren:r,staggerChildren:s,staggerDirection:n,repeat:a,repeatType:o,repeatDelay:i,from:l,elapsed:c,...d}){return!!Object.keys(d).length}const Ln=(e,t,r,s={},n,a)=>o=>{const i=kn(s,e)||{},l=i.delay||s.delay||0;let{elapsed:c=0}=s;c=c-Ie(l);const d={keyframes:Array.isArray(r)?r:[null,r],ease:"easeOut",velocity:t.getVelocity(),...i,delay:-c,onUpdate:p=>{t.set(p),i.onUpdate&&i.onUpdate(p)},onComplete:()=>{o(),i.onComplete&&i.onComplete()},name:e,motionValue:t,element:a?void 0:n};O0(i)||Object.assign(d,L0(e,d)),d.duration&&(d.duration=Ie(d.duration)),d.repeatDelay&&(d.repeatDelay=Ie(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let u=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(Is(d),d.delay===0&&(u=!0)),(He.instantAnimations||He.skipAnimations)&&(u=!0,Is(d),d.delay=0),d.allowFlatten=!i.type&&!i.ease,u&&!a&&t.get()!==void 0){const p=I0(d.keyframes,i);if(p!==void 0){re.update(()=>{d.onUpdate(p),d.onComplete()});return}}return i.isSync?new _r(d):new Zu(d)};function $0({protectedKeys:e,needsAnimating:t},r){const s=e.hasOwnProperty(r)&&t[r]!==!0;return t[r]=!1,s}function On(e,t,{delay:r=0,transitionOverride:s,type:n}={}){let{transition:a=e.getDefaultTransition(),transitionEnd:o,...i}=t;s&&(a=s);const l=[],c=n&&e.animationState&&e.animationState.getState()[n];for(const d in i){const u=e.getValue(d,e.latestValues[d]??null),p=i[d];if(p===void 0||c&&$0(c,d))continue;const m={delay:r,...kn(a||{},d)},g=u.get();if(g!==void 0&&!u.isAnimating&&!Array.isArray(p)&&p===g&&!m.velocity)continue;let v=!1;if(window.MotionHandoffAnimation){const b=vl(e);if(b){const y=window.MotionHandoffAnimation(b,d,re);y!==null&&(m.startTime=y,v=!0)}}Os(e,d),u.start(Ln(d,u,p,e.shouldReduceMotion&&Li.has(d)?{type:!1}:m,e,v));const x=u.animation;x&&l.push(x)}return o&&Promise.all(l).then(()=>{re.update(()=>{o&&Dn(e,o)})}),l}function wl(e,t,r,s=0,n=1){const a=Array.from(e).sort((c,d)=>c.sortNodePosition(d)).indexOf(t),o=e.size,i=(o-1)*s;return typeof r=="function"?r(a,o):n===1?a*s:i-a*s}function $s(e,t,r={}){const s=St(e,t,r.type==="exit"?e.presenceContext?.custom:void 0);let{transition:n=e.getDefaultTransition()||{}}=s||{};r.transitionOverride&&(n=r.transitionOverride);const a=s?()=>Promise.all(On(e,s,r)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:d,staggerDirection:u}=n;return z0(e,t,l,c,d,u,r)}:()=>Promise.resolve(),{when:i}=n;if(i){const[l,c]=i==="beforeChildren"?[a,o]:[o,a];return l().then(()=>c())}else return Promise.all([a(),o(r.delay)])}function z0(e,t,r=0,s=0,n=0,a=1,o){const i=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),i.push($s(l,t,{...o,delay:r+(typeof s=="function"?0:s)+wl(e.variantChildren,l,s,n,a)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(i)}function Cl(e,t,r={}){e.notify("AnimationStart",t);let s;if(Array.isArray(t)){const n=t.map(a=>$s(e,a,r));s=Promise.all(n)}else if(typeof t=="string")s=$s(e,t,r);else{const n=typeof t=="function"?St(e,t,r.custom):t;s=Promise.all(On(e,n,r))}return s.then(()=>{e.notify("AnimationComplete",t)})}function kl(e,t){if(!Array.isArray(t))return!1;const r=t.length;if(r!==e.length)return!1;for(let s=0;s<r;s++)if(t[s]!==e[s])return!1;return!0}const F0=Vn.length;function jl(e){if(!e)return;if(!e.isControllingVariants){const r=e.parent?jl(e.parent)||{}:{};return e.props.initial!==void 0&&(r.initial=e.props.initial),r}const t={};for(let r=0;r<F0;r++){const s=Vn[r],n=e.props[s];(Qt(n)||n===!1)&&(t[s]=n)}return t}const W0=[...An].reverse(),_0=An.length;function G0(e){return t=>Promise.all(t.map(({animation:r,options:s})=>Cl(e,r,s)))}function U0(e){let t=G0(e),r=Ga(),s=!0;const n=l=>(c,d)=>{const u=St(e,d,l==="exit"?e.presenceContext?.custom:void 0);if(u){const{transition:p,transitionEnd:m,...g}=u;c={...c,...g,...m}}return c};function a(l){t=l(e)}function o(l){const{props:c}=e,d=jl(e.parent)||{},u=[],p=new Set;let m={},g=1/0;for(let x=0;x<_0;x++){const b=W0[x],y=r[b],w=c[b]!==void 0?c[b]:d[b],C=Qt(w),j=b===l?y.isActive:null;j===!1&&(g=x);let S=w===d[b]&&w!==c[b]&&C;if(S&&s&&e.manuallyAnimateOnMount&&(S=!1),y.protectedKeys={...m},!y.isActive&&j===null||!w&&!y.prevProp||Kr(w)||typeof w=="boolean")continue;const T=H0(y.prevProp,w);let k=T||b===l&&y.isActive&&!S&&C||x>g&&C,V=!1;const A=Array.isArray(w)?w:[w];let B=A.reduce(n(b),{});j===!1&&(B={});const{prevResolvedValues:$={}}=y,L={...$,...B},I=P=>{k=!0,p.has(P)&&(V=!0,p.delete(P)),y.needsAnimating[P]=!0;const M=e.getValue(P);M&&(M.liveStyle=!1)};for(const P in L){const M=B[P],N=$[P];if(m.hasOwnProperty(P))continue;let E=!1;Ls(M)&&Ls(N)?E=!kl(M,N):E=M!==N,E?M!=null?I(P):p.add(P):M!==void 0&&p.has(P)?I(P):y.protectedKeys[P]=!0}y.prevProp=w,y.prevResolvedValues=B,y.isActive&&(m={...m,...B}),s&&e.blockInitialAnimation&&(k=!1);const R=S&&T;k&&(!R||V)&&u.push(...A.map(P=>{const M={type:b};if(typeof P=="string"&&s&&!R&&e.manuallyAnimateOnMount&&e.parent){const{parent:N}=e,E=St(N,P);if(N.enteringChildren&&E){const{delayChildren:F}=E.transition||{};M.delay=wl(N.enteringChildren,e,F)}}return{animation:P,options:M}}))}if(p.size){const x={};if(typeof c.initial!="boolean"){const b=St(e,Array.isArray(c.initial)?c.initial[0]:c.initial);b&&b.transition&&(x.transition=b.transition)}p.forEach(b=>{const y=e.getBaseTarget(b),w=e.getValue(b);w&&(w.liveStyle=!0),x[b]=y??null}),u.push({animation:x})}let v=!!u.length;return s&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(v=!1),s=!1,v?t(u):Promise.resolve()}function i(l,c){if(r[l].isActive===c)return Promise.resolve();e.variantChildren?.forEach(u=>u.animationState?.setActive(l,c)),r[l].isActive=c;const d=o(l);for(const u in r)r[u].protectedKeys={};return d}return{animateChanges:o,setActive:i,setAnimateFunction:a,getState:()=>r,reset:()=>{r=Ga()}}}function H0(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!kl(t,e):!1}function ot(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Ga(){return{animate:ot(!0),whileInView:ot(),whileHover:ot(),whileTap:ot(),whileDrag:ot(),whileFocus:ot(),exit:ot()}}class rt{constructor(t){this.isMounted=!1,this.node=t}update(){}}class K0 extends rt{constructor(t){super(t),t.animationState||(t.animationState=U0(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Kr(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:r}=this.node.prevProps||{};t!==r&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let X0=0;class Y0 extends rt{constructor(){super(...arguments),this.id=X0++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:r}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===s)return;const n=this.node.animationState.setActive("exit",!t);r&&!t&&n.then(()=>{r(this.id)})}mount(){const{register:t,onExitComplete:r}=this.node.presenceContext||{};r&&r(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const q0={animation:{Feature:K0},exit:{Feature:Y0}};function rr(e,t,r,s={passive:!0}){return e.addEventListener(t,r,s),()=>e.removeEventListener(t,r)}function cr(e){return{point:{x:e.pageX,y:e.pageY}}}const Z0=e=>t=>Mn(t)&&e(t,cr(t));function Ht(e,t,r,s){return rr(e,t,Z0(r),s)}const Sl=1e-4,J0=1-Sl,Q0=1+Sl,Tl=.01,eh=0-Tl,th=0+Tl;function xe(e){return e.max-e.min}function rh(e,t,r){return Math.abs(e-t)<=r}function Ua(e,t,r,s=.5){e.origin=s,e.originPoint=oe(t.min,t.max,e.origin),e.scale=xe(r)/xe(t),e.translate=oe(r.min,r.max,e.origin)-e.originPoint,(e.scale>=J0&&e.scale<=Q0||isNaN(e.scale))&&(e.scale=1),(e.translate>=eh&&e.translate<=th||isNaN(e.translate))&&(e.translate=0)}function Kt(e,t,r,s){Ua(e.x,t.x,r.x,s?s.originX:void 0),Ua(e.y,t.y,r.y,s?s.originY:void 0)}function Ha(e,t,r){e.min=r.min+t.min,e.max=e.min+xe(t)}function sh(e,t,r){Ha(e.x,t.x,r.x),Ha(e.y,t.y,r.y)}function Ka(e,t,r){e.min=t.min-r.min,e.max=e.min+xe(t)}function Xt(e,t,r){Ka(e.x,t.x,r.x),Ka(e.y,t.y,r.y)}function Pe(e){return[e("x"),e("y")]}const Ml=({current:e})=>e?e.ownerDocument.defaultView:null,Xa=(e,t)=>Math.abs(e-t);function nh(e,t){const r=Xa(e.x,t.x),s=Xa(e.y,t.y);return Math.sqrt(r**2+s**2)}class Al{constructor(t,r,{transformPagePoint:s,contextWindow:n=window,dragSnapToOrigin:a=!1,distanceThreshold:o=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 p=ds(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,g=nh(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!m&&!g)return;const{point:v}=p,{timestamp:x}=me;this.history.push({...v,timestamp:x});const{onStart:b,onMove:y}=this.handlers;m||(b&&b(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,p)},this.handlePointerMove=(p,m)=>{this.lastMoveEvent=p,this.lastMoveEventInfo=cs(m,this.transformPagePoint),re.update(this.updatePoint,!0)},this.handlePointerUp=(p,m)=>{this.end();const{onEnd:g,onSessionEnd:v,resumeAnimation:x}=this.handlers;if(this.dragSnapToOrigin&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=ds(p.type==="pointercancel"?this.lastMoveEventInfo:cs(m,this.transformPagePoint),this.history);this.startEvent&&g&&g(p,b),v&&v(p,b)},!Mn(t))return;this.dragSnapToOrigin=a,this.handlers=r,this.transformPagePoint=s,this.distanceThreshold=o,this.contextWindow=n||window;const i=cr(t),l=cs(i,this.transformPagePoint),{point:c}=l,{timestamp:d}=me;this.history=[{...c,timestamp:d}];const{onSessionStart:u}=r;u&&u(t,ds(l,this.history)),this.removeListeners=ar(Ht(this.contextWindow,"pointermove",this.handlePointerMove),Ht(this.contextWindow,"pointerup",this.handlePointerUp),Ht(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),De(this.updatePoint)}}function cs(e,t){return t?{point:t(e.point)}:e}function Ya(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ds({point:e},t){return{point:e,delta:Ya(e,Vl(t)),offset:Ya(e,ah(t)),velocity:oh(t,.1)}}function ah(e){return e[0]}function Vl(e){return e[e.length-1]}function oh(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,s=null;const n=Vl(e);for(;r>=0&&(s=e[r],!(n.timestamp-s.timestamp>Ie(t)));)r--;if(!s)return{x:0,y:0};const a=Ee(n.timestamp-s.timestamp);if(a===0)return{x:0,y:0};const o={x:(n.x-s.x)/a,y:(n.y-s.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function ih(e,{min:t,max:r},s){return t!==void 0&&e<t?e=s?oe(t,e,s.min):Math.max(e,t):r!==void 0&&e>r&&(e=s?oe(r,e,s.max):Math.min(e,r)),e}function qa(e,t,r){return{min:t!==void 0?e.min+t:void 0,max:r!==void 0?e.max+r-(e.max-e.min):void 0}}function lh(e,{top:t,left:r,bottom:s,right:n}){return{x:qa(e.x,r,n),y:qa(e.y,t,s)}}function Za(e,t){let r=t.min-e.min,s=t.max-e.max;return t.max-t.min<e.max-e.min&&([r,s]=[s,r]),{min:r,max:s}}function ch(e,t){return{x:Za(e.x,t.x),y:Za(e.y,t.y)}}function dh(e,t){let r=.5;const s=xe(e),n=xe(t);return n>s?r=ht(t.min,t.max-s,e.min):s>n&&(r=ht(e.min,e.max-n,t.min)),Fe(0,1,r)}function uh(e,t){const r={};return t.min!==void 0&&(r.min=t.min-e.min),t.max!==void 0&&(r.max=t.max-e.min),r}const zs=.35;function fh(e=zs){return e===!1?e=0:e===!0&&(e=zs),{x:Ja(e,"left","right"),y:Ja(e,"top","bottom")}}function Ja(e,t,r){return{min:Qa(e,t),max:Qa(e,r)}}function Qa(e,t){return typeof e=="number"?e:e[t]||0}const hh=new WeakMap;class ph{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=ce(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:r=!1,distanceThreshold:s}={}){const{presenceContext:n}=this.visualElement;if(n&&n.isPresent===!1)return;const a=u=>{const{dragSnapToOrigin:p}=this.getProps();p?this.pauseAnimation():this.stopAnimation(),r&&this.snapToCursor(cr(u).point)},o=(u,p)=>{const{drag:m,dragPropagation:g,onDragStart:v}=this.getProps();if(m&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=gf(m),!this.openDragLock))return;this.latestPointerEvent=u,this.latestPanInfo=p,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Pe(b=>{let y=this.getAxisMotionValue(b).get()||0;if(ze.test(y)){const{projection:w}=this.visualElement;if(w&&w.layout){const C=w.layout.layoutBox[b];C&&(y=xe(C)*(parseFloat(y)/100))}}this.originPoint[b]=y}),v&&re.postRender(()=>v(u,p)),Os(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},i=(u,p)=>{this.latestPointerEvent=u,this.latestPanInfo=p;const{dragPropagation:m,dragDirectionLock:g,onDirectionLock:v,onDrag:x}=this.getProps();if(!m&&!this.openDragLock)return;const{offset:b}=p;if(g&&this.currentDirection===null){this.currentDirection=mh(b),this.currentDirection!==null&&v&&v(this.currentDirection);return}this.updateAxis("x",p.point,b),this.updateAxis("y",p.point,b),this.visualElement.render(),x&&x(u,p)},l=(u,p)=>{this.latestPointerEvent=u,this.latestPanInfo=p,this.stop(u,p),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>Pe(u=>this.getAnimationState(u)==="paused"&&this.getAxisMotionValue(u).animation?.play()),{dragSnapToOrigin:d}=this.getProps();this.panSession=new Al(t,{onSessionStart:a,onStart:o,onMove:i,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,distanceThreshold:s,contextWindow:Ml(this.visualElement)})}stop(t,r){const s=t||this.latestPointerEvent,n=r||this.latestPanInfo,a=this.isDragging;if(this.cancel(),!a||!n||!s)return;const{velocity:o}=n;this.startAnimation(o);const{onDragEnd:i}=this.getProps();i&&re.postRender(()=>i(s,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:r}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),r&&r.setActive("whileDrag",!1)}updateAxis(t,r,s){const{drag:n}=this.getProps();if(!s||!gr(t,n,this.currentDirection))return;const a=this.getAxisMotionValue(t);let o=this.originPoint[t]+s[t];this.constraints&&this.constraints[t]&&(o=ih(o,this.constraints[t],this.elastic[t])),a.set(o)}resolveConstraints(){const{dragConstraints:t,dragElastic:r}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,n=this.constraints;t&&wt(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&s?this.constraints=lh(s.layoutBox,t):this.constraints=!1,this.elastic=fh(r),n!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&Pe(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=uh(s.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:r}=this.getProps();if(!t||!wt(t))return!1;const s=t.current;be(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:n}=this.visualElement;if(!n||!n.layout)return!1;const a=C0(s,n.root,this.visualElement.getTransformPagePoint());let o=ch(n.layout.layoutBox,a);if(r){const i=r(x0(o));this.hasMutatedConstraints=!!i,i&&(o=cl(i))}return o}startAnimation(t){const{drag:r,dragMomentum:s,dragElastic:n,dragTransition:a,dragSnapToOrigin:o,onDragTransitionEnd:i}=this.getProps(),l=this.constraints||{},c=Pe(d=>{if(!gr(d,r,this.currentDirection))return;let u=l&&l[d]||{};o&&(u={min:0,max:0});const p=n?200:1e6,m=n?40:1e7,g={type:"inertia",velocity:s?t[d]:0,bounceStiffness:p,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...a,...u};return this.startAxisValueAnimation(d,g)});return Promise.all(c).then(i)}startAxisValueAnimation(t,r){const s=this.getAxisMotionValue(t);return Os(this.visualElement,t),s.start(Ln(t,s,0,r,this.visualElement,!1))}stopAnimation(){Pe(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Pe(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const r=`_drag${t.toUpperCase()}`,s=this.visualElement.getProps(),n=s[r];return n||this.visualElement.getValue(t,(s.initial?s.initial[t]:void 0)||0)}snapToCursor(t){Pe(r=>{const{drag:s}=this.getProps();if(!gr(r,s,this.currentDirection))return;const{projection:n}=this.visualElement,a=this.getAxisMotionValue(r);if(n&&n.layout){const{min:o,max:i}=n.layout.layoutBox[r];a.set(t[r]-oe(o,i,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:r}=this.getProps(),{projection:s}=this.visualElement;if(!wt(r)||!s||!this.constraints)return;this.stopAnimation();const n={x:0,y:0};Pe(o=>{const i=this.getAxisMotionValue(o);if(i&&this.constraints!==!1){const l=i.get();n[o]=dh({min:l,max:l},this.constraints[o])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),Pe(o=>{if(!gr(o,t,null))return;const i=this.getAxisMotionValue(o),{min:l,max:c}=this.constraints[o];i.set(oe(l,c,n[o]))})}addListeners(){if(!this.visualElement.current)return;hh.set(this.visualElement,this);const t=this.visualElement.current,r=Ht(t,"pointerdown",l=>{const{drag:c,dragListener:d=!0}=this.getProps();c&&d&&this.start(l)}),s=()=>{const{dragConstraints:l}=this.getProps();wt(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,a=n.addEventListener("measure",s);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),re.read(s);const o=rr(window,"resize",()=>this.scalePositionWithinConstraints()),i=n.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(Pe(d=>{const u=this.getAxisMotionValue(d);u&&(this.originPoint[d]+=l[d].translate,u.set(u.get()+l[d].translate))}),this.visualElement.render())}));return()=>{o(),r(),a(),i&&i()}}getProps(){const t=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:s=!1,dragPropagation:n=!1,dragConstraints:a=!1,dragElastic:o=zs,dragMomentum:i=!0}=t;return{...t,drag:r,dragDirectionLock:s,dragPropagation:n,dragConstraints:a,dragElastic:o,dragMomentum:i}}}function gr(e,t,r){return(t===!0||t===e)&&(r===null||r===e)}function mh(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}class gh extends rt{constructor(t){super(t),this.removeGroupControls=Ce,this.removeListeners=Ce,this.controls=new ph(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ce}unmount(){this.removeGroupControls(),this.removeListeners()}}const eo=e=>(t,r)=>{e&&re.postRender(()=>e(t,r))};class bh extends rt{constructor(){super(...arguments),this.removePointerDownListener=Ce}onPointerDown(t){this.session=new Al(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Ml(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:r,onPan:s,onPanEnd:n}=this.node.getProps();return{onSessionStart:eo(t),onStart:eo(r),onMove:s,onEnd:(a,o)=>{delete this.session,n&&re.postRender(()=>n(a,o))}}}mount(){this.removePointerDownListener=Ht(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 Pr={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function to(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const $t={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(X.test(e))e=parseFloat(e);else return e;const r=to(e,t.target.x),s=to(e,t.target.y);return`${r}% ${s}%`}},yh={correct:(e,{treeScale:t,projectionDelta:r})=>{const s=e,n=tt.parse(e);if(n.length>5)return s;const a=tt.createTransformer(e),o=typeof n[0]!="number"?1:0,i=r.x.scale*t.x,l=r.y.scale*t.y;n[0+o]/=i,n[1+o]/=l;const c=oe(i,l,.5);return typeof n[2+o]=="number"&&(n[2+o]/=c),typeof n[3+o]=="number"&&(n[3+o]/=c),a(n)}};let us=!1;class xh extends h.Component{componentDidMount(){const{visualElement:t,layoutGroup:r,switchLayoutGroup:s,layoutId:n}=this.props,{projection:a}=t;Kf(vh),a&&(r.group&&r.group.add(a),s&&s.register&&n&&s.register(a),us&&a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,onExitComplete:()=>this.safeToRemove()})),Pr.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:r,visualElement:s,drag:n,isPresent:a}=this.props,{projection:o}=s;return o&&(o.isPresent=a,us=!0,n||t.layoutDependency!==r||r===void 0||t.isPresent!==a?o.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?o.promote():o.relegate()||re.postRender(()=>{const i=o.getStack();(!i||!i.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Tn.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:r,switchLayoutGroup:s}=this.props,{projection:n}=t;us=!0,n&&(n.scheduleCheckAfterUnmount(),r&&r.group&&r.group.remove(n),s&&s.deregister&&s.deregister(n))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Pl(e){const[t,r]=Yi(),s=h.useContext(rn);return f.jsx(xh,{...e,layoutGroup:s,switchLayoutGroup:h.useContext(il),isPresent:t,safeToRemove:r})}const vh={borderRadius:{...$t,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:$t,borderTopRightRadius:$t,borderBottomLeftRadius:$t,borderBottomRightRadius:$t,boxShadow:yh};function El(e,t,r){const s=fe(e)?e:Be(e);return s.start(Ln("",s,t,r)),s.animation}const wh=(e,t)=>e.depth-t.depth;class Ch{constructor(){this.children=[],this.isDirty=!1}add(t){nn(this.children,t),this.isDirty=!0}remove(t){Fr(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(wh),this.isDirty=!1,this.children.forEach(t)}}function kh(e,t){const r=we.now(),s=({timestamp:n})=>{const a=n-r;a>=t&&(De(s),e(a-t))};return re.setup(s,!0),()=>De(s)}const Il=["TopLeft","TopRight","BottomLeft","BottomRight"],jh=Il.length,ro=e=>typeof e=="string"?parseFloat(e):e,so=e=>typeof e=="number"||X.test(e);function Sh(e,t,r,s,n,a){n?(e.opacity=oe(0,r.opacity??1,Th(s)),e.opacityExit=oe(t.opacity??1,0,Mh(s))):a&&(e.opacity=oe(t.opacity??1,r.opacity??1,s));for(let o=0;o<jh;o++){const i=`border${Il[o]}Radius`;let l=no(t,i),c=no(r,i);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||so(l)===so(c)?(e[i]=Math.max(oe(ro(l),ro(c),s),0),(ze.test(c)||ze.test(l))&&(e[i]+="%")):e[i]=c}(t.rotate||r.rotate)&&(e.rotate=oe(t.rotate||0,r.rotate||0,s))}function no(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Th=Nl(0,.5,di),Mh=Nl(.5,.95,Ce);function Nl(e,t,r){return s=>s<e?0:s>t?1:r(ht(e,t,s))}function ao(e,t){e.min=t.min,e.max=t.max}function Ae(e,t){ao(e.x,t.x),ao(e.y,t.y)}function oo(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function io(e,t,r,s,n){return e-=t,e=Br(e,1/r,s),n!==void 0&&(e=Br(e,1/n,s)),e}function Ah(e,t=0,r=1,s=.5,n,a=e,o=e){if(ze.test(t)&&(t=parseFloat(t),t=oe(o.min,o.max,t/100)-o.min),typeof t!="number")return;let i=oe(a.min,a.max,s);e===a&&(i-=t),e.min=io(e.min,t,r,i,n),e.max=io(e.max,t,r,i,n)}function lo(e,t,[r,s,n],a,o){Ah(e,t[r],t[s],t[n],t.scale,a,o)}const Vh=["x","scaleX","originX"],Ph=["y","scaleY","originY"];function co(e,t,r,s){lo(e.x,t,Vh,r?r.x:void 0,s?s.x:void 0),lo(e.y,t,Ph,r?r.y:void 0,s?s.y:void 0)}function uo(e){return e.translate===0&&e.scale===1}function Rl(e){return uo(e.x)&&uo(e.y)}function fo(e,t){return e.min===t.min&&e.max===t.max}function Eh(e,t){return fo(e.x,t.x)&&fo(e.y,t.y)}function ho(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Bl(e,t){return ho(e.x,t.x)&&ho(e.y,t.y)}function po(e){return xe(e.x)/xe(e.y)}function mo(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class Ih{constructor(){this.members=[]}add(t){nn(this.members,t),t.scheduleRender()}remove(t){if(Fr(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const r=this.members[this.members.length-1];r&&this.promote(r)}}relegate(t){const r=this.members.findIndex(n=>t===n);if(r===0)return!1;let s;for(let n=r;n>=0;n--){const a=this.members[n];if(a.isPresent!==!1){s=a;break}}return s?(this.promote(s),!0):!1}promote(t,r){const s=this.lead;if(t!==s&&(this.prevLead=s,this.lead=t,t.show(),s)){s.instance&&s.scheduleRender(),t.scheduleRender(),t.resumeFrom=s,r&&(t.resumeFrom.preserveOpacity=!0),s.snapshot&&(t.snapshot=s.snapshot,t.snapshot.latestValues=s.animationValues||s.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:n}=t.options;n===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:r,resumingFrom:s}=t;r.onExitComplete&&r.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Nh(e,t,r){let s="";const n=e.x.translate/t.x,a=e.y.translate/t.y,o=r?.z||0;if((n||a||o)&&(s=`translate3d(${n}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(s+=`scale(${1/t.x}, ${1/t.y}) `),r){const{transformPerspective:c,rotate:d,rotateX:u,rotateY:p,skewX:m,skewY:g}=r;c&&(s=`perspective(${c}px) ${s}`),d&&(s+=`rotate(${d}deg) `),u&&(s+=`rotateX(${u}deg) `),p&&(s+=`rotateY(${p}deg) `),m&&(s+=`skewX(${m}deg) `),g&&(s+=`skewY(${g}deg) `)}const i=e.x.scale*t.x,l=e.y.scale*t.y;return(i!==1||l!==1)&&(s+=`scale(${i}, ${l})`),s||"none"}const fs=["","X","Y","Z"],Rh=1e3;let Bh=0;function hs(e,t,r,s){const{latestValues:n}=t;n[e]&&(r[e]=n[e],t.setStaticValue(e,0),s&&(s[e]=0))}function Dl(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const r=vl(t);if(window.MotionHasOptimisedAnimation(r,"transform")){const{layout:n,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(r,"transform",re,!(n||a))}const{parent:s}=e;s&&!s.hasCheckedOptimisedAppear&&Dl(s)}function Ll({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:s,resetTransform:n}){return class{constructor(o={},i=t?.()){this.id=Bh++,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(Oh),this.nodes.forEach(Wh),this.nodes.forEach(_h),this.nodes.forEach($h)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,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 l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Ch)}addEventListener(o,i){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new on),this.eventHandlers.get(o).add(i)}notifyListeners(o,...i){const l=this.eventHandlers.get(o);l&&l.notify(...i)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=Ur(o)&&!Xi(o),this.instance=o;const{layoutId:i,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||i)&&(this.isLayoutDirty=!0),e){let d,u=0;const p=()=>this.root.updateBlockedByResize=!1;re.read(()=>{u=window.innerWidth}),e(o,()=>{const m=window.innerWidth;m!==u&&(u=m,this.root.updateBlockedByResize=!0,d&&d(),d=kh(p,250),Pr.hasAnimatedSinceResize&&(Pr.hasAnimatedSinceResize=!1,this.nodes.forEach(yo)))})}i&&this.root.registerSharedNode(i,this),this.options.animate!==!1&&c&&(i||l)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:u,hasRelativeLayoutChanged:p,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||c.getDefaultTransition()||Xh,{onLayoutAnimationStart:v,onLayoutAnimationComplete:x}=c.getProps(),b=!this.targetLayout||!Bl(this.targetLayout,m),y=!u&&p;if(this.options.layoutRoot||this.resumeFrom||y||u&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const w={...kn(g,"layout"),onPlay:v,onComplete:x};(c.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w),this.setAnimationOrigin(d,y)}else u||yo(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),De(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(Gh),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Dl(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const u=this.path[d];u.shouldResetTransform=!0,u.updateScroll("snapshot"),u.options.layoutRoot&&u.willUpdate(!1)}const{layoutId:i,layout:l}=this.options;if(i===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(go);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(bo);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Fh),this.nodes.forEach(Dh),this.nodes.forEach(Lh)):this.nodes.forEach(bo),this.clearAllSnapshots();const i=we.now();me.delta=Fe(0,1e3/60,i-me.timestamp),me.timestamp=i,me.isProcessing=!0,ts.update.process(me),ts.preRender.process(me),ts.render.process(me),me.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Tn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(zh),this.sharedNodes.forEach(Uh)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,re.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){re.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!xe(this.snapshot.measuredBox.x)&&!xe(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 l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=ce(),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,o?o.layoutBox:void 0)}updateScroll(o="measure"){let i=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(i=!1),i&&this.instance){const l=s(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:r(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!n)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,i=this.projectionDelta&&!Rl(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,d=c!==this.prevTransformTemplateValue;o&&this.instance&&(i||lt(this.latestValues)||d)&&(n(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const i=this.measurePageBox();let l=this.removeElementScroll(i);return o&&(l=this.removeTransform(l)),Yh(l),{animationId:this.root.animationId,measuredBox:i,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:o}=this.options;if(!o)return ce();const i=o.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(qh))){const{scroll:c}=this.root;c&&(Ct(i.x,c.offset.x),Ct(i.y,c.offset.y))}return i}removeElementScroll(o){const i=ce();if(Ae(i,o),this.scroll?.wasRoot)return i;for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:d,options:u}=c;c!==this.root&&d&&u.layoutScroll&&(d.wasRoot&&Ae(i,o),Ct(i.x,d.offset.x),Ct(i.y,d.offset.y))}return i}applyTransform(o,i=!1){const l=ce();Ae(l,o);for(let c=0;c<this.path.length;c++){const d=this.path[c];!i&&d.options.layoutScroll&&d.scroll&&d!==d.root&&kt(l,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),lt(d.latestValues)&&kt(l,d.latestValues)}return lt(this.latestValues)&&kt(l,this.latestValues),l}removeTransform(o){const i=ce();Ae(i,o);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!lt(c.latestValues))continue;Rs(c.latestValues)&&c.updateSnapshot();const d=ce(),u=c.measurePageBox();Ae(d,u),co(i,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,d)}return lt(this.latestValues)&&co(i,this.latestValues),i}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==me.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){const i=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=i.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=i.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=i.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==i;if(!(o||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:u}=this.options;if(!(!this.layout||!(d||u))){if(this.resolvedRelativeTargetAt=me.timestamp,!this.targetDelta&&!this.relativeTarget){const p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ce(),this.relativeTargetOrigin=ce(),Xt(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),Ae(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=ce(),this.targetWithTransforms=ce()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),sh(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Ae(this.target,this.layout.layoutBox),ul(this.target,this.targetDelta)):Ae(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=ce(),this.relativeTargetOrigin=ce(),Xt(this.relativeTargetOrigin,this.target,p.target),Ae(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Rs(this.parent.latestValues)||dl(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){const o=this.getLead(),i=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),i&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===me.timestamp&&(l=!1),l)return;const{layout:c,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||d))return;Ae(this.layoutCorrected,this.layout.layoutBox);const u=this.treeScale.x,p=this.treeScale.y;w0(this.layoutCorrected,this.treeScale,this.path,i),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=ce());const{target:m}=o;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(oo(this.prevProjectionDelta.x,this.projectionDelta.x),oo(this.prevProjectionDelta.y,this.projectionDelta.y)),Kt(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==u||this.treeScale.y!==p||!mo(this.projectionDelta.x,this.prevProjectionDelta.x)||!mo(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){if(this.options.visualElement?.scheduleRender(),o){const i=this.getStack();i&&i.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=jt(),this.projectionDelta=jt(),this.projectionDeltaWithTransform=jt()}setAnimationOrigin(o,i=!1){const l=this.snapshot,c=l?l.latestValues:{},d={...this.latestValues},u=jt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!i;const p=ce(),m=l?l.source:void 0,g=this.layout?this.layout.source:void 0,v=m!==g,x=this.getStack(),b=!x||x.members.length<=1,y=!!(v&&!b&&this.options.crossfade===!0&&!this.path.some(Kh));this.animationProgress=0;let w;this.mixTargetDelta=C=>{const j=C/1e3;xo(u.x,o.x,j),xo(u.y,o.y,j),this.setTargetDelta(u),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Xt(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Hh(this.relativeTarget,this.relativeTargetOrigin,p,j),w&&Eh(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=ce()),Ae(w,this.relativeTarget)),v&&(this.animationValues=d,Sh(d,c,this.latestValues,j,y,b)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=j},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(De(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=re.update(()=>{Pr.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Be(0)),this.currentAnimation=El(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:i=>{this.mixTargetDelta(i),o.onUpdate&&o.onUpdate(i)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Rh),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:i,target:l,layout:c,latestValues:d}=o;if(!(!i||!l||!c)){if(this!==o&&this.layout&&c&&Ol(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||ce();const u=xe(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+u;const p=xe(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+p}Ae(i,l),kt(i,d),Kt(this.projectionDeltaWithTransform,this.layoutCorrected,i,d)}}registerSharedNode(o,i){this.sharedNodes.has(o)||this.sharedNodes.set(o,new Ih),this.sharedNodes.get(o).add(i);const c=i.options.initialPromotionConfig;i.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(i):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){const{layoutId:o}=this.options;return o?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:o}=this.options;return o?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:i,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),i&&this.setOptions({transition:i})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let i=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(i=!0),!i)return;const c={};l.z&&hs("z",o,c,this.animationValues);for(let d=0;d<fs.length;d++)hs(`rotate${fs[d]}`,o,c,this.animationValues),hs(`skew${fs[d]}`,o,c,this.animationValues);o.render();for(const d in c)o.setStaticValue(d,c[d]),this.animationValues&&(this.animationValues[d]=c[d]);o.scheduleRender()}applyProjectionStyles(o,i){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=Vr(i?.pointerEvents)||"",o.transform=l?l(this.latestValues,""):"none";return}const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=Vr(i?.pointerEvents)||""),this.hasProjected&&!lt(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";const d=c.animationValues||c.latestValues;this.applyTransformsToTarget();let u=Nh(this.projectionDeltaWithTransform,this.treeScale,d);l&&(u=l(d,u)),o.transform=u;const{x:p,y:m}=this.projectionDelta;o.transformOrigin=`${p.origin*100}% ${m.origin*100}% 0`,c.animationValues?o.opacity=c===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:o.opacity=c===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const g in er){if(d[g]===void 0)continue;const{correct:v,applyTo:x,isCSSVariable:b}=er[g],y=u==="none"?d[g]:v(d[g],c);if(x){const w=x.length;for(let C=0;C<w;C++)o[x[C]]=y}else b?this.options.visualElement.renderState.vars[g]=y:o[g]=y}this.options.layoutId&&(o.pointerEvents=c===this?Vr(i?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>o.currentAnimation?.stop()),this.root.nodes.forEach(go),this.root.sharedNodes.clear()}}}function Dh(e){e.updateLayout()}function Lh(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:s}=e.layout,{animationType:n}=e.options,a=t.source!==e.layout.source;n==="size"?Pe(d=>{const u=a?t.measuredBox[d]:t.layoutBox[d],p=xe(u);u.min=r[d].min,u.max=u.min+p}):Ol(n,t.layoutBox,r)&&Pe(d=>{const u=a?t.measuredBox[d]:t.layoutBox[d],p=xe(r[d]);u.max=u.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+p)});const o=jt();Kt(o,r,t.layoutBox);const i=jt();a?Kt(i,e.applyTransform(s,!0),t.measuredBox):Kt(i,r,t.layoutBox);const l=!Rl(o);let c=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:u,layout:p}=d;if(u&&p){const m=ce();Xt(m,t.layoutBox,u.layoutBox);const g=ce();Xt(g,r,p.layoutBox),Bl(m,g)||(c=!0),d.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=m,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:i,layoutDelta:o,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function Oh(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 $h(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function zh(e){e.clearSnapshot()}function go(e){e.clearMeasurements()}function bo(e){e.isLayoutDirty=!1}function Fh(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function yo(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Wh(e){e.resolveTargetDelta()}function _h(e){e.calcProjection()}function Gh(e){e.resetSkewAndRotation()}function Uh(e){e.removeLeadSnapshot()}function xo(e,t,r){e.translate=oe(t.translate,0,r),e.scale=oe(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function vo(e,t,r,s){e.min=oe(t.min,r.min,s),e.max=oe(t.max,r.max,s)}function Hh(e,t,r,s){vo(e.x,t.x,r.x,s),vo(e.y,t.y,r.y,s)}function Kh(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Xh={duration:.45,ease:[.4,0,.1,1]},wo=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Co=wo("applewebkit/")&&!wo("chrome/")?Math.round:Ce;function ko(e){e.min=Co(e.min),e.max=Co(e.max)}function Yh(e){ko(e.x),ko(e.y)}function Ol(e,t,r){return e==="position"||e==="preserve-aspect"&&!rh(po(t),po(r),.2)}function qh(e){return e!==e.root&&e.scroll?.wasRoot}const Zh=Ll({attachResizeListener:(e,t)=>rr(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ps={current:void 0},$l=Ll({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!ps.current){const e=new Zh({});e.mount(window),e.setOptions({layoutScroll:!0}),ps.current=e}return ps.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Jh={pan:{Feature:bh},drag:{Feature:gh,ProjectionNode:$l,MeasureLayout:Pl}};function jo(e,t,r){const{props:s}=e;e.animationState&&s.whileHover&&e.animationState.setActive("whileHover",r==="Start");const n="onHover"+r,a=s[n];a&&re.postRender(()=>a(t,cr(t)))}class Qh extends rt{mount(){const{current:t}=this.node;t&&(this.unmount=bf(t,(r,s)=>(jo(this.node,s,"Start"),n=>jo(this.node,n,"End"))))}unmount(){}}class ep extends rt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=ar(rr(this.node.current,"focus",()=>this.onFocus()),rr(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function So(e,t,r){const{props:s}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&s.whileTap&&e.animationState.setActive("whileTap",r==="Start");const n="onTap"+(r==="End"?"":r),a=s[n];a&&re.postRender(()=>a(t,cr(t)))}class tp extends rt{mount(){const{current:t}=this.node;t&&(this.unmount=wf(t,(r,s)=>(So(this.node,s,"Start"),(n,{success:a})=>So(this.node,n,a?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Fs=new WeakMap,ms=new WeakMap,rp=e=>{const t=Fs.get(e.target);t&&t(e)},sp=e=>{e.forEach(rp)};function np({root:e,...t}){const r=e||document;ms.has(r)||ms.set(r,{});const s=ms.get(r),n=JSON.stringify(t);return s[n]||(s[n]=new IntersectionObserver(sp,{root:e,...t})),s[n]}function ap(e,t,r){const s=np(t);return Fs.set(e,r),s.observe(e),()=>{Fs.delete(e),s.unobserve(e)}}const op={some:0,all:1};class ip extends rt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:r,margin:s,amount:n="some",once:a}=t,o={root:r?r.current:void 0,rootMargin:s,threshold:typeof n=="number"?n:op[n]},i=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,a&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:d,onViewportLeave:u}=this.node.getProps(),p=c?d:u;p&&p(l)};return ap(this.node.current,o,i)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:r}=this.node;["amount","margin","root"].some(lp(t,r))&&this.startObserver()}unmount(){}}function lp({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}const cp={inView:{Feature:ip},tap:{Feature:tp},focus:{Feature:ep},hover:{Feature:Qh}},dp={layout:{ProjectionNode:$l,MeasureLayout:Pl}},up={...q0,...cp,...Jh,...dp},_=y0(up,M0),fp=50,To=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),hp=()=>({time:0,x:To(),y:To()}),pp={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function Mo(e,t,r,s){const n=r[t],{length:a,position:o}=pp[t],i=n.current,l=r.time;n.current=e[`scroll${o}`],n.scrollLength=e[`scroll${a}`]-e[`client${a}`],n.offset.length=0,n.offset[0]=0,n.offset[1]=n.scrollLength,n.progress=ht(0,n.scrollLength,n.current);const c=s-l;n.velocity=c>fp?0:ln(n.current-i,c)}function mp(e,t,r){Mo(e,"x",t,r),Mo(e,"y",t,r),t.time=r}function gp(e,t){const r={x:0,y:0};let s=e;for(;s&&s!==t;)if(Sn(s))r.x+=s.offsetLeft,r.y+=s.offsetTop,s=s.offsetParent;else if(s.tagName==="svg"){const n=s.getBoundingClientRect();s=s.parentElement;const a=s.getBoundingClientRect();r.x+=n.left-a.left,r.y+=n.top-a.top}else if(s instanceof SVGGraphicsElement){const{x:n,y:a}=s.getBBox();r.x+=n,r.y+=a;let o=null,i=s.parentNode;for(;!o;)i.tagName==="svg"&&(o=i),i=s.parentNode;s=o}else break;return r}const Ws={start:0,center:.5,end:1};function Ao(e,t,r=0){let s=0;if(e in Ws&&(e=Ws[e]),typeof e=="string"){const n=parseFloat(e);e.endsWith("px")?s=n:e.endsWith("%")?e=n/100:e.endsWith("vw")?s=n/100*document.documentElement.clientWidth:e.endsWith("vh")?s=n/100*document.documentElement.clientHeight:e=n}return typeof e=="number"&&(s=t*e),r+s}const bp=[0,0];function yp(e,t,r,s){let n=Array.isArray(e)?e:bp,a=0,o=0;return typeof e=="number"?n=[e,e]:typeof e=="string"&&(e=e.trim(),e.includes(" ")?n=e.split(" "):n=[e,Ws[e]?e:"0"]),a=Ao(n[0],r,s),o=Ao(n[1],t),a-o}const xp={All:[[0,0],[1,1]]},vp={x:0,y:0};function wp(e){return"getBBox"in e&&e.tagName!=="svg"?e.getBBox():{width:e.clientWidth,height:e.clientHeight}}function Cp(e,t,r){const{offset:s=xp.All}=r,{target:n=e,axis:a="y"}=r,o=a==="y"?"height":"width",i=n!==e?gp(n,e):vp,l=n===e?{width:e.scrollWidth,height:e.scrollHeight}:wp(n),c={width:e.clientWidth,height:e.clientHeight};t[a].offset.length=0;let d=!t[a].interpolate;const u=s.length;for(let p=0;p<u;p++){const m=yp(s[p],c[o],l[o],i[a]);!d&&m!==t[a].interpolatorOffsets[p]&&(d=!0),t[a].offset[p]=m}d&&(t[a].interpolate=bn(t[a].offset,yn(s),{clamp:!1}),t[a].interpolatorOffsets=[...t[a].offset]),t[a].progress=Fe(0,1,t[a].interpolate(t[a].current))}function kp(e,t=e,r){if(r.x.targetOffset=0,r.y.targetOffset=0,t!==e){let s=t;for(;s&&s!==e;)r.x.targetOffset+=s.offsetLeft,r.y.targetOffset+=s.offsetTop,s=s.offsetParent}r.x.targetLength=t===e?t.scrollWidth:t.clientWidth,r.y.targetLength=t===e?t.scrollHeight:t.clientHeight,r.x.containerLength=e.clientWidth,r.y.containerLength=e.clientHeight,process.env.NODE_ENV!=="production"&&e&&t&&t!==e&&Wr(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 jp(e,t,r,s={}){return{measure:n=>{kp(e,s.target,r),mp(e,r,n),(s.offset||s.target)&&Cp(e,r,s)},notify:()=>t(r)}}const zt=new WeakMap,Vo=new WeakMap,gs=new WeakMap,Po=e=>e===document.scrollingElement?window:e;function zl(e,{container:t=document.scrollingElement,...r}={}){if(!t)return Ce;let s=gs.get(t);s||(s=new Set,gs.set(t,s));const n=hp(),a=jp(t,e,n,r);if(s.add(a),!zt.has(t)){const i=()=>{for(const u of s)u.measure(me.timestamp);re.preUpdate(l)},l=()=>{for(const u of s)u.notify()},c=()=>re.read(i);zt.set(t,c);const d=Po(t);window.addEventListener("resize",c,{passive:!0}),t!==document.documentElement&&Vo.set(t,Pf(t,c)),d.addEventListener("scroll",c,{passive:!0}),c()}const o=zt.get(t);return re.read(o,!1,!0),()=>{De(o);const i=gs.get(t);if(!i||(i.delete(a),i.size))return;const l=zt.get(t);zt.delete(t),l&&(Po(t).removeEventListener("scroll",l),Vo.get(t)?.(),window.removeEventListener("resize",l))}}const Eo=new Map;function Sp(e){const t={value:0},r=zl(s=>{t.value=s[e.axis].progress*100},e);return{currentTime:t,cancel:r}}function Fl({source:e,container:t,...r}){const{axis:s}=r;e&&(t=e);const n=Eo.get(t)??new Map;Eo.set(t,n);const a=r.target??"self",o=n.get(a)??{},i=s+(r.offset??[]).join(",");return o[i]||(o[i]=!r.target&&Ii()?new ScrollTimeline({source:t,axis:s}):Sp({container:t,...r})),o[i]}function Tp(e,t){const r=Fl(t);return e.attachTimeline({timeline:t.target?void 0:r,observe:s=>(s.pause(),Ki(n=>{s.time=s.iterationDuration*n},r))})}function Mp(e){return e.length===2}function Ap(e,t){return Mp(e)?zl(r=>{e(r[t.axis].progress,r)},t):Ki(e,Fl(t))}function Vp(e,{axis:t="y",container:r=document.scrollingElement,...s}={}){if(!r)return Ce;const n={axis:t,container:r,...s};return typeof e=="function"?Ap(e,n):Tp(e,n)}const Pp=()=>({scrollX:Be(0),scrollY:Be(0),scrollXProgress:Be(0),scrollYProgress:Be(0)}),br=e=>e?!e.current:!1;function Wl({container:e,target:t,...r}={}){const s=pt(Pp),n=h.useRef(null),a=h.useRef(!1),o=h.useCallback(()=>(n.current=Vp((i,{x:l,y:c})=>{s.scrollX.set(l.current),s.scrollXProgress.set(l.progress),s.scrollY.set(c.current),s.scrollYProgress.set(c.progress)},{...r,container:e?.current||void 0,target:t?.current||void 0}),()=>{n.current?.()}),[e,t,JSON.stringify(r.offset)]);return nr(()=>{if(a.current=!1,br(e)||br(t)){a.current=!0;return}else return o()},[o]),h.useEffect(()=>{if(a.current)return be(!br(e),"Container ref is defined but not hydrated","use-scroll-ref"),be(!br(t),"Target ref is defined but not hydrated","use-scroll-ref"),o()},[o]),s}function $n(e){const t=pt(()=>Be(e)),{isStatic:r}=h.useContext(lr);if(r){const[,s]=h.useState(e);h.useEffect(()=>t.on("change",s),[])}return t}function _l(e,t){const r=$n(t()),s=()=>r.set(t());return s(),nr(()=>{const n=()=>re.preRender(s,!1,!0),a=e.map(o=>o.on("change",n));return()=>{a.forEach(o=>o()),De(s)}}),r}function Ep(e){Ut.current=[],e();const t=_l(Ut.current,e);return Ut.current=void 0,t}function Mt(e,t,r,s){if(typeof e=="function")return Ep(e);const n=typeof t=="function"?t:Ef(t,r,s);return Array.isArray(e)?Io(e,n):Io([e],([a])=>n(a))}function Io(e,t){const r=pt(()=>[]);return _l(e,()=>{r.length=0;const s=e.length;for(let n=0;n<s;n++)r[n]=e[n].get();return t(r)})}function Dr(e,t={}){const{isStatic:r}=h.useContext(lr),s=()=>fe(e)?e.get():e;if(r)return Mt(s);const n=$n(s());return h.useInsertionEffect(()=>If(n,e,t),[n,JSON.stringify(t)]),n}function Ip(e){e.values.forEach(t=>t.stop())}function _s(e,t){[...t].reverse().forEach(s=>{const n=e.getVariant(s);n&&Dn(e,n),e.variantChildren&&e.variantChildren.forEach(a=>{_s(a,t)})})}function Np(e,t){if(Array.isArray(t))return _s(e,t);if(typeof t=="string")return _s(e,[t]);Dn(e,t)}function Rp(){let e=!1;const t=new Set,r={subscribe(s){return t.add(s),()=>void t.delete(s)},start(s,n){be(e,"controls.start() should only be called after a component has mounted. Consider calling within a useEffect hook.");const a=[];return t.forEach(o=>{a.push(Cl(o,s,{transitionOverride:n}))}),Promise.all(a)},set(s){return be(e,"controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook."),t.forEach(n=>{Np(n,s)})},stop(){t.forEach(s=>{Ip(s)})},mount(){return e=!0,()=>{e=!1,r.stop()}}};return r}function zn(e){return typeof e=="object"&&!Array.isArray(e)}function Gl(e,t,r,s){return typeof e=="string"&&zn(t)?Gr(e,r,s):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function Bp(e,t,r){return e*(t+1)}function No(e,t,r,s){return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?r:t.startsWith("<")?Math.max(0,r+parseFloat(t.slice(1))):s.get(t)??e}function Dp(e,t,r){for(let s=0;s<e.length;s++){const n=e[s];n.at>t&&n.at<r&&(Fr(e,n),s--)}}function Lp(e,t,r,s,n,a){Dp(e,n,a);for(let o=0;o<t.length;o++)e.push({value:t[o],at:oe(n,a,s[o]),easing:pi(r,o)})}function Op(e,t){for(let r=0;r<e.length;r++)e[r]=e[r]/(t+1)}function $p(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const zp="easeInOut",Fp=20;function Wp(e,{defaultTransition:t={},...r}={},s,n){const a=t.duration||.3,o=new Map,i=new Map,l={},c=new Map;let d=0,u=0,p=0;for(let m=0;m<e.length;m++){const g=e[m];if(typeof g=="string"){c.set(g,u);continue}else if(!Array.isArray(g)){c.set(g.name,No(u,g.at,d,c));continue}let[v,x,b={}]=g;b.at!==void 0&&(u=No(u,b.at,d,c));let y=0;const w=(C,j,S,T=0,k=0)=>{const V=_p(C),{delay:A=0,times:B=yn(V),type:$="keyframes",repeat:L,repeatType:I,repeatDelay:R=0,...D}=j;let{ease:P=t.ease||"easeOut",duration:M}=j;const N=typeof A=="function"?A(T,k):A,E=V.length,F=Cn($)?$:n?.[$||"keyframes"];if(E<=2&&F){let W=100;if(E===2&&Hp(V)){const Z=V[1]-V[0];W=Math.abs(Z)}const J={...D};M!==void 0&&(J.duration=Ie(M));const Y=Ti(J,W,F);P=Y.ease,M=Y.duration}M??(M=a);const z=u+N;B.length===1&&B[0]===0&&(B[1]=1);const O=B.length-V.length;if(O>0&&Ai(B,O),V.length===1&&V.unshift(null),L){be(L<Fp,"Repeat count too high, must be less than 20","repeat-count-high"),M=Bp(M,L);const W=[...V],J=[...B];P=Array.isArray(P)?[...P]:[P];const Y=[...P];for(let Z=0;Z<L;Z++){V.push(...W);for(let se=0;se<W.length;se++)B.push(J[se]+(Z+1)),P.push(se===0?"linear":pi(Y,se-1))}Op(B,L)}const H=z+M;Lp(S,V,P,B,z,H),y=Math.max(N+M,y),p=Math.max(H,p)};if(fe(v)){const C=Ro(v,i);w(x,b,Bo("default",C))}else{const C=Gl(v,x,s,l),j=C.length;for(let S=0;S<j;S++){x=x,b=b;const T=C[S],k=Ro(T,i);for(const V in x)w(x[V],Gp(b,V),Bo(V,k),S,j)}}d=u,u+=y}return i.forEach((m,g)=>{for(const v in m){const x=m[v];x.sort($p);const b=[],y=[],w=[];for(let j=0;j<x.length;j++){const{at:S,value:T,easing:k}=x[j];b.push(T),y.push(ht(0,p,S)),w.push(k||"easeOut")}y[0]!==0&&(y.unshift(0),b.unshift(b[0]),w.unshift(zp)),y[y.length-1]!==1&&(y.push(1),b.push(null)),o.has(g)||o.set(g,{keyframes:{},transition:{}});const C=o.get(g);C.keyframes[v]=b,C.transition[v]={...t,duration:p,ease:w,times:y,...r}}}),o}function Ro(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function Bo(e,t){return t[e]||(t[e]=[]),t[e]}function _p(e){return Array.isArray(e)?e:[e]}function Gp(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const Up=e=>typeof e=="number",Hp=e=>e.every(Up);function Kp(e,t){return e in t}class Xp extends pl{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,r){if(Kp(r,t)){const s=t[r];if(typeof s=="string"||typeof s=="number")return s}}getBaseTargetFromProps(){}removeValueFromRenderState(t,r){delete r.output[t]}measureInstanceViewportBox(){return ce()}build(t,r){Object.assign(t.output,r)}renderInstance(t,{output:r}){Object.assign(t,r)}sortInstanceNodePosition(){return 0}}function Yp(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},r=Ur(e)&&!Xi(e)?new xl(t):new bl(t);r.mount(e),tr.set(e,r)}function qp(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},r=new Xp(t);r.mount(e),tr.set(e,r)}function Zp(e,t){return fe(e)||typeof e=="number"||typeof e=="string"&&!zn(t)}function Ul(e,t,r,s){const n=[];if(Zp(e,t))n.push(El(e,zn(t)&&t.default||t,r&&(r.default||r)));else{const a=Gl(e,t,s),o=a.length;be(!!o,"No valid elements provided.","no-valid-elements");for(let i=0;i<o;i++){const l=a[i];be(l!==null,"You're trying to perform an animation on null. Ensure that selectors are correctly finding elements and refs are correctly hydrated.","animate-null");const c=l instanceof Element?Yp:qp;tr.has(l)||c(l);const d=tr.get(l),u={...r};"delay"in u&&typeof u.delay=="function"&&(u.delay=u.delay(i,o)),n.push(...On(d,{...t,transition:u},{}))}}return n}function Jp(e,t,r){const s=[];return Wp(e,t,r,{spring:Jt}).forEach(({keyframes:a,transition:o},i)=>{s.push(...Ul(i,a,o))}),s}function Qp(e){return Array.isArray(e)&&e.some(Array.isArray)}function em(e){function t(r,s,n){let a=[],o;if(Qp(r))a=Jp(r,s,e);else{const{onComplete:l,...c}=n||{};typeof l=="function"&&(o=l),a=Ul(r,s,c,e)}const i=new Qu(a);return o&&i.finished.then(o),i}return t}const tm=em();function rm(){const e=pt(Rp);return nr(e.mount,[]),e}const Ye=rm,sm={some:0,all:1};function nm(e,t,{root:r,margin:s,amount:n="some"}={}){const a=Gr(e),o=new WeakMap,i=c=>{c.forEach(d=>{const u=o.get(d.target);if(d.isIntersecting!==!!u)if(d.isIntersecting){const p=t(d.target,d);typeof p=="function"?o.set(d.target,p):l.unobserve(d.target)}else typeof u=="function"&&(u(d),o.delete(d.target))})},l=new IntersectionObserver(i,{root:r,rootMargin:s,threshold:typeof n=="number"?n:sm[n]});return a.forEach(c=>l.observe(c)),()=>l.disconnect()}function ke(e,{root:t,margin:r,amount:s,once:n=!1,initial:a=!1}={}){const[o,i]=h.useState(a);return h.useEffect(()=>{if(!e.current||n&&o)return;const l=()=>(i(!0),n?void 0:()=>i(!1)),c={root:t&&t.current||void 0,margin:r,amount:s};return nm(e.current,l,c)},[t,e,r,n,s]),o}const Hl=(e={})=>{const{selectionMode:t="single",defaultExpandedKeys:r=[],expandedKeys:s,onExpandedChange:n,onSelectionChange:a,isDisabled:o=!1}=e,[i,l]=h.useState(r),c=s!==void 0,d=c?s:i,u=h.useCallback(w=>{o||(c||l(w),n?.(w))},[c,o,n]),p=h.useCallback(w=>d.includes(w),[d]),m=h.useCallback(w=>{if(o)return;let C;if(t==="single")C=p(w)?[]:[w],a&&a(p(w)?"":w);else if(t==="multiple")C=p(w)?d.filter(j=>j!==w):[...d,w];else return;u(C)},[o,t,p,d,u,a]),g=h.useCallback(w=>{if(o||p(w))return;let C;if(t==="single")C=[w],a?.(w);else if(t==="multiple")C=[...d,w];else return;u(C)},[o,t,p,d,u,a]),v=h.useCallback(w=>{if(o||!p(w))return;const C=d.filter(j=>j!==w);u(C),t==="single"&&a&&a("")},[o,p,d,u,t,a]),x=h.useCallback((w=[])=>{o||t!=="multiple"||u(w)},[o,t,u]),b=h.useCallback(()=>{o||(u([]),t==="single"&&a&&a(""))},[o,u,t,a]),y=h.useCallback(w=>{u(w)},[u]);return h.useMemo(()=>({expandedKeys:d,isExpanded:p,toggle:m,expand:g,collapse:v,expandAll:x,collapseAll:b,setExpandedKeys:y}),[d,p,m,g,v,x,b,y])},Fn={xs:{base:"text-xs",header:"px-2 py-1.5 min-h-8",content:"px-2 pb-2",indicator:"text-xs w-3 h-3",gap:"gap-1"},sm:{base:"text-sm",header:"px-3 py-2 min-h-10",content:"px-3 pb-3",indicator:"text-sm w-4 h-4",gap:"gap-1.5"},md:{base:"text-base",header:"px-4 py-3 min-h-12",content:"px-4 pb-4",indicator:"text-base w-5 h-5",gap:"gap-2"},lg:{base:"text-lg",header:"px-5 py-4 min-h-14",content:"px-5 pb-5",indicator:"text-lg w-6 h-6",gap:"gap-2.5"},xl:{base:"text-xl",header:"px-6 py-5 min-h-16",content:"px-6 pb-6",indicator:"text-xl w-7 h-7",gap:"gap-3"}},Kl={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl",full:"rounded-2xl"},am=(e="default",t="flat",r=!1)=>{const s="transition-colors duration-200";return r?`${s} opacity-50 cursor-not-allowed`:`${s} ${{default:{flat:"bg-gray-100 text-gray-900 hover:bg-gray-200",bordered:"bg-transparent border-2 border-gray-200 text-gray-900 hover:border-gray-300 hover:bg-gray-50",shadow:"bg-white text-gray-900 shadow-md hover:shadow-lg",splitted:"bg-gray-50 text-gray-900 hover:bg-gray-100 shadow-sm"},primary:{flat:"bg-blue-100 text-blue-900 hover:bg-blue-200",bordered:"bg-transparent border-2 border-blue-200 text-blue-900 hover:border-blue-300 hover:bg-blue-50",shadow:"bg-white text-blue-900 shadow-md shadow-blue-100 hover:shadow-lg hover:shadow-blue-200",splitted:"bg-blue-50 text-blue-900 hover:bg-blue-100 shadow-sm shadow-blue-100"},secondary:{flat:"bg-purple-100 text-purple-900 hover:bg-purple-200",bordered:"bg-transparent border-2 border-purple-200 text-purple-900 hover:border-purple-300 hover:bg-purple-50",shadow:"bg-white text-purple-900 shadow-md shadow-purple-100 hover:shadow-lg hover:shadow-purple-200",splitted:"bg-purple-50 text-purple-900 hover:bg-purple-100 shadow-sm shadow-purple-100"},success:{flat:"bg-green-100 text-green-900 hover:bg-green-200",bordered:"bg-transparent border-2 border-green-200 text-green-900 hover:border-green-300 hover:bg-green-50",shadow:"bg-white text-green-900 shadow-md shadow-green-100 hover:shadow-lg hover:shadow-green-200",splitted:"bg-green-50 text-green-900 hover:bg-green-100 shadow-sm shadow-green-100"},warning:{flat:"bg-amber-100 text-amber-900 hover:bg-amber-200",bordered:"bg-transparent border-2 border-amber-200 text-amber-900 hover:border-amber-300 hover:bg-amber-50",shadow:"bg-white text-amber-900 shadow-md shadow-amber-100 hover:shadow-lg hover:shadow-amber-200",splitted:"bg-amber-50 text-amber-900 hover:bg-amber-100 shadow-sm shadow-amber-100"},danger:{flat:"bg-red-100 text-red-900 hover:bg-red-200",bordered:"bg-transparent border-2 border-red-200 text-red-900 hover:border-red-300 hover:bg-red-50",shadow:"bg-white text-red-900 shadow-md shadow-red-100 hover:shadow-lg hover:shadow-red-200",splitted:"bg-red-50 text-red-900 hover:bg-red-100 shadow-sm shadow-red-100"}}[e][t]}`},om=(e="default",t="flat",r=!1,s=!1)=>{const n="flex items-center justify-between w-full text-left font-medium transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2";if(s)return`${n} opacity-50 cursor-not-allowed focus:ring-gray-300`;const a={default:"focus:ring-gray-500",primary:"focus:ring-blue-500",secondary:"focus:ring-purple-500",success:"focus:ring-green-500",warning:"focus:ring-amber-500",danger:"focus:ring-red-500"},o=r?"font-semibold":"",i=t==="bordered"?"hover:bg-opacity-10":"";return`${n} ${a[e]} ${o} ${i} cursor-pointer`},im=(e="default",t="flat")=>`overflow-hidden transition-all duration-300 ease-in-out ${{default:{flat:"text-gray-700",bordered:"text-gray-700",shadow:"text-gray-700",splitted:"text-gray-700"},primary:{flat:"text-blue-800",bordered:"text-blue-800",shadow:"text-blue-800",splitted:"text-blue-800"},secondary:{flat:"text-purple-800",bordered:"text-purple-800",shadow:"text-purple-800",splitted:"text-purple-800"},success:{flat:"text-green-800",bordered:"text-green-800",shadow:"text-green-800",splitted:"text-green-800"},warning:{flat:"text-amber-800",bordered:"text-amber-800",shadow:"text-amber-800",splitted:"text-amber-800"},danger:{flat:"text-red-800",bordered:"text-red-800",shadow:"text-red-800",splitted:"text-red-800"}}[e][t]}`,lm=(e="default",t=!1,r=!1)=>{const s="flex-shrink-0 transition-transform duration-200 ease-in-out";if(r)return`${s} opacity-50 text-gray-400`;const n={default:"text-gray-600",primary:"text-blue-600",secondary:"text-purple-600",success:"text-green-600",warning:"text-amber-600",danger:"text-red-600"},a=t?"rotate-180":"rotate-0";return`${s} ${n[e]} ${a}`},cm=(e="default",t="flat")=>t==="splitted"?"":`border-t ${{default:"border-gray-200",primary:"border-blue-200",secondary:"border-purple-200",success:"border-green-200",warning:"border-amber-200",danger:"border-red-200"}[e]}`,dm=(e="flat")=>`accordion-item ${{flat:"border-0",bordered:"border border-gray-200 first:border-t last:border-b",shadow:"shadow-sm",splitted:"mb-2 last:mb-0 shadow-sm border border-gray-100"}[e]}`,um=(e="flat",t="md",r=!1,s="")=>{const n="accordion w-full",a=Kl[t],o="space-y-0",i={flat:"space-y-0",bordered:`space-y-0 ${a} overflow-hidden`,shadow:"space-y-2",splitted:"space-y-2"};return`${n} ${i[e]} ${o} ${s}`.trim()},Ve={size:"md",color:"default",variant:"flat",radius:"md",selectionMode:"single",indicatorPlacement:"end",itemPlacement:"outside",showDivider:!0,disableAnimation:!1,disableIndicatorAnimation:!1,keepContentMounted:!1,isCompact:!1},Xl={spring:{preset:"spring",spring:{stiffness:280,damping:25,duration:.4},staggerDelay:.1,enableStagger:!0},tween:{preset:"tween",spring:{stiffness:180,damping:22,duration:.5},staggerDelay:.08,enableStagger:!0},smooth:{preset:"smooth",spring:{stiffness:240,damping:28,duration:.45},staggerDelay:.12,enableStagger:!0},bouncy:{preset:"bouncy",spring:{stiffness:400,damping:18,duration:.6},staggerDelay:.15,enableStagger:!0},slow:{preset:"slow",spring:{stiffness:150,damping:30,duration:.7},staggerDelay:.2,enableStagger:!0}},fm=Xl.spring,Yr=(e,t)=>{const r=t?Xl[t]:fm;return e?{...r,...e,spring:{...r.spring,...e.spring}}:r},hm=e=>{const{spring:t}=e,r={type:"spring",stiffness:t?.stiffness||280,damping:t?.damping||25};return{collapsed:{rotate:0,scale:1,transition:r},expanded:{rotate:180,scale:1.05,transition:r}}},Do=(e,t=0)=>e.enableStagger?{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:t*(e.staggerDelay||.1),duration:e.spring?.duration?e.spring.duration*.5:.3,ease:"easeOut"}}:{},Yl=e=>{const t={type:"spring",stiffness:280,damping:25},r={spring:{scale:1.002,transition:t},tween:{scale:1.001,transition:t},smooth:{scale:1.002,transition:t},bouncy:{scale:1.005,transition:t},slow:{scale:1.001,transition:t}};return r[e]||r.spring},ql=e=>{const t={type:"spring",stiffness:280,damping:25},r={spring:{scale:.998,transition:t},tween:{scale:.999,transition:t},smooth:{scale:.998,transition:t},bouncy:{scale:.995,transition:t},slow:{scale:.999,transition:t}};return r[e]||r.spring},Lo=({className:e="",isExpanded:t=!1,disableAnimation:r=!1,animationConfig:s})=>{const n=h.useMemo(()=>s?hm(s):{},[s]);return r?f.jsx("svg",{className:`${e} ${t?"rotate-180":""} transition-transform duration-200`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})}):f.jsx(_.svg,{className:e,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,animate:t?"expanded":"collapsed",variants:n,children:f.jsx(_.path,{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7",animate:{pathLength:1,opacity:1},initial:{pathLength:.8,opacity:.8},transition:{type:"spring",stiffness:s?.spring?.stiffness||280,damping:s?.spring?.damping||25}})})},Gs=({isExpanded:e,isDisabled:t=!1,className:r="",children:s,"data-testid":n})=>{const{color:a,size:o,disableIndicatorAnimation:i,animationConfig:l}=qr(),c=h.useMemo(()=>Yr(l,"spring"),[l]),d=h.useMemo(()=>Yl(c.preset||"spring"),[c.preset]),u=h.useMemo(()=>ql(c.preset||"spring"),[c.preset]),p=Fn[o],g=`${lm(a,e,t)} ${p.indicator} ${r}`.trim();return i?f.jsx("span",{className:g,"data-testid":n,"aria-hidden":"true",children:s||f.jsx(Lo,{className:"w-full h-full"})}):f.jsx(_.span,{className:g,"data-testid":n,"aria-hidden":"true",whileHover:d,whileTap:u,children:s||f.jsx(Lo,{className:"w-full h-full",isExpanded:e,disableAnimation:i,animationConfig:c})})},Wn=({children:e,isExpanded:t,isDisabled:r=!1,onClick:s,className:n="",ariaLabel:a,"data-testid":o})=>{const{color:i,variant:l,size:c,indicatorPlacement:d,animationConfig:u}=qr(),p=h.useMemo(()=>Yr(u,"spring"),[u]),m=h.useMemo(()=>Yl(p.preset||"spring"),[p.preset]),g=h.useMemo(()=>ql(p.preset||"spring"),[p.preset]),v=Fn[c],b=`${om(i,l,t,r)} ${v.header} ${n}`.trim(),y=()=>{!r&&s&&s()},w=C=>{!r&&(C.key==="Enter"||C.key===" ")&&(C.preventDefault(),s?.())};return f.jsxs(_.button,{type:"button",className:b,onClick:y,onKeyDown:w,disabled:r,"aria-expanded":t,"aria-label":a,"data-testid":o,role:"tab",tabIndex:r?-1:0,whileHover:r?void 0:m,whileTap:r?void 0:g,children:[d==="start"&&f.jsx(Gs,{isExpanded:t,isDisabled:r}),f.jsx(_.span,{className:"flex-1 text-left",animate:{opacity:r?.5:1},transition:{type:"spring",stiffness:280,damping:25},children:e}),d==="end"&&f.jsx(Gs,{isExpanded:t,isDisabled:r})]})};Wn.displayName="AccordionHeader";Gs.displayName="AccordionIndicator";const Oo=({isExpanded:e,disableAnimation:t=!1,children:r,className:s="",style:n,animationConfig:a})=>{const o=h.useRef(null),i=h.useMemo(()=>Yr(a,"spring"),[a]);if(t)return f.jsx("div",{className:s,style:n,children:r});const l=h.useMemo(()=>{const{spring:d}=i,u={type:"spring",stiffness:d?.stiffness||280,damping:d?.damping||25};return{closed:{opacity:0,transformOrigin:"top",transition:u},open:{opacity:1,transformOrigin:"top",transition:u}}},[i]),c={overflow:"hidden",...n};return f.jsx(_.div,{ref:o,className:s,style:c,initial:"closed",animate:e?"open":"closed",variants:l,children:r})},_n=({children:e,isExpanded:t,className:r="",style:s,"data-testid":n})=>{const{color:a,variant:o,size:i,disableAnimation:l,keepContentMounted:c,animationConfig:d}=qr(),u=Fn[i],m=`${im(a,o)} ${u.content} ${r}`.trim();return l?t?f.jsx("div",{className:m,style:s,"data-testid":n,role:"tabpanel",children:e}):null:c?f.jsx(Oo,{isExpanded:t,disableAnimation:l,className:m,style:s,animationConfig:d,children:f.jsx("div",{"data-testid":n,role:"tabpanel","aria-hidden":!t,children:e})}):f.jsx(We,{initial:!1,children:t&&f.jsx(Oo,{isExpanded:t,disableAnimation:l,className:m,style:s,animationConfig:d,children:f.jsx("div",{"data-testid":n,role:"tabpanel","aria-hidden":!t,children:e})},"accordion-content")})};_n.displayName="AccordionContent";const Gn=({itemKey:e,title:t,children:r,isExpanded:s,isDisabled:n=!1,showDivider:a,header:o,onToggle:i,className:l="",style:c,ariaLabel:d,"data-testid":u})=>{const p=qr(),{expandedKeys:m,toggle:g,variant:v,color:x,radius:b,isDisabled:y,showDivider:w}=p,C=s!==void 0?s:m.includes(e),j=y||n,S=a!==void 0?a:w,T=()=>{j||(i?i(e):g(e))},k=dm(v),V=am(x,v,j),A=Kl[b],B=cm(x,v),$=h.useMemo(()=>{const L=[k,V,A,l];return v==="splitted"&&L.push("border rounded-lg overflow-hidden"),L.filter(Boolean).join(" ").trim()},[k,V,A,l,v]);return f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:$,style:c,"data-testid":u,"data-expanded":C,"data-disabled":j,children:[f.jsx(Wn,{isExpanded:C,isDisabled:j,onClick:T,ariaLabel:d||`Toggle ${t}`,"data-testid":u?`${u}-header`:void 0,children:o||t}),f.jsx(_n,{isExpanded:C,"data-testid":u?`${u}-content`:void 0,children:r})]}),S&&v!=="splitted"&&f.jsx("div",{className:B})]})};Gn.displayName="AccordionItem";const Zl=h.createContext(null),qr=()=>{const e=h.useContext(Zl);if(!e)throw new Error("useAccordionContext must be used within an Accordion component");return e},Jl=({items:e,children:t,selectionMode:r=Ve.selectionMode,defaultExpandedKeys:s,expandedKeys:n,onExpandedChange:a,onSelectionChange:o,size:i=Ve.size,color:l=Ve.color,variant:c=Ve.variant,radius:d=Ve.radius,isDisabled:u=!1,showDivider:p=Ve.showDivider,disableAnimation:m=Ve.disableAnimation,disableIndicatorAnimation:g=Ve.disableIndicatorAnimation,keepContentMounted:v=Ve.keepContentMounted,animationConfig:x,indicatorPlacement:b=Ve.indicatorPlacement,itemPlacement:y=Ve.itemPlacement,isCompact:w=Ve.isCompact,className:C="",style:j,"aria-label":S="Accordion","data-testid":T,...k})=>{const V=Hl({selectionMode:r,defaultExpandedKeys:s,expandedKeys:n,onExpandedChange:a,onSelectionChange:o,isDisabled:u}),A=h.useMemo(()=>({expandedKeys:V.expandedKeys,toggle:V.toggle,selectionMode:r,size:i,color:l,variant:c,radius:d,isDisabled:u,showDivider:p,disableAnimation:m,disableIndicatorAnimation:g,keepContentMounted:v,indicatorPlacement:b,itemPlacement:y,isCompact:w,animationConfig:x}),[V.expandedKeys,V.toggle,r,i,l,c,d,u,p,m,g,v,b,y,w,x]),B=um(c,d,w,C),$=h.useMemo(()=>Yr(x,"spring"),[x]),L=()=>e&&e.length>0?e.map((I,R)=>{const D=Do($,R);return f.jsx(_.div,{...m?{}:D,children:f.jsx(Gn,{itemKey:I.key,title:I.title,isDisabled:I.isDisabled,className:I.className,style:I.style,ariaLabel:I.ariaLabel,children:I.content})},I.key)}):t&&!m?h.Children.toArray(t).map((R,D)=>{const P=Do($,D);return f.jsx(_.div,{...P,children:R},D)}):t;return f.jsx(Zl.Provider,{value:A,children:f.jsx(_.div,{className:B,style:j,"aria-label":S,"data-testid":T,role:"tablist",initial:{opacity:0},animate:{opacity:1},transition:{type:"spring",stiffness:280,damping:25},...k,children:L()})})};Jl.displayName="Accordion";const pm={linear:[0,0,1,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1],backIn:[.6,-.28,.735,.045],backOut:[.175,.885,.32,1.275],backInOut:[.68,-.55,.265,1.55],bounceIn:[.6,-.28,.735,.045],bounceOut:[.175,.885,.32,1.275],bounceInOut:[.68,-.55,.265,1.55],elasticIn:[.5,-.25,.75,1.25],elasticOut:[.25,.46,.45,.94],elasticInOut:[.5,-.25,.75,1.25]},mt=(e,t=.5)=>({duration:t,ease:pm[e]}),mm=(e,t=50)=>({up:{x:0,y:-t},down:{x:0,y:t},left:{x:-t,y:0},right:{x:t,y:0},upLeft:{x:-t,y:-t},upRight:{x:t,y:-t},downLeft:{x:-t,y:t},downRight:{x:t,y:t}})[e],gm=e=>{switch(e){case"horizontal":return{rotateY:180};case"vertical":return{rotateX:180};case"both":return{rotateX:180,rotateY:180};default:return{}}},bm={hidden:e=>({opacity:e.startOpacity,filter:e.blur?`blur(${e.blurAmount}px)`:"blur(0px)"}),visible:e=>({opacity:e.endOpacity,filter:"blur(0px)"})},ym={hidden:e=>{const{x:t,y:r}=mm(e.direction,e.distance);return{x:e.overshoot?t*1.2:t,y:e.overshoot?r*1.2:r,opacity:0}},visible:{x:0,y:0,opacity:1}},xm={hidden:e=>({scale:e.startScale,opacity:0}),visible:e=>({scale:e.endScale,opacity:1,transition:{type:e.bounce?"spring":"tween",stiffness:e.bounce?300:100,damping:e.bounce?20:10}})},vm={hidden:e=>({scale:e.startScale,opacity:0,y:-20}),visible:e=>({scale:1,opacity:1,y:0,transition:{type:"spring",...{low:{stiffness:200,damping:15},medium:{stiffness:300,damping:12},high:{stiffness:400,damping:8}}[e.intensity],bounce:.4}})},wm={hidden:e=>({...gm(e.direction),opacity:e.backfaceVisible?1:0,transformPerspective:e.perspective,backfaceVisibility:e.backfaceVisible?"visible":"hidden"}),visible:{rotateX:0,rotateY:0,opacity:1}},Cm={hidden:{opacity:0},visible:e=>({opacity:1,transition:{staggerChildren:e.staggerDelay,staggerDirection:e.staggerDirection==="reverse"?-1:1,delayChildren:.1}})},km={hidden:{opacity:0,y:20,scale:.8},visible:{opacity:1,y:0,scale:1,transition:{type:"spring",stiffness:300,damping:20}}},jm=e=>{const t={initial:e[0]||{}};return e.forEach((r,s)=>{t[`morph${s}`]={...r,transition:{type:"spring",stiffness:200,damping:20}}}),t},Sm={hidden:{opacity:0},visible:{opacity:1}},qe=()=>typeof window>"u"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches,Ke=e=>{e.style.willChange="transform, opacity",e.style.backfaceVisibility="hidden",e.style.perspective="1000px"},Xe=e=>{e.style.willChange="auto",e.style.backfaceVisibility="visible",e.style.perspective="none"},ie=(e,t)=>{const r=performance.now();return{animationDuration:t,frameRate:Math.round(1e3/(r-e)),renderTime:r-e}},te=(e,t,r)=>{try{switch(t){case"start":e.onStart?.(r);break;case"update":e.onUpdate?.(r);break;case"complete":e.onComplete?.(r);break;case"error":e.onError?.(r);break}}catch(s){console.warn("Error handling animation event:",s)}},st=e=>({}),$o=e=>e.startsWith(">")?`:scope ${e}`:e,Tm=({children:e,trigger:t="inView",delay:r=0,duration:s=.6,easing:n="easeOut",disabled:a=!1,startOpacity:o=0,endOpacity:i=1,blur:l=!1,blurAmount:c=5,variants:d,transition:u,className:p="",style:m={},onAnimationStart:g,onAnimationComplete:v,...x})=>{const b=h.useRef(null),y=Ye(),w=ke(b,{once:!0,margin:"0px 0px -10% 0px"}),C=qe(),j=h.useRef(0),S=d||bm,T={startOpacity:o,endOpacity:i,blur:l,blurAmount:c};h.useEffect(()=>{if(a||C){y.set("visible");return}(async()=>{try{switch(j.current=performance.now(),b.current&&Ke(b.current),t){case"immediate":te({onStart:g},"start",ie(j.current,s)),await y.start("visible");break;case"inView":w&&(te({onStart:g},"start",ie(j.current,s)),await y.start("visible"));break;case"manual":break;default:await y.start("visible")}b.current&&Xe(b.current),te({onComplete:v},"complete",ie(j.current,s))}catch(E){console.warn("Error in FadeContainer animation:",E),te({onError:console.error},"error",E)}})()},[w,t,y,a,C,s,g,v]);const k=u||{...mt(n,s),delay:r},A={...st(),...m},B=()=>{t==="hover"&&!a&&!C&&y.start("visible")},$=()=>{t==="hover"&&!a&&!C&&y.start("hidden")},L=()=>{t==="focus"&&!a&&!C&&y.start("visible")},I=()=>{t==="focus"&&!a&&!C&&y.start("hidden")},{onDrag:R,onDragEnd:D,onDragStart:P,...M}=x;return f.jsx(_.div,{ref:b,custom:T,variants:S,initial:a||C?"visible":"hidden",animate:y,transition:k,onMouseEnter:B,onMouseLeave:$,onFocus:L,onBlur:I,className:p,style:A,...M,children:e})},Mm=({children:e,trigger:t="inView",delay:r=0,duration:s=.6,easing:n="easeOut",disabled:a=!1,direction:o="up",distance:i=50,overshoot:l=!1,variants:c,transition:d,className:u="",style:p={},onAnimationStart:m,onAnimationComplete:g,...v})=>{const x=h.useRef(null),b=Ye(),y=ke(x,{once:!0,margin:"0px 0px -10% 0px"}),w=qe(),C=h.useRef(0),j=c||ym,S={direction:o,distance:i,overshoot:l};h.useEffect(()=>{if(a||w){b.set("visible");return}(async()=>{try{switch(C.current=performance.now(),x.current&&Ke(x.current),t){case"immediate":te({onStart:m},"start",ie(C.current,s)),await b.start("visible");break;case"inView":y&&(te({onStart:m},"start",ie(C.current,s)),await b.start("visible"));break;case"manual":break;default:await b.start("visible")}x.current&&Xe(x.current),te({onComplete:g},"complete",ie(C.current,s))}catch(N){console.warn("Error in SlideContainer animation:",N),te({onError:console.error},"error",N)}})()},[y,t,b,a,w,s,m,g]);const T=d||{...mt(n,s),delay:r,...l&&{type:"spring",stiffness:200,damping:20}},V={...st(),...p},A=()=>{t==="hover"&&!a&&!w&&b.start("visible")},B=()=>{t==="hover"&&!a&&!w&&b.start("hidden")},$=()=>{t==="focus"&&!a&&!w&&b.start("visible")},L=()=>{t==="focus"&&!a&&!w&&b.start("hidden")},{onDrag:I,onDragEnd:R,onDragStart:D,...P}=v;return f.jsx(_.div,{ref:x,custom:S,variants:j,initial:a||w?"visible":"hidden",animate:b,transition:T,onMouseEnter:A,onMouseLeave:B,onFocus:$,onBlur:L,className:u,style:V,...P,children:e})},Am=({children:e,trigger:t="inView",delay:r=0,duration:s=.6,easing:n="easeOut",disabled:a=!1,startScale:o=.8,endScale:i=1,scaleOrigin:l="center",bounce:c=!1,variants:d,transition:u,className:p="",style:m={},onAnimationStart:g,onAnimationComplete:v,...x})=>{const b=h.useRef(null),y=Ye(),w=ke(b,{once:!0,margin:"0px 0px -10% 0px"}),C=qe(),j=h.useRef(0),S=d||xm,T={startScale:o,endScale:i,bounce:c};h.useEffect(()=>{if(a||C){y.set("visible");return}(async()=>{try{switch(j.current=performance.now(),b.current&&Ke(b.current),t){case"immediate":te({onStart:g},"start",ie(j.current,s)),await y.start("visible");break;case"inView":w&&(te({onStart:g},"start",ie(j.current,s)),await y.start("visible"));break;case"manual":break;default:await y.start("visible")}b.current&&Xe(b.current),te({onComplete:v},"complete",ie(j.current,s))}catch(E){console.warn("Error in ScaleContainer animation:",E),te({onError:console.error},"error",E)}})()},[w,t,y,a,C,s,g,v]);const k=u||{...mt(n,s),delay:r,...c&&{type:"spring",stiffness:300,damping:20,bounce:.3}},V=st(),A={transformOrigin:l,...V,...m},B=()=>{t==="hover"&&!a&&!C&&y.start("visible")},$=()=>{t==="hover"&&!a&&!C&&y.start("hidden")},L=()=>{t==="focus"&&!a&&!C&&y.start("visible")},I=()=>{t==="focus"&&!a&&!C&&y.start("hidden")},{onDrag:R,onDragEnd:D,onDragStart:P,...M}=x;return f.jsx(_.div,{ref:b,custom:T,variants:S,initial:a||C?"visible":"hidden",animate:y,transition:k,onMouseEnter:B,onMouseLeave:$,onFocus:L,onBlur:I,className:p,style:A,...M,children:e})},Vm=({children:e,trigger:t="inView",delay:r=0,duration:s=.8,easing:n="easeOut",disabled:a=!1,intensity:o="medium",bounceCount:i=1,startScale:l=.3,variants:c,transition:d,className:u="",style:p={},onAnimationStart:m,onAnimationComplete:g,...v})=>{const x=h.useRef(null),b=Ye(),y=ke(x,{once:!0,margin:"0px 0px -10% 0px"}),w=qe(),C=h.useRef(0),j=c||vm,S={intensity:o,bounceCount:i,startScale:l};h.useEffect(()=>{if(a||w){b.set("visible");return}(async()=>{try{switch(C.current=performance.now(),x.current&&Ke(x.current),t){case"immediate":te({onStart:m},"start",ie(C.current,s)),await b.start("visible");break;case"inView":y&&(te({onStart:m},"start",ie(C.current,s)),await b.start("visible"));break;case"manual":break;default:await b.start("visible")}x.current&&Xe(x.current),te({onComplete:g},"complete",ie(C.current,s))}catch(E){console.warn("Error in BounceContainer animation:",E),te({onError:console.error},"error",E)}})()},[y,t,b,a,w,s,m,g]);const k=d||{type:"spring",...{low:{stiffness:200,damping:15,bounce:.2},medium:{stiffness:300,damping:12,bounce:.4},high:{stiffness:400,damping:8,bounce:.6}}[o],delay:r,duration:s},A={...st(),...p},B=()=>{t==="hover"&&!a&&!w&&b.start("visible")},$=()=>{t==="hover"&&!a&&!w&&b.start("hidden")},L=()=>{t==="focus"&&!a&&!w&&b.start("visible")},I=()=>{t==="focus"&&!a&&!w&&b.start("hidden")},{onDrag:R,onDragEnd:D,onDragStart:P,...M}=v;return f.jsx(_.div,{ref:x,custom:S,variants:j,initial:a||w?"visible":"hidden",animate:b,transition:k,onMouseEnter:B,onMouseLeave:$,onFocus:L,onBlur:I,className:u,style:A,...M,children:e})},Pm=({children:e,trigger:t="inView",delay:r=0,duration:s=.8,easing:n="easeOut",disabled:a=!1,direction:o="horizontal",perspective:i=1e3,backfaceVisible:l=!1,variants:c,transition:d,className:u="",style:p={},onAnimationStart:m,onAnimationComplete:g,...v})=>{const x=h.useRef(null),b=Ye(),y=ke(x,{once:!0,margin:"0px 0px -10% 0px"}),w=qe(),C=h.useRef(0),j=c||wm,S={direction:o,perspective:i,backfaceVisible:l};h.useEffect(()=>{if(a||w){b.set("visible");return}(async()=>{try{switch(C.current=performance.now(),x.current&&Ke(x.current),t){case"immediate":te({onStart:m},"start",ie(C.current,s)),await b.start("visible");break;case"inView":y&&(te({onStart:m},"start",ie(C.current,s)),await b.start("visible"));break;case"manual":break;default:await b.start("visible")}x.current&&Xe(x.current),te({onComplete:g},"complete",ie(C.current,s))}catch(N){console.warn("Error in FlipContainer animation:",N),te({onError:console.error},"error",N)}})()},[y,t,b,a,w,s,m,g]);const T=d||{...mt(n,s),delay:r},k=st(),V={perspective:`${i}px`,transformStyle:"preserve-3d",...k,...p},A=()=>{t==="hover"&&!a&&!w&&b.start("visible")},B=()=>{t==="hover"&&!a&&!w&&b.start("hidden")},$=()=>{t==="focus"&&!a&&!w&&b.start("visible")},L=()=>{t==="focus"&&!a&&!w&&b.start("hidden")},{onDrag:I,onDragEnd:R,onDragStart:D,...P}=v;return f.jsx(_.div,{ref:x,custom:S,variants:j,initial:a||w?"visible":"hidden",animate:b,transition:T,onMouseEnter:A,onMouseLeave:B,onFocus:$,onBlur:L,className:u,style:V,...P,children:e})},Em=({children:e,trigger:t="inView",delay:r=0,duration:s=.6,easing:n="easeOut",disabled:a=!1,staggerDelay:o=.1,staggerDirection:i="normal",childSelector:l="> *",variants:c,transition:d,className:u="",style:p={},onAnimationStart:m,onAnimationComplete:g,...v})=>{const x=h.useRef(null),b=Ye(),y=ke(x,{once:!0,margin:"0px 0px -10% 0px"}),w=qe(),C=h.useRef(0),j=c||Cm,S={staggerDelay:o,staggerDirection:i};h.useEffect(()=>{if(a||w){b.set("visible");return}(async()=>{try{switch(C.current=performance.now(),x.current&&(Ke(x.current),x.current.querySelectorAll($o(l)).forEach(F=>{F instanceof HTMLElement&&Ke(F)})),t){case"immediate":te({onStart:m},"start",ie(C.current,s)),await b.start("visible");break;case"inView":y&&(te({onStart:m},"start",ie(C.current,s)),await b.start("visible"));break;case"manual":break;default:await b.start("visible")}x.current&&(Xe(x.current),x.current.querySelectorAll($o(l)).forEach(F=>{F instanceof HTMLElement&&Xe(F)})),te({onComplete:g},"complete",ie(C.current,s))}catch(E){console.warn("Error in StaggerContainer animation:",E),te({onError:console.error},"error",E)}})()},[y,t,b,a,w,s,m,g,l]);const T=d||{...mt(n,s),delay:r},V={...st(),...p},A=()=>{t==="hover"&&!a&&!w&&b.start("visible")},B=()=>{t==="hover"&&!a&&!w&&b.start("hidden")},$=()=>{t==="focus"&&!a&&!w&&b.start("visible")},L=()=>{t==="focus"&&!a&&!w&&b.start("hidden")},I=()=>h.Children.map(e,(N,E)=>h.isValidElement(N)?f.jsx(_.div,{variants:km,style:{display:"contents"},children:N},E):N),{onDrag:R,onDragEnd:D,onDragStart:P,...M}=v;return f.jsx(_.div,{ref:x,custom:S,variants:j,initial:a||w?"visible":"hidden",animate:b,transition:T,onMouseEnter:A,onMouseLeave:B,onFocus:$,onBlur:L,className:u,style:V,...M,children:I()})},Im=({children:e,trigger:t="inView",delay:r=0,duration:s=1,easing:n="easeInOut",disabled:a=!1,morphStates:o=[{width:"200px",height:"200px",borderRadius:"0px",backgroundColor:"#3b82f6"},{width:"300px",height:"150px",borderRadius:"20px",backgroundColor:"#ef4444"},{width:"250px",height:"250px",borderRadius:"50%",backgroundColor:"#10b981"}],morphInterval:i=3e3,autoMorph:l=!0,variants:c,transition:d,className:u="",style:p={},onAnimationStart:m,onAnimationComplete:g,...v})=>{const x=h.useRef(null),b=Ye(),y=ke(x,{once:!0,margin:"0px 0px -10% 0px"}),w=qe(),[C,j]=h.useState(0),S=h.useRef(0),T=h.useRef(void 0),k=c||jm(o);h.useEffect(()=>{if(a||w){b.set("initial");return}return(async()=>{try{switch(S.current=performance.now(),x.current&&Ke(x.current),t){case"immediate":te({onStart:m},"start",ie(S.current,s)),await b.start("initial"),V();break;case"inView":y&&(te({onStart:m},"start",ie(S.current,s)),await b.start("initial"),V());break;case"manual":await b.start("initial");break;default:await b.start("initial"),V()}te({onComplete:g},"complete",ie(S.current,s))}catch(O){console.warn("Error in MorphingContainer animation:",O),te({onError:console.error},"error",O)}})(),()=>{T.current&&clearInterval(T.current)}},[y,t,b,a,w,s,m,g]);const V=()=>{!l||o.length<=1||(T.current=window.setInterval(()=>{j(z=>{const O=(z+1)%o.length;return b.start(`morph${O}`),O})},i))},A=z=>{z>=0&&z<o.length&&(j(z),b.start(`morph${z}`))},B=d||{...mt(n,s),delay:r},L={display:"flex",alignItems:"center",justifyContent:"center",...st(),...p},I=()=>{if(t==="hover"&&!a&&!w){const z=(C+1)%o.length;A(z)}},R=()=>{t==="hover"&&!a&&!w&&A(0)},D=()=>{if(t==="focus"&&!a&&!w){const z=(C+1)%o.length;A(z)}},P=()=>{t==="focus"&&!a&&!w&&A(0)};h.useEffect(()=>()=>{x.current&&Xe(x.current),T.current&&clearInterval(T.current)},[]);const{onDrag:M,onDragEnd:N,onDragStart:E,...F}=v;return f.jsx(_.div,{ref:x,variants:k,initial:"initial",animate:b,transition:B,onMouseEnter:I,onMouseLeave:R,onFocus:D,onBlur:P,className:u,style:L,...F,children:e})},Nm=e=>{const[t,r]=h.useState(0),s=Ye();return{currentIndex:t,controls:s,morphToNext:()=>{const i=(t+1)%e.length;r(i),s.start(`morph${i}`)},morphToPrevious:()=>{const i=t===0?e.length-1:t-1;r(i),s.start(`morph${i}`)},morphToIndex:i=>{i>=0&&i<e.length&&(r(i),s.start(`morph${i}`))}}},Rm=({children:e,trigger:t="inView",delay:r=0,duration:s=1,easing:n="easeInOut",disabled:a=!1,speed:o=.5,direction:i="vertical",offset:l=0,enableOnMobile:c=!1,variants:d,transition:u,className:p="",style:m={},onAnimationStart:g,onAnimationComplete:v,...x})=>{const b=h.useRef(null),y=Ye(),w=ke(b,{once:!0,margin:"0px 0px -10% 0px"}),C=qe(),[j,S]=h.useState(!1),T=h.useRef(0),{scrollY:k}=Wl(),V=d||Sm;h.useEffect(()=>{const Y=()=>{S(window.innerWidth<=768)};return Y(),window.addEventListener("resize",Y),()=>{window.removeEventListener("resize",Y)}},[]);const A=Mt(k,[0,1e3],[0,-o*100]),B=Mt(k,[0,1e3],[0,-o*100]),$=Dr(A,{stiffness:100,damping:30,mass:1}),L=Dr(B,{stiffness:100,damping:30,mass:1}),I=!a&&!C&&(c||!j);h.useEffect(()=>{if(a||C||j&&!c){y.set("visible");return}(async()=>{try{switch(T.current=performance.now(),b.current&&Ke(b.current),t){case"immediate":te({onStart:g},"start",ie(T.current,s)),await y.start("visible");break;case"inView":w&&(te({onStart:g},"start",ie(T.current,s)),await y.start("visible"));break;case"manual":await y.start("hidden");break;default:await y.start("visible")}te({onComplete:v},"complete",ie(T.current,s))}catch(Z){console.warn("Error in ParallaxContainer animation:",Z),te({onError:console.error},"error",Z)}})()},[w,t,y,a,C,j,c,s,g,v]);const R=u||{...mt(n,s),delay:r},P={...st(),...m},M=()=>{if(!I)return{};switch(i){case"horizontal":return{x:L};case"both":return{x:L,y:$};case"vertical":default:return{y:$}}},N=()=>{t==="hover"&&!a&&!C&&y.start("visible")},E=()=>{t==="hover"&&!a&&!C&&y.start("hidden")},F=()=>{t==="focus"&&!a&&!C&&y.start("visible")},z=()=>{t==="focus"&&!a&&!C&&y.start("hidden")};h.useEffect(()=>()=>{b.current&&Xe(b.current)},[]);const{onDrag:O,onDragEnd:H,onDragStart:W,...J}=x;return f.jsx(_.div,{ref:b,variants:V,initial:a||C?"visible":"hidden",animate:y,transition:R,style:{...P,...M()},onMouseEnter:N,onMouseLeave:E,onFocus:F,onBlur:z,className:p,...J,children:e})},Bm=e=>{const{scrollY:t}=Wl(),[r,s]=h.useState(!1),n=qe(),{speed:a=.5,direction:o="vertical",enableOnMobile:i=!1}=e||{};h.useEffect(()=>{const g=()=>{s(window.innerWidth<=768)};return g(),window.addEventListener("resize",g),()=>{window.removeEventListener("resize",g)}},[]);const l=!n&&(i||!r),c=Mt(t,[0,1e3],[0,-a*100]),d=Mt(t,[0,1e3],[0,-a*100]),u=Dr(c,{stiffness:100,damping:30,mass:1}),p=Dr(d,{stiffness:100,damping:30,mass:1});return{isActive:l,isMobile:r,scrollY:t,transformValue:(()=>{if(!l)return{};switch(o){case"horizontal":return{x:p};case"both":return{x:p,y:u};case"vertical":default:return{y:u}}})(),smoothY:u,smoothX:p}},It={smooth:{type:"tween",duration:.3,ease:"easeOut"},bounce:{type:"spring",damping:10,stiffness:400,mass:1}},Dm={initial:(e=0)=>({opacity:e}),animate:(e=1)=>({opacity:e}),exit:{opacity:0}},Lm={initial:({direction:e="up",distance:t=50})=>{switch(e){case"up":return{y:t,opacity:0};case"down":return{y:-t,opacity:0};case"left":return{x:t,opacity:0};case"right":return{x:-t,opacity:0};default:return{y:t,opacity:0}}},animate:{x:0,y:0,opacity:1},exit:({direction:e="up",distance:t=50})=>{switch(e){case"up":return{y:-t,opacity:0};case"down":return{y:t,opacity:0};case"left":return{x:-t,opacity:0};case"right":return{x:t,opacity:0};default:return{y:-t,opacity:0}}}},Om={initial:(e=0)=>({scale:e,opacity:0}),animate:(e=1)=>({scale:e,opacity:1}),exit:{scale:0,opacity:0},hover:{scale:1.05},tap:{scale:.95}},$m={initial:({direction:e="clockwise",degrees:t=180})=>({rotate:e==="clockwise"?-t:t,opacity:0}),animate:{rotate:0,opacity:1},exit:({direction:e="clockwise",degrees:t=180})=>({rotate:e==="clockwise"?t:-t,opacity:0})},zm={initial:{y:0,opacity:0},animate:({amplitude:e=20,frequency:t=2})=>({y:[0,-e,0,-e*.5,0],opacity:1,transition:{duration:.6,times:[0,.2,.4,.6,1],repeat:t-1}}),exit:{y:0,opacity:0}},Fm=({children:e,className:t="",delay:r=0,duration:s=.3,disabled:n=!1,trigger:a="inView",once:o=!0,threshold:i=.1,from:l=0,to:c=1,style:d})=>{const u=h.useRef(null),p=ke(u,{once:o,amount:i});if(n)return f.jsx("div",{className:t,style:d,children:e});const m=()=>{switch(a){case"inView":return p?"animate":"initial";case"manual":return"initial";case"hover":case"tap":return"animate";default:return"animate"}},g={...It.smooth,duration:s,delay:r};return f.jsx(_.div,{ref:u,className:t,style:d,variants:Dm,initial:"initial",animate:m(),exit:"exit",custom:{from:l,to:c},transition:g,whileHover:a==="hover"?"animate":void 0,whileTap:a==="tap"?"animate":void 0,children:e})},Wm=({children:e,className:t="",delay:r=0,duration:s=.3,disabled:n=!1,trigger:a="inView",once:o=!0,threshold:i=.1,direction:l="up",distance:c=50,style:d})=>{const u=h.useRef(null),p=ke(u,{once:o,amount:i});if(n)return f.jsx("div",{className:t,style:d,children:e});const m=()=>{switch(a){case"inView":return p?"animate":"initial";case"manual":return"initial";case"hover":case"tap":return"animate";default:return"animate"}},g={...It.smooth,duration:s,delay:r},v={direction:l,distance:c};return f.jsx(_.div,{ref:u,className:t,style:d,variants:Lm,initial:"initial",animate:m(),exit:"exit",custom:v,transition:g,whileHover:a==="hover"?"animate":void 0,whileTap:a==="tap"?"animate":void 0,children:e})},_m=({children:e,className:t="",delay:r=0,duration:s=.3,disabled:n=!1,trigger:a="inView",once:o=!0,threshold:i=.1,from:l=0,to:c=1,transformOrigin:d="center",style:u})=>{const p=h.useRef(null),m=ke(p,{once:o,amount:i});if(n)return f.jsx("div",{className:t,style:u,children:e});const g=()=>{switch(a){case"inView":return m?"animate":"initial";case"manual":return"initial";case"hover":case"tap":return"animate";default:return"animate"}},v={...It.bounce,duration:s,delay:r},x={from:l,to:c},b={...u,transformOrigin:d};return f.jsx(_.div,{ref:p,className:t,style:b,variants:Om,initial:"initial",animate:g(),exit:"exit",custom:x,transition:v,whileHover:a==="hover"?"hover":void 0,whileTap:a==="tap"?"tap":void 0,children:e})},Gm=({children:e,className:t="",delay:r=0,duration:s=.5,disabled:n=!1,trigger:a="inView",once:o=!0,threshold:i=.1,direction:l="clockwise",degrees:c=180,transformOrigin:d="center",style:u})=>{const p=h.useRef(null),m=ke(p,{once:o,amount:i});if(n)return f.jsx("div",{className:t,style:u,children:e});const g=()=>{switch(a){case"inView":return m?"animate":"initial";case"manual":return"initial";case"hover":case"tap":return"animate";default:return"animate"}},v={...It.smooth,duration:s,delay:r},x={direction:l,degrees:c},b={...u,transformOrigin:d};return f.jsx(_.div,{ref:p,className:t,style:b,variants:$m,initial:"initial",animate:g(),exit:"exit",custom:x,transition:v,whileHover:a==="hover"?"animate":void 0,whileTap:a==="tap"?"animate":void 0,children:e})},Um=({children:e,className:t="",delay:r=0,duration:s=.6,disabled:n=!1,trigger:a="inView",once:o=!0,threshold:i=.1,amplitude:l=20,frequency:c=1,damping:d=.8,style:u})=>{const p=h.useRef(null),m=ke(p,{once:o,amount:i});if(n)return f.jsx("div",{className:t,style:u,children:e});const g=()=>{switch(a){case"inView":return m?"animate":"initial";case"manual":return"initial";case"hover":case"tap":return"animate";default:return"animate"}},v={...It.bounce,duration:s,delay:r,damping:d},x={amplitude:l,frequency:c};return f.jsx(_.div,{ref:p,className:t,style:u,variants:zm,initial:"initial",animate:g(),exit:"exit",custom:x,transition:v,whileHover:a==="hover"?"animate":void 0,whileTap:a==="tap"?"animate":void 0,children:e})},Hm=({children:e,className:t="",staggerDelay:r=.1,animationType:s="fadeIn",direction:n="up",duration:a=.3,threshold:o=.1})=>{const i=h.useRef(null),l=ke(i,{once:!0,amount:o}),c={initial:{},animate:{transition:{staggerChildren:r}}},u=(()=>{switch(s){case"slideIn":return{initial:(()=>{switch(n){case"up":return{y:50,opacity:0};case"down":return{y:-50,opacity:0};case"left":return{x:50,opacity:0};case"right":return{x:-50,opacity:0};default:return{y:50,opacity:0}}})(),animate:{x:0,y:0,opacity:1}};case"scaleIn":return{initial:{scale:0,opacity:0},animate:{scale:1,opacity:1}};case"fadeIn":default:return{initial:{opacity:0},animate:{opacity:1}}}})(),p={...It.smooth,duration:a};return f.jsx(_.div,{ref:i,className:t,variants:c,initial:"initial",animate:l?"animate":"initial",children:e.map((m,g)=>f.jsx(_.div,{variants:u,transition:p,children:m},g))})};var Km=/\s+/g,Us=e=>typeof e!="string"||!e?e:e.replace(Km," ").trim(),Lr=(...e)=>{let t=[],r=s=>{if(!s&&s!==0&&s!==0n)return;if(Array.isArray(s)){for(let a=0,o=s.length;a<o;a++)r(s[a]);return}let n=typeof s;if(n==="string"||n==="number"||n==="bigint"){if(n==="number"&&s!==s)return;t.push(String(s))}else if(n==="object"){let a=Object.keys(s);for(let o=0,i=a.length;o<i;o++){let l=a[o];s[l]&&t.push(l)}}};for(let s=0,n=e.length;s<n;s++){let a=e[s];a!=null&&r(a)}return t.length>0?Us(t.join(" ")):void 0},zo=e=>e===!1?"false":e===!0?"true":e===0?"0":e,ve=e=>{if(!e||typeof e!="object")return!0;for(let t in e)return!1;return!0},Xm=(e,t)=>{if(e===t)return!0;if(!e||!t)return!1;let r=Object.keys(e),s=Object.keys(t);if(r.length!==s.length)return!1;for(let n=0;n<r.length;n++){let a=r[n];if(!s.includes(a)||e[a]!==t[a])return!1}return!0},Fo=(e,t)=>{for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r)){let s=t[r];r in e?e[r]=Lr(e[r],s):e[r]=s}return e},Ql=(e,t)=>{for(let r=0;r<e.length;r++){let s=e[r];Array.isArray(s)?Ql(s,t):s&&t.push(s)}},ec=(...e)=>{let t=[];Ql(e,t);let r=[];for(let s=0;s<t.length;s++)t[s]&&r.push(t[s]);return r},Hs=(e,t)=>{let r={};for(let s in e){let n=e[s];if(s in t){let a=t[s];Array.isArray(n)||Array.isArray(a)?r[s]=ec(a,n):typeof n=="object"&&typeof a=="object"&&n&&a?r[s]=Hs(n,a):r[s]=a+" "+n}else r[s]=n}for(let s in t)s in e||(r[s]=t[s]);return r},Ym={twMerge:!0,twMergeConfig:{},responsiveVariants:!1};function qm(){let e=null,t={},r=!1;return{get cachedTwMerge(){return e},set cachedTwMerge(s){e=s},get cachedTwMergeConfig(){return t},set cachedTwMergeConfig(s){t=s},get didTwMergeConfigChange(){return r},set didTwMergeConfigChange(s){r=s},reset(){e=null,t={},r=!1}}}var Ue=qm(),Zm=e=>{let t=(r,s)=>{let{extend:n=null,slots:a={},variants:o={},compoundVariants:i=[],compoundSlots:l=[],defaultVariants:c={}}=r,d={...Ym,...s},u=n?.base?Lr(n.base,r?.base):r?.base,p=n?.variants&&!ve(n.variants)?Hs(o,n.variants):o,m=n?.defaultVariants&&!ve(n.defaultVariants)?{...n.defaultVariants,...c}:c;!ve(d.twMergeConfig)&&!Xm(d.twMergeConfig,Ue.cachedTwMergeConfig)&&(Ue.didTwMergeConfigChange=!0,Ue.cachedTwMergeConfig=d.twMergeConfig);let g=ve(n?.slots),v=ve(a)?{}:{base:Lr(r?.base,g&&n?.base),...a},x=g?v:Fo({...n?.slots},ve(v)?{base:r?.base}:v),b=ve(n?.compoundVariants)?i:ec(n?.compoundVariants,i),y=C=>{if(ve(p)&&ve(a)&&g)return e(u,C?.class,C?.className)(d);if(b&&!Array.isArray(b))throw new TypeError(`The "compoundVariants" prop must be an array. Received: ${typeof b}`);if(l&&!Array.isArray(l))throw new TypeError(`The "compoundSlots" prop must be an array. Received: ${typeof l}`);let j=(I,R,D=[],P)=>{let M=D;if(typeof R=="string"){let N=Us(R).split(" ");for(let E=0;E<N.length;E++)M.push(`${I}:${N[E]}`)}else if(Array.isArray(R))for(let N=0;N<R.length;N++)M.push(`${I}:${R[N]}`);else if(typeof R=="object"&&typeof P=="string"&&P in R){let N=R[P];if(N&&typeof N=="string"){let E=Us(N).split(" "),F=[];for(let z=0;z<E.length;z++)F.push(`${I}:${E[z]}`);M[P]=M[P]?M[P].concat(F):F}else if(Array.isArray(N)&&N.length>0){let E=[];for(let F=0;F<N.length;F++)E.push(`${I}:${N[F]}`);M[P]=E}}return M},S=(I,R=p,D=null,P=null)=>{let M=R[I];if(!M||ve(M))return null;let N=P?.[I]??C?.[I];if(N===null)return null;let E=zo(N),F=Array.isArray(d.responsiveVariants)&&d.responsiveVariants.length>0||d.responsiveVariants===!0,z=m?.[I],O=[];if(typeof E=="object"&&F)for(let[J,Y]of Object.entries(E)){let Z=M[Y];if(J==="initial"){z=Y;continue}Array.isArray(d.responsiveVariants)&&!d.responsiveVariants.includes(J)||(O=j(J,Z,O,D))}let H=E!=null&&typeof E!="object"?E:zo(z),W=M[H||"false"];return typeof O=="object"&&typeof D=="string"&&O[D]?Fo(O,W):O.length>0?(O.push(W),D==="base"?O.join(" "):O):W},T=()=>{if(!p)return null;let I=Object.keys(p),R=[];for(let D=0;D<I.length;D++){let P=S(I[D],p);P&&R.push(P)}return R},k=(I,R)=>{if(!p||typeof p!="object")return null;let D=[];for(let P in p){let M=S(P,p,I,R),N=I==="base"&&typeof M=="string"?M:M&&M[I];N&&D.push(N)}return D},V={};for(let I in C){let R=C[I];R!==void 0&&(V[I]=R)}let A=(I,R)=>{let D=typeof C?.[I]=="object"?{[I]:C[I]?.initial}:{};return{...m,...V,...D,...R}},B=(I=[],R)=>{let D=[],P=I.length;for(let M=0;M<P;M++){let{class:N,className:E,...F}=I[M],z=!0,O=A(null,R);for(let H in F){let W=F[H],J=O[H];if(Array.isArray(W)){if(!W.includes(J)){z=!1;break}}else{if((W==null||W===!1)&&(J==null||J===!1))continue;if(J!==W){z=!1;break}}}z&&(N&&D.push(N),E&&D.push(E))}return D},$=I=>{let R=B(b,I);if(!Array.isArray(R))return R;let D={},P=e;for(let M=0;M<R.length;M++){let N=R[M];if(typeof N=="string")D.base=P(D.base,N)(d);else if(typeof N=="object")for(let E in N)D[E]=P(D[E],N[E])(d)}return D},L=I=>{if(l.length<1)return null;let R={},D=A(null,I);for(let P=0;P<l.length;P++){let{slots:M=[],class:N,className:E,...F}=l[P];if(!ve(F)){let z=!0;for(let O in F){let H=D[O],W=F[O];if(H===void 0||(Array.isArray(W)?!W.includes(H):W!==H)){z=!1;break}}if(!z)continue}for(let z=0;z<M.length;z++){let O=M[z];R[O]||(R[O]=[]),R[O].push([N,E])}}return R};if(!ve(a)||!g){let I={};if(typeof x=="object"&&!ve(x)){let R=e;for(let D in x)I[D]=P=>{let M=$(P),N=L(P);return R(x[D],k(D,P),M?M[D]:void 0,N?N[D]:void 0,P?.class,P?.className)(d)}}return I}return e(u,T(),B(b),C?.class,C?.className)(d)},w=()=>{if(!(!p||typeof p!="object"))return Object.keys(p)};return y.variantKeys=w(),y.extend=n,y.base=u,y.slots=x,y.variants=p,y.defaultVariants=m,y.compoundSlots=l,y.compoundVariants=b,y};return{tv:t,createTV:r=>(s,n)=>t(s,n?Hs(r,n):r)}};const Un="-",Jm=e=>{const t=eg(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:o=>{const i=o.split(Un);return i[0]===""&&i.length!==1&&i.shift(),tc(i,t)||Qm(o)},getConflictingClassGroupIds:(o,i)=>{const l=r[o]||[];return i&&s[o]?[...l,...s[o]]:l}}},tc=(e,t)=>{if(e.length===0)return t.classGroupId;const r=e[0],s=t.nextPart.get(r),n=s?tc(e.slice(1),s):void 0;if(n)return n;if(t.validators.length===0)return;const a=e.join(Un);return t.validators.find(({validator:o})=>o(a))?.classGroupId},Wo=/^\[(.+)\]$/,Qm=e=>{if(Wo.test(e)){const t=Wo.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},eg=e=>{const{theme:t,classGroups:r}=e,s={nextPart:new Map,validators:[]};for(const n in r)Ks(r[n],s,n,t);return s},Ks=(e,t,r,s)=>{e.forEach(n=>{if(typeof n=="string"){const a=n===""?t:_o(t,n);a.classGroupId=r;return}if(typeof n=="function"){if(tg(n)){Ks(n(s),t,r,s);return}t.validators.push({validator:n,classGroupId:r});return}Object.entries(n).forEach(([a,o])=>{Ks(o,_o(t,a),r,s)})})},_o=(e,t)=>{let r=e;return t.split(Un).forEach(s=>{r.nextPart.has(s)||r.nextPart.set(s,{nextPart:new Map,validators:[]}),r=r.nextPart.get(s)}),r},tg=e=>e.isThemeGetter,rg=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,s=new Map;const n=(a,o)=>{r.set(a,o),t++,t>e&&(t=0,s=r,r=new Map)};return{get(a){let o=r.get(a);if(o!==void 0)return o;if((o=s.get(a))!==void 0)return n(a,o),o},set(a,o){r.has(a)?r.set(a,o):n(a,o)}}},Xs="!",Ys=":",sg=Ys.length,ng=e=>{const{prefix:t,experimentalParseClassName:r}=e;let s=n=>{const a=[];let o=0,i=0,l=0,c;for(let g=0;g<n.length;g++){let v=n[g];if(o===0&&i===0){if(v===Ys){a.push(n.slice(l,g)),l=g+sg;continue}if(v==="/"){c=g;continue}}v==="["?o++:v==="]"?o--:v==="("?i++:v===")"&&i--}const d=a.length===0?n:n.substring(l),u=ag(d),p=u!==d,m=c&&c>l?c-l:void 0;return{modifiers:a,hasImportantModifier:p,baseClassName:u,maybePostfixModifierPosition:m}};if(t){const n=t+Ys,a=s;s=o=>o.startsWith(n)?a(o.substring(n.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:o,maybePostfixModifierPosition:void 0}}if(r){const n=s;s=a=>r({className:a,parseClassName:n})}return s},ag=e=>e.endsWith(Xs)?e.substring(0,e.length-1):e.startsWith(Xs)?e.substring(1):e,og=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(s=>[s,!0]));return s=>{if(s.length<=1)return s;const n=[];let a=[];return s.forEach(o=>{o[0]==="["||t[o]?(n.push(...a.sort(),o),a=[]):a.push(o)}),n.push(...a.sort()),n}},ig=e=>({cache:rg(e.cacheSize),parseClassName:ng(e),sortModifiers:og(e),...Jm(e)}),lg=/\s+/,cg=(e,t)=>{const{parseClassName:r,getClassGroupId:s,getConflictingClassGroupIds:n,sortModifiers:a}=t,o=[],i=e.trim().split(lg);let l="";for(let c=i.length-1;c>=0;c-=1){const d=i[c],{isExternal:u,modifiers:p,hasImportantModifier:m,baseClassName:g,maybePostfixModifierPosition:v}=r(d);if(u){l=d+(l.length>0?" "+l:l);continue}let x=!!v,b=s(x?g.substring(0,v):g);if(!b){if(!x){l=d+(l.length>0?" "+l:l);continue}if(b=s(g),!b){l=d+(l.length>0?" "+l:l);continue}x=!1}const y=a(p).join(":"),w=m?y+Xs:y,C=w+b;if(o.includes(C))continue;o.push(C);const j=n(b,x);for(let S=0;S<j.length;++S){const T=j[S];o.push(w+T)}l=d+(l.length>0?" "+l:l)}return l};function dg(){let e=0,t,r,s="";for(;e<arguments.length;)(t=arguments[e++])&&(r=rc(t))&&(s&&(s+=" "),s+=r);return s}const rc=e=>{if(typeof e=="string")return e;let t,r="";for(let s=0;s<e.length;s++)e[s]&&(t=rc(e[s]))&&(r&&(r+=" "),r+=t);return r};function qs(e,...t){let r,s,n,a=o;function o(l){const c=t.reduce((d,u)=>u(d),e());return r=ig(c),s=r.cache.get,n=r.cache.set,a=i,i(l)}function i(l){const c=s(l);if(c)return c;const d=cg(l,r);return n(l,d),d}return function(){return a(dg.apply(null,arguments))}}const he=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},sc=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,nc=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ug=/^\d+\/\d+$/,fg=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,hg=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,pg=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,mg=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,gg=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,gt=e=>ug.test(e),ee=e=>!!e&&!Number.isNaN(Number(e)),Je=e=>!!e&&Number.isInteger(Number(e)),bs=e=>e.endsWith("%")&&ee(e.slice(0,-1)),Ge=e=>fg.test(e),bg=()=>!0,yg=e=>hg.test(e)&&!pg.test(e),ac=()=>!1,xg=e=>mg.test(e),vg=e=>gg.test(e),wg=e=>!G(e)&&!U(e),Cg=e=>Nt(e,lc,ac),G=e=>sc.test(e),it=e=>Nt(e,cc,yg),ys=e=>Nt(e,Mg,ee),Go=e=>Nt(e,oc,ac),kg=e=>Nt(e,ic,vg),yr=e=>Nt(e,dc,xg),U=e=>nc.test(e),Ft=e=>Rt(e,cc),jg=e=>Rt(e,Ag),Uo=e=>Rt(e,oc),Sg=e=>Rt(e,lc),Tg=e=>Rt(e,ic),xr=e=>Rt(e,dc,!0),Nt=(e,t,r)=>{const s=sc.exec(e);return s?s[1]?t(s[1]):r(s[2]):!1},Rt=(e,t,r=!1)=>{const s=nc.exec(e);return s?s[1]?t(s[1]):r:!1},oc=e=>e==="position"||e==="percentage",ic=e=>e==="image"||e==="url",lc=e=>e==="length"||e==="size"||e==="bg-size",cc=e=>e==="length",Mg=e=>e==="number",Ag=e=>e==="family-name",dc=e=>e==="shadow",Zs=()=>{const e=he("color"),t=he("font"),r=he("text"),s=he("font-weight"),n=he("tracking"),a=he("leading"),o=he("breakpoint"),i=he("container"),l=he("spacing"),c=he("radius"),d=he("shadow"),u=he("inset-shadow"),p=he("text-shadow"),m=he("drop-shadow"),g=he("blur"),v=he("perspective"),x=he("aspect"),b=he("ease"),y=he("animate"),w=()=>["auto","avoid","all","avoid-page","page","left","right","column"],C=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],j=()=>[...C(),U,G],S=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto","contain","none"],k=()=>[U,G,l],V=()=>[gt,"full","auto",...k()],A=()=>[Je,"none","subgrid",U,G],B=()=>["auto",{span:["full",Je,U,G]},Je,U,G],$=()=>[Je,"auto",U,G],L=()=>["auto","min","max","fr",U,G],I=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],R=()=>["start","end","center","stretch","center-safe","end-safe"],D=()=>["auto",...k()],P=()=>[gt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...k()],M=()=>[e,U,G],N=()=>[...C(),Uo,Go,{position:[U,G]}],E=()=>["no-repeat",{repeat:["","x","y","space","round"]}],F=()=>["auto","cover","contain",Sg,Cg,{size:[U,G]}],z=()=>[bs,Ft,it],O=()=>["","none","full",c,U,G],H=()=>["",ee,Ft,it],W=()=>["solid","dashed","dotted","double"],J=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Y=()=>[ee,bs,Uo,Go],Z=()=>["","none",g,U,G],se=()=>["none",ee,U,G],ae=()=>["none",ee,U,G],Te=()=>[ee,U,G],pe=()=>[gt,"full",...k()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ge],breakpoint:[Ge],color:[bg],container:[Ge],"drop-shadow":[Ge],ease:["in","out","in-out"],font:[wg],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ge],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ge],shadow:[Ge],spacing:["px",ee],text:[Ge],"text-shadow":[Ge],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",gt,G,U,x]}],container:["container"],columns:[{columns:[ee,G,U,i]}],"break-after":[{"break-after":w()}],"break-before":[{"break-before":w()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:j()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:V()}],"inset-x":[{"inset-x":V()}],"inset-y":[{"inset-y":V()}],start:[{start:V()}],end:[{end:V()}],top:[{top:V()}],right:[{right:V()}],bottom:[{bottom:V()}],left:[{left:V()}],visibility:["visible","invisible","collapse"],z:[{z:[Je,"auto",U,G]}],basis:[{basis:[gt,"full","auto",i,...k()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ee,gt,"auto","initial","none",G]}],grow:[{grow:["",ee,U,G]}],shrink:[{shrink:["",ee,U,G]}],order:[{order:[Je,"first","last","none",U,G]}],"grid-cols":[{"grid-cols":A()}],"col-start-end":[{col:B()}],"col-start":[{"col-start":$()}],"col-end":[{"col-end":$()}],"grid-rows":[{"grid-rows":A()}],"row-start-end":[{row:B()}],"row-start":[{"row-start":$()}],"row-end":[{"row-end":$()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":L()}],"auto-rows":[{"auto-rows":L()}],gap:[{gap:k()}],"gap-x":[{"gap-x":k()}],"gap-y":[{"gap-y":k()}],"justify-content":[{justify:[...I(),"normal"]}],"justify-items":[{"justify-items":[...R(),"normal"]}],"justify-self":[{"justify-self":["auto",...R()]}],"align-content":[{content:["normal",...I()]}],"align-items":[{items:[...R(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...R(),{baseline:["","last"]}]}],"place-content":[{"place-content":I()}],"place-items":[{"place-items":[...R(),"baseline"]}],"place-self":[{"place-self":["auto",...R()]}],p:[{p:k()}],px:[{px:k()}],py:[{py:k()}],ps:[{ps:k()}],pe:[{pe:k()}],pt:[{pt:k()}],pr:[{pr:k()}],pb:[{pb:k()}],pl:[{pl:k()}],m:[{m:D()}],mx:[{mx:D()}],my:[{my:D()}],ms:[{ms:D()}],me:[{me:D()}],mt:[{mt:D()}],mr:[{mr:D()}],mb:[{mb:D()}],ml:[{ml:D()}],"space-x":[{"space-x":k()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":k()}],"space-y-reverse":["space-y-reverse"],size:[{size:P()}],w:[{w:[i,"screen",...P()]}],"min-w":[{"min-w":[i,"screen","none",...P()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[o]},...P()]}],h:[{h:["screen","lh",...P()]}],"min-h":[{"min-h":["screen","lh","none",...P()]}],"max-h":[{"max-h":["screen","lh",...P()]}],"font-size":[{text:["base",r,Ft,it]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,U,ys]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",bs,G]}],"font-family":[{font:[jg,G,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[n,U,G]}],"line-clamp":[{"line-clamp":[ee,"none",U,ys]}],leading:[{leading:[a,...k()]}],"list-image":[{"list-image":["none",U,G]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",U,G]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:M()}],"text-color":[{text:M()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...W(),"wavy"]}],"text-decoration-thickness":[{decoration:[ee,"from-font","auto",U,it]}],"text-decoration-color":[{decoration:M()}],"underline-offset":[{"underline-offset":[ee,"auto",U,G]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",U,G]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",U,G]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:N()}],"bg-repeat":[{bg:E()}],"bg-size":[{bg:F()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Je,U,G],radial:["",U,G],conic:[Je,U,G]},Tg,kg]}],"bg-color":[{bg:M()}],"gradient-from-pos":[{from:z()}],"gradient-via-pos":[{via:z()}],"gradient-to-pos":[{to:z()}],"gradient-from":[{from:M()}],"gradient-via":[{via:M()}],"gradient-to":[{to:M()}],rounded:[{rounded:O()}],"rounded-s":[{"rounded-s":O()}],"rounded-e":[{"rounded-e":O()}],"rounded-t":[{"rounded-t":O()}],"rounded-r":[{"rounded-r":O()}],"rounded-b":[{"rounded-b":O()}],"rounded-l":[{"rounded-l":O()}],"rounded-ss":[{"rounded-ss":O()}],"rounded-se":[{"rounded-se":O()}],"rounded-ee":[{"rounded-ee":O()}],"rounded-es":[{"rounded-es":O()}],"rounded-tl":[{"rounded-tl":O()}],"rounded-tr":[{"rounded-tr":O()}],"rounded-br":[{"rounded-br":O()}],"rounded-bl":[{"rounded-bl":O()}],"border-w":[{border:H()}],"border-w-x":[{"border-x":H()}],"border-w-y":[{"border-y":H()}],"border-w-s":[{"border-s":H()}],"border-w-e":[{"border-e":H()}],"border-w-t":[{"border-t":H()}],"border-w-r":[{"border-r":H()}],"border-w-b":[{"border-b":H()}],"border-w-l":[{"border-l":H()}],"divide-x":[{"divide-x":H()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":H()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...W(),"hidden","none"]}],"divide-style":[{divide:[...W(),"hidden","none"]}],"border-color":[{border:M()}],"border-color-x":[{"border-x":M()}],"border-color-y":[{"border-y":M()}],"border-color-s":[{"border-s":M()}],"border-color-e":[{"border-e":M()}],"border-color-t":[{"border-t":M()}],"border-color-r":[{"border-r":M()}],"border-color-b":[{"border-b":M()}],"border-color-l":[{"border-l":M()}],"divide-color":[{divide:M()}],"outline-style":[{outline:[...W(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ee,U,G]}],"outline-w":[{outline:["",ee,Ft,it]}],"outline-color":[{outline:M()}],shadow:[{shadow:["","none",d,xr,yr]}],"shadow-color":[{shadow:M()}],"inset-shadow":[{"inset-shadow":["none",u,xr,yr]}],"inset-shadow-color":[{"inset-shadow":M()}],"ring-w":[{ring:H()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:M()}],"ring-offset-w":[{"ring-offset":[ee,it]}],"ring-offset-color":[{"ring-offset":M()}],"inset-ring-w":[{"inset-ring":H()}],"inset-ring-color":[{"inset-ring":M()}],"text-shadow":[{"text-shadow":["none",p,xr,yr]}],"text-shadow-color":[{"text-shadow":M()}],opacity:[{opacity:[ee,U,G]}],"mix-blend":[{"mix-blend":[...J(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":J()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ee]}],"mask-image-linear-from-pos":[{"mask-linear-from":Y()}],"mask-image-linear-to-pos":[{"mask-linear-to":Y()}],"mask-image-linear-from-color":[{"mask-linear-from":M()}],"mask-image-linear-to-color":[{"mask-linear-to":M()}],"mask-image-t-from-pos":[{"mask-t-from":Y()}],"mask-image-t-to-pos":[{"mask-t-to":Y()}],"mask-image-t-from-color":[{"mask-t-from":M()}],"mask-image-t-to-color":[{"mask-t-to":M()}],"mask-image-r-from-pos":[{"mask-r-from":Y()}],"mask-image-r-to-pos":[{"mask-r-to":Y()}],"mask-image-r-from-color":[{"mask-r-from":M()}],"mask-image-r-to-color":[{"mask-r-to":M()}],"mask-image-b-from-pos":[{"mask-b-from":Y()}],"mask-image-b-to-pos":[{"mask-b-to":Y()}],"mask-image-b-from-color":[{"mask-b-from":M()}],"mask-image-b-to-color":[{"mask-b-to":M()}],"mask-image-l-from-pos":[{"mask-l-from":Y()}],"mask-image-l-to-pos":[{"mask-l-to":Y()}],"mask-image-l-from-color":[{"mask-l-from":M()}],"mask-image-l-to-color":[{"mask-l-to":M()}],"mask-image-x-from-pos":[{"mask-x-from":Y()}],"mask-image-x-to-pos":[{"mask-x-to":Y()}],"mask-image-x-from-color":[{"mask-x-from":M()}],"mask-image-x-to-color":[{"mask-x-to":M()}],"mask-image-y-from-pos":[{"mask-y-from":Y()}],"mask-image-y-to-pos":[{"mask-y-to":Y()}],"mask-image-y-from-color":[{"mask-y-from":M()}],"mask-image-y-to-color":[{"mask-y-to":M()}],"mask-image-radial":[{"mask-radial":[U,G]}],"mask-image-radial-from-pos":[{"mask-radial-from":Y()}],"mask-image-radial-to-pos":[{"mask-radial-to":Y()}],"mask-image-radial-from-color":[{"mask-radial-from":M()}],"mask-image-radial-to-color":[{"mask-radial-to":M()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":C()}],"mask-image-conic-pos":[{"mask-conic":[ee]}],"mask-image-conic-from-pos":[{"mask-conic-from":Y()}],"mask-image-conic-to-pos":[{"mask-conic-to":Y()}],"mask-image-conic-from-color":[{"mask-conic-from":M()}],"mask-image-conic-to-color":[{"mask-conic-to":M()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:N()}],"mask-repeat":[{mask:E()}],"mask-size":[{mask:F()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",U,G]}],filter:[{filter:["","none",U,G]}],blur:[{blur:Z()}],brightness:[{brightness:[ee,U,G]}],contrast:[{contrast:[ee,U,G]}],"drop-shadow":[{"drop-shadow":["","none",m,xr,yr]}],"drop-shadow-color":[{"drop-shadow":M()}],grayscale:[{grayscale:["",ee,U,G]}],"hue-rotate":[{"hue-rotate":[ee,U,G]}],invert:[{invert:["",ee,U,G]}],saturate:[{saturate:[ee,U,G]}],sepia:[{sepia:["",ee,U,G]}],"backdrop-filter":[{"backdrop-filter":["","none",U,G]}],"backdrop-blur":[{"backdrop-blur":Z()}],"backdrop-brightness":[{"backdrop-brightness":[ee,U,G]}],"backdrop-contrast":[{"backdrop-contrast":[ee,U,G]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ee,U,G]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ee,U,G]}],"backdrop-invert":[{"backdrop-invert":["",ee,U,G]}],"backdrop-opacity":[{"backdrop-opacity":[ee,U,G]}],"backdrop-saturate":[{"backdrop-saturate":[ee,U,G]}],"backdrop-sepia":[{"backdrop-sepia":["",ee,U,G]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":k()}],"border-spacing-x":[{"border-spacing-x":k()}],"border-spacing-y":[{"border-spacing-y":k()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",U,G]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ee,"initial",U,G]}],ease:[{ease:["linear","initial",b,U,G]}],delay:[{delay:[ee,U,G]}],animate:[{animate:["none",y,U,G]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,U,G]}],"perspective-origin":[{"perspective-origin":j()}],rotate:[{rotate:se()}],"rotate-x":[{"rotate-x":se()}],"rotate-y":[{"rotate-y":se()}],"rotate-z":[{"rotate-z":se()}],scale:[{scale:ae()}],"scale-x":[{"scale-x":ae()}],"scale-y":[{"scale-y":ae()}],"scale-z":[{"scale-z":ae()}],"scale-3d":["scale-3d"],skew:[{skew:Te()}],"skew-x":[{"skew-x":Te()}],"skew-y":[{"skew-y":Te()}],transform:[{transform:[U,G,"","none","gpu","cpu"]}],"transform-origin":[{origin:j()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:pe()}],"translate-x":[{"translate-x":pe()}],"translate-y":[{"translate-y":pe()}],"translate-z":[{"translate-z":pe()}],"translate-none":["translate-none"],accent:[{accent:M()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:M()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",U,G]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",U,G]}],fill:[{fill:["none",...M()]}],"stroke-w":[{stroke:[ee,Ft,it,ys]}],stroke:[{stroke:["none",...M()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Vg=(e,{cacheSize:t,prefix:r,experimentalParseClassName:s,extend:n={},override:a={}})=>(_t(e,"cacheSize",t),_t(e,"prefix",r),_t(e,"experimentalParseClassName",s),vr(e.theme,a.theme),vr(e.classGroups,a.classGroups),vr(e.conflictingClassGroups,a.conflictingClassGroups),vr(e.conflictingClassGroupModifiers,a.conflictingClassGroupModifiers),_t(e,"orderSensitiveModifiers",a.orderSensitiveModifiers),wr(e.theme,n.theme),wr(e.classGroups,n.classGroups),wr(e.conflictingClassGroups,n.conflictingClassGroups),wr(e.conflictingClassGroupModifiers,n.conflictingClassGroupModifiers),uc(e,n,"orderSensitiveModifiers"),e),_t=(e,t,r)=>{r!==void 0&&(e[t]=r)},vr=(e,t)=>{if(t)for(const r in t)_t(e,r,t[r])},wr=(e,t)=>{if(t)for(const r in t)uc(e,t,r)},uc=(e,t,r)=>{const s=t[r];s!==void 0&&(e[r]=e[r]?e[r].concat(s):s)},Pg=(e,...t)=>typeof e=="function"?qs(Zs,e,...t):qs(()=>Vg(Zs(),e),...t),q=qs(Zs);var Eg=e=>ve(e)?q:Pg({...e,extend:{theme:e.theme,classGroups:e.classGroups,conflictingClassGroupModifiers:e.conflictingClassGroupModifiers,conflictingClassGroups:e.conflictingClassGroups,...e.extend}}),Ig=(...e)=>t=>{let r=Lr(e);return!r||!t.twMerge?r:((!Ue.cachedTwMerge||Ue.didTwMergeConfigChange)&&(Ue.didTwMergeConfigChange=!1,Ue.cachedTwMerge=Eg(Ue.cachedTwMergeConfig)),Ue.cachedTwMerge(r)||void 0)},{tv:K}=Zm(Ig);const Ng=K({base:["relative inline-flex items-center justify-center overflow-hidden font-medium","text-center align-middle","box-border select-none","focus:outline-none focus:ring-2 focus:ring-offset-2","transition-all duration-200 ease-in-out"],variants:{size:{sm:"w-8 h-8 text-xs",md:"w-10 h-10 text-sm",lg:"w-14 h-14 text-base"},color:{default:["bg-default-100 text-default-foreground","focus:ring-default-500"],primary:["bg-primary-100 text-primary-foreground","focus:ring-primary-500"],secondary:["bg-secondary-100 text-secondary-foreground","focus:ring-secondary-500"],success:["bg-success-100 text-success-foreground","focus:ring-success-500"],warning:["bg-warning-100 text-warning-foreground","focus:ring-warning-500"],danger:["bg-danger-100 text-danger-foreground","focus:ring-danger-500"]},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"},isBordered:{true:"ring-2 ring-offset-2 ring-white dark:ring-offset-background",false:""},isDisabled:{true:"opacity-30 cursor-not-allowed pointer-events-none",false:"cursor-pointer"},isFocusable:{true:"cursor-pointer",false:""}},compoundVariants:[{color:"default",isBordered:!0,class:"ring-default-300 dark:ring-default-600"},{color:"primary",isBordered:!0,class:"ring-primary-300 dark:ring-primary-600"},{color:"secondary",isBordered:!0,class:"ring-secondary-300 dark:ring-secondary-600"},{color:"success",isBordered:!0,class:"ring-success-300 dark:ring-success-600"},{color:"warning",isBordered:!0,class:"ring-warning-300 dark:ring-warning-600"},{color:"danger",isBordered:!0,class:"ring-danger-300 dark:ring-danger-600"},{isDisabled:!0,isFocusable:!0,class:"cursor-not-allowed"}],defaultVariants:{size:"md",color:"default",radius:"full",isBordered:!1,isDisabled:!1,isFocusable:!1}}),Rg=K({base:["w-full h-full object-cover","transition-opacity duration-200 ease-in-out"]}),Bg=K({base:["w-full h-full flex items-center justify-center","bg-inherit text-inherit"]}),Dg=K({base:["font-medium uppercase select-none","text-inherit leading-none"]}),Lg=K({base:["w-1/2 h-1/2 text-inherit","flex items-center justify-center"]}),Og=K({base:["flex items-center"],variants:{isGrid:{true:"flex-wrap gap-2",false:"flex-row"}},defaultVariants:{isGrid:!1}}),$g=K({base:["inline-flex items-center justify-center font-medium","bg-default-100 text-default-foreground","border border-background","select-none transition-all duration-200"],variants:{size:{sm:"w-8 h-8 text-xs ml-[-8px]",md:"w-10 h-10 text-sm ml-[-10px]",lg:"w-14 h-14 text-base ml-[-14px]"},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"},isGrid:{true:"ml-0",false:""}},defaultVariants:{size:"md",radius:"full",isGrid:!1}}),zg=e=>Ng(e),Fg=e=>Og(e),Wg=e=>$g(e),_g=e=>{if(!e)return"";const t=e.trim().split(/\s+/);return t.length===1?t[0].substring(0,2).toUpperCase():t.slice(0,2).map(r=>r.charAt(0)).join("").toUpperCase()},Gg=e=>{if(!e)return"";let t=0;for(let s=0;s<e.length;s++){const n=e.charCodeAt(s);t=(t<<5)-t+n,t=t&t}return`hsl(${Math.abs(t)%360}, 70%, 80%)`},$e={size:"md",color:"default",radius:"full",isBordered:!1,isDisabled:!1,isFocusable:!1,showFallback:!1},et={max:5,isGrid:!1,isDisabled:!1,isBordered:!1},fc=e=>{const{src:t,name:r,showFallback:s=$e.showFallback,getInitials:n=_g,ImgComponent:a="img",imgProps:o={},isFocusable:i=$e.isFocusable,isDisabled:l=$e.isDisabled,className:c="","data-testid":d,...u}=e,[p,m]=h.useState(!1),[g,v]=h.useState(!1);h.useEffect(()=>{if(!t){m(!1),v(!1);return}m(!1),v(!1);const S=new Image;return S.onload=()=>{m(!0),v(!1)},S.onerror=()=>{m(!1),v(!0)},S.src=t,()=>{S.onload=null,S.onerror=null}},[t]);const x=h.useMemo(()=>r?n(r):"",[r,n]),b=h.useMemo(()=>!!(s&&(!t||g)||r&&!t||t&&g),[s,t,g,r]),y=h.useMemo(()=>{if(!(!r||t))return Gg(r)},[r,t]),w=h.useMemo(()=>({...o,src:t,alt:r||"Avatar",onLoad:h.useCallback(S=>{m(!0),v(!1),o.onLoad?.(S)},[o]),onError:h.useCallback(S=>{m(!1),v(!0),o.onError?.(S)},[o])}),[o,t,r]),C=h.useMemo(()=>({...u,className:c,"data-testid":d,"data-hover":void 0,"data-focus":void 0,"data-focus-visible":void 0,tabIndex:i&&!l?0:void 0,role:i?"button":"img","aria-label":r||"Avatar",style:{...u.style,...y&&b&&r&&!t?{backgroundColor:y}:{}}}),[u,c,d,i,l,r,y,b,t]),j=h.useMemo(()=>({"aria-hidden":!0,style:{backgroundColor:"inherit"}}),[]);return{isImgLoaded:p,shouldShowFallback:b,initials:x,imgProps:w,baseProps:C,fallbackProps:j}},Hn=({size:e=24,className:t="",...r})=>{const s=Lg({className:t});return f.jsx("svg",{className:s,width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r,children:f.jsx("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z",fill:"currentColor"})})};Hn.displayName="AvatarIcon";const hc=h.forwardRef(({src:e,name:t,icon:r,fallback:s,color:n=$e.color,size:a=$e.size,radius:o=$e.radius,isBordered:i=$e.isBordered,isDisabled:l=$e.isDisabled,isFocusable:c=$e.isFocusable,showFallback:d=$e.showFallback,ImgComponent:u="img",imgProps:p={},getInitials:m,classNames:g={},as:v="div",...x},b)=>{const{isImgLoaded:y,shouldShowFallback:w,initials:C,imgProps:j,baseProps:S,fallbackProps:T}=fc({src:e,name:t,showFallback:d,getInitials:m,ImgComponent:u,imgProps:p,isFocusable:c,isDisabled:l,...x}),k=h.useMemo(()=>{const P=zg({color:n,size:a,radius:o,isBordered:i,isDisabled:l,isFocusable:c});return q(P,g.base)},[n,a,o,i,l,c,g.base]),V=h.useMemo(()=>{const P=Rg();return q(P,g.img)},[g.img]),A=h.useMemo(()=>{const P=Bg();return q(P,g.fallback)},[g.fallback]),B=h.useMemo(()=>{const P=Dg();return q(P,g.name)},[g.name]),$=h.useMemo(()=>q("w-1/2 h-1/2",g.icon),[g.icon]),L=()=>!e||!y?null:h.createElement(u,{...j,className:V}),I=()=>w?f.jsxs("div",{...T,className:A,children:[s,!s&&t&&f.jsx("span",{className:B,"aria-label":`${t} initials`,children:C}),!s&&!t&&r&&f.jsx("span",{className:$,"aria-hidden":"true",children:r}),!s&&!t&&!r&&f.jsx(Hn,{className:$})]}):null,R={hidden:{opacity:0,scale:1.1},visible:{opacity:1,scale:1,transition:{duration:.2,ease:[.4,0,.2,1]}}},D={hidden:{opacity:0,scale:.9},visible:{opacity:1,scale:1,transition:{duration:.2,ease:[.4,0,.2,1]}}};return f.jsxs(v,{ref:b,...S,className:k,children:[e&&f.jsx(_.div,{className:"absolute inset-0",variants:R,initial:"hidden",animate:y?"visible":"hidden",children:L()}),f.jsx(_.div,{className:"absolute inset-0",variants:D,initial:"hidden",animate:w?"visible":"hidden",children:I()})]})});hc.displayName="Avatar";const pc=e=>{const{max:t=et.max,total:r,size:s,color:n,radius:a,isGrid:o=et.isGrid,isDisabled:i=et.isDisabled,isBordered:l=et.isBordered,renderCount:c,children:d,className:u="","data-testid":p,...m}=e,g=h.useMemo(()=>h.Children.count(d),[d]),v=h.useMemo(()=>typeof r=="number"?Math.max(0,r-t):Math.max(0,g-t),[r,t,g]),x=h.useMemo(()=>typeof r=="number"?r>t:g>t,[r,t,g]),b=h.useMemo(()=>({size:s,color:n,radius:a,isDisabled:i,isBordered:l,max:t,total:r,isGrid:o,renderCount:c}),[s,n,a,i,l,t,r,o,c]),y=h.useMemo(()=>({...m,className:u,"data-testid":p,role:"group","aria-label":`Avatar group${r?` of ${r} users`:""}`}),[m,u,p,r]),w=h.useMemo(()=>({"aria-label":`${v} more users`,role:"img"}),[v]);return{context:b,remainingCount:v,shouldShowCount:x,baseProps:y,countProps:w}},Ug=h.createContext(null),Hg=({value:e,children:t})=>f.jsx(Ug.Provider,{value:e,children:t}),mc=h.forwardRef(({max:e=et.max,total:t,size:r,color:s,radius:n,isGrid:a=et.isGrid,isDisabled:o=et.isDisabled,isBordered:i=et.isBordered,renderCount:l,classNames:c={},children:d,...u},p)=>{const{context:m,remainingCount:g,shouldShowCount:v,baseProps:x,countProps:b}=pc({max:e,total:t,size:r,color:s,radius:n,isGrid:a,isDisabled:o,isBordered:i,renderCount:l,children:d,...u}),y=h.useMemo(()=>{const S=Fg({isGrid:a});return q(S,c.base)},[a,c.base]),w=h.useMemo(()=>{const S=Wg({size:r,radius:n,isGrid:a});return q(S,c.count)},[r,n,a,c.count]),C=h.useMemo(()=>{if(!d)return null;const T=h.Children.toArray(d).slice(0,e);return T.map((k,V)=>a?f.jsx(_.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},transition:{delay:V*.05,duration:.2,ease:[.4,0,.2,1]},children:k},V):f.jsx(_.div,{className:V>0?"-ml-2":"",initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{delay:V*.05,duration:.2,ease:[.4,0,.2,1]},style:{zIndex:T.length-V},children:k},V))},[d,e,a]),j=()=>{if(!v)return null;if(l){const S=l(g);return f.jsx(_.div,{className:w,"aria-label":b["aria-label"],role:b.role,initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},transition:{delay:e*.05,duration:.2,ease:[.4,0,.2,1]},children:S})}return f.jsxs(_.div,{className:w,"aria-label":b["aria-label"],role:b.role,initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},transition:{delay:e*.05,duration:.2,ease:[.4,0,.2,1]},children:["+",g]})};return f.jsx(Hg,{value:m,children:f.jsxs("div",{ref:p,...x,className:y,children:[C,j()]})})});mc.displayName="AvatarGroup";const Kg=K({slots:{base:["relative","inline-flex","shrink-0"],badge:["flex","z-10","absolute","items-center","justify-center","whitespace-nowrap","origin-center","text-tiny","font-medium","subpixel-antialiased","scale-100","select-none","transition-transform","!duration-200","!ease-soft-spring"]},variants:{variant:{solid:{badge:"text-white"},flat:{badge:""},faded:{badge:""},shadow:{badge:"text-white shadow-lg"}},color:{default:{},primary:{},secondary:{},success:{},warning:{},danger:{}},size:{sm:{badge:"min-w-4 h-4 text-tiny px-1"},md:{badge:"min-w-5 h-5 text-tiny px-1"},lg:{badge:"min-w-6 h-6 text-small px-1.5"}},shape:{circle:{badge:"rounded-full"},rectangle:{badge:"rounded-md"}},placement:{"top-right":{badge:"top-0 right-0 translate-x-1/2 -translate-y-1/2"},"top-left":{badge:"top-0 left-0 -translate-x-1/2 -translate-y-1/2"},"bottom-right":{badge:"bottom-0 right-0 translate-x-1/2 translate-y-1/2"},"bottom-left":{badge:"bottom-0 left-0 -translate-x-1/2 translate-y-1/2"}},isInvisible:{true:{badge:"scale-0"},false:{badge:"scale-100"}},showOutline:{true:{badge:"ring-2 ring-background"},false:{}},disableAnimation:{true:{badge:"transition-none"},false:{}},isOneChar:{true:{},false:{}}},compoundVariants:[{variant:"solid",color:"default",class:{badge:"bg-default text-default-foreground"}},{variant:"solid",color:"primary",class:{badge:"bg-primary text-primary-foreground"}},{variant:"solid",color:"secondary",class:{badge:"bg-secondary text-secondary-foreground"}},{variant:"solid",color:"success",class:{badge:"bg-success text-success-foreground"}},{variant:"solid",color:"warning",class:{badge:"bg-warning text-warning-foreground"}},{variant:"solid",color:"danger",class:{badge:"bg-danger text-danger-foreground"}},{variant:"flat",color:"default",class:{badge:"bg-default/20 text-default-600"}},{variant:"flat",color:"primary",class:{badge:"bg-primary/20 text-primary-600"}},{variant:"flat",color:"secondary",class:{badge:"bg-secondary/20 text-secondary-600"}},{variant:"flat",color:"success",class:{badge:"bg-success/20 text-success-600 dark:text-success-500"}},{variant:"flat",color:"warning",class:{badge:"bg-warning/20 text-warning-600 dark:text-warning-500"}},{variant:"flat",color:"danger",class:{badge:"bg-danger/20 text-danger-500"}},{variant:"faded",color:"default",class:{badge:"border-small border-default bg-default-50 text-default-foreground"}},{variant:"faded",color:"primary",class:{badge:"border-small border-primary bg-primary-50 text-primary-600"}},{variant:"faded",color:"secondary",class:{badge:"border-small border-secondary bg-secondary-50 text-secondary-600"}},{variant:"faded",color:"success",class:{badge:"border-small border-success bg-success-50 text-success-600 dark:text-success-500"}},{variant:"faded",color:"warning",class:{badge:"border-small border-warning bg-warning-50 text-warning-600 dark:text-warning-500"}},{variant:"faded",color:"danger",class:{badge:"border-small border-danger bg-danger-50 text-danger-500"}},{variant:"shadow",color:"default",class:{badge:"shadow-lg shadow-default/50 bg-default text-default-foreground"}},{variant:"shadow",color:"primary",class:{badge:"shadow-lg shadow-primary/40 bg-primary text-primary-foreground"}},{variant:"shadow",color:"secondary",class:{badge:"shadow-lg shadow-secondary/40 bg-secondary text-secondary-foreground"}},{variant:"shadow",color:"success",class:{badge:"shadow-lg shadow-success/40 bg-success text-success-foreground"}},{variant:"shadow",color:"warning",class:{badge:"shadow-lg shadow-warning/40 bg-warning text-warning-foreground"}},{variant:"shadow",color:"danger",class:{badge:"shadow-lg shadow-danger/40 bg-danger text-danger-foreground"}},{isOneChar:!0,size:"sm",class:{badge:"w-4 h-4 min-w-4 px-0"}},{isOneChar:!0,size:"md",class:{badge:"w-5 h-5 min-w-5 px-0"}},{isOneChar:!0,size:"lg",class:{badge:"w-6 h-6 min-w-6 px-0"}}],defaultVariants:{variant:"solid",color:"default",size:"md",shape:"rectangle",placement:"top-right",isInvisible:!1,showOutline:!1,disableAnimation:!1,isOneChar:!1}}),gc=h.forwardRef(({children:e,content:t,variant:r="solid",color:s="default",size:n="md",shape:a="rectangle",placement:o="top-right",isOneChar:i=!1,showOutline:l=!1,isInvisible:c=!1,disableAnimation:d=!1,classNames:u,className:p,...m},g)=>{const v=h.useMemo(()=>i?!0:typeof t=="string"||typeof t=="number"?String(t).length===1:!1,[t,i]),x=h.useMemo(()=>Kg({variant:r,color:s,size:n,shape:a,placement:o,isOneChar:v,showOutline:l,isInvisible:c,disableAnimation:d}),[r,s,n,a,o,v,l,c,d]);return!t&&e?f.jsx(f.Fragment,{children:e}):t&&!e?f.jsx("span",{ref:g,className:q(x.badge(),u?.badge,p),...m,children:t}):f.jsxs("div",{ref:g,className:q(x.base(),u?.base,p),...m,children:[e,t&&f.jsx("span",{className:q(x.badge(),u?.badge),"aria-label":typeof t=="string"?t:"Badge",children:t})]})});gc.displayName="Badge";const bc=K({slots:{base:["flex","items-center","justify-start","max-w-fit","relative","overflow-hidden"],list:["flex","flex-wrap","items-center","list-none","p-0","m-0"],item:["flex","items-center","text-inherit","whitespace-nowrap","box-border","outline-none","tap-highlight-transparent"],link:["flex","items-center","gap-1","outline-none","cursor-pointer","transition-colors","tap-highlight-transparent","rounded-small","relative","inline-flex","shrink-0","text-inherit","no-underline","hover:opacity-80","active:opacity-disabled","focus-visible:z-10","focus-visible:outline-2","focus-visible:outline-focus","focus-visible:outline-offset-2"],separator:["flex","items-center","justify-center","pointer-events-none","shrink-0","text-inherit","select-none"],ellipsis:["flex","items-center","justify-center","cursor-pointer","text-inherit","rounded-small","transition-colors","hover:opacity-80","active:opacity-disabled","outline-none","focus-visible:z-10","focus-visible:outline-2","focus-visible:outline-focus","focus-visible:outline-offset-2"]},variants:{size:{sm:{base:"text-xs",item:"h-6",link:"px-1 h-6 text-xs min-h-6",separator:"px-1 text-xs",ellipsis:"w-6 h-6 text-xs"},md:{base:"text-sm",item:"h-8",link:"px-2 h-8 text-sm min-h-8",separator:"px-1.5 text-sm",ellipsis:"w-8 h-8 text-sm"},lg:{base:"text-base",item:"h-10",link:"px-3 h-10 text-base min-h-10",separator:"px-2 text-base",ellipsis:"w-10 h-10 text-base"}},color:{default:{item:"text-foreground",link:"text-foreground data-[current=true]:text-foreground data-[current=true]:font-medium",separator:"text-foreground-400"},primary:{item:"text-primary",link:"text-primary data-[current=true]:text-primary data-[current=true]:font-medium",separator:"text-primary-300"},secondary:{item:"text-secondary",link:"text-secondary data-[current=true]:text-secondary data-[current=true]:font-medium",separator:"text-secondary-300"},success:{item:"text-success",link:"text-success data-[current=true]:text-success data-[current=true]:font-medium",separator:"text-success-300"},warning:{item:"text-warning",link:"text-warning data-[current=true]:text-warning data-[current=true]:font-medium",separator:"text-warning-300"},danger:{item:"text-danger",link:"text-danger data-[current=true]:text-danger data-[current=true]:font-medium",separator:"text-danger-300"}},variant:{solid:{link:["data-[current=true]:bg-foreground","data-[current=true]:text-background"]},bordered:{link:["border-2","border-transparent","data-[current=true]:border-foreground"]},light:{link:["data-[current=true]:bg-foreground/10"]},flat:{link:["data-[current=true]:bg-foreground/20"]}},isDisabled:{true:{base:"opacity-disabled pointer-events-none",link:"cursor-default pointer-events-none"}},hideSeparator:{true:{separator:"hidden"}}},compoundVariants:[{color:"primary",variant:"solid",class:{link:["data-[current=true]:bg-primary","data-[current=true]:text-primary-foreground"]}},{color:"primary",variant:"bordered",class:{link:"data-[current=true]:border-primary"}},{color:"primary",variant:"light",class:{link:"data-[current=true]:bg-primary/10"}},{color:"primary",variant:"flat",class:{link:"data-[current=true]:bg-primary/20"}},{color:"secondary",variant:"solid",class:{link:["data-[current=true]:bg-secondary","data-[current=true]:text-secondary-foreground"]}},{color:"secondary",variant:"bordered",class:{link:"data-[current=true]:border-secondary"}},{color:"secondary",variant:"light",class:{link:"data-[current=true]:bg-secondary/10"}},{color:"secondary",variant:"flat",class:{link:"data-[current=true]:bg-secondary/20"}},{color:"success",variant:"solid",class:{link:["data-[current=true]:bg-success","data-[current=true]:text-success-foreground"]}},{color:"success",variant:"bordered",class:{link:"data-[current=true]:border-success"}},{color:"success",variant:"light",class:{link:"data-[current=true]:bg-success/10"}},{color:"success",variant:"flat",class:{link:"data-[current=true]:bg-success/20"}},{color:"warning",variant:"solid",class:{link:["data-[current=true]:bg-warning","data-[current=true]:text-warning-foreground"]}},{color:"warning",variant:"bordered",class:{link:"data-[current=true]:border-warning"}},{color:"warning",variant:"light",class:{link:"data-[current=true]:bg-warning/10"}},{color:"warning",variant:"flat",class:{link:"data-[current=true]:bg-warning/20"}},{color:"danger",variant:"solid",class:{link:["data-[current=true]:bg-danger","data-[current=true]:text-danger-foreground"]}},{color:"danger",variant:"bordered",class:{link:"data-[current=true]:border-danger"}},{color:"danger",variant:"light",class:{link:"data-[current=true]:bg-danger/10"}},{color:"danger",variant:"flat",class:{link:"data-[current=true]:bg-danger/20"}}],defaultVariants:{size:"md",color:"default",variant:"flat",isDisabled:!1,hideSeparator:!1}}),Xg=K({base:["flex","items-center","justify-center","pointer-events-none","shrink-0","select-none"],variants:{type:{slash:"",chevron:"",arrow:"",dot:"",custom:""},size:{sm:"w-3 h-3 text-xs",md:"w-4 h-4 text-sm",lg:"w-5 h-5 text-base"},color:{default:"text-foreground-400",primary:"text-primary-300",secondary:"text-secondary-300",success:"text-success-300",warning:"text-warning-300",danger:"text-danger-300"}},defaultVariants:{type:"slash",size:"md",color:"default"}});K({slots:{item:"",separator:""},variants:{animation:{none:{},fade:{item:"animate-in fade-in duration-300",separator:"animate-in fade-in duration-300"},slide:{item:"animate-in slide-in-from-left-2 duration-300",separator:"animate-in slide-in-from-left-1 duration-300"},scale:{item:"animate-in zoom-in-95 duration-300",separator:"animate-in zoom-in-95 duration-300"}},stagger:{true:{},false:{}}},compoundVariants:[{animation:"fade",stagger:!0,class:{item:"animate-in fade-in duration-300 fill-mode-both",separator:"animate-in fade-in duration-300 fill-mode-both"}},{animation:"slide",stagger:!0,class:{item:"animate-in slide-in-from-left-2 duration-300 fill-mode-both",separator:"animate-in slide-in-from-left-1 duration-300 fill-mode-both"}},{animation:"scale",stagger:!0,class:{item:"animate-in zoom-in-95 duration-300 fill-mode-both",separator:"animate-in zoom-in-95 duration-300 fill-mode-both"}}],defaultVariants:{animation:"none",stagger:!1}});const Ho=e=>{const t={slash:"/",chevron:"›",arrow:"→",dot:"•",custom:""};return t[e]||t.slash},yc=h.createContext(void 0),xc=()=>{const e=h.useContext(yc);if(!e)throw new Error("useBreadcrumbContext must be used within a Breadcrumb component");return e},Yg=e=>{const{children:t,size:r="md",color:s="default",variant:n="flat",separator:a="slash",separatorClassName:o,itemsClassName:i,hideSeparator:l=!1,maxItems:c,showRoot:d=!0,isDisabled:u=!1,itemsBeforeCollapse:p=1,itemsAfterCollapse:m=1,renderEllipsis:g,className:v,listProps:x,...b}=e,y=h.Children.toArray(t),w=h.useMemo(()=>{if(!c||y.length<=c)return y;const S=y.length,T=Math.max(2,c-1);if(S<=T)return y;const k=y.slice(0,p),V=y.slice(S-m),A=S-p-m,B=g?g(A):f.jsx("span",{"aria-label":`${A} more items`,children:"..."},"ellipsis");return[...k,B,...V]},[y,c,p,m,g]),C=h.useMemo(()=>bc({size:r,color:s,variant:n,isDisabled:u,hideSeparator:l}),[r,s,n,u,l]),j=h.useMemo(()=>({size:r,color:s,variant:n,separator:a,separatorClassName:o,isDisabled:u}),[r,s,n,a,o,u]);return{processedChildren:w,slots:C,contextValue:j,itemsClassName:i,className:v,listProps:x,otherProps:b}},vc=h.forwardRef((e,t)=>{const{processedChildren:r,slots:s,contextValue:n,itemsClassName:a,className:o,listProps:i,otherProps:l}=Yg(e);return f.jsx(yc.Provider,{value:n,children:f.jsx("nav",{ref:t,className:s.base({className:o}),"aria-label":"Breadcrumb",...l,children:f.jsx("ol",{className:s.list({className:a}),...i,children:r.map((c,d)=>{const u=d===r.length-1;return f.jsxs(h.Fragment,{children:[f.jsx("li",{className:s.item(),children:h.isValidElement(c)?h.cloneElement(c,{isCurrent:c.props?.isCurrent??u}):c}),!u&&!e.hideSeparator&&f.jsx("li",{className:s.separator({className:n.separatorClassName}),children:h.isValidElement(n.separator)?n.separator:f.jsxs("span",{"aria-hidden":"true",role:"separator",className:"flex items-center justify-center",children:[n.separator==="slash"&&f.jsx("span",{className:"text-inherit",children:"/"}),n.separator==="chevron"&&f.jsx("svg",{className:`${n.size==="sm"?"w-3 h-3":n.size==="lg"?"w-5 h-5":"w-4 h-4"} text-inherit`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:f.jsx("polyline",{points:"9,18 15,12 9,6",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),n.separator==="arrow"&&f.jsxs("svg",{className:`${n.size==="sm"?"w-3 h-3":n.size==="lg"?"w-5 h-5":"w-4 h-4"} text-inherit`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[f.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),f.jsx("polyline",{points:"12,5 19,12 12,19",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),n.separator==="dot"&&f.jsx("svg",{className:`${n.size==="sm"?"w-3 h-3":n.size==="lg"?"w-5 h-5":"w-4 h-4"} text-inherit`,fill:"currentColor",viewBox:"0 0 24 24",children:f.jsx("circle",{cx:"12",cy:"12",r:"3"})})]})})]},d)})})})})});vc.displayName="Breadcrumb";const Zr=({to:e,children:t,className:r="",activeClassName:s="",exact:n=!1,replace:a=!1,onClick:o})=>{const i=Er.useLocation(),l=n?i.pathname===e:i.pathname.startsWith(e),c=[r,l&&s].filter(Boolean).join(" "),d=u=>{o?.(u)};return f.jsx(Er.Link,{to:e,className:c,replace:a,onClick:d,children:t})},qg=e=>{const t=xc(),{children:r,href:s,to:n,isDisabled:a,isCurrent:o=!1,startContent:i,endContent:l,className:c,itemClassName:d,linkClassName:u,size:p,color:m,variant:g,onPress:v,...x}=e,b=n||s,y=p||t.size||"md",w=m||t.color||"default",C=g||t.variant||"flat",j=a||t.isDisabled||!1,S=h.useMemo(()=>bc({size:y,color:w,variant:C,isDisabled:j}),[y,w,C,j]),T=h.useCallback(V=>{if(j||o){V.preventDefault();return}v&&v(V)},[j,o,v]);return{children:r,href:s,to:n,isDisabled:j,isCurrent:o,startContent:i,endContent:l,className:c,itemClassName:d,linkClassName:u,slots:S,handlePress:T,shouldRenderAsLink:!!(b&&!j&&!o),otherProps:x}},wc=h.forwardRef((e,t)=>{const{children:r,href:s,to:n,isDisabled:a,isCurrent:o,startContent:i,endContent:l,linkClassName:c,slots:d,handlePress:u,shouldRenderAsLink:p,otherProps:m}=qg(e),g=f.jsxs(f.Fragment,{children:[i,f.jsx("span",{children:r}),l]}),v={ref:t,className:d.link({className:c}),"data-current":o,"data-disabled":a,"aria-current":o?"page":void 0,"aria-disabled":a,tabIndex:a?-1:0,onClick:u,...m};if(p){if(n)return f.jsx(f.Fragment,{children:f.jsx(Zr,{to:n,className:d.link({className:c}),onClick:u,children:g})});if(s)return f.jsx(f.Fragment,{children:f.jsx("a",{href:s,...v,children:g})})}return f.jsx(f.Fragment,{children:f.jsx("span",{...v,role:"link",children:g})})});wc.displayName="BreadcrumbItem";const Zg={slash:()=>f.jsx("span",{children:"/"}),chevron:()=>f.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"w-full h-full",children:f.jsx("polyline",{points:"9,18 15,12 9,6"})}),arrow:()=>f.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"w-full h-full",children:[f.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),f.jsx("polyline",{points:"12,5 19,12 12,19"})]}),dot:()=>f.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:"w-full h-full",children:f.jsx("circle",{cx:"12",cy:"12",r:"3"})})},Jg=e=>{const t=xc(),{type:r,customIcon:s,className:n,size:a,color:o}=e,i=r||(typeof t.separator=="string"?t.separator:"slash"),l=a||t.size||"md",c=o||t.color||"default",d=h.useMemo(()=>Xg({type:i,size:l,color:c}),[i,l,c]),u=h.useMemo(()=>{if(h.isValidElement(t.separator))return t.separator;if(s)return s;if(i==="custom")return f.jsx("span",{children:Ho(i)});const p=Zg[i];return p?f.jsx(p,{}):f.jsx("span",{children:Ho(i)})},[t.separator,s,i]);return{separatorClasses:d,separatorContent:u,className:n}},Cc=h.forwardRef((e,t)=>{const{separatorClasses:r,separatorContent:s,className:n}=Jg(e);return f.jsx("span",{ref:t,className:`${r} ${n||""}`,"aria-hidden":"true",role:"separator",children:s})});Cc.displayName="BreadcrumbSeparator";const Qg={xs:"px-2 py-1 text-xs",sm:"px-3 py-1.5 text-sm",md:"px-4 py-2 text-base",lg:"px-6 py-3 text-lg",xl:"px-8 py-4 text-xl"},eb={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl",full:"rounded-full"},tb=(e,t)=>{const r=t==="faded"||t==="light"?"ghost":t==="bordered"||t==="outlined"?"outline":t;return{default:{solid:"bg-gray-600 hover:bg-gray-700 active:bg-gray-800 text-white border-gray-600 hover:border-gray-700 dark:bg-gray-700 dark:hover:bg-gray-600 dark:active:bg-gray-500 dark:border-gray-700 dark:hover:border-gray-600",outline:"bg-transparent hover:bg-gray-50 active:bg-gray-100 text-gray-600 border-2 border-gray-600 hover:border-gray-700 dark:hover:bg-gray-800 dark:active:bg-gray-700 dark:text-gray-300 dark:border-gray-400 dark:hover:border-gray-300",ghost:"bg-transparent hover:bg-gray-100 active:bg-gray-200 text-gray-600 border-transparent dark:hover:bg-gray-800 dark:active:bg-gray-700 dark:text-gray-300",link:"bg-transparent hover:bg-gray-50 active:bg-gray-100 text-gray-600 border-transparent underline hover:no-underline dark:hover:bg-gray-800 dark:active:bg-gray-700 dark:text-gray-300",gradient:"bg-gradient-to-r from-gray-500 to-gray-600 hover:from-gray-600 hover:to-gray-700 text-white border-transparent dark:from-gray-600 dark:to-gray-700 dark:hover:from-gray-500 dark:hover:to-gray-600"},primary:{solid:"bg-blue-600 hover:bg-blue-700 active:bg-blue-800 text-white border-blue-600 hover:border-blue-700 dark:bg-blue-600 dark:hover:bg-blue-500 dark:active:bg-blue-400",outline:"bg-transparent hover:bg-blue-50 active:bg-blue-100 text-blue-600 border-2 border-blue-600 hover:border-blue-700 dark:hover:bg-blue-900 dark:active:bg-blue-800 dark:text-blue-400 dark:border-blue-500 dark:hover:border-blue-400",ghost:"bg-transparent hover:bg-blue-100 active:bg-blue-200 text-blue-600 border-transparent dark:hover:bg-blue-900 dark:active:bg-blue-800 dark:text-blue-400",link:"bg-transparent hover:bg-blue-50 active:bg-blue-100 text-blue-600 border-transparent underline hover:no-underline dark:hover:bg-blue-900 dark:active:bg-blue-800 dark:text-blue-400",gradient:"bg-gradient-to-r from-blue-500 to-blue-600 hover:from-blue-600 hover:to-blue-700 text-white border-transparent dark:from-blue-600 dark:to-blue-700 dark:hover:from-blue-500 dark:hover:to-blue-600"},secondary:{solid:"bg-purple-600 hover:bg-purple-700 active:bg-purple-800 text-white border-purple-600 hover:border-purple-700 dark:bg-purple-600 dark:hover:bg-purple-500 dark:active:bg-purple-400",outline:"bg-transparent hover:bg-purple-50 active:bg-purple-100 text-purple-600 border-2 border-purple-600 hover:border-purple-700 dark:hover:bg-purple-900 dark:active:bg-purple-800 dark:text-purple-400 dark:border-purple-500 dark:hover:border-purple-400",ghost:"bg-transparent hover:bg-purple-100 active:bg-purple-200 text-purple-600 border-transparent dark:hover:bg-purple-900 dark:active:bg-purple-800 dark:text-purple-400",link:"bg-transparent hover:bg-purple-50 active:bg-purple-100 text-purple-600 border-transparent underline hover:no-underline dark:hover:bg-purple-900 dark:active:bg-purple-800 dark:text-purple-400",gradient:"bg-gradient-to-r from-purple-500 to-purple-600 hover:from-purple-600 hover:to-purple-700 text-white border-transparent dark:from-purple-600 dark:to-purple-700 dark:hover:from-purple-500 dark:hover:to-purple-600"},success:{solid:"bg-green-600 hover:bg-green-700 active:bg-green-800 text-white border-green-600 hover:border-green-700 dark:bg-green-600 dark:hover:bg-green-500 dark:active:bg-green-400",outline:"bg-transparent hover:bg-green-50 active:bg-green-100 text-green-600 border-2 border-green-600 hover:border-green-700 dark:hover:bg-green-900 dark:active:bg-green-800 dark:text-green-400 dark:border-green-500 dark:hover:border-green-400",ghost:"bg-transparent hover:bg-green-100 active:bg-green-200 text-green-600 border-transparent dark:hover:bg-green-900 dark:active:bg-green-800 dark:text-green-400",link:"bg-transparent hover:bg-green-50 active:bg-green-100 text-green-600 border-transparent underline hover:no-underline dark:hover:bg-green-900 dark:active:bg-green-800 dark:text-green-400",gradient:"bg-gradient-to-r from-green-500 to-green-600 hover:from-green-600 hover:to-green-700 text-white border-transparent dark:from-green-600 dark:to-green-700 dark:hover:from-green-500 dark:hover:to-green-600"},warning:{solid:"bg-yellow-500 hover:bg-yellow-600 active:bg-yellow-700 text-white border-yellow-500 hover:border-yellow-600 dark:bg-yellow-600 dark:hover:bg-yellow-500 dark:active:bg-yellow-400",outline:"bg-transparent hover:bg-yellow-50 active:bg-yellow-100 text-yellow-600 border-2 border-yellow-500 hover:border-yellow-600 dark:hover:bg-yellow-900 dark:active:bg-yellow-800 dark:text-yellow-400 dark:border-yellow-500 dark:hover:border-yellow-400",ghost:"bg-transparent hover:bg-yellow-100 active:bg-yellow-200 text-yellow-600 border-transparent dark:hover:bg-yellow-900 dark:active:bg-yellow-800 dark:text-yellow-400",link:"bg-transparent hover:bg-yellow-50 active:bg-yellow-100 text-yellow-600 border-transparent underline hover:no-underline dark:hover:bg-yellow-900 dark:active:bg-yellow-800 dark:text-yellow-400",gradient:"bg-gradient-to-r from-yellow-400 to-yellow-500 hover:from-yellow-500 hover:to-yellow-600 text-white border-transparent dark:from-yellow-500 dark:to-yellow-600 dark:hover:from-yellow-400 dark:hover:to-yellow-500"},danger:{solid:"bg-red-600 hover:bg-red-700 active:bg-red-800 text-white border-red-600 hover:border-red-700 dark:bg-red-600 dark:hover:bg-red-500 dark:active:bg-red-400",outline:"bg-transparent hover:bg-red-50 active:bg-red-100 text-red-600 border-2 border-red-600 hover:border-red-700 dark:hover:bg-red-900 dark:active:bg-red-800 dark:text-red-400 dark:border-red-500 dark:hover:border-red-400",ghost:"bg-transparent hover:bg-red-100 active:bg-red-200 text-red-600 border-transparent dark:hover:bg-red-900 dark:active:bg-red-800 dark:text-red-400",link:"bg-transparent hover:bg-red-50 active:bg-red-100 text-red-600 border-transparent underline hover:no-underline dark:hover:bg-red-900 dark:active:bg-red-800 dark:text-red-400",gradient:"bg-gradient-to-r from-red-500 to-red-600 hover:from-red-600 hover:to-red-700 text-white border-transparent dark:from-red-600 dark:to-red-700 dark:hover:from-red-500 dark:hover:to-red-600"}}[e][r]},rb=(e=!1)=>e?"cursor-wait opacity-70 pointer-events-none":"",sb=(e=!1)=>e?"opacity-50 cursor-not-allowed pointer-events-none":"",nb=(e=!1)=>e?"w-full":"",ab=e=>({default:"focus:ring-gray-500 dark:focus:ring-gray-400",primary:"focus:ring-blue-500 dark:focus:ring-blue-400",secondary:"focus:ring-purple-500 dark:focus:ring-purple-400",success:"focus:ring-green-500 dark:focus:ring-green-400",warning:"focus:ring-yellow-500 dark:focus:ring-yellow-400",danger:"focus:ring-red-500 dark:focus:ring-red-400"})[e],ob=(e=!1,t=!1,r=!1,s="primary")=>{if(e||t)return"";const a=`cursor-pointer focus:outline-none focus:ring-2 focus:ring-offset-2 ${ab(s)}`,o="transition-colors duration-200 ease-in-out";return r?`${a} ${o}`:`${a} ${o}`},ib=(e=!1)=>e?"flex [&>*:not(:first-child)]:rounded-l-none [&>*:not(:last-child)]:rounded-r-none [&>*:not(:first-child)]:-ml-px":"flex gap-2",lb={none:{},scale:{scale:1.05,transition:{duration:.2,ease:"easeOut"}},lift:{y:-2,scale:1.02,transition:{duration:.2,ease:"easeOut"}},bounce:{scale:[1,1.1,1.05],transition:{duration:.4,ease:"easeOut",times:[0,.6,1]}},pulse:{scale:[1,1.03,1],transition:{duration:1.5,ease:"easeInOut",repeat:1/0}},shake:{x:[-2,2,-2,2,0],transition:{duration:.4,ease:"easeInOut"}},rotate:{rotate:[0,-2,2,0],transition:{duration:.3,ease:"easeInOut"}},glow:{boxShadow:["0 0 0 0px rgba(59, 130, 246, 0)","0 0 0 4px rgba(59, 130, 246, 0.1)","0 0 20px 8px rgba(59, 130, 246, 0.15)"],transition:{duration:.3,ease:"easeOut"}}},cb={none:{},scale:{scale:.95,transition:{duration:.1,ease:"easeInOut"}},bounce:{scale:[1,.9,1.1,1],transition:{duration:.4,ease:"easeOut",times:[0,.3,.7,1]}},ripple:{scale:[1,1.05],transition:{duration:.6,ease:"easeOut"}},press:{scale:.9,y:1,transition:{duration:.1,ease:"easeInOut"}},punch:{scale:[1,1.2,1],rotate:[0,-5,5,0],transition:{duration:.4,ease:"easeOut",times:[0,.4,1]}},wiggle:{rotate:[0,-10,10,-5,5,0],transition:{duration:.5,ease:"easeInOut"}}},db=e=>{const t={default:"107, 114, 128",primary:"59, 130, 246",secondary:"147, 51, 234",success:"34, 197, 94",warning:"234, 179, 8",danger:"239, 68, 68"};return t[e]||t.primary},ub=e=>{const t=db(e);return{boxShadow:[`0 0 0 0px rgba(${t}, 0)`,`0 0 0 4px rgba(${t}, 0.1)`,`0 0 20px 8px rgba(${t}, 0.15)`],transition:{duration:.3,ease:"easeOut"}}},fb={initial:{scale:1},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20}},kc=({children:e,className:t="",ariaLabel:r,color:s="primary",disabled:n=!1,isLoading:a=!1,onClick:o,type:i="button",size:l="md",variant:c="solid",radius:d="md",startIcon:u,endIcon:p,fullWidth:m=!1,disableAnimation:g=!1,hoverAnimation:v="scale",clickAnimation:x="scale","data-testid":b})=>{const[y,w]=h.useState(!1),C="inline-flex items-center justify-center font-medium border",j=Qg[l],S=eb[d],T=tb(s,c),k=rb(a),V=sb(n),A=nb(m),B=ob(n,a,g,s),$=[C,j,S,T,k,V,A,B,t].filter(Boolean).join(" "),L=g?{}:v==="glow"?ub(s):lb[v],I=g?{}:cb[x],R=()=>{n||a||(w(!0),setTimeout(()=>w(!1),300),o?.())};return f.jsxs(_.button,{"aria-label":r,disabled:n||a,className:$,onClick:R,type:i,"data-testid":b,...fb,whileHover:n||a?{}:L,animate:y?I:{},children:[u&&f.jsx(Js,{position:"start",children:u}),f.jsx(jc,{children:e}),p&&f.jsx(Js,{position:"end",children:p}),a&&f.jsx(_.div,{className:"ml-2",initial:{opacity:0,scale:0},animate:{opacity:1,scale:1},transition:{duration:.2},children:f.jsx(_.div,{className:"rounded-full h-4 w-4 border-b-2 border-current",animate:{rotate:360},transition:{duration:1,repeat:1/0,ease:"linear"}})})]})},hb=({children:e,className:t="",size:r="md",color:s="primary",variant:n="solid",radius:a="md",isAttached:o=!1,disabled:i=!1,disableAnimation:l=!1,"data-testid":c})=>{const u=[ib(o),t].filter(Boolean).join(" "),p=h.Children.map(e,m=>h.isValidElement(m)&&m.type===kc?h.cloneElement(m,{size:m.props.size||r,color:m.props.color||s,variant:m.props.variant||n,radius:m.props.radius||a,disabled:m.props.disabled||i,disableAnimation:m.props.disableAnimation??l}):m);return f.jsx("div",{className:u,"data-testid":c,children:p})},jc=({children:e,className:t="","data-testid":r})=>f.jsx("span",{className:`${t}`,"data-testid":r,children:e}),Js=({children:e,className:t="",position:r="start","data-testid":s})=>{const n=r==="start"?"mr-2":"ml-2";return f.jsx("span",{className:`inline-flex items-center ${n} ${t}`,"data-testid":s,children:e})},pb=({children:e,className:t="","data-testid":r})=>f.jsx("span",{className:`${t}`,"data-testid":r,children:e}),mb={sm:"p-3",md:"p-4",lg:"p-6",xl:"p-8"},gb={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl",full:"rounded-full"},bb=(e,t)=>({default:{elevated:"bg-white shadow-lg hover:shadow-xl border-gray-200 dark:bg-gray-800 dark:border-gray-600 dark:shadow-gray-900/20 dark:hover:shadow-gray-900/30",bordered:"bg-white border-2 border-gray-200 hover:border-gray-300 dark:bg-gray-800 dark:border-gray-600 dark:hover:border-gray-500",shadow:"bg-white shadow-md hover:shadow-lg dark:bg-gray-800 dark:shadow-gray-900/20 dark:hover:shadow-gray-900/30",flat:"bg-gray-50 hover:bg-gray-100 dark:bg-gray-900 dark:hover:bg-gray-800"},primary:{elevated:"bg-blue-50 shadow-lg hover:shadow-xl border-blue-200 dark:bg-blue-900/20 dark:border-blue-700 dark:shadow-blue-900/30 dark:hover:shadow-blue-900/40",bordered:"bg-blue-50 border-2 border-blue-200 hover:border-blue-300 dark:bg-blue-900/20 dark:border-blue-700 dark:hover:border-blue-600",shadow:"bg-blue-50 shadow-md shadow-blue-100 hover:shadow-lg hover:shadow-blue-200 dark:bg-blue-900/20 dark:shadow-blue-900/30 dark:hover:shadow-blue-900/40",flat:"bg-blue-100 hover:bg-blue-200 dark:bg-blue-900/30 dark:hover:bg-blue-900/40"},secondary:{elevated:"bg-purple-50 shadow-lg hover:shadow-xl border-purple-200 dark:bg-purple-900/20 dark:border-purple-700 dark:shadow-purple-900/30 dark:hover:shadow-purple-900/40",bordered:"bg-purple-50 border-2 border-purple-200 hover:border-purple-300 dark:bg-purple-900/20 dark:border-purple-700 dark:hover:border-purple-600",shadow:"bg-purple-50 shadow-md shadow-purple-100 hover:shadow-lg hover:shadow-purple-200 dark:bg-purple-900/20 dark:shadow-purple-900/30 dark:hover:shadow-purple-900/40",flat:"bg-purple-100 hover:bg-purple-200 dark:bg-purple-900/30 dark:hover:bg-purple-900/40"},success:{elevated:"bg-green-50 shadow-lg hover:shadow-xl border-green-200 dark:bg-green-900/20 dark:border-green-700 dark:shadow-green-900/30 dark:hover:shadow-green-900/40",bordered:"bg-green-50 border-2 border-green-200 hover:border-green-300 dark:bg-green-900/20 dark:border-green-700 dark:hover:border-green-600",shadow:"bg-green-50 shadow-md shadow-green-100 hover:shadow-lg hover:shadow-green-200 dark:bg-green-900/20 dark:shadow-green-900/30 dark:hover:shadow-green-900/40",flat:"bg-green-100 hover:bg-green-200 dark:bg-green-900/30 dark:hover:bg-green-900/40"},warning:{elevated:"bg-yellow-50 shadow-lg hover:shadow-xl border-yellow-200 dark:bg-yellow-900/20 dark:border-yellow-700 dark:shadow-yellow-900/30 dark:hover:shadow-yellow-900/40",bordered:"bg-yellow-50 border-2 border-yellow-200 hover:border-yellow-300 dark:bg-yellow-900/20 dark:border-yellow-700 dark:hover:border-yellow-600",shadow:"bg-yellow-50 shadow-md shadow-yellow-100 hover:shadow-lg hover:shadow-yellow-200 dark:bg-yellow-900/20 dark:shadow-yellow-900/30 dark:hover:shadow-yellow-900/40",flat:"bg-yellow-100 hover:bg-yellow-200 dark:bg-yellow-900/30 dark:hover:bg-yellow-900/40"},danger:{elevated:"bg-red-50 shadow-lg hover:shadow-xl border-red-200 dark:bg-red-900/20 dark:border-red-700 dark:shadow-red-900/30 dark:hover:shadow-red-900/40",bordered:"bg-red-50 border-2 border-red-200 hover:border-red-300 dark:bg-red-900/20 dark:border-red-700 dark:hover:border-red-600",shadow:"bg-red-50 shadow-md shadow-red-100 hover:shadow-lg hover:shadow-red-200 dark:bg-red-900/20 dark:shadow-red-900/30 dark:hover:shadow-red-900/40",flat:"bg-red-100 hover:bg-red-200 dark:bg-red-900/30 dark:hover:bg-red-900/40"}})[e][t],yb=(e=!1,t=!1,r=!1)=>{let s="";return r?"opacity-50 cursor-not-allowed":(e&&(s+="cursor-pointer focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 dark:focus:ring-blue-400 dark:focus:ring-offset-gray-800 "),(t||e)&&(s+="transition-all duration-200 ease-in-out "),s.trim())},xb=({children:e,className:t="",size:r="md",variant:s="elevated",color:n="default",radius:a="lg",isClickable:o=!1,isDisabled:i=!1,isHoverable:l=!1,onClick:c,"data-testid":d})=>{const u="relative overflow-hidden",p=mb[r],m=gb[a],g=bb(n,s),v=yb(o,l,i),x=[u,p,m,g,v,t].filter(Boolean).join(" "),b=o?"button":"div";return f.jsx(b,{className:x,onClick:o&&!i?c:void 0,disabled:o&&i,"data-testid":d,children:e})},vb=({children:e,className:t="","data-testid":r})=>f.jsx("div",{className:`flex items-center justify-between pb-4 mb-4 border-b border-gray-200 dark:border-gray-600 ${t}`,"data-testid":r,children:e}),wb=({children:e,className:t="","data-testid":r})=>f.jsx("div",{className:`flex-grow ${t}`,"data-testid":r,children:e}),Cb=({children:e,className:t="","data-testid":r})=>f.jsx("div",{className:`flex items-center justify-between pt-4 mt-4 border-t border-gray-200 dark:border-gray-600 ${t}`,"data-testid":r,children:e}),Kn={sm:{wrapper:"w-4 h-4",icon:"w-3 h-3 text-xs",label:"text-sm"},md:{wrapper:"w-5 h-5",icon:"w-4 h-4 text-sm",label:"text-base"},lg:{wrapper:"w-6 h-6",icon:"w-5 h-5 text-base",label:"text-lg"}},kb={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"},jb=(e="primary",t=!1,r=!1,s=!1)=>{if(r)return t?"bg-gray-300 border-gray-300 text-gray-500":"bg-gray-100 border-gray-300";if(s)return t?"bg-red-500 border-red-500 text-white":"bg-white border-red-500 hover:border-red-600";const n={default:{selected:"bg-gray-600 border-gray-600 text-white hover:bg-gray-700 hover:border-gray-700",unselected:"bg-white border-gray-300 hover:border-gray-400"},primary:{selected:"bg-blue-600 border-blue-600 text-white hover:bg-blue-700 hover:border-blue-700",unselected:"bg-white border-gray-300 hover:border-blue-400"},secondary:{selected:"bg-purple-600 border-purple-600 text-white hover:bg-purple-700 hover:border-purple-700",unselected:"bg-white border-gray-300 hover:border-purple-400"},success:{selected:"bg-green-600 border-green-600 text-white hover:bg-green-700 hover:border-green-700",unselected:"bg-white border-gray-300 hover:border-green-400"},warning:{selected:"bg-yellow-500 border-yellow-500 text-white hover:bg-yellow-600 hover:border-yellow-600",unselected:"bg-white border-gray-300 hover:border-yellow-400"},danger:{selected:"bg-red-600 border-red-600 text-white hover:bg-red-700 hover:border-red-700",unselected:"bg-white border-gray-300 hover:border-red-400"}};return t?n[e].selected:n[e].unselected},Sb=(e="md",t="md",r="primary",s=!1,n=!1,a=!1,o=!1)=>{const i=Kn[e].wrapper,l=kb[t],c=jb(r,s,n,a);return["relative inline-flex items-center justify-center border-2 shrink-0",i,l,c,n?"cursor-not-allowed":"cursor-pointer focus-within:ring-2 focus-within:ring-offset-2 focus-within:ring-blue-500",!o&&!n?"transition-all duration-200 ease-in-out transform hover:scale-105 active:scale-95":"transition-colors duration-200 ease-in-out"].filter(Boolean).join(" ")},Tb=(e="md",t=!1,r=!1,s=!1)=>["absolute flex items-center justify-center",Kn[e].icon,t||r?"opacity-100 scale-100":"opacity-0 scale-75",s?"":"transition-all duration-200 ease-in-out"].filter(Boolean).join(" "),Mb=(e="md",t=!1,r=!1,s=!1)=>["ml-2 select-none",Kn[e].label,t?"text-gray-400 cursor-not-allowed":"text-gray-700",r&&s?"line-through":""].filter(Boolean).join(" "),Ab=(e=!1)=>["inline-flex items-center",e?"opacity-60":""].filter(Boolean).join(" "),Vb=()=>"absolute inset-0 w-full h-full opacity-0 cursor-pointer z-10",Pb=({children:e,icon:t,value:r,name:s,size:n="md",color:a="primary",radius:o="md",lineThrough:i=!1,isSelected:l,defaultSelected:c=!1,isRequired:d=!1,isReadOnly:u=!1,isDisabled:p=!1,isIndeterminate:m=!1,isInvalid:g=!1,validationState:v,disableAnimation:x=!1,className:b="",classNames:y,onChange:w,onValueChange:C,"data-testid":j})=>{const[S,T]=h.useState(c),k=h.useRef(null),V=l!==void 0,A=V?l:S,B=g||v==="invalid",$=H=>{if(p||u)return;const W=H.target.checked;V||T(W),w?.(H),C?.(W)},I=[Ab(p),y?.base,b].filter(Boolean).join(" "),D=[Sb(n,o,a,A||m,p,B,x),y?.wrapper].filter(Boolean).join(" "),M=[Tb(n,A,m,x),y?.icon].filter(Boolean).join(" "),E=[Mb(n,p,i,A),y?.label].filter(Boolean).join(" "),z=[Vb(),y?.hiddenInput].filter(Boolean).join(" "),O=()=>t?f.jsx(t,{isSelected:A,isIndeterminate:m,disableAnimation:x,className:M,"data-testid":`${j}-custom-icon`}):f.jsx(Ib,{isSelected:A,isIndeterminate:m,disableAnimation:x,className:M,"data-testid":`${j}-icon`});return f.jsxs("label",{className:I,"data-testid":j,children:[f.jsxs(Eb,{className:D,"data-testid":`${j}-wrapper`,children:[f.jsx("input",{ref:k,type:"checkbox",value:r,name:s,checked:A||m,onChange:$,disabled:p,readOnly:u,required:d,"aria-invalid":B,"aria-checked":m?"mixed":A,className:z,"data-testid":`${j}-input`}),O()]}),e&&f.jsx("span",{className:E,"data-testid":`${j}-label`,children:e})]})},Eb=({children:e,className:t="","data-testid":r})=>f.jsx("div",{className:t,"data-testid":r,children:e}),Ib=({isSelected:e=!1,isIndeterminate:t=!1,className:r="","data-testid":s})=>t?f.jsx("svg",{className:r,viewBox:"0 0 24 24",fill:"currentColor","data-testid":s,children:f.jsx("rect",{x:"6",y:"11",width:"12",height:"2",rx:"1"})}):e?f.jsx("svg",{className:r,viewBox:"0 0 24 24",fill:"currentColor","data-testid":s,children:f.jsx("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"})}):null,Nb=K({slots:{base:["max-w-fit","min-w-min","inline-flex","items-center","justify-between","box-border","whitespace-nowrap","px-1","h-7","text-small","rounded-full","subpixel-antialiased","transition-colors","cursor-default","tap-highlight-transparent"],content:["flex-1","text-inherit","font-normal","px-2"],dot:["w-2","h-2","ml-1","rounded-full"],avatar:["flex","shrink-0","w-5","h-5","ml-1"],closeButton:["z-10","appearance-none","outline-none","select-none","transition-opacity","opacity-70","cursor-pointer","active:opacity-disabled","hover:opacity-100","rounded-full","flex","items-center","justify-center","box-border","w-5","h-5","mr-1"]},variants:{variant:{solid:{},bordered:{base:"border-medium bg-transparent"},light:{base:"bg-transparent"},flat:{},faded:{base:"border-small"},shadow:{base:"shadow-lg"},dot:{base:"border-medium border-default bg-transparent"}},color:{default:{},primary:{},secondary:{},success:{},warning:{},danger:{}},size:{sm:{base:"px-1 h-6 text-tiny",content:"px-1",closeButton:"w-4 h-4",avatar:"w-4 h-4"},md:{base:"px-1 h-7 text-small",content:"px-2",closeButton:"w-5 h-5",avatar:"w-5 h-5"},lg:{base:"px-1 h-8 text-medium",content:"px-2",closeButton:"w-6 h-6",avatar:"w-6 h-6"}},radius:{none:{base:"rounded-none"},sm:{base:"rounded-small"},md:{base:"rounded-medium"},lg:{base:"rounded-large"},full:{base:"rounded-full"}},isDisabled:{true:{base:"opacity-disabled pointer-events-none"},false:{}},isCloseButtonVisible:{true:{},false:{}}},compoundVariants:[{variant:"solid",color:"default",class:{base:"bg-default text-default-foreground"}},{variant:"solid",color:"primary",class:{base:"bg-primary text-primary-foreground"}},{variant:"solid",color:"secondary",class:{base:"bg-secondary text-secondary-foreground"}},{variant:"solid",color:"success",class:{base:"bg-success text-success-foreground"}},{variant:"solid",color:"warning",class:{base:"bg-warning text-warning-foreground"}},{variant:"solid",color:"danger",class:{base:"bg-danger text-danger-foreground"}},{variant:"bordered",color:"default",class:{base:"border-default text-foreground"}},{variant:"bordered",color:"primary",class:{base:"border-primary text-primary"}},{variant:"bordered",color:"secondary",class:{base:"border-secondary text-secondary"}},{variant:"bordered",color:"success",class:{base:"border-success text-success"}},{variant:"bordered",color:"warning",class:{base:"border-warning text-warning"}},{variant:"bordered",color:"danger",class:{base:"border-danger text-danger"}},{variant:"light",color:"default",class:{base:"text-default-600"}},{variant:"light",color:"primary",class:{base:"text-primary"}},{variant:"light",color:"secondary",class:{base:"text-secondary"}},{variant:"light",color:"success",class:{base:"text-success"}},{variant:"light",color:"warning",class:{base:"text-warning"}},{variant:"light",color:"danger",class:{base:"text-danger"}},{variant:"flat",color:"default",class:{base:"bg-default/20 text-default-600"}},{variant:"flat",color:"primary",class:{base:"bg-primary/20 text-primary-600"}},{variant:"flat",color:"secondary",class:{base:"bg-secondary/20 text-secondary-600"}},{variant:"flat",color:"success",class:{base:"bg-success/20 text-success-600 dark:text-success-500"}},{variant:"flat",color:"warning",class:{base:"bg-warning/20 text-warning-600 dark:text-warning-500"}},{variant:"flat",color:"danger",class:{base:"bg-danger/20 text-danger-500"}},{variant:"faded",color:"default",class:{base:"border-default bg-default-50 text-default-foreground"}},{variant:"faded",color:"primary",class:{base:"border-primary bg-primary-50 text-primary-600"}},{variant:"faded",color:"secondary",class:{base:"border-secondary bg-secondary-50 text-secondary-600"}},{variant:"faded",color:"success",class:{base:"border-success bg-success-50 text-success-600 dark:text-success-500"}},{variant:"faded",color:"warning",class:{base:"border-warning bg-warning-50 text-warning-600 dark:text-warning-500"}},{variant:"faded",color:"danger",class:{base:"border-danger bg-danger-50 text-danger-500"}},{variant:"shadow",color:"default",class:{base:"shadow-lg shadow-default/50 bg-default text-default-foreground"}},{variant:"shadow",color:"primary",class:{base:"shadow-lg shadow-primary/40 bg-primary text-primary-foreground"}},{variant:"shadow",color:"secondary",class:{base:"shadow-lg shadow-secondary/40 bg-secondary text-secondary-foreground"}},{variant:"shadow",color:"success",class:{base:"shadow-lg shadow-success/40 bg-success text-success-foreground"}},{variant:"shadow",color:"warning",class:{base:"shadow-lg shadow-warning/40 bg-warning text-warning-foreground"}},{variant:"shadow",color:"danger",class:{base:"shadow-lg shadow-danger/40 bg-danger text-danger-foreground"}},{variant:"dot",color:"default",class:{base:"text-default-foreground",dot:"bg-default-400"}},{variant:"dot",color:"primary",class:{base:"text-foreground",dot:"bg-primary"}},{variant:"dot",color:"secondary",class:{base:"text-foreground",dot:"bg-secondary"}},{variant:"dot",color:"success",class:{base:"text-foreground",dot:"bg-success"}},{variant:"dot",color:"warning",class:{base:"text-foreground",dot:"bg-warning"}},{variant:"dot",color:"danger",class:{base:"text-foreground",dot:"bg-danger"}}],defaultVariants:{variant:"solid",color:"default",size:"md",radius:"full",isDisabled:!1,isCloseButtonVisible:!1}}),Rb=({className:e})=>f.jsx("svg",{className:e,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),Sc=h.forwardRef(({children:e,variant:t="solid",color:r="default",size:s="md",radius:n="full",avatar:a,startContent:o,endContent:i,isDisabled:l=!1,classNames:c,className:d,onClose:u,...p},m)=>{const g=!!u,v=h.useMemo(()=>Nb({variant:t,color:r,size:s,radius:n,isDisabled:l,isCloseButtonVisible:g}),[t,r,s,n,l,g]),x=()=>t!=="dot"?null:f.jsx("span",{className:q(v.dot(),c?.dot),"aria-hidden":"true"}),b=()=>a?f.jsx("span",{className:q(v.avatar(),c?.avatar),children:a}):null,y=()=>o||null,w=()=>u?f.jsx("button",{type:"button",className:q(v.closeButton(),c?.closeButton),onClick:u,"aria-label":"Close",disabled:l,children:i||f.jsx(Rb,{className:"w-3 h-3"})}):i||null;return f.jsxs("div",{ref:m,className:q(v.base(),c?.base,d),...p,children:[x(),b(),y(),f.jsx("span",{className:q(v.content(),c?.content),children:e}),w()]})});Sc.displayName="Chip";const Xn={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"},Bb={none:"",sm:"shadow-sm",md:"shadow-md",lg:"shadow-lg"},Db=(e=!1)=>["relative inline-block",e?"overflow-hidden cursor-pointer transition-transform duration-300 ease-in-out hover:scale-105":""].filter(Boolean).join(" "),Lb=(e="lg",t="none",r=!1)=>{const s=Xn[e],n=Bb[t];return["relative z-10 max-w-full h-auto object-cover",s,n,r?"opacity-0 transition-opacity duration-500 ease-in-out":"opacity-100 transition-opacity duration-500 ease-in-out"].filter(Boolean).join(" ")},Ob=(e="lg")=>["absolute inset-0 w-full h-full object-cover blur-2xl scale-125 opacity-70 z-0",Xn[e]].filter(Boolean).join(" "),$b=(e="lg")=>["animate-pulse bg-gray-200 dark:bg-gray-700",Xn[e]].filter(Boolean).join(" "),zb=({src:e,srcSet:t,sizes:r,alt:s,width:n,height:a,radius:o="lg",shadow:i="none",loading:l="lazy",fallbackSrc:c,isBlurred:d=!1,isZoomed:u=!1,removeWrapper:p=!1,disableSkeleton:m=!1,className:g="",classNames:v,onLoad:x,onError:b,"data-testid":y})=>{const[w,C]=h.useState(!m),[j,S]=h.useState(!1),[T,k]=h.useState(e),V=h.useRef(null),A=E=>{C(!1),S(!1),x?.(E)},B=()=>{S(!0),C(!1),c&&T!==c&&(k(c),C(!m)),b?.()};h.useEffect(()=>{e!==T&&!j&&(k(e),C(!m),S(!1))},[e,T,j,m]),h.useEffect(()=>{m&&C(!1)},[m]);const L=[Lb(o,i,w),v?.img,g].filter(Boolean).join(" "),I=w&&!m&&f.jsx("div",{className:`${$b(o)} ${v?.wrapper||""}`,style:{width:n,height:a},"data-testid":`${y}-skeleton`}),R=f.jsx("img",{ref:V,src:T,srcSet:t,sizes:r,alt:s,width:n,height:a,loading:l,className:L,onLoad:A,onError:B,"data-testid":y}),D=d&&!w&&!j&&f.jsx(_b,{src:T,alt:`${s} (blurred background)`,className:`${Ob(o)} ${v?.blurredImg||""}`,"data-testid":`${y}-blurred`});if(p)return f.jsxs(f.Fragment,{children:[I,!w&&R]});const P=u?Wb:Fb,M=[Db(u),d?"p-2":""].filter(Boolean).join(" "),N=u?[M,v?.wrapper].filter(Boolean).join(" "):"";return f.jsxs(P,{className:u?N:`${M} ${v?.wrapper||""}`.trim(),isZoomed:u,"data-testid":`${y}-wrapper`,children:[I,!w&&f.jsxs(f.Fragment,{children:[D,R]})]})},Fb=({children:e,className:t="","data-testid":r})=>f.jsx("div",{className:t,"data-testid":r,children:e}),Wb=({children:e,className:t="","data-testid":r})=>f.jsx("div",{className:t,"data-testid":r,children:e}),_b=({src:e,alt:t,className:r="","data-testid":s})=>f.jsx("img",{src:e,alt:t,className:r,"aria-hidden":"true","data-testid":s}),Gb=(e=!0,t=!1,r="inside")=>{const s=["group","flex","flex-col"];return e&&s.push("w-full"),t&&s.push("opacity-disabled","pointer-events-none"),(r==="outside"||r==="outside-left")&&s.push("gap-2"),s.join(" ")},Ub=(e="inside")=>{const t=["flex"];return e==="outside-left"?t.push("flex-row","items-center","gap-4"):t.push("flex-col","gap-2"),t.join(" ")},Hb=(e="md",t="default",r="inside",s=!1,n=!1)=>{const a=["select-none","font-medium","transition-colors","duration-200"],o={sm:"text-xs",md:"text-sm",lg:"text-base"};if(a.push(o[e]),n)a.push("text-danger");else{const i={default:"text-foreground-600",primary:"text-primary",secondary:"text-secondary",success:"text-success",warning:"text-warning",danger:"text-danger"};a.push(i[t])}if(r==="inside"){a.push("absolute","origin-top-left","left-3","pointer-events-none","transform-gpu","transition-all","duration-200","ease-out","group-data-[filled=true]:scale-85","group-data-[filled=true]:-translate-y-1.5","group-data-[focus=true]:scale-85","group-data-[focus=true]:-translate-y-1.5");const i={sm:"top-1.5",md:"top-2.5",lg:"top-3.5"};a.push(i[e])}else r==="outside-left"&&a.push("flex-shrink-0","w-32");return s&&a.push("after:content-['*']","after:text-danger","after:ml-0.5"),a.join(" ")},Kb=(e="flat",t="default",r="md",s="md",n=!1,a=!1,o=!1)=>{const i=["relative","inline-flex","items-center","w-full","transition-all","duration-200","ease-in-out","group-data-[focus=true]:z-10"],l={sm:"h-13 min-h-8 px-2.5",md:"h-15 min-h-10 px-3",lg:"h-18 min-h-12 px-4"};i.push(l[r]);const c={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"};if(i.push(c[s]),a)switch(e){case"flat":i.push("bg-danger-50","hover:bg-danger-100");break;case"bordered":i.push("border-2","border-danger","hover:border-danger-hover");break;case"faded":i.push("bg-danger-50","border-2","border-danger-200","hover:border-danger");break;case"underlined":i.push("border-b-2","border-danger","hover:border-danger-hover");break}else switch(e){case"flat":const d={default:"bg-default-100 hover:bg-default-200",primary:"bg-primary-50 hover:bg-primary-100",secondary:"bg-secondary-50 hover:bg-secondary-100",success:"bg-success-50 hover:bg-success-100",warning:"bg-warning-50 hover:bg-warning-100",danger:"bg-danger-50 hover:bg-danger-100"};i.push(d[t]);break;case"bordered":if(i.push("border-2"),n){const p={default:"border-default-400",primary:"border-primary",secondary:"border-secondary",success:"border-success",warning:"border-warning",danger:"border-danger"};i.push(p[t])}else i.push("border-default-200","hover:border-default-400");break;case"faded":const u={default:"bg-default-100 border-2 border-default-200 hover:border-default-400",primary:"bg-primary-50 border-2 border-primary-200 hover:border-primary",secondary:"bg-secondary-50 border-2 border-secondary-200 hover:border-secondary",success:"bg-success-50 border-2 border-success-200 hover:border-success",warning:"bg-warning-50 border-2 border-warning-200 hover:border-warning",danger:"bg-danger-50 border-2 border-danger-200 hover:border-danger"};i.push(u[t]);break;case"underlined":if(i.push("border-b-2","rounded-none"),n){const p={default:"border-default-400",primary:"border-primary",secondary:"border-secondary",success:"border-success",warning:"border-warning",danger:"border-danger"};i.push(p[t])}else i.push("border-default-300","hover:border-default-400");break}return o&&i.push("opacity-50","cursor-not-allowed"),i.join(" ")},Xb=()=>["inline-flex","items-center","w-full","gap-1.5","h-full"].join(" "),Yb=(e="md",t="inside")=>{const r=["w-full","font-normal","text-foreground","bg-transparent","outline-none","placeholder:text-foreground-500","focus-visible:outline-none","data-[has-start-content=true]:ps-1","data-[has-end-content=true]:pe-1"],s={sm:"text-sm",md:"text-sm",lg:"text-base"};return r.push(s[e]),t==="inside"&&r.push("group-data-[has-label=true]:pt-1"),r.join(" ")},qb=(e="md")=>{const t=["p-1","rounded-full","text-foreground-400","hover:text-foreground-600","hover:bg-default-100","active:bg-default-200","transition-all","duration-150","cursor-pointer","flex-shrink-0"],r={sm:"w-4 h-4 text-xs",md:"w-5 h-5 text-sm",lg:"w-6 h-6 text-base"};return t.push(r[e]),t.join(" ")},Zb=()=>["flex","flex-col","gap-1.5","px-1"].join(" "),Jb=(e="md")=>{const t=["text-foreground-400"],r={sm:"text-xs",md:"text-sm",lg:"text-sm"};return t.push(r[e]),t.join(" ")},Qb=(e="md")=>{const t=["text-danger"],r={sm:"text-xs",md:"text-sm",lg:"text-sm"};return t.push(r[e]),t.join(" ")},ey=(e="md")=>{const t=["flex-shrink-0","text-foreground-400"],r={sm:"text-sm",md:"text-base",lg:"text-lg"};return t.push(r[e]),t.join(" ")},ty=(e,t)=>{const r=[];if(t.isRequired&&(!e||e.trim().length===0)&&r.push("This field is required"),!e||e.trim().length===0)return{isValid:r.length===0,errors:r};if(t.minLength&&e.length<t.minLength&&r.push(`Minimum length is ${t.minLength} characters`),t.maxLength&&e.length>t.maxLength&&r.push(`Maximum length is ${t.maxLength} characters`),t.pattern&&(new RegExp(t.pattern).test(e)||r.push("Invalid format")),t.type==="email"&&(/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)||r.push("Please enter a valid email address")),t.type==="url")try{new URL(e)}catch{r.push("Please enter a valid URL")}if(t.customValidate){const s=t.customValidate(e);s!==!0&&s!==null&&s!==void 0&&(Array.isArray(s)?r.push(...s):typeof s=="string"&&r.push(s))}return{isValid:r.length===0,errors:r}},Tc=h.forwardRef(({label:e,placeholder:t,description:r,errorMessage:s,startContent:n,endContent:a,value:o,defaultValue:i,variant:l="flat",color:c="default",size:d="md",radius:u="md",labelPlacement:p="inside",fullWidth:m=!0,type:g="text",minLength:v,maxLength:x,pattern:b,isRequired:y=!1,isDisabled:w=!1,isReadOnly:C=!1,isInvalid:j=!1,isClearable:S=!1,disableAnimation:T=!1,classNames:k,className:V,validate:A,validationBehavior:B="native",baseRef:$,onChange:L,onValueChange:I,onClear:R,onFocus:D,onBlur:P,onKeyDown:M,onKeyUp:N,"data-testid":E,"aria-label":F,"aria-labelledby":z,"aria-describedby":O,...H},W)=>{const[J,Y]=h.useState(i||""),[Z,se]=h.useState(!1),[ae,Te]=h.useState(!1),[pe,at]=h.useState([]),Le=h.useRef(null),ne=o!==void 0,je=ne?o:J,ye=je&&je.length>0,Ze=ye||Z,Oe=g==="password",Qr=Oe&&ae?"text":g,fr=A!==void 0,Me=(j||pe.length>0)&&!w,Q=`input-label-${Math.random().toString(36).substring(2,11)}`,de=r?`input-description-${Math.random().toString(36).substring(2,11)}`:void 0,ge=Me?`input-error-${Math.random().toString(36).substring(2,11)}`:void 0;h.useEffect(()=>{if(fr||y||v||x||b){const Ne=ty(je,{isRequired:y,minLength:v,maxLength:x,pattern:b,type:g,customValidate:A});at(Ne.errors)}},[je,y,v,x,b,g,A,fr]);const _e=Ne=>{const oa=Ne.target.value;ne||Y(oa),L?.(Ne),I?.(oa)},Ot=Ne=>{se(!0),D?.(Ne)},md=Ne=>{se(!1),P?.(Ne)},gd=()=>{ne||Y(""),R?.(),I?.(""),Le.current?.focus()},bd=()=>{Te(!ae)},yd=[Gb(m,w,p),k?.base,V].filter(Boolean).join(" "),xd=[Ub(p),k?.mainWrapper].filter(Boolean).join(" "),vd=[Hb(d,c,p,y,Me),k?.label].filter(Boolean).join(" "),wd=[Kb(l,c,d,u,Z,Me,w),k?.inputWrapper].filter(Boolean).join(" "),Cd=[Xb(),k?.innerWrapper].filter(Boolean).join(" "),kd=[Yb(d,p),k?.input].filter(Boolean).join(" "),na=[qb(d),k?.clearButton].filter(Boolean).join(" "),jd=[Zb(),k?.helperWrapper].filter(Boolean).join(" "),Sd=[Jb(d),k?.description].filter(Boolean).join(" "),Td=[Qb(d),k?.errorMessage].filter(Boolean).join(" "),aa=ey(d),Md=()=>{if(!Me)return null;if(typeof s=="function"){const Ne={isInvalid:Me,validationErrors:pe,validationDetails:{valid:pe.length===0,valueMissing:y&&!ye,tooShort:v?je.length<v:void 0,tooLong:x?je.length>x:void 0,patternMismatch:b?!new RegExp(b).test(je):void 0}};return s(Ne)}return s||(pe.length>0?pe[0]:null)},Ad=()=>!S||!ye||w||C?null:f.jsx("button",{type:"button",className:na,onClick:gd,tabIndex:-1,"data-testid":E?`${E}-clear-button`:void 0,children:f.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[f.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),f.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}),Vd=()=>Oe?f.jsx("button",{type:"button",className:na,onClick:bd,tabIndex:-1,"data-testid":E?`${E}-password-toggle`:void 0,children:ae?f.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[f.jsx("path",{d:"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94L17.94 17.94z"}),f.jsx("line",{x1:"1",y1:"1",x2:"23",y2:"23"}),f.jsx("path",{d:"M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19l-6.84-6.84z"})]}):f.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[f.jsx("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),f.jsx("circle",{cx:"12",cy:"12",r:"3"})]})}):null,es=()=>e?p==="inside"?f.jsxs("label",{id:Q,className:`
|
|
10
10
|
absolute left-3 transition-all duration-200 pointer-events-none z-10
|
|
11
11
|
text-small text-gray-500
|
|
12
12
|
top-1/2 -translate-y-1/2 origin-left
|
|
13
|
-
${
|
|
14
|
-
`.replace(/\s+/g," ").trim(),htmlFor:E,"data-testid":E?`${E}-label`:void 0,style:{zIndex:10},children:[e,y&&f.jsx("span",{className:"text-danger ml-1",children:"*"})]}):f.jsxs("label",{id:Q,className:rd,htmlFor:E,"data-testid":E?`${E}-label`:void 0,children:[e,y&&f.jsx("span",{className:"text-danger ml-1",children:"*"})]}):null,fd=f.jsx("input",{...K,ref:W||Le,id:E,type:Zr,value:Se,placeholder:h==="inside"?Z||Se?t:"":t,disabled:v,readOnly:C,required:y,minLength:w,maxLength:x,pattern:b,className:ad,onChange:_e,onFocus:Lt,onBlur:Zc,onKeyDown:T,onKeyUp:N,"aria-label":F,"aria-labelledby":e?Q:$,"aria-describedby":[de,ge,O].filter(Boolean).join(" ")||void 0,"aria-invalid":Ae,"data-testid":E?`${E}-input`:void 0,"data-has-start-content":!!s,"data-has-end-content":!!(a||j||Oe)});return f.jsxs("div",{ref:z,className:ed,"data-testid":E,"data-invalid":Ae,"data-required":y,"data-readonly":C,"data-disabled":v,"data-focus":Z,"data-focus-within":Z,"data-focus-visible":Z,"data-filled":Ze,"data-has-label":!!e,"data-has-helper":!!(r||Ae),children:[f.jsxs("div",{className:td,children:[h==="outside-left"&&Jr(),f.jsxs("div",{className:"flex flex-col gap-1.5 w-full",children:[h==="outside"&&Jr(),f.jsxs("div",{className:nd,children:[h==="inside"&&Jr(),f.jsxs("div",{className:sd,children:[s&&Z&&f.jsx("div",{className:ea,"data-testid":E?`${E}-start-content`:void 0,children:s}),fd,a&&f.jsx("div",{className:ea,"data-testid":E?`${E}-end-content`:void 0,children:a}),ud(),dd()]})]})]})]}),(r||Ae)&&f.jsxs("div",{className:od,children:[r&&f.jsx("div",{id:de,className:id,"data-testid":E?`${E}-description`:void 0,children:r}),Ae&&f.jsx("div",{id:ge,className:ld,"data-testid":E?`${E}-error-message`:void 0,children:cd()})]})]})});wc.displayName="Input";const rr=H({slots:{wrapper:["fixed","inset-0","z-50","flex","items-center","justify-center","p-4","sm:p-0","overflow-hidden"],base:["relative","flex","flex-col","w-full","box-border","outline-none","mx-1","my-1","sm:mx-6","sm:my-16","bg-white","dark:bg-gray-800","text-gray-900","dark:text-gray-100","shadow-large","rounded-large","max-h-[calc(100vh_-_2rem)]","sm:max-h-[calc(100vh_-_8rem)]","data-[open=true]:animate-in","data-[open=false]:animate-out","data-[open=false]:fade-out-0","data-[open=true]:fade-in-0","data-[open=false]:zoom-out-95","data-[open=true]:zoom-in-95","data-[open=false]:slide-out-to-left-1/2","data-[open=false]:slide-out-to-top-[48%]","data-[open=true]:slide-in-from-left-1/2","data-[open=true]:slide-in-from-top-[48%]","data-[open=false]:duration-200","data-[open=true]:duration-200"],backdrop:["fixed","inset-0","z-50","bg-black/50","dark:bg-black/70","data-[enter]:animate-in","data-[exit]:animate-out","data-[enter]:fade-in-0","data-[exit]:fade-out-0","data-[enter]:duration-200","data-[exit]:duration-150"],header:["flex","py-4","px-6","relative","flex-col","gap-1","text-large","font-semibold","border-b","border-gray-200","dark:border-gray-700"],body:["relative","flex-1","px-6","py-2","flex","flex-col","gap-3","min-h-0"],footer:["flex","flex-row","gap-2","px-6","py-4","justify-end","border-t","border-gray-200","dark:border-gray-700"],closeButton:["absolute","appearance-none","outline-none","select-none","top-1","right-1","rtl:right-auto","rtl:left-1","p-2","text-gray-500","dark:text-gray-400","rounded-full","hover:bg-gray-100","dark:hover:bg-gray-700","active:bg-gray-200","dark:active:bg-gray-600","tap-highlight-transparent","transition-opacity","data-[pressed=true]:scale-95","transition-transform","z-10"]},variants:{size:{xs:{base:"max-w-xs"},sm:{base:"max-w-sm"},md:{base:"max-w-md"},lg:{base:"max-w-lg"},xl:{base:"max-w-xl"},"2xl":{base:"max-w-2xl"},"3xl":{base:"max-w-3xl"},"4xl":{base:"max-w-4xl"},"5xl":{base:"max-w-5xl"},full:{base:"max-w-full max-h-full my-0 mx-0 sm:my-0 sm:mx-0 rounded-none"}},radius:{none:{base:"rounded-none"},sm:{base:"rounded-small"},md:{base:"rounded-medium"},lg:{base:"rounded-large"}},shadow:{none:{base:"shadow-none"},sm:{base:"shadow-small"},md:{base:"shadow-medium"},lg:{base:"shadow-large"}},backdrop:{transparent:{backdrop:"bg-transparent"},opaque:{backdrop:"bg-black/50 dark:bg-black/70"},blur:{backdrop:"bg-black/30 dark:bg-black/50 backdrop-blur-sm backdrop-saturate-150"}},scrollBehavior:{normal:{base:"overflow-hidden",body:"overflow-y-auto max-h-[60vh]"},inside:{base:"max-h-[calc(100vh_-_8rem)] overflow-hidden flex flex-col",body:"overflow-y-auto flex-1 min-h-0"},outside:{wrapper:"items-start sm:items-center overflow-y-auto py-8",base:"my-0 max-h-fit overflow-visible",body:"overflow-visible"}},placement:{auto:{wrapper:"items-end sm:items-center",base:"sm:my-16 my-2"},top:{wrapper:"items-start",base:"mt-2 mb-auto"},"top-center":{wrapper:"items-start sm:items-center",base:"mt-2 sm:mt-16 mb-auto"},center:{wrapper:"items-center",base:"my-auto"},bottom:{wrapper:"items-end",base:"mb-2 mt-auto"},"bottom-center":{wrapper:"items-end sm:items-center",base:"mb-2 sm:mb-16 mt-auto"}},disableAnimation:{true:{base:["data-[open=true]:animate-none","data-[open=false]:animate-none"],backdrop:["data-[enter]:animate-none","data-[exit]:animate-none"]}},isDraggable:{true:{header:"cursor-move select-none active:cursor-grabbing",base:"cursor-default"}}},defaultVariants:{size:"md",radius:"lg",shadow:"lg",backdrop:"opaque",scrollBehavior:"normal",placement:"auto",disableAnimation:!1,isDraggable:!1}}),Cc=p.createContext(null),Us=()=>{const e=p.useContext(Cc);if(!e)throw new Error("Modal components must be used within a Modal");return e},Db=()=>f.jsx("svg",{"aria-hidden":"true",fill:"none",focusable:"false",height:"1em",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",width:"1em",children:f.jsx("path",{d:"m18 6-12 12M6 6l12 12"})}),Bb=e=>{p.useEffect(()=>{if(!e)return;const t=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=t}},[e])},Lb=(e,t)=>{const r=p.useRef(null);p.useEffect(()=>{e?(r.current=document.activeElement,setTimeout(()=>{if(t.current){const n=t.current.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');n.length>0?n[0].focus():t.current.focus()}},100)):r.current&&r.current.focus()},[e,t])},Ob=(e,t,r)=>{const[n,s]=p.useState(!1),a=p.useRef(null);return p.useEffect(()=>{r||s(!1)},[r]),{dragProps:e?{drag:!0,dragMomentum:!1,dragElastic:.1,dragConstraints:t?!1:a,onDragStart:()=>s(!0),onDragEnd:()=>s(!1),whileDrag:{scale:1.02,transition:{duration:.1}}}:{},isDragging:n,constraintsRef:a}},kc=p.forwardRef(({children:e,size:t="md",radius:r="lg",shadow:n="lg",backdrop:s="opaque",scrollBehavior:a="normal",placement:o="auto",isOpen:i,defaultOpen:l=!1,isDismissable:c=!0,isKeyboardDismissDisabled:d=!1,shouldBlockScroll:u=!0,hideCloseButton:h=!1,closeButton:m,motionProps:g,portalContainer:w=document.body,disableAnimation:x=!1,isDraggable:b=!1,allowOverflow:y=!1,classNames:v,className:C,onOpenChange:S,onClose:j,...A},k)=>{const[V,M]=p.useState(l),D=p.useRef(null),z=i!==void 0?i:V,L=W=>{i===void 0&&M(W),S?.(W),W||j?.()},I=()=>{L(!1)};p.useEffect(()=>{if(!z||d)return;const W=J=>{J.key==="Escape"&&I()};return document.addEventListener("keydown",W),()=>document.removeEventListener("keydown",W)},[z,d]);const R=W=>{c&&W.target===W.currentTarget&&I()};Bb(z&&u),Lb(z,D);const{dragProps:B,isDragging:P,constraintsRef:T}=Ob(b,y,z),{wrapper:N,base:E,backdrop:F}=rr({size:t,radius:r,shadow:n,backdrop:s,scrollBehavior:a,placement:o,disableAnimation:x,isDraggable:b}),$={isOpen:z,size:t,radius:r,shadow:n,backdrop:s,scrollBehavior:a,placement:o,isDismissable:c,isKeyboardDismissDisabled:d,shouldBlockScroll:u,hideCloseButton:h,disableAnimation:x,isDraggable:b,allowOverflow:y,classNames:v,onClose:I,onOpenChange:L},O={initial:{opacity:0,scale:.9,y:20},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.9,y:20},transition:{duration:x?0:.3,ease:"easeOut"}},K=f.jsx(We,{children:z&&f.jsx(Cc.Provider,{value:$,children:f.jsx(_.div,{ref:T,className:F({className:v?.backdrop}),onClick:R,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:x?0:.2,ease:"easeOut"},children:f.jsx("div",{className:N({className:v?.wrapper}),onClick:W=>W.stopPropagation(),children:f.jsxs(_.div,{ref:k||D,className:E({className:v?.base||C}),"data-open":z,"data-dismissable":c,role:"dialog","aria-modal":"true",tabIndex:-1,...g||O,...B,style:{cursor:P?"grabbing":b?"grab":"default"},...A,children:[!h&&f.jsx("button",{type:"button",className:rr().closeButton({className:v?.closeButton}),onClick:I,"aria-label":"Close modal",children:m||f.jsx(Db,{})}),e]})})})})});return Jn.createPortal(K,w)});kc.displayName="Modal";const zb=p.forwardRef(({children:e,className:t,...r},n)=>f.jsx("div",{ref:n,className:t,...r,children:e}));zb.displayName="ModalContent";const $b=p.forwardRef(({children:e,className:t,...r},n)=>{const{classNames:s,isDraggable:a}=Us(),{header:o}=rr();return f.jsx("div",{ref:n,className:o({className:s?.header||t}),"data-framer-drag-handle":a?"":void 0,style:{cursor:a?"move":"default"},...r,children:e})});$b.displayName="ModalHeader";const Fb=p.forwardRef(({children:e,className:t,...r},n)=>{const{classNames:s}=Us(),{body:a}=rr();return f.jsx("div",{ref:n,className:a({className:s?.body||t}),...r,children:e})});Fb.displayName="ModalBody";const Wb=p.forwardRef(({children:e,className:t,...r},n)=>{const{classNames:s}=Us(),{footer:a}=rr();return f.jsx("div",{ref:n,className:a({className:s?.footer||t}),...r,children:e})});Wb.displayName="ModalFooter";function _b(e={}){const{isOpen:t,defaultOpen:r=!1,onOpenChange:n,onClose:s}=e,[a,o]=p.useState(r),i=t!==void 0?t:a,l=p.useCallback(u=>{t===void 0&&o(u),n?.(u),u||s?.()},[t,n,s]),c=p.useCallback(()=>{l(!0)},[l]),d=p.useCallback(()=>{l(!1)},[l]);return{isOpen:i,onOpen:c,onClose:d,onOpenChange:l}}const st=H({slots:{base:["flex","z-40","w-full","h-auto","items-center","justify-between","transition-background","duration-300","ease-in-out","data-[menu-open=true]:bg-content1/60","data-[hidden=true]:transform","data-[hidden=true]:-translate-y-full","data-[hidden=true]:transition-transform"],wrapper:["z-40","flex","px-6","gap-4","w-full","flex-row","relative","flex-nowrap","items-center","justify-between","h-16"],brand:["flex","basis-0","flex-row","flex-grow","flex-nowrap"],content:["flex","gap-4","h-full","flex-row","flex-nowrap","items-center","data-[justify=start]:justify-start","data-[justify=start]:flex-grow","data-[justify=center]:justify-center","data-[justify=end]:justify-end","data-[justify=end]:flex-grow","data-[justify=end]:basis-0"],item:["text-medium","whitespace-nowrap","box-border","list-none","data-[active=true]:font-medium","data-[active=true]:text-primary"],toggle:["group","flex","items-center","justify-center","w-6","h-full","outline-none","rounded-small","tap-highlight-transparent","data-[pressed=true]:bg-default-100","data-[hover=true]:bg-default-100","data-[open=true]:bg-default-100"],toggleIcon:["w-full","h-full","pointer-events-none","flex","flex-col","items-center","justify-center","text-inherit","group-data-[pressed=true]:opacity-70","transition-opacity",'before:content-[""]',"before:block","before:h-px","before:w-4","before:bg-current","before:transition-transform","before:duration-150","before:-translate-y-1","before:rotate-0",'after:content-[""]',"after:block","after:h-px","after:w-4","after:bg-current","after:transition-transform","after:duration-150","after:translate-y-1","after:rotate-0","group-data-[open=true]:before:translate-y-px","group-data-[open=true]:before:rotate-45","group-data-[open=true]:after:-translate-y-px","group-data-[open=true]:after:-rotate-45"],menu:["z-30","px-6","pt-2","fixed","flex","max-w-full","top-header","inset-x-0","bottom-0","w-screen","flex-col","gap-2","overflow-y-auto","bg-content1/60","backdrop-blur-xl","backdrop-saturate-150"],menuItem:["text-large","color-foreground","data-[active=true]:font-semibold","data-[active=true]:text-primary"]},variants:{position:{static:{base:"relative"},sticky:{base:"sticky top-0"}},maxWidth:{sm:{wrapper:"max-w-[640px]"},md:{wrapper:"max-w-[768px]"},lg:{wrapper:"max-w-[1024px]"},xl:{wrapper:"max-w-[1280px]"},"2xl":{wrapper:"max-w-[1536px]"},full:{wrapper:"max-w-full"}},isBordered:{true:{base:"border-b border-divider"}},isBlurred:{true:{base:["backdrop-blur-lg","data-[menu-open=false]:bg-background/70","backdrop-saturate-150"]},false:{base:"bg-background",menu:"bg-background"}},disableAnimation:{true:{menu:"!transition-none"}}},defaultVariants:{position:"sticky",maxWidth:"lg",isBordered:!1,isBlurred:!0,disableAnimation:!1}}),Sc=p.createContext(null),Dt=()=>{const e=p.useContext(Sc);if(!e)throw new Error("Navbar components must be used within a Navbar");return e},Gb=({isOpen:e})=>{const{toggleIcon:t}=st({disableAnimation:!1});return f.jsx("span",{className:t(),"data-open":e,children:f.jsx("span",{className:"sr-only",children:"Toggle menu"})})},jc=p.forwardRef(({children:e,height:t="4rem",position:r="sticky",maxWidth:n="lg",parentRef:s,isBordered:a=!1,isBlurred:o=!0,isMenuOpen:i,isMenuDefaultOpen:l=!1,shouldHideOnScroll:c=!1,disableScrollHandler:d=!1,disableAnimation:u=!1,classNames:h,className:m,onMenuOpenChange:g,onScrollPositionChange:w,...x},b)=>{const[y,v]=p.useState(l),[C,S]=p.useState(!1),[j,A]=p.useState(0),k=p.useRef(null),V=i??y,M=I=>{i===void 0&&v(I),g?.(I)};p.useEffect(()=>{if(!c||d)return;const I=()=>{const B=window.scrollY,P=B>j?"down":"up";P==="down"&&B>100?S(!0):P==="up"&&S(!1),A(B),w?.(B)},R=s?.current||window;return R.addEventListener("scroll",I,{passive:!0}),()=>{R.removeEventListener("scroll",I)}},[c,d,j,s,w]);const{base:D,wrapper:z}=st({position:r,maxWidth:n,isBordered:a,isBlurred:o,disableAnimation:u}),L={isMenuOpen:V,position:r,maxWidth:n,height:t,isBordered:a,isBlurred:o,shouldHideOnScroll:c,disableAnimation:u,classNames:h,onMenuOpenChange:M,onScrollPositionChange:w};return f.jsx(Sc.Provider,{value:L,children:f.jsx(_.nav,{ref:b||k,className:D({className:h?.base||m}),style:{height:t},"data-menu-open":V,"data-hidden":C,initial:c?{y:0}:!1,animate:c?{y:C?-100:0}:!1,transition:{duration:.3,ease:"easeInOut"},...x,children:f.jsx("header",{className:z({className:h?.wrapper}),children:e})})})});jc.displayName="Navbar";const Ub=p.forwardRef(({children:e,className:t,...r},n)=>{const{brand:s}=st(),a=Dt();return f.jsx("div",{ref:n,className:s({className:a?.classNames?.brand||t}),...r,children:e})});Ub.displayName="NavbarBrand";const Kb=p.forwardRef(({children:e,justify:t="start",className:r,...n},s)=>{const{content:a}=st(),{classNames:o}=Dt();return f.jsx("ul",{ref:s,className:a({className:o?.content||r}),"data-justify":t,...n,children:e})});Kb.displayName="NavbarContent";const Hb=p.forwardRef(({children:e,isActive:t=!1,className:r,...n},s)=>{const{item:a}=st(),{classNames:o}=Dt();return f.jsx("li",{ref:s,className:a({className:o?.item||r}),"data-active":t,...n,children:e})});Hb.displayName="NavbarItem";const Xb=p.forwardRef(({icon:e,isSelected:t,defaultSelected:r=!1,srOnlyText:n="open/close navigation menu",className:s,onChange:a,...o},i)=>{const{toggle:l}=st(),{isMenuOpen:c,onMenuOpenChange:d,classNames:u}=Dt(),h=()=>{const m=!c;d(m),a?.(m)};return f.jsx("button",{ref:i,type:"button",className:l({className:u?.toggle||s}),"data-open":c,"data-pressed":!1,"aria-label":n,onClick:h,...o,children:typeof e=="function"?e(c):e||f.jsx(Gb,{isOpen:c})})});Xb.displayName="NavbarMenuToggle";const Yb=p.forwardRef(({children:e,portalContainer:t,className:r,...n},s)=>{const{menu:a}=st(),{isMenuOpen:o,disableAnimation:i,classNames:l}=Dt(),c={closed:{opacity:0,y:-20},open:{opacity:1,y:0}},d={duration:i?0:.3,ease:"easeOut"};return f.jsx(We,{children:o&&f.jsx(_.div,{ref:s,className:a({className:l?.menu||r}),variants:c,initial:"closed",animate:"open",exit:"closed",transition:d,...n,children:f.jsx("ul",{className:"flex flex-col gap-2 py-4",children:e})})})});Yb.displayName="NavbarMenu";const qb=p.forwardRef(({children:e,isActive:t=!1,className:r,...n},s)=>{const{menuItem:a}=st(),{classNames:o}=Dt();return f.jsx("li",{ref:s,className:a({className:o?.menuItem||r}),"data-active":t,...n,children:e})});qb.displayName="NavbarMenuItem";const Zb=H({slots:{base:["flex","flex-col","gap-2","w-full"],track:["relative","bg-gray-200","overflow-hidden"],indicator:["h-full","transition-all","duration-500","ease-out","origin-left"],labelWrapper:["flex","justify-between","items-center"],label:["text-sm","font-medium","text-gray-700"],value:["text-sm","font-medium","text-gray-500"]},variants:{color:{default:{indicator:"bg-gray-400"},primary:{indicator:"bg-blue-600"},secondary:{indicator:"bg-gray-600"},success:{indicator:"bg-green-600"},warning:{indicator:"bg-yellow-500"},danger:{indicator:"bg-red-600"}},size:{sm:{track:"h-1",label:"text-xs",value:"text-xs"},md:{track:"h-2",label:"text-sm",value:"text-sm"},lg:{track:"h-3",label:"text-base",value:"text-base"}},radius:{none:{track:"rounded-none"},sm:{track:"rounded-sm"},md:{track:"rounded-md"},lg:{track:"rounded-lg"},full:{track:"rounded-full"}},isStriped:{true:{indicator:["bg-gradient-to-r","from-transparent","to-transparent","bg-[length:1rem_1rem]","bg-repeat-x","animate-pulse"]}},isIndeterminate:{true:{indicator:["animate-pulse"]}},isDisabled:{true:{base:"opacity-60 cursor-not-allowed",track:"bg-gray-100",indicator:"bg-gray-300",label:"text-gray-400",value:"text-gray-400"}}},compoundVariants:[{isStriped:!0,color:"primary",class:{indicator:["bg-gradient-to-r","from-blue-600","via-blue-500","to-blue-600","bg-[length:1rem_1rem]","animate-[progress-stripes_1s_linear_infinite]"]}},{isStriped:!0,color:"success",class:{indicator:["bg-gradient-to-r","from-green-600","via-green-500","to-green-600","bg-[length:1rem_1rem]","animate-[progress-stripes_1s_linear_infinite]"]}},{isStriped:!0,color:"warning",class:{indicator:["bg-gradient-to-r","from-yellow-500","via-yellow-400","to-yellow-500","bg-[length:1rem_1rem]","animate-[progress-stripes_1s_linear_infinite]"]}},{isStriped:!0,color:"danger",class:{indicator:["bg-gradient-to-r","from-red-600","via-red-500","to-red-600","bg-[length:1rem_1rem]","animate-[progress-stripes_1s_linear_infinite]"]}},{isIndeterminate:!0,class:{indicator:["w-1/3","animate-[progress-indeterminate_2s_ease-in-out_infinite]"]}}],defaultVariants:{color:"primary",size:"md",radius:"full",isStriped:!1,isIndeterminate:!1,isDisabled:!1}}),Tc=(e=0,t=0,r=100)=>(Math.max(t,Math.min(r,e))-t)/(r-t)*100,Jb=(e=0,t=100,r=0)=>{const n=Tc(e,r,t);return`${Math.round(n)}%`},Ac=p.forwardRef(({value:e=0,maxValue:t=100,minValue:r=0,color:n="primary",size:s="md",radius:a="full",showValueLabel:o=!1,label:i,isStriped:l=!1,isIndeterminate:c=!1,isDisabled:d=!1,className:u,classNames:h,...m},g)=>{const w=Tc(e,r,t),x=Jb(e,t,r),b=Zb({color:n,size:s,radius:a,isStriped:l,isIndeterminate:c,isDisabled:d});return f.jsxs("div",{ref:g,className:q(b.base(),h?.base,u),role:"progressbar","aria-valuemin":r,"aria-valuemax":t,"aria-valuenow":c?void 0:e,"aria-valuetext":c?"Cargando...":x,...m,children:[(i||o)&&f.jsxs("div",{className:q(b.labelWrapper(),h?.label),children:[i&&f.jsx("span",{className:q(b.label(),h?.label),children:i}),o&&!c&&f.jsx("span",{className:q(b.value(),h?.value),children:x})]}),f.jsx("div",{className:q(b.track(),h?.track),children:f.jsx(_.div,{className:q(b.indicator(),h?.indicator),initial:{scaleX:0,originX:0},animate:{scaleX:c?1:w/100,x:c?["-100%","300%"]:0},transition:c?{duration:2,repeat:1/0,ease:"easeInOut"}:{duration:.5,ease:"easeOut"},style:c?{width:"33%",transformOrigin:"left center"}:{transformOrigin:"left center"}})})]})});Ac.displayName="Progress";const Qb={slow:2,normal:1,fast:.6};H({base:["inline-block","animate-spin","transition-all","duration-200","ease-in-out"],variants:{size:{xs:"w-3 h-3",sm:"w-4 h-4",md:"w-6 h-6",lg:"w-8 h-8",xl:"w-12 h-12"},color:{primary:"text-blue-600",secondary:"text-gray-600",success:"text-green-600",warning:"text-yellow-600",error:"text-red-600",neutral:"text-gray-400"},visible:{true:"opacity-100 scale-100",false:"opacity-0 scale-95 pointer-events-none"}},defaultVariants:{size:"md",color:"primary",visible:!0}});const ey=H({base:["flex","items-center","justify-center","transition-all","duration-200","ease-in-out"],variants:{overlay:{true:["fixed","inset-0","z-50","bg-white/80","backdrop-blur-sm"],false:""},position:{center:"flex-col",top:"flex-col",bottom:"flex-col",left:"flex-row",right:"flex-row-reverse"},fullScreen:{true:"w-screen h-screen",false:"w-full h-full"}},defaultVariants:{overlay:!1,position:"center",fullScreen:!1}}),ty=H({base:["text-sm","font-medium","transition-opacity","duration-200"],variants:{position:{center:"mt-2 text-center",top:"mb-2 text-center",bottom:"mt-2 text-center",left:"ml-2",right:"mr-2"},color:{primary:"text-blue-600",secondary:"text-gray-600",success:"text-green-600",warning:"text-yellow-600",error:"text-red-600",neutral:"text-gray-500"}},defaultVariants:{position:"center",color:"neutral"}});H({base:["relative","inline-block"],variants:{size:{xs:"w-3 h-3",sm:"w-4 h-4",md:"w-6 h-6",lg:"w-8 h-8",xl:"w-12 h-12"}},defaultVariants:{size:"md"}});const ry=H({base:["rounded-full","transition-all"],variants:{size:{xs:"w-2 h-2",sm:"w-3 h-3",md:"w-4 h-4",lg:"w-6 h-6",xl:"w-8 h-8"},color:{primary:"bg-blue-600",secondary:"bg-gray-600",success:"bg-green-600",warning:"bg-yellow-600",error:"bg-red-600",neutral:"bg-gray-400"}},defaultVariants:{size:"md",color:"primary"}}),ny=H({base:["flex","items-center","justify-center"],variants:{size:{xs:"gap-1",sm:"gap-1",md:"gap-2",lg:"gap-2",xl:"gap-3"}},defaultVariants:{size:"md"}}),sy=H({base:["rounded-full"],variants:{size:{xs:"w-1 h-1",sm:"w-1.5 h-1.5",md:"w-2 h-2",lg:"w-3 h-3",xl:"w-4 h-4"},color:{primary:"bg-blue-600",secondary:"bg-gray-600",success:"bg-green-600",warning:"bg-yellow-600",error:"bg-red-600",neutral:"bg-gray-400"}},defaultVariants:{size:"md",color:"primary"}}),ay=H({base:["flex","items-end","justify-center"],variants:{size:{xs:"gap-0.5 h-3",sm:"gap-0.5 h-4",md:"gap-1 h-6",lg:"gap-1 h-8",xl:"gap-1.5 h-12"}},defaultVariants:{size:"md"}}),oy=H({base:["rounded-full"],variants:{size:{xs:"w-0.5",sm:"w-0.5",md:"w-1",lg:"w-1",xl:"w-1.5"},color:{primary:"bg-blue-600",secondary:"bg-gray-600",success:"bg-green-600",warning:"bg-yellow-600",error:"bg-red-600",neutral:"bg-gray-400"}},defaultVariants:{size:"md",color:"primary"}});H({base:["grid","gap-1"],variants:{size:{xs:"w-6 h-6",sm:"w-8 h-8",md:"w-12 h-12",lg:"w-16 h-16",xl:"w-24 h-24"},gridSize:{"2x2":"grid-cols-2 grid-rows-2","3x3":"grid-cols-3 grid-rows-3","4x4":"grid-cols-4 grid-rows-4"}},defaultVariants:{size:"md",gridSize:"3x3"}});H({base:["rounded-sm"],variants:{color:{primary:"bg-blue-600",secondary:"bg-gray-600",success:"bg-green-600",warning:"bg-yellow-600",error:"bg-red-600",neutral:"bg-gray-400"}},defaultVariants:{color:"primary"}});const iy=H({base:["relative","rounded-full","border-solid","border-transparent"],variants:{size:{xs:"w-3 h-3 border-[1px]",sm:"w-4 h-4 border-[1px]",md:"w-6 h-6 border-2",lg:"w-8 h-8 border-2",xl:"w-12 h-12 border-[3px]"},color:{primary:"border-t-blue-600 border-r-blue-600/30",secondary:"border-t-gray-600 border-r-gray-600/30",success:"border-t-green-600 border-r-green-600/30",warning:"border-t-yellow-600 border-r-yellow-600/30",error:"border-t-red-600 border-r-red-600/30",neutral:"border-t-gray-400 border-r-gray-400/30"}},defaultVariants:{size:"md",color:"primary"}});H({base:["flex","items-center","justify-center"],variants:{direction:{horizontal:"flex-row",vertical:"flex-col",circular:"relative"},size:{xs:"gap-1",sm:"gap-1",md:"gap-2",lg:"gap-2",xl:"gap-3"}},defaultVariants:{direction:"horizontal",size:"md"}});H({base:["flex","items-end","justify-center"],variants:{orientation:{vertical:"flex-row items-end",horizontal:"flex-col items-center"},size:{xs:"gap-0.5",sm:"gap-0.5",md:"gap-1",lg:"gap-1",xl:"gap-1.5"}},defaultVariants:{orientation:"vertical",size:"md"}});const ly=e=>Qb[e],wr={rotate:{animate:{rotate:360}},pulse:{animate:{scale:[1,1.2,1],opacity:[.7,1,.7]}},bounce:{animate:{y:[0,-10,0]}},wave:{animate:{scaleY:[.4,1,.4]}}},Mc=({type:e="rotating",size:t="md",color:r="primary",speed:n="normal",visible:s=!0,label:a,overlay:o=!1,overlayOpacity:i=.8,overlayColor:l="bg-white",animationConfig:c,className:d,"aria-label":u="Loading","data-testid":h="spinner",style:m,...g})=>{const w=ly(n),x=()=>f.jsx(_.div,{className:iy({size:t,color:r}),animate:wr.rotate.animate,transition:{duration:w,repeat:1/0,...c}}),b=()=>f.jsx(_.div,{className:ry({size:t,color:r}),animate:wr.pulse.animate,transition:{duration:w,repeat:1/0,...c}}),y=()=>f.jsx("div",{className:ny({size:t}),children:[0,1,2].map(k=>f.jsx(_.div,{className:sy({size:t,color:r}),animate:wr.bounce.animate,transition:{duration:w,repeat:1/0,delay:k*.1,...c}},k))}),v=()=>f.jsx("div",{className:ay({size:t}),children:[0,1,2,3,4].map(k=>f.jsx(_.div,{className:oy({size:t,color:r}),animate:wr.wave.animate,transition:{duration:w,repeat:1/0,delay:k*.1,...c}},k))}),C=()=>{switch(e){case"rotating":case"ring":return f.jsx(x,{});case"pulse":return f.jsx(b,{});case"bounce":case"dots":return f.jsx(y,{});case"wave":case"bars":return f.jsx(v,{});default:return f.jsx(x,{})}},S=ey({overlay:o,position:"center",fullScreen:o}),j=d?`${S} ${d}`:S,A={...m,...o&&i!==void 0&&{backgroundColor:`rgba(255, 255, 255, ${i})`}};return s?f.jsxs(_.div,{className:j,style:A,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},role:"status","aria-live":"polite","data-testid":h,...g,children:[C(),a&&f.jsx(_.div,{className:ty({position:"center",color:r==="neutral"?"neutral":r}),initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.1,duration:.2},children:a})]}):null};Mc.displayName="Spinner";const cr={sm:{wrapper:"w-10 h-6",thumb:"w-5 h-5",label:"text-sm",startContent:"text-xs",endContent:"text-xs",thumbIcon:"w-3 h-3"},md:{wrapper:"w-12 h-7",thumb:"w-6 h-6",label:"text-base",startContent:"text-sm",endContent:"text-sm",thumbIcon:"w-4 h-4"},lg:{wrapper:"w-14 h-8",thumb:"w-7 h-7",label:"text-lg",startContent:"text-base",endContent:"text-base",thumbIcon:"w-5 h-5"}},cy=(e="primary",t=!1,r=!1)=>r?t?"bg-gray-300 border-gray-300":"bg-gray-200 border-gray-200":t?{default:"bg-gray-600 border-gray-600 hover:bg-gray-700",primary:"bg-blue-600 border-blue-600 hover:bg-blue-700",secondary:"bg-purple-600 border-purple-600 hover:bg-purple-700",success:"bg-green-600 border-green-600 hover:bg-green-700",warning:"bg-amber-500 border-amber-500 hover:bg-amber-600",danger:"bg-red-600 border-red-600 hover:bg-red-700"}[e]:"bg-gray-200 border-gray-200 hover:bg-gray-300",dy=(e=!1)=>`inline-flex items-center gap-2 cursor-pointer select-none ${e?"cursor-not-allowed opacity-60":""}`.trim(),uy=(e="md",t="primary",r=!1,n=!1,s=!1)=>{const a=cr[e].wrapper,o=cy(t,r,n);return`relative inline-flex shrink-0 border-2 rounded-full cursor-pointer ${a} ${o} ${s?"":"transition-colors duration-200 ease-in-out"} focus-within:outline-none focus-within:ring-2 focus-within:ring-offset-2 focus-within:ring-blue-500`.trim()},fy=(e="md",t=!1)=>`font-medium ${cr[e].label} ${t?"text-gray-400":"text-gray-900"}`.trim(),_o=(e="md",t=!1)=>`flex items-center justify-center ${cr[e].startContent} ${t?"text-gray-400":"text-gray-600"}`.trim(),py=(e="md")=>`flex items-center justify-center text-gray-400 ${cr[e].thumbIcon}`.trim(),hy=()=>"sr-only",my=({children:e,value:t,name:r,size:n="md",color:s="primary",thumbIcon:a,startContent:o,endContent:i,isSelected:l,defaultSelected:c=!1,isReadOnly:d=!1,isDisabled:u=!1,disableAnimation:h=!1,className:m="",classNames:g,onChange:w,onValueChange:x,"data-testid":b})=>{const[y,v]=p.useState(c),C=p.useRef(null),S=l!==void 0,j=S?l:y,A=F=>{if(u||d)return;const $=F.target.checked;S||v($),w?.(F),x?.($)},k=()=>{u||d||C.current?.click()},M=[dy(u),g?.base,m].filter(Boolean).join(" "),z=[uy(n,s,j,u,h),g?.wrapper].filter(Boolean).join(" "),I=[fy(n,u),g?.label].filter(Boolean).join(" "),B=[_o(n,u),g?.startContent].filter(Boolean).join(" "),T=[_o(n,u),g?.endContent].filter(Boolean).join(" "),E=[hy(),g?.hiddenInput].filter(Boolean).join(" ");return f.jsxs("label",{className:M,"data-testid":b,children:[o&&f.jsx(_.div,{className:B,"data-testid":`${b}-start-content`,initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:h?0:.2},children:o}),f.jsxs(gy,{className:z,"data-testid":`${b}-wrapper`,children:[f.jsx("input",{ref:C,type:"checkbox",value:t,name:r,checked:j,onChange:A,disabled:u,readOnly:d,"aria-checked":j,className:E,"data-testid":`${b}-input`,onClick:k}),f.jsx(by,{isSelected:j,size:n,thumbIcon:a,disableAnimation:h,className:g?.thumb,"data-testid":`${b}-thumb`,onClick:k})]}),i&&f.jsx(_.div,{className:T,"data-testid":`${b}-end-content`,initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:h?0:.2},children:i}),e&&f.jsx("span",{className:I,"data-testid":`${b}-label`,children:e})]})},gy=({children:e,className:t="",onClick:r,"data-testid":n})=>f.jsx(_.div,{className:t,onClick:r,"data-testid":n,whileHover:{scale:1.02},whileTap:{scale:.98},transition:{duration:.1},children:e}),by=({isSelected:e=!1,size:t="md",thumbIcon:r,disableAnimation:n=!1,className:s="","data-testid":a})=>{const o=cr[t],i=py(t),c=(()=>{const h={sm:40,md:48,lg:56},m={sm:20,md:24,lg:28};return h[t]-m[t]-7})(),u=[`absolute top-0.2 left-0.5 inline-block rounded-full bg-white shadow-lg transform ring-0 flex items-center justify-center ${o.thumb}`,s].filter(Boolean).join(" ");return f.jsx(_.span,{className:u,"data-testid":a,animate:{x:e?c:0},transition:{type:"spring",stiffness:500,damping:30,duration:n?0:void 0},whileHover:{scale:1.1},whileTap:{scale:.95},style:{cursor:"pointer"},children:f.jsx(We,{mode:"wait",children:r&&f.jsx(_.div,{initial:{opacity:0,rotate:-180,scale:.5},animate:{opacity:1,rotate:0,scale:1},exit:{opacity:0,rotate:180,scale:.5},transition:{duration:n?0:.3},children:f.jsx(r,{isSelected:e,className:i})},e?"selected":"unselected")})})},yy=(e,t)=>{if(e==="custom"&&t){const n=t.border??"",s=t.gradient??t.background??"";return[n,s].filter(Boolean).join(" ")}const r={default:"border-gray-200 bg-white dark:border-gray-700 dark:bg-gray-900",primary:"border-blue-200 bg-blue-50 dark:border-blue-800 dark:bg-blue-950",secondary:"border-gray-200 bg-gray-50 dark:border-gray-700 dark:bg-gray-800",success:"border-green-200 bg-green-50 dark:border-green-800 dark:bg-green-950",warning:"border-yellow-200 bg-yellow-50 dark:border-yellow-800 dark:bg-yellow-950",danger:"border-red-200 bg-red-50 dark:border-red-800 dark:bg-red-950",custom:"border-gray-200 bg-white dark:border-gray-700 dark:bg-gray-900"};return r[e]||r.default},xy=e=>{const t={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg"};return t[e]||t.md},vy=e=>{const t={none:"",sm:"shadow-sm",md:"shadow-md",lg:"shadow-lg"};return t[e]||t.sm},wy=(e,t,r,n,s,a)=>{if(s)return"";const o="flex flex-col relative overflow-hidden",i=yy(e,t),l=xy(r),c=vy(n);return[o,i,l,c,a?"w-full":""].filter(Boolean).join(" ")},Cy=(e,t)=>["min-w-full table-auto",e?"table-compact":"",t?"table-striped":""].filter(Boolean).join(" "),ky=(e,t,r,n,s,a)=>{const o=a?.border?`border-b ${a.border} transition-colors`:"border-b border-gray-200 dark:border-gray-700 transition-colors";let i="";e&&(i=a?.selected?a.selected:"bg-blue-50 dark:bg-blue-900/20");const l=!t&&!e?a?.hover||"hover:bg-gray-50 dark:hover:bg-gray-800/50":"";return[o,i,l,t?"opacity-50 cursor-not-allowed":"cursor-pointer"].filter(Boolean).join(" ")},Vc=p.createContext(null),Sy=()=>{const e=p.useContext(Vc);if(!e)throw new Error("Table components must be used within a Table component");return e},jy=({children:e,className:t="",color:r="default",customColor:n,layout:s="auto",radius:a="md",shadow:o="sm",maxTableHeight:i,rowHeight:l,isVirtualized:c=!1,hideHeader:d=!1,isStriped:u=!1,isCompact:h=!1,isHeaderSticky:m=!1,fullWidth:g=!0,removeWrapper:w=!1,topContent:x,bottomContent:b,topContentPlacement:y="outside",bottomContentPlacement:v="outside",showSelectionCheckboxes:C=!1,sortDescriptor:S,selectedKeys:j=new Set,defaultSelectedKeys:A=new Set,disabledKeys:k=new Set,disallowEmptySelection:V=!1,selectionMode:M="none",selectionBehavior:D="toggle",disabledBehavior:z="selection",allowDuplicateSelectionEvents:L=!1,disableAnimation:I=!1,isKeyboardNavigationDisabled:R=!1,loading:B=!1,emptyContent:P,centerHeaderText:T=!1,centerCellText:N=!1,onRowAction:E,onCellAction:F,onSelectionChange:$,onSortChange:O,columns:K,items:W,"data-testid":J,...Y})=>{const Z=p.useMemo(()=>({color:r,customColor:n,selectionMode:M,selectionBehavior:D,selectedKeys:j,disabledKeys:k,sortDescriptor:S,isStriped:u,isCompact:h,disableAnimation:I,showSelectionCheckboxes:C,onRowAction:E,onCellAction:F,onSelectionChange:$,onSortChange:O,centerHeaderText:T,centerCellText:N,columns:K,items:W}),[r,n,M,D,j,k,S,u,h,I,C,E,F,$,O,T,N,K,W]),ne=p.useMemo(()=>wy(r,n,a,o,w,g),[r,n,a,o,w,g]),ae=p.useMemo(()=>Cy(h,u),[h,u]),Te=y==="outside"&&x,he=y==="inside"&&x,at=v==="outside"&&b,Le=v==="inside"&&b,se={...i&&{maxHeight:i,overflowY:"auto"},...c&&l&&{height:i||400}};return f.jsx(Vc.Provider,{value:Z,children:f.jsxs("div",{className:"table-wrapper","data-testid":J,children:[Te&&f.jsx("div",{className:"table-top-content mb-4",children:x}),f.jsxs("div",{className:`${ne} ${t}`.trim(),...Y,children:[he&&f.jsx("div",{className:"table-top-content-inside p-4 border-b border-gray-200 dark:border-gray-700",children:x}),f.jsx("div",{className:"table-container overflow-auto",style:se,children:B?f.jsx("div",{className:"flex items-center justify-center py-12",children:f.jsxs("div",{className:"flex items-center space-x-3",children:[f.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-gray-600 dark:border-gray-300"}),f.jsx("span",{className:"text-gray-600 dark:text-gray-300",children:"Loading..."})]})}):W&&W.length===0?f.jsx("div",{className:"flex items-center justify-center py-12",children:f.jsx("div",{className:"text-center",children:P||f.jsxs("div",{className:"text-gray-500 dark:text-gray-400",children:[f.jsx("div",{className:"text-4xl mb-2",children:"📄"}),f.jsx("div",{className:"text-lg font-medium mb-1",children:"No data available"}),f.jsx("div",{className:"text-sm",children:"There are no items to display"})]})})}):f.jsx("table",{className:`${ae} ${s==="fixed"?"table-fixed":""}`,role:"table","aria-label":"Data table",children:e})}),Le&&f.jsx("div",{className:"table-bottom-content-inside p-4 border-t border-gray-200 dark:border-gray-700",children:b})]}),at&&f.jsx("div",{className:"table-bottom-content mt-4",children:b})]})})},Ty=({children:e,className:t="",textValue:r,item:n,"data-testid":s,...a})=>{const{isStriped:o,selectedKeys:i,disabledKeys:l,onRowAction:c,customColor:d}=Sy(),u=n?.key||n?.id||r,h=u?i==="all"||i.has(u):!1,m=u?l.has(u):!1,g=ky(h,m,o,!1,!0,d),w=()=>{!m&&u&&c&&c(u)};return f.jsx("tr",{className:`${g} ${t}`.trim(),onClick:w,role:"row","aria-selected":h,"aria-disabled":m,"data-testid":s,...a,children:e})},Ay={sm:"p-3 text-sm",md:"p-4 text-base",lg:"p-5 text-lg"},My={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"},Vy=(e,t)=>{const r={solid:{success:"bg-green-500 text-white border-green-500 dark:bg-green-600 dark:border-green-600",error:"bg-red-500 text-white border-red-500 dark:bg-red-600 dark:border-red-600",warning:"bg-yellow-500 text-white border-yellow-500 dark:bg-yellow-600 dark:border-yellow-600",info:"bg-blue-500 text-white border-blue-500 dark:bg-blue-600 dark:border-blue-600",default:"bg-gray-500 text-white border-gray-500 dark:bg-gray-600 dark:border-gray-600"},bordered:{success:"bg-transparent text-green-600 border-green-500 border-2 dark:bg-gray-800 dark:text-green-400 dark:border-green-500",error:"bg-transparent text-red-600 border-red-500 border-2 dark:bg-gray-800 dark:text-red-400 dark:border-red-500",warning:"bg-transparent text-yellow-600 border-yellow-500 border-2 dark:bg-gray-800 dark:text-yellow-400 dark:border-yellow-500",info:"bg-transparent text-blue-600 border-blue-500 border-2 dark:bg-gray-800 dark:text-blue-400 dark:border-blue-500",default:"bg-transparent text-gray-600 border-gray-500 border-2 dark:bg-gray-800 dark:text-gray-300 dark:border-gray-500"},flat:{success:"bg-green-100 text-green-800 border-green-100 dark:bg-green-900/30 dark:text-green-300 dark:border-green-800",error:"bg-red-100 text-red-800 border-red-100 dark:bg-red-900/30 dark:text-red-300 dark:border-red-800",warning:"bg-yellow-100 text-yellow-800 border-yellow-100 dark:bg-yellow-900/30 dark:text-yellow-300 dark:border-yellow-800",info:"bg-blue-100 text-blue-800 border-blue-100 dark:bg-blue-900/30 dark:text-blue-300 dark:border-blue-800",default:"bg-gray-100 text-gray-800 border-gray-100 dark:bg-gray-800 dark:text-gray-300 dark:border-gray-700"},faded:{success:"bg-green-50 text-green-700 border-green-200 dark:bg-green-900/20 dark:text-green-300 dark:border-green-700",error:"bg-red-50 text-red-700 border-red-200 dark:bg-red-900/20 dark:text-red-300 dark:border-red-700",warning:"bg-yellow-50 text-yellow-700 border-yellow-200 dark:bg-yellow-900/20 dark:text-yellow-300 dark:border-yellow-700",info:"bg-blue-50 text-blue-700 border-blue-200 dark:bg-blue-900/20 dark:text-blue-300 dark:border-blue-700",default:"bg-gray-50 text-gray-700 border-gray-200 dark:bg-gray-900 dark:text-gray-300 dark:border-gray-600"},shadow:{success:"bg-white text-green-600 border-green-200 shadow-lg shadow-green-500/25 dark:bg-gray-800 dark:text-green-400 dark:border-green-700 dark:shadow-green-500/10",error:"bg-white text-red-600 border-red-200 shadow-lg shadow-red-500/25 dark:bg-gray-800 dark:text-red-400 dark:border-red-700 dark:shadow-red-500/10",warning:"bg-white text-yellow-600 border-yellow-200 shadow-lg shadow-yellow-500/25 dark:bg-gray-800 dark:text-yellow-400 dark:border-yellow-700 dark:shadow-yellow-500/10",info:"bg-white text-blue-600 border-blue-200 shadow-lg shadow-blue-500/25 dark:bg-gray-800 dark:text-blue-400 dark:border-blue-700 dark:shadow-blue-500/10",default:"bg-white text-gray-600 border-gray-200 shadow-lg shadow-gray-500/25 dark:bg-gray-800 dark:text-gray-300 dark:border-gray-600 dark:shadow-gray-900/25"}};return r[t][e]||r.solid.default},Py=e=>{const t={top:"top-4 left-1/2 transform -translate-x-1/2","top-left":"top-4 left-4","top-right":"top-4 right-4",bottom:"bottom-4 left-1/2 transform -translate-x-1/2","bottom-left":"bottom-4 left-4","bottom-right":"bottom-4 right-4"};return t[e]||t["top-right"]},Ey=e=>{const t={top:{enter:"animate-[toast-slide-in-top_0.3s_ease-out]",exit:"animate-[toast-slide-out-top_0.2s_ease-in]"},"top-left":{enter:"animate-[toast-slide-in-left_0.3s_ease-out]",exit:"animate-[toast-slide-out-left_0.2s_ease-in]"},"top-right":{enter:"animate-[toast-slide-in-right_0.3s_ease-out]",exit:"animate-[toast-slide-out-right_0.2s_ease-in]"},bottom:{enter:"animate-[toast-slide-in-bottom_0.3s_ease-out]",exit:"animate-[toast-slide-out-bottom_0.2s_ease-in]"},"bottom-left":{enter:"animate-[toast-slide-in-left_0.3s_ease-out]",exit:"animate-[toast-slide-out-left_0.2s_ease-in]"},"bottom-right":{enter:"animate-[toast-slide-in-right_0.3s_ease-out]",exit:"animate-[toast-slide-out-right_0.2s_ease-in]"}};return t[e]||t["top-right"]},Iy=e=>{const t={success:"text-green-500 dark:text-green-400",error:"text-red-500 dark:text-red-400",warning:"text-yellow-500 dark:text-yellow-400",info:"text-blue-500 dark:text-blue-400",default:"text-gray-500 dark:text-gray-400"};return t[e]||t.default},Ny=e=>{const t={success:'<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd"></path></svg>',error:'<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z" clip-rule="evenodd"></path></svg>',warning:'<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z" clip-rule="evenodd"></path></svg>',info:'<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"><path fill-rule="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 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z" clip-rule="evenodd"></path></svg>',default:'<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"><path fill-rule="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 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z" clip-rule="evenodd"></path></svg>'};return t[e]||t.default},Ry=()=>`toast-${Date.now()}-${Math.random().toString(36).substring(2,11)}`,Dy=({type:e,customIcon:t})=>{if(t)return f.jsx("div",{className:"flex-shrink-0",children:t});const r=Iy(e),n=Ny(e);return f.jsx("div",{className:`flex-shrink-0 ${r}`,dangerouslySetInnerHTML:{__html:n}})},Pc=({id:e,type:t="default",title:r,description:n,closable:s=!0,action:a,icon:o,size:i="md",variant:l="solid",radius:c="md",position:d="top-right",className:u="",onRemove:h,onClose:m,"data-testid":g})=>{const[w,x]=p.useState(!1),b="flex items-start gap-3 border w-full max-w-sm pointer-events-auto",y=Ay[i],v=My[c],C=Vy(t,l),S=Ey(d),j=[b,y,v,C,w?S.exit:S.enter,u].filter(Boolean).join(" "),A=()=>{m&&m(e),x(!0),setTimeout(()=>{h(e)},200)};return p.useEffect(()=>()=>{},[]),f.jsxs("div",{className:j,"data-testid":g,children:[o!==!1&&f.jsx(Dy,{type:t,customIcon:o}),f.jsxs("div",{className:"flex-1 min-w-0",children:[r&&f.jsx("div",{className:"font-semibold text-sm mb-1 break-words",children:r}),n&&f.jsx("div",{className:"text-sm opacity-90 break-words",children:n}),a&&f.jsx("div",{className:"mt-2",children:a})]}),s&&f.jsx("button",{onClick:A,className:"flex-shrink-0 p-1 rounded-sm opacity-70 hover:opacity-100 transition-opacity focus:outline-none focus:ring-2 focus:ring-current focus:ring-offset-1 dark:focus:ring-offset-gray-800","aria-label":"Close notification",type:"button",children:f.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})},Ec=p.createContext(void 0);function By(e,t){switch(t.type){case"ADD_TOAST":return[...e,t.payload];case"REMOVE_TOAST":return e.filter(r=>r.id!==t.payload);case"REMOVE_ALL_TOASTS":return[];case"UPDATE_TOAST":return e.map(r=>r.id===t.payload.id?{...r,...t.payload.updates}:r);default:return e}}const Ly=({children:e,position:t="top-right",maxToasts:r=5,defaultDuration:n=5e3})=>{const[s,a]=p.useReducer(By,[]),o=p.useCallback(u=>{const h=Ry(),m={type:"default",duration:n,closable:!0,position:t,size:"md",variant:"solid",radius:"md",...u,id:h};return a({type:"ADD_TOAST",payload:m}),m.duration&&m.duration>0&&setTimeout(()=>{a({type:"REMOVE_TOAST",payload:h})},m.duration),h},[n,t]),i=p.useCallback(u=>{a({type:"REMOVE_TOAST",payload:u})},[]),l=p.useCallback(()=>{a({type:"REMOVE_ALL_TOASTS"})},[]),c=p.useCallback((u,h)=>{a({type:"UPDATE_TOAST",payload:{id:u,updates:h}})},[]);p.useEffect(()=>{s.length>r&&s.slice(0,s.length-r).forEach(h=>{a({type:"REMOVE_TOAST",payload:h.id})})},[s,r]);const d={toasts:s,addToast:o,removeToast:i,removeAllToasts:l,updateToast:c};return f.jsx(Ec.Provider,{value:d,children:e})},Ic=()=>{const e=p.useContext(Ec);if(e===void 0)throw new Error("useToastContext must be used within a ToastProvider");return e},Oy=({position:e="top-right",className:t="",maxToasts:r=5,"data-testid":n})=>{const{toasts:s,removeToast:a}=Ic(),o=s.filter(u=>(u.position||e)===e).slice(-r);if(o.length===0)return null;const c=["fixed z-50 flex flex-col gap-2 pointer-events-none",Py(e),t].filter(Boolean).join(" "),d=f.jsx("div",{className:c,"data-testid":n,children:o.map(u=>f.jsx(Pc,{...u,onRemove:a,"data-testid":`toast-${u.id}`},u.id))});return Jn.createPortal(d,document.body)},zy=()=>{const{addToast:e,removeToast:t,removeAllToasts:r,updateToast:n}=Ic(),s=p.useCallback((h,m={})=>e({type:"default",description:h,...m}),[e]),a=p.useCallback((h,m={})=>e({type:"success",description:h,...m}),[e]),o=p.useCallback((h,m={})=>e({type:"error",description:h,duration:m.duration??0,...m}),[e]),i=p.useCallback((h,m={})=>e({type:"warning",description:h,...m}),[e]),l=p.useCallback((h,m={})=>e({type:"info",description:h,...m}),[e]),c=p.useCallback(h=>{t(h)},[t]),d=p.useCallback(()=>{r()},[r]),u=p.useCallback((h,m)=>{n(h,m)},[n]);return{toast:s,success:a,error:o,warning:i,info:l,dismiss:c,dismissAll:d,update:u}},$y=50,Fy={fade:{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2,ease:"easeOut"}},scale:{initial:{opacity:0,scale:.85,transformOrigin:"center"},animate:{opacity:1,scale:1,transformOrigin:"center"},exit:{opacity:0,scale:.85,transformOrigin:"center"},transition:{type:"spring",stiffness:400,damping:25,duration:.15}},shift:{initial:{opacity:0,y:-8},animate:{opacity:1,y:0},exit:{opacity:0,y:-8},transition:{type:"spring",stiffness:500,damping:30}},bounce:{initial:{opacity:0,scale:.3,y:-20},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.8,y:-10},transition:{type:"spring",stiffness:400,damping:12,bounce:.6}},rotate:{initial:{opacity:0,scale:.8,rotate:-10},animate:{opacity:1,scale:1,rotate:0},exit:{opacity:0,scale:.8,rotate:10},transition:{type:"spring",stiffness:300,damping:20}},slide:{initial:{opacity:0,x:-20,scale:.95},animate:{opacity:1,x:0,scale:1},exit:{opacity:0,x:20,scale:.95},transition:{type:"spring",stiffness:400,damping:25}},zoom:{initial:{opacity:0,scale:.5},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.3},transition:{type:"spring",stiffness:600,damping:20}},flip:{initial:{opacity:0,rotateX:-90,scale:.9},animate:{opacity:1,rotateX:0,scale:1},exit:{opacity:0,rotateX:90,scale:.9},transition:{type:"spring",stiffness:300,damping:25}},elastic:{initial:{opacity:0,scale:.6,y:-30},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.8,y:-15},transition:{type:"spring",stiffness:200,damping:8,bounce:.8}},none:{initial:{opacity:1},animate:{opacity:1},exit:{opacity:1},transition:{duration:0}}},Wy=H({base:["relative","px-2","py-1","rounded-md","text-sm","font-medium","shadow-lg","border","pointer-events-auto","max-w-xs","break-words","z-50"],variants:{size:{xs:"px-1.5 py-0.5 text-xs max-w-36",sm:"px-2 py-1 text-sm max-w-48",md:"px-3 py-1.5 text-sm max-w-xs",lg:"px-4 py-2 text-base max-w-sm"},variant:{dark:["bg-gray-900","text-white","border-gray-700","shadow-lg"],light:["bg-white","text-gray-900","border-gray-200","shadow-lg"],primary:["bg-blue-600","text-white","border-blue-500","shadow-lg"],success:["bg-green-600","text-white","border-green-500","shadow-lg"],warning:["bg-yellow-500","text-yellow-900","border-yellow-400","shadow-lg"],error:["bg-red-600","text-white","border-red-500","shadow-lg"]}},defaultVariants:{size:"md",variant:"dark"}}),_y=H({base:["absolute","border-solid","border-transparent"],variants:{placement:{top:"bottom-full left-1/2 -translate-x-1/2 border-b-6","top-start":"bottom-full left-2 border-b-6","top-end":"bottom-full right-2 border-b-6",bottom:"top-full left-1/2 -translate-x-1/2 border-t-6","bottom-start":"top-full left-2 border-t-6","bottom-end":"top-full right-2 border-t-6",left:"right-full top-1/2 -translate-y-1/2 border-r-6","left-start":"right-full top-2 border-r-6","left-end":"right-full bottom-2 border-r-6",right:"left-full top-1/2 -translate-y-1/2 border-l-6","right-start":"left-full top-2 border-l-6","right-end":"left-full bottom-2 border-l-6"},variant:{dark:"",light:"",primary:"",success:"",warning:"",error:""},size:{xs:"border-[4px]",sm:"border-[5px]",md:"border-[6px]",lg:"border-[7px]"}},compoundVariants:[{placement:["top","top-start","top-end"],variant:"dark",className:"border-b-gray-900"},{placement:["top","top-start","top-end"],variant:"light",className:"border-b-white"},{placement:["top","top-start","top-end"],variant:"primary",className:"border-b-blue-600"},{placement:["top","top-start","top-end"],variant:"success",className:"border-b-green-600"},{placement:["top","top-start","top-end"],variant:"warning",className:"border-b-yellow-500"},{placement:["top","top-start","top-end"],variant:"error",className:"border-b-red-600"},{placement:["bottom","bottom-start","bottom-end"],variant:"dark",className:"border-t-gray-900"},{placement:["bottom","bottom-start","bottom-end"],variant:"light",className:"border-t-white"},{placement:["bottom","bottom-start","bottom-end"],variant:"primary",className:"border-t-blue-600"},{placement:["bottom","bottom-start","bottom-end"],variant:"success",className:"border-t-green-600"},{placement:["bottom","bottom-start","bottom-end"],variant:"warning",className:"border-t-yellow-500"},{placement:["bottom","bottom-start","bottom-end"],variant:"error",className:"border-t-red-600"},{placement:["left","left-start","left-end"],variant:"dark",className:"border-r-gray-900"},{placement:["left","left-start","left-end"],variant:"light",className:"border-r-white"},{placement:["left","left-start","left-end"],variant:"primary",className:"border-r-blue-600"},{placement:["left","left-start","left-end"],variant:"success",className:"border-r-green-600"},{placement:["left","left-start","left-end"],variant:"warning",className:"border-r-yellow-500"},{placement:["left","left-start","left-end"],variant:"error",className:"border-r-red-600"},{placement:["right","right-start","right-end"],variant:"dark",className:"border-l-gray-900"},{placement:["right","right-start","right-end"],variant:"light",className:"border-l-white"},{placement:["right","right-start","right-end"],variant:"primary",className:"border-l-blue-600"},{placement:["right","right-start","right-end"],variant:"success",className:"border-l-green-600"},{placement:["right","right-start","right-end"],variant:"warning",className:"border-l-yellow-500"},{placement:["right","right-start","right-end"],variant:"error",className:"border-l-red-600"}],defaultVariants:{placement:"top",variant:"dark",size:"md"}}),Gy=H({base:["fixed","pointer-events-none","z-50"],variants:{visible:{true:"pointer-events-auto",false:"pointer-events-none"}},defaultVariants:{visible:!1}}),Go=H({base:["inline-block","cursor-help"],variants:{active:{true:"relative",false:""},disabled:{true:"cursor-not-allowed opacity-50",false:""}},defaultVariants:{active:!1,disabled:!1}}),Uy=(e,t,r)=>{let n={...Fy[e]};if((e==="shift"||e==="slide"||e==="bounce")&&t){const s=Hy(t),a=Xy[e];a&&a[s]&&(n={...a[s]})}return n},Ky=e=>Uo[e]||Uo.fade,Hy=e=>e.startsWith("top")?"top":e.startsWith("bottom")?"bottom":e.startsWith("left")?"left":e.startsWith("right")?"right":"top",Xy={shift:{top:{initial:{opacity:0,y:8,scale:.98},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:8,scale:.98},transition:{type:"spring",stiffness:400,damping:25}},"top-start":{initial:{opacity:0,y:8,x:-4,scale:.98},animate:{opacity:1,y:0,x:0,scale:1},exit:{opacity:0,y:8,x:-4,scale:.98},transition:{type:"spring",stiffness:400,damping:25}},"top-end":{initial:{opacity:0,y:8,x:4,scale:.98},animate:{opacity:1,y:0,x:0,scale:1},exit:{opacity:0,y:8,x:4,scale:.98},transition:{type:"spring",stiffness:400,damping:25}},bottom:{initial:{opacity:0,y:-8,scale:.98},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-8,scale:.98},transition:{type:"spring",stiffness:400,damping:25}},"bottom-start":{initial:{opacity:0,y:-8,x:-4,scale:.98},animate:{opacity:1,y:0,x:0,scale:1},exit:{opacity:0,y:-8,x:-4,scale:.98},transition:{type:"spring",stiffness:400,damping:25}},"bottom-end":{initial:{opacity:0,y:-8,x:4,scale:.98},animate:{opacity:1,y:0,x:0,scale:1},exit:{opacity:0,y:-8,x:4,scale:.98},transition:{type:"spring",stiffness:400,damping:25}},left:{initial:{opacity:0,x:8,scale:.98},animate:{opacity:1,x:0,scale:1},exit:{opacity:0,x:8,scale:.98},transition:{type:"spring",stiffness:400,damping:25}},"left-start":{initial:{opacity:0,x:8,y:-4,scale:.98},animate:{opacity:1,x:0,y:0,scale:1},exit:{opacity:0,x:8,y:-4,scale:.98},transition:{type:"spring",stiffness:400,damping:25}},"left-end":{initial:{opacity:0,x:8,y:4,scale:.98},animate:{opacity:1,x:0,y:0,scale:1},exit:{opacity:0,x:8,y:4,scale:.98},transition:{type:"spring",stiffness:400,damping:25}},right:{initial:{opacity:0,x:-8,scale:.98},animate:{opacity:1,x:0,scale:1},exit:{opacity:0,x:-8,scale:.98},transition:{type:"spring",stiffness:400,damping:25}},"right-start":{initial:{opacity:0,x:-8,y:-4,scale:.98},animate:{opacity:1,x:0,y:0,scale:1},exit:{opacity:0,x:-8,y:-4,scale:.98},transition:{type:"spring",stiffness:400,damping:25}},"right-end":{initial:{opacity:0,x:-8,y:4,scale:.98},animate:{opacity:1,x:0,y:0,scale:1},exit:{opacity:0,x:-8,y:4,scale:.98},transition:{type:"spring",stiffness:400,damping:25}}},slide:{top:{initial:{opacity:0,y:20,x:-10},animate:{opacity:1,y:0,x:0},exit:{opacity:0,y:20,x:10},transition:{type:"spring",stiffness:300,damping:20}},bottom:{initial:{opacity:0,y:-20,x:-10},animate:{opacity:1,y:0,x:0},exit:{opacity:0,y:-20,x:10},transition:{type:"spring",stiffness:300,damping:20}},left:{initial:{opacity:0,x:20,y:-10},animate:{opacity:1,x:0,y:0},exit:{opacity:0,x:20,y:10},transition:{type:"spring",stiffness:300,damping:20}},right:{initial:{opacity:0,x:-20,y:-10},animate:{opacity:1,x:0,y:0},exit:{opacity:0,x:-20,y:10},transition:{type:"spring",stiffness:300,damping:20}}},bounce:{top:{initial:{opacity:0,y:30,scale:.6},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:15,scale:.8},transition:{type:"spring",stiffness:400,damping:12,bounce:.7}},bottom:{initial:{opacity:0,y:-30,scale:.6},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-15,scale:.8},transition:{type:"spring",stiffness:400,damping:12,bounce:.7}},left:{initial:{opacity:0,x:30,scale:.6},animate:{opacity:1,x:0,scale:1},exit:{opacity:0,x:15,scale:.8},transition:{type:"spring",stiffness:400,damping:12,bounce:.7}},right:{initial:{opacity:0,x:-30,scale:.6},animate:{opacity:1,x:0,scale:1},exit:{opacity:0,x:-15,scale:.8},transition:{type:"spring",stiffness:400,damping:12,bounce:.7}}}},Uo={fade:{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2,delay:.05}},scale:{initial:{opacity:0,scale:.5},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.5},transition:{type:"spring",stiffness:600,damping:25,delay:.05}},shift:{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{type:"spring",stiffness:500,damping:30,delay:.05}},bounce:{initial:{opacity:0,scale:.3},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.6},transition:{type:"spring",stiffness:400,damping:15,bounce:.5,delay:.1}},rotate:{initial:{opacity:0,scale:.5,rotate:-45},animate:{opacity:1,scale:1,rotate:0},exit:{opacity:0,scale:.5,rotate:45},transition:{type:"spring",stiffness:300,damping:20,delay:.05}},slide:{initial:{opacity:0,scale:.7},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.7},transition:{type:"spring",stiffness:400,damping:25,delay:.05}},zoom:{initial:{opacity:0,scale:.2},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.2},transition:{type:"spring",stiffness:700,damping:20,delay:.05}},flip:{initial:{opacity:0,rotateX:-90,scale:.8},animate:{opacity:1,rotateX:0,scale:1},exit:{opacity:0,rotateX:90,scale:.8},transition:{type:"spring",stiffness:300,damping:25,delay:.05}},elastic:{initial:{opacity:0,scale:.4},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.7},transition:{type:"spring",stiffness:200,damping:8,bounce:.8,delay:.1}},none:{initial:{opacity:1},animate:{opacity:1},exit:{opacity:1},transition:{duration:0}}},Yy={enter:.15},Nc=700,Rc=300,Dc=!1,Bc=p.createContext({delayDuration:Nc,skipDelayDuration:Rc,disableHoverableContent:Dc,isPointerInTransit:!1,setIsPointerInTransit:()=>{}}),qy=()=>p.useContext(Bc),Zy=({children:e,delayDuration:t=Nc,skipDelayDuration:r=Rc,disableHoverableContent:n=Dc})=>{const[s,a]=p.useState(!1),o={delayDuration:t,skipDelayDuration:r,disableHoverableContent:n,isPointerInTransit:s,setIsPointerInTransit:a};return f.jsx(Bc.Provider,{value:o,children:e})},Ko=(e,t,r,n={mainAxis:8,crossAxis:0})=>{const s=e.getBoundingClientRect(),a=t.getBoundingClientRect(),o={width:window.innerWidth,height:window.innerHeight};let i=0,l=0;switch(r.split("-")[0]){case"top":i=s.left+s.width/2-a.width/2,l=s.top-a.height-n.mainAxis;break;case"bottom":i=s.left+s.width/2-a.width/2,l=s.bottom+n.mainAxis;break;case"left":i=s.left-a.width-n.mainAxis,l=s.top+s.height/2-a.height/2;break;case"right":i=s.right+n.mainAxis,l=s.top+s.height/2-a.height/2;break}r.includes("-start")?r.startsWith("top")||r.startsWith("bottom")?i=s.left+n.crossAxis:l=s.top+n.crossAxis:r.includes("-end")&&(r.startsWith("top")||r.startsWith("bottom")?i=s.right-a.width-n.crossAxis:l=s.bottom-a.height-n.crossAxis);let c=r;return i<8?i=8:i+a.width>o.width-8&&(i=o.width-a.width-8),l<8?r.startsWith("top")&&s.bottom+a.height+n.mainAxis<o.height?(c=r.replace("top","bottom"),l=s.bottom+n.mainAxis):l=8:l+a.height>o.height-8&&(r.startsWith("bottom")&&s.top-a.height-n.mainAxis>0?(c=r.replace("bottom","top"),l=s.top-a.height-n.mainAxis):l=o.height-a.height-8),{x:i,y:l,placement:c}},Jy=e=>{const{placement:t="top",trigger:r="hover",disabled:n=!1,open:s,defaultOpen:a=!1,onOpenChange:o,delay:i,offset:l={mainAxis:8,crossAxis:0}}=e,c=qy(),d={show:i?.show??(r==="hover"?c?.delayDuration??700:0),hide:i?.hide??(r==="hover"?150:0)},u={mainAxis:l?.mainAxis??8,crossAxis:l?.crossAxis??0},[h,m]=p.useState(a),[g,w]=p.useState(null),[x,b]=p.useState(null),[y,v]=p.useState({x:0,y:0,placement:t}),C=p.useRef(void 0),S=p.useRef(void 0),j=p.useId(),A=s!==void 0,k=A?s:h;p.useEffect(()=>{if(g&&x&&k){const L=Ko(g,x,t,u);v(L)}},[g,x,k,t,u]),p.useEffect(()=>{if(!k||!g||!x)return;const L=()=>{const I=Ko(g,x,t,u);v(I)};return window.addEventListener("resize",L),window.addEventListener("scroll",L,!0),()=>{window.removeEventListener("resize",L),window.removeEventListener("scroll",L,!0)}},[k,g,x,t,l]);const V=p.useCallback(()=>{if(n)return;S.current&&(window.clearTimeout(S.current),S.current=void 0);const L=d.show;L>0?C.current=window.setTimeout(()=>{A?o?.(!0):m(!0)},L):A?o?.(!0):m(!0)},[n,d.show,A,o]),M=p.useCallback(()=>{C.current&&(window.clearTimeout(C.current),C.current=void 0);const L=d.hide;L>0?S.current=window.setTimeout(()=>{A?o?.(!1):m(!1)},L):A?o?.(!1):m(!1)},[d.hide,A,o]),D=p.useCallback(()=>{k?M():V()},[k,V,M]);p.useEffect(()=>()=>{C.current&&window.clearTimeout(C.current),S.current&&window.clearTimeout(S.current)},[]);const z=p.useCallback(()=>{const L={"aria-describedby":k?j:void 0};if(n)return L;switch(r){case"hover":return{...L,onMouseEnter:V,onMouseLeave:M};case"click":return{...L,onClick:D};case"focus":return{...L,onFocus:V,onBlur:M};case"manual":return L;default:return L}},[n,r,j,k,V,M,D]);return{isOpen:k,referenceElement:g,setReferenceElement:w,tooltipElement:x,setTooltipElement:b,position:y,id:j,getTriggerProps:z,openTooltip:V,closeTooltip:M,toggleTooltip:D}},Qy=({variant:e="dark",size:t="md",placement:r,animation:n="fade",className:s})=>{const a=Ky(n);return f.jsx(_.div,{className:_y({placement:r,variant:e,size:t,className:s}),initial:a.initial,animate:a.animate,exit:a.exit,transition:a.transition})},ex=({content:e,variant:t="dark",size:r="md",animation:n="fade",arrow:s={enabled:!0},className:a,style:o,id:i,isOpen:l,position:c,onRef:d})=>{const u=()=>Uy(n,c.placement);return f.jsx(We,{children:l&&f.jsxs(_.div,{ref:d,id:i,role:"tooltip",className:Wy({size:r,variant:t,className:a}),style:{position:"fixed",left:c.x,top:c.y,...o},initial:u().initial,animate:u().animate,exit:u().exit,transition:{duration:Yy.enter,ease:"easeOut"},children:[e,s?.enabled&&f.jsx(Qy,{variant:t,size:r,placement:c.placement,animation:n})]})})},tx=e=>{const{children:t,content:r,disabled:n=!1,portal:s=!0,portalContainer:a,asChild:o=!1,className:i,style:l,variant:c="dark",size:d="md",animation:u="fade",arrow:h={enabled:!0},zIndex:m=$y,"aria-label":g}=e,{isOpen:w,setReferenceElement:x,setTooltipElement:b,position:y,id:v,getTriggerProps:C}=Jy(e),S=()=>{const A=C();if(o&&p.isValidElement(t)){const k=t.props,V={...k,...A,ref:M=>{x(M),typeof k.ref=="function"?k.ref(M):k.ref?.current!==void 0&&(k.ref.current=M)},className:Go({active:w,disabled:n,className:k.className})};return p.createElement(t.type,V)}return f.jsx("span",{ref:x,className:Go({active:w,disabled:n,className:i}),style:l,"aria-label":g,...A,children:t})},j=()=>{const A=f.jsx("div",{className:Gy({visible:w}),style:{zIndex:m},children:f.jsx(ex,{content:r,variant:c,size:d,animation:u,arrow:h,id:v,isOpen:w,position:y,onRef:b})});if(s){const k=a||document.body;return Jn.createPortal(A,k)}return A};return f.jsxs(f.Fragment,{children:[S(),j()]})},rx=(e=!1)=>{const t=["flex items-center gap-3","max-w-fit"];return e&&t.push("cursor-pointer","rounded-lg","px-2 py-1","transition-all duration-200 ease-in-out","hover:bg-gray-100 dark:hover:bg-gray-800","focus:outline-none","focus:ring-2 focus:ring-blue-500 focus:ring-offset-2","data-[focus-visible]:ring-2 data-[focus-visible]:ring-blue-500"),t.join(" ")},nx=()=>["flex flex-col","justify-center","min-w-0"].join(" "),sx=()=>["text-sm font-medium","text-gray-900 dark:text-white","truncate"].join(" "),ax=()=>["text-xs","text-gray-500 dark:text-gray-400","truncate"].join(" "),ox=(e="md")=>({sm:"w-8 h-8 text-xs",md:"w-10 h-10 text-sm",lg:"w-12 h-12 text-base"})[e],ix=(e="default")=>({default:"bg-gray-200 text-gray-800 dark:bg-gray-700 dark:text-gray-200",primary:"bg-blue-500 text-white",secondary:"bg-purple-500 text-white",success:"bg-green-500 text-white",warning:"bg-yellow-500 text-white",danger:"bg-red-500 text-white"})[e],lx=(e="md",t="default",r=!1,n=!1)=>{const s=["inline-flex items-center justify-center","overflow-hidden","select-none","flex-shrink-0",ox(e),ix(t)];return r?s.push("rounded-md"):s.push("rounded-full"),n&&s.push("opacity-50 cursor-not-allowed"),s.join(" ")},cx=e=>e.split(" ").map(t=>t.charAt(0)).join("").toUpperCase().slice(0,2),dx=()=>["w-full h-full","object-cover","rounded-inherit"].join(" "),Lc=p.forwardRef(({src:e,alt:t,name:r="",size:n="md",className:s="",isSquared:a=!1,color:o="default",isDisabled:i=!1,fallback:l,...c},d)=>{const[u,h]=p.useState(!1),g=[lx(n,o,a,i),s].filter(Boolean).join(" "),w=()=>{h(!0)},x=()=>l||(e&&!u?f.jsx("img",{src:e,alt:t||r,className:dx(),onError:w}):r?f.jsx("span",{children:cx(r)}):f.jsx("svg",{className:"w-full h-full p-1",fill:"currentColor",viewBox:"0 0 20 20",children:f.jsx("path",{fillRule:"evenodd",d:"M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z",clipRule:"evenodd"})}));return f.jsx("div",{ref:d,className:g,...c,children:x()})});Lc.displayName="Avatar";const Oc=p.forwardRef(({name:e,description:t,isFocusable:r=!1,avatarProps:n={},className:s="",classNames:a,onClick:o,"data-testid":i,...l},c)=>{const u=[rx(r),a?.base,s].filter(Boolean).join(" "),m=[nx(),a?.wrapper].filter(Boolean).join(" "),w=[sx(),a?.name].filter(Boolean).join(" "),b=[ax(),a?.description].filter(Boolean).join(" "),y=()=>{r&&o&&o()},v=C=>{r&&(C.key==="Enter"||C.key===" ")&&(C.preventDefault(),o?.())};return f.jsxs("div",{ref:c,className:u,onClick:y,onKeyDown:v,tabIndex:r?0:void 0,role:r?"button":void 0,"data-testid":i,...l,children:[f.jsx(Lc,{...n,name:n.name||e,"data-testid":i?`${i}-avatar`:void 0}),(e||t)&&f.jsxs("div",{className:m,children:[e&&f.jsx("span",{className:w,"data-testid":i?`${i}-name`:void 0,children:e}),t&&f.jsx("span",{className:b,"data-testid":i?`${i}-description`:void 0,children:t})]})]})});Oc.displayName="User";const zc=p.createContext(void 0),Ks=()=>{const e=p.useContext(zc);if(!e)throw new Error("useSidebar must be used within a SidebarProvider");return e},ux=({children:e})=>{const[t,r]=p.useState(!1),[n,s]=p.useState(!1);p.useEffect(()=>{const c=()=>{s(window.innerWidth<768)};return c(),window.addEventListener("resize",c),()=>window.removeEventListener("resize",c)},[]);const a=p.useCallback(()=>{r(c=>!c)},[]),o=p.useCallback(()=>{r(!0)},[]),i=p.useCallback(()=>{r(!1)},[]);p.useEffect(()=>(t&&n?document.body.style.overflow="hidden":document.body.style.overflow="unset",()=>{document.body.style.overflow="unset"}),[t,n]);const l={isOpen:t,isMobile:n,toggle:a,open:o,close:i};return f.jsx(zc.Provider,{value:l,children:e})},fx=({children:e,className:t="",width:r=280,position:n="left",variant:s="temporary",backdrop:a=!0,closeOnBackdropClick:o=!0,closeOnEscape:i=!0})=>{const{isOpen:l,isMobile:c,close:d}=Ks();p.useEffect(()=>{if(!i||!l)return;const b=y=>{y.key==="Escape"&&d()};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[i,l,d]);const u=()=>{o&&d()},h={open:{x:0,transition:{type:"spring",stiffness:300,damping:30}},closed:{x:n==="left"?-r:r,transition:{type:"spring",stiffness:300,damping:30}}},m={open:{opacity:1,transition:{duration:.2}},closed:{opacity:0,transition:{duration:.2}}},g=()=>s==="permanent"||s==="persistent"&&!c?!0:l,w=()=>a&&l&&(c||s==="temporary"),x=["fixed top-0 z-40 h-full","bg-white dark:bg-gray-800","border-gray-200 dark:border-gray-700","shadow-lg dark:shadow-2xl",n==="left"?"left-0 border-r":"right-0 border-l",s==="permanent"&&"lg:relative lg:translate-x-0",s==="persistent"&&!c&&"md:relative md:translate-x-0",t].filter(Boolean).join(" ");return f.jsxs(f.Fragment,{children:[f.jsx(We,{children:w()&&f.jsx(_.div,{initial:"closed",animate:"open",exit:"closed",variants:m,className:"fixed inset-0 z-30 bg-black/50 backdrop-blur-sm",onClick:u,role:"button",tabIndex:-1,"aria-label":"Close sidebar"})}),f.jsx(We,{mode:"wait",children:g()&&f.jsx(_.aside,{initial:"closed",animate:"open",exit:"closed",variants:h,className:x,style:{width:typeof r=="number"?`${r}px`:r},role:"complementary","aria-label":"Sidebar navigation",children:f.jsx("div",{className:"flex flex-col h-full",children:e})})})]})},px=({children:e,className:t="",showCloseButton:r=!1,onClose:n})=>{const s=["flex items-center justify-between","px-4 py-3","border-b border-gray-200 dark:border-gray-700","bg-gray-50 dark:bg-gray-900",t].filter(Boolean).join(" ");return f.jsxs("div",{className:s,children:[f.jsx("div",{className:"flex-1",children:e}),r&&f.jsx("button",{onClick:n,className:"ml-2 p-1 rounded-md hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors","aria-label":"Close sidebar",children:f.jsx("svg",{className:"w-5 h-5 text-gray-500 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})},hx=({children:e,className:t=""})=>{const r=["flex-1 overflow-y-auto","px-4 py-2","scrollbar-thin scrollbar-thumb-gray-300 dark:scrollbar-thumb-gray-600","scrollbar-track-gray-100 dark:scrollbar-track-gray-800",t].filter(Boolean).join(" ");return f.jsx("div",{className:r,children:e})},mx=({children:e,className:t=""})=>{const r=["flex items-center","px-4 py-3","border-t border-gray-200 dark:border-gray-700","bg-gray-50 dark:bg-gray-900",t].filter(Boolean).join(" ");return f.jsx("div",{className:r,children:e})},gx=({children:e,icon:t,isActive:r=!1,href:n,to:s,onClick:a,className:o="",disabled:i=!1})=>{const l=s||n,c=["flex items-center gap-3","px-3 py-2 mx-2 my-1","rounded-lg","text-sm font-medium","transition-colors duration-200","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-1","dark:focus:ring-offset-gray-800"],d=i?["text-gray-400 dark:text-gray-600","cursor-not-allowed"]:r?["bg-blue-100 dark:bg-blue-900/30","text-blue-900 dark:text-blue-100","border-l-4 border-blue-500","pl-2 ml-2"]:["text-gray-700 dark:text-gray-300","hover:bg-gray-100 dark:hover:bg-gray-700","hover:text-gray-900 dark:hover:text-white"],u=[...c,...d,o].filter(Boolean).join(" "),h=f.jsxs(f.Fragment,{children:[t&&f.jsx("span",{className:`flex-shrink-0 ${i?"opacity-50":""}`,children:t}),f.jsx("span",{className:"flex-1 truncate",children:e})]}),m={className:u,onClick:i?void 0:a,"aria-disabled":i,role:l?"link":"button"};if(l&&!i){if(s)return f.jsx(Yr,{to:s,className:u,onClick:a,children:h});if(n)return f.jsx("a",{href:n,...m,children:h})}return f.jsx("button",{type:"button",...m,disabled:i,children:h})},bx=({children:e,className:t="","aria-label":r="Toggle sidebar"})=>{const{isOpen:n,toggle:s}=Ks(),a=["inline-flex items-center justify-center","w-10 h-10","rounded-md","text-gray-500 dark:text-gray-400","hover:bg-gray-100 dark:hover:bg-gray-700","hover:text-gray-900 dark:hover:text-white","focus:outline-none focus:ring-2 focus:ring-blue-500","transition-colors duration-200",t].filter(Boolean).join(" ");return f.jsx("button",{onClick:s,className:a,"aria-label":r,"aria-expanded":n,children:e||f.jsx(_.div,{animate:{rotate:n?180:0},transition:{duration:.2},children:f.jsx(yx,{})})})},yx=()=>f.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})}),xx=p.createContext(null),$c=()=>{const e=p.useContext(xx);if(!e)throw new Error("useLibraryRouter must be used within a LibraryRouterProvider");return e},vx=({routes:e,className:t="",renderItem:r})=>{const{currentPath:n}=$c(),s=(a,o)=>f.jsxs(Yr,{to:a.path,className:`flex items-center gap-3 px-3 py-2 mx-2 my-1 rounded-lg text-sm font-medium transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-1 dark:focus:ring-offset-gray-800 ${o?"bg-blue-100 dark:bg-blue-900/30 text-blue-900 dark:text-blue-100 border-l-4 border-blue-500 pl-2 ml-2":"text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 hover:text-gray-900 dark:hover:text-white"}`,children:[a.icon&&f.jsx("span",{className:"flex-shrink-0",children:a.icon}),f.jsx("span",{className:"flex-1 truncate",children:a.label})]},a.path);return f.jsx("nav",{className:t,children:e.map(a=>f.jsxs("div",{className:"pb-2",children:[f.jsx("h3",{className:"px-3 py-2 text-xs font-semibold text-gray-500 dark:text-gray-400 uppercase tracking-wider",children:a.label}),f.jsx("div",{className:"space-y-1",children:a.routes.map(o=>{const i=o.exact?n===o.path:n.startsWith(o.path);return r?r(o,i):s(o,i)})})]},a.label))})},wx=()=>{const{navigate:e,goBack:t,goForward:r,currentPath:n,routes:s}=$c(),a=p.useCallback((c,d)=>{d?window.history.replaceState(null,"",c):e(c)},[e]),o=p.useCallback((c,d=!1)=>d?n===c:n.startsWith(c),[n]),i=p.useCallback(()=>s.find(c=>c.exact?n===c.path:n.startsWith(c.path)),[s,n]),l=p.useCallback(c=>s.find(d=>d.path===c),[s]);return{navigateTo:a,goBack:t,goForward:r,isActive:o,currentPath:n,getCurrentRoute:i,getRouteByPath:l,routes:s}},Cx=(e,t)=>e.toLowerCase().includes(t.toLowerCase());function kx(e){return e?Array.from(e):[]}function yn(e){if(typeof e=="object"&&e!==null){const t=e;return t.textValue||t.label||t.value||t.title||String(t.key||"")}return String(e)}function bt(e,t){if(typeof e=="object"&&e!==null){const r=e;return r.key??r.id??t}return t}function Fc(e){const{items:t,defaultItems:r,inputValue:n,defaultInputValue:s="",selectedKey:a,defaultSelectedKey:o,menuTrigger:i="input",allowsCustomValue:l=!1,allowsEmptyCollection:c=!0,shouldCloseOnBlur:d=!0,defaultFilter:u=Cx,filterOptions:h,isDisabled:m=!1,isReadOnly:g=!1,autoFocus:w=!1,onInputChange:x,onSelectionChange:b,onOpenChange:y,onFocus:v,onBlur:C,onFocusChange:S,onKeyDown:j,onKeyUp:A,onClose:k,onClear:V,...M}=e,D=p.useRef(null),z=p.useRef(null),[L,I]=p.useState(s),[R,B]=p.useState(o||null),[P,T]=p.useState(!1),[N]=p.useState(!1),[E,F]=p.useState(null),$=n??L,O=a??R,K=p.useMemo(()=>kx(t??r),[t,r]),W=p.useMemo(()=>!$.trim()&&i!=="focus"?c?K:[]:$.trim()?K.filter(Q=>{const de=yn(Q);return u(de,$)}):K,[K,$,u,c,i]),J=p.useCallback(Q=>{if(n===void 0&&I(Q),x?.(Q),i==="input"&&Q.trim()&&!P&&(T(!0),y?.(!0,"input")),O!==null&&!l){const de=K.find((ge,_e)=>bt(ge,_e)===O);de&&yn(de)!==Q&&(a===void 0&&B(null),b?.(null))}},[n,x,i,P,y,O,l,K,a,b]),Y=p.useCallback(Q=>{a===void 0&&B(Q),b?.(Q);const de=K.find((ge,_e)=>bt(ge,_e)===Q);if(de){const ge=yn(de);J(ge)}T(!1),y?.(!1),k?.()},[a,b,K,J,y,k]),Z=p.useCallback((Q,de)=>{T(Q),y?.(Q,de),Q||(F(null),k?.())},[y,k]),ne=p.useCallback(Q=>{if(j?.(Q),!(m||g))switch(Q.key){case"ArrowDown":if(Q.preventDefault(),!P)T(!0),y?.(!0,"manual");else{const de=E!==null?W.findIndex((_e,Lt)=>bt(_e,Lt)===E):-1,ge=de<W.length-1?de+1:0;W[ge]&&F(bt(W[ge],ge))}break;case"ArrowUp":if(Q.preventDefault(),!P)T(!0),y?.(!0,"manual");else{const de=E!==null?W.findIndex((_e,Lt)=>bt(_e,Lt)===E):W.length,ge=de>0?de-1:W.length-1;W[ge]&&F(bt(W[ge],ge))}break;case"Enter":Q.preventDefault(),P&&E!==null&&Y(E);break;case"Escape":Q.preventDefault(),P&&(T(!1),y?.(!1),k?.());break;case"Tab":P&&(T(!1),y?.(!1),k?.());break}},[j,m,g,P,y,E,W,Y,k]),ae=p.useCallback(Q=>{v?.(Q),S?.(!0),i==="focus"&&!P&&(T(!0),y?.(!0,"focus"))},[v,S,i,P,y]),Te=p.useCallback(Q=>{C?.(Q),S?.(!1),d&&P&&setTimeout(()=>{T(!1),y?.(!1),k?.()},150)},[C,S,d,P,y,k]),he=p.useCallback(()=>{J(""),a===void 0&&B(null),b?.(null),V?.(),D.current&&D.current.focus()},[J,a,b,V]),at=p.useCallback(Q=>{Y(Q)},[Y]),Le=p.useCallback(()=>{P||Z(!0,"manual")},[P,Z]),se=p.useCallback(()=>{P&&Z(!1)},[P,Z]);p.useEffect(()=>{w&&D.current&&D.current.focus()},[w]),p.useEffect(()=>{const Q=de=>{P&&z.current&&!z.current.contains(de.target)&&(T(!1),y?.(!1),k?.())};if(P)return document.addEventListener("mousedown",Q),()=>{document.removeEventListener("mousedown",Q)}},[P,y,k]);const{size:Se,...ye}=M,Ze=p.useMemo(()=>({...ye,ref:D,value:$,onChange:Q=>J(Q.target.value),onFocus:ae,onBlur:Te,onKeyDown:ne,onKeyUp:A,disabled:m,readOnly:g,"aria-expanded":P,"aria-haspopup":"listbox","aria-autocomplete":"list",role:"combobox"}),[ye,$,J,ae,Te,ne,A,m,g,P]),Oe=p.useMemo(()=>({role:"listbox","aria-label":"Suggestions"}),[]),Zr=p.useMemo(()=>({isOpen:P,onOpenChange:Z}),[P,Z]),ur=p.useMemo(()=>({type:"button",onClick:he,"aria-label":"Clear",tabIndex:-1}),[he]),Ae=p.useMemo(()=>({type:"button",onClick:()=>{P?se():Le()},"aria-label":P?"Close menu":"Open menu","aria-expanded":P,tabIndex:-1}),[P,se,Le]);return{inputValue:$,selectedKey:O,isOpen:P,isLoading:N,filteredItems:W,focusedKey:E,inputProps:Ze,listboxProps:Oe,popoverProps:Zr,clearButtonProps:ur,selectorButtonProps:Ae,containerRef:z,clearValue:he,selectItem:at,close:se,open:Le,setInputValue:J,setSelectedKey:Q=>{Q===null?(a===void 0&&B(null),b?.(null)):Y(Q)},setIsOpen:Z}}const Sx=H({base:["group relative w-full","inline-flex flex-col","text-foreground-500"],variants:{variant:{flat:"",bordered:"",faded:"",underlined:""},color:{default:"",primary:"",secondary:"",success:"",warning:"",danger:""},size:{sm:"",md:"",lg:""},labelPlacement:{inside:"",outside:"flex-col","outside-left":"flex-row items-center"},fullWidth:{true:"w-full",false:"w-auto"},isDisabled:{true:"opacity-disabled cursor-not-allowed",false:""},disableAnimation:{true:"",false:"transition-colors duration-200 ease-in-out"}},defaultVariants:{variant:"flat",color:"default",size:"md",labelPlacement:"inside",fullWidth:!0,isDisabled:!1,disableAnimation:!1}}),jx=H({base:["relative flex w-full","min-h-unit-10 items-center gap-2","px-3 py-2","transition-colors duration-200","group-data-[focus=true]:outline-2","group-data-[focus=true]:outline-focus","group-data-[focus=true]:outline-offset-2"],variants:{variant:{flat:["bg-default-100","data-[hover=true]:bg-default-200","group-data-[focus=true]:bg-default-100"],bordered:["border-2 border-default-200","data-[hover=true]:border-default-300","group-data-[focus=true]:border-default-foreground","bg-transparent"],faded:["bg-default-100 border-2 border-transparent","data-[hover=true]:border-default-200","group-data-[focus=true]:border-default-300","group-data-[focus=true]:bg-default-50"],underlined:["rounded-none border-b-2 border-default-300","data-[hover=true]:border-default-400","group-data-[focus=true]:border-default-foreground","bg-transparent px-1 pb-0","after:content-[''] after:w-0 after:origin-center","after:absolute after:left-1/2 after:-translate-x-1/2","after:bottom-0 after:h-[2px]","after:transition-[width] after:duration-300","group-data-[focus=true]:after:w-full"]},color:{default:"",primary:{flat:"group-data-[focus=true]:bg-primary-50",bordered:"group-data-[focus=true]:border-primary",faded:"group-data-[focus=true]:border-primary group-data-[focus=true]:bg-primary-50",underlined:["group-data-[focus=true]:border-primary","after:bg-primary"]},secondary:{flat:"group-data-[focus=true]:bg-secondary-50",bordered:"group-data-[focus=true]:border-secondary",faded:"group-data-[focus=true]:border-secondary group-data-[focus=true]:bg-secondary-50",underlined:["group-data-[focus=true]:border-secondary","after:bg-secondary"]},success:{flat:"group-data-[focus=true]:bg-success-50",bordered:"group-data-[focus=true]:border-success",faded:"group-data-[focus=true]:border-success group-data-[focus=true]:bg-success-50",underlined:["group-data-[focus=true]:border-success","after:bg-success"]},warning:{flat:"group-data-[focus=true]:bg-warning-50",bordered:"group-data-[focus=true]:border-warning",faded:"group-data-[focus=true]:border-warning group-data-[focus=true]:bg-warning-50",underlined:["group-data-[focus=true]:border-warning","after:bg-warning"]},danger:{flat:"group-data-[focus=true]:bg-danger-50",bordered:"group-data-[focus=true]:border-danger",faded:"group-data-[focus=true]:border-danger group-data-[focus=true]:bg-danger-50",underlined:["group-data-[focus=true]:border-danger","after:bg-danger"]}},size:{sm:"min-h-unit-8 px-2 py-1",md:"min-h-unit-10 px-3 py-2",lg:"min-h-unit-12 px-4 py-3"},radius:{none:"rounded-none",sm:"rounded-small",md:"rounded-medium",lg:"rounded-large",full:"rounded-full"},labelPlacement:{inside:"",outside:"","outside-left":""},isInvalid:{true:{flat:"bg-danger-50 text-danger",bordered:"border-danger data-[hover=true]:border-danger",faded:"border-danger bg-danger-50",underlined:"border-danger after:bg-danger"},false:""},isDisabled:{true:"opacity-disabled pointer-events-none",false:""}},compoundVariants:[{variant:"underlined",size:"sm",class:"px-1 pb-0"},{variant:"underlined",size:"md",class:"px-1 pb-0"},{variant:"underlined",size:"lg",class:"px-1 pb-0"}],defaultVariants:{variant:"flat",color:"default",size:"md",radius:"md",labelPlacement:"inside",isInvalid:!1,isDisabled:!1}});H({base:["w-full font-normal bg-transparent outline-none","placeholder:text-foreground-500","text-small text-foreground"],variants:{size:{sm:"text-small",md:"text-medium",lg:"text-large"},isDisabled:{true:"pointer-events-none",false:""}},defaultVariants:{size:"md",isDisabled:!1}});H({base:["block text-foreground-600","cursor-pointer","transition-colors duration-200","will-change-auto","origin-top-left"],variants:{size:{sm:"text-small",md:"text-small",lg:"text-medium"},labelPlacement:{inside:["absolute left-3 rtl:left-auto rtl:right-3","pointer-events-none z-10","transition-[transform,color,left,opacity] duration-200 ease-out","group-data-[filled=true]:scale-85","group-data-[filled=true]:-translate-y-[calc(50%_+_theme(fontSize.small)/2_-_6px)]","group-data-[filled=true]:pointer-events-auto"],outside:["relative text-foreground pb-1.5","will-change-auto !duration-200 !ease-out transition-colors motion-reduce:transition-none"],"outside-left":["relative text-foreground pr-2 rtl:pr-0 rtl:pl-2","will-change-auto !duration-200 !ease-out transition-colors motion-reduce:transition-none"]},color:{default:"",primary:"group-data-[focus=true]:text-primary",secondary:"group-data-[focus=true]:text-secondary",success:"group-data-[focus=true]:text-success",warning:"group-data-[focus=true]:text-warning",danger:"group-data-[focus=true]:text-danger"},isRequired:{true:"after:content-['*'] after:text-danger after:ml-0.5",false:""},isInvalid:{true:"!text-danger",false:""},isDisabled:{true:"opacity-disabled pointer-events-none",false:""}},compoundVariants:[{labelPlacement:"inside",size:"sm",class:["group-data-[filled=true]:-translate-y-[calc(50%_+_theme(fontSize.small)/2_-_8px)]","left-2 rtl:left-auto rtl:right-2"]},{labelPlacement:"inside",size:"lg",class:["group-data-[filled=true]:-translate-y-[calc(50%_+_theme(fontSize.small)/2_-_4px)]","left-4 rtl:left-auto rtl:right-4"]}],defaultVariants:{size:"md",labelPlacement:"inside",color:"default",isRequired:!1,isInvalid:!1,isDisabled:!1}});H({base:"text-small text-foreground-400 px-1",variants:{color:{default:"text-foreground-400",primary:"text-primary-600",secondary:"text-secondary-600",success:"text-success-600",warning:"text-warning-600",danger:"text-danger-500"},isInvalid:{true:"text-danger-500",false:""}},defaultVariants:{color:"default",isInvalid:!1}});const Tx=H({base:["w-full p-1 min-w-[200px]","bg-content1 border border-divider","rounded-medium shadow-large"],variants:{disableAnimation:{true:"",false:"animate-in fade-in-0 zoom-in-95 slide-in-from-top-2 duration-200"}},defaultVariants:{disableAnimation:!1}});H({base:"max-h-64 overflow-auto",variants:{maxHeight:{sm:"max-h-32",md:"max-h-64",lg:"max-h-96",none:"max-h-none"}},defaultVariants:{maxHeight:"md"}});H({base:"flex items-center gap-1.5"});H({base:["flex items-center justify-center","w-4 h-4 min-w-4 min-h-4","text-default-400 hover:text-default-600","cursor-pointer transition-colors","opacity-0 data-[visible=true]:opacity-100","transition-opacity duration-150"],variants:{size:{sm:"w-3 h-3 min-w-3 min-h-3",md:"w-4 h-4 min-w-4 min-h-4",lg:"w-5 h-5 min-w-5 min-h-5"}},defaultVariants:{size:"md"}});H({base:["flex items-center justify-center","w-4 h-4 min-w-4 min-h-4","text-default-400 hover:text-default-600","cursor-pointer transition-all duration-150","data-[open=true]:rotate-180"],variants:{size:{sm:"w-3 h-3 min-w-3 min-h-3",md:"w-4 h-4 min-w-4 min-h-4",lg:"w-5 h-5 min-w-5 min-h-5"},disableRotation:{true:"data-[open=true]:rotate-0",false:""}},defaultVariants:{size:"md",disableRotation:!1}});H({base:["flex group relative justify-between items-center","cursor-pointer tap-highlight-transparent","px-2 py-1.5 w-full h-full box-border rounded-small","subpixel-antialiased outline-none","data-[pressed=true]:opacity-70","transition-opacity motion-reduce:transition-none"],variants:{color:{default:"",primary:"",secondary:"",success:"",warning:"",danger:""},variant:{solid:"",bordered:"border-2 border-transparent bg-transparent",light:"bg-transparent",flat:"",faded:"border-2 border-transparent",shadow:""},isDisabled:{true:"opacity-disabled cursor-not-allowed",false:""},isSelected:{true:"",false:""},showDivider:{true:"mb-1.5 border-b border-divider pb-1.5",false:""}},compoundVariants:[{color:"default",variant:"solid",class:["bg-default text-default-foreground","data-[hover=true]:bg-default-100","data-[selected=true]:bg-default data-[selected=true]:text-default-foreground"]},{color:"default",variant:"flat",class:["bg-transparent text-foreground","data-[hover=true]:bg-default-100","data-[selected=true]:bg-default-100 data-[selected=true]:text-default-foreground"]},{color:"primary",variant:"solid",class:["bg-primary text-primary-foreground","data-[hover=true]:bg-primary-500","data-[selected=true]:bg-primary data-[selected=true]:text-primary-foreground"]},{color:"primary",variant:"flat",class:["bg-transparent text-foreground","data-[hover=true]:bg-primary-100","data-[selected=true]:bg-primary-100 data-[selected=true]:text-primary"]},{color:"secondary",variant:"solid",class:["bg-secondary text-secondary-foreground","data-[hover=true]:bg-secondary-500","data-[selected=true]:bg-secondary data-[selected=true]:text-secondary-foreground"]},{color:"secondary",variant:"flat",class:["bg-transparent text-foreground","data-[hover=true]:bg-secondary-100","data-[selected=true]:bg-secondary-100 data-[selected=true]:text-secondary"]},{color:"success",variant:"solid",class:["bg-success text-success-foreground","data-[hover=true]:bg-success-500","data-[selected=true]:bg-success data-[selected=true]:text-success-foreground"]},{color:"success",variant:"flat",class:["bg-transparent text-foreground","data-[hover=true]:bg-success-100","data-[selected=true]:bg-success-100 data-[selected=true]:text-success"]},{color:"warning",variant:"solid",class:["bg-warning text-warning-foreground","data-[hover=true]:bg-warning-500","data-[selected=true]:bg-warning data-[selected=true]:text-warning-foreground"]},{color:"warning",variant:"flat",class:["bg-transparent text-foreground","data-[hover=true]:bg-warning-100","data-[selected=true]:bg-warning-100 data-[selected=true]:text-warning"]},{color:"danger",variant:"solid",class:["bg-danger text-danger-foreground","data-[hover=true]:bg-danger-500","data-[selected=true]:bg-danger data-[selected=true]:text-danger-foreground"]},{color:"danger",variant:"flat",class:["bg-transparent text-foreground","data-[hover=true]:bg-danger-100","data-[selected=true]:bg-danger-100 data-[selected=true]:text-danger"]}],defaultVariants:{color:"default",variant:"flat",isDisabled:!1,isSelected:!1,showDivider:!1}});const Ax=H({slots:{base:["flex group relative justify-between items-center","cursor-pointer tap-highlight-transparent","px-2 py-1.5 w-full h-full box-border rounded-small","subpixel-antialiased outline-none","data-[pressed=true]:opacity-70","transition-opacity motion-reduce:transition-none"],wrapper:["w-full flex items-center gap-2"],title:["flex-1 text-small font-normal truncate","text-foreground group-data-[selected=true]:text-inherit"],description:["w-full text-tiny text-foreground-400 truncate","group-data-[selected=true]:text-inherit group-data-[selected=true]:opacity-70"],startContent:["flex items-center justify-center","text-foreground-400 group-data-[selected=true]:text-inherit"],endContent:["flex items-center justify-center","text-foreground-400 group-data-[selected=true]:text-inherit"]},variants:{color:{default:{},primary:{},secondary:{},success:{},warning:{},danger:{}},variant:{solid:{},bordered:{base:"border-2 border-transparent bg-transparent"},light:{base:"bg-transparent"},flat:{},faded:{base:"border-2 border-transparent"},shadow:{}},size:{sm:{base:"px-1 py-1 text-tiny gap-1",title:"text-tiny",description:"text-tiny"},md:{base:"px-2 py-1.5 text-small gap-2",title:"text-small",description:"text-tiny"},lg:{base:"px-3 py-2 text-medium gap-3",title:"text-medium",description:"text-small"}},isDisabled:{true:{base:"opacity-disabled cursor-not-allowed"},false:{}},isSelected:{true:{},false:{}},isFocused:{true:{base:"data-[focus-visible=true]:outline-2 data-[focus-visible=true]:outline-offset-2 data-[focus-visible=true]:outline-focus"},false:{}},showDivider:{true:{base:"mb-1.5 border-b border-divider pb-1.5"},false:{}}},compoundVariants:[{color:"default",variant:"solid",class:{base:["bg-default text-default-foreground","data-[hover=true]:bg-default-100","data-[selected=true]:bg-default data-[selected=true]:text-default-foreground"]}},{color:"default",variant:"flat",class:{base:["bg-transparent text-foreground","data-[hover=true]:bg-default-100","data-[selected=true]:bg-default-100 data-[selected=true]:text-default-foreground"]}},{color:"primary",variant:"solid",class:{base:["bg-primary text-primary-foreground","data-[hover=true]:bg-primary-500","data-[selected=true]:bg-primary data-[selected=true]:text-primary-foreground"]}},{color:"primary",variant:"flat",class:{base:["bg-transparent text-foreground","data-[hover=true]:bg-primary-100","data-[selected=true]:bg-primary-100 data-[selected=true]:text-primary"]}},{color:"secondary",variant:"solid",class:{base:["bg-secondary text-secondary-foreground","data-[hover=true]:bg-secondary-500","data-[selected=true]:bg-secondary data-[selected=true]:text-secondary-foreground"]}},{color:"secondary",variant:"flat",class:{base:["bg-transparent text-foreground","data-[hover=true]:bg-secondary-100","data-[selected=true]:bg-secondary-100 data-[selected=true]:text-secondary"]}},{color:"success",variant:"solid",class:{base:["bg-success text-success-foreground","data-[hover=true]:bg-success-500","data-[selected=true]:bg-success data-[selected=true]:text-success-foreground"]}},{color:"success",variant:"flat",class:{base:["bg-transparent text-foreground","data-[hover=true]:bg-success-100","data-[selected=true]:bg-success-100 data-[selected=true]:text-success"]}},{color:"warning",variant:"solid",class:{base:["bg-warning text-warning-foreground","data-[hover=true]:bg-warning-500","data-[selected=true]:bg-warning data-[selected=true]:text-warning-foreground"]}},{color:"warning",variant:"flat",class:{base:["bg-transparent text-foreground","data-[hover=true]:bg-warning-100","data-[selected=true]:bg-warning-100 data-[selected=true]:text-warning"]}},{color:"danger",variant:"solid",class:{base:["bg-danger text-danger-foreground","data-[hover=true]:bg-danger-500","data-[selected=true]:bg-danger data-[selected=true]:text-danger-foreground"]}},{color:"danger",variant:"flat",class:{base:["bg-transparent text-foreground","data-[hover=true]:bg-danger-100","data-[selected=true]:bg-danger-100 data-[selected=true]:text-danger"]}}],defaultVariants:{color:"default",variant:"flat",size:"md",isDisabled:!1,isSelected:!1,isFocused:!1,showDivider:!1}});H({base:"relative mb-2",variants:{showDivider:{true:"pb-1 mb-2 border-b border-divider",false:""}},defaultVariants:{showDivider:!1}});const Mx=H({slots:{base:["relative mb-2"],heading:["text-small font-medium text-default-500","px-2 py-1 select-none"],group:["w-full"],divider:["w-full h-px bg-divider my-2"]},variants:{showDivider:{true:{base:"pb-1 mb-2"},false:{}}},defaultVariants:{showDivider:!1}});H({base:["text-small font-medium text-default-500","px-2 py-1"]});H({base:"space-y-0.5"});const Br=p.forwardRef(({children:e,className:t,classNames:r,textValue:n,startContent:s,endContent:a,description:o,isSelected:i=!1,isFocused:l=!1,isDisabled:c=!1,showDivider:d=!1,variant:u="flat",color:h="default",size:m="md",itemKey:g,onSelectionChange:w,onPress:x,onPressStart:b,onPressEnd:y,onClick:v,onMouseDown:C,onKeyDown:S,...j},A)=>{const[k,V]=p.useState(!1),M=p.useCallback(()=>{c||(x?.(),g!==void 0&&w&&w(g))},[c,x,g,w]),D=p.useCallback(N=>{c||(N.preventDefault(),N.stopPropagation(),v?.(N),M())},[c,v,M]),z=p.useCallback(N=>{c||(N.preventDefault(),C?.(N),b?.())},[c,C,b]),L=p.useCallback(()=>{c||y?.()},[c,y]),I=p.useCallback(N=>{c||(S?.(N),(N.key==="Enter"||N.key===" ")&&(N.preventDefault(),N.stopPropagation(),M()))},[c,S,M]),R=p.useMemo(()=>Ax({variant:u,color:h,size:m,isSelected:i,isFocused:l,isDisabled:c,showDivider:d}),[u,h,m,i,l,c,d]),B=o!=null&&o!=="",P=s!=null,T=a!=null;return f.jsx("li",{ref:A,className:q(R.base(),r?.base,t),role:"option","aria-selected":i,"aria-disabled":c,tabIndex:l?0:-1,"data-key":g,"data-selected":i,"data-focused":l,"data-disabled":c,"data-hover":k,onClick:D,onMouseDown:z,onMouseUp:L,onMouseEnter:()=>V(!0),onMouseLeave:()=>V(!1),onKeyDown:I,...j,children:f.jsxs("div",{className:q(R.wrapper(),r?.wrapper),children:[P&&f.jsx("div",{className:q(R.startContent(),r?.startContent),children:s}),f.jsxs("div",{className:"flex-1 flex flex-col justify-center min-w-0",children:[f.jsx("div",{className:q(R.title(),r?.title),children:e||n}),B&&f.jsx("div",{className:q(R.description(),r?.description),children:o})]}),T&&f.jsx("div",{className:q(R.endContent(),r?.endContent),children:a})]})})});Br.displayName="AutocompleteItem";const Vx=({className:e})=>f.jsx("svg",{className:e,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})}),Px=({className:e})=>f.jsx("svg",{className:e,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})});function Ex(e,t){if(typeof e=="object"&&e!==null){const r=e;return r.key??r.id??t}return t}function Ix(e){if(typeof e=="object"&&e!==null){const t=e;return t.textValue||t.label||t.value||t.title||String(t.key||"")}return String(e)}const Wc=p.forwardRef(({label:e,placeholder:t="Search...",description:r,errorMessage:n,startContent:s,endContent:a,variant:o="flat",color:i="default",size:l="md",labelPlacement:c="inside",isDisabled:d=!1,isReadOnly:u=!1,isRequired:h=!1,isInvalid:m=!1,isClearable:g=!0,fullWidth:w=!0,disableAnimation:x=!1,disableSelectorIconRotation:b=!1,selectorIcon:y,clearIcon:v,className:C,classNames:S,popoverProps:j,listboxProps:A,inputProps:k,selectorButtonProps:V,clearButtonProps:M,children:D,...z},L)=>{const[I,R]=p.useState(!1),{inputValue:B,selectedKey:P,isOpen:T,filteredItems:N,focusedKey:E,inputProps:F,listboxProps:$,clearButtonProps:O,selectorButtonProps:K,containerRef:W,selectItem:J}=Fc(z),Y=p.useMemo(()=>Sx({variant:o,color:i,size:l,labelPlacement:c,isDisabled:d,fullWidth:w}),[o,i,l,c,d,w]),Z=p.useMemo(()=>jx({variant:o,color:i,size:l,isDisabled:d,isInvalid:m}),[o,i,l,d,m]),ne=p.useMemo(()=>Tx({disableAnimation:x}),[x]),ae=p.useCallback(se=>{J(se)},[J]),Te=p.useCallback(()=>D||N.map((se,Se)=>{const ye=Ex(se,Se),Ze=Ix(se);if(typeof se=="object"&&se!==null){const Oe=se;return f.jsx(Br,{itemKey:ye,textValue:Ze,isSelected:P===ye,isFocused:E===ye,variant:o==="underlined"?"flat":o,color:i,size:l,startContent:Oe.startContent,endContent:Oe.endContent,description:Oe.description,onSelectionChange:ae,children:Oe.label||Ze},ye)}return f.jsx(Br,{itemKey:ye,textValue:Ze,isSelected:P===ye,isFocused:E===ye,variant:o==="underlined"?"flat":o,color:i,size:l,onSelectionChange:ae,children:Ze},ye)}),[D,N,P,E,o,i,l,ae]),he=p.useMemo(()=>f.jsx(Vx,{className:q("w-4 h-4 text-default-400 transition-transform",!b&&T&&"rotate-180")}),[b,T]),at=p.useMemo(()=>f.jsx(Px,{className:"w-4 h-4 text-default-400"}),[]),Le=g&&B&&!d&&!u;return f.jsxs("div",{ref:se=>{typeof L=="function"?L(se):L&&(L.current=se),W&&(W.current=se)},className:q("relative",Y,S?.base,C),children:[e&&c==="outside"&&f.jsxs("label",{className:"text-small font-medium text-foreground pb-1 block",children:[e,h&&f.jsx("span",{className:"text-danger ml-1",children:"*"})]}),f.jsxs("div",{className:q(Z,S?.inputWrapper),style:{zIndex:1},children:[s&&f.jsx("div",{className:"flex items-center",children:s}),f.jsx("input",{...F,...k,className:q("w-full bg-transparent outline-none placeholder:text-foreground-500",F.className,k?.className),placeholder:T||I||B?t:"",disabled:d,readOnly:u,required:h,onFocus:se=>{R(!0),F.onFocus?.(se)},onBlur:se=>{R(!1),F.onBlur?.(se)}}),e&&c==="inside"&&f.jsxs("label",{className:q("absolute left-3 transition-all duration-200 pointer-events-none z-10","text-small text-foreground-500","top-1/2 -translate-y-1/2 origin-left",(B||T||I)&&["text-tiny scale-85 -translate-y-[1.875rem] px-1 bg-content1","text-foreground-600"]),style:{zIndex:10},children:[e,h&&f.jsx("span",{className:"text-danger ml-1",children:"*"})]}),f.jsxs("div",{className:"flex items-center gap-2",children:[a,Le&&f.jsx("button",{...O,...M,className:q("p-1 rounded-small opacity-70 hover:opacity-100 transition-opacity",O.className,M?.className),children:v||at}),f.jsx("button",{...K,...V,className:q("p-1 rounded-small opacity-70 hover:opacity-100 transition-opacity",K.className,V?.className),disabled:d,children:y||he})]})]}),r&&f.jsx("div",{className:"text-tiny text-foreground-400 mt-1",children:r}),m&&n&&f.jsx("div",{className:"text-tiny text-danger mt-1",children:typeof n=="function"?n({isInvalid:!0,validationErrors:[],validationDetails:{}}):n}),f.jsx(We,{children:T&&f.jsx(_.div,{initial:x?void 0:{opacity:0,y:-8},animate:{opacity:1,y:0},exit:x?void 0:{opacity:0,y:-8},transition:{duration:x?0:.15,ease:"easeOut"},className:q("absolute top-full left-0 right-0 mt-1 z-[9999]",ne,S?.popoverContent,j?.className),style:{zIndex:9999},children:f.jsx("div",{className:q("max-h-64 overflow-y-auto overflow-x-hidden bg-content1 rounded-medium",S?.listboxWrapper),children:f.jsxs("ul",{...$,...A,className:q("w-full p-1 bg-content1 rounded-medium",$.className,A?.className),children:[Te(),N.length===0&&!D&&f.jsx("li",{className:"px-2 py-4 text-small text-foreground-400 text-center",children:A?.emptyContent||"No results found"})]})})})})]})});Wc.displayName="Autocomplete";const _c=p.forwardRef(({title:e,children:t,className:r,classNames:n,showDivider:s=!1,...a},o)=>{const i=p.useMemo(()=>Mx({showDivider:s}),[s]),l=e!=null&&e!=="";return f.jsxs("div",{ref:o,className:q(i.base(),n?.base,r),role:"group",...a,children:[l&&f.jsx("div",{className:q(i.heading(),n?.heading),role:"presentation",children:e}),f.jsx("div",{className:q(i.group(),n?.group),role:"group",children:t}),s&&f.jsx("div",{className:q(i.divider(),n?.divider),role:"separator"})]})});_c.displayName="AutocompleteSection";const Nx=(e,t,r=1,n=!0)=>{const s=[],a=(l,c,d=!1,u=!1)=>({type:l,value:c,isActive:d,isDisabled:u,key:`${l}-${c}`});s.push(a("page",1,e===1));const o=Math.max(2,e-r),i=Math.min(t-1,e+r);n&&o>2&&s.push(a("dots","...",!1,!0));for(let l=o;l<=i;l++)l!==1&&l!==t&&s.push(a("page",l,e===l));return n&&i<t-1&&s.push(a("dots","...",!1,!0)),t>1&&s.push(a("page",t,e===t)),s};function Gc(e){const{total:t,page:r,defaultPage:n=1,initialPage:s,siblings:a=1,showDots:o=!0,loop:i=!1,onChange:l}=e,c=r!==void 0,d=s??n,[u,h]=p.useState(d),g=Math.max(1,Math.min(t,c?r:u)),w=p.useMemo(()=>t<=0?[]:Nx(g,t,a,o),[g,t,a,o]),x=p.useCallback(A=>{const k=Math.max(1,Math.min(t,A));k!==g&&(c||h(k),l?.(k))},[c,g,t,l]),b=p.useCallback(()=>{g<t?x(g+1):i&&x(1)},[g,t,i,x]),y=p.useCallback(()=>{g>1?x(g-1):i&&x(t)},[g,t,i,x]),v=p.useCallback(()=>{x(1)},[x]),C=p.useCallback(()=>{x(t)},[x,t]);return{activePage:g,range:w,setPage:x,next:b,previous:y,first:v,last:C,isFirst:g===1,isLast:g===t,totalPages:t}}const Rx={xs:"min-w-6 h-6 text-xs px-1",sm:"min-w-8 h-8 text-sm px-2",md:"min-w-10 h-10 text-base px-3",lg:"min-w-12 h-12 text-lg px-4",xl:"min-w-14 h-14 text-xl px-5"},Ho={xs:"gap-1",sm:"gap-1.5",md:"gap-2",lg:"gap-2.5",xl:"gap-3"},Dx={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl",full:"rounded-full"},Uc=(e,t,r=!1,n=!1)=>{const s={default:{flat:{base:"bg-default-100 text-default-600 hover:bg-default-200",active:"bg-default-300 text-default-800 font-medium",disabled:"bg-default-50 text-default-300 cursor-not-allowed"},bordered:{base:"bg-transparent border-2 border-default-200 text-default-600 hover:border-default-300 hover:bg-default-50",active:"bg-default-100 border-default-400 text-default-800 font-medium",disabled:"bg-transparent border-default-100 text-default-300 cursor-not-allowed"},light:{base:"bg-transparent text-default-600 hover:bg-default-100",active:"bg-default-200 text-default-800 font-medium",disabled:"bg-transparent text-default-300 cursor-not-allowed"},faded:{base:"bg-default-100/50 text-default-600 hover:bg-default-200/70",active:"bg-default-300/80 text-default-800 font-medium",disabled:"bg-default-50/30 text-default-300 cursor-not-allowed"}},primary:{flat:{base:"bg-primary-100 text-primary-600 hover:bg-primary-200",active:"bg-primary-500 text-white font-medium",disabled:"bg-primary-50 text-primary-300 cursor-not-allowed"},bordered:{base:"bg-transparent border-2 border-primary-200 text-primary-600 hover:border-primary-300 hover:bg-primary-50",active:"bg-primary-500 border-primary-500 text-white font-medium",disabled:"bg-transparent border-primary-100 text-primary-300 cursor-not-allowed"},light:{base:"bg-transparent text-primary-600 hover:bg-primary-100",active:"bg-primary-200 text-primary-800 font-medium",disabled:"bg-transparent text-primary-300 cursor-not-allowed"},faded:{base:"bg-primary-100/50 text-primary-600 hover:bg-primary-200/70",active:"bg-primary-500/90 text-white font-medium",disabled:"bg-primary-50/30 text-primary-300 cursor-not-allowed"}},secondary:{flat:{base:"bg-purple-100 text-purple-600 hover:bg-purple-200",active:"bg-purple-500 text-white font-medium",disabled:"bg-purple-50 text-purple-300 cursor-not-allowed"},bordered:{base:"bg-transparent border-2 border-purple-200 text-purple-600 hover:border-purple-300 hover:bg-purple-50",active:"bg-purple-500 border-purple-500 text-white font-medium",disabled:"bg-transparent border-purple-100 text-purple-300 cursor-not-allowed"},light:{base:"bg-transparent text-purple-600 hover:bg-purple-100",active:"bg-purple-200 text-purple-800 font-medium",disabled:"bg-transparent text-purple-300 cursor-not-allowed"},faded:{base:"bg-purple-100/50 text-purple-600 hover:bg-purple-200/70",active:"bg-purple-500/90 text-white font-medium",disabled:"bg-purple-50/30 text-purple-300 cursor-not-allowed"}},success:{flat:{base:"bg-green-100 text-green-600 hover:bg-green-200",active:"bg-green-500 text-white font-medium",disabled:"bg-green-50 text-green-300 cursor-not-allowed"},bordered:{base:"bg-transparent border-2 border-green-200 text-green-600 hover:border-green-300 hover:bg-green-50",active:"bg-green-500 border-green-500 text-white font-medium",disabled:"bg-transparent border-green-100 text-green-300 cursor-not-allowed"},light:{base:"bg-transparent text-green-600 hover:bg-green-100",active:"bg-green-200 text-green-800 font-medium",disabled:"bg-transparent text-green-300 cursor-not-allowed"},faded:{base:"bg-green-100/50 text-green-600 hover:bg-green-200/70",active:"bg-green-500/90 text-white font-medium",disabled:"bg-green-50/30 text-green-300 cursor-not-allowed"}},warning:{flat:{base:"bg-yellow-100 text-yellow-700 hover:bg-yellow-200",active:"bg-yellow-500 text-white font-medium",disabled:"bg-yellow-50 text-yellow-300 cursor-not-allowed"},bordered:{base:"bg-transparent border-2 border-yellow-200 text-yellow-700 hover:border-yellow-300 hover:bg-yellow-50",active:"bg-yellow-500 border-yellow-500 text-white font-medium",disabled:"bg-transparent border-yellow-100 text-yellow-300 cursor-not-allowed"},light:{base:"bg-transparent text-yellow-700 hover:bg-yellow-100",active:"bg-yellow-200 text-yellow-800 font-medium",disabled:"bg-transparent text-yellow-400 cursor-not-allowed"},faded:{base:"bg-yellow-100/50 text-yellow-700 hover:bg-yellow-200/70",active:"bg-yellow-500/90 text-white font-medium",disabled:"bg-yellow-50/30 text-yellow-300 cursor-not-allowed"}},danger:{flat:{base:"bg-red-100 text-red-600 hover:bg-red-200",active:"bg-red-500 text-white font-medium",disabled:"bg-red-50 text-red-300 cursor-not-allowed"},bordered:{base:"bg-transparent border-2 border-red-200 text-red-600 hover:border-red-300 hover:bg-red-50",active:"bg-red-500 border-red-500 text-white font-medium",disabled:"bg-transparent border-red-100 text-red-300 cursor-not-allowed"},light:{base:"bg-transparent text-red-600 hover:bg-red-100",active:"bg-red-200 text-red-800 font-medium",disabled:"bg-transparent text-red-300 cursor-not-allowed"},faded:{base:"bg-red-100/50 text-red-600 hover:bg-red-200/70",active:"bg-red-500/90 text-white font-medium",disabled:"bg-red-50/30 text-red-300 cursor-not-allowed"}}};return n?s[e][t].disabled:r?s[e][t].active:s[e][t].base},Bx=(e,t,r=!1)=>{const n=Uc(e,t,!1,r);return r?n:`${n} transition-all duration-200 ease-in-out hover:scale-105 active:scale-95`},Lx=e=>`${{xs:"w-6 h-6 text-xs",sm:"w-8 h-8 text-sm",md:"w-10 h-10 text-base",lg:"w-12 h-12 text-lg",xl:"w-14 h-14 text-xl"}[e]} flex items-center justify-center text-default-400 cursor-default select-none`,Kc=(e=!1,t=!1)=>e||t?"transition-colors duration-200 ease-in-out":"transition-all duration-200 ease-in-out transform hover:scale-105 active:scale-95",Hc=(e,t)=>{const r=Rx[e],n=Dx[t];return`${r} ${n} flex items-center justify-center font-medium select-none outline-none focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2`},Ox=(e,t=!1,r=!1)=>`flex items-center justify-center ${r?Ho.xs:Ho[e]} ${t?"shadow-sm":""}`.trim(),je={size:"md",color:"primary",variant:"flat",radius:"md",siblings:1,showControls:!0,showFirstLast:!1,showPages:!0,showDots:!0,loop:!1,compact:!1,showShadow:!1,disableAnimation:!1},Hs=p.forwardRef(({value:e,type:t="page",isActive:r=!1,isDisabled:n=!1,onClick:s,children:a,className:o="",size:i,color:l,variant:c,radius:d,"aria-label":u,"data-testid":h},m)=>{const g=qr(),w=i??g.size,x=l??g.color,b=c??g.variant,y=d??g.radius,v=g.isDisabled,C=g.disableAnimation,S=v||n,j=Hc(w,y),A=Uc(x,b,r,S),k=Kc(C,S),V=()=>{S||t==="dots"||s?.(e)},M=t==="page"?r?`Current page, page ${e}`:`Go to page ${e}`:u,D=`${j} ${A} ${k} ${o}`.trim();return f.jsx("button",{ref:m,type:"button",disabled:S,onClick:V,className:D,"aria-label":M,"aria-current":r?"page":void 0,"data-testid":h,children:a??e})});Hs.displayName="PaginationItem";const dr=p.forwardRef(({direction:e,isDisabled:t=!1,onClick:r,children:n,className:s="",size:a,color:o,variant:i,radius:l,"aria-label":c,"data-testid":d},u)=>{const h=qr(),m=a??h.size,g=o??h.color,w=i??h.variant,x=l??h.radius,b=h.isDisabled,y=h.disableAnimation,v=b||t,C=Hc(m,x),S=Bx(g,w,v),j=Kc(y,v),A=()=>{v||r?.()},k=e==="prev"?"Go to previous page":"Go to next page",V=`${C} ${S} ${j} ${s}`.trim();return f.jsx("button",{ref:u,type:"button",disabled:v,onClick:A,className:V,"aria-label":c??k,"data-testid":d,children:n})});dr.displayName="BasePaginationCursor";const Xs=p.forwardRef((e,t)=>f.jsx(dr,{ref:t,direction:"prev","aria-label":"Go to previous page",...e}));Xs.displayName="PaginationPrevious";const Ys=p.forwardRef((e,t)=>f.jsx(dr,{ref:t,direction:"next","aria-label":"Go to next page",...e}));Ys.displayName="PaginationNext";const qs=p.forwardRef((e,t)=>f.jsx(dr,{ref:t,direction:"prev","aria-label":"Go to first page",...e}));qs.displayName="PaginationFirst";const Zs=p.forwardRef((e,t)=>f.jsx(dr,{ref:t,direction:"next","aria-label":"Go to last page",...e}));Zs.displayName="PaginationLast";const Js=p.forwardRef(({className:e="",size:t,children:r,"data-testid":n},s)=>{const a=qr(),o=t??a.size,l=`${Lx(o)} ${e}`.trim();return f.jsx("span",{ref:s,className:l,"aria-hidden":"true",role:"presentation","data-testid":n,children:r??"…"})});Js.displayName="PaginationEllipsis";const Cr={prev:()=>f.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"w-4 h-4",children:f.jsx("polyline",{points:"15,18 9,12 15,6"})}),next:()=>f.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"w-4 h-4",children:f.jsx("polyline",{points:"9,18 15,12 9,6"})}),first:()=>f.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"w-4 h-4",children:[f.jsx("polyline",{points:"11,17 6,12 11,7"}),f.jsx("polyline",{points:"18,17 13,12 18,7"})]}),last:()=>f.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"w-4 h-4",children:[f.jsx("polyline",{points:"13,17 18,12 13,7"}),f.jsx("polyline",{points:"6,17 11,12 6,7"})]})},Xc=p.createContext(null),qr=()=>{const e=p.useContext(Xc);if(!e)throw new Error("usePaginationContext must be used within a Pagination component");return e},Yc=({total:e,page:t,defaultPage:r=1,initialPage:n,onChange:s,onPageChange:a,size:o=je.size,color:i=je.color,variant:l=je.variant,radius:c=je.radius,isDisabled:d=!1,disableAnimation:u=je.disableAnimation,controls:h={},display:m={},className:g="",style:w,"aria-label":x="Pagination Navigation","data-testid":b})=>{const y={showControls:je.showControls,showFirstLast:je.showFirstLast,placement:"both",labels:{prev:f.jsx(Cr.prev,{}),next:f.jsx(Cr.next,{}),first:f.jsx(Cr.first,{}),last:f.jsx(Cr.last,{})},...h},v={showPages:je.showPages,siblings:je.siblings,showDots:je.showDots,loop:je.loop,compact:je.compact,showShadow:je.showShadow,...m},C=Gc({total:e,page:t,defaultPage:r,initialPage:n,siblings:v.siblings,showDots:v.showDots,loop:v.loop,onChange:M=>{s?.(M),a?.(M)}}),S={activePage:C.activePage,totalPages:C.totalPages,setPage:C.setPage,size:o,color:i,variant:l,radius:c,isDisabled:d,disableAnimation:u,controls:y,display:v},j=Ox(o,v.showShadow,v.compact),A=M=>!y.showFirstLast||y.placement!=="both"&&y.placement!==M?null:M==="start"?f.jsx(qs,{isDisabled:d||C.isFirst,onClick:C.first,children:y.labels.first}):f.jsx(Zs,{isDisabled:d||C.isLast,onClick:C.last,children:y.labels.last}),k=M=>!y.showControls||y.placement!=="both"&&y.placement!==M?null:M==="start"?f.jsx(Xs,{isDisabled:d||C.isFirst,onClick:C.previous,children:y.labels.prev}):f.jsx(Ys,{isDisabled:d||C.isLast,onClick:C.next,children:y.labels.next}),V=()=>v.showPages?C.range.map(M=>M.type==="dots"?f.jsx(Js,{},M.key):f.jsx(Hs,{type:"page",value:M.value,isActive:M.isActive,isDisabled:d||M.isDisabled,onClick:()=>!d&&!M.isDisabled&&C.setPage(M.value),children:M.value},M.key)):null;return f.jsx(Xc.Provider,{value:S,children:f.jsxs("nav",{role:"navigation","aria-label":x,className:`${j} ${g}`.trim(),style:w,"data-testid":b,children:[A("start"),k("start"),V(),k("end"),A("end")]})})};Yc.displayName="Pagination";const Xt=e=>({linear:"linear",easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1],backIn:[.6,-.05,.01,.99],backOut:[.12,0,.39,0],backInOut:[.37,0,.63,1],bounceIn:[.6,-.28,.735,.045],bounceOut:[.175,.885,.32,1.275],bounceInOut:[.68,-.55,.265,1.55]})[e],zx=(e,t,r=.05,n=.6)=>{const s=e.split(" "),a=[],o=[],i=e.split(`
|
|
15
|
-
`);let l=0;return
|
|
13
|
+
${je||Z?["text-tiny scale-85 -translate-y-[1.875rem] px-1","text-gray-600"].join(" "):""}
|
|
14
|
+
`.replace(/\s+/g," ").trim(),htmlFor:E,"data-testid":E?`${E}-label`:void 0,style:{zIndex:10},children:[e,y&&f.jsx("span",{className:"text-danger ml-1",children:"*"})]}):f.jsxs("label",{id:Q,className:vd,htmlFor:E,"data-testid":E?`${E}-label`:void 0,children:[e,y&&f.jsx("span",{className:"text-danger ml-1",children:"*"})]}):null,Pd=f.jsx("input",{...H,ref:W||Le,id:E,type:Qr,value:je,placeholder:p==="inside"?Z||je?t:"":t,disabled:w,readOnly:C,required:y,minLength:v,maxLength:x,pattern:b,className:kd,onChange:_e,onFocus:Ot,onBlur:md,onKeyDown:M,onKeyUp:N,"aria-label":F,"aria-labelledby":e?Q:z,"aria-describedby":[de,ge,O].filter(Boolean).join(" ")||void 0,"aria-invalid":Me,"data-testid":E?`${E}-input`:void 0,"data-has-start-content":!!n,"data-has-end-content":!!(a||S||Oe)});return f.jsxs("div",{ref:$,className:yd,"data-testid":E,"data-invalid":Me,"data-required":y,"data-readonly":C,"data-disabled":w,"data-focus":Z,"data-focus-within":Z,"data-focus-visible":Z,"data-filled":Ze,"data-has-label":!!e,"data-has-helper":!!(r||Me),children:[f.jsxs("div",{className:xd,children:[p==="outside-left"&&es(),f.jsxs("div",{className:"flex flex-col gap-1.5 w-full",children:[p==="outside"&&es(),f.jsxs("div",{className:wd,children:[p==="inside"&&es(),f.jsxs("div",{className:Cd,children:[n&&Z&&f.jsx("div",{className:aa,"data-testid":E?`${E}-start-content`:void 0,children:n}),Pd,a&&f.jsx("div",{className:aa,"data-testid":E?`${E}-end-content`:void 0,children:a}),Vd(),Ad()]})]})]})]}),(r||Me)&&f.jsxs("div",{className:jd,children:[r&&f.jsx("div",{id:de,className:Sd,"data-testid":E?`${E}-description`:void 0,children:r}),Me&&f.jsx("div",{id:ge,className:Td,"data-testid":E?`${E}-error-message`:void 0,children:Md()})]})]})});Tc.displayName="Input";const sr=K({slots:{wrapper:["fixed","inset-0","z-50","flex","items-center","justify-center","p-4","sm:p-0","overflow-hidden"],base:["relative","flex","flex-col","w-full","box-border","outline-none","mx-1","my-1","sm:mx-6","sm:my-16","bg-white","dark:bg-gray-800","text-gray-900","dark:text-gray-100","shadow-large","rounded-large","max-h-[calc(100vh_-_2rem)]","sm:max-h-[calc(100vh_-_8rem)]","data-[open=true]:animate-in","data-[open=false]:animate-out","data-[open=false]:fade-out-0","data-[open=true]:fade-in-0","data-[open=false]:zoom-out-95","data-[open=true]:zoom-in-95","data-[open=false]:slide-out-to-left-1/2","data-[open=false]:slide-out-to-top-[48%]","data-[open=true]:slide-in-from-left-1/2","data-[open=true]:slide-in-from-top-[48%]","data-[open=false]:duration-200","data-[open=true]:duration-200"],backdrop:["fixed","inset-0","z-50","bg-black/50","dark:bg-black/70","data-[enter]:animate-in","data-[exit]:animate-out","data-[enter]:fade-in-0","data-[exit]:fade-out-0","data-[enter]:duration-200","data-[exit]:duration-150"],header:["flex","py-4","px-6","relative","flex-col","gap-1","text-large","font-semibold","border-b","border-gray-200","dark:border-gray-700"],body:["relative","flex-1","px-6","py-2","flex","flex-col","gap-3","min-h-0"],footer:["flex","flex-row","gap-2","px-6","py-4","justify-end","border-t","border-gray-200","dark:border-gray-700"],closeButton:["absolute","appearance-none","outline-none","select-none","top-1","right-1","rtl:right-auto","rtl:left-1","p-2","text-gray-500","dark:text-gray-400","rounded-full","hover:bg-gray-100","dark:hover:bg-gray-700","active:bg-gray-200","dark:active:bg-gray-600","tap-highlight-transparent","transition-opacity","data-[pressed=true]:scale-95","transition-transform","z-10"]},variants:{size:{xs:{base:"max-w-xs"},sm:{base:"max-w-sm"},md:{base:"max-w-md"},lg:{base:"max-w-lg"},xl:{base:"max-w-xl"},"2xl":{base:"max-w-2xl"},"3xl":{base:"max-w-3xl"},"4xl":{base:"max-w-4xl"},"5xl":{base:"max-w-5xl"},full:{base:"max-w-full max-h-full my-0 mx-0 sm:my-0 sm:mx-0 rounded-none"}},radius:{none:{base:"rounded-none"},sm:{base:"rounded-small"},md:{base:"rounded-medium"},lg:{base:"rounded-large"}},shadow:{none:{base:"shadow-none"},sm:{base:"shadow-small"},md:{base:"shadow-medium"},lg:{base:"shadow-large"}},backdrop:{transparent:{backdrop:"bg-transparent"},opaque:{backdrop:"bg-black/50 dark:bg-black/70"},blur:{backdrop:"bg-black/30 dark:bg-black/50 backdrop-blur-sm backdrop-saturate-150"}},scrollBehavior:{normal:{base:"overflow-hidden",body:"overflow-y-auto max-h-[60vh]"},inside:{base:"max-h-[calc(100vh_-_8rem)] overflow-hidden flex flex-col",body:"overflow-y-auto flex-1 min-h-0"},outside:{wrapper:"items-start sm:items-center overflow-y-auto py-8",base:"my-0 max-h-fit overflow-visible",body:"overflow-visible"}},placement:{auto:{wrapper:"items-end sm:items-center",base:"sm:my-16 my-2"},top:{wrapper:"items-start",base:"mt-2 mb-auto"},"top-center":{wrapper:"items-start sm:items-center",base:"mt-2 sm:mt-16 mb-auto"},center:{wrapper:"items-center",base:"my-auto"},bottom:{wrapper:"items-end",base:"mb-2 mt-auto"},"bottom-center":{wrapper:"items-end sm:items-center",base:"mb-2 sm:mb-16 mt-auto"}},disableAnimation:{true:{base:["data-[open=true]:animate-none","data-[open=false]:animate-none"],backdrop:["data-[enter]:animate-none","data-[exit]:animate-none"]}},isDraggable:{true:{header:"cursor-move select-none active:cursor-grabbing",base:"cursor-default"}}},defaultVariants:{size:"md",radius:"lg",shadow:"lg",backdrop:"opaque",scrollBehavior:"normal",placement:"auto",disableAnimation:!1,isDraggable:!1}}),Mc=h.createContext(null),Yn=()=>{const e=h.useContext(Mc);if(!e)throw new Error("Modal components must be used within a Modal");return e},ry=()=>f.jsx("svg",{"aria-hidden":"true",fill:"none",focusable:"false",height:"1em",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",width:"1em",children:f.jsx("path",{d:"m18 6-12 12M6 6l12 12"})}),sy=e=>{h.useEffect(()=>{if(!e)return;const t=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=t}},[e])},ny=(e,t)=>{const r=h.useRef(null);h.useEffect(()=>{e?(r.current=document.activeElement,setTimeout(()=>{if(t.current){const s=t.current.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');s.length>0?s[0].focus():t.current.focus()}},100)):r.current&&r.current.focus()},[e,t])},ay=(e,t,r)=>{const[s,n]=h.useState(!1),a=h.useRef(null);return h.useEffect(()=>{r||n(!1)},[r]),{dragProps:e?{drag:!0,dragMomentum:!1,dragElastic:.1,dragConstraints:t?!1:a,onDragStart:()=>n(!0),onDragEnd:()=>n(!1),whileDrag:{scale:1.02,transition:{duration:.1}}}:{},isDragging:s,constraintsRef:a}},Ac=h.forwardRef(({children:e,size:t="md",radius:r="lg",shadow:s="lg",backdrop:n="opaque",scrollBehavior:a="normal",placement:o="auto",isOpen:i,defaultOpen:l=!1,isDismissable:c=!0,isKeyboardDismissDisabled:d=!1,shouldBlockScroll:u=!0,hideCloseButton:p=!1,closeButton:m,motionProps:g,portalContainer:v=document.body,disableAnimation:x=!1,isDraggable:b=!1,allowOverflow:y=!1,classNames:w,className:C,onOpenChange:j,onClose:S,...T},k)=>{const[V,A]=h.useState(l),B=h.useRef(null),$=i!==void 0?i:V,L=W=>{i===void 0&&A(W),j?.(W),W||S?.()},I=()=>{L(!1)};h.useEffect(()=>{if(!$||d)return;const W=J=>{J.key==="Escape"&&I()};return document.addEventListener("keydown",W),()=>document.removeEventListener("keydown",W)},[$,d]);const R=W=>{c&&W.target===W.currentTarget&&I()};sy($&&u),ny($,B);const{dragProps:D,isDragging:P,constraintsRef:M}=ay(b,y,$),{wrapper:N,base:E,backdrop:F}=sr({size:t,radius:r,shadow:s,backdrop:n,scrollBehavior:a,placement:o,disableAnimation:x,isDraggable:b}),z={isOpen:$,size:t,radius:r,shadow:s,backdrop:n,scrollBehavior:a,placement:o,isDismissable:c,isKeyboardDismissDisabled:d,shouldBlockScroll:u,hideCloseButton:p,disableAnimation:x,isDraggable:b,allowOverflow:y,classNames:w,onClose:I,onOpenChange:L},O={initial:{opacity:0,scale:.9,y:20},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.9,y:20},transition:{duration:x?0:.3,ease:"easeOut"}},H=f.jsx(We,{children:$&&f.jsx(Mc.Provider,{value:z,children:f.jsx(_.div,{ref:M,className:F({className:w?.backdrop}),onClick:R,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:x?0:.2,ease:"easeOut"},children:f.jsx("div",{className:N({className:w?.wrapper}),onClick:W=>W.stopPropagation(),children:f.jsxs(_.div,{ref:k||B,className:E({className:w?.base||C}),"data-open":$,"data-dismissable":c,role:"dialog","aria-modal":"true",tabIndex:-1,...g||O,...D,style:{cursor:P?"grabbing":b?"grab":"default"},...T,children:[!p&&f.jsx("button",{type:"button",className:sr().closeButton({className:w?.closeButton}),onClick:I,"aria-label":"Close modal",children:m||f.jsx(ry,{})}),e]})})})})});return tn.createPortal(H,v)});Ac.displayName="Modal";const Vc=h.forwardRef(({children:e,className:t,...r},s)=>f.jsx("div",{ref:s,className:t,...r,children:e}));Vc.displayName="ModalContent";const Pc=h.forwardRef(({children:e,className:t,...r},s)=>{const{classNames:n,isDraggable:a}=Yn(),{header:o}=sr();return f.jsx("div",{ref:s,className:o({className:n?.header||t}),"data-framer-drag-handle":a?"":void 0,style:{cursor:a?"move":"default"},...r,children:e})});Pc.displayName="ModalHeader";const Ec=h.forwardRef(({children:e,className:t,...r},s)=>{const{classNames:n}=Yn(),{body:a}=sr();return f.jsx("div",{ref:s,className:a({className:n?.body||t}),...r,children:e})});Ec.displayName="ModalBody";const Ic=h.forwardRef(({children:e,className:t,...r},s)=>{const{classNames:n}=Yn(),{footer:a}=sr();return f.jsx("div",{ref:s,className:a({className:n?.footer||t}),...r,children:e})});Ic.displayName="ModalFooter";function oy(e={}){const{isOpen:t,defaultOpen:r=!1,onOpenChange:s,onClose:n}=e,[a,o]=h.useState(r),i=t!==void 0?t:a,l=h.useCallback(u=>{t===void 0&&o(u),s?.(u),u||n?.()},[t,s,n]),c=h.useCallback(()=>{l(!0)},[l]),d=h.useCallback(()=>{l(!1)},[l]);return{isOpen:i,onOpen:c,onClose:d,onOpenChange:l}}const nt=K({slots:{base:["flex","z-40","w-full","h-auto","items-center","justify-between","transition-background","duration-300","ease-in-out","data-[menu-open=true]:bg-content1/60","data-[hidden=true]:transform","data-[hidden=true]:-translate-y-full","data-[hidden=true]:transition-transform"],wrapper:["z-40","flex","px-6","gap-4","w-full","flex-row","relative","flex-nowrap","items-center","justify-between","h-16"],brand:["flex","basis-0","flex-row","flex-grow","flex-nowrap"],content:["flex","gap-4","h-full","flex-row","flex-nowrap","items-center","data-[justify=start]:justify-start","data-[justify=start]:flex-grow","data-[justify=center]:justify-center","data-[justify=end]:justify-end","data-[justify=end]:flex-grow","data-[justify=end]:basis-0"],item:["text-medium","whitespace-nowrap","box-border","list-none","data-[active=true]:font-medium","data-[active=true]:text-primary"],toggle:["group","flex","items-center","justify-center","w-6","h-full","outline-none","rounded-small","tap-highlight-transparent","data-[pressed=true]:bg-default-100","data-[hover=true]:bg-default-100","data-[open=true]:bg-default-100"],toggleIcon:["w-full","h-full","pointer-events-none","flex","flex-col","items-center","justify-center","text-inherit","group-data-[pressed=true]:opacity-70","transition-opacity",'before:content-[""]',"before:block","before:h-px","before:w-4","before:bg-current","before:transition-transform","before:duration-150","before:-translate-y-1","before:rotate-0",'after:content-[""]',"after:block","after:h-px","after:w-4","after:bg-current","after:transition-transform","after:duration-150","after:translate-y-1","after:rotate-0","group-data-[open=true]:before:translate-y-px","group-data-[open=true]:before:rotate-45","group-data-[open=true]:after:-translate-y-px","group-data-[open=true]:after:-rotate-45"],menu:["z-30","px-6","pt-2","fixed","flex","max-w-full","top-header","inset-x-0","bottom-0","w-screen","flex-col","gap-2","overflow-y-auto","bg-content1/60","backdrop-blur-xl","backdrop-saturate-150"],menuItem:["text-large","color-foreground","data-[active=true]:font-semibold","data-[active=true]:text-primary"]},variants:{position:{static:{base:"relative"},sticky:{base:"sticky top-0"}},maxWidth:{sm:{wrapper:"max-w-[640px]"},md:{wrapper:"max-w-[768px]"},lg:{wrapper:"max-w-[1024px]"},xl:{wrapper:"max-w-[1280px]"},"2xl":{wrapper:"max-w-[1536px]"},full:{wrapper:"max-w-full"}},isBordered:{true:{base:"border-b border-divider"}},isBlurred:{true:{base:["backdrop-blur-lg","data-[menu-open=false]:bg-background/70","backdrop-saturate-150"]},false:{base:"bg-background",menu:"bg-background"}},disableAnimation:{true:{menu:"!transition-none"}}},defaultVariants:{position:"sticky",maxWidth:"lg",isBordered:!1,isBlurred:!0,disableAnimation:!1}}),Nc=h.createContext(null),Bt=()=>{const e=h.useContext(Nc);if(!e)throw new Error("Navbar components must be used within a Navbar");return e},iy=({isOpen:e})=>{const{toggleIcon:t}=nt({disableAnimation:!1});return f.jsx("span",{className:t(),"data-open":e,children:f.jsx("span",{className:"sr-only",children:"Toggle menu"})})},Rc=h.forwardRef(({children:e,height:t="4rem",position:r="sticky",maxWidth:s="lg",parentRef:n,isBordered:a=!1,isBlurred:o=!0,isMenuOpen:i,isMenuDefaultOpen:l=!1,shouldHideOnScroll:c=!1,disableScrollHandler:d=!1,disableAnimation:u=!1,classNames:p,className:m,onMenuOpenChange:g,onScrollPositionChange:v,...x},b)=>{const[y,w]=h.useState(l),[C,j]=h.useState(!1),[S,T]=h.useState(0),k=h.useRef(null),V=i??y,A=I=>{i===void 0&&w(I),g?.(I)};h.useEffect(()=>{if(!c||d)return;const I=()=>{const D=window.scrollY,P=D>S?"down":"up";P==="down"&&D>100?j(!0):P==="up"&&j(!1),T(D),v?.(D)},R=n?.current||window;return R.addEventListener("scroll",I,{passive:!0}),()=>{R.removeEventListener("scroll",I)}},[c,d,S,n,v]);const{base:B,wrapper:$}=nt({position:r,maxWidth:s,isBordered:a,isBlurred:o,disableAnimation:u}),L={isMenuOpen:V,position:r,maxWidth:s,height:t,isBordered:a,isBlurred:o,shouldHideOnScroll:c,disableAnimation:u,classNames:p,onMenuOpenChange:A,onScrollPositionChange:v};return f.jsx(Nc.Provider,{value:L,children:f.jsx(_.nav,{ref:b||k,className:B({className:p?.base||m}),style:{height:t},"data-menu-open":V,"data-hidden":C,initial:c?{y:0}:!1,animate:c?{y:C?-100:0}:!1,transition:{duration:.3,ease:"easeInOut"},...x,children:f.jsx("header",{className:$({className:p?.wrapper}),children:e})})})});Rc.displayName="Navbar";const Bc=h.forwardRef(({children:e,className:t,...r},s)=>{const{brand:n}=nt(),a=Bt();return f.jsx("div",{ref:s,className:n({className:a?.classNames?.brand||t}),...r,children:e})});Bc.displayName="NavbarBrand";const Dc=h.forwardRef(({children:e,justify:t="start",className:r,...s},n)=>{const{content:a}=nt(),{classNames:o}=Bt();return f.jsx("ul",{ref:n,className:a({className:o?.content||r}),"data-justify":t,...s,children:e})});Dc.displayName="NavbarContent";const Lc=h.forwardRef(({children:e,isActive:t=!1,className:r,...s},n)=>{const{item:a}=nt(),{classNames:o}=Bt();return f.jsx("li",{ref:n,className:a({className:o?.item||r}),"data-active":t,...s,children:e})});Lc.displayName="NavbarItem";const Oc=h.forwardRef(({icon:e,isSelected:t,defaultSelected:r=!1,srOnlyText:s="open/close navigation menu",className:n,onChange:a,...o},i)=>{const{toggle:l}=nt(),{isMenuOpen:c,onMenuOpenChange:d,classNames:u}=Bt(),p=()=>{const m=!c;d(m),a?.(m)};return f.jsx("button",{ref:i,type:"button",className:l({className:u?.toggle||n}),"data-open":c,"data-pressed":!1,"aria-label":s,onClick:p,...o,children:typeof e=="function"?e(c):e||f.jsx(iy,{isOpen:c})})});Oc.displayName="NavbarMenuToggle";const $c=h.forwardRef(({children:e,portalContainer:t,className:r,...s},n)=>{const{menu:a}=nt(),{isMenuOpen:o,disableAnimation:i,classNames:l}=Bt(),c={closed:{opacity:0,y:-20},open:{opacity:1,y:0}},d={duration:i?0:.3,ease:"easeOut"};return f.jsx(We,{children:o&&f.jsx(_.div,{ref:n,className:a({className:l?.menu||r}),variants:c,initial:"closed",animate:"open",exit:"closed",transition:d,...s,children:f.jsx("ul",{className:"flex flex-col gap-2 py-4",children:e})})})});$c.displayName="NavbarMenu";const zc=h.forwardRef(({children:e,isActive:t=!1,className:r,...s},n)=>{const{menuItem:a}=nt(),{classNames:o}=Bt();return f.jsx("li",{ref:n,className:a({className:o?.menuItem||r}),"data-active":t,...s,children:e})});zc.displayName="NavbarMenuItem";const ly=K({slots:{base:["flex","flex-col","gap-2","w-full"],track:["relative","bg-gray-200","overflow-hidden"],indicator:["h-full","transition-all","duration-500","ease-out","origin-left"],labelWrapper:["flex","justify-between","items-center"],label:["text-sm","font-medium","text-gray-700"],value:["text-sm","font-medium","text-gray-500"]},variants:{color:{default:{indicator:"bg-gray-400"},primary:{indicator:"bg-blue-600"},secondary:{indicator:"bg-gray-600"},success:{indicator:"bg-green-600"},warning:{indicator:"bg-yellow-500"},danger:{indicator:"bg-red-600"}},size:{sm:{track:"h-1",label:"text-xs",value:"text-xs"},md:{track:"h-2",label:"text-sm",value:"text-sm"},lg:{track:"h-3",label:"text-base",value:"text-base"}},radius:{none:{track:"rounded-none"},sm:{track:"rounded-sm"},md:{track:"rounded-md"},lg:{track:"rounded-lg"},full:{track:"rounded-full"}},isStriped:{true:{indicator:["bg-gradient-to-r","from-transparent","to-transparent","bg-[length:1rem_1rem]","bg-repeat-x","animate-pulse"]}},isIndeterminate:{true:{indicator:["animate-pulse"]}},isDisabled:{true:{base:"opacity-60 cursor-not-allowed",track:"bg-gray-100",indicator:"bg-gray-300",label:"text-gray-400",value:"text-gray-400"}}},compoundVariants:[{isStriped:!0,color:"primary",class:{indicator:["bg-gradient-to-r","from-blue-600","via-blue-500","to-blue-600","bg-[length:1rem_1rem]","animate-[progress-stripes_1s_linear_infinite]"]}},{isStriped:!0,color:"success",class:{indicator:["bg-gradient-to-r","from-green-600","via-green-500","to-green-600","bg-[length:1rem_1rem]","animate-[progress-stripes_1s_linear_infinite]"]}},{isStriped:!0,color:"warning",class:{indicator:["bg-gradient-to-r","from-yellow-500","via-yellow-400","to-yellow-500","bg-[length:1rem_1rem]","animate-[progress-stripes_1s_linear_infinite]"]}},{isStriped:!0,color:"danger",class:{indicator:["bg-gradient-to-r","from-red-600","via-red-500","to-red-600","bg-[length:1rem_1rem]","animate-[progress-stripes_1s_linear_infinite]"]}},{isIndeterminate:!0,class:{indicator:["w-1/3","animate-[progress-indeterminate_2s_ease-in-out_infinite]"]}}],defaultVariants:{color:"primary",size:"md",radius:"full",isStriped:!1,isIndeterminate:!1,isDisabled:!1}}),Fc=(e=0,t=0,r=100)=>(Math.max(t,Math.min(r,e))-t)/(r-t)*100,cy=(e=0,t=100,r=0)=>{const s=Fc(e,r,t);return`${Math.round(s)}%`},Wc=h.forwardRef(({value:e=0,maxValue:t=100,minValue:r=0,color:s="primary",size:n="md",radius:a="full",showValueLabel:o=!1,label:i,isStriped:l=!1,isIndeterminate:c=!1,isDisabled:d=!1,className:u,classNames:p,...m},g)=>{const v=Fc(e,r,t),x=cy(e,t,r),b=ly({color:s,size:n,radius:a,isStriped:l,isIndeterminate:c,isDisabled:d});return f.jsxs("div",{ref:g,className:q(b.base(),p?.base,u),role:"progressbar","aria-valuemin":r,"aria-valuemax":t,"aria-valuenow":c?void 0:e,"aria-valuetext":c?"Cargando...":x,...m,children:[(i||o)&&f.jsxs("div",{className:q(b.labelWrapper(),p?.label),children:[i&&f.jsx("span",{className:q(b.label(),p?.label),children:i}),o&&!c&&f.jsx("span",{className:q(b.value(),p?.value),children:x})]}),f.jsx("div",{className:q(b.track(),p?.track),children:f.jsx(_.div,{className:q(b.indicator(),p?.indicator),initial:{scaleX:0,originX:0},animate:{scaleX:c?1:v/100,x:c?["-100%","300%"]:0},transition:c?{duration:2,repeat:1/0,ease:"easeInOut"}:{duration:.5,ease:"easeOut"},style:c?{width:"33%",transformOrigin:"left center"}:{transformOrigin:"left center"}})})]})});Wc.displayName="Progress";const dy={slow:2,normal:1,fast:.6};K({base:["inline-block","animate-spin","transition-all","duration-200","ease-in-out"],variants:{size:{xs:"w-3 h-3",sm:"w-4 h-4",md:"w-6 h-6",lg:"w-8 h-8",xl:"w-12 h-12"},color:{primary:"text-blue-600",secondary:"text-gray-600",success:"text-green-600",warning:"text-yellow-600",error:"text-red-600",neutral:"text-gray-400"},visible:{true:"opacity-100 scale-100",false:"opacity-0 scale-95 pointer-events-none"}},defaultVariants:{size:"md",color:"primary",visible:!0}});const uy=K({base:["flex","items-center","justify-center","transition-all","duration-200","ease-in-out"],variants:{overlay:{true:["fixed","inset-0","z-50","bg-white/80","backdrop-blur-sm"],false:""},position:{center:"flex-col",top:"flex-col",bottom:"flex-col",left:"flex-row",right:"flex-row-reverse"},fullScreen:{true:"w-screen h-screen",false:"w-full h-full"}},defaultVariants:{overlay:!1,position:"center",fullScreen:!1}}),fy=K({base:["text-sm","font-medium","transition-opacity","duration-200"],variants:{position:{center:"mt-2 text-center",top:"mb-2 text-center",bottom:"mt-2 text-center",left:"ml-2",right:"mr-2"},color:{primary:"text-blue-600",secondary:"text-gray-600",success:"text-green-600",warning:"text-yellow-600",error:"text-red-600",neutral:"text-gray-500"}},defaultVariants:{position:"center",color:"neutral"}});K({base:["relative","inline-block"],variants:{size:{xs:"w-3 h-3",sm:"w-4 h-4",md:"w-6 h-6",lg:"w-8 h-8",xl:"w-12 h-12"}},defaultVariants:{size:"md"}});const hy=K({base:["rounded-full","transition-all"],variants:{size:{xs:"w-2 h-2",sm:"w-3 h-3",md:"w-4 h-4",lg:"w-6 h-6",xl:"w-8 h-8"},color:{primary:"bg-blue-600",secondary:"bg-gray-600",success:"bg-green-600",warning:"bg-yellow-600",error:"bg-red-600",neutral:"bg-gray-400"}},defaultVariants:{size:"md",color:"primary"}}),py=K({base:["flex","items-center","justify-center"],variants:{size:{xs:"gap-1",sm:"gap-1",md:"gap-2",lg:"gap-2",xl:"gap-3"}},defaultVariants:{size:"md"}}),my=K({base:["rounded-full"],variants:{size:{xs:"w-1 h-1",sm:"w-1.5 h-1.5",md:"w-2 h-2",lg:"w-3 h-3",xl:"w-4 h-4"},color:{primary:"bg-blue-600",secondary:"bg-gray-600",success:"bg-green-600",warning:"bg-yellow-600",error:"bg-red-600",neutral:"bg-gray-400"}},defaultVariants:{size:"md",color:"primary"}}),gy=K({base:["flex","items-end","justify-center"],variants:{size:{xs:"gap-0.5 h-3",sm:"gap-0.5 h-4",md:"gap-1 h-6",lg:"gap-1 h-8",xl:"gap-1.5 h-12"}},defaultVariants:{size:"md"}}),by=K({base:["rounded-full"],variants:{size:{xs:"w-0.5",sm:"w-0.5",md:"w-1",lg:"w-1",xl:"w-1.5"},color:{primary:"bg-blue-600",secondary:"bg-gray-600",success:"bg-green-600",warning:"bg-yellow-600",error:"bg-red-600",neutral:"bg-gray-400"}},defaultVariants:{size:"md",color:"primary"}});K({base:["grid","gap-1"],variants:{size:{xs:"w-6 h-6",sm:"w-8 h-8",md:"w-12 h-12",lg:"w-16 h-16",xl:"w-24 h-24"},gridSize:{"2x2":"grid-cols-2 grid-rows-2","3x3":"grid-cols-3 grid-rows-3","4x4":"grid-cols-4 grid-rows-4"}},defaultVariants:{size:"md",gridSize:"3x3"}});K({base:["rounded-sm"],variants:{color:{primary:"bg-blue-600",secondary:"bg-gray-600",success:"bg-green-600",warning:"bg-yellow-600",error:"bg-red-600",neutral:"bg-gray-400"}},defaultVariants:{color:"primary"}});const yy=K({base:["relative","rounded-full","border-solid","border-transparent"],variants:{size:{xs:"w-3 h-3 border-[1px]",sm:"w-4 h-4 border-[1px]",md:"w-6 h-6 border-2",lg:"w-8 h-8 border-2",xl:"w-12 h-12 border-[3px]"},color:{primary:"border-t-blue-600 border-r-blue-600/30",secondary:"border-t-gray-600 border-r-gray-600/30",success:"border-t-green-600 border-r-green-600/30",warning:"border-t-yellow-600 border-r-yellow-600/30",error:"border-t-red-600 border-r-red-600/30",neutral:"border-t-gray-400 border-r-gray-400/30"}},defaultVariants:{size:"md",color:"primary"}});K({base:["flex","items-center","justify-center"],variants:{direction:{horizontal:"flex-row",vertical:"flex-col",circular:"relative"},size:{xs:"gap-1",sm:"gap-1",md:"gap-2",lg:"gap-2",xl:"gap-3"}},defaultVariants:{direction:"horizontal",size:"md"}});K({base:["flex","items-end","justify-center"],variants:{orientation:{vertical:"flex-row items-end",horizontal:"flex-col items-center"},size:{xs:"gap-0.5",sm:"gap-0.5",md:"gap-1",lg:"gap-1",xl:"gap-1.5"}},defaultVariants:{orientation:"vertical",size:"md"}});const xy=e=>dy[e],Cr={rotate:{animate:{rotate:360}},pulse:{animate:{scale:[1,1.2,1],opacity:[.7,1,.7]}},bounce:{animate:{y:[0,-10,0]}},wave:{animate:{scaleY:[.4,1,.4]}}},_c=({type:e="rotating",size:t="md",color:r="primary",speed:s="normal",visible:n=!0,label:a,overlay:o=!1,overlayOpacity:i=.8,overlayColor:l="bg-white",animationConfig:c,className:d,"aria-label":u="Loading","data-testid":p="spinner",style:m,...g})=>{const v=xy(s),x=()=>f.jsx(_.div,{className:yy({size:t,color:r}),animate:Cr.rotate.animate,transition:{duration:v,repeat:1/0,...c}}),b=()=>f.jsx(_.div,{className:hy({size:t,color:r}),animate:Cr.pulse.animate,transition:{duration:v,repeat:1/0,...c}}),y=()=>f.jsx("div",{className:py({size:t}),children:[0,1,2].map(k=>f.jsx(_.div,{className:my({size:t,color:r}),animate:Cr.bounce.animate,transition:{duration:v,repeat:1/0,delay:k*.1,...c}},k))}),w=()=>f.jsx("div",{className:gy({size:t}),children:[0,1,2,3,4].map(k=>f.jsx(_.div,{className:by({size:t,color:r}),animate:Cr.wave.animate,transition:{duration:v,repeat:1/0,delay:k*.1,...c}},k))}),C=()=>{switch(e){case"rotating":case"ring":return f.jsx(x,{});case"pulse":return f.jsx(b,{});case"bounce":case"dots":return f.jsx(y,{});case"wave":case"bars":return f.jsx(w,{});default:return f.jsx(x,{})}},j=uy({overlay:o,position:"center",fullScreen:o}),S=d?`${j} ${d}`:j,T={...m,...o&&i!==void 0&&{backgroundColor:`rgba(255, 255, 255, ${i})`}};return n?f.jsxs(_.div,{className:S,style:T,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},role:"status","aria-live":"polite","data-testid":p,...g,children:[C(),a&&f.jsx(_.div,{className:fy({position:"center",color:r==="neutral"?"neutral":r}),initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.1,duration:.2},children:a})]}):null};_c.displayName="Spinner";const dr={sm:{wrapper:"w-10 h-6",thumb:"w-5 h-5",label:"text-sm",startContent:"text-xs",endContent:"text-xs",thumbIcon:"w-3 h-3"},md:{wrapper:"w-12 h-7",thumb:"w-6 h-6",label:"text-base",startContent:"text-sm",endContent:"text-sm",thumbIcon:"w-4 h-4"},lg:{wrapper:"w-14 h-8",thumb:"w-7 h-7",label:"text-lg",startContent:"text-base",endContent:"text-base",thumbIcon:"w-5 h-5"}},vy=(e="primary",t=!1,r=!1)=>r?t?"bg-gray-300 border-gray-300":"bg-gray-200 border-gray-200":t?{default:"bg-gray-600 border-gray-600 hover:bg-gray-700",primary:"bg-blue-600 border-blue-600 hover:bg-blue-700",secondary:"bg-purple-600 border-purple-600 hover:bg-purple-700",success:"bg-green-600 border-green-600 hover:bg-green-700",warning:"bg-amber-500 border-amber-500 hover:bg-amber-600",danger:"bg-red-600 border-red-600 hover:bg-red-700"}[e]:"bg-gray-200 border-gray-200 hover:bg-gray-300",wy=(e=!1)=>`inline-flex items-center gap-2 cursor-pointer select-none ${e?"cursor-not-allowed opacity-60":""}`.trim(),Cy=(e="md",t="primary",r=!1,s=!1,n=!1)=>{const a=dr[e].wrapper,o=vy(t,r,s);return`relative inline-flex shrink-0 border-2 rounded-full cursor-pointer ${a} ${o} ${n?"":"transition-colors duration-200 ease-in-out"} focus-within:outline-none focus-within:ring-2 focus-within:ring-offset-2 focus-within:ring-blue-500`.trim()},ky=(e="md",t=!1)=>`font-medium ${dr[e].label} ${t?"text-gray-400":"text-gray-900"}`.trim(),Ko=(e="md",t=!1)=>`flex items-center justify-center ${dr[e].startContent} ${t?"text-gray-400":"text-gray-600"}`.trim(),jy=(e="md")=>`flex items-center justify-center text-gray-400 ${dr[e].thumbIcon}`.trim(),Sy=()=>"sr-only",Ty=({children:e,value:t,name:r,size:s="md",color:n="primary",thumbIcon:a,startContent:o,endContent:i,isSelected:l,defaultSelected:c=!1,isReadOnly:d=!1,isDisabled:u=!1,disableAnimation:p=!1,className:m="",classNames:g,onChange:v,onValueChange:x,"data-testid":b})=>{const[y,w]=h.useState(c),C=h.useRef(null),j=l!==void 0,S=j?l:y,T=F=>{if(u||d)return;const z=F.target.checked;j||w(z),v?.(F),x?.(z)},k=()=>{u||d||C.current?.click()},A=[wy(u),g?.base,m].filter(Boolean).join(" "),$=[Cy(s,n,S,u,p),g?.wrapper].filter(Boolean).join(" "),I=[ky(s,u),g?.label].filter(Boolean).join(" "),D=[Ko(s,u),g?.startContent].filter(Boolean).join(" "),M=[Ko(s,u),g?.endContent].filter(Boolean).join(" "),E=[Sy(),g?.hiddenInput].filter(Boolean).join(" ");return f.jsxs("label",{className:A,"data-testid":b,children:[o&&f.jsx(_.div,{className:D,"data-testid":`${b}-start-content`,initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:p?0:.2},children:o}),f.jsxs(My,{className:$,"data-testid":`${b}-wrapper`,children:[f.jsx("input",{ref:C,type:"checkbox",value:t,name:r,checked:S,onChange:T,disabled:u,readOnly:d,"aria-checked":S,className:E,"data-testid":`${b}-input`,onClick:k}),f.jsx(Ay,{isSelected:S,size:s,thumbIcon:a,disableAnimation:p,className:g?.thumb,"data-testid":`${b}-thumb`,onClick:k})]}),i&&f.jsx(_.div,{className:M,"data-testid":`${b}-end-content`,initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:p?0:.2},children:i}),e&&f.jsx("span",{className:I,"data-testid":`${b}-label`,children:e})]})},My=({children:e,className:t="",onClick:r,"data-testid":s})=>f.jsx(_.div,{className:t,onClick:r,"data-testid":s,whileHover:{scale:1.02},whileTap:{scale:.98},transition:{duration:.1},children:e}),Ay=({isSelected:e=!1,size:t="md",thumbIcon:r,disableAnimation:s=!1,className:n="","data-testid":a})=>{const o=dr[t],i=jy(t),c=(()=>{const p={sm:40,md:48,lg:56},m={sm:20,md:24,lg:28};return p[t]-m[t]-7})(),u=[`absolute top-0.2 left-0.5 inline-block rounded-full bg-white shadow-lg transform ring-0 flex items-center justify-center ${o.thumb}`,n].filter(Boolean).join(" ");return f.jsx(_.span,{className:u,"data-testid":a,animate:{x:e?c:0},transition:{type:"spring",stiffness:500,damping:30,duration:s?0:void 0},whileHover:{scale:1.1},whileTap:{scale:.95},style:{cursor:"pointer"},children:f.jsx(We,{mode:"wait",children:r&&f.jsx(_.div,{initial:{opacity:0,rotate:-180,scale:.5},animate:{opacity:1,rotate:0,scale:1},exit:{opacity:0,rotate:180,scale:.5},transition:{duration:s?0:.3},children:f.jsx(r,{isSelected:e,className:i})},e?"selected":"unselected")})})},Vy=(e,t)=>{if(e==="custom"&&t){const s=t.border??"",n=t.gradient??t.background??"";return[s,n].filter(Boolean).join(" ")}const r={default:"border-gray-200 bg-white dark:border-gray-700 dark:bg-gray-900",primary:"border-blue-200 bg-blue-50 dark:border-blue-800 dark:bg-blue-950",secondary:"border-gray-200 bg-gray-50 dark:border-gray-700 dark:bg-gray-800",success:"border-green-200 bg-green-50 dark:border-green-800 dark:bg-green-950",warning:"border-yellow-200 bg-yellow-50 dark:border-yellow-800 dark:bg-yellow-950",danger:"border-red-200 bg-red-50 dark:border-red-800 dark:bg-red-950",custom:"border-gray-200 bg-white dark:border-gray-700 dark:bg-gray-900"};return r[e]||r.default},Py=e=>{const t={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg"};return t[e]||t.md},Ey=e=>{const t={none:"",sm:"shadow-sm",md:"shadow-md",lg:"shadow-lg"};return t[e]||t.sm},Gc=e=>{const t={start:"text-left",center:"text-center",end:"text-right"};return t[e]||t.start},Iy=(e,t,r,s,n,a)=>{if(n)return"";const o="flex flex-col relative overflow-hidden",i=Vy(e,t),l=Py(r),c=Ey(s);return[o,i,l,c,a?"w-full":""].filter(Boolean).join(" ")},Ny=(e,t)=>["min-w-full table-auto",e?"table-compact":"",t?"table-striped":""].filter(Boolean).join(" "),Ry=e=>["bg-gray-50 dark:bg-gray-800",""].filter(Boolean).join(" "),Qs=(e,t,r,s,n)=>{const a=n?.text||"text-gray-700 dark:text-gray-300",o=n?.border||"border-gray-200 dark:border-gray-700",i=`font-semibold ${a} border-b ${o}`,l=r?"px-3 py-2":"px-6 py-3",c=s?"text-center":Gc(e),d=n?.hover||"hover:bg-gray-100 dark:hover:bg-gray-700",u=t?`cursor-pointer select-none ${d}`:"";return[i,l,c,u].filter(Boolean).join(" ")},By=(e,t,r,s,n,a)=>{const o=a?.border?`border-b ${a.border} transition-colors`:"border-b border-gray-200 dark:border-gray-700 transition-colors";let i="";e&&(i=a?.selected?a.selected:"bg-blue-50 dark:bg-blue-900/20");const l=!t&&!e?a?.hover||"hover:bg-gray-50 dark:hover:bg-gray-800/50":"";return[o,i,l,t?"opacity-50 cursor-not-allowed":"cursor-pointer"].filter(Boolean).join(" ")},Dy=(e,t,r,s)=>{const n=s?.text?s.text:"text-gray-900 dark:text-gray-100",a=t?"px-3 py-2":"px-6 py-4",o=r?"text-center":Gc(e);return[n,a,o].filter(Boolean).join(" ")},Ly=e=>["inline-block w-4 h-4 ml-2 transition-transform",e==="descending"?"rotate-180":""].filter(Boolean).join(" "),Xo=(e,t)=>e==="all"||e.has(t),Oy=(e,t)=>e.column===t?{column:t,direction:e.direction==="ascending"?"descending":"ascending"}:{column:t,direction:"ascending"},$y=()=>"animate-spin rounded-full h-8 w-8 border-b-2 border-current",Uc=h.createContext(null),Dt=()=>{const e=h.useContext(Uc);if(!e)throw new Error("Table components must be used within a Table component");return e},zy=({children:e,className:t="",color:r="default",customColor:s,layout:n="auto",radius:a="md",shadow:o="sm",maxTableHeight:i,rowHeight:l,isVirtualized:c=!1,hideHeader:d=!1,isStriped:u=!1,isCompact:p=!1,isHeaderSticky:m=!1,fullWidth:g=!0,removeWrapper:v=!1,topContent:x,bottomContent:b,topContentPlacement:y="outside",bottomContentPlacement:w="outside",showSelectionCheckboxes:C=!1,sortDescriptor:j,selectedKeys:S=new Set,defaultSelectedKeys:T=new Set,disabledKeys:k=new Set,disallowEmptySelection:V=!1,selectionMode:A="none",selectionBehavior:B="toggle",disabledBehavior:$="selection",allowDuplicateSelectionEvents:L=!1,disableAnimation:I=!1,isKeyboardNavigationDisabled:R=!1,loading:D=!1,emptyContent:P,centerHeaderText:M=!1,centerCellText:N=!1,onRowAction:E,onCellAction:F,onSelectionChange:z,onSortChange:O,columns:H,items:W,"data-testid":J,...Y})=>{const Z=h.useMemo(()=>({color:r,customColor:s,selectionMode:A,selectionBehavior:B,selectedKeys:S,disabledKeys:k,sortDescriptor:j,isStriped:u,isCompact:p,disableAnimation:I,showSelectionCheckboxes:C,onRowAction:E,onCellAction:F,onSelectionChange:z,onSortChange:O,centerHeaderText:M,centerCellText:N,columns:H,items:W}),[r,s,A,B,S,k,j,u,p,I,C,E,F,z,O,M,N,H,W]),se=h.useMemo(()=>Iy(r,s,a,o,v,g),[r,s,a,o,v,g]),ae=h.useMemo(()=>Ny(p,u),[p,u]),Te=y==="outside"&&x,pe=y==="inside"&&x,at=w==="outside"&&b,Le=w==="inside"&&b,ne={...i&&{maxHeight:i,overflowY:"auto"},...c&&l&&{height:i||400}};return f.jsx(Uc.Provider,{value:Z,children:f.jsxs("div",{className:"table-wrapper","data-testid":J,children:[Te&&f.jsx("div",{className:"table-top-content mb-4",children:x}),f.jsxs("div",{className:`${se} ${t}`.trim(),...Y,children:[pe&&f.jsx("div",{className:"table-top-content-inside p-4 border-b border-gray-200 dark:border-gray-700",children:x}),f.jsx("div",{className:"table-container overflow-auto",style:ne,children:D?f.jsx("div",{className:"flex items-center justify-center py-12",children:f.jsxs("div",{className:"flex items-center space-x-3",children:[f.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-gray-600 dark:border-gray-300"}),f.jsx("span",{className:"text-gray-600 dark:text-gray-300",children:"Loading..."})]})}):W&&W.length===0?f.jsx("div",{className:"flex items-center justify-center py-12",children:f.jsx("div",{className:"text-center",children:P||f.jsxs("div",{className:"text-gray-500 dark:text-gray-400",children:[f.jsx("div",{className:"text-4xl mb-2",children:"📄"}),f.jsx("div",{className:"text-lg font-medium mb-1",children:"No data available"}),f.jsx("div",{className:"text-sm",children:"There are no items to display"})]})})}):f.jsx("table",{className:`${ae} ${n==="fixed"?"table-fixed":""}`,role:"table","aria-label":"Data table",children:e})}),Le&&f.jsx("div",{className:"table-bottom-content-inside p-4 border-t border-gray-200 dark:border-gray-700",children:b})]}),at&&f.jsx("div",{className:"table-bottom-content mt-4",children:b})]})})},Fy=({children:e,className:t="",columns:r,"data-testid":s})=>{const{isCompact:n,selectionMode:a,showSelectionCheckboxes:o,customColor:i,centerHeaderText:l}=Dt(),c=Ry();return r&&r.length>0?f.jsx("thead",{className:`${c} ${t}`.trim(),"data-testid":s,children:f.jsxs("tr",{children:[a!=="none"&&o&&f.jsx("th",{className:Qs("start",!1,n,l,i),children:f.jsx("input",{type:"checkbox",className:"rounded border-gray-300 text-blue-600 focus:ring-blue-500","aria-label":"Select all rows"})}),r.map(d=>f.jsx(Hc,{align:d.align,allowsSorting:d.allowsSorting,hideHeader:d.hideHeader,isRowHeader:d.isRowHeader,sortIcon:d.sortIcon,textValue:d.key.toString(),width:d.width,minWidth:d.minWidth,maxWidth:d.maxWidth,children:d.label},d.key))]})}):f.jsx("thead",{className:`${c} ${t}`.trim(),"data-testid":s,children:f.jsxs("tr",{children:[a!=="none"&&o&&f.jsx("th",{className:Qs("start",!1,n,l,i),children:f.jsx("input",{type:"checkbox",className:"rounded border-gray-300 text-blue-600 focus:ring-blue-500","aria-label":"Select all rows"})}),e]})})},Hc=({children:e,className:t="",align:r="start",hideHeader:s=!1,allowsSorting:n=!1,sortIcon:a,isRowHeader:o=!1,textValue:i,width:l,minWidth:c,maxWidth:d,"data-testid":u})=>{const{isCompact:p,sortDescriptor:m,onSortChange:g,customColor:v,centerHeaderText:x}=Dt();if(s)return null;const b=Qs(r,n,p,x,v),y=()=>{if(!n||!g||!i)return;const T=Oy(m||{column:void 0,direction:"ascending"},i);g(T)},w=m?.column===i,C=w?m?.direction:void 0,j=Ly(C),S={...l&&{width:typeof l=="number"?`${l}px`:l},...c&&{minWidth:typeof c=="number"?`${c}px`:c},...d&&{maxWidth:typeof d=="number"?`${d}px`:d}};return f.jsx("th",{className:`${b} ${t}`.trim(),style:S,onClick:n?y:void 0,role:o?"rowheader":"columnheader","aria-sort":w?C==="ascending"?"ascending":"descending":n?"none":void 0,"data-testid":u,children:f.jsxs("div",{className:`flex items-center ${x?"justify-center":"justify-between"}`,children:[f.jsx("span",{children:e}),n&&f.jsx("span",{className:`${j} ${x?"ml-2":""}`,children:a||f.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 7l3-3 3 3m0 6l-3 3-3-3"})})})]})})},Kc=({children:e,className:t="",textValue:r,item:s,"data-testid":n,...a})=>{const{isStriped:o,selectedKeys:i,disabledKeys:l,onRowAction:c,customColor:d}=Dt(),u=s?.key||s?.id||r,p=u?i==="all"||i.has(u):!1,m=u?l.has(u):!1,g=By(p,m,o,!1,!0,d),v=()=>{!m&&u&&c&&c(u)};return f.jsx("tr",{className:`${g} ${t}`.trim(),onClick:v,role:"row","aria-selected":p,"aria-disabled":m,"data-testid":n,...a,children:e})},en=({children:e,className:t="",align:r="start",textValue:s,"data-testid":n,...a})=>{const{isCompact:o,onCellAction:i,centerCellText:l,customColor:c}=Dt(),d=Dy(r,o,l,c),u=()=>{i&&s&&i(s)};return f.jsx("td",{className:`${d} ${t}`.trim(),onClick:u,role:"cell","data-testid":n,...a,children:e})},Wy=({children:e,className:t="",items:r,isLoading:s=!1,loadingState:n="idle",loadingContent:a,emptyContent:o,"data-testid":i})=>{const{columns:l,items:c,isStriped:d,selectedKeys:u,disabledKeys:p,selectionMode:m,showSelectionCheckboxes:g,onSelectionChange:v}=Dt(),x=r||c||[];return s||n==="loading"?f.jsx("tbody",{className:t,"data-testid":i,children:f.jsx("tr",{children:f.jsx("td",{colSpan:l?l.length+(g?1:0):1,className:"text-center py-8",children:a||f.jsxs("div",{className:"flex items-center justify-center",children:[f.jsx("div",{className:$y()}),f.jsx("span",{className:"ml-2 text-gray-500",children:"Loading..."})]})})})}):x.length===0?f.jsx("tbody",{className:t,"data-testid":i,children:f.jsx("tr",{children:f.jsx("td",{colSpan:l?l.length+(g?1:0):1,className:"text-center py-8",children:o||f.jsx("div",{className:"text-gray-500",children:"No data available"})})})}):l&&l.length>0&&x.length>0?f.jsx("tbody",{className:t,"data-testid":i,children:x.map((b,y)=>{const w=b.key||b.id||y,C=Xo(u,w),j=Xo(p,w),S=y%2===0;return f.jsxs(Kc,{item:b,className:_y(C,j,d,S),children:[m!=="none"&&g&&f.jsx(en,{children:f.jsx("input",{type:"checkbox",checked:C,disabled:j,onChange:()=>{const T=new Set(u==="all"?[]:u);C?T.delete(w):T.add(w),v?.(T)},className:"rounded border-gray-300 text-blue-600 focus:ring-blue-500","aria-label":`Select row ${y+1}`})}),l.map(T=>f.jsx(en,{textValue:String(w),align:T.align,children:T.render?T.render(b):b[String(T.key)]||""},T.key))]},w)})}):f.jsx("tbody",{className:t,"data-testid":i,children:typeof e=="function"?e(x[0]):e})},_y=(e,t,r,s)=>{const n="border-b border-gray-200 dark:border-gray-700 transition-colors";let a="";return e?a="bg-blue-50 dark:bg-blue-900/20":r&&s&&(a="bg-gray-50 dark:bg-gray-800/50"),[n,a,!t&&!e?"hover:bg-gray-50 dark:hover:bg-gray-800/50":"",t?"opacity-50 cursor-not-allowed":"cursor-pointer"].filter(Boolean).join(" ")},Gy={sm:"p-3 text-sm",md:"p-4 text-base",lg:"p-5 text-lg"},Uy={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"},Hy=(e,t)=>{const r={solid:{success:"bg-green-500 text-white border-green-500 dark:bg-green-600 dark:border-green-600",error:"bg-red-500 text-white border-red-500 dark:bg-red-600 dark:border-red-600",warning:"bg-yellow-500 text-white border-yellow-500 dark:bg-yellow-600 dark:border-yellow-600",info:"bg-blue-500 text-white border-blue-500 dark:bg-blue-600 dark:border-blue-600",default:"bg-gray-500 text-white border-gray-500 dark:bg-gray-600 dark:border-gray-600"},bordered:{success:"bg-transparent text-green-600 border-green-500 border-2 dark:bg-gray-800 dark:text-green-400 dark:border-green-500",error:"bg-transparent text-red-600 border-red-500 border-2 dark:bg-gray-800 dark:text-red-400 dark:border-red-500",warning:"bg-transparent text-yellow-600 border-yellow-500 border-2 dark:bg-gray-800 dark:text-yellow-400 dark:border-yellow-500",info:"bg-transparent text-blue-600 border-blue-500 border-2 dark:bg-gray-800 dark:text-blue-400 dark:border-blue-500",default:"bg-transparent text-gray-600 border-gray-500 border-2 dark:bg-gray-800 dark:text-gray-300 dark:border-gray-500"},flat:{success:"bg-green-100 text-green-800 border-green-100 dark:bg-green-900/30 dark:text-green-300 dark:border-green-800",error:"bg-red-100 text-red-800 border-red-100 dark:bg-red-900/30 dark:text-red-300 dark:border-red-800",warning:"bg-yellow-100 text-yellow-800 border-yellow-100 dark:bg-yellow-900/30 dark:text-yellow-300 dark:border-yellow-800",info:"bg-blue-100 text-blue-800 border-blue-100 dark:bg-blue-900/30 dark:text-blue-300 dark:border-blue-800",default:"bg-gray-100 text-gray-800 border-gray-100 dark:bg-gray-800 dark:text-gray-300 dark:border-gray-700"},faded:{success:"bg-green-50 text-green-700 border-green-200 dark:bg-green-900/20 dark:text-green-300 dark:border-green-700",error:"bg-red-50 text-red-700 border-red-200 dark:bg-red-900/20 dark:text-red-300 dark:border-red-700",warning:"bg-yellow-50 text-yellow-700 border-yellow-200 dark:bg-yellow-900/20 dark:text-yellow-300 dark:border-yellow-700",info:"bg-blue-50 text-blue-700 border-blue-200 dark:bg-blue-900/20 dark:text-blue-300 dark:border-blue-700",default:"bg-gray-50 text-gray-700 border-gray-200 dark:bg-gray-900 dark:text-gray-300 dark:border-gray-600"},shadow:{success:"bg-white text-green-600 border-green-200 shadow-lg shadow-green-500/25 dark:bg-gray-800 dark:text-green-400 dark:border-green-700 dark:shadow-green-500/10",error:"bg-white text-red-600 border-red-200 shadow-lg shadow-red-500/25 dark:bg-gray-800 dark:text-red-400 dark:border-red-700 dark:shadow-red-500/10",warning:"bg-white text-yellow-600 border-yellow-200 shadow-lg shadow-yellow-500/25 dark:bg-gray-800 dark:text-yellow-400 dark:border-yellow-700 dark:shadow-yellow-500/10",info:"bg-white text-blue-600 border-blue-200 shadow-lg shadow-blue-500/25 dark:bg-gray-800 dark:text-blue-400 dark:border-blue-700 dark:shadow-blue-500/10",default:"bg-white text-gray-600 border-gray-200 shadow-lg shadow-gray-500/25 dark:bg-gray-800 dark:text-gray-300 dark:border-gray-600 dark:shadow-gray-900/25"}};return r[t][e]||r.solid.default},Ky=e=>{const t={top:"top-4 left-1/2 transform -translate-x-1/2","top-left":"top-4 left-4","top-right":"top-4 right-4",bottom:"bottom-4 left-1/2 transform -translate-x-1/2","bottom-left":"bottom-4 left-4","bottom-right":"bottom-4 right-4"};return t[e]||t["top-right"]},Xy=e=>{const t={top:{enter:"animate-[toast-slide-in-top_0.3s_ease-out]",exit:"animate-[toast-slide-out-top_0.2s_ease-in]"},"top-left":{enter:"animate-[toast-slide-in-left_0.3s_ease-out]",exit:"animate-[toast-slide-out-left_0.2s_ease-in]"},"top-right":{enter:"animate-[toast-slide-in-right_0.3s_ease-out]",exit:"animate-[toast-slide-out-right_0.2s_ease-in]"},bottom:{enter:"animate-[toast-slide-in-bottom_0.3s_ease-out]",exit:"animate-[toast-slide-out-bottom_0.2s_ease-in]"},"bottom-left":{enter:"animate-[toast-slide-in-left_0.3s_ease-out]",exit:"animate-[toast-slide-out-left_0.2s_ease-in]"},"bottom-right":{enter:"animate-[toast-slide-in-right_0.3s_ease-out]",exit:"animate-[toast-slide-out-right_0.2s_ease-in]"}};return t[e]||t["top-right"]},Yy=e=>{const t={success:"text-green-500 dark:text-green-400",error:"text-red-500 dark:text-red-400",warning:"text-yellow-500 dark:text-yellow-400",info:"text-blue-500 dark:text-blue-400",default:"text-gray-500 dark:text-gray-400"};return t[e]||t.default},qy=e=>{const t={success:'<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd"></path></svg>',error:'<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z" clip-rule="evenodd"></path></svg>',warning:'<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"><path fill-rule="evenodd" d="M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z" clip-rule="evenodd"></path></svg>',info:'<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"><path fill-rule="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 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z" clip-rule="evenodd"></path></svg>',default:'<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"><path fill-rule="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 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z" clip-rule="evenodd"></path></svg>'};return t[e]||t.default},Zy=()=>`toast-${Date.now()}-${Math.random().toString(36).substring(2,11)}`,Jy=({type:e,customIcon:t})=>{if(t)return f.jsx("div",{className:"flex-shrink-0",children:t});const r=Yy(e),s=qy(e);return f.jsx("div",{className:`flex-shrink-0 ${r}`,dangerouslySetInnerHTML:{__html:s}})},Xc=({id:e,type:t="default",title:r,description:s,closable:n=!0,action:a,icon:o,size:i="md",variant:l="solid",radius:c="md",position:d="top-right",className:u="",onRemove:p,onClose:m,"data-testid":g})=>{const[v,x]=h.useState(!1),b="flex items-start gap-3 border w-full max-w-sm pointer-events-auto",y=Gy[i],w=Uy[c],C=Hy(t,l),j=Xy(d),S=[b,y,w,C,v?j.exit:j.enter,u].filter(Boolean).join(" "),T=()=>{m&&m(e),x(!0),setTimeout(()=>{p(e)},200)};return h.useEffect(()=>()=>{},[]),f.jsxs("div",{className:S,"data-testid":g,children:[o!==!1&&f.jsx(Jy,{type:t,customIcon:o}),f.jsxs("div",{className:"flex-1 min-w-0",children:[r&&f.jsx("div",{className:"font-semibold text-sm mb-1 break-words",children:r}),s&&f.jsx("div",{className:"text-sm opacity-90 break-words",children:s}),a&&f.jsx("div",{className:"mt-2",children:a})]}),n&&f.jsx("button",{onClick:T,className:"flex-shrink-0 p-1 rounded-sm opacity-70 hover:opacity-100 transition-opacity focus:outline-none focus:ring-2 focus:ring-current focus:ring-offset-1 dark:focus:ring-offset-gray-800","aria-label":"Close notification",type:"button",children:f.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})},Yc=h.createContext(void 0);function Qy(e,t){switch(t.type){case"ADD_TOAST":return[...e,t.payload];case"REMOVE_TOAST":return e.filter(r=>r.id!==t.payload);case"REMOVE_ALL_TOASTS":return[];case"UPDATE_TOAST":return e.map(r=>r.id===t.payload.id?{...r,...t.payload.updates}:r);default:return e}}const ex=({children:e,position:t="top-right",maxToasts:r=5,defaultDuration:s=5e3})=>{const[n,a]=h.useReducer(Qy,[]),o=h.useCallback(u=>{const p=Zy(),m={type:"default",duration:s,closable:!0,position:t,size:"md",variant:"solid",radius:"md",...u,id:p};return a({type:"ADD_TOAST",payload:m}),m.duration&&m.duration>0&&setTimeout(()=>{a({type:"REMOVE_TOAST",payload:p})},m.duration),p},[s,t]),i=h.useCallback(u=>{a({type:"REMOVE_TOAST",payload:u})},[]),l=h.useCallback(()=>{a({type:"REMOVE_ALL_TOASTS"})},[]),c=h.useCallback((u,p)=>{a({type:"UPDATE_TOAST",payload:{id:u,updates:p}})},[]);h.useEffect(()=>{n.length>r&&n.slice(0,n.length-r).forEach(p=>{a({type:"REMOVE_TOAST",payload:p.id})})},[n,r]);const d={toasts:n,addToast:o,removeToast:i,removeAllToasts:l,updateToast:c};return f.jsx(Yc.Provider,{value:d,children:e})},qc=()=>{const e=h.useContext(Yc);if(e===void 0)throw new Error("useToastContext must be used within a ToastProvider");return e},tx=({position:e="top-right",className:t="",maxToasts:r=5,"data-testid":s})=>{const{toasts:n,removeToast:a}=qc(),o=n.filter(u=>(u.position||e)===e).slice(-r);if(o.length===0)return null;const c=["fixed z-50 flex flex-col gap-2 pointer-events-none",Ky(e),t].filter(Boolean).join(" "),d=f.jsx("div",{className:c,"data-testid":s,children:o.map(u=>f.jsx(Xc,{...u,onRemove:a,"data-testid":`toast-${u.id}`},u.id))});return tn.createPortal(d,document.body)},rx=()=>{const{addToast:e,removeToast:t,removeAllToasts:r,updateToast:s}=qc(),n=h.useCallback((p,m={})=>e({type:"default",description:p,...m}),[e]),a=h.useCallback((p,m={})=>e({type:"success",description:p,...m}),[e]),o=h.useCallback((p,m={})=>e({type:"error",description:p,duration:m.duration??0,...m}),[e]),i=h.useCallback((p,m={})=>e({type:"warning",description:p,...m}),[e]),l=h.useCallback((p,m={})=>e({type:"info",description:p,...m}),[e]),c=h.useCallback(p=>{t(p)},[t]),d=h.useCallback(()=>{r()},[r]),u=h.useCallback((p,m)=>{s(p,m)},[s]);return{toast:n,success:a,error:o,warning:i,info:l,dismiss:c,dismissAll:d,update:u}},sx=50,nx={fade:{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2,ease:"easeOut"}},scale:{initial:{opacity:0,scale:.85,transformOrigin:"center"},animate:{opacity:1,scale:1,transformOrigin:"center"},exit:{opacity:0,scale:.85,transformOrigin:"center"},transition:{type:"spring",stiffness:400,damping:25,duration:.15}},shift:{initial:{opacity:0,y:-8},animate:{opacity:1,y:0},exit:{opacity:0,y:-8},transition:{type:"spring",stiffness:500,damping:30}},bounce:{initial:{opacity:0,scale:.3,y:-20},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.8,y:-10},transition:{type:"spring",stiffness:400,damping:12,bounce:.6}},rotate:{initial:{opacity:0,scale:.8,rotate:-10},animate:{opacity:1,scale:1,rotate:0},exit:{opacity:0,scale:.8,rotate:10},transition:{type:"spring",stiffness:300,damping:20}},slide:{initial:{opacity:0,x:-20,scale:.95},animate:{opacity:1,x:0,scale:1},exit:{opacity:0,x:20,scale:.95},transition:{type:"spring",stiffness:400,damping:25}},zoom:{initial:{opacity:0,scale:.5},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.3},transition:{type:"spring",stiffness:600,damping:20}},flip:{initial:{opacity:0,rotateX:-90,scale:.9},animate:{opacity:1,rotateX:0,scale:1},exit:{opacity:0,rotateX:90,scale:.9},transition:{type:"spring",stiffness:300,damping:25}},elastic:{initial:{opacity:0,scale:.6,y:-30},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.8,y:-15},transition:{type:"spring",stiffness:200,damping:8,bounce:.8}},none:{initial:{opacity:1},animate:{opacity:1},exit:{opacity:1},transition:{duration:0}}},ax=K({base:["relative","px-2","py-1","rounded-md","text-sm","font-medium","shadow-lg","border","pointer-events-auto","max-w-xs","break-words","z-50"],variants:{size:{xs:"px-1.5 py-0.5 text-xs max-w-36",sm:"px-2 py-1 text-sm max-w-48",md:"px-3 py-1.5 text-sm max-w-xs",lg:"px-4 py-2 text-base max-w-sm"},variant:{dark:["bg-gray-900","text-white","border-gray-700","shadow-lg"],light:["bg-white","text-gray-900","border-gray-200","shadow-lg"],primary:["bg-blue-600","text-white","border-blue-500","shadow-lg"],success:["bg-green-600","text-white","border-green-500","shadow-lg"],warning:["bg-yellow-500","text-yellow-900","border-yellow-400","shadow-lg"],error:["bg-red-600","text-white","border-red-500","shadow-lg"]}},defaultVariants:{size:"md",variant:"dark"}}),ox=K({base:["absolute","border-solid","border-transparent"],variants:{placement:{top:"bottom-full left-1/2 -translate-x-1/2 border-b-6","top-start":"bottom-full left-2 border-b-6","top-end":"bottom-full right-2 border-b-6",bottom:"top-full left-1/2 -translate-x-1/2 border-t-6","bottom-start":"top-full left-2 border-t-6","bottom-end":"top-full right-2 border-t-6",left:"right-full top-1/2 -translate-y-1/2 border-r-6","left-start":"right-full top-2 border-r-6","left-end":"right-full bottom-2 border-r-6",right:"left-full top-1/2 -translate-y-1/2 border-l-6","right-start":"left-full top-2 border-l-6","right-end":"left-full bottom-2 border-l-6"},variant:{dark:"",light:"",primary:"",success:"",warning:"",error:""},size:{xs:"border-[4px]",sm:"border-[5px]",md:"border-[6px]",lg:"border-[7px]"}},compoundVariants:[{placement:["top","top-start","top-end"],variant:"dark",className:"border-b-gray-900"},{placement:["top","top-start","top-end"],variant:"light",className:"border-b-white"},{placement:["top","top-start","top-end"],variant:"primary",className:"border-b-blue-600"},{placement:["top","top-start","top-end"],variant:"success",className:"border-b-green-600"},{placement:["top","top-start","top-end"],variant:"warning",className:"border-b-yellow-500"},{placement:["top","top-start","top-end"],variant:"error",className:"border-b-red-600"},{placement:["bottom","bottom-start","bottom-end"],variant:"dark",className:"border-t-gray-900"},{placement:["bottom","bottom-start","bottom-end"],variant:"light",className:"border-t-white"},{placement:["bottom","bottom-start","bottom-end"],variant:"primary",className:"border-t-blue-600"},{placement:["bottom","bottom-start","bottom-end"],variant:"success",className:"border-t-green-600"},{placement:["bottom","bottom-start","bottom-end"],variant:"warning",className:"border-t-yellow-500"},{placement:["bottom","bottom-start","bottom-end"],variant:"error",className:"border-t-red-600"},{placement:["left","left-start","left-end"],variant:"dark",className:"border-r-gray-900"},{placement:["left","left-start","left-end"],variant:"light",className:"border-r-white"},{placement:["left","left-start","left-end"],variant:"primary",className:"border-r-blue-600"},{placement:["left","left-start","left-end"],variant:"success",className:"border-r-green-600"},{placement:["left","left-start","left-end"],variant:"warning",className:"border-r-yellow-500"},{placement:["left","left-start","left-end"],variant:"error",className:"border-r-red-600"},{placement:["right","right-start","right-end"],variant:"dark",className:"border-l-gray-900"},{placement:["right","right-start","right-end"],variant:"light",className:"border-l-white"},{placement:["right","right-start","right-end"],variant:"primary",className:"border-l-blue-600"},{placement:["right","right-start","right-end"],variant:"success",className:"border-l-green-600"},{placement:["right","right-start","right-end"],variant:"warning",className:"border-l-yellow-500"},{placement:["right","right-start","right-end"],variant:"error",className:"border-l-red-600"}],defaultVariants:{placement:"top",variant:"dark",size:"md"}}),ix=K({base:["fixed","pointer-events-none","z-50"],variants:{visible:{true:"pointer-events-auto",false:"pointer-events-none"}},defaultVariants:{visible:!1}}),Yo=K({base:["inline-block","cursor-help"],variants:{active:{true:"relative",false:""},disabled:{true:"cursor-not-allowed opacity-50",false:""}},defaultVariants:{active:!1,disabled:!1}}),lx=(e,t,r)=>{let s={...nx[e]};if((e==="shift"||e==="slide"||e==="bounce")&&t){const n=dx(t),a=ux[e];a&&a[n]&&(s={...a[n]})}return s},cx=e=>qo[e]||qo.fade,dx=e=>e.startsWith("top")?"top":e.startsWith("bottom")?"bottom":e.startsWith("left")?"left":e.startsWith("right")?"right":"top",ux={shift:{top:{initial:{opacity:0,y:8,scale:.98},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:8,scale:.98},transition:{type:"spring",stiffness:400,damping:25}},"top-start":{initial:{opacity:0,y:8,x:-4,scale:.98},animate:{opacity:1,y:0,x:0,scale:1},exit:{opacity:0,y:8,x:-4,scale:.98},transition:{type:"spring",stiffness:400,damping:25}},"top-end":{initial:{opacity:0,y:8,x:4,scale:.98},animate:{opacity:1,y:0,x:0,scale:1},exit:{opacity:0,y:8,x:4,scale:.98},transition:{type:"spring",stiffness:400,damping:25}},bottom:{initial:{opacity:0,y:-8,scale:.98},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-8,scale:.98},transition:{type:"spring",stiffness:400,damping:25}},"bottom-start":{initial:{opacity:0,y:-8,x:-4,scale:.98},animate:{opacity:1,y:0,x:0,scale:1},exit:{opacity:0,y:-8,x:-4,scale:.98},transition:{type:"spring",stiffness:400,damping:25}},"bottom-end":{initial:{opacity:0,y:-8,x:4,scale:.98},animate:{opacity:1,y:0,x:0,scale:1},exit:{opacity:0,y:-8,x:4,scale:.98},transition:{type:"spring",stiffness:400,damping:25}},left:{initial:{opacity:0,x:8,scale:.98},animate:{opacity:1,x:0,scale:1},exit:{opacity:0,x:8,scale:.98},transition:{type:"spring",stiffness:400,damping:25}},"left-start":{initial:{opacity:0,x:8,y:-4,scale:.98},animate:{opacity:1,x:0,y:0,scale:1},exit:{opacity:0,x:8,y:-4,scale:.98},transition:{type:"spring",stiffness:400,damping:25}},"left-end":{initial:{opacity:0,x:8,y:4,scale:.98},animate:{opacity:1,x:0,y:0,scale:1},exit:{opacity:0,x:8,y:4,scale:.98},transition:{type:"spring",stiffness:400,damping:25}},right:{initial:{opacity:0,x:-8,scale:.98},animate:{opacity:1,x:0,scale:1},exit:{opacity:0,x:-8,scale:.98},transition:{type:"spring",stiffness:400,damping:25}},"right-start":{initial:{opacity:0,x:-8,y:-4,scale:.98},animate:{opacity:1,x:0,y:0,scale:1},exit:{opacity:0,x:-8,y:-4,scale:.98},transition:{type:"spring",stiffness:400,damping:25}},"right-end":{initial:{opacity:0,x:-8,y:4,scale:.98},animate:{opacity:1,x:0,y:0,scale:1},exit:{opacity:0,x:-8,y:4,scale:.98},transition:{type:"spring",stiffness:400,damping:25}}},slide:{top:{initial:{opacity:0,y:20,x:-10},animate:{opacity:1,y:0,x:0},exit:{opacity:0,y:20,x:10},transition:{type:"spring",stiffness:300,damping:20}},bottom:{initial:{opacity:0,y:-20,x:-10},animate:{opacity:1,y:0,x:0},exit:{opacity:0,y:-20,x:10},transition:{type:"spring",stiffness:300,damping:20}},left:{initial:{opacity:0,x:20,y:-10},animate:{opacity:1,x:0,y:0},exit:{opacity:0,x:20,y:10},transition:{type:"spring",stiffness:300,damping:20}},right:{initial:{opacity:0,x:-20,y:-10},animate:{opacity:1,x:0,y:0},exit:{opacity:0,x:-20,y:10},transition:{type:"spring",stiffness:300,damping:20}}},bounce:{top:{initial:{opacity:0,y:30,scale:.6},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:15,scale:.8},transition:{type:"spring",stiffness:400,damping:12,bounce:.7}},bottom:{initial:{opacity:0,y:-30,scale:.6},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-15,scale:.8},transition:{type:"spring",stiffness:400,damping:12,bounce:.7}},left:{initial:{opacity:0,x:30,scale:.6},animate:{opacity:1,x:0,scale:1},exit:{opacity:0,x:15,scale:.8},transition:{type:"spring",stiffness:400,damping:12,bounce:.7}},right:{initial:{opacity:0,x:-30,scale:.6},animate:{opacity:1,x:0,scale:1},exit:{opacity:0,x:-15,scale:.8},transition:{type:"spring",stiffness:400,damping:12,bounce:.7}}}},qo={fade:{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2,delay:.05}},scale:{initial:{opacity:0,scale:.5},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.5},transition:{type:"spring",stiffness:600,damping:25,delay:.05}},shift:{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{type:"spring",stiffness:500,damping:30,delay:.05}},bounce:{initial:{opacity:0,scale:.3},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.6},transition:{type:"spring",stiffness:400,damping:15,bounce:.5,delay:.1}},rotate:{initial:{opacity:0,scale:.5,rotate:-45},animate:{opacity:1,scale:1,rotate:0},exit:{opacity:0,scale:.5,rotate:45},transition:{type:"spring",stiffness:300,damping:20,delay:.05}},slide:{initial:{opacity:0,scale:.7},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.7},transition:{type:"spring",stiffness:400,damping:25,delay:.05}},zoom:{initial:{opacity:0,scale:.2},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.2},transition:{type:"spring",stiffness:700,damping:20,delay:.05}},flip:{initial:{opacity:0,rotateX:-90,scale:.8},animate:{opacity:1,rotateX:0,scale:1},exit:{opacity:0,rotateX:90,scale:.8},transition:{type:"spring",stiffness:300,damping:25,delay:.05}},elastic:{initial:{opacity:0,scale:.4},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.7},transition:{type:"spring",stiffness:200,damping:8,bounce:.8,delay:.1}},none:{initial:{opacity:1},animate:{opacity:1},exit:{opacity:1},transition:{duration:0}}},fx={enter:.15},Zc=700,Jc=300,Qc=!1,ed=h.createContext({delayDuration:Zc,skipDelayDuration:Jc,disableHoverableContent:Qc,isPointerInTransit:!1,setIsPointerInTransit:()=>{}}),hx=()=>h.useContext(ed),px=({children:e,delayDuration:t=Zc,skipDelayDuration:r=Jc,disableHoverableContent:s=Qc})=>{const[n,a]=h.useState(!1),o={delayDuration:t,skipDelayDuration:r,disableHoverableContent:s,isPointerInTransit:n,setIsPointerInTransit:a};return f.jsx(ed.Provider,{value:o,children:e})},Zo=(e,t,r,s={mainAxis:8,crossAxis:0})=>{const n=e.getBoundingClientRect(),a=t.getBoundingClientRect(),o={width:window.innerWidth,height:window.innerHeight};let i=0,l=0;switch(r.split("-")[0]){case"top":i=n.left+n.width/2-a.width/2,l=n.top-a.height-s.mainAxis;break;case"bottom":i=n.left+n.width/2-a.width/2,l=n.bottom+s.mainAxis;break;case"left":i=n.left-a.width-s.mainAxis,l=n.top+n.height/2-a.height/2;break;case"right":i=n.right+s.mainAxis,l=n.top+n.height/2-a.height/2;break}r.includes("-start")?r.startsWith("top")||r.startsWith("bottom")?i=n.left+s.crossAxis:l=n.top+s.crossAxis:r.includes("-end")&&(r.startsWith("top")||r.startsWith("bottom")?i=n.right-a.width-s.crossAxis:l=n.bottom-a.height-s.crossAxis);let c=r;return i<8?i=8:i+a.width>o.width-8&&(i=o.width-a.width-8),l<8?r.startsWith("top")&&n.bottom+a.height+s.mainAxis<o.height?(c=r.replace("top","bottom"),l=n.bottom+s.mainAxis):l=8:l+a.height>o.height-8&&(r.startsWith("bottom")&&n.top-a.height-s.mainAxis>0?(c=r.replace("bottom","top"),l=n.top-a.height-s.mainAxis):l=o.height-a.height-8),{x:i,y:l,placement:c}},mx=e=>{const{placement:t="top",trigger:r="hover",disabled:s=!1,open:n,defaultOpen:a=!1,onOpenChange:o,delay:i,offset:l={mainAxis:8,crossAxis:0}}=e,c=hx(),d={show:i?.show??(r==="hover"?c?.delayDuration??700:0),hide:i?.hide??(r==="hover"?150:0)},u={mainAxis:l?.mainAxis??8,crossAxis:l?.crossAxis??0},[p,m]=h.useState(a),[g,v]=h.useState(null),[x,b]=h.useState(null),[y,w]=h.useState({x:0,y:0,placement:t}),C=h.useRef(void 0),j=h.useRef(void 0),S=h.useId(),T=n!==void 0,k=T?n:p;h.useEffect(()=>{if(g&&x&&k){const L=Zo(g,x,t,u);w(L)}},[g,x,k,t,u]),h.useEffect(()=>{if(!k||!g||!x)return;const L=()=>{const I=Zo(g,x,t,u);w(I)};return window.addEventListener("resize",L),window.addEventListener("scroll",L,!0),()=>{window.removeEventListener("resize",L),window.removeEventListener("scroll",L,!0)}},[k,g,x,t,l]);const V=h.useCallback(()=>{if(s)return;j.current&&(window.clearTimeout(j.current),j.current=void 0);const L=d.show;L>0?C.current=window.setTimeout(()=>{T?o?.(!0):m(!0)},L):T?o?.(!0):m(!0)},[s,d.show,T,o]),A=h.useCallback(()=>{C.current&&(window.clearTimeout(C.current),C.current=void 0);const L=d.hide;L>0?j.current=window.setTimeout(()=>{T?o?.(!1):m(!1)},L):T?o?.(!1):m(!1)},[d.hide,T,o]),B=h.useCallback(()=>{k?A():V()},[k,V,A]);h.useEffect(()=>()=>{C.current&&window.clearTimeout(C.current),j.current&&window.clearTimeout(j.current)},[]);const $=h.useCallback(()=>{const L={"aria-describedby":k?S:void 0};if(s)return L;switch(r){case"hover":return{...L,onMouseEnter:V,onMouseLeave:A};case"click":return{...L,onClick:B};case"focus":return{...L,onFocus:V,onBlur:A};case"manual":return L;default:return L}},[s,r,S,k,V,A,B]);return{isOpen:k,referenceElement:g,setReferenceElement:v,tooltipElement:x,setTooltipElement:b,position:y,id:S,getTriggerProps:$,openTooltip:V,closeTooltip:A,toggleTooltip:B}},gx=({variant:e="dark",size:t="md",placement:r,animation:s="fade",className:n})=>{const a=cx(s);return f.jsx(_.div,{className:ox({placement:r,variant:e,size:t,className:n}),initial:a.initial,animate:a.animate,exit:a.exit,transition:a.transition})},bx=({content:e,variant:t="dark",size:r="md",animation:s="fade",arrow:n={enabled:!0},className:a,style:o,id:i,isOpen:l,position:c,onRef:d})=>{const u=()=>lx(s,c.placement);return f.jsx(We,{children:l&&f.jsxs(_.div,{ref:d,id:i,role:"tooltip",className:ax({size:r,variant:t,className:a}),style:{position:"fixed",left:c.x,top:c.y,...o},initial:u().initial,animate:u().animate,exit:u().exit,transition:{duration:fx.enter,ease:"easeOut"},children:[e,n?.enabled&&f.jsx(gx,{variant:t,size:r,placement:c.placement,animation:s})]})})},yx=e=>{const{children:t,content:r,disabled:s=!1,portal:n=!0,portalContainer:a,asChild:o=!1,className:i,style:l,variant:c="dark",size:d="md",animation:u="fade",arrow:p={enabled:!0},zIndex:m=sx,"aria-label":g}=e,{isOpen:v,setReferenceElement:x,setTooltipElement:b,position:y,id:w,getTriggerProps:C}=mx(e),j=()=>{const T=C();if(o&&h.isValidElement(t)){const k=t.props,V={...k,...T,ref:A=>{x(A),typeof k.ref=="function"?k.ref(A):k.ref?.current!==void 0&&(k.ref.current=A)},className:Yo({active:v,disabled:s,className:k.className})};return h.createElement(t.type,V)}return f.jsx("span",{ref:x,className:Yo({active:v,disabled:s,className:i}),style:l,"aria-label":g,...T,children:t})},S=()=>{const T=f.jsx("div",{className:ix({visible:v}),style:{zIndex:m},children:f.jsx(bx,{content:r,variant:c,size:d,animation:u,arrow:p,id:w,isOpen:v,position:y,onRef:b})});if(n){const k=a||document.body;return tn.createPortal(T,k)}return T};return f.jsxs(f.Fragment,{children:[j(),S()]})},xx=(e=!1)=>{const t=["flex items-center gap-3","max-w-fit"];return e&&t.push("cursor-pointer","rounded-lg","px-2 py-1","transition-all duration-200 ease-in-out","hover:bg-gray-100 dark:hover:bg-gray-800","focus:outline-none","focus:ring-2 focus:ring-blue-500 focus:ring-offset-2","data-[focus-visible]:ring-2 data-[focus-visible]:ring-blue-500"),t.join(" ")},vx=()=>["flex flex-col","justify-center","min-w-0"].join(" "),wx=()=>["text-sm font-medium","text-gray-900 dark:text-white","truncate"].join(" "),Cx=()=>["text-xs","text-gray-500 dark:text-gray-400","truncate"].join(" "),kx=(e="md")=>({sm:"w-8 h-8 text-xs",md:"w-10 h-10 text-sm",lg:"w-12 h-12 text-base"})[e],jx=(e="default")=>({default:"bg-gray-200 text-gray-800 dark:bg-gray-700 dark:text-gray-200",primary:"bg-blue-500 text-white",secondary:"bg-purple-500 text-white",success:"bg-green-500 text-white",warning:"bg-yellow-500 text-white",danger:"bg-red-500 text-white"})[e],Sx=(e="md",t="default",r=!1,s=!1)=>{const n=["inline-flex items-center justify-center","overflow-hidden","select-none","flex-shrink-0",kx(e),jx(t)];return r?n.push("rounded-md"):n.push("rounded-full"),s&&n.push("opacity-50 cursor-not-allowed"),n.join(" ")},Tx=e=>e.split(" ").map(t=>t.charAt(0)).join("").toUpperCase().slice(0,2),Mx=()=>["w-full h-full","object-cover","rounded-inherit"].join(" "),td=h.forwardRef(({src:e,alt:t,name:r="",size:s="md",className:n="",isSquared:a=!1,color:o="default",isDisabled:i=!1,fallback:l,...c},d)=>{const[u,p]=h.useState(!1),g=[Sx(s,o,a,i),n].filter(Boolean).join(" "),v=()=>{p(!0)},x=()=>l||(e&&!u?f.jsx("img",{src:e,alt:t||r,className:Mx(),onError:v}):r?f.jsx("span",{children:Tx(r)}):f.jsx("svg",{className:"w-full h-full p-1",fill:"currentColor",viewBox:"0 0 20 20",children:f.jsx("path",{fillRule:"evenodd",d:"M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z",clipRule:"evenodd"})}));return f.jsx("div",{ref:d,className:g,...c,children:x()})});td.displayName="Avatar";const rd=h.forwardRef(({name:e,description:t,isFocusable:r=!1,avatarProps:s={},className:n="",classNames:a,onClick:o,"data-testid":i,...l},c)=>{const u=[xx(r),a?.base,n].filter(Boolean).join(" "),m=[vx(),a?.wrapper].filter(Boolean).join(" "),v=[wx(),a?.name].filter(Boolean).join(" "),b=[Cx(),a?.description].filter(Boolean).join(" "),y=()=>{r&&o&&o()},w=C=>{r&&(C.key==="Enter"||C.key===" ")&&(C.preventDefault(),o?.())};return f.jsxs("div",{ref:c,className:u,onClick:y,onKeyDown:w,tabIndex:r?0:void 0,role:r?"button":void 0,"data-testid":i,...l,children:[f.jsx(td,{...s,name:s.name||e,"data-testid":i?`${i}-avatar`:void 0}),(e||t)&&f.jsxs("div",{className:m,children:[e&&f.jsx("span",{className:v,"data-testid":i?`${i}-name`:void 0,children:e}),t&&f.jsx("span",{className:b,"data-testid":i?`${i}-description`:void 0,children:t})]})]})});rd.displayName="User";const sd=h.createContext(void 0),qn=()=>{const e=h.useContext(sd);if(!e)throw new Error("useSidebar must be used within a SidebarProvider");return e},Ax=({children:e})=>{const[t,r]=h.useState(!1),[s,n]=h.useState(!1);h.useEffect(()=>{const c=()=>{n(window.innerWidth<768)};return c(),window.addEventListener("resize",c),()=>window.removeEventListener("resize",c)},[]);const a=h.useCallback(()=>{r(c=>!c)},[]),o=h.useCallback(()=>{r(!0)},[]),i=h.useCallback(()=>{r(!1)},[]);h.useEffect(()=>(t&&s?document.body.style.overflow="hidden":document.body.style.overflow="unset",()=>{document.body.style.overflow="unset"}),[t,s]);const l={isOpen:t,isMobile:s,toggle:a,open:o,close:i};return f.jsx(sd.Provider,{value:l,children:e})},Vx=({children:e,className:t="",width:r=280,position:s="left",variant:n="temporary",backdrop:a=!0,closeOnBackdropClick:o=!0,closeOnEscape:i=!0})=>{const{isOpen:l,isMobile:c,close:d}=qn();h.useEffect(()=>{if(!i||!l)return;const b=y=>{y.key==="Escape"&&d()};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[i,l,d]);const u=()=>{o&&d()},p={open:{x:0,transition:{type:"spring",stiffness:300,damping:30}},closed:{x:s==="left"?-r:r,transition:{type:"spring",stiffness:300,damping:30}}},m={open:{opacity:1,transition:{duration:.2}},closed:{opacity:0,transition:{duration:.2}}},g=()=>n==="permanent"||n==="persistent"&&!c?!0:l,v=()=>a&&l&&(c||n==="temporary"),x=["fixed top-0 z-40 h-full","bg-white dark:bg-gray-800","border-gray-200 dark:border-gray-700","shadow-lg dark:shadow-2xl",s==="left"?"left-0 border-r":"right-0 border-l",n==="permanent"&&"lg:relative lg:translate-x-0",n==="persistent"&&!c&&"md:relative md:translate-x-0",t].filter(Boolean).join(" ");return f.jsxs(f.Fragment,{children:[f.jsx(We,{children:v()&&f.jsx(_.div,{initial:"closed",animate:"open",exit:"closed",variants:m,className:"fixed inset-0 z-30 bg-black/50 backdrop-blur-sm",onClick:u,role:"button",tabIndex:-1,"aria-label":"Close sidebar"})}),f.jsx(We,{mode:"wait",children:g()&&f.jsx(_.aside,{initial:"closed",animate:"open",exit:"closed",variants:p,className:x,style:{width:typeof r=="number"?`${r}px`:r},role:"complementary","aria-label":"Sidebar navigation",children:f.jsx("div",{className:"flex flex-col h-full",children:e})})})]})},Px=({children:e,className:t="",showCloseButton:r=!1,onClose:s})=>{const n=["flex items-center justify-between","px-4 py-3","border-b border-gray-200 dark:border-gray-700","bg-gray-50 dark:bg-gray-900",t].filter(Boolean).join(" ");return f.jsxs("div",{className:n,children:[f.jsx("div",{className:"flex-1",children:e}),r&&f.jsx("button",{onClick:s,className:"ml-2 p-1 rounded-md hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors","aria-label":"Close sidebar",children:f.jsx("svg",{className:"w-5 h-5 text-gray-500 dark:text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})},Ex=({children:e,className:t=""})=>{const r=["flex-1 overflow-y-auto","px-4 py-2","scrollbar-thin scrollbar-thumb-gray-300 dark:scrollbar-thumb-gray-600","scrollbar-track-gray-100 dark:scrollbar-track-gray-800",t].filter(Boolean).join(" ");return f.jsx("div",{className:r,children:e})},Ix=({children:e,className:t=""})=>{const r=["flex items-center","px-4 py-3","border-t border-gray-200 dark:border-gray-700","bg-gray-50 dark:bg-gray-900",t].filter(Boolean).join(" ");return f.jsx("div",{className:r,children:e})},Nx=({children:e,icon:t,isActive:r=!1,href:s,to:n,onClick:a,className:o="",disabled:i=!1})=>{const l=n||s,c=["flex items-center gap-3","px-3 py-2 mx-2 my-1","rounded-lg","text-sm font-medium","transition-colors duration-200","focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-1","dark:focus:ring-offset-gray-800"],d=i?["text-gray-400 dark:text-gray-600","cursor-not-allowed"]:r?["bg-blue-100 dark:bg-blue-900/30","text-blue-900 dark:text-blue-100","border-l-4 border-blue-500","pl-2 ml-2"]:["text-gray-700 dark:text-gray-300","hover:bg-gray-100 dark:hover:bg-gray-700","hover:text-gray-900 dark:hover:text-white"],u=[...c,...d,o].filter(Boolean).join(" "),p=f.jsxs(f.Fragment,{children:[t&&f.jsx("span",{className:`flex-shrink-0 ${i?"opacity-50":""}`,children:t}),f.jsx("span",{className:"flex-1 truncate",children:e})]}),m={className:u,onClick:i?void 0:a,"aria-disabled":i,role:l?"link":"button"};if(l&&!i){if(n)return f.jsx(Zr,{to:n,className:u,onClick:a,children:p});if(s)return f.jsx("a",{href:s,...m,children:p})}return f.jsx("button",{type:"button",...m,disabled:i,children:p})},Rx=({children:e,className:t="","aria-label":r="Toggle sidebar"})=>{const{isOpen:s,toggle:n}=qn(),a=["inline-flex items-center justify-center","w-10 h-10","rounded-md","text-gray-500 dark:text-gray-400","hover:bg-gray-100 dark:hover:bg-gray-700","hover:text-gray-900 dark:hover:text-white","focus:outline-none focus:ring-2 focus:ring-blue-500","transition-colors duration-200",t].filter(Boolean).join(" ");return f.jsx("button",{onClick:n,className:a,"aria-label":r,"aria-expanded":s,children:e||f.jsx(_.div,{animate:{rotate:s?180:0},transition:{duration:.2},children:f.jsx(Bx,{})})})},Bx=()=>f.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})}),nd=h.createContext(null),Zn=()=>{const e=h.useContext(nd);if(!e)throw new Error("useLibraryRouter must be used within a LibraryRouterProvider");return e},Dx=({children:e,initialRoutes:t=[],onRouteChange:r})=>{const s=Er.useNavigate(),n=Er.useLocation(),[a,o]=h.useState(t),i=n.pathname;h.useEffect(()=>{r?.(i)},[i,r]);const l=h.useCallback(v=>{s(v)},[s]),c=h.useCallback(()=>{window.history.back()},[]),d=h.useCallback(()=>{window.history.forward()},[]),u=h.useCallback(v=>{o(x=>x.some(y=>y.path===v.path)?x.map(y=>y.path===v.path?v:y):[...x,v])},[]),p=h.useCallback(v=>{o(x=>x.filter(b=>b.path!==v))},[]),m=h.useCallback(v=>a.filter(x=>x.category===v),[a]),g=h.useMemo(()=>({routes:a,currentPath:i,navigate:l,goBack:c,goForward:d,addRoute:u,removeRoute:p,getRoutesByCategory:m}),[a,i,l,c,d,u,p,m]);return f.jsx(nd.Provider,{value:g,children:e})},Lx=({routes:e,className:t="",renderItem:r})=>{const{currentPath:s}=Zn(),n=(a,o)=>f.jsxs(Zr,{to:a.path,className:`flex items-center gap-3 px-3 py-2 mx-2 my-1 rounded-lg text-sm font-medium transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-1 dark:focus:ring-offset-gray-800 ${o?"bg-blue-100 dark:bg-blue-900/30 text-blue-900 dark:text-blue-100 border-l-4 border-blue-500 pl-2 ml-2":"text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 hover:text-gray-900 dark:hover:text-white"}`,children:[a.icon&&f.jsx("span",{className:"flex-shrink-0",children:a.icon}),f.jsx("span",{className:"flex-1 truncate",children:a.label})]},a.path);return f.jsx("nav",{className:t,children:e.map(a=>f.jsxs("div",{className:"pb-2",children:[f.jsx("h3",{className:"px-3 py-2 text-xs font-semibold text-gray-500 dark:text-gray-400 uppercase tracking-wider",children:a.label}),f.jsx("div",{className:"space-y-1",children:a.routes.map(o=>{const i=o.exact?s===o.path:s.startsWith(o.path);return r?r(o,i):n(o,i)})})]},a.label))})},Ox=()=>{const{navigate:e,goBack:t,goForward:r,currentPath:s,routes:n}=Zn(),a=h.useCallback((c,d)=>{d?window.history.replaceState(null,"",c):e(c)},[e]),o=h.useCallback((c,d=!1)=>d?s===c:s.startsWith(c),[s]),i=h.useCallback(()=>n.find(c=>c.exact?s===c.path:s.startsWith(c.path)),[n,s]),l=h.useCallback(c=>n.find(d=>d.path===c),[n]);return{navigateTo:a,goBack:t,goForward:r,isActive:o,currentPath:s,getCurrentRoute:i,getRouteByPath:l,routes:n}},$x=(e,t)=>e.toLowerCase().includes(t.toLowerCase());function zx(e){return e?Array.from(e):[]}function xs(e){if(typeof e=="object"&&e!==null){const t=e;return t.textValue||t.label||t.value||t.title||String(t.key||"")}return String(e)}function bt(e,t){if(typeof e=="object"&&e!==null){const r=e;return r.key??r.id??t}return t}function ad(e){const{items:t,defaultItems:r,inputValue:s,defaultInputValue:n="",selectedKey:a,defaultSelectedKey:o,menuTrigger:i="input",allowsCustomValue:l=!1,allowsEmptyCollection:c=!0,shouldCloseOnBlur:d=!0,defaultFilter:u=$x,filterOptions:p,isDisabled:m=!1,isReadOnly:g=!1,autoFocus:v=!1,onInputChange:x,onSelectionChange:b,onOpenChange:y,onFocus:w,onBlur:C,onFocusChange:j,onKeyDown:S,onKeyUp:T,onClose:k,onClear:V,...A}=e,B=h.useRef(null),$=h.useRef(null),[L,I]=h.useState(n),[R,D]=h.useState(o||null),[P,M]=h.useState(!1),[N]=h.useState(!1),[E,F]=h.useState(null),z=s??L,O=a??R,H=h.useMemo(()=>zx(t??r),[t,r]),W=h.useMemo(()=>!z.trim()&&i!=="focus"?c?H:[]:z.trim()?H.filter(Q=>{const de=xs(Q);return u(de,z)}):H,[H,z,u,c,i]),J=h.useCallback(Q=>{if(s===void 0&&I(Q),x?.(Q),i==="input"&&Q.trim()&&!P&&(M(!0),y?.(!0,"input")),O!==null&&!l){const de=H.find((ge,_e)=>bt(ge,_e)===O);de&&xs(de)!==Q&&(a===void 0&&D(null),b?.(null))}},[s,x,i,P,y,O,l,H,a,b]),Y=h.useCallback(Q=>{a===void 0&&D(Q),b?.(Q);const de=H.find((ge,_e)=>bt(ge,_e)===Q);if(de){const ge=xs(de);J(ge)}M(!1),y?.(!1),k?.()},[a,b,H,J,y,k]),Z=h.useCallback((Q,de)=>{M(Q),y?.(Q,de),Q||(F(null),k?.())},[y,k]),se=h.useCallback(Q=>{if(S?.(Q),!(m||g))switch(Q.key){case"ArrowDown":if(Q.preventDefault(),!P)M(!0),y?.(!0,"manual");else{const de=E!==null?W.findIndex((_e,Ot)=>bt(_e,Ot)===E):-1,ge=de<W.length-1?de+1:0;W[ge]&&F(bt(W[ge],ge))}break;case"ArrowUp":if(Q.preventDefault(),!P)M(!0),y?.(!0,"manual");else{const de=E!==null?W.findIndex((_e,Ot)=>bt(_e,Ot)===E):W.length,ge=de>0?de-1:W.length-1;W[ge]&&F(bt(W[ge],ge))}break;case"Enter":Q.preventDefault(),P&&E!==null&&Y(E);break;case"Escape":Q.preventDefault(),P&&(M(!1),y?.(!1),k?.());break;case"Tab":P&&(M(!1),y?.(!1),k?.());break}},[S,m,g,P,y,E,W,Y,k]),ae=h.useCallback(Q=>{w?.(Q),j?.(!0),i==="focus"&&!P&&(M(!0),y?.(!0,"focus"))},[w,j,i,P,y]),Te=h.useCallback(Q=>{C?.(Q),j?.(!1),d&&P&&setTimeout(()=>{M(!1),y?.(!1),k?.()},150)},[C,j,d,P,y,k]),pe=h.useCallback(()=>{J(""),a===void 0&&D(null),b?.(null),V?.(),B.current&&B.current.focus()},[J,a,b,V]),at=h.useCallback(Q=>{Y(Q)},[Y]),Le=h.useCallback(()=>{P||Z(!0,"manual")},[P,Z]),ne=h.useCallback(()=>{P&&Z(!1)},[P,Z]);h.useEffect(()=>{v&&B.current&&B.current.focus()},[v]),h.useEffect(()=>{const Q=de=>{P&&$.current&&!$.current.contains(de.target)&&(M(!1),y?.(!1),k?.())};if(P)return document.addEventListener("mousedown",Q),()=>{document.removeEventListener("mousedown",Q)}},[P,y,k]);const{size:je,...ye}=A,Ze=h.useMemo(()=>({...ye,ref:B,value:z,onChange:Q=>J(Q.target.value),onFocus:ae,onBlur:Te,onKeyDown:se,onKeyUp:T,disabled:m,readOnly:g,"aria-expanded":P,"aria-haspopup":"listbox","aria-autocomplete":"list",role:"combobox"}),[ye,z,J,ae,Te,se,T,m,g,P]),Oe=h.useMemo(()=>({role:"listbox","aria-label":"Suggestions"}),[]),Qr=h.useMemo(()=>({isOpen:P,onOpenChange:Z}),[P,Z]),fr=h.useMemo(()=>({type:"button",onClick:pe,"aria-label":"Clear",tabIndex:-1}),[pe]),Me=h.useMemo(()=>({type:"button",onClick:()=>{P?ne():Le()},"aria-label":P?"Close menu":"Open menu","aria-expanded":P,tabIndex:-1}),[P,ne,Le]);return{inputValue:z,selectedKey:O,isOpen:P,isLoading:N,filteredItems:W,focusedKey:E,inputProps:Ze,listboxProps:Oe,popoverProps:Qr,clearButtonProps:fr,selectorButtonProps:Me,containerRef:$,clearValue:pe,selectItem:at,close:ne,open:Le,setInputValue:J,setSelectedKey:Q=>{Q===null?(a===void 0&&D(null),b?.(null)):Y(Q)},setIsOpen:Z}}const Fx=K({base:["group relative w-full","inline-flex flex-col","text-foreground-500"],variants:{variant:{flat:"",bordered:"",faded:"",underlined:""},color:{default:"",primary:"",secondary:"",success:"",warning:"",danger:""},size:{sm:"",md:"",lg:""},labelPlacement:{inside:"",outside:"flex-col","outside-left":"flex-row items-center"},fullWidth:{true:"w-full",false:"w-auto"},isDisabled:{true:"opacity-disabled cursor-not-allowed",false:""},disableAnimation:{true:"",false:"transition-colors duration-200 ease-in-out"}},defaultVariants:{variant:"flat",color:"default",size:"md",labelPlacement:"inside",fullWidth:!0,isDisabled:!1,disableAnimation:!1}}),Wx=K({base:["relative flex w-full","min-h-unit-10 items-center gap-2","px-3 py-2","transition-colors duration-200","group-data-[focus=true]:outline-2","group-data-[focus=true]:outline-focus","group-data-[focus=true]:outline-offset-2"],variants:{variant:{flat:["bg-default-100","data-[hover=true]:bg-default-200","group-data-[focus=true]:bg-default-100"],bordered:["border-2 border-default-200","data-[hover=true]:border-default-300","group-data-[focus=true]:border-default-foreground","bg-transparent"],faded:["bg-default-100 border-2 border-transparent","data-[hover=true]:border-default-200","group-data-[focus=true]:border-default-300","group-data-[focus=true]:bg-default-50"],underlined:["rounded-none border-b-2 border-default-300","data-[hover=true]:border-default-400","group-data-[focus=true]:border-default-foreground","bg-transparent px-1 pb-0","after:content-[''] after:w-0 after:origin-center","after:absolute after:left-1/2 after:-translate-x-1/2","after:bottom-0 after:h-[2px]","after:transition-[width] after:duration-300","group-data-[focus=true]:after:w-full"]},color:{default:"",primary:{flat:"group-data-[focus=true]:bg-primary-50",bordered:"group-data-[focus=true]:border-primary",faded:"group-data-[focus=true]:border-primary group-data-[focus=true]:bg-primary-50",underlined:["group-data-[focus=true]:border-primary","after:bg-primary"]},secondary:{flat:"group-data-[focus=true]:bg-secondary-50",bordered:"group-data-[focus=true]:border-secondary",faded:"group-data-[focus=true]:border-secondary group-data-[focus=true]:bg-secondary-50",underlined:["group-data-[focus=true]:border-secondary","after:bg-secondary"]},success:{flat:"group-data-[focus=true]:bg-success-50",bordered:"group-data-[focus=true]:border-success",faded:"group-data-[focus=true]:border-success group-data-[focus=true]:bg-success-50",underlined:["group-data-[focus=true]:border-success","after:bg-success"]},warning:{flat:"group-data-[focus=true]:bg-warning-50",bordered:"group-data-[focus=true]:border-warning",faded:"group-data-[focus=true]:border-warning group-data-[focus=true]:bg-warning-50",underlined:["group-data-[focus=true]:border-warning","after:bg-warning"]},danger:{flat:"group-data-[focus=true]:bg-danger-50",bordered:"group-data-[focus=true]:border-danger",faded:"group-data-[focus=true]:border-danger group-data-[focus=true]:bg-danger-50",underlined:["group-data-[focus=true]:border-danger","after:bg-danger"]}},size:{sm:"min-h-unit-8 px-2 py-1",md:"min-h-unit-10 px-3 py-2",lg:"min-h-unit-12 px-4 py-3"},radius:{none:"rounded-none",sm:"rounded-small",md:"rounded-medium",lg:"rounded-large",full:"rounded-full"},labelPlacement:{inside:"",outside:"","outside-left":""},isInvalid:{true:{flat:"bg-danger-50 text-danger",bordered:"border-danger data-[hover=true]:border-danger",faded:"border-danger bg-danger-50",underlined:"border-danger after:bg-danger"},false:""},isDisabled:{true:"opacity-disabled pointer-events-none",false:""}},compoundVariants:[{variant:"underlined",size:"sm",class:"px-1 pb-0"},{variant:"underlined",size:"md",class:"px-1 pb-0"},{variant:"underlined",size:"lg",class:"px-1 pb-0"}],defaultVariants:{variant:"flat",color:"default",size:"md",radius:"md",labelPlacement:"inside",isInvalid:!1,isDisabled:!1}});K({base:["w-full font-normal bg-transparent outline-none","placeholder:text-foreground-500","text-small text-foreground"],variants:{size:{sm:"text-small",md:"text-medium",lg:"text-large"},isDisabled:{true:"pointer-events-none",false:""}},defaultVariants:{size:"md",isDisabled:!1}});K({base:["block text-foreground-600","cursor-pointer","transition-colors duration-200","will-change-auto","origin-top-left"],variants:{size:{sm:"text-small",md:"text-small",lg:"text-medium"},labelPlacement:{inside:["absolute left-3 rtl:left-auto rtl:right-3","pointer-events-none z-10","transition-[transform,color,left,opacity] duration-200 ease-out","group-data-[filled=true]:scale-85","group-data-[filled=true]:-translate-y-[calc(50%_+_theme(fontSize.small)/2_-_6px)]","group-data-[filled=true]:pointer-events-auto"],outside:["relative text-foreground pb-1.5","will-change-auto !duration-200 !ease-out transition-colors motion-reduce:transition-none"],"outside-left":["relative text-foreground pr-2 rtl:pr-0 rtl:pl-2","will-change-auto !duration-200 !ease-out transition-colors motion-reduce:transition-none"]},color:{default:"",primary:"group-data-[focus=true]:text-primary",secondary:"group-data-[focus=true]:text-secondary",success:"group-data-[focus=true]:text-success",warning:"group-data-[focus=true]:text-warning",danger:"group-data-[focus=true]:text-danger"},isRequired:{true:"after:content-['*'] after:text-danger after:ml-0.5",false:""},isInvalid:{true:"!text-danger",false:""},isDisabled:{true:"opacity-disabled pointer-events-none",false:""}},compoundVariants:[{labelPlacement:"inside",size:"sm",class:["group-data-[filled=true]:-translate-y-[calc(50%_+_theme(fontSize.small)/2_-_8px)]","left-2 rtl:left-auto rtl:right-2"]},{labelPlacement:"inside",size:"lg",class:["group-data-[filled=true]:-translate-y-[calc(50%_+_theme(fontSize.small)/2_-_4px)]","left-4 rtl:left-auto rtl:right-4"]}],defaultVariants:{size:"md",labelPlacement:"inside",color:"default",isRequired:!1,isInvalid:!1,isDisabled:!1}});K({base:"text-small text-foreground-400 px-1",variants:{color:{default:"text-foreground-400",primary:"text-primary-600",secondary:"text-secondary-600",success:"text-success-600",warning:"text-warning-600",danger:"text-danger-500"},isInvalid:{true:"text-danger-500",false:""}},defaultVariants:{color:"default",isInvalid:!1}});const _x=K({base:["w-full p-1 min-w-[200px]","bg-content1 border border-divider","rounded-medium shadow-large"],variants:{disableAnimation:{true:"",false:"animate-in fade-in-0 zoom-in-95 slide-in-from-top-2 duration-200"}},defaultVariants:{disableAnimation:!1}});K({base:"max-h-64 overflow-auto",variants:{maxHeight:{sm:"max-h-32",md:"max-h-64",lg:"max-h-96",none:"max-h-none"}},defaultVariants:{maxHeight:"md"}});K({base:"flex items-center gap-1.5"});K({base:["flex items-center justify-center","w-4 h-4 min-w-4 min-h-4","text-default-400 hover:text-default-600","cursor-pointer transition-colors","opacity-0 data-[visible=true]:opacity-100","transition-opacity duration-150"],variants:{size:{sm:"w-3 h-3 min-w-3 min-h-3",md:"w-4 h-4 min-w-4 min-h-4",lg:"w-5 h-5 min-w-5 min-h-5"}},defaultVariants:{size:"md"}});K({base:["flex items-center justify-center","w-4 h-4 min-w-4 min-h-4","text-default-400 hover:text-default-600","cursor-pointer transition-all duration-150","data-[open=true]:rotate-180"],variants:{size:{sm:"w-3 h-3 min-w-3 min-h-3",md:"w-4 h-4 min-w-4 min-h-4",lg:"w-5 h-5 min-w-5 min-h-5"},disableRotation:{true:"data-[open=true]:rotate-0",false:""}},defaultVariants:{size:"md",disableRotation:!1}});K({base:["flex group relative justify-between items-center","cursor-pointer tap-highlight-transparent","px-2 py-1.5 w-full h-full box-border rounded-small","subpixel-antialiased outline-none","data-[pressed=true]:opacity-70","transition-opacity motion-reduce:transition-none"],variants:{color:{default:"",primary:"",secondary:"",success:"",warning:"",danger:""},variant:{solid:"",bordered:"border-2 border-transparent bg-transparent",light:"bg-transparent",flat:"",faded:"border-2 border-transparent",shadow:""},isDisabled:{true:"opacity-disabled cursor-not-allowed",false:""},isSelected:{true:"",false:""},showDivider:{true:"mb-1.5 border-b border-divider pb-1.5",false:""}},compoundVariants:[{color:"default",variant:"solid",class:["bg-default text-default-foreground","data-[hover=true]:bg-default-100","data-[selected=true]:bg-default data-[selected=true]:text-default-foreground"]},{color:"default",variant:"flat",class:["bg-transparent text-foreground","data-[hover=true]:bg-default-100","data-[selected=true]:bg-default-100 data-[selected=true]:text-default-foreground"]},{color:"primary",variant:"solid",class:["bg-primary text-primary-foreground","data-[hover=true]:bg-primary-500","data-[selected=true]:bg-primary data-[selected=true]:text-primary-foreground"]},{color:"primary",variant:"flat",class:["bg-transparent text-foreground","data-[hover=true]:bg-primary-100","data-[selected=true]:bg-primary-100 data-[selected=true]:text-primary"]},{color:"secondary",variant:"solid",class:["bg-secondary text-secondary-foreground","data-[hover=true]:bg-secondary-500","data-[selected=true]:bg-secondary data-[selected=true]:text-secondary-foreground"]},{color:"secondary",variant:"flat",class:["bg-transparent text-foreground","data-[hover=true]:bg-secondary-100","data-[selected=true]:bg-secondary-100 data-[selected=true]:text-secondary"]},{color:"success",variant:"solid",class:["bg-success text-success-foreground","data-[hover=true]:bg-success-500","data-[selected=true]:bg-success data-[selected=true]:text-success-foreground"]},{color:"success",variant:"flat",class:["bg-transparent text-foreground","data-[hover=true]:bg-success-100","data-[selected=true]:bg-success-100 data-[selected=true]:text-success"]},{color:"warning",variant:"solid",class:["bg-warning text-warning-foreground","data-[hover=true]:bg-warning-500","data-[selected=true]:bg-warning data-[selected=true]:text-warning-foreground"]},{color:"warning",variant:"flat",class:["bg-transparent text-foreground","data-[hover=true]:bg-warning-100","data-[selected=true]:bg-warning-100 data-[selected=true]:text-warning"]},{color:"danger",variant:"solid",class:["bg-danger text-danger-foreground","data-[hover=true]:bg-danger-500","data-[selected=true]:bg-danger data-[selected=true]:text-danger-foreground"]},{color:"danger",variant:"flat",class:["bg-transparent text-foreground","data-[hover=true]:bg-danger-100","data-[selected=true]:bg-danger-100 data-[selected=true]:text-danger"]}],defaultVariants:{color:"default",variant:"flat",isDisabled:!1,isSelected:!1,showDivider:!1}});const Gx=K({slots:{base:["flex group relative justify-between items-center","cursor-pointer tap-highlight-transparent","px-2 py-1.5 w-full h-full box-border rounded-small","subpixel-antialiased outline-none","data-[pressed=true]:opacity-70","transition-opacity motion-reduce:transition-none"],wrapper:["w-full flex items-center gap-2"],title:["flex-1 text-small font-normal truncate","text-foreground group-data-[selected=true]:text-inherit"],description:["w-full text-tiny text-foreground-400 truncate","group-data-[selected=true]:text-inherit group-data-[selected=true]:opacity-70"],startContent:["flex items-center justify-center","text-foreground-400 group-data-[selected=true]:text-inherit"],endContent:["flex items-center justify-center","text-foreground-400 group-data-[selected=true]:text-inherit"]},variants:{color:{default:{},primary:{},secondary:{},success:{},warning:{},danger:{}},variant:{solid:{},bordered:{base:"border-2 border-transparent bg-transparent"},light:{base:"bg-transparent"},flat:{},faded:{base:"border-2 border-transparent"},shadow:{}},size:{sm:{base:"px-1 py-1 text-tiny gap-1",title:"text-tiny",description:"text-tiny"},md:{base:"px-2 py-1.5 text-small gap-2",title:"text-small",description:"text-tiny"},lg:{base:"px-3 py-2 text-medium gap-3",title:"text-medium",description:"text-small"}},isDisabled:{true:{base:"opacity-disabled cursor-not-allowed"},false:{}},isSelected:{true:{},false:{}},isFocused:{true:{base:"data-[focus-visible=true]:outline-2 data-[focus-visible=true]:outline-offset-2 data-[focus-visible=true]:outline-focus"},false:{}},showDivider:{true:{base:"mb-1.5 border-b border-divider pb-1.5"},false:{}}},compoundVariants:[{color:"default",variant:"solid",class:{base:["bg-default text-default-foreground","data-[hover=true]:bg-default-100","data-[selected=true]:bg-default data-[selected=true]:text-default-foreground"]}},{color:"default",variant:"flat",class:{base:["bg-transparent text-foreground","data-[hover=true]:bg-default-100","data-[selected=true]:bg-default-100 data-[selected=true]:text-default-foreground"]}},{color:"primary",variant:"solid",class:{base:["bg-primary text-primary-foreground","data-[hover=true]:bg-primary-500","data-[selected=true]:bg-primary data-[selected=true]:text-primary-foreground"]}},{color:"primary",variant:"flat",class:{base:["bg-transparent text-foreground","data-[hover=true]:bg-primary-100","data-[selected=true]:bg-primary-100 data-[selected=true]:text-primary"]}},{color:"secondary",variant:"solid",class:{base:["bg-secondary text-secondary-foreground","data-[hover=true]:bg-secondary-500","data-[selected=true]:bg-secondary data-[selected=true]:text-secondary-foreground"]}},{color:"secondary",variant:"flat",class:{base:["bg-transparent text-foreground","data-[hover=true]:bg-secondary-100","data-[selected=true]:bg-secondary-100 data-[selected=true]:text-secondary"]}},{color:"success",variant:"solid",class:{base:["bg-success text-success-foreground","data-[hover=true]:bg-success-500","data-[selected=true]:bg-success data-[selected=true]:text-success-foreground"]}},{color:"success",variant:"flat",class:{base:["bg-transparent text-foreground","data-[hover=true]:bg-success-100","data-[selected=true]:bg-success-100 data-[selected=true]:text-success"]}},{color:"warning",variant:"solid",class:{base:["bg-warning text-warning-foreground","data-[hover=true]:bg-warning-500","data-[selected=true]:bg-warning data-[selected=true]:text-warning-foreground"]}},{color:"warning",variant:"flat",class:{base:["bg-transparent text-foreground","data-[hover=true]:bg-warning-100","data-[selected=true]:bg-warning-100 data-[selected=true]:text-warning"]}},{color:"danger",variant:"solid",class:{base:["bg-danger text-danger-foreground","data-[hover=true]:bg-danger-500","data-[selected=true]:bg-danger data-[selected=true]:text-danger-foreground"]}},{color:"danger",variant:"flat",class:{base:["bg-transparent text-foreground","data-[hover=true]:bg-danger-100","data-[selected=true]:bg-danger-100 data-[selected=true]:text-danger"]}}],defaultVariants:{color:"default",variant:"flat",size:"md",isDisabled:!1,isSelected:!1,isFocused:!1,showDivider:!1}});K({base:"relative mb-2",variants:{showDivider:{true:"pb-1 mb-2 border-b border-divider",false:""}},defaultVariants:{showDivider:!1}});const Ux=K({slots:{base:["relative mb-2"],heading:["text-small font-medium text-default-500","px-2 py-1 select-none"],group:["w-full"],divider:["w-full h-px bg-divider my-2"]},variants:{showDivider:{true:{base:"pb-1 mb-2"},false:{}}},defaultVariants:{showDivider:!1}});K({base:["text-small font-medium text-default-500","px-2 py-1"]});K({base:"space-y-0.5"});const Or=h.forwardRef(({children:e,className:t,classNames:r,textValue:s,startContent:n,endContent:a,description:o,isSelected:i=!1,isFocused:l=!1,isDisabled:c=!1,showDivider:d=!1,variant:u="flat",color:p="default",size:m="md",itemKey:g,onSelectionChange:v,onPress:x,onPressStart:b,onPressEnd:y,onClick:w,onMouseDown:C,onKeyDown:j,...S},T)=>{const[k,V]=h.useState(!1),A=h.useCallback(()=>{c||(x?.(),g!==void 0&&v&&v(g))},[c,x,g,v]),B=h.useCallback(N=>{c||(N.preventDefault(),N.stopPropagation(),w?.(N),A())},[c,w,A]),$=h.useCallback(N=>{c||(N.preventDefault(),C?.(N),b?.())},[c,C,b]),L=h.useCallback(()=>{c||y?.()},[c,y]),I=h.useCallback(N=>{c||(j?.(N),(N.key==="Enter"||N.key===" ")&&(N.preventDefault(),N.stopPropagation(),A()))},[c,j,A]),R=h.useMemo(()=>Gx({variant:u,color:p,size:m,isSelected:i,isFocused:l,isDisabled:c,showDivider:d}),[u,p,m,i,l,c,d]),D=o!=null&&o!=="",P=n!=null,M=a!=null;return f.jsx("li",{ref:T,className:q(R.base(),r?.base,t),role:"option","aria-selected":i,"aria-disabled":c,tabIndex:l?0:-1,"data-key":g,"data-selected":i,"data-focused":l,"data-disabled":c,"data-hover":k,onClick:B,onMouseDown:$,onMouseUp:L,onMouseEnter:()=>V(!0),onMouseLeave:()=>V(!1),onKeyDown:I,...S,children:f.jsxs("div",{className:q(R.wrapper(),r?.wrapper),children:[P&&f.jsx("div",{className:q(R.startContent(),r?.startContent),children:n}),f.jsxs("div",{className:"flex-1 flex flex-col justify-center min-w-0",children:[f.jsx("div",{className:q(R.title(),r?.title),children:e||s}),D&&f.jsx("div",{className:q(R.description(),r?.description),children:o})]}),M&&f.jsx("div",{className:q(R.endContent(),r?.endContent),children:a})]})})});Or.displayName="AutocompleteItem";const Hx=({className:e})=>f.jsx("svg",{className:e,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})}),Kx=({className:e})=>f.jsx("svg",{className:e,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})});function Xx(e,t){if(typeof e=="object"&&e!==null){const r=e;return r.key??r.id??t}return t}function Yx(e){if(typeof e=="object"&&e!==null){const t=e;return t.textValue||t.label||t.value||t.title||String(t.key||"")}return String(e)}const od=h.forwardRef(({label:e,placeholder:t="Search...",description:r,errorMessage:s,startContent:n,endContent:a,variant:o="flat",color:i="default",size:l="md",labelPlacement:c="inside",isDisabled:d=!1,isReadOnly:u=!1,isRequired:p=!1,isInvalid:m=!1,isClearable:g=!0,fullWidth:v=!0,disableAnimation:x=!1,disableSelectorIconRotation:b=!1,selectorIcon:y,clearIcon:w,className:C,classNames:j,popoverProps:S,listboxProps:T,inputProps:k,selectorButtonProps:V,clearButtonProps:A,children:B,...$},L)=>{const[I,R]=h.useState(!1),{inputValue:D,selectedKey:P,isOpen:M,filteredItems:N,focusedKey:E,inputProps:F,listboxProps:z,clearButtonProps:O,selectorButtonProps:H,containerRef:W,selectItem:J}=ad($),Y=h.useMemo(()=>Fx({variant:o,color:i,size:l,labelPlacement:c,isDisabled:d,fullWidth:v}),[o,i,l,c,d,v]),Z=h.useMemo(()=>Wx({variant:o,color:i,size:l,isDisabled:d,isInvalid:m}),[o,i,l,d,m]),se=h.useMemo(()=>_x({disableAnimation:x}),[x]),ae=h.useCallback(ne=>{J(ne)},[J]),Te=h.useCallback(()=>B||N.map((ne,je)=>{const ye=Xx(ne,je),Ze=Yx(ne);if(typeof ne=="object"&&ne!==null){const Oe=ne;return f.jsx(Or,{itemKey:ye,textValue:Ze,isSelected:P===ye,isFocused:E===ye,variant:o==="underlined"?"flat":o,color:i,size:l,startContent:Oe.startContent,endContent:Oe.endContent,description:Oe.description,onSelectionChange:ae,children:Oe.label||Ze},ye)}return f.jsx(Or,{itemKey:ye,textValue:Ze,isSelected:P===ye,isFocused:E===ye,variant:o==="underlined"?"flat":o,color:i,size:l,onSelectionChange:ae,children:Ze},ye)}),[B,N,P,E,o,i,l,ae]),pe=h.useMemo(()=>f.jsx(Hx,{className:q("w-4 h-4 text-default-400 transition-transform",!b&&M&&"rotate-180")}),[b,M]),at=h.useMemo(()=>f.jsx(Kx,{className:"w-4 h-4 text-default-400"}),[]),Le=g&&D&&!d&&!u;return f.jsxs("div",{ref:ne=>{typeof L=="function"?L(ne):L&&(L.current=ne),W&&(W.current=ne)},className:q("relative",Y,j?.base,C),children:[e&&c==="outside"&&f.jsxs("label",{className:"text-small font-medium text-foreground pb-1 block",children:[e,p&&f.jsx("span",{className:"text-danger ml-1",children:"*"})]}),f.jsxs("div",{className:q(Z,j?.inputWrapper),style:{zIndex:1},children:[n&&f.jsx("div",{className:"flex items-center",children:n}),f.jsx("input",{...F,...k,className:q("w-full bg-transparent outline-none placeholder:text-foreground-500",F.className,k?.className),placeholder:M||I||D?t:"",disabled:d,readOnly:u,required:p,onFocus:ne=>{R(!0),F.onFocus?.(ne)},onBlur:ne=>{R(!1),F.onBlur?.(ne)}}),e&&c==="inside"&&f.jsxs("label",{className:q("absolute left-3 transition-all duration-200 pointer-events-none z-10","text-small text-foreground-500","top-1/2 -translate-y-1/2 origin-left",(D||M||I)&&["text-tiny scale-85 -translate-y-[1.875rem] px-1 bg-content1","text-foreground-600"]),style:{zIndex:10},children:[e,p&&f.jsx("span",{className:"text-danger ml-1",children:"*"})]}),f.jsxs("div",{className:"flex items-center gap-2",children:[a,Le&&f.jsx("button",{...O,...A,className:q("p-1 rounded-small opacity-70 hover:opacity-100 transition-opacity",O.className,A?.className),children:w||at}),f.jsx("button",{...H,...V,className:q("p-1 rounded-small opacity-70 hover:opacity-100 transition-opacity",H.className,V?.className),disabled:d,children:y||pe})]})]}),r&&f.jsx("div",{className:"text-tiny text-foreground-400 mt-1",children:r}),m&&s&&f.jsx("div",{className:"text-tiny text-danger mt-1",children:typeof s=="function"?s({isInvalid:!0,validationErrors:[],validationDetails:{}}):s}),f.jsx(We,{children:M&&f.jsx(_.div,{initial:x?void 0:{opacity:0,y:-8},animate:{opacity:1,y:0},exit:x?void 0:{opacity:0,y:-8},transition:{duration:x?0:.15,ease:"easeOut"},className:q("absolute top-full left-0 right-0 mt-1 z-[9999]",se,j?.popoverContent,S?.className),style:{zIndex:9999},children:f.jsx("div",{className:q("max-h-64 overflow-y-auto overflow-x-hidden bg-content1 rounded-medium",j?.listboxWrapper),children:f.jsxs("ul",{...z,...T,className:q("w-full p-1 bg-content1 rounded-medium",z.className,T?.className),children:[Te(),N.length===0&&!B&&f.jsx("li",{className:"px-2 py-4 text-small text-foreground-400 text-center",children:T?.emptyContent||"No results found"})]})})})})]})});od.displayName="Autocomplete";const id=h.forwardRef(({title:e,children:t,className:r,classNames:s,showDivider:n=!1,...a},o)=>{const i=h.useMemo(()=>Ux({showDivider:n}),[n]),l=e!=null&&e!=="";return f.jsxs("div",{ref:o,className:q(i.base(),s?.base,r),role:"group",...a,children:[l&&f.jsx("div",{className:q(i.heading(),s?.heading),role:"presentation",children:e}),f.jsx("div",{className:q(i.group(),s?.group),role:"group",children:t}),n&&f.jsx("div",{className:q(i.divider(),s?.divider),role:"separator"})]})});id.displayName="AutocompleteSection";const qx=(e,t,r=1,s=!0)=>{const n=[],a=(l,c,d=!1,u=!1)=>({type:l,value:c,isActive:d,isDisabled:u,key:`${l}-${c}`});n.push(a("page",1,e===1));const o=Math.max(2,e-r),i=Math.min(t-1,e+r);s&&o>2&&n.push(a("dots","...",!1,!0));for(let l=o;l<=i;l++)l!==1&&l!==t&&n.push(a("page",l,e===l));return s&&i<t-1&&n.push(a("dots","...",!1,!0)),t>1&&n.push(a("page",t,e===t)),n};function ld(e){const{total:t,page:r,defaultPage:s=1,initialPage:n,siblings:a=1,showDots:o=!0,loop:i=!1,onChange:l}=e,c=r!==void 0,d=n??s,[u,p]=h.useState(d),g=Math.max(1,Math.min(t,c?r:u)),v=h.useMemo(()=>t<=0?[]:qx(g,t,a,o),[g,t,a,o]),x=h.useCallback(T=>{const k=Math.max(1,Math.min(t,T));k!==g&&(c||p(k),l?.(k))},[c,g,t,l]),b=h.useCallback(()=>{g<t?x(g+1):i&&x(1)},[g,t,i,x]),y=h.useCallback(()=>{g>1?x(g-1):i&&x(t)},[g,t,i,x]),w=h.useCallback(()=>{x(1)},[x]),C=h.useCallback(()=>{x(t)},[x,t]);return{activePage:g,range:v,setPage:x,next:b,previous:y,first:w,last:C,isFirst:g===1,isLast:g===t,totalPages:t}}const Zx={xs:"min-w-6 h-6 text-xs px-1",sm:"min-w-8 h-8 text-sm px-2",md:"min-w-10 h-10 text-base px-3",lg:"min-w-12 h-12 text-lg px-4",xl:"min-w-14 h-14 text-xl px-5"},Jo={xs:"gap-1",sm:"gap-1.5",md:"gap-2",lg:"gap-2.5",xl:"gap-3"},Jx={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl",full:"rounded-full"},cd=(e,t,r=!1,s=!1)=>{const n={default:{flat:{base:"bg-default-100 text-default-600 hover:bg-default-200",active:"bg-default-300 text-default-800 font-medium",disabled:"bg-default-50 text-default-300 cursor-not-allowed"},bordered:{base:"bg-transparent border-2 border-default-200 text-default-600 hover:border-default-300 hover:bg-default-50",active:"bg-default-100 border-default-400 text-default-800 font-medium",disabled:"bg-transparent border-default-100 text-default-300 cursor-not-allowed"},light:{base:"bg-transparent text-default-600 hover:bg-default-100",active:"bg-default-200 text-default-800 font-medium",disabled:"bg-transparent text-default-300 cursor-not-allowed"},faded:{base:"bg-default-100/50 text-default-600 hover:bg-default-200/70",active:"bg-default-300/80 text-default-800 font-medium",disabled:"bg-default-50/30 text-default-300 cursor-not-allowed"}},primary:{flat:{base:"bg-primary-100 text-primary-600 hover:bg-primary-200",active:"bg-primary-500 text-white font-medium",disabled:"bg-primary-50 text-primary-300 cursor-not-allowed"},bordered:{base:"bg-transparent border-2 border-primary-200 text-primary-600 hover:border-primary-300 hover:bg-primary-50",active:"bg-primary-500 border-primary-500 text-white font-medium",disabled:"bg-transparent border-primary-100 text-primary-300 cursor-not-allowed"},light:{base:"bg-transparent text-primary-600 hover:bg-primary-100",active:"bg-primary-200 text-primary-800 font-medium",disabled:"bg-transparent text-primary-300 cursor-not-allowed"},faded:{base:"bg-primary-100/50 text-primary-600 hover:bg-primary-200/70",active:"bg-primary-500/90 text-white font-medium",disabled:"bg-primary-50/30 text-primary-300 cursor-not-allowed"}},secondary:{flat:{base:"bg-purple-100 text-purple-600 hover:bg-purple-200",active:"bg-purple-500 text-white font-medium",disabled:"bg-purple-50 text-purple-300 cursor-not-allowed"},bordered:{base:"bg-transparent border-2 border-purple-200 text-purple-600 hover:border-purple-300 hover:bg-purple-50",active:"bg-purple-500 border-purple-500 text-white font-medium",disabled:"bg-transparent border-purple-100 text-purple-300 cursor-not-allowed"},light:{base:"bg-transparent text-purple-600 hover:bg-purple-100",active:"bg-purple-200 text-purple-800 font-medium",disabled:"bg-transparent text-purple-300 cursor-not-allowed"},faded:{base:"bg-purple-100/50 text-purple-600 hover:bg-purple-200/70",active:"bg-purple-500/90 text-white font-medium",disabled:"bg-purple-50/30 text-purple-300 cursor-not-allowed"}},success:{flat:{base:"bg-green-100 text-green-600 hover:bg-green-200",active:"bg-green-500 text-white font-medium",disabled:"bg-green-50 text-green-300 cursor-not-allowed"},bordered:{base:"bg-transparent border-2 border-green-200 text-green-600 hover:border-green-300 hover:bg-green-50",active:"bg-green-500 border-green-500 text-white font-medium",disabled:"bg-transparent border-green-100 text-green-300 cursor-not-allowed"},light:{base:"bg-transparent text-green-600 hover:bg-green-100",active:"bg-green-200 text-green-800 font-medium",disabled:"bg-transparent text-green-300 cursor-not-allowed"},faded:{base:"bg-green-100/50 text-green-600 hover:bg-green-200/70",active:"bg-green-500/90 text-white font-medium",disabled:"bg-green-50/30 text-green-300 cursor-not-allowed"}},warning:{flat:{base:"bg-yellow-100 text-yellow-700 hover:bg-yellow-200",active:"bg-yellow-500 text-white font-medium",disabled:"bg-yellow-50 text-yellow-300 cursor-not-allowed"},bordered:{base:"bg-transparent border-2 border-yellow-200 text-yellow-700 hover:border-yellow-300 hover:bg-yellow-50",active:"bg-yellow-500 border-yellow-500 text-white font-medium",disabled:"bg-transparent border-yellow-100 text-yellow-300 cursor-not-allowed"},light:{base:"bg-transparent text-yellow-700 hover:bg-yellow-100",active:"bg-yellow-200 text-yellow-800 font-medium",disabled:"bg-transparent text-yellow-400 cursor-not-allowed"},faded:{base:"bg-yellow-100/50 text-yellow-700 hover:bg-yellow-200/70",active:"bg-yellow-500/90 text-white font-medium",disabled:"bg-yellow-50/30 text-yellow-300 cursor-not-allowed"}},danger:{flat:{base:"bg-red-100 text-red-600 hover:bg-red-200",active:"bg-red-500 text-white font-medium",disabled:"bg-red-50 text-red-300 cursor-not-allowed"},bordered:{base:"bg-transparent border-2 border-red-200 text-red-600 hover:border-red-300 hover:bg-red-50",active:"bg-red-500 border-red-500 text-white font-medium",disabled:"bg-transparent border-red-100 text-red-300 cursor-not-allowed"},light:{base:"bg-transparent text-red-600 hover:bg-red-100",active:"bg-red-200 text-red-800 font-medium",disabled:"bg-transparent text-red-300 cursor-not-allowed"},faded:{base:"bg-red-100/50 text-red-600 hover:bg-red-200/70",active:"bg-red-500/90 text-white font-medium",disabled:"bg-red-50/30 text-red-300 cursor-not-allowed"}}};return s?n[e][t].disabled:r?n[e][t].active:n[e][t].base},Qx=(e,t,r=!1)=>{const s=cd(e,t,!1,r);return r?s:`${s} transition-all duration-200 ease-in-out hover:scale-105 active:scale-95`},ev=e=>`${{xs:"w-6 h-6 text-xs",sm:"w-8 h-8 text-sm",md:"w-10 h-10 text-base",lg:"w-12 h-12 text-lg",xl:"w-14 h-14 text-xl"}[e]} flex items-center justify-center text-default-400 cursor-default select-none`,dd=(e=!1,t=!1)=>e||t?"transition-colors duration-200 ease-in-out":"transition-all duration-200 ease-in-out transform hover:scale-105 active:scale-95",ud=(e,t)=>{const r=Zx[e],s=Jx[t];return`${r} ${s} flex items-center justify-center font-medium select-none outline-none focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2`},tv=(e,t=!1,r=!1)=>`flex items-center justify-center ${r?Jo.xs:Jo[e]} ${t?"shadow-sm":""}`.trim(),Se={size:"md",color:"primary",variant:"flat",radius:"md",siblings:1,showControls:!0,showFirstLast:!1,showPages:!0,showDots:!0,loop:!1,compact:!1,showShadow:!1,disableAnimation:!1},Jn=h.forwardRef(({value:e,type:t="page",isActive:r=!1,isDisabled:s=!1,onClick:n,children:a,className:o="",size:i,color:l,variant:c,radius:d,"aria-label":u,"data-testid":p},m)=>{const g=Jr(),v=i??g.size,x=l??g.color,b=c??g.variant,y=d??g.radius,w=g.isDisabled,C=g.disableAnimation,j=w||s,S=ud(v,y),T=cd(x,b,r,j),k=dd(C,j),V=()=>{j||t==="dots"||n?.(e)},A=t==="page"?r?`Current page, page ${e}`:`Go to page ${e}`:u,B=`${S} ${T} ${k} ${o}`.trim();return f.jsx("button",{ref:m,type:"button",disabled:j,onClick:V,className:B,"aria-label":A,"aria-current":r?"page":void 0,"data-testid":p,children:a??e})});Jn.displayName="PaginationItem";const ur=h.forwardRef(({direction:e,isDisabled:t=!1,onClick:r,children:s,className:n="",size:a,color:o,variant:i,radius:l,"aria-label":c,"data-testid":d},u)=>{const p=Jr(),m=a??p.size,g=o??p.color,v=i??p.variant,x=l??p.radius,b=p.isDisabled,y=p.disableAnimation,w=b||t,C=ud(m,x),j=Qx(g,v,w),S=dd(y,w),T=()=>{w||r?.()},k=e==="prev"?"Go to previous page":"Go to next page",V=`${C} ${j} ${S} ${n}`.trim();return f.jsx("button",{ref:u,type:"button",disabled:w,onClick:T,className:V,"aria-label":c??k,"data-testid":d,children:s})});ur.displayName="BasePaginationCursor";const Qn=h.forwardRef((e,t)=>f.jsx(ur,{ref:t,direction:"prev","aria-label":"Go to previous page",...e}));Qn.displayName="PaginationPrevious";const ea=h.forwardRef((e,t)=>f.jsx(ur,{ref:t,direction:"next","aria-label":"Go to next page",...e}));ea.displayName="PaginationNext";const ta=h.forwardRef((e,t)=>f.jsx(ur,{ref:t,direction:"prev","aria-label":"Go to first page",...e}));ta.displayName="PaginationFirst";const ra=h.forwardRef((e,t)=>f.jsx(ur,{ref:t,direction:"next","aria-label":"Go to last page",...e}));ra.displayName="PaginationLast";const sa=h.forwardRef(({className:e="",size:t,children:r,"data-testid":s},n)=>{const a=Jr(),o=t??a.size,l=`${ev(o)} ${e}`.trim();return f.jsx("span",{ref:n,className:l,"aria-hidden":"true",role:"presentation","data-testid":s,children:r??"…"})});sa.displayName="PaginationEllipsis";const kr={prev:()=>f.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"w-4 h-4",children:f.jsx("polyline",{points:"15,18 9,12 15,6"})}),next:()=>f.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"w-4 h-4",children:f.jsx("polyline",{points:"9,18 15,12 9,6"})}),first:()=>f.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"w-4 h-4",children:[f.jsx("polyline",{points:"11,17 6,12 11,7"}),f.jsx("polyline",{points:"18,17 13,12 18,7"})]}),last:()=>f.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"w-4 h-4",children:[f.jsx("polyline",{points:"13,17 18,12 13,7"}),f.jsx("polyline",{points:"6,17 11,12 6,7"})]})},fd=h.createContext(null),Jr=()=>{const e=h.useContext(fd);if(!e)throw new Error("usePaginationContext must be used within a Pagination component");return e},hd=({total:e,page:t,defaultPage:r=1,initialPage:s,onChange:n,onPageChange:a,size:o=Se.size,color:i=Se.color,variant:l=Se.variant,radius:c=Se.radius,isDisabled:d=!1,disableAnimation:u=Se.disableAnimation,controls:p={},display:m={},className:g="",style:v,"aria-label":x="Pagination Navigation","data-testid":b})=>{const y={showControls:Se.showControls,showFirstLast:Se.showFirstLast,placement:"both",labels:{prev:f.jsx(kr.prev,{}),next:f.jsx(kr.next,{}),first:f.jsx(kr.first,{}),last:f.jsx(kr.last,{})},...p},w={showPages:Se.showPages,siblings:Se.siblings,showDots:Se.showDots,loop:Se.loop,compact:Se.compact,showShadow:Se.showShadow,...m},C=ld({total:e,page:t,defaultPage:r,initialPage:s,siblings:w.siblings,showDots:w.showDots,loop:w.loop,onChange:A=>{n?.(A),a?.(A)}}),j={activePage:C.activePage,totalPages:C.totalPages,setPage:C.setPage,size:o,color:i,variant:l,radius:c,isDisabled:d,disableAnimation:u,controls:y,display:w},S=tv(o,w.showShadow,w.compact),T=A=>!y.showFirstLast||y.placement!=="both"&&y.placement!==A?null:A==="start"?f.jsx(ta,{isDisabled:d||C.isFirst,onClick:C.first,children:y.labels.first}):f.jsx(ra,{isDisabled:d||C.isLast,onClick:C.last,children:y.labels.last}),k=A=>!y.showControls||y.placement!=="both"&&y.placement!==A?null:A==="start"?f.jsx(Qn,{isDisabled:d||C.isFirst,onClick:C.previous,children:y.labels.prev}):f.jsx(ea,{isDisabled:d||C.isLast,onClick:C.next,children:y.labels.next}),V=()=>w.showPages?C.range.map(A=>A.type==="dots"?f.jsx(sa,{},A.key):f.jsx(Jn,{type:"page",value:A.value,isActive:A.isActive,isDisabled:d||A.isDisabled,onClick:()=>!d&&!A.isDisabled&&C.setPage(A.value),children:A.value},A.key)):null;return f.jsx(fd.Provider,{value:j,children:f.jsxs("nav",{role:"navigation","aria-label":x,className:`${S} ${g}`.trim(),style:v,"data-testid":b,children:[T("start"),k("start"),V(),k("end"),T("end")]})})};hd.displayName="Pagination";const Yt=e=>({linear:"linear",easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1],backIn:[.6,-.05,.01,.99],backOut:[.12,0,.39,0],backInOut:[.37,0,.63,1],bounceIn:[.6,-.28,.735,.045],bounceOut:[.175,.885,.32,1.275],bounceInOut:[.68,-.55,.265,1.55]})[e],rv=(e,t,r=.05,s=.6)=>{const n=e.split(" "),a=[],o=[],i=e.split(`
|
|
15
|
+
`);let l=0;return n.forEach((c,d)=>{const u=[];if(c.split("").forEach(m=>{const g=t==="letter"?l*r:t==="word"?d*r:0,v={char:m,index:l,delay:g,duration:s,variants:Qo("up")};u.push(v),a.push(v),l++}),d<n.length-1){const m={char:" ",index:l,delay:t==="letter"?l*r:d*r,duration:s,variants:Qo("up")};u.push(m),a.push(m),l++}const p=t==="word"?d*r:0;o.push({word:c,index:d,delay:p,duration:s,characters:u})}),{words:o,characters:a,lines:i}},Qo=e=>{const t={hidden:{opacity:0,scale:.8},visible:{opacity:1,scale:1}};switch(e){case"up":return{hidden:{...t.hidden,y:20},visible:{...t.visible,y:0}};case"down":return{hidden:{...t.hidden,y:-20},visible:{...t.visible,y:0}};case"left":return{hidden:{...t.hidden,x:20},visible:{...t.visible,x:0}};case"right":return{hidden:{...t.hidden,x:-20},visible:{...t.visible,x:0}};case"center":default:return t}},ei=(e,t,r=0,s="es-ES",n="EUR")=>{const a={minimumFractionDigits:r,maximumFractionDigits:r};switch(t){case"currency":a.style="currency",a.currency=n;break;case"percentage":a.style="percent";break;case"number":default:a.style="decimal";break}return new Intl.NumberFormat(s,a).format(e)},sv=(e=10)=>{const a="!@#$%^&*()_+-=[]{}|;:,.<>?~`"+"0123456789"+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"+"█▓▒░▄▀▐▌";return Array.from({length:e},()=>a[Math.floor(Math.random()*a.length)]).join("")},nv=e=>{const t={low:{scale:.02,duration:.1},medium:{scale:.05,duration:.15},high:{scale:.1,duration:.2},extreme:{scale:.2,duration:.3}},{scale:r,duration:s}=t[e];return{hidden:{opacity:1,x:0,y:0,scaleX:1,scaleY:1},visible:{opacity:[1,.8,1],x:[0,-r*20,r*20,0],y:[0,r*10,-r*10,0],scaleX:[1,1+r,1-r,1],scaleY:[1,1-r,1+r,1],transition:{duration:s,repeat:1/0,repeatType:"mirror",ease:"linear"}}}},pd=(e,t)=>{const r=e.join(", ");switch(t){case"horizontal":return`linear-gradient(90deg, ${r})`;case"vertical":return`linear-gradient(180deg, ${r})`;case"diagonal":return`linear-gradient(45deg, ${r})`;case"radial":return`radial-gradient(circle, ${r})`;default:return`linear-gradient(90deg, ${r})`}},av=(e,t)=>{const r=Math.max(e.length,t.length),s=[],n=10;for(let a=0;a<=n;a++){const o=a/n;let i="";for(let l=0;l<r;l++){const c=e[l]||" ",d=t[l]||" ";Math.random()<o?i+=d:i+=c}s.push(i)}return s},Lt=()=>typeof window>"u"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches,ov=(e,t=2,r="horizontal")=>({"--text-gradient":pd(e,r),"--animation-duration":`${t}s`,"--background-size":r==="horizontal"?"200% 100%":"100% 200%"}),iv=({text:e,texts:t,className:r="",trigger:s="inView",speed:n=2,cursor:a="line",cursorColor:o="currentColor",showCursor:i=!0,deleteAfter:l=!1,deleteSpeed:c=3,pauseBeforeDelete:d=1,loop:u=!1,repeat:p=!1,delay:m=0,disabled:g=!1,isActive:v=!1,onComplete:x,onStart:b,"data-testid":y})=>{const[w,C]=h.useState(""),[j,S]=h.useState(0),[T,k]=h.useState(!1),[V,A]=h.useState(!1),[B,$]=h.useState(!0),[L,I]=h.useState(!1),R=h.useRef(null),D=h.useRef(null),P=h.useRef(null),M=Lt(),E=(t||[e])[j]||e,F=!g&&!M&&(s==="immediate"||s==="inView"&&L||s==="manual"&&v);h.useEffect(()=>{if(!(s!=="inView"||!R.current))return P.current=new IntersectionObserver(([W])=>{W.isIntersecting?(I(!0),!p&&P.current&&P.current.disconnect()):p&&I(!1)},{threshold:.1}),P.current.observe(R.current),()=>{P.current&&P.current.disconnect()}},[s,p]),h.useEffect(()=>()=>{D.current&&clearTimeout(D.current)},[]),h.useEffect(()=>{if(!F){(g||M)&&C(E);return}const W=()=>{b&&b(),k(!0),$(!1),D.current=setTimeout(()=>{J()},m*1e3)},J=()=>{let Z=0;const se=E,ae=setInterval(()=>{Z<=se.length?(C(se.slice(0,Z)),Z++):(clearInterval(ae),k(!1),$(!0),x&&x(),(l||t&&t.length>1)&&(D.current=setTimeout(()=>{(l||t&&t.length>1&&(u||j<t.length-1))&&Y()},d*1e3)))},1e3/n);return()=>clearInterval(ae)},Y=()=>{A(!0),$(!1);const Z=setInterval(()=>{C(se=>se.length>0?se.slice(0,-1):(clearInterval(Z),A(!1),$(!0),t&&t.length>1&&(u?S(ae=>(ae+1)%t.length):j<t.length-1&&S(ae=>ae+1),D.current=setTimeout(()=>{J()},300)),""))},1e3/c);return()=>clearInterval(Z)};W()},[F,E,j,n,c,m,l,u,t,b,x,d]),h.useEffect(()=>{s==="manual"&&!v&&(C(""),S(0),k(!1),A(!1))},[s,v]);const z=()=>{const W={color:o,animation:B?"blink 1s infinite":"none"};switch(a){case"block":return{...W,backgroundColor:o,color:"transparent",marginLeft:"2px",width:"0.6em",display:"inline-block"};case"underscore":return{...W,borderBottom:`2px solid ${o}`,marginLeft:"1px",paddingBottom:"2px"};case"line":default:return{...W,borderLeft:`2px solid ${o}`,marginLeft:"2px",paddingLeft:"1px"}}},O=()=>{s==="hover"&&!T&&!V&&(C(""),S(0))},H=()=>{s==="focus"&&!T&&!V&&(C(""),S(0))};return f.jsxs(f.Fragment,{children:[f.jsx("style",{dangerouslySetInnerHTML:{__html:`
|
|
16
16
|
@keyframes blink {
|
|
17
17
|
0%, 50% { opacity: 1; }
|
|
18
18
|
51%, 100% { opacity: 0; }
|
|
19
19
|
}
|
|
20
|
-
`}}),f.jsxs(_.span,{ref:R,className:`typewriter ${r}`,onMouseEnter:
|
|
20
|
+
`}}),f.jsxs(_.span,{ref:R,className:`typewriter ${r}`,onMouseEnter:s==="hover"?O:void 0,onFocus:s==="focus"?H:void 0,tabIndex:s==="focus"?0:void 0,"data-testid":y,style:{display:"inline-block",minHeight:"1em",fontFamily:"monospace"},children:[w,i&&a!=="none"&&f.jsx("span",{className:"typewriter-cursor",style:z(),"aria-hidden":"true",children:a==="block"?"█":""})]})]})},lv=({text:e,className:t="",trigger:r="inView",mode:s="letter",duration:n=.6,staggerDelay:a=.05,direction:o="up",initialOpacity:i=0,easing:l="easeOut",withBlur:c=!1,withScale:d=!1,withRotation:u=!1,repeat:p=!1,delay:m=0,disabled:g=!1,isActive:v=!1,onComplete:x,onStart:b,"data-testid":y})=>{const[w,C]=h.useState(!1),[j,S]=h.useState(!1),[T,k]=h.useState(!1),V=h.useRef(null),A=h.useRef(null),B=Lt(),$=rv(e,s,a,n),L=!g&&!B&&(r==="immediate"||r==="inView"&&w||r==="manual"&&v);h.useEffect(()=>{if(!(r!=="inView"||!V.current))return A.current=new IntersectionObserver(([E])=>{E.isIntersecting?(C(!0),!p&&A.current&&A.current.disconnect()):p&&(C(!1),k(!1))},{threshold:.1}),A.current.observe(V.current),()=>{A.current&&A.current.disconnect()}},[r,p]),h.useEffect(()=>{L&&!T?(S(!0),b&&b()):L||S(!1)},[L,T,b]),h.useEffect(()=>{r==="manual"&&!v&&(k(!1),S(!1))},[r,v]);const R=(()=>{let E=0,F=0;switch(o){case"up":F=20;break;case"down":F=-20;break;case"left":E=20;break;case"right":E=-20;break}const z={opacity:i,x:E,y:F},O={opacity:1,x:0,y:0};return c&&(z.filter="blur(10px)",O.filter="blur(0px)"),d&&(z.scale=.5,O.scale=1),u&&(z.rotate=o==="left"?-45:o==="right"?45:-15,O.rotate=0),{hidden:z,visible:O}})(),D=()=>{r==="hover"&&!j&&(k(!1),S(!0))},P=()=>{r==="focus"&&!j&&(k(!1),S(!0))},M=()=>{S(!1),k(!0),x&&x()};if(g||B)return f.jsx("div",{ref:V,className:`reveal-text ${t}`,"data-testid":y,children:e});const N=()=>s==="word"?f.jsx("div",{ref:V,className:`reveal-text reveal-text--words ${t}`,onMouseEnter:r==="hover"?D:void 0,onFocus:r==="focus"?P:void 0,tabIndex:r==="focus"?0:void 0,"data-testid":y,style:{display:"inline-block"},children:$.words.map((E,F)=>f.jsx(_.span,{variants:R,initial:"hidden",animate:j?"visible":"hidden",transition:{duration:n,delay:E.delay+m,ease:Yt(l)},onAnimationComplete:F===$.words.length-1?M:void 0,style:{display:"inline-block",marginRight:F<$.words.length-1?"0.25em":"0"},children:E.word},`word-${F}`))}):s==="line"?f.jsx("div",{ref:V,className:`reveal-text reveal-text--lines ${t}`,onMouseEnter:r==="hover"?D:void 0,onFocus:r==="focus"?P:void 0,tabIndex:r==="focus"?0:void 0,"data-testid":y,children:$.lines.map((E,F)=>f.jsx(_.div,{variants:R,initial:"hidden",animate:j?"visible":"hidden",transition:{duration:n,delay:F*a+m,ease:Yt(l)},onAnimationComplete:F===$.lines.length-1?M:void 0,children:E},`line-${F}`))}):f.jsx("div",{ref:V,className:`reveal-text reveal-text--letters ${t}`,onMouseEnter:r==="hover"?D:void 0,onFocus:r==="focus"?P:void 0,tabIndex:r==="focus"?0:void 0,"data-testid":y,style:{display:"inline-block"},children:$.characters.map((E,F)=>f.jsx(_.span,{variants:R,initial:"hidden",animate:j?"visible":"hidden",transition:{duration:n,delay:E.delay+m,ease:Yt(l)},onAnimationComplete:F===$.characters.length-1?M:void 0,style:{display:"inline-block",whiteSpace:E.char===" "?"pre":"normal"},children:E.char},`char-${F}`))});return f.jsx(We,{mode:"wait",children:N()})},cv=({from:e,to:t,className:r="",trigger:s="inView",duration:n=2,decimals:a=0,format:o="number",currency:i="EUR",locale:l="es-ES",formatter:c,easing:d="easeOut",prefix:u="",suffix:p="",repeat:m=!1,delay:g=0,disabled:v=!1,isActive:x=!1,onStart:b,onComplete:y,"data-testid":w})=>{const[C,j]=h.useState(!1),[S,T]=h.useState(!1),[k,V]=h.useState(!1),A=h.useRef(null),B=h.useRef(null),$=h.useRef(null),L=Lt(),I=$n(e),R=!v&&!L&&(s==="immediate"||s==="inView"&&C||s==="manual"&&x),D=Mt(I,N=>{const E=Math.round(N*Math.pow(10,a))/Math.pow(10,a);return c?c(E):ei(E,o,a,l,i)});h.useEffect(()=>{if(!(s!=="inView"||!A.current))return B.current=new IntersectionObserver(([N])=>{N.isIntersecting?(j(!0),!m&&B.current&&B.current.disconnect()):m&&(j(!1),V(!1))},{threshold:.1}),B.current.observe(A.current),()=>{B.current&&B.current.disconnect()}},[s,m]),h.useEffect(()=>(R&&!k?(T(!0),b&&b(),$.current&&$.current.cancel(),$.current=tm(e,t,{duration:n,delay:g,ease:Yt(d),onUpdate:N=>{I.set(N)},onComplete:()=>{T(!1),V(!0),y&&y()}})):!R&&$.current&&($.current.cancel(),I.set(e),T(!1)),()=>{$.current&&$.current.cancel()}),[R,k,e,t,n,g,d,b,y,I]),h.useEffect(()=>{s==="manual"&&!x&&(V(!1),T(!1),I.set(e))},[s,x,e,I]);const P=()=>{s==="hover"&&!S&&V(!1)},M=()=>{s==="focus"&&!S&&V(!1)};if(v||L){const N=c?c(t):ei(t,o,a,l,i);return f.jsxs("span",{ref:A,className:`counter-text ${r}`,"data-testid":w,children:[u,N,p]})}return f.jsxs(_.span,{ref:A,className:`counter-text ${r}`,onMouseEnter:s==="hover"?P:void 0,onFocus:s==="focus"?M:void 0,tabIndex:s==="focus"?0:void 0,"data-testid":w,children:[u,f.jsx(_.span,{children:D}),p]})},dv=({text:e,className:t="",trigger:r="immediate",colors:s,direction:n="horizontal",duration:a=3,speed:o=1,animate:i=!0,backgroundSize:l,stops:c,repeat:d=!0,delay:u=0,disabled:p=!1,isActive:m=!1,onStart:g,onComplete:v,"data-testid":x})=>{const[b,y]=h.useState(!1),[w,C]=h.useState(!1),[j,S]=h.useState(!1),T=h.useRef(null),k=h.useRef(null),V=Lt(),A=!p&&!V&&i&&(r==="immediate"||r==="inView"&&b||r==="manual"&&m),B=()=>{if(!c||c.length!==s.length)return pd(s,n);const N=s.map((E,F)=>`${E} ${c[F]}%`).join(", ");switch(n){case"horizontal":return`linear-gradient(90deg, ${N})`;case"vertical":return`linear-gradient(180deg, ${N})`;case"diagonal":return`linear-gradient(45deg, ${N})`;case"radial":return`radial-gradient(circle, ${N})`;default:return`linear-gradient(90deg, ${N})`}},$=ov(s,a*o,n),L=B(),I=l||$["--background-size"];h.useEffect(()=>{if(!(r!=="inView"||!T.current))return k.current=new IntersectionObserver(([N])=>{N.isIntersecting?(y(!0),!d&&k.current&&k.current.disconnect()):d&&(y(!1),S(!1))},{threshold:.1}),k.current.observe(T.current),()=>{k.current&&k.current.disconnect()}},[r,d]),h.useEffect(()=>{A&&!j?(C(!0),g&&g()):A||C(!1)},[A,j,g]),h.useEffect(()=>{r==="manual"&&!m&&(S(!1),C(!1))},[r,m]);const R=()=>{r==="hover"&&!w&&(S(!1),C(!0))},D=()=>{r==="focus"&&!w&&(S(!1),C(!0))},P=()=>{d||(C(!1),S(!0),v&&v())},M={background:L,backgroundClip:"text",WebkitBackgroundClip:"text",color:"transparent",backgroundSize:I,...A&&{animation:`gradientMove ${a/o}s linear ${u}s ${d?"infinite":"1"} ${n==="horizontal"?"alternate":"normal"}`}};return p||V?f.jsx("span",{ref:T,className:`gradient-text ${t}`,style:{background:L,backgroundClip:"text",WebkitBackgroundClip:"text",color:"transparent"},"data-testid":x,children:e}):f.jsxs(f.Fragment,{children:[f.jsx("style",{children:`
|
|
21
21
|
@keyframes gradientMove {
|
|
22
22
|
0% {
|
|
23
|
-
background-position: ${
|
|
23
|
+
background-position: ${n==="horizontal"?"0% 50%":"50% 0%"};
|
|
24
24
|
}
|
|
25
25
|
50% {
|
|
26
|
-
background-position: ${
|
|
26
|
+
background-position: ${n==="horizontal"?"100% 50%":"50% 100%"};
|
|
27
27
|
}
|
|
28
28
|
100% {
|
|
29
|
-
background-position: ${
|
|
29
|
+
background-position: ${n==="horizontal"?"0% 50%":"50% 0%"};
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
-
`}),f.jsx(_.span,{ref:
|
|
33
|
-
${Array.from({length:c},(
|
|
32
|
+
`}),f.jsx(_.span,{ref:T,className:`gradient-text ${t}`,style:M,onMouseEnter:r==="hover"?R:void 0,onFocus:r==="focus"?D:void 0,tabIndex:r==="focus"?0:void 0,onAnimationEnd:P,"data-testid":x,children:e})]})},uv=({texts:e,className:t="",trigger:r="immediate",displayDuration:s=2e3,morphDuration:n=800,loop:a=!0,easing:o="easeInOut",morphStyle:i="fade",repeat:l=!0,delay:c=0,disabled:d=!1,isActive:u=!1,onStart:p,onComplete:m,"data-testid":g})=>{const[v,x]=h.useState(!1),[b,y]=h.useState(!1),[w,C]=h.useState(!1),[j,S]=h.useState(0),[T,k]=h.useState(e[0]||""),V=h.useRef(null),A=h.useRef(null),B=h.useRef(null),$=h.useRef(null),L=Lt(),I=!d&&!L&&(r==="immediate"||r==="inView"&&v||r==="manual"&&u),R=h.useCallback(()=>{B.current&&(clearTimeout(B.current),B.current=null),$.current&&(clearTimeout($.current),$.current=null)},[]),D=h.useCallback(()=>{if(e.length<=1)return;const F=e[j],z=(j+1)%e.length,O=e[z];if(i==="scramble"){const H=av(F,O);let W=0;const J=setInterval(()=>{W<H.length?(k(H[W]),W++):(clearInterval(J),k(O),S(z),!a&&z===0?(C(!0),y(!1),m&&m()):I&&(B.current=setTimeout(()=>{D()},s)))},n/10)}else k(O),S(z),!a&&z===0?(C(!0),y(!1),m&&m()):I&&(B.current=setTimeout(()=>{D()},s))},[j,e,i,n,s,a,I,m]);h.useEffect(()=>{if(!(r!=="inView"||!V.current))return A.current=new IntersectionObserver(([F])=>{F.isIntersecting?(x(!0),!l&&A.current&&A.current.disconnect()):l&&(x(!1),C(!1))},{threshold:.1}),A.current.observe(V.current),()=>{A.current&&A.current.disconnect()}},[r,l]),h.useEffect(()=>(I&&!w&&e.length>1?(y(!0),p&&p(),B.current=setTimeout(()=>{D()},c+s)):I||(R(),y(!1),k(e[0]||""),S(0)),R),[I,w,e.length,c,s,D,p,R]),h.useEffect(()=>{r==="manual"&&!u&&(R(),C(!1),y(!1),k(e[0]||""),S(0))},[r,u,e,R]);const P=()=>{r==="hover"&&!b&&C(!1)},M=()=>{r==="focus"&&!b&&C(!1)};if(h.useEffect(()=>R,[R]),d||L)return f.jsx("span",{ref:V,className:`morphing-text ${t}`,"data-testid":g,children:e[0]||""});const E=(()=>{switch(i){case"slide":return{enter:{x:50,opacity:0},center:{x:0,opacity:1},exit:{x:-50,opacity:0}};case"fade":default:return{enter:{opacity:0},center:{opacity:1},exit:{opacity:0}}}})();return i==="scramble"?f.jsx("span",{ref:V,className:`morphing-text morphing-text--scramble ${t}`,onMouseEnter:r==="hover"?P:void 0,onFocus:r==="focus"?M:void 0,tabIndex:r==="focus"?0:void 0,"data-testid":g,style:{fontVariantNumeric:"tabular-nums",minWidth:"1ch"},children:T}):f.jsx("span",{ref:V,className:`morphing-text morphing-text--${i} ${t}`,onMouseEnter:r==="hover"?P:void 0,onFocus:r==="focus"?M:void 0,tabIndex:r==="focus"?0:void 0,"data-testid":g,style:{display:"inline-block",minWidth:"1ch"},children:f.jsx(We,{mode:"wait",children:f.jsx(_.span,{variants:E,initial:"enter",animate:"center",exit:"exit",transition:{duration:n/1e3,ease:Yt(o)},style:{display:"inline-block"},children:T},`${j}-${T}`)})})},fv=({text:e,className:t="",trigger:r="inView",intensity:s="medium",duration:n=.5,continuous:a=!1,colors:o=["#ff0000","#00ff00","#0000ff"],corruptData:i=!1,glitchChars:l,layers:c=3,repeat:d=!0,delay:u=0,disabled:p=!1,isActive:m=!1,onStart:g,onComplete:v,"data-testid":x})=>{const[b,y]=h.useState(!1),[w,C]=h.useState(!1),[j,S]=h.useState(!1),[T,k]=h.useState(e),V=h.useRef(null),A=h.useRef(null),B=h.useRef(null),$=Lt(),L=!p&&!$&&(r==="immediate"||r==="inView"&&b||r==="manual"&&m),I=l||sv(20),R=nv(s),D=(z,O=.3)=>z.split("").map(H=>Math.random()<O?I[Math.floor(Math.random()*I.length)]:H).join("");h.useEffect(()=>{if(!(r!=="inView"||!V.current))return A.current=new IntersectionObserver(([z])=>{z.isIntersecting?(y(!0),!d&&A.current&&A.current.disconnect()):d&&(y(!1),S(!1))},{threshold:.1}),A.current.observe(V.current),()=>{A.current&&A.current.disconnect()}},[r,d]),h.useEffect(()=>{if(i&&L){const z=s==="extreme"?50:s==="high"?100:s==="medium"?200:300;return B.current=setInterval(()=>{k(D(e,.2)),Math.random()<.3&&setTimeout(()=>k(e),50)},z),()=>{B.current&&clearInterval(B.current)}}else k(e),B.current&&clearInterval(B.current)},[i,L,e,s,I]),h.useEffect(()=>{L&&!j?(C(!0),g&&g()):L||C(!1)},[L,j,g]),h.useEffect(()=>{r==="manual"&&!m&&(S(!1),C(!1),k(e))},[r,m,e]);const P=()=>{r==="hover"&&!w&&(S(!1),C(!0))},M=()=>{r==="focus"&&!w&&(S(!1),C(!0))},N=()=>{a||(C(!1),S(!0),v&&v())};if(p||$)return f.jsx("span",{ref:V,className:`glitch-text ${t}`,"data-testid":x,children:e});const E={position:"relative",display:"inline-block"},F=z=>{const O=o[z%o.length],H=(z+1)*(s==="extreme"?3:s==="high"?2:s==="medium"?1:.5);return{position:"absolute",top:0,left:0,color:O,clipPath:`inset(${z*20}% 0 ${(c-z-1)*20}% 0)`,transform:`translateX(${z%2===0?H:-H}px)`,opacity:.8,mixBlendMode:"multiply",animation:L?`glitchShift${z} ${n}s linear ${u}s ${a?"infinite":"1"}`:void 0}};return f.jsxs(f.Fragment,{children:[f.jsx("style",{children:`
|
|
33
|
+
${Array.from({length:c},(z,O)=>`
|
|
34
34
|
@keyframes glitchShift${O} {
|
|
35
35
|
0%, 100% { transform: translateX(0); }
|
|
36
36
|
10% { transform: translateX(${(O+1)*2}px) translateY(${O}px); }
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
90% { transform: translateX(${O+1}px) translateY(${O}px); }
|
|
45
45
|
}
|
|
46
46
|
`).join("")}
|
|
47
|
-
`}),f.jsxs(_.span,{ref:V,className:`glitch-text glitch-text--${
|
|
47
|
+
`}),f.jsxs(_.span,{ref:V,className:`glitch-text glitch-text--${s} ${t}`,style:E,variants:R,initial:"hidden",animate:L?"visible":"hidden",onMouseEnter:r==="hover"?P:void 0,onFocus:r==="focus"?M:void 0,tabIndex:r==="focus"?0:void 0,onAnimationComplete:N,"data-testid":x,children:[f.jsx("span",{style:{position:"relative",zIndex:c+1},children:T}),Array.from({length:c},(z,O)=>f.jsx("span",{style:F(O),"aria-hidden":"true",children:T},`layer-${O}`))]})]})};exports.Accordion=Jl;exports.AccordionContent=_n;exports.AccordionHeader=Wn;exports.AccordionItem=Gn;exports.Autocomplete=od;exports.AutocompleteItem=Or;exports.AutocompleteSection=id;exports.Avatar=hc;exports.AvatarGroup=mc;exports.AvatarIcon=Hn;exports.Badge=gc;exports.Bounce=Um;exports.BounceContainer=Vm;exports.Breadcrumb=vc;exports.BreadcrumbItem=wc;exports.BreadcrumbSeparator=Cc;exports.Button=kc;exports.ButtonContent=jc;exports.ButtonGroup=hb;exports.ButtonIcon=Js;exports.ButtonText=pb;exports.Card=xb;exports.CardBody=wb;exports.CardFooter=Cb;exports.CardHeader=vb;exports.Checkbox=Pb;exports.Chip=Sc;exports.CounterText=cv;exports.FadeContainer=Tm;exports.FadeIn=Fm;exports.FlipContainer=Pm;exports.GlitchText=fv;exports.GradientText=dv;exports.Image=zb;exports.Input=Tc;exports.LibraryLink=Zr;exports.LibraryRouterProvider=Dx;exports.Modal=Ac;exports.ModalBody=Ec;exports.ModalContent=Vc;exports.ModalFooter=Ic;exports.ModalHeader=Pc;exports.MorphingContainer=Im;exports.MorphingText=uv;exports.Navbar=Rc;exports.NavbarBrand=Bc;exports.NavbarContent=Dc;exports.NavbarItem=Lc;exports.NavbarMenu=$c;exports.NavbarMenuItem=zc;exports.NavbarMenuToggle=Oc;exports.Navigation=Lx;exports.Pagination=hd;exports.PaginationEllipsis=sa;exports.PaginationFirst=ta;exports.PaginationItem=Jn;exports.PaginationLast=ra;exports.PaginationNext=ea;exports.PaginationPrevious=Qn;exports.ParallaxContainer=Rm;exports.Progress=Wc;exports.RevealText=lv;exports.RotateIn=Gm;exports.ScaleContainer=Am;exports.ScaleIn=_m;exports.Sidebar=Vx;exports.SidebarContent=Ex;exports.SidebarFooter=Ix;exports.SidebarHeader=Px;exports.SidebarItem=Nx;exports.SidebarProvider=Ax;exports.SidebarTrigger=Rx;exports.SlideContainer=Mm;exports.SlideIn=Wm;exports.Spinner=_c;exports.Stagger=Hm;exports.StaggerContainer=Em;exports.Switch=Ty;exports.Table=zy;exports.TableBody=Wy;exports.TableCell=en;exports.TableColumn=Hc;exports.TableHeader=Fy;exports.TableRow=Kc;exports.Toast=Xc;exports.ToastContainer=tx;exports.ToastProvider=ex;exports.Tooltip=yx;exports.TooltipProvider=px;exports.TypeWriter=iv;exports.User=rd;exports.useAccordion=Hl;exports.useAutocomplete=ad;exports.useAvatar=fc;exports.useAvatarGroup=pc;exports.useLibraryNavigation=Ox;exports.useLibraryRouter=Zn;exports.useModal=oy;exports.useMorphingContainer=Nm;exports.usePagination=ld;exports.usePaginationContext=Jr;exports.useParallaxContainer=Bm;exports.useSidebar=qn;exports.useTableContext=Dt;exports.useToast=rx;
|
|
48
48
|
//# sourceMappingURL=index.cjs.map
|