uigraph 1.0.0 → 1.0.2
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/README.md +30 -51
- package/dist/bin.mjs +1608 -59037
- package/dist/viewer/assets/abnfDiagram-VCTEODGH-D7zWJuPJ.js +1 -0
- package/dist/viewer/assets/actor-avatar-Bu-mKKXB.js +1 -0
- package/dist/viewer/assets/{api-adapters-CnQpLiWI.js → api-adapters-tfr51BsS.js} +1 -1
- package/dist/viewer/assets/{api-endpoints-DCA5GNpC.js → api-endpoints-D-Whnnwd.js} +9 -9
- package/dist/viewer/assets/{api-group-endpoints-page-Di42W69y.js → api-group-endpoints-page-B9R1EI4i.js} +9 -9
- package/dist/viewer/assets/{arc-Cn8owoDw.js → arc-DauzQXFu.js} +1 -1
- package/dist/viewer/assets/architectureDiagram-5GKGNRK7-CXzgHd-c.js +36 -0
- package/dist/viewer/assets/{arrow-left-DWcMgM2U.js → arrow-left-DpQqmf17.js} +1 -1
- package/dist/viewer/assets/avatar-DAFUyk1i.js +43 -0
- package/dist/viewer/assets/badge-hR3QvPWv.js +1 -0
- package/dist/viewer/assets/better-delete-confirmation-modal-CGEQ5O4X.js +1 -0
- package/dist/viewer/assets/better-dialog-DcIxFWwk.js +1 -0
- package/dist/viewer/assets/{blockDiagram-I7D4REHJ-CbYzOsL_.js → blockDiagram-I7D4REHJ-CFHWUw4z.js} +2 -2
- package/dist/viewer/assets/{brands-Bd4RklRx.js → brands-DtmA1AhP.js} +1 -1
- package/dist/viewer/assets/button-DZj74qS7.js +1 -0
- package/dist/viewer/assets/{c4Diagram-7LVT6UL2-CLkVbphC.js → c4Diagram-7LVT6UL2-BHSggPKI.js} +6 -6
- package/dist/viewer/assets/{calendar-C0xdI_ag.js → calendar-Bolgc8E5.js} +1 -1
- package/dist/viewer/assets/channel-CNRSofFP.js +1 -0
- package/dist/viewer/assets/{check-XjanpAFg.js → check-BpmCQNbj.js} +1 -1
- package/dist/viewer/assets/checkbox-CFJfXL6R.js +1 -0
- package/dist/viewer/assets/{chevron-down-R7pQzyLD.js → chevron-down-DDsUE_xz.js} +1 -1
- package/dist/viewer/assets/{chevron-up-CRPypfOs.js → chevron-up-DVznKMGv.js} +1 -1
- package/dist/viewer/assets/{chunk-2Q5K7J3B-CcvtugCu.js → chunk-2Q5K7J3B-CNfz5YDQ.js} +1 -1
- package/dist/viewer/assets/{chunk-5VM5RSS4-CpZHHr12.js → chunk-5VM5RSS4-CwIhjvMe.js} +1 -1
- package/dist/viewer/assets/{chunk-F27PBJKO-DeAl4iOc.js → chunk-F27PBJKO-YFexFJof.js} +1 -1
- package/dist/viewer/assets/{chunk-IMKFNOWR-BfrPe7pS.js → chunk-IMKFNOWR-GY2yrvuo.js} +1 -1
- package/dist/viewer/assets/{chunk-JWPE2WC7-DDjyvUmZ.js → chunk-JWPE2WC7-xd0JGvne.js} +1 -1
- package/dist/viewer/assets/chunk-OB3PAWPO-DJIP1M4r.js +12 -0
- package/dist/viewer/assets/{chunk-POPQ4Y6H-DkDb0mzz.js → chunk-POPQ4Y6H-Bh6rizEy.js} +1 -1
- package/dist/viewer/assets/{chunk-SVP7TREG-D-K2XIGs.js → chunk-SVP7TREG-DtNrjvpq.js} +1 -1
- package/dist/viewer/assets/{chunk-TICWLB2K-DWMQQx6z.js → chunk-TICWLB2K-DrERwtw8.js} +1 -1
- package/dist/viewer/assets/{chunk-XXDRQBXY-DfkljAyM.js → chunk-XXDRQBXY-fYo04iwY.js} +1 -1
- package/dist/viewer/assets/{circle-alert-pm13M-Ef.js → circle-alert-Bl7DXYD_.js} +1 -1
- package/dist/viewer/assets/classDiagram-ZZMXUADV-D7PO-ME9.js +1 -0
- package/dist/viewer/assets/classDiagram-v2-VYDZK3BY-D7PO-ME9.js +1 -0
- package/dist/viewer/assets/color-input-ClkkG_kZ.js +11 -0
- package/dist/viewer/assets/{common-Y7ySZBdh.js → common-DLCsGQ-t.js} +1 -1
- package/dist/viewer/assets/{component-icons-D1BDAuEt.js → component-icons-MJ61E9nt.js} +2 -2
- package/dist/viewer/assets/{copy-CN4K2f_R.js → copy-DMJJonQF.js} +1 -1
- package/dist/viewer/assets/cose-bilkent-JH36ORCC-Dplz8nVT.js +1 -0
- package/dist/viewer/assets/cross-button-D5qst1tj.js +1 -0
- package/dist/viewer/assets/{cynefin-OW5HDTMX-yz-uw9Kz.js → cynefin-OW5HDTMX-DiBs4CI8.js} +1 -1
- package/dist/viewer/assets/cynefinDiagram-5FMLGOSQ-COXS8-dI.js +62 -0
- package/dist/viewer/assets/{dagre-GXQ25YYZ-zjZDwXOe.js → dagre-GXQ25YYZ-K8qvfG8D.js} +2 -2
- package/dist/viewer/assets/dashboard-diagrams-page-Cb0xNr4W.js +2 -0
- package/dist/viewer/assets/dashboard-diagrams-page-inner-CD--zr5q.js +1 -0
- package/dist/viewer/assets/dashboard-docs-page-BfWR9Ai9.js +2 -0
- package/dist/viewer/assets/dashboard-docs-page-inner-BLbX-YwF.js +67 -0
- package/dist/viewer/assets/dashboard-layout-sTeeHNsZ.js +1 -0
- package/dist/viewer/assets/dashboard-lens-layout-D-tu_4kn.js +1 -0
- package/dist/viewer/assets/dashboard-map-frame-page-7pDmbTSe.js +1 -0
- package/dist/viewer/assets/dashboard-plans-page-CfwOZ34A.js +1 -0
- package/dist/viewer/assets/dashboard-service-apis-k93fjW51.js +1 -0
- package/dist/viewer/assets/{dashboard-service-diagrams-CIjk95Jk.js → dashboard-service-diagrams-BIWUxX-Y.js} +3 -3
- package/dist/viewer/assets/dashboard-service-docs-CnniTD6Q.js +1 -0
- package/dist/viewer/assets/{dashboard-service-overview-CzePVPjl.js → dashboard-service-overview-CGBu4omY.js} +5 -5
- package/dist/viewer/assets/dashboard-services-DEscIO2O.js +1 -0
- package/dist/viewer/assets/{db-type-badge-DOgu1Pyc.js → db-type-badge-UbPgpwQf.js} +2 -2
- package/dist/viewer/assets/debounce-Cp8eREM4-D7o-Pzb-.js +2 -0
- package/dist/viewer/assets/{dependencies-CYdEztHw.js → dependencies-DK2GDlhQ.js} +1 -1
- package/dist/viewer/assets/{dependency-graph-DbyfN-rC.js → dependency-graph-xBEnCS0J.js} +3 -3
- package/dist/viewer/assets/{diagram-S7CK7UJ4-q-NHkUCx.js → diagram-S7CK7UJ4-D-liadVe.js} +2 -2
- package/dist/viewer/assets/diagram-UQ7AKVKN-CnA8mgXp.js +41 -0
- package/dist/viewer/assets/{diagram-VSXAHHWV-DZc1kHGx.js → diagram-VSXAHHWV-Ck7dgRFR.js} +2 -2
- package/dist/viewer/assets/diagram-VX7I27RA-Cm1LHbu3.js +24 -0
- package/dist/viewer/assets/diagram-Z3DM3KII-DV3yBUCB.js +24 -0
- package/dist/viewer/assets/diagram-live-preview-DzJ7Nxp1.js +2 -0
- package/dist/viewer/assets/{diagram-portal-page-CWxuok9E.js → diagram-portal-page-gguGLULH.js} +24 -24
- package/dist/viewer/assets/{diagrams-C1xkRPqT.js → diagrams-BqBSv2eb.js} +4 -4
- package/dist/viewer/assets/dialog-D7wzTt0L.js +6 -0
- package/dist/viewer/assets/{doc-file-content-B06roi8L.js → doc-file-content-Be0au9Vo.js} +4 -4
- package/dist/viewer/assets/{download-CLdCXVsO.js → download-DhyZ3g4F.js} +1 -1
- package/dist/viewer/assets/ebnfDiagram-PWID7BFC-BXbHVQvG.js +1 -0
- package/dist/viewer/assets/{editor-vqK4qAnB.js → editor-F9o4zoeB.js} +2 -2
- package/dist/viewer/assets/{erDiagram-RLTQ6QDP-BWuA-aqV.js → erDiagram-RLTQ6QDP-DMfiWput.js} +2 -2
- package/dist/viewer/assets/{file-text-BvszilVL.js → file-text-BFqJQ67P.js} +1 -1
- package/dist/viewer/assets/flow-diagram-preview-B83UU1n_.js +1 -0
- package/dist/viewer/assets/{flowDiagram-HODETNUW-Db0QtNj4.js → flowDiagram-HODETNUW-BNFS2Mkr.js} +1 -1
- package/dist/viewer/assets/ganttDiagram-EL5Y4UJY-DFDsYJNp.js +292 -0
- package/dist/viewer/assets/gitGraphDiagram-WWUBYQGX-BVHabPDp.js +106 -0
- package/dist/viewer/assets/global-loader-XJO9_e0l.js +1 -0
- package/dist/viewer/assets/{globe-Jl6eIZmG.js → globe-CJ35KsQW.js} +1 -1
- package/dist/viewer/assets/gql-FFIj8zdp.js +1 -0
- package/dist/viewer/assets/{grid-scroll-body-CPqSxU6-.js → grid-scroll-body-DC5pYDPJ.js} +2 -2
- package/dist/viewer/assets/iconBase-DtqdW2XR.js +1 -0
- package/dist/viewer/assets/index-B6MxYIzs.js +1 -0
- package/dist/viewer/assets/index-BC5xdBQU.js +48 -0
- package/dist/viewer/assets/index-BIrx3oY4.js +1 -0
- package/dist/viewer/assets/{index-jm22RWpY.js → index-BZGsDmUx.js} +5 -5
- package/dist/viewer/assets/{index-Poftp9f1.js → index-BZXhpoWr.js} +4 -4
- package/dist/viewer/assets/index-Bn2bqqMd.js +1 -0
- package/dist/viewer/assets/{index-HU5pz3kj.js → index-BpCVYTvP.js} +36 -36
- package/dist/viewer/assets/{index-Bt2YHgxl.js → index-CBOYhBKJ.js} +1 -1
- package/dist/viewer/assets/index-CH7cEAxj.js +17 -0
- package/dist/viewer/assets/index-CIf0GId3.js +74 -0
- package/dist/viewer/assets/{index-D7MEHpJf.js → index-Ck66Ic_p.js} +4 -4
- package/dist/viewer/assets/index-Cp9mIQ8F.js +1 -0
- package/dist/viewer/assets/{index-c6Bxcoqm.js → index-DDmBuMKI.js} +1 -1
- package/dist/viewer/assets/{index-BSyJbFDG.js → index-DY3BFyb6.js} +1 -1
- package/dist/viewer/assets/{index-BS94XVnd.js → index-DkzZ-ZvR.js} +1 -1
- package/dist/viewer/assets/{index-C_43VC19.js → index-PglMbhys.js} +1 -1
- package/dist/viewer/assets/infoDiagram-27XIBGKW-CG-wwxBf.js +2 -0
- package/dist/viewer/assets/input--C59pq6j.js +1 -0
- package/dist/viewer/assets/{ishikawaDiagram-5VMMS53U-C4PzFnZ4.js → ishikawaDiagram-5VMMS53U-BlgV7ceJ.js} +2 -2
- package/dist/viewer/assets/{journeyDiagram-3NMN7TZE-Dpn3bBNo.js → journeyDiagram-3NMN7TZE-Cn03_Xl6.js} +2 -2
- package/dist/viewer/assets/{kanban-definition-UXKFOSKX-CJ99H4G6.js → kanban-definition-UXKFOSKX-CJogvDPY.js} +6 -6
- package/dist/viewer/assets/{layout-Bfvxt_D5.js → layout-B26eC4yQ.js} +1 -1
- package/dist/viewer/assets/{lens-run-page-DZneics-.js → lens-run-page-Ba1ppzJt.js} +3 -3
- package/dist/viewer/assets/lens-runs-page-BnUS57LM.js +1 -0
- package/dist/viewer/assets/{link-2-C75goIOt.js → link-2-D1e0xznG.js} +1 -1
- package/dist/viewer/assets/linked-project-dot-BY1gEES9.js +543 -0
- package/dist/viewer/assets/{loader-circle-C5jZoM7X.js → loader-circle-CiqyoJF7.js} +1 -1
- package/dist/viewer/assets/{merge-Cy7YkrN7.js → merge-BhOMvhW1.js} +1 -1
- package/dist/viewer/assets/mermaid.core-BDgZg3kW.js +312 -0
- package/dist/viewer/assets/method-badge-DErZP7y5.js +1 -0
- package/dist/viewer/assets/{mindmap-definition-YA3MSWOX-yQCKA-K4.js → mindmap-definition-YA3MSWOX-DFkLu0ac.js} +2 -2
- package/dist/viewer/assets/nav-links-DZWMpwMR.js +61 -0
- package/dist/viewer/assets/{network-COWNXGMM.js → network-B1apzT1s.js} +1 -1
- package/dist/viewer/assets/{nosql-editor-modal-DTiWkc_r.js → nosql-editor-modal-CvH0SWAi.js} +5 -5
- package/dist/viewer/assets/not-found-page-C-fn8QeM.js +1 -0
- package/dist/viewer/assets/organization-dependency-graph-page-BryP-iJL.js +1 -0
- package/dist/viewer/assets/pegDiagram-XKGWAZYB-g1cM14-L.js +1 -0
- package/dist/viewer/assets/{pieDiagram-E7YTZNPT-DqnkpCX4.js → pieDiagram-E7YTZNPT-WEnDsMY3.js} +2 -2
- package/dist/viewer/assets/{plus-DQakmTjA.js → plus-DbyuOgKB.js} +1 -1
- package/dist/viewer/assets/popover-476u3TN0.js +1 -0
- package/dist/viewer/assets/preload-helper-BlTxHScW.js +1 -0
- package/dist/viewer/assets/{quadrantDiagram-AXDQQJYC-iQjJfars.js → quadrantDiagram-AXDQQJYC-NdfQCpzF.js} +2 -2
- package/dist/viewer/assets/query-D9oj6LGx.js +50 -0
- package/dist/viewer/assets/{quill-rCHj4fCw.js → quill-Cde5JMRD.js} +1 -1
- package/dist/viewer/assets/railroadDiagram-O6MQD6OU-BYhlXlMY.js +1 -0
- package/dist/viewer/assets/{react-BNzYaZuG.js → react-Bx48XWN4.js} +1 -1
- package/dist/viewer/assets/react-flow-wrapper-BcbvHgxz.js +277 -0
- package/dist/viewer/assets/{requirementDiagram-BXWQKSXE-Bv-Vh1dW.js → requirementDiagram-BXWQKSXE-C25Bcm2L.js} +2 -2
- package/dist/viewer/assets/{sankeyDiagram-P5KCCOFB-C__uD07f.js → sankeyDiagram-P5KCCOFB-h8LiCsgk.js} +2 -2
- package/dist/viewer/assets/scroll-area-RagrStGj.js +6 -0
- package/dist/viewer/assets/{search-DW-qhXLk.js → search-vw7ucoOs.js} +1 -1
- package/dist/viewer/assets/section-loader-C4hOfhQS.js +1 -0
- package/dist/viewer/assets/section-not-found-BnrXiPog.js +1 -0
- package/dist/viewer/assets/select-D9fbrr7O.js +1 -0
- package/dist/viewer/assets/{sequenceDiagram-WJ2MYXX4-1RbvcHwO.js → sequenceDiagram-WJ2MYXX4-CDRVvD30.js} +2 -2
- package/dist/viewer/assets/{service-context-C17u_Fw9.js → service-context-D5nBtU18.js} +1 -1
- package/dist/viewer/assets/{service-database-list-page-cYuDHIls.js → service-database-list-page-DBjaDLVy.js} +2 -2
- package/dist/viewer/assets/service-database-page-CenNCgwf.js +2 -0
- package/dist/viewer/assets/service-database-page-inner-gS51TQTZ.js +85 -0
- package/dist/viewer/assets/{service-doc-Dir8g83J.js → service-doc-C-jHqT1U.js} +4 -4
- package/dist/viewer/assets/{service-doc-preview-modal-bJ6tJ5YR.js → service-doc-preview-modal-5sX6FOu1.js} +2 -2
- package/dist/viewer/assets/service-layout-Bf0vZBCH.js +1 -0
- package/dist/viewer/assets/service-pages-CFikvX4t.js +1 -0
- package/dist/viewer/assets/{services-Crqkffr5.js → services-Ivav34WC.js} +4 -4
- package/dist/viewer/assets/{share-2-BmYmqN4k.js → share-2-CQEaWbfH.js} +1 -1
- package/dist/viewer/assets/sizeCapture-INFHLROL-BJ6ndnPM.js +1 -0
- package/dist/viewer/assets/stateDiagram-D77RDMKH-B_tNCX3o.js +1 -0
- package/dist/viewer/assets/stateDiagram-v2-MP3YSRHH-Dl9wqdli.js +1 -0
- package/dist/viewer/assets/{style-DgSU0bQl.js → style-BPesJvJr.js} +8 -8
- package/dist/viewer/assets/super-circle-loader-DSkos6uP.js +1 -0
- package/dist/viewer/assets/super-logo-loader-Cxlbn6MB.js +1 -0
- package/dist/viewer/assets/swimlanes-42K2YHIH-CzURzYwf.js +1 -0
- package/dist/viewer/assets/swimlanesDiagram-VR7AAH4N-DrIlwFtk.js +8 -0
- package/dist/viewer/assets/table-B4pFND-o.js +1 -0
- package/dist/viewer/assets/textarea-Clgdv3Oi.js +1 -0
- package/dist/viewer/assets/{timeline-definition-24CTP7MA-C4yuLwUH.js → timeline-definition-24CTP7MA-D0YXQE1U.js} +2 -2
- package/dist/viewer/assets/ui-graph-logo-gHowu5gP.js +1 -0
- package/dist/viewer/assets/{upload-CRsS43j9.js → upload-CYb3nN_5.js} +1 -1
- package/dist/viewer/assets/{uploads-BOQHX9l4.js → uploads-CX2kdXbM.js} +8 -8
- package/dist/viewer/assets/{use-debounced-value-Ba-kkCUY.js → use-debounced-value-BpNFJd3C.js} +1 -1
- package/dist/viewer/assets/{use-localstorage-DIisTx-J.js → use-localstorage-D233xVb0.js} +1 -1
- package/dist/viewer/assets/use-permissions-BvmxJJ5r.js +1 -0
- package/dist/viewer/assets/{use-scoped-storage-C4RzED-E.js → use-scoped-storage-DL1XVp1j.js} +1 -1
- package/dist/viewer/assets/useMutation-D5ZHwHsx.js +1 -0
- package/dist/viewer/assets/useQuery-Dhe6uxrL.js +1 -0
- package/dist/viewer/assets/{vennDiagram-4TSXK5OY-BCtqXZqe.js → vennDiagram-4TSXK5OY-SSjHlqCQ.js} +2 -2
- package/dist/viewer/assets/{wardleyDiagram-VM6X3IG4-D3OtZJoT.js → wardleyDiagram-VM6X3IG4-CZWNdQxH.js} +2 -2
- package/dist/viewer/assets/{xychartDiagram-S5SC5T6Z-DxLL2CHH.js → xychartDiagram-S5SC5T6Z-B2qAGeb0.js} +2 -2
- package/dist/viewer/assets/zod-BMU4UTQt.js +1 -0
- package/dist/viewer/index.html +10 -1
- package/package.json +57 -57
- package/dist/abort-signals-B4fc3ahg.mjs +0 -34
- package/dist/agents.md +0 -28
- package/dist/anthropic-messages-KPxCHqBN.mjs +0 -14327
- package/dist/auth-storage-BvNH97p9.mjs +0 -2180
- package/dist/azure-openai-config-BbeCSg4y.mjs +0 -55
- package/dist/azure-openai-responses-BRzy8RfL.mjs +0 -182
- package/dist/classifier-shared-DBUHiTGw.mjs +0 -105
- package/dist/cli-2R6QQFp1.mjs +0 -451
- package/dist/cloudflare-workers-ai-system-one-BfqwmRQf.mjs +0 -44
- package/dist/config-D8DMGzIq.mjs +0 -647
- package/dist/cross-spawn-B2jIQPlu.mjs +0 -404
- package/dist/diagnostics-xdSgQR8t.mjs +0 -131
- package/dist/dist-BRyghrKX.mjs +0 -404
- package/dist/dist-D0EzrblG.mjs +0 -12161
- package/dist/dist-EKhnHWHG.mjs +0 -140221
- package/dist/dist-pQtuusFv.mjs +0 -1243
- package/dist/easter-egg-3d-C9_btlWn.mjs +0 -1225
- package/dist/env-api-keys-uytNub6O.mjs +0 -122
- package/dist/error-body-FhmCtR7m.mjs +0 -101
- package/dist/esm-D5isprgl.mjs +0 -1533
- package/dist/esm-DnqE4pfM.mjs +0 -104876
- package/dist/execute-BoTKl80U.mjs +0 -1715
- package/dist/github-copilot-headers-DWcTgoXr.mjs +0 -22
- package/dist/google-generative-ai-Brs5YpJo.mjs +0 -332
- package/dist/google-shared-2CyYa4VE.mjs +0 -33438
- package/dist/google-vertex-DZDUQPKa.mjs +0 -378
- package/dist/hash-DN7ukSfd.mjs +0 -16
- package/dist/headers-GhQHLk-3.mjs +0 -17
- package/dist/jiti-9kWALm4Y.mjs +0 -5439
- package/dist/jiti-loader-f21DrY1K.mjs +0 -27
- package/dist/jiti-static-loader-BI_w28l7.mjs +0 -41704
- package/dist/json-parse-B2mHg7o7.mjs +0 -381
- package/dist/keybinding-hints-D0nLU3ZH.mjs +0 -17899
- package/dist/lib-Dj1gKQJc.mjs +0 -24379
- package/dist/llama-cpp-classify-C73BoMYd.mjs +0 -344
- package/dist/mistral-conversations-DXVR7znL.mjs +0 -698
- package/dist/models-DBdii9gQ.mjs +0 -1255
- package/dist/multipart-parser-DLw9Z0uJ.mjs +0 -298
- package/dist/node-B0NU8X55.mjs +0 -2479
- package/dist/node-B8gaKm9g.mjs +0 -23
- package/dist/openai-I3_AqKDX.mjs +0 -17357
- package/dist/openai-codex-responses-PcZHDuBD.mjs +0 -1198
- package/dist/openai-completions-a_mH01ii.mjs +0 -994
- package/dist/openai-decisions-Du8y4mQG.mjs +0 -142
- package/dist/openai-prompt-cache-Bc6qNWt0.mjs +0 -8
- package/dist/openai-responses-a9lV_U7O.mjs +0 -270
- package/dist/openai-responses-shared-CDs_PBiH.mjs +0 -598
- package/dist/openrouter-images-D0Zc8Cjs.mjs +0 -125
- package/dist/photon_rs-DCvMOMu0.mjs +0 -4252
- package/dist/pi-messages-B5ietIBq.mjs +0 -306
- package/dist/plan-prompt.md +0 -56
- package/dist/prompt.md +0 -44
- package/dist/provider-env-BJhgA66g.mjs +0 -37
- package/dist/provider-retry-DXYM7rVE.mjs +0 -79
- package/dist/runtime-DTkBxiaM.mjs +0 -2822
- package/dist/sanitize-unicode-CqChtoM6.mjs +0 -26
- package/dist/shell-836_JFnI.mjs +0 -162
- package/dist/source-CKPndhKl.mjs +0 -478
- package/dist/src-DNm2QRm3.mjs +0 -5028
- package/dist/system-one-shared-DUAFtNa8.mjs +0 -75
- package/dist/token-DEUkymby.mjs +0 -56
- package/dist/token-util-Cx5S4eKt.mjs +0 -3
- package/dist/tool-DHDYqsyG.mjs +0 -6673
- package/dist/transform-messages-BClk99Vn.mjs +0 -477
- package/dist/typesafe-system-one-D2d8j8hZ.mjs +0 -24
- package/dist/typescript-Br-vsRJV.mjs +0 -6737
- package/dist/uuid-CNCZqNBb.mjs +0 -49
- package/dist/v2-1z8ijsD3.mjs +0 -6120
- package/dist/viewer/assets/abnfDiagram-VCTEODGH-j5YaKnl9.js +0 -1
- package/dist/viewer/assets/actor-avatar-DqmoY8Xc.js +0 -1
- package/dist/viewer/assets/architectureDiagram-5GKGNRK7-D80cJKz_.js +0 -36
- package/dist/viewer/assets/avatar-BI7D-Aia.js +0 -43
- package/dist/viewer/assets/badge-870-A4Y6.js +0 -1
- package/dist/viewer/assets/better-delete-confirmation-modal-Dib31LVb.js +0 -1
- package/dist/viewer/assets/better-dialog-D3AAiahr.js +0 -1
- package/dist/viewer/assets/button-DadqadpO.js +0 -1
- package/dist/viewer/assets/channel-DRkt3LIn.js +0 -1
- package/dist/viewer/assets/checkbox-BXpR079x.js +0 -1
- package/dist/viewer/assets/classDiagram-ZZMXUADV-G5CebNaC.js +0 -1
- package/dist/viewer/assets/classDiagram-v2-VYDZK3BY-G5CebNaC.js +0 -1
- package/dist/viewer/assets/color-input-Efm-lxDy.js +0 -11
- package/dist/viewer/assets/cose-bilkent-JH36ORCC-CrSHFmnp.js +0 -1
- package/dist/viewer/assets/cross-button-5Sr5rWVP.js +0 -1
- package/dist/viewer/assets/cynefinDiagram-5FMLGOSQ-Bdl_eBdu.js +0 -62
- package/dist/viewer/assets/dashboard-diagrams-page-DMupOe1m.js +0 -2
- package/dist/viewer/assets/dashboard-diagrams-page-inner-Dh0yKh2A.js +0 -1
- package/dist/viewer/assets/dashboard-docs-page-DWJ1qOQz.js +0 -2
- package/dist/viewer/assets/dashboard-docs-page-inner-Fs6G3oGo.js +0 -67
- package/dist/viewer/assets/dashboard-layout-D36InAaB.js +0 -1
- package/dist/viewer/assets/dashboard-lens-layout-Cv1Xx3hY.js +0 -1
- package/dist/viewer/assets/dashboard-map-frame-page-CTn61NUO.js +0 -1
- package/dist/viewer/assets/dashboard-plans-page-DxFJkrgK.js +0 -1
- package/dist/viewer/assets/dashboard-service-apis-BHtD9s5z.js +0 -1
- package/dist/viewer/assets/dashboard-service-docs-Uv_1uxxO.js +0 -1
- package/dist/viewer/assets/dashboard-services-CUP-L4Jg.js +0 -1
- package/dist/viewer/assets/diagram-UQ7AKVKN-DhFcurW6.js +0 -41
- package/dist/viewer/assets/diagram-VX7I27RA-DE1nREE8.js +0 -24
- package/dist/viewer/assets/diagram-Z3DM3KII-CSrYcCbc.js +0 -24
- package/dist/viewer/assets/diagram-live-preview-i5doxXLH.js +0 -2
- package/dist/viewer/assets/dialog-D_HtNS17.js +0 -6
- package/dist/viewer/assets/ebnfDiagram-PWID7BFC-BfL8m_sf.js +0 -1
- package/dist/viewer/assets/flow-diagram-preview-T0Z4iMVU.js +0 -1
- package/dist/viewer/assets/ganttDiagram-EL5Y4UJY-CsITpniw.js +0 -292
- package/dist/viewer/assets/gitGraphDiagram-WWUBYQGX-B4eCBGoe.js +0 -106
- package/dist/viewer/assets/iconBase-BoDZfJgC.js +0 -1
- package/dist/viewer/assets/index-5E1tJ7yK.js +0 -125
- package/dist/viewer/assets/index-7XpV2DRw.js +0 -1
- package/dist/viewer/assets/index-C0Rs3s9Z.js +0 -1
- package/dist/viewer/assets/index-CzHjJWeV.js +0 -1
- package/dist/viewer/assets/index-DcEA6SIV.js +0 -74
- package/dist/viewer/assets/infoDiagram-27XIBGKW-lTebN5Ix.js +0 -2
- package/dist/viewer/assets/input-YvHTVS0E.js +0 -1
- package/dist/viewer/assets/lens-runs-page-DoAOObxx.js +0 -1
- package/dist/viewer/assets/linked-project-dot-Ds2uEmJ9.js +0 -543
- package/dist/viewer/assets/mermaid.core-BCRBv8Us.js +0 -312
- package/dist/viewer/assets/method-badge-DMYDKdDZ.js +0 -1
- package/dist/viewer/assets/nav-links-8vT2ixiI.js +0 -61
- package/dist/viewer/assets/not-found-page-CnfLlhS4.js +0 -1
- package/dist/viewer/assets/organization-dependency-graph-page-3xqIxjNx.js +0 -1
- package/dist/viewer/assets/pegDiagram-XKGWAZYB-CMXqeAum.js +0 -1
- package/dist/viewer/assets/popover-CN9ni1N3.js +0 -1
- package/dist/viewer/assets/railroadDiagram-O6MQD6OU-CfqToX3W.js +0 -1
- package/dist/viewer/assets/react-flow-wrapper-BPlRstyO.js +0 -276
- package/dist/viewer/assets/scroll-area-BodE-n7W.js +0 -6
- package/dist/viewer/assets/section-loader-BzpYM_Nx.js +0 -1
- package/dist/viewer/assets/select-DDtnmSET.js +0 -1
- package/dist/viewer/assets/service-database-page-CMi1wF4h.js +0 -2
- package/dist/viewer/assets/service-database-page-inner-CoqAj93L.js +0 -85
- package/dist/viewer/assets/service-layout-0NMm_bKG.js +0 -1
- package/dist/viewer/assets/service-pages-dfnc91SU.js +0 -1
- package/dist/viewer/assets/sizeCapture-INFHLROL-BRJi3gCg.js +0 -1
- package/dist/viewer/assets/stateDiagram-D77RDMKH-DdLsfxgy.js +0 -1
- package/dist/viewer/assets/stateDiagram-v2-MP3YSRHH-DFwg8Qki.js +0 -1
- package/dist/viewer/assets/super-circle-loader-D8MElOMh.js +0 -1
- package/dist/viewer/assets/super-logo-loader-DJYiRbCS.js +0 -1
- package/dist/viewer/assets/swimlanes-42K2YHIH-AuYjrPqh.js +0 -1
- package/dist/viewer/assets/swimlanesDiagram-VR7AAH4N-0nIGA8_4.js +0 -8
- package/dist/viewer/assets/table-Bi4Auk9Z.js +0 -1
- package/dist/viewer/assets/textarea-MgxZ5x6-.js +0 -1
- package/dist/viewer/assets/ui-graph-logo-D4jRhd4z.js +0 -1
- package/dist/viewer/assets/use-permissions-6JVET753.js +0 -1
- package/dist/viewer/assets/useMutation-CmVaR9zz.js +0 -1
- package/dist/viewer/assets/useQuery-B8yYhO0c.js +0 -1
- package/dist/viewer/assets/zod-Dc4H6VVJ.js +0 -1
- package/dist/virtual-modules-DnCx0Gdx.mjs +0 -340
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as P,j as Ce}from"./index-5E1tJ7yK.js";import{G as Ws}from"./iconBase-BoDZfJgC.js";const Ks=P.createContext({});function Mo(t){const e=P.useRef(null);return e.current===null&&(e.current=t()),e.current}const Do=typeof window<"u",Eo=Do?P.useLayoutEffect:P.useEffect,Qe=P.createContext(null);function tn(t,e){t.indexOf(e)===-1&&t.push(e)}function qt(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}function Vu([...t],e,n){const s=e<0?t.length+e:e;if(s>=0&&s<t.length){const i=n<0?t.length+n:n,[r]=t.splice(e,1);t.splice(i,0,r)}return t}const Q=(t,e,n)=>n>e?e:n<t?t:n;let re=()=>{};const st={},Hs=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),zs=t=>typeof t=="object"&&t!==null,Gs=t=>/^0[^.\s]+$/u.test(t);function $s(t){let e;return()=>(e===void 0&&(e=t()),e)}const z=t=>t,Bt=(...t)=>t.reduce((e,n)=>s=>n(e(s))),Et=(t,e,n)=>{const s=e-t;return s?(n-t)/s:1};class en{constructor(){this.subscriptions=[]}add(e){return tn(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,H=t=>t/1e3,_s=(t,e)=>e?t*(1e3/e):0,Xs=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Ro=1e-7,Lo=12;function ko(t,e,n,s,i){let r,o,a=0;do o=e+(n-e)/2,r=Xs(o,s,i)-t,r>0?n=o:e=o;while(Math.abs(r)>Ro&&++a<Lo);return o}function Ft(t,e,n,s){if(t===e&&n===s)return z;const i=r=>ko(r,0,1,t,n);return r=>r===0||r===1?r:Xs(i(r),e,s)}const Ys=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,qs=t=>e=>1-t(1-e),Zs=Ft(.33,1.53,.69,.99),nn=qs(Zs),Js=Ys(nn),Qs=t=>t>=1?1:(t*=2)<1?.5*nn(t):.5*(2-Math.pow(2,-10*(t-1))),sn=t=>1-Math.sin(Math.acos(t)),ti=qs(sn),ei=Ys(sn),Bo=Ft(.42,0,1,1),Fo=Ft(0,0,.58,1),ni=Ft(.42,0,.58,1),Io=t=>Array.isArray(t)&&typeof t[0]!="number",si=t=>Array.isArray(t)&&typeof t[0]=="number",Oo={linear:z,easeIn:Bo,easeInOut:ni,easeOut:Fo,circIn:sn,circInOut:ei,circOut:ti,backIn:nn,backInOut:Js,backOut:Zs,anticipate:Qs},jo=t=>typeof t=="string",Vn=t=>{if(si(t)){re(t.length===4);const[e,n,s,i]=t;return Ft(e,n,s,i)}else if(jo(t))return Oo[t];return t},jt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function No(t){let e=new Set,n=new Set,s=!1,i=!1;const r=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function a(l){r.has(l)&&(c.schedule(l),t()),l(o)}const c={schedule:(l,u=!1,h=!1)=>{const p=h&&s?e:n;return u&&r.add(l),p.add(l),l},cancel:l=>{n.delete(l),r.delete(l)},process:l=>{if(o=l,s){i=!0;return}s=!0;const u=e;e=n,n=u,e.forEach(a),e.clear(),s=!1,i&&(i=!1,c.process(l))}};return c}const Uo=40;function ii(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=jt.reduce((v,w)=>(v[w]=No(r),v),{}),{setup:a,read:c,resolveKeyframes:l,preUpdate:u,update:h,preRender:f,render:p,postRender:d}=o,m=()=>{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,Uo),1)),i.timestamp=w,i.isProcessing=!0,a.process(i),c.process(i),l.process(i),u.process(i),h.process(i),f.process(i),p.process(i),d.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(m))},g=()=>{n=!0,s=!0,i.isProcessing||t(m)};return{schedule:jt.reduce((v,w)=>{const A=o[w];return v[w]=(D,V=!1,b=!1)=>(n||g(),A.schedule(D,V,b)),v},{}),cancel:v=>{for(let w=0;w<jt.length;w++)o[jt[w]].cancel(v)},state:i,steps:o}}const{schedule:M,cancel:it,state:I,steps:he}=ii(typeof requestAnimationFrame<"u"?requestAnimationFrame:z,!0);let Kt;function Wo(){Kt=void 0}const j={now:()=>(Kt===void 0&&j.set(I.isProcessing||st.useManualTiming?I.timestamp:performance.now()),Kt),set:t=>{Kt=t,queueMicrotask(Wo)}},oi=t=>e=>typeof e=="string"&&e.startsWith(t),ri=oi("--"),Ko=oi("var(--"),on=t=>Ko(t)?Ho.test(t.split("/*")[0].trim()):!1,Ho=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Cn(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const wt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Rt={...wt,transform:t=>Q(0,1,t)},Nt={...wt,default:1},Vt=t=>Math.round(t*1e5)/1e5,rn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function zo(t){return t==null}const Go=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,an=(t,e)=>n=>!!(typeof n=="string"&&Go.test(n)&&n.startsWith(t)||e&&!zo(n)&&Object.prototype.hasOwnProperty.call(n,e)),ai=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,r,o,a]=s.match(rn);return{[t]:parseFloat(i),[e]:parseFloat(r),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},$o=t=>Q(0,255,t),fe={...wt,transform:t=>Math.round($o(t))},ut={test:an("rgb","red"),parse:ai("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+fe.transform(t)+", "+fe.transform(e)+", "+fe.transform(n)+", "+Vt(Rt.transform(s))+")"};function _o(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 Me={test:an("#"),parse:_o,transform:ut.transform},It=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),et=It("deg"),J=It("%"),T=It("px"),Xo=It("vh"),Yo=It("vw"),Mn={...J,parse:t=>J.parse(t)/100,transform:t=>J.transform(t*100)},gt={test:an("hsl","hue"),parse:ai("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+J.transform(Vt(e))+", "+J.transform(Vt(n))+", "+Vt(Rt.transform(s))+")"},L={test:t=>ut.test(t)||Me.test(t)||gt.test(t),parse:t=>ut.test(t)?ut.parse(t):gt.test(t)?gt.parse(t):Me.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?ut.transform(t):gt.transform(t),getAnimatableNone:t=>{const e=L.parse(t);return e.alpha=0,L.transform(e)}},qo=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Zo(t){return isNaN(t)&&typeof t=="string"&&(t.match(rn)?.length||0)+(t.match(qo)?.length||0)>0}const li="number",ci="color",Jo="var",Qo="var(",Dn="${}",tr=/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 xt(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let r=0;const a=e.replace(tr,c=>(L.test(c)?(s.color.push(r),i.push(ci),n.push(L.parse(c))):c.startsWith(Qo)?(s.var.push(r),i.push(Jo),n.push(c)):(s.number.push(r),i.push(li),n.push(parseFloat(c))),++r,Dn)).split(Dn);return{values:n,split:a,indexes:s,types:i}}function er(t){return xt(t).values}function ui({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===li?i+=Vt(s[r]):o===ci?i+=L.transform(s[r]):i+=s[r]}return i}}function nr(t){return ui(xt(t))}const sr=t=>typeof t=="number"?0:L.test(t)?L.getAnimatableNone(t):t,ir=(t,e)=>typeof t=="number"?e?.trim().endsWith("/")?t:0:sr(t);function or(t){const e=xt(t);return ui(e)(e.values.map((s,i)=>ir(s,e.split[i])))}const _={test:Zo,parse:er,createTransformer:nr,getAnimatableNone:or};function de(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 rr({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,c=2*n-a;i=de(c,a,t+1/3),r=de(c,a,t),o=de(c,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 C=(t,e,n)=>t+(e-t)*n,pe=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},ar=[Me,ut,gt],lr=t=>ar.find(e=>e.test(t));function En(t){const e=lr(t);if(!e)return!1;let n=e.parse(t);return e===gt&&(n=rr(n)),n}const Rn=(t,e)=>{const n=En(t),s=En(e);if(!n||!s)return Zt(t,e);const i={...n};return r=>(i.red=pe(n.red,s.red,r),i.green=pe(n.green,s.green,r),i.blue=pe(n.blue,s.blue,r),i.alpha=C(n.alpha,s.alpha,r),ut.transform(i))},De=new Set(["none","hidden"]);function cr(t,e){return De.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function ur(t,e){return n=>C(t,e,n)}function ln(t){return typeof t=="number"?ur:typeof t=="string"?on(t)?Zt:L.test(t)?Rn:dr:Array.isArray(t)?hi:typeof t=="object"?L.test(t)?Rn:hr:Zt}function hi(t,e){const n=[...t],s=n.length,i=t.map((r,o)=>ln(r)(r,e[o]));return r=>{for(let o=0;o<s;o++)n[o]=i[o](r);return n}}function hr(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=ln(t[i])(t[i],e[i]));return i=>{for(const r in s)n[r]=s[r](i);return n}}function fr(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 dr=(t,e)=>{const n=_.createTransformer(e),s=xt(t),i=xt(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?De.has(t)&&!i.values.length||De.has(e)&&!s.values.length?cr(t,e):Bt(hi(fr(s,i),i.values),n):Zt(t,e)};function fi(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?C(t,e,n):ln(t)(t,e)}const pr=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>M.update(e,n),stop:()=>it(e),now:()=>I.isProcessing?I.timestamp:j.now()}},di=(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 cn(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 mr(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(cn(s),Jt);return{type:"keyframes",ease:r=>s.next(i*r).value/e,duration:H(i)}}const E={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 Ee(t,e){return t*Math.sqrt(1-e*e)}const gr=12;function yr(t,e,n){let s=n;for(let i=1;i<gr;i++)s=s-t(s)/e(s);return s}const me=.001;function vr({duration:t=E.duration,bounce:e=E.bounce,velocity:n=E.velocity,mass:s=E.mass}){let i,r,o=1-e;o=Q(E.minDamping,E.maxDamping,o),t=Q(E.minDuration,E.maxDuration,H(t)),o<1?(i=l=>{const u=l*o,h=u*t,f=u-n,p=Ee(l,o),d=Math.exp(-h);return me-f/p*d},r=l=>{const h=l*o*t,f=h*n+n,p=Math.pow(o,2)*Math.pow(l,2)*t,d=Math.exp(-h),m=Ee(Math.pow(l,2),o);return(-i(l)+me>0?-1:1)*((f-p)*d)/m}):(i=l=>{const u=Math.exp(-l*t),h=(l-n)*t+1;return-me+u*h},r=l=>{const u=Math.exp(-l*t),h=(n-l)*(t*t);return u*h});const a=5/t,c=yr(i,r,a);if(t=W(t),isNaN(c))return{stiffness:E.stiffness,damping:E.damping,duration:t};{const l=Math.pow(c,2)*s;return{stiffness:l,damping:o*2*Math.sqrt(s*l),duration:t}}}const xr=["duration","bounce"],Tr=["stiffness","damping","mass"];function Ln(t,e){return e.some(n=>t[n]!==void 0)}function wr(t){let e={velocity:E.velocity,stiffness:E.stiffness,damping:E.damping,mass:E.mass,isResolvedFromDuration:!1,...t};if(!Ln(t,Tr)&&Ln(t,xr))if(e.velocity=0,t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,r=2*Q(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:E.mass,stiffness:i,damping:r}}else{const n=vr({...t,velocity:0});e={...e,...n,mass:E.mass},e.isResolvedFromDuration=!0}return e}function Qt(t=E.visualDuration,e=E.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:c,damping:l,mass:u,duration:h,velocity:f,isResolvedFromDuration:p}=wr({...n,velocity:-H(n.velocity||0)}),d=f||0,m=l/(2*Math.sqrt(c*u)),g=o-r,y=H(Math.sqrt(c/u)),x=Math.abs(g)<5;s||(s=x?E.restSpeed.granular:E.restSpeed.default),i||(i=x?E.restDelta.granular:E.restDelta.default);let v,w,A,D,V,b;if(m<1)A=Ee(y,m),D=(d+m*y*g)/A,v=S=>{const R=Math.exp(-m*y*S);return o-R*(D*Math.sin(A*S)+g*Math.cos(A*S))},V=m*y*D+g*A,b=m*y*g-D*A,w=S=>Math.exp(-m*y*S)*(V*Math.sin(A*S)+b*Math.cos(A*S));else if(m===1){v=R=>o-Math.exp(-y*R)*(g+(d+y*g)*R);const S=d+y*g;w=R=>Math.exp(-y*R)*(y*S*R-d)}else{const S=y*Math.sqrt(m*m-1);v=X=>{const tt=Math.exp(-m*y*X),Y=Math.min(S*X,300);return o-tt*((d+m*y*g)*Math.sinh(Y)+S*g*Math.cosh(Y))/S};const R=(d+m*y*g)/S,U=m*y*R-g*S,rt=m*y*g-R*S;w=X=>{const tt=Math.exp(-m*y*X),Y=Math.min(S*X,300);return tt*(U*Math.sinh(Y)+rt*Math.cosh(Y))}}const B={calculatedDuration:p&&h||null,velocity:S=>W(w(S)),next:S=>{if(!p&&m<1){const U=Math.exp(-m*y*S),rt=Math.sin(A*S),X=Math.cos(A*S),tt=o-U*(D*rt+g*X),Y=W(U*(V*rt+b*X));return a.done=Math.abs(Y)<=s&&Math.abs(o-tt)<=i,a.value=a.done?o:tt,a}const R=v(S);if(p)a.done=S>=h;else{const U=W(w(S));a.done=Math.abs(U)<=s&&Math.abs(o-R)<=i}return a.value=a.done?o:R,a},toString:()=>{const S=Math.min(cn(B),Jt),R=di(U=>B.next(S*U).value,S,30);return S+"ms "+R},toTransition:()=>{}};return B}Qt.applyToOptions=t=>{const e=mr(t,100,Qt);return t.ease=e.ease,t.duration=W(e.duration),t.type="keyframes",t};const Pr=5;function pi(t,e,n){const s=Math.max(e-Pr,0);return _s(n-t(s),e-s)}function Re({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:c,restDelta:l=.5,restSpeed:u}){const h=t[0],f={done:!1,value:h},p=b=>a!==void 0&&b<a||c!==void 0&&b>c,d=b=>a===void 0?c:c===void 0||Math.abs(a-b)<Math.abs(c-b)?a:c;let m=n*e;const g=h+m,y=o===void 0?g:o(g);y!==g&&(m=y-h);const x=b=>-m*Math.exp(-b/s),v=b=>y+x(b),w=b=>{const B=x(b),S=v(b);f.done=Math.abs(B)<=l,f.value=f.done?y:S};let A,D;const V=b=>{p(f.value)&&(A=b,D=Qt({keyframes:[f.value,d(f.value)],velocity:pi(v,b,f.value),damping:i,stiffness:r,restDelta:l,restSpeed:u}))};return V(0),{calculatedDuration:null,next:b=>{let B=!1;return!D&&A===void 0&&(B=!0,w(b),V(b)),A!==void 0&&b>=A?D.next(b-A):(!B&&w(b),f)}}}function Sr(t,e,n){const s=[],i=n||st.mix||fi,r=t.length-1;for(let o=0;o<r;o++){let a=i(t[o],t[o+1]);if(e){const c=Array.isArray(e)?e[o]||z:e;a=Bt(c,a)}s.push(a)}return s}function br(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const r=t.length;if(re(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=Sr(e,s,i),c=a.length,l=u=>{if(o&&u<t[0])return e[0];let h=0;if(c>1)for(;h<t.length-2&&!(u<t[h+1]);h++);const f=Et(t[h],t[h+1],u);return a[h](f)};return n?u=>l(Q(t[0],t[r-1],u)):l}function Ar(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=Et(0,e,s);t.push(C(n,1,i))}}function Vr(t){const e=[0];return Ar(e,t.length-1),e}function Cr(t,e){return t.map(n=>n*e)}function Mr(t,e){return t.map(()=>e||ni).splice(0,t.length-1)}function Ct({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=Io(s)?s.map(Vn):Vn(s),r={done:!1,value:e[0]},o=Cr(n&&n.length===e.length?n:Vr(e),t),a=br(o,e,{ease:Array.isArray(i)?i:Mr(e,i)});return{calculatedDuration:t,next:c=>(r.value=a(c),r.done=c>=t,r)}}const Dr=t=>t!==null;function ae(t,{repeat:e,repeatType:n="loop"},s,i=1){const r=t.filter(Dr),a=i<0||e&&n!=="loop"&&e%2===1?0:r.length-1;return!a||s===void 0?r[a]:s}const Er={decay:Re,inertia:Re,tween:Ct,keyframes:Ct,spring:Qt};function mi(t){typeof t.type=="string"&&(t.type=Er[t.type])}class un{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 Rr=t=>t/100;class te extends un{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==j.now()&&this.tick(j.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;mi(e);const{type:n=Ct,repeat:s=0,repeatDelay:i=0,repeatType:r,velocity:o=0}=e;let{keyframes:a}=e;const c=n||Ct;c!==Ct&&typeof a[0]!="number"&&(this.mixKeyframes=Bt(Rr,fi(a[0],a[1])),a=[0,100]);const l=c({...e,keyframes:a});r==="mirror"&&(this.mirroredGenerator=c({...e,keyframes:[...a].reverse(),velocity:-o})),l.calculatedDuration===null&&(l.calculatedDuration=cn(l));const{calculatedDuration:u}=l;this.calculatedDuration=u,this.resolvedDuration=u+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=l}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:c}=this;if(this.startTime===null)return s.next(0);const{delay:l=0,keyframes:u,repeat:h,repeatType:f,repeatDelay:p,type:d,onUpdate:m,finalKeyframe:g}=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 y=this.currentTime-l*(this.playbackSpeed>=0?1:-1),x=this.playbackSpeed>=0?y<0:y>i;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let v=this.currentTime,w=s;if(h){const b=Math.min(this.currentTime,i)/a;let B=Math.floor(b),S=b%1;!S&&b>=1&&(S=1),S===1&&B--,B=Math.min(B,h+1),!!(B%2)&&(f==="reverse"?(S=1-S,p&&(S-=p/a)):f==="mirror"&&(w=o)),v=Q(0,1,S)*a}let A;x?(this.delayState.value=u[0],A=this.delayState):A=w.next(v),r&&!x&&(A.value=r(A.value));let{done:D}=A;!x&&c!==null&&(D=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const V=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&D);return V&&d!==Re&&(A.value=ae(u,this.options,g,this.speed)),m&&m(A.value),V&&this.finish(),A}then(e,n){return this.finished.then(e,n)}get duration(){return H(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+H(e)}get time(){return H(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 pi(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=H(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=pr,startTime:n}=this.options;this.driver||(this.driver=e(i=>this.tick(i))),this.options.onPlay?.();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(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}function Lr(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const ht=t=>t*180/Math.PI,Le=t=>{const e=ht(Math.atan2(t[1],t[0]));return ke(e)},kr={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Le,rotateZ:Le,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},ke=t=>(t=t%360,t<0&&(t+=360),t),kn=Le,Bn=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Fn=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Br={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Bn,scaleY:Fn,scale:t=>(Bn(t)+Fn(t))/2,rotateX:t=>ke(ht(Math.atan2(t[6],t[5]))),rotateY:t=>ke(ht(Math.atan2(-t[2],t[0]))),rotateZ:kn,rotate:kn,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 Be(t){return t.includes("scale")?1:0}function Fe(t,e){if(!t||t==="none")return Be(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=Br,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=kr,i=a}if(!i)return Be(e);const r=s[e],o=i[1].split(",").map(Ir);return typeof r=="function"?r(o):o[r]}const Fr=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return Fe(n,e)};function Ir(t){return parseFloat(t.trim())}const Pt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],St=new Set([...Pt,"pathRotation"]),In=t=>t===wt||t===T,Or=new Set(["x","y","z"]),jr=Pt.filter(t=>!Or.has(t));function Nr(t){const e=[];return jr.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})=>Fe(e,"x"),y:(t,{transform:e})=>Fe(e,"y")};nt.translateX=nt.x;nt.translateY=nt.y;const ft=new Set;let Ie=!1,Oe=!1,je=!1;function gi(){if(Oe){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=Nr(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])=>{s.getValue(r)?.set(o)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}Oe=!1,Ie=!1,ft.forEach(t=>t.complete(je)),ft.clear()}function yi(){ft.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Oe=!0)})}function Ur(){je=!0,yi(),gi(),je=!1}class hn{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),Ie||(Ie=!0,M.read(yi),M.resolveKeyframes(gi))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;if(e[0]===null){const r=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])}Lr(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 Wr=t=>t.startsWith("--");function vi(t,e,n){Wr(e)?t.style.setProperty(e,n):t.style[e]=n}const Kr={};function xi(t,e){const n=$s(t);return()=>Kr[e]??n()}const Hr=xi(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),Ti=xi(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),At=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,On={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:At([0,.65,.55,1]),circOut:At([.55,0,1,.45]),backIn:At([.31,.01,.66,-.59]),backOut:At([.33,1.53,.69,.99])};function wi(t,e){if(t)return typeof t=="function"?Ti()?di(t,e):"ease-out":si(t)?At(t):Array.isArray(t)?t.map(n=>wi(n,e)||On.easeOut):On[t]}function zr(t,e,n,{delay:s=0,duration:i=300,repeat:r=0,repeatType:o="loop",ease:a="easeOut",times:c}={},l=void 0){const u={[e]:n};c&&(u.offset=c);const h=wi(a,i);Array.isArray(h)&&(u.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 l&&(f.pseudoElement=l),t.animate(u,f)}function Pi(t){return typeof t=="function"&&"applyToOptions"in t}function Gr({type:t,...e}){return Pi(t)&&Ti()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class Si extends un{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:c}=e;this.isPseudoElement=!!r,this.allowFlatten=o,this.options=e,re(typeof e.type!="string");const l=Gr(e);this.animation=zr(n,s,i,l,r),l.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const u=ae(i,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(u),vi(n,s,u),this.animation.cancel()}c?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}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(){const e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return H(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+H(e)}get time(){return H(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}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&Hr()?(this.animation.timeline=e,n&&(this.animation.rangeStart=n),s&&(this.animation.rangeEnd=s),z):i(this)}}const bi={anticipate:Qs,backInOut:Js,circInOut:ei};function $r(t){return t in bi}function _r(t){typeof t.ease=="string"&&$r(t.ease)&&(t.ease=bi[t.ease])}const ge=10;class Xr extends Si{constructor(e){_r(e),mi(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 te({...o,autoplay:!1}),c=Math.max(ge,j.now()-this.startTime),l=Q(0,ge,c-ge),u=a.sample(c).value,{name:h}=this.options;r&&h&&vi(r,h,u),n.setWithVelocity(a.sample(Math.max(0,c-l)).value,u,l),a.stop()}}const jn=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(_.test(t)||t==="0")&&!t.startsWith("url("));function Yr(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 qr(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=jn(i,e),a=jn(r,e);return!o||!a?!1:Yr(t)||(n==="spring"||Pi(n))&&s}function Ne(t){t.duration=0,t.type="keyframes"}const Ai=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),Zr=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Jr(t){for(let e=0;e<t.length;e++)if(typeof t[e]=="string"&&Zr.test(t[e]))return!0;return!1}const Qr=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),ta=$s(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function ea(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:r,type:o,keyframes:a}=t,c=e?.owner?.current;if(!(c instanceof HTMLElement)&&!(c instanceof SVGElement))return!1;const{onUpdate:l,transformTemplate:u}=e.owner.getProps();return ta()&&n&&(Ai.has(n)||Qr.has(n)&&Jr(a))&&(n!=="transform"||!u)&&!l&&!s&&i!=="mirror"&&r!==0&&o!=="inertia"}const na=40;class sa extends un{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:o="loop",keyframes:a,name:c,motionValue:l,element:u,...h}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=j.now();const f={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:r,repeatType:o,name:c,motionValue:l,element:u,...h},p=u?.KeyframeResolver||hn;this.keyframeResolver=new p(a,(d,m,g)=>this.onKeyframesResolved(d,m,f,!g),c,l,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,n,s,i){this.keyframeResolver=void 0;const{name:r,type:o,velocity:a,delay:c,isHandoff:l,onUpdate:u}=s;this.resolvedAt=j.now();let h=!0;qr(e,r,o,a)||(h=!1,(st.instantAnimations||!c)&&u?.(ae(e,s,n)),e[0]=e[e.length-1],Ne(s),s.repeat=0);const p={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>na?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:e},d=h&&!l&&ea(p),m=p.motionValue?.owner?.current;let g;if(d)try{g=new Xr({...p,element:m})}catch{g=new te(p)}else g=new te(p);g.finished.then(()=>{this.notifyFinished()}).catch(z),this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Ur()),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(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function Vi(t,e,n,s=0,i=1){const r=Array.from(t).sort((l,u)=>l.sortNodePosition(u)).indexOf(e),o=t.size,a=(o-1)*s;return typeof n=="function"?n(r,o):i===1?r*s:a-r*s}const Nn=30,ia=t=>!isNaN(parseFloat(t)),Un={current:void 0};class oa{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{const i=j.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const r of this.dependents)r.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=ia(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 en);const s=this.events[e].add(n);return e==="change"?()=>{s(),M.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(){this.events.change?.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 Un.current&&Un.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=j.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Nn)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Nn);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(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Tt(t,e){return new oa(t,e)}function Ci(t,e){if(t?.inherit&&e){const{inherit:n,...s}=t;return{...e,...s}}return t}function fn(t,e){const n=t?.[e]??t?.default??t;return n!==t?Ci(n,t):n}const ra={type:"spring",stiffness:500,damping:25,restSpeed:10},aa=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),la={type:"keyframes",duration:.8},ca={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ua=(t,{keyframes:e})=>e.length>2?la:St.has(t)?t.startsWith("scale")?aa(e[1]):ra:ca,ha=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function fa(t){for(const e in t)if(!ha.has(e))return!0;return!1}const dn=(t,e,n,s={},i,r)=>o=>{const a=fn(s,t)||{},c=a.delay||s.delay||0;let{elapsed:l=0}=s;l=l-W(c);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-l,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};fa(a)||Object.assign(u,ua(t,u)),u.duration&&(u.duration=W(u.duration)),u.repeatDelay&&(u.repeatDelay=W(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let h=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Ne(u),u.delay===0&&(h=!0)),(st.instantAnimations||st.skipAnimations||i?.shouldSkipAnimations||a.skipAnimations)&&(h=!0,Ne(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,h&&!r&&e.get()!==void 0){const f=ae(u.keyframes,a);if(f!==void 0){M.update(()=>{u.onUpdate(f),u.onComplete()});return}}return a.isSync?new te(u):new sa(u)},da=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function pa(t){const e=da.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}function Mi(t,e,n=1){const[s,i]=pa(t);if(!s)return;const r=window.getComputedStyle(e).getPropertyValue(s);if(r){const o=r.trim();return Hs(o)?parseFloat(o):o}return on(i)?Mi(i,e,n+1):i}function Wn(t){const e=[{},{}];return t?.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function pn(t,e,n,s){if(typeof e=="function"){const[i,r]=Wn(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]=Wn(s);e=e(n!==void 0?n:t.custom,i,r)}return e}function dt(t,e,n){const s=t.getProps();return pn(s,e,n!==void 0?n:s.custom,t)}const Di=new Set(["width","height","top","left","right","bottom",...Pt]),Ue=t=>Array.isArray(t);function ma(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Tt(n))}function ga(t){return Ue(t)?t[t.length-1]||0:t}function ya(t,e){const n=dt(t,e);let{transitionEnd:s={},transition:i={},...r}=n||{};r={...r,...s};for(const o in r){const a=ga(r[o]);ma(t,o,a)}}const O=t=>!!(t&&t.getVelocity);function va(t){return!!(O(t)&&t.add)}function We(t,e){const n=t.getValue("willChange");if(va(n))return n.add(e);if(!n&&st.WillChange){const s=new st.WillChange("auto");t.addValue("willChange",s),s.add(e)}}function mn(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const xa="framerAppearId",Ei="data-"+mn(xa);function Ri(t){return t.props[Ei]}function Ta({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function Li(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:r,transitionEnd:o,...a}=e;const c=t.getDefaultTransition();r=r?Ci(r,c):c;const l=r?.reduceMotion,u=r?.skipAnimations;s&&(r=s);const h=[],f=i&&t.animationState&&t.animationState.getState()[i],p=r?.path;p&&p.animateVisualElement(t,a,r,n,h);for(const d in a){const m=t.getValue(d,t.latestValues[d]??null),g=a[d];if(g===void 0||f&&Ta(f,d))continue;const y={delay:n,...fn(r||{},d)};u&&(y.skipAnimations=!0);const x=m.get();if(x!==void 0&&!m.isAnimating()&&!Array.isArray(g)&&g===x&&!y.velocity){M.update(()=>m.set(g));continue}let v=!1;if(window.MotionHandoffAnimation){const D=Ri(t);if(D){const V=window.MotionHandoffAnimation(D,d,M);V!==null&&(y.startTime=V,v=!0)}}We(t,d);const w=l??t.shouldReduceMotion;m.start(dn(d,m,g,w&&Di.has(d)?{type:!1}:y,t,v));const A=m.animation;A&&h.push(A)}if(o){const d=()=>M.update(()=>{o&&ya(t,o)});h.length?Promise.all(h).then(d):d()}return h}function Ke(t,e,n={}){const s=dt(t,e,n.type==="exit"?t.presenceContext?.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const r=s?()=>Promise.all(Li(t,s,n)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(c=0)=>{const{delayChildren:l=0,staggerChildren:u,staggerDirection:h}=i;return wa(t,e,c,l,u,h,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[c,l]=a==="beforeChildren"?[r,o]:[o,r];return c().then(()=>l())}else return Promise.all([r(),o(n.delay)])}function wa(t,e,n=0,s=0,i=0,r=1,o){const a=[];for(const c of t.variantChildren)c.notify("AnimationStart",e),a.push(Ke(c,e,{...o,delay:n+(typeof s=="function"?0:s)+Vi(t.variantChildren,c,s,i,r)}).then(()=>c.notify("AnimationComplete",e)));return Promise.all(a)}function Pa(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(r=>Ke(t,r,n));s=Promise.all(i)}else if(typeof e=="string")s=Ke(t,e,n);else{const i=typeof e=="function"?dt(t,e,n.custom):e;s=Promise.all(Li(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}const Sa={test:t=>t==="auto",parse:t=>t},ki=t=>e=>e.test(t),Bi=[wt,T,J,et,Yo,Xo,Sa],Kn=t=>Bi.find(ki(t));function ba(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Gs(t):!0}const Aa=new Set(["brightness","contrast","saturate","opacity"]);function Va(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(rn)||[];if(!s)return t;const i=n.replace(s,"");let r=Aa.has(e)?1:0;return s!==n&&(r*=100),e+"("+r+i+")"}const Ca=/\b([a-z-]*)\(.*?\)/gu,He={..._,getAnimatableNone:t=>{const e=t.match(Ca);return e?e.map(Va).join(" "):t}},ze={..._,getAnimatableNone:t=>{const e=_.parse(t);return _.createTransformer(t)(e.map(s=>typeof s=="number"?0:typeof s=="object"?{...s,alpha:1}:s))}},Hn={...wt,transform:Math.round},Ma={rotate:et,pathRotation:et,rotateX:et,rotateY:et,rotateZ:et,scale:Nt,scaleX:Nt,scaleY:Nt,scaleZ:Nt,skew:et,skewX:et,skewY:et,distance:T,translateX:T,translateY:T,translateZ:T,x:T,y:T,z:T,perspective:T,transformPerspective:T,opacity:Rt,originX:Mn,originY:Mn,originZ:T},ee={borderWidth:T,borderTopWidth:T,borderRightWidth:T,borderBottomWidth:T,borderLeftWidth:T,borderRadius:T,borderTopLeftRadius:T,borderTopRightRadius:T,borderBottomRightRadius:T,borderBottomLeftRadius:T,width:T,maxWidth:T,height:T,maxHeight:T,top:T,right:T,bottom:T,left:T,inset:T,insetBlock:T,insetBlockStart:T,insetBlockEnd:T,insetInline:T,insetInlineStart:T,insetInlineEnd:T,padding:T,paddingTop:T,paddingRight:T,paddingBottom:T,paddingLeft:T,paddingBlock:T,paddingBlockStart:T,paddingBlockEnd:T,paddingInline:T,paddingInlineStart:T,paddingInlineEnd:T,margin:T,marginTop:T,marginRight:T,marginBottom:T,marginLeft:T,marginBlock:T,marginBlockStart:T,marginBlockEnd:T,marginInline:T,marginInlineStart:T,marginInlineEnd:T,fontSize:T,backgroundPositionX:T,backgroundPositionY:T,...Ma,zIndex:Hn,fillOpacity:Rt,strokeOpacity:Rt,numOctaves:Hn},Da={...ee,color:L,backgroundColor:L,outlineColor:L,fill:L,stroke:L,borderColor:L,borderTopColor:L,borderRightColor:L,borderBottomColor:L,borderLeftColor:L,filter:He,WebkitFilter:He,mask:ze,WebkitMask:ze},Fi=t=>Da[t],Ea=new Set([He,ze]);function Ii(t,e){let n=Fi(t);return Ea.has(n)||(n=_),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Ra=new Set(["auto","none","0"]);function La(t,e,n){let s=0,i;for(;s<t.length&&!i;){const r=t[s];typeof r=="string"&&!Ra.has(r)&&xt(r).values.length&&(i=t[s]),s++}if(i&&n)for(const r of e)t[r]=Ii(n,i)}class ka extends hn{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 u=0;u<e.length;u++){let h=e[u];if(typeof h=="string"&&(h=h.trim(),on(h))){const f=Mi(h,n.current);f!==void 0&&(e[u]=f),u===e.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!Di.has(s)||e.length!==2)return;const[i,r]=e,o=Kn(i),a=Kn(r),c=Cn(i),l=Cn(r);if(c!==l&&nt[s]){this.needsMeasurement=!0;return}if(o!==a)if(In(o)&&In(a))for(let u=0;u<e.length;u++){const h=e[u];typeof h=="string"&&(e[u]=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||ba(e[i]))&&s.push(i);s.length&&La(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(){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),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,c])=>{e.getValue(a).set(c)}),this.resolveNoneKeyframes()}}const gn=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"];function Oi(t,e,n){if(t==null)return[];if(t instanceof EventTarget)return[t];if(typeof t=="string"){let s=document;const i=n?.[t]??s.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t).filter(s=>s!=null)}const Ge=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function Ba(t){return zs(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}const{schedule:yn}=ii(queueMicrotask,!1),$={x:!1,y:!1};function ji(){return $.x||$.y}function Fa(t){return t==="x"||t==="y"?$[t]?null:($[t]=!0,()=>{$[t]=!1}):$.x||$.y?null:($.x=$.y=!0,()=>{$.x=$.y=!1})}function Ni(t,e){const n=Oi(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}function Ia(t){return!(t.pointerType==="touch"||ji())}function Oa(t,e,n={}){const[s,i,r]=Ni(t,n);return s.forEach(o=>{let a=!1,c=!1,l;const u=()=>{o.removeEventListener("pointerleave",d)},h=g=>{l&&(l(g),l=void 0),u()},f=g=>{a=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),c&&(c=!1,h(g))},p=()=>{a=!0,window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",f,i)},d=g=>{if(g.pointerType!=="touch"){if(a){c=!0;return}h(g)}},m=g=>{if(!Ia(g))return;c=!1;const y=e(o,g);typeof y=="function"&&(l=y,o.addEventListener("pointerleave",d,i))};o.addEventListener("pointerenter",m,i),o.addEventListener("pointerdown",p,i)}),r}const Ui=(t,e)=>e?t===e?!0:Ui(t,e.parentElement):!1,vn=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,ja=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Na(t){return ja.has(t.tagName)||t.isContentEditable===!0}const Ua=new Set(["INPUT","SELECT","TEXTAREA"]);function Wa(t){return Ua.has(t.tagName)||t.isContentEditable===!0}const Ht=new WeakSet;function zn(t){return e=>{e.key==="Enter"&&t(e)}}function ye(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const Ka=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=zn(()=>{if(Ht.has(n))return;ye(n,"down");const i=zn(()=>{ye(n,"up")}),r=()=>ye(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 Gn(t){return vn(t)&&!ji()}const $n=new WeakSet;function Ha(t,e,n={}){const[s,i,r]=Ni(t,n),o=a=>{const c=a.currentTarget;if(!Gn(a)||$n.has(a))return;Ht.add(c),n.stopPropagation&&$n.add(a);const l=e(c,a),u={...i,capture:!0},h=(d,m)=>{window.removeEventListener("pointerup",f,u),window.removeEventListener("pointercancel",p,u),Ht.has(c)&&Ht.delete(c),Gn(d)&&typeof l=="function"&&l(d,{success:m})},f=d=>{h(d,c===window||c===document||n.useGlobalTarget||Ui(c,d.target))},p=d=>{h(d,!1)};window.addEventListener("pointerup",f,u),window.addEventListener("pointercancel",p,u)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),Ba(a)&&(a.addEventListener("focus",l=>Ka(l,i)),!Na(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),r}function xn(t){return zs(t)&&"ownerSVGElement"in t}const zt=new WeakMap;let Gt;const Wi=(t,e,n)=>(s,i)=>i&&i[0]?i[0][t+"Size"]:xn(s)&&"getBBox"in s?s.getBBox()[e]:s[n],za=Wi("inline","width","offsetWidth"),Ga=Wi("block","height","offsetHeight");function $a({target:t,borderBoxSize:e}){zt.get(t)?.forEach(n=>{n(t,{get width(){return za(t,e)},get height(){return Ga(t,e)}})})}function _a(t){t.forEach($a)}function Xa(){typeof ResizeObserver>"u"||(Gt=new ResizeObserver(_a))}function Ya(t,e){Gt||Xa();const n=Oi(t);return n.forEach(s=>{let i=zt.get(s);i||(i=new Set,zt.set(s,i)),i.add(e),Gt?.observe(s)}),()=>{n.forEach(s=>{const i=zt.get(s);i?.delete(e),i?.size||Gt?.unobserve(s)})}}const $t=new Set;let yt;function qa(){yt=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};$t.forEach(e=>e(t))},window.addEventListener("resize",yt)}function Za(t){return $t.add(t),yt||qa(),()=>{$t.delete(t),!$t.size&&typeof yt=="function"&&(window.removeEventListener("resize",yt),yt=void 0)}}function _n(t,e){return typeof t=="function"?Za(t):Ya(t,e)}function Ja(t){return xn(t)&&t.tagName==="svg"}const Qa=[...Bi,L,_],tl=t=>Qa.find(ki(t)),Xn=()=>({translate:0,scale:1,origin:0,originPoint:0}),vt=()=>({x:Xn(),y:Xn()}),Yn=()=>({min:0,max:0}),k=()=>({x:Yn(),y:Yn()}),el=new WeakMap;function le(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function Lt(t){return typeof t=="string"||Array.isArray(t)}const Tn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],wn=["initial",...Tn];function ce(t){return le(t.animate)||wn.some(e=>Lt(t[e]))}function Ki(t){return!!(ce(t)||t.variants)}function nl(t,e,n){for(const s in e){const i=e[s],r=n[s];if(O(i))t.addValue(s,i);else if(O(r))t.addValue(s,Tt(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,Tt(o!==void 0?o:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const $e={current:null},Hi={current:!1},sl=typeof window<"u";function il(){if(Hi.current=!0,!!sl)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>$e.current=t.matches;t.addEventListener("change",e),e()}else $e.current=!1}const qn=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let ne={};function zi(t){ne=t}function ol(){return ne}class rl{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,skipAnimations:r,blockInitialAnimation:o,visualState:a},c={}){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=hn,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 p=j.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,M.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=a;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=r,this.options=c,this.blockInitialAnimation=!!o,this.isControllingVariants=ce(n),this.isVariantNode=Ki(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:h,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const p in f){const d=f[p];l[p]!==void 0&&O(d)&&d.set(l[p])}}mount(e){if(this.hasBeenMounted)for(const n in this.initialValues)this.values.get(n)?.jump(this.initialValues[n]),this.latestValues[n]=this.initialValues[n];this.current=e,el.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Hi.current||il(),this.shouldReduceMotion=$e.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),it(this.notifyUpdate),it(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}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&&Ai.has(e)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:c,ease:l,duration:u}=n.accelerate,h=new Si({element:this.current,name:e,keyframes:a,times:c,ease:l,duration:W(u)}),f=o(h);this.valueSubscriptions.set(e,()=>{f(),h.cancel()});return}const s=St.has(e);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&M.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()})}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 ne){const n=ne[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):k()}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<qn.length;s++){const i=qn[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=nl(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=Tt(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"&&(Hs(s)||Gs(s))?s=parseFloat(s):!tl(s)&&_.test(n)&&(s=Ii(e,n)),this.setBaseTarget(e,O(s)?s.get():s)),O(s)?s.get():s}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const r=pn(this.props,n,this.presenceContext?.custom);r&&(s=r[e])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!O(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 en),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){yn.render(this.render)}}class Gi extends rl{constructor(){super(...arguments),this.KeyframeResolver=ka}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;O(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 $i({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function al({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function ll(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 ve(t){return t===void 0||t===1}function _e({scale:t,scaleX:e,scaleY:n}){return!ve(t)||!ve(e)||!ve(n)}function ct(t){return _e(t)||_i(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function _i(t){return Zn(t.x)||Zn(t.y)}function Zn(t){return t&&t!=="0%"}function se(t,e,n){const s=t-n,i=e*s;return n+i}function Jn(t,e,n,s,i){return i!==void 0&&(t=se(t,i,s)),se(t,n,s)+e}function Xe(t,e=0,n=1,s,i){t.min=Jn(t.min,e,n,s,i),t.max=Jn(t.max,e,n,s,i)}function Xi(t,{x:e,y:n}){Xe(t.x,e.translate,e.scale,e.originPoint),Xe(t.y,n.translate,n.scale,n.originPoint)}const Qn=.999999999999,ts=1.0000000000001;function cl(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let r,o;for(let a=0;a<i;a++){r=n[a],o=r.projectionDelta;const{visualElement:c}=r.options;c&&c.props.style&&c.props.style.display==="contents"||(s&&r.options.layoutScroll&&r.scroll&&r!==r.root&&(Z(t.x,-r.scroll.offset.x),Z(t.y,-r.scroll.offset.y)),o&&(e.x*=o.x.scale,e.y*=o.y.scale,Xi(t,o)),s&&ct(r.latestValues)&&_t(t,r.latestValues,r.layout?.layoutBox))}e.x<ts&&e.x>Qn&&(e.x=1),e.y<ts&&e.y>Qn&&(e.y=1)}function Z(t,e){t.min+=e,t.max+=e}function es(t,e,n,s,i=.5){const r=C(t.min,t.max,i);Xe(t,e,n,r,s)}function ns(t,e){return typeof t=="string"?parseFloat(t)/100*(e.max-e.min):t}function _t(t,e,n){const s=n??t;es(t.x,ns(e.x,s.x),e.scaleX,e.scale,e.originX),es(t.y,ns(e.y,s.y),e.scaleY,e.scale,e.originY)}function Yi(t,e){return $i(ll(t.getBoundingClientRect(),e))}function ul(t,e,n){const s=Yi(t,n),{scroll:i}=e;return i&&(Z(s.x,i.offset.x),Z(s.y,i.offset.y)),s}const hl={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},fl=Pt.length;function dl(t,e,n){let s="",i=!0;for(let o=0;o<fl;o++){const a=Pt[o],c=t[a];if(c===void 0)continue;let l=!0;if(typeof c=="number")l=c===(a.startsWith("scale")?1:0);else{const u=parseFloat(c);l=a.startsWith("scale")?u===1:u===0}if(!l||n){const u=Ge(c,ee[a]);if(!l){i=!1;const h=hl[a]||a;s+=`${h}(${u}) `}n&&(e[a]=u)}}const r=t.pathRotation;return r&&(i=!1,s+=`rotate(${Ge(r,ee.pathRotation)}) `),s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function Pn(t,e,n){const{style:s,vars:i,transformOrigin:r}=t;let o=!1,a=!1;for(const c in e){const l=e[c];if(St.has(c)){o=!0;continue}else if(ri(c)){i[c]=l;continue}else{const u=Ge(l,ee[c]);c.startsWith("origin")?(a=!0,r[c]=u):s[c]=u}}if(e.transform||(o||n?s.transform=dl(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:c="50%",originY:l="50%",originZ:u=0}=r;s.transformOrigin=`${c} ${l} ${u}`}}function qi(t,{style:e,vars:n},s,i){const r=t.style;let o;for(o in e)r[o]=e[o];i?.applyProjectionStyles(r,s);for(o in n)r.setProperty(o,n[o])}function ss(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const bt={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(T.test(t))t=parseFloat(t);else return t;const n=ss(t,e.target.x),s=ss(t,e.target.y);return`${n}% ${s}%`}},pl={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,c=n.y.scale*e.y;i[0+o]/=a,i[1+o]/=c;const l=C(a,c,.5);return typeof i[2+o]=="number"&&(i[2+o]/=l),typeof i[3+o]=="number"&&(i[3+o]/=l),r(i)}},Ye={borderRadius:{...bt,applyTo:[...gn]},borderTopLeftRadius:bt,borderTopRightRadius:bt,borderBottomLeftRadius:bt,borderBottomRightRadius:bt,boxShadow:pl};function Zi(t,{layout:e,layoutId:n}){return St.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Ye[t]||t==="opacity")}function Sn(t,e,n){const s=t.style,i=e?.style,r={};if(!s)return r;for(const o in s)(O(s[o])||i&&O(i[o])||Zi(o,t)||n?.getValue(o)?.liveStyle!==void 0)&&(r[o]=s[o]);return r}function ml(t){return window.getComputedStyle(t)}class gl extends Gi{constructor(){super(...arguments),this.type="html",this.renderInstance=qi}mount(e){re(!!e.style),super.mount(e)}readValueFromInstance(e,n){if(St.has(n))return this.projection?.isProjecting?Be(n):Fr(e,n);{const s=ml(e),i=(ri(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Yi(e,n)}build(e,n,s){Pn(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return Sn(e,n,s)}}const yl={offset:"stroke-dashoffset",array:"stroke-dasharray"},vl={offset:"strokeDashoffset",array:"strokeDasharray"};function xl(t,e,n=1,s=0,i=!0){t.pathLength=1;const r=i?yl:vl;t[r.offset]=`${-s}`,t[r.array]=`${e} ${n}`}const Tl=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Ji(t,{attrX:e,attrY:n,attrScale:s,pathLength:i,pathSpacing:r=1,pathOffset:o=0,...a},c,l,u){if(Pn(t,a,l),c){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=u?.transformBox??"fill-box",delete h.transformBox);for(const p of Tl)h[p]!==void 0&&(f[p]=h[p],delete h[p]);e!==void 0&&(h.x=e),n!==void 0&&(h.y=n),s!==void 0&&(h.scale=s),i!==void 0&&xl(h,i,r,o,!1)}const Qi=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"]),to=t=>typeof t=="string"&&t.toLowerCase()==="svg";function wl(t,e,n,s){qi(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(Qi.has(i)?i:mn(i),e.attrs[i])}function eo(t,e,n){const s=Sn(t,e,n);for(const i in t)if(O(t[i])||O(e[i])){const r=Pt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[r]=t[i]}return s}class Pl extends Gi{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=k}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(St.has(n)){const s=Fi(n);return s&&s.default||0}return n=Qi.has(n)?n:mn(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return eo(e,n,s)}build(e,n,s){Ji(e,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(e,n,s,i){wl(e,n,s,i)}mount(e){this.isSVGTag=to(e.tagName),super.mount(e)}}const Sl=wn.length;function no(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?no(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<Sl;n++){const s=wn[n],i=t.props[s];(Lt(i)||i===!1)&&(e[s]=i)}return e}function so(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 bl=[...Tn].reverse(),Al=Tn.length;function Vl(t){return e=>Promise.all(e.map(({animation:n,options:s})=>Pa(t,n,s)))}function Cl(t){let e=Vl(t),n=is(),s=!0,i=!1;const r=l=>(u,h)=>{const f=dt(t,h,l==="exit"?t.presenceContext?.custom:void 0);if(f){const{transition:p,transitionEnd:d,...m}=f;u={...u,...m,...d}}return u};function o(l){e=l(t)}function a(l){const{props:u}=t,h=no(t.parent)||{},f=[],p=new Set;let d={},m=1/0;for(let y=0;y<Al;y++){const x=bl[y],v=n[x],w=u[x]!==void 0?u[x]:h[x],A=Lt(w),D=x===l?v.isActive:null;D===!1&&(m=y);let V=w===h[x]&&w!==u[x]&&A;if(V&&(s||i)&&t.manuallyAnimateOnMount&&(V=!1),v.protectedKeys={...d},!v.isActive&&D===null||!w&&!v.prevProp||le(w)||typeof w=="boolean")continue;if(x==="exit"&&v.isActive&&D!==!0){v.prevResolvedValues&&(d={...d,...v.prevResolvedValues});continue}const b=Ml(v.prevProp,w);let B=b||x===l&&v.isActive&&!V&&A||y>m&&A,S=!1;const R=Array.isArray(w)?w:[w];let U=R.reduce(r(x),{});D===!1&&(U={});const{prevResolvedValues:rt={}}=v,X={...rt,...U},tt=F=>{B=!0,p.has(F)&&(S=!0,p.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(d.hasOwnProperty(F))continue;let pt=!1;Ue(K)&&Ue(at)?pt=!so(K,at)||b:pt=K!==at,pt?K!=null?tt(F):p.add(F):K!==void 0&&p.has(F)?tt(F):v.protectedKeys[F]=!0}v.prevProp=w,v.prevResolvedValues=U,v.isActive&&(d={...d,...U}),(s||i)&&t.blockInitialAnimation&&(B=!1);const Y=V&&b;B&&(!Y||S)&&f.push(...R.map(F=>{const K={type:x};if(typeof F=="string"&&(s||i)&&!Y&&t.manuallyAnimateOnMount&&t.parent){const{parent:at}=t,pt=dt(at,F);if(at.enteringChildren&&pt){const{delayChildren:Co}=pt.transition||{};K.delay=Vi(at.enteringChildren,t,Co)}}return{animation:F,options:K}}))}if(p.size){const y={};if(typeof u.initial!="boolean"){const x=dt(t,Array.isArray(u.initial)?u.initial[0]:u.initial);x&&x.transition&&(y.transition=x.transition)}p.forEach(x=>{const v=t.getBaseTarget(x),w=t.getValue(x);w&&(w.liveStyle=!0),y[x]=v??null}),f.push({animation:y})}let g=!!f.length;return s&&(u.initial===!1||u.initial===u.animate)&&!t.manuallyAnimateOnMount&&(g=!1),s=!1,i=!1,g?e(f):Promise.resolve()}function c(l,u){if(n[l].isActive===u)return Promise.resolve();t.variantChildren?.forEach(f=>f.animationState?.setActive(l,u)),n[l].isActive=u;const h=a(l);for(const f in n)n[f].protectedKeys={};return h}return{animateChanges:a,setActive:c,setAnimateFunction:o,getState:()=>n,reset:()=>{n=is(),i=!0}}}function Ml(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!so(e,t):!1}function lt(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function is(){return{animate:lt(!0),whileInView:lt(),whileHover:lt(),whileTap:lt(),whileDrag:lt(),whileFocus:lt(),exit:lt()}}function qe(t,e){t.min=e.min,t.max=e.max}function G(t,e){qe(t.x,e.x),qe(t.y,e.y)}function os(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}const io=1e-4,Dl=1-io,El=1+io,oo=.01,Rl=0-oo,Ll=0+oo;function N(t){return t.max-t.min}function kl(t,e,n){return Math.abs(t-e)<=n}function rs(t,e,n,s=.5){t.origin=s,t.originPoint=C(e.min,e.max,t.origin),t.scale=N(n)/N(e),t.translate=C(n.min,n.max,t.origin)-t.originPoint,(t.scale>=Dl&&t.scale<=El||isNaN(t.scale))&&(t.scale=1),(t.translate>=Rl&&t.translate<=Ll||isNaN(t.translate))&&(t.translate=0)}function Mt(t,e,n,s){rs(t.x,e.x,n.x,s?s.originX:void 0),rs(t.y,e.y,n.y,s?s.originY:void 0)}function as(t,e,n,s=0){const i=s?C(n.min,n.max,s):n.min;t.min=i+e.min,t.max=t.min+N(e)}function Bl(t,e,n,s){as(t.x,e.x,n.x,s?.x),as(t.y,e.y,n.y,s?.y)}function ls(t,e,n,s=0){const i=s?C(n.min,n.max,s):n.min;t.min=e.min-i,t.max=t.min+N(e)}function ie(t,e,n,s){ls(t.x,e.x,n.x,s?.x),ls(t.y,e.y,n.y,s?.y)}function cs(t,e,n,s,i){return t-=e,t=se(t,1/n,s),i!==void 0&&(t=se(t,1/i,s)),t}function Fl(t,e=0,n=1,s=.5,i,r=t,o=t){if(J.test(e)&&(e=parseFloat(e),e=C(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=C(r.min,r.max,s);t===r&&(a-=e),t.min=cs(t.min,e,n,a,i),t.max=cs(t.max,e,n,a,i)}function us(t,e,[n,s,i],r,o){Fl(t,e[n],e[s],e[i],e.scale,r,o)}const Il=["x","scaleX","originX"],Ol=["y","scaleY","originY"];function hs(t,e,n,s){us(t.x,e,Il,n?n.x:void 0,s?s.x:void 0),us(t.y,e,Ol,n?n.y:void 0,s?s.y:void 0)}function fs(t){return t.translate===0&&t.scale===1}function ro(t){return fs(t.x)&&fs(t.y)}function ds(t,e){return t.min===e.min&&t.max===e.max}function jl(t,e){return ds(t.x,e.x)&&ds(t.y,e.y)}function ps(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function ao(t,e){return ps(t.x,e.x)&&ps(t.y,e.y)}function ms(t){return N(t.x)/N(t.y)}function gs(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function q(t){return[t("x"),t("y")]}function Nl(t,e,n){let s="";const i=t.x.translate/e.x,r=t.y.translate/e.y,o=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:l,rotate:u,pathRotation:h,rotateX:f,rotateY:p,skewX:d,skewY:m}=n;l&&(s=`perspective(${l}px) ${s}`),u&&(s+=`rotate(${u}deg) `),h&&(s+=`rotate(${h}deg) `),f&&(s+=`rotateX(${f}deg) `),p&&(s+=`rotateY(${p}deg) `),d&&(s+=`skewX(${d}deg) `),m&&(s+=`skewY(${m}deg) `)}const a=t.x.scale*e.x,c=t.y.scale*e.y;return(a!==1||c!==1)&&(s+=`scale(${a}, ${c})`),s||"none"}const Ul=gn.length,ys=t=>typeof t=="string"?parseFloat(t):t,vs=t=>typeof t=="number"||T.test(t);function Wl(t,e,n,s,i,r){i?(t.opacity=C(0,n.opacity??1,Kl(s)),t.opacityExit=C(e.opacity??1,0,Hl(s))):r&&(t.opacity=C(e.opacity??1,n.opacity??1,s));for(let o=0;o<Ul;o++){const a=gn[o];let c=xs(e,a),l=xs(n,a);if(c===void 0&&l===void 0)continue;c||(c=0),l||(l=0),c===0||l===0||vs(c)===vs(l)?(t[a]=Math.max(C(ys(c),ys(l),s),0),(J.test(l)||J.test(c))&&(t[a]+="%")):t[a]=l}(e.rotate||n.rotate)&&(t.rotate=C(e.rotate||0,n.rotate||0,s))}function xs(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const Kl=lo(0,.5,ti),Hl=lo(.5,.95,z);function lo(t,e,n){return s=>s<t?0:s>e?1:n(Et(t,e,s))}function zl(t,e,n){const s=O(t)?t:Tt(t);return s.start(dn("",s,e,n)),s.animation}function kt(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n,s)}const Gl=(t,e)=>t.depth-e.depth;class $l{constructor(){this.children=[],this.isDirty=!1}add(e){tn(this.children,e),this.isDirty=!0}remove(e){qt(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Gl),this.isDirty=!1,this.children.forEach(e)}}function _l(t,e){const n=j.now(),s=({timestamp:i})=>{const r=i-n;r>=e&&(it(s),t(r-e))};return M.setup(s,!0),()=>it(s)}function Xt(t){return O(t)?t.get():t}class Xl{constructor(){this.members=[]}add(e){tn(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){for(let n=this.members.indexOf(e)-1;n>=0;n--){const s=this.members[n];if(s.isPresent!==!1&&s.instance?.isConnected!==!1)return this.promote(s),!0}return!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.updateSnapshot(),e.scheduleRender();const{layoutDependency:i}=s.options,{layoutDependency:r}=e.options;(i===void 0||i!==r)&&(e.resumeFrom=s,n&&(s.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const Yt={hasAnimatedSinceResize:!0,hasEverUpdated:!1},xe=["","X","Y","Z"],Yl=1e3;let ql=0;function Te(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function co(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Ri(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:r}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",M,!(i||r))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&co(s)}function uo({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(o={},a=e?.()){this.id=ql++,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(Ql),this.nodes.forEach(oc),this.nodes.forEach(rc),this.nodes.forEach(tc)},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 c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new $l)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new en),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const c=this.eventHandlers.get(o);c&&c.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=xn(o)&&!Ja(o),this.instance=o;const{layoutId:a,layout:c,visualElement:l}=this.options;if(l&&!l.current&&l.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||a)&&(this.isLayoutDirty=!0),t){let u,h=0;const f=()=>this.root.updateBlockedByResize=!1;M.read(()=>{h=window.innerWidth}),t(o,()=>{const p=window.innerWidth;p!==h&&(h=p,this.root.updateBlockedByResize=!0,u&&u(),u=_l(f,250),Yt.hasAnimatedSinceResize&&(Yt.hasAnimatedSinceResize=!1,this.nodes.forEach(Ps)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&l&&(a||c)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h,hasRelativeLayoutChanged:f,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const d=this.options.transition||l.getDefaultTransition()||hc,{onLayoutAnimationStart:m,onLayoutAnimationComplete:g}=l.getProps(),y=!this.targetLayout||!ao(this.targetLayout,p),x=!h&&f;if(this.options.layoutRoot||this.resumeFrom||x||h&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const v={...fn(d,"layout"),onPlay:m,onComplete:g};(l.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v),this.setAnimationOrigin(u,x,v.path)}else h||Ps(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}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(ac),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&&co(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const h=this.path[u];h.shouldResetTransform=!0,(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:c}=this.options;if(a===void 0&&!c)return;const l=this.getTransformTemplate();this.prevTransformTemplateValue=l?l(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const c=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),c&&this.nodes.forEach(nc),this.nodes.forEach(Ts);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(ws);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(sc),this.nodes.forEach(ic),this.nodes.forEach(Zl),this.nodes.forEach(Jl)):this.nodes.forEach(ws),this.clearAllSnapshots();const a=j.now();I.delta=Q(0,1e3/60,a-I.timestamp),I.timestamp=a,I.isProcessing=!0,he.update.process(I),he.preRender.process(I),he.render.process(I),I.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,yn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(ec),this.sharedNodes.forEach(lc)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,M.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){M.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 c=0;c<this.path.length;c++)this.path[c].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=k()),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 c=s(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!ro(this.projectionDelta),c=this.getTransformTemplate(),l=c?c(this.latestValues,""):void 0,u=l!==this.prevTransformTemplateValue;o&&this.instance&&(a||ct(this.latestValues)||u)&&(i(this.instance,l),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let c=this.removeElementScroll(a);return o&&(c=this.removeTransform(c)),fc(c),{animationId:this.root.animationId,measuredBox:a,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:o}=this.options;if(!o)return k();const a=o.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(dc))){const{scroll:l}=this.root;l&&(Z(a.x,l.offset.x),Z(a.y,l.offset.y))}return a}removeElementScroll(o){const a=k();if(G(a,o),this.scroll?.wasRoot)return a;for(let c=0;c<this.path.length;c++){const l=this.path[c],{scroll:u,options:h}=l;l!==this.root&&u&&h.layoutScroll&&(u.wasRoot&&G(a,o),Z(a.x,u.offset.x),Z(a.y,u.offset.y))}return a}applyTransform(o,a=!1,c){const l=c||k();G(l,o);for(let u=0;u<this.path.length;u++){const h=this.path[u];!a&&h.options.layoutScroll&&h.scroll&&h!==h.root&&(Z(l.x,-h.scroll.offset.x),Z(l.y,-h.scroll.offset.y)),ct(h.latestValues)&&_t(l,h.latestValues,h.layout?.layoutBox)}return ct(this.latestValues)&&_t(l,this.latestValues,this.layout?.layoutBox),l}removeTransform(o){const a=k();G(a,o);for(let c=0;c<this.path.length;c++){const l=this.path[c];if(!ct(l.latestValues))continue;let u;l.instance&&(_e(l.latestValues)&&l.updateSnapshot(),u=k(),G(u,l.measurePageBox())),hs(a,l.latestValues,l.snapshot?.layoutBox,u)}return ct(this.latestValues)&&hs(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){const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==a;if(!(o||c&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:h}=this.options;if(!this.layout||!(u||h))return;this.resolvedRelativeTargetAt=I.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=k(),this.targetWithTransforms=k()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Bl(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):G(this.target,this.layout.layoutBox),Xi(this.target,this.targetDelta)):G(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!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||_e(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,c){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=k(),this.relativeTargetOrigin=k(),ie(this.relativeTargetOrigin,a,c,this.options.layoutAnchor||void 0),G(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const o=this.getLead(),a=!!this.resumingFrom||this!==o;let c=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(c=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===I.timestamp&&(c=!1),c)return;const{layout:l,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(l||u))return;G(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,f=this.treeScale.y;cl(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=k());const{target:p}=o;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(os(this.prevProjectionDelta.x,this.projectionDelta.x),os(this.prevProjectionDelta.y,this.projectionDelta.y)),Mt(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==f||!gs(this.projectionDelta.x,this.prevProjectionDelta.x)||!gs(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){if(this.options.visualElement?.scheduleRender(),o){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=vt(),this.projectionDelta=vt(),this.projectionDeltaWithTransform=vt()}setAnimationOrigin(o,a=!1,c){const l=this.snapshot,u=l?l.latestValues:{},h={...this.latestValues},f=vt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const p=k(),d=l?l.source:void 0,m=this.layout?this.layout.source:void 0,g=d!==m,y=this.getStack(),x=!y||y.members.length<=1,v=!!(g&&!x&&this.options.crossfade===!0&&!this.path.some(uc));this.animationProgress=0;let w;const A=c?.interpolateProjection(o);this.mixTargetDelta=D=>{const V=D/1e3,b=A?.(V);b?(f.x.translate=b.x,f.x.scale=C(o.x.scale,1,V),f.x.origin=o.x.origin,f.x.originPoint=o.x.originPoint,f.y.translate=b.y,f.y.scale=C(o.y.scale,1,V),f.y.origin=o.y.origin,f.y.originPoint=o.y.originPoint):(Ss(f.x,o.x,V),Ss(f.y,o.y,V)),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ie(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),cc(this.relativeTarget,this.relativeTargetOrigin,p,V),w&&jl(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=k()),G(w,this.relativeTarget)),g&&(this.animationValues=h,Wl(h,u,this.latestValues,V,v,x)),b&&b.rotate!==void 0&&(this.animationValues||(this.animationValues=h),this.animationValues.pathRotation=b.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=V},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(it(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=M.update(()=>{Yt.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Tt(0)),this.motionValue.jump(0,!1),this.currentAnimation=zl(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},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(Yl),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:c,layout:l,latestValues:u}=o;if(!(!a||!c||!l)){if(this!==o&&this.layout&&l&&ho(this.options.animationType,this.layout.layoutBox,l.layoutBox)){c=this.target||k();const h=N(this.layout.layoutBox.x);c.x.min=o.target.x.min,c.x.max=c.x.min+h;const f=N(this.layout.layoutBox.y);c.y.min=o.target.y.min,c.y.max=c.y.min+f}G(a,c),_t(a,u),Mt(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new Xl),this.sharedNodes.get(o).add(a);const l=a.options.initialPromotionConfig;a.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){const{layoutId:o}=this.options;return o?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:o}=this.options;return o?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:c}={}){const l=this.getStack();l&&l.promote(this,c),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:c}=o;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(a=!0),!a)return;const l={};c.z&&Te("z",o,l,this.animationValues);for(let u=0;u<xe.length;u++)Te(`rotate${xe[u]}`,o,l,this.animationValues),Te(`skew${xe[u]}`,o,l,this.animationValues);o.render();for(const u in l)o.setStaticValue(u,l[u]),this.animationValues&&(this.animationValues[u]=l[u]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=Xt(a?.pointerEvents)||"",o.transform=c?c(this.latestValues,""):"none";return}const l=this.getLead();if(!this.projectionDelta||!this.layout||!l.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=Xt(a?.pointerEvents)||""),this.hasProjected&&!ct(this.latestValues)&&(o.transform=c?c({},""):"none",this.hasProjected=!1);return}o.visibility="";const u=l.animationValues||l.latestValues;this.applyTransformsToTarget();let h=Nl(this.projectionDeltaWithTransform,this.treeScale,u);c&&(h=c(u,h)),o.transform=h;const{x:f,y:p}=this.projectionDelta;o.transformOrigin=`${f.origin*100}% ${p.origin*100}% 0`,l.animationValues?o.opacity=l===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:o.opacity=l===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const d in Ye){if(u[d]===void 0)continue;const{correct:m,applyTo:g,isCSSVariable:y}=Ye[d],x=h==="none"?u[d]:m(u[d],l);if(g){const v=g.length;for(let w=0;w<v;w++)o[g[w]]=x}else y?this.options.visualElement.renderState.vars[d]=x:o[d]=x}this.options.layoutId&&(o.pointerEvents=l===this?Xt(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>o.currentAnimation?.stop()),this.root.nodes.forEach(Ts),this.root.sharedNodes.clear()}}}function Zl(t){t.updateLayout()}function Jl(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:s}=t.layout,{animationType:i}=t.options,r=e.source!==t.layout.source;if(i==="size")q(u=>{const h=r?e.measuredBox[u]:e.layoutBox[u],f=N(h);h.min=n[u].min,h.max=h.min+f});else if(i==="x"||i==="y"){const u=i==="x"?"y":"x";qe(r?e.measuredBox[u]:e.layoutBox[u],n[u])}else ho(i,e.layoutBox,n)&&q(u=>{const h=r?e.measuredBox[u]:e.layoutBox[u],f=N(n[u]);h.max=h.min+f,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[u].max=t.relativeTarget[u].min+f)});const o=vt();Mt(o,n,e.layoutBox);const a=vt();r?Mt(a,t.applyTransform(s,!0),e.measuredBox):Mt(a,n,e.layoutBox);const c=!ro(o);let l=!1;if(!t.resumeFrom){const u=t.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:h,layout:f}=u;if(h&&f){const p=t.options.layoutAnchor||void 0,d=k();ie(d,e.layoutBox,h.layoutBox,p);const m=k();ie(m,n,f.layoutBox,p),ao(d,m)||(l=!0),u.options.layoutRoot&&(t.relativeTarget=m,t.relativeTargetOrigin=d,t.relativeParent=u)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(t.isLead()){const{onExitComplete:n}=t.options;n&&n()}t.options.transition=void 0}function Ql(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 tc(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function ec(t){t.clearSnapshot()}function Ts(t){t.clearMeasurements()}function nc(t){t.isLayoutDirty=!0,t.updateLayout()}function ws(t){t.isLayoutDirty=!1}function sc(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.layout,t.isLayoutDirty=!0)}function ic(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Ps(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function oc(t){t.resolveTargetDelta()}function rc(t){t.calcProjection()}function ac(t){t.resetSkewAndRotation()}function lc(t){t.removeLeadSnapshot()}function Ss(t,e,n){t.translate=C(e.translate,0,n),t.scale=C(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function bs(t,e,n,s){t.min=C(e.min,n.min,s),t.max=C(e.max,n.max,s)}function cc(t,e,n,s){bs(t.x,e.x,n.x,s),bs(t.y,e.y,n.y,s)}function uc(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const hc={duration:.45,ease:[.4,0,.1,1]},As=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Vs=As("applewebkit/")&&!As("chrome/")?Math.round:z;function Cs(t){t.min=Vs(t.min),t.max=Vs(t.max)}function fc(t){Cs(t.x),Cs(t.y)}function ho(t,e,n){return t==="position"||t==="preserve-aspect"&&!kl(ms(e),ms(n),.2)}function dc(t){return t!==t.root&&t.scroll?.wasRoot}const pc=uo({attachResizeListener:(t,e)=>kt(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),we={current:void 0},fo=uo({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!we.current){const t=new pc({});t.mount(window),t.setOptions({layoutScroll:!0}),we.current=t}return we.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),po=P.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function mc(t=!0){const e=P.useContext(Qe);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=e,r=P.useId();P.useEffect(()=>{if(t)return i(r)},[t]);const o=P.useCallback(()=>t&&s&&s(r),[r,s,t]);return!n&&s?[!1,o]:[!0]}const mo=P.createContext({strict:!1}),Ms={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 Ds=!1;function gc(){if(Ds)return;const t={};for(const e in Ms)t[e]={isEnabled:n=>Ms[e].some(s=>!!n[s])};zi(t),Ds=!0}function go(){return gc(),ol()}function yc(t){const e=go();for(const n in t)e[n]={...e[n],...t[n]};zi(e)}const vc=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 oe(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||vc.has(t)}let yo=t=>!oe(t);function xc(t){typeof t=="function"&&(yo=e=>e.startsWith("on")?!oe(e):t(e))}try{xc(require("@emotion/is-prop-valid").default)}catch{}function Tc(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||O(t[i])||(yo(i)||n===!0&&oe(i)||!e&&!oe(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}const ue=P.createContext({});function wc(t,e){if(ce(t)){const{initial:n,animate:s}=t;return{initial:n===!1||Lt(n)?n:void 0,animate:Lt(s)?s:void 0}}return t.inherit!==!1?e:{}}function Pc(t){const{initial:e,animate:n}=wc(t,P.useContext(ue));return P.useMemo(()=>({initial:e,animate:n}),[Es(e),Es(n)])}function Es(t){return Array.isArray(t)?t.join(" "):t}const bn=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function vo(t,e,n){for(const s in e)!O(e[s])&&!Zi(s,n)&&(t[s]=e[s])}function Sc({transformTemplate:t},e){return P.useMemo(()=>{const n=bn();return Pn(n,e,t),Object.assign({},n.vars,n.style)},[e])}function bc(t,e){const n=t.style||{},s={};return vo(s,n,t),Object.assign(s,Sc(t,e)),s}function Ac(t,e){const n={},s=bc(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 xo=()=>({...bn(),attrs:{}});function Vc(t,e,n,s){const i=P.useMemo(()=>{const r=xo();return Ji(r,e,to(s),t.transformTemplate,t.style),{...r.attrs,style:{...r.style}}},[e]);if(t.style){const r={};vo(r,t.style,t),i.style={...r,...i.style}}return i}const Cc=["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 An(t){return typeof t!="string"||t.includes("-")?!1:!!(Cc.indexOf(t)>-1||/[A-Z]/u.test(t))}function Mc(t,e,n,{latestValues:s},i,r=!1,o){const c=(o??An(t)?Vc:Ac)(e,s,i,t),l=Tc(e,typeof t=="string",r),u=t!==P.Fragment?{...l,...c,ref:n}:{},{children:h}=e,f=P.useMemo(()=>O(h)?h.get():h,[h]);return P.createElement(t,{...u,children:f})}function Dc({scrapeMotionValuesFromProps:t,createRenderState:e},n,s,i){return{latestValues:Ec(n,s,i,t),renderState:e()}}function Ec(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 c=ce(t),l=Ki(t);e&&l&&!c&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let u=n?n.initial===!1:!1;u=u||o===!1;const h=u?a:o;if(h&&typeof h!="boolean"&&!le(h)){const f=Array.isArray(h)?h:[h];for(let p=0;p<f.length;p++){const d=pn(t,f[p]);if(d){const{transitionEnd:m,transition:g,...y}=d;for(const x in y){let v=y[x];if(Array.isArray(v)){const w=u?v.length-1:0;v=v[w]}v!==null&&(i[x]=v)}for(const x in m)i[x]=m[x]}}}return i}const To=t=>(e,n)=>{const s=P.useContext(ue),i=P.useContext(Qe),r=()=>Dc(t,e,s,i);return n?r():Mo(r)},Rc=To({scrapeMotionValuesFromProps:Sn,createRenderState:bn}),Lc=To({scrapeMotionValuesFromProps:eo,createRenderState:xo}),kc=Symbol.for("motionComponentSymbol");function Bc(t,e,n){const s=P.useRef(n);P.useInsertionEffect(()=>{s.current=n});const i=P.useRef(null);return P.useCallback(r=>{r&&t.onMount?.(r),e&&(r?e.mount(r):e.unmount());const o=s.current;if(typeof o=="function")if(r){const a=o(r);typeof a=="function"&&(i.current=a)}else i.current?(i.current(),i.current=null):o(r);else o&&(o.current=r)},[e])}const wo=P.createContext({});function mt(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Fc(t,e,n,s,i,r){const{visualElement:o}=P.useContext(ue),a=P.useContext(mo),c=P.useContext(Qe),l=P.useContext(po),u=l.reducedMotion,h=l.skipAnimations,f=P.useRef(null),p=P.useRef(!1);s=s||a.renderer,!f.current&&s&&(f.current=s(t,{visualState:e,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,skipAnimations:h,isSVG:r}),p.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));const d=f.current,m=P.useContext(wo);d&&!d.projection&&i&&(d.type==="html"||d.type==="svg")&&Ic(f.current,n,i,m);const g=P.useRef(!1);P.useInsertionEffect(()=>{d&&g.current&&d.update(n,c)});const y=n[Ei],x=P.useRef(!!y&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(y)&&window.MotionHasOptimisedAnimation?.(y));return Eo(()=>{p.current=!0,d&&(g.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),d.scheduleRenderMicrotask(),x.current&&d.animationState&&d.animationState.animateChanges())}),P.useEffect(()=>{d&&(!x.current&&d.animationState&&d.animationState.animateChanges(),x.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(y)}),x.current=!1),d.enteringChildren=void 0)}),d}function Ic(t,e,n,s){const{layoutId:i,layout:r,drag:o,dragConstraints:a,layoutScroll:c,layoutRoot:l,layoutAnchor:u,layoutCrossfade:h}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:Po(t.parent)),t.projection.setOptions({layoutId:i,layout:r,alwaysMeasureLayout:!!o||a&&mt(a),visualElement:t,animationType:typeof r=="string"?r:"both",initialPromotionConfig:s,crossfade:h,layoutScroll:c,layoutRoot:l,layoutAnchor:u})}function Po(t){if(t)return t.options.allowProjection!==!1?t.projection:Po(t.parent)}function Pe(t,{forwardMotionProps:e=!1,type:n}={},s,i){s&&yc(s);const r=n?n==="svg":An(t),o=r?Lc:Rc;function a(l,u){let h;const f={...P.useContext(po),...l,layoutId:Oc(l)},{isStatic:p}=f,d=Pc(l),m=o(l,p);if(!p&&typeof window<"u"){jc();const g=Nc(f);h=g.MeasureLayout,d.visualElement=Fc(t,m,f,i,g.ProjectionNode,r)}return Ce.jsxs(ue.Provider,{value:d,children:[h&&d.visualElement?Ce.jsx(h,{visualElement:d.visualElement,...f}):null,Mc(t,l,Bc(m,d.visualElement,u),m,p,e,r)]})}a.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const c=P.forwardRef(a);return c[kc]=t,c}function Oc({layoutId:t}){const e=P.useContext(Ks).id;return e&&t!==void 0?e+"-"+t:t}function jc(t,e){P.useContext(mo).strict}function Nc(t){const e=go(),{drag:n,layout:s}=e;if(!n&&!s)return{};const i={...n,...s};return{MeasureLayout:n?.isEnabled(t)||s?.isEnabled(t)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function Uc(t,e){if(typeof Proxy>"u")return Pe;const n=new Map,s=(r,o)=>Pe(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,Pe(o,void 0,t,e)),n.get(o))})}const Wc=(t,e)=>e.isSVG??An(t)?new Pl(e):new gl(e,{allowProjection:t!==P.Fragment});class Kc extends ot{constructor(e){super(e),e.animationState||(e.animationState=Cl(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();le(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(){this.node.animationState.reset(),this.unmountControls?.()}}let Hc=0;class zc extends ot{constructor(){super(...arguments),this.id=Hc++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===s)return;if(e&&s===!1){if(this.isExitComplete){const{initial:r,custom:o}=this.node.getProps();if(typeof r=="string"||typeof r=="object"&&r!==null&&!Array.isArray(r)){const a=dt(this.node,r,o);if(a){const{transition:c,transitionEnd:l,...u}=a;for(const h in u)this.node.getValue(h)?.jump(u[h])}}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 Gc={animation:{Feature:Kc},exit:{Feature:zc}};function Ot(t){return{point:{x:t.pageX,y:t.pageY}}}const $c=t=>e=>vn(e)&&t(e,Ot(e));function Dt(t,e,n,s){return kt(t,e,$c(n),s)}const So=({current:t})=>t?t.ownerDocument.defaultView:null,Rs=(t,e)=>Math.abs(t-e);function _c(t,e){const n=Rs(t.x,e.x),s=Rs(t.y,e.y);return Math.sqrt(n**2+s**2)}const Ls=new Set(["auto","scroll"]);class bo{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=Ut(this.lastRawMoveEventInfo,this.transformPagePoint));const d=Se(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,g=_c(d.offset,{x:0,y:0})>=this.distanceThreshold;if(!m&&!g)return;const{point:y}=d,{timestamp:x}=I;this.history.push({...y,timestamp:x});const{onStart:v,onMove:w}=this.handlers;m||(v&&v(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,d)},this.handlePointerMove=(d,m)=>{this.lastMoveEvent=d,this.lastRawMoveEventInfo=m,this.lastMoveEventInfo=Ut(m,this.transformPagePoint),M.update(this.updatePoint,!0)},this.handlePointerUp=(d,m)=>{this.end();const{onEnd:g,onSessionEnd:y,resumeAnimation:x}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=Se(d.type==="pointercancel"?this.lastMoveEventInfo:Ut(m,this.transformPagePoint),this.history);this.startEvent&&g&&g(d,v),y&&y(d,v)},!vn(e))return;this.dragSnapToOrigin=r,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=o,this.contextWindow=i||window;const c=Ot(e),l=Ut(c,this.transformPagePoint),{point:u}=l,{timestamp:h}=I;this.history=[{...u,timestamp:h}];const{onSessionStart:f}=n;f&&f(e,Se(l,this.history));const p={passive:!0,capture:!0};this.removeListeners=Bt(Dt(this.contextWindow,"pointermove",this.handlePointerMove,p),Dt(this.contextWindow,"pointerup",this.handlePointerUp,p),Dt(this.contextWindow,"pointercancel",this.handlePointerUp,p)),a&&this.startScrollTracking(a)}startScrollTracking(e){let n=e.parentElement;for(;n;){const s=getComputedStyle(n);(Ls.has(s.overflowX)||Ls.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),M.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 Ut(t,e){return e?{point:e(t.point)}:t}function ks(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Se({point:t},e){return{point:t,delta:ks(t,Ao(e)),offset:ks(t,Xc(e)),velocity:Yc(e,.1)}}function Xc(t){return t[0]}function Ao(t){return t[t.length-1]}function Yc(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=Ao(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=H(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 qc(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?C(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?C(n,t,s.max):Math.min(t,n)),t}function Bs(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 Zc(t,{top:e,left:n,bottom:s,right:i}){return{x:Bs(t.x,n,i),y:Bs(t.y,e,s)}}function Fs(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 Jc(t,e){return{x:Fs(t.x,e.x),y:Fs(t.y,e.y)}}function Qc(t,e){let n=.5;const s=N(t),i=N(e);return i>s?n=Et(e.min,e.max-s,t.min):s>i&&(n=Et(t.min,t.max-i,e.min)),Q(0,1,n)}function tu(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 eu(t=Ze){return t===!1?t=0:t===!0&&(t=Ze),{x:Is(t,"left","right"),y:Is(t,"top","bottom")}}function Is(t,e,n){return{min:Os(t,e),max:Os(t,n)}}function Os(t,e){return typeof t=="number"?t:t[e]||0}const nu=new WeakMap;class su{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=k(),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(Ot(h).point),this.stopAnimation()},o=(h,f)=>{const{drag:p,dragPropagation:d,onDragStart:m}=this.getProps();if(p&&!d&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Fa(p),!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(y=>{let x=this.getAxisMotionValue(y).get()||0;if(J.test(x)){const{projection:v}=this.visualElement;if(v&&v.layout){const w=v.layout.layoutBox[y];w&&(x=N(w)*(parseFloat(x)/100))}}this.originPoint[y]=x}),m&&M.update(()=>m(h,f),!1,!0),We(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},a=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f;const{dragPropagation:p,dragDirectionLock:d,onDirectionLock:m,onDrag:g}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:y}=f;if(d&&this.currentDirection===null){this.currentDirection=ou(y),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",f.point,y),this.updateAxis("y",f.point,y),this.visualElement.render(),g&&M.update(()=>g(h,f),!1,!0)},c=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f,this.stop(h,f),this.latestPointerEvent=null,this.latestPanInfo=null},l=()=>{const{dragSnapToOrigin:h}=this.getProps();(h||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:u}=this.getProps();this.panSession=new bo(e,{onSessionStart:r,onStart:o,onMove:a,onSessionEnd:c,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:s,contextWindow:So(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&&M.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||!Wt(e,i,this.currentDirection))return;const r=this.getAxisMotionValue(e);let o=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(o=qc(o,this.constraints[e],this.elastic[e])),r.set(o)}resolveConstraints(){const{dragConstraints:e,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;e&&mt(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&s?this.constraints=Zc(s.layoutBox,e):this.constraints=!1,this.elastic=eu(n),i!==this.constraints&&!mt(e)&&s&&this.constraints&&!this.hasMutatedConstraints&&q(r=>{this.constraints!==!1&&this.getAxisMotionValue(r)&&(this.constraints[r]=tu(s.layoutBox[r],this.constraints[r]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!mt(e))return!1;const s=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;i.root&&(i.root.scroll=void 0,i.root.updateScroll());const r=ul(s,i.root,this.visualElement.getTransformPagePoint());let o=Jc(i.layout.layoutBox,r);if(n){const a=n(al(o));this.hasMutatedConstraints=!!a,a&&(o=$i(a))}return o}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:r,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},l=q(u=>{if(!Wt(u,n,this.currentDirection))return;let h=c&&c[u]||{};(o===!0||o===u)&&(h={min:0,max:0});const f=i?200:1e6,p=i?40:1e7,d={type:"inertia",velocity:s?e[u]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...r,...h};return this.startAxisValueAnimation(u,d)});return Promise.all(l).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return We(this.visualElement,e),s.start(dn(e,s,0,n,this.visualElement,!1))}stopAnimation(){q(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,i=this.visualElement.getProps()[n];return i||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor(e){q(n=>{const{drag:s}=this.getProps();if(!Wt(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],c=r.get()||0;r.set(e[n]-C(o,a,.5)+c)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!mt(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 c=a.get();i[o]=Qc({min:c,max:c},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(!Wt(o,e,null))return;const a=this.getAxisMotionValue(o),{min:c,max:l}=this.constraints[o];a.set(C(c,l,i[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;nu.set(this.visualElement,this);const e=this.visualElement.current,n=Dt(e,"pointerdown",l=>{const{drag:u,dragListener:h=!0}=this.getProps(),f=l.target,p=f!==e&&Wa(f);u&&h&&!p&&this.start(l)});let s;const i=()=>{const{dragConstraints:l}=this.getProps();mt(l)&&l.current&&(this.constraints=this.resolveRefConstraints(),s||(s=iu(e,l.current,()=>this.scalePositionWithinConstraints())))},{projection:r}=this.visualElement,o=r.addEventListener("measure",i);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),M.read(i);const a=kt(window,"resize",()=>this.scalePositionWithinConstraints()),c=r.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(q(h=>{const f=this.getAxisMotionValue(h);f&&(this.originPoint[h]+=l[h].translate,f.set(f.get()+l[h].translate))}),this.visualElement.render())}));return()=>{a(),n(),o(),c&&c(),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 js(t){let e=!0;return()=>{if(e){e=!1;return}t()}}function iu(t,e,n){const s=_n(t,js(n)),i=_n(e,js(n));return()=>{s(),i()}}function Wt(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function ou(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class ru extends ot{constructor(e){super(e),this.removeGroupControls=z,this.removeListeners=z,this.controls=new su(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||z}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 be=t=>(e,n)=>{t&&M.update(()=>t(e,n),!1,!0)};class au extends ot{constructor(){super(...arguments),this.removePointerDownListener=z}onPointerDown(e){this.session=new bo(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:So(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:be(e),onStart:be(n),onMove:be(s),onEnd:(r,o)=>{delete this.session,i&&M.postRender(()=>i(r,o))}}}mount(){this.removePointerDownListener=Dt(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 Ae=!1;class lu extends P.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),Ae&&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}),Ae=!0,i||e.layoutDependency!==n||n===void 0||e.isPresent!==r?o.willUpdate():this.safeToRemove(),e.isPresent!==r&&(r?o.promote():o.relegate()||M.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:e,layoutAnchor:n}=this.props,{projection:s}=e;s&&(s.options.layoutAnchor=n,s.root.didUpdate(),yn.postRender(()=>{!s.currentAnimation&&s.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;Ae=!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 Vo(t){const[e,n]=mc(),s=P.useContext(Ks);return Ce.jsx(lu,{...t,layoutGroup:s,switchLayoutGroup:P.useContext(wo),isPresent:e,safeToRemove:n})}const cu={pan:{Feature:au},drag:{Feature:ru,ProjectionNode:fo,MeasureLayout:Vo}};function Ns(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&&M.postRender(()=>r(e,Ot(e)))}class uu extends ot{mount(){const{current:e}=this.node;e&&(this.unmount=Oa(e,(n,s)=>(Ns(this.node,s,"Start"),i=>Ns(this.node,i,"End"))))}unmount(){}}class hu 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(kt(this.node.current,"focus",()=>this.onFocus()),kt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Us(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&&M.postRender(()=>r(e,Ot(e)))}class fu extends ot{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:n,propagate:s}=this.node.props;this.unmount=Ha(e,(i,r)=>(Us(this.node,r,"Start"),(o,{success:a})=>Us(this.node,o,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:s?.tap===!1})}unmount(){}}const Je=new WeakMap,Ve=new WeakMap,du=t=>{const e=Je.get(t.target);e&&e(t)},pu=t=>{t.forEach(du)};function mu({root:t,...e}){const n=t||document;Ve.has(n)||Ve.set(n,{});const s=Ve.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(pu,{root:t,...e})),s[i]}function gu(t,e,n){const s=mu(e);return Je.set(t,n),s.observe(t),()=>{Je.delete(t),s.unobserve(t)}}const yu={some:0,all:1};class vu extends ot{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();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:yu[i]},a=c=>{const{isIntersecting:l}=c;if(this.isInView===l||(this.isInView=l,r&&!l&&this.hasEnteredView))return;l&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",l);const{onViewportEnter:u,onViewportLeave:h}=this.node.getProps(),f=l?u:h;f&&f(c)};this.stopObserver=gu(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(xu(e,n))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}function xu({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const Tu={inView:{Feature:vu},tap:{Feature:fu},focus:{Feature:hu},hover:{Feature:uu}},wu={layout:{ProjectionNode:fo,MeasureLayout:Vo}},Pu={...Gc,...Tu,...cu,...wu},Mu=Uc(Pu,Wc);function Du(t){return Ws({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M3 13h1v7c0 1.103.897 2 2 2h12c1.103 0 2-.897 2-2v-7h1a1 1 0 0 0 .707-1.707l-9-9a.999.999 0 0 0-1.414 0l-9 9A1 1 0 0 0 3 13zm7 7v-5h4v5h-4zm2-15.586 6 6V15l.001 5H16v-5c0-1.103-.897-2-2-2h-4c-1.103 0-2 .897-2 2v5H6v-9.586l6-6z"},child:[]}]})(t)}function Eu(t){return Ws({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"m4.431 12.822 13 9A1 1 0 0 0 19 21V3a1 1 0 0 0-1.569-.823l-13 9a1.003 1.003 0 0 0 0 1.645z"},child:[]}]})(t)}export{Du as B,Ks as L,po as M,Qe as P,Tt as a,Eo as b,it as c,Un as d,C as e,M as f,Vu as g,O as h,br as i,Ba as j,mc as k,Eu as l,Mu as m,Mo as u};
|
|
1
|
+
import{r as P,j as Ce}from"./index-CH7cEAxj.js";import{G as Ws}from"./iconBase-DtqdW2XR.js";const Ks=P.createContext({});function Mo(t){const e=P.useRef(null);return e.current===null&&(e.current=t()),e.current}const Do=typeof window<"u",Eo=Do?P.useLayoutEffect:P.useEffect,Qe=P.createContext(null);function tn(t,e){t.indexOf(e)===-1&&t.push(e)}function qt(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}function Vu([...t],e,n){const s=e<0?t.length+e:e;if(s>=0&&s<t.length){const i=n<0?t.length+n:n,[r]=t.splice(e,1);t.splice(i,0,r)}return t}const Q=(t,e,n)=>n>e?e:n<t?t:n;let re=()=>{};const st={},Hs=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),zs=t=>typeof t=="object"&&t!==null,Gs=t=>/^0[^.\s]+$/u.test(t);function $s(t){let e;return()=>(e===void 0&&(e=t()),e)}const z=t=>t,Bt=(...t)=>t.reduce((e,n)=>s=>n(e(s))),Et=(t,e,n)=>{const s=e-t;return s?(n-t)/s:1};class en{constructor(){this.subscriptions=[]}add(e){return tn(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,H=t=>t/1e3,_s=(t,e)=>e?t*(1e3/e):0,Xs=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Ro=1e-7,Lo=12;function ko(t,e,n,s,i){let r,o,a=0;do o=e+(n-e)/2,r=Xs(o,s,i)-t,r>0?n=o:e=o;while(Math.abs(r)>Ro&&++a<Lo);return o}function Ft(t,e,n,s){if(t===e&&n===s)return z;const i=r=>ko(r,0,1,t,n);return r=>r===0||r===1?r:Xs(i(r),e,s)}const Ys=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,qs=t=>e=>1-t(1-e),Zs=Ft(.33,1.53,.69,.99),nn=qs(Zs),Js=Ys(nn),Qs=t=>t>=1?1:(t*=2)<1?.5*nn(t):.5*(2-Math.pow(2,-10*(t-1))),sn=t=>1-Math.sin(Math.acos(t)),ti=qs(sn),ei=Ys(sn),Bo=Ft(.42,0,1,1),Fo=Ft(0,0,.58,1),ni=Ft(.42,0,.58,1),Io=t=>Array.isArray(t)&&typeof t[0]!="number",si=t=>Array.isArray(t)&&typeof t[0]=="number",Oo={linear:z,easeIn:Bo,easeInOut:ni,easeOut:Fo,circIn:sn,circInOut:ei,circOut:ti,backIn:nn,backInOut:Js,backOut:Zs,anticipate:Qs},jo=t=>typeof t=="string",Vn=t=>{if(si(t)){re(t.length===4);const[e,n,s,i]=t;return Ft(e,n,s,i)}else if(jo(t))return Oo[t];return t},jt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function No(t){let e=new Set,n=new Set,s=!1,i=!1;const r=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function a(l){r.has(l)&&(c.schedule(l),t()),l(o)}const c={schedule:(l,u=!1,h=!1)=>{const p=h&&s?e:n;return u&&r.add(l),p.add(l),l},cancel:l=>{n.delete(l),r.delete(l)},process:l=>{if(o=l,s){i=!0;return}s=!0;const u=e;e=n,n=u,e.forEach(a),e.clear(),s=!1,i&&(i=!1,c.process(l))}};return c}const Uo=40;function ii(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=jt.reduce((v,w)=>(v[w]=No(r),v),{}),{setup:a,read:c,resolveKeyframes:l,preUpdate:u,update:h,preRender:f,render:p,postRender:d}=o,m=()=>{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,Uo),1)),i.timestamp=w,i.isProcessing=!0,a.process(i),c.process(i),l.process(i),u.process(i),h.process(i),f.process(i),p.process(i),d.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(m))},g=()=>{n=!0,s=!0,i.isProcessing||t(m)};return{schedule:jt.reduce((v,w)=>{const A=o[w];return v[w]=(D,V=!1,b=!1)=>(n||g(),A.schedule(D,V,b)),v},{}),cancel:v=>{for(let w=0;w<jt.length;w++)o[jt[w]].cancel(v)},state:i,steps:o}}const{schedule:M,cancel:it,state:I,steps:he}=ii(typeof requestAnimationFrame<"u"?requestAnimationFrame:z,!0);let Kt;function Wo(){Kt=void 0}const j={now:()=>(Kt===void 0&&j.set(I.isProcessing||st.useManualTiming?I.timestamp:performance.now()),Kt),set:t=>{Kt=t,queueMicrotask(Wo)}},oi=t=>e=>typeof e=="string"&&e.startsWith(t),ri=oi("--"),Ko=oi("var(--"),on=t=>Ko(t)?Ho.test(t.split("/*")[0].trim()):!1,Ho=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Cn(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const wt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Rt={...wt,transform:t=>Q(0,1,t)},Nt={...wt,default:1},Vt=t=>Math.round(t*1e5)/1e5,rn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function zo(t){return t==null}const Go=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,an=(t,e)=>n=>!!(typeof n=="string"&&Go.test(n)&&n.startsWith(t)||e&&!zo(n)&&Object.prototype.hasOwnProperty.call(n,e)),ai=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,r,o,a]=s.match(rn);return{[t]:parseFloat(i),[e]:parseFloat(r),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},$o=t=>Q(0,255,t),fe={...wt,transform:t=>Math.round($o(t))},ut={test:an("rgb","red"),parse:ai("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+fe.transform(t)+", "+fe.transform(e)+", "+fe.transform(n)+", "+Vt(Rt.transform(s))+")"};function _o(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 Me={test:an("#"),parse:_o,transform:ut.transform},It=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),et=It("deg"),J=It("%"),T=It("px"),Xo=It("vh"),Yo=It("vw"),Mn={...J,parse:t=>J.parse(t)/100,transform:t=>J.transform(t*100)},gt={test:an("hsl","hue"),parse:ai("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+J.transform(Vt(e))+", "+J.transform(Vt(n))+", "+Vt(Rt.transform(s))+")"},L={test:t=>ut.test(t)||Me.test(t)||gt.test(t),parse:t=>ut.test(t)?ut.parse(t):gt.test(t)?gt.parse(t):Me.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?ut.transform(t):gt.transform(t),getAnimatableNone:t=>{const e=L.parse(t);return e.alpha=0,L.transform(e)}},qo=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Zo(t){return isNaN(t)&&typeof t=="string"&&(t.match(rn)?.length||0)+(t.match(qo)?.length||0)>0}const li="number",ci="color",Jo="var",Qo="var(",Dn="${}",tr=/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 xt(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let r=0;const a=e.replace(tr,c=>(L.test(c)?(s.color.push(r),i.push(ci),n.push(L.parse(c))):c.startsWith(Qo)?(s.var.push(r),i.push(Jo),n.push(c)):(s.number.push(r),i.push(li),n.push(parseFloat(c))),++r,Dn)).split(Dn);return{values:n,split:a,indexes:s,types:i}}function er(t){return xt(t).values}function ui({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===li?i+=Vt(s[r]):o===ci?i+=L.transform(s[r]):i+=s[r]}return i}}function nr(t){return ui(xt(t))}const sr=t=>typeof t=="number"?0:L.test(t)?L.getAnimatableNone(t):t,ir=(t,e)=>typeof t=="number"?e?.trim().endsWith("/")?t:0:sr(t);function or(t){const e=xt(t);return ui(e)(e.values.map((s,i)=>ir(s,e.split[i])))}const _={test:Zo,parse:er,createTransformer:nr,getAnimatableNone:or};function de(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 rr({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,c=2*n-a;i=de(c,a,t+1/3),r=de(c,a,t),o=de(c,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 C=(t,e,n)=>t+(e-t)*n,pe=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},ar=[Me,ut,gt],lr=t=>ar.find(e=>e.test(t));function En(t){const e=lr(t);if(!e)return!1;let n=e.parse(t);return e===gt&&(n=rr(n)),n}const Rn=(t,e)=>{const n=En(t),s=En(e);if(!n||!s)return Zt(t,e);const i={...n};return r=>(i.red=pe(n.red,s.red,r),i.green=pe(n.green,s.green,r),i.blue=pe(n.blue,s.blue,r),i.alpha=C(n.alpha,s.alpha,r),ut.transform(i))},De=new Set(["none","hidden"]);function cr(t,e){return De.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function ur(t,e){return n=>C(t,e,n)}function ln(t){return typeof t=="number"?ur:typeof t=="string"?on(t)?Zt:L.test(t)?Rn:dr:Array.isArray(t)?hi:typeof t=="object"?L.test(t)?Rn:hr:Zt}function hi(t,e){const n=[...t],s=n.length,i=t.map((r,o)=>ln(r)(r,e[o]));return r=>{for(let o=0;o<s;o++)n[o]=i[o](r);return n}}function hr(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=ln(t[i])(t[i],e[i]));return i=>{for(const r in s)n[r]=s[r](i);return n}}function fr(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 dr=(t,e)=>{const n=_.createTransformer(e),s=xt(t),i=xt(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?De.has(t)&&!i.values.length||De.has(e)&&!s.values.length?cr(t,e):Bt(hi(fr(s,i),i.values),n):Zt(t,e)};function fi(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?C(t,e,n):ln(t)(t,e)}const pr=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>M.update(e,n),stop:()=>it(e),now:()=>I.isProcessing?I.timestamp:j.now()}},di=(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 cn(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 mr(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(cn(s),Jt);return{type:"keyframes",ease:r=>s.next(i*r).value/e,duration:H(i)}}const E={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 Ee(t,e){return t*Math.sqrt(1-e*e)}const gr=12;function yr(t,e,n){let s=n;for(let i=1;i<gr;i++)s=s-t(s)/e(s);return s}const me=.001;function vr({duration:t=E.duration,bounce:e=E.bounce,velocity:n=E.velocity,mass:s=E.mass}){let i,r,o=1-e;o=Q(E.minDamping,E.maxDamping,o),t=Q(E.minDuration,E.maxDuration,H(t)),o<1?(i=l=>{const u=l*o,h=u*t,f=u-n,p=Ee(l,o),d=Math.exp(-h);return me-f/p*d},r=l=>{const h=l*o*t,f=h*n+n,p=Math.pow(o,2)*Math.pow(l,2)*t,d=Math.exp(-h),m=Ee(Math.pow(l,2),o);return(-i(l)+me>0?-1:1)*((f-p)*d)/m}):(i=l=>{const u=Math.exp(-l*t),h=(l-n)*t+1;return-me+u*h},r=l=>{const u=Math.exp(-l*t),h=(n-l)*(t*t);return u*h});const a=5/t,c=yr(i,r,a);if(t=W(t),isNaN(c))return{stiffness:E.stiffness,damping:E.damping,duration:t};{const l=Math.pow(c,2)*s;return{stiffness:l,damping:o*2*Math.sqrt(s*l),duration:t}}}const xr=["duration","bounce"],Tr=["stiffness","damping","mass"];function Ln(t,e){return e.some(n=>t[n]!==void 0)}function wr(t){let e={velocity:E.velocity,stiffness:E.stiffness,damping:E.damping,mass:E.mass,isResolvedFromDuration:!1,...t};if(!Ln(t,Tr)&&Ln(t,xr))if(e.velocity=0,t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,r=2*Q(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:E.mass,stiffness:i,damping:r}}else{const n=vr({...t,velocity:0});e={...e,...n,mass:E.mass},e.isResolvedFromDuration=!0}return e}function Qt(t=E.visualDuration,e=E.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:c,damping:l,mass:u,duration:h,velocity:f,isResolvedFromDuration:p}=wr({...n,velocity:-H(n.velocity||0)}),d=f||0,m=l/(2*Math.sqrt(c*u)),g=o-r,y=H(Math.sqrt(c/u)),x=Math.abs(g)<5;s||(s=x?E.restSpeed.granular:E.restSpeed.default),i||(i=x?E.restDelta.granular:E.restDelta.default);let v,w,A,D,V,b;if(m<1)A=Ee(y,m),D=(d+m*y*g)/A,v=S=>{const R=Math.exp(-m*y*S);return o-R*(D*Math.sin(A*S)+g*Math.cos(A*S))},V=m*y*D+g*A,b=m*y*g-D*A,w=S=>Math.exp(-m*y*S)*(V*Math.sin(A*S)+b*Math.cos(A*S));else if(m===1){v=R=>o-Math.exp(-y*R)*(g+(d+y*g)*R);const S=d+y*g;w=R=>Math.exp(-y*R)*(y*S*R-d)}else{const S=y*Math.sqrt(m*m-1);v=X=>{const tt=Math.exp(-m*y*X),Y=Math.min(S*X,300);return o-tt*((d+m*y*g)*Math.sinh(Y)+S*g*Math.cosh(Y))/S};const R=(d+m*y*g)/S,U=m*y*R-g*S,rt=m*y*g-R*S;w=X=>{const tt=Math.exp(-m*y*X),Y=Math.min(S*X,300);return tt*(U*Math.sinh(Y)+rt*Math.cosh(Y))}}const B={calculatedDuration:p&&h||null,velocity:S=>W(w(S)),next:S=>{if(!p&&m<1){const U=Math.exp(-m*y*S),rt=Math.sin(A*S),X=Math.cos(A*S),tt=o-U*(D*rt+g*X),Y=W(U*(V*rt+b*X));return a.done=Math.abs(Y)<=s&&Math.abs(o-tt)<=i,a.value=a.done?o:tt,a}const R=v(S);if(p)a.done=S>=h;else{const U=W(w(S));a.done=Math.abs(U)<=s&&Math.abs(o-R)<=i}return a.value=a.done?o:R,a},toString:()=>{const S=Math.min(cn(B),Jt),R=di(U=>B.next(S*U).value,S,30);return S+"ms "+R},toTransition:()=>{}};return B}Qt.applyToOptions=t=>{const e=mr(t,100,Qt);return t.ease=e.ease,t.duration=W(e.duration),t.type="keyframes",t};const Pr=5;function pi(t,e,n){const s=Math.max(e-Pr,0);return _s(n-t(s),e-s)}function Re({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:c,restDelta:l=.5,restSpeed:u}){const h=t[0],f={done:!1,value:h},p=b=>a!==void 0&&b<a||c!==void 0&&b>c,d=b=>a===void 0?c:c===void 0||Math.abs(a-b)<Math.abs(c-b)?a:c;let m=n*e;const g=h+m,y=o===void 0?g:o(g);y!==g&&(m=y-h);const x=b=>-m*Math.exp(-b/s),v=b=>y+x(b),w=b=>{const B=x(b),S=v(b);f.done=Math.abs(B)<=l,f.value=f.done?y:S};let A,D;const V=b=>{p(f.value)&&(A=b,D=Qt({keyframes:[f.value,d(f.value)],velocity:pi(v,b,f.value),damping:i,stiffness:r,restDelta:l,restSpeed:u}))};return V(0),{calculatedDuration:null,next:b=>{let B=!1;return!D&&A===void 0&&(B=!0,w(b),V(b)),A!==void 0&&b>=A?D.next(b-A):(!B&&w(b),f)}}}function Sr(t,e,n){const s=[],i=n||st.mix||fi,r=t.length-1;for(let o=0;o<r;o++){let a=i(t[o],t[o+1]);if(e){const c=Array.isArray(e)?e[o]||z:e;a=Bt(c,a)}s.push(a)}return s}function br(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const r=t.length;if(re(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=Sr(e,s,i),c=a.length,l=u=>{if(o&&u<t[0])return e[0];let h=0;if(c>1)for(;h<t.length-2&&!(u<t[h+1]);h++);const f=Et(t[h],t[h+1],u);return a[h](f)};return n?u=>l(Q(t[0],t[r-1],u)):l}function Ar(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=Et(0,e,s);t.push(C(n,1,i))}}function Vr(t){const e=[0];return Ar(e,t.length-1),e}function Cr(t,e){return t.map(n=>n*e)}function Mr(t,e){return t.map(()=>e||ni).splice(0,t.length-1)}function Ct({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=Io(s)?s.map(Vn):Vn(s),r={done:!1,value:e[0]},o=Cr(n&&n.length===e.length?n:Vr(e),t),a=br(o,e,{ease:Array.isArray(i)?i:Mr(e,i)});return{calculatedDuration:t,next:c=>(r.value=a(c),r.done=c>=t,r)}}const Dr=t=>t!==null;function ae(t,{repeat:e,repeatType:n="loop"},s,i=1){const r=t.filter(Dr),a=i<0||e&&n!=="loop"&&e%2===1?0:r.length-1;return!a||s===void 0?r[a]:s}const Er={decay:Re,inertia:Re,tween:Ct,keyframes:Ct,spring:Qt};function mi(t){typeof t.type=="string"&&(t.type=Er[t.type])}class un{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 Rr=t=>t/100;class te extends un{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==j.now()&&this.tick(j.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;mi(e);const{type:n=Ct,repeat:s=0,repeatDelay:i=0,repeatType:r,velocity:o=0}=e;let{keyframes:a}=e;const c=n||Ct;c!==Ct&&typeof a[0]!="number"&&(this.mixKeyframes=Bt(Rr,fi(a[0],a[1])),a=[0,100]);const l=c({...e,keyframes:a});r==="mirror"&&(this.mirroredGenerator=c({...e,keyframes:[...a].reverse(),velocity:-o})),l.calculatedDuration===null&&(l.calculatedDuration=cn(l));const{calculatedDuration:u}=l;this.calculatedDuration=u,this.resolvedDuration=u+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=l}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:c}=this;if(this.startTime===null)return s.next(0);const{delay:l=0,keyframes:u,repeat:h,repeatType:f,repeatDelay:p,type:d,onUpdate:m,finalKeyframe:g}=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 y=this.currentTime-l*(this.playbackSpeed>=0?1:-1),x=this.playbackSpeed>=0?y<0:y>i;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let v=this.currentTime,w=s;if(h){const b=Math.min(this.currentTime,i)/a;let B=Math.floor(b),S=b%1;!S&&b>=1&&(S=1),S===1&&B--,B=Math.min(B,h+1),!!(B%2)&&(f==="reverse"?(S=1-S,p&&(S-=p/a)):f==="mirror"&&(w=o)),v=Q(0,1,S)*a}let A;x?(this.delayState.value=u[0],A=this.delayState):A=w.next(v),r&&!x&&(A.value=r(A.value));let{done:D}=A;!x&&c!==null&&(D=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const V=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&D);return V&&d!==Re&&(A.value=ae(u,this.options,g,this.speed)),m&&m(A.value),V&&this.finish(),A}then(e,n){return this.finished.then(e,n)}get duration(){return H(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+H(e)}get time(){return H(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 pi(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=H(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=pr,startTime:n}=this.options;this.driver||(this.driver=e(i=>this.tick(i))),this.options.onPlay?.();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(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}function Lr(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const ht=t=>t*180/Math.PI,Le=t=>{const e=ht(Math.atan2(t[1],t[0]));return ke(e)},kr={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Le,rotateZ:Le,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},ke=t=>(t=t%360,t<0&&(t+=360),t),kn=Le,Bn=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Fn=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Br={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Bn,scaleY:Fn,scale:t=>(Bn(t)+Fn(t))/2,rotateX:t=>ke(ht(Math.atan2(t[6],t[5]))),rotateY:t=>ke(ht(Math.atan2(-t[2],t[0]))),rotateZ:kn,rotate:kn,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 Be(t){return t.includes("scale")?1:0}function Fe(t,e){if(!t||t==="none")return Be(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=Br,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=kr,i=a}if(!i)return Be(e);const r=s[e],o=i[1].split(",").map(Ir);return typeof r=="function"?r(o):o[r]}const Fr=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return Fe(n,e)};function Ir(t){return parseFloat(t.trim())}const Pt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],St=new Set([...Pt,"pathRotation"]),In=t=>t===wt||t===T,Or=new Set(["x","y","z"]),jr=Pt.filter(t=>!Or.has(t));function Nr(t){const e=[];return jr.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})=>Fe(e,"x"),y:(t,{transform:e})=>Fe(e,"y")};nt.translateX=nt.x;nt.translateY=nt.y;const ft=new Set;let Ie=!1,Oe=!1,je=!1;function gi(){if(Oe){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=Nr(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])=>{s.getValue(r)?.set(o)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}Oe=!1,Ie=!1,ft.forEach(t=>t.complete(je)),ft.clear()}function yi(){ft.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Oe=!0)})}function Ur(){je=!0,yi(),gi(),je=!1}class hn{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),Ie||(Ie=!0,M.read(yi),M.resolveKeyframes(gi))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;if(e[0]===null){const r=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])}Lr(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 Wr=t=>t.startsWith("--");function vi(t,e,n){Wr(e)?t.style.setProperty(e,n):t.style[e]=n}const Kr={};function xi(t,e){const n=$s(t);return()=>Kr[e]??n()}const Hr=xi(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),Ti=xi(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),At=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,On={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:At([0,.65,.55,1]),circOut:At([.55,0,1,.45]),backIn:At([.31,.01,.66,-.59]),backOut:At([.33,1.53,.69,.99])};function wi(t,e){if(t)return typeof t=="function"?Ti()?di(t,e):"ease-out":si(t)?At(t):Array.isArray(t)?t.map(n=>wi(n,e)||On.easeOut):On[t]}function zr(t,e,n,{delay:s=0,duration:i=300,repeat:r=0,repeatType:o="loop",ease:a="easeOut",times:c}={},l=void 0){const u={[e]:n};c&&(u.offset=c);const h=wi(a,i);Array.isArray(h)&&(u.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 l&&(f.pseudoElement=l),t.animate(u,f)}function Pi(t){return typeof t=="function"&&"applyToOptions"in t}function Gr({type:t,...e}){return Pi(t)&&Ti()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class Si extends un{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:c}=e;this.isPseudoElement=!!r,this.allowFlatten=o,this.options=e,re(typeof e.type!="string");const l=Gr(e);this.animation=zr(n,s,i,l,r),l.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const u=ae(i,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(u),vi(n,s,u),this.animation.cancel()}c?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}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(){const e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return H(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+H(e)}get time(){return H(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}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&Hr()?(this.animation.timeline=e,n&&(this.animation.rangeStart=n),s&&(this.animation.rangeEnd=s),z):i(this)}}const bi={anticipate:Qs,backInOut:Js,circInOut:ei};function $r(t){return t in bi}function _r(t){typeof t.ease=="string"&&$r(t.ease)&&(t.ease=bi[t.ease])}const ge=10;class Xr extends Si{constructor(e){_r(e),mi(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 te({...o,autoplay:!1}),c=Math.max(ge,j.now()-this.startTime),l=Q(0,ge,c-ge),u=a.sample(c).value,{name:h}=this.options;r&&h&&vi(r,h,u),n.setWithVelocity(a.sample(Math.max(0,c-l)).value,u,l),a.stop()}}const jn=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(_.test(t)||t==="0")&&!t.startsWith("url("));function Yr(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 qr(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=jn(i,e),a=jn(r,e);return!o||!a?!1:Yr(t)||(n==="spring"||Pi(n))&&s}function Ne(t){t.duration=0,t.type="keyframes"}const Ai=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),Zr=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Jr(t){for(let e=0;e<t.length;e++)if(typeof t[e]=="string"&&Zr.test(t[e]))return!0;return!1}const Qr=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),ta=$s(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function ea(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:r,type:o,keyframes:a}=t,c=e?.owner?.current;if(!(c instanceof HTMLElement)&&!(c instanceof SVGElement))return!1;const{onUpdate:l,transformTemplate:u}=e.owner.getProps();return ta()&&n&&(Ai.has(n)||Qr.has(n)&&Jr(a))&&(n!=="transform"||!u)&&!l&&!s&&i!=="mirror"&&r!==0&&o!=="inertia"}const na=40;class sa extends un{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:o="loop",keyframes:a,name:c,motionValue:l,element:u,...h}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=j.now();const f={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:r,repeatType:o,name:c,motionValue:l,element:u,...h},p=u?.KeyframeResolver||hn;this.keyframeResolver=new p(a,(d,m,g)=>this.onKeyframesResolved(d,m,f,!g),c,l,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,n,s,i){this.keyframeResolver=void 0;const{name:r,type:o,velocity:a,delay:c,isHandoff:l,onUpdate:u}=s;this.resolvedAt=j.now();let h=!0;qr(e,r,o,a)||(h=!1,(st.instantAnimations||!c)&&u?.(ae(e,s,n)),e[0]=e[e.length-1],Ne(s),s.repeat=0);const p={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>na?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:e},d=h&&!l&&ea(p),m=p.motionValue?.owner?.current;let g;if(d)try{g=new Xr({...p,element:m})}catch{g=new te(p)}else g=new te(p);g.finished.then(()=>{this.notifyFinished()}).catch(z),this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Ur()),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(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function Vi(t,e,n,s=0,i=1){const r=Array.from(t).sort((l,u)=>l.sortNodePosition(u)).indexOf(e),o=t.size,a=(o-1)*s;return typeof n=="function"?n(r,o):i===1?r*s:a-r*s}const Nn=30,ia=t=>!isNaN(parseFloat(t)),Un={current:void 0};class oa{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{const i=j.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const r of this.dependents)r.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=ia(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 en);const s=this.events[e].add(n);return e==="change"?()=>{s(),M.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(){this.events.change?.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 Un.current&&Un.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=j.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Nn)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Nn);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(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Tt(t,e){return new oa(t,e)}function Ci(t,e){if(t?.inherit&&e){const{inherit:n,...s}=t;return{...e,...s}}return t}function fn(t,e){const n=t?.[e]??t?.default??t;return n!==t?Ci(n,t):n}const ra={type:"spring",stiffness:500,damping:25,restSpeed:10},aa=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),la={type:"keyframes",duration:.8},ca={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ua=(t,{keyframes:e})=>e.length>2?la:St.has(t)?t.startsWith("scale")?aa(e[1]):ra:ca,ha=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function fa(t){for(const e in t)if(!ha.has(e))return!0;return!1}const dn=(t,e,n,s={},i,r)=>o=>{const a=fn(s,t)||{},c=a.delay||s.delay||0;let{elapsed:l=0}=s;l=l-W(c);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-l,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};fa(a)||Object.assign(u,ua(t,u)),u.duration&&(u.duration=W(u.duration)),u.repeatDelay&&(u.repeatDelay=W(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let h=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Ne(u),u.delay===0&&(h=!0)),(st.instantAnimations||st.skipAnimations||i?.shouldSkipAnimations||a.skipAnimations)&&(h=!0,Ne(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,h&&!r&&e.get()!==void 0){const f=ae(u.keyframes,a);if(f!==void 0){M.update(()=>{u.onUpdate(f),u.onComplete()});return}}return a.isSync?new te(u):new sa(u)},da=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function pa(t){const e=da.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}function Mi(t,e,n=1){const[s,i]=pa(t);if(!s)return;const r=window.getComputedStyle(e).getPropertyValue(s);if(r){const o=r.trim();return Hs(o)?parseFloat(o):o}return on(i)?Mi(i,e,n+1):i}function Wn(t){const e=[{},{}];return t?.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function pn(t,e,n,s){if(typeof e=="function"){const[i,r]=Wn(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]=Wn(s);e=e(n!==void 0?n:t.custom,i,r)}return e}function dt(t,e,n){const s=t.getProps();return pn(s,e,n!==void 0?n:s.custom,t)}const Di=new Set(["width","height","top","left","right","bottom",...Pt]),Ue=t=>Array.isArray(t);function ma(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Tt(n))}function ga(t){return Ue(t)?t[t.length-1]||0:t}function ya(t,e){const n=dt(t,e);let{transitionEnd:s={},transition:i={},...r}=n||{};r={...r,...s};for(const o in r){const a=ga(r[o]);ma(t,o,a)}}const O=t=>!!(t&&t.getVelocity);function va(t){return!!(O(t)&&t.add)}function We(t,e){const n=t.getValue("willChange");if(va(n))return n.add(e);if(!n&&st.WillChange){const s=new st.WillChange("auto");t.addValue("willChange",s),s.add(e)}}function mn(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const xa="framerAppearId",Ei="data-"+mn(xa);function Ri(t){return t.props[Ei]}function Ta({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function Li(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:r,transitionEnd:o,...a}=e;const c=t.getDefaultTransition();r=r?Ci(r,c):c;const l=r?.reduceMotion,u=r?.skipAnimations;s&&(r=s);const h=[],f=i&&t.animationState&&t.animationState.getState()[i],p=r?.path;p&&p.animateVisualElement(t,a,r,n,h);for(const d in a){const m=t.getValue(d,t.latestValues[d]??null),g=a[d];if(g===void 0||f&&Ta(f,d))continue;const y={delay:n,...fn(r||{},d)};u&&(y.skipAnimations=!0);const x=m.get();if(x!==void 0&&!m.isAnimating()&&!Array.isArray(g)&&g===x&&!y.velocity){M.update(()=>m.set(g));continue}let v=!1;if(window.MotionHandoffAnimation){const D=Ri(t);if(D){const V=window.MotionHandoffAnimation(D,d,M);V!==null&&(y.startTime=V,v=!0)}}We(t,d);const w=l??t.shouldReduceMotion;m.start(dn(d,m,g,w&&Di.has(d)?{type:!1}:y,t,v));const A=m.animation;A&&h.push(A)}if(o){const d=()=>M.update(()=>{o&&ya(t,o)});h.length?Promise.all(h).then(d):d()}return h}function Ke(t,e,n={}){const s=dt(t,e,n.type==="exit"?t.presenceContext?.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const r=s?()=>Promise.all(Li(t,s,n)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(c=0)=>{const{delayChildren:l=0,staggerChildren:u,staggerDirection:h}=i;return wa(t,e,c,l,u,h,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[c,l]=a==="beforeChildren"?[r,o]:[o,r];return c().then(()=>l())}else return Promise.all([r(),o(n.delay)])}function wa(t,e,n=0,s=0,i=0,r=1,o){const a=[];for(const c of t.variantChildren)c.notify("AnimationStart",e),a.push(Ke(c,e,{...o,delay:n+(typeof s=="function"?0:s)+Vi(t.variantChildren,c,s,i,r)}).then(()=>c.notify("AnimationComplete",e)));return Promise.all(a)}function Pa(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(r=>Ke(t,r,n));s=Promise.all(i)}else if(typeof e=="string")s=Ke(t,e,n);else{const i=typeof e=="function"?dt(t,e,n.custom):e;s=Promise.all(Li(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}const Sa={test:t=>t==="auto",parse:t=>t},ki=t=>e=>e.test(t),Bi=[wt,T,J,et,Yo,Xo,Sa],Kn=t=>Bi.find(ki(t));function ba(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Gs(t):!0}const Aa=new Set(["brightness","contrast","saturate","opacity"]);function Va(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(rn)||[];if(!s)return t;const i=n.replace(s,"");let r=Aa.has(e)?1:0;return s!==n&&(r*=100),e+"("+r+i+")"}const Ca=/\b([a-z-]*)\(.*?\)/gu,He={..._,getAnimatableNone:t=>{const e=t.match(Ca);return e?e.map(Va).join(" "):t}},ze={..._,getAnimatableNone:t=>{const e=_.parse(t);return _.createTransformer(t)(e.map(s=>typeof s=="number"?0:typeof s=="object"?{...s,alpha:1}:s))}},Hn={...wt,transform:Math.round},Ma={rotate:et,pathRotation:et,rotateX:et,rotateY:et,rotateZ:et,scale:Nt,scaleX:Nt,scaleY:Nt,scaleZ:Nt,skew:et,skewX:et,skewY:et,distance:T,translateX:T,translateY:T,translateZ:T,x:T,y:T,z:T,perspective:T,transformPerspective:T,opacity:Rt,originX:Mn,originY:Mn,originZ:T},ee={borderWidth:T,borderTopWidth:T,borderRightWidth:T,borderBottomWidth:T,borderLeftWidth:T,borderRadius:T,borderTopLeftRadius:T,borderTopRightRadius:T,borderBottomRightRadius:T,borderBottomLeftRadius:T,width:T,maxWidth:T,height:T,maxHeight:T,top:T,right:T,bottom:T,left:T,inset:T,insetBlock:T,insetBlockStart:T,insetBlockEnd:T,insetInline:T,insetInlineStart:T,insetInlineEnd:T,padding:T,paddingTop:T,paddingRight:T,paddingBottom:T,paddingLeft:T,paddingBlock:T,paddingBlockStart:T,paddingBlockEnd:T,paddingInline:T,paddingInlineStart:T,paddingInlineEnd:T,margin:T,marginTop:T,marginRight:T,marginBottom:T,marginLeft:T,marginBlock:T,marginBlockStart:T,marginBlockEnd:T,marginInline:T,marginInlineStart:T,marginInlineEnd:T,fontSize:T,backgroundPositionX:T,backgroundPositionY:T,...Ma,zIndex:Hn,fillOpacity:Rt,strokeOpacity:Rt,numOctaves:Hn},Da={...ee,color:L,backgroundColor:L,outlineColor:L,fill:L,stroke:L,borderColor:L,borderTopColor:L,borderRightColor:L,borderBottomColor:L,borderLeftColor:L,filter:He,WebkitFilter:He,mask:ze,WebkitMask:ze},Fi=t=>Da[t],Ea=new Set([He,ze]);function Ii(t,e){let n=Fi(t);return Ea.has(n)||(n=_),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Ra=new Set(["auto","none","0"]);function La(t,e,n){let s=0,i;for(;s<t.length&&!i;){const r=t[s];typeof r=="string"&&!Ra.has(r)&&xt(r).values.length&&(i=t[s]),s++}if(i&&n)for(const r of e)t[r]=Ii(n,i)}class ka extends hn{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 u=0;u<e.length;u++){let h=e[u];if(typeof h=="string"&&(h=h.trim(),on(h))){const f=Mi(h,n.current);f!==void 0&&(e[u]=f),u===e.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!Di.has(s)||e.length!==2)return;const[i,r]=e,o=Kn(i),a=Kn(r),c=Cn(i),l=Cn(r);if(c!==l&&nt[s]){this.needsMeasurement=!0;return}if(o!==a)if(In(o)&&In(a))for(let u=0;u<e.length;u++){const h=e[u];typeof h=="string"&&(e[u]=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||ba(e[i]))&&s.push(i);s.length&&La(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(){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),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,c])=>{e.getValue(a).set(c)}),this.resolveNoneKeyframes()}}const gn=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"];function Oi(t,e,n){if(t==null)return[];if(t instanceof EventTarget)return[t];if(typeof t=="string"){let s=document;const i=n?.[t]??s.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t).filter(s=>s!=null)}const Ge=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function Ba(t){return zs(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}const{schedule:yn}=ii(queueMicrotask,!1),$={x:!1,y:!1};function ji(){return $.x||$.y}function Fa(t){return t==="x"||t==="y"?$[t]?null:($[t]=!0,()=>{$[t]=!1}):$.x||$.y?null:($.x=$.y=!0,()=>{$.x=$.y=!1})}function Ni(t,e){const n=Oi(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}function Ia(t){return!(t.pointerType==="touch"||ji())}function Oa(t,e,n={}){const[s,i,r]=Ni(t,n);return s.forEach(o=>{let a=!1,c=!1,l;const u=()=>{o.removeEventListener("pointerleave",d)},h=g=>{l&&(l(g),l=void 0),u()},f=g=>{a=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),c&&(c=!1,h(g))},p=()=>{a=!0,window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",f,i)},d=g=>{if(g.pointerType!=="touch"){if(a){c=!0;return}h(g)}},m=g=>{if(!Ia(g))return;c=!1;const y=e(o,g);typeof y=="function"&&(l=y,o.addEventListener("pointerleave",d,i))};o.addEventListener("pointerenter",m,i),o.addEventListener("pointerdown",p,i)}),r}const Ui=(t,e)=>e?t===e?!0:Ui(t,e.parentElement):!1,vn=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,ja=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Na(t){return ja.has(t.tagName)||t.isContentEditable===!0}const Ua=new Set(["INPUT","SELECT","TEXTAREA"]);function Wa(t){return Ua.has(t.tagName)||t.isContentEditable===!0}const Ht=new WeakSet;function zn(t){return e=>{e.key==="Enter"&&t(e)}}function ye(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const Ka=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=zn(()=>{if(Ht.has(n))return;ye(n,"down");const i=zn(()=>{ye(n,"up")}),r=()=>ye(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 Gn(t){return vn(t)&&!ji()}const $n=new WeakSet;function Ha(t,e,n={}){const[s,i,r]=Ni(t,n),o=a=>{const c=a.currentTarget;if(!Gn(a)||$n.has(a))return;Ht.add(c),n.stopPropagation&&$n.add(a);const l=e(c,a),u={...i,capture:!0},h=(d,m)=>{window.removeEventListener("pointerup",f,u),window.removeEventListener("pointercancel",p,u),Ht.has(c)&&Ht.delete(c),Gn(d)&&typeof l=="function"&&l(d,{success:m})},f=d=>{h(d,c===window||c===document||n.useGlobalTarget||Ui(c,d.target))},p=d=>{h(d,!1)};window.addEventListener("pointerup",f,u),window.addEventListener("pointercancel",p,u)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),Ba(a)&&(a.addEventListener("focus",l=>Ka(l,i)),!Na(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),r}function xn(t){return zs(t)&&"ownerSVGElement"in t}const zt=new WeakMap;let Gt;const Wi=(t,e,n)=>(s,i)=>i&&i[0]?i[0][t+"Size"]:xn(s)&&"getBBox"in s?s.getBBox()[e]:s[n],za=Wi("inline","width","offsetWidth"),Ga=Wi("block","height","offsetHeight");function $a({target:t,borderBoxSize:e}){zt.get(t)?.forEach(n=>{n(t,{get width(){return za(t,e)},get height(){return Ga(t,e)}})})}function _a(t){t.forEach($a)}function Xa(){typeof ResizeObserver>"u"||(Gt=new ResizeObserver(_a))}function Ya(t,e){Gt||Xa();const n=Oi(t);return n.forEach(s=>{let i=zt.get(s);i||(i=new Set,zt.set(s,i)),i.add(e),Gt?.observe(s)}),()=>{n.forEach(s=>{const i=zt.get(s);i?.delete(e),i?.size||Gt?.unobserve(s)})}}const $t=new Set;let yt;function qa(){yt=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};$t.forEach(e=>e(t))},window.addEventListener("resize",yt)}function Za(t){return $t.add(t),yt||qa(),()=>{$t.delete(t),!$t.size&&typeof yt=="function"&&(window.removeEventListener("resize",yt),yt=void 0)}}function _n(t,e){return typeof t=="function"?Za(t):Ya(t,e)}function Ja(t){return xn(t)&&t.tagName==="svg"}const Qa=[...Bi,L,_],tl=t=>Qa.find(ki(t)),Xn=()=>({translate:0,scale:1,origin:0,originPoint:0}),vt=()=>({x:Xn(),y:Xn()}),Yn=()=>({min:0,max:0}),k=()=>({x:Yn(),y:Yn()}),el=new WeakMap;function le(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function Lt(t){return typeof t=="string"||Array.isArray(t)}const Tn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],wn=["initial",...Tn];function ce(t){return le(t.animate)||wn.some(e=>Lt(t[e]))}function Ki(t){return!!(ce(t)||t.variants)}function nl(t,e,n){for(const s in e){const i=e[s],r=n[s];if(O(i))t.addValue(s,i);else if(O(r))t.addValue(s,Tt(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,Tt(o!==void 0?o:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const $e={current:null},Hi={current:!1},sl=typeof window<"u";function il(){if(Hi.current=!0,!!sl)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>$e.current=t.matches;t.addEventListener("change",e),e()}else $e.current=!1}const qn=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let ne={};function zi(t){ne=t}function ol(){return ne}class rl{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,skipAnimations:r,blockInitialAnimation:o,visualState:a},c={}){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=hn,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 p=j.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,M.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=a;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=r,this.options=c,this.blockInitialAnimation=!!o,this.isControllingVariants=ce(n),this.isVariantNode=Ki(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:h,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const p in f){const d=f[p];l[p]!==void 0&&O(d)&&d.set(l[p])}}mount(e){if(this.hasBeenMounted)for(const n in this.initialValues)this.values.get(n)?.jump(this.initialValues[n]),this.latestValues[n]=this.initialValues[n];this.current=e,el.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Hi.current||il(),this.shouldReduceMotion=$e.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),it(this.notifyUpdate),it(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}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&&Ai.has(e)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:c,ease:l,duration:u}=n.accelerate,h=new Si({element:this.current,name:e,keyframes:a,times:c,ease:l,duration:W(u)}),f=o(h);this.valueSubscriptions.set(e,()=>{f(),h.cancel()});return}const s=St.has(e);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&M.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()})}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 ne){const n=ne[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):k()}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<qn.length;s++){const i=qn[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=nl(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=Tt(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"&&(Hs(s)||Gs(s))?s=parseFloat(s):!tl(s)&&_.test(n)&&(s=Ii(e,n)),this.setBaseTarget(e,O(s)?s.get():s)),O(s)?s.get():s}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const r=pn(this.props,n,this.presenceContext?.custom);r&&(s=r[e])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!O(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 en),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){yn.render(this.render)}}class Gi extends rl{constructor(){super(...arguments),this.KeyframeResolver=ka}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;O(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 $i({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function al({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function ll(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 ve(t){return t===void 0||t===1}function _e({scale:t,scaleX:e,scaleY:n}){return!ve(t)||!ve(e)||!ve(n)}function ct(t){return _e(t)||_i(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function _i(t){return Zn(t.x)||Zn(t.y)}function Zn(t){return t&&t!=="0%"}function se(t,e,n){const s=t-n,i=e*s;return n+i}function Jn(t,e,n,s,i){return i!==void 0&&(t=se(t,i,s)),se(t,n,s)+e}function Xe(t,e=0,n=1,s,i){t.min=Jn(t.min,e,n,s,i),t.max=Jn(t.max,e,n,s,i)}function Xi(t,{x:e,y:n}){Xe(t.x,e.translate,e.scale,e.originPoint),Xe(t.y,n.translate,n.scale,n.originPoint)}const Qn=.999999999999,ts=1.0000000000001;function cl(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let r,o;for(let a=0;a<i;a++){r=n[a],o=r.projectionDelta;const{visualElement:c}=r.options;c&&c.props.style&&c.props.style.display==="contents"||(s&&r.options.layoutScroll&&r.scroll&&r!==r.root&&(Z(t.x,-r.scroll.offset.x),Z(t.y,-r.scroll.offset.y)),o&&(e.x*=o.x.scale,e.y*=o.y.scale,Xi(t,o)),s&&ct(r.latestValues)&&_t(t,r.latestValues,r.layout?.layoutBox))}e.x<ts&&e.x>Qn&&(e.x=1),e.y<ts&&e.y>Qn&&(e.y=1)}function Z(t,e){t.min+=e,t.max+=e}function es(t,e,n,s,i=.5){const r=C(t.min,t.max,i);Xe(t,e,n,r,s)}function ns(t,e){return typeof t=="string"?parseFloat(t)/100*(e.max-e.min):t}function _t(t,e,n){const s=n??t;es(t.x,ns(e.x,s.x),e.scaleX,e.scale,e.originX),es(t.y,ns(e.y,s.y),e.scaleY,e.scale,e.originY)}function Yi(t,e){return $i(ll(t.getBoundingClientRect(),e))}function ul(t,e,n){const s=Yi(t,n),{scroll:i}=e;return i&&(Z(s.x,i.offset.x),Z(s.y,i.offset.y)),s}const hl={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},fl=Pt.length;function dl(t,e,n){let s="",i=!0;for(let o=0;o<fl;o++){const a=Pt[o],c=t[a];if(c===void 0)continue;let l=!0;if(typeof c=="number")l=c===(a.startsWith("scale")?1:0);else{const u=parseFloat(c);l=a.startsWith("scale")?u===1:u===0}if(!l||n){const u=Ge(c,ee[a]);if(!l){i=!1;const h=hl[a]||a;s+=`${h}(${u}) `}n&&(e[a]=u)}}const r=t.pathRotation;return r&&(i=!1,s+=`rotate(${Ge(r,ee.pathRotation)}) `),s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function Pn(t,e,n){const{style:s,vars:i,transformOrigin:r}=t;let o=!1,a=!1;for(const c in e){const l=e[c];if(St.has(c)){o=!0;continue}else if(ri(c)){i[c]=l;continue}else{const u=Ge(l,ee[c]);c.startsWith("origin")?(a=!0,r[c]=u):s[c]=u}}if(e.transform||(o||n?s.transform=dl(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:c="50%",originY:l="50%",originZ:u=0}=r;s.transformOrigin=`${c} ${l} ${u}`}}function qi(t,{style:e,vars:n},s,i){const r=t.style;let o;for(o in e)r[o]=e[o];i?.applyProjectionStyles(r,s);for(o in n)r.setProperty(o,n[o])}function ss(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const bt={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(T.test(t))t=parseFloat(t);else return t;const n=ss(t,e.target.x),s=ss(t,e.target.y);return`${n}% ${s}%`}},pl={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,c=n.y.scale*e.y;i[0+o]/=a,i[1+o]/=c;const l=C(a,c,.5);return typeof i[2+o]=="number"&&(i[2+o]/=l),typeof i[3+o]=="number"&&(i[3+o]/=l),r(i)}},Ye={borderRadius:{...bt,applyTo:[...gn]},borderTopLeftRadius:bt,borderTopRightRadius:bt,borderBottomLeftRadius:bt,borderBottomRightRadius:bt,boxShadow:pl};function Zi(t,{layout:e,layoutId:n}){return St.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Ye[t]||t==="opacity")}function Sn(t,e,n){const s=t.style,i=e?.style,r={};if(!s)return r;for(const o in s)(O(s[o])||i&&O(i[o])||Zi(o,t)||n?.getValue(o)?.liveStyle!==void 0)&&(r[o]=s[o]);return r}function ml(t){return window.getComputedStyle(t)}class gl extends Gi{constructor(){super(...arguments),this.type="html",this.renderInstance=qi}mount(e){re(!!e.style),super.mount(e)}readValueFromInstance(e,n){if(St.has(n))return this.projection?.isProjecting?Be(n):Fr(e,n);{const s=ml(e),i=(ri(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Yi(e,n)}build(e,n,s){Pn(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return Sn(e,n,s)}}const yl={offset:"stroke-dashoffset",array:"stroke-dasharray"},vl={offset:"strokeDashoffset",array:"strokeDasharray"};function xl(t,e,n=1,s=0,i=!0){t.pathLength=1;const r=i?yl:vl;t[r.offset]=`${-s}`,t[r.array]=`${e} ${n}`}const Tl=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Ji(t,{attrX:e,attrY:n,attrScale:s,pathLength:i,pathSpacing:r=1,pathOffset:o=0,...a},c,l,u){if(Pn(t,a,l),c){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=u?.transformBox??"fill-box",delete h.transformBox);for(const p of Tl)h[p]!==void 0&&(f[p]=h[p],delete h[p]);e!==void 0&&(h.x=e),n!==void 0&&(h.y=n),s!==void 0&&(h.scale=s),i!==void 0&&xl(h,i,r,o,!1)}const Qi=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"]),to=t=>typeof t=="string"&&t.toLowerCase()==="svg";function wl(t,e,n,s){qi(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(Qi.has(i)?i:mn(i),e.attrs[i])}function eo(t,e,n){const s=Sn(t,e,n);for(const i in t)if(O(t[i])||O(e[i])){const r=Pt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[r]=t[i]}return s}class Pl extends Gi{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=k}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(St.has(n)){const s=Fi(n);return s&&s.default||0}return n=Qi.has(n)?n:mn(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return eo(e,n,s)}build(e,n,s){Ji(e,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(e,n,s,i){wl(e,n,s,i)}mount(e){this.isSVGTag=to(e.tagName),super.mount(e)}}const Sl=wn.length;function no(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?no(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<Sl;n++){const s=wn[n],i=t.props[s];(Lt(i)||i===!1)&&(e[s]=i)}return e}function so(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 bl=[...Tn].reverse(),Al=Tn.length;function Vl(t){return e=>Promise.all(e.map(({animation:n,options:s})=>Pa(t,n,s)))}function Cl(t){let e=Vl(t),n=is(),s=!0,i=!1;const r=l=>(u,h)=>{const f=dt(t,h,l==="exit"?t.presenceContext?.custom:void 0);if(f){const{transition:p,transitionEnd:d,...m}=f;u={...u,...m,...d}}return u};function o(l){e=l(t)}function a(l){const{props:u}=t,h=no(t.parent)||{},f=[],p=new Set;let d={},m=1/0;for(let y=0;y<Al;y++){const x=bl[y],v=n[x],w=u[x]!==void 0?u[x]:h[x],A=Lt(w),D=x===l?v.isActive:null;D===!1&&(m=y);let V=w===h[x]&&w!==u[x]&&A;if(V&&(s||i)&&t.manuallyAnimateOnMount&&(V=!1),v.protectedKeys={...d},!v.isActive&&D===null||!w&&!v.prevProp||le(w)||typeof w=="boolean")continue;if(x==="exit"&&v.isActive&&D!==!0){v.prevResolvedValues&&(d={...d,...v.prevResolvedValues});continue}const b=Ml(v.prevProp,w);let B=b||x===l&&v.isActive&&!V&&A||y>m&&A,S=!1;const R=Array.isArray(w)?w:[w];let U=R.reduce(r(x),{});D===!1&&(U={});const{prevResolvedValues:rt={}}=v,X={...rt,...U},tt=F=>{B=!0,p.has(F)&&(S=!0,p.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(d.hasOwnProperty(F))continue;let pt=!1;Ue(K)&&Ue(at)?pt=!so(K,at)||b:pt=K!==at,pt?K!=null?tt(F):p.add(F):K!==void 0&&p.has(F)?tt(F):v.protectedKeys[F]=!0}v.prevProp=w,v.prevResolvedValues=U,v.isActive&&(d={...d,...U}),(s||i)&&t.blockInitialAnimation&&(B=!1);const Y=V&&b;B&&(!Y||S)&&f.push(...R.map(F=>{const K={type:x};if(typeof F=="string"&&(s||i)&&!Y&&t.manuallyAnimateOnMount&&t.parent){const{parent:at}=t,pt=dt(at,F);if(at.enteringChildren&&pt){const{delayChildren:Co}=pt.transition||{};K.delay=Vi(at.enteringChildren,t,Co)}}return{animation:F,options:K}}))}if(p.size){const y={};if(typeof u.initial!="boolean"){const x=dt(t,Array.isArray(u.initial)?u.initial[0]:u.initial);x&&x.transition&&(y.transition=x.transition)}p.forEach(x=>{const v=t.getBaseTarget(x),w=t.getValue(x);w&&(w.liveStyle=!0),y[x]=v??null}),f.push({animation:y})}let g=!!f.length;return s&&(u.initial===!1||u.initial===u.animate)&&!t.manuallyAnimateOnMount&&(g=!1),s=!1,i=!1,g?e(f):Promise.resolve()}function c(l,u){if(n[l].isActive===u)return Promise.resolve();t.variantChildren?.forEach(f=>f.animationState?.setActive(l,u)),n[l].isActive=u;const h=a(l);for(const f in n)n[f].protectedKeys={};return h}return{animateChanges:a,setActive:c,setAnimateFunction:o,getState:()=>n,reset:()=>{n=is(),i=!0}}}function Ml(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!so(e,t):!1}function lt(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function is(){return{animate:lt(!0),whileInView:lt(),whileHover:lt(),whileTap:lt(),whileDrag:lt(),whileFocus:lt(),exit:lt()}}function qe(t,e){t.min=e.min,t.max=e.max}function G(t,e){qe(t.x,e.x),qe(t.y,e.y)}function os(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}const io=1e-4,Dl=1-io,El=1+io,oo=.01,Rl=0-oo,Ll=0+oo;function N(t){return t.max-t.min}function kl(t,e,n){return Math.abs(t-e)<=n}function rs(t,e,n,s=.5){t.origin=s,t.originPoint=C(e.min,e.max,t.origin),t.scale=N(n)/N(e),t.translate=C(n.min,n.max,t.origin)-t.originPoint,(t.scale>=Dl&&t.scale<=El||isNaN(t.scale))&&(t.scale=1),(t.translate>=Rl&&t.translate<=Ll||isNaN(t.translate))&&(t.translate=0)}function Mt(t,e,n,s){rs(t.x,e.x,n.x,s?s.originX:void 0),rs(t.y,e.y,n.y,s?s.originY:void 0)}function as(t,e,n,s=0){const i=s?C(n.min,n.max,s):n.min;t.min=i+e.min,t.max=t.min+N(e)}function Bl(t,e,n,s){as(t.x,e.x,n.x,s?.x),as(t.y,e.y,n.y,s?.y)}function ls(t,e,n,s=0){const i=s?C(n.min,n.max,s):n.min;t.min=e.min-i,t.max=t.min+N(e)}function ie(t,e,n,s){ls(t.x,e.x,n.x,s?.x),ls(t.y,e.y,n.y,s?.y)}function cs(t,e,n,s,i){return t-=e,t=se(t,1/n,s),i!==void 0&&(t=se(t,1/i,s)),t}function Fl(t,e=0,n=1,s=.5,i,r=t,o=t){if(J.test(e)&&(e=parseFloat(e),e=C(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=C(r.min,r.max,s);t===r&&(a-=e),t.min=cs(t.min,e,n,a,i),t.max=cs(t.max,e,n,a,i)}function us(t,e,[n,s,i],r,o){Fl(t,e[n],e[s],e[i],e.scale,r,o)}const Il=["x","scaleX","originX"],Ol=["y","scaleY","originY"];function hs(t,e,n,s){us(t.x,e,Il,n?n.x:void 0,s?s.x:void 0),us(t.y,e,Ol,n?n.y:void 0,s?s.y:void 0)}function fs(t){return t.translate===0&&t.scale===1}function ro(t){return fs(t.x)&&fs(t.y)}function ds(t,e){return t.min===e.min&&t.max===e.max}function jl(t,e){return ds(t.x,e.x)&&ds(t.y,e.y)}function ps(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function ao(t,e){return ps(t.x,e.x)&&ps(t.y,e.y)}function ms(t){return N(t.x)/N(t.y)}function gs(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function q(t){return[t("x"),t("y")]}function Nl(t,e,n){let s="";const i=t.x.translate/e.x,r=t.y.translate/e.y,o=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:l,rotate:u,pathRotation:h,rotateX:f,rotateY:p,skewX:d,skewY:m}=n;l&&(s=`perspective(${l}px) ${s}`),u&&(s+=`rotate(${u}deg) `),h&&(s+=`rotate(${h}deg) `),f&&(s+=`rotateX(${f}deg) `),p&&(s+=`rotateY(${p}deg) `),d&&(s+=`skewX(${d}deg) `),m&&(s+=`skewY(${m}deg) `)}const a=t.x.scale*e.x,c=t.y.scale*e.y;return(a!==1||c!==1)&&(s+=`scale(${a}, ${c})`),s||"none"}const Ul=gn.length,ys=t=>typeof t=="string"?parseFloat(t):t,vs=t=>typeof t=="number"||T.test(t);function Wl(t,e,n,s,i,r){i?(t.opacity=C(0,n.opacity??1,Kl(s)),t.opacityExit=C(e.opacity??1,0,Hl(s))):r&&(t.opacity=C(e.opacity??1,n.opacity??1,s));for(let o=0;o<Ul;o++){const a=gn[o];let c=xs(e,a),l=xs(n,a);if(c===void 0&&l===void 0)continue;c||(c=0),l||(l=0),c===0||l===0||vs(c)===vs(l)?(t[a]=Math.max(C(ys(c),ys(l),s),0),(J.test(l)||J.test(c))&&(t[a]+="%")):t[a]=l}(e.rotate||n.rotate)&&(t.rotate=C(e.rotate||0,n.rotate||0,s))}function xs(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const Kl=lo(0,.5,ti),Hl=lo(.5,.95,z);function lo(t,e,n){return s=>s<t?0:s>e?1:n(Et(t,e,s))}function zl(t,e,n){const s=O(t)?t:Tt(t);return s.start(dn("",s,e,n)),s.animation}function kt(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n,s)}const Gl=(t,e)=>t.depth-e.depth;class $l{constructor(){this.children=[],this.isDirty=!1}add(e){tn(this.children,e),this.isDirty=!0}remove(e){qt(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Gl),this.isDirty=!1,this.children.forEach(e)}}function _l(t,e){const n=j.now(),s=({timestamp:i})=>{const r=i-n;r>=e&&(it(s),t(r-e))};return M.setup(s,!0),()=>it(s)}function Xt(t){return O(t)?t.get():t}class Xl{constructor(){this.members=[]}add(e){tn(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){for(let n=this.members.indexOf(e)-1;n>=0;n--){const s=this.members[n];if(s.isPresent!==!1&&s.instance?.isConnected!==!1)return this.promote(s),!0}return!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.updateSnapshot(),e.scheduleRender();const{layoutDependency:i}=s.options,{layoutDependency:r}=e.options;(i===void 0||i!==r)&&(e.resumeFrom=s,n&&(s.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const Yt={hasAnimatedSinceResize:!0,hasEverUpdated:!1},xe=["","X","Y","Z"],Yl=1e3;let ql=0;function Te(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function co(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Ri(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:r}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",M,!(i||r))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&co(s)}function uo({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(o={},a=e?.()){this.id=ql++,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(Ql),this.nodes.forEach(oc),this.nodes.forEach(rc),this.nodes.forEach(tc)},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 c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new $l)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new en),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const c=this.eventHandlers.get(o);c&&c.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=xn(o)&&!Ja(o),this.instance=o;const{layoutId:a,layout:c,visualElement:l}=this.options;if(l&&!l.current&&l.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||a)&&(this.isLayoutDirty=!0),t){let u,h=0;const f=()=>this.root.updateBlockedByResize=!1;M.read(()=>{h=window.innerWidth}),t(o,()=>{const p=window.innerWidth;p!==h&&(h=p,this.root.updateBlockedByResize=!0,u&&u(),u=_l(f,250),Yt.hasAnimatedSinceResize&&(Yt.hasAnimatedSinceResize=!1,this.nodes.forEach(Ps)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&l&&(a||c)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h,hasRelativeLayoutChanged:f,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const d=this.options.transition||l.getDefaultTransition()||hc,{onLayoutAnimationStart:m,onLayoutAnimationComplete:g}=l.getProps(),y=!this.targetLayout||!ao(this.targetLayout,p),x=!h&&f;if(this.options.layoutRoot||this.resumeFrom||x||h&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const v={...fn(d,"layout"),onPlay:m,onComplete:g};(l.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v),this.setAnimationOrigin(u,x,v.path)}else h||Ps(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}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(ac),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&&co(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const h=this.path[u];h.shouldResetTransform=!0,(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:c}=this.options;if(a===void 0&&!c)return;const l=this.getTransformTemplate();this.prevTransformTemplateValue=l?l(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const c=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),c&&this.nodes.forEach(nc),this.nodes.forEach(Ts);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(ws);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(sc),this.nodes.forEach(ic),this.nodes.forEach(Zl),this.nodes.forEach(Jl)):this.nodes.forEach(ws),this.clearAllSnapshots();const a=j.now();I.delta=Q(0,1e3/60,a-I.timestamp),I.timestamp=a,I.isProcessing=!0,he.update.process(I),he.preRender.process(I),he.render.process(I),I.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,yn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(ec),this.sharedNodes.forEach(lc)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,M.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){M.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 c=0;c<this.path.length;c++)this.path[c].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=k()),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 c=s(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!ro(this.projectionDelta),c=this.getTransformTemplate(),l=c?c(this.latestValues,""):void 0,u=l!==this.prevTransformTemplateValue;o&&this.instance&&(a||ct(this.latestValues)||u)&&(i(this.instance,l),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let c=this.removeElementScroll(a);return o&&(c=this.removeTransform(c)),fc(c),{animationId:this.root.animationId,measuredBox:a,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:o}=this.options;if(!o)return k();const a=o.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(dc))){const{scroll:l}=this.root;l&&(Z(a.x,l.offset.x),Z(a.y,l.offset.y))}return a}removeElementScroll(o){const a=k();if(G(a,o),this.scroll?.wasRoot)return a;for(let c=0;c<this.path.length;c++){const l=this.path[c],{scroll:u,options:h}=l;l!==this.root&&u&&h.layoutScroll&&(u.wasRoot&&G(a,o),Z(a.x,u.offset.x),Z(a.y,u.offset.y))}return a}applyTransform(o,a=!1,c){const l=c||k();G(l,o);for(let u=0;u<this.path.length;u++){const h=this.path[u];!a&&h.options.layoutScroll&&h.scroll&&h!==h.root&&(Z(l.x,-h.scroll.offset.x),Z(l.y,-h.scroll.offset.y)),ct(h.latestValues)&&_t(l,h.latestValues,h.layout?.layoutBox)}return ct(this.latestValues)&&_t(l,this.latestValues,this.layout?.layoutBox),l}removeTransform(o){const a=k();G(a,o);for(let c=0;c<this.path.length;c++){const l=this.path[c];if(!ct(l.latestValues))continue;let u;l.instance&&(_e(l.latestValues)&&l.updateSnapshot(),u=k(),G(u,l.measurePageBox())),hs(a,l.latestValues,l.snapshot?.layoutBox,u)}return ct(this.latestValues)&&hs(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){const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==a;if(!(o||c&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:h}=this.options;if(!this.layout||!(u||h))return;this.resolvedRelativeTargetAt=I.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=k(),this.targetWithTransforms=k()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Bl(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):G(this.target,this.layout.layoutBox),Xi(this.target,this.targetDelta)):G(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!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||_e(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,c){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=k(),this.relativeTargetOrigin=k(),ie(this.relativeTargetOrigin,a,c,this.options.layoutAnchor||void 0),G(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const o=this.getLead(),a=!!this.resumingFrom||this!==o;let c=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(c=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===I.timestamp&&(c=!1),c)return;const{layout:l,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(l||u))return;G(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,f=this.treeScale.y;cl(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=k());const{target:p}=o;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(os(this.prevProjectionDelta.x,this.projectionDelta.x),os(this.prevProjectionDelta.y,this.projectionDelta.y)),Mt(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==f||!gs(this.projectionDelta.x,this.prevProjectionDelta.x)||!gs(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){if(this.options.visualElement?.scheduleRender(),o){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=vt(),this.projectionDelta=vt(),this.projectionDeltaWithTransform=vt()}setAnimationOrigin(o,a=!1,c){const l=this.snapshot,u=l?l.latestValues:{},h={...this.latestValues},f=vt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const p=k(),d=l?l.source:void 0,m=this.layout?this.layout.source:void 0,g=d!==m,y=this.getStack(),x=!y||y.members.length<=1,v=!!(g&&!x&&this.options.crossfade===!0&&!this.path.some(uc));this.animationProgress=0;let w;const A=c?.interpolateProjection(o);this.mixTargetDelta=D=>{const V=D/1e3,b=A?.(V);b?(f.x.translate=b.x,f.x.scale=C(o.x.scale,1,V),f.x.origin=o.x.origin,f.x.originPoint=o.x.originPoint,f.y.translate=b.y,f.y.scale=C(o.y.scale,1,V),f.y.origin=o.y.origin,f.y.originPoint=o.y.originPoint):(Ss(f.x,o.x,V),Ss(f.y,o.y,V)),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ie(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),cc(this.relativeTarget,this.relativeTargetOrigin,p,V),w&&jl(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=k()),G(w,this.relativeTarget)),g&&(this.animationValues=h,Wl(h,u,this.latestValues,V,v,x)),b&&b.rotate!==void 0&&(this.animationValues||(this.animationValues=h),this.animationValues.pathRotation=b.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=V},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(it(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=M.update(()=>{Yt.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Tt(0)),this.motionValue.jump(0,!1),this.currentAnimation=zl(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},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(Yl),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:c,layout:l,latestValues:u}=o;if(!(!a||!c||!l)){if(this!==o&&this.layout&&l&&ho(this.options.animationType,this.layout.layoutBox,l.layoutBox)){c=this.target||k();const h=N(this.layout.layoutBox.x);c.x.min=o.target.x.min,c.x.max=c.x.min+h;const f=N(this.layout.layoutBox.y);c.y.min=o.target.y.min,c.y.max=c.y.min+f}G(a,c),_t(a,u),Mt(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new Xl),this.sharedNodes.get(o).add(a);const l=a.options.initialPromotionConfig;a.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){const{layoutId:o}=this.options;return o?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:o}=this.options;return o?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:c}={}){const l=this.getStack();l&&l.promote(this,c),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:c}=o;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(a=!0),!a)return;const l={};c.z&&Te("z",o,l,this.animationValues);for(let u=0;u<xe.length;u++)Te(`rotate${xe[u]}`,o,l,this.animationValues),Te(`skew${xe[u]}`,o,l,this.animationValues);o.render();for(const u in l)o.setStaticValue(u,l[u]),this.animationValues&&(this.animationValues[u]=l[u]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=Xt(a?.pointerEvents)||"",o.transform=c?c(this.latestValues,""):"none";return}const l=this.getLead();if(!this.projectionDelta||!this.layout||!l.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=Xt(a?.pointerEvents)||""),this.hasProjected&&!ct(this.latestValues)&&(o.transform=c?c({},""):"none",this.hasProjected=!1);return}o.visibility="";const u=l.animationValues||l.latestValues;this.applyTransformsToTarget();let h=Nl(this.projectionDeltaWithTransform,this.treeScale,u);c&&(h=c(u,h)),o.transform=h;const{x:f,y:p}=this.projectionDelta;o.transformOrigin=`${f.origin*100}% ${p.origin*100}% 0`,l.animationValues?o.opacity=l===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:o.opacity=l===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const d in Ye){if(u[d]===void 0)continue;const{correct:m,applyTo:g,isCSSVariable:y}=Ye[d],x=h==="none"?u[d]:m(u[d],l);if(g){const v=g.length;for(let w=0;w<v;w++)o[g[w]]=x}else y?this.options.visualElement.renderState.vars[d]=x:o[d]=x}this.options.layoutId&&(o.pointerEvents=l===this?Xt(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>o.currentAnimation?.stop()),this.root.nodes.forEach(Ts),this.root.sharedNodes.clear()}}}function Zl(t){t.updateLayout()}function Jl(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:s}=t.layout,{animationType:i}=t.options,r=e.source!==t.layout.source;if(i==="size")q(u=>{const h=r?e.measuredBox[u]:e.layoutBox[u],f=N(h);h.min=n[u].min,h.max=h.min+f});else if(i==="x"||i==="y"){const u=i==="x"?"y":"x";qe(r?e.measuredBox[u]:e.layoutBox[u],n[u])}else ho(i,e.layoutBox,n)&&q(u=>{const h=r?e.measuredBox[u]:e.layoutBox[u],f=N(n[u]);h.max=h.min+f,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[u].max=t.relativeTarget[u].min+f)});const o=vt();Mt(o,n,e.layoutBox);const a=vt();r?Mt(a,t.applyTransform(s,!0),e.measuredBox):Mt(a,n,e.layoutBox);const c=!ro(o);let l=!1;if(!t.resumeFrom){const u=t.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:h,layout:f}=u;if(h&&f){const p=t.options.layoutAnchor||void 0,d=k();ie(d,e.layoutBox,h.layoutBox,p);const m=k();ie(m,n,f.layoutBox,p),ao(d,m)||(l=!0),u.options.layoutRoot&&(t.relativeTarget=m,t.relativeTargetOrigin=d,t.relativeParent=u)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(t.isLead()){const{onExitComplete:n}=t.options;n&&n()}t.options.transition=void 0}function Ql(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 tc(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function ec(t){t.clearSnapshot()}function Ts(t){t.clearMeasurements()}function nc(t){t.isLayoutDirty=!0,t.updateLayout()}function ws(t){t.isLayoutDirty=!1}function sc(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.layout,t.isLayoutDirty=!0)}function ic(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Ps(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function oc(t){t.resolveTargetDelta()}function rc(t){t.calcProjection()}function ac(t){t.resetSkewAndRotation()}function lc(t){t.removeLeadSnapshot()}function Ss(t,e,n){t.translate=C(e.translate,0,n),t.scale=C(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function bs(t,e,n,s){t.min=C(e.min,n.min,s),t.max=C(e.max,n.max,s)}function cc(t,e,n,s){bs(t.x,e.x,n.x,s),bs(t.y,e.y,n.y,s)}function uc(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const hc={duration:.45,ease:[.4,0,.1,1]},As=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Vs=As("applewebkit/")&&!As("chrome/")?Math.round:z;function Cs(t){t.min=Vs(t.min),t.max=Vs(t.max)}function fc(t){Cs(t.x),Cs(t.y)}function ho(t,e,n){return t==="position"||t==="preserve-aspect"&&!kl(ms(e),ms(n),.2)}function dc(t){return t!==t.root&&t.scroll?.wasRoot}const pc=uo({attachResizeListener:(t,e)=>kt(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),we={current:void 0},fo=uo({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!we.current){const t=new pc({});t.mount(window),t.setOptions({layoutScroll:!0}),we.current=t}return we.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),po=P.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function mc(t=!0){const e=P.useContext(Qe);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=e,r=P.useId();P.useEffect(()=>{if(t)return i(r)},[t]);const o=P.useCallback(()=>t&&s&&s(r),[r,s,t]);return!n&&s?[!1,o]:[!0]}const mo=P.createContext({strict:!1}),Ms={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 Ds=!1;function gc(){if(Ds)return;const t={};for(const e in Ms)t[e]={isEnabled:n=>Ms[e].some(s=>!!n[s])};zi(t),Ds=!0}function go(){return gc(),ol()}function yc(t){const e=go();for(const n in t)e[n]={...e[n],...t[n]};zi(e)}const vc=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 oe(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||vc.has(t)}let yo=t=>!oe(t);function xc(t){typeof t=="function"&&(yo=e=>e.startsWith("on")?!oe(e):t(e))}try{xc(require("@emotion/is-prop-valid").default)}catch{}function Tc(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||O(t[i])||(yo(i)||n===!0&&oe(i)||!e&&!oe(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}const ue=P.createContext({});function wc(t,e){if(ce(t)){const{initial:n,animate:s}=t;return{initial:n===!1||Lt(n)?n:void 0,animate:Lt(s)?s:void 0}}return t.inherit!==!1?e:{}}function Pc(t){const{initial:e,animate:n}=wc(t,P.useContext(ue));return P.useMemo(()=>({initial:e,animate:n}),[Es(e),Es(n)])}function Es(t){return Array.isArray(t)?t.join(" "):t}const bn=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function vo(t,e,n){for(const s in e)!O(e[s])&&!Zi(s,n)&&(t[s]=e[s])}function Sc({transformTemplate:t},e){return P.useMemo(()=>{const n=bn();return Pn(n,e,t),Object.assign({},n.vars,n.style)},[e])}function bc(t,e){const n=t.style||{},s={};return vo(s,n,t),Object.assign(s,Sc(t,e)),s}function Ac(t,e){const n={},s=bc(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 xo=()=>({...bn(),attrs:{}});function Vc(t,e,n,s){const i=P.useMemo(()=>{const r=xo();return Ji(r,e,to(s),t.transformTemplate,t.style),{...r.attrs,style:{...r.style}}},[e]);if(t.style){const r={};vo(r,t.style,t),i.style={...r,...i.style}}return i}const Cc=["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 An(t){return typeof t!="string"||t.includes("-")?!1:!!(Cc.indexOf(t)>-1||/[A-Z]/u.test(t))}function Mc(t,e,n,{latestValues:s},i,r=!1,o){const c=(o??An(t)?Vc:Ac)(e,s,i,t),l=Tc(e,typeof t=="string",r),u=t!==P.Fragment?{...l,...c,ref:n}:{},{children:h}=e,f=P.useMemo(()=>O(h)?h.get():h,[h]);return P.createElement(t,{...u,children:f})}function Dc({scrapeMotionValuesFromProps:t,createRenderState:e},n,s,i){return{latestValues:Ec(n,s,i,t),renderState:e()}}function Ec(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 c=ce(t),l=Ki(t);e&&l&&!c&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let u=n?n.initial===!1:!1;u=u||o===!1;const h=u?a:o;if(h&&typeof h!="boolean"&&!le(h)){const f=Array.isArray(h)?h:[h];for(let p=0;p<f.length;p++){const d=pn(t,f[p]);if(d){const{transitionEnd:m,transition:g,...y}=d;for(const x in y){let v=y[x];if(Array.isArray(v)){const w=u?v.length-1:0;v=v[w]}v!==null&&(i[x]=v)}for(const x in m)i[x]=m[x]}}}return i}const To=t=>(e,n)=>{const s=P.useContext(ue),i=P.useContext(Qe),r=()=>Dc(t,e,s,i);return n?r():Mo(r)},Rc=To({scrapeMotionValuesFromProps:Sn,createRenderState:bn}),Lc=To({scrapeMotionValuesFromProps:eo,createRenderState:xo}),kc=Symbol.for("motionComponentSymbol");function Bc(t,e,n){const s=P.useRef(n);P.useInsertionEffect(()=>{s.current=n});const i=P.useRef(null);return P.useCallback(r=>{r&&t.onMount?.(r),e&&(r?e.mount(r):e.unmount());const o=s.current;if(typeof o=="function")if(r){const a=o(r);typeof a=="function"&&(i.current=a)}else i.current?(i.current(),i.current=null):o(r);else o&&(o.current=r)},[e])}const wo=P.createContext({});function mt(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Fc(t,e,n,s,i,r){const{visualElement:o}=P.useContext(ue),a=P.useContext(mo),c=P.useContext(Qe),l=P.useContext(po),u=l.reducedMotion,h=l.skipAnimations,f=P.useRef(null),p=P.useRef(!1);s=s||a.renderer,!f.current&&s&&(f.current=s(t,{visualState:e,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,skipAnimations:h,isSVG:r}),p.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));const d=f.current,m=P.useContext(wo);d&&!d.projection&&i&&(d.type==="html"||d.type==="svg")&&Ic(f.current,n,i,m);const g=P.useRef(!1);P.useInsertionEffect(()=>{d&&g.current&&d.update(n,c)});const y=n[Ei],x=P.useRef(!!y&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(y)&&window.MotionHasOptimisedAnimation?.(y));return Eo(()=>{p.current=!0,d&&(g.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),d.scheduleRenderMicrotask(),x.current&&d.animationState&&d.animationState.animateChanges())}),P.useEffect(()=>{d&&(!x.current&&d.animationState&&d.animationState.animateChanges(),x.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(y)}),x.current=!1),d.enteringChildren=void 0)}),d}function Ic(t,e,n,s){const{layoutId:i,layout:r,drag:o,dragConstraints:a,layoutScroll:c,layoutRoot:l,layoutAnchor:u,layoutCrossfade:h}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:Po(t.parent)),t.projection.setOptions({layoutId:i,layout:r,alwaysMeasureLayout:!!o||a&&mt(a),visualElement:t,animationType:typeof r=="string"?r:"both",initialPromotionConfig:s,crossfade:h,layoutScroll:c,layoutRoot:l,layoutAnchor:u})}function Po(t){if(t)return t.options.allowProjection!==!1?t.projection:Po(t.parent)}function Pe(t,{forwardMotionProps:e=!1,type:n}={},s,i){s&&yc(s);const r=n?n==="svg":An(t),o=r?Lc:Rc;function a(l,u){let h;const f={...P.useContext(po),...l,layoutId:Oc(l)},{isStatic:p}=f,d=Pc(l),m=o(l,p);if(!p&&typeof window<"u"){jc();const g=Nc(f);h=g.MeasureLayout,d.visualElement=Fc(t,m,f,i,g.ProjectionNode,r)}return Ce.jsxs(ue.Provider,{value:d,children:[h&&d.visualElement?Ce.jsx(h,{visualElement:d.visualElement,...f}):null,Mc(t,l,Bc(m,d.visualElement,u),m,p,e,r)]})}a.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const c=P.forwardRef(a);return c[kc]=t,c}function Oc({layoutId:t}){const e=P.useContext(Ks).id;return e&&t!==void 0?e+"-"+t:t}function jc(t,e){P.useContext(mo).strict}function Nc(t){const e=go(),{drag:n,layout:s}=e;if(!n&&!s)return{};const i={...n,...s};return{MeasureLayout:n?.isEnabled(t)||s?.isEnabled(t)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function Uc(t,e){if(typeof Proxy>"u")return Pe;const n=new Map,s=(r,o)=>Pe(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,Pe(o,void 0,t,e)),n.get(o))})}const Wc=(t,e)=>e.isSVG??An(t)?new Pl(e):new gl(e,{allowProjection:t!==P.Fragment});class Kc extends ot{constructor(e){super(e),e.animationState||(e.animationState=Cl(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();le(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(){this.node.animationState.reset(),this.unmountControls?.()}}let Hc=0;class zc extends ot{constructor(){super(...arguments),this.id=Hc++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===s)return;if(e&&s===!1){if(this.isExitComplete){const{initial:r,custom:o}=this.node.getProps();if(typeof r=="string"||typeof r=="object"&&r!==null&&!Array.isArray(r)){const a=dt(this.node,r,o);if(a){const{transition:c,transitionEnd:l,...u}=a;for(const h in u)this.node.getValue(h)?.jump(u[h])}}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 Gc={animation:{Feature:Kc},exit:{Feature:zc}};function Ot(t){return{point:{x:t.pageX,y:t.pageY}}}const $c=t=>e=>vn(e)&&t(e,Ot(e));function Dt(t,e,n,s){return kt(t,e,$c(n),s)}const So=({current:t})=>t?t.ownerDocument.defaultView:null,Rs=(t,e)=>Math.abs(t-e);function _c(t,e){const n=Rs(t.x,e.x),s=Rs(t.y,e.y);return Math.sqrt(n**2+s**2)}const Ls=new Set(["auto","scroll"]);class bo{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=Ut(this.lastRawMoveEventInfo,this.transformPagePoint));const d=Se(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,g=_c(d.offset,{x:0,y:0})>=this.distanceThreshold;if(!m&&!g)return;const{point:y}=d,{timestamp:x}=I;this.history.push({...y,timestamp:x});const{onStart:v,onMove:w}=this.handlers;m||(v&&v(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,d)},this.handlePointerMove=(d,m)=>{this.lastMoveEvent=d,this.lastRawMoveEventInfo=m,this.lastMoveEventInfo=Ut(m,this.transformPagePoint),M.update(this.updatePoint,!0)},this.handlePointerUp=(d,m)=>{this.end();const{onEnd:g,onSessionEnd:y,resumeAnimation:x}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=Se(d.type==="pointercancel"?this.lastMoveEventInfo:Ut(m,this.transformPagePoint),this.history);this.startEvent&&g&&g(d,v),y&&y(d,v)},!vn(e))return;this.dragSnapToOrigin=r,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=o,this.contextWindow=i||window;const c=Ot(e),l=Ut(c,this.transformPagePoint),{point:u}=l,{timestamp:h}=I;this.history=[{...u,timestamp:h}];const{onSessionStart:f}=n;f&&f(e,Se(l,this.history));const p={passive:!0,capture:!0};this.removeListeners=Bt(Dt(this.contextWindow,"pointermove",this.handlePointerMove,p),Dt(this.contextWindow,"pointerup",this.handlePointerUp,p),Dt(this.contextWindow,"pointercancel",this.handlePointerUp,p)),a&&this.startScrollTracking(a)}startScrollTracking(e){let n=e.parentElement;for(;n;){const s=getComputedStyle(n);(Ls.has(s.overflowX)||Ls.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),M.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 Ut(t,e){return e?{point:e(t.point)}:t}function ks(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Se({point:t},e){return{point:t,delta:ks(t,Ao(e)),offset:ks(t,Xc(e)),velocity:Yc(e,.1)}}function Xc(t){return t[0]}function Ao(t){return t[t.length-1]}function Yc(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=Ao(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=H(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 qc(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?C(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?C(n,t,s.max):Math.min(t,n)),t}function Bs(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 Zc(t,{top:e,left:n,bottom:s,right:i}){return{x:Bs(t.x,n,i),y:Bs(t.y,e,s)}}function Fs(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 Jc(t,e){return{x:Fs(t.x,e.x),y:Fs(t.y,e.y)}}function Qc(t,e){let n=.5;const s=N(t),i=N(e);return i>s?n=Et(e.min,e.max-s,t.min):s>i&&(n=Et(t.min,t.max-i,e.min)),Q(0,1,n)}function tu(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 eu(t=Ze){return t===!1?t=0:t===!0&&(t=Ze),{x:Is(t,"left","right"),y:Is(t,"top","bottom")}}function Is(t,e,n){return{min:Os(t,e),max:Os(t,n)}}function Os(t,e){return typeof t=="number"?t:t[e]||0}const nu=new WeakMap;class su{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=k(),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(Ot(h).point),this.stopAnimation()},o=(h,f)=>{const{drag:p,dragPropagation:d,onDragStart:m}=this.getProps();if(p&&!d&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Fa(p),!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(y=>{let x=this.getAxisMotionValue(y).get()||0;if(J.test(x)){const{projection:v}=this.visualElement;if(v&&v.layout){const w=v.layout.layoutBox[y];w&&(x=N(w)*(parseFloat(x)/100))}}this.originPoint[y]=x}),m&&M.update(()=>m(h,f),!1,!0),We(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},a=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f;const{dragPropagation:p,dragDirectionLock:d,onDirectionLock:m,onDrag:g}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:y}=f;if(d&&this.currentDirection===null){this.currentDirection=ou(y),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",f.point,y),this.updateAxis("y",f.point,y),this.visualElement.render(),g&&M.update(()=>g(h,f),!1,!0)},c=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f,this.stop(h,f),this.latestPointerEvent=null,this.latestPanInfo=null},l=()=>{const{dragSnapToOrigin:h}=this.getProps();(h||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:u}=this.getProps();this.panSession=new bo(e,{onSessionStart:r,onStart:o,onMove:a,onSessionEnd:c,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:s,contextWindow:So(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&&M.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||!Wt(e,i,this.currentDirection))return;const r=this.getAxisMotionValue(e);let o=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(o=qc(o,this.constraints[e],this.elastic[e])),r.set(o)}resolveConstraints(){const{dragConstraints:e,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;e&&mt(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&s?this.constraints=Zc(s.layoutBox,e):this.constraints=!1,this.elastic=eu(n),i!==this.constraints&&!mt(e)&&s&&this.constraints&&!this.hasMutatedConstraints&&q(r=>{this.constraints!==!1&&this.getAxisMotionValue(r)&&(this.constraints[r]=tu(s.layoutBox[r],this.constraints[r]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!mt(e))return!1;const s=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;i.root&&(i.root.scroll=void 0,i.root.updateScroll());const r=ul(s,i.root,this.visualElement.getTransformPagePoint());let o=Jc(i.layout.layoutBox,r);if(n){const a=n(al(o));this.hasMutatedConstraints=!!a,a&&(o=$i(a))}return o}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:r,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},l=q(u=>{if(!Wt(u,n,this.currentDirection))return;let h=c&&c[u]||{};(o===!0||o===u)&&(h={min:0,max:0});const f=i?200:1e6,p=i?40:1e7,d={type:"inertia",velocity:s?e[u]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...r,...h};return this.startAxisValueAnimation(u,d)});return Promise.all(l).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return We(this.visualElement,e),s.start(dn(e,s,0,n,this.visualElement,!1))}stopAnimation(){q(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,i=this.visualElement.getProps()[n];return i||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor(e){q(n=>{const{drag:s}=this.getProps();if(!Wt(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],c=r.get()||0;r.set(e[n]-C(o,a,.5)+c)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!mt(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 c=a.get();i[o]=Qc({min:c,max:c},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(!Wt(o,e,null))return;const a=this.getAxisMotionValue(o),{min:c,max:l}=this.constraints[o];a.set(C(c,l,i[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;nu.set(this.visualElement,this);const e=this.visualElement.current,n=Dt(e,"pointerdown",l=>{const{drag:u,dragListener:h=!0}=this.getProps(),f=l.target,p=f!==e&&Wa(f);u&&h&&!p&&this.start(l)});let s;const i=()=>{const{dragConstraints:l}=this.getProps();mt(l)&&l.current&&(this.constraints=this.resolveRefConstraints(),s||(s=iu(e,l.current,()=>this.scalePositionWithinConstraints())))},{projection:r}=this.visualElement,o=r.addEventListener("measure",i);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),M.read(i);const a=kt(window,"resize",()=>this.scalePositionWithinConstraints()),c=r.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(q(h=>{const f=this.getAxisMotionValue(h);f&&(this.originPoint[h]+=l[h].translate,f.set(f.get()+l[h].translate))}),this.visualElement.render())}));return()=>{a(),n(),o(),c&&c(),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 js(t){let e=!0;return()=>{if(e){e=!1;return}t()}}function iu(t,e,n){const s=_n(t,js(n)),i=_n(e,js(n));return()=>{s(),i()}}function Wt(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function ou(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class ru extends ot{constructor(e){super(e),this.removeGroupControls=z,this.removeListeners=z,this.controls=new su(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||z}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 be=t=>(e,n)=>{t&&M.update(()=>t(e,n),!1,!0)};class au extends ot{constructor(){super(...arguments),this.removePointerDownListener=z}onPointerDown(e){this.session=new bo(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:So(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:be(e),onStart:be(n),onMove:be(s),onEnd:(r,o)=>{delete this.session,i&&M.postRender(()=>i(r,o))}}}mount(){this.removePointerDownListener=Dt(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 Ae=!1;class lu extends P.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),Ae&&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}),Ae=!0,i||e.layoutDependency!==n||n===void 0||e.isPresent!==r?o.willUpdate():this.safeToRemove(),e.isPresent!==r&&(r?o.promote():o.relegate()||M.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:e,layoutAnchor:n}=this.props,{projection:s}=e;s&&(s.options.layoutAnchor=n,s.root.didUpdate(),yn.postRender(()=>{!s.currentAnimation&&s.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;Ae=!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 Vo(t){const[e,n]=mc(),s=P.useContext(Ks);return Ce.jsx(lu,{...t,layoutGroup:s,switchLayoutGroup:P.useContext(wo),isPresent:e,safeToRemove:n})}const cu={pan:{Feature:au},drag:{Feature:ru,ProjectionNode:fo,MeasureLayout:Vo}};function Ns(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&&M.postRender(()=>r(e,Ot(e)))}class uu extends ot{mount(){const{current:e}=this.node;e&&(this.unmount=Oa(e,(n,s)=>(Ns(this.node,s,"Start"),i=>Ns(this.node,i,"End"))))}unmount(){}}class hu 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(kt(this.node.current,"focus",()=>this.onFocus()),kt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Us(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&&M.postRender(()=>r(e,Ot(e)))}class fu extends ot{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:n,propagate:s}=this.node.props;this.unmount=Ha(e,(i,r)=>(Us(this.node,r,"Start"),(o,{success:a})=>Us(this.node,o,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:s?.tap===!1})}unmount(){}}const Je=new WeakMap,Ve=new WeakMap,du=t=>{const e=Je.get(t.target);e&&e(t)},pu=t=>{t.forEach(du)};function mu({root:t,...e}){const n=t||document;Ve.has(n)||Ve.set(n,{});const s=Ve.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(pu,{root:t,...e})),s[i]}function gu(t,e,n){const s=mu(e);return Je.set(t,n),s.observe(t),()=>{Je.delete(t),s.unobserve(t)}}const yu={some:0,all:1};class vu extends ot{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();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:yu[i]},a=c=>{const{isIntersecting:l}=c;if(this.isInView===l||(this.isInView=l,r&&!l&&this.hasEnteredView))return;l&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",l);const{onViewportEnter:u,onViewportLeave:h}=this.node.getProps(),f=l?u:h;f&&f(c)};this.stopObserver=gu(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(xu(e,n))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}function xu({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const Tu={inView:{Feature:vu},tap:{Feature:fu},focus:{Feature:hu},hover:{Feature:uu}},wu={layout:{ProjectionNode:fo,MeasureLayout:Vo}},Pu={...Gc,...Tu,...cu,...wu},Mu=Uc(Pu,Wc);function Du(t){return Ws({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M3 13h1v7c0 1.103.897 2 2 2h12c1.103 0 2-.897 2-2v-7h1a1 1 0 0 0 .707-1.707l-9-9a.999.999 0 0 0-1.414 0l-9 9A1 1 0 0 0 3 13zm7 7v-5h4v5h-4zm2-15.586 6 6V15l.001 5H16v-5c0-1.103-.897-2-2-2h-4c-1.103 0-2 .897-2 2v5H6v-9.586l6-6z"},child:[]}]})(t)}function Eu(t){return Ws({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"m4.431 12.822 13 9A1 1 0 0 0 19 21V3a1 1 0 0 0-1.569-.823l-13 9a1.003 1.003 0 0 0 0 1.645z"},child:[]}]})(t)}export{Du as B,Ks as L,po as M,Qe as P,Tt as a,Eo as b,it as c,Un as d,C as e,M as f,Vu as g,O as h,br as i,Ba as j,mc as k,Eu as l,Mu as m,Mo as u};
|