@epic-web/workshop-app 5.1.1 → 5.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (165) hide show
  1. package/build/client/assets/{_-ZHCWB__B.js → _-CWSCXcBv.js} +2 -2
  2. package/build/client/assets/{_-ZHCWB__B.js.map → _-CWSCXcBv.js.map} +1 -1
  3. package/build/client/assets/{_exerciseNumber-BFTlBdr4.js → _exerciseNumber-D6KsriIk.js} +2 -2
  4. package/build/client/assets/_exerciseNumber-D6KsriIk.js.map +1 -0
  5. package/build/client/assets/{_exerciseNumber_._stepNumber-_687iGFh.js → _exerciseNumber_._stepNumber-BA2Xhzqs.js} +2 -2
  6. package/build/client/assets/_exerciseNumber_._stepNumber-BA2Xhzqs.js.map +1 -0
  7. package/build/client/assets/{_exerciseNumber_.finished-BEfn-nJi.js → _exerciseNumber_.finished-DEzaS_Ji.js} +2 -2
  8. package/build/client/assets/_exerciseNumber_.finished-DEzaS_Ji.js.map +1 -0
  9. package/build/client/assets/{_layout-Cfbi6StB.js → _layout-88n0To1b.js} +2 -2
  10. package/build/client/assets/{_layout-Cfbi6StB.js.map → _layout-88n0To1b.js.map} +1 -1
  11. package/build/client/assets/{_layout-BriOqd2R.js → _layout-C5yGKUmm.js} +2 -2
  12. package/build/client/assets/_layout-C5yGKUmm.js.map +1 -0
  13. package/build/client/assets/{_layout-frPHZWgR.js → _layout-T2hZtl0D.js} +2 -2
  14. package/build/client/assets/_layout-T2hZtl0D.js.map +1 -0
  15. package/build/client/assets/{_layout-BLJr2x2F.js → _layout-gyrNluke.js} +2 -2
  16. package/build/client/assets/_layout-gyrNluke.js.map +1 -0
  17. package/build/client/assets/{accordion-DuE9VejZ.js → accordion-DC885Li1.js} +2 -2
  18. package/build/client/assets/{accordion-DuE9VejZ.js.map → accordion-DC885Li1.js.map} +1 -1
  19. package/build/client/assets/{account-DDuV9rZX.js → account-CPFwPYf1.js} +2 -2
  20. package/build/client/assets/account-CPFwPYf1.js.map +1 -0
  21. package/build/client/assets/app-CM8yuYni.js +2 -0
  22. package/build/client/assets/app-CM8yuYni.js.map +1 -0
  23. package/build/client/assets/{button-CMkJ8p0a.js → button-DQ001ob0.js} +2 -2
  24. package/build/client/assets/{button-CMkJ8p0a.js.map → button-DQ001ob0.js.map} +1 -1
  25. package/build/client/assets/components-9EGYHTc_.js +158 -0
  26. package/build/client/assets/components-9EGYHTc_.js.map +1 -0
  27. package/build/client/assets/{diff-B6thd_Sf.js → diff-assn_bSK.js} +2 -2
  28. package/build/client/assets/{diff-B6thd_Sf.js.map → diff-assn_bSK.js.map} +1 -1
  29. package/build/client/assets/diff-jlCv3hv0.js +2 -0
  30. package/build/client/assets/diff-jlCv3hv0.js.map +1 -0
  31. package/build/client/assets/{discord-C9bVfiZ6.js → discord-CHsbqaqM.js} +2 -2
  32. package/build/client/assets/discord-CHsbqaqM.js.map +1 -0
  33. package/build/client/assets/discord-DoeazikD.js +2 -0
  34. package/build/client/assets/discord-DoeazikD.js.map +1 -0
  35. package/build/client/assets/entry.client-BTYTUpFV.js +44 -0
  36. package/build/client/assets/entry.client-BTYTUpFV.js.map +1 -0
  37. package/build/client/assets/epic-video-GDpD7_Qt.js +3053 -0
  38. package/build/client/assets/epic-video-GDpD7_Qt.js.map +1 -0
  39. package/build/client/assets/{error-boundary-BcGxKpte.js → error-boundary-1-dmC941.js} +2 -2
  40. package/build/client/assets/{error-boundary-BcGxKpte.js.map → error-boundary-1-dmC941.js.map} +1 -1
  41. package/build/client/assets/{finished-C2dgX1d-.js → finished-DVV0zwmP.js} +2 -2
  42. package/build/client/assets/finished-DVV0zwmP.js.map +1 -0
  43. package/build/client/assets/{index-DBrRQJxF.js → index-BCxBKsqT.js} +2 -2
  44. package/build/client/assets/{index-DBrRQJxF.js.map → index-BCxBKsqT.js.map} +1 -1
  45. package/build/client/assets/index-BFGhCX_U.js +38 -0
  46. package/build/client/assets/index-BFGhCX_U.js.map +1 -0
  47. package/build/client/assets/index-BuA_RWlU.js +2 -0
  48. package/build/client/assets/index-BuA_RWlU.js.map +1 -0
  49. package/build/client/assets/index-BuoaxPEj.js +42 -0
  50. package/build/client/assets/index-BuoaxPEj.js.map +1 -0
  51. package/build/client/assets/index-CmmC-_8P.js +2 -0
  52. package/build/client/assets/index-CmmC-_8P.js.map +1 -0
  53. package/build/client/assets/{index-YtpQLUzj.js → index-DRH72MzK.js} +2 -2
  54. package/build/client/assets/{index-YtpQLUzj.js.map → index-DRH72MzK.js.map} +1 -1
  55. package/build/client/assets/{index-CuV1bRbu.js → index-KgMLc41c.js} +2 -2
  56. package/build/client/assets/index-KgMLc41c.js.map +1 -0
  57. package/build/client/assets/index-_J-F_Dnc.js +36 -0
  58. package/build/client/assets/index-_J-F_Dnc.js.map +1 -0
  59. package/build/client/assets/{loading-Br41_Pbf.js → loading-Dk0n07O3.js} +2 -2
  60. package/build/client/assets/{loading-Br41_Pbf.js.map → loading-Dk0n07O3.js.map} +1 -1
  61. package/build/client/assets/{login-kjV7hrVt.js → login-pZYDEC_l.js} +2 -2
  62. package/build/client/assets/login-pZYDEC_l.js.map +1 -0
  63. package/build/client/assets/{manifest-b22910a7.js → manifest-c9f53a94.js} +1 -1
  64. package/build/client/assets/mdx-hW1uYjc1.js +2 -0
  65. package/build/client/assets/mdx-hW1uYjc1.js.map +1 -0
  66. package/build/client/assets/misc-BJtHv_Jh.js +2 -0
  67. package/build/client/assets/misc-BJtHv_Jh.js.map +1 -0
  68. package/build/client/assets/{nav-chevrons-DYiI8EMU.js → nav-chevrons-CgbSMLeb.js} +2 -2
  69. package/build/client/assets/{nav-chevrons-DYiI8EMU.js.map → nav-chevrons-CgbSMLeb.js.map} +1 -1
  70. package/build/client/assets/{onboarding-B4Z_yevk.js → onboarding-DCuSqnkZ.js} +2 -2
  71. package/build/client/assets/onboarding-DCuSqnkZ.js.map +1 -0
  72. package/build/client/assets/{pe-CvPIToj6.js → pe-ChIwTk8v.js} +2 -2
  73. package/build/client/assets/pe-ChIwTk8v.js.map +1 -0
  74. package/build/client/assets/presence-CdyMdOKk.js +28 -0
  75. package/build/client/assets/presence-CdyMdOKk.js.map +1 -0
  76. package/build/client/assets/{preview-DZcdG4kw.js → preview-CW_12I0i.js} +2 -2
  77. package/build/client/assets/preview-CW_12I0i.js.map +1 -0
  78. package/build/client/assets/{product-mjsTrqXs.js → product-C1ynnrN_.js} +2 -2
  79. package/build/client/assets/{product-mjsTrqXs.js.map → product-C1ynnrN_.js.map} +1 -1
  80. package/build/client/assets/progress-DAB3nDa2.js +2 -0
  81. package/build/client/assets/progress-DAB3nDa2.js.map +1 -0
  82. package/build/client/assets/{progress-bar-F8_2mvYp.js → progress-bar-Cj5R4Zk7.js} +2 -2
  83. package/build/client/assets/{progress-bar-F8_2mvYp.js.map → progress-bar-Cj5R4Zk7.js.map} +1 -1
  84. package/build/client/assets/{request-info-DGnmXtfj.js → request-info-DCIQLE6H.js} +2 -2
  85. package/build/client/assets/{request-info-DGnmXtfj.js.map → request-info-DCIQLE6H.js.map} +1 -1
  86. package/build/client/assets/{revalidation-ws-DcvYvzyj.js → revalidation-ws-DU-PzW-_.js} +2 -2
  87. package/build/client/assets/{revalidation-ws-DcvYvzyj.js.map → revalidation-ws-DU-PzW-_.js.map} +1 -1
  88. package/build/client/assets/{root-Cl86OUog.js → root-DojjHZlY.js} +4 -4
  89. package/build/client/assets/root-DojjHZlY.js.map +1 -0
  90. package/build/client/assets/set-playground-S_rIwJAa.js +2 -0
  91. package/build/client/assets/set-playground-S_rIwJAa.js.map +1 -0
  92. package/build/client/assets/{support-B0E_F4Zh.js → support-BNS-kEhc.js} +2 -2
  93. package/build/client/assets/{support-B0E_F4Zh.js.map → support-BNS-kEhc.js.map} +1 -1
  94. package/build/client/assets/tailwind-B5AAMtGC.css +1 -0
  95. package/build/client/assets/test-CtH75Laz.js +2 -0
  96. package/build/client/assets/test-CtH75Laz.js.map +1 -0
  97. package/build/client/assets/{tests-BeAEgPAw.js → tests-CTs57UUU.js} +2 -2
  98. package/build/client/assets/tests-CTs57UUU.js.map +1 -0
  99. package/build/client/assets/tooltip-BgynKV2c.js +2 -0
  100. package/build/client/assets/tooltip-BgynKV2c.js.map +1 -0
  101. package/build/client/assets/use-event-source-x59d4R2Z.js +2 -0
  102. package/build/client/assets/use-event-source-x59d4R2Z.js.map +1 -0
  103. package/build/client/assets/{user-Boua6jiU.js → user-BBryXlM_.js} +2 -2
  104. package/build/client/assets/{user-Boua6jiU.js.map → user-BBryXlM_.js.map} +1 -1
  105. package/build/client/assets/{workshop-config-Ce9sSc3I.js → workshop-config-DJY2cXU_.js} +2 -2
  106. package/build/client/assets/{workshop-config-Ce9sSc3I.js.map → workshop-config-DJY2cXU_.js.map} +1 -1
  107. package/build/server/index.js +253 -238
  108. package/build/server/index.js.map +1 -1
  109. package/dist/server/index.js +7 -14
  110. package/package.json +68 -73
  111. package/build/client/assets/_exerciseNumber-BFTlBdr4.js.map +0 -1
  112. package/build/client/assets/_exerciseNumber_._stepNumber-_687iGFh.js.map +0 -1
  113. package/build/client/assets/_exerciseNumber_.finished-BEfn-nJi.js.map +0 -1
  114. package/build/client/assets/_layout-BLJr2x2F.js.map +0 -1
  115. package/build/client/assets/_layout-BriOqd2R.js.map +0 -1
  116. package/build/client/assets/_layout-frPHZWgR.js.map +0 -1
  117. package/build/client/assets/account-DDuV9rZX.js.map +0 -1
  118. package/build/client/assets/app-wbMCZEiv.js +0 -2
  119. package/build/client/assets/app-wbMCZEiv.js.map +0 -1
  120. package/build/client/assets/components-DZ8XIeZ3.js +0 -166
  121. package/build/client/assets/components-DZ8XIeZ3.js.map +0 -1
  122. package/build/client/assets/diff-BEk79KPK.js +0 -2
  123. package/build/client/assets/diff-BEk79KPK.js.map +0 -1
  124. package/build/client/assets/discord-C9bVfiZ6.js.map +0 -1
  125. package/build/client/assets/discord-DYeU0QX6.js +0 -2
  126. package/build/client/assets/discord-DYeU0QX6.js.map +0 -1
  127. package/build/client/assets/entry.client-CW5CUf_W.js +0 -43
  128. package/build/client/assets/entry.client-CW5CUf_W.js.map +0 -1
  129. package/build/client/assets/epic-video-bs7WmhbC.js +0 -2988
  130. package/build/client/assets/epic-video-bs7WmhbC.js.map +0 -1
  131. package/build/client/assets/finished-C2dgX1d-.js.map +0 -1
  132. package/build/client/assets/index-BczhSZ3e.js +0 -2
  133. package/build/client/assets/index-BczhSZ3e.js.map +0 -1
  134. package/build/client/assets/index-BjNhezSK.js +0 -42
  135. package/build/client/assets/index-BjNhezSK.js.map +0 -1
  136. package/build/client/assets/index-BvihEwfB.js +0 -36
  137. package/build/client/assets/index-BvihEwfB.js.map +0 -1
  138. package/build/client/assets/index-C2yr7Uiu.js +0 -2
  139. package/build/client/assets/index-C2yr7Uiu.js.map +0 -1
  140. package/build/client/assets/index-CuV1bRbu.js.map +0 -1
  141. package/build/client/assets/index-DF_XBInP.js +0 -37
  142. package/build/client/assets/index-DF_XBInP.js.map +0 -1
  143. package/build/client/assets/login-kjV7hrVt.js.map +0 -1
  144. package/build/client/assets/mdx-CRxPouxB.js +0 -2
  145. package/build/client/assets/mdx-CRxPouxB.js.map +0 -1
  146. package/build/client/assets/misc-BE75ioh8.js +0 -2
  147. package/build/client/assets/misc-BE75ioh8.js.map +0 -1
  148. package/build/client/assets/onboarding-B4Z_yevk.js.map +0 -1
  149. package/build/client/assets/pe-CvPIToj6.js.map +0 -1
  150. package/build/client/assets/presence-Dd98AJ_5.js +0 -28
  151. package/build/client/assets/presence-Dd98AJ_5.js.map +0 -1
  152. package/build/client/assets/preview-DZcdG4kw.js.map +0 -1
  153. package/build/client/assets/progress-Co-59mG2.js +0 -2
  154. package/build/client/assets/progress-Co-59mG2.js.map +0 -1
  155. package/build/client/assets/root-Cl86OUog.js.map +0 -1
  156. package/build/client/assets/set-playground-pMKmtPtz.js +0 -2
  157. package/build/client/assets/set-playground-pMKmtPtz.js.map +0 -1
  158. package/build/client/assets/tailwind-B9pSujyx.css +0 -1
  159. package/build/client/assets/test-B6zIK2V6.js +0 -2
  160. package/build/client/assets/test-B6zIK2V6.js.map +0 -1
  161. package/build/client/assets/tests-BeAEgPAw.js.map +0 -1
  162. package/build/client/assets/tooltip-6-WS-Xux.js +0 -2
  163. package/build/client/assets/tooltip-6-WS-Xux.js.map +0 -1
  164. package/build/client/assets/use-event-source-CCGBLG92.js +0 -2
  165. package/build/client/assets/use-event-source-CCGBLG92.js.map +0 -1
