@ssgoi/core 7.0.0-beta.1 → 7.0.0-beta.3

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 MeurSyphus
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -24,10 +24,17 @@ framework-specific transition boundaries, not this config.
24
24
  import { drill, slide, zoom, type SsgoiConfig } from "@ssgoi/core";
25
25
 
26
26
  const config: SsgoiConfig = {
27
- preserveScroll: { exclude: ["/posts/*"] },
28
27
  transitions: [
29
- { on: "/posts/**", except: "/posts", transition: drill() },
30
- { from: "/gallery", to: "/gallery/*", transition: zoom() },
28
+ {
29
+ on: "/posts/**",
30
+ except: "/posts",
31
+ transition: drill(),
32
+ },
33
+ {
34
+ from: "/gallery",
35
+ to: "/gallery/*",
36
+ transition: zoom(),
37
+ },
31
38
  {
32
39
  ordered: ["/tabs/a", "/tabs/b", "/tabs/c"],
33
40
  transition: slide(),
@@ -42,6 +49,9 @@ Rule forms:
42
49
  - `from`/`to`: precise pair. Reverse matching is enabled by default.
43
50
  - `ordered`: array order decides forward and backward.
44
51
  - `priority`: higher values win before path specificity.
52
+ - Scroll is automatic: `on` and `from`/`to` restore the forward `from` side
53
+ and reset `to`; `ordered` restores both. Use
54
+ `preserveScroll: { from: boolean, to: boolean }` for an exact override.
45
55
 
46
56
  Path patterns:
47
57
 
package/dist/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var te=Object.defineProperty;var ee=(e,t,n)=>t in e?te(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var E=(e,t,n)=>ee(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./multi-animation-6124HEke.cjs");class U{constructor(t){E(this,"omega");E(this,"zeta");E(this,"restDelta");E(this,"restSpeed");const{stiffness:n,damping:i}=t,s=1;this.omega=Math.sqrt(n/s),this.zeta=i/(2*Math.sqrt(n*s)),this.restDelta=t.restDelta??m.POSITION_THRESHOLD,this.restSpeed=t.restSpeed??m.VELOCITY_THRESHOLD}step(t,n,i){const s=Math.min(i,.033),{omega:o,zeta:r}=this,{position:l,velocity:c}=t,a=-2*s*r*o*c,p=s*o*o*(n-l),u=c+a+p;return{position:l+s*u,velocity:u}}isSettled(t,n){const i=Math.abs(n-t.position),s=Math.abs(t.velocity);return i<this.restDelta&&s<this.restSpeed}}class ne{constructor(t){E(this,"leader");E(this,"follower");E(this,"restDelta");E(this,"restSpeed");this.restDelta=t.restDelta??m.POSITION_THRESHOLD,this.restSpeed=t.restSpeed??m.VELOCITY_THRESHOLD,this.leader=new U({stiffness:t.stiffness,damping:t.damping,restDelta:this.restDelta,restSpeed:this.restSpeed});let n,i,s,o;typeof t.follower=="number"?(n=t.stiffness*t.follower,i=t.damping):t.follower?(n=t.follower.stiffness,i=t.follower.damping,s=t.follower.restDelta,o=t.follower.restSpeed):(n=t.stiffness,i=t.damping),this.follower=new U({stiffness:n,damping:i,restDelta:s??this.restDelta,restSpeed:o??this.restSpeed})}step(t,n,i){const o=t._leader??{position:t.position,velocity:t.velocity},r=this.leader.step(o,n,i),l=this.follower.step(t,r.position,i);return{position:l.position,velocity:l.velocity,_leader:r}}isSettled(t,n){const i=t,s=Math.abs(n-t.position)<this.restDelta&&Math.abs(t.velocity)<this.restSpeed;return i._leader?Math.abs(n-i._leader.position)<this.restDelta&&Math.abs(i._leader.velocity)<this.restSpeed&&s:s}}const ie=.01,se=500,oe=10;class re{constructor(t){E(this,"acceleration");E(this,"resistance");E(this,"resistanceType");E(this,"min");E(this,"max");E(this,"bounceStiffness");E(this,"bounceDamping");E(this,"restDelta");this.acceleration=t.acceleration,this.resistance=t.resistance,this.resistanceType=t.resistanceType??"quadratic",this.min=t.min,this.max=t.max,this.bounceStiffness=t.bounceStiffness??se,this.bounceDamping=t.bounceDamping??oe,this.restDelta=t.restDelta??ie}step(t,n,i){const s=Math.min(i,.033),{acceleration:o,resistance:r,resistanceType:l,min:c,max:a}=this,{position:p,velocity:u}=t,d=c!==void 0&&p<c,h=a!==void 0&&p>a;let f;if(d||h){const b=p-(d?c:a),$=-this.bounceStiffness*b,x=-this.bounceDamping*u;f=$+x}else{const S=n>p?1:-1;let b;l==="linear"?b=r*u:b=r*u*Math.abs(u),f=S*o-b}const y=u+f*s;let g=p+y*s;if(!d&&!h){const S=n>p?1:-1;(S>0&&g>n||S<0&&g<n)&&(g=n)}return{position:g,velocity:g===n?0:y}}isSettled(t,n){return Math.abs(n-t.position)<this.restDelta}}class w{static from(t){if(t.spring&&t.inertia)throw new Error("Cannot use both 'spring' and 'inertia' together. Choose one physics type.");if(t.inertia)return new re({acceleration:t.inertia.acceleration,resistance:t.inertia.resistance,resistanceType:t.inertia.resistanceType,min:t.inertia.min,max:t.inertia.max,bounceStiffness:t.inertia.bounceStiffness,bounceDamping:t.inertia.bounceDamping,restDelta:t.inertia.restDelta});const n=t.spring??{stiffness:300,damping:30};if(n.doubleSpring){const i=n.doubleSpring;let s;return typeof i=="number"?s=i:typeof i=="object"&&(s={stiffness:i.stiffness,damping:i.damping}),new ne({stiffness:n.stiffness,damping:n.damping,follower:s,restDelta:n.restDelta,restSpeed:n.restSpeed})}return new U({stiffness:n.stiffness,damping:n.damping,restDelta:n.restDelta,restSpeed:n.restSpeed})}static fromSpring(t){return w.from({spring:t})}}class ae{constructor(t){E(this,"durationSec");this.durationSec=Math.max(1/60,t.durationSec)}step(t,n,i){const s=n-t.position;if(s===0)return t;const o=Math.sign(s),r=Math.abs(s)/this.durationSec,l=o*r*i,c=t.position+l;return(o>0?c>=n:c<=n)?{position:n,velocity:0}:{position:c,velocity:o*r}}isSettled(t,n){return Math.abs(t.position-n)<m.POSITION_THRESHOLD}}function Y(e,t){function n(o){let r=0,l=0;const c=o.offsetWidth,a=o.offsetHeight;let p=o;for(;p;)r+=p.offsetTop,l+=p.offsetLeft,p=p.offsetParent;return r-=window.scrollY,l-=window.scrollX,{top:r,left:l,width:c,height:a}}const i=n(e),s=n(t);return new DOMRect(s.left-i.left,s.top-i.top,s.width,s.height)}function N(e,t){const n=e.getBoundingClientRect(),i=t.getBoundingClientRect(),s=e.offsetWidth>0?n.width/e.offsetWidth:1,o=e.offsetHeight>0?n.height/e.offsetHeight:1;return new DOMRect((i.left-n.left)/s,(i.top-n.top)/o,i.width/s,i.height/o)}function T(e,t){const{scrollingElement:n,positionedParent:i}=e,s=n!==i&&n.contains(i)?Y(n,i).top:0;return{top:e[t].scroll.y,left:0,width:n.clientWidth,height:n.clientHeight-s}}function Lt(e,t){const{scrollingElement:n,positionedParent:i}=e,s=n!==i&&n.contains(i)?Y(n,i).top:0;return{top:e[t].scroll.y-s,height:n.clientHeight}}const ct=8,pt={spring:{stiffness:800,damping:40,doubleSpring:1.2,restDelta:.1,restSpeed:.1}};function le({direction:e}){const t=e==="forward"?ct:-ct;return{out:{willChange:"transform, opacity",startStyle:{},animate:n=>({opacity:`${1-n}`})},in:{willChange:"transform, opacity",startStyle:{transform:`translate3d(${t}px, 0, 0)`,opacity:"0"},animate:n=>({transform:`translate3d(${t*(1-n)}px, 0, 0)`,opacity:`${n}`})}}}function ce(){return{outPhysics:pt,inPhysics:pt,composition:{mode:"parallel",startAt:[0,0]},build:le}}const ut=30,pe={inertia:{acceleration:150,resistance:1.5,restDelta:.1}},ue={spring:{stiffness:180,damping:34,restDelta:.1,restSpeed:.1}};function de({direction:e}){const t=e==="forward"?1:-1,n=-ut*t,i=ut*t;return{out:{willChange:"transform, opacity",startStyle:{},animate:s=>({transform:`translate3d(${n*s}px, 0, 0)`,opacity:`${1-s}`})},in:{willChange:"transform, opacity",startStyle:{transform:`translate3d(${i}px, 0, 0)`,opacity:"0"},animate:s=>({transform:`translate3d(${i*(1-s)}px, 0, 0)`,opacity:`${s}`})}}}function fe(){return{outPhysics:pe,inPhysics:ue,composition:{mode:"sequence"},build:de}}const he={snappy:ce(),fluid:fe()},dt=8,ye={inertia:{acceleration:150,resistance:1.5,restDelta:.1}},me={spring:{stiffness:180,damping:34,restDelta:.1,restSpeed:.1}};function ge({direction:e}){const t=e==="forward"?1:-1,n=-dt*t,i=dt*t;return{out:{willChange:"transform, opacity",startStyle:{},animate:s=>({transform:`translate3d(0, ${n*s}px, 0)`,opacity:`${1-s}`})},in:{willChange:"transform, opacity",startStyle:{transform:`translate3d(0, ${i}px, 0)`,opacity:"0"},animate:s=>({transform:`translate3d(0, ${i*(1-s)}px, 0)`,opacity:`${s}`})}}}function be(){return{outPhysics:ye,inPhysics:me,composition:{mode:"sequence"},build:ge}}const we=8,Se={inertia:{acceleration:150,resistance:1.5,restDelta:.1}},xe={spring:{stiffness:180,damping:34,restDelta:.1,restSpeed:.1}};function Ce(e){const t=we;return{out:{willChange:"opacity",startStyle:{},animate:n=>({opacity:`${1-n}`})},in:{willChange:"transform, opacity",startStyle:{transform:`translate3d(0, ${t}px, 0)`,opacity:"0"},animate:n=>({transform:`translate3d(0, ${t*(1-n)}px, 0)`,opacity:`${n}`})}}}function $e(){return{outPhysics:Se,inPhysics:xe,composition:{mode:"sequence"},build:Ce}}const ft=be(),Ee={snappy:ft,directional:ft,"non-directional":$e()},ht={spring:{stiffness:280,damping:30,restDelta:.1,restSpeed:.1}},X=.1,B=1/3,yt=e=>Math.max(0,Math.min(1,e));function Ae({direction:e}){const t=e==="forward"?1:-1,n=1-t*X;return{out:{willChange:"transform, opacity",startStyle:{},animate:i=>({transform:`scale(${1+t*i*X})`,opacity:`${yt(1-i/B)}`})},in:{willChange:"transform, opacity",startStyle:{transform:`scale(${n})`,opacity:"0"},animate:i=>({transform:`scale(${n+t*i*X})`,opacity:`${yt((i-B)/(1-B))}`})}}}function Pe(){return{outPhysics:ht,inPhysics:ht,composition:{mode:"parallel"},build:Ae}}const mt={spring:{stiffness:280,damping:30,restDelta:.1,restSpeed:.1}},Z=.1,G=1/3,gt=e=>Math.max(0,Math.min(1,e));function _e(){return{out:{willChange:"opacity",startStyle:{},animate:e=>({opacity:`${gt(1-e/G)}`})},in:{willChange:"transform, opacity",startStyle:{transform:`scale(${1-Z})`,opacity:"0"},animate:e=>({transform:`scale(${1-Z+e*Z})`,opacity:`${gt((e-G)/(1-G))}`})}}}function Ie(){return{outPhysics:mt,inPhysics:mt,composition:{mode:"parallel"},build:_e}}const bt=Pe(),Re={snappy:bt,directional:bt,"non-directional":Ie()},Oe={x:he,y:Ee,z:Re};function ve(e,t){const n=Oe[e];return n[t]??n.snappy}const Te="x",De="snappy";function wt(e,t){e.style.willChange=t.willChange,e.style.backfaceVisibility="hidden",e.style.contain="layout paint";for(const[n,i]of Object.entries(t.startStyle))e.style[n]=i}function Yt(e){e.style.willChange="auto",e.style.backfaceVisibility="",e.style.contain="",e.style.transform="",e.style.opacity="",e.style.clipPath=""}function Fe(e){Yt(e),e.style.pointerEvents=""}const Me=(e={})=>{const t=e.type??Te,n=e.feel??De,i=ve(t,n);return{prepare:({from:s,to:o,context:r})=>{const l=i.build({direction:r.direction});return s.then(c=>{wt(c,l.out),c.style.pointerEvents="none"}),o.then(c=>{wt(c,l.in)}),{}},animation:({from:s,to:o,context:r})=>{const l=i.build({direction:r.direction});if(t==="z"){const p=T(r,"from"),u=T(r,"to");s.style.clipPath=`inset(${p.top}px 0 calc(100% - ${p.top+p.height}px) 0)`,o.style.clipPath=`inset(${u.top}px 0 calc(100% - ${u.top+u.height}px) 0)`}const c=new m.WebAnimation({element:s,integrator:w.from(i.outPhysics),style:p=>l.out.animate(p),onComplete:()=>Fe(s)}),a=new m.WebAnimation({element:o,integrator:w.from(i.inPhysics),style:p=>l.in.animate(p),onComplete:()=>Yt(o)});return new m.MultiAnimation([c,a],i.composition)}}};function Le(e,t,n){return e==="y"?t==="non-directional"?"non-directional":"directional":e!=="x"||t==="snappy"||n==="snappy"?"snappy":"fluid"}function Ye(e={}){const t=e.type??"x",n=e.variant,i=e.feel,s=Le(t,n,i);return Me({type:t,feel:s})}const ke={spring:{stiffness:200,damping:22}},He=10,Ne="horizontal",We="#000000";function St(e,t,n,i,s,o){window.getComputedStyle(e).position==="static"&&(e.style.position="relative");const l=document.createElement("div");l.style.cssText=`
1
+ "use strict";var te=Object.defineProperty;var ee=(e,t,n)=>t in e?te(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var E=(e,t,n)=>ee(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./multi-animation-6124HEke.cjs");class U{constructor(t){E(this,"omega");E(this,"zeta");E(this,"restDelta");E(this,"restSpeed");const{stiffness:n,damping:i}=t,s=1;this.omega=Math.sqrt(n/s),this.zeta=i/(2*Math.sqrt(n*s)),this.restDelta=t.restDelta??m.POSITION_THRESHOLD,this.restSpeed=t.restSpeed??m.VELOCITY_THRESHOLD}step(t,n,i){const s=Math.min(i,.033),{omega:o,zeta:r}=this,{position:l,velocity:c}=t,a=-2*s*r*o*c,p=s*o*o*(n-l),u=c+a+p;return{position:l+s*u,velocity:u}}isSettled(t,n){const i=Math.abs(n-t.position),s=Math.abs(t.velocity);return i<this.restDelta&&s<this.restSpeed}}class ne{constructor(t){E(this,"leader");E(this,"follower");E(this,"restDelta");E(this,"restSpeed");this.restDelta=t.restDelta??m.POSITION_THRESHOLD,this.restSpeed=t.restSpeed??m.VELOCITY_THRESHOLD,this.leader=new U({stiffness:t.stiffness,damping:t.damping,restDelta:this.restDelta,restSpeed:this.restSpeed});let n,i,s,o;typeof t.follower=="number"?(n=t.stiffness*t.follower,i=t.damping):t.follower?(n=t.follower.stiffness,i=t.follower.damping,s=t.follower.restDelta,o=t.follower.restSpeed):(n=t.stiffness,i=t.damping),this.follower=new U({stiffness:n,damping:i,restDelta:s??this.restDelta,restSpeed:o??this.restSpeed})}step(t,n,i){const o=t._leader??{position:t.position,velocity:t.velocity},r=this.leader.step(o,n,i),l=this.follower.step(t,r.position,i);return{position:l.position,velocity:l.velocity,_leader:r}}isSettled(t,n){const i=t,s=Math.abs(n-t.position)<this.restDelta&&Math.abs(t.velocity)<this.restSpeed;return i._leader?Math.abs(n-i._leader.position)<this.restDelta&&Math.abs(i._leader.velocity)<this.restSpeed&&s:s}}const ie=.01,se=500,oe=10;class re{constructor(t){E(this,"acceleration");E(this,"resistance");E(this,"resistanceType");E(this,"min");E(this,"max");E(this,"bounceStiffness");E(this,"bounceDamping");E(this,"restDelta");this.acceleration=t.acceleration,this.resistance=t.resistance,this.resistanceType=t.resistanceType??"quadratic",this.min=t.min,this.max=t.max,this.bounceStiffness=t.bounceStiffness??se,this.bounceDamping=t.bounceDamping??oe,this.restDelta=t.restDelta??ie}step(t,n,i){const s=Math.min(i,.033),{acceleration:o,resistance:r,resistanceType:l,min:c,max:a}=this,{position:p,velocity:u}=t,d=c!==void 0&&p<c,h=a!==void 0&&p>a;let f;if(d||h){const b=p-(d?c:a),$=-this.bounceStiffness*b,x=-this.bounceDamping*u;f=$+x}else{const S=n>p?1:-1;let b;l==="linear"?b=r*u:b=r*u*Math.abs(u),f=S*o-b}const y=u+f*s;let g=p+y*s;if(!d&&!h){const S=n>p?1:-1;(S>0&&g>n||S<0&&g<n)&&(g=n)}return{position:g,velocity:g===n?0:y}}isSettled(t,n){return Math.abs(n-t.position)<this.restDelta}}class w{static from(t){if(t.spring&&t.inertia)throw new Error("Cannot use both 'spring' and 'inertia' together. Choose one physics type.");if(t.inertia)return new re({acceleration:t.inertia.acceleration,resistance:t.inertia.resistance,resistanceType:t.inertia.resistanceType,min:t.inertia.min,max:t.inertia.max,bounceStiffness:t.inertia.bounceStiffness,bounceDamping:t.inertia.bounceDamping,restDelta:t.inertia.restDelta});const n=t.spring??{stiffness:300,damping:30};if(n.doubleSpring){const i=n.doubleSpring;let s;return typeof i=="number"?s=i:typeof i=="object"&&(s={stiffness:i.stiffness,damping:i.damping}),new ne({stiffness:n.stiffness,damping:n.damping,follower:s,restDelta:n.restDelta,restSpeed:n.restSpeed})}return new U({stiffness:n.stiffness,damping:n.damping,restDelta:n.restDelta,restSpeed:n.restSpeed})}static fromSpring(t){return w.from({spring:t})}}class ae{constructor(t){E(this,"durationSec");this.durationSec=Math.max(1/60,t.durationSec)}step(t,n,i){const s=n-t.position;if(s===0)return t;const o=Math.sign(s),r=Math.abs(s)/this.durationSec,l=o*r*i,c=t.position+l;return(o>0?c>=n:c<=n)?{position:n,velocity:0}:{position:c,velocity:o*r}}isSettled(t,n){return Math.abs(t.position-n)<m.POSITION_THRESHOLD}}function Y(e,t){function n(o){let r=0,l=0;const c=o.offsetWidth,a=o.offsetHeight;let p=o;for(;p;)r+=p.offsetTop,l+=p.offsetLeft,p=p.offsetParent;return r-=window.scrollY,l-=window.scrollX,{top:r,left:l,width:c,height:a}}const i=n(e),s=n(t);return new DOMRect(s.left-i.left,s.top-i.top,s.width,s.height)}function N(e,t){const n=e.getBoundingClientRect(),i=t.getBoundingClientRect(),s=e.offsetWidth>0?n.width/e.offsetWidth:1,o=e.offsetHeight>0?n.height/e.offsetHeight:1;return new DOMRect((i.left-n.left)/s,(i.top-n.top)/o,i.width/s,i.height/o)}function T(e,t){const{scrollingElement:n,positionedParent:i}=e,s=n!==i&&n.contains(i)?Y(n,i).top:0;return{top:e[t].scroll.y,left:0,width:n.clientWidth,height:n.clientHeight-s}}function Lt(e,t){const{scrollingElement:n,positionedParent:i}=e,s=n!==i&&n.contains(i)?Y(n,i).top:0;return{top:e[t].scroll.y-s,height:n.clientHeight}}const ct=8,pt={spring:{stiffness:600,damping:40,doubleSpring:1.2}};function le({direction:e}){const t=e==="forward"?ct:-ct;return{out:{willChange:"transform, opacity",startStyle:{},animate:n=>({opacity:`${1-n}`})},in:{willChange:"transform, opacity",startStyle:{transform:`translate3d(${t}px, 0, 0)`,opacity:"0"},animate:n=>({transform:`translate3d(${t*(1-n)}px, 0, 0)`,opacity:`${n}`})}}}function ce(){return{outPhysics:pt,inPhysics:pt,composition:{mode:"parallel",startAt:[0,0]},build:le}}const ut=30,pe={inertia:{acceleration:150,resistance:1.5,restDelta:.1}},ue={spring:{stiffness:180,damping:34,restDelta:.1,restSpeed:.1}};function de({direction:e}){const t=e==="forward"?1:-1,n=-ut*t,i=ut*t;return{out:{willChange:"transform, opacity",startStyle:{},animate:s=>({transform:`translate3d(${n*s}px, 0, 0)`,opacity:`${1-s}`})},in:{willChange:"transform, opacity",startStyle:{transform:`translate3d(${i}px, 0, 0)`,opacity:"0"},animate:s=>({transform:`translate3d(${i*(1-s)}px, 0, 0)`,opacity:`${s}`})}}}function fe(){return{outPhysics:pe,inPhysics:ue,composition:{mode:"sequence"},build:de}}const he={snappy:ce(),fluid:fe()},dt=8,ye={inertia:{acceleration:150,resistance:1.5,restDelta:.1}},me={spring:{stiffness:180,damping:34,restDelta:.1,restSpeed:.1}};function ge({direction:e}){const t=e==="forward"?1:-1,n=-dt*t,i=dt*t;return{out:{willChange:"transform, opacity",startStyle:{},animate:s=>({transform:`translate3d(0, ${n*s}px, 0)`,opacity:`${1-s}`})},in:{willChange:"transform, opacity",startStyle:{transform:`translate3d(0, ${i}px, 0)`,opacity:"0"},animate:s=>({transform:`translate3d(0, ${i*(1-s)}px, 0)`,opacity:`${s}`})}}}function be(){return{outPhysics:ye,inPhysics:me,composition:{mode:"sequence"},build:ge}}const we=8,Se={inertia:{acceleration:150,resistance:1.5,restDelta:.1}},xe={spring:{stiffness:180,damping:34,restDelta:.1,restSpeed:.1}};function Ce(e){const t=we;return{out:{willChange:"opacity",startStyle:{},animate:n=>({opacity:`${1-n}`})},in:{willChange:"transform, opacity",startStyle:{transform:`translate3d(0, ${t}px, 0)`,opacity:"0"},animate:n=>({transform:`translate3d(0, ${t*(1-n)}px, 0)`,opacity:`${n}`})}}}function $e(){return{outPhysics:Se,inPhysics:xe,composition:{mode:"sequence"},build:Ce}}const ft=be(),Ee={snappy:ft,directional:ft,"non-directional":$e()},ht={spring:{stiffness:280,damping:30,restDelta:.1,restSpeed:.1}},X=.1,B=1/3,yt=e=>Math.max(0,Math.min(1,e));function Ae({direction:e}){const t=e==="forward"?1:-1,n=1-t*X;return{out:{willChange:"transform, opacity",startStyle:{},animate:i=>({transform:`scale(${1+t*i*X})`,opacity:`${yt(1-i/B)}`})},in:{willChange:"transform, opacity",startStyle:{transform:`scale(${n})`,opacity:"0"},animate:i=>({transform:`scale(${n+t*i*X})`,opacity:`${yt((i-B)/(1-B))}`})}}}function Pe(){return{outPhysics:ht,inPhysics:ht,composition:{mode:"parallel"},build:Ae}}const mt={spring:{stiffness:280,damping:30,restDelta:.1,restSpeed:.1}},Z=.1,G=1/3,gt=e=>Math.max(0,Math.min(1,e));function _e(){return{out:{willChange:"opacity",startStyle:{},animate:e=>({opacity:`${gt(1-e/G)}`})},in:{willChange:"transform, opacity",startStyle:{transform:`scale(${1-Z})`,opacity:"0"},animate:e=>({transform:`scale(${1-Z+e*Z})`,opacity:`${gt((e-G)/(1-G))}`})}}}function Ie(){return{outPhysics:mt,inPhysics:mt,composition:{mode:"parallel"},build:_e}}const bt=Pe(),Re={snappy:bt,directional:bt,"non-directional":Ie()},Oe={x:he,y:Ee,z:Re};function ve(e,t){const n=Oe[e];return n[t]??n.snappy}const Te="x",De="snappy";function wt(e,t){e.style.willChange=t.willChange,e.style.backfaceVisibility="hidden",e.style.contain="layout paint";for(const[n,i]of Object.entries(t.startStyle))e.style[n]=i}function Yt(e){e.style.willChange="auto",e.style.backfaceVisibility="",e.style.contain="",e.style.transform="",e.style.opacity="",e.style.clipPath=""}function Fe(e){Yt(e),e.style.pointerEvents=""}const Me=(e={})=>{const t=e.type??Te,n=e.feel??De,i=ve(t,n);return{prepare:({from:s,to:o,context:r})=>{const l=i.build({direction:r.direction});return s.then(c=>{wt(c,l.out),c.style.pointerEvents="none"}),o.then(c=>{wt(c,l.in)}),{}},animation:({from:s,to:o,context:r})=>{const l=i.build({direction:r.direction});if(t==="z"){const p=T(r,"from"),u=T(r,"to");s.style.clipPath=`inset(${p.top}px 0 calc(100% - ${p.top+p.height}px) 0)`,o.style.clipPath=`inset(${u.top}px 0 calc(100% - ${u.top+u.height}px) 0)`}const c=new m.WebAnimation({element:s,integrator:w.from(i.outPhysics),style:p=>l.out.animate(p),onComplete:()=>Fe(s)}),a=new m.WebAnimation({element:o,integrator:w.from(i.inPhysics),style:p=>l.in.animate(p),onComplete:()=>Yt(o)});return new m.MultiAnimation([c,a],i.composition)}}};function Le(e,t,n){return e==="y"?t==="non-directional"?"non-directional":"directional":e!=="x"||t==="snappy"||n==="snappy"?"snappy":"fluid"}function Ye(e={}){const t=e.type??"x",n=e.variant,i=e.feel,s=Le(t,n,i);return Me({type:t,feel:s})}const ke={spring:{stiffness:200,damping:22}},He=10,Ne="horizontal",We="#000000";function St(e,t,n,i,s,o){window.getComputedStyle(e).position==="static"&&(e.style.position="relative");const l=document.createElement("div");l.style.cssText=`
2
2
  position: absolute;
3
3
  top: 0;
4
4
  left: 0;
@@ -32,4 +32,4 @@
32
32
  ${t.left+t.width}px ${t.top}px,
33
33
  ${t.left+t.width}px ${t.top+t.height}px,
34
34
  ${t.left}px ${t.top+t.height}px
35
- )`}function K(e,t,n,i,s){const o=n/1e3;return new m.WebAnimation({element:e,integrator:new ae({durationSec:o}),lowerBound:0,upperBound:1,style:r=>i(pn(t,r)),onComplete:s})}const fn=(e={})=>{var s;const t=((s=e.border)==null?void 0:s.color)??an,n=rn,i=e.physics;return{prepare:({from:o,to:r,context:l})=>{const c=T(l,"from"),a=T(l,"to"),p=Y(document.body,l.positionedParent),u=dn(t,{...c,top:p.top});for(const d of["topLeft","topRight","bottomLeft","bottomRight"])l.positionedParent.appendChild(u[d]);return o.then(d=>{Et(d,c),At(d,c),d.style.transform=`translateY(${-c.top}px)`}),r.then(d=>{Et(d,a),At(d,a),d.style.transform=`translateY(${-a.top+a.height}px) scale(${n})`}),{borders:u,fromRect:c,toRect:a}},animation:({from:o,to:r,context:l,borders:c,fromRect:a,toRect:p})=>{const u=$t({rect:a,scale:n,direction:"out",override:i}),d=$t({rect:p,scale:n,direction:"in",override:i}),h=K(o,u.snapshots,u.totalDuration,b=>({transform:`translateY(${b.translateY}px) scale(${b.scale})`}),()=>{o.style.clipPath="",o.style.transformOrigin="",o.style.transform=""}),f=K(r,d.snapshots,d.totalDuration,b=>({transform:`translateY(${b.translateY}px) scale(${b.scale})`}),()=>{r.style.clipPath="",r.style.transformOrigin="",r.style.transform=""}),y=un.map(([b,$],x)=>{const C=["topLeft","topRight","bottomLeft","bottomRight"][x];return K(c[C],u.snapshots,u.totalDuration,_=>{const P=(a.width-a.width*_.scale)/2*.7*b,A=(a.height-a.height*_.scale)/2*.7*$;return{transform:`translate(${P}px, ${A}px)`}})}),g=new m.MultiAnimation([h,f,...y],{mode:"parallel"}),S=g.onComplete;return g.onComplete=()=>{S==null||S();const b=l.positionedParent;for(const $ of["topLeft","topRight","bottomLeft","bottomRight"]){const x=c[$];x.parentElement===b&&b.removeChild(x)}},g}}};function hn(e={}){const{options:t}=e,n=(t==null?void 0:t.borderColor)!==void 0?{border:{color:t.borderColor}}:void 0;return fn(n)}function yn(e){if(!e)return null;if(e.includes("/")){const n=e.split("/");if(n.length!==2)return null;const i=Number.parseFloat(n[0]??""),s=Number.parseFloat(n[1]??"");return Number.isFinite(i)&&Number.isFinite(s)&&i>0&&s>0?i/s:null}const t=Number.parseFloat(e);return Number.isFinite(t)&&t>0?t:null}function mn(e){return e==="contain"||e==="cover"?e:null}function st(e){return e.tagName==="IMG"}function gn(e){if(st(e))return e;if(e.tagName==="PICTURE"||e.tagName==="VIDEO")return null;const t=[];for(const n of Array.from(e.children)){const i=n;st(i)&&t.push(i)}return t.length===1?t[0]??null:null}function bn(e){var c,a;if(!st(e))return null;const t=e,n=t.naturalWidth,i=t.naturalHeight;if(typeof n=="number"&&typeof i=="number"&&Number.isFinite(n)&&Number.isFinite(i)&&n>0&&i>0)return n/i;const s=((c=e.getAttribute("width"))==null?void 0:c.trim())??"",o=((a=e.getAttribute("height"))==null?void 0:a.trim())??"",r=s===""?Number.NaN:Number(s),l=o===""?Number.NaN:Number(o);return Number.isFinite(r)&&Number.isFinite(l)&&r>0&&l>0?r/l:null}function wn(e){const t=e.trim().toLowerCase().replace(/\s+/g," ");return t===""||t==="center"||t==="center center"||t==="50% 50%"}function V(e){if(typeof getComputedStyle=="function")try{return getComputedStyle(e)}catch{}return e.style}function Sn(e){const t=V(e),n=wn(t.objectPosition??"");return{fit:n?mn(t.objectFit??null):null,centered:n}}function Ht(e){if(!e)return 0;const t=/^(-?(?:\d+\.?\d*|\.\d+))px$/.exec(e.trim());if(!t)return null;const n=Number.parseFloat(t[1]??"");return Number.isFinite(n)&&n>=0?n:null}function Pt(e){const t=V(e),n=[t.borderTopLeftRadius,t.borderTopRightRadius,t.borderBottomRightRadius,t.borderBottomLeftRadius].map(Ht),i=n[0];if(i==null)return{radius:0,supported:!1};const s=n.every(o=>o!==null&&Math.abs(o-i)<.001);return{radius:s?i:0,supported:s}}function xn(e,t){var s;if(!t)return null;const n=(s=e.getAttribute(t))==null?void 0:s.trim();if(n==null||n==="")return null;const i=Number.parseFloat(n);return Number.isFinite(i)&&i>=0?i:null}function Cn(e){const t=V(e);return[t.paddingTop,t.paddingRight,t.paddingBottom,t.paddingLeft,t.borderTopWidth,t.borderRightWidth,t.borderBottomWidth,t.borderLeftWidth].every(i=>i?Ht(i)===0:!0)}function $n(e){const t=V(e),n=i=>i==="hidden"||i==="clip";return n(t.overflowX)&&n(t.overflowY)}function O(e){return e.left+e.width/2}function v(e){return e.top+e.height/2}function lt(e,t){return{top:Math.max(0,t.top-e.top),right:Math.max(0,e.left+e.width-(t.left+t.width)),bottom:Math.max(0,e.top+e.height-(t.top+t.height)),left:Math.max(0,t.left-e.left)}}function En(e,t){const n=Math.max(e.left,t.left),i=Math.max(e.top,t.top),s=Math.min(e.left+e.width,t.left+t.width),o=Math.min(e.top+e.height,t.top+t.height);return s>n&&o>i?{left:n,top:i,width:s-n,height:o-i}:null}function _t(e,t){return Math.abs(e.left-t.left)<.01&&Math.abs(e.top-t.top)<.01&&Math.abs(e.width-t.width)<.01&&Math.abs(e.height-t.height)<.01}function An(e,t,n){const i=e.width/e.height;let s,o;return n==="contain"?i>t?(o=e.height,s=o*t):(s=e.width,o=s/t):i>t?(s=e.width,o=s/t):(o=e.height,s=o*t),{left:e.left+(e.width-s)/2,top:e.top+(e.height-o)/2,width:s,height:o}}function Nt(e,t,n){const i=t!==null&&n!==null&&e.width>0&&e.height>0?An(e,t,n):e,s=n==="contain"?i:e;return{bbox:e,content:i,window:s,clipInset:lt(i,s),aspectRatio:t,fit:n,radius:0,radiusSource:"none",bboxRadius:0,bboxRadiusSource:"none",contentAware:t!==null&&n!==null,mediaElement:null}}function ot(e,t,n){return{...Nt(e,null,null),radius:t,radiusSource:n,bboxRadius:t,bboxRadiusSource:n}}function Wt(e,t){const n=e.aspectRatio,i=t.aspectRatio;return e.contentAware&&t.contentAware&&n!==null&&i!==null&&Math.abs(n-i)/Math.max(n,i)<.01}function It(e){return ot(e.bbox,e.bboxRadius,e.bboxRadiusSource)}function zt(e,t){return Wt(e,t)?[e,t]:[It(e),It(t)]}function rt(e,t,n,i){const s=gn(e),o=s?n(s):t,r=i.legacyAspectRatioAttribute?yn(e.getAttribute(i.legacyAspectRatioAttribute)??(s==null?void 0:s.getAttribute(i.legacyAspectRatioAttribute))??null):null,l=r??(s?bn(s):null),c=s?Sn(s):{fit:null,centered:!0},a=c.centered&&(s===null||Cn(s))?c.fit??(r!==null?i.fallbackFit??null:null):null,p=Nt(o,l,a),u=$n(e),h=s!==null&&s!==e&&u?En(p.window,t):p.window,f=xn(e,i.legacyRadiusAttribute),y=s===e||u,g=y?Pt(e):{radius:0,supported:!0},S=f??g.radius,b=f!==null?"legacy":g.supported?g.radius>0?"computed":"none":"unsupported",$=[];h&&y&&_t(h,t)&&$.push(g),h&&s&&_t(h,o)&&$.push(Pt(s));const x=$.every(A=>A.supported),C=Math.max(0,...$.map(A=>A.radius)),_=f??C,P=f!==null?"legacy":x?C>0?"computed":"none":"unsupported";return!h||P==="unsupported"?ot(t,S,b):{...p,bbox:t,window:h,clipInset:lt(p.content,h),radius:_,radiusSource:P,bboxRadius:S,bboxRadiusSource:b,mediaElement:p.contentAware?s:null}}function Ut(e,t,n,i,s){const o=n.width/i,r=n.height/s;return{left:O(e)+(O(n)-O(t))/i-o/2,top:v(e)+(v(n)-v(t))/s-r/2,width:o,height:r}}const Pn={enter:"contain",exit:"cover",legacy:"contain"};function F(e){return Pn[e]}const Rt="data-hero-enter-key",Ot="data-hero-exit-key",J="data-hero-key";class _n{constructor(){E(this,"previousFromOpacity","")}prepare(t){t.from.then(n=>{this.previousFromOpacity=n.style.opacity,n.style.opacity="0"})}contribute(t){return t.onComplete(()=>{t.from.style.opacity=this.previousFromOpacity}),[]}}const In=()=>new _n;class Rn{contribute(t){const{from:n,to:i,physics:s,onComplete:o}=t,r=n.style.opacity,l=i.style.opacity,c=n.style.willChange,a=i.style.willChange;return i.style.opacity="0",n.style.willChange="opacity",i.style.willChange="opacity",o(()=>{n.style.opacity=r,i.style.opacity=l,n.style.willChange=c,i.style.willChange=a}),[new m.WebAnimation({element:n,integrator:w.from(s),style:(p,u)=>({opacity:u})}),new m.WebAnimation({element:i,integrator:w.from(s),style:p=>({opacity:p})})]}}const On=()=>new Rn,vn={static:In,fade:On},Tn={spring:{stiffness:320,damping:30}},Dn=()=>Tn,Fn={spring:{stiffness:300,damping:30,doubleSpring:1}},Mn=()=>Fn,Ln={default:Dn,smooth:Mn},Yn=700,kn="data-hero-aspect-ratio",Hn="data-hero-radius";function vt(e,t,n){const i=Y(e,t);return rt(t,i,s=>Y(e,s),{fallbackFit:n,legacyAspectRatioAttribute:kn,legacyRadiusAttribute:Hn})}function W(e,t){const n=new Map,i=e.querySelectorAll(`[${t}]`);for(const s of Array.from(i)){const o=s.getAttribute(t);o&&(n.has(o)||n.set(o,s))}return n}function Nn(e,t){const n=[],i=W(t,Rt),s=W(e,Ot);for(const[l,c]of i){const a=s.get(l);a&&n.push({key:l,fromEl:a,toEl:c,fromFit:F("exit"),toFit:F("enter")})}const o=W(e,Rt),r=W(t,Ot);for(const[l,c]of o){const a=r.get(l);a&&n.push({key:l,fromEl:c,toEl:a,fromFit:F("enter"),toFit:F("exit")})}return n}function Wn(e,t){const n=[],i=Array.from(t.querySelectorAll(`[${J}]`));for(const s of i){const o=s.getAttribute(J);if(!o)continue;const r=e.querySelector(`[${J}="${o}"]`);r&&n.push({key:o,fromEl:r,toEl:s,fromFit:F("legacy"),toFit:F("legacy")})}return n}function zn(e,t){const n=Nn(e,t);return n.length>0?n:Wn(e,t)}function Un(e,t){return zt(e,t)}function Vn(e,t){return e.radiusSource==="unsupported"||t.radiusSource==="unsupported"?!1:e.mediaElement!==null||t.mediaElement!==null||e.radiusSource==="computed"||e.radiusSource==="legacy"||t.radiusSource==="computed"||t.radiusSource==="legacy"}function Xn(e,t,n){const{fromEl:i,toEl:s}=t,[o,r]=Un(vt(e,i,t.fromFit),vt(e,s,t.toFit)),l=o.content,c=o.window,a=r.content,p=r.window,u=r.clipInset,d=o.radiusSource==="unsupported"||r.radiusSource==="unsupported",h=d?0:o.radius,f=d?0:r.radius;if(l.width===0||l.height===0||c.width===0||c.height===0||a.width===0||a.height===0||p.width===0||p.height===0)return null;const y=Math.max(l.width/a.width,l.height/a.height),g=O(l),S=v(l),b=O(a),$=v(a),x=g-b,C=S-$;if(Math.abs(C)>n)return null;const _=lt(a,Ut(a,l,c,y,y));return{toContent:a,fromVisualEl:o.mediaElement??i,toVisualEl:r.mediaElement??s,resetCloneRadius:Vn(o,r),styleFor:(P,A)=>{const k=A*x,M=A*C,H=P+A*y,jt=Math.max(0,h*A+f*P)/Math.max(Math.abs(H),1e-6),qt=_.top*A+u.top*P,Kt=_.right*A+u.right*P,Jt=_.bottom*A+u.bottom*P,Qt=_.left*A+u.left*P;return{transform:`translate(${k}px, ${M}px) scale(${H})`,clipPath:`inset(${qt}px ${Kt}px ${Jt}px ${Qt}px round ${jt}px)`}}}}function Bn(e,t){e.style.transform=t.transform,e.style.clipPath=t.clipPath}class Zn{contribute(t){const{resolved:n,physics:i,positionedParent:s,maxDistance:o,onComplete:r}=t,l=[];for(const c of n.pairs){const a=Xn(s,c,o);if(!a)continue;const{fromVisualEl:p,toVisualEl:u}=a,d=u.cloneNode(!0);d.style.position="absolute",d.style.left=`${a.toContent.left}px`,d.style.top=`${a.toContent.top}px`,d.style.width=`${a.toContent.width}px`,d.style.height=`${a.toContent.height}px`,d.style.margin="0",d.style.transformOrigin="center center",d.style.zIndex="1000",d.style.willChange="transform, clip-path",d.style.pointerEvents="none",d.style.maxWidth="none",d.style.maxHeight="none",a.resetCloneRadius&&(d.style.borderRadius="0"),Bn(d,a.styleFor(0,1)),s.appendChild(d);const h=p.style.opacity,f=u.style.opacity;p.style.opacity="0",u.style.opacity="0",r(()=>{p.style.opacity=h,u.style.opacity=f,d.parentElement&&d.parentElement.removeChild(d)}),l.push(new m.WebAnimation({element:d,integrator:w.from(i),style:a.styleFor}))}return l}}function Gn(e){return[new Zn,vn[e.type]()]}const jn=e=>{const t=Gn(e),n=Ln[e.variant](),i=Yn;return{prepare:s=>{var l;const o=Promise.all([s.from,s.to]).then(([c,a])=>({pairs:zn(c,a)})),r={from:s.from,to:s.to,resolved:o};for(const c of t)(l=c.prepare)==null||l.call(c,r);return o.then(c=>({resolved:c}))},animation:({from:s,to:o,context:r,resolved:l})=>{if(l.pairs.length===0)return new m.MultiAnimation([],{mode:"parallel"});const c=[],a=f=>{c.push(f)},p={from:s,to:o,resolved:l,physics:n,positionedParent:r.positionedParent,maxDistance:i,onComplete:a},u=[];for(const f of t)f.contribute&&u.push(...f.contribute(p));if(u.length===0)return new m.MultiAnimation([],{mode:"parallel"});const d=new m.MultiAnimation(u,{mode:"parallel"}),h=d.onComplete;return d.onComplete=()=>{h==null||h();for(const f of c)try{f()}catch(y){console.error("[hero] cleanup error",y)}},d}}};function qn(e={}){const t=e.type??"static",n=e.variant??"default";return jn({type:t,variant:n})}const Kn={spring:{stiffness:50,damping:30}},Jn={spring:{stiffness:80,damping:25}},Qn=(e={})=>{const t=e.physics??Kn,n=e.initialRotation??45,i=e.initialScale??.01,s=e.rotationTriggerPoint??.8;return{prepare:({from:o,to:r,context:l})=>(o.then(c=>{c.style.opacity="1"}),r.then(c=>{const a=T(l,"to"),p=Math.min(a.width,a.height)*.4;c.style.setProperty("--max-border-radius",`${p}px`),c.style.setProperty("--border-radius-scale","1"),c.style.willChange="transform",c.style.backfaceVisibility="hidden";const u=a.left+a.width/2,d=a.top+a.height/2;c.style.transformOrigin=`${u}px ${d}px`,c.style.position="fixed",c.style.top=`${a.top}px`,c.style.left=`${a.left}px`,c.style.width=`${a.width}px`,c.style.height=`${a.height}px`,c.style.zIndex="1000",c.style.overflow="hidden",c.style.transform=`rotate(${n}deg) scale(${i}) translateZ(0)`,c.style.borderRadius="calc(var(--max-border-radius) * var(--border-radius-scale))",c.style.opacity="1"}),{}),animation:({from:o,to:r})=>{const l=new m.WebAnimation({element:o,integrator:w.from(Jn),style:(a,p)=>({opacity:p}),onComplete:()=>{o.style.opacity=""}}),c=new m.WebAnimation({element:r,integrator:w.from(t),style:a=>{let p;if(a<=.05)p=i;else if(a<=s){const f=(a-.05)/(s-.05),y=Math.pow(f,9);p=i+(.8-i)*y}else{const f=(a-s)/(1-s);p=.8+.2*(1-Math.pow(1-f,3))}const u=.7;let d;if(a<=u)d=n;else{const f=(a-u)/(1-u),y=1-Math.pow(1-f,2);d=n*(1-y)}let h;if(a<=u)h=1;else{const f=(a-u)/(1-u);h=1-Math.pow(f,.5)}return{transform:`rotate(${d.toFixed(2)}deg) scale(${p.toFixed(4)}) translateZ(0)`,"--border-radius-scale":h.toFixed(4)}},onComplete:()=>{r.style.willChange="",r.style.backfaceVisibility="",r.style.removeProperty("--max-border-radius"),r.style.removeProperty("--border-radius-scale"),r.style.transform="",r.style.transformOrigin="",r.style.position="",r.style.zIndex="",r.style.top="",r.style.left="",r.style.width="",r.style.height="",r.style.overflow="",r.style.borderRadius=""}});return new m.MultiAnimation([l,c],{mode:"parallel"})}}};function ti(e={}){return Qn()}const ei={spring:{stiffness:100,damping:30}},ni=(e={})=>{const t=e.physics??ei;return{prepare:({from:n,to:i})=>(n.then(s=>{s.style.transformOrigin="center center",s.style.willChange="transform, opacity"}),i.then(s=>{s.style.opacity="0",s.style.transform="rotate(-180deg)",s.style.transformOrigin="center center",s.style.willChange="transform, opacity"}),{}),animation:({from:n,to:i})=>{const s=new m.WebAnimation({element:n,integrator:w.from(t),style:r=>({transform:`rotate(${r*180}deg)`,opacity:r<.5?1:0}),onComplete:()=>{n.style.willChange="auto",n.style.transform="",n.style.transformOrigin="",n.style.opacity=""}}),o=new m.WebAnimation({element:i,integrator:w.from(t),style:(r,l)=>({transform:`rotate(${-l*180}deg)`,opacity:r>.5?1:0}),onComplete:()=>{i.style.willChange="auto",i.style.transform="",i.style.transformOrigin="",i.style.opacity=""}});return new m.MultiAnimation([s,o],{mode:"parallel"})}}};function ii(e={}){return ni()}const si={spring:{stiffness:20,damping:8,doubleSpring:1,restDelta:.001,restSpeed:.001}},oi=(e={})=>{const t=e.physics??si,n=e.directional??!0;return{prepare:({from:i,to:s,context:o})=>{const r=!n||o.direction==="forward",l=r?I:R,c=r?R:I;return i.then(a=>{a.style.zIndex=l,a.style.willChange="transform",a.style.backfaceVisibility="hidden",a.style.contain="layout paint",a.style.pointerEvents="none"}),s.then(a=>{a.style.willChange="transform",a.style.backfaceVisibility="hidden",a.style.contain="layout paint",a.style.position="relative",a.style.zIndex=c}),{}},animation:({from:i,to:s,context:o})=>{const r=!n||o.direction==="forward",l=r?R:I,c=i.offsetHeight,a=s.offsetHeight,p=window.innerHeight,u=Math.max(Math.min(c,a),p),d=new m.WebAnimation({element:i,integrator:w.from(t),style:f=>({transform:`translate3d(0, ${r?-u*f:u*f}px, 0)`}),onComplete:()=>{i.style.willChange="auto",i.style.backfaceVisibility="",i.style.contain="",i.style.transform="",i.style.pointerEvents="",i.style.zIndex=""}}),h=new m.WebAnimation({element:s,integrator:w.from(t),style:(f,y)=>({transform:`translate3d(0, ${r?y*u:y*-u}px, 0)`}),onComplete:()=>{s.style.willChange="auto",s.style.backfaceVisibility="",s.style.contain="",s.style.transform="",s.style.position==="relative"&&(s.style.position=""),s.style.zIndex===l&&(s.style.zIndex="")}});for(const f of[d,h]){const y=f.onComplete;f.onComplete=()=>{y==null||y(),f.releaseFill()}}return new m.MultiAnimation([d,h],{mode:"parallel"})}}};function ri(e={}){const{type:t="directional"}=e;return oi({directional:t==="directional"})}const ai={spring:{stiffness:200,damping:24}},li={inertia:{acceleration:25,resistance:1.2}},Q=.2;function ci(){return{enterPhysics:ai,exitPhysics:li,background:{willChange:"transform, opacity",enterStyle:(e,t)=>({transform:`scale(${1-Q*e})`,opacity:t}),exitStyle:e=>({transform:`scale(${1-Q+Q*e})`,opacity:e})}}}const pi={spring:{stiffness:200,damping:24}},ui={inertia:{acceleration:25,resistance:1.2}},tt=.08,di=16,et=.6,fi=e=>`blur(${Math.max(0,e).toFixed(2)}px)`;function hi(){return{enterPhysics:pi,exitPhysics:ui,background:{willChange:"transform, opacity",enterStyle:e=>({transform:`scale(${1-tt*e})`,opacity:1-(1-et)*e}),exitStyle:e=>({transform:`scale(${1-tt+tt*e})`,opacity:et+(1-et)*e})},overlay:{willChange:"backdrop-filter",initialStyle:{position:"absolute",left:"0",width:"100%",pointerEvents:"none",backdropFilter:"blur(0px)",WebkitBackdropFilter:"blur(0px)"},style:(e,t)=>{const n=e==="enter"?t:1-t,i=fi(di*n);return{backdropFilter:i,WebkitBackdropFilter:i}}}}}const yi={spring:{stiffness:230,damping:25}},mi={spring:{stiffness:230,damping:25}};function gi(){return{enterPhysics:yi,exitPhysics:mi,background:{willChange:"",enterStyle:()=>({}),exitStyle:()=>({})}}}const bi={static:gi(),"background-scale":ci(),blur:hi()},wi="static",Si="transform",xi=(e={})=>{const t=bi[e.type??wi],n=t.background,i=t.overlay,s=n.willChange!=="";return{prepare:({from:o,to:r,context:l,createElement:c})=>{const a=l.direction==="forward"?"enter":"exit",p=a==="enter"?r:o,u=a==="enter"?o:r;p.then(h=>{h.style.willChange=Si,h.style.backfaceVisibility="hidden",h.style.contain="layout paint",h.style.zIndex=R,a==="enter"?h.style.position="relative":h.style.pointerEvents="none"}),u.then(h=>{s&&(h.style.willChange=n.willChange,h.style.backfaceVisibility="hidden",h.style.contain="layout paint"),h.style.zIndex=I,a==="enter"?h.style.pointerEvents="none":h.style.position="relative"});let d;return i&&(d=c("sheet-overlay"),Object.assign(d.style,i.initialStyle),d.style.willChange=i.willChange,l.positionedParent.appendChild(d)),{overlay:d}},animation:({from:o,to:r,context:l,overlay:c})=>{const a=l.direction==="forward"?"enter":"exit",p=a==="enter"?t.enterPhysics:t.exitPhysics,u=a==="enter"?r:o,d=a==="enter"?o:r,h=T(l,a==="enter"?"to":"from"),f=()=>{o.style.pointerEvents="",o.style.zIndex=""},y=()=>{const x=a==="enter"?R:I;r.style.position==="relative"&&(r.style.position=""),r.style.zIndex===x&&(r.style.zIndex="")},g=x=>{const C=x.onComplete;x.onComplete=()=>{C==null||C(),x.releaseFill()}};u.style.clipPath=`inset(${h.top}px 0 calc(100% - ${h.top+h.height}px) 0)`;const S=a==="enter"?(x,C)=>({transform:`translate3d(0, ${C*h.height}px, 0)`}):x=>({transform:`translate3d(0, ${x*h.height}px, 0)`}),b=new m.WebAnimation({element:u,integrator:w.from(p),style:S,onComplete:()=>{u.style.willChange="auto",u.style.backfaceVisibility="",u.style.contain="",u.style.clipPath="",u.style.transform="",f(),y()}});g(b);const $=[b];if(s){const x=d.scrollHeight;x>0&&(d.style.height=`${x}px`);const C=T(l,a==="enter"?"from":"to"),_=C.left+C.width/2,P=C.top+C.height/2;d.style.clipPath=`inset(${C.top}px 0 calc(100% - ${C.top+C.height}px) 0)`,d.style.transformOrigin=`${_}px ${P}px`;const A=a==="enter"?(M,H)=>n.enterStyle(M,H):M=>n.exitStyle(M),k=new m.WebAnimation({element:d,integrator:w.from(p),style:A,onComplete:()=>{d.style.willChange="auto",d.style.backfaceVisibility="",d.style.contain="",d.style.clipPath="",d.style.transformOrigin="",d.style.transform="",d.style.opacity="",d.style.height=""}});g(k),$.push(k)}if(c&&i){c.style.zIndex=kt;const x=Lt(l,"to");c.style.top=`${x.top}px`,c.style.height=`${x.height}px`,$.push(new m.WebAnimation({element:c,integrator:w.from(p),style:C=>i.style(a,C)}))}return new m.MultiAnimation($,{mode:"parallel"})}}};function Ci(e){return e==="scale"||e==="background-scale"?"background-scale":e==="blur"?"blur":"static"}function $i(e={}){const t=e.type,n=Ci(t);return xi({type:n})}const Ei={spring:{stiffness:170,damping:22,doubleSpring:.8}},Ai=(e={})=>{const t=e.physics??Ei;return{prepare:({from:n,to:i,context:s})=>{const o=s.direction==="forward";return n.then(r=>{r.style.willChange="transform",r.style.backfaceVisibility="hidden",r.style.contain="layout paint",r.style.pointerEvents="none"}),i.then(r=>{const l=o?100:-100;r.style.transform=`translate3d(${l}%, 0, 0)`,r.style.willChange="transform",r.style.backfaceVisibility="hidden",r.style.contain="layout paint"}),{}},animation:({from:n,to:i,context:s})=>{const o=s.direction==="forward",r=new m.WebAnimation({element:n,integrator:w.from(t),style:c=>({transform:`translate3d(${o?-100*c:100*c}%, 0, 0)`}),onComplete:()=>{n.style.willChange="auto",n.style.backfaceVisibility="",n.style.contain="",n.style.transform="",n.style.pointerEvents=""}}),l=new m.WebAnimation({element:i,integrator:w.from(t),style:(c,a)=>({transform:`translate3d(${o?a*100:a*-100}%, 0, 0)`}),onComplete:()=>{i.style.willChange="auto",i.style.backfaceVisibility="",i.style.contain="",i.style.transform=""}});return new m.MultiAnimation([r,l],{mode:"parallel"})}}};function Pi(e={}){return Ai()}const _i={spring:{stiffness:17,damping:6}},nt=20,z=800,Ii=(e={})=>{const t=e.physics??_i;return{prepare:({from:n,to:i})=>(n.then(s=>{s.style.willChange="transform",s.style.backfaceVisibility="hidden",s.style.contain="layout paint",s.style.pointerEvents="none",s.style.transform=`perspective(${z}px) rotateY(0deg) translate3d(0%, 0, 0)`}),i.then(s=>{s.style.willChange="transform",s.style.backfaceVisibility="hidden",s.style.contain="layout paint",s.style.transform=`perspective(${z}px) rotateY(${nt}deg) translate3d(-100%, 0, 0)`}),{}),animation:({from:n,to:i})=>{const s=new m.WebAnimation({element:n,integrator:w.from(t),style:r=>{const l=-r*nt,c=r*100;return{transform:`perspective(${z}px) rotateY(${l}deg) translate3d(${c}%, 0, 0)`}},onComplete:()=>{n.style.transform="",n.style.willChange="auto",n.style.backfaceVisibility="",n.style.contain="",n.style.pointerEvents=""}}),o=new m.WebAnimation({element:i,integrator:w.from(t),style:(r,l)=>{const c=l*nt,a=-l*100;return{transform:`perspective(${z}px) rotateY(${c}deg) translate3d(${a}%, 0, 0)`}},onComplete:()=>{i.style.transform="",i.style.willChange="auto",i.style.backfaceVisibility="",i.style.contain=""}});return new m.MultiAnimation([s,o],{mode:"sequence"})}}};function Ri(e={}){return Ii()}function Oi(e,t){return t.left>=e.left-.01&&t.top>=e.top-.01&&t.left+t.width<=e.left+e.width+.01&&t.top+t.height<=e.top+e.height+.01}function Vt(e){const t=()=>({enterContent:e.enterRect,exitContent:e.exitRect,startWindow:e.enterRect,scaleX:e.exitRect.width/e.enterRect.width,scaleY:e.exitRect.height/e.enterRect.height}),{enterMedia:n,exitMedia:i}=e;if(!n||!i||!Wt(n,i))return t();const s=n.content,o=i.content;if(s.width<=0||s.height<=0||o.width<=0||o.height<=0)return t();const r=o.width/s.width,l=o.height/s.height,c=Ut(s,o,i.window,r,l);return Oi(n.window,c)?{enterContent:s,exitContent:o,startWindow:c,scaleX:r,scaleY:l}:t()}function Xt(e,t){return{top:e.top/t.height*100,right:(t.width-(e.left+e.width))/t.width*100,bottom:(t.height-(e.top+e.height))/t.height*100,left:e.left/t.width*100}}function Bt(e,t,n){return{x:e/Math.max(Math.abs(t),1e-6),y:e/Math.max(Math.abs(n),1e-6)}}function vi(e){const{pageRect:t,scrollOffset:n,enterRadius:i,exitRadius:s}=e,o=Vt(e),{enterContent:r,exitContent:l,startWindow:c,scaleX:a,scaleY:p}=o,u=l.left-r.left+(l.width-r.width)/2-n.x,d=l.top-r.top+(l.height-r.height)/2-n.y,h=Xt(c,t);return{transformOrigin:`${O(r)}px ${v(r)}px`,animate:f=>{const y=1-f,g=1+(a-1)*y,S=1+(p-1)*y,b=Math.max(0,s*y+i*(1-y)),$=Bt(b,g,S);return{clipPath:`inset(${h.top*y}% ${h.right*y}% ${h.bottom*y}% ${h.left*y}% round ${$.x}px / ${$.y}px)`,transform:`translate(${u*y}px, ${d*y}px) scale(${g}, ${S})`}}}}function Ti(e){const{pageRect:t,scrollOffset:n,enterRadius:i,exitRadius:s}=e,o=Vt(e),{enterContent:r,exitContent:l,startWindow:c,scaleX:a,scaleY:p}=o,u=l.left-r.left+(l.width-r.width)/2+n.x,d=l.top-r.top+(l.height-r.height)/2+n.y,h=Xt(c,t);return{transformOrigin:`${O(r)}px ${v(r)}px`,animate:f=>{const y=1-f,g=1+(a-1)*y,S=1+(p-1)*y,b=Math.max(0,i*(1-y)+s*y),$=Bt(b,g,S);return{clipPath:`inset(${h.top*y}% ${h.right*y}% ${h.bottom*y}% ${h.left*y}% round ${$.x}px / ${$.y}px)`,transform:`translate(${u*y-n.x}px, ${d*y}px) scale(${g}, ${S})`}}}}const Di={spring:{stiffness:380,damping:30,doubleSpring:{stiffness:260,damping:30}}},Zt=.12,Fi=18;function Mi(){return{transformOrigin:"50% 50%",animate:e=>{const t=1-e;return{transform:`scale(${1-Zt*t})`}}}}function Li(){return{transformOrigin:"50% 50%",animate:e=>{const t=1-e;return{transform:`scale(${1-Zt*t})`}}}}const it={willChange:"backdrop-filter",initialStyle:{position:"absolute",left:"0",width:"100%",pointerEvents:"none",backdropFilter:"blur(0px)",WebkitBackdropFilter:"blur(0px)"},style:(e,t)=>{const n=e==="enter"?t:1-t,i=`blur(${Fi*n}px)`;return{backdropFilter:i,WebkitBackdropFilter:i}}};class Yi{constructor(){E(this,"physics",Di)}contribute(t){const{from:n,to:i,resolved:s,physics:o}=t,r=s.mode==="enter",l=r?n:i,c=r?Mi():Li();return c&&(l.style.transformOrigin=c.transformOrigin),[new m.WebAnimation({element:l,integrator:w.from(o),style:r?(a,p)=>c.animate(p):a=>c.animate(a)})]}}class ki{prepare(t){const n=t.createElement("zoom-overlay");return Object.assign(n.style,it.initialStyle),n.style.willChange=it.willChange,t.context.positionedParent.appendChild(n),{overlay:n}}contribute(t){const n=t.extras.overlay;if(!n)return[];n.style.zIndex=kt;const i=Lt(t.context,"to");return n.style.top=`${i.top}px`,n.style.height=`${i.height}px`,[new m.WebAnimation({element:n,integrator:w.from(t.physics),style:s=>it.style(t.resolved.mode,s)})]}}const Hi={spring:{stiffness:430,damping:33,doubleSpring:1}};function Ni({enterRect:e,exitRect:t,scrollOffset:n}){const i=e.left-t.left+(e.width-t.width)/2+n.x,s=e.top-t.top+(e.height-t.height)/2+n.y,o=e.width/t.width,r=e.height/t.height,l=Math.max(o,r);return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:c=>{const a=1-c;return{transform:`translate(${i*a-n.x}px, ${s*a}px) scale(${1+(l-1)*a})`}}}}function Wi({enterRect:e,exitRect:t,scrollOffset:n}){const i=e.left-t.left+(e.width-t.width)/2-n.x,s=e.top-t.top+(e.height-t.height)/2-n.y,o=e.width/t.width,r=e.height/t.height,l=Math.max(o,r);return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:c=>{const a=1-c;return{transform:`translate(${i*a}px, ${s*a}px) scale(${1+(l-1)*a})`}}}}class zi{constructor(){E(this,"physics",Hi)}contribute(t){const{from:n,to:i,resolved:s,input:o,physics:r}=t,l=s.mode==="enter",c=l?n:i,a=l?Ni(o):Wi(o);return a&&(c.style.transformOrigin=a.transformOrigin),[new m.WebAnimation({element:c,integrator:w.from(r),style:l?(p,u)=>a.animate(u):p=>a.animate(p)})]}}const Ui={spring:{stiffness:530,damping:34,doubleSpring:1}};class Vi{constructor(){E(this,"physics",Ui)}contribute(t){return[]}}const Xi={expand:()=>new zi,static:()=>new Vi,blur:()=>new Yi};function Bi(e){return Xi[e]()}const at="data-zoom-enter-key",Tt="data-zoom-exit-key",Dt="data-zoom-radius";function Zi(e,t){return Math.abs(e.left-t.left)<.01&&Math.abs(e.top-t.top)<.01&&Math.abs(e.width-t.width)<.01&&Math.abs(e.height-t.height)<.01}function Gi(e,t){const n=[];let i=t;for(;i&&i!==e;){const s=i.parentElement;if(!s)break;for(const o of Array.from(s.children))o!==i&&o instanceof HTMLElement&&n.push(o);i=s}return n}function Ft(e){const t=e.querySelectorAll(`[${at}]`);return t.length!==1?null:t[0]}function Mt(e,t){const n=e.querySelectorAll(`[${Tt}]`);for(const i of n)if(i.getAttribute(Tt)===t)return i;return null}function ji(e,t,n){if(n==="forward"){const r=Ft(t);if(!r)return null;const l=r.getAttribute(at);if(!l)return null;const c=Mt(e,l);return c?{mode:"enter",enterEl:r,exitEl:c}:null}const i=Ft(e);if(!i)return null;const s=i.getAttribute(at);if(!s)return null;const o=Mt(t,s);return o?{mode:"exit",enterEl:i,exitEl:o}:null}function qi(e,t,n,i){const s=e.mode==="enter"?n:t,o=e.mode==="enter"?t:n,r=N(s,e.enterEl),l=N(o,e.exitEl),c=rt(e.enterEl,r,g=>N(s,g),{legacyRadiusAttribute:Dt}),a=rt(e.exitEl,l,g=>N(o,g),{legacyRadiusAttribute:Dt}),[p,u]=zt(c,a),d=p.contentAware&&u.contentAware,h=e.mode==="enter"?n.getBoundingClientRect():t.getBoundingClientRect(),f={left:0,top:0,width:h.width,height:h.height},y=p.radiusSource==="legacy"||Zi(p.window,f)?p.radius:0;return{enterRect:r,exitRect:l,...d?{enterMedia:p,exitMedia:u}:{},pageRect:h,scrollOffset:i,enterRadius:y,exitRadius:u.radius}}class Ki{prepare(t){t.from.then(n=>{n.style.willChange="transform, clip-path, opacity",n.style.backfaceVisibility="hidden",n.style.contain="layout paint"})}contribute(t){const{from:n,to:i,resolved:s,input:o,physics:r,onComplete:l}=t,c=s.mode==="enter",a=c?vi(o):Ti(o),p=c?i:n,u=c?"t":"u";a&&(p.style.transformOrigin=a.transformOrigin);const d=c?I:R,h=c?R:I,f=n.style.zIndex;n.style.zIndex=d;const y=i.style.zIndex,g=i.style.position;return i.style.zIndex=h,i.style.position="relative",l(()=>{p.style.willChange="auto",p.style.backfaceVisibility="",p.style.transformOrigin="",p.style.contain="",n.style.zIndex=f,i.style.zIndex===h&&(i.style.zIndex=y),i.style.position==="relative"&&(i.style.position=g),i.style.transformOrigin="",n.style.willChange="auto",n.style.backfaceVisibility="",n.style.transformOrigin="",n.style.contain="",n.style.transform="",n.style.clipPath=""}),[new m.WebAnimation({element:p,integrator:w.from(r),style:u==="t"?S=>a.animate(S):(S,b)=>a.animate(b)})]}}class Ji{contribute(t){const{resolved:n,physics:i,from:s,to:o,onComplete:r}=t,l=n.mode==="enter"?o:s,c=Gi(l,n.enterEl);if(c.length===0)return[];const a=c.map(p=>p.style.opacity);if(n.mode==="enter")for(const p of c)p.style.opacity="0";return r(()=>{for(let p=0;p<c.length;p++){const u=c[p];u&&(u.style.opacity=a[p]??"")}}),c.map(p=>new m.WebAnimation({element:p,integrator:w.from(i),style:(u,d)=>({opacity:n.mode==="enter"?u:d})}))}}class Gt{contribute(){return[]}}const Qi={default:()=>new Gt,fade:()=>new Ji};function ts(e){return Qi[e]()}class es extends Gt{}function ns(e){const t=Bi(e.type);return{strategies:[new Ki,t,ts(e.variant),new es,...e.type==="blur"?[new ki]:[]],physics:t.physics}}const is=e=>{const{strategies:t,physics:n}=ns(e);return{prepare:i=>{const s={from:i.from,to:i.to,context:{positionedParent:i.context.positionedParent},createElement:i.createElement},o={};for(const r of t){if(!r.prepare)continue;const l=r.prepare(s);l&&Object.assign(o,l)}return o},animation:({from:i,to:s,context:o,...r})=>{const l=ji(i,s,o.direction);if(!l)return new m.MultiAnimation([],{mode:"parallel"});const c=qi(l,i,s,o.scrollOffset),a=[],u={from:i,to:s,resolved:l,input:c,physics:n,context:o,extras:r,onComplete:f=>{a.push(f)}},d=[];for(const f of t)f.contribute&&d.push(...f.contribute(u));const h=d[0];if(h){const f=h.onComplete;h.onComplete=()=>{f==null||f();for(const y of a)try{y()}catch(g){console.error("[zoom] cleanup error",g)}}}for(const f of d){if(!(f instanceof m.WebAnimation))continue;const y=f.onComplete;f.onComplete=()=>{y==null||y(),f.releaseFill()}}return new m.MultiAnimation(d,{mode:"parallel"})}}};function ss(e){const t=e.type??"static",n=e.variant??(e.fade?"fade":"default");return{type:t,variant:n}}function os(e={}){const t=ss(e);return is(t)}exports.Animation=m.Animation;exports.MultiAnimation=m.MultiAnimation;exports.WebAnimation=m.WebAnimation;exports.axis=Ye;exports.blind=Ue;exports.drill=tn;exports.fade=on;exports.film=hn;exports.hero=qn;exports.jaemin=ti;exports.rotate=ii;exports.scroll=ri;exports.sheet=$i;exports.slide=Pi;exports.strip=Ri;exports.zoom=os;
35
+ )`}function K(e,t,n,i,s){const o=n/1e3;return new m.WebAnimation({element:e,integrator:new ae({durationSec:o}),lowerBound:0,upperBound:1,style:r=>i(pn(t,r)),onComplete:s})}const fn=(e={})=>{var s;const t=((s=e.border)==null?void 0:s.color)??an,n=rn,i=e.physics;return{prepare:({from:o,to:r,context:l})=>{const c=T(l,"from"),a=T(l,"to"),p=Y(document.body,l.positionedParent),u=dn(t,{...c,top:p.top});for(const d of["topLeft","topRight","bottomLeft","bottomRight"])l.positionedParent.appendChild(u[d]);return o.then(d=>{Et(d,c),At(d,c),d.style.transform=`translateY(${-c.top}px)`}),r.then(d=>{Et(d,a),At(d,a),d.style.transform=`translateY(${-a.top+a.height}px) scale(${n})`}),{borders:u,fromRect:c,toRect:a}},animation:({from:o,to:r,context:l,borders:c,fromRect:a,toRect:p})=>{const u=$t({rect:a,scale:n,direction:"out",override:i}),d=$t({rect:p,scale:n,direction:"in",override:i}),h=K(o,u.snapshots,u.totalDuration,b=>({transform:`translateY(${b.translateY}px) scale(${b.scale})`}),()=>{o.style.clipPath="",o.style.transformOrigin="",o.style.transform=""}),f=K(r,d.snapshots,d.totalDuration,b=>({transform:`translateY(${b.translateY}px) scale(${b.scale})`}),()=>{r.style.clipPath="",r.style.transformOrigin="",r.style.transform=""}),y=un.map(([b,$],x)=>{const C=["topLeft","topRight","bottomLeft","bottomRight"][x];return K(c[C],u.snapshots,u.totalDuration,_=>{const P=(a.width-a.width*_.scale)/2*.7*b,A=(a.height-a.height*_.scale)/2*.7*$;return{transform:`translate(${P}px, ${A}px)`}})}),g=new m.MultiAnimation([h,f,...y],{mode:"parallel"}),S=g.onComplete;return g.onComplete=()=>{S==null||S();const b=l.positionedParent;for(const $ of["topLeft","topRight","bottomLeft","bottomRight"]){const x=c[$];x.parentElement===b&&b.removeChild(x)}},g}}};function hn(e={}){const{options:t}=e,n=(t==null?void 0:t.borderColor)!==void 0?{border:{color:t.borderColor}}:void 0;return fn(n)}function yn(e){if(!e)return null;if(e.includes("/")){const n=e.split("/");if(n.length!==2)return null;const i=Number.parseFloat(n[0]??""),s=Number.parseFloat(n[1]??"");return Number.isFinite(i)&&Number.isFinite(s)&&i>0&&s>0?i/s:null}const t=Number.parseFloat(e);return Number.isFinite(t)&&t>0?t:null}function mn(e){return e==="contain"||e==="cover"?e:null}function st(e){return e.tagName==="IMG"}function gn(e){if(st(e))return e;if(e.tagName==="PICTURE"||e.tagName==="VIDEO")return null;const t=[];for(const n of Array.from(e.children)){const i=n;st(i)&&t.push(i)}return t.length===1?t[0]??null:null}function bn(e){var c,a;if(!st(e))return null;const t=e,n=t.naturalWidth,i=t.naturalHeight;if(typeof n=="number"&&typeof i=="number"&&Number.isFinite(n)&&Number.isFinite(i)&&n>0&&i>0)return n/i;const s=((c=e.getAttribute("width"))==null?void 0:c.trim())??"",o=((a=e.getAttribute("height"))==null?void 0:a.trim())??"",r=s===""?Number.NaN:Number(s),l=o===""?Number.NaN:Number(o);return Number.isFinite(r)&&Number.isFinite(l)&&r>0&&l>0?r/l:null}function wn(e){const t=e.trim().toLowerCase().replace(/\s+/g," ");return t===""||t==="center"||t==="center center"||t==="50% 50%"}function V(e){if(typeof getComputedStyle=="function")try{return getComputedStyle(e)}catch{}return e.style}function Sn(e){const t=V(e),n=wn(t.objectPosition??"");return{fit:n?mn(t.objectFit??null):null,centered:n}}function Ht(e){if(!e)return 0;const t=/^(-?(?:\d+\.?\d*|\.\d+))px$/.exec(e.trim());if(!t)return null;const n=Number.parseFloat(t[1]??"");return Number.isFinite(n)&&n>=0?n:null}function Pt(e){const t=V(e),n=[t.borderTopLeftRadius,t.borderTopRightRadius,t.borderBottomRightRadius,t.borderBottomLeftRadius].map(Ht),i=n[0];if(i==null)return{radius:0,supported:!1};const s=n.every(o=>o!==null&&Math.abs(o-i)<.001);return{radius:s?i:0,supported:s}}function xn(e,t){var s;if(!t)return null;const n=(s=e.getAttribute(t))==null?void 0:s.trim();if(n==null||n==="")return null;const i=Number.parseFloat(n);return Number.isFinite(i)&&i>=0?i:null}function Cn(e){const t=V(e);return[t.paddingTop,t.paddingRight,t.paddingBottom,t.paddingLeft,t.borderTopWidth,t.borderRightWidth,t.borderBottomWidth,t.borderLeftWidth].every(i=>i?Ht(i)===0:!0)}function $n(e){const t=V(e),n=i=>i==="hidden"||i==="clip";return n(t.overflowX)&&n(t.overflowY)}function O(e){return e.left+e.width/2}function v(e){return e.top+e.height/2}function lt(e,t){return{top:Math.max(0,t.top-e.top),right:Math.max(0,e.left+e.width-(t.left+t.width)),bottom:Math.max(0,e.top+e.height-(t.top+t.height)),left:Math.max(0,t.left-e.left)}}function En(e,t){const n=Math.max(e.left,t.left),i=Math.max(e.top,t.top),s=Math.min(e.left+e.width,t.left+t.width),o=Math.min(e.top+e.height,t.top+t.height);return s>n&&o>i?{left:n,top:i,width:s-n,height:o-i}:null}function _t(e,t){return Math.abs(e.left-t.left)<.01&&Math.abs(e.top-t.top)<.01&&Math.abs(e.width-t.width)<.01&&Math.abs(e.height-t.height)<.01}function An(e,t,n){const i=e.width/e.height;let s,o;return n==="contain"?i>t?(o=e.height,s=o*t):(s=e.width,o=s/t):i>t?(s=e.width,o=s/t):(o=e.height,s=o*t),{left:e.left+(e.width-s)/2,top:e.top+(e.height-o)/2,width:s,height:o}}function Nt(e,t,n){const i=t!==null&&n!==null&&e.width>0&&e.height>0?An(e,t,n):e,s=n==="contain"?i:e;return{bbox:e,content:i,window:s,clipInset:lt(i,s),aspectRatio:t,fit:n,radius:0,radiusSource:"none",bboxRadius:0,bboxRadiusSource:"none",contentAware:t!==null&&n!==null,mediaElement:null}}function ot(e,t,n){return{...Nt(e,null,null),radius:t,radiusSource:n,bboxRadius:t,bboxRadiusSource:n}}function Wt(e,t){const n=e.aspectRatio,i=t.aspectRatio;return e.contentAware&&t.contentAware&&n!==null&&i!==null&&Math.abs(n-i)/Math.max(n,i)<.01}function It(e){return ot(e.bbox,e.bboxRadius,e.bboxRadiusSource)}function zt(e,t){return Wt(e,t)?[e,t]:[It(e),It(t)]}function rt(e,t,n,i){const s=gn(e),o=s?n(s):t,r=i.legacyAspectRatioAttribute?yn(e.getAttribute(i.legacyAspectRatioAttribute)??(s==null?void 0:s.getAttribute(i.legacyAspectRatioAttribute))??null):null,l=r??(s?bn(s):null),c=s?Sn(s):{fit:null,centered:!0},a=c.centered&&(s===null||Cn(s))?c.fit??(r!==null?i.fallbackFit??null:null):null,p=Nt(o,l,a),u=$n(e),h=s!==null&&s!==e&&u?En(p.window,t):p.window,f=xn(e,i.legacyRadiusAttribute),y=s===e||u,g=y?Pt(e):{radius:0,supported:!0},S=f??g.radius,b=f!==null?"legacy":g.supported?g.radius>0?"computed":"none":"unsupported",$=[];h&&y&&_t(h,t)&&$.push(g),h&&s&&_t(h,o)&&$.push(Pt(s));const x=$.every(A=>A.supported),C=Math.max(0,...$.map(A=>A.radius)),_=f??C,P=f!==null?"legacy":x?C>0?"computed":"none":"unsupported";return!h||P==="unsupported"?ot(t,S,b):{...p,bbox:t,window:h,clipInset:lt(p.content,h),radius:_,radiusSource:P,bboxRadius:S,bboxRadiusSource:b,mediaElement:p.contentAware?s:null}}function Ut(e,t,n,i,s){const o=n.width/i,r=n.height/s;return{left:O(e)+(O(n)-O(t))/i-o/2,top:v(e)+(v(n)-v(t))/s-r/2,width:o,height:r}}const Pn={enter:"contain",exit:"cover",legacy:"contain"};function F(e){return Pn[e]}const Rt="data-hero-enter-key",Ot="data-hero-exit-key",J="data-hero-key";class _n{constructor(){E(this,"previousFromOpacity","")}prepare(t){t.from.then(n=>{this.previousFromOpacity=n.style.opacity,n.style.opacity="0"})}contribute(t){return t.onComplete(()=>{t.from.style.opacity=this.previousFromOpacity}),[]}}const In=()=>new _n;class Rn{contribute(t){const{from:n,to:i,physics:s,onComplete:o}=t,r=n.style.opacity,l=i.style.opacity,c=n.style.willChange,a=i.style.willChange;return i.style.opacity="0",n.style.willChange="opacity",i.style.willChange="opacity",o(()=>{n.style.opacity=r,i.style.opacity=l,n.style.willChange=c,i.style.willChange=a}),[new m.WebAnimation({element:n,integrator:w.from(s),style:(p,u)=>({opacity:u})}),new m.WebAnimation({element:i,integrator:w.from(s),style:p=>({opacity:p})})]}}const On=()=>new Rn,vn={static:In,fade:On},Tn={spring:{stiffness:320,damping:30}},Dn=()=>Tn,Fn={spring:{stiffness:300,damping:30,doubleSpring:1}},Mn=()=>Fn,Ln={default:Dn,smooth:Mn},Yn=700,kn="data-hero-aspect-ratio",Hn="data-hero-radius";function vt(e,t,n){const i=Y(e,t);return rt(t,i,s=>Y(e,s),{fallbackFit:n,legacyAspectRatioAttribute:kn,legacyRadiusAttribute:Hn})}function W(e,t){const n=new Map,i=e.querySelectorAll(`[${t}]`);for(const s of Array.from(i)){const o=s.getAttribute(t);o&&(n.has(o)||n.set(o,s))}return n}function Nn(e,t){const n=[],i=W(t,Rt),s=W(e,Ot);for(const[l,c]of i){const a=s.get(l);a&&n.push({key:l,fromEl:a,toEl:c,fromFit:F("exit"),toFit:F("enter")})}const o=W(e,Rt),r=W(t,Ot);for(const[l,c]of o){const a=r.get(l);a&&n.push({key:l,fromEl:c,toEl:a,fromFit:F("enter"),toFit:F("exit")})}return n}function Wn(e,t){const n=[],i=Array.from(t.querySelectorAll(`[${J}]`));for(const s of i){const o=s.getAttribute(J);if(!o)continue;const r=e.querySelector(`[${J}="${o}"]`);r&&n.push({key:o,fromEl:r,toEl:s,fromFit:F("legacy"),toFit:F("legacy")})}return n}function zn(e,t){const n=Nn(e,t);return n.length>0?n:Wn(e,t)}function Un(e,t){return zt(e,t)}function Vn(e,t){return e.radiusSource==="unsupported"||t.radiusSource==="unsupported"?!1:e.mediaElement!==null||t.mediaElement!==null||e.radiusSource==="computed"||e.radiusSource==="legacy"||t.radiusSource==="computed"||t.radiusSource==="legacy"}function Xn(e,t,n){const{fromEl:i,toEl:s}=t,[o,r]=Un(vt(e,i,t.fromFit),vt(e,s,t.toFit)),l=o.content,c=o.window,a=r.content,p=r.window,u=r.clipInset,d=o.radiusSource==="unsupported"||r.radiusSource==="unsupported",h=d?0:o.radius,f=d?0:r.radius;if(l.width===0||l.height===0||c.width===0||c.height===0||a.width===0||a.height===0||p.width===0||p.height===0)return null;const y=Math.max(l.width/a.width,l.height/a.height),g=O(l),S=v(l),b=O(a),$=v(a),x=g-b,C=S-$;if(Math.abs(C)>n)return null;const _=lt(a,Ut(a,l,c,y,y));return{toContent:a,fromVisualEl:o.mediaElement??i,toVisualEl:r.mediaElement??s,resetCloneRadius:Vn(o,r),styleFor:(P,A)=>{const k=A*x,M=A*C,H=P+A*y,jt=Math.max(0,h*A+f*P)/Math.max(Math.abs(H),1e-6),qt=_.top*A+u.top*P,Kt=_.right*A+u.right*P,Jt=_.bottom*A+u.bottom*P,Qt=_.left*A+u.left*P;return{transform:`translate(${k}px, ${M}px) scale(${H})`,clipPath:`inset(${qt}px ${Kt}px ${Jt}px ${Qt}px round ${jt}px)`}}}}function Bn(e,t){e.style.transform=t.transform,e.style.clipPath=t.clipPath}class Zn{contribute(t){const{resolved:n,physics:i,positionedParent:s,maxDistance:o,onComplete:r}=t,l=[];for(const c of n.pairs){const a=Xn(s,c,o);if(!a)continue;const{fromVisualEl:p,toVisualEl:u}=a,d=u.cloneNode(!0);d.style.position="absolute",d.style.left=`${a.toContent.left}px`,d.style.top=`${a.toContent.top}px`,d.style.width=`${a.toContent.width}px`,d.style.height=`${a.toContent.height}px`,d.style.margin="0",d.style.transformOrigin="center center",d.style.zIndex="1000",d.style.willChange="transform, clip-path",d.style.pointerEvents="none",d.style.maxWidth="none",d.style.maxHeight="none",a.resetCloneRadius&&(d.style.borderRadius="0"),Bn(d,a.styleFor(0,1)),s.appendChild(d);const h=p.style.opacity,f=u.style.opacity;p.style.opacity="0",u.style.opacity="0",r(()=>{p.style.opacity=h,u.style.opacity=f,d.parentElement&&d.parentElement.removeChild(d)}),l.push(new m.WebAnimation({element:d,integrator:w.from(i),style:a.styleFor}))}return l}}function Gn(e){return[new Zn,vn[e.type]()]}const jn=e=>{const t=Gn(e),n=Ln[e.variant](),i=Yn;return{prepare:s=>{var l;const o=Promise.all([s.from,s.to]).then(([c,a])=>({pairs:zn(c,a)})),r={from:s.from,to:s.to,resolved:o};for(const c of t)(l=c.prepare)==null||l.call(c,r);return o.then(c=>({resolved:c}))},animation:({from:s,to:o,context:r,resolved:l})=>{if(l.pairs.length===0)return new m.MultiAnimation([],{mode:"parallel"});const c=[],a=f=>{c.push(f)},p={from:s,to:o,resolved:l,physics:n,positionedParent:r.positionedParent,maxDistance:i,onComplete:a},u=[];for(const f of t)f.contribute&&u.push(...f.contribute(p));if(u.length===0)return new m.MultiAnimation([],{mode:"parallel"});const d=new m.MultiAnimation(u,{mode:"parallel"}),h=d.onComplete;return d.onComplete=()=>{h==null||h();for(const f of c)try{f()}catch(y){console.error("[hero] cleanup error",y)}},d}}};function qn(e={}){const t=e.type??"static",n=e.variant??"default";return jn({type:t,variant:n})}const Kn={spring:{stiffness:50,damping:30}},Jn={spring:{stiffness:80,damping:25}},Qn=(e={})=>{const t=e.physics??Kn,n=e.initialRotation??45,i=e.initialScale??.01,s=e.rotationTriggerPoint??.8;return{prepare:({from:o,to:r,context:l})=>(o.then(c=>{c.style.opacity="1"}),r.then(c=>{const a=T(l,"to"),p=Math.min(a.width,a.height)*.4;c.style.setProperty("--max-border-radius",`${p}px`),c.style.setProperty("--border-radius-scale","1"),c.style.willChange="transform",c.style.backfaceVisibility="hidden";const u=a.left+a.width/2,d=a.top+a.height/2;c.style.transformOrigin=`${u}px ${d}px`,c.style.position="fixed",c.style.top=`${a.top}px`,c.style.left=`${a.left}px`,c.style.width=`${a.width}px`,c.style.height=`${a.height}px`,c.style.zIndex="1000",c.style.overflow="hidden",c.style.transform=`rotate(${n}deg) scale(${i}) translateZ(0)`,c.style.borderRadius="calc(var(--max-border-radius) * var(--border-radius-scale))",c.style.opacity="1"}),{}),animation:({from:o,to:r})=>{const l=new m.WebAnimation({element:o,integrator:w.from(Jn),style:(a,p)=>({opacity:p}),onComplete:()=>{o.style.opacity=""}}),c=new m.WebAnimation({element:r,integrator:w.from(t),style:a=>{let p;if(a<=.05)p=i;else if(a<=s){const f=(a-.05)/(s-.05),y=Math.pow(f,9);p=i+(.8-i)*y}else{const f=(a-s)/(1-s);p=.8+.2*(1-Math.pow(1-f,3))}const u=.7;let d;if(a<=u)d=n;else{const f=(a-u)/(1-u),y=1-Math.pow(1-f,2);d=n*(1-y)}let h;if(a<=u)h=1;else{const f=(a-u)/(1-u);h=1-Math.pow(f,.5)}return{transform:`rotate(${d.toFixed(2)}deg) scale(${p.toFixed(4)}) translateZ(0)`,"--border-radius-scale":h.toFixed(4)}},onComplete:()=>{r.style.willChange="",r.style.backfaceVisibility="",r.style.removeProperty("--max-border-radius"),r.style.removeProperty("--border-radius-scale"),r.style.transform="",r.style.transformOrigin="",r.style.position="",r.style.zIndex="",r.style.top="",r.style.left="",r.style.width="",r.style.height="",r.style.overflow="",r.style.borderRadius=""}});return new m.MultiAnimation([l,c],{mode:"parallel"})}}};function ti(e={}){return Qn()}const ei={spring:{stiffness:100,damping:30}},ni=(e={})=>{const t=e.physics??ei;return{prepare:({from:n,to:i})=>(n.then(s=>{s.style.transformOrigin="center center",s.style.willChange="transform, opacity"}),i.then(s=>{s.style.opacity="0",s.style.transform="rotate(-180deg)",s.style.transformOrigin="center center",s.style.willChange="transform, opacity"}),{}),animation:({from:n,to:i})=>{const s=new m.WebAnimation({element:n,integrator:w.from(t),style:r=>({transform:`rotate(${r*180}deg)`,opacity:r<.5?1:0}),onComplete:()=>{n.style.willChange="auto",n.style.transform="",n.style.transformOrigin="",n.style.opacity=""}}),o=new m.WebAnimation({element:i,integrator:w.from(t),style:(r,l)=>({transform:`rotate(${-l*180}deg)`,opacity:r>.5?1:0}),onComplete:()=>{i.style.willChange="auto",i.style.transform="",i.style.transformOrigin="",i.style.opacity=""}});return new m.MultiAnimation([s,o],{mode:"parallel"})}}};function ii(e={}){return ni()}const si={spring:{stiffness:20,damping:8,doubleSpring:1,restDelta:.001,restSpeed:.001}},oi=(e={})=>{const t=e.physics??si,n=e.directional??!0;return{prepare:({from:i,to:s,context:o})=>{const r=!n||o.direction==="forward",l=r?I:R,c=r?R:I;return i.then(a=>{a.style.zIndex=l,a.style.willChange="transform",a.style.backfaceVisibility="hidden",a.style.contain="layout paint",a.style.pointerEvents="none"}),s.then(a=>{a.style.willChange="transform",a.style.backfaceVisibility="hidden",a.style.contain="layout paint",a.style.position="relative",a.style.zIndex=c}),{}},animation:({from:i,to:s,context:o})=>{const r=!n||o.direction==="forward",l=r?R:I,c=i.offsetHeight,a=s.offsetHeight,p=window.innerHeight,u=Math.max(Math.min(c,a),p),d=new m.WebAnimation({element:i,integrator:w.from(t),style:f=>({transform:`translate3d(0, ${r?-u*f:u*f}px, 0)`}),onComplete:()=>{i.style.willChange="auto",i.style.backfaceVisibility="",i.style.contain="",i.style.transform="",i.style.pointerEvents="",i.style.zIndex=""}}),h=new m.WebAnimation({element:s,integrator:w.from(t),style:(f,y)=>({transform:`translate3d(0, ${r?y*u:y*-u}px, 0)`}),onComplete:()=>{s.style.willChange="auto",s.style.backfaceVisibility="",s.style.contain="",s.style.transform="",s.style.position==="relative"&&(s.style.position=""),s.style.zIndex===l&&(s.style.zIndex="")}});for(const f of[d,h]){const y=f.onComplete;f.onComplete=()=>{y==null||y(),f.releaseFill()}}return new m.MultiAnimation([d,h],{mode:"parallel"})}}};function ri(e={}){const{type:t="directional"}=e;return oi({directional:t==="directional"})}const ai={spring:{stiffness:200,damping:24}},li={inertia:{acceleration:25,resistance:1.2}},Q=.2;function ci(){return{enterPhysics:ai,exitPhysics:li,background:{willChange:"transform, opacity",enterStyle:(e,t)=>({transform:`scale(${1-Q*e})`,opacity:t}),exitStyle:e=>({transform:`scale(${1-Q+Q*e})`,opacity:e})}}}const pi={spring:{stiffness:200,damping:24}},ui={inertia:{acceleration:25,resistance:1.2}},tt=.08,di=16,et=.6,fi=e=>`blur(${Math.max(0,e).toFixed(2)}px)`;function hi(){return{enterPhysics:pi,exitPhysics:ui,background:{willChange:"transform, opacity",enterStyle:e=>({transform:`scale(${1-tt*e})`,opacity:1-(1-et)*e}),exitStyle:e=>({transform:`scale(${1-tt+tt*e})`,opacity:et+(1-et)*e})},overlay:{willChange:"backdrop-filter",initialStyle:{position:"absolute",left:"0",width:"100%",pointerEvents:"none",backdropFilter:"blur(0px)",WebkitBackdropFilter:"blur(0px)"},style:(e,t)=>{const n=e==="enter"?t:1-t,i=fi(di*n);return{backdropFilter:i,WebkitBackdropFilter:i}}}}}const yi={spring:{stiffness:230,damping:25}},mi={spring:{stiffness:230,damping:25}};function gi(){return{enterPhysics:yi,exitPhysics:mi,background:{willChange:"",enterStyle:()=>({}),exitStyle:()=>({})}}}const bi={static:gi(),"background-scale":ci(),blur:hi()},wi="static",Si="transform",xi=(e={})=>{const t=bi[e.type??wi],n=t.background,i=t.overlay,s=n.willChange!=="";return{prepare:({from:o,to:r,context:l,createElement:c})=>{const a=l.direction==="forward"?"enter":"exit",p=a==="enter"?r:o,u=a==="enter"?o:r;p.then(h=>{h.style.willChange=Si,h.style.backfaceVisibility="hidden",h.style.contain="layout paint",h.style.zIndex=R,a==="enter"?h.style.position="relative":h.style.pointerEvents="none"}),u.then(h=>{s&&(h.style.willChange=n.willChange,h.style.backfaceVisibility="hidden",h.style.contain="layout paint"),h.style.zIndex=I,a==="enter"?h.style.pointerEvents="none":h.style.position="relative"});let d;return i&&(d=c("sheet-overlay"),Object.assign(d.style,i.initialStyle),d.style.willChange=i.willChange,l.positionedParent.appendChild(d)),{overlay:d}},animation:({from:o,to:r,context:l,overlay:c})=>{const a=l.direction==="forward"?"enter":"exit",p=a==="enter"?t.enterPhysics:t.exitPhysics,u=a==="enter"?r:o,d=a==="enter"?o:r,h=T(l,a==="enter"?"to":"from"),f=()=>{o.style.pointerEvents="",o.style.zIndex=""},y=()=>{const x=a==="enter"?R:I;r.style.position==="relative"&&(r.style.position=""),r.style.zIndex===x&&(r.style.zIndex="")},g=x=>{const C=x.onComplete;x.onComplete=()=>{C==null||C(),x.releaseFill()}};u.style.clipPath=`inset(${h.top}px 0 calc(100% - ${h.top+h.height}px) 0)`;const S=a==="enter"?(x,C)=>({transform:`translate3d(0, ${C*h.height}px, 0)`}):x=>({transform:`translate3d(0, ${x*h.height}px, 0)`}),b=new m.WebAnimation({element:u,integrator:w.from(p),style:S,onComplete:()=>{u.style.willChange="auto",u.style.backfaceVisibility="",u.style.contain="",u.style.clipPath="",u.style.transform="",f(),y()}});g(b);const $=[b];if(s){const x=d.scrollHeight;x>0&&(d.style.height=`${x}px`);const C=T(l,a==="enter"?"from":"to"),_=C.left+C.width/2,P=C.top+C.height/2;d.style.clipPath=`inset(${C.top}px 0 calc(100% - ${C.top+C.height}px) 0)`,d.style.transformOrigin=`${_}px ${P}px`;const A=a==="enter"?(M,H)=>n.enterStyle(M,H):M=>n.exitStyle(M),k=new m.WebAnimation({element:d,integrator:w.from(p),style:A,onComplete:()=>{d.style.willChange="auto",d.style.backfaceVisibility="",d.style.contain="",d.style.clipPath="",d.style.transformOrigin="",d.style.transform="",d.style.opacity="",d.style.height=""}});g(k),$.push(k)}if(c&&i){c.style.zIndex=kt;const x=Lt(l,"to");c.style.top=`${x.top}px`,c.style.height=`${x.height}px`,$.push(new m.WebAnimation({element:c,integrator:w.from(p),style:C=>i.style(a,C)}))}return new m.MultiAnimation($,{mode:"parallel"})}}};function Ci(e){return e==="scale"||e==="background-scale"?"background-scale":e==="blur"?"blur":"static"}function $i(e={}){const t=e.type,n=Ci(t);return xi({type:n})}const Ei={spring:{stiffness:170,damping:22,doubleSpring:.8}},Ai=(e={})=>{const t=e.physics??Ei;return{prepare:({from:n,to:i,context:s})=>{const o=s.direction==="forward";return n.then(r=>{r.style.willChange="transform",r.style.backfaceVisibility="hidden",r.style.contain="layout paint",r.style.pointerEvents="none"}),i.then(r=>{const l=o?100:-100;r.style.transform=`translate3d(${l}%, 0, 0)`,r.style.willChange="transform",r.style.backfaceVisibility="hidden",r.style.contain="layout paint"}),{}},animation:({from:n,to:i,context:s})=>{const o=s.direction==="forward",r=new m.WebAnimation({element:n,integrator:w.from(t),style:c=>({transform:`translate3d(${o?-100*c:100*c}%, 0, 0)`}),onComplete:()=>{n.style.willChange="auto",n.style.backfaceVisibility="",n.style.contain="",n.style.transform="",n.style.pointerEvents=""}}),l=new m.WebAnimation({element:i,integrator:w.from(t),style:(c,a)=>({transform:`translate3d(${o?a*100:a*-100}%, 0, 0)`}),onComplete:()=>{i.style.willChange="auto",i.style.backfaceVisibility="",i.style.contain="",i.style.transform=""}});return new m.MultiAnimation([r,l],{mode:"parallel"})}}};function Pi(e={}){return Ai()}const _i={spring:{stiffness:17,damping:6}},nt=20,z=800,Ii=(e={})=>{const t=e.physics??_i;return{prepare:({from:n,to:i})=>(n.then(s=>{s.style.willChange="transform",s.style.backfaceVisibility="hidden",s.style.contain="layout paint",s.style.pointerEvents="none",s.style.transform=`perspective(${z}px) rotateY(0deg) translate3d(0%, 0, 0)`}),i.then(s=>{s.style.willChange="transform",s.style.backfaceVisibility="hidden",s.style.contain="layout paint",s.style.transform=`perspective(${z}px) rotateY(${nt}deg) translate3d(-100%, 0, 0)`}),{}),animation:({from:n,to:i})=>{const s=new m.WebAnimation({element:n,integrator:w.from(t),style:r=>{const l=-r*nt,c=r*100;return{transform:`perspective(${z}px) rotateY(${l}deg) translate3d(${c}%, 0, 0)`}},onComplete:()=>{n.style.transform="",n.style.willChange="auto",n.style.backfaceVisibility="",n.style.contain="",n.style.pointerEvents=""}}),o=new m.WebAnimation({element:i,integrator:w.from(t),style:(r,l)=>{const c=l*nt,a=-l*100;return{transform:`perspective(${z}px) rotateY(${c}deg) translate3d(${a}%, 0, 0)`}},onComplete:()=>{i.style.transform="",i.style.willChange="auto",i.style.backfaceVisibility="",i.style.contain=""}});return new m.MultiAnimation([s,o],{mode:"sequence"})}}};function Ri(e={}){return Ii()}function Oi(e,t){return t.left>=e.left-.01&&t.top>=e.top-.01&&t.left+t.width<=e.left+e.width+.01&&t.top+t.height<=e.top+e.height+.01}function Vt(e){const t=()=>({enterContent:e.enterRect,exitContent:e.exitRect,startWindow:e.enterRect,scaleX:e.exitRect.width/e.enterRect.width,scaleY:e.exitRect.height/e.enterRect.height}),{enterMedia:n,exitMedia:i}=e;if(!n||!i||!Wt(n,i))return t();const s=n.content,o=i.content;if(s.width<=0||s.height<=0||o.width<=0||o.height<=0)return t();const r=o.width/s.width,l=o.height/s.height,c=Ut(s,o,i.window,r,l);return Oi(n.window,c)?{enterContent:s,exitContent:o,startWindow:c,scaleX:r,scaleY:l}:t()}function Xt(e,t){return{top:e.top/t.height*100,right:(t.width-(e.left+e.width))/t.width*100,bottom:(t.height-(e.top+e.height))/t.height*100,left:e.left/t.width*100}}function Bt(e,t,n){return{x:e/Math.max(Math.abs(t),1e-6),y:e/Math.max(Math.abs(n),1e-6)}}function vi(e){const{pageRect:t,scrollOffset:n,enterRadius:i,exitRadius:s}=e,o=Vt(e),{enterContent:r,exitContent:l,startWindow:c,scaleX:a,scaleY:p}=o,u=l.left-r.left+(l.width-r.width)/2-n.x,d=l.top-r.top+(l.height-r.height)/2-n.y,h=Xt(c,t);return{transformOrigin:`${O(r)}px ${v(r)}px`,animate:f=>{const y=1-f,g=1+(a-1)*y,S=1+(p-1)*y,b=Math.max(0,s*y+i*(1-y)),$=Bt(b,g,S);return{clipPath:`inset(${h.top*y}% ${h.right*y}% ${h.bottom*y}% ${h.left*y}% round ${$.x}px / ${$.y}px)`,transform:`translate(${u*y}px, ${d*y}px) scale(${g}, ${S})`}}}}function Ti(e){const{pageRect:t,scrollOffset:n,enterRadius:i,exitRadius:s}=e,o=Vt(e),{enterContent:r,exitContent:l,startWindow:c,scaleX:a,scaleY:p}=o,u=l.left-r.left+(l.width-r.width)/2+n.x,d=l.top-r.top+(l.height-r.height)/2+n.y,h=Xt(c,t);return{transformOrigin:`${O(r)}px ${v(r)}px`,animate:f=>{const y=1-f,g=1+(a-1)*y,S=1+(p-1)*y,b=Math.max(0,i*(1-y)+s*y),$=Bt(b,g,S);return{clipPath:`inset(${h.top*y}% ${h.right*y}% ${h.bottom*y}% ${h.left*y}% round ${$.x}px / ${$.y}px)`,transform:`translate(${u*y-n.x}px, ${d*y}px) scale(${g}, ${S})`}}}}const Di={spring:{stiffness:380,damping:30,doubleSpring:{stiffness:260,damping:30}}},Zt=.12,Fi=18;function Mi(){return{transformOrigin:"50% 50%",animate:e=>{const t=1-e;return{transform:`scale(${1-Zt*t})`}}}}function Li(){return{transformOrigin:"50% 50%",animate:e=>{const t=1-e;return{transform:`scale(${1-Zt*t})`}}}}const it={willChange:"backdrop-filter",initialStyle:{position:"absolute",left:"0",width:"100%",pointerEvents:"none",backdropFilter:"blur(0px)",WebkitBackdropFilter:"blur(0px)"},style:(e,t)=>{const n=e==="enter"?t:1-t,i=`blur(${Fi*n}px)`;return{backdropFilter:i,WebkitBackdropFilter:i}}};class Yi{constructor(){E(this,"physics",Di)}contribute(t){const{from:n,to:i,resolved:s,physics:o}=t,r=s.mode==="enter",l=r?n:i,c=r?Mi():Li();return c&&(l.style.transformOrigin=c.transformOrigin),[new m.WebAnimation({element:l,integrator:w.from(o),style:r?(a,p)=>c.animate(p):a=>c.animate(a)})]}}class ki{prepare(t){const n=t.createElement("zoom-overlay");return Object.assign(n.style,it.initialStyle),n.style.willChange=it.willChange,t.context.positionedParent.appendChild(n),{overlay:n}}contribute(t){const n=t.extras.overlay;if(!n)return[];n.style.zIndex=kt;const i=Lt(t.context,"to");return n.style.top=`${i.top}px`,n.style.height=`${i.height}px`,[new m.WebAnimation({element:n,integrator:w.from(t.physics),style:s=>it.style(t.resolved.mode,s)})]}}const Hi={spring:{stiffness:380,damping:30,doubleSpring:{stiffness:260,damping:30}}};function Ni({enterRect:e,exitRect:t,scrollOffset:n}){const i=e.left-t.left+(e.width-t.width)/2+n.x,s=e.top-t.top+(e.height-t.height)/2+n.y,o=e.width/t.width,r=e.height/t.height,l=Math.max(o,r);return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:c=>{const a=1-c;return{transform:`translate(${i*a-n.x}px, ${s*a}px) scale(${1+(l-1)*a})`}}}}function Wi({enterRect:e,exitRect:t,scrollOffset:n}){const i=e.left-t.left+(e.width-t.width)/2-n.x,s=e.top-t.top+(e.height-t.height)/2-n.y,o=e.width/t.width,r=e.height/t.height,l=Math.max(o,r);return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:c=>{const a=1-c;return{transform:`translate(${i*a}px, ${s*a}px) scale(${1+(l-1)*a})`}}}}class zi{constructor(){E(this,"physics",Hi)}contribute(t){const{from:n,to:i,resolved:s,input:o,physics:r}=t,l=s.mode==="enter",c=l?n:i,a=l?Ni(o):Wi(o);return a&&(c.style.transformOrigin=a.transformOrigin),[new m.WebAnimation({element:c,integrator:w.from(r),style:l?(p,u)=>a.animate(u):p=>a.animate(p)})]}}const Ui={spring:{stiffness:530,damping:34,doubleSpring:1}};class Vi{constructor(){E(this,"physics",Ui)}contribute(t){return[]}}const Xi={expand:()=>new zi,static:()=>new Vi,blur:()=>new Yi};function Bi(e){return Xi[e]()}const at="data-zoom-enter-key",Tt="data-zoom-exit-key",Dt="data-zoom-radius";function Zi(e,t){return Math.abs(e.left-t.left)<.01&&Math.abs(e.top-t.top)<.01&&Math.abs(e.width-t.width)<.01&&Math.abs(e.height-t.height)<.01}function Gi(e,t){const n=[];let i=t;for(;i&&i!==e;){const s=i.parentElement;if(!s)break;for(const o of Array.from(s.children))o!==i&&o instanceof HTMLElement&&n.push(o);i=s}return n}function Ft(e){const t=e.querySelectorAll(`[${at}]`);return t.length!==1?null:t[0]}function Mt(e,t){const n=e.querySelectorAll(`[${Tt}]`);for(const i of n)if(i.getAttribute(Tt)===t)return i;return null}function ji(e,t,n){if(n==="forward"){const r=Ft(t);if(!r)return null;const l=r.getAttribute(at);if(!l)return null;const c=Mt(e,l);return c?{mode:"enter",enterEl:r,exitEl:c}:null}const i=Ft(e);if(!i)return null;const s=i.getAttribute(at);if(!s)return null;const o=Mt(t,s);return o?{mode:"exit",enterEl:i,exitEl:o}:null}function qi(e,t,n,i){const s=e.mode==="enter"?n:t,o=e.mode==="enter"?t:n,r=N(s,e.enterEl),l=N(o,e.exitEl),c=rt(e.enterEl,r,g=>N(s,g),{legacyRadiusAttribute:Dt}),a=rt(e.exitEl,l,g=>N(o,g),{legacyRadiusAttribute:Dt}),[p,u]=zt(c,a),d=p.contentAware&&u.contentAware,h=e.mode==="enter"?n.getBoundingClientRect():t.getBoundingClientRect(),f={left:0,top:0,width:h.width,height:h.height},y=p.radiusSource==="legacy"||Zi(p.window,f)?p.radius:0;return{enterRect:r,exitRect:l,...d?{enterMedia:p,exitMedia:u}:{},pageRect:h,scrollOffset:i,enterRadius:y,exitRadius:u.radius}}class Ki{prepare(t){t.from.then(n=>{n.style.willChange="transform, clip-path, opacity",n.style.backfaceVisibility="hidden",n.style.contain="layout paint"})}contribute(t){const{from:n,to:i,resolved:s,input:o,physics:r,onComplete:l}=t,c=s.mode==="enter",a=c?vi(o):Ti(o),p=c?i:n,u=c?"t":"u";a&&(p.style.transformOrigin=a.transformOrigin);const d=c?I:R,h=c?R:I,f=n.style.zIndex;n.style.zIndex=d;const y=i.style.zIndex,g=i.style.position;return i.style.zIndex=h,i.style.position="relative",l(()=>{p.style.willChange="auto",p.style.backfaceVisibility="",p.style.transformOrigin="",p.style.contain="",n.style.zIndex=f,i.style.zIndex===h&&(i.style.zIndex=y),i.style.position==="relative"&&(i.style.position=g),i.style.transformOrigin="",n.style.willChange="auto",n.style.backfaceVisibility="",n.style.transformOrigin="",n.style.contain="",n.style.transform="",n.style.clipPath=""}),[new m.WebAnimation({element:p,integrator:w.from(r),style:u==="t"?S=>a.animate(S):(S,b)=>a.animate(b)})]}}class Ji{contribute(t){const{resolved:n,physics:i,from:s,to:o,onComplete:r}=t,l=n.mode==="enter"?o:s,c=Gi(l,n.enterEl);if(c.length===0)return[];const a=c.map(p=>p.style.opacity);if(n.mode==="enter")for(const p of c)p.style.opacity="0";return r(()=>{for(let p=0;p<c.length;p++){const u=c[p];u&&(u.style.opacity=a[p]??"")}}),c.map(p=>new m.WebAnimation({element:p,integrator:w.from(i),style:(u,d)=>({opacity:n.mode==="enter"?u:d})}))}}class Gt{contribute(){return[]}}const Qi={default:()=>new Gt,fade:()=>new Ji};function ts(e){return Qi[e]()}class es extends Gt{}function ns(e){const t=Bi(e.type);return{strategies:[new Ki,t,ts(e.variant),new es,...e.type==="blur"?[new ki]:[]],physics:t.physics}}const is=e=>{const{strategies:t,physics:n}=ns(e);return{prepare:i=>{const s={from:i.from,to:i.to,context:{positionedParent:i.context.positionedParent},createElement:i.createElement},o={};for(const r of t){if(!r.prepare)continue;const l=r.prepare(s);l&&Object.assign(o,l)}return o},animation:({from:i,to:s,context:o,...r})=>{const l=ji(i,s,o.direction);if(!l)return new m.MultiAnimation([],{mode:"parallel"});const c=qi(l,i,s,o.scrollOffset),a=[],u={from:i,to:s,resolved:l,input:c,physics:n,context:o,extras:r,onComplete:f=>{a.push(f)}},d=[];for(const f of t)f.contribute&&d.push(...f.contribute(u));const h=d[0];if(h){const f=h.onComplete;h.onComplete=()=>{f==null||f();for(const y of a)try{y()}catch(g){console.error("[zoom] cleanup error",g)}}}for(const f of d){if(!(f instanceof m.WebAnimation))continue;const y=f.onComplete;f.onComplete=()=>{y==null||y(),f.releaseFill()}}return new m.MultiAnimation(d,{mode:"parallel"})}}};function ss(e){const t=e.type??"static",n=e.variant??(e.fade?"fade":"default");return{type:t,variant:n}}function os(e={}){const t=ss(e);return is(t)}exports.Animation=m.Animation;exports.MultiAnimation=m.MultiAnimation;exports.WebAnimation=m.WebAnimation;exports.axis=Ye;exports.blind=Ue;exports.drill=tn;exports.fade=on;exports.film=hn;exports.hero=qn;exports.jaemin=ti;exports.rotate=ii;exports.scroll=ri;exports.sheet=$i;exports.slide=Pi;exports.strip=Ri;exports.zoom=os;
package/dist/index.js CHANGED
@@ -200,7 +200,7 @@ function z(e, t) {
200
200
  s.height / i
201
201
  );
202
202
  }
203
- function F(e, t) {
203
+ function T(e, t) {
204
204
  const { scrollingElement: n, positionedParent: s } = e, o = n !== s && n.contains(s) ? k(n, s).top : 0;
205
205
  return {
206
206
  top: e[t].scroll.y,
@@ -218,11 +218,9 @@ function Ht(e, t) {
218
218
  }
219
219
  const dt = 8, ut = {
220
220
  spring: {
221
- stiffness: 800,
221
+ stiffness: 600,
222
222
  damping: 40,
223
- doubleSpring: 1.2,
224
- restDelta: 0.1,
225
- restSpeed: 0.1
223
+ doubleSpring: 1.2
226
224
  }
227
225
  };
228
226
  function ue({
@@ -448,7 +446,7 @@ function Oe() {
448
446
  }
449
447
  };
450
448
  }
451
- function De() {
449
+ function Fe() {
452
450
  return {
453
451
  outPhysics: bt,
454
452
  inPhysics: bt,
@@ -456,17 +454,17 @@ function De() {
456
454
  build: Oe
457
455
  };
458
456
  }
459
- const St = ve(), Fe = {
457
+ const St = ve(), Te = {
460
458
  snappy: St,
461
459
  directional: St,
462
- "non-directional": De()
463
- }, Te = {
460
+ "non-directional": Fe()
461
+ }, De = {
464
462
  x: be,
465
463
  y: Ie,
466
- z: Fe
464
+ z: Te
467
465
  };
468
466
  function Me(e, t) {
469
- const n = Te[e];
467
+ const n = De[e];
470
468
  return n[t] ?? n.snappy;
471
469
  }
472
470
  const Ye = "x", Le = "snappy";
@@ -495,7 +493,7 @@ const He = (e = {}) => {
495
493
  animation: ({ from: o, to: i, context: r }) => {
496
494
  const l = s.build({ direction: r.direction });
497
495
  if (t === "z") {
498
- const p = F(r, "from"), d = F(r, "to");
496
+ const p = T(r, "from"), d = T(r, "to");
499
497
  o.style.clipPath = `inset(${p.top}px 0 calc(100% - ${p.top + p.height}px) 0)`, i.style.clipPath = `inset(${d.top}px 0 calc(100% - ${d.top + d.height}px) 0)`;
500
498
  }
501
499
  const c = new b({
@@ -809,7 +807,7 @@ const q = {
809
807
  scaleDown: { stiffness: 20, damping: 7 },
810
808
  translate: { stiffness: 15, damping: 7 },
811
809
  scaleUp: { stiffness: 20, damping: 7 }
812
- }, T = {
810
+ }, D = {
813
811
  scaleDown: 0,
814
812
  translate: 0.2,
815
813
  scaleUp: 0.8
@@ -856,7 +854,7 @@ function Pt(e) {
856
854
  const { rect: t, scale: n, direction: s, override: o } = e, i = s === "out" ? { scale: 1, translateY: -t.top } : { scale: n, translateY: -t.top + t.height }, r = K(o, q.scaleDown), l = K(o, q.translate), c = K(o, q.scaleUp), a = s === "out" ? 1 : 0, p = s === "out" ? 0 : 1, d = s === "out" ? [
857
855
  {
858
856
  spring: r,
859
- offset: T.scaleDown,
857
+ offset: D.scaleDown,
860
858
  tick: (f) => {
861
859
  const y = 1 - f;
862
860
  i.scale = 1 - (1 - n) * y;
@@ -864,7 +862,7 @@ function Pt(e) {
864
862
  },
865
863
  {
866
864
  spring: l,
867
- offset: T.translate,
865
+ offset: D.translate,
868
866
  tick: (f) => {
869
867
  const y = 1 - f;
870
868
  i.translateY = -t.top - t.height * y;
@@ -872,7 +870,7 @@ function Pt(e) {
872
870
  },
873
871
  {
874
872
  spring: c,
875
- offset: T.scaleUp,
873
+ offset: D.scaleUp,
876
874
  tick: (f) => {
877
875
  const y = 1 - f;
878
876
  i.scale = n + (1 - n) * y;
@@ -881,21 +879,21 @@ function Pt(e) {
881
879
  ] : [
882
880
  {
883
881
  spring: r,
884
- offset: T.scaleDown,
882
+ offset: D.scaleDown,
885
883
  tick: (f) => {
886
884
  i.scale = 1 - (1 - n) * f;
887
885
  }
888
886
  },
889
887
  {
890
888
  spring: l,
891
- offset: T.translate,
889
+ offset: D.translate,
892
890
  tick: (f) => {
893
891
  i.translateY = -t.top + t.height * (1 - f);
894
892
  }
895
893
  },
896
894
  {
897
895
  spring: c,
898
- offset: T.scaleUp,
896
+ offset: D.scaleUp,
899
897
  tick: (f) => {
900
898
  i.scale = n + (1 - n) * f;
901
899
  }
@@ -1024,7 +1022,7 @@ const fn = (e = {}) => {
1024
1022
  const t = ((o = e.border) == null ? void 0 : o.color) ?? an, n = rn, s = e.physics;
1025
1023
  return {
1026
1024
  prepare: ({ from: i, to: r, context: l }) => {
1027
- const c = F(l, "from"), a = F(l, "to"), p = k(document.body, l.positionedParent), d = un(t, {
1025
+ const c = T(l, "from"), a = T(l, "to"), p = k(document.body, l.positionedParent), d = un(t, {
1028
1026
  ...c,
1029
1027
  top: p.top
1030
1028
  });
@@ -1211,7 +1209,7 @@ function Cn(e) {
1211
1209
  function O(e) {
1212
1210
  return e.left + e.width / 2;
1213
1211
  }
1214
- function D(e) {
1212
+ function F(e) {
1215
1213
  return e.top + e.height / 2;
1216
1214
  }
1217
1215
  function pt(e, t) {
@@ -1304,7 +1302,7 @@ function Wt(e, t, n, s, o) {
1304
1302
  const i = n.width / s, r = n.height / o;
1305
1303
  return {
1306
1304
  left: O(e) + (O(n) - O(t)) / s - i / 2,
1307
- top: D(e) + (D(n) - D(t)) / o - r / 2,
1305
+ top: F(e) + (F(n) - F(t)) / o - r / 2,
1308
1306
  width: i,
1309
1307
  height: r
1310
1308
  };
@@ -1317,7 +1315,7 @@ const Pn = {
1317
1315
  function M(e) {
1318
1316
  return Pn[e];
1319
1317
  }
1320
- const Ot = "data-hero-enter-key", Dt = "data-hero-exit-key", Q = "data-hero-key";
1318
+ const Ot = "data-hero-enter-key", Ft = "data-hero-exit-key", Q = "data-hero-key";
1321
1319
  class _n {
1322
1320
  constructor() {
1323
1321
  E(this, "previousFromOpacity", "");
@@ -1358,13 +1356,13 @@ const Rn = () => new In(), vn = {
1358
1356
  fade: Rn
1359
1357
  }, On = {
1360
1358
  spring: { stiffness: 320, damping: 30 }
1361
- }, Dn = () => On, Fn = {
1359
+ }, Fn = () => On, Tn = {
1362
1360
  spring: { stiffness: 300, damping: 30, doubleSpring: 1 }
1363
- }, Tn = () => Fn, Mn = {
1364
- default: Dn,
1365
- smooth: Tn
1361
+ }, Dn = () => Tn, Mn = {
1362
+ default: Fn,
1363
+ smooth: Dn
1366
1364
  }, Yn = 700, Ln = "data-hero-aspect-ratio", kn = "data-hero-radius";
1367
- function Ft(e, t, n) {
1365
+ function Tt(e, t, n) {
1368
1366
  const s = k(e, t);
1369
1367
  return at(
1370
1368
  t,
@@ -1386,7 +1384,7 @@ function U(e, t) {
1386
1384
  return n;
1387
1385
  }
1388
1386
  function Hn(e, t) {
1389
- const n = [], s = U(t, Ot), o = U(e, Dt);
1387
+ const n = [], s = U(t, Ot), o = U(e, Ft);
1390
1388
  for (const [l, c] of s) {
1391
1389
  const a = o.get(l);
1392
1390
  a && n.push({
@@ -1397,7 +1395,7 @@ function Hn(e, t) {
1397
1395
  toFit: M("enter")
1398
1396
  });
1399
1397
  }
1400
- const i = U(e, Ot), r = U(t, Dt);
1398
+ const i = U(e, Ot), r = U(t, Ft);
1401
1399
  for (const [l, c] of i) {
1402
1400
  const a = r.get(l);
1403
1401
  a && n.push({
@@ -1442,15 +1440,15 @@ function Vn(e, t) {
1442
1440
  }
1443
1441
  function Xn(e, t, n) {
1444
1442
  const { fromEl: s, toEl: o } = t, [i, r] = Un(
1445
- Ft(e, s, t.fromFit),
1446
- Ft(e, o, t.toFit)
1443
+ Tt(e, s, t.fromFit),
1444
+ Tt(e, o, t.toFit)
1447
1445
  ), l = i.content, c = i.window, a = r.content, p = r.window, d = r.clipInset, u = i.radiusSource === "unsupported" || r.radiusSource === "unsupported", h = u ? 0 : i.radius, f = u ? 0 : r.radius;
1448
1446
  if (l.width === 0 || l.height === 0 || c.width === 0 || c.height === 0 || a.width === 0 || a.height === 0 || p.width === 0 || p.height === 0)
1449
1447
  return null;
1450
1448
  const y = Math.max(
1451
1449
  l.width / a.width,
1452
1450
  l.height / a.height
1453
- ), m = O(l), S = D(l), g = O(a), $ = D(a), x = m - g, C = S - $;
1451
+ ), m = O(l), S = F(l), g = O(a), $ = F(a), x = m - g, C = S - $;
1454
1452
  if (Math.abs(C) > n) return null;
1455
1453
  const I = pt(
1456
1454
  a,
@@ -1560,7 +1558,7 @@ const jn = {
1560
1558
  prepare: ({ from: i, to: r, context: l }) => (i.then((c) => {
1561
1559
  c.style.opacity = "1";
1562
1560
  }), r.then((c) => {
1563
- const a = F(l, "to"), p = Math.min(a.width, a.height) * 0.4;
1561
+ const a = T(l, "to"), p = Math.min(a.width, a.height) * 0.4;
1564
1562
  c.style.setProperty("--max-border-radius", `${p}px`), c.style.setProperty("--border-radius-scale", "1"), c.style.willChange = "transform", c.style.backfaceVisibility = "hidden";
1565
1563
  const d = a.left + a.width / 2, u = a.top + a.height / 2;
1566
1564
  c.style.transformOrigin = `${d}px ${u}px`, c.style.position = "fixed", c.style.top = `${a.top}px`, c.style.left = `${a.left}px`, c.style.width = `${a.width}px`, c.style.height = `${a.height}px`, c.style.zIndex = "1000", c.style.overflow = "hidden", c.style.transform = `rotate(${n}deg) scale(${s}) translateZ(0)`, c.style.borderRadius = "calc(var(--max-border-radius) * var(--border-radius-scale))", c.style.opacity = "1";
@@ -1826,7 +1824,7 @@ const fs = {
1826
1824
  return s && (u = c("sheet-overlay"), Object.assign(u.style, s.initialStyle), u.style.willChange = s.willChange, l.positionedParent.appendChild(u)), { overlay: u };
1827
1825
  },
1828
1826
  animation: ({ from: i, to: r, context: l, overlay: c }) => {
1829
- const a = l.direction === "forward" ? "enter" : "exit", p = a === "enter" ? t.enterPhysics : t.exitPhysics, d = a === "enter" ? r : i, u = a === "enter" ? i : r, h = F(
1827
+ const a = l.direction === "forward" ? "enter" : "exit", p = a === "enter" ? t.enterPhysics : t.exitPhysics, d = a === "enter" ? r : i, u = a === "enter" ? i : r, h = T(
1830
1828
  l,
1831
1829
  a === "enter" ? "to" : "from"
1832
1830
  ), f = () => {
@@ -1858,7 +1856,7 @@ const fs = {
1858
1856
  if (o) {
1859
1857
  const x = u.scrollHeight;
1860
1858
  x > 0 && (u.style.height = `${x}px`);
1861
- const C = F(
1859
+ const C = T(
1862
1860
  l,
1863
1861
  a === "enter" ? "from" : "to"
1864
1862
  ), I = C.left + C.width / 2, A = C.top + C.height / 2;
@@ -2027,7 +2025,7 @@ function jt(e, t, n) {
2027
2025
  function $s(e) {
2028
2026
  const { pageRect: t, scrollOffset: n, enterRadius: s, exitRadius: o } = e, i = Zt(e), { enterContent: r, exitContent: l, startWindow: c, scaleX: a, scaleY: p } = i, d = l.left - r.left + (l.width - r.width) / 2 - n.x, u = l.top - r.top + (l.height - r.height) / 2 - n.y, h = Gt(c, t);
2029
2027
  return {
2030
- transformOrigin: `${O(r)}px ${D(r)}px`,
2028
+ transformOrigin: `${O(r)}px ${F(r)}px`,
2031
2029
  animate: (f) => {
2032
2030
  const y = 1 - f, m = 1 + (a - 1) * y, S = 1 + (p - 1) * y, g = Math.max(0, o * y + s * (1 - y)), $ = jt(g, m, S);
2033
2031
  return {
@@ -2040,7 +2038,7 @@ function $s(e) {
2040
2038
  function Es(e) {
2041
2039
  const { pageRect: t, scrollOffset: n, enterRadius: s, exitRadius: o } = e, i = Zt(e), { enterContent: r, exitContent: l, startWindow: c, scaleX: a, scaleY: p } = i, d = l.left - r.left + (l.width - r.width) / 2 + n.x, u = l.top - r.top + (l.height - r.height) / 2 + n.y, h = Gt(c, t);
2042
2040
  return {
2043
- transformOrigin: `${O(r)}px ${D(r)}px`,
2041
+ transformOrigin: `${O(r)}px ${F(r)}px`,
2044
2042
  animate: (f) => {
2045
2043
  const y = 1 - f, m = 1 + (a - 1) * y, S = 1 + (p - 1) * y, g = Math.max(0, s * (1 - y) + o * y), $ = jt(g, m, S);
2046
2044
  return {
@@ -2141,12 +2139,15 @@ class vs {
2141
2139
  }
2142
2140
  const Os = {
2143
2141
  spring: {
2144
- stiffness: 430,
2145
- damping: 33,
2146
- doubleSpring: 1
2142
+ stiffness: 380,
2143
+ damping: 30,
2144
+ doubleSpring: {
2145
+ stiffness: 260,
2146
+ damping: 30
2147
+ }
2147
2148
  }
2148
2149
  };
2149
- function Ds({
2150
+ function Fs({
2150
2151
  enterRect: e,
2151
2152
  exitRect: t,
2152
2153
  scrollOffset: n
@@ -2162,7 +2163,7 @@ function Ds({
2162
2163
  }
2163
2164
  };
2164
2165
  }
2165
- function Fs({
2166
+ function Ts({
2166
2167
  enterRect: e,
2167
2168
  exitRect: t,
2168
2169
  scrollOffset: n
@@ -2178,12 +2179,12 @@ function Fs({
2178
2179
  }
2179
2180
  };
2180
2181
  }
2181
- class Ts {
2182
+ class Ds {
2182
2183
  constructor() {
2183
2184
  E(this, "physics", Os);
2184
2185
  }
2185
2186
  contribute(t) {
2186
- const { from: n, to: s, resolved: o, input: i, physics: r } = t, l = o.mode === "enter", c = l ? n : s, a = l ? Ds(i) : Fs(i);
2187
+ const { from: n, to: s, resolved: o, input: i, physics: r } = t, l = o.mode === "enter", c = l ? n : s, a = l ? Fs(i) : Ts(i);
2187
2188
  return a && (c.style.transformOrigin = a.transformOrigin), [
2188
2189
  new b({
2189
2190
  element: c,
@@ -2209,14 +2210,14 @@ class Ys {
2209
2210
  }
2210
2211
  }
2211
2212
  const Ls = {
2212
- expand: () => new Ts(),
2213
+ expand: () => new Ds(),
2213
2214
  static: () => new Ys(),
2214
2215
  blur: () => new Rs()
2215
2216
  };
2216
2217
  function ks(e) {
2217
2218
  return Ls[e]();
2218
2219
  }
2219
- const lt = "data-zoom-enter-key", Tt = "data-zoom-exit-key", Mt = "data-zoom-radius";
2220
+ const lt = "data-zoom-enter-key", Dt = "data-zoom-exit-key", Mt = "data-zoom-radius";
2220
2221
  function Hs(e, t) {
2221
2222
  return Math.abs(e.left - t.left) < 0.01 && Math.abs(e.top - t.top) < 0.01 && Math.abs(e.width - t.width) < 0.01 && Math.abs(e.height - t.height) < 0.01;
2222
2223
  }
@@ -2237,9 +2238,9 @@ function Yt(e) {
2237
2238
  return t.length !== 1 ? null : t[0];
2238
2239
  }
2239
2240
  function Lt(e, t) {
2240
- const n = e.querySelectorAll(`[${Tt}]`);
2241
+ const n = e.querySelectorAll(`[${Dt}]`);
2241
2242
  for (const s of n)
2242
- if (s.getAttribute(Tt) === t)
2243
+ if (s.getAttribute(Dt) === t)
2243
2244
  return s;
2244
2245
  return null;
2245
2246
  }