@kaanbiryol/crate-server 0.0.0-stage → 0.17.9
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/LICENSE +21 -0
- package/README.md +73 -2
- package/THIRD_PARTY_NOTICES.md +3664 -0
- package/assets/coordinator.mjs +116 -0
- package/assets/credential-revocation.mjs +18 -0
- package/assets/database-upgrade-rules.mjs +42 -0
- package/assets/migrations/README.md +19 -0
- package/assets/qrcode.mjs +1638 -0
- package/assets/schema.sql +368 -0
- package/assets/server-release.json +6 -0
- package/assets/worker-runtime.json +12 -0
- package/assets/worker.mjs +1458 -0
- package/npm-shrinkwrap.json +939 -0
- package/package.json +38 -4
- package/scripts/assets.mjs +33 -0
- package/scripts/commands/data.mjs +80 -0
- package/scripts/commands/devices.mjs +100 -0
- package/scripts/commands/doctor.mjs +127 -0
- package/scripts/commands/service.mjs +19 -0
- package/scripts/commands/setup.mjs +194 -0
- package/scripts/commands/start.mjs +171 -0
- package/scripts/commands/status.mjs +49 -0
- package/scripts/commands/update.mjs +138 -0
- package/scripts/crate-server.mjs +11 -0
- package/scripts/deployment-fingerprint.mjs +13 -0
- package/scripts/local-server-alerts.mjs +53 -0
- package/scripts/local-server-backup-schedule.mjs +153 -0
- package/scripts/local-server-backup.mjs +275 -0
- package/scripts/local-server-cloudflared.mjs +93 -0
- package/scripts/local-server-control.mjs +150 -0
- package/scripts/local-server-devices.mjs +71 -0
- package/scripts/local-server-host-status.mjs +72 -0
- package/scripts/local-server-http.mjs +120 -0
- package/scripts/local-server-install.mjs +22 -0
- package/scripts/local-server-lifecycle.mjs +54 -0
- package/scripts/local-server-lock.mjs +217 -0
- package/scripts/local-server-migrations.mjs +43 -0
- package/scripts/local-server-options.mjs +134 -0
- package/scripts/local-server-pairing.mjs +47 -0
- package/scripts/local-server-process.mjs +77 -0
- package/scripts/local-server-qr.mjs +34 -0
- package/scripts/local-server-quick.mjs +116 -0
- package/scripts/local-server-readiness.mjs +48 -0
- package/scripts/local-server-runtime.mjs +460 -0
- package/scripts/local-server-service.mjs +209 -0
- package/scripts/local-server-style.mjs +12 -0
- package/scripts/local-server-tailscale.mjs +122 -0
- package/scripts/local-server-tunnel.mjs +212 -0
- package/scripts/local-server-watchdog.mjs +37 -0
- package/scripts/local-server-wizard.mjs +100 -0
- package/scripts/local-server.mjs +100 -0
- package/vendor/miniflare/LICENSE +25 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/ArrowClockwise.es-Cs0EHtoR.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/Breadcrumbs-BlzUUgNz.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/CaretDown.es-r8EMGhHM.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/CaretLeft.es-CCxvlwgr.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/CaretRight.es-CWeeOO8C.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/CaretUpDown.es-Bp73BWZN.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/Check.es-B3dV_aVM.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/Copy.es-DUyM7PbX.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/CopyButton-DdMFsAgv.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/CronTriggersContext-CtoQyHCH.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/CronTriggersPage-BC2FvZf5.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/DotsThree.es-B9u_qIrH.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/Download.es-v8YTKdZh.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/List.es-GlowdvL8.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/ListBullets.es-DrJsrtCL.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/MagnifyingGlass.es-BzOo3pru.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/PaperPlaneTilt.es-DTLdWOnM.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/Paperclip.es-6Ysj3lly.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/Pencil.es-CDpuGAys.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/Plus.es-xOjOjCs5.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/ResourceError-DNadec0F.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/Spinner.es-oqUPe-aY.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/TableSelect-DgjN53ZF.js +25 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/Trash.es-DTqwcb2_.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/Warning.es-CLa-n7LD.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/X.es-BiJFnG31.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/_appId-Cow8QNw6.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/_appId-TnuOHwOA.js +5 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/_bucketName-Cow8QNw6.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/_bucketName-DMGTgdaZ.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/_bucketName-Daanvg3W.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/_bucketName-DqCj-aYZ.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/_bucketName-uYCS7veQ.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/_captureId-Cb6ggQGG.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/_captureId-Cow8QNw6.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/_captureId-Daanvg3W.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/_className-BW1__nAw.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/_className-Cow8QNw6.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/_className-DCj9M_Uf.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/_className-DMGTgdaZ.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/_className-Daanvg3W.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/_className-uYCS7veQ.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/_databaseId-BEh2sOY5.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/_databaseId-Cow8QNw6.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/_instanceId-Cow8QNw6.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/_instanceId-CxJm9jpK.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/_instanceId-Daanvg3W.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/_namespaceId-Cow8QNw6.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/_namespaceId-HT9g0tMq.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/_objectId-Cow8QNw6.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/_objectId-Daanvg3W.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/_objectId-DdmD-NV1.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/_workflowName-Cow8QNw6.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/_workflowName-DMGTgdaZ.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/_workflowName-Daanvg3W.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/_workflowName-WgIBBs_w.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/_workflowName-uYCS7veQ.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/ad-hoc-B9HL0oNk.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/async-t2_zA-v_.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/button-cdxnqcgzwko8ooha-CjoTKpgy.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/checkbox-kt1uojk2f9e0d0h1-D923QL-G.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/clipboard-text-vcbvmtne4zjk4b18-CEoJIuMe.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/configured-BGeRrlYf.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/cron-triggers-ZP5ClwAa.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/dialog-oqh8l3l3zutpibxx-nho54TMC.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/dropdown-ncwhcd912vmone8k-BAT0p_ep.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/email-B-IveBKB.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/events-ClnoiyGH.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/events-Cow8QNw6.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/field-krp6z6vfbkrvufz2-DsLUBjzS.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/format-CjQ0gyEW.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/helpers-Bz2sloWm.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/index-BHW_FKpE.js +30 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/index-CiXL10aq.css +2 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/input-area-no30c09udyjxshu5-T786oEMj.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/input-group-lxdd09p60cf27pe1-BqVz8A4J.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/input-h48k3uagzrgb98au-BF-hE08e.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/label-latndvb1ngem7we8-mWoel0Kk.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/link-DadJAPnd.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/link-provider-mn2voeohon7cj9o4-CNosc_Ni.js +13 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/matchContext-C1eKDtty.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/object._-Cow8QNw6.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/object._-DDwO6NT7.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/object._-Daanvg3W.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/observability-CC1mP6Xo.js +15 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/observability-CX-6-j6d.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/observability-Cow8QNw6.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/react-BZY8YNV6.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/redirect-CckYXsV1.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/routes-BlOyav-b.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/routing-CVthjHxr.js +2 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/routing-Cow8QNw6.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/routing-DMGTgdaZ.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/routing-uYCS7veQ.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/select-kva5ru5f673kah1m-DQuxH2_G.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/sending-BPjb3S3Y.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/sending-Cow8QNw6.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/switch-ihaydbzem62bey4p-C9M-MPNS.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/table-inweecadl3her7pd-UWLv9e8D.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/text-nmyi1rkwdj37f30f-BLzIhmEO.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/types-DTx0hLYz.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/useCursorPaginatedList-BGUINn38.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/assets/useRouterState-BLq6Ai_6.js +1 -0
- package/vendor/miniflare/dist/local-explorer-ui/favicon.svg +3 -0
- package/vendor/miniflare/dist/local-explorer-ui/index.html +27 -0
- package/vendor/miniflare/dist/src/index.d.ts +14183 -0
- package/vendor/miniflare/dist/src/index.js +123738 -0
- package/vendor/miniflare/dist/src/mdream_edge_bg.wasm +0 -0
- package/vendor/miniflare/dist/src/plugins/artifacts/git-sidecar.js +21071 -0
- package/vendor/miniflare/dist/src/workers/access/access-identity.worker.js +10 -0
- package/vendor/miniflare/dist/src/workers/analytics-engine/analytics-engine.worker.js +21 -0
- package/vendor/miniflare/dist/src/workers/analytics-engine/remote.worker.js +2578 -0
- package/vendor/miniflare/dist/src/workers/artifacts/binding.worker.js +903 -0
- package/vendor/miniflare/dist/src/workers/artifacts/wrapped-binding.worker.js +52 -0
- package/vendor/miniflare/dist/src/workers/assets/assets-kv.worker.js +27 -0
- package/vendor/miniflare/dist/src/workers/assets/assets.worker.js +1525 -0
- package/vendor/miniflare/dist/src/workers/assets/router.worker.js +1883 -0
- package/vendor/miniflare/dist/src/workers/assets/rpc-proxy.worker.js +55 -0
- package/vendor/miniflare/dist/src/workers/browser-rendering/binding.worker.js +453 -0
- package/vendor/miniflare/dist/src/workers/cache/cache-entry-noop.worker.js +18 -0
- package/vendor/miniflare/dist/src/workers/cache/cache-entry.worker.js +24 -0
- package/vendor/miniflare/dist/src/workers/cache/cache.worker.js +652 -0
- package/vendor/miniflare/dist/src/workers/core/dev-control.worker.js +52 -0
- package/vendor/miniflare/dist/src/workers/core/dev-registry-proxy.worker.js +371 -0
- package/vendor/miniflare/dist/src/workers/core/do-wrapper.worker.js +67 -0
- package/vendor/miniflare/dist/src/workers/core/entry.worker.js +5516 -0
- package/vendor/miniflare/dist/src/workers/core/outbound.worker.js +147 -0
- package/vendor/miniflare/dist/src/workers/d1/database.worker.js +298 -0
- package/vendor/miniflare/dist/src/workers/d1/entry.worker.js +143 -0
- package/vendor/miniflare/dist/src/workers/dispatch-namespace/dispatch-namespace-proxy.worker.js +2574 -0
- package/vendor/miniflare/dist/src/workers/dispatch-namespace/dispatch-namespace.worker.js +11 -0
- package/vendor/miniflare/dist/src/workers/email/email-store.worker.js +606 -0
- package/vendor/miniflare/dist/src/workers/email/email.worker.js +26 -0
- package/vendor/miniflare/dist/src/workers/email/send_email.worker.js +3703 -0
- package/vendor/miniflare/dist/src/workers/flagship/binding.worker.js +394 -0
- package/vendor/miniflare/dist/src/workers/flagship/object.worker.js +349 -0
- package/vendor/miniflare/dist/src/workers/hello-world/binding.worker.js +18 -0
- package/vendor/miniflare/dist/src/workers/hello-world/object.worker.js +13 -0
- package/vendor/miniflare/dist/src/workers/images/images.worker.js +450 -0
- package/vendor/miniflare/dist/src/workers/k2/binding.worker.js +2583 -0
- package/vendor/miniflare/dist/src/workers/kv/namespace.worker.js +323 -0
- package/vendor/miniflare/dist/src/workers/kv/sites.worker.js +148 -0
- package/vendor/miniflare/dist/src/workers/local-explorer/explorer.worker.js +17275 -0
- package/vendor/miniflare/dist/src/workers/observability/collector.worker.js +725 -0
- package/vendor/miniflare/dist/src/workers/pipelines/pipeline.worker.js +9 -0
- package/vendor/miniflare/dist/src/workers/queues/broker.worker.js +391 -0
- package/vendor/miniflare/dist/src/workers/r2/bucket.worker.js +1171 -0
- package/vendor/miniflare/dist/src/workers/r2/public.worker.js +1319 -0
- package/vendor/miniflare/dist/src/workers/r2/s3/index.worker.js +11128 -0
- package/vendor/miniflare/dist/src/workers/ratelimit/ratelimit-object.worker.js +55 -0
- package/vendor/miniflare/dist/src/workers/ratelimit/ratelimit.worker.js +69 -0
- package/vendor/miniflare/dist/src/workers/secrets-store/secret.worker.js +64 -0
- package/vendor/miniflare/dist/src/workers/shared/index.worker.js +730 -0
- package/vendor/miniflare/dist/src/workers/shared/object-entry.worker.js +33 -0
- package/vendor/miniflare/dist/src/workers/shared/remote-proxy-client.worker.js +2698 -0
- package/vendor/miniflare/dist/src/workers/shared/zod.worker.js +15459 -0
- package/vendor/miniflare/dist/src/workers/stream/binding.worker.js +282 -0
- package/vendor/miniflare/dist/src/workers/stream/object.worker.js +479 -0
- package/vendor/miniflare/dist/src/workers/workflows/binding.worker.js +5137 -0
- package/vendor/miniflare/dist/src/workers/workflows/wrapped-binding.worker.js +111 -0
- package/vendor/miniflare/package.json +135 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,i as t,n,t as r}from"./react-BZY8YNV6.js";import{t as i}from"./link-DadJAPnd.js";import{Bt as a,Vt as o,ft as s}from"./link-provider-mn2voeohon7cj9o4-CNosc_Ni.js";import{r as c}from"./button-cdxnqcgzwko8ooha-CjoTKpgy.js";import{t as l}from"./CaretDown.es-r8EMGhHM.js";import{t as u}from"./Paperclip.es-6Ysj3lly.js";import{t as d}from"./Warning.es-CLa-n7LD.js";import{t as f}from"./clipboard-text-vcbvmtne4zjk4b18-CEoJIuMe.js";import{t as p}from"./Breadcrumbs-BlzUUgNz.js";import{c as m,cn as h,d as g,i as _,l as v,rn as y,u as b,un as x}from"./index-BHW_FKpE.js";import{n as S,t as C}from"./format-CjQ0gyEW.js";var w=e(r(),1),ee=new Map([[`bold`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M236,200a12,12,0,0,1-24,0,84.09,84.09,0,0,0-84-84H61l27.52,27.51a12,12,0,0,1-17,17l-48-48a12,12,0,0,1,0-17l48-48a12,12,0,0,1,17,17L61,92h67A108.12,108.12,0,0,1,236,200Z`}))],[`duotone`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M80,56v96L32,104Z`,opacity:`0.2`}),w.createElement(`path`,{d:`M128,96H88V56a8,8,0,0,0-13.66-5.66l-48,48a8,8,0,0,0,0,11.32l48,48A8,8,0,0,0,88,152V112h40a88.1,88.1,0,0,1,88,88,8,8,0,0,0,16,0A104.11,104.11,0,0,0,128,96ZM72,132.69,43.31,104,72,75.31Z`}))],[`fill`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M232,200a8,8,0,0,1-16,0,88.1,88.1,0,0,0-88-88H88v40a8,8,0,0,1-13.66,5.66l-48-48a8,8,0,0,1,0-11.32l48-48A8,8,0,0,1,88,56V96h40A104.11,104.11,0,0,1,232,200Z`}))],[`light`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M230,200a6,6,0,0,1-12,0,90.1,90.1,0,0,0-90-90H46.49l37.75,37.76a6,6,0,1,1-8.48,8.48l-48-48a6,6,0,0,1,0-8.48l48-48a6,6,0,0,1,8.48,8.48L46.49,98H128A102.12,102.12,0,0,1,230,200Z`}))],[`regular`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M232,200a8,8,0,0,1-16,0,88.1,88.1,0,0,0-88-88H51.31l34.35,34.34a8,8,0,0,1-11.32,11.32l-48-48a8,8,0,0,1,0-11.32l48-48A8,8,0,0,1,85.66,61.66L51.31,96H128A104.11,104.11,0,0,1,232,200Z`}))],[`thin`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M228,200a4,4,0,0,1-8,0,92.1,92.1,0,0,0-92-92H41.66l41.17,41.17a4,4,0,0,1-5.66,5.66l-48-48a4,4,0,0,1,0-5.66l48-48a4,4,0,0,1,5.66,5.66L41.66,100H128A100.11,100.11,0,0,1,228,200Z`}))]]),te=new Map([[`bold`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M204,64V168a12,12,0,0,1-24,0V93L72.49,200.49a12,12,0,0,1-17-17L163,76H88a12,12,0,0,1,0-24H192A12,12,0,0,1,204,64Z`}))],[`duotone`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M192,64V168L88,64Z`,opacity:`0.2`}),w.createElement(`path`,{d:`M192,56H88a8,8,0,0,0-5.66,13.66L128.69,116,58.34,186.34a8,8,0,0,0,11.32,11.32L140,127.31l46.34,46.35A8,8,0,0,0,200,168V64A8,8,0,0,0,192,56Zm-8,92.69-38.34-38.34h0L107.31,72H184Z`}))],[`fill`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M200,64V168a8,8,0,0,1-13.66,5.66L140,127.31,69.66,197.66a8,8,0,0,1-11.32-11.32L128.69,116,82.34,69.66A8,8,0,0,1,88,56H192A8,8,0,0,1,200,64Z`}))],[`light`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M198,64V168a6,6,0,0,1-12,0V78.48L68.24,196.24a6,6,0,0,1-8.48-8.48L177.52,70H88a6,6,0,0,1,0-12H192A6,6,0,0,1,198,64Z`}))],[`regular`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M200,64V168a8,8,0,0,1-16,0V83.31L69.66,197.66a8,8,0,0,1-11.32-11.32L172.69,72H88a8,8,0,0,1,0-16H192A8,8,0,0,1,200,64Z`}))],[`thin`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M196,64V168a4,4,0,0,1-8,0V73.66L66.83,194.83a4,4,0,0,1-5.66-5.66L182.34,68H88a4,4,0,0,1,0-8H192A4,4,0,0,1,196,64Z`}))]]),ne=new Map([[`bold`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm84,108a83.6,83.6,0,0,1-16.75,50.28L77.72,60.75A84,84,0,0,1,212,128ZM44,128A83.6,83.6,0,0,1,60.75,77.72L178.28,195.25A84,84,0,0,1,44,128Z`}))],[`duotone`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z`,opacity:`0.2`}),w.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm88,104a87.56,87.56,0,0,1-20.41,56.28L71.72,60.4A88,88,0,0,1,216,128ZM40,128A87.56,87.56,0,0,1,60.41,71.72L184.28,195.6A88,88,0,0,1,40,128Z`}))],[`fill`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M200,128a71.69,71.69,0,0,1-15.78,44.91L83.09,71.78A71.95,71.95,0,0,1,200,128ZM56,128a71.95,71.95,0,0,0,116.91,56.22L71.78,83.09A71.69,71.69,0,0,0,56,128Zm180,0A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-20,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z`}))],[`light`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm90,102a89.6,89.6,0,0,1-22.29,59.22L68.78,60.29A89.95,89.95,0,0,1,218,128ZM38,128A89.6,89.6,0,0,1,60.29,68.78L187.22,195.71A89.95,89.95,0,0,1,38,128Z`}))],[`regular`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm88,104a87.56,87.56,0,0,1-20.41,56.28L71.72,60.4A88,88,0,0,1,216,128ZM40,128A87.56,87.56,0,0,1,60.41,71.72L184.28,195.6A88,88,0,0,1,40,128Z`}))],[`thin`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm92,100a91.67,91.67,0,0,1-24.21,62.13L65.87,60.21A92,92,0,0,1,220,128ZM36,128A91.67,91.67,0,0,1,60.21,65.87L190.13,195.79A92,92,0,0,1,36,128Z`}))]]),re=w.forwardRef((e,t)=>w.createElement(a,{ref:t,...e,weights:ee}));re.displayName=`ArrowBendUpLeftIcon`;var ie=w.forwardRef((e,t)=>w.createElement(a,{ref:t,...e,weights:te}));ie.displayName=`ArrowUpRightIcon`;var ae=w.forwardRef((e,t)=>w.createElement(a,{ref:t,...e,weights:ne}));ae.displayName=`ProhibitIcon`;var T=n(),oe=(0,w.createContext)({});function se(e){let t=(0,w.useRef)(null);return t.current===null&&(t.current=e()),t.current}var ce=typeof window<`u`,le=ce?w.useLayoutEffect:w.useEffect,ue=(0,w.createContext)(null);function de(e,t){e.indexOf(t)===-1&&e.push(t)}function fe(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var E=(e,t,n)=>n>t?t:n<e?e:n,D={},pe=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function me(e){return typeof e==`object`&&!!e}var he=e=>/^0[^.\s]+$/u.test(e);function ge(e){let t;return()=>(t===void 0&&(t=e()),t)}var O=e=>e,_e=(e,t)=>n=>t(e(n)),ve=(...e)=>e.reduce(_e),ye=(e,t,n)=>{let r=t-e;return r===0?1:(n-e)/r},be=class{constructor(){this.subscriptions=[]}add(e){return de(this.subscriptions,e),()=>fe(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r){if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},k=e=>e*1e3,A=e=>e/1e3;function xe(e,t){return t?1e3/t*e:0}var Se=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Ce=1e-7,we=12;function Te(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=Se(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>Ce&&++s<we);return o}function Ee(e,t,n,r){if(e===t&&n===r)return O;let i=t=>Te(t,0,1,e,n);return e=>e===0||e===1?e:Se(i(e),t,r)}var De=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Oe=e=>t=>1-e(1-t),ke=Ee(.33,1.53,.69,.99),Ae=Oe(ke),je=De(Ae),Me=e=>(e*=2)<1?.5*Ae(e):.5*(2-2**(-10*(e-1))),Ne=e=>1-Math.sin(Math.acos(e)),Pe=Oe(Ne),Fe=De(Ne),Ie=Ee(.42,0,1,1),Le=Ee(0,0,.58,1),Re=Ee(.42,0,.58,1),ze=e=>Array.isArray(e)&&typeof e[0]!=`number`,Be=e=>Array.isArray(e)&&typeof e[0]==`number`,Ve={linear:O,easeIn:Ie,easeInOut:Re,easeOut:Le,circIn:Ne,circInOut:Fe,circOut:Pe,backIn:Ae,backInOut:je,backOut:ke,anticipate:Me},He=e=>typeof e==`string`,Ue=e=>{if(Be(e)){e.length;let[t,n,r,i]=e;return Ee(t,n,r,i)}return He(e)?(Ve[e],`${e}`,Ve[e]):e},We=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`];function Ge(e,t){let n=new Set,r=new Set,i=!1,a=!1,o=new WeakSet,s={delta:0,timestamp:0,isProcessing:!1};function c(t){o.has(t)&&(l.schedule(t),e()),t(s)}let l={schedule:(e,t=!1,a=!1)=>{let s=a&&i?n:r;return t&&o.add(e),s.has(e)||s.add(e),e},cancel:e=>{r.delete(e),o.delete(e)},process:e=>{s=e,i?a=!0:(i=!0,[n,r]=[r,n],n.forEach(c),n.clear(),i=!1,a&&(a=!1,l.process(e)))}};return l}var Ke=40;function qe(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=We.reduce((e,t)=>(e[t]=Ge(a),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=D.useManualTiming?i.timestamp:performance.now();n=!1,D.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(a-i.timestamp,Ke),1)),i.timestamp=a,i.isProcessing=!0,s.process(i),c.process(i),l.process(i),u.process(i),d.process(i),f.process(i),p.process(i),m.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(h))},g=()=>{n=!0,r=!0,i.isProcessing||e(h)};return{schedule:We.reduce((e,t)=>{let r=o[t];return e[t]=(e,t=!1,i=!1)=>(n||g(),r.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<We.length;t++)o[We[t]].cancel(e)},state:i,steps:o}}var{schedule:j,cancel:M,state:N,steps:Je}=qe(typeof requestAnimationFrame<`u`?requestAnimationFrame:O,!0),Ye;function Xe(){Ye=void 0}var P={now:()=>(Ye===void 0&&P.set(N.isProcessing||D.useManualTiming?N.timestamp:performance.now()),Ye),set:e=>{Ye=e,queueMicrotask(Xe)}},Ze=e=>t=>typeof t==`string`&&t.startsWith(e),Qe=Ze(`--`),$e=Ze(`var(--`),et=e=>$e(e)?tt.test(e.split(`/*`)[0].trim()):!1,tt=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function nt(e){return typeof e==`string`&&e.split(`/*`)[0].includes(`var(--`)}var rt={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},it={...rt,transform:e=>E(0,1,e)},at={...rt,default:1},ot=e=>Math.round(e*1e5)/1e5,st=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function ct(e){return e==null}var lt=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,ut=(e,t)=>n=>!!(typeof n==`string`&<.test(n)&&n.startsWith(e)||t&&!ct(n)&&Object.prototype.hasOwnProperty.call(n,t)),dt=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(st);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},ft=e=>E(0,255,e),pt={...rt,transform:e=>Math.round(ft(e))},mt={test:ut(`rgb`,`red`),parse:dt(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+pt.transform(e)+`, `+pt.transform(t)+`, `+pt.transform(n)+`, `+ot(it.transform(r))+`)`};function ht(e){let t=``,n=``,r=``,i=``;return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}var gt={test:ut(`#`),parse:ht,transform:mt.transform},_t=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),F=_t(`deg`),I=_t(`%`),L=_t(`px`),vt=_t(`vh`),yt=_t(`vw`),bt={...I,parse:e=>I.parse(e)/100,transform:e=>I.transform(e*100)},xt={test:ut(`hsl`,`hue`),parse:dt(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+I.transform(ot(t))+`, `+I.transform(ot(n))+`, `+ot(it.transform(r))+`)`},R={test:e=>mt.test(e)||gt.test(e)||xt.test(e),parse:e=>mt.test(e)?mt.parse(e):xt.test(e)?xt.parse(e):gt.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?mt.transform(e):xt.transform(e),getAnimatableNone:e=>{let t=R.parse(e);return t.alpha=0,R.transform(t)}},St=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Ct(e){return isNaN(e)&&typeof e==`string`&&(e.match(st)?.length||0)+(e.match(St)?.length||0)>0}var wt=`number`,Tt=`color`,Et=`var`,Dt=`var(`,Ot="${}",kt=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function At(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(kt,e=>(R.test(e)?(r.color.push(a),i.push(Tt),n.push(R.parse(e))):e.startsWith(Dt)?(r.var.push(a),i.push(Et),n.push(e)):(r.number.push(a),i.push(wt),n.push(parseFloat(e))),++a,Ot)).split(Ot),indexes:r,types:i}}function jt(e){return At(e).values}function Mt(e){let{split:t,types:n}=At(e),r=t.length;return e=>{let i=``;for(let a=0;a<r;a++)if(i+=t[a],e[a]!==void 0){let t=n[a];i+=t===wt?ot(e[a]):t===Tt?R.transform(e[a]):e[a]}return i}}var Nt=e=>typeof e==`number`?0:R.test(e)?R.getAnimatableNone(e):e;function Pt(e){let t=jt(e);return Mt(e)(t.map(Nt))}var z={test:Ct,parse:jt,createTransformer:Mt,getAnimatableNone:Pt};function Ft(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function It({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=Ft(s,r,e+1/3),a=Ft(s,r,e),o=Ft(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function Lt(e,t){return n=>n>0?t:e}var B=(e,t,n)=>e+(t-e)*n,Rt=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},zt=[gt,mt,xt],Bt=e=>zt.find(t=>t.test(e));function Vt(e){let t=Bt(e);if(`${e}`,!t)return!1;let n=t.parse(e);return t===xt&&(n=It(n)),n}var Ht=(e,t)=>{let n=Vt(e),r=Vt(t);if(!n||!r)return Lt(e,t);let i={...n};return e=>(i.red=Rt(n.red,r.red,e),i.green=Rt(n.green,r.green,e),i.blue=Rt(n.blue,r.blue,e),i.alpha=B(n.alpha,r.alpha,e),mt.transform(i))},Ut=new Set([`none`,`hidden`]);function Wt(e,t){return Ut.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Gt(e,t){return n=>B(e,t,n)}function Kt(e){return typeof e==`number`?Gt:typeof e==`string`?et(e)?Lt:R.test(e)?Ht:Xt:Array.isArray(e)?qt:typeof e==`object`?R.test(e)?Ht:Jt:Lt}function qt(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>Kt(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function Jt(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Kt(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function Yt(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let a=t.types[i],o=e.indexes[a][r[a]],s=e.values[o]??0;n[i]=s,r[a]++}return n}var Xt=(e,t)=>{let n=z.createTransformer(t),r=At(e),i=At(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Ut.has(e)&&!i.values.length||Ut.has(t)&&!r.values.length?Wt(e,t):ve(qt(Yt(r,i),i.values),n):(`${e}${t}`,Lt(e,t))};function Zt(e,t,n){return typeof e==`number`&&typeof t==`number`&&typeof n==`number`?B(e,t,n):Kt(e)(e,t)}var Qt=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>j.update(t,e),stop:()=>M(t),now:()=>N.isProcessing?N.timestamp:P.now()}},$t=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(e(t/(i-1))*1e4)/1e4+`, `;return`linear(${r.substring(0,r.length-2)})`},en=2e4;function tn(e){let t=0,n=e.next(t);for(;!n.done&&t<en;)t+=50,n=e.next(t);return t>=en?1/0:t}function nn(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(tn(r),en);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:A(i)}}var rn=5;function an(e,t,n){let r=Math.max(t-rn,0);return xe(n-e(r),t-r)}var V={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},on=.001;function sn({duration:e=V.duration,bounce:t=V.bounce,velocity:n=V.velocity,mass:r=V.mass}){let i,a;V.maxDuration;let o=1-t;o=E(V.minDamping,V.maxDamping,o),e=E(V.minDuration,V.maxDuration,A(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=un(t,o),c=Math.exp(-i);return on-a/s*c},a=t=>{let r=t*o*e,a=r*n+n,s=o**2*t**2*e,c=Math.exp(-r),l=un(t**2,o);return(-i(t)+on>0?-1:1)*((a-s)*c)/l}):(i=t=>-.001+Math.exp(-t*e)*((t-n)*e+1),a=t=>Math.exp(-t*e)*((n-t)*(e*e)));let s=5/e,c=ln(i,a,s);if(e=k(e),isNaN(c))return{stiffness:V.stiffness,damping:V.damping,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}var cn=12;function ln(e,t,n){let r=n;for(let n=1;n<cn;n++)r-=e(r)/t(r);return r}function un(e,t){return e*Math.sqrt(1-t*t)}var dn=[`duration`,`bounce`],fn=[`stiffness`,`damping`,`mass`];function pn(e,t){return t.some(t=>e[t]!==void 0)}function mn(e){let t={velocity:V.velocity,stiffness:V.stiffness,damping:V.damping,mass:V.mass,isResolvedFromDuration:!1,...e};if(!pn(e,fn)&&pn(e,dn)){if(e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*E(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:V.mass,stiffness:i,damping:a}}else{let n=sn(e);t={...t,...n,mass:V.mass},t.isResolvedFromDuration=!0}}return t}function hn(e=V.visualDuration,t=V.bounce){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},{restSpeed:r,restDelta:i}=n,a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],s={done:!1,value:a},{stiffness:c,damping:l,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=mn({...n,velocity:-A(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=A(Math.sqrt(c/u)),v=Math.abs(g)<5;r||=v?V.restSpeed.granular:V.restSpeed.default,i||=v?V.restDelta.granular:V.restDelta.default;let y;if(h<1){let e=un(_,h);y=t=>{let n=Math.exp(-h*_*t);return o-n*((m+h*_*g)/e*Math.sin(e*t)+g*Math.cos(e*t))}}else if(h===1)y=e=>o-Math.exp(-_*e)*(g+(m+_*g)*e);else{let e=_*Math.sqrt(h*h-1);y=t=>{let n=Math.exp(-h*_*t),r=Math.min(e*t,300);return o-n*((m+h*_*g)*Math.sinh(r)+e*g*Math.cosh(r))/e}}let b={calculatedDuration:p&&d||null,next:e=>{let t=y(e);if(p)s.done=e>=d;else{let n=e===0?m:0;h<1&&(n=e===0?k(m):an(y,e,t));let a=Math.abs(n)<=r,c=Math.abs(o-t)<=i;s.done=a&&c}return s.value=s.done?o:t,s},toString:()=>{let e=Math.min(tn(b),en),t=$t(t=>b.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return b}hn.applyToOptions=e=>{let t=nn(e,100,hn);return e.ease=t.ease,e.duration=k(t.duration),e.type=`keyframes`,e};function gn({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>s!==void 0&&e<s||c!==void 0&&e>c,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)<Math.abs(c-e)?s:c,h=n*t,g=d+h,_=o===void 0?g:o(g);_!==g&&(h=_-d);let v=e=>-h*Math.exp(-e/r),y=e=>_+v(e),b=e=>{let t=v(e),n=y(e);f.done=Math.abs(t)<=l,f.value=f.done?_:n},x,S,C=e=>{p(f.value)&&(x=e,S=hn({keyframes:[f.value,m(f.value)],velocity:an(y,e,f.value),damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return C(0),{calculatedDuration:null,next:e=>{let t=!1;return!S&&x===void 0&&(t=!0,b(e),C(e)),x!==void 0&&e>=x?S.next(e-x):(!t&&b(e),f)}}}function _n(e,t,n){let r=[],i=n||D.mix||Zt,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=ve(Array.isArray(t)?t[n]||O:t,a)),r.push(a)}return r}function vn(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(t.length,a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=_n(t,r,i),c=s.length,l=n=>{if(o&&n<e[0])return t[0];let r=0;if(c>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=ye(e[r],e[r+1],n);return s[r](i)};return n?t=>l(E(e[0],e[a-1],t)):l}function yn(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=ye(0,t,r);e.push(B(n,1,i))}}function bn(e){let t=[0];return yn(t,e.length-1),t}function xn(e,t){return e.map(e=>e*t)}function Sn(e,t){return e.map(()=>t||Re).splice(0,e.length-1)}function Cn({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=ze(r)?r.map(Ue):Ue(r),a={done:!1,value:t[0]},o=vn(xn(n&&n.length===t.length?n:bn(t),e),t,{ease:Array.isArray(i)?i:Sn(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var wn=e=>e!==null;function Tn(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(wn),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var En={decay:gn,inertia:gn,tween:Cn,keyframes:Cn,spring:hn};function Dn(e){typeof e.type==`string`&&(e.type=En[e.type])}var On=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}},kn=e=>e/100,An=class extends On{constructor(e){super(),this.state=`idle`,this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==P.now()&&this.tick(P.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){let{options:e}=this;Dn(e);let{type:t=Cn,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||Cn;s!==Cn&&typeof o[0]!=`number`&&(this.mixKeyframes=ve(kn,Zt(o[0],o[1])),o=[0,100]);let c=s({...e,keyframes:o});i===`mirror`&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=tn(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;this.currentTime=this.holdTime===null?t:this.holdTime}tick(e,t=!1){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:s}=this;if(this.startTime===null)return n.next(0);let{delay:c=0,keyframes:l,repeat:u,repeatType:d,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),_=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let v=this.currentTime,y=n;if(u){let e=Math.min(this.currentTime,r)/o,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),n===1&&t--,t=Math.min(t,u+1),t%2&&(d===`reverse`?(n=1-n,f&&(n-=f/o)):d===`mirror`&&(y=a)),v=E(0,1,n)*o}let b=_?{done:!1,value:l[0]}:y.next(v);i&&(b.value=i(b.value));let{done:x}=b;!_&&s!==null&&(x=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let S=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&x);return S&&p!==gn&&(b.value=Tn(l,this.options,h,this.speed)),m&&m(b.value),S&&this.finish(),b}then(e,t){return this.finished.then(e,t)}get duration(){return A(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+A(e)}get time(){return A(this.currentTime)}set time(e){e=k(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(P.now());let t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=A(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=Qt,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=n):this.holdTime===null?this.startTime||=t??n:this.startTime=n-this.holdTime,this.state===`finished`&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state=`running`,this.driver.start()}pause(){this.state=`paused`,this.updateTime(P.now()),this.holdTime=this.currentTime}complete(){this.state!==`running`&&this.play(),this.state=`finished`,this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state=`finished`,this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state=`idle`,this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&=(this.driver.stop(),void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),this.driver?.stop(),e.observe(this)}};function jn(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var H=e=>e*180/Math.PI,Mn=e=>Pn(H(Math.atan2(e[1],e[0]))),Nn={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Mn,rotateZ:Mn,skewX:e=>H(Math.atan(e[1])),skewY:e=>H(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Pn=e=>(e%=360,e<0&&(e+=360),e),Fn=Mn,In=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Ln=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Rn={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:In,scaleY:Ln,scale:e=>(In(e)+Ln(e))/2,rotateX:e=>Pn(H(Math.atan2(e[6],e[5]))),rotateY:e=>Pn(H(Math.atan2(-e[2],e[0]))),rotateZ:Fn,rotate:Fn,skewX:e=>H(Math.atan(e[4])),skewY:e=>H(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function zn(e){return+!!e.includes(`scale`)}function Bn(e,t){if(!e||e===`none`)return zn(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=Rn,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Nn,i=t}if(!i)return zn(t);let a=r[t],o=i[1].split(`,`).map(Hn);return typeof a==`function`?a(o):o[a]}var Vn=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return Bn(n,t)};function Hn(e){return parseFloat(e.trim())}var Un=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],Wn=new Set(Un),Gn=e=>e===rt||e===L,Kn=new Set([`x`,`y`,`z`]),qn=Un.filter(e=>!Kn.has(e));function Jn(e){let t=[];return qn.forEach(n=>{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(+!!n.startsWith(`scale`)))}),t}var U={width:({x:e},{paddingLeft:t=`0`,paddingRight:n=`0`})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t=`0`,paddingBottom:n=`0`})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Bn(t,`x`),y:(e,{transform:t})=>Bn(t,`y`)};U.translateX=U.x,U.translateY=U.y;var W=new Set,Yn=!1,Xn=!1,Zn=!1;function Qn(){if(Xn){let e=Array.from(W).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=Jn(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}Xn=!1,Yn=!1,W.forEach(e=>e.complete(Zn)),W.clear()}function $n(){W.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Xn=!0)})}function er(){Zn=!0,$n(),Qn(),Zn=!1}var tr=class{constructor(e,t,n,r,i,a=!1){this.state=`pending`,this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state=`scheduled`,this.isAsync?(W.add(this),Yn||(Yn=!0,j.read($n),j.resolveKeyframes(Qn))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=n.readValue(t,a);r!=null&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}jn(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),W.delete(this)}cancel(){this.state===`scheduled`&&(W.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},nr=e=>e.startsWith(`--`);function rr(e,t,n){nr(t)?e.style.setProperty(t,n):e.style[t]=n}var ir={};function ar(e,t){let n=ge(e);return()=>ir[t]??n()}var or=ar(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),sr=ar(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),cr=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,lr={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:cr([0,.65,.55,1]),circOut:cr([.55,0,1,.45]),backIn:cr([.31,.01,.66,-.59]),backOut:cr([.33,1.53,.69,.99])};function ur(e,t){if(e)return typeof e==`function`?sr()?$t(e,t):`ease-out`:Be(e)?cr(e):Array.isArray(e)?e.map(e=>ur(e,t)||lr.easeOut):lr[e]}function dr(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=ur(s,i);Array.isArray(d)&&(u.easing=d);let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};return l&&(f.pseudoElement=l),e.animate(u,f)}function fr(e){return typeof e==`function`&&`applyToOptions`in e}function pr({type:e,...t}){return fr(e)&&sr()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var mr=class extends On{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e,e.type;let c=pr(e);this.animation=dr(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=Tn(r,this.options,o,this.speed);this.updateMotionValue?this.updateMotionValue(e):rr(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state===`finished`&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;e===`idle`||e===`finished`||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return A(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+A(e)}get time(){return A(Number(this.animation.currentTime)||0)}set time(e){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=k(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime===null?this.animation.playState:`finished`}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,observe:t}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=null,e&&or()?(this.animation.timeline=e,O):t(this)}},hr={anticipate:Me,backInOut:je,circInOut:Fe};function gr(e){return e in hr}function _r(e){typeof e.ease==`string`&&gr(e.ease)&&(e.ease=hr[e.ease])}var vr=10,yr=class extends mr{constructor(e){_r(e),Dn(e),super(e),e.startTime!==void 0&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:r,element:i,...a}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let o=new An({...a,autoplay:!1}),s=Math.max(vr,P.now()-this.startTime),c=E(0,vr,s-vr);t.setWithVelocity(o.sample(Math.max(0,s-c)).value,o.sample(s).value,c),o.stop()}},br=(e,t)=>t!==`zIndex`&&!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(z.test(e)||e===`0`)&&!e.startsWith(`url(`));function xr(e){let t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function Sr(e,t,n,r){let i=e[0];if(i===null)return!1;if(t===`display`||t===`visibility`)return!0;let a=e[e.length-1],o=br(i,t),s=br(a,t);return`${t}${i}${a}${o?a:i}`,!o||!s?!1:xr(e)||(n===`spring`||fr(n))&&r}function Cr(e){e.duration=0,e.type=`keyframes`}var wr=new Set([`opacity`,`clipPath`,`filter`,`transform`]),Tr=ge(()=>Object.hasOwnProperty.call(Element.prototype,`animate`));function Er(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:s,transformTemplate:c}=t.owner.getProps();return Tr()&&n&&wr.has(n)&&(n!==`transform`||!c)&&!s&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var Dr=40,Or=class extends On{constructor({autoplay:e=!0,delay:t=0,type:n=`keyframes`,repeat:r=0,repeatDelay:i=0,repeatType:a=`loop`,keyframes:o,name:s,motionValue:c,element:l,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=P.now();let d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:a,name:s,motionValue:c,element:l,...u},f=l?.KeyframeResolver||tr;this.keyframeResolver=new f(o,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),s,c,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=P.now(),Sr(e,i,a,o)||((D.instantAnimations||!s)&&l?.(Tn(e,n,t)),e[0]=e[e.length-1],Cr(n),n.repeat=0);let u={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>Dr?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},d=!c&&Er(u),f=u.motionValue?.owner?.current,p=d?new yr({...u,element:f}):new An(u);p.finished.then(()=>{this.notifyFinished()}).catch(O),this.pendingTimeline&&=(this.stopTimeline=p.attachTimeline(this.pendingTimeline),void 0),this._animation=p}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),er()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}};function kr(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n==`function`?n(a,o):i===1?a*r:s-a*r}var Ar=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function jr(e){let t=Ar.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function Mr(e,t,n=1){`${e}`;let[r,i]=jr(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return pe(e)?parseFloat(e):e}return et(i)?Mr(i,t,n+1):i}var Nr={type:`spring`,stiffness:500,damping:25,restSpeed:10},Pr=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Fr={type:`keyframes`,duration:.8},Ir={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},Lr=(e,{keyframes:t})=>t.length>2?Fr:Wn.has(e)?e.startsWith(`scale`)?Pr(t[1]):Nr:Ir,Rr=e=>e!==null;function zr(e,{repeat:t,repeatType:n=`loop`},r){let i=e.filter(Rr);return i[t&&n!==`loop`&&t%2==1?0:i.length-1]}function Br(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function Vr(e,t){let n=e?.[t]??e?.default??e;return n===e?n:Br(n,e)}function Hr({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:a,repeatType:o,repeatDelay:s,from:c,elapsed:l,...u}){return!!Object.keys(u).length}var Ur=(e,t,n,r={},i,a)=>o=>{let s=Vr(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=k(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};Hr(s)||Object.assign(u,Lr(e,u)),u.duration&&=k(u.duration),u.repeatDelay&&=k(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Cr(u),u.delay===0&&(d=!0)),(D.instantAnimations||D.skipAnimations||i?.shouldSkipAnimations)&&(d=!0,Cr(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=zr(u.keyframes,s);if(e!==void 0){j.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new An(u):new Or(u)};function Wr(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function Gr(e,t,n,r){if(typeof t==`function`){let[i,a]=Wr(r);t=t(n===void 0?e.custom:n,i,a)}if(typeof t==`string`&&(t=e.variants&&e.variants[t]),typeof t==`function`){let[i,a]=Wr(r);t=t(n===void 0?e.custom:n,i,a)}return t}function Kr(e,t,n){let r=e.getProps();return Gr(r,t,n===void 0?r.custom:n,e)}var qr=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...Un]),Jr=30,Yr=e=>!isNaN(parseFloat(e)),Xr={current:void 0},Zr=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=P.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=P.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Yr(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on(`change`,e)}on(e,t){this.events[e]||(this.events[e]=new be);let n=this.events[e].add(t);return e===`change`?()=>{n(),j.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||=new Set,this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return Xr.current&&Xr.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=P.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Jr)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,Jr);return xe(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function G(e,t){return new Zr(e,t)}var Qr=e=>Array.isArray(e);function $r(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,G(n))}function ei(e){return Qr(e)?e[e.length-1]||0:e}function ti(e,t){let{transitionEnd:n={},transition:r={},...i}=Kr(e,t)||{};i={...i,...n};for(let t in i)$r(e,t,ei(i[t]))}var K=e=>!!(e&&e.getVelocity);function ni(e){return!!(K(e)&&e.add)}function ri(e,t){let n=e.getValue(`willChange`);if(ni(n))return n.add(t);if(!n&&D.WillChange){let n=new D.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function ii(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var ai=`data-`+ii(`framerAppearId`);function oi(e){return e.props[ai]}function si({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function ci(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?Br(a,c):c;let l=a?.reduceMotion;r&&(a=r);let u=[],d=i&&e.animationState&&e.animationState.getState()[i];for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||d&&si(d,t))continue;let o={delay:n,...Vr(a||{},t)},c=r.get();if(c!==void 0&&!r.isAnimating&&!Array.isArray(i)&&i===c&&!o.velocity)continue;let f=!1;if(window.MotionHandoffAnimation){let n=oi(e);if(n){let e=window.MotionHandoffAnimation(n,t,j);e!==null&&(o.startTime=e,f=!0)}}ri(e,t);let p=l??e.shouldReduceMotion;r.start(Ur(t,r,i,p&&qr.has(t)?{type:!1}:o,e,f));let m=r.animation;m&&u.push(m)}if(o){let t=()=>j.update(()=>{o&&ti(e,o)});u.length?Promise.all(u).then(t):t()}return u}function li(e,t,n={}){let r=Kr(e,t,n.type===`exit`?e.presenceContext?.custom:void 0),{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);let a=r?()=>Promise.all(ci(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return ui(e,t,r,a,o,s,n)}:()=>Promise.resolve(),{when:s}=i;if(s){let[e,t]=s===`beforeChildren`?[a,o]:[o,a];return e().then(()=>t())}return Promise.all([a(),o(n.delay)])}function ui(e,t,n=0,r=0,i=0,a=1,o){let s=[];for(let c of e.variantChildren)c.notify(`AnimationStart`,t),s.push(li(c,t,{...o,delay:n+(typeof r==`function`?0:r)+kr(e.variantChildren,c,r,i,a)}).then(()=>c.notify(`AnimationComplete`,t)));return Promise.all(s)}function di(e,t,n={}){e.notify(`AnimationStart`,t);let r;if(Array.isArray(t)){let i=t.map(t=>li(e,t,n));r=Promise.all(i)}else if(typeof t==`string`)r=li(e,t,n);else{let i=typeof t==`function`?Kr(e,t,n.custom):t;r=Promise.all(ci(e,i,n))}return r.then(()=>{e.notify(`AnimationComplete`,t)})}var fi={test:e=>e===`auto`,parse:e=>e},pi=e=>t=>t.test(e),mi=[rt,L,I,F,yt,vt,fi],hi=e=>mi.find(pi(e));function gi(e){return typeof e==`number`?e===0:e===null||e===`none`||e===`0`||he(e)}var _i=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function vi(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(st)||[];if(!r)return e;let i=n.replace(r,``),a=+!!_i.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var yi=/\b([a-z-]*)\(.*?\)/gu,bi={...z,getAnimatableNone:e=>{let t=e.match(yi);return t?t.map(vi).join(` `):e}},xi={...z,getAnimatableNone:e=>{let t=z.parse(e);return z.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},Si={...rt,transform:Math.round},Ci={borderWidth:L,borderTopWidth:L,borderRightWidth:L,borderBottomWidth:L,borderLeftWidth:L,borderRadius:L,borderTopLeftRadius:L,borderTopRightRadius:L,borderBottomRightRadius:L,borderBottomLeftRadius:L,width:L,maxWidth:L,height:L,maxHeight:L,top:L,right:L,bottom:L,left:L,inset:L,insetBlock:L,insetBlockStart:L,insetBlockEnd:L,insetInline:L,insetInlineStart:L,insetInlineEnd:L,padding:L,paddingTop:L,paddingRight:L,paddingBottom:L,paddingLeft:L,paddingBlock:L,paddingBlockStart:L,paddingBlockEnd:L,paddingInline:L,paddingInlineStart:L,paddingInlineEnd:L,margin:L,marginTop:L,marginRight:L,marginBottom:L,marginLeft:L,marginBlock:L,marginBlockStart:L,marginBlockEnd:L,marginInline:L,marginInlineStart:L,marginInlineEnd:L,fontSize:L,backgroundPositionX:L,backgroundPositionY:L,rotate:F,rotateX:F,rotateY:F,rotateZ:F,scale:at,scaleX:at,scaleY:at,scaleZ:at,skew:F,skewX:F,skewY:F,distance:L,translateX:L,translateY:L,translateZ:L,x:L,y:L,z:L,perspective:L,transformPerspective:L,opacity:it,originX:bt,originY:bt,originZ:L,zIndex:Si,fillOpacity:it,strokeOpacity:it,numOctaves:Si},wi={...Ci,color:R,backgroundColor:R,outlineColor:R,fill:R,stroke:R,borderColor:R,borderTopColor:R,borderRightColor:R,borderBottomColor:R,borderLeftColor:R,filter:bi,WebkitFilter:bi,mask:xi,WebkitMask:xi},Ti=e=>wi[e],Ei=new Set([bi,xi]);function Di(e,t){let n=Ti(e);return Ei.has(n)||(n=z),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var Oi=new Set([`auto`,`none`,`0`]);function ki(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!Oi.has(t)&&At(t).values.length&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]=Di(n,i)}var Ai=class extends tr{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`string`&&(r=r.trim(),et(r))){let i=Mr(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!qr.has(n)||e.length!==2)return;let[r,i]=e,a=hi(r),o=hi(i);if(nt(r)!==nt(i)&&U[n])this.needsMeasurement=!0;else if(a!==o){if(Gn(a)&&Gn(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else U[n]&&(this.needsMeasurement=!0)}}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||gi(e[t]))&&n.push(t);n.length&&ki(e,n,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;n===`height`&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=U[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let r=t[t.length-1];r!==void 0&&e.getValue(n,r).jump(r,!1)}measureEndState(){let{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;let r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);let i=n.length-1,a=n[i];n[i]=U[t](e.measureViewportBox(),window.getComputedStyle(e.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}},ji=new Set([`opacity`,`clipPath`,`filter`,`transform`]);function Mi(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e==`string`){let t=document,r=n?.[e]??t.querySelectorAll(e);return r?Array.from(r):[]}return Array.from(e).filter(e=>e!=null)}var Ni=(e,t)=>t&&typeof e==`number`?t.transform(e):e;function Pi(e){return me(e)&&`offsetHeight`in e}var{schedule:Fi}=qe(queueMicrotask,!1),q={x:!1,y:!1};function Ii(){return q.x||q.y}function Li(e){return e===`x`||e===`y`?q[e]?null:(q[e]=!0,()=>{q[e]=!1}):q.x||q.y?null:(q.x=q.y=!0,()=>{q.x=q.y=!1})}function Ri(e,t){let n=Mi(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function zi(e){return!(e.pointerType===`touch`||Ii())}function Bi(e,t,n={}){let[r,i,a]=Ri(e,n);return r.forEach(e=>{let n=!1,r=!1,a,o=()=>{e.removeEventListener(`pointerleave`,u)},s=e=>{a&&=(a(e),void 0),o()},c=e=>{n=!1,window.removeEventListener(`pointerup`,c),window.removeEventListener(`pointercancel`,c),r&&(r=!1,s(e))},l=()=>{n=!0,window.addEventListener(`pointerup`,c,i),window.addEventListener(`pointercancel`,c,i)},u=e=>{if(e.pointerType!==`touch`){if(n){r=!0;return}s(e)}};e.addEventListener(`pointerenter`,n=>{if(!zi(n))return;r=!1;let o=t(e,n);typeof o==`function`&&(a=o,e.addEventListener(`pointerleave`,u,i))},i),e.addEventListener(`pointerdown`,l,i)}),a}var Vi=(e,t)=>t?e===t||Vi(e,t.parentElement):!1,Hi=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,Ui=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function Wi(e){return Ui.has(e.tagName)||e.isContentEditable===!0}var Gi=new Set([`INPUT`,`SELECT`,`TEXTAREA`]);function Ki(e){return Gi.has(e.tagName)||e.isContentEditable===!0}var qi=new WeakSet;function Ji(e){return t=>{t.key===`Enter`&&e(t)}}function Yi(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var Xi=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=Ji(()=>{if(qi.has(n))return;Yi(n,`down`);let e=Ji(()=>{Yi(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>Yi(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function Zi(e){return Hi(e)&&!Ii()}var Qi=new WeakSet;function $i(e,t,n={}){let[r,i,a]=Ri(e,n),o=e=>{let r=e.currentTarget;if(!Zi(e)||Qi.has(e))return;qi.add(r),n.stopPropagation&&Qi.add(e);let a=t(r,e),o=(e,t)=>{window.removeEventListener(`pointerup`,s),window.removeEventListener(`pointercancel`,c),qi.has(r)&&qi.delete(r),Zi(e)&&typeof a==`function`&&a(e,{success:t})},s=e=>{o(e,r===window||r===document||n.useGlobalTarget||Vi(r,e.target))},c=e=>{o(e,!1)};window.addEventListener(`pointerup`,s,i),window.addEventListener(`pointercancel`,c,i)};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,o,i),Pi(e)&&(e.addEventListener(`focus`,e=>Xi(e,i)),!Wi(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}function ea(e){return me(e)&&`ownerSVGElement`in e}var ta=new WeakMap,na,ra=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:ea(r)&&`getBBox`in r?r.getBBox()[t]:r[n],ia=ra(`inline`,`width`,`offsetWidth`),aa=ra(`block`,`height`,`offsetHeight`);function oa({target:e,borderBoxSize:t}){ta.get(e)?.forEach(n=>{n(e,{get width(){return ia(e,t)},get height(){return aa(e,t)}})})}function sa(e){e.forEach(oa)}function ca(){typeof ResizeObserver>`u`||(na=new ResizeObserver(sa))}function la(e,t){na||ca();let n=Mi(e);return n.forEach(e=>{let n=ta.get(e);n||(n=new Set,ta.set(e,n)),n.add(t),na?.observe(e)}),()=>{n.forEach(e=>{let n=ta.get(e);n?.delete(t),n?.size||na?.unobserve(e)})}}var ua=new Set,da;function fa(){da=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};ua.forEach(t=>t(e))},window.addEventListener(`resize`,da)}function pa(e){return ua.add(e),da||fa(),()=>{ua.delete(e),!ua.size&&typeof da==`function`&&(window.removeEventListener(`resize`,da),da=void 0)}}function ma(e,t){return typeof e==`function`?pa(e):la(e,t)}function ha(e){return ea(e)&&e.tagName===`svg`}function ga(...e){let t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],i=e[1+n],a=e[2+n],o=e[3+n],s=vn(i,a,o);return t?s(r):s}var _a=[...mi,R,z],va=e=>_a.find(pi(e)),ya=()=>({translate:0,scale:1,origin:0,originPoint:0}),ba=()=>({x:ya(),y:ya()}),xa=()=>({min:0,max:0}),J=()=>({x:xa(),y:xa()}),Sa=new WeakMap;function Ca(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function wa(e){return typeof e==`string`||Array.isArray(e)}var Ta=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],Ea=[`initial`,...Ta];function Da(e){return Ca(e.animate)||Ea.some(t=>wa(e[t]))}function Oa(e){return!!(Da(e)||e.variants)}function ka(e,t,n){for(let r in t){let i=t[r],a=n[r];if(K(i))e.addValue(r,i);else if(K(a))e.addValue(r,G(i,{owner:e}));else if(a!==i){if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,G(t===void 0?i:t,{owner:e}))}}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var Aa={current:null},ja={current:!1},Ma=typeof window<`u`;function Na(){if(ja.current=!0,Ma){if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>Aa.current=e.matches;e.addEventListener(`change`,t),t()}else Aa.current=!1}}var Pa=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],Fa={};function Ia(e){Fa=e}function La(){return Fa}var Ra=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:a,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=tr,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify(`Update`,this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=P.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,j.render(this.render,!1,!0))};let{latestValues:c,renderState:l}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=t.initial?{...c}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=i,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=Da(t),this.isVariantNode=Oa(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];c[e]!==void 0&&K(t)&&t.set(c[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];this.current=e,Sa.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),this.reducedMotionConfig===`never`?this.shouldReduceMotion=!1:this.reducedMotionConfig===`always`?this.shouldReduceMotion=!0:(ja.current||Na(),this.shouldReduceMotion=Aa.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),M(this.notifyUpdate),M(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??=new Set,this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&ji.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new mr({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:k(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=Wn.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&j.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),i;typeof window<`u`&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i&&i(),t.owner&&t.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e=`animation`;for(e in Fa){let t=Fa[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):J()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<Pa.length;t++){let n=Pa[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=ka(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=G(t===null?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&(pe(n)||he(n))?n=parseFloat(n):!va(n)&&z.test(t)&&(n=Di(e,t)),this.setBaseTarget(e,K(n)?n.get():n)),K(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let{initial:t}=this.props,n;if(typeof t==`string`||typeof t==`object`){let r=Gr(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&n!==void 0)return n;let r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!K(r)?r:this.initialValues[e]!==void 0&&n===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new be),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){Fi.render(this.render)}},za=class extends Ra{constructor(){super(...arguments),this.KeyframeResolver=Ai}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;K(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}},Y=class{constructor(e){this.isMounted=!1,this.node=e}update(){}};function Ba({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Va({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Ha(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Ua(e){return e===void 0||e===1}function Wa({scale:e,scaleX:t,scaleY:n}){return!Ua(e)||!Ua(t)||!Ua(n)}function X(e){return Wa(e)||Ga(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Ga(e){return Ka(e.x)||Ka(e.y)}function Ka(e){return e&&e!==`0%`}function qa(e,t,n){return n+t*(e-n)}function Ja(e,t,n,r,i){return i!==void 0&&(e=qa(e,i,r)),qa(e,n,r)+t}function Ya(e,t=0,n=1,r,i){e.min=Ja(e.min,t,n,r,i),e.max=Ja(e.max,t,n,r,i)}function Xa(e,{x:t,y:n}){Ya(e.x,t.translate,t.scale,t.originPoint),Ya(e.y,n.translate,n.scale,n.originPoint)}var Za=.999999999999,Qa=1.0000000000001;function $a(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++){a=n[s],o=a.projectionDelta;let{visualElement:i}=a.options;i&&i.props.style&&i.props.style.display===`contents`||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&no(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,Xa(e,o)),r&&X(a.latestValues)&&no(e,a.latestValues))}t.x<Qa&&t.x>Za&&(t.x=1),t.y<Qa&&t.y>Za&&(t.y=1)}function eo(e,t){e.min+=t,e.max+=t}function to(e,t,n,r,i=.5){Ya(e,t,n,B(e.min,e.max,i),r)}function no(e,t){to(e.x,t.x,t.scaleX,t.scale,t.originX),to(e.y,t.y,t.scaleY,t.scale,t.originY)}function ro(e,t){return Ba(Ha(e.getBoundingClientRect(),t))}function io(e,t,n){let r=ro(e,n),{scroll:i}=t;return i&&(eo(r.x,i.offset.x),eo(r.y,i.offset.y)),r}var ao={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},oo=Un.length;function so(e,t,n){let r=``,i=!0;for(let a=0;a<oo;a++){let o=Un[a],s=e[o];if(s===void 0)continue;let c=!0;if(typeof s==`number`)c=s===+!!o.startsWith(`scale`);else{let e=parseFloat(s);c=o.startsWith(`scale`)?e===1:e===0}if(!c||n){let e=Ni(s,Ci[o]);if(!c){i=!1;let t=ao[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}return r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function co(e,t,n){let{style:r,vars:i,transformOrigin:a}=e,o=!1,s=!1;for(let e in t){let n=t[e];if(Wn.has(e))o=!0;else if(Qe(e))i[e]=n;else{let t=Ni(n,Ci[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=so(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}function lo(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function uo(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var fo={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`){if(L.test(e))e=parseFloat(e);else return e}return`${uo(e,t.target.x)}% ${uo(e,t.target.y)}%`}},po={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=z.parse(e);if(i.length>5)return r;let a=z.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=B(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}},mo={borderRadius:{...fo,applyTo:[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`]},borderTopLeftRadius:fo,borderTopRightRadius:fo,borderBottomLeftRadius:fo,borderBottomRightRadius:fo,boxShadow:po};function ho(e,{layout:t,layoutId:n}){return Wn.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!mo[e]||e===`opacity`)}function go(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)(K(r[t])||i&&K(i[t])||ho(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function _o(e){return window.getComputedStyle(e)}var vo=class extends za{constructor(){super(...arguments),this.type=`html`,this.renderInstance=lo}readValueFromInstance(e,t){if(Wn.has(t))return this.projection?.isProjecting?zn(t):Vn(e,t);{let n=_o(e),r=(Qe(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return ro(e,t)}build(e,t,n){co(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return go(e,t,n)}},yo={offset:`stroke-dashoffset`,array:`stroke-dasharray`},bo={offset:`strokeDashoffset`,array:`strokeDasharray`};function xo(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?yo:bo;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var So=[`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function Co(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(co(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??`50% 50%`,delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??`fill-box`,delete d.transformBox);for(let e of So)d[e]!==void 0&&(f[e]=d[e],delete d[e]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&xo(d,i,a,o,!1)}var wo=new Set([`baseFrequency`,`diffuseConstant`,`kernelMatrix`,`kernelUnitLength`,`keySplines`,`keyTimes`,`limitingConeAngle`,`markerHeight`,`markerWidth`,`numOctaves`,`targetX`,`targetY`,`surfaceScale`,`specularConstant`,`specularExponent`,`stdDeviation`,`tableValues`,`viewBox`,`gradientTransform`,`pathLength`,`startOffset`,`textLength`,`lengthAdjust`]),To=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function Eo(e,t,n,r){lo(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(wo.has(n)?n:ii(n),t.attrs[n])}function Do(e,t,n){let r=go(e,t,n);for(let n in e)if(K(e[n])||K(t[n])){let t=Un.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var Oo=class extends za{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=J}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(Wn.has(t)){let e=Ti(t);return e&&e.default||0}return t=wo.has(t)?t:ii(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return Do(e,t,n)}build(e,t,n){Co(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){Eo(e,t,n,r)}mount(e){this.isSVGTag=To(e.tagName),super.mount(e)}},ko=Ea.length;function Ao(e){if(!e)return;if(!e.isControllingVariants){let t=e.parent&&Ao(e.parent)||{};return e.props.initial!==void 0&&(t.initial=e.props.initial),t}let t={};for(let n=0;n<ko;n++){let r=Ea[n],i=e.props[r];(wa(i)||i===!1)&&(t[r]=i)}return t}function jo(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var Mo=[...Ta].reverse(),No=Ta.length;function Po(e){return t=>Promise.all(t.map(({animation:t,options:n})=>di(e,t,n)))}function Fo(e){let t=Po(e),n=Ro(),r=!0,i=t=>(n,r)=>{let i=Kr(e,r,t===`exit`?e.presenceContext?.custom:void 0);if(i){let{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function a(n){t=n(e)}function o(a){let{props:o}=e,s=Ao(e.parent)||{},c=[],l=new Set,u={},d=1/0;for(let t=0;t<No;t++){let f=Mo[t],p=n[f],m=o[f]===void 0?s[f]:o[f],h=wa(m),g=f===a?p.isActive:null;g===!1&&(d=t);let _=m===s[f]&&m!==o[f]&&h;if(_&&r&&e.manuallyAnimateOnMount&&(_=!1),p.protectedKeys={...u},!p.isActive&&g===null||!m&&!p.prevProp||Ca(m)||typeof m==`boolean`)continue;if(f===`exit`&&p.isActive&&g!==!0){p.prevResolvedValues&&(u={...u,...p.prevResolvedValues});continue}let v=Io(p.prevProp,m),y=v||f===a&&p.isActive&&!_&&h||t>d&&h,b=!1,x=Array.isArray(m)?m:[m],S=x.reduce(i(f),{});g===!1&&(S={});let{prevResolvedValues:C={}}=p,w={...C,...S},ee=t=>{y=!0,l.has(t)&&(b=!0,l.delete(t)),p.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in w){let t=S[e],n=C[e];if(u.hasOwnProperty(e))continue;let r=!1;r=Qr(t)&&Qr(n)?!jo(t,n):t!==n,r?t==null?l.add(e):ee(e):t!==void 0&&l.has(e)?ee(e):p.protectedKeys[e]=!0}p.prevProp=m,p.prevResolvedValues=S,p.isActive&&(u={...u,...S}),r&&e.blockInitialAnimation&&(y=!1);let te=_&&v;y&&(!te||b)&&c.push(...x.map(t=>{let n={type:f};if(typeof t==`string`&&r&&!te&&e.manuallyAnimateOnMount&&e.parent){let{parent:r}=e,i=Kr(r,t);if(r.enteringChildren&&i){let{delayChildren:t}=i.transition||{};n.delay=kr(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(l.size){let t={};if(typeof o.initial!=`boolean`){let n=Kr(e,Array.isArray(o.initial)?o.initial[0]:o.initial);n&&n.transition&&(t.transition=n.transition)}l.forEach(n=>{let r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=r??null}),c.push({animation:t})}let f=!!c.length;return r&&(o.initial===!1||o.initial===o.animate)&&!e.manuallyAnimateOnMount&&(f=!1),r=!1,f?t(c):Promise.resolve()}function s(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=o(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:o,setActive:s,setAnimateFunction:a,getState:()=>n,reset:()=>{n=Ro()}}}function Io(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!jo(t,e):!1}function Lo(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Ro(){return{animate:Lo(!0),whileInView:Lo(),whileHover:Lo(),whileTap:Lo(),whileDrag:Lo(),whileFocus:Lo(),exit:Lo()}}function zo(e,t){e.min=t.min,e.max=t.max}function Z(e,t){zo(e.x,t.x),zo(e.y,t.y)}function Bo(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var Vo=.9999,Ho=1.0001,Uo=-.01,Wo=.01;function Q(e){return e.max-e.min}function Go(e,t,n){return Math.abs(e-t)<=n}function Ko(e,t,n,r=.5){e.origin=r,e.originPoint=B(t.min,t.max,e.origin),e.scale=Q(n)/Q(t),e.translate=B(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Vo&&e.scale<=Ho||isNaN(e.scale))&&(e.scale=1),(e.translate>=Uo&&e.translate<=Wo||isNaN(e.translate))&&(e.translate=0)}function qo(e,t,n,r){Ko(e.x,t.x,n.x,r?r.originX:void 0),Ko(e.y,t.y,n.y,r?r.originY:void 0)}function Jo(e,t,n){e.min=n.min+t.min,e.max=e.min+Q(t)}function Yo(e,t,n){Jo(e.x,t.x,n.x),Jo(e.y,t.y,n.y)}function Xo(e,t,n){e.min=t.min-n.min,e.max=e.min+Q(t)}function Zo(e,t,n){Xo(e.x,t.x,n.x),Xo(e.y,t.y,n.y)}function Qo(e,t,n,r,i){return e-=t,e=qa(e,1/n,r),i!==void 0&&(e=qa(e,1/i,r)),e}function $o(e,t=0,n=1,r=.5,i,a=e,o=e){if(I.test(t)&&(t=parseFloat(t),t=B(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=B(a.min,a.max,r);e===a&&(s-=t),e.min=Qo(e.min,t,n,s,i),e.max=Qo(e.max,t,n,s,i)}function es(e,t,[n,r,i],a,o){$o(e,t[n],t[r],t[i],t.scale,a,o)}var ts=[`x`,`scaleX`,`originX`],ns=[`y`,`scaleY`,`originY`];function rs(e,t,n,r){es(e.x,t,ts,n?n.x:void 0,r?r.x:void 0),es(e.y,t,ns,n?n.y:void 0,r?r.y:void 0)}function is(e){return e.translate===0&&e.scale===1}function as(e){return is(e.x)&&is(e.y)}function os(e,t){return e.min===t.min&&e.max===t.max}function ss(e,t){return os(e.x,t.x)&&os(e.y,t.y)}function cs(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function ls(e,t){return cs(e.x,t.x)&&cs(e.y,t.y)}function us(e){return Q(e.x)/Q(e.y)}function ds(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function $(e){return[e(`x`),e(`y`)]}function fs(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,rotateX:i,rotateY:a,skewX:o,skewY:s}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotateX(${i}deg) `),a&&(r+=`rotateY(${a}deg) `),o&&(r+=`skewX(${o}deg) `),s&&(r+=`skewY(${s}deg) `)}let s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||`none`}var ps=[`TopLeft`,`TopRight`,`BottomLeft`,`BottomRight`],ms=ps.length,hs=e=>typeof e==`string`?parseFloat(e):e,gs=e=>typeof e==`number`||L.test(e);function _s(e,t,n,r,i,a){i?(e.opacity=B(0,n.opacity??1,ys(r)),e.opacityExit=B(t.opacity??1,0,bs(r))):a&&(e.opacity=B(t.opacity??1,n.opacity??1,r));for(let i=0;i<ms;i++){let a=`border${ps[i]}Radius`,o=vs(t,a),s=vs(n,a);(o!==void 0||s!==void 0)&&(o||=0,s||=0,o===0||s===0||gs(o)===gs(s)?(e[a]=Math.max(B(hs(o),hs(s),r),0),(I.test(s)||I.test(o))&&(e[a]+=`%`)):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=B(t.rotate||0,n.rotate||0,r))}function vs(e,t){return e[t]===void 0?e.borderRadius:e[t]}var ys=xs(0,.5,Pe),bs=xs(.5,.95,O);function xs(e,t,n){return r=>r<e?0:r>t?1:n(ye(e,t,r))}function Ss(e,t,n){let r=K(e)?e:G(e);return r.start(Ur(``,r,t,n)),r.animation}function Cs(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}var ws=(e,t)=>e.depth-t.depth,Ts=class{constructor(){this.children=[],this.isDirty=!1}add(e){de(this.children,e),this.isDirty=!0}remove(e){fe(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(ws),this.isDirty=!1,this.children.forEach(e)}};function Es(e,t){let n=P.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(M(r),e(a-t))};return j.setup(r,!0),()=>M(r)}function Ds(e){return K(e)?e.get():e}var Os=class{constructor(){this.members=[]}add(e){de(this.members,e);for(let t=this.members.length-1;t>=0;t--){let n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;let r=n.instance;r&&r.isConnected===!1&&n.isPresent!==!1&&!n.snapshot&&fe(this.members,n)}e.scheduleRender()}remove(e){if(fe(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){let t=this.members.findIndex(t=>e===t);if(t===0)return!1;let n;for(let e=t;e>=0;e--){let t=this.members[e],r=t.instance;if(t.isPresent!==!1&&(!r||r.isConnected!==!1)){n=t;break}}return n?(this.promote(n),!0):!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender();let r=n.options.layoutDependency,i=e.options.layoutDependency;if(r===void 0||i===void 0||r!==i){let r=n.instance;r&&r.isConnected===!1&&!n.snapshot||(e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0))}let{crossfade:a}=e.options;a===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{let{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}},ks={hasAnimatedSinceResize:!0,hasEverUpdated:!1},As=[``,`X`,`Y`,`Z`],js=1e3,Ms=0;function Ns(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Ps(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=oi(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,j,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Ps(r)}function Fs({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=Ms++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Rs),this.nodes.forEach(Gs),this.nodes.forEach(Ks),this.nodes.forEach(zs)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new Ts)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new be),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=ea(t)&&!ha(t),this.instance=t;let{layoutId:n,layout:r,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n,r=0,i=()=>this.root.updateBlockedByResize=!1;j.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=Es(i,250),ks.hasAnimatedSinceResize&&(ks.hasAnimatedSinceResize=!1,this.nodes.forEach(Ws)))})}n&&this.root.registerSharedNode(n,this),this.options.animate!==!1&&i&&(n||r)&&this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||i.getDefaultTransition()||$s,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!ls(this.targetLayout,r),l=!t&&n;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...Vr(a,`layout`),onPlay:o,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l)}else t||Ws(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),M(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(qs),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Ps(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:n}=this.options;if(t===void 0&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,``):void 0,this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Vs);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Hs);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Us),this.nodes.forEach(Is),this.nodes.forEach(Ls)):this.nodes.forEach(Hs),this.clearAllSnapshots();let e=P.now();N.delta=E(0,1e3/60,e-N.timestamp),N.timestamp=e,N.isProcessing=!0,Je.update.process(N),Je.preRender.process(N),Je.render.process(N),N.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Fi.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Bs),this.sharedNodes.forEach(Js)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,j.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){j.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Q(this.snapshot.measuredBox.x)&&!Q(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=J(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify(`LayoutMeasure`,this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e=`measure`){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){let t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!as(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||X(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),rc(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return J();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(ac))){let{scroll:e}=this.root;e&&(eo(t.x,e.offset.x),eo(t.y,e.offset.y))}return t}removeElementScroll(e){let t=J();if(Z(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&Z(t,e),eo(t.x,i.offset.x),eo(t.y,i.offset.y))}return t}applyTransform(e,t=!1){let n=J();Z(n,e);for(let e=0;e<this.path.length;e++){let r=this.path[e];!t&&r.options.layoutScroll&&r.scroll&&r!==r.root&&no(n,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),X(r.latestValues)&&no(n,r.latestValues)}return X(this.latestValues)&&no(n,this.latestValues),n}removeTransform(e){let t=J();Z(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!n.instance||!X(n.latestValues))continue;Wa(n.latestValues)&&n.updateSnapshot();let r=J();Z(r,n.measurePageBox()),rs(t,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,r)}return X(this.latestValues)&&rs(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==N.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||=t.isProjectionDirty,this.isTransformDirty||=t.isTransformDirty,this.isSharedProjectionDirty||=t.isSharedProjectionDirty;let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;if(!this.layout||!(r||i))return;this.resolvedRelativeTargetAt=N.timestamp;let a=this.getClosestProjectingParent();a&&this.linkedParentVersion!==a.layoutVersion&&!a.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),(this.relativeTarget||this.targetDelta)&&(this.target||(this.target=J(),this.targetWithTransforms=J()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Yo(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Z(this.target,this.layout.layoutBox),Xa(this.target,this.targetDelta)):Z(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,a&&!!a.resumingFrom==!!this.resumingFrom&&!a.options.layoutScroll&&a.target&&this.animationProgress!==1?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Wa(this.parent.latestValues)||Ga(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=J(),this.relativeTargetOrigin=J(),Zo(this.relativeTargetOrigin,t,n),Z(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===N.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;Z(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;$a(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=J());let{target:s}=e;s?(!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Bo(this.prevProjectionDelta.x,this.projectionDelta.x),Bo(this.prevProjectionDelta.y,this.projectionDelta.y)),qo(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==o||!ds(this.projectionDelta.x,this.prevProjectionDelta.x)||!ds(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s))):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ba(),this.projectionDelta=ba(),this.projectionDeltaWithTransform=ba()}setAnimationOrigin(e,t=!1){let n=this.snapshot,r=n?n.latestValues:{},i={...this.latestValues},a=ba();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let o=J(),s=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),c=this.getStack(),l=!c||c.members.length<=1,u=!(!s||l||this.options.crossfade!==!0||this.path.some(Qs));this.animationProgress=0;let d;this.mixTargetDelta=t=>{let n=t/1e3;Ys(a.x,e.x,n),Ys(a.y,e.y,n),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Zo(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Zs(this.relativeTarget,this.relativeTargetOrigin,o,n),d&&ss(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||=J(),Z(d,this.relativeTarget)),s&&(this.animationValues=i,_s(i,r,this.latestValues,n,u,l)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&=(M(this.pendingAnimation),void 0),this.pendingAnimation=j.update(()=>{ks.hasAnimatedSinceResize=!0,this.motionValue||=G(0),this.currentAnimation=Ss(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(js),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&ic(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||J();let t=Q(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=Q(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}Z(t,n),no(t,i),qo(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new Os),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return!e||e.lead===this}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return e?e.relegate(this):!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&Ns(`z`,e,r,this.animationValues);for(let t=0;t<As.length;t++)Ns(`rotate${As[t]}`,e,r,this.animationValues),Ns(`skew${As[t]}`,e,r,this.animationValues);e.render();for(let t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible){e.visibility=`hidden`;return}let n=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility=``,e.opacity=``,e.pointerEvents=Ds(t?.pointerEvents)||``,e.transform=n?n(this.latestValues,``):`none`;return}let r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){this.options.layoutId&&(e.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,e.pointerEvents=Ds(t?.pointerEvents)||``),this.hasProjected&&!X(this.latestValues)&&(e.transform=n?n({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=fs(this.projectionDeltaWithTransform,this.treeScale,i);n&&(a=n(i,a)),e.transform=a;let{x:o,y:s}=this.projectionDelta;e.transformOrigin=`${o.origin*100}% ${s.origin*100}% 0`,e.opacity=r.animationValues?r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:r===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit;for(let t in mo){if(i[t]===void 0)continue;let{correct:n,applyTo:o,isCSSVariable:s}=mo[t],c=a===`none`?i[t]:n(i[t],r);if(o){let t=o.length;for(let n=0;n<t;n++)e[o[n]]=c}else s?this.options.visualElement.renderState.vars[t]=c:e[t]=c}this.options.layoutId&&(e.pointerEvents=r===this?Ds(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(Vs),this.root.sharedNodes.clear()}}}function Is(e){e.updateLayout()}function Ls(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;i===`size`?$(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=Q(r);r.min=n[e].min,r.max=r.min+i}):ic(i,t.layoutBox,n)&&$(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=Q(n[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)});let o=ba();qo(o,n,t.layoutBox);let s=ba();a?qo(s,e.applyTransform(r,!0),t.measuredBox):qo(s,n,t.layoutBox);let c=!as(o),l=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:a}=r;if(i&&a){let o=J();Zo(o,t.layoutBox,i.layoutBox);let s=J();Zo(s,n,a.layoutBox),ls(o,s)||(l=!0),r.options.layoutRoot&&(e.relativeTarget=s,e.relativeTargetOrigin=o,e.relativeParent=r)}}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function Rs(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function zs(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Bs(e){e.clearSnapshot()}function Vs(e){e.clearMeasurements()}function Hs(e){e.isLayoutDirty=!1}function Us(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function Ws(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Gs(e){e.resolveTargetDelta()}function Ks(e){e.calcProjection()}function qs(e){e.resetSkewAndRotation()}function Js(e){e.removeLeadSnapshot()}function Ys(e,t,n){e.translate=B(t.translate,0,n),e.scale=B(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Xs(e,t,n,r){e.min=B(t.min,n.min,r),e.max=B(t.max,n.max,r)}function Zs(e,t,n,r){Xs(e.x,t.x,n.x,r),Xs(e.y,t.y,n.y,r)}function Qs(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var $s={duration:.45,ease:[.4,0,.1,1]},ec=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),tc=ec(`applewebkit/`)&&!ec(`chrome/`)?Math.round:O;function nc(e){e.min=tc(e.min),e.max=tc(e.max)}function rc(e){nc(e.x),nc(e.y)}function ic(e,t,n){return e===`position`||e===`preserve-aspect`&&!Go(us(t),us(n),.2)}function ac(e){return e!==e.root&&e.scroll?.wasRoot}var oc=Fs({attachResizeListener:(e,t)=>Cs(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),sc={current:void 0},cc=Fs({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!sc.current){let e=new oc({});e.mount(window),e.setOptions({layoutScroll:!0}),sc.current=e}return sc.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),lc=(0,w.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function uc(e=!0){let t=(0,w.useContext)(ue);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=(0,w.useId)();(0,w.useEffect)(()=>{if(e)return i(a)},[e]);let o=(0,w.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}var dc=(0,w.createContext)({strict:!1}),fc={animation:[`animate`,`variants`,`whileHover`,`whileTap`,`exit`,`whileInView`,`whileFocus`,`whileDrag`],exit:[`exit`],drag:[`drag`,`dragControls`],focus:[`whileFocus`],hover:[`whileHover`,`onHoverStart`,`onHoverEnd`],tap:[`whileTap`,`onTap`,`onTapStart`,`onTapCancel`],pan:[`onPan`,`onPanStart`,`onPanSessionStart`,`onPanEnd`],inView:[`whileInView`,`onViewportEnter`,`onViewportLeave`],layout:[`layout`,`layoutId`]},pc=!1;function mc(){if(pc)return;let e={};for(let t in fc)e[t]={isEnabled:e=>fc[t].some(t=>!!e[t])};Ia(e),pc=!0}function hc(){return mc(),La()}function gc(e){let t=hc();for(let n in e)t[n]={...t[n],...e[n]};Ia(t)}var _c=new Set(`animate.exit.variants.initial.style.values.variants.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.propagate.ignoreStrict.viewport`.split(`.`));function vc(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||_c.has(e)}var yc=e=>!vc(e);function bc(e){typeof e==`function`&&(yc=t=>t.startsWith(`on`)?!vc(t):e(t))}try{bc(t(`@emotion/is-prop-valid`).default)}catch{}function xc(e,t,n){let r={};for(let i in e)i===`values`&&typeof e.values==`object`||(yc(i)||n===!0&&vc(i)||!t&&!vc(i)||e.draggable&&i.startsWith(`onDrag`))&&(r[i]=e[i]);return r}var Sc=(0,w.createContext)({});function Cc(e,t){if(Da(e)){let{initial:t,animate:n}=e;return{initial:t===!1||wa(t)?t:void 0,animate:wa(n)?n:void 0}}return e.inherit===!1?{}:t}function wc(e){let{initial:t,animate:n}=Cc(e,(0,w.useContext)(Sc));return(0,w.useMemo)(()=>({initial:t,animate:n}),[Tc(t),Tc(n)])}function Tc(e){return Array.isArray(e)?e.join(` `):e}var Ec=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Dc(e,t,n){for(let r in t)!K(t[r])&&!ho(r,n)&&(e[r]=t[r])}function Oc({transformTemplate:e},t){return(0,w.useMemo)(()=>{let n=Ec();return co(n,t,e),Object.assign({},n.vars,n.style)},[t])}function kc(e,t){let n=e.style||{},r={};return Dc(r,n,e),Object.assign(r,Oc(e,t)),r}function Ac(e,t){let n={},r=kc(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.touchAction=e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}var jc=()=>({...Ec(),attrs:{}});function Mc(e,t,n,r){let i=(0,w.useMemo)(()=>{let n=jc();return Co(n,t,To(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};Dc(t,e.style,e),i.style={...t,...i.style}}return i}var Nc=[`animate`,`circle`,`defs`,`desc`,`ellipse`,`g`,`image`,`line`,`filter`,`marker`,`mask`,`metadata`,`path`,`pattern`,`polygon`,`polyline`,`rect`,`stop`,`switch`,`symbol`,`svg`,`text`,`tspan`,`use`,`view`];function Pc(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(Nc.indexOf(e)>-1||/[A-Z]/u.test(e))}function Fc(e,t,n,{latestValues:r},i,a=!1,o){let s=(o??Pc(e)?Mc:Ac)(t,r,i,e),c=xc(t,typeof e==`string`,a),l=e===w.Fragment?{}:{...c,...s,ref:n},{children:u}=t,d=(0,w.useMemo)(()=>K(u)?u.get():u,[u]);return(0,w.createElement)(e,{...l,children:d})}function Ic({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:Lc(n,r,i,e),renderState:t()}}function Lc(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=Ds(a[e]);let{initial:o,animate:s}=e,c=Da(e),l=Oa(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!Ca(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=Gr(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=u?t.length-1:0;t=t[e]}t!==null&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}var Rc=e=>(t,n)=>{let r=(0,w.useContext)(Sc),i=(0,w.useContext)(ue),a=()=>Ic(e,t,r,i);return n?a():se(a)},zc=Rc({scrapeMotionValuesFromProps:go,createRenderState:Ec}),Bc=Rc({scrapeMotionValuesFromProps:Do,createRenderState:jc}),Vc=Symbol.for(`motionComponentSymbol`);function Hc(e,t,n){let r=(0,w.useRef)(n);(0,w.useInsertionEffect)(()=>{r.current=n});let i=(0,w.useRef)(null);return(0,w.useCallback)(n=>{n&&e.onMount?.(n),t&&(n?t.mount(n):t.unmount());let a=r.current;if(typeof a==`function`){if(n){let e=a(n);typeof e==`function`&&(i.current=e)}else i.current?(i.current(),i.current=null):a(n)}else a&&(a.current=n)},[t])}var Uc=(0,w.createContext)({});function Wc(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function Gc(e,t,n,r,i,a){let{visualElement:o}=(0,w.useContext)(Sc),s=(0,w.useContext)(dc),c=(0,w.useContext)(ue),l=(0,w.useContext)(lc),u=l.reducedMotion,d=l.skipAnimations,f=(0,w.useRef)(null),p=(0,w.useRef)(!1);r||=s.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,skipAnimations:d,isSVG:a}),p.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));let m=f.current,h=(0,w.useContext)(Uc);m&&!m.projection&&i&&(m.type===`html`||m.type===`svg`)&&Kc(f.current,n,i,h);let g=(0,w.useRef)(!1);(0,w.useInsertionEffect)(()=>{m&&g.current&&m.update(n,c)});let _=n[ai],v=(0,w.useRef)(!!_&&!window.MotionHandoffIsComplete?.(_)&&window.MotionHasOptimisedAnimation?.(_));return le(()=>{p.current=!0,m&&(g.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),v.current&&m.animationState&&m.animationState.animateChanges())}),(0,w.useEffect)(()=>{m&&(!v.current&&m.animationState&&m.animationState.animateChanges(),v.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(_)}),!1),m.enteringChildren=void 0)}),m}function Kc(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:qc(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&Wc(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:u,layoutScroll:c,layoutRoot:l})}function qc(e){if(e)return e.options.allowProjection===!1?qc(e.parent):e.projection}function Jc(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&gc(r);let a=n?n===`svg`:Pc(e),o=a?Bc:zc;function s(n,s){let c,l={...(0,w.useContext)(lc),...n,layoutId:Yc(n)},{isStatic:u}=l,d=wc(n),f=o(n,u);if(!u&&ce){Xc(l,r);let t=Zc(l);c=t.MeasureLayout,d.visualElement=Gc(e,f,l,i,t.ProjectionNode,a)}return(0,T.jsxs)(Sc.Provider,{value:d,children:[c&&d.visualElement?(0,T.jsx)(c,{visualElement:d.visualElement,...l}):null,Fc(e,n,Hc(f,d.visualElement,s),f,u,t,a)]})}s.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let c=(0,w.forwardRef)(s);return c[Vc]=e,c}function Yc({layoutId:e}){let t=(0,w.useContext)(oe).id;return t&&e!==void 0?t+`-`+e:e}function Xc(e,t){(0,w.useContext)(dc).strict}function Zc(e){let{drag:t,layout:n}=hc();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function Qc(e,t){if(typeof Proxy>`u`)return Jc;let n=new Map,r=(n,r)=>Jc(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,Jc(a,void 0,e,t)),n.get(a))})}var $c=(e,t)=>t.isSVG??Pc(e)?new Oo(t):new vo(t,{allowProjection:e!==w.Fragment}),el=class extends Y{constructor(e){super(e),e.animationState||=Fo(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();Ca(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},tl=0,nl={animation:{Feature:el},exit:{Feature:class extends Y{constructor(){super(...arguments),this.id=tl++}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;let r=this.node.animationState.setActive(`exit`,!e);t&&!e&&r.then(()=>{t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function rl(e){return{point:{x:e.pageX,y:e.pageY}}}var il=e=>t=>Hi(t)&&e(t,rl(t));function al(e,t,n,r){return Cs(e,t,il(n),r)}var ol=({current:e})=>e?e.ownerDocument.defaultView:null,sl=(e,t)=>Math.abs(e-t);function cl(e,t){let n=sl(e.x,t.x),r=sl(e.y,t.y);return Math.sqrt(n**2+r**2)}var ll=new Set([`auto`,`scroll`]),ul=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let e=pl(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=cl(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=N;this.history.push({...r,timestamp:i});let{onStart:a,onMove:o}=this.handlers;t||(a&&a(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=dl(t,this.transformPagePoint),j.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=pl(e.type===`pointercancel`?this.lastMoveEventInfo:dl(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!Hi(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let s=dl(rl(e),this.transformPagePoint),{point:c}=s,{timestamp:l}=N;this.history=[{...c,timestamp:l}];let{onSessionStart:u}=t;u&&u(e,pl(s,this.history)),this.removeListeners=ve(al(this.contextWindow,`pointermove`,this.handlePointerMove),al(this.contextWindow,`pointerup`,this.handlePointerUp),al(this.contextWindow,`pointercancel`,this.handlePointerUp)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(ll.has(e.overflowX)||ll.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener(`scroll`,this.onElementScroll,{capture:!0,passive:!0}),window.addEventListener(`scroll`,this.onWindowScroll,{passive:!0}),this.removeScrollListeners=()=>{window.removeEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.removeEventListener(`scroll`,this.onWindowScroll)}}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i={x:r.x-t.x,y:r.y-t.y};i.x===0&&i.y===0||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,r),j.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),M(this.updatePoint)}};function dl(e,t){return t?{point:t(e.point)}:e}function fl(e,t){return{x:e.x-t.x,y:e.y-t.y}}function pl({point:e},t){return{point:e,delta:fl(e,hl(t)),offset:fl(e,ml(t)),velocity:gl(t,.1)}}function ml(e){return e[0]}function hl(e){return e[e.length-1]}function gl(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=hl(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>k(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>k(t)*2&&(r=e[1]);let a=A(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function _l(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?B(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?B(n,e,r.max):Math.min(e,n)),e}function vl(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function yl(e,{top:t,left:n,bottom:r,right:i}){return{x:vl(e.x,n,i),y:vl(e.y,t,r)}}function bl(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function xl(e,t){return{x:bl(e.x,t.x),y:bl(e.y,t.y)}}function Sl(e,t){let n=.5,r=Q(e),i=Q(t);return i>r?n=ye(t.min,t.max-r,e.min):r>i&&(n=ye(e.min,e.max-i,t.min)),E(0,1,n)}function Cl(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var wl=.35;function Tl(e=wl){return e===!1?e=0:e===!0&&(e=wl),{x:El(e,`left`,`right`),y:El(e,`top`,`bottom`)}}function El(e,t,n){return{min:Dl(e,t),max:Dl(e,n)}}function Dl(e,t){return typeof e==`number`?e:e[t]||0}var Ol=new WeakMap,kl=class{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=J(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){let{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;let i=e=>{t&&this.snapToCursor(rl(e).point),this.stopAnimation()},a=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Li(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),$(e=>{let t=this.getAxisMotionValue(e).get()||0;if(I.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=Q(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&j.update(()=>i(e,t),!1,!0),ri(this.visualElement,`transform`);let{animationState:a}=this.visualElement;a&&a.setActive(`whileDrag`,!0)},o=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;r&&this.currentDirection===null?(this.currentDirection=Nl(o),this.currentDirection!==null&&i&&i(this.currentDirection)):(this.updateAxis(`x`,t.point,o),this.updateAxis(`y`,t.point,o),this.visualElement.render(),a&&j.update(()=>a(e,t),!1,!0))},s=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:l}=this.getProps();this.panSession=new ul(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:ol(this.visualElement),element:this.visualElement.current})}stop(e,t){let n=e||this.latestPointerEvent,r=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;let{velocity:a}=r;this.startAnimation(a);let{onDragEnd:o}=this.getProps();o&&j.postRender(()=>o(n,r))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive(`whileDrag`,!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!Ml(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=_l(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&Wc(e)?this.constraints||=this.resolveRefConstraints():this.constraints=e&&n?yl(n.layoutBox,e):!1,this.elastic=Tl(t),r!==this.constraints&&!Wc(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&$(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=Cl(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Wc(e))return!1;let n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;let i=io(n,r.root,this.visualElement.getTransformPagePoint()),a=xl(r.layout.layoutBox,i);if(t){let e=t(Va(a));this.hasMutatedConstraints=!!e,e&&(a=Ba(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=$(o=>{if(!Ml(o,t,this.currentDirection))return;let c=s&&s[o]||{};a&&(c={min:0,max:0});let l=r?200:1e6,u=r?40:1e7,d={type:`inertia`,velocity:n?e[o]:0,bounceStiffness:l,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...c};return this.startAxisValueAnimation(o,d)});return Promise.all(c).then(o)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return ri(this.visualElement,e),n.start(Ur(e,n,0,t,this.visualElement,!1))}stopAnimation(){$(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps();return n[t]||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){$(t=>{let{drag:n}=this.getProps();if(!Ml(t,n,this.currentDirection))return;let{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){let{min:n,max:a}=r.layout.layoutBox[t],o=i.get()||0;i.set(e[t]-B(n,a,.5)+o)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Wc(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};$(e=>{let t=this.getAxisMotionValue(e);if(t&&this.constraints!==!1){let n=t.get();r[e]=Sl({min:n,max:n},this.constraints[e])}});let{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},``):`none`,n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),$(t=>{if(!Ml(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(B(i,a,r[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Ol.set(this.visualElement,this);let e=this.visualElement.current,t=al(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&Ki(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps();Wc(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||=jl(e,t.current,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),j.read(r);let o=Cs(window,`resize`,()=>this.scalePositionWithinConstraints()),s=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&($(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())}));return()=>{o(),t(),a(),s&&s(),n&&n()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=wl,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function Al(e){let t=!0;return()=>{t?t=!1:e()}}function jl(e,t,n){let r=ma(e,Al(n)),i=ma(t,Al(n));return()=>{r(),i()}}function Ml(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Nl(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var Pl=class extends Y{constructor(e){super(e),this.removeGroupControls=O,this.removeListeners=O,this.controls=new kl(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||O}update(){let{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},Fl=e=>(t,n)=>{e&&j.update(()=>e(t,n),!1,!0)},Il=class extends Y{constructor(){super(...arguments),this.removePointerDownListener=O}onPointerDown(e){this.session=new ul(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:ol(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:Fl(e),onStart:Fl(t),onMove:Fl(n),onEnd:(e,t)=>{delete this.session,r&&j.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=al(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},Ll=!1,Rl=class extends w.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),Ll&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),ks.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:a}=n;return a&&(a.isPresent=i,e.layoutDependency!==t&&a.setOptions({...a.options,layoutDependency:t}),Ll=!0,r||e.layoutDependency!==t||t===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||j.postRender(()=>{let e=a.getStack();(!e||!e.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){let{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Fi.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;Ll=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}};function zl(e){let[t,n]=uc(),r=(0,w.useContext)(oe);return(0,T.jsx)(Rl,{...e,layoutGroup:r,switchLayoutGroup:(0,w.useContext)(Uc),isPresent:t,safeToRemove:n})}var Bl={pan:{Feature:Il},drag:{Feature:Pl,ProjectionNode:cc,MeasureLayout:zl}};function Vl(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&j.postRender(()=>i(t,rl(t)))}var Hl=class extends Y{mount(){let{current:e}=this.node;e&&(this.unmount=Bi(e,(e,t)=>(Vl(this.node,t,`Start`),e=>Vl(this.node,e,`End`))))}unmount(){}},Ul=class extends Y{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!1),this.isActive=!1)}mount(){this.unmount=ve(Cs(this.node.current,`focus`,()=>this.onFocus()),Cs(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function Wl(e,t,n){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive(`whileTap`,n===`Start`);let i=r[`onTap`+(n===`End`?``:n)];i&&j.postRender(()=>i(t,rl(t)))}var Gl=class extends Y{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=$i(e,(e,t)=>(Wl(this.node,t,`Start`),(e,{success:t})=>Wl(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},Kl=new WeakMap,ql=new WeakMap,Jl=e=>{let t=Kl.get(e.target);t&&t(e)},Yl=e=>{e.forEach(Jl)};function Xl({root:e,...t}){let n=e||document;ql.has(n)||ql.set(n,{});let r=ql.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Yl,{root:e,...t})),r[i]}function Zl(e,t,n){let r=Xl(t);return Kl.set(e,n),r.observe(e),()=>{Kl.delete(e),r.unobserve(e)}}var Ql={some:0,all:1},$l=class extends Y{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:Ql[r]};return Zl(this.node.current,a,e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)})}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(eu(e,t))&&this.startObserver()}unmount(){}};function eu({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var tu={inView:{Feature:$l},tap:{Feature:Gl},focus:{Feature:Ul},hover:{Feature:Hl}},nu={layout:{ProjectionNode:cc,MeasureLayout:zl}},ru=Qc({...nl,...tu,...Bl,...nu},$c);function iu(e){let t=se(()=>G(e)),{isStatic:n}=(0,w.useContext)(lc);if(n){let[,n]=(0,w.useState)(e);(0,w.useEffect)(()=>t.on(`change`,n),[])}return t}function au(e,t){let n=iu(t()),r=()=>n.set(t());return r(),le(()=>{let t=()=>j.preRender(r,!1,!0),n=e.map(e=>e.on(`change`,t));return()=>{n.forEach(e=>e()),M(r)}}),n}function ou(e,...t){let n=e.length;function r(){let r=``;for(let i=0;i<n;i++){r+=e[i];let n=t[i];n&&(r+=K(n)?n.get():n)}return r}return au(t.filter(K),r)}function su(e){Xr.current=[],e();let t=au(Xr.current,e);return Xr.current=void 0,t}function cu(e,t,n,r){if(typeof e==`function`)return su(e);if(n!==void 0&&!Array.isArray(n)&&typeof t!=`function`)return uu(e,t,n,r);let i=typeof t==`function`?t:ga(t,n,r),a=Array.isArray(e)?lu(e,i):lu([e],([e])=>i(e)),o=Array.isArray(e)?void 0:e.accelerate;return o&&!o.isTransformed&&typeof t!=`function`&&Array.isArray(n)&&r?.clamp!==!1&&(a.accelerate={...o,times:t,keyframes:n,isTransformed:!0}),a}function lu(e,t){let n=se(()=>[]);return au(e,()=>{n.length=0;let r=e.length;for(let t=0;t<r;t++)n[t]=e[t].get();return t(n)})}function uu(e,t,n,r){let i=se(()=>Object.keys(n)),a=se(()=>({}));for(let o of i)a[o]=cu(e,t,n[o],r);return a}var du=2;function fu({x1:e,y1:t,x2:n,y2:r},{cornerRadius:i=8,midOffset:a=32,arrowheadOffset:o=8,isBottom:s=!1,single:c=!1,orientation:l=`vertical`}={}){let u=Math.min(i,Math.abs(l===`horizontal`?(r-t)/2:(n-e)/2));if(l===`horizontal`){if(Math.abs(r-t)<=du)return`M ${e} ${t} L ${n-o} ${r}`;let i=c||s?n-a:e+a,l=n>e?1:-1,d=r>t?1:-1,f=i-l*u,p=t+d*u,m=r-d*u,h=i+l*u,g=n-l*o,_=[`L ${f} ${t}`,`Q ${i} ${t} ${i} ${p}`,c?`L ${i} ${m} Q ${i} ${r} ${h} ${r}`:`L ${i} ${r}`],v=[c?`L ${f} ${t} Q ${i} ${t} ${i} ${p}`:`L ${i} ${t}`,`L ${i} ${m}`,`Q ${i} ${r} ${h} ${r}`];return[`M ${e} ${t}`,s?[..._]:[...v],`L ${g} ${r}`].join(` `)}if(Math.abs(n-e)<=du)return`M ${e} ${t} L ${n} ${r-o}`;let d=c||s?r-a:t+a,f=n>e?1:-1,p=r>t?1:-1,m=d-u,h=e+f*u,g=n-f*u,_=d+u,v=r-p*o,y=[`L ${e} ${m}`,`Q ${e} ${d} ${h} ${d}`,`L ${n} ${d}`],b=[`L ${e} ${d}`,`L ${g} ${d}`,`Q ${n} ${d} ${n} ${_}`];return[`M ${e} ${t}`,s?[...y]:[...b],`L ${n} ${v}`].join(` `)}var pu=(0,w.forwardRef)(function({connectors:e,children:t,...n},r){let i=(0,w.useId)();return(0,T.jsxs)(`svg`,{width:`100%`,height:`100%`,"aria-hidden":`true`,className:`text-kumo-inactive overflow-visible`,ref:r,children:[(0,T.jsx)(`defs`,{children:(0,T.jsx)(`marker`,{id:i,markerWidth:`8`,markerHeight:`8`,refX:`0`,refY:`4`,orient:`auto`,markerUnits:`userSpaceOnUse`,children:(0,T.jsx)(`path`,{d:`M 0,1.5 Q 0,0 1.5,0 Q 3.5,1 5.8,3.2 Q 6.5,4 5.8,4.8 Q 3.5,7 1.5,8 Q 0,8 0,6.5 Z`,fill:`currentColor`,stroke:`none`})})}),[...e].sort((e,t)=>e.disabled&&!t.disabled?-1:!e.disabled&&t.disabled?1:0).map((e,t)=>{let r=fu(e,{isBottom:e.isBottom,single:e.single,...n}),a=e.fromId&&e.toId?`${e.fromId}-${e.toId}`:`path-${t}`;return(0,T.jsx)(`g`,{className:e.disabled?`opacity-40`:void 0,children:(0,T.jsx)(`path`,{d:r,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,markerEnd:`url(#${i})`,"data-index":t,"data-testid":a})},a)}),t]})}),mu=(0,w.createContext)(null);function hu(){let[e,t]=(0,w.useState)([]),n=(0,w.useRef)(new Map),[r,i]=(0,w.useState)(0),a=(0,w.useRef)(0),o=(0,w.useRef)(new Map);a.current=0,o.current.clear();let s=(0,w.useCallback)(e=>(o.current.has(e)||o.current.set(e,a.current++),o.current.get(e)),[]),c=(0,w.useCallback)(()=>{i(e=>e+1)},[]),l=(0,w.useCallback)((e,r,a={})=>{let o=!n.current.has(e),s={id:e,props:a,renderOrder:r};n.current.set(e,s);let c=Array.from(n.current.values()).sort((e,t)=>e.renderOrder-t.renderOrder);return t(c),o&&i(e=>e+1),{unregister:()=>{n.current.delete(e);let r=Array.from(n.current.values()).sort((e,t)=>e.renderOrder-t.renderOrder);t(r),i(e=>e+1)}}},[]);return(0,w.useMemo)(()=>({register:l,descendants:e,claimRenderOrder:s,measurementEpoch:r,notifySizeChange:c}),[l,e,s,r,c])}function gu({value:e,children:t}){return(0,T.jsx)(mu.Provider,{value:e,children:t})}function _u(){let e=(0,w.useContext)(mu);if(!e)throw Error(`useDescendantsContext must be used within DescendantsProvider`);return e}function vu(){return(0,w.useContext)(mu)}function yu(e,t){let n=_u(),r=(0,w.useId)(),i=t??r,a=n.claimRenderOrder(i),o=(0,w.useRef)(null),s=(0,w.useRef)(n.register);s.current=n.register,(0,w.useEffect)(()=>{let{unregister:t}=s.current(i,a,e);return o.current||=t,()=>{o.current&&=(o.current(),null)}},[i,a,e]);let c=(0,w.useMemo)(()=>n.descendants.findIndex(e=>e.id===i),[n.descendants,i]);return{index:c,id:i,getPrevious:(0,w.useCallback)(()=>{if(!(c<=0))return n.descendants[c-1]},[n.descendants,c]),getNext:(0,w.useCallback)(()=>{if(!(c<0||c>=n.descendants.length-1))return n.descendants[c+1]},[n.descendants,c])}}var bu={y:64,x:16};function xu(e){return e instanceof Element&&e.closest(`[data-node-id]`)!==null}var Su=10,Cu=(0,w.createContext)(null);function wu(){let e=(0,w.useContext)(Cu);if(e===null)throw Error(`useDiagramContext must be used within a FlowDiagram`);return e}function Tu({orientation:e=`horizontal`,align:t=`start`,canvas:n=!0,padding:r,onOverflowChange:i,className:a,children:s}){let c=(0,w.useRef)(null),l=(0,w.useRef)(null),u={x:r?.x??bu.x,y:r?.y??bu.y},d=iu(0),f=iu(0),[p,m]=(0,w.useState)(null),[h,g]=(0,w.useState)(null),[_,v]=(0,w.useState)(!1),[y,b]=(0,w.useState)(!1);(0,w.useEffect)(()=>{if(!n||!c.current||!l.current)return;let e=()=>{if(!c.current||!l.current)return;let e=c.current.getBoundingClientRect(),t=l.current.getBoundingClientRect(),n=e.width-u.x*2,r=e.height-u.y*2;m({x:Math.min(0,n-t.width),y:Math.min(0,r-t.height)}),g({viewportWidth:n,viewportHeight:r,contentWidth:t.width,contentHeight:t.height});let a=t.width>n,o=t.height>r;b(a||o),i?.({x:a,y:o})};e();let t=new ResizeObserver(e);return t.observe(c.current),t.observe(l.current),()=>t.disconnect()},[u.x,u.y,n,i]),(0,w.useEffect)(()=>{n&&p&&(d.get()<p.x&&d.set(p.x),f.get()<p.y&&f.set(p.y))},[p,d,f,n]),(0,w.useEffect)(()=>{if(n)return()=>{document.body.style.cursor=``,document.body.style.userSelect=``}},[n]),(0,w.useEffect)(()=>{if(!n)return;let e=c.current;if(!e)return;let t=e=>{if(!p)return;let t=p.x<0,n=p.y<0;if(t||n){if(e.preventDefault(),n){let t=Math.max(p.y,Math.min(0,f.get()-e.deltaY));f.set(t)}if(t){let t=Math.max(p.x,Math.min(0,d.get()-e.deltaX));d.set(t)}}};return e.addEventListener(`wheel`,t,{passive:!1}),()=>e.removeEventListener(`wheel`,t)},[n,p,d,f]);let x=e=>{xu(e.target)||(v(!0),document.body.style.cursor=`grabbing`,document.body.style.userSelect=`none`)},S=(e,t)=>{!p||!_||(d.set(Math.max(p.x,Math.min(0,d.get()+t.delta.x))),f.set(Math.max(p.y,Math.min(0,f.get()+t.delta.y))))},C=()=>{_&&(v(!1),document.body.style.cursor=``,document.body.style.userSelect=``)},ee=p&&p.x<0,te=p&&p.y<0,ne=h&&h.contentWidth>0&&h.viewportWidth>0?Math.max(Su,h.viewportWidth/h.contentWidth*100):0,re=h&&h.contentHeight>0&&h.viewportHeight>0?Math.max(Su,h.viewportHeight/h.contentHeight*100):0,ie=cu(d,[0,p?.x??0],[0,100-ne]),ae=ou`${cu(f,[0,p?.y??0],[0,100-re])}%`,oe=ou`${ie}%`,se=(0,w.useMemo)(()=>({orientation:e,align:t,x:d,y:f,wrapperRef:c}),[e,t,d,f]);return(0,T.jsx)(Cu.Provider,{value:se,children:(0,T.jsxs)(ru.div,{ref:c,className:o(`relative overflow-hidden grow isolate group`,a),style:{paddingTop:u.y,paddingBottom:u.y,paddingLeft:u.x,paddingRight:u.x,cursor:y&&!_?`grab`:void 0},onPanStart:x,onPan:S,onPanEnd:C,children:[(0,T.jsx)(ru.div,{"data-testid":`flow-contents`,ref:l,className:`w-max mx-auto`,style:{x:d,y:f},children:(0,T.jsx)(Au,{children:s})}),te&&(0,T.jsx)(`div`,{className:`absolute right-1 top-1 bottom-1 w-1.5 rounded-full bg-kumo-line/50 opacity-0 group-hover:opacity-100`,children:(0,T.jsx)(ru.div,{className:`absolute w-full rounded-full bg-kumo-fill`,style:{height:`${re}%`,top:ae}})}),ee&&(0,T.jsx)(`div`,{className:`absolute bottom-1 left-1 right-1 h-1.5 rounded-full bg-kumo-line/50 opacity-0 group-hover:opacity-100`,children:(0,T.jsx)(ru.div,{className:`absolute h-full rounded-full bg-kumo-fill`,style:{width:`${ne}%`,left:oe}})})]})})}var Eu=()=>hu(),Du=(e,t)=>yu(e,t),Ou=e=>{let t=vu(),n=(0,w.useId)(),r=t?.claimRenderOrder(n)??-1,i=(0,w.useRef)(null);return(0,w.useEffect)(()=>{if(!t?.register)return;let{unregister:a}=t.register(n,r,e);return i.current||=a,()=>{i.current&&=(i.current(),null)}},[n,r,e,t?.register]),t?{index:t.descendants.findIndex(e=>e.id===n),id:n}:null},ku=(e,{type:t=`start`})=>e?e.props[t]??null:null;function Au({children:e}){let{orientation:t,align:n}=wu(),r=Eu(),i=(0,w.useRef)(null),[a,s]=(0,w.useState)([]),c=(0,w.useCallback)(()=>{let e=[],t=r.descendants,n=i.current?.getBoundingClientRect(),a=n?.left??0,o=n?.top??0;for(let n=0;n<t.length-1;n++){let r=t[n],i=t[n+1];if(r.props?.parallel||i.props?.parallel)continue;let s=ku(r,{type:`start`}),c=ku(i,{type:`end`});if(s&&c){let t=r.props.disabled||i.props.disabled;e.push({x1:s.left-a+s.width,y1:s.top-o+s.height/2,x2:c.left-a,y2:c.top-o+c.height/2,disabled:t,single:!0,fromId:r.id,toId:i.id})}}s(e)},[r.descendants]);(0,w.useLayoutEffect)(()=>{c()},[c]),(0,w.useEffect)(()=>(window.addEventListener(`scroll`,c,{capture:!0,passive:!0}),window.addEventListener(`resize`,c,{passive:!0}),()=>{window.removeEventListener(`scroll`,c,{capture:!0}),window.removeEventListener(`resize`,c)}),[c]);let l=r.descendants[0],u=r.descendants[r.descendants.length-1],d=l?.props?.end??null,f=u?.props?.start??null;return Ou((0,w.useMemo)(()=>({parallel:!1,disabled:!1,start:f,end:d}),[JSON.stringify(f),JSON.stringify(d)])),(0,T.jsx)(gu,{value:r,children:(0,T.jsxs)(`div`,{className:`relative`,ref:i,children:[(0,T.jsx)(`ul`,{className:o(`ml-0 list-none`,t===`vertical`?`grid auto-rows-min gap-16`:`flex gap-16`,t===`horizontal`&&(n===`center`?`items-center`:`items-start`)),children:e}),(0,T.jsx)(`div`,{className:`absolute inset-0 pointer-events-none`,children:(0,T.jsx)(pu,{connectors:a,orientation:t})})]})})}function ju(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}var Mu=(0,w.forwardRef)(function({id:e,render:t,children:n,disabled:r=!1},i){let a=(0,w.useRef)(null),o=(0,w.useRef)(null),s=(0,w.useRef)(null),[c,l]=(0,w.useState)({start:null,end:null}),{measurementEpoch:u,notifySizeChange:d}=_u(),f=(0,w.useCallback)(()=>{if(!a.current)return;let e=a.current.getBoundingClientRect(),t=e,n=e;o.current&&(t=o.current.getBoundingClientRect()),s.current&&(n=s.current.getBoundingClientRect()),l(e=>{let r={start:t,end:n};return JSON.stringify(e)===JSON.stringify(r)?e:r})},[]),{index:p,id:m}=Du((0,w.useMemo)(()=>({parallel:!1,disabled:r,...c}),[c,r]),e);(0,w.useLayoutEffect)(()=>{if(!a.current)return;let e=new ResizeObserver(()=>{f(),d()});return e.observe(a.current),()=>e.disconnect()},[f,d]),(0,w.useLayoutEffect)(()=>{f()},[u,f]),(0,w.useEffect)(()=>{let e=()=>{f(),d()};return window.addEventListener(`scroll`,e,{capture:!0,passive:!0}),window.addEventListener(`resize`,e,{passive:!0}),()=>{window.removeEventListener(`scroll`,e,{capture:!0}),window.removeEventListener(`resize`,e)}},[f,d]);let h=ju(i,a),g;if(t&&(0,w.isValidElement)(t)){let e=t.props;g=(0,w.cloneElement)(t,{ref:h,"data-node-index":p,"data-node-id":m,"data-testid":e[`data-testid`]??m,style:{cursor:`default`,...e.style},children:e.children??n})}else g=(0,T.jsx)(`li`,{ref:h,className:`py-2 px-3 rounded-md shadow bg-kumo-base ring ring-kumo-line`,style:{cursor:`default`},"data-node-index":p,"data-node-id":m,"data-testid":m,children:n});return(0,T.jsx)(Nu.Provider,{value:(0,w.useMemo)(()=>({registerStartAnchor:e=>{o.current=e},registerEndAnchor:e=>{s.current=e}}),[]),children:g})});Mu.displayName=`Flow.Node`;var Nu=(0,w.createContext)(null),Pu=(0,w.forwardRef)(function({type:e,render:t,children:n},r){let i=(0,w.useContext)(Nu),a=(0,w.useRef)(null);if(!i)throw Error(`Flow.Anchor must be used within Flow.Node`);(0,w.useEffect)(()=>{if(a.current)return(e===`start`||e===void 0)&&i.registerStartAnchor(a.current),(e===`end`||e===void 0)&&i.registerEndAnchor(a.current),()=>{(e===`start`||e===void 0)&&i.registerStartAnchor(null),(e===`end`||e===void 0)&&i.registerEndAnchor(null)}},[e,i.registerStartAnchor,i.registerEndAnchor]);let o=ju(r,a);if(t&&(0,w.isValidElement)(t)){let e=t.props;return(0,w.cloneElement)(t,{ref:o,children:e.children??n})}return(0,T.jsx)(`div`,{ref:o,children:n})});Pu.displayName=`Flow.Anchor`;function Fu({container:e,previous:t,next:n,orientation:r}){if(r===`vertical`)return{start:{x:e.width/2,y:0},end:{x:e.width/2,y:e.height}};let i={x:0,y:e.height/2},a={x:e.width,y:e.height/2};return t&&(i.y=t.top-e.top+t.height/2),n&&(a.y=n.top-e.top+n.height/2),{start:i,end:a}}function Iu({children:e,align:t=`start`}){let{orientation:n}=wu(),r=Eu(),{measurementEpoch:i,notifySizeChange:a}=_u(),s=(0,w.useRef)(null),c=(0,w.useRef)(null),[l,u]=(0,w.useState)(null),d=r.descendants[0],f=d?.props?.end??l,p=d?.props?.start??l,{index:m,getPrevious:h,getNext:g}=Du((0,w.useMemo)(()=>({parallel:!0,start:p,end:f}),[JSON.stringify(p),JSON.stringify(f)])),_=(0,w.useCallback)(()=>{if(!c.current)return;let e=c.current.getBoundingClientRect();u(t=>JSON.stringify(t)===JSON.stringify(e)?t:e)},[]);(0,w.useLayoutEffect)(()=>{if(!c.current)return;let e=new ResizeObserver(()=>{_(),a()});return e.observe(c.current),()=>e.disconnect()},[_,a]),(0,w.useLayoutEffect)(()=>{_()},[i,_]),(0,w.useEffect)(()=>{let e=()=>{_(),a()};return window.addEventListener(`scroll`,e,{capture:!0,passive:!0}),window.addEventListener(`resize`,e,{passive:!0}),()=>{window.removeEventListener(`scroll`,e,{capture:!0}),window.removeEventListener(`resize`,e)}},[_,a]);let[v,y]=(0,w.useState)(null),b=(0,w.useCallback)(()=>{let e=s.current;if(!e)return;let t=e.getBoundingClientRect(),[i,a]=[h(),g()],o=ku(i,{type:`start`}),c=ku(a,{type:`end`}),{start:l,end:u}=Fu({container:t,previous:o,next:c,orientation:n}),d=[],f=[];for(let e of r.descendants){let{props:r}=e,[i,a]=[r.end,r.start];if(o&&i){let e=n===`horizontal`?i.top-t.top+i.height/2:i.left-t.left+i.width/2;d.push({y:e})}if(c&&a){let e=n===`horizontal`?a.top-t.top+a.height/2:a.left-t.left+a.width/2;f.push({y:e})}}let p=d.length<=1?!1:[d.some(e=>e.y<l.y-2),d.some(e=>e.y>l.y+2),d.some(e=>Math.abs(e.y-l.y)<=2)].filter(Boolean).length>1,m=f.length<=1?!1:[f.some(e=>e.y<u.y-2),f.some(e=>e.y>u.y+2),f.some(e=>Math.abs(e.y-u.y)<=2)].filter(Boolean).length>1,_=r.descendants.flatMap(e=>{let{props:r}=e,s=[],[d,f]=[r.end,r.start],h=r.disabled;if(o&&d){let r;switch(n){case`vertical`:r={x:d.left-t.left+d.width/2,y:d.top-t.top};break;case`horizontal`:{let e=d.top-t.top+d.height/2;r={x:d.left-t.left,y:e};break}default:throw Error(`Unknown orientation: ${n}`)}s.push({x1:l.x,y1:l.y,x2:r.x,y2:r.y,isBottom:!1,disabled:i?.props.disabled||h,single:!p,fromId:i?.id,toId:e.id})}if(c&&f){let r;switch(n){case`vertical`:r={x:f.left-t.left+f.width/2,y:f.bottom-t.top};break;case`horizontal`:{let e=f.top-t.top+f.height/2;r={x:f.right-t.left,y:e};break}default:throw Error(`Unknown orientation: ${n}`)}s.push({x1:r.x,y1:r.y,x2:u.x,y2:u.y,isBottom:!0,disabled:h||a?.props.disabled,single:!m,fromId:e.id,toId:a?.id})}return s});y({connectors:_,junctions:{start:o&&p?{x:n===`vertical`?l.x:l.x+32,y:n===`vertical`?l.y+32:l.y}:void 0,end:c&&m?{x:n===`vertical`?u.x:u.x-32,y:n===`vertical`?u.y-32:u.y}:void 0},containerRect:t})},[s,h,g,n,r.descendants]);(0,w.useLayoutEffect)(()=>{b()},[b]),(0,w.useEffect)(()=>{let e=()=>b();return window.addEventListener(`scroll`,e,{capture:!0,passive:!0}),window.addEventListener(`resize`,e,{passive:!0}),()=>{window.removeEventListener(`scroll`,e,{capture:!0}),window.removeEventListener(`resize`,e)}},[b]);let x=h()?.props?.parallel===!0;return(0,T.jsxs)(`div`,{ref:s,className:o(`relative isolate`,n===`horizontal`?`px-16 -mr-16`:`py-16 -mb-16`,n===`horizontal`?x?`-ml-3`:`-ml-16`:x?`-mt-3`:`-mt-16`),"data-node-index":m,children:[(0,T.jsx)(`div`,{className:`absolute inset-0 pointer-events-none z-1`,children:v&&(0,T.jsxs)(pu,{connectors:v.connectors,orientation:n,children:[v.junctions?.start&&(0,T.jsx)(`g`,{transform:`translate(${v.junctions.start.x} ${v.junctions.start.y})`,children:(0,T.jsx)(Lu,{})}),v.junctions?.end&&(0,T.jsx)(`g`,{transform:`translate(${v.junctions.end.x} ${v.junctions.end.y})`,children:(0,T.jsx)(Lu,{})})]})}),(0,T.jsx)(`ul`,{className:o(`gap-5 list-none flex`,t===`start`?`items-start`:`items-end`,n===`horizontal`?`flex-col ml-0`:`gap-5 w-fit mx-auto`),ref:c,children:(0,T.jsx)(gu,{value:r,children:e})})]})}function Lu({size:e=6}){let t=e/2;return(0,T.jsx)(`rect`,{x:-t,y:-t,width:e,height:e,fill:`currentColor`,rx:`1`})}var Ru=Object.assign(Tu,{Node:Mu,Parallel:Iu,List:Au,Anchor:Pu});function zu(e){return e.outcome===`exception`&&!e.events.some(({type:e})=>e===`unhandled`)}function Bu(){return(0,T.jsxs)(`div`,{className:`flex items-start gap-2 rounded-lg border border-kumo-danger/20 bg-kumo-danger/8 px-3 py-2.5 text-sm text-kumo-default`,role:`alert`,children:[(0,T.jsx)(`span`,{className:`flex h-lh shrink-0 items-center`,children:(0,T.jsx)(d,{className:`text-kumo-danger`,size:16})}),(0,T.jsx)(`p`,{children:`The Worker’s email() handler threw an exception while processing this message. See the development log for error details.`})]})}var Vu=new Set([`from`,`message-id`,`subject`,`to`]);function Hu({headers:e}){let t=(e??[]).filter(([e])=>!Vu.has(e.toLowerCase())),n=t.length;return(0,T.jsx)(s.Root,{children:(0,T.jsx)(s.Item,{value:`email-headers`,children:(0,T.jsxs)(y,{children:[(0,T.jsx)(y.Secondary,{className:`p-0`,children:(0,T.jsx)(s.Header,{className:`w-full`,children:(0,T.jsxs)(s.Trigger,{className:`group focus-visible:ring-kumo-ring flex w-full cursor-pointer items-center justify-between gap-3 px-4 py-4 text-left focus:outline-none focus-visible:ring-2 focus-visible:ring-inset`,children:[(0,T.jsx)(`span`,{children:`Email headers`}),(0,T.jsxs)(`span`,{className:`flex items-center gap-2 text-sm font-normal text-kumo-subtle`,children:[n,` `,n===1?`header`:`headers`,(0,T.jsx)(l,{className:`transition-transform group-data-[panel-open]:rotate-180`,size:16})]})]})})}),(0,T.jsx)(s.Panel,{"data-testid":`received-email-headers-panel`,children:(0,T.jsx)(y.Primary,{children:t.length>0?(0,T.jsx)(`dl`,{className:`divide-y divide-kumo-line text-sm`,children:t.map(([e,t],n)=>(0,T.jsxs)(`div`,{className:`grid gap-1 py-3 first:pt-0 last:pb-0 sm:grid-cols-[minmax(0,1fr)_minmax(0,2fr)] sm:gap-4`,children:[(0,T.jsx)(`dt`,{className:`font-medium break-words text-kumo-default`,children:e}),(0,T.jsx)(`dd`,{className:`break-words whitespace-pre-wrap text-kumo-subtle`,children:t})]},`${e}-${n}`))}):(0,T.jsx)(`p`,{className:`text-sm text-kumo-subtle`,children:`No additional email headers were captured.`})})})]})})})}var Uu=({label:e,children:t,className:n})=>(0,T.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1 ${n??``}`,children:[(0,T.jsx)(`span`,{className:`text-sm font-medium text-kumo-subtle`,children:e}),(0,T.jsx)(`div`,{className:`text-sm break-words text-kumo-default`,children:t})]});function Wu({message:e}){return(0,T.jsxs)(y,{children:[(0,T.jsx)(y.Secondary,{children:`Message`}),(0,T.jsx)(y.Primary,{children:(0,T.jsxs)(`div`,{className:`grid grid-cols-1 gap-5 sm:grid-cols-2`,children:[(0,T.jsx)(Uu,{label:`Subject`,className:`sm:col-span-2`,children:e.subject||`—`}),e.messageId?(0,T.jsx)(Uu,{label:`Message ID`,className:`sm:col-span-2`,children:(0,T.jsx)(f,{text:v(e.messageId)})}):null,(0,T.jsx)(Uu,{label:`From`,children:(0,T.jsx)(x,{variant:`outline`,children:m(e.from)||`—`})}),(0,T.jsx)(Uu,{label:`To`,children:(0,T.jsx)(x,{variant:`outline`,children:e.to||`—`})}),(0,T.jsx)(Uu,{label:`Received`,children:C(e.receivedAt)}),(0,T.jsx)(Uu,{label:`Size`,children:b(e.rawSize)}),e.attachments.length>0?(0,T.jsx)(Uu,{label:`Attachments`,className:`sm:col-span-2`,children:(0,T.jsx)(`div`,{className:`flex flex-col gap-1.5`,children:e.attachments.map((e,t)=>(0,T.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,T.jsx)(u,{className:`shrink-0 text-kumo-subtle`,size:14}),(0,T.jsx)(`span`,{className:`truncate text-sm text-kumo-default`,children:e.filename}),(0,T.jsx)(`span`,{className:`shrink-0 text-sm text-kumo-subtle`,children:e.contentType}),(0,T.jsx)(`span`,{className:`ml-auto shrink-0 text-sm text-kumo-subtle`,children:b(e.size)})]},`${e.filename}-${t}`))})}):null]})})]})}var Gu={received:{icon:h,label:`Received`,color:`text-kumo-success`},forward:{icon:ie,label:`Forwarded`,color:`text-kumo-link`},reply:{icon:re,label:`Replied`,color:`text-kumo-link`},reject:{icon:ae,label:`Rejected`,color:`text-kumo-danger`},unhandled:{icon:d,label:`Unhandled (Worker has no email() handler)`,color:`text-kumo-danger`}};function Ku({type:e}){let t=Gu[e],n=t.icon;return(0,T.jsx)(n,{size:16,className:t.color})}var qu=({label:e,children:t})=>(0,T.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,T.jsx)(`span`,{className:`text-sm font-medium text-kumo-subtle`,children:e}),(0,T.jsx)(`span`,{className:`text-sm break-words text-kumo-default`,children:t})]});function Ju({event:e}){let[t,n]=(0,w.useState)(!1),r=Gu[e.type],{forward:i,reply:a,rejectReason:s}=e,u=i?.headers??[],d=i!==void 0&&(i.recipient.length>0||u.length>0),f=a!==void 0,p=s!==void 0&&s.length>0,h=d||f||p;return(0,T.jsx)(Ru.Node,{render:(0,T.jsxs)(`li`,{"data-testid":`log-detail-event-node`,"data-event-type":e.type,"data-open":t||void 0,className:`max-w-[420px] min-w-[280px] list-none rounded-lg bg-kumo-base shadow-sm ring ring-kumo-hairline`,children:[(0,T.jsx)(Ru.Anchor,{render:(0,T.jsxs)(`div`,{className:`flex min-h-12 items-start gap-3 px-4 py-2`,children:[(0,T.jsx)(`span`,{className:`flex h-lh shrink-0 items-center`,children:(0,T.jsx)(Ku,{type:e.type})}),(0,T.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,T.jsx)(`span`,{className:`truncate text-sm font-medium text-kumo-default`,children:r.label}),(0,T.jsx)(`span`,{className:`text-sm text-kumo-subtle`,children:C(e.timestamp)})]}),h&&(0,T.jsx)(c,{variant:`ghost`,size:`sm`,onClick:()=>n(e=>!e),"aria-expanded":t,"aria-label":t?`Collapse event details`:`Expand event details`,children:(0,T.jsx)(l,{size:16,className:o(`transition-transform`,t&&`rotate-180`)})})]})}),t&&(0,T.jsxs)(`div`,{"data-testid":`log-detail-event-body`,children:[(d||p)&&(0,T.jsxs)(`div`,{className:`grid grid-cols-2 gap-4 border-t border-kumo-line px-4 py-3`,children:[i&&(0,T.jsx)(qu,{label:`Recipient`,children:i.recipient}),u.map(([e,t],n)=>(0,T.jsx)(qu,{label:e??``,children:t??``},`${e}-${n}`)),s&&(0,T.jsx)(qu,{label:`Reason`,children:s})]}),a&&(0,T.jsxs)(`div`,{className:`grid grid-cols-2 gap-4 border-t border-kumo-line px-4 py-3`,children:[(0,T.jsx)(qu,{label:`From`,children:m(a.sender)}),(0,T.jsx)(qu,{label:`Message-ID`,children:v(a.messageId)})]}),a?.raw&&(0,T.jsx)(`pre`,{className:`max-h-[40vh] overflow-auto border-t border-kumo-line bg-kumo-elevated px-4 py-3 font-mono text-sm whitespace-pre-wrap text-kumo-default`,children:a.raw})]})]})})}function Yu({message:e}){let[t]=e.recipients.filter(e=>e.events.length>0);return t===void 0?(0,T.jsxs)(y,{children:[(0,T.jsx)(y.Secondary,{children:`Lifecycle`}),(0,T.jsx)(y.Primary,{children:(0,T.jsx)(`div`,{className:`text-center text-sm text-kumo-subtle`,children:`Message not found`})})]}):(0,T.jsxs)(y,{children:[(0,T.jsx)(y.Secondary,{children:`Lifecycle`}),(0,T.jsx)(y.Primary,{className:`p-0`,children:(0,T.jsx)(`div`,{className:`rounded-b-lg bg-[radial-gradient(var(--color-kumo-subtle)_1px,transparent_1px)] bg-size-[16px_16px] px-4 py-3`,children:(0,T.jsx)(Ru,{children:t.events.map(e=>(0,T.jsx)(Ju,{event:e},e.id))})})})]})}function Xu(e,t){let n=e.events.map((n,r)=>({id:`${t}-${r}`,type:n.type,timestamp:n.timestamp,forward:n.type===`forward`?e.forwards.find(e=>e.messageId===n.messageId):void 0,reply:n.type===`reply`?e.replies.find(e=>e.messageId===n.messageId):void 0,rejectReason:n.type===`reject`?e.rejectReason:void 0}));return{id:t,from:e.from,to:e.to,subject:e.subject,messageId:e.messageId,receivedAt:e.receivedAt,rawSize:e.rawSize,attachments:e.attachments,recipients:[{envelopeTos:e.to,events:n}]}}function Zu(){let{email:e,replyTruncated:t,truncated:n}=_.useLoaderData(),{captureId:r}=_.useParams(),a=Xu(e,r),o=zu(e);return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(p,{icon:h,items:[(0,T.jsx)(i,{className:`text-kumo-link hover:underline`,search:e=>e,to:`/email/routing`,children:`Routing`},`routing`),(0,T.jsx)(`span`,{className:`truncate`,children:e.subject||`(no subject)`},`subject`)],title:`Email`}),(0,T.jsxs)(`div`,{className:`space-y-6 px-8 py-6`,children:[o||t?(0,T.jsxs)(`div`,{className:`space-y-2`,children:[o?(0,T.jsx)(Bu,{}):null,t?(0,T.jsx)(g,{kind:`reply`}):null]}):null,(0,T.jsx)(Yu,{message:a}),(0,T.jsx)(Wu,{message:a}),(0,T.jsx)(Hu,{headers:e.headerEntries??Object.entries(e.headers??{})}),(0,T.jsx)(S,{html:e.html,kind:`received`,previewTitle:`Rendered received HTML email body`,raw:e.raw,rawBase64:e.rawBase64,text:e.text,truncated:n})]})]})}export{Zu as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./ResourceError-DNadec0F.js";var t=e;export{t as errorComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Et as e}from"./index-BHW_FKpE.js";var t=e;export{t as notFoundComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,n as t,t as n}from"./react-BZY8YNV6.js";import{t as r}from"./link-DadJAPnd.js";import{$ as i,It as a,Vt as o,t as s}from"./link-provider-mn2voeohon7cj9o4-CNosc_Ni.js";import{r as c}from"./button-cdxnqcgzwko8ooha-CjoTKpgy.js";import{t as l}from"./label-latndvb1ngem7we8-mWoel0Kk.js";import{t as u}from"./table-inweecadl3her7pd-UWLv9e8D.js";import{t as d}from"./Breadcrumbs-BlzUUgNz.js";import{Dt as f,m as p,mn as m,wt as h}from"./index-BHW_FKpE.js";var g=t(),_=e(n(),1),v=e=>(0,g.jsxs)(`svg`,{width:`1em`,height:`1em`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,className:`link-external-icon`,...e,children:[(0,g.jsx)(`path`,{d:`M9 4H8.8C7.11984 4 6.27976 4 5.63803 4.32698C5.07354 4.6146 4.6146 5.07354 4.32698 5.63803C4 6.27976 4 7.11984 4 8.8V15.2C4 16.8802 4 17.7202 4.32698 18.362C4.6146 18.9265 5.07354 19.3854 5.63803 19.673C6.27976 20 7.11984 20 8.8 20H15.2C16.8802 20 17.7202 20 18.362 19.673C18.9265 19.3854 19.3854 18.9265 19.673 18.362C20 17.7202 20 16.8802 20 15.2V15`}),(0,g.jsx)(`path`,{d:`M14 4H20M20 4V10M20 4L11 13`})]});v.displayName=`Link.ExternalIcon`;var y={variant:{inline:{classes:`text-kumo-link underline underline-offset-[0.15em] decoration-[0.0625em] link-current transition-colors`,description:`Inline text link that flows with content`},current:{classes:`text-current underline underline-offset-[0.15em] decoration-[0.0625em] link-current transition-colors`,description:`Link that inherits color from parent text`},plain:{classes:`text-kumo-link hover:text-kumo-link/70 transition-colors`,description:`Link without underline decoration`}}},b={variant:`inline`};function x({variant:e=b.variant}={}){return o(y.variant[e].classes)}var S=(0,_.forwardRef)(function({className:e,variant:t=`inline`,render:n,...r},c){let l=s(),u={className:o(x({variant:t}),`group/link inline-flex items-center gap-[0.1875em]`)};return a({render:n??(0,g.jsx)(l,{}),ref:c,props:i(u,r,{className:e})})});S.displayName=`Link`;var C=Object.assign(S,{ExternalIcon:v});function w(){let e=p.useParams(),t=p.useLoaderData(),{namespaceId:n}=t,i=m(),[a,o]=(0,_.useState)(t.cursor),[s,v]=(0,_.useState)(null),[y,b]=(0,_.useState)(t.hasMore),[x,S]=(0,_.useState)(!1),[w,T]=(0,_.useState)(!1),[E,D]=(0,_.useState)(t.objects),[O,k]=(0,_.useState)(``);(0,_.useEffect)(()=>{D(t.objects),o(t.cursor),b(t.hasMore),v(null),S(!1),T(!1)},[t]);let A=(0,_.useCallback)(async e=>{try{e?T(!0):(S(!0),D([])),v(null);let t=await f({path:{id:n},query:{cursor:e,limit:50}}),r=t.data?.result??[];D(e?e=>[...e,...r]:r);let i=t.data?.result_info?.cursor;o(i??null),b(!!i)}catch(e){v(e instanceof Error?e.message:`Failed to fetch objects`)}finally{S(!1),T(!1)}},[n]);function j(){a&&!w&&A(a)}function M(t){t.preventDefault();let n=O.trim();n&&i({params:{className:e.className,objectId:n},search:{table:void 0},to:`/do/$className/$objectId`})}return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(d,{icon:h,items:[(0,g.jsx)(`span`,{className:`flex items-center gap-1.5`,children:e.className},`class-name`)],title:`Durable Objects`}),(0,g.jsxs)(`div`,{className:`px-6 py-6`,children:[(0,g.jsxs)(`form`,{className:`mb-6 flex items-end gap-2`,onSubmit:M,children:[(0,g.jsxs)(`div`,{className:`max-w-100 flex-1`,children:[(0,g.jsx)(l,{htmlFor:`open-instance`,tooltip:`Get an instance by its name (i.e. idFromName) or by its ID (Cloudflare-generated 64 digit hex ID)`,children:`View specific DO instance`}),(0,g.jsx)(`input`,{id:`open-instance`,className:`bg-bg text-text focus:ring-kumo-ring mt-1.5 h-9 w-full rounded-lg border border-kumo-line px-3 font-mono text-sm focus:ring focus:outline-none`,placeholder:`Enter instance name or hex ID...`,value:O,onChange:e=>k(e.target.value)})]}),(0,g.jsx)(c,{type:`submit`,variant:`secondary`,disabled:!O.trim(),children:`Open Studio`})]}),s&&(0,g.jsx)(`div`,{className:`mb-4 rounded-md border border-kumo-danger/20 bg-kumo-danger/8 p-4 text-kumo-danger`,children:s}),x?(0,g.jsx)(`div`,{className:`p-12 text-center text-kumo-subtle`,children:`Loading...`}):E.length===0?(0,g.jsxs)(`div`,{className:`flex flex-col items-center justify-center space-y-2 p-12 text-center text-kumo-subtle`,children:[(0,g.jsx)(`h2`,{className:`text-2xl font-medium`,children:`No Durable Objects with stored data`}),(0,g.jsx)(`p`,{className:`text-sm font-light`,children:`Create a Durable Object with SQLite storage to see it here.`})]}):(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(`div`,{className:`overflow-hidden rounded-lg border border-kumo-fill`,children:(0,g.jsxs)(u,{children:[(0,g.jsx)(u.Header,{children:(0,g.jsxs)(u.Row,{children:[(0,g.jsx)(u.Head,{children:`Name`}),(0,g.jsx)(u.Head,{children:`Object ID`}),(0,g.jsx)(u.Head,{})]})}),(0,g.jsx)(u.Body,{children:E.map(t=>(0,g.jsxs)(u.Row,{children:[(0,g.jsx)(u.Cell,{className:`font-mono text-xs`,children:t.name??`—`}),(0,g.jsx)(u.Cell,{className:`text-text-secondary font-mono text-xs`,children:t.id}),(0,g.jsx)(u.Cell,{className:`text-right`,children:(0,g.jsxs)(r,{className:`inline-flex h-6.5 items-center gap-1 rounded-md px-2 text-xs hover:bg-kumo-fill`,params:{className:e.className,objectId:t.id},search:{table:void 0},to:`/do/$className/$objectId`,children:[`Open Studio`,(0,g.jsx)(C.ExternalIcon,{})]})})]},t.id))})]})}),y&&(0,g.jsx)(`div`,{className:`py-4 text-center`,children:(0,g.jsx)(c,{variant:`secondary`,disabled:w,loading:w,onClick:j,children:w?`Loading...`:`Load More`})})]})]})]})}export{w as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./ResourceError-DNadec0F.js";var t=e;export{t as errorComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Et as e}from"./index-BHW_FKpE.js";var t=e;export{t as notFoundComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./react-BZY8YNV6.js";import{fn as t}from"./index-BHW_FKpE.js";var n=e(),r=()=>(0,n.jsx)(t,{});export{r as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Et as e}from"./index-BHW_FKpE.js";var t=e;export{t as notFoundComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./ResourceError-DNadec0F.js";var t=e;export{t as errorComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,n as t,t as n}from"./react-BZY8YNV6.js";import{n as r,t as i}from"./useRouterState-BLq6Ai_6.js";import{a,i as o,n as s,r as c,t as l}from"./TableSelect-DgjN53ZF.js";import{r as u}from"./button-cdxnqcgzwko8ooha-CjoTKpgy.js";import{t as d}from"./Pencil.es-CDpuGAys.js";import{t as f}from"./Trash.es-DTqwcb2_.js";import{t as p}from"./Breadcrumbs-BlzUUgNz.js";import{Tt as m,mn as h,pn as g,v as _,y as v,yt as y}from"./index-BHW_FKpE.js";var b=e(n()),x=t(),S=g(`__root__`);function C(){let e=_.useParams(),t=_.useLoaderData(),n=_.useSearch(),g=h(),C=r(),w=S.useLoaderData(),T=i(),E=(0,b.useRef)(n.table),D=(0,b.useRef)(null),[O,k]=(0,b.useState)(n.table),[A,j]=(0,b.useState)(!1),[M,N]=(0,b.useState)(null),P=(0,b.useMemo)(()=>new v(e.databaseId),[e.databaseId]),F=(0,b.useMemo)(()=>y(w.workers,T.location.searchStr)?.bindings?.d1?.find(t=>t.id===e.databaseId)?.bindingName,[w.workers,T.location.searchStr,e.databaseId]),I=(0,b.useMemo)(()=>({databaseId:e.databaseId,type:`d1`}),[e.databaseId]),L=(0,b.useCallback)(e=>{k(e),E.current!==e&&(E.current=e,g({replace:!0,search:t=>({...t,table:e}),to:`.`}))},[g]),R=(0,b.useCallback)(async()=>{j(!0);try{await Promise.all([C.invalidate(),D.current?.refreshSchema(),new Promise(e=>setTimeout(e,250))])}finally{j(!1)}},[C]),z=(0,b.useCallback)(async()=>{await R(),g({replace:!0,search:e=>({...e,table:void 0}),to:`.`})},[R,g]),B=(0,b.useCallback)(()=>{O&&N({schemaName:`main`,tableName:O})},[O]),V=(0,b.useCallback)(()=>{N(null)},[]),H=(0,b.useCallback)(()=>{M&&(D.current?.closeTableTabs(M.schemaName,M.tableName),z())},[M,z]);return(0,x.jsxs)(`div`,{className:`flex h-full flex-col`,children:[(0,x.jsxs)(p,{icon:m,title:`D1`,items:[(0,x.jsx)(`span`,{className:`flex items-center gap-1.5`,children:F&&F!==e.databaseId?(0,x.jsxs)(x.Fragment,{children:[F,(0,x.jsxs)(`span`,{className:`text-kumo-subtle`,children:[`(`,e.databaseId,`)`]})]}):e.databaseId},`database-id`),(0,x.jsx)(l,{selectedTable:n.table,studioRef:D,tables:t.tables},`table-selector`)],children:[(0,x.jsx)(`div`,{className:`flex-1`}),(0,x.jsx)(u,{"aria-label":`Refresh tables`,className:`disabled:cursor-progress`,disabled:A,onClick:R,shape:`square`,children:(0,x.jsx)(a,{className:A?`animate-spin`:void 0,size:14})}),(0,x.jsx)(s,{currentTable:O,driver:P}),(0,x.jsx)(u,{"aria-label":`Edit table schema`,disabled:!O,icon:d,onClick:()=>{O&&D.current?.openEditTableTab(`main`,O)},children:`Edit Schema`}),(0,x.jsx)(u,{"aria-label":`Delete table`,disabled:!O,icon:f,onClick:B,variant:`secondary-destructive`,children:`Delete Table`})]}),M&&(0,x.jsx)(c,{closeModal:V,driver:P,isOpen:!0,onSuccess:H,schemaName:M.schemaName,tableName:M.tableName}),(0,x.jsx)(`div`,{className:`flex-1 overflow-hidden bg-kumo-elevated`,children:(0,x.jsx)(o,{driver:P,initialTable:n.table,onTableChange:L,ref:D,resource:I},e.databaseId)})]})}export{C as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./ResourceError-DNadec0F.js";var t=e;export{t as errorComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./ResourceError-DNadec0F.js";var t=e;export{t as errorComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,n as t,t as n}from"./react-BZY8YNV6.js";import{t as r}from"./link-DadJAPnd.js";import{Bt as i,r as a}from"./link-provider-mn2voeohon7cj9o4-CNosc_Ni.js";import{t as o}from"./ArrowClockwise.es-Cs0EHtoR.js";import{a as s,r as c}from"./button-cdxnqcgzwko8ooha-CjoTKpgy.js";import{t as l}from"./CaretDown.es-r8EMGhHM.js";import{t as u}from"./Check.es-B3dV_aVM.js";import{a as d,c as f,i as p,l as m,n as h,o as g,r as _,s as v,t as y}from"./types-DTx0hLYz.js";import{t as b}from"./Copy.es-DUyM7PbX.js";import{t as x}from"./ListBullets.es-DrJsrtCL.js";import{t as S}from"./MagnifyingGlass.es-BzOo3pru.js";import{t as C}from"./PaperPlaneTilt.es-DTLdWOnM.js";import{n as w,t as T}from"./Spinner.es-oqUPe-aY.js";import{t as E}from"./Plus.es-xOjOjCs5.js";import{t as ee}from"./Trash.es-DTqwcb2_.js";import{t as D}from"./dialog-oqh8l3l3zutpibxx-nho54TMC.js";import{t as O}from"./dropdown-ncwhcd912vmone8k-BAT0p_ep.js";import{t as te}from"./Breadcrumbs-BlzUUgNz.js";import{Qt as k,Wt as A,Xt as ne,en as re,mn as ie,on as j,p as M,xt as N}from"./index-BHW_FKpE.js";import{n as P,r as F,t as I}from"./helpers-Bz2sloWm.js";var L=e(n(),1),R=new Map([[`bold`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M225.29,165.93C216.61,151,212,129.57,212,104a84,84,0,0,0-168,0c0,25.58-4.59,47-13.27,61.93A20.08,20.08,0,0,0,30.66,186,19.77,19.77,0,0,0,48,196H84.18a44,44,0,0,0,87.64,0H208a19.77,19.77,0,0,0,17.31-10A20.08,20.08,0,0,0,225.29,165.93ZM128,212a20,20,0,0,1-19.6-16h39.2A20,20,0,0,1,128,212ZM54.66,172C63.51,154,68,131.14,68,104a60,60,0,0,1,120,0c0,27.13,4.48,50,13.33,68Z`}))],[`duotone`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M208,192H48a8,8,0,0,1-6.88-12C47.71,168.6,56,139.81,56,104a72,72,0,0,1,144,0c0,35.82,8.3,64.6,14.9,76A8,8,0,0,1,208,192Z`,opacity:`0.2`}),L.createElement(`path`,{d:`M221.8,175.94C216.25,166.38,208,139.33,208,104a80,80,0,1,0-160,0c0,35.34-8.26,62.38-13.81,71.94A16,16,0,0,0,48,200H88.81a40,40,0,0,0,78.38,0H208a16,16,0,0,0,13.8-24.06ZM128,216a24,24,0,0,1-22.62-16h45.24A24,24,0,0,1,128,216ZM48,184c7.7-13.24,16-43.92,16-80a64,64,0,1,1,128,0c0,36.05,8.28,66.73,16,80Z`}))],[`fill`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M221.8,175.94C216.25,166.38,208,139.33,208,104a80,80,0,1,0-160,0c0,35.34-8.26,62.38-13.81,71.94A16,16,0,0,0,48,200H88.81a40,40,0,0,0,78.38,0H208a16,16,0,0,0,13.8-24.06ZM128,216a24,24,0,0,1-22.62-16h45.24A24,24,0,0,1,128,216Z`}))],[`light`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M220.07,176.94C214.41,167.2,206,139.73,206,104a78,78,0,1,0-156,0c0,35.74-8.42,63.2-14.08,72.94A14,14,0,0,0,48,198H90.48a38,38,0,0,0,75,0H208a14,14,0,0,0,12.06-21.06ZM128,218a26,26,0,0,1-25.29-20h50.58A26,26,0,0,1,128,218Zm81.71-33a1.9,1.9,0,0,1-1.7,1H48a1.9,1.9,0,0,1-1.7-1,2,2,0,0,1,0-2C53.87,170,62,139.69,62,104a66,66,0,1,1,132,0c0,35.68,8.14,65.95,15.71,79A2,2,0,0,1,209.71,185Z`}))],[`regular`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M221.8,175.94C216.25,166.38,208,139.33,208,104a80,80,0,1,0-160,0c0,35.34-8.26,62.38-13.81,71.94A16,16,0,0,0,48,200H88.81a40,40,0,0,0,78.38,0H208a16,16,0,0,0,13.8-24.06ZM128,216a24,24,0,0,1-22.62-16h45.24A24,24,0,0,1,128,216ZM48,184c7.7-13.24,16-43.92,16-80a64,64,0,1,1,128,0c0,36.05,8.28,66.73,16,80Z`}))],[`thin`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M218.35,178C212.58,168,204,140.13,204,104a76,76,0,1,0-152,0c0,36.13-8.59,64-14.36,73.95A12,12,0,0,0,48,196H92.23a36,36,0,0,0,71.54,0H208A12,12,0,0,0,218.35,178ZM128,220a28,28,0,0,1-27.71-24h55.42A28,28,0,0,1,128,220Zm83.45-34a3.91,3.91,0,0,1-3.44,2H48a3.91,3.91,0,0,1-3.44-2,4,4,0,0,1,0-4C52,169.17,60,139.32,60,104a68,68,0,1,1,136,0c0,35.31,8,65.17,15.44,78A4,4,0,0,1,211.45,186Z`}))]]),z=new Map([[`bold`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M71.68,97.22,34.74,128l36.94,30.78a12,12,0,1,1-15.36,18.44l-48-40a12,12,0,0,1,0-18.44l48-40A12,12,0,0,1,71.68,97.22Zm176,21.56-48-40a12,12,0,1,0-15.36,18.44L221.26,128l-36.94,30.78a12,12,0,1,0,15.36,18.44l48-40a12,12,0,0,0,0-18.44ZM164.1,28.72a12,12,0,0,0-15.38,7.18l-64,176a12,12,0,0,0,7.18,15.37A11.79,11.79,0,0,0,96,228a12,12,0,0,0,11.28-7.9l64-176A12,12,0,0,0,164.1,28.72Z`}))],[`duotone`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M240,128l-48,40H64L16,128,64,88H192Z`,opacity:`0.2`}),L.createElement(`path`,{d:`M69.12,94.15,28.5,128l40.62,33.85a8,8,0,1,1-10.24,12.29l-48-40a8,8,0,0,1,0-12.29l48-40a8,8,0,0,1,10.24,12.3Zm176,27.7-48-40a8,8,0,1,0-10.24,12.3L227.5,128l-40.62,33.85a8,8,0,1,0,10.24,12.29l48-40a8,8,0,0,0,0-12.29ZM162.73,32.48a8,8,0,0,0-10.25,4.79l-64,176a8,8,0,0,0,4.79,10.26A8.14,8.14,0,0,0,96,224a8,8,0,0,0,7.52-5.27l64-176A8,8,0,0,0,162.73,32.48Z`}))],[`fill`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM92.8,145.6a8,8,0,1,1-9.6,12.8l-32-24a8,8,0,0,1,0-12.8l32-24a8,8,0,0,1,9.6,12.8L69.33,128Zm58.89-71.4-32,112a8,8,0,1,1-15.38-4.4l32-112a8,8,0,0,1,15.38,4.4Zm53.11,60.2-32,24a8,8,0,0,1-9.6-12.8L186.67,128,163.2,110.4a8,8,0,1,1,9.6-12.8l32,24a8,8,0,0,1,0,12.8Z`}))],[`light`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M67.84,92.61,25.37,128l42.47,35.39a6,6,0,1,1-7.68,9.22l-48-40a6,6,0,0,1,0-9.22l48-40a6,6,0,0,1,7.68,9.22Zm176,30.78-48-40a6,6,0,1,0-7.68,9.22L230.63,128l-42.47,35.39a6,6,0,1,0,7.68,9.22l48-40a6,6,0,0,0,0-9.22Zm-81.79-89A6,6,0,0,0,154.36,38l-64,176A6,6,0,0,0,94,221.64a6.15,6.15,0,0,0,2,.36,6,6,0,0,0,5.64-3.95l64-176A6,6,0,0,0,162.05,34.36Z`}))],[`regular`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M69.12,94.15,28.5,128l40.62,33.85a8,8,0,1,1-10.24,12.29l-48-40a8,8,0,0,1,0-12.29l48-40a8,8,0,0,1,10.24,12.3Zm176,27.7-48-40a8,8,0,1,0-10.24,12.3L227.5,128l-40.62,33.85a8,8,0,1,0,10.24,12.29l48-40a8,8,0,0,0,0-12.29ZM162.73,32.48a8,8,0,0,0-10.25,4.79l-64,176a8,8,0,0,0,4.79,10.26A8.14,8.14,0,0,0,96,224a8,8,0,0,0,7.52-5.27l64-176A8,8,0,0,0,162.73,32.48Z`}))],[`thin`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M66.56,91.07,22.25,128l44.31,36.93A4,4,0,0,1,64,172a3.94,3.94,0,0,1-2.56-.93l-48-40a4,4,0,0,1,0-6.14l48-40a4,4,0,0,1,5.12,6.14Zm176,33.86-48-40a4,4,0,1,0-5.12,6.14L233.75,128l-44.31,36.93a4,4,0,1,0,5.12,6.14l48-40a4,4,0,0,0,0-6.14ZM161.37,36.24a4,4,0,0,0-5.13,2.39l-64,176a4,4,0,0,0,2.39,5.13A4.12,4.12,0,0,0,96,220a4,4,0,0,0,3.76-2.63l64-176A4,4,0,0,0,161.37,36.24Z`}))]]),B=L.forwardRef((e,t)=>L.createElement(i,{ref:t,...e,weights:R}));B.displayName=`BellIcon`;var V=L.forwardRef((e,t)=>L.createElement(i,{ref:t,...e,weights:z}));V.displayName=`CodeIcon`;var H=t();function U({text:e,label:t=`Copy`}){let[n,r]=(0,L.useState)(!1);function i(){navigator.clipboard.writeText(e).then(()=>{r(!0),setTimeout(()=>r(!1),2e3)})}return(0,H.jsx)(`button`,{className:`inline-flex size-7 cursor-pointer items-center justify-center rounded-md text-kumo-subtle transition-colors hover:bg-kumo-fill`,onClick:i,title:t,children:n?(0,H.jsx)(u,{size:14,className:`text-kumo-success`}):(0,H.jsx)(b,{size:14})})}function W({content:e}){return(0,H.jsx)(`pre`,{className:`max-h-64 overflow-y-auto px-4 py-3 font-mono text-xs wrap-break-word whitespace-pre-wrap text-kumo-default`,children:e})}function ae({status:e}){switch(e){case`complete`:return(0,H.jsx)(a,{content:`Complete`,children:(0,H.jsx)(m,{size:20,weight:`fill`,className:`text-kumo-link`})});case`errored`:return(0,H.jsx)(a,{content:`Errored`,children:(0,H.jsx)(d,{size:20,weight:`fill`,className:`text-kumo-danger`})});case`terminated`:return(0,H.jsx)(a,{content:`Terminated`,children:(0,H.jsx)(g,{size:20,weight:`fill`,className:`text-kumo-subtle`})});case`paused`:case`waitingForPause`:return(0,H.jsx)(a,{content:`Paused`,children:(0,H.jsx)(v,{size:20,weight:`fill`,className:`text-kumo-subtle`})});case`running`:return(0,H.jsx)(a,{content:`Running`,children:(0,H.jsx)(s,{size:20})});case`waiting`:return(0,H.jsx)(a,{content:`Waiting`,children:(0,H.jsx)(T,{size:20,weight:`bold`,className:`text-kumo-subtle`})});default:return(0,H.jsx)(a,{content:e,children:(0,H.jsx)(f,{size:20,weight:`bold`,className:`text-kumo-subtle`})})}}function G(e){try{let t=new Date(e),n=e=>String(e).padStart(2,`0`);return`${t.getFullYear()}-${n(t.getMonth()+1)}-${n(t.getDate())} ${n(t.getHours())}:${n(t.getMinutes())}:${n(t.getSeconds())}`}catch{return e}}function K(e){try{return new Date(e).toLocaleString(`en-US`,{weekday:`short`,year:`numeric`,month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`,hour12:!0,timeZoneName:`short`})}catch{return e}}function q({value:e}){if(!e)return(0,H.jsx)(`span`,{className:`text-sm text-kumo-subtle`,children:`—`});let t=G(e),n=K(e),r=F(e);return(0,H.jsx)(a,{content:(0,H.jsxs)(`div`,{className:`space-y-1 text-xs`,children:[(0,H.jsx)(`div`,{children:n}),(0,H.jsx)(`div`,{className:`text-kumo-subtle`,children:r})]}),children:(0,H.jsx)(`span`,{className:`text-sm whitespace-nowrap text-kumo-subtle`,children:t})})}function J({success:e,finished:t,hasError:n,subtle:r}){return e===!1||n?r?(0,H.jsx)(`div`,{className:`flex size-5 items-center justify-center rounded bg-kumo-fill`,children:(0,H.jsx)(`span`,{className:`text-xs font-bold text-kumo-default`,children:`!`})}):(0,H.jsx)(`div`,{className:`flex size-5 items-center justify-center rounded bg-kumo-badge-red`,children:(0,H.jsx)(`span`,{className:`text-xs font-bold text-white`,children:`!`})}):e===!0||t===!0?r?(0,H.jsx)(`div`,{className:`flex size-5 items-center justify-center rounded bg-kumo-fill`,children:(0,H.jsx)(u,{size:12,weight:`bold`,className:`text-white`})}):(0,H.jsx)(`div`,{className:`flex size-5 items-center justify-center rounded bg-kumo-badge-teal`,children:(0,H.jsx)(u,{size:12,weight:`bold`,className:`text-white`})}):(0,H.jsx)(`span`,{children:(0,H.jsx)(s,{size:18})})}var Y={step:`bg-kumo-tint text-kumo-subtle`,sleep:`bg-kumo-overlay text-kumo-subtle`,waitForEvent:`bg-kumo-badge-purple/10 text-kumo-badge-purple`};function X(e){return`${e.type}-${e.name}`}function Z(e){return(e??`Unknown step`).replace(/-\d+$/,``)}var oe=(0,L.memo)(function({step:e,isExpanded:t,onToggleExpanded:n,onRestartFromStep:r}){let i=e.type===`step`||e.type===`waitForEvent`&&(e.error||e.output!=null||e.finished);return(0,H.jsxs)(`div`,{className:`border-b border-kumo-fill p-1 last:border-b-0`,children:[(0,H.jsxs)(`div`,{className:`grid h-10 grid-cols-[20px_1fr_160px_160px_80px_28px_24px] items-center gap-3 rounded-lg px-2 transition-colors ${i?`cursor-pointer hover:bg-kumo-fill`:``}`,onClick:i?n:void 0,children:[(0,H.jsx)(J,{success:e.success,finished:e.finished,hasError:!!e.error}),(0,H.jsxs)(`div`,{className:`flex items-center gap-2 overflow-hidden`,children:[e.type&&e.type!==`step`&&(0,H.jsx)(`span`,{className:`shrink-0 rounded px-1.5 py-0.5 text-sm ${Y[e.type]??Y.step}`,children:e.type===`waitForEvent`?`wait for event`:e.type}),(0,H.jsx)(`span`,{className:`truncate text-sm text-kumo-default`,children:Z(e.name)})]}),(0,H.jsx)(q,{value:e.start}),(0,H.jsx)(q,{value:e.end}),(0,H.jsx)(`span`,{className:`text-sm text-kumo-subtle`,children:I(e.start,e.end)}),(0,H.jsx)(`div`,{className:`flex items-center justify-center`,children:r&&(0,H.jsx)(a,{content:`Restart from this step`,asChild:!0,children:(0,H.jsx)(`button`,{"aria-label":`Restart from this step`,className:`inline-flex size-7 cursor-pointer items-center justify-center rounded-md border border-kumo-fill bg-kumo-base text-kumo-default transition-colors hover:bg-kumo-fill disabled:cursor-not-allowed disabled:opacity-40`,onClick:t=>{t.stopPropagation(),r(e)},type:`button`,children:(0,H.jsx)(o,{size:14})})})}),(0,H.jsx)(`div`,{className:`flex items-center justify-center`,children:i?(0,H.jsx)(E,{size:14,className:`text-kumo-subtle transition-transform ${t?`rotate-45`:``}`}):(0,H.jsx)(`div`,{className:`w-6`})})]}),t&&i&&(0,H.jsxs)(`div`,{className:`-mx-1 -mb-1`,children:[(0,H.jsx)(`div`,{className:`mt-1 h-2 rounded-t-lg border-t border-kumo-fill`}),(0,H.jsxs)(`div`,{className:`px-4 pt-3 pb-4`,children:[e.type===`step`&&(0,H.jsx)(se,{step:e}),e.type===`waitForEvent`&&(0,H.jsx)(ce,{step:e})]})]})]})});function Q({label:e,content:t}){return(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`h5`,{className:`mb-2 text-sm font-medium text-kumo-default`,children:e}),(0,H.jsxs)(`div`,{className:`relative overflow-hidden rounded-lg border border-kumo-fill bg-kumo-base`,children:[(0,H.jsx)(W,{content:t}),(0,H.jsx)(`div`,{className:`absolute top-1.5 right-1.5`,children:(0,H.jsx)(U,{text:t,label:`Copy ${e.toLowerCase()}`})})]})]})}function se({step:e}){let t=e.success===!1&&e.attempts?[...e.attempts].reverse().find(e=>e.error):null,n=t?.error?`${t.error.name}: ${t.error.message}`:null,r=e.success===!0&&e.output!==void 0?P(e.output):null,i=n?`Error`:`Output`,a=n??r??`N/A`,o=e.config?P(e.config):null;return(0,H.jsxs)(`div`,{className:`space-y-4`,children:[(0,H.jsxs)(`div`,{className:o?`grid grid-cols-1 gap-4 md:grid-cols-2`:``,children:[(0,H.jsx)(Q,{label:i,content:a}),o&&(0,H.jsx)(Q,{label:`Config`,content:o})]}),e.attempts&&e.attempts.length>0&&(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`hr`,{className:`mb-4 border-dashed border-kumo-fill`}),(0,H.jsx)(`h5`,{className:`mb-2 text-sm font-medium text-kumo-default`,children:`Attempts`}),(0,H.jsx)(`div`,{children:[...e.attempts].reverse().map((e,t,n)=>{let r=n.length-t,i=n[t+1],a=i&&i.end&&e.start?new Date(e.start).getTime()-new Date(i.end).getTime():null,o=t===n.length-1;return(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`div`,{className:`rounded-md bg-kumo-base py-2 pr-3 text-sm`,children:(0,H.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,H.jsxs)(`div`,{className:`flex shrink-0 items-center gap-3 pt-0.5`,children:[(0,H.jsxs)(`span`,{className:`font-mono text-kumo-subtle`,children:[`#`,r]}),(0,H.jsx)(J,{success:e.success,subtle:!0})]}),(0,H.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[e.error?(0,H.jsx)(`span`,{className:`font-medium text-kumo-default`,children:e.error.name}):e.success?(0,H.jsx)(`span`,{className:`text-kumo-subtle`,children:`Success`}):(0,H.jsx)(`span`,{className:`text-kumo-subtle`,children:`Running`}),(0,H.jsx)(`span`,{className:`flex-1 border-t border-dashed border-kumo-fill`}),(0,H.jsx)(`span`,{className:`shrink-0 text-kumo-subtle`,children:I(e.start,e.end)})]}),e.error?.message&&(0,H.jsx)(`p`,{className:`mt-1 text-xs text-kumo-subtle`,children:e.error.message})]})]})}),!o&&a!==null&&a>0&&(0,H.jsxs)(`div`,{className:`flex items-center py-1 pl-7`,children:[(0,H.jsx)(`div`,{className:`flex h-10 w-5 items-center justify-center`,children:(0,H.jsx)(`div`,{className:`h-full border-l border-dashed border-kumo-fill`})}),(0,H.jsx)(`span`,{className:`ml-2 text-sm text-kumo-subtle`,children:I(i?.end,e.start)})]})]},t)})})]})]})}function ce({step:e}){let t=e.finished&&!e.error,n=!!e.error;return(0,H.jsxs)(`div`,{className:t&&n?`grid grid-cols-1 gap-4 md:grid-cols-2`:`space-y-4`,children:[t&&(0,H.jsx)(Q,{label:`Event Payload`,content:P(e.output)}),n&&(0,H.jsx)(Q,{label:e.error?.name??`Error`,content:e.error?.message??`Unknown error`})]})}var le={pause:v,resume:w,terminate:g,restart:o},ue=(0,L.memo)(function({status:e,stepCount:t,start:n,end:r}){return(0,H.jsxs)(`div`,{className:`grid grid-cols-1 overflow-hidden rounded-lg border border-kumo-fill bg-kumo-base md:grid-cols-3`,children:[(0,H.jsxs)(`div`,{className:`flex items-center justify-between px-3 py-2 md:px-5`,children:[(0,H.jsx)(`span`,{className:`text-sm text-kumo-subtle md:text-base`,children:`Status`}),(0,H.jsx)(p,{status:e})]}),(0,H.jsxs)(`div`,{className:`flex items-center justify-between border-t border-kumo-fill px-3 py-2 md:border-t-0 md:border-l md:px-5`,children:[(0,H.jsx)(`span`,{className:`text-sm text-kumo-subtle md:text-base`,children:`Steps Completed`}),(0,H.jsx)(`span`,{className:`text-sm font-medium text-kumo-default md:text-base`,children:t})]}),(0,H.jsxs)(`div`,{className:`flex items-center justify-between border-t border-kumo-fill px-3 py-2 md:border-t-0 md:border-l md:px-5`,children:[(0,H.jsx)(`span`,{className:`text-sm text-kumo-subtle md:text-base`,children:`Duration`}),(0,H.jsx)(`span`,{className:`text-sm font-medium text-kumo-default md:text-base`,children:I(n,r)})]})]})}),de=(0,L.memo)(function({params:e,output:t}){return(0,H.jsxs)(`div`,{className:`overflow-hidden rounded-xl border border-kumo-fill bg-kumo-tint`,children:[(0,H.jsxs)(`div`,{className:`hidden md:grid md:grid-cols-2 md:divide-x md:divide-kumo-fill`,children:[(0,H.jsx)(`div`,{className:`px-4 py-2.5`,children:(0,H.jsx)(`span`,{className:`text-sm font-medium text-kumo-default`,children:`Input params`})}),(0,H.jsx)(`div`,{className:`px-4 py-2.5`,children:(0,H.jsx)(`span`,{className:`text-sm font-medium text-kumo-default`,children:`Output`})})]}),(0,H.jsx)(`div`,{className:`hidden rounded-t-lg border-t border-kumo-fill bg-kumo-base md:block`,children:(0,H.jsxs)(`div`,{className:`grid grid-cols-2 divide-x divide-kumo-fill`,children:[(0,H.jsxs)(`div`,{className:`relative`,children:[(0,H.jsx)(W,{content:P(e)}),(0,H.jsx)(`div`,{className:`absolute top-1.5 right-1.5`,children:(0,H.jsx)(U,{text:P(e),label:`Copy params`})})]}),(0,H.jsxs)(`div`,{className:`relative`,children:[(0,H.jsx)(W,{content:P(t)}),(0,H.jsx)(`div`,{className:`absolute top-1.5 right-1.5`,children:(0,H.jsx)(U,{text:P(t),label:`Copy output`})})]})]})}),(0,H.jsxs)(`div`,{className:`md:hidden`,children:[(0,H.jsx)(`div`,{className:`px-4 py-2.5`,children:(0,H.jsx)(`span`,{className:`text-sm font-medium text-kumo-default`,children:`Input params`})}),(0,H.jsx)(`div`,{className:`rounded-t-lg border-t border-kumo-fill bg-kumo-base`,children:(0,H.jsxs)(`div`,{className:`relative`,children:[(0,H.jsx)(W,{content:P(e)}),(0,H.jsx)(`div`,{className:`absolute top-1.5 right-1.5`,children:(0,H.jsx)(U,{text:P(e),label:`Copy params`})})]})}),(0,H.jsx)(`div`,{className:`border-t border-kumo-fill px-4 py-2.5`,children:(0,H.jsx)(`span`,{className:`text-sm font-medium text-kumo-default`,children:`Output`})}),(0,H.jsx)(`div`,{className:`border-t border-kumo-fill bg-kumo-base`,children:(0,H.jsxs)(`div`,{className:`relative`,children:[(0,H.jsx)(W,{content:P(t)}),(0,H.jsx)(`div`,{className:`absolute top-1.5 right-1.5`,children:(0,H.jsx)(U,{text:P(t),label:`Copy output`})})]})})]})]})}),fe=(0,L.memo)(function({error:e}){return(0,H.jsxs)(`div`,{className:`overflow-hidden rounded-xl border border-kumo-fill bg-kumo-tint`,children:[(0,H.jsx)(`div`,{className:`px-4 py-2.5`,children:(0,H.jsx)(`span`,{className:`text-sm font-medium text-kumo-default`,children:e.name??`Error`})}),(0,H.jsxs)(`div`,{className:`relative rounded-t-lg border-t border-kumo-fill bg-kumo-base`,children:[(0,H.jsx)(`pre`,{className:`max-h-64 overflow-y-auto px-4 py-3 font-mono text-sm wrap-break-word whitespace-pre-wrap text-kumo-subtle`,children:e.message??`Unknown error`}),(0,H.jsx)(`div`,{className:`absolute top-1.5 right-1.5`,children:(0,H.jsx)(U,{text:`${e.name??`Error`}: ${e.message??``}`,label:`Copy error`})})]})]})}),$=[{value:`all`,label:`All`,icon:x},{value:`step`,label:`Do`,icon:V},{value:`sleep`,label:`Sleep`,icon:j},{value:`waitForEvent`,label:`Wait for Event`,icon:B}],pe=(0,L.memo)(function({steps:e,onRestartFromStep:t}){let n=e??[],[r,i]=(0,L.useState)(``),[a,o]=(0,L.useState)(`all`),[s,c]=(0,L.useState)(()=>new Set),u=(0,L.useCallback)(e=>{c(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),d=[...n].reverse().filter(e=>{if(a!==`all`&&e.type!==a)return!1;if(r.trim()){let t=r.trim().toLowerCase();return Z(e.name).toLowerCase().includes(t)}return!0}),f=$.find(e=>e.value===a)??$[0],p=f.icon;return(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`div`,{className:`mb-3`,children:(0,H.jsx)(`h4`,{className:`text-lg font-semibold text-kumo-default`,children:`Step History`})}),n.length>0&&(0,H.jsxs)(`div`,{className:`mb-3 flex flex-col gap-2 sm:flex-row sm:items-center`,children:[(0,H.jsxs)(`div`,{className:`relative flex-1`,children:[(0,H.jsx)(S,{size:14,className:`absolute top-1/2 left-3 -translate-y-1/2 text-kumo-subtle`}),(0,H.jsx)(`input`,{className:`focus-visible:ring-kumo-ring h-9 w-full rounded-lg border border-kumo-fill bg-kumo-base pr-3 pl-9 text-sm text-kumo-default placeholder:text-kumo-subtle focus:border-kumo-brand focus:outline-none focus-visible:ring-2`,onChange:e=>i(e.target.value),placeholder:`Search steps...`,type:`text`,value:r})]}),(0,H.jsxs)(O,{children:[(0,H.jsx)(O.Trigger,{render:(0,H.jsxs)(`button`,{className:`inline-flex h-9 w-full cursor-pointer items-center justify-between rounded-lg border border-kumo-fill bg-kumo-base px-3 text-sm text-kumo-default transition-colors hover:bg-kumo-fill sm:w-44`,children:[(0,H.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,H.jsx)(p,{size:14,className:`text-kumo-subtle`}),f.label]}),(0,H.jsx)(l,{size:14,className:`text-kumo-subtle`})]})}),(0,H.jsx)(O.Content,{align:`end`,className:`w-44 bg-kumo-base`,side:`bottom`,children:$.map(({value:e,label:t,icon:n})=>(0,H.jsxs)(O.Item,{className:`flex cursor-pointer items-center gap-2 rounded-md transition-colors hover:bg-kumo-fill`,onClick:()=>o(e),children:[(0,H.jsx)(n,{size:14,className:`text-kumo-subtle`}),t]},e))})]})]}),(0,H.jsx)(`div`,{className:`overflow-x-auto rounded-lg border border-kumo-fill bg-kumo-base`,children:(0,H.jsx)(`div`,{className:`min-w-150`,children:n.length===0?(0,H.jsx)(`div`,{className:`px-4 py-8 text-center text-sm text-kumo-subtle`,children:`No steps recorded yet`}):d.length===0?(0,H.jsx)(`div`,{className:`px-4 py-8 text-center text-sm text-kumo-subtle`,children:`No steps match your search`}):d.map(e=>{let n=X(e);return(0,H.jsx)(oe,{step:e,isExpanded:s.has(n),onToggleExpanded:()=>u(n),onRestartFromStep:t},n)})})})]})});function me(){let e=M.useParams(),t=M.useLoaderData(),n=ie(),[i,o]=(0,L.useState)(t.details),[s,l]=(0,L.useState)(null),[u,d]=(0,L.useState)(!1),[f,p]=(0,L.useState)(!1),[m,g]=(0,L.useState)(!1),[v,b]=(0,L.useState)(null),[x,S]=(0,L.useState)(!1),[w,T]=(0,L.useState)(``),[E,O]=(0,L.useState)(``),[j,P]=(0,L.useState)(!1),[F,I]=(0,L.useState)(null),[R,z]=(0,L.useState)(!1),B=(0,L.useRef)(JSON.stringify(t.details));(0,L.useEffect)(()=>{let e=JSON.stringify(t.details);e!==B.current&&(B.current=e,o(t.details))},[t]);let V=i.status??`unknown`,U=e.instanceId,W=i.steps??[],G=y(V),K=(0,L.useCallback)(async()=>{try{let t=(await k({path:{instance_id:U,workflow_name:e.workflowName}})).data?.result;if(t){let e=JSON.stringify(t);e!==B.current&&(B.current=e,o(t))}}catch{}},[U,e.workflowName]),q=_(V);(0,L.useEffect)(()=>{if(q)return;let e=!0;async function t(){for(;e&&(await new Promise(e=>setTimeout(e,1e3)),e);)await K()}return t(),()=>{e=!1}},[K,q]);let J=(0,L.useCallback)(async t=>{l(t),b(null);try{await A({path:{workflow_name:e.workflowName,instance_id:U},body:{status:t}}),await K()}catch(e){b(e instanceof Error?e.message:`Failed to ${t}`)}finally{l(null)}},[e.workflowName,U,K]),Y=(0,L.useCallback)(e=>{I(e)},[]),X=(0,L.useCallback)(async()=>{if(F){z(!0),b(null);try{await A({path:{workflow_name:e.workflowName,instance_id:U},body:{status:`restart`,from:h(F)}}),await K()}catch(e){b(e instanceof Error?e.message:`Failed to restart from step`)}finally{I(null),z(!1)}}},[F,e.workflowName,U,K]);return(0,H.jsxs)(`div`,{className:`flex h-full flex-col`,children:[(0,H.jsx)(te,{icon:N,items:[(0,H.jsx)(r,{className:`flex items-center gap-1.5`,params:{workflowName:e.workflowName},to:`/workflows/$workflowName`,children:e.workflowName},`wf`),(0,H.jsx)(`span`,{className:`flex items-center gap-1.5 font-mono text-xs`,children:U},`id`)],title:`Workflows`}),(0,H.jsxs)(`div`,{className:`flex-1 overflow-auto`,children:[(0,H.jsx)(`div`,{className:`px-4 pt-6 sm:px-6 lg:px-12 xl:px-20 2xl:px-32`,children:(0,H.jsx)(`div`,{children:(0,H.jsxs)(`header`,{className:`flex flex-wrap items-center justify-between gap-2 pb-6 sm:gap-3`,children:[(0,H.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2 sm:gap-3`,children:[(0,H.jsx)(`h1`,{className:`shrink-0 text-xl font-semibold text-kumo-default sm:text-2xl`,children:e.workflowName}),(0,H.jsx)(a,{content:u?`Copied!`:`Copy instance ID`,asChild:!0,children:(0,H.jsxs)(`button`,{className:`min-w-0 cursor-pointer truncate font-mono text-base transition-colors sm:text-2xl ${u?`text-kumo-default`:`text-kumo-subtle hover:text-kumo-default`}`,onClick:()=>{navigator.clipboard.writeText(U),d(!0),setTimeout(()=>d(!1),1e3)},children:[`#`,U]})}),(0,H.jsx)(ae,{status:V})]}),(0,H.jsxs)(`div`,{className:`flex shrink-0 flex-wrap items-center gap-1.5 sm:gap-2`,children:[G.map(e=>{let t=le[e];return(0,H.jsxs)(`button`,{className:`inline-flex h-9 cursor-pointer items-center gap-1.5 rounded-lg border px-3 text-sm transition-colors disabled:cursor-not-allowed disabled:opacity-40 ${e===`terminate`?`border-kumo-fill bg-kumo-base text-kumo-danger hover:bg-kumo-badge-red/10`:`border-kumo-fill bg-kumo-base text-kumo-default hover:bg-kumo-fill`}`,disabled:s!==null,onClick:()=>void J(e),children:[(0,H.jsx)(t,{size:14,weight:e===`restart`?`regular`:`fill`,className:s===e?`animate-spin`:``}),e.charAt(0).toUpperCase()+e.slice(1)]},e)}),V!==`complete`&&V!==`errored`&&V!==`terminated`&&(0,H.jsx)(`button`,{className:`inline-flex size-9 cursor-pointer items-center justify-center rounded-lg border border-kumo-fill bg-kumo-base text-kumo-default transition-colors hover:bg-kumo-fill disabled:cursor-not-allowed disabled:opacity-40`,disabled:s!==null,onClick:()=>S(!0),title:`Send Event`,children:(0,H.jsx)(C,{size:14})}),(0,H.jsx)(`button`,{className:`inline-flex size-9 cursor-pointer items-center justify-center rounded-lg border border-kumo-fill bg-kumo-base text-kumo-danger transition-colors hover:bg-kumo-badge-red/10 disabled:cursor-not-allowed disabled:opacity-40`,disabled:s!==null,onClick:()=>p(!0),title:`Delete`,children:(0,H.jsx)(ee,{size:14})})]})]})})}),(0,H.jsxs)(`div`,{className:`relative`,children:[(0,H.jsx)(`hr`,{className:`absolute top-1/2 w-full border-kumo-fill`}),(0,H.jsx)(`div`,{className:`relative px-4 sm:px-6 lg:px-12 xl:px-20 2xl:px-32`,children:(0,H.jsx)(ue,{status:V,stepCount:W.length,start:i.start,end:i.end})})]}),(0,H.jsx)(D.Root,{open:f,onOpenChange:p,children:(0,H.jsxs)(D,{size:`lg`,className:`w-lg`,children:[(0,H.jsx)(`div`,{className:`border-b border-kumo-fill px-6 py-4`,children:(0,H.jsx)(D.Title,{className:`text-lg font-semibold text-kumo-default`,children:`Delete this instance?`})}),(0,H.jsxs)(`div`,{className:`px-6 py-5`,children:[(0,H.jsx)(`p`,{className:`text-sm text-kumo-subtle`,children:`This will permanently delete the instance and its persistence data. This action cannot be undone.`}),(0,H.jsxs)(`div`,{className:`mt-3 rounded-lg border border-kumo-fill bg-kumo-elevated px-4 py-3`,children:[(0,H.jsx)(`span`,{className:`text-xs text-kumo-subtle`,children:`Instance ID`}),(0,H.jsx)(`p`,{className:`mt-0.5 font-mono text-sm text-kumo-default`,children:U})]})]}),(0,H.jsxs)(`div`,{className:`flex justify-end gap-2 border-t border-kumo-fill px-6 py-4`,children:[(0,H.jsx)(c,{variant:`secondary`,onClick:()=>p(!1),disabled:m,children:`Cancel`}),(0,H.jsx)(c,{variant:`destructive`,disabled:m,loading:m,onClick:()=>{g(!0),ne({path:{workflow_name:e.workflowName,instance_id:U}}).then(()=>{p(!1),n({to:`/workflows/$workflowName`,params:{workflowName:e.workflowName},search:e=>e})}).finally(()=>g(!1))},children:`Delete Instance`})]})]})}),(0,H.jsx)(D.Root,{open:x,onOpenChange:e=>{S(e),e||(T(``),O(``))},children:(0,H.jsxs)(D,{size:`lg`,className:`w-lg`,children:[(0,H.jsx)(`div`,{className:`border-b border-kumo-fill px-6 py-4`,children:(0,H.jsx)(D.Title,{className:`text-lg font-semibold text-kumo-default`,children:`Send Event`})}),(0,H.jsxs)(`div`,{className:`space-y-4 px-6 py-5`,children:[(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`label`,{className:`mb-2 block text-sm font-medium text-kumo-default`,children:`Event Type`}),(0,H.jsx)(`input`,{className:`focus-visible:ring-kumo-ring w-full rounded-lg border border-kumo-fill bg-kumo-base px-3 py-2.5 text-sm text-kumo-default placeholder:text-kumo-subtle focus:border-kumo-brand focus:outline-none focus-visible:ring-2`,onChange:e=>T(e.target.value),placeholder:`my-event`,type:`text`,value:w})]}),(0,H.jsxs)(`div`,{children:[(0,H.jsxs)(`label`,{className:`mb-2 block text-sm font-medium text-kumo-default`,children:[`Payload`,` `,(0,H.jsx)(`span`,{className:`font-normal text-kumo-subtle`,children:`(optional)`})]}),(0,H.jsx)(`textarea`,{className:`focus-visible:ring-kumo-ring w-full resize-y rounded-lg border border-kumo-fill bg-kumo-base px-3 py-2.5 font-mono text-sm text-kumo-default placeholder:text-kumo-subtle focus:border-kumo-brand focus:outline-none focus-visible:ring-2`,onChange:e=>O(e.target.value),placeholder:`{"key": "value"}`,rows:4,value:E})]})]}),(0,H.jsxs)(`div`,{className:`flex justify-end gap-2 border-t border-kumo-fill px-6 py-4`,children:[(0,H.jsx)(c,{variant:`secondary`,onClick:()=>S(!1),disabled:j,children:`Cancel`}),(0,H.jsx)(c,{variant:`primary`,disabled:!w.trim()||j,loading:j,onClick:()=>{let t;if(E.trim())try{t=JSON.parse(E)}catch{return}P(!0),re({path:{workflow_name:e.workflowName,instance_id:U,event_type:w.trim()},body:t}).then(()=>{S(!1),T(``),O(``),K()}).finally(()=>P(!1))},children:`Send`})]})]})}),(0,H.jsx)(D.Root,{open:F!==null,onOpenChange:e=>{!e&&!R&&I(null)},children:(0,H.jsxs)(D,{size:`lg`,className:`w-lg`,children:[(0,H.jsx)(`div`,{className:`border-b border-kumo-fill px-6 py-4`,children:(0,H.jsx)(D.Title,{className:`text-lg font-semibold text-kumo-default`,children:`Restart from this step?`})}),(0,H.jsx)(`div`,{className:`px-6 py-5`,children:(0,H.jsxs)(`p`,{className:`text-sm text-kumo-subtle`,children:[`This will rerun the instance from`,` `,(0,H.jsx)(`span`,{className:`font-medium text-kumo-default`,children:Z(F?.name)}),`. Saved state for this step and later steps will be cleared, while earlier completed steps are kept.`]})}),(0,H.jsxs)(`div`,{className:`flex justify-end gap-2 border-t border-kumo-fill px-6 py-4`,children:[(0,H.jsx)(c,{variant:`secondary`,onClick:()=>I(null),disabled:R,children:`Cancel`}),(0,H.jsx)(c,{variant:`primary`,disabled:R,loading:R,onClick:()=>void X(),children:`Restart from step`})]})]})}),(0,H.jsxs)(`div`,{className:`space-y-6 px-4 py-6 sm:space-y-8 sm:px-6 lg:px-12 xl:px-20 2xl:px-32`,children:[v&&(0,H.jsx)(`div`,{className:`rounded-lg border border-kumo-danger/20 bg-kumo-danger/8 p-4 text-sm text-kumo-danger`,children:v}),(0,H.jsx)(de,{params:i.params,output:i.output}),i.error&&(0,H.jsx)(fe,{error:i.error}),(0,H.jsx)(pe,{steps:i.steps,onRestartFromStep:Y})]})]})]})}export{me as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Et as e}from"./index-BHW_FKpE.js";var t=e;export{t as notFoundComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./ResourceError-DNadec0F.js";var t=e;export{t as errorComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,n as t,t as n}from"./react-BZY8YNV6.js";import{t as r}from"./useRouterState-BLq6Ai_6.js";import{Vt as i}from"./link-provider-mn2voeohon7cj9o4-CNosc_Ni.js";import{r as a}from"./button-cdxnqcgzwko8ooha-CjoTKpgy.js";import{t as o}from"./DotsThree.es-B9u_qIrH.js";import{t as s}from"./Pencil.es-CDpuGAys.js";import{t as c}from"./Trash.es-DTqwcb2_.js";import{t as l}from"./dialog-oqh8l3l3zutpibxx-nho54TMC.js";import{t as u}from"./dropdown-ncwhcd912vmone8k-BAT0p_ep.js";import{t as d}from"./table-inweecadl3her7pd-UWLv9e8D.js";import{t as f}from"./Breadcrumbs-BlzUUgNz.js";import{Ct as p,Gt as m,Jt as h,Kt as g,ft as _,pn as v,qt as y,yt as ee}from"./index-BHW_FKpE.js";import{t as b}from"./CopyButton-DdMFsAgv.js";var x=e(n(),1);function S(e){if(!e.trim())return`Key is required`;let t=new TextEncoder().encode(e).length;return t>512?`Key must be 512 bytes or less (currently ${t} bytes)`:null}var C=t();function w({onAdd:e,clearSignal:t=0}){let[n,r]=(0,x.useState)(``),[o,s]=(0,x.useState)(``),[c,l]=(0,x.useState)(!1),[u,d]=(0,x.useState)(null);(0,x.useEffect)(()=>{t>0&&(r(``),s(``),d(null))},[t]);let f=e=>{let t=e.target.value;r(t),d(t.trim()?S(t):null)},p=async t=>{t.preventDefault();let i=S(n);if(i)d(i);else try{l(!0),await e(n,o)&&(r(``),s(``),d(null))}finally{l(!1)}},m=!!S(n);return(0,C.jsxs)(`form`,{className:`mb-4 flex flex-col items-start gap-2 lg:flex-row`,onSubmit:p,children:[(0,C.jsxs)(`div`,{className:`flex w-full shrink-0 flex-col lg:w-2xs`,children:[(0,C.jsx)(`label`,{className:`sr-only`,htmlFor:`add-key`,children:`Key`}),(0,C.jsx)(`input`,{id:`add-key`,className:i(`focus-visible:ring-kumo-ring h-9 w-full rounded-md border border-kumo-fill bg-kumo-base px-3 font-mono text-sm text-kumo-default placeholder:text-kumo-subtle focus:border-kumo-brand focus:outline-none focus-visible:ring-2 disabled:bg-kumo-elevated disabled:text-kumo-subtle`,{"border-kumo-danger focus-visible:ring-2 focus-visible:ring-kumo-danger":u}),placeholder:`Key`,value:n,onChange:f,disabled:c}),u&&(0,C.jsx)(`span`,{className:`mt-1 text-xs text-kumo-danger`,children:u})]}),(0,C.jsxs)(`div`,{className:`flex w-full flex-1 flex-col lg:min-w-2xs`,children:[(0,C.jsx)(`label`,{className:`sr-only`,htmlFor:`add-value`,children:`Value`}),(0,C.jsx)(`textarea`,{id:`add-value`,className:`focus-visible:ring-kumo-ring max-h-32 min-h-9 w-full resize-none overflow-y-auto rounded-md border border-kumo-fill bg-kumo-base px-3 py-2 font-mono text-sm text-kumo-default placeholder:text-kumo-subtle focus:border-kumo-brand focus:outline-none focus-visible:ring-2 disabled:bg-kumo-elevated disabled:text-kumo-subtle lg:field-sizing-content`,placeholder:`Value`,value:o,onChange:e=>s(e.target.value),disabled:c})]}),(0,C.jsx)(a,{type:`submit`,className:`w-full shrink-0 lg:w-auto`,variant:`primary`,disabled:c||m,loading:c,children:c?`Adding...`:`Add entry`})]})}function T(e,t=100){return e===``?`(empty)`:e===null?JSON.stringify(e):e.length>t?e.slice(0,t)+`...`:e}function E({onEdit:e,onDelete:t}){return(0,C.jsxs)(u,{children:[(0,C.jsx)(u.Trigger,{render:(0,C.jsx)(a,{variant:`ghost`,shape:`square`,className:`h-7! w-7!`,"aria-label":`Actions`,children:(0,C.jsx)(o,{size:16,weight:`bold`})})}),(0,C.jsxs)(u.Content,{align:`end`,sideOffset:4,children:[(0,C.jsxs)(u.Item,{className:`flex items-center gap-2`,onClick:e,children:[(0,C.jsx)(s,{}),(0,C.jsx)(`span`,{children:`Edit`})]}),(0,C.jsx)(u.Separator,{}),(0,C.jsxs)(u.Item,{className:`flex items-center gap-2 text-kumo-danger`,onClick:t,children:[(0,C.jsx)(c,{}),(0,C.jsx)(`span`,{children:`Delete`})]})]})]})}function D({entries:e,onSave:t,onDelete:n}){let[r,o]=(0,x.useState)(null),[s,c]=(0,x.useState)(!1),l=e=>{o({originalKey:e.key.name,key:e.key.name,value:e.value??``,keyError:null})},u=e=>{r&&o({...r,key:e,keyError:e.trim()?S(e):null})},f=async()=>{if(!r)return;let e=S(r.key);if(e)o({...r,keyError:e});else try{c(!0),await t(r.originalKey,r.key,r.value)&&o(null)}finally{c(!1)}},p=()=>{o(null)},m=e=>{e.key===`Escape`?p():e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&f()},h=r?!!S(r.key):!1;return(0,C.jsx)(`div`,{className:`overflow-hidden rounded-lg border border-kumo-fill`,children:(0,C.jsxs)(d,{children:[(0,C.jsx)(d.Header,{children:(0,C.jsxs)(d.Row,{children:[(0,C.jsx)(d.Head,{children:`Key`}),(0,C.jsx)(d.Head,{children:`Value`}),(0,C.jsx)(d.Head,{className:`w-12`})]})}),(0,C.jsx)(d.Body,{children:e.map(e=>{let t=r?.originalKey===e.key.name;return(0,C.jsxs)(d.Row,{className:`group`,children:[(0,C.jsx)(d.Cell,{className:`group/cell align-top`,children:t&&r?(0,C.jsxs)(`div`,{className:`flex flex-col`,children:[(0,C.jsx)(`label`,{className:`sr-only`,htmlFor:`edit-key-${e.key.name}`,children:`Key`}),(0,C.jsx)(`input`,{id:`edit-key-${e.key.name}`,className:i(`focus-visible:ring-kumo-ring min-h-8 w-full rounded border border-kumo-brand bg-kumo-base px-2 py-1.5 font-mono text-[13px] text-kumo-default focus:outline-none focus-visible:ring-2 disabled:bg-kumo-elevated disabled:text-kumo-subtle`,{"border-kumo-danger focus-visible:ring-2 focus-visible:ring-kumo-danger":r.keyError}),value:r.key,onChange:e=>u(e.target.value),onKeyDown:m,disabled:s,autoFocus:!0}),r.keyError&&(0,C.jsx)(`span`,{className:`mt-1 text-xs text-kumo-danger`,children:r.keyError})]}):(0,C.jsxs)(`div`,{className:`group/cell flex items-center gap-1.5`,children:[(0,C.jsx)(`code`,{className:`font-medium text-kumo-link`,children:e.key.name}),(0,C.jsx)(b,{text:e.key.name})]})}),(0,C.jsx)(d.Cell,{className:`group/cell max-w-100 font-mono text-[13px]`,children:t&&r?(0,C.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,C.jsx)(`label`,{className:`sr-only`,htmlFor:`edit-value-${e.key.name}`,children:`Value`}),(0,C.jsx)(`textarea`,{id:`edit-value-${e.key.name}`,className:`focus-visible:ring-kumo-ring field-sizing-content max-h-50 min-h-8 w-full resize-none overflow-y-auto rounded border border-kumo-brand bg-kumo-base px-2 py-1.5 font-mono text-[13px] text-kumo-default focus:outline-none focus-visible:ring-2 disabled:bg-kumo-elevated disabled:text-kumo-subtle`,value:r.value,onChange:e=>o({...r,value:e.target.value}),onKeyDown:m,disabled:s}),(0,C.jsxs)(`div`,{className:`flex justify-end gap-1.5`,children:[(0,C.jsx)(a,{variant:`secondary`,size:`sm`,onClick:p,disabled:s,children:`Cancel`}),(0,C.jsx)(a,{variant:`primary`,size:`sm`,onClick:f,disabled:s||h,loading:s,children:s?`Saving...`:`Save`})]})]}):(0,C.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5`,children:[(0,C.jsx)(`span`,{className:i(`min-w-0 truncate`,{"text-kumo-subtle":!e.value}),children:T(e.value)}),e.value&&(0,C.jsx)(b,{text:e.value})]})}),(0,C.jsx)(d.Cell,{className:`text-right whitespace-nowrap`,children:!t&&(0,C.jsx)(E,{onEdit:()=>l(e),onDelete:()=>void n(e.key.name)})})]},e.key.name)})})]})})}function O({onSearch:e,disabled:t=!1}){let[n,r]=(0,x.useState)(``);return(0,C.jsxs)(`form`,{className:`flex items-center gap-2`,onSubmit:t=>{t.preventDefault(),e(n)},children:[(0,C.jsx)(`label`,{className:`sr-only`,htmlFor:`search-prefix`,children:`Search keys by prefix`}),(0,C.jsx)(`input`,{id:`search-prefix`,className:`focus-visible:ring-kumo-ring h-9 max-w-100 flex-1 rounded-md border border-kumo-fill bg-kumo-base px-3 font-mono text-sm text-kumo-default focus:border-kumo-brand focus:outline-none focus-visible:ring-2 disabled:bg-kumo-elevated disabled:text-kumo-subtle`,placeholder:`Search keys by prefix...`,value:n,onChange:e=>r(e.target.value),disabled:t}),(0,C.jsx)(a,{type:`submit`,variant:`secondary`,disabled:t,children:`Search`})]})}var k=(e,t)=>e.filter(e=>e.key.name!==t),A=(e,t,n)=>e.map(e=>e.key.name===t?{key:{name:t},value:n}:e),j=(e,t)=>[t,...e],M=(e,t)=>e.some(e=>e.key.name===t),N=v(`__root__`);function P(e){if(typeof e!=`object`||!e||!(`errors`in e))return!1;let{errors:t}=e;return t?.some(e=>e.code===10009)??!1}async function F(e,t){let n=new Map;return await Promise.all(t.map(async t=>{try{let r=await y({path:{namespace_id:e,key_name:t.name},parseAs:`text`});n.set(t,r.data??null)}catch(e){if(P(e)){n.set(t,null);return}throw e}})),n}function I(){let{namespaceId:e}=_.useParams(),t=_.useLoaderData(),n=N.useLoaderData(),i=r(),o=(0,x.useMemo)(()=>ee(n.workers,i.location.searchStr)?.bindings?.kv?.find(t=>t.id===e)?.bindingName,[n.workers,i.location.searchStr,e]),[s,c]=(0,x.useState)(t.entries),[u,d]=(0,x.useState)(t.cursor),[v,b]=(0,x.useState)(t.hasMore),[S,T]=(0,x.useState)(null),[E,P]=(0,x.useState)(!1),[I,L]=(0,x.useState)(null),[R,z]=(0,x.useState)(!1),[B,V]=(0,x.useState)(!1),[H,U]=(0,x.useState)(null),[W,G]=(0,x.useState)(!1),[K,q]=(0,x.useState)(0),[J,Y]=(0,x.useState)(void 0);(0,x.useEffect)(()=>{c(t.entries),d(t.cursor),b(t.hasMore),T(null),P(!1),U(null),G(!1),L(null),Y(void 0),z(!1),V(!1)},[t]);let X=(0,x.useCallback)(async(t,n)=>{try{t?V(!0):(z(!0),c([])),L(null);let r=await g({path:{namespace_id:e},query:{cursor:t,limit:50,prefix:n}}),i=r.data?.result??[],a=new Map;i.length>0&&(a=await F(e,i));let o=i.map(e=>({key:e,value:a.get(e)??null}));c(t?e=>[...e,...o]:o);let s=r.data?.result_info?.cursor;d(s??null),b(!!s)}catch(e){L(e instanceof Error?e.message:`Failed to fetch entries`)}finally{z(!1),V(!1)}},[e]),te=()=>{u&&!B&&X(u,J)},ne=e=>{let t=e||void 0;Y(t),X(void 0,t)},Z=async t=>{try{return(await y({path:{namespace_id:e,key_name:t}})).response.ok}catch{return!1}},re=async(e,t)=>{try{return await Z(e)?(U({key:e,value:t}),!1):(await Q(e,t),!0)}catch(e){return L(e instanceof Error?e.message:`Failed to add entry`),!1}},Q=async(t,n,r=!1)=>{await h({path:{namespace_id:e,key_name:t},body:n});let i={key:{name:t},value:n};c(e=>{let n=M(e,t),a=k(e,t);return n||!r?j(a,i):a})},ie=async(e,t,n)=>{try{return e!==t&&await Z(t)?(U({key:t,value:n,originalKey:e}),!1):(await $(e,t,n),!0)}catch(e){return L(e instanceof Error?e.message:`Failed to save entry`),!1}},$=async(t,n,r,i=!1)=>{await h({path:{namespace_id:e,key_name:n},body:r}),t!==n&&await m({path:{namespace_id:e,key_name:t}});let a={key:{name:n},value:r};c(e=>{let o=t===n?e:k(e,t);return M(o,n)?A(o,n,r):i?o:j(o,a)})};return(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(f,{icon:p,title:`KV`,items:[(0,C.jsx)(`span`,{className:`flex items-center gap-1.5`,children:o&&o!==e?(0,C.jsxs)(C.Fragment,{children:[o,(0,C.jsxs)(`span`,{className:`text-kumo-subtle`,children:[`(`,e,`)`]})]}):e},`namespace-id`)]}),(0,C.jsxs)(`div`,{className:`px-6 py-6`,children:[I&&(0,C.jsx)(`div`,{className:`mb-4 rounded-md border border-kumo-danger/20 bg-kumo-danger/8 p-4 text-kumo-danger`,children:I}),(0,C.jsx)(O,{onSearch:ne,disabled:R},e),(0,C.jsx)(`hr`,{className:`my-4 border-kumo-fill`}),(0,C.jsx)(w,{onAdd:re,clearSignal:K}),R?(0,C.jsx)(`div`,{className:`p-12 text-center text-kumo-subtle`,children:`Loading...`}):s.length===0?(0,C.jsx)(`div`,{className:`flex flex-col items-center justify-center space-y-2 p-12 text-center text-kumo-subtle`,children:J?(0,C.jsx)(`p`,{className:`text-sm font-light`,children:`No keys found matching prefix "${J}".`}):(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(`h2`,{className:`text-2xl font-medium`,children:`No keys in this namespace`}),(0,C.jsx)(`p`,{className:`text-sm font-light`,children:`Add an entry using the form above.`})]})}):(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(`div`,{className:`rounded-lg`,children:(0,C.jsx)(D,{entries:s,onSave:ie,onDelete:e=>T(e)})}),v&&(0,C.jsx)(`div`,{className:`py-4 text-center`,children:(0,C.jsx)(a,{variant:`secondary`,onClick:te,disabled:B,loading:B,children:B?`Loading...`:`Load More`})})]}),(0,C.jsx)(l.Root,{open:S!==null,onOpenChange:e=>!e&&T(null),children:(0,C.jsxs)(l,{className:`p-6`,children:[(0,C.jsx)(l.Title,{className:`mb-4 text-lg font-semibold`,children:`Delete key?`}),(0,C.jsxs)(l.Description,{className:`mb-2 text-kumo-subtle`,children:[`Are you sure you want to delete “`,S,`”? This cannot be undone.`]}),(0,C.jsxs)(`div`,{className:`mt-6 flex justify-end gap-2`,children:[(0,C.jsx)(a,{variant:`secondary`,onClick:()=>T(null),disabled:E,children:`Cancel`}),(0,C.jsx)(a,{variant:`destructive`,onClick:async()=>{if(S)try{P(!0),await m({path:{namespace_id:e,key_name:S}}),c(e=>k(e,S)),T(null)}catch(e){L(e instanceof Error?e.message:`Failed to delete`),T(null)}finally{P(!1)}},disabled:E,loading:E,children:E?`Deleting...`:`Delete`})]})]})}),(0,C.jsx)(l.Root,{open:H!==null,onOpenChange:e=>!e&&U(null),children:(0,C.jsxs)(l,{className:`p-6`,children:[(0,C.jsx)(l.Title,{className:`mb-4 text-lg font-semibold`,children:`Overwrite key?`}),(0,C.jsxs)(l.Description,{className:`mb-2 text-kumo-subtle`,children:[`Key “`,H?.key,`” already exists. Do you want to overwrite its value?`]}),(0,C.jsxs)(`div`,{className:`mt-6 flex justify-end gap-2`,children:[(0,C.jsx)(a,{variant:`secondary`,onClick:()=>U(null),disabled:W,children:`Cancel`}),(0,C.jsx)(a,{variant:`primary`,onClick:async()=>{if(!H)return;let{key:e,value:t,originalKey:n}=H;try{G(!0),n?await $(n,e,t,!0):(await Q(e,t,!0),q(e=>e+1)),U(null)}catch(e){L(e instanceof Error?e.message:`Failed to overwrite`)}finally{G(!1)}},disabled:W,loading:W,children:W?`Overwriting...`:`Overwrite`})]})]})})]})]})}export{I as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./ResourceError-DNadec0F.js";var t=e;export{t as errorComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Et as e}from"./index-BHW_FKpE.js";var t=e;export{t as notFoundComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,n as t,t as n}from"./react-BZY8YNV6.js";import{n as r}from"./useRouterState-BLq6Ai_6.js";import{t as i}from"./link-DadJAPnd.js";import{a,i as o,n as s,r as c,t as l}from"./TableSelect-DgjN53ZF.js";import{r as u}from"./button-cdxnqcgzwko8ooha-CjoTKpgy.js";import{t as d}from"./Pencil.es-CDpuGAys.js";import{t as f}from"./Trash.es-DTqwcb2_.js";import{n as p,t as m}from"./Breadcrumbs-BlzUUgNz.js";import{mn as h,n as g,r as _,wt as v}from"./index-BHW_FKpE.js";var y=e(n()),b=t();function x(){let e=g.useParams(),t=g.useLoaderData(),{namespaceId:n,objectId:x,objectName:S}=t,C=g.useSearch(),w=h(),T=r(),E=(0,y.useRef)(C.table),D=(0,y.useRef)(null),[O,k]=(0,y.useState)(C.table),[A,j]=(0,y.useState)(!1),[M,N]=(0,y.useState)(null),P=(0,y.useMemo)(()=>new _(n,x,S),[n,x,S]),F=(0,y.useMemo)(()=>({namespaceId:n,objectId:e.objectId,type:`do`}),[n,e.objectId]),I=(0,y.useCallback)(e=>{k(e),E.current!==e&&(E.current=e,w({replace:!0,search:t=>({...t,table:e}),to:`.`}))},[w]),L=(0,y.useCallback)(async()=>{j(!0);try{await Promise.all([T.invalidate(),D.current?.refreshSchema(),new Promise(e=>setTimeout(e,250))])}finally{j(!1)}},[T]),R=(0,y.useCallback)(async()=>{await L(),w({replace:!0,search:e=>({...e,table:void 0}),to:`.`})},[L,w]),z=(0,y.useCallback)(()=>{O&&N({schemaName:`main`,tableName:O})},[O]),B=(0,y.useCallback)(()=>{N(null)},[]),V=(0,y.useCallback)(()=>{M&&(D.current?.closeTableTabs(M.schemaName,M.tableName),R())},[M,R]),H=e.objectId.length>16?`${e.objectId.slice(0,8)}...${e.objectId.slice(-8)}`:e.objectId;return(0,b.jsxs)(`div`,{className:`flex h-full flex-col`,children:[(0,b.jsxs)(m,{icon:v,items:[(0,b.jsx)(i,{className:`flex items-center gap-1.5`,params:{className:e.className},to:`/do/$className`,children:e.className},`class-name`),(0,b.jsxs)(`span`,{className:`flex items-center gap-1 font-mono text-xs [&_button]:opacity-100`,title:e.objectId,children:[H,(0,b.jsx)(p.Clipboard,{text:e.objectId})]},`object-id`),(0,b.jsx)(l,{selectedTable:C.table,studioRef:D,tables:t.tables},`table-selector`)],title:`Durable Objects`,children:[(0,b.jsx)(`div`,{className:`flex-1`}),(0,b.jsx)(u,{"aria-label":`Refresh tables`,className:`disabled:cursor-progress`,disabled:A,onClick:L,shape:`square`,children:(0,b.jsx)(a,{className:A?`animate-spin`:void 0,size:14})}),(0,b.jsx)(s,{currentTable:O,driver:P}),(0,b.jsx)(u,{"aria-label":`Edit table schema`,disabled:!O,icon:d,onClick:()=>{O&&D.current?.openEditTableTab(`main`,O)},children:`Edit Schema`}),(0,b.jsx)(u,{"aria-label":`Delete table`,disabled:!O,icon:f,onClick:z,variant:`secondary-destructive`,children:`Delete Table`})]}),M&&(0,b.jsx)(c,{closeModal:B,driver:P,isOpen:!0,onSuccess:V,schemaName:M.schemaName,tableName:M.tableName}),(0,b.jsx)(`div`,{className:`flex-1 overflow-hidden`,children:(0,b.jsx)(o,{driver:P,initialTable:C.table,onTableChange:I,ref:D,resource:F},`${n}-${e.objectId}`)})]})}export{x as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./ResourceError-DNadec0F.js";var t=e;export{t as errorComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./react-BZY8YNV6.js";import{fn as t}from"./index-BHW_FKpE.js";var n=e(),r=()=>(0,n.jsx)(t,{});export{r as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Et as e}from"./index-BHW_FKpE.js";var t=e;export{t as notFoundComponent};
|