import{x as N,E as B,B as I,y as L,v as M,h as P,T as W,z as q,A as U,w as m,C as S,D as z,F as j,p as D,f as G,a as K}from"./BlPzMKBp.js";import{b as H,w as J,c as Q,a as V}from"./BQSWrPvQ.js";import{d as X,b as Y}from"./DE1eCaeQ.js";import{d as Z,r as tt}from"./BZbDFF1N.js";const at=()=>performance.now(),_={tick:a=>requestAnimationFrame(a),now:()=>at(),tasks:new Set};function R(){const a=_.now();_.tasks.forEach(t=>{t.c(a)||(_.tasks.delete(t),t.f())}),_.tasks.size!==0&&_.tick(R)}function rt(a){let t;return _.tasks.size===0&&_.tick(R),{promise:new Promise(r=>{_.tasks.add(t={c:a,f:r})}),abort(){_.tasks.delete(t)}}}function b(a,t){J(()=>{a.dispatchEvent(new CustomEvent(t))})}function it(a){if(a==="float")return"cssFloat";if(a==="offset")return"cssOffset";if(a.startsWith("--"))return a;const t=a.split("-");return t.length===1?t[0]:t[0]+t.slice(1).map(r=>r[0].toUpperCase()+r.slice(1)).join("")}function O(a){const t={},r=a.split(";");for(const s of r){const[f,o]=s.split(":");if(!f||o===void 0)break;const c=it(f.trim());t[c]=o.trim()}return t}const et=a=>a;function vt(a,t,r,s){var f=(a&W)!==0,o="both",c,p=t.inert,y=t.style.overflow,e,i;function h(){var v=j,d=N;S(null),z(null);try{return c??(c=r()(t,(s==null?void 0:s())??{},{direction:o}))}finally{S(v),z(d)}}var $={is_global:f,in(){t.inert=p,b(t,"introstart"),e=C(t,h(),i,1,()=>{b(t,"introend"),e==null||e.abort(),e=c=void 0,t.style.overflow=y})},out(v){t.inert=!0,b(t,"outrostart"),i=C(t,h(),e,0,()=>{b(t,"outroend"),v==null||v()})},stop:()=>{e==null||e.abort(),i==null||i.abort()}},l=N;if((l.transitions??(l.transitions=[])).push($),H){var u=f;if(!u){for(var n=l.parent;n&&n.f&B;)for(;(n=n.parent)&&!(n.f&I););u=!n||(n.f&L)!==0}u&&M(()=>{P(()=>$.in())})}}function C(a,t,r,s,f){var o=s===1;if(q(t)){var c,p=!1;return U(()=>{if(!p){var v=t({direction:o?"in":"out"});c=C(a,v,r,s,f)}}),{abort:()=>{p=!0,c==null||c.abort()},deactivate:()=>c.deactivate(),reset:()=>c.reset(),t:()=>c.t()}}if(r==null||r.deactivate(),!(t!=null&&t.duration))return f(),{abort:m,deactivate:m,reset:m,t:()=>s};const{delay:y=0,css:e,tick:i,easing:h=et}=t;var $=[];if(o&&r===void 0&&(i&&i(0,1),e)){var l=O(e(0,1));$.push(l,l)}var u=()=>1-s,n=a.animate($,{duration:y});return n.onfinish=()=>{var v=(r==null?void 0:r.t())??1-s;r==null||r.abort();var d=s-v,w=t.duration*Math.abs(d),E=[];if(w>0){var k=!1;if(e)for(var x=Math.ceil(w/16.666666666666668),F=0;F<=x;F+=1){var T=v+d*h(F/x),A=O(e(T,1-T));E.push(A),k||(k=A.overflow==="hidden")}k&&(a.style.overflow="hidden"),u=()=>{var g=n.currentTime;return v+d*h(g/w)},i&&rt(()=>{if(n.playState!=="running")return!1;var g=u();return i(g,1-g),!0})}n=a.animate(E,{duration:w,fill:"forwards"}),n.onfinish=()=>{u=()=>s,i==null||i(s,1-s),f()}},{abort:()=>{n&&(n.cancel(),n.effect=null,n.onfinish=m)},deactivate:()=>{f=m},reset:()=>{s===0&&(i==null||i(1,0))},t:()=>u()}}const st=a=>a;function ot(a){const t=a-1;return t*t*t+1}function pt(a,{delay:t=0,duration:r=400,easing:s=st}={}){const f=+getComputedStyle(a).opacity;return{delay:t,duration:r,easing:s,css:o=>`opacity: ${o*f}`}}function ut(a,{delay:t=0,duration:r=400,easing:s=ot,axis:f="y"}={}){const o=getComputedStyle(a),c=+o.opacity,p=f==="y"?"height":"width",y=parseFloat(o[p]),e=f==="y"?["top","bottom"]:["left","right"],i=e.map(d=>`${d[0].toUpperCase()}${d.slice(1)}`),h=parseFloat(o[`padding${i[0]}`]),$=parseFloat(o[`padding${i[1]}`]),l=parseFloat(o[`margin${i[0]}`]),u=parseFloat(o[`margin${i[1]}`]),n=parseFloat(o[`border${i[0]}Width`]),v=parseFloat(o[`border${i[1]}Width`]);return{delay:t,duration:r,easing:s,css:d=>`overflow: hidden;opacity: ${Math.min(d*20,1)*c};${p}: ${d*y}px;padding-${e[0]}: ${d*h}px;padding-${e[1]}: ${d*$}px;margin-${e[0]}: ${d*l}px;margin-${e[1]}: ${d*u}px;border-${e[0]}-width: ${d*n}px;border-${e[1]}-width: ${d*v}px;min-${p}: 0`}}function lt(a,t){D(t,!0);let r=tt(t,["$$slots","$$events","$$legacy"]);X(a,Z({name:"chevron-down"},()=>r,{iconNode:[["path",{d:"m6 9 6 6 6-6"}]],children:(f,o)=>{var c=Q(),p=G(c);Y(p,()=>t.children??m),V(f,c)},$$slots:{default:!0}})),K()}export{lt as C,pt as f,ut as s,vt as t};
