agent-tower 0.7.4-beta.0 → 0.7.4-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/mcp/tools/tasks.js +2 -2
- package/dist/mcp/tools/tasks.js.map +1 -1
- package/dist/mcp/types.js +1 -1
- package/dist/mcp/types.js.map +1 -1
- package/dist/prompts/task-handoff.d.ts.map +1 -1
- package/dist/prompts/task-handoff.js +2 -1
- package/dist/prompts/task-handoff.js.map +1 -1
- package/dist/routes/__tests__/sessions-runtime.test.js +2 -0
- package/dist/routes/__tests__/sessions-runtime.test.js.map +1 -1
- package/dist/routes/__tests__/tasks.test.js +41 -0
- package/dist/routes/__tests__/tasks.test.js.map +1 -1
- package/dist/routes/__tests__/workspace-history.test.d.ts +2 -0
- package/dist/routes/__tests__/workspace-history.test.d.ts.map +1 -0
- package/dist/routes/__tests__/workspace-history.test.js +174 -0
- package/dist/routes/__tests__/workspace-history.test.js.map +1 -0
- package/dist/routes/sessions.d.ts.map +1 -1
- package/dist/routes/sessions.js +10 -0
- package/dist/routes/sessions.js.map +1 -1
- package/dist/routes/tasks.d.ts.map +1 -1
- package/dist/routes/tasks.js +8 -0
- package/dist/routes/tasks.js.map +1 -1
- package/dist/runtime/__tests__/cli-driver-lifecycle.test.js +84 -0
- package/dist/runtime/__tests__/cli-driver-lifecycle.test.js.map +1 -1
- package/dist/runtime/cli-driver.js +11 -8
- package/dist/runtime/cli-driver.js.map +1 -1
- package/dist/services/__tests__/task.service.test.js +63 -10
- package/dist/services/__tests__/task.service.test.js.map +1 -1
- package/dist/services/__tests__/workspace.service.test.js +64 -5
- package/dist/services/__tests__/workspace.service.test.js.map +1 -1
- package/dist/services/message-delivery.service.d.ts +1 -0
- package/dist/services/message-delivery.service.d.ts.map +1 -1
- package/dist/services/session-manager.d.ts +4 -0
- package/dist/services/session-manager.d.ts.map +1 -1
- package/dist/services/session-manager.js +3 -1
- package/dist/services/session-manager.js.map +1 -1
- package/dist/services/session-resource-cleanup.d.ts +5 -0
- package/dist/services/session-resource-cleanup.d.ts.map +1 -1
- package/dist/services/session-resource-cleanup.js +7 -0
- package/dist/services/session-resource-cleanup.js.map +1 -1
- package/dist/services/task-cleanup.service.d.ts +2 -0
- package/dist/services/task-cleanup.service.d.ts.map +1 -1
- package/dist/services/task-cleanup.service.js +4 -0
- package/dist/services/task-cleanup.service.js.map +1 -1
- package/dist/services/task.service.d.ts +12 -1
- package/dist/services/task.service.d.ts.map +1 -1
- package/dist/services/task.service.js +67 -21
- package/dist/services/task.service.js.map +1 -1
- package/dist/services/workspace.service.d.ts +10 -7
- package/dist/services/workspace.service.d.ts.map +1 -1
- package/dist/services/workspace.service.js +160 -88
- package/dist/services/workspace.service.js.map +1 -1
- package/dist/web/assets/{AgentDemoPage-JXetlNBf.js → AgentDemoPage-DiHEh1iv.js} +1 -1
- package/dist/web/assets/{AgentEnvironmentSettingsPage-CdYyUCwJ.js → AgentEnvironmentSettingsPage-B_Xk7Bef.js} +1 -1
- package/dist/web/assets/{AttachmentPreview-DMS-PM-1.js → AttachmentPreview-BngGSahV.js} +2 -2
- package/dist/web/assets/{BranchSelect-BAq4L2ZS.js → BranchSelect-BgVKUnxj.js} +1 -1
- package/dist/web/assets/{BrandLogo--kWXXJtZ.js → BrandLogo-CBahjTd7.js} +1 -1
- package/dist/web/assets/{ConversationPage-CvC4RyB5.js → ConversationPage-kgJIlyS5.js} +1 -1
- package/dist/web/assets/{CreateTaskInput-DjVxCAfc.js → CreateTaskInput-Cllw4abW.js} +1 -1
- package/dist/web/assets/{DemoPage-cDVTGOp8.js → DemoPage-CkS__9CE.js} +1 -1
- package/dist/web/assets/{DesignSystemPage-BI54IkKi.js → DesignSystemPage-BklN99GA.js} +1 -1
- package/dist/web/assets/{ExecutionPermissionSelector-f1UYIm1z.js → ExecutionPermissionSelector-Bsi1aa7q.js} +1 -1
- package/dist/web/assets/{GeneralSettingsPage-C0yto6C_.js → GeneralSettingsPage-BC9TUWiu.js} +1 -1
- package/dist/web/assets/{LoadingPreviewPage-BiJSaHUi.js → LoadingPreviewPage-Dx8Si6-g.js} +1 -1
- package/dist/web/assets/{McpSettingsPage-BbHwZtyj.js → McpSettingsPage-fqXRGtFu.js} +1 -1
- package/dist/web/assets/{MemberAvatar-BLezO3vS.js → MemberAvatar-CZ3F53Ep.js} +1 -1
- package/dist/web/assets/MobileTaskDetail-B68iYPOI.js +3 -0
- package/dist/web/assets/{NotificationSettingsPage-CiKoL2Kv.js → NotificationSettingsPage-D9KGIFVA.js} +1 -1
- package/dist/web/assets/{ProfileSettingsPage-DCB48cPS.js → ProfileSettingsPage-D_Hw5lpd.js} +1 -1
- package/dist/web/assets/ProjectKanbanPage-CUX0Kh-t.js +12 -0
- package/dist/web/assets/{ProjectSettingsPage-COvIVq1h.js → ProjectSettingsPage-CJANCPJX.js} +1 -1
- package/dist/web/assets/{ProviderSettingsPage-CPuJcZDg.js → ProviderSettingsPage-B6Ro5PQa.js} +2 -2
- package/dist/web/assets/{SettingsMasterDetail-Cv7YaRJB.js → SettingsMasterDetail-Q-049Dvh.js} +1 -1
- package/dist/web/assets/TaskDetail-DBtWf0YV.js +1 -0
- package/dist/web/assets/{TaskHandoffPanel-CxH3Mgyd.js → TaskHandoffPanel-BpGiZ5eT.js} +20 -20
- package/dist/web/assets/{TeamSettingsPage-D-XDefNd.js → TeamSettingsPage-DbKgqEO_.js} +1 -1
- package/dist/web/assets/{TranslationSettingsPage-BPHI-SZW.js → TranslationSettingsPage-Ba-iypOV.js} +1 -1
- package/dist/web/assets/{arc-CC81aLuf.js → arc-SOqs3Svk.js} +1 -1
- package/dist/web/assets/{architectureDiagram-3BPJPVTR-DL08XGaN.js → architectureDiagram-3BPJPVTR-BH25ukq_.js} +1 -1
- package/dist/web/assets/{at-sign-DYPIlD6D.js → at-sign-CEsum1vJ.js} +1 -1
- package/dist/web/assets/{blockDiagram-GPEHLZMM-B4IW5WxI.js → blockDiagram-GPEHLZMM-CKA17iNP.js} +1 -1
- package/dist/web/assets/{c4Diagram-AAUBKEIU-Cj4d_FqK.js → c4Diagram-AAUBKEIU-DnZ_8oOf.js} +1 -1
- package/dist/web/assets/channel-xU45IQlP.js +1 -0
- package/dist/web/assets/check-DUA2DjGH.js +1 -0
- package/dist/web/assets/{chevron-down-DNhYsNAt.js → chevron-down-Bmwy-nvS.js} +1 -1
- package/dist/web/assets/{chevron-up-CjrLieBR.js → chevron-up-CClL6-SF.js} +1 -1
- package/dist/web/assets/{chip-Cf92J-pQ.js → chip-BSMT2uT1.js} +1 -1
- package/dist/web/assets/{chunk-2J33WTMH-DeCj8QSD.js → chunk-2J33WTMH-BrtUyBDF.js} +1 -1
- package/dist/web/assets/{chunk-4BX2VUAB-k-6rzQmQ.js → chunk-4BX2VUAB-DZDNetDC.js} +1 -1
- package/dist/web/assets/{chunk-55IACEB6-qMTCQ5bX.js → chunk-55IACEB6-xVa3bJqv.js} +1 -1
- package/dist/web/assets/{chunk-727SXJPM-CMnu18d1.js → chunk-727SXJPM-B7n9vxY4.js} +1 -1
- package/dist/web/assets/{chunk-AQP2D5EJ-C0mFbUMn.js → chunk-AQP2D5EJ-DQd4G76y.js} +1 -1
- package/dist/web/assets/{chunk-FMBD7UC4-u6-_M137.js → chunk-FMBD7UC4-CXyP08kl.js} +1 -1
- package/dist/web/assets/{chunk-ND2GUHAM-DHrIE_8H.js → chunk-ND2GUHAM-BtnIS-HK.js} +1 -1
- package/dist/web/assets/{chunk-QZHKN3VN-aTyC0wZq.js → chunk-QZHKN3VN-D4D-V_ex.js} +1 -1
- package/dist/web/assets/classDiagram-4FO5ZUOK-pvRulc6s.js +1 -0
- package/dist/web/assets/classDiagram-v2-Q7XG4LA2-pvRulc6s.js +1 -0
- package/dist/web/assets/{code-block-OCS4YCEC-CBIOQOMH.js → code-block-OCS4YCEC-DfERo9L1.js} +1 -1
- package/dist/web/assets/{confirm-dialog-DWeBZLJW.js → confirm-dialog-8ItnHBi0.js} +1 -1
- package/dist/web/assets/{content-JM9E1MeD.js → content-DrW8KnXu.js} +2 -2
- package/dist/web/assets/{copy-D0gl9kF8.js → copy-prrQrInw.js} +1 -1
- package/dist/web/assets/{cose-bilkent-S5V4N54A-xLyliSgU.js → cose-bilkent-S5V4N54A-CXdH8Idq.js} +1 -1
- package/dist/web/assets/{cssMode-DO5UnQ64.js → cssMode-CJ6_f10q.js} +1 -1
- package/dist/web/assets/{dagre-BM42HDAG-CbNpoO2d.js → dagre-BM42HDAG-XZydDwXe.js} +1 -1
- package/dist/web/assets/{diagram-2AECGRRQ-CG3hKxAX.js → diagram-2AECGRRQ-CofEe0Fr.js} +1 -1
- package/dist/web/assets/{diagram-5GNKFQAL-mQu9M28s.js → diagram-5GNKFQAL-BbTtW5WH.js} +1 -1
- package/dist/web/assets/{diagram-KO2AKTUF-BSeEp_Uw.js → diagram-KO2AKTUF-BJHZXpUM.js} +1 -1
- package/dist/web/assets/{diagram-LMA3HP47-D6yRdao-.js → diagram-LMA3HP47-DN7A27YU.js} +1 -1
- package/dist/web/assets/{diagram-OG6HWLK6-BUBUW9wD.js → diagram-OG6HWLK6-4IdYadiw.js} +1 -1
- package/dist/web/assets/{dialog-D1lkhqVL.js → dialog-BUsI4h2U.js} +1 -1
- package/dist/web/assets/{erDiagram-TEJ5UH35-BQSZgRqq.js → erDiagram-TEJ5UH35-BFijhCWv.js} +1 -1
- package/dist/web/assets/{file-BijjwxRR.js → file-C6QMUr5_.js} +1 -1
- package/dist/web/assets/{flowDiagram-I6XJVG4X-D-eqyr5Y.js → flowDiagram-I6XJVG4X-D9MxC-El.js} +1 -1
- package/dist/web/assets/{folder-picker-Czxm0_S9.js → folder-picker-CBdw-4v3.js} +1 -1
- package/dist/web/assets/{freemarker2-B4RvEa_U.js → freemarker2-CJVobC22.js} +1 -1
- package/dist/web/assets/{ganttDiagram-6RSMTGT7-BWGkCt_x.js → ganttDiagram-6RSMTGT7-BijCAyPQ.js} +1 -1
- package/dist/web/assets/{gitGraphDiagram-PVQCEYII-DGVc49pR.js → gitGraphDiagram-PVQCEYII-AvI5QqxQ.js} +1 -1
- package/dist/web/assets/{globe-Ce01-45x.js → globe-BOfcTsvL.js} +1 -1
- package/dist/web/assets/{handlebars-oyT7drqS.js → handlebars-DTqWmI25.js} +1 -1
- package/dist/web/assets/{html-CxxWf2Qk.js → html-Bx7L8DX_.js} +1 -1
- package/dist/web/assets/{htmlMode-RfAHh5Jj.js → htmlMode-D_S0NjZc.js} +1 -1
- package/dist/web/assets/{index-Disv1kQS.js → index-BClyhWqz.js} +1 -1
- package/dist/web/assets/index-BDON669P.css +1 -0
- package/dist/web/assets/{index-DWrSDMX2.js → index-BFcDmhr0.js} +1 -1
- package/dist/web/assets/index-BRu1Yhrx.js +122 -0
- package/dist/web/assets/{index-hpHE1jXY.js → index-Bg8TlDo_.js} +1 -1
- package/dist/web/assets/{index-DyJfPc4O.js → index-COigMgrJ.js} +1 -1
- package/dist/web/assets/{index-Pt4TsHjm.js → index-Cdmj8aPv.js} +1 -1
- package/dist/web/assets/{index-BMZFF1UJ.js → index-CtOu4p9B.js} +1 -1
- package/dist/web/assets/{index-Dh-tgeaL.js → index-DUmVscrR.js} +4 -4
- package/dist/web/assets/{index-T38iVLEb.js → index-JXcQeorP.js} +1 -1
- package/dist/web/assets/{infoDiagram-5YYISTIA-DLPs3dV_.js → infoDiagram-5YYISTIA-76JLqjJ0.js} +1 -1
- package/dist/web/assets/{ishikawaDiagram-YF4QCWOH-d_OrnwDY.js → ishikawaDiagram-YF4QCWOH-CXHFTVly.js} +1 -1
- package/dist/web/assets/javascript-80FDzX3y.js +1 -0
- package/dist/web/assets/{journeyDiagram-JHISSGLW-EtU1st_0.js → journeyDiagram-JHISSGLW-6SDJs9C5.js} +1 -1
- package/dist/web/assets/{jsonMode-Bqh5vIxx.js → jsonMode-BGg9MhFR.js} +1 -1
- package/dist/web/assets/{kanban-definition-UN3LZRKU-ZWzUnsFK.js → kanban-definition-UN3LZRKU-C0Y3zy1P.js} +1 -1
- package/dist/web/assets/{kbd-IjDGsZ2B.js → kbd-D4KIW7lm.js} +1 -1
- package/dist/web/assets/{key-round-CbnAuUxp.js → key-round-C4vhwqUu.js} +1 -1
- package/dist/web/assets/{layers-Pdy9vZ6K.js → layers-BBHgMnhN.js} +1 -1
- package/dist/web/assets/{linear-D7n23wcA.js → linear-CjeIgBwO.js} +1 -1
- package/dist/web/assets/{link-Bl1ZbjFh.js → link-C-Jq7dnc.js} +1 -1
- package/dist/web/assets/{liquid-Ds47iVLN.js → liquid-guocpCJB.js} +1 -1
- package/dist/web/assets/{lspLanguageFeatures-Dcch3bsp.js → lspLanguageFeatures-CPXERxVW.js} +1 -1
- package/dist/web/assets/{mdx-CM7ky-2B.js → mdx-DA4ymd3l.js} +1 -1
- package/dist/web/assets/{menu-DubntFHq.js → menu-BgtmXAzT.js} +1 -1
- package/dist/web/assets/{mermaid-NOHMQCX5-nBsnjgeU.js → mermaid-NOHMQCX5-XQbfQDGS.js} +4 -4
- package/dist/web/assets/{message-square-BE-pW0m_.js → message-square-DIFv9yrO.js} +1 -1
- package/dist/web/assets/{mindmap-definition-RKZ34NQL-ClHORNTt.js → mindmap-definition-RKZ34NQL-6ucD61UV.js} +1 -1
- package/dist/web/assets/{modal-CHLtZWvx.js → modal-Dx4N46s5.js} +1 -1
- package/dist/web/assets/{monaco-BbAmalE2.js → monaco-Mn1xgio_.js} +3 -3
- package/dist/web/assets/{nav-row-DH7rNq1V.js → nav-row-DwEkbw3N.js} +1 -1
- package/dist/web/assets/{paperclip-YP3Bk1lI.js → paperclip-CdQvl5ee.js} +1 -1
- package/dist/web/assets/{pencil-BFDuhbtW.js → pencil-ChX7G9j9.js} +1 -1
- package/dist/web/assets/{people-DEeNaaLt.js → people-D_VwidfV.js} +1 -1
- package/dist/web/assets/{pieDiagram-4H26LBE5-BUOaKIyP.js → pieDiagram-4H26LBE5-KVvAyrIn.js} +1 -1
- package/dist/web/assets/{popover-CUmBEXxL.js → popover-CGEFZKuu.js} +1 -1
- package/dist/web/assets/{python-BODTtU6m.js → python-BzNNRn8W.js} +1 -1
- package/dist/web/assets/{quadrantDiagram-W4KKPZXB-Caezg-U2.js → quadrantDiagram-W4KKPZXB-ClVzvpE7.js} +1 -1
- package/dist/web/assets/{razor-CHm8DY1p.js → razor-DF2ZxqCE.js} +1 -1
- package/dist/web/assets/{requirementDiagram-4Y6WPE33-BtdP3Ka6.js → requirementDiagram-4Y6WPE33-uXN6Uoln.js} +1 -1
- package/dist/web/assets/{sankeyDiagram-5OEKKPKP-Bv74oA-n.js → sankeyDiagram-5OEKKPKP-Bi3Tc0wR.js} +1 -1
- package/dist/web/assets/{search-ClmOQd4H.js → search--FRFbCre.js} +1 -1
- package/dist/web/assets/{select-CYtYPr-c.js → select-D0sHgfcU.js} +1 -1
- package/dist/web/assets/{select-BB7QG08o.js → select-c5IIpQj0.js} +1 -1
- package/dist/web/assets/{sequenceDiagram-3UESZ5HK-DuNPl-dg.js → sequenceDiagram-3UESZ5HK-CLdrO2PY.js} +1 -1
- package/dist/web/assets/{server-bEB_DY55.js → server-Dr_6KJFM.js} +1 -1
- package/dist/web/assets/{stateDiagram-AJRCARHV-B72HAgBJ.js → stateDiagram-AJRCARHV-BGInldGc.js} +1 -1
- package/dist/web/assets/stateDiagram-v2-BHNVJYJU-D44x8SXb.js +1 -0
- package/dist/web/assets/{textarea-BqYPvoO-.js → textarea-W-xQPto3.js} +1 -1
- package/dist/web/assets/{timeline-definition-PNZ67QCA-DTmHUgmQ.js → timeline-definition-PNZ67QCA-BUp6Qykc.js} +1 -1
- package/dist/web/assets/{toggles-a5fkwT_D.js → toggles-Bgp7vdwg.js} +1 -1
- package/dist/web/assets/{tooltip-DuyJMci9.js → tooltip-DZcaSN1F.js} +1 -1
- package/dist/web/assets/{track-DCjyrv3n.js → track-Cj1Ogapu.js} +1 -1
- package/dist/web/assets/{trash-2-CIyBqaVy.js → trash-2-DmFXzIhh.js} +1 -1
- package/dist/web/assets/{tsMode-C1UXAkMh.js → tsMode-CSHMQttX.js} +1 -1
- package/dist/web/assets/{typescript-Biht2wHb.js → typescript-CyQKmnN-.js} +1 -1
- package/dist/web/assets/{upload-D05XS5-G.js → upload-C-4QDrwN.js} +1 -1
- package/dist/web/assets/{use-profiles-CrWTyz1G.js → use-profiles-D5mIgeQU.js} +1 -1
- package/dist/web/assets/{use-providers-Dv1Nk6s7.js → use-providers-BViTes-6.js} +1 -1
- package/dist/web/assets/{use-translation-settings-CcUnipVO.js → use-translation-settings-Dgw0oKP1.js} +1 -1
- package/dist/web/assets/{useNormalizedLogs-D9W1cT4R.js → useNormalizedLogs-BX7pMg0-.js} +1 -1
- package/dist/web/assets/{useTokenUsage-CZ5mDshD.js → useTokenUsage-T03faPfn.js} +1 -1
- package/dist/web/assets/{vennDiagram-CIIHVFJN-ByoNydXe.js → vennDiagram-CIIHVFJN-iQYnP9Ux.js} +1 -1
- package/dist/web/assets/{wardley-L42UT6IY-BqdMkOLl.js → wardley-L42UT6IY-J7vXwA5J.js} +1 -1
- package/dist/web/assets/{wardleyDiagram-YWT4CUSO-AO22HrEF.js → wardleyDiagram-YWT4CUSO-CdtM5GJv.js} +1 -1
- package/dist/web/assets/{xml-NLGqNFDv.js → xml-C79KdvcD.js} +1 -1
- package/dist/web/assets/{xychartDiagram-2RQKCTM6-vzPgjgqW.js → xychartDiagram-2RQKCTM6-B3gcBChQ.js} +1 -1
- package/dist/web/assets/{yaml-AWlGS_Ig.js → yaml-C1WLpuVe.js} +1 -1
- package/dist/web/index.html +2 -2
- package/node_modules/@agent-tower/shared/dist/index.d.ts +1 -0
- package/node_modules/@agent-tower/shared/dist/index.d.ts.map +1 -1
- package/node_modules/@agent-tower/shared/dist/index.js +1 -0
- package/node_modules/@agent-tower/shared/dist/index.js.map +1 -1
- package/node_modules/@agent-tower/shared/dist/task-hierarchy.d.ts +17 -0
- package/node_modules/@agent-tower/shared/dist/task-hierarchy.d.ts.map +1 -0
- package/node_modules/@agent-tower/shared/dist/task-hierarchy.js +12 -0
- package/node_modules/@agent-tower/shared/dist/task-hierarchy.js.map +1 -0
- package/node_modules/@agent-tower/shared/dist/types.d.ts +8 -2
- package/node_modules/@agent-tower/shared/dist/types.d.ts.map +1 -1
- package/node_modules/@agent-tower/shared/dist/types.js.map +1 -1
- package/package.json +1 -1
- package/prisma/migrations/20261027000000_preserve_workspace_history/migration.sql +2 -0
- package/prisma/schema.prisma +2 -0
- package/dist/web/assets/MobileTaskDetail-M_Kke9rL.js +0 -3
- package/dist/web/assets/ProjectKanbanPage-soDqevjQ.js +0 -12
- package/dist/web/assets/TaskDetail-CqhPxvg3.js +0 -1
- package/dist/web/assets/channel-CUa8oyzC.js +0 -1
- package/dist/web/assets/check-DaZqOL8l.js +0 -1
- package/dist/web/assets/classDiagram-4FO5ZUOK-BAx111NO.js +0 -1
- package/dist/web/assets/classDiagram-v2-Q7XG4LA2-BAx111NO.js +0 -1
- package/dist/web/assets/index-BN53vGxp.css +0 -1
- package/dist/web/assets/index-Cc3qXMhU.js +0 -122
- package/dist/web/assets/javascript-BNXtViSL.js +0 -1
- package/dist/web/assets/stateDiagram-v2-BHNVJYJU-Bu3l_CgB.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{p as le}from"./chunk-4BX2VUAB-k-6rzQmQ.js";import{I as he}from"./chunk-QZHKN3VN-aTyC0wZq.js";import{q as $e,p as fe,s as ge,g as ue,a as ye,b as xe,_ as h,D as J,l as w,d as me,c as W,u as pe,E as be,z as we,k as B,F as ke,G as ve,H as Ce}from"./index-Dh-tgeaL.js";import{p as Ee}from"./wardley-L42UT6IY-BqdMkOLl.js";import"./index-Cc3qXMhU.js";var m={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Be=ve.gitGraph,S=h(()=>ke({...Be,...J().gitGraph}),"getConfig"),d=new he(()=>{const e=S(),r=e.mainBranchName,t=e.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:t}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function Y(){return Ce({length:7})}h(Y,"getID");function te(e,r){const t=Object.create(null);return e.reduce((s,o)=>{const i=r(o);return t[i]||(t[i]=!0,s.push(o)),s},[])}h(te,"uniqBy");var Te=h(function(e){d.records.direction=e},"setDirection"),Le=h(function(e){w.debug("options str",e),e=e?.trim(),e=e||"{}";try{d.records.options=JSON.parse(e)}catch(r){w.error("error while parsing gitGraph options",r.message)}},"setOptions"),Me=h(function(){return d.records.options},"getOptions"),Re=h(function(e){let r=e.msg,t=e.id;const s=e.type;let o=e.tags;w.info("commit",r,t,s,o),w.debug("Entering commit:",r,t,s,o);const i=S();t=B.sanitizeText(t,i),r=B.sanitizeText(r,i),o=o?.map(a=>B.sanitizeText(a,i));const n={id:t||d.records.seq+"-"+Y(),message:r,seq:d.records.seq++,type:s??m.NORMAL,tags:o??[],parents:d.records.head==null?[]:[d.records.head.id],branch:d.records.currBranch};d.records.head=n,w.info("main branch",i.mainBranchName),d.records.commits.has(n.id)&&w.warn(`Commit ID ${n.id} already exists`),d.records.commits.set(n.id,n),d.records.branches.set(d.records.currBranch,n.id),w.debug("in pushCommit "+n.id)},"commit"),Ie=h(function(e){let r=e.name;const t=e.order;if(r=B.sanitizeText(r,S()),d.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);d.records.branches.set(r,d.records.head!=null?d.records.head.id:null),d.records.branchConfig.set(r,{name:r,order:t}),ae(r),w.debug("in createBranch")},"branch"),Oe=h(e=>{let r=e.branch,t=e.id;const s=e.type,o=e.tags,i=S();r=B.sanitizeText(r,i),t&&(t=B.sanitizeText(t,i));const n=d.records.branches.get(d.records.currBranch),a=d.records.branches.get(r),l=n?d.records.commits.get(n):void 0,f=a?d.records.commits.get(a):void 0;if(l&&f&&l.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(d.records.currBranch===r){const c=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(l===void 0||!l){const c=new Error(`Incorrect usage of "merge". Current branch (${d.records.currBranch})has no commits`);throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},c}if(!d.records.branches.has(r)){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},c}if(f===void 0||!f){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},c}if(l===f){const c=new Error('Incorrect usage of "merge". Both branches have same head');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(t&&d.records.commits.has(t)){const c=new Error('Incorrect usage of "merge". Commit with id:'+t+" already exists, use different custom id");throw c.hash={text:`merge ${r} ${t} ${s} ${o?.join(" ")}`,token:`merge ${r} ${t} ${s} ${o?.join(" ")}`,expected:[`merge ${r} ${t}_UNIQUE ${s} ${o?.join(" ")}`]},c}const g=a||"",$={id:t||`${d.records.seq}-${Y()}`,message:`merged branch ${r} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,g],branch:d.records.currBranch,type:m.MERGE,customType:s,customId:!!t,tags:o??[]};d.records.head=$,d.records.commits.set($.id,$),d.records.branches.set(d.records.currBranch,$.id),w.debug(d.records.branches),w.debug("in mergeBranch")},"merge"),_e=h(function(e){let r=e.id,t=e.targetId,s=e.tags,o=e.parent;w.debug("Entering cherryPick:",r,t,s);const i=S();if(r=B.sanitizeText(r,i),t=B.sanitizeText(t,i),s=s?.map(l=>B.sanitizeText(l,i)),o=B.sanitizeText(o,i),!r||!d.records.commits.has(r)){const l=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw l.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},l}const n=d.records.commits.get(r);if(n===void 0||!n)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(o&&!(Array.isArray(n.parents)&&n.parents.includes(o)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const a=n.branch;if(n.type===m.MERGE&&!o)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!t||!d.records.commits.has(t)){if(a===d.records.currBranch){const $=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const l=d.records.branches.get(d.records.currBranch);if(l===void 0||!l){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const f=d.records.commits.get(l);if(f===void 0||!f){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const g={id:d.records.seq+"-"+Y(),message:`cherry-picked ${n?.message} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,n.id],branch:d.records.currBranch,type:m.CHERRY_PICK,tags:s?s.filter(Boolean):[`cherry-pick:${n.id}${n.type===m.MERGE?`|parent:${o}`:""}`]};d.records.head=g,d.records.commits.set(g.id,g),d.records.branches.set(d.records.currBranch,g.id),w.debug(d.records.branches),w.debug("in cherryPick")}},"cherryPick"),ae=h(function(e){if(e=B.sanitizeText(e,S()),d.records.branches.has(e)){d.records.currBranch=e;const r=d.records.branches.get(d.records.currBranch);r===void 0||!r?d.records.head=null:d.records.head=d.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw r.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},r}},"checkout");function V(e,r,t){const s=e.indexOf(r);s===-1?e.push(t):e.splice(s,1,t)}h(V,"upsert");function Q(e){const r=e.reduce((o,i)=>o.seq>i.seq?o:i,e[0]);let t="";e.forEach(function(o){o===r?t+=" *":t+=" |"});const s=[t,r.id,r.seq];for(const o in d.records.branches)d.records.branches.get(o)===r.id&&s.push(o);if(w.debug(s.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const o=d.records.commits.get(r.parents[0]);V(e,r,o),r.parents[1]&&e.push(d.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const o=d.records.commits.get(r.parents[0]);V(e,r,o)}}e=te(e,o=>o.id),Q(e)}h(Q,"prettyPrintCommitHistory");var Ge=h(function(){w.debug(d.records.commits);const e=ne()[0];Q([e])},"prettyPrint"),He=h(function(){d.reset(),we()},"clear"),Se=h(function(){return[...d.records.branchConfig.values()].map((r,t)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${t}`)}).sort((r,t)=>(r.order??0)-(t.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),Ae=h(function(){return d.records.branches},"getBranches"),De=h(function(){return d.records.commits},"getCommits"),ne=h(function(){const e=[...d.records.commits.values()];return e.forEach(function(r){w.debug(r.id)}),e.sort((r,t)=>r.seq-t.seq),e},"getCommitsArray"),qe=h(function(){return d.records.currBranch},"getCurrentBranch"),Pe=h(function(){return d.records.direction},"getDirection"),We=h(function(){return d.records.head},"getHead"),se={commitType:m,getConfig:S,setDirection:Te,setOptions:Le,getOptions:Me,commit:Re,branch:Ie,merge:Oe,cherryPick:_e,checkout:ae,prettyPrint:Ge,clear:He,getBranchesAsObjArray:Se,getBranches:Ae,getCommits:De,getCommitsArray:ne,getCurrentBranch:qe,getDirection:Pe,getHead:We,setAccTitle:xe,getAccTitle:ye,getAccDescription:ue,setAccDescription:ge,setDiagramTitle:fe,getDiagramTitle:$e},Ne=h((e,r)=>{le(e,r),e.dir&&r.setDirection(e.dir);for(const t of e.statements)Fe(t,r)},"populate"),Fe=h((e,r)=>{const s={Commit:h(o=>r.commit(ze(o)),"Commit"),Branch:h(o=>r.branch(Ye(o)),"Branch"),Merge:h(o=>r.merge(je(o)),"Merge"),Checkout:h(o=>r.checkout(Ue(o)),"Checkout"),CherryPicking:h(o=>r.cherryPick(Ke(o)),"CherryPicking")}[e.$type];s?s(e):w.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),ze=h(e=>({id:e.id,msg:e.message??"",type:e.type!==void 0?m[e.type]:m.NORMAL,tags:e.tags??void 0}),"parseCommit"),Ye=h(e=>({name:e.name,order:e.order??0}),"parseBranch"),je=h(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?m[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Ue=h(e=>e.branch,"parseCheckout"),Ke=h(e=>({id:e.id,targetId:"",tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),"parseCherryPicking"),Ve={parse:h(async e=>{const r=await Ee("gitGraph",e);w.debug(r),Ne(r,se)},"parse")},O=10,_=40,L=4,R=2,G=8,j=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),X=12,Z=new Set(["redux-color","redux-dark-color"]),Xe=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),H=h((e,r,t=!1)=>t&&e>0?(e-1)%(r-1)+1:e%r,"calcColorIndex"),C=new Map,E=new Map,F=30,q=new Map,z=[],I=0,y="LR",Je=h(()=>{C.clear(),E.clear(),q.clear(),I=0,z=[],y="LR"},"clear"),oe=h(e=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e=="string"?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach(s=>{const o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),o.setAttribute("dy","1em"),o.setAttribute("x","0"),o.setAttribute("class","row"),o.textContent=s.trim(),r.appendChild(o)}),r},"drawText"),ce=h(e=>{let r,t,s;return y==="BT"?(t=h((o,i)=>o<=i,"comparisonFunc"),s=1/0):(t=h((o,i)=>o>=i,"comparisonFunc"),s=0),e.forEach(o=>{const i=y==="TB"||y=="BT"?E.get(o)?.y:E.get(o)?.x;i!==void 0&&t(i,s)&&(r=o,s=i)}),r},"findClosestParent"),Qe=h(e=>{let r="",t=1/0;return e.forEach(s=>{const o=E.get(s).y;o<=t&&(r=s,t=o)}),r||void 0},"findClosestParentBT"),Ze=h((e,r,t)=>{let s=t,o=t;const i=[];e.forEach(n=>{const a=r.get(n);if(!a)throw new Error(`Commit not found for key ${n}`);a.parents.length?(s=rr(a),o=Math.max(s,o)):i.push(a),tr(a,s)}),s=o,i.forEach(n=>{ar(n,s,t)}),e.forEach(n=>{const a=r.get(n);if(a?.parents.length){const l=Qe(a.parents);s=E.get(l).y-_,s<=o&&(o=s);const f=C.get(a.branch).pos,g=s-O;E.set(a.id,{x:f,y:g})}})},"setParallelBTPos"),er=h(e=>{const r=ce(e.parents.filter(s=>s!==null));if(!r)throw new Error(`Closest parent not found for commit ${e.id}`);const t=E.get(r)?.y;if(t===void 0)throw new Error(`Closest parent position not found for commit ${e.id}`);return t},"findClosestParentPos"),rr=h(e=>er(e)+_,"calculateCommitPosition"),tr=h((e,r)=>{const t=C.get(e.branch);if(!t)throw new Error(`Branch not found for commit ${e.id}`);const s=t.pos,o=r+O;return E.set(e.id,{x:s,y:o}),{x:s,y:o}},"setCommitPosition"),ar=h((e,r,t)=>{const s=C.get(e.branch);if(!s)throw new Error(`Branch not found for commit ${e.id}`);const o=r+t,i=s.pos;E.set(e.id,{x:i,y:o})},"setRootPosition"),nr=h((e,r,t,s,o,i)=>{const{theme:n}=W(),a=j.has(n??""),l=Z.has(n??""),f=Xe.has(n??"");if(i===m.HIGHLIGHT)e.append("rect").attr("x",t.x-10+(a?3:0)).attr("y",t.y-10+(a?3:0)).attr("width",a?14:20).attr("height",a?14:20).attr("class",`commit ${r.id} commit-highlight${H(o,G,l)} ${s}-outer`),e.append("rect").attr("x",t.x-6+(a?2:0)).attr("y",t.y-6+(a?2:0)).attr("width",a?8:12).attr("height",a?8:12).attr("class",`commit ${r.id} commit${H(o,G,l)} ${s}-inner`);else if(i===m.CHERRY_PICK)e.append("circle").attr("cx",t.x).attr("cy",t.y).attr("r",a?7:10).attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x-3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x+3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x+3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x-3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`);else{const g=e.append("circle");if(g.attr("cx",t.x),g.attr("cy",t.y),g.attr("r",a?7:10),g.attr("class",`commit ${r.id} commit${H(o,G,l)}`),i===m.MERGE){const $=e.append("circle");$.attr("cx",t.x),$.attr("cy",t.y),$.attr("r",a?5:6),$.attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}if(i===m.REVERSE){const $=e.append("path"),c=a?4:5;$.attr("d",`M ${t.x-c},${t.y-c}L${t.x+c},${t.y+c}M${t.x-c},${t.y+c}L${t.x+c},${t.y-c}`).attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}}},"drawCommitBullet"),sr=h((e,r,t,s,o)=>{if(r.type!==m.CHERRY_PICK&&(r.customId&&r.type===m.MERGE||r.type!==m.MERGE)&&o.showCommitLabel){const i=e.append("g"),n=i.insert("rect").attr("class","commit-label-bkg"),a=i.append("text").attr("x",s).attr("y",t.y+25).attr("class","commit-label").text(r.id),l=a.node()?.getBBox();if(l&&(n.attr("x",t.posWithOffset-l.width/2-R).attr("y",t.y+13.5).attr("width",l.width+2*R).attr("height",l.height+2*R),y==="TB"||y==="BT"?(n.attr("x",t.x-(l.width+4*L+5)).attr("y",t.y-12),a.attr("x",t.x-(l.width+4*L)).attr("y",t.y+l.height-12)):a.attr("x",t.posWithOffset-l.width/2),o.rotateCommitLabel))if(y==="TB"||y==="BT")a.attr("transform","rotate(-45, "+t.x+", "+t.y+")"),n.attr("transform","rotate(-45, "+t.x+", "+t.y+")");else{const f=-7.5-(l.width+10)/25*9.5,g=10+l.width/25*8.5;i.attr("transform","translate("+f+", "+g+") rotate(-45, "+s+", "+t.y+")")}}},"drawCommitLabel"),or=h((e,r,t,s)=>{if(r.tags.length>0){let o=0,i=0,n=0;const a=[];for(const l of r.tags.reverse()){const f=e.insert("polygon"),g=e.append("circle"),$=e.append("text").attr("y",t.y-16-o).attr("class","tag-label").text(l),c=$.node()?.getBBox();if(!c)throw new Error("Tag bbox not found");i=Math.max(i,c.width),n=Math.max(n,c.height),$.attr("x",t.posWithOffset-c.width/2),a.push({tag:$,hole:g,rect:f,yOffset:o}),o+=20}for(const{tag:l,hole:f,rect:g,yOffset:$}of a){const c=n/2,x=t.y-19.2-$;if(g.attr("class","tag-label-bkg").attr("points",`
|
|
1
|
+
import{p as le}from"./chunk-4BX2VUAB-DZDNetDC.js";import{I as he}from"./chunk-QZHKN3VN-D4D-V_ex.js";import{q as $e,p as fe,s as ge,g as ue,a as ye,b as xe,_ as h,D as J,l as w,d as me,c as W,u as pe,E as be,z as we,k as B,F as ke,G as ve,H as Ce}from"./index-DUmVscrR.js";import{p as Ee}from"./wardley-L42UT6IY-J7vXwA5J.js";import"./index-BRu1Yhrx.js";var m={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Be=ve.gitGraph,S=h(()=>ke({...Be,...J().gitGraph}),"getConfig"),d=new he(()=>{const e=S(),r=e.mainBranchName,t=e.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:t}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function Y(){return Ce({length:7})}h(Y,"getID");function te(e,r){const t=Object.create(null);return e.reduce((s,o)=>{const i=r(o);return t[i]||(t[i]=!0,s.push(o)),s},[])}h(te,"uniqBy");var Te=h(function(e){d.records.direction=e},"setDirection"),Le=h(function(e){w.debug("options str",e),e=e?.trim(),e=e||"{}";try{d.records.options=JSON.parse(e)}catch(r){w.error("error while parsing gitGraph options",r.message)}},"setOptions"),Me=h(function(){return d.records.options},"getOptions"),Re=h(function(e){let r=e.msg,t=e.id;const s=e.type;let o=e.tags;w.info("commit",r,t,s,o),w.debug("Entering commit:",r,t,s,o);const i=S();t=B.sanitizeText(t,i),r=B.sanitizeText(r,i),o=o?.map(a=>B.sanitizeText(a,i));const n={id:t||d.records.seq+"-"+Y(),message:r,seq:d.records.seq++,type:s??m.NORMAL,tags:o??[],parents:d.records.head==null?[]:[d.records.head.id],branch:d.records.currBranch};d.records.head=n,w.info("main branch",i.mainBranchName),d.records.commits.has(n.id)&&w.warn(`Commit ID ${n.id} already exists`),d.records.commits.set(n.id,n),d.records.branches.set(d.records.currBranch,n.id),w.debug("in pushCommit "+n.id)},"commit"),Ie=h(function(e){let r=e.name;const t=e.order;if(r=B.sanitizeText(r,S()),d.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);d.records.branches.set(r,d.records.head!=null?d.records.head.id:null),d.records.branchConfig.set(r,{name:r,order:t}),ae(r),w.debug("in createBranch")},"branch"),Oe=h(e=>{let r=e.branch,t=e.id;const s=e.type,o=e.tags,i=S();r=B.sanitizeText(r,i),t&&(t=B.sanitizeText(t,i));const n=d.records.branches.get(d.records.currBranch),a=d.records.branches.get(r),l=n?d.records.commits.get(n):void 0,f=a?d.records.commits.get(a):void 0;if(l&&f&&l.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(d.records.currBranch===r){const c=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(l===void 0||!l){const c=new Error(`Incorrect usage of "merge". Current branch (${d.records.currBranch})has no commits`);throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},c}if(!d.records.branches.has(r)){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},c}if(f===void 0||!f){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},c}if(l===f){const c=new Error('Incorrect usage of "merge". Both branches have same head');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(t&&d.records.commits.has(t)){const c=new Error('Incorrect usage of "merge". Commit with id:'+t+" already exists, use different custom id");throw c.hash={text:`merge ${r} ${t} ${s} ${o?.join(" ")}`,token:`merge ${r} ${t} ${s} ${o?.join(" ")}`,expected:[`merge ${r} ${t}_UNIQUE ${s} ${o?.join(" ")}`]},c}const g=a||"",$={id:t||`${d.records.seq}-${Y()}`,message:`merged branch ${r} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,g],branch:d.records.currBranch,type:m.MERGE,customType:s,customId:!!t,tags:o??[]};d.records.head=$,d.records.commits.set($.id,$),d.records.branches.set(d.records.currBranch,$.id),w.debug(d.records.branches),w.debug("in mergeBranch")},"merge"),_e=h(function(e){let r=e.id,t=e.targetId,s=e.tags,o=e.parent;w.debug("Entering cherryPick:",r,t,s);const i=S();if(r=B.sanitizeText(r,i),t=B.sanitizeText(t,i),s=s?.map(l=>B.sanitizeText(l,i)),o=B.sanitizeText(o,i),!r||!d.records.commits.has(r)){const l=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw l.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},l}const n=d.records.commits.get(r);if(n===void 0||!n)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(o&&!(Array.isArray(n.parents)&&n.parents.includes(o)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const a=n.branch;if(n.type===m.MERGE&&!o)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!t||!d.records.commits.has(t)){if(a===d.records.currBranch){const $=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const l=d.records.branches.get(d.records.currBranch);if(l===void 0||!l){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const f=d.records.commits.get(l);if(f===void 0||!f){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},$}const g={id:d.records.seq+"-"+Y(),message:`cherry-picked ${n?.message} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,n.id],branch:d.records.currBranch,type:m.CHERRY_PICK,tags:s?s.filter(Boolean):[`cherry-pick:${n.id}${n.type===m.MERGE?`|parent:${o}`:""}`]};d.records.head=g,d.records.commits.set(g.id,g),d.records.branches.set(d.records.currBranch,g.id),w.debug(d.records.branches),w.debug("in cherryPick")}},"cherryPick"),ae=h(function(e){if(e=B.sanitizeText(e,S()),d.records.branches.has(e)){d.records.currBranch=e;const r=d.records.branches.get(d.records.currBranch);r===void 0||!r?d.records.head=null:d.records.head=d.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw r.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},r}},"checkout");function V(e,r,t){const s=e.indexOf(r);s===-1?e.push(t):e.splice(s,1,t)}h(V,"upsert");function Q(e){const r=e.reduce((o,i)=>o.seq>i.seq?o:i,e[0]);let t="";e.forEach(function(o){o===r?t+=" *":t+=" |"});const s=[t,r.id,r.seq];for(const o in d.records.branches)d.records.branches.get(o)===r.id&&s.push(o);if(w.debug(s.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const o=d.records.commits.get(r.parents[0]);V(e,r,o),r.parents[1]&&e.push(d.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const o=d.records.commits.get(r.parents[0]);V(e,r,o)}}e=te(e,o=>o.id),Q(e)}h(Q,"prettyPrintCommitHistory");var Ge=h(function(){w.debug(d.records.commits);const e=ne()[0];Q([e])},"prettyPrint"),He=h(function(){d.reset(),we()},"clear"),Se=h(function(){return[...d.records.branchConfig.values()].map((r,t)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${t}`)}).sort((r,t)=>(r.order??0)-(t.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),Ae=h(function(){return d.records.branches},"getBranches"),De=h(function(){return d.records.commits},"getCommits"),ne=h(function(){const e=[...d.records.commits.values()];return e.forEach(function(r){w.debug(r.id)}),e.sort((r,t)=>r.seq-t.seq),e},"getCommitsArray"),qe=h(function(){return d.records.currBranch},"getCurrentBranch"),Pe=h(function(){return d.records.direction},"getDirection"),We=h(function(){return d.records.head},"getHead"),se={commitType:m,getConfig:S,setDirection:Te,setOptions:Le,getOptions:Me,commit:Re,branch:Ie,merge:Oe,cherryPick:_e,checkout:ae,prettyPrint:Ge,clear:He,getBranchesAsObjArray:Se,getBranches:Ae,getCommits:De,getCommitsArray:ne,getCurrentBranch:qe,getDirection:Pe,getHead:We,setAccTitle:xe,getAccTitle:ye,getAccDescription:ue,setAccDescription:ge,setDiagramTitle:fe,getDiagramTitle:$e},Ne=h((e,r)=>{le(e,r),e.dir&&r.setDirection(e.dir);for(const t of e.statements)Fe(t,r)},"populate"),Fe=h((e,r)=>{const s={Commit:h(o=>r.commit(ze(o)),"Commit"),Branch:h(o=>r.branch(Ye(o)),"Branch"),Merge:h(o=>r.merge(je(o)),"Merge"),Checkout:h(o=>r.checkout(Ue(o)),"Checkout"),CherryPicking:h(o=>r.cherryPick(Ke(o)),"CherryPicking")}[e.$type];s?s(e):w.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),ze=h(e=>({id:e.id,msg:e.message??"",type:e.type!==void 0?m[e.type]:m.NORMAL,tags:e.tags??void 0}),"parseCommit"),Ye=h(e=>({name:e.name,order:e.order??0}),"parseBranch"),je=h(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?m[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Ue=h(e=>e.branch,"parseCheckout"),Ke=h(e=>({id:e.id,targetId:"",tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),"parseCherryPicking"),Ve={parse:h(async e=>{const r=await Ee("gitGraph",e);w.debug(r),Ne(r,se)},"parse")},O=10,_=40,L=4,R=2,G=8,j=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),X=12,Z=new Set(["redux-color","redux-dark-color"]),Xe=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),H=h((e,r,t=!1)=>t&&e>0?(e-1)%(r-1)+1:e%r,"calcColorIndex"),C=new Map,E=new Map,F=30,q=new Map,z=[],I=0,y="LR",Je=h(()=>{C.clear(),E.clear(),q.clear(),I=0,z=[],y="LR"},"clear"),oe=h(e=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e=="string"?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach(s=>{const o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),o.setAttribute("dy","1em"),o.setAttribute("x","0"),o.setAttribute("class","row"),o.textContent=s.trim(),r.appendChild(o)}),r},"drawText"),ce=h(e=>{let r,t,s;return y==="BT"?(t=h((o,i)=>o<=i,"comparisonFunc"),s=1/0):(t=h((o,i)=>o>=i,"comparisonFunc"),s=0),e.forEach(o=>{const i=y==="TB"||y=="BT"?E.get(o)?.y:E.get(o)?.x;i!==void 0&&t(i,s)&&(r=o,s=i)}),r},"findClosestParent"),Qe=h(e=>{let r="",t=1/0;return e.forEach(s=>{const o=E.get(s).y;o<=t&&(r=s,t=o)}),r||void 0},"findClosestParentBT"),Ze=h((e,r,t)=>{let s=t,o=t;const i=[];e.forEach(n=>{const a=r.get(n);if(!a)throw new Error(`Commit not found for key ${n}`);a.parents.length?(s=rr(a),o=Math.max(s,o)):i.push(a),tr(a,s)}),s=o,i.forEach(n=>{ar(n,s,t)}),e.forEach(n=>{const a=r.get(n);if(a?.parents.length){const l=Qe(a.parents);s=E.get(l).y-_,s<=o&&(o=s);const f=C.get(a.branch).pos,g=s-O;E.set(a.id,{x:f,y:g})}})},"setParallelBTPos"),er=h(e=>{const r=ce(e.parents.filter(s=>s!==null));if(!r)throw new Error(`Closest parent not found for commit ${e.id}`);const t=E.get(r)?.y;if(t===void 0)throw new Error(`Closest parent position not found for commit ${e.id}`);return t},"findClosestParentPos"),rr=h(e=>er(e)+_,"calculateCommitPosition"),tr=h((e,r)=>{const t=C.get(e.branch);if(!t)throw new Error(`Branch not found for commit ${e.id}`);const s=t.pos,o=r+O;return E.set(e.id,{x:s,y:o}),{x:s,y:o}},"setCommitPosition"),ar=h((e,r,t)=>{const s=C.get(e.branch);if(!s)throw new Error(`Branch not found for commit ${e.id}`);const o=r+t,i=s.pos;E.set(e.id,{x:i,y:o})},"setRootPosition"),nr=h((e,r,t,s,o,i)=>{const{theme:n}=W(),a=j.has(n??""),l=Z.has(n??""),f=Xe.has(n??"");if(i===m.HIGHLIGHT)e.append("rect").attr("x",t.x-10+(a?3:0)).attr("y",t.y-10+(a?3:0)).attr("width",a?14:20).attr("height",a?14:20).attr("class",`commit ${r.id} commit-highlight${H(o,G,l)} ${s}-outer`),e.append("rect").attr("x",t.x-6+(a?2:0)).attr("y",t.y-6+(a?2:0)).attr("width",a?8:12).attr("height",a?8:12).attr("class",`commit ${r.id} commit${H(o,G,l)} ${s}-inner`);else if(i===m.CHERRY_PICK)e.append("circle").attr("cx",t.x).attr("cy",t.y).attr("r",a?7:10).attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x-3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("circle").attr("cx",t.x+3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x+3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`),e.append("line").attr("x1",t.x-3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${r.id} ${s}`);else{const g=e.append("circle");if(g.attr("cx",t.x),g.attr("cy",t.y),g.attr("r",a?7:10),g.attr("class",`commit ${r.id} commit${H(o,G,l)}`),i===m.MERGE){const $=e.append("circle");$.attr("cx",t.x),$.attr("cy",t.y),$.attr("r",a?5:6),$.attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}if(i===m.REVERSE){const $=e.append("path"),c=a?4:5;$.attr("d",`M ${t.x-c},${t.y-c}L${t.x+c},${t.y+c}M${t.x-c},${t.y+c}L${t.x+c},${t.y-c}`).attr("class",`commit ${s} ${r.id} commit${H(o,G,l)}`)}}},"drawCommitBullet"),sr=h((e,r,t,s,o)=>{if(r.type!==m.CHERRY_PICK&&(r.customId&&r.type===m.MERGE||r.type!==m.MERGE)&&o.showCommitLabel){const i=e.append("g"),n=i.insert("rect").attr("class","commit-label-bkg"),a=i.append("text").attr("x",s).attr("y",t.y+25).attr("class","commit-label").text(r.id),l=a.node()?.getBBox();if(l&&(n.attr("x",t.posWithOffset-l.width/2-R).attr("y",t.y+13.5).attr("width",l.width+2*R).attr("height",l.height+2*R),y==="TB"||y==="BT"?(n.attr("x",t.x-(l.width+4*L+5)).attr("y",t.y-12),a.attr("x",t.x-(l.width+4*L)).attr("y",t.y+l.height-12)):a.attr("x",t.posWithOffset-l.width/2),o.rotateCommitLabel))if(y==="TB"||y==="BT")a.attr("transform","rotate(-45, "+t.x+", "+t.y+")"),n.attr("transform","rotate(-45, "+t.x+", "+t.y+")");else{const f=-7.5-(l.width+10)/25*9.5,g=10+l.width/25*8.5;i.attr("transform","translate("+f+", "+g+") rotate(-45, "+s+", "+t.y+")")}}},"drawCommitLabel"),or=h((e,r,t,s)=>{if(r.tags.length>0){let o=0,i=0,n=0;const a=[];for(const l of r.tags.reverse()){const f=e.insert("polygon"),g=e.append("circle"),$=e.append("text").attr("y",t.y-16-o).attr("class","tag-label").text(l),c=$.node()?.getBBox();if(!c)throw new Error("Tag bbox not found");i=Math.max(i,c.width),n=Math.max(n,c.height),$.attr("x",t.posWithOffset-c.width/2),a.push({tag:$,hole:g,rect:f,yOffset:o}),o+=20}for(const{tag:l,hole:f,rect:g,yOffset:$}of a){const c=n/2,x=t.y-19.2-$;if(g.attr("class","tag-label-bkg").attr("points",`
|
|
2
2
|
${s-i/2-L/2},${x+R}
|
|
3
3
|
${s-i/2-L/2},${x-R}
|
|
4
4
|
${t.posWithOffset-i/2-L},${x-c-R}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c}from"./index-
|
|
1
|
+
import{c}from"./index-BRu1Yhrx.js";const e=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],a=c("globe",e);export{a as G};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as t}from"./monaco-
|
|
1
|
+
import{l as t}from"./monaco-Mn1xgio_.js";import"./TaskHandoffPanel-BpGiZ5eT.js";import"./index-BRu1Yhrx.js";import"./ProjectKanbanPage-CUX0Kh-t.js";import"./confirm-dialog-8ItnHBi0.js";import"./dialog-BUsI4h2U.js";import"./index-BFcDmhr0.js";import"./BranchSelect-BgVKUnxj.js";import"./popover-CGEFZKuu.js";import"./kbd-D4KIW7lm.js";import"./search--FRFbCre.js";import"./index-COigMgrJ.js";import"./index-BClyhWqz.js";import"./menu-styles-DWynpVVz.js";import"./chevron-down-Bmwy-nvS.js";import"./check-DUA2DjGH.js";import"./CreateTaskInput-Cllw4abW.js";import"./AttachmentPreview-BngGSahV.js";import"./tooltip-DZcaSN1F.js";import"./index-Cdmj8aPv.js";import"./MemberAvatar-CZ3F53Ep.js";import"./people-D_VwidfV.js";import"./BrandLogo-CBahjTd7.js";import"./index-Bg8TlDo_.js";import"./index-CtOu4p9B.js";import"./use-providers-BViTes-6.js";import"./trash-2-DmFXzIhh.js";import"./ExecutionPermissionSelector-Bsi1aa7q.js";import"./paperclip-CdQvl5ee.js";import"./chip-BSMT2uT1.js";import"./message-square-DIFv9yrO.js";import"./layers-BBHgMnhN.js";import"./copy-prrQrInw.js";import"./provider-selection-DSu7SCI7.js";import"./folder-picker-CBdw-4v3.js";import"./modal-Dx4N46s5.js";import"./mermaid-NOHMQCX5-XQbfQDGS.js";import"./use-translation-settings-Dgw0oKP1.js";import"./chevron-up-CClL6-SF.js";import"./at-sign-CEsum1vJ.js";import"./useTokenUsage-T03faPfn.js";import"./menu-BgtmXAzT.js";import"./select-c5IIpQj0.js";import"./select-D0sHgfcU.js";import"./index-JXcQeorP.js";import"./textarea-W-xQPto3.js";import"./content-DrW8KnXu.js";import"./file-C6QMUr5_.js";import"./server-Dr_6KJFM.js";import"./upload-C-4QDrwN.js";import"./globe-BOfcTsvL.js";import"./pencil-ChX7G9j9.js";const e=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],tt={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:["{{!--","--}}"]},brackets:[["<!--","-->"],["<",">"],["{{","}}"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${e.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:t.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${e.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:t.IndentAction.Indent}}]},et={defaultToken:"",tokenPostfix:"",tokenizer:{root:[[/\{\{!--/,"comment.block.start.handlebars","@commentBlock"],[/\{\{!/,"comment.start.handlebars","@comment"],[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.root"}],[/<!DOCTYPE/,"metatag.html","@doctype"],[/<!--/,"comment.html","@commentHtml"],[/(<)(\w+)(\/>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)(script)/,["delimiter.html",{token:"tag.html",next:"@script"}]],[/(<)(style)/,["delimiter.html",{token:"tag.html",next:"@style"}]],[/(<)([:\w]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)(\w+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/</,"delimiter.html"],[/\{/,"delimiter.html"],[/[^<{]+/]],doctype:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.comment"}],[/[^>]+/,"metatag.content.html"],[/>/,"metatag.html","@pop"]],comment:[[/\}\}/,"comment.end.handlebars","@pop"],[/./,"comment.content.handlebars"]],commentBlock:[[/--\}\}/,"comment.block.end.handlebars","@pop"],[/./,"comment.content.handlebars"]],commentHtml:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.comment"}],[/-->/,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.otherTag"}],[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.script"}],[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptAfterType"}],[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInEmbeddedState.scriptEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],style:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.style"}],[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleAfterType"}],[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInEmbeddedState.styleEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],handlebarsInSimpleState:[[/\{\{\{?/,"delimiter.handlebars"],[/\}\}\}?/,{token:"delimiter.handlebars",switchTo:"@$S2.$S3"}],{include:"handlebarsRoot"}],handlebarsInEmbeddedState:[[/\{\{\{?/,"delimiter.handlebars"],[/\}\}\}?/,{token:"delimiter.handlebars",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}],{include:"handlebarsRoot"}],handlebarsRoot:[[/"[^"]*"/,"string.handlebars"],[/[#/][^\s}]+/,"keyword.helper.handlebars"],[/else\b/,"keyword.helper.handlebars"],[/[\s]+/],[/[^}]/,"variable.parameter.handlebars"]]}};export{tt as conf,et as language};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as t}from"./monaco-
|
|
1
|
+
import{l as t}from"./monaco-Mn1xgio_.js";import"./TaskHandoffPanel-BpGiZ5eT.js";import"./index-BRu1Yhrx.js";import"./ProjectKanbanPage-CUX0Kh-t.js";import"./confirm-dialog-8ItnHBi0.js";import"./dialog-BUsI4h2U.js";import"./index-BFcDmhr0.js";import"./BranchSelect-BgVKUnxj.js";import"./popover-CGEFZKuu.js";import"./kbd-D4KIW7lm.js";import"./search--FRFbCre.js";import"./index-COigMgrJ.js";import"./index-BClyhWqz.js";import"./menu-styles-DWynpVVz.js";import"./chevron-down-Bmwy-nvS.js";import"./check-DUA2DjGH.js";import"./CreateTaskInput-Cllw4abW.js";import"./AttachmentPreview-BngGSahV.js";import"./tooltip-DZcaSN1F.js";import"./index-Cdmj8aPv.js";import"./MemberAvatar-CZ3F53Ep.js";import"./people-D_VwidfV.js";import"./BrandLogo-CBahjTd7.js";import"./index-Bg8TlDo_.js";import"./index-CtOu4p9B.js";import"./use-providers-BViTes-6.js";import"./trash-2-DmFXzIhh.js";import"./ExecutionPermissionSelector-Bsi1aa7q.js";import"./paperclip-CdQvl5ee.js";import"./chip-BSMT2uT1.js";import"./message-square-DIFv9yrO.js";import"./layers-BBHgMnhN.js";import"./copy-prrQrInw.js";import"./provider-selection-DSu7SCI7.js";import"./folder-picker-CBdw-4v3.js";import"./modal-Dx4N46s5.js";import"./mermaid-NOHMQCX5-XQbfQDGS.js";import"./use-translation-settings-Dgw0oKP1.js";import"./chevron-up-CClL6-SF.js";import"./at-sign-CEsum1vJ.js";import"./useTokenUsage-T03faPfn.js";import"./menu-BgtmXAzT.js";import"./select-c5IIpQj0.js";import"./select-D0sHgfcU.js";import"./index-JXcQeorP.js";import"./textarea-W-xQPto3.js";import"./content-DrW8KnXu.js";import"./file-C6QMUr5_.js";import"./server-Dr_6KJFM.js";import"./upload-C-4QDrwN.js";import"./globe-BOfcTsvL.js";import"./pencil-ChX7G9j9.js";const e=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],tt={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:["<!--","-->"]},brackets:[["<!--","-->"],["<",">"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${e.join("|")}))([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:t.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${e.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:t.IndentAction.Indent}}],folding:{markers:{start:new RegExp("^\\s*<!--\\s*#region\\b.*-->"),end:new RegExp("^\\s*<!--\\s*#endregion\\b.*-->")}}},et={defaultToken:"",tokenPostfix:".html",ignoreCase:!0,tokenizer:{root:[[/<!DOCTYPE/,"metatag","@doctype"],[/<!--/,"comment","@comment"],[/(<)((?:[\w\-]+:)?[\w\-]+)(\s*)(\/>)/,["delimiter","tag","","delimiter"]],[/(<)(script)/,["delimiter",{token:"tag",next:"@script"}]],[/(<)(style)/,["delimiter",{token:"tag",next:"@style"}]],[/(<)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/(<\/)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/</,"delimiter"],[/[^<]+/]],doctype:[[/[^>]+/,"metatag.content"],[/>/,"metatag","@pop"]],comment:[[/-->/,"comment","@pop"],[/[^-]+/,"comment.content"],[/./,"comment.content"]],otherTag:[[/\/?>/,"delimiter","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],scriptAfterType:[[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/"module"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.text/javascript"}],[/'module'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.text/javascript"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/>/,{token:"delimiter",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]],style:[[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],styleAfterType:[[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/>/,{token:"delimiter",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]]}};export{tt as conf,et as language};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as D,l as t}from"./monaco-
|
|
1
|
+
import{c as D,l as t}from"./monaco-Mn1xgio_.js";import{H as p,D as g,h as d,F as l,b as c,S as u,c as h,f as w,g as _,C as R}from"./lspLanguageFeatures-CPXERxVW.js";import{a as We,e as Fe,d as Le,R as Ee,i as He,j as be,t as ye,k as Te}from"./lspLanguageFeatures-CPXERxVW.js";import"./TaskHandoffPanel-BpGiZ5eT.js";import"./index-BRu1Yhrx.js";import"./ProjectKanbanPage-CUX0Kh-t.js";import"./confirm-dialog-8ItnHBi0.js";import"./dialog-BUsI4h2U.js";import"./index-BFcDmhr0.js";import"./BranchSelect-BgVKUnxj.js";import"./popover-CGEFZKuu.js";import"./kbd-D4KIW7lm.js";import"./search--FRFbCre.js";import"./index-COigMgrJ.js";import"./index-BClyhWqz.js";import"./menu-styles-DWynpVVz.js";import"./chevron-down-Bmwy-nvS.js";import"./check-DUA2DjGH.js";import"./CreateTaskInput-Cllw4abW.js";import"./AttachmentPreview-BngGSahV.js";import"./tooltip-DZcaSN1F.js";import"./index-Cdmj8aPv.js";import"./MemberAvatar-CZ3F53Ep.js";import"./people-D_VwidfV.js";import"./BrandLogo-CBahjTd7.js";import"./index-Bg8TlDo_.js";import"./index-CtOu4p9B.js";import"./use-providers-BViTes-6.js";import"./trash-2-DmFXzIhh.js";import"./ExecutionPermissionSelector-Bsi1aa7q.js";import"./paperclip-CdQvl5ee.js";import"./chip-BSMT2uT1.js";import"./message-square-DIFv9yrO.js";import"./layers-BBHgMnhN.js";import"./copy-prrQrInw.js";import"./provider-selection-DSu7SCI7.js";import"./folder-picker-CBdw-4v3.js";import"./modal-Dx4N46s5.js";import"./mermaid-NOHMQCX5-XQbfQDGS.js";import"./use-translation-settings-Dgw0oKP1.js";import"./chevron-up-CClL6-SF.js";import"./at-sign-CEsum1vJ.js";import"./useTokenUsage-T03faPfn.js";import"./menu-BgtmXAzT.js";import"./select-c5IIpQj0.js";import"./select-D0sHgfcU.js";import"./index-JXcQeorP.js";import"./textarea-W-xQPto3.js";import"./content-DrW8KnXu.js";import"./file-C6QMUr5_.js";import"./server-Dr_6KJFM.js";import"./upload-C-4QDrwN.js";import"./globe-BOfcTsvL.js";import"./pencil-ChX7G9j9.js";const I=120*1e3;class f{constructor(o){this._defaults=o,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;Date.now()-this._lastUsedTime>I&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=D({moduleId:"vs/language/html/htmlWorker",createWorker:()=>new Worker(new URL("/assets/html.worker-CwpTb9lJ.js",import.meta.url),{type:"module"}),createData:{languageSettings:this._defaults.options,languageId:this._defaults.languageId},label:this._defaults.languageId}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...o){let e;return this._getClient().then(r=>{e=r}).then(r=>{if(this._worker)return this._worker.withSyncedResources(o)}).then(r=>e)}}class v extends R{constructor(o){super(o,[".",":","<",'"',"=","/"])}}function Ie(i){const o=new f(i),e=(...n)=>o.getLanguageServiceWorker(...n);let r=i.languageId;t.registerCompletionItemProvider(r,new v(e)),t.registerHoverProvider(r,new p(e)),t.registerDocumentHighlightProvider(r,new g(e)),t.registerLinkProvider(r,new d(e)),t.registerFoldingRangeProvider(r,new l(e)),t.registerDocumentSymbolProvider(r,new c(e)),t.registerSelectionRangeProvider(r,new u(e)),t.registerRenameProvider(r,new h(e)),r==="html"&&(t.registerDocumentFormattingEditProvider(r,new w(e)),t.registerDocumentRangeFormattingEditProvider(r,new _(e)))}function Se(i){const o=[],e=[],r=new f(i);o.push(r);const n=(...s)=>r.getLanguageServiceWorker(...s);function P(){const{languageId:s,modeConfiguration:a}=i;k(e),a.completionItems&&e.push(t.registerCompletionItemProvider(s,new v(n))),a.hovers&&e.push(t.registerHoverProvider(s,new p(n))),a.documentHighlights&&e.push(t.registerDocumentHighlightProvider(s,new g(n))),a.links&&e.push(t.registerLinkProvider(s,new d(n))),a.documentSymbols&&e.push(t.registerDocumentSymbolProvider(s,new c(n))),a.rename&&e.push(t.registerRenameProvider(s,new h(n))),a.foldingRanges&&e.push(t.registerFoldingRangeProvider(s,new l(n))),a.selectionRanges&&e.push(t.registerSelectionRangeProvider(s,new u(n))),a.documentFormattingEdits&&e.push(t.registerDocumentFormattingEditProvider(s,new w(n))),a.documentRangeFormattingEdits&&e.push(t.registerDocumentRangeFormattingEditProvider(s,new _(n)))}return P(),o.push(m(e)),m(o)}function m(i){return{dispose:()=>k(i)}}function k(i){for(;i.length;)i.pop().dispose()}export{R as CompletionAdapter,We as DefinitionAdapter,Fe as DiagnosticsAdapter,Le as DocumentColorAdapter,w as DocumentFormattingEditProvider,g as DocumentHighlightAdapter,d as DocumentLinkAdapter,_ as DocumentRangeFormattingEditProvider,c as DocumentSymbolAdapter,l as FoldingRangeAdapter,p as HoverAdapter,Ee as ReferenceAdapter,h as RenameAdapter,u as SelectionRangeAdapter,f as WorkerManager,He as fromPosition,be as fromRange,Se as setupMode,Ie as setupMode1,ye as toRange,Te as toTextEdit};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as O,aE as xt,aF as be,j as Y,P as At,x as It,C as Ae}from"./index-Cc3qXMhU.js";import{a as Re}from"./index-DWrSDMX2.js";function Oe(t){const[e,n]=O.useState(void 0);return xt(()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const i=r[0];let s,c;if("borderBoxSize"in i){const l=i.borderBoxSize,a=Array.isArray(l)?l[0]:l;s=a.inlineSize,c=a.blockSize}else s=t.offsetWidth,c=t.offsetHeight;n({width:s,height:c})});return o.observe(t,{box:"border-box"}),()=>o.unobserve(t)}else n(void 0)},[t]),e}const Se=["top","right","bottom","left"],Z=Math.min,W=Math.max,lt=Math.round,st=Math.floor,j=t=>({x:t,y:t}),Ce={left:"right",right:"left",bottom:"top",top:"bottom"},Pe={start:"end",end:"start"};function yt(t,e,n){return W(t,Z(e,n))}function q(t,e){return typeof t=="function"?t(e):t}function U(t){return t.split("-")[0]}function tt(t){return t.split("-")[1]}function Rt(t){return t==="x"?"y":"x"}function Ot(t){return t==="y"?"height":"width"}const Ee=new Set(["top","bottom"]);function V(t){return Ee.has(U(t))?"y":"x"}function St(t){return Rt(V(t))}function Le(t,e,n){n===void 0&&(n=!1);const o=tt(t),r=St(t),i=Ot(r);let s=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(s=at(s)),[s,at(s)]}function De(t){const e=at(t);return[vt(t),e,vt(e)]}function vt(t){return t.replace(/start|end/g,e=>Pe[e])}const $t=["left","right"],kt=["right","left"],Me=["top","bottom"],Te=["bottom","top"];function $e(t,e,n){switch(t){case"top":case"bottom":return n?e?kt:$t:e?$t:kt;case"left":case"right":return e?Me:Te;default:return[]}}function ke(t,e,n,o){const r=tt(t);let i=$e(U(t),n==="start",o);return r&&(i=i.map(s=>s+"-"+r),e&&(i=i.concat(i.map(vt)))),i}function at(t){return t.replace(/left|right|bottom|top/g,e=>Ce[e])}function Fe(t){return{top:0,right:0,bottom:0,left:0,...t}}function Xt(t){return typeof t!="number"?Fe(t):{top:t,right:t,bottom:t,left:t}}function ft(t){const{x:e,y:n,width:o,height:r}=t;return{width:o,height:r,top:n,left:e,right:e+o,bottom:n+r,x:e,y:n}}function Ft(t,e,n){let{reference:o,floating:r}=t;const i=V(e),s=St(e),c=Ot(s),l=U(e),a=i==="y",f=o.x+o.width/2-r.width/2,u=o.y+o.height/2-r.height/2,h=o[c]/2-r[c]/2;let d;switch(l){case"top":d={x:f,y:o.y-r.height};break;case"bottom":d={x:f,y:o.y+o.height};break;case"right":d={x:o.x+o.width,y:u};break;case"left":d={x:o.x-r.width,y:u};break;default:d={x:o.x,y:o.y}}switch(tt(e)){case"start":d[s]-=h*(n&&a?-1:1);break;case"end":d[s]+=h*(n&&a?-1:1);break}return d}async function Ne(t,e){var n;e===void 0&&(e={});const{x:o,y:r,platform:i,rects:s,elements:c,strategy:l}=t,{boundary:a="clippingAncestors",rootBoundary:f="viewport",elementContext:u="floating",altBoundary:h=!1,padding:d=0}=q(e,t),p=Xt(d),w=c[h?u==="floating"?"reference":"floating":u],g=ft(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(w)))==null||n?w:w.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(c.floating)),boundary:a,rootBoundary:f,strategy:l})),v=u==="floating"?{x:o,y:r,width:s.floating.width,height:s.floating.height}:s.reference,y=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c.floating)),x=await(i.isElement==null?void 0:i.isElement(y))?await(i.getScale==null?void 0:i.getScale(y))||{x:1,y:1}:{x:1,y:1},A=ft(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:v,offsetParent:y,strategy:l}):v);return{top:(g.top-A.top+p.top)/x.y,bottom:(A.bottom-g.bottom+p.bottom)/x.y,left:(g.left-A.left+p.left)/x.x,right:(A.right-g.right+p.right)/x.x}}const We=async(t,e,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:s}=n,c=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(e));let a=await s.getElementRects({reference:t,floating:e,strategy:r}),{x:f,y:u}=Ft(a,o,l),h=o,d={},p=0;for(let w=0;w<c.length;w++){var m;const{name:g,fn:v}=c[w],{x:y,y:x,data:A,reset:R}=await v({x:f,y:u,initialPlacement:o,placement:h,strategy:r,middlewareData:d,rects:a,platform:{...s,detectOverflow:(m=s.detectOverflow)!=null?m:Ne},elements:{reference:t,floating:e}});f=y??f,u=x??u,d={...d,[g]:{...d[g],...A}},R&&p<=50&&(p++,typeof R=="object"&&(R.placement&&(h=R.placement),R.rects&&(a=R.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:r}):R.rects),{x:f,y:u}=Ft(a,h,l)),w=-1)}return{x:f,y:u,placement:h,strategy:r,middlewareData:d}},He=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:o,placement:r,rects:i,platform:s,elements:c,middlewareData:l}=e,{element:a,padding:f=0}=q(t,e)||{};if(a==null)return{};const u=Xt(f),h={x:n,y:o},d=St(r),p=Ot(d),m=await s.getDimensions(a),w=d==="y",g=w?"top":"left",v=w?"bottom":"right",y=w?"clientHeight":"clientWidth",x=i.reference[p]+i.reference[d]-h[d]-i.floating[p],A=h[d]-i.reference[d],R=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a));let S=R?R[y]:0;(!S||!await(s.isElement==null?void 0:s.isElement(R)))&&(S=c.floating[y]||i.floating[p]);const M=x/2-A/2,F=S/2-m[p]/2-1,D=Z(u[g],F),$=Z(u[v],F),k=D,P=S-m[p]-$,C=S/2-m[p]/2+M,N=yt(k,C,P),E=!l.arrow&&tt(r)!=null&&C!==N&&i.reference[p]/2-(C<k?D:$)-m[p]/2<0,L=E?C<k?C-k:C-P:0;return{[d]:h[d]+L,data:{[d]:N,centerOffset:C-N-L,...E&&{alignmentOffset:L}},reset:E}}}),_e=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:r,middlewareData:i,rects:s,initialPlacement:c,platform:l,elements:a}=e,{mainAxis:f=!0,crossAxis:u=!0,fallbackPlacements:h,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...w}=q(t,e);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const g=U(r),v=V(c),y=U(c)===c,x=await(l.isRTL==null?void 0:l.isRTL(a.floating)),A=h||(y||!m?[at(c)]:De(c)),R=p!=="none";!h&&R&&A.push(...ke(c,m,p,x));const S=[c,...A],M=await l.detectOverflow(e,w),F=[];let D=((o=i.flip)==null?void 0:o.overflows)||[];if(f&&F.push(M[g]),u){const C=Le(r,s,x);F.push(M[C[0]],M[C[1]])}if(D=[...D,{placement:r,overflows:F}],!F.every(C=>C<=0)){var $,k;const C=((($=i.flip)==null?void 0:$.index)||0)+1,N=S[C];if(N&&(!(u==="alignment"?v!==V(N):!1)||D.every(b=>V(b.placement)===v?b.overflows[0]>0:!0)))return{data:{index:C,overflows:D},reset:{placement:N}};let E=(k=D.filter(L=>L.overflows[0]<=0).sort((L,b)=>L.overflows[1]-b.overflows[1])[0])==null?void 0:k.placement;if(!E)switch(d){case"bestFit":{var P;const L=(P=D.filter(b=>{if(R){const T=V(b.placement);return T===v||T==="y"}return!0}).map(b=>[b.placement,b.overflows.filter(T=>T>0).reduce((T,B)=>T+B,0)]).sort((b,T)=>b[1]-T[1])[0])==null?void 0:P[0];L&&(E=L);break}case"initialPlacement":E=c;break}if(r!==E)return{reset:{placement:E}}}return{}}}};function Nt(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Wt(t){return Se.some(e=>t[e]>=0)}const ze=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n,platform:o}=e,{strategy:r="referenceHidden",...i}=q(t,e);switch(r){case"referenceHidden":{const s=await o.detectOverflow(e,{...i,elementContext:"reference"}),c=Nt(s,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:Wt(c)}}}case"escaped":{const s=await o.detectOverflow(e,{...i,altBoundary:!0}),c=Nt(s,n.floating);return{data:{escapedOffsets:c,escaped:Wt(c)}}}default:return{}}}}},Yt=new Set(["left","top"]);async function Be(t,e){const{placement:n,platform:o,elements:r}=t,i=await(o.isRTL==null?void 0:o.isRTL(r.floating)),s=U(n),c=tt(n),l=V(n)==="y",a=Yt.has(s)?-1:1,f=i&&l?-1:1,u=q(e,t);let{mainAxis:h,crossAxis:d,alignmentAxis:p}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return c&&typeof p=="number"&&(d=c==="end"?p*-1:p),l?{x:d*f,y:h*a}:{x:h*a,y:d*f}}const Ve=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:r,y:i,placement:s,middlewareData:c}=e,l=await Be(e,t);return s===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:r+l.x,y:i+l.y,data:{...l,placement:s}}}}},je=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:r,platform:i}=e,{mainAxis:s=!0,crossAxis:c=!1,limiter:l={fn:g=>{let{x:v,y}=g;return{x:v,y}}},...a}=q(t,e),f={x:n,y:o},u=await i.detectOverflow(e,a),h=V(U(r)),d=Rt(h);let p=f[d],m=f[h];if(s){const g=d==="y"?"top":"left",v=d==="y"?"bottom":"right",y=p+u[g],x=p-u[v];p=yt(y,p,x)}if(c){const g=h==="y"?"top":"left",v=h==="y"?"bottom":"right",y=m+u[g],x=m-u[v];m=yt(y,m,x)}const w=l.fn({...e,[d]:p,[h]:m});return{...w,data:{x:w.x-n,y:w.y-o,enabled:{[d]:s,[h]:c}}}}}},Ie=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:o,placement:r,rects:i,middlewareData:s}=e,{offset:c=0,mainAxis:l=!0,crossAxis:a=!0}=q(t,e),f={x:n,y:o},u=V(r),h=Rt(u);let d=f[h],p=f[u];const m=q(c,e),w=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const y=h==="y"?"height":"width",x=i.reference[h]-i.floating[y]+w.mainAxis,A=i.reference[h]+i.reference[y]-w.mainAxis;d<x?d=x:d>A&&(d=A)}if(a){var g,v;const y=h==="y"?"width":"height",x=Yt.has(U(r)),A=i.reference[u]-i.floating[y]+(x&&((g=s.offset)==null?void 0:g[u])||0)+(x?0:w.crossAxis),R=i.reference[u]+i.reference[y]+(x?0:((v=s.offset)==null?void 0:v[u])||0)-(x?w.crossAxis:0);p<A?p=A:p>R&&(p=R)}return{[h]:d,[u]:p}}}},Xe=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,o;const{placement:r,rects:i,platform:s,elements:c}=e,{apply:l=()=>{},...a}=q(t,e),f=await s.detectOverflow(e,a),u=U(r),h=tt(r),d=V(r)==="y",{width:p,height:m}=i.floating;let w,g;u==="top"||u==="bottom"?(w=u,g=h===(await(s.isRTL==null?void 0:s.isRTL(c.floating))?"start":"end")?"left":"right"):(g=u,w=h==="end"?"top":"bottom");const v=m-f.top-f.bottom,y=p-f.left-f.right,x=Z(m-f[w],v),A=Z(p-f[g],y),R=!e.middlewareData.shift;let S=x,M=A;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(M=y),(o=e.middlewareData.shift)!=null&&o.enabled.y&&(S=v),R&&!h){const D=W(f.left,0),$=W(f.right,0),k=W(f.top,0),P=W(f.bottom,0);d?M=p-2*(D!==0||$!==0?D+$:W(f.left,f.right)):S=m-2*(k!==0||P!==0?k+P:W(f.top,f.bottom))}await l({...e,availableWidth:M,availableHeight:S});const F=await s.getDimensions(c.floating);return p!==F.width||m!==F.height?{reset:{rects:!0}}:{}}}};function dt(){return typeof window<"u"}function et(t){return qt(t)?(t.nodeName||"").toLowerCase():"#document"}function H(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function X(t){var e;return(e=(qt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function qt(t){return dt()?t instanceof Node||t instanceof H(t).Node:!1}function _(t){return dt()?t instanceof Element||t instanceof H(t).Element:!1}function I(t){return dt()?t instanceof HTMLElement||t instanceof H(t).HTMLElement:!1}function Ht(t){return!dt()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof H(t).ShadowRoot}const Ye=new Set(["inline","contents"]);function rt(t){const{overflow:e,overflowX:n,overflowY:o,display:r}=z(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!Ye.has(r)}const qe=new Set(["table","td","th"]);function Ue(t){return qe.has(et(t))}const Ze=[":popover-open",":modal"];function pt(t){return Ze.some(e=>{try{return t.matches(e)}catch{return!1}})}const Ke=["transform","translate","scale","rotate","perspective"],Ge=["transform","translate","scale","rotate","perspective","filter"],Je=["paint","layout","strict","content"];function Ct(t){const e=Pt(),n=_(t)?z(t):t;return Ke.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||Ge.some(o=>(n.willChange||"").includes(o))||Je.some(o=>(n.contain||"").includes(o))}function Qe(t){let e=K(t);for(;I(e)&&!Q(e);){if(Ct(e))return e;if(pt(e))return null;e=K(e)}return null}function Pt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const tn=new Set(["html","body","#document"]);function Q(t){return tn.has(et(t))}function z(t){return H(t).getComputedStyle(t)}function ht(t){return _(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function K(t){if(et(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Ht(t)&&t.host||X(t);return Ht(e)?e.host:e}function Ut(t){const e=K(t);return Q(e)?t.ownerDocument?t.ownerDocument.body:t.body:I(e)&&rt(e)?e:Ut(e)}function ot(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const r=Ut(t),i=r===((o=t.ownerDocument)==null?void 0:o.body),s=H(r);if(i){const c=bt(s);return e.concat(s,s.visualViewport||[],rt(r)?r:[],c&&n?ot(c):[])}return e.concat(r,ot(r,[],n))}function bt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Zt(t){const e=z(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const r=I(t),i=r?t.offsetWidth:n,s=r?t.offsetHeight:o,c=lt(n)!==i||lt(o)!==s;return c&&(n=i,o=s),{width:n,height:o,$:c}}function Et(t){return _(t)?t:t.contextElement}function J(t){const e=Et(t);if(!I(e))return j(1);const n=e.getBoundingClientRect(),{width:o,height:r,$:i}=Zt(e);let s=(i?lt(n.width):n.width)/o,c=(i?lt(n.height):n.height)/r;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}const en=j(0);function Kt(t){const e=H(t);return!Pt()||!e.visualViewport?en:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function nn(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==H(t)?!1:e}function G(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const r=t.getBoundingClientRect(),i=Et(t);let s=j(1);e&&(o?_(o)&&(s=J(o)):s=J(t));const c=nn(i,n,o)?Kt(i):j(0);let l=(r.left+c.x)/s.x,a=(r.top+c.y)/s.y,f=r.width/s.x,u=r.height/s.y;if(i){const h=H(i),d=o&&_(o)?H(o):o;let p=h,m=bt(p);for(;m&&o&&d!==p;){const w=J(m),g=m.getBoundingClientRect(),v=z(m),y=g.left+(m.clientLeft+parseFloat(v.paddingLeft))*w.x,x=g.top+(m.clientTop+parseFloat(v.paddingTop))*w.y;l*=w.x,a*=w.y,f*=w.x,u*=w.y,l+=y,a+=x,p=H(m),m=bt(p)}}return ft({width:f,height:u,x:l,y:a})}function mt(t,e){const n=ht(t).scrollLeft;return e?e.left+n:G(X(t)).left+n}function Gt(t,e){const n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-mt(t,n),r=n.top+e.scrollTop;return{x:o,y:r}}function on(t){let{elements:e,rect:n,offsetParent:o,strategy:r}=t;const i=r==="fixed",s=X(o),c=e?pt(e.floating):!1;if(o===s||c&&i)return n;let l={scrollLeft:0,scrollTop:0},a=j(1);const f=j(0),u=I(o);if((u||!u&&!i)&&((et(o)!=="body"||rt(s))&&(l=ht(o)),I(o))){const d=G(o);a=J(o),f.x=d.x+o.clientLeft,f.y=d.y+o.clientTop}const h=s&&!u&&!i?Gt(s,l):j(0);return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-l.scrollLeft*a.x+f.x+h.x,y:n.y*a.y-l.scrollTop*a.y+f.y+h.y}}function rn(t){return Array.from(t.getClientRects())}function sn(t){const e=X(t),n=ht(t),o=t.ownerDocument.body,r=W(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),i=W(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+mt(t);const c=-n.scrollTop;return z(o).direction==="rtl"&&(s+=W(e.clientWidth,o.clientWidth)-r),{width:r,height:i,x:s,y:c}}const _t=25;function cn(t,e){const n=H(t),o=X(t),r=n.visualViewport;let i=o.clientWidth,s=o.clientHeight,c=0,l=0;if(r){i=r.width,s=r.height;const f=Pt();(!f||f&&e==="fixed")&&(c=r.offsetLeft,l=r.offsetTop)}const a=mt(o);if(a<=0){const f=o.ownerDocument,u=f.body,h=getComputedStyle(u),d=f.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,p=Math.abs(o.clientWidth-u.clientWidth-d);p<=_t&&(i-=p)}else a<=_t&&(i+=a);return{width:i,height:s,x:c,y:l}}const ln=new Set(["absolute","fixed"]);function an(t,e){const n=G(t,!0,e==="fixed"),o=n.top+t.clientTop,r=n.left+t.clientLeft,i=I(t)?J(t):j(1),s=t.clientWidth*i.x,c=t.clientHeight*i.y,l=r*i.x,a=o*i.y;return{width:s,height:c,x:l,y:a}}function zt(t,e,n){let o;if(e==="viewport")o=cn(t,n);else if(e==="document")o=sn(X(t));else if(_(e))o=an(e,n);else{const r=Kt(t);o={x:e.x-r.x,y:e.y-r.y,width:e.width,height:e.height}}return ft(o)}function Jt(t,e){const n=K(t);return n===e||!_(n)||Q(n)?!1:z(n).position==="fixed"||Jt(n,e)}function fn(t,e){const n=e.get(t);if(n)return n;let o=ot(t,[],!1).filter(c=>_(c)&&et(c)!=="body"),r=null;const i=z(t).position==="fixed";let s=i?K(t):t;for(;_(s)&&!Q(s);){const c=z(s),l=Ct(s);!l&&c.position==="fixed"&&(r=null),(i?!l&&!r:!l&&c.position==="static"&&!!r&&ln.has(r.position)||rt(s)&&!l&&Jt(t,s))?o=o.filter(f=>f!==s):r=c,s=K(s)}return e.set(t,o),o}function un(t){let{element:e,boundary:n,rootBoundary:o,strategy:r}=t;const s=[...n==="clippingAncestors"?pt(e)?[]:fn(e,this._c):[].concat(n),o],c=s[0],l=s.reduce((a,f)=>{const u=zt(e,f,r);return a.top=W(u.top,a.top),a.right=Z(u.right,a.right),a.bottom=Z(u.bottom,a.bottom),a.left=W(u.left,a.left),a},zt(e,c,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function dn(t){const{width:e,height:n}=Zt(t);return{width:e,height:n}}function pn(t,e,n){const o=I(e),r=X(e),i=n==="fixed",s=G(t,!0,i,e);let c={scrollLeft:0,scrollTop:0};const l=j(0);function a(){l.x=mt(r)}if(o||!o&&!i)if((et(e)!=="body"||rt(r))&&(c=ht(e)),o){const d=G(e,!0,i,e);l.x=d.x+e.clientLeft,l.y=d.y+e.clientTop}else r&&a();i&&!o&&r&&a();const f=r&&!o&&!i?Gt(r,c):j(0),u=s.left+c.scrollLeft-l.x-f.x,h=s.top+c.scrollTop-l.y-f.y;return{x:u,y:h,width:s.width,height:s.height}}function gt(t){return z(t).position==="static"}function Bt(t,e){if(!I(t)||z(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return X(t)===n&&(n=n.ownerDocument.body),n}function Qt(t,e){const n=H(t);if(pt(t))return n;if(!I(t)){let r=K(t);for(;r&&!Q(r);){if(_(r)&&!gt(r))return r;r=K(r)}return n}let o=Bt(t,e);for(;o&&Ue(o)&>(o);)o=Bt(o,e);return o&&Q(o)&>(o)&&!Ct(o)?n:o||Qe(t)||n}const hn=async function(t){const e=this.getOffsetParent||Qt,n=this.getDimensions,o=await n(t.floating);return{reference:pn(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function mn(t){return z(t).direction==="rtl"}const gn={convertOffsetParentRelativeRectToViewportRelativeRect:on,getDocumentElement:X,getClippingRect:un,getOffsetParent:Qt,getElementRects:hn,getClientRects:rn,getDimensions:dn,getScale:J,isElement:_,isRTL:mn};function te(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function wn(t,e){let n=null,o;const r=X(t);function i(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function s(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),i();const a=t.getBoundingClientRect(),{left:f,top:u,width:h,height:d}=a;if(c||e(),!h||!d)return;const p=st(u),m=st(r.clientWidth-(f+h)),w=st(r.clientHeight-(u+d)),g=st(f),y={rootMargin:-p+"px "+-m+"px "+-w+"px "+-g+"px",threshold:W(0,Z(1,l))||1};let x=!0;function A(R){const S=R[0].intersectionRatio;if(S!==l){if(!x)return s();S?s(!1,S):o=setTimeout(()=>{s(!1,1e-7)},1e3)}S===1&&!te(a,t.getBoundingClientRect())&&s(),x=!1}try{n=new IntersectionObserver(A,{...y,root:r.ownerDocument})}catch{n=new IntersectionObserver(A,y)}n.observe(t)}return s(!0),i}function xn(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,a=Et(t),f=r||i?[...a?ot(a):[],...ot(e)]:[];f.forEach(g=>{r&&g.addEventListener("scroll",n,{passive:!0}),i&&g.addEventListener("resize",n)});const u=a&&c?wn(a,n):null;let h=-1,d=null;s&&(d=new ResizeObserver(g=>{let[v]=g;v&&v.target===a&&d&&(d.unobserve(e),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var y;(y=d)==null||y.observe(e)})),n()}),a&&!l&&d.observe(a),d.observe(e));let p,m=l?G(t):null;l&&w();function w(){const g=G(t);m&&!te(m,g)&&n(),m=g,p=requestAnimationFrame(w)}return n(),()=>{var g;f.forEach(v=>{r&&v.removeEventListener("scroll",n),i&&v.removeEventListener("resize",n)}),u?.(),(g=d)==null||g.disconnect(),d=null,l&&cancelAnimationFrame(p)}}const yn=Ve,vn=je,bn=_e,An=Xe,Rn=ze,Vt=He,On=Ie,Sn=(t,e,n)=>{const o=new Map,r={platform:gn,...n},i={...r.platform,_c:o};return We(t,e,{...r,platform:i})};var Cn=typeof document<"u",Pn=function(){},ct=Cn?O.useLayoutEffect:Pn;function ut(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,o,r;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(o=n;o--!==0;)if(!ut(t[o],e[o]))return!1;return!0}if(r=Object.keys(t),n=r.length,n!==Object.keys(e).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(e,r[o]))return!1;for(o=n;o--!==0;){const i=r[o];if(!(i==="_owner"&&t.$$typeof)&&!ut(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function ee(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function jt(t,e){const n=ee(t);return Math.round(e*n)/n}function wt(t){const e=O.useRef(t);return ct(()=>{e.current=t}),e}function En(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:i,floating:s}={},transform:c=!0,whileElementsMounted:l,open:a}=t,[f,u]=O.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[h,d]=O.useState(o);ut(h,o)||d(o);const[p,m]=O.useState(null),[w,g]=O.useState(null),v=O.useCallback(b=>{b!==R.current&&(R.current=b,m(b))},[]),y=O.useCallback(b=>{b!==S.current&&(S.current=b,g(b))},[]),x=i||p,A=s||w,R=O.useRef(null),S=O.useRef(null),M=O.useRef(f),F=l!=null,D=wt(l),$=wt(r),k=wt(a),P=O.useCallback(()=>{if(!R.current||!S.current)return;const b={placement:e,strategy:n,middleware:h};$.current&&(b.platform=$.current),Sn(R.current,S.current,b).then(T=>{const B={...T,isPositioned:k.current!==!1};C.current&&!ut(M.current,B)&&(M.current=B,be.flushSync(()=>{u(B)}))})},[h,e,n,$,k]);ct(()=>{a===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,u(b=>({...b,isPositioned:!1})))},[a]);const C=O.useRef(!1);ct(()=>(C.current=!0,()=>{C.current=!1}),[]),ct(()=>{if(x&&(R.current=x),A&&(S.current=A),x&&A){if(D.current)return D.current(x,A,P);P()}},[x,A,P,D,F]);const N=O.useMemo(()=>({reference:R,floating:S,setReference:v,setFloating:y}),[v,y]),E=O.useMemo(()=>({reference:x,floating:A}),[x,A]),L=O.useMemo(()=>{const b={position:n,left:0,top:0};if(!E.floating)return b;const T=jt(E.floating,f.x),B=jt(E.floating,f.y);return c?{...b,transform:"translate("+T+"px, "+B+"px)",...ee(E.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:T,top:B}},[n,c,E.floating,f.x,f.y]);return O.useMemo(()=>({...f,update:P,refs:N,elements:E,floatingStyles:L}),[f,P,N,E,L])}const Ln=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:o,padding:r}=typeof t=="function"?t(n):t;return o&&e(o)?o.current!=null?Vt({element:o.current,padding:r}).fn(n):{}:o?Vt({element:o,padding:r}).fn(n):{}}}},Dn=(t,e)=>({...yn(t),options:[t,e]}),Mn=(t,e)=>({...vn(t),options:[t,e]}),Tn=(t,e)=>({...On(t),options:[t,e]}),$n=(t,e)=>({...bn(t),options:[t,e]}),kn=(t,e)=>({...An(t),options:[t,e]}),Fn=(t,e)=>({...Rn(t),options:[t,e]}),Nn=(t,e)=>({...Ln(t),options:[t,e]});var Wn="Arrow",ne=O.forwardRef((t,e)=>{const{children:n,width:o=10,height:r=5,...i}=t;return Y.jsx(At.svg,{...i,ref:e,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:Y.jsx("polygon",{points:"0,0 30,0 15,10"})})});ne.displayName=Wn;var Hn=ne,Lt="Popper",[oe,qn]=Ae(Lt),[_n,re]=oe(Lt),ie=t=>{const{__scopePopper:e,children:n}=t,[o,r]=O.useState(null);return Y.jsx(_n,{scope:e,anchor:o,onAnchorChange:r,children:n})};ie.displayName=Lt;var se="PopperAnchor",ce=O.forwardRef((t,e)=>{const{__scopePopper:n,virtualRef:o,...r}=t,i=re(se,n),s=O.useRef(null),c=It(e,s),l=O.useRef(null);return O.useEffect(()=>{const a=l.current;l.current=o?.current||s.current,a!==l.current&&i.onAnchorChange(l.current)}),o?null:Y.jsx(At.div,{...r,ref:c})});ce.displayName=se;var Dt="PopperContent",[zn,Bn]=oe(Dt),le=O.forwardRef((t,e)=>{const{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:i="center",alignOffset:s=0,arrowPadding:c=0,avoidCollisions:l=!0,collisionBoundary:a=[],collisionPadding:f=0,sticky:u="partial",hideWhenDetached:h=!1,updatePositionStrategy:d="optimized",onPlaced:p,...m}=t,w=re(Dt,n),[g,v]=O.useState(null),y=It(e,nt=>v(nt)),[x,A]=O.useState(null),R=Oe(x),S=R?.width??0,M=R?.height??0,F=o+(i!=="center"?"-"+i:""),D=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},$=Array.isArray(a)?a:[a],k=$.length>0,P={padding:D,boundary:$.filter(jn),altBoundary:k},{refs:C,floatingStyles:N,placement:E,isPositioned:L,middlewareData:b}=En({strategy:"fixed",placement:F,whileElementsMounted:(...nt)=>xn(...nt,{animationFrame:d==="always"}),elements:{reference:w.anchor},middleware:[Dn({mainAxis:r+M,alignmentAxis:s}),l&&Mn({mainAxis:!0,crossAxis:!1,limiter:u==="partial"?Tn():void 0,...P}),l&&$n({...P}),kn({...P,apply:({elements:nt,rects:Tt,availableWidth:we,availableHeight:xe})=>{const{width:ye,height:ve}=Tt.reference,it=nt.floating.style;it.setProperty("--radix-popper-available-width",`${we}px`),it.setProperty("--radix-popper-available-height",`${xe}px`),it.setProperty("--radix-popper-anchor-width",`${ye}px`),it.setProperty("--radix-popper-anchor-height",`${ve}px`)}}),x&&Nn({element:x,padding:c}),In({arrowWidth:S,arrowHeight:M}),h&&Fn({strategy:"referenceHidden",...P})]}),[T,B]=ue(E),Mt=Re(p);xt(()=>{L&&Mt?.()},[L,Mt]);const de=b.arrow?.x,pe=b.arrow?.y,he=b.arrow?.centerOffset!==0,[me,ge]=O.useState();return xt(()=>{g&&ge(window.getComputedStyle(g).zIndex)},[g]),Y.jsx("div",{ref:C.setFloating,"data-radix-popper-content-wrapper":"",style:{...N,transform:L?N.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:me,"--radix-popper-transform-origin":[b.transformOrigin?.x,b.transformOrigin?.y].join(" "),...b.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:Y.jsx(zn,{scope:n,placedSide:T,onArrowChange:A,arrowX:de,arrowY:pe,shouldHideArrow:he,children:Y.jsx(At.div,{"data-side":T,"data-align":B,...m,ref:y,style:{...m.style,animation:L?void 0:"none"}})})})});le.displayName=Dt;var ae="PopperArrow",Vn={top:"bottom",right:"left",bottom:"top",left:"right"},fe=O.forwardRef(function(e,n){const{__scopePopper:o,...r}=e,i=Bn(ae,o),s=Vn[i.placedSide];return Y.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:Y.jsx(Hn,{...r,ref:n,style:{...r.style,display:"block"}})})});fe.displayName=ae;function jn(t){return t!==null}var In=t=>({name:"transformOrigin",options:t,fn(e){const{placement:n,rects:o,middlewareData:r}=e,s=r.arrow?.centerOffset!==0,c=s?0:t.arrowWidth,l=s?0:t.arrowHeight,[a,f]=ue(n),u={start:"0%",center:"50%",end:"100%"}[f],h=(r.arrow?.x??0)+c/2,d=(r.arrow?.y??0)+l/2;let p="",m="";return a==="bottom"?(p=s?u:`${h}px`,m=`${-l}px`):a==="top"?(p=s?u:`${h}px`,m=`${o.floating.height+l}px`):a==="right"?(p=`${-l}px`,m=s?u:`${d}px`):a==="left"&&(p=`${o.floating.width+l}px`,m=s?u:`${d}px`),{data:{x:p,y:m}}}});function ue(t){const[e,n="center"]=t.split("-");return[e,n]}var Un=ie,Zn=ce,Kn=le,Gn=fe;export{Zn as A,Kn as C,Un as R,Gn as a,qn as c,Oe as u};
|
|
1
|
+
import{r as O,aF as xt,aG as be,j as Y,P as At,x as It,C as Ae}from"./index-BRu1Yhrx.js";import{a as Re}from"./index-BFcDmhr0.js";function Oe(t){const[e,n]=O.useState(void 0);return xt(()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const i=r[0];let s,c;if("borderBoxSize"in i){const l=i.borderBoxSize,a=Array.isArray(l)?l[0]:l;s=a.inlineSize,c=a.blockSize}else s=t.offsetWidth,c=t.offsetHeight;n({width:s,height:c})});return o.observe(t,{box:"border-box"}),()=>o.unobserve(t)}else n(void 0)},[t]),e}const Se=["top","right","bottom","left"],Z=Math.min,W=Math.max,lt=Math.round,st=Math.floor,j=t=>({x:t,y:t}),Ce={left:"right",right:"left",bottom:"top",top:"bottom"},Pe={start:"end",end:"start"};function yt(t,e,n){return W(t,Z(e,n))}function q(t,e){return typeof t=="function"?t(e):t}function U(t){return t.split("-")[0]}function tt(t){return t.split("-")[1]}function Rt(t){return t==="x"?"y":"x"}function Ot(t){return t==="y"?"height":"width"}const Ee=new Set(["top","bottom"]);function V(t){return Ee.has(U(t))?"y":"x"}function St(t){return Rt(V(t))}function Le(t,e,n){n===void 0&&(n=!1);const o=tt(t),r=St(t),i=Ot(r);let s=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(s=at(s)),[s,at(s)]}function De(t){const e=at(t);return[vt(t),e,vt(e)]}function vt(t){return t.replace(/start|end/g,e=>Pe[e])}const $t=["left","right"],kt=["right","left"],Me=["top","bottom"],Te=["bottom","top"];function $e(t,e,n){switch(t){case"top":case"bottom":return n?e?kt:$t:e?$t:kt;case"left":case"right":return e?Me:Te;default:return[]}}function ke(t,e,n,o){const r=tt(t);let i=$e(U(t),n==="start",o);return r&&(i=i.map(s=>s+"-"+r),e&&(i=i.concat(i.map(vt)))),i}function at(t){return t.replace(/left|right|bottom|top/g,e=>Ce[e])}function Fe(t){return{top:0,right:0,bottom:0,left:0,...t}}function Xt(t){return typeof t!="number"?Fe(t):{top:t,right:t,bottom:t,left:t}}function ft(t){const{x:e,y:n,width:o,height:r}=t;return{width:o,height:r,top:n,left:e,right:e+o,bottom:n+r,x:e,y:n}}function Ft(t,e,n){let{reference:o,floating:r}=t;const i=V(e),s=St(e),c=Ot(s),l=U(e),a=i==="y",f=o.x+o.width/2-r.width/2,u=o.y+o.height/2-r.height/2,h=o[c]/2-r[c]/2;let d;switch(l){case"top":d={x:f,y:o.y-r.height};break;case"bottom":d={x:f,y:o.y+o.height};break;case"right":d={x:o.x+o.width,y:u};break;case"left":d={x:o.x-r.width,y:u};break;default:d={x:o.x,y:o.y}}switch(tt(e)){case"start":d[s]-=h*(n&&a?-1:1);break;case"end":d[s]+=h*(n&&a?-1:1);break}return d}async function Ne(t,e){var n;e===void 0&&(e={});const{x:o,y:r,platform:i,rects:s,elements:c,strategy:l}=t,{boundary:a="clippingAncestors",rootBoundary:f="viewport",elementContext:u="floating",altBoundary:h=!1,padding:d=0}=q(e,t),p=Xt(d),w=c[h?u==="floating"?"reference":"floating":u],g=ft(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(w)))==null||n?w:w.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(c.floating)),boundary:a,rootBoundary:f,strategy:l})),v=u==="floating"?{x:o,y:r,width:s.floating.width,height:s.floating.height}:s.reference,y=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c.floating)),x=await(i.isElement==null?void 0:i.isElement(y))?await(i.getScale==null?void 0:i.getScale(y))||{x:1,y:1}:{x:1,y:1},A=ft(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:v,offsetParent:y,strategy:l}):v);return{top:(g.top-A.top+p.top)/x.y,bottom:(A.bottom-g.bottom+p.bottom)/x.y,left:(g.left-A.left+p.left)/x.x,right:(A.right-g.right+p.right)/x.x}}const We=async(t,e,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:s}=n,c=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(e));let a=await s.getElementRects({reference:t,floating:e,strategy:r}),{x:f,y:u}=Ft(a,o,l),h=o,d={},p=0;for(let w=0;w<c.length;w++){var m;const{name:g,fn:v}=c[w],{x:y,y:x,data:A,reset:R}=await v({x:f,y:u,initialPlacement:o,placement:h,strategy:r,middlewareData:d,rects:a,platform:{...s,detectOverflow:(m=s.detectOverflow)!=null?m:Ne},elements:{reference:t,floating:e}});f=y??f,u=x??u,d={...d,[g]:{...d[g],...A}},R&&p<=50&&(p++,typeof R=="object"&&(R.placement&&(h=R.placement),R.rects&&(a=R.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:r}):R.rects),{x:f,y:u}=Ft(a,h,l)),w=-1)}return{x:f,y:u,placement:h,strategy:r,middlewareData:d}},He=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:o,placement:r,rects:i,platform:s,elements:c,middlewareData:l}=e,{element:a,padding:f=0}=q(t,e)||{};if(a==null)return{};const u=Xt(f),h={x:n,y:o},d=St(r),p=Ot(d),m=await s.getDimensions(a),w=d==="y",g=w?"top":"left",v=w?"bottom":"right",y=w?"clientHeight":"clientWidth",x=i.reference[p]+i.reference[d]-h[d]-i.floating[p],A=h[d]-i.reference[d],R=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a));let S=R?R[y]:0;(!S||!await(s.isElement==null?void 0:s.isElement(R)))&&(S=c.floating[y]||i.floating[p]);const M=x/2-A/2,F=S/2-m[p]/2-1,D=Z(u[g],F),$=Z(u[v],F),k=D,P=S-m[p]-$,C=S/2-m[p]/2+M,N=yt(k,C,P),E=!l.arrow&&tt(r)!=null&&C!==N&&i.reference[p]/2-(C<k?D:$)-m[p]/2<0,L=E?C<k?C-k:C-P:0;return{[d]:h[d]+L,data:{[d]:N,centerOffset:C-N-L,...E&&{alignmentOffset:L}},reset:E}}}),_e=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:r,middlewareData:i,rects:s,initialPlacement:c,platform:l,elements:a}=e,{mainAxis:f=!0,crossAxis:u=!0,fallbackPlacements:h,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...w}=q(t,e);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const g=U(r),v=V(c),y=U(c)===c,x=await(l.isRTL==null?void 0:l.isRTL(a.floating)),A=h||(y||!m?[at(c)]:De(c)),R=p!=="none";!h&&R&&A.push(...ke(c,m,p,x));const S=[c,...A],M=await l.detectOverflow(e,w),F=[];let D=((o=i.flip)==null?void 0:o.overflows)||[];if(f&&F.push(M[g]),u){const C=Le(r,s,x);F.push(M[C[0]],M[C[1]])}if(D=[...D,{placement:r,overflows:F}],!F.every(C=>C<=0)){var $,k;const C=((($=i.flip)==null?void 0:$.index)||0)+1,N=S[C];if(N&&(!(u==="alignment"?v!==V(N):!1)||D.every(b=>V(b.placement)===v?b.overflows[0]>0:!0)))return{data:{index:C,overflows:D},reset:{placement:N}};let E=(k=D.filter(L=>L.overflows[0]<=0).sort((L,b)=>L.overflows[1]-b.overflows[1])[0])==null?void 0:k.placement;if(!E)switch(d){case"bestFit":{var P;const L=(P=D.filter(b=>{if(R){const T=V(b.placement);return T===v||T==="y"}return!0}).map(b=>[b.placement,b.overflows.filter(T=>T>0).reduce((T,B)=>T+B,0)]).sort((b,T)=>b[1]-T[1])[0])==null?void 0:P[0];L&&(E=L);break}case"initialPlacement":E=c;break}if(r!==E)return{reset:{placement:E}}}return{}}}};function Nt(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Wt(t){return Se.some(e=>t[e]>=0)}const ze=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n,platform:o}=e,{strategy:r="referenceHidden",...i}=q(t,e);switch(r){case"referenceHidden":{const s=await o.detectOverflow(e,{...i,elementContext:"reference"}),c=Nt(s,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:Wt(c)}}}case"escaped":{const s=await o.detectOverflow(e,{...i,altBoundary:!0}),c=Nt(s,n.floating);return{data:{escapedOffsets:c,escaped:Wt(c)}}}default:return{}}}}},Yt=new Set(["left","top"]);async function Be(t,e){const{placement:n,platform:o,elements:r}=t,i=await(o.isRTL==null?void 0:o.isRTL(r.floating)),s=U(n),c=tt(n),l=V(n)==="y",a=Yt.has(s)?-1:1,f=i&&l?-1:1,u=q(e,t);let{mainAxis:h,crossAxis:d,alignmentAxis:p}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return c&&typeof p=="number"&&(d=c==="end"?p*-1:p),l?{x:d*f,y:h*a}:{x:h*a,y:d*f}}const Ve=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:r,y:i,placement:s,middlewareData:c}=e,l=await Be(e,t);return s===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:r+l.x,y:i+l.y,data:{...l,placement:s}}}}},je=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:r,platform:i}=e,{mainAxis:s=!0,crossAxis:c=!1,limiter:l={fn:g=>{let{x:v,y}=g;return{x:v,y}}},...a}=q(t,e),f={x:n,y:o},u=await i.detectOverflow(e,a),h=V(U(r)),d=Rt(h);let p=f[d],m=f[h];if(s){const g=d==="y"?"top":"left",v=d==="y"?"bottom":"right",y=p+u[g],x=p-u[v];p=yt(y,p,x)}if(c){const g=h==="y"?"top":"left",v=h==="y"?"bottom":"right",y=m+u[g],x=m-u[v];m=yt(y,m,x)}const w=l.fn({...e,[d]:p,[h]:m});return{...w,data:{x:w.x-n,y:w.y-o,enabled:{[d]:s,[h]:c}}}}}},Ie=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:o,placement:r,rects:i,middlewareData:s}=e,{offset:c=0,mainAxis:l=!0,crossAxis:a=!0}=q(t,e),f={x:n,y:o},u=V(r),h=Rt(u);let d=f[h],p=f[u];const m=q(c,e),w=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const y=h==="y"?"height":"width",x=i.reference[h]-i.floating[y]+w.mainAxis,A=i.reference[h]+i.reference[y]-w.mainAxis;d<x?d=x:d>A&&(d=A)}if(a){var g,v;const y=h==="y"?"width":"height",x=Yt.has(U(r)),A=i.reference[u]-i.floating[y]+(x&&((g=s.offset)==null?void 0:g[u])||0)+(x?0:w.crossAxis),R=i.reference[u]+i.reference[y]+(x?0:((v=s.offset)==null?void 0:v[u])||0)-(x?w.crossAxis:0);p<A?p=A:p>R&&(p=R)}return{[h]:d,[u]:p}}}},Xe=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,o;const{placement:r,rects:i,platform:s,elements:c}=e,{apply:l=()=>{},...a}=q(t,e),f=await s.detectOverflow(e,a),u=U(r),h=tt(r),d=V(r)==="y",{width:p,height:m}=i.floating;let w,g;u==="top"||u==="bottom"?(w=u,g=h===(await(s.isRTL==null?void 0:s.isRTL(c.floating))?"start":"end")?"left":"right"):(g=u,w=h==="end"?"top":"bottom");const v=m-f.top-f.bottom,y=p-f.left-f.right,x=Z(m-f[w],v),A=Z(p-f[g],y),R=!e.middlewareData.shift;let S=x,M=A;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(M=y),(o=e.middlewareData.shift)!=null&&o.enabled.y&&(S=v),R&&!h){const D=W(f.left,0),$=W(f.right,0),k=W(f.top,0),P=W(f.bottom,0);d?M=p-2*(D!==0||$!==0?D+$:W(f.left,f.right)):S=m-2*(k!==0||P!==0?k+P:W(f.top,f.bottom))}await l({...e,availableWidth:M,availableHeight:S});const F=await s.getDimensions(c.floating);return p!==F.width||m!==F.height?{reset:{rects:!0}}:{}}}};function dt(){return typeof window<"u"}function et(t){return qt(t)?(t.nodeName||"").toLowerCase():"#document"}function H(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function X(t){var e;return(e=(qt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function qt(t){return dt()?t instanceof Node||t instanceof H(t).Node:!1}function _(t){return dt()?t instanceof Element||t instanceof H(t).Element:!1}function I(t){return dt()?t instanceof HTMLElement||t instanceof H(t).HTMLElement:!1}function Ht(t){return!dt()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof H(t).ShadowRoot}const Ye=new Set(["inline","contents"]);function rt(t){const{overflow:e,overflowX:n,overflowY:o,display:r}=z(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!Ye.has(r)}const qe=new Set(["table","td","th"]);function Ue(t){return qe.has(et(t))}const Ze=[":popover-open",":modal"];function pt(t){return Ze.some(e=>{try{return t.matches(e)}catch{return!1}})}const Ge=["transform","translate","scale","rotate","perspective"],Ke=["transform","translate","scale","rotate","perspective","filter"],Je=["paint","layout","strict","content"];function Ct(t){const e=Pt(),n=_(t)?z(t):t;return Ge.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||Ke.some(o=>(n.willChange||"").includes(o))||Je.some(o=>(n.contain||"").includes(o))}function Qe(t){let e=G(t);for(;I(e)&&!Q(e);){if(Ct(e))return e;if(pt(e))return null;e=G(e)}return null}function Pt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const tn=new Set(["html","body","#document"]);function Q(t){return tn.has(et(t))}function z(t){return H(t).getComputedStyle(t)}function ht(t){return _(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function G(t){if(et(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Ht(t)&&t.host||X(t);return Ht(e)?e.host:e}function Ut(t){const e=G(t);return Q(e)?t.ownerDocument?t.ownerDocument.body:t.body:I(e)&&rt(e)?e:Ut(e)}function ot(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const r=Ut(t),i=r===((o=t.ownerDocument)==null?void 0:o.body),s=H(r);if(i){const c=bt(s);return e.concat(s,s.visualViewport||[],rt(r)?r:[],c&&n?ot(c):[])}return e.concat(r,ot(r,[],n))}function bt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Zt(t){const e=z(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const r=I(t),i=r?t.offsetWidth:n,s=r?t.offsetHeight:o,c=lt(n)!==i||lt(o)!==s;return c&&(n=i,o=s),{width:n,height:o,$:c}}function Et(t){return _(t)?t:t.contextElement}function J(t){const e=Et(t);if(!I(e))return j(1);const n=e.getBoundingClientRect(),{width:o,height:r,$:i}=Zt(e);let s=(i?lt(n.width):n.width)/o,c=(i?lt(n.height):n.height)/r;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}const en=j(0);function Gt(t){const e=H(t);return!Pt()||!e.visualViewport?en:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function nn(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==H(t)?!1:e}function K(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const r=t.getBoundingClientRect(),i=Et(t);let s=j(1);e&&(o?_(o)&&(s=J(o)):s=J(t));const c=nn(i,n,o)?Gt(i):j(0);let l=(r.left+c.x)/s.x,a=(r.top+c.y)/s.y,f=r.width/s.x,u=r.height/s.y;if(i){const h=H(i),d=o&&_(o)?H(o):o;let p=h,m=bt(p);for(;m&&o&&d!==p;){const w=J(m),g=m.getBoundingClientRect(),v=z(m),y=g.left+(m.clientLeft+parseFloat(v.paddingLeft))*w.x,x=g.top+(m.clientTop+parseFloat(v.paddingTop))*w.y;l*=w.x,a*=w.y,f*=w.x,u*=w.y,l+=y,a+=x,p=H(m),m=bt(p)}}return ft({width:f,height:u,x:l,y:a})}function mt(t,e){const n=ht(t).scrollLeft;return e?e.left+n:K(X(t)).left+n}function Kt(t,e){const n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-mt(t,n),r=n.top+e.scrollTop;return{x:o,y:r}}function on(t){let{elements:e,rect:n,offsetParent:o,strategy:r}=t;const i=r==="fixed",s=X(o),c=e?pt(e.floating):!1;if(o===s||c&&i)return n;let l={scrollLeft:0,scrollTop:0},a=j(1);const f=j(0),u=I(o);if((u||!u&&!i)&&((et(o)!=="body"||rt(s))&&(l=ht(o)),I(o))){const d=K(o);a=J(o),f.x=d.x+o.clientLeft,f.y=d.y+o.clientTop}const h=s&&!u&&!i?Kt(s,l):j(0);return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-l.scrollLeft*a.x+f.x+h.x,y:n.y*a.y-l.scrollTop*a.y+f.y+h.y}}function rn(t){return Array.from(t.getClientRects())}function sn(t){const e=X(t),n=ht(t),o=t.ownerDocument.body,r=W(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),i=W(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+mt(t);const c=-n.scrollTop;return z(o).direction==="rtl"&&(s+=W(e.clientWidth,o.clientWidth)-r),{width:r,height:i,x:s,y:c}}const _t=25;function cn(t,e){const n=H(t),o=X(t),r=n.visualViewport;let i=o.clientWidth,s=o.clientHeight,c=0,l=0;if(r){i=r.width,s=r.height;const f=Pt();(!f||f&&e==="fixed")&&(c=r.offsetLeft,l=r.offsetTop)}const a=mt(o);if(a<=0){const f=o.ownerDocument,u=f.body,h=getComputedStyle(u),d=f.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,p=Math.abs(o.clientWidth-u.clientWidth-d);p<=_t&&(i-=p)}else a<=_t&&(i+=a);return{width:i,height:s,x:c,y:l}}const ln=new Set(["absolute","fixed"]);function an(t,e){const n=K(t,!0,e==="fixed"),o=n.top+t.clientTop,r=n.left+t.clientLeft,i=I(t)?J(t):j(1),s=t.clientWidth*i.x,c=t.clientHeight*i.y,l=r*i.x,a=o*i.y;return{width:s,height:c,x:l,y:a}}function zt(t,e,n){let o;if(e==="viewport")o=cn(t,n);else if(e==="document")o=sn(X(t));else if(_(e))o=an(e,n);else{const r=Gt(t);o={x:e.x-r.x,y:e.y-r.y,width:e.width,height:e.height}}return ft(o)}function Jt(t,e){const n=G(t);return n===e||!_(n)||Q(n)?!1:z(n).position==="fixed"||Jt(n,e)}function fn(t,e){const n=e.get(t);if(n)return n;let o=ot(t,[],!1).filter(c=>_(c)&&et(c)!=="body"),r=null;const i=z(t).position==="fixed";let s=i?G(t):t;for(;_(s)&&!Q(s);){const c=z(s),l=Ct(s);!l&&c.position==="fixed"&&(r=null),(i?!l&&!r:!l&&c.position==="static"&&!!r&&ln.has(r.position)||rt(s)&&!l&&Jt(t,s))?o=o.filter(f=>f!==s):r=c,s=G(s)}return e.set(t,o),o}function un(t){let{element:e,boundary:n,rootBoundary:o,strategy:r}=t;const s=[...n==="clippingAncestors"?pt(e)?[]:fn(e,this._c):[].concat(n),o],c=s[0],l=s.reduce((a,f)=>{const u=zt(e,f,r);return a.top=W(u.top,a.top),a.right=Z(u.right,a.right),a.bottom=Z(u.bottom,a.bottom),a.left=W(u.left,a.left),a},zt(e,c,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function dn(t){const{width:e,height:n}=Zt(t);return{width:e,height:n}}function pn(t,e,n){const o=I(e),r=X(e),i=n==="fixed",s=K(t,!0,i,e);let c={scrollLeft:0,scrollTop:0};const l=j(0);function a(){l.x=mt(r)}if(o||!o&&!i)if((et(e)!=="body"||rt(r))&&(c=ht(e)),o){const d=K(e,!0,i,e);l.x=d.x+e.clientLeft,l.y=d.y+e.clientTop}else r&&a();i&&!o&&r&&a();const f=r&&!o&&!i?Kt(r,c):j(0),u=s.left+c.scrollLeft-l.x-f.x,h=s.top+c.scrollTop-l.y-f.y;return{x:u,y:h,width:s.width,height:s.height}}function gt(t){return z(t).position==="static"}function Bt(t,e){if(!I(t)||z(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return X(t)===n&&(n=n.ownerDocument.body),n}function Qt(t,e){const n=H(t);if(pt(t))return n;if(!I(t)){let r=G(t);for(;r&&!Q(r);){if(_(r)&&!gt(r))return r;r=G(r)}return n}let o=Bt(t,e);for(;o&&Ue(o)&>(o);)o=Bt(o,e);return o&&Q(o)&>(o)&&!Ct(o)?n:o||Qe(t)||n}const hn=async function(t){const e=this.getOffsetParent||Qt,n=this.getDimensions,o=await n(t.floating);return{reference:pn(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function mn(t){return z(t).direction==="rtl"}const gn={convertOffsetParentRelativeRectToViewportRelativeRect:on,getDocumentElement:X,getClippingRect:un,getOffsetParent:Qt,getElementRects:hn,getClientRects:rn,getDimensions:dn,getScale:J,isElement:_,isRTL:mn};function te(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function wn(t,e){let n=null,o;const r=X(t);function i(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function s(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),i();const a=t.getBoundingClientRect(),{left:f,top:u,width:h,height:d}=a;if(c||e(),!h||!d)return;const p=st(u),m=st(r.clientWidth-(f+h)),w=st(r.clientHeight-(u+d)),g=st(f),y={rootMargin:-p+"px "+-m+"px "+-w+"px "+-g+"px",threshold:W(0,Z(1,l))||1};let x=!0;function A(R){const S=R[0].intersectionRatio;if(S!==l){if(!x)return s();S?s(!1,S):o=setTimeout(()=>{s(!1,1e-7)},1e3)}S===1&&!te(a,t.getBoundingClientRect())&&s(),x=!1}try{n=new IntersectionObserver(A,{...y,root:r.ownerDocument})}catch{n=new IntersectionObserver(A,y)}n.observe(t)}return s(!0),i}function xn(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,a=Et(t),f=r||i?[...a?ot(a):[],...ot(e)]:[];f.forEach(g=>{r&&g.addEventListener("scroll",n,{passive:!0}),i&&g.addEventListener("resize",n)});const u=a&&c?wn(a,n):null;let h=-1,d=null;s&&(d=new ResizeObserver(g=>{let[v]=g;v&&v.target===a&&d&&(d.unobserve(e),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var y;(y=d)==null||y.observe(e)})),n()}),a&&!l&&d.observe(a),d.observe(e));let p,m=l?K(t):null;l&&w();function w(){const g=K(t);m&&!te(m,g)&&n(),m=g,p=requestAnimationFrame(w)}return n(),()=>{var g;f.forEach(v=>{r&&v.removeEventListener("scroll",n),i&&v.removeEventListener("resize",n)}),u?.(),(g=d)==null||g.disconnect(),d=null,l&&cancelAnimationFrame(p)}}const yn=Ve,vn=je,bn=_e,An=Xe,Rn=ze,Vt=He,On=Ie,Sn=(t,e,n)=>{const o=new Map,r={platform:gn,...n},i={...r.platform,_c:o};return We(t,e,{...r,platform:i})};var Cn=typeof document<"u",Pn=function(){},ct=Cn?O.useLayoutEffect:Pn;function ut(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,o,r;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(o=n;o--!==0;)if(!ut(t[o],e[o]))return!1;return!0}if(r=Object.keys(t),n=r.length,n!==Object.keys(e).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(e,r[o]))return!1;for(o=n;o--!==0;){const i=r[o];if(!(i==="_owner"&&t.$$typeof)&&!ut(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function ee(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function jt(t,e){const n=ee(t);return Math.round(e*n)/n}function wt(t){const e=O.useRef(t);return ct(()=>{e.current=t}),e}function En(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:i,floating:s}={},transform:c=!0,whileElementsMounted:l,open:a}=t,[f,u]=O.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[h,d]=O.useState(o);ut(h,o)||d(o);const[p,m]=O.useState(null),[w,g]=O.useState(null),v=O.useCallback(b=>{b!==R.current&&(R.current=b,m(b))},[]),y=O.useCallback(b=>{b!==S.current&&(S.current=b,g(b))},[]),x=i||p,A=s||w,R=O.useRef(null),S=O.useRef(null),M=O.useRef(f),F=l!=null,D=wt(l),$=wt(r),k=wt(a),P=O.useCallback(()=>{if(!R.current||!S.current)return;const b={placement:e,strategy:n,middleware:h};$.current&&(b.platform=$.current),Sn(R.current,S.current,b).then(T=>{const B={...T,isPositioned:k.current!==!1};C.current&&!ut(M.current,B)&&(M.current=B,be.flushSync(()=>{u(B)}))})},[h,e,n,$,k]);ct(()=>{a===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,u(b=>({...b,isPositioned:!1})))},[a]);const C=O.useRef(!1);ct(()=>(C.current=!0,()=>{C.current=!1}),[]),ct(()=>{if(x&&(R.current=x),A&&(S.current=A),x&&A){if(D.current)return D.current(x,A,P);P()}},[x,A,P,D,F]);const N=O.useMemo(()=>({reference:R,floating:S,setReference:v,setFloating:y}),[v,y]),E=O.useMemo(()=>({reference:x,floating:A}),[x,A]),L=O.useMemo(()=>{const b={position:n,left:0,top:0};if(!E.floating)return b;const T=jt(E.floating,f.x),B=jt(E.floating,f.y);return c?{...b,transform:"translate("+T+"px, "+B+"px)",...ee(E.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:T,top:B}},[n,c,E.floating,f.x,f.y]);return O.useMemo(()=>({...f,update:P,refs:N,elements:E,floatingStyles:L}),[f,P,N,E,L])}const Ln=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:o,padding:r}=typeof t=="function"?t(n):t;return o&&e(o)?o.current!=null?Vt({element:o.current,padding:r}).fn(n):{}:o?Vt({element:o,padding:r}).fn(n):{}}}},Dn=(t,e)=>({...yn(t),options:[t,e]}),Mn=(t,e)=>({...vn(t),options:[t,e]}),Tn=(t,e)=>({...On(t),options:[t,e]}),$n=(t,e)=>({...bn(t),options:[t,e]}),kn=(t,e)=>({...An(t),options:[t,e]}),Fn=(t,e)=>({...Rn(t),options:[t,e]}),Nn=(t,e)=>({...Ln(t),options:[t,e]});var Wn="Arrow",ne=O.forwardRef((t,e)=>{const{children:n,width:o=10,height:r=5,...i}=t;return Y.jsx(At.svg,{...i,ref:e,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:Y.jsx("polygon",{points:"0,0 30,0 15,10"})})});ne.displayName=Wn;var Hn=ne,Lt="Popper",[oe,qn]=Ae(Lt),[_n,re]=oe(Lt),ie=t=>{const{__scopePopper:e,children:n}=t,[o,r]=O.useState(null);return Y.jsx(_n,{scope:e,anchor:o,onAnchorChange:r,children:n})};ie.displayName=Lt;var se="PopperAnchor",ce=O.forwardRef((t,e)=>{const{__scopePopper:n,virtualRef:o,...r}=t,i=re(se,n),s=O.useRef(null),c=It(e,s),l=O.useRef(null);return O.useEffect(()=>{const a=l.current;l.current=o?.current||s.current,a!==l.current&&i.onAnchorChange(l.current)}),o?null:Y.jsx(At.div,{...r,ref:c})});ce.displayName=se;var Dt="PopperContent",[zn,Bn]=oe(Dt),le=O.forwardRef((t,e)=>{const{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:i="center",alignOffset:s=0,arrowPadding:c=0,avoidCollisions:l=!0,collisionBoundary:a=[],collisionPadding:f=0,sticky:u="partial",hideWhenDetached:h=!1,updatePositionStrategy:d="optimized",onPlaced:p,...m}=t,w=re(Dt,n),[g,v]=O.useState(null),y=It(e,nt=>v(nt)),[x,A]=O.useState(null),R=Oe(x),S=R?.width??0,M=R?.height??0,F=o+(i!=="center"?"-"+i:""),D=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},$=Array.isArray(a)?a:[a],k=$.length>0,P={padding:D,boundary:$.filter(jn),altBoundary:k},{refs:C,floatingStyles:N,placement:E,isPositioned:L,middlewareData:b}=En({strategy:"fixed",placement:F,whileElementsMounted:(...nt)=>xn(...nt,{animationFrame:d==="always"}),elements:{reference:w.anchor},middleware:[Dn({mainAxis:r+M,alignmentAxis:s}),l&&Mn({mainAxis:!0,crossAxis:!1,limiter:u==="partial"?Tn():void 0,...P}),l&&$n({...P}),kn({...P,apply:({elements:nt,rects:Tt,availableWidth:we,availableHeight:xe})=>{const{width:ye,height:ve}=Tt.reference,it=nt.floating.style;it.setProperty("--radix-popper-available-width",`${we}px`),it.setProperty("--radix-popper-available-height",`${xe}px`),it.setProperty("--radix-popper-anchor-width",`${ye}px`),it.setProperty("--radix-popper-anchor-height",`${ve}px`)}}),x&&Nn({element:x,padding:c}),In({arrowWidth:S,arrowHeight:M}),h&&Fn({strategy:"referenceHidden",...P})]}),[T,B]=ue(E),Mt=Re(p);xt(()=>{L&&Mt?.()},[L,Mt]);const de=b.arrow?.x,pe=b.arrow?.y,he=b.arrow?.centerOffset!==0,[me,ge]=O.useState();return xt(()=>{g&&ge(window.getComputedStyle(g).zIndex)},[g]),Y.jsx("div",{ref:C.setFloating,"data-radix-popper-content-wrapper":"",style:{...N,transform:L?N.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:me,"--radix-popper-transform-origin":[b.transformOrigin?.x,b.transformOrigin?.y].join(" "),...b.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:Y.jsx(zn,{scope:n,placedSide:T,onArrowChange:A,arrowX:de,arrowY:pe,shouldHideArrow:he,children:Y.jsx(At.div,{"data-side":T,"data-align":B,...m,ref:y,style:{...m.style,animation:L?void 0:"none"}})})})});le.displayName=Dt;var ae="PopperArrow",Vn={top:"bottom",right:"left",bottom:"top",left:"right"},fe=O.forwardRef(function(e,n){const{__scopePopper:o,...r}=e,i=Bn(ae,o),s=Vn[i.placedSide];return Y.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:Y.jsx(Hn,{...r,ref:n,style:{...r.style,display:"block"}})})});fe.displayName=ae;function jn(t){return t!==null}var In=t=>({name:"transformOrigin",options:t,fn(e){const{placement:n,rects:o,middlewareData:r}=e,s=r.arrow?.centerOffset!==0,c=s?0:t.arrowWidth,l=s?0:t.arrowHeight,[a,f]=ue(n),u={start:"0%",center:"50%",end:"100%"}[f],h=(r.arrow?.x??0)+c/2,d=(r.arrow?.y??0)+l/2;let p="",m="";return a==="bottom"?(p=s?u:`${h}px`,m=`${-l}px`):a==="top"?(p=s?u:`${h}px`,m=`${o.floating.height+l}px`):a==="right"?(p=`${-l}px`,m=s?u:`${d}px`):a==="left"&&(p=`${o.floating.width+l}px`,m=s?u:`${d}px`),{data:{x:p,y:m}}}});function ue(t){const[e,n="center"]=t.split("-");return[e,n]}var Un=ie,Zn=ce,Gn=le,Kn=fe;export{Zn as A,Gn as C,Un as R,Kn as a,qn as c,Oe as u};
|