@@ -1,2 +0,0 @@
1
- import{r as P,j as N,u as ms,c as Ni}from"./index-DF_XBInP.js";import{c as nn}from"./misc-BE75ioh8.js";import{u as Ui}from"./pe-CvPIToj6.js";import{e as Ki,d as $i,a as Wi}from"./components-DZ8XIeZ3.js";const ps=P.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),$t=P.createContext({}),Ve=P.createContext(null),we=typeof document<"u",Gi=we?P.useLayoutEffect:P.useEffect,gs=P.createContext({strict:!1}),Ce=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),_i="framerAppearId",ys="data-"+Ce(_i),Hi={skipAnimations:!1,useManualTiming:!1};class sn{constructor(){this.order=[],this.scheduled=new Set}add(e){if(!this.scheduled.has(e))return this.scheduled.add(e),this.order.push(e),!0}remove(e){const n=this.order.indexOf(e);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(e))}clear(){this.order.length=0,this.scheduled.clear()}}function zi(t){let e=new sn,n=new sn,s=0,i=!1,o=!1;const r=new WeakSet,a={schedule:(l,c=!1,u=!1)=>{const h=u&&i,f=h?e:n;return c&&r.add(l),f.add(l)&&h&&i&&(s=e.order.length),l},cancel:l=>{n.remove(l),r.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[e,n]=[n,e],n.clear(),s=e.order.length,s)for(let c=0;c<s;c++){const u=e.order[c];r.has(u)&&(a.schedule(u),t()),u(l)}i=!1,o&&(o=!1,a.process(l))}};return a}const Mt=["read","resolveKeyframes","update","preRender","render","postRender"],Yi=40;function vs(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=Mt.reduce((h,f)=>(h[f]=zi(()=>n=!0),h),{}),r=h=>{o[h].process(i)},a=()=>{const h=performance.now();n=!1,i.delta=s?1e3/60:Math.max(Math.min(h-i.timestamp,Yi),1),i.timestamp=h,i.isProcessing=!0,Mt.forEach(r),i.isProcessing=!1,n&&e&&(s=!1,t(a))},l=()=>{n=!0,s=!0,i.isProcessing||t(a)};return{schedule:Mt.reduce((h,f)=>{const d=o[f];return h[f]=(m,p=!1,y=!1)=>(n||l(),d.schedule(m,p,y)),h},{}),cancel:h=>Mt.forEach(f=>o[f].cancel(h)),state:i,steps:o}}const{schedule:De,cancel:fu}=vs(queueMicrotask,!1);function lt(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}const xs=P.createContext({});let rn=!1;function Xi(t,e,n,s,i){const{visualElement:o}=P.useContext($t),r=P.useContext(gs),a=P.useContext(Ve),l=P.useContext(ps).reducedMotion,c=P.useRef();s=s||r.renderer,!c.current&&s&&(c.current=s(t,{visualState:e,parent:o,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const u=c.current,h=P.useContext(xs);u&&!u.projection&&i&&(u.type==="html"||u.type==="svg")&&Zi(c.current,n,i,h),P.useInsertionEffect(()=>{u&&u.update(n,a)});const f=P.useRef(!!(n[ys]&&!window.HandoffComplete));return Gi(()=>{u&&(u.updateFeatures(),De.render(u.render),f.current&&u.animationState&&u.animationState.animateChanges())}),P.useEffect(()=>{u&&(!f.current&&u.animationState&&u.animationState.animateChanges(),f.current&&(f.current=!1,rn||(rn=!0,queueMicrotask(qi))))}),u}function qi(){window.HandoffComplete=!0}function Zi(t,e,n,s){const{layoutId:i,layout:o,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:c}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:Ts(t.parent)),t.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!r||a&&lt(a),visualElement:t,scheduleRender:()=>t.scheduleRender(),animationType:typeof o=="string"?o:"both",initialPromotionConfig:s,layoutScroll:l,layoutRoot:c})}function Ts(t){if(t)return t.options.allowProjection!==!1?t.projection:Ts(t.parent)}function Qi(t,e,n){return P.useCallback(s=>{s&&t.mount&&t.mount(s),e&&(s?e.mount(s):e.unmount()),n&&(typeof n=="function"?n(s):lt(n)&&(n.current=s))},[e])}function Pt(t){return typeof t=="string"||Array.isArray(t)}function Wt(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}const Me=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Re=["initial",...Me];function Gt(t){return Wt(t.animate)||Re.some(e=>Pt(t[e]))}function Ps(t){return!!(Gt(t)||t.variants)}function Ji(t,e){if(Gt(t)){const{initial:n,animate:s}=t;return{initial:n===!1||Pt(n)?n:void 0,animate:Pt(s)?s:void 0}}return t.inherit!==!1?e:{}}function tr(t){const{initial:e,animate:n}=Ji(t,P.useContext($t));return P.useMemo(()=>({initial:e,animate:n}),[on(e),on(n)])}function on(t){return Array.isArray(t)?t.join(" "):t}const an={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},ft={};for(const t in an)ft[t]={isEnabled:e=>an[t].some(n=>!!e[n])};function er(t){for(const e in t)ft[e]={...ft[e],...t[e]}}const bs=P.createContext({}),nr=Symbol.for("motionComponentSymbol"),E=t=>t;let ce=E;function sr({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:s,Component:i}){t&&er(t);function o(a,l){let c;const u={...P.useContext(ps),...a,layoutId:ir(a)},{isStatic:h}=u,f=tr(a),d=s(a,h);if(!h&&we){rr();const m=or(u);c=m.MeasureLayout,f.visualElement=Xi(i,d,u,e,m.ProjectionNode)}return N.jsxs($t.Provider,{value:f,children:[c&&f.visualElement?N.jsx(c,{visualElement:f.visualElement,...u}):null,n(i,a,Qi(d,f.visualElement,l),d,h,f.visualElement)]})}const r=P.forwardRef(o);return r[nr]=i,r}function ir({layoutId:t}){const e=P.useContext(bs).id;return e&&t!==void 0?e+"-"+t:t}function rr(t,e){P.useContext(gs).strict}function or(t){const{drag:e,layout:n}=ft;if(!e&&!n)return{};const s={...e,...n};return{MeasureLayout:e!=null&&e.isEnabled(t)||n!=null&&n.isEnabled(t)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}function ar(t){function e(s,i={}){return sr(t(s,i))}if(typeof Proxy>"u")return e;const n=new Map;return new Proxy(e,{get:(s,i)=>(n.has(i)||n.set(i,e(i)),n.get(i))})}const lr=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Le(t){return typeof t!="string"||t.includes("-")?!1:!!(lr.indexOf(t)>-1||/[A-Z]/u.test(t))}const Bt={};function ur(t){Object.assign(Bt,t)}const Vt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ot=new Set(Vt);function Ss(t,{layout:e,layoutId:n}){return ot.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Bt[t]||t==="opacity")}const L=t=>!!(t&&t.getVelocity),cr={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},hr=Vt.length;function fr(t,{enableHardwareAcceleration:e=!0,allowTransformNone:n=!0},s,i){let o="";for(let r=0;r<hr;r++){const a=Vt[r];if(t[a]!==void 0){const l=cr[a]||a;o+=`${l}(${t[a]}) `}}return e&&!t.z&&(o+="translateZ(0)"),o=o.trim(),i?o=i(t,s?"":o):n&&s&&(o="none"),o}const As=t=>e=>typeof e=="string"&&e.startsWith(t),Vs=As("--"),dr=As("var(--"),Ee=t=>dr(t)?mr.test(t.split("/*")[0].trim()):!1,mr=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,pr=(t,e)=>e&&typeof t=="number"?e.transform(t):t,Q=(t,e,n)=>n>e?e:n<t?t:n,mt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},yt={...mt,transform:t=>Q(0,1,t)},Rt={...mt,default:1},vt=t=>Math.round(t*1e5)/1e5,Fe=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,gr=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,yr=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function wt(t){return typeof t=="string"}const Ct=t=>({test:e=>wt(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Y=Ct("deg"),U=Ct("%"),T=Ct("px"),vr=Ct("vh"),xr=Ct("vw"),ln={...U,parse:t=>U.parse(t)/100,transform:t=>U.transform(t*100)},un={...mt,transform:Math.round},ws={borderWidth:T,borderTopWidth:T,borderRightWidth:T,borderBottomWidth:T,borderLeftWidth:T,borderRadius:T,radius:T,borderTopLeftRadius:T,borderTopRightRadius:T,borderBottomRightRadius:T,borderBottomLeftRadius:T,width:T,maxWidth:T,height:T,maxHeight:T,size:T,top:T,right:T,bottom:T,left:T,padding:T,paddingTop:T,paddingRight:T,paddingBottom:T,paddingLeft:T,margin:T,marginTop:T,marginRight:T,marginBottom:T,marginLeft:T,rotate:Y,rotateX:Y,rotateY:Y,rotateZ:Y,scale:Rt,scaleX:Rt,scaleY:Rt,scaleZ:Rt,skew:Y,skewX:Y,skewY:Y,distance:T,translateX:T,translateY:T,translateZ:T,x:T,y:T,z:T,perspective:T,transformPerspective:T,opacity:yt,originX:ln,originY:ln,originZ:T,zIndex:un,backgroundPositionX:T,backgroundPositionY:T,fillOpacity:yt,strokeOpacity:yt,numOctaves:un};function ke(t,e,n,s){const{style:i,vars:o,transform:r,transformOrigin:a}=t;let l=!1,c=!1,u=!0;for(const h in e){const f=e[h];if(Vs(h)){o[h]=f;continue}const d=ws[h],m=pr(f,d);if(ot.has(h)){if(l=!0,r[h]=m,!u)continue;f!==(d.default||0)&&(u=!1)}else h.startsWith("origin")?(c=!0,a[h]=m):i[h]=m}if(e.transform||(l||s?i.transform=fr(t.transform,n,u,s):i.transform&&(i.transform="none")),c){const{originX:h="50%",originY:f="50%",originZ:d=0}=a;i.transformOrigin=`${h} ${f} ${d}`}}const Be=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Cs(t,e,n){for(const s in e)!L(e[s])&&!Ss(s,n)&&(t[s]=e[s])}function Tr({transformTemplate:t},e,n){return P.useMemo(()=>{const s=Be();return ke(s,e,{enableHardwareAcceleration:!n},t),Object.assign({},s.vars,s.style)},[e])}function Pr(t,e,n){const s=t.style||{},i={};return Cs(i,s,t),Object.assign(i,Tr(t,e,n)),i}function br(t,e,n){const s={},i=Pr(t,e,n);return t.drag&&t.dragListener!==!1&&(s.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(s.tabIndex=0),s.style=i,s}const Sr=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function jt(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Sr.has(t)}let Ds=t=>!jt(t);function Ar(t){t&&(Ds=e=>e.startsWith("on")?!jt(e):t(e))}try{Ar(require("@emotion/is-prop-valid").default)}catch{}function Vr(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||(Ds(i)||n===!0&&jt(i)||!e&&!jt(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}function cn(t,e,n){return typeof t=="string"?t:T.transform(e+n*t)}function wr(t,e,n){const s=cn(e,t.x,t.width),i=cn(n,t.y,t.height);return`${s} ${i}`}const Cr={offset:"stroke-dashoffset",array:"stroke-dasharray"},Dr={offset:"strokeDashoffset",array:"strokeDasharray"};function Mr(t,e,n=1,s=0,i=!0){t.pathLength=1;const o=i?Cr:Dr;t[o.offset]=T.transform(-s);const r=T.transform(e),a=T.transform(n);t[o.array]=`${r} ${a}`}function je(t,{attrX:e,attrY:n,attrScale:s,originX:i,originY:o,pathLength:r,pathSpacing:a=1,pathOffset:l=0,...c},u,h,f){if(ke(t,c,u,f),h){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:d,style:m,dimensions:p}=t;d.transform&&(p&&(m.transform=d.transform),delete d.transform),p&&(i!==void 0||o!==void 0||m.transform)&&(m.transformOrigin=wr(p,i!==void 0?i:.5,o!==void 0?o:.5)),e!==void 0&&(d.x=e),n!==void 0&&(d.y=n),s!==void 0&&(d.scale=s),r!==void 0&&Mr(d,r,a,l,!1)}const Ms=()=>({...Be(),attrs:{}}),Oe=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Rr(t,e,n,s){const i=P.useMemo(()=>{const o=Ms();return je(o,e,{enableHardwareAcceleration:!1},Oe(s),t.transformTemplate),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};Cs(o,t.style,t),i.style={...o,...i.style}}return i}function Lr(t=!1){return(n,s,i,{latestValues:o},r)=>{const l=(Le(n)?Rr:br)(s,o,r,n),c=Vr(s,typeof n=="string",t),u=n!==P.Fragment?{...c,...l,ref:i}:{},{children:h}=s,f=P.useMemo(()=>L(h)?h.get():h,[h]);return P.createElement(n,{...u,children:f})}}function Rs(t,{style:e,vars:n},s,i){Object.assign(t.style,e,i&&i.getProjectionStyles(s));for(const o in n)t.style.setProperty(o,n[o])}const Ls=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Es(t,e,n,s){Rs(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(Ls.has(i)?i:Ce(i),e.attrs[i])}function Ie(t,e,n){var s;const{style:i}=t,o={};for(const r in i)(L(i[r])||e.style&&L(e.style[r])||Ss(r,t)||((s=n==null?void 0:n.getValue(r))===null||s===void 0?void 0:s.liveStyle)!==void 0)&&(o[r]=i[r]);return o}function Fs(t,e,n){const s=Ie(t,e,n);for(const i in t)if(L(t[i])||L(e[i])){const o=Vt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[o]=t[i]}return s}function hn(t){const e=[{},{}];return t==null||t.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function Ne(t,e,n,s){if(typeof e=="function"){const[i,o]=hn(s);e=e(n!==void 0?n:t.custom,i,o)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,o]=hn(s);e=e(n!==void 0?n:t.custom,i,o)}return e}function Er(t){const e=P.useRef(null);return e.current===null&&(e.current=t()),e.current}const he=t=>Array.isArray(t),Fr=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),kr=t=>he(t)?t[t.length-1]||0:t;function Et(t){const e=L(t)?t.get():t;return Fr(e)?e.toValue():e}function Br({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},s,i,o){const r={latestValues:jr(s,i,o,t),renderState:e()};return n&&(r.mount=a=>n(s,a,r)),r}const ks=t=>(e,n)=>{const s=P.useContext($t),i=P.useContext(Ve),o=()=>Br(t,e,s,i);return n?o():Er(o)};function jr(t,e,n,s){const i={},o=s(t,{});for(const f in o)i[f]=Et(o[f]);let{initial:r,animate:a}=t;const l=Gt(t),c=Ps(t);e&&c&&!l&&t.inherit!==!1&&(r===void 0&&(r=e.initial),a===void 0&&(a=e.animate));let u=n?n.initial===!1:!1;u=u||r===!1;const h=u?a:r;return h&&typeof h!="boolean"&&!Wt(h)&&(Array.isArray(h)?h:[h]).forEach(d=>{const m=Ne(t,d);if(!m)return;const{transitionEnd:p,transition:y,...v}=m;for(const x in v){let g=v[x];if(Array.isArray(g)){const b=u?g.length-1:0;g=g[b]}g!==null&&(i[x]=g)}for(const x in p)i[x]=p[x]}),i}const{schedule:V,cancel:H,state:D,steps:qt}=vs(typeof requestAnimationFrame<"u"?requestAnimationFrame:E,!0),Or={useVisualState:ks({scrapeMotionValuesFromProps:Fs,createRenderState:Ms,onMount:(t,e,{renderState:n,latestValues:s})=>{V.read(()=>{try{n.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),V.render(()=>{je(n,s,{enableHardwareAcceleration:!1},Oe(e.tagName),t.transformTemplate),Es(e,n)})}})},Ir={useVisualState:ks({scrapeMotionValuesFromProps:Ie,createRenderState:Be})};function Nr(t,{forwardMotionProps:e=!1},n,s){return{...Le(t)?Or:Ir,preloadedFeatures:n,useRender:Lr(e),createVisualElement:s,Component:t}}function $(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}const Bs=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function _t(t,e="page"){return{point:{x:t[`${e}X`],y:t[`${e}Y`]}}}const Ur=t=>e=>Bs(e)&&t(e,_t(e));function W(t,e,n,s){return $(t,e,Ur(n),s)}const Kr=(t,e)=>n=>e(t(n)),G=(...t)=>t.reduce(Kr);function js(t){let e=null;return()=>{const n=()=>{e=null};return e===null?(e=t,n):!1}}const fn=js("dragHorizontal"),dn=js("dragVertical");function Os(t){let e=!1;if(t==="y")e=dn();else if(t==="x")e=fn();else{const n=fn(),s=dn();n&&s?e=()=>{n(),s()}:(n&&n(),s&&s())}return e}function Is(){const t=Os(!0);return t?(t(),!1):!0}class tt{constructor(e){this.isMounted=!1,this.node=e}update(){}}function mn(t,e){const n=e?"pointerenter":"pointerleave",s=e?"onHoverStart":"onHoverEnd",i=(o,r)=>{if(o.pointerType==="touch"||Is())return;const a=t.getProps();t.animationState&&a.whileHover&&t.animationState.setActive("whileHover",e);const l=a[s];l&&V.postRender(()=>l(o,r))};return W(t.current,n,i,{passive:!t.getProps()[s]})}class $r extends tt{mount(){this.unmount=G(mn(this.node,!0),mn(this.node,!1))}unmount(){}}class Wr extends tt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=G($(this.node.current,"focus",()=>this.onFocus()),$(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Ns=(t,e)=>e?t===e?!0:Ns(t,e.parentElement):!1;function Zt(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,_t(n))}class Gr extends tt{constructor(){super(...arguments),this.removeStartListeners=E,this.removeEndListeners=E,this.removeAccessibleListeners=E,this.startPointerPress=(e,n)=>{if(this.isPressing)return;this.removeEndListeners();const s=this.node.getProps(),o=W(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:c,onTapCancel:u,globalTapTarget:h}=this.node.getProps(),f=!h&&!Ns(this.node.current,a.target)?u:c;f&&V.update(()=>f(a,l))},{passive:!(s.onTap||s.onPointerUp)}),r=W(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(s.onTapCancel||s.onPointerCancel)});this.removeEndListeners=G(o,r),this.startPress(e,n)},this.startAccessiblePress=()=>{const e=o=>{if(o.key!=="Enter"||this.isPressing)return;const r=a=>{a.key!=="Enter"||!this.checkPressEnd()||Zt("up",(l,c)=>{const{onTap:u}=this.node.getProps();u&&V.postRender(()=>u(l,c))})};this.removeEndListeners(),this.removeEndListeners=$(this.node.current,"keyup",r),Zt("down",(a,l)=>{this.startPress(a,l)})},n=$(this.node.current,"keydown",e),s=()=>{this.isPressing&&Zt("cancel",(o,r)=>this.cancelPress(o,r))},i=$(this.node.current,"blur",s);this.removeAccessibleListeners=G(n,i)}}startPress(e,n){this.isPressing=!0;const{onTapStart:s,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),s&&V.postRender(()=>s(e,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Is()}cancelPress(e,n){if(!this.checkPressEnd())return;const{onTapCancel:s}=this.node.getProps();s&&V.postRender(()=>s(e,n))}mount(){const e=this.node.getProps(),n=W(e.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),s=$(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=G(n,s)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const fe=new WeakMap,Qt=new WeakMap,_r=t=>{const e=fe.get(t.target);e&&e(t)},Hr=t=>{t.forEach(_r)};function zr({root:t,...e}){const n=t||document;Qt.has(n)||Qt.set(n,{});const s=Qt.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(Hr,{root:t,...e})),s[i]}function Yr(t,e,n){const s=zr(e);return fe.set(t,n),s.observe(t),()=>{fe.delete(t),s.unobserve(t)}}const Xr={some:0,all:1};class qr extends tt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:o}=e,r={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:Xr[i]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,o&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:h}=this.node.getProps(),f=c?u:h;f&&f(l)};return Yr(this.node.current,r,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(Zr(e,n))&&this.startObserver()}unmount(){}}function Zr({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const Qr={inView:{Feature:qr},tap:{Feature:Gr},focus:{Feature:Wr},hover:{Feature:$r}};function Us(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}function Ht(t,e,n){const s=t.getProps();return Ne(s,e,n!==void 0?n:s.custom,t)}const q=t=>t*1e3,_=t=>t/1e3,Jr={type:"spring",stiffness:500,damping:25,restSpeed:10},to=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),eo={type:"keyframes",duration:.8},no={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},so=(t,{keyframes:e})=>e.length>2?eo:ot.has(t)?t.startsWith("scale")?to(e[1]):Jr:no;function io({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}function Ue(t,e){return t[e]||t.default||t}const ro=t=>t!==null;function zt(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(ro),o=e&&n!=="loop"&&e%2===1?0:i.length-1;return!o||s===void 0?i[o]:s}let Ft;function oo(){Ft=void 0}const Z={now:()=>(Ft===void 0&&Z.set(D.isProcessing||Hi.useManualTiming?D.timestamp:performance.now()),Ft),set:t=>{Ft=t,queueMicrotask(oo)}},Ks=t=>/^0[^.\s]+$/u.test(t);function ao(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Ks(t):!0}const $s=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),lo=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function uo(t){const e=lo.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}function Ws(t,e,n=1){const[s,i]=uo(t);if(!s)return;const o=window.getComputedStyle(e).getPropertyValue(s);if(o){const r=o.trim();return $s(r)?parseFloat(r):r}return Ee(i)?Ws(i,e,n+1):i}const co=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),pn=t=>t===mt||t===T,gn=(t,e)=>parseFloat(t.split(", ")[e]),yn=(t,e)=>(n,{transform:s})=>{if(s==="none"||!s)return 0;const i=s.match(/^matrix3d\((.+)\)$/u);if(i)return gn(i[1],e);{const o=s.match(/^matrix\((.+)\)$/u);return o?gn(o[1],t):0}},ho=new Set(["x","y","z"]),fo=Vt.filter(t=>!ho.has(t));function mo(t){const e=[];return fo.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const dt={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:yn(4,13),y:yn(5,14)};dt.translateX=dt.x;dt.translateY=dt.y;const Gs=t=>e=>e.test(t),po={test:t=>t==="auto",parse:t=>t},_s=[mt,T,U,Y,xr,vr,po],vn=t=>_s.find(Gs(t)),rt=new Set;let de=!1,me=!1;function Hs(){if(me){const t=Array.from(rt).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=mo(s);i.length&&(n.set(s,i),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([o,r])=>{var a;(a=s.getValue(o))===null||a===void 0||a.set(r)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}me=!1,de=!1,rt.forEach(t=>t.complete()),rt.clear()}function zs(){rt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(me=!0)})}function go(){zs(),Hs()}class Ke{constructor(e,n,s,i,o,r=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=o,this.isAsync=r}scheduleResolve(){this.isScheduled=!0,this.isAsync?(rt.add(this),de||(de=!0,V.read(zs),V.resolveKeyframes(Hs))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;for(let o=0;o<e.length;o++)if(e[o]===null)if(o===0){const r=i==null?void 0:i.get(),a=e[e.length-1];if(r!==void 0)e[0]=r;else if(s&&n){const l=s.readValue(n,a);l!=null&&(e[0]=l)}e[0]===void 0&&(e[0]=a),i&&r===void 0&&i.set(e[0])}else e[o]=e[o-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),rt.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,rt.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const $e=(t,e)=>n=>!!(wt(n)&&yr.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),Ys=(t,e,n)=>s=>{if(!wt(s))return s;const[i,o,r,a]=s.match(Fe);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},yo=t=>Q(0,255,t),Jt={...mt,transform:t=>Math.round(yo(t))},it={test:$e("rgb","red"),parse:Ys("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+Jt.transform(t)+", "+Jt.transform(e)+", "+Jt.transform(n)+", "+vt(yt.transform(s))+")"};function vo(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const pe={test:$e("#"),parse:vo,transform:it.transform},ut={test:$e("hsl","hue"),parse:Ys("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+U.transform(vt(e))+", "+U.transform(vt(n))+", "+vt(yt.transform(s))+")"},R={test:t=>it.test(t)||pe.test(t)||ut.test(t),parse:t=>it.test(t)?it.parse(t):ut.test(t)?ut.parse(t):pe.parse(t),transform:t=>wt(t)?t:t.hasOwnProperty("red")?it.transform(t):ut.transform(t)};function xo(t){var e,n;return isNaN(t)&&wt(t)&&(((e=t.match(Fe))===null||e===void 0?void 0:e.length)||0)+(((n=t.match(gr))===null||n===void 0?void 0:n.length)||0)>0}const Xs="number",qs="color",To="var",Po="var(",xn="${}",bo=/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 bt(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let o=0;const a=e.replace(bo,l=>(R.test(l)?(s.color.push(o),i.push(qs),n.push(R.parse(l))):l.startsWith(Po)?(s.var.push(o),i.push(To),n.push(l)):(s.number.push(o),i.push(Xs),n.push(parseFloat(l))),++o,xn)).split(xn);return{values:n,split:a,indexes:s,types:i}}function Zs(t){return bt(t).values}function Qs(t){const{split:e,types:n}=bt(t),s=e.length;return i=>{let o="";for(let r=0;r<s;r++)if(o+=e[r],i[r]!==void 0){const a=n[r];a===Xs?o+=vt(i[r]):a===qs?o+=R.transform(i[r]):o+=i[r]}return o}}const So=t=>typeof t=="number"?0:t;function Ao(t){const e=Zs(t);return Qs(t)(e.map(So))}const J={test:xo,parse:Zs,createTransformer:Qs,getAnimatableNone:Ao},Vo=new Set(["brightness","contrast","saturate","opacity"]);function wo(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(Fe)||[];if(!s)return t;const i=n.replace(s,"");let o=Vo.has(e)?1:0;return s!==n&&(o*=100),e+"("+o+i+")"}const Co=/\b([a-z-]*)\(.*?\)/gu,ge={...J,getAnimatableNone:t=>{const e=t.match(Co);return e?e.map(wo).join(" "):t}},Do={...ws,color:R,backgroundColor:R,outlineColor:R,fill:R,stroke:R,borderColor:R,borderTopColor:R,borderRightColor:R,borderBottomColor:R,borderLeftColor:R,filter:ge,WebkitFilter:ge},We=t=>Do[t];function Js(t,e){let n=We(t);return n!==ge&&(n=J),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Mo=new Set(["auto","none","0"]);function Ro(t,e,n){let s=0,i;for(;s<t.length&&!i;){const o=t[s];typeof o=="string"&&!Mo.has(o)&&bt(o).values.length&&(i=t[s]),s++}if(i&&n)for(const o of e)t[o]=Js(n,i)}class ti extends Ke{constructor(e,n,s,i){super(e,n,s,i,i==null?void 0:i.owner,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:s}=this;if(!n.current)return;super.readKeyframes();for(let l=0;l<e.length;l++){let c=e[l];if(typeof c=="string"&&(c=c.trim(),Ee(c))){const u=Ws(c,n.current);u!==void 0&&(e[l]=u),l===e.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!co.has(s)||e.length!==2)return;const[i,o]=e,r=vn(i),a=vn(o);if(r!==a)if(pn(r)&&pn(a))for(let l=0;l<e.length;l++){const c=e[l];typeof c=="string"&&(e[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)ao(e[i])&&s.push(i);s.length&&Ro(e,s,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:s}=this;if(!e.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=dt[s](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(s,i).jump(i,!1)}measureEndState(){var e;const{element:n,name:s,unresolvedKeyframes:i}=this;if(!n.current)return;const o=n.getValue(s);o&&o.jump(this.measuredOrigin,!1);const r=i.length-1,a=i[r];i[r]=dt[s](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((e=this.removedTransforms)===null||e===void 0)&&e.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}function ei(t){let e;return()=>(e===void 0&&(e=t()),e)}const Tn=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(J.test(t)||t==="0")&&!t.startsWith("url("));function Lo(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function Eo(t,e,n,s){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const o=t[t.length-1],r=Tn(i,e),a=Tn(o,e);return!r||!a?!1:Lo(t)||n==="spring"&&s}class ni{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:r="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.options={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:o,repeatType:r,...a},this.updateFinishedPromise()}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&go(),this._resolved}onKeyframesResolved(e,n){this.hasAttemptedResolve=!0;const{name:s,type:i,velocity:o,delay:r,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!Eo(e,s,i,o))if(r)this.options.duration=0;else{l==null||l(zt(e,this.options,n)),a==null||a(),this.resolveFinishedPromise();return}const u=this.initPlayback(e,n);u!==!1&&(this._resolved={keyframes:e,finalKeyframe:n,...u},this.onPostResolved())}onPostResolved(){}then(e,n){return this.currentFinishedPromise.then(e,n)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(e=>{this.resolveFinishedPromise=e})}}function si(t,e){return e?t*(1e3/e):0}const Fo=5;function ii(t,e,n){const s=Math.max(e-Fo,0);return si(n-t(s),e-s)}const te=.001,ko=.01,Bo=10,jo=.05,Oo=1;function Io({duration:t=800,bounce:e=.25,velocity:n=0,mass:s=1}){let i,o,r=1-e;r=Q(jo,Oo,r),t=Q(ko,Bo,_(t)),r<1?(i=c=>{const u=c*r,h=u*t,f=u-n,d=ye(c,r),m=Math.exp(-h);return te-f/d*m},o=c=>{const h=c*r*t,f=h*n+n,d=Math.pow(r,2)*Math.pow(c,2)*t,m=Math.exp(-h),p=ye(Math.pow(c,2),r);return(-i(c)+te>0?-1:1)*((f-d)*m)/p}):(i=c=>{const u=Math.exp(-c*t),h=(c-n)*t+1;return-te+u*h},o=c=>{const u=Math.exp(-c*t),h=(n-c)*(t*t);return u*h});const a=5/t,l=Uo(i,o,a);if(t=q(t),isNaN(l))return{stiffness:100,damping:10,duration:t};{const c=Math.pow(l,2)*s;return{stiffness:c,damping:r*2*Math.sqrt(s*c),duration:t}}}const No=12;function Uo(t,e,n){let s=n;for(let i=1;i<No;i++)s=s-t(s)/e(s);return s}function ye(t,e){return t*Math.sqrt(1-e*e)}const Ko=["duration","bounce"],$o=["stiffness","damping","mass"];function Pn(t,e){return e.some(n=>t[n]!==void 0)}function Wo(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!Pn(t,$o)&&Pn(t,Ko)){const n=Io(t);e={...e,...n,mass:1},e.isResolvedFromDuration=!0}return e}function ri({keyframes:t,restDelta:e,restSpeed:n,...s}){const i=t[0],o=t[t.length-1],r={done:!1,value:i},{stiffness:a,damping:l,mass:c,duration:u,velocity:h,isResolvedFromDuration:f}=Wo({...s,velocity:-_(s.velocity||0)}),d=h||0,m=l/(2*Math.sqrt(a*c)),p=o-i,y=_(Math.sqrt(a/c)),v=Math.abs(p)<5;n||(n=v?.01:2),e||(e=v?.005:.5);let x;if(m<1){const g=ye(y,m);x=b=>{const S=Math.exp(-m*y*b);return o-S*((d+m*y*p)/g*Math.sin(g*b)+p*Math.cos(g*b))}}else if(m===1)x=g=>o-Math.exp(-y*g)*(p+(d+y*p)*g);else{const g=y*Math.sqrt(m*m-1);x=b=>{const S=Math.exp(-m*y*b),M=Math.min(g*b,300);return o-S*((d+m*y*p)*Math.sinh(M)+g*p*Math.cosh(M))/g}}return{calculatedDuration:f&&u||null,next:g=>{const b=x(g);if(f)r.done=g>=u;else{let S=d;g!==0&&(m<1?S=ii(x,g,b):S=0);const M=Math.abs(S)<=n,z=Math.abs(o-b)<=e;r.done=M&&z}return r.value=r.done?o:b,r}}}function bn({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:c=.5,restSpeed:u}){const h=t[0],f={done:!1,value:h},d=A=>a!==void 0&&A<a||l!==void 0&&A>l,m=A=>a===void 0?l:l===void 0||Math.abs(a-A)<Math.abs(l-A)?a:l;let p=n*e;const y=h+p,v=r===void 0?y:r(y);v!==y&&(p=v-h);const x=A=>-p*Math.exp(-A/s),g=A=>v+x(A),b=A=>{const B=x(A),j=g(A);f.done=Math.abs(B)<=c,f.value=f.done?v:j};let S,M;const z=A=>{d(f.value)&&(S=A,M=ri({keyframes:[f.value,m(f.value)],velocity:ii(g,A,f.value),damping:i,stiffness:o,restDelta:c,restSpeed:u}))};return z(0),{calculatedDuration:null,next:A=>{let B=!1;return!M&&S===void 0&&(B=!0,b(A),z(A)),S!==void 0&&A>=S?M.next(A-S):(!B&&b(A),f)}}}const oi=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Go=1e-7,_o=12;function Ho(t,e,n,s,i){let o,r,a=0;do r=e+(n-e)/2,o=oi(r,s,i)-t,o>0?n=r:e=r;while(Math.abs(o)>Go&&++a<_o);return r}function Dt(t,e,n,s){if(t===e&&n===s)return E;const i=o=>Ho(o,0,1,t,n);return o=>o===0||o===1?o:oi(i(o),e,s)}const zo=Dt(.42,0,1,1),Yo=Dt(0,0,.58,1),ai=Dt(.42,0,.58,1),Xo=t=>Array.isArray(t)&&typeof t[0]!="number",li=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,ui=t=>e=>1-t(1-e),Ge=t=>1-Math.sin(Math.acos(t)),ci=ui(Ge),qo=li(Ge),hi=Dt(.33,1.53,.69,.99),_e=ui(hi),Zo=li(_e),Qo=t=>(t*=2)<1?.5*_e(t):.5*(2-Math.pow(2,-10*(t-1))),Sn={linear:E,easeIn:zo,easeInOut:ai,easeOut:Yo,circIn:Ge,circInOut:qo,circOut:ci,backIn:_e,backInOut:Zo,backOut:hi,anticipate:Qo},An=t=>{if(Array.isArray(t)){ce(t.length===4);const[e,n,s,i]=t;return Dt(e,n,s,i)}else if(typeof t=="string")return ce(Sn[t]!==void 0),Sn[t];return t},St=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s},w=(t,e,n)=>t+(e-t)*n;function ee(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Jo({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,o=0,r=0;if(!e)i=o=r=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=ee(l,a,t+1/3),o=ee(l,a,t),r=ee(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:s}}function Ot(t,e){return n=>n>0?e:t}const ne=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},ta=[pe,it,ut],ea=t=>ta.find(e=>e.test(t));function Vn(t){const e=ea(t);if(!e)return!1;let n=e.parse(t);return e===ut&&(n=Jo(n)),n}const wn=(t,e)=>{const n=Vn(t),s=Vn(e);if(!n||!s)return Ot(t,e);const i={...n};return o=>(i.red=ne(n.red,s.red,o),i.green=ne(n.green,s.green,o),i.blue=ne(n.blue,s.blue,o),i.alpha=w(n.alpha,s.alpha,o),it.transform(i))},ve=new Set(["none","hidden"]);function na(t,e){return ve.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function sa(t,e){return n=>w(t,e,n)}function He(t){return typeof t=="number"?sa:typeof t=="string"?Ee(t)?Ot:R.test(t)?wn:oa:Array.isArray(t)?fi:typeof t=="object"?R.test(t)?wn:ia:Ot}function fi(t,e){const n=[...t],s=n.length,i=t.map((o,r)=>He(o)(o,e[r]));return o=>{for(let r=0;r<s;r++)n[r]=i[r](o);return n}}function ia(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=He(t[i])(t[i],e[i]));return i=>{for(const o in s)n[o]=s[o](i);return n}}function ra(t,e){var n;const s=[],i={color:0,var:0,number:0};for(let o=0;o<e.values.length;o++){const r=e.types[o],a=t.indexes[r][i[r]],l=(n=t.values[a])!==null&&n!==void 0?n:0;s[o]=l,i[r]++}return s}const oa=(t,e)=>{const n=J.createTransformer(e),s=bt(t),i=bt(e);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?ve.has(t)&&!i.values.length||ve.has(e)&&!s.values.length?na(t,e):G(fi(ra(s,i),i.values),n):Ot(t,e)};function di(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?w(t,e,n):He(t)(t,e)}function aa(t,e,n){const s=[],i=n||di,o=t.length-1;for(let r=0;r<o;r++){let a=i(t[r],t[r+1]);if(e){const l=Array.isArray(e)?e[r]||E:e;a=G(l,a)}s.push(a)}return s}function la(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const o=t.length;if(ce(o===e.length),o===1)return()=>e[0];if(o===2&&t[0]===t[1])return()=>e[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const r=aa(e,s,i),a=r.length,l=c=>{let u=0;if(a>1)for(;u<t.length-2&&!(c<t[u+1]);u++);const h=St(t[u],t[u+1],c);return r[u](h)};return n?c=>l(Q(t[0],t[o-1],c)):l}function ua(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=St(0,e,s);t.push(w(n,1,i))}}function ca(t){const e=[0];return ua(e,t.length-1),e}function ha(t,e){return t.map(n=>n*e)}function fa(t,e){return t.map(()=>e||ai).splice(0,t.length-1)}function It({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=Xo(s)?s.map(An):An(s),o={done:!1,value:e[0]},r=ha(n&&n.length===e.length?n:ca(e),t),a=la(r,e,{ease:Array.isArray(i)?i:fa(e,i)});return{calculatedDuration:t,next:l=>(o.value=a(l),o.done=l>=t,o)}}const Cn=2e4;function da(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<Cn;)e+=n,s=t.next(e);return e>=Cn?1/0:e}const ma=t=>{const e=({timestamp:n})=>t(n);return{start:()=>V.update(e,!0),stop:()=>H(e),now:()=>D.isProcessing?D.timestamp:Z.now()}},pa={decay:bn,inertia:bn,tween:It,keyframes:It,spring:ri},ga=t=>t/100;class ze extends ni{constructor({KeyframeResolver:e=Ke,...n}){super(n),this.holdTime=null,this.startTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:a}=this.options;a&&a()};const{name:s,motionValue:i,keyframes:o}=this.options,r=(a,l)=>this.onKeyframesResolved(a,l);s&&i&&i.owner?this.resolver=i.owner.resolveKeyframes(o,r,s,i):this.resolver=new e(o,r,s,i),this.resolver.scheduleResolve()}initPlayback(e){const{type:n="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:o,velocity:r=0}=this.options,a=pa[n]||It;let l,c;a!==It&&typeof e[0]!="number"&&(l=G(ga,di(e[0],e[1])),e=[0,100]);const u=a({...this.options,keyframes:e});o==="mirror"&&(c=a({...this.options,keyframes:[...e].reverse(),velocity:-r})),u.calculatedDuration===null&&(u.calculatedDuration=da(u));const{calculatedDuration:h}=u,f=h+i,d=f*(s+1)-i;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:h,resolvedDuration:f,totalDuration:d}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!e?this.pause():this.state=this.pendingPlayState}tick(e,n=!1){const{resolved:s}=this;if(!s){const{keyframes:A}=this.options;return{done:!0,value:A[A.length-1]}}const{finalKeyframe:i,generator:o,mirroredGenerator:r,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:h}=s;if(this.startTime===null)return o.next(0);const{delay:f,repeat:d,repeatType:m,repeatDelay:p,onUpdate:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-u/this.speed,this.startTime)),n?this.currentTime=e:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;const v=this.currentTime-f*(this.speed>=0?1:-1),x=this.speed>=0?v<0:v>u;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let g=this.currentTime,b=o;if(d){const A=Math.min(this.currentTime,u)/h;let B=Math.floor(A),j=A%1;!j&&A>=1&&(j=1),j===1&&B--,B=Math.min(B,d+1),!!(B%2)&&(m==="reverse"?(j=1-j,p&&(j-=p/h)):m==="mirror"&&(b=r)),g=Q(0,1,j)*h}const S=x?{done:!1,value:l[0]}:b.next(g);a&&(S.value=a(S.value));let{done:M}=S;!x&&c!==null&&(M=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const z=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&M);return z&&i!==void 0&&(S.value=zt(l,this.options,i)),y&&y(S.value),z&&this.finish(),S}get duration(){const{resolved:e}=this;return e?_(e.calculatedDuration):0}get time(){return _(this.currentTime)}set time(e){e=q(e),this.currentTime=e,this.holdTime!==null||this.speed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=_(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:e=ma,onPlay:n}=this.options;this.driver||(this.driver=e(i=>this.tick(i))),n&&n();const s=this.driver.now();this.holdTime!==null?this.startTime=s-this.holdTime:(!this.startTime||this.state==="finished")&&(this.startTime=s),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(e=this.currentTime)!==null&&e!==void 0?e:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}}const mi=t=>Array.isArray(t)&&typeof t[0]=="number";function pi(t){return!!(!t||typeof t=="string"&&t in Ye||mi(t)||Array.isArray(t)&&t.every(pi))}const gt=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,Ye={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:gt([0,.65,.55,1]),circOut:gt([.55,0,1,.45]),backIn:gt([.31,.01,.66,-.59]),backOut:gt([.33,1.53,.69,.99])};function ya(t){return gi(t)||Ye.easeOut}function gi(t){if(t)return mi(t)?gt(t):Array.isArray(t)?t.map(ya):Ye[t]}function va(t,e,n,{delay:s=0,duration:i=300,repeat:o=0,repeatType:r="loop",ease:a,times:l}={}){const c={[e]:n};l&&(c.offset=l);const u=gi(a);return Array.isArray(u)&&(c.easing=u),t.animate(c,{delay:s,duration:i,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"})}const xa=ei(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Ta=new Set(["opacity","clipPath","filter","transform"]),Nt=10,Pa=2e4;function ba(t){return t.type==="spring"||t.name==="backgroundColor"||!pi(t.ease)}function Sa(t,e){const n=new ze({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let s={done:!1,value:t[0]};const i=[];let o=0;for(;!s.done&&o<Pa;)s=n.sample(o),i.push(s.value),o+=Nt;return{times:void 0,keyframes:i,duration:o-Nt,ease:"linear"}}class Dn extends ni{constructor(e){super(e);const{name:n,motionValue:s,keyframes:i}=this.options;this.resolver=new ti(i,(o,r)=>this.onKeyframesResolved(o,r),n,s),this.resolver.scheduleResolve()}initPlayback(e,n){var s;let{duration:i=300,times:o,ease:r,type:a,motionValue:l,name:c}=this.options;if(!(!((s=l.owner)===null||s===void 0)&&s.current))return!1;if(ba(this.options)){const{onComplete:h,onUpdate:f,motionValue:d,...m}=this.options,p=Sa(e,m);e=p.keyframes,e.length===1&&(e[1]=e[0]),i=p.duration,o=p.times,r=p.ease,a="keyframes"}const u=va(l.owner.current,c,e,{...this.options,duration:i,times:o,ease:r});return u.startTime=Z.now(),this.pendingTimeline?(u.timeline=this.pendingTimeline,this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:h}=this.options;l.set(zt(e,this.options,n)),h&&h(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:i,times:o,type:a,ease:r,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:n}=e;return _(n)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:n}=e;return _(n.currentTime||0)}set time(e){const{resolved:n}=this;if(!n)return;const{animation:s}=n;s.currentTime=q(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:n}=e;return n.playbackRate}set speed(e){const{resolved:n}=this;if(!n)return;const{animation:s}=n;s.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:n}=e;return n.playState}attachTimeline(e){if(!this._resolved)this.pendingTimeline=e;else{const{resolved:n}=this;if(!n)return E;const{animation:s}=n;s.timeline=e,s.onfinish=null}return E}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;const{resolved:e}=this;if(!e)return;const{animation:n,keyframes:s,duration:i,type:o,ease:r,times:a}=e;if(!(n.playState==="idle"||n.playState==="finished")){if(this.time){const{motionValue:l,onUpdate:c,onComplete:u,...h}=this.options,f=new ze({...h,keyframes:s,duration:i,type:o,ease:r,times:a,isGenerator:!0}),d=q(this.time);l.setWithVelocity(f.sample(d-Nt).value,f.sample(d).value,Nt)}this.cancel()}}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:n,name:s,repeatDelay:i,repeatType:o,damping:r,type:a}=e;return xa()&&s&&Ta.has(s)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!i&&o!=="mirror"&&r!==0&&a!=="inertia"}}function Aa(t,e){let n;const s=()=>{const{currentTime:i}=e,r=(i===null?0:i.value)/100;n!==r&&t(r),n=r};return V.update(s,!0),()=>H(s)}const Va=ei(()=>window.ScrollTimeline!==void 0);class wa{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}then(e,n){return Promise.all(this.animations).then(e).catch(n)}getAll(e){return this.animations[0][e]}setAll(e,n){for(let s=0;s<this.animations.length;s++)this.animations[s][e]=n}attachTimeline(e){const n=this.animations.map(s=>{if(Va()&&s.attachTimeline)s.attachTimeline(e);else return s.pause(),Aa(i=>{s.time=s.duration*i},e)});return()=>{n.forEach((s,i)=>{s&&s(),this.animations[i].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get duration(){let e=0;for(let n=0;n<this.animations.length;n++)e=Math.max(e,this.animations[n].duration);return e}runAll(e){this.animations.forEach(n=>n[e]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const Xe=(t,e,n,s={},i,o)=>r=>{const a=Ue(s,t)||{},l=a.delay||s.delay||0;let{elapsed:c=0}=s;c=c-q(l);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-c,onUpdate:f=>{e.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:i};io(a)||(u={...u,...so(t,u)}),u.duration&&(u.duration=q(u.duration)),u.repeatDelay&&(u.repeatDelay=q(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let h=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(h=!0)),h&&!o&&e.get()!==void 0){const f=zt(u.keyframes,a);if(f!==void 0)return V.update(()=>{u.onUpdate(f),u.onComplete()}),new wa([])}return!o&&Dn.supports(u)?new Dn(u):new ze(u)};function Ut(t){return!!(L(t)&&t.add)}function qe(t,e){t.indexOf(e)===-1&&t.push(e)}function Ze(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class Qe{constructor(){this.subscriptions=[]}add(e){return qe(this.subscriptions,e),()=>Ze(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let o=0;o<i;o++){const r=this.subscriptions[o];r&&r(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Mn=30,Ca=t=>!isNaN(parseFloat(t));class Da{constructor(e,n={}){this.version="11.2.12",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(s,i=!0)=>{const o=Z.now();this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=Z.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Ca(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new Qe);const s=this.events[e].add(n);return e==="change"?()=>{s(),V.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e,n=!0){!n||!this.passiveEffect?this.updateAndNotify(e,n):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=Z.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Mn)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Mn);return si(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),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.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function At(t,e){return new Da(t,e)}function Ma(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,At(n))}function Ra(t,e){const n=Ht(t,e);let{transitionEnd:s={},transition:i={},...o}=n||{};o={...o,...s};for(const r in o){const a=kr(o[r]);Ma(t,r,a)}}function yi(t){return t.getProps()[ys]}function La({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function vi(t,e,{delay:n=0,transitionOverride:s,type:i}={}){var o;let{transition:r=t.getDefaultTransition(),transitionEnd:a,...l}=e;const c=t.getValue("willChange");s&&(r=s);const u=[],h=i&&t.animationState&&t.animationState.getState()[i];for(const f in l){const d=t.getValue(f,(o=t.latestValues[f])!==null&&o!==void 0?o:null),m=l[f];if(m===void 0||h&&La(h,f))continue;const p={delay:n,elapsed:0,...Ue(r||{},f)};let y=!1;if(window.HandoffAppearAnimations){const x=yi(t);if(x){const g=window.HandoffAppearAnimations(x,f,d,V);g!==null&&(p.elapsed=g,y=!0)}}d.start(Xe(f,d,m,t.shouldReduceMotion&&ot.has(f)?{type:!1}:p,t,y));const v=d.animation;v&&(Ut(c)&&(c.add(f),v.then(()=>c.remove(f))),u.push(v))}return a&&Promise.all(u).then(()=>{V.update(()=>{a&&Ra(t,a)})}),u}function xe(t,e,n={}){var s;const i=Ht(t,e,n.type==="exit"?(s=t.presenceContext)===null||s===void 0?void 0:s.custom:void 0);let{transition:o=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const r=i?()=>Promise.all(vi(t,i,n)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:h,staggerDirection:f}=o;return Ea(t,e,u+c,h,f,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[c,u]=l==="beforeChildren"?[r,a]:[a,r];return c().then(()=>u())}else return Promise.all([r(),a(n.delay)])}function Ea(t,e,n=0,s=0,i=1,o){const r=[],a=(t.variantChildren.size-1)*s,l=i===1?(c=0)=>c*s:(c=0)=>a-c*s;return Array.from(t.variantChildren).sort(Fa).forEach((c,u)=>{c.notify("AnimationStart",e),r.push(xe(c,e,{...o,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",e)))}),Promise.all(r)}function Fa(t,e){return t.sortNodePosition(e)}function ka(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(o=>xe(t,o,n));s=Promise.all(i)}else if(typeof e=="string")s=xe(t,e,n);else{const i=typeof e=="function"?Ht(t,e,n.custom):e;s=Promise.all(vi(t,i,n))}return s.then(()=>{V.postRender(()=>{t.notify("AnimationComplete",e)})})}const Ba=[...Me].reverse(),ja=Me.length;function Oa(t){return e=>Promise.all(e.map(({animation:n,options:s})=>ka(t,n,s)))}function Ia(t){let e=Oa(t),n=Rn(),s=!0;const i=l=>(c,u)=>{var h;const f=Ht(t,u,l==="exit"?(h=t.presenceContext)===null||h===void 0?void 0:h.custom:void 0);if(f){const{transition:d,transitionEnd:m,...p}=f;c={...c,...p,...m}}return c};function o(l){e=l(t)}function r(l){const c=t.getProps(),u=t.getVariantContext(!0)||{},h=[],f=new Set;let d={},m=1/0;for(let y=0;y<ja;y++){const v=Ba[y],x=n[v],g=c[v]!==void 0?c[v]:u[v],b=Pt(g),S=v===l?x.isActive:null;S===!1&&(m=y);let M=g===u[v]&&g!==c[v]&&b;if(M&&s&&t.manuallyAnimateOnMount&&(M=!1),x.protectedKeys={...d},!x.isActive&&S===null||!g&&!x.prevProp||Wt(g)||typeof g=="boolean")continue;let A=Na(x.prevProp,g)||v===l&&x.isActive&&!M&&b||y>m&&b,B=!1;const j=Array.isArray(g)?g:[g];let at=j.reduce(i(v),{});S===!1&&(at={});const{prevResolvedValues:tn={}}=x,Ii={...tn,...at},en=F=>{A=!0,f.has(F)&&(B=!0,f.delete(F)),x.needsAnimating[F]=!0;const K=t.getValue(F);K&&(K.liveStyle=!1)};for(const F in Ii){const K=at[F],Yt=tn[F];if(d.hasOwnProperty(F))continue;let Xt=!1;he(K)&&he(Yt)?Xt=!Us(K,Yt):Xt=K!==Yt,Xt?K!=null?en(F):f.add(F):K!==void 0&&f.has(F)?en(F):x.protectedKeys[F]=!0}x.prevProp=g,x.prevResolvedValues=at,x.isActive&&(d={...d,...at}),s&&t.blockInitialAnimation&&(A=!1),A&&(!M||B)&&h.push(...j.map(F=>({animation:F,options:{type:v}})))}if(f.size){const y={};f.forEach(v=>{const x=t.getBaseTarget(v),g=t.getValue(v);g&&(g.liveStyle=!0),y[v]=x??null}),h.push({animation:y})}let p=!!h.length;return s&&(c.initial===!1||c.initial===c.animate)&&!t.manuallyAnimateOnMount&&(p=!1),s=!1,p?e(h):Promise.resolve()}function a(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=t.variantChildren)===null||u===void 0||u.forEach(f=>{var d;return(d=f.animationState)===null||d===void 0?void 0:d.setActive(l,c)}),n[l].isActive=c;const h=r(l);for(const f in n)n[f].protectedKeys={};return h}return{animateChanges:r,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Rn(),s=!0}}}function Na(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Us(e,t):!1}function et(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Rn(){return{animate:et(!0),whileInView:et(),whileHover:et(),whileTap:et(),whileDrag:et(),whileFocus:et(),exit:et()}}class Ua extends tt{constructor(e){super(e),e.animationState||(e.animationState=Ia(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Wt(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)===null||e===void 0||e.call(this)}}let Ka=0;class $a extends tt{constructor(){super(...arguments),this.id=Ka++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===s)return;const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>n(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const Wa={animation:{Feature:Ua},exit:{Feature:$a}},Ln=(t,e)=>Math.abs(t-e);function Ga(t,e){const n=Ln(t.x,e.x),s=Ln(t.y,e.y);return Math.sqrt(n**2+s**2)}class xi{constructor(e,n,{transformPagePoint:s,contextWindow:i,dragSnapToOrigin:o=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=ie(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,d=Ga(h.offset,{x:0,y:0})>=3;if(!f&&!d)return;const{point:m}=h,{timestamp:p}=D;this.history.push({...m,timestamp:p});const{onStart:y,onMove:v}=this.handlers;f||(y&&y(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,h)},this.handlePointerMove=(h,f)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=se(f,this.transformPagePoint),V.update(this.updatePoint,!0)},this.handlePointerUp=(h,f)=>{this.end();const{onEnd:d,onSessionEnd:m,resumeAnimation:p}=this.handlers;if(this.dragSnapToOrigin&&p&&p(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=ie(h.type==="pointercancel"?this.lastMoveEventInfo:se(f,this.transformPagePoint),this.history);this.startEvent&&d&&d(h,y),m&&m(h,y)},!Bs(e))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=s,this.contextWindow=i||window;const r=_t(e),a=se(r,this.transformPagePoint),{point:l}=a,{timestamp:c}=D;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(e,ie(a,this.history)),this.removeListeners=G(W(this.contextWindow,"pointermove",this.handlePointerMove),W(this.contextWindow,"pointerup",this.handlePointerUp),W(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),H(this.updatePoint)}}function se(t,e){return e?{point:e(t.point)}:t}function En(t,e){return{x:t.x-e.x,y:t.y-e.y}}function ie({point:t},e){return{point:t,delta:En(t,Ti(e)),offset:En(t,_a(e)),velocity:Ha(e,.1)}}function _a(t){return t[0]}function Ti(t){return t[t.length-1]}function Ha(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=Ti(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>q(e)));)n--;if(!s)return{x:0,y:0};const o=_(i.timestamp-s.timestamp);if(o===0)return{x:0,y:0};const r={x:(i.x-s.x)/o,y:(i.y-s.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function k(t){return t.max-t.min}function Te(t,e=0,n=.01){return Math.abs(t-e)<=n}function Fn(t,e,n,s=.5){t.origin=s,t.originPoint=w(e.min,e.max,t.origin),t.scale=k(n)/k(e),(Te(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=w(n.min,n.max,t.origin)-t.originPoint,(Te(t.translate)||isNaN(t.translate))&&(t.translate=0)}function xt(t,e,n,s){Fn(t.x,e.x,n.x,s?s.originX:void 0),Fn(t.y,e.y,n.y,s?s.originY:void 0)}function kn(t,e,n){t.min=n.min+e.min,t.max=t.min+k(e)}function za(t,e,n){kn(t.x,e.x,n.x),kn(t.y,e.y,n.y)}function Bn(t,e,n){t.min=e.min-n.min,t.max=t.min+k(e)}function Tt(t,e,n){Bn(t.x,e.x,n.x),Bn(t.y,e.y,n.y)}function Ya(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?w(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?w(n,t,s.max):Math.min(t,n)),t}function jn(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function Xa(t,{top:e,left:n,bottom:s,right:i}){return{x:jn(t.x,n,i),y:jn(t.y,e,s)}}function On(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,s]=[s,n]),{min:n,max:s}}function qa(t,e){return{x:On(t.x,e.x),y:On(t.y,e.y)}}function Za(t,e){let n=.5;const s=k(t),i=k(e);return i>s?n=St(e.min,e.max-s,t.min):s>i&&(n=St(t.min,t.max-i,e.min)),Q(0,1,n)}function Qa(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const Pe=.35;function Ja(t=Pe){return t===!1?t=0:t===!0&&(t=Pe),{x:In(t,"left","right"),y:In(t,"top","bottom")}}function In(t,e,n){return{min:Nn(t,e),max:Nn(t,n)}}function Nn(t,e){return typeof t=="number"?t:t[e]||0}const Un=()=>({translate:0,scale:1,origin:0,originPoint:0}),ct=()=>({x:Un(),y:Un()}),Kn=()=>({min:0,max:0}),C=()=>({x:Kn(),y:Kn()});function I(t){return[t("x"),t("y")]}function Pi({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function tl({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function el(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function re(t){return t===void 0||t===1}function be({scale:t,scaleX:e,scaleY:n}){return!re(t)||!re(e)||!re(n)}function nt(t){return be(t)||bi(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function bi(t){return $n(t.x)||$n(t.y)}function $n(t){return t&&t!=="0%"}function Kt(t,e,n){const s=t-n,i=e*s;return n+i}function Wn(t,e,n,s,i){return i!==void 0&&(t=Kt(t,i,s)),Kt(t,n,s)+e}function Se(t,e=0,n=1,s,i){t.min=Wn(t.min,e,n,s,i),t.max=Wn(t.max,e,n,s,i)}function Si(t,{x:e,y:n}){Se(t.x,e.translate,e.scale,e.originPoint),Se(t.y,n.translate,n.scale,n.originPoint)}function nl(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let o,r;for(let a=0;a<i;a++){o=n[a],r=o.projectionDelta;const l=o.instance;l&&l.style&&l.style.display==="contents"||(s&&o.options.layoutScroll&&o.scroll&&o!==o.root&&ht(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,Si(t,r)),s&&nt(o.latestValues)&&ht(t,o.latestValues))}e.x=Gn(e.x),e.y=Gn(e.y)}function Gn(t){return Number.isInteger(t)||t>1.0000000000001||t<.999999999999?t:1}function X(t,e){t.min=t.min+e,t.max=t.max+e}function _n(t,e,[n,s,i]){const o=e[i]!==void 0?e[i]:.5,r=w(t.min,t.max,o);Se(t,e[n],e[s],r,e.scale)}const sl=["x","scaleX","originX"],il=["y","scaleY","originY"];function ht(t,e){_n(t.x,e,sl),_n(t.y,e,il)}function Ai(t,e){return Pi(el(t.getBoundingClientRect(),e))}function rl(t,e,n){const s=Ai(t,n),{scroll:i}=e;return i&&(X(s.x,i.offset.x),X(s.y,i.offset.y)),s}const Vi=({current:t})=>t?t.ownerDocument.defaultView:null,ol=new WeakMap;class al{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=C(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const i=u=>{const{dragSnapToOrigin:h}=this.getProps();h?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(_t(u,"page").point)},o=(u,h)=>{const{drag:f,dragPropagation:d,onDragStart:m}=this.getProps();if(f&&!d&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Os(f),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),I(y=>{let v=this.getAxisMotionValue(y).get()||0;if(U.test(v)){const{projection:x}=this.visualElement;if(x&&x.layout){const g=x.layout.layoutBox[y];g&&(v=k(g)*(parseFloat(v)/100))}}this.originPoint[y]=v}),m&&V.postRender(()=>m(u,h));const{animationState:p}=this.visualElement;p&&p.setActive("whileDrag",!0)},r=(u,h)=>{const{dragPropagation:f,dragDirectionLock:d,onDirectionLock:m,onDrag:p}=this.getProps();if(!f&&!this.openGlobalLock)return;const{offset:y}=h;if(d&&this.currentDirection===null){this.currentDirection=ll(y),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",h.point,y),this.updateAxis("y",h.point,y),this.visualElement.render(),p&&p(u,h)},a=(u,h)=>this.stop(u,h),l=()=>I(u=>{var h;return this.getAnimationState(u)==="paused"&&((h=this.getAxisMotionValue(u).animation)===null||h===void 0?void 0:h.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new xi(e,{onSessionStart:i,onStart:o,onMove:r,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:Vi(this.visualElement)})}stop(e,n){const s=this.isDragging;if(this.cancel(),!s)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o&&V.postRender(()=>o(e,n))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!Lt(e,i,this.currentDirection))return;const o=this.getAxisMotionValue(e);let r=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(r=Ya(r,this.constraints[e],this.elastic[e])),o.set(r)}resolveConstraints(){var e;const{dragConstraints:n,dragElastic:s}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(e=this.visualElement.projection)===null||e===void 0?void 0:e.layout,o=this.constraints;n&&lt(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=Xa(i.layoutBox,n):this.constraints=!1,this.elastic=Ja(s),o!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&I(r=>{this.constraints!==!1&&this.getAxisMotionValue(r)&&(this.constraints[r]=Qa(i.layoutBox[r],this.constraints[r]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!lt(e))return!1;const s=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=rl(s,i.root,this.visualElement.getTransformPagePoint());let r=qa(i.layout.layoutBox,o);if(n){const a=n(tl(r));this.hasMutatedConstraints=!!a,a&&(r=Pi(a))}return r}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=I(u=>{if(!Lt(u,n,this.currentDirection))return;let h=l&&l[u]||{};r&&(h={min:0,max:0});const f=i?200:1e6,d=i?40:1e7,m={type:"inertia",velocity:s?e[u]:0,bounceStiffness:f,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...o,...h};return this.startAxisValueAnimation(u,m)});return Promise.all(c).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return s.start(Xe(e,s,0,n,this.visualElement))}stopAnimation(){I(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){I(e=>{var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,s=this.visualElement.getProps(),i=s[n];return i||this.visualElement.getValue(e,(s.initial?s.initial[e]:void 0)||0)}snapToCursor(e){I(n=>{const{drag:s}=this.getProps();if(!Lt(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:r,max:a}=i.layout.layoutBox[n];o.set(e[n]-w(r,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!lt(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};I(r=>{const a=this.getAxisMotionValue(r);if(a&&this.constraints!==!1){const l=a.get();i[r]=Za({min:l,max:l},this.constraints[r])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),I(r=>{if(!Lt(r,e,null))return;const a=this.getAxisMotionValue(r),{min:l,max:c}=this.constraints[r];a.set(w(l,c,i[r]))})}addListeners(){if(!this.visualElement.current)return;ol.set(this.visualElement,this);const e=this.visualElement.current,n=W(e,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),s=()=>{const{dragConstraints:l}=this.getProps();lt(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),V.read(s);const r=$(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(I(u=>{const h=this.getAxisMotionValue(u);h&&(this.originPoint[u]+=l[u].translate,h.set(h.get()+l[u].translate))}),this.visualElement.render())});return()=>{r(),n(),o(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:r=Pe,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:o,dragElastic:r,dragMomentum:a}}}function Lt(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function ll(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class ul extends tt{constructor(e){super(e),this.removeGroupControls=E,this.removeListeners=E,this.controls=new al(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||E}unmount(){this.removeGroupControls(),this.removeListeners()}}const Hn=t=>(e,n)=>{t&&V.postRender(()=>t(e,n))};class cl extends tt{constructor(){super(...arguments),this.removePointerDownListener=E}onPointerDown(e){this.session=new xi(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Vi(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:Hn(e),onStart:Hn(n),onMove:s,onEnd:(o,r)=>{delete this.session,i&&V.postRender(()=>i(o,r))}}}mount(){this.removePointerDownListener=W(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function hl(){const t=P.useContext(Ve);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:n,register:s}=t,i=P.useId();return P.useEffect(()=>s(i),[]),!e&&n?[!1,()=>n&&n(i)]:[!0]}const kt={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function zn(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const pt={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(T.test(t))t=parseFloat(t);else return t;const n=zn(t,e.target.x),s=zn(t,e.target.y);return`${n}% ${s}%`}},fl={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=J.parse(t);if(i.length>5)return s;const o=J.createTransformer(t),r=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+r]/=a,i[1+r]/=l;const c=w(a,l,.5);return typeof i[2+r]=="number"&&(i[2+r]/=c),typeof i[3+r]=="number"&&(i[3+r]/=c),o(i)}};class dl extends P.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:o}=e;ur(ml),o&&(n.group&&n.group.add(o),s&&s.register&&i&&s.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),kt.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:o}=this.props,r=s.projection;return r&&(r.isPresent=o,i||e.layoutDependency!==n||n===void 0?r.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?r.promote():r.relegate()||V.postRender(()=>{const a=r.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),De.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),s&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function wi(t){const[e,n]=hl(),s=P.useContext(bs);return N.jsx(dl,{...t,layoutGroup:s,switchLayoutGroup:P.useContext(xs),isPresent:e,safeToRemove:n})}const ml={borderRadius:{...pt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:pt,borderTopRightRadius:pt,borderBottomLeftRadius:pt,borderBottomRightRadius:pt,boxShadow:fl},Ci=["TopLeft","TopRight","BottomLeft","BottomRight"],pl=Ci.length,Yn=t=>typeof t=="string"?parseFloat(t):t,Xn=t=>typeof t=="number"||T.test(t);function gl(t,e,n,s,i,o){i?(t.opacity=w(0,n.opacity!==void 0?n.opacity:1,yl(s)),t.opacityExit=w(e.opacity!==void 0?e.opacity:1,0,vl(s))):o&&(t.opacity=w(e.opacity!==void 0?e.opacity:1,n.opacity!==void 0?n.opacity:1,s));for(let r=0;r<pl;r++){const a=`border${Ci[r]}Radius`;let l=qn(e,a),c=qn(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Xn(l)===Xn(c)?(t[a]=Math.max(w(Yn(l),Yn(c),s),0),(U.test(c)||U.test(l))&&(t[a]+="%")):t[a]=c}(e.rotate||n.rotate)&&(t.rotate=w(e.rotate||0,n.rotate||0,s))}function qn(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const yl=Di(0,.5,ci),vl=Di(.5,.95,E);function Di(t,e,n){return s=>s<t?0:s>e?1:n(St(t,e,s))}function Zn(t,e){t.min=e.min,t.max=e.max}function O(t,e){Zn(t.x,e.x),Zn(t.y,e.y)}function Qn(t,e,n,s,i){return t-=e,t=Kt(t,1/n,s),i!==void 0&&(t=Kt(t,1/i,s)),t}function xl(t,e=0,n=1,s=.5,i,o=t,r=t){if(U.test(e)&&(e=parseFloat(e),e=w(r.min,r.max,e/100)-r.min),typeof e!="number")return;let a=w(o.min,o.max,s);t===o&&(a-=e),t.min=Qn(t.min,e,n,a,i),t.max=Qn(t.max,e,n,a,i)}function Jn(t,e,[n,s,i],o,r){xl(t,e[n],e[s],e[i],e.scale,o,r)}const Tl=["x","scaleX","originX"],Pl=["y","scaleY","originY"];function ts(t,e,n,s){Jn(t.x,e,Tl,n?n.x:void 0,s?s.x:void 0),Jn(t.y,e,Pl,n?n.y:void 0,s?s.y:void 0)}function es(t){return t.translate===0&&t.scale===1}function Mi(t){return es(t.x)&&es(t.y)}function bl(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}function Ri(t,e){return Math.round(t.x.min)===Math.round(e.x.min)&&Math.round(t.x.max)===Math.round(e.x.max)&&Math.round(t.y.min)===Math.round(e.y.min)&&Math.round(t.y.max)===Math.round(e.y.max)}function ns(t){return k(t.x)/k(t.y)}class Sl{constructor(){this.members=[]}add(e){qe(this.members,e),e.scheduleRender()}remove(e){if(Ze(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let s;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){s=o;break}}return s?(this.promote(s),!0):!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.instance&&s.scheduleRender(),e.scheduleRender(),e.resumeFrom=s,n&&(e.resumeFrom.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:s}=e;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function ss(t,e,n){let s="";const i=t.x.translate/e.x,o=t.y.translate/e.y,r=(n==null?void 0:n.z)||0;if((i||o||r)&&(s=`translate3d(${i}px, ${o}px, ${r}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:h,rotateY:f,skewX:d,skewY:m}=n;c&&(s=`perspective(${c}px) ${s}`),u&&(s+=`rotate(${u}deg) `),h&&(s+=`rotateX(${h}deg) `),f&&(s+=`rotateY(${f}deg) `),d&&(s+=`skewX(${d}deg) `),m&&(s+=`skewY(${m}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(s+=`scale(${a}, ${l})`),s||"none"}const Al=(t,e)=>t.depth-e.depth;class Vl{constructor(){this.children=[],this.isDirty=!1}add(e){qe(this.children,e),this.isDirty=!0}remove(e){Ze(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Al),this.isDirty=!1,this.children.forEach(e)}}function wl(t,e){const n=Z.now(),s=({timestamp:i})=>{const o=i-n;o>=e&&(H(s),t(o-e))};return V.read(s,!0),()=>H(s)}function Cl(t){window.MotionDebug&&window.MotionDebug.record(t)}function Dl(t){return t instanceof SVGElement&&t.tagName!=="svg"}function Ml(t,e,n){const s=L(t)?t:At(t);return s.start(Xe("",s,e,n)),s.animation}const oe=["","X","Y","Z"],Rl={visibility:"hidden"},is=1e3;let Ll=0;const st={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function ae(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function Li(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return!1;const{visualElement:e}=t.options;return e?yi(e)?!0:t.parent&&!t.parent.hasCheckedOptimisedAppear?Li(t.parent):!1:!1}function Ei({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(r={},a=e==null?void 0:e()){this.id=Ll++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,st.totalNodes=st.resolvedTargetDeltas=st.recalculatedProjection=0,this.nodes.forEach(kl),this.nodes.forEach(Nl),this.nodes.forEach(Ul),this.nodes.forEach(Bl),Cl(st)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=r,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Vl)}addEventListener(r,a){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new Qe),this.eventHandlers.get(r).add(a)}notifyListeners(r,...a){const l=this.eventHandlers.get(r);l&&l.notify(...a)}hasListeners(r){return this.eventHandlers.has(r)}mount(r,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Dl(r),this.instance=r;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(r),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),t){let h;const f=()=>this.root.updateBlockedByResize=!1;t(r,()=>{this.root.updateBlockedByResize=!0,h&&h(),h=wl(f,250),kt.hasAnimatedSinceResize&&(kt.hasAnimatedSinceResize=!1,this.nodes.forEach(os))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:f,hasRelativeTargetChanged:d,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||u.getDefaultTransition()||_l,{onLayoutAnimationStart:y,onLayoutAnimationComplete:v}=u.getProps(),x=!this.targetLayout||!Ri(this.targetLayout,m)||d,g=!f&&d;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||g||f&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(h,g);const b={...Ue(p,"layout"),onPlay:y,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(b.delay=0,b.type=!1),this.startAnimation(b)}else f||os(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const r=this.getStack();r&&r.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,H(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(Kl),this.animationId++)}getTransformTemplate(){const{visualElement:r}=this.options;return r&&r.getProps().transformTemplate}willUpdate(r=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.HandoffCancelAllAnimations&&Li(this)&&window.HandoffCancelAllAnimations(),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const h=this.path[u];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),r&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(rs);return}this.isUpdating||this.nodes.forEach(Ol),this.isUpdating=!1,this.nodes.forEach(Il),this.nodes.forEach(El),this.nodes.forEach(Fl),this.clearAllSnapshots();const a=Z.now();D.delta=Q(0,1e3/60,a-D.timestamp),D.timestamp=a,D.isProcessing=!0,qt.update.process(D),qt.preRender.process(D),qt.render.process(D),D.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,De.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(jl),this.sharedNodes.forEach($l)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,V.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){V.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const r=this.layout;this.layout=this.measure(!1),this.layoutCorrected=C(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,r?r.layoutBox:void 0)}updateScroll(r="measure"){let a=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===r&&(a=!1),a&&(this.scroll={animationId:this.root.animationId,phase:r,isRoot:s(this.instance),offset:n(this.instance)})}resetTransform(){if(!i)return;const r=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Mi(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;r&&(a||nt(this.latestValues)||u)&&(i(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return r&&(l=this.removeTransform(l)),Hl(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:r}=this.options;if(!r)return C();const a=r.measureViewportBox(),{scroll:l}=this.root;return l&&(X(a.x,l.offset.x),X(a.y,l.offset.y)),a}removeElementScroll(r){const a=C();O(a,r);for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:h}=c;if(c!==this.root&&u&&h.layoutScroll){if(u.isRoot){O(a,r);const{scroll:f}=this.root;f&&(X(a.x,-f.offset.x),X(a.y,-f.offset.y))}X(a.x,u.offset.x),X(a.y,u.offset.y)}}return a}applyTransform(r,a=!1){const l=C();O(l,r);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&ht(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),nt(u.latestValues)&&ht(l,u.latestValues)}return nt(this.latestValues)&&ht(l,this.latestValues),l}removeTransform(r){const a=C();O(a,r);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!nt(c.latestValues))continue;be(c.latestValues)&&c.updateSnapshot();const u=C(),h=c.measurePageBox();O(u,h),ts(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return nt(this.latestValues)&&ts(a,this.latestValues),a}setTargetDelta(r){this.targetDelta=r,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(r){this.options={...this.options,...r,crossfade:r.crossfade!==void 0?r.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==D.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(r=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(r||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget))return;const{layout:h,layoutId:f}=this.options;if(!(!this.layout||!(h||f))){if(this.resolvedRelativeTargetAt=D.timestamp,!this.targetDelta&&!this.relativeTarget){const d=this.getClosestProjectingParent();d&&d.layout&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=C(),this.relativeTargetOrigin=C(),Tt(this.relativeTargetOrigin,this.layout.layoutBox,d.layout.layoutBox),O(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=C(),this.targetWithTransforms=C()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),za(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):O(this.target,this.layout.layoutBox),Si(this.target,this.targetDelta)):O(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const d=this.getClosestProjectingParent();d&&!!d.resumingFrom==!!this.resumingFrom&&!d.options.layoutScroll&&d.target&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=C(),this.relativeTargetOrigin=C(),Tt(this.relativeTargetOrigin,this.target,d.target),O(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}st.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||be(this.parent.latestValues)||bi(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var r;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||!((r=this.parent)===null||r===void 0)&&r.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===D.timestamp&&(c=!1),c)return;const{layout:u,layoutId:h}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||h))return;O(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,d=this.treeScale.y;nl(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=C());const{target:m}=a;if(!m){this.projectionTransform&&(this.projectionDelta=ct(),this.projectionTransform="none",this.scheduleRender());return}this.projectionDelta||(this.projectionDelta=ct(),this.projectionDeltaWithTransform=ct());const p=this.projectionTransform;xt(this.projectionDelta,this.layoutCorrected,m,this.latestValues),this.projectionTransform=ss(this.projectionDelta,this.treeScale),(this.projectionTransform!==p||this.treeScale.x!==f||this.treeScale.y!==d)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m)),st.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(r=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),r){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(r,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},h=ct();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=C(),d=l?l.source:void 0,m=this.layout?this.layout.source:void 0,p=d!==m,y=this.getStack(),v=!y||y.members.length<=1,x=!!(p&&!v&&this.options.crossfade===!0&&!this.path.some(Gl));this.animationProgress=0;let g;this.mixTargetDelta=b=>{const S=b/1e3;as(h.x,r.x,S),as(h.y,r.y,S),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Tt(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Wl(this.relativeTarget,this.relativeTargetOrigin,f,S),g&&bl(this.relativeTarget,g)&&(this.isProjectionDirty=!1),g||(g=C()),O(g,this.relativeTarget)),p&&(this.animationValues=u,gl(u,c,this.latestValues,S,x,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(H(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=V.update(()=>{kt.hasAnimatedSinceResize=!0,this.currentAnimation=Ml(0,is,{...r,onUpdate:a=>{this.mixTargetDelta(a),r.onUpdate&&r.onUpdate(a)},onComplete:()=>{r.onComplete&&r.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 r=this.getStack();r&&r.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(is),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=r;if(!(!a||!l||!c)){if(this!==r&&this.layout&&c&&Fi(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||C();const h=k(this.layout.layoutBox.x);l.x.min=r.target.x.min,l.x.max=l.x.min+h;const f=k(this.layout.layoutBox.y);l.y.min=r.target.y.min,l.y.max=l.y.min+f}O(a,l),ht(a,u),xt(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new Sl),this.sharedNodes.get(r).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const r=this.getStack();return r?r.lead===this:!0}getLead(){var r;const{layoutId:a}=this.options;return a?((r=this.getStack())===null||r===void 0?void 0:r.lead)||this:this}getPrevLead(){var r;const{layoutId:a}=this.options;return a?(r=this.getStack())===null||r===void 0?void 0:r.prevLead:void 0}getStack(){const{layoutId:r}=this.options;if(r)return this.root.sharedNodes.get(r)}promote({needsReset:r,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),r&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const r=this.getStack();return r?r.relegate(this):!1}resetSkewAndRotation(){const{visualElement:r}=this.options;if(!r)return;let a=!1;const{latestValues:l}=r;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&ae("z",r,c,this.animationValues);for(let u=0;u<oe.length;u++)ae(`rotate${oe[u]}`,r,c,this.animationValues),ae(`skew${oe[u]}`,r,c,this.animationValues);r.render();for(const u in c)r.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);r.scheduleRender()}getProjectionStyles(r){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Rl;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=Et(r==null?void 0:r.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const h=this.getLead();if(!this.projectionDelta||!this.layout||!h.target){const p={};return this.options.layoutId&&(p.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,p.pointerEvents=Et(r==null?void 0:r.pointerEvents)||""),this.hasProjected&&!nt(this.latestValues)&&(p.transform=u?u({},""):"none",this.hasProjected=!1),p}const f=h.animationValues||h.latestValues;this.applyTransformsToTarget(),c.transform=ss(this.projectionDeltaWithTransform,this.treeScale,f),u&&(c.transform=u(f,c.transform));const{x:d,y:m}=this.projectionDelta;c.transformOrigin=`${d.origin*100}% ${m.origin*100}% 0`,h.animationValues?c.opacity=h===this?(l=(a=f.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:c.opacity=h===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const p in Bt){if(f[p]===void 0)continue;const{correct:y,applyTo:v}=Bt[p],x=c.transform==="none"?f[p]:y(f[p],h);if(v){const g=v.length;for(let b=0;b<g;b++)c[v[b]]=x}else c[p]=x}return this.options.layoutId&&(c.pointerEvents=h===this?Et(r==null?void 0:r.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>{var a;return(a=r.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(rs),this.root.sharedNodes.clear()}}}function El(t){t.updateLayout()}function Fl(t){var e;const n=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:i}=t.layout,{animationType:o}=t.options,r=n.source!==t.layout.source;o==="size"?I(h=>{const f=r?n.measuredBox[h]:n.layoutBox[h],d=k(f);f.min=s[h].min,f.max=f.min+d}):Fi(o,n.layoutBox,s)&&I(h=>{const f=r?n.measuredBox[h]:n.layoutBox[h],d=k(s[h]);f.max=f.min+d,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[h].max=t.relativeTarget[h].min+d)});const a=ct();xt(a,s,n.layoutBox);const l=ct();r?xt(l,t.applyTransform(i,!0),n.measuredBox):xt(l,s,n.layoutBox);const c=!Mi(a);let u=!1;if(!t.resumeFrom){const h=t.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:f,layout:d}=h;if(f&&d){const m=C();Tt(m,n.layoutBox,f.layoutBox);const p=C();Tt(p,s,d.layoutBox),Ri(m,p)||(u=!0),h.options.layoutRoot&&(t.relativeTarget=p,t.relativeTargetOrigin=m,t.relativeParent=h)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeTargetChanged:u})}else if(t.isLead()){const{onExitComplete:s}=t.options;s&&s()}t.options.transition=void 0}function kl(t){st.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Bl(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function jl(t){t.clearSnapshot()}function rs(t){t.clearMeasurements()}function Ol(t){t.isLayoutDirty=!1}function Il(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function os(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Nl(t){t.resolveTargetDelta()}function Ul(t){t.calcProjection()}function Kl(t){t.resetSkewAndRotation()}function $l(t){t.removeLeadSnapshot()}function as(t,e,n){t.translate=w(e.translate,0,n),t.scale=w(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function ls(t,e,n,s){t.min=w(e.min,n.min,s),t.max=w(e.max,n.max,s)}function Wl(t,e,n,s){ls(t.x,e.x,n.x,s),ls(t.y,e.y,n.y,s)}function Gl(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const _l={duration:.45,ease:[.4,0,.1,1]},us=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),cs=us("applewebkit/")&&!us("chrome/")?Math.round:E;function hs(t){t.min=cs(t.min),t.max=cs(t.max)}function Hl(t){hs(t.x),hs(t.y)}function Fi(t,e,n){return t==="position"||t==="preserve-aspect"&&!Te(ns(e),ns(n),.2)}const zl=Ei({attachResizeListener:(t,e)=>$(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),le={current:void 0},ki=Ei({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!le.current){const t=new zl({});t.mount(window),t.setOptions({layoutScroll:!0}),le.current=t}return le.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),Yl={pan:{Feature:cl},drag:{Feature:ul,ProjectionNode:ki,MeasureLayout:wi}},Ae={current:null},Bi={current:!1};function Xl(){if(Bi.current=!0,!!we)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Ae.current=t.matches;t.addListener(e),e()}else Ae.current=!1}function ql(t,e,n){const{willChange:s}=e;for(const i in e){const o=e[i],r=n[i];if(L(o))t.addValue(i,o),Ut(s)&&s.add(i);else if(L(r))t.addValue(i,At(o,{owner:t})),Ut(s)&&s.remove(i);else if(r!==o)if(t.hasValue(i)){const a=t.getValue(i);a.liveStyle===!0?a.jump(o):a.hasAnimated||a.set(o)}else{const a=t.getStaticValue(i);t.addValue(i,At(a!==void 0?a:o,{owner:t}))}}for(const i in n)e[i]===void 0&&t.removeValue(i);return e}const fs=new WeakMap,Zl=[..._s,R,J],Ql=t=>Zl.find(Gs(t)),ds=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Jl=Re.length;class tu{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,blockInitialAnimation:o,visualState:r},a={}){this.resolveKeyframes=(f,d,m,p)=>new this.KeyframeResolver(f,d,m,p,this),this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Ke,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.scheduleRender=()=>V.render(this.render,!1,!0);const{latestValues:l,renderState:c}=r;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=Gt(n),this.isVariantNode=Ps(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:u,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in h){const d=h[f];l[f]!==void 0&&L(d)&&(d.set(l[f],!1),Ut(u)&&u.add(f))}}mount(e){this.current=e,fs.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),Bi.current||Xl(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Ae.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){fs.delete(this.current),this.projection&&this.projection.unmount(),H(this.notifyUpdate),H(this.render),this.valueSubscriptions.forEach(e=>e()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(e,n){const s=ot.has(e),i=n.on("change",r=>{this.latestValues[e]=r,this.props.onUpdate&&V.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{i(),o(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in ft){const n=ft[e];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[e]&&i&&s(this.props)&&(this.features[e]=new i(this)),this.features[e]){const o=this.features[e];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):C()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<ds.length;s++){const i=ds[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,r=e[o];r&&(this.propEventSubscriptions[i]=this.on(i,r))}this.prevMotionValues=ql(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(e=!1){if(e)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const s=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(s.initial=this.props.initial),s}const n={};for(let s=0;s<Jl;s++){const i=Re[s],o=this.props[i];(Pt(o)||o===!1)&&(n[i]=o)}return n}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const s=this.values.get(e);n!==s&&(s&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=At(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){var s;let i=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(s=this.getBaseTargetFromProps(this.props,e))!==null&&s!==void 0?s:this.readValueFromInstance(this.current,e,this.options);return i!=null&&(typeof i=="string"&&($s(i)||Ks(i))?i=parseFloat(i):!Ql(i)&&J.test(n)&&(i=Js(e,n)),this.setBaseTarget(e,L(i)?i.get():i)),L(i)?i.get():i}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var n;const{initial:s}=this.props;let i;if(typeof s=="string"||typeof s=="object"){const r=Ne(this.props,s,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);r&&(i=r[e])}if(s&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,e);return o!==void 0&&!L(o)?o:this.initialValues[e]!==void 0&&i===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new Qe),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}}class ji extends tu{constructor(){super(...arguments),this.KeyframeResolver=ti}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}}function eu(t){return window.getComputedStyle(t)}class nu extends ji{constructor(){super(...arguments),this.type="html"}readValueFromInstance(e,n){if(ot.has(n)){const s=We(n);return s&&s.default||0}else{const s=eu(e),i=(Vs(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Ai(e,n)}build(e,n,s,i){ke(e,n,s,i.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return Ie(e,n,s)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;L(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(e,n,s,i){Rs(e,n,s,i)}}class su extends ji{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(ot.has(n)){const s=We(n);return s&&s.default||0}return n=Ls.has(n)?n:Ce(n),e.getAttribute(n)}measureInstanceViewportBox(){return C()}scrapeMotionValuesFromProps(e,n,s){return Fs(e,n,s)}build(e,n,s,i){je(e,n,s,this.isSVGTag,i.transformTemplate)}renderInstance(e,n,s,i){Es(e,n,s,i)}mount(e){this.isSVGTag=Oe(e.tagName),super.mount(e)}}const iu=(t,e)=>Le(t)?new su(e,{enableHardwareAcceleration:!1}):new nu(e,{allowProjection:t!==P.Fragment,enableHardwareAcceleration:!0}),ru={layout:{ProjectionNode:ki,MeasureLayout:wi}},ou={...Wa,...Qr,...Yl,...ru},ue=ar((t,e)=>Nr(t,e,ou,iu));function Je(){const t=Ki("root"),e=$i().find(n=>{var s;return n.formAction==="/progress"&&((s=n.formData)==null?void 0:s.has("complete"))});return!e||!(t!=null&&t.progress)?(t==null?void 0:t.progress)??null:t.progress.map(n=>{var o,r;const s=((o=e.formData)==null?void 0:o.get("complete"))==="true";return((r=e.formData)==null?void 0:r.get("lessonSlug"))===n.epicLessonSlug?{...n,epicCompletedAt:s?Date.now():null}:n})}function mu(){const t=ms().pathname,e=Je();if(!e)return null;const n=a=>a.type==="workshop-instructions"?0:a.type==="workshop-finished"?1e4:a.type==="instructions"?a.exerciseNumber*100:a.type==="step"?a.exerciseNumber*100+a.stepNumber:a.type==="finished"?a.exerciseNumber*100+100:a.type==="unknown"?1e5:-1,i=e.sort((a,l)=>n(a)-n(l)).find(a=>!a.epicCompletedAt);if(!i||i.type==="unknown")return null;if(i.type==="workshop-instructions")return"/";if(i.type==="workshop-finished")return"/finished";const o=i.exerciseNumber.toString().padStart(2,"0");if(i.type==="instructions")return`/exercise/${o}`;if(i.type==="finished")return`/exercise/${o}/finished`;const r=i.stepNumber.toString().padStart(2,"0");if(i.type==="step"){const a=`/exercise/${o}/${r}/problem`,l=`/exercise/${o}/${r}/solution`;return t===a||t===l?l:a}return null}const au={0:"",1:"before:h-[10%]",2:"before:h-[20%]",3:"before:h-[30%]",4:"before:h-[40%]",5:"before:h-[50%]",6:"before:h-[60%]",7:"before:h-[70%]",8:"before:h-[80%]",9:"before:h-[90%]",10:"before:h-[100%]"};function pu(t){const e=Je();if(!(e!=null&&e.length))return null;const n=e.filter(o=>(o.type==="instructions"||o.type==="step"||o.type==="finished")&&o.exerciseNumber===t);if(!n.length)return null;const s=n.reduce((o,r)=>r.epicCompletedAt?o+1:o,0)/n.length,i=Math[s>.1?"floor":"ceil"](s*10);return`relative ${au[i]} before:bg-highlight before:absolute before:left-0 before:top-0 before:w-[4px]`}function gu(t){const e=Oi(t);return e!=null&&e.epicCompletedAt?"relative before:h-[100%] before:bg-highlight before:absolute before:left-0 before:top-0 before:w-[4px]":null}function Oi({exerciseNumber:t,stepNumber:e,type:n}){const s=Je();return s!=null&&s.length?n==="workshop-finished"||n==="workshop-instructions"?s.find(i=>i.type===n)??null:n==="instructions"||n==="finished"?s.find(i=>i.type===n&&i.exerciseNumber===t)??null:n==="step"?s.find(i=>i.type===n&&i.exerciseNumber===t&&i.stepNumber===e)??null:null:null}function yu({className:t,...e}){var p,y,v,x;const n=Wi(),s=Ui(),i=Oi(e),o=P.useRef(null),r=P.useRef(null),a=(p=n.formData)!=null&&p.has("complete")?n.formData.get("complete")==="true":!!(i!=null&&i.epicCompletedAt),[l,c]=P.useState(!1),u=ms(),h=Ni(),f=(v=(y=h.location)==null?void 0:y.state)==null?void 0:v.from,d=(x=h.location)==null?void 0:x.pathname,m=u.pathname;return P.useEffect(()=>{var g;f==="continue next lesson button"&&m===d&&(c(!0),(g=r.current)==null||g.focus())},[u.key,m,d,f]),P.useEffect(()=>{let g=!0;if(l)return new Promise(b=>setTimeout(b,200)).then(async()=>{if(!g||!o.current)return;const b=o.current.getAnimations().map(({finished:S})=>S);return Promise.allSettled(b).then(()=>{g&&c(!1)})}),()=>{g=!1}},[l]),ENV.EPICSHOP_DEPLOYED||!i?null:N.jsxs(n.Form,{method:"POST",action:"/progress",children:[s,N.jsx("input",{type:"hidden",name:"lessonSlug",value:i.epicLessonSlug}),N.jsx("input",{type:"hidden",name:"complete",value:(!a).toString()}),N.jsxs(ue.button,{ref:r,onClick:()=>{c(!a)},type:"submit",className:nn("group relative flex w-full items-center justify-between overflow-hidden transition hover:bg-[hsl(var(--foreground)/0.02)] focus:bg-[hsl(var(--foreground)/0.02)]",t),children:[a?"Mark as incomplete":"Mark as complete",l?N.jsx(ue.div,{ref:o,className:"absolute right-0 h-20 w-20 rounded-full bg-foreground/20",initial:{scale:.5,opacity:0},animate:{scale:[.5,2],opacity:[0,1,0]},transition:{duration:1,ease:"easeInOut"}}):null,N.jsx(ue.div,{"aria-hidden":!0,className:nn("relative flex h-8 w-8 items-center justify-center overflow-hidden rounded-full border transition",{"bg-foreground text-background duration-1000":a,"duration-100 group-hover:bg-background":!a}),children:a?"✓":N.jsx("div",{className:"absolute -translate-y-10 opacity-25 transition group-hover:translate-y-0",children:"✓"})})]})]})}export{yu as P,Je as a,ka as b,Er as c,Gi as d,mu as e,gu as f,ue as m,Ra as s,pu as u};
2
- //# sourceMappingURL=progress-Co-59mG2.js.map