denchclaw 3.0.2 → 3.0.3
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/apps/web/.next/standalone/apps/web/.env +3 -0
- package/apps/web/.next/standalone/apps/web/.next/BUILD_ID +1 -1
- package/apps/web/.next/standalone/apps/web/.next/app-build-manifest.json +270 -270
- package/apps/web/.next/standalone/apps/web/.next/app-path-routes-manifest.json +45 -45
- package/apps/web/.next/standalone/apps/web/.next/build-manifest.json +3 -3
- package/apps/web/.next/standalone/apps/web/.next/cache/config.json +3 -3
- package/apps/web/.next/standalone/apps/web/.next/prerender-manifest.json +3 -3
- package/apps/web/.next/standalone/apps/web/.next/required-server-files.json +5 -5
- package/apps/web/.next/standalone/apps/web/.next/routes-manifest.json +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/_not-found/page.js +2 -2
- package/apps/web/.next/standalone/apps/web/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/apps/cron/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/apps/cron/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/apps/proxy/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/apps/proxy/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/apps/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/apps/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/apps/serve/[...path]/route.js +2 -2
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/apps/serve/[...path]/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/apps/store/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/apps/store/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/apps/webhooks/[...path]/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/apps/webhooks/[...path]/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/chat/active/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/chat/active/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/chat/route.js +2 -2
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/chat/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/chat/runs/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/chat/runs/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/chat/stop/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/chat/stop/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/chat/stream/route.js +2 -2
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/chat/stream/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/chat/subagents/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/chat/subagents/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/composio/callback/route.js +2 -2
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/composio/callback/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/composio/connect/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/composio/connect/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/composio/connections/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/composio/connections/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/composio/disconnect/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/composio/disconnect/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/composio/status/route.js +2 -2
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/composio/status/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/composio/toolkits/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/composio/toolkits/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/crm/calendar/[id]/route.js +12 -12
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/crm/calendar/[id]/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/crm/calendar/route.js +3 -3
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/crm/calendar/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/crm/companies/[id]/route.js +2 -2
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/crm/companies/[id]/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/crm/enrich/[type]/[id]/route.js +2 -2
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/crm/enrich/[type]/[id]/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/crm/inbox/[threadId]/route.js +2 -2
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/crm/inbox/[threadId]/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/crm/inbox/route.js +55 -55
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/crm/inbox/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/crm/people/[id]/activity/route.js +3 -3
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/crm/people/[id]/activity/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/crm/people/[id]/route.js +2 -2
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/crm/people/[id]/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/crm/people/route.js +3 -3
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/crm/people/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/crm/photos/proxy/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/crm/photos/proxy/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/crm/photos/sync/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/crm/photos/sync/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/cron/jobs/[jobId]/runs/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/cron/jobs/[jobId]/runs/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/cron/jobs/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/cron/jobs/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/cron/runs/[sessionId]/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/cron/runs/[sessionId]/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/cron/runs/search-transcript/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/cron/runs/search-transcript/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/feedback/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/feedback/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/gateway/channels/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/gateway/channels/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/gateway/chat/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/gateway/chat/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/gateway/chat/stream/route.js +2 -2
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/gateway/chat/stream/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/gateway/sessions/[id]/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/gateway/sessions/[id]/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/gateway/sessions/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/gateway/sessions/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/integrations/[id]/toggle/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/integrations/[id]/toggle/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/integrations/repair/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/integrations/repair/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/integrations/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/integrations/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/memories/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/memories/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/onboarding/connections/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/onboarding/connections/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/onboarding/dench-cloud/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/onboarding/dench-cloud/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/onboarding/identity/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/onboarding/identity/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/onboarding/state/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/onboarding/state/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/onboarding/sync/progress/route.js +2 -2
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/onboarding/sync/progress/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/onboarding/sync/start/route.js +2 -2
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/onboarding/sync/start/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/profiles/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/profiles/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/profiles/switch/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/profiles/switch/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/sessions/[sessionId]/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/sessions/[sessionId]/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/sessions/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/sessions/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/settings/cloud/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/settings/cloud/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/skills/[slug]/content/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/skills/[slug]/content/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/skills/[slug]/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/skills/[slug]/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/skills/browse/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/skills/browse/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/skills/install/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/skills/install/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/skills/route.js +2 -2
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/skills/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/sync/poll-tick/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/sync/poll-tick/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/sync/refresh/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/sync/refresh/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/sync/status/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/sync/status/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/terminal/port/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/terminal/port/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/voice/speech/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/voice/speech/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/voice/transcribe/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/voice/transcribe/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/voice/voices/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/voice/voices/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/web-sessions/[id]/messages/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/web-sessions/[id]/messages/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/web-sessions/[id]/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/web-sessions/[id]/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/web-sessions/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/web-sessions/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/assets/[...path]/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/assets/[...path]/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/browse/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/browse/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/browse-file/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/browse-file/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/context/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/context/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/copy/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/copy/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/db/introspect/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/db/introspect/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/db/query/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/db/query/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/delete/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/delete/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/execute/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/execute/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/file/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/file/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/init/route.js +2 -2
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/init/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/link-preview/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/link-preview/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/list/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/list/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/mkdir/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/mkdir/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/move/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/move/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/actions/route.js +2 -2
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/actions/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/actions/runs/route.js +2 -2
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/actions/runs/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/display-field/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/display-field/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/entries/[id]/content/route.js +2 -2
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/entries/[id]/content/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/entries/[id]/route.js +2 -2
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/entries/[id]/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/entries/bulk-delete/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/entries/bulk-delete/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/entries/options/route.js +2 -2
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/entries/options/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/entries/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/entries/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/fields/[fieldId]/enum-rename/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/fields/[fieldId]/enum-rename/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/fields/[fieldId]/route.js +2 -2
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/fields/[fieldId]/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/fields/reorder/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/fields/reorder/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/fields/route.js +2 -2
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/fields/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/icon/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/icon/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/route.js +2 -2
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/views/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/objects/[name]/views/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/open-file/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/open-file/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/path-info/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/path-info/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/query/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/query/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/raw-file/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/raw-file/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/rename/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/rename/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/reports/execute/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/reports/execute/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/search-index/route.js +2 -2
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/search-index/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/suggest-files/route.js +2 -2
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/suggest-files/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/switch/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/switch/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/thumbnail/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/thumbnail/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/tree/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/tree/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/upload/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/upload/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/virtual-file/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/virtual-file/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/watch/route.js +2 -2
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/watch/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/write-binary/route.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/api/workspace/write-binary/route_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/onboarding/page.js +3 -3
- package/apps/web/.next/standalone/apps/web/.next/server/app/onboarding/page.js.nft.json +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/onboarding/page_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/page.js +8 -8
- package/apps/web/.next/standalone/apps/web/.next/server/app/page.js.nft.json +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/page_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/workspace/page.js +2 -2
- package/apps/web/.next/standalone/apps/web/.next/server/app/workspace/page.js.nft.json +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app/workspace/page_client-reference-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/app-paths-manifest.json +45 -45
- package/apps/web/.next/standalone/apps/web/.next/server/chunks/10684.js +2 -2
- package/apps/web/.next/standalone/apps/web/.next/server/chunks/22477.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/chunks/83673.js +15 -0
- package/apps/web/.next/standalone/apps/web/.next/server/functions-config-manifest.json +33 -33
- package/apps/web/.next/standalone/apps/web/.next/server/middleware-build-manifest.js +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/pages/500.html +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/pages-manifest.json +1 -1
- package/apps/web/.next/standalone/apps/web/.next/server/server-reference-manifest.json +1 -1
- package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/_not-found/page-34ba45b7a65b67f2.js +1 -0
- package/apps/web/.next/{static/chunks/app/global-error-1bc925390c69d878.js → standalone/apps/web/.next/static/chunks/app/global-error-a5d3e037e55fb373.js} +1 -1
- package/apps/web/.next/{static/chunks/app/layout-f4f08d1ad091b70b.js → standalone/apps/web/.next/static/chunks/app/layout-ea7c8d3b62d26ae8.js} +1 -1
- package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/onboarding/{page-dbd74d39e3496aab.js → page-843f5c7d95580a57.js} +1 -1
- package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/{page-6c87f60a52518001.js → page-def4445c2914d3c7.js} +1 -1
- package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/workspace/{page-91860e80d85899e8.js → page-2e4a0cbe1fb0520e.js} +1 -1
- package/apps/web/.next/standalone/apps/web/.next/static/chunks/main-app-d8ac5ee8fad9c4e6.js +1 -0
- package/apps/web/.next/standalone/apps/web/node_modules/@esbuild/{linux-x64 → darwin-arm64}/bin/esbuild +0 -0
- package/apps/web/.next/standalone/apps/web/node_modules/@esbuild/{linux-x64 → darwin-arm64}/package.json +4 -4
- package/apps/web/.next/standalone/apps/web/node_modules/@img/sharp-darwin-arm64/lib/sharp-darwin-arm64.node +0 -0
- package/apps/web/.next/standalone/apps/web/node_modules/@img/{sharp-linux-x64 → sharp-darwin-arm64}/package.json +7 -13
- package/apps/web/.next/standalone/apps/web/node_modules/@img/{sharp-libvips-linux-x64/lib/libvips-cpp.so.8.17.3 → sharp-libvips-darwin-arm64/lib/libvips-cpp.8.17.3.dylib} +0 -0
- package/apps/web/.next/standalone/apps/web/node_modules/@img/{sharp-libvips-linux-x64 → sharp-libvips-darwin-arm64}/package.json +5 -11
- package/apps/web/.next/standalone/apps/web/server.js +1 -1
- package/apps/web/.next/standalone/extensions/posthog-analytics/lib/build-env.js +1 -1
- package/apps/web/.next/standalone/package.json +3 -2
- package/apps/web/.next/static/chunks/app/_not-found/page-34ba45b7a65b67f2.js +1 -0
- package/apps/web/.next/{standalone/apps/web/.next/static/chunks/app/global-error-1bc925390c69d878.js → static/chunks/app/global-error-a5d3e037e55fb373.js} +1 -1
- package/apps/web/.next/{standalone/apps/web/.next/static/chunks/app/layout-f4f08d1ad091b70b.js → static/chunks/app/layout-ea7c8d3b62d26ae8.js} +1 -1
- package/apps/web/.next/static/chunks/app/onboarding/{page-dbd74d39e3496aab.js → page-843f5c7d95580a57.js} +1 -1
- package/apps/web/.next/static/chunks/app/{page-6c87f60a52518001.js → page-def4445c2914d3c7.js} +1 -1
- package/apps/web/.next/static/chunks/app/workspace/{page-91860e80d85899e8.js → page-2e4a0cbe1fb0520e.js} +1 -1
- package/apps/web/.next/static/chunks/main-app-d8ac5ee8fad9c4e6.js +1 -0
- package/assets/seed/workspace.duckdb +0 -0
- package/dist/entry.js +1 -1
- package/dist/{program-DkbQrUbR.js → program-CX_f4ysH.js} +7 -6
- package/dist/{run-main-C8K-k6-d.js → run-main-RQeyyBrT.js} +1 -1
- package/extensions/posthog-analytics/lib/build-env.js +1 -1
- package/package.json +3 -2
- package/apps/web/.next/standalone/apps/web/.next/server/chunks/6787.js +0 -15
- package/apps/web/.next/standalone/apps/web/.next/static/chunks/app/_not-found/page-139ff89c1888b4b6.js +0 -1
- package/apps/web/.next/standalone/apps/web/.next/static/chunks/main-app-e2066e8cc4690474.js +0 -1
- package/apps/web/.next/standalone/apps/web/node_modules/@img/sharp-libvips-linuxmusl-x64/lib/index.js +0 -1
- package/apps/web/.next/standalone/apps/web/node_modules/@img/sharp-libvips-linuxmusl-x64/lib/libvips-cpp.so.8.17.3 +0 -0
- package/apps/web/.next/standalone/apps/web/node_modules/@img/sharp-libvips-linuxmusl-x64/package.json +0 -42
- package/apps/web/.next/standalone/apps/web/node_modules/@img/sharp-libvips-linuxmusl-x64/versions.json +0 -30
- package/apps/web/.next/standalone/apps/web/node_modules/@img/sharp-linux-x64/lib/sharp-linux-x64.node +0 -0
- package/apps/web/.next/standalone/apps/web/node_modules/@img/sharp-linuxmusl-x64/LICENSE +0 -191
- package/apps/web/.next/standalone/apps/web/node_modules/@img/sharp-linuxmusl-x64/lib/sharp-linuxmusl-x64.node +0 -0
- package/apps/web/.next/standalone/apps/web/node_modules/@img/sharp-linuxmusl-x64/package.json +0 -46
- package/apps/web/.next/static/chunks/app/_not-found/page-139ff89c1888b4b6.js +0 -1
- package/apps/web/.next/static/chunks/main-app-e2066e8cc4690474.js +0 -1
- /package/apps/web/.next/standalone/apps/web/.next/static/{uNyuud6_Cxsbl9z1OjCUW → 943kaCHy9rwpDBll6vsXk}/_buildManifest.js +0 -0
- /package/apps/web/.next/standalone/apps/web/.next/static/{uNyuud6_Cxsbl9z1OjCUW → 943kaCHy9rwpDBll6vsXk}/_ssgManifest.js +0 -0
- /package/apps/web/.next/standalone/apps/web/node_modules/@img/{sharp-linux-x64 → sharp-darwin-arm64}/LICENSE +0 -0
- /package/apps/web/.next/standalone/apps/web/node_modules/@img/{sharp-libvips-linux-x64 → sharp-libvips-darwin-arm64}/lib/index.js +0 -0
- /package/apps/web/.next/standalone/apps/web/node_modules/@img/{sharp-libvips-linux-x64 → sharp-libvips-darwin-arm64}/versions.json +0 -0
- /package/apps/web/.next/static/{uNyuud6_Cxsbl9z1OjCUW → 943kaCHy9rwpDBll6vsXk}/_buildManifest.js +0 -0
- /package/apps/web/.next/static/{uNyuud6_Cxsbl9z1OjCUW → 943kaCHy9rwpDBll6vsXk}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[69566],{113:()=>{},5582:(e,t,r)=>{"use strict";r.d(t,{OnboardingWizard:()=>er});var n=r(80534),o=r(74166),l=r(5742);let a=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;function s(e){var t,r,l,s;let{state:c,onAdvance:d,onTypingChange:u}=e,[h,p]=(0,o.useState)(null!=(l=null==(t=c.identity)?void 0:t.name)?l:""),[m,x]=(0,o.useState)(null!=(s=null==(r=c.identity)?void 0:r.email)?s:""),[f,v]=(0,o.useState)(!1),[g,y]=(0,o.useState)(null);async function j(e){e.preventDefault(),y(null);let t=h.trim(),r=m.trim();if(!t)return void y("Please enter your name.");if(!a.test(r))return void y("Please enter a valid email address.");v(!0);try{var n,o;if("welcome"===c.currentStep){let e=await fetch("/api/onboarding/state",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({from:"welcome",to:"identity"})});if(!e.ok){let t=await e.json().catch(()=>({}));throw Error(null!=(n=t.error)?n:"HTTP ".concat(e.status))}}let e=await fetch("/api/onboarding/identity",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:t,email:r})});if(!e.ok){let t=await e.json().catch(()=>({}));throw Error(null!=(o=t.error)?o:"HTTP ".concat(e.status))}let l=await e.json();d(l)}catch(e){y(e instanceof Error?e.message:"Could not save identity.")}finally{v(!1)}}let w={height:40,width:"100%",padding:"0 12px",borderRadius:8,border:"1px solid var(--color-border)",background:"var(--color-surface, var(--color-background))",color:"var(--color-text)",fontSize:14,outline:"none",transition:"border-color 120ms ease, box-shadow 120ms ease"};return(0,n.jsxs)("form",{className:"flex flex-col items-center gap-7 text-center",onSubmit:e=>void j(e),children:[(0,n.jsxs)("div",{className:"mb-4 space-y-2",children:[(0,n.jsx)("h1",{className:"whitespace-nowrap font-instrument text-[46px] leading-[1.05] tracking-tight",style:{color:"var(--color-text)"},children:"Let's set up your local workspace"}),(0,n.jsx)("p",{className:"text-[12.5px]",style:{color:"var(--color-text-muted)"},children:"Everything you know about people, finally in one place."})]}),(0,n.jsxs)("div",{className:"flex w-full flex-col gap-3.5",children:[(0,n.jsx)(i,{label:"Full name",htmlFor:"onboarding-name",children:(0,n.jsx)("input",{id:"onboarding-name",type:"text",placeholder:"Vedant",value:h,onChange:e=>{var t;p(t=e.target.value),null==u||u({name:t,email:m})},autoComplete:"name",autoFocus:!0,disabled:f,style:w,onFocus:e=>{e.currentTarget.style.borderColor="var(--color-accent)",e.currentTarget.style.boxShadow="0 0 0 3px color-mix(in oklab, var(--color-accent) 18%, transparent)"},onBlur:e=>{e.currentTarget.style.borderColor="var(--color-border)",e.currentTarget.style.boxShadow="none"}})}),(0,n.jsx)(i,{label:"Work email",htmlFor:"onboarding-email",children:(0,n.jsx)("input",{id:"onboarding-email",type:"email",placeholder:"name@company.com",value:m,onChange:e=>{var t;x(t=e.target.value),null==u||u({name:h,email:t})},autoComplete:"email",disabled:f,style:w,onFocus:e=>{e.currentTarget.style.borderColor="var(--color-accent)",e.currentTarget.style.boxShadow="0 0 0 3px color-mix(in oklab, var(--color-accent) 18%, transparent)"},onBlur:e=>{e.currentTarget.style.borderColor="var(--color-border)",e.currentTarget.style.boxShadow="none"}})})]}),g&&(0,n.jsx)("p",{role:"alert",className:"w-full rounded-md px-3 py-2 text-left text-[12.5px]",style:{background:"rgba(239, 68, 68, 0.08)",color:"var(--color-error, #ef4444)",border:"1px solid rgba(239, 68, 68, 0.2)"},children:g}),(0,n.jsx)("button",{type:"submit",disabled:f,className:"flex h-10 w-full items-center justify-center rounded-lg text-[13.5px] font-medium transition-opacity focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:opacity-60",style:{background:"var(--color-accent)",color:"#fff"},onMouseEnter:e=>{f||(e.currentTarget.style.opacity="0.92")},onMouseLeave:e=>{e.currentTarget.style.opacity="1"},children:f?"Saving…":"Continue"}),(0,n.jsx)("p",{className:"text-[11.5px]",style:{color:"var(--color-text-muted)"},children:"Your data stays on this device."})]})}function i(e){let{label:t,htmlFor:r,children:o}=e;return(0,n.jsxs)("div",{className:"flex flex-col gap-1.5 text-left",children:[(0,n.jsx)("label",{htmlFor:r,className:"text-[11.5px] font-medium uppercase tracking-[0.06em]",style:{color:"var(--color-text-muted)"},children:t}),o]})}function c(e){let{icon:t,title:r,description:o,status:l,statusLabel:a,secondaryLabel:s,actions:i,disabledReason:c,required:u,id:h}=e,p="blocked"===l,m="connected"===l,x=p&&c;return(0,n.jsxs)("div",{id:h,className:"group flex items-center gap-4 py-4",style:{opacity:p?.55:1},children:[(0,n.jsx)("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center",children:t}),(0,n.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("h3",{className:"text-[14px] font-medium tracking-tight",style:{color:"var(--color-text)"},children:r}),m&&(0,n.jsx)(d,{}),!m&&u&&(0,n.jsx)("span",{className:"text-[10.5px] font-medium uppercase tracking-[0.1em]",style:{color:"var(--color-text-muted)",opacity:.7},children:"Required"}),a&&!m&&(0,n.jsx)("span",{className:"text-[10.5px] font-medium uppercase tracking-[0.1em]",style:{color:"var(--color-text-muted)",opacity:.7},children:a})]}),(0,n.jsx)("p",{className:"mt-0.5 truncate text-[12.5px]",style:{color:"var(--color-text-muted)"},children:x?c:null!=s?s:o})]}),null!=i&&(0,n.jsx)("div",{className:"shrink-0",children:i})]})}function d(){return(0,n.jsx)("span",{"aria-label":"Connected",className:"inline-flex h-4 w-4 items-center justify-center rounded-full",style:{background:"rgba(22, 163, 74, 0.15)",color:"var(--color-success, #16a34a)"},children:(0,n.jsx)("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:(0,n.jsx)("path",{d:"M20 6 9 17l-5-5"})})})}function u(e){let{children:t,onClick:r,disabled:o,type:l="button"}=e;return(0,n.jsx)("button",{type:l,onClick:r,disabled:o,className:"inline-flex h-8 items-center justify-center rounded-md px-3 text-[12.5px] font-medium transition-opacity focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:opacity-45",style:{background:"var(--color-text)",color:"var(--color-background)"},onMouseEnter:e=>{o||(e.currentTarget.style.opacity="0.86")},onMouseLeave:e=>{e.currentTarget.style.opacity="1"},children:t})}function h(e){let{children:t,onClick:r,disabled:o}=e;return(0,n.jsx)("button",{type:"button",onClick:r,disabled:o,className:"text-[12.5px] underline-offset-4 transition-colors hover:underline disabled:opacity-50",style:{color:"var(--color-text-muted)"},children:t})}function p(){return(0,n.jsx)("img",{src:"/dench-workspace-icon.png",alt:"",width:28,height:28,draggable:!1,style:{borderRadius:6}})}function m(){return(0,n.jsxs)("svg",{width:"26",height:"26",viewBox:"0 0 256 193",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,children:[(0,n.jsx)("path",{d:"M58.182 192.05V93.14L27.507 65.077 0 49.504v125.091c0 9.658 7.825 17.455 17.455 17.455h40.727Z",fill:"#4285F4"}),(0,n.jsx)("path",{d:"M197.818 192.05h40.727c9.659 0 17.455-7.826 17.455-17.455V49.505l-31.156 17.837-26.983 25.798-.043 98.91Z",fill:"#34A853"}),(0,n.jsx)("path",{d:"m58.182 93.14-4.174-38.655 4.174-36.945L128 69.868l69.818-52.327 4.67 34.14-4.67 41.46L128 145.467l-69.818-52.326Z",fill:"#EA4335"}),(0,n.jsx)("path",{d:"M197.818 17.538V93.14L256 49.504V26.272c0-21.564-24.61-33.858-41.89-20.89L197.818 17.54Z",fill:"#FBBC04"}),(0,n.jsx)("path",{d:"M0 49.504l26.759 20.069L58.182 93.14V17.538L41.89 5.382C24.59-7.587 0 4.708 0 26.27v23.233Z",fill:"#C5221F"})]})}function x(){return(0,n.jsx)("img",{src:"/logos/google-calendar.png",alt:"",width:26,height:26,draggable:!1})}function f(e){var t,r,l,a,s,i;let{state:d,onAdvance:f,onStageChange:g,onRefresh:y}=e,[j,w]=(0,o.useState)(null),[b,k]=(0,o.useState)(!0),[S,N]=(0,o.useState)(""),[C,_]=(0,o.useState)(!1),[T,E]=(0,o.useState)(!1),[M,F]=(0,o.useState)(null),[L,R]=(0,o.useState)(null),[z,A]=(0,o.useState)(null),[P,B]=(0,o.useState)(!1),O=(0,o.useRef)(null),V=(0,o.useRef)(null),D=(0,o.useRef)(null),I=!!(d.denchCloud&&!d.denchCloud.skipped||(null==j?void 0:j.configured)),W=!!(null==(t=d.connections)?void 0:t.gmail),H=!!(null==(r=d.connections)?void 0:r.calendar);(0,o.useEffect)(()=>{let e="empty";I&&(e="dench-cloud"),W&&(e="gmail"),H&&(e="calendar"),g(e)},[I,W,H,g]),(0,o.useEffect)(()=>{let e=!1;return(async()=>{try{let t=await fetch("/api/onboarding/dench-cloud",{cache:"no-store"});if(!t.ok)throw Error("HTTP ".concat(t.status));let r=await t.json();if(e)return;w(r)}catch(t){if(e)return;F(t instanceof Error?t.message:"Could not check Dench Cloud.")}finally{e||k(!1)}})(),()=>{e=!0}},[]),(0,o.useEffect)(()=>{!b&&(null==j?void 0:j.configured)&&(d.denchCloud||(async()=>{try{let t=await fetch("/api/onboarding/dench-cloud",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({acceptCli:!0})});if(!t.ok){var e;let r=await t.json().catch(()=>({}));throw Error(null!=(e=r.error)?e:"HTTP ".concat(t.status))}let r=await t.json();f(r)}catch(e){F(e instanceof Error?e.message:"Could not record Dench Cloud.")}})())},[b,null==j?void 0:j.configured,d.denchCloud,f]);let q=(0,o.useCallback)(()=>{null!==V.current&&(window.clearInterval(V.current),V.current=null)},[]),Y=(0,o.useCallback)(async(e,t,r)=>{try{let o=await fetch("/api/onboarding/connections",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({toolkit:e,connectionId:t,toolkitSlug:null!=r?r:"gmail"===e?"gmail":"google-calendar",accountEmail:null,fromStep:"gmail"===e?"connect-gmail":"connect-calendar",toStep:"gmail"===e?"connect-calendar":"backfill"})});if(!o.ok){var n;let e=await o.json().catch(()=>({}));throw Error(null!=(n=e.error)?n:"HTTP ".concat(o.status))}let l=await o.json();f(l)}catch(e){A(e instanceof Error?e.message:"Could not save the connection.")}},[f]);(0,o.useEffect)(()=>{function e(e){var t;let r=e.data;if(!r||"composio-callback"!==r.type||e.origin!==window.location.origin)return;let n=D.current;if(q(),O.current=null,R(null),D.current=null,n){if("success"!==r.status||!r.connected_account_id)return void A("Connection was not completed. Please try again.");y(),Y(n,r.connected_account_id,null!=(t=r.connected_toolkit_slug)?t:null)}}return window.addEventListener("message",e),()=>window.removeEventListener("message",e)},[Y,y,q]),(0,o.useEffect)(()=>()=>q(),[q]);let Z=(0,o.useCallback)(async e=>{R(e),A(null),D.current=e;try{var t,r;let n="gmail"===e?"gmail":"google-calendar",o=await fetch("/api/composio/connect",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({toolkit:n})}),l=await o.json();if(!o.ok||!l.redirect_url)throw Error(null!=(r=l.error)?r:"HTTP ".concat(o.status));let a=window.open(l.redirect_url,"_blank","popup=yes,width=560,height=720,resizable=yes,scrollbars=yes");if(!a)throw Error("Popup was blocked. Allow popups for DenchClaw and try again.");O.current=a,null==(t=a.focus)||t.call(a),V.current=window.setInterval(()=>{let e=O.current;e&&e.closed&&(q(),O.current=null,D.current&&(D.current=null,R(null),A("The connection window was closed before authorization finished.")))},500)}catch(e){R(null),D.current=null,A(e instanceof Error?e.message:"Could not start the connection.")}},[q]);async function J(e){e.preventDefault(),F(null);let t=S.trim();if(!t)return void F("Paste your Dench Cloud API key to continue.");_(!0);try{let e=await fetch("/api/onboarding/dench-cloud",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiKey:t})});if(!e.ok){var r;let t=await e.json().catch(()=>({}));throw Error(null!=(r=t.error)?r:"HTTP ".concat(e.status))}let n=await e.json();f(n),E(!1),N("")}catch(e){F(e instanceof Error?e.message:"Could not save the API key.")}finally{_(!1)}}async function G(){_(!0),F(null);try{let t=await fetch("/api/onboarding/dench-cloud",{method:"DELETE"});if(!t.ok){var e;let r=await t.json().catch(()=>({}));throw Error(null!=(e=r.error)?e:"HTTP ".concat(t.status))}let r=await t.json();f(r),E(!1)}catch(e){F(e instanceof Error?e.message:"Could not skip.")}finally{_(!1)}}async function K(){A(null),B(!0);try{let t=await fetch("/api/onboarding/state",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({from:"connect-calendar",to:"backfill",skipping:"calendar"})});if(!t.ok){var e;let r=await t.json().catch(()=>({}));throw Error(null!=(e=r.error)?e:"HTTP ".concat(t.status))}let r=await t.json();f(r)}catch(e){A(e instanceof Error?e.message:"Could not skip calendar.")}finally{B(!1)}}let U=!I,$=!W,X=I?"connected":C?"connecting":"idle",Q=I&&W,ee=Q||"backfill"===d.currentStep||"complete"===d.currentStep;async function et(){if(A(null),"backfill"===d.currentStep){f(d),y();return}if("connect-calendar"===d.currentStep&&!H)return void await K();if("connect-calendar"===d.currentStep&&H){B(!0);try{let t=await fetch("/api/onboarding/state",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({from:"connect-calendar",to:"backfill"})});if(!t.ok){var e;let r=await t.json().catch(()=>({}));throw Error(null!=(e=r.error)?e:"HTTP ".concat(t.status))}let r=await t.json();f(r)}catch(e){A(e instanceof Error?e.message:"Could not continue.")}finally{B(!1)}return}y()}return(0,n.jsxs)("div",{className:"space-y-8",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("h1",{className:"font-instrument text-[34px] leading-[1.1] tracking-tight",style:{color:"var(--color-text)"},children:"Connect the three things that matter."}),(0,n.jsx)("p",{className:"mt-3 text-[13.5px] leading-relaxed",style:{color:"var(--color-text-muted)"},children:"Three quick connections and your workspace starts learning."})]}),(0,n.jsxs)("div",{className:"divide-y divide-[var(--color-border)]",children:[(0,n.jsx)(c,{id:"dc-card",required:!0,icon:(0,n.jsx)(p,{}),title:"Dench Cloud",description:"Runs the models that power Gmail and Calendar sync.",secondaryLabel:I?"Connected":"Runs the models that power Gmail and Calendar sync.",status:X,actions:b?(0,n.jsx)("span",{className:"text-[12px]",style:{color:"var(--color-text-muted)"},children:"Checking…"}):I?null:T?(0,n.jsx)(h,{onClick:()=>E(!1),disabled:C,children:"Cancel"}):(0,n.jsx)(u,{onClick:()=>E(!0),children:"Connect"})}),T&&!I&&(0,n.jsxs)("form",{onSubmit:e=>void J(e),className:"ml-14 space-y-3 rounded-xl px-4 py-4",style:{background:"var(--color-surface-hover)",border:"1px solid var(--color-border)"},children:[(0,n.jsxs)("div",{className:"space-y-1.5",children:[(0,n.jsx)("label",{htmlFor:"dench-cloud-key",className:"text-[11px] font-medium uppercase tracking-[0.06em]",style:{color:"var(--color-text-muted)"},children:"Dench Cloud API key"}),(0,n.jsx)("input",{id:"dench-cloud-key",type:"password",placeholder:"dench_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",value:S,onChange:e=>N(e.target.value),autoComplete:"off",autoFocus:!0,disabled:C,className:"w-full rounded-md px-3 py-2 text-[13px] outline-none transition-[border-color,box-shadow]",style:{height:36,border:"1px solid var(--color-border)",background:"var(--color-background)",color:"var(--color-text)"},onFocus:e=>{e.currentTarget.style.borderColor="var(--color-accent)",e.currentTarget.style.boxShadow="0 0 0 3px color-mix(in oklab, var(--color-accent) 18%, transparent)"},onBlur:e=>{e.currentTarget.style.borderColor="var(--color-border)",e.currentTarget.style.boxShadow="none"}}),(0,n.jsxs)("p",{className:"text-[11.5px]",style:{color:"var(--color-text-muted)"},children:["Get a key at"," ",(0,n.jsx)("a",{href:"https://dench.com/api",target:"_blank",rel:"noreferrer",style:{color:"var(--color-accent)"},children:"dench.com/api"}),"."]})]}),(0,n.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,n.jsx)("button",{type:"button",onClick:()=>void G(),disabled:C,className:"text-[12px] underline-offset-4 transition-colors hover:underline disabled:opacity-50",style:{color:"var(--color-text-muted)"},children:"Skip — use without Gmail sync"}),(0,n.jsx)(u,{type:"submit",disabled:C,children:C?"Validating…":"Save key"})]})]}),(0,n.jsx)(c,{required:!0,icon:(0,n.jsx)(m,{}),title:"Gmail",description:"We read your inbox so People and Companies can appear.",secondaryLabel:W?v(null==(a=d.connections)||null==(l=a.gmail)?void 0:l.accountEmail):U?"Connect Dench Cloud first.":"We read your inbox so People and Companies can appear.",status:W?"connected":"gmail"===L?"connecting":U?"blocked":"idle",disabledReason:U?"Requires Dench Cloud.":void 0,actions:W?null:(0,n.jsx)(u,{onClick:()=>void Z("gmail"),disabled:U||null!==L,children:"gmail"===L?"Authorizing…":"Connect"})}),(0,n.jsx)(c,{icon:(0,n.jsx)(x,{}),title:"Google Calendar",description:"Meetings sharpen your strongest-connection ranking. Optional.",secondaryLabel:H?v(null==(i=d.connections)||null==(s=i.calendar)?void 0:s.accountEmail):$?"Connect Gmail first.":"Meetings sharpen your strongest-connection ranking. Optional.",status:H?"connected":"calendar"===L?"connecting":$?"blocked":"idle",statusLabel:H?"Connected":"backfill"!==d.currentStep||H?void 0:"Skipped",disabledReason:$?"Requires Gmail.":void 0,actions:H||"backfill"===d.currentStep?null:(0,n.jsx)(u,{onClick:()=>void Z("calendar"),disabled:$||null!==L,children:"calendar"===L?"Authorizing…":"Connect"})})]}),(M||z)&&(0,n.jsx)("div",{className:"rounded-xl px-4 py-3 text-[13px]",style:{background:"rgba(239, 68, 68, 0.08)",color:"var(--color-error)",border:"1px solid rgba(239, 68, 68, 0.2)"},children:null!=M?M:z}),(0,n.jsxs)("div",{className:"flex items-center justify-between gap-3 pt-2",children:[(0,n.jsx)("p",{className:"text-[12px]",style:{color:"var(--color-text-muted)"},children:Q?null:I?"Gmail is required to continue.":"Dench Cloud unlocks the other two."}),(0,n.jsx)("button",{type:"button",onClick:()=>void et(),disabled:!ee||P,className:"flex h-10 items-center justify-center rounded-lg px-5 text-[13.5px] font-medium transition-opacity focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:opacity-50",style:{background:"var(--color-accent)",color:"#fff"},onMouseEnter:e=>{!P&&ee&&(e.currentTarget.style.opacity="0.92")},onMouseLeave:e=>{e.currentTarget.style.opacity="1"},children:P?"Opening sync…":"Continue"})]})]})}function v(e){return"string"==typeof e&&e.includes("@")?e:"Connected"}var g=r(70767),y=r.n(g);function j(e){var t,r,l,a,s;let{state:i,onAdvance:c,onLiveStats:d}=e,[u,h]=(0,o.useState)(!1),[p,m]=(0,o.useState)(null),[x,f]=(0,o.useState)(null),[v,g]=(0,o.useState)(!1),[y,j]=(0,o.useState)(!1),w=(0,o.useRef)(null),b=(null==(r=i.backfill)||null==(t=r.gmail)?void 0:t.startedAt)!==void 0||(null==(a=i.backfill)||null==(l=a.calendar)?void 0:l.startedAt)!==void 0,S=(0,o.useCallback)(async()=>{m(null);try{let t=await fetch("/api/onboarding/sync/start",{method:"POST"});if(!t.ok){var e;let r=await t.json().catch(()=>({}));throw Error(null!=(e=r.error)?e:"HTTP ".concat(t.status))}h(!0)}catch(e){m(e instanceof Error?e.message:"Could not start sync.")}},[]);(0,o.useEffect)(()=>{u||b||S()},[S,u,b]),(0,o.useEffect)(()=>{if(w.current)return;let e=new EventSource("/api/onboarding/sync/progress");return w.current=e,e.addEventListener("progress",e=>{try{var t,r,n,o,l;let a=JSON.parse(e.data);f(a),null==d||d({messages:null!=(t=a.messagesProcessed)?t:0,people:null!=(r=a.peopleProcessed)?r:0,companies:null!=(n=a.companiesProcessed)?n:0,events:null!=(o=a.eventsProcessed)?o:0}),"complete"===a.phase&&g(!0),"error"===a.phase&&m(null!=(l=a.error)?l:"Sync hit an unrecoverable error.")}catch(e){}}),e.addEventListener("error",()=>{}),()=>{e.close(),w.current=null}},[d]);let N=(0,o.useCallback)(async()=>{j(!0);try{let t=await fetch("/api/onboarding/state",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({from:"backfill",to:"complete"})});if(!t.ok){var e;let r=await t.json().catch(()=>({}));throw Error(null!=(e=r.error)?e:"HTTP ".concat(t.status))}let r=await t.json();c(r)}catch(e){m(e instanceof Error?e.message:"Could not finish onboarding.")}finally{j(!1)}},[c]),C=null!=(s=null==x?void 0:x.phase)?s:"starting";return(0,n.jsxs)("div",{className:"space-y-8",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("h1",{className:"font-instrument text-[34px] leading-[1.1] tracking-tight",style:{color:"var(--color-text)"},children:"Bringing your workspace to life."}),(0,n.jsx)("p",{className:"mt-3 text-[13.5px] leading-relaxed",style:{color:"var(--color-text-muted)"},children:"Your inbox and calendar are loading on the right. Head in as soon as there's enough — the rest keeps filling in quietly."})]}),(0,n.jsx)(k,{phase:C,latestMessage:null==x?void 0:x.message}),p&&(0,n.jsx)("p",{className:"text-[12.5px]",style:{color:"var(--color-error)"},children:p}),(0,n.jsxs)("div",{className:"flex items-center justify-between gap-3 pt-2",children:[(0,n.jsx)("p",{className:"text-[12px]",style:{color:"var(--color-text-muted)"},children:v?"All four phases are done — your workspace is ready.":"Hanging out until all four phases finish."}),(0,n.jsx)("button",{type:"button",onClick:()=>void N(),disabled:!v||y,className:"flex h-10 items-center justify-center rounded-lg px-5 text-[13.5px] font-medium transition-opacity focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:opacity-50",style:{background:"var(--color-accent)",color:"#fff"},onMouseEnter:e=>{v&&!y&&(e.currentTarget.style.opacity="0.92")},onMouseLeave:e=>{e.currentTarget.style.opacity="1"},children:y?"Opening workspace…":"Let's go"})]})]})}let w=[{id:"gmail",label:"Email",helper:"Paginating through your inbox"},{id:"calendar",label:"Calendar",helper:"Loading meetings and attendees"},{id:"merging",label:"Dedupe",helper:"Merging the same person across sources"},{id:"scoring",label:"Rank",helper:"Scoring who matters to you most"}],b=["starting","gmail","calendar","merging","scoring","complete"];function k(e){let{phase:t,latestMessage:r}=e,o=b.indexOf(t),l="complete"===t;return(0,n.jsx)("div",{children:(0,n.jsx)("ul",{className:"divide-y divide-[var(--color-border)]",children:w.map(e=>{let t=b.indexOf(e.id),a=!l&&o===t,s=l||o>t?"done":a?"active":"pending";return(0,n.jsxs)("li",{className:"flex items-center gap-3 py-3",style:{opacity:"pending"===s?.55:1,transition:"opacity 240ms ease"},children:[(0,n.jsx)(S,{state:s}),(0,n.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,n.jsx)("p",{className:"text-[13px] font-medium",style:{color:"var(--color-text)"},children:e.label}),(0,n.jsx)("p",{className:"mt-0.5 truncate text-[11.5px]",style:{color:"var(--color-text-muted)"},children:a&&r?r:e.helper})]}),(0,n.jsx)("span",{className:"text-[11px] tabular-nums",style:{color:"var(--color-text-muted)"},children:"done"===s?"Done":"active"===s?"Working":""})]},e.id)})})})}function S(e){let{state:t}=e;return"done"===t?(0,n.jsx)("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center rounded-full",style:{background:"var(--color-accent)",color:"#fff"},"aria-label":"Done",children:(0,n.jsx)("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",children:(0,n.jsx)("polyline",{points:"20 6 9 17 4 12"})})}):"active"===t?(0,n.jsxs)("span",{"aria-label":"Working",className:"jsx-e6c024424f5f4c3c relative flex h-5 w-5 shrink-0 items-center justify-center",children:[(0,n.jsx)("span",{style:{border:"2px solid var(--color-border)",borderTopColor:"var(--color-accent)",animation:"syncSpin 900ms linear infinite"},className:"jsx-e6c024424f5f4c3c absolute inset-0 rounded-full"}),(0,n.jsx)(y(),{id:"e6c024424f5f4c3c",children:"@keyframes syncSpin{to{transform:rotate(360deg)}}"})]}):(0,n.jsx)("span",{className:"h-5 w-5 shrink-0 rounded-full",style:{border:"1.5px solid var(--color-border)"},"aria-label":"Pending"})}var N=r(34471);function C(e){var t;let{state:r}=e,l=(0,o.useMemo)(()=>{var e,t,n,o;let l=null!=(n=null==(t=r.identity)||null==(e=t.name)?void 0:e.trim())?n:"";return l&&null!=(o=l.split(/\s+/)[0])?o:""},[null==(t=r.identity)?void 0:t.name]);return(0,n.jsxs)("div",{className:"flex min-h-[60vh] flex-col items-center justify-center gap-8 py-12 text-center",children:[(0,n.jsxs)("span",{"aria-hidden":!0,className:"relative flex h-16 w-16 items-center justify-center rounded-full",style:{background:"var(--color-accent)",color:"#fff"},children:[(0,n.jsx)("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:(0,n.jsx)("polyline",{points:"20 6 9 17 4 12"})}),(0,n.jsx)("span",{"aria-hidden":!0,className:"absolute inset-0 rounded-full motion-safe:animate-[completePulse_1.8s_ease-out_infinite]",style:{boxShadow:"0 0 0 0 var(--color-accent)",opacity:.6}})]}),(0,n.jsxs)("div",{className:"space-y-3",children:[(0,n.jsx)("h1",{className:"font-instrument text-[40px] leading-[1.05] tracking-tight",style:{color:"var(--color-text)"},children:l?"You're all set, ".concat(l,"."):"You're all set."}),(0,n.jsx)("p",{className:"mx-auto max-w-md text-[15px] leading-relaxed",style:{color:"var(--color-text-muted)"},children:"Your workspace is ready. New email and meetings will flow in as they arrive — no more setup from here."})]}),(0,n.jsx)(N.$,{size:"lg",onClick:()=>window.location.assign("/"),children:"Open workspace"}),(0,n.jsx)("style",{children:"\n @keyframes completePulse {\n 0% { box-shadow: 0 0 0 0 var(--color-accent); opacity: 0.6; }\n 70% { box-shadow: 0 0 0 18px var(--color-accent); opacity: 0; }\n 100% { box-shadow: 0 0 0 0 var(--color-accent); opacity: 0; }\n }\n "})]})}function _(e){let{variantKey:t,children:r}=e,[l,a]=(0,o.useState)({key:t,node:r}),[s,i]=(0,o.useState)(null),c=(0,o.useRef)(null);return(0,o.useEffect)(()=>t===l.key?void a({key:t,node:r}):(i(l),a({key:t,node:r}),null!==c.current&&window.clearTimeout(c.current),c.current=window.setTimeout(()=>{i(null),c.current=null},260),()=>{null!==c.current&&(window.clearTimeout(c.current),c.current=null)}),[t,r]),(0,n.jsxs)("div",{className:"relative h-full w-full overflow-hidden",style:{background:"var(--color-main-bg)"},children:[(0,n.jsx)("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-0",style:{background:"radial-gradient(110% 80% at 80% 10%, var(--color-accent-light) 0%, transparent 55%), radial-gradient(90% 60% at 0% 100%, var(--color-surface-hover) 0%, transparent 60%)",opacity:.6}}),s&&(0,n.jsx)("div",{className:"absolute inset-0 flex h-full w-full items-center justify-center motion-safe:animate-[previewFadeOut_260ms_ease-out_forwards]","aria-hidden":!0,children:s.node},"prev-".concat(s.key)),(0,n.jsx)("div",{className:"absolute inset-0 flex h-full w-full items-center justify-center motion-safe:animate-[previewFadeIn_260ms_ease-out]",children:l.node},"cur-".concat(l.key)),(0,n.jsx)("style",{children:"\n @keyframes previewFadeIn {\n from { opacity: 0; transform: translateY(4px); }\n to { opacity: 1; transform: translateY(0); }\n }\n @keyframes previewFadeOut {\n from { opacity: 1; transform: translateY(0); }\n to { opacity: 0; transform: translateY(-4px); }\n }\n "})]})}function T(e){let{typedName:t,typedEmail:r}=e,l=(0,o.useMemo)(()=>{let e=t.trim();if(!e)return"";let[r]=e.split(/\s+/);return null!=r?r:""},[t]),a=(0,o.useMemo)(()=>{var e,r,n,o;let l=t.trim();if(!l)return"";let a=l.split(/\s+/).filter(Boolean);return((null!=(n=null==(e=a[0])?void 0:e[0])?n:"")+(a.length>1&&null!=(o=null==(r=a[a.length-1])?void 0:r[0])?o:"")).toUpperCase().slice(0,2)},[t]);return(0,n.jsxs)("div",{className:"flex h-full w-full max-w-[520px] flex-col justify-center gap-10 px-10 py-12",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-[0.22em]",style:{color:"var(--color-text-muted)"},children:"DenchClaw"}),(0,n.jsxs)("p",{className:"mt-4 font-instrument text-[32px] leading-[1.15] tracking-tight",style:{color:"var(--color-text)"},children:["A CRM that reads your inbox\xa0—",(0,n.jsx)("br",{}),(0,n.jsx)("span",{style:{color:"var(--color-text-muted)"},children:"on your machine, not ours."})]})]}),(0,n.jsx)("div",{className:"relative rounded-2xl px-5 py-5",style:{background:"var(--color-surface)",border:"1px solid var(--color-border)",boxShadow:"var(--shadow-md)"},children:(0,n.jsxs)("div",{className:"flex items-center gap-3",children:[(0,n.jsx)("div",{className:"flex h-11 w-11 shrink-0 items-center justify-center rounded-full font-instrument text-[15px] font-medium transition-all duration-300",style:{background:a?"var(--color-accent)":"var(--color-surface-hover)",color:a?"#fff":"var(--color-text-muted)",border:a?"none":"1px dashed var(--color-border-strong)"},children:a||"\xb7"}),(0,n.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,n.jsx)("p",{className:"truncate text-[13px] font-medium transition-colors",style:{color:l?"var(--color-text)":"var(--color-text-muted)"},children:l?"Welcome, ".concat(l,"."):"Welcome,"}),(0,n.jsx)("p",{className:"mt-0.5 truncate text-[12px]",style:{color:"var(--color-text-muted)"},children:r.trim()||"Your workspace is almost ready."})]}),(0,n.jsx)("span",{"aria-hidden":!0,className:"ml-2 inline-flex h-2 w-2 shrink-0 rounded-full transition-colors duration-300",style:{background:l?"var(--color-success)":"var(--color-border-strong)"}})]})}),(0,n.jsx)("ul",{className:"space-y-4",children:E.map(e=>(0,n.jsxs)("li",{className:"flex gap-3",children:[(0,n.jsx)("span",{"aria-hidden":!0,className:"mt-0.5 flex h-8 w-8 shrink-0 items-center justify-center rounded-xl",style:{background:"var(--color-accent-light)",color:"var(--color-accent)"},children:e.icon}),(0,n.jsxs)("div",{className:"min-w-0",children:[(0,n.jsx)("p",{className:"text-[13px] font-medium",style:{color:"var(--color-text)"},children:e.title}),(0,n.jsx)("p",{className:"mt-0.5 text-[12.5px] leading-relaxed",style:{color:"var(--color-text-muted)"},children:e.description})]})]},e.title))})]})}let E=[{title:"Local-first, by design",description:"Emails and calendar events land in a DuckDB file on your laptop. Nothing leaves your machine unless you ask.",icon:(0,n.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,n.jsx)("rect",{width:"18",height:"11",x:"3",y:"10",rx:"2"}),(0,n.jsx)("path",{d:"M7 10V7a5 5 0 0 1 10 0v3"})]})},{title:"Your strongest connections, ranked",description:"We score every relationship by recency and reciprocity. The people who matter today are always on top.",icon:(0,n.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,n.jsx)("path",{d:"M12 20v-8"}),(0,n.jsx)("path",{d:"M6 20v-4"}),(0,n.jsx)("path",{d:"M18 20V8"})]})},{title:"Stays in sync, automatically",description:"Once connected, new emails and meetings flow in on their own. No refresh. No fiddling.",icon:(0,n.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,n.jsx)("path",{d:"M21 12a9 9 0 1 1-3-6.7"}),(0,n.jsx)("path",{d:"M21 4v5h-5"})]})}];function M(){return(0,n.jsxs)("div",{className:"relative h-full w-full overflow-hidden",children:[(0,n.jsx)("svg",{className:"absolute inset-0 h-full w-full",viewBox:"0 0 800 800",preserveAspectRatio:"xMidYMid slice","aria-hidden":!0,children:(0,n.jsxs)("g",{fill:"none",stroke:"color-mix(in oklab, var(--color-text) 22%, transparent)",strokeWidth:"1.4",strokeDasharray:"3 8",strokeLinecap:"round",children:[(0,n.jsx)("circle",{cx:"400",cy:"400",r:"160"}),(0,n.jsx)("circle",{cx:"400",cy:"400",r:"260"}),(0,n.jsx)("circle",{cx:"400",cy:"400",r:"360"})]})}),(0,n.jsx)("div",{className:"absolute flex items-center justify-center",style:{left:"50%",top:"50%",width:68,height:68,transform:"translate(-50%, -50%)"},children:(0,n.jsx)("img",{src:"/dench-workspace-icon.png",alt:"",width:68,height:68,draggable:!1,style:{width:"100%",height:"100%",objectFit:"contain"}})}),F(.2,[{angle:40,icon:(0,n.jsx)(z,{})},{angle:160,icon:(0,n.jsx)(A,{})},{angle:280,icon:(0,n.jsx)(P,{})}]),F(.325,[{angle:100,icon:(0,n.jsx)(B,{})},{angle:220,icon:(0,n.jsx)(D,{})},{angle:340,icon:(0,n.jsx)(I,{})}]),F(.45,[{angle:20,icon:(0,n.jsx)(O,{})},{angle:140,icon:(0,n.jsx)(V,{})},{angle:260,icon:(0,n.jsx)(W,{})}])]})}function F(e,t){return t.map((t,r)=>{let o=t.angle*Math.PI/180,l=50+100*e*Math.cos(o),a=50-100*e*Math.sin(o);return(0,n.jsx)(L,{left:"".concat(l,"%"),top:"".concat(a,"%"),children:t.icon},"".concat(e,"-").concat(r))})}function L(e){let{left:t,top:r,children:o}=e;return(0,n.jsx)("div",{className:"absolute flex items-center justify-center",style:{left:t,top:r,width:40,height:40,transform:"translate(-50%, -50%)"},children:(0,n.jsx)("div",{className:"flex items-center justify-center",style:{width:"100%",height:"100%"},children:o})})}function R(e){let{pct:t,children:r}=e;return(0,n.jsx)("div",{className:"flex items-center justify-center",style:{width:"".concat(t,"%"),height:"".concat(t,"%")},children:r})}function z(){return(0,n.jsx)(R,{pct:78,children:(0,n.jsxs)("svg",{viewBox:"0 0 256 193",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%","aria-hidden":!0,children:[(0,n.jsx)("path",{d:"M58.182 192.05V93.14L27.507 65.077 0 49.504v125.091c0 9.658 7.825 17.455 17.455 17.455h40.727Z",fill:"#4285F4"}),(0,n.jsx)("path",{d:"M197.818 192.05h40.727c9.659 0 17.455-7.826 17.455-17.455V49.505l-31.156 17.837-26.983 25.798-.043 98.91Z",fill:"#34A853"}),(0,n.jsx)("path",{d:"m58.182 93.14-4.174-38.655 4.174-36.945L128 69.868l69.818-52.327 4.67 34.14-4.67 41.46L128 145.467l-69.818-52.326Z",fill:"#EA4335"}),(0,n.jsx)("path",{d:"M197.818 17.538V93.14L256 49.504V26.272c0-21.564-24.61-33.858-41.89-20.89L197.818 17.54Z",fill:"#FBBC04"}),(0,n.jsx)("path",{d:"M0 49.504l26.759 20.069L58.182 93.14V17.538L41.89 5.382C24.59-7.587 0 4.708 0 26.27v23.233Z",fill:"#C5221F"})]})})}function A(){return(0,n.jsx)(R,{pct:98,children:(0,n.jsx)("img",{src:"/logos/google-calendar.png",alt:"",draggable:!1,style:{width:"100%",height:"100%",objectFit:"contain"}})})}function P(){return(0,n.jsx)(R,{pct:78,children:(0,n.jsxs)("svg",{viewBox:"0 0 54 54",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%","aria-hidden":!0,children:[(0,n.jsx)("path",{d:"M19.712.133a5.381 5.381 0 0 0-5.376 5.387 5.381 5.381 0 0 0 5.376 5.386h5.376V5.52A5.381 5.381 0 0 0 19.712.133m0 14.365H5.376A5.381 5.381 0 0 0 0 19.884a5.381 5.381 0 0 0 5.376 5.387h14.336a5.381 5.381 0 0 0 5.376-5.387 5.381 5.381 0 0 0-5.376-5.386",fill:"#36C5F0"}),(0,n.jsx)("path",{d:"M53.76 19.884a5.381 5.381 0 0 0-5.376-5.386 5.381 5.381 0 0 0-5.376 5.386v5.387h5.376a5.381 5.381 0 0 0 5.376-5.387m-14.336 0V5.52A5.381 5.381 0 0 0 34.048.133a5.381 5.381 0 0 0-5.376 5.387v14.364a5.381 5.381 0 0 0 5.376 5.387 5.381 5.381 0 0 0 5.376-5.387",fill:"#2EB67D"}),(0,n.jsx)("path",{d:"M34.048 54a5.381 5.381 0 0 0 5.376-5.387 5.381 5.381 0 0 0-5.376-5.386h-5.376v5.386A5.381 5.381 0 0 0 34.048 54m0-14.365h14.336a5.381 5.381 0 0 0 5.376-5.386 5.381 5.381 0 0 0-5.376-5.387H34.048a5.381 5.381 0 0 0-5.376 5.387 5.381 5.381 0 0 0 5.376 5.386",fill:"#ECB22E"}),(0,n.jsx)("path",{d:"M0 34.249a5.381 5.381 0 0 0 5.376 5.386 5.381 5.381 0 0 0 5.376-5.386v-5.387H5.376A5.381 5.381 0 0 0 0 34.25m14.336 0v14.364A5.381 5.381 0 0 0 19.712 54a5.381 5.381 0 0 0 5.376-5.387V34.25a5.381 5.381 0 0 0-5.376-5.387 5.381 5.381 0 0 0-5.376 5.387",fill:"#E01E5A"})]})})}function B(){return(0,n.jsx)(R,{pct:90,children:(0,n.jsx)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%","aria-hidden":!0,children:(0,n.jsx)("path",{d:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12",fill:"var(--color-text)"})})})}function O(){return(0,n.jsx)(R,{pct:86,children:(0,n.jsx)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%","aria-hidden":!0,children:(0,n.jsx)("path",{d:"M13.976 9.15c-2.172-.806-3.356-1.426-3.356-2.409 0-.831.683-1.305 1.901-1.305 2.227 0 4.515.858 6.09 1.631l.89-5.494C18.252.975 15.697 0 12.165 0 9.667 0 7.589.654 6.105 1.874 4.554 3.147 3.756 4.992 3.756 7.218c0 4.039 2.467 5.76 6.476 7.219 2.585.92 3.445 1.582 3.445 2.585 0 .97-.832 1.531-2.345 1.531-1.974 0-5.16-.971-7.19-2.221L3.252 21.81C5.009 22.8 8.271 24 11.649 24c2.64 0 4.842-.624 6.401-1.815 1.744-1.322 2.648-3.273 2.648-5.625 0-4.134-2.528-5.86-6.722-7.411z",fill:"#635BFF"})})})}function V(){return(0,n.jsx)(R,{pct:88,children:(0,n.jsx)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%","aria-hidden":!0,children:(0,n.jsx)("path",{d:"M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654 2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z",fill:"var(--color-text)"})})})}function D(){return(0,n.jsx)(R,{pct:80,children:(0,n.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%","aria-hidden":!0,children:[(0,n.jsx)("path",{d:"M14.727 6.727H14V0H4.91c-.905 0-1.637.732-1.637 1.636v20.728c0 .904.732 1.636 1.636 1.636h14.182c.904 0 1.636-.732 1.636-1.636V6.727z",fill:"#0F9D58"}),(0,n.jsx)("path",{d:"M14 0v6.727h6.727z",fill:"#0B7F46"}),(0,n.jsx)("path",{d:"M7.091 10.364v8h9.818v-8zm1.09 6.909V16.09h3.273v1.182zm0-2.273v-1.182h3.273V15zm0-2.273V11.546h3.273v1.181zm4.364 4.546V16.09h3.273v1.182zm0-2.273v-1.182h3.273V15zm0-2.273V11.546h3.273v1.181z",fill:"#F1F1F1"})]})})}function I(){return(0,n.jsx)(R,{pct:90,children:(0,n.jsx)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%","aria-hidden":!0,children:(0,n.jsx)("path",{d:"M22.447 9.564a5.988 5.988 0 0 0-2.157-2.19 5.96 5.96 0 0 0-3.012-.81c-.174 0-.344.01-.514.025V4.45a1.847 1.847 0 0 0 1.06-1.665A1.848 1.848 0 0 0 15.979.938a1.847 1.847 0 0 0-1.847 1.847 1.846 1.846 0 0 0 1.061 1.666v2.14a5.94 5.94 0 0 0-1.765.55L5.935 1.24A2.306 2.306 0 1 0 4.8 3.24l7.362 5.73a5.97 5.97 0 0 0-.965 3.286 5.99 5.99 0 0 0 1.823 4.304L10.7 18.881a1.946 1.946 0 1 0 1.385 1.386l2.286-2.286a5.98 5.98 0 0 0 2.908.748 5.98 5.98 0 0 0 5.98-5.98 5.96 5.96 0 0 0-.812-3.185zm-5.168 5.787a2.858 2.858 0 1 1 0-5.716 2.858 2.858 0 0 1 0 5.716z",fill:"#FF7A59"})})})}function W(){return(0,n.jsx)(R,{pct:82,children:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64",width:"100%",height:"100%","aria-hidden":!0,style:{color:"var(--color-text)"},children:(0,n.jsx)("path",{fill:"currentColor",d:"M32.4,0l-24,49.6h7.8l16.2-33.9l15.5,33.9h7.7L32.4,0z M25.5,49.6L32.4,64l6.7-14.4H25.5z"})})})}function H(e){var t,r;let{liveStats:l}=e,a=function(e){let[t,r]=(0,o.useState)([]),n=(0,o.useRef)(null),l=(0,o.useMemo)(()=>async()=>{var e,t;null==(e=n.current)||e.abort();let o=new AbortController;n.current=o;try{let e=await fetch("/api/crm/people?limit=".concat(12),{signal:o.signal,cache:"no-store"});if(!e.ok)return;let n=await e.json();o.signal.aborted||r(null!=(t=n.people)?t:[])}catch(e){if("AbortError"===e.name)return}},[]);(0,o.useEffect)(()=>{l();let e=window.setInterval(()=>{l()},8e3);return()=>{var t;window.clearInterval(e),null==(t=n.current)||t.abort()}},[l]);let a=(0,o.useRef)(-1);return(0,o.useEffect)(()=>{let t=Math.floor(e/30);t!==a.current&&(a.current=t,l())},[e,l]),t}(null!=(t=null==l?void 0:l.people)?t:0),s=(0,o.useMemo)(()=>Array.from({length:12},(e,t)=>t),[]),i=function(e){let[t,r]=(0,o.useState)(0);return(0,o.useEffect)(()=>{if(t===e)return;let n=window.setTimeout(()=>{r(t=>t<e?t+1:t-1)},90);return()=>window.clearTimeout(n)},[t,e]),t}(a.length);return(0,n.jsx)("div",{className:"flex h-full min-h-0 w-full items-center justify-center px-8 py-10",children:(0,n.jsxs)("div",{className:"flex h-full max-h-[640px] w-full max-w-[620px] flex-col overflow-hidden rounded-2xl",style:{background:"var(--color-background)",border:"1px solid var(--color-border)",boxShadow:"var(--shadow-lg)"},children:[(0,n.jsx)(q,{}),(0,n.jsx)(Y,{count:null!=(r=null==l?void 0:l.people)?r:a.length}),(0,n.jsx)(G,{}),(0,n.jsx)("ol",{className:"flex-1 min-h-0 overflow-y-auto",children:s.map(e=>{var t;let r=a[e];return(0,n.jsx)(K,{person:r,revealed:e<i,index:e},null!=(t=null==r?void 0:r.id)?t:"placeholder-".concat(e))})})]})})}function q(){return(0,n.jsxs)("div",{className:"flex items-center gap-2 px-4 py-2.5",style:{borderBottom:"1px solid var(--color-border)"},children:[(0,n.jsxs)("div",{className:"flex gap-1.5",children:[(0,n.jsx)("span",{className:"block h-2.5 w-2.5 rounded-full",style:{background:"#ff5f57"}}),(0,n.jsx)("span",{className:"block h-2.5 w-2.5 rounded-full",style:{background:"#febc2e"}}),(0,n.jsx)("span",{className:"block h-2.5 w-2.5 rounded-full",style:{background:"#28c840"}})]}),(0,n.jsxs)("div",{className:"ml-2 flex items-center gap-1.5 rounded-md px-2 py-0.5 text-[10.5px]",style:{background:"var(--color-surface-hover)",color:"var(--color-text-muted)"},children:[(0,n.jsx)("span",{children:"denchclaw"}),(0,n.jsx)("span",{style:{opacity:.5},children:"\xb7"}),(0,n.jsx)("span",{children:"People"})]})]})}function Y(e){let{count:t}=e,r=function(e){let[t,r]=(0,o.useState)(e),n=(0,o.useMemo)(()=>"function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,[]);return(0,o.useEffect)(()=>{if(n)return void r(e);if(t===e)return;let o=!1,l=e-t,a=Math.min(600,Math.max(200,2*Math.abs(l))),s=performance.now();return window.requestAnimationFrame(function e(n){if(o)return;let i=Math.min(1,(n-s)/a);r(Math.round(t+l*(1-Math.pow(1-i,3)))),i<1&&window.requestAnimationFrame(e)}),()=>{o=!0}},[e,n]),t}(t);return(0,n.jsxs)("header",{className:"flex shrink-0 items-center justify-between gap-4 px-5 py-3",style:{borderBottom:"1px solid var(--color-border)"},children:[(0,n.jsxs)("div",{className:"min-w-0 flex items-baseline gap-3",children:[(0,n.jsx)("h2",{className:"font-instrument text-[19px] tracking-tight truncate",style:{color:"var(--color-text)"},children:"People"}),(0,n.jsx)("span",{className:"text-[11.5px] tabular-nums",style:{color:"var(--color-text-muted)"},children:r.toLocaleString()})]}),(0,n.jsxs)("div",{className:"flex items-center gap-1.5 shrink-0",children:[(0,n.jsx)(Z,{label:"Sort: Strength"}),(0,n.jsx)(Z,{label:"Filter"})]})]})}function Z(e){let{label:t}=e;return(0,n.jsx)("span",{className:"rounded-md px-2 py-1 text-[10.5px]",style:{background:"var(--color-surface-hover)",color:"var(--color-text-muted)",border:"1px solid var(--color-border)"},children:t})}let J="minmax(0,1fr) 120px 86px 72px";function G(){return(0,n.jsxs)("div",{className:"grid items-center gap-3 px-5 py-2 text-[10px] font-semibold uppercase tracking-[0.14em]",style:{gridTemplateColumns:J,color:"var(--color-text-muted)",borderBottom:"1px solid var(--color-border)"},children:[(0,n.jsx)("span",{children:"Person"}),(0,n.jsx)("span",{children:"Company"}),(0,n.jsx)("span",{className:"text-right",children:"Last touch"}),(0,n.jsx)("span",{className:"text-right",children:"Strength"})]})}function K(e){let{person:t,revealed:r,index:o}=e;return(0,n.jsx)("li",{className:"grid items-center gap-3 px-5 py-2.5",style:{gridTemplateColumns:J,borderBottom:"1px solid var(--color-border)",opacity:+!!r,transform:r?"translateY(0)":"translateY(-4px)",transition:"opacity 320ms ease ".concat(20*o,"ms, transform 320ms ease ").concat(20*o,"ms")},children:t?(0,n.jsx)(U,{person:t}):(0,n.jsx)($,{})})}function U(e){var t,r,o,l;let{person:a}=e,s=(null==(t=a.name)?void 0:t.trim())||a.email||"Unknown",i=null!=(o=a.company_name)?o:function(e){var t;if(!e)return null;let r=e.lastIndexOf("@");if(-1===r)return null;let n=e.slice(r+1).toLowerCase();if(!n)return null;let o=null!=(t=n.split(".")[0])?t:n;return o?o.charAt(0).toUpperCase()+o.slice(1):null}(a.email),c=Math.max(0,Math.min(100,null!=(l=a.strength_score)?l:0)),d=function(e){if(!e)return"—";let t=Date.parse(e);if(Number.isNaN(t))return"—";let r=Math.floor((Date.now()-t)/6e4);if(r<1)return"Just now";if(r<60)return"".concat(r,"m ago");let n=Math.floor(r/60);if(n<24)return"".concat(n,"h ago");let o=Math.floor(n/24);if(o<7)return"".concat(o,"d ago");let l=Math.floor(o/7);if(l<5)return"".concat(l,"w ago");let a=Math.floor(o/30);if(a<12)return"".concat(a,"mo ago");let s=Math.floor(o/365);return"".concat(s,"y ago")}(a.last_interaction_at),u=(null==(r=a.job_title)?void 0:r.trim())||a.email||"";return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"min-w-0",children:[(0,n.jsx)("p",{className:"truncate text-[12.5px] font-medium",style:{color:"var(--color-text)"},children:s}),u&&(0,n.jsx)("p",{className:"truncate text-[10.5px]",style:{color:"var(--color-text-muted)"},children:u})]}),(0,n.jsx)("p",{className:"truncate text-[12px]",style:{color:"var(--color-text-secondary)"},children:null!=i?i:""}),(0,n.jsx)("p",{className:"text-right text-[11.5px] tabular-nums",style:{color:"var(--color-text-muted)"},children:d}),(0,n.jsx)(X,{value:c})]})}function $(){return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"min-w-0",children:[(0,n.jsx)("span",{className:"block h-2.5 w-32 rounded",style:{background:"var(--color-surface-hover)"}}),(0,n.jsx)("span",{className:"mt-1 block h-2 w-20 rounded",style:{background:"var(--color-surface-hover)",opacity:.7}})]}),(0,n.jsx)("span",{className:"block h-2.5 w-20 rounded",style:{background:"var(--color-surface-hover)"}}),(0,n.jsx)("span",{className:"block h-2 w-12 justify-self-end rounded",style:{background:"var(--color-surface-hover)"}}),(0,n.jsx)("span",{className:"block h-2 w-10 justify-self-end rounded",style:{background:"var(--color-surface-hover)"}})]})}function X(e){let{value:t}=e;return(0,n.jsxs)("div",{className:"flex items-center justify-end gap-1.5",children:[(0,n.jsx)("div",{className:"relative h-1.5 w-10 overflow-hidden rounded-full",style:{background:"var(--color-surface-hover)"},children:(0,n.jsx)("div",{className:"absolute inset-y-0 left-0 rounded-full",style:{width:"".concat(t,"%"),background:"var(--color-accent)"}})}),(0,n.jsx)("span",{className:"w-5 text-right text-[10.5px] tabular-nums",style:{color:"var(--color-text-muted)"},children:Math.round(t)})]})}var Q=r(67465),ee=r(46009);let et=[{id:"identity",label:"Identity"},{id:"setup",label:"Setup"},{id:"sync",label:"Sync"}];function er(e){var t,r;let{initialState:l,workspaceCount:a=1,activeWorkspace:s=null}=e,[i,c]=(0,o.useState)(l),[d,u]=(0,o.useState)(!1),[h,p]=(0,o.useState)(!1),[m,x]=(0,o.useState)(null),[f,v]=(0,o.useState)(()=>{var e,t,r,n;return{name:null!=(r=null==(e=l.identity)?void 0:e.name)?r:"",email:null!=(n=null==(t=l.identity)?void 0:t.email)?n:""}}),[g,y]=(0,o.useState)("empty"),[j,w]=(0,o.useState)({messages:0,people:0,companies:0,events:0}),b=(0,o.useCallback)(()=>{window.location.reload()},[]),k=(0,o.useCallback)(async()=>{u(!0);try{let e=await fetch("/api/onboarding/state",{cache:"no-store"});if(e.ok){let t=await e.json();c(t)}}finally{u(!1)}},[]),S=function(e){switch(e){case"welcome":case"identity":return"identity";case"dench-cloud":case"connect-gmail":case"connect-calendar":return"setup";case"backfill":return"sync";case"complete":return"complete"}}(i.currentStep),N=(0,o.useMemo)(()=>{if(!m)return S;if("complete"===S)return"complete";let e=et.findIndex(e=>e.id===S);return et.findIndex(e=>e.id===m)<e?m:S},[S,m]);(0,o.useEffect)(()=>{if(!m)return;if("complete"===S)return void x(null);let e=et.findIndex(e=>e.id===S);et.findIndex(e=>e.id===m)>=e&&x(null)},[S,m]);let E=(0,o.useCallback)(e=>{c(e),x(null)},[]),F="complete"===N?et.length-1:et.findIndex(e=>e.id===N),L="identity"===N,R="complete"!==N&&F>0,z=F>0&&null!=(r=null==(t=et[F-1])?void 0:t.label)?r:null,A=(0,o.useCallback)(()=>{var e;if(!R)return;let t=null==(e=et[F-1])?void 0:e.id;t&&x(t)},[R,F]);(0,o.useEffect)(()=>{if(R)return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e);function e(e){let t=e.target;if((null==t?void 0:t.tagName)==="INPUT"||(null==t?void 0:t.tagName)==="TEXTAREA"||(null==t?void 0:t.isContentEditable)===!0)return;let r=(e.metaKey||e.ctrlKey)&&"["===e.key;("Escape"===e.key||r)&&(e.preventDefault(),A())}},[R,A]);let{previewVariant:P,previewNode:B,previewKey:O}=(0,o.useMemo)(()=>"identity"===N?{previewVariant:"editorial",previewKey:"identity",previewNode:(0,n.jsx)(T,{typedName:f.name,typedEmail:f.email})}:"setup"===N?{previewVariant:"workspace-mock",previewKey:"setup:orbit",previewNode:(0,n.jsx)(M,{})}:"sync"===N?{previewVariant:"workspace-live",previewKey:"sync:people-table",previewNode:(0,n.jsx)(H,{liveStats:j})}:{previewVariant:"workspace-mock",previewKey:"complete",previewNode:(0,n.jsx)(H,{liveStats:j})},[N,f,g,j]);return"complete"===N?(0,n.jsxs)("div",{className:"min-h-screen w-full",style:{background:"var(--color-background)"},children:[(0,n.jsxs)("header",{className:"flex h-16 items-center justify-between px-6 sm:px-10",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,n.jsx)("img",{src:"/dench-workspace-icon.png",alt:"DenchClaw",width:36,height:36,className:"h-9 w-9 rounded-xl",draggable:!1}),(0,n.jsx)("span",{className:"font-instrument text-3xl tracking-tight leading-none",style:{color:"var(--color-text)"},children:"DenchClaw"})]}),(0,n.jsx)(el,{})]}),(0,n.jsx)("main",{className:"flex min-h-[calc(100vh-4rem)] items-center justify-center px-6",children:(0,n.jsx)(C,{state:i})})]}):(0,n.jsxs)("div",{className:"min-h-screen w-full",style:{background:"var(--color-background)"},children:[(0,n.jsxs)("header",{className:"relative flex h-16 items-center justify-between gap-6 px-6 sm:px-10",children:[a>1?(0,n.jsx)(Q.N,{activeWorkspaceHint:s,onWorkspaceSwitch:b,onWorkspaceDelete:b,onCreateWorkspace:()=>p(!0),trigger:e=>{let{onClick:t,switching:r}=e;return(0,n.jsxs)("button",{type:"button",onClick:t,disabled:r,className:"flex items-center gap-2.5 rounded-lg px-1.5 py-1 -mx-1.5 transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-accent)] disabled:opacity-50",title:"Switch workspace",children:[(0,n.jsx)("img",{src:"/dench-workspace-icon.png",alt:"DenchClaw",width:36,height:36,className:"h-9 w-9 rounded-xl",draggable:!1}),(0,n.jsx)("span",{className:"font-instrument text-3xl tracking-tight leading-none",style:{color:"var(--color-text)"},children:"DenchClaw"}),(0,n.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.25",strokeLinecap:"round",strokeLinejoin:"round",className:"ml-0.5 shrink-0 transition-colors",style:{color:"var(--color-text-muted)"},children:(0,n.jsx)("path",{d:"m6 9 6 6 6-6"})})]})}}):(0,n.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,n.jsx)("img",{src:"/dench-workspace-icon.png",alt:"DenchClaw",width:36,height:36,className:"h-9 w-9 rounded-xl",draggable:!1}),(0,n.jsx)("span",{className:"font-instrument text-3xl tracking-tight leading-none",style:{color:"var(--color-text)"},children:"DenchClaw"})]}),(0,n.jsxs)("div",{"aria-live":"polite",className:"pointer-events-none absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 text-[12px] font-medium tabular-nums tracking-tight",style:{color:"var(--color-text-muted)"},children:["Step ",Math.max(0,F)+1," of ",et.length]}),(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[d&&(0,n.jsx)("span",{className:"hidden text-[11px] uppercase tracking-wider sm:inline",style:{color:"var(--color-text-muted)"},children:"Syncing…"}),(0,n.jsx)(el,{})]})]}),(0,n.jsxs)("div",{className:L?"relative min-h-[calc(100vh-4rem)]":"grid min-h-[calc(100vh-4rem)] grid-cols-1 lg:grid-cols-[minmax(0,1fr)_minmax(0,1fr)]",children:[L&&(0,n.jsx)(eo,{}),(0,n.jsx)("main",{className:L?"relative flex min-h-[calc(100vh-4rem)] items-center justify-center px-6 pb-16 pt-6 sm:px-10":"flex items-start justify-center px-6 pb-16 pt-6 sm:px-10 lg:items-center lg:pt-0",children:(0,n.jsxs)("div",{className:L?"w-full max-w-[400px]":"w-full max-w-[520px]",children:[(0,n.jsx)("div",{className:"mb-4 h-8",children:R&&z&&(0,n.jsxs)("button",{type:"button",onClick:A,className:"group inline-flex h-8 items-center gap-1.5 rounded-md px-2 -ml-2 text-[12.5px] font-medium transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-accent)]",style:{color:"var(--color-text-muted)"},onMouseEnter:e=>{e.currentTarget.style.color="var(--color-text)"},onMouseLeave:e=>{e.currentTarget.style.color="var(--color-text-muted)"},"aria-label":"Back to ".concat(z),title:"Back (Esc)",children:[(0,n.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.25",strokeLinecap:"round",strokeLinejoin:"round",className:"transition-transform group-hover:-translate-x-0.5",children:(0,n.jsx)("path",{d:"m15 18-6-6 6-6"})}),"Back to ",z]})}),(0,n.jsx)(en,{activeClientStep:N,state:i,onAdvance:E,onRefresh:k,onIdentityTyping:v,onSetupStageChange:y,onLiveStats:w})]})}),!L&&(0,n.jsx)("aside",{className:"hidden lg:flex",style:{borderLeft:"1px solid var(--color-border)"},children:(0,n.jsx)(_,{variantKey:O,children:B})})]}),(0,n.jsx)(ee.s,{isOpen:h,onClose:()=>p(!1),onCreated:b})]})}function en(e){let{activeClientStep:t,state:r,onAdvance:o,onRefresh:l,onIdentityTyping:a,onSetupStageChange:i,onLiveStats:c}=e;switch(t){case"identity":return(0,n.jsx)(s,{state:r,onAdvance:o,onTypingChange:a});case"setup":return(0,n.jsx)(f,{state:r,onAdvance:o,onRefresh:l,onStageChange:e=>i(e)});case"sync":return(0,n.jsx)(j,{state:r,onAdvance:o,onLiveStats:c});case"complete":return(0,n.jsx)(C,{state:r})}}function eo(){return(0,n.jsx)("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-0",style:{backgroundImage:"linear-gradient(to right, var(--color-border) 1px, transparent 1px), linear-gradient(to bottom, var(--color-border) 1px, transparent 1px)",backgroundSize:"48px 48px",maskImage:"radial-gradient(ellipse 90% 75% at 50% 50%, transparent 5%, black 100%)",WebkitMaskImage:"radial-gradient(ellipse 90% 75% at 50% 50%, transparent 5%, black 100%)",opacity:.7}})}function el(){let{resolvedTheme:e,setTheme:t}=(0,l.D)(),[r,a]=(0,o.useState)(!1);if((0,o.useEffect)(()=>a(!0),[]),!r)return(0,n.jsx)("div",{className:"h-9 w-9"});let s="dark"===e;return(0,n.jsx)("button",{type:"button",onClick:()=>t(s?"light":"dark"),"aria-label":s?"Switch to light mode":"Switch to dark mode",title:s?"Switch to light mode":"Switch to dark mode",className:"flex h-9 w-9 items-center justify-center rounded-full bg-transparent transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-accent)]",style:{color:"var(--color-text-muted)"},onMouseEnter:e=>{e.currentTarget.style.color="var(--color-text)"},onMouseLeave:e=>{e.currentTarget.style.color="var(--color-text-muted)"},children:s?(0,n.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,n.jsx)("circle",{cx:"12",cy:"12",r:"4"}),(0,n.jsx)("path",{d:"M12 2v2"}),(0,n.jsx)("path",{d:"M12 20v2"}),(0,n.jsx)("path",{d:"m4.93 4.93 1.41 1.41"}),(0,n.jsx)("path",{d:"m17.66 17.66 1.41 1.41"}),(0,n.jsx)("path",{d:"M2 12h2"}),(0,n.jsx)("path",{d:"M20 12h2"}),(0,n.jsx)("path",{d:"m6.34 17.66-1.41 1.41"}),(0,n.jsx)("path",{d:"m19.07 4.93-1.41 1.41"})]}):(0,n.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,n.jsx)("path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"})})})}},21700:(e,t,r)=>{Promise.resolve().then(r.bind(r,5582))},69670:(e,t,r)=>{"use strict";var n=r(37811);r(113);var o=r(74166),l=function(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}(o),a=void 0!==n&&n.env&&!0,s=function(e){return"[object String]"===Object.prototype.toString.call(e)},i=function(){function e(e){var t=void 0===e?{}:e,r=t.name,n=void 0===r?"stylesheet":r,o=t.optimizeForSpeed,l=void 0===o?a:o;c(s(n),"`name` must be a string"),this._name=n,this._deletedRulePlaceholder="#"+n+"-deleted-rule____{}",c("boolean"==typeof l,"`optimizeForSpeed` must be a boolean"),this._optimizeForSpeed=l,this._serverSheet=void 0,this._tags=[],this._injected=!1,this._rulesCount=0;var i="undefined"!=typeof window&&document.querySelector('meta[property="csp-nonce"]');this._nonce=i?i.getAttribute("content"):null}var t,r=e.prototype;return r.setOptimizeForSpeed=function(e){c("boolean"==typeof e,"`setOptimizeForSpeed` accepts a boolean"),c(0===this._rulesCount,"optimizeForSpeed cannot be when rules have already been inserted"),this.flush(),this._optimizeForSpeed=e,this.inject()},r.isOptimizeForSpeed=function(){return this._optimizeForSpeed},r.inject=function(){var e=this;if(c(!this._injected,"sheet already injected"),this._injected=!0,"undefined"!=typeof window&&this._optimizeForSpeed){this._tags[0]=this.makeStyleTag(this._name),this._optimizeForSpeed="insertRule"in this.getSheet(),this._optimizeForSpeed||(a||console.warn("StyleSheet: optimizeForSpeed mode not supported falling back to standard mode."),this.flush(),this._injected=!0);return}this._serverSheet={cssRules:[],insertRule:function(t,r){return"number"==typeof r?e._serverSheet.cssRules[r]={cssText:t}:e._serverSheet.cssRules.push({cssText:t}),r},deleteRule:function(t){e._serverSheet.cssRules[t]=null}}},r.getSheetForTag=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]},r.getSheet=function(){return this.getSheetForTag(this._tags[this._tags.length-1])},r.insertRule=function(e,t){if(c(s(e),"`insertRule` accepts only strings"),"undefined"==typeof window)return"number"!=typeof t&&(t=this._serverSheet.cssRules.length),this._serverSheet.insertRule(e,t),this._rulesCount++;if(this._optimizeForSpeed){var r=this.getSheet();"number"!=typeof t&&(t=r.cssRules.length);try{r.insertRule(e,t)}catch(t){return a||console.warn("StyleSheet: illegal rule: \n\n"+e+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),-1}}else{var n=this._tags[t];this._tags.push(this.makeStyleTag(this._name,e,n))}return this._rulesCount++},r.replaceRule=function(e,t){if(this._optimizeForSpeed||"undefined"==typeof window){var r="undefined"!=typeof window?this.getSheet():this._serverSheet;if(t.trim()||(t=this._deletedRulePlaceholder),!r.cssRules[e])return e;r.deleteRule(e);try{r.insertRule(t,e)}catch(n){a||console.warn("StyleSheet: illegal rule: \n\n"+t+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),r.insertRule(this._deletedRulePlaceholder,e)}}else{var n=this._tags[e];c(n,"old rule at index `"+e+"` not found"),n.textContent=t}return e},r.deleteRule=function(e){if("undefined"==typeof window)return void this._serverSheet.deleteRule(e);if(this._optimizeForSpeed)this.replaceRule(e,"");else{var t=this._tags[e];c(t,"rule at index `"+e+"` not found"),t.parentNode.removeChild(t),this._tags[e]=null}},r.flush=function(){this._injected=!1,this._rulesCount=0,"undefined"!=typeof window?(this._tags.forEach(function(e){return e&&e.parentNode.removeChild(e)}),this._tags=[]):this._serverSheet.cssRules=[]},r.cssRules=function(){var e=this;return"undefined"==typeof window?this._serverSheet.cssRules:this._tags.reduce(function(t,r){return r?t=t.concat(Array.prototype.map.call(e.getSheetForTag(r).cssRules,function(t){return t.cssText===e._deletedRulePlaceholder?null:t})):t.push(null),t},[])},r.makeStyleTag=function(e,t,r){t&&c(s(t),"makeStyleTag accepts only strings as second parameter");var n=document.createElement("style");this._nonce&&n.setAttribute("nonce",this._nonce),n.type="text/css",n.setAttribute("data-"+e,""),t&&n.appendChild(document.createTextNode(t));var o=document.head||document.getElementsByTagName("head")[0];return r?o.insertBefore(n,r):o.appendChild(n),n},t=[{key:"length",get:function(){return this._rulesCount}}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(e.prototype,t),e}();function c(e,t){if(!e)throw Error("StyleSheet: "+t+".")}var d=function(e){for(var t=5381,r=e.length;r;)t=33*t^e.charCodeAt(--r);return t>>>0},u={};function h(e,t){if(!t)return"jsx-"+e;var r=String(t),n=e+r;return u[n]||(u[n]="jsx-"+d(e+"-"+r)),u[n]}function p(e,t){"undefined"==typeof window&&(t=t.replace(/\/style/gi,"\\/style"));var r=e+t;return u[r]||(u[r]=t.replace(/__jsx-style-dynamic-selector/g,e)),u[r]}var m=function(){function e(e){var t=void 0===e?{}:e,r=t.styleSheet,n=void 0===r?null:r,o=t.optimizeForSpeed,l=void 0!==o&&o;this._sheet=n||new i({name:"styled-jsx",optimizeForSpeed:l}),this._sheet.inject(),n&&"boolean"==typeof l&&(this._sheet.setOptimizeForSpeed(l),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),this._fromServer=void 0,this._indices={},this._instancesCounts={}}var t=e.prototype;return t.add=function(e){var t=this;void 0===this._optimizeForSpeed&&(this._optimizeForSpeed=Array.isArray(e.children),this._sheet.setOptimizeForSpeed(this._optimizeForSpeed),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),"undefined"==typeof window||this._fromServer||(this._fromServer=this.selectFromServer(),this._instancesCounts=Object.keys(this._fromServer).reduce(function(e,t){return e[t]=0,e},{}));var r=this.getIdAndRules(e),n=r.styleId,o=r.rules;if(n in this._instancesCounts){this._instancesCounts[n]+=1;return}var l=o.map(function(e){return t._sheet.insertRule(e)}).filter(function(e){return -1!==e});this._indices[n]=l,this._instancesCounts[n]=1},t.remove=function(e){var t=this,r=this.getIdAndRules(e).styleId;if(function(e,t){if(!e)throw Error("StyleSheetRegistry: "+t+".")}(r in this._instancesCounts,"styleId: `"+r+"` not found"),this._instancesCounts[r]-=1,this._instancesCounts[r]<1){var n=this._fromServer&&this._fromServer[r];n?(n.parentNode.removeChild(n),delete this._fromServer[r]):(this._indices[r].forEach(function(e){return t._sheet.deleteRule(e)}),delete this._indices[r]),delete this._instancesCounts[r]}},t.update=function(e,t){this.add(t),this.remove(e)},t.flush=function(){this._sheet.flush(),this._sheet.inject(),this._fromServer=void 0,this._indices={},this._instancesCounts={}},t.cssRules=function(){var e=this,t=this._fromServer?Object.keys(this._fromServer).map(function(t){return[t,e._fromServer[t]]}):[],r=this._sheet.cssRules();return t.concat(Object.keys(this._indices).map(function(t){return[t,e._indices[t].map(function(e){return r[e].cssText}).join(e._optimizeForSpeed?"":"\n")]}).filter(function(e){return!!e[1]}))},t.styles=function(e){var t,r;return t=this.cssRules(),void 0===(r=e)&&(r={}),t.map(function(e){var t=e[0],n=e[1];return l.default.createElement("style",{id:"__"+t,key:"__"+t,nonce:r.nonce?r.nonce:void 0,dangerouslySetInnerHTML:{__html:n}})})},t.getIdAndRules=function(e){var t=e.children,r=e.dynamic,n=e.id;if(r){var o=h(n,r);return{styleId:o,rules:Array.isArray(t)?t.map(function(e){return p(o,e)}):[p(o,t)]}}return{styleId:h(n),rules:Array.isArray(t)?t:[t]}},t.selectFromServer=function(){return Array.prototype.slice.call(document.querySelectorAll('[id^="__jsx-"]')).reduce(function(e,t){return e[t.id.slice(2)]=t,e},{})},e}(),x=o.createContext(null);x.displayName="StyleSheetContext";var f=l.default.useInsertionEffect||l.default.useLayoutEffect,v="undefined"!=typeof window?new m:void 0;function g(e){var t=v||o.useContext(x);return t&&("undefined"==typeof window?t.add(e):f(function(){return t.add(e),function(){t.remove(e)}},[e.id,String(e.dynamic)])),null}g.dynamic=function(e){return e.map(function(e){return h(e[0],e[1])}).join(" ")},t.style=g},70767:(e,t,r)=>{"use strict";e.exports=r(69670).style}},e=>{e.O(0,[63040,41791,21705,98522,77358],()=>e(e.s=21700)),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[69566],{113:()=>{},5582:(e,t,r)=>{"use strict";r.d(t,{OnboardingWizard:()=>er});var n=r(80534),o=r(74166),l=r(5742);let a=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;function s(e){var t,r,l,s;let{state:c,onAdvance:d,onTypingChange:u}=e,[h,p]=(0,o.useState)(null!=(l=null==(t=c.identity)?void 0:t.name)?l:""),[m,x]=(0,o.useState)(null!=(s=null==(r=c.identity)?void 0:r.email)?s:""),[f,v]=(0,o.useState)(!1),[g,y]=(0,o.useState)(null);async function j(e){e.preventDefault(),y(null);let t=h.trim(),r=m.trim();if(!t)return void y("Please enter your name.");if(!a.test(r))return void y("Please enter a valid email address.");v(!0);try{var n,o;if("welcome"===c.currentStep){let e=await fetch("/api/onboarding/state",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({from:"welcome",to:"identity"})});if(!e.ok){let t=await e.json().catch(()=>({}));throw Error(null!=(n=t.error)?n:"HTTP ".concat(e.status))}}let e=await fetch("/api/onboarding/identity",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:t,email:r})});if(!e.ok){let t=await e.json().catch(()=>({}));throw Error(null!=(o=t.error)?o:"HTTP ".concat(e.status))}let l=await e.json();d(l)}catch(e){y(e instanceof Error?e.message:"Could not save identity.")}finally{v(!1)}}let w={height:40,width:"100%",padding:"0 12px",borderRadius:8,border:"1px solid var(--color-border)",background:"var(--color-surface, var(--color-background))",color:"var(--color-text)",fontSize:14,outline:"none",transition:"border-color 120ms ease, box-shadow 120ms ease"};return(0,n.jsxs)("form",{className:"flex flex-col items-center gap-7 text-center",onSubmit:e=>void j(e),children:[(0,n.jsxs)("div",{className:"mb-4 space-y-2",children:[(0,n.jsx)("h1",{className:"whitespace-nowrap font-instrument text-[46px] leading-[1.05] tracking-tight",style:{color:"var(--color-text)"},children:"Let's set up your local workspace"}),(0,n.jsx)("p",{className:"text-[12.5px]",style:{color:"var(--color-text-muted)"},children:"Everything you know about people, finally in one place."})]}),(0,n.jsxs)("div",{className:"flex w-full flex-col gap-3.5",children:[(0,n.jsx)(i,{label:"Full name",htmlFor:"onboarding-name",children:(0,n.jsx)("input",{id:"onboarding-name",type:"text",placeholder:"Vedant",value:h,onChange:e=>{var t;p(t=e.target.value),null==u||u({name:t,email:m})},autoComplete:"name",autoFocus:!0,disabled:f,style:w,onFocus:e=>{e.currentTarget.style.borderColor="var(--color-accent)",e.currentTarget.style.boxShadow="0 0 0 3px color-mix(in oklab, var(--color-accent) 18%, transparent)"},onBlur:e=>{e.currentTarget.style.borderColor="var(--color-border)",e.currentTarget.style.boxShadow="none"}})}),(0,n.jsx)(i,{label:"Work email",htmlFor:"onboarding-email",children:(0,n.jsx)("input",{id:"onboarding-email",type:"email",placeholder:"name@company.com",value:m,onChange:e=>{var t;x(t=e.target.value),null==u||u({name:h,email:t})},autoComplete:"email",disabled:f,style:w,onFocus:e=>{e.currentTarget.style.borderColor="var(--color-accent)",e.currentTarget.style.boxShadow="0 0 0 3px color-mix(in oklab, var(--color-accent) 18%, transparent)"},onBlur:e=>{e.currentTarget.style.borderColor="var(--color-border)",e.currentTarget.style.boxShadow="none"}})})]}),g&&(0,n.jsx)("p",{role:"alert",className:"w-full rounded-md px-3 py-2 text-left text-[12.5px]",style:{background:"rgba(239, 68, 68, 0.08)",color:"var(--color-error, #ef4444)",border:"1px solid rgba(239, 68, 68, 0.2)"},children:g}),(0,n.jsx)("button",{type:"submit",disabled:f,className:"flex h-10 w-full items-center justify-center rounded-lg text-[13.5px] font-medium transition-opacity focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:opacity-60",style:{background:"var(--color-accent)",color:"#fff"},onMouseEnter:e=>{f||(e.currentTarget.style.opacity="0.92")},onMouseLeave:e=>{e.currentTarget.style.opacity="1"},children:f?"Saving…":"Continue"}),(0,n.jsx)("p",{className:"text-[11.5px]",style:{color:"var(--color-text-muted)"},children:"Your data stays on this device."})]})}function i(e){let{label:t,htmlFor:r,children:o}=e;return(0,n.jsxs)("div",{className:"flex flex-col gap-1.5 text-left",children:[(0,n.jsx)("label",{htmlFor:r,className:"text-[11.5px] font-medium uppercase tracking-[0.06em]",style:{color:"var(--color-text-muted)"},children:t}),o]})}function c(e){let{icon:t,title:r,description:o,status:l,statusLabel:a,secondaryLabel:s,actions:i,disabledReason:c,required:u,id:h}=e,p="blocked"===l,m="connected"===l,x=p&&c;return(0,n.jsxs)("div",{id:h,className:"group flex items-center gap-4 py-4",style:{opacity:p?.55:1},children:[(0,n.jsx)("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center",children:t}),(0,n.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("h3",{className:"text-[14px] font-medium tracking-tight",style:{color:"var(--color-text)"},children:r}),m&&(0,n.jsx)(d,{}),!m&&u&&(0,n.jsx)("span",{className:"text-[10.5px] font-medium uppercase tracking-[0.1em]",style:{color:"var(--color-text-muted)",opacity:.7},children:"Required"}),a&&!m&&(0,n.jsx)("span",{className:"text-[10.5px] font-medium uppercase tracking-[0.1em]",style:{color:"var(--color-text-muted)",opacity:.7},children:a})]}),(0,n.jsx)("p",{className:"mt-0.5 truncate text-[12.5px]",style:{color:"var(--color-text-muted)"},children:x?c:null!=s?s:o})]}),null!=i&&(0,n.jsx)("div",{className:"shrink-0",children:i})]})}function d(){return(0,n.jsx)("span",{"aria-label":"Connected",className:"inline-flex h-4 w-4 items-center justify-center rounded-full",style:{background:"rgba(22, 163, 74, 0.15)",color:"var(--color-success, #16a34a)"},children:(0,n.jsx)("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:(0,n.jsx)("path",{d:"M20 6 9 17l-5-5"})})})}function u(e){let{children:t,onClick:r,disabled:o,type:l="button"}=e;return(0,n.jsx)("button",{type:l,onClick:r,disabled:o,className:"inline-flex h-8 items-center justify-center rounded-md px-3 text-[12.5px] font-medium transition-opacity focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:opacity-45",style:{background:"var(--color-text)",color:"var(--color-background)"},onMouseEnter:e=>{o||(e.currentTarget.style.opacity="0.86")},onMouseLeave:e=>{e.currentTarget.style.opacity="1"},children:t})}function h(e){let{children:t,onClick:r,disabled:o}=e;return(0,n.jsx)("button",{type:"button",onClick:r,disabled:o,className:"text-[12.5px] underline-offset-4 transition-colors hover:underline disabled:opacity-50",style:{color:"var(--color-text-muted)"},children:t})}function p(){return(0,n.jsx)("img",{src:"/dench-workspace-icon.png",alt:"",width:28,height:28,draggable:!1,style:{borderRadius:6}})}function m(){return(0,n.jsxs)("svg",{width:"26",height:"26",viewBox:"0 0 256 193",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,children:[(0,n.jsx)("path",{d:"M58.182 192.05V93.14L27.507 65.077 0 49.504v125.091c0 9.658 7.825 17.455 17.455 17.455h40.727Z",fill:"#4285F4"}),(0,n.jsx)("path",{d:"M197.818 192.05h40.727c9.659 0 17.455-7.826 17.455-17.455V49.505l-31.156 17.837-26.983 25.798-.043 98.91Z",fill:"#34A853"}),(0,n.jsx)("path",{d:"m58.182 93.14-4.174-38.655 4.174-36.945L128 69.868l69.818-52.327 4.67 34.14-4.67 41.46L128 145.467l-69.818-52.326Z",fill:"#EA4335"}),(0,n.jsx)("path",{d:"M197.818 17.538V93.14L256 49.504V26.272c0-21.564-24.61-33.858-41.89-20.89L197.818 17.54Z",fill:"#FBBC04"}),(0,n.jsx)("path",{d:"M0 49.504l26.759 20.069L58.182 93.14V17.538L41.89 5.382C24.59-7.587 0 4.708 0 26.27v23.233Z",fill:"#C5221F"})]})}function x(){return(0,n.jsx)("img",{src:"/logos/google-calendar.png",alt:"",width:26,height:26,draggable:!1})}function f(e){var t,r,l,a,s,i;let{state:d,onAdvance:f,onStageChange:g,onRefresh:y}=e,[j,w]=(0,o.useState)(null),[b,k]=(0,o.useState)(!0),[S,N]=(0,o.useState)(""),[C,_]=(0,o.useState)(!1),[T,E]=(0,o.useState)(!1),[M,F]=(0,o.useState)(null),[L,R]=(0,o.useState)(null),[z,A]=(0,o.useState)(null),[P,B]=(0,o.useState)(!1),O=(0,o.useRef)(null),V=(0,o.useRef)(null),D=(0,o.useRef)(null),I=!!(d.denchCloud&&!d.denchCloud.skipped||(null==j?void 0:j.configured)),W=!!(null==(t=d.connections)?void 0:t.gmail),H=!!(null==(r=d.connections)?void 0:r.calendar);(0,o.useEffect)(()=>{let e="empty";I&&(e="dench-cloud"),W&&(e="gmail"),H&&(e="calendar"),g(e)},[I,W,H,g]),(0,o.useEffect)(()=>{let e=!1;return(async()=>{try{let t=await fetch("/api/onboarding/dench-cloud",{cache:"no-store"});if(!t.ok)throw Error("HTTP ".concat(t.status));let r=await t.json();if(e)return;w(r)}catch(t){if(e)return;F(t instanceof Error?t.message:"Could not check Dench Cloud.")}finally{e||k(!1)}})(),()=>{e=!0}},[]),(0,o.useEffect)(()=>{!b&&(null==j?void 0:j.configured)&&(d.denchCloud||(async()=>{try{let t=await fetch("/api/onboarding/dench-cloud",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({acceptCli:!0})});if(!t.ok){var e;let r=await t.json().catch(()=>({}));throw Error(null!=(e=r.error)?e:"HTTP ".concat(t.status))}let r=await t.json();f(r)}catch(e){F(e instanceof Error?e.message:"Could not record Dench Cloud.")}})())},[b,null==j?void 0:j.configured,d.denchCloud,f]);let q=(0,o.useCallback)(()=>{null!==V.current&&(window.clearInterval(V.current),V.current=null)},[]),Y=(0,o.useCallback)(async(e,t,r)=>{try{let o=await fetch("/api/onboarding/connections",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({toolkit:e,connectionId:t,toolkitSlug:null!=r?r:"gmail"===e?"gmail":"google-calendar",accountEmail:null,fromStep:"gmail"===e?"connect-gmail":"connect-calendar",toStep:"gmail"===e?"connect-calendar":"backfill"})});if(!o.ok){var n;let e=await o.json().catch(()=>({}));throw Error(null!=(n=e.error)?n:"HTTP ".concat(o.status))}let l=await o.json();f(l)}catch(e){A(e instanceof Error?e.message:"Could not save the connection.")}},[f]);(0,o.useEffect)(()=>{function e(e){var t;let r=e.data;if(!r||"composio-callback"!==r.type||e.origin!==window.location.origin)return;let n=D.current;if(q(),O.current=null,R(null),D.current=null,n){if("success"!==r.status||!r.connected_account_id)return void A("Connection was not completed. Please try again.");y(),Y(n,r.connected_account_id,null!=(t=r.connected_toolkit_slug)?t:null)}}return window.addEventListener("message",e),()=>window.removeEventListener("message",e)},[Y,y,q]),(0,o.useEffect)(()=>()=>q(),[q]);let Z=(0,o.useCallback)(async e=>{R(e),A(null),D.current=e;try{var t,r;let n="gmail"===e?"gmail":"google-calendar",o=await fetch("/api/composio/connect",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({toolkit:n})}),l=await o.json();if(!o.ok||!l.redirect_url)throw Error(null!=(r=l.error)?r:"HTTP ".concat(o.status));let a=window.open(l.redirect_url,"_blank","popup=yes,width=560,height=720,resizable=yes,scrollbars=yes");if(!a)throw Error("Popup was blocked. Allow popups for DenchClaw and try again.");O.current=a,null==(t=a.focus)||t.call(a),V.current=window.setInterval(()=>{let e=O.current;e&&e.closed&&(q(),O.current=null,D.current&&(D.current=null,R(null),A("The connection window was closed before authorization finished.")))},500)}catch(e){R(null),D.current=null,A(e instanceof Error?e.message:"Could not start the connection.")}},[q]);async function J(e){e.preventDefault(),F(null);let t=S.trim();if(!t)return void F("Paste your Dench Cloud API key to continue.");_(!0);try{let e=await fetch("/api/onboarding/dench-cloud",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiKey:t})});if(!e.ok){var r;let t=await e.json().catch(()=>({}));throw Error(null!=(r=t.error)?r:"HTTP ".concat(e.status))}let n=await e.json();f(n),E(!1),N("")}catch(e){F(e instanceof Error?e.message:"Could not save the API key.")}finally{_(!1)}}async function G(){_(!0),F(null);try{let t=await fetch("/api/onboarding/dench-cloud",{method:"DELETE"});if(!t.ok){var e;let r=await t.json().catch(()=>({}));throw Error(null!=(e=r.error)?e:"HTTP ".concat(t.status))}let r=await t.json();f(r),E(!1)}catch(e){F(e instanceof Error?e.message:"Could not skip.")}finally{_(!1)}}async function K(){A(null),B(!0);try{let t=await fetch("/api/onboarding/state",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({from:"connect-calendar",to:"backfill",skipping:"calendar"})});if(!t.ok){var e;let r=await t.json().catch(()=>({}));throw Error(null!=(e=r.error)?e:"HTTP ".concat(t.status))}let r=await t.json();f(r)}catch(e){A(e instanceof Error?e.message:"Could not skip calendar.")}finally{B(!1)}}let U=!I,$=!W,X=I?"connected":C?"connecting":"idle",Q=I&&W,ee=Q||"backfill"===d.currentStep||"complete"===d.currentStep;async function et(){if(A(null),"backfill"===d.currentStep){f(d),y();return}if("connect-calendar"===d.currentStep&&!H)return void await K();if("connect-calendar"===d.currentStep&&H){B(!0);try{let t=await fetch("/api/onboarding/state",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({from:"connect-calendar",to:"backfill"})});if(!t.ok){var e;let r=await t.json().catch(()=>({}));throw Error(null!=(e=r.error)?e:"HTTP ".concat(t.status))}let r=await t.json();f(r)}catch(e){A(e instanceof Error?e.message:"Could not continue.")}finally{B(!1)}return}y()}return(0,n.jsxs)("div",{className:"space-y-8",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("h1",{className:"font-instrument text-[34px] leading-[1.1] tracking-tight",style:{color:"var(--color-text)"},children:"Connect the three things that matter."}),(0,n.jsx)("p",{className:"mt-3 text-[13.5px] leading-relaxed",style:{color:"var(--color-text-muted)"},children:"Three quick connections and your workspace starts learning."})]}),(0,n.jsxs)("div",{className:"divide-y divide-[var(--color-border)]",children:[(0,n.jsx)(c,{id:"dc-card",required:!0,icon:(0,n.jsx)(p,{}),title:"Dench Cloud",description:"Runs the models that power Gmail and Calendar sync.",secondaryLabel:I?"Connected":"Runs the models that power Gmail and Calendar sync.",status:X,actions:b?(0,n.jsx)("span",{className:"text-[12px]",style:{color:"var(--color-text-muted)"},children:"Checking…"}):I?null:T?(0,n.jsx)(h,{onClick:()=>E(!1),disabled:C,children:"Cancel"}):(0,n.jsx)(u,{onClick:()=>E(!0),children:"Connect"})}),T&&!I&&(0,n.jsxs)("form",{onSubmit:e=>void J(e),className:"ml-14 space-y-3 rounded-xl px-4 py-4",style:{background:"var(--color-surface-hover)",border:"1px solid var(--color-border)"},children:[(0,n.jsxs)("div",{className:"space-y-1.5",children:[(0,n.jsx)("label",{htmlFor:"dench-cloud-key",className:"text-[11px] font-medium uppercase tracking-[0.06em]",style:{color:"var(--color-text-muted)"},children:"Dench Cloud API key"}),(0,n.jsx)("input",{id:"dench-cloud-key",type:"password",placeholder:"dench_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",value:S,onChange:e=>N(e.target.value),autoComplete:"off",autoFocus:!0,disabled:C,className:"w-full rounded-md px-3 py-2 text-[13px] outline-none transition-[border-color,box-shadow]",style:{height:36,border:"1px solid var(--color-border)",background:"var(--color-background)",color:"var(--color-text)"},onFocus:e=>{e.currentTarget.style.borderColor="var(--color-accent)",e.currentTarget.style.boxShadow="0 0 0 3px color-mix(in oklab, var(--color-accent) 18%, transparent)"},onBlur:e=>{e.currentTarget.style.borderColor="var(--color-border)",e.currentTarget.style.boxShadow="none"}}),(0,n.jsxs)("p",{className:"text-[11.5px]",style:{color:"var(--color-text-muted)"},children:["Get a key at"," ",(0,n.jsx)("a",{href:"https://dench.com/api",target:"_blank",rel:"noreferrer",style:{color:"var(--color-accent)"},children:"dench.com/api"}),"."]})]}),(0,n.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,n.jsx)("button",{type:"button",onClick:()=>void G(),disabled:C,className:"text-[12px] underline-offset-4 transition-colors hover:underline disabled:opacity-50",style:{color:"var(--color-text-muted)"},children:"Skip — use without Gmail sync"}),(0,n.jsx)(u,{type:"submit",disabled:C,children:C?"Validating…":"Save key"})]})]}),(0,n.jsx)(c,{required:!0,icon:(0,n.jsx)(m,{}),title:"Gmail",description:"We read your inbox so People and Companies can appear.",secondaryLabel:W?v(null==(a=d.connections)||null==(l=a.gmail)?void 0:l.accountEmail):U?"Connect Dench Cloud first.":"We read your inbox so People and Companies can appear.",status:W?"connected":"gmail"===L?"connecting":U?"blocked":"idle",disabledReason:U?"Requires Dench Cloud.":void 0,actions:W?null:(0,n.jsx)(u,{onClick:()=>void Z("gmail"),disabled:U||null!==L,children:"gmail"===L?"Authorizing…":"Connect"})}),(0,n.jsx)(c,{icon:(0,n.jsx)(x,{}),title:"Google Calendar",description:"Meetings sharpen your strongest-connection ranking. Optional.",secondaryLabel:H?v(null==(i=d.connections)||null==(s=i.calendar)?void 0:s.accountEmail):$?"Connect Gmail first.":"Meetings sharpen your strongest-connection ranking. Optional.",status:H?"connected":"calendar"===L?"connecting":$?"blocked":"idle",statusLabel:H?"Connected":"backfill"!==d.currentStep||H?void 0:"Skipped",disabledReason:$?"Requires Gmail.":void 0,actions:H||"backfill"===d.currentStep?null:(0,n.jsx)(u,{onClick:()=>void Z("calendar"),disabled:$||null!==L,children:"calendar"===L?"Authorizing…":"Connect"})})]}),(M||z)&&(0,n.jsx)("div",{className:"rounded-xl px-4 py-3 text-[13px]",style:{background:"rgba(239, 68, 68, 0.08)",color:"var(--color-error)",border:"1px solid rgba(239, 68, 68, 0.2)"},children:null!=M?M:z}),(0,n.jsxs)("div",{className:"flex items-center justify-between gap-3 pt-2",children:[(0,n.jsx)("p",{className:"text-[12px]",style:{color:"var(--color-text-muted)"},children:Q?null:I?"Gmail is required to continue.":"Dench Cloud unlocks the other two."}),(0,n.jsx)("button",{type:"button",onClick:()=>void et(),disabled:!ee||P,className:"flex h-10 items-center justify-center rounded-lg px-5 text-[13.5px] font-medium transition-opacity focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:opacity-50",style:{background:"var(--color-accent)",color:"#fff"},onMouseEnter:e=>{!P&&ee&&(e.currentTarget.style.opacity="0.92")},onMouseLeave:e=>{e.currentTarget.style.opacity="1"},children:P?"Opening sync…":"Continue"})]})]})}function v(e){return"string"==typeof e&&e.includes("@")?e:"Connected"}var g=r(70767),y=r.n(g);function j(e){var t,r,l,a,s;let{state:i,onAdvance:c,onLiveStats:d}=e,[u,h]=(0,o.useState)(!1),[p,m]=(0,o.useState)(null),[x,f]=(0,o.useState)(null),[v,g]=(0,o.useState)(!1),[y,j]=(0,o.useState)(!1),w=(0,o.useRef)(null),b=(null==(r=i.backfill)||null==(t=r.gmail)?void 0:t.startedAt)!==void 0||(null==(a=i.backfill)||null==(l=a.calendar)?void 0:l.startedAt)!==void 0,S=(0,o.useCallback)(async()=>{m(null);try{let t=await fetch("/api/onboarding/sync/start",{method:"POST"});if(!t.ok){var e;let r=await t.json().catch(()=>({}));throw Error(null!=(e=r.error)?e:"HTTP ".concat(t.status))}h(!0)}catch(e){m(e instanceof Error?e.message:"Could not start sync.")}},[]);(0,o.useEffect)(()=>{u||b||S()},[S,u,b]),(0,o.useEffect)(()=>{if(w.current)return;let e=new EventSource("/api/onboarding/sync/progress");return w.current=e,e.addEventListener("progress",e=>{try{var t,r,n,o,l;let a=JSON.parse(e.data);f(a),null==d||d({messages:null!=(t=a.messagesProcessed)?t:0,people:null!=(r=a.peopleProcessed)?r:0,companies:null!=(n=a.companiesProcessed)?n:0,events:null!=(o=a.eventsProcessed)?o:0}),"complete"===a.phase&&g(!0),"error"===a.phase&&m(null!=(l=a.error)?l:"Sync hit an unrecoverable error.")}catch(e){}}),e.addEventListener("error",()=>{}),()=>{e.close(),w.current=null}},[d]);let N=(0,o.useCallback)(async()=>{j(!0);try{let t=await fetch("/api/onboarding/state",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({from:"backfill",to:"complete"})});if(!t.ok){var e;let r=await t.json().catch(()=>({}));throw Error(null!=(e=r.error)?e:"HTTP ".concat(t.status))}let r=await t.json();c(r)}catch(e){m(e instanceof Error?e.message:"Could not finish onboarding.")}finally{j(!1)}},[c]),C=null!=(s=null==x?void 0:x.phase)?s:"starting";return(0,n.jsxs)("div",{className:"space-y-8",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("h1",{className:"font-instrument text-[34px] leading-[1.1] tracking-tight",style:{color:"var(--color-text)"},children:"Bringing your workspace to life."}),(0,n.jsx)("p",{className:"mt-3 text-[13.5px] leading-relaxed",style:{color:"var(--color-text-muted)"},children:"Your inbox and calendar are loading on the right. Head in as soon as there's enough — the rest keeps filling in quietly."})]}),(0,n.jsx)(k,{phase:C,latestMessage:null==x?void 0:x.message}),p&&(0,n.jsx)("p",{className:"text-[12.5px]",style:{color:"var(--color-error)"},children:p}),(0,n.jsxs)("div",{className:"flex items-center justify-between gap-3 pt-2",children:[(0,n.jsx)("p",{className:"text-[12px]",style:{color:"var(--color-text-muted)"},children:v?"All four phases are done — your workspace is ready.":"Hanging out until all four phases finish."}),(0,n.jsx)("button",{type:"button",onClick:()=>void N(),disabled:!v||y,className:"flex h-10 items-center justify-center rounded-lg px-5 text-[13.5px] font-medium transition-opacity focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:opacity-50",style:{background:"var(--color-accent)",color:"#fff"},onMouseEnter:e=>{v&&!y&&(e.currentTarget.style.opacity="0.92")},onMouseLeave:e=>{e.currentTarget.style.opacity="1"},children:y?"Opening workspace…":"Let's go"})]})]})}let w=[{id:"gmail",label:"Email",helper:"Paginating through your inbox"},{id:"calendar",label:"Calendar",helper:"Loading meetings and attendees"},{id:"merging",label:"Dedupe",helper:"Merging the same person across sources"},{id:"scoring",label:"Rank",helper:"Scoring who matters to you most"}],b=["starting","gmail","calendar","merging","scoring","complete"];function k(e){let{phase:t,latestMessage:r}=e,o=b.indexOf(t),l="complete"===t;return(0,n.jsx)("div",{children:(0,n.jsx)("ul",{className:"divide-y divide-[var(--color-border)]",children:w.map(e=>{let t=b.indexOf(e.id),a=!l&&o===t,s=l||o>t?"done":a?"active":"pending";return(0,n.jsxs)("li",{className:"flex items-center gap-3 py-3",style:{opacity:"pending"===s?.55:1,transition:"opacity 240ms ease"},children:[(0,n.jsx)(S,{state:s}),(0,n.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,n.jsx)("p",{className:"text-[13px] font-medium",style:{color:"var(--color-text)"},children:e.label}),(0,n.jsx)("p",{className:"mt-0.5 truncate text-[11.5px]",style:{color:"var(--color-text-muted)"},children:a&&r?r:e.helper})]}),(0,n.jsx)("span",{className:"text-[11px] tabular-nums",style:{color:"var(--color-text-muted)"},children:"done"===s?"Done":"active"===s?"Working":""})]},e.id)})})})}function S(e){let{state:t}=e;return"done"===t?(0,n.jsx)("span",{className:"flex h-5 w-5 shrink-0 items-center justify-center rounded-full",style:{background:"var(--color-accent)",color:"#fff"},"aria-label":"Done",children:(0,n.jsx)("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",children:(0,n.jsx)("polyline",{points:"20 6 9 17 4 12"})})}):"active"===t?(0,n.jsxs)("span",{"aria-label":"Working",className:"jsx-e6c024424f5f4c3c relative flex h-5 w-5 shrink-0 items-center justify-center",children:[(0,n.jsx)("span",{style:{border:"2px solid var(--color-border)",borderTopColor:"var(--color-accent)",animation:"syncSpin 900ms linear infinite"},className:"jsx-e6c024424f5f4c3c absolute inset-0 rounded-full"}),(0,n.jsx)(y(),{id:"e6c024424f5f4c3c",children:"@keyframes syncSpin{to{transform:rotate(360deg)}}"})]}):(0,n.jsx)("span",{className:"h-5 w-5 shrink-0 rounded-full",style:{border:"1.5px solid var(--color-border)"},"aria-label":"Pending"})}var N=r(34471);function C(e){var t;let{state:r}=e,l=(0,o.useMemo)(()=>{var e,t,n,o;let l=null!=(n=null==(t=r.identity)||null==(e=t.name)?void 0:e.trim())?n:"";return l&&null!=(o=l.split(/\s+/)[0])?o:""},[null==(t=r.identity)?void 0:t.name]);return(0,n.jsxs)("div",{className:"flex min-h-[60vh] flex-col items-center justify-center gap-8 py-12 text-center",children:[(0,n.jsxs)("span",{"aria-hidden":!0,className:"relative flex h-16 w-16 items-center justify-center rounded-full",style:{background:"var(--color-accent)",color:"#fff"},children:[(0,n.jsx)("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:(0,n.jsx)("polyline",{points:"20 6 9 17 4 12"})}),(0,n.jsx)("span",{"aria-hidden":!0,className:"absolute inset-0 rounded-full motion-safe:animate-[completePulse_1.8s_ease-out_infinite]",style:{boxShadow:"0 0 0 0 var(--color-accent)",opacity:.6}})]}),(0,n.jsxs)("div",{className:"space-y-3",children:[(0,n.jsx)("h1",{className:"font-instrument text-[40px] leading-[1.05] tracking-tight",style:{color:"var(--color-text)"},children:l?"You're all set, ".concat(l,"."):"You're all set."}),(0,n.jsx)("p",{className:"mx-auto max-w-md text-[15px] leading-relaxed",style:{color:"var(--color-text-muted)"},children:"Your workspace is ready. New email and meetings will flow in as they arrive — no more setup from here."})]}),(0,n.jsx)(N.$,{size:"lg",onClick:()=>window.location.assign("/"),children:"Open workspace"}),(0,n.jsx)("style",{children:"\n @keyframes completePulse {\n 0% { box-shadow: 0 0 0 0 var(--color-accent); opacity: 0.6; }\n 70% { box-shadow: 0 0 0 18px var(--color-accent); opacity: 0; }\n 100% { box-shadow: 0 0 0 0 var(--color-accent); opacity: 0; }\n }\n "})]})}function _(e){let{variantKey:t,children:r}=e,[l,a]=(0,o.useState)({key:t,node:r}),[s,i]=(0,o.useState)(null),c=(0,o.useRef)(null);return(0,o.useEffect)(()=>t===l.key?void a({key:t,node:r}):(i(l),a({key:t,node:r}),null!==c.current&&window.clearTimeout(c.current),c.current=window.setTimeout(()=>{i(null),c.current=null},260),()=>{null!==c.current&&(window.clearTimeout(c.current),c.current=null)}),[t,r]),(0,n.jsxs)("div",{className:"relative h-full w-full overflow-hidden",style:{background:"var(--color-main-bg)"},children:[(0,n.jsx)("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-0",style:{background:"radial-gradient(110% 80% at 80% 10%, var(--color-accent-light) 0%, transparent 55%), radial-gradient(90% 60% at 0% 100%, var(--color-surface-hover) 0%, transparent 60%)",opacity:.6}}),s&&(0,n.jsx)("div",{className:"absolute inset-0 flex h-full w-full items-center justify-center motion-safe:animate-[previewFadeOut_260ms_ease-out_forwards]","aria-hidden":!0,children:s.node},"prev-".concat(s.key)),(0,n.jsx)("div",{className:"absolute inset-0 flex h-full w-full items-center justify-center motion-safe:animate-[previewFadeIn_260ms_ease-out]",children:l.node},"cur-".concat(l.key)),(0,n.jsx)("style",{children:"\n @keyframes previewFadeIn {\n from { opacity: 0; transform: translateY(4px); }\n to { opacity: 1; transform: translateY(0); }\n }\n @keyframes previewFadeOut {\n from { opacity: 1; transform: translateY(0); }\n to { opacity: 0; transform: translateY(-4px); }\n }\n "})]})}function T(e){let{typedName:t,typedEmail:r}=e,l=(0,o.useMemo)(()=>{let e=t.trim();if(!e)return"";let[r]=e.split(/\s+/);return null!=r?r:""},[t]),a=(0,o.useMemo)(()=>{var e,r,n,o;let l=t.trim();if(!l)return"";let a=l.split(/\s+/).filter(Boolean);return((null!=(n=null==(e=a[0])?void 0:e[0])?n:"")+(a.length>1&&null!=(o=null==(r=a[a.length-1])?void 0:r[0])?o:"")).toUpperCase().slice(0,2)},[t]);return(0,n.jsxs)("div",{className:"flex h-full w-full max-w-[520px] flex-col justify-center gap-10 px-10 py-12",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("p",{className:"text-[11px] font-semibold uppercase tracking-[0.22em]",style:{color:"var(--color-text-muted)"},children:"DenchClaw"}),(0,n.jsxs)("p",{className:"mt-4 font-instrument text-[32px] leading-[1.15] tracking-tight",style:{color:"var(--color-text)"},children:["A CRM that reads your inbox\xa0—",(0,n.jsx)("br",{}),(0,n.jsx)("span",{style:{color:"var(--color-text-muted)"},children:"on your machine, not ours."})]})]}),(0,n.jsx)("div",{className:"relative rounded-2xl px-5 py-5",style:{background:"var(--color-surface)",border:"1px solid var(--color-border)",boxShadow:"var(--shadow-md)"},children:(0,n.jsxs)("div",{className:"flex items-center gap-3",children:[(0,n.jsx)("div",{className:"flex h-11 w-11 shrink-0 items-center justify-center rounded-full font-instrument text-[15px] font-medium transition-all duration-300",style:{background:a?"var(--color-accent)":"var(--color-surface-hover)",color:a?"#fff":"var(--color-text-muted)",border:a?"none":"1px dashed var(--color-border-strong)"},children:a||"\xb7"}),(0,n.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,n.jsx)("p",{className:"truncate text-[13px] font-medium transition-colors",style:{color:l?"var(--color-text)":"var(--color-text-muted)"},children:l?"Welcome, ".concat(l,"."):"Welcome,"}),(0,n.jsx)("p",{className:"mt-0.5 truncate text-[12px]",style:{color:"var(--color-text-muted)"},children:r.trim()||"Your workspace is almost ready."})]}),(0,n.jsx)("span",{"aria-hidden":!0,className:"ml-2 inline-flex h-2 w-2 shrink-0 rounded-full transition-colors duration-300",style:{background:l?"var(--color-success)":"var(--color-border-strong)"}})]})}),(0,n.jsx)("ul",{className:"space-y-4",children:E.map(e=>(0,n.jsxs)("li",{className:"flex gap-3",children:[(0,n.jsx)("span",{"aria-hidden":!0,className:"mt-0.5 flex h-8 w-8 shrink-0 items-center justify-center rounded-xl",style:{background:"var(--color-accent-light)",color:"var(--color-accent)"},children:e.icon}),(0,n.jsxs)("div",{className:"min-w-0",children:[(0,n.jsx)("p",{className:"text-[13px] font-medium",style:{color:"var(--color-text)"},children:e.title}),(0,n.jsx)("p",{className:"mt-0.5 text-[12.5px] leading-relaxed",style:{color:"var(--color-text-muted)"},children:e.description})]})]},e.title))})]})}let E=[{title:"Local-first, by design",description:"Emails and calendar events land in a DuckDB file on your laptop. Nothing leaves your machine unless you ask.",icon:(0,n.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,n.jsx)("rect",{width:"18",height:"11",x:"3",y:"10",rx:"2"}),(0,n.jsx)("path",{d:"M7 10V7a5 5 0 0 1 10 0v3"})]})},{title:"Your strongest connections, ranked",description:"We score every relationship by recency and reciprocity. The people who matter today are always on top.",icon:(0,n.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,n.jsx)("path",{d:"M12 20v-8"}),(0,n.jsx)("path",{d:"M6 20v-4"}),(0,n.jsx)("path",{d:"M18 20V8"})]})},{title:"Stays in sync, automatically",description:"Once connected, new emails and meetings flow in on their own. No refresh. No fiddling.",icon:(0,n.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,n.jsx)("path",{d:"M21 12a9 9 0 1 1-3-6.7"}),(0,n.jsx)("path",{d:"M21 4v5h-5"})]})}];function M(){return(0,n.jsxs)("div",{className:"relative h-full w-full overflow-hidden",children:[(0,n.jsx)("svg",{className:"absolute inset-0 h-full w-full",viewBox:"0 0 800 800",preserveAspectRatio:"xMidYMid slice","aria-hidden":!0,children:(0,n.jsxs)("g",{fill:"none",stroke:"color-mix(in oklab, var(--color-text) 22%, transparent)",strokeWidth:"1.4",strokeDasharray:"3 8",strokeLinecap:"round",children:[(0,n.jsx)("circle",{cx:"400",cy:"400",r:"160"}),(0,n.jsx)("circle",{cx:"400",cy:"400",r:"260"}),(0,n.jsx)("circle",{cx:"400",cy:"400",r:"360"})]})}),(0,n.jsx)("div",{className:"absolute flex items-center justify-center",style:{left:"50%",top:"50%",width:68,height:68,transform:"translate(-50%, -50%)"},children:(0,n.jsx)("img",{src:"/dench-workspace-icon.png",alt:"",width:68,height:68,draggable:!1,style:{width:"100%",height:"100%",objectFit:"contain"}})}),F(.2,[{angle:40,icon:(0,n.jsx)(z,{})},{angle:160,icon:(0,n.jsx)(A,{})},{angle:280,icon:(0,n.jsx)(P,{})}]),F(.325,[{angle:100,icon:(0,n.jsx)(B,{})},{angle:220,icon:(0,n.jsx)(D,{})},{angle:340,icon:(0,n.jsx)(I,{})}]),F(.45,[{angle:20,icon:(0,n.jsx)(O,{})},{angle:140,icon:(0,n.jsx)(V,{})},{angle:260,icon:(0,n.jsx)(W,{})}])]})}function F(e,t){return t.map((t,r)=>{let o=t.angle*Math.PI/180,l=50+100*e*Math.cos(o),a=50-100*e*Math.sin(o);return(0,n.jsx)(L,{left:"".concat(l,"%"),top:"".concat(a,"%"),children:t.icon},"".concat(e,"-").concat(r))})}function L(e){let{left:t,top:r,children:o}=e;return(0,n.jsx)("div",{className:"absolute flex items-center justify-center",style:{left:t,top:r,width:40,height:40,transform:"translate(-50%, -50%)"},children:(0,n.jsx)("div",{className:"flex items-center justify-center",style:{width:"100%",height:"100%"},children:o})})}function R(e){let{pct:t,children:r}=e;return(0,n.jsx)("div",{className:"flex items-center justify-center",style:{width:"".concat(t,"%"),height:"".concat(t,"%")},children:r})}function z(){return(0,n.jsx)(R,{pct:78,children:(0,n.jsxs)("svg",{viewBox:"0 0 256 193",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%","aria-hidden":!0,children:[(0,n.jsx)("path",{d:"M58.182 192.05V93.14L27.507 65.077 0 49.504v125.091c0 9.658 7.825 17.455 17.455 17.455h40.727Z",fill:"#4285F4"}),(0,n.jsx)("path",{d:"M197.818 192.05h40.727c9.659 0 17.455-7.826 17.455-17.455V49.505l-31.156 17.837-26.983 25.798-.043 98.91Z",fill:"#34A853"}),(0,n.jsx)("path",{d:"m58.182 93.14-4.174-38.655 4.174-36.945L128 69.868l69.818-52.327 4.67 34.14-4.67 41.46L128 145.467l-69.818-52.326Z",fill:"#EA4335"}),(0,n.jsx)("path",{d:"M197.818 17.538V93.14L256 49.504V26.272c0-21.564-24.61-33.858-41.89-20.89L197.818 17.54Z",fill:"#FBBC04"}),(0,n.jsx)("path",{d:"M0 49.504l26.759 20.069L58.182 93.14V17.538L41.89 5.382C24.59-7.587 0 4.708 0 26.27v23.233Z",fill:"#C5221F"})]})})}function A(){return(0,n.jsx)(R,{pct:98,children:(0,n.jsx)("img",{src:"/logos/google-calendar.png",alt:"",draggable:!1,style:{width:"100%",height:"100%",objectFit:"contain"}})})}function P(){return(0,n.jsx)(R,{pct:78,children:(0,n.jsxs)("svg",{viewBox:"0 0 54 54",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%","aria-hidden":!0,children:[(0,n.jsx)("path",{d:"M19.712.133a5.381 5.381 0 0 0-5.376 5.387 5.381 5.381 0 0 0 5.376 5.386h5.376V5.52A5.381 5.381 0 0 0 19.712.133m0 14.365H5.376A5.381 5.381 0 0 0 0 19.884a5.381 5.381 0 0 0 5.376 5.387h14.336a5.381 5.381 0 0 0 5.376-5.387 5.381 5.381 0 0 0-5.376-5.386",fill:"#36C5F0"}),(0,n.jsx)("path",{d:"M53.76 19.884a5.381 5.381 0 0 0-5.376-5.386 5.381 5.381 0 0 0-5.376 5.386v5.387h5.376a5.381 5.381 0 0 0 5.376-5.387m-14.336 0V5.52A5.381 5.381 0 0 0 34.048.133a5.381 5.381 0 0 0-5.376 5.387v14.364a5.381 5.381 0 0 0 5.376 5.387 5.381 5.381 0 0 0 5.376-5.387",fill:"#2EB67D"}),(0,n.jsx)("path",{d:"M34.048 54a5.381 5.381 0 0 0 5.376-5.387 5.381 5.381 0 0 0-5.376-5.386h-5.376v5.386A5.381 5.381 0 0 0 34.048 54m0-14.365h14.336a5.381 5.381 0 0 0 5.376-5.386 5.381 5.381 0 0 0-5.376-5.387H34.048a5.381 5.381 0 0 0-5.376 5.387 5.381 5.381 0 0 0 5.376 5.386",fill:"#ECB22E"}),(0,n.jsx)("path",{d:"M0 34.249a5.381 5.381 0 0 0 5.376 5.386 5.381 5.381 0 0 0 5.376-5.386v-5.387H5.376A5.381 5.381 0 0 0 0 34.25m14.336 0v14.364A5.381 5.381 0 0 0 19.712 54a5.381 5.381 0 0 0 5.376-5.387V34.25a5.381 5.381 0 0 0-5.376-5.387 5.381 5.381 0 0 0-5.376 5.387",fill:"#E01E5A"})]})})}function B(){return(0,n.jsx)(R,{pct:90,children:(0,n.jsx)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%","aria-hidden":!0,children:(0,n.jsx)("path",{d:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12",fill:"var(--color-text)"})})})}function O(){return(0,n.jsx)(R,{pct:86,children:(0,n.jsx)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%","aria-hidden":!0,children:(0,n.jsx)("path",{d:"M13.976 9.15c-2.172-.806-3.356-1.426-3.356-2.409 0-.831.683-1.305 1.901-1.305 2.227 0 4.515.858 6.09 1.631l.89-5.494C18.252.975 15.697 0 12.165 0 9.667 0 7.589.654 6.105 1.874 4.554 3.147 3.756 4.992 3.756 7.218c0 4.039 2.467 5.76 6.476 7.219 2.585.92 3.445 1.582 3.445 2.585 0 .97-.832 1.531-2.345 1.531-1.974 0-5.16-.971-7.19-2.221L3.252 21.81C5.009 22.8 8.271 24 11.649 24c2.64 0 4.842-.624 6.401-1.815 1.744-1.322 2.648-3.273 2.648-5.625 0-4.134-2.528-5.86-6.722-7.411z",fill:"#635BFF"})})})}function V(){return(0,n.jsx)(R,{pct:88,children:(0,n.jsx)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%","aria-hidden":!0,children:(0,n.jsx)("path",{d:"M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654 2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z",fill:"var(--color-text)"})})})}function D(){return(0,n.jsx)(R,{pct:80,children:(0,n.jsxs)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%","aria-hidden":!0,children:[(0,n.jsx)("path",{d:"M14.727 6.727H14V0H4.91c-.905 0-1.637.732-1.637 1.636v20.728c0 .904.732 1.636 1.636 1.636h14.182c.904 0 1.636-.732 1.636-1.636V6.727z",fill:"#0F9D58"}),(0,n.jsx)("path",{d:"M14 0v6.727h6.727z",fill:"#0B7F46"}),(0,n.jsx)("path",{d:"M7.091 10.364v8h9.818v-8zm1.09 6.909V16.09h3.273v1.182zm0-2.273v-1.182h3.273V15zm0-2.273V11.546h3.273v1.181zm4.364 4.546V16.09h3.273v1.182zm0-2.273v-1.182h3.273V15zm0-2.273V11.546h3.273v1.181z",fill:"#F1F1F1"})]})})}function I(){return(0,n.jsx)(R,{pct:90,children:(0,n.jsx)("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%","aria-hidden":!0,children:(0,n.jsx)("path",{d:"M22.447 9.564a5.988 5.988 0 0 0-2.157-2.19 5.96 5.96 0 0 0-3.012-.81c-.174 0-.344.01-.514.025V4.45a1.847 1.847 0 0 0 1.06-1.665A1.848 1.848 0 0 0 15.979.938a1.847 1.847 0 0 0-1.847 1.847 1.846 1.846 0 0 0 1.061 1.666v2.14a5.94 5.94 0 0 0-1.765.55L5.935 1.24A2.306 2.306 0 1 0 4.8 3.24l7.362 5.73a5.97 5.97 0 0 0-.965 3.286 5.99 5.99 0 0 0 1.823 4.304L10.7 18.881a1.946 1.946 0 1 0 1.385 1.386l2.286-2.286a5.98 5.98 0 0 0 2.908.748 5.98 5.98 0 0 0 5.98-5.98 5.96 5.96 0 0 0-.812-3.185zm-5.168 5.787a2.858 2.858 0 1 1 0-5.716 2.858 2.858 0 0 1 0 5.716z",fill:"#FF7A59"})})})}function W(){return(0,n.jsx)(R,{pct:82,children:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64",width:"100%",height:"100%","aria-hidden":!0,style:{color:"var(--color-text)"},children:(0,n.jsx)("path",{fill:"currentColor",d:"M32.4,0l-24,49.6h7.8l16.2-33.9l15.5,33.9h7.7L32.4,0z M25.5,49.6L32.4,64l6.7-14.4H25.5z"})})})}function H(e){var t,r;let{liveStats:l}=e,a=function(e){let[t,r]=(0,o.useState)([]),n=(0,o.useRef)(null),l=(0,o.useMemo)(()=>async()=>{var e,t;null==(e=n.current)||e.abort();let o=new AbortController;n.current=o;try{let e=await fetch("/api/crm/people?limit=".concat(12),{signal:o.signal,cache:"no-store"});if(!e.ok)return;let n=await e.json();o.signal.aborted||r(null!=(t=n.people)?t:[])}catch(e){if("AbortError"===e.name)return}},[]);(0,o.useEffect)(()=>{l();let e=window.setInterval(()=>{l()},8e3);return()=>{var t;window.clearInterval(e),null==(t=n.current)||t.abort()}},[l]);let a=(0,o.useRef)(-1);return(0,o.useEffect)(()=>{let t=Math.floor(e/30);t!==a.current&&(a.current=t,l())},[e,l]),t}(null!=(t=null==l?void 0:l.people)?t:0),s=(0,o.useMemo)(()=>Array.from({length:12},(e,t)=>t),[]),i=function(e){let[t,r]=(0,o.useState)(0);return(0,o.useEffect)(()=>{if(t===e)return;let n=window.setTimeout(()=>{r(t=>t<e?t+1:t-1)},90);return()=>window.clearTimeout(n)},[t,e]),t}(a.length);return(0,n.jsx)("div",{className:"flex h-full min-h-0 w-full items-center justify-center px-8 py-10",children:(0,n.jsxs)("div",{className:"flex h-full max-h-[640px] w-full max-w-[620px] flex-col overflow-hidden rounded-2xl",style:{background:"var(--color-background)",border:"1px solid var(--color-border)",boxShadow:"var(--shadow-lg)"},children:[(0,n.jsx)(q,{}),(0,n.jsx)(Y,{count:null!=(r=null==l?void 0:l.people)?r:a.length}),(0,n.jsx)(G,{}),(0,n.jsx)("ol",{className:"flex-1 min-h-0 overflow-y-auto",children:s.map(e=>{var t;let r=a[e];return(0,n.jsx)(K,{person:r,revealed:e<i,index:e},null!=(t=null==r?void 0:r.id)?t:"placeholder-".concat(e))})})]})})}function q(){return(0,n.jsxs)("div",{className:"flex items-center gap-2 px-4 py-2.5",style:{borderBottom:"1px solid var(--color-border)"},children:[(0,n.jsxs)("div",{className:"flex gap-1.5",children:[(0,n.jsx)("span",{className:"block h-2.5 w-2.5 rounded-full",style:{background:"#ff5f57"}}),(0,n.jsx)("span",{className:"block h-2.5 w-2.5 rounded-full",style:{background:"#febc2e"}}),(0,n.jsx)("span",{className:"block h-2.5 w-2.5 rounded-full",style:{background:"#28c840"}})]}),(0,n.jsxs)("div",{className:"ml-2 flex items-center gap-1.5 rounded-md px-2 py-0.5 text-[10.5px]",style:{background:"var(--color-surface-hover)",color:"var(--color-text-muted)"},children:[(0,n.jsx)("span",{children:"denchclaw"}),(0,n.jsx)("span",{style:{opacity:.5},children:"\xb7"}),(0,n.jsx)("span",{children:"People"})]})]})}function Y(e){let{count:t}=e,r=function(e){let[t,r]=(0,o.useState)(e),n=(0,o.useMemo)(()=>"function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,[]);return(0,o.useEffect)(()=>{if(n)return void r(e);if(t===e)return;let o=!1,l=e-t,a=Math.min(600,Math.max(200,2*Math.abs(l))),s=performance.now();return window.requestAnimationFrame(function e(n){if(o)return;let i=Math.min(1,(n-s)/a);r(Math.round(t+l*(1-Math.pow(1-i,3)))),i<1&&window.requestAnimationFrame(e)}),()=>{o=!0}},[e,n]),t}(t);return(0,n.jsxs)("header",{className:"flex shrink-0 items-center justify-between gap-4 px-5 py-3",style:{borderBottom:"1px solid var(--color-border)"},children:[(0,n.jsxs)("div",{className:"min-w-0 flex items-baseline gap-3",children:[(0,n.jsx)("h2",{className:"font-instrument text-[19px] tracking-tight truncate",style:{color:"var(--color-text)"},children:"People"}),(0,n.jsx)("span",{className:"text-[11.5px] tabular-nums",style:{color:"var(--color-text-muted)"},children:r.toLocaleString()})]}),(0,n.jsxs)("div",{className:"flex items-center gap-1.5 shrink-0",children:[(0,n.jsx)(Z,{label:"Sort: Strength"}),(0,n.jsx)(Z,{label:"Filter"})]})]})}function Z(e){let{label:t}=e;return(0,n.jsx)("span",{className:"rounded-md px-2 py-1 text-[10.5px]",style:{background:"var(--color-surface-hover)",color:"var(--color-text-muted)",border:"1px solid var(--color-border)"},children:t})}let J="minmax(0,1fr) 120px 86px 72px";function G(){return(0,n.jsxs)("div",{className:"grid items-center gap-3 px-5 py-2 text-[10px] font-semibold uppercase tracking-[0.14em]",style:{gridTemplateColumns:J,color:"var(--color-text-muted)",borderBottom:"1px solid var(--color-border)"},children:[(0,n.jsx)("span",{children:"Person"}),(0,n.jsx)("span",{children:"Company"}),(0,n.jsx)("span",{className:"text-right",children:"Last touch"}),(0,n.jsx)("span",{className:"text-right",children:"Strength"})]})}function K(e){let{person:t,revealed:r,index:o}=e;return(0,n.jsx)("li",{className:"grid items-center gap-3 px-5 py-2.5",style:{gridTemplateColumns:J,borderBottom:"1px solid var(--color-border)",opacity:+!!r,transform:r?"translateY(0)":"translateY(-4px)",transition:"opacity 320ms ease ".concat(20*o,"ms, transform 320ms ease ").concat(20*o,"ms")},children:t?(0,n.jsx)(U,{person:t}):(0,n.jsx)($,{})})}function U(e){var t,r,o,l;let{person:a}=e,s=(null==(t=a.name)?void 0:t.trim())||a.email||"Unknown",i=null!=(o=a.company_name)?o:function(e){var t;if(!e)return null;let r=e.lastIndexOf("@");if(-1===r)return null;let n=e.slice(r+1).toLowerCase();if(!n)return null;let o=null!=(t=n.split(".")[0])?t:n;return o?o.charAt(0).toUpperCase()+o.slice(1):null}(a.email),c=Math.max(0,Math.min(100,null!=(l=a.strength_score)?l:0)),d=function(e){if(!e)return"—";let t=Date.parse(e);if(Number.isNaN(t))return"—";let r=Math.floor((Date.now()-t)/6e4);if(r<1)return"Just now";if(r<60)return"".concat(r,"m ago");let n=Math.floor(r/60);if(n<24)return"".concat(n,"h ago");let o=Math.floor(n/24);if(o<7)return"".concat(o,"d ago");let l=Math.floor(o/7);if(l<5)return"".concat(l,"w ago");let a=Math.floor(o/30);if(a<12)return"".concat(a,"mo ago");let s=Math.floor(o/365);return"".concat(s,"y ago")}(a.last_interaction_at),u=(null==(r=a.job_title)?void 0:r.trim())||a.email||"";return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"min-w-0",children:[(0,n.jsx)("p",{className:"truncate text-[12.5px] font-medium",style:{color:"var(--color-text)"},children:s}),u&&(0,n.jsx)("p",{className:"truncate text-[10.5px]",style:{color:"var(--color-text-muted)"},children:u})]}),(0,n.jsx)("p",{className:"truncate text-[12px]",style:{color:"var(--color-text-secondary)"},children:null!=i?i:""}),(0,n.jsx)("p",{className:"text-right text-[11.5px] tabular-nums",style:{color:"var(--color-text-muted)"},children:d}),(0,n.jsx)(X,{value:c})]})}function $(){return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"min-w-0",children:[(0,n.jsx)("span",{className:"block h-2.5 w-32 rounded",style:{background:"var(--color-surface-hover)"}}),(0,n.jsx)("span",{className:"mt-1 block h-2 w-20 rounded",style:{background:"var(--color-surface-hover)",opacity:.7}})]}),(0,n.jsx)("span",{className:"block h-2.5 w-20 rounded",style:{background:"var(--color-surface-hover)"}}),(0,n.jsx)("span",{className:"block h-2 w-12 justify-self-end rounded",style:{background:"var(--color-surface-hover)"}}),(0,n.jsx)("span",{className:"block h-2 w-10 justify-self-end rounded",style:{background:"var(--color-surface-hover)"}})]})}function X(e){let{value:t}=e;return(0,n.jsxs)("div",{className:"flex items-center justify-end gap-1.5",children:[(0,n.jsx)("div",{className:"relative h-1.5 w-10 overflow-hidden rounded-full",style:{background:"var(--color-surface-hover)"},children:(0,n.jsx)("div",{className:"absolute inset-y-0 left-0 rounded-full",style:{width:"".concat(t,"%"),background:"var(--color-accent)"}})}),(0,n.jsx)("span",{className:"w-5 text-right text-[10.5px] tabular-nums",style:{color:"var(--color-text-muted)"},children:Math.round(t)})]})}var Q=r(67465),ee=r(46009);let et=[{id:"identity",label:"Identity"},{id:"setup",label:"Setup"},{id:"sync",label:"Sync"}];function er(e){var t,r;let{initialState:l,workspaceCount:a=1,activeWorkspace:s=null}=e,[i,c]=(0,o.useState)(l),[d,u]=(0,o.useState)(!1),[h,p]=(0,o.useState)(!1),[m,x]=(0,o.useState)(null),[f,v]=(0,o.useState)(()=>{var e,t,r,n;return{name:null!=(r=null==(e=l.identity)?void 0:e.name)?r:"",email:null!=(n=null==(t=l.identity)?void 0:t.email)?n:""}}),[g,y]=(0,o.useState)("empty"),[j,w]=(0,o.useState)({messages:0,people:0,companies:0,events:0}),b=(0,o.useCallback)(()=>{window.location.reload()},[]),k=(0,o.useCallback)(async()=>{u(!0);try{let e=await fetch("/api/onboarding/state",{cache:"no-store"});if(e.ok){let t=await e.json();c(t)}}finally{u(!1)}},[]),S=function(e){switch(e){case"welcome":case"identity":return"identity";case"dench-cloud":case"connect-gmail":case"connect-calendar":return"setup";case"backfill":return"sync";case"complete":return"complete"}}(i.currentStep),N=(0,o.useMemo)(()=>{if(!m)return S;if("complete"===S)return"complete";let e=et.findIndex(e=>e.id===S);return et.findIndex(e=>e.id===m)<e?m:S},[S,m]);(0,o.useEffect)(()=>{if(!m)return;if("complete"===S)return void x(null);let e=et.findIndex(e=>e.id===S);et.findIndex(e=>e.id===m)>=e&&x(null)},[S,m]);let E=(0,o.useCallback)(e=>{c(e),x(null)},[]),F="complete"===N?et.length-1:et.findIndex(e=>e.id===N),L="identity"===N,R="complete"!==N&&F>0,z=F>0&&null!=(r=null==(t=et[F-1])?void 0:t.label)?r:null,A=(0,o.useCallback)(()=>{var e;if(!R)return;let t=null==(e=et[F-1])?void 0:e.id;t&&x(t)},[R,F]);(0,o.useEffect)(()=>{if(R)return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e);function e(e){let t=e.target;if((null==t?void 0:t.tagName)==="INPUT"||(null==t?void 0:t.tagName)==="TEXTAREA"||(null==t?void 0:t.isContentEditable)===!0)return;let r=(e.metaKey||e.ctrlKey)&&"["===e.key;("Escape"===e.key||r)&&(e.preventDefault(),A())}},[R,A]);let{previewVariant:P,previewNode:B,previewKey:O}=(0,o.useMemo)(()=>"identity"===N?{previewVariant:"editorial",previewKey:"identity",previewNode:(0,n.jsx)(T,{typedName:f.name,typedEmail:f.email})}:"setup"===N?{previewVariant:"workspace-mock",previewKey:"setup:orbit",previewNode:(0,n.jsx)(M,{})}:"sync"===N?{previewVariant:"workspace-live",previewKey:"sync:people-table",previewNode:(0,n.jsx)(H,{liveStats:j})}:{previewVariant:"workspace-mock",previewKey:"complete",previewNode:(0,n.jsx)(H,{liveStats:j})},[N,f,g,j]);return"complete"===N?(0,n.jsxs)("div",{className:"min-h-screen w-full",style:{background:"var(--color-background)"},children:[(0,n.jsxs)("header",{className:"flex h-16 items-center justify-between px-6 sm:px-10",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,n.jsx)("img",{src:"/dench-workspace-icon.png",alt:"DenchClaw",width:36,height:36,className:"h-9 w-9 rounded-xl",draggable:!1}),(0,n.jsx)("span",{className:"font-instrument text-3xl tracking-tight leading-none",style:{color:"var(--color-text)"},children:"DenchClaw"})]}),(0,n.jsx)(el,{})]}),(0,n.jsx)("main",{className:"flex min-h-[calc(100vh-4rem)] items-center justify-center px-6",children:(0,n.jsx)(C,{state:i})})]}):(0,n.jsxs)("div",{className:"min-h-screen w-full",style:{background:"var(--color-background)"},children:[(0,n.jsxs)("header",{className:"relative flex h-16 items-center justify-between gap-6 px-6 sm:px-10",children:[a>1?(0,n.jsx)(Q.N,{activeWorkspaceHint:s,onWorkspaceSwitch:b,onWorkspaceDelete:b,onCreateWorkspace:()=>p(!0),trigger:e=>{let{onClick:t,switching:r}=e;return(0,n.jsxs)("button",{type:"button",onClick:t,disabled:r,className:"flex items-center gap-2.5 rounded-lg px-1.5 py-1 -mx-1.5 transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-accent)] disabled:opacity-50",title:"Switch workspace",children:[(0,n.jsx)("img",{src:"/dench-workspace-icon.png",alt:"DenchClaw",width:36,height:36,className:"h-9 w-9 rounded-xl",draggable:!1}),(0,n.jsx)("span",{className:"font-instrument text-3xl tracking-tight leading-none",style:{color:"var(--color-text)"},children:"DenchClaw"}),(0,n.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.25",strokeLinecap:"round",strokeLinejoin:"round",className:"ml-0.5 shrink-0 transition-colors",style:{color:"var(--color-text-muted)"},children:(0,n.jsx)("path",{d:"m6 9 6 6 6-6"})})]})}}):(0,n.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,n.jsx)("img",{src:"/dench-workspace-icon.png",alt:"DenchClaw",width:36,height:36,className:"h-9 w-9 rounded-xl",draggable:!1}),(0,n.jsx)("span",{className:"font-instrument text-3xl tracking-tight leading-none",style:{color:"var(--color-text)"},children:"DenchClaw"})]}),(0,n.jsxs)("div",{"aria-live":"polite",className:"pointer-events-none absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 text-[12px] font-medium tabular-nums tracking-tight",style:{color:"var(--color-text-muted)"},children:["Step ",Math.max(0,F)+1," of ",et.length]}),(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[d&&(0,n.jsx)("span",{className:"hidden text-[11px] uppercase tracking-wider sm:inline",style:{color:"var(--color-text-muted)"},children:"Syncing…"}),(0,n.jsx)(el,{})]})]}),(0,n.jsxs)("div",{className:L?"relative min-h-[calc(100vh-4rem)]":"grid min-h-[calc(100vh-4rem)] grid-cols-1 lg:grid-cols-[minmax(0,1fr)_minmax(0,1fr)]",children:[L&&(0,n.jsx)(eo,{}),(0,n.jsx)("main",{className:L?"relative flex min-h-[calc(100vh-4rem)] items-center justify-center px-6 pb-16 pt-6 sm:px-10":"flex items-start justify-center px-6 pb-16 pt-6 sm:px-10 lg:items-center lg:pt-0",children:(0,n.jsxs)("div",{className:L?"w-full max-w-[400px]":"w-full max-w-[520px]",children:[(0,n.jsx)("div",{className:"mb-4 h-8",children:R&&z&&(0,n.jsxs)("button",{type:"button",onClick:A,className:"group inline-flex h-8 items-center gap-1.5 rounded-md px-2 -ml-2 text-[12.5px] font-medium transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-accent)]",style:{color:"var(--color-text-muted)"},onMouseEnter:e=>{e.currentTarget.style.color="var(--color-text)"},onMouseLeave:e=>{e.currentTarget.style.color="var(--color-text-muted)"},"aria-label":"Back to ".concat(z),title:"Back (Esc)",children:[(0,n.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.25",strokeLinecap:"round",strokeLinejoin:"round",className:"transition-transform group-hover:-translate-x-0.5",children:(0,n.jsx)("path",{d:"m15 18-6-6 6-6"})}),"Back to ",z]})}),(0,n.jsx)(en,{activeClientStep:N,state:i,onAdvance:E,onRefresh:k,onIdentityTyping:v,onSetupStageChange:y,onLiveStats:w})]})}),!L&&(0,n.jsx)("aside",{className:"hidden lg:flex",style:{borderLeft:"1px solid var(--color-border)"},children:(0,n.jsx)(_,{variantKey:O,children:B})})]}),(0,n.jsx)(ee.s,{isOpen:h,onClose:()=>p(!1),onCreated:b})]})}function en(e){let{activeClientStep:t,state:r,onAdvance:o,onRefresh:l,onIdentityTyping:a,onSetupStageChange:i,onLiveStats:c}=e;switch(t){case"identity":return(0,n.jsx)(s,{state:r,onAdvance:o,onTypingChange:a});case"setup":return(0,n.jsx)(f,{state:r,onAdvance:o,onRefresh:l,onStageChange:e=>i(e)});case"sync":return(0,n.jsx)(j,{state:r,onAdvance:o,onLiveStats:c});case"complete":return(0,n.jsx)(C,{state:r})}}function eo(){return(0,n.jsx)("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-0",style:{backgroundImage:"linear-gradient(to right, var(--color-border) 1px, transparent 1px), linear-gradient(to bottom, var(--color-border) 1px, transparent 1px)",backgroundSize:"48px 48px",maskImage:"radial-gradient(ellipse 90% 75% at 50% 50%, transparent 5%, black 100%)",WebkitMaskImage:"radial-gradient(ellipse 90% 75% at 50% 50%, transparent 5%, black 100%)",opacity:.7}})}function el(){let{resolvedTheme:e,setTheme:t}=(0,l.D)(),[r,a]=(0,o.useState)(!1);if((0,o.useEffect)(()=>a(!0),[]),!r)return(0,n.jsx)("div",{className:"h-9 w-9"});let s="dark"===e;return(0,n.jsx)("button",{type:"button",onClick:()=>t(s?"light":"dark"),"aria-label":s?"Switch to light mode":"Switch to dark mode",title:s?"Switch to light mode":"Switch to dark mode",className:"flex h-9 w-9 items-center justify-center rounded-full bg-transparent transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-accent)]",style:{color:"var(--color-text-muted)"},onMouseEnter:e=>{e.currentTarget.style.color="var(--color-text)"},onMouseLeave:e=>{e.currentTarget.style.color="var(--color-text-muted)"},children:s?(0,n.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,n.jsx)("circle",{cx:"12",cy:"12",r:"4"}),(0,n.jsx)("path",{d:"M12 2v2"}),(0,n.jsx)("path",{d:"M12 20v2"}),(0,n.jsx)("path",{d:"m4.93 4.93 1.41 1.41"}),(0,n.jsx)("path",{d:"m17.66 17.66 1.41 1.41"}),(0,n.jsx)("path",{d:"M2 12h2"}),(0,n.jsx)("path",{d:"M20 12h2"}),(0,n.jsx)("path",{d:"m6.34 17.66-1.41 1.41"}),(0,n.jsx)("path",{d:"m19.07 4.93-1.41 1.41"})]}):(0,n.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,n.jsx)("path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"})})})}},41267:(e,t,r)=>{Promise.resolve().then(r.bind(r,5582))},69670:(e,t,r)=>{"use strict";var n=r(37811);r(113);var o=r(74166),l=function(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}(o),a=void 0!==n&&n.env&&!0,s=function(e){return"[object String]"===Object.prototype.toString.call(e)},i=function(){function e(e){var t=void 0===e?{}:e,r=t.name,n=void 0===r?"stylesheet":r,o=t.optimizeForSpeed,l=void 0===o?a:o;c(s(n),"`name` must be a string"),this._name=n,this._deletedRulePlaceholder="#"+n+"-deleted-rule____{}",c("boolean"==typeof l,"`optimizeForSpeed` must be a boolean"),this._optimizeForSpeed=l,this._serverSheet=void 0,this._tags=[],this._injected=!1,this._rulesCount=0;var i="undefined"!=typeof window&&document.querySelector('meta[property="csp-nonce"]');this._nonce=i?i.getAttribute("content"):null}var t,r=e.prototype;return r.setOptimizeForSpeed=function(e){c("boolean"==typeof e,"`setOptimizeForSpeed` accepts a boolean"),c(0===this._rulesCount,"optimizeForSpeed cannot be when rules have already been inserted"),this.flush(),this._optimizeForSpeed=e,this.inject()},r.isOptimizeForSpeed=function(){return this._optimizeForSpeed},r.inject=function(){var e=this;if(c(!this._injected,"sheet already injected"),this._injected=!0,"undefined"!=typeof window&&this._optimizeForSpeed){this._tags[0]=this.makeStyleTag(this._name),this._optimizeForSpeed="insertRule"in this.getSheet(),this._optimizeForSpeed||(a||console.warn("StyleSheet: optimizeForSpeed mode not supported falling back to standard mode."),this.flush(),this._injected=!0);return}this._serverSheet={cssRules:[],insertRule:function(t,r){return"number"==typeof r?e._serverSheet.cssRules[r]={cssText:t}:e._serverSheet.cssRules.push({cssText:t}),r},deleteRule:function(t){e._serverSheet.cssRules[t]=null}}},r.getSheetForTag=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]},r.getSheet=function(){return this.getSheetForTag(this._tags[this._tags.length-1])},r.insertRule=function(e,t){if(c(s(e),"`insertRule` accepts only strings"),"undefined"==typeof window)return"number"!=typeof t&&(t=this._serverSheet.cssRules.length),this._serverSheet.insertRule(e,t),this._rulesCount++;if(this._optimizeForSpeed){var r=this.getSheet();"number"!=typeof t&&(t=r.cssRules.length);try{r.insertRule(e,t)}catch(t){return a||console.warn("StyleSheet: illegal rule: \n\n"+e+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),-1}}else{var n=this._tags[t];this._tags.push(this.makeStyleTag(this._name,e,n))}return this._rulesCount++},r.replaceRule=function(e,t){if(this._optimizeForSpeed||"undefined"==typeof window){var r="undefined"!=typeof window?this.getSheet():this._serverSheet;if(t.trim()||(t=this._deletedRulePlaceholder),!r.cssRules[e])return e;r.deleteRule(e);try{r.insertRule(t,e)}catch(n){a||console.warn("StyleSheet: illegal rule: \n\n"+t+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),r.insertRule(this._deletedRulePlaceholder,e)}}else{var n=this._tags[e];c(n,"old rule at index `"+e+"` not found"),n.textContent=t}return e},r.deleteRule=function(e){if("undefined"==typeof window)return void this._serverSheet.deleteRule(e);if(this._optimizeForSpeed)this.replaceRule(e,"");else{var t=this._tags[e];c(t,"rule at index `"+e+"` not found"),t.parentNode.removeChild(t),this._tags[e]=null}},r.flush=function(){this._injected=!1,this._rulesCount=0,"undefined"!=typeof window?(this._tags.forEach(function(e){return e&&e.parentNode.removeChild(e)}),this._tags=[]):this._serverSheet.cssRules=[]},r.cssRules=function(){var e=this;return"undefined"==typeof window?this._serverSheet.cssRules:this._tags.reduce(function(t,r){return r?t=t.concat(Array.prototype.map.call(e.getSheetForTag(r).cssRules,function(t){return t.cssText===e._deletedRulePlaceholder?null:t})):t.push(null),t},[])},r.makeStyleTag=function(e,t,r){t&&c(s(t),"makeStyleTag accepts only strings as second parameter");var n=document.createElement("style");this._nonce&&n.setAttribute("nonce",this._nonce),n.type="text/css",n.setAttribute("data-"+e,""),t&&n.appendChild(document.createTextNode(t));var o=document.head||document.getElementsByTagName("head")[0];return r?o.insertBefore(n,r):o.appendChild(n),n},t=[{key:"length",get:function(){return this._rulesCount}}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(e.prototype,t),e}();function c(e,t){if(!e)throw Error("StyleSheet: "+t+".")}var d=function(e){for(var t=5381,r=e.length;r;)t=33*t^e.charCodeAt(--r);return t>>>0},u={};function h(e,t){if(!t)return"jsx-"+e;var r=String(t),n=e+r;return u[n]||(u[n]="jsx-"+d(e+"-"+r)),u[n]}function p(e,t){"undefined"==typeof window&&(t=t.replace(/\/style/gi,"\\/style"));var r=e+t;return u[r]||(u[r]=t.replace(/__jsx-style-dynamic-selector/g,e)),u[r]}var m=function(){function e(e){var t=void 0===e?{}:e,r=t.styleSheet,n=void 0===r?null:r,o=t.optimizeForSpeed,l=void 0!==o&&o;this._sheet=n||new i({name:"styled-jsx",optimizeForSpeed:l}),this._sheet.inject(),n&&"boolean"==typeof l&&(this._sheet.setOptimizeForSpeed(l),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),this._fromServer=void 0,this._indices={},this._instancesCounts={}}var t=e.prototype;return t.add=function(e){var t=this;void 0===this._optimizeForSpeed&&(this._optimizeForSpeed=Array.isArray(e.children),this._sheet.setOptimizeForSpeed(this._optimizeForSpeed),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),"undefined"==typeof window||this._fromServer||(this._fromServer=this.selectFromServer(),this._instancesCounts=Object.keys(this._fromServer).reduce(function(e,t){return e[t]=0,e},{}));var r=this.getIdAndRules(e),n=r.styleId,o=r.rules;if(n in this._instancesCounts){this._instancesCounts[n]+=1;return}var l=o.map(function(e){return t._sheet.insertRule(e)}).filter(function(e){return -1!==e});this._indices[n]=l,this._instancesCounts[n]=1},t.remove=function(e){var t=this,r=this.getIdAndRules(e).styleId;if(function(e,t){if(!e)throw Error("StyleSheetRegistry: "+t+".")}(r in this._instancesCounts,"styleId: `"+r+"` not found"),this._instancesCounts[r]-=1,this._instancesCounts[r]<1){var n=this._fromServer&&this._fromServer[r];n?(n.parentNode.removeChild(n),delete this._fromServer[r]):(this._indices[r].forEach(function(e){return t._sheet.deleteRule(e)}),delete this._indices[r]),delete this._instancesCounts[r]}},t.update=function(e,t){this.add(t),this.remove(e)},t.flush=function(){this._sheet.flush(),this._sheet.inject(),this._fromServer=void 0,this._indices={},this._instancesCounts={}},t.cssRules=function(){var e=this,t=this._fromServer?Object.keys(this._fromServer).map(function(t){return[t,e._fromServer[t]]}):[],r=this._sheet.cssRules();return t.concat(Object.keys(this._indices).map(function(t){return[t,e._indices[t].map(function(e){return r[e].cssText}).join(e._optimizeForSpeed?"":"\n")]}).filter(function(e){return!!e[1]}))},t.styles=function(e){var t,r;return t=this.cssRules(),void 0===(r=e)&&(r={}),t.map(function(e){var t=e[0],n=e[1];return l.default.createElement("style",{id:"__"+t,key:"__"+t,nonce:r.nonce?r.nonce:void 0,dangerouslySetInnerHTML:{__html:n}})})},t.getIdAndRules=function(e){var t=e.children,r=e.dynamic,n=e.id;if(r){var o=h(n,r);return{styleId:o,rules:Array.isArray(t)?t.map(function(e){return p(o,e)}):[p(o,t)]}}return{styleId:h(n),rules:Array.isArray(t)?t:[t]}},t.selectFromServer=function(){return Array.prototype.slice.call(document.querySelectorAll('[id^="__jsx-"]')).reduce(function(e,t){return e[t.id.slice(2)]=t,e},{})},e}(),x=o.createContext(null);x.displayName="StyleSheetContext";var f=l.default.useInsertionEffect||l.default.useLayoutEffect,v="undefined"!=typeof window?new m:void 0;function g(e){var t=v||o.useContext(x);return t&&("undefined"==typeof window?t.add(e):f(function(){return t.add(e),function(){t.remove(e)}},[e.id,String(e.dynamic)])),null}g.dynamic=function(e){return e.map(function(e){return h(e[0],e[1])}).join(" ")},t.style=g},70767:(e,t,r)=>{"use strict";e.exports=r(69670).style}},e=>{e.O(0,[63040,41791,21705,98522,77358],()=>e(e.s=41267)),_N_E=e.O()}]);
|