@ssgoi/core 6.0.0 → 6.1.0

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.
Files changed (99) hide show
  1. package/README.md +5 -6
  2. package/dist/animation/animation.d.ts +18 -0
  3. package/dist/animation/animation.d.ts.map +1 -1
  4. package/dist/animation/host-animation.d.ts +2 -0
  5. package/dist/animation/host-animation.d.ts.map +1 -1
  6. package/dist/animation/multi-animation.d.ts +20 -4
  7. package/dist/animation/multi-animation.d.ts.map +1 -1
  8. package/dist/animation/web-animation.d.ts +2 -0
  9. package/dist/animation/web-animation.d.ts.map +1 -1
  10. package/dist/index.cjs +10 -10
  11. package/dist/index.js +998 -561
  12. package/dist/internal.cjs +1 -1
  13. package/dist/internal.js +208 -201
  14. package/dist/multi-animation-CnxqLEka.js +322 -0
  15. package/dist/multi-animation-Dw2JTJI2.cjs +1 -0
  16. package/dist/ssgoi-transition/create-ssgoi-transition-context.d.ts.map +1 -1
  17. package/dist/transitions/axis/index.d.ts +43 -0
  18. package/dist/transitions/axis/index.d.ts.map +1 -0
  19. package/dist/transitions/axis/provider/index.d.ts +8 -0
  20. package/dist/transitions/axis/provider/index.d.ts.map +1 -0
  21. package/dist/transitions/axis/provider/x/fluid.d.ts +3 -0
  22. package/dist/transitions/axis/provider/x/fluid.d.ts.map +1 -0
  23. package/dist/transitions/axis/provider/x/index.d.ts +3 -0
  24. package/dist/transitions/axis/provider/x/index.d.ts.map +1 -0
  25. package/dist/transitions/axis/provider/x/snappy.d.ts +3 -0
  26. package/dist/transitions/axis/provider/x/snappy.d.ts.map +1 -0
  27. package/dist/transitions/axis/provider/y.d.ts +3 -0
  28. package/dist/transitions/axis/provider/y.d.ts.map +1 -0
  29. package/dist/transitions/axis/provider/z.d.ts +3 -0
  30. package/dist/transitions/axis/provider/z.d.ts.map +1 -0
  31. package/dist/transitions/axis/transition.d.ts +5 -0
  32. package/dist/transitions/axis/transition.d.ts.map +1 -0
  33. package/dist/transitions/axis/types.d.ts +52 -0
  34. package/dist/transitions/axis/types.d.ts.map +1 -0
  35. package/dist/transitions/blind/index.d.ts +10 -1
  36. package/dist/transitions/blind/index.d.ts.map +1 -1
  37. package/dist/transitions/drill/index.d.ts +37 -6
  38. package/dist/transitions/drill/index.d.ts.map +1 -1
  39. package/dist/transitions/drill/types.d.ts +10 -0
  40. package/dist/transitions/drill/types.d.ts.map +1 -1
  41. package/dist/transitions/fade/index.d.ts +13 -3
  42. package/dist/transitions/fade/index.d.ts.map +1 -1
  43. package/dist/transitions/fade/types.d.ts +14 -0
  44. package/dist/transitions/fade/types.d.ts.map +1 -0
  45. package/dist/transitions/film/index.d.ts +13 -3
  46. package/dist/transitions/film/index.d.ts.map +1 -1
  47. package/dist/transitions/film/types.d.ts +16 -0
  48. package/dist/transitions/film/types.d.ts.map +1 -0
  49. package/dist/transitions/hero/index.d.ts +14 -3
  50. package/dist/transitions/hero/index.d.ts.map +1 -1
  51. package/dist/transitions/hero/types.d.ts +12 -0
  52. package/dist/transitions/hero/types.d.ts.map +1 -0
  53. package/dist/transitions/index.d.ts +1 -0
  54. package/dist/transitions/index.d.ts.map +1 -1
  55. package/dist/transitions/jaemin/index.d.ts +13 -3
  56. package/dist/transitions/jaemin/index.d.ts.map +1 -1
  57. package/dist/transitions/jaemin/types.d.ts +9 -0
  58. package/dist/transitions/jaemin/types.d.ts.map +1 -0
  59. package/dist/transitions/rotate/index.d.ts +12 -3
  60. package/dist/transitions/rotate/index.d.ts.map +1 -1
  61. package/dist/transitions/rotate/types.d.ts +9 -0
  62. package/dist/transitions/rotate/types.d.ts.map +1 -0
  63. package/dist/transitions/scroll/index.d.ts +7 -7
  64. package/dist/transitions/scroll/index.d.ts.map +1 -1
  65. package/dist/transitions/sheet/index.d.ts +38 -6
  66. package/dist/transitions/sheet/index.d.ts.map +1 -1
  67. package/dist/transitions/sheet/types.d.ts +10 -0
  68. package/dist/transitions/sheet/types.d.ts.map +1 -1
  69. package/dist/transitions/slide/index.d.ts +13 -3
  70. package/dist/transitions/slide/index.d.ts.map +1 -1
  71. package/dist/transitions/slide/types.d.ts +10 -0
  72. package/dist/transitions/slide/types.d.ts.map +1 -0
  73. package/dist/transitions/strip/index.d.ts +13 -3
  74. package/dist/transitions/strip/index.d.ts.map +1 -1
  75. package/dist/transitions/strip/types.d.ts +9 -0
  76. package/dist/transitions/strip/types.d.ts.map +1 -0
  77. package/dist/transitions/utils.d.ts +16 -0
  78. package/dist/transitions/utils.d.ts.map +1 -1
  79. package/dist/transitions/zoom/index.d.ts +17 -3
  80. package/dist/transitions/zoom/index.d.ts.map +1 -1
  81. package/dist/transitions/zoom/provider/blur.d.ts +14 -0
  82. package/dist/transitions/zoom/provider/blur.d.ts.map +1 -0
  83. package/dist/transitions/zoom/provider/expand.d.ts +6 -1
  84. package/dist/transitions/zoom/provider/expand.d.ts.map +1 -1
  85. package/dist/transitions/zoom/provider/index.d.ts +10 -1
  86. package/dist/transitions/zoom/provider/index.d.ts.map +1 -1
  87. package/dist/transitions/zoom/provider/static.d.ts +6 -1
  88. package/dist/transitions/zoom/provider/static.d.ts.map +1 -1
  89. package/dist/transitions/zoom/transition.d.ts +3 -3
  90. package/dist/transitions/zoom/transition.d.ts.map +1 -1
  91. package/dist/transitions/zoom/types.d.ts +78 -3
  92. package/dist/transitions/zoom/types.d.ts.map +1 -1
  93. package/dist/transitions/zoom/zoom-element.d.ts +2 -2
  94. package/dist/transitions/zoom/zoom-element.d.ts.map +1 -1
  95. package/dist/types/index.d.ts +3 -4
  96. package/dist/types/index.d.ts.map +1 -1
  97. package/package.json +1 -1
  98. package/dist/multi-animation-B_Hl1HEU.cjs +0 -1
  99. package/dist/multi-animation-CST6aZ8y.js +0 -276
package/README.md CHANGED
@@ -38,7 +38,7 @@ import { fade } from '@ssgoi/react/view-transitions';
38
38
 
