motion-dom 12.27.0-alpha.3 → 12.27.0-alpha.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/index.js CHANGED
@@ -9094,6 +9094,13 @@ function isRootExitingElement(element, allExiting) {
9094
9094
  }
9095
9095
 
9096
9096
  let scaleCorrectorAdded = false;
9097
+ /**
9098
+ * Track active projection nodes per element to handle animation interruption.
9099
+ * When a new animation starts on an element that already has an active animation,
9100
+ * we need to stop the old animation so the new one can start from the current
9101
+ * visual position.
9102
+ */
9103
+ const activeProjectionNodes = new WeakMap();
9097
9104
  function ensureScaleCorrectors() {
9098
9105
  if (scaleCorrectorAdded)
9099
9106
  return;
@@ -9141,9 +9148,26 @@ function findProjectionParent(element, nodeCache) {
9141
9148
  return undefined;
9142
9149
  }
9143
9150
  /**
9144
- * Create a single projection node for an element
9151
+ * Create or reuse a projection node for an element
9145
9152
  */
9146
9153
  function createProjectionNode(element, parent, options, transition) {
9154
+ // Check for existing active node - reuse it to preserve animation state
9155
+ const existingNode = activeProjectionNodes.get(element);
9156
+ if (existingNode) {
9157
+ const visualElement = existingNode.options.visualElement;
9158
+ // Update transition options for the new animation
9159
+ const nodeTransition = transition
9160
+ ? { duration: transition.duration, ease: transition.ease }
9161
+ : { duration: 0.3, ease: "easeOut" };
9162
+ existingNode.setOptions({
9163
+ ...existingNode.options,
9164
+ animate: true,
9165
+ transition: nodeTransition,
9166
+ ...options,
9167
+ });
9168
+ return { node: existingNode, visualElement };
9169
+ }
9170
+ // No existing node - create a new one
9147
9171
  const latestValues = {};
9148
9172
  const visualElement = new HTMLVisualElement({
9149
9173
  visualState: {
@@ -9172,6 +9196,8 @@ function createProjectionNode(element, parent, options, transition) {
9172
9196
  });
9173
9197
  node.mount(element);
9174
9198
  visualElement.projection = node;
9199
+ // Track this node as the active one for this element
9200
+ activeProjectionNodes.set(element, node);
9175
9201
  return { node, visualElement };
9176
9202
  }
9177
9203
  /**
@@ -9184,7 +9210,6 @@ function buildProjectionTree(elements, existingContext, options) {
9184
9210
  const group = existingContext?.group ?? nodeGroup();
9185
9211
  const defaultTransition = options?.defaultTransition;
9186
9212
  const sharedTransitions = options?.sharedTransitions;
9187
- const crossfade = options?.crossfade;
9188
9213
  // Sort elements by DOM depth (parents before children)
9189
9214
  const sorted = [...elements].sort((a, b) => getDepth(a) - getDepth(b));
9190
9215
  let root = existingContext?.root;
@@ -9198,7 +9223,6 @@ function buildProjectionTree(elements, existingContext, options) {
9198
9223
  const nodeOptions = {
9199
9224
  layoutId: layoutId ?? undefined,
9200
9225
  animationType: parseLayoutMode(layoutMode),
9201
- crossfade,
9202
9226
  };
9203
9227
  // Use layoutId-specific transition if available, otherwise use default
9204
9228
  const transition = layoutId && sharedTransitions?.get(layoutId)
@@ -9235,9 +9259,14 @@ function parseLayoutMode(value) {
9235
9259
  * Clean up projection nodes
9236
9260
  */
9237
9261
  function cleanupProjectionTree(context) {
9238
- for (const node of context.nodes.values()) {
9262
+ for (const [element, node] of context.nodes.entries()) {
9239
9263
  context.group.remove(node);
9240
9264
  node.unmount();
9265
+ // Only clear from activeProjectionNodes if this is still the active node.
9266
+ // A newer animation might have already taken over.
9267
+ if (activeProjectionNodes.get(element) === node) {
9268
+ activeProjectionNodes.delete(element);
9269
+ }
9241
9270
  }
9242
9271
  context.nodes.clear();
9243
9272
  context.visualElements.clear();
@@ -9332,6 +9361,17 @@ class LayoutAnimationBuilder {
9332
9361
  const exitingElement = mutationResult.sharedExiting.get(layoutId);
9333
9362
  if (exitingElement) {
9334
9363
  sharedExitingElements.add(exitingElement);
9364
+ // Remove the exiting node from the shared stack so that crossfade
9365
+ // doesn't trigger. When an element is removed from the DOM, it can't
9366
+ // participate in crossfade (no element to fade out). The entering
9367
+ // element still has resumeFrom set for position morphing.
9368
+ const exitingNode = context?.nodes.get(exitingElement);
9369
+ if (exitingNode) {
9370
+ const stack = exitingNode.getStack();
9371
+ if (stack) {
9372
+ stack.remove(exitingNode);
9373
+ }
9374
+ }
9335
9375
  }
9336
9376
  }
9337
9377
  // Phase 4: Animate
@@ -9383,10 +9423,6 @@ class LayoutAnimationBuilder {
9383
9423
  return {
9384
9424
  defaultTransition: this.defaultOptions || { duration: 0.3, ease: "easeOut" },
9385
9425
  sharedTransitions: this.sharedTransitions.size > 0 ? this.sharedTransitions : undefined,
9386
- // Disable crossfade by default for animateLayout - shared elements should
9387
- // morph position without opacity animation. The old element is removed from
9388
- // the DOM, so crossfade would just show a fade-in without corresponding fade-out.
9389
- crossfade: false,
9390
9426
  };
9391
9427
  }
9392
9428
  reattachExitingElements(exiting, context) {
@@ -95,6 +95,17 @@ class LayoutAnimationBuilder {
95
95
  const exitingElement = mutationResult.sharedExiting.get(layoutId);
96
96
  if (exitingElement) {
97
97
  sharedExitingElements.add(exitingElement);
98
+ // Remove the exiting node from the shared stack so that crossfade
99
+ // doesn't trigger. When an element is removed from the DOM, it can't
100
+ // participate in crossfade (no element to fade out). The entering
101
+ // element still has resumeFrom set for position morphing.
102
+ const exitingNode = context?.nodes.get(exitingElement);
103
+ if (exitingNode) {
104
+ const stack = exitingNode.getStack();
105
+ if (stack) {
106
+ stack.remove(exitingNode);
107
+ }
108
+ }
98
109
  }
99
110
  }
100
111
  // Phase 4: Animate
@@ -146,10 +157,6 @@ class LayoutAnimationBuilder {
146
157
  return {
147
158
  defaultTransition: this.defaultOptions || { duration: 0.3, ease: "easeOut" },
148
159
  sharedTransitions: this.sharedTransitions.size > 0 ? this.sharedTransitions : undefined,
149
- // Disable crossfade by default for animateLayout - shared elements should
150
- // morph position without opacity animation. The old element is removed from
151
- // the DOM, so crossfade would just show a fade-in without corresponding fade-out.
152
- crossfade: false,
153
160
  };
154
161
  }
155
162
  reattachExitingElements(exiting, context) {
@@ -7,6 +7,13 @@ import { correctBorderRadius } from '../projection/styles/scale-border-radius.mj
7
7
  import { correctBoxShadow } from '../projection/styles/scale-box-shadow.mjs';
8
8
 
9
9
  let scaleCorrectorAdded = false;
10
+ /**
11
+ * Track active projection nodes per element to handle animation interruption.
12
+ * When a new animation starts on an element that already has an active animation,
13
+ * we need to stop the old animation so the new one can start from the current
14
+ * visual position.
15
+ */
16
+ const activeProjectionNodes = new WeakMap();
10
17
  function ensureScaleCorrectors() {
11
18
  if (scaleCorrectorAdded)
12
19
  return;
@@ -54,9 +61,26 @@ function findProjectionParent(element, nodeCache) {
54
61
  return undefined;
55
62
  }
56
63
  /**
57
- * Create a single projection node for an element
64
+ * Create or reuse a projection node for an element
58
65
  */
59
66
  function createProjectionNode(element, parent, options, transition) {
67
+ // Check for existing active node - reuse it to preserve animation state
68
+ const existingNode = activeProjectionNodes.get(element);
69
+ if (existingNode) {
70
+ const visualElement = existingNode.options.visualElement;
71
+ // Update transition options for the new animation
72
+ const nodeTransition = transition
73
+ ? { duration: transition.duration, ease: transition.ease }
74
+ : { duration: 0.3, ease: "easeOut" };
75
+ existingNode.setOptions({
76
+ ...existingNode.options,
77
+ animate: true,
78
+ transition: nodeTransition,
79
+ ...options,
80
+ });
81
+ return { node: existingNode, visualElement };
82
+ }
83
+ // No existing node - create a new one
60
84
  const latestValues = {};
61
85
  const visualElement = new HTMLVisualElement({
62
86
  visualState: {
@@ -85,6 +109,8 @@ function createProjectionNode(element, parent, options, transition) {
85
109
  });
86
110
  node.mount(element);
87
111
  visualElement.projection = node;
112
+ // Track this node as the active one for this element
113
+ activeProjectionNodes.set(element, node);
88
114
  return { node, visualElement };
89
115
  }
90
116
  /**
@@ -97,7 +123,6 @@ function buildProjectionTree(elements, existingContext, options) {
97
123
  const group = existingContext?.group ?? nodeGroup();
98
124
  const defaultTransition = options?.defaultTransition;
99
125
  const sharedTransitions = options?.sharedTransitions;
100
- const crossfade = options?.crossfade;
101
126
  // Sort elements by DOM depth (parents before children)
102
127
  const sorted = [...elements].sort((a, b) => getDepth(a) - getDepth(b));
103
128
  let root = existingContext?.root;
@@ -111,7 +136,6 @@ function buildProjectionTree(elements, existingContext, options) {
111
136
  const nodeOptions = {
112
137
  layoutId: layoutId ?? undefined,
113
138
  animationType: parseLayoutMode(layoutMode),
114
- crossfade,
115
139
  };
116
140
  // Use layoutId-specific transition if available, otherwise use default
117
141
  const transition = layoutId && sharedTransitions?.get(layoutId)
@@ -148,9 +172,14 @@ function parseLayoutMode(value) {
148
172
  * Clean up projection nodes
149
173
  */
150
174
  function cleanupProjectionTree(context) {
151
- for (const node of context.nodes.values()) {
175
+ for (const [element, node] of context.nodes.entries()) {
152
176
  context.group.remove(node);
153
177
  node.unmount();
178
+ // Only clear from activeProjectionNodes if this is still the active node.
179
+ // A newer animation might have already taken over.
180
+ if (activeProjectionNodes.get(element) === node) {
181
+ activeProjectionNodes.delete(element);
182
+ }
154
183
  }
155
184
  context.nodes.clear();
156
185
  context.visualElements.clear();
@@ -9093,6 +9093,13 @@
9093
9093
  }
9094
9094
 
9095
9095
  let scaleCorrectorAdded = false;
9096
+ /**
9097
+ * Track active projection nodes per element to handle animation interruption.
9098
+ * When a new animation starts on an element that already has an active animation,
9099
+ * we need to stop the old animation so the new one can start from the current
9100
+ * visual position.
9101
+ */
9102
+ const activeProjectionNodes = new WeakMap();
9096
9103
  function ensureScaleCorrectors() {
9097
9104
  if (scaleCorrectorAdded)
9098
9105
  return;
@@ -9140,9 +9147,26 @@
9140
9147
  return undefined;
9141
9148
  }
9142
9149
  /**
9143
- * Create a single projection node for an element
9150
+ * Create or reuse a projection node for an element
9144
9151
  */
9145
9152
  function createProjectionNode(element, parent, options, transition) {
9153
+ // Check for existing active node - reuse it to preserve animation state
9154
+ const existingNode = activeProjectionNodes.get(element);
9155
+ if (existingNode) {
9156
+ const visualElement = existingNode.options.visualElement;
9157
+ // Update transition options for the new animation
9158
+ const nodeTransition = transition
9159
+ ? { duration: transition.duration, ease: transition.ease }
9160
+ : { duration: 0.3, ease: "easeOut" };
9161
+ existingNode.setOptions({
9162
+ ...existingNode.options,
9163
+ animate: true,
9164
+ transition: nodeTransition,
9165
+ ...options,
9166
+ });
9167
+ return { node: existingNode, visualElement };
9168
+ }
9169
+ // No existing node - create a new one
9146
9170
  const latestValues = {};
9147
9171
  const visualElement = new HTMLVisualElement({
9148
9172
  visualState: {
@@ -9171,6 +9195,8 @@
9171
9195
  });
9172
9196
  node.mount(element);
9173
9197
  visualElement.projection = node;
9198
+ // Track this node as the active one for this element
9199
+ activeProjectionNodes.set(element, node);
9174
9200
  return { node, visualElement };
9175
9201
  }
9176
9202
  /**
@@ -9183,7 +9209,6 @@
9183
9209
  const group = existingContext?.group ?? nodeGroup();
9184
9210
  const defaultTransition = options?.defaultTransition;
9185
9211
  const sharedTransitions = options?.sharedTransitions;
9186
- const crossfade = options?.crossfade;
9187
9212
  // Sort elements by DOM depth (parents before children)
9188
9213
  const sorted = [...elements].sort((a, b) => getDepth(a) - getDepth(b));
9189
9214
  let root = existingContext?.root;
@@ -9197,7 +9222,6 @@
9197
9222
  const nodeOptions = {
9198
9223
  layoutId: layoutId ?? undefined,
9199
9224
  animationType: parseLayoutMode(layoutMode),
9200
- crossfade,
9201
9225
  };
9202
9226
  // Use layoutId-specific transition if available, otherwise use default
9203
9227
  const transition = layoutId && sharedTransitions?.get(layoutId)
@@ -9234,9 +9258,14 @@
9234
9258
  * Clean up projection nodes
9235
9259
  */
9236
9260
  function cleanupProjectionTree(context) {
9237
- for (const node of context.nodes.values()) {
9261
+ for (const [element, node] of context.nodes.entries()) {
9238
9262
  context.group.remove(node);
9239
9263
  node.unmount();
9264
+ // Only clear from activeProjectionNodes if this is still the active node.
9265
+ // A newer animation might have already taken over.
9266
+ if (activeProjectionNodes.get(element) === node) {
9267
+ activeProjectionNodes.delete(element);
9268
+ }
9240
9269
  }
9241
9270
  context.nodes.clear();
9242
9271
  context.visualElements.clear();
@@ -9331,6 +9360,17 @@
9331
9360
  const exitingElement = mutationResult.sharedExiting.get(layoutId);
9332
9361
  if (exitingElement) {
9333
9362
  sharedExitingElements.add(exitingElement);
9363
+ // Remove the exiting node from the shared stack so that crossfade
9364
+ // doesn't trigger. When an element is removed from the DOM, it can't
9365
+ // participate in crossfade (no element to fade out). The entering
9366
+ // element still has resumeFrom set for position morphing.
9367
+ const exitingNode = context?.nodes.get(exitingElement);
9368
+ if (exitingNode) {
9369
+ const stack = exitingNode.getStack();
9370
+ if (stack) {
9371
+ stack.remove(exitingNode);
9372
+ }
9373
+ }
9334
9374
  }
9335
9375
  }
9336
9376
  // Phase 4: Animate
@@ -9382,10 +9422,6 @@
9382
9422
  return {
9383
9423
  defaultTransition: this.defaultOptions || { duration: 0.3, ease: "easeOut" },
9384
9424
  sharedTransitions: this.sharedTransitions.size > 0 ? this.sharedTransitions : undefined,
9385
- // Disable crossfade by default for animateLayout - shared elements should
9386
- // morph position without opacity animation. The old element is removed from
9387
- // the DOM, so crossfade would just show a fade-in without corresponding fade-out.
9388
- crossfade: false,
9389
9425
  };
9390
9426
  }
9391
9427
  reattachExitingElements(exiting, context) {
@@ -1 +1 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("motion-utils")):"function"==typeof define&&define.amd?define(["exports","motion-utils"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).MotionDom={},t.MotionUtils)}(this,function(t,e){"use strict";const n=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],i={value:null,addProjectionMetrics:null};function s(t,s){let o=!1,r=!0;const a={delta:0,timestamp:0,isProcessing:!1},l=()=>o=!0,u=n.reduce((t,e)=>(t[e]=function(t,e){let n=new Set,s=new Set,o=!1,r=!1;const a=new WeakSet;let l={delta:0,timestamp:0,isProcessing:!1},u=0;function c(e){a.has(e)&&(h.schedule(e),t()),u++,e(l)}const h={schedule:(t,e=!1,i=!1)=>{const r=i&&o?n:s;return e&&a.add(t),r.has(t)||r.add(t),t},cancel:t=>{s.delete(t),a.delete(t)},process:t=>{l=t,o?r=!0:(o=!0,[n,s]=[s,n],n.forEach(c),e&&i.value&&i.value.frameloop[e].push(u),u=0,n.clear(),o=!1,r&&(r=!1,h.process(t)))}};return h}(l,s?e:void 0),t),{}),{setup:c,read:h,resolveKeyframes:d,preUpdate:p,update:m,preRender:f,render:y,postRender:g}=u,v=()=>{const n=e.MotionGlobalConfig.useManualTiming?a.timestamp:performance.now();o=!1,e.MotionGlobalConfig.useManualTiming||(a.delta=r?1e3/60:Math.max(Math.min(n-a.timestamp,40),1)),a.timestamp=n,a.isProcessing=!0,c.process(a),h.process(a),d.process(a),p.process(a),m.process(a),f.process(a),y.process(a),g.process(a),a.isProcessing=!1,o&&s&&(r=!1,t(v))};return{schedule:n.reduce((e,n)=>{const i=u[n];return e[n]=(e,n=!1,s=!1)=>(o||(o=!0,r=!0,a.isProcessing||t(v)),i.schedule(e,n,s)),e},{}),cancel:t=>{for(let e=0;e<n.length;e++)u[n[e]].cancel(t)},state:a,steps:u}}const{schedule:o,cancel:r,state:a,steps:l}=s("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:e.noop,!0);let u;function c(){u=void 0}const h={now:()=>(void 0===u&&h.set(a.isProcessing||e.MotionGlobalConfig.useManualTiming?a.timestamp:performance.now()),u),set:t=>{u=t,queueMicrotask(c)}},d={layout:0,mainThread:0,waapi:0},p=t=>e=>"string"==typeof e&&e.startsWith(t),m=p("--"),f=p("var(--"),y=t=>!!f(t)&&g.test(t.split("/*")[0].trim()),g=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function v(t){return"string"==typeof t&&t.split("/*")[0].includes("var(--")}const x={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},T={...x,transform:t=>e.clamp(0,1,t)},w={...x,default:1},b=t=>Math.round(1e5*t)/1e5,S=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const P=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,A=(t,e)=>n=>Boolean("string"==typeof n&&P.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),V=(t,e,n)=>i=>{if("string"!=typeof i)return i;const[s,o,r,a]=i.match(S);return{[t]:parseFloat(s),[e]:parseFloat(o),[n]:parseFloat(r),alpha:void 0!==a?parseFloat(a):1}},E={...x,transform:t=>Math.round((t=>e.clamp(0,255,t))(t))},M={test:A("rgb","red"),parse:V("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+E.transform(t)+", "+E.transform(e)+", "+E.transform(n)+", "+b(T.transform(i))+")"};const D={test:A("#"),parse:function(t){let e="",n="",i="",s="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),s=t.substring(4,5),e+=e,n+=n,i+=i,s+=s),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}},transform:M.transform},R=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),k=R("deg"),B=R("%"),C=R("px"),j=R("vh"),L=R("vw"),F=(()=>({...B,parse:t=>B.parse(t)/100,transform:t=>B.transform(100*t)}))(),O={test:A("hsl","hue"),parse:V("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+B.transform(b(e))+", "+B.transform(b(n))+", "+b(T.transform(i))+")"},I={test:t=>M.test(t)||D.test(t)||O.test(t),parse:t=>M.test(t)?M.parse(t):O.test(t)?O.parse(t):D.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?M.transform(t):O.transform(t),getAnimatableNone:t=>{const e=I.parse(t);return e.alpha=0,I.transform(e)}},U=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const N="number",$="color",W=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function K(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},s=[];let o=0;const r=e.replace(W,t=>(I.test(t)?(i.color.push(o),s.push($),n.push(I.parse(t))):t.startsWith("var(")?(i.var.push(o),s.push("var"),n.push(t)):(i.number.push(o),s.push(N),n.push(parseFloat(t))),++o,"${}")).split("${}");return{values:n,split:r,indexes:i,types:s}}function z(t){return K(t).values}function Y(t){const{split:e,types:n}=K(t),i=e.length;return t=>{let s="";for(let o=0;o<i;o++)if(s+=e[o],void 0!==t[o]){const e=n[o];s+=e===N?b(t[o]):e===$?I.transform(t[o]):t[o]}return s}}const X=t=>"number"==typeof t?0:I.test(t)?I.getAnimatableNone(t):t;const G={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(S)?.length||0)+(t.match(U)?.length||0)>0},parse:z,createTransformer:Y,getAnimatableNone:function(t){const e=z(t);return Y(t)(e.map(X))}};function q(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function H({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,n/=100;let s=0,o=0,r=0;if(e/=100){const i=n<.5?n*(1+e):n+e-n*e,a=2*n-i;s=q(a,i,t+1/3),o=q(a,i,t),r=q(a,i,t-1/3)}else s=o=r=n;return{red:Math.round(255*s),green:Math.round(255*o),blue:Math.round(255*r),alpha:i}}function Z(t,e){return n=>n>0?e:t}const _=(t,e,n)=>t+(e-t)*n,J=(t,e,n)=>{const i=t*t,s=n*(e*e-i)+i;return s<0?0:Math.sqrt(s)},Q=[D,M,O];function tt(t){const n=(i=t,Q.find(t=>t.test(i)));var i;if(e.warning(Boolean(n),`'${t}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!Boolean(n))return!1;let s=n.parse(t);return n===O&&(s=H(s)),s}const et=(t,e)=>{const n=tt(t),i=tt(e);if(!n||!i)return Z(t,e);const s={...n};return t=>(s.red=J(n.red,i.red,t),s.green=J(n.green,i.green,t),s.blue=J(n.blue,i.blue,t),s.alpha=_(n.alpha,i.alpha,t),M.transform(s))},nt=new Set(["none","hidden"]);function it(t,e){return nt.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function st(t,e){return n=>_(t,e,n)}function ot(t){return"number"==typeof t?st:"string"==typeof t?y(t)?Z:I.test(t)?et:lt:Array.isArray(t)?rt:"object"==typeof t?I.test(t)?et:at:Z}function rt(t,e){const n=[...t],i=n.length,s=t.map((t,n)=>ot(t)(t,e[n]));return t=>{for(let e=0;e<i;e++)n[e]=s[e](t);return n}}function at(t,e){const n={...t,...e},i={};for(const s in n)void 0!==t[s]&&void 0!==e[s]&&(i[s]=ot(t[s])(t[s],e[s]));return t=>{for(const e in i)n[e]=i[e](t);return n}}const lt=(t,n)=>{const i=G.createTransformer(n),s=K(t),o=K(n);return s.indexes.var.length===o.indexes.var.length&&s.indexes.color.length===o.indexes.color.length&&s.indexes.number.length>=o.indexes.number.length?nt.has(t)&&!o.values.length||nt.has(n)&&!s.values.length?it(t,n):e.pipe(rt(function(t,e){const n=[],i={color:0,var:0,number:0};for(let s=0;s<e.values.length;s++){const o=e.types[s],r=t.indexes[o][i[o]],a=t.values[r]??0;n[s]=a,i[o]++}return n}(s,o),o.values),i):(e.warning(!0,`Complex values '${t}' and '${n}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Z(t,n))};function ut(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return _(t,e,n);return ot(t)(t,e)}const ct=t=>{const e=({timestamp:e})=>t(e);return{start:(t=!0)=>o.update(e,t),stop:()=>r(e),now:()=>a.isProcessing?a.timestamp:h.now()}},ht=(t,e,n=10)=>{let i="";const s=Math.max(Math.round(e/n),2);for(let e=0;e<s;e++)i+=Math.round(1e4*t(e/(s-1)))/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},dt=2e4;function pt(t){let e=0;let n=t.next(e);for(;!n.done&&e<dt;)e+=50,n=t.next(e);return e>=dt?1/0:e}function mt(t,n=100,i){const s=i({...t,keyframes:[0,n]}),o=Math.min(pt(s),dt);return{type:"keyframes",ease:t=>s.next(o*t).value/n,duration:e.millisecondsToSeconds(o)}}function ft(t,n,i){const s=Math.max(n-5,0);return e.velocityPerSecond(i-t(s),n-s)}const yt=100,gt=10,vt=1,xt=0,Tt=800,wt=.3,bt=.3,St={granular:.01,default:2},Pt={granular:.005,default:.5},At=.01,Vt=10,Et=.05,Mt=1,Dt=.001;function Rt({duration:t=Tt,bounce:n=wt,velocity:i=xt,mass:s=vt}){let o,r;e.warning(t<=e.secondsToMilliseconds(Vt),"Spring duration must be 10 seconds or less","spring-duration-limit");let a=1-n;a=e.clamp(Et,Mt,a),t=e.clamp(At,Vt,e.millisecondsToSeconds(t)),a<1?(o=e=>{const n=e*a,s=n*t,o=n-i,r=Bt(e,a),l=Math.exp(-s);return Dt-o/r*l},r=e=>{const n=e*a*t,s=n*i+i,r=Math.pow(a,2)*Math.pow(e,2)*t,l=Math.exp(-n),u=Bt(Math.pow(e,2),a);return(-o(e)+Dt>0?-1:1)*((s-r)*l)/u}):(o=e=>Math.exp(-e*t)*((e-i)*t+1)-.001,r=e=>Math.exp(-e*t)*(t*t*(i-e)));const l=function(t,e,n){let i=n;for(let n=1;n<kt;n++)i-=t(i)/e(i);return i}(o,r,5/t);if(t=e.secondsToMilliseconds(t),isNaN(l))return{stiffness:yt,damping:gt,duration:t};{const e=Math.pow(l,2)*s;return{stiffness:e,damping:2*a*Math.sqrt(s*e),duration:t}}}const kt=12;function Bt(t,e){return t*Math.sqrt(1-e*e)}const Ct=["duration","bounce"],jt=["stiffness","damping","mass"];function Lt(t,e){return e.some(e=>void 0!==t[e])}function Ft(t=bt,n=wt){const i="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:n}:t;let{restSpeed:s,restDelta:o}=i;const r=i.keyframes[0],a=i.keyframes[i.keyframes.length-1],l={done:!1,value:r},{stiffness:u,damping:c,mass:h,duration:d,velocity:p,isResolvedFromDuration:m}=function(t){let n={velocity:xt,stiffness:yt,damping:gt,mass:vt,isResolvedFromDuration:!1,...t};if(!Lt(t,jt)&&Lt(t,Ct))if(t.visualDuration){const i=t.visualDuration,s=2*Math.PI/(1.2*i),o=s*s,r=2*e.clamp(.05,1,1-(t.bounce||0))*Math.sqrt(o);n={...n,mass:vt,stiffness:o,damping:r}}else{const e=Rt(t);n={...n,...e,mass:vt},n.isResolvedFromDuration=!0}return n}({...i,velocity:-e.millisecondsToSeconds(i.velocity||0)}),f=p||0,y=c/(2*Math.sqrt(u*h)),g=a-r,v=e.millisecondsToSeconds(Math.sqrt(u/h)),x=Math.abs(g)<5;let T;if(s||(s=x?St.granular:St.default),o||(o=x?Pt.granular:Pt.default),y<1){const t=Bt(v,y);T=e=>{const n=Math.exp(-y*v*e);return a-n*((f+y*v*g)/t*Math.sin(t*e)+g*Math.cos(t*e))}}else if(1===y)T=t=>a-Math.exp(-v*t)*(g+(f+v*g)*t);else{const t=v*Math.sqrt(y*y-1);T=e=>{const n=Math.exp(-y*v*e),i=Math.min(t*e,300);return a-n*((f+y*v*g)*Math.sinh(i)+t*g*Math.cosh(i))/t}}const w={calculatedDuration:m&&d||null,next:t=>{const n=T(t);if(m)l.done=t>=d;else{let i=0===t?f:0;y<1&&(i=0===t?e.secondsToMilliseconds(f):ft(T,t,n));const r=Math.abs(i)<=s,u=Math.abs(a-n)<=o;l.done=r&&u}return l.value=l.done?a:n,l},toString:()=>{const t=Math.min(pt(w),dt),e=ht(e=>w.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return w}function Ot({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:u=.5,restSpeed:c}){const h=t[0],d={done:!1,value:h},p=t=>void 0===a?l:void 0===l||Math.abs(a-t)<Math.abs(l-t)?a:l;let m=n*e;const f=h+m,y=void 0===r?f:r(f);y!==f&&(m=y-h);const g=t=>-m*Math.exp(-t/i),v=t=>y+g(t),x=t=>{const e=g(t),n=v(t);d.done=Math.abs(e)<=u,d.value=d.done?y:n};let T,w;const b=t=>{var e;(e=d.value,void 0!==a&&e<a||void 0!==l&&e>l)&&(T=t,w=Ft({keyframes:[d.value,p(d.value)],velocity:ft(v,t,d.value),damping:s,stiffness:o,restDelta:u,restSpeed:c}))};return b(0),{calculatedDuration:null,next:t=>{let e=!1;return w||void 0!==T||(e=!0,x(t),b(t)),void 0!==T&&t>=T?w.next(t-T):(!e&&x(t),d)}}}function It(t,n,{clamp:i=!0,ease:s,mixer:o}={}){const r=t.length;if(e.invariant(r===n.length,"Both input and output ranges must be the same length","range-length"),1===r)return()=>n[0];if(2===r&&n[0]===n[1])return()=>n[1];const a=t[0]===t[1];t[0]>t[r-1]&&(t=[...t].reverse(),n=[...n].reverse());const l=function(t,n,i){const s=[],o=i||e.MotionGlobalConfig.mix||ut,r=t.length-1;for(let i=0;i<r;i++){let r=o(t[i],t[i+1]);if(n){const t=Array.isArray(n)?n[i]||e.noop:n;r=e.pipe(t,r)}s.push(r)}return s}(n,s,o),u=l.length,c=i=>{if(a&&i<t[0])return n[0];let s=0;if(u>1)for(;s<t.length-2&&!(i<t[s+1]);s++);const o=e.progress(t[s],t[s+1],i);return l[s](o)};return i?n=>c(e.clamp(t[0],t[r-1],n)):c}function Ut(t,n){const i=t[t.length-1];for(let s=1;s<=n;s++){const o=e.progress(0,n,s);t.push(_(i,1,o))}}function Nt(t){const e=[0];return Ut(e,t.length-1),e}function $t(t,e){return t.map(t=>t*e)}function Wt(t,n){return t.map(()=>n||e.easeInOut).splice(0,t.length-1)}function Kt({duration:t=300,keyframes:n,times:i,ease:s="easeInOut"}){const o=e.isEasingArray(s)?s.map(e.easingDefinitionToFunction):e.easingDefinitionToFunction(s),r={done:!1,value:n[0]},a=It($t(i&&i.length===n.length?i:Nt(n),t),n,{ease:Array.isArray(o)?o:Wt(n,o)});return{calculatedDuration:t,next:e=>(r.value=a(e),r.done=e>=t,r)}}Ft.applyToOptions=t=>{const n=mt(t,100,Ft);return t.ease=n.ease,t.duration=e.secondsToMilliseconds(n.duration),t.type="keyframes",t};const zt=t=>null!==t;function Yt(t,{repeat:e,repeatType:n="loop"},i,s=1){const o=t.filter(zt),r=s<0||e&&"loop"!==n&&e%2==1?0:o.length-1;return r&&void 0!==i?i:o[r]}const Xt={decay:Ot,inertia:Ot,tween:Kt,keyframes:Kt,spring:Ft};function Gt(t){"string"==typeof t.type&&(t.type=Xt[t.type])}class qt{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}const Ht=t=>t/100;class Zt extends qt{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:t}=this.options;t&&t.updatedAt!==h.now()&&this.tick(h.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},d.mainThread++,this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause()}initAnimation(){const{options:t}=this;Gt(t);const{type:n=Kt,repeat:i=0,repeatDelay:s=0,repeatType:o,velocity:r=0}=t;let{keyframes:a}=t;const l=n||Kt;l!==Kt&&"number"!=typeof a[0]&&(this.mixKeyframes=e.pipe(Ht,ut(a[0],a[1])),a=[0,100]);const u=l({...t,keyframes:a});"mirror"===o&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-r})),null===u.calculatedDuration&&(u.calculatedDuration=pt(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+s,this.totalDuration=this.resolvedDuration*(i+1)-s,this.generator=u}updateTime(t){const e=Math.round(t-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=e}tick(t,n=!1){const{generator:i,totalDuration:s,mixKeyframes:o,mirroredGenerator:r,resolvedDuration:a,calculatedDuration:l}=this;if(null===this.startTime)return i.next(0);const{delay:u=0,keyframes:c,repeat:h,repeatType:d,repeatDelay:p,type:m,onUpdate:f,finalKeyframe:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const g=this.currentTime-u*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?g<0:g>s;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=s);let x=this.currentTime,T=i;if(h){const t=Math.min(this.currentTime,s)/a;let n=Math.floor(t),i=t%1;!i&&t>=1&&(i=1),1===i&&n--,n=Math.min(n,h+1);Boolean(n%2)&&("reverse"===d?(i=1-i,p&&(i-=p/a)):"mirror"===d&&(T=r)),x=e.clamp(0,1,i)*a}const w=v?{done:!1,value:c[0]}:T.next(x);o&&(w.value=o(w.value));let{done:b}=w;v||null===l||(b=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const S=null===this.holdTime&&("finished"===this.state||"running"===this.state&&b);return S&&m!==Ot&&(w.value=Yt(c,this.options,y,this.speed)),f&&f(w.value),S&&this.finish(),w}then(t,e){return this.finished.then(t,e)}get duration(){return e.millisecondsToSeconds(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+e.millisecondsToSeconds(t)}get time(){return e.millisecondsToSeconds(this.currentTime)}set time(t){t=e.secondsToMilliseconds(t),this.currentTime=t,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(h.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=e.millisecondsToSeconds(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=ct,startTime:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),this.options.onPlay?.();const n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime||(this.startTime=e??n),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(h.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null,d.mainThread--}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function _t(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const Jt=t=>180*t/Math.PI,Qt=t=>{const e=Jt(Math.atan2(t[1],t[0]));return ee(e)},te={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Qt,rotateZ:Qt,skewX:t=>Jt(Math.atan(t[1])),skewY:t=>Jt(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},ee=t=>((t%=360)<0&&(t+=360),t),ne=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),ie=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),se={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ne,scaleY:ie,scale:t=>(ne(t)+ie(t))/2,rotateX:t=>ee(Jt(Math.atan2(t[6],t[5]))),rotateY:t=>ee(Jt(Math.atan2(-t[2],t[0]))),rotateZ:Qt,rotate:Qt,skewX:t=>Jt(Math.atan(t[4])),skewY:t=>Jt(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function oe(t){return t.includes("scale")?1:0}function re(t,e){if(!t||"none"===t)return oe(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(n)i=se,s=n;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=te,s=e}if(!s)return oe(e);const o=i[e],r=s[1].split(",").map(le);return"function"==typeof o?o(r):r[o]}const ae=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return re(n,e)};function le(t){return parseFloat(t.trim())}const ue=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ce=(()=>new Set(ue))(),he=t=>t===x||t===C,de=new Set(["x","y","z"]),pe=ue.filter(t=>!de.has(t));const me={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>re(e,"x"),y:(t,{transform:e})=>re(e,"y")};me.translateX=me.x,me.translateY=me.y;const fe=new Set;let ye=!1,ge=!1,ve=!1;function xe(){if(ge){const t=Array.from(fe).filter(t=>t.needsMeasurement),e=new Set(t.map(t=>t.element)),n=new Map;e.forEach(t=>{const e=function(t){const e=[];return pe.forEach(n=>{const i=t.getValue(n);void 0!==i&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),e}(t);e.length&&(n.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();const e=n.get(t);e&&e.forEach(([e,n])=>{t.getValue(e)?.set(n)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}ge=!1,ye=!1,fe.forEach(t=>t.complete(ve)),fe.clear()}function Te(){fe.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(ge=!0)})}function we(){ve=!0,Te(),xe(),ve=!1}class be{constructor(t,e,n,i,s,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(fe.add(this),ye||(ye=!0,o.read(Te),o.resolveKeyframes(xe))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:i}=this;if(null===t[0]){const s=i?.get(),o=t[t.length-1];if(void 0!==s)t[0]=s;else if(n&&e){const i=n.readValue(e,o);null!=i&&(t[0]=i)}void 0===t[0]&&(t[0]=o),i&&void 0===s&&i.set(t[0])}_t(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),fe.delete(this)}cancel(){"scheduled"===this.state&&(fe.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const Se=t=>t.startsWith("--");function Pe(t,e,n){Se(e)?t.style.setProperty(e,n):t.style[e]=n}const Ae=e.memo(()=>void 0!==window.ScrollTimeline),Ve={};function Ee(t,n){const i=e.memo(t);return()=>Ve[n]??i()}const Me=Ee(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),De=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,Re={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:De([0,.65,.55,1]),circOut:De([.55,0,1,.45]),backIn:De([.31,.01,.66,-.59]),backOut:De([.33,1.53,.69,.99])};function ke(t,n){return t?"function"==typeof t?Me()?ht(t,n):"ease-out":e.isBezierDefinition(t)?De(t):Array.isArray(t)?t.map(t=>ke(t,n)||Re.easeOut):Re[t]:void 0}function Be(t,e,n,{delay:s=0,duration:o=300,repeat:r=0,repeatType:a="loop",ease:l="easeOut",times:u}={},c=void 0){const h={[e]:n};u&&(h.offset=u);const p=ke(l,o);Array.isArray(p)&&(h.easing=p),i.value&&d.waapi++;const m={delay:s,duration:o,easing:Array.isArray(p)?"linear":p,fill:"both",iterations:r+1,direction:"reverse"===a?"alternate":"normal"};c&&(m.pseudoElement=c);const f=t.animate(h,m);return i.value&&f.finished.finally(()=>{d.waapi--}),f}function Ce(t){return"function"==typeof t&&"applyToOptions"in t}function je({type:t,...e}){return Ce(t)&&Me()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class Le extends qt{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:i,keyframes:s,pseudoElement:o,allowFlatten:r=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=Boolean(o),this.allowFlatten=r,this.options=t,e.invariant("string"!=typeof t.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const u=je(t);this.animation=Be(n,i,s,u,o),!1===u.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const t=Yt(s,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(t):Pe(n,i,t),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;"idle"!==t&&"finished"!==t&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return e.millisecondsToSeconds(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+e.millisecondsToSeconds(t)}get time(){return e.millisecondsToSeconds(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=e.secondsToMilliseconds(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&Ae()?(this.animation.timeline=t,e.noop):n(this)}}const Fe={anticipate:e.anticipate,backInOut:e.backInOut,circInOut:e.circInOut};function Oe(t){"string"==typeof t.ease&&t.ease in Fe&&(t.ease=Fe[t.ease])}class Ie extends Le{constructor(t){Oe(t),Gt(t),super(t),void 0!==t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:i,onComplete:s,element:o,...r}=this.options;if(!n)return;if(void 0!==t)return void n.set(t);const a=new Zt({...r,autoplay:!1}),l=Math.max(10,h.now()-this.startTime),u=e.clamp(0,10,l-10);n.setWithVelocity(a.sample(Math.max(0,l-u)).value,a.sample(l).value,u),a.stop()}}const Ue=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!G.test(t)&&"0"!==t||t.startsWith("url(")));function Ne(t){t.duration=0,t.type="keyframes"}const $e=new Set(["opacity","clipPath","filter","transform"]),We=e.memo(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Ke(t){const{motionValue:e,name:n,repeatDelay:i,repeatType:s,damping:o,type:r}=t,a=e?.owner?.current;if(!(a instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=e.owner.getProps();return We()&&n&&$e.has(n)&&("transform"!==n||!u)&&!l&&!i&&"mirror"!==s&&0!==o&&"inertia"!==r}class ze extends qt{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:o="loop",keyframes:r,name:a,motionValue:l,element:u,...c}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=h.now();const d={autoplay:t,delay:e,type:n,repeat:i,repeatDelay:s,repeatType:o,name:a,motionValue:l,element:u,...c},p=u?.KeyframeResolver||be;this.keyframeResolver=new p(r,(t,e,n)=>this.onKeyframesResolved(t,e,d,!n),a,l,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,i,s){this.keyframeResolver=void 0;const{name:o,type:r,velocity:a,delay:l,isHandoff:u,onUpdate:c}=i;this.resolvedAt=h.now(),function(t,n,i,s){const o=t[0];if(null===o)return!1;if("display"===n||"visibility"===n)return!0;const r=t[t.length-1],a=Ue(o,n),l=Ue(r,n);return e.warning(a===l,`You are trying to animate ${n} from "${o}" to "${r}". "${a?r:o}" is not an animatable value.`,"value-not-animatable"),!(!a||!l)&&(function(t){const e=t[0];if(1===t.length)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}(t)||("spring"===i||Ce(i))&&s)}(t,o,r,a)||(!e.MotionGlobalConfig.instantAnimations&&l||c?.(Yt(t,i,n)),t[0]=t[t.length-1],Ne(i),i.repeat=0);const d={startTime:s?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:n,...i,keyframes:t},p=!u&&Ke(d),m=d.motionValue?.owner?.current,f=p?new Ie({...d,element:m}):new Zt(d);f.finished.then(()=>{this.notifyFinished()}).catch(e.noop),this.pendingTimeline&&(this.stopTimeline=f.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=f}get finished(){return this._animation?this.animation.finished:this._finished}then(t,e){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),we()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}class Ye{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=e}attachTimeline(t){const e=this.animations.map(e=>e.attachTimeline(t));return()=>{e.forEach((t,e)=>{t&&t(),this.animations[e].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return Xe(this.animations,"duration")}get iterationDuration(){return Xe(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(e=>e[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function Xe(t,e){let n=0;for(let i=0;i<t.length;i++){const s=t[i][e];null!==s&&s>n&&(n=s)}return n}class Ge extends Le{constructor(t){super(),this.animation=t,t.onfinish=()=>{this.finishedTime=this.time,this.notifyFinished()}}}const qe=new WeakMap;const He=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Ze(t){const e=He.exec(t);if(!e)return[,];const[,n,i,s]=e;return[`--${n??i}`,s]}function _e(t,n,i=1){e.invariant(i<=4,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,o]=Ze(t);if(!s)return;const r=window.getComputedStyle(n).getPropertyValue(s);if(r){const t=r.trim();return e.isNumericalString(t)?parseFloat(t):t}return y(o)?_e(o,n,i+1):o}function Je(t,e){return t?.[e]??t?.default??t}const Qe={type:"spring",stiffness:500,damping:25,restSpeed:10},tn={type:"keyframes",duration:.8},en={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},nn=(t,{keyframes:e})=>e.length>2?tn:ce.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:Qe:en;function sn({when:t,delay:e,delayChildren:n,staggerChildren:i,staggerDirection:s,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const on=t=>null!==t;function rn(t,{repeat:e,repeatType:n="loop"},i){const s=t.filter(on),o=e&&"loop"!==n&&e%2==1?0:s.length-1;return o&&void 0!==i?i:s[o]}function an(t,e,n,i=0,s=1){const o=Array.from(t).sort((t,e)=>t.sortNodePosition(e)).indexOf(e),r=t.size,a=(r-1)*i;return"function"==typeof n?n(o,r):1===s?o*i:a-o*i}const ln=(t,n,i,s={},r,a)=>l=>{const u=Je(s,t)||{},c=u.delay||s.delay||0;let{elapsed:h=0}=s;h-=e.secondsToMilliseconds(c);const d={keyframes:Array.isArray(i)?i:[null,i],ease:"easeOut",velocity:n.getVelocity(),...u,delay:-h,onUpdate:t=>{n.set(t),u.onUpdate&&u.onUpdate(t)},onComplete:()=>{l(),u.onComplete&&u.onComplete()},name:t,motionValue:n,element:a?void 0:r};sn(u)||Object.assign(d,nn(t,d)),d.duration&&(d.duration=e.secondsToMilliseconds(d.duration)),d.repeatDelay&&(d.repeatDelay=e.secondsToMilliseconds(d.repeatDelay)),void 0!==d.from&&(d.keyframes[0]=d.from);let p=!1;if((!1===d.type||0===d.duration&&!d.repeatDelay)&&(Ne(d),0===d.delay&&(p=!0)),(e.MotionGlobalConfig.instantAnimations||e.MotionGlobalConfig.skipAnimations)&&(p=!0,Ne(d),d.delay=0),d.allowFlatten=!u.type&&!u.ease,p&&!a&&void 0!==n.get()){const t=rn(d.keyframes,u);if(void 0!==t)return void o.update(()=>{d.onUpdate(t),d.onComplete()})}return u.isSync?new Zt(d):new ze(d)},un=new Set(["width","height","top","left","right","bottom",...ue]),cn={current:void 0};class hn{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=t=>{const e=h.now();if(this.updatedAt!==e&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const t of this.dependents)t.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=h.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new e.SubscriptionManager);const i=this.events[t].add(n);return"change"===t?()=>{i(),o.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return cn.current&&cn.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=h.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,30);return e.velocityPerSecond(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function dn(t,e){return new hn(t,e)}function pn(t){const e=[{},{}];return t?.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function mn(t,e,n,i){if("function"==typeof e){const[s,o]=pn(i);e=e(void 0!==n?n:t.custom,s,o)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[s,o]=pn(i);e=e(void 0!==n?n:t.custom,s,o)}return e}function fn(t,e,n){const i=t.getProps();return mn(i,e,void 0!==n?n:i.custom,t)}const yn=t=>Array.isArray(t);function gn(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,dn(n))}function vn(t){return yn(t)?t[t.length-1]||0:t}function xn(t,e){const n=fn(t,e);let{transitionEnd:i={},transition:s={},...o}=n||{};o={...o,...i};for(const e in o){gn(t,e,vn(o[e]))}}const Tn=t=>Boolean(t&&t.getVelocity);function wn(t){return Boolean(Tn(t)&&t.add)}function bn(t,n){const i=t.getValue("willChange");if(wn(i))return i.add(n);if(!i&&e.MotionGlobalConfig.WillChange){const i=new e.MotionGlobalConfig.WillChange("auto");t.addValue("willChange",i),i.add(n)}}function Sn(t){return t.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const Pn="framerAppearId",An="data-"+Sn(Pn);function Vn(t){return t.props[An]}function En({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,i}function Mn(t,e,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:r=t.getDefaultTransition(),transitionEnd:a,...l}=e;i&&(r=i);const u=[],c=s&&t.animationState&&t.animationState.getState()[s];for(const e in l){const i=t.getValue(e,t.latestValues[e]??null),s=l[e];if(void 0===s||c&&En(c,e))continue;const a={delay:n,...Je(r||{},e)},h=i.get();if(void 0!==h&&!i.isAnimating&&!Array.isArray(s)&&s===h&&!a.velocity)continue;let d=!1;if(window.MotionHandoffAnimation){const n=Vn(t);if(n){const t=window.MotionHandoffAnimation(n,e,o);null!==t&&(a.startTime=t,d=!0)}}bn(t,e),i.start(ln(e,i,s,t.shouldReduceMotion&&un.has(e)?{type:!1}:a,t,d));const p=i.animation;p&&u.push(p)}return a&&Promise.all(u).then(()=>{o.update(()=>{a&&xn(t,a)})}),u}function Dn(t,e,n={}){const i=fn(t,e,"exit"===n.type?t.presenceContext?.custom:void 0);let{transition:s=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const o=i?()=>Promise.all(Mn(t,i,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(i=0)=>{const{delayChildren:o=0,staggerChildren:r,staggerDirection:a}=s;return function(t,e,n=0,i=0,s=0,o=1,r){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(Dn(l,e,{...r,delay:n+("function"==typeof i?0:i)+an(t.variantChildren,l,i,s,o)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}(t,e,i,o,r,a,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[t,e]="beforeChildren"===a?[o,r]:[r,o];return t().then(()=>e())}return Promise.all([o(),r(n.delay)])}function Rn(t,e,n={}){let i;if(t.notify("AnimationStart",e),Array.isArray(e)){const s=e.map(e=>Dn(t,e,n));i=Promise.all(s)}else if("string"==typeof e)i=Dn(t,e,n);else{const s="function"==typeof e?fn(t,e,n.custom):e;i=Promise.all(Mn(t,s,n))}return i.then(()=>{t.notify("AnimationComplete",e)})}const kn=t=>e=>e.test(t),Bn=[x,C,B,k,L,j,{test:t=>"auto"===t,parse:t=>t}],Cn=t=>Bn.find(kn(t));function jn(t){return"number"==typeof t?0===t:null===t||("none"===t||"0"===t||e.isZeroValueString(t))}const Ln=new Set(["brightness","contrast","saturate","opacity"]);function Fn(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(S)||[];if(!i)return t;const s=n.replace(i,"");let o=Ln.has(e)?1:0;return i!==n&&(o*=100),e+"("+o+s+")"}const On=/\b([a-z-]*)\(.*?\)/gu,In={...G,getAnimatableNone:t=>{const e=t.match(On);return e?e.map(Fn).join(" "):t}},Un={...x,transform:Math.round},Nn={rotate:k,rotateX:k,rotateY:k,rotateZ:k,scale:w,scaleX:w,scaleY:w,scaleZ:w,skew:k,skewX:k,skewY:k,distance:C,translateX:C,translateY:C,translateZ:C,x:C,y:C,z:C,perspective:C,transformPerspective:C,opacity:T,originX:F,originY:F,originZ:C},$n={borderWidth:C,borderTopWidth:C,borderRightWidth:C,borderBottomWidth:C,borderLeftWidth:C,borderRadius:C,radius:C,borderTopLeftRadius:C,borderTopRightRadius:C,borderBottomRightRadius:C,borderBottomLeftRadius:C,width:C,maxWidth:C,height:C,maxHeight:C,top:C,right:C,bottom:C,left:C,inset:C,insetBlock:C,insetBlockStart:C,insetBlockEnd:C,insetInline:C,insetInlineStart:C,insetInlineEnd:C,padding:C,paddingTop:C,paddingRight:C,paddingBottom:C,paddingLeft:C,paddingBlock:C,paddingBlockStart:C,paddingBlockEnd:C,paddingInline:C,paddingInlineStart:C,paddingInlineEnd:C,margin:C,marginTop:C,marginRight:C,marginBottom:C,marginLeft:C,marginBlock:C,marginBlockStart:C,marginBlockEnd:C,marginInline:C,marginInlineStart:C,marginInlineEnd:C,backgroundPositionX:C,backgroundPositionY:C,...Nn,zIndex:Un,fillOpacity:T,strokeOpacity:T,numOctaves:Un},Wn={...$n,color:I,backgroundColor:I,outlineColor:I,fill:I,stroke:I,borderColor:I,borderTopColor:I,borderRightColor:I,borderBottomColor:I,borderLeftColor:I,filter:In,WebkitFilter:In},Kn=t=>Wn[t];function zn(t,e){let n=Kn(t);return n!==In&&(n=G),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Yn=new Set(["auto","none","0"]);class Xn extends be{constructor(t,e,n,i,s){super(t,e,n,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e||!e.current)return;super.readKeyframes();for(let n=0;n<t.length;n++){let i=t[n];if("string"==typeof i&&(i=i.trim(),y(i))){const s=_e(i,e.current);void 0!==s&&(t[n]=s),n===t.length-1&&(this.finalKeyframe=i)}}if(this.resolveNoneKeyframes(),!un.has(n)||2!==t.length)return;const[i,s]=t,o=Cn(i),r=Cn(s);if(v(i)!==v(s)&&me[n])this.needsMeasurement=!0;else if(o!==r)if(he(o)&&he(r))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else me[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)(null===t[e]||jn(t[e]))&&n.push(e);n.length&&function(t,e,n){let i,s=0;for(;s<t.length&&!i;){const e=t[s];"string"==typeof e&&!Yn.has(e)&&K(e).values.length&&(i=t[s]),s++}if(i&&n)for(const s of e)t[s]=zn(n,i)}(t,n,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t||!t.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=me[n](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const i=e[e.length-1];void 0!==i&&t.getValue(n,i).jump(i,!1)}measureEndState(){const{element:t,name:e,unresolvedKeyframes:n}=this;if(!t||!t.current)return;const i=t.getValue(e);i&&i.jump(this.measuredOrigin,!1);const s=n.length-1,o=n[s];n[s]=me[e](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==o&&void 0===this.finalKeyframe&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEach(([e,n])=>{t.getValue(e).set(n)}),this.resolveNoneKeyframes()}}const Gn=new Set(["borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius","radius","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius","width","maxWidth","height","maxHeight","top","right","bottom","left","inset","insetBlock","insetBlockStart","insetBlockEnd","insetInline","insetInlineStart","insetInlineEnd","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingBlock","paddingBlockStart","paddingBlockEnd","paddingInline","paddingInlineStart","paddingInlineEnd","margin","marginTop","marginRight","marginBottom","marginLeft","marginBlock","marginBlockStart","marginBlockEnd","marginInline","marginInlineStart","marginInlineEnd","backgroundPositionX","backgroundPositionY"]);const qn=e.memo(()=>{try{document.createElement("div").animate({opacity:[1]})}catch(t){return!1}return!0}),Hn=new Set(["opacity","clipPath","filter","transform"]);function Zn(t,e,n){if(t instanceof EventTarget)return[t];if("string"==typeof t){let i=document;e&&(i=e.current);const s=n?.[t]??i.querySelectorAll(t);return s?Array.from(s):[]}return Array.from(t)}function _n(t){return(e,n)=>{const i=Zn(e),s=[];for(const e of i){const i=t(e,n);s.push(i)}return()=>{for(const t of s)t()}}}const Jn=(t,e)=>e&&"number"==typeof t?e.transform(t):t;class Qn{constructor(){this.latest={},this.values=new Map}set(t,e,n,i,s=!0){const a=this.values.get(t);a&&a.onRemove();const l=()=>{const i=e.get();this.latest[t]=s?Jn(i,$n[t]):i,n&&o.render(n)};l();const u=e.on("change",l);i&&e.addDependent(i);const c=()=>{u(),n&&r(n),this.values.delete(t),i&&e.removeDependent(i)};return this.values.set(t,{value:e,onRemove:c}),c}get(t){return this.values.get(t)?.value}destroy(){for(const t of this.values.values())t.onRemove()}}function ti(t){const e=new WeakMap,n=[];return(i,s)=>{const o=e.get(i)??new Qn;e.set(i,o);for(const e in s){const r=s[e],a=t(i,o,e,r);n.push(a)}return()=>{for(const t of n)t()}}}const ei=(t,e,n,i)=>{const s=function(t,e){if(!(e in t))return!1;const n=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),e)||Object.getOwnPropertyDescriptor(t,e);return n&&"function"==typeof n.set}(t,n),o=s?n:n.startsWith("data")||n.startsWith("aria")?Sn(n):n,r=s?()=>{t[o]=e.latest[n]}:()=>{const i=e.latest[n];null==i?t.removeAttribute(o):t.setAttribute(o,String(i))};return e.set(n,i,r)},ni=_n(ti(ei)),ii=ti((t,e,n,i)=>e.set(n,i,()=>{t[n]=e.latest[n]},void 0,!1));function si(t){return e.isObject(t)&&"offsetHeight"in t}const oi={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};const ri=new Set(["originX","originY","originZ"]),ai=(t,e,n,i)=>{let s,o;return ce.has(n)?(e.get("transform")||(si(t)||e.get("transformBox")||ai(t,e,"transformBox",new hn("fill-box")),e.set("transform",new hn("none"),()=>{t.style.transform=function(t){let e="",n=!0;for(let i=0;i<ue.length;i++){const s=ue[i],o=t.latest[s];if(void 0===o)continue;let r=!0;r="number"==typeof o?o===(s.startsWith("scale")?1:0):0===parseFloat(o),r||(n=!1,e+=`${oi[s]||s}(${t.latest[s]}) `)}return n?"none":e.trim()}(e)})),o=e.get("transform")):ri.has(n)?(e.get("transformOrigin")||e.set("transformOrigin",new hn(""),()=>{const n=e.latest.originX??"50%",i=e.latest.originY??"50%",s=e.latest.originZ??0;t.style.transformOrigin=`${n} ${i} ${s}`}),o=e.get("transformOrigin")):s=Se(n)?()=>{t.style.setProperty(n,e.latest[n])}:()=>{t.style[n]=e.latest[n]},e.set(n,i,s,o)},li=_n(ti(ai)),ui=C.transform;const ci=_n(ti((t,e,n,i)=>{if(n.startsWith("path"))return function(t,e,n,i){return o.render(()=>t.setAttribute("pathLength","1")),"pathOffset"===n?e.set(n,i,()=>t.setAttribute("stroke-dashoffset",ui(-e.latest[n]))):(e.get("stroke-dasharray")||e.set("stroke-dasharray",new hn("1 1"),()=>{const{pathLength:n=1,pathSpacing:i}=e.latest;t.setAttribute("stroke-dasharray",`${ui(n)} ${ui(i??1-Number(n))}`)}),e.set(n,i,void 0,e.get("stroke-dasharray")))}(t,e,n,i);if(n.startsWith("attr"))return ei(t,e,function(t){return t.replace(/^attr([A-Z])/,(t,e)=>e.toLowerCase())}(n),i);return(n in t.style?ai:ei)(t,e,n,i)}));const{schedule:hi,cancel:di}=s(queueMicrotask,!1),pi={x:!1,y:!1};function mi(){return pi.x||pi.y}function fi(t,e){const n=Zn(t),i=new AbortController;return[n,{passive:!0,...e,signal:i.signal},()=>i.abort()]}function yi(t){return!("touch"===t.pointerType||mi())}const gi=(t,e)=>!!e&&(t===e||gi(t,e.parentElement)),vi=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary,xi=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Ti(t){return xi.has(t.tagName)||!0===t.isContentEditable}const wi=new WeakSet;function bi(t){return e=>{"Enter"===e.key&&t(e)}}function Si(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function Pi(t){return vi(t)&&!mi()}function Ai(t){return e.isObject(t)&&"ownerSVGElement"in t}const Vi=new WeakMap;let Ei;const Mi=(t,e,n)=>(i,s)=>s&&s[0]?s[0][t+"Size"]:Ai(i)&&"getBBox"in i?i.getBBox()[e]:i[n],Di=Mi("inline","width","offsetWidth"),Ri=Mi("block","height","offsetHeight");function ki({target:t,borderBoxSize:e}){Vi.get(t)?.forEach(n=>{n(t,{get width(){return Di(t,e)},get height(){return Ri(t,e)}})})}function Bi(t){t.forEach(ki)}function Ci(t,e){Ei||"undefined"!=typeof ResizeObserver&&(Ei=new ResizeObserver(Bi));const n=Zn(t);return n.forEach(t=>{let n=Vi.get(t);n||(n=new Set,Vi.set(t,n)),n.add(e),Ei?.observe(t)}),()=>{n.forEach(t=>{const n=Vi.get(t);n?.delete(e),n?.size||Ei?.unobserve(t)})}}const ji=new Set;let Li;function Fi(t){return ji.add(t),Li||(Li=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};ji.forEach(e=>e(t))},window.addEventListener("resize",Li)),()=>{ji.delete(t),ji.size||"function"!=typeof Li||(window.removeEventListener("resize",Li),Li=void 0)}}function Oi(){const{value:t}=i;null!==t?(t.frameloop.rate.push(a.delta),t.animations.mainThread.push(d.mainThread),t.animations.waapi.push(d.waapi),t.animations.layout.push(d.layout)):r(Oi)}function Ii(t){return t.reduce((t,e)=>t+e,0)/t.length}function Ui(t,e=Ii){return 0===t.length?{min:0,max:0,avg:0}:{min:Math.min(...t),max:Math.max(...t),avg:e(t)}}const Ni=t=>Math.round(1e3/t);function $i(){i.value=null,i.addProjectionMetrics=null}function Wi(){const{value:t}=i;if(!t)throw new Error("Stats are not being measured");$i(),r(Oi);const e={frameloop:{setup:Ui(t.frameloop.setup),rate:Ui(t.frameloop.rate),read:Ui(t.frameloop.read),resolveKeyframes:Ui(t.frameloop.resolveKeyframes),preUpdate:Ui(t.frameloop.preUpdate),update:Ui(t.frameloop.update),preRender:Ui(t.frameloop.preRender),render:Ui(t.frameloop.render),postRender:Ui(t.frameloop.postRender)},animations:{mainThread:Ui(t.animations.mainThread),waapi:Ui(t.animations.waapi),layout:Ui(t.animations.layout)},layoutProjection:{nodes:Ui(t.layoutProjection.nodes),calculatedTargetDeltas:Ui(t.layoutProjection.calculatedTargetDeltas),calculatedProjections:Ui(t.layoutProjection.calculatedProjections)}},{rate:n}=e.frameloop;return n.min=Ni(n.min),n.max=Ni(n.max),n.avg=Ni(n.avg),[n.min,n.max]=[n.max,n.min],e}function Ki(t){return Ai(t)&&"svg"===t.tagName}function zi(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}}function Yi(...t){const e=!Array.isArray(t[0]),n=e?0:-1,i=t[0+n],s=It(t[1+n],t[2+n],t[3+n]);return e?s(i):s}function Xi(t){const e=[];cn.current=e;const n=t();cn.current=void 0;const i=dn(n);return function(t,e,n){const i=()=>e.set(n()),s=()=>o.preRender(i,!1,!0),a=t.map(t=>t.on("change",s));e.on("destroy",()=>{a.forEach(t=>t()),r(i)})}(e,i,t),i}function Gi(t,e,n){const i=t.get();let s,r=null,a=i;const l="string"==typeof i?i.replace(/[\d.-]/g,""):void 0,u=()=>{r&&(r.stop(),r=null)};if(t.attach((e,i)=>{a=e,s=t=>i(qi(t,l)),o.postRender(()=>{u(),r=new Zt({keyframes:[Hi(t.get()),Hi(a)],velocity:t.getVelocity(),type:"spring",restDelta:.001,restSpeed:.01,...n,onUpdate:s}),t.events.animationStart?.notify(),r?.then(()=>{t.events.animationComplete?.notify()})})},u),Tn(e)){const n=e.on("change",e=>t.set(qi(e,l))),i=t.on("destroy",n);return()=>{n(),i()}}return u}function qi(t,e){return e?t+e:t}function Hi(t){return"number"==typeof t?t:parseFloat(t)}const Zi=[...Bn,I,G],_i=t=>Zi.find(kn(t));function Ji(t){return"layout"===t?"group":"enter"===t||"new"===t?"new":"exit"===t||"old"===t?"old":"group"}let Qi={},ts=null;const es=(t,e)=>{Qi[t]=e},ns=()=>{ts||(ts=document.createElement("style"),ts.id="motion-view");let t="";for(const e in Qi){const n=Qi[e];t+=`${e} {\n`;for(const[e,i]of Object.entries(n))t+=` ${e}: ${i};\n`;t+="}\n"}ts.textContent=t,document.head.appendChild(ts),Qi={}},is=()=>{ts&&ts.parentElement&&ts.parentElement.removeChild(ts)};function ss(t){const e=t.match(/::view-transition-(old|new|group|image-pair)\((.*?)\)/);return e?{layer:e[2],type:e[1]}:null}function os(t){const{effect:e}=t;return!!e&&(e.target===document.documentElement&&e.pseudoElement?.startsWith("::view-transition"))}function rs(){return document.getAnimations().filter(os)}const as=["layout","enter","exit","new","old"];function ls(t){const{update:n,targets:i,options:s}=t;if(!document.startViewTransition)return new Promise(async t=>{await n(),t(new Ye([]))});(function(t,e){return e.has(t)&&Object.keys(e.get(t)).length>0})("root",i)||es(":root",{"view-transition-name":"none"}),es("::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*)",{"animation-timing-function":"linear !important"}),ns();const o=document.startViewTransition(async()=>{await n()});return o.finished.finally(()=>{is()}),new Promise(t=>{o.ready.then(()=>{const n=rs(),o=[];i.forEach((t,n)=>{for(const i of as){if(!t[i])continue;const{keyframes:r,options:a}=t[i];for(let[t,l]of Object.entries(r)){if(!l)continue;const r={...Je(s,t),...Je(a,t)},u=Ji(i);if("opacity"===t&&!Array.isArray(l)){l=["new"===u?0:1,l]}"function"==typeof r.delay&&(r.delay=r.delay(0,1)),r.duration&&(r.duration=e.secondsToMilliseconds(r.duration)),r.delay&&(r.delay=e.secondsToMilliseconds(r.delay));const c=new Le({...r,element:document.documentElement,name:t,pseudoElement:`::view-transition-${u}(${n})`,keyframes:l});o.push(c)}}});for(const t of n){if("finished"===t.playState)continue;const{effect:n}=t;if(!(n&&n instanceof KeyframeEffect))continue;const{pseudoElement:r}=n;if(!r)continue;const a=ss(r);if(!a)continue;const l=i.get(a.layer);if(l)us(l,"enter")&&us(l,"exit")&&n.getKeyframes().some(t=>t.mixBlendMode)?o.push(new Ge(t)):t.cancel();else{const i="group"===a.type?"layout":"";let r={...Je(s,i)};r.duration&&(r.duration=e.secondsToMilliseconds(r.duration)),r=je(r);const l=ke(r.ease,r.duration);n.updateTiming({delay:e.secondsToMilliseconds(r.delay??0),duration:r.duration,easing:l}),o.push(new Ge(t))}}t(new Ye(o))})})}function us(t,e){return t?.[e]?.keyframes.opacity}let cs=[],hs=null;function ds(){hs=null;const[t]=cs;var n;t&&(n=t,e.removeItem(cs,n),hs=n,ls(n).then(t=>{n.notifyReady(t),t.finished.finally(ds)}))}function ps(){for(let t=cs.length-1;t>=0;t--){const e=cs[t],{interrupt:n}=e.options;if("immediate"===n){const n=cs.slice(0,t+1).map(t=>t.update),i=cs.slice(t+1);e.update=()=>{n.forEach(t=>t())},cs=[e,...i];break}}hs&&"immediate"!==cs[0]?.options.interrupt||ds()}class ms{constructor(t,n={}){var i;this.currentSubject="root",this.targets=new Map,this.notifyReady=e.noop,this.readyPromise=new Promise(t=>{this.notifyReady=t}),this.update=t,this.options={interrupt:"wait",...n},i=this,cs.push(i),hi.render(ps)}get(t){return this.currentSubject=t,this}layout(t,e){return this.updateTarget("layout",t,e),this}new(t,e){return this.updateTarget("new",t,e),this}old(t,e){return this.updateTarget("old",t,e),this}enter(t,e){return this.updateTarget("enter",t,e),this}exit(t,e){return this.updateTarget("exit",t,e),this}crossfade(t){return this.updateTarget("enter",{opacity:1},t),this.updateTarget("exit",{opacity:0},t),this}updateTarget(t,e,n={}){const{currentSubject:i,targets:s}=this;s.has(i)||s.set(i,{});s.get(i)[t]={keyframes:e,options:n}}then(t,e){return this.readyPromise.then(t,e)}}const fs=()=>({translate:0,scale:1,origin:0,originPoint:0}),ys=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),gs=()=>({min:0,max:0}),vs=()=>({x:{min:0,max:0},y:{min:0,max:0}}),xs={current:null},Ts={current:!1},ws="undefined"!=typeof window;function bs(){if(Ts.current=!0,ws)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>xs.current=t.matches;t.addEventListener("change",e),e()}else xs.current=!1}const Ss=new WeakMap;function Ps(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function As(t){return"string"==typeof t||Array.isArray(t)}const Vs=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Es=["initial",...Vs];function Ms(t){return Ps(t.animate)||Es.some(e=>As(t[e]))}function Ds(t){return Boolean(Ms(t)||t.variants)}function Rs(t,e,n){for(const i in e){const s=e[i],o=n[i];if(Tn(s))t.addValue(i,s);else if(Tn(o))t.addValue(i,dn(s,{owner:t}));else if(o!==s)if(t.hasValue(i)){const e=t.getValue(i);!0===e.liveStyle?e.jump(s):e.hasAnimated||e.set(s)}else{const e=t.getStaticValue(i);t.addValue(i,dn(void 0!==e?e:s,{owner:t}))}}for(const i in n)void 0===e[i]&&t.removeValue(i);return e}const ks=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Bs={};class Cs{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:i,blockInitialAnimation:s,visualState:r},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=be,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const t=h.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,o.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=r;this.latestValues=l,this.baseTarget={...l},this.initialValues=e.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=Boolean(s),this.isControllingVariants=Ms(e),this.isVariantNode=Ds(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:c,...d}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in d){const e=d[t];void 0!==l[t]&&Tn(e)&&e.set(l[t])}}mount(t){this.current=t,Ss.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((t,e)=>this.bindToMotionValue(e,t)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(Ts.current||bs(),this.shouldReduceMotion=xs.current),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),r(this.notifyUpdate),r(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,e){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=ce.has(t);n&&this.onBindTransform&&this.onBindTransform();const i=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&o.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;"undefined"!=typeof window&&window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{i(),s&&s(),e.owner&&e.stop()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in Bs){const e=Bs[t];if(!e)continue;const{isEnabled:n,Feature:i}=e;if(!this.features[t]&&i&&n(this.props)&&(this.features[t]=new i(this)),this.features[t]){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<ks.length;e++){const n=ks[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const i=t["on"+n];i&&(this.propEventSubscriptions[n]=this.on(n,i))}this.prevMotionValues=Rs(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){const n=this.values.get(t);e!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=dn(null===e?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,n){let i=void 0===this.latestValues[t]&&this.current?this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];return null!=i&&("string"==typeof i&&(e.isNumericalString(i)||e.isZeroValueString(i))?i=parseFloat(i):!_i(i)&&G.test(n)&&(i=zn(t,n)),this.setBaseTarget(t,Tn(i)?i.get():i)),Tn(i)?i.get():i}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){const{initial:e}=this.props;let n;if("string"==typeof e||"object"==typeof e){const i=mn(this.props,e,this.presenceContext?.custom);i&&(n=i[t])}if(e&&void 0!==n)return n;const i=this.getBaseTargetFromProps(this.props,t);return void 0===i||Tn(i)?void 0!==this.initialValues[t]&&void 0===n?void 0:this.baseTarget[t]:i}on(t,n){return this.events[t]||(this.events[t]=new e.SubscriptionManager),this.events[t].add(n)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}scheduleRenderMicrotask(){hi.render(this.render)}}class js extends Cs{constructor(){super(...arguments),this.KeyframeResolver=Xn}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){const n=t.style;return n?n[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Tn(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}function Ls({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function Fs(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}function Os(t){return void 0===t||1===t}function Is({scale:t,scaleX:e,scaleY:n}){return!Os(t)||!Os(e)||!Os(n)}function Us(t){return Is(t)||Ns(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Ns(t){return $s(t.x)||$s(t.y)}function $s(t){return t&&"0%"!==t}function Ws(t,e,n){return n+e*(t-n)}function Ks(t,e,n,i,s){return void 0!==s&&(t=Ws(t,s,i)),Ws(t,n,i)+e}function zs(t,e=0,n=1,i,s){t.min=Ks(t.min,e,n,i,s),t.max=Ks(t.max,e,n,i,s)}function Ys(t,{x:e,y:n}){zs(t.x,e.translate,e.scale,e.originPoint),zs(t.y,n.translate,n.scale,n.originPoint)}const Xs=.999999999999,Gs=1.0000000000001;function qs(t,e,n,i=!1){const s=n.length;if(!s)return;let o,r;e.x=e.y=1;for(let a=0;a<s;a++){o=n[a],r=o.projectionDelta;const{visualElement:s}=o.options;s&&s.props.style&&"contents"===s.props.style.display||(i&&o.options.layoutScroll&&o.scroll&&o!==o.root&&_s(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,Ys(t,r)),i&&Us(o.latestValues)&&_s(t,o.latestValues))}e.x<Gs&&e.x>Xs&&(e.x=1),e.y<Gs&&e.y>Xs&&(e.y=1)}function Hs(t,e){t.min=t.min+e,t.max=t.max+e}function Zs(t,e,n,i,s=.5){zs(t,e,n,_(t.min,t.max,s),i)}function _s(t,e){Zs(t.x,e.x,e.scaleX,e.scale,e.originX),Zs(t.y,e.y,e.scaleY,e.scale,e.originY)}function Js(t,e){return Ls(Fs(t.getBoundingClientRect(),e))}const Qs={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},to=ue.length;function eo(t,e,n){let i="",s=!0;for(let o=0;o<to;o++){const r=ue[o],a=t[r];if(void 0===a)continue;let l=!0;if(l="number"==typeof a?a===(r.startsWith("scale")?1:0):0===parseFloat(a),!l||n){const t=Jn(a,$n[r]);if(!l){s=!1;i+=`${Qs[r]||r}(${t}) `}n&&(e[r]=t)}}return i=i.trim(),n?i=n(e,s?"":i):s&&(i="none"),i}function no(t,e,n){const{style:i,vars:s,transformOrigin:o}=t;let r=!1,a=!1;for(const t in e){const n=e[t];if(ce.has(t))r=!0;else if(m(t))s[t]=n;else{const e=Jn(n,$n[t]);t.startsWith("origin")?(a=!0,o[t]=e):i[t]=e}}if(e.transform||(r||n?i.transform=eo(e,t.transform,n):i.transform&&(i.transform="none")),a){const{originX:t="50%",originY:e="50%",originZ:n=0}=o;i.transformOrigin=`${t} ${e} ${n}`}}function io(t,{style:e,vars:n},i,s){const o=t.style;let r;for(r in e)o[r]=e[r];for(r in s?.applyProjectionStyles(o,i),n)o.setProperty(r,n[r])}function so(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const oo={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!C.test(t))return t;t=parseFloat(t)}return`${so(t,e.target.x)}% ${so(t,e.target.y)}%`}},ro={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,s=G.parse(t);if(s.length>5)return i;const o=G.createTransformer(t),r="number"!=typeof s[0]?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;s[0+r]/=a,s[1+r]/=l;const u=_(a,l,.5);return"number"==typeof s[2+r]&&(s[2+r]/=u),"number"==typeof s[3+r]&&(s[3+r]/=u),o(s)}},ao={borderRadius:{...oo,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:oo,borderTopRightRadius:oo,borderBottomLeftRadius:oo,borderBottomRightRadius:oo,boxShadow:ro};function lo(t){for(const e in t)ao[e]=t[e],m(e)&&(ao[e].isCSSVariable=!0)}function uo(t,{layout:e,layoutId:n}){return ce.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!ao[t]||"opacity"===t)}function co(t,e,n){const i=t.style,s=e?.style,o={};if(!i)return o;for(const e in i)(Tn(i[e])||s&&Tn(s[e])||uo(e,t)||void 0!==n?.getValue(e)?.liveStyle)&&(o[e]=i[e]);return o}class ho extends js{constructor(){super(...arguments),this.type="html",this.renderInstance=io}readValueFromInstance(t,e){if(ce.has(e))return this.projection?.isProjecting?oe(e):ae(t,e);{const i=(n=t,window.getComputedStyle(n)),s=(m(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof s?s.trim():s}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return Js(t,e)}build(t,e,n){no(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return co(t,e,n)}}const po={offset:"stroke-dashoffset",array:"stroke-dasharray"},mo={offset:"strokeDashoffset",array:"strokeDasharray"};function fo(t,e,n=1,i=0,s=!0){t.pathLength=1;const o=s?po:mo;t[o.offset]=C.transform(-i);const r=C.transform(e),a=C.transform(n);t[o.array]=`${r} ${a}`}const yo=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function go(t,{attrX:e,attrY:n,attrScale:i,pathLength:s,pathSpacing:o=1,pathOffset:r=0,...a},l,u,c){if(no(t,a,u),l)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:h,style:d}=t;h.transform&&(d.transform=h.transform,delete h.transform),(d.transform||h.transformOrigin)&&(d.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),d.transform&&(d.transformBox=c?.transformBox??"fill-box",delete h.transformBox);for(const t of yo)void 0!==h[t]&&(d[t]=h[t],delete h[t]);void 0!==e&&(h.x=e),void 0!==n&&(h.y=n),void 0!==i&&(h.scale=i),void 0!==s&&fo(h,s,o,r,!1)}const vo=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),xo=t=>"string"==typeof t&&"svg"===t.toLowerCase();function To(t,e,n,i){io(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(vo.has(n)?n:Sn(n),e.attrs[n])}function wo(t,e,n){const i=co(t,e,n);for(const n in t)if(Tn(t[n])||Tn(e[n])){i[-1!==ue.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return i}const bo=Es.length;function So(t){if(!t)return;if(!t.isControllingVariants){const e=t.parent&&So(t.parent)||{};return void 0!==t.props.initial&&(e.initial=t.props.initial),e}const e={};for(let n=0;n<bo;n++){const i=Es[n],s=t.props[i];(As(s)||!1===s)&&(e[i]=s)}return e}function Po(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}const Ao=[...Vs].reverse(),Vo=Vs.length;function Eo(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!Po(e,t)}function Mo(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Do(){return{animate:Mo(!0),whileInView:Mo(),whileHover:Mo(),whileTap:Mo(),whileDrag:Mo(),whileFocus:Mo(),exit:Mo()}}function Ro(t){return t.max-t.min}function ko(t,e,n){return Math.abs(t-e)<=n}function Bo(t,e,n,i=.5){t.origin=i,t.originPoint=_(e.min,e.max,t.origin),t.scale=Ro(n)/Ro(e),t.translate=_(n.min,n.max,t.origin)-t.originPoint,(t.scale>=.9999&&t.scale<=1.0001||isNaN(t.scale))&&(t.scale=1),(t.translate>=-.01&&t.translate<=.01||isNaN(t.translate))&&(t.translate=0)}function Co(t,e,n,i){Bo(t.x,e.x,n.x,i?i.originX:void 0),Bo(t.y,e.y,n.y,i?i.originY:void 0)}function jo(t,e,n){t.min=n.min+e.min,t.max=t.min+Ro(e)}function Lo(t,e,n){jo(t.x,e.x,n.x),jo(t.y,e.y,n.y)}function Fo(t,e,n){t.min=e.min-n.min,t.max=t.min+Ro(e)}function Oo(t,e,n){Fo(t.x,e.x,n.x),Fo(t.y,e.y,n.y)}function Io(t,e,n,i,s){return t=Ws(t-=e,1/n,i),void 0!==s&&(t=Ws(t,1/s,i)),t}function Uo(t,e=0,n=1,i=.5,s,o=t,r=t){if(B.test(e)){e=parseFloat(e);e=_(r.min,r.max,e/100)-r.min}if("number"!=typeof e)return;let a=_(o.min,o.max,i);t===o&&(a-=e),t.min=Io(t.min,e,n,a,s),t.max=Io(t.max,e,n,a,s)}function No(t,e,[n,i,s],o,r){Uo(t,e[n],e[i],e[s],e.scale,o,r)}const $o=["x","scaleX","originX"],Wo=["y","scaleY","originY"];function Ko(t,e,n,i){No(t.x,e,$o,n?n.x:void 0,i?i.x:void 0),No(t.y,e,Wo,n?n.y:void 0,i?i.y:void 0)}function zo(t,e){t.min=e.min,t.max=e.max}function Yo(t,e){zo(t.x,e.x),zo(t.y,e.y)}function Xo(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function Go(t){return 0===t.translate&&1===t.scale}function qo(t){return Go(t.x)&&Go(t.y)}function Ho(t,e){return t.min===e.min&&t.max===e.max}function Zo(t,e){return Ho(t.x,e.x)&&Ho(t.y,e.y)}function _o(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Jo(t,e){return _o(t.x,e.x)&&_o(t.y,e.y)}function Qo(t){return Ro(t.x)/Ro(t.y)}function tr(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function er(t){return[t("x"),t("y")]}function nr(t,e,n){let i="";const s=t.x.translate/e.x,o=t.y.translate/e.y,r=n?.z||0;if((s||o||r)&&(i=`translate3d(${s}px, ${o}px, ${r}px) `),1===e.x&&1===e.y||(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:t,rotate:e,rotateX:s,rotateY:o,skewX:r,skewY:a}=n;t&&(i=`perspective(${t}px) ${i}`),e&&(i+=`rotate(${e}deg) `),s&&(i+=`rotateX(${s}deg) `),o&&(i+=`rotateY(${o}deg) `),r&&(i+=`skewX(${r}deg) `),a&&(i+=`skewY(${a}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return 1===a&&1===l||(i+=`scale(${a}, ${l})`),i||"none"}const ir=["TopLeft","TopRight","BottomLeft","BottomRight"],sr=ir.length,or=t=>"string"==typeof t?parseFloat(t):t,rr=t=>"number"==typeof t||C.test(t);function ar(t,e,n,i,s,o){s?(t.opacity=_(0,n.opacity??1,ur(i)),t.opacityExit=_(e.opacity??1,0,cr(i))):o&&(t.opacity=_(e.opacity??1,n.opacity??1,i));for(let s=0;s<sr;s++){const o=`border${ir[s]}Radius`;let r=lr(e,o),a=lr(n,o);if(void 0===r&&void 0===a)continue;r||(r=0),a||(a=0);0===r||0===a||rr(r)===rr(a)?(t[o]=Math.max(_(or(r),or(a),i),0),(B.test(a)||B.test(r))&&(t[o]+="%")):t[o]=a}(e.rotate||n.rotate)&&(t.rotate=_(e.rotate||0,n.rotate||0,i))}function lr(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const ur=hr(0,.5,e.circOut),cr=hr(.5,.95,e.noop);function hr(t,n,i){return s=>s<t?0:s>n?1:i(e.progress(t,n,s))}function dr(t,e){const n=h.now(),i=({timestamp:s})=>{const o=s-n;o>=e&&(r(i),t(o-e))};return o.setup(i,!0),()=>r(i)}function pr(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}function mr(t){return Tn(t)?t.get():t}function fr(t,e,n){const i=Tn(t)?t:dn(t);return i.start(ln("",i,e,n)),i.animation}const yr=(t,e)=>t.depth-e.depth;class gr{constructor(){this.children=[],this.isDirty=!1}add(t){e.addUniqueItem(this.children,t),this.isDirty=!0}remove(t){e.removeItem(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(yr),this.isDirty=!1,this.children.forEach(t)}}class vr{constructor(){this.members=[]}add(t){e.addUniqueItem(this.members,t),t.scheduleRender()}remove(t){if(e.removeItem(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){const e=this.members.findIndex(e=>t===e);if(0===e)return!1;let n;for(let t=e;t>=0;t--){const e=this.members[t];if(!1!==e.isPresent){n=e;break}}return!!n&&(this.promote(n),!0)}promote(t,e){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,e&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;!1===i&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:e,resumingFrom:n}=t;e.onExitComplete&&e.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const xr={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Tr={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},wr=["","X","Y","Z"];let br=0;function Sr(t,e,n,i){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),i&&(i[t]=0))}function Pr(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Vn(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:e,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",o,!(e||i))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&Pr(i)}function Ar({attachResizeListener:t,defaultParent:n,measureScroll:s,checkIsScrollRoot:u,resetTransform:c}){return class{constructor(t={},e=n?.()){this.id=br++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,i.value&&(Tr.nodes=Tr.calculatedTargetDeltas=Tr.calculatedProjections=0),this.nodes.forEach(Mr),this.nodes.forEach(Lr),this.nodes.forEach(Fr),this.nodes.forEach(Dr),i.addProjectionMetrics&&i.addProjectionMetrics(Tr)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=e?e.root||e:this,this.path=e?[...e.path,e]:[],this.parent=e,this.depth=e?e.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new gr)}addEventListener(t,n){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new e.SubscriptionManager),this.eventHandlers.get(t).add(n)}notifyListeners(t,...e){const n=this.eventHandlers.get(t);n&&n.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(e){if(this.instance)return;this.isSVG=Ai(e)&&!Ki(e),this.instance=e;const{layoutId:n,layout:i,visualElement:s}=this.options;if(s&&!s.current&&s.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(i||n)&&(this.isLayoutDirty=!0),t){let n,i=0;const s=()=>this.root.updateBlockedByResize=!1;o.read(()=>{i=window.innerWidth}),t(e,()=>{const t=window.innerWidth;t!==i&&(i=t,this.root.updateBlockedByResize=!0,n&&n(),n=dr(s,250),xr.hasAnimatedSinceResize&&(xr.hasAnimatedSinceResize=!1,this.nodes.forEach(jr)))})}n&&this.root.registerSharedNode(n,this),!1!==this.options.animate&&s&&(n||i)&&this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeLayoutChanged:n,layout:i})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const o=this.options.transition||s.getDefaultTransition()||Wr,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=s.getProps(),l=!this.targetLayout||!Jo(this.targetLayout,i),u=!e&&n;if(this.options.layoutRoot||this.resumeFrom||u||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const e={...Je(o,"layout"),onPlay:r,onComplete:a};(s.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e),this.setAnimationOrigin(t,u)}else e||jr(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=i})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),r(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Or),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Pr(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t<this.path.length;t++){const e=this.path[t];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:e,layout:n}=this.options;if(void 0===e&&!n)return;const i=this.getTransformTemplate();this.prevTransformTemplateValue=i?i(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(kr);if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(Br);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Cr),this.nodes.forEach(Vr),this.nodes.forEach(Er)):this.nodes.forEach(Br),this.clearAllSnapshots();const t=h.now();a.delta=e.clamp(0,1e3/60,t-a.timestamp),a.timestamp=t,a.isProcessing=!0,l.update.process(a),l.preRender.process(a),l.render.process(a),a.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,hi.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Rr),this.sharedNodes.forEach(Ir)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,o.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){o.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||Ro(this.snapshot.measuredBox.x)||Ro(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t<this.path.length;t++){this.path[t].updateScroll()}const t=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:e}=this.options;e&&e.notify("LayoutMeasure",this.layout.layoutBox,t?t.layoutBox:void 0)}updateScroll(t="measure"){let e=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t&&(e=!1),e&&this.instance){const e=u(this.instance);this.scroll={animationId:this.root.animationId,phase:t,isRoot:e,offset:s(this.instance),wasRoot:this.scroll?this.scroll.isRoot:e}}}resetTransform(){if(!c)return;const t=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,e=this.projectionDelta&&!qo(this.projectionDelta),n=this.getTransformTemplate(),i=n?n(this.latestValues,""):void 0,s=i!==this.prevTransformTemplateValue;t&&this.instance&&(e||Us(this.latestValues)||s)&&(c(this.instance,i),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){const e=this.measurePageBox();let n=this.removeElementScroll(e);var i;return t&&(n=this.removeTransform(n)),Yr((i=n).x),Yr(i.y),{animationId:this.root.animationId,measuredBox:e,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const e=t.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Gr))){const{scroll:t}=this.root;t&&(Hs(e.x,t.offset.x),Hs(e.y,t.offset.y))}return e}removeElementScroll(t){const e={x:{min:0,max:0},y:{min:0,max:0}};if(Yo(e,t),this.scroll?.wasRoot)return e;for(let n=0;n<this.path.length;n++){const i=this.path[n],{scroll:s,options:o}=i;i!==this.root&&s&&o.layoutScroll&&(s.wasRoot&&Yo(e,t),Hs(e.x,s.offset.x),Hs(e.y,s.offset.y))}return e}applyTransform(t,e=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};Yo(n,t);for(let t=0;t<this.path.length;t++){const i=this.path[t];!e&&i.options.layoutScroll&&i.scroll&&i!==i.root&&_s(n,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),Us(i.latestValues)&&_s(n,i.latestValues)}return Us(this.latestValues)&&_s(n,this.latestValues),n}removeTransform(t){const e={x:{min:0,max:0},y:{min:0,max:0}};Yo(e,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];if(!n.instance)continue;if(!Us(n.latestValues))continue;Is(n.latestValues)&&n.updateSnapshot();const i=vs();Yo(i,n.measurePageBox()),Ko(e,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,i)}return Us(this.latestValues)&&Ko(e,this.latestValues),e}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(t){this.options={...this.options,...t,crossfade:void 0===t.crossfade||t.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==a.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(t=!1){const e=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=e.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=e.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=e.isSharedProjectionDirty);const n=Boolean(this.resumingFrom)||this!==e;if(!(t||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:s,layoutId:o}=this.options;if(!this.layout||!s&&!o)return;this.resolvedRelativeTargetAt=a.timestamp;const r=this.getClosestProjectingParent();r&&this.linkedParentVersion!==r.layoutVersion&&!r.options.layoutRoot&&this.removeRelativeTarget(),this.targetDelta||this.relativeTarget||(r&&r.layout?this.createRelativeTarget(r,this.layout.layoutBox,r.layout.layoutBox):this.removeRelativeTarget()),(this.relativeTarget||this.targetDelta)&&(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Lo(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):Yo(this.target,this.layout.layoutBox),Ys(this.target,this.targetDelta)):Yo(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,r&&Boolean(r.resumingFrom)===Boolean(this.resumingFrom)&&!r.options.layoutScroll&&r.target&&1!==this.animationProgress?this.createRelativeTarget(r,this.target,r.target):this.relativeParent=this.relativeTarget=void 0),i.value&&Tr.calculatedTargetDeltas++)}getClosestProjectingParent(){if(this.parent&&!Is(this.parent.latestValues)&&!Ns(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(t,e,n){this.relativeParent=t,this.linkedParentVersion=t.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Oo(this.relativeTargetOrigin,e,n),Yo(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const t=this.getLead(),e=Boolean(this.resumingFrom)||this!==t;let n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),e&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===a.timestamp&&(n=!1),n)return;const{layout:s,layoutId:o}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!s&&!o)return;Yo(this.layoutCorrected,this.layout.layoutBox);const r=this.treeScale.x,l=this.treeScale.y;qs(this.layoutCorrected,this.treeScale,this.path,e),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:u}=t;u?(this.projectionDelta&&this.prevProjectionDelta?(Xo(this.prevProjectionDelta.x,this.projectionDelta.x),Xo(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),Co(this.projectionDelta,this.layoutCorrected,u,this.latestValues),this.treeScale.x===r&&this.treeScale.y===l&&tr(this.projectionDelta.x,this.prevProjectionDelta.x)&&tr(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",u)),i.value&&Tr.calculatedProjections++):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){if(this.options.visualElement?.scheduleRender(),t){const t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(t,e=!1){const n=this.snapshot,i=n?n.latestValues:{},s={...this.latestValues},o={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;const r={x:{min:0,max:0},y:{min:0,max:0}},a=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),u=!l||l.members.length<=1,c=Boolean(a&&!u&&!0===this.options.crossfade&&!this.path.some($r));let h;this.animationProgress=0,this.mixTargetDelta=e=>{const n=e/1e3;var l,d,p,m;Ur(o.x,t.x,n),Ur(o.y,t.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Oo(r,this.layout.layoutBox,this.relativeParent.layout.layoutBox),l=this.relativeTarget,d=this.relativeTargetOrigin,p=r,m=n,Nr(l.x,d.x,p.x,m),Nr(l.y,d.y,p.y,m),h&&Zo(this.relativeTarget,h)&&(this.isProjectionDirty=!1),h||(h={x:{min:0,max:0},y:{min:0,max:0}}),Yo(h,this.relativeTarget)),a&&(this.animationValues=s,ar(s,i,this.latestValues,n,c,u)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(r(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=o.update(()=>{xr.hasAnimatedSinceResize=!0,d.layout++,this.motionValue||(this.motionValue=dn(0)),this.currentAnimation=fr(this.motionValue,[0,1e3],{...t,velocity:0,isSync:!0,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onStop:()=>{d.layout--},onComplete:()=>{d.layout--,t.onComplete&&t.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead();let{targetWithTransforms:e,target:n,layout:i,latestValues:s}=t;if(e&&n&&i){if(this!==t&&this.layout&&i&&Xr(this.options.animationType,this.layout.layoutBox,i.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=Ro(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const i=Ro(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+i}Yo(e,n),_s(e,s),Co(this.projectionDeltaWithTransform,this.layoutCorrected,e,s)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new vr);this.sharedNodes.get(t).add(e);const n=e.options.initialPromotionConfig;e.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){const{layoutId:t}=this.options;return t&&this.getStack()?.lead||this}getPrevLead(){const{layoutId:t}=this.options;return t?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:n}={}){const i=this.getStack();i&&i.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetSkewAndRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:n}=t;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(e=!0),!e)return;const i={};n.z&&Sr("z",t,i,this.animationValues);for(let e=0;e<wr.length;e++)Sr(`rotate${wr[e]}`,t,i,this.animationValues),Sr(`skew${wr[e]}`,t,i,this.animationValues);t.render();for(const e in i)t.setStaticValue(e,i[e]),this.animationValues&&(this.animationValues[e]=i[e]);t.scheduleRender()}applyProjectionStyles(t,e){if(!this.instance||this.isSVG)return;if(!this.isVisible)return void(t.visibility="hidden");const n=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,t.visibility="",t.opacity="",t.pointerEvents=mr(e?.pointerEvents)||"",void(t.transform=n?n(this.latestValues,""):"none");const i=this.getLead();if(!this.projectionDelta||!this.layout||!i.target)return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=mr(e?.pointerEvents)||""),void(this.hasProjected&&!Us(this.latestValues)&&(t.transform=n?n({},""):"none",this.hasProjected=!1));t.visibility="";const s=i.animationValues||i.latestValues;this.applyTransformsToTarget();let o=nr(this.projectionDeltaWithTransform,this.treeScale,s);n&&(o=n(s,o)),t.transform=o;const{x:r,y:a}=this.projectionDelta;t.transformOrigin=`${100*r.origin}% ${100*a.origin}% 0`,i.animationValues?t.opacity=i===this?s.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:s.opacityExit:t.opacity=i===this?void 0!==s.opacity?s.opacity:"":void 0!==s.opacityExit?s.opacityExit:0;for(const e in ao){if(void 0===s[e])continue;const{correct:n,applyTo:r,isCSSVariable:a}=ao[e],l="none"===o?s[e]:n(s[e],i);if(r){const e=r.length;for(let n=0;n<e;n++)t[r[n]]=l}else a?this.options.visualElement.renderState.vars[e]=l:t[e]=l}this.options.layoutId&&(t.pointerEvents=i===this?mr(e?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(t=>t.currentAnimation?.stop()),this.root.nodes.forEach(kr),this.root.sharedNodes.clear()}}}function Vr(t){t.updateLayout()}function Er(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=t.layout,{animationType:s}=t.options,o=e.source!==t.layout.source;"size"===s?er(t=>{const i=o?e.measuredBox[t]:e.layoutBox[t],s=Ro(i);i.min=n[t].min,i.max=i.min+s}):Xr(s,e.layoutBox,n)&&er(i=>{const s=o?e.measuredBox[i]:e.layoutBox[i],r=Ro(n[i]);s.max=s.min+r,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[i].max=t.relativeTarget[i].min+r)});const r={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};Co(r,n,e.layoutBox);const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};o?Co(a,t.applyTransform(i,!0),e.measuredBox):Co(a,n,e.layoutBox);const l=!qo(r);let u=!1;if(!t.resumeFrom){const i=t.getClosestProjectingParent();if(i&&!i.resumeFrom){const{snapshot:s,layout:o}=i;if(s&&o){const r={x:{min:0,max:0},y:{min:0,max:0}};Oo(r,e.layoutBox,s.layoutBox);const a={x:{min:0,max:0},y:{min:0,max:0}};Oo(a,n,o.layoutBox),Jo(r,a)||(u=!0),i.options.layoutRoot&&(t.relativeTarget=a,t.relativeTargetOrigin=r,t.relativeParent=i)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function Mr(t){i.value&&Tr.nodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=Boolean(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Dr(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Rr(t){t.clearSnapshot()}function kr(t){t.clearMeasurements()}function Br(t){t.isLayoutDirty=!1}function Cr(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function jr(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Lr(t){t.resolveTargetDelta()}function Fr(t){t.calcProjection()}function Or(t){t.resetSkewAndRotation()}function Ir(t){t.removeLeadSnapshot()}function Ur(t,e,n){t.translate=_(e.translate,0,n),t.scale=_(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Nr(t,e,n,i){t.min=_(e.min,n.min,i),t.max=_(e.max,n.max,i)}function $r(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const Wr={duration:.45,ease:[.4,0,.1,1]},Kr=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),zr=Kr("applewebkit/")&&!Kr("chrome/")?Math.round:e.noop;function Yr(t){t.min=zr(t.min),t.max=zr(t.max)}function Xr(t,e,n){return"position"===t||"preserve-aspect"===t&&!ko(Qo(e),Qo(n),.2)}function Gr(t){return t!==t.root&&t.scroll?.wasRoot}const qr=Ar({attachResizeListener:(t,e)=>pr(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Hr={current:void 0},Zr=Ar({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Hr.current){const t=new qr({});t.mount(window),t.setOptions({layoutScroll:!0}),Hr.current=t}return Hr.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)}),_r=t=>!t.isLayoutDirty&&t.willUpdate(!1);function Jr(){const t=new Set,e=new WeakMap,n=()=>t.forEach(_r);return{add:i=>{t.add(i),e.set(i,i.addEventListener("willUpdate",n))},remove:i=>{t.delete(i);const s=e.get(i);s&&(s(),e.delete(i)),n()},dirty:n}}function Qr(t){const e=Array.from(t.querySelectorAll("[data-layout], [data-layout-id]"));var n;return t instanceof Element&&((n=t).hasAttribute("data-layout")||n.hasAttribute("data-layout-id"))&&e.unshift(t),e}function ta(t){return t.getAttribute("data-layout-id")}let ea=!1;function na(t){let e=0,n=t.parentElement;for(;n;)e++,n=n.parentElement;return e}function ia(t,e){let n=t.parentElement;for(;n;){const t=e.get(n);if(t)return t;n=n.parentElement}}function sa(t,e,n,i){const s={},o=new ho({visualState:{latestValues:s,renderState:{transformOrigin:{},transform:{},style:{},vars:{}}},presenceContext:null,props:{}}),r=new Zr(s,e),a=i?{duration:i.duration,ease:i.ease}:{duration:.3,ease:"easeOut"};return r.setOptions({visualElement:o,layout:!0,animate:!0,transition:a,...n}),r.mount(t),o.projection=r,{node:r,visualElement:o}}function oa(t,e,n){ea||(ea=!0,lo({borderRadius:{...oo,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:oo,borderTopRightRadius:oo,borderBottomLeftRadius:oo,borderBottomRightRadius:oo,boxShadow:ro}));const i=e?.nodes??new Map,s=e?.visualElements??new Map,o=e?.group??Jr(),r=n?.defaultTransition,a=n?.sharedTransitions,l=n?.crossfade,u=[...t].sort((t,e)=>na(t)-na(e));let c=e?.root;for(const t of u){if(i.has(t))continue;const e=ia(t,i),n=ta(t),u={layoutId:n??void 0,animationType:ra(t.getAttribute("data-layout")),crossfade:l},h=n&&a?.get(n)?a.get(n):r,{node:d,visualElement:p}=sa(t,e,u,h);i.set(t,d),s.set(t,p),o.add(d),c||(c=d.root)}return{nodes:i,visualElements:s,group:o,root:c}}function ra(t){return"position"===t?"position":"size"===t?"size":"preserve-aspect"===t?"preserve-aspect":"both"}function aa(t){for(const e of t.nodes.values())t.group.remove(e),e.unmount();t.nodes.clear(),t.visualElements.clear()}class la{constructor(t,n,i){this.sharedTransitions=new Map,this.notifyReady=e.noop,this.executed=!1,this.scope=t,this.updateDom=n,this.defaultOptions=i,this.readyPromise=new Promise(t=>{this.notifyReady=t}),queueMicrotask(()=>this.execute())}enter(t,e){return this.enterKeyframes=t,this.enterOptions=e,this}exit(t,e){return this.exitKeyframes=t,this.exitOptions=e,this}shared(t,e){return"string"==typeof t&&this.sharedTransitions.set(t,e),this}then(t,e){return this.readyPromise.then(t,e)}async execute(){if(this.executed)return;this.executed=!0;const t=[];let e;try{const n=Qr(this.scope);if(n.length>0){e=oa(n,void 0,this.getBuildOptions()),e.root.startUpdate();for(const t of e.nodes.values())t.isLayoutDirty=!1,t.willUpdate()}const i=function(t){const e=Qr(t),n=new Map;for(const t of e)n.set(t,{element:t,parentElement:t.parentElement,nextSibling:t.nextSibling,layoutId:ta(t)});return n}(this.scope);this.updateDom();const s=function(t,e){const n=new Set(Qr(e)),i=new Set(t.keys()),s=[],o=[],r=[],a=new Map,l=new Map;for(const e of i)if(!n.has(e)){const n=t.get(e);o.push({element:e,parentElement:n.parentElement,nextSibling:n.nextSibling}),n.layoutId&&l.set(n.layoutId,e)}for(const t of n)if(i.has(t))r.push(t);else{s.push(t);const e=ta(t);e&&a.set(e,t)}return{entering:s,exiting:o,persisting:r,sharedEntering:a,sharedExiting:l}}(i,this.scope),r=s.exiting.filter(({element:t})=>{const e=t.getAttribute("data-layout-id");return!e||!s.sharedEntering.has(e)});this.reattachExitingElements(r,e),s.entering.length>0&&(e=oa(s.entering,e,this.getBuildOptions())),!e&&s.persisting.length>0&&(e=oa(s.persisting,void 0,this.getBuildOptions()));const a=new Set;for(const[t]of s.sharedEntering){const e=s.sharedExiting.get(t);e&&a.add(e)}if(e){e.root.didUpdate(),await new Promise(t=>o.postRender(()=>t()));for(const[n,i]of e.nodes.entries())a.has(n)||i.currentAnimation&&t.push(i.currentAnimation);if(this.enterKeyframes){const n=this.animateEntering(s,e);t.push(...n)}if(this.exitKeyframes){const n=this.animateExiting(s,e);t.push(...n)}}const l=new Ye(t);l.finished.then(()=>{this.cleanupExitingElements(r),e&&aa(e)}),this.notifyReady(l)}catch(t){throw e&&aa(e),t}}getBuildOptions(){return{defaultTransition:this.defaultOptions||{duration:.3,ease:"easeOut"},sharedTransitions:this.sharedTransitions.size>0?this.sharedTransitions:void 0,crossfade:!1}}reattachExitingElements(t,e){for(const{element:n,parentElement:i,nextSibling:s}of t){if(!i.isConnected)continue;const t=e?.nodes.get(n),o=t?.snapshot;if(!o)continue;const{layoutBox:r}=o;s&&s.parentNode===i?i.insertBefore(n,s):i.appendChild(n);const a=n;a.style.position="absolute",a.style.top=`${r.y.min}px`,a.style.left=`${r.x.min}px`,a.style.width=r.x.max-r.x.min+"px",a.style.height=r.y.max-r.y.min+"px",a.style.margin="0",a.style.pointerEvents="none"}}cleanupExitingElements(t){for(const{element:e}of t)e.parentElement&&e.parentElement.removeChild(e)}animateEntering(t,e){const n=new Set(t.entering),i=t.entering.filter(t=>function(t,e){let n=t.parentElement;for(;n;){if(e.has(n))return!1;n=n.parentElement}return!0}(t,n)),s=[];for(const t of i){const n=e.visualElements.get(t);if(!n)continue;const i={...this.enterKeyframes};if(void 0!==i.opacity){1===(Array.isArray(i.opacity)?i.opacity[i.opacity.length-1]:i.opacity)&&(t.style.opacity="0")}const o=Mn(n,i,{transitionOverride:this.enterOptions||this.defaultOptions||{}});s.push(...o)}return s}animateExiting(t,e){const n=new Set(t.exiting.map(t=>t.element)),i=t.exiting.filter(t=>function(t,e){let n=t.parentElement;for(;n;){if(e.has(n))return!1;n=n.parentElement}return!0}(t.element,n)),s=[];for(const{element:t}of i){const n=e.visualElements.get(t);if(!n)continue;const i=this.exitOptions||this.defaultOptions||{},o=Mn(n,this.exitKeyframes,{transitionOverride:i});s.push(...o)}return s}}const ua=o,ca=n.reduce((t,e)=>(t[e]=t=>r(t),t),{});t.AsyncMotionValueAnimation=ze,t.DOMKeyframesResolver=Xn,t.DOMVisualElement=js,t.DocumentProjectionNode=qr,t.Feature=class{constructor(t){this.isMounted=!1,this.node=t}update(){}},t.FlatTree=gr,t.GroupAnimation=Ye,t.GroupAnimationWithThen=class extends Ye{then(t,e){return this.finished.finally(t).then(()=>{})}},t.HTMLProjectionNode=Zr,t.HTMLVisualElement=ho,t.JSAnimation=Zt,t.KeyframeResolver=be,t.LayoutAnimationBuilder=la,t.MotionValue=hn,t.NativeAnimation=Le,t.NativeAnimationExtended=Ie,t.NativeAnimationWrapper=Ge,t.NodeStack=vr,t.ObjectVisualElement=class extends Cs{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,e){if(function(t,e){return t in e}(e,t)){const n=t[e];if("string"==typeof n||"number"==typeof n)return n}}getBaseTargetFromProps(){}removeValueFromRenderState(t,e){delete e.output[t]}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}build(t,e){Object.assign(t.output,e)}renderInstance(t,{output:e}){Object.assign(t,e)}sortInstanceNodePosition(){return 0}},t.SVGVisualElement=class extends js{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=vs}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(ce.has(e)){const t=Kn(e);return t&&t.default||0}return e=vo.has(e)?e:Sn(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return wo(t,e,n)}build(t,e,n){go(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,i){To(t,e,0,i)}mount(t){this.isSVGTag=xo(t.tagName),super.mount(t)}},t.ViewTransitionBuilder=ms,t.VisualElement=Cs,t.acceleratedValues=Hn,t.activeAnimations=d,t.addAttrValue=ei,t.addDomEvent=pr,t.addScaleCorrector=lo,t.addStyleValue=ai,t.addValueToWillChange=bn,t.alpha=T,t.analyseComplexValue=K,t.animateMotionValue=ln,t.animateSingleValue=fr,t.animateTarget=Mn,t.animateValue=function(t){return new Zt(t)},t.animateVariant=Dn,t.animateView=function(t,e={}){return new ms(t,e)},t.animateVisualElement=Rn,t.animationMapKey=(t,e="")=>`${t}:${e}`,t.applyAxisDelta=zs,t.applyBoxDelta=Ys,t.applyGeneratorOptions=je,t.applyPointDelta=Ks,t.applyPxDefaults=function(t,e){for(let n=0;n<t.length;n++)"number"==typeof t[n]&&Gn.has(e)&&(t[n]=t[n]+"px")},t.applyTreeDeltas=qs,t.aspectRatio=Qo,t.attachSpring=Gi,t.attrEffect=ni,t.axisDeltaEquals=tr,t.axisEquals=Ho,t.axisEqualsRounded=_o,t.boxEquals=Zo,t.boxEqualsRounded=Jo,t.buildHTMLStyles=no,t.buildProjectionTransform=nr,t.buildSVGAttrs=go,t.buildSVGPath=fo,t.buildTransform=eo,t.calcAxisDelta=Bo,t.calcBoxDelta=Co,t.calcChildStagger=an,t.calcGeneratorDuration=pt,t.calcLength=Ro,t.calcRelativeAxis=jo,t.calcRelativeAxisPosition=Fo,t.calcRelativeBox=Lo,t.calcRelativePosition=Oo,t.camelCaseAttributes=vo,t.camelToDash=Sn,t.cancelFrame=r,t.cancelMicrotask=di,t.cancelSync=ca,t.checkVariantsDidChange=Eo,t.cleanDirtyNodes=Dr,t.collectMotionValues=cn,t.color=I,t.compareByDepth=yr,t.complex=G,t.containsCSSVariable=v,t.convertBoundingBoxToBox=Ls,t.convertBoxToBoundingBox=function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}},t.convertOffsetToTimes=$t,t.copyAxisDeltaInto=Xo,t.copyAxisInto=zo,t.copyBoxInto=Yo,t.correctBorderRadius=oo,t.correctBoxShadow=ro,t.createAnimationState=function(t){let e=function(t){return e=>Promise.all(e.map(({animation:e,options:n})=>Rn(t,e,n)))}(t),n=Do(),i=!0;const s=e=>(n,i)=>{const s=fn(t,i,"exit"===e?t.presenceContext?.custom:void 0);if(s){const{transition:t,transitionEnd:e,...i}=s;n={...n,...i,...e}}return n};function o(o){const{props:r}=t,a=So(t.parent)||{},l=[],u=new Set;let c={},h=1/0;for(let e=0;e<Vo;e++){const d=Ao[e],p=n[d],m=void 0!==r[d]?r[d]:a[d],f=As(m),y=d===o?p.isActive:null;!1===y&&(h=e);let g=m===a[d]&&m!==r[d]&&f;if(g&&i&&t.manuallyAnimateOnMount&&(g=!1),p.protectedKeys={...c},!p.isActive&&null===y||!m&&!p.prevProp||Ps(m)||"boolean"==typeof m)continue;const v=Eo(p.prevProp,m);let x=v||d===o&&p.isActive&&!g&&f||e>h&&f,T=!1;const w=Array.isArray(m)?m:[m];let b=w.reduce(s(d),{});!1===y&&(b={});const{prevResolvedValues:S={}}=p,P={...S,...b},A=e=>{x=!0,u.has(e)&&(T=!0,u.delete(e)),p.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)};for(const t in P){const e=b[t],n=S[t];if(c.hasOwnProperty(t))continue;let i=!1;i=yn(e)&&yn(n)?!Po(e,n):e!==n,i?null!=e?A(t):u.add(t):void 0!==e&&u.has(t)?A(t):p.protectedKeys[t]=!0}p.prevProp=m,p.prevResolvedValues=b,p.isActive&&(c={...c,...b}),i&&t.blockInitialAnimation&&(x=!1);const V=g&&v;x&&(!V||T)&&l.push(...w.map(e=>{const n={type:d};if("string"==typeof e&&i&&!V&&t.manuallyAnimateOnMount&&t.parent){const{parent:i}=t,s=fn(i,e);if(i.enteringChildren&&s){const{delayChildren:e}=s.transition||{};n.delay=an(i.enteringChildren,t,e)}}return{animation:e,options:n}}))}if(u.size){const e={};if("boolean"!=typeof r.initial){const n=fn(t,Array.isArray(r.initial)?r.initial[0]:r.initial);n&&n.transition&&(e.transition=n.transition)}u.forEach(n=>{const i=t.getBaseTarget(n),s=t.getValue(n);s&&(s.liveStyle=!0),e[n]=i??null}),l.push({animation:e})}let d=Boolean(l.length);return!i||!1!==r.initial&&r.initial!==r.animate||t.manuallyAnimateOnMount||(d=!1),i=!1,d?e(l):Promise.resolve()}return{animateChanges:o,setActive:function(e,i){if(n[e].isActive===i)return Promise.resolve();t.variantChildren?.forEach(t=>t.animationState?.setActive(e,i)),n[e].isActive=i;const s=o(e);for(const t in n)n[t].protectedKeys={};return s},setAnimateFunction:function(n){e=n(t)},getState:()=>n,reset:()=>{n=Do()}}},t.createAxis=gs,t.createAxisDelta=fs,t.createBox=vs,t.createDelta=ys,t.createGeneratorEasing=mt,t.createProjectionNode=Ar,t.createRenderBatcher=s,t.cubicBezierAsString=De,t.defaultEasing=Wt,t.defaultOffset=Nt,t.defaultTransformValue=oe,t.defaultValueTypes=Wn,t.degrees=k,t.delay=dr,t.delayInSeconds=function(t,n){return dr(t,e.secondsToMilliseconds(n))},t.dimensionValueTypes=Bn,t.eachAxis=er,t.fillOffset=Ut,t.fillWildcards=_t,t.findDimensionValueType=Cn,t.findValueType=_i,t.flushKeyframeResolvers=we,t.frame=o,t.frameData=a,t.frameSteps=l,t.generateLinearEasing=ht,t.getAnimatableNone=zn,t.getAnimationMap=function(t){const e=qe.get(t)||new Map;return qe.set(t,e),e},t.getComputedStyle=function(t,e){const n=window.getComputedStyle(t);return Se(e)?n.getPropertyValue(e):n[e]},t.getDefaultTransition=nn,t.getDefaultValueType=Kn,t.getFeatureDefinitions=function(){return Bs},t.getFinalKeyframe=rn,t.getMixer=ot,t.getOptimisedAppearId=Vn,t.getOriginIndex=zi,t.getValueAsType=Jn,t.getValueTransition=Je,t.getVariableValue=_e,t.getVariantContext=So,t.getViewAnimationLayerInfo=ss,t.getViewAnimations=rs,t.globalProjectionState=xr,t.has2DTranslate=Ns,t.hasReducedMotionListener=Ts,t.hasScale=Is,t.hasTransform=Us,t.hex=D,t.hover=function(t,e,n={}){const[i,s,o]=fi(t,n),r=t=>{if(!yi(t))return;const{target:n}=t,i=e(n,t);if("function"!=typeof i||!n)return;const o=t=>{yi(t)&&(i(t),n.removeEventListener("pointerleave",o))};n.addEventListener("pointerleave",o,s)};return i.forEach(t=>{t.addEventListener("pointerenter",r,s)}),o},t.hsla=O,t.hslaToRgba=H,t.inertia=Ot,t.initPrefersReducedMotion=bs,t.interpolate=It,t.invisibleValues=nt,t.isAnimationControls=Ps,t.isCSSVariableName=m,t.isCSSVariableToken=y,t.isControllingVariants=Ms,t.isDeltaZero=qo,t.isDragActive=mi,t.isDragging=pi,t.isElementKeyboardAccessible=Ti,t.isForcedMotionValue=uo,t.isGenerator=Ce,t.isHTMLElement=si,t.isKeyframesTarget=yn,t.isMotionValue=Tn,t.isNear=ko,t.isNodeOrChild=gi,t.isPrimaryPointer=vi,t.isSVGElement=Ai,t.isSVGSVGElement=Ki,t.isSVGTag=xo,t.isTransitionDefined=sn,t.isVariantLabel=As,t.isVariantNode=Ds,t.isWaapiSupportedEasing=function t(n){return Boolean("function"==typeof n&&Me()||!n||"string"==typeof n&&(n in Re||Me())||e.isBezierDefinition(n)||Array.isArray(n)&&n.every(t))},t.isWillChangeMotionValue=wn,t.keyframes=Kt,t.makeAnimationInstant=Ne,t.mapEasingToNativeEasing=ke,t.mapValue=function(t,e,n,i){const s=Yi(e,n,i);return Xi(()=>s(t.get()))},t.maxGeneratorDuration=dt,t.measurePageBox=function(t,e,n){const i=Js(t,n),{scroll:s}=e;return s&&(Hs(i.x,s.offset.x),Hs(i.y,s.offset.y)),i},t.measureViewportBox=Js,t.microtask=hi,t.mix=ut,t.mixArray=rt,t.mixColor=et,t.mixComplex=lt,t.mixImmediate=Z,t.mixLinearColor=J,t.mixNumber=_,t.mixObject=at,t.mixValues=ar,t.mixVisibility=it,t.motionValue=dn,t.nodeGroup=Jr,t.number=x,t.numberValueTypes=$n,t.observeTimeline=function(t,e){let n;const i=()=>{const{currentTime:i}=e,s=(null===i?0:i.value)/100;n!==s&&t(s),n=s};return o.preUpdate(i,!0),()=>r(i)},t.optimizedAppearDataAttribute=An,t.optimizedAppearDataId=Pn,t.parseCSSVariable=Ze,t.parseValueFromTransform=re,t.percent=B,t.pixelsToPercent=so,t.positionalKeys=un,t.prefersReducedMotion=xs,t.press=function(t,e,n={}){const[i,s,o]=fi(t,n),r=t=>{const i=t.currentTarget;if(!Pi(t))return;wi.add(i);const o=e(i,t),r=(t,e)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",l),wi.has(i)&&wi.delete(i),Pi(t)&&"function"==typeof o&&o(t,{success:e})},a=t=>{r(t,i===window||i===document||n.useGlobalTarget||gi(i,t.target))},l=t=>{r(t,!1)};window.addEventListener("pointerup",a,s),window.addEventListener("pointercancel",l,s)};return i.forEach(t=>{(n.useGlobalTarget?window:t).addEventListener("pointerdown",r,s),si(t)&&(t.addEventListener("focus",t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const i=bi(()=>{if(wi.has(n))return;Si(n,"down");const t=bi(()=>{Si(n,"up")});n.addEventListener("keyup",t,e),n.addEventListener("blur",()=>Si(n,"cancel"),e)});n.addEventListener("keydown",i,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),e)})(t,s)),Ti(t)||t.hasAttribute("tabindex")||(t.tabIndex=0))}),o},t.progressPercentage=F,t.propEffect=ii,t.propagateDirtyNodes=Mr,t.px=C,t.readTransformValue=ae,t.recordStats=function(){if(i.value)throw $i(),new Error("Stats are already being measured");const t=i;return t.value={frameloop:{setup:[],rate:[],read:[],resolveKeyframes:[],preUpdate:[],update:[],preRender:[],render:[],postRender:[]},animations:{mainThread:[],waapi:[],layout:[]},layoutProjection:{nodes:[],calculatedTargetDeltas:[],calculatedProjections:[]}},t.addProjectionMetrics=e=>{const{layoutProjection:n}=t.value;n.nodes.push(e.nodes),n.calculatedTargetDeltas.push(e.calculatedTargetDeltas),n.calculatedProjections.push(e.calculatedProjections)},o.postRender(Oi,!0),Wi},t.removeAxisDelta=Uo,t.removeAxisTransforms=No,t.removeBoxTransforms=Ko,t.removePointDelta=Io,t.renderHTML=io,t.renderSVG=To,t.resize=function(t,e){return"function"==typeof t?Fi(t):Ci(t,e)},t.resolveElements=Zn,t.resolveMotionValue=mr,t.resolveVariant=fn,t.resolveVariantFromProps=mn,t.rgbUnit=E,t.rgba=M,t.rootProjectionNode=Hr,t.scale=w,t.scaleCorrectors=ao,t.scalePoint=Ws,t.scrapeHTMLMotionValuesFromProps=co,t.scrapeSVGMotionValuesFromProps=wo,t.setDragLock=function(t){return"x"===t||"y"===t?pi[t]?null:(pi[t]=!0,()=>{pi[t]=!1}):pi.x||pi.y?null:(pi.x=pi.y=!0,()=>{pi.x=pi.y=!1})},t.setFeatureDefinitions=function(t){Bs=t},t.setStyle=Pe,t.setTarget=xn,t.spring=Ft,t.springValue=function(t,e){const n=dn(Tn(t)?t.get():t);return Gi(n,t,e),n},t.stagger=function(t=.1,{startDelay:n=0,from:i=0,ease:s}={}){return(o,r)=>{const a="number"==typeof i?i:zi(i,r),l=Math.abs(a-o);let u=t*l;if(s){const n=r*t;u=e.easingDefinitionToFunction(s)(u/n)*n}return n+u}},t.startWaapiAnimation=Be,t.statsBuffer=i,t.styleEffect=li,t.supportedWaapiEasing=Re,t.supportsBrowserAnimation=Ke,t.supportsFlags=Ve,t.supportsLinearEasing=Me,t.supportsPartialKeyframes=qn,t.supportsScrollTimeline=Ae,t.svgEffect=ci,t.sync=ua,t.testValueType=kn,t.time=h,t.transform=Yi,t.transformAxis=Zs,t.transformBox=_s,t.transformBoxPoints=Fs,t.transformPropOrder=ue,t.transformProps=ce,t.transformValue=Xi,t.transformValueTypes=Nn,t.translateAxis=Hs,t.unstable_animateLayout=function(t,e,n){const{scope:i,updateDom:s,defaultOptions:o}=function(t,e,n){if("function"==typeof t)return{scope:document,updateDom:t,defaultOptions:e};const i=Zn(t)[0]||document;return{scope:(Document,i),updateDom:e,defaultOptions:n}}(t,e,n);return new la(i,s,o)},t.updateMotionValuesFromProps=Rs,t.variantPriorityOrder=Vs,t.variantProps=Es,t.vh=j,t.visualElementStore=Ss,t.vw=L});
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("motion-utils")):"function"==typeof define&&define.amd?define(["exports","motion-utils"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).MotionDom={},t.MotionUtils)}(this,function(t,e){"use strict";const n=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],i={value:null,addProjectionMetrics:null};function s(t,s){let o=!1,r=!0;const a={delta:0,timestamp:0,isProcessing:!1},l=()=>o=!0,u=n.reduce((t,e)=>(t[e]=function(t,e){let n=new Set,s=new Set,o=!1,r=!1;const a=new WeakSet;let l={delta:0,timestamp:0,isProcessing:!1},u=0;function c(e){a.has(e)&&(h.schedule(e),t()),u++,e(l)}const h={schedule:(t,e=!1,i=!1)=>{const r=i&&o?n:s;return e&&a.add(t),r.has(t)||r.add(t),t},cancel:t=>{s.delete(t),a.delete(t)},process:t=>{l=t,o?r=!0:(o=!0,[n,s]=[s,n],n.forEach(c),e&&i.value&&i.value.frameloop[e].push(u),u=0,n.clear(),o=!1,r&&(r=!1,h.process(t)))}};return h}(l,s?e:void 0),t),{}),{setup:c,read:h,resolveKeyframes:d,preUpdate:p,update:m,preRender:f,render:y,postRender:g}=u,v=()=>{const n=e.MotionGlobalConfig.useManualTiming?a.timestamp:performance.now();o=!1,e.MotionGlobalConfig.useManualTiming||(a.delta=r?1e3/60:Math.max(Math.min(n-a.timestamp,40),1)),a.timestamp=n,a.isProcessing=!0,c.process(a),h.process(a),d.process(a),p.process(a),m.process(a),f.process(a),y.process(a),g.process(a),a.isProcessing=!1,o&&s&&(r=!1,t(v))};return{schedule:n.reduce((e,n)=>{const i=u[n];return e[n]=(e,n=!1,s=!1)=>(o||(o=!0,r=!0,a.isProcessing||t(v)),i.schedule(e,n,s)),e},{}),cancel:t=>{for(let e=0;e<n.length;e++)u[n[e]].cancel(t)},state:a,steps:u}}const{schedule:o,cancel:r,state:a,steps:l}=s("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:e.noop,!0);let u;function c(){u=void 0}const h={now:()=>(void 0===u&&h.set(a.isProcessing||e.MotionGlobalConfig.useManualTiming?a.timestamp:performance.now()),u),set:t=>{u=t,queueMicrotask(c)}},d={layout:0,mainThread:0,waapi:0},p=t=>e=>"string"==typeof e&&e.startsWith(t),m=p("--"),f=p("var(--"),y=t=>!!f(t)&&g.test(t.split("/*")[0].trim()),g=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function v(t){return"string"==typeof t&&t.split("/*")[0].includes("var(--")}const x={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},T={...x,transform:t=>e.clamp(0,1,t)},w={...x,default:1},b=t=>Math.round(1e5*t)/1e5,S=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const P=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,A=(t,e)=>n=>Boolean("string"==typeof n&&P.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),V=(t,e,n)=>i=>{if("string"!=typeof i)return i;const[s,o,r,a]=i.match(S);return{[t]:parseFloat(s),[e]:parseFloat(o),[n]:parseFloat(r),alpha:void 0!==a?parseFloat(a):1}},E={...x,transform:t=>Math.round((t=>e.clamp(0,255,t))(t))},M={test:A("rgb","red"),parse:V("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+E.transform(t)+", "+E.transform(e)+", "+E.transform(n)+", "+b(T.transform(i))+")"};const D={test:A("#"),parse:function(t){let e="",n="",i="",s="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),s=t.substring(4,5),e+=e,n+=n,i+=i,s+=s),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}},transform:M.transform},R=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),k=R("deg"),B=R("%"),C=R("px"),j=R("vh"),L=R("vw"),O=(()=>({...B,parse:t=>B.parse(t)/100,transform:t=>B.transform(100*t)}))(),F={test:A("hsl","hue"),parse:V("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+B.transform(b(e))+", "+B.transform(b(n))+", "+b(T.transform(i))+")"},I={test:t=>M.test(t)||D.test(t)||F.test(t),parse:t=>M.test(t)?M.parse(t):F.test(t)?F.parse(t):D.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?M.transform(t):F.transform(t),getAnimatableNone:t=>{const e=I.parse(t);return e.alpha=0,I.transform(e)}},U=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const N="number",$="color",W=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function K(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},s=[];let o=0;const r=e.replace(W,t=>(I.test(t)?(i.color.push(o),s.push($),n.push(I.parse(t))):t.startsWith("var(")?(i.var.push(o),s.push("var"),n.push(t)):(i.number.push(o),s.push(N),n.push(parseFloat(t))),++o,"${}")).split("${}");return{values:n,split:r,indexes:i,types:s}}function z(t){return K(t).values}function Y(t){const{split:e,types:n}=K(t),i=e.length;return t=>{let s="";for(let o=0;o<i;o++)if(s+=e[o],void 0!==t[o]){const e=n[o];s+=e===N?b(t[o]):e===$?I.transform(t[o]):t[o]}return s}}const X=t=>"number"==typeof t?0:I.test(t)?I.getAnimatableNone(t):t;const G={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(S)?.length||0)+(t.match(U)?.length||0)>0},parse:z,createTransformer:Y,getAnimatableNone:function(t){const e=z(t);return Y(t)(e.map(X))}};function q(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function H({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,n/=100;let s=0,o=0,r=0;if(e/=100){const i=n<.5?n*(1+e):n+e-n*e,a=2*n-i;s=q(a,i,t+1/3),o=q(a,i,t),r=q(a,i,t-1/3)}else s=o=r=n;return{red:Math.round(255*s),green:Math.round(255*o),blue:Math.round(255*r),alpha:i}}function Z(t,e){return n=>n>0?e:t}const _=(t,e,n)=>t+(e-t)*n,J=(t,e,n)=>{const i=t*t,s=n*(e*e-i)+i;return s<0?0:Math.sqrt(s)},Q=[D,M,F];function tt(t){const n=(i=t,Q.find(t=>t.test(i)));var i;if(e.warning(Boolean(n),`'${t}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!Boolean(n))return!1;let s=n.parse(t);return n===F&&(s=H(s)),s}const et=(t,e)=>{const n=tt(t),i=tt(e);if(!n||!i)return Z(t,e);const s={...n};return t=>(s.red=J(n.red,i.red,t),s.green=J(n.green,i.green,t),s.blue=J(n.blue,i.blue,t),s.alpha=_(n.alpha,i.alpha,t),M.transform(s))},nt=new Set(["none","hidden"]);function it(t,e){return nt.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function st(t,e){return n=>_(t,e,n)}function ot(t){return"number"==typeof t?st:"string"==typeof t?y(t)?Z:I.test(t)?et:lt:Array.isArray(t)?rt:"object"==typeof t?I.test(t)?et:at:Z}function rt(t,e){const n=[...t],i=n.length,s=t.map((t,n)=>ot(t)(t,e[n]));return t=>{for(let e=0;e<i;e++)n[e]=s[e](t);return n}}function at(t,e){const n={...t,...e},i={};for(const s in n)void 0!==t[s]&&void 0!==e[s]&&(i[s]=ot(t[s])(t[s],e[s]));return t=>{for(const e in i)n[e]=i[e](t);return n}}const lt=(t,n)=>{const i=G.createTransformer(n),s=K(t),o=K(n);return s.indexes.var.length===o.indexes.var.length&&s.indexes.color.length===o.indexes.color.length&&s.indexes.number.length>=o.indexes.number.length?nt.has(t)&&!o.values.length||nt.has(n)&&!s.values.length?it(t,n):e.pipe(rt(function(t,e){const n=[],i={color:0,var:0,number:0};for(let s=0;s<e.values.length;s++){const o=e.types[s],r=t.indexes[o][i[o]],a=t.values[r]??0;n[s]=a,i[o]++}return n}(s,o),o.values),i):(e.warning(!0,`Complex values '${t}' and '${n}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Z(t,n))};function ut(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return _(t,e,n);return ot(t)(t,e)}const ct=t=>{const e=({timestamp:e})=>t(e);return{start:(t=!0)=>o.update(e,t),stop:()=>r(e),now:()=>a.isProcessing?a.timestamp:h.now()}},ht=(t,e,n=10)=>{let i="";const s=Math.max(Math.round(e/n),2);for(let e=0;e<s;e++)i+=Math.round(1e4*t(e/(s-1)))/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},dt=2e4;function pt(t){let e=0;let n=t.next(e);for(;!n.done&&e<dt;)e+=50,n=t.next(e);return e>=dt?1/0:e}function mt(t,n=100,i){const s=i({...t,keyframes:[0,n]}),o=Math.min(pt(s),dt);return{type:"keyframes",ease:t=>s.next(o*t).value/n,duration:e.millisecondsToSeconds(o)}}function ft(t,n,i){const s=Math.max(n-5,0);return e.velocityPerSecond(i-t(s),n-s)}const yt=100,gt=10,vt=1,xt=0,Tt=800,wt=.3,bt=.3,St={granular:.01,default:2},Pt={granular:.005,default:.5},At=.01,Vt=10,Et=.05,Mt=1,Dt=.001;function Rt({duration:t=Tt,bounce:n=wt,velocity:i=xt,mass:s=vt}){let o,r;e.warning(t<=e.secondsToMilliseconds(Vt),"Spring duration must be 10 seconds or less","spring-duration-limit");let a=1-n;a=e.clamp(Et,Mt,a),t=e.clamp(At,Vt,e.millisecondsToSeconds(t)),a<1?(o=e=>{const n=e*a,s=n*t,o=n-i,r=Bt(e,a),l=Math.exp(-s);return Dt-o/r*l},r=e=>{const n=e*a*t,s=n*i+i,r=Math.pow(a,2)*Math.pow(e,2)*t,l=Math.exp(-n),u=Bt(Math.pow(e,2),a);return(-o(e)+Dt>0?-1:1)*((s-r)*l)/u}):(o=e=>Math.exp(-e*t)*((e-i)*t+1)-.001,r=e=>Math.exp(-e*t)*(t*t*(i-e)));const l=function(t,e,n){let i=n;for(let n=1;n<kt;n++)i-=t(i)/e(i);return i}(o,r,5/t);if(t=e.secondsToMilliseconds(t),isNaN(l))return{stiffness:yt,damping:gt,duration:t};{const e=Math.pow(l,2)*s;return{stiffness:e,damping:2*a*Math.sqrt(s*e),duration:t}}}const kt=12;function Bt(t,e){return t*Math.sqrt(1-e*e)}const Ct=["duration","bounce"],jt=["stiffness","damping","mass"];function Lt(t,e){return e.some(e=>void 0!==t[e])}function Ot(t=bt,n=wt){const i="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:n}:t;let{restSpeed:s,restDelta:o}=i;const r=i.keyframes[0],a=i.keyframes[i.keyframes.length-1],l={done:!1,value:r},{stiffness:u,damping:c,mass:h,duration:d,velocity:p,isResolvedFromDuration:m}=function(t){let n={velocity:xt,stiffness:yt,damping:gt,mass:vt,isResolvedFromDuration:!1,...t};if(!Lt(t,jt)&&Lt(t,Ct))if(t.visualDuration){const i=t.visualDuration,s=2*Math.PI/(1.2*i),o=s*s,r=2*e.clamp(.05,1,1-(t.bounce||0))*Math.sqrt(o);n={...n,mass:vt,stiffness:o,damping:r}}else{const e=Rt(t);n={...n,...e,mass:vt},n.isResolvedFromDuration=!0}return n}({...i,velocity:-e.millisecondsToSeconds(i.velocity||0)}),f=p||0,y=c/(2*Math.sqrt(u*h)),g=a-r,v=e.millisecondsToSeconds(Math.sqrt(u/h)),x=Math.abs(g)<5;let T;if(s||(s=x?St.granular:St.default),o||(o=x?Pt.granular:Pt.default),y<1){const t=Bt(v,y);T=e=>{const n=Math.exp(-y*v*e);return a-n*((f+y*v*g)/t*Math.sin(t*e)+g*Math.cos(t*e))}}else if(1===y)T=t=>a-Math.exp(-v*t)*(g+(f+v*g)*t);else{const t=v*Math.sqrt(y*y-1);T=e=>{const n=Math.exp(-y*v*e),i=Math.min(t*e,300);return a-n*((f+y*v*g)*Math.sinh(i)+t*g*Math.cosh(i))/t}}const w={calculatedDuration:m&&d||null,next:t=>{const n=T(t);if(m)l.done=t>=d;else{let i=0===t?f:0;y<1&&(i=0===t?e.secondsToMilliseconds(f):ft(T,t,n));const r=Math.abs(i)<=s,u=Math.abs(a-n)<=o;l.done=r&&u}return l.value=l.done?a:n,l},toString:()=>{const t=Math.min(pt(w),dt),e=ht(e=>w.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return w}function Ft({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:u=.5,restSpeed:c}){const h=t[0],d={done:!1,value:h},p=t=>void 0===a?l:void 0===l||Math.abs(a-t)<Math.abs(l-t)?a:l;let m=n*e;const f=h+m,y=void 0===r?f:r(f);y!==f&&(m=y-h);const g=t=>-m*Math.exp(-t/i),v=t=>y+g(t),x=t=>{const e=g(t),n=v(t);d.done=Math.abs(e)<=u,d.value=d.done?y:n};let T,w;const b=t=>{var e;(e=d.value,void 0!==a&&e<a||void 0!==l&&e>l)&&(T=t,w=Ot({keyframes:[d.value,p(d.value)],velocity:ft(v,t,d.value),damping:s,stiffness:o,restDelta:u,restSpeed:c}))};return b(0),{calculatedDuration:null,next:t=>{let e=!1;return w||void 0!==T||(e=!0,x(t),b(t)),void 0!==T&&t>=T?w.next(t-T):(!e&&x(t),d)}}}function It(t,n,{clamp:i=!0,ease:s,mixer:o}={}){const r=t.length;if(e.invariant(r===n.length,"Both input and output ranges must be the same length","range-length"),1===r)return()=>n[0];if(2===r&&n[0]===n[1])return()=>n[1];const a=t[0]===t[1];t[0]>t[r-1]&&(t=[...t].reverse(),n=[...n].reverse());const l=function(t,n,i){const s=[],o=i||e.MotionGlobalConfig.mix||ut,r=t.length-1;for(let i=0;i<r;i++){let r=o(t[i],t[i+1]);if(n){const t=Array.isArray(n)?n[i]||e.noop:n;r=e.pipe(t,r)}s.push(r)}return s}(n,s,o),u=l.length,c=i=>{if(a&&i<t[0])return n[0];let s=0;if(u>1)for(;s<t.length-2&&!(i<t[s+1]);s++);const o=e.progress(t[s],t[s+1],i);return l[s](o)};return i?n=>c(e.clamp(t[0],t[r-1],n)):c}function Ut(t,n){const i=t[t.length-1];for(let s=1;s<=n;s++){const o=e.progress(0,n,s);t.push(_(i,1,o))}}function Nt(t){const e=[0];return Ut(e,t.length-1),e}function $t(t,e){return t.map(t=>t*e)}function Wt(t,n){return t.map(()=>n||e.easeInOut).splice(0,t.length-1)}function Kt({duration:t=300,keyframes:n,times:i,ease:s="easeInOut"}){const o=e.isEasingArray(s)?s.map(e.easingDefinitionToFunction):e.easingDefinitionToFunction(s),r={done:!1,value:n[0]},a=It($t(i&&i.length===n.length?i:Nt(n),t),n,{ease:Array.isArray(o)?o:Wt(n,o)});return{calculatedDuration:t,next:e=>(r.value=a(e),r.done=e>=t,r)}}Ot.applyToOptions=t=>{const n=mt(t,100,Ot);return t.ease=n.ease,t.duration=e.secondsToMilliseconds(n.duration),t.type="keyframes",t};const zt=t=>null!==t;function Yt(t,{repeat:e,repeatType:n="loop"},i,s=1){const o=t.filter(zt),r=s<0||e&&"loop"!==n&&e%2==1?0:o.length-1;return r&&void 0!==i?i:o[r]}const Xt={decay:Ft,inertia:Ft,tween:Kt,keyframes:Kt,spring:Ot};function Gt(t){"string"==typeof t.type&&(t.type=Xt[t.type])}class qt{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}const Ht=t=>t/100;class Zt extends qt{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:t}=this.options;t&&t.updatedAt!==h.now()&&this.tick(h.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},d.mainThread++,this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause()}initAnimation(){const{options:t}=this;Gt(t);const{type:n=Kt,repeat:i=0,repeatDelay:s=0,repeatType:o,velocity:r=0}=t;let{keyframes:a}=t;const l=n||Kt;l!==Kt&&"number"!=typeof a[0]&&(this.mixKeyframes=e.pipe(Ht,ut(a[0],a[1])),a=[0,100]);const u=l({...t,keyframes:a});"mirror"===o&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-r})),null===u.calculatedDuration&&(u.calculatedDuration=pt(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+s,this.totalDuration=this.resolvedDuration*(i+1)-s,this.generator=u}updateTime(t){const e=Math.round(t-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=e}tick(t,n=!1){const{generator:i,totalDuration:s,mixKeyframes:o,mirroredGenerator:r,resolvedDuration:a,calculatedDuration:l}=this;if(null===this.startTime)return i.next(0);const{delay:u=0,keyframes:c,repeat:h,repeatType:d,repeatDelay:p,type:m,onUpdate:f,finalKeyframe:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const g=this.currentTime-u*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?g<0:g>s;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=s);let x=this.currentTime,T=i;if(h){const t=Math.min(this.currentTime,s)/a;let n=Math.floor(t),i=t%1;!i&&t>=1&&(i=1),1===i&&n--,n=Math.min(n,h+1);Boolean(n%2)&&("reverse"===d?(i=1-i,p&&(i-=p/a)):"mirror"===d&&(T=r)),x=e.clamp(0,1,i)*a}const w=v?{done:!1,value:c[0]}:T.next(x);o&&(w.value=o(w.value));let{done:b}=w;v||null===l||(b=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const S=null===this.holdTime&&("finished"===this.state||"running"===this.state&&b);return S&&m!==Ft&&(w.value=Yt(c,this.options,y,this.speed)),f&&f(w.value),S&&this.finish(),w}then(t,e){return this.finished.then(t,e)}get duration(){return e.millisecondsToSeconds(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+e.millisecondsToSeconds(t)}get time(){return e.millisecondsToSeconds(this.currentTime)}set time(t){t=e.secondsToMilliseconds(t),this.currentTime=t,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(h.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=e.millisecondsToSeconds(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=ct,startTime:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),this.options.onPlay?.();const n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime||(this.startTime=e??n),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(h.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null,d.mainThread--}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function _t(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const Jt=t=>180*t/Math.PI,Qt=t=>{const e=Jt(Math.atan2(t[1],t[0]));return ee(e)},te={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Qt,rotateZ:Qt,skewX:t=>Jt(Math.atan(t[1])),skewY:t=>Jt(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},ee=t=>((t%=360)<0&&(t+=360),t),ne=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),ie=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),se={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ne,scaleY:ie,scale:t=>(ne(t)+ie(t))/2,rotateX:t=>ee(Jt(Math.atan2(t[6],t[5]))),rotateY:t=>ee(Jt(Math.atan2(-t[2],t[0]))),rotateZ:Qt,rotate:Qt,skewX:t=>Jt(Math.atan(t[4])),skewY:t=>Jt(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function oe(t){return t.includes("scale")?1:0}function re(t,e){if(!t||"none"===t)return oe(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(n)i=se,s=n;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=te,s=e}if(!s)return oe(e);const o=i[e],r=s[1].split(",").map(le);return"function"==typeof o?o(r):r[o]}const ae=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return re(n,e)};function le(t){return parseFloat(t.trim())}const ue=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ce=(()=>new Set(ue))(),he=t=>t===x||t===C,de=new Set(["x","y","z"]),pe=ue.filter(t=>!de.has(t));const me={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>re(e,"x"),y:(t,{transform:e})=>re(e,"y")};me.translateX=me.x,me.translateY=me.y;const fe=new Set;let ye=!1,ge=!1,ve=!1;function xe(){if(ge){const t=Array.from(fe).filter(t=>t.needsMeasurement),e=new Set(t.map(t=>t.element)),n=new Map;e.forEach(t=>{const e=function(t){const e=[];return pe.forEach(n=>{const i=t.getValue(n);void 0!==i&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),e}(t);e.length&&(n.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();const e=n.get(t);e&&e.forEach(([e,n])=>{t.getValue(e)?.set(n)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}ge=!1,ye=!1,fe.forEach(t=>t.complete(ve)),fe.clear()}function Te(){fe.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(ge=!0)})}function we(){ve=!0,Te(),xe(),ve=!1}class be{constructor(t,e,n,i,s,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(fe.add(this),ye||(ye=!0,o.read(Te),o.resolveKeyframes(xe))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:i}=this;if(null===t[0]){const s=i?.get(),o=t[t.length-1];if(void 0!==s)t[0]=s;else if(n&&e){const i=n.readValue(e,o);null!=i&&(t[0]=i)}void 0===t[0]&&(t[0]=o),i&&void 0===s&&i.set(t[0])}_t(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),fe.delete(this)}cancel(){"scheduled"===this.state&&(fe.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const Se=t=>t.startsWith("--");function Pe(t,e,n){Se(e)?t.style.setProperty(e,n):t.style[e]=n}const Ae=e.memo(()=>void 0!==window.ScrollTimeline),Ve={};function Ee(t,n){const i=e.memo(t);return()=>Ve[n]??i()}const Me=Ee(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),De=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,Re={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:De([0,.65,.55,1]),circOut:De([.55,0,1,.45]),backIn:De([.31,.01,.66,-.59]),backOut:De([.33,1.53,.69,.99])};function ke(t,n){return t?"function"==typeof t?Me()?ht(t,n):"ease-out":e.isBezierDefinition(t)?De(t):Array.isArray(t)?t.map(t=>ke(t,n)||Re.easeOut):Re[t]:void 0}function Be(t,e,n,{delay:s=0,duration:o=300,repeat:r=0,repeatType:a="loop",ease:l="easeOut",times:u}={},c=void 0){const h={[e]:n};u&&(h.offset=u);const p=ke(l,o);Array.isArray(p)&&(h.easing=p),i.value&&d.waapi++;const m={delay:s,duration:o,easing:Array.isArray(p)?"linear":p,fill:"both",iterations:r+1,direction:"reverse"===a?"alternate":"normal"};c&&(m.pseudoElement=c);const f=t.animate(h,m);return i.value&&f.finished.finally(()=>{d.waapi--}),f}function Ce(t){return"function"==typeof t&&"applyToOptions"in t}function je({type:t,...e}){return Ce(t)&&Me()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class Le extends qt{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:i,keyframes:s,pseudoElement:o,allowFlatten:r=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=Boolean(o),this.allowFlatten=r,this.options=t,e.invariant("string"!=typeof t.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const u=je(t);this.animation=Be(n,i,s,u,o),!1===u.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const t=Yt(s,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(t):Pe(n,i,t),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;"idle"!==t&&"finished"!==t&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return e.millisecondsToSeconds(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+e.millisecondsToSeconds(t)}get time(){return e.millisecondsToSeconds(Number(this.animation.currentTime)||0)}set time(t){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=e.secondsToMilliseconds(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&Ae()?(this.animation.timeline=t,e.noop):n(this)}}const Oe={anticipate:e.anticipate,backInOut:e.backInOut,circInOut:e.circInOut};function Fe(t){"string"==typeof t.ease&&t.ease in Oe&&(t.ease=Oe[t.ease])}class Ie extends Le{constructor(t){Fe(t),Gt(t),super(t),void 0!==t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:i,onComplete:s,element:o,...r}=this.options;if(!n)return;if(void 0!==t)return void n.set(t);const a=new Zt({...r,autoplay:!1}),l=Math.max(10,h.now()-this.startTime),u=e.clamp(0,10,l-10);n.setWithVelocity(a.sample(Math.max(0,l-u)).value,a.sample(l).value,u),a.stop()}}const Ue=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!G.test(t)&&"0"!==t||t.startsWith("url(")));function Ne(t){t.duration=0,t.type="keyframes"}const $e=new Set(["opacity","clipPath","filter","transform"]),We=e.memo(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Ke(t){const{motionValue:e,name:n,repeatDelay:i,repeatType:s,damping:o,type:r}=t,a=e?.owner?.current;if(!(a instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=e.owner.getProps();return We()&&n&&$e.has(n)&&("transform"!==n||!u)&&!l&&!i&&"mirror"!==s&&0!==o&&"inertia"!==r}class ze extends qt{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:o="loop",keyframes:r,name:a,motionValue:l,element:u,...c}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=h.now();const d={autoplay:t,delay:e,type:n,repeat:i,repeatDelay:s,repeatType:o,name:a,motionValue:l,element:u,...c},p=u?.KeyframeResolver||be;this.keyframeResolver=new p(r,(t,e,n)=>this.onKeyframesResolved(t,e,d,!n),a,l,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,i,s){this.keyframeResolver=void 0;const{name:o,type:r,velocity:a,delay:l,isHandoff:u,onUpdate:c}=i;this.resolvedAt=h.now(),function(t,n,i,s){const o=t[0];if(null===o)return!1;if("display"===n||"visibility"===n)return!0;const r=t[t.length-1],a=Ue(o,n),l=Ue(r,n);return e.warning(a===l,`You are trying to animate ${n} from "${o}" to "${r}". "${a?r:o}" is not an animatable value.`,"value-not-animatable"),!(!a||!l)&&(function(t){const e=t[0];if(1===t.length)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}(t)||("spring"===i||Ce(i))&&s)}(t,o,r,a)||(!e.MotionGlobalConfig.instantAnimations&&l||c?.(Yt(t,i,n)),t[0]=t[t.length-1],Ne(i),i.repeat=0);const d={startTime:s?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:n,...i,keyframes:t},p=!u&&Ke(d),m=d.motionValue?.owner?.current,f=p?new Ie({...d,element:m}):new Zt(d);f.finished.then(()=>{this.notifyFinished()}).catch(e.noop),this.pendingTimeline&&(this.stopTimeline=f.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=f}get finished(){return this._animation?this.animation.finished:this._finished}then(t,e){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),we()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}class Ye{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=e}attachTimeline(t){const e=this.animations.map(e=>e.attachTimeline(t));return()=>{e.forEach((t,e)=>{t&&t(),this.animations[e].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return Xe(this.animations,"duration")}get iterationDuration(){return Xe(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(e=>e[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function Xe(t,e){let n=0;for(let i=0;i<t.length;i++){const s=t[i][e];null!==s&&s>n&&(n=s)}return n}class Ge extends Le{constructor(t){super(),this.animation=t,t.onfinish=()=>{this.finishedTime=this.time,this.notifyFinished()}}}const qe=new WeakMap;const He=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Ze(t){const e=He.exec(t);if(!e)return[,];const[,n,i,s]=e;return[`--${n??i}`,s]}function _e(t,n,i=1){e.invariant(i<=4,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[s,o]=Ze(t);if(!s)return;const r=window.getComputedStyle(n).getPropertyValue(s);if(r){const t=r.trim();return e.isNumericalString(t)?parseFloat(t):t}return y(o)?_e(o,n,i+1):o}function Je(t,e){return t?.[e]??t?.default??t}const Qe={type:"spring",stiffness:500,damping:25,restSpeed:10},tn={type:"keyframes",duration:.8},en={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},nn=(t,{keyframes:e})=>e.length>2?tn:ce.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:Qe:en;function sn({when:t,delay:e,delayChildren:n,staggerChildren:i,staggerDirection:s,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const on=t=>null!==t;function rn(t,{repeat:e,repeatType:n="loop"},i){const s=t.filter(on),o=e&&"loop"!==n&&e%2==1?0:s.length-1;return o&&void 0!==i?i:s[o]}function an(t,e,n,i=0,s=1){const o=Array.from(t).sort((t,e)=>t.sortNodePosition(e)).indexOf(e),r=t.size,a=(r-1)*i;return"function"==typeof n?n(o,r):1===s?o*i:a-o*i}const ln=(t,n,i,s={},r,a)=>l=>{const u=Je(s,t)||{},c=u.delay||s.delay||0;let{elapsed:h=0}=s;h-=e.secondsToMilliseconds(c);const d={keyframes:Array.isArray(i)?i:[null,i],ease:"easeOut",velocity:n.getVelocity(),...u,delay:-h,onUpdate:t=>{n.set(t),u.onUpdate&&u.onUpdate(t)},onComplete:()=>{l(),u.onComplete&&u.onComplete()},name:t,motionValue:n,element:a?void 0:r};sn(u)||Object.assign(d,nn(t,d)),d.duration&&(d.duration=e.secondsToMilliseconds(d.duration)),d.repeatDelay&&(d.repeatDelay=e.secondsToMilliseconds(d.repeatDelay)),void 0!==d.from&&(d.keyframes[0]=d.from);let p=!1;if((!1===d.type||0===d.duration&&!d.repeatDelay)&&(Ne(d),0===d.delay&&(p=!0)),(e.MotionGlobalConfig.instantAnimations||e.MotionGlobalConfig.skipAnimations)&&(p=!0,Ne(d),d.delay=0),d.allowFlatten=!u.type&&!u.ease,p&&!a&&void 0!==n.get()){const t=rn(d.keyframes,u);if(void 0!==t)return void o.update(()=>{d.onUpdate(t),d.onComplete()})}return u.isSync?new Zt(d):new ze(d)},un=new Set(["width","height","top","left","right","bottom",...ue]),cn={current:void 0};class hn{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=t=>{const e=h.now();if(this.updatedAt!==e&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const t of this.dependents)t.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=h.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new e.SubscriptionManager);const i=this.events[t].add(n);return"change"===t?()=>{i(),o.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return cn.current&&cn.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=h.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,30);return e.velocityPerSecond(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function dn(t,e){return new hn(t,e)}function pn(t){const e=[{},{}];return t?.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function mn(t,e,n,i){if("function"==typeof e){const[s,o]=pn(i);e=e(void 0!==n?n:t.custom,s,o)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[s,o]=pn(i);e=e(void 0!==n?n:t.custom,s,o)}return e}function fn(t,e,n){const i=t.getProps();return mn(i,e,void 0!==n?n:i.custom,t)}const yn=t=>Array.isArray(t);function gn(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,dn(n))}function vn(t){return yn(t)?t[t.length-1]||0:t}function xn(t,e){const n=fn(t,e);let{transitionEnd:i={},transition:s={},...o}=n||{};o={...o,...i};for(const e in o){gn(t,e,vn(o[e]))}}const Tn=t=>Boolean(t&&t.getVelocity);function wn(t){return Boolean(Tn(t)&&t.add)}function bn(t,n){const i=t.getValue("willChange");if(wn(i))return i.add(n);if(!i&&e.MotionGlobalConfig.WillChange){const i=new e.MotionGlobalConfig.WillChange("auto");t.addValue("willChange",i),i.add(n)}}function Sn(t){return t.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const Pn="framerAppearId",An="data-"+Sn(Pn);function Vn(t){return t.props[An]}function En({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,i}function Mn(t,e,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:r=t.getDefaultTransition(),transitionEnd:a,...l}=e;i&&(r=i);const u=[],c=s&&t.animationState&&t.animationState.getState()[s];for(const e in l){const i=t.getValue(e,t.latestValues[e]??null),s=l[e];if(void 0===s||c&&En(c,e))continue;const a={delay:n,...Je(r||{},e)},h=i.get();if(void 0!==h&&!i.isAnimating&&!Array.isArray(s)&&s===h&&!a.velocity)continue;let d=!1;if(window.MotionHandoffAnimation){const n=Vn(t);if(n){const t=window.MotionHandoffAnimation(n,e,o);null!==t&&(a.startTime=t,d=!0)}}bn(t,e),i.start(ln(e,i,s,t.shouldReduceMotion&&un.has(e)?{type:!1}:a,t,d));const p=i.animation;p&&u.push(p)}return a&&Promise.all(u).then(()=>{o.update(()=>{a&&xn(t,a)})}),u}function Dn(t,e,n={}){const i=fn(t,e,"exit"===n.type?t.presenceContext?.custom:void 0);let{transition:s=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const o=i?()=>Promise.all(Mn(t,i,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(i=0)=>{const{delayChildren:o=0,staggerChildren:r,staggerDirection:a}=s;return function(t,e,n=0,i=0,s=0,o=1,r){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(Dn(l,e,{...r,delay:n+("function"==typeof i?0:i)+an(t.variantChildren,l,i,s,o)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}(t,e,i,o,r,a,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[t,e]="beforeChildren"===a?[o,r]:[r,o];return t().then(()=>e())}return Promise.all([o(),r(n.delay)])}function Rn(t,e,n={}){let i;if(t.notify("AnimationStart",e),Array.isArray(e)){const s=e.map(e=>Dn(t,e,n));i=Promise.all(s)}else if("string"==typeof e)i=Dn(t,e,n);else{const s="function"==typeof e?fn(t,e,n.custom):e;i=Promise.all(Mn(t,s,n))}return i.then(()=>{t.notify("AnimationComplete",e)})}const kn=t=>e=>e.test(t),Bn=[x,C,B,k,L,j,{test:t=>"auto"===t,parse:t=>t}],Cn=t=>Bn.find(kn(t));function jn(t){return"number"==typeof t?0===t:null===t||("none"===t||"0"===t||e.isZeroValueString(t))}const Ln=new Set(["brightness","contrast","saturate","opacity"]);function On(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(S)||[];if(!i)return t;const s=n.replace(i,"");let o=Ln.has(e)?1:0;return i!==n&&(o*=100),e+"("+o+s+")"}const Fn=/\b([a-z-]*)\(.*?\)/gu,In={...G,getAnimatableNone:t=>{const e=t.match(Fn);return e?e.map(On).join(" "):t}},Un={...x,transform:Math.round},Nn={rotate:k,rotateX:k,rotateY:k,rotateZ:k,scale:w,scaleX:w,scaleY:w,scaleZ:w,skew:k,skewX:k,skewY:k,distance:C,translateX:C,translateY:C,translateZ:C,x:C,y:C,z:C,perspective:C,transformPerspective:C,opacity:T,originX:O,originY:O,originZ:C},$n={borderWidth:C,borderTopWidth:C,borderRightWidth:C,borderBottomWidth:C,borderLeftWidth:C,borderRadius:C,radius:C,borderTopLeftRadius:C,borderTopRightRadius:C,borderBottomRightRadius:C,borderBottomLeftRadius:C,width:C,maxWidth:C,height:C,maxHeight:C,top:C,right:C,bottom:C,left:C,inset:C,insetBlock:C,insetBlockStart:C,insetBlockEnd:C,insetInline:C,insetInlineStart:C,insetInlineEnd:C,padding:C,paddingTop:C,paddingRight:C,paddingBottom:C,paddingLeft:C,paddingBlock:C,paddingBlockStart:C,paddingBlockEnd:C,paddingInline:C,paddingInlineStart:C,paddingInlineEnd:C,margin:C,marginTop:C,marginRight:C,marginBottom:C,marginLeft:C,marginBlock:C,marginBlockStart:C,marginBlockEnd:C,marginInline:C,marginInlineStart:C,marginInlineEnd:C,backgroundPositionX:C,backgroundPositionY:C,...Nn,zIndex:Un,fillOpacity:T,strokeOpacity:T,numOctaves:Un},Wn={...$n,color:I,backgroundColor:I,outlineColor:I,fill:I,stroke:I,borderColor:I,borderTopColor:I,borderRightColor:I,borderBottomColor:I,borderLeftColor:I,filter:In,WebkitFilter:In},Kn=t=>Wn[t];function zn(t,e){let n=Kn(t);return n!==In&&(n=G),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Yn=new Set(["auto","none","0"]);class Xn extends be{constructor(t,e,n,i,s){super(t,e,n,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e||!e.current)return;super.readKeyframes();for(let n=0;n<t.length;n++){let i=t[n];if("string"==typeof i&&(i=i.trim(),y(i))){const s=_e(i,e.current);void 0!==s&&(t[n]=s),n===t.length-1&&(this.finalKeyframe=i)}}if(this.resolveNoneKeyframes(),!un.has(n)||2!==t.length)return;const[i,s]=t,o=Cn(i),r=Cn(s);if(v(i)!==v(s)&&me[n])this.needsMeasurement=!0;else if(o!==r)if(he(o)&&he(r))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else me[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)(null===t[e]||jn(t[e]))&&n.push(e);n.length&&function(t,e,n){let i,s=0;for(;s<t.length&&!i;){const e=t[s];"string"==typeof e&&!Yn.has(e)&&K(e).values.length&&(i=t[s]),s++}if(i&&n)for(const s of e)t[s]=zn(n,i)}(t,n,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t||!t.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=me[n](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const i=e[e.length-1];void 0!==i&&t.getValue(n,i).jump(i,!1)}measureEndState(){const{element:t,name:e,unresolvedKeyframes:n}=this;if(!t||!t.current)return;const i=t.getValue(e);i&&i.jump(this.measuredOrigin,!1);const s=n.length-1,o=n[s];n[s]=me[e](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==o&&void 0===this.finalKeyframe&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEach(([e,n])=>{t.getValue(e).set(n)}),this.resolveNoneKeyframes()}}const Gn=new Set(["borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderRadius","radius","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius","width","maxWidth","height","maxHeight","top","right","bottom","left","inset","insetBlock","insetBlockStart","insetBlockEnd","insetInline","insetInlineStart","insetInlineEnd","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingBlock","paddingBlockStart","paddingBlockEnd","paddingInline","paddingInlineStart","paddingInlineEnd","margin","marginTop","marginRight","marginBottom","marginLeft","marginBlock","marginBlockStart","marginBlockEnd","marginInline","marginInlineStart","marginInlineEnd","backgroundPositionX","backgroundPositionY"]);const qn=e.memo(()=>{try{document.createElement("div").animate({opacity:[1]})}catch(t){return!1}return!0}),Hn=new Set(["opacity","clipPath","filter","transform"]);function Zn(t,e,n){if(t instanceof EventTarget)return[t];if("string"==typeof t){let i=document;e&&(i=e.current);const s=n?.[t]??i.querySelectorAll(t);return s?Array.from(s):[]}return Array.from(t)}function _n(t){return(e,n)=>{const i=Zn(e),s=[];for(const e of i){const i=t(e,n);s.push(i)}return()=>{for(const t of s)t()}}}const Jn=(t,e)=>e&&"number"==typeof t?e.transform(t):t;class Qn{constructor(){this.latest={},this.values=new Map}set(t,e,n,i,s=!0){const a=this.values.get(t);a&&a.onRemove();const l=()=>{const i=e.get();this.latest[t]=s?Jn(i,$n[t]):i,n&&o.render(n)};l();const u=e.on("change",l);i&&e.addDependent(i);const c=()=>{u(),n&&r(n),this.values.delete(t),i&&e.removeDependent(i)};return this.values.set(t,{value:e,onRemove:c}),c}get(t){return this.values.get(t)?.value}destroy(){for(const t of this.values.values())t.onRemove()}}function ti(t){const e=new WeakMap,n=[];return(i,s)=>{const o=e.get(i)??new Qn;e.set(i,o);for(const e in s){const r=s[e],a=t(i,o,e,r);n.push(a)}return()=>{for(const t of n)t()}}}const ei=(t,e,n,i)=>{const s=function(t,e){if(!(e in t))return!1;const n=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),e)||Object.getOwnPropertyDescriptor(t,e);return n&&"function"==typeof n.set}(t,n),o=s?n:n.startsWith("data")||n.startsWith("aria")?Sn(n):n,r=s?()=>{t[o]=e.latest[n]}:()=>{const i=e.latest[n];null==i?t.removeAttribute(o):t.setAttribute(o,String(i))};return e.set(n,i,r)},ni=_n(ti(ei)),ii=ti((t,e,n,i)=>e.set(n,i,()=>{t[n]=e.latest[n]},void 0,!1));function si(t){return e.isObject(t)&&"offsetHeight"in t}const oi={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};const ri=new Set(["originX","originY","originZ"]),ai=(t,e,n,i)=>{let s,o;return ce.has(n)?(e.get("transform")||(si(t)||e.get("transformBox")||ai(t,e,"transformBox",new hn("fill-box")),e.set("transform",new hn("none"),()=>{t.style.transform=function(t){let e="",n=!0;for(let i=0;i<ue.length;i++){const s=ue[i],o=t.latest[s];if(void 0===o)continue;let r=!0;r="number"==typeof o?o===(s.startsWith("scale")?1:0):0===parseFloat(o),r||(n=!1,e+=`${oi[s]||s}(${t.latest[s]}) `)}return n?"none":e.trim()}(e)})),o=e.get("transform")):ri.has(n)?(e.get("transformOrigin")||e.set("transformOrigin",new hn(""),()=>{const n=e.latest.originX??"50%",i=e.latest.originY??"50%",s=e.latest.originZ??0;t.style.transformOrigin=`${n} ${i} ${s}`}),o=e.get("transformOrigin")):s=Se(n)?()=>{t.style.setProperty(n,e.latest[n])}:()=>{t.style[n]=e.latest[n]},e.set(n,i,s,o)},li=_n(ti(ai)),ui=C.transform;const ci=_n(ti((t,e,n,i)=>{if(n.startsWith("path"))return function(t,e,n,i){return o.render(()=>t.setAttribute("pathLength","1")),"pathOffset"===n?e.set(n,i,()=>t.setAttribute("stroke-dashoffset",ui(-e.latest[n]))):(e.get("stroke-dasharray")||e.set("stroke-dasharray",new hn("1 1"),()=>{const{pathLength:n=1,pathSpacing:i}=e.latest;t.setAttribute("stroke-dasharray",`${ui(n)} ${ui(i??1-Number(n))}`)}),e.set(n,i,void 0,e.get("stroke-dasharray")))}(t,e,n,i);if(n.startsWith("attr"))return ei(t,e,function(t){return t.replace(/^attr([A-Z])/,(t,e)=>e.toLowerCase())}(n),i);return(n in t.style?ai:ei)(t,e,n,i)}));const{schedule:hi,cancel:di}=s(queueMicrotask,!1),pi={x:!1,y:!1};function mi(){return pi.x||pi.y}function fi(t,e){const n=Zn(t),i=new AbortController;return[n,{passive:!0,...e,signal:i.signal},()=>i.abort()]}function yi(t){return!("touch"===t.pointerType||mi())}const gi=(t,e)=>!!e&&(t===e||gi(t,e.parentElement)),vi=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary,xi=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Ti(t){return xi.has(t.tagName)||!0===t.isContentEditable}const wi=new WeakSet;function bi(t){return e=>{"Enter"===e.key&&t(e)}}function Si(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function Pi(t){return vi(t)&&!mi()}function Ai(t){return e.isObject(t)&&"ownerSVGElement"in t}const Vi=new WeakMap;let Ei;const Mi=(t,e,n)=>(i,s)=>s&&s[0]?s[0][t+"Size"]:Ai(i)&&"getBBox"in i?i.getBBox()[e]:i[n],Di=Mi("inline","width","offsetWidth"),Ri=Mi("block","height","offsetHeight");function ki({target:t,borderBoxSize:e}){Vi.get(t)?.forEach(n=>{n(t,{get width(){return Di(t,e)},get height(){return Ri(t,e)}})})}function Bi(t){t.forEach(ki)}function Ci(t,e){Ei||"undefined"!=typeof ResizeObserver&&(Ei=new ResizeObserver(Bi));const n=Zn(t);return n.forEach(t=>{let n=Vi.get(t);n||(n=new Set,Vi.set(t,n)),n.add(e),Ei?.observe(t)}),()=>{n.forEach(t=>{const n=Vi.get(t);n?.delete(e),n?.size||Ei?.unobserve(t)})}}const ji=new Set;let Li;function Oi(t){return ji.add(t),Li||(Li=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};ji.forEach(e=>e(t))},window.addEventListener("resize",Li)),()=>{ji.delete(t),ji.size||"function"!=typeof Li||(window.removeEventListener("resize",Li),Li=void 0)}}function Fi(){const{value:t}=i;null!==t?(t.frameloop.rate.push(a.delta),t.animations.mainThread.push(d.mainThread),t.animations.waapi.push(d.waapi),t.animations.layout.push(d.layout)):r(Fi)}function Ii(t){return t.reduce((t,e)=>t+e,0)/t.length}function Ui(t,e=Ii){return 0===t.length?{min:0,max:0,avg:0}:{min:Math.min(...t),max:Math.max(...t),avg:e(t)}}const Ni=t=>Math.round(1e3/t);function $i(){i.value=null,i.addProjectionMetrics=null}function Wi(){const{value:t}=i;if(!t)throw new Error("Stats are not being measured");$i(),r(Fi);const e={frameloop:{setup:Ui(t.frameloop.setup),rate:Ui(t.frameloop.rate),read:Ui(t.frameloop.read),resolveKeyframes:Ui(t.frameloop.resolveKeyframes),preUpdate:Ui(t.frameloop.preUpdate),update:Ui(t.frameloop.update),preRender:Ui(t.frameloop.preRender),render:Ui(t.frameloop.render),postRender:Ui(t.frameloop.postRender)},animations:{mainThread:Ui(t.animations.mainThread),waapi:Ui(t.animations.waapi),layout:Ui(t.animations.layout)},layoutProjection:{nodes:Ui(t.layoutProjection.nodes),calculatedTargetDeltas:Ui(t.layoutProjection.calculatedTargetDeltas),calculatedProjections:Ui(t.layoutProjection.calculatedProjections)}},{rate:n}=e.frameloop;return n.min=Ni(n.min),n.max=Ni(n.max),n.avg=Ni(n.avg),[n.min,n.max]=[n.max,n.min],e}function Ki(t){return Ai(t)&&"svg"===t.tagName}function zi(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}}function Yi(...t){const e=!Array.isArray(t[0]),n=e?0:-1,i=t[0+n],s=It(t[1+n],t[2+n],t[3+n]);return e?s(i):s}function Xi(t){const e=[];cn.current=e;const n=t();cn.current=void 0;const i=dn(n);return function(t,e,n){const i=()=>e.set(n()),s=()=>o.preRender(i,!1,!0),a=t.map(t=>t.on("change",s));e.on("destroy",()=>{a.forEach(t=>t()),r(i)})}(e,i,t),i}function Gi(t,e,n){const i=t.get();let s,r=null,a=i;const l="string"==typeof i?i.replace(/[\d.-]/g,""):void 0,u=()=>{r&&(r.stop(),r=null)};if(t.attach((e,i)=>{a=e,s=t=>i(qi(t,l)),o.postRender(()=>{u(),r=new Zt({keyframes:[Hi(t.get()),Hi(a)],velocity:t.getVelocity(),type:"spring",restDelta:.001,restSpeed:.01,...n,onUpdate:s}),t.events.animationStart?.notify(),r?.then(()=>{t.events.animationComplete?.notify()})})},u),Tn(e)){const n=e.on("change",e=>t.set(qi(e,l))),i=t.on("destroy",n);return()=>{n(),i()}}return u}function qi(t,e){return e?t+e:t}function Hi(t){return"number"==typeof t?t:parseFloat(t)}const Zi=[...Bn,I,G],_i=t=>Zi.find(kn(t));function Ji(t){return"layout"===t?"group":"enter"===t||"new"===t?"new":"exit"===t||"old"===t?"old":"group"}let Qi={},ts=null;const es=(t,e)=>{Qi[t]=e},ns=()=>{ts||(ts=document.createElement("style"),ts.id="motion-view");let t="";for(const e in Qi){const n=Qi[e];t+=`${e} {\n`;for(const[e,i]of Object.entries(n))t+=` ${e}: ${i};\n`;t+="}\n"}ts.textContent=t,document.head.appendChild(ts),Qi={}},is=()=>{ts&&ts.parentElement&&ts.parentElement.removeChild(ts)};function ss(t){const e=t.match(/::view-transition-(old|new|group|image-pair)\((.*?)\)/);return e?{layer:e[2],type:e[1]}:null}function os(t){const{effect:e}=t;return!!e&&(e.target===document.documentElement&&e.pseudoElement?.startsWith("::view-transition"))}function rs(){return document.getAnimations().filter(os)}const as=["layout","enter","exit","new","old"];function ls(t){const{update:n,targets:i,options:s}=t;if(!document.startViewTransition)return new Promise(async t=>{await n(),t(new Ye([]))});(function(t,e){return e.has(t)&&Object.keys(e.get(t)).length>0})("root",i)||es(":root",{"view-transition-name":"none"}),es("::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*)",{"animation-timing-function":"linear !important"}),ns();const o=document.startViewTransition(async()=>{await n()});return o.finished.finally(()=>{is()}),new Promise(t=>{o.ready.then(()=>{const n=rs(),o=[];i.forEach((t,n)=>{for(const i of as){if(!t[i])continue;const{keyframes:r,options:a}=t[i];for(let[t,l]of Object.entries(r)){if(!l)continue;const r={...Je(s,t),...Je(a,t)},u=Ji(i);if("opacity"===t&&!Array.isArray(l)){l=["new"===u?0:1,l]}"function"==typeof r.delay&&(r.delay=r.delay(0,1)),r.duration&&(r.duration=e.secondsToMilliseconds(r.duration)),r.delay&&(r.delay=e.secondsToMilliseconds(r.delay));const c=new Le({...r,element:document.documentElement,name:t,pseudoElement:`::view-transition-${u}(${n})`,keyframes:l});o.push(c)}}});for(const t of n){if("finished"===t.playState)continue;const{effect:n}=t;if(!(n&&n instanceof KeyframeEffect))continue;const{pseudoElement:r}=n;if(!r)continue;const a=ss(r);if(!a)continue;const l=i.get(a.layer);if(l)us(l,"enter")&&us(l,"exit")&&n.getKeyframes().some(t=>t.mixBlendMode)?o.push(new Ge(t)):t.cancel();else{const i="group"===a.type?"layout":"";let r={...Je(s,i)};r.duration&&(r.duration=e.secondsToMilliseconds(r.duration)),r=je(r);const l=ke(r.ease,r.duration);n.updateTiming({delay:e.secondsToMilliseconds(r.delay??0),duration:r.duration,easing:l}),o.push(new Ge(t))}}t(new Ye(o))})})}function us(t,e){return t?.[e]?.keyframes.opacity}let cs=[],hs=null;function ds(){hs=null;const[t]=cs;var n;t&&(n=t,e.removeItem(cs,n),hs=n,ls(n).then(t=>{n.notifyReady(t),t.finished.finally(ds)}))}function ps(){for(let t=cs.length-1;t>=0;t--){const e=cs[t],{interrupt:n}=e.options;if("immediate"===n){const n=cs.slice(0,t+1).map(t=>t.update),i=cs.slice(t+1);e.update=()=>{n.forEach(t=>t())},cs=[e,...i];break}}hs&&"immediate"!==cs[0]?.options.interrupt||ds()}class ms{constructor(t,n={}){var i;this.currentSubject="root",this.targets=new Map,this.notifyReady=e.noop,this.readyPromise=new Promise(t=>{this.notifyReady=t}),this.update=t,this.options={interrupt:"wait",...n},i=this,cs.push(i),hi.render(ps)}get(t){return this.currentSubject=t,this}layout(t,e){return this.updateTarget("layout",t,e),this}new(t,e){return this.updateTarget("new",t,e),this}old(t,e){return this.updateTarget("old",t,e),this}enter(t,e){return this.updateTarget("enter",t,e),this}exit(t,e){return this.updateTarget("exit",t,e),this}crossfade(t){return this.updateTarget("enter",{opacity:1},t),this.updateTarget("exit",{opacity:0},t),this}updateTarget(t,e,n={}){const{currentSubject:i,targets:s}=this;s.has(i)||s.set(i,{});s.get(i)[t]={keyframes:e,options:n}}then(t,e){return this.readyPromise.then(t,e)}}const fs=()=>({translate:0,scale:1,origin:0,originPoint:0}),ys=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),gs=()=>({min:0,max:0}),vs=()=>({x:{min:0,max:0},y:{min:0,max:0}}),xs={current:null},Ts={current:!1},ws="undefined"!=typeof window;function bs(){if(Ts.current=!0,ws)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>xs.current=t.matches;t.addEventListener("change",e),e()}else xs.current=!1}const Ss=new WeakMap;function Ps(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function As(t){return"string"==typeof t||Array.isArray(t)}const Vs=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Es=["initial",...Vs];function Ms(t){return Ps(t.animate)||Es.some(e=>As(t[e]))}function Ds(t){return Boolean(Ms(t)||t.variants)}function Rs(t,e,n){for(const i in e){const s=e[i],o=n[i];if(Tn(s))t.addValue(i,s);else if(Tn(o))t.addValue(i,dn(s,{owner:t}));else if(o!==s)if(t.hasValue(i)){const e=t.getValue(i);!0===e.liveStyle?e.jump(s):e.hasAnimated||e.set(s)}else{const e=t.getStaticValue(i);t.addValue(i,dn(void 0!==e?e:s,{owner:t}))}}for(const i in n)void 0===e[i]&&t.removeValue(i);return e}const ks=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Bs={};class Cs{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:i,blockInitialAnimation:s,visualState:r},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=be,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const t=h.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,o.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=r;this.latestValues=l,this.baseTarget={...l},this.initialValues=e.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=Boolean(s),this.isControllingVariants=Ms(e),this.isVariantNode=Ds(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:c,...d}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in d){const e=d[t];void 0!==l[t]&&Tn(e)&&e.set(l[t])}}mount(t){this.current=t,Ss.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((t,e)=>this.bindToMotionValue(e,t)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(Ts.current||bs(),this.shouldReduceMotion=xs.current),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),r(this.notifyUpdate),r(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,e){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=ce.has(t);n&&this.onBindTransform&&this.onBindTransform();const i=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&o.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;"undefined"!=typeof window&&window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{i(),s&&s(),e.owner&&e.stop()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in Bs){const e=Bs[t];if(!e)continue;const{isEnabled:n,Feature:i}=e;if(!this.features[t]&&i&&n(this.props)&&(this.features[t]=new i(this)),this.features[t]){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<ks.length;e++){const n=ks[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const i=t["on"+n];i&&(this.propEventSubscriptions[n]=this.on(n,i))}this.prevMotionValues=Rs(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){const n=this.values.get(t);e!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=dn(null===e?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,n){let i=void 0===this.latestValues[t]&&this.current?this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];return null!=i&&("string"==typeof i&&(e.isNumericalString(i)||e.isZeroValueString(i))?i=parseFloat(i):!_i(i)&&G.test(n)&&(i=zn(t,n)),this.setBaseTarget(t,Tn(i)?i.get():i)),Tn(i)?i.get():i}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){const{initial:e}=this.props;let n;if("string"==typeof e||"object"==typeof e){const i=mn(this.props,e,this.presenceContext?.custom);i&&(n=i[t])}if(e&&void 0!==n)return n;const i=this.getBaseTargetFromProps(this.props,t);return void 0===i||Tn(i)?void 0!==this.initialValues[t]&&void 0===n?void 0:this.baseTarget[t]:i}on(t,n){return this.events[t]||(this.events[t]=new e.SubscriptionManager),this.events[t].add(n)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}scheduleRenderMicrotask(){hi.render(this.render)}}class js extends Cs{constructor(){super(...arguments),this.KeyframeResolver=Xn}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){const n=t.style;return n?n[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Tn(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}function Ls({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function Os(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}function Fs(t){return void 0===t||1===t}function Is({scale:t,scaleX:e,scaleY:n}){return!Fs(t)||!Fs(e)||!Fs(n)}function Us(t){return Is(t)||Ns(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Ns(t){return $s(t.x)||$s(t.y)}function $s(t){return t&&"0%"!==t}function Ws(t,e,n){return n+e*(t-n)}function Ks(t,e,n,i,s){return void 0!==s&&(t=Ws(t,s,i)),Ws(t,n,i)+e}function zs(t,e=0,n=1,i,s){t.min=Ks(t.min,e,n,i,s),t.max=Ks(t.max,e,n,i,s)}function Ys(t,{x:e,y:n}){zs(t.x,e.translate,e.scale,e.originPoint),zs(t.y,n.translate,n.scale,n.originPoint)}const Xs=.999999999999,Gs=1.0000000000001;function qs(t,e,n,i=!1){const s=n.length;if(!s)return;let o,r;e.x=e.y=1;for(let a=0;a<s;a++){o=n[a],r=o.projectionDelta;const{visualElement:s}=o.options;s&&s.props.style&&"contents"===s.props.style.display||(i&&o.options.layoutScroll&&o.scroll&&o!==o.root&&_s(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,Ys(t,r)),i&&Us(o.latestValues)&&_s(t,o.latestValues))}e.x<Gs&&e.x>Xs&&(e.x=1),e.y<Gs&&e.y>Xs&&(e.y=1)}function Hs(t,e){t.min=t.min+e,t.max=t.max+e}function Zs(t,e,n,i,s=.5){zs(t,e,n,_(t.min,t.max,s),i)}function _s(t,e){Zs(t.x,e.x,e.scaleX,e.scale,e.originX),Zs(t.y,e.y,e.scaleY,e.scale,e.originY)}function Js(t,e){return Ls(Os(t.getBoundingClientRect(),e))}const Qs={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},to=ue.length;function eo(t,e,n){let i="",s=!0;for(let o=0;o<to;o++){const r=ue[o],a=t[r];if(void 0===a)continue;let l=!0;if(l="number"==typeof a?a===(r.startsWith("scale")?1:0):0===parseFloat(a),!l||n){const t=Jn(a,$n[r]);if(!l){s=!1;i+=`${Qs[r]||r}(${t}) `}n&&(e[r]=t)}}return i=i.trim(),n?i=n(e,s?"":i):s&&(i="none"),i}function no(t,e,n){const{style:i,vars:s,transformOrigin:o}=t;let r=!1,a=!1;for(const t in e){const n=e[t];if(ce.has(t))r=!0;else if(m(t))s[t]=n;else{const e=Jn(n,$n[t]);t.startsWith("origin")?(a=!0,o[t]=e):i[t]=e}}if(e.transform||(r||n?i.transform=eo(e,t.transform,n):i.transform&&(i.transform="none")),a){const{originX:t="50%",originY:e="50%",originZ:n=0}=o;i.transformOrigin=`${t} ${e} ${n}`}}function io(t,{style:e,vars:n},i,s){const o=t.style;let r;for(r in e)o[r]=e[r];for(r in s?.applyProjectionStyles(o,i),n)o.setProperty(r,n[r])}function so(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const oo={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!C.test(t))return t;t=parseFloat(t)}return`${so(t,e.target.x)}% ${so(t,e.target.y)}%`}},ro={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,s=G.parse(t);if(s.length>5)return i;const o=G.createTransformer(t),r="number"!=typeof s[0]?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;s[0+r]/=a,s[1+r]/=l;const u=_(a,l,.5);return"number"==typeof s[2+r]&&(s[2+r]/=u),"number"==typeof s[3+r]&&(s[3+r]/=u),o(s)}},ao={borderRadius:{...oo,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:oo,borderTopRightRadius:oo,borderBottomLeftRadius:oo,borderBottomRightRadius:oo,boxShadow:ro};function lo(t){for(const e in t)ao[e]=t[e],m(e)&&(ao[e].isCSSVariable=!0)}function uo(t,{layout:e,layoutId:n}){return ce.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!ao[t]||"opacity"===t)}function co(t,e,n){const i=t.style,s=e?.style,o={};if(!i)return o;for(const e in i)(Tn(i[e])||s&&Tn(s[e])||uo(e,t)||void 0!==n?.getValue(e)?.liveStyle)&&(o[e]=i[e]);return o}class ho extends js{constructor(){super(...arguments),this.type="html",this.renderInstance=io}readValueFromInstance(t,e){if(ce.has(e))return this.projection?.isProjecting?oe(e):ae(t,e);{const i=(n=t,window.getComputedStyle(n)),s=(m(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof s?s.trim():s}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return Js(t,e)}build(t,e,n){no(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return co(t,e,n)}}const po={offset:"stroke-dashoffset",array:"stroke-dasharray"},mo={offset:"strokeDashoffset",array:"strokeDasharray"};function fo(t,e,n=1,i=0,s=!0){t.pathLength=1;const o=s?po:mo;t[o.offset]=C.transform(-i);const r=C.transform(e),a=C.transform(n);t[o.array]=`${r} ${a}`}const yo=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function go(t,{attrX:e,attrY:n,attrScale:i,pathLength:s,pathSpacing:o=1,pathOffset:r=0,...a},l,u,c){if(no(t,a,u),l)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:h,style:d}=t;h.transform&&(d.transform=h.transform,delete h.transform),(d.transform||h.transformOrigin)&&(d.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),d.transform&&(d.transformBox=c?.transformBox??"fill-box",delete h.transformBox);for(const t of yo)void 0!==h[t]&&(d[t]=h[t],delete h[t]);void 0!==e&&(h.x=e),void 0!==n&&(h.y=n),void 0!==i&&(h.scale=i),void 0!==s&&fo(h,s,o,r,!1)}const vo=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),xo=t=>"string"==typeof t&&"svg"===t.toLowerCase();function To(t,e,n,i){io(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(vo.has(n)?n:Sn(n),e.attrs[n])}function wo(t,e,n){const i=co(t,e,n);for(const n in t)if(Tn(t[n])||Tn(e[n])){i[-1!==ue.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return i}const bo=Es.length;function So(t){if(!t)return;if(!t.isControllingVariants){const e=t.parent&&So(t.parent)||{};return void 0!==t.props.initial&&(e.initial=t.props.initial),e}const e={};for(let n=0;n<bo;n++){const i=Es[n],s=t.props[i];(As(s)||!1===s)&&(e[i]=s)}return e}function Po(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}const Ao=[...Vs].reverse(),Vo=Vs.length;function Eo(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!Po(e,t)}function Mo(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Do(){return{animate:Mo(!0),whileInView:Mo(),whileHover:Mo(),whileTap:Mo(),whileDrag:Mo(),whileFocus:Mo(),exit:Mo()}}function Ro(t){return t.max-t.min}function ko(t,e,n){return Math.abs(t-e)<=n}function Bo(t,e,n,i=.5){t.origin=i,t.originPoint=_(e.min,e.max,t.origin),t.scale=Ro(n)/Ro(e),t.translate=_(n.min,n.max,t.origin)-t.originPoint,(t.scale>=.9999&&t.scale<=1.0001||isNaN(t.scale))&&(t.scale=1),(t.translate>=-.01&&t.translate<=.01||isNaN(t.translate))&&(t.translate=0)}function Co(t,e,n,i){Bo(t.x,e.x,n.x,i?i.originX:void 0),Bo(t.y,e.y,n.y,i?i.originY:void 0)}function jo(t,e,n){t.min=n.min+e.min,t.max=t.min+Ro(e)}function Lo(t,e,n){jo(t.x,e.x,n.x),jo(t.y,e.y,n.y)}function Oo(t,e,n){t.min=e.min-n.min,t.max=t.min+Ro(e)}function Fo(t,e,n){Oo(t.x,e.x,n.x),Oo(t.y,e.y,n.y)}function Io(t,e,n,i,s){return t=Ws(t-=e,1/n,i),void 0!==s&&(t=Ws(t,1/s,i)),t}function Uo(t,e=0,n=1,i=.5,s,o=t,r=t){if(B.test(e)){e=parseFloat(e);e=_(r.min,r.max,e/100)-r.min}if("number"!=typeof e)return;let a=_(o.min,o.max,i);t===o&&(a-=e),t.min=Io(t.min,e,n,a,s),t.max=Io(t.max,e,n,a,s)}function No(t,e,[n,i,s],o,r){Uo(t,e[n],e[i],e[s],e.scale,o,r)}const $o=["x","scaleX","originX"],Wo=["y","scaleY","originY"];function Ko(t,e,n,i){No(t.x,e,$o,n?n.x:void 0,i?i.x:void 0),No(t.y,e,Wo,n?n.y:void 0,i?i.y:void 0)}function zo(t,e){t.min=e.min,t.max=e.max}function Yo(t,e){zo(t.x,e.x),zo(t.y,e.y)}function Xo(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function Go(t){return 0===t.translate&&1===t.scale}function qo(t){return Go(t.x)&&Go(t.y)}function Ho(t,e){return t.min===e.min&&t.max===e.max}function Zo(t,e){return Ho(t.x,e.x)&&Ho(t.y,e.y)}function _o(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Jo(t,e){return _o(t.x,e.x)&&_o(t.y,e.y)}function Qo(t){return Ro(t.x)/Ro(t.y)}function tr(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function er(t){return[t("x"),t("y")]}function nr(t,e,n){let i="";const s=t.x.translate/e.x,o=t.y.translate/e.y,r=n?.z||0;if((s||o||r)&&(i=`translate3d(${s}px, ${o}px, ${r}px) `),1===e.x&&1===e.y||(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:t,rotate:e,rotateX:s,rotateY:o,skewX:r,skewY:a}=n;t&&(i=`perspective(${t}px) ${i}`),e&&(i+=`rotate(${e}deg) `),s&&(i+=`rotateX(${s}deg) `),o&&(i+=`rotateY(${o}deg) `),r&&(i+=`skewX(${r}deg) `),a&&(i+=`skewY(${a}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return 1===a&&1===l||(i+=`scale(${a}, ${l})`),i||"none"}const ir=["TopLeft","TopRight","BottomLeft","BottomRight"],sr=ir.length,or=t=>"string"==typeof t?parseFloat(t):t,rr=t=>"number"==typeof t||C.test(t);function ar(t,e,n,i,s,o){s?(t.opacity=_(0,n.opacity??1,ur(i)),t.opacityExit=_(e.opacity??1,0,cr(i))):o&&(t.opacity=_(e.opacity??1,n.opacity??1,i));for(let s=0;s<sr;s++){const o=`border${ir[s]}Radius`;let r=lr(e,o),a=lr(n,o);if(void 0===r&&void 0===a)continue;r||(r=0),a||(a=0);0===r||0===a||rr(r)===rr(a)?(t[o]=Math.max(_(or(r),or(a),i),0),(B.test(a)||B.test(r))&&(t[o]+="%")):t[o]=a}(e.rotate||n.rotate)&&(t.rotate=_(e.rotate||0,n.rotate||0,i))}function lr(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const ur=hr(0,.5,e.circOut),cr=hr(.5,.95,e.noop);function hr(t,n,i){return s=>s<t?0:s>n?1:i(e.progress(t,n,s))}function dr(t,e){const n=h.now(),i=({timestamp:s})=>{const o=s-n;o>=e&&(r(i),t(o-e))};return o.setup(i,!0),()=>r(i)}function pr(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}function mr(t){return Tn(t)?t.get():t}function fr(t,e,n){const i=Tn(t)?t:dn(t);return i.start(ln("",i,e,n)),i.animation}const yr=(t,e)=>t.depth-e.depth;class gr{constructor(){this.children=[],this.isDirty=!1}add(t){e.addUniqueItem(this.children,t),this.isDirty=!0}remove(t){e.removeItem(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(yr),this.isDirty=!1,this.children.forEach(t)}}class vr{constructor(){this.members=[]}add(t){e.addUniqueItem(this.members,t),t.scheduleRender()}remove(t){if(e.removeItem(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){const e=this.members.findIndex(e=>t===e);if(0===e)return!1;let n;for(let t=e;t>=0;t--){const e=this.members[t];if(!1!==e.isPresent){n=e;break}}return!!n&&(this.promote(n),!0)}promote(t,e){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,e&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;!1===i&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:e,resumingFrom:n}=t;e.onExitComplete&&e.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const xr={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Tr={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},wr=["","X","Y","Z"];let br=0;function Sr(t,e,n,i){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),i&&(i[t]=0))}function Pr(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Vn(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:e,layoutId:i}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",o,!(e||i))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&Pr(i)}function Ar({attachResizeListener:t,defaultParent:n,measureScroll:s,checkIsScrollRoot:u,resetTransform:c}){return class{constructor(t={},e=n?.()){this.id=br++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,i.value&&(Tr.nodes=Tr.calculatedTargetDeltas=Tr.calculatedProjections=0),this.nodes.forEach(Mr),this.nodes.forEach(Lr),this.nodes.forEach(Or),this.nodes.forEach(Dr),i.addProjectionMetrics&&i.addProjectionMetrics(Tr)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=e?e.root||e:this,this.path=e?[...e.path,e]:[],this.parent=e,this.depth=e?e.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new gr)}addEventListener(t,n){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new e.SubscriptionManager),this.eventHandlers.get(t).add(n)}notifyListeners(t,...e){const n=this.eventHandlers.get(t);n&&n.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(e){if(this.instance)return;this.isSVG=Ai(e)&&!Ki(e),this.instance=e;const{layoutId:n,layout:i,visualElement:s}=this.options;if(s&&!s.current&&s.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(i||n)&&(this.isLayoutDirty=!0),t){let n,i=0;const s=()=>this.root.updateBlockedByResize=!1;o.read(()=>{i=window.innerWidth}),t(e,()=>{const t=window.innerWidth;t!==i&&(i=t,this.root.updateBlockedByResize=!0,n&&n(),n=dr(s,250),xr.hasAnimatedSinceResize&&(xr.hasAnimatedSinceResize=!1,this.nodes.forEach(jr)))})}n&&this.root.registerSharedNode(n,this),!1!==this.options.animate&&s&&(n||i)&&this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeLayoutChanged:n,layout:i})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const o=this.options.transition||s.getDefaultTransition()||Wr,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=s.getProps(),l=!this.targetLayout||!Jo(this.targetLayout,i),u=!e&&n;if(this.options.layoutRoot||this.resumeFrom||u||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const e={...Je(o,"layout"),onPlay:r,onComplete:a};(s.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e),this.setAnimationOrigin(t,u)}else e||jr(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=i})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),r(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Fr),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Pr(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t<this.path.length;t++){const e=this.path[t];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:e,layout:n}=this.options;if(void 0===e&&!n)return;const i=this.getTransformTemplate();this.prevTransformTemplateValue=i?i(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(kr);if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(Br);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Cr),this.nodes.forEach(Vr),this.nodes.forEach(Er)):this.nodes.forEach(Br),this.clearAllSnapshots();const t=h.now();a.delta=e.clamp(0,1e3/60,t-a.timestamp),a.timestamp=t,a.isProcessing=!0,l.update.process(a),l.preRender.process(a),l.render.process(a),a.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,hi.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Rr),this.sharedNodes.forEach(Ir)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,o.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){o.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||Ro(this.snapshot.measuredBox.x)||Ro(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t<this.path.length;t++){this.path[t].updateScroll()}const t=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:e}=this.options;e&&e.notify("LayoutMeasure",this.layout.layoutBox,t?t.layoutBox:void 0)}updateScroll(t="measure"){let e=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t&&(e=!1),e&&this.instance){const e=u(this.instance);this.scroll={animationId:this.root.animationId,phase:t,isRoot:e,offset:s(this.instance),wasRoot:this.scroll?this.scroll.isRoot:e}}}resetTransform(){if(!c)return;const t=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,e=this.projectionDelta&&!qo(this.projectionDelta),n=this.getTransformTemplate(),i=n?n(this.latestValues,""):void 0,s=i!==this.prevTransformTemplateValue;t&&this.instance&&(e||Us(this.latestValues)||s)&&(c(this.instance,i),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){const e=this.measurePageBox();let n=this.removeElementScroll(e);var i;return t&&(n=this.removeTransform(n)),Yr((i=n).x),Yr(i.y),{animationId:this.root.animationId,measuredBox:e,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const e=t.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Gr))){const{scroll:t}=this.root;t&&(Hs(e.x,t.offset.x),Hs(e.y,t.offset.y))}return e}removeElementScroll(t){const e={x:{min:0,max:0},y:{min:0,max:0}};if(Yo(e,t),this.scroll?.wasRoot)return e;for(let n=0;n<this.path.length;n++){const i=this.path[n],{scroll:s,options:o}=i;i!==this.root&&s&&o.layoutScroll&&(s.wasRoot&&Yo(e,t),Hs(e.x,s.offset.x),Hs(e.y,s.offset.y))}return e}applyTransform(t,e=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};Yo(n,t);for(let t=0;t<this.path.length;t++){const i=this.path[t];!e&&i.options.layoutScroll&&i.scroll&&i!==i.root&&_s(n,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),Us(i.latestValues)&&_s(n,i.latestValues)}return Us(this.latestValues)&&_s(n,this.latestValues),n}removeTransform(t){const e={x:{min:0,max:0},y:{min:0,max:0}};Yo(e,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];if(!n.instance)continue;if(!Us(n.latestValues))continue;Is(n.latestValues)&&n.updateSnapshot();const i=vs();Yo(i,n.measurePageBox()),Ko(e,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,i)}return Us(this.latestValues)&&Ko(e,this.latestValues),e}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(t){this.options={...this.options,...t,crossfade:void 0===t.crossfade||t.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==a.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(t=!1){const e=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=e.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=e.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=e.isSharedProjectionDirty);const n=Boolean(this.resumingFrom)||this!==e;if(!(t||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:s,layoutId:o}=this.options;if(!this.layout||!s&&!o)return;this.resolvedRelativeTargetAt=a.timestamp;const r=this.getClosestProjectingParent();r&&this.linkedParentVersion!==r.layoutVersion&&!r.options.layoutRoot&&this.removeRelativeTarget(),this.targetDelta||this.relativeTarget||(r&&r.layout?this.createRelativeTarget(r,this.layout.layoutBox,r.layout.layoutBox):this.removeRelativeTarget()),(this.relativeTarget||this.targetDelta)&&(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Lo(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):Yo(this.target,this.layout.layoutBox),Ys(this.target,this.targetDelta)):Yo(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,r&&Boolean(r.resumingFrom)===Boolean(this.resumingFrom)&&!r.options.layoutScroll&&r.target&&1!==this.animationProgress?this.createRelativeTarget(r,this.target,r.target):this.relativeParent=this.relativeTarget=void 0),i.value&&Tr.calculatedTargetDeltas++)}getClosestProjectingParent(){if(this.parent&&!Is(this.parent.latestValues)&&!Ns(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(t,e,n){this.relativeParent=t,this.linkedParentVersion=t.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Fo(this.relativeTargetOrigin,e,n),Yo(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const t=this.getLead(),e=Boolean(this.resumingFrom)||this!==t;let n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),e&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===a.timestamp&&(n=!1),n)return;const{layout:s,layoutId:o}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!s&&!o)return;Yo(this.layoutCorrected,this.layout.layoutBox);const r=this.treeScale.x,l=this.treeScale.y;qs(this.layoutCorrected,this.treeScale,this.path,e),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:u}=t;u?(this.projectionDelta&&this.prevProjectionDelta?(Xo(this.prevProjectionDelta.x,this.projectionDelta.x),Xo(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),Co(this.projectionDelta,this.layoutCorrected,u,this.latestValues),this.treeScale.x===r&&this.treeScale.y===l&&tr(this.projectionDelta.x,this.prevProjectionDelta.x)&&tr(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",u)),i.value&&Tr.calculatedProjections++):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){if(this.options.visualElement?.scheduleRender(),t){const t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(t,e=!1){const n=this.snapshot,i=n?n.latestValues:{},s={...this.latestValues},o={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;const r={x:{min:0,max:0},y:{min:0,max:0}},a=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),u=!l||l.members.length<=1,c=Boolean(a&&!u&&!0===this.options.crossfade&&!this.path.some($r));let h;this.animationProgress=0,this.mixTargetDelta=e=>{const n=e/1e3;var l,d,p,m;Ur(o.x,t.x,n),Ur(o.y,t.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Fo(r,this.layout.layoutBox,this.relativeParent.layout.layoutBox),l=this.relativeTarget,d=this.relativeTargetOrigin,p=r,m=n,Nr(l.x,d.x,p.x,m),Nr(l.y,d.y,p.y,m),h&&Zo(this.relativeTarget,h)&&(this.isProjectionDirty=!1),h||(h={x:{min:0,max:0},y:{min:0,max:0}}),Yo(h,this.relativeTarget)),a&&(this.animationValues=s,ar(s,i,this.latestValues,n,c,u)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(r(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=o.update(()=>{xr.hasAnimatedSinceResize=!0,d.layout++,this.motionValue||(this.motionValue=dn(0)),this.currentAnimation=fr(this.motionValue,[0,1e3],{...t,velocity:0,isSync:!0,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onStop:()=>{d.layout--},onComplete:()=>{d.layout--,t.onComplete&&t.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead();let{targetWithTransforms:e,target:n,layout:i,latestValues:s}=t;if(e&&n&&i){if(this!==t&&this.layout&&i&&Xr(this.options.animationType,this.layout.layoutBox,i.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=Ro(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const i=Ro(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+i}Yo(e,n),_s(e,s),Co(this.projectionDeltaWithTransform,this.layoutCorrected,e,s)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new vr);this.sharedNodes.get(t).add(e);const n=e.options.initialPromotionConfig;e.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){const{layoutId:t}=this.options;return t&&this.getStack()?.lead||this}getPrevLead(){const{layoutId:t}=this.options;return t?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:n}={}){const i=this.getStack();i&&i.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetSkewAndRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:n}=t;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(e=!0),!e)return;const i={};n.z&&Sr("z",t,i,this.animationValues);for(let e=0;e<wr.length;e++)Sr(`rotate${wr[e]}`,t,i,this.animationValues),Sr(`skew${wr[e]}`,t,i,this.animationValues);t.render();for(const e in i)t.setStaticValue(e,i[e]),this.animationValues&&(this.animationValues[e]=i[e]);t.scheduleRender()}applyProjectionStyles(t,e){if(!this.instance||this.isSVG)return;if(!this.isVisible)return void(t.visibility="hidden");const n=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,t.visibility="",t.opacity="",t.pointerEvents=mr(e?.pointerEvents)||"",void(t.transform=n?n(this.latestValues,""):"none");const i=this.getLead();if(!this.projectionDelta||!this.layout||!i.target)return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=mr(e?.pointerEvents)||""),void(this.hasProjected&&!Us(this.latestValues)&&(t.transform=n?n({},""):"none",this.hasProjected=!1));t.visibility="";const s=i.animationValues||i.latestValues;this.applyTransformsToTarget();let o=nr(this.projectionDeltaWithTransform,this.treeScale,s);n&&(o=n(s,o)),t.transform=o;const{x:r,y:a}=this.projectionDelta;t.transformOrigin=`${100*r.origin}% ${100*a.origin}% 0`,i.animationValues?t.opacity=i===this?s.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:s.opacityExit:t.opacity=i===this?void 0!==s.opacity?s.opacity:"":void 0!==s.opacityExit?s.opacityExit:0;for(const e in ao){if(void 0===s[e])continue;const{correct:n,applyTo:r,isCSSVariable:a}=ao[e],l="none"===o?s[e]:n(s[e],i);if(r){const e=r.length;for(let n=0;n<e;n++)t[r[n]]=l}else a?this.options.visualElement.renderState.vars[e]=l:t[e]=l}this.options.layoutId&&(t.pointerEvents=i===this?mr(e?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(t=>t.currentAnimation?.stop()),this.root.nodes.forEach(kr),this.root.sharedNodes.clear()}}}function Vr(t){t.updateLayout()}function Er(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=t.layout,{animationType:s}=t.options,o=e.source!==t.layout.source;"size"===s?er(t=>{const i=o?e.measuredBox[t]:e.layoutBox[t],s=Ro(i);i.min=n[t].min,i.max=i.min+s}):Xr(s,e.layoutBox,n)&&er(i=>{const s=o?e.measuredBox[i]:e.layoutBox[i],r=Ro(n[i]);s.max=s.min+r,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[i].max=t.relativeTarget[i].min+r)});const r={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};Co(r,n,e.layoutBox);const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};o?Co(a,t.applyTransform(i,!0),e.measuredBox):Co(a,n,e.layoutBox);const l=!qo(r);let u=!1;if(!t.resumeFrom){const i=t.getClosestProjectingParent();if(i&&!i.resumeFrom){const{snapshot:s,layout:o}=i;if(s&&o){const r={x:{min:0,max:0},y:{min:0,max:0}};Fo(r,e.layoutBox,s.layoutBox);const a={x:{min:0,max:0},y:{min:0,max:0}};Fo(a,n,o.layoutBox),Jo(r,a)||(u=!0),i.options.layoutRoot&&(t.relativeTarget=a,t.relativeTargetOrigin=r,t.relativeParent=i)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function Mr(t){i.value&&Tr.nodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=Boolean(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Dr(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Rr(t){t.clearSnapshot()}function kr(t){t.clearMeasurements()}function Br(t){t.isLayoutDirty=!1}function Cr(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function jr(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Lr(t){t.resolveTargetDelta()}function Or(t){t.calcProjection()}function Fr(t){t.resetSkewAndRotation()}function Ir(t){t.removeLeadSnapshot()}function Ur(t,e,n){t.translate=_(e.translate,0,n),t.scale=_(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Nr(t,e,n,i){t.min=_(e.min,n.min,i),t.max=_(e.max,n.max,i)}function $r(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const Wr={duration:.45,ease:[.4,0,.1,1]},Kr=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),zr=Kr("applewebkit/")&&!Kr("chrome/")?Math.round:e.noop;function Yr(t){t.min=zr(t.min),t.max=zr(t.max)}function Xr(t,e,n){return"position"===t||"preserve-aspect"===t&&!ko(Qo(e),Qo(n),.2)}function Gr(t){return t!==t.root&&t.scroll?.wasRoot}const qr=Ar({attachResizeListener:(t,e)=>pr(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Hr={current:void 0},Zr=Ar({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Hr.current){const t=new qr({});t.mount(window),t.setOptions({layoutScroll:!0}),Hr.current=t}return Hr.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)}),_r=t=>!t.isLayoutDirty&&t.willUpdate(!1);function Jr(){const t=new Set,e=new WeakMap,n=()=>t.forEach(_r);return{add:i=>{t.add(i),e.set(i,i.addEventListener("willUpdate",n))},remove:i=>{t.delete(i);const s=e.get(i);s&&(s(),e.delete(i)),n()},dirty:n}}function Qr(t){const e=Array.from(t.querySelectorAll("[data-layout], [data-layout-id]"));var n;return t instanceof Element&&((n=t).hasAttribute("data-layout")||n.hasAttribute("data-layout-id"))&&e.unshift(t),e}function ta(t){return t.getAttribute("data-layout-id")}let ea=!1;const na=new WeakMap;function ia(t){let e=0,n=t.parentElement;for(;n;)e++,n=n.parentElement;return e}function sa(t,e){let n=t.parentElement;for(;n;){const t=e.get(n);if(t)return t;n=n.parentElement}}function oa(t,e,n,i){const s=na.get(t);if(s){const t=s.options.visualElement,e=i?{duration:i.duration,ease:i.ease}:{duration:.3,ease:"easeOut"};return s.setOptions({...s.options,animate:!0,transition:e,...n}),{node:s,visualElement:t}}const o={},r=new ho({visualState:{latestValues:o,renderState:{transformOrigin:{},transform:{},style:{},vars:{}}},presenceContext:null,props:{}}),a=new Zr(o,e),l=i?{duration:i.duration,ease:i.ease}:{duration:.3,ease:"easeOut"};return a.setOptions({visualElement:r,layout:!0,animate:!0,transition:l,...n}),a.mount(t),r.projection=a,na.set(t,a),{node:a,visualElement:r}}function ra(t,e,n){ea||(ea=!0,lo({borderRadius:{...oo,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:oo,borderTopRightRadius:oo,borderBottomLeftRadius:oo,borderBottomRightRadius:oo,boxShadow:ro}));const i=e?.nodes??new Map,s=e?.visualElements??new Map,o=e?.group??Jr(),r=n?.defaultTransition,a=n?.sharedTransitions,l=[...t].sort((t,e)=>ia(t)-ia(e));let u=e?.root;for(const t of l){if(i.has(t))continue;const e=sa(t,i),n=ta(t),l={layoutId:n??void 0,animationType:aa(t.getAttribute("data-layout"))},c=n&&a?.get(n)?a.get(n):r,{node:h,visualElement:d}=oa(t,e,l,c);i.set(t,h),s.set(t,d),o.add(h),u||(u=h.root)}return{nodes:i,visualElements:s,group:o,root:u}}function aa(t){return"position"===t?"position":"size"===t?"size":"preserve-aspect"===t?"preserve-aspect":"both"}function la(t){for(const[e,n]of t.nodes.entries())t.group.remove(n),n.unmount(),na.get(e)===n&&na.delete(e);t.nodes.clear(),t.visualElements.clear()}class ua{constructor(t,n,i){this.sharedTransitions=new Map,this.notifyReady=e.noop,this.executed=!1,this.scope=t,this.updateDom=n,this.defaultOptions=i,this.readyPromise=new Promise(t=>{this.notifyReady=t}),queueMicrotask(()=>this.execute())}enter(t,e){return this.enterKeyframes=t,this.enterOptions=e,this}exit(t,e){return this.exitKeyframes=t,this.exitOptions=e,this}shared(t,e){return"string"==typeof t&&this.sharedTransitions.set(t,e),this}then(t,e){return this.readyPromise.then(t,e)}async execute(){if(this.executed)return;this.executed=!0;const t=[];let e;try{const n=Qr(this.scope);if(n.length>0){e=ra(n,void 0,this.getBuildOptions()),e.root.startUpdate();for(const t of e.nodes.values())t.isLayoutDirty=!1,t.willUpdate()}const i=function(t){const e=Qr(t),n=new Map;for(const t of e)n.set(t,{element:t,parentElement:t.parentElement,nextSibling:t.nextSibling,layoutId:ta(t)});return n}(this.scope);this.updateDom();const s=function(t,e){const n=new Set(Qr(e)),i=new Set(t.keys()),s=[],o=[],r=[],a=new Map,l=new Map;for(const e of i)if(!n.has(e)){const n=t.get(e);o.push({element:e,parentElement:n.parentElement,nextSibling:n.nextSibling}),n.layoutId&&l.set(n.layoutId,e)}for(const t of n)if(i.has(t))r.push(t);else{s.push(t);const e=ta(t);e&&a.set(e,t)}return{entering:s,exiting:o,persisting:r,sharedEntering:a,sharedExiting:l}}(i,this.scope),r=s.exiting.filter(({element:t})=>{const e=t.getAttribute("data-layout-id");return!e||!s.sharedEntering.has(e)});this.reattachExitingElements(r,e),s.entering.length>0&&(e=ra(s.entering,e,this.getBuildOptions())),!e&&s.persisting.length>0&&(e=ra(s.persisting,void 0,this.getBuildOptions()));const a=new Set;for(const[t]of s.sharedEntering){const n=s.sharedExiting.get(t);if(n){a.add(n);const t=e?.nodes.get(n);if(t){const e=t.getStack();e&&e.remove(t)}}}if(e){e.root.didUpdate(),await new Promise(t=>o.postRender(()=>t()));for(const[n,i]of e.nodes.entries())a.has(n)||i.currentAnimation&&t.push(i.currentAnimation);if(this.enterKeyframes){const n=this.animateEntering(s,e);t.push(...n)}if(this.exitKeyframes){const n=this.animateExiting(s,e);t.push(...n)}}const l=new Ye(t);l.finished.then(()=>{this.cleanupExitingElements(r),e&&la(e)}),this.notifyReady(l)}catch(t){throw e&&la(e),t}}getBuildOptions(){return{defaultTransition:this.defaultOptions||{duration:.3,ease:"easeOut"},sharedTransitions:this.sharedTransitions.size>0?this.sharedTransitions:void 0}}reattachExitingElements(t,e){for(const{element:n,parentElement:i,nextSibling:s}of t){if(!i.isConnected)continue;const t=e?.nodes.get(n),o=t?.snapshot;if(!o)continue;const{layoutBox:r}=o;s&&s.parentNode===i?i.insertBefore(n,s):i.appendChild(n);const a=n;a.style.position="absolute",a.style.top=`${r.y.min}px`,a.style.left=`${r.x.min}px`,a.style.width=r.x.max-r.x.min+"px",a.style.height=r.y.max-r.y.min+"px",a.style.margin="0",a.style.pointerEvents="none"}}cleanupExitingElements(t){for(const{element:e}of t)e.parentElement&&e.parentElement.removeChild(e)}animateEntering(t,e){const n=new Set(t.entering),i=t.entering.filter(t=>function(t,e){let n=t.parentElement;for(;n;){if(e.has(n))return!1;n=n.parentElement}return!0}(t,n)),s=[];for(const t of i){const n=e.visualElements.get(t);if(!n)continue;const i={...this.enterKeyframes};if(void 0!==i.opacity){1===(Array.isArray(i.opacity)?i.opacity[i.opacity.length-1]:i.opacity)&&(t.style.opacity="0")}const o=Mn(n,i,{transitionOverride:this.enterOptions||this.defaultOptions||{}});s.push(...o)}return s}animateExiting(t,e){const n=new Set(t.exiting.map(t=>t.element)),i=t.exiting.filter(t=>function(t,e){let n=t.parentElement;for(;n;){if(e.has(n))return!1;n=n.parentElement}return!0}(t.element,n)),s=[];for(const{element:t}of i){const n=e.visualElements.get(t);if(!n)continue;const i=this.exitOptions||this.defaultOptions||{},o=Mn(n,this.exitKeyframes,{transitionOverride:i});s.push(...o)}return s}}const ca=o,ha=n.reduce((t,e)=>(t[e]=t=>r(t),t),{});t.AsyncMotionValueAnimation=ze,t.DOMKeyframesResolver=Xn,t.DOMVisualElement=js,t.DocumentProjectionNode=qr,t.Feature=class{constructor(t){this.isMounted=!1,this.node=t}update(){}},t.FlatTree=gr,t.GroupAnimation=Ye,t.GroupAnimationWithThen=class extends Ye{then(t,e){return this.finished.finally(t).then(()=>{})}},t.HTMLProjectionNode=Zr,t.HTMLVisualElement=ho,t.JSAnimation=Zt,t.KeyframeResolver=be,t.LayoutAnimationBuilder=ua,t.MotionValue=hn,t.NativeAnimation=Le,t.NativeAnimationExtended=Ie,t.NativeAnimationWrapper=Ge,t.NodeStack=vr,t.ObjectVisualElement=class extends Cs{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,e){if(function(t,e){return t in e}(e,t)){const n=t[e];if("string"==typeof n||"number"==typeof n)return n}}getBaseTargetFromProps(){}removeValueFromRenderState(t,e){delete e.output[t]}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}build(t,e){Object.assign(t.output,e)}renderInstance(t,{output:e}){Object.assign(t,e)}sortInstanceNodePosition(){return 0}},t.SVGVisualElement=class extends js{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=vs}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(ce.has(e)){const t=Kn(e);return t&&t.default||0}return e=vo.has(e)?e:Sn(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return wo(t,e,n)}build(t,e,n){go(t,e,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,e,n,i){To(t,e,0,i)}mount(t){this.isSVGTag=xo(t.tagName),super.mount(t)}},t.ViewTransitionBuilder=ms,t.VisualElement=Cs,t.acceleratedValues=Hn,t.activeAnimations=d,t.addAttrValue=ei,t.addDomEvent=pr,t.addScaleCorrector=lo,t.addStyleValue=ai,t.addValueToWillChange=bn,t.alpha=T,t.analyseComplexValue=K,t.animateMotionValue=ln,t.animateSingleValue=fr,t.animateTarget=Mn,t.animateValue=function(t){return new Zt(t)},t.animateVariant=Dn,t.animateView=function(t,e={}){return new ms(t,e)},t.animateVisualElement=Rn,t.animationMapKey=(t,e="")=>`${t}:${e}`,t.applyAxisDelta=zs,t.applyBoxDelta=Ys,t.applyGeneratorOptions=je,t.applyPointDelta=Ks,t.applyPxDefaults=function(t,e){for(let n=0;n<t.length;n++)"number"==typeof t[n]&&Gn.has(e)&&(t[n]=t[n]+"px")},t.applyTreeDeltas=qs,t.aspectRatio=Qo,t.attachSpring=Gi,t.attrEffect=ni,t.axisDeltaEquals=tr,t.axisEquals=Ho,t.axisEqualsRounded=_o,t.boxEquals=Zo,t.boxEqualsRounded=Jo,t.buildHTMLStyles=no,t.buildProjectionTransform=nr,t.buildSVGAttrs=go,t.buildSVGPath=fo,t.buildTransform=eo,t.calcAxisDelta=Bo,t.calcBoxDelta=Co,t.calcChildStagger=an,t.calcGeneratorDuration=pt,t.calcLength=Ro,t.calcRelativeAxis=jo,t.calcRelativeAxisPosition=Oo,t.calcRelativeBox=Lo,t.calcRelativePosition=Fo,t.camelCaseAttributes=vo,t.camelToDash=Sn,t.cancelFrame=r,t.cancelMicrotask=di,t.cancelSync=ha,t.checkVariantsDidChange=Eo,t.cleanDirtyNodes=Dr,t.collectMotionValues=cn,t.color=I,t.compareByDepth=yr,t.complex=G,t.containsCSSVariable=v,t.convertBoundingBoxToBox=Ls,t.convertBoxToBoundingBox=function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}},t.convertOffsetToTimes=$t,t.copyAxisDeltaInto=Xo,t.copyAxisInto=zo,t.copyBoxInto=Yo,t.correctBorderRadius=oo,t.correctBoxShadow=ro,t.createAnimationState=function(t){let e=function(t){return e=>Promise.all(e.map(({animation:e,options:n})=>Rn(t,e,n)))}(t),n=Do(),i=!0;const s=e=>(n,i)=>{const s=fn(t,i,"exit"===e?t.presenceContext?.custom:void 0);if(s){const{transition:t,transitionEnd:e,...i}=s;n={...n,...i,...e}}return n};function o(o){const{props:r}=t,a=So(t.parent)||{},l=[],u=new Set;let c={},h=1/0;for(let e=0;e<Vo;e++){const d=Ao[e],p=n[d],m=void 0!==r[d]?r[d]:a[d],f=As(m),y=d===o?p.isActive:null;!1===y&&(h=e);let g=m===a[d]&&m!==r[d]&&f;if(g&&i&&t.manuallyAnimateOnMount&&(g=!1),p.protectedKeys={...c},!p.isActive&&null===y||!m&&!p.prevProp||Ps(m)||"boolean"==typeof m)continue;const v=Eo(p.prevProp,m);let x=v||d===o&&p.isActive&&!g&&f||e>h&&f,T=!1;const w=Array.isArray(m)?m:[m];let b=w.reduce(s(d),{});!1===y&&(b={});const{prevResolvedValues:S={}}=p,P={...S,...b},A=e=>{x=!0,u.has(e)&&(T=!0,u.delete(e)),p.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)};for(const t in P){const e=b[t],n=S[t];if(c.hasOwnProperty(t))continue;let i=!1;i=yn(e)&&yn(n)?!Po(e,n):e!==n,i?null!=e?A(t):u.add(t):void 0!==e&&u.has(t)?A(t):p.protectedKeys[t]=!0}p.prevProp=m,p.prevResolvedValues=b,p.isActive&&(c={...c,...b}),i&&t.blockInitialAnimation&&(x=!1);const V=g&&v;x&&(!V||T)&&l.push(...w.map(e=>{const n={type:d};if("string"==typeof e&&i&&!V&&t.manuallyAnimateOnMount&&t.parent){const{parent:i}=t,s=fn(i,e);if(i.enteringChildren&&s){const{delayChildren:e}=s.transition||{};n.delay=an(i.enteringChildren,t,e)}}return{animation:e,options:n}}))}if(u.size){const e={};if("boolean"!=typeof r.initial){const n=fn(t,Array.isArray(r.initial)?r.initial[0]:r.initial);n&&n.transition&&(e.transition=n.transition)}u.forEach(n=>{const i=t.getBaseTarget(n),s=t.getValue(n);s&&(s.liveStyle=!0),e[n]=i??null}),l.push({animation:e})}let d=Boolean(l.length);return!i||!1!==r.initial&&r.initial!==r.animate||t.manuallyAnimateOnMount||(d=!1),i=!1,d?e(l):Promise.resolve()}return{animateChanges:o,setActive:function(e,i){if(n[e].isActive===i)return Promise.resolve();t.variantChildren?.forEach(t=>t.animationState?.setActive(e,i)),n[e].isActive=i;const s=o(e);for(const t in n)n[t].protectedKeys={};return s},setAnimateFunction:function(n){e=n(t)},getState:()=>n,reset:()=>{n=Do()}}},t.createAxis=gs,t.createAxisDelta=fs,t.createBox=vs,t.createDelta=ys,t.createGeneratorEasing=mt,t.createProjectionNode=Ar,t.createRenderBatcher=s,t.cubicBezierAsString=De,t.defaultEasing=Wt,t.defaultOffset=Nt,t.defaultTransformValue=oe,t.defaultValueTypes=Wn,t.degrees=k,t.delay=dr,t.delayInSeconds=function(t,n){return dr(t,e.secondsToMilliseconds(n))},t.dimensionValueTypes=Bn,t.eachAxis=er,t.fillOffset=Ut,t.fillWildcards=_t,t.findDimensionValueType=Cn,t.findValueType=_i,t.flushKeyframeResolvers=we,t.frame=o,t.frameData=a,t.frameSteps=l,t.generateLinearEasing=ht,t.getAnimatableNone=zn,t.getAnimationMap=function(t){const e=qe.get(t)||new Map;return qe.set(t,e),e},t.getComputedStyle=function(t,e){const n=window.getComputedStyle(t);return Se(e)?n.getPropertyValue(e):n[e]},t.getDefaultTransition=nn,t.getDefaultValueType=Kn,t.getFeatureDefinitions=function(){return Bs},t.getFinalKeyframe=rn,t.getMixer=ot,t.getOptimisedAppearId=Vn,t.getOriginIndex=zi,t.getValueAsType=Jn,t.getValueTransition=Je,t.getVariableValue=_e,t.getVariantContext=So,t.getViewAnimationLayerInfo=ss,t.getViewAnimations=rs,t.globalProjectionState=xr,t.has2DTranslate=Ns,t.hasReducedMotionListener=Ts,t.hasScale=Is,t.hasTransform=Us,t.hex=D,t.hover=function(t,e,n={}){const[i,s,o]=fi(t,n),r=t=>{if(!yi(t))return;const{target:n}=t,i=e(n,t);if("function"!=typeof i||!n)return;const o=t=>{yi(t)&&(i(t),n.removeEventListener("pointerleave",o))};n.addEventListener("pointerleave",o,s)};return i.forEach(t=>{t.addEventListener("pointerenter",r,s)}),o},t.hsla=F,t.hslaToRgba=H,t.inertia=Ft,t.initPrefersReducedMotion=bs,t.interpolate=It,t.invisibleValues=nt,t.isAnimationControls=Ps,t.isCSSVariableName=m,t.isCSSVariableToken=y,t.isControllingVariants=Ms,t.isDeltaZero=qo,t.isDragActive=mi,t.isDragging=pi,t.isElementKeyboardAccessible=Ti,t.isForcedMotionValue=uo,t.isGenerator=Ce,t.isHTMLElement=si,t.isKeyframesTarget=yn,t.isMotionValue=Tn,t.isNear=ko,t.isNodeOrChild=gi,t.isPrimaryPointer=vi,t.isSVGElement=Ai,t.isSVGSVGElement=Ki,t.isSVGTag=xo,t.isTransitionDefined=sn,t.isVariantLabel=As,t.isVariantNode=Ds,t.isWaapiSupportedEasing=function t(n){return Boolean("function"==typeof n&&Me()||!n||"string"==typeof n&&(n in Re||Me())||e.isBezierDefinition(n)||Array.isArray(n)&&n.every(t))},t.isWillChangeMotionValue=wn,t.keyframes=Kt,t.makeAnimationInstant=Ne,t.mapEasingToNativeEasing=ke,t.mapValue=function(t,e,n,i){const s=Yi(e,n,i);return Xi(()=>s(t.get()))},t.maxGeneratorDuration=dt,t.measurePageBox=function(t,e,n){const i=Js(t,n),{scroll:s}=e;return s&&(Hs(i.x,s.offset.x),Hs(i.y,s.offset.y)),i},t.measureViewportBox=Js,t.microtask=hi,t.mix=ut,t.mixArray=rt,t.mixColor=et,t.mixComplex=lt,t.mixImmediate=Z,t.mixLinearColor=J,t.mixNumber=_,t.mixObject=at,t.mixValues=ar,t.mixVisibility=it,t.motionValue=dn,t.nodeGroup=Jr,t.number=x,t.numberValueTypes=$n,t.observeTimeline=function(t,e){let n;const i=()=>{const{currentTime:i}=e,s=(null===i?0:i.value)/100;n!==s&&t(s),n=s};return o.preUpdate(i,!0),()=>r(i)},t.optimizedAppearDataAttribute=An,t.optimizedAppearDataId=Pn,t.parseCSSVariable=Ze,t.parseValueFromTransform=re,t.percent=B,t.pixelsToPercent=so,t.positionalKeys=un,t.prefersReducedMotion=xs,t.press=function(t,e,n={}){const[i,s,o]=fi(t,n),r=t=>{const i=t.currentTarget;if(!Pi(t))return;wi.add(i);const o=e(i,t),r=(t,e)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",l),wi.has(i)&&wi.delete(i),Pi(t)&&"function"==typeof o&&o(t,{success:e})},a=t=>{r(t,i===window||i===document||n.useGlobalTarget||gi(i,t.target))},l=t=>{r(t,!1)};window.addEventListener("pointerup",a,s),window.addEventListener("pointercancel",l,s)};return i.forEach(t=>{(n.useGlobalTarget?window:t).addEventListener("pointerdown",r,s),si(t)&&(t.addEventListener("focus",t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const i=bi(()=>{if(wi.has(n))return;Si(n,"down");const t=bi(()=>{Si(n,"up")});n.addEventListener("keyup",t,e),n.addEventListener("blur",()=>Si(n,"cancel"),e)});n.addEventListener("keydown",i,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),e)})(t,s)),Ti(t)||t.hasAttribute("tabindex")||(t.tabIndex=0))}),o},t.progressPercentage=O,t.propEffect=ii,t.propagateDirtyNodes=Mr,t.px=C,t.readTransformValue=ae,t.recordStats=function(){if(i.value)throw $i(),new Error("Stats are already being measured");const t=i;return t.value={frameloop:{setup:[],rate:[],read:[],resolveKeyframes:[],preUpdate:[],update:[],preRender:[],render:[],postRender:[]},animations:{mainThread:[],waapi:[],layout:[]},layoutProjection:{nodes:[],calculatedTargetDeltas:[],calculatedProjections:[]}},t.addProjectionMetrics=e=>{const{layoutProjection:n}=t.value;n.nodes.push(e.nodes),n.calculatedTargetDeltas.push(e.calculatedTargetDeltas),n.calculatedProjections.push(e.calculatedProjections)},o.postRender(Fi,!0),Wi},t.removeAxisDelta=Uo,t.removeAxisTransforms=No,t.removeBoxTransforms=Ko,t.removePointDelta=Io,t.renderHTML=io,t.renderSVG=To,t.resize=function(t,e){return"function"==typeof t?Oi(t):Ci(t,e)},t.resolveElements=Zn,t.resolveMotionValue=mr,t.resolveVariant=fn,t.resolveVariantFromProps=mn,t.rgbUnit=E,t.rgba=M,t.rootProjectionNode=Hr,t.scale=w,t.scaleCorrectors=ao,t.scalePoint=Ws,t.scrapeHTMLMotionValuesFromProps=co,t.scrapeSVGMotionValuesFromProps=wo,t.setDragLock=function(t){return"x"===t||"y"===t?pi[t]?null:(pi[t]=!0,()=>{pi[t]=!1}):pi.x||pi.y?null:(pi.x=pi.y=!0,()=>{pi.x=pi.y=!1})},t.setFeatureDefinitions=function(t){Bs=t},t.setStyle=Pe,t.setTarget=xn,t.spring=Ot,t.springValue=function(t,e){const n=dn(Tn(t)?t.get():t);return Gi(n,t,e),n},t.stagger=function(t=.1,{startDelay:n=0,from:i=0,ease:s}={}){return(o,r)=>{const a="number"==typeof i?i:zi(i,r),l=Math.abs(a-o);let u=t*l;if(s){const n=r*t;u=e.easingDefinitionToFunction(s)(u/n)*n}return n+u}},t.startWaapiAnimation=Be,t.statsBuffer=i,t.styleEffect=li,t.supportedWaapiEasing=Re,t.supportsBrowserAnimation=Ke,t.supportsFlags=Ve,t.supportsLinearEasing=Me,t.supportsPartialKeyframes=qn,t.supportsScrollTimeline=Ae,t.svgEffect=ci,t.sync=ca,t.testValueType=kn,t.time=h,t.transform=Yi,t.transformAxis=Zs,t.transformBox=_s,t.transformBoxPoints=Os,t.transformPropOrder=ue,t.transformProps=ce,t.transformValue=Xi,t.transformValueTypes=Nn,t.translateAxis=Hs,t.unstable_animateLayout=function(t,e,n){const{scope:i,updateDom:s,defaultOptions:o}=function(t,e,n){if("function"==typeof t)return{scope:document,updateDom:t,defaultOptions:e};const i=Zn(t)[0]||document;return{scope:(Document,i),updateDom:e,defaultOptions:n}}(t,e,n);return new ua(i,s,o)},t.updateMotionValuesFromProps=Rs,t.variantPriorityOrder=Vs,t.variantProps=Es,t.vh=j,t.visualElementStore=Ss,t.vw=L});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "motion-dom",
3
- "version": "12.27.0-alpha.3",
3
+ "version": "12.27.0-alpha.5",
4
4
  "author": "Matt Perry",
5
5
  "license": "MIT",
6
6
  "repository": "https://github.com/motiondivision/motion",
@@ -36,5 +36,5 @@
36
36
  "maxSize": "1.8 kB"
37
37
  }
38
38
  ],
39
- "gitHead": "54a17ce8264d63b63336d320a2437081b351095a"
39
+ "gitHead": "a66fa95ab87b2305fa620af7e734b9d5f1cd609e"
40
40
  }