sanoma 0.11.23 → 0.11.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -1
- package/app/README.md +35 -3
- package/app/dist/api.d.ts +28 -3
- package/app/dist/api.js +20 -3
- package/app/dist/api.js.map +1 -1
- package/app/dist/client/assets/{ArrowDown.es-BVRf--PS.js → ArrowDown.es-CmCelew7.js} +1 -1
- package/app/dist/client/assets/{_id-0_Y-lz6G.js → _id-B2CwocmD.js} +1 -1
- package/app/dist/client/assets/{_id-QNnNLGx_.js → _id-Cd0g-T0m.js} +1 -1
- package/app/dist/client/assets/{_id-DFlFuBDE.js → _id-Dk4x2N-W.js} +1 -1
- package/app/dist/client/assets/{_id-3tGIwJ5T.js → _id-DpXaqFb0.js} +1 -1
- package/app/dist/client/assets/{_id-CgPVeQe8.js → _id-XHvGLPkN.js} +1 -1
- package/app/dist/client/assets/{_name-BfPXcP49.js → _name-Cy9gSmms.js} +1 -1
- package/app/dist/client/assets/_name-DKYZ1YgQ.js +1 -0
- package/app/dist/client/assets/_name-DNoZHFvr.js +1 -0
- package/app/dist/client/assets/_name-Dsy5uNfc.js +4 -0
- package/app/dist/client/assets/{_vendor-Dj7KCZ74.js → _vendor-CkX_MEw-.js} +1 -1
- package/app/dist/client/assets/{_vendor-CfHRJBG8.js → _vendor-CtXzCWko.js} +1 -1
- package/app/dist/client/assets/app-chrome-BLIfokh_.js +5 -0
- package/app/dist/client/assets/{app-scope-Z_2GE9oz.js → app-scope-DWi_J8Sd.js} +1 -1
- package/app/dist/client/assets/approval-DoWiFprg.js +1 -0
- package/app/dist/client/assets/{apps-BDsPVmMY.js → apps-QmiHwEGA.js} +1 -1
- package/app/dist/client/assets/{change-glance-D6N6Xaqu.js → change-glance-BKxlAFtS.js} +1 -1
- package/app/dist/client/assets/{changes-B6xxBiC0.js → changes-BU0TNuVs.js} +1 -1
- package/app/dist/client/assets/{changes-BS7eJI5T.js → changes-DELoHd2O.js} +1 -1
- package/app/dist/client/assets/{chat-Bw3WhRE9.js → chat-W570LGFb.js} +2 -2
- package/app/dist/client/assets/common-BNfPX6nt.js +3 -0
- package/app/dist/client/assets/{connect-BMk-KP-f.js → connect-Ctz5pmEW.js} +1 -1
- package/app/dist/client/assets/connections-B8222Op7.js +5 -0
- package/app/dist/client/assets/{connectors-CgRpyRdd.js → connectors-BE70xFaC.js} +1 -1
- package/app/dist/client/assets/{credentials-Dxpl8sUw.js → credentials-CY2BCDKD.js} +1 -1
- package/app/dist/client/assets/{data-lKkklNeo.js → data-l9hYG2QZ.js} +1 -1
- package/app/dist/client/assets/decidable-BN9ROOeu.js +1 -0
- package/app/dist/client/assets/{declaration-form-CAwox7F1.js → declaration-form-DyluX0R-.js} +1 -1
- package/app/dist/client/assets/{existing-2kDivy4p.js → existing-DgMjm5Gb.js} +1 -1
- package/app/dist/client/assets/{fence-BdtS5gi0.js → fence-B7mBhZq1.js} +1 -1
- package/app/dist/client/assets/{graph-BqVQ68hK.js → graph-CI9HJ0Fq.js} +2 -2
- package/app/dist/client/assets/{grid-diff-Jj1nTy52.js → grid-diff-ClRtSBw1.js} +1 -1
- package/app/dist/client/assets/held-card-Ith_e2pU.js +1 -0
- package/app/dist/client/assets/{highlighted-body-JLMTFACH-Co7ss_Ht.js → highlighted-body-JLMTFACH-CizP1ld1.js} +1 -1
- package/app/dist/client/assets/hosting-CoXqPSGw.js +1 -0
- package/app/dist/client/assets/{import-DhVQArmJ.js → import-DwI_C7L0.js} +1 -1
- package/app/dist/client/assets/inbox-BVmVojZD.js +1 -0
- package/app/dist/client/assets/inbox-CHDaX9y5.js +1 -0
- package/app/dist/client/assets/index-Cp944Jof.js +10 -0
- package/app/dist/client/assets/{item-vV00RYfb.js → item-CXBFegng.js} +1 -1
- package/app/dist/client/assets/{kit-BZcdh1Xm.js → kit-DxZIYy5q.js} +1 -1
- package/app/dist/client/assets/{lazyRouteComponent-C2a8bGcK.js → lazyRouteComponent-A5qFQUwF.js} +1 -1
- package/app/dist/client/assets/{markdown-bsqylRZb.js → markdown-BBLvchh4.js} +5 -5
- package/app/dist/client/assets/mermaid-WFAXDIZX-C18E3sbR.js +1 -0
- package/app/dist/client/assets/people-aMFiCP4h.js +1 -0
- package/app/dist/client/assets/{permissions-Csf87P7b.js → permissions-BYNciznY.js} +2 -2
- package/app/dist/client/assets/{permissions-grid-CzK64E29.js → permissions-grid-B_lA_2ty.js} +1 -1
- package/app/dist/client/assets/{queries-XJ-fmuYb.js → queries-sOO2EuSp.js} +1 -1
- package/app/dist/client/assets/{review-BjpH-tT4.js → review-CNimdqC2.js} +1 -1
- package/app/dist/client/assets/{route-CRwDZE-c.js → route-BQgUCUI-.js} +1 -1
- package/app/dist/client/assets/{route-CD2oErox.js → route-rcZHTxxF.js} +1 -1
- package/app/dist/client/assets/routes-uzcnBShG.js +1 -0
- package/app/dist/client/assets/{runs-table-nkQLXJxG.js → runs-table-CfvJDLfm.js} +1 -1
- package/app/dist/client/assets/{scenario-CZ7tmap7.js → scenario-W7uPU063.js} +1 -1
- package/app/dist/client/assets/{scenario-graph-W2XcWuur.js → scenario-graph-CjY0h_3M.js} +1 -1
- package/app/dist/client/assets/{sheet-P-hJsTeq.js → sheet-BTH95vFG.js} +1 -1
- package/app/dist/client/assets/{sites.index-CXcRF_R0.js → sites.index-3TQpsLus.js} +1 -1
- package/app/dist/client/assets/{start-form-6whPfUoW.js → start-form-DlZ3zoCU.js} +1 -1
- package/app/dist/client/assets/{useLoaderData-BIegJC9y.js → useLoaderData-BEdUbEde.js} +1 -1
- package/app/dist/client/assets/{who-are-you-_7OehU_o.js → who-are-you-D8N5yjZE.js} +1 -1
- package/app/dist/client/assets/workflow-Bt1NbErS.js +1 -0
- package/app/dist/client/assets/workflow-view-CBRoDqLQ.js +1 -0
- package/app/dist/client/assets/{workflows-CT9wqMl2.js → workflows-CF1eg5bA.js} +1 -1
- package/app/dist/loopback.d.ts +3 -1
- package/app/dist/loopback.js +8 -4
- package/app/dist/loopback.js.map +1 -1
- package/app/dist/server/assets/{_id-B6iAc90c.js → _id-COm1il39.js} +1 -1
- package/app/dist/server/assets/{_id-DYfvgveB.js → _id-ChjpKAh9.js} +1 -1
- package/app/dist/server/assets/{_id-BlceO2iK.js → _id-DLn-MJis.js} +1 -1
- package/app/dist/server/assets/{_id-Cc0uBuJb.js → _id-S6cZBKRd.js} +5 -5
- package/app/dist/server/assets/{_id-Dvn0wB-1.js → _id-_meozwGS.js} +8 -8
- package/app/dist/server/assets/{_name-VpcPszKf.js → _name-B-uy64Pg.js} +7 -7
- package/app/dist/server/assets/{_name-3AGcE6tj.js → _name-Bli8LVNv.js} +3 -3
- package/app/dist/server/assets/{_name-CfoydEzk.js → _name-C7E4pvya.js} +1 -1
- package/app/dist/server/assets/{_name-BIcmcEwj.js → _name-CIfg_fie.js} +8 -8
- package/app/dist/server/assets/{_tanstack-start-manifest_v-DUL7FcJk.js → _tanstack-start-manifest_v-Ngrl1Rzd.js} +78 -77
- package/app/dist/server/assets/{_vendor-Bwis2sPx.js → _vendor-CcjWwCkS.js} +1 -1
- package/app/dist/server/assets/{_vendor-DUtH-Z9W.js → _vendor-R5UJa3bN.js} +6 -6
- package/app/dist/server/assets/{actor-DAOPjcdj.js → actor-BsKC225p.js} +1 -1
- package/app/dist/server/assets/{app-chrome-B8oA4uXZ.js → app-chrome-VJfQ5Mof.js} +10 -10
- package/app/dist/server/assets/{app-scope-BxuIu0xV.js → app-scope-DQmTl_K1.js} +1 -1
- package/app/dist/server/assets/{apply-plan-CHJ_Hr71.js → apply-plan-WEi9x_3r.js} +4 -4
- package/app/dist/server/assets/{approval-DR_9mBcx.js → approval-B0b2wxUM.js} +7 -7
- package/app/dist/server/assets/{apps-CtPev5RI.js → apps-C8jD3qwc.js} +3 -3
- package/app/dist/server/assets/{change-glance-DGqh7Pxb.js → change-glance-DFnHAMy8.js} +2 -2
- package/app/dist/server/assets/{changes-C3qjEBZP.js → changes-BHaboSg4.js} +1 -1
- package/app/dist/server/assets/{changes-DfOnO87K.js → changes-_1nrzrkD.js} +6 -6
- package/app/dist/server/assets/{chat-B19X0_8f.js → chat-CjIUcz1X.js} +248 -5
- package/app/dist/server/assets/{common-JUUJLp4v.js → common-CMaicuwY.js} +4 -4
- package/app/dist/server/assets/{connect-DKu1UgY-.js → connect-D7hUXnmu.js} +6 -6
- package/app/dist/server/assets/{connections-Dyedl4qi.js → connections-DggOUl36.js} +4 -4
- package/app/dist/server/assets/{connectors-yojQH7WS.js → connectors-Cy9QQORA.js} +4 -4
- package/app/dist/server/assets/{credentials-2Z6EHitQ.js → credentials-D9I2wC5H.js} +3 -3
- package/app/dist/server/assets/{data-1padc_i_.js → data-COpRD5on.js} +5 -5
- package/app/dist/server/assets/{declaration-form-MAnn_M8g.js → declaration-form-bQ62tjfF.js} +3 -3
- package/app/dist/server/assets/{existing-BZjX_7Aa.js → existing-hVK7PMG2.js} +3 -3
- package/app/dist/server/assets/{fence-BvNu3YNO.js → fence-Bj_9g3rg.js} +1 -1
- package/app/dist/server/assets/{functions-wlvFaDkF.js → functions-BoUQY2oK.js} +95 -15
- package/app/dist/server/assets/{graph-DjANDk1P.js → graph-BTPVQSHz.js} +2 -2
- package/app/dist/server/assets/{held-card-CCEypEau.js → held-card-azTQ59Ej.js} +4 -4
- package/app/dist/server/assets/{hosting-Csr6AVC7.js → hosting-Bm9w58P_.js} +230 -49
- package/app/dist/server/assets/{import-CtPlwdIl.js → import-Du4ZsTfq.js} +5 -5
- package/app/dist/server/assets/{inbox-9-WMgjdU.js → inbox-3RrayHBo.js} +2 -2
- package/app/dist/server/assets/{inbox-BYKHV9Yh.js → inbox-BVMK6y2v.js} +9 -8
- package/app/dist/server/assets/{markdown-B9odAiMy.js → markdown-Bi6HvGoy.js} +2 -2
- package/app/dist/server/assets/{middleware-C4Wn6uHO.js → middleware-CBVxoq2y.js} +92 -7
- package/app/dist/server/assets/{people-LpcYXtEq.js → people-B_ViX4ba.js} +18 -11
- package/app/dist/server/assets/{permissions-M0kzvVVm.js → permissions-B3oXK0Mo.js} +4 -4
- package/app/dist/server/assets/{queries-BDuQsTdU.js → queries-Fn3kOI_N.js} +32 -3
- package/app/dist/server/assets/{review-BFZCPdVZ.js → review-BeYrtk4_.js} +2 -2
- package/app/dist/server/assets/{route-C3uFABee.js → route-BB2eQcP8.js} +1 -1
- package/app/dist/server/assets/{route-BJLQf4ik.js → route-MqkQm62a.js} +1 -1
- package/app/dist/server/assets/{router-Dx7Gu0CN.js → router-DYacwjCf.js} +416 -145
- package/app/dist/server/assets/{routes-iVrnGFaR.js → routes-CukD54S2.js} +6 -6
- package/app/dist/server/assets/{runs-table-g3QYggO3.js → runs-table-Bh8OZnyu.js} +3 -3
- package/app/dist/server/assets/{scenario-B5dGlEGF.js → scenario-Cy6zT6QN.js} +2 -2
- package/app/dist/server/assets/{sites.index-BNeYUQnQ.js → sites.index-G_BM9Vwq.js} +2 -2
- package/app/dist/server/assets/{start-CIKqNkKp.js → start-Dt_p0wFY.js} +2 -2
- package/app/dist/server/assets/{start-form-BXAi2lVm.js → start-form-mCkPkdmv.js} +2 -2
- package/app/dist/server/assets/{who-are-you-CavnVMGe.js → who-are-you-BmmCoQYi.js} +4 -4
- package/app/dist/server/assets/{workflow-BXhqp6S1.js → workflow-CzqmkCer.js} +2 -2
- package/app/dist/server/assets/{workflow-view-go1rbTSF.js → workflow-view-CUCXZugt.js} +10 -10
- package/app/dist/server/assets/{workflows-BCcXZtN-.js → workflows-AwuLR9Kl.js} +8 -8
- package/app/dist/server/core.d.ts +55 -2
- package/app/dist/server/core.js +82 -6
- package/app/dist/server/core.js.map +1 -1
- package/app/dist/server/go-live.d.ts +19 -2
- package/app/dist/server/go-live.js +60 -5
- package/app/dist/server/go-live.js.map +1 -1
- package/app/dist/server/sanoma-sign-in.d.ts +37 -0
- package/app/dist/server/sanoma-sign-in.js +191 -0
- package/app/dist/server/sanoma-sign-in.js.map +1 -0
- package/app/dist/server/server.js +65 -53
- package/app/dist/server/setup.d.ts +2 -1
- package/app/dist/server/setup.js +9 -1
- package/app/dist/server/setup.js.map +1 -1
- package/app/dist/steps/agent/acp.d.ts +13 -10
- package/app/dist/steps/agent/acp.js +34 -24
- package/app/dist/steps/agent/acp.js.map +1 -1
- package/app/dist/steps/connect.d.ts +2 -0
- package/app/dist/steps/connect.js +1 -1
- package/app/dist/steps/connect.js.map +1 -1
- package/app/dist/steps/go-live-cloud.d.ts +23 -0
- package/app/dist/steps/go-live-cloud.js +100 -0
- package/app/dist/steps/go-live-cloud.js.map +1 -0
- package/app/dist/steps/go-live.d.ts +5 -2
- package/app/dist/steps/go-live.js +31 -18
- package/app/dist/steps/go-live.js.map +1 -1
- package/app/dist/steps/index.js +12 -1
- package/app/dist/steps/index.js.map +1 -1
- package/app/dist/steps/writes.d.ts +6 -0
- package/app/dist/steps/writes.js +1 -1
- package/app/dist/steps/writes.js.map +1 -1
- package/app/src/api.ts +46 -3
- package/app/src/components/go-live-cloud.tsx +169 -27
- package/app/src/components/go-live.tsx +16 -5
- package/app/src/components/ledger.tsx +3 -3
- package/app/src/demo/mount.tsx +5 -2
- package/app/src/functions.ts +21 -1
- package/app/src/loopback.ts +9 -4
- package/app/src/queries.ts +26 -0
- package/app/src/routes/hosting/index.tsx +50 -14
- package/app/src/routes/hosting/sanoma/callback.ts +7 -0
- package/app/src/routes/inbox.tsx +8 -1
- package/app/src/routes/mcp.ts +26 -0
- package/app/src/routes/people.tsx +13 -4
- package/app/src/server/company-state.ts +11 -5
- package/app/src/server/core.ts +120 -4
- package/app/src/server/go-live.ts +67 -4
- package/app/src/server/mcp.ts +300 -0
- package/app/src/server/sanoma-sign-in.ts +219 -0
- package/app/src/server/setup.ts +10 -1
- package/app/src/steps/agent/acp.ts +32 -24
- package/app/src/steps/connect.ts +1 -1
- package/app/src/steps/go-live-cloud.ts +103 -0
- package/app/src/steps/go-live.ts +33 -17
- package/app/src/steps/index.ts +12 -1
- package/app/src/steps/writes.ts +1 -1
- package/dist/check.d.ts +3 -2
- package/dist/check.js +10 -4
- package/dist/check.js.map +1 -1
- package/package.json +2 -1
- package/workflows/README.md +12 -7
- package/workflows/dist/app-steps.js +18 -0
- package/workflows/dist/app-steps.js.map +1 -1
- package/workflows/dist/app-workflows.d.ts +46 -3
- package/workflows/dist/app-workflows.js +31 -4
- package/workflows/dist/app-workflows.js.map +1 -1
- package/workflows/dist/cedar.js +39 -11
- package/workflows/dist/cedar.js.map +1 -1
- package/workflows/dist/change-steps.d.ts +12 -0
- package/workflows/dist/change-steps.js +1 -1
- package/workflows/dist/change-steps.js.map +1 -1
- package/workflows/dist/client.d.ts +6 -2
- package/workflows/dist/client.js +24 -9
- package/workflows/dist/client.js.map +1 -1
- package/workflows/dist/config.js +8 -1
- package/workflows/dist/config.js.map +1 -1
- package/workflows/dist/constructors.d.ts +1 -0
- package/workflows/dist/describe.d.ts +1 -1
- package/workflows/dist/describe.js +1 -1
- package/workflows/dist/describe.js.map +1 -1
- package/workflows/dist/errors.d.ts +5 -2
- package/workflows/dist/errors.js +6 -3
- package/workflows/dist/errors.js.map +1 -1
- package/workflows/dist/host.d.ts +13 -1
- package/workflows/dist/host.js +7 -3
- package/workflows/dist/host.js.map +1 -1
- package/workflows/dist/index.d.ts +2 -2
- package/workflows/dist/index.js +2 -2
- package/workflows/dist/index.js.map +1 -1
- package/workflows/dist/page-run.d.ts +12 -4
- package/workflows/dist/page-run.js +68 -25
- package/workflows/dist/page-run.js.map +1 -1
- package/workflows/dist/person.d.ts +3 -1
- package/workflows/dist/person.js +11 -2
- package/workflows/dist/person.js.map +1 -1
- package/workflows/dist/resources.d.ts +26 -0
- package/workflows/dist/resources.js +83 -1
- package/workflows/dist/resources.js.map +1 -1
- package/workflows/dist/sandbox-contract.d.ts +11 -1
- package/workflows/dist/sandbox-contract.js +6 -0
- package/workflows/dist/sandbox-contract.js.map +1 -1
- package/workflows/dist/sandbox-runner.cjs +2 -2
- package/workflows/dist/shared.d.ts +40 -2
- package/workflows/dist/shared.js +39 -2
- package/workflows/dist/shared.js.map +1 -1
- package/workflows/dist/sites.js +13 -2
- package/workflows/dist/sites.js.map +1 -1
- package/workflows/src/app-steps.ts +17 -0
- package/workflows/src/app-workflows.ts +72 -4
- package/workflows/src/cedar.ts +48 -11
- package/workflows/src/change-steps.ts +1 -1
- package/workflows/src/client.ts +28 -7
- package/workflows/src/config.ts +8 -1
- package/workflows/src/describe.ts +10 -1
- package/workflows/src/errors.ts +6 -3
- package/workflows/src/host.ts +14 -3
- package/workflows/src/index.ts +4 -0
- package/workflows/src/page-run.ts +85 -30
- package/workflows/src/person.ts +11 -2
- package/workflows/src/resources.ts +91 -0
- package/workflows/src/sandbox-contract.ts +12 -1
- package/workflows/src/shared.ts +49 -3
- package/workflows/src/sites.ts +15 -1
- package/app/dist/client/assets/_name-6k1yqjX8.js +0 -1
- package/app/dist/client/assets/_name-B4Qba2-o.js +0 -4
- package/app/dist/client/assets/_name-CqBzHz7c.js +0 -1
- package/app/dist/client/assets/app-chrome-CFH47gLL.js +0 -5
- package/app/dist/client/assets/approval-CgksyU5L.js +0 -1
- package/app/dist/client/assets/common-DZLdx_jS.js +0 -3
- package/app/dist/client/assets/connections-TbS_jeiy.js +0 -5
- package/app/dist/client/assets/decidable-w2VGgZwN.js +0 -1
- package/app/dist/client/assets/held-card-DjBO8PTe.js +0 -1
- package/app/dist/client/assets/hosting-DC7Pftfb.js +0 -1
- package/app/dist/client/assets/inbox-5h39e_tI.js +0 -1
- package/app/dist/client/assets/inbox-CUNaP4uz.js +0 -1
- package/app/dist/client/assets/index-CA_5CFb4.js +0 -10
- package/app/dist/client/assets/mermaid-WFAXDIZX-CYMnek4e.js +0 -1
- package/app/dist/client/assets/people-Bn8GAJ3z.js +0 -1
- package/app/dist/client/assets/routes-gbZbqIhO.js +0 -1
- package/app/dist/client/assets/workflow-DSNK0oFo.js +0 -1
- package/app/dist/client/assets/workflow-view-VFD3onJL.js +0 -1
- package/app/dist/server/assets/names-B04Si-sV.js +0 -9
package/README.md
CHANGED
|
@@ -206,7 +206,7 @@ function Demo() {
|
|
|
206
206
|
|
|
207
207
|
- `mount(element, { path, exit })` resolves to the unmount. `path` is the page shown first, as the app has it (`/sites/<site>/…`, an app's site's `/sites/<app>/<site>/…`; the first site's home unless given), on a history of the demo's own: the host's URL and history never move. `exit` is called with the path a link leads to outside the sites (an app page's) instead of going there. Each mount starts from the world again. A `mount` called on an element while an earlier one there still seeds wins: the earlier renders nothing. A page may mount several demos, but `api` is one: the runtime of the last `mount` seeded and still mounted answers it. Mount at most one demo whose pages call `api`.
|
|
208
208
|
- `demo.css` holds Tailwind's theme and utilities, the kit's look and the sites' own stylesheets (a route's `import css from "../style.css?url"` too), never preflight, every rule scoped to the element (`[data-sanoma-demo]`, which `mount` sets on it). The element is the demo's document: it has the light theme's background, type and colour, and the kit's dark styles stay off, whatever the host's theme. A site's `toast` shows at the window's corner, as in the app (at a transformed element's, when one is around the demo), with the stylesheet Sonner adds to the page's head. Its rules are in Tailwind's layers, which a host's unlayered rules for `h1`, `a` or `button` win over: keep those in layers.
|
|
209
|
-
- Every approval a run asks for is approved at once, by its approver
|
|
209
|
+
- Every approval a run asks for is approved at once, by its approver. A `ctx.sleep` waits as it does in the app: a run that waits a week stays at its sleep, running, and what follows the sleep happens only once the week has passed with the page still open. The unmount drops the demo's runs and their timers. Who calls is `anonymous`. The page carries the description of the workflows it runs, their operations and the repo's collections and apps, never its policies, secrets, connections, resources or login.
|
|
210
210
|
- The build refuses, each at its file: a workflow a site calls that is defined in `sanoma.config.ts` rather than its own file under `workflows/`; a call to the app's own operations (`sanoma.*`); a collection a site reads that no data file under `resources/` exports; a vendor whose connector has no fake, or names no package (`info.package`) for the page to import it from; a world the fakes cannot take (with the world's own message); a folder holding files no demo writes; and a page that would load what only a server has (Node's modules, DBOS, `pg`, Drizzle). `sanoma/invoices/pdf` (and `@react-pdf/renderer`, when the repo installs it) is bundled for the browser, loaded when a page imports it.
|
|
211
211
|
|
|
212
212
|
### Developing a site
|
|
@@ -283,4 +283,8 @@ To try the SSH path by hand, without registering a key: `docker run --rm -e SANO
|
|
|
283
283
|
|
|
284
284
|
`sanoma identity` runs the trusted runtime or provisioning broker from explicit host configuration, without loading company files or starting a workflow worker. It creates no database or schema. See [Cloud identity deployment](workflows/CLOUD-IDENTITY.md#standalone-identity-service) for required variables, separate reader/audit roles, HTTPS ingress and readiness checks. The runtime image runs it with the command `identity` and no checkout; see [Deploying the issuers](workflows/CLOUD-IDENTITY.md#deploying-the-issuers).
|
|
285
285
|
|
|
286
|
+
### The box image
|
|
287
|
+
|
|
288
|
+
[`box/`](box/Dockerfile) is the image a person's coding agents work in on Agent37, which [its connector](../../connectors/agent37/README.md#the-box-image) makes a new box from by default: Node 26, git, pnpm (pinned as the runtime image's), and every connector's own coding agent ([`box/agents.json`](box/agents.json), held by `test/box.test.ts` to what the connectors declare) installed under `/opt/sanoma/agents/<agent>` as the app installs one in a box's home, by `pnpm add --ignore-scripts`, the vendor's `setup`, and `installed.json` the packages; they belong to root, which `node` can read and run but not change. The app runs an agent from there when its `installed.json` is the packages it wants, and installs it in the box's home otherwise. Its user is `node` and its command `sleep infinity`, since Agent37 keeps an instance up while its main process runs and starts Sanoma's runner in it by exec. Nothing of it is under `/home/node`, where Agent37 mounts the box's disk. `docker build --platform linux/amd64 -t sanoma-box packages/sanoma/box` builds it with no install of this workspace; the release pushes it as `ghcr.io/sanoma-ai/box:<version>`.
|
|
289
|
+
|
|
286
290
|
Status: early (0.x). License: FSL-1.1-ALv2.
|
package/app/README.md
CHANGED
|
@@ -232,7 +232,7 @@ An operation's call and a start send a new id each (`crypto.randomUUID()`, lette
|
|
|
232
232
|
| `code` | Status | When |
|
|
233
233
|
| ------------------ | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
234
234
|
| `invalid_input` | 400 | Nobody said who is asking, the name is no operation or workflow, the operation is not direct, or the input does not match its schema (`issues`) |
|
|
235
|
-
| `policy_denied` | 403 | The policy denied the call, or a visitor asked for a workflow's runs
|
|
235
|
+
| `policy_denied` | 403 | The policy denied the call, or a visitor asked for a workflow's runs or the description |
|
|
236
236
|
| `approval_pending` | 409 | The policy holds the call for an approval: `runId` is the run of the built-in `call` workflow that makes it once approved, in the Inbox and at `/workflows/call/runs/<runId>`; `api.call.result(runId)` waits for it |
|
|
237
237
|
| `run_running` | 409 | `.result` waited and the run has not ended (`runId`) |
|
|
238
238
|
| `record_changed` | 409 | A collection's `save` with `ifRecord` found the record changed since it was read, or gone: nothing was written; `current` is the record as it stands, when the runtime says |
|
|
@@ -259,6 +259,37 @@ async function markWon(company: string): Promise<string> {
|
|
|
259
259
|
|
|
260
260
|
`describeConfig` reads what each site calls from its pages' source, parsed and never run, since they are browser code (`readSites`, in `sanoma/workflows/describe`: the site's outline, as a workflow has one): a workflow's page and a collection's list the sites' pages that call them under **Used by**, and a call to a workflow, collection or operation the config does not have, or to an operation a page may not call directly, fails `sanoma check`. A page links there only when this build serves it. Name what a site calls in its code (`<RunForm workflow="announce" />`, `api.announce.start(…)`, `api.data.outbound.list()`): a name held in a variable or built at run time is not read, so its page is not listed.
|
|
261
261
|
|
|
262
|
+
### Agents over MCP
|
|
263
|
+
|
|
264
|
+
An AI agent such as Claude Code can use the company through `/mcp`, an MCP server over Streamable HTTP. It serves clients of MCP 2026-07-28 and 2025-era clients alike, and keeps no session. The agent acts as the person the login names, so the policy decides each call and the ledger records it as theirs. On this machine the client names the person in the `x-sanoma-actor` header. For Claude Code, an `.mcp.json` entry:
|
|
265
|
+
|
|
266
|
+
```json
|
|
267
|
+
{
|
|
268
|
+
"mcpServers": {
|
|
269
|
+
"acme": { "type": "http", "url": "http://127.0.0.1:3000/mcp", "headers": { "x-sanoma-actor": "ada" } }
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
To have the calls made by an agent on the person's behalf, declare the agent in `resources/people.ts` (`sanoma.agent({ id: "claude-code", client: "claude-code" })`, [People](https://github.com/Sanoma-AI/sanoma/blob/main/packages/sanoma/workflows/README.md#people)) and name it in the `x-sanoma-agent` header beside `x-sanoma-actor` (either may be URI-encoded): `"headers": { "x-sanoma-actor": "ada", "x-sanoma-agent": "claude-code" }`. Every tool call is then the agent's acting for Ada: the policy sees the agent, in its groups and `agents`, with `onBehalfOf` Ada (so an `@hold("on-behalf-of")` waits for her), and is asked again as Ada alone, the stricter answer standing, so the agent may do no more than she may ([People](https://github.com/Sanoma-AI/sanoma/blob/main/packages/sanoma/workflows/README.md#people)); `get_run`, the ledger, the run's trace and the Inbox say `claude-code for ada`. A name that is not a declared agent (a person's, one of the runtime's own agents', anyone undeclared), or an agent declared to act for someone else, is refused (403, `not_admitted`). Ada may approve a hold on a run her agent started for her. An agent starts none of the runtime's own workflows but `drift`, which the policy decides for it (a `forbid` on `workflow:drift` for `agents` refuses it, not Ada). Without the header, the calls are the person's, as above.
|
|
275
|
+
|
|
276
|
+
On a host, `/mcp` is behind the staff sign-in like the rest of the app, so today only a browser with a signed-in session reaches it there; the `x-sanoma-actor` header means nothing on a host, and `x-sanoma-agent` is refused there (400). An API token (`sca_…`) acts as a visitor and is refused. An ordinary MCP client cannot sign in to a hosted company yet: that needs the hosted sign-in for agents, which is not built.
|
|
277
|
+
|
|
278
|
+
It has six tools, as the person or the agent acting for them:
|
|
279
|
+
|
|
280
|
+
| Tool | What it does |
|
|
281
|
+
| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
282
|
+
| `describe` | What `sanoma.describe` answers through `POST /api/call`: each of the company's own workflows (name, api name, title, trigger, input as JSON Schema), each operation that may be called directly (id, effect, description, input and output) and each collection. It leaves out the runtime's own workflows, which no tool starts, and the policy, file paths and source, the resources' declared values, secret bindings, connections and the database's host |
|
|
283
|
+
| `lookup` | Calls an operation that may be called directly and whose effect is read; any other is `invalid_input`. A call the policy holds is `approval_pending`, with the `runId` of its run |
|
|
284
|
+
| `get_run` | A run's workflow, status, who started it, when, its approvals and its error |
|
|
285
|
+
| `wait_run` | Waits up to 20 s (`waitMs`) for the run to end: `{ runId, status: "finished", output }`, or `{ runId, status: "running" }` while it has not |
|
|
286
|
+
| `drift` | Starts the built-in drift, which reads each declared resource from its vendor and changes nothing, and answers as `wait_run` does. A company whose data files declare no resources has nothing to check: `invalid_input`, saying so |
|
|
287
|
+
| `start_run` | Starts one of the company's own workflows, by the name or api name `describe` lists, with its input: `{ runId }`. Any other name is `invalid_input`; the runtime's own workflows, such as `apply`, are not started here |
|
|
288
|
+
|
|
289
|
+
`start_run`, `drift` and `lookup` take an optional `id` (letters, digits, `_` and `-`, at most 200), as the app's own calls send one. Send a new one for each call and the same one on a retry: a start or a drift with an id it already has answers that run (the run's id is the `id`) when the workflow, input, person and agent are the same, and is refused (`invalid_input`) when they are not; a held lookup retried with its id is the same held run, so it files one approval.
|
|
290
|
+
|
|
291
|
+
`/mcp` only answers requests: a 2026-07-28 client's `subscriptions/listen` is refused at once (JSON-RPC `-32603`), since the tools never change. A refusal of a tool call is a tool error whose structured content is the error body above, with its `status`. A visitor is refused (403), as is a request from a page on another site, told by its `Sec-Fetch-Site` or `Origin` header, so a page elsewhere cannot act with this browser's name; a public site's host has no `/mcp` (404). An MCP client sends neither header and needs no CSRF token.
|
|
292
|
+
|
|
262
293
|
### Content
|
|
263
294
|
|
|
264
295
|
`content`, from `sanoma/site`, is the Markdown under the company repo's `content/`, as of the build: each folder directly under `content/` is a kind, and each `*.md` directly in it an entry, its slug the file's name. Both names are URL segments (`/^[a-z][a-z0-9-]*$/`); subfolders, `.mdx` and other files are left alone. A post, `content/posts/zapier-and-sanoma.md`, and the page that shows it:
|
|
@@ -414,7 +445,7 @@ The app reads no file while it answers: what the company's files say reaches it
|
|
|
414
445
|
|
|
415
446
|
`buildAppBundle(repo, { config, domains })` from `sanoma/app/bundle` builds the same app, every route and site, for Cloudflare's workerd (`nodejs_compat`), with the snapshot baked in, into an `AppBundle`: its main module and modules (base64), its assets with Cloudflare's hash and size, the compatibility date and flags, and the pages no call is made from of each public site with no login on one of `domains`, prerendered into the assets. The main module's default export is `fetch(request, env, ctx, host?)` (`AppBundleModule`), over `env.DATABASE` (a Hyperdrive binding, or anything with a `connectionString`), `SANOMA_HOSTNAME` (the app's own host; any other host that is no site's domain answers 404), `SANOMA_DOMAINS`, `SANOMA_SIGNING_KEY`, `SANOMA_SECRETS_KEY` and `ASSETS`; a run it queues has `host.startNow()` start the worker. A page prerendered for a domain it answers from `ASSETS` without loading the app; anything else loads the app, on the first request that needs it, with a client of each request's own, and Cedar on its first decision, over the policies `sanoma` checked at build, which it never checks again. The bundle carries only the modules its main module reaches. The bundle's config is the one `sanoma` loads: the config file's, with each workflow file's workflow and `resources/data.ts`'s collections joined to it. Each module's `import.meta.url` is its file's URL, as on Node (workerd has none), and what a connector's `vendorInfo(import.meta.url)` reads of its package is read at build.
|
|
416
447
|
|
|
417
|
-
- **Not on the Worker:** what reads the checkout or runs a child process. Adopt, a form's Save, going live, connecting a repository and a chat's turn are runs of the built-ins `adopt`, `patch`, `go-live`, `go-live-host`, `connect-existing` and `chat`, which a worker given the app's steps runs (`sanoma serve` and `sanoma worker` give them theirs); on a worker without them, the run fails saying so. The staff's sign-in and each site's login run on the Worker as on Node, each request on its own pool; the Worker's bindings give `SANOMA_SIGNING_KEY` for their keys and, for GitHub sign-in, `SANOMA_GITHUB_CLIENT_ID` and `SANOMA_GITHUB_CLIENT_SECRET` (both or neither). A login that cannot start (the key unset) is logged, and its pages answer 503.
|
|
448
|
+
- **Not on the Worker:** what reads the checkout or runs a child process. Adopt, a form's Save, going live, connecting a repository and a chat's turn are runs of the built-ins `adopt`, `patch`, `go-live`, `go-live-host`, `go-live-cloud`, `connect-existing` and `chat`, which a worker given the app's steps runs (`sanoma serve` and `sanoma worker` give them theirs); on a worker without them, the run fails saying so. The staff's sign-in and each site's login run on the Worker as on Node, each request on its own pool; the Worker's bindings give `SANOMA_SIGNING_KEY` for their keys and, for GitHub sign-in, `SANOMA_GITHUB_CLIENT_ID` and `SANOMA_GITHUB_CLIENT_SECRET` (both or neither). A login that cannot start (the key unset) is logged, and its pages answer 503.
|
|
418
449
|
- **Refused:** a site's file, or the app's own, that imports what workerd does not have (`node:fs`, `node:child_process`, …): the build throws `NodeOnlyImport`, naming the file and what it imports, which `sanoma check` reports. And a bundle that cannot answer: the build runs it on workerd and asks its `/healthz`, which loads the app as a first request does, so a module that throws as it is evaluated (one reading a file, say) fails the build with `<file>:<line> throws as the Cloudflare Worker evaluates it`, the file from the repo, or from `node_modules` for a package's, by the bundle's source map.
|
|
419
450
|
|
|
420
451
|
## Screens
|
|
@@ -456,7 +487,8 @@ A workflow's Graph and Code, and a run's graph, Ledger and Code, are one view: c
|
|
|
456
487
|
- **Apps** (`/apps`): the company's apps, with how many beside the title, in three lists, each app's name opening its page. **Yours**: the apps of its own (no source), each with its folder and what it holds (workflows, collections, sites). **Taken**: those merged from a source repository (`app.ts`'s `source`), each with its source, linked, and how many commits it is behind that source (fetched by the worker when it starts and after each push to `main`, or why it cannot tell). **Available**: the apps on GitHub not taken yet (the repositories with the topic `sanoma-app`, through the built-in `sanoma.apps.list`, called as you once the page knows who you are, so the policy decides it and GitHub never holds up the rest of the page), Sanoma's own first, each with its tier (Official, Vendor verified or Community, from Sanoma's claims, `sanoma/claims`), whether Sanoma reviewed it, its description and license, its README, a solution's demo (**Try it**) and **Add**. **New app**, **Add** and **Update** open the chat with a prompt for the agent ("Make an app that ", "Take the app from <url> into this company with take_app, …", "Update the app in apps/<name>/ from its source with update_app, …"), which drafts the change on a branch of its own; when GitHub cannot be searched, a notice says why and the repo's apps show all the same. **An app** (`/apps/<name>`) is its parts in one card: its header has, for a taken app, how far behind its source it is, **Source** and **Update**; then a line saying where it lives, and a section each for its **Sites** (its pages, what they call, who sees them), **Collections** (key and fields, opening the grid), **Workflows** (the operations each may call with their effects, its last run, its runs), **Policies** (each file under its `policies/`, how many rules and their reasons, to the Permissions grid) and **Scenarios** (each feature file under it, how many scenarios, of which workflows). People never sit in an app: they are declared at the root, on People.
|
|
457
488
|
- **Connectors**: each vendor the config's operations are from, by title, with its logo and id (never the built-in `sanoma` and `data`, which call nothing outside: a workflow's vendors and New run's "Calls … for real" leave them out too), how many operations it has and how many workflows use it, and, when its drivers declare environment variables, whether it is configured or how many variables it needs, each linking to its page, under Installed, with its tier (Official for an `@sanoma-ai/` package, else Community). Under Available, the connector packages on npm that the config does not install, found by the `sanoma-connector` keyword and shown by the `sanoma` field of each one's latest version (title, and logo files the server reads from jsDelivr and checks as an installed connector's are, shown as images only), with its tier, description and version; nothing is stored, and npm is read at most every 10 minutes. Choosing one opens the steps to add it (`?add=<package>`): `pnpm add`, the import in `sanoma.config.ts`, then its credentials; there is no install button. When npm cannot be reached, a notice says only the installed connectors show.
|
|
458
489
|
- **Connector** (`/connectors/<vendor>`): its [named connections](#connection-management), plus links to its connector's npm package and source (from `defineConnector`'s `package` and `homepage`, when it gives them), its resource types, and each operation with its effect, whether it is safe to retry, its description, its contract (input and output as JSON Schema), its scenario `phrases`, the scenarios with a step about it (each marked as seeding it, making it fail, expecting it or saying it must not be called, and linking to its workflow's New run in Sandbox mode with it chosen), and the workflows that may call it; a feature file that cannot be read says why above the operations, as on a workflow's page. A vendor with workflow operations whose connector attaches no fake (its `VendorEntry`'s `fake`) says "Its connector attaches no fake" once, above its operations; one with only a resource type's `read` and `import` needs none, since those read real state and a sandbox run never calls them.
|
|
459
|
-
- **Go live** (on `/hosting` while the company is Local, and `/hosting/connect`). On top of Hosting, a panel by the company's state, the host's health asked once as the page opens (not as a link to it is hovered, nor as the window regains focus; every few seconds while going live, and until a host just bound answers), with at most one ask every ten seconds: while Local, **Ready to go live** when `resources/sanoma/infra.ts` declares Sanoma Cloud (
|
|
490
|
+
- **Go live** (on `/hosting` while the company is Local, and `/hosting/connect`). On top of Hosting, a panel by the company's state, the host's health asked once as the page opens (not as a link to it is hovered, nor as the window regains focus; every few seconds while going live, and until a host just bound answers), with at most one ask every ten seconds: while Local, **Ready to go live** when `resources/sanoma/infra.ts` declares Sanoma Cloud (below), else the steps; **Going live** with its lines (repository, database, host, sign-in) and its run; **Go live failed** with the run's error, **Retry** and **Ask the agent** (on Sanoma Cloud, Retry is Ready to go live's Go live again; on your own accounts, **Back to the steps** too); **Live** with whether the host answers, on this computer that this is a drafting copy and, once the host answers, **Open, signed in as <your email>** (below), and on the hosted instance **Open on your Mac** (the desktop app, opening the company's repository). The steps' first, **Connect**, connects the company's GitHub and the vendors of its database, host and wakeup. When how far going live is cannot be read, its steps say why in their place, with Try again, and the rest of Hosting shows as ever. **Create GitHub App** (with an organization's login, or empty for your personal account) goes to `/setup/github/manifest`, a page that posts the App's manifest to GitHub (administration, contents, pull requests and commit statuses: write; push and pull request events, its webhook at the app's `/webhooks/github`, on unless the app is on this machine; its OAuth callback the staff sign-in's `/auth/better-auth/callback/github`, and email addresses: read, for the verified email), with its state and who asked in a signed, httpOnly cookie (nobody signed in is sent back here, told to say who they are first). You name and create the App on GitHub's page; GitHub sends you back to `/setup/github/callback`, which checks the state, exchanges the code (`POST /app-manifests/{code}/conversions`) and writes the App's id, slug, client id and secret, webhook secret and private key through the selected store as who asked (`SANOMA_GITHUB_APP_ID`, `SANOMA_GITHUB_APP_SLUG`, `SANOMA_GITHUB_CLIENT_ID`, `SANOMA_GITHUB_CLIENT_SECRET`, `SANOMA_GITHUB_WEBHOOK_SECRET`, `SANOMA_GITHUB_APP_PEM`), then comes back here saying how it went (sign-in uses the new client once the app restarts on a host beyond this machine). Step 1 ends with **Sign-in**, how people will sign in on the host (ready, or invite links only): you, signed in from this machine when the host starts (or, while the people file declares no email for you, to declare one), an email code through the config's `login.sender` once its connector is connected, GitHub through the company's App once its client is stored (and, when the App lacks the permission to read email addresses, which a sign-in with a private GitHub email needs, that Connect says what to add), and invite links always. While the email code is not ready, it has a `warning · not blocking` badge and the ways to fix it: name a sender in `sanoma.config.ts`, or connect the one named on Hosting › Connect, and, without GitHub, connect the GitHub App. A sender whose connector Connect does not list gets a row of its own there. When the config names a sender, going live gives the host its driver's variables among the host's `secrets` (`RESEND_API_KEY`; the address it sends from is the config's `login.from`). Once the host answers, **Open, signed in as <your email>** asks the host for an invite for the email the people file declares for you, sealed with the signing key it shares (the host's own, `SANOMA_HOST_SIGNING_KEY`, when the config binds none), and opens it. The page then shows the App's slug with **Install**, and, from GitHub's listing of the App, read as the App with its stored keys (at most every ten minutes, two seconds allowed), the permissions the manifest asks for that it lacks, as an App made before the manifest asked for them, or by hand, may: set them in the App's settings under Permissions & events, then accept the update on its installation. Vendors with named authentication use the same connection forms as their connector pages, instead of the old per-vendor token controls. Going live requires an explicitly declared default account that is connected; a sole connected account does not become a default automatically. Other bootstrap inputs, including the wakeup service's URL and account token, remain separate. Going live chooses by contract among the config's types whose vendor is connected (for the database and the host, a vendor this page does not connect counts as connected; the page names the vendors still to connect, and refuses a database or host other than the one it showed): the database (Neon's project first, else the first type that meets the `Database` contract, with its regions, which it holds the choice to, and size), the host (Cloudflare's container once its required connection is ready, else Docker's, else the first host; any host but Docker runs `ghcr.io/sanoma-ai/runtime:<the sanoma version the company installs>`, which Cloudflare copies into its account's registry at apply) and the wakeup (a connected one that wakes that host, the host's own vendor's first: Cloudflare's alarm before `sanoma.wakeup`). The repository is private, so going live also makes a new deploy key, its private half stored as the host's `SANOMA_SOURCE_KEY` (among its `secrets`, never shown) and its public half declared after the repository as a read-only `github.repository_deploy_key`, which the apply that makes the repository adds to it, and the host's apply waits for (a file written before deploy keys, or by **Connect an existing repository**, declares none, and its host clones as before); a GitHub connector with no such type is named among what is missing before anything is written. Every start of the host clones with it ([Cloning a private repository](../README.md#cloning-a-private-repository)). When the config declares a host type, the page also offers **Connect a wakeup service**, for scale to zero: the [wakeup service](../README.md#the-wakeup-service)'s URL, `SANOMA_WAKEUP_URL` (Sanoma's, or your own `sanoma wakeup`), and an account's token there, `SANOMA_WAKEUP_ACCOUNT_TOKEN`, both optional. Storing the account's token also mints the instance's own, `SANOMA_WAKEUP_TOKEN`, unless one is stored, and never shows it. With both stored and no wakeup of the host's own vendor connected, going live writes the runtime's own wakeup (`export const wakeup = sanoma.wakeup({ host })`, imported from `sanoma/resources`) into `resources/sanoma/infra.ts` after the host, mints `SANOMA_WAKEUP_TOKEN` when none is stored, and gives the host it (and `SANOMA_WAKEUP_URL`, for `sanoma.wakeup`) among its `secrets`, so the one apply of the host and the wakeup gives the worker on the host what it registers with; removing the line and answering its orphaned binding **delete** on Hosting deletes the instance.
|
|
491
|
+
- **Ready to go live** (on `/hosting`, on this computer, while `resources/sanoma/infra.ts` declares Sanoma Cloud and nothing of it is made, as a new company's template does). The company's **Address**, `<address>.sanoma.work`, which is also its repository's name: the one the file declares, which you can change until its database is made; once you are signed in to Sanoma, it is checked at the Cloud (available, yours already, or taken). **Go live** signs you in to Sanoma first when this app has no Cloud token: it opens www.sanoma.work's sign-in in your browser, where you sign in and allow it, and the browser comes back to `/hosting/sanoma/callback` on this app, which stores the token (`SANOMA_CLOUD_TOKEN`) and says you can go back to the app; the app goes live once it sees the token. A sign-in lasts ten minutes and works once. Then going live (the built-in `go-live-cloud`) writes a changed address into the file and commits it, has the Cloud make the company's repository in your GitHub account (through the Sanoma.work GitHub App), sets it as `origin` and pushes `main` with git's own sign-in, then makes the database and the host and waits for them. **Paste a Cloud token** stores one from your account at sanoma.work instead (Hosting › Connect, only a token that starts with `sca_`), and **Use your own accounts instead…** shows going live's steps (`?own`): going live there writes the file again. A Cloud token set in the company's `.env` is used as it is; the app cannot replace it. Once the host answers, **Open, signed in as <your email>** asks Sanoma Cloud for the sign-in link.
|
|
460
492
|
- **Connect an existing repository or database** (`/hosting/existing`, linked from the connect page): takes a GitHub repository (`owner/name`, its owner required) and/or a Supabase project's ref, reads each through its type's import (in the worker, as a `connect-existing` run, before any declaration names it; apply's own import, when it binds, is in the ledger), and writes `resources/sanoma/infra.ts` from what was read: the repository's owner, name, description and visibility; the project's name, organization and region, with its database password declared as a generated secret, which Supabase never reads back, so the next apply that changes the project sets a new one. In a repository without a remote, the file is committed where the checkout is; with one, on a new branch, `setup/connect-existing`, checked out, and the page shows the diff: merging it is the approval. Then the run starts apply as its child with `bind` and `only` for those declarations, which binds them in the lockfile (committed on the same branch) and creates nothing. Refused when `infra.ts` or the branch is there already.
|
|
461
493
|
|
|
462
494
|
Named authentication uses the connection forms below. A connector that still declares only an `env` schema retains its separate credential fields; those are not account selectors. Named connections never gain an environment-first fallback or process-wide credential swapping.
|
package/app/dist/api.d.ts
CHANGED
|
@@ -15,6 +15,11 @@ import { z } from "zod";
|
|
|
15
15
|
* every server function call, which the default loopback login reads.
|
|
16
16
|
*/
|
|
17
17
|
export declare const ACTOR_HEADER = "x-sanoma-actor";
|
|
18
|
+
/**
|
|
19
|
+
* The declared agent (`sanoma.agent`) a call is made by, on behalf of the person the login names:
|
|
20
|
+
* read on the loopback login alone (`actingFor`), refused on a host, whose sign-in says who acts.
|
|
21
|
+
*/
|
|
22
|
+
export declare const AGENT_HEADER = "x-sanoma-agent";
|
|
18
23
|
/**
|
|
19
24
|
* The same name, kept in a cookie by the page as well (URI-encoded), so the loopback login knows
|
|
20
25
|
* who is asking while the server renders a page, whose loader may call `api`. The header wins.
|
|
@@ -798,8 +803,10 @@ export interface HostDerived {
|
|
|
798
803
|
}
|
|
799
804
|
/** How far going live is (`getGoLiveProgress`): told from the files, the lockfile and the runs, so a reload picks it up. */
|
|
800
805
|
export interface GoLiveProgress {
|
|
801
|
-
/** `resources/sanoma/infra.ts`, once written. */
|
|
806
|
+
/** `resources/sanoma/infra.ts`, once written; none while it declares Sanoma Cloud with nothing bound, which going live replaces (`replaces`). */
|
|
802
807
|
infra: string | null;
|
|
808
|
+
/** `infra.ts` declares Sanoma Cloud with nothing bound: going live on the company's own accounts writes it again. */
|
|
809
|
+
replaces: boolean;
|
|
803
810
|
/** What the first apply makes, of what `infra.ts` declares: the repository, its deploy key and the database. */
|
|
804
811
|
beforeHost: string[];
|
|
805
812
|
/** Whether those are all bound in the lockfile, and whether the host is. */
|
|
@@ -846,6 +853,24 @@ export interface CompanyState {
|
|
|
846
853
|
healthy?: boolean;
|
|
847
854
|
} | null;
|
|
848
855
|
}
|
|
856
|
+
/** Signed in to Sanoma or not (`getSanomaSignIn`): never the token. */
|
|
857
|
+
export interface SanomaSignIn {
|
|
858
|
+
/** A Cloud token (`sca_…`) is stored. */
|
|
859
|
+
signedIn: boolean;
|
|
860
|
+
/** A sign-in was started and has not come back nor expired: the page asks again every 2 s. */
|
|
861
|
+
pending: boolean;
|
|
862
|
+
/** Where the stored value is: the app's store, or this company's environment (`.env`), which the app cannot change. */
|
|
863
|
+
source?: "stored" | "environment";
|
|
864
|
+
setBy?: string;
|
|
865
|
+
setAt?: string;
|
|
866
|
+
}
|
|
867
|
+
/** An address at Sanoma Cloud as the pages take it: a slug (`CLOUD_SLUG`). */
|
|
868
|
+
export declare const CloudSlug: z.ZodString;
|
|
869
|
+
/** Whether an address at Sanoma Cloud can be the company's (`getCloudAddress`): free, its account's own, or someone else's. */
|
|
870
|
+
export interface CloudAddress {
|
|
871
|
+
slug: string;
|
|
872
|
+
status: "available" | "yours" | "taken";
|
|
873
|
+
}
|
|
849
874
|
/** Home's setup card, in its order: each step ticked from facts (`setupProgress`). */
|
|
850
875
|
export declare const SETUP_STEPS: readonly ["start", "agent", "try", "teammate", "online"];
|
|
851
876
|
export type SetupStep = (typeof SETUP_STEPS)[number];
|
|
@@ -1164,7 +1189,7 @@ export declare function asApiError(err: unknown): ApiError;
|
|
|
1164
1189
|
export declare function runFailure(run: Pick<RunSummary, "runId" | "status" | "error">, err: unknown): ApiError;
|
|
1165
1190
|
/** A run's short name, for a title: "Run" and its id's first 8 characters (a UUID's first group). */
|
|
1166
1191
|
export declare const runName: (runId: string) => string;
|
|
1167
|
-
/** Who started a run, as text. */
|
|
1168
|
-
export declare const starterName: (
|
|
1192
|
+
/** Who started a run, as text: "claude-code for ada" for an agent acting for someone. */
|
|
1193
|
+
export declare const starterName: ({ startedBy }: Pick<RunSummary, "startedBy">) => string;
|
|
1169
1194
|
/** A run's approvals still waiting for a decision. */
|
|
1170
1195
|
export declare const pendingApprovals: (run: Pick<RunSummary, "approvals">) => ApprovalState[];
|
package/app/dist/api.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ConfigDescriptionSchema } from "sanoma/workflows/description";
|
|
2
|
-
import { COMMIT_ID, DRAFT_ID, EFFECTS, errorCode, errorMessage, RUN_STATUSES, vendorCodeOf, } from "sanoma/workflows/shared";
|
|
2
|
+
import { CLOUD_SLUG, CLOUD_SLUG_RULE, COMMIT_ID, DRAFT_ID, EFFECTS, errorCode, errorMessage, RUN_STATUSES, vendorCodeOf, } from "sanoma/workflows/shared";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { ColumnChange } from "./components/grid/plan.js";
|
|
5
5
|
/**
|
|
@@ -14,6 +14,11 @@ import { ColumnChange } from "./components/grid/plan.js";
|
|
|
14
14
|
* every server function call, which the default loopback login reads.
|
|
15
15
|
*/
|
|
16
16
|
export const ACTOR_HEADER = "x-sanoma-actor";
|
|
17
|
+
/**
|
|
18
|
+
* The declared agent (`sanoma.agent`) a call is made by, on behalf of the person the login names:
|
|
19
|
+
* read on the loopback login alone (`actingFor`), refused on a host, whose sign-in says who acts.
|
|
20
|
+
*/
|
|
21
|
+
export const AGENT_HEADER = "x-sanoma-agent";
|
|
17
22
|
/**
|
|
18
23
|
* The same name, kept in a cookie by the page as well (URI-encoded), so the loopback login knows
|
|
19
24
|
* who is asking while the server renders a page, whose loader may call `api`. The header wins.
|
|
@@ -186,6 +191,12 @@ export const SETUP_VENDORS = [
|
|
|
186
191
|
tokens: ["AGENT37_API_KEY"],
|
|
187
192
|
about: "Optional: an API key, so that coding agents work for the live company in a box of their own at Agent37. Connect it before choosing where the company goes, which declares the box.",
|
|
188
193
|
},
|
|
194
|
+
{
|
|
195
|
+
vendor: "cloud",
|
|
196
|
+
title: "Sanoma Cloud",
|
|
197
|
+
tokens: ["SANOMA_CLOUD_TOKEN"],
|
|
198
|
+
about: "A Cloud token (sca_…), so the company goes live on Sanoma Cloud. Signing in to Sanoma on Hosting stores one; paste one from your account at sanoma.work instead.",
|
|
199
|
+
},
|
|
189
200
|
{
|
|
190
201
|
vendor: "sanoma",
|
|
191
202
|
title: "Wakeup service",
|
|
@@ -213,6 +224,8 @@ export const DECLARE_BOX = `Coding agents work in a box of their own on a live i
|
|
|
213
224
|
export const noWakeup = (hostType, wakes) => `No connected wakeup wakes a ${hostType}${wakes ? ` (${wakes})` : ""}: going live declares none, and the host stays up`;
|
|
214
225
|
/** What going live makes, in its order: the progress list's lines. */
|
|
215
226
|
export const GO_LIVE_LINES = ["repository", "database", "host", "signIn"];
|
|
227
|
+
/** An address at Sanoma Cloud as the pages take it: a slug (`CLOUD_SLUG`). */
|
|
228
|
+
export const CloudSlug = z.string().regex(CLOUD_SLUG, `An address is ${CLOUD_SLUG_RULE}`);
|
|
216
229
|
/** Home's setup card, in its order: each step ticked from facts (`setupProgress`). */
|
|
217
230
|
export const SETUP_STEPS = ["start", "agent", "try", "teammate", "online"];
|
|
218
231
|
/** Said at the top of `infra.ts` when it declares an existing database, and on the page. */
|
|
@@ -375,8 +388,12 @@ export function runFailure(run, err) {
|
|
|
375
388
|
}
|
|
376
389
|
/** A run's short name, for a title: "Run" and its id's first 8 characters (a UUID's first group). */
|
|
377
390
|
export const runName = (runId) => `Run ${runId.slice(runId.lastIndexOf(":") + 1).slice(0, 8)}`;
|
|
378
|
-
/** Who started a run, as text. */
|
|
379
|
-
export const starterName = (
|
|
391
|
+
/** Who started a run, as text: "claude-code for ada" for an agent acting for someone. */
|
|
392
|
+
export const starterName = ({ startedBy }) => startedBy === undefined
|
|
393
|
+
? "unknown"
|
|
394
|
+
: startedBy.onBehalfOf === undefined
|
|
395
|
+
? startedBy.id
|
|
396
|
+
: `${startedBy.id} for ${startedBy.onBehalfOf}`;
|
|
380
397
|
/** A run's approvals still waiting for a decision. */
|
|
381
398
|
export const pendingApprovals = (run) => run.approvals.filter((a) => a.status === "pending");
|
|
382
399
|
//# sourceMappingURL=api.js.map
|
package/app/dist/api.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.js","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAEvE,OAAO,EACL,SAAS,EACT,QAAQ,EACR,OAAO,EACP,SAAS,EACT,YAAY,EACZ,YAAY,EAEZ,YAAY,GACb,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEzD;;;;;;GAMG;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,gBAAgB,CAAC;AAE7C;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,cAAc,CAAC;AAE3C,8FAA8F;AAC9F,MAAM,CAAC,MAAM,SAAS,GAAG,cAAc,CAAC;AAExC,MAAM,WAAW,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC,CAAC;AAItD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,uBAAuB,CAAC,MAAM,CAAC;IAC5D,KAAK,EAAE,WAAW;IAClB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC;CACpF,CAAC,CAAC;AAkBH,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,MAAM,EA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"./common-DZLdx_jS.js";import{C as c,E as l,S as u,T as d,V as f,b as p,w as m,x as h,y as g}from"./kit-BZcdh1Xm.js";import{A as _,C as v,Ct as y,Dt as b,Et as x,Ft as S,H as C,Ht as w,J as T,Kt as E,L as D,Lt as ee,Mt as O,N as k,Nt as A,Ot as j,Q as te,Qt as ne,R as M,S as re,St as N,T as P,U as F,Wt as I,X as L,Y as R,Z as ie,Zt as ae,_ as z,a as B,an as V,at as H,b as U,bt as W,c as oe,cn as G,ct as se,d as ce,et as le,f as ue,g as de,gn as K,hn as q,i as fe,j as pe,jt as me,kt as he,lt as ge,mn as _e,mt as ve,n as ye,nn as be,nt as J,o as xe,p as Se,pn as Ce,pt as we,q as Te,r as Ee,rn as De,sn as Oe,t as ke,tn as Ae,tt as je,u as Me,v as Ne,w as Pe,wt as Fe,x as Ie,xt as Le,y as Re,zt as ze}from"./store-BT988jIX.js";import{M as Be,N as Ve,O as He,V as Ue,_ as Y,c as We,d as Ge,f as Ke,g as qe,h as X,i as Je,k as Ye,m as Xe,o as Ze,r as Qe,s as $e,u as et,v as Z,y as tt}from"./button-D5kdANef.js";import{t as nt}from"./utils-BRvE9-Fo.js";import{t as rt}from"./Separator-Cu9cQDBN.js";import{a as it,p as at}from"./composite-CoGyvQjv.js";import{a as ot,d as st,f as ct,r as lt}from"./DialogTitle-5oboyLiq.js";import{r as ut,t as dt}from"./useOpenInteractionType-UhakpAXY.js";import{t as ft}from"./Check.es-b7BdqO2s.js";var Q=n(e(),1);function pt(e){return he&&e.movementX===0&&e.movementY===0}function mt(e,t,n){switch(e){case`vertical`:return t;case`horizontal`:return n;default:return t||n}}function ht(e,t){return mt(t,e===`ArrowUp`||e===`ArrowDown`,e===`ArrowLeft`||e===`ArrowRight`)}function gt(e,t,n){return mt(t,e===`ArrowDown`,n?e===`ArrowLeft`:e===`ArrowRight`)||e===`Enter`||e===` `||e===``}function _t(e,t,n){return mt(t,n?e===Le:e===N,e===W)}function vt(e,t,n,r){return t===`both`||t===`horizontal`&&r?e===`Escape`:mt(t,n?e===N:e===Le,e===y)}function yt(e,t){let{listRef:n,activeIndex:r,onNavigate:i=()=>{},enabled:a=!0,selectedIndex:o=null,allowEscape:s=!1,loopFocus:c=!1,nested:l=!1,rtl:u=!1,virtual:d=!1,focusItemOnOpen:f=`auto`,focusItemOnHover:p=!0,openOnArrowKeyDown:m=!0,disabledIndices:h=void 0,orientation:g=`vertical`,triggerOrientation:_=g,parentOrientation:y,id:C,resetOnPointerLeave:w=!0,externalTree:E,nestedReturnFocusRef:D,grid:ee}=t,O=ee!=null,k=e.useState(`open`),A=e.useState(`floatingElement`),j=e.useState(`domReferenceElement`),te=e.context.dataRef,ne=H(A),M=se(j),N=S(ne),P=re(),F=v(E),L=Q.useRef(f),z=Q.useRef(o??-1),B=Q.useRef(null),V=Q.useRef(!0),U=Z(e=>{i(z.current===-1?null:z.current,e)}),W=Q.useRef(!!A),oe=Q.useRef(k),G=Q.useRef(!1),ce=Q.useRef(!1),ue=Q.useRef(null),de=S(h),q=S(k),fe=S(o),pe=S(w),me=I(),he=I(),_e=Z(()=>{me.cancel();function e(e){d||(ue.current=ct(e,{sync:G.current,preventScroll:!0}))}let t=n.current[z.current],r=ce.current;t&&e(t),(G.current?e=>e():e=>me.request(e))(()=>{let i=n.current[z.current]||t;i&&(t||e(i),we&&(r||!V.current)&&i.scrollIntoView?.({block:`nearest`,inline:`nearest`}))})});Y(()=>{te.current.orientation=g},[te,g]),Y(()=>{k||(B.current=null),k&&f===`auto`||(L.current=f)},[k,f]),Y(()=>{a&&(k&&A?(z.current=o??-1,L.current&&o!=null&&(ce.current=!0,U())):W.current&&(z.current=-1,U()))},[a,k,A,o,U]),Y(()=>{if(a){if(!k)G.current=!1;else if(A){if(r==null){if(G.current=!1,fe.current!=null)return;if(W.current&&(z.current=-1,_e()),(!oe.current||!W.current)&&L.current&&(B.current!=null||L.current===!0&&B.current==null)){let e=0,t=()=>{n.current[0]==null?(e<2&&(e?e=>he.request(e):queueMicrotask)(t),e+=1):(z.current=B.current==null||gt(B.current,_,u)||l?T(n):Te(n),B.current=null,U())};t()}}else ie(n.current,r)||(z.current=r,_e(),ce.current=!1)}}},[a,k,A,r,fe,l,n,_,u,U,_e,he]),Y(()=>{if(!a||A||!F||d||!W.current)return;let e=F.nodesRef.current,t=e.find(e=>e.id===P)?.context?.elements.floating,n=Fe(K(j??t??null)),r=e.some(e=>e.context&&x(e.context.elements.floating,n));t&&!r&&V.current&&t.focus({preventScroll:!0})},[a,A,j,F,P,d]),Y(()=>{oe.current=k,W.current=!!A});let ve=r!=null,ye=Z(e=>{if(!q.current)return;let t=n.current.indexOf(e.currentTarget);t!==-1&&(z.current!==t||r!==t)&&(z.current=t,U(e))}),be=Z(()=>y??F?.nodesRef.current.find(e=>e.id===P)?.context?.dataRef?.current.orientation),xe=Z(()=>T(n,de.current)),Se=Z(t=>{if(V.current=!1,G.current=!0,t.which===229||!q.current&&t.currentTarget===N.current)return;if(l&&vt(t.key,g,u,O)){ht(t.key,be())||J(t),e.setOpen(!1,Ce(De,t.nativeEvent));let n=D?.current??j;Be(n)&&n.focus();return}r!=null&&r!==z.current&&!ie(n.current,r)&&(z.current=r);let i=z.current,a=T(n,h),o=Te(n,h);if(M||(t.key===`Home`&&(J(t),z.current=a,U(t)),t.key===`End`&&(J(t),z.current=o,U(t))),ee!=null){let e=ee(t,z.current,n,g,c,u,h,a,o);if(e!=null&&e!==z.current&&(z.current=e,U(t)),g===`both`)return}if(ht(t.key,g)){J(t);let e=Fe(t.currentTarget.ownerDocument);if(k&&!d&&x(t.currentTarget,e)&&!n.current.some(t=>t!=null&&x(t,e))){z.current=gt(t.key,g,u)?a:o,U(t),r===z.current&&_e();return}let{index:l,wrapped:f}=R(n.current,i,{decrement:!gt(t.key,g,u),loopFocus:c,allowEscape:s,disabledIndices:h,minIndex:a,maxIndex:o});f&&(G.current=!1),z.current=l,U(t)}}),we=Q.useMemo(()=>({onFocus(e){G.current=!0,ye(e)},onClick({currentTarget:e}){d||e.focus({preventScroll:!0})},onMouseMove(e){pt(e)||(G.current=!0,ce.current=!1,p&&ye(e))},onPointerLeave(e){if(!q.current||!V.current||e.pointerType===`touch`)return;G.current=!0;let t=e.relatedTarget;if(p&&!n.current.includes(t)&&pe.current&&(ue.current?.(),ue.current=null,z.current=-1,U(e),!d)){let e=N.current,t=Fe(K(e));e&&x(e,t)&&e.focus({preventScroll:!0})}}}),[ye,q,N,p,n,U,pe,d]),Ee=Q.useMemo(()=>d&&k&&ve&&{"aria-activedescendant":`${C}-${r}`},[d,k,ve,C,r]),Oe=Q.useMemo(()=>({...M?{}:Ee,onKeyDown(t){if(t.key===`Tab`&&t.shiftKey&&k&&!d){let n=b(t.nativeEvent);if(n&&!x(N.current,n))return;J(t);let r=Ce(ae,t.nativeEvent);e.setOpen(!1,r);let i=D?.current??j;!r.isCanceled&&Be(i)&&i.focus()}else Se(t)},onPointerMove(e){pt(e)||(V.current=!0)}}),[Ee,Se,N,M,e,k,d,j,D]),ke=Q.useMemo(()=>{function t(t){e.setOpen(!0,Ce(De,t.nativeEvent,t.currentTarget))}function n(e){f===`auto`&&le(e.nativeEvent)&&(L.current=!d)}function r(e){L.current=f,f===`auto`&&je(e.nativeEvent)&&(L.current=!0)}return{onKeyDown(n){let r=e.select(`open`);V.current=!1;let i=n.key.startsWith(`Arrow`),a=_t(n.key,be(),u),o=ht(n.key,r?g:_),s=(l?a:o)||n.key===`Enter`||n.key.trim()===``;if(d&&r&&(!l||ge(n.currentTarget)))return Se(n);if(r||m||!i){if(s){let e=ht(n.key,be());B.current=l&&e?null:n.key}l?a&&(J(n),r?(z.current=xe(),U(n),d&&N.current?.focus()):t(n)):o&&(fe.current!=null&&(z.current=fe.current),J(n),!r&&m?t(n):Se(n),r&&U(n))}},onFocus(t){t.target===t.currentTarget&&e.select(`open`)&&!d&&(z.current=-1,U(t))},onPointerDown:r,onPointerEnter:r,onMouseDown:n,onClick:n}},[Se,f,xe,l,U,e,m,g,_,be,u,fe,d,N]),Ae=Q.useMemo(()=>({...Ee,...ke}),[Ee,ke]);return Q.useMemo(()=>a?{reference:Ae,floating:Oe,item:we,trigger:ke}:{},[a,Ae,Oe,ke,we])}function bt(e,t){let{listRef:n,elementsRef:r,activeIndex:i,onMatch:a,disabledIndices:o,onTyping:s,enabled:c=!0,resetMs:l=750,selectedIndex:u=null}=t,d=Z(s),f=e.useState(`open`),p=ee(),m=Q.useRef(``),h=Q.useRef(u??i??-1),g=Q.useRef(null),_=Z(e=>{function t(e){return r?.current[e]}function s(e){let n=t(e);return n&&!L(n)||n?.matches(`:disabled`)?!1:o==null||!te(Ze,e,o)}function c(e,t,n=0){if(e.length===0)return-1;let r=(n%e.length+e.length)%e.length,i=t.toLowerCase();for(let t=0;t<e.length;t+=1){let n=(r+t)%e.length;if(e[n]?.toLowerCase().startsWith(i)&&s(n))return n}return-1}let _=n.current;if(m.current.length>0&&e.key===` `&&(J(e),d?.(!0)),m.current.length>0&&m.current[0]!==` `&&c(_,m.current)===-1&&e.key!==` `&&d?.(!1),_==null||e.key.length!==1||e.ctrlKey||e.metaKey||e.altKey)return;f&&e.key!==` `&&(J(e),d?.(!0));let v=m.current===``;v&&(h.current=u??i??-1),_.every((e,t)=>e&&s(t)?e[0]?.toLowerCase()!==e[1]?.toLowerCase():!0)&&m.current===e.key&&(m.current=``,h.current=g.current),m.current+=e.key,p.start(l,()=>{m.current=``,h.current=g.current,d?.(!1)});let y=((v?u??i??-1:h.current)??0)+1,b=c(_,m.current,y);b===-1?e.key!==` `&&(m.current=``,d?.(!1)):(a?.(b,e),g.current=b)}),v=Z(t=>{let n=t.relatedTarget,r=e.select(`domReferenceElement`),i=e.select(`floatingElement`);x(r,n)||x(i,n)||(p.clear(),m.current=``,h.current=g.current,d?.(!1))});Y(()=>{(f||u===null)&&(p.clear(),g.current=null,m.current!==``&&(m.current=``,d?.(!1)))},[f,u,p,d]);let y=Q.useMemo(()=>({onKeyDown:_,onBlur:v}),[_,v]);return Q.useMemo(()=>c?{reference:y,floating:y}:{},[c,y])}var $=t(),xt=Q.createContext(void 0);function St(e){let t=Q.useContext(xt);if(t===void 0&&!e)throw Error(X(33));return t}var Ct=Q.createContext(void 0);function wt(e){let t=Q.useContext(Ct);if(t===void 0&&!e)throw Error(X(36));return t}var Tt=Q.createContext(void 0);function Et(e=!0){let t=Q.useContext(Tt);if(t===void 0&&!e)throw Error(X(25));return t}var Dt=Q.createContext(null);function Ot(e=`root`){let t=Q.useContext(Dt),n=Q.useContext(Ct);return t===null||n===void 0?null:(e===`submenu-trigger`?n.virtualFocus||n.parentVirtualFocus:n.virtualFocus)?t:null}var kt={visible:!0,ref:null};function At(){return kt}function jt(e,t,n=`root`){let r=Ot(n),i=((n===`submenu-trigger`?r?.useSubmenuTrigger:r?.useItem)??At)({label:e.label,children:e.children,render:e.render}),a=et(t,i.ref);return{visible:i.visible,ref:a,props:i.props}}var Mt=Q.createContext(void 0);function Nt(){let e=Q.useContext(Mt);if(e===void 0)throw Error(X(30));return e}function Pt(e){e.preventDefault()}function Ft(e){let{closeOnClick:t,highlighted:n,id:r,nodeId:i,store:a,typingRef:o,itemRef:s,itemMetadata:c}=e,l=wt(),u=Et(!0),d=c.type===`submenu-trigger`,f=d?l.parentVirtualFocus:l.virtualFocus,p=(d&&l.parent.type===`menu`?l.parent.store:l.store).useState(`webkitAriaSelected`,n),{events:m}=a.useState(`floatingTreeRoot`),h=a.useState(`open`),g=u!==void 0,_=!f&&h&&n?0:-1;return Q.useMemo(()=>({id:r,role:`menuitem`,tabIndex:_,"aria-selected":p,onMouseDown:f?Pt:void 0,onKeyDown(e){e.key===` `&&o?.current&&e.preventDefault()},onMouseMove(e){i&&m.emit(`itemhover`,{nodeId:i,target:e.currentTarget})},onClick(e){t&&m.emit(`close`,{domEvent:e.nativeEvent,reason:Ae})},onMouseUp(e){if(u){let t=u.initialCursorPointRef.current;if(u.initialCursorPointRef.current=null,g&&t&&Math.abs(e.clientX-t.x)<=1&&Math.abs(e.clientY-t.y)<=1||g&&!me&&e.button===2)return}s.current&&a.context.allowMouseUpTriggerRef.current&&(!g||e.button===2)&&c.type===`regular-item`&&Ke(s.current,e,{detail:1,pointerType:`mouse`})}}),[t,_,r,m,i,a.context.allowMouseUpTriggerRef,o,s,u,g,c.type,p,f])}var It={type:`regular-item`};function Lt(e){let{closeOnClick:t,disabled:n,highlighted:r,id:i,store:a,typingRef:o=a.context.typingRef,nativeButton:s,itemMetadata:c,nodeId:l}=e,u=Q.useRef(null),{getButtonProps:d,buttonRef:f}=Ge({disabled:n,focusableWhenDisabled:!0,native:s,composite:!0}),p=Ft({closeOnClick:t,highlighted:r,id:i,nodeId:l,store:a,typingRef:o,itemRef:u,itemMetadata:c}),m=Q.useCallback(e=>qe(p,{onMouseEnter(e){c.type===`submenu-trigger`&&c.setActive(e.nativeEvent)}},e,d),[p,d,c]),h=et(u,f);return Q.useMemo(()=>({getItemProps:m,itemRef:h}),[m,h])}var Rt=`data-checked`,zt=`data-unchecked`,Bt={checked(e){return e?{[Rt]:``}:{[zt]:``}},...ze},Vt=Q.forwardRef(function(e,t){let{render:n,className:r,id:i,label:o,nativeButton:s=!1,disabled:c=!1,closeOnClick:l=!1,checked:u=!1,onCheckedChange:d,style:f,...p}=e,{store:m}=wt(),h=a({guess:!0,label:o}),g=q(i),_=m.useState(`disabled`),v=m.useState(`isActive`,h.index),y=m.useState(`floatingNodeId`),b=m.useState(`itemProps`),x=c||_,{getItemProps:S,itemRef:C}=Lt({closeOnClick:l,disabled:x,highlighted:v,id:g,store:m,nativeButton:s,nodeId:y,itemMetadata:It}),w=Q.useMemo(()=>({disabled:x,highlighted:v,checked:u}),[x,v,u]);function T(e){let t=Ce(Ae,e.nativeEvent,void 0,{preventUnmountOnClose:We});d?.(!u,t)}let E=Je(`div`,e,{state:w,stateAttributesMapping:Bt,props:[b,{role:`menuitemcheckbox`,"aria-checked":u,onClick:T},p,S],ref:[C,t,h.ref]});return(0,$.jsx)(Mt.Provider,{value:w,children:E})}),Ht=Q.forwardRef(function(e,t){let{checked:n,defaultChecked:r,onCheckedChange:a,...o}=e,[s,c]=i({controlled:n,default:r??!1,name:`MenuCheckboxItem`,state:`checked`}),l=jt(e,t);function u(e,t){a?.(e,t),t.isCanceled||c(e)}return l.visible?(0,$.jsx)(Vt,{...o,checked:s,onCheckedChange:u,ref:l.ref}):null}),Ut=Q.forwardRef(function(e,t){let{render:n,className:r,style:i,keepMounted:a=!1,...o}=e,s=Nt(),c=Q.useRef(null),{transitionStatus:l,mounted:u,setMounted:d}=w(s.checked);O({batch:!0,enabled:!s.checked,open:s.checked,ref:c,onComplete(){s.checked||d(!1)}});let f={checked:s.checked,disabled:s.disabled,highlighted:s.highlighted,transitionStatus:l};return Je(`span`,e,{state:f,ref:[t,c],stateAttributesMapping:Bt,props:{"aria-hidden":!0,...o},enabled:a||u})}),Wt=Q.createContext(void 0);function Gt(){let e=Q.useContext(Wt);if(e===void 0)throw Error(X(31));return e}var Kt=Q.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,[o,s]=Q.useState(void 0),c=Je(`div`,e,{ref:t,props:{role:`group`,"aria-labelledby":o,...a}});return(0,$.jsx)(Wt.Provider,{value:s,children:c})}),qt=Q.forwardRef(function(e,t){let n=Ot()?.Group??Kt;return(0,$.jsx)(n,{...e,ref:t})}),Jt=Q.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,s=q(a),c=Gt();return Y(()=>(c(s),()=>{c(e=>e===s?void 0:e)}),[c,s]),Je(`div`,e,{ref:t,props:{id:s,"aria-hidden":!0,...o}})}),Yt=Q.forwardRef(function(e,t){let{render:n,className:r,id:i,label:o,nativeButton:s=!1,disabled:c=!1,closeOnClick:l=!0,style:u,...d}=e,{store:f}=wt(),p=a({guess:!0,label:o}),m=q(i),h=f.useState(`disabled`),g=f.useState(`isActive`,p.index),_=f.useState(`floatingNodeId`),v=f.useState(`itemProps`),y=c||h,{getItemProps:b,itemRef:x}=Lt({closeOnClick:l,disabled:y,highlighted:g,id:m,store:f,nativeButton:s,nodeId:_,itemMetadata:It});return Je(`div`,e,{state:{disabled:y,highlighted:g},props:[v,d,b],ref:[x,t,p.ref]})}),Xt=Q.forwardRef(function(e,t){let n=jt(e,t);return n.visible?(0,$.jsx)(Yt,{...e,ref:n.ref}):null}),Zt=Q.createContext(void 0);function Qt(e){let t=Q.useContext(Zt);if(t===void 0&&!e)throw Error(X(69));return t}var $t=Q.createContext(void 0);function en(){return Q.useContext($t)}function tn(e,t){let n=Qe(e.render);if(Q.isValidElement(n)){let e=n.props;if(Object.hasOwn(e,`id`))return e.id??``}return e.id??t}function nn(e,t,n){let r=tn(e,t),i=r===t?void 0:r;return[r,Q.useCallback(e=>n?.(e?i:void 0),[i,n])]}function rn(e,t,n){let r=Qe(e.render),i=Q.isValidElement(r)?r.props:void 0,a=e[`aria-label`]??i?.[`aria-label`],o=e[`aria-labelledby`]??i?.[`aria-labelledby`];return o==null&&!a&&(o=t?t.id||void 0:n||void 0),o}var an=Q.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,id:o,initialFocus:s,...c}=e,{store:l,defaultFloatingId:u,setRenderedFloatingId:d,virtualFocus:f,orientation:h}=wt(),g=en(),{side:_,align:v}=St(),y=Qt(!0)!=null,b=l.useState(`open`),x=l.useState(`transitionStatus`),S=l.useState(`popupProps`),C=l.useState(`mounted`),w=l.useState(`instantType`),T=l.useState(`activeTriggerElement`),E=l.useState(`parent`),D=l.useState(`lastOpenChangeReason`),ee=l.useState(`rootId`),k=l.useState(`floatingRootContext`),A=l.useState(`floatingTreeRoot`),j=l.useState(`closeDelay`),te=l.useState(`hoverEnabled`),ne=l.useState(`disabled`),M=l.useState(`openMethod`),re=l.useState(`activeTriggerId`),N=l.useState(`listElement`),[P,F]=nn(e,u,d),I=rn(e,T,re),L=E.type===`menu`?g:void 0,R=E.type===`context-menu`,ie=s??E.type!==`menu`;s===void 0&&N&&E.type!==`menu`&&(ie=()=>l.state.activeIndex===null&&N),O({open:b,ref:l.context.popupRef,onComplete(){b&&l.context.onOpenChangeComplete?.(!0)}}),Q.useEffect(()=>{function e(e){l.setOpen(!1,Ce(e.reason,e.domEvent))}return A.events.on(`close`,e),()=>{A.events.off(`close`,e)}},[A.events,l]),m(k,{enabled:te&&!ne&&!R&&E.type!==`menubar`,closeDelay:j});let ae=l.useStateSetter(`popupElement`),{parentVirtualFocusRef:z,handleFocus:B}=(Q.useContext(Dt)?.useParentHandoff??sn)(l,E,b,f),V={transitionStatus:x,side:_,align:v,open:b,nested:E.type===`menu`,instant:w},H=Je(`div`,e,{state:V,ref:[t,l.context.popupRef,ae,F],stateAttributesMapping:we,props:[S,{id:P,...N?{role:`presentation`}:{role:`menu`,"aria-orientation":h===`horizontal`?`horizontal`:void 0,"aria-labelledby":I},onKeyDown(e){L?.onPopupKeyDown?.(e),y&&it.has(e.key)&&e.stopPropagation()},onFocus:B},p(x),c,{"data-rootownerid":ee}]}),U=E.type===void 0||R;(T||E.type===`menubar`&&D!==`outside-press`)&&(U=!0);let W=L?.getReturnElement??z;return(0,$.jsx)(st,{context:k,openInteractionType:M,modal:R,disabled:!C,returnFocus:a??W??U,explicitReturnFocus:a===void 0&&W?!1:void 0,initialFocus:ie,restoreFocus:!0,getInsideElements:E.type===void 0?()=>[l.context.beforeTriggerFocusGuardRef.current]:void 0,externalTree:E.type===`menubar`?void 0:A,previousFocusableElement:T,nextFocusableElement:E.type===void 0?l.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:l.context.beforeContentFocusGuardRef,children:H})}),on={parentVirtualFocusRef:void 0,handleFocus:void 0};function sn(){return on}var cn=Q.forwardRef(function(e,t){let n=Ot()?.Popup??an;return(0,$.jsx)(n,{...e,ref:t})}),ln=Q.createContext(void 0);function un(){let e=Q.useContext(ln);if(e===void 0)throw Error(X(32));return e}var dn=Q.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:i,parent:a}=wt();if(!(i.useState(`mounted`)||n))return null;let o=a.type===`menu`||a.type===`menubar`?`group`:void 0;return(0,$.jsx)(ln.Provider,{value:n,children:(0,$.jsx)(P,{ref:t,...r,portalOwnerRole:o})})});function fn(e){let{store:t,domReference:n,positionerElement:r,open:i}=e,a=Q.useRef(null),o=Q.useRef(null),s=A(r);Y(()=>{i||(o.current?.abort(),o.current=null,t.state.instantType===`trigger-change`&&t.set(`instantType`,void 0))},[i,t]),Y(()=>{let e=n,r=a.current;if(e&&(a.current=e),!r||!e||e===r||!t.select(`open`))return;t.set(`instantType`,void 0);let i=new AbortController;return o.current=i,s(()=>{t.select(`open`)&&t.set(`instantType`,`trigger-change`)},i.signal),()=>{i.abort()}},[n,s,t])}var pn=20;function mn(e,t,n,r){let[i,a]=Q.useState(!1);Y(()=>{if(!e||!t||n==null){a(!1);return}let r=K(n).documentElement.clientWidth,i=n.offsetWidth;a(r>0&&i>0&&i>=r-pn)},[e,t,n]),lt(e&&(!t||i),r)}var hn=Q.forwardRef(function(e,t){let{anchor:n,positionMethod:r=`absolute`,className:i,render:a,side:o,align:c,sideOffset:l=0,alignOffset:u=0,collisionBoundary:d=`clipping-ancestors`,collisionPadding:f=5,arrowPadding:p=5,sticky:m=!1,disableAnchorTracking:v=!1,collisionAvoidance:y=_,style:b,...x}=e,{store:S,virtualFocus:C,syncHighlightedItem:w}=wt(),T=un(),E=Et(!0),D=S.useState(`parent`),O=S.useState(`floatingRootContext`),k=S.useState(`floatingTreeRoot`),A=S.useState(`mounted`),j=S.useState(`open`),te=S.useState(`modal`),ne=S.useState(`openMethod`),M=S.useState(`activeTriggerElement`),re=S.useState(`transitionStatus`),N=S.useState(`positionerElement`),P=S.useState(`instantType`),F=S.useState(`adaptiveOrigin`),I=S.useState(`lastOpenChangeReason`),L=S.useState(`floatingNodeId`),R=S.useState(`floatingParentNodeId`),ie=O.useState(`domReferenceElement`),ae=n,z=l,B=u,V=c,H=y;D.type===`context-menu`&&(ae=n??D.context?.anchor,V??=`start`,!o&&V!==`center`&&(B=e.alignOffset??2,z=e.sideOffset??-5));let U=o,W=V;D.type===`menu`?(U??=`inline-end`,W??=`start`,H=e.collisionAvoidance??pe):D.type===`menubar`&&(U??=D.context.orientation===`vertical`?`inline-end`:`bottom`,W??=`start`);let oe=D.type===`context-menu`,se=h({anchor:ae,floatingRootContext:O,positionMethod:E?`fixed`:r,mounted:A,side:U,sideOffset:z,align:W,alignOffset:B,arrowPadding:oe?0:p,collisionBoundary:d,collisionPadding:f,sticky:m,nodeId:L,keepMounted:T,disableAnchorTracking:v,collisionAvoidance:H,shift:oe?{crossAxis:!(`side`in H&&H.side===`flip`),rootBoundary:`layoutViewport`}:void 0,externalTree:k,adaptiveOrigin:F,lazyFlip:C?`placement`:!1});Q.useEffect(()=>{function e(e){e.open&&(e.parentNodeId===L&&S.set(`hoverEnabled`,!1),e.nodeId!==L&&e.parentNodeId===S.select(`floatingParentNodeId`)&&S.setOpen(!1,Ce(G)))}return k.events.on(`menuopenchange`,e),()=>{k.events.off(`menuopenchange`,e)}},[S,k.events,L]),Q.useEffect(()=>{if(S.select(`floatingParentNodeId`)==null)return;function e(e){if(e.open||e.nodeId!==S.select(`floatingParentNodeId`))return;let t=e.reason??`sibling-open`;S.setOpen(!1,Ce(t))}return k.events.on(`menuopenchange`,e),()=>{k.events.off(`menuopenchange`,e)}},[k.events,S]);let ce=ee();Q.useEffect(()=>{j||ce.clear()},[j,ce]),Q.useEffect(()=>{function e(e){if(j&&e.nodeId===S.select(`floatingParentNodeId`)){if(e.target&&M&&M!==e.target){let e=S.select(`closeDelay`);e>0?ce.isStarted()||ce.start(e,()=>{S.setOpen(!1,Ce(G))}):S.setOpen(!1,Ce(G))}else ce.clear()}}return k.events.on(`itemhover`,e),()=>{k.events.off(`itemhover`,e)}},[k.events,j,M,S,ce]),Q.useEffect(()=>{let e={open:j,nodeId:L,parentNodeId:R,reason:S.select(`lastOpenChangeReason`)};k.events.emit(`menuopenchange`,e)},[k.events,j,S,L,R]),fn({store:S,domReference:ie,positionerElement:N,open:j});let le={open:j,side:se.side,align:se.align,anchorHidden:se.anchorHidden,nested:D.type===`menu`,instant:P},ue=D.type===`menubar`&&D.context.modal;mn(j&&(ue||te&&I!==`trigger-hover`),ne===`touch`,N,M);let de=g(e,le,{styles:se.positionerStyles,transitionStatus:re,props:x,refs:[t,S.useStateSetter(`positionerElement`)],hidden:!A,inert:!j}),K=A&&D.type!==`menu`&&(D.type!==`menubar`&&te&&I!==`trigger-hover`||D.type===`menubar`&&D.context.modal),q=null;return D.type===`menubar`?q=D.context.contentElement:D.type===void 0&&(q=M),(0,$.jsxs)(xt.Provider,{value:se,children:[K&&(0,$.jsx)(ot,{ref:D.type===`context-menu`||D.type===`nested-context-menu`?D.context.internalBackdropRef:null,inert:at(!j),cutout:q}),(0,$.jsx)(Re,{id:L,children:(0,$.jsx)(s,{elementsRef:S.context.itemDomElements,labelsRef:S.context.itemLabels,onMapChange:w,children:de})})]})}),gn=Q.createContext(void 0);function _n(){let e=Q.useContext(gn);if(e===void 0)throw Error(X(34));return e}var vn=Q.forwardRef(function(e,t){let{render:n,className:r,value:a,defaultValue:o,onValueChange:s,disabled:c=!1,style:l,"aria-labelledby":u,...d}=e,[f,p]=Q.useState(void 0),[m,h]=i({controlled:a,default:o,name:`MenuRadioGroup`}),g=Z((e,t)=>{s?.(e,t),!t.isCanceled&&h(e)}),_=Je(`div`,e,{state:{disabled:c},ref:t,props:{role:`group`,"aria-labelledby":u??f,"aria-disabled":c||void 0,...d}}),v=Q.useMemo(()=>({value:m,setValue:g,disabled:c}),[m,g,c]);return(0,$.jsx)(Wt.Provider,{value:p,children:(0,$.jsx)(gn.Provider,{value:v,children:_})})}),yn=Q.memo(Q.forwardRef(function(e,t){let n=Ot()?.RadioGroup??vn;return(0,$.jsx)(n,{...e,ref:t})})),bn=Q.createContext(void 0);function xn(){let e=Q.useContext(bn);if(e===void 0)throw Error(X(35));return e}var Sn=Q.forwardRef(function(e,t){let{render:n,className:r,id:i,label:o,nativeButton:s=!1,disabled:c=!1,closeOnClick:l=!1,value:u,style:d,...f}=e,{store:p}=wt(),{value:m,setValue:h,disabled:g}=_n(),_=a({guess:!0,label:o}),v=q(i),y=p.useState(`isActive`,_.index),b=p.useState(`floatingNodeId`),x=p.useState(`itemProps`),S=p.useState(`disabled`),C=c||g||S,w=m===u,{getItemProps:T,itemRef:E}=Lt({closeOnClick:l,disabled:C,highlighted:y,id:v,store:p,nativeButton:s,nodeId:b,itemMetadata:It}),D=Q.useMemo(()=>({disabled:C,highlighted:y,checked:w}),[C,y,w]);function ee(e){let t=Ce(Ae,e.nativeEvent,void 0,{preventUnmountOnClose:We});h(u,t)}let O=Je(`div`,e,{state:D,stateAttributesMapping:Bt,props:[x,{role:`menuitemradio`,"aria-checked":w,onClick:ee},f,T],ref:[E,t,_.ref]});return(0,$.jsx)(bn.Provider,{value:D,children:O})}),Cn=Q.forwardRef(function(e,t){let n=jt(e,t);return n.visible?(0,$.jsx)(Sn,{...e,ref:n.ref}):null}),wn=Q.forwardRef(function(e,t){let{render:n,className:r,style:i,keepMounted:a=!1,...o}=e,s=xn(),c=Q.useRef(null),{transitionStatus:l,mounted:u,setMounted:d}=w(s.checked);O({batch:!0,enabled:!s.checked,open:s.checked,ref:c,onComplete(){s.checked||d(!1)}});let f={checked:s.checked,disabled:s.disabled,highlighted:s.highlighted,transitionStatus:l};return Je(`span`,e,{state:f,stateAttributesMapping:Bt,ref:[t,c],props:{"aria-hidden":!0,...o},enabled:a||u})}),Tn=Q.createContext(null);function En(e){let t=Q.useContext(Tn);if(t===null&&!e)throw Error(X(5));return t}function Dn(e){return e==null?V:e.type.startsWith(`key`)?be:e.type.startsWith(`mouse`)||e.type.startsWith(`pointer`)?Oe:V}var On={...ye,disabled:e=>e.parent.type===`menubar`&&e.parent.context.disabled||e.disabled,modal:e=>(e.parent.type===void 0||e.parent.type===`context-menu`)&&(e.modal??!0),openMethod:e=>e.openMethod,keyboardOpen:e=>e.keyboardOpen,allowMouseEnter:e=>e.allowMouseEnter,highlightItemOnHover:e=>e.highlightItemOnHover,parent:e=>e.parent,rootId:e=>e.parent.type===`menu`?e.parent.store.select(`rootId`):e.parent.type===void 0?e.rootId:e.parent.context.rootId,activeIndex:e=>e.activeIndex,listElement:e=>e.listElement,triggerControlsId:(e,t)=>{let n=ye.triggerPopupId(e,t);return n?e.listElement?.id||n:void 0},filterTriggerProps:e=>e.filterTriggerProps,inputProps:e=>e.inputProps,webkitAriaSelected:(e,t)=>he&&e.inputFocused&&t?!0:void 0,highlightedItemId:e=>e.highlightedItem?.id||void 0,isActive:(e,t)=>e.activeIndex===t,hoverEnabled:e=>e.hoverEnabled,instantType:e=>e.instantType===`trigger-change`&&!ye.open(e)?void 0:e.instantType,lastOpenChangeReason:e=>e.openChangeReason,floatingTreeRoot:e=>e.parent.type===`menu`?e.parent.store.select(`floatingTreeRoot`):e.floatingTreeRoot,floatingNodeId:e=>e.floatingNodeId,floatingParentNodeId:e=>e.floatingParentNodeId,itemProps:e=>e.itemProps,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin,keyboardEventRelay:e=>{if(e.keyboardEventRelay)return e.keyboardEventRelay;if(e.parent.type===`menu`)return e.parent.store.select(`keyboardEventRelay`)}},kn=class extends Ee{constructor(e,t,n=!1){let r=new fe,i=jn(r,t,n,e);super(i,An(r),On),this.observe(`parent`,e=>{e.type===`menu`?this.context.allowMouseUpTriggerRef=e.store.context.allowMouseUpTriggerRef:e.type!==void 0&&(this.context.allowMouseUpTriggerRef=e.context.allowMouseUpTriggerRef)})}subscribeToParentMenu(){let e=this.state.parent;if(e.type!==`menu`)return;let t=e.store.select(`rootId`),n=e.store.select(`floatingTreeRoot`),r=e.store.select(`keyboardEventRelay`);return e.store.subscribe(()=>{let i=e.store.select(`rootId`),a=e.store.select(`floatingTreeRoot`),o=e.store.select(`keyboardEventRelay`);(t!==i||n!==a||r!==o)&&(t=i,n=a,r=o,this.notifyAll())})}setOpen(e,t){this.state.floatingRootContext.context.events.emit(`setOpen`,{open:e,eventDetails:t})}setActiveIndex(e,t,n){if(this.state.activeIndex!==e){let r=(e===null?void 0:this.context.itemDomElements.current[e])===this.context.reportedItem;this.context.highlightReason=r?`none`:t,this.context.highlightEvent=r?void 0:n}this.set(`activeIndex`,e)}highlightItem(e,t,n){let r=this.context.itemDomElements.current.indexOf(e);r>-1&&this.setActiveIndex(r,t,n)}};function An(e){return{positionerRef:Q.createRef(),popupRef:Q.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},highlightReason:`none`,highlightEvent:void 0,reportedItem:void 0,allowMouseUpTriggerRef:{current:!1},virtualFocusRef:void 0,triggerFocusTargetRef:Q.createRef(),beforeTriggerFocusGuardRef:Q.createRef(),beforeContentFocusGuardRef:Q.createRef(),onOpenChangeComplete:void 0,triggerElements:e}}function jn(e,t,n=!1,r){return{...ke(e,t,n),disabled:!1,modal:!0,openMethod:null,keyboardOpen:!1,allowMouseEnter:!1,highlightItemOnHover:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,listElement:null,filterTriggerProps:$e,inputProps:$e,inputFocused:!1,highlightedItem:void 0,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new Pe,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:$e,keyboardEventRelay:void 0,closeDelay:0,adaptiveOrigin:void 0,...r}}var Mn=Q.createContext(null);function Nn(e,t){return(e===`trigger-press`||e===`item-press`)&&t?.detail===0}function Pn(e,t){return e===`list-navigation`||Nn(e,t)}var Fn=D(function(e){let{children:t,open:n,onOpenChange:r,onOpenChangeComplete:i,onItemHighlighted:a,defaultOpen:o=!1,disabled:s=!1,modal:c,loopFocus:l=!0,orientation:u=`vertical`,actionsRef:d,closeParentOnEsc:p=!1,handle:m,triggerId:h,defaultTriggerId:g=null,highlightItemOnHover:_=!0,isSubmenu:v=!1,virtualFocus:y=!1,virtualFocusRef:b,allowEscape:x=!0,resetOnPointerLeave:S=!0}=e,C=Et(!0),w=wt(!0),T=En(!0),E=w?.store,D=w?.virtualFocus??!1,O=Q.useMemo(()=>v&&E?{type:`menu`,store:E}:T?{type:`menubar`,context:T}:C&&!E?{type:`context-menu`,context:C}:{type:void 0},[C,E,T,v]),k=q(),j=q(),[te,M]=Q.useState(void 0),N=(te??j)||void 0,P=re(),F=O.type===`menu`?O.store:void 0,I=(n??o)&&F?.state.transitionStatus===`starting`,L=tt(()=>I?F?.state.instantType:void 0).current,R=tt(()=>{let e=new kn({open:o,openProp:n,activeTriggerId:g,triggerIdProp:h,parent:O,disabled:s,highlightItemOnHover:_,modal:O.type===void 0?c:void 0,rootId:k,instantType:L},N,P!=null);return e.context.virtualFocusRef=b,e}).current;R.useControlledProp(`openProp`,n),R.useControlledProp(`triggerIdProp`,h),R.useContextCallback(`onOpenChangeComplete`,i);let ie=R.useState(`floatingTreeRoot`),ae=Ie(ie),H=R.useState(`open`),W=R.useState(`activeTriggerElement`),G=R.useState(`positionerElement`),se=R.useState(`hoverEnabled`),le=R.useState(`disabled`),de=R.useState(`lastOpenChangeReason`),K=R.useState(`parent`),fe=R.useState(`activeIndex`),pe=R.useState(`keyboardOpen`),me=R.useState(`payload`),he=R.useState(`floatingParentNodeId`),ge=Q.useRef(null),ve=Q.useRef(K.type!==`context-menu`),ye=ee(),J=Q.useRef(!0),we=ee(),Te=he!=null,{openMethod:Ee,triggerProps:De}=dt(H);R.useSyncedValues({disabled:s,highlightItemOnHover:_,modal:K.type===void 0?c:void 0,openMethod:Ee,rootId:k}),ce(R);let{forceUnmount:Oe,transitionStatus:ke}=ue(H,R,()=>{R.set(`allowMouseEnter`,!1)},I),Ae=A(R.context.popupRef);Q.useEffect(()=>{if(L===void 0)return;let e=()=>{R.state.instantType===L&&R.set(`instantType`,void 0)};if(!H){e();return}if(ke!==void 0)return;if(R.context.popupRef.current==null){e();return}let t=new AbortController;return Ae(e,t.signal),()=>{t.abort()}},[L,H,ke,Ae,R]),Y(()=>{C&&!w?R.update({parent:{type:`context-menu`,context:C},floatingNodeId:ae,floatingParentNodeId:P}):(w||!R.select(`activeTriggerElement`))&&R.update({floatingNodeId:ae,floatingParentNodeId:P})},[C,w,ae,P,W,R]),Q.useEffect(()=>{H||(ge.current=null),K.type===`context-menu`&&(H?ye.start(500,()=>{ve.current=!0}):(ye.clear(),ve.current=!1))},[ye,H,K.type]),Y(()=>{!H&&!se&&R.set(`hoverEnabled`,!0)},[H,se,R]);let je=Z((e,t)=>{let n=t.reason;if(!e&&!R.select(`open`)||H===e&&t.trigger===W&&de===n)return;let i=oe(t);if(!e&&t.trigger==null&&(t.trigger=W??void 0),r?.(e,t),t.isCanceled)return;R.state.floatingRootContext.dispatchOpenChange(e,t);let a=t.event;if(e===!1&&n!==`item-press`&&a?.type===`click`&&a.pointerType===`touch`&&!J.current)return;e&&n===`trigger-focus`?(J.current=!1,we.start(300,()=>{J.current=!0})):(J.current=!0,we.clear());let o=!e&&(n===`escape-key`||n==null);ge.current=t.event;let s=Me(R.state,e,t.trigger,i());s.openChangeReason=n,s.keyboardOpen=e&&Pn(n,a),s.instantType=K.type===`menubar`&&(n===`trigger-focus`||n===`focus-out`||n===`trigger-hover`||n===`list-navigation`||n===`sibling-open`)?`group`:Nn(n,a)?`click`:o?`dismiss`:void 0,R.update(s)}),Pe=z({popupStore:R,floatingRootContext:R.state.floatingRootContext,floatingId:N,nested:P!=null,onOpenChange:je}),Fe=Pe.context.events;Y(()=>{let e=({open:e,eventDetails:t})=>je(e,t);return Fe.on(`setOpen`,e),()=>{Fe?.off(`setOpen`,e)}},[Fe,je]),Y(()=>R.subscribeToParentMenu(),[R]);let Le=Q.useCallback(()=>{R.setOpen(!1,Ce(ne))},[R]);Q.useImperativeHandle(d,()=>({unmount:Oe,close:Le}),[Oe,Le]);let Re;K.type===`context-menu`&&(Re=K.context),Q.useImperativeHandle(Re?.positionerRef,()=>G,[G]),Q.useImperativeHandle(Re?.actionsRef,()=>({setOpen:je}),[je]);let ze=Ne(Pe,{enabled:!le,bubbles:{escapeKey:p&&K.type===`menu`},outsidePress(){return K.type!==`context-menu`||ge.current?.type===`contextmenu`||ve.current},externalTree:Te?ie:void 0}),Be=f(),Ve=yt(Pe,{enabled:!le,listRef:R.context.itemDomElements,activeIndex:fe,virtual:y,nested:K.type===`menubar`||!y&&K.type!==void 0,parentOrientation:K.type===`menubar`?K.context.orientation:void 0,loopFocus:l,focusItemOnOpen:y?pe:void 0,allowEscape:y&&l&&x,orientation:u,triggerOrientation:y?`vertical`:u,rtl:Be===`rtl`,disabledIndices:Ze,onNavigate(e,t){R.setActiveIndex(e,Dn(t),t?.nativeEvent)},openOnArrowKeyDown:K.type!==`context-menu`&&!(y&&v),externalTree:!y&&Te?ie:void 0,nestedReturnFocusRef:F?.context.virtualFocusRef,focusItemOnHover:_,resetOnPointerLeave:S}),He=Q.useCallback(e=>{R.context.typingRef.current=e},[R]),Ue=bt(Pe,{enabled:!le&&!y,listRef:R.context.itemLabels,elementsRef:R.context.itemDomElements,activeIndex:fe,resetMs:500,onMatch:(e,t)=>{H&&e!==fe&&R.setActiveIndex(e,be,t.nativeEvent)},onTyping:He}),We=Z(a),Ge=Q.useRef(-1),Ke=Z(()=>{let e=R.state.activeIndex,t=e===null?void 0:R.context.itemDomElements.current[e]??void 0;if(t?.isConnected===!1)return;let n=t===void 0?-1:e;if(Ge.current===n&&R.context.reportedItem===t)return;Ge.current=n,R.context.reportedItem=t,y&&R.set(`highlightedItem`,t);let{highlightReason:r,highlightEvent:i}=R.context;R.context.highlightReason=V,R.context.highlightEvent=void 0,a&&We(t,_e(r,i,{label:t===void 0?void 0:R.context.itemLabels.current[n]??void 0}))});Y(()=>{Ke()},[fe,Ke]);let X=Q.useMemo(()=>{if(!y)return Ve.reference;if(!Ve.trigger)return $e;let{onFocus:e,...t}=Ve.trigger;return t},[y,Ve.reference,Ve.trigger]);R.useSyncedValue(`inputProps`,y?Ve.reference??$e:$e);let Je=Q.useMemo(()=>{let e=qe(Ue.reference,X,ze.reference,{onMouseMove(){R.set(`allowMouseEnter`,!0)}},De);return e[`aria-haspopup`]=`menu`,e[`aria-expanded`]=H,e},[R,Ue.reference,X,ze.reference,De,H]),Ye=Q.useMemo(()=>{let e=qe(Ve.trigger,ze.trigger,De);return e[`aria-haspopup`]=`menu`,e[`aria-expanded`]=!1,e},[Ve.trigger,ze.trigger,De]);tt(()=>(R.update({inactiveTriggerProps:Ye}),null));let Xe=Q.useMemo(()=>qe(B,{onMouseMove(){R.set(`allowMouseEnter`,!0),K.type===`menu`&&R.set(`hoverEnabled`,!1)},onClick(){R.select(`hoverEnabled`)&&R.set(`hoverEnabled`,!1)},onKeyDown(e){let t=R.select(`keyboardEventRelay`);t&&!e.isPropagationStopped()&&t(e)}},Ue.floating,Ve.floating,ze.floating),[K.type,R,Ue.floating,Ve.floating,ze.floating]),Qe=Ve.item??$e;Se(R,{floatingRootContext:Pe,activeTriggerProps:Je,inactiveTriggerProps:Ye,popupProps:Xe,itemProps:Qe});let et=Q.useMemo(()=>({store:R,parent:O,orientation:u,loopFocus:l,allowEscape:x,defaultFloatingId:j,setRenderedFloatingId:M,virtualFocus:y,parentVirtualFocus:D,syncHighlightedItem:Ke}),[R,O,u,l,x,j,y,D,Ke]),nt=typeof t==`function`?t({payload:me}):t,rt=(0,$.jsxs)(Ct.Provider,{value:et,children:[m&&(0,$.jsx)(xe,{handle:m,store:R}),nt]});return(K.type===void 0||K.type===`context-menu`)&&(rt=(0,$.jsx)(U,{externalTree:ie,children:rt})),rt});function In(e){let t=Q.useContext(Mn);if(t===null)return(0,$.jsx)(Fn,{...e});let n=t.Root;return(0,$.jsx)(Mn.Provider,{value:null,children:(0,$.jsx)(n,{...t.options,...e})})}var Ln=5;function Rn(e,t){let n=zn(t);return e.clientX>=n.left-Ln&&e.clientX<=n.right+Ln&&e.clientY>=n.top-Ln&&e.clientY<=n.bottom+Ln}function zn(e){let t=e.getBoundingClientRect(),n=Ye(e);if(j)return t;let r=n.getComputedStyle(e,`::before`),i=n.getComputedStyle(e,`::after`);if(r.content===`none`&&i.content===`none`)return t;let a=parseFloat(r.width)||0,o=parseFloat(r.height)||0,s=parseFloat(i.width)||0,c=parseFloat(i.height)||0,l=Math.max(t.width,a,s),u=Math.max(t.height,o,c),d=l-t.width,f=u-t.height;return{left:t.left-d/2,right:t.right+d/2,top:t.top-f/2,bottom:t.bottom+f/2}}function Bn(e){let{render:t,className:n,style:r,state:i=$e,props:a=Ze,refs:s=Ze,metadata:c,stateAttributesMapping:l,tag:u=`div`,...d}=e,{compositeProps:f,compositeRef:p}=o({metadata:c});return Je(u,e,{state:i,ref:[p,...s],props:[f,...a,d],stateAttributesMapping:l})}function Vn(e){if(Be(e)&&e.hasAttribute(`data-rootownerid`))return e.getAttribute(`data-rootownerid`);if(!Ve(e))return Vn(He(e))}var Hn=n(r(),1);function Un(e,t){function n(n,r,i){let a=n.currentTarget;Hn.flushSync(()=>{e.setOpen(!1,Ce(ae,n.nativeEvent,a))}),C(a.isConnected?a:t.current,r,i)?.focus()}function r(t){n(t,-1,e.select(`positionerElement`))}function i(t){let r=e.select(`positionerElement`);r&&F(t,r)?e.context.beforeContentFocusGuardRef.current?.focus():n(t,1,r)}return{handlePreFocusGuardFocus:r,handleFocusTargetFocus:i}}function Wn(e){let{enabled:t=!0,mouseDownAction:n,open:r}=e,i=Q.useRef(!1);return Q.useMemo(()=>t?{onMouseDown:e=>{(n===`open`&&!r||n===`close`&&r)&&(i.current=!0,K(e.currentTarget).addEventListener(`click`,()=>{i.current=!1},{once:!0}))},onClick:e=>{i.current&&(i.current=!1,e.preventBaseUIHandler())}}:$e,[t,n,r])}var Gn=M(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,id:s,openOnHover:f,delay:p=100,closeDelay:m=0,handle:h,payload:g,..._}=e,y=wt(!0),b=l(h)??y?.store;if(!b)throw Error(X(85));let S=q(s),C=b.useState(`isTriggerActive`,S),w=b.useState(`floatingRootContext`),T=b.useState(`isOpenedByTrigger`,S),D=b.useState(`triggerControlsId`,S),O=Q.useRef(null),A=qn(),j=Xe(!0),te=v(),ne=Q.useMemo(()=>te??new Pe,[te]),M=Ie(ne),N=re(),{registerTrigger:P,isMountedByThisTrigger:F}=de(S,O,b,{payload:g,closeDelay:m,parent:A,floatingTreeRoot:ne,floatingNodeId:M,floatingParentNodeId:N,keyboardEventRelay:j?.relayKeyboardEvent}),I=A.type===`menubar`,L=b.useState(`disabled`),R=a||L||I&&A.context.disabled,{getButtonProps:ie,buttonRef:ae}=Ge({disabled:R,native:o});Q.useEffect(()=>{!T&&A.type===void 0&&(b.context.allowMouseUpTriggerRef.current=!1)},[b,T,A.type]);let z=Q.useRef(null),B=ee(),V=Z(e=>{if(!z.current)return;B.clear(),b.context.allowMouseUpTriggerRef.current=!1;let t=e.target;x(z.current,t)||x(b.select(`positionerElement`),t)||t===z.current||t!=null&&Vn(t)===b.select(`rootId`)||Rn(e,z.current)||ne.events.emit(`close`,{domEvent:e,reason:E})});Q.useEffect(()=>{let e=K(z.current);if(T&&b.select(`lastOpenChangeReason`)===`trigger-hover`)return e.addEventListener(`mouseup`,V,{once:!0}),()=>{e.removeEventListener(`mouseup`,V)}},[T,V,b]);let H=I&&A.context.hasSubmenuOpen,U=c(w,{enabled:(f??H)&&!R&&(!I||H&&!F),handleClose:u({blockPointerEvents:!I}),mouseOnly:!0,move:!1,restMs:A.type===void 0?p:void 0,delay:{close:m},triggerElementRef:O,externalTree:ne,isActiveTrigger:C,isClosing:()=>b.select(`transitionStatus`)===`ending`}),W=Kn(T,b.select(`lastOpenChangeReason`)),oe=ut(w,{enabled:!R,event:T&&I?`click`:`mousedown`,toggle:!0,ignoreMouse:!1,stickIfOpen:A.type===void 0&&W}),G=d(w,{enabled:!R&&H}),se=Wn({open:T,enabled:I,mouseDownAction:`open`}),ce=Q.useMemo(()=>qe(G.reference,oe.reference),[G.reference,oe.reference]),le=b.useState(`triggerProps`,F),ue=b.useState(`filterTriggerProps`),{handlePreFocusGuardFocus:fe,handleFocusTargetFocus:pe}=Un(b,O),me={disabled:R,open:T},he=[z,t,ae,P,O],ge=[ce,U??$e,le,{"aria-haspopup":`menu`,"aria-controls":D,id:S,onMouseDown:e=>{b.select(`open`)||(B.start(200,()=>{b.context.allowMouseUpTriggerRef.current=!0}),K(e.currentTarget).addEventListener(`mouseup`,V,{once:!0}))}},ue,I?{role:`menuitem`}:{},se,_,ie],_e=Je(`button`,e,{enabled:!I,stateAttributesMapping:ve,state:me,ref:he,props:ge});return I?(0,$.jsx)(Bn,{tag:`button`,render:n,className:r,style:i,state:me,refs:he,props:ge,stateAttributesMapping:ve}):T?(0,$.jsxs)(Q.Fragment,{children:[(0,$.jsx)(k,{ref:b.context.beforeTriggerFocusGuardRef,onFocus:fe},`${S}-pre-focus-guard`),(0,$.jsx)(Q.Fragment,{children:_e},S),(0,$.jsx)(k,{ref:b.context.triggerFocusTargetRef,onFocus:pe},`${S}-post-focus-guard`)]}):(0,$.jsx)(Q.Fragment,{children:_e},S)});function Kn(e,t){let n=ee(),[r,i]=Q.useState(!1);return Y(()=>{e&&t===`trigger-hover`?(i(!0),n.start(500,()=>{i(!1)})):e||(n.clear(),i(!1))},[e,t,n]),r}function qn(){let e=En(!0);return Q.useMemo(()=>e?{type:`menubar`,context:e}:{type:void 0},[e])}function Jn({...e}){return(0,$.jsx)(In,{"data-slot":`dropdown-menu`,...e})}function Yn({...e}){return(0,$.jsx)(Gn,{"data-slot":`dropdown-menu-trigger`,...e})}function Xn({align:e=`start`,alignOffset:t=0,side:n=`bottom`,sideOffset:r=4,className:i,...a}){return(0,$.jsx)(dn,{children:(0,$.jsx)(hn,{className:`isolate z-50 outline-none`,align:e,alignOffset:t,side:n,sideOffset:r,children:(0,$.jsx)(cn,{"data-slot":`dropdown-menu-content`,className:nt(`z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95`,i),...a})})})}function Zn({...e}){return(0,$.jsx)(qt,{"data-slot":`dropdown-menu-group`,...e})}function Qn({className:e,inset:t,...n}){return(0,$.jsx)(Jt,{"data-slot":`dropdown-menu-label`,"data-inset":t,className:nt(`px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7`,e),...n})}function $n({className:e,inset:t,variant:n=`default`,...r}){return(0,$.jsx)(Xt,{"data-slot":`dropdown-menu-item`,"data-inset":t,"data-variant":n,className:nt(`group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive`,e),...r})}function er({className:e,children:t,checked:n,inset:r,...i}){return(0,$.jsxs)(Ht,{"data-slot":`dropdown-menu-checkbox-item`,"data-inset":r,className:nt(`relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),checked:n,...i,children:[(0,$.jsx)(`span`,{className:`pointer-events-none absolute right-2 flex items-center justify-center`,"data-slot":`dropdown-menu-checkbox-item-indicator`,children:(0,$.jsx)(Ut,{children:(0,$.jsx)(ft,{"aria-hidden":`true`})})}),t]})}function tr({...e}){return(0,$.jsx)(yn,{"data-slot":`dropdown-menu-radio-group`,...e})}function nr({className:e,children:t,inset:n,...r}){return(0,$.jsxs)(Cn,{"data-slot":`dropdown-menu-radio-item`,"data-inset":n,className:nt(`relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...r,children:[(0,$.jsx)(`span`,{className:`pointer-events-none absolute right-2 flex items-center justify-center`,"data-slot":`dropdown-menu-radio-item-indicator`,children:(0,$.jsx)(wn,{children:(0,$.jsx)(ft,{"aria-hidden":`true`})})}),t]})}function rr({className:e,...t}){return(0,$.jsx)(rt,{"data-slot":`dropdown-menu-separator`,className:nt(`-mx-1 my-1 h-px bg-border`,e),...t})}var ir=new Map([[`bold`,Q.createElement(Q.Fragment,null,Q.createElement(`path`,{d:`M208.49,120.49a12,12,0,0,1-17,0L140,69V216a12,12,0,0,1-24,0V69L64.49,120.49a12,12,0,0,1-17-17l72-72a12,12,0,0,1,17,0l72,72A12,12,0,0,1,208.49,120.49Z`}))],[`duotone`,Q.createElement(Q.Fragment,null,Q.createElement(`path`,{d:`M200,112H56l72-72Z`,opacity:`0.2`}),Q.createElement(`path`,{d:`M205.66,106.34l-72-72a8,8,0,0,0-11.32,0l-72,72A8,8,0,0,0,56,120h64v96a8,8,0,0,0,16,0V120h64a8,8,0,0,0,5.66-13.66ZM75.31,104,128,51.31,180.69,104Z`}))],[`fill`,Q.createElement(Q.Fragment,null,Q.createElement(`path`,{d:`M207.39,115.06A8,8,0,0,1,200,120H136v96a8,8,0,0,1-16,0V120H56a8,8,0,0,1-5.66-13.66l72-72a8,8,0,0,1,11.32,0l72,72A8,8,0,0,1,207.39,115.06Z`}))],[`light`,Q.createElement(Q.Fragment,null,Q.createElement(`path`,{d:`M204.24,116.24a6,6,0,0,1-8.48,0L134,54.49V216a6,6,0,0,1-12,0V54.49L60.24,116.24a6,6,0,0,1-8.48-8.48l72-72a6,6,0,0,1,8.48,0l72,72A6,6,0,0,1,204.24,116.24Z`}))],[`regular`,Q.createElement(Q.Fragment,null,Q.createElement(`path`,{d:`M205.66,117.66a8,8,0,0,1-11.32,0L136,59.31V216a8,8,0,0,1-16,0V59.31L61.66,117.66a8,8,0,0,1-11.32-11.32l72-72a8,8,0,0,1,11.32,0l72,72A8,8,0,0,1,205.66,117.66Z`}))],[`thin`,Q.createElement(Q.Fragment,null,Q.createElement(`path`,{d:`M202.83,114.83a4,4,0,0,1-5.66,0L132,49.66V216a4,4,0,0,1-8,0V49.66L58.83,114.83a4,4,0,0,1-5.66-5.66l72-72a4,4,0,0,1,5.66,0l72,72A4,4,0,0,1,202.83,114.83Z`}))]]),ar=Q.forwardRef((e,t)=>Q.createElement(Ue,{ref:t,...e,weights:ir}));ar.displayName=`ArrowUpIcon`;var or=new Map([[`bold`,Q.createElement(Q.Fragment,null,Q.createElement(`path`,{d:`M208.49,152.49l-72,72a12,12,0,0,1-17,0l-72-72a12,12,0,0,1,17-17L116,187V40a12,12,0,0,1,24,0V187l51.51-51.52a12,12,0,0,1,17,17Z`}))],[`duotone`,Q.createElement(Q.Fragment,null,Q.createElement(`path`,{d:`M200,144l-72,72L56,144Z`,opacity:`0.2`}),Q.createElement(`path`,{d:`M207.39,140.94A8,8,0,0,0,200,136H136V40a8,8,0,0,0-16,0v96H56a8,8,0,0,0-5.66,13.66l72,72a8,8,0,0,0,11.32,0l72-72A8,8,0,0,0,207.39,140.94ZM128,204.69,75.31,152H180.69Z`}))],[`fill`,Q.createElement(Q.Fragment,null,Q.createElement(`path`,{d:`M205.66,149.66l-72,72a8,8,0,0,1-11.32,0l-72-72A8,8,0,0,1,56,136h64V40a8,8,0,0,1,16,0v96h64a8,8,0,0,1,5.66,13.66Z`}))],[`light`,Q.createElement(Q.Fragment,null,Q.createElement(`path`,{d:`M204.24,148.24l-72,72a6,6,0,0,1-8.48,0l-72-72a6,6,0,0,1,8.48-8.48L122,201.51V40a6,6,0,0,1,12,0V201.51l61.76-61.75a6,6,0,0,1,8.48,8.48Z`}))],[`regular`,Q.createElement(Q.Fragment,null,Q.createElement(`path`,{d:`M205.66,149.66l-72,72a8,8,0,0,1-11.32,0l-72-72a8,8,0,0,1,11.32-11.32L120,196.69V40a8,8,0,0,1,16,0V196.69l58.34-58.35a8,8,0,0,1,11.32,11.32Z`}))],[`thin`,Q.createElement(Q.Fragment,null,Q.createElement(`path`,{d:`M202.83,146.83l-72,72a4,4,0,0,1-5.66,0l-72-72a4,4,0,0,1,5.66-5.66L124,206.34V40a4,4,0,0,1,8,0V206.34l65.17-65.17a4,4,0,0,1,5.66,5.66Z`}))]]),sr=Q.forwardRef((e,t)=>Q.createElement(Ue,{ref:t,...e,weights:or}));sr.displayName=`ArrowDownIcon`;export{Xn as a,Qn as c,rr as d,Yn as f,er as i,tr as l,ar as n,Zn as o,Bn as p,Jn as r,$n as s,sr as t,nr as u};
|
|
1
|
+
import{i as e,r as t,s as n}from"./engine-CBuzy-Ik.js";import{t as r}from"./react-dom-D6fTz1bt.js";import{Ct as i,_t as a,gt as o,yt as s}from"./common-BNfPX6nt.js";import{C as c,E as l,S as u,T as d,V as f,b as p,w as m,x as h,y as g}from"./kit-DxZIYy5q.js";import{A as _,C as v,Ct as y,Dt as b,Et as x,Ft as S,H as C,Ht as w,J as T,Kt as E,L as D,Lt as ee,Mt as O,N as k,Nt as A,Ot as j,Q as te,Qt as ne,R as M,S as re,St as N,T as P,U as F,Wt as I,X as L,Y as R,Z as ie,Zt as ae,_ as z,a as B,an as V,at as H,b as U,bt as W,c as oe,cn as G,ct as se,d as ce,et as le,f as ue,g as de,gn as K,hn as q,i as fe,j as pe,jt as me,kt as he,lt as ge,mn as _e,mt as ve,n as ye,nn as be,nt as J,o as xe,p as Se,pn as Ce,pt as we,q as Te,r as Ee,rn as De,sn as Oe,t as ke,tn as Ae,tt as je,u as Me,v as Ne,w as Pe,wt as Fe,x as Ie,xt as Le,y as Re,zt as ze}from"./store-BT988jIX.js";import{M as Be,N as Ve,O as He,V as Ue,_ as Y,c as We,d as Ge,f as Ke,g as qe,h as X,i as Je,k as Ye,m as Xe,o as Ze,r as Qe,s as $e,u as et,v as Z,y as tt}from"./button-D5kdANef.js";import{t as nt}from"./utils-BRvE9-Fo.js";import{t as rt}from"./Separator-Cu9cQDBN.js";import{a as it,p as at}from"./composite-CoGyvQjv.js";import{a as ot,d as st,f as ct,r as lt}from"./DialogTitle-5oboyLiq.js";import{r as ut,t as dt}from"./useOpenInteractionType-UhakpAXY.js";import{t as ft}from"./Check.es-b7BdqO2s.js";var Q=n(e(),1);function pt(e){return he&&e.movementX===0&&e.movementY===0}function mt(e,t,n){switch(e){case`vertical`:return t;case`horizontal`:return n;default:return t||n}}function ht(e,t){return mt(t,e===`ArrowUp`||e===`ArrowDown`,e===`ArrowLeft`||e===`ArrowRight`)}function gt(e,t,n){return mt(t,e===`ArrowDown`,n?e===`ArrowLeft`:e===`ArrowRight`)||e===`Enter`||e===` `||e===``}function _t(e,t,n){return mt(t,n?e===Le:e===N,e===W)}function vt(e,t,n,r){return t===`both`||t===`horizontal`&&r?e===`Escape`:mt(t,n?e===N:e===Le,e===y)}function yt(e,t){let{listRef:n,activeIndex:r,onNavigate:i=()=>{},enabled:a=!0,selectedIndex:o=null,allowEscape:s=!1,loopFocus:c=!1,nested:l=!1,rtl:u=!1,virtual:d=!1,focusItemOnOpen:f=`auto`,focusItemOnHover:p=!0,openOnArrowKeyDown:m=!0,disabledIndices:h=void 0,orientation:g=`vertical`,triggerOrientation:_=g,parentOrientation:y,id:C,resetOnPointerLeave:w=!0,externalTree:E,nestedReturnFocusRef:D,grid:ee}=t,O=ee!=null,k=e.useState(`open`),A=e.useState(`floatingElement`),j=e.useState(`domReferenceElement`),te=e.context.dataRef,ne=H(A),M=se(j),N=S(ne),P=re(),F=v(E),L=Q.useRef(f),z=Q.useRef(o??-1),B=Q.useRef(null),V=Q.useRef(!0),U=Z(e=>{i(z.current===-1?null:z.current,e)}),W=Q.useRef(!!A),oe=Q.useRef(k),G=Q.useRef(!1),ce=Q.useRef(!1),ue=Q.useRef(null),de=S(h),q=S(k),fe=S(o),pe=S(w),me=I(),he=I(),_e=Z(()=>{me.cancel();function e(e){d||(ue.current=ct(e,{sync:G.current,preventScroll:!0}))}let t=n.current[z.current],r=ce.current;t&&e(t),(G.current?e=>e():e=>me.request(e))(()=>{let i=n.current[z.current]||t;i&&(t||e(i),we&&(r||!V.current)&&i.scrollIntoView?.({block:`nearest`,inline:`nearest`}))})});Y(()=>{te.current.orientation=g},[te,g]),Y(()=>{k||(B.current=null),k&&f===`auto`||(L.current=f)},[k,f]),Y(()=>{a&&(k&&A?(z.current=o??-1,L.current&&o!=null&&(ce.current=!0,U())):W.current&&(z.current=-1,U()))},[a,k,A,o,U]),Y(()=>{if(a){if(!k)G.current=!1;else if(A){if(r==null){if(G.current=!1,fe.current!=null)return;if(W.current&&(z.current=-1,_e()),(!oe.current||!W.current)&&L.current&&(B.current!=null||L.current===!0&&B.current==null)){let e=0,t=()=>{n.current[0]==null?(e<2&&(e?e=>he.request(e):queueMicrotask)(t),e+=1):(z.current=B.current==null||gt(B.current,_,u)||l?T(n):Te(n),B.current=null,U())};t()}}else ie(n.current,r)||(z.current=r,_e(),ce.current=!1)}}},[a,k,A,r,fe,l,n,_,u,U,_e,he]),Y(()=>{if(!a||A||!F||d||!W.current)return;let e=F.nodesRef.current,t=e.find(e=>e.id===P)?.context?.elements.floating,n=Fe(K(j??t??null)),r=e.some(e=>e.context&&x(e.context.elements.floating,n));t&&!r&&V.current&&t.focus({preventScroll:!0})},[a,A,j,F,P,d]),Y(()=>{oe.current=k,W.current=!!A});let ve=r!=null,ye=Z(e=>{if(!q.current)return;let t=n.current.indexOf(e.currentTarget);t!==-1&&(z.current!==t||r!==t)&&(z.current=t,U(e))}),be=Z(()=>y??F?.nodesRef.current.find(e=>e.id===P)?.context?.dataRef?.current.orientation),xe=Z(()=>T(n,de.current)),Se=Z(t=>{if(V.current=!1,G.current=!0,t.which===229||!q.current&&t.currentTarget===N.current)return;if(l&&vt(t.key,g,u,O)){ht(t.key,be())||J(t),e.setOpen(!1,Ce(De,t.nativeEvent));let n=D?.current??j;Be(n)&&n.focus();return}r!=null&&r!==z.current&&!ie(n.current,r)&&(z.current=r);let i=z.current,a=T(n,h),o=Te(n,h);if(M||(t.key===`Home`&&(J(t),z.current=a,U(t)),t.key===`End`&&(J(t),z.current=o,U(t))),ee!=null){let e=ee(t,z.current,n,g,c,u,h,a,o);if(e!=null&&e!==z.current&&(z.current=e,U(t)),g===`both`)return}if(ht(t.key,g)){J(t);let e=Fe(t.currentTarget.ownerDocument);if(k&&!d&&x(t.currentTarget,e)&&!n.current.some(t=>t!=null&&x(t,e))){z.current=gt(t.key,g,u)?a:o,U(t),r===z.current&&_e();return}let{index:l,wrapped:f}=R(n.current,i,{decrement:!gt(t.key,g,u),loopFocus:c,allowEscape:s,disabledIndices:h,minIndex:a,maxIndex:o});f&&(G.current=!1),z.current=l,U(t)}}),we=Q.useMemo(()=>({onFocus(e){G.current=!0,ye(e)},onClick({currentTarget:e}){d||e.focus({preventScroll:!0})},onMouseMove(e){pt(e)||(G.current=!0,ce.current=!1,p&&ye(e))},onPointerLeave(e){if(!q.current||!V.current||e.pointerType===`touch`)return;G.current=!0;let t=e.relatedTarget;if(p&&!n.current.includes(t)&&pe.current&&(ue.current?.(),ue.current=null,z.current=-1,U(e),!d)){let e=N.current,t=Fe(K(e));e&&x(e,t)&&e.focus({preventScroll:!0})}}}),[ye,q,N,p,n,U,pe,d]),Ee=Q.useMemo(()=>d&&k&&ve&&{"aria-activedescendant":`${C}-${r}`},[d,k,ve,C,r]),Oe=Q.useMemo(()=>({...M?{}:Ee,onKeyDown(t){if(t.key===`Tab`&&t.shiftKey&&k&&!d){let n=b(t.nativeEvent);if(n&&!x(N.current,n))return;J(t);let r=Ce(ae,t.nativeEvent);e.setOpen(!1,r);let i=D?.current??j;!r.isCanceled&&Be(i)&&i.focus()}else Se(t)},onPointerMove(e){pt(e)||(V.current=!0)}}),[Ee,Se,N,M,e,k,d,j,D]),ke=Q.useMemo(()=>{function t(t){e.setOpen(!0,Ce(De,t.nativeEvent,t.currentTarget))}function n(e){f===`auto`&&le(e.nativeEvent)&&(L.current=!d)}function r(e){L.current=f,f===`auto`&&je(e.nativeEvent)&&(L.current=!0)}return{onKeyDown(n){let r=e.select(`open`);V.current=!1;let i=n.key.startsWith(`Arrow`),a=_t(n.key,be(),u),o=ht(n.key,r?g:_),s=(l?a:o)||n.key===`Enter`||n.key.trim()===``;if(d&&r&&(!l||ge(n.currentTarget)))return Se(n);if(r||m||!i){if(s){let e=ht(n.key,be());B.current=l&&e?null:n.key}l?a&&(J(n),r?(z.current=xe(),U(n),d&&N.current?.focus()):t(n)):o&&(fe.current!=null&&(z.current=fe.current),J(n),!r&&m?t(n):Se(n),r&&U(n))}},onFocus(t){t.target===t.currentTarget&&e.select(`open`)&&!d&&(z.current=-1,U(t))},onPointerDown:r,onPointerEnter:r,onMouseDown:n,onClick:n}},[Se,f,xe,l,U,e,m,g,_,be,u,fe,d,N]),Ae=Q.useMemo(()=>({...Ee,...ke}),[Ee,ke]);return Q.useMemo(()=>a?{reference:Ae,floating:Oe,item:we,trigger:ke}:{},[a,Ae,Oe,ke,we])}function bt(e,t){let{listRef:n,elementsRef:r,activeIndex:i,onMatch:a,disabledIndices:o,onTyping:s,enabled:c=!0,resetMs:l=750,selectedIndex:u=null}=t,d=Z(s),f=e.useState(`open`),p=ee(),m=Q.useRef(``),h=Q.useRef(u??i??-1),g=Q.useRef(null),_=Z(e=>{function t(e){return r?.current[e]}function s(e){let n=t(e);return n&&!L(n)||n?.matches(`:disabled`)?!1:o==null||!te(Ze,e,o)}function c(e,t,n=0){if(e.length===0)return-1;let r=(n%e.length+e.length)%e.length,i=t.toLowerCase();for(let t=0;t<e.length;t+=1){let n=(r+t)%e.length;if(e[n]?.toLowerCase().startsWith(i)&&s(n))return n}return-1}let _=n.current;if(m.current.length>0&&e.key===` `&&(J(e),d?.(!0)),m.current.length>0&&m.current[0]!==` `&&c(_,m.current)===-1&&e.key!==` `&&d?.(!1),_==null||e.key.length!==1||e.ctrlKey||e.metaKey||e.altKey)return;f&&e.key!==` `&&(J(e),d?.(!0));let v=m.current===``;v&&(h.current=u??i??-1),_.every((e,t)=>e&&s(t)?e[0]?.toLowerCase()!==e[1]?.toLowerCase():!0)&&m.current===e.key&&(m.current=``,h.current=g.current),m.current+=e.key,p.start(l,()=>{m.current=``,h.current=g.current,d?.(!1)});let y=((v?u??i??-1:h.current)??0)+1,b=c(_,m.current,y);b===-1?e.key!==` `&&(m.current=``,d?.(!1)):(a?.(b,e),g.current=b)}),v=Z(t=>{let n=t.relatedTarget,r=e.select(`domReferenceElement`),i=e.select(`floatingElement`);x(r,n)||x(i,n)||(p.clear(),m.current=``,h.current=g.current,d?.(!1))});Y(()=>{(f||u===null)&&(p.clear(),g.current=null,m.current!==``&&(m.current=``,d?.(!1)))},[f,u,p,d]);let y=Q.useMemo(()=>({onKeyDown:_,onBlur:v}),[_,v]);return Q.useMemo(()=>c?{reference:y,floating:y}:{},[c,y])}var $=t(),xt=Q.createContext(void 0);function St(e){let t=Q.useContext(xt);if(t===void 0&&!e)throw Error(X(33));return t}var Ct=Q.createContext(void 0);function wt(e){let t=Q.useContext(Ct);if(t===void 0&&!e)throw Error(X(36));return t}var Tt=Q.createContext(void 0);function Et(e=!0){let t=Q.useContext(Tt);if(t===void 0&&!e)throw Error(X(25));return t}var Dt=Q.createContext(null);function Ot(e=`root`){let t=Q.useContext(Dt),n=Q.useContext(Ct);return t===null||n===void 0?null:(e===`submenu-trigger`?n.virtualFocus||n.parentVirtualFocus:n.virtualFocus)?t:null}var kt={visible:!0,ref:null};function At(){return kt}function jt(e,t,n=`root`){let r=Ot(n),i=((n===`submenu-trigger`?r?.useSubmenuTrigger:r?.useItem)??At)({label:e.label,children:e.children,render:e.render}),a=et(t,i.ref);return{visible:i.visible,ref:a,props:i.props}}var Mt=Q.createContext(void 0);function Nt(){let e=Q.useContext(Mt);if(e===void 0)throw Error(X(30));return e}function Pt(e){e.preventDefault()}function Ft(e){let{closeOnClick:t,highlighted:n,id:r,nodeId:i,store:a,typingRef:o,itemRef:s,itemMetadata:c}=e,l=wt(),u=Et(!0),d=c.type===`submenu-trigger`,f=d?l.parentVirtualFocus:l.virtualFocus,p=(d&&l.parent.type===`menu`?l.parent.store:l.store).useState(`webkitAriaSelected`,n),{events:m}=a.useState(`floatingTreeRoot`),h=a.useState(`open`),g=u!==void 0,_=!f&&h&&n?0:-1;return Q.useMemo(()=>({id:r,role:`menuitem`,tabIndex:_,"aria-selected":p,onMouseDown:f?Pt:void 0,onKeyDown(e){e.key===` `&&o?.current&&e.preventDefault()},onMouseMove(e){i&&m.emit(`itemhover`,{nodeId:i,target:e.currentTarget})},onClick(e){t&&m.emit(`close`,{domEvent:e.nativeEvent,reason:Ae})},onMouseUp(e){if(u){let t=u.initialCursorPointRef.current;if(u.initialCursorPointRef.current=null,g&&t&&Math.abs(e.clientX-t.x)<=1&&Math.abs(e.clientY-t.y)<=1||g&&!me&&e.button===2)return}s.current&&a.context.allowMouseUpTriggerRef.current&&(!g||e.button===2)&&c.type===`regular-item`&&Ke(s.current,e,{detail:1,pointerType:`mouse`})}}),[t,_,r,m,i,a.context.allowMouseUpTriggerRef,o,s,u,g,c.type,p,f])}var It={type:`regular-item`};function Lt(e){let{closeOnClick:t,disabled:n,highlighted:r,id:i,store:a,typingRef:o=a.context.typingRef,nativeButton:s,itemMetadata:c,nodeId:l}=e,u=Q.useRef(null),{getButtonProps:d,buttonRef:f}=Ge({disabled:n,focusableWhenDisabled:!0,native:s,composite:!0}),p=Ft({closeOnClick:t,highlighted:r,id:i,nodeId:l,store:a,typingRef:o,itemRef:u,itemMetadata:c}),m=Q.useCallback(e=>qe(p,{onMouseEnter(e){c.type===`submenu-trigger`&&c.setActive(e.nativeEvent)}},e,d),[p,d,c]),h=et(u,f);return Q.useMemo(()=>({getItemProps:m,itemRef:h}),[m,h])}var Rt=`data-checked`,zt=`data-unchecked`,Bt={checked(e){return e?{[Rt]:``}:{[zt]:``}},...ze},Vt=Q.forwardRef(function(e,t){let{render:n,className:r,id:i,label:o,nativeButton:s=!1,disabled:c=!1,closeOnClick:l=!1,checked:u=!1,onCheckedChange:d,style:f,...p}=e,{store:m}=wt(),h=a({guess:!0,label:o}),g=q(i),_=m.useState(`disabled`),v=m.useState(`isActive`,h.index),y=m.useState(`floatingNodeId`),b=m.useState(`itemProps`),x=c||_,{getItemProps:S,itemRef:C}=Lt({closeOnClick:l,disabled:x,highlighted:v,id:g,store:m,nativeButton:s,nodeId:y,itemMetadata:It}),w=Q.useMemo(()=>({disabled:x,highlighted:v,checked:u}),[x,v,u]);function T(e){let t=Ce(Ae,e.nativeEvent,void 0,{preventUnmountOnClose:We});d?.(!u,t)}let E=Je(`div`,e,{state:w,stateAttributesMapping:Bt,props:[b,{role:`menuitemcheckbox`,"aria-checked":u,onClick:T},p,S],ref:[C,t,h.ref]});return(0,$.jsx)(Mt.Provider,{value:w,children:E})}),Ht=Q.forwardRef(function(e,t){let{checked:n,defaultChecked:r,onCheckedChange:a,...o}=e,[s,c]=i({controlled:n,default:r??!1,name:`MenuCheckboxItem`,state:`checked`}),l=jt(e,t);function u(e,t){a?.(e,t),t.isCanceled||c(e)}return l.visible?(0,$.jsx)(Vt,{...o,checked:s,onCheckedChange:u,ref:l.ref}):null}),Ut=Q.forwardRef(function(e,t){let{render:n,className:r,style:i,keepMounted:a=!1,...o}=e,s=Nt(),c=Q.useRef(null),{transitionStatus:l,mounted:u,setMounted:d}=w(s.checked);O({batch:!0,enabled:!s.checked,open:s.checked,ref:c,onComplete(){s.checked||d(!1)}});let f={checked:s.checked,disabled:s.disabled,highlighted:s.highlighted,transitionStatus:l};return Je(`span`,e,{state:f,ref:[t,c],stateAttributesMapping:Bt,props:{"aria-hidden":!0,...o},enabled:a||u})}),Wt=Q.createContext(void 0);function Gt(){let e=Q.useContext(Wt);if(e===void 0)throw Error(X(31));return e}var Kt=Q.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,[o,s]=Q.useState(void 0),c=Je(`div`,e,{ref:t,props:{role:`group`,"aria-labelledby":o,...a}});return(0,$.jsx)(Wt.Provider,{value:s,children:c})}),qt=Q.forwardRef(function(e,t){let n=Ot()?.Group??Kt;return(0,$.jsx)(n,{...e,ref:t})}),Jt=Q.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,s=q(a),c=Gt();return Y(()=>(c(s),()=>{c(e=>e===s?void 0:e)}),[c,s]),Je(`div`,e,{ref:t,props:{id:s,"aria-hidden":!0,...o}})}),Yt=Q.forwardRef(function(e,t){let{render:n,className:r,id:i,label:o,nativeButton:s=!1,disabled:c=!1,closeOnClick:l=!0,style:u,...d}=e,{store:f}=wt(),p=a({guess:!0,label:o}),m=q(i),h=f.useState(`disabled`),g=f.useState(`isActive`,p.index),_=f.useState(`floatingNodeId`),v=f.useState(`itemProps`),y=c||h,{getItemProps:b,itemRef:x}=Lt({closeOnClick:l,disabled:y,highlighted:g,id:m,store:f,nativeButton:s,nodeId:_,itemMetadata:It});return Je(`div`,e,{state:{disabled:y,highlighted:g},props:[v,d,b],ref:[x,t,p.ref]})}),Xt=Q.forwardRef(function(e,t){let n=jt(e,t);return n.visible?(0,$.jsx)(Yt,{...e,ref:n.ref}):null}),Zt=Q.createContext(void 0);function Qt(e){let t=Q.useContext(Zt);if(t===void 0&&!e)throw Error(X(69));return t}var $t=Q.createContext(void 0);function en(){return Q.useContext($t)}function tn(e,t){let n=Qe(e.render);if(Q.isValidElement(n)){let e=n.props;if(Object.hasOwn(e,`id`))return e.id??``}return e.id??t}function nn(e,t,n){let r=tn(e,t),i=r===t?void 0:r;return[r,Q.useCallback(e=>n?.(e?i:void 0),[i,n])]}function rn(e,t,n){let r=Qe(e.render),i=Q.isValidElement(r)?r.props:void 0,a=e[`aria-label`]??i?.[`aria-label`],o=e[`aria-labelledby`]??i?.[`aria-labelledby`];return o==null&&!a&&(o=t?t.id||void 0:n||void 0),o}var an=Q.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,id:o,initialFocus:s,...c}=e,{store:l,defaultFloatingId:u,setRenderedFloatingId:d,virtualFocus:f,orientation:h}=wt(),g=en(),{side:_,align:v}=St(),y=Qt(!0)!=null,b=l.useState(`open`),x=l.useState(`transitionStatus`),S=l.useState(`popupProps`),C=l.useState(`mounted`),w=l.useState(`instantType`),T=l.useState(`activeTriggerElement`),E=l.useState(`parent`),D=l.useState(`lastOpenChangeReason`),ee=l.useState(`rootId`),k=l.useState(`floatingRootContext`),A=l.useState(`floatingTreeRoot`),j=l.useState(`closeDelay`),te=l.useState(`hoverEnabled`),ne=l.useState(`disabled`),M=l.useState(`openMethod`),re=l.useState(`activeTriggerId`),N=l.useState(`listElement`),[P,F]=nn(e,u,d),I=rn(e,T,re),L=E.type===`menu`?g:void 0,R=E.type===`context-menu`,ie=s??E.type!==`menu`;s===void 0&&N&&E.type!==`menu`&&(ie=()=>l.state.activeIndex===null&&N),O({open:b,ref:l.context.popupRef,onComplete(){b&&l.context.onOpenChangeComplete?.(!0)}}),Q.useEffect(()=>{function e(e){l.setOpen(!1,Ce(e.reason,e.domEvent))}return A.events.on(`close`,e),()=>{A.events.off(`close`,e)}},[A.events,l]),m(k,{enabled:te&&!ne&&!R&&E.type!==`menubar`,closeDelay:j});let ae=l.useStateSetter(`popupElement`),{parentVirtualFocusRef:z,handleFocus:B}=(Q.useContext(Dt)?.useParentHandoff??sn)(l,E,b,f),V={transitionStatus:x,side:_,align:v,open:b,nested:E.type===`menu`,instant:w},H=Je(`div`,e,{state:V,ref:[t,l.context.popupRef,ae,F],stateAttributesMapping:we,props:[S,{id:P,...N?{role:`presentation`}:{role:`menu`,"aria-orientation":h===`horizontal`?`horizontal`:void 0,"aria-labelledby":I},onKeyDown(e){L?.onPopupKeyDown?.(e),y&&it.has(e.key)&&e.stopPropagation()},onFocus:B},p(x),c,{"data-rootownerid":ee}]}),U=E.type===void 0||R;(T||E.type===`menubar`&&D!==`outside-press`)&&(U=!0);let W=L?.getReturnElement??z;return(0,$.jsx)(st,{context:k,openInteractionType:M,modal:R,disabled:!C,returnFocus:a??W??U,explicitReturnFocus:a===void 0&&W?!1:void 0,initialFocus:ie,restoreFocus:!0,getInsideElements:E.type===void 0?()=>[l.context.beforeTriggerFocusGuardRef.current]:void 0,externalTree:E.type===`menubar`?void 0:A,previousFocusableElement:T,nextFocusableElement:E.type===void 0?l.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:l.context.beforeContentFocusGuardRef,children:H})}),on={parentVirtualFocusRef:void 0,handleFocus:void 0};function sn(){return on}var cn=Q.forwardRef(function(e,t){let n=Ot()?.Popup??an;return(0,$.jsx)(n,{...e,ref:t})}),ln=Q.createContext(void 0);function un(){let e=Q.useContext(ln);if(e===void 0)throw Error(X(32));return e}var dn=Q.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:i,parent:a}=wt();if(!(i.useState(`mounted`)||n))return null;let o=a.type===`menu`||a.type===`menubar`?`group`:void 0;return(0,$.jsx)(ln.Provider,{value:n,children:(0,$.jsx)(P,{ref:t,...r,portalOwnerRole:o})})});function fn(e){let{store:t,domReference:n,positionerElement:r,open:i}=e,a=Q.useRef(null),o=Q.useRef(null),s=A(r);Y(()=>{i||(o.current?.abort(),o.current=null,t.state.instantType===`trigger-change`&&t.set(`instantType`,void 0))},[i,t]),Y(()=>{let e=n,r=a.current;if(e&&(a.current=e),!r||!e||e===r||!t.select(`open`))return;t.set(`instantType`,void 0);let i=new AbortController;return o.current=i,s(()=>{t.select(`open`)&&t.set(`instantType`,`trigger-change`)},i.signal),()=>{i.abort()}},[n,s,t])}var pn=20;function mn(e,t,n,r){let[i,a]=Q.useState(!1);Y(()=>{if(!e||!t||n==null){a(!1);return}let r=K(n).documentElement.clientWidth,i=n.offsetWidth;a(r>0&&i>0&&i>=r-pn)},[e,t,n]),lt(e&&(!t||i),r)}var hn=Q.forwardRef(function(e,t){let{anchor:n,positionMethod:r=`absolute`,className:i,render:a,side:o,align:c,sideOffset:l=0,alignOffset:u=0,collisionBoundary:d=`clipping-ancestors`,collisionPadding:f=5,arrowPadding:p=5,sticky:m=!1,disableAnchorTracking:v=!1,collisionAvoidance:y=_,style:b,...x}=e,{store:S,virtualFocus:C,syncHighlightedItem:w}=wt(),T=un(),E=Et(!0),D=S.useState(`parent`),O=S.useState(`floatingRootContext`),k=S.useState(`floatingTreeRoot`),A=S.useState(`mounted`),j=S.useState(`open`),te=S.useState(`modal`),ne=S.useState(`openMethod`),M=S.useState(`activeTriggerElement`),re=S.useState(`transitionStatus`),N=S.useState(`positionerElement`),P=S.useState(`instantType`),F=S.useState(`adaptiveOrigin`),I=S.useState(`lastOpenChangeReason`),L=S.useState(`floatingNodeId`),R=S.useState(`floatingParentNodeId`),ie=O.useState(`domReferenceElement`),ae=n,z=l,B=u,V=c,H=y;D.type===`context-menu`&&(ae=n??D.context?.anchor,V??=`start`,!o&&V!==`center`&&(B=e.alignOffset??2,z=e.sideOffset??-5));let U=o,W=V;D.type===`menu`?(U??=`inline-end`,W??=`start`,H=e.collisionAvoidance??pe):D.type===`menubar`&&(U??=D.context.orientation===`vertical`?`inline-end`:`bottom`,W??=`start`);let oe=D.type===`context-menu`,se=h({anchor:ae,floatingRootContext:O,positionMethod:E?`fixed`:r,mounted:A,side:U,sideOffset:z,align:W,alignOffset:B,arrowPadding:oe?0:p,collisionBoundary:d,collisionPadding:f,sticky:m,nodeId:L,keepMounted:T,disableAnchorTracking:v,collisionAvoidance:H,shift:oe?{crossAxis:!(`side`in H&&H.side===`flip`),rootBoundary:`layoutViewport`}:void 0,externalTree:k,adaptiveOrigin:F,lazyFlip:C?`placement`:!1});Q.useEffect(()=>{function e(e){e.open&&(e.parentNodeId===L&&S.set(`hoverEnabled`,!1),e.nodeId!==L&&e.parentNodeId===S.select(`floatingParentNodeId`)&&S.setOpen(!1,Ce(G)))}return k.events.on(`menuopenchange`,e),()=>{k.events.off(`menuopenchange`,e)}},[S,k.events,L]),Q.useEffect(()=>{if(S.select(`floatingParentNodeId`)==null)return;function e(e){if(e.open||e.nodeId!==S.select(`floatingParentNodeId`))return;let t=e.reason??`sibling-open`;S.setOpen(!1,Ce(t))}return k.events.on(`menuopenchange`,e),()=>{k.events.off(`menuopenchange`,e)}},[k.events,S]);let ce=ee();Q.useEffect(()=>{j||ce.clear()},[j,ce]),Q.useEffect(()=>{function e(e){if(j&&e.nodeId===S.select(`floatingParentNodeId`)){if(e.target&&M&&M!==e.target){let e=S.select(`closeDelay`);e>0?ce.isStarted()||ce.start(e,()=>{S.setOpen(!1,Ce(G))}):S.setOpen(!1,Ce(G))}else ce.clear()}}return k.events.on(`itemhover`,e),()=>{k.events.off(`itemhover`,e)}},[k.events,j,M,S,ce]),Q.useEffect(()=>{let e={open:j,nodeId:L,parentNodeId:R,reason:S.select(`lastOpenChangeReason`)};k.events.emit(`menuopenchange`,e)},[k.events,j,S,L,R]),fn({store:S,domReference:ie,positionerElement:N,open:j});let le={open:j,side:se.side,align:se.align,anchorHidden:se.anchorHidden,nested:D.type===`menu`,instant:P},ue=D.type===`menubar`&&D.context.modal;mn(j&&(ue||te&&I!==`trigger-hover`),ne===`touch`,N,M);let de=g(e,le,{styles:se.positionerStyles,transitionStatus:re,props:x,refs:[t,S.useStateSetter(`positionerElement`)],hidden:!A,inert:!j}),K=A&&D.type!==`menu`&&(D.type!==`menubar`&&te&&I!==`trigger-hover`||D.type===`menubar`&&D.context.modal),q=null;return D.type===`menubar`?q=D.context.contentElement:D.type===void 0&&(q=M),(0,$.jsxs)(xt.Provider,{value:se,children:[K&&(0,$.jsx)(ot,{ref:D.type===`context-menu`||D.type===`nested-context-menu`?D.context.internalBackdropRef:null,inert:at(!j),cutout:q}),(0,$.jsx)(Re,{id:L,children:(0,$.jsx)(s,{elementsRef:S.context.itemDomElements,labelsRef:S.context.itemLabels,onMapChange:w,children:de})})]})}),gn=Q.createContext(void 0);function _n(){let e=Q.useContext(gn);if(e===void 0)throw Error(X(34));return e}var vn=Q.forwardRef(function(e,t){let{render:n,className:r,value:a,defaultValue:o,onValueChange:s,disabled:c=!1,style:l,"aria-labelledby":u,...d}=e,[f,p]=Q.useState(void 0),[m,h]=i({controlled:a,default:o,name:`MenuRadioGroup`}),g=Z((e,t)=>{s?.(e,t),!t.isCanceled&&h(e)}),_=Je(`div`,e,{state:{disabled:c},ref:t,props:{role:`group`,"aria-labelledby":u??f,"aria-disabled":c||void 0,...d}}),v=Q.useMemo(()=>({value:m,setValue:g,disabled:c}),[m,g,c]);return(0,$.jsx)(Wt.Provider,{value:p,children:(0,$.jsx)(gn.Provider,{value:v,children:_})})}),yn=Q.memo(Q.forwardRef(function(e,t){let n=Ot()?.RadioGroup??vn;return(0,$.jsx)(n,{...e,ref:t})})),bn=Q.createContext(void 0);function xn(){let e=Q.useContext(bn);if(e===void 0)throw Error(X(35));return e}var Sn=Q.forwardRef(function(e,t){let{render:n,className:r,id:i,label:o,nativeButton:s=!1,disabled:c=!1,closeOnClick:l=!1,value:u,style:d,...f}=e,{store:p}=wt(),{value:m,setValue:h,disabled:g}=_n(),_=a({guess:!0,label:o}),v=q(i),y=p.useState(`isActive`,_.index),b=p.useState(`floatingNodeId`),x=p.useState(`itemProps`),S=p.useState(`disabled`),C=c||g||S,w=m===u,{getItemProps:T,itemRef:E}=Lt({closeOnClick:l,disabled:C,highlighted:y,id:v,store:p,nativeButton:s,nodeId:b,itemMetadata:It}),D=Q.useMemo(()=>({disabled:C,highlighted:y,checked:w}),[C,y,w]);function ee(e){let t=Ce(Ae,e.nativeEvent,void 0,{preventUnmountOnClose:We});h(u,t)}let O=Je(`div`,e,{state:D,stateAttributesMapping:Bt,props:[x,{role:`menuitemradio`,"aria-checked":w,onClick:ee},f,T],ref:[E,t,_.ref]});return(0,$.jsx)(bn.Provider,{value:D,children:O})}),Cn=Q.forwardRef(function(e,t){let n=jt(e,t);return n.visible?(0,$.jsx)(Sn,{...e,ref:n.ref}):null}),wn=Q.forwardRef(function(e,t){let{render:n,className:r,style:i,keepMounted:a=!1,...o}=e,s=xn(),c=Q.useRef(null),{transitionStatus:l,mounted:u,setMounted:d}=w(s.checked);O({batch:!0,enabled:!s.checked,open:s.checked,ref:c,onComplete(){s.checked||d(!1)}});let f={checked:s.checked,disabled:s.disabled,highlighted:s.highlighted,transitionStatus:l};return Je(`span`,e,{state:f,stateAttributesMapping:Bt,ref:[t,c],props:{"aria-hidden":!0,...o},enabled:a||u})}),Tn=Q.createContext(null);function En(e){let t=Q.useContext(Tn);if(t===null&&!e)throw Error(X(5));return t}function Dn(e){return e==null?V:e.type.startsWith(`key`)?be:e.type.startsWith(`mouse`)||e.type.startsWith(`pointer`)?Oe:V}var On={...ye,disabled:e=>e.parent.type===`menubar`&&e.parent.context.disabled||e.disabled,modal:e=>(e.parent.type===void 0||e.parent.type===`context-menu`)&&(e.modal??!0),openMethod:e=>e.openMethod,keyboardOpen:e=>e.keyboardOpen,allowMouseEnter:e=>e.allowMouseEnter,highlightItemOnHover:e=>e.highlightItemOnHover,parent:e=>e.parent,rootId:e=>e.parent.type===`menu`?e.parent.store.select(`rootId`):e.parent.type===void 0?e.rootId:e.parent.context.rootId,activeIndex:e=>e.activeIndex,listElement:e=>e.listElement,triggerControlsId:(e,t)=>{let n=ye.triggerPopupId(e,t);return n?e.listElement?.id||n:void 0},filterTriggerProps:e=>e.filterTriggerProps,inputProps:e=>e.inputProps,webkitAriaSelected:(e,t)=>he&&e.inputFocused&&t?!0:void 0,highlightedItemId:e=>e.highlightedItem?.id||void 0,isActive:(e,t)=>e.activeIndex===t,hoverEnabled:e=>e.hoverEnabled,instantType:e=>e.instantType===`trigger-change`&&!ye.open(e)?void 0:e.instantType,lastOpenChangeReason:e=>e.openChangeReason,floatingTreeRoot:e=>e.parent.type===`menu`?e.parent.store.select(`floatingTreeRoot`):e.floatingTreeRoot,floatingNodeId:e=>e.floatingNodeId,floatingParentNodeId:e=>e.floatingParentNodeId,itemProps:e=>e.itemProps,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin,keyboardEventRelay:e=>{if(e.keyboardEventRelay)return e.keyboardEventRelay;if(e.parent.type===`menu`)return e.parent.store.select(`keyboardEventRelay`)}},kn=class extends Ee{constructor(e,t,n=!1){let r=new fe,i=jn(r,t,n,e);super(i,An(r),On),this.observe(`parent`,e=>{e.type===`menu`?this.context.allowMouseUpTriggerRef=e.store.context.allowMouseUpTriggerRef:e.type!==void 0&&(this.context.allowMouseUpTriggerRef=e.context.allowMouseUpTriggerRef)})}subscribeToParentMenu(){let e=this.state.parent;if(e.type!==`menu`)return;let t=e.store.select(`rootId`),n=e.store.select(`floatingTreeRoot`),r=e.store.select(`keyboardEventRelay`);return e.store.subscribe(()=>{let i=e.store.select(`rootId`),a=e.store.select(`floatingTreeRoot`),o=e.store.select(`keyboardEventRelay`);(t!==i||n!==a||r!==o)&&(t=i,n=a,r=o,this.notifyAll())})}setOpen(e,t){this.state.floatingRootContext.context.events.emit(`setOpen`,{open:e,eventDetails:t})}setActiveIndex(e,t,n){if(this.state.activeIndex!==e){let r=(e===null?void 0:this.context.itemDomElements.current[e])===this.context.reportedItem;this.context.highlightReason=r?`none`:t,this.context.highlightEvent=r?void 0:n}this.set(`activeIndex`,e)}highlightItem(e,t,n){let r=this.context.itemDomElements.current.indexOf(e);r>-1&&this.setActiveIndex(r,t,n)}};function An(e){return{positionerRef:Q.createRef(),popupRef:Q.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},highlightReason:`none`,highlightEvent:void 0,reportedItem:void 0,allowMouseUpTriggerRef:{current:!1},virtualFocusRef:void 0,triggerFocusTargetRef:Q.createRef(),beforeTriggerFocusGuardRef:Q.createRef(),beforeContentFocusGuardRef:Q.createRef(),onOpenChangeComplete:void 0,triggerElements:e}}function jn(e,t,n=!1,r){return{...ke(e,t,n),disabled:!1,modal:!0,openMethod:null,keyboardOpen:!1,allowMouseEnter:!1,highlightItemOnHover:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,listElement:null,filterTriggerProps:$e,inputProps:$e,inputFocused:!1,highlightedItem:void 0,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new Pe,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:$e,keyboardEventRelay:void 0,closeDelay:0,adaptiveOrigin:void 0,...r}}var Mn=Q.createContext(null);function Nn(e,t){return(e===`trigger-press`||e===`item-press`)&&t?.detail===0}function Pn(e,t){return e===`list-navigation`||Nn(e,t)}var Fn=D(function(e){let{children:t,open:n,onOpenChange:r,onOpenChangeComplete:i,onItemHighlighted:a,defaultOpen:o=!1,disabled:s=!1,modal:c,loopFocus:l=!0,orientation:u=`vertical`,actionsRef:d,closeParentOnEsc:p=!1,handle:m,triggerId:h,defaultTriggerId:g=null,highlightItemOnHover:_=!0,isSubmenu:v=!1,virtualFocus:y=!1,virtualFocusRef:b,allowEscape:x=!0,resetOnPointerLeave:S=!0}=e,C=Et(!0),w=wt(!0),T=En(!0),E=w?.store,D=w?.virtualFocus??!1,O=Q.useMemo(()=>v&&E?{type:`menu`,store:E}:T?{type:`menubar`,context:T}:C&&!E?{type:`context-menu`,context:C}:{type:void 0},[C,E,T,v]),k=q(),j=q(),[te,M]=Q.useState(void 0),N=(te??j)||void 0,P=re(),F=O.type===`menu`?O.store:void 0,I=(n??o)&&F?.state.transitionStatus===`starting`,L=tt(()=>I?F?.state.instantType:void 0).current,R=tt(()=>{let e=new kn({open:o,openProp:n,activeTriggerId:g,triggerIdProp:h,parent:O,disabled:s,highlightItemOnHover:_,modal:O.type===void 0?c:void 0,rootId:k,instantType:L},N,P!=null);return e.context.virtualFocusRef=b,e}).current;R.useControlledProp(`openProp`,n),R.useControlledProp(`triggerIdProp`,h),R.useContextCallback(`onOpenChangeComplete`,i);let ie=R.useState(`floatingTreeRoot`),ae=Ie(ie),H=R.useState(`open`),W=R.useState(`activeTriggerElement`),G=R.useState(`positionerElement`),se=R.useState(`hoverEnabled`),le=R.useState(`disabled`),de=R.useState(`lastOpenChangeReason`),K=R.useState(`parent`),fe=R.useState(`activeIndex`),pe=R.useState(`keyboardOpen`),me=R.useState(`payload`),he=R.useState(`floatingParentNodeId`),ge=Q.useRef(null),ve=Q.useRef(K.type!==`context-menu`),ye=ee(),J=Q.useRef(!0),we=ee(),Te=he!=null,{openMethod:Ee,triggerProps:De}=dt(H);R.useSyncedValues({disabled:s,highlightItemOnHover:_,modal:K.type===void 0?c:void 0,openMethod:Ee,rootId:k}),ce(R);let{forceUnmount:Oe,transitionStatus:ke}=ue(H,R,()=>{R.set(`allowMouseEnter`,!1)},I),Ae=A(R.context.popupRef);Q.useEffect(()=>{if(L===void 0)return;let e=()=>{R.state.instantType===L&&R.set(`instantType`,void 0)};if(!H){e();return}if(ke!==void 0)return;if(R.context.popupRef.current==null){e();return}let t=new AbortController;return Ae(e,t.signal),()=>{t.abort()}},[L,H,ke,Ae,R]),Y(()=>{C&&!w?R.update({parent:{type:`context-menu`,context:C},floatingNodeId:ae,floatingParentNodeId:P}):(w||!R.select(`activeTriggerElement`))&&R.update({floatingNodeId:ae,floatingParentNodeId:P})},[C,w,ae,P,W,R]),Q.useEffect(()=>{H||(ge.current=null),K.type===`context-menu`&&(H?ye.start(500,()=>{ve.current=!0}):(ye.clear(),ve.current=!1))},[ye,H,K.type]),Y(()=>{!H&&!se&&R.set(`hoverEnabled`,!0)},[H,se,R]);let je=Z((e,t)=>{let n=t.reason;if(!e&&!R.select(`open`)||H===e&&t.trigger===W&&de===n)return;let i=oe(t);if(!e&&t.trigger==null&&(t.trigger=W??void 0),r?.(e,t),t.isCanceled)return;R.state.floatingRootContext.dispatchOpenChange(e,t);let a=t.event;if(e===!1&&n!==`item-press`&&a?.type===`click`&&a.pointerType===`touch`&&!J.current)return;e&&n===`trigger-focus`?(J.current=!1,we.start(300,()=>{J.current=!0})):(J.current=!0,we.clear());let o=!e&&(n===`escape-key`||n==null);ge.current=t.event;let s=Me(R.state,e,t.trigger,i());s.openChangeReason=n,s.keyboardOpen=e&&Pn(n,a),s.instantType=K.type===`menubar`&&(n===`trigger-focus`||n===`focus-out`||n===`trigger-hover`||n===`list-navigation`||n===`sibling-open`)?`group`:Nn(n,a)?`click`:o?`dismiss`:void 0,R.update(s)}),Pe=z({popupStore:R,floatingRootContext:R.state.floatingRootContext,floatingId:N,nested:P!=null,onOpenChange:je}),Fe=Pe.context.events;Y(()=>{let e=({open:e,eventDetails:t})=>je(e,t);return Fe.on(`setOpen`,e),()=>{Fe?.off(`setOpen`,e)}},[Fe,je]),Y(()=>R.subscribeToParentMenu(),[R]);let Le=Q.useCallback(()=>{R.setOpen(!1,Ce(ne))},[R]);Q.useImperativeHandle(d,()=>({unmount:Oe,close:Le}),[Oe,Le]);let Re;K.type===`context-menu`&&(Re=K.context),Q.useImperativeHandle(Re?.positionerRef,()=>G,[G]),Q.useImperativeHandle(Re?.actionsRef,()=>({setOpen:je}),[je]);let ze=Ne(Pe,{enabled:!le,bubbles:{escapeKey:p&&K.type===`menu`},outsidePress(){return K.type!==`context-menu`||ge.current?.type===`contextmenu`||ve.current},externalTree:Te?ie:void 0}),Be=f(),Ve=yt(Pe,{enabled:!le,listRef:R.context.itemDomElements,activeIndex:fe,virtual:y,nested:K.type===`menubar`||!y&&K.type!==void 0,parentOrientation:K.type===`menubar`?K.context.orientation:void 0,loopFocus:l,focusItemOnOpen:y?pe:void 0,allowEscape:y&&l&&x,orientation:u,triggerOrientation:y?`vertical`:u,rtl:Be===`rtl`,disabledIndices:Ze,onNavigate(e,t){R.setActiveIndex(e,Dn(t),t?.nativeEvent)},openOnArrowKeyDown:K.type!==`context-menu`&&!(y&&v),externalTree:!y&&Te?ie:void 0,nestedReturnFocusRef:F?.context.virtualFocusRef,focusItemOnHover:_,resetOnPointerLeave:S}),He=Q.useCallback(e=>{R.context.typingRef.current=e},[R]),Ue=bt(Pe,{enabled:!le&&!y,listRef:R.context.itemLabels,elementsRef:R.context.itemDomElements,activeIndex:fe,resetMs:500,onMatch:(e,t)=>{H&&e!==fe&&R.setActiveIndex(e,be,t.nativeEvent)},onTyping:He}),We=Z(a),Ge=Q.useRef(-1),Ke=Z(()=>{let e=R.state.activeIndex,t=e===null?void 0:R.context.itemDomElements.current[e]??void 0;if(t?.isConnected===!1)return;let n=t===void 0?-1:e;if(Ge.current===n&&R.context.reportedItem===t)return;Ge.current=n,R.context.reportedItem=t,y&&R.set(`highlightedItem`,t);let{highlightReason:r,highlightEvent:i}=R.context;R.context.highlightReason=V,R.context.highlightEvent=void 0,a&&We(t,_e(r,i,{label:t===void 0?void 0:R.context.itemLabels.current[n]??void 0}))});Y(()=>{Ke()},[fe,Ke]);let X=Q.useMemo(()=>{if(!y)return Ve.reference;if(!Ve.trigger)return $e;let{onFocus:e,...t}=Ve.trigger;return t},[y,Ve.reference,Ve.trigger]);R.useSyncedValue(`inputProps`,y?Ve.reference??$e:$e);let Je=Q.useMemo(()=>{let e=qe(Ue.reference,X,ze.reference,{onMouseMove(){R.set(`allowMouseEnter`,!0)}},De);return e[`aria-haspopup`]=`menu`,e[`aria-expanded`]=H,e},[R,Ue.reference,X,ze.reference,De,H]),Ye=Q.useMemo(()=>{let e=qe(Ve.trigger,ze.trigger,De);return e[`aria-haspopup`]=`menu`,e[`aria-expanded`]=!1,e},[Ve.trigger,ze.trigger,De]);tt(()=>(R.update({inactiveTriggerProps:Ye}),null));let Xe=Q.useMemo(()=>qe(B,{onMouseMove(){R.set(`allowMouseEnter`,!0),K.type===`menu`&&R.set(`hoverEnabled`,!1)},onClick(){R.select(`hoverEnabled`)&&R.set(`hoverEnabled`,!1)},onKeyDown(e){let t=R.select(`keyboardEventRelay`);t&&!e.isPropagationStopped()&&t(e)}},Ue.floating,Ve.floating,ze.floating),[K.type,R,Ue.floating,Ve.floating,ze.floating]),Qe=Ve.item??$e;Se(R,{floatingRootContext:Pe,activeTriggerProps:Je,inactiveTriggerProps:Ye,popupProps:Xe,itemProps:Qe});let et=Q.useMemo(()=>({store:R,parent:O,orientation:u,loopFocus:l,allowEscape:x,defaultFloatingId:j,setRenderedFloatingId:M,virtualFocus:y,parentVirtualFocus:D,syncHighlightedItem:Ke}),[R,O,u,l,x,j,y,D,Ke]),nt=typeof t==`function`?t({payload:me}):t,rt=(0,$.jsxs)(Ct.Provider,{value:et,children:[m&&(0,$.jsx)(xe,{handle:m,store:R}),nt]});return(K.type===void 0||K.type===`context-menu`)&&(rt=(0,$.jsx)(U,{externalTree:ie,children:rt})),rt});function In(e){let t=Q.useContext(Mn);if(t===null)return(0,$.jsx)(Fn,{...e});let n=t.Root;return(0,$.jsx)(Mn.Provider,{value:null,children:(0,$.jsx)(n,{...t.options,...e})})}var Ln=5;function Rn(e,t){let n=zn(t);return e.clientX>=n.left-Ln&&e.clientX<=n.right+Ln&&e.clientY>=n.top-Ln&&e.clientY<=n.bottom+Ln}function zn(e){let t=e.getBoundingClientRect(),n=Ye(e);if(j)return t;let r=n.getComputedStyle(e,`::before`),i=n.getComputedStyle(e,`::after`);if(r.content===`none`&&i.content===`none`)return t;let a=parseFloat(r.width)||0,o=parseFloat(r.height)||0,s=parseFloat(i.width)||0,c=parseFloat(i.height)||0,l=Math.max(t.width,a,s),u=Math.max(t.height,o,c),d=l-t.width,f=u-t.height;return{left:t.left-d/2,right:t.right+d/2,top:t.top-f/2,bottom:t.bottom+f/2}}function Bn(e){let{render:t,className:n,style:r,state:i=$e,props:a=Ze,refs:s=Ze,metadata:c,stateAttributesMapping:l,tag:u=`div`,...d}=e,{compositeProps:f,compositeRef:p}=o({metadata:c});return Je(u,e,{state:i,ref:[p,...s],props:[f,...a,d],stateAttributesMapping:l})}function Vn(e){if(Be(e)&&e.hasAttribute(`data-rootownerid`))return e.getAttribute(`data-rootownerid`);if(!Ve(e))return Vn(He(e))}var Hn=n(r(),1);function Un(e,t){function n(n,r,i){let a=n.currentTarget;Hn.flushSync(()=>{e.setOpen(!1,Ce(ae,n.nativeEvent,a))}),C(a.isConnected?a:t.current,r,i)?.focus()}function r(t){n(t,-1,e.select(`positionerElement`))}function i(t){let r=e.select(`positionerElement`);r&&F(t,r)?e.context.beforeContentFocusGuardRef.current?.focus():n(t,1,r)}return{handlePreFocusGuardFocus:r,handleFocusTargetFocus:i}}function Wn(e){let{enabled:t=!0,mouseDownAction:n,open:r}=e,i=Q.useRef(!1);return Q.useMemo(()=>t?{onMouseDown:e=>{(n===`open`&&!r||n===`close`&&r)&&(i.current=!0,K(e.currentTarget).addEventListener(`click`,()=>{i.current=!1},{once:!0}))},onClick:e=>{i.current&&(i.current=!1,e.preventBaseUIHandler())}}:$e,[t,n,r])}var Gn=M(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,id:s,openOnHover:f,delay:p=100,closeDelay:m=0,handle:h,payload:g,..._}=e,y=wt(!0),b=l(h)??y?.store;if(!b)throw Error(X(85));let S=q(s),C=b.useState(`isTriggerActive`,S),w=b.useState(`floatingRootContext`),T=b.useState(`isOpenedByTrigger`,S),D=b.useState(`triggerControlsId`,S),O=Q.useRef(null),A=qn(),j=Xe(!0),te=v(),ne=Q.useMemo(()=>te??new Pe,[te]),M=Ie(ne),N=re(),{registerTrigger:P,isMountedByThisTrigger:F}=de(S,O,b,{payload:g,closeDelay:m,parent:A,floatingTreeRoot:ne,floatingNodeId:M,floatingParentNodeId:N,keyboardEventRelay:j?.relayKeyboardEvent}),I=A.type===`menubar`,L=b.useState(`disabled`),R=a||L||I&&A.context.disabled,{getButtonProps:ie,buttonRef:ae}=Ge({disabled:R,native:o});Q.useEffect(()=>{!T&&A.type===void 0&&(b.context.allowMouseUpTriggerRef.current=!1)},[b,T,A.type]);let z=Q.useRef(null),B=ee(),V=Z(e=>{if(!z.current)return;B.clear(),b.context.allowMouseUpTriggerRef.current=!1;let t=e.target;x(z.current,t)||x(b.select(`positionerElement`),t)||t===z.current||t!=null&&Vn(t)===b.select(`rootId`)||Rn(e,z.current)||ne.events.emit(`close`,{domEvent:e,reason:E})});Q.useEffect(()=>{let e=K(z.current);if(T&&b.select(`lastOpenChangeReason`)===`trigger-hover`)return e.addEventListener(`mouseup`,V,{once:!0}),()=>{e.removeEventListener(`mouseup`,V)}},[T,V,b]);let H=I&&A.context.hasSubmenuOpen,U=c(w,{enabled:(f??H)&&!R&&(!I||H&&!F),handleClose:u({blockPointerEvents:!I}),mouseOnly:!0,move:!1,restMs:A.type===void 0?p:void 0,delay:{close:m},triggerElementRef:O,externalTree:ne,isActiveTrigger:C,isClosing:()=>b.select(`transitionStatus`)===`ending`}),W=Kn(T,b.select(`lastOpenChangeReason`)),oe=ut(w,{enabled:!R,event:T&&I?`click`:`mousedown`,toggle:!0,ignoreMouse:!1,stickIfOpen:A.type===void 0&&W}),G=d(w,{enabled:!R&&H}),se=Wn({open:T,enabled:I,mouseDownAction:`open`}),ce=Q.useMemo(()=>qe(G.reference,oe.reference),[G.reference,oe.reference]),le=b.useState(`triggerProps`,F),ue=b.useState(`filterTriggerProps`),{handlePreFocusGuardFocus:fe,handleFocusTargetFocus:pe}=Un(b,O),me={disabled:R,open:T},he=[z,t,ae,P,O],ge=[ce,U??$e,le,{"aria-haspopup":`menu`,"aria-controls":D,id:S,onMouseDown:e=>{b.select(`open`)||(B.start(200,()=>{b.context.allowMouseUpTriggerRef.current=!0}),K(e.currentTarget).addEventListener(`mouseup`,V,{once:!0}))}},ue,I?{role:`menuitem`}:{},se,_,ie],_e=Je(`button`,e,{enabled:!I,stateAttributesMapping:ve,state:me,ref:he,props:ge});return I?(0,$.jsx)(Bn,{tag:`button`,render:n,className:r,style:i,state:me,refs:he,props:ge,stateAttributesMapping:ve}):T?(0,$.jsxs)(Q.Fragment,{children:[(0,$.jsx)(k,{ref:b.context.beforeTriggerFocusGuardRef,onFocus:fe},`${S}-pre-focus-guard`),(0,$.jsx)(Q.Fragment,{children:_e},S),(0,$.jsx)(k,{ref:b.context.triggerFocusTargetRef,onFocus:pe},`${S}-post-focus-guard`)]}):(0,$.jsx)(Q.Fragment,{children:_e},S)});function Kn(e,t){let n=ee(),[r,i]=Q.useState(!1);return Y(()=>{e&&t===`trigger-hover`?(i(!0),n.start(500,()=>{i(!1)})):e||(n.clear(),i(!1))},[e,t,n]),r}function qn(){let e=En(!0);return Q.useMemo(()=>e?{type:`menubar`,context:e}:{type:void 0},[e])}function Jn({...e}){return(0,$.jsx)(In,{"data-slot":`dropdown-menu`,...e})}function Yn({...e}){return(0,$.jsx)(Gn,{"data-slot":`dropdown-menu-trigger`,...e})}function Xn({align:e=`start`,alignOffset:t=0,side:n=`bottom`,sideOffset:r=4,className:i,...a}){return(0,$.jsx)(dn,{children:(0,$.jsx)(hn,{className:`isolate z-50 outline-none`,align:e,alignOffset:t,side:n,sideOffset:r,children:(0,$.jsx)(cn,{"data-slot":`dropdown-menu-content`,className:nt(`z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95`,i),...a})})})}function Zn({...e}){return(0,$.jsx)(qt,{"data-slot":`dropdown-menu-group`,...e})}function Qn({className:e,inset:t,...n}){return(0,$.jsx)(Jt,{"data-slot":`dropdown-menu-label`,"data-inset":t,className:nt(`px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7`,e),...n})}function $n({className:e,inset:t,variant:n=`default`,...r}){return(0,$.jsx)(Xt,{"data-slot":`dropdown-menu-item`,"data-inset":t,"data-variant":n,className:nt(`group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive`,e),...r})}function er({className:e,children:t,checked:n,inset:r,...i}){return(0,$.jsxs)(Ht,{"data-slot":`dropdown-menu-checkbox-item`,"data-inset":r,className:nt(`relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),checked:n,...i,children:[(0,$.jsx)(`span`,{className:`pointer-events-none absolute right-2 flex items-center justify-center`,"data-slot":`dropdown-menu-checkbox-item-indicator`,children:(0,$.jsx)(Ut,{children:(0,$.jsx)(ft,{"aria-hidden":`true`})})}),t]})}function tr({...e}){return(0,$.jsx)(yn,{"data-slot":`dropdown-menu-radio-group`,...e})}function nr({className:e,children:t,inset:n,...r}){return(0,$.jsxs)(Cn,{"data-slot":`dropdown-menu-radio-item`,"data-inset":n,className:nt(`relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...r,children:[(0,$.jsx)(`span`,{className:`pointer-events-none absolute right-2 flex items-center justify-center`,"data-slot":`dropdown-menu-radio-item-indicator`,children:(0,$.jsx)(wn,{children:(0,$.jsx)(ft,{"aria-hidden":`true`})})}),t]})}function rr({className:e,...t}){return(0,$.jsx)(rt,{"data-slot":`dropdown-menu-separator`,className:nt(`-mx-1 my-1 h-px bg-border`,e),...t})}var ir=new Map([[`bold`,Q.createElement(Q.Fragment,null,Q.createElement(`path`,{d:`M208.49,120.49a12,12,0,0,1-17,0L140,69V216a12,12,0,0,1-24,0V69L64.49,120.49a12,12,0,0,1-17-17l72-72a12,12,0,0,1,17,0l72,72A12,12,0,0,1,208.49,120.49Z`}))],[`duotone`,Q.createElement(Q.Fragment,null,Q.createElement(`path`,{d:`M200,112H56l72-72Z`,opacity:`0.2`}),Q.createElement(`path`,{d:`M205.66,106.34l-72-72a8,8,0,0,0-11.32,0l-72,72A8,8,0,0,0,56,120h64v96a8,8,0,0,0,16,0V120h64a8,8,0,0,0,5.66-13.66ZM75.31,104,128,51.31,180.69,104Z`}))],[`fill`,Q.createElement(Q.Fragment,null,Q.createElement(`path`,{d:`M207.39,115.06A8,8,0,0,1,200,120H136v96a8,8,0,0,1-16,0V120H56a8,8,0,0,1-5.66-13.66l72-72a8,8,0,0,1,11.32,0l72,72A8,8,0,0,1,207.39,115.06Z`}))],[`light`,Q.createElement(Q.Fragment,null,Q.createElement(`path`,{d:`M204.24,116.24a6,6,0,0,1-8.48,0L134,54.49V216a6,6,0,0,1-12,0V54.49L60.24,116.24a6,6,0,0,1-8.48-8.48l72-72a6,6,0,0,1,8.48,0l72,72A6,6,0,0,1,204.24,116.24Z`}))],[`regular`,Q.createElement(Q.Fragment,null,Q.createElement(`path`,{d:`M205.66,117.66a8,8,0,0,1-11.32,0L136,59.31V216a8,8,0,0,1-16,0V59.31L61.66,117.66a8,8,0,0,1-11.32-11.32l72-72a8,8,0,0,1,11.32,0l72,72A8,8,0,0,1,205.66,117.66Z`}))],[`thin`,Q.createElement(Q.Fragment,null,Q.createElement(`path`,{d:`M202.83,114.83a4,4,0,0,1-5.66,0L132,49.66V216a4,4,0,0,1-8,0V49.66L58.83,114.83a4,4,0,0,1-5.66-5.66l72-72a4,4,0,0,1,5.66,0l72,72A4,4,0,0,1,202.83,114.83Z`}))]]),ar=Q.forwardRef((e,t)=>Q.createElement(Ue,{ref:t,...e,weights:ir}));ar.displayName=`ArrowUpIcon`;var or=new Map([[`bold`,Q.createElement(Q.Fragment,null,Q.createElement(`path`,{d:`M208.49,152.49l-72,72a12,12,0,0,1-17,0l-72-72a12,12,0,0,1,17-17L116,187V40a12,12,0,0,1,24,0V187l51.51-51.52a12,12,0,0,1,17,17Z`}))],[`duotone`,Q.createElement(Q.Fragment,null,Q.createElement(`path`,{d:`M200,144l-72,72L56,144Z`,opacity:`0.2`}),Q.createElement(`path`,{d:`M207.39,140.94A8,8,0,0,0,200,136H136V40a8,8,0,0,0-16,0v96H56a8,8,0,0,0-5.66,13.66l72,72a8,8,0,0,0,11.32,0l72-72A8,8,0,0,0,207.39,140.94ZM128,204.69,75.31,152H180.69Z`}))],[`fill`,Q.createElement(Q.Fragment,null,Q.createElement(`path`,{d:`M205.66,149.66l-72,72a8,8,0,0,1-11.32,0l-72-72A8,8,0,0,1,56,136h64V40a8,8,0,0,1,16,0v96h64a8,8,0,0,1,5.66,13.66Z`}))],[`light`,Q.createElement(Q.Fragment,null,Q.createElement(`path`,{d:`M204.24,148.24l-72,72a6,6,0,0,1-8.48,0l-72-72a6,6,0,0,1,8.48-8.48L122,201.51V40a6,6,0,0,1,12,0V201.51l61.76-61.75a6,6,0,0,1,8.48,8.48Z`}))],[`regular`,Q.createElement(Q.Fragment,null,Q.createElement(`path`,{d:`M205.66,149.66l-72,72a8,8,0,0,1-11.32,0l-72-72a8,8,0,0,1,11.32-11.32L120,196.69V40a8,8,0,0,1,16,0V196.69l58.34-58.35a8,8,0,0,1,11.32,11.32Z`}))],[`thin`,Q.createElement(Q.Fragment,null,Q.createElement(`path`,{d:`M202.83,146.83l-72,72a4,4,0,0,1-5.66,0l-72-72a4,4,0,0,1,5.66-5.66L124,206.34V40a4,4,0,0,1,8,0V206.34l65.17-65.17a4,4,0,0,1,5.66,5.66Z`}))]]),sr=Q.forwardRef((e,t)=>Q.createElement(Ue,{ref:t,...e,weights:or}));sr.displayName=`ArrowDownIcon`;export{Xn as a,Qn as c,rr as d,Yn as f,er as i,tr as l,ar as n,Zn as o,Bn as p,Jn as r,$n as s,sr as t,nr as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./engine-CBuzy-Ik.js";import{s as t}from"./kit-
|
|
1
|
+
import{r as e}from"./engine-CBuzy-Ik.js";import{s as t}from"./kit-DxZIYy5q.js";import{t as n}from"./index-Cp944Jof.js";var r=e(),i=()=>(0,r.jsxs)(t,{variant:`destructive`,children:[`No run `,n.useParams().id,`.`]});export{i as notFoundComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./engine-CBuzy-Ik.js";import{s as t}from"./kit-
|
|
1
|
+
import{r as e}from"./engine-CBuzy-Ik.js";import{s as t}from"./kit-DxZIYy5q.js";import{H as n}from"./index-Cp944Jof.js";var r=e(),i=()=>(0,r.jsxs)(t,{variant:`destructive`,children:[`No change `,n.useParams().id,`.`]});export{i as notFoundComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e,r as t,s as n}from"./engine-CBuzy-Ik.js";import{
|
|
1
|
+
import{i as e,r as t,s as n}from"./engine-CBuzy-Ik.js";import{Gn as r,Pr as i,ft as a,gi as o,kt as s,on as c}from"./queries-sOO2EuSp.js";import{M as l,s as u}from"./common-BNfPX6nt.js";import{h as d,m as f,s as p,t as m,z as h}from"./kit-DxZIYy5q.js";import{t as g}from"./Play.es-DGJ1CGhp.js";import{p as _,t as v}from"./index-Cp944Jof.js";import{t as y}from"./workflow-view-CBRoDqLQ.js";var b=n(e()),x=t();function S(){let{id:e}=v.useParams(),{data:t,error:n,dataUpdatedAt:S}=c(a(e)),{run:C,ledger:w}=t,T=s(C.workflow),E=w.at(-1),D=E?.type===`sleep.started`&&E.until<=S?E.until:0,O=(0,b.useMemo)(()=>({...t,at:D}),[t,D]),k=C.workflow===`change`?i(C.runId):void 0;return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(u,{action:k===void 0?T&&(0,x.jsx)(m,{size:`sm`,children:(0,x.jsxs)(o,{to:`/workflows/$name`,params:{name:C.workflow},search:{new:!0},children:[(0,x.jsx)(g,{"aria-hidden":`true`,"data-icon":`inline-start`}),`New run`]})}):(0,x.jsx)(m,{size:`sm`,children:(0,x.jsx)(o,{to:`/changes/$id`,params:{id:k},children:`Review`})}),children:[(0,x.jsx)(f,{id:`run-status`,dot:!0,tone:h[C.status],children:C.status}),C.sandbox!==void 0&&(0,x.jsx)(l,{name:C.sandbox}),(0,x.jsxs)(`span`,{className:`text-muted-foreground`,children:[r(C),` · `,(0,x.jsx)(d,{at:C.createdAt})]})]}),n&&(0,x.jsxs)(p,{variant:`destructive`,children:[`Could not refresh: `,n.message]}),(0,x.jsx)(_,{workflow:C.workflow,status:C.status,ahead:t.ahead}),(0,x.jsx)(y,{name:C.workflow,workflow:T,run:O},C.runId)]})}export{S as component};
|