39
39
  export default function App() {
40
40
  return (
41
- <Ssgoi config={{ defaultTransition: fade() }}>
41
+ <Ssgoi config={{ transitions: fade({ paths: ['/', '/about'] }) }}>
42
42
  <div style={{ position: 'relative' }}>
43
43
  {/* Your app */}
44
44
  </div>
@@ -62,7 +62,7 @@ export default function HomePage() {
62
62
  }
63
63
  ```
64
64
 
65
- **That's it!** Your pages now transition smoothly with a fade effect.
65
+ **That's it!** Your configured pages now transition smoothly with a fade effect.
66
66
 
67
67
  ## Advanced Transitions
68
68
 
@@ -82,8 +82,7 @@ const config = {
82
82
 
83
83
  // Pinterest-style image transitions
84
84
  { from: '/gallery', to: '/photo/*', transition: pinterest() }
85
- ],
86
- defaultTransition: fade()
85
+ ]
87
86
  };
88
87
  ```
89
88
 
@@ -153,7 +152,7 @@ export default function RootLayout({ children }) {
153
152
  <html>
154
153
  <body>
155
154
  <Ssgoi config={{
156
- defaultTransition: scroll({ direction: 'up' })
155
+ transitions: scroll({ paths: ['/', '/about'] })
157
156
  }}>
158
157
  <div style={{ position: 'relative', minHeight: '100vh' }}>
159
158
  {children}
@@ -185,7 +184,7 @@ export default function Page() {
185
184
  import { fade } from '@ssgoi/svelte/view-transitions';
186
185
  </script>
187
186
 
188
- <Ssgoi config={{ defaultTransition: fade() }}>
187
+ <Ssgoi config={{ transitions: fade({ paths: ['/', '/about'] }) }}>
189
188
  <div style="position: relative; min-height: 100vh;">
190
189
  <slot />
191
190
  </div>
@@ -46,5 +46,23 @@ export declare abstract class Animation {
46
46
  abstract get isComplete(): boolean;
47
47
  /** Direction of the active or most-recent run (true = backwards). */
48
48
  abstract get isReversing(): boolean;
49
+ /**
50
+ * Current progress, normalized to 0..1 between lowerBound and upperBound.
51
+ * Reads the live simulation value, so it advances frame-by-frame while
52
+ * playing. Useful for external inspection / debugging.
53
+ *
54
+ * NOT used by `MultiAnimation` stagger triggering — that uses the
55
+ * pre-computed timeline via `findTimeForProgress` to avoid per-frame work.
56
+ */
57
+ abstract get progress(): number;
58
+ /**
59
+ * Find the time (ms, relative to this animation's last play() / reverse())
60
+ * at which progress first crosses `threshold` (0..1). Returns `null` if
61
+ * the animation has no simulation yet (i.e. play hasn't been called).
62
+ *
63
+ * Implementations should read from the pre-computed simulation timeline so
64
+ * this is an O(n) one-shot lookup — never a polling loop.
65
+ */
66
+ abstract findTimeForProgress(threshold: number): number | null;
49
67
  }
50
68
  //# sourceMappingURL=animation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"animation.d.ts","sourceRoot":"","sources":["../../src/lib/animation/animation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAE7C;;;;;;;;;;;GAWG;AACH,8BAAsB,SAAS;IAC7B,2CAA2C;IAC3C,QAAQ,CAAC,IAAI,IAAI,IAAI;IACrB,yCAAyC;IACzC,QAAQ,CAAC,OAAO,IAAI,IAAI;IACxB,iFAAiF;IACjF,QAAQ,CAAC,KAAK,IAAI,IAAI;IACtB,iEAAiE;IACjE,QAAQ,CAAC,QAAQ,IAAI,IAAI;IAEzB,6EAA6E;IAC7E,OAAO,CAAC,aAAa,CAAK;IAC1B,IAAI,YAAY,IAAI,MAAM,CAEzB;IACD,IAAI,YAAY,CAAC,IAAI,EAAE,MAAM,EAE5B;IAED,kEAAkE;IAClE,QAAQ,CAAC,OAAO,IAAI,IAAI,EAAE;IAE1B,uEAAuE;IACvE,QAAQ,CAAC,WAAW,IAAI,QAAQ,EAAE;IAElC;;;;OAIG;IACH,QAAQ,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,GAAG,IAAI;IAEvC,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC;IACnC,6CAA6C;IAC7C,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IAExB,2EAA2E;IAC3E,QAAQ,KAAK,WAAW,IAAI,OAAO,CAAC;IACpC,gDAAgD;IAChD,QAAQ,KAAK,QAAQ,IAAI,OAAO,CAAC;IACjC,wEAAwE;IACxE,QAAQ,KAAK,UAAU,IAAI,OAAO,CAAC;IAC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M,CAAC;IAEhC;;;;;;;OAOG;IACH,QAAQ,CAAC,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;CAC/D"}
@@ -29,6 +29,8 @@ export declare class HostAnimation extends Animation {
29
29
  get isPaused(): boolean;
30
30
  get isComplete(): boolean;
31
31
  get isReversing(): boolean;
32
+ get progress(): number;
33
+ findTimeForProgress(threshold: number): number | null;
32
34
  get playbackRate(): number;
33
35
  set playbackRate(rate: number);
34
36
  getPose(): Pose[];
@@ -1 +1 @@
1
- {"version":3,"file":"host-animation.d.ts","sourceRoot":"","sources":["../../src/lib/animation/host-animation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAIxC;;;;;;;;;;;;;;GAcG;AACH,qBAAa,aAAc,SAAQ,SAAS;IAC1C,OAAO,CAAC,KAAK,CAA0B;IACvC,OAAO,CAAC,MAAM,CAAqB;IACnC,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,SAAS,CAAyB;IAE1C,MAAM,CAAC,IAAI,EAAE,SAAS,GAAG,IAAI;IA4C7B,IAAI,IAAI,IAAI;IAOZ,OAAO,IAAI,IAAI;IAOf,KAAK,IAAI,IAAI;IAMb,QAAQ,IAAI,IAAI;IAKhB,IAAI,WAAW,IAAI,OAAO,CAEzB;IACD,IAAI,QAAQ,IAAI,OAAO,CAEtB;IACD,IAAI,UAAU,IAAI,OAAO,CAExB;IACD,IAAI,WAAW,IAAI,OAAO,CAEzB;IAED,IAAI,YAAY,IAAI,MAAM,CAEzB;IACD,IAAI,YAAY,CAAC,IAAI,EAAE,MAAM,EAI5B;IAED,OAAO,IAAI,IAAI,EAAE;IAGjB,WAAW,IAAI,QAAQ,EAAE;IAGzB,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,GAAG,IAAI;IAI9B,iEAAiE;IAC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AAE,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI;IAOrC,OAAO,CAAC,MAAM;CAGf"}
@@ -3,25 +3,39 @@ import { Animation } from './animation';
3
3
  export type MultiAnimationMode = "parallel" | "sequence";
4
4
  export interface MultiAnimationOptions {
5
5
  mode?: MultiAnimationMode;
6
+ /**
7
+ * Per-child start progress (0..1), keyed off the *previous* child. Only
8
+ * meaningful for `parallel` mode. `startAt[i]` = the progress the (i-1)th
9
+ * child must reach before the i-th child plays. `startAt[0]` is ignored
10
+ * (the first child always starts immediately).
11
+ *
12
+ * Omit (or use all zeros) for true simultaneous start — the existing
13
+ * parallel behavior. Use a fractional value (e.g. `[0, 0.4]`) for
14
+ * fade-through / shared-axis style overlap that's robust to spring tuning
15
+ * changes (the trigger moves with the spring, not with wall-clock time).
16
+ */
17
+ startAt?: number[];
6
18
  }
7
19
  /**
8
20
  * Composite that drives several child Animations.
9
21
  *
10
- * - `parallel`: all children play together
22
+ * - `parallel`: all children play together (optionally staggered via `startAt`)
11
23
  * - `sequence`: each child waits for the previous to settle, then plays
12
24
  *
13
25
  * Pose/Timeline reads fan out to every child for diagnostic / inspection use.
14
26
  */
15
27
  export declare class MultiAnimation extends Animation {
16
28
  private children;
17
- private mode;
29
+ private startAt;
18
30
  private pendingComplete;
19
31
  private running;
32
+ private pendingStartTimers;
20
33
  constructor(children: Animation[], opts?: MultiAnimationOptions);
21
34
  play(): void;
22
35
  reverse(): void;
23
36
  pause(): void;
24
37
  complete(): void;
38
+ get progress(): number;
25
39
  getPose(): Pose[];
26
40
  getTimeline(): Timeline[];
27
41
  matchInto(_poses: Pose[]): void;
@@ -31,9 +45,11 @@ export declare class MultiAnimation extends Animation {
31
45
  get isReversing(): boolean;
32
46
  get playbackRate(): number;
33
47
  set playbackRate(rate: number);
34
- private startParallel;
35
- private startSequence;
48
+ private startRun;
49
+ private scheduleStart;
50
+ private clearPendingStartTimers;
36
51
  private handleChildComplete;
37
52
  private handleFinished;
53
+ findTimeForProgress(_threshold: number): number | null;
38
54
  }
39
55
  //# sourceMappingURL=multi-animation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"multi-animation.d.ts","sourceRoot":"","sources":["../../src/lib/animation/multi-animation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,MAAM,MAAM,kBAAkB,GAAG,UAAU,GAAG,UAAU,CAAC;AAEzD,MAAM,WAAW,qBAAqB;IACpC,IAAI,CAAC,EAAE,kBAAkB,CAAC;CAC3B;AAED;;;;;;;GAOG;AACH,qBAAa,cAAe,SAAQ,SAAS;IAC3C,OAAO,CAAC,QAAQ,CAAc;IAC9B,OAAO,CAAC,IAAI,CAAqB;IACjC,OAAO,CAAC,eAAe,CAAK;IAC5B,OAAO,CAAC,OAAO,CAAS;gBAEZ,QAAQ,EAAE,SAAS,EAAE,EAAE,IAAI,GAAE,qBAA0B;IAMnE,IAAI,IAAI,IAAI;IAUZ,OAAO,IAAI,IAAI;IAUf,KAAK,IAAI,IAAI;IAKb,QAAQ,IAAI,IAAI;IAMhB,OAAO,IAAI,IAAI,EAAE;IAIjB,WAAW,IAAI,QAAQ,EAAE;IAIzB,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI;IAO/B,IAAI,WAAW,IAAI,OAAO,CAEzB;IACD,IAAI,QAAQ,IAAI,OAAO,CAKtB;IACD,IAAI,UAAU,IAAI,OAAO,CAExB;IACD,IAAI,WAAW,IAAI,OAAO,CAEzB;IAED,IAAI,YAAY,IAAI,MAAM,CAEzB;IACD,IAAI,YAAY,CAAC,IAAI,EAAE,MAAM,EAG5B;IAID,OAAO,CAAC,aAAa;IAgBrB,OAAO,CAAC,aAAa;IAerB,OAAO,CAAC,mBAAmB;IAK3B,OAAO,CAAC,cAAc;CAIvB"}
1
+ {"version":3,"file":"multi-animation.d.ts","sourceR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AAO,CAAC,cAAc;IAMtB,mBAAmB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;CAOvD"}
@@ -50,6 +50,8 @@ export declare class WebAnimation extends Animation {
50
50
  get isPaused(): boolean;
51
51
  get isComplete(): boolean;
52
52
  get isReversing(): boolean;
53
+ get progress(): number;
54
+ findTimeForProgress(threshold: number): number | null;
53
55
  get playbackRate(): number;
54
56
  set playbackRate(rate: number);
55
57
  getPose(): Pose[];
@@ -1 +1 @@
1
- {"version":3,"file":"web-animation.d.ts","sourceRoot":"","sources":["../../src/lib/animation/web-animation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAiB,MAAM,QAAQ,CAAC;AACzE,OAAO,EACL,KAAK,UAAU,EAGhB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAIxC,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,WAAW,CAAC;IACrB,UAAU,EAAE,UAAU,CAAC;IACvB,KAAK,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,KAAK,WAAW,CAAC;IAC7C,gEAAgE;IAChE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,8DAA8D;IAC9D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC;IACnC,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;CACzB;AAQD;;;;;;;;;;;;;GAaG;AACH,qBAAa,YAAa,SAAQ,SAAS;IACzC,OAAO,CAAC,OAAO,CAAc;IAC7B,OAAO,CAAC,UAAU,CAAa;IAC/B,OAAO,CAAC,OAAO,CAAwC;IACvD,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,UAAU,CAAS;IAE3B,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC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AAW,IAAI,QAAQ,EAAE;IAczB,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,GAAG,IAAI;IAS9B,OAAO,CAAC,SAAS;IA6DjB,OAAO,CAAC,UAAU;IAKlB,OAAO,CAAC,gBAAgB;IAQxB,OAAO,CAAC,YAAY;CAQrB"}
package/dist/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var pt=Object.defineProperty;var dt=(e,t,n)=>t in e?pt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var S=(e,t,n)=>dt(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./multi-animation-B_Hl1HEU.cjs");function C(e,t){const n=[];for(let s=0;s<e.length;s++)for(let i=s+1;i<e.length;i++){const a=e[s],o=e[i];!a||!o||n.push({from:a,to:o,transition:t(),symmetric:!0})}return n}function tt(e,t){return[{from:e.exit,to:e.enter,transition:t("enter")},{from:e.enter,to:e.exit,transition:t("exit")}]}function et(e,t,n){const s=[];for(let i=0;i<e.length;i++)for(let a=i+1;a<e.length;a++){const o=e[i],l=e[a];!o||!l||s.push({from:o,to:l,transition:n(t.forward)},{from:l,to:o,transition:n(t.backward)})}return s}class L{constructor(t){S(this,"omega");S(this,"zeta");S(this,"restDelta");S(this,"restSpeed");const{stiffness:n,damping:s}=t,i=1;this.omega=Math.sqrt(n/i),this.zeta=s/(2*Math.sqrt(n*i)),this.restDelta=t.restDelta??m.POSITION_THRESHOLD,this.restSpeed=t.restSpeed??m.VELOCITY_THRESHOLD}step(t,n,s){const i=Math.min(s,.033),{omega:a,zeta:o}=this,{position:l,velocity:c}=t,r=-2*i*o*a*c,p=i*a*a*(n-l),d=c+r+p;return{position:l+i*d,velocity:d}}isSettled(t,n){const s=Math.abs(n-t.position),i=Math.abs(t.velocity);return s<this.restDelta&&i<this.restSpeed}}class ft{constructor(t){S(this,"leader");S(this,"follower");S(this,"restDelta");S(this,"restSpeed");this.restDelta=t.restDelta??m.POSITION_THRESHOLD,this.restSpeed=t.restSpeed??m.VELOCITY_THRESHOLD,this.leader=new L({stiffness:t.stiffness,damping:t.damping,restDelta:this.restDelta,restSpeed:this.restSpeed});let n,s,i,a;typeof t.follower=="number"?(n=t.stiffness*t.follower,s=t.damping):t.follower?(n=t.follower.stiffness,s=t.follower.damping,i=t.follower.restDelta,a=t.follower.restSpeed):(n=t.stiffness,s=t.damping),this.follower=new L({stiffness:n,damping:s,restDelta:i??this.restDelta,restSpeed:a??this.restSpeed})}step(t,n,s){const a=t._leader??{position:t.position,velocity:t.velocity},o=this.leader.step(a,n,s),l=this.follower.step(t,o.position,s);return{position:l.position,velocity:l.velocity,_leader:o}}isSettled(t,n){const s=t,i=Math.abs(n-t.position)<this.restDelta&&Math.abs(t.velocity)<this.restSpeed;return s._leader?Math.abs(n-s._leader.position)<this.restDelta&&Math.abs(s._leader.velocity)<this.restSpeed&&i:i}}const ht=.01,mt=500,ut=10;class yt{constructor(t){S(this,"acceleration");S(this,"resistance");S(this,"resistanceType");S(this,"min");S(this,"max");S(this,"bounceStiffness");S(this,"bounceDamping");S(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??mt,this.bounceDamping=t.bounceDamping??ut,this.restDelta=t.restDelta??ht}step(t,n,s){const i=Math.min(s,.033),{acceleration:a,resistance:o,resistanceType:l,min:c,max:r}=this,{position:p,velocity:d}=t,h=c!==void 0&&p<c,y=r!==void 0&&p>r;let f;if(h||y){const w=p-(h?c:r),x=-this.bounceStiffness*w,A=-this.bounceDamping*d;f=x+A}else{const $=n>p?1:-1;let w;l==="linear"?w=o*d:w=o*d*Math.abs(d),f=$*a-w}const u=d+f*i;let g=p+u*i;if(!h&&!y){const $=n>p?1:-1;($>0&&g>n||$<0&&g<n)&&(g=n)}return{position:g,velocity:g===n?0:u}}isSettled(t,n){return Math.abs(n-t.position)<this.restDelta}}class b{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 yt({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 s=n.doubleSpring;let i;return typeof s=="number"?i=s:typeof s=="object"&&(i={stiffness:s.stiffness,damping:s.damping}),new ft({stiffness:n.stiffness,damping:n.damping,follower:i,restDelta:n.restDelta,restSpeed:n.restSpeed})}return new L({stiffness:n.stiffness,damping:n.damping,restDelta:n.restDelta,restSpeed:n.restSpeed})}static fromSpring(t){return b.from({spring:t})}}class gt{constructor(t){S(this,"durationSec");this.durationSec=Math.max(1/60,t.durationSec)}step(t,n,s){const i=n-t.position;if(i===0)return t;const a=Math.sign(i),o=Math.abs(i)/this.durationSec,l=a*o*s,c=t.position+l;return(a>0?c>=n:c<=n)?{position:n,velocity:0}:{position:c,velocity:a*o}}isSettled(t,n){return Math.abs(t.position-n)<m.POSITION_THRESHOLD}}const bt={spring:{stiffness:200,damping:22}},wt=10,St="horizontal",$t="#000000";function X(e,t,n,s,i,a){window.getComputedStyle(e).position==="static"&&(e.style.position="relative");const l=document.createElement("div");l.style.cssText=`
1
+ "use strict";var wt=Object.defineProperty;var St=(e,t,n)=>t in e?wt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var $=(e,t,n)=>St(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("./multi-animation-Dw2JTJI2.cjs");function C(e,t){const n=[];for(let s=0;s<e.length;s++)for(let o=s+1;o<e.length;o++){const r=e[s],i=e[o];!r||!i||n.push({from:r,to:i,transition:t(),symmetric:!0})}return n}function pt(e,t){return[{from:e.exit,to:e.enter,transition:t("enter")},{from:e.enter,to:e.exit,transition:t("exit")}]}function N(e,t,n){const s=[];for(let o=0;o<e.length;o++)for(let r=o+1;r<e.length;r++){const i=e[o],l=e[r];!i||!l||s.push({from:i,to:l,transition:n(t.forward)},{from:l,to:i,transition:n(t.backward)})}return s}class L{constructor(t){$(this,"omega");$(this,"zeta");$(this,"restDelta");$(this,"restSpeed");const{stiffness:n,damping:s}=t,o=1;this.omega=Math.sqrt(n/o),this.zeta=s/(2*Math.sqrt(n*o)),this.restDelta=t.restDelta??h.POSITION_THRESHOLD,this.restSpeed=t.restSpeed??h.VELOCITY_THRESHOLD}step(t,n,s){const o=Math.min(s,.033),{omega:r,zeta:i}=this,{position:l,velocity:c}=t,a=-2*o*i*r*c,p=o*r*r*(n-l),d=c+a+p;return{position:l+o*d,velocity:d}}isSettled(t,n){const s=Math.abs(n-t.position),o=Math.abs(t.velocity);return s<this.restDelta&&o<this.restSpeed}}class $t{constructor(t){$(this,"leader");$(this,"follower");$(this,"restDelta");$(this,"restSpeed");this.restDelta=t.restDelta??h.POSITION_THRESHOLD,this.restSpeed=t.restSpeed??h.VELOCITY_THRESHOLD,this.leader=new L({stiffness:t.stiffness,damping:t.damping,restDelta:this.restDelta,restSpeed:this.restSpeed});let n,s,o,r;typeof t.follower=="number"?(n=t.stiffness*t.follower,s=t.damping):t.follower?(n=t.follower.stiffness,s=t.follower.damping,o=t.follower.restDelta,r=t.follower.restSpeed):(n=t.stiffness,s=t.damping),this.follower=new L({stiffness:n,damping:s,restDelta:o??this.restDelta,restSpeed:r??this.restSpeed})}step(t,n,s){const r=t._leader??{position:t.position,velocity:t.velocity},i=this.leader.step(r,n,s),l=this.follower.step(t,i.position,s);return{position:l.position,velocity:l.velocity,_leader:i}}isSettled(t,n){const s=t,o=Math.abs(n-t.position)<this.restDelta&&Math.abs(t.velocity)<this.restSpeed;return s._leader?Math.abs(n-s._leader.position)<this.restDelta&&Math.abs(s._leader.velocity)<this.restSpeed&&o:o}}const xt=.01,Et=500,Ct=10;class At{constructor(t){$(this,"acceleration");$(this,"resistance");$(this,"resistanceType");$(this,"min");$(this,"max");$(this,"bounceStiffness");$(this,"bounceDamping");$(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??Et,this.bounceDamping=t.bounceDamping??Ct,this.restDelta=t.restDelta??xt}step(t,n,s){const o=Math.min(s,.033),{acceleration:r,resistance:i,resistanceType:l,min:c,max:a}=this,{position:p,velocity:d}=t,u=c!==void 0&&p<c,y=a!==void 0&&p>a;let f;if(u||y){const S=p-(u?c:a),x=-this.bounceStiffness*S,E=-this.bounceDamping*d;f=x+E}else{const w=n>p?1:-1;let S;l==="linear"?S=i*d:S=i*d*Math.abs(d),f=w*r-S}const m=d+f*o;let g=p+m*o;if(!u&&!y){const w=n>p?1:-1;(w>0&&g>n||w<0&&g<n)&&(g=n)}return{position:g,velocity:g===n?0:m}}isSettled(t,n){return Math.abs(n-t.position)<this.restDelta}}class b{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 At({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 s=n.doubleSpring;let o;return typeof s=="number"?o=s:typeof s=="object"&&(o={stiffness:s.stiffness,damping:s.damping}),new $t({stiffness:n.stiffness,damping:n.damping,follower:o,restDelta:n.restDelta,restSpeed:n.restSpeed})}return new L({stiffness:n.stiffness,damping:n.damping,restDelta:n.restDelta,restSpeed:n.restSpeed})}static fromSpring(t){return b.from({spring:t})}}class Pt{constructor(t){$(this,"durationSec");this.durationSec=Math.max(1/60,t.durationSec)}step(t,n,s){const o=n-t.position;if(o===0)return t;const r=Math.sign(o),i=Math.abs(o)/this.durationSec,l=r*i*s,c=t.position+l;return(r>0?c>=n:c<=n)?{position:n,velocity:0}:{position:c,velocity:r*i}}isSettled(t,n){return Math.abs(t.position-n)<h.POSITION_THRESHOLD}}const j=8,q={spring:{stiffness:1e3,damping:40,doubleSpring:1.2}};function Tt({direction:e}){const t=e==="forward"?j:-j;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 vt(){return{outPhysics:q,inPhysics:q,composition:{mode:"parallel",startAt:[0,0]},build:Tt}}const G=30,Dt={inertia:{acceleration:150,resistance:1.5}},Ot={spring:{stiffness:180,damping:34}};function It({direction:e}){const t=e==="forward"?1:-1,n=-G*t,s=G*t;return{out:{willChange:"transform, opacity",startStyle:{},animate:o=>({transform:`translate3d(${n*o}px, 0, 0)`,opacity:`${1-o}`})},in:{willChange:"transform, opacity",startStyle:{transform:`translate3d(${s}px, 0, 0)`,opacity:"0"},animate:o=>({transform:`translate3d(${s*(1-o)}px, 0, 0)`,opacity:`${o}`})}}}function _t(){return{outPhysics:Dt,inPhysics:Ot,composition:{mode:"sequence"},build:It}}const kt={snappy:vt(),fluid:_t()},K={spring:{stiffness:2400,damping:65,doubleSpring:.7}},I=8;function Lt({direction:e}){const t=e==="forward"?-I:I,n=e==="forward"?I:-I;return{out:{willChange:"transform, opacity",startStyle:{},animate:s=>({transform:`translate3d(0, ${t*s}px, 0)`,opacity:`${1-s}`})},in:{willChange:"transform, opacity",startStyle:{transform:`translate3d(0, ${n}px, 0)`,opacity:"0"},animate:s=>({transform:`translate3d(0, ${n*(1-s)}px, 0)`,opacity:`${s}`})}}}function Ft(){return{outPhysics:K,inPhysics:K,composition:{mode:"parallel",startAt:[0,.3]},build:Lt}}const R={spring:{stiffness:280,damping:30}},_=.05;function Yt(){return{out:{willChange:"transform, opacity",startStyle:{},animate:e=>({transform:`scale(${1+e*_})`,opacity:`${1-e}`})},in:{willChange:"transform, opacity",startStyle:{transform:`scale(${1-_})`,opacity:"0"},animate:e=>({transform:`scale(${1-_+e*_})`,opacity:`${e}`})}}}function Mt(){return{outPhysics:R,inPhysics:R,composition:{mode:"parallel"},build:Yt}}const Ht=Ft(),Wt=Mt(),zt={x:kt,y:{snappy:Ht},z:{snappy:Wt}};function Ut(e,t){const n=zt[e];return n[t]??n.snappy}const Xt="x",Vt="snappy";function J(e,t){e.style.willChange=t.willChange,e.style.backfaceVisibility="hidden",e.style.contain="layout paint";for(const[n,s]of Object.entries(t.startStyle))e.style[n]=s}function Bt(e){e.style.willChange="auto",e.style.backfaceVisibility="",e.style.contain="",e.style.transform="",e.style.opacity=""}const Nt=(e={})=>{const t=e.direction??"forward",n=e.type??Xt,s=e.feel??Vt,o=Ut(n,s),r=o.build({direction:t});return{prepare:({from:i,to:l})=>(i.then(c=>{J(c,r.out),c.style.pointerEvents="none"}),l.then(c=>{J(c,r.in)}),{}),animation:({from:i,to:l})=>{const c=new h.WebAnimation({element:i,integrator:b.from(o.outPhysics),style:p=>r.out.animate(p)}),a=new h.WebAnimation({element:l,integrator:b.from(o.inPhysics),style:p=>r.in.animate(p),onComplete:()=>Bt(l)});return new h.MultiAnimation([c,a],o.composition)}}};function Zt(e,t,n){return e!=="x"||t==="snappy"||n==="snappy"?"snappy":"fluid"}function jt(e){const{paths:t}=e,n=e.type??"x",s=e.variant,o=e.feel,r=Zt(n,s,o);return N(t,{forward:"forward",backward:"backward"},i=>Nt({type:n,direction:i,feel:r}))}const qt={spring:{stiffness:200,damping:22}},Gt=10,Kt="horizontal",Rt="#000000";function Q(e,t,n,s,o,r){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;
@@ -7,29 +7,29 @@
7
7
  pointer-events: none;
8
8
  z-index: 9999;
9
9
  overflow: hidden;
10
- `;const c=[];for(let r=0;r<t;r++){const p=document.createElement("div");if(n==="horizontal"){const d=100/t;p.style.cssText=`
10
+ `;const c=[];for(let a=0;a<t;a++){const p=document.createElement("div");if(n==="horizontal"){const d=100/t;p.style.cssText=`
11
11
  position: absolute;
12
- top: ${d*r}%;
12
+ top: ${d*a}%;
13
13
  left: 0;
14
14
  width: 100%;
15
15
  height: calc(${d}% + 1px);
16
16
  background: ${s};
17
- transform: scaleX(${i==="hidden"?0:1});
18
- transform-origin: ${a} center;
17
+ transform: scaleX(${o==="hidden"?0:1});
18
+ transform-origin: ${r} center;
19
19
  will-change: transform;
20
20
  `}else{const d=100/t;p.style.cssText=`
21
21
  position: absolute;
22
22
  top: 0;
23
- left: ${d*r}%;
23
+ left: ${d*a}%;
24
24
  width: calc(${d}% + 1px);
25
25
  height: 100%;
26
26
  background: ${s};
27
- transform: scaleY(${i==="hidden"?0:1});
28
- transform-origin: ${a==="left"?"top":"bottom"} center;
27
+ transform: scaleY(${o==="hidden"?0:1});
28
+ transform-origin: ${r==="left"?"top":"bottom"} center;
29
29
  will-change: transform;
30
- `}c.push(p),l.appendChild(p)}return e.appendChild(l),{container:l,blinds:c}}const xt=(e={})=>{const t=e.blindCount??wt,n=e.direction??St,s=e.blindColor??$t,i=e.physics??bt;return{prepare:async({from:a,to:o})=>{const l=await a,c=await o;l.style.zIndex="1000";const r=X(l,t,n,s,"hidden","left");c.style.position="relative",c.style.zIndex="0";const p=X(c,t,n,s,"closed","right");return{fromBlinds:r.blinds,fromContainer:r.container,toBlinds:p.blinds,toContainer:p.container}},animation:({fromBlinds:a,fromContainer:o,toBlinds:l,toContainer:c})=>{const r=a.map(y=>new m.WebAnimation({element:y,integrator:b.from(i),style:f=>({transform:n==="horizontal"?`scaleX(${f})`:`scaleY(${f})`})})),p=l.map((y,f)=>new m.WebAnimation({element:y,integrator:b.from(i),style:(u,g)=>({transform:n==="horizontal"?`scaleX(${g})`:`scaleY(${g})`}),onComplete:f===l.length-1?()=>{c.remove(),o.remove()}:void 0})),d=new m.MultiAnimation(r,{mode:"parallel"}),h=new m.MultiAnimation(p,{mode:"parallel"});return new m.MultiAnimation([d,h],{mode:"sequence"})}}};function At({paths:e}){return C(e,()=>xt())}const Ct={spring:{stiffness:200,damping:20,doubleSpring:.7}},D=.5;function Et(e){const t=e==="enter"?-100:100,n=e==="enter"?100:-100;return{out:{willChange:"transform, opacity",startStyle:{},animate:s=>({transform:`translate3d(${t*s}%, 0, 0)`,opacity:`${D+(1-D)*(1-s)}`})},in:{willChange:"transform, opacity",startStyle:{transform:`translate3d(${n}%, 0, 0)`,opacity:`${D}`},animate:s=>({transform:`translate3d(${n*(1-s)}%, 0, 0)`,opacity:`${D+(1-D)*s}`})}}}function Pt(){return{physics:Ct,build:Et}}const Dt={spring:{stiffness:170,damping:22}};function Ot(e){const t=e==="enter"?-20:100,n=e==="enter"?100:-20;return{out:{willChange:"transform",startStyle:{},animate:s=>({transform:`translate3d(${t*s}%, 0, 0)`})},in:{willChange:"transform",startStyle:{transform:`translate3d(${n}%, 0, 0)`},animate:s=>({transform:`translate3d(${n*(1-s)}%, 0, 0)`})}}}function Tt(){return{physics:Dt,build:Ot}}const It={parallax:Tt(),crossfade:Pt()},_t="parallax";function B(e,t){e.style.willChange=t.willChange,e.style.backfaceVisibility="hidden",e.style.contain="layout paint";for(const[n,s]of Object.entries(t.startStyle))e.style[n]=s}const Lt=(e={})=>{const t=e.direction??"enter",n=It[e.type??_t],s=n.physics,i=n.build(t);return{prepare:({from:a,to:o})=>(a.then(l=>{B(l,i.out),l.style.pointerEvents="none",l.style.zIndex=t==="enter"?"-1":"100"}),o.then(l=>{B(l,i.in)}),{}),animation:({from:a,to:o})=>{const l=new m.WebAnimation({element:a,integrator:b.from(s),style:r=>i.out.animate(r)}),c=new m.WebAnimation({element:o,integrator:b.from(s),style:r=>i.in.animate(r),onComplete:()=>{o.style.willChange="auto",o.style.backfaceVisibility="",o.style.contain="",o.style.transform="",o.style.opacity=""}});return new m.MultiAnimation([l,c],{mode:"parallel"})}}};function kt({type:e,...t}){return tt(t,n=>Lt({direction:n,type:e}))}const vt={spring:{stiffness:180,damping:20,doubleSpring:!0}},Mt={spring:{stiffness:170,damping:20,doubleSpring:!0}},Yt=(e={})=>{const t=e.physics??Mt,n=e.physics??vt;return{prepare:({to:s})=>(s.then(i=>{i.style.opacity="0",i.style.willChange="opacity"}),{}),animation:({from:s,to:i})=>{const a=new m.WebAnimation({element:s,integrator:b.from(n),style:(l,c)=>({opacity:c}),onComplete:()=>{s.style.willChange="auto"}}),o=new m.WebAnimation({element:i,integrator:b.from(t),style:l=>({opacity:l}),onComplete:()=>{i.style.willChange="auto",i.style.opacity=""}});return new m.MultiAnimation([a,o],{mode:"sequence"})}}};function Ft({paths:e}){return C(e,()=>Yt())}function P(e,t){function n(a){let o=0,l=0;const c=a.offsetWidth,r=a.offsetHeight;let p=a;for(;p;)o+=p.offsetTop,l+=p.offsetLeft,p=p.offsetParent;return o-=window.scrollY,l-=window.scrollX,{top:o,left:l,width:c,height:r}}const s=n(e),i=n(t);return new DOMRect(i.left-s.left,i.top-s.top,i.width,i.height)}function O(e,t){const{scrollingElement:n,positionedParent:s}=e,i=n!==s&&n.contains(s)?P(n,s).top:0;return{top:e[t].scroll.y,left:0,width:n.clientWidth,height:n.clientHeight-i}}const Y={scaleDown:{stiffness:20,damping:7},translate:{stiffness:15,damping:7},scaleUp:{stiffness:20,damping:7}},E={scaleDown:0,translate:.2,scaleUp:.8},Ht=.8,Wt="white",N=1e3/60,zt=600;function Ut(e){const{items:t,from:n,to:s,recordFrame:i}=e,a=N/1e3,o=Math.abs(s-n),l=t.map(r=>({item:r,integrator:new L({stiffness:r.spring.stiffness,damping:r.spring.damping}),state:{position:n,velocity:0},started:!1,settled:!1,settleTime:0}));for(let r=0;r<l.length;r++)(r===0||l[r].item.offset===0)&&(l[r].started=!0);i(0);let c=0;for(let r=1;r<=zt;r++){const p=r*N;c=p;for(const d of l)!d.started||d.settled||(d.state=d.integrator.step(d.state,s,a),d.integrator.isSettled(d.state,s)?(d.settleTime+=a,d.settleTime>=m.SETTLE_THRESHOLD&&(d.state={position:s,velocity:0},d.settled=!0)):d.settleTime=0,d.item.tick(d.state.position));for(let d=1;d<l.length;d++){const h=l[d];if(h.started)continue;const y=l[d-1];if(!y.started)continue;(o===0?1:Math.abs(y.state.position-n)/o)>=h.item.offset&&(h.started=!0)}if(i(p),l.every(d=>d.settled))return p}return c}function F(e,t){return e!=null&&e.spring?{stiffness:e.spring.stiffness,damping:e.spring.damping}:t}function Z(e){const{rect:t,scale:n,direction:s,override:i}=e,a=s==="out"?{scale:1,translateY:-t.top}:{scale:n,translateY:-t.top+t.height},o=F(i,Y.scaleDown),l=F(i,Y.translate),c=F(i,Y.scaleUp),r=s==="out"?1:0,p=s==="out"?0:1,d=s==="out"?[{spring:o,offset:E.scaleDown,tick:f=>{const u=1-f;a.scale=1-(1-n)*u}},{spring:l,offset:E.translate,tick:f=>{const u=1-f;a.translateY=-t.top-t.height*u}},{spring:c,offset:E.scaleUp,tick:f=>{const u=1-f;a.scale=n+(1-n)*u}}]:[{spring:o,offset:E.scaleDown,tick:f=>{a.scale=1-(1-n)*f}},{spring:l,offset:E.translate,tick:f=>{a.translateY=-t.top+t.height*(1-f)}},{spring:c,offset:E.scaleUp,tick:f=>{a.scale=n+(1-n)*f}}],h=[],y=Ut({items:d,from:r,to:p,recordFrame:f=>h.push({time:f,scale:a.scale,translateY:a.translateY})});return{snapshots:h,totalDuration:y}}function Vt(e,t){if(e.length===0)return{time:0,scale:1,translateY:0};if(e.length===1||t<=0)return e[0];if(t>=1)return e[e.length-1];const n=t*(e.length-1),s=Math.floor(n),i=Math.ceil(n);if(s===i)return e[s];const a=e[s],o=e[i],l=n-s;return{time:a.time+(o.time-a.time)*l,scale:a.scale+(o.scale-a.scale)*l,translateY:a.translateY+(o.translateY-a.translateY)*l}}const Xt=[[1,1],[-1,1],[1,-1],[-1,-1]];function Bt(e,t){const i=(a,o,l)=>{const c=document.createElement("div");Object.assign(c.style,{position:"fixed",pointerEvents:"none",zIndex:"9999",width:"15px",height:"15px",...a});const r=document.createElement("div");Object.assign(r.style,{position:"absolute",width:"15px",height:"1px",backgroundColor:e,[l]:"0",[o]:"0"});const p=document.createElement("div");return Object.assign(p.style,{position:"absolute",width:"1px",height:"15px",backgroundColor:e,[l]:"0",[o]:"0"}),c.appendChild(r),c.appendChild(p),c};return{topLeft:i({top:`${t.top-1}px`,left:`${t.left-1}px`},"left","top"),topRight:i({top:`${t.top-1}px`,left:`${t.left+t.width-15+1}px`},"right","top"),bottomLeft:i({top:`${t.top+t.height-15+1}px`,left:`${t.left-1}px`},"left","bottom"),bottomRight:i({top:`${t.top+t.height-15+1}px`,left:`${t.left+t.width-15+1}px`},"right","bottom")}}function q(e,t){const n=t.left+t.width/2,s=t.top+t.height/2;e.style.transformOrigin=`${n}px ${s}px`}function j(e,t){e.style.clipPath=`polygon(
30
+ `}c.push(p),l.appendChild(p)}return e.appendChild(l),{container:l,blinds:c}}const Jt=(e={})=>{const t=e.blindCount??Gt,n=e.direction??Kt,s=e.blindColor??Rt,o=e.physics??qt;return{prepare:async({from:r,to:i})=>{const l=await r,c=await i;l.style.zIndex="1000";const a=Q(l,t,n,s,"hidden","left");c.style.position="relative",c.style.zIndex="0";const p=Q(c,t,n,s,"closed","right");return{fromBlinds:a.blinds,fromContainer:a.container,toBlinds:p.blinds,toContainer:p.container}},animation:({fromBlinds:r,fromContainer:i,toBlinds:l,toContainer:c})=>{const a=r.map(y=>new h.WebAnimation({element:y,integrator:b.from(o),style:f=>({transform:n==="horizontal"?`scaleX(${f})`:`scaleY(${f})`})})),p=l.map((y,f)=>new h.WebAnimation({element:y,integrator:b.from(o),style:(m,g)=>({transform:n==="horizontal"?`scaleX(${g})`:`scaleY(${g})`}),onComplete:f===l.length-1?()=>{c.remove(),i.remove()}:void 0})),d=new h.MultiAnimation(a,{mode:"parallel"}),u=new h.MultiAnimation(p,{mode:"parallel"});return new h.MultiAnimation([d,u],{mode:"sequence"})}}};function Qt(e){const{paths:t,type:n="horizontal"}=e;return C(t,()=>Jt({direction:n}))}const te={spring:{stiffness:200,damping:20,doubleSpring:.7}},T=.5;function ee(e){const t=e==="enter"?-100:100,n=e==="enter"?100:-100;return{out:{willChange:"transform, opacity",startStyle:{},animate:s=>({transform:`translate3d(${t*s}%, 0, 0)`,opacity:`${T+(1-T)*(1-s)}`})},in:{willChange:"transform, opacity",startStyle:{transform:`translate3d(${n}%, 0, 0)`,opacity:`${T}`},animate:s=>({transform:`translate3d(${n*(1-s)}%, 0, 0)`,opacity:`${T+(1-T)*s}`})}}}function ne(){return{physics:te,build:ee}}const se={spring:{stiffness:170,damping:22}};function oe(e){const t=e==="enter"?-20:100,n=e==="enter"?100:-20;return{out:{willChange:"transform",startStyle:{},animate:s=>({transform:`translate3d(${t*s}%, 0, 0)`})},in:{willChange:"transform",startStyle:{transform:`translate3d(${n}%, 0, 0)`},animate:s=>({transform:`translate3d(${n*(1-s)}%, 0, 0)`})}}}function ie(){return{physics:se,build:oe}}const re={parallax:ie(),crossfade:ne()},ae="parallax";function tt(e,t){e.style.willChange=t.willChange,e.style.backfaceVisibility="hidden",e.style.contain="layout paint";for(const[n,s]of Object.entries(t.startStyle))e.style[n]=s}const le=(e={})=>{const t=e.direction??"enter",n=re[e.type??ae],s=n.physics,o=n.build(t);return{prepare:({from:r,to:i})=>(r.then(l=>{tt(l,o.out),l.style.pointerEvents="none",l.style.zIndex=t==="enter"?"-1":"100"}),i.then(l=>{tt(l,o.in)}),{}),animation:({from:r,to:i})=>{const l=new h.WebAnimation({element:r,integrator:b.from(s),style:a=>o.out.animate(a)}),c=new h.WebAnimation({element:i,integrator:b.from(s),style:a=>o.in.animate(a),onComplete:()=>{i.style.willChange="auto",i.style.backfaceVisibility="",i.style.contain="",i.style.transform="",i.style.opacity=""}});return new h.MultiAnimation([l,c],{mode:"parallel"})}}};function ce(e){return e==="slide"||e==="crossfade"?"crossfade":"parallax"}function pe(e){const{enter:t,exit:n}=e,s=e.type,o=ce(s);return pt({enter:t,exit:n},r=>le({direction:r,type:o}))}const de={spring:{stiffness:180,damping:20,doubleSpring:!0}},fe={spring:{stiffness:170,damping:20,doubleSpring:!0}},me=(e={})=>{const t=e.physics??fe,n=e.physics??de;return{prepare:({to:s})=>(s.then(o=>{o.style.opacity="0",o.style.willChange="opacity"}),{}),animation:({from:s,to:o})=>{const r=new h.WebAnimation({element:s,integrator:b.from(n),style:(l,c)=>({opacity:c}),onComplete:()=>{s.style.willChange="auto"}}),i=new h.WebAnimation({element:o,integrator:b.from(t),style:l=>({opacity:l}),onComplete:()=>{o.style.willChange="auto",o.style.opacity=""}});return new h.MultiAnimation([r,i],{mode:"sequence"})}}};function ue(e){const{paths:t}=e;return C(t,()=>me())}function P(e,t){function n(r){let i=0,l=0;const c=r.offsetWidth,a=r.offsetHeight;let p=r;for(;p;)i+=p.offsetTop,l+=p.offsetLeft,p=p.offsetParent;return i-=window.scrollY,l-=window.scrollX,{top:i,left:l,width:c,height:a}}const s=n(e),o=n(t);return new DOMRect(o.left-s.left,o.top-s.top,o.width,o.height)}function v(e,t){const{scrollingElement:n,positionedParent:s}=e,o=n!==s&&n.contains(s)?P(n,s).top:0;return{top:e[t].scroll.y,left:0,width:n.clientWidth,height:n.clientHeight-o}}const H={scaleDown:{stiffness:20,damping:7},translate:{stiffness:15,damping:7},scaleUp:{stiffness:20,damping:7}},A={scaleDown:0,translate:.2,scaleUp:.8},he=.8,ye="white",et=1e3/60,ge=600;function be(e){const{items:t,from:n,to:s,recordFrame:o}=e,r=et/1e3,i=Math.abs(s-n),l=t.map(a=>({item:a,integrator:new L({stiffness:a.spring.stiffness,damping:a.spring.damping}),state:{position:n,velocity:0},started:!1,settled:!1,settleTime:0}));for(let a=0;a<l.length;a++)(a===0||l[a].item.offset===0)&&(l[a].started=!0);o(0);let c=0;for(let a=1;a<=ge;a++){const p=a*et;c=p;for(const d of l)!d.started||d.settled||(d.state=d.integrator.step(d.state,s,r),d.integrator.isSettled(d.state,s)?(d.settleTime+=r,d.settleTime>=h.SETTLE_THRESHOLD&&(d.state={position:s,velocity:0},d.settled=!0)):d.settleTime=0,d.item.tick(d.state.position));for(let d=1;d<l.length;d++){const u=l[d];if(u.started)continue;const y=l[d-1];if(!y.started)continue;(i===0?1:Math.abs(y.state.position-n)/i)>=u.item.offset&&(u.started=!0)}if(o(p),l.every(d=>d.settled))return p}return c}function W(e,t){return e!=null&&e.spring?{stiffness:e.spring.stiffness,damping:e.spring.damping}:t}function nt(e){const{rect:t,scale:n,direction:s,override:o}=e,r=s==="out"?{scale:1,translateY:-t.top}:{scale:n,translateY:-t.top+t.height},i=W(o,H.scaleDown),l=W(o,H.translate),c=W(o,H.scaleUp),a=s==="out"?1:0,p=s==="out"?0:1,d=s==="out"?[{spring:i,offset:A.scaleDown,tick:f=>{const m=1-f;r.scale=1-(1-n)*m}},{spring:l,offset:A.translate,tick:f=>{const m=1-f;r.translateY=-t.top-t.height*m}},{spring:c,offset:A.scaleUp,tick:f=>{const m=1-f;r.scale=n+(1-n)*m}}]:[{spring:i,offset:A.scaleDown,tick:f=>{r.scale=1-(1-n)*f}},{spring:l,offset:A.translate,tick:f=>{r.translateY=-t.top+t.height*(1-f)}},{spring:c,offset:A.scaleUp,tick:f=>{r.scale=n+(1-n)*f}}],u=[],y=be({items:d,from:a,to:p,recordFrame:f=>u.push({time:f,scale:r.scale,translateY:r.translateY})});return{snapshots:u,totalDuration:y}}function we(e,t){if(e.length===0)return{time:0,scale:1,translateY:0};if(e.length===1||t<=0)return e[0];if(t>=1)return e[e.length-1];const n=t*(e.length-1),s=Math.floor(n),o=Math.ceil(n);if(s===o)return e[s];const r=e[s],i=e[o],l=n-s;return{time:r.time+(i.time-r.time)*l,scale:r.scale+(i.scale-r.scale)*l,translateY:r.translateY+(i.translateY-r.translateY)*l}}const Se=[[1,1],[-1,1],[1,-1],[-1,-1]];function $e(e,t){const o=(r,i,l)=>{const c=document.createElement("div");Object.assign(c.style,{position:"fixed",pointerEvents:"none",zIndex:"9999",width:"15px",height:"15px",...r});const a=document.createElement("div");Object.assign(a.style,{position:"absolute",width:"15px",height:"1px",backgroundColor:e,[l]:"0",[i]:"0"});const p=document.createElement("div");return Object.assign(p.style,{position:"absolute",width:"1px",height:"15px",backgroundColor:e,[l]:"0",[i]:"0"}),c.appendChild(a),c.appendChild(p),c};return{topLeft:o({top:`${t.top-1}px`,left:`${t.left-1}px`},"left","top"),topRight:o({top:`${t.top-1}px`,left:`${t.left+t.width-15+1}px`},"right","top"),bottomLeft:o({top:`${t.top+t.height-15+1}px`,left:`${t.left-1}px`},"left","bottom"),bottomRight:o({top:`${t.top+t.height-15+1}px`,left:`${t.left+t.width-15+1}px`},"right","bottom")}}function st(e,t){const n=t.left+t.width/2,s=t.top+t.height/2;e.style.transformOrigin=`${n}px ${s}px`}function ot(e,t){e.style.clipPath=`polygon(
31
31
  ${t.left}px ${t.top}px,
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 H(e,t,n,s,i){const a=n/1e3;return new m.WebAnimation({element:e,integrator:new gt({durationSec:a}),lowerBound:0,upperBound:1,style:o=>s(Vt(t,o)),onComplete:i})}const Nt=(e={})=>{var i;const t=((i=e.border)==null?void 0:i.color)??Wt,n=Ht,s=e.physics;return{prepare:({from:a,to:o,context:l})=>{const c=O(l,"from"),r=O(l,"to"),p=P(document.body,l.positionedParent),d=Bt(t,{...c,top:p.top});for(const h of["topLeft","topRight","bottomLeft","bottomRight"])l.positionedParent.appendChild(d[h]);return a.then(h=>{q(h,c),j(h,c),h.style.transform=`translateY(${-c.top}px)`}),o.then(h=>{q(h,r),j(h,r),h.style.transform=`translateY(${-r.top+r.height}px) scale(${n})`}),{borders:d,fromRect:c,toRect:r}},animation:({from:a,to:o,context:l,borders:c,fromRect:r,toRect:p})=>{const d=Z({rect:r,scale:n,direction:"out",override:s}),h=Z({rect:p,scale:n,direction:"in",override:s}),y=H(a,d.snapshots,d.totalDuration,w=>({transform:`translateY(${w.translateY}px) scale(${w.scale})`}),()=>{a.style.clipPath="",a.style.transformOrigin=""}),f=H(o,h.snapshots,h.totalDuration,w=>({transform:`translateY(${w.translateY}px) scale(${w.scale})`}),()=>{o.style.clipPath="",o.style.transformOrigin="",o.style.transform=""}),u=Xt.map(([w,x],A)=>{const k=["topLeft","topRight","bottomLeft","bottomRight"][A];return H(c[k],d.snapshots,d.totalDuration,T=>{const v=(r.width-r.width*T.scale)/2*.7*w,M=(r.height-r.height*T.scale)/2*.7*x;return{transform:`translate(${v}px, ${M}px)`}})}),g=new m.MultiAnimation([y,f,...u],{mode:"parallel"}),$=g.onComplete;return g.onComplete=()=>{$==null||$();const w=l.positionedParent;for(const x of["topLeft","topRight","bottomLeft","bottomRight"]){const A=c[x];A.parentElement===w&&w.removeChild(A)}},g}}};function Zt({paths:e}){return C(e,()=>Nt())}const qt={spring:{stiffness:300,damping:30}};function jt(e,t){return e.querySelector(`[data-hero-key="${t}"]`)}const Gt=(e={})=>{const t=e.physics??qt,n=e.maxDistance??700;return{prepare:({from:s})=>(s.then(i=>{i.style.opacity="0"}),{}),animation:({from:s,to:i,context:a})=>{const o=s,l=i,c=Array.from(l.querySelectorAll("[data-hero-key]")),r=[];for(const f of c){const u=f.getAttribute("data-hero-key");if(!u)continue;const g=jt(o,u);g&&r.push({key:u,fromEl:g,toEl:f})}if(r.length===0)return new m.MultiAnimation([],{mode:"parallel"});const p=[],d=[];for(const{fromEl:f,toEl:u}of r){const g=P(o,f),$=P(l,u),w=g.left-$.left-a.scrollOffset.x,x=g.top-$.top-a.scrollOffset.y,A=g.width/$.width,k=g.height/$.height;if(Math.abs(x)>n)continue;const T=u.style.transform,v=u.style.position,M=u.style.transformOrigin,it=u.style.zIndex,ot=u.style.willChange;u.style.position="relative",u.style.transformOrigin="top left",u.style.zIndex="1000",u.style.willChange="transform",p.push(new m.WebAnimation({element:u,integrator:b.from(t),style:(V,I)=>{const rt=I*w,at=I*x,lt=V+I*A,ct=V+I*k;return{transform:`translate(${rt}px, ${at}px) scale(${lt}, ${ct})`}}})),d.push(()=>{u.style.transform=T,u.style.position=v,u.style.transformOrigin=M,u.style.zIndex=it,u.style.willChange=ot})}const h=new m.MultiAnimation(p,{mode:"parallel"}),y=h.onComplete;return h.onComplete=()=>{for(const f of d)f();y==null||y()},h}}};function Kt({paths:e}){return C(e,()=>Gt())}const Jt={spring:{stiffness:50,damping:30}},Qt={spring:{stiffness:80,damping:25}},Rt=(e={})=>{const t=e.physics??Jt,n=e.initialRotation??45,s=e.initialScale??.01,i=e.rotationTriggerPoint??.8;return{prepare:({from:a,to:o,context:l})=>(a.then(c=>{c.style.opacity="1"}),o.then(c=>{const r=O(l,"to"),p=Math.min(r.width,r.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 d=r.left+r.width/2,h=r.top+r.height/2;c.style.transformOrigin=`${d}px ${h}px`,c.style.position="fixed",c.style.top=`${r.top}px`,c.style.left=`${r.left}px`,c.style.width=`${r.width}px`,c.style.height=`${r.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"}),{}),animation:({from:a,to:o})=>{const l=new m.WebAnimation({element:a,integrator:b.from(Qt),style:(r,p)=>({opacity:p})}),c=new m.WebAnimation({element:o,integrator:b.from(t),style:r=>{let p;if(r<=.05)p=s;else if(r<=i){const f=(r-.05)/(i-.05),u=Math.pow(f,9);p=s+(.8-s)*u}else{const f=(r-i)/(1-i);p=.8+.2*(1-Math.pow(1-f,3))}const d=.7;let h;if(r<=d)h=n;else{const f=(r-d)/(1-d),u=1-Math.pow(1-f,2);h=n*(1-u)}let y;if(r<=d)y=1;else{const f=(r-d)/(1-d);y=1-Math.pow(f,.5)}return{transform:`rotate(${h.toFixed(2)}deg) scale(${p.toFixed(4)}) translateZ(0)`,"--border-radius-scale":y.toFixed(4)}},onComplete:()=>{o.style.willChange="",o.style.backfaceVisibility="",o.style.removeProperty("--max-border-radius"),o.style.removeProperty("--border-radius-scale"),o.style.transform="",o.style.transformOrigin="",o.style.position="",o.style.zIndex="",o.style.top="",o.style.left="",o.style.width="",o.style.height="",o.style.overflow="",o.style.borderRadius=""}});return new m.MultiAnimation([l,c],{mode:"parallel"})}}};function te({paths:e}){return C(e,()=>Rt())}const ee={spring:{stiffness:100,damping:30}},ne=(e={})=>{const t=e.physics??ee;return{prepare:({from:n,to:s})=>(n.then(i=>{i.style.transformOrigin="center center",i.style.willChange="transform, opacity"}),s.then(i=>{i.style.opacity="0",i.style.transform="rotate(-180deg)",i.style.transformOrigin="center center",i.style.willChange="transform, opacity"}),{}),animation:({from:n,to:s})=>{const i=new m.WebAnimation({element:n,integrator:b.from(t),style:o=>({transform:`rotate(${o*180}deg)`,opacity:o<.5?1:0})}),a=new m.WebAnimation({element:s,integrator:b.from(t),style:(o,l)=>({transform:`rotate(${-l*180}deg)`,opacity:o>.5?1:0}),onComplete:()=>{s.style.willChange="auto",s.style.transform="",s.style.transformOrigin="",s.style.opacity=""}});return new m.MultiAnimation([i,a],{mode:"parallel"})}}};function se({paths:e}){return C(e,()=>ne())}const ie={spring:{stiffness:20,damping:8,doubleSpring:1,restDelta:.001,restSpeed:.001}},G=(e={})=>{const t=e.direction??"up",n=e.physics??ie,s=t==="up";return{prepare:({from:i,to:a})=>(i.then(o=>{o.style.zIndex=s?"-1":"1",o.style.willChange="transform",o.style.backfaceVisibility="hidden",o.style.contain="layout paint",o.style.pointerEvents="none"}),a.then(o=>{o.style.willChange="transform",o.style.backfaceVisibility="hidden",o.style.contain="layout paint"}),{}),animation:({from:i,to:a})=>{const o=i.offsetHeight,l=a.offsetHeight,c=window.innerHeight,r=Math.max(Math.min(o,l),c),p=new m.WebAnimation({element:i,integrator:b.from(n),style:h=>({transform:`translate3d(0, ${s?-r*h:r*h}px, 0)`})}),d=new m.WebAnimation({element:a,integrator:b.from(n),style:(h,y)=>({transform:`translate3d(0, ${s?y*r:y*-r}px, 0)`}),onComplete:()=>{a.style.willChange="auto",a.style.backfaceVisibility="",a.style.contain="",a.style.transform=""}});return new m.MultiAnimation([p,d],{mode:"parallel"})}}};function oe({paths:e,type:t="directional",direction:n="up"}){return t==="non-directional"?C(e,()=>G({direction:n})):et(e,{forward:"up",backward:"down"},s=>G({direction:s}))}const re={spring:{stiffness:200,damping:24}},ae={inertia:{acceleration:25,resistance:1.2}},W=.2;function le(){return{enterPhysics:re,exitPhysics:ae,background:{willChange:"transform, opacity",enterStyle:(e,t)=>({transform:`scale(${1-W*e})`,opacity:t}),exitStyle:e=>({transform:`scale(${1-W+W*e})`,opacity:e})}}}const ce={spring:{stiffness:200,damping:24}},pe={inertia:{acceleration:25,resistance:1.2}};function de(){return{enterPhysics:ce,exitPhysics:pe,background:{willChange:"",enterStyle:()=>({}),exitStyle:()=>({})}}}const fe={static:de(),"background-scale":le()},he="static",me="transform",ue=(e={})=>{const t=e.direction??"enter",n=fe[e.type??he],s=t==="enter"?n.enterPhysics:n.exitPhysics,i=n.background,a=i.willChange!=="";return{prepare:({from:o,to:l})=>{const c=t==="enter"?l:o,r=t==="enter"?o:l;return c.then(p=>{p.style.willChange=me,p.style.backfaceVisibility="hidden",p.style.contain="layout paint",t==="exit"&&(p.style.pointerEvents="none",p.style.zIndex="100")}),r.then(p=>{a&&(p.style.willChange=i.willChange,p.style.backfaceVisibility="hidden",p.style.contain="layout paint"),t==="enter"&&(p.style.pointerEvents="none",p.style.zIndex="-1")}),{}},animation:({from:o,to:l,context:c})=>{const r=t==="enter"?l:o,p=t==="enter"?o:l,d=O(c,t==="enter"?"to":"from");r.style.clipPath=`inset(${d.top}px 0 calc(100% - ${d.top+d.height}px) 0)`;const h=t==="enter"?(x,A)=>({transform:`translate3d(0, ${A*d.height}px, 0)`}):x=>({transform:`translate3d(0, ${x*d.height}px, 0)`}),y=new m.WebAnimation({element:r,integrator:b.from(s),style:h,onComplete:()=>{r.style.willChange="auto",r.style.backfaceVisibility="",r.style.contain="",r.style.clipPath="",r.style.transform=""}});if(!a)return new m.MultiAnimation([y],{mode:"parallel"});const f=O(c,t==="enter"?"from":"to"),u=f.left+f.width/2,g=f.top+f.height/2;p.style.clipPath=`inset(${f.top}px 0 calc(100% - ${f.top+f.height}px) 0)`,p.style.transformOrigin=`${u}px ${g}px`;const $=t==="enter"?(x,A)=>i.enterStyle(x,A):x=>i.exitStyle(x),w=new m.WebAnimation({element:p,integrator:b.from(s),style:$,onComplete:t==="exit"?()=>{p.style.willChange="auto",p.style.backfaceVisibility="",p.style.contain="",p.style.clipPath="",p.style.transformOrigin=""}:void 0});return new m.MultiAnimation([y,w],{mode:"parallel"})}}};function ye({type:e,...t}){return tt(t,n=>ue({direction:n,type:e}))}const ge={spring:{stiffness:170,damping:22,doubleSpring:.8}},be=(e={})=>{const t=e.direction??"left",n=e.physics??ge,s=t==="left";return{prepare:({from:i,to:a})=>(i.then(o=>{o.style.willChange="transform",o.style.backfaceVisibility="hidden",o.style.contain="layout paint",o.style.pointerEvents="none"}),a.then(o=>{const l=s?100:-100;o.style.transform=`translate3d(${l}%, 0, 0)`,o.style.willChange="transform",o.style.backfaceVisibility="hidden",o.style.contain="layout paint"}),{}),animation:({from:i,to:a})=>{const o=new m.WebAnimation({element:i,integrator:b.from(n),style:c=>({transform:`translate3d(${s?-100*c:100*c}%, 0, 0)`})}),l=new m.WebAnimation({element:a,integrator:b.from(n),style:(c,r)=>({transform:`translate3d(${s?r*100:r*-100}%, 0, 0)`}),onComplete:()=>{a.style.willChange="auto",a.style.backfaceVisibility="",a.style.contain="",a.style.transform=""}});return new m.MultiAnimation([o,l],{mode:"parallel"})}}};function we({paths:e}){return et(e,{forward:"left",backward:"right"},t=>be({direction:t}))}const Se={spring:{stiffness:17,damping:6}},z=20,_=800,$e=(e={})=>{const t=e.physics??Se;return{prepare:({from:n,to:s})=>(n.then(i=>{i.style.willChange="transform",i.style.backfaceVisibility="hidden",i.style.contain="layout paint",i.style.pointerEvents="none",i.style.transform=`perspective(${_}px) rotateY(0deg) translate3d(0%, 0, 0)`}),s.then(i=>{i.style.willChange="transform",i.style.backfaceVisibility="hidden",i.style.contain="layout paint",i.style.transform=`perspective(${_}px) rotateY(${z}deg) translate3d(-100%, 0, 0)`}),{}),animation:({from:n,to:s})=>{const i=new m.WebAnimation({element:n,integrator:b.from(t),style:o=>{const l=-o*z,c=o*100;return{transform:`perspective(${_}px) rotateY(${l}deg) translate3d(${c}%, 0, 0)`}}}),a=new m.WebAnimation({element:s,integrator:b.from(t),style:(o,l)=>{const c=l*z,r=-l*100;return{transform:`perspective(${_}px) rotateY(${c}deg) translate3d(${r}%, 0, 0)`}},onComplete:()=>{s.style.transform="",s.style.willChange="auto",s.style.backfaceVisibility="",s.style.contain=""}});return new m.MultiAnimation([i,a],{mode:"sequence"})}}};function xe({paths:e}){return C(e,()=>$e())}function nt({enterRect:e,exitRect:t,pageRect:n,scrollOffset:s}){const i=t.left-e.left+(t.width-e.width)/2-s.x,a=t.top-e.top+(t.height-e.height)/2-s.y,o=t.width/e.width,l=t.height/e.height,c=Math.max(o,l),r=e.top/n.height*100,p=(n.width-(e.left+e.width))/n.width*100,d=(n.height-(e.top+e.height))/n.height*100,h=e.left/n.width*100;return{transformOrigin:`${e.left+e.width/2}px ${e.top+e.height/2}px`,animate:y=>{const f=1-y;return{clipPath:`inset(${r*f}% ${p*f}% ${d*f}% ${h*f}%)`,transform:`translate(${i*f}px, ${a*f}px) scale(${1+(c-1)*f})`}}}}function st({enterRect:e,exitRect:t,pageRect:n,scrollOffset:s}){const i=t.left-e.left+(t.width-e.width)/2+s.x,a=t.top-e.top+(t.height-e.height)/2+s.y,o=t.width/e.width,l=t.height/e.height,c=Math.min(o,l),r=e.top/n.height*100,p=(n.width-(e.left+e.width))/n.width*100,d=(n.height-(e.top+e.height))/n.height*100,h=e.left/n.width*100;return{transformOrigin:`${e.left+e.width/2}px ${e.top+e.height/2}px`,animate:y=>{const f=1-y;return{clipPath:`inset(${r*f}% ${p*f}% ${d*f}% ${h*f}%)`,transform:`translate(${i*f-s.x}px, ${a*f}px) scale(${1+(c-1)*f})`}}}}const Ae={spring:{stiffness:340,damping:30,doubleSpring:1}};function Ce({enterRect:e,exitRect:t,scrollOffset:n}){const s=e.left-t.left+(e.width-t.width)/2+n.x,i=e.top-t.top+(e.height-t.height)/2+n.y,a=e.width/t.width,o=e.height/t.height,l=Math.max(a,o);return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:c=>{const r=1-c;return{transform:`translate(${s*r-n.x}px, ${i*r}px) scale(${1+(l-1)*r})`,opacity:`${1-r}`}}}}function Ee({enterRect:e,exitRect:t,scrollOffset:n}){const s=e.left-t.left+(e.width-t.width)/2-n.x,i=e.top-t.top+(e.height-t.height)/2-n.y,a=e.width/t.width,o=e.height/t.height,l=Math.max(a,o);return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:c=>{const r=1-c;return{transform:`translate(${s*r}px, ${i*r}px) scale(${1+(l-1)*r})`,opacity:`${c}`}}}}function Pe(){return{physics:Ae,in:nt,out:st,backgroundIn:Ee,backgroundOut:Ce}}const De={spring:{stiffness:420,damping:34}};function K(){return{transformOrigin:"",animate:()=>({})}}function Oe(){return{physics:De,in:nt,out:st,backgroundIn:()=>K(),backgroundOut:()=>K()}}const Te={expand:Pe(),static:Oe()},U="data-zoom-enter-key",J="data-zoom-exit-key";function Q(e){const t=e.querySelectorAll(`[${U}]`);return t.length!==1?null:t[0]}function R(e,t){const n=e.querySelectorAll(`[${J}]`);for(const s of n)if(s.getAttribute(J)===t)return s;return null}function Ie(e,t){const n=Q(e),s=Q(t);if(!n&&s){const i=s.getAttribute(U);if(!i)return null;const a=R(e,i);return a?{mode:"enter",enterEl:s,exitEl:a}:null}if(n&&!s){const i=n.getAttribute(U);if(!i)return null;const a=R(t,i);return a?{mode:"exit",enterEl:n,exitEl:a}:null}return null}function _e(e,t,n,s){return{enterRect:P(e.mode==="enter"?n:t,e.enterEl),exitRect:P(e.mode==="enter"?t:n,e.exitEl),pageRect:e.mode==="enter"?n.getBoundingClientRect():t.getBoundingClientRect(),scrollOffset:s}}const Le=e=>{const t=Te[e.type],n=t.physics;return{prepare:({from:s})=>(s.then(i=>{i.style.willChange="transform, clip-path, opacity",i.style.backfaceVisibility="hidden",i.style.contain="layout paint"}),{}),animation:({from:s,to:i,context:a})=>{const o=Ie(s,i);if(!o)return new m.MultiAnimation([],{mode:"parallel"});const l=_e(o,s,i,a.scrollOffset),c=o.mode==="enter"?t.in(l):t.backgroundIn(l),r=o.mode==="enter"?t.backgroundOut(l):t.out(l);c&&(i.style.transformOrigin=c.transformOrigin),r&&(s.style.transformOrigin=r.transformOrigin);const p=o.mode==="enter"?i:s,d=p.style.zIndex;p.style.zIndex="9999";const h=new m.WebAnimation({element:s,integrator:b.from(n),style:(f,u)=>r.animate(u)}),y=new m.WebAnimation({element:i,integrator:b.from(n),style:f=>c.animate(f),onComplete:()=>{i.style.willChange="auto",i.style.backfaceVisibility="",i.style.transformOrigin="",i.style.contain="",p.style.zIndex=d}});return new m.MultiAnimation([h,y],{mode:"parallel"})}}};function ke({paths:e,type:t}){return C(e,()=>Le({type:t}))}exports.Animation=m.Animation;exports.MultiAnimation=m.MultiAnimation;exports.WebAnimation=m.WebAnimation;exports.blind=At;exports.drill=kt;exports.fade=Ft;exports.film=Zt;exports.hero=Kt;exports.jaemin=te;exports.rotate=se;exports.scroll=oe;exports.sheet=ye;exports.slide=we;exports.strip=xe;exports.zoom=ke;
35
+ )`}function z(e,t,n,s,o){const r=n/1e3;return new h.WebAnimation({element:e,integrator:new Pt({durationSec:r}),lowerBound:0,upperBound:1,style:i=>s(we(t,i)),onComplete:o})}const xe=(e={})=>{var o;const t=((o=e.border)==null?void 0:o.color)??ye,n=he,s=e.physics;return{prepare:({from:r,to:i,context:l})=>{const c=v(l,"from"),a=v(l,"to"),p=P(document.body,l.positionedParent),d=$e(t,{...c,top:p.top});for(const u of["topLeft","topRight","bottomLeft","bottomRight"])l.positionedParent.appendChild(d[u]);return r.then(u=>{st(u,c),ot(u,c),u.style.transform=`translateY(${-c.top}px)`}),i.then(u=>{st(u,a),ot(u,a),u.style.transform=`translateY(${-a.top+a.height}px) scale(${n})`}),{borders:d,fromRect:c,toRect:a}},animation:({from:r,to:i,context:l,borders:c,fromRect:a,toRect:p})=>{const d=nt({rect:a,scale:n,direction:"out",override:s}),u=nt({rect:p,scale:n,direction:"in",override:s}),y=z(r,d.snapshots,d.totalDuration,S=>({transform:`translateY(${S.translateY}px) scale(${S.scale})`}),()=>{r.style.clipPath="",r.style.transformOrigin=""}),f=z(i,u.snapshots,u.totalDuration,S=>({transform:`translateY(${S.translateY}px) scale(${S.scale})`}),()=>{i.style.clipPath="",i.style.transformOrigin="",i.style.transform=""}),m=Se.map(([S,x],E)=>{const F=["topLeft","topRight","bottomLeft","bottomRight"][E];return z(c[F],d.snapshots,d.totalDuration,D=>{const Y=(a.width-a.width*D.scale)/2*.7*S,M=(a.height-a.height*D.scale)/2*.7*x;return{transform:`translate(${Y}px, ${M}px)`}})}),g=new h.MultiAnimation([y,f,...m],{mode:"parallel"}),w=g.onComplete;return g.onComplete=()=>{w==null||w();const S=l.positionedParent;for(const x of["topLeft","topRight","bottomLeft","bottomRight"]){const E=c[x];E.parentElement===S&&S.removeChild(E)}},g}}};function Ee(e){const{paths:t,options:n}=e,s=(n==null?void 0:n.borderColor)!==void 0?{border:{color:n.borderColor}}:void 0;return C(t,()=>xe(s))}const Ce={spring:{stiffness:300,damping:30}};function Ae(e,t){return e.querySelector(`[data-hero-key="${t}"]`)}const Pe=(e={})=>{const t=e.physics??Ce,n=e.maxDistance??700;return{prepare:({from:s})=>(s.then(o=>{o.style.opacity="0"}),{}),animation:({from:s,to:o,context:r})=>{const i=s,l=o,c=Array.from(l.querySelectorAll("[data-hero-key]")),a=[];for(const f of c){const m=f.getAttribute("data-hero-key");if(!m)continue;const g=Ae(i,m);g&&a.push({key:m,fromEl:g,toEl:f})}if(a.length===0)return new h.MultiAnimation([],{mode:"parallel"});const p=[],d=[];for(const{fromEl:f,toEl:m}of a){const g=P(i,f),w=P(l,m),S=g.left-w.left-r.scrollOffset.x,x=g.top-w.top-r.scrollOffset.y,E=g.width/w.width,F=g.height/w.height;if(Math.abs(x)>n)continue;const D=m.style.transform,Y=m.style.position,M=m.style.transformOrigin,mt=m.style.zIndex,ut=m.style.willChange;m.style.position="relative",m.style.transformOrigin="top left",m.style.zIndex="1000",m.style.willChange="transform",p.push(new h.WebAnimation({element:m,integrator:b.from(t),style:(Z,O)=>{const ht=O*S,yt=O*x,gt=Z+O*E,bt=Z+O*F;return{transform:`translate(${ht}px, ${yt}px) scale(${gt}, ${bt})`}}})),d.push(()=>{m.style.transform=D,m.style.position=Y,m.style.transformOrigin=M,m.style.zIndex=mt,m.style.willChange=ut})}const u=new h.MultiAnimation(p,{mode:"parallel"}),y=u.onComplete;return u.onComplete=()=>{for(const f of d)f();y==null||y()},u}}};function Te(e){const{paths:t}=e;return C(t,()=>Pe())}const ve={spring:{stiffness:50,damping:30}},De={spring:{stiffness:80,damping:25}},Oe=(e={})=>{const t=e.physics??ve,n=e.initialRotation??45,s=e.initialScale??.01,o=e.rotationTriggerPoint??.8;return{prepare:({from:r,to:i,context:l})=>(r.then(c=>{c.style.opacity="1"}),i.then(c=>{const a=v(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 d=a.left+a.width/2,u=a.top+a.height/2;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"}),{}),animation:({from:r,to:i})=>{const l=new h.WebAnimation({element:r,integrator:b.from(De),style:(a,p)=>({opacity:p})}),c=new h.WebAnimation({element:i,integrator:b.from(t),style:a=>{let p;if(a<=.05)p=s;else if(a<=o){const f=(a-.05)/(o-.05),m=Math.pow(f,9);p=s+(.8-s)*m}else{const f=(a-o)/(1-o);p=.8+.2*(1-Math.pow(1-f,3))}const d=.7;let u;if(a<=d)u=n;else{const f=(a-d)/(1-d),m=1-Math.pow(1-f,2);u=n*(1-m)}let y;if(a<=d)y=1;else{const f=(a-d)/(1-d);y=1-Math.pow(f,.5)}return{transform:`rotate(${u.toFixed(2)}deg) scale(${p.toFixed(4)}) translateZ(0)`,"--border-radius-scale":y.toFixed(4)}},onComplete:()=>{i.style.willChange="",i.style.backfaceVisibility="",i.style.removeProperty("--max-border-radius"),i.style.removeProperty("--border-radius-scale"),i.style.transform="",i.style.transformOrigin="",i.style.position="",i.style.zIndex="",i.style.top="",i.style.left="",i.style.width="",i.style.height="",i.style.overflow="",i.style.borderRadius=""}});return new h.MultiAnimation([l,c],{mode:"parallel"})}}};function Ie(e){const{paths:t}=e;return C(t,()=>Oe())}const _e={spring:{stiffness:100,damping:30}},ke=(e={})=>{const t=e.physics??_e;return{prepare:({from:n,to:s})=>(n.then(o=>{o.style.transformOrigin="center center",o.style.willChange="transform, opacity"}),s.then(o=>{o.style.opacity="0",o.style.transform="rotate(-180deg)",o.style.transformOrigin="center center",o.style.willChange="transform, opacity"}),{}),animation:({from:n,to:s})=>{const o=new h.WebAnimation({element:n,integrator:b.from(t),style:i=>({transform:`rotate(${i*180}deg)`,opacity:i<.5?1:0})}),r=new h.WebAnimation({element:s,integrator:b.from(t),style:(i,l)=>({transform:`rotate(${-l*180}deg)`,opacity:i>.5?1:0}),onComplete:()=>{s.style.willChange="auto",s.style.transform="",s.style.transformOrigin="",s.style.opacity=""}});return new h.MultiAnimation([o,r],{mode:"parallel"})}}};function Le(e){const{paths:t}=e;return C(t,()=>ke())}const Fe={spring:{stiffness:20,damping:8,doubleSpring:1,restDelta:.001,restSpeed:.001}},it=(e={})=>{const t=e.direction??"up",n=e.physics??Fe,s=t==="up";return{prepare:({from:o,to:r})=>(o.then(i=>{i.style.zIndex=s?"-1":"1",i.style.willChange="transform",i.style.backfaceVisibility="hidden",i.style.contain="layout paint",i.style.pointerEvents="none"}),r.then(i=>{i.style.willChange="transform",i.style.backfaceVisibility="hidden",i.style.contain="layout paint"}),{}),animation:({from:o,to:r})=>{const i=o.offsetHeight,l=r.offsetHeight,c=window.innerHeight,a=Math.max(Math.min(i,l),c),p=new h.WebAnimation({element:o,integrator:b.from(n),style:u=>({transform:`translate3d(0, ${s?-a*u:a*u}px, 0)`})}),d=new h.WebAnimation({element:r,integrator:b.from(n),style:(u,y)=>({transform:`translate3d(0, ${s?y*a:y*-a}px, 0)`}),onComplete:()=>{r.style.willChange="auto",r.style.backfaceVisibility="",r.style.contain="",r.style.transform=""}});return new h.MultiAnimation([p,d],{mode:"parallel"})}}};function Ye(e){const{paths:t,type:n="directional"}=e;return n==="non-directional"?C(t,()=>it({direction:"up"})):N(t,{forward:"up",backward:"down"},s=>it({direction:s}))}const Me={spring:{stiffness:200,damping:24}},He={inertia:{acceleration:25,resistance:1.2}},U=.2;function We(){return{enterPhysics:Me,exitPhysics:He,background:{willChange:"transform, opacity",enterStyle:(e,t)=>({transform:`scale(${1-U*e})`,opacity:t}),exitStyle:e=>({transform:`scale(${1-U+U*e})`,opacity:e})}}}const ze={spring:{stiffness:300,damping:30}},Ue={inertia:{acceleration:70,resistance:1.2}};function Xe(){return{enterPhysics:ze,exitPhysics:Ue,background:{willChange:"",enterStyle:()=>({}),exitStyle:()=>({})}}}const Ve={static:Xe(),"background-scale":We()},Be="static",Ne="transform",Ze=(e={})=>{const t=e.direction??"enter",n=Ve[e.type??Be],s=t==="enter"?n.enterPhysics:n.exitPhysics,o=n.background,r=o.willChange!=="";return{prepare:({from:i,to:l})=>{const c=t==="enter"?l:i,a=t==="enter"?i:l;return c.then(p=>{p.style.willChange=Ne,p.style.backfaceVisibility="hidden",p.style.contain="layout paint",t==="exit"&&(p.style.pointerEvents="none",p.style.zIndex="100")}),a.then(p=>{r&&(p.style.willChange=o.willChange,p.style.backfaceVisibility="hidden",p.style.contain="layout paint"),t==="enter"&&(p.style.pointerEvents="none",p.style.zIndex="-1")}),{}},animation:({from:i,to:l,context:c})=>{const a=t==="enter"?l:i,p=t==="enter"?i:l,d=v(c,t==="enter"?"to":"from");a.style.clipPath=`inset(${d.top}px 0 calc(100% - ${d.top+d.height}px) 0)`;const u=t==="enter"?(x,E)=>({transform:`translate3d(0, ${E*d.height}px, 0)`}):x=>({transform:`translate3d(0, ${x*d.height}px, 0)`}),y=new h.WebAnimation({element:a,integrator:b.from(s),style:u,onComplete:()=>{a.style.willChange="auto",a.style.backfaceVisibility="",a.style.contain="",a.style.clipPath="",a.style.transform=""}});if(!r)return new h.MultiAnimation([y],{mode:"parallel"});const f=v(c,t==="enter"?"from":"to"),m=f.left+f.width/2,g=f.top+f.height/2;p.style.clipPath=`inset(${f.top}px 0 calc(100% - ${f.top+f.height}px) 0)`,p.style.transformOrigin=`${m}px ${g}px`;const w=t==="enter"?(x,E)=>o.enterStyle(x,E):x=>o.exitStyle(x),S=new h.WebAnimation({element:p,integrator:b.from(s),style:w,onComplete:t==="exit"?()=>{p.style.willChange="auto",p.style.backfaceVisibility="",p.style.contain="",p.style.clipPath="",p.style.transformOrigin=""}:void 0});return new h.MultiAnimation([y,S],{mode:"parallel"})}}};function je(e){return e==="scale"||e==="background-scale"?"background-scale":"static"}function qe(e){const{enter:t,exit:n}=e,s=e.type,o=je(s);return pt({enter:t,exit:n},r=>Ze({direction:r,type:o}))}const Ge={spring:{stiffness:170,damping:22,doubleSpring:.8}},Ke=(e={})=>{const t=e.direction??"left",n=e.physics??Ge,s=t==="left";return{prepare:({from:o,to:r})=>(o.then(i=>{i.style.willChange="transform",i.style.backfaceVisibility="hidden",i.style.contain="layout paint",i.style.pointerEvents="none"}),r.then(i=>{const l=s?100:-100;i.style.transform=`translate3d(${l}%, 0, 0)`,i.style.willChange="transform",i.style.backfaceVisibility="hidden",i.style.contain="layout paint"}),{}),animation:({from:o,to:r})=>{const i=new h.WebAnimation({element:o,integrator:b.from(n),style:c=>({transform:`translate3d(${s?-100*c:100*c}%, 0, 0)`})}),l=new h.WebAnimation({element:r,integrator:b.from(n),style:(c,a)=>({transform:`translate3d(${s?a*100:a*-100}%, 0, 0)`}),onComplete:()=>{r.style.willChange="auto",r.style.backfaceVisibility="",r.style.contain="",r.style.transform=""}});return new h.MultiAnimation([i,l],{mode:"parallel"})}}};function Re(e){const{paths:t}=e;return N(t,{forward:"left",backward:"right"},n=>Ke({direction:n}))}const Je={spring:{stiffness:17,damping:6}},X=20,k=800,Qe=(e={})=>{const t=e.physics??Je;return{prepare:({from:n,to:s})=>(n.then(o=>{o.style.willChange="transform",o.style.backfaceVisibility="hidden",o.style.contain="layout paint",o.style.pointerEvents="none",o.style.transform=`perspective(${k}px) rotateY(0deg) translate3d(0%, 0, 0)`}),s.then(o=>{o.style.willChange="transform",o.style.backfaceVisibility="hidden",o.style.contain="layout paint",o.style.transform=`perspective(${k}px) rotateY(${X}deg) translate3d(-100%, 0, 0)`}),{}),animation:({from:n,to:s})=>{const o=new h.WebAnimation({element:n,integrator:b.from(t),style:i=>{const l=-i*X,c=i*100;return{transform:`perspective(${k}px) rotateY(${l}deg) translate3d(${c}%, 0, 0)`}}}),r=new h.WebAnimation({element:s,integrator:b.from(t),style:(i,l)=>{const c=l*X,a=-l*100;return{transform:`perspective(${k}px) rotateY(${c}deg) translate3d(${a}%, 0, 0)`}},onComplete:()=>{s.style.transform="",s.style.willChange="auto",s.style.backfaceVisibility="",s.style.contain=""}});return new h.MultiAnimation([o,r],{mode:"sequence"})}}};function tn(e){const{paths:t}=e;return C(t,()=>Qe())}function en({enterRect:e,exitRect:t,pageRect:n,scrollOffset:s,enterRadius:o,exitRadius:r}){const i=t.left-e.left+(t.width-e.width)/2-s.x,l=t.top-e.top+(t.height-e.height)/2-s.y,c=t.width/e.width,a=t.height/e.height,p=e.top/n.height*100,d=(n.width-(e.left+e.width))/n.width*100,u=(n.height-(e.top+e.height))/n.height*100,y=e.left/n.width*100;return{transformOrigin:`${e.left+e.width/2}px ${e.top+e.height/2}px`,animate:f=>{const m=1-f,g=1+(c-1)*m,w=1+(a-1)*m,x=(r*m+o*(1-m))/((g+w)/2);return{clipPath:`inset(${p*m}% ${d*m}% ${u*m}% ${y*m}% round ${x}px)`,transform:`translate(${i*m}px, ${l*m}px) scale(${g}, ${w})`}}}}function nn({enterRect:e,exitRect:t,pageRect:n,scrollOffset:s,enterRadius:o,exitRadius:r}){const i=t.left-e.left+(t.width-e.width)/2+s.x,l=t.top-e.top+(t.height-e.height)/2+s.y,c=t.width/e.width,a=t.height/e.height,p=e.top/n.height*100,d=(n.width-(e.left+e.width))/n.width*100,u=(n.height-(e.top+e.height))/n.height*100,y=e.left/n.width*100;return{transformOrigin:`${e.left+e.width/2}px ${e.top+e.height/2}px`,animate:f=>{const m=1-f,g=1+(c-1)*m,w=1+(a-1)*m,x=(o*(1-m)+r*m)/((g+w)/2);return{clipPath:`inset(${p*m}% ${d*m}% ${u*m}% ${y*m}% round ${x}px)`,transform:`translate(${i*m-s.x}px, ${l*m}px) scale(${g}, ${w})`}}}}const sn={spring:{stiffness:200,damping:24}},dt=.12,on=18;function rn(){return{transformOrigin:"50% 50%",animate:e=>{const t=1-e;return{transform:`scale(${1-dt*t})`}}}}function an(){return{transformOrigin:"50% 50%",animate:e=>{const t=1-e;return{transform:`scale(${1-dt*t})`}}}}const V={willChange:"backdrop-filter",initialStyle:{position:"absolute",inset:"0",pointerEvents:"none",zIndex:"5000",backdropFilter:"blur(0px)",WebkitBackdropFilter:"blur(0px)"},style:(e,t)=>{const n=e==="enter"?t:1-t,s=`blur(${on*n}px)`;return{backdropFilter:s,WebkitBackdropFilter:s}}};class ln{constructor(){$(this,"physics",sn)}contribute(t){const{from:n,to:s,resolved:o,physics:r}=t,i=o.mode==="enter",l=i?n:s,c=i?rn():an();return c&&(l.style.transformOrigin=c.transformOrigin),[new h.WebAnimation({element:l,integrator:b.from(r),style:i?(a,p)=>c.animate(p):a=>c.animate(a)})]}}class cn{prepare(t){const n=t.createElement("zoom-overlay");return Object.assign(n.style,V.initialStyle),n.style.willChange=V.willChange,t.context.positionedParent.appendChild(n),{overlay:n}}contribute(t){const n=t.extras.overlay;return n?[new h.WebAnimation({element:n,integrator:b.from(t.physics),style:s=>V.style(t.resolved.mode,s)})]:[]}}const pn={spring:{stiffness:340,damping:30,doubleSpring:1}};function dn({enterRect:e,exitRect:t,scrollOffset:n}){const s=e.left-t.left+(e.width-t.width)/2+n.x,o=e.top-t.top+(e.height-t.height)/2+n.y,r=e.width/t.width,i=e.height/t.height,l=Math.max(r,i);return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:c=>{const a=1-c;return{transform:`translate(${s*a-n.x}px, ${o*a}px) scale(${1+(l-1)*a})`,opacity:`${1-a}`}}}}function fn({enterRect:e,exitRect:t,scrollOffset:n}){const s=e.left-t.left+(e.width-t.width)/2-n.x,o=e.top-t.top+(e.height-t.height)/2-n.y,r=e.width/t.width,i=e.height/t.height,l=Math.max(r,i);return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:c=>{const a=1-c;return{transform:`translate(${s*a}px, ${o*a}px) scale(${1+(l-1)*a})`,opacity:`${c}`}}}}class mn{constructor(){$(this,"physics",pn)}contribute(t){const{from:n,to:s,resolved:o,input:r,physics:i}=t,l=o.mode==="enter",c=l?n:s,a=l?dn(r):fn(r);return a&&(c.style.transformOrigin=a.transformOrigin),[new h.WebAnimation({element:c,integrator:b.from(i),style:l?(p,d)=>a.animate(d):p=>a.animate(p)})]}}const un={spring:{stiffness:420,damping:34}};class hn{constructor(){$(this,"physics",un)}contribute(t){return[]}}const yn={expand:()=>new mn,static:()=>new hn,blur:()=>new ln};function gn(e){return yn[e]()}const B="data-zoom-enter-key",rt="data-zoom-exit-key",bn="data-zoom-radius";function at(e){const t=e.getAttribute(bn);if(!t)return 0;const n=parseFloat(t);return Number.isFinite(n)&&n>0?n:0}function wn(e,t){const n=[];let s=t;for(;s&&s!==e;){const o=s.parentElement;if(!o)break;for(const r of Array.from(o.children))r!==s&&r instanceof HTMLElement&&n.push(r);s=o}return n}function lt(e){const t=e.querySelectorAll(`[${B}]`);return t.length!==1?null:t[0]}function ct(e,t){const n=e.querySelectorAll(`[${rt}]`);for(const s of n)if(s.getAttribute(rt)===t)return s;return null}function Sn(e,t){const n=lt(e),s=lt(t);if(!n&&s){const o=s.getAttribute(B);if(!o)return null;const r=ct(e,o);return r?{mode:"enter",enterEl:s,exitEl:r}:null}if(n&&!s){const o=n.getAttribute(B);if(!o)return null;const r=ct(t,o);return r?{mode:"exit",enterEl:n,exitEl:r}:null}return null}function $n(e,t,n,s){return{enterRect:P(e.mode==="enter"?n:t,e.enterEl),exitRect:P(e.mode==="enter"?t:n,e.exitEl),pageRect:e.mode==="enter"?n.getBoundingClientRect():t.getBoundingClientRect(),scrollOffset:s,enterRadius:at(e.enterEl),exitRadius:at(e.exitEl)}}class xn{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:s,resolved:o,input:r,physics:i,onComplete:l}=t,c=o.mode==="enter",a=c?en(r):nn(r),p=c?s:n,d=c?"t":"u";a&&(p.style.transformOrigin=a.transformOrigin);const u=p.style.zIndex;return p.style.zIndex="9999",l(()=>{p.style.willChange="auto",p.style.backfaceVisibility="",p.style.transformOrigin="",p.style.contain="",p.style.zIndex=u}),[new h.WebAnimation({element:p,integrator:b.from(i),style:d==="t"?y=>a.animate(y):(y,f)=>a.animate(f)})]}}class En{contribute(t){const{resolved:n,physics:s,from:o,to:r,onComplete:i}=t,l=n.mode==="enter"?r:o,c=wn(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 i(()=>{for(let p=0;p<c.length;p++){const d=c[p];d&&(d.style.opacity=a[p]??"")}}),c.map(p=>new h.WebAnimation({element:p,integrator:b.from(s),style:(d,u)=>({opacity:n.mode==="enter"?d:u})}))}}class ft{contribute(){return[]}}const Cn={default:()=>new ft,fade:()=>new En};function An(e){return Cn[e]()}class Pn extends ft{}function Tn(e){const t=gn(e.type);return{strategies:[new xn,t,An(e.variant),new Pn,...e.type==="blur"?[new cn]:[]],physics:t.physics}}const vn=e=>{const{strategies:t,physics:n}=Tn(e);return{prepare:s=>{const o={from:s.from,to:s.to,context:{positionedParent:s.context.positionedParent},createElement:s.createElement},r={};for(const i of t){if(!i.prepare)continue;const l=i.prepare(o);l&&Object.assign(r,l)}return r},animation:({from:s,to:o,context:r,...i})=>{const l=Sn(s,o);if(!l)return new h.MultiAnimation([],{mode:"parallel"});const c=$n(l,s,o,r.scrollOffset),a=[],d={from:s,to:o,resolved:l,input:c,physics:n,extras:i,onComplete:f=>{a.push(f)}},u=[];for(const f of t)f.contribute&&u.push(...f.contribute(d));const y=u[0];if(y){const f=y.onComplete;y.onComplete=()=>{f==null||f();for(const m of a)try{m()}catch(g){console.error("[zoom] cleanup error",g)}}}return new h.MultiAnimation(u,{mode:"parallel"})}}};function Dn(e){const t=e.type??"static",n=e.variant??(e.fade?"fade":"default");return{type:t,variant:n}}function On(e){const t=Dn(e);return C(e.paths,()=>vn(t))}exports.Animation=h.Animation;exports.MultiAnimation=h.MultiAnimation;exports.WebAnimation=h.WebAnimation;exports.axis=jt;exports.blind=Qt;exports.drill=pe;exports.fade=ue;exports.film=Ee;exports.hero=Te;exports.jaemin=Ie;exports.rotate=Le;exports.scroll=Ye;exports.sheet=qe;exports.slide=Re;exports.strip=tn;exports.zoom=On;