@lobu/runtime-server 24.5.0 → 24.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/catalogs/connectors.json +342 -4
- package/dist/catalogs/skills.json +1 -1
- package/dist/component.json +1 -1
- package/dist/connectors/linkedin-identity.ts +43 -0
- package/dist/connectors/linkedin.ts +154 -3
- package/dist/connectors/x-like-follow.ts +329 -0
- package/dist/connectors/x.ts +709 -80
- package/dist/dependencies.bun.lock +18 -18
- package/dist/owletto/dist/assets/_-DT3E3BmS.js +3 -0
- package/dist/owletto/dist/assets/_-c1xy7bLu.js +2 -0
- package/dist/owletto/dist/assets/_agentId-CTfoi0-7.js +2 -0
- package/dist/owletto/dist/assets/_agentId-DV8utajn.js +2 -0
- package/dist/owletto/dist/assets/_automationId-DvP3qyYL.js +2 -0
- package/dist/owletto/dist/assets/_connectorKey._connectionId-CL5SivCn.js +2 -0
- package/dist/owletto/dist/assets/_connectorKey.index-tnMwC67b.js +2 -0
- package/dist/owletto/dist/assets/_conversationId-DXN_8m88.js +2 -0
- package/dist/owletto/dist/assets/_eventId-SdpFT7jB.js +2 -0
- package/dist/owletto/dist/assets/_name-CM1AMywz.js +2 -0
- package/dist/owletto/dist/assets/_owner-CaGsXXBW.js +3 -0
- package/dist/owletto/dist/assets/_shape-DGAkETDp.js +2 -0
- package/dist/owletto/dist/assets/_skillKey-Dd4ZHPY8.js +2 -0
- package/dist/owletto/dist/assets/_slug-cRvJQtNo.js +2 -0
- package/dist/owletto/dist/assets/_view-B5I7mmkl.js +2 -0
- package/dist/owletto/dist/assets/_viewKey-Bwn0dyLo.js +2 -0
- package/dist/owletto/dist/assets/_viewKey-YjSYD0wc.js +2 -0
- package/dist/owletto/dist/assets/{accept-invitation-pUl-c1KQ.js → accept-invitation-CQZQ0wwC.js} +2 -2
- package/dist/owletto/dist/assets/{activity-route-view-DN0ZEAzr.js → activity-route-view-CZykJXQp.js} +2 -2
- package/dist/owletto/dist/assets/{agent-card-controls-C5jNWgfq.js → agent-card-controls-DuQJhtqp.js} +2 -2
- package/dist/owletto/dist/assets/{agent-client-setup-list-DbXtJTsO.js → agent-client-setup-list-CpUTAjXf.js} +2 -2
- package/dist/owletto/dist/assets/{agent-connect-pages-DcTuiSt9.js → agent-connect-pages-Br_ycC0z.js} +2 -2
- package/dist/owletto/dist/assets/agent-editor-form-BXQBFHSv.js +2 -0
- package/dist/owletto/dist/assets/{agent-guardrails-route-BJyfalBY.js → agent-guardrails-route-CN7vpC0X.js} +2 -2
- package/dist/owletto/dist/assets/{agent-list-row-rF5LH-3k.js → agent-list-row-BnP6r4pm.js} +2 -2
- package/dist/owletto/dist/assets/{agent-loading-shells-ClY_O6lb.js → agent-loading-shells-_18OREnx.js} +2 -2
- package/dist/owletto/dist/assets/{agent-permissions-matrix-bP1Qihv7.js → agent-permissions-matrix-DSjidWHL.js} +2 -2
- package/dist/owletto/dist/assets/{agent-skill-context-BAaGpvfS.js → agent-skill-context-1DBn7Xc_.js} +2 -2
- package/dist/owletto/dist/assets/{agent-skills-route-Bv5luNdw.js → agent-skills-route-d5jh3oBR.js} +2 -2
- package/dist/owletto/dist/assets/{agent-tab-intro-ednTs4WF.js → agent-tab-intro-DKrC3SQt.js} +2 -2
- package/dist/owletto/dist/assets/{agent-thread-WNk2HapT.js → agent-thread-FyEO-y44.js} +3 -3
- package/dist/owletto/dist/assets/agents-kXojozTU.js +2 -0
- package/dist/owletto/dist/assets/{agents-workbench-bPTjdVS1.js → agents-workbench-CDpJmUVN.js} +2 -2
- package/dist/owletto/dist/assets/{app._appId-DrL5H5lB.js → app._appId-DwNeXRJp.js} +2 -2
- package/dist/owletto/dist/assets/{assist-composer-ClfFEVx7.js → assist-composer-Mn9EfX4X.js} +2 -2
- package/dist/owletto/dist/assets/automation-detail-content-Bs3vwAPd.js +2 -0
- package/dist/owletto/dist/assets/{automation-row-DCHM--aD.js → automation-row-B5Q1B10y.js} +2 -2
- package/dist/owletto/dist/assets/automation-source-list-Dhucq1sI.js +2 -0
- package/dist/owletto/dist/assets/automations-kXojozTU.js +2 -0
- package/dist/owletto/dist/assets/{callback-DRABUOha.js → callback-9xSHyA12.js} +2 -2
- package/dist/owletto/dist/assets/{card-Bdi7VEwo.js → card-g4yxo4Hr.js} +2 -2
- package/dist/owletto/dist/assets/{change-summary-PBoM6Asb.js → change-summary-DeuXQEpb.js} +2 -2
- package/dist/owletto/dist/assets/{claim-CUIG1Oc-.js → claim-B98IhDra.js} +2 -2
- package/dist/owletto/dist/assets/{client-activity-scopes-CXOWB5co.js → client-activity-scopes-BD2HBo-_.js} +2 -2
- package/dist/owletto/dist/assets/{client-rows-36VnmgMK.js → client-rows-x_CxeWkP.js} +2 -2
- package/dist/owletto/dist/assets/{clients-BJRcMk1A.js → clients-Cmp0LmOp.js} +2 -2
- package/dist/owletto/dist/assets/connect-menu-CezOH3s7.js +2 -0
- package/dist/owletto/dist/assets/connect-zUot_0kG.js +2 -0
- package/dist/owletto/dist/assets/connect._clientId-nsGxe6yO.js +2 -0
- package/dist/owletto/dist/assets/connected._clientId-DnclRRXk.js +2 -0
- package/dist/owletto/dist/assets/connected._clientId.activity-CDB8atTX.js +2 -0
- package/dist/owletto/dist/assets/{connected._clientId.index-jSnGvzYs.js → connected._clientId.index-DBNP2mZo.js} +2 -2
- package/dist/owletto/dist/assets/{connection-q1bdnxCN.js → connection-B6fM2KHN.js} +2 -2
- package/dist/owletto/dist/assets/{connection-feed-detail-BIlkK0Pd.js → connection-feed-detail-Ckq-qEbD.js} +2 -2
- package/dist/owletto/dist/assets/{connections-browser-V-3td9DB.js → connections-browser-BXsJqieG.js} +2 -2
- package/dist/owletto/dist/assets/{connector-boxes-lFc-WP83.js → connector-boxes-CbqSFeVm.js} +2 -2
- package/dist/owletto/dist/assets/{connector-page-shell-Cs1SjrYB.js → connector-page-shell-Di6XzkVo.js} +2 -2
- package/dist/owletto/dist/assets/{connector-provenance-aJFeeRIC.js → connector-provenance-BrnasBW4.js} +2 -2
- package/dist/owletto/dist/assets/{connector-scope-lists--vNdbOn0.js → connector-scope-lists-dQnZARCD.js} +2 -2
- package/dist/owletto/dist/assets/{connectors-BsvDMdsQ.js → connectors-DnOUxX_U.js} +2 -2
- package/dist/owletto/dist/assets/{consent-DJV78pnz.js → consent-Byli4yMs.js} +2 -2
- package/dist/owletto/dist/assets/{copy-button-DjMWgrBf.js → copy-button-Ddf7lBjZ.js} +2 -2
- package/dist/owletto/dist/assets/{core.esm-CQzL3ObT.js → core.esm-BsXtvNoI.js} +2 -2
- package/dist/owletto/dist/assets/create-B34eskZ_.js +2 -0
- package/dist/owletto/dist/assets/create-DLB9sXgU.js +2 -0
- package/dist/owletto/dist/assets/{create-jBEuveV1.js → create-YdAnh3ml.js} +2 -2
- package/dist/owletto/dist/assets/create-automation-form-C9PMX7N8.js +3 -0
- package/dist/owletto/dist/assets/create._connectorKey-Bz4OYRiC.js +2 -0
- package/dist/owletto/dist/assets/definition-comparison-B5WgZILB.js +2 -0
- package/dist/owletto/dist/assets/{device-Ba3RsIgb.js → device-DdCoCj-Q.js} +2 -2
- package/dist/owletto/dist/assets/device-pin-tombstone-B06J7Af1.js +2 -0
- package/dist/owletto/dist/assets/device._deviceId-Bh9S4bFp.js +2 -0
- package/dist/owletto/dist/assets/dynamic-schema-form-qWSRtOAv.js +2 -0
- package/dist/owletto/dist/assets/{entity-options-daOOQo7O.js → entity-options-BkU_En_f.js} +2 -2
- package/dist/owletto/dist/assets/entity-page-BPFDHY8q.js +2 -0
- package/dist/owletto/dist/assets/entity-pages-DxgbjLMt.js +2 -0
- package/dist/owletto/dist/assets/entity-type-page-D0ghgRgq.js +2 -0
- package/dist/owletto/dist/assets/event-card-CjA_dLzq.js +2 -0
- package/dist/owletto/dist/assets/{event-detail-DkY95e5b.js → event-detail-CmC-DVrK.js} +2 -2
- package/dist/owletto/dist/assets/{events-feed-B9CZHI_P.js → events-feed-CGzA1w3R.js} +2 -2
- package/dist/owletto/dist/assets/filter-bar-CQ_oE7a9.js +2 -0
- package/dist/owletto/dist/assets/{full-page-spinner-BqmckkOf.js → full-page-spinner-B5xXnKtV.js} +2 -2
- package/dist/owletto/dist/assets/guardrails-DkXatmea.js +2 -0
- package/dist/owletto/dist/assets/identity-BwJy3ixB.js +2 -0
- package/dist/owletto/dist/assets/{index--ZWegctR.js → index-35ehGReZ.js} +2 -2
- package/dist/owletto/dist/assets/index-B9hYiwBw.js +2 -0
- package/dist/owletto/dist/assets/{index-C186T2Rw.js → index-BDl1_w6U.js} +2 -2
- package/dist/owletto/dist/assets/{index-ijqrJaRB.js → index-BdNR51Ua.js} +2 -2
- package/dist/owletto/dist/assets/{index-DdBTTN3y.js → index-BjcZVe7n.js} +52 -52
- package/dist/owletto/dist/assets/{index-CsrT07TJ.js → index-BqAVebvY.js} +2 -2
- package/dist/owletto/dist/assets/index-BvK1fS1J.js +2 -0
- package/dist/owletto/dist/assets/{index-DdYWarql.css → index-CNEpTkgw.css} +1 -1
- package/dist/owletto/dist/assets/index-CRc73k1t.js +2 -0
- package/dist/owletto/dist/assets/index-CYGaSD3y.js +2 -0
- package/dist/owletto/dist/assets/index-CfZGe-zn.js +2 -0
- package/dist/owletto/dist/assets/{index-B0kw2lFL.js → index-CkiyxW4w.js} +2 -2
- package/dist/owletto/dist/assets/index-CzLDNB2E.js +2 -0
- package/dist/owletto/dist/assets/{index-BKrdVwW9.js → index-D-o5iOVd.js} +2 -2
- package/dist/owletto/dist/assets/index-DjYVV1Ml.js +2 -0
- package/dist/owletto/dist/assets/{index-ikp_mTsf.js → index-TkPy_P_u.js} +2 -2
- package/dist/owletto/dist/assets/index-VyAX-asP.js +2 -0
- package/dist/owletto/dist/assets/json-diff-DtZtra_g.js +28 -0
- package/dist/owletto/dist/assets/{list-skeleton-CXDLkYTg.js → list-skeleton-CIHWCi2a.js} +2 -2
- package/dist/owletto/dist/assets/{login-u6LCgDYG.js → login-TWR0vF4_.js} +2 -2
- package/dist/owletto/dist/assets/{logout-JhmuWJEH.js → logout-BA5kojS0.js} +2 -2
- package/dist/owletto/dist/assets/{manage-gear-D8LMhehh.js → manage-gear-C-0BAMbC.js} +2 -2
- package/dist/owletto/dist/assets/{member-scope-gate-4FQ0aanZ.js → member-scope-gate-BQiRAqtx.js} +2 -2
- package/dist/owletto/dist/assets/memory-browse-page-Ba32-vVL.js +74 -0
- package/dist/owletto/dist/assets/{model-jL871x2J.js → model-C2q7WDcS.js} +2 -2
- package/dist/owletto/dist/assets/{model-selector-CgU8SJMF.js → model-selector-B2cjCn0V.js} +2 -2
- package/dist/owletto/dist/assets/models-CZkH5gtj.js +2 -0
- package/dist/owletto/dist/assets/{nav-pill-DrFkuyUQ.js → nav-pill-Bam6s3jj.js} +2 -2
- package/dist/owletto/dist/assets/new-BJst6K0b.js +2 -0
- package/dist/owletto/dist/assets/{new-DgE1pVV0.js → new-Dc5Bbotb.js} +2 -2
- package/dist/owletto/dist/assets/new-DgbivfDe.js +2 -0
- package/dist/owletto/dist/assets/{organization-CKM_oFX3.js → organization-B9U1L-56.js} +2 -2
- package/dist/owletto/dist/assets/peek-pane-content-Cq8P38s3.js +2 -0
- package/dist/owletto/dist/assets/{pending-seed-sml8Uf6e.js → pending-seed-BP3xHM2d.js} +2 -2
- package/dist/owletto/dist/assets/{permissions-BvA9SATv.js → permissions-BVlbeY4u.js} +2 -2
- package/dist/owletto/dist/assets/proposal-review-shell-BED-DO9C.js +2 -0
- package/dist/owletto/dist/assets/public-shell-ready-Diq15_QW.js +2 -0
- package/dist/owletto/dist/assets/{record-activity-C9gVBbF0.js → record-activity-CTLwq8s1.js} +2 -2
- package/dist/owletto/dist/assets/{record-session-R-uHNuby.js → record-session-DOFgdd43.js} +2 -2
- package/dist/owletto/dist/assets/renderer-CHPS-1vD.js +96 -0
- package/dist/owletto/dist/assets/{reset-password-Mx3baeNc.js → reset-password-BmNM-apc.js} +2 -2
- package/dist/owletto/dist/assets/{run-activity-link-CaIBSRQj.js → run-activity-link-Dh1YyCfk.js} +2 -2
- package/dist/owletto/dist/assets/{run-initiator-BvzQJYW9.js → run-initiator-CCxNv0rK.js} +2 -2
- package/dist/owletto/dist/assets/{runs-fFJ1lPnw.js → runs-BntGAKQG.js} +2 -2
- package/dist/owletto/dist/assets/{runs-panel-DEnZHTa5.js → runs-panel-BwTVaRsE.js} +2 -2
- package/dist/owletto/dist/assets/{runs-table-XGnxJl7S.js → runs-table-CYS1jDdL.js} +2 -2
- package/dist/owletto/dist/assets/{schema-type-editor-panel-C0_9VcSs.js → schema-type-editor-panel-v3nR2Oa2.js} +2 -2
- package/dist/owletto/dist/assets/schema-value-BFb7jCBo.js +3 -0
- package/dist/owletto/dist/assets/settings-DBgT60nY.js +2 -0
- package/dist/owletto/dist/assets/{settings-CP4PjMQA.js → settings-DubSpJfg.js} +2 -2
- package/dist/owletto/dist/assets/skills-DDoeRGhJ.js +2 -0
- package/dist/owletto/dist/assets/{source-record-panels-Bh0n4gGw.js → source-record-panels-m8gECt82.js} +2 -2
- package/dist/owletto/dist/assets/{status-dot-Cpq63I7p.js → status-dot-BnQPFrcU.js} +2 -2
- package/dist/owletto/dist/assets/{table-BUqshjxa.js → table-DALHuXPE.js} +2 -2
- package/dist/owletto/dist/assets/{use-automations-BLNjxq2K.js → use-automations-D9hKpufo.js} +2 -2
- package/dist/owletto/dist/assets/{use-login-redirect-CmyQW7GT.js → use-login-redirect-ciwfc-7A.js} +2 -2
- package/dist/owletto/dist/assets/{use-mention-search-dn3ws1WB.js → use-mention-search-CJGCatFS.js} +2 -2
- package/dist/owletto/dist/assets/{use-scroll-sentinel-DRyBMueA.js → use-scroll-sentinel-BWCrmNIB.js} +2 -2
- package/dist/owletto/dist/assets/view-param-filters-CDvwie_f.js +2 -0
- package/dist/owletto/dist/assets/views-access-required-CZ1fvAks.js +2 -0
- package/dist/owletto/dist/index.html +2 -2
- package/dist/server-main.bundle.mjs +5596 -4000
- package/npm-shrinkwrap.json +99 -99
- package/package.json +1 -1
- package/vendor/connector-sdk/package.json +1 -1
- package/vendor/core/dist/contracts/tools/view-host.d.ts +7 -0
- package/vendor/core/dist/contracts/tools/view-host.js +28 -0
- package/vendor/core/dist/contracts/tools/view-runtime.d.ts +2 -4
- package/vendor/core/dist/contracts/tools/view-runtime.js +19 -7
- package/vendor/core/package.json +11 -1
- package/vendor/views/dist/api.d.ts +9 -4
- package/vendor/views/dist/api.js +33 -2
- package/vendor/views/dist/bridge.d.ts +8 -0
- package/vendor/views/dist/bridge.js +12 -2
- package/vendor/views/dist/components.d.ts +4 -2
- package/vendor/views/dist/components.js +29 -14
- package/vendor/views/dist/index.d.ts +1 -1
- package/vendor/views/dist/index.js +1 -1
- package/vendor/views/dist/native.d.ts +327 -0
- package/vendor/views/dist/native.js +57 -0
- package/vendor/views/package.json +1 -1
- package/dist/owletto/dist/assets/_-CCWuGXtQ.js +0 -2
- package/dist/owletto/dist/assets/_-DOJW1D-I.js +0 -3
- package/dist/owletto/dist/assets/_agentId-CJhQbi6k.js +0 -2
- package/dist/owletto/dist/assets/_agentId-DD4K1i6V.js +0 -2
- package/dist/owletto/dist/assets/_automationId-Cbd7B0mP.js +0 -2
- package/dist/owletto/dist/assets/_connectorKey._connectionId-DFpPep9B.js +0 -2
- package/dist/owletto/dist/assets/_connectorKey.index-n3iSDT74.js +0 -2
- package/dist/owletto/dist/assets/_conversationId-B1yGIGA9.js +0 -2
- package/dist/owletto/dist/assets/_eventId-B1H0-vD7.js +0 -2
- package/dist/owletto/dist/assets/_name-D30_V03t.js +0 -2
- package/dist/owletto/dist/assets/_owner-Be8O41u8.js +0 -3
- package/dist/owletto/dist/assets/_shape-C6YbloRh.js +0 -2
- package/dist/owletto/dist/assets/_skillKey-BMPvvoOI.js +0 -2
- package/dist/owletto/dist/assets/_slug-Bc4YIEA2.js +0 -2
- package/dist/owletto/dist/assets/_view-aoFDwEld.js +0 -2
- package/dist/owletto/dist/assets/_viewKey-DuNHc3cc.js +0 -2
- package/dist/owletto/dist/assets/_viewKey-rJ7A1zNx.js +0 -2
- package/dist/owletto/dist/assets/agent-editor-form-CdA5vLr8.js +0 -2
- package/dist/owletto/dist/assets/agents-DY2S2SGE.js +0 -2
- package/dist/owletto/dist/assets/automation-detail-content-dFy1Huas.js +0 -2
- package/dist/owletto/dist/assets/automations-DY2S2SGE.js +0 -2
- package/dist/owletto/dist/assets/calendar-Ck0yOLYu.js +0 -2
- package/dist/owletto/dist/assets/code-editor-DNuRKde1.js +0 -16
- package/dist/owletto/dist/assets/connect-CMcEQWls.js +0 -2
- package/dist/owletto/dist/assets/connect-menu-C-B-1xGR.js +0 -2
- package/dist/owletto/dist/assets/connect._clientId-tGipxP5a.js +0 -2
- package/dist/owletto/dist/assets/connected._clientId-DSGU78eV.js +0 -2
- package/dist/owletto/dist/assets/connected._clientId.activity-CPLbry8R.js +0 -2
- package/dist/owletto/dist/assets/create-BmKx5vq3.js +0 -2
- package/dist/owletto/dist/assets/create-Rt0RbiD4.js +0 -2
- package/dist/owletto/dist/assets/create-automation-form-PEmSLMD6.js +0 -3
- package/dist/owletto/dist/assets/create._connectorKey-DcxhYIYC.js +0 -2
- package/dist/owletto/dist/assets/device-pin-tombstone-C79KIAIK.js +0 -2
- package/dist/owletto/dist/assets/device._deviceId-CIaoq9co.js +0 -2
- package/dist/owletto/dist/assets/entity-avatar-TVKjZxWQ.js +0 -2
- package/dist/owletto/dist/assets/entity-page-BfJXvbxn.js +0 -2
- package/dist/owletto/dist/assets/entity-type-page-BLwH6qa7.js +0 -2
- package/dist/owletto/dist/assets/event-card-DVUB8my6.js +0 -2
- package/dist/owletto/dist/assets/filter-bar-wPaR12SS.js +0 -2
- package/dist/owletto/dist/assets/guardrails-Csusrok2.js +0 -2
- package/dist/owletto/dist/assets/identity-Dmg3STO8.js +0 -2
- package/dist/owletto/dist/assets/index-BUBcNNUY.js +0 -2
- package/dist/owletto/dist/assets/index-BUDr4-Yv.js +0 -2
- package/dist/owletto/dist/assets/index-BYPQWVwD.js +0 -2
- package/dist/owletto/dist/assets/index-BfpaPJPj.js +0 -2
- package/dist/owletto/dist/assets/index-BicNFLBW.js +0 -2
- package/dist/owletto/dist/assets/index-Bsdv5aks.js +0 -2
- package/dist/owletto/dist/assets/index-CX0pJ9j9.js +0 -2
- package/dist/owletto/dist/assets/index-JYEIN8nM.js +0 -2
- package/dist/owletto/dist/assets/json-diff-BaLL4Fsu.js +0 -14
- package/dist/owletto/dist/assets/memory-browse-page-CNZJbCJC.js +0 -74
- package/dist/owletto/dist/assets/models-jdemgIZk.js +0 -2
- package/dist/owletto/dist/assets/new-CcJOd5aH.js +0 -2
- package/dist/owletto/dist/assets/new-OWwrYckd.js +0 -2
- package/dist/owletto/dist/assets/peek-pane-content-D68BjguQ.js +0 -2
- package/dist/owletto/dist/assets/proposal-review-shell-D6KABxah.js +0 -2
- package/dist/owletto/dist/assets/public-shell-ready-BIVCHQHe.js +0 -2
- package/dist/owletto/dist/assets/renderer-DXfJaCCa.js +0 -97
- package/dist/owletto/dist/assets/settings-CgaUJMHH.js +0 -2
- package/dist/owletto/dist/assets/skills-D-e_h3a9.js +0 -2
- package/dist/owletto/dist/assets/view-param-filters-CER47Tlz.js +0 -2
- package/dist/owletto/dist/assets/views-access-required-C_b9itZ2.js +0 -2
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/** Public prop contracts for the native components built by Owletto.
|
|
2
|
+
* Implementations are supplied by the host artifact, using the shell's React. */
|
|
3
|
+
import { createElement, } from "react";
|
|
4
|
+
export const NATIVE_COMPONENT_NAMES = [
|
|
5
|
+
"AutomationDefinition",
|
|
6
|
+
"AgentDefinition",
|
|
7
|
+
"ConnectorDefinition",
|
|
8
|
+
"AutomationReference",
|
|
9
|
+
"AgentReference",
|
|
10
|
+
"ConnectorReference",
|
|
11
|
+
"JsonDiff",
|
|
12
|
+
"EntityListPage",
|
|
13
|
+
"EntityRecordPage",
|
|
14
|
+
"EntityTableView",
|
|
15
|
+
"RecordSpecSheet",
|
|
16
|
+
"SchemaValue",
|
|
17
|
+
"EntityAvatar",
|
|
18
|
+
"Button",
|
|
19
|
+
"Badge",
|
|
20
|
+
"Tabs",
|
|
21
|
+
"TabsList",
|
|
22
|
+
"TabsTrigger",
|
|
23
|
+
"TabsContent",
|
|
24
|
+
];
|
|
25
|
+
export const NATIVE_COMPONENT_GLOBAL = "__lobuViewNative";
|
|
26
|
+
function native(name) {
|
|
27
|
+
return function NativeComponent(props) {
|
|
28
|
+
const registry = globalThis.__lobuViewNative;
|
|
29
|
+
const component = registry?.[name];
|
|
30
|
+
if (!component)
|
|
31
|
+
throw new Error(`Native component ${name} is unavailable in this host runtime.`);
|
|
32
|
+
return createElement(component, props);
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
export const EntityListPage = native("EntityListPage");
|
|
36
|
+
export const EntityRecordPage = native("EntityRecordPage");
|
|
37
|
+
export const EntityTableView = native("EntityTableView");
|
|
38
|
+
export const RecordSpecSheet = native("RecordSpecSheet");
|
|
39
|
+
export const SchemaValue = native("SchemaValue");
|
|
40
|
+
export const EntityAvatar = native("EntityAvatar");
|
|
41
|
+
export const Button = native("Button");
|
|
42
|
+
export const Badge = native("Badge");
|
|
43
|
+
export const Tabs = native("Tabs");
|
|
44
|
+
export const TabsList = native("TabsList");
|
|
45
|
+
export const TabsTrigger = native("TabsTrigger");
|
|
46
|
+
export const TabsContent = native("TabsContent");
|
|
47
|
+
export const AutomationReference = native("AutomationReference");
|
|
48
|
+
export const AgentReference = native("AgentReference");
|
|
49
|
+
export const ConnectorReference = native("ConnectorReference");
|
|
50
|
+
export const JsonDiff = native("JsonDiff");
|
|
51
|
+
/** Instructions, sources, triggers, outputs and code from an Automation snapshot. */
|
|
52
|
+
export const AutomationDefinition = native("AutomationDefinition");
|
|
53
|
+
/** Identity and settings from an Agent snapshot, using the native editor fields. */
|
|
54
|
+
export const AgentDefinition = native("AgentDefinition");
|
|
55
|
+
/** Connector capabilities, schemas and source from a definition snapshot. */
|
|
56
|
+
export const ConnectorDefinition = native("ConnectorDefinition");
|
|
57
|
+
//# sourceMappingURL=native.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{gO as t,w as p,j as a,gP as e,ao as s}from"./index-DdBTTN3y.js";import{A as n}from"./activity-route-view-DN0ZEAzr.js";import"./record-activity-C9gVBbF0.js";import"./filter-bar-wPaR12SS.js";import"./calendar-Ck0yOLYu.js";import"./connection-label-BobuYiAG.js";import"./manage-gear-D8LMhehh.js";import"./runs-fFJ1lPnw.js";import"./source-record-panels-Bh0n4gGw.js";import"./event-card-DVUB8my6.js";import"./run-initiator-BvzQJYW9.js";import"./use-automations-BLNjxq2K.js";import"./clients-BJRcMk1A.js";import"./renderer-DXfJaCCa.js";import"./table-BUqshjxa.js";import"./card-Bdi7VEwo.js";import"./change-summary-PBoM6Asb.js";import"./json-diff-BaLL4Fsu.js";import"./index-Vcq4gwWv.js";import"./copy-button-DjMWgrBf.js";import"./agent-list-row-rF5LH-3k.js";import"./client-rows-36VnmgMK.js";import"./automation-row-DCHM--aD.js";import"./model-jL871x2J.js";import"./events-feed-B9CZHI_P.js";import"./client-activity-scopes-CXOWB5co.js";import"./use-scroll-sentinel-DRyBMueA.js";import"./agent-loading-shells-ClY_O6lb.js";import"./member-scope-gate-4FQ0aanZ.js";import"./runs-panel-DEnZHTa5.js";import"./runs-table-XGnxJl7S.js";import"./nav-pill-DrFkuyUQ.js";import"./public-shell-ready-BIVCHQHe.js";function K(){const{owner:o}=t.useParams(),r=p({select:m=>m.pathname}),i=t.useSearch();return a.jsx(n,{owner:o,search:i,entityScope:e(s(r,1)).path})}export{K as component};
|
|
2
|
-
//# sourceMappingURL=_-CCWuGXtQ.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/entity-page-BfJXvbxn.js","assets/index-DdBTTN3y.js","assets/index-DdYWarql.css","assets/record-activity-C9gVBbF0.js","assets/filter-bar-wPaR12SS.js","assets/calendar-Ck0yOLYu.js","assets/connection-label-BobuYiAG.js","assets/manage-gear-D8LMhehh.js","assets/runs-fFJ1lPnw.js","assets/source-record-panels-Bh0n4gGw.js","assets/event-card-DVUB8my6.js","assets/run-initiator-BvzQJYW9.js","assets/use-automations-BLNjxq2K.js","assets/clients-BJRcMk1A.js","assets/renderer-DXfJaCCa.js","assets/table-BUqshjxa.js","assets/card-Bdi7VEwo.js","assets/change-summary-PBoM6Asb.js","assets/json-diff-BaLL4Fsu.js","assets/index-Vcq4gwWv.js","assets/copy-button-DjMWgrBf.js","assets/agent-list-row-rF5LH-3k.js","assets/client-rows-36VnmgMK.js","assets/automation-row-DCHM--aD.js","assets/model-jL871x2J.js","assets/events-feed-B9CZHI_P.js","assets/client-activity-scopes-CXOWB5co.js","assets/use-scroll-sentinel-DRyBMueA.js","assets/agent-loading-shells-ClY_O6lb.js","assets/member-scope-gate-4FQ0aanZ.js","assets/views-access-required-C_b9itZ2.js","assets/record-session-R-uHNuby.js","assets/entity-avatar-TVKjZxWQ.js","assets/view-param-filters-CER47Tlz.js","assets/app-bridge-C4nPtae3.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{am as x,w as p,an as y,ao as j,ap as P,aq as g,q as R,s as f,t as v,j as e,r as w,ar as E,n as S,_}from"./index-DdBTTN3y.js";import{P as r}from"./public-shell-ready-BIVCHQHe.js";const b=S(async()=>({default:(await _(async()=>{const{EntityPage:a}=await import("./entity-page-BfJXvbxn.js");return{EntityPage:a}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34]))).EntityPage}));function c(){return e.jsx("div",{"data-public-loading":"true",children:e.jsx(E,{})})}function L(){const{owner:a}=x.useParams(),l=p({select:m=>m.pathname}),s=y(j(l)),d=s?.viewKey,{path:u}=P(a,s?.entityPath),{data:t,isLoading:n,error:o}=g(u,{slug:a}),{session:h,isReady:i}=R();return f({active:v({settled:!n,authReady:i,session:h,resolved:!!t,error:o}),owner:a}),n||!i&&!t?e.jsx(c,{}):o||!t||!t.entity?e.jsxs(e.Fragment,{children:[e.jsx(r,{}),e.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[e.jsx("h1",{className:"text-2xl font-semibold",children:"Not Found"}),e.jsx("p",{className:"text-muted-foreground mt-2",children:"We couldn't resolve this path."})]})]}):e.jsxs(e.Fragment,{children:[e.jsx(r,{}),e.jsx(w.Suspense,{fallback:e.jsx(c,{}),children:e.jsx(b,{namespace:t.workspace,path:t.path,entity:t.entity,viewKey:d})})]})}export{L as component};
|
|
3
|
-
//# sourceMappingURL=_-DOJW1D-I.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{hH as r,j as e}from"./index-DdBTTN3y.js";import{A as m}from"./agents-workbench-bPTjdVS1.js";import"./agent-editor-form-CdA5vLr8.js";import"./model-selector-CgU8SJMF.js";import"./proposal-review-shell-D6KABxah.js";import"./runs-fFJ1lPnw.js";import"./nav-pill-DrFkuyUQ.js";function x(){const{owner:o,agentId:t}=r.useParams();return e.jsx(m,{owner:o,agentId:t})}export{x as component};
|
|
2
|
-
//# sourceMappingURL=_agentId-CJhQbi6k.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{c as L,gV as P,r as u,j as n,i as w,cx as k,q as D,at as E,bb as M,b2 as N,d1 as R,cP as O,gW as $,gX as B,bk as Q,E as W}from"./index-DdBTTN3y.js";import{L as q,A as z}from"./agent-thread-WNk2HapT.js";import{n as C}from"./agent-thread-storage-U6htL3ad.js";import{A as F,C as H}from"./agent-loading-shells-ClY_O6lb.js";import"./app-bridge-C4nPtae3.js";import"./pending-seed-sml8Uf6e.js";import"./use-mention-search-dn3ws1WB.js";import"./index-Vcq4gwWv.js";import"./use-automations-BLNjxq2K.js";import"./event-card-DVUB8my6.js";import"./run-initiator-BvzQJYW9.js";import"./clients-BJRcMk1A.js";import"./renderer-DXfJaCCa.js";import"./calendar-Ck0yOLYu.js";import"./table-BUqshjxa.js";import"./card-Bdi7VEwo.js";import"./change-summary-PBoM6Asb.js";import"./json-diff-BaLL4Fsu.js";import"./copy-button-DjMWgrBf.js";import"./agent-list-row-rF5LH-3k.js";import"./client-rows-36VnmgMK.js";import"./automation-row-DCHM--aD.js";import"./model-jL871x2J.js";import"./connection-label-BobuYiAG.js";import"./events-feed-B9CZHI_P.js";import"./client-activity-scopes-CXOWB5co.js";import"./use-scroll-sentinel-DRyBMueA.js";function U({owner:e,agent:s,threadId:t,afterMessagesContent:d,className:r,initialDraft:h,newChatRequested:p=!1,preventAutoNavigate:f}){const o=L(),i=s.agentId,{data:a=[]}=P(i,{orgSlug:e}),[l,x]=u.useState(()=>C()),[g,A]=u.useState(null);u.useEffect(()=>{!p||t||(x(C()),A(null),o({to:".",search:(m=>{const{new:b,...y}=m;return y}),replace:!0}))},[p,t,o]);const v=u.useMemo(()=>!g||a.some(m=>m.id===g.id)?a:[g,...a],[a,g]),c=t??l,T=!t||!v.some(m=>m.id===t),j=u.useCallback(()=>{if(v.some(b=>b.id===c))return;A({id:c,title:`Conversation ${v.length+1}`,createdAt:Date.now(),updatedAt:Date.now()});const m=k(e,i,c);o({...m,replace:!0})},[v,c,o,e,i]),S=u.useCallback(()=>{T&&!f&&j()},[T,j,f]);return n.jsx("div",{className:w("flex min-h-0 flex-1 flex-col",r),children:n.jsx("div",{className:"flex min-h-0 flex-1 flex-col",children:n.jsx(q,{agentId:i,workspaceSlug:e,thread:c,loadHistory:!!t,onFirstUserMessage:S,initialDraft:h,children:n.jsx(z,{afterMessagesContent:d})},`${i}:${c}`)})})}function V({owner:e,agentId:s,threadId:t,initialDraft:d,newChatRequested:r,afterMessagesContent:h,preventAutoNavigate:p}){const{isAuthenticated:f}=D(),{isMember:o,isLoading:i}=E(),a=f&&o,{data:l=[],isLoading:x}=M({enabled:a}),g=s??null,A=l.find(c=>c.agentId===g)??null;return a&&x||i?n.jsx(F,{}):A?n.jsx(U,{owner:e,agent:A,threadId:t,initialDraft:d,newChatRequested:r,afterMessagesContent:h,preventAutoNavigate:p,className:"min-h-0 flex-1 overflow-hidden"}):n.jsx(N,{icon:R,title:"Agent not found",description:"This agent may have been removed."})}function X(e){return[...e].sort((s,t)=>t.updatedAt-s.updatedAt)[0]}function _({owner:e,agentId:s,threadId:t,initialDraft:d,forceComposer:r=!1,newChatRequested:h=!1,afterMessagesContent:p,preventAutoNavigate:f}){const o=L(),{data:i=[],isLoading:a}=O($(e,s,{strict:!1})),l=u.useMemo(()=>X(i),[i]);return u.useEffect(()=>{if(t||r||a||!l)return;const x=k(e,s,l.id);o({...x,replace:!0})},[s,a,l,o,e,t,r]),!t&&!r&&(a||l)?n.jsx(H,{}):n.jsx(V,{owner:e,agentId:s,threadId:t,initialDraft:d,newChatRequested:h,afterMessagesContent:p,preventAutoNavigate:f})}function jt(){const{owner:e,agentId:s}=B.useParams(),{threadId:t}=Q({strict:!1}),{new:d,prompt:r}=W({strict:!1});return n.jsx("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden px-4 pt-2.5 pb-4 lg:px-6 lg:pb-6",children:n.jsx("div",{className:"mx-auto flex min-h-0 w-full max-w-3xl flex-1 flex-col",children:n.jsx(_,{owner:e,agentId:s,threadId:t,initialDraft:r,forceComposer:!t,newChatRequested:!!d})})})}export{jt as component};
|
|
2
|
-
//# sourceMappingURL=_agentId-DD4K1i6V.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{c as k,v as A,aq as L,q as R,at as b,j as t,ak as C,al as _,gS as S,L as d,gT as D,d1 as P,S as $,B as u,e_ as y,hy as g,az as B}from"./index-DdBTTN3y.js";import{A as O}from"./automation-detail-content-dFy1Huas.js";import{R as z}from"./run-activity-link-CaIBSRQj.js";import{b as E}from"./use-automations-BLNjxq2K.js";import"./create-automation-form-PEmSLMD6.js";import"./model-jL871x2J.js";import"./entity-options-daOOQo7O.js";import"./connection-label-BobuYiAG.js";import"./model-selector-CgU8SJMF.js";import"./skill-editor-D_W3QlRz.js";import"./code-editor-DNuRKde1.js";import"./json-diff-BaLL4Fsu.js";import"./index-Vcq4gwWv.js";import"./use-mention-search-dn3ws1WB.js";import"./proposal-review-shell-D6KABxah.js";import"./runs-fFJ1lPnw.js";import"./events-feed-B9CZHI_P.js";import"./event-card-DVUB8my6.js";import"./run-initiator-BvzQJYW9.js";import"./clients-BJRcMk1A.js";import"./renderer-DXfJaCCa.js";import"./calendar-Ck0yOLYu.js";import"./table-BUqshjxa.js";import"./card-Bdi7VEwo.js";import"./change-summary-PBoM6Asb.js";import"./copy-button-DjMWgrBf.js";import"./agent-list-row-rF5LH-3k.js";import"./client-rows-36VnmgMK.js";import"./automation-row-DCHM--aD.js";import"./client-activity-scopes-CXOWB5co.js";import"./use-scroll-sentinel-DRyBMueA.js";function W({owner:a,automationId:e,view:s,runId:o}){const r=k(),{orgContext:x,hasOrgContext:h}=A(),{data:f,isLoading:m}=L(`/${a}`,x),{isAuthenticated:v}=R(),{isLoading:c}=b(),j=f?.workspace?.id??"",N=v?!h||m||c:m||c,i=E(e,void 0,j).data?.automation,n=i?.automation_name??"Automation",l=()=>void r({to:"/$owner/automations",params:{owner:a}}),w=()=>void r({to:"/$owner/automations/$automationId",params:{owner:a,automationId:e},search:{view:"definition",run_id:void 0},replace:!0}),p=!o&&s==="definition";return t.jsx(C,{className:"gap-6 pt-2.5 pb-8",children:t.jsxs(_,{className:"flex min-w-0 flex-col gap-4",children:[t.jsx(S,{crumbs:[t.jsx(d,{to:"/$owner/automations",params:{owner:a},className:D,children:"Automations"},"automations")],current:o?"Review change":n}),t.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[t.jsx("div",{className:"flex min-w-0 items-center gap-2",children:t.jsxs("h1",{className:"flex min-w-0 items-center gap-2 truncate font-display text-xl font-semibold",children:[t.jsx(P,{className:"h-4 w-4 shrink-0 text-muted-foreground","aria-hidden":!0}),N&&!i?t.jsx($,{className:"h-5 w-40"}):o?"Review change":n]})}),t.jsxs("div",{className:"flex items-center gap-2",children:[p?t.jsx(z,{owner:a,filters:{automationIds:[Number(e)],bucket:"automation"},name:n}):null,o?null:p?t.jsx(u,{type:"button",variant:"ghost",size:"sm",className:"h-8 text-muted-foreground hover:text-foreground",onClick:l,children:"Done"}):t.jsx(u,{asChild:!0,variant:"ghost",size:"sm",className:"h-8 gap-1.5",children:t.jsxs(d,{to:"/$owner/automations/$automationId",params:{owner:a,automationId:e},search:{view:"definition",run_id:void 0},children:[t.jsx(y,{className:"h-3.5 w-3.5"}),"Edit"]})})]})]}),t.jsx(O,{owner:a,agentId:i?.managed_agent_id??null,automationId:e,view:s,runId:o,onDone:o?l:w})]})})}function ft(){const{owner:a,automationId:e}=g.useParams(),s=g.useSearch();return t.jsx(B,{owner:a,children:()=>t.jsx(W,{owner:a,automationId:e,view:s.view,runId:s.run_id})})}export{ft as component};
|
|
2
|
-
//# sourceMappingURL=_automationId-Cbd7B0mP.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{iS as I,j as e,az as z,c as J,aG as Q,aH as U,cD as q,d3 as X,S as R,B as Y,L as p,aJ as Z,iD as K,iE as ee,aW as ne,gT as x,gr as se,gR as oe,b8 as ae,i3 as te,gS as ie,aQ as re,F as ce}from"./index-DdBTTN3y.js";import{R as de,c as me,C as le}from"./device-pin-tombstone-C79KIAIK.js";import{C as E}from"./connector-page-shell-Cs1SjrYB.js";import{a as pe}from"./connector-provenance-aJFeeRIC.js";import{f as ue,C as xe,F as he,a as fe,b as ve,A as je,c as Ce}from"./connection-feed-detail-BIlkK0Pd.js";import{S as De,g as Ne}from"./runs-table-XGnxJl7S.js";import{c as ge}from"./connection-label-BobuYiAG.js";import"./run-activity-link-CaIBSRQj.js";import"./connector-scope-lists--vNdbOn0.js";import"./status-dot-Cpq63I7p.js";import"./entity-options-daOOQo7O.js";import"./event-card-DVUB8my6.js";import"./run-initiator-BvzQJYW9.js";import"./use-automations-BLNjxq2K.js";import"./clients-BJRcMk1A.js";import"./renderer-DXfJaCCa.js";import"./calendar-Ck0yOLYu.js";import"./table-BUqshjxa.js";import"./card-Bdi7VEwo.js";import"./change-summary-PBoM6Asb.js";import"./json-diff-BaLL4Fsu.js";import"./index-Vcq4gwWv.js";import"./copy-button-DjMWgrBf.js";import"./agent-list-row-rF5LH-3k.js";import"./client-rows-36VnmgMK.js";import"./automation-row-DCHM--aD.js";import"./model-jL871x2J.js";import"./feed-event-kinds-BYuZCoU4.js";function Ze(){const{owner:m,connectorKey:n,connectionId:v}=I.useParams(),{addFeed:a,feedId:r,settings:h,auth_result:t}=I.useSearch();return e.jsx(z,{owner:m,children:l=>e.jsx($e,{organizationId:l.organizationId,ownerSlug:l.ownerSlug,isWorkspaceLoading:l.isWorkspaceLoading,connectorKey:n,connectionId:Number(v),showAddFeed:a===!0,feedId:r,openSettings:h===!0,authResult:t})})}function $e({organizationId:m,ownerSlug:n,isWorkspaceLoading:v,connectorKey:a,connectionId:r,showAddFeed:h,feedId:t,openSettings:l,authResult:A}){const y=J(),{data:B=[]}=Q(),{data:M=[],isLoading:P,isError:j,refetch:S}=U(m??"",{connectorKey:a,connectionIds:[r]}),{data:g=[]}=q(m??""),{data:T=[],isLoading:W,isError:H,refetch:O}=X(t?r:null),s=M.find(i=>i.id===r),o=g.find(i=>i.key===a),c=t?T.find(i=>i.id===t):null;if(v||P||t&&W||!m)return e.jsxs("div",{className:"flex flex-1 flex-col gap-4",children:[e.jsxs("div",{className:"flex flex-wrap items-baseline gap-x-3 gap-y-1",children:[e.jsx(R,{className:"h-7 w-56"}),e.jsx(R,{className:"h-4 w-24"})]}),e.jsx(de,{})]});if(j||t&&H)return e.jsxs("div",{role:"alert",className:"space-y-2",children:[e.jsxs("p",{children:["Could not load this ",j?"connection":"feed","."]}),e.jsx(Y,{variant:"outline",size:"sm",onClick:()=>void(j?S():O()),children:"Retry"})]});if(!s)return e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"Connection not found."}),e.jsxs(p,{to:"/$owner/connectors/$connectorKey",params:{owner:n,connectorKey:a},className:"mt-2 inline-block text-sm text-primary hover:underline",children:["Back to ",o?.name??a]})]});const $=ge({...s,connector_name:s.connector_name??o?.name??null}),C=!t&&!h,G=()=>void y({to:"/$owner/connectors/$connectorKey/$connectionId",params:{owner:n,connectorKey:a,connectionId:String(r)},search:{},replace:!0});let u,f=$,F,k,D;t?c?(f=ue(c,o),c.store==="channel_messages"?(u=e.jsx(xe,{feed:c,hideHeader:!0}),D="chat channel"):(F=e.jsx(he,{feed:c,ownerSlug:n}),k=e.jsx(fe,{feed:c}),u=e.jsx(ve,{feed:c,connectorDef:o,ownerSlug:n}))):(u=e.jsx("p",{className:"text-sm text-muted-foreground",children:"Feed not found."}),f="Feed"):h&&(u=e.jsx(je,{onClose:G,organizationId:m,connections:[s],connectorDefinitions:g}),f="Add feed",D=Ce);const d=B.find(i=>i.id===s.device_worker_id&&Z(i,n)),w=d?K(d):void 0,N=w?ee(n,w,ne()):void 0,_=[e.jsx(p,{to:"/$owner/connectors",params:{owner:n},className:x,children:"Connectors"},"connectors"),...d&&N?[e.jsx(p,{to:"/$owner/connectors/app/$appId",params:{owner:n,appId:N.id},className:x,children:N.name},"app"),e.jsx(p,{to:"/$owner/connectors/device/$deviceId",params:{owner:n,deviceId:d.id},className:x,children:se(d)},"device")]:[e.jsx(p,{to:"/$owner/connectors/$connectorKey",params:{owner:n,connectorKey:a},search:{},className:x,children:o?.name??a},"connector")]];C||_.push(e.jsx(p,{to:"/$owner/connectors/$connectorKey/$connectionId",params:{owner:n,connectorKey:a,connectionId:String(r)},search:{},className:x,children:$},"connection"));const b=C?me(s):null,V=D??b??void 0,L=e.jsx(oe,{breadcrumb:e.jsx(ie,{crumbs:_}),icon:o?e.jsx(ae,{icon:o.icon,name:o.name,faviconDomain:o.favicon_domain??te(o.auth_schema)}):null,title:f,status:F??e.jsx(De,{status:Ne(s.status),showDot:!0,children:s.status}),meta:k,caption:V,captionTone:b?"error":"muted"});return C?d&&o&&re(o)?e.jsx(ce,{to:"/$owner/connectors/device/$deviceId",params:{owner:n,deviceId:d.id},search:{connection:s.id,settings:l||void 0},hash:`connection-${s.id}`,replace:!0}):e.jsxs(E,{header:L,children:[e.jsx(pe,{connectorDef:o,connectorKey:a,ownerSlug:n,deviceWorkerId:s.device_worker_id,deviceLabel:s.device_label}),e.jsx(le,{embedded:!0,connection:s,connectorDef:o,ownerSlug:n,openSettings:l,authResult:A},s.id)]}):e.jsx(E,{header:L,children:e.jsx("div",{className:"mt-0",children:u})})}export{Ze as component};
|
|
2
|
-
//# sourceMappingURL=_connectorKey._connectionId-DFpPep9B.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{aD as Ae,aE as Pe,aF as Se,aO as le,aL as ee,hO as qe,gt as Ge,j as e,B as j,L as B,aN as oe,gR as se,gS as te,gT as M,hP as Qe,a6 as Ze,hQ as J,r as u,hR as Ne,hS as $e,cO as Je,hT as ye,bt as U,hU as be,H as k,bl as es,bm as ss,bn as ts,bo as as,bp as ns,hK as rs,I as $,bP as H,ab as z,A as Ce,hV as is,hW as ls,e5 as os,hX as cs,bc as ce,hY as ds,hZ as us,h_ as Ee,h$ as De,i0 as _e,dh as Fe,V as _,W as ae,i1 as ms,g9 as hs,i2 as xs,eP as Be,S as w,gu as T,b8 as de,i3 as ps,c as Y,i4 as js,dE as gs,dG as fs,dF as vs,i5 as X,i6 as Ns,az as ys,u as Le,gw as Re,i7 as bs,aR as Cs,i8 as ks,i9 as ws,gs as As,aC as ke,aB as Ps,aH as Ss,b4 as $s,al as F,eH as Ke,b9 as Oe,b5 as Es,i as Ds}from"./index-DdBTTN3y.js";import{C as _s,A as Fs}from"./connect-menu-C-B-1xGR.js";import{C as Bs,A as Ie,a as Ue}from"./connections-browser-V-3td9DB.js";import{C as ne}from"./connector-page-shell-Cs1SjrYB.js";import{C as Ls}from"./connector-provenance-aJFeeRIC.js";import{R as Rs}from"./run-activity-link-CaIBSRQj.js";import"./connection-label-BobuYiAG.js";import"./status-dot-Cpq63I7p.js";function Ks({ownerSlug:s,familyKind:t,familyId:n}){const a=t==="inference",l=Ae({enabled:a}),d=Pe({enabled:a}),h=Se({enabled:!a}),c=a?l:h,o=a?d.data?.find(r=>r.slug===n)?.displayName??n:le(n),p=(a?(l.data??[]).filter(r=>r.kind===n).map(r=>({key:`${ee}${r.slug}`,name:r.displayName||r.slug,status:[r.isDefault?"Default":null,r.status].filter(Boolean).join(" · ")})):(h.data?.sandboxes??[]).filter(r=>r.providerKind===n).map(r=>({key:`${qe}${r.id}`,name:r.name,status:r.connected?"Connected":"Needs credentials"}))).map(r=>({id:r.key,name:r.name,description:r.status,tone:null,link:Ge({to:"/$owner/connectors/$connectorKey",params:{owner:s,connectorKey:r.key},search:{}})})),m=`${a?ee:oe}${n}`;return e.jsx(ne,{header:e.jsx(se,{title:o,breadcrumb:e.jsx(te,{crumbs:[e.jsx(B,{to:"/$owner/connectors",params:{owner:s},className:M,children:"Connectors"},"connectors")]})}),children:e.jsx(Bs,{entries:p,isLoading:c.isLoading,isError:c.isError,onRetry:()=>void c.refetch(),action:a?e.jsx(j,{asChild:!0,variant:"outline",size:"sm",children:e.jsx(B,{to:"/$owner/connectors/$connectorKey",params:{owner:s,connectorKey:m},search:{addAccount:!0},children:"Add connection"})}):e.jsx(Ie,{ownerSlug:s,connectorKey:m})})})}function Os({catalog:s,initialProvider:t,initialSlug:n,allowOAuth:a=!0,initialModel:l,onDone:d}){const h=Qe(),c=Ze(),o=s.find(i=>i.slug===t)??s[0],p=a&&o&&J(o)?"oauth":"api-key",[m,r]=u.useState(o?.slug??""),[f,b]=u.useState(n??o?.slug??""),[x,N]=u.useState(o?.displayName??""),[v,A]=u.useState(o?.baseUrl??""),[D,P]=u.useState(l??o?.defaultModel??""),[E,V]=u.useState(""),[q,K]=u.useState(o?.apiKeyPlaceholder??""),[W,O]=u.useState(p),[L,G]=u.useState(""),[C,re]=u.useState(null),[I,R]=u.useState(!1),[ue,me]=u.useState(!1),g=s.find(i=>i.slug===m),Q=Ne(g?.modalities??[]),he=a&&!!g&&J(g),xe=g?$e(g):!1,pe=he&&W==="oauth",je=xe&&!pe,S=Je().slug,Z=u.useCallback(()=>{me(!0),c.invalidateQueries({queryKey:["inference-providers"]})},[c]),Me=u.useCallback(()=>{c.invalidateQueries({queryKey:["inference-providers"]}),d()},[c,d]),Te=u.useCallback(async()=>{if(!(!S||!g)){R(!0);try{const i=await ye(S,g.slug);if(i.mode!=="redirect")throw new Error("Unexpected sign-in mode");window.open(i.authorizeUrl,"_blank","noreferrer")}catch(i){U.error(i instanceof Error?i.message:"Failed to start sign-in")}finally{R(!1)}}},[S,g]),ze=u.useCallback(async()=>{if(!(!S||!g||!L.trim())){R(!0);try{const i=await be(S,g.slug,{code:L.trim()});if(i.status!=="success")throw new Error(i.error||"Sign-in not complete");Z(),U.success(`Signed in with ${g.displayName}`)}catch(i){U.error(i instanceof Error?i.message:"Failed to complete sign-in")}finally{R(!1)}}},[S,g,L,Z]),Ve=u.useCallback(async()=>{if(!(!S||!g)){R(!0);try{const i=await ye(S,g.slug);if(i.mode!=="device")throw new Error("Unexpected sign-in mode");re({userCode:i.userCode,deviceAuthId:i.deviceAuthId,verificationUrl:i.verificationUrl}),window.open(i.verificationUrl,"_blank","noreferrer")}catch(i){U.error(i instanceof Error?i.message:"Failed to start sign-in")}finally{R(!1)}}},[S,g]),We=u.useCallback(async()=>{if(!(!S||!g||!C)){R(!0);try{const i=await be(S,g.slug,{deviceAuthId:C.deviceAuthId,userCode:C.userCode});if(i.status==="success"){Z(),U.success(`Signed in with ${g.displayName}`);return}re(y=>y&&{...y,message:i.error||"Waiting for approval..."})}catch(i){U.error(i instanceof Error?i.message:"Failed to check status")}finally{R(!1)}}},[S,g,C,Z]),He=g?.supportedAuthTypes.includes("device-code")??!1,Xe=i=>{r(i);const y=s.find(ie=>ie.slug===i);y&&(b(y.slug),N(y.displayName),A(y.baseUrl),P(y.slug===t&&l?l:y.defaultModel??""),K(y.apiKeyPlaceholder),O(a&&J(y)?"oauth":"api-key"),G(""),re(null),me(!1))},ge=/^[a-z0-9][a-z0-9-]*$/.test(f),fe=ge&&je&&E.trim().length>0&&!h.isPending,Ye=i=>{if(i.preventDefault(),!fe)return;const y={};v.trim()&&(y.base_url=v.trim()),D.trim()&&(y.model=D.trim());const ie=Object.keys(y).length>0?{text:y}:void 0;h.mutate({slug:f.trim(),kind:m,displayName:x.trim()||void 0,apiKey:E.trim(),capabilities:ie},{onSuccess:()=>d()})},ve=!!(t&&s.some(i=>i.slug===t));return e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-sm font-medium",children:ve&&g?`Connect ${g.displayName}`:"Add an inference provider"}),e.jsxs("form",{onSubmit:Ye,className:"grid max-w-md gap-3",children:[ve&&g?e.jsx("p",{className:"text-xs text-muted-foreground",children:Q.length>0?`Serves text, plus ${Q.join(", ").toLowerCase()}.`:"Serves text (chat)."}):e.jsxs("div",{className:"grid gap-2",children:[e.jsx(k,{htmlFor:"ip-provider",children:"Provider"}),e.jsxs(es,{value:m,onValueChange:Xe,children:[e.jsx(ss,{id:"ip-provider",className:"w-full",children:e.jsx(ts,{})}),e.jsx(as,{children:s.map(i=>{const y=Ne(i.modalities);return e.jsx(ns,{value:i.slug,children:e.jsxs("span",{className:"flex items-center gap-2",children:[i.iconUrl?e.jsx("img",{src:i.iconUrl,alt:"",className:"h-4 w-4 shrink-0 rounded-sm",loading:"lazy"}):e.jsx(rs,{className:"h-4 w-4 shrink-0 text-muted-foreground"}),i.displayName,y.length>0?e.jsxs("span",{className:"text-xs text-muted-foreground",children:["· ",y.join(", ")]}):null]})},i.slug)})})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:Q.length>0?`Serves text, plus ${Q.join(", ").toLowerCase()}.`:"Serves text (chat)."})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(k,{htmlFor:"ip-display",children:"Name"}),e.jsx($,{id:"ip-display",placeholder:"Friendly name",value:x,onChange:i=>N(i.target.value)})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsxs(k,{htmlFor:"ip-slug",children:["Slug ",e.jsx("span",{className:"ml-1 text-destructive",children:"*"})]}),e.jsx($,{id:"ip-slug",placeholder:"my-provider",value:f,onChange:i=>b(i.target.value),autoComplete:"off",required:!0}),f&&!ge?e.jsx("p",{className:"text-xs text-destructive",children:"Lowercase letters, numbers, and hyphens only."}):e.jsx("p",{className:"text-xs text-muted-foreground",children:"A stable identifier agents reference this provider by."})]}),he&&xe?e.jsxs("div",{className:"grid gap-2",children:[e.jsx(k,{children:"Auth method"}),e.jsxs("div",{className:"inline-flex w-fit rounded-md border border-border p-1",children:[e.jsx(j,{type:"button",size:"sm",variant:W==="oauth"?"secondary":"ghost",onClick:()=>O("oauth"),children:"Sign in"}),e.jsx(j,{type:"button",size:"sm",variant:W==="api-key"?"secondary":"ghost",onClick:()=>O("api-key"),children:"API key"})]})]}):null,je?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(k,{htmlFor:"ip-base-url",children:"Base URL"}),e.jsx($,{id:"ip-base-url",placeholder:"https://api.example.com/v1",value:v,onChange:i=>A(i.target.value),autoComplete:"off"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Override the upstream URL — e.g. a self-hosted vLLM, Azure, or LiteLLM endpoint."})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(k,{htmlFor:"ip-model",children:"Default model"}),e.jsx($,{id:"ip-model",placeholder:"gpt-4o-mini",value:D,onChange:i=>P(i.target.value),autoComplete:"off"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsxs(k,{htmlFor:"ip-key",children:["API key ",e.jsx("span",{className:"ml-1 text-destructive",children:"*"})]}),e.jsx($,{id:"ip-key",type:"password",placeholder:q||void 0,value:E,onChange:i=>V(i.target.value),autoComplete:"off",required:!0}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Stored encrypted in the vault. It's never shown again — rotate it here if it changes."})]}),e.jsx(H,{onCancel:d,children:e.jsx(j,{type:"submit",disabled:!fe,children:h.isPending?e.jsxs(e.Fragment,{children:[e.jsx(z,{size:"lg",className:"mr-2"}),"Creating..."]}):"Create provider"})})]}):pe?e.jsxs("div",{className:"grid gap-3",children:[ue?e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Signed in with ",g?.displayName??"provider",". This covers your agents in this org."]}):He?e.jsxs("div",{className:"grid gap-2",children:[e.jsx(j,{type:"button",variant:"outline",className:"justify-self-start",onClick:()=>void Ve(),disabled:I||!S,children:C?"Get a new code":"Get device code"}),C?e.jsxs("div",{className:"grid gap-2",children:[e.jsx(k,{htmlFor:"ip-device-code",children:"Device code"}),e.jsx($,{id:"ip-device-code",readOnly:!0,value:C.userCode}),e.jsx(j,{type:"button",variant:"default",className:"justify-self-start",asChild:!0,children:e.jsxs("a",{href:C.verificationUrl,target:"_blank",rel:"noreferrer",children:["Open ",g?.displayName??"provider"," to approve",e.jsx(Ce,{className:"h-4 w-4"})]})}),e.jsx("p",{className:"text-xs text-muted-foreground",children:C.message||"We opened the approval page. Enter the code above if asked, approve, then check status."}),e.jsx(j,{type:"button",variant:"outline",className:"justify-self-start",onClick:()=>void We(),disabled:I,children:I?"Checking...":"Check status"})]}):null]}):e.jsxs("div",{className:"grid gap-2",children:[e.jsxs(j,{type:"button",variant:"outline",className:"justify-self-start",onClick:()=>void Te(),disabled:I||!S,children:["Sign in with ",g?.displayName??"provider",e.jsx(Ce,{className:"h-4 w-4"})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(k,{htmlFor:"ip-oauth-code",children:"Paste code#state"}),e.jsx($,{id:"ip-oauth-code",placeholder:"code#state",value:L,onChange:i=>G(i.target.value),autoComplete:"off"})]}),e.jsx(j,{type:"button",className:"justify-self-start",onClick:()=>void ze(),disabled:I||!L.trim(),children:I?"Finishing...":"Finish sign-in"})]}),e.jsx(H,{onCancel:d,children:e.jsx(j,{type:"button",onClick:Me,disabled:!ue,children:"Done"})})]}):e.jsxs("div",{className:"grid gap-3",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"This provider cannot be added from the catalog yet."}),e.jsx(H,{onCancel:d})]})]})]})}const Is={text:"Text",image:"Image",stt:"Speech-to-text",tts:"Text-to-speech"};function Us({provider:s,catalog:t,autoOpenEdit:n}){const a=is(),[l,d]=u.useState(n?"edit":null),h=ls(s.kind,t);u.useEffect(()=>{n&&d("edit")},[n]);const o=(t.find(r=>r.slug===s.kind)?.modalities??["text"]).filter(r=>r!=="text"),p=h&&o.length>0,m=r=>d(f=>f===r?null:r);return e.jsxs("div",{className:"overflow-hidden rounded-lg border",children:[e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3 px-3 py-2",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"truncate text-sm font-medium",children:"Credential"}),e.jsxs("p",{className:"truncate text-[11px] text-muted-foreground",children:[s.slug,s.createdAt?` · created ${os(s.createdAt)}`:""]})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[s.isDefault?null:e.jsx(j,{variant:"outline",size:"sm",className:"h-8 text-xs",disabled:a.isPending,onClick:()=>a.mutate({providerSlug:s.slug}),children:"Set as default"}),p?e.jsx(j,{variant:"outline",size:"sm",className:"h-8 text-xs",onClick:()=>m("capabilities"),children:"Configure"}):null,e.jsx(j,{variant:"outline",size:"sm",className:"h-8 text-xs",onClick:()=>m("edit"),children:"Edit"})]})]}),l==="edit"?e.jsx("div",{className:"border-t px-3 py-3",children:e.jsx(Ts,{provider:s,supportsUpstreamConfig:h,onDone:()=>d(null)})}):null,l==="capabilities"&&p?e.jsx("div",{className:"border-t px-3 py-3",children:e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium",children:"Other modalities (optional)"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"This provider's text base URL and model are set under Edit. Only set these if you want a modality routed to a different endpoint — otherwise it uses the provider's defaults."})]}),o.map(r=>e.jsx(zs,{providerSlug:s.slug,modality:r,block:s.capabilities[r]??{}},r))]})}):null]})}function Ms({provider:s,onDeleted:t}){const n=cs(),[a,l]=u.useState(!1);return e.jsxs("div",{className:"rounded-lg border border-destructive/30 bg-destructive/5 p-4",children:[e.jsx("p",{className:"text-sm font-medium",children:"Delete provider"}),e.jsxs("p",{className:"mt-1 text-xs text-muted-foreground",children:["Removes ",s.displayName||s.slug," and its stored key from this workspace. Agents referencing it will need another connected provider before they can run."]}),e.jsx("div",{className:"mt-3",children:a?e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsxs(j,{variant:"destructive",size:"sm",disabled:n.isPending,onClick:()=>n.mutate({providerSlug:s.slug},{onSuccess:t,onSettled:()=>l(!1)}),children:[n.isPending?e.jsx(z,{size:"md",className:"mr-1.5"}):null,"Confirm delete"]}),e.jsx(j,{variant:"ghost",size:"sm",disabled:n.isPending,onClick:()=>l(!1),children:"Cancel"})]}):e.jsxs(j,{variant:"outline",size:"sm",className:"text-destructive hover:text-destructive",disabled:n.isPending,onClick:()=>l(!0),children:[e.jsx(ce,{className:"mr-1.5 h-3.5 w-3.5"}),"Delete provider"]})})]})}function Ts({provider:s,supportsUpstreamConfig:t,onDone:n}){const a=ds(),l=us(),d=Ee(),[h,c]=u.useState(s.displayName??""),[o,p]=u.useState(""),m=s.capabilities.text??{},[r,f]=u.useState(m.base_url??""),[b,x]=u.useState(m.model??""),[N,v]=u.useState(null),A=h.trim().length>0&&h.trim()!==(s.displayName??""),D=t&&o.trim().length>0,P=r.trim()!==(m.base_url??""),E=b.trim()!==(m.model??""),V=t&&(P||E),q={base_url:r.trim()||void 0,model:b.trim()||void 0,models_endpoint:m.models_endpoint},K=De(q),W=t&&V&&_e(K),O=a.isPending||l.isPending||d.isPending,L=(A||D||V)&&!W&&!O,G=async C=>{if(C.preventDefault(),!!L){v(null);try{await Promise.all([A?a.mutateAsync({providerSlug:s.slug,displayName:h.trim()}):Promise.resolve(),V?d.mutateAsync({providerSlug:s.slug,modality:"text",block:q}):Promise.resolve(),D?l.mutateAsync({providerSlug:s.slug,value:o.trim()}):Promise.resolve()]),n()}catch{v("Some changes could not be saved. Review the fields and try again.")}}};return e.jsxs("form",{onSubmit:G,className:"grid max-w-md gap-3",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(k,{htmlFor:`edit-name-${s.slug}`,children:"Name"}),e.jsx($,{id:`edit-name-${s.slug}`,value:h,onChange:C=>c(C.target.value),placeholder:s.slug}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["The slug (",e.jsx("code",{children:s.slug}),") is fixed — agents reference it."]})]}),t?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(k,{htmlFor:`edit-base-${s.slug}`,children:"Base URL"}),e.jsx($,{id:`edit-base-${s.slug}`,placeholder:"https://api.example.com/v1",value:r,onChange:C=>f(C.target.value),autoComplete:"off"}),K.base_url?e.jsx("p",{className:"text-xs text-destructive",children:K.base_url}):null]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(k,{htmlFor:`edit-model-${s.slug}`,children:"Default model"}),e.jsx($,{id:`edit-model-${s.slug}`,placeholder:"gpt-4o-mini",value:b,onChange:C=>x(C.target.value),autoComplete:"off"}),K.model?e.jsx("p",{className:"text-xs text-destructive",children:K.model}):null]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(k,{htmlFor:`edit-key-${s.slug}`,children:"New API key"}),e.jsx($,{id:`edit-key-${s.slug}`,type:"password",value:o,onChange:C=>p(C.target.value),autoComplete:"off",placeholder:"Leave blank to keep the current key"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Enter a value only to replace the stored key. The old key is discarded."})]})]}):null,N?e.jsx("p",{className:"rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive",children:N}):null,e.jsx(H,{onCancel:n,children:e.jsx(j,{type:"submit",disabled:!L,children:O?e.jsxs(e.Fragment,{children:[e.jsx(z,{size:"lg",className:"mr-2"}),"Saving..."]}):"Save"})})]})}function zs({providerSlug:s,modality:t,block:n}){const a=Ee(),[l,d]=u.useState(!1),[h,c]=u.useState(n.base_url??""),[o,p]=u.useState(n.model??""),[m,r]=u.useState(n.models_endpoint??""),[f,b]=u.useState(!!n.models_endpoint),x=!!(n.base_url||n.model||n.models_endpoint),N={base_url:h.trim()||void 0,model:o.trim()||void 0,models_endpoint:m.trim()||void 0},v=De(N),A=_e(v),D=()=>{A||a.mutate({providerSlug:s,modality:t,block:N})};return e.jsxs("div",{className:Fe,children:[e.jsxs("button",{type:"button",className:"flex w-full items-center justify-between px-3 py-2 text-left",onClick:()=>d(P=>!P),children:[e.jsx("span",{className:"text-sm font-medium",children:Is[t]}),x?e.jsx(_,{variant:"outline",children:"Custom"}):e.jsx("span",{className:"text-xs text-muted-foreground",children:"Static"})]}),l?e.jsxs("div",{className:"grid gap-3 border-t px-3 py-3",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(k,{htmlFor:`base-${s}-${t}`,children:"Base URL"}),e.jsx($,{id:`base-${s}-${t}`,placeholder:"https://api.example.com/v1",value:h,onChange:P=>c(P.target.value),autoComplete:"off"}),v.base_url?e.jsx("p",{className:"text-xs text-destructive",children:v.base_url}):null]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(k,{htmlFor:`model-${s}-${t}`,children:"Model"}),e.jsx($,{id:`model-${s}-${t}`,placeholder:"gpt-4o-mini",value:o,onChange:P=>p(P.target.value),autoComplete:"off"}),v.model?e.jsx("p",{className:"text-xs text-destructive",children:v.model}):null]}),f?e.jsxs("div",{className:"grid gap-2",children:[e.jsx(k,{htmlFor:`endpoint-${s}-${t}`,children:"Models endpoint"}),e.jsx($,{id:`endpoint-${s}-${t}`,placeholder:"/v1/models",value:m,onChange:P=>r(P.target.value),autoComplete:"off"}),v.models_endpoint?e.jsx("p",{className:"text-xs text-destructive",children:v.models_endpoint}):e.jsx("p",{className:"text-xs text-muted-foreground",children:"Path used to list this modality's models (e.g. /v1/models)."})]}):e.jsx("button",{type:"button",className:"justify-self-start text-xs text-muted-foreground hover:text-foreground",onClick:()=>b(!0),children:"Advanced"}),e.jsx(H,{onCancel:()=>d(!1),children:e.jsx(j,{size:"sm",disabled:A||a.isPending,onClick:D,children:a.isPending?e.jsxs(e.Fragment,{children:[e.jsx(z,{size:"lg",className:"mr-2"}),"Saving..."]}):"Save"})})]}):null]})}function Vs({sandbox:s}){const t=Object.entries(s.details??{});return e.jsx("div",{className:"space-y-6",children:e.jsxs("div",{className:"rounded-lg border p-4 space-y-3",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx(Hs,{kind:s.providerKind}),e.jsx("span",{className:"text-sm font-medium",children:s.name}),e.jsx(_,{variant:"secondary",className:"h-4 px-1.5 py-0 text-[10px] uppercase tracking-wide",children:s.providerKind}),s.connected?e.jsx(_,{className:"h-4 border-transparent bg-emerald-500/10 px-1.5 py-0 text-[10px] uppercase tracking-wide text-emerald-500",children:"Connected"}):e.jsx(_,{variant:"destructive",className:"h-4 border-transparent bg-destructive/10 px-1.5 py-0 text-[10px] uppercase tracking-wide text-destructive",children:"No credential"})]}),t.length>0?e.jsx("p",{className:"font-mono text-[11px] text-muted-foreground",children:t.map(([n,a])=>`${n}: ${a}`).join(" | ")}):e.jsx("p",{className:"text-sm text-muted-foreground",children:"Remote sandbox agents execute in instead of the built-in local runtime."}),s.connected?null:e.jsxs("div",{className:"flex gap-2 rounded-md border border-amber-200 bg-amber-50 p-3 text-sm text-amber-950 dark:border-amber-900/60 dark:bg-amber-950/30 dark:text-amber-100",children:[e.jsx(ae,{className:"mt-0.5 h-4 w-4 shrink-0"}),e.jsx("p",{children:"This sandbox has no vault credential. Delete it and re-add the provider with a valid key, or set the credential via the API."})]})]})})}function Ws({sandbox:s,onDeleted:t}){const n=ms(),[a,l]=u.useState(!1);return e.jsx("div",{className:"space-y-6",children:e.jsxs("div",{className:"rounded-lg border border-destructive/30 p-4 space-y-3",children:[e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(ce,{className:"mt-0.5 h-4 w-4 shrink-0 text-destructive"}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-sm font-medium",children:"Remove sandbox"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Agents pinned to this runtime fall back to the built-in local sandbox."})]})]}),a?e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(j,{variant:"destructive",size:"sm",disabled:n.isPending,onClick:()=>n.mutate({id:s.id},{onSuccess:t}),children:n.isPending?e.jsx(z,{}):"Delete permanently"}),e.jsx(j,{variant:"ghost",size:"sm",onClick:()=>l(!1),children:"Cancel"})]}):e.jsx(j,{variant:"outline",size:"sm",className:"text-destructive hover:text-destructive",onClick:()=>l(!0),children:"Delete sandbox"})]})})}function Hs({kind:s}){return s==="vercel"?e.jsxs("svg",{viewBox:"0 0 24 24",className:"h-4 w-4 shrink-0 fill-foreground","aria-hidden":!0,children:[e.jsx("title",{children:"Vercel"}),e.jsx("path",{d:"M12 3 22 20H2L12 3Z"})]}):s==="builtin"?e.jsx(hs,{className:"h-4 w-4 shrink-0 text-muted-foreground"}):e.jsx(xs,{className:"h-4 w-4 shrink-0 text-muted-foreground"})}const Xs={data:!1,chat:!1,actions:!1,audience:!1,inference:!0,runtime:!1},Ys={data:!1,chat:!1,actions:!1,audience:!1,inference:!1,runtime:!0};function jt(){const{owner:s,connectorKey:t}=X.useParams(),{instances:n}=X.useSearch(),{kind:a,id:l}=Ns(t);return e.jsx(ys,{owner:s,children:({ownerSlug:d,organizationId:h,isWorkspaceLoading:c})=>{if(n&&(a==="inference"||a==="sandbox-provider"))return e.jsx(Ks,{ownerSlug:d,familyKind:a,familyId:l});switch(a){case"inference":return e.jsx(Qs,{ownerSlug:d,providerSlug:l});case"sandbox":return e.jsx(Gs,{ownerSlug:d,sandboxId:l});case"sandbox-provider":return e.jsx(qs,{ownerSlug:d,providerKind:l});default:return e.jsx(st,{ownerSlug:d,organizationId:h,isWorkspaceLoading:c,connectorKey:t})}}})}function qs({ownerSlug:s,providerKind:t}){const n=Y();return u.useEffect(()=>{n({to:"/$owner/connectors/create/$connectorKey",params:{owner:s,connectorKey:`${oe}${t}`},replace:!0})},[n,s,t]),null}function Gs({ownerSlug:s,sandboxId:t}){const n=Y(),{data:a,isLoading:l,isError:d,refetch:h}=Se(),c=a?.sandboxes.find(p=>p.id===t)??null;if(l)return e.jsxs(F,{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(w,{className:"h-6 w-6 rounded"}),e.jsx(w,{className:"h-5 w-40"})]}),e.jsx(w,{className:"h-24 w-full rounded-lg"})]});if(d)return e.jsx(F,{children:e.jsxs("div",{role:"alert",children:[e.jsx("p",{children:"Could not load this instance."}),e.jsx(j,{variant:"outline",onClick:()=>void h(),children:"Retry"})]})});if(!c)return e.jsxs(F,{className:"space-y-3",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"This sandbox isn't in this workspace, so its details aren't available."}),e.jsx(j,{variant:"outline",size:"sm",onClick:()=>void n({to:"/$owner/connectors",params:{owner:s}}),children:"Back to connectors"})]});const o=c.name||le(c.providerKind);return e.jsx("div",{className:"flex flex-1 flex-col",children:e.jsxs(ne,{header:e.jsx(se,{breadcrumb:e.jsx(te,{crumbs:[e.jsx(B,{to:"/$owner/connectors",params:{owner:s},className:M,children:"Connectors"},"connectors"),e.jsx(B,{to:"/$owner/connectors/$connectorKey",params:{owner:s,connectorKey:`${oe}${c.providerKind}`},search:{instances:!0},className:M,children:le(c.providerKind)},"family")]}),icon:e.jsx(de,{name:o,faviconDomain:Es(c.providerKind)}),title:o,badge:e.jsxs(e.Fragment,{children:[e.jsx(_,{variant:"secondary",children:c.providerKind}),c.connected?e.jsx(_,{className:"border-transparent bg-emerald-500/10 text-emerald-500",children:"Connected"}):e.jsx(_,{variant:"destructive",children:"No credential"})]}),status:e.jsx(Oe,{facets:Ys})}),children:[e.jsx(Vs,{sandbox:c}),e.jsx(T,{title:"Settings",muted:!0,children:e.jsx(Ws,{sandbox:c,onDeleted:()=>void n({to:"/$owner/connectors",params:{owner:s}})})})]})})}function Qs({ownerSlug:s,providerSlug:t}){const n=Y(),{model:a,reason:l,agentId:d,addAccount:h}=X.useSearch(),{data:c=[],isLoading:o,isError:p,refetch:m}=Ae(),r=Pe(),{data:f=[],isLoading:b}=r,x=h?null:c.find(E=>E.slug===t)??null,N=f.find(E=>E.slug===(x?.kind??t))??null;if(o||b)return e.jsx("div",{children:e.jsxs(F,{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(w,{className:"h-6 w-6 rounded"}),e.jsx(w,{className:"h-5 w-40"})]}),e.jsx(w,{className:"h-16 w-full rounded-lg"}),e.jsx(w,{className:"h-24 w-full rounded-lg"}),e.jsx(w,{className:"h-32 w-full rounded-lg"})]})});if(p)return e.jsx(F,{children:e.jsxs("div",{role:"alert",children:[e.jsx("p",{children:"Could not load this account."}),e.jsx(j,{variant:"outline",onClick:()=>void m(),children:"Retry"})]})});if(!x&&!N&&!r.isError)return e.jsxs(F,{className:"space-y-3",children:[e.jsx(Ke,{connector:{key:t,name:t},showDescription:!1,className:"gap-2"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"This connector isn't installed in this workspace, so its details aren't available."})]});const v=x?x.displayName||x.slug:N?.displayName||t,A=x!==null,D=l?e.jsx(et,{agentId:d,model:a,providerName:v}):a?e.jsx(Js,{providerName:v,model:a,isConnected:A}):null,P=e.jsx(se,{breadcrumb:e.jsx(te,{crumbs:[e.jsx(B,{to:"/$owner/connectors",params:{owner:s},className:M,children:"Connectors"},"connectors"),...x?[e.jsx(B,{to:"/$owner/connectors/$connectorKey",params:{owner:s,connectorKey:`${ee}${x.kind}`},search:{instances:!0},className:M,children:N?.displayName??x.kind},"family")]:[]]}),icon:e.jsx(de,{iconUrl:N?.iconUrl,name:v}),title:v,badge:x?e.jsxs(e.Fragment,{children:[x.isDefault?e.jsx(_,{variant:"secondary",children:"Default"}):null,x.status?e.jsx(_,{variant:"outline",children:x.status}):null,x.hasCustomUpstream?e.jsx(_,{variant:"outline",children:"Custom upstream"}):null]}):null,status:e.jsx(Oe,{facets:Xs})});return e.jsx("div",{className:"flex flex-1 flex-col",children:e.jsxs(ne,{header:P,children:[D,e.jsx("div",{className:"space-y-6",children:x?e.jsx(Us,{provider:x,catalog:f,autoOpenEdit:!!a}):e.jsx(Zs,{ownerSlug:s,providerSlug:t,existingSlugs:c.map(E=>E.slug),catalog:f,catalogError:r.isError?r.error:null,model:a})}),x?e.jsx(T,{title:"Settings",muted:!0,children:e.jsx(Ms,{provider:x,onDeleted:()=>void n({to:"/$owner/connectors",params:{owner:s}})})}):null]})})}function Zs({ownerSlug:s,providerSlug:t,existingSlugs:n,catalog:a,catalogError:l,model:d}){const h=Y(),c=a.find(m=>m.slug===t),o=n.includes(t)&&!!c&&J(c);let p=t;for(let m=2;n.includes(p);m++)p=`${t}-${m}`;return l?e.jsx("div",{className:"rounded-md border border-destructive/40 bg-destructive/5 p-3 text-sm text-destructive",children:e.jsxs("div",{className:"flex gap-2",children:[e.jsx(ae,{className:"mt-0.5 h-4 w-4 shrink-0"}),e.jsxs("div",{children:[e.jsx("p",{className:"font-medium",children:"Failed to load provider catalog."}),e.jsx("p",{className:"mt-1 text-xs",children:l instanceof Error?l.message:"Check the workspace URL and try again."})]})]})}):e.jsxs("div",{className:"space-y-3 rounded-lg border p-4",children:[o&&e.jsxs("div",{className:"space-y-2 text-sm",children:[e.jsx("p",{children:"Subscription sign-in is managed on the existing connection."}),e.jsx(j,{asChild:!0,variant:"outline",size:"sm",children:e.jsx(B,{to:"/$owner/connectors/$connectorKey",params:{owner:s,connectorKey:`${ee}${t}`},search:{},children:"Open existing connection"})})]}),(!o||c&&$e(c))&&e.jsx(Os,{catalog:a,initialProvider:t,initialSlug:p,allowOAuth:!o,initialModel:d?.includes("/")?d.split("/").slice(1).join("/"):d,onDone:()=>void h({to:"/$owner/connectors",params:{owner:s}})},`${a.length}:${t}`)]})}function Js({providerName:s,model:t,isConnected:n}){return e.jsx("div",{className:"rounded-lg border border-amber-200 bg-amber-50 p-3 text-sm text-amber-950 dark:border-amber-900/60 dark:bg-amber-950/30 dark:text-amber-100",children:e.jsxs("div",{className:"flex gap-2",children:[e.jsx(ae,{className:"mt-0.5 h-4 w-4 shrink-0"}),e.jsxs("p",{children:["Review ",e.jsx("strong",{children:s})," for model"," ",e.jsx("strong",{children:t}),"."," ",n?"Its edit controls are open.":"It is not connected yet; add it to continue."]})]})})}function et({agentId:s,model:t,providerName:n}){return e.jsx("div",{className:"rounded-lg border border-amber-200 bg-amber-50 p-3 text-sm text-amber-950 dark:border-amber-900/60 dark:bg-amber-950/30 dark:text-amber-100",children:e.jsxs("div",{className:"flex gap-2",children:[e.jsx(ae,{className:"mt-0.5 h-4 w-4 shrink-0"}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"font-medium",children:"This agent needs a model provider before it can reply."}),e.jsxs("p",{children:[s?e.jsxs("span",{children:["Agent ",e.jsx("strong",{children:s})," is"," "]}):null,"configured to use ",t?e.jsx("strong",{children:t}):"a model"," ","from ",e.jsx("strong",{children:n}),", but that provider is not ready in this workspace."]}),e.jsx("p",{children:"Connect the provider below, then retry the message."})]})]})})}function st({ownerSlug:s,organizationId:t,isWorkspaceLoading:n,connectorKey:a}){const{data:l=[],isLoading:d,isError:h,refetch:c}=Ps(t??""),{data:o=[],isLoading:p,isError:m,refetch:r}=Ss(t??"",{connectorKey:a}),{setup:f}=X.useSearch(),b=X.useNavigate(),x=u.useMemo(()=>l.find(A=>A.key===a),[l,a]),N=u.useMemo(()=>$s(a,l,{name:o[0]?.connector_name??a}),[a,l,o]);if(n||d)return e.jsx("div",{children:e.jsxs(F,{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(w,{className:"h-6 w-6 rounded"}),e.jsx(w,{className:"h-5 w-40"})]}),e.jsx(w,{className:"h-16 w-full rounded-lg"}),e.jsx(w,{className:"h-24 w-full rounded-lg"}),e.jsx(w,{className:"h-32 w-full rounded-lg"})]})});if(h||m)return e.jsx(F,{children:e.jsxs("div",{role:"alert",className:"space-y-2",children:[e.jsx("p",{children:"Could not load this connector."}),e.jsx(j,{variant:"outline",onClick:()=>{c(),r()},children:"Retry"})]})});const v=x?e.jsx(at,{connector:x,ownerSlug:s,organizationId:t??void 0,connectionCount:o.length}):e.jsxs("div",{className:"space-y-3",children:[e.jsx(Ke,{connector:N,showDescription:!1,className:"gap-2"}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["This connector isn't installed in this workspace, so its details aren't available.",o.length>0?" Existing connections keep working.":""]})]});return e.jsx("div",{className:"flex flex-1 flex-col",children:x&&t?e.jsx(tt,{hero:v,connector:x,organizationId:t,ownerSlug:s,connectorKey:a,connections:o,isLoading:p,openNewApp:f==="oauth_app",onNewAppHandled:()=>void b({search:A=>({...A,setup:void 0}),replace:!0})}):e.jsxs(F,{className:"space-y-6",children:[v,o.length>0&&!p?e.jsx(Ue,{section:!0,connections:o,ownerSlug:s,connectorKey:a}):p?e.jsx(w,{className:"h-8 w-40"}):e.jsx("div",{children:e.jsx(Ie,{ownerSlug:s,connectorKey:a})})]})})}function tt({hero:s,connector:t,organizationId:n,ownerSlug:a,connectorKey:l,connections:d,isLoading:h,openNewApp:c,onNewAppHandled:o}){const{isAdmin:p,isLoading:m}=Be(n),r=(t.operations_summary?.total??0)>0,f=e.jsx(_s,{connector:t,organizationId:n,ownerSlug:a,connections:d,openNewApp:c,onNewAppHandled:o});return e.jsxs(ne,{header:s,children:[h?e.jsx(w,{className:"h-8 w-40"}):d.length>0?e.jsx(Ue,{section:!0,connections:d,connector:t,ownerSlug:a,connectorKey:l,action:f}):f,e.jsxs("div",{className:"grid grid-cols-1 gap-3 sm:auto-cols-fr sm:grid-flow-col",children:[e.jsx(lt,{connector:t,organizationId:n,ownerSlug:a}),r&&m?e.jsx(w,{className:"h-20 w-full rounded-lg"}):r&&p?e.jsx(it,{connector:t,organizationId:n,ownerSlug:a}):r&&!p?e.jsx(T,{title:"Actions",muted:!0,children:e.jsx("p",{className:"text-sm text-muted-foreground",children:"Only workspace admins can view and configure connector actions."})}):null]}),e.jsx(nt,{connector:t,organizationId:n,ownerSlug:a})]})}function at({connector:s,ownerSlug:t,organizationId:n,connectionCount:a}){return e.jsx(se,{breadcrumb:e.jsx(te,{crumbs:[e.jsx(B,{to:"/$owner/connectors",params:{owner:t},className:M,children:"Connectors"},"connectors")]}),icon:e.jsx(de,{icon:s.icon,name:s.name,faviconDomain:s.favicon_domain??ps(s.auth_schema),className:"h-10 w-10"}),title:s.name,badge:e.jsxs(e.Fragment,{children:[e.jsx(Ls,{connectorDef:s,ownerSlug:t}),n?e.jsx(rt,{connector:s,organizationId:n,ownerSlug:t,connectionCount:a}):null]}),caption:s.description,meta:e.jsx(Rs,{owner:t,filters:{connectorKey:s.key},name:s.name})})}function nt({connector:s,organizationId:t,ownerSlug:n}){const a=bs(s.auth_schema),l=Cs(s.auth_schema),d=ks(s.auth_schema),h=ws(s.auth_schema),c=a.some(N=>N.type==="env_keys"),o=a.some(N=>N.type==="browser"),p=l.some(N=>N.type==="interactive"),m=!!(d||h||c||o),r=As(s),{data:f=[]}=ke(t,{connectorKey:s.key,profileKind:"env"}),{data:b=[]}=ke(t,{profileKind:"browser_session",connectorKey:s.key});return c&&f.length>0||o&&b.length>0||!m&&(r||p)?e.jsxs("div",{className:"space-y-6",children:[c&&f.length>0?e.jsx(we,{profiles:f,type:"env"}):null,o&&b.length>0?e.jsx(we,{profiles:b,type:"browser_session"}):null,m?null:r?e.jsx(T,{title:"Device runtime",children:e.jsxs("div",{className:"space-y-3",children:[e.jsxs("p",{className:"text-sm text-muted-foreground",children:[s.name," runs on a linked device — there are no workspace credentials to configure here. Pair a device, then create a connection pinned to it."]}),e.jsx(j,{asChild:!0,variant:"outline",size:"sm",children:e.jsx(B,{to:"/$owner/connectors",params:{owner:n},search:{},children:"View devices"})})]})}):p?e.jsx(T,{title:"Authentication",children:e.jsxs("p",{className:"text-sm text-muted-foreground",children:[s.name," pairs when you create a connection — there is no workspace-level credential to configure here."]})}):null]}):null}function rt({connector:s,organizationId:t,ownerSlug:n,connectionCount:a}){const l=Y(),{isAdmin:d}=Be(t),h=js(),[c,o]=u.useState(null),p=s.installed!==!1;if(!d||!p)return null;const m=a>0,r=h.isPending,f=()=>{o(null),h.mutate({connector_key:s.key},{onSuccess:()=>{l({to:"/$owner/connectors",params:{owner:n}})},onError:b=>{o(b instanceof Error?b.message:"Failed to remove connector")}})};return e.jsxs(gs,{onOpenChange:()=>o(null),children:[e.jsx(fs,{asChild:!0,children:e.jsx(j,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-destructive","aria-label":"Remove connector",title:"Remove connector",children:e.jsx(ce,{className:"h-3.5 w-3.5"})})}),e.jsxs(vs,{align:"start",className:"space-y-3",children:[e.jsxs("p",{className:"text-sm font-medium",children:["Remove ",s.name,"?"]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Archives it in this workspace. Existing synced data stays in memory."}),m?e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Delete"," ",e.jsxs("span",{className:"font-medium text-foreground",children:[a," connection",a===1?"":"s"]})," ","first — uninstall is blocked while any connection still references this connector."]}):null,c?e.jsx("p",{className:"rounded-md bg-destructive/10 px-3 py-2 text-sm text-destructive",children:c}):null,e.jsxs(j,{variant:"destructive",size:"sm",disabled:r||m,onClick:f,children:[r?e.jsx(z,{size:"md",className:"mr-1.5"}):null,"Remove connector"]})]})]})}function it({connector:s,organizationId:t,ownerSlug:n}){const a=Le();return e.jsx(Re,{title:"Actions",summary:`${s.operations_summary?.total??0} actions · organization policies`,onOpen:()=>a?.open({href:"",title:"Actions",connectorPanel:{section:"actions",connectorKey:s.key,organizationId:t,ownerSlug:n}})})}function we({profiles:s,type:t}){const n=t==="env"?"Credentials":"Browser sessions";return e.jsx(T,{title:n,children:e.jsx("div",{className:"space-y-2",children:s.map(a=>e.jsxs("div",{className:Ds(Fe,"p-3"),children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("span",{className:"text-sm font-medium",children:a.display_name}),e.jsx(Fs,{status:a.status})]}),e.jsx("p",{className:"truncate text-xs text-muted-foreground",children:a.slug})]},a.slug))})})}function lt({connector:s,organizationId:t,ownerSlug:n}){const a=Le(),l=Object.keys(s.feeds_schema??{}).length;return l?e.jsx(Re,{title:"Feeds",summary:`${l} ${l===1?"feed type":"feed types"}`,onOpen:()=>a?.open({href:"",title:"Feeds",connectorPanel:{section:"feeds",connectorKey:s.key,organizationId:t,ownerSlug:n}})}):null}export{tt as ConnectorDetailShell,at as ConnectorHero,rt as ConnectorRemoveButton,jt as component};
|
|
2
|
-
//# sourceMappingURL=_connectorKey.index-n3iSDT74.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{j as e,cA as A,i as c,ji as p,jj as h,jk as d,jl as u,jm as w,r as M,at as k,aH as C,jn as z}from"./index-DdBTTN3y.js";import{A as N}from"./agent-loading-shells-ClY_O6lb.js";import{s as b,R as y,A as O}from"./agent-thread-WNk2HapT.js";import"./app-bridge-C4nPtae3.js";import"./pending-seed-sml8Uf6e.js";import"./use-mention-search-dn3ws1WB.js";import"./index-Vcq4gwWv.js";import"./use-automations-BLNjxq2K.js";import"./event-card-DVUB8my6.js";import"./run-initiator-BvzQJYW9.js";import"./clients-BJRcMk1A.js";import"./renderer-DXfJaCCa.js";import"./calendar-Ck0yOLYu.js";import"./table-BUqshjxa.js";import"./card-Bdi7VEwo.js";import"./change-summary-PBoM6Asb.js";import"./json-diff-BaLL4Fsu.js";import"./copy-button-DjMWgrBf.js";import"./agent-list-row-rF5LH-3k.js";import"./client-rows-36VnmgMK.js";import"./automation-row-DCHM--aD.js";import"./model-jL871x2J.js";import"./connection-label-BobuYiAG.js";import"./events-feed-B9CZHI_P.js";import"./client-activity-scopes-CXOWB5co.js";import"./use-scroll-sentinel-DRyBMueA.js";const T={discord:{hex:`#${u.hex}`,path:u.path},gchat:{hex:`#${d.hex}`,path:d.path},slack:{hex:"#4A154B",path:"M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zM6.313 15.165a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313zM8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zM8.834 6.313a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312zM18.956 8.834a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zM17.688 8.834a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522v6.312zM15.165 18.956a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zM15.165 17.688a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.528 2.528 0 0 1-2.522 2.523h-6.313z"},teams:{imgSrc:"https://www.google.com/s2/favicons?domain=teams.microsoft.com&sz=64"},telegram:{hex:`#${h.hex}`,path:h.path},whatsapp:{hex:`#${p.hex}`,path:p.path}};function I({platform:r,className:a}){const t=r?T[r]:null;return t?"imgSrc"in t?e.jsx("img",{src:t.imgSrc,alt:"","aria-hidden":"true",className:c("rounded-sm",a),loading:"lazy"}):e.jsx("svg",{viewBox:t.viewBox??"0 0 24 24",fill:"currentColor","aria-hidden":"true",className:a,style:{color:t.hex},children:e.jsx("path",{d:t.path})}):e.jsx(A,{className:c("text-muted-foreground",a),"aria-hidden":"true"})}const L={slack:"Slack",telegram:"Telegram",whatsapp:"WhatsApp",discord:"Discord",web:"Web"};function R(r,a,t){return r==="slack"&&t?.teamId&&a?`https://app.slack.com/client/${t.teamId}/${a}`:null}function S({owner:r,agentId:a,conversationId:t}){const{data:n=[],isLoading:x}=w(a,t,{orgSlug:r}),i=M.useMemo(()=>n.map(o=>b(o,{showToolCalls:!0})).filter(o=>o!==null),[n]),[s,g]=t.split(":"),m=L[s]??"the source app",{org:f}=k(),{data:j=[]}=C(f?.id??"",{connectorKey:s}),v=j[0]?.config?.chatMetadata,l=R(s,g,v);return e.jsx("div",{className:"mx-auto flex min-h-0 w-full max-w-3xl flex-1 flex-col pb-6",children:x?e.jsx(N,{readOnly:!0}):i.length===0?e.jsx("p",{className:"text-sm text-muted-foreground",children:"No messages in this conversation."}):e.jsxs("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col",children:[e.jsx(y,{messages:i,children:e.jsx(O,{readOnly:!0})}),l?e.jsxs("a",{href:l,target:"_blank",rel:"noopener noreferrer",className:"mt-4 flex items-center gap-3 rounded-lg border border-border bg-muted/40 px-4 py-3 text-sm transition-colors hover:bg-muted",children:[e.jsx(I,{platform:s,className:"size-5 shrink-0"}),e.jsxs("span",{className:"text-muted-foreground",children:["This is a read-only copy. Continue the conversation with this agent in ",m,"."]}),e.jsxs("span",{className:"ml-auto shrink-0 whitespace-nowrap font-medium text-foreground",children:["Open ",m," →"]})]}):null]})})}function i2(){const{owner:r,agentId:a,conversationId:t}=z.useParams();return e.jsx(S,{owner:r,agentId:a,conversationId:t})}export{i2 as component};
|
|
2
|
-
//# sourceMappingURL=_conversationId-B1yGIGA9.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{E as u,c as v,j as a,ak as d,az as f,cg as h,ch as x,ci as j,bk as w,cj as P}from"./index-DdBTTN3y.js";import{E as g}from"./event-detail-DkY95e5b.js";import"./events-feed-B9CZHI_P.js";import"./event-card-DVUB8my6.js";import"./run-initiator-BvzQJYW9.js";import"./use-automations-BLNjxq2K.js";import"./clients-BJRcMk1A.js";import"./renderer-DXfJaCCa.js";import"./calendar-Ck0yOLYu.js";import"./table-BUqshjxa.js";import"./card-Bdi7VEwo.js";import"./change-summary-PBoM6Asb.js";import"./json-diff-BaLL4Fsu.js";import"./index-Vcq4gwWv.js";import"./copy-button-DjMWgrBf.js";import"./agent-list-row-rF5LH-3k.js";import"./client-rows-36VnmgMK.js";import"./automation-row-DCHM--aD.js";import"./model-jL871x2J.js";import"./connection-label-BobuYiAG.js";import"./client-activity-scopes-CXOWB5co.js";import"./use-scroll-sentinel-DRyBMueA.js";import"./view-param-filters-CER47Tlz.js";import"./app-bridge-C4nPtae3.js";import"./filter-bar-wPaR12SS.js";function E({owner:e,eventId:t,viewKey:s}){const o=u({strict:!1}),p=v(),m=(i,r)=>a.jsx(g,{owner:r,organizationId:i,eventId:t,viewKey:s,params:s?x(o):{},onParamsChange:(n,c,l)=>void p({to:h(r,t,n),search:c,replace:l?.replace??!0}),fullBleed:!0},`${r}/${t}`);return a.jsx(d,{className:"gap-6 pt-2.5 pb-8",children:e==="me"?m(null,e):a.jsx(f,{owner:e,children:({organizationId:i,ownerSlug:r})=>i?m(i,r):a.jsx("div",{className:"mx-auto h-40 w-full max-w-3xl animate-pulse rounded-md bg-muted/40"})})})}function S(){const{owner:e,eventId:t}=j.useParams(),s=w({from:"/$owner/events/$eventId/-/views/$viewKey",shouldThrow:!1}),o=P(t);return o===null?null:a.jsx(E,{owner:e,eventId:o,viewKey:s?.viewKey})}export{S as component};
|
|
2
|
-
//# sourceMappingURL=_eventId-B1H0-vD7.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jh as a,j as e}from"./index-DdBTTN3y.js";import{b as i}from"./agent-guardrails-route-BJyfalBY.js";import"./model-selector-CgU8SJMF.js";import"./agent-tab-intro-ednTs4WF.js";import"./table-BUqshjxa.js";import"./agent-loading-shells-ClY_O6lb.js";import"./agent-card-controls-C5jNWgfq.js";function l(){const{owner:t,agentId:r,name:o}=a.useParams();return e.jsx(i,{owner:t,agentId:r,name:o})}export{l as component};
|
|
2
|
-
//# sourceMappingURL=_name-D30_V03t.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/peek-pane-content-D68BjguQ.js","assets/index-DdBTTN3y.js","assets/index-DdYWarql.css","assets/automation-detail-content-dFy1Huas.js","assets/create-automation-form-PEmSLMD6.js","assets/model-jL871x2J.js","assets/entity-options-daOOQo7O.js","assets/connection-label-BobuYiAG.js","assets/use-automations-BLNjxq2K.js","assets/model-selector-CgU8SJMF.js","assets/skill-editor-D_W3QlRz.js","assets/code-editor-DNuRKde1.js","assets/json-diff-BaLL4Fsu.js","assets/index-Vcq4gwWv.js","assets/use-mention-search-dn3ws1WB.js","assets/proposal-review-shell-D6KABxah.js","assets/runs-fFJ1lPnw.js","assets/events-feed-B9CZHI_P.js","assets/event-card-DVUB8my6.js","assets/run-initiator-BvzQJYW9.js","assets/clients-BJRcMk1A.js","assets/renderer-DXfJaCCa.js","assets/calendar-Ck0yOLYu.js","assets/table-BUqshjxa.js","assets/card-Bdi7VEwo.js","assets/change-summary-PBoM6Asb.js","assets/copy-button-DjMWgrBf.js","assets/agent-list-row-rF5LH-3k.js","assets/client-rows-36VnmgMK.js","assets/automation-row-DCHM--aD.js","assets/client-activity-scopes-CXOWB5co.js","assets/use-scroll-sentinel-DRyBMueA.js","assets/agent-loading-shells-ClY_O6lb.js","assets/agent-thread-WNk2HapT.js","assets/app-bridge-C4nPtae3.js","assets/pending-seed-sml8Uf6e.js","assets/connection-feed-detail-BIlkK0Pd.js","assets/runs-table-XGnxJl7S.js","assets/feed-event-kinds-BYuZCoU4.js","assets/connect-menu-C-B-1xGR.js","assets/connections-browser-V-3td9DB.js","assets/status-dot-Cpq63I7p.js","assets/connector-scope-lists--vNdbOn0.js","assets/source-record-panels-Bh0n4gGw.js","assets/schema-type-editor-panel-C0_9VcSs.js","assets/entity-type-page-BLwH6qa7.js","assets/event-detail-DkY95e5b.js","assets/view-param-filters-CER47Tlz.js","assets/filter-bar-wPaR12SS.js","assets/views-access-required-C_b9itZ2.js","assets/record-session-R-uHNuby.js","assets/runs-panel-DEnZHTa5.js","assets/manage-gear-D8LMhehh.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{p as m,j as e,r as h,C as j,L as y,u as v,a as b,b as N,c as P,d as R,D as I,e as _,f as D,g as A,h as E,i as w,k as S,l as C,B as p,m as L,A as O,X as T,n as z,_ as K,S as x,R as $,o as B,q as W,s as H,t as V,N as q,O as F}from"./index-DdBTTN3y.js";import{R as G}from"./record-session-R-uHNuby.js";function k({item:t}){const n=t.href?m(t.href):null;if(!n)return null;const s=n.owner,i=n.kind==="automation"?n.automationId:t.sourceAttribution?.automation_id??null,o=t.sourceAttribution,r=[{label:s,to:"/$owner",params:{owner:s}}];return o?.agent_id&&o.agent_name&&r.push({label:o.agent_name,to:"/$owner/agents/$agentId/settings",params:{owner:s,agentId:o.agent_id}}),i!=null&&r.push({label:o?.automation_name??"Automation",to:"/$owner/automations/$automationId",params:{owner:s,automationId:String(i)}}),(n.kind==="memory"||n.kind==="automation")&&"runId"in n&&n.runId!=null?r.push({label:"Run details"}):n.kind==="event"?r.push({label:"Event details"}):n.kind==="memory"&&"contentIds"in n&&r.push({label:"Details"}),r.length<2?null:e.jsx("nav",{"aria-label":"Breadcrumb",className:"flex min-w-0 shrink-0 items-center gap-1 overflow-x-auto border-b border-border px-3 py-1.5 text-xs text-muted-foreground",children:r.map((a,l)=>{const c=l===r.length-1,f=e.jsx("span",{className:c?"truncate font-medium text-foreground":"whitespace-nowrap",children:a.label});return e.jsxs(h.Fragment,{children:[l>0?e.jsx(j,{className:"h-3 w-3 shrink-0","aria-hidden":"true"}):null,a.to&&!c?e.jsx(y,{to:a.to,params:a.params,className:"whitespace-nowrap transition-colors hover:text-foreground",children:a.label}):f]},a.to??a.label)})})}const M=z(async()=>({default:(await K(async()=>{const{PeekPaneContent:t}=await import("./peek-pane-content-D68BjguQ.js");return{PeekPaneContent:t}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52]))).PeekPaneContent}));function Q(){return e.jsxs("div",{"data-testid":"peek-pane-body-loading",className:"space-y-3 p-4",children:[e.jsx(x,{className:"h-5 w-2/3"}),e.jsx(x,{className:"h-4 w-full"}),e.jsx(x,{className:"h-24 w-full rounded-lg"})]})}const U=460,X=480;function J({children:t}){const n=h.useRef(null),s=v(),i=b(),o=N(n,U+X),r=!i&&o&&s?.item!=null;return e.jsxs("div",{ref:n,className:"relative flex min-h-0 flex-1 flex-row",children:[e.jsx("div",{inert:r,className:"flex min-h-0 min-w-0 flex-1 flex-col overflow-y-auto",children:t}),e.jsx(Y,{covers:r})]})}function Y({covers:t=!1}){const n=v(),s=b();return n?.item?e.jsx(ee,{item:n.item,onClose:n.close,onBack:n.back,isNarrow:s,covers:t}):null}function Z(t){const n=t.href?m(t.href):null,s=n?.kind==="record-view"?n.viewKey:null,i=n?.kind==="entity-type"?n:null,o=i?.typeSlug??null,r=S({slug:s?n?.owner:void 0}),{data:a}=C(o?n?.owner??null:null),l=o?a?.find(c=>c.slug===o)?.name:void 0;return s&&r.data?.find(c=>c.key===s)?.name||l&&(i?.view==="activity"?`${l} activity`:l)||t.title}function ee({item:t,onClose:n,onBack:s,isNarrow:i,covers:o}){const r=P(),a=t.href?m(t.href):null,l=t.runId&&a?.kind==="automation"&&a.view==="activity"?{pathname:`/${a.owner}/events`,search:{run_ids:String(t.runId)}}:t.href?R(t.href):null,c=Z(t);h.useEffect(()=>{if(i)return;const d=u=>{u.defaultPrevented||u.key!=="Escape"||(u.preventDefault(),n())};return window.addEventListener("keydown",d),()=>window.removeEventListener("keydown",d)},[n,i]);const f=d=>e.jsxs("div",{className:"flex h-11 shrink-0 items-center gap-1 border-b border-border px-3",children:[s||d?e.jsx(p,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0 text-muted-foreground hover:text-foreground","aria-label":"Back",onClick:s??n,children:e.jsx(L,{className:"h-4 w-4"})}):null,e.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium text-foreground",children:c}),l?e.jsx(p,{type:"button",variant:"ghost",size:a?.kind==="runs"?"sm":"icon",className:w("h-7 shrink-0 text-muted-foreground hover:text-foreground",a?.kind==="runs"?"gap-1 px-2 text-xs":"w-7"),"aria-label":a?.kind==="runs"?"Open in Activity":"Open full page",asChild:!0,children:e.jsxs(y,{to:l.pathname,search:l.search??{},onClick:u=>{u.button!==0||u.metaKey||u.ctrlKey||u.shiftKey||u.altKey||(u.preventDefault(),(async()=>(await n(),await r({to:l.pathname,search:l.search??{}})))())},children:[a?.kind==="runs"?"Open in Activity":null,e.jsx(O,{className:"h-4 w-4"})]})}):null,e.jsx(p,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0 text-muted-foreground hover:text-foreground","aria-label":"Close preview",onClick:n,children:e.jsx(T,{className:"h-4 w-4"})})]}),g=e.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:e.jsx(h.Suspense,{fallback:e.jsx(Q,{}),children:e.jsx(M,{item:t})})});return i?e.jsx(I,{open:!0,onOpenChange:d=>{d||n()},children:e.jsxs(_,{children:[e.jsx(D,{className:"fixed inset-0 z-40 bg-black/60 data-[state=open]:animate-in data-[state=open]:fade-in-0"}),e.jsxs(A,{"aria-describedby":void 0,className:"fixed inset-y-0 right-0 z-50 flex w-full max-w-[460px] flex-col border-l border-border bg-background outline-none data-[state=open]:animate-in data-[state=open]:slide-in-from-right",children:[e.jsx(E,{className:"sr-only",children:c}),f(!0),e.jsx(k,{item:t}),g]})]})}):e.jsxs("aside",{className:w("flex flex-col border-l border-border bg-background",o?"absolute inset-0 z-30 w-full":"w-[460px] max-w-[45vw] shrink-0"),children:[f(!1),e.jsx(k,{item:t}),g]})}function ae(){const{owner:t}=$.useParams(),{data:n,isLoading:s,error:i}=B(t==="me"?null:t,{slug:t}),{session:o,isReady:r}=W();return H({active:V({settled:!s,authReady:r,session:o,resolved:!!n?.workspace,error:i}),owner:t})?null:e.jsx(q,{children:e.jsx(G,{children:e.jsx(J,{children:e.jsx(F,{})})})})}export{ae as component};
|
|
3
|
-
//# sourceMappingURL=_owner-Be8O41u8.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{j5 as p,j as m,bj as i}from"./index-DdBTTN3y.js";import{M as e}from"./memory-browse-page-CNZJbCJC.js";import"./public-shell-ready-BIVCHQHe.js";import"./connector-boxes-lFc-WP83.js";import"./connection-label-BobuYiAG.js";import"./connections-browser-V-3td9DB.js";import"./status-dot-Cpq63I7p.js";import"./connector-scope-lists--vNdbOn0.js";import"./use-automations-BLNjxq2K.js";import"./model-jL871x2J.js";import"./feed-event-kinds-BYuZCoU4.js";import"./schema-type-editor-panel-C0_9VcSs.js";import"./entity-type-page-BLwH6qa7.js";import"./change-summary-PBoM6Asb.js";import"./json-diff-BaLL4Fsu.js";import"./index-Vcq4gwWv.js";import"./code-editor-DNuRKde1.js";import"./renderer-DXfJaCCa.js";import"./calendar-Ck0yOLYu.js";import"./table-BUqshjxa.js";import"./card-Bdi7VEwo.js";import"./entity-avatar-TVKjZxWQ.js";import"./filter-bar-wPaR12SS.js";import"./core.esm-CQzL3ObT.js";import"./view-param-filters-CER47Tlz.js";import"./app-bridge-C4nPtae3.js";import"./nav-pill-DrFkuyUQ.js";import"./member-scope-gate-4FQ0aanZ.js";function D(){const{owner:t,entityType:o,shape:r}=p.useParams();return m.jsx(e,{ownerSlug:t,typeScope:i(o),create:!1,shape:r})}export{D as component};
|
|
2
|
-
//# sourceMappingURL=_shape-C6YbloRh.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jf as e,j as i}from"./index-DdBTTN3y.js";import{b as m}from"./agent-skills-route-Bv5luNdw.js";import"./agent-skill-context-BAaGpvfS.js";import"./core.esm-CQzL3ObT.js";import"./skill-editor-D_W3QlRz.js";import"./agent-tab-intro-ednTs4WF.js";import"./agent-loading-shells-ClY_O6lb.js";import"./agent-card-controls-C5jNWgfq.js";function j(){const{owner:t,agentId:o,skillKey:r}=e.useParams();return i.jsx(m,{owner:t,agentId:o,skillKey:r})}export{j as component};
|
|
2
|
-
//# sourceMappingURL=_skillKey-BMPvvoOI.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{gQ as l,v as y,c as d,gf as g,fw as u,j as t,ak as c,al as x,bO as f}from"./index-DdBTTN3y.js";import{E}from"./entity-type-page-BLwH6qa7.js";import"./change-summary-PBoM6Asb.js";import"./json-diff-BaLL4Fsu.js";import"./index-Vcq4gwWv.js";import"./code-editor-DNuRKde1.js";function C(){const{owner:a,slug:n}=l.useParams(),{orgContext:s}=y(),o=d(),{data:i=[],isLoading:r}=g(s),e=i.find(m=>m.slug===n)??null,p=e?u(e):!1;return t.jsx(c,{className:"gap-4 pt-2.5 pb-8",children:t.jsx(x,{children:r?t.jsx(f,{label:"entity type",variant:"panel"}):e?t.jsx(E,{entityType:e,orgContext:s,hideDelete:p,onClose:()=>{o({to:"/$owner/data",params:{owner:a}})}}):t.jsx("div",{className:"text-sm text-muted-foreground",children:"Entity type not found."})})})}export{C as component};
|
|
2
|
-
//# sourceMappingURL=_slug-Bc4YIEA2.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{bH as t,bI as p,j as e}from"./index-DdBTTN3y.js";import{A as s,h as a}from"./activity-route-view-DN0ZEAzr.js";import"./record-activity-C9gVBbF0.js";import"./filter-bar-wPaR12SS.js";import"./calendar-Ck0yOLYu.js";import"./connection-label-BobuYiAG.js";import"./manage-gear-D8LMhehh.js";import"./runs-fFJ1lPnw.js";import"./source-record-panels-Bh0n4gGw.js";import"./event-card-DVUB8my6.js";import"./run-initiator-BvzQJYW9.js";import"./use-automations-BLNjxq2K.js";import"./clients-BJRcMk1A.js";import"./renderer-DXfJaCCa.js";import"./table-BUqshjxa.js";import"./card-Bdi7VEwo.js";import"./change-summary-PBoM6Asb.js";import"./json-diff-BaLL4Fsu.js";import"./index-Vcq4gwWv.js";import"./copy-button-DjMWgrBf.js";import"./agent-list-row-rF5LH-3k.js";import"./client-rows-36VnmgMK.js";import"./automation-row-DCHM--aD.js";import"./model-jL871x2J.js";import"./events-feed-B9CZHI_P.js";import"./client-activity-scopes-CXOWB5co.js";import"./use-scroll-sentinel-DRyBMueA.js";import"./agent-loading-shells-ClY_O6lb.js";import"./member-scope-gate-4FQ0aanZ.js";import"./runs-panel-DEnZHTa5.js";import"./runs-table-XGnxJl7S.js";import"./nav-pill-DrFkuyUQ.js";import"./public-shell-ready-BIVCHQHe.js";function M(){const{owner:r,view:i}=t.useParams(),m=t.useSearch(),o=a(i);if(!o)throw p();return e.jsx(s,{owner:r,search:m,homeView:o})}export{M as component};
|
|
2
|
-
//# sourceMappingURL=_view-aoFDwEld.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jo as p,j as i,bj as m}from"./index-DdBTTN3y.js";import{M as e}from"./memory-browse-page-CNZJbCJC.js";import"./public-shell-ready-BIVCHQHe.js";import"./connector-boxes-lFc-WP83.js";import"./connection-label-BobuYiAG.js";import"./connections-browser-V-3td9DB.js";import"./status-dot-Cpq63I7p.js";import"./connector-scope-lists--vNdbOn0.js";import"./use-automations-BLNjxq2K.js";import"./model-jL871x2J.js";import"./feed-event-kinds-BYuZCoU4.js";import"./schema-type-editor-panel-C0_9VcSs.js";import"./entity-type-page-BLwH6qa7.js";import"./change-summary-PBoM6Asb.js";import"./json-diff-BaLL4Fsu.js";import"./index-Vcq4gwWv.js";import"./code-editor-DNuRKde1.js";import"./renderer-DXfJaCCa.js";import"./calendar-Ck0yOLYu.js";import"./table-BUqshjxa.js";import"./card-Bdi7VEwo.js";import"./entity-avatar-TVKjZxWQ.js";import"./filter-bar-wPaR12SS.js";import"./core.esm-CQzL3ObT.js";import"./view-param-filters-CER47Tlz.js";import"./app-bridge-C4nPtae3.js";import"./nav-pill-DrFkuyUQ.js";import"./member-scope-gate-4FQ0aanZ.js";function A(){const{owner:o,entityType:t,viewKey:r}=p.useParams();return i.jsx(e,{ownerSlug:o,typeScope:m(t),create:!1,viewKey:r})}export{A as component};
|
|
2
|
-
//# sourceMappingURL=_viewKey-DuNHc3cc.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{jc as t,j as m}from"./index-DdBTTN3y.js";import{M as i}from"./memory-browse-page-CNZJbCJC.js";import"./public-shell-ready-BIVCHQHe.js";import"./connector-boxes-lFc-WP83.js";import"./connection-label-BobuYiAG.js";import"./connections-browser-V-3td9DB.js";import"./status-dot-Cpq63I7p.js";import"./connector-scope-lists--vNdbOn0.js";import"./use-automations-BLNjxq2K.js";import"./model-jL871x2J.js";import"./feed-event-kinds-BYuZCoU4.js";import"./schema-type-editor-panel-C0_9VcSs.js";import"./entity-type-page-BLwH6qa7.js";import"./change-summary-PBoM6Asb.js";import"./json-diff-BaLL4Fsu.js";import"./index-Vcq4gwWv.js";import"./code-editor-DNuRKde1.js";import"./renderer-DXfJaCCa.js";import"./calendar-Ck0yOLYu.js";import"./table-BUqshjxa.js";import"./card-Bdi7VEwo.js";import"./entity-avatar-TVKjZxWQ.js";import"./filter-bar-wPaR12SS.js";import"./core.esm-CQzL3ObT.js";import"./view-param-filters-CER47Tlz.js";import"./app-bridge-C4nPtae3.js";import"./nav-pill-DrFkuyUQ.js";import"./member-scope-gate-4FQ0aanZ.js";function q(){const{owner:o,viewKey:r}=t.useParams();return m.jsx(i,{ownerSlug:o,create:!1,viewKey:r})}export{q as component};
|
|
2
|
-
//# sourceMappingURL=_viewKey-rJ7A1zNx.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{aD as ye,aE as Ne,j as e,B as j,db as Ce,fi as Se,bc as Me,i as Ae,fa as ke,cU as Y,Y as K,d6 as Ie,hC as Pe,hD as Fe,hE as Te,hF as De,gZ as Ee,hG as Re,c2 as _e,c3 as $e,aF as Le,r as Z,bt as $,fL as J,c7 as Be,H as b,eS as L,I as z,$ as Ue,bl as Oe,bm as ze,bn as Ge,bo as Ve,bp as Q}from"./index-DdBTTN3y.js";import{b as qe,s as He}from"./model-selector-CgU8SJMF.js";function We(a){const t=a.toLowerCase().trim().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").replace(/-{2,}/g,"-");return(t?/^[a-z]/.test(t)&&t.length>=3?t:`agent-${t}`:"agent").slice(0,60).replace(/-+$/g,"")||"agent"}function Xe(a,t){const r=new Set(t),x=We(a);let v=x,u=2;for(;r.has(v);){const g=`-${u}`;v=`${x.slice(0,Math.max(1,60-g.length)).replace(/-+$/g,"")||"agent"}${g}`,u+=1}return v}const Ye="__unresolved__";function ee(a){return a.endsWith(`/${Ye}`)}function se(a){const t=a.indexOf("/");return t===-1?{slug:a,model:""}:{slug:a.slice(0,t),model:a.slice(t+1)}}function Ke(a,t){const{slug:r,model:x}=se(a);return{provider:t.find(g=>g.value===a)?.provider??t.find(g=>se(g.value).slug===r)?.provider??r,model:x}}function Ze({value:a,onChange:t,disabled:r}){const{data:x=[]}=ye(),{data:v=[]}=Ne(),u=qe(x,v),g=(s,c)=>{const l=s+c;if(l<0||l>=a.length)return;const m=[...a];[m[s],m[l]]=[m[l],m[s]],t(m)},k=s=>{t(a.filter((c,l)=>l!==s))},I=s=>{a.includes(s)||t([...a,s])},o=u.filter(s=>!a.includes(s.value)&&!ee(s.value));return e.jsxs("div",{className:"grid gap-2",children:[a.length===0?e.jsx("p",{className:"rounded-lg border border-dashed bg-muted/20 px-3 py-4 text-center text-[11px] text-muted-foreground",children:"No models pinned — this agent uses the org default."}):e.jsx("ul",{className:"grid gap-1.5",children:a.map((s,c)=>{const l=ee(s),{provider:m,model:i}=Ke(s,u);return e.jsxs("li",{className:Ae("flex items-center gap-2 rounded-lg border bg-muted/20 px-3 py-2",l&&"opacity-60"),children:[e.jsxs("div",{className:"grid min-w-0 flex-1 gap-0.5",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"truncate text-sm",children:m}),c===0?e.jsx("span",{className:"shrink-0 rounded bg-primary/10 px-1.5 py-0.5 text-[10px] font-medium text-primary",children:"Default"}):null]}),e.jsx("span",{className:"truncate text-[11px] text-muted-foreground",children:l?"no model selected":i})]}),e.jsxs("div",{className:"flex shrink-0 items-center gap-0.5",children:[e.jsx(j,{type:"button",variant:"ghost",size:"icon",className:"h-7 w-7","aria-label":"Move up",disabled:r||c===0,onClick:()=>g(c,-1),children:e.jsx(Ce,{className:"h-4 w-4"})}),e.jsx(j,{type:"button",variant:"ghost",size:"icon",className:"h-7 w-7","aria-label":"Move down",disabled:r||c===a.length-1,onClick:()=>g(c,1),children:e.jsx(Se,{className:"h-4 w-4"})}),e.jsx(j,{type:"button",variant:"ghost",size:"icon",className:"h-7 w-7 text-destructive hover:text-destructive","aria-label":"Remove model",disabled:r,onClick:()=>k(c),children:e.jsx(Me,{className:"h-4 w-4"})})]})]},s)})}),e.jsx(ke,{contentClassName:"w-[--radix-popover-trigger-width] min-w-[280px]",searchPlaceholder:"Search or type a model ref…",emptyText:"Type a full provider/model ref to use it.",trigger:s=>e.jsxs(j,{type:"button",variant:"outline",role:"combobox","aria-expanded":s,disabled:r,className:"w-full justify-start font-normal text-muted-foreground",children:[e.jsx(Ie,{className:"mr-2 h-4 w-4 shrink-0"}),"Add model"]}),children:(s,c)=>{const l=c.trim(),m=He(l,u)&&!a.includes(l);return e.jsxs(e.Fragment,{children:[o.map(i=>e.jsxs(Y,{value:`${i.provider} ${i.model} ${i.value}`,onSelect:()=>{I(i.value),s()},className:"cursor-pointer",children:[e.jsx(K,{className:"mr-2 h-4 w-4 opacity-0"}),e.jsxs("span",{className:"truncate",children:[i.provider," ",e.jsx("span",{className:"text-muted-foreground text-xs",children:i.model}),i.isDefault?e.jsx("span",{className:"ml-1.5 text-muted-foreground text-xs",children:"· org default"}):null]})]},i.value)),m?e.jsxs(Y,{value:`__custom__ ${l}`,onSelect:()=>{I(l),s()},className:"cursor-pointer",children:[e.jsx(K,{className:"mr-2 h-4 w-4 opacity-0"}),e.jsxs("span",{children:["Use ",e.jsx("span",{className:"font-mono text-xs",children:l})]})]}):null]})}})]})}const Je=3,Qe=72,es=2e3;function te(a){return Array.from({length:Je},(t,r)=>a?.[r]??{title:"",message:""})}function ae(a){return a.map(({title:t,message:r})=>({title:t.trim(),message:r.trim()})).filter(({title:t,message:r})=>t&&r)}function ns({mode:a,section:t="identity",existingAgentIds:r=[],onCreated:x,onCancel:v,onDone:u,reviewMode:g="none",reviewProposal:k=null,reviewControlsDisabled:I=!1}){const o=a.kind==="create",s=a.kind==="edit"?a.agent:null,c=!o&&t!=="platforms"&&t!=="skills"&&!!s,l=Pe(),m=Fe(s?.agentId??""),i=Te(s?.agentId??""),P=De(s?.agentId??""),{data:p,isLoading:G}=Ee(s?.agentId,{enabled:c}),V=!o&&g==="active"?k:null,B=V?Re(V.proposal):void 0,N=p,q=s?.agentId??"create",d=_e(q,{name:B?.name??s?.name??"",description:B?.description??s?.description??"",identityMd:B?.identityMd??p?.identityMd??"",soulMd:p?.soulMd??"",userMd:p?.userMd??"",models:N?.models??N?.settings?.models??[],showToolCalls:N?.showToolCalls??N?.settings?.showToolCalls??!1,sandboxId:N?.sandboxId??N?.settings?.sandboxId??"builtin",starters:te(p?.starters)}),[w,ne]=d.field("name"),[C,le]=d.field("description"),[F,re]=d.field("identityMd"),[T,ie]=d.field("soulMd"),[D,de]=d.field("userMd"),[E,oe]=d.field("models"),[R,ce]=d.field("showToolCalls"),[S,me]=d.field("sandboxId"),[y,H]=d.field("starters"),[ue,_]=$e(q,!1),{data:ge}=Le({enabled:t==="models"&&!o}),he=Z.useCallback(async n=>{if(n.preventDefault(),!!d.canSubmit){if(o){const h=await l.mutateAsync({agentId:Xe(w,r),name:w.trim(),description:C.trim()||void 0});x?await x(h.agentId):u?.();return}if(s){if(!p){$.error("Still loading agent settings — try again in a moment");return}if(y.some(({title:h,message:M})=>!!h.trim()!=!!M.trim())){$.error("Add both a title and a message for each conversation starter");return}try{await Promise.all([m.mutateAsync({name:w.trim()||s.name,description:C.trim()||void 0}),P.mutateAsync({identityMd:F.trim(),soulMd:T.trim(),userMd:D.trim(),models:E,authProfiles:p.authProfiles??[],skillsConfig:p.skillsConfig,showToolCalls:R,sandboxId:S==="builtin"?void 0:S,starters:ae(y)})]),d.accept(d.values,{name:w.trim()||s.name,description:C.trim()||s.description||"",identityMd:F.trim(),soulMd:T.trim(),userMd:D.trim(),models:E,showToolCalls:R,sandboxId:S,starters:te(ae(y))}),$.success("Agent saved"),u?.()}catch(h){$.error(h instanceof Error?h.message:"Failed to save agent")}}}},[p,l,C,d.accept,d.values,d.canSubmit,S,r,F,o,E,w,x,u,s,R,T,y,m,P,D]),xe=Z.useCallback(async()=>{s&&(await i.mutateAsync(),_(!1),u?.())},[i,u,s,_]),U=l.isPending||m.isPending||i.isPending||P.isPending,pe=o||!!p;if(c&&G)return e.jsx(J,{rows:6});const f=U||I,fe=g==="none"||g==="gone",ve=w.trim().length>0&&pe,be=o||t==="settings",je=!o&&(t==="identity"||t==="settings"),we=!o&&t==="settings",W=!o&&t==="settings",X=!o&&t==="models";return e.jsxs("form",{onSubmit:he,className:"flex min-h-0 flex-col",children:[e.jsx(Be,{visible:d.hasConflict,onReload:d.reset}),e.jsxs("div",{className:"grid content-start gap-4 py-2",children:[je?G?e.jsx(J,{rows:4}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(b,{htmlFor:"identity-md",children:"Identity"}),e.jsx(L,{id:"identity-md",rows:6,value:F,onChange:n=>re(n.target.value),disabled:f,placeholder:"You are a market intelligence agent. Track competitors, analyze launches and signals, and surface concise, decision-ready insights."})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(b,{htmlFor:"soul-md",children:"Soul"}),e.jsx(L,{id:"soul-md",rows:6,value:T,onChange:n=>ie(n.target.value),disabled:f,placeholder:"Be rigorous, skeptical of weak signals, and calm under ambiguity. Prefer crisp summaries, explicit evidence, and clear confidence levels."})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx(b,{htmlFor:"user-md",children:"User prompt"}),e.jsx(L,{id:"user-md",rows:6,value:D,onChange:n=>de(n.target.value),disabled:f,placeholder:"Monitor the market for notable competitor moves, pricing changes, launches, partnerships, and customer sentiment shifts. Summarize what changed, why it matters, and what to watch next."})]})]}):null,be?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsxs(b,{htmlFor:"agent-name",children:["Name ",e.jsx("span",{className:"ml-1 text-destructive",children:"*"})]}),e.jsx(z,{id:"agent-name",placeholder:"Support Bot",value:w,onChange:n=>ne(n.target.value),disabled:f,required:!0}),o?e.jsx("p",{className:"text-[11px] text-muted-foreground",children:"The agent ID will be generated automatically from the name."}):null]}),o?null:e.jsxs("div",{className:"grid gap-2",children:[e.jsx(b,{htmlFor:"agent-description",children:"Description"}),e.jsx(L,{id:"agent-description",placeholder:"Handles customer support and triage across channels.",value:C,onChange:n=>le(n.target.value),disabled:f,rows:3})]})]}):null,W?e.jsxs("div",{className:"flex items-start gap-3 rounded-lg border bg-muted/20 p-3",children:[e.jsx(Ue,{id:"show-tool-calls",checked:R,onCheckedChange:n=>ce(n===!0),disabled:f,className:"mt-0.5"}),e.jsxs("div",{className:"grid gap-0.5",children:[e.jsx(b,{htmlFor:"show-tool-calls",className:"cursor-pointer",children:"Show tool calls in chat"}),e.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Render the agent's tool invocations (name, arguments, and result) as cards in the web chat. Off by default."})]})]}):null,W?e.jsxs("div",{className:"grid gap-2",children:[e.jsx(b,{children:"Conversation starters"}),e.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Up to three prompts offered on a new chat, on the web and in Slack. The message is sent as the user when tapped."}),y.map((n,h)=>e.jsxs("div",{className:"grid gap-2 sm:grid-cols-[12rem_1fr]",children:[e.jsx(z,{"aria-label":`Starter ${h+1} title`,placeholder:"Plan this week",maxLength:Qe,value:n.title,onChange:M=>H(y.map((A,O)=>O===h?{...A,title:M.target.value}:A)),disabled:f}),e.jsx(z,{"aria-label":`Starter ${h+1} message`,placeholder:"Plan this week's posts from what's trending",maxLength:es,value:n.message,onChange:M=>H(y.map((A,O)=>O===h?{...A,message:M.target.value}:A)),disabled:f})]},h))]}):null,X?e.jsxs("div",{className:"grid gap-2",children:[e.jsx(b,{children:"Models"}),e.jsx(Ze,{value:E,onChange:oe,disabled:f}),e.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Ordered list; the first is the default. Only these models may be used — a request for anything else falls back to the first available one. Leave empty to use the org default."})]}):null,X?e.jsxs("div",{className:"grid gap-2",children:[e.jsx(b,{htmlFor:"agent-sandbox",children:"Run in sandbox"}),e.jsxs(Oe,{value:S,onValueChange:me,disabled:f,children:[e.jsx(ze,{id:"agent-sandbox",className:"w-full",children:e.jsx(Ge,{placeholder:"Built-in"})}),e.jsxs(Ve,{children:[e.jsx(Q,{value:"builtin",children:"Built-in (default)"}),(ge?.sandboxes??[]).map(n=>e.jsxs(Q,{value:n.id,children:[n.name," (",n.providerKind,")",n.connected?"":" — no credential"]},n.id))]})]}),e.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Where this agent's commands execute. Built-in runs in-process; sandboxes run on a connected provider. Manage sandboxes under Connect › Runtime."})]}):null]}),fe?e.jsxs("div",{className:"mt-6 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[we?ue?e.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row",children:[e.jsx(j,{type:"button",variant:"destructive",onClick:()=>void xe(),disabled:i.isPending,children:i.isPending?"Deleting...":"Delete agent"}),e.jsx(j,{type:"button",variant:"outline",onClick:()=>_(!1),disabled:i.isPending,children:"Cancel"})]}):e.jsx(j,{type:"button",variant:"outline",className:"text-destructive hover:text-destructive",onClick:()=>_(!0),disabled:i.isPending,children:"Delete agent"}):e.jsx("span",{}),e.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row",children:[v?e.jsx(j,{type:"button",variant:"outline",onClick:v,disabled:U,children:"Cancel"}):null,e.jsx(j,{type:"submit",disabled:!d.canSubmit||!ve||U,children:o?l.isPending?"Creating...":"Create agent":m.isPending||P.isPending?"Saving...":"Save changes"})]})]}):null]})}export{ns as A};
|
|
2
|
-
//# sourceMappingURL=agent-editor-form-CdA5vLr8.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{v as y,j as n,L as N,cp as b,aq as S,q as w,at as R,r as h,cP as O,u as T,hz as $,S as D,cQ as E,bN as F}from"./index-DdBTTN3y.js";import{C as L,A as P}from"./create-automation-form-PEmSLMD6.js";import{P as J}from"./proposal-review-shell-D6KABxah.js";import{E as q}from"./events-feed-B9CZHI_P.js";import{J as M}from"./json-diff-BaLL4Fsu.js";import{b as v}from"./use-automations-BLNjxq2K.js";import{b as B}from"./model-jL871x2J.js";function j({automationId:i}){const{currentOwner:t}=y();return t?n.jsx(N,{to:"/$owner/events",params:{owner:t},search:b({semanticTypes:["change"],eventCategory:"config",resourceKind:"automation",resourceId:i}),className:"text-sm text-primary underline underline-offset-4",children:"View definition history in Events"}):null}function k(i){const{orgContext:t,hasOrgContext:r}=y(),{data:o,isLoading:a}=S(`/${i}`,t),{isAuthenticated:d}=w(),{isMember:u,isLoading:c}=R(),m=d&&u,s=o?.workspace,f=m?!r||a||c:a||c;return{organizationId:s?.id??"",isLoading:f}}function Y(i){return k(i)}function H({owner:i,automationId:t,organizationId:r}){const o=Number(t),a=h.useMemo(()=>({producedByAutomationId:o}),[o]),d=T(),u=v(t,void 0,r),c=u.data?.automation?.automation_name?.trim()||null,m=B(u.data?.automation),{data:s}=$(m,t,{orgSlug:i}),f=h.useMemo(()=>(s?.runs??[]).map(e=>({runId:e.runId,status:e.status,completedAt:e.completedAt})),[s]),p=h.useCallback(e=>{d?.open({href:`/${i}/automations/${t}?view=activity&run_id=${e}`,title:c!=null?`${c} · Run #${e}`:`Automation run #${e}`,runId:e})},[d,i,t,c]);return Number.isFinite(o)?n.jsx(q,{organizationId:r,ownerSlug:i,filters:a,groupByRun:!0,onRunSelect:p,runs:f,hideRunAction:!0,hideAttribution:!0,emptyState:n.jsx("p",{className:"py-6 text-sm text-muted-foreground",children:"This Automation hasn't written anything yet. Runs appear here with the events they created; clicking a run opens its conversation."})}):null}function K({agentId:i,automationId:t,runId:r,organizationId:o,onDone:a}){const[d,u]=h.useState({ready:!1,triggers:[]}),c=h.useCallback(l=>{u(g=>JSON.stringify(g)===JSON.stringify(l)?g:l)},[]),m=v(t,void 0,o,{includeVersions:!0}),s=m.data?.automation,{currentOwner:f}=y(),p=O({queryKey:["automations-list",f,"editor",t,s?.status],enabled:!!f&&!!o&&!!s,queryFn:async()=>{const g=(await E("manage_automations",{action:"list",automation_id:t,status:s?.status,include_details:!0,limit:1},{slug:f})).automations.find(C=>C.automation_id===t);if(!g)throw new F("Automation not found",404);return g},staleTime:3e4}),e=p.data,x=h.useMemo(()=>s&&e?{automation_id:s.automation_id,name:e.name,slug:e.slug,description:e.description,prompt:e.prompt,sources:e.sources,reaction_script:s.reaction_script,managed_agent_id:e.managed_agent_id,device_worker_id:e.device_worker_id,agent_kind:e.agent_kind,delivery_target:e.delivery_target??void 0,execution_config:e.execution_config??void 0,model_config:e.model_config,tags:e.tags,keying_config:s.keying_config,reactions_guidance:e.reactions_guidance,triggers:e.triggers}:void 0,[s,e]),_=n.jsx("div",{className:"flex flex-col gap-4",children:[0,1,2].map(l=>n.jsx(D,{className:"h-16 w-full rounded-lg"},l))}),A=p.isError?n.jsxs("div",{role:"alert",className:"space-y-2 text-sm",children:[n.jsx("p",{children:"Could not load the saved Automation definition."}),n.jsx("button",{type:"button",className:"text-primary underline underline-offset-4",onClick:()=>void p.refetch(),children:"Retry"})]}):m.isLoading||s&&p.isPending?_:x?n.jsx(L,{organizationId:o,prefillAgentId:i??void 0,editingAutomation:x,createFields:{triggers:d.triggers},triggerFields:n.jsx(P,{organizationId:o,initialTriggers:x.triggers??[],onChange:c},JSON.stringify(x.triggers??[])),hideHeader:!0,hideCancel:!0,submitDisabled:!d.ready,onClose:a}):n.jsx("p",{className:"text-sm text-muted-foreground",children:"Automation not found. It may have been removed."});return i?n.jsxs("div",{className:"space-y-6",children:[n.jsx(J,{resource:{kind:"automation",agentId:i,automationId:t},runId:r,onDone:a,children:({reviewMode:l,proposal:g})=>l==="active"?n.jsx(M,{before:g?.current??null,after:{...g?.current??{},...g?.proposedAfter??{}}}):l==="loading"?_:l==="error"?null:A}),n.jsx(j,{automationId:t})]}):n.jsxs("div",{className:"space-y-6",children:[A,n.jsx(j,{automationId:t})]})}function Z({owner:i,agentId:t,automationId:r,view:o,runId:a,onDone:d}){const{organizationId:u}=k(i),c=v(r,void 0,u),m=t??c.data?.automation?.managed_agent_id??null;return a||o==="definition"?n.jsx(K,{agentId:m,automationId:r,runId:a,organizationId:u,onDone:d},`${i}/${r}`):n.jsx(H,{owner:i,automationId:r,organizationId:u})}export{Z as A,Y as u};
|
|
2
|
-
//# sourceMappingURL=automation-detail-content-dFy1Huas.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{e6 as P,e7 as R,e8 as ye,dC as Ee,e9 as Lt,ea as ae,di as ie,eb as Le,ec as et,ed as en,ee as tt,ef as nt,eg as tn,eh as nn,ei as on,ej as sn,bB as d,r as T,j as Ge,m as rn,C as an,i as me,ek as Ne}from"./index-DdBTTN3y.js";function ot(e,t,o){const n=P(e,o?.in);return isNaN(t)?R(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function st(e,t,o){const n=P(e,o?.in);if(isNaN(t))return R(e,NaN);if(!t)return n;const s=n.getDate(),i=R(e,n.getTime());i.setMonth(n.getMonth()+t+1,0);const a=i.getDate();return s>=a?i:(n.setFullYear(i.getFullYear(),i.getMonth(),s),n)}function ln(e,t,o){return ot(e,t*7,o)}function fn(e,t,o){return st(e,t*12,o)}function cn(e,t){let o,n=t?.in;return e.forEach(s=>{!n&&typeof s=="object"&&(n=R.bind(null,s));const i=P(s,n);(!o||o<i||isNaN(+i))&&(o=i)}),R(n,o||NaN)}function un(e,t){let o,n=t?.in;return e.forEach(s=>{!n&&typeof s=="object"&&(n=R.bind(null,s));const i=P(s,n);(!o||o>i||isNaN(+i))&&(o=i)}),R(n,o||NaN)}function dn(e,t,o){const[n,s]=ye(o?.in,e,t);return+Ee(n)==+Ee(s)}function rt(e,t){const[o,n]=ye(e,t.start,t.end);return{start:o,end:n}}function hn(e,t){const{start:o,end:n}=rt(t?.in,e);let s=+o>+n;const i=s?+o:+n,a=s?n:o;a.setHours(0,0,0,0),a.setDate(1);let r=1;const l=[];for(;+a<=i;)l.push(R(o,a)),a.setMonth(a.getMonth()+r);return s?l.reverse():l}function mn(e,t){const o=P(e,t?.in);return o.setDate(1),o.setHours(0,0,0,0),o}function yn(e,t){const o=P(e,t?.in),n=o.getFullYear();return o.setFullYear(n+1,0,0),o.setHours(23,59,59,999),o}function pn(e,t){const{start:o,end:n}=rt(t?.in,e);let s=+o>+n;const i=s?+o:+n,a=s?n:o;a.setHours(0,0,0,0),a.setMonth(0,1);let r=1;const l=[];for(;+a<=i;)l.push(R(o,a)),a.setFullYear(a.getFullYear()+r);return s?l.reverse():l}function at(e,t){const o=Lt(),n=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0,s=P(e,t?.in),i=s.getDay(),a=(i<n?-7:0)+6-(i-n);return s.setDate(s.getDate()+a),s.setHours(23,59,59,999),s}function kn(e,t){return at(e,{...t,weekStartsOn:1})}function Dn(e,t){const o=P(e,t?.in),n=o.getFullYear(),s=o.getMonth(),i=R(o,0);return i.setFullYear(n,s+1,0),i.setHours(0,0,0,0),i.getDate()}function Mn(e,t){return P(e,t?.in).getMonth()}function bn(e,t){return P(e,t?.in).getFullYear()}function gn(e,t){return+P(e)>+P(t)}function vn(e,t){return+P(e)<+P(t)}function On(e,t,o){const[n,s]=ye(o?.in,e,t);return n.getFullYear()===s.getFullYear()&&n.getMonth()===s.getMonth()}function wn(e,t,o){const[n,s]=ye(o?.in,e,t);return n.getFullYear()===s.getFullYear()}function Wn(e,t,o){const n=P(e,o?.in),s=n.getFullYear(),i=n.getDate(),a=R(e,0);a.setFullYear(s,t,15),a.setHours(0,0,0,0);const r=Dn(a);return n.setMonth(t,Math.min(i,r)),n}function Cn(e,t,o){const n=P(e,o?.in);return isNaN(+n)?R(e,NaN):(n.setFullYear(t),n)}function Nn(e,t,o="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:e,timeZoneName:o}).format(t).split(/\s/g).slice(2).join(" ")}const Sn={},le={};function oe(e,t){try{const n=(Sn[e]||=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format)(t).split("GMT")[1];return n in le?le[n]:Ue(n,n.split(":"))}catch{if(e in le)return le[e];const o=e?.match(Yn);return o?Ue(e,o.slice(1)):NaN}}const Yn=/([+-]\d\d):?(\d\d)?/;function Ue(e,t){const o=+(t[0]||0),n=+(t[1]||0),s=+(t[2]||0)/60;return le[e]=o*60+n>0?o*60+n+s:o*60-n-s}class J extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(oe(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),it(this),xe(this)):this.setTime(Date.now())}static tz(t,...o){return o.length?new J(...o,t):new J(Date.now(),t)}withTimeZone(t){return new J(+this,t)}getTimezoneOffset(){const t=-oe(this.timeZone,this);return t>0?Math.floor(t):Math.ceil(t)}setTime(t){return Date.prototype.setTime.apply(this,arguments),xe(this),+this}[Symbol.for("constructDateFrom")](t){return new J(+new Date(t),this.timeZone)}}const Ze=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!Ze.test(e))return;const t=e.replace(Ze,"$1UTC");J.prototype[t]&&(e.startsWith("get")?J.prototype[e]=function(){return this.internal[t]()}:(J.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),_n(this),+this},J.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),xe(this),+this}))});function xe(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(-oe(e.timeZone,e)*60))}function _n(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),it(e)}function it(e){const t=oe(e.timeZone,e),o=t>0?Math.floor(t):Math.ceil(t),n=new Date(+e);n.setUTCHours(n.getUTCHours()-1);const s=-new Date(+e).getTimezoneOffset(),i=-new Date(+n).getTimezoneOffset(),a=s-i,r=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();a&&r&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+a);const l=s-o;l&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+l);const f=new Date(+e);f.setUTCSeconds(0);const u=s>0?f.getSeconds():(f.getSeconds()-60)%60,c=Math.round(-(oe(e.timeZone,e)*60))%60;(c||u)&&(e.internal.setUTCSeconds(e.internal.getUTCSeconds()+c),Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+c+u));const m=oe(e.timeZone,e),p=m>0?Math.floor(m):Math.ceil(m),N=-new Date(+e).getTimezoneOffset()-p,O=p!==o,_=N-l;if(O&&_){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+_);const b=oe(e.timeZone,e),D=b>0?Math.floor(b):Math.ceil(b),g=p-D;g&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+g),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+g))}}class F extends J{static tz(t,...o){return o.length?new F(...o,t):new F(Date.now(),t)}toISOString(){const[t,o,n]=this.tzComponents(),s=`${t}${o}:${n}`;return this.internal.toISOString().slice(0,-1)+s}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,o,n,s]=this.internal.toUTCString().split(" ");return`${t?.slice(0,-1)} ${n} ${o} ${s}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[o,n,s]=this.tzComponents();return`${t} GMT${o}${n}${s} (${Nn(this.timeZone,this)})`}toLocaleString(t,o){return Date.prototype.toLocaleString.call(this,t,{...o,timeZone:o?.timeZone||this.timeZone})}toLocaleDateString(t,o){return Date.prototype.toLocaleDateString.call(this,t,{...o,timeZone:o?.timeZone||this.timeZone})}toLocaleTimeString(t,o){return Date.prototype.toLocaleTimeString.call(this,t,{...o,timeZone:o?.timeZone||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),o=t>0?"-":"+",n=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),s=String(Math.abs(t)%60).padStart(2,"0");return[o,n,s]}withTimeZone(t){return new F(+this,t)}[Symbol.for("constructDateFrom")](t){return new F(+new Date(t),this.timeZone)}}const Ke=5,Tn=4;function En(e,t){const o=t.startOfMonth(e),n=o.getDay()>0?o.getDay():7,s=t.addDays(e,-n+1),i=t.addDays(s,Ke*7-1);return t.getMonth(e)===t.getMonth(i)?Ke:Tn}function lt(e,t){const o=t.startOfMonth(e),n=o.getDay();return n===1?o:n===0?t.addDays(o,-6):t.addDays(o,-1*(n-1))}function xn(e,t){const o=lt(e,t),n=En(e,t);return t.addDays(o,n*7-1)}const ft={...ae,labels:{labelDayButton:(e,t,o,n)=>{let s;n&&typeof n.format=="function"?s=n.format.bind(n):s=(a,r)=>ie(a,r,{locale:ae,...o});let i=s(e,"PPPP");return t.today&&(i=`Today, ${i}`),t.selected&&(i=`${i}, selected`),i},labelMonthDropdown:"Choose the Month",labelNext:"Go to the Next Month",labelPrevious:"Go to the Previous Month",labelWeekNumber:e=>`Week ${e}`,labelYearDropdown:"Choose the Year",labelGrid:(e,t,o)=>{let n;return o&&typeof o.format=="function"?n=o.format.bind(o):n=(s,i)=>ie(s,i,{locale:ae,...t}),n(e,"LLLL yyyy")},labelGridcell:(e,t,o,n)=>{let s;n&&typeof n.format=="function"?s=n.format.bind(n):s=(a,r)=>ie(a,r,{locale:ae,...o});let i=s(e,"PPPP");return t?.today&&(i=`Today, ${i}`),i},labelNav:"Navigation bar",labelWeekNumberHeader:"Week Number",labelWeekday:(e,t,o)=>{let n;return o&&typeof o.format=="function"?n=o.format.bind(o):n=(s,i)=>ie(s,i,{locale:ae,...t}),n(e,"cccc")}}};class j{constructor(t,o){this.Date=Date,this.today=()=>this.overrides?.today?this.overrides.today():this.options.timeZone?F.tz(this.options.timeZone):new this.Date,this.newDate=(n,s,i)=>this.overrides?.newDate?this.overrides.newDate(n,s,i):this.options.timeZone?new F(n,s,i,this.options.timeZone):new Date(n,s,i),this.addDays=(n,s)=>this.overrides?.addDays?this.overrides.addDays(n,s):ot(n,s),this.addMonths=(n,s)=>this.overrides?.addMonths?this.overrides.addMonths(n,s):st(n,s),this.addWeeks=(n,s)=>this.overrides?.addWeeks?this.overrides.addWeeks(n,s):ln(n,s),this.addYears=(n,s)=>this.overrides?.addYears?this.overrides.addYears(n,s):fn(n,s),this.differenceInCalendarDays=(n,s)=>this.overrides?.differenceInCalendarDays?this.overrides.differenceInCalendarDays(n,s):Le(n,s),this.differenceInCalendarMonths=(n,s)=>this.overrides?.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(n,s):et(n,s),this.eachMonthOfInterval=n=>this.overrides?.eachMonthOfInterval?this.overrides.eachMonthOfInterval(n):hn(n),this.eachYearOfInterval=n=>{const s=this.overrides?.eachYearOfInterval?this.overrides.eachYearOfInterval(n):pn(n),i=new Set(s.map(r=>this.getYear(r)));if(i.size===s.length)return s;const a=[];return i.forEach(r=>{a.push(new Date(r,0,1))}),a},this.endOfBroadcastWeek=n=>this.overrides?.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(n):xn(n,this),this.endOfISOWeek=n=>this.overrides?.endOfISOWeek?this.overrides.endOfISOWeek(n):kn(n),this.endOfMonth=n=>this.overrides?.endOfMonth?this.overrides.endOfMonth(n):en(n),this.endOfWeek=(n,s)=>this.overrides?.endOfWeek?this.overrides.endOfWeek(n,s):at(n,this.options),this.endOfYear=n=>this.overrides?.endOfYear?this.overrides.endOfYear(n):yn(n),this.format=(n,s,i)=>{const a=this.overrides?.format?this.overrides.format(n,s,this.options):ie(n,s,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(a):a},this.getISOWeek=n=>this.overrides?.getISOWeek?this.overrides.getISOWeek(n):tt(n),this.getMonth=(n,s)=>this.overrides?.getMonth?this.overrides.getMonth(n,this.options):Mn(n,this.options),this.getYear=(n,s)=>this.overrides?.getYear?this.overrides.getYear(n,this.options):bn(n,this.options),this.getWeek=(n,s)=>this.overrides?.getWeek?this.overrides.getWeek(n,this.options):nt(n,this.options),this.isAfter=(n,s)=>this.overrides?.isAfter?this.overrides.isAfter(n,s):gn(n,s),this.isBefore=(n,s)=>this.overrides?.isBefore?this.overrides.isBefore(n,s):vn(n,s),this.isDate=n=>this.overrides?.isDate?this.overrides.isDate(n):tn(n),this.isSameDay=(n,s)=>this.overrides?.isSameDay?this.overrides.isSameDay(n,s):dn(n,s),this.isSameMonth=(n,s)=>this.overrides?.isSameMonth?this.overrides.isSameMonth(n,s):On(n,s),this.isSameYear=(n,s)=>this.overrides?.isSameYear?this.overrides.isSameYear(n,s):wn(n,s),this.max=n=>this.overrides?.max?this.overrides.max(n):cn(n),this.min=n=>this.overrides?.min?this.overrides.min(n):un(n),this.setMonth=(n,s)=>this.overrides?.setMonth?this.overrides.setMonth(n,s):Wn(n,s),this.setYear=(n,s)=>this.overrides?.setYear?this.overrides.setYear(n,s):Cn(n,s),this.startOfBroadcastWeek=(n,s)=>this.overrides?.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(n,this):lt(n,this),this.startOfDay=n=>this.overrides?.startOfDay?this.overrides.startOfDay(n):Ee(n),this.startOfISOWeek=n=>this.overrides?.startOfISOWeek?this.overrides.startOfISOWeek(n):nn(n),this.startOfMonth=n=>this.overrides?.startOfMonth?this.overrides.startOfMonth(n):mn(n),this.startOfWeek=(n,s)=>this.overrides?.startOfWeek?this.overrides.startOfWeek(n,this.options):on(n,this.options),this.startOfYear=n=>this.overrides?.startOfYear?this.overrides.startOfYear(n):sn(n),this.options={locale:ft,...t},this.overrides=o}getDigitMap(){const{numerals:t="latn"}=this.options,o=new Intl.NumberFormat("en-US",{numberingSystem:t}),n={};for(let s=0;s<10;s++)n[s.toString()]=o.format(s);return n}replaceDigits(t){const o=this.getDigitMap();return t.replace(/\d/g,n=>o[n]||n)}formatNumber(t){return this.replaceDigits(t.toString())}getMonthYearOrder(){const t=this.options.locale?.code;return t&&j.yearFirstLocales.has(t)?"year-first":"month-first"}formatMonthYear(t){const{locale:o,timeZone:n,numerals:s}=this.options,i=o?.code;if(i&&j.yearFirstLocales.has(i))try{return new Intl.DateTimeFormat(i,{month:"long",year:"numeric",timeZone:n,numberingSystem:s}).format(t)}catch{}const a=this.getMonthYearOrder()==="year-first"?"y LLLL":"LLLL y";return this.format(t,a)}}j.yearFirstLocales=new Set(["eu","hu","ja","ja-Hira","ja-JP","ko","ko-KR","lt","lt-LT","lv","lv-LV","mn","mn-MN","zh","zh-CN","zh-HK","zh-TW"]);const Q=new j;class ct{constructor(t,o,n=Q){this.date=t,this.displayMonth=o,this.outside=!!(o&&!n.isSameMonth(t,o)),this.dateLib=n,this.isoDate=n.format(t,"yyyy-MM-dd"),this.displayMonthId=n.format(o,"yyyy-MM"),this.dateMonthId=n.format(t,"yyyy-MM")}isEqualTo(t){return this.dateLib.isSameDay(t.date,this.date)&&this.dateLib.isSameMonth(t.displayMonth,this.displayMonth)}}class In{constructor(t,o){this.date=t,this.weeks=o}}class Bn{constructor(t,o){this.days=o,this.weekNumber=t}}function Fn(e){return d.createElement("button",{...e})}function Pn(e){return d.createElement("span",{...e})}function An(e){const{size:t=24,orientation:o="left",className:n}=e;return d.createElement("svg",{className:n,width:t,height:t,viewBox:"0 0 24 24"},o==="up"&&d.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),o==="down"&&d.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),o==="left"&&d.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),o==="right"&&d.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function Hn(e){const{day:t,modifiers:o,...n}=e;return d.createElement("td",{...n})}function jn(e){const{day:t,modifiers:o,...n}=e,s=d.useRef(null);return d.useEffect(()=>{o.focused&&s.current?.focus()},[o.focused]),d.createElement("button",{ref:s,...n})}var y;(function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"})(y||(y={}));var x;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(x||(x={}));var Z;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(Z||(Z={}));var H;(function(e){e.weeks_before_enter="weeks_before_enter",e.weeks_before_exit="weeks_before_exit",e.weeks_after_enter="weeks_after_enter",e.weeks_after_exit="weeks_after_exit",e.caption_after_enter="caption_after_enter",e.caption_after_exit="caption_after_exit",e.caption_before_enter="caption_before_enter",e.caption_before_exit="caption_before_exit"})(H||(H={}));function $n(e){const{options:t,className:o,components:n,classNames:s,...i}=e,a=[s[y.Dropdown],o].join(" "),r=t?.find(({value:l})=>l===i.value);return d.createElement("span",{"data-disabled":i.disabled,className:s[y.DropdownRoot]},d.createElement(n.Select,{className:a,...i},t?.map(({value:l,label:f,disabled:u})=>d.createElement(n.Option,{key:l,value:l,disabled:u},f))),d.createElement("span",{className:s[y.CaptionLabel],"aria-hidden":!0},r?.label,d.createElement(n.Chevron,{orientation:"down",size:18,className:s[y.Chevron]})))}function zn(e){return d.createElement("div",{...e})}function Rn(e){return d.createElement("div",{...e})}function qn(e){const{calendarMonth:t,displayIndex:o,...n}=e;return d.createElement("div",{...n},e.children)}function Gn(e){const{calendarMonth:t,displayIndex:o,...n}=e;return d.createElement("div",{...n})}function Un(e){return d.createElement("table",{...e})}function Zn(e){return d.createElement("div",{...e})}const ut=T.createContext(void 0);function fe(){const e=T.useContext(ut);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function Kn(e){const{components:t}=fe();return d.createElement(t.Dropdown,{...e})}function Vn(e){const{onPreviousClick:t,onNextClick:o,previousMonth:n,nextMonth:s,...i}=e,{components:a,classNames:r,labels:{labelPrevious:l,labelNext:f}}=fe(),u=T.useCallback(m=>{s&&o?.(m)},[s,o]),c=T.useCallback(m=>{n&&t?.(m)},[n,t]);return d.createElement("nav",{...i},d.createElement(a.PreviousMonthButton,{type:"button",className:r[y.PreviousMonthButton],tabIndex:n?void 0:-1,"aria-disabled":n?void 0:!0,"aria-label":l(n),onClick:c},d.createElement(a.Chevron,{disabled:n?void 0:!0,className:r[y.Chevron],orientation:"left"})),d.createElement(a.NextMonthButton,{type:"button",className:r[y.NextMonthButton],tabIndex:s?void 0:-1,"aria-disabled":s?void 0:!0,"aria-label":f(s),onClick:u},d.createElement(a.Chevron,{disabled:s?void 0:!0,orientation:"right",className:r[y.Chevron]})))}function Jn(e){const{components:t}=fe();return d.createElement(t.Button,{...e})}function Qn(e){return d.createElement("option",{...e})}function Xn(e){const{components:t}=fe();return d.createElement(t.Button,{...e})}function Ln(e){const{rootRef:t,...o}=e;return d.createElement("div",{...o,ref:t})}function eo(e){return d.createElement("select",{...e})}function to(e){const{week:t,...o}=e;return d.createElement("tr",{...o})}function no(e){return d.createElement("th",{...e})}function oo(e){return d.createElement("thead",{"aria-hidden":!0},d.createElement("tr",{...e}))}function so(e){const{week:t,...o}=e;return d.createElement("th",{...o})}function ro(e){return d.createElement("th",{...e})}function ao(e){return d.createElement("tbody",{...e})}function io(e){const{components:t}=fe();return d.createElement(t.Dropdown,{...e})}const lo=Object.freeze(Object.defineProperty({__proto__:null,Button:Fn,CaptionLabel:Pn,Chevron:An,Day:Hn,DayButton:jn,Dropdown:$n,DropdownNav:zn,Footer:Rn,Month:qn,MonthCaption:Gn,MonthGrid:Un,Months:Zn,MonthsDropdown:Kn,Nav:Vn,NextMonthButton:Jn,Option:Qn,PreviousMonthButton:Xn,Root:Ln,Select:eo,Week:to,WeekNumber:so,WeekNumberHeader:ro,Weekday:no,Weekdays:oo,Weeks:ao,YearsDropdown:io},Symbol.toStringTag,{value:"Module"}));function ee(e,t,o=!1,n=Q){let{from:s,to:i}=e;const{differenceInCalendarDays:a,isSameDay:r}=n;return s&&i?(a(i,s)<0&&([s,i]=[i,s]),a(t,s)>=(o?1:0)&&a(i,t)>=(o?1:0)):!o&&i?r(i,t):!o&&s?r(s,t):!1}function Ie(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function pe(e){return!!(e&&typeof e=="object"&&"from"in e)}function Be(e){return!!(e&&typeof e=="object"&&"after"in e)}function Fe(e){return!!(e&&typeof e=="object"&&"before"in e)}function dt(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function ht(e,t){return Array.isArray(e)&&e.every(t.isDate)}function te(e,t,o=Q){const n=Array.isArray(t)?t:[t],{isSameDay:s,differenceInCalendarDays:i,isAfter:a}=o;return n.some(r=>{if(typeof r=="boolean")return r;if(o.isDate(r))return s(e,r);if(ht(r,o))return r.some(l=>s(e,l));if(pe(r))return ee(r,e,!1,o);if(dt(r))return Array.isArray(r.dayOfWeek)?r.dayOfWeek.includes(e.getDay()):r.dayOfWeek===e.getDay();if(Ie(r)){const l=i(r.before,e),f=i(r.after,e),u=l>0,c=f<0;return a(r.before,r.after)?c&&u:u||c}return Be(r)?i(e,r.after)>0:Fe(r)?i(r.before,e)>0:typeof r=="function"?r(e):!1})}function fo(e,t,o,n,s){const{disabled:i,hidden:a,modifiers:r,showOutsideDays:l,broadcastCalendar:f,today:u=s.today()}=t,{isSameDay:c,isSameMonth:m,startOfMonth:p,isBefore:w,endOfMonth:N,isAfter:O}=s,_=o&&p(o),b=n&&N(n),D={[x.focused]:[],[x.outside]:[],[x.disabled]:[],[x.hidden]:[],[x.today]:[]},g={};for(const k of e){const{date:h,displayMonth:W}=k,E=!!(W&&!m(h,W)),B=!!(_&&w(h,_)),I=!!(b&&O(h,b)),K=!!(i&&te(h,i,s)),ne=!!(a&&te(h,a,s))||B||I||!f&&!l&&E||f&&l===!1&&E,X=c(h,u);E&&D.outside.push(k),K&&D.disabled.push(k),ne&&D.hidden.push(k),X&&D.today.push(k),r&&Object.keys(r).forEach($=>{const se=r?.[$];se&&te(h,se,s)&&(g[$]?g[$].push(k):g[$]=[k])})}return k=>{const h={[x.focused]:!1,[x.disabled]:!1,[x.hidden]:!1,[x.outside]:!1,[x.today]:!1},W={};for(const E in D){const B=D[E];h[E]=B.some(I=>I===k)}for(const E in g)W[E]=g[E].some(B=>B===k);return{...h,...W}}}function co(e,t,o={}){return Object.entries(e).filter(([,s])=>s===!0).reduce((s,[i])=>(o[i]?s.push(o[i]):t[x[i]]?s.push(t[x[i]]):t[Z[i]]&&s.push(t[Z[i]]),s),[t[y.Day]])}function uo(e){return{...lo,...e}}function ho(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0,"data-nav-layout":e.navLayout||void 0};return Object.entries(e).forEach(([o,n])=>{o.startsWith("data-")&&(t[o]=n)}),t}function mo(){const e={};for(const t in y)e[y[t]]=`rdp-${y[t]}`;for(const t in x)e[x[t]]=`rdp-${x[t]}`;for(const t in Z)e[Z[t]]=`rdp-${Z[t]}`;for(const t in H)e[H[t]]=`rdp-${H[t]}`;return e}function mt(e,t,o){return(o??new j(t)).formatMonthYear(e)}const yo=mt;function po(e,t,o){return(o??new j(t)).format(e,"d")}function ko(e,t=Q){return t.format(e,"LLLL")}function Do(e,t,o){return(o??new j(t)).format(e,"cccccc")}function Mo(e,t=Q){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function bo(){return""}function yt(e,t=Q){return t.format(e,"yyyy")}const go=yt,vo=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:mt,formatDay:po,formatMonthCaption:yo,formatMonthDropdown:ko,formatWeekNumber:Mo,formatWeekNumberHeader:bo,formatWeekdayName:Do,formatYearCaption:go,formatYearDropdown:yt},Symbol.toStringTag,{value:"Module"}));function Oo(e){return e?.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e?.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...vo,...e}}function Pe(e,t,o,n){let s=(n??new j(o)).format(e,"PPPP");return t.today&&(s=`Today, ${s}`),t.selected&&(s=`${s}, selected`),s}const wo=Pe;function Ae(e,t,o){return(o??new j(t)).formatMonthYear(e)}const Wo=Ae;function pt(e,t,o,n){let s=(n??new j(o)).format(e,"PPPP");return t?.today&&(s=`Today, ${s}`),s}function kt(e){return"Choose the Month"}function Dt(){return""}const Co="Go to the Next Month";function Mt(e,t){return Co}function bt(e){return"Go to the Previous Month"}function gt(e,t,o){return(o??new j(t)).format(e,"cccc")}function vt(e,t){return`Week ${e}`}function Ot(e){return"Week Number"}function wt(e){return"Choose the Year"}const No=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:Wo,labelDay:wo,labelDayButton:Pe,labelGrid:Ae,labelGridcell:pt,labelMonthDropdown:kt,labelNav:Dt,labelNext:Mt,labelPrevious:bt,labelWeekNumber:vt,labelWeekNumberHeader:Ot,labelWeekday:gt,labelYearDropdown:wt},Symbol.toStringTag,{value:"Module"})),U=(e,t,o)=>t||(o?typeof o=="function"?o:(...n)=>o:e);function So(e,t){const o=t.locale?.labels??{};return{...No,...e??{},labelDayButton:U(Pe,e?.labelDayButton,o.labelDayButton),labelMonthDropdown:U(kt,e?.labelMonthDropdown,o.labelMonthDropdown),labelNext:U(Mt,e?.labelNext,o.labelNext),labelPrevious:U(bt,e?.labelPrevious,o.labelPrevious),labelWeekNumber:U(vt,e?.labelWeekNumber,o.labelWeekNumber),labelYearDropdown:U(wt,e?.labelYearDropdown,o.labelYearDropdown),labelGrid:U(Ae,e?.labelGrid,o.labelGrid),labelGridcell:U(pt,e?.labelGridcell,o.labelGridcell),labelNav:U(Dt,e?.labelNav,o.labelNav),labelWeekNumberHeader:U(Ot,e?.labelWeekNumberHeader,o.labelWeekNumberHeader),labelWeekday:U(gt,e?.labelWeekday,o.labelWeekday)}}function Yo(e,t,o,n,s){const{startOfMonth:i,startOfYear:a,endOfYear:r,eachMonthOfInterval:l,getMonth:f}=s;return l({start:a(e),end:r(e)}).map(m=>{const p=n.formatMonthDropdown(m,s),w=f(m),N=t&&m<i(t)||o&&m>i(o)||!1;return{value:w,label:p,disabled:N}})}function _o(e,t={},o={}){let n={...t?.[y.Day]};return Object.entries(e).filter(([,s])=>s===!0).forEach(([s])=>{n={...n,...o?.[s]}}),n}function To(e,t,o,n){const s=n??e.today(),i=o?e.startOfBroadcastWeek(s,e):t?e.startOfISOWeek(s):e.startOfWeek(s),a=[];for(let r=0;r<7;r++){const l=e.addDays(i,r);a.push(l)}return a}function Eo(e,t,o,n,s=!1){if(!e||!t)return;const{startOfYear:i,endOfYear:a,eachYearOfInterval:r,getYear:l}=n,f=i(e),u=a(t),c=r({start:f,end:u});return s&&c.reverse(),c.map(m=>{const p=o.formatYearDropdown(m,n);return{value:l(m),label:p,disabled:!1}})}function xo(e,t={}){const{weekStartsOn:o,locale:n}=t,s=o??n?.options?.weekStartsOn??0,i=r=>{const l=typeof r=="number"||typeof r=="string"?new Date(r):r;return new F(l.getFullYear(),l.getMonth(),l.getDate(),12,0,0,e)},a=r=>{const l=i(r);return new Date(l.getFullYear(),l.getMonth(),l.getDate(),0,0,0,0)};return{today:()=>i(F.tz(e)),newDate:(r,l,f)=>new F(r,l,f,12,0,0,e),startOfDay:r=>i(r),startOfWeek:(r,l)=>{const f=i(r),u=l?.weekStartsOn??s,c=(f.getDay()-u+7)%7;return f.setDate(f.getDate()-c),f},startOfISOWeek:r=>{const l=i(r),f=(l.getDay()-1+7)%7;return l.setDate(l.getDate()-f),l},startOfMonth:r=>{const l=i(r);return l.setDate(1),l},startOfYear:r=>{const l=i(r);return l.setMonth(0,1),l},endOfWeek:(r,l)=>{const f=i(r),m=(((l?.weekStartsOn??s)+6)%7-f.getDay()+7)%7;return f.setDate(f.getDate()+m),f},endOfISOWeek:r=>{const l=i(r),f=(7-l.getDay())%7;return l.setDate(l.getDate()+f),l},endOfMonth:r=>{const l=i(r);return l.setMonth(l.getMonth()+1,0),l},endOfYear:r=>{const l=i(r);return l.setMonth(11,31),l},eachMonthOfInterval:r=>{const l=i(r.start),f=i(r.end),u=[],c=new F(l.getFullYear(),l.getMonth(),1,12,0,0,e),m=f.getFullYear()*12+f.getMonth();for(;c.getFullYear()*12+c.getMonth()<=m;)u.push(new F(c,e)),c.setMonth(c.getMonth()+1,1);return u},addDays:(r,l)=>{const f=i(r);return f.setDate(f.getDate()+l),f},addWeeks:(r,l)=>{const f=i(r);return f.setDate(f.getDate()+l*7),f},addMonths:(r,l)=>{const f=i(r);return f.setMonth(f.getMonth()+l),f},addYears:(r,l)=>{const f=i(r);return f.setFullYear(f.getFullYear()+l),f},eachYearOfInterval:r=>{const l=i(r.start),f=i(r.end),u=[],c=new F(l.getFullYear(),0,1,12,0,0,e);for(;c.getFullYear()<=f.getFullYear();)u.push(new F(c,e)),c.setFullYear(c.getFullYear()+1,0,1);return u},getWeek:(r,l)=>{const f=a(r);return nt(f,{weekStartsOn:l?.weekStartsOn??s,firstWeekContainsDate:l?.firstWeekContainsDate??n?.options?.firstWeekContainsDate??1})},getISOWeek:r=>{const l=a(r);return tt(l)},differenceInCalendarDays:(r,l)=>{const f=a(r),u=a(l);return Le(f,u)},differenceInCalendarMonths:(r,l)=>{const f=a(r),u=a(l);return et(f,u)}}}const ce=e=>e instanceof HTMLElement?e:null,Se=e=>[...e.querySelectorAll("[data-animated-month]")??[]],Io=e=>ce(e.querySelector("[data-animated-month]")),Ye=e=>ce(e.querySelector("[data-animated-caption]")),_e=e=>ce(e.querySelector("[data-animated-weeks]")),Bo=e=>ce(e.querySelector("[data-animated-nav]")),Fo=e=>ce(e.querySelector("[data-animated-weekdays]"));function Po(e,t,{classNames:o,months:n,focused:s,dateLib:i}){const a=T.useRef(null),r=T.useRef(n),l=T.useRef(!1);T.useLayoutEffect(()=>{const f=r.current;if(r.current=n,!t||!e.current||!(e.current instanceof HTMLElement)||n.length===0||f.length===0||n.length!==f.length)return;const u=i.isSameMonth(n[0].date,f[0].date),c=i.isAfter(n[0].date,f[0].date),m=c?o[H.caption_after_enter]:o[H.caption_before_enter],p=c?o[H.weeks_after_enter]:o[H.weeks_before_enter],w=a.current,N=e.current.cloneNode(!0);if(N instanceof HTMLElement?(Se(N).forEach(D=>{if(!(D instanceof HTMLElement))return;const g=Io(D);g&&D.contains(g)&&D.removeChild(g);const k=Ye(D);k&&k.classList.remove(m);const h=_e(D);h&&h.classList.remove(p)}),a.current=N):a.current=null,l.current||u||s)return;const O=w instanceof HTMLElement?Se(w):[],_=Se(e.current);if(_?.every(b=>b instanceof HTMLElement)&&O&&O.every(b=>b instanceof HTMLElement)){l.current=!0,e.current.style.isolation="isolate";const b=Bo(e.current);b&&(b.style.zIndex="1"),_.forEach((D,g)=>{const k=O[g];if(!k)return;D.style.position="relative",D.style.overflow="hidden";const h=Ye(D);h&&h.classList.add(m);const W=_e(D);W&&W.classList.add(p);const E=()=>{l.current=!1,e.current&&(e.current.style.isolation=""),b&&(b.style.zIndex=""),h&&h.classList.remove(m),W&&W.classList.remove(p),D.style.position="",D.style.overflow="",D.contains(k)&&D.removeChild(k)};k.style.pointerEvents="none",k.style.position="absolute",k.style.overflow="hidden",k.setAttribute("aria-hidden","true");const B=Fo(k);B&&(B.style.opacity="0");const I=Ye(k);I&&(I.classList.add(c?o[H.caption_before_exit]:o[H.caption_after_exit]),I.addEventListener("animationend",E));const K=_e(k);K&&K.classList.add(c?o[H.weeks_before_exit]:o[H.weeks_after_exit]),D.insertBefore(k,D.firstChild)})}})}function Ao(e,t,o,n){const s=e[0],i=e[e.length-1],{ISOWeek:a,fixedWeeks:r,broadcastCalendar:l}=o??{},{addDays:f,differenceInCalendarDays:u,differenceInCalendarMonths:c,endOfBroadcastWeek:m,endOfISOWeek:p,endOfMonth:w,endOfWeek:N,isAfter:O,startOfBroadcastWeek:_,startOfISOWeek:b,startOfWeek:D}=n,g=l?_(s,n):a?b(s):D(s),k=l?m(i):a?p(w(i)):N(w(i)),h=t&&(l?m(t):a?p(t):N(t)),W=h&&O(k,h)?h:k,E=u(W,g),B=c(i,s)+1,I=[];for(let X=0;X<=E;X++){const $=f(g,X);I.push($)}const ne=(l?35:42)*B;if(r&&I.length<ne){const X=ne-I.length;for(let $=0;$<X;$++){const se=f(I[I.length-1],1);I.push(se)}}return I}function Ho(e){const t=[];return e.reduce((o,n)=>{const s=n.weeks.reduce((i,a)=>i.concat(a.days.slice()),t.slice());return o.concat(s.slice())},t.slice())}function jo(e,t,o,n){const{numberOfMonths:s=1}=o,i=[];for(let a=0;a<s;a++){const r=n.addMonths(e,a);if(t&&r>t)break;i.push(r)}return i}function Ve(e,t,o,n){const{month:s,defaultMonth:i,today:a=n.today(),numberOfMonths:r=1}=e;let l=s||i||a;const{differenceInCalendarMonths:f,addMonths:u,startOfMonth:c}=n;if(o&&f(o,l)<r-1){const m=-1*(r-1);l=u(o,m)}return t&&f(l,t)<0&&(l=t),c(l)}function $o(e,t,o,n){const{addDays:s,endOfBroadcastWeek:i,endOfISOWeek:a,endOfMonth:r,endOfWeek:l,getISOWeek:f,getWeek:u,startOfBroadcastWeek:c,startOfISOWeek:m,startOfWeek:p}=n,w=e.reduce((N,O)=>{const _=o.broadcastCalendar?c(O,n):o.ISOWeek?m(O):p(O),b=o.broadcastCalendar?i(O):o.ISOWeek?a(r(O)):l(r(O)),D=t.filter(W=>W>=_&&W<=b),g=o.broadcastCalendar?35:42;if(o.fixedWeeks&&D.length<g){const W=t.filter(E=>{const B=g-D.length;return E>b&&E<=s(b,B)});D.push(...W)}const k=D.reduce((W,E)=>{const B=o.ISOWeek?f(E):u(E),I=W.find(ne=>ne.weekNumber===B),K=new ct(E,O,n);return I?I.days.push(K):W.push(new Bn(B,[K])),W},[]),h=new In(O,k);return N.push(h),N},[]);return o.reverseMonths?w.reverse():w}function zo(e,t){let{startMonth:o,endMonth:n}=e;const{startOfYear:s,startOfDay:i,startOfMonth:a,endOfMonth:r,addYears:l,endOfYear:f,newDate:u,today:c}=t,{fromYear:m,toYear:p,fromMonth:w,toMonth:N}=e;!o&&w&&(o=w),!o&&m&&(o=t.newDate(m,0,1)),!n&&N&&(n=N),!n&&p&&(n=u(p,11,31));const O=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return o?o=a(o):m?o=u(m,0,1):!o&&O&&(o=s(l(e.today??c(),-100))),n?n=r(n):p?n=u(p,11,31):!n&&O&&(n=f(e.today??c())),[o&&i(o),n&&i(n)]}function Ro(e,t,o,n){if(o.disableNavigation)return;const{pagedNavigation:s,numberOfMonths:i=1}=o,{startOfMonth:a,addMonths:r,differenceInCalendarMonths:l}=n,f=s?i:1,u=a(e);if(!t)return r(u,f);if(!(l(t,e)<i))return r(u,f)}function qo(e,t,o,n){if(o.disableNavigation)return;const{pagedNavigation:s,numberOfMonths:i}=o,{startOfMonth:a,addMonths:r,differenceInCalendarMonths:l}=n,f=s?i??1:1,u=a(e);if(!t)return r(u,-f);if(!(l(u,t)<=0))return r(u,-f)}function Go(e){const t=[];return e.reduce((o,n)=>o.concat(n.weeks.slice()),t.slice())}function ke(e,t){const[o,n]=T.useState(e);return[t===void 0?o:t,n]}function Uo(e,t){const[o,n]=zo(e,t),{startOfMonth:s,endOfMonth:i}=t,a=Ve(e,o,n,t),[r,l]=ke(a,e.month?a:void 0);T.useEffect(()=>{const g=Ve(e,o,n,t);l(g)},[e.timeZone]);const{months:f,weeks:u,days:c,previousMonth:m,nextMonth:p}=T.useMemo(()=>{const g=jo(r,n,{numberOfMonths:e.numberOfMonths},t),k=Ao(g,e.endMonth?i(e.endMonth):void 0,{ISOWeek:e.ISOWeek,fixedWeeks:e.fixedWeeks,broadcastCalendar:e.broadcastCalendar},t),h=$o(g,k,{broadcastCalendar:e.broadcastCalendar,fixedWeeks:e.fixedWeeks,ISOWeek:e.ISOWeek,reverseMonths:e.reverseMonths},t),W=Go(h),E=Ho(h),B=qo(r,o,e,t),I=Ro(r,n,e,t);return{months:h,weeks:W,days:E,previousMonth:B,nextMonth:I}},[t,r.getTime(),n?.getTime(),o?.getTime(),e.disableNavigation,e.broadcastCalendar,e.endMonth?.getTime(),e.fixedWeeks,e.ISOWeek,e.numberOfMonths,e.pagedNavigation,e.reverseMonths]),{disableNavigation:w,onMonthChange:N}=e,O=g=>u.some(k=>k.days.some(h=>h.isEqualTo(g))),_=g=>{if(w)return;let k=s(g);o&&k<s(o)&&(k=s(o)),n&&k>s(n)&&(k=s(n)),l(k),N?.(k)};return{months:f,weeks:u,days:c,navStart:o,navEnd:n,previousMonth:m,nextMonth:p,goToMonth:_,goToDay:g=>{O(g)||_(g.date)}}}var V;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(V||(V={}));function Je(e){return!e[x.disabled]&&!e[x.hidden]&&!e[x.outside]}function Zo(e,t,o,n){let s,i=-1;for(const a of e){const r=t(a);Je(r)&&(r[x.focused]&&i<V.FocusedModifier?(s=a,i=V.FocusedModifier):n?.isEqualTo(a)&&i<V.LastFocused?(s=a,i=V.LastFocused):o(a.date)&&i<V.Selected?(s=a,i=V.Selected):r[x.today]&&i<V.Today&&(s=a,i=V.Today))}return s||(s=e.find(a=>Je(t(a)))),s}function Ko(e,t,o,n,s,i,a){const{ISOWeek:r,broadcastCalendar:l}=i,{addDays:f,addMonths:u,addWeeks:c,addYears:m,endOfBroadcastWeek:p,endOfISOWeek:w,endOfWeek:N,max:O,min:_,startOfBroadcastWeek:b,startOfISOWeek:D,startOfWeek:g}=a;let h={day:f,week:c,month:u,year:m,startOfWeek:W=>l?b(W,a):r?D(W):g(W),endOfWeek:W=>l?p(W):r?w(W):N(W)}[e](o,t==="after"?1:-1);return t==="before"&&n?h=O([n,h]):t==="after"&&s&&(h=_([s,h])),h}function Wt(e,t,o,n,s,i,a,r=0){if(r>365)return;const l=Ko(e,t,o.date,n,s,i,a),f=!!(i.disabled&&te(l,i.disabled,a)),u=!!(i.hidden&&te(l,i.hidden,a)),c=l,m=new ct(l,c,a);return!f&&!u?m:Wt(e,t,m,n,s,i,a,r+1)}function Vo(e,t,o,n,s){const{autoFocus:i}=e,[a,r]=T.useState(),l=Zo(t.days,o,n||(()=>!1),a),[f,u]=T.useState(i?l:void 0);return{isFocusTarget:N=>!!l?.isEqualTo(N),setFocused:u,focused:f,blur:()=>{r(f),u(void 0)},moveFocus:(N,O)=>{if(!f)return;const _=Wt(N,O,f,t.navStart,t.navEnd,e,s);_&&(e.disableNavigation&&!t.days.some(D=>D.isEqualTo(_))||(t.goToDay(_),u(_)))}}}function Jo(e,t){const{selected:o,required:n,onSelect:s}=e,[i,a]=ke(o,s?o:void 0),r=s?o:i,{isSameDay:l}=t,f=p=>r?.some(w=>l(w,p))??!1,{min:u,max:c}=e;return{selected:r,select:(p,w,N)=>{let O=[...r??[]];if(f(p)){if(r?.length===u||n&&r?.length===1)return;O=r?.filter(_=>!l(_,p))}else r?.length===c?O=[p]:O=[...O,p];return s||a(O),s?.(O,p,w,N),O},isSelected:f}}function Qo(e,t,o=0,n=0,s=!1,i=Q){const{from:a,to:r}=t||{},{isSameDay:l,isAfter:f,isBefore:u}=i;let c;if(!a&&!r)c={from:e,to:o>0?void 0:e};else if(a&&!r)l(a,e)?o===0?c={from:a,to:e}:s?c={from:a,to:void 0}:c=void 0:u(e,a)?c={from:e,to:a}:c={from:a,to:e};else if(a&&r)if(l(a,e)&&l(r,e))s?c={from:a,to:r}:c=void 0;else if(l(a,e))c={from:a,to:o>0?void 0:e};else if(l(r,e))c={from:e,to:o>0?void 0:e};else if(u(e,a))c={from:e,to:r};else if(f(e,a))c={from:a,to:e};else if(f(e,r))c={from:a,to:e};else throw new Error("Invalid range");if(c?.from&&c?.to){const m=i.differenceInCalendarDays(c.to,c.from);n>0&&m>n?c={from:e,to:void 0}:o>1&&m<o&&(c={from:e,to:void 0})}return c}function Xo(e,t,o=Q){const n=Array.isArray(t)?t:[t];let s=e.from;const i=o.differenceInCalendarDays(e.to,e.from),a=Math.min(i,6);for(let r=0;r<=a;r++){if(n.includes(s.getDay()))return!0;s=o.addDays(s,1)}return!1}function Qe(e,t,o=Q){return ee(e,t.from,!1,o)||ee(e,t.to,!1,o)||ee(t,e.from,!1,o)||ee(t,e.to,!1,o)}function Lo(e,t,o=Q){const n=Array.isArray(t)?t:[t];if(n.filter(r=>typeof r!="function").some(r=>typeof r=="boolean"?r:o.isDate(r)?ee(e,r,!1,o):ht(r,o)?r.some(l=>ee(e,l,!1,o)):pe(r)?r.from&&r.to?Qe(e,{from:r.from,to:r.to},o):!1:dt(r)?Xo(e,r.dayOfWeek,o):Ie(r)?o.isAfter(r.before,r.after)?Qe(e,{from:o.addDays(r.after,1),to:o.addDays(r.before,-1)},o):te(e.from,r,o)||te(e.to,r,o):Be(r)||Fe(r)?te(e.from,r,o)||te(e.to,r,o):!1))return!0;const a=n.filter(r=>typeof r=="function");if(a.length){let r=e.from;const l=o.differenceInCalendarDays(e.to,e.from);for(let f=0;f<=l;f++){if(a.some(u=>u(r)))return!0;r=o.addDays(r,1)}}return!1}function es(e,t){const{disabled:o,excludeDisabled:n,resetOnSelect:s,selected:i,required:a,onSelect:r}=e,[l,f]=ke(i,r?i:void 0),u=r?i:l;return{selected:u,select:(p,w,N)=>{const{min:O,max:_}=e;let b;if(p){const D=u?.from,g=u?.to,k=!!D&&!!g,h=!!D&&!!g&&t.isSameDay(D,g)&&t.isSameDay(p,D);s&&(k||!u?.from)?!a&&h?b=void 0:b={from:p,to:void 0}:b=Qo(p,u,O,_,a,t)}return n&&o&&b?.from&&b.to&&Lo({from:b.from,to:b.to},o,t)&&(b.from=p,b.to=void 0),r||f(b),r?.(b,p,w,N),b},isSelected:p=>u&&ee(u,p,!1,t)}}function ts(e,t){const{selected:o,required:n,onSelect:s}=e,[i,a]=ke(o,s?o:void 0),r=s?o:i,{isSameDay:l}=t;return{selected:r,select:(c,m,p)=>{let w=c;return!n&&r&&r&&l(c,r)&&(w=void 0),s||a(w),s?.(w,c,m,p),w},isSelected:c=>r?l(r,c):!1}}function ns(e,t){const o=ts(e,t),n=Jo(e,t),s=es(e,t);switch(e.mode){case"single":return o;case"multiple":return n;case"range":return s;default:return}}function z(e,t){return e instanceof F&&e.timeZone===t?e:new F(e,t)}function re(e,t,o){return z(e,t)}function Xe(e,t,o){return typeof e=="boolean"||typeof e=="function"?e:e instanceof Date?re(e,t):Array.isArray(e)?e.map(n=>n instanceof Date?re(n,t):n):pe(e)?{...e,from:e.from?z(e.from,t):e.from,to:e.to?z(e.to,t):e.to}:Ie(e)?{before:re(e.before,t),after:re(e.after,t)}:Be(e)?{after:re(e.after,t)}:Fe(e)?{before:re(e.before,t)}:e}function Te(e,t,o){return e&&(Array.isArray(e)?e.map(n=>Xe(n,t)):Xe(e,t))}function os(e){let t=e;const o=t.timeZone;if(o&&(t={...e,timeZone:o},t.today&&(t.today=z(t.today,o)),t.month&&(t.month=z(t.month,o)),t.defaultMonth&&(t.defaultMonth=z(t.defaultMonth,o)),t.startMonth&&(t.startMonth=z(t.startMonth,o)),t.endMonth&&(t.endMonth=z(t.endMonth,o)),t.mode==="single"&&t.selected?t.selected=z(t.selected,o):t.mode==="multiple"&&t.selected?t.selected=t.selected?.map(v=>z(v,o)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?z(t.selected.from,o):t.selected.from,to:t.selected.to?z(t.selected.to,o):t.selected.to}),t.disabled!==void 0&&(t.disabled=Te(t.disabled,o)),t.hidden!==void 0&&(t.hidden=Te(t.hidden,o)),t.modifiers)){const v={};Object.keys(t.modifiers).forEach(Y=>{v[Y]=Te(t.modifiers?.[Y],o)}),t.modifiers=v}const{components:n,formatters:s,labels:i,dateLib:a,locale:r,classNames:l}=T.useMemo(()=>{const v={...ft,...t.locale},Y=t.broadcastCalendar?1:t.weekStartsOn,M=t.noonSafe&&t.timeZone?xo(t.timeZone,{weekStartsOn:Y,locale:v}):void 0,S=t.dateLib&&M?{...M,...t.dateLib}:t.dateLib??M,A=new j({locale:v,weekStartsOn:Y,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},S);return{dateLib:A,components:uo(t.components),formatters:Oo(t.formatters),labels:So(t.labels,A.options),locale:v,classNames:{...mo(),...t.classNames}}},[t.locale,t.broadcastCalendar,t.weekStartsOn,t.firstWeekContainsDate,t.useAdditionalWeekYearTokens,t.useAdditionalDayOfYearTokens,t.timeZone,t.numerals,t.dateLib,t.noonSafe,t.components,t.formatters,t.labels,t.classNames]);t.today||(t={...t,today:a.today()});const{captionLayout:f,mode:u,navLayout:c,numberOfMonths:m=1,onDayBlur:p,onDayClick:w,onDayFocus:N,onDayKeyDown:O,onDayMouseEnter:_,onDayMouseLeave:b,onNextClick:D,onPrevClick:g,showWeekNumber:k,styles:h}=t,{formatCaption:W,formatDay:E,formatMonthDropdown:B,formatWeekNumber:I,formatWeekNumberHeader:K,formatWeekdayName:ne,formatYearDropdown:X}=s,$=Uo(t,a),{days:se,months:ue,navStart:De,navEnd:Me,previousMonth:q,nextMonth:G,goToMonth:L}=$,be=fo(se,t,De,Me,a),{isSelected:ge,select:ve,selected:de}=ns(t,a)??{},{blur:He,focused:je,isFocusTarget:Ct,moveFocus:$e,setFocused:he}=Vo(t,$,be,ge??(()=>!1),a),{labelDayButton:Nt,labelGridcell:St,labelGrid:Yt,labelMonthDropdown:_t,labelNav:ze,labelPrevious:Tt,labelNext:Et,labelWeekday:xt,labelWeekNumber:It,labelWeekNumberHeader:Bt,labelYearDropdown:Ft}=i,Pt=T.useMemo(()=>To(a,t.ISOWeek,t.broadcastCalendar,t.today),[a,t.ISOWeek,t.broadcastCalendar,t.today]),Re=u!==void 0||w!==void 0,Oe=T.useCallback(()=>{q&&(L(q),g?.(q))},[q,L,g]),we=T.useCallback(()=>{G&&(L(G),D?.(G))},[L,G,D]),At=T.useCallback((v,Y)=>M=>{M.preventDefault(),M.stopPropagation(),he(v),!Y.disabled&&(ve?.(v.date,Y,M),w?.(v.date,Y,M))},[ve,w,he]),Ht=T.useCallback((v,Y)=>M=>{he(v),N?.(v.date,Y,M)},[N,he]),jt=T.useCallback((v,Y)=>M=>{He(),p?.(v.date,Y,M)},[He,p]),$t=T.useCallback((v,Y)=>M=>{const S={ArrowLeft:[M.shiftKey?"month":"day",t.dir==="rtl"?"after":"before"],ArrowRight:[M.shiftKey?"month":"day",t.dir==="rtl"?"before":"after"],ArrowDown:[M.shiftKey?"year":"week","after"],ArrowUp:[M.shiftKey?"year":"week","before"],PageUp:[M.shiftKey?"year":"month","before"],PageDown:[M.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(S[M.key]){M.preventDefault(),M.stopPropagation();const[A,C]=S[M.key];$e(A,C)}O?.(v.date,Y,M)},[$e,O,t.dir]),zt=T.useCallback((v,Y)=>M=>{_?.(v.date,Y,M)},[_]),Rt=T.useCallback((v,Y)=>M=>{b?.(v.date,Y,M)},[b]),qt=T.useCallback(v=>Y=>{const M=Number(Y.target.value),S=a.setMonth(a.startOfMonth(v),M);L(S)},[a,L]),Gt=T.useCallback(v=>Y=>{const M=Number(Y.target.value),S=a.setYear(a.startOfMonth(v),M);L(S)},[a,L]),{className:Ut,style:Zt}=T.useMemo(()=>({className:[l[y.Root],t.className].filter(Boolean).join(" "),style:{...h?.[y.Root],...t.style}}),[l,t.className,t.style,h]),Kt=ho(t),qe=T.useRef(null);Po(qe,!!t.animate,{classNames:l,months:ue,focused:je,dateLib:a});const Vt={dayPickerProps:t,selected:de,select:ve,isSelected:ge,months:ue,nextMonth:G,previousMonth:q,goToMonth:L,getModifiers:be,components:n,classNames:l,styles:h,labels:i,formatters:s};return d.createElement(ut.Provider,{value:Vt},d.createElement(n.Root,{rootRef:t.animate?qe:void 0,className:Ut,style:Zt,dir:t.dir,id:t.id,lang:t.lang??r.code,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t["aria-label"],"aria-labelledby":t["aria-labelledby"],...Kt},d.createElement(n.Months,{className:l[y.Months],style:h?.[y.Months]},!t.hideNavigation&&!c&&d.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:l[y.Nav],style:h?.[y.Nav],"aria-label":ze(),onPreviousClick:Oe,onNextClick:we,previousMonth:q,nextMonth:G}),ue.map((v,Y)=>d.createElement(n.Month,{"data-animated-month":t.animate?"true":void 0,className:l[y.Month],style:h?.[y.Month],key:Y,displayIndex:Y,calendarMonth:v},c==="around"&&!t.hideNavigation&&Y===0&&d.createElement(n.PreviousMonthButton,{type:"button",className:l[y.PreviousMonthButton],tabIndex:q?void 0:-1,"aria-disabled":q?void 0:!0,"aria-label":Tt(q),onClick:Oe,"data-animated-button":t.animate?"true":void 0},d.createElement(n.Chevron,{disabled:q?void 0:!0,className:l[y.Chevron],orientation:t.dir==="rtl"?"right":"left"})),d.createElement(n.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:l[y.MonthCaption],style:h?.[y.MonthCaption],calendarMonth:v,displayIndex:Y},f?.startsWith("dropdown")?d.createElement(n.DropdownNav,{className:l[y.Dropdowns],style:h?.[y.Dropdowns]},(()=>{const M=f==="dropdown"||f==="dropdown-months"?d.createElement(n.MonthsDropdown,{key:"month",className:l[y.MonthsDropdown],"aria-label":_t(),classNames:l,components:n,disabled:!!t.disableNavigation,onChange:qt(v.date),options:Yo(v.date,De,Me,s,a),style:h?.[y.Dropdown],value:a.getMonth(v.date)}):d.createElement("span",{key:"month"},B(v.date,a)),S=f==="dropdown"||f==="dropdown-years"?d.createElement(n.YearsDropdown,{key:"year",className:l[y.YearsDropdown],"aria-label":Ft(a.options),classNames:l,components:n,disabled:!!t.disableNavigation,onChange:Gt(v.date),options:Eo(De,Me,s,a,!!t.reverseYears),style:h?.[y.Dropdown],value:a.getYear(v.date)}):d.createElement("span",{key:"year"},X(v.date,a));return a.getMonthYearOrder()==="year-first"?[S,M]:[M,S]})(),d.createElement("span",{role:"status","aria-live":"polite",style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}},W(v.date,a.options,a))):d.createElement(n.CaptionLabel,{className:l[y.CaptionLabel],role:"status","aria-live":"polite"},W(v.date,a.options,a))),c==="around"&&!t.hideNavigation&&Y===m-1&&d.createElement(n.NextMonthButton,{type:"button",className:l[y.NextMonthButton],tabIndex:G?void 0:-1,"aria-disabled":G?void 0:!0,"aria-label":Et(G),onClick:we,"data-animated-button":t.animate?"true":void 0},d.createElement(n.Chevron,{disabled:G?void 0:!0,className:l[y.Chevron],orientation:t.dir==="rtl"?"left":"right"})),Y===m-1&&c==="after"&&!t.hideNavigation&&d.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:l[y.Nav],style:h?.[y.Nav],"aria-label":ze(),onPreviousClick:Oe,onNextClick:we,previousMonth:q,nextMonth:G}),d.createElement(n.MonthGrid,{role:"grid","aria-multiselectable":u==="multiple"||u==="range","aria-label":Yt(v.date,a.options,a)||void 0,className:l[y.MonthGrid],style:h?.[y.MonthGrid]},!t.hideWeekdays&&d.createElement(n.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:l[y.Weekdays],style:h?.[y.Weekdays]},k&&d.createElement(n.WeekNumberHeader,{"aria-label":Bt(a.options),className:l[y.WeekNumberHeader],style:h?.[y.WeekNumberHeader],scope:"col"},K()),Pt.map(M=>d.createElement(n.Weekday,{"aria-label":xt(M,a.options,a),className:l[y.Weekday],key:String(M),style:h?.[y.Weekday],scope:"col"},ne(M,a.options,a)))),d.createElement(n.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:l[y.Weeks],style:h?.[y.Weeks]},v.weeks.map(M=>d.createElement(n.Week,{className:l[y.Week],key:M.weekNumber,style:h?.[y.Week],week:M},k&&d.createElement(n.WeekNumber,{week:M,style:h?.[y.WeekNumber],"aria-label":It(M.weekNumber,{locale:r}),className:l[y.WeekNumber],scope:"row",role:"rowheader"},I(M.weekNumber,a)),M.days.map(S=>{const{date:A}=S,C=be(S);if(C[x.focused]=!C.hidden&&!!je?.isEqualTo(S),C[Z.selected]=ge?.(A)||C.selected,pe(de)){const{from:We,to:Ce}=de;C[Z.range_start]=!!(We&&Ce&&a.isSameDay(A,We)),C[Z.range_end]=!!(We&&Ce&&a.isSameDay(A,Ce)),C[Z.range_middle]=ee(de,A,!0,a)}const Jt=_o(C,h,t.modifiersStyles),Qt=co(C,l,t.modifiersClassNames),Xt=!Re&&!C.hidden?St(A,C,a.options,a):void 0;return d.createElement(n.Day,{key:`${S.isoDate}_${S.displayMonthId}`,day:S,modifiers:C,className:Qt.join(" "),style:Jt,role:"gridcell","aria-selected":C.selected||void 0,"aria-label":Xt,"data-day":S.isoDate,"data-month":S.outside?S.dateMonthId:void 0,"data-selected":C.selected||void 0,"data-disabled":C.disabled||void 0,"data-hidden":C.hidden||void 0,"data-outside":S.outside||void 0,"data-focused":C.focused||void 0,"data-today":C.today||void 0},!C.hidden&&Re?d.createElement(n.DayButton,{className:l[y.DayButton],style:h?.[y.DayButton],type:"button",day:S,modifiers:C,disabled:!C.focused&&C.disabled||void 0,"aria-disabled":C.focused&&C.disabled||void 0,tabIndex:Ct(S)?0:-1,"aria-label":Nt(A,C,a.options,a),onClick:At(S,C),onBlur:jt(S,C),onFocus:Ht(S,C),onKeyDown:$t(S,C),onMouseEnter:zt(S,C),onMouseLeave:Rt(S,C)},E(A,a.options,a)):!C.hidden&&E(S.date,a.options,a))})))))))),t.footer&&d.createElement(n.Footer,{className:l[y.Footer],style:h?.[y.Footer],role:"status","aria-live":"polite"},t.footer)))}function ss({className:e,classNames:t,showOutsideDays:o=!0,...n}){return Ge.jsx(os,{showOutsideDays:o,className:me("p-3",e),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",month_caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",button_previous:me(Ne({variant:"outline"}),"absolute left-1 h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),button_next:me(Ne({variant:"outline"}),"absolute right-1 h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),month_grid:"w-full border-collapse space-y-1",weekdays:"flex",weekday:"text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",week:"flex w-full mt-2",day:"relative p-0 text-center text-sm focus-within:relative focus-within:z-20",day_button:me(Ne({variant:"ghost"}),"h-8 w-8 p-0 font-normal aria-selected:opacity-100"),range_start:"day-range-start",range_end:"day-range-end",selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",today:"bg-accent text-accent-foreground",outside:"text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground",disabled:"text-muted-foreground opacity-50",range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",hidden:"invisible",...t},components:{Chevron:({orientation:s})=>{const i=s==="left"?rn:an;return Ge.jsx(i,{className:"h-4 w-4"})}},...n})}ss.displayName="Calendar";export{ss as C,ot as a,mn as s};
|
|
2
|
-
//# sourceMappingURL=calendar-Ck0yOLYu.js.map
|