maestro-flow 0.4.3 → 0.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/commands/maestro-collab.md +1 -1
- package/.claude/commands/maestro-composer.md +1 -1
- package/.claude/commands/maestro-impeccable.md +1 -1
- package/.claude/commands/maestro-learn.md +1 -1
- package/.claude/commands/maestro-overlay.md +1 -1
- package/.claude/commands/maestro-quick.md +1 -1
- package/.claude/commands/maestro-ralph.md +1 -1
- package/.claude/commands/maestro-tools-execute.md +1 -1
- package/.claude/commands/maestro-tools-register.md +1 -1
- package/.claude/commands/maestro.md +1 -1
- package/.claude/commands/manage-issue-discover.md +1 -1
- package/.claude/commands/manage-issue.md +1 -1
- package/.claude/commands/manage-knowhow-capture.md +3 -1
- package/.claude/commands/manage-knowhow.md +1 -1
- package/.claude/commands/manage-learn.md +1 -1
- package/.claude/commands/manage-status.md +1 -0
- package/.claude/commands/manage-wiki.md +1 -1
- package/.claude/commands/quality-auto-test.md +1 -2
- package/.claude/commands/quality-refactor.md +1 -1
- package/.claude/commands/quality-test.md +5 -0
- package/.claude/commands/security-audit.md +1 -0
- package/.claude/commands/spec-add.md +6 -3
- package/.claude/commands/spec-setup.md +0 -3
- package/dashboard/dist/assets/{ArtifactsPage-iJZtYsmR.js → ArtifactsPage-CVh0Z2I2.js} +3 -3
- package/dashboard/dist/assets/{ChatInput-DNnDLdQF.js → ChatInput-CBI3qHQQ.js} +2 -2
- package/dashboard/dist/assets/ChatPage-BjJ9CYox.js +22 -0
- package/dashboard/dist/assets/CollabPage-CprGGO9y.js +1 -0
- package/dashboard/dist/assets/{ExecutionPanel-BKV3GZ7Q.js → ExecutionPanel-CClxD7cH.js} +1 -1
- package/dashboard/dist/assets/KanbanPage-copqjdPg.js +16 -0
- package/dashboard/dist/assets/MaestroCoordinatePage-CioZjQ9N.js +4 -0
- package/dashboard/dist/assets/{MarkdownRenderer-cYFfe1uX.js → MarkdownRenderer-CtUhoxCT.js} +1 -1
- package/dashboard/dist/assets/McpPage-BcPPcJpr.js +21 -0
- package/dashboard/dist/assets/{MeetingRoomPage-wnvT7wlB.js → MeetingRoomPage-BgmAKxU-.js} +1 -1
- package/dashboard/dist/assets/{OutputPanel-DDL90Idy.js → OutputPanel-DgT3gMyp.js} +1 -1
- package/dashboard/dist/assets/{ProblemsPanel-zFN9IIs0.js → ProblemsPanel-BmG7rxoG.js} +1 -1
- package/dashboard/dist/assets/{RequirementBoardPage-DOPJoT0I.js → RequirementBoardPage-k8YoeQ0r.js} +1 -1
- package/dashboard/dist/assets/{RequirementPage-CEVquRgM.js → RequirementPage-Da2354px.js} +1 -1
- package/dashboard/dist/assets/{RoomsPage-D5USEWDh.js → RoomsPage-BtqDiYaU.js} +1 -1
- package/dashboard/dist/assets/SpecsPage-ByPVH_M3.js +36 -0
- package/dashboard/dist/assets/{TeamsPage-DlcEmr_Q.js → TeamsPage-sFDLN30L.js} +1 -1
- package/dashboard/dist/assets/{TreeBrowser-Y48Wz-QY.js → TreeBrowser-oEx8YJXV.js} +1 -1
- package/dashboard/dist/assets/WorkflowPage-JrX7CVHh.js +6 -0
- package/dashboard/dist/assets/{arrow-left-NCUOENvg.js → arrow-left-DYvgSdIH.js} +1 -1
- package/dashboard/dist/assets/{check-o7nfGNHf.js → check-jcgYBWVR.js} +1 -1
- package/dashboard/dist/assets/{chevron-right-BXySK2fn.js → chevron-right-DvZ5sMOg.js} +1 -1
- package/dashboard/dist/assets/{circle-cooAwnAR.js → circle-DYT-zoRZ.js} +1 -1
- package/dashboard/dist/assets/{circle-alert-DcSBokh4.js → circle-alert-Bfbv3gt4.js} +1 -1
- package/dashboard/dist/assets/{circle-check-Cd-jce4j.js → circle-check-D82WnpbI.js} +1 -1
- package/dashboard/dist/assets/{circle-check-big-BN7Mdp4i.js → circle-check-big-CPVD1GKF.js} +1 -1
- package/dashboard/dist/assets/{code-BQa9oL1n.js → code-B3bKFGI4.js} +1 -1
- package/dashboard/dist/assets/{columns-3-BzgxelGx.js → columns-3-BeMAQCix.js} +1 -1
- package/dashboard/dist/assets/{download-swRJnate.js → download-BCtpoWYB.js} +1 -1
- package/dashboard/dist/assets/en-2h6fD0j8.js +1 -0
- package/dashboard/dist/assets/{folder-DbGbLNFN.js → folder-CTj6SNNu.js} +1 -1
- package/dashboard/dist/assets/index-6-yE5Yl9.css +1 -0
- package/dashboard/dist/assets/{index-DIoMBMbv.js → index-BxR_3IbJ.js} +1 -1
- package/dashboard/dist/assets/{index-DLBN_7fb.js → index-CWBJLu42.js} +1 -1
- package/dashboard/dist/assets/index-DpcPd-UG.js +236 -0
- package/dashboard/dist/assets/{list-BTRAIvDq.js → list-BMv8pIQn.js} +1 -1
- package/dashboard/dist/assets/{loader-NHtB6Mdn.js → loader-DdM4VOgF.js} +1 -1
- package/dashboard/dist/assets/{minus-BjMxRTET.js → minus-D15s2E__.js} +1 -1
- package/dashboard/dist/assets/{pen-line-C4_O16H0.js → pen-line-DO6o4xWz.js} +1 -1
- package/dashboard/dist/assets/{pencil-DTmKhyDY.js → pencil-qGxg9jOe.js} +1 -1
- package/dashboard/dist/assets/{proxy-Dtx5p6IO.js → proxy-DOffTzwA.js} +1 -1
- package/dashboard/dist/assets/refresh-cw-C9UNdLCy.js +6 -0
- package/dashboard/dist/assets/{rows-2-GR1dZtRu.js → rows-2-CifAA5SL.js} +1 -1
- package/dashboard/dist/assets/{search-DVtgy2W7.js → search-pe7pU1YN.js} +1 -1
- package/dashboard/dist/assets/{shallow-BOmvDNsv.js → shallow-r7YynQYA.js} +1 -1
- package/dashboard/dist/assets/table-Bh772iIw.js +6 -0
- package/dashboard/dist/assets/{team-types-BPeOvVdA.js → team-types-C_HqX2p2.js} +1 -1
- package/dashboard/dist/assets/{terminal-CzogW4cl.js → terminal-EpmtGBlw.js} +1 -1
- package/dashboard/dist/assets/{trash-2-52LATVfW.js → trash-2-Xen46iNQ.js} +1 -1
- package/dashboard/dist/assets/{users-DLFE2voE.js → users-BLueDPxF.js} +1 -1
- package/dashboard/dist/assets/{zap-DhiYlgyZ.js → zap-DsQCPF61.js} +1 -1
- package/dashboard/dist/assets/zh-CN-r3AvxxOL.js +1 -0
- package/dashboard/dist/index.html +2 -2
- package/dashboard/dist-server/dashboard/src/server/routes/settings.js +70 -1
- package/dashboard/dist-server/dashboard/src/server/routes/settings.js.map +1 -1
- package/dashboard/dist-server/src/types/index.d.ts +48 -6
- package/dist/src/commands/coordinate.d.ts.map +1 -1
- package/dist/src/commands/coordinate.js +2 -0
- package/dist/src/commands/coordinate.js.map +1 -1
- package/dist/src/commands/hooks.d.ts.map +1 -1
- package/dist/src/commands/hooks.js +201 -6
- package/dist/src/commands/hooks.js.map +1 -1
- package/dist/src/commands/spec.d.ts.map +1 -1
- package/dist/src/commands/spec.js +466 -0
- package/dist/src/commands/spec.js.map +1 -1
- package/dist/src/config/index.d.ts +5 -1
- package/dist/src/config/index.d.ts.map +1 -1
- package/dist/src/config/index.js +42 -0
- package/dist/src/config/index.js.map +1 -1
- package/dist/src/hooks/keyword-spec-injector.d.ts.map +1 -1
- package/dist/src/hooks/keyword-spec-injector.js +106 -10
- package/dist/src/hooks/keyword-spec-injector.js.map +1 -1
- package/dist/src/hooks/plugins/spec-analytics-plugin.d.ts +13 -0
- package/dist/src/hooks/plugins/spec-analytics-plugin.d.ts.map +1 -0
- package/dist/src/hooks/plugins/spec-analytics-plugin.js +92 -0
- package/dist/src/hooks/plugins/spec-analytics-plugin.js.map +1 -0
- package/dist/src/hooks/plugins/spec-injection-plugin.d.ts.map +1 -1
- package/dist/src/hooks/plugins/spec-injection-plugin.js +57 -4
- package/dist/src/hooks/plugins/spec-injection-plugin.js.map +1 -1
- package/dist/src/hooks/spec-analytics.d.ts +128 -0
- package/dist/src/hooks/spec-analytics.d.ts.map +1 -0
- package/dist/src/hooks/spec-analytics.js +311 -0
- package/dist/src/hooks/spec-analytics.js.map +1 -0
- package/dist/src/hooks/spec-injector.d.ts.map +1 -1
- package/dist/src/hooks/spec-injector.js +140 -6
- package/dist/src/hooks/spec-injector.js.map +1 -1
- package/dist/src/tools/spec-keyword-index.d.ts.map +1 -1
- package/dist/src/tools/spec-keyword-index.js +23 -6
- package/dist/src/tools/spec-keyword-index.js.map +1 -1
- package/dist/src/tools/spec-loader.d.ts +20 -0
- package/dist/src/tools/spec-loader.d.ts.map +1 -1
- package/dist/src/tools/spec-loader.js +58 -7
- package/dist/src/tools/spec-loader.js.map +1 -1
- package/dist/src/tools/store-knowhow.d.ts.map +1 -1
- package/dist/src/tools/store-knowhow.js +26 -1
- package/dist/src/tools/store-knowhow.js.map +1 -1
- package/dist/src/tui/config-ui/ConfigHub.d.ts +1 -1
- package/dist/src/tui/config-ui/ConfigHub.d.ts.map +1 -1
- package/dist/src/tui/config-ui/ConfigHub.js +16 -10
- package/dist/src/tui/config-ui/ConfigHub.js.map +1 -1
- package/dist/src/tui/config-ui/ConfigSourcesView.d.ts.map +1 -1
- package/dist/src/tui/config-ui/ConfigSourcesView.js +3 -2
- package/dist/src/tui/config-ui/ConfigSourcesView.js.map +1 -1
- package/dist/src/tui/config-ui/HooksPanel.d.ts.map +1 -1
- package/dist/src/tui/config-ui/HooksPanel.js +15 -19
- package/dist/src/tui/config-ui/HooksPanel.js.map +1 -1
- package/dist/src/tui/config-ui/SkillConfigDashboard.d.ts.map +1 -1
- package/dist/src/tui/config-ui/SkillConfigDashboard.js +5 -9
- package/dist/src/tui/config-ui/SkillConfigDashboard.js.map +1 -1
- package/dist/src/tui/config-ui/SkillParamEditor.d.ts.map +1 -1
- package/dist/src/tui/config-ui/SkillParamEditor.js +1 -3
- package/dist/src/tui/config-ui/SkillParamEditor.js.map +1 -1
- package/dist/src/tui/config-ui/SkillsList.d.ts.map +1 -1
- package/dist/src/tui/config-ui/SkillsList.js +7 -9
- package/dist/src/tui/config-ui/SkillsList.js.map +1 -1
- package/dist/src/tui/config-ui/SpecAnalyticsPanel.d.ts +6 -0
- package/dist/src/tui/config-ui/SpecAnalyticsPanel.d.ts.map +1 -0
- package/dist/src/tui/config-ui/SpecAnalyticsPanel.js +164 -0
- package/dist/src/tui/config-ui/SpecAnalyticsPanel.js.map +1 -0
- package/dist/src/tui/config-ui/SpecPanel.d.ts.map +1 -1
- package/dist/src/tui/config-ui/SpecPanel.js +918 -20
- package/dist/src/tui/config-ui/SpecPanel.js.map +1 -1
- package/dist/src/tui/config-ui/index.d.ts +3 -1
- package/dist/src/tui/config-ui/index.d.ts.map +1 -1
- package/dist/src/tui/config-ui/index.js +4 -0
- package/dist/src/tui/config-ui/index.js.map +1 -1
- package/dist/src/tui/install-ui/BackupConfig.d.ts.map +1 -1
- package/dist/src/tui/install-ui/BackupConfig.js +3 -2
- package/dist/src/tui/install-ui/BackupConfig.js.map +1 -1
- package/dist/src/tui/install-ui/BlueprintPreview.d.ts.map +1 -1
- package/dist/src/tui/install-ui/BlueprintPreview.js +7 -6
- package/dist/src/tui/install-ui/BlueprintPreview.js.map +1 -1
- package/dist/src/tui/install-ui/ComponentGrid.d.ts.map +1 -1
- package/dist/src/tui/install-ui/ComponentGrid.js +3 -2
- package/dist/src/tui/install-ui/ComponentGrid.js.map +1 -1
- package/dist/src/tui/install-ui/ConfigPanel.d.ts.map +1 -1
- package/dist/src/tui/install-ui/ConfigPanel.js +4 -3
- package/dist/src/tui/install-ui/ConfigPanel.js.map +1 -1
- package/dist/src/tui/install-ui/CyberItem.d.ts.map +1 -1
- package/dist/src/tui/install-ui/CyberItem.js +7 -6
- package/dist/src/tui/install-ui/CyberItem.js.map +1 -1
- package/dist/src/tui/install-ui/CyberdeckBlueprint.d.ts.map +1 -1
- package/dist/src/tui/install-ui/CyberdeckBlueprint.js +2 -1
- package/dist/src/tui/install-ui/CyberdeckBlueprint.js.map +1 -1
- package/dist/src/tui/install-ui/ExecutionView.d.ts.map +1 -1
- package/dist/src/tui/install-ui/ExecutionView.js +3 -2
- package/dist/src/tui/install-ui/ExecutionView.js.map +1 -1
- package/dist/src/tui/install-ui/GradientHeader.d.ts.map +1 -1
- package/dist/src/tui/install-ui/GradientHeader.js +2 -1
- package/dist/src/tui/install-ui/GradientHeader.js.map +1 -1
- package/dist/src/tui/install-ui/HooksConfig.d.ts.map +1 -1
- package/dist/src/tui/install-ui/HooksConfig.js +8 -8
- package/dist/src/tui/install-ui/HooksConfig.js.map +1 -1
- package/dist/src/tui/install-ui/InstallConfirm.d.ts.map +1 -1
- package/dist/src/tui/install-ui/InstallConfirm.js +4 -3
- package/dist/src/tui/install-ui/InstallConfirm.js.map +1 -1
- package/dist/src/tui/install-ui/InstallExecution.d.ts.map +1 -1
- package/dist/src/tui/install-ui/InstallExecution.js +3 -2
- package/dist/src/tui/install-ui/InstallExecution.js.map +1 -1
- package/dist/src/tui/install-ui/InstallFlow.d.ts.map +1 -1
- package/dist/src/tui/install-ui/InstallFlow.js +3 -2
- package/dist/src/tui/install-ui/InstallFlow.js.map +1 -1
- package/dist/src/tui/install-ui/InstallHub.d.ts.map +1 -1
- package/dist/src/tui/install-ui/InstallHub.js +9 -8
- package/dist/src/tui/install-ui/InstallHub.js.map +1 -1
- package/dist/src/tui/install-ui/InstallResult.d.ts.map +1 -1
- package/dist/src/tui/install-ui/InstallResult.js +3 -2
- package/dist/src/tui/install-ui/InstallResult.js.map +1 -1
- package/dist/src/tui/install-ui/McpConfig.d.ts.map +1 -1
- package/dist/src/tui/install-ui/McpConfig.js +4 -3
- package/dist/src/tui/install-ui/McpConfig.js.map +1 -1
- package/dist/src/tui/install-ui/ResultDashboard.d.ts.map +1 -1
- package/dist/src/tui/install-ui/ResultDashboard.js +3 -2
- package/dist/src/tui/install-ui/ResultDashboard.js.map +1 -1
- package/dist/src/tui/install-ui/ReviewPanel.d.ts.map +1 -1
- package/dist/src/tui/install-ui/ReviewPanel.js +2 -1
- package/dist/src/tui/install-ui/ReviewPanel.js.map +1 -1
- package/dist/src/tui/install-ui/StatuslineConfig.d.ts.map +1 -1
- package/dist/src/tui/install-ui/StatuslineConfig.js +3 -2
- package/dist/src/tui/install-ui/StatuslineConfig.js.map +1 -1
- package/dist/src/tui/install-ui/StepSelector.d.ts.map +1 -1
- package/dist/src/tui/install-ui/StepSelector.js +11 -10
- package/dist/src/tui/install-ui/StepSelector.js.map +1 -1
- package/dist/src/tui/overlay-ui/OverlayList.d.ts.map +1 -1
- package/dist/src/tui/overlay-ui/OverlayList.js +8 -12
- package/dist/src/tui/overlay-ui/OverlayList.js.map +1 -1
- package/dist/src/tui/shared/components.d.ts +56 -0
- package/dist/src/tui/shared/components.d.ts.map +1 -0
- package/dist/src/tui/shared/components.js +55 -0
- package/dist/src/tui/shared/components.js.map +1 -0
- package/dist/src/tui/shared/helpers.d.ts +24 -0
- package/dist/src/tui/shared/helpers.d.ts.map +1 -0
- package/dist/src/tui/shared/helpers.js +49 -0
- package/dist/src/tui/shared/helpers.js.map +1 -0
- package/dist/src/tui/shared/index.d.ts +4 -0
- package/dist/src/tui/shared/index.d.ts.map +1 -0
- package/dist/src/tui/shared/index.js +7 -0
- package/dist/src/tui/shared/index.js.map +1 -0
- package/dist/src/tui/shared/tokens.d.ts +79 -0
- package/dist/src/tui/shared/tokens.d.ts.map +1 -0
- package/dist/src/tui/shared/tokens.js +81 -0
- package/dist/src/tui/shared/tokens.js.map +1 -0
- package/dist/src/tui/tools-ui/CommandReference.d.ts.map +1 -1
- package/dist/src/tui/tools-ui/CommandReference.js +2 -4
- package/dist/src/tui/tools-ui/CommandReference.js.map +1 -1
- package/dist/src/tui/tools-ui/ConfigSources.d.ts.map +1 -1
- package/dist/src/tui/tools-ui/ConfigSources.js +3 -2
- package/dist/src/tui/tools-ui/ConfigSources.js.map +1 -1
- package/dist/src/tui/tools-ui/RegisterSettings.d.ts.map +1 -1
- package/dist/src/tui/tools-ui/RegisterSettings.js +2 -1
- package/dist/src/tui/tools-ui/RegisterSettings.js.map +1 -1
- package/dist/src/tui/tools-ui/RoleMappings.d.ts.map +1 -1
- package/dist/src/tui/tools-ui/RoleMappings.js +3 -5
- package/dist/src/tui/tools-ui/RoleMappings.js.map +1 -1
- package/dist/src/tui/tools-ui/ToolsDashboard.d.ts.map +1 -1
- package/dist/src/tui/tools-ui/ToolsDashboard.js +3 -5
- package/dist/src/tui/tools-ui/ToolsDashboard.js.map +1 -1
- package/dist/src/tui/tools-ui/ToolsOverview.d.ts.map +1 -1
- package/dist/src/tui/tools-ui/ToolsOverview.js +3 -5
- package/dist/src/tui/tools-ui/ToolsOverview.js.map +1 -1
- package/dist/src/tui/uninstall-ui/UninstallFlow.d.ts.map +1 -1
- package/dist/src/tui/uninstall-ui/UninstallFlow.js +8 -7
- package/dist/src/tui/uninstall-ui/UninstallFlow.js.map +1 -1
- package/dist/src/types/index.d.ts +48 -6
- package/dist/src/types/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/workflows/knowhow.md +15 -1
- package/workflows/specs-add.md +12 -4
- package/dashboard/dist/assets/ChatPage-BjBibfE4.js +0 -22
- package/dashboard/dist/assets/CollabPage-8lUMUol_.js +0 -1
- package/dashboard/dist/assets/KanbanPage-diY3QmGd.js +0 -21
- package/dashboard/dist/assets/McpPage-COjuIf7U.js +0 -21
- package/dashboard/dist/assets/SpecsPage-BOwBin_o.js +0 -36
- package/dashboard/dist/assets/SupervisorPage-5iRyMU5T.js +0 -6
- package/dashboard/dist/assets/WorkflowPage-CmQaRVgL.js +0 -6
- package/dashboard/dist/assets/en-C_BD3UCD.js +0 -1
- package/dashboard/dist/assets/index-BEUaOz_b.css +0 -1
- package/dashboard/dist/assets/index-uIqUCT8y.js +0 -236
- package/dashboard/dist/assets/table-DCzuJAFh.js +0 -6
- package/dashboard/dist/assets/zh-CN-DvQKfow3.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as S,j as Pe}from"./index-uIqUCT8y.js";const js=S.createContext({});function Ao(t){const e=S.useRef(null);return e.current===null&&(e.current=t()),e.current}const Vo=typeof window<"u",Mo=Vo?S.useLayoutEffect:S.useEffect,Xe=S.createContext(null);function Ye(t,e){t.indexOf(e)===-1&&t.push(e)}function qt(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const J=(t,e,n)=>n>e?e:n<t?t:n;let qe=()=>{};const st={},Ns=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function Us(t){return typeof t=="object"&&t!==null}const Ws=t=>/^0[^.\s]+$/u.test(t);function Ks(t){let e;return()=>(e===void 0&&(e=t()),e)}const G=t=>t,Co=(t,e)=>n=>e(t(n)),Bt=(...t)=>t.reduce(Co),Lt=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s};class Ze{constructor(){this.subscriptions=[]}add(e){return Ye(this.subscriptions,e),()=>qt(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 r=0;r<i;r++){const o=this.subscriptions[r];o&&o(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const W=t=>t*1e3,$=t=>t/1e3;function $s(t,e){return e?t*(1e3/e):0}const Gs=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Do=1e-7,Eo=12;function Ro(t,e,n,s,i){let r,o,a=0;do o=e+(n-e)/2,r=Gs(o,s,i)-t,r>0?n=o:e=o;while(Math.abs(r)>Do&&++a<Eo);return o}function Ot(t,e,n,s){if(t===e&&n===s)return G;const i=r=>Ro(r,0,1,t,n);return r=>r===0||r===1?r:Gs(i(r),e,s)}const Hs=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,zs=t=>e=>1-t(1-e),_s=Ot(.33,1.53,.69,.99),Je=zs(_s),Xs=Hs(Je),Ys=t=>t>=1?1:(t*=2)<1?.5*Je(t):.5*(2-Math.pow(2,-10*(t-1))),Qe=t=>1-Math.sin(Math.acos(t)),qs=zs(Qe),Zs=Hs(Qe),Lo=Ot(.42,0,1,1),ko=Ot(0,0,.58,1),Js=Ot(.42,0,.58,1),Fo=t=>Array.isArray(t)&&typeof t[0]!="number",Qs=t=>Array.isArray(t)&&typeof t[0]=="number",Io={linear:G,easeIn:Lo,easeInOut:Js,easeOut:ko,circIn:Qe,circInOut:Zs,circOut:qs,backIn:Je,backInOut:Xs,backOut:_s,anticipate:Ys},Bo=t=>typeof t=="string",bn=t=>{if(Qs(t)){qe(t.length===4);const[e,n,s,i]=t;return Ot(e,n,s,i)}else if(Bo(t))return Io[t];return t},Ut=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Oo(t,e){let n=new Set,s=new Set,i=!1,r=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(c){o.has(c)&&(u.schedule(c),t()),c(a)}const u={schedule:(c,h=!1,f=!1)=>{const m=f&&i?n:s;return h&&o.add(c),m.add(c),c},cancel:c=>{s.delete(c),o.delete(c)},process:c=>{if(a=c,i){r=!0;return}i=!0;const h=n;n=s,s=h,n.forEach(l),n.clear(),i=!1,r&&(r=!1,u.process(c))}};return u}const jo=40;function ti(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=Ut.reduce((v,w)=>(v[w]=Oo(r),v),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:h,preRender:f,render:d,postRender:m}=o,p=()=>{const v=st.useManualTiming,w=v?i.timestamp:performance.now();n=!1,v||(i.delta=s?1e3/60:Math.max(Math.min(w-i.timestamp,jo),1)),i.timestamp=w,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),h.process(i),f.process(i),d.process(i),m.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(p))},y=()=>{n=!0,s=!0,i.isProcessing||t(p)};return{schedule:Ut.reduce((v,w)=>{const b=o[w];return v[w]=(R,O=!1,A=!1)=>(n||y(),b.schedule(R,O,A)),v},{}),cancel:v=>{for(let w=0;w<Ut.length;w++)o[Ut[w]].cancel(v)},state:i,steps:o}}const{schedule:V,cancel:it,state:I,steps:ae}=ti(typeof requestAnimationFrame<"u"?requestAnimationFrame:G,!0);let Gt;function No(){Gt=void 0}const j={now:()=>(Gt===void 0&&j.set(I.isProcessing||st.useManualTiming?I.timestamp:performance.now()),Gt),set:t=>{Gt=t,queueMicrotask(No)}},ei=t=>e=>typeof e=="string"&&e.startsWith(t),ni=ei("--"),Uo=ei("var(--"),tn=t=>Uo(t)?Wo.test(t.split("/*")[0].trim()):!1,Wo=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function An(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const Pt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},kt={...Pt,transform:t=>J(0,1,t)},Wt={...Pt,default:1},Ct=t=>Math.round(t*1e5)/1e5,en=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Ko(t){return t==null}const $o=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,nn=(t,e)=>n=>!!(typeof n=="string"&&$o.test(n)&&n.startsWith(t)||e&&!Ko(n)&&Object.prototype.hasOwnProperty.call(n,e)),si=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,r,o,a]=s.match(en);return{[t]:parseFloat(i),[e]:parseFloat(r),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},Go=t=>J(0,255,t),le={...Pt,transform:t=>Math.round(Go(t))},ut={test:nn("rgb","red"),parse:si("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+le.transform(t)+", "+le.transform(e)+", "+le.transform(n)+", "+Ct(kt.transform(s))+")"};function Ho(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 be={test:nn("#"),parse:Ho,transform:ut.transform},jt=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),tt=jt("deg"),Z=jt("%"),x=jt("px"),zo=jt("vh"),_o=jt("vw"),Vn={...Z,parse:t=>Z.parse(t)/100,transform:t=>Z.transform(t*100)},gt={test:nn("hsl","hue"),parse:si("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+Z.transform(Ct(e))+", "+Z.transform(Ct(n))+", "+Ct(kt.transform(s))+")"},E={test:t=>ut.test(t)||be.test(t)||gt.test(t),parse:t=>ut.test(t)?ut.parse(t):gt.test(t)?gt.parse(t):be.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?ut.transform(t):gt.transform(t),getAnimatableNone:t=>{const e=E.parse(t);return e.alpha=0,E.transform(e)}},Xo=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Yo(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(en))==null?void 0:e.length)||0)+(((n=t.match(Xo))==null?void 0:n.length)||0)>0}const ii="number",oi="color",qo="var",Zo="var(",Mn="${}",Jo=/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 wt(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let r=0;const a=e.replace(Jo,l=>(E.test(l)?(s.color.push(r),i.push(oi),n.push(E.parse(l))):l.startsWith(Zo)?(s.var.push(r),i.push(qo),n.push(l)):(s.number.push(r),i.push(ii),n.push(parseFloat(l))),++r,Mn)).split(Mn);return{values:n,split:a,indexes:s,types:i}}function Qo(t){return wt(t).values}function ri({split:t,types:e}){const n=t.length;return s=>{let i="";for(let r=0;r<n;r++)if(i+=t[r],s[r]!==void 0){const o=e[r];o===ii?i+=Ct(s[r]):o===oi?i+=E.transform(s[r]):i+=s[r]}return i}}function tr(t){return ri(wt(t))}const er=t=>typeof t=="number"?0:E.test(t)?E.getAnimatableNone(t):t,nr=(t,e)=>typeof t=="number"?e!=null&&e.trim().endsWith("/")?t:0:er(t);function sr(t){const e=wt(t);return ri(e)(e.values.map((s,i)=>nr(s,e.split[i])))}const _={test:Yo,parse:Qo,createTransformer:tr,getAnimatableNone:sr};function ce(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 ir({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,r=0,o=0;if(!e)i=r=o=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=ce(l,a,t+1/3),r=ce(l,a,t),o=ce(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:s}}function Zt(t,e){return n=>n>0?e:t}const M=(t,e,n)=>t+(e-t)*n,ue=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},or=[be,ut,gt],rr=t=>or.find(e=>e.test(t));function Cn(t){const e=rr(t);if(!e)return!1;let n=e.parse(t);return e===gt&&(n=ir(n)),n}const Dn=(t,e)=>{const n=Cn(t),s=Cn(e);if(!n||!s)return Zt(t,e);const i={...n};return r=>(i.red=ue(n.red,s.red,r),i.green=ue(n.green,s.green,r),i.blue=ue(n.blue,s.blue,r),i.alpha=M(n.alpha,s.alpha,r),ut.transform(i))},Ae=new Set(["none","hidden"]);function ar(t,e){return Ae.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function lr(t,e){return n=>M(t,e,n)}function sn(t){return typeof t=="number"?lr:typeof t=="string"?tn(t)?Zt:E.test(t)?Dn:hr:Array.isArray(t)?ai:typeof t=="object"?E.test(t)?Dn:cr:Zt}function ai(t,e){const n=[...t],s=n.length,i=t.map((r,o)=>sn(r)(r,e[o]));return r=>{for(let o=0;o<s;o++)n[o]=i[o](r);return n}}function cr(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=sn(t[i])(t[i],e[i]));return i=>{for(const r in s)n[r]=s[r](i);return n}}function ur(t,e){const n=[],s={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const r=e.types[i],o=t.indexes[r][s[r]],a=t.values[o]??0;n[i]=a,s[r]++}return n}const hr=(t,e)=>{const n=_.createTransformer(e),s=wt(t),i=wt(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?Ae.has(t)&&!i.values.length||Ae.has(e)&&!s.values.length?ar(t,e):Bt(ai(ur(s,i),i.values),n):Zt(t,e)};function li(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?M(t,e,n):sn(t)(t,e)}const fr=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>V.update(e,n),stop:()=>it(e),now:()=>I.isProcessing?I.timestamp:j.now()}},ci=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let r=0;r<i;r++)s+=Math.round(t(r/(i-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},Jt=2e4;function on(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<Jt;)e+=n,s=t.next(e);return e>=Jt?1/0:e}function dr(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(on(s),Jt);return{type:"keyframes",ease:r=>s.next(i*r).value/e,duration:$(i)}}const C={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function Ve(t,e){return t*Math.sqrt(1-e*e)}const mr=12;function pr(t,e,n){let s=n;for(let i=1;i<mr;i++)s=s-t(s)/e(s);return s}const he=.001;function gr({duration:t=C.duration,bounce:e=C.bounce,velocity:n=C.velocity,mass:s=C.mass}){let i,r,o=1-e;o=J(C.minDamping,C.maxDamping,o),t=J(C.minDuration,C.maxDuration,$(t)),o<1?(i=u=>{const c=u*o,h=c*t,f=c-n,d=Ve(u,o),m=Math.exp(-h);return he-f/d*m},r=u=>{const h=u*o*t,f=h*n+n,d=Math.pow(o,2)*Math.pow(u,2)*t,m=Math.exp(-h),p=Ve(Math.pow(u,2),o);return(-i(u)+he>0?-1:1)*((f-d)*m)/p}):(i=u=>{const c=Math.exp(-u*t),h=(u-n)*t+1;return-he+c*h},r=u=>{const c=Math.exp(-u*t),h=(n-u)*(t*t);return c*h});const a=5/t,l=pr(i,r,a);if(t=W(t),isNaN(l))return{stiffness:C.stiffness,damping:C.damping,duration:t};{const u=Math.pow(l,2)*s;return{stiffness:u,damping:o*2*Math.sqrt(s*u),duration:t}}}const yr=["duration","bounce"],vr=["stiffness","damping","mass"];function En(t,e){return e.some(n=>t[n]!==void 0)}function Tr(t){let e={velocity:C.velocity,stiffness:C.stiffness,damping:C.damping,mass:C.mass,isResolvedFromDuration:!1,...t};if(!En(t,vr)&&En(t,yr))if(e.velocity=0,t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,r=2*J(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:C.mass,stiffness:i,damping:r}}else{const n=gr({...t,velocity:0});e={...e,...n,mass:C.mass},e.isResolvedFromDuration=!0}return e}function Qt(t=C.visualDuration,e=C.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:i}=n;const r=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:l,damping:u,mass:c,duration:h,velocity:f,isResolvedFromDuration:d}=Tr({...n,velocity:-$(n.velocity||0)}),m=f||0,p=u/(2*Math.sqrt(l*c)),y=o-r,g=$(Math.sqrt(l/c)),T=Math.abs(y)<5;s||(s=T?C.restSpeed.granular:C.restSpeed.default),i||(i=T?C.restDelta.granular:C.restDelta.default);let v,w,b,R,O,A;if(p<1)b=Ve(g,p),R=(m+p*g*y)/b,v=P=>{const D=Math.exp(-p*g*P);return o-D*(R*Math.sin(b*P)+y*Math.cos(b*P))},O=p*g*R+y*b,A=p*g*y-R*b,w=P=>Math.exp(-p*g*P)*(O*Math.sin(b*P)+A*Math.cos(b*P));else if(p===1){v=D=>o-Math.exp(-g*D)*(y+(m+g*y)*D);const P=m+g*y;w=D=>Math.exp(-g*D)*(g*P*D-m)}else{const P=g*Math.sqrt(p*p-1);v=X=>{const Q=Math.exp(-p*g*X),Y=Math.min(P*X,300);return o-Q*((m+p*g*y)*Math.sinh(Y)+P*y*Math.cosh(Y))/P};const D=(m+p*g*y)/P,U=p*g*D-y*P,rt=p*g*y-D*P;w=X=>{const Q=Math.exp(-p*g*X),Y=Math.min(P*X,300);return Q*(U*Math.sinh(Y)+rt*Math.cosh(Y))}}const k={calculatedDuration:d&&h||null,velocity:P=>W(w(P)),next:P=>{if(!d&&p<1){const U=Math.exp(-p*g*P),rt=Math.sin(b*P),X=Math.cos(b*P),Q=o-U*(R*rt+y*X),Y=W(U*(O*rt+A*X));return a.done=Math.abs(Y)<=s&&Math.abs(o-Q)<=i,a.value=a.done?o:Q,a}const D=v(P);if(d)a.done=P>=h;else{const U=W(w(P));a.done=Math.abs(U)<=s&&Math.abs(o-D)<=i}return a.value=a.done?o:D,a},toString:()=>{const P=Math.min(on(k),Jt),D=ci(U=>k.next(P*U).value,P,30);return P+"ms "+D},toTransition:()=>{}};return k}Qt.applyToOptions=t=>{const e=dr(t,100,Qt);return t.ease=e.ease,t.duration=W(e.duration),t.type="keyframes",t};const xr=5;function ui(t,e,n){const s=Math.max(e-xr,0);return $s(n-t(s),e-s)}function Me({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:c}){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,g=o===void 0?y:o(y);g!==y&&(p=g-h);const T=A=>-p*Math.exp(-A/s),v=A=>g+T(A),w=A=>{const k=T(A),P=v(A);f.done=Math.abs(k)<=u,f.value=f.done?g:P};let b,R;const O=A=>{d(f.value)&&(b=A,R=Qt({keyframes:[f.value,m(f.value)],velocity:ui(v,A,f.value),damping:i,stiffness:r,restDelta:u,restSpeed:c}))};return O(0),{calculatedDuration:null,next:A=>{let k=!1;return!R&&b===void 0&&(k=!0,w(A),O(A)),b!==void 0&&A>=b?R.next(A-b):(!k&&w(A),f)}}}function wr(t,e,n){const s=[],i=n||st.mix||li,r=t.length-1;for(let o=0;o<r;o++){let a=i(t[o],t[o+1]);if(e){const l=Array.isArray(e)?e[o]||G:e;a=Bt(l,a)}s.push(a)}return s}function Sr(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const r=t.length;if(qe(r===e.length),r===1)return()=>e[0];if(r===2&&e[0]===e[1])return()=>e[1];const o=t[0]===t[1];t[0]>t[r-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=wr(e,s,i),l=a.length,u=c=>{if(o&&c<t[0])return e[0];let h=0;if(l>1)for(;h<t.length-2&&!(c<t[h+1]);h++);const f=Lt(t[h],t[h+1],c);return a[h](f)};return n?c=>u(J(t[0],t[r-1],c)):u}function Pr(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=Lt(0,e,s);t.push(M(n,1,i))}}function br(t){const e=[0];return Pr(e,t.length-1),e}function Ar(t,e){return t.map(n=>n*e)}function Vr(t,e){return t.map(()=>e||Js).splice(0,t.length-1)}function Dt({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=Fo(s)?s.map(bn):bn(s),r={done:!1,value:e[0]},o=Ar(n&&n.length===e.length?n:br(e),t),a=Sr(o,e,{ease:Array.isArray(i)?i:Vr(e,i)});return{calculatedDuration:t,next:l=>(r.value=a(l),r.done=l>=t,r)}}const Mr=t=>t!==null;function rn(t,{repeat:e,repeatType:n="loop"},s,i=1){const r=t.filter(Mr),a=i<0||e&&n!=="loop"&&e%2===1?0:r.length-1;return!a||s===void 0?r[a]:s}const Cr={decay:Me,inertia:Me,tween:Dt,keyframes:Dt,spring:Qt};function hi(t){typeof t.type=="string"&&(t.type=Cr[t.type])}class an{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const Dr=t=>t/100;class ln extends an{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var s,i;const{motionValue:n}=this.options;n&&n.updatedAt!==j.now()&&this.tick(j.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(s=this.options).onStop)==null||i.call(s))},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;hi(e);const{type:n=Dt,repeat:s=0,repeatDelay:i=0,repeatType:r,velocity:o=0}=e;let{keyframes:a}=e;const l=n||Dt;l!==Dt&&typeof a[0]!="number"&&(this.mixKeyframes=Bt(Dr,li(a[0],a[1])),a=[0,100]);const u=l({...e,keyframes:a});r==="mirror"&&(this.mirroredGenerator=l({...e,keyframes:[...a].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=on(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=u}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:s,totalDuration:i,mixKeyframes:r,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return s.next(0);const{delay:u=0,keyframes:c,repeat:h,repeatType:f,repeatDelay:d,type:m,onUpdate:p,finalKeyframe:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const g=this.currentTime-u*(this.playbackSpeed>=0?1:-1),T=this.playbackSpeed>=0?g<0:g>i;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let v=this.currentTime,w=s;if(h){const A=Math.min(this.currentTime,i)/a;let k=Math.floor(A),P=A%1;!P&&A>=1&&(P=1),P===1&&k--,k=Math.min(k,h+1),!!(k%2)&&(f==="reverse"?(P=1-P,d&&(P-=d/a)):f==="mirror"&&(w=o)),v=J(0,1,P)*a}const b=T?{done:!1,value:c[0]}:w.next(v);r&&!T&&(b.value=r(b.value));let{done:R}=b;!T&&l!==null&&(R=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const O=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&R);return O&&m!==Me&&(b.value=rn(c,this.options,y,this.speed)),p&&p(b.value),O&&this.finish(),b}then(e,n){return this.finished.then(e,n)}get duration(){return $(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+$(e)}get time(){return $(this.currentTime)}set time(e){e=W(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){const e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);const n=this.generator.next(e).value;return ui(s=>this.generator.next(s).value,e,n)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;n&&this.driver&&this.updateTime(j.now()),this.playbackSpeed=e,n&&this.driver&&(this.time=$(this.currentTime))}play(){var i,r;if(this.isStopped)return;const{driver:e=fr,startTime:n}=this.options;this.driver||(this.driver=e(o=>this.tick(o))),(r=(i=this.options).onPlay)==null||r.call(i);const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=n??s),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(j.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(e=this.options).onComplete)==null||n.call(e)}cancel(){var e,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(e=this.options).onCancel)==null||n.call(e)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),e.observe(this)}}function Er(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const ht=t=>t*180/Math.PI,Ce=t=>{const e=ht(Math.atan2(t[1],t[0]));return De(e)},Rr={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Ce,rotateZ:Ce,skewX:t=>ht(Math.atan(t[1])),skewY:t=>ht(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},De=t=>(t=t%360,t<0&&(t+=360),t),Rn=Ce,Ln=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),kn=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Lr={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Ln,scaleY:kn,scale:t=>(Ln(t)+kn(t))/2,rotateX:t=>De(ht(Math.atan2(t[6],t[5]))),rotateY:t=>De(ht(Math.atan2(-t[2],t[0]))),rotateZ:Rn,rotate:Rn,skewX:t=>ht(Math.atan(t[4])),skewY:t=>ht(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Ee(t){return t.includes("scale")?1:0}function Re(t,e){if(!t||t==="none")return Ee(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=Lr,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Rr,i=a}if(!i)return Ee(e);const r=s[e],o=i[1].split(",").map(Fr);return typeof r=="function"?r(o):o[r]}const kr=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return Re(n,e)};function Fr(t){return parseFloat(t.trim())}const bt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],At=new Set(bt),Fn=t=>t===Pt||t===x,Ir=new Set(["x","y","z"]),Br=bt.filter(t=>!Ir.has(t));function Or(t){const e=[];return Br.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const nt={width:({x:t},{paddingLeft:e="0",paddingRight:n="0",boxSizing:s})=>{const i=t.max-t.min;return s==="border-box"?i:i-parseFloat(e)-parseFloat(n)},height:({y:t},{paddingTop:e="0",paddingBottom:n="0",boxSizing:s})=>{const i=t.max-t.min;return s==="border-box"?i:i-parseFloat(e)-parseFloat(n)},top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>Re(e,"x"),y:(t,{transform:e})=>Re(e,"y")};nt.translateX=nt.x;nt.translateY=nt.y;const ft=new Set;let Le=!1,ke=!1,Fe=!1;function fi(){if(ke){const t=Array.from(ft).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=Or(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(([r,o])=>{var a;(a=s.getValue(r))==null||a.set(o)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}ke=!1,Le=!1,ft.forEach(t=>t.complete(Fe)),ft.clear()}function di(){ft.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(ke=!0)})}function jr(){Fe=!0,di(),fi(),Fe=!1}class cn{constructor(e,n,s,i,r,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=r,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(ft.add(this),Le||(Le=!0,V.read(di),V.resolveKeyframes(fi))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;if(e[0]===null){const r=i==null?void 0:i.get(),o=e[e.length-1];if(r!==void 0)e[0]=r;else if(s&&n){const a=s.readValue(n,o);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=o),i&&r===void 0&&i.set(e[0])}Er(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),ft.delete(this)}cancel(){this.state==="scheduled"&&(ft.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Nr=t=>t.startsWith("--");function mi(t,e,n){Nr(e)?t.style.setProperty(e,n):t.style[e]=n}const Ur={};function pi(t,e){const n=Ks(t);return()=>Ur[e]??n()}const Wr=pi(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),gi=pi(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Mt=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,In={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Mt([0,.65,.55,1]),circOut:Mt([.55,0,1,.45]),backIn:Mt([.31,.01,.66,-.59]),backOut:Mt([.33,1.53,.69,.99])};function yi(t,e){if(t)return typeof t=="function"?gi()?ci(t,e):"ease-out":Qs(t)?Mt(t):Array.isArray(t)?t.map(n=>yi(n,e)||In.easeOut):In[t]}function Kr(t,e,n,{delay:s=0,duration:i=300,repeat:r=0,repeatType:o="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[e]:n};l&&(c.offset=l);const h=yi(a,i);Array.isArray(h)&&(c.easing=h);const f={delay:s,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:r+1,direction:o==="reverse"?"alternate":"normal"};return u&&(f.pseudoElement=u),t.animate(c,f)}function vi(t){return typeof t=="function"&&"applyToOptions"in t}function $r({type:t,...e}){return vi(t)&&gi()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class Ti extends an{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:s,keyframes:i,pseudoElement:r,allowFlatten:o=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=!!r,this.allowFlatten=o,this.options=e,qe(typeof e.type!="string");const u=$r(e);this.animation=Kr(n,s,i,u,r),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const c=rn(i,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(c),mi(n,s,c),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var e,n;(n=(e=this.animation).finish)==null||n.call(e)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,s,i;const e=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(e!=null&&e.isConnected)&&((i=(s=this.animation).commitStyles)==null||i.call(s))}get duration(){var n,s;const e=((s=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:s.call(n).duration)||0;return $(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+$(e)}get time(){return $(Number(this.animation.currentTime)||0)}set time(e){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=W(e),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:n,rangeEnd:s,observe:i}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,e&&Wr()?(this.animation.timeline=e,n&&(this.animation.rangeStart=n),s&&(this.animation.rangeEnd=s),G):i(this)}}const xi={anticipate:Ys,backInOut:Xs,circInOut:Zs};function Gr(t){return t in xi}function Hr(t){typeof t.ease=="string"&&Gr(t.ease)&&(t.ease=xi[t.ease])}const fe=10;class zr extends Ti{constructor(e){Hr(e),hi(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:s,onComplete:i,element:r,...o}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new ln({...o,autoplay:!1}),l=Math.max(fe,j.now()-this.startTime),u=J(0,fe,l-fe),c=a.sample(l).value,{name:h}=this.options;r&&h&&mi(r,h,c),n.setWithVelocity(a.sample(Math.max(0,l-u)).value,c,u),a.stop()}}const Bn=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(_.test(t)||t==="0")&&!t.startsWith("url("));function _r(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 Xr(t,e,n,s){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const r=t[t.length-1],o=Bn(i,e),a=Bn(r,e);return!o||!a?!1:_r(t)||(n==="spring"||vi(n))&&s}function Ie(t){t.duration=0,t.type="keyframes"}const Yr=new Set(["opacity","clipPath","filter","transform"]),qr=Ks(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Zr(t){var c;const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:r,type:o}=t;if(!(((c=e==null?void 0:e.owner)==null?void 0:c.current)instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=e.owner.getProps();return qr()&&n&&Yr.has(n)&&(n!=="transform"||!u)&&!l&&!s&&i!=="mirror"&&r!==0&&o!=="inertia"}const Jr=40;class Qr extends an{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:o="loop",keyframes:a,name:l,motionValue:u,element:c,...h}){var m;super(),this.stop=()=>{var p,y;this._animation&&(this._animation.stop(),(p=this.stopTimeline)==null||p.call(this)),(y=this.keyframeResolver)==null||y.cancel()},this.createdAt=j.now();const f={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:r,repeatType:o,name:l,motionValue:u,element:c,...h},d=(c==null?void 0:c.KeyframeResolver)||cn;this.keyframeResolver=new d(a,(p,y,g)=>this.onKeyframesResolved(p,y,f,!g),l,u,c),(m=this.keyframeResolver)==null||m.scheduleResolve()}onKeyframesResolved(e,n,s,i){var g,T;this.keyframeResolver=void 0;const{name:r,type:o,velocity:a,delay:l,isHandoff:u,onUpdate:c}=s;this.resolvedAt=j.now();let h=!0;Xr(e,r,o,a)||(h=!1,(st.instantAnimations||!l)&&(c==null||c(rn(e,s,n))),e[0]=e[e.length-1],Ie(s),s.repeat=0);const d={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>Jr?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:e},m=h&&!u&&Zr(d),p=(T=(g=d.motionValue)==null?void 0:g.owner)==null?void 0:T.current,y=m?new zr({...d,element:p}):new ln(d);y.finished.then(()=>{this.notifyFinished()}).catch(G),this.pendingTimeline&&(this.stopTimeline=y.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=y}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){var e;return this._animation||((e=this.keyframeResolver)==null||e.resume(),jr()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var e;this._animation&&this.animation.cancel(),(e=this.keyframeResolver)==null||e.cancel()}}function wi(t,e,n,s=0,i=1){const r=Array.from(t).sort((u,c)=>u.sortNodePosition(c)).indexOf(e),o=t.size,a=(o-1)*s;return typeof n=="function"?n(r,o):i===1?r*s:a-r*s}const ta=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function ea(t){const e=ta.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}function Si(t,e,n=1){const[s,i]=ea(t);if(!s)return;const r=window.getComputedStyle(e).getPropertyValue(s);if(r){const o=r.trim();return Ns(o)?parseFloat(o):o}return tn(i)?Si(i,e,n+1):i}const na={type:"spring",stiffness:500,damping:25,restSpeed:10},sa=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),ia={type:"keyframes",duration:.8},oa={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ra=(t,{keyframes:e})=>e.length>2?ia:At.has(t)?t.startsWith("scale")?sa(e[1]):na:oa,aa=t=>t!==null;function la(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(aa),r=e&&n!=="loop"&&e%2===1?0:i.length-1;return i[r]}function Pi(t,e){if(t!=null&&t.inherit&&e){const{inherit:n,...s}=t;return{...e,...s}}return t}function un(t,e){const n=(t==null?void 0:t[e])??(t==null?void 0:t.default)??t;return n!==t?Pi(n,t):n}function ca({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:r,repeatType:o,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const hn=(t,e,n,s={},i,r)=>o=>{const a=un(s,t)||{},l=a.delay||s.delay||0;let{elapsed:u=0}=s;u=u-W(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-u,onUpdate:f=>{e.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:r?void 0:i};ca(a)||Object.assign(c,ra(t,c)),c.duration&&(c.duration=W(c.duration)),c.repeatDelay&&(c.repeatDelay=W(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let h=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(Ie(c),c.delay===0&&(h=!0)),(st.instantAnimations||st.skipAnimations||i!=null&&i.shouldSkipAnimations)&&(h=!0,Ie(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,h&&!r&&e.get()!==void 0){const f=la(c.keyframes,a);if(f!==void 0){V.update(()=>{c.onUpdate(f),c.onComplete()});return}}return a.isSync?new ln(c):new Qr(c)};function On(t){const e=[{},{}];return t==null||t.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function fn(t,e,n,s){if(typeof e=="function"){const[i,r]=On(s);e=e(n!==void 0?n:t.custom,i,r)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,r]=On(s);e=e(n!==void 0?n:t.custom,i,r)}return e}function dt(t,e,n){const s=t.getProps();return fn(s,e,n!==void 0?n:s.custom,t)}const bi=new Set(["width","height","top","left","right","bottom",...bt]),jn=30,ua=t=>!isNaN(parseFloat(t));class ha{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{var r;const i=j.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&((r=this.events.change)==null||r.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=j.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=ua(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 Ze);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){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}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()}dirty(){var e;(e=this.events.change)==null||e.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=j.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>jn)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,jn);return $s(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(){var e,n;(e=this.dependents)==null||e.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function St(t,e){return new ha(t,e)}const Be=t=>Array.isArray(t);function fa(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,St(n))}function da(t){return Be(t)?t[t.length-1]||0:t}function ma(t,e){const n=dt(t,e);let{transitionEnd:s={},transition:i={},...r}=n||{};r={...r,...s};for(const o in r){const a=da(r[o]);fa(t,o,a)}}const B=t=>!!(t&&t.getVelocity);function pa(t){return!!(B(t)&&t.add)}function Oe(t,e){const n=t.getValue("willChange");if(pa(n))return n.add(e);if(!n&&st.WillChange){const s=new st.WillChange("auto");t.addValue("willChange",s),s.add(e)}}function dn(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const ga="framerAppearId",Ai="data-"+dn(ga);function Vi(t){return t.props[Ai]}function ya({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function Mi(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:r,transitionEnd:o,...a}=e;const l=t.getDefaultTransition();r=r?Pi(r,l):l;const u=r==null?void 0:r.reduceMotion;s&&(r=s);const c=[],h=i&&t.animationState&&t.animationState.getState()[i];for(const f in a){const d=t.getValue(f,t.latestValues[f]??null),m=a[f];if(m===void 0||h&&ya(h,f))continue;const p={delay:n,...un(r||{},f)},y=d.get();if(y!==void 0&&!d.isAnimating&&!Array.isArray(m)&&m===y&&!p.velocity)continue;let g=!1;if(window.MotionHandoffAnimation){const w=Vi(t);if(w){const b=window.MotionHandoffAnimation(w,f,V);b!==null&&(p.startTime=b,g=!0)}}Oe(t,f);const T=u??t.shouldReduceMotion;d.start(hn(f,d,m,T&&bi.has(f)?{type:!1}:p,t,g));const v=d.animation;v&&c.push(v)}if(o){const f=()=>V.update(()=>{o&&ma(t,o)});c.length?Promise.all(c).then(f):f()}return c}function je(t,e,n={}){var l;const s=dt(t,e,n.type==="exit"?(l=t.presenceContext)==null?void 0:l.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const r=s?()=>Promise.all(Mi(t,s,n)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:h,staggerDirection:f}=i;return va(t,e,u,c,h,f,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[u,c]=a==="beforeChildren"?[r,o]:[o,r];return u().then(()=>c())}else return Promise.all([r(),o(n.delay)])}function va(t,e,n=0,s=0,i=0,r=1,o){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(je(l,e,{...o,delay:n+(typeof s=="function"?0:s)+wi(t.variantChildren,l,s,i,r)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}function Ta(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(r=>je(t,r,n));s=Promise.all(i)}else if(typeof e=="string")s=je(t,e,n);else{const i=typeof e=="function"?dt(t,e,n.custom):e;s=Promise.all(Mi(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}const xa={test:t=>t==="auto",parse:t=>t},Ci=t=>e=>e.test(t),Di=[Pt,x,Z,tt,_o,zo,xa],Nn=t=>Di.find(Ci(t));function wa(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Ws(t):!0}const Sa=new Set(["brightness","contrast","saturate","opacity"]);function Pa(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(en)||[];if(!s)return t;const i=n.replace(s,"");let r=Sa.has(e)?1:0;return s!==n&&(r*=100),e+"("+r+i+")"}const ba=/\b([a-z-]*)\(.*?\)/gu,Ne={..._,getAnimatableNone:t=>{const e=t.match(ba);return e?e.map(Pa).join(" "):t}},Ue={..._,getAnimatableNone:t=>{const e=_.parse(t);return _.createTransformer(t)(e.map(s=>typeof s=="number"?0:typeof s=="object"?{...s,alpha:1}:s))}},Un={...Pt,transform:Math.round},Aa={rotate:tt,rotateX:tt,rotateY:tt,rotateZ:tt,scale:Wt,scaleX:Wt,scaleY:Wt,scaleZ:Wt,skew:tt,skewX:tt,skewY:tt,distance:x,translateX:x,translateY:x,translateZ:x,x,y:x,z:x,perspective:x,transformPerspective:x,opacity:kt,originX:Vn,originY:Vn,originZ:x},mn={borderWidth:x,borderTopWidth:x,borderRightWidth:x,borderBottomWidth:x,borderLeftWidth:x,borderRadius:x,borderTopLeftRadius:x,borderTopRightRadius:x,borderBottomRightRadius:x,borderBottomLeftRadius:x,width:x,maxWidth:x,height:x,maxHeight:x,top:x,right:x,bottom:x,left:x,inset:x,insetBlock:x,insetBlockStart:x,insetBlockEnd:x,insetInline:x,insetInlineStart:x,insetInlineEnd:x,padding:x,paddingTop:x,paddingRight:x,paddingBottom:x,paddingLeft:x,paddingBlock:x,paddingBlockStart:x,paddingBlockEnd:x,paddingInline:x,paddingInlineStart:x,paddingInlineEnd:x,margin:x,marginTop:x,marginRight:x,marginBottom:x,marginLeft:x,marginBlock:x,marginBlockStart:x,marginBlockEnd:x,marginInline:x,marginInlineStart:x,marginInlineEnd:x,fontSize:x,backgroundPositionX:x,backgroundPositionY:x,...Aa,zIndex:Un,fillOpacity:kt,strokeOpacity:kt,numOctaves:Un},Va={...mn,color:E,backgroundColor:E,outlineColor:E,fill:E,stroke:E,borderColor:E,borderTopColor:E,borderRightColor:E,borderBottomColor:E,borderLeftColor:E,filter:Ne,WebkitFilter:Ne,mask:Ue,WebkitMask:Ue},Ei=t=>Va[t],Ma=new Set([Ne,Ue]);function Ri(t,e){let n=Ei(t);return Ma.has(n)||(n=_),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Ca=new Set(["auto","none","0"]);function Da(t,e,n){let s=0,i;for(;s<t.length&&!i;){const r=t[s];typeof r=="string"&&!Ca.has(r)&&wt(r).values.length&&(i=t[s]),s++}if(i&&n)for(const r of e)t[r]=Ri(n,i)}class Ea extends cn{constructor(e,n,s,i,r){super(e,n,s,i,r,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<e.length;c++){let h=e[c];if(typeof h=="string"&&(h=h.trim(),tn(h))){const f=Si(h,n.current);f!==void 0&&(e[c]=f),c===e.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!bi.has(s)||e.length!==2)return;const[i,r]=e,o=Nn(i),a=Nn(r),l=An(i),u=An(r);if(l!==u&&nt[s]){this.needsMeasurement=!0;return}if(o!==a)if(Fn(o)&&Fn(a))for(let c=0;c<e.length;c++){const h=e[c];typeof h=="string"&&(e[c]=parseFloat(h))}else nt[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)(e[i]===null||wa(e[i]))&&s.push(i);s.length&&Da(e,s,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:s}=this;if(!e||!e.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=nt[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 a;const{element:e,name:n,unresolvedKeyframes:s}=this;if(!e||!e.current)return;const i=e.getValue(n);i&&i.jump(this.measuredOrigin,!1);const r=s.length-1,o=s[r];s[r]=nt[n](e.measureViewportBox(),window.getComputedStyle(e.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,u])=>{e.getValue(l).set(u)}),this.resolveNoneKeyframes()}}const Ra=new Set(["opacity","clipPath","filter","transform"]);function Li(t,e,n){if(t==null)return[];if(t instanceof EventTarget)return[t];if(typeof t=="string"){let s=document;const i=(n==null?void 0:n[t])??s.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t).filter(s=>s!=null)}const ki=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function La(t){return Us(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}const{schedule:pn}=ti(queueMicrotask,!1),z={x:!1,y:!1};function Fi(){return z.x||z.y}function ka(t){return t==="x"||t==="y"?z[t]?null:(z[t]=!0,()=>{z[t]=!1}):z.x||z.y?null:(z.x=z.y=!0,()=>{z.x=z.y=!1})}function Ii(t,e){const n=Li(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}function Fa(t){return!(t.pointerType==="touch"||Fi())}function Ia(t,e,n={}){const[s,i,r]=Ii(t,n);return s.forEach(o=>{let a=!1,l=!1,u;const c=()=>{o.removeEventListener("pointerleave",m)},h=y=>{u&&(u(y),u=void 0),c()},f=y=>{a=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),l&&(l=!1,h(y))},d=()=>{a=!0,window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",f,i)},m=y=>{if(y.pointerType!=="touch"){if(a){l=!0;return}h(y)}},p=y=>{if(!Fa(y))return;l=!1;const g=e(o,y);typeof g=="function"&&(u=g,o.addEventListener("pointerleave",m,i))};o.addEventListener("pointerenter",p,i),o.addEventListener("pointerdown",d,i)}),r}const Bi=(t,e)=>e?t===e?!0:Bi(t,e.parentElement):!1,gn=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,Ba=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Oa(t){return Ba.has(t.tagName)||t.isContentEditable===!0}const ja=new Set(["INPUT","SELECT","TEXTAREA"]);function Na(t){return ja.has(t.tagName)||t.isContentEditable===!0}const Ht=new WeakSet;function Wn(t){return e=>{e.key==="Enter"&&t(e)}}function de(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const Ua=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=Wn(()=>{if(Ht.has(n))return;de(n,"down");const i=Wn(()=>{de(n,"up")}),r=()=>de(n,"cancel");n.addEventListener("keyup",i,e),n.addEventListener("blur",r,e)});n.addEventListener("keydown",s,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),e)};function Kn(t){return gn(t)&&!Fi()}const $n=new WeakSet;function Wa(t,e,n={}){const[s,i,r]=Ii(t,n),o=a=>{const l=a.currentTarget;if(!Kn(a)||$n.has(a))return;Ht.add(l),n.stopPropagation&&$n.add(a);const u=e(l,a),c=(d,m)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",f),Ht.has(l)&&Ht.delete(l),Kn(d)&&typeof u=="function"&&u(d,{success:m})},h=d=>{c(d,l===window||l===document||n.useGlobalTarget||Bi(l,d.target))},f=d=>{c(d,!1)};window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",f,i)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),La(a)&&(a.addEventListener("focus",u=>Ua(u,i)),!Oa(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),r}function yn(t){return Us(t)&&"ownerSVGElement"in t}const zt=new WeakMap;let et;const Oi=(t,e,n)=>(s,i)=>i&&i[0]?i[0][t+"Size"]:yn(s)&&"getBBox"in s?s.getBBox()[e]:s[n],Ka=Oi("inline","width","offsetWidth"),$a=Oi("block","height","offsetHeight");function Ga({target:t,borderBoxSize:e}){var n;(n=zt.get(t))==null||n.forEach(s=>{s(t,{get width(){return Ka(t,e)},get height(){return $a(t,e)}})})}function Ha(t){t.forEach(Ga)}function za(){typeof ResizeObserver>"u"||(et=new ResizeObserver(Ha))}function _a(t,e){et||za();const n=Li(t);return n.forEach(s=>{let i=zt.get(s);i||(i=new Set,zt.set(s,i)),i.add(e),et==null||et.observe(s)}),()=>{n.forEach(s=>{const i=zt.get(s);i==null||i.delete(e),i!=null&&i.size||et==null||et.unobserve(s)})}}const _t=new Set;let yt;function Xa(){yt=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};_t.forEach(e=>e(t))},window.addEventListener("resize",yt)}function Ya(t){return _t.add(t),yt||Xa(),()=>{_t.delete(t),!_t.size&&typeof yt=="function"&&(window.removeEventListener("resize",yt),yt=void 0)}}function Gn(t,e){return typeof t=="function"?Ya(t):_a(t,e)}function qa(t){return yn(t)&&t.tagName==="svg"}const Za=[...Di,E,_],Ja=t=>Za.find(Ci(t)),Hn=()=>({translate:0,scale:1,origin:0,originPoint:0}),vt=()=>({x:Hn(),y:Hn()}),zn=()=>({min:0,max:0}),L=()=>({x:zn(),y:zn()}),Qa=new WeakMap;function ie(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function Ft(t){return typeof t=="string"||Array.isArray(t)}const vn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Tn=["initial",...vn];function oe(t){return ie(t.animate)||Tn.some(e=>Ft(t[e]))}function ji(t){return!!(oe(t)||t.variants)}function tl(t,e,n){for(const s in e){const i=e[s],r=n[s];if(B(i))t.addValue(s,i);else if(B(r))t.addValue(s,St(i,{owner:t}));else if(r!==i)if(t.hasValue(s)){const o=t.getValue(s);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=t.getStaticValue(s);t.addValue(s,St(o!==void 0?o:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const We={current:null},Ni={current:!1},el=typeof window<"u";function nl(){if(Ni.current=!0,!!el)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>We.current=t.matches;t.addEventListener("change",e),e()}else We.current=!1}const _n=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let te={};function Ui(t){te=t}function sl(){return te}class il{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,skipAnimations:r,blockInitialAnimation:o,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=cn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const d=j.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,V.render(this.render,!1,!0))};const{latestValues:u,renderState:c}=a;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=c,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=r,this.options=l,this.blockInitialAnimation=!!o,this.isControllingVariants=oe(n),this.isVariantNode=ji(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:h,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in f){const m=f[d];u[d]!==void 0&&B(m)&&m.set(u[d])}}mount(e){var n,s;if(this.hasBeenMounted)for(const i in this.initialValues)(n=this.values.get(i))==null||n.jump(this.initialValues[i]),this.latestValues[i]=this.initialValues[i];this.current=e,Qa.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((i,r)=>this.bindToMotionValue(r,i)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Ni.current||nl(),this.shouldReduceMotion=We.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(s=this.parent)==null||s.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var e;this.projection&&this.projection.unmount(),it(this.notifyUpdate),it(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(e=this.parent)==null||e.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const s=this.features[n];s&&(s.unmount(),s.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),n.accelerate&&Ra.has(e)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:l,ease:u,duration:c}=n.accelerate,h=new Ti({element:this.current,name:e,keyframes:a,times:l,ease:u,duration:W(c)}),f=o(h);this.valueSubscriptions.set(e,()=>{f(),h.cancel()});return}const s=At.has(e);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&V.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;typeof window<"u"&&window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),r&&r(),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 te){const n=te[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 r=this.features[e];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):L()}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<_n.length;s++){const i=_n[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const r="on"+i,o=e[r];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=tl(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}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=St(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){let s=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return s!=null&&(typeof s=="string"&&(Ns(s)||Ws(s))?s=parseFloat(s):!Ja(s)&&_.test(n)&&(s=Ri(e,n)),this.setBaseTarget(e,B(s)?s.get():s)),B(s)?s.get():s}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var r;const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const o=fn(this.props,n,(r=this.presenceContext)==null?void 0:r.custom);o&&(s=o[e])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!B(i)?i:this.initialValues[e]!==void 0&&s===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new Ze),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){pn.render(this.render)}}class Wi extends il{constructor(){super(...arguments),this.KeyframeResolver=Ea}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){const s=e.style;return s?s[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;B(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class ot{constructor(e){this.isMounted=!1,this.node=e}update(){}}function Ki({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function ol({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function rl(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 me(t){return t===void 0||t===1}function Ke({scale:t,scaleX:e,scaleY:n}){return!me(t)||!me(e)||!me(n)}function ct(t){return Ke(t)||$i(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function $i(t){return Xn(t.x)||Xn(t.y)}function Xn(t){return t&&t!=="0%"}function ee(t,e,n){const s=t-n,i=e*s;return n+i}function Yn(t,e,n,s,i){return i!==void 0&&(t=ee(t,i,s)),ee(t,n,s)+e}function $e(t,e=0,n=1,s,i){t.min=Yn(t.min,e,n,s,i),t.max=Yn(t.max,e,n,s,i)}function Gi(t,{x:e,y:n}){$e(t.x,e.translate,e.scale,e.originPoint),$e(t.y,n.translate,n.scale,n.originPoint)}const qn=.999999999999,Zn=1.0000000000001;function al(t,e,n,s=!1){var a;const i=n.length;if(!i)return;e.x=e.y=1;let r,o;for(let l=0;l<i;l++){r=n[l],o=r.projectionDelta;const{visualElement:u}=r.options;u&&u.props.style&&u.props.style.display==="contents"||(s&&r.options.layoutScroll&&r.scroll&&r!==r.root&&xt(t,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),o&&(e.x*=o.x.scale,e.y*=o.y.scale,Gi(t,o)),s&&ct(r.latestValues)&&xt(t,r.latestValues,(a=r.layout)==null?void 0:a.layoutBox))}e.x<Zn&&e.x>qn&&(e.x=1),e.y<Zn&&e.y>qn&&(e.y=1)}function Tt(t,e){t.min=t.min+e,t.max=t.max+e}function Jn(t,e,n,s,i=.5){const r=M(t.min,t.max,i);$e(t,e,n,r,s)}function Qn(t,e){return typeof t=="string"?parseFloat(t)/100*(e.max-e.min):t}function xt(t,e,n){const s=n??t;Jn(t.x,Qn(e.x,s.x),e.scaleX,e.scale,e.originX),Jn(t.y,Qn(e.y,s.y),e.scaleY,e.scale,e.originY)}function Hi(t,e){return Ki(rl(t.getBoundingClientRect(),e))}function ll(t,e,n){const s=Hi(t,n),{scroll:i}=e;return i&&(Tt(s.x,i.offset.x),Tt(s.y,i.offset.y)),s}const cl={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},ul=bt.length;function hl(t,e,n){let s="",i=!0;for(let r=0;r<ul;r++){const o=bt[r],a=t[o];if(a===void 0)continue;let l=!0;if(typeof a=="number")l=a===(o.startsWith("scale")?1:0);else{const u=parseFloat(a);l=o.startsWith("scale")?u===1:u===0}if(!l||n){const u=ki(a,mn[o]);if(!l){i=!1;const c=cl[o]||o;s+=`${c}(${u}) `}n&&(e[o]=u)}}return s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function xn(t,e,n){const{style:s,vars:i,transformOrigin:r}=t;let o=!1,a=!1;for(const l in e){const u=e[l];if(At.has(l)){o=!0;continue}else if(ni(l)){i[l]=u;continue}else{const c=ki(u,mn[l]);l.startsWith("origin")?(a=!0,r[l]=c):s[l]=c}}if(e.transform||(o||n?s.transform=hl(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:c=0}=r;s.transformOrigin=`${l} ${u} ${c}`}}function zi(t,{style:e,vars:n},s,i){const r=t.style;let o;for(o in e)r[o]=e[o];i==null||i.applyProjectionStyles(r,s);for(o in n)r.setProperty(o,n[o])}function ts(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Vt={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(x.test(t))t=parseFloat(t);else return t;const n=ts(t,e.target.x),s=ts(t,e.target.y);return`${n}% ${s}%`}},fl={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=_.parse(t);if(i.length>5)return s;const r=_.createTransformer(t),o=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+o]/=a,i[1+o]/=l;const u=M(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),r(i)}},Ge={borderRadius:{...Vt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Vt,borderTopRightRadius:Vt,borderBottomLeftRadius:Vt,borderBottomRightRadius:Vt,boxShadow:fl};function _i(t,{layout:e,layoutId:n}){return At.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Ge[t]||t==="opacity")}function wn(t,e,n){var o;const s=t.style,i=e==null?void 0:e.style,r={};if(!s)return r;for(const a in s)(B(s[a])||i&&B(i[a])||_i(a,t)||((o=n==null?void 0:n.getValue(a))==null?void 0:o.liveStyle)!==void 0)&&(r[a]=s[a]);return r}function dl(t){return window.getComputedStyle(t)}class ml extends Wi{constructor(){super(...arguments),this.type="html",this.renderInstance=zi}readValueFromInstance(e,n){var s;if(At.has(n))return(s=this.projection)!=null&&s.isProjecting?Ee(n):kr(e,n);{const i=dl(e),r=(ni(n)?i.getPropertyValue(n):i[n])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Hi(e,n)}build(e,n,s){xn(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return wn(e,n,s)}}const pl={offset:"stroke-dashoffset",array:"stroke-dasharray"},gl={offset:"strokeDashoffset",array:"strokeDasharray"};function yl(t,e,n=1,s=0,i=!0){t.pathLength=1;const r=i?pl:gl;t[r.offset]=`${-s}`,t[r.array]=`${e} ${n}`}const vl=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Xi(t,{attrX:e,attrY:n,attrScale:s,pathLength:i,pathSpacing:r=1,pathOffset:o=0,...a},l,u,c){if(xn(t,a,u),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:f}=t;h.transform&&(f.transform=h.transform,delete h.transform),(f.transform||h.transformOrigin)&&(f.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),f.transform&&(f.transformBox=(c==null?void 0:c.transformBox)??"fill-box",delete h.transformBox);for(const d of vl)h[d]!==void 0&&(f[d]=h[d],delete h[d]);e!==void 0&&(h.x=e),n!==void 0&&(h.y=n),s!==void 0&&(h.scale=s),i!==void 0&&yl(h,i,r,o,!1)}const Yi=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"]),qi=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Tl(t,e,n,s){zi(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(Yi.has(i)?i:dn(i),e.attrs[i])}function Zi(t,e,n){const s=wn(t,e,n);for(const i in t)if(B(t[i])||B(e[i])){const r=bt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[r]=t[i]}return s}class xl extends Wi{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=L}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(At.has(n)){const s=Ei(n);return s&&s.default||0}return n=Yi.has(n)?n:dn(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return Zi(e,n,s)}build(e,n,s){Xi(e,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(e,n,s,i){Tl(e,n,s,i)}mount(e){this.isSVGTag=qi(e.tagName),super.mount(e)}}const wl=Tn.length;function Ji(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?Ji(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<wl;n++){const s=Tn[n],i=t.props[s];(Ft(i)||i===!1)&&(e[s]=i)}return e}function Qi(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}const Sl=[...vn].reverse(),Pl=vn.length;function bl(t){return e=>Promise.all(e.map(({animation:n,options:s})=>Ta(t,n,s)))}function Al(t){let e=bl(t),n=es(),s=!0,i=!1;const r=u=>(c,h)=>{var d;const f=dt(t,h,u==="exit"?(d=t.presenceContext)==null?void 0:d.custom:void 0);if(f){const{transition:m,transitionEnd:p,...y}=f;c={...c,...y,...p}}return c};function o(u){e=u(t)}function a(u){const{props:c}=t,h=Ji(t.parent)||{},f=[],d=new Set;let m={},p=1/0;for(let g=0;g<Pl;g++){const T=Sl[g],v=n[T],w=c[T]!==void 0?c[T]:h[T],b=Ft(w),R=T===u?v.isActive:null;R===!1&&(p=g);let O=w===h[T]&&w!==c[T]&&b;if(O&&(s||i)&&t.manuallyAnimateOnMount&&(O=!1),v.protectedKeys={...m},!v.isActive&&R===null||!w&&!v.prevProp||ie(w)||typeof w=="boolean")continue;if(T==="exit"&&v.isActive&&R!==!0){v.prevResolvedValues&&(m={...m,...v.prevResolvedValues});continue}const A=Vl(v.prevProp,w);let k=A||T===u&&v.isActive&&!O&&b||g>p&&b,P=!1;const D=Array.isArray(w)?w:[w];let U=D.reduce(r(T),{});R===!1&&(U={});const{prevResolvedValues:rt={}}=v,X={...rt,...U},Q=F=>{k=!0,d.has(F)&&(P=!0,d.delete(F)),v.needsAnimating[F]=!0;const K=t.getValue(F);K&&(K.liveStyle=!1)};for(const F in X){const K=U[F],at=rt[F];if(m.hasOwnProperty(F))continue;let mt=!1;Be(K)&&Be(at)?mt=!Qi(K,at):mt=K!==at,mt?K!=null?Q(F):d.add(F):K!==void 0&&d.has(F)?Q(F):v.protectedKeys[F]=!0}v.prevProp=w,v.prevResolvedValues=U,v.isActive&&(m={...m,...U}),(s||i)&&t.blockInitialAnimation&&(k=!1);const Y=O&&A;k&&(!Y||P)&&f.push(...D.map(F=>{const K={type:T};if(typeof F=="string"&&(s||i)&&!Y&&t.manuallyAnimateOnMount&&t.parent){const{parent:at}=t,mt=dt(at,F);if(at.enteringChildren&&mt){const{delayChildren:bo}=mt.transition||{};K.delay=wi(at.enteringChildren,t,bo)}}return{animation:F,options:K}}))}if(d.size){const g={};if(typeof c.initial!="boolean"){const T=dt(t,Array.isArray(c.initial)?c.initial[0]:c.initial);T&&T.transition&&(g.transition=T.transition)}d.forEach(T=>{const v=t.getBaseTarget(T),w=t.getValue(T);w&&(w.liveStyle=!0),g[T]=v??null}),f.push({animation:g})}let y=!!f.length;return s&&(c.initial===!1||c.initial===c.animate)&&!t.manuallyAnimateOnMount&&(y=!1),s=!1,i=!1,y?e(f):Promise.resolve()}function l(u,c){var f;if(n[u].isActive===c)return Promise.resolve();(f=t.variantChildren)==null||f.forEach(d=>{var m;return(m=d.animationState)==null?void 0:m.setActive(u,c)}),n[u].isActive=c;const h=a(u);for(const d in n)n[d].protectedKeys={};return h}return{animateChanges:a,setActive:l,setAnimateFunction:o,getState:()=>n,reset:()=>{n=es(),i=!0}}}function Vl(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Qi(e,t):!1}function lt(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function es(){return{animate:lt(!0),whileInView:lt(),whileHover:lt(),whileTap:lt(),whileDrag:lt(),whileFocus:lt(),exit:lt()}}function He(t,e){t.min=e.min,t.max=e.max}function H(t,e){He(t.x,e.x),He(t.y,e.y)}function ns(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}const to=1e-4,Ml=1-to,Cl=1+to,eo=.01,Dl=0-eo,El=0+eo;function N(t){return t.max-t.min}function Rl(t,e,n){return Math.abs(t-e)<=n}function ss(t,e,n,s=.5){t.origin=s,t.originPoint=M(e.min,e.max,t.origin),t.scale=N(n)/N(e),t.translate=M(n.min,n.max,t.origin)-t.originPoint,(t.scale>=Ml&&t.scale<=Cl||isNaN(t.scale))&&(t.scale=1),(t.translate>=Dl&&t.translate<=El||isNaN(t.translate))&&(t.translate=0)}function Et(t,e,n,s){ss(t.x,e.x,n.x,s?s.originX:void 0),ss(t.y,e.y,n.y,s?s.originY:void 0)}function is(t,e,n){t.min=n.min+e.min,t.max=t.min+N(e)}function Ll(t,e,n){is(t.x,e.x,n.x),is(t.y,e.y,n.y)}function os(t,e,n){t.min=e.min-n.min,t.max=t.min+N(e)}function ne(t,e,n){os(t.x,e.x,n.x),os(t.y,e.y,n.y)}function rs(t,e,n,s,i){return t-=e,t=ee(t,1/n,s),i!==void 0&&(t=ee(t,1/i,s)),t}function kl(t,e=0,n=1,s=.5,i,r=t,o=t){if(Z.test(e)&&(e=parseFloat(e),e=M(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=M(r.min,r.max,s);t===r&&(a-=e),t.min=rs(t.min,e,n,a,i),t.max=rs(t.max,e,n,a,i)}function as(t,e,[n,s,i],r,o){kl(t,e[n],e[s],e[i],e.scale,r,o)}const Fl=["x","scaleX","originX"],Il=["y","scaleY","originY"];function ls(t,e,n,s){as(t.x,e,Fl,n?n.x:void 0,s?s.x:void 0),as(t.y,e,Il,n?n.y:void 0,s?s.y:void 0)}function cs(t){return t.translate===0&&t.scale===1}function no(t){return cs(t.x)&&cs(t.y)}function us(t,e){return t.min===e.min&&t.max===e.max}function Bl(t,e){return us(t.x,e.x)&&us(t.y,e.y)}function hs(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function so(t,e){return hs(t.x,e.x)&&hs(t.y,e.y)}function fs(t){return N(t.x)/N(t.y)}function ds(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function q(t){return[t("x"),t("y")]}function Ol(t,e,n){let s="";const i=t.x.translate/e.x,r=t.y.translate/e.y,o=(n==null?void 0:n.z)||0;if((i||r||o)&&(s=`translate3d(${i}px, ${r}px, ${o}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:h,rotateY:f,skewX:d,skewY:m}=n;u&&(s=`perspective(${u}px) ${s}`),c&&(s+=`rotate(${c}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 io=["TopLeft","TopRight","BottomLeft","BottomRight"],jl=io.length,ms=t=>typeof t=="string"?parseFloat(t):t,ps=t=>typeof t=="number"||x.test(t);function Nl(t,e,n,s,i,r){i?(t.opacity=M(0,n.opacity??1,Ul(s)),t.opacityExit=M(e.opacity??1,0,Wl(s))):r&&(t.opacity=M(e.opacity??1,n.opacity??1,s));for(let o=0;o<jl;o++){const a=`border${io[o]}Radius`;let l=gs(e,a),u=gs(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||ps(l)===ps(u)?(t[a]=Math.max(M(ms(l),ms(u),s),0),(Z.test(u)||Z.test(l))&&(t[a]+="%")):t[a]=u}(e.rotate||n.rotate)&&(t.rotate=M(e.rotate||0,n.rotate||0,s))}function gs(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const Ul=oo(0,.5,qs),Wl=oo(.5,.95,G);function oo(t,e,n){return s=>s<t?0:s>e?1:n(Lt(t,e,s))}function Kl(t,e,n){const s=B(t)?t:St(t);return s.start(hn("",s,e,n)),s.animation}function It(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}const $l=(t,e)=>t.depth-e.depth;class Gl{constructor(){this.children=[],this.isDirty=!1}add(e){Ye(this.children,e),this.isDirty=!0}remove(e){qt(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort($l),this.isDirty=!1,this.children.forEach(e)}}function Hl(t,e){const n=j.now(),s=({timestamp:i})=>{const r=i-n;r>=e&&(it(s),t(r-e))};return V.setup(s,!0),()=>it(s)}function Xt(t){return B(t)?t.get():t}class zl{constructor(){this.members=[]}add(e){Ye(this.members,e);for(let n=this.members.length-1;n>=0;n--){const s=this.members[n];if(s===e||s===this.lead||s===this.prevLead)continue;const i=s.instance;(!i||i.isConnected===!1)&&!s.snapshot&&(qt(this.members,s),s.unmount())}e.scheduleRender()}remove(e){if(qt(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){var n;for(let s=this.members.indexOf(e)-1;s>=0;s--){const i=this.members[s];if(i.isPresent!==!1&&((n=i.instance)==null?void 0:n.isConnected)!==!1)return this.promote(i),!0}return!1}promote(e,n){var i;const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.updateSnapshot(),e.scheduleRender();const{layoutDependency:r}=s.options,{layoutDependency:o}=e.options;(r===void 0||r!==o)&&(e.resumeFrom=s,n&&(s.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),(i=e.root)!=null&&i.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{var n,s,i,r,o;(s=(n=e.options).onExitComplete)==null||s.call(n),(o=(i=e.resumingFrom)==null?void 0:(r=i.options).onExitComplete)==null||o.call(r)})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){var e;(e=this.lead)!=null&&e.snapshot&&(this.lead.snapshot=void 0)}}const Yt={hasAnimatedSinceResize:!0,hasEverUpdated:!1},pe=["","X","Y","Z"],_l=1e3;let Xl=0;function ge(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function ro(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Vi(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:r}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",V,!(i||r))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&ro(s)}function ao({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(o={},a=e==null?void 0:e()){this.id=Xl++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Zl),this.nodes.forEach(ec),this.nodes.forEach(nc),this.nodes.forEach(Jl)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,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 Gl)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new Ze),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=yn(o)&&!qa(o),this.instance=o;const{layoutId:a,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),t){let c,h=0;const f=()=>this.root.updateBlockedByResize=!1;V.read(()=>{h=window.innerWidth}),t(o,()=>{const d=window.innerWidth;d!==h&&(h=d,this.root.updateBlockedByResize=!0,c&&c(),c=Hl(f,250),Yt.hasAnimatedSinceResize&&(Yt.hasAnimatedSinceResize=!1,this.nodes.forEach(Ts)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:h,hasRelativeLayoutChanged:f,layout:d})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||ac,{onLayoutAnimationStart:p,onLayoutAnimationComplete:y}=u.getProps(),g=!this.targetLayout||!so(this.targetLayout,d),T=!h&&f;if(this.options.layoutRoot||this.resumeFrom||T||h&&(g||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const v={...un(m,"layout"),onPlay:p,onComplete:y};(u.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v),this.setAnimationOrigin(c,T)}else h||Ts(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=d})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),it(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(sc),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&ro(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const h=this.path[c];h.shouldResetTransform=!0,(typeof h.latestValues.x=="string"||typeof h.latestValues.y=="string")&&(h.isLayoutDirty=!0),h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(ys);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(vs);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(tc),this.nodes.forEach(Yl),this.nodes.forEach(ql)):this.nodes.forEach(vs),this.clearAllSnapshots();const a=j.now();I.delta=J(0,1e3/60,a-I.timestamp),I.timestamp=a,I.isProcessing=!0,ae.update.process(I),ae.preRender.process(I),ae.render.process(I),I.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,pn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Ql),this.sharedNodes.forEach(ic)}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(),this.snapshot&&!N(this.snapshot.measuredBox.x)&&!N(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}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 o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=L(),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,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const l=s(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!no(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;o&&this.instance&&(a||ct(this.latestValues)||c)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),lc(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:o}=this.options;if(!o)return L();const a=o.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(cc))){const{scroll:c}=this.root;c&&(Tt(a.x,c.offset.x),Tt(a.y,c.offset.y))}return a}removeElementScroll(o){var l;const a=L();if(H(a,o),(l=this.scroll)!=null&&l.wasRoot)return a;for(let u=0;u<this.path.length;u++){const c=this.path[u],{scroll:h,options:f}=c;c!==this.root&&h&&f.layoutScroll&&(h.wasRoot&&H(a,o),Tt(a.x,h.offset.x),Tt(a.y,h.offset.y))}return a}applyTransform(o,a=!1){var u,c;const l=L();H(l,o);for(let h=0;h<this.path.length;h++){const f=this.path[h];!a&&f.options.layoutScroll&&f.scroll&&f!==f.root&&xt(l,{x:-f.scroll.offset.x,y:-f.scroll.offset.y}),ct(f.latestValues)&&xt(l,f.latestValues,(u=f.layout)==null?void 0:u.layoutBox)}return ct(this.latestValues)&&xt(l,this.latestValues,(c=this.layout)==null?void 0:c.layoutBox),l}removeTransform(o){var l;const a=L();H(a,o);for(let u=0;u<this.path.length;u++){const c=this.path[u];if(!ct(c.latestValues))continue;let h;c.instance&&(Ke(c.latestValues)&&c.updateSnapshot(),h=L(),H(h,c.measurePageBox())),ls(a,c.latestValues,(l=c.snapshot)==null?void 0:l.layoutBox,h)}return ct(this.latestValues)&&ls(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.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!==I.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var d;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(o||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(d=this.parent)!=null&&d.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:c,layoutId:h}=this.options;if(!this.layout||!(c||h))return;this.resolvedRelativeTargetAt=I.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=L(),this.targetWithTransforms=L()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Ll(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):H(this.target,this.layout.layoutBox),Gi(this.target,this.targetDelta)):H(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Ke(this.parent.latestValues)||$i(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,a,l){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=L(),this.relativeTargetOrigin=L(),ne(this.relativeTargetOrigin,a,l),H(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var m;const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===I.timestamp&&(l=!1),l)return;const{layout:u,layoutId:c}=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||c))return;H(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,f=this.treeScale.y;al(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=L());const{target:d}=o;if(!d){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(ns(this.prevProjectionDelta.x,this.projectionDelta.x),ns(this.prevProjectionDelta.y,this.projectionDelta.y)),Et(this.projectionDelta,this.layoutCorrected,d,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==f||!ds(this.projectionDelta.x,this.prevProjectionDelta.x)||!ds(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",d))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=vt(),this.projectionDelta=vt(),this.projectionDeltaWithTransform=vt()}setAnimationOrigin(o,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},h=vt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=L(),d=l?l.source:void 0,m=this.layout?this.layout.source:void 0,p=d!==m,y=this.getStack(),g=!y||y.members.length<=1,T=!!(p&&!g&&this.options.crossfade===!0&&!this.path.some(rc));this.animationProgress=0;let v;this.mixTargetDelta=w=>{const b=w/1e3;xs(h.x,o.x,b),xs(h.y,o.y,b),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ne(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),oc(this.relativeTarget,this.relativeTargetOrigin,f,b),v&&Bl(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=L()),H(v,this.relativeTarget)),p&&(this.animationValues=c,Nl(c,u,this.latestValues,b,T,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=b},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,l,u;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(u=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||u.stop(),this.pendingAnimation&&(it(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=V.update(()=>{Yt.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=St(0)),this.motionValue.jump(0,!1),this.currentAnimation=Kl(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:c=>{this.mixTargetDelta(c),o.onUpdate&&o.onUpdate(c)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.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 o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(_l),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=o;if(!(!a||!l||!u)){if(this!==o&&this.layout&&u&&lo(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||L();const h=N(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+h;const f=N(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+f}H(a,l),xt(a,c),Et(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new zl),this.sharedNodes.get(o).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var a;const{layoutId:o}=this.options;return o?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&ge("z",o,u,this.animationValues);for(let c=0;c<pe.length;c++)ge(`rotate${pe[c]}`,o,u,this.animationValues),ge(`skew${pe[c]}`,o,u,this.animationValues);o.render();for(const c in u)o.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=Xt(a==null?void 0:a.pointerEvents)||"",o.transform=l?l(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=Xt(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!ct(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";const c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let h=Ol(this.projectionDeltaWithTransform,this.treeScale,c);l&&(h=l(c,h)),o.transform=h;const{x:f,y:d}=this.projectionDelta;o.transformOrigin=`${f.origin*100}% ${d.origin*100}% 0`,u.animationValues?o.opacity=u===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:o.opacity=u===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(const m in Ge){if(c[m]===void 0)continue;const{correct:p,applyTo:y,isCSSVariable:g}=Ge[m],T=h==="none"?c[m]:p(c[m],u);if(y){const v=y.length;for(let w=0;w<v;w++)o[y[w]]=T}else g?this.options.visualElement.renderState.vars[m]=T:o[m]=T}this.options.layoutId&&(o.pointerEvents=u===this?Xt(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(ys),this.root.sharedNodes.clear()}}}function Yl(t){t.updateLayout()}function ql(t){var n;const e=((n=t.resumeFrom)==null?void 0:n.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:i}=t.layout,{animationType:r}=t.options,o=e.source!==t.layout.source;if(r==="size")q(h=>{const f=o?e.measuredBox[h]:e.layoutBox[h],d=N(f);f.min=s[h].min,f.max=f.min+d});else if(r==="x"||r==="y"){const h=r==="x"?"y":"x";He(o?e.measuredBox[h]:e.layoutBox[h],s[h])}else lo(r,e.layoutBox,s)&&q(h=>{const f=o?e.measuredBox[h]:e.layoutBox[h],d=N(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=vt();Et(a,s,e.layoutBox);const l=vt();o?Et(l,t.applyTransform(i,!0),e.measuredBox):Et(l,s,e.layoutBox);const u=!no(a);let c=!1;if(!t.resumeFrom){const h=t.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:f,layout:d}=h;if(f&&d){const m=L();ne(m,e.layoutBox,f.layoutBox);const p=L();ne(p,s,d.layoutBox),so(m,p)||(c=!0),h.options.layoutRoot&&(t.relativeTarget=p,t.relativeTargetOrigin=m,t.relativeParent=h)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:e,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeLayoutChanged:c})}else if(t.isLead()){const{onExitComplete:s}=t.options;s&&s()}t.options.transition=void 0}function Zl(t){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 Jl(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Ql(t){t.clearSnapshot()}function ys(t){t.clearMeasurements()}function vs(t){t.isLayoutDirty=!1}function tc(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Ts(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function ec(t){t.resolveTargetDelta()}function nc(t){t.calcProjection()}function sc(t){t.resetSkewAndRotation()}function ic(t){t.removeLeadSnapshot()}function xs(t,e,n){t.translate=M(e.translate,0,n),t.scale=M(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function ws(t,e,n,s){t.min=M(e.min,n.min,s),t.max=M(e.max,n.max,s)}function oc(t,e,n,s){ws(t.x,e.x,n.x,s),ws(t.y,e.y,n.y,s)}function rc(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const ac={duration:.45,ease:[.4,0,.1,1]},Ss=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Ps=Ss("applewebkit/")&&!Ss("chrome/")?Math.round:G;function bs(t){t.min=Ps(t.min),t.max=Ps(t.max)}function lc(t){bs(t.x),bs(t.y)}function lo(t,e,n){return t==="position"||t==="preserve-aspect"&&!Rl(fs(e),fs(n),.2)}function cc(t){var e;return t!==t.root&&((e=t.scroll)==null?void 0:e.wasRoot)}const uc=ao({attachResizeListener:(t,e)=>It(t,"resize",e),measureScroll:()=>{var t,e;return{x:document.documentElement.scrollLeft||((t=document.body)==null?void 0:t.scrollLeft)||0,y:document.documentElement.scrollTop||((e=document.body)==null?void 0:e.scrollTop)||0}},checkIsScrollRoot:()=>!0}),ye={current:void 0},co=ao({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!ye.current){const t=new uc({});t.mount(window),t.setOptions({layoutScroll:!0}),ye.current=t}return ye.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),uo=S.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function hc(t=!0){const e=S.useContext(Xe);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=e,r=S.useId();S.useEffect(()=>{if(t)return i(r)},[t]);const o=S.useCallback(()=>t&&s&&s(r),[r,s,t]);return!n&&s?[!1,o]:[!0]}const ho=S.createContext({strict:!1}),As={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"]};let Vs=!1;function fc(){if(Vs)return;const t={};for(const e in As)t[e]={isEnabled:n=>As[e].some(s=>!!n[s])};Ui(t),Vs=!0}function fo(){return fc(),sl()}function dc(t){const e=fo();for(const n in t)e[n]={...e[n],...t[n]};Ui(e)}const mc=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","propagate","ignoreStrict","viewport"]);function se(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||mc.has(t)}let mo=t=>!se(t);function pc(t){typeof t=="function"&&(mo=e=>e.startsWith("on")?!se(e):t(e))}try{pc(require("@emotion/is-prop-valid").default)}catch{}function gc(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||B(t[i])||(mo(i)||n===!0&&se(i)||!e&&!se(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}const re=S.createContext({});function yc(t,e){if(oe(t)){const{initial:n,animate:s}=t;return{initial:n===!1||Ft(n)?n:void 0,animate:Ft(s)?s:void 0}}return t.inherit!==!1?e:{}}function vc(t){const{initial:e,animate:n}=yc(t,S.useContext(re));return S.useMemo(()=>({initial:e,animate:n}),[Ms(e),Ms(n)])}function Ms(t){return Array.isArray(t)?t.join(" "):t}const Sn=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function po(t,e,n){for(const s in e)!B(e[s])&&!_i(s,n)&&(t[s]=e[s])}function Tc({transformTemplate:t},e){return S.useMemo(()=>{const n=Sn();return xn(n,e,t),Object.assign({},n.vars,n.style)},[e])}function xc(t,e){const n=t.style||{},s={};return po(s,n,t),Object.assign(s,Tc(t,e)),s}function wc(t,e){const n={},s=xc(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=s,n}const go=()=>({...Sn(),attrs:{}});function Sc(t,e,n,s){const i=S.useMemo(()=>{const r=go();return Xi(r,e,qi(s),t.transformTemplate,t.style),{...r.attrs,style:{...r.style}}},[e]);if(t.style){const r={};po(r,t.style,t),i.style={...r,...i.style}}return i}const Pc=["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 Pn(t){return typeof t!="string"||t.includes("-")?!1:!!(Pc.indexOf(t)>-1||/[A-Z]/u.test(t))}function bc(t,e,n,{latestValues:s},i,r=!1,o){const l=(o??Pn(t)?Sc:wc)(e,s,i,t),u=gc(e,typeof t=="string",r),c=t!==S.Fragment?{...u,...l,ref:n}:{},{children:h}=e,f=S.useMemo(()=>B(h)?h.get():h,[h]);return S.createElement(t,{...c,children:f})}function Ac({scrapeMotionValuesFromProps:t,createRenderState:e},n,s,i){return{latestValues:Vc(n,s,i,t),renderState:e()}}function Vc(t,e,n,s){const i={},r=s(t,{});for(const f in r)i[f]=Xt(r[f]);let{initial:o,animate:a}=t;const l=oe(t),u=ji(t);e&&u&&!l&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let c=n?n.initial===!1:!1;c=c||o===!1;const h=c?a:o;if(h&&typeof h!="boolean"&&!ie(h)){const f=Array.isArray(h)?h:[h];for(let d=0;d<f.length;d++){const m=fn(t,f[d]);if(m){const{transitionEnd:p,transition:y,...g}=m;for(const T in g){let v=g[T];if(Array.isArray(v)){const w=c?v.length-1:0;v=v[w]}v!==null&&(i[T]=v)}for(const T in p)i[T]=p[T]}}}return i}const yo=t=>(e,n)=>{const s=S.useContext(re),i=S.useContext(Xe),r=()=>Ac(t,e,s,i);return n?r():Ao(r)},Mc=yo({scrapeMotionValuesFromProps:wn,createRenderState:Sn}),Cc=yo({scrapeMotionValuesFromProps:Zi,createRenderState:go}),Dc=Symbol.for("motionComponentSymbol");function Ec(t,e,n){const s=S.useRef(n);S.useInsertionEffect(()=>{s.current=n});const i=S.useRef(null);return S.useCallback(r=>{var a;r&&((a=t.onMount)==null||a.call(t,r));const o=s.current;if(typeof o=="function")if(r){const l=o(r);typeof l=="function"&&(i.current=l)}else i.current?(i.current(),i.current=null):o(r);else o&&(o.current=r);e&&(r?e.mount(r):e.unmount())},[e])}const vo=S.createContext({});function pt(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Rc(t,e,n,s,i,r){var v,w;const{visualElement:o}=S.useContext(re),a=S.useContext(ho),l=S.useContext(Xe),u=S.useContext(uo),c=u.reducedMotion,h=u.skipAnimations,f=S.useRef(null),d=S.useRef(!1);s=s||a.renderer,!f.current&&s&&(f.current=s(t,{visualState:e,parent:o,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c,skipAnimations:h,isSVG:r}),d.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));const m=f.current,p=S.useContext(vo);m&&!m.projection&&i&&(m.type==="html"||m.type==="svg")&&Lc(f.current,n,i,p);const y=S.useRef(!1);S.useInsertionEffect(()=>{m&&y.current&&m.update(n,l)});const g=n[Ai],T=S.useRef(!!g&&typeof window<"u"&&!((v=window.MotionHandoffIsComplete)!=null&&v.call(window,g))&&((w=window.MotionHasOptimisedAnimation)==null?void 0:w.call(window,g)));return Mo(()=>{d.current=!0,m&&(y.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),T.current&&m.animationState&&m.animationState.animateChanges())}),S.useEffect(()=>{m&&(!T.current&&m.animationState&&m.animationState.animateChanges(),T.current&&(queueMicrotask(()=>{var b;(b=window.MotionHandoffMarkAsComplete)==null||b.call(window,g)}),T.current=!1),m.enteringChildren=void 0)}),m}function Lc(t,e,n,s){const{layoutId:i,layout:r,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:To(t.parent)),t.projection.setOptions({layoutId:i,layout:r,alwaysMeasureLayout:!!o||a&&pt(a),visualElement:t,animationType:typeof r=="string"?r:"both",initialPromotionConfig:s,crossfade:c,layoutScroll:l,layoutRoot:u})}function To(t){if(t)return t.options.allowProjection!==!1?t.projection:To(t.parent)}function ve(t,{forwardMotionProps:e=!1,type:n}={},s,i){s&&dc(s);const r=n?n==="svg":Pn(t),o=r?Cc:Mc;function a(u,c){let h;const f={...S.useContext(uo),...u,layoutId:kc(u)},{isStatic:d}=f,m=vc(u),p=o(u,d);if(!d&&typeof window<"u"){Fc();const y=Ic(f);h=y.MeasureLayout,m.visualElement=Rc(t,p,f,i,y.ProjectionNode,r)}return Pe.jsxs(re.Provider,{value:m,children:[h&&m.visualElement?Pe.jsx(h,{visualElement:m.visualElement,...f}):null,bc(t,u,Ec(p,m.visualElement,c),p,d,e,r)]})}a.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const l=S.forwardRef(a);return l[Dc]=t,l}function kc({layoutId:t}){const e=S.useContext(js).id;return e&&t!==void 0?e+"-"+t:t}function Fc(t,e){S.useContext(ho).strict}function Ic(t){const e=fo(),{drag:n,layout:s}=e;if(!n&&!s)return{};const i={...n,...s};return{MeasureLayout:n!=null&&n.isEnabled(t)||s!=null&&s.isEnabled(t)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function Bc(t,e){if(typeof Proxy>"u")return ve;const n=new Map,s=(r,o)=>ve(r,o,t,e),i=(r,o)=>s(r,o);return new Proxy(i,{get:(r,o)=>o==="create"?s:(n.has(o)||n.set(o,ve(o,void 0,t,e)),n.get(o))})}const Oc=(t,e)=>e.isSVG??Pn(t)?new xl(e):new ml(e,{allowProjection:t!==S.Fragment});class jc extends ot{constructor(e){super(e),e.animationState||(e.animationState=Al(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();ie(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.call(this)}}let Nc=0;class Uc extends ot{constructor(){super(...arguments),this.id=Nc++,this.isExitComplete=!1}update(){var r;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;if(e&&s===!1){if(this.isExitComplete){const{initial:o,custom:a}=this.node.getProps();if(typeof o=="string"){const l=dt(this.node,o,a);if(l){const{transition:u,transitionEnd:c,...h}=l;for(const f in h)(r=this.node.getValue(f))==null||r.jump(h[f])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const Wc={animation:{Feature:jc},exit:{Feature:Uc}};function Nt(t){return{point:{x:t.pageX,y:t.pageY}}}const Kc=t=>e=>gn(e)&&t(e,Nt(e));function Rt(t,e,n,s){return It(t,e,Kc(n),s)}const xo=({current:t})=>t?t.ownerDocument.defaultView:null,Cs=(t,e)=>Math.abs(t-e);function $c(t,e){const n=Cs(t.x,e.x),s=Cs(t.y,e.y);return Math.sqrt(n**2+s**2)}const Ds=new Set(["auto","scroll"]);class wo{constructor(e,n,{transformPagePoint:s,contextWindow:i=window,dragSnapToOrigin:r=!1,distanceThreshold:o=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=d=>{this.handleScroll(d.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Kt(this.lastRawMoveEventInfo,this.transformPagePoint));const d=Te(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,p=$c(d.offset,{x:0,y:0})>=this.distanceThreshold;if(!m&&!p)return;const{point:y}=d,{timestamp:g}=I;this.history.push({...y,timestamp:g});const{onStart:T,onMove:v}=this.handlers;m||(T&&T(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,d)},this.handlePointerMove=(d,m)=>{this.lastMoveEvent=d,this.lastRawMoveEventInfo=m,this.lastMoveEventInfo=Kt(m,this.transformPagePoint),V.update(this.updatePoint,!0)},this.handlePointerUp=(d,m)=>{this.end();const{onEnd:p,onSessionEnd:y,resumeAnimation:g}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const T=Te(d.type==="pointercancel"?this.lastMoveEventInfo:Kt(m,this.transformPagePoint),this.history);this.startEvent&&p&&p(d,T),y&&y(d,T)},!gn(e))return;this.dragSnapToOrigin=r,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=o,this.contextWindow=i||window;const l=Nt(e),u=Kt(l,this.transformPagePoint),{point:c}=u,{timestamp:h}=I;this.history=[{...c,timestamp:h}];const{onSessionStart:f}=n;f&&f(e,Te(u,this.history)),this.removeListeners=Bt(Rt(this.contextWindow,"pointermove",this.handlePointerMove),Rt(this.contextWindow,"pointerup",this.handlePointerUp),Rt(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(e){let n=e.parentElement;for(;n;){const s=getComputedStyle(n);(Ds.has(s.overflowX)||Ds.has(s.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){const n=this.scrollPositions.get(e);if(!n)return;const s=e===window,i=s?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},r={x:i.x-n.x,y:i.y-n.y};r.x===0&&r.y===0||(s?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=r.x,this.lastMoveEventInfo.point.y+=r.y):this.history.length>0&&(this.history[0].x-=r.x,this.history[0].y-=r.y),this.scrollPositions.set(e,i),V.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),it(this.updatePoint)}}function Kt(t,e){return e?{point:e(t.point)}:t}function Es(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Te({point:t},e){return{point:t,delta:Es(t,So(e)),offset:Es(t,Gc(e)),velocity:Hc(e,.1)}}function Gc(t){return t[0]}function So(t){return t[t.length-1]}function Hc(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=So(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>W(e)));)n--;if(!s)return{x:0,y:0};s===t[0]&&t.length>2&&i.timestamp-s.timestamp>W(e)*2&&(s=t[1]);const r=$(i.timestamp-s.timestamp);if(r===0)return{x:0,y:0};const o={x:(i.x-s.x)/r,y:(i.y-s.y)/r};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function zc(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?M(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?M(n,t,s.max):Math.min(t,n)),t}function Rs(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 _c(t,{top:e,left:n,bottom:s,right:i}){return{x:Rs(t.x,n,i),y:Rs(t.y,e,s)}}function Ls(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 Xc(t,e){return{x:Ls(t.x,e.x),y:Ls(t.y,e.y)}}function Yc(t,e){let n=.5;const s=N(t),i=N(e);return i>s?n=Lt(e.min,e.max-s,t.min):s>i&&(n=Lt(t.min,t.max-i,e.min)),J(0,1,n)}function qc(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 ze=.35;function Zc(t=ze){return t===!1?t=0:t===!0&&(t=ze),{x:ks(t,"left","right"),y:ks(t,"top","bottom")}}function ks(t,e,n){return{min:Fs(t,e),max:Fs(t,n)}}function Fs(t,e){return typeof t=="number"?t:t[e]||0}const Jc=new WeakMap;class Qc{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=L(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:n=!1,distanceThreshold:s}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const r=h=>{n&&this.snapToCursor(Nt(h).point),this.stopAnimation()},o=(h,f)=>{const{drag:d,dragPropagation:m,onDragStart:p}=this.getProps();if(d&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=ka(d),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),q(g=>{let T=this.getAxisMotionValue(g).get()||0;if(Z.test(T)){const{projection:v}=this.visualElement;if(v&&v.layout){const w=v.layout.layoutBox[g];w&&(T=N(w)*(parseFloat(T)/100))}}this.originPoint[g]=T}),p&&V.update(()=>p(h,f),!1,!0),Oe(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},a=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f;const{dragPropagation:d,dragDirectionLock:m,onDirectionLock:p,onDrag:y}=this.getProps();if(!d&&!this.openDragLock)return;const{offset:g}=f;if(m&&this.currentDirection===null){this.currentDirection=eu(g),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",f.point,g),this.updateAxis("y",f.point,g),this.visualElement.render(),y&&V.update(()=>y(h,f),!1,!0)},l=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f,this.stop(h,f),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>{const{dragSnapToOrigin:h}=this.getProps();(h||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:c}=this.getProps();this.panSession=new wo(e,{onSessionStart:r,onStart:o,onMove:a,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:s,contextWindow:xo(this.visualElement),element:this.visualElement.current})}stop(e,n){const s=e||this.latestPointerEvent,i=n||this.latestPanInfo,r=this.isDragging;if(this.cancel(),!r||!i||!s)return;const{velocity:o}=i;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&V.postRender(()=>a(s,i))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!$t(e,i,this.currentDirection))return;const r=this.getAxisMotionValue(e);let o=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(o=zc(o,this.constraints[e],this.elastic[e])),r.set(o)}resolveConstraints(){var r;const{dragConstraints:e,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(r=this.visualElement.projection)==null?void 0:r.layout,i=this.constraints;e&&pt(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&s?this.constraints=_c(s.layoutBox,e):this.constraints=!1,this.elastic=Zc(n),i!==this.constraints&&!pt(e)&&s&&this.constraints&&!this.hasMutatedConstraints&&q(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=qc(s.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!pt(e))return!1;const s=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const r=ll(s,i.root,this.visualElement.getTransformPagePoint());let o=Xc(i.layout.layoutBox,r);if(n){const a=n(ol(o));this.hasMutatedConstraints=!!a,a&&(o=Ki(a))}return o}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:r,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=q(c=>{if(!$t(c,n,this.currentDirection))return;let h=l&&l[c]||{};(o===!0||o===c)&&(h={min:0,max:0});const f=i?200:1e6,d=i?40:1e7,m={type:"inertia",velocity:s?e[c]:0,bounceStiffness:f,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...r,...h};return this.startAxisValueAnimation(c,m)});return Promise.all(u).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return Oe(this.visualElement,e),s.start(hn(e,s,0,n,this.visualElement,!1))}stopAnimation(){q(e=>this.getAxisMotionValue(e).stop())}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){q(n=>{const{drag:s}=this.getProps();if(!$t(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,r=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n],l=r.get()||0;r.set(e[n]-M(o,a,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!pt(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};q(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=Yc({min:l,max:l},this.constraints[o])}});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.constraints=!1,this.resolveConstraints(),q(o=>{if(!$t(o,e,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(M(l,u,i[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Jc.set(this.visualElement,this);const e=this.visualElement.current,n=Rt(e,"pointerdown",u=>{const{drag:c,dragListener:h=!0}=this.getProps(),f=u.target,d=f!==e&&Na(f);c&&h&&!d&&this.start(u)});let s;const i=()=>{const{dragConstraints:u}=this.getProps();pt(u)&&u.current&&(this.constraints=this.resolveRefConstraints(),s||(s=tu(e,u.current,()=>this.scalePositionWithinConstraints())))},{projection:r}=this.visualElement,o=r.addEventListener("measure",i);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),V.read(i);const a=It(window,"resize",()=>this.scalePositionWithinConstraints()),l=r.addEventListener("didUpdate",(({delta:u,hasLayoutChanged:c})=>{this.isDragging&&c&&(q(h=>{const f=this.getAxisMotionValue(h);f&&(this.originPoint[h]+=u[h].translate,f.set(f.get()+u[h].translate))}),this.visualElement.render())}));return()=>{a(),n(),o(),l&&l(),s&&s()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:r=!1,dragElastic:o=ze,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:r,dragElastic:o,dragMomentum:a}}}function Is(t){let e=!0;return()=>{if(e){e=!1;return}t()}}function tu(t,e,n){const s=Gn(t,Is(n)),i=Gn(e,Is(n));return()=>{s(),i()}}function $t(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function eu(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class nu extends ot{constructor(e){super(e),this.removeGroupControls=G,this.removeListeners=G,this.controls=new Qc(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||G}update(){const{dragControls:e}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};e!==n&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const xe=t=>(e,n)=>{t&&V.update(()=>t(e,n),!1,!0)};class su extends ot{constructor(){super(...arguments),this.removePointerDownListener=G}onPointerDown(e){this.session=new wo(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:xo(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:xe(e),onStart:xe(n),onMove:xe(s),onEnd:(r,o)=>{delete this.session,i&&V.postRender(()=>i(r,o))}}}mount(){this.removePointerDownListener=Rt(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let we=!1;class iu extends S.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:r}=e;r&&(n.group&&n.group.add(r),s&&s.register&&i&&s.register(r),we&&r.root.didUpdate(),r.addEventListener("animationComplete",()=>{this.safeToRemove()}),r.setOptions({...r.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Yt.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:r}=this.props,{projection:o}=s;return o&&(o.isPresent=r,e.layoutDependency!==n&&o.setOptions({...o.options,layoutDependency:n}),we=!0,i||e.layoutDependency!==n||n===void 0||e.isPresent!==r?o.willUpdate():this.safeToRemove(),e.isPresent!==r&&(r?o.promote():o.relegate()||V.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),pn.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;we=!0,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 Po(t){const[e,n]=hc(),s=S.useContext(js);return Pe.jsx(iu,{...t,layoutGroup:s,switchLayoutGroup:S.useContext(vo),isPresent:e,safeToRemove:n})}const ou={pan:{Feature:su},drag:{Feature:nu,ProjectionNode:co,MeasureLayout:Po}};function Bs(t,e,n){const{props:s}=t;t.animationState&&s.whileHover&&t.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,r=s[i];r&&V.postRender(()=>r(e,Nt(e)))}class ru extends ot{mount(){const{current:e}=this.node;e&&(this.unmount=Ia(e,(n,s)=>(Bs(this.node,s,"Start"),i=>Bs(this.node,i,"End"))))}unmount(){}}class au extends ot{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=Bt(It(this.node.current,"focus",()=>this.onFocus()),It(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Os(t,e,n){const{props:s}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&s.whileTap&&t.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),r=s[i];r&&V.postRender(()=>r(e,Nt(e)))}class lu extends ot{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:n,propagate:s}=this.node.props;this.unmount=Wa(e,(i,r)=>(Os(this.node,r,"Start"),(o,{success:a})=>Os(this.node,o,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(s==null?void 0:s.tap)===!1})}unmount(){}}const _e=new WeakMap,Se=new WeakMap,cu=t=>{const e=_e.get(t.target);e&&e(t)},uu=t=>{t.forEach(cu)};function hu({root:t,...e}){const n=t||document;Se.has(n)||Se.set(n,{});const s=Se.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(uu,{root:t,...e})),s[i]}function fu(t,e,n){const s=hu(e);return _e.set(t,n),s.observe(t),()=>{_e.delete(t),s.unobserve(t)}}const du={some:0,all:1};class mu extends ot{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:r}=e,o={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:du[i]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,r&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:h}=this.node.getProps(),f=u?c:h;f&&f(l)};return fu(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(pu(e,n))&&this.startObserver()}unmount(){}}function pu({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const gu={inView:{Feature:mu},tap:{Feature:lu},focus:{Feature:au},hover:{Feature:ru}},yu={layout:{ProjectionNode:co,MeasureLayout:Po}},vu={...Wc,...gu,...ou,...yu},Su=Bc(vu,Oc);export{js as L,uo as M,Xe as P,Ao as a,hc as b,V as f,La as i,Su as m,Mo as u};
|
|
1
|
+
import{r as S,j as Pe}from"./index-DpcPd-UG.js";const js=S.createContext({});function Ao(t){const e=S.useRef(null);return e.current===null&&(e.current=t()),e.current}const Vo=typeof window<"u",Mo=Vo?S.useLayoutEffect:S.useEffect,Xe=S.createContext(null);function Ye(t,e){t.indexOf(e)===-1&&t.push(e)}function qt(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const J=(t,e,n)=>n>e?e:n<t?t:n;let qe=()=>{};const st={},Ns=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function Us(t){return typeof t=="object"&&t!==null}const Ws=t=>/^0[^.\s]+$/u.test(t);function Ks(t){let e;return()=>(e===void 0&&(e=t()),e)}const G=t=>t,Co=(t,e)=>n=>e(t(n)),Bt=(...t)=>t.reduce(Co),Lt=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s};class Ze{constructor(){this.subscriptions=[]}add(e){return Ye(this.subscriptions,e),()=>qt(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 r=0;r<i;r++){const o=this.subscriptions[r];o&&o(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const W=t=>t*1e3,$=t=>t/1e3;function $s(t,e){return e?t*(1e3/e):0}const Gs=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Do=1e-7,Eo=12;function Ro(t,e,n,s,i){let r,o,a=0;do o=e+(n-e)/2,r=Gs(o,s,i)-t,r>0?n=o:e=o;while(Math.abs(r)>Do&&++a<Eo);return o}function Ot(t,e,n,s){if(t===e&&n===s)return G;const i=r=>Ro(r,0,1,t,n);return r=>r===0||r===1?r:Gs(i(r),e,s)}const Hs=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,zs=t=>e=>1-t(1-e),_s=Ot(.33,1.53,.69,.99),Je=zs(_s),Xs=Hs(Je),Ys=t=>t>=1?1:(t*=2)<1?.5*Je(t):.5*(2-Math.pow(2,-10*(t-1))),Qe=t=>1-Math.sin(Math.acos(t)),qs=zs(Qe),Zs=Hs(Qe),Lo=Ot(.42,0,1,1),ko=Ot(0,0,.58,1),Js=Ot(.42,0,.58,1),Fo=t=>Array.isArray(t)&&typeof t[0]!="number",Qs=t=>Array.isArray(t)&&typeof t[0]=="number",Io={linear:G,easeIn:Lo,easeInOut:Js,easeOut:ko,circIn:Qe,circInOut:Zs,circOut:qs,backIn:Je,backInOut:Xs,backOut:_s,anticipate:Ys},Bo=t=>typeof t=="string",bn=t=>{if(Qs(t)){qe(t.length===4);const[e,n,s,i]=t;return Ot(e,n,s,i)}else if(Bo(t))return Io[t];return t},Ut=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Oo(t,e){let n=new Set,s=new Set,i=!1,r=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(c){o.has(c)&&(u.schedule(c),t()),c(a)}const u={schedule:(c,h=!1,f=!1)=>{const m=f&&i?n:s;return h&&o.add(c),m.add(c),c},cancel:c=>{s.delete(c),o.delete(c)},process:c=>{if(a=c,i){r=!0;return}i=!0;const h=n;n=s,s=h,n.forEach(l),n.clear(),i=!1,r&&(r=!1,u.process(c))}};return u}const jo=40;function ti(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=Ut.reduce((v,w)=>(v[w]=Oo(r),v),{}),{setup:a,read:l,resolveKeyframes:u,preUpdate:c,update:h,preRender:f,render:d,postRender:m}=o,p=()=>{const v=st.useManualTiming,w=v?i.timestamp:performance.now();n=!1,v||(i.delta=s?1e3/60:Math.max(Math.min(w-i.timestamp,jo),1)),i.timestamp=w,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),c.process(i),h.process(i),f.process(i),d.process(i),m.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(p))},y=()=>{n=!0,s=!0,i.isProcessing||t(p)};return{schedule:Ut.reduce((v,w)=>{const b=o[w];return v[w]=(R,O=!1,A=!1)=>(n||y(),b.schedule(R,O,A)),v},{}),cancel:v=>{for(let w=0;w<Ut.length;w++)o[Ut[w]].cancel(v)},state:i,steps:o}}const{schedule:V,cancel:it,state:I,steps:ae}=ti(typeof requestAnimationFrame<"u"?requestAnimationFrame:G,!0);let Gt;function No(){Gt=void 0}const j={now:()=>(Gt===void 0&&j.set(I.isProcessing||st.useManualTiming?I.timestamp:performance.now()),Gt),set:t=>{Gt=t,queueMicrotask(No)}},ei=t=>e=>typeof e=="string"&&e.startsWith(t),ni=ei("--"),Uo=ei("var(--"),tn=t=>Uo(t)?Wo.test(t.split("/*")[0].trim()):!1,Wo=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function An(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const Pt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},kt={...Pt,transform:t=>J(0,1,t)},Wt={...Pt,default:1},Ct=t=>Math.round(t*1e5)/1e5,en=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Ko(t){return t==null}const $o=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,nn=(t,e)=>n=>!!(typeof n=="string"&&$o.test(n)&&n.startsWith(t)||e&&!Ko(n)&&Object.prototype.hasOwnProperty.call(n,e)),si=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,r,o,a]=s.match(en);return{[t]:parseFloat(i),[e]:parseFloat(r),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},Go=t=>J(0,255,t),le={...Pt,transform:t=>Math.round(Go(t))},ut={test:nn("rgb","red"),parse:si("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+le.transform(t)+", "+le.transform(e)+", "+le.transform(n)+", "+Ct(kt.transform(s))+")"};function Ho(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 be={test:nn("#"),parse:Ho,transform:ut.transform},jt=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),tt=jt("deg"),Z=jt("%"),x=jt("px"),zo=jt("vh"),_o=jt("vw"),Vn={...Z,parse:t=>Z.parse(t)/100,transform:t=>Z.transform(t*100)},gt={test:nn("hsl","hue"),parse:si("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+Z.transform(Ct(e))+", "+Z.transform(Ct(n))+", "+Ct(kt.transform(s))+")"},E={test:t=>ut.test(t)||be.test(t)||gt.test(t),parse:t=>ut.test(t)?ut.parse(t):gt.test(t)?gt.parse(t):be.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?ut.transform(t):gt.transform(t),getAnimatableNone:t=>{const e=E.parse(t);return e.alpha=0,E.transform(e)}},Xo=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Yo(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(en))==null?void 0:e.length)||0)+(((n=t.match(Xo))==null?void 0:n.length)||0)>0}const ii="number",oi="color",qo="var",Zo="var(",Mn="${}",Jo=/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 wt(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let r=0;const a=e.replace(Jo,l=>(E.test(l)?(s.color.push(r),i.push(oi),n.push(E.parse(l))):l.startsWith(Zo)?(s.var.push(r),i.push(qo),n.push(l)):(s.number.push(r),i.push(ii),n.push(parseFloat(l))),++r,Mn)).split(Mn);return{values:n,split:a,indexes:s,types:i}}function Qo(t){return wt(t).values}function ri({split:t,types:e}){const n=t.length;return s=>{let i="";for(let r=0;r<n;r++)if(i+=t[r],s[r]!==void 0){const o=e[r];o===ii?i+=Ct(s[r]):o===oi?i+=E.transform(s[r]):i+=s[r]}return i}}function tr(t){return ri(wt(t))}const er=t=>typeof t=="number"?0:E.test(t)?E.getAnimatableNone(t):t,nr=(t,e)=>typeof t=="number"?e!=null&&e.trim().endsWith("/")?t:0:er(t);function sr(t){const e=wt(t);return ri(e)(e.values.map((s,i)=>nr(s,e.split[i])))}const _={test:Yo,parse:Qo,createTransformer:tr,getAnimatableNone:sr};function ce(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 ir({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,r=0,o=0;if(!e)i=r=o=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=ce(l,a,t+1/3),r=ce(l,a,t),o=ce(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:s}}function Zt(t,e){return n=>n>0?e:t}const M=(t,e,n)=>t+(e-t)*n,ue=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},or=[be,ut,gt],rr=t=>or.find(e=>e.test(t));function Cn(t){const e=rr(t);if(!e)return!1;let n=e.parse(t);return e===gt&&(n=ir(n)),n}const Dn=(t,e)=>{const n=Cn(t),s=Cn(e);if(!n||!s)return Zt(t,e);const i={...n};return r=>(i.red=ue(n.red,s.red,r),i.green=ue(n.green,s.green,r),i.blue=ue(n.blue,s.blue,r),i.alpha=M(n.alpha,s.alpha,r),ut.transform(i))},Ae=new Set(["none","hidden"]);function ar(t,e){return Ae.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function lr(t,e){return n=>M(t,e,n)}function sn(t){return typeof t=="number"?lr:typeof t=="string"?tn(t)?Zt:E.test(t)?Dn:hr:Array.isArray(t)?ai:typeof t=="object"?E.test(t)?Dn:cr:Zt}function ai(t,e){const n=[...t],s=n.length,i=t.map((r,o)=>sn(r)(r,e[o]));return r=>{for(let o=0;o<s;o++)n[o]=i[o](r);return n}}function cr(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=sn(t[i])(t[i],e[i]));return i=>{for(const r in s)n[r]=s[r](i);return n}}function ur(t,e){const n=[],s={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const r=e.types[i],o=t.indexes[r][s[r]],a=t.values[o]??0;n[i]=a,s[r]++}return n}const hr=(t,e)=>{const n=_.createTransformer(e),s=wt(t),i=wt(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?Ae.has(t)&&!i.values.length||Ae.has(e)&&!s.values.length?ar(t,e):Bt(ai(ur(s,i),i.values),n):Zt(t,e)};function li(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?M(t,e,n):sn(t)(t,e)}const fr=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>V.update(e,n),stop:()=>it(e),now:()=>I.isProcessing?I.timestamp:j.now()}},ci=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let r=0;r<i;r++)s+=Math.round(t(r/(i-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},Jt=2e4;function on(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<Jt;)e+=n,s=t.next(e);return e>=Jt?1/0:e}function dr(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(on(s),Jt);return{type:"keyframes",ease:r=>s.next(i*r).value/e,duration:$(i)}}const C={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function Ve(t,e){return t*Math.sqrt(1-e*e)}const mr=12;function pr(t,e,n){let s=n;for(let i=1;i<mr;i++)s=s-t(s)/e(s);return s}const he=.001;function gr({duration:t=C.duration,bounce:e=C.bounce,velocity:n=C.velocity,mass:s=C.mass}){let i,r,o=1-e;o=J(C.minDamping,C.maxDamping,o),t=J(C.minDuration,C.maxDuration,$(t)),o<1?(i=u=>{const c=u*o,h=c*t,f=c-n,d=Ve(u,o),m=Math.exp(-h);return he-f/d*m},r=u=>{const h=u*o*t,f=h*n+n,d=Math.pow(o,2)*Math.pow(u,2)*t,m=Math.exp(-h),p=Ve(Math.pow(u,2),o);return(-i(u)+he>0?-1:1)*((f-d)*m)/p}):(i=u=>{const c=Math.exp(-u*t),h=(u-n)*t+1;return-he+c*h},r=u=>{const c=Math.exp(-u*t),h=(n-u)*(t*t);return c*h});const a=5/t,l=pr(i,r,a);if(t=W(t),isNaN(l))return{stiffness:C.stiffness,damping:C.damping,duration:t};{const u=Math.pow(l,2)*s;return{stiffness:u,damping:o*2*Math.sqrt(s*u),duration:t}}}const yr=["duration","bounce"],vr=["stiffness","damping","mass"];function En(t,e){return e.some(n=>t[n]!==void 0)}function Tr(t){let e={velocity:C.velocity,stiffness:C.stiffness,damping:C.damping,mass:C.mass,isResolvedFromDuration:!1,...t};if(!En(t,vr)&&En(t,yr))if(e.velocity=0,t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,r=2*J(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:C.mass,stiffness:i,damping:r}}else{const n=gr({...t,velocity:0});e={...e,...n,mass:C.mass},e.isResolvedFromDuration=!0}return e}function Qt(t=C.visualDuration,e=C.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:i}=n;const r=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:l,damping:u,mass:c,duration:h,velocity:f,isResolvedFromDuration:d}=Tr({...n,velocity:-$(n.velocity||0)}),m=f||0,p=u/(2*Math.sqrt(l*c)),y=o-r,g=$(Math.sqrt(l/c)),T=Math.abs(y)<5;s||(s=T?C.restSpeed.granular:C.restSpeed.default),i||(i=T?C.restDelta.granular:C.restDelta.default);let v,w,b,R,O,A;if(p<1)b=Ve(g,p),R=(m+p*g*y)/b,v=P=>{const D=Math.exp(-p*g*P);return o-D*(R*Math.sin(b*P)+y*Math.cos(b*P))},O=p*g*R+y*b,A=p*g*y-R*b,w=P=>Math.exp(-p*g*P)*(O*Math.sin(b*P)+A*Math.cos(b*P));else if(p===1){v=D=>o-Math.exp(-g*D)*(y+(m+g*y)*D);const P=m+g*y;w=D=>Math.exp(-g*D)*(g*P*D-m)}else{const P=g*Math.sqrt(p*p-1);v=X=>{const Q=Math.exp(-p*g*X),Y=Math.min(P*X,300);return o-Q*((m+p*g*y)*Math.sinh(Y)+P*y*Math.cosh(Y))/P};const D=(m+p*g*y)/P,U=p*g*D-y*P,rt=p*g*y-D*P;w=X=>{const Q=Math.exp(-p*g*X),Y=Math.min(P*X,300);return Q*(U*Math.sinh(Y)+rt*Math.cosh(Y))}}const k={calculatedDuration:d&&h||null,velocity:P=>W(w(P)),next:P=>{if(!d&&p<1){const U=Math.exp(-p*g*P),rt=Math.sin(b*P),X=Math.cos(b*P),Q=o-U*(R*rt+y*X),Y=W(U*(O*rt+A*X));return a.done=Math.abs(Y)<=s&&Math.abs(o-Q)<=i,a.value=a.done?o:Q,a}const D=v(P);if(d)a.done=P>=h;else{const U=W(w(P));a.done=Math.abs(U)<=s&&Math.abs(o-D)<=i}return a.value=a.done?o:D,a},toString:()=>{const P=Math.min(on(k),Jt),D=ci(U=>k.next(P*U).value,P,30);return P+"ms "+D},toTransition:()=>{}};return k}Qt.applyToOptions=t=>{const e=dr(t,100,Qt);return t.ease=e.ease,t.duration=W(e.duration),t.type="keyframes",t};const xr=5;function ui(t,e,n){const s=Math.max(e-xr,0);return $s(n-t(s),e-s)}function Me({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:c}){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,g=o===void 0?y:o(y);g!==y&&(p=g-h);const T=A=>-p*Math.exp(-A/s),v=A=>g+T(A),w=A=>{const k=T(A),P=v(A);f.done=Math.abs(k)<=u,f.value=f.done?g:P};let b,R;const O=A=>{d(f.value)&&(b=A,R=Qt({keyframes:[f.value,m(f.value)],velocity:ui(v,A,f.value),damping:i,stiffness:r,restDelta:u,restSpeed:c}))};return O(0),{calculatedDuration:null,next:A=>{let k=!1;return!R&&b===void 0&&(k=!0,w(A),O(A)),b!==void 0&&A>=b?R.next(A-b):(!k&&w(A),f)}}}function wr(t,e,n){const s=[],i=n||st.mix||li,r=t.length-1;for(let o=0;o<r;o++){let a=i(t[o],t[o+1]);if(e){const l=Array.isArray(e)?e[o]||G:e;a=Bt(l,a)}s.push(a)}return s}function Sr(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const r=t.length;if(qe(r===e.length),r===1)return()=>e[0];if(r===2&&e[0]===e[1])return()=>e[1];const o=t[0]===t[1];t[0]>t[r-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=wr(e,s,i),l=a.length,u=c=>{if(o&&c<t[0])return e[0];let h=0;if(l>1)for(;h<t.length-2&&!(c<t[h+1]);h++);const f=Lt(t[h],t[h+1],c);return a[h](f)};return n?c=>u(J(t[0],t[r-1],c)):u}function Pr(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=Lt(0,e,s);t.push(M(n,1,i))}}function br(t){const e=[0];return Pr(e,t.length-1),e}function Ar(t,e){return t.map(n=>n*e)}function Vr(t,e){return t.map(()=>e||Js).splice(0,t.length-1)}function Dt({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=Fo(s)?s.map(bn):bn(s),r={done:!1,value:e[0]},o=Ar(n&&n.length===e.length?n:br(e),t),a=Sr(o,e,{ease:Array.isArray(i)?i:Vr(e,i)});return{calculatedDuration:t,next:l=>(r.value=a(l),r.done=l>=t,r)}}const Mr=t=>t!==null;function rn(t,{repeat:e,repeatType:n="loop"},s,i=1){const r=t.filter(Mr),a=i<0||e&&n!=="loop"&&e%2===1?0:r.length-1;return!a||s===void 0?r[a]:s}const Cr={decay:Me,inertia:Me,tween:Dt,keyframes:Dt,spring:Qt};function hi(t){typeof t.type=="string"&&(t.type=Cr[t.type])}class an{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const Dr=t=>t/100;class ln extends an{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var s,i;const{motionValue:n}=this.options;n&&n.updatedAt!==j.now()&&this.tick(j.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(s=this.options).onStop)==null||i.call(s))},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;hi(e);const{type:n=Dt,repeat:s=0,repeatDelay:i=0,repeatType:r,velocity:o=0}=e;let{keyframes:a}=e;const l=n||Dt;l!==Dt&&typeof a[0]!="number"&&(this.mixKeyframes=Bt(Dr,li(a[0],a[1])),a=[0,100]);const u=l({...e,keyframes:a});r==="mirror"&&(this.mirroredGenerator=l({...e,keyframes:[...a].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=on(u));const{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=u}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:s,totalDuration:i,mixKeyframes:r,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return s.next(0);const{delay:u=0,keyframes:c,repeat:h,repeatType:f,repeatDelay:d,type:m,onUpdate:p,finalKeyframe:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const g=this.currentTime-u*(this.playbackSpeed>=0?1:-1),T=this.playbackSpeed>=0?g<0:g>i;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let v=this.currentTime,w=s;if(h){const A=Math.min(this.currentTime,i)/a;let k=Math.floor(A),P=A%1;!P&&A>=1&&(P=1),P===1&&k--,k=Math.min(k,h+1),!!(k%2)&&(f==="reverse"?(P=1-P,d&&(P-=d/a)):f==="mirror"&&(w=o)),v=J(0,1,P)*a}const b=T?{done:!1,value:c[0]}:w.next(v);r&&!T&&(b.value=r(b.value));let{done:R}=b;!T&&l!==null&&(R=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const O=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&R);return O&&m!==Me&&(b.value=rn(c,this.options,y,this.speed)),p&&p(b.value),O&&this.finish(),b}then(e,n){return this.finished.then(e,n)}get duration(){return $(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+$(e)}get time(){return $(this.currentTime)}set time(e){e=W(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){const e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);const n=this.generator.next(e).value;return ui(s=>this.generator.next(s).value,e,n)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;n&&this.driver&&this.updateTime(j.now()),this.playbackSpeed=e,n&&this.driver&&(this.time=$(this.currentTime))}play(){var i,r;if(this.isStopped)return;const{driver:e=fr,startTime:n}=this.options;this.driver||(this.driver=e(o=>this.tick(o))),(r=(i=this.options).onPlay)==null||r.call(i);const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=n??s),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(j.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(e=this.options).onComplete)==null||n.call(e)}cancel(){var e,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(e=this.options).onCancel)==null||n.call(e)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),e.observe(this)}}function Er(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const ht=t=>t*180/Math.PI,Ce=t=>{const e=ht(Math.atan2(t[1],t[0]));return De(e)},Rr={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Ce,rotateZ:Ce,skewX:t=>ht(Math.atan(t[1])),skewY:t=>ht(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},De=t=>(t=t%360,t<0&&(t+=360),t),Rn=Ce,Ln=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),kn=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Lr={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Ln,scaleY:kn,scale:t=>(Ln(t)+kn(t))/2,rotateX:t=>De(ht(Math.atan2(t[6],t[5]))),rotateY:t=>De(ht(Math.atan2(-t[2],t[0]))),rotateZ:Rn,rotate:Rn,skewX:t=>ht(Math.atan(t[4])),skewY:t=>ht(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Ee(t){return t.includes("scale")?1:0}function Re(t,e){if(!t||t==="none")return Ee(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=Lr,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Rr,i=a}if(!i)return Ee(e);const r=s[e],o=i[1].split(",").map(Fr);return typeof r=="function"?r(o):o[r]}const kr=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return Re(n,e)};function Fr(t){return parseFloat(t.trim())}const bt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],At=new Set(bt),Fn=t=>t===Pt||t===x,Ir=new Set(["x","y","z"]),Br=bt.filter(t=>!Ir.has(t));function Or(t){const e=[];return Br.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const nt={width:({x:t},{paddingLeft:e="0",paddingRight:n="0",boxSizing:s})=>{const i=t.max-t.min;return s==="border-box"?i:i-parseFloat(e)-parseFloat(n)},height:({y:t},{paddingTop:e="0",paddingBottom:n="0",boxSizing:s})=>{const i=t.max-t.min;return s==="border-box"?i:i-parseFloat(e)-parseFloat(n)},top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>Re(e,"x"),y:(t,{transform:e})=>Re(e,"y")};nt.translateX=nt.x;nt.translateY=nt.y;const ft=new Set;let Le=!1,ke=!1,Fe=!1;function fi(){if(ke){const t=Array.from(ft).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=Or(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(([r,o])=>{var a;(a=s.getValue(r))==null||a.set(o)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}ke=!1,Le=!1,ft.forEach(t=>t.complete(Fe)),ft.clear()}function di(){ft.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(ke=!0)})}function jr(){Fe=!0,di(),fi(),Fe=!1}class cn{constructor(e,n,s,i,r,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=r,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(ft.add(this),Le||(Le=!0,V.read(di),V.resolveKeyframes(fi))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;if(e[0]===null){const r=i==null?void 0:i.get(),o=e[e.length-1];if(r!==void 0)e[0]=r;else if(s&&n){const a=s.readValue(n,o);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=o),i&&r===void 0&&i.set(e[0])}Er(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),ft.delete(this)}cancel(){this.state==="scheduled"&&(ft.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Nr=t=>t.startsWith("--");function mi(t,e,n){Nr(e)?t.style.setProperty(e,n):t.style[e]=n}const Ur={};function pi(t,e){const n=Ks(t);return()=>Ur[e]??n()}const Wr=pi(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),gi=pi(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Mt=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,In={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Mt([0,.65,.55,1]),circOut:Mt([.55,0,1,.45]),backIn:Mt([.31,.01,.66,-.59]),backOut:Mt([.33,1.53,.69,.99])};function yi(t,e){if(t)return typeof t=="function"?gi()?ci(t,e):"ease-out":Qs(t)?Mt(t):Array.isArray(t)?t.map(n=>yi(n,e)||In.easeOut):In[t]}function Kr(t,e,n,{delay:s=0,duration:i=300,repeat:r=0,repeatType:o="loop",ease:a="easeOut",times:l}={},u=void 0){const c={[e]:n};l&&(c.offset=l);const h=yi(a,i);Array.isArray(h)&&(c.easing=h);const f={delay:s,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:r+1,direction:o==="reverse"?"alternate":"normal"};return u&&(f.pseudoElement=u),t.animate(c,f)}function vi(t){return typeof t=="function"&&"applyToOptions"in t}function $r({type:t,...e}){return vi(t)&&gi()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class Ti extends an{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:s,keyframes:i,pseudoElement:r,allowFlatten:o=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=!!r,this.allowFlatten=o,this.options=e,qe(typeof e.type!="string");const u=$r(e);this.animation=Kr(n,s,i,u,r),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const c=rn(i,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(c),mi(n,s,c),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var e,n;(n=(e=this.animation).finish)==null||n.call(e)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,s,i;const e=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(e!=null&&e.isConnected)&&((i=(s=this.animation).commitStyles)==null||i.call(s))}get duration(){var n,s;const e=((s=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:s.call(n).duration)||0;return $(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+$(e)}get time(){return $(Number(this.animation.currentTime)||0)}set time(e){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=W(e),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:n,rangeEnd:s,observe:i}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,e&&Wr()?(this.animation.timeline=e,n&&(this.animation.rangeStart=n),s&&(this.animation.rangeEnd=s),G):i(this)}}const xi={anticipate:Ys,backInOut:Xs,circInOut:Zs};function Gr(t){return t in xi}function Hr(t){typeof t.ease=="string"&&Gr(t.ease)&&(t.ease=xi[t.ease])}const fe=10;class zr extends Ti{constructor(e){Hr(e),hi(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:s,onComplete:i,element:r,...o}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new ln({...o,autoplay:!1}),l=Math.max(fe,j.now()-this.startTime),u=J(0,fe,l-fe),c=a.sample(l).value,{name:h}=this.options;r&&h&&mi(r,h,c),n.setWithVelocity(a.sample(Math.max(0,l-u)).value,c,u),a.stop()}}const Bn=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(_.test(t)||t==="0")&&!t.startsWith("url("));function _r(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 Xr(t,e,n,s){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const r=t[t.length-1],o=Bn(i,e),a=Bn(r,e);return!o||!a?!1:_r(t)||(n==="spring"||vi(n))&&s}function Ie(t){t.duration=0,t.type="keyframes"}const Yr=new Set(["opacity","clipPath","filter","transform"]),qr=Ks(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Zr(t){var c;const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:r,type:o}=t;if(!(((c=e==null?void 0:e.owner)==null?void 0:c.current)instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=e.owner.getProps();return qr()&&n&&Yr.has(n)&&(n!=="transform"||!u)&&!l&&!s&&i!=="mirror"&&r!==0&&o!=="inertia"}const Jr=40;class Qr extends an{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:o="loop",keyframes:a,name:l,motionValue:u,element:c,...h}){var m;super(),this.stop=()=>{var p,y;this._animation&&(this._animation.stop(),(p=this.stopTimeline)==null||p.call(this)),(y=this.keyframeResolver)==null||y.cancel()},this.createdAt=j.now();const f={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:r,repeatType:o,name:l,motionValue:u,element:c,...h},d=(c==null?void 0:c.KeyframeResolver)||cn;this.keyframeResolver=new d(a,(p,y,g)=>this.onKeyframesResolved(p,y,f,!g),l,u,c),(m=this.keyframeResolver)==null||m.scheduleResolve()}onKeyframesResolved(e,n,s,i){var g,T;this.keyframeResolver=void 0;const{name:r,type:o,velocity:a,delay:l,isHandoff:u,onUpdate:c}=s;this.resolvedAt=j.now();let h=!0;Xr(e,r,o,a)||(h=!1,(st.instantAnimations||!l)&&(c==null||c(rn(e,s,n))),e[0]=e[e.length-1],Ie(s),s.repeat=0);const d={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>Jr?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:e},m=h&&!u&&Zr(d),p=(T=(g=d.motionValue)==null?void 0:g.owner)==null?void 0:T.current,y=m?new zr({...d,element:p}):new ln(d);y.finished.then(()=>{this.notifyFinished()}).catch(G),this.pendingTimeline&&(this.stopTimeline=y.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=y}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){var e;return this._animation||((e=this.keyframeResolver)==null||e.resume(),jr()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var e;this._animation&&this.animation.cancel(),(e=this.keyframeResolver)==null||e.cancel()}}function wi(t,e,n,s=0,i=1){const r=Array.from(t).sort((u,c)=>u.sortNodePosition(c)).indexOf(e),o=t.size,a=(o-1)*s;return typeof n=="function"?n(r,o):i===1?r*s:a-r*s}const ta=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function ea(t){const e=ta.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}function Si(t,e,n=1){const[s,i]=ea(t);if(!s)return;const r=window.getComputedStyle(e).getPropertyValue(s);if(r){const o=r.trim();return Ns(o)?parseFloat(o):o}return tn(i)?Si(i,e,n+1):i}const na={type:"spring",stiffness:500,damping:25,restSpeed:10},sa=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),ia={type:"keyframes",duration:.8},oa={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ra=(t,{keyframes:e})=>e.length>2?ia:At.has(t)?t.startsWith("scale")?sa(e[1]):na:oa,aa=t=>t!==null;function la(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(aa),r=e&&n!=="loop"&&e%2===1?0:i.length-1;return i[r]}function Pi(t,e){if(t!=null&&t.inherit&&e){const{inherit:n,...s}=t;return{...e,...s}}return t}function un(t,e){const n=(t==null?void 0:t[e])??(t==null?void 0:t.default)??t;return n!==t?Pi(n,t):n}function ca({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:r,repeatType:o,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}const hn=(t,e,n,s={},i,r)=>o=>{const a=un(s,t)||{},l=a.delay||s.delay||0;let{elapsed:u=0}=s;u=u-W(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-u,onUpdate:f=>{e.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:r?void 0:i};ca(a)||Object.assign(c,ra(t,c)),c.duration&&(c.duration=W(c.duration)),c.repeatDelay&&(c.repeatDelay=W(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let h=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(Ie(c),c.delay===0&&(h=!0)),(st.instantAnimations||st.skipAnimations||i!=null&&i.shouldSkipAnimations)&&(h=!0,Ie(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,h&&!r&&e.get()!==void 0){const f=la(c.keyframes,a);if(f!==void 0){V.update(()=>{c.onUpdate(f),c.onComplete()});return}}return a.isSync?new ln(c):new Qr(c)};function On(t){const e=[{},{}];return t==null||t.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function fn(t,e,n,s){if(typeof e=="function"){const[i,r]=On(s);e=e(n!==void 0?n:t.custom,i,r)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,r]=On(s);e=e(n!==void 0?n:t.custom,i,r)}return e}function dt(t,e,n){const s=t.getProps();return fn(s,e,n!==void 0?n:s.custom,t)}const bi=new Set(["width","height","top","left","right","bottom",...bt]),jn=30,ua=t=>!isNaN(parseFloat(t));class ha{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{var r;const i=j.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&((r=this.events.change)==null||r.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=j.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=ua(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 Ze);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){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}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()}dirty(){var e;(e=this.events.change)==null||e.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=j.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>jn)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,jn);return $s(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(){var e,n;(e=this.dependents)==null||e.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function St(t,e){return new ha(t,e)}const Be=t=>Array.isArray(t);function fa(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,St(n))}function da(t){return Be(t)?t[t.length-1]||0:t}function ma(t,e){const n=dt(t,e);let{transitionEnd:s={},transition:i={},...r}=n||{};r={...r,...s};for(const o in r){const a=da(r[o]);fa(t,o,a)}}const B=t=>!!(t&&t.getVelocity);function pa(t){return!!(B(t)&&t.add)}function Oe(t,e){const n=t.getValue("willChange");if(pa(n))return n.add(e);if(!n&&st.WillChange){const s=new st.WillChange("auto");t.addValue("willChange",s),s.add(e)}}function dn(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const ga="framerAppearId",Ai="data-"+dn(ga);function Vi(t){return t.props[Ai]}function ya({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function Mi(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:r,transitionEnd:o,...a}=e;const l=t.getDefaultTransition();r=r?Pi(r,l):l;const u=r==null?void 0:r.reduceMotion;s&&(r=s);const c=[],h=i&&t.animationState&&t.animationState.getState()[i];for(const f in a){const d=t.getValue(f,t.latestValues[f]??null),m=a[f];if(m===void 0||h&&ya(h,f))continue;const p={delay:n,...un(r||{},f)},y=d.get();if(y!==void 0&&!d.isAnimating&&!Array.isArray(m)&&m===y&&!p.velocity)continue;let g=!1;if(window.MotionHandoffAnimation){const w=Vi(t);if(w){const b=window.MotionHandoffAnimation(w,f,V);b!==null&&(p.startTime=b,g=!0)}}Oe(t,f);const T=u??t.shouldReduceMotion;d.start(hn(f,d,m,T&&bi.has(f)?{type:!1}:p,t,g));const v=d.animation;v&&c.push(v)}if(o){const f=()=>V.update(()=>{o&&ma(t,o)});c.length?Promise.all(c).then(f):f()}return c}function je(t,e,n={}){var l;const s=dt(t,e,n.type==="exit"?(l=t.presenceContext)==null?void 0:l.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const r=s?()=>Promise.all(Mi(t,s,n)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:h,staggerDirection:f}=i;return va(t,e,u,c,h,f,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[u,c]=a==="beforeChildren"?[r,o]:[o,r];return u().then(()=>c())}else return Promise.all([r(),o(n.delay)])}function va(t,e,n=0,s=0,i=0,r=1,o){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(je(l,e,{...o,delay:n+(typeof s=="function"?0:s)+wi(t.variantChildren,l,s,i,r)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}function Ta(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(r=>je(t,r,n));s=Promise.all(i)}else if(typeof e=="string")s=je(t,e,n);else{const i=typeof e=="function"?dt(t,e,n.custom):e;s=Promise.all(Mi(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}const xa={test:t=>t==="auto",parse:t=>t},Ci=t=>e=>e.test(t),Di=[Pt,x,Z,tt,_o,zo,xa],Nn=t=>Di.find(Ci(t));function wa(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Ws(t):!0}const Sa=new Set(["brightness","contrast","saturate","opacity"]);function Pa(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(en)||[];if(!s)return t;const i=n.replace(s,"");let r=Sa.has(e)?1:0;return s!==n&&(r*=100),e+"("+r+i+")"}const ba=/\b([a-z-]*)\(.*?\)/gu,Ne={..._,getAnimatableNone:t=>{const e=t.match(ba);return e?e.map(Pa).join(" "):t}},Ue={..._,getAnimatableNone:t=>{const e=_.parse(t);return _.createTransformer(t)(e.map(s=>typeof s=="number"?0:typeof s=="object"?{...s,alpha:1}:s))}},Un={...Pt,transform:Math.round},Aa={rotate:tt,rotateX:tt,rotateY:tt,rotateZ:tt,scale:Wt,scaleX:Wt,scaleY:Wt,scaleZ:Wt,skew:tt,skewX:tt,skewY:tt,distance:x,translateX:x,translateY:x,translateZ:x,x,y:x,z:x,perspective:x,transformPerspective:x,opacity:kt,originX:Vn,originY:Vn,originZ:x},mn={borderWidth:x,borderTopWidth:x,borderRightWidth:x,borderBottomWidth:x,borderLeftWidth:x,borderRadius:x,borderTopLeftRadius:x,borderTopRightRadius:x,borderBottomRightRadius:x,borderBottomLeftRadius:x,width:x,maxWidth:x,height:x,maxHeight:x,top:x,right:x,bottom:x,left:x,inset:x,insetBlock:x,insetBlockStart:x,insetBlockEnd:x,insetInline:x,insetInlineStart:x,insetInlineEnd:x,padding:x,paddingTop:x,paddingRight:x,paddingBottom:x,paddingLeft:x,paddingBlock:x,paddingBlockStart:x,paddingBlockEnd:x,paddingInline:x,paddingInlineStart:x,paddingInlineEnd:x,margin:x,marginTop:x,marginRight:x,marginBottom:x,marginLeft:x,marginBlock:x,marginBlockStart:x,marginBlockEnd:x,marginInline:x,marginInlineStart:x,marginInlineEnd:x,fontSize:x,backgroundPositionX:x,backgroundPositionY:x,...Aa,zIndex:Un,fillOpacity:kt,strokeOpacity:kt,numOctaves:Un},Va={...mn,color:E,backgroundColor:E,outlineColor:E,fill:E,stroke:E,borderColor:E,borderTopColor:E,borderRightColor:E,borderBottomColor:E,borderLeftColor:E,filter:Ne,WebkitFilter:Ne,mask:Ue,WebkitMask:Ue},Ei=t=>Va[t],Ma=new Set([Ne,Ue]);function Ri(t,e){let n=Ei(t);return Ma.has(n)||(n=_),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Ca=new Set(["auto","none","0"]);function Da(t,e,n){let s=0,i;for(;s<t.length&&!i;){const r=t[s];typeof r=="string"&&!Ca.has(r)&&wt(r).values.length&&(i=t[s]),s++}if(i&&n)for(const r of e)t[r]=Ri(n,i)}class Ea extends cn{constructor(e,n,s,i,r){super(e,n,s,i,r,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<e.length;c++){let h=e[c];if(typeof h=="string"&&(h=h.trim(),tn(h))){const f=Si(h,n.current);f!==void 0&&(e[c]=f),c===e.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!bi.has(s)||e.length!==2)return;const[i,r]=e,o=Nn(i),a=Nn(r),l=An(i),u=An(r);if(l!==u&&nt[s]){this.needsMeasurement=!0;return}if(o!==a)if(Fn(o)&&Fn(a))for(let c=0;c<e.length;c++){const h=e[c];typeof h=="string"&&(e[c]=parseFloat(h))}else nt[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)(e[i]===null||wa(e[i]))&&s.push(i);s.length&&Da(e,s,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:s}=this;if(!e||!e.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=nt[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 a;const{element:e,name:n,unresolvedKeyframes:s}=this;if(!e||!e.current)return;const i=e.getValue(n);i&&i.jump(this.measuredOrigin,!1);const r=s.length-1,o=s[r];s[r]=nt[n](e.measureViewportBox(),window.getComputedStyle(e.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,u])=>{e.getValue(l).set(u)}),this.resolveNoneKeyframes()}}const Ra=new Set(["opacity","clipPath","filter","transform"]);function Li(t,e,n){if(t==null)return[];if(t instanceof EventTarget)return[t];if(typeof t=="string"){let s=document;const i=(n==null?void 0:n[t])??s.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t).filter(s=>s!=null)}const ki=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function La(t){return Us(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}const{schedule:pn}=ti(queueMicrotask,!1),z={x:!1,y:!1};function Fi(){return z.x||z.y}function ka(t){return t==="x"||t==="y"?z[t]?null:(z[t]=!0,()=>{z[t]=!1}):z.x||z.y?null:(z.x=z.y=!0,()=>{z.x=z.y=!1})}function Ii(t,e){const n=Li(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}function Fa(t){return!(t.pointerType==="touch"||Fi())}function Ia(t,e,n={}){const[s,i,r]=Ii(t,n);return s.forEach(o=>{let a=!1,l=!1,u;const c=()=>{o.removeEventListener("pointerleave",m)},h=y=>{u&&(u(y),u=void 0),c()},f=y=>{a=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),l&&(l=!1,h(y))},d=()=>{a=!0,window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",f,i)},m=y=>{if(y.pointerType!=="touch"){if(a){l=!0;return}h(y)}},p=y=>{if(!Fa(y))return;l=!1;const g=e(o,y);typeof g=="function"&&(u=g,o.addEventListener("pointerleave",m,i))};o.addEventListener("pointerenter",p,i),o.addEventListener("pointerdown",d,i)}),r}const Bi=(t,e)=>e?t===e?!0:Bi(t,e.parentElement):!1,gn=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,Ba=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Oa(t){return Ba.has(t.tagName)||t.isContentEditable===!0}const ja=new Set(["INPUT","SELECT","TEXTAREA"]);function Na(t){return ja.has(t.tagName)||t.isContentEditable===!0}const Ht=new WeakSet;function Wn(t){return e=>{e.key==="Enter"&&t(e)}}function de(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const Ua=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=Wn(()=>{if(Ht.has(n))return;de(n,"down");const i=Wn(()=>{de(n,"up")}),r=()=>de(n,"cancel");n.addEventListener("keyup",i,e),n.addEventListener("blur",r,e)});n.addEventListener("keydown",s,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),e)};function Kn(t){return gn(t)&&!Fi()}const $n=new WeakSet;function Wa(t,e,n={}){const[s,i,r]=Ii(t,n),o=a=>{const l=a.currentTarget;if(!Kn(a)||$n.has(a))return;Ht.add(l),n.stopPropagation&&$n.add(a);const u=e(l,a),c=(d,m)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",f),Ht.has(l)&&Ht.delete(l),Kn(d)&&typeof u=="function"&&u(d,{success:m})},h=d=>{c(d,l===window||l===document||n.useGlobalTarget||Bi(l,d.target))},f=d=>{c(d,!1)};window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",f,i)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),La(a)&&(a.addEventListener("focus",u=>Ua(u,i)),!Oa(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),r}function yn(t){return Us(t)&&"ownerSVGElement"in t}const zt=new WeakMap;let et;const Oi=(t,e,n)=>(s,i)=>i&&i[0]?i[0][t+"Size"]:yn(s)&&"getBBox"in s?s.getBBox()[e]:s[n],Ka=Oi("inline","width","offsetWidth"),$a=Oi("block","height","offsetHeight");function Ga({target:t,borderBoxSize:e}){var n;(n=zt.get(t))==null||n.forEach(s=>{s(t,{get width(){return Ka(t,e)},get height(){return $a(t,e)}})})}function Ha(t){t.forEach(Ga)}function za(){typeof ResizeObserver>"u"||(et=new ResizeObserver(Ha))}function _a(t,e){et||za();const n=Li(t);return n.forEach(s=>{let i=zt.get(s);i||(i=new Set,zt.set(s,i)),i.add(e),et==null||et.observe(s)}),()=>{n.forEach(s=>{const i=zt.get(s);i==null||i.delete(e),i!=null&&i.size||et==null||et.unobserve(s)})}}const _t=new Set;let yt;function Xa(){yt=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};_t.forEach(e=>e(t))},window.addEventListener("resize",yt)}function Ya(t){return _t.add(t),yt||Xa(),()=>{_t.delete(t),!_t.size&&typeof yt=="function"&&(window.removeEventListener("resize",yt),yt=void 0)}}function Gn(t,e){return typeof t=="function"?Ya(t):_a(t,e)}function qa(t){return yn(t)&&t.tagName==="svg"}const Za=[...Di,E,_],Ja=t=>Za.find(Ci(t)),Hn=()=>({translate:0,scale:1,origin:0,originPoint:0}),vt=()=>({x:Hn(),y:Hn()}),zn=()=>({min:0,max:0}),L=()=>({x:zn(),y:zn()}),Qa=new WeakMap;function ie(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function Ft(t){return typeof t=="string"||Array.isArray(t)}const vn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Tn=["initial",...vn];function oe(t){return ie(t.animate)||Tn.some(e=>Ft(t[e]))}function ji(t){return!!(oe(t)||t.variants)}function tl(t,e,n){for(const s in e){const i=e[s],r=n[s];if(B(i))t.addValue(s,i);else if(B(r))t.addValue(s,St(i,{owner:t}));else if(r!==i)if(t.hasValue(s)){const o=t.getValue(s);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=t.getStaticValue(s);t.addValue(s,St(o!==void 0?o:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const We={current:null},Ni={current:!1},el=typeof window<"u";function nl(){if(Ni.current=!0,!!el)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>We.current=t.matches;t.addEventListener("change",e),e()}else We.current=!1}const _n=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let te={};function Ui(t){te=t}function sl(){return te}class il{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,skipAnimations:r,blockInitialAnimation:o,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=cn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const d=j.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,V.render(this.render,!1,!0))};const{latestValues:u,renderState:c}=a;this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=c,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=r,this.options=l,this.blockInitialAnimation=!!o,this.isControllingVariants=oe(n),this.isVariantNode=ji(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:h,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in f){const m=f[d];u[d]!==void 0&&B(m)&&m.set(u[d])}}mount(e){var n,s;if(this.hasBeenMounted)for(const i in this.initialValues)(n=this.values.get(i))==null||n.jump(this.initialValues[i]),this.latestValues[i]=this.initialValues[i];this.current=e,Qa.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((i,r)=>this.bindToMotionValue(r,i)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Ni.current||nl(),this.shouldReduceMotion=We.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(s=this.parent)==null||s.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var e;this.projection&&this.projection.unmount(),it(this.notifyUpdate),it(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(e=this.parent)==null||e.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const s=this.features[n];s&&(s.unmount(),s.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),n.accelerate&&Ra.has(e)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:l,ease:u,duration:c}=n.accelerate,h=new Ti({element:this.current,name:e,keyframes:a,times:l,ease:u,duration:W(c)}),f=o(h);this.valueSubscriptions.set(e,()=>{f(),h.cancel()});return}const s=At.has(e);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&V.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;typeof window<"u"&&window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),r&&r(),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 te){const n=te[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 r=this.features[e];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):L()}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<_n.length;s++){const i=_n[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const r="on"+i,o=e[r];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=tl(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}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=St(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){let s=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return s!=null&&(typeof s=="string"&&(Ns(s)||Ws(s))?s=parseFloat(s):!Ja(s)&&_.test(n)&&(s=Ri(e,n)),this.setBaseTarget(e,B(s)?s.get():s)),B(s)?s.get():s}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var r;const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const o=fn(this.props,n,(r=this.presenceContext)==null?void 0:r.custom);o&&(s=o[e])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!B(i)?i:this.initialValues[e]!==void 0&&s===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new Ze),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){pn.render(this.render)}}class Wi extends il{constructor(){super(...arguments),this.KeyframeResolver=Ea}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){const s=e.style;return s?s[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;B(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class ot{constructor(e){this.isMounted=!1,this.node=e}update(){}}function Ki({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function ol({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function rl(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 me(t){return t===void 0||t===1}function Ke({scale:t,scaleX:e,scaleY:n}){return!me(t)||!me(e)||!me(n)}function ct(t){return Ke(t)||$i(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function $i(t){return Xn(t.x)||Xn(t.y)}function Xn(t){return t&&t!=="0%"}function ee(t,e,n){const s=t-n,i=e*s;return n+i}function Yn(t,e,n,s,i){return i!==void 0&&(t=ee(t,i,s)),ee(t,n,s)+e}function $e(t,e=0,n=1,s,i){t.min=Yn(t.min,e,n,s,i),t.max=Yn(t.max,e,n,s,i)}function Gi(t,{x:e,y:n}){$e(t.x,e.translate,e.scale,e.originPoint),$e(t.y,n.translate,n.scale,n.originPoint)}const qn=.999999999999,Zn=1.0000000000001;function al(t,e,n,s=!1){var a;const i=n.length;if(!i)return;e.x=e.y=1;let r,o;for(let l=0;l<i;l++){r=n[l],o=r.projectionDelta;const{visualElement:u}=r.options;u&&u.props.style&&u.props.style.display==="contents"||(s&&r.options.layoutScroll&&r.scroll&&r!==r.root&&xt(t,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),o&&(e.x*=o.x.scale,e.y*=o.y.scale,Gi(t,o)),s&&ct(r.latestValues)&&xt(t,r.latestValues,(a=r.layout)==null?void 0:a.layoutBox))}e.x<Zn&&e.x>qn&&(e.x=1),e.y<Zn&&e.y>qn&&(e.y=1)}function Tt(t,e){t.min=t.min+e,t.max=t.max+e}function Jn(t,e,n,s,i=.5){const r=M(t.min,t.max,i);$e(t,e,n,r,s)}function Qn(t,e){return typeof t=="string"?parseFloat(t)/100*(e.max-e.min):t}function xt(t,e,n){const s=n??t;Jn(t.x,Qn(e.x,s.x),e.scaleX,e.scale,e.originX),Jn(t.y,Qn(e.y,s.y),e.scaleY,e.scale,e.originY)}function Hi(t,e){return Ki(rl(t.getBoundingClientRect(),e))}function ll(t,e,n){const s=Hi(t,n),{scroll:i}=e;return i&&(Tt(s.x,i.offset.x),Tt(s.y,i.offset.y)),s}const cl={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},ul=bt.length;function hl(t,e,n){let s="",i=!0;for(let r=0;r<ul;r++){const o=bt[r],a=t[o];if(a===void 0)continue;let l=!0;if(typeof a=="number")l=a===(o.startsWith("scale")?1:0);else{const u=parseFloat(a);l=o.startsWith("scale")?u===1:u===0}if(!l||n){const u=ki(a,mn[o]);if(!l){i=!1;const c=cl[o]||o;s+=`${c}(${u}) `}n&&(e[o]=u)}}return s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function xn(t,e,n){const{style:s,vars:i,transformOrigin:r}=t;let o=!1,a=!1;for(const l in e){const u=e[l];if(At.has(l)){o=!0;continue}else if(ni(l)){i[l]=u;continue}else{const c=ki(u,mn[l]);l.startsWith("origin")?(a=!0,r[l]=c):s[l]=c}}if(e.transform||(o||n?s.transform=hl(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:l="50%",originY:u="50%",originZ:c=0}=r;s.transformOrigin=`${l} ${u} ${c}`}}function zi(t,{style:e,vars:n},s,i){const r=t.style;let o;for(o in e)r[o]=e[o];i==null||i.applyProjectionStyles(r,s);for(o in n)r.setProperty(o,n[o])}function ts(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Vt={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(x.test(t))t=parseFloat(t);else return t;const n=ts(t,e.target.x),s=ts(t,e.target.y);return`${n}% ${s}%`}},fl={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=_.parse(t);if(i.length>5)return s;const r=_.createTransformer(t),o=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+o]/=a,i[1+o]/=l;const u=M(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),r(i)}},Ge={borderRadius:{...Vt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Vt,borderTopRightRadius:Vt,borderBottomLeftRadius:Vt,borderBottomRightRadius:Vt,boxShadow:fl};function _i(t,{layout:e,layoutId:n}){return At.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Ge[t]||t==="opacity")}function wn(t,e,n){var o;const s=t.style,i=e==null?void 0:e.style,r={};if(!s)return r;for(const a in s)(B(s[a])||i&&B(i[a])||_i(a,t)||((o=n==null?void 0:n.getValue(a))==null?void 0:o.liveStyle)!==void 0)&&(r[a]=s[a]);return r}function dl(t){return window.getComputedStyle(t)}class ml extends Wi{constructor(){super(...arguments),this.type="html",this.renderInstance=zi}readValueFromInstance(e,n){var s;if(At.has(n))return(s=this.projection)!=null&&s.isProjecting?Ee(n):kr(e,n);{const i=dl(e),r=(ni(n)?i.getPropertyValue(n):i[n])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Hi(e,n)}build(e,n,s){xn(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return wn(e,n,s)}}const pl={offset:"stroke-dashoffset",array:"stroke-dasharray"},gl={offset:"strokeDashoffset",array:"strokeDasharray"};function yl(t,e,n=1,s=0,i=!0){t.pathLength=1;const r=i?pl:gl;t[r.offset]=`${-s}`,t[r.array]=`${e} ${n}`}const vl=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Xi(t,{attrX:e,attrY:n,attrScale:s,pathLength:i,pathSpacing:r=1,pathOffset:o=0,...a},l,u,c){if(xn(t,a,u),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:f}=t;h.transform&&(f.transform=h.transform,delete h.transform),(f.transform||h.transformOrigin)&&(f.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),f.transform&&(f.transformBox=(c==null?void 0:c.transformBox)??"fill-box",delete h.transformBox);for(const d of vl)h[d]!==void 0&&(f[d]=h[d],delete h[d]);e!==void 0&&(h.x=e),n!==void 0&&(h.y=n),s!==void 0&&(h.scale=s),i!==void 0&&yl(h,i,r,o,!1)}const Yi=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"]),qi=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Tl(t,e,n,s){zi(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(Yi.has(i)?i:dn(i),e.attrs[i])}function Zi(t,e,n){const s=wn(t,e,n);for(const i in t)if(B(t[i])||B(e[i])){const r=bt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[r]=t[i]}return s}class xl extends Wi{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=L}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(At.has(n)){const s=Ei(n);return s&&s.default||0}return n=Yi.has(n)?n:dn(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return Zi(e,n,s)}build(e,n,s){Xi(e,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(e,n,s,i){Tl(e,n,s,i)}mount(e){this.isSVGTag=qi(e.tagName),super.mount(e)}}const wl=Tn.length;function Ji(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?Ji(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<wl;n++){const s=Tn[n],i=t.props[s];(Ft(i)||i===!1)&&(e[s]=i)}return e}function Qi(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}const Sl=[...vn].reverse(),Pl=vn.length;function bl(t){return e=>Promise.all(e.map(({animation:n,options:s})=>Ta(t,n,s)))}function Al(t){let e=bl(t),n=es(),s=!0,i=!1;const r=u=>(c,h)=>{var d;const f=dt(t,h,u==="exit"?(d=t.presenceContext)==null?void 0:d.custom:void 0);if(f){const{transition:m,transitionEnd:p,...y}=f;c={...c,...y,...p}}return c};function o(u){e=u(t)}function a(u){const{props:c}=t,h=Ji(t.parent)||{},f=[],d=new Set;let m={},p=1/0;for(let g=0;g<Pl;g++){const T=Sl[g],v=n[T],w=c[T]!==void 0?c[T]:h[T],b=Ft(w),R=T===u?v.isActive:null;R===!1&&(p=g);let O=w===h[T]&&w!==c[T]&&b;if(O&&(s||i)&&t.manuallyAnimateOnMount&&(O=!1),v.protectedKeys={...m},!v.isActive&&R===null||!w&&!v.prevProp||ie(w)||typeof w=="boolean")continue;if(T==="exit"&&v.isActive&&R!==!0){v.prevResolvedValues&&(m={...m,...v.prevResolvedValues});continue}const A=Vl(v.prevProp,w);let k=A||T===u&&v.isActive&&!O&&b||g>p&&b,P=!1;const D=Array.isArray(w)?w:[w];let U=D.reduce(r(T),{});R===!1&&(U={});const{prevResolvedValues:rt={}}=v,X={...rt,...U},Q=F=>{k=!0,d.has(F)&&(P=!0,d.delete(F)),v.needsAnimating[F]=!0;const K=t.getValue(F);K&&(K.liveStyle=!1)};for(const F in X){const K=U[F],at=rt[F];if(m.hasOwnProperty(F))continue;let mt=!1;Be(K)&&Be(at)?mt=!Qi(K,at):mt=K!==at,mt?K!=null?Q(F):d.add(F):K!==void 0&&d.has(F)?Q(F):v.protectedKeys[F]=!0}v.prevProp=w,v.prevResolvedValues=U,v.isActive&&(m={...m,...U}),(s||i)&&t.blockInitialAnimation&&(k=!1);const Y=O&&A;k&&(!Y||P)&&f.push(...D.map(F=>{const K={type:T};if(typeof F=="string"&&(s||i)&&!Y&&t.manuallyAnimateOnMount&&t.parent){const{parent:at}=t,mt=dt(at,F);if(at.enteringChildren&&mt){const{delayChildren:bo}=mt.transition||{};K.delay=wi(at.enteringChildren,t,bo)}}return{animation:F,options:K}}))}if(d.size){const g={};if(typeof c.initial!="boolean"){const T=dt(t,Array.isArray(c.initial)?c.initial[0]:c.initial);T&&T.transition&&(g.transition=T.transition)}d.forEach(T=>{const v=t.getBaseTarget(T),w=t.getValue(T);w&&(w.liveStyle=!0),g[T]=v??null}),f.push({animation:g})}let y=!!f.length;return s&&(c.initial===!1||c.initial===c.animate)&&!t.manuallyAnimateOnMount&&(y=!1),s=!1,i=!1,y?e(f):Promise.resolve()}function l(u,c){var f;if(n[u].isActive===c)return Promise.resolve();(f=t.variantChildren)==null||f.forEach(d=>{var m;return(m=d.animationState)==null?void 0:m.setActive(u,c)}),n[u].isActive=c;const h=a(u);for(const d in n)n[d].protectedKeys={};return h}return{animateChanges:a,setActive:l,setAnimateFunction:o,getState:()=>n,reset:()=>{n=es(),i=!0}}}function Vl(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Qi(e,t):!1}function lt(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function es(){return{animate:lt(!0),whileInView:lt(),whileHover:lt(),whileTap:lt(),whileDrag:lt(),whileFocus:lt(),exit:lt()}}function He(t,e){t.min=e.min,t.max=e.max}function H(t,e){He(t.x,e.x),He(t.y,e.y)}function ns(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}const to=1e-4,Ml=1-to,Cl=1+to,eo=.01,Dl=0-eo,El=0+eo;function N(t){return t.max-t.min}function Rl(t,e,n){return Math.abs(t-e)<=n}function ss(t,e,n,s=.5){t.origin=s,t.originPoint=M(e.min,e.max,t.origin),t.scale=N(n)/N(e),t.translate=M(n.min,n.max,t.origin)-t.originPoint,(t.scale>=Ml&&t.scale<=Cl||isNaN(t.scale))&&(t.scale=1),(t.translate>=Dl&&t.translate<=El||isNaN(t.translate))&&(t.translate=0)}function Et(t,e,n,s){ss(t.x,e.x,n.x,s?s.originX:void 0),ss(t.y,e.y,n.y,s?s.originY:void 0)}function is(t,e,n){t.min=n.min+e.min,t.max=t.min+N(e)}function Ll(t,e,n){is(t.x,e.x,n.x),is(t.y,e.y,n.y)}function os(t,e,n){t.min=e.min-n.min,t.max=t.min+N(e)}function ne(t,e,n){os(t.x,e.x,n.x),os(t.y,e.y,n.y)}function rs(t,e,n,s,i){return t-=e,t=ee(t,1/n,s),i!==void 0&&(t=ee(t,1/i,s)),t}function kl(t,e=0,n=1,s=.5,i,r=t,o=t){if(Z.test(e)&&(e=parseFloat(e),e=M(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=M(r.min,r.max,s);t===r&&(a-=e),t.min=rs(t.min,e,n,a,i),t.max=rs(t.max,e,n,a,i)}function as(t,e,[n,s,i],r,o){kl(t,e[n],e[s],e[i],e.scale,r,o)}const Fl=["x","scaleX","originX"],Il=["y","scaleY","originY"];function ls(t,e,n,s){as(t.x,e,Fl,n?n.x:void 0,s?s.x:void 0),as(t.y,e,Il,n?n.y:void 0,s?s.y:void 0)}function cs(t){return t.translate===0&&t.scale===1}function no(t){return cs(t.x)&&cs(t.y)}function us(t,e){return t.min===e.min&&t.max===e.max}function Bl(t,e){return us(t.x,e.x)&&us(t.y,e.y)}function hs(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function so(t,e){return hs(t.x,e.x)&&hs(t.y,e.y)}function fs(t){return N(t.x)/N(t.y)}function ds(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function q(t){return[t("x"),t("y")]}function Ol(t,e,n){let s="";const i=t.x.translate/e.x,r=t.y.translate/e.y,o=(n==null?void 0:n.z)||0;if((i||r||o)&&(s=`translate3d(${i}px, ${r}px, ${o}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:h,rotateY:f,skewX:d,skewY:m}=n;u&&(s=`perspective(${u}px) ${s}`),c&&(s+=`rotate(${c}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 io=["TopLeft","TopRight","BottomLeft","BottomRight"],jl=io.length,ms=t=>typeof t=="string"?parseFloat(t):t,ps=t=>typeof t=="number"||x.test(t);function Nl(t,e,n,s,i,r){i?(t.opacity=M(0,n.opacity??1,Ul(s)),t.opacityExit=M(e.opacity??1,0,Wl(s))):r&&(t.opacity=M(e.opacity??1,n.opacity??1,s));for(let o=0;o<jl;o++){const a=`border${io[o]}Radius`;let l=gs(e,a),u=gs(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||ps(l)===ps(u)?(t[a]=Math.max(M(ms(l),ms(u),s),0),(Z.test(u)||Z.test(l))&&(t[a]+="%")):t[a]=u}(e.rotate||n.rotate)&&(t.rotate=M(e.rotate||0,n.rotate||0,s))}function gs(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const Ul=oo(0,.5,qs),Wl=oo(.5,.95,G);function oo(t,e,n){return s=>s<t?0:s>e?1:n(Lt(t,e,s))}function Kl(t,e,n){const s=B(t)?t:St(t);return s.start(hn("",s,e,n)),s.animation}function It(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}const $l=(t,e)=>t.depth-e.depth;class Gl{constructor(){this.children=[],this.isDirty=!1}add(e){Ye(this.children,e),this.isDirty=!0}remove(e){qt(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort($l),this.isDirty=!1,this.children.forEach(e)}}function Hl(t,e){const n=j.now(),s=({timestamp:i})=>{const r=i-n;r>=e&&(it(s),t(r-e))};return V.setup(s,!0),()=>it(s)}function Xt(t){return B(t)?t.get():t}class zl{constructor(){this.members=[]}add(e){Ye(this.members,e);for(let n=this.members.length-1;n>=0;n--){const s=this.members[n];if(s===e||s===this.lead||s===this.prevLead)continue;const i=s.instance;(!i||i.isConnected===!1)&&!s.snapshot&&(qt(this.members,s),s.unmount())}e.scheduleRender()}remove(e){if(qt(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){var n;for(let s=this.members.indexOf(e)-1;s>=0;s--){const i=this.members[s];if(i.isPresent!==!1&&((n=i.instance)==null?void 0:n.isConnected)!==!1)return this.promote(i),!0}return!1}promote(e,n){var i;const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.updateSnapshot(),e.scheduleRender();const{layoutDependency:r}=s.options,{layoutDependency:o}=e.options;(r===void 0||r!==o)&&(e.resumeFrom=s,n&&(s.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),(i=e.root)!=null&&i.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{var n,s,i,r,o;(s=(n=e.options).onExitComplete)==null||s.call(n),(o=(i=e.resumingFrom)==null?void 0:(r=i.options).onExitComplete)==null||o.call(r)})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){var e;(e=this.lead)!=null&&e.snapshot&&(this.lead.snapshot=void 0)}}const Yt={hasAnimatedSinceResize:!0,hasEverUpdated:!1},pe=["","X","Y","Z"],_l=1e3;let Xl=0;function ge(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function ro(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Vi(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:r}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",V,!(i||r))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&ro(s)}function ao({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(o={},a=e==null?void 0:e()){this.id=Xl++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Zl),this.nodes.forEach(ec),this.nodes.forEach(nc),this.nodes.forEach(Jl)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,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 Gl)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new Ze),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=yn(o)&&!qa(o),this.instance=o;const{layoutId:a,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),t){let c,h=0;const f=()=>this.root.updateBlockedByResize=!1;V.read(()=>{h=window.innerWidth}),t(o,()=>{const d=window.innerWidth;d!==h&&(h=d,this.root.updateBlockedByResize=!0,c&&c(),c=Hl(f,250),Yt.hasAnimatedSinceResize&&(Yt.hasAnimatedSinceResize=!1,this.nodes.forEach(Ts)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&u&&(a||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:h,hasRelativeLayoutChanged:f,layout:d})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||ac,{onLayoutAnimationStart:p,onLayoutAnimationComplete:y}=u.getProps(),g=!this.targetLayout||!so(this.targetLayout,d),T=!h&&f;if(this.options.layoutRoot||this.resumeFrom||T||h&&(g||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const v={...un(m,"layout"),onPlay:p,onComplete:y};(u.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v),this.setAnimationOrigin(c,T)}else h||Ts(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=d})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),it(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(sc),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&ro(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const h=this.path[c];h.shouldResetTransform=!0,(typeof h.latestValues.x=="string"||typeof h.latestValues.y=="string")&&(h.isLayoutDirty=!0),h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(ys);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(vs);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(tc),this.nodes.forEach(Yl),this.nodes.forEach(ql)):this.nodes.forEach(vs),this.clearAllSnapshots();const a=j.now();I.delta=J(0,1e3/60,a-I.timestamp),I.timestamp=a,I.isProcessing=!0,ae.update.process(I),ae.preRender.process(I),ae.render.process(I),I.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,pn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Ql),this.sharedNodes.forEach(ic)}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(),this.snapshot&&!N(this.snapshot.measuredBox.x)&&!N(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}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 o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=L(),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,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const l=s(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!no(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;o&&this.instance&&(a||ct(this.latestValues)||c)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),lc(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:o}=this.options;if(!o)return L();const a=o.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(cc))){const{scroll:c}=this.root;c&&(Tt(a.x,c.offset.x),Tt(a.y,c.offset.y))}return a}removeElementScroll(o){var l;const a=L();if(H(a,o),(l=this.scroll)!=null&&l.wasRoot)return a;for(let u=0;u<this.path.length;u++){const c=this.path[u],{scroll:h,options:f}=c;c!==this.root&&h&&f.layoutScroll&&(h.wasRoot&&H(a,o),Tt(a.x,h.offset.x),Tt(a.y,h.offset.y))}return a}applyTransform(o,a=!1){var u,c;const l=L();H(l,o);for(let h=0;h<this.path.length;h++){const f=this.path[h];!a&&f.options.layoutScroll&&f.scroll&&f!==f.root&&xt(l,{x:-f.scroll.offset.x,y:-f.scroll.offset.y}),ct(f.latestValues)&&xt(l,f.latestValues,(u=f.layout)==null?void 0:u.layoutBox)}return ct(this.latestValues)&&xt(l,this.latestValues,(c=this.layout)==null?void 0:c.layoutBox),l}removeTransform(o){var l;const a=L();H(a,o);for(let u=0;u<this.path.length;u++){const c=this.path[u];if(!ct(c.latestValues))continue;let h;c.instance&&(Ke(c.latestValues)&&c.updateSnapshot(),h=L(),H(h,c.measurePageBox())),ls(a,c.latestValues,(l=c.snapshot)==null?void 0:l.layoutBox,h)}return ct(this.latestValues)&&ls(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.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!==I.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var d;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(o||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(d=this.parent)!=null&&d.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:c,layoutId:h}=this.options;if(!this.layout||!(c||h))return;this.resolvedRelativeTargetAt=I.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=L(),this.targetWithTransforms=L()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Ll(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):H(this.target,this.layout.layoutBox),Gi(this.target,this.targetDelta)):H(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Ke(this.parent.latestValues)||$i(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,a,l){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=L(),this.relativeTargetOrigin=L(),ne(this.relativeTargetOrigin,a,l),H(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var m;const o=this.getLead(),a=!!this.resumingFrom||this!==o;let l=!0;if((this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===I.timestamp&&(l=!1),l)return;const{layout:u,layoutId:c}=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||c))return;H(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,f=this.treeScale.y;al(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=L());const{target:d}=o;if(!d){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(ns(this.prevProjectionDelta.x,this.projectionDelta.x),ns(this.prevProjectionDelta.y,this.projectionDelta.y)),Et(this.projectionDelta,this.layoutCorrected,d,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==f||!ds(this.projectionDelta.x,this.prevProjectionDelta.x)||!ds(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",d))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=vt(),this.projectionDelta=vt(),this.projectionDeltaWithTransform=vt()}setAnimationOrigin(o,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},h=vt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=L(),d=l?l.source:void 0,m=this.layout?this.layout.source:void 0,p=d!==m,y=this.getStack(),g=!y||y.members.length<=1,T=!!(p&&!g&&this.options.crossfade===!0&&!this.path.some(rc));this.animationProgress=0;let v;this.mixTargetDelta=w=>{const b=w/1e3;xs(h.x,o.x,b),xs(h.y,o.y,b),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ne(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),oc(this.relativeTarget,this.relativeTargetOrigin,f,b),v&&Bl(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=L()),H(v,this.relativeTarget)),p&&(this.animationValues=c,Nl(c,u,this.latestValues,b,T,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=b},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var a,l,u;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(u=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||u.stop(),this.pendingAnimation&&(it(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=V.update(()=>{Yt.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=St(0)),this.motionValue.jump(0,!1),this.currentAnimation=Kl(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:c=>{this.mixTargetDelta(c),o.onUpdate&&o.onUpdate(c)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.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 o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(_l),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=o;if(!(!a||!l||!u)){if(this!==o&&this.layout&&u&&lo(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||L();const h=N(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+h;const f=N(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+f}H(a,l),xt(a,c),Et(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new zl),this.sharedNodes.get(o).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var a;const{layoutId:o}=this.options;return o?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:o}=this.options;return o?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&ge("z",o,u,this.animationValues);for(let c=0;c<pe.length;c++)ge(`rotate${pe[c]}`,o,u,this.animationValues),ge(`skew${pe[c]}`,o,u,this.animationValues);o.render();for(const c in u)o.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=Xt(a==null?void 0:a.pointerEvents)||"",o.transform=l?l(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=Xt(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!ct(this.latestValues)&&(o.transform=l?l({},""):"none",this.hasProjected=!1);return}o.visibility="";const c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let h=Ol(this.projectionDeltaWithTransform,this.treeScale,c);l&&(h=l(c,h)),o.transform=h;const{x:f,y:d}=this.projectionDelta;o.transformOrigin=`${f.origin*100}% ${d.origin*100}% 0`,u.animationValues?o.opacity=u===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:o.opacity=u===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(const m in Ge){if(c[m]===void 0)continue;const{correct:p,applyTo:y,isCSSVariable:g}=Ge[m],T=h==="none"?c[m]:p(c[m],u);if(y){const v=y.length;for(let w=0;w<v;w++)o[y[w]]=T}else g?this.options.visualElement.renderState.vars[m]=T:o[m]=T}this.options.layoutId&&(o.pointerEvents=u===this?Xt(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(ys),this.root.sharedNodes.clear()}}}function Yl(t){t.updateLayout()}function ql(t){var n;const e=((n=t.resumeFrom)==null?void 0:n.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:i}=t.layout,{animationType:r}=t.options,o=e.source!==t.layout.source;if(r==="size")q(h=>{const f=o?e.measuredBox[h]:e.layoutBox[h],d=N(f);f.min=s[h].min,f.max=f.min+d});else if(r==="x"||r==="y"){const h=r==="x"?"y":"x";He(o?e.measuredBox[h]:e.layoutBox[h],s[h])}else lo(r,e.layoutBox,s)&&q(h=>{const f=o?e.measuredBox[h]:e.layoutBox[h],d=N(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=vt();Et(a,s,e.layoutBox);const l=vt();o?Et(l,t.applyTransform(i,!0),e.measuredBox):Et(l,s,e.layoutBox);const u=!no(a);let c=!1;if(!t.resumeFrom){const h=t.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:f,layout:d}=h;if(f&&d){const m=L();ne(m,e.layoutBox,f.layoutBox);const p=L();ne(p,s,d.layoutBox),so(m,p)||(c=!0),h.options.layoutRoot&&(t.relativeTarget=p,t.relativeTargetOrigin=m,t.relativeParent=h)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:e,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeLayoutChanged:c})}else if(t.isLead()){const{onExitComplete:s}=t.options;s&&s()}t.options.transition=void 0}function Zl(t){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 Jl(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Ql(t){t.clearSnapshot()}function ys(t){t.clearMeasurements()}function vs(t){t.isLayoutDirty=!1}function tc(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Ts(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function ec(t){t.resolveTargetDelta()}function nc(t){t.calcProjection()}function sc(t){t.resetSkewAndRotation()}function ic(t){t.removeLeadSnapshot()}function xs(t,e,n){t.translate=M(e.translate,0,n),t.scale=M(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function ws(t,e,n,s){t.min=M(e.min,n.min,s),t.max=M(e.max,n.max,s)}function oc(t,e,n,s){ws(t.x,e.x,n.x,s),ws(t.y,e.y,n.y,s)}function rc(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const ac={duration:.45,ease:[.4,0,.1,1]},Ss=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Ps=Ss("applewebkit/")&&!Ss("chrome/")?Math.round:G;function bs(t){t.min=Ps(t.min),t.max=Ps(t.max)}function lc(t){bs(t.x),bs(t.y)}function lo(t,e,n){return t==="position"||t==="preserve-aspect"&&!Rl(fs(e),fs(n),.2)}function cc(t){var e;return t!==t.root&&((e=t.scroll)==null?void 0:e.wasRoot)}const uc=ao({attachResizeListener:(t,e)=>It(t,"resize",e),measureScroll:()=>{var t,e;return{x:document.documentElement.scrollLeft||((t=document.body)==null?void 0:t.scrollLeft)||0,y:document.documentElement.scrollTop||((e=document.body)==null?void 0:e.scrollTop)||0}},checkIsScrollRoot:()=>!0}),ye={current:void 0},co=ao({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!ye.current){const t=new uc({});t.mount(window),t.setOptions({layoutScroll:!0}),ye.current=t}return ye.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),uo=S.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function hc(t=!0){const e=S.useContext(Xe);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=e,r=S.useId();S.useEffect(()=>{if(t)return i(r)},[t]);const o=S.useCallback(()=>t&&s&&s(r),[r,s,t]);return!n&&s?[!1,o]:[!0]}const ho=S.createContext({strict:!1}),As={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"]};let Vs=!1;function fc(){if(Vs)return;const t={};for(const e in As)t[e]={isEnabled:n=>As[e].some(s=>!!n[s])};Ui(t),Vs=!0}function fo(){return fc(),sl()}function dc(t){const e=fo();for(const n in t)e[n]={...e[n],...t[n]};Ui(e)}const mc=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","propagate","ignoreStrict","viewport"]);function se(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||mc.has(t)}let mo=t=>!se(t);function pc(t){typeof t=="function"&&(mo=e=>e.startsWith("on")?!se(e):t(e))}try{pc(require("@emotion/is-prop-valid").default)}catch{}function gc(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||B(t[i])||(mo(i)||n===!0&&se(i)||!e&&!se(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}const re=S.createContext({});function yc(t,e){if(oe(t)){const{initial:n,animate:s}=t;return{initial:n===!1||Ft(n)?n:void 0,animate:Ft(s)?s:void 0}}return t.inherit!==!1?e:{}}function vc(t){const{initial:e,animate:n}=yc(t,S.useContext(re));return S.useMemo(()=>({initial:e,animate:n}),[Ms(e),Ms(n)])}function Ms(t){return Array.isArray(t)?t.join(" "):t}const Sn=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function po(t,e,n){for(const s in e)!B(e[s])&&!_i(s,n)&&(t[s]=e[s])}function Tc({transformTemplate:t},e){return S.useMemo(()=>{const n=Sn();return xn(n,e,t),Object.assign({},n.vars,n.style)},[e])}function xc(t,e){const n=t.style||{},s={};return po(s,n,t),Object.assign(s,Tc(t,e)),s}function wc(t,e){const n={},s=xc(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=s,n}const go=()=>({...Sn(),attrs:{}});function Sc(t,e,n,s){const i=S.useMemo(()=>{const r=go();return Xi(r,e,qi(s),t.transformTemplate,t.style),{...r.attrs,style:{...r.style}}},[e]);if(t.style){const r={};po(r,t.style,t),i.style={...r,...i.style}}return i}const Pc=["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 Pn(t){return typeof t!="string"||t.includes("-")?!1:!!(Pc.indexOf(t)>-1||/[A-Z]/u.test(t))}function bc(t,e,n,{latestValues:s},i,r=!1,o){const l=(o??Pn(t)?Sc:wc)(e,s,i,t),u=gc(e,typeof t=="string",r),c=t!==S.Fragment?{...u,...l,ref:n}:{},{children:h}=e,f=S.useMemo(()=>B(h)?h.get():h,[h]);return S.createElement(t,{...c,children:f})}function Ac({scrapeMotionValuesFromProps:t,createRenderState:e},n,s,i){return{latestValues:Vc(n,s,i,t),renderState:e()}}function Vc(t,e,n,s){const i={},r=s(t,{});for(const f in r)i[f]=Xt(r[f]);let{initial:o,animate:a}=t;const l=oe(t),u=ji(t);e&&u&&!l&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let c=n?n.initial===!1:!1;c=c||o===!1;const h=c?a:o;if(h&&typeof h!="boolean"&&!ie(h)){const f=Array.isArray(h)?h:[h];for(let d=0;d<f.length;d++){const m=fn(t,f[d]);if(m){const{transitionEnd:p,transition:y,...g}=m;for(const T in g){let v=g[T];if(Array.isArray(v)){const w=c?v.length-1:0;v=v[w]}v!==null&&(i[T]=v)}for(const T in p)i[T]=p[T]}}}return i}const yo=t=>(e,n)=>{const s=S.useContext(re),i=S.useContext(Xe),r=()=>Ac(t,e,s,i);return n?r():Ao(r)},Mc=yo({scrapeMotionValuesFromProps:wn,createRenderState:Sn}),Cc=yo({scrapeMotionValuesFromProps:Zi,createRenderState:go}),Dc=Symbol.for("motionComponentSymbol");function Ec(t,e,n){const s=S.useRef(n);S.useInsertionEffect(()=>{s.current=n});const i=S.useRef(null);return S.useCallback(r=>{var a;r&&((a=t.onMount)==null||a.call(t,r));const o=s.current;if(typeof o=="function")if(r){const l=o(r);typeof l=="function"&&(i.current=l)}else i.current?(i.current(),i.current=null):o(r);else o&&(o.current=r);e&&(r?e.mount(r):e.unmount())},[e])}const vo=S.createContext({});function pt(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Rc(t,e,n,s,i,r){var v,w;const{visualElement:o}=S.useContext(re),a=S.useContext(ho),l=S.useContext(Xe),u=S.useContext(uo),c=u.reducedMotion,h=u.skipAnimations,f=S.useRef(null),d=S.useRef(!1);s=s||a.renderer,!f.current&&s&&(f.current=s(t,{visualState:e,parent:o,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c,skipAnimations:h,isSVG:r}),d.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));const m=f.current,p=S.useContext(vo);m&&!m.projection&&i&&(m.type==="html"||m.type==="svg")&&Lc(f.current,n,i,p);const y=S.useRef(!1);S.useInsertionEffect(()=>{m&&y.current&&m.update(n,l)});const g=n[Ai],T=S.useRef(!!g&&typeof window<"u"&&!((v=window.MotionHandoffIsComplete)!=null&&v.call(window,g))&&((w=window.MotionHasOptimisedAnimation)==null?void 0:w.call(window,g)));return Mo(()=>{d.current=!0,m&&(y.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),T.current&&m.animationState&&m.animationState.animateChanges())}),S.useEffect(()=>{m&&(!T.current&&m.animationState&&m.animationState.animateChanges(),T.current&&(queueMicrotask(()=>{var b;(b=window.MotionHandoffMarkAsComplete)==null||b.call(window,g)}),T.current=!1),m.enteringChildren=void 0)}),m}function Lc(t,e,n,s){const{layoutId:i,layout:r,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:To(t.parent)),t.projection.setOptions({layoutId:i,layout:r,alwaysMeasureLayout:!!o||a&&pt(a),visualElement:t,animationType:typeof r=="string"?r:"both",initialPromotionConfig:s,crossfade:c,layoutScroll:l,layoutRoot:u})}function To(t){if(t)return t.options.allowProjection!==!1?t.projection:To(t.parent)}function ve(t,{forwardMotionProps:e=!1,type:n}={},s,i){s&&dc(s);const r=n?n==="svg":Pn(t),o=r?Cc:Mc;function a(u,c){let h;const f={...S.useContext(uo),...u,layoutId:kc(u)},{isStatic:d}=f,m=vc(u),p=o(u,d);if(!d&&typeof window<"u"){Fc();const y=Ic(f);h=y.MeasureLayout,m.visualElement=Rc(t,p,f,i,y.ProjectionNode,r)}return Pe.jsxs(re.Provider,{value:m,children:[h&&m.visualElement?Pe.jsx(h,{visualElement:m.visualElement,...f}):null,bc(t,u,Ec(p,m.visualElement,c),p,d,e,r)]})}a.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const l=S.forwardRef(a);return l[Dc]=t,l}function kc({layoutId:t}){const e=S.useContext(js).id;return e&&t!==void 0?e+"-"+t:t}function Fc(t,e){S.useContext(ho).strict}function Ic(t){const e=fo(),{drag:n,layout:s}=e;if(!n&&!s)return{};const i={...n,...s};return{MeasureLayout:n!=null&&n.isEnabled(t)||s!=null&&s.isEnabled(t)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function Bc(t,e){if(typeof Proxy>"u")return ve;const n=new Map,s=(r,o)=>ve(r,o,t,e),i=(r,o)=>s(r,o);return new Proxy(i,{get:(r,o)=>o==="create"?s:(n.has(o)||n.set(o,ve(o,void 0,t,e)),n.get(o))})}const Oc=(t,e)=>e.isSVG??Pn(t)?new xl(e):new ml(e,{allowProjection:t!==S.Fragment});class jc extends ot{constructor(e){super(e),e.animationState||(e.animationState=Al(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();ie(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.call(this)}}let Nc=0;class Uc extends ot{constructor(){super(...arguments),this.id=Nc++,this.isExitComplete=!1}update(){var r;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;if(e&&s===!1){if(this.isExitComplete){const{initial:o,custom:a}=this.node.getProps();if(typeof o=="string"){const l=dt(this.node,o,a);if(l){const{transition:u,transitionEnd:c,...h}=l;for(const f in h)(r=this.node.getValue(f))==null||r.jump(h[f])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const Wc={animation:{Feature:jc},exit:{Feature:Uc}};function Nt(t){return{point:{x:t.pageX,y:t.pageY}}}const Kc=t=>e=>gn(e)&&t(e,Nt(e));function Rt(t,e,n,s){return It(t,e,Kc(n),s)}const xo=({current:t})=>t?t.ownerDocument.defaultView:null,Cs=(t,e)=>Math.abs(t-e);function $c(t,e){const n=Cs(t.x,e.x),s=Cs(t.y,e.y);return Math.sqrt(n**2+s**2)}const Ds=new Set(["auto","scroll"]);class wo{constructor(e,n,{transformPagePoint:s,contextWindow:i=window,dragSnapToOrigin:r=!1,distanceThreshold:o=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=d=>{this.handleScroll(d.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Kt(this.lastRawMoveEventInfo,this.transformPagePoint));const d=Te(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,p=$c(d.offset,{x:0,y:0})>=this.distanceThreshold;if(!m&&!p)return;const{point:y}=d,{timestamp:g}=I;this.history.push({...y,timestamp:g});const{onStart:T,onMove:v}=this.handlers;m||(T&&T(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,d)},this.handlePointerMove=(d,m)=>{this.lastMoveEvent=d,this.lastRawMoveEventInfo=m,this.lastMoveEventInfo=Kt(m,this.transformPagePoint),V.update(this.updatePoint,!0)},this.handlePointerUp=(d,m)=>{this.end();const{onEnd:p,onSessionEnd:y,resumeAnimation:g}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const T=Te(d.type==="pointercancel"?this.lastMoveEventInfo:Kt(m,this.transformPagePoint),this.history);this.startEvent&&p&&p(d,T),y&&y(d,T)},!gn(e))return;this.dragSnapToOrigin=r,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=o,this.contextWindow=i||window;const l=Nt(e),u=Kt(l,this.transformPagePoint),{point:c}=u,{timestamp:h}=I;this.history=[{...c,timestamp:h}];const{onSessionStart:f}=n;f&&f(e,Te(u,this.history)),this.removeListeners=Bt(Rt(this.contextWindow,"pointermove",this.handlePointerMove),Rt(this.contextWindow,"pointerup",this.handlePointerUp),Rt(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(e){let n=e.parentElement;for(;n;){const s=getComputedStyle(n);(Ds.has(s.overflowX)||Ds.has(s.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){const n=this.scrollPositions.get(e);if(!n)return;const s=e===window,i=s?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},r={x:i.x-n.x,y:i.y-n.y};r.x===0&&r.y===0||(s?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=r.x,this.lastMoveEventInfo.point.y+=r.y):this.history.length>0&&(this.history[0].x-=r.x,this.history[0].y-=r.y),this.scrollPositions.set(e,i),V.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),it(this.updatePoint)}}function Kt(t,e){return e?{point:e(t.point)}:t}function Es(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Te({point:t},e){return{point:t,delta:Es(t,So(e)),offset:Es(t,Gc(e)),velocity:Hc(e,.1)}}function Gc(t){return t[0]}function So(t){return t[t.length-1]}function Hc(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=So(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>W(e)));)n--;if(!s)return{x:0,y:0};s===t[0]&&t.length>2&&i.timestamp-s.timestamp>W(e)*2&&(s=t[1]);const r=$(i.timestamp-s.timestamp);if(r===0)return{x:0,y:0};const o={x:(i.x-s.x)/r,y:(i.y-s.y)/r};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function zc(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?M(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?M(n,t,s.max):Math.min(t,n)),t}function Rs(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 _c(t,{top:e,left:n,bottom:s,right:i}){return{x:Rs(t.x,n,i),y:Rs(t.y,e,s)}}function Ls(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 Xc(t,e){return{x:Ls(t.x,e.x),y:Ls(t.y,e.y)}}function Yc(t,e){let n=.5;const s=N(t),i=N(e);return i>s?n=Lt(e.min,e.max-s,t.min):s>i&&(n=Lt(t.min,t.max-i,e.min)),J(0,1,n)}function qc(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 ze=.35;function Zc(t=ze){return t===!1?t=0:t===!0&&(t=ze),{x:ks(t,"left","right"),y:ks(t,"top","bottom")}}function ks(t,e,n){return{min:Fs(t,e),max:Fs(t,n)}}function Fs(t,e){return typeof t=="number"?t:t[e]||0}const Jc=new WeakMap;class Qc{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=L(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:n=!1,distanceThreshold:s}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const r=h=>{n&&this.snapToCursor(Nt(h).point),this.stopAnimation()},o=(h,f)=>{const{drag:d,dragPropagation:m,onDragStart:p}=this.getProps();if(d&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=ka(d),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),q(g=>{let T=this.getAxisMotionValue(g).get()||0;if(Z.test(T)){const{projection:v}=this.visualElement;if(v&&v.layout){const w=v.layout.layoutBox[g];w&&(T=N(w)*(parseFloat(T)/100))}}this.originPoint[g]=T}),p&&V.update(()=>p(h,f),!1,!0),Oe(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},a=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f;const{dragPropagation:d,dragDirectionLock:m,onDirectionLock:p,onDrag:y}=this.getProps();if(!d&&!this.openDragLock)return;const{offset:g}=f;if(m&&this.currentDirection===null){this.currentDirection=eu(g),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",f.point,g),this.updateAxis("y",f.point,g),this.visualElement.render(),y&&V.update(()=>y(h,f),!1,!0)},l=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f,this.stop(h,f),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>{const{dragSnapToOrigin:h}=this.getProps();(h||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:c}=this.getProps();this.panSession=new wo(e,{onSessionStart:r,onStart:o,onMove:a,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:s,contextWindow:xo(this.visualElement),element:this.visualElement.current})}stop(e,n){const s=e||this.latestPointerEvent,i=n||this.latestPanInfo,r=this.isDragging;if(this.cancel(),!r||!i||!s)return;const{velocity:o}=i;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&V.postRender(()=>a(s,i))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!$t(e,i,this.currentDirection))return;const r=this.getAxisMotionValue(e);let o=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(o=zc(o,this.constraints[e],this.elastic[e])),r.set(o)}resolveConstraints(){var r;const{dragConstraints:e,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(r=this.visualElement.projection)==null?void 0:r.layout,i=this.constraints;e&&pt(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&s?this.constraints=_c(s.layoutBox,e):this.constraints=!1,this.elastic=Zc(n),i!==this.constraints&&!pt(e)&&s&&this.constraints&&!this.hasMutatedConstraints&&q(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=qc(s.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!pt(e))return!1;const s=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const r=ll(s,i.root,this.visualElement.getTransformPagePoint());let o=Xc(i.layout.layoutBox,r);if(n){const a=n(ol(o));this.hasMutatedConstraints=!!a,a&&(o=Ki(a))}return o}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:r,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=q(c=>{if(!$t(c,n,this.currentDirection))return;let h=l&&l[c]||{};(o===!0||o===c)&&(h={min:0,max:0});const f=i?200:1e6,d=i?40:1e7,m={type:"inertia",velocity:s?e[c]:0,bounceStiffness:f,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...r,...h};return this.startAxisValueAnimation(c,m)});return Promise.all(u).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return Oe(this.visualElement,e),s.start(hn(e,s,0,n,this.visualElement,!1))}stopAnimation(){q(e=>this.getAxisMotionValue(e).stop())}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){q(n=>{const{drag:s}=this.getProps();if(!$t(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,r=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n],l=r.get()||0;r.set(e[n]-M(o,a,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!pt(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};q(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=Yc({min:l,max:l},this.constraints[o])}});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.constraints=!1,this.resolveConstraints(),q(o=>{if(!$t(o,e,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(M(l,u,i[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Jc.set(this.visualElement,this);const e=this.visualElement.current,n=Rt(e,"pointerdown",u=>{const{drag:c,dragListener:h=!0}=this.getProps(),f=u.target,d=f!==e&&Na(f);c&&h&&!d&&this.start(u)});let s;const i=()=>{const{dragConstraints:u}=this.getProps();pt(u)&&u.current&&(this.constraints=this.resolveRefConstraints(),s||(s=tu(e,u.current,()=>this.scalePositionWithinConstraints())))},{projection:r}=this.visualElement,o=r.addEventListener("measure",i);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),V.read(i);const a=It(window,"resize",()=>this.scalePositionWithinConstraints()),l=r.addEventListener("didUpdate",(({delta:u,hasLayoutChanged:c})=>{this.isDragging&&c&&(q(h=>{const f=this.getAxisMotionValue(h);f&&(this.originPoint[h]+=u[h].translate,f.set(f.get()+u[h].translate))}),this.visualElement.render())}));return()=>{a(),n(),o(),l&&l(),s&&s()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:r=!1,dragElastic:o=ze,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:r,dragElastic:o,dragMomentum:a}}}function Is(t){let e=!0;return()=>{if(e){e=!1;return}t()}}function tu(t,e,n){const s=Gn(t,Is(n)),i=Gn(e,Is(n));return()=>{s(),i()}}function $t(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function eu(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class nu extends ot{constructor(e){super(e),this.removeGroupControls=G,this.removeListeners=G,this.controls=new Qc(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||G}update(){const{dragControls:e}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};e!==n&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const xe=t=>(e,n)=>{t&&V.update(()=>t(e,n),!1,!0)};class su extends ot{constructor(){super(...arguments),this.removePointerDownListener=G}onPointerDown(e){this.session=new wo(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:xo(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:xe(e),onStart:xe(n),onMove:xe(s),onEnd:(r,o)=>{delete this.session,i&&V.postRender(()=>i(r,o))}}}mount(){this.removePointerDownListener=Rt(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let we=!1;class iu extends S.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:r}=e;r&&(n.group&&n.group.add(r),s&&s.register&&i&&s.register(r),we&&r.root.didUpdate(),r.addEventListener("animationComplete",()=>{this.safeToRemove()}),r.setOptions({...r.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Yt.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:r}=this.props,{projection:o}=s;return o&&(o.isPresent=r,e.layoutDependency!==n&&o.setOptions({...o.options,layoutDependency:n}),we=!0,i||e.layoutDependency!==n||n===void 0||e.isPresent!==r?o.willUpdate():this.safeToRemove(),e.isPresent!==r&&(r?o.promote():o.relegate()||V.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),pn.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;we=!0,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 Po(t){const[e,n]=hc(),s=S.useContext(js);return Pe.jsx(iu,{...t,layoutGroup:s,switchLayoutGroup:S.useContext(vo),isPresent:e,safeToRemove:n})}const ou={pan:{Feature:su},drag:{Feature:nu,ProjectionNode:co,MeasureLayout:Po}};function Bs(t,e,n){const{props:s}=t;t.animationState&&s.whileHover&&t.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,r=s[i];r&&V.postRender(()=>r(e,Nt(e)))}class ru extends ot{mount(){const{current:e}=this.node;e&&(this.unmount=Ia(e,(n,s)=>(Bs(this.node,s,"Start"),i=>Bs(this.node,i,"End"))))}unmount(){}}class au extends ot{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=Bt(It(this.node.current,"focus",()=>this.onFocus()),It(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Os(t,e,n){const{props:s}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&s.whileTap&&t.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),r=s[i];r&&V.postRender(()=>r(e,Nt(e)))}class lu extends ot{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:n,propagate:s}=this.node.props;this.unmount=Wa(e,(i,r)=>(Os(this.node,r,"Start"),(o,{success:a})=>Os(this.node,o,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(s==null?void 0:s.tap)===!1})}unmount(){}}const _e=new WeakMap,Se=new WeakMap,cu=t=>{const e=_e.get(t.target);e&&e(t)},uu=t=>{t.forEach(cu)};function hu({root:t,...e}){const n=t||document;Se.has(n)||Se.set(n,{});const s=Se.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(uu,{root:t,...e})),s[i]}function fu(t,e,n){const s=hu(e);return _e.set(t,n),s.observe(t),()=>{_e.delete(t),s.unobserve(t)}}const du={some:0,all:1};class mu extends ot{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:r}=e,o={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:du[i]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,r&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:h}=this.node.getProps(),f=u?c:h;f&&f(l)};return fu(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(pu(e,n))&&this.startObserver()}unmount(){}}function pu({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const gu={inView:{Feature:mu},tap:{Feature:lu},focus:{Feature:au},hover:{Feature:ru}},yu={layout:{ProjectionNode:co,MeasureLayout:Po}},vu={...Wc,...gu,...ou,...yu},Su=Bc(vu,Oc);export{js as L,uo as M,Xe as P,Ao as a,hc as b,V as f,La as i,Su as m,Mo as u};
|