failproofai 1.0.1 → 1.0.2-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/build-manifest.json +3 -3
- package/.next/standalone/.next/prerender-manifest.json +6 -6
- package/.next/standalone/.next/required-server-files.json +1 -1
- package/.next/standalone/.next/server/app/_global-error/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/_global-error/page.js +2 -2
- package/.next/standalone/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_global-error.html +1 -1
- package/.next/standalone/.next/server/app/_global-error.rsc +7 -7
- package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +6 -6
- package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +7 -7
- package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/_not-found/page.js +2 -2
- package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_not-found.html +1 -1
- package/.next/standalone/.next/server/app/_not-found.rsc +15 -15
- package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +15 -15
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +14 -14
- package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/api/audit/invite/route.js +3 -2
- package/.next/standalone/.next/server/app/api/audit/invite/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/audit/run/route.js +5 -4
- package/.next/standalone/.next/server/app/api/audit/run/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/audit/status/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/auth/login-request/route.js +2 -2
- package/.next/standalone/.next/server/app/api/auth/login-request/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/auth/login-verify/route.js +4 -3
- package/.next/standalone/.next/server/app/api/auth/login-verify/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/auth/logout/route.js +4 -4
- package/.next/standalone/.next/server/app/api/auth/logout/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/auth/status/route.js +4 -4
- package/.next/standalone/.next/server/app/api/auth/status/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/download/[project]/[session]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/audit/page/server-reference-manifest.json +2 -2
- package/.next/standalone/.next/server/app/audit/page.js +2 -2
- package/.next/standalone/.next/server/app/audit/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/audit/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/index.html +1 -1
- package/.next/standalone/.next/server/app/index.rsc +15 -15
- package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +14 -14
- package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +15 -15
- package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/page.js +2 -2
- package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/policies/page/server-reference-manifest.json +66 -22
- package/.next/standalone/.next/server/app/policies/page.js +5 -4
- package/.next/standalone/.next/server/app/policies/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/policies/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/project/[name]/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/project/[name]/page.js +2 -2
- package/.next/standalone/.next/server/app/project/[name]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/project/[name]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/react-loadable-manifest.json +2 -2
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/server-reference-manifest.json +2 -2
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page.js +2 -2
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/projects/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/projects/page.js +2 -2
- package/.next/standalone/.next/server/app/projects/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/projects/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/settings/page/server-reference-manifest.json +4 -4
- package/.next/standalone/.next/server/app/settings/page.js +1 -1
- package/.next/standalone/.next/server/app/settings/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/chunks/{[externals]__1qzqcio._.js → [externals]__0e32-7c._.js} +1 -1
- package/.next/standalone/.next/server/chunks/[externals]__1s462yl._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__01eqny5._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0_0xu5z._.js +1 -1
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__1p8poxd._.js → [root-of-the-server]__0igxt32._.js} +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0neqlu-._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0o07qi9._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0t9oqnn._.js +3 -0
- package/.next/standalone/.next/server/chunks/_0bs-v8p._.js +3 -0
- package/.next/standalone/.next/server/chunks/_0tovk6q._.js +3 -0
- package/.next/standalone/.next/server/chunks/_0trp3yc._.js +3 -0
- package/.next/standalone/.next/server/chunks/_185gyk9._.js +3 -0
- package/.next/standalone/.next/server/chunks/_1ek68ln._.js +5 -6
- package/.next/standalone/.next/server/chunks/lib_telemetry-id_ts_1k8gj9o._.js +3 -0
- package/.next/standalone/.next/server/chunks/{node_modules_posthog-node_dist_entrypoints_index_node_mjs_09d5c79._.js → node_modules_posthog-node_dist_entrypoints_index_node_mjs_04op_ou._.js} +1 -1
- package/.next/standalone/.next/server/chunks/{node_modules_posthog-node_dist_entrypoints_index_node_mjs_1d2g73o._.js → node_modules_posthog-node_dist_entrypoints_index_node_mjs_0dr20uz._.js} +1 -1
- package/.next/standalone/.next/server/chunks/package_json_[json]_cjs_1nxcc4v._.js +1 -1
- package/.next/standalone/.next/server/chunks/src_hooks_0xbw3bu._.js +12 -0
- package/.next/standalone/.next/server/chunks/src_hooks_fp-home_ts_09kv0bn._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__013jr2b._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__01wy8d-._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__02npjtd._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0spkm68._.js → [root-of-the-server]__07gm3zl._.js} +21 -20
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0da85px._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ftmoxc._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0oa1lav._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0p-5p8u._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0s740oi._.js +6 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__07tbbf3._.js → [root-of-the-server]__0zig5sv._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__192nhvh._.js +5 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1p2otjt._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/{_0lvyuv4._.js → _00e9tnf._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_08x1r5t._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0u5zauv._.js → _12l4a_k._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_1u8-lu2._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_1zopuov._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/app_audit__components_audit-dashboard_tsx_0p9ud47._.js +13 -13
- package/.next/standalone/.next/server/chunks/ssr/app_global-error_tsx_1kp6l3x._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/app_policies_hooks-client_tsx_19dqvpc._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/app_settings_settings-client_tsx_20lq-mq._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_hooks_08o7bqo._.js +10 -0
- package/.next/standalone/.next/server/chunks/ssr/src_hooks_builtin-policies_ts_09j2ndl._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_hooks_fp-home_ts_0je3xkv._.js +1 -1
- package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
- package/.next/standalone/.next/server/middleware.js +1 -1
- package/.next/standalone/.next/server/pages/404.html +1 -1
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.json +71 -27
- package/.next/standalone/.next/static/chunks/{37fcpc36x9gpe.js → 0eqky-7n7dgdm.js} +1 -1
- package/.next/standalone/.next/static/chunks/{1ide1wl2f7zi1.js → 0sa9v5mhc8861.js} +13 -13
- package/.next/standalone/.next/static/chunks/1mfzsja6ftim5.css +2 -0
- package/.next/standalone/.next/static/chunks/{3k7mxbp9hiom0.js → 1nuqytbta44af.js} +1 -1
- package/.next/standalone/.next/static/chunks/1sl2xmn9inx3y.js +6 -0
- package/.next/standalone/.next/static/chunks/{2_2lhuojq2xop.js → 2aawsjld9ied_.js} +1 -1
- package/.next/standalone/.next/static/chunks/2gn7ut4svofm2.js +1 -0
- package/.next/standalone/.next/static/chunks/{31s1smp-g7gks.js → 2hs7ycvsav7v2.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0k5050ezjvv49.js → 2i2yt3hzjredm.js} +1 -1
- package/.next/standalone/.next/static/chunks/{3c808qrfcq0im.js → 35xg6retpe6rp.js} +1 -1
- package/.next/standalone/.next/static/chunks/{2zpp1we2jv6tb.js → 3y54nw0i7dsjl.js} +1 -1
- package/.next/standalone/SECURITY.md +5 -4
- package/.next/standalone/app/actions/get-hooks-config.ts +108 -17
- package/.next/standalone/app/actions/pack-actions.ts +153 -0
- package/.next/standalone/app/audit/_components/run-progress.tsx +1 -1
- package/.next/standalone/app/audit/_components/share-templates.ts +13 -13
- package/.next/standalone/app/policies/hooks-client.tsx +320 -14
- package/.next/standalone/components/navbar.tsx +2 -28
- package/.next/standalone/components/reach-developers.tsx +8 -1
- package/.next/standalone/docs-old/agenteye/python-sdk-skill.mdx +1 -1
- package/.next/standalone/docs-old/agenteye/python-sdk.mdx +59 -35
- package/.next/standalone/docs-old/i18n/README.ar.md +1 -0
- package/.next/standalone/docs-old/i18n/README.de.md +1 -0
- package/.next/standalone/docs-old/i18n/README.es.md +1 -0
- package/.next/standalone/docs-old/i18n/README.fr.md +1 -0
- package/.next/standalone/docs-old/i18n/README.he.md +1 -0
- package/.next/standalone/docs-old/i18n/README.hi.md +1 -0
- package/.next/standalone/docs-old/i18n/README.it.md +1 -0
- package/.next/standalone/docs-old/i18n/README.ja.md +1 -0
- package/.next/standalone/docs-old/i18n/README.ko.md +1 -0
- package/.next/standalone/docs-old/i18n/README.pt-br.md +1 -0
- package/.next/standalone/docs-old/i18n/README.ru.md +1 -0
- package/.next/standalone/docs-old/i18n/README.tr.md +1 -0
- package/.next/standalone/docs-old/i18n/README.vi.md +1 -0
- package/.next/standalone/docs-old/i18n/README.zh.md +1 -0
- package/.next/standalone/fp-cloud-cli/CHANGELOG.md +431 -0
- package/.next/standalone/fp-cloud-cli/LICENSE +42 -0
- package/.next/standalone/fp-cloud-cli/MANIFEST.in +10 -0
- package/.next/standalone/fp-cloud-cli/README.md +259 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/__init__.py +10 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/__main__.py +4 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/_click_compat.py +64 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/_context.py +332 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/_version.py +1 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/analytics.py +432 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/analytics_config.py +77 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/analytics_registry.py +83 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/app.py +492 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/auth.py +160 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/client.py +1694 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/commands/__init__.py +0 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/commands/_write.py +214 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/commands/agent_cmds.py +407 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/commands/alerts_cmds.py +445 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/commands/audits_cmds.py +1054 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/commands/auth_cmds.py +512 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/commands/errors_cmds.py +190 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/commands/evals_cmds.py +161 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/commands/events_cmds.py +159 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/commands/fleet_cmds.py +416 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/commands/guardrails_cmds.py +148 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/commands/incidents_cmds.py +472 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/commands/keys_cmds.py +407 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/commands/list_cmds.py +63 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/commands/orgs_cmds.py +319 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/commands/policies_cmds.py +499 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/commands/queries_cmds.py +378 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/commands/sessions_cmds.py +151 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/commands/settings_cmds.py +150 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/commands/usage_cmds.py +35 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/commands/users_cmds.py +404 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/config.py +330 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/dates.py +78 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/enforcement.py +345 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/errors.py +98 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/models.py +891 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/orgs.py +30 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/output.py +6593 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/permissions.py +208 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/policy_check.py +290 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/py.typed +0 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/select.py +322 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/theme.py +53 -0
- package/.next/standalone/fp-cloud-cli/pyproject.toml +106 -0
- package/.next/standalone/fp-cloud-cli/skill/SKILL.md +302 -0
- package/.next/standalone/fp-cloud-cli/skill/agents/openai.yaml +8 -0
- package/.next/standalone/fp-cloud-cli/skill/references/commands.md +254 -0
- package/.next/standalone/fp-cloud-cli/tests/__init__.py +0 -0
- package/.next/standalone/fp-cloud-cli/tests/conftest.py +92 -0
- package/.next/standalone/fp-cloud-cli/tests/test_alerting.py +644 -0
- package/.next/standalone/fp-cloud-cli/tests/test_analytics.py +385 -0
- package/.next/standalone/fp-cloud-cli/tests/test_audits.py +950 -0
- package/.next/standalone/fp-cloud-cli/tests/test_auth.py +98 -0
- package/.next/standalone/fp-cloud-cli/tests/test_auth_mode.py +272 -0
- package/.next/standalone/fp-cloud-cli/tests/test_click_compat.py +118 -0
- package/.next/standalone/fp-cloud-cli/tests/test_client.py +299 -0
- package/.next/standalone/fp-cloud-cli/tests/test_commands.py +814 -0
- package/.next/standalone/fp-cloud-cli/tests/test_config.py +99 -0
- package/.next/standalone/fp-cloud-cli/tests/test_dashboards_agent.py +340 -0
- package/.next/standalone/fp-cloud-cli/tests/test_dates.py +76 -0
- package/.next/standalone/fp-cloud-cli/tests/test_enforcement_logic.py +481 -0
- package/.next/standalone/fp-cloud-cli/tests/test_facets.py +170 -0
- package/.next/standalone/fp-cloud-cli/tests/test_failproofai_home.py +722 -0
- package/.next/standalone/fp-cloud-cli/tests/test_fp_home_contract.py +198 -0
- package/.next/standalone/fp-cloud-cli/tests/test_hardening.py +186 -0
- package/.next/standalone/fp-cloud-cli/tests/test_help_table_coverage.py +127 -0
- package/.next/standalone/fp-cloud-cli/tests/test_keys_queries.py +496 -0
- package/.next/standalone/fp-cloud-cli/tests/test_list.py +59 -0
- package/.next/standalone/fp-cloud-cli/tests/test_multivalue.py +183 -0
- package/.next/standalone/fp-cloud-cli/tests/test_no_customer_identifiers.py +168 -0
- package/.next/standalone/fp-cloud-cli/tests/test_operator.py +492 -0
- package/.next/standalone/fp-cloud-cli/tests/test_orgs.py +692 -0
- package/.next/standalone/fp-cloud-cli/tests/test_output.py +1732 -0
- package/.next/standalone/fp-cloud-cli/tests/test_policy_check.py +191 -0
- package/.next/standalone/fp-cloud-cli/tests/test_readme_matches_reality.py +125 -0
- package/.next/standalone/fp-cloud-cli/tests/test_review_fixes.py +161 -0
- package/.next/standalone/fp-cloud-cli/tests/test_telemetry_completeness.py +90 -0
- package/.next/standalone/fp-cloud-cli/tests/test_usage.py +115 -0
- package/.next/standalone/fp-cloud-cli/tests/test_v1_origin_diagnostic.py +70 -0
- package/.next/standalone/fp-cloud-cli/tests/test_v1_routing.py +214 -0
- package/.next/standalone/fp-cloud-cli/tests/test_whoami.py +104 -0
- package/.next/standalone/fp-cloud-cli/uv.lock +552 -0
- package/.next/standalone/package.json +29 -22
- package/.next/standalone/sdk/python/CHANGELOG.md +70 -0
- package/.next/standalone/sdk/python/LICENSE +42 -0
- package/.next/standalone/sdk/python/MANIFEST.in +21 -0
- package/.next/standalone/sdk/python/README.md +466 -0
- package/.next/standalone/sdk/python/docs/README.md +249 -0
- package/.next/standalone/sdk/python/docs/_shared/README.md +43 -0
- package/.next/standalone/sdk/python/docs/_shared/__init__.py +195 -0
- package/.next/standalone/sdk/python/docs/crewai/README.md +328 -0
- package/.next/standalone/sdk/python/docs/crewai/examples/quickstart.py +61 -0
- package/.next/standalone/sdk/python/docs/crewai/examples/research_crew.py +92 -0
- package/.next/standalone/sdk/python/docs/langgraph/README.md +481 -0
- package/.next/standalone/sdk/python/docs/langgraph/examples/quickstart.py +51 -0
- package/.next/standalone/sdk/python/docs/langgraph/examples/research_agent.py +86 -0
- package/.next/standalone/sdk/python/docs/langgraph/examples/supervisor_handoff.py +83 -0
- package/.next/standalone/sdk/python/docs/llama_index/README.md +332 -0
- package/.next/standalone/sdk/python/docs/llama_index/examples/quickstart.py +62 -0
- package/.next/standalone/sdk/python/docs/llama_index/examples/research_agent.py +93 -0
- package/.next/standalone/sdk/python/docs/manual/README.md +491 -0
- package/.next/standalone/sdk/python/docs/manual/examples/quickstart.py +57 -0
- package/.next/standalone/sdk/python/docs/manual/examples/research_agent.py +133 -0
- package/.next/standalone/sdk/python/docs/pydantic_ai/README.md +323 -0
- package/.next/standalone/sdk/python/docs/pydantic_ai/examples/quickstart.py +48 -0
- package/.next/standalone/sdk/python/docs/pydantic_ai/examples/research_agent.py +94 -0
- package/.next/standalone/sdk/python/failproofai_sdk/__init__.py +131 -0
- package/.next/standalone/sdk/python/failproofai_sdk/_context.py +218 -0
- package/.next/standalone/sdk/python/failproofai_sdk/_environment.py +78 -0
- package/.next/standalone/sdk/python/failproofai_sdk/_events.py +752 -0
- package/.next/standalone/sdk/python/failproofai_sdk/_resolver.py +118 -0
- package/.next/standalone/sdk/python/failproofai_sdk/_runtime.py +21 -0
- package/.next/standalone/sdk/python/failproofai_sdk/_schema.py +317 -0
- package/.next/standalone/sdk/python/failproofai_sdk/_scopes.py +422 -0
- package/.next/standalone/sdk/python/failproofai_sdk/_version.py +1 -0
- package/.next/standalone/sdk/python/failproofai_sdk/_writer.py +750 -0
- package/.next/standalone/sdk/python/failproofai_sdk/integrations/__init__.py +274 -0
- package/.next/standalone/sdk/python/failproofai_sdk/integrations/_compat.py +247 -0
- package/.next/standalone/sdk/python/failproofai_sdk/integrations/_core.py +1076 -0
- package/.next/standalone/sdk/python/failproofai_sdk/integrations/crewai.py +1669 -0
- package/.next/standalone/sdk/python/failproofai_sdk/integrations/langchain.py +2151 -0
- package/.next/standalone/sdk/python/failproofai_sdk/integrations/llama_index.py +1588 -0
- package/.next/standalone/sdk/python/failproofai_sdk/integrations/pydantic_ai.py +977 -0
- package/.next/standalone/sdk/python/failproofai_sdk/py.typed +0 -0
- package/.next/standalone/sdk/python/pyproject.toml +92 -0
- package/.next/standalone/sdk/python/skill/SKILL.md +399 -0
- package/.next/standalone/sdk/python/skill/agents/openai.yaml +8 -0
- package/.next/standalone/sdk/python/skill/references/events.md +234 -0
- package/.next/standalone/sdk/python/skill/references/frameworks.md +314 -0
- package/.next/standalone/sdk/python/skill/references/install.md +100 -0
- package/.next/standalone/sdk/python/skill/references/integration.md +352 -0
- package/.next/standalone/sdk/python/tests/__init__.py +0 -0
- package/.next/standalone/sdk/python/tests/conftest.py +169 -0
- package/.next/standalone/sdk/python/tests/integrations/__init__.py +6 -0
- package/.next/standalone/sdk/python/tests/integrations/test_crewai.py +1299 -0
- package/.next/standalone/sdk/python/tests/integrations/test_langchain.py +2338 -0
- package/.next/standalone/sdk/python/tests/integrations/test_llama_index.py +1576 -0
- package/.next/standalone/sdk/python/tests/integrations/test_pydantic_ai.py +1102 -0
- package/.next/standalone/sdk/python/tests/test_context.py +410 -0
- package/.next/standalone/sdk/python/tests/test_docs.py +411 -0
- package/.next/standalone/sdk/python/tests/test_durability.py +1352 -0
- package/.next/standalone/sdk/python/tests/test_encoding.py +571 -0
- package/.next/standalone/sdk/python/tests/test_integrations.py +1127 -0
- package/.next/standalone/sdk/python/tests/test_no_customer_identifiers.py +214 -0
- package/.next/standalone/sdk/python/tests/test_packaging.py +185 -0
- package/.next/standalone/sdk/python/tests/test_resolver_umbrella.py +178 -0
- package/.next/standalone/sdk/python/tests/test_scopes.py +487 -0
- package/.next/standalone/sdk/python/tests/test_sdk.py +923 -0
- package/.next/standalone/sdk/python/tests/test_server_contract.py +650 -0
- package/.next/standalone/sdk/python/tests/test_site_docs.py +371 -0
- package/.next/standalone/sdk/python/tests/test_skill_snippets.py +165 -0
- package/.next/standalone/sdk/python/tests/test_spool_contract.py +287 -0
- package/.next/standalone/sdk/python/tests/test_spool_creation.py +360 -0
- package/.next/standalone/sdk/python/tests/test_wire_format.py +279 -0
- package/.next/standalone/sdk/python/tests/test_zero_dependencies.py +378 -0
- package/.next/standalone/sdk/python/uv.lock +6005 -0
- package/.next/standalone/server.js +1 -1
- package/README.md +77 -21
- package/bin/failproofai.mjs +145 -11
- package/dist/cli.mjs +4482 -2205
- package/dist/index.js +5 -5
- package/dist/worker.mjs +2399 -1978
- package/package.json +29 -22
- package/policy-pack/SHA256SUMS +2 -0
- package/policy-pack/failproofai-pack.json +732 -0
- package/policy-pack/failproofai-pack.mjs +2017 -0
- package/scripts/build-policy-pack.mjs +121 -0
- package/scripts/changelog-section.py +77 -0
- package/scripts/prune-standalone.mjs +3 -0
- package/scripts/python-version.py +232 -0
- package/scripts/translate-docs/cli.ts +21 -0
- package/scripts/translate-docs/mintlify-nav.ts +85 -13
- package/scripts/translate-docs/translator.ts +66 -11
- package/src/audit/cache.ts +40 -3
- package/src/audit/cli.ts +1 -1
- package/src/audit/index.ts +1 -1
- package/src/audit/replay.ts +89 -3
- package/src/audit/report.ts +5 -5
- package/src/audit/schedule-cli.ts +49 -53
- package/src/hooks/builtin-policies.ts +217 -579
- package/src/hooks/cloud-enrollment-cli.ts +66 -27
- package/src/hooks/cloud-managed-policies.ts +6 -1
- package/src/hooks/configure-wizard.ts +1 -1
- package/src/hooks/custom-hooks-loader.ts +89 -6
- package/src/hooks/fp-home.ts +92 -4
- package/src/hooks/fp-reset.ts +26 -2
- package/src/hooks/handler.ts +181 -11
- package/src/hooks/harness-cli.ts +79 -25
- package/src/hooks/hook-activity-store.ts +13 -3
- package/src/hooks/install-prompt.ts +25 -3
- package/src/hooks/manager.ts +418 -172
- package/src/hooks/migrations.ts +2 -2
- package/src/hooks/pack-cli.ts +505 -0
- package/src/hooks/pack-failclosed.ts +189 -0
- package/src/hooks/pack-manifest.ts +344 -0
- package/src/hooks/pack-store.ts +930 -0
- package/src/hooks/policy-catalog.ts +535 -0
- package/src/hooks/policy-evaluator.ts +24 -16
- package/src/hooks/policy-presets.ts +4 -2
- package/src/hooks/policy-registry.ts +8 -2
- package/src/hooks/policy-types.ts +26 -0
- package/src/hooks/session-pause-cli.ts +33 -9
- package/src/hooks/tui.ts +570 -0
- package/src/hooks/types.ts +15 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0_usx0j._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0_zk340._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0agdw2a._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0d1u_na._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0oy4kxb._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0zf034w._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1tvn4wf._.js +0 -3
- package/.next/standalone/.next/server/chunks/_0lxbzdq._.js +0 -3
- package/.next/standalone/.next/server/chunks/_1ger0a2._.js +0 -3
- package/.next/standalone/.next/server/chunks/_1zuiiy3._.js +0 -3
- package/.next/standalone/.next/server/chunks/node_modules_posthog-node_dist_entrypoints_index_node_mjs_1iiwm5e._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0kc8_v5._.js +0 -4
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0kgy9da._.js +0 -4
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0mhqk5a._.js +0 -4
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0pltpn8._.js +0 -4
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0qkcyf-._.js +0 -4
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0w0x_ok._.js +0 -4
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1_dfocn._.js +0 -4
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1bfex62._.js +0 -5
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1kzapg5._.js +0 -6
- package/.next/standalone/.next/static/chunks/36fw6yk1s6x_f.js +0 -1
- package/.next/standalone/.next/static/chunks/3tzq0260n17ae.js +0 -6
- package/.next/standalone/.next/static/chunks/3wq9x0c-7ld5d.css +0 -2
- /package/.next/standalone/.next/static/{ZklXxyA5ygsWSQz2u_zii → nwbyWT06Ud0XdXOrVJyvS}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{ZklXxyA5ygsWSQz2u_zii → nwbyWT06Ud0XdXOrVJyvS}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/.next/static/{ZklXxyA5ygsWSQz2u_zii → nwbyWT06Ud0XdXOrVJyvS}/_ssgManifest.js +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"node": {
|
|
3
|
-
"
|
|
3
|
+
"00b801c035726aaa9d297e34f35258369a37177149": {
|
|
4
4
|
"workers": {
|
|
5
5
|
"app/_global-error/page": {
|
|
6
6
|
"moduleId": 39027,
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"codeHash": null
|
|
24
24
|
},
|
|
25
25
|
"app/policies/page": {
|
|
26
|
-
"moduleId":
|
|
26
|
+
"moduleId": 73338,
|
|
27
27
|
"async": false,
|
|
28
28
|
"codeHash": null
|
|
29
29
|
},
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"filename": "app/actions/get-telemetry-config.ts",
|
|
52
52
|
"exportedName": "getTelemetryConfig"
|
|
53
53
|
},
|
|
54
|
-
"
|
|
54
|
+
"00476aabd62261965a5bc7b111325097e27bb04c42": {
|
|
55
55
|
"workers": {
|
|
56
56
|
"app/audit/page": {
|
|
57
57
|
"moduleId": 99558,
|
|
@@ -62,10 +62,10 @@
|
|
|
62
62
|
"filename": "app/actions/get-audit-result.ts",
|
|
63
63
|
"exportedName": "getAuditResultAction"
|
|
64
64
|
},
|
|
65
|
-
"
|
|
65
|
+
"40578b411fdce1e4664870bb5dba3836870e70e851": {
|
|
66
66
|
"workers": {
|
|
67
67
|
"app/policies/page": {
|
|
68
|
-
"moduleId":
|
|
68
|
+
"moduleId": 73338,
|
|
69
69
|
"async": false,
|
|
70
70
|
"codeHash": null
|
|
71
71
|
}
|
|
@@ -73,10 +73,10 @@
|
|
|
73
73
|
"filename": "app/actions/get-hook-activity.ts",
|
|
74
74
|
"exportedName": "getHookActivityAction"
|
|
75
75
|
},
|
|
76
|
-
"
|
|
76
|
+
"603e6b4163ee01b3593197316b81b795e1f53b8c2f": {
|
|
77
77
|
"workers": {
|
|
78
78
|
"app/policies/page": {
|
|
79
|
-
"moduleId":
|
|
79
|
+
"moduleId": 73338,
|
|
80
80
|
"async": false,
|
|
81
81
|
"codeHash": null
|
|
82
82
|
},
|
|
@@ -89,10 +89,10 @@
|
|
|
89
89
|
"filename": "app/actions/get-hook-activity.ts",
|
|
90
90
|
"exportedName": "searchHookActivityAction"
|
|
91
91
|
},
|
|
92
|
-
"
|
|
92
|
+
"007e3b4cc182529851a91f6c969c76db68c5175ef3": {
|
|
93
93
|
"workers": {
|
|
94
94
|
"app/policies/page": {
|
|
95
|
-
"moduleId":
|
|
95
|
+
"moduleId": 73338,
|
|
96
96
|
"async": false,
|
|
97
97
|
"codeHash": null
|
|
98
98
|
}
|
|
@@ -100,10 +100,10 @@
|
|
|
100
100
|
"filename": "app/actions/get-active-pauses.ts",
|
|
101
101
|
"exportedName": "getActivePausesAction"
|
|
102
102
|
},
|
|
103
|
-
"
|
|
103
|
+
"0057a17ef96ec19dadf4460567e939300491cb5eab": {
|
|
104
104
|
"workers": {
|
|
105
105
|
"app/policies/page": {
|
|
106
|
-
"moduleId":
|
|
106
|
+
"moduleId": 73338,
|
|
107
107
|
"async": false,
|
|
108
108
|
"codeHash": null
|
|
109
109
|
}
|
|
@@ -111,10 +111,10 @@
|
|
|
111
111
|
"filename": "app/actions/get-hooks-config.ts",
|
|
112
112
|
"exportedName": "getHooksConfigAction"
|
|
113
113
|
},
|
|
114
|
-
"
|
|
114
|
+
"6081a916930aa222c118604ea26aa112e7051fa4bf": {
|
|
115
115
|
"workers": {
|
|
116
116
|
"app/policies/page": {
|
|
117
|
-
"moduleId":
|
|
117
|
+
"moduleId": 73338,
|
|
118
118
|
"async": false,
|
|
119
119
|
"codeHash": null
|
|
120
120
|
}
|
|
@@ -122,21 +122,65 @@
|
|
|
122
122
|
"filename": "app/actions/update-hooks-config.ts",
|
|
123
123
|
"exportedName": "toggleCustomPolicyAction"
|
|
124
124
|
},
|
|
125
|
-
"
|
|
125
|
+
"009ecb2cb3ca91f63f018c880cc1e7dd62a55228c8": {
|
|
126
126
|
"workers": {
|
|
127
127
|
"app/policies/page": {
|
|
128
|
-
"moduleId":
|
|
128
|
+
"moduleId": 73338,
|
|
129
129
|
"async": false,
|
|
130
130
|
"codeHash": null
|
|
131
131
|
}
|
|
132
132
|
},
|
|
133
|
-
"filename": "app/actions/
|
|
134
|
-
"exportedName": "
|
|
133
|
+
"filename": "app/actions/pack-actions.ts",
|
|
134
|
+
"exportedName": "addBundledPackWebAction"
|
|
135
|
+
},
|
|
136
|
+
"60860f2ddf14c936449840f6ea2de8bf9378d02c5f": {
|
|
137
|
+
"workers": {
|
|
138
|
+
"app/policies/page": {
|
|
139
|
+
"moduleId": 73338,
|
|
140
|
+
"async": false,
|
|
141
|
+
"codeHash": null
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
"filename": "app/actions/pack-actions.ts",
|
|
145
|
+
"exportedName": "addPackWebAction"
|
|
146
|
+
},
|
|
147
|
+
"404da387ad28977f9e05fae580e564e629b3cde906": {
|
|
148
|
+
"workers": {
|
|
149
|
+
"app/policies/page": {
|
|
150
|
+
"moduleId": 73338,
|
|
151
|
+
"async": false,
|
|
152
|
+
"codeHash": null
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
"filename": "app/actions/pack-actions.ts",
|
|
156
|
+
"exportedName": "previewPackWebAction"
|
|
157
|
+
},
|
|
158
|
+
"40de6ba3e782c299e85d1e666b6bc68111930d8a95": {
|
|
159
|
+
"workers": {
|
|
160
|
+
"app/policies/page": {
|
|
161
|
+
"moduleId": 73338,
|
|
162
|
+
"async": false,
|
|
163
|
+
"codeHash": null
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
"filename": "app/actions/pack-actions.ts",
|
|
167
|
+
"exportedName": "removePackWebAction"
|
|
168
|
+
},
|
|
169
|
+
"70d18fe420c3e625709a17033547c08b79e2496678": {
|
|
170
|
+
"workers": {
|
|
171
|
+
"app/policies/page": {
|
|
172
|
+
"moduleId": 73338,
|
|
173
|
+
"async": false,
|
|
174
|
+
"codeHash": null
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
"filename": "app/actions/pack-actions.ts",
|
|
178
|
+
"exportedName": "togglePackPolicyAction"
|
|
135
179
|
},
|
|
136
|
-
"
|
|
180
|
+
"60b589101ddfb3e8dcf334afa160195ac192270b7a": {
|
|
137
181
|
"workers": {
|
|
138
182
|
"app/policies/page": {
|
|
139
|
-
"moduleId":
|
|
183
|
+
"moduleId": 73338,
|
|
140
184
|
"async": false,
|
|
141
185
|
"codeHash": null
|
|
142
186
|
}
|
|
@@ -144,10 +188,10 @@
|
|
|
144
188
|
"filename": "app/actions/install-hooks-web.ts",
|
|
145
189
|
"exportedName": "installHooksWebAction"
|
|
146
190
|
},
|
|
147
|
-
"
|
|
191
|
+
"60166803a51728c5d76210748e971fbc8ea6ee8128": {
|
|
148
192
|
"workers": {
|
|
149
193
|
"app/policies/page": {
|
|
150
|
-
"moduleId":
|
|
194
|
+
"moduleId": 73338,
|
|
151
195
|
"async": false,
|
|
152
196
|
"codeHash": null
|
|
153
197
|
}
|
|
@@ -155,10 +199,10 @@
|
|
|
155
199
|
"filename": "app/actions/install-hooks-web.ts",
|
|
156
200
|
"exportedName": "removeHooksWebAction"
|
|
157
201
|
},
|
|
158
|
-
"
|
|
202
|
+
"600d22456d1f6ef2bf88749cdd3b0a6530b2c5de25": {
|
|
159
203
|
"workers": {
|
|
160
204
|
"app/policies/page": {
|
|
161
|
-
"moduleId":
|
|
205
|
+
"moduleId": 73338,
|
|
162
206
|
"async": false,
|
|
163
207
|
"codeHash": null
|
|
164
208
|
}
|
|
@@ -166,7 +210,7 @@
|
|
|
166
210
|
"filename": "app/actions/update-policy-params.ts",
|
|
167
211
|
"exportedName": "updatePolicyParamsAction"
|
|
168
212
|
},
|
|
169
|
-
"
|
|
213
|
+
"00aa430d336fe5b9f2c7e99dcd724a2140126b7df5": {
|
|
170
214
|
"workers": {
|
|
171
215
|
"app/settings/page": {
|
|
172
216
|
"moduleId": 20213,
|
|
@@ -177,7 +221,7 @@
|
|
|
177
221
|
"filename": "app/actions/get-scheduled-audit.ts",
|
|
178
222
|
"exportedName": "getScheduledAuditAction"
|
|
179
223
|
},
|
|
180
|
-
"
|
|
224
|
+
"401a4233577ae78a8a9148d4d6fd172599a73d44e4": {
|
|
181
225
|
"workers": {
|
|
182
226
|
"app/settings/page": {
|
|
183
227
|
"moduleId": 20213,
|
|
@@ -188,7 +232,7 @@
|
|
|
188
232
|
"filename": "app/actions/update-scheduled-audit.ts",
|
|
189
233
|
"exportedName": "setAutoAuditAction"
|
|
190
234
|
},
|
|
191
|
-
"
|
|
235
|
+
"400b31c249d9e9935f930f4c64cb4bcab3daae4a25": {
|
|
192
236
|
"workers": {
|
|
193
237
|
"app/settings/page": {
|
|
194
238
|
"moduleId": 20213,
|
|
@@ -201,5 +245,5 @@
|
|
|
201
245
|
}
|
|
202
246
|
},
|
|
203
247
|
"edge": {},
|
|
204
|
-
"encryptionKey": "
|
|
248
|
+
"encryptionKey": "co8ThJ9gOO8UPH2W/VNC9rq1W8qVs4WpFbNUqt3c2TA="
|
|
205
249
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,36406,e=>{"use strict";let t;var s=e.i(43476),r=e.i(71645),n=e.i(74080);function i(e,t,s){let r,n=s.initialDeps??[],i=!0;function l(){let l=e();return(l.length!==n.length||l.some((e,t)=>n[t]!==e))&&(n=l,r=t(...l),(null==s?void 0:s.onChange)&&!(i&&s.skipInitialOnChange)&&s.onChange(r),i=!1),r}return l.updateDeps=e=>{n=e},l}function l(e,t){if(void 0!==e)return e;throw Error(`Unexpected undefined${t?`: ${t}`:""}`)}let o=()=>{if(void 0!==t)return t;if("u"<typeof navigator)return t=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return t=!0;let e=navigator.maxTouchPoints;return t="MacIntel"===navigator.platform&&void 0!==e&&e>0},a=e=>e,d=e=>{let t=Math.max(e.startIndex-e.overscan,0),s=Math.min(e.endIndex+e.overscan,e.count-1)-t+1,r=Array(s);for(let e=0;e<s;e++)r[e]=t+e;return r},c={passive:!0},h=(e,t)=>{let s=e.scrollElement;if(!s)return;let r=()=>{t({width:s.innerWidth,height:s.innerHeight})};return r(),s.addEventListener("resize",r,c),()=>{s.removeEventListener("resize",r)}},u="u"<typeof window||"onscrollend"in window,m=(e,t)=>((e,t,s)=>{var r,n;let i,l=e.scrollElement;if(!l)return;let o=e.targetWindow;if(!o)return;let a=e.options.useScrollendEvent&&u,d=0,h=a?null:(r=()=>t(d,!1),n=e.options.isScrollingResetDelay,function(...e){o.clearTimeout(i),i=o.setTimeout(()=>r.apply(this,e),n)}),m=e=>()=>{d=s(l),null==h||h(),t(d,e)},f=m(!0),p=m(!1);return l.addEventListener("scroll",f,c),a&&l.addEventListener("scrollend",p,c),()=>{l.removeEventListener("scroll",f),a&&l.removeEventListener("scrollend",p)}})(e,t,t=>e.options.horizontal?t.scrollX:t.scrollY),f=(e,t,s)=>{if(s.options.useCachedMeasurements){let t=s.indexFromElement(e),r=s.options.getItemKey(t);return s.itemSizeCache.get(r)??s.options.estimateSize(t)}if(null==t?void 0:t.borderBoxSize){let e=t.borderBoxSize[0];if(e)return Math.round(e[s.options.horizontal?"inlineSize":"blockSize"])}if(!t){let t=s.indexFromElement(e),r=s.options.getItemKey(t),n=s.itemSizeCache.get(r);if(void 0!==n)return n}return e[s.options.horizontal?"offsetWidth":"offsetHeight"]},p=(e,{adjustments:t=0,behavior:s},r)=>{var n,i;null==(i=null==(n=r.scrollElement)?void 0:n.scrollTo)||i.call(n,{[r.options.horizontal?"left":"top"]:e+t,behavior:s})};class g{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._flatMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this.elementsCache=new Map,this.now=()=>{var e,t,s;return(null==(s=null==(t=null==(e=this.targetWindow)?void 0:e.performance)?void 0:t.now)?void 0:s.call(t))??Date.now()},this.observer=(()=>{let e=null,t=()=>e||(this.targetWindow&&this.targetWindow.ResizeObserver?e=new this.targetWindow.ResizeObserver(e=>{e.forEach(e=>{let t=()=>{let t=e.target,s=this.indexFromElement(t);if(!t.isConnected){for(let[e,s]of(this.observer.unobserve(t),this.elementsCache))if(s===t){this.elementsCache.delete(e);break}return}this.shouldMeasureDuringScroll(s)&&this.resizeItem(s,this.options.measureElement(t,e,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(t):t()})}):null);return{disconnect:()=>{var s;null==(s=t())||s.disconnect(),e=null},observe:e=>{var s;return null==(s=t())?void 0:s.observe(e,{box:"border-box"})},unobserve:e=>{var s;return null==(s=t())?void 0:s.unobserve(e)}}})(),this.range=null,this.setOptions=e=>{var t,s;let r={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:a,rangeExtractor:d,onChange:()=>{},measureElement:f,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,anchorTo:"start",followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:"estimate",useCachedMeasurements:!1};for(let t in e){let s=e[t];void 0!==s&&(r[t]=s)}let n=this.options,i=null,l=null,o=!1;if(void 0!==n&&n.enabled&&r.enabled&&"end"===r.anchorTo&&null!==this.scrollElement){let e=n.count,a=r.count,d=this.getMeasurements(),c=e>0?(null==(t=d[0])?void 0:t.key)??n.getItemKey(0):null,h=e>0?(null==(s=d[e-1])?void 0:s.key)??n.getItemKey(e-1):null;if(a!==e||e>0&&a>0&&(r.getItemKey(0)!==c||r.getItemKey(a-1)!==h)){o=!0;let t=e>0?this.getVirtualItemForOffset(this.getScrollOffset())??d[0]:null;t&&(i=[t.key,this.getScrollOffset()-t.start]);let s=!0===r.followOnAppend?"auto":r.followOnAppend||null;s&&a>e&&this.isAtEnd(n.scrollEndThreshold)&&(0===e||r.getItemKey(a-1)!==h)&&(l=s)}}this.options=r,o&&(this.pendingMin=0,this.itemSizeCacheVersion++);let c=!1,h=0;if(i&&null!==this.scrollOffset){let[e,t]=i,s=this.getMeasurements(),{count:r,getItemKey:n}=this.options,l=0;for(;l<r&&n(l)!==e;)l++;if(l<r){let e=s[l];if(e){let s=Math.max(0,e.start+t);s!==this.scrollOffset&&(h=s-this.scrollOffset,this.scrollOffset=s,c=!0)}}}(c||l)&&(this.pendingScrollAnchor=[c?i[0]:null,c?i[1]:0,l,h])},this.notify=e=>{var t,s;null==(s=(t=this.options).onChange)||s.call(t,this,e)},this.maybeNotify=i(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),null!=this.rafId&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var e;let t=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==t){if(this.cleanup(),!t)return void this.maybeNotify();if(this.scrollElement=t,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=(null==(e=this.scrollElement)?void 0:e.window)??null,this.elementsCache.forEach(e=>{this.observer.observe(e)}),this.unsubs.push(this.options.observeElementRect(this,e=>{this.scrollRect=e,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(e,t)=>{if(t&&null===this._intendedScrollOffset&&e===this.scrollOffset)return;null!==this._intendedScrollOffset&&1.5>Math.abs(e-this._intendedScrollOffset)&&(e=this._intendedScrollOffset),this._intendedScrollOffset=null,this.scrollAdjustments=0;let s=this.getScrollOffset();this.scrollDirection=t?s===e?this.scrollDirection:s<e?"forward":"backward":null,this.scrollOffset=e,this.isScrolling=t,this._flushIosDeferredIfReady(),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),"addEventListener"in this.scrollElement){let e=this.scrollElement,t=()=>{this._iosTouching=!0,this._iosJustTouchEnded=!1,null!==this._iosTouchEndTimerId&&null!=this.targetWindow&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},s=()=>{this._iosTouching=!1,o()&&null!=this.targetWindow&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};e.addEventListener("touchstart",t,c),e.addEventListener("touchend",s,c),this.unsubs.push(()=>{e.removeEventListener("touchstart",t),e.removeEventListener("touchend",s),null!==this._iosTouchEndTimerId&&null!=this.targetWindow&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}let s=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,s&&this.scrollElement&&this.options.enabled){let[e,t,r,n]=s;null===e||r||(o()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?0!==n&&(this._iosDeferredAdjustment+=n):this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})),r&&this.scrollToEnd({behavior:r})}},this._flushIosDeferredIfReady=()=>{if(0===this._iosDeferredAdjustment||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;let e=this.getScrollOffset(),t=this.getMaxScrollOffset();if(e<0||e>t)return;if(this._iosDeferredAdjustment<0&&e>=t-1){this._iosDeferredAdjustment=0;return}let s=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(e,{adjustments:this.scrollAdjustments+=s,behavior:void 0})},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??("function"==typeof this.options.initialOffset?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getMeasurementOptions=i(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode,this.options.gap],(e,t,s,r,n,i,l,o)=>(void 0!==this.prevLanes&&this.prevLanes!==i&&(this.lanesChangedFlag=!0),this.prevLanes=i,this.pendingMin=null,{count:e,paddingStart:t,scrollMargin:s,getItemKey:r,enabled:n,lanes:i,laneAssignmentMode:l,gap:o}),{key:!1}),this.getMeasurements=i(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:e,paddingStart:t,scrollMargin:s,getItemKey:r,enabled:n,lanes:i,laneAssignmentMode:l,gap:o},a)=>{let d=this.itemSizeCache;if(!n)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>e)for(let t of this.laneAssignments.keys())t>=e&&this.laneAssignments.delete(t);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),0!==this.measurementsCache.length||this.lanesSettling||(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));let c=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===e&&(this.lanesSettling=!1),1===i){var h;let n,i=2*e,l=this._flatMeasurements;if(!l||l.length<i){let e=new Float64Array(i);l&&c>0&&e.set(l.subarray(0,2*c)),l=e,this._flatMeasurements=l}if(0===c)n=t+s;else{let e=c-1;n=l[2*e]+l[2*e+1]+o}for(let t=c;t<e;t++){let e=r(t),s=d.get(e),i="number"==typeof s?s:this.options.estimateSize(t);l[2*t]=n,l[2*t+1]=i,n+=i+o}let a=(h=l,new Proxy(Array(e),{get(t,s,n){if("string"==typeof s){let n=s.charCodeAt(0);if(n>=48&&n<=57){let n=+s;if(Number.isInteger(n)&&n>=0&&n<e){let e=t[n];if(!e){let s=h[2*n];e=t[n]={index:n,key:r(n),start:s,size:h[2*n+1],end:s+h[2*n+1],lane:0}}return e}}if("length"===s)return e}return Reflect.get(t,s,n)}}));return this.measurementsCache=a,a}let u=this.measurementsCache.slice(0,c),m=Array(i).fill(void 0),f=new Float64Array(i),p=0;for(let e=0;e<c;e++){let t=u[e];t&&(void 0===m[t.lane]&&p++,m[t.lane]=e,f[t.lane]=t.end)}for(let n=c;n<e;n++){let e,a,c=r(n),h=this.laneAssignments.get(n),g="estimate"===l||d.has(c);if(void 0!==h&&this.options.lanes>1){let r=m[e=h],n=void 0!==r?u[r]:void 0;a=n?n.end+o:t+s}else if(p===i){let t=0,s=f[0],r=m[0];for(let e=1;e<i;e++){let n=f[e];(n<s||n===s&&m[e]<r)&&(t=e,s=n,r=m[e])}e=t,a=s+o,g&&this.laneAssignments.set(n,e)}else e=n%this.options.lanes,a=t+s,g&&this.laneAssignments.set(n,e);let x=d.get(c),y="number"==typeof x?x:this.options.estimateSize(n),b=a+y;u[n]={index:n,start:a,size:y,end:b,key:c,lane:e},void 0===m[e]&&p++,m[e]=n,f[e]=b}return this.measurementsCache=u,u},{key:!1,debug:()=>this.options.debug}),this.calculateRange=i(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,s,r)=>0===e.length||0===t?(this.range=null,null):(this.range=function(e,t,s,r,n){let i=e.length-1;if(e.length<=r)return{startIndex:0,endIndex:i};if(1===r&&null!==n){let e=function(e,t,s){let r=0;for(;r<=t;){let n=(r+t)/2|0,i=e[2*n];if(i<s)r=n+1;else{if(!(i>s))return n;t=n-1}}return r>0?r-1:0}(n,i,s),r=e,l=s+t;for(;r<i&&n[2*r]+n[2*r+1]<l;)r++;return{startIndex:e,endIndex:r}}let l=x(0,i,t=>e[t].start,s),o=l;if(1===r)for(;o<i&&e[o].end<s+t;)o++;else if(r>1){let n=Array(r).fill(0);for(;o<i&&n.some(e=>e<s+t);){let t=e[o];n[t.lane]=t.end,o++}let a=Array(r).fill(s+t);for(;l>=0&&a.some(e=>e>=s);){let t=e[l];a[t.lane]=t.start,l--}l=Math.max(0,l-l%r),o=Math.min(i,o+(r-1-o%r))}return{startIndex:l,endIndex:o}}(e,t,s,r,1===r&&null!=this._flatMeasurements?this._flatMeasurements:null),this.range),{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=i(()=>{let e=null,t=null,s=this.calculateRange();return s&&(e=s.startIndex,t=s.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t]},(e,t,s,r,n)=>null===r||null===n?[]:e({startIndex:r,endIndex:n,overscan:t,count:s}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{let t=this.options.indexAttribute,s=e.getAttribute(t);return s?parseInt(s,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=e=>{var t;if(!this.scrollState||"smooth"!==this.scrollState.behavior)return!0;let s=this.scrollState.index??(null==(t=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))?void 0:t.index);if(void 0!==s&&this.range){let t=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),r=Math.max(0,s-t),n=Math.min(this.options.count-1,s+t);return e>=r&&e<=n}return!0},this.measureElement=e=>{if(!e)return void this.elementsCache.forEach((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))});let t=this.indexFromElement(e),s=this.options.getItemKey(t),r=this.elementsCache.get(s);r!==e&&(r&&this.observer.unobserve(r),this.observer.observe(e),this.elementsCache.set(s,e)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(t)&&this.resizeItem(t,this.options.measureElement(e,void 0,this))},this.resizeItem=(e,t)=>{var s,r;let n,i,l;if(e<0||e>=this.options.count)return;let o=this._flatMeasurements;if(1===this.options.lanes&&null!==o)l=this.options.getItemKey(e),i=o[2*e],n=o[2*e+1];else{let t=this.measurementsCache[e];if(!t)return;l=t.key,i=t.start,n=t.size}let a=this.itemSizeCache.get(l)??n,d=t-a;if(0!==d){let o="end"===this.options.anchorTo&&(null==(s=this.scrollState)?void 0:s.behavior)!=="smooth"&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,c=o?this.getTotalSize():0,h=this.getScrollOffset()+this.scrollAdjustments,u=this.itemSizeCache.has(l)?i+a<=h&&"backward"!==this.scrollDirection:i<h,m=(null==(r=this.scrollState)?void 0:r.behavior)!=="smooth"&&(void 0!==this.shouldAdjustScrollPositionOnItemSizeChange?this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[e]??{index:e,key:l,start:i,size:n,end:i+n,lane:0},d,this):u);(null===this.pendingMin||e<this.pendingMin)&&(this.pendingMin=e),this.itemSizeCache.set(l,t),this.itemSizeCacheVersion++;let f=!1;o?f=this.applyScrollAdjustment(this.getTotalSize()-c):m&&(f=this.applyScrollAdjustment(d)),this.notify(f)}},this.getVirtualItems=i(()=>[this.getVirtualIndexes(),this.getMeasurements()],(e,t)=>{let s=[];for(let r=0,n=e.length;r<n;r++){let n=t[e[r]];s.push(n)}return s},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{let t=this.getMeasurements();if(0===t.length)return;let s=this._flatMeasurements,r=1===this.options.lanes&&null!=s,n=x(0,t.length-1,r?e=>s[2*e]:e=>l(t[e]).start,e);return l(t[n])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{let e=this.scrollElement.document.documentElement;return this.options.horizontal?e.scrollWidth-this.scrollElement.innerWidth:e.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(e=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=e,this.getOffsetForAlignment=(e,t,s=0)=>{if(!this.scrollElement)return 0;let r=this.getSize(),n=this.getScrollOffset();return"auto"===t&&(t=e>=n+r?"end":"start"),"center"===t?e+=(s-r)/2:"end"===t&&(e-=r),Math.max(Math.min(this.getMaxScrollOffset(),e),0)},this.getOffsetForIndex=(e,t="auto")=>{e=Math.max(0,Math.min(e,this.options.count-1));let s=this.getSize(),r=this.getScrollOffset(),n=this.measurementsCache[e];if(!n)return;if("auto"===t)if(n.end>=r+s-this.options.scrollPaddingEnd)t="end";else{if(!(n.start<=r+this.options.scrollPaddingStart))return[r,t];t="start"}if("end"===t&&e===this.options.count-1)return[this.getMaxScrollOffset(),t];let i="end"===t?n.end+this.options.scrollPaddingEnd:n.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(i,t,n.size),t]},this.scrollToOffset=(e,{align:t="start",behavior:s="auto"}={})=>{this._iosDeferredAdjustment=0;let r=this.getOffsetForAlignment(e,t),n=this.now();this.scrollState={index:null,align:t,behavior:s,startedAt:n,lastTargetOffset:r,stableFrames:0},this._scrollToOffset(r,{adjustments:void 0,behavior:s}),this.scheduleScrollReconcile()},this.scrollToIndex=(e,{align:t="auto",behavior:s="auto"}={})=>{this._iosDeferredAdjustment=0,e=Math.max(0,Math.min(e,this.options.count-1));let r=this.getOffsetForIndex(e,t);if(!r)return;let[n,i]=r,l=this.now();this.scrollState={index:e,align:i,behavior:s,startedAt:l,lastTargetOffset:n,stableFrames:0},this._scrollToOffset(n,{adjustments:void 0,behavior:s}),this.scheduleScrollReconcile()},this.scrollBy=(e,{behavior:t="auto"}={})=>{let s=this.getScrollOffset()+e,r=this.now();this.scrollState={index:null,align:"start",behavior:t,startedAt:r,lastTargetOffset:s,stableFrames:0},this._scrollToOffset(s,{adjustments:void 0,behavior:t}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:e="auto"}={})=>{this.options.count>0?this.scrollToIndex(this.options.count-1,{align:"end",behavior:e}):this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:e})},this.getTotalSize=()=>{var e;let t,s=this.getMeasurements();if(0===s.length)t=this.options.paddingStart;else if(1===this.options.lanes){let r=s.length-1,n=this._flatMeasurements;t=null!=n?n[2*r]+n[2*r+1]:(null==(e=s[r])?void 0:e.end)??0}else{let e=Array(this.options.lanes).fill(null),r=s.length-1;for(;r>=0&&e.some(e=>null===e);){let t=s[r];null===e[t.lane]&&(e[t.lane]=t.end),r--}t=Math.max(...e.filter(e=>null!==e))}return Math.max(t-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{let e=[];if(0===this.itemSizeCache.size)return e;for(let t of this.getMeasurements())t&&this.itemSizeCache.has(t.key)&&e.push({index:t.index,key:t.key,start:t.start,size:t.size,end:t.end,lane:t.lane});return e},this._scrollToOffset=(e,{adjustments:t,behavior:s})=>{this._intendedScrollOffset=e+(t??0),this.options.scrollToFn(e,{behavior:s,adjustments:t},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(e)}applyScrollAdjustment(e,t){return 0!==e&&(o()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?(this._iosDeferredAdjustment+=e,!1):(this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=e,behavior:t}),null!==this.scrollOffset&&(this.scrollOffset+=this.scrollAdjustments,this.scrollOffset<0&&(this.scrollOffset=0),this.scrollAdjustments=0),!0))}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}null==this.rafId&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}let e=null!=this.scrollState.index?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,t=e?e[0]:this.scrollState.lastTargetOffset,s=t!==this.scrollState.lastTargetOffset;if(!s&&1.01>Math.abs(t-this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=1){this.getScrollOffset()!==t&&this._scrollToOffset(t,{adjustments:void 0,behavior:"auto"}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,s){let e=this.getSize()||600,s=Math.abs(t-this.getScrollOffset()),r="smooth"===this.scrollState.behavior&&s>e;this.scrollState.lastTargetOffset=t,r||(this.scrollState.behavior="auto"),this._scrollToOffset(t,{adjustments:void 0,behavior:r?"smooth":"auto"})}this.scheduleScrollReconcile()}}let x=(e,t,s,r)=>{for(;e<=t;){let n=(e+t)/2|0,i=s(n);if(i<r)e=n+1;else{if(!(i>r))return n;t=n-1}}return e>0?e-1:0},y="u">typeof document?r.useLayoutEffect:r.useEffect;var b=e.i(16327),v=e.i(56420);let j=(0,v.default)("wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]]);function w(e){let t=new Map,s=new Map;for(let r of e){let e=r.uuid||`${r._source}:${r.timestamp}`,n=s.get(e)??0;s.set(e,n+1),t.set(r,0===n?e:`${e}#${n}`)}return t}let S=(0,v.default)("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]),N=(0,v.default)("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]),M=(0,v.default)("cpu",[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]]),k=(0,v.default)("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]),E=(0,v.default)("message-square",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]]),T=(0,v.default)("workflow",[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]]);var I=e.i(34713);let C=r.default.memo(function({entries:e,compact:t=!1}){let n=(0,r.useMemo)(()=>(function(e){let t=0,s=0,r=0,n=0,i=0,l=new Set;for(let o of e)if("user"===o.type&&t++,"queue-operation"===o.type&&i++,"assistant"===o.type){for(let e of(s++,o.message.content))"tool_use"===e.type&&("Task"===e.name&&(e.subagentType||e.subagentId)?n++:r++);o.message.model&&l.add(o.message.model)}let o="";if(e.length>=2){let t=e[e.length-1].timestampMs-e[0].timestampMs;o=(0,I.formatDuration)(t)}return{turnCount:i,userCount:t,assistantCount:s,toolCallCount:r,subagentCount:n,duration:o,models:Array.from(l)}})(e),[e]),i=t?"w-3.5 h-3.5":"w-4 h-4",l=t?"text-xs font-medium":"text-sm font-medium",o=t?"text-[10px] text-muted-foreground":"text-xs text-muted-foreground",a=[...t?[]:[{Icon:E,color:"text-primary",v:n.turnCount,l:"Turns"}],{Icon:S,color:"text-[color:var(--chart-1)]",v:n.userCount,l:"User"},{Icon:N,color:"text-[color:var(--chart-2)]",v:n.assistantCount,l:"Assistant"},{Icon:j,color:"text-[color:var(--chart-3)]",v:n.toolCallCount,l:t?"Tools":"Tool Calls"},{Icon:T,color:"text-[color:var(--chart-5)]",v:n.subagentCount,l:"Subagents"},{Icon:k,color:"text-[color:var(--chart-4)]",v:n.duration||"—",l:"Duration"},{Icon:M,color:"text-[color:var(--chart-5)]",v:n.models.length>0?n.models.join(", "):"—",l:t?"Model":"Model(s)"}];return(0,s.jsx)("div",{className:t?"bg-muted/30 border border-border/50 rounded-lg p-3 mb-3":"bg-card border border-border rounded-lg p-4",children:(0,s.jsx)("div",{className:`grid grid-cols-2 ${t?"sm:grid-cols-6 gap-3":"sm:grid-cols-4 lg:grid-cols-7 gap-4"}`,children:a.map(({Icon:e,color:t,v:r,l:n})=>(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(e,{className:`${i} ${t}`}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:`${l} truncate max-w-[120px]`,children:r}),(0,s.jsx)("div",{className:o,children:n})]})]},n))})})}),O=(0,v.default)("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]);var A=e.i(67927);function z(e){return JSON.stringify(e.raw,null,2)}let _=new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit",hour12:!0});function D(e){let t=new Date(e),s=_.format(t),r=t.getMilliseconds().toString().padStart(3,"0");return`${s}.${r}`}let F=r.default.memo(function({entry:e,isCollapsed:t,entryCount:r,onToggle:n}){let i="function"==typeof n,l=(0,s.jsxs)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full bg-primary/10 border border-primary/20 text-primary text-xs font-medium${i?" group-hover:bg-primary/20 transition-colors":""}`,children:[i?(0,s.jsx)(A.ChevronRight,{className:`w-3 h-3 transition-transform ${t?"":"rotate-90"}`}):(0,s.jsx)(O,{className:"w-3 h-3"}),(0,s.jsx)("span",{children:e.label}),(0,s.jsx)("span",{className:"text-muted-foreground",children:D(e.timestampMs)}),i&&t&&"number"==typeof r&&(0,s.jsxs)("span",{className:"ml-1 px-1.5 py-0.5 rounded bg-primary/20 text-[10px] leading-none",children:[r," ",1===r?"entry":"entries"]})]});return i?(0,s.jsxs)("button",{type:"button",onClick:n,className:"group flex items-center gap-3 py-3 px-4 w-full cursor-pointer",children:[(0,s.jsx)("div",{className:"flex-1 h-px bg-primary/30"}),l,(0,s.jsx)("div",{className:"flex-1 h-px bg-primary/30"})]}):(0,s.jsxs)("div",{className:"flex items-center gap-3 py-3 px-4",children:[(0,s.jsx)("div",{className:"flex-1 h-px bg-primary/30"}),l,(0,s.jsx)("div",{className:"flex-1 h-px bg-primary/30"})]})});var R=e.i(47163);let $={user:"User",assistant:"Assistant","file-history-snapshot":"Snapshot",progress:"Progress",system:"System","queue-operation":"Queue"},P={user:"bg-[color:var(--chart-1)]/20 text-[color:var(--chart-1)] border-[color:var(--chart-1)]/30",assistant:"bg-[color:var(--chart-2)]/20 text-[color:var(--chart-2)] border-[color:var(--chart-2)]/30","file-history-snapshot":"bg-[color:var(--chart-3)]/20 text-[color:var(--chart-3)] border-[color:var(--chart-3)]/30",progress:"bg-[color:var(--chart-5)]/20 text-[color:var(--chart-5)] border-[color:var(--chart-5)]/30",system:"bg-[color:var(--chart-4)]/20 text-[color:var(--chart-4)] border-[color:var(--chart-4)]/30","queue-operation":"bg-primary/20 text-primary border-primary/30"},W={user:"border-l-[color:var(--chart-1)]",assistant:"border-l-[color:var(--chart-2)]","file-history-snapshot":"border-l-[color:var(--chart-3)]",progress:"border-l-[color:var(--chart-5)]",system:"border-l-[color:var(--chart-4)]","queue-operation":"border-l-primary"},L=(0,v.default)("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]),U=(0,v.default)("activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);var q=e.i(66794);function H({type:e}){let t="w-4 h-4";switch(e){case"user":return(0,s.jsx)(S,{className:t});case"assistant":return(0,s.jsx)(N,{className:t});case"file-history-snapshot":return(0,s.jsx)(L,{className:t});case"progress":return(0,s.jsx)(U,{className:t});case"system":return(0,s.jsx)(q.Settings,{className:t});case"queue-operation":return(0,s.jsx)(O,{className:t})}}function B({type:e}){return(0,s.jsxs)("span",{className:`inline-flex items-center gap-1.5 px-2 py-0.5 text-xs font-mono rounded border ${P[e]}`,children:[(0,s.jsx)(H,{type:e}),$[e]]})}var V=e.i(24380);function K({block:e}){let t=(0,r.useMemo)(()=>JSON.stringify(e.input,null,2),[e]);return(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsxs)("details",{open:!0,children:[(0,s.jsx)("summary",{className:"text-xs text-muted-foreground cursor-pointer hover:text-foreground transition-colors",children:(0,s.jsxs)("span",{className:"inline-flex items-center gap-1",children:["Input",(0,s.jsx)(V.CopyButton,{text:t})]})}),(0,s.jsx)("pre",{className:"mt-1 p-2 bg-muted/50 rounded text-xs whitespace-pre-wrap break-words max-h-64 overflow-y-auto",children:t})]}),e.result?(0,s.jsxs)("div",{className:"border-l-2 border-primary/50 pl-3 space-y-1",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"inline-block px-2 py-0.5 text-xs font-mono rounded border bg-primary/20 text-primary border-primary/30",children:"Result"}),(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:D(new Date(e.result.timestamp).getTime())})]}),e.result.content&&(0,s.jsxs)("details",{open:!0,children:[(0,s.jsx)("summary",{className:"text-xs text-muted-foreground cursor-pointer hover:text-foreground transition-colors",children:(0,s.jsxs)("span",{className:"inline-flex items-center gap-1",children:["Output",(0,s.jsx)(V.CopyButton,{text:e.result.content})]})}),(0,s.jsx)("pre",{className:"mt-1 p-2 bg-muted/50 rounded text-xs whitespace-pre-wrap break-words max-h-48 overflow-y-auto",children:e.result.content})]}),e.result.images?.map((e,t)=>(0,s.jsx)("img",{src:`data:${e.mediaType};base64,${e.base64}`,alt:`Tool result image ${t+1}`,className:"mt-2 max-w-full rounded border border-border"},t))]}):(0,s.jsx)("div",{className:"text-xs text-muted-foreground",children:"Tool did not return a result"})]})}let J=(0,v.default)("brain",[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]]),Y=r.default.memo(function({block:e,entriesBySource:t,projectName:r,sessionId:n,highlightedUuid:i,autoExpandForUuid:l}){switch(e.type){case"text":return(0,s.jsx)("p",{className:"whitespace-pre-wrap text-sm",children:e.text});case"tool_use":if("Task"===e.name&&(e.subagentType||e.subagentId)){let o=e.subagentId&&t?t.get(`agent-${e.subagentId}`):void 0;return(0,s.jsx)(es,{block:e,subagentEntries:o,projectName:r,sessionId:n,highlightedUuid:i,autoExpandForUuid:l})}return(0,s.jsxs)("div",{className:"border border-border/50 rounded-lg p-3 bg-muted/10",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,s.jsx)(j,{className:"w-4 h-4 text-primary flex-shrink-0"}),(0,s.jsx)("span",{className:"font-mono text-sm text-primary truncate min-w-0",children:e.name}),e.result&&(0,s.jsx)("span",{className:"text-xs text-muted-foreground ml-auto flex-shrink-0",children:e.result.durationFormatted})]}),(0,s.jsx)(K,{block:e})]});case"thinking":return(0,s.jsx)("div",{className:"border border-[color:var(--chart-5)]/30 rounded-lg p-3 bg-[color:var(--chart-5)]/5",children:(0,s.jsxs)("details",{children:[(0,s.jsxs)("summary",{className:"flex items-center gap-2 text-xs cursor-pointer hover:text-foreground transition-colors text-[color:var(--chart-5)]",children:[(0,s.jsx)(J,{className:"w-4 h-4"}),(0,s.jsx)("span",{children:"Thinking"}),(0,s.jsxs)("span",{className:"text-muted-foreground ml-1",children:["(",e.thinking.length.toLocaleString()," chars)"]})]}),(0,s.jsx)("p",{className:"mt-2 whitespace-pre-wrap text-xs text-muted-foreground p-2 bg-muted/30 rounded max-h-64 overflow-y-auto",children:e.thinking})]})})}});function X({entry:e}){return(0,s.jsx)("div",{children:e.message.content&&(0,s.jsx)("p",{className:"whitespace-pre-wrap text-sm",children:e.message.content})})}let Q=r.default.memo(function({entry:e,entriesBySource:t,projectName:r,sessionId:n,highlightedUuid:i,autoExpandForUuid:l}){let{content:o}=e.message;return(0,s.jsx)("div",{className:"space-y-3",children:o.map((e,o)=>(0,s.jsx)(Y,{block:e,entriesBySource:t,projectName:r,sessionId:n,highlightedUuid:i,autoExpandForUuid:l},o))})}),G=r.default.memo(function({entry:e}){let t=(0,r.useMemo)(()=>{if("progress"===e.type){let t=e.raw.data,s=t?.agentId;return[t?.type,s&&`agent:${s}`].filter(Boolean).join(" | ")}return"file-history-snapshot"===e.type?"File history snapshot":e.type},[e.type,e.raw]);return(0,s.jsxs)("div",{className:"text-sm",children:[(0,s.jsx)("span",{className:"text-muted-foreground",children:t}),(0,s.jsxs)("details",{className:"mt-1",children:[(0,s.jsx)("summary",{className:"text-xs text-muted-foreground cursor-pointer hover:text-foreground transition-colors",children:"Show raw JSON"}),(0,s.jsx)("pre",{className:"mt-1 p-2 bg-muted/50 rounded text-xs whitespace-pre-wrap break-words max-h-64 overflow-y-auto",children:z(e)})]})]})}),Z=(0,v.default)("link-2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);var ee=e.i(55574);function et({uuid:e}){let t=(0,r.useCallback)(async()=>{window.history.replaceState(null,"",`#entry-${e}`);try{await navigator.clipboard.writeText(window.location.href)}catch{let e=document.createElement("textarea");e.value=window.location.href,e.style.position="fixed",e.style.opacity="0",document.body.appendChild(e),e.select(),document.execCommand("copy"),document.body.removeChild(e)}(0,ee.toast)("Link copied")},[e]);return(0,s.jsx)("button",{onClick:t,title:"Copy link to entry",className:"inline-flex items-center justify-center rounded p-1 text-muted-foreground hover:text-foreground hover:bg-muted/80 transition-colors opacity-0 group-hover:opacity-100 transition-opacity",children:(0,s.jsx)(Z,{className:"w-3.5 h-3.5"})})}function es({block:e,subagentEntries:t,projectName:n,sessionId:i,highlightedUuid:l,autoExpandForUuid:o}){let a=!!(o&&t?.some(e=>e.uuid===o)),[d,c]=(0,r.useState)(a);(0,r.useEffect)(()=>{if(!a)return;let e=requestAnimationFrame(()=>c(!0));return()=>cancelAnimationFrame(e)},[a]);let h=(0,r.useCallback)(()=>{c(e=>!e)},[]),u=t&&t.length>0,m=(0,r.useMemo)(()=>w(t??[]),[t]);return(0,s.jsxs)("div",{className:"border border-border/50 rounded-lg p-3 bg-muted/10",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,s.jsx)(T,{className:"w-4 h-4 text-[color:var(--chart-5)]"}),(0,s.jsx)("span",{className:"font-mono text-sm text-[color:var(--chart-5)]",children:"Subagent"}),e.subagentType&&(0,s.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 text-xs font-mono rounded border bg-[color:var(--chart-5)]/20 text-[color:var(--chart-5)] border-[color:var(--chart-5)]/30",children:e.subagentType}),e.result&&(0,s.jsx)("span",{className:"text-xs text-muted-foreground ml-auto",children:e.result.durationFormatted})]}),e.subagentDescription&&(0,s.jsx)("p",{className:"text-sm text-muted-foreground mb-2",children:e.subagentDescription}),e.subagentId&&t&&(0,s.jsxs)("button",{onClick:h,className:"inline-flex items-center gap-1.5 px-2.5 py-1 text-xs font-medium rounded border border-primary/30 bg-primary/10 text-primary hover:bg-primary/20 transition-colors mb-2",children:[(0,s.jsx)(A.ChevronRight,{className:(0,R.cn)("w-3 h-3 transition-transform",d&&"rotate-90")}),(0,s.jsxs)("span",{children:["agent-",e.subagentId]}),(0,s.jsx)("span",{className:"text-muted-foreground",children:d?"Collapse":"View subagent log"})]}),d&&(0,s.jsxs)("div",{className:"ml-4 pl-3 border-l-2 border-primary/30 mt-2 space-y-2",children:[t&&0===t.length&&(0,s.jsx)("div",{className:"text-xs text-muted-foreground py-2",children:"No entries found in subagent log."}),u&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(C,{entries:t,compact:!0})}),t&&t.map(e=>"queue-operation"===e.type?(0,s.jsx)(F,{entry:e},m.get(e)):(0,s.jsx)(en,{entry:e,projectName:n,sessionId:i,isHighlighted:!!l&&e.uuid===l},m.get(e)))]}),(0,s.jsx)(K,{block:e})]})}function er({entry:e,entriesBySource:t,projectName:r,sessionId:n,highlightedUuid:i,autoExpandForUuid:l}){switch(e.type){case"user":return(0,s.jsx)(X,{entry:e});case"assistant":return(0,s.jsx)(Q,{entry:e,entriesBySource:t,projectName:r,sessionId:n,highlightedUuid:i,autoExpandForUuid:l});case"file-history-snapshot":case"progress":case"system":return(0,s.jsx)(G,{entry:e})}}let en=r.default.memo(function({entry:e,entriesBySource:t,projectName:r,sessionId:n,isHighlighted:i,highlightedUuid:l,autoExpandForUuid:o}){return(0,s.jsxs)("div",{id:e.uuid?`entry-${e.uuid}`:void 0,className:(0,R.cn)(`group border-l-4 ${W[e.type]} bg-card/50 rounded-r-lg mb-2 hover:bg-muted/30 transition-colors`,i&&"entry-highlighted"),children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 px-4 py-2 border-b border-border/30",children:[(0,s.jsx)(B,{type:e.type}),(0,s.jsxs)("div",{className:"flex items-center gap-1 ml-auto",children:[e.uuid&&(0,s.jsx)(et,{uuid:e.uuid}),(0,s.jsx)(V.CopyButton,{text:function(e){switch(e.type){case"user":return e.message.content;case"assistant":return e.message.content.filter(e=>"text"===e.type).map(e=>e.text).join("\n");case"file-history-snapshot":case"progress":case"system":return z(e);case"queue-operation":return e.label}}(e)}),(0,s.jsx)("span",{className:"text-xs font-mono text-muted-foreground whitespace-nowrap",children:D(e.timestampMs)})]})]}),(0,s.jsx)("div",{className:"px-4 py-3",children:(0,s.jsx)(er,{entry:e,entriesBySource:t,projectName:r,sessionId:n,highlightedUuid:l,autoExpandForUuid:o})})]})},(e,t)=>e.entry===t.entry&&e.entriesBySource===t.entriesBySource&&e.projectName===t.projectName&&e.sessionId===t.sessionId&&e.isHighlighted===t.isHighlighted&&e.highlightedUuid===t.highlightedUuid&&e.autoExpandForUuid===t.autoExpandForUuid);var ei=e.i(84107),el=e.i(84026),eo=e.i(29407),ea=e.i(16306),ed=e.i(82954),ec=e.i(73520),eh=e.i(85881);function eu({decision:e}){return"deny"===e?(0,s.jsxs)("span",{className:"inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[0.65rem] font-semibold tracking-wide uppercase bg-red-500/10 text-red-400 border border-red-500/20",children:[(0,s.jsx)(eo.ShieldX,{className:"h-3 w-3"}),"Deny"]}):"instruct"===e?(0,s.jsxs)("span",{className:"inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[0.65rem] font-semibold tracking-wide uppercase bg-amber-500/10 text-amber-400 border border-amber-500/20",children:[(0,s.jsx)(ea.ShieldAlert,{className:"h-3 w-3"}),"Instruct"]}):(0,s.jsxs)("span",{className:"inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[0.65rem] font-semibold tracking-wide uppercase bg-emerald-500/10 text-emerald-400 border border-emerald-500/20",children:[(0,s.jsx)(el.ShieldCheck,{className:"h-3 w-3"}),"Allow"]})}function em({eventType:e}){return(0,s.jsx)("span",{className:"inline-flex items-center rounded px-1.5 py-0.5 text-[0.6rem] font-medium bg-muted text-muted-foreground border border-border/50",children:e})}function ef({mode:e}){let t="default"===e;return(0,s.jsx)("span",{className:`inline-flex items-center rounded px-1.5 py-0.5 text-[0.6rem] font-medium border ${t?"bg-sky-500/10 text-sky-400 border-sky-500/20":"bg-amber-500/10 text-amber-400 border-amber-500/20"}`,children:e})}function ep({ms:e}){return(0,s.jsx)("span",{className:`font-mono text-[0.7rem] ${e>500?"text-red-400":e>100?"text-amber-400":"text-muted-foreground"}`,children:e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`})}function eg({value:e,onChange:t}){return(0,s.jsx)("div",{className:"inline-flex items-center rounded-md border border-border bg-muted/30 p-0.5",children:[{label:"All",value:""},{label:"Allow",value:"allow"},{label:"Instruct",value:"instruct"},{label:"Deny",value:"deny"}].map(r=>(0,s.jsx)("button",{onClick:()=>t(r.value),className:`px-2.5 py-1 text-[0.65rem] font-medium rounded transition-all ${e===r.value?"deny"===r.value?"bg-red-500/15 text-red-400 shadow-sm":"allow"===r.value?"bg-emerald-500/15 text-emerald-400 shadow-sm":"instruct"===r.value?"bg-amber-500/15 text-amber-400 shadow-sm":"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"}`,children:r.label},r.value))})}function ex({item:e}){return(0,s.jsx)("tr",{children:(0,s.jsx)("td",{colSpan:9,className:"px-0 py-0",children:(0,s.jsxs)("div",{className:"px-6 py-3 bg-muted/20 border-t border-border/30 space-y-2 text-xs animate-expand",children:[(0,s.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-x-8 gap-y-1.5",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"text-muted-foreground",children:"Session ID: "}),(0,s.jsx)("span",{className:"font-mono text-foreground",children:e.sessionId??"—"}),e.sessionId&&(0,s.jsx)(V.CopyButton,{text:e.sessionId})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"text-muted-foreground",children:"CWD: "}),(0,s.jsx)("span",{className:"font-mono text-foreground",children:e.cwd??"—"}),e.cwd&&(0,s.jsx)(V.CopyButton,{text:e.cwd})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"text-muted-foreground",children:"Transcript: "}),(0,s.jsx)("span",{className:"font-mono text-foreground break-all",children:e.transcriptPath??"—"}),e.transcriptPath?.startsWith("opencode-db://")&&(0,s.jsx)("span",{className:"text-muted-foreground ml-1",children:"(stored in opencode DB)"})]})]}),e.policyNames&&e.policyNames.length>1&&(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"text-muted-foreground",children:"Policies: "}),(0,s.jsx)("span",{className:"font-mono text-foreground",children:e.policyNames.join(", ")})]}),e.reason&&(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"text-muted-foreground",children:"Full reason: "}),(0,s.jsx)("span",{className:"text-foreground",children:e.reason})]})]})})})}function ey({sessionId:e,initialData:t}){let{intervalSec:n}=(0,eh.useAutoRefresh)(),[i,l]=(0,r.useState)(!1),[o,a]=(0,r.useState)(1),[d,c]=(0,r.useState)(t),[h,u]=(0,r.useState)(null),[m,f]=(0,r.useState)(""),[p,g]=(0,r.useState)(""),[x,y]=(0,r.useState)(""),v=(0,r.useRef)(null),j=(0,r.useRef)({filterDecision:m,filterEventType:p,filterPolicy:x});j.current={filterDecision:m,filterEventType:p,filterPolicy:x};let w=""!==m||""!==p||""!==x,S=(0,r.useCallback)(async t=>{try{let{filterDecision:s,filterEventType:r,filterPolicy:n}=j.current,i=await (0,ei.searchHookActivityAction)({sessionId:e,decision:s||void 0,eventType:r||void 0,policyName:n||void 0},t);c(i)}catch{}},[e]);(0,r.useEffect)(()=>{S(o);let e=setInterval(()=>S(o),n>0?1e3*n:5e3);return()=>clearInterval(e)},[o,S,n]),(0,r.useEffect)(()=>(v.current&&clearTimeout(v.current),v.current=setTimeout(()=>{a(1),u(null),S(1)},300),()=>{v.current&&clearTimeout(v.current)}),[m,p,x]);let N=d.entries,M=d.totalPages;return(0,s.jsxs)("div",{children:[(0,s.jsxs)("button",{onClick:()=>l(e=>!e),className:"flex items-center gap-2 hover:opacity-80 transition-opacity",children:[(0,s.jsx)(b.ChevronDown,{className:`w-4 h-4 text-muted-foreground transition-transform ${i?"-rotate-90":""}`}),(0,s.jsx)("span",{className:"text-sm font-semibold text-muted-foreground uppercase tracking-wide",children:"Hook Logs"})]}),!i&&(0,s.jsxs)("div",{className:"mt-2 bg-card border border-border rounded-lg overflow-hidden shadow-sm",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3 px-4 py-2.5 border-b border-border bg-muted/20",children:[(0,s.jsx)(eg,{value:m,onChange:f}),(0,s.jsxs)("select",{value:p,onChange:e=>g(e.target.value),className:"h-7 rounded-md border border-border bg-background px-2 text-xs text-foreground focus:outline-none focus:ring-2 focus:ring-primary/40 focus:border-primary/40 transition-shadow",children:[(0,s.jsx)("option",{value:"",children:"All Events"}),(0,s.jsx)("option",{value:"PreToolUse",children:"PreToolUse"}),(0,s.jsx)("option",{value:"PostToolUse",children:"PostToolUse"}),(0,s.jsx)("option",{value:"SessionStart",children:"SessionStart"}),(0,s.jsx)("option",{value:"SessionEnd",children:"SessionEnd"}),(0,s.jsx)("option",{value:"UserPromptSubmit",children:"UserPromptSubmit"}),(0,s.jsx)("option",{value:"PermissionRequest",children:"PermissionRequest"})]}),(0,s.jsx)("div",{className:"relative",children:(0,s.jsx)("input",{type:"text",value:x,onChange:e=>y(e.target.value),placeholder:"Filter by policy…",className:"h-7 rounded-md border border-border bg-background px-2.5 text-xs text-foreground placeholder:text-muted-foreground w-44 focus:outline-none focus:ring-2 focus:ring-primary/40 focus:border-primary/40 transition-shadow"})})]}),0===N.length?(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 px-4",children:[(0,s.jsx)(ed.Shield,{className:"h-10 w-10 text-muted-foreground/30"}),(0,s.jsx)("p",{className:"text-sm text-muted-foreground mt-3",children:w?"No matching hook events.":"No hook events found."})]}):(0,s.jsx)("div",{className:"overflow-x-auto",children:(0,s.jsxs)("table",{className:"w-full text-xs",children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{className:"text-left text-muted-foreground border-b border-border bg-muted/30",children:[(0,s.jsx)("th",{className:"px-4 py-2.5 font-medium w-6"}),(0,s.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Decision"}),(0,s.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Event"}),(0,s.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Tool"}),(0,s.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Policy"}),(0,s.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Reason"}),(0,s.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Duration"}),(0,s.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Mode"}),(0,s.jsx)("th",{className:"px-3 py-2.5 font-medium text-right",children:"Time"})]})}),(0,s.jsx)("tbody",{className:"divide-y divide-border/30",children:N.map((e,t)=>{let n="deny"===e.decision,i=h===t,l="instruct"===e.decision;return(0,s.jsxs)(r.default.Fragment,{children:[(0,s.jsxs)("tr",{onClick:()=>{u(e=>e===t?null:t)},className:`cursor-pointer transition-colors ${n?"bg-red-500/[0.03] hover:bg-red-500/[0.07] border-l-2 border-l-red-500/40":l?"bg-amber-500/[0.03] hover:bg-amber-500/[0.07] border-l-2 border-l-amber-500/40":t%2==0?"hover:bg-muted/30":"bg-muted/[0.04] hover:bg-muted/30"} ${i?"bg-muted/20":""}`,children:[(0,s.jsx)("td",{className:"px-4 py-2",children:(0,s.jsx)(b.ChevronDown,{className:`h-3.5 w-3.5 text-muted-foreground transition-transform duration-150 ${i?"rotate-0":"-rotate-90"}`})}),(0,s.jsx)("td",{className:"px-3 py-2",children:(0,s.jsx)(eu,{decision:e.decision})}),(0,s.jsx)("td",{className:"px-3 py-2",children:(0,s.jsx)(em,{eventType:e.eventType})}),(0,s.jsx)("td",{className:"px-3 py-2 font-mono text-foreground",children:e.toolName??"—"}),(0,s.jsx)("td",{className:"px-3 py-2 font-mono text-foreground",children:e.policyNames&&e.policyNames.length>1?(0,s.jsxs)("span",{title:e.policyNames.join(", "),children:[e.policyNames[0],(0,s.jsxs)("span",{className:"text-muted-foreground text-[0.6rem]",children:[" +",e.policyNames.length-1]})]}):e.policyName??"—"}),(0,s.jsx)("td",{className:"px-3 py-2 text-muted-foreground truncate max-w-[240px]",title:e.reason??"",children:e.reason??"—"}),(0,s.jsx)("td",{className:"px-3 py-2",children:(0,s.jsx)(ep,{ms:e.durationMs})}),(0,s.jsx)("td",{className:"px-3 py-2",children:e.permissionMode?(0,s.jsx)(ef,{mode:e.permissionMode}):"—"}),(0,s.jsx)("td",{className:"px-3 py-2 text-right text-muted-foreground whitespace-nowrap",title:new Date(e.timestamp).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}),children:(0,I.formatRelativeTime)(e.timestamp)})]}),i&&(0,s.jsx)(ex,{item:e})]},`${e.timestamp}-${t}`)})})]})}),(0,s.jsx)(ec.default,{currentPage:o,totalPages:M,onPageChange:e=>{a(e),u(null)}})]})]})}function eb(e){let t=new Map;for(let s of e)if("assistant"===s.type)for(let e of s.message.content){if("tool_use"!==e.type||"Task"===e.name&&(e.subagentType||e.subagentId))continue;let s=t.get(e.name)||{count:0,totalDurationMs:0};s.count++,e.result?.durationMs&&(s.totalDurationMs+=e.result.durationMs),t.set(e.name,s)}return Array.from(t.entries()).map(([e,t])=>({name:e,...t})).sort((e,t)=>t.count-e.count)}function ev({tools:e,compact:t}){return(0,s.jsx)("div",{className:`bg-card border border-border rounded-lg ${t?"p-3":"p-4"}`,children:(0,s.jsx)("div",{className:`grid grid-cols-[repeat(auto-fit,minmax(200px,1fr))] ${t?"gap-2":"gap-3"}`,children:e.map(e=>(0,s.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,s.jsx)(j,{className:"w-3.5 h-3.5 text-muted-foreground flex-shrink-0"}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)("div",{className:`${t?"text-xs":"text-sm"} font-mono font-medium truncate`,children:e.name}),(0,s.jsxs)("div",{className:"text-xs text-muted-foreground truncate",children:[e.count," call",1!==e.count?"s":"",e.totalDurationMs>0&&` \xb7 ${(e.totalDurationMs/1e3).toFixed(1)}s`]})]})]},e.name))})})}function ej(e,t){return t.get(e)??`${e.uuid}-${e.timestampMs}`}function ew(){let e=window.location.hash;return e.startsWith("#entry-")?e.slice(7):null}function eS({entries:e,entriesBySource:t,projectName:i,sessionId:l}){let o=(0,r.useMemo)(()=>Array.from(t.values()).flat(),[t]),[a,d]=(0,r.useState)(new Set),[c,u]=(0,r.useState)(0),[f,x]=(0,r.useState)(()=>ew()),b=(0,r.useRef)(void 0),v=(0,r.useRef)(!1),j=(0,r.useRef)(null);(0,r.useLayoutEffect)(()=>{let e=j.current;if(!e)return;let t=()=>{let t=e.getBoundingClientRect().top+window.scrollY;u(e=>e===t?e:t)};t();let s=new ResizeObserver(t);return s.observe(document.body),window.addEventListener("resize",t),()=>{s.disconnect(),window.removeEventListener("resize",t)}},[]);let S=(0,r.useMemo)(()=>w(e),[e]),N=(0,r.useMemo)(()=>(function(e,t){let s=new Map,r=null,n=0;for(let i of e)"queue-operation"===i.type?(null!==r&&s.set(r,n),r=ej(i,t),n=0):null!==r&&n++;return null!==r&&s.set(r,n),s})(e,S),[e,S]),M=(0,r.useMemo)(()=>{let t;return t=!1,e.filter(e=>"queue-operation"===e.type?(t=a.has(ej(e,S)),!0):!t)},[e,a,S]),k=(0,r.useMemo)(()=>{let e=new Map;return M.forEach((t,s)=>{t.uuid&&e.set(t.uuid,s)}),e},[M]),E=(0,r.useMemo)(()=>(function(e){let t=new Map;for(let s of e)if("assistant"===s.type&&s.uuid)for(let e of s.message.content)"tool_use"===e.type&&"Task"===e.name&&e.subagentId&&t.set(e.subagentId,s.uuid);let s=new Map;for(let r of e){if(!r._source?.startsWith("agent-")||!r.uuid)continue;let e=r._source.slice(6),n=t.get(e);n&&s.set(r.uuid,n)}return s})(o),[o]),T=(0,r.useMemo)(()=>f&&E.has(f)?f:null,[f,E]),I=T?E.get(T)??null:null;(0,r.useEffect)(()=>{if(f)return b.current=setTimeout(()=>x(null),4e3),()=>{b.current&&clearTimeout(b.current)}},[]),(0,r.useEffect)(()=>{let e=()=>{let e=ew();x(e),v.current=!1,b.current&&clearTimeout(b.current),e&&(b.current=setTimeout(()=>x(null),4e3))};return window.addEventListener("hashchange",e),()=>window.removeEventListener("hashchange",e)},[]);let C=(0,r.useMemo)(()=>{if(!f)return null;let t=I??f,s=e.some(e=>e.uuid===t),r=k.has(t);if(s&&!r){let s=null;for(let r of e)if("queue-operation"===r.type)s=ej(r,S);else if(r.uuid===t&&s)return s}return null},[f,I,e,k,S]);(0,r.useEffect)(()=>{if(!C)return;let e=requestAnimationFrame(()=>{d(e=>{if(!e.has(C))return e;let t=new Set(e);return t.delete(C),t})});return()=>cancelAnimationFrame(e)},[C]);let O=(0,r.useCallback)(e=>{d(t=>{let s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s})},[]),A=(0,r.useCallback)(e=>S.get(M[e])??e,[S,M]),z=function({useFlushSync:e=!0,directDomUpdates:t=!1,directDomUpdatesMode:s="transform",...i}){let l=r.useReducer(e=>e+1,0)[1],o=r.useRef({enabled:t,mode:s,container:null,lastSize:null,lastPositions:new WeakMap,prevRange:null});o.current.enabled=t,o.current.mode=s;let a=e=>{let t=o.current;if(!t.enabled||!t.container)return;let s=e.getTotalSize();if(s!==t.lastSize){t.lastSize=s;let r=e.options.horizontal?"width":"height";t.container.style[r]=`${s}px`}},d=e=>{let t=o.current;if(!t.enabled||!t.container)return;a(e);let s=!!e.options.horizontal,r="transform"===t.mode,n=s?"left":"top",i=e.options.scrollMargin;for(let l of e.getVirtualItems()){let o=l.start-i,a=e.elementsCache.get(l.key);a&&t.lastPositions.get(a)!==o&&(t.lastPositions.set(a,o),r?a.style.transform=s?`translate3d(${o}px, 0, 0)`:`translate3d(0, ${o}px, 0)`:a.style[n]=`${o}px`)}},c={...i,onChange:(t,s)=>{var r;let a=o.current,c=!0;if(a.enabled){d(t);let e=t.range,s=a.prevRange;(c=!s||s.isScrolling!==t.isScrolling||s.startIndex!==(null==e?void 0:e.startIndex)||s.endIndex!==(null==e?void 0:e.endIndex))&&(a.prevRange=e?{startIndex:e.startIndex,endIndex:e.endIndex,isScrolling:t.isScrolling}:null)}c&&(e&&s?(0,n.flushSync)(l):l()),null==(r=i.onChange)||r.call(i,t,s)}},[h]=r.useState(()=>{let e=new g(c);return Object.assign(e,{containerRef:t=>{let s=o.current;if(s.container=t,s.lastSize=null,t&&s.enabled){let r=e.getTotalSize();s.lastSize=r;let n=e.options.horizontal?"width":"height";t.style[n]=`${r}px`}}})});return h.setOptions(c),y(()=>h._didMount(),[]),y(()=>(a(h),h._willUpdate())),y(()=>{d(h)}),h}({getScrollElement:()=>"u">typeof document?window:null,observeElementRect:h,observeElementOffset:m,scrollToFn:p,initialOffset:()=>"u">typeof document?window.scrollY:0,...{count:M.length,estimateSize:e=>(function(e){switch(e.type){case"queue-operation":return 48;case"user":return 90;case"assistant":return 80+120*e.message.content.length;default:return 100}})(M[e]),getItemKey:A,overscan:5,scrollMargin:c}});return(0,r.useEffect)(()=>{if(!f||v.current)return;let e=I??f,t=k.get(e);null!=t&&(v.current=!0,requestAnimationFrame(()=>{z.scrollToIndex(t,{align:"center"})}))},[f,I,k,z]),(0,s.jsx)("div",{ref:j,children:(0,s.jsx)("div",{style:{height:`${z.getTotalSize()}px`,width:"100%",position:"relative"},children:z.getVirtualItems().map(e=>{let r=M[e.index],n=!!f&&r.uuid===(I??f);return(0,s.jsx)("div",{"data-index":e.index,ref:z.measureElement,style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${e.start-z.options.scrollMargin}px)`},children:"queue-operation"===r.type?(0,s.jsx)(F,{entry:r,isCollapsed:a.has(ej(r,S)),entryCount:N.get(ej(r,S))??0,onToggle:()=>O(ej(r,S))}):(0,s.jsx)(en,{entry:r,entriesBySource:t,projectName:i,sessionId:l,isHighlighted:!T&&n,highlightedUuid:T,autoExpandForUuid:T})},e.key)})})})}let eN=[];e.s([],76248),e.i(76248),e.s(["default",0,function({entries:e,projectName:t,sessionId:n}){let i=(0,r.useMemo)(()=>{let t=new Map;for(let s of e){let e=t.get(s._source);e?e.push(s):t.set(s._source,[s])}return t},[e]),l=i.get("session")??eN,o=(0,r.useMemo)(()=>(function(e){let t=new Map;for(let s of e)if("assistant"===s.type)for(let e of s.message.content)"tool_use"===e.type&&"Task"===e.name&&e.subagentId&&(t.has(e.subagentId)||t.set(e.subagentId,{id:e.subagentId,type:e.subagentType||"unknown",description:e.subagentDescription||""}));return Array.from(t.values())})(e),[e]),a=(0,r.useMemo)(()=>eb(l),[l]),[d,c]=(0,r.useState)(!1),[h,u]=(0,r.useState)(new Set),[m,f]=(0,r.useState)(!1),[p,g]=(0,r.useState)(null);(0,r.useEffect)(()=>{(0,ei.searchHookActivityAction)({sessionId:n},1).then(e=>{e.entries.length>0&&g(e)}).catch(()=>{})},[n]),(0,r.useEffect)(()=>{let e=()=>{window.location.hash.startsWith("#entry-")&&f(!1)};return window.addEventListener("hashchange",e),()=>window.removeEventListener("hashchange",e)},[]);let x=(0,r.useCallback)(e=>{u(t=>{let s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s})},[]);return(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsx)(C,{entries:l}),p&&(0,s.jsx)(ey,{sessionId:n,initialData:p},n),o.length>0&&(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsxs)("button",{onClick:()=>c(e=>!e),className:"flex items-center gap-2 hover:opacity-80 transition-opacity",children:[(0,s.jsx)(b.ChevronDown,{className:`w-4 h-4 text-muted-foreground transition-transform ${d?"-rotate-90":""}`}),(0,s.jsx)("span",{className:"text-sm font-semibold text-muted-foreground uppercase tracking-wide",children:"Subagents"}),(0,s.jsxs)("span",{className:"text-xs text-muted-foreground",children:["(",o.length,")"]})]}),!d&&o.map(e=>{let t;return(0,s.jsxs)("div",{className:"pl-3 border-l-2 border-primary/30 space-y-2",children:[(0,s.jsxs)("button",{onClick:()=>x(e.id),className:"flex items-center gap-2 hover:opacity-80 transition-opacity",children:[(0,s.jsx)(b.ChevronDown,{className:`w-3.5 h-3.5 text-muted-foreground transition-transform ${h.has(e.id)?"-rotate-90":""}`}),(0,s.jsx)("span",{className:"text-sm font-bold",children:e.type}),e.description&&(0,s.jsx)("span",{className:"text-xs text-muted-foreground truncate max-w-[400px]",children:e.description})]}),!h.has(e.id)&&(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(C,{entries:i.get(`agent-${e.id}`)||[],compact:!0}),(t=eb(i.get(`agent-${e.id}`)||[])).length>0?(0,s.jsx)(ev,{tools:t,compact:!0}):null]})]},e.id)})]}),a.length>0&&(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"text-sm font-semibold text-muted-foreground uppercase tracking-wide",children:"Tools"}),(0,s.jsxs)("span",{className:"text-xs text-muted-foreground",children:["(",a.reduce((e,t)=>e+t.count,0),")"]})]}),(0,s.jsx)(ev,{tools:a})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("button",{onClick:()=>f(e=>!e),className:"flex items-center gap-2 hover:opacity-80 transition-opacity",children:[(0,s.jsx)(b.ChevronDown,{className:`w-4 h-4 text-muted-foreground transition-transform ${m?"-rotate-90":""}`}),(0,s.jsx)("span",{className:"text-sm font-semibold text-muted-foreground uppercase tracking-wide",children:"Logs"})]}),!m&&(0,s.jsx)("div",{className:"mt-2 bg-card border border-border rounded-lg p-4 shadow-sm",children:0===l.length?(0,s.jsx)("p",{className:"text-muted-foreground text-center py-8",children:"No entries found."}):(0,s.jsx)(eS,{entries:l,entriesBySource:i,projectName:t,sessionId:n})})]})]})}],36406)},5780,function(e){e.n(e.i(36406))}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,36406,e=>{"use strict";let t;var s=e.i(43476),r=e.i(71645),n=e.i(74080);function i(e,t,s){let r,n=s.initialDeps??[],i=!0;function l(){let l=e();return(l.length!==n.length||l.some((e,t)=>n[t]!==e))&&(n=l,r=t(...l),(null==s?void 0:s.onChange)&&!(i&&s.skipInitialOnChange)&&s.onChange(r),i=!1),r}return l.updateDeps=e=>{n=e},l}function l(e,t){if(void 0!==e)return e;throw Error(`Unexpected undefined${t?`: ${t}`:""}`)}let o=()=>{if(void 0!==t)return t;if("u"<typeof navigator)return t=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return t=!0;let e=navigator.maxTouchPoints;return t="MacIntel"===navigator.platform&&void 0!==e&&e>0},a=e=>e,d=e=>{let t=Math.max(e.startIndex-e.overscan,0),s=Math.min(e.endIndex+e.overscan,e.count-1)-t+1,r=Array(s);for(let e=0;e<s;e++)r[e]=t+e;return r},c={passive:!0},h=(e,t)=>{let s=e.scrollElement;if(!s)return;let r=()=>{t({width:s.innerWidth,height:s.innerHeight})};return r(),s.addEventListener("resize",r,c),()=>{s.removeEventListener("resize",r)}},u="u"<typeof window||"onscrollend"in window,m=(e,t)=>((e,t,s)=>{var r,n;let i,l=e.scrollElement;if(!l)return;let o=e.targetWindow;if(!o)return;let a=e.options.useScrollendEvent&&u,d=0,h=a?null:(r=()=>t(d,!1),n=e.options.isScrollingResetDelay,function(...e){o.clearTimeout(i),i=o.setTimeout(()=>r.apply(this,e),n)}),m=e=>()=>{d=s(l),null==h||h(),t(d,e)},f=m(!0),p=m(!1);return l.addEventListener("scroll",f,c),a&&l.addEventListener("scrollend",p,c),()=>{l.removeEventListener("scroll",f),a&&l.removeEventListener("scrollend",p)}})(e,t,t=>e.options.horizontal?t.scrollX:t.scrollY),f=(e,t,s)=>{if(s.options.useCachedMeasurements){let t=s.indexFromElement(e),r=s.options.getItemKey(t);return s.itemSizeCache.get(r)??s.options.estimateSize(t)}if(null==t?void 0:t.borderBoxSize){let e=t.borderBoxSize[0];if(e)return Math.round(e[s.options.horizontal?"inlineSize":"blockSize"])}if(!t){let t=s.indexFromElement(e),r=s.options.getItemKey(t),n=s.itemSizeCache.get(r);if(void 0!==n)return n}return e[s.options.horizontal?"offsetWidth":"offsetHeight"]},p=(e,{adjustments:t=0,behavior:s},r)=>{var n,i;null==(i=null==(n=r.scrollElement)?void 0:n.scrollTo)||i.call(n,{[r.options.horizontal?"left":"top"]:e+t,behavior:s})};class g{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._flatMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this.elementsCache=new Map,this.now=()=>{var e,t,s;return(null==(s=null==(t=null==(e=this.targetWindow)?void 0:e.performance)?void 0:t.now)?void 0:s.call(t))??Date.now()},this.observer=(()=>{let e=null,t=()=>e||(this.targetWindow&&this.targetWindow.ResizeObserver?e=new this.targetWindow.ResizeObserver(e=>{e.forEach(e=>{let t=()=>{let t=e.target,s=this.indexFromElement(t);if(!t.isConnected){for(let[e,s]of(this.observer.unobserve(t),this.elementsCache))if(s===t){this.elementsCache.delete(e);break}return}this.shouldMeasureDuringScroll(s)&&this.resizeItem(s,this.options.measureElement(t,e,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(t):t()})}):null);return{disconnect:()=>{var s;null==(s=t())||s.disconnect(),e=null},observe:e=>{var s;return null==(s=t())?void 0:s.observe(e,{box:"border-box"})},unobserve:e=>{var s;return null==(s=t())?void 0:s.unobserve(e)}}})(),this.range=null,this.setOptions=e=>{var t,s;let r={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:a,rangeExtractor:d,onChange:()=>{},measureElement:f,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,anchorTo:"start",followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:"estimate",useCachedMeasurements:!1};for(let t in e){let s=e[t];void 0!==s&&(r[t]=s)}let n=this.options,i=null,l=null,o=!1;if(void 0!==n&&n.enabled&&r.enabled&&"end"===r.anchorTo&&null!==this.scrollElement){let e=n.count,a=r.count,d=this.getMeasurements(),c=e>0?(null==(t=d[0])?void 0:t.key)??n.getItemKey(0):null,h=e>0?(null==(s=d[e-1])?void 0:s.key)??n.getItemKey(e-1):null;if(a!==e||e>0&&a>0&&(r.getItemKey(0)!==c||r.getItemKey(a-1)!==h)){o=!0;let t=e>0?this.getVirtualItemForOffset(this.getScrollOffset())??d[0]:null;t&&(i=[t.key,this.getScrollOffset()-t.start]);let s=!0===r.followOnAppend?"auto":r.followOnAppend||null;s&&a>e&&this.isAtEnd(n.scrollEndThreshold)&&(0===e||r.getItemKey(a-1)!==h)&&(l=s)}}this.options=r,o&&(this.pendingMin=0,this.itemSizeCacheVersion++);let c=!1,h=0;if(i&&null!==this.scrollOffset){let[e,t]=i,s=this.getMeasurements(),{count:r,getItemKey:n}=this.options,l=0;for(;l<r&&n(l)!==e;)l++;if(l<r){let e=s[l];if(e){let s=Math.max(0,e.start+t);s!==this.scrollOffset&&(h=s-this.scrollOffset,this.scrollOffset=s,c=!0)}}}(c||l)&&(this.pendingScrollAnchor=[c?i[0]:null,c?i[1]:0,l,h])},this.notify=e=>{var t,s;null==(s=(t=this.options).onChange)||s.call(t,this,e)},this.maybeNotify=i(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),null!=this.rafId&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var e;let t=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==t){if(this.cleanup(),!t)return void this.maybeNotify();if(this.scrollElement=t,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=(null==(e=this.scrollElement)?void 0:e.window)??null,this.elementsCache.forEach(e=>{this.observer.observe(e)}),this.unsubs.push(this.options.observeElementRect(this,e=>{this.scrollRect=e,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(e,t)=>{if(t&&null===this._intendedScrollOffset&&e===this.scrollOffset)return;null!==this._intendedScrollOffset&&1.5>Math.abs(e-this._intendedScrollOffset)&&(e=this._intendedScrollOffset),this._intendedScrollOffset=null,this.scrollAdjustments=0;let s=this.getScrollOffset();this.scrollDirection=t?s===e?this.scrollDirection:s<e?"forward":"backward":null,this.scrollOffset=e,this.isScrolling=t,this._flushIosDeferredIfReady(),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),"addEventListener"in this.scrollElement){let e=this.scrollElement,t=()=>{this._iosTouching=!0,this._iosJustTouchEnded=!1,null!==this._iosTouchEndTimerId&&null!=this.targetWindow&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},s=()=>{this._iosTouching=!1,o()&&null!=this.targetWindow&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};e.addEventListener("touchstart",t,c),e.addEventListener("touchend",s,c),this.unsubs.push(()=>{e.removeEventListener("touchstart",t),e.removeEventListener("touchend",s),null!==this._iosTouchEndTimerId&&null!=this.targetWindow&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}let s=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,s&&this.scrollElement&&this.options.enabled){let[e,t,r,n]=s;null===e||r||(o()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?0!==n&&(this._iosDeferredAdjustment+=n):this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})),r&&this.scrollToEnd({behavior:r})}},this._flushIosDeferredIfReady=()=>{if(0===this._iosDeferredAdjustment||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;let e=this.getScrollOffset(),t=this.getMaxScrollOffset();if(e<0||e>t)return;if(this._iosDeferredAdjustment<0&&e>=t-1){this._iosDeferredAdjustment=0;return}let s=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(e,{adjustments:this.scrollAdjustments+=s,behavior:void 0})},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??("function"==typeof this.options.initialOffset?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getMeasurementOptions=i(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode,this.options.gap],(e,t,s,r,n,i,l,o)=>(void 0!==this.prevLanes&&this.prevLanes!==i&&(this.lanesChangedFlag=!0),this.prevLanes=i,this.pendingMin=null,{count:e,paddingStart:t,scrollMargin:s,getItemKey:r,enabled:n,lanes:i,laneAssignmentMode:l,gap:o}),{key:!1}),this.getMeasurements=i(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:e,paddingStart:t,scrollMargin:s,getItemKey:r,enabled:n,lanes:i,laneAssignmentMode:l,gap:o},a)=>{let d=this.itemSizeCache;if(!n)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>e)for(let t of this.laneAssignments.keys())t>=e&&this.laneAssignments.delete(t);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),0!==this.measurementsCache.length||this.lanesSettling||(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));let c=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===e&&(this.lanesSettling=!1),1===i){var h;let n,i=2*e,l=this._flatMeasurements;if(!l||l.length<i){let e=new Float64Array(i);l&&c>0&&e.set(l.subarray(0,2*c)),l=e,this._flatMeasurements=l}if(0===c)n=t+s;else{let e=c-1;n=l[2*e]+l[2*e+1]+o}for(let t=c;t<e;t++){let e=r(t),s=d.get(e),i="number"==typeof s?s:this.options.estimateSize(t);l[2*t]=n,l[2*t+1]=i,n+=i+o}let a=(h=l,new Proxy(Array(e),{get(t,s,n){if("string"==typeof s){let n=s.charCodeAt(0);if(n>=48&&n<=57){let n=+s;if(Number.isInteger(n)&&n>=0&&n<e){let e=t[n];if(!e){let s=h[2*n];e=t[n]={index:n,key:r(n),start:s,size:h[2*n+1],end:s+h[2*n+1],lane:0}}return e}}if("length"===s)return e}return Reflect.get(t,s,n)}}));return this.measurementsCache=a,a}let u=this.measurementsCache.slice(0,c),m=Array(i).fill(void 0),f=new Float64Array(i),p=0;for(let e=0;e<c;e++){let t=u[e];t&&(void 0===m[t.lane]&&p++,m[t.lane]=e,f[t.lane]=t.end)}for(let n=c;n<e;n++){let e,a,c=r(n),h=this.laneAssignments.get(n),g="estimate"===l||d.has(c);if(void 0!==h&&this.options.lanes>1){let r=m[e=h],n=void 0!==r?u[r]:void 0;a=n?n.end+o:t+s}else if(p===i){let t=0,s=f[0],r=m[0];for(let e=1;e<i;e++){let n=f[e];(n<s||n===s&&m[e]<r)&&(t=e,s=n,r=m[e])}e=t,a=s+o,g&&this.laneAssignments.set(n,e)}else e=n%this.options.lanes,a=t+s,g&&this.laneAssignments.set(n,e);let x=d.get(c),y="number"==typeof x?x:this.options.estimateSize(n),b=a+y;u[n]={index:n,start:a,size:y,end:b,key:c,lane:e},void 0===m[e]&&p++,m[e]=n,f[e]=b}return this.measurementsCache=u,u},{key:!1,debug:()=>this.options.debug}),this.calculateRange=i(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,s,r)=>0===e.length||0===t?(this.range=null,null):(this.range=function(e,t,s,r,n){let i=e.length-1;if(e.length<=r)return{startIndex:0,endIndex:i};if(1===r&&null!==n){let e=function(e,t,s){let r=0;for(;r<=t;){let n=(r+t)/2|0,i=e[2*n];if(i<s)r=n+1;else{if(!(i>s))return n;t=n-1}}return r>0?r-1:0}(n,i,s),r=e,l=s+t;for(;r<i&&n[2*r]+n[2*r+1]<l;)r++;return{startIndex:e,endIndex:r}}let l=x(0,i,t=>e[t].start,s),o=l;if(1===r)for(;o<i&&e[o].end<s+t;)o++;else if(r>1){let n=Array(r).fill(0);for(;o<i&&n.some(e=>e<s+t);){let t=e[o];n[t.lane]=t.end,o++}let a=Array(r).fill(s+t);for(;l>=0&&a.some(e=>e>=s);){let t=e[l];a[t.lane]=t.start,l--}l=Math.max(0,l-l%r),o=Math.min(i,o+(r-1-o%r))}return{startIndex:l,endIndex:o}}(e,t,s,r,1===r&&null!=this._flatMeasurements?this._flatMeasurements:null),this.range),{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=i(()=>{let e=null,t=null,s=this.calculateRange();return s&&(e=s.startIndex,t=s.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t]},(e,t,s,r,n)=>null===r||null===n?[]:e({startIndex:r,endIndex:n,overscan:t,count:s}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{let t=this.options.indexAttribute,s=e.getAttribute(t);return s?parseInt(s,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=e=>{var t;if(!this.scrollState||"smooth"!==this.scrollState.behavior)return!0;let s=this.scrollState.index??(null==(t=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))?void 0:t.index);if(void 0!==s&&this.range){let t=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),r=Math.max(0,s-t),n=Math.min(this.options.count-1,s+t);return e>=r&&e<=n}return!0},this.measureElement=e=>{if(!e)return void this.elementsCache.forEach((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))});let t=this.indexFromElement(e),s=this.options.getItemKey(t),r=this.elementsCache.get(s);r!==e&&(r&&this.observer.unobserve(r),this.observer.observe(e),this.elementsCache.set(s,e)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(t)&&this.resizeItem(t,this.options.measureElement(e,void 0,this))},this.resizeItem=(e,t)=>{var s,r;let n,i,l;if(e<0||e>=this.options.count)return;let o=this._flatMeasurements;if(1===this.options.lanes&&null!==o)l=this.options.getItemKey(e),i=o[2*e],n=o[2*e+1];else{let t=this.measurementsCache[e];if(!t)return;l=t.key,i=t.start,n=t.size}let a=this.itemSizeCache.get(l)??n,d=t-a;if(0!==d){let o="end"===this.options.anchorTo&&(null==(s=this.scrollState)?void 0:s.behavior)!=="smooth"&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,c=o?this.getTotalSize():0,h=this.getScrollOffset()+this.scrollAdjustments,u=this.itemSizeCache.has(l)?i+a<=h&&"backward"!==this.scrollDirection:i<h,m=(null==(r=this.scrollState)?void 0:r.behavior)!=="smooth"&&(void 0!==this.shouldAdjustScrollPositionOnItemSizeChange?this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[e]??{index:e,key:l,start:i,size:n,end:i+n,lane:0},d,this):u);(null===this.pendingMin||e<this.pendingMin)&&(this.pendingMin=e),this.itemSizeCache.set(l,t),this.itemSizeCacheVersion++;let f=!1;o?f=this.applyScrollAdjustment(this.getTotalSize()-c):m&&(f=this.applyScrollAdjustment(d)),this.notify(f)}},this.getVirtualItems=i(()=>[this.getVirtualIndexes(),this.getMeasurements()],(e,t)=>{let s=[];for(let r=0,n=e.length;r<n;r++){let n=t[e[r]];s.push(n)}return s},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{let t=this.getMeasurements();if(0===t.length)return;let s=this._flatMeasurements,r=1===this.options.lanes&&null!=s,n=x(0,t.length-1,r?e=>s[2*e]:e=>l(t[e]).start,e);return l(t[n])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{let e=this.scrollElement.document.documentElement;return this.options.horizontal?e.scrollWidth-this.scrollElement.innerWidth:e.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(e=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=e,this.getOffsetForAlignment=(e,t,s=0)=>{if(!this.scrollElement)return 0;let r=this.getSize(),n=this.getScrollOffset();return"auto"===t&&(t=e>=n+r?"end":"start"),"center"===t?e+=(s-r)/2:"end"===t&&(e-=r),Math.max(Math.min(this.getMaxScrollOffset(),e),0)},this.getOffsetForIndex=(e,t="auto")=>{e=Math.max(0,Math.min(e,this.options.count-1));let s=this.getSize(),r=this.getScrollOffset(),n=this.measurementsCache[e];if(!n)return;if("auto"===t)if(n.end>=r+s-this.options.scrollPaddingEnd)t="end";else{if(!(n.start<=r+this.options.scrollPaddingStart))return[r,t];t="start"}if("end"===t&&e===this.options.count-1)return[this.getMaxScrollOffset(),t];let i="end"===t?n.end+this.options.scrollPaddingEnd:n.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(i,t,n.size),t]},this.scrollToOffset=(e,{align:t="start",behavior:s="auto"}={})=>{this._iosDeferredAdjustment=0;let r=this.getOffsetForAlignment(e,t),n=this.now();this.scrollState={index:null,align:t,behavior:s,startedAt:n,lastTargetOffset:r,stableFrames:0},this._scrollToOffset(r,{adjustments:void 0,behavior:s}),this.scheduleScrollReconcile()},this.scrollToIndex=(e,{align:t="auto",behavior:s="auto"}={})=>{this._iosDeferredAdjustment=0,e=Math.max(0,Math.min(e,this.options.count-1));let r=this.getOffsetForIndex(e,t);if(!r)return;let[n,i]=r,l=this.now();this.scrollState={index:e,align:i,behavior:s,startedAt:l,lastTargetOffset:n,stableFrames:0},this._scrollToOffset(n,{adjustments:void 0,behavior:s}),this.scheduleScrollReconcile()},this.scrollBy=(e,{behavior:t="auto"}={})=>{let s=this.getScrollOffset()+e,r=this.now();this.scrollState={index:null,align:"start",behavior:t,startedAt:r,lastTargetOffset:s,stableFrames:0},this._scrollToOffset(s,{adjustments:void 0,behavior:t}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:e="auto"}={})=>{this.options.count>0?this.scrollToIndex(this.options.count-1,{align:"end",behavior:e}):this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:e})},this.getTotalSize=()=>{var e;let t,s=this.getMeasurements();if(0===s.length)t=this.options.paddingStart;else if(1===this.options.lanes){let r=s.length-1,n=this._flatMeasurements;t=null!=n?n[2*r]+n[2*r+1]:(null==(e=s[r])?void 0:e.end)??0}else{let e=Array(this.options.lanes).fill(null),r=s.length-1;for(;r>=0&&e.some(e=>null===e);){let t=s[r];null===e[t.lane]&&(e[t.lane]=t.end),r--}t=Math.max(...e.filter(e=>null!==e))}return Math.max(t-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{let e=[];if(0===this.itemSizeCache.size)return e;for(let t of this.getMeasurements())t&&this.itemSizeCache.has(t.key)&&e.push({index:t.index,key:t.key,start:t.start,size:t.size,end:t.end,lane:t.lane});return e},this._scrollToOffset=(e,{adjustments:t,behavior:s})=>{this._intendedScrollOffset=e+(t??0),this.options.scrollToFn(e,{behavior:s,adjustments:t},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(e)}applyScrollAdjustment(e,t){return 0!==e&&(o()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?(this._iosDeferredAdjustment+=e,!1):(this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=e,behavior:t}),null!==this.scrollOffset&&(this.scrollOffset+=this.scrollAdjustments,this.scrollOffset<0&&(this.scrollOffset=0),this.scrollAdjustments=0),!0))}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}null==this.rafId&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}let e=null!=this.scrollState.index?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,t=e?e[0]:this.scrollState.lastTargetOffset,s=t!==this.scrollState.lastTargetOffset;if(!s&&1.01>Math.abs(t-this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=1){this.getScrollOffset()!==t&&this._scrollToOffset(t,{adjustments:void 0,behavior:"auto"}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,s){let e=this.getSize()||600,s=Math.abs(t-this.getScrollOffset()),r="smooth"===this.scrollState.behavior&&s>e;this.scrollState.lastTargetOffset=t,r||(this.scrollState.behavior="auto"),this._scrollToOffset(t,{adjustments:void 0,behavior:r?"smooth":"auto"})}this.scheduleScrollReconcile()}}let x=(e,t,s,r)=>{for(;e<=t;){let n=(e+t)/2|0,i=s(n);if(i<r)e=n+1;else{if(!(i>r))return n;t=n-1}}return e>0?e-1:0},y="u">typeof document?r.useLayoutEffect:r.useEffect;var b=e.i(16327),v=e.i(56420);let j=(0,v.default)("wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]]);function w(e){let t=new Map,s=new Map;for(let r of e){let e=r.uuid||`${r._source}:${r.timestamp}`,n=s.get(e)??0;s.set(e,n+1),t.set(r,0===n?e:`${e}#${n}`)}return t}let S=(0,v.default)("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]),N=(0,v.default)("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]),M=(0,v.default)("cpu",[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]]),k=(0,v.default)("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]),E=(0,v.default)("message-square",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]]),T=(0,v.default)("workflow",[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]]);var I=e.i(34713);let C=r.default.memo(function({entries:e,compact:t=!1}){let n=(0,r.useMemo)(()=>(function(e){let t=0,s=0,r=0,n=0,i=0,l=new Set;for(let o of e)if("user"===o.type&&t++,"queue-operation"===o.type&&i++,"assistant"===o.type){for(let e of(s++,o.message.content))"tool_use"===e.type&&("Task"===e.name&&(e.subagentType||e.subagentId)?n++:r++);o.message.model&&l.add(o.message.model)}let o="";if(e.length>=2){let t=e[e.length-1].timestampMs-e[0].timestampMs;o=(0,I.formatDuration)(t)}return{turnCount:i,userCount:t,assistantCount:s,toolCallCount:r,subagentCount:n,duration:o,models:Array.from(l)}})(e),[e]),i=t?"w-3.5 h-3.5":"w-4 h-4",l=t?"text-xs font-medium":"text-sm font-medium",o=t?"text-[10px] text-muted-foreground":"text-xs text-muted-foreground",a=[...t?[]:[{Icon:E,color:"text-primary",v:n.turnCount,l:"Turns"}],{Icon:S,color:"text-[color:var(--chart-1)]",v:n.userCount,l:"User"},{Icon:N,color:"text-[color:var(--chart-2)]",v:n.assistantCount,l:"Assistant"},{Icon:j,color:"text-[color:var(--chart-3)]",v:n.toolCallCount,l:t?"Tools":"Tool Calls"},{Icon:T,color:"text-[color:var(--chart-5)]",v:n.subagentCount,l:"Subagents"},{Icon:k,color:"text-[color:var(--chart-4)]",v:n.duration||"—",l:"Duration"},{Icon:M,color:"text-[color:var(--chart-5)]",v:n.models.length>0?n.models.join(", "):"—",l:t?"Model":"Model(s)"}];return(0,s.jsx)("div",{className:t?"bg-muted/30 border border-border/50 rounded-lg p-3 mb-3":"bg-card border border-border rounded-lg p-4",children:(0,s.jsx)("div",{className:`grid grid-cols-2 ${t?"sm:grid-cols-6 gap-3":"sm:grid-cols-4 lg:grid-cols-7 gap-4"}`,children:a.map(({Icon:e,color:t,v:r,l:n})=>(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(e,{className:`${i} ${t}`}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:`${l} truncate max-w-[120px]`,children:r}),(0,s.jsx)("div",{className:o,children:n})]})]},n))})})}),O=(0,v.default)("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]);var A=e.i(67927);function z(e){return JSON.stringify(e.raw,null,2)}let _=new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit",hour12:!0});function D(e){let t=new Date(e),s=_.format(t),r=t.getMilliseconds().toString().padStart(3,"0");return`${s}.${r}`}let F=r.default.memo(function({entry:e,isCollapsed:t,entryCount:r,onToggle:n}){let i="function"==typeof n,l=(0,s.jsxs)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full bg-primary/10 border border-primary/20 text-primary text-xs font-medium${i?" group-hover:bg-primary/20 transition-colors":""}`,children:[i?(0,s.jsx)(A.ChevronRight,{className:`w-3 h-3 transition-transform ${t?"":"rotate-90"}`}):(0,s.jsx)(O,{className:"w-3 h-3"}),(0,s.jsx)("span",{children:e.label}),(0,s.jsx)("span",{className:"text-muted-foreground",children:D(e.timestampMs)}),i&&t&&"number"==typeof r&&(0,s.jsxs)("span",{className:"ml-1 px-1.5 py-0.5 rounded bg-primary/20 text-[10px] leading-none",children:[r," ",1===r?"entry":"entries"]})]});return i?(0,s.jsxs)("button",{type:"button",onClick:n,className:"group flex items-center gap-3 py-3 px-4 w-full cursor-pointer",children:[(0,s.jsx)("div",{className:"flex-1 h-px bg-primary/30"}),l,(0,s.jsx)("div",{className:"flex-1 h-px bg-primary/30"})]}):(0,s.jsxs)("div",{className:"flex items-center gap-3 py-3 px-4",children:[(0,s.jsx)("div",{className:"flex-1 h-px bg-primary/30"}),l,(0,s.jsx)("div",{className:"flex-1 h-px bg-primary/30"})]})});var R=e.i(47163);let $={user:"User",assistant:"Assistant","file-history-snapshot":"Snapshot",progress:"Progress",system:"System","queue-operation":"Queue"},P={user:"bg-[color:var(--chart-1)]/20 text-[color:var(--chart-1)] border-[color:var(--chart-1)]/30",assistant:"bg-[color:var(--chart-2)]/20 text-[color:var(--chart-2)] border-[color:var(--chart-2)]/30","file-history-snapshot":"bg-[color:var(--chart-3)]/20 text-[color:var(--chart-3)] border-[color:var(--chart-3)]/30",progress:"bg-[color:var(--chart-5)]/20 text-[color:var(--chart-5)] border-[color:var(--chart-5)]/30",system:"bg-[color:var(--chart-4)]/20 text-[color:var(--chart-4)] border-[color:var(--chart-4)]/30","queue-operation":"bg-primary/20 text-primary border-primary/30"},W={user:"border-l-[color:var(--chart-1)]",assistant:"border-l-[color:var(--chart-2)]","file-history-snapshot":"border-l-[color:var(--chart-3)]",progress:"border-l-[color:var(--chart-5)]",system:"border-l-[color:var(--chart-4)]","queue-operation":"border-l-primary"},L=(0,v.default)("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]),U=(0,v.default)("activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);var q=e.i(66794);function H({type:e}){let t="w-4 h-4";switch(e){case"user":return(0,s.jsx)(S,{className:t});case"assistant":return(0,s.jsx)(N,{className:t});case"file-history-snapshot":return(0,s.jsx)(L,{className:t});case"progress":return(0,s.jsx)(U,{className:t});case"system":return(0,s.jsx)(q.Settings,{className:t});case"queue-operation":return(0,s.jsx)(O,{className:t})}}function B({type:e}){return(0,s.jsxs)("span",{className:`inline-flex items-center gap-1.5 px-2 py-0.5 text-xs font-mono rounded border ${P[e]}`,children:[(0,s.jsx)(H,{type:e}),$[e]]})}var V=e.i(24380);function K({block:e}){let t=(0,r.useMemo)(()=>JSON.stringify(e.input,null,2),[e]);return(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsxs)("details",{open:!0,children:[(0,s.jsx)("summary",{className:"text-xs text-muted-foreground cursor-pointer hover:text-foreground transition-colors",children:(0,s.jsxs)("span",{className:"inline-flex items-center gap-1",children:["Input",(0,s.jsx)(V.CopyButton,{text:t})]})}),(0,s.jsx)("pre",{className:"mt-1 p-2 bg-muted/50 rounded text-xs whitespace-pre-wrap break-words max-h-64 overflow-y-auto",children:t})]}),e.result?(0,s.jsxs)("div",{className:"border-l-2 border-primary/50 pl-3 space-y-1",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"inline-block px-2 py-0.5 text-xs font-mono rounded border bg-primary/20 text-primary border-primary/30",children:"Result"}),(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:D(new Date(e.result.timestamp).getTime())})]}),e.result.content&&(0,s.jsxs)("details",{open:!0,children:[(0,s.jsx)("summary",{className:"text-xs text-muted-foreground cursor-pointer hover:text-foreground transition-colors",children:(0,s.jsxs)("span",{className:"inline-flex items-center gap-1",children:["Output",(0,s.jsx)(V.CopyButton,{text:e.result.content})]})}),(0,s.jsx)("pre",{className:"mt-1 p-2 bg-muted/50 rounded text-xs whitespace-pre-wrap break-words max-h-48 overflow-y-auto",children:e.result.content})]}),e.result.images?.map((e,t)=>(0,s.jsx)("img",{src:`data:${e.mediaType};base64,${e.base64}`,alt:`Tool result image ${t+1}`,className:"mt-2 max-w-full rounded border border-border"},t))]}):(0,s.jsx)("div",{className:"text-xs text-muted-foreground",children:"Tool did not return a result"})]})}let J=(0,v.default)("brain",[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]]),Y=r.default.memo(function({block:e,entriesBySource:t,projectName:r,sessionId:n,highlightedUuid:i,autoExpandForUuid:l}){switch(e.type){case"text":return(0,s.jsx)("p",{className:"whitespace-pre-wrap text-sm",children:e.text});case"tool_use":if("Task"===e.name&&(e.subagentType||e.subagentId)){let o=e.subagentId&&t?t.get(`agent-${e.subagentId}`):void 0;return(0,s.jsx)(es,{block:e,subagentEntries:o,projectName:r,sessionId:n,highlightedUuid:i,autoExpandForUuid:l})}return(0,s.jsxs)("div",{className:"border border-border/50 rounded-lg p-3 bg-muted/10",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,s.jsx)(j,{className:"w-4 h-4 text-primary flex-shrink-0"}),(0,s.jsx)("span",{className:"font-mono text-sm text-primary truncate min-w-0",children:e.name}),e.result&&(0,s.jsx)("span",{className:"text-xs text-muted-foreground ml-auto flex-shrink-0",children:e.result.durationFormatted})]}),(0,s.jsx)(K,{block:e})]});case"thinking":return(0,s.jsx)("div",{className:"border border-[color:var(--chart-5)]/30 rounded-lg p-3 bg-[color:var(--chart-5)]/5",children:(0,s.jsxs)("details",{children:[(0,s.jsxs)("summary",{className:"flex items-center gap-2 text-xs cursor-pointer hover:text-foreground transition-colors text-[color:var(--chart-5)]",children:[(0,s.jsx)(J,{className:"w-4 h-4"}),(0,s.jsx)("span",{children:"Thinking"}),(0,s.jsxs)("span",{className:"text-muted-foreground ml-1",children:["(",e.thinking.length.toLocaleString()," chars)"]})]}),(0,s.jsx)("p",{className:"mt-2 whitespace-pre-wrap text-xs text-muted-foreground p-2 bg-muted/30 rounded max-h-64 overflow-y-auto",children:e.thinking})]})})}});function X({entry:e}){return(0,s.jsx)("div",{children:e.message.content&&(0,s.jsx)("p",{className:"whitespace-pre-wrap text-sm",children:e.message.content})})}let Q=r.default.memo(function({entry:e,entriesBySource:t,projectName:r,sessionId:n,highlightedUuid:i,autoExpandForUuid:l}){let{content:o}=e.message;return(0,s.jsx)("div",{className:"space-y-3",children:o.map((e,o)=>(0,s.jsx)(Y,{block:e,entriesBySource:t,projectName:r,sessionId:n,highlightedUuid:i,autoExpandForUuid:l},o))})}),G=r.default.memo(function({entry:e}){let t=(0,r.useMemo)(()=>{if("progress"===e.type){let t=e.raw.data,s=t?.agentId;return[t?.type,s&&`agent:${s}`].filter(Boolean).join(" | ")}return"file-history-snapshot"===e.type?"File history snapshot":e.type},[e.type,e.raw]);return(0,s.jsxs)("div",{className:"text-sm",children:[(0,s.jsx)("span",{className:"text-muted-foreground",children:t}),(0,s.jsxs)("details",{className:"mt-1",children:[(0,s.jsx)("summary",{className:"text-xs text-muted-foreground cursor-pointer hover:text-foreground transition-colors",children:"Show raw JSON"}),(0,s.jsx)("pre",{className:"mt-1 p-2 bg-muted/50 rounded text-xs whitespace-pre-wrap break-words max-h-64 overflow-y-auto",children:z(e)})]})]})}),Z=(0,v.default)("link-2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);var ee=e.i(55574);function et({uuid:e}){let t=(0,r.useCallback)(async()=>{window.history.replaceState(null,"",`#entry-${e}`);try{await navigator.clipboard.writeText(window.location.href)}catch{let e=document.createElement("textarea");e.value=window.location.href,e.style.position="fixed",e.style.opacity="0",document.body.appendChild(e),e.select(),document.execCommand("copy"),document.body.removeChild(e)}(0,ee.toast)("Link copied")},[e]);return(0,s.jsx)("button",{onClick:t,title:"Copy link to entry",className:"inline-flex items-center justify-center rounded p-1 text-muted-foreground hover:text-foreground hover:bg-muted/80 transition-colors opacity-0 group-hover:opacity-100 transition-opacity",children:(0,s.jsx)(Z,{className:"w-3.5 h-3.5"})})}function es({block:e,subagentEntries:t,projectName:n,sessionId:i,highlightedUuid:l,autoExpandForUuid:o}){let a=!!(o&&t?.some(e=>e.uuid===o)),[d,c]=(0,r.useState)(a);(0,r.useEffect)(()=>{if(!a)return;let e=requestAnimationFrame(()=>c(!0));return()=>cancelAnimationFrame(e)},[a]);let h=(0,r.useCallback)(()=>{c(e=>!e)},[]),u=t&&t.length>0,m=(0,r.useMemo)(()=>w(t??[]),[t]);return(0,s.jsxs)("div",{className:"border border-border/50 rounded-lg p-3 bg-muted/10",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,s.jsx)(T,{className:"w-4 h-4 text-[color:var(--chart-5)]"}),(0,s.jsx)("span",{className:"font-mono text-sm text-[color:var(--chart-5)]",children:"Subagent"}),e.subagentType&&(0,s.jsx)("span",{className:"inline-flex items-center px-2 py-0.5 text-xs font-mono rounded border bg-[color:var(--chart-5)]/20 text-[color:var(--chart-5)] border-[color:var(--chart-5)]/30",children:e.subagentType}),e.result&&(0,s.jsx)("span",{className:"text-xs text-muted-foreground ml-auto",children:e.result.durationFormatted})]}),e.subagentDescription&&(0,s.jsx)("p",{className:"text-sm text-muted-foreground mb-2",children:e.subagentDescription}),e.subagentId&&t&&(0,s.jsxs)("button",{onClick:h,className:"inline-flex items-center gap-1.5 px-2.5 py-1 text-xs font-medium rounded border border-primary/30 bg-primary/10 text-primary hover:bg-primary/20 transition-colors mb-2",children:[(0,s.jsx)(A.ChevronRight,{className:(0,R.cn)("w-3 h-3 transition-transform",d&&"rotate-90")}),(0,s.jsxs)("span",{children:["agent-",e.subagentId]}),(0,s.jsx)("span",{className:"text-muted-foreground",children:d?"Collapse":"View subagent log"})]}),d&&(0,s.jsxs)("div",{className:"ml-4 pl-3 border-l-2 border-primary/30 mt-2 space-y-2",children:[t&&0===t.length&&(0,s.jsx)("div",{className:"text-xs text-muted-foreground py-2",children:"No entries found in subagent log."}),u&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(C,{entries:t,compact:!0})}),t&&t.map(e=>"queue-operation"===e.type?(0,s.jsx)(F,{entry:e},m.get(e)):(0,s.jsx)(en,{entry:e,projectName:n,sessionId:i,isHighlighted:!!l&&e.uuid===l},m.get(e)))]}),(0,s.jsx)(K,{block:e})]})}function er({entry:e,entriesBySource:t,projectName:r,sessionId:n,highlightedUuid:i,autoExpandForUuid:l}){switch(e.type){case"user":return(0,s.jsx)(X,{entry:e});case"assistant":return(0,s.jsx)(Q,{entry:e,entriesBySource:t,projectName:r,sessionId:n,highlightedUuid:i,autoExpandForUuid:l});case"file-history-snapshot":case"progress":case"system":return(0,s.jsx)(G,{entry:e})}}let en=r.default.memo(function({entry:e,entriesBySource:t,projectName:r,sessionId:n,isHighlighted:i,highlightedUuid:l,autoExpandForUuid:o}){return(0,s.jsxs)("div",{id:e.uuid?`entry-${e.uuid}`:void 0,className:(0,R.cn)(`group border-l-4 ${W[e.type]} bg-card/50 rounded-r-lg mb-2 hover:bg-muted/30 transition-colors`,i&&"entry-highlighted"),children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 px-4 py-2 border-b border-border/30",children:[(0,s.jsx)(B,{type:e.type}),(0,s.jsxs)("div",{className:"flex items-center gap-1 ml-auto",children:[e.uuid&&(0,s.jsx)(et,{uuid:e.uuid}),(0,s.jsx)(V.CopyButton,{text:function(e){switch(e.type){case"user":return e.message.content;case"assistant":return e.message.content.filter(e=>"text"===e.type).map(e=>e.text).join("\n");case"file-history-snapshot":case"progress":case"system":return z(e);case"queue-operation":return e.label}}(e)}),(0,s.jsx)("span",{className:"text-xs font-mono text-muted-foreground whitespace-nowrap",children:D(e.timestampMs)})]})]}),(0,s.jsx)("div",{className:"px-4 py-3",children:(0,s.jsx)(er,{entry:e,entriesBySource:t,projectName:r,sessionId:n,highlightedUuid:l,autoExpandForUuid:o})})]})},(e,t)=>e.entry===t.entry&&e.entriesBySource===t.entriesBySource&&e.projectName===t.projectName&&e.sessionId===t.sessionId&&e.isHighlighted===t.isHighlighted&&e.highlightedUuid===t.highlightedUuid&&e.autoExpandForUuid===t.autoExpandForUuid);var ei=e.i(66479),el=e.i(84026),eo=e.i(29407),ea=e.i(16306),ed=e.i(82954),ec=e.i(73520),eh=e.i(85881);function eu({decision:e}){return"deny"===e?(0,s.jsxs)("span",{className:"inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[0.65rem] font-semibold tracking-wide uppercase bg-red-500/10 text-red-400 border border-red-500/20",children:[(0,s.jsx)(eo.ShieldX,{className:"h-3 w-3"}),"Deny"]}):"instruct"===e?(0,s.jsxs)("span",{className:"inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[0.65rem] font-semibold tracking-wide uppercase bg-amber-500/10 text-amber-400 border border-amber-500/20",children:[(0,s.jsx)(ea.ShieldAlert,{className:"h-3 w-3"}),"Instruct"]}):(0,s.jsxs)("span",{className:"inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[0.65rem] font-semibold tracking-wide uppercase bg-emerald-500/10 text-emerald-400 border border-emerald-500/20",children:[(0,s.jsx)(el.ShieldCheck,{className:"h-3 w-3"}),"Allow"]})}function em({eventType:e}){return(0,s.jsx)("span",{className:"inline-flex items-center rounded px-1.5 py-0.5 text-[0.6rem] font-medium bg-muted text-muted-foreground border border-border/50",children:e})}function ef({mode:e}){let t="default"===e;return(0,s.jsx)("span",{className:`inline-flex items-center rounded px-1.5 py-0.5 text-[0.6rem] font-medium border ${t?"bg-sky-500/10 text-sky-400 border-sky-500/20":"bg-amber-500/10 text-amber-400 border-amber-500/20"}`,children:e})}function ep({ms:e}){return(0,s.jsx)("span",{className:`font-mono text-[0.7rem] ${e>500?"text-red-400":e>100?"text-amber-400":"text-muted-foreground"}`,children:e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`})}function eg({value:e,onChange:t}){return(0,s.jsx)("div",{className:"inline-flex items-center rounded-md border border-border bg-muted/30 p-0.5",children:[{label:"All",value:""},{label:"Allow",value:"allow"},{label:"Instruct",value:"instruct"},{label:"Deny",value:"deny"}].map(r=>(0,s.jsx)("button",{onClick:()=>t(r.value),className:`px-2.5 py-1 text-[0.65rem] font-medium rounded transition-all ${e===r.value?"deny"===r.value?"bg-red-500/15 text-red-400 shadow-sm":"allow"===r.value?"bg-emerald-500/15 text-emerald-400 shadow-sm":"instruct"===r.value?"bg-amber-500/15 text-amber-400 shadow-sm":"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"}`,children:r.label},r.value))})}function ex({item:e}){return(0,s.jsx)("tr",{children:(0,s.jsx)("td",{colSpan:9,className:"px-0 py-0",children:(0,s.jsxs)("div",{className:"px-6 py-3 bg-muted/20 border-t border-border/30 space-y-2 text-xs animate-expand",children:[(0,s.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-x-8 gap-y-1.5",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"text-muted-foreground",children:"Session ID: "}),(0,s.jsx)("span",{className:"font-mono text-foreground",children:e.sessionId??"—"}),e.sessionId&&(0,s.jsx)(V.CopyButton,{text:e.sessionId})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"text-muted-foreground",children:"CWD: "}),(0,s.jsx)("span",{className:"font-mono text-foreground",children:e.cwd??"—"}),e.cwd&&(0,s.jsx)(V.CopyButton,{text:e.cwd})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"text-muted-foreground",children:"Transcript: "}),(0,s.jsx)("span",{className:"font-mono text-foreground break-all",children:e.transcriptPath??"—"}),e.transcriptPath?.startsWith("opencode-db://")&&(0,s.jsx)("span",{className:"text-muted-foreground ml-1",children:"(stored in opencode DB)"})]})]}),e.policyNames&&e.policyNames.length>1&&(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"text-muted-foreground",children:"Policies: "}),(0,s.jsx)("span",{className:"font-mono text-foreground",children:e.policyNames.join(", ")})]}),e.reason&&(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"text-muted-foreground",children:"Full reason: "}),(0,s.jsx)("span",{className:"text-foreground",children:e.reason})]})]})})})}function ey({sessionId:e,initialData:t}){let{intervalSec:n}=(0,eh.useAutoRefresh)(),[i,l]=(0,r.useState)(!1),[o,a]=(0,r.useState)(1),[d,c]=(0,r.useState)(t),[h,u]=(0,r.useState)(null),[m,f]=(0,r.useState)(""),[p,g]=(0,r.useState)(""),[x,y]=(0,r.useState)(""),v=(0,r.useRef)(null),j=(0,r.useRef)({filterDecision:m,filterEventType:p,filterPolicy:x});j.current={filterDecision:m,filterEventType:p,filterPolicy:x};let w=""!==m||""!==p||""!==x,S=(0,r.useCallback)(async t=>{try{let{filterDecision:s,filterEventType:r,filterPolicy:n}=j.current,i=await (0,ei.searchHookActivityAction)({sessionId:e,decision:s||void 0,eventType:r||void 0,policyName:n||void 0},t);c(i)}catch{}},[e]);(0,r.useEffect)(()=>{S(o);let e=setInterval(()=>S(o),n>0?1e3*n:5e3);return()=>clearInterval(e)},[o,S,n]),(0,r.useEffect)(()=>(v.current&&clearTimeout(v.current),v.current=setTimeout(()=>{a(1),u(null),S(1)},300),()=>{v.current&&clearTimeout(v.current)}),[m,p,x]);let N=d.entries,M=d.totalPages;return(0,s.jsxs)("div",{children:[(0,s.jsxs)("button",{onClick:()=>l(e=>!e),className:"flex items-center gap-2 hover:opacity-80 transition-opacity",children:[(0,s.jsx)(b.ChevronDown,{className:`w-4 h-4 text-muted-foreground transition-transform ${i?"-rotate-90":""}`}),(0,s.jsx)("span",{className:"text-sm font-semibold text-muted-foreground uppercase tracking-wide",children:"Hook Logs"})]}),!i&&(0,s.jsxs)("div",{className:"mt-2 bg-card border border-border rounded-lg overflow-hidden shadow-sm",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3 px-4 py-2.5 border-b border-border bg-muted/20",children:[(0,s.jsx)(eg,{value:m,onChange:f}),(0,s.jsxs)("select",{value:p,onChange:e=>g(e.target.value),className:"h-7 rounded-md border border-border bg-background px-2 text-xs text-foreground focus:outline-none focus:ring-2 focus:ring-primary/40 focus:border-primary/40 transition-shadow",children:[(0,s.jsx)("option",{value:"",children:"All Events"}),(0,s.jsx)("option",{value:"PreToolUse",children:"PreToolUse"}),(0,s.jsx)("option",{value:"PostToolUse",children:"PostToolUse"}),(0,s.jsx)("option",{value:"SessionStart",children:"SessionStart"}),(0,s.jsx)("option",{value:"SessionEnd",children:"SessionEnd"}),(0,s.jsx)("option",{value:"UserPromptSubmit",children:"UserPromptSubmit"}),(0,s.jsx)("option",{value:"PermissionRequest",children:"PermissionRequest"})]}),(0,s.jsx)("div",{className:"relative",children:(0,s.jsx)("input",{type:"text",value:x,onChange:e=>y(e.target.value),placeholder:"Filter by policy…",className:"h-7 rounded-md border border-border bg-background px-2.5 text-xs text-foreground placeholder:text-muted-foreground w-44 focus:outline-none focus:ring-2 focus:ring-primary/40 focus:border-primary/40 transition-shadow"})})]}),0===N.length?(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 px-4",children:[(0,s.jsx)(ed.Shield,{className:"h-10 w-10 text-muted-foreground/30"}),(0,s.jsx)("p",{className:"text-sm text-muted-foreground mt-3",children:w?"No matching hook events.":"No hook events found."})]}):(0,s.jsx)("div",{className:"overflow-x-auto",children:(0,s.jsxs)("table",{className:"w-full text-xs",children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{className:"text-left text-muted-foreground border-b border-border bg-muted/30",children:[(0,s.jsx)("th",{className:"px-4 py-2.5 font-medium w-6"}),(0,s.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Decision"}),(0,s.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Event"}),(0,s.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Tool"}),(0,s.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Policy"}),(0,s.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Reason"}),(0,s.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Duration"}),(0,s.jsx)("th",{className:"px-3 py-2.5 font-medium",children:"Mode"}),(0,s.jsx)("th",{className:"px-3 py-2.5 font-medium text-right",children:"Time"})]})}),(0,s.jsx)("tbody",{className:"divide-y divide-border/30",children:N.map((e,t)=>{let n="deny"===e.decision,i=h===t,l="instruct"===e.decision;return(0,s.jsxs)(r.default.Fragment,{children:[(0,s.jsxs)("tr",{onClick:()=>{u(e=>e===t?null:t)},className:`cursor-pointer transition-colors ${n?"bg-red-500/[0.03] hover:bg-red-500/[0.07] border-l-2 border-l-red-500/40":l?"bg-amber-500/[0.03] hover:bg-amber-500/[0.07] border-l-2 border-l-amber-500/40":t%2==0?"hover:bg-muted/30":"bg-muted/[0.04] hover:bg-muted/30"} ${i?"bg-muted/20":""}`,children:[(0,s.jsx)("td",{className:"px-4 py-2",children:(0,s.jsx)(b.ChevronDown,{className:`h-3.5 w-3.5 text-muted-foreground transition-transform duration-150 ${i?"rotate-0":"-rotate-90"}`})}),(0,s.jsx)("td",{className:"px-3 py-2",children:(0,s.jsx)(eu,{decision:e.decision})}),(0,s.jsx)("td",{className:"px-3 py-2",children:(0,s.jsx)(em,{eventType:e.eventType})}),(0,s.jsx)("td",{className:"px-3 py-2 font-mono text-foreground",children:e.toolName??"—"}),(0,s.jsx)("td",{className:"px-3 py-2 font-mono text-foreground",children:e.policyNames&&e.policyNames.length>1?(0,s.jsxs)("span",{title:e.policyNames.join(", "),children:[e.policyNames[0],(0,s.jsxs)("span",{className:"text-muted-foreground text-[0.6rem]",children:[" +",e.policyNames.length-1]})]}):e.policyName??"—"}),(0,s.jsx)("td",{className:"px-3 py-2 text-muted-foreground truncate max-w-[240px]",title:e.reason??"",children:e.reason??"—"}),(0,s.jsx)("td",{className:"px-3 py-2",children:(0,s.jsx)(ep,{ms:e.durationMs})}),(0,s.jsx)("td",{className:"px-3 py-2",children:e.permissionMode?(0,s.jsx)(ef,{mode:e.permissionMode}):"—"}),(0,s.jsx)("td",{className:"px-3 py-2 text-right text-muted-foreground whitespace-nowrap",title:new Date(e.timestamp).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}),children:(0,I.formatRelativeTime)(e.timestamp)})]}),i&&(0,s.jsx)(ex,{item:e})]},`${e.timestamp}-${t}`)})})]})}),(0,s.jsx)(ec.default,{currentPage:o,totalPages:M,onPageChange:e=>{a(e),u(null)}})]})]})}function eb(e){let t=new Map;for(let s of e)if("assistant"===s.type)for(let e of s.message.content){if("tool_use"!==e.type||"Task"===e.name&&(e.subagentType||e.subagentId))continue;let s=t.get(e.name)||{count:0,totalDurationMs:0};s.count++,e.result?.durationMs&&(s.totalDurationMs+=e.result.durationMs),t.set(e.name,s)}return Array.from(t.entries()).map(([e,t])=>({name:e,...t})).sort((e,t)=>t.count-e.count)}function ev({tools:e,compact:t}){return(0,s.jsx)("div",{className:`bg-card border border-border rounded-lg ${t?"p-3":"p-4"}`,children:(0,s.jsx)("div",{className:`grid grid-cols-[repeat(auto-fit,minmax(200px,1fr))] ${t?"gap-2":"gap-3"}`,children:e.map(e=>(0,s.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,s.jsx)(j,{className:"w-3.5 h-3.5 text-muted-foreground flex-shrink-0"}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)("div",{className:`${t?"text-xs":"text-sm"} font-mono font-medium truncate`,children:e.name}),(0,s.jsxs)("div",{className:"text-xs text-muted-foreground truncate",children:[e.count," call",1!==e.count?"s":"",e.totalDurationMs>0&&` \xb7 ${(e.totalDurationMs/1e3).toFixed(1)}s`]})]})]},e.name))})})}function ej(e,t){return t.get(e)??`${e.uuid}-${e.timestampMs}`}function ew(){let e=window.location.hash;return e.startsWith("#entry-")?e.slice(7):null}function eS({entries:e,entriesBySource:t,projectName:i,sessionId:l}){let o=(0,r.useMemo)(()=>Array.from(t.values()).flat(),[t]),[a,d]=(0,r.useState)(new Set),[c,u]=(0,r.useState)(0),[f,x]=(0,r.useState)(()=>ew()),b=(0,r.useRef)(void 0),v=(0,r.useRef)(!1),j=(0,r.useRef)(null);(0,r.useLayoutEffect)(()=>{let e=j.current;if(!e)return;let t=()=>{let t=e.getBoundingClientRect().top+window.scrollY;u(e=>e===t?e:t)};t();let s=new ResizeObserver(t);return s.observe(document.body),window.addEventListener("resize",t),()=>{s.disconnect(),window.removeEventListener("resize",t)}},[]);let S=(0,r.useMemo)(()=>w(e),[e]),N=(0,r.useMemo)(()=>(function(e,t){let s=new Map,r=null,n=0;for(let i of e)"queue-operation"===i.type?(null!==r&&s.set(r,n),r=ej(i,t),n=0):null!==r&&n++;return null!==r&&s.set(r,n),s})(e,S),[e,S]),M=(0,r.useMemo)(()=>{let t;return t=!1,e.filter(e=>"queue-operation"===e.type?(t=a.has(ej(e,S)),!0):!t)},[e,a,S]),k=(0,r.useMemo)(()=>{let e=new Map;return M.forEach((t,s)=>{t.uuid&&e.set(t.uuid,s)}),e},[M]),E=(0,r.useMemo)(()=>(function(e){let t=new Map;for(let s of e)if("assistant"===s.type&&s.uuid)for(let e of s.message.content)"tool_use"===e.type&&"Task"===e.name&&e.subagentId&&t.set(e.subagentId,s.uuid);let s=new Map;for(let r of e){if(!r._source?.startsWith("agent-")||!r.uuid)continue;let e=r._source.slice(6),n=t.get(e);n&&s.set(r.uuid,n)}return s})(o),[o]),T=(0,r.useMemo)(()=>f&&E.has(f)?f:null,[f,E]),I=T?E.get(T)??null:null;(0,r.useEffect)(()=>{if(f)return b.current=setTimeout(()=>x(null),4e3),()=>{b.current&&clearTimeout(b.current)}},[]),(0,r.useEffect)(()=>{let e=()=>{let e=ew();x(e),v.current=!1,b.current&&clearTimeout(b.current),e&&(b.current=setTimeout(()=>x(null),4e3))};return window.addEventListener("hashchange",e),()=>window.removeEventListener("hashchange",e)},[]);let C=(0,r.useMemo)(()=>{if(!f)return null;let t=I??f,s=e.some(e=>e.uuid===t),r=k.has(t);if(s&&!r){let s=null;for(let r of e)if("queue-operation"===r.type)s=ej(r,S);else if(r.uuid===t&&s)return s}return null},[f,I,e,k,S]);(0,r.useEffect)(()=>{if(!C)return;let e=requestAnimationFrame(()=>{d(e=>{if(!e.has(C))return e;let t=new Set(e);return t.delete(C),t})});return()=>cancelAnimationFrame(e)},[C]);let O=(0,r.useCallback)(e=>{d(t=>{let s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s})},[]),A=(0,r.useCallback)(e=>S.get(M[e])??e,[S,M]),z=function({useFlushSync:e=!0,directDomUpdates:t=!1,directDomUpdatesMode:s="transform",...i}){let l=r.useReducer(e=>e+1,0)[1],o=r.useRef({enabled:t,mode:s,container:null,lastSize:null,lastPositions:new WeakMap,prevRange:null});o.current.enabled=t,o.current.mode=s;let a=e=>{let t=o.current;if(!t.enabled||!t.container)return;let s=e.getTotalSize();if(s!==t.lastSize){t.lastSize=s;let r=e.options.horizontal?"width":"height";t.container.style[r]=`${s}px`}},d=e=>{let t=o.current;if(!t.enabled||!t.container)return;a(e);let s=!!e.options.horizontal,r="transform"===t.mode,n=s?"left":"top",i=e.options.scrollMargin;for(let l of e.getVirtualItems()){let o=l.start-i,a=e.elementsCache.get(l.key);a&&t.lastPositions.get(a)!==o&&(t.lastPositions.set(a,o),r?a.style.transform=s?`translate3d(${o}px, 0, 0)`:`translate3d(0, ${o}px, 0)`:a.style[n]=`${o}px`)}},c={...i,onChange:(t,s)=>{var r;let a=o.current,c=!0;if(a.enabled){d(t);let e=t.range,s=a.prevRange;(c=!s||s.isScrolling!==t.isScrolling||s.startIndex!==(null==e?void 0:e.startIndex)||s.endIndex!==(null==e?void 0:e.endIndex))&&(a.prevRange=e?{startIndex:e.startIndex,endIndex:e.endIndex,isScrolling:t.isScrolling}:null)}c&&(e&&s?(0,n.flushSync)(l):l()),null==(r=i.onChange)||r.call(i,t,s)}},[h]=r.useState(()=>{let e=new g(c);return Object.assign(e,{containerRef:t=>{let s=o.current;if(s.container=t,s.lastSize=null,t&&s.enabled){let r=e.getTotalSize();s.lastSize=r;let n=e.options.horizontal?"width":"height";t.style[n]=`${r}px`}}})});return h.setOptions(c),y(()=>h._didMount(),[]),y(()=>(a(h),h._willUpdate())),y(()=>{d(h)}),h}({getScrollElement:()=>"u">typeof document?window:null,observeElementRect:h,observeElementOffset:m,scrollToFn:p,initialOffset:()=>"u">typeof document?window.scrollY:0,...{count:M.length,estimateSize:e=>(function(e){switch(e.type){case"queue-operation":return 48;case"user":return 90;case"assistant":return 80+120*e.message.content.length;default:return 100}})(M[e]),getItemKey:A,overscan:5,scrollMargin:c}});return(0,r.useEffect)(()=>{if(!f||v.current)return;let e=I??f,t=k.get(e);null!=t&&(v.current=!0,requestAnimationFrame(()=>{z.scrollToIndex(t,{align:"center"})}))},[f,I,k,z]),(0,s.jsx)("div",{ref:j,children:(0,s.jsx)("div",{style:{height:`${z.getTotalSize()}px`,width:"100%",position:"relative"},children:z.getVirtualItems().map(e=>{let r=M[e.index],n=!!f&&r.uuid===(I??f);return(0,s.jsx)("div",{"data-index":e.index,ref:z.measureElement,style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${e.start-z.options.scrollMargin}px)`},children:"queue-operation"===r.type?(0,s.jsx)(F,{entry:r,isCollapsed:a.has(ej(r,S)),entryCount:N.get(ej(r,S))??0,onToggle:()=>O(ej(r,S))}):(0,s.jsx)(en,{entry:r,entriesBySource:t,projectName:i,sessionId:l,isHighlighted:!T&&n,highlightedUuid:T,autoExpandForUuid:T})},e.key)})})})}let eN=[];e.s([],76248),e.i(76248),e.s(["default",0,function({entries:e,projectName:t,sessionId:n}){let i=(0,r.useMemo)(()=>{let t=new Map;for(let s of e){let e=t.get(s._source);e?e.push(s):t.set(s._source,[s])}return t},[e]),l=i.get("session")??eN,o=(0,r.useMemo)(()=>(function(e){let t=new Map;for(let s of e)if("assistant"===s.type)for(let e of s.message.content)"tool_use"===e.type&&"Task"===e.name&&e.subagentId&&(t.has(e.subagentId)||t.set(e.subagentId,{id:e.subagentId,type:e.subagentType||"unknown",description:e.subagentDescription||""}));return Array.from(t.values())})(e),[e]),a=(0,r.useMemo)(()=>eb(l),[l]),[d,c]=(0,r.useState)(!1),[h,u]=(0,r.useState)(new Set),[m,f]=(0,r.useState)(!1),[p,g]=(0,r.useState)(null);(0,r.useEffect)(()=>{(0,ei.searchHookActivityAction)({sessionId:n},1).then(e=>{e.entries.length>0&&g(e)}).catch(()=>{})},[n]),(0,r.useEffect)(()=>{let e=()=>{window.location.hash.startsWith("#entry-")&&f(!1)};return window.addEventListener("hashchange",e),()=>window.removeEventListener("hashchange",e)},[]);let x=(0,r.useCallback)(e=>{u(t=>{let s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s})},[]);return(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsx)(C,{entries:l}),p&&(0,s.jsx)(ey,{sessionId:n,initialData:p},n),o.length>0&&(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsxs)("button",{onClick:()=>c(e=>!e),className:"flex items-center gap-2 hover:opacity-80 transition-opacity",children:[(0,s.jsx)(b.ChevronDown,{className:`w-4 h-4 text-muted-foreground transition-transform ${d?"-rotate-90":""}`}),(0,s.jsx)("span",{className:"text-sm font-semibold text-muted-foreground uppercase tracking-wide",children:"Subagents"}),(0,s.jsxs)("span",{className:"text-xs text-muted-foreground",children:["(",o.length,")"]})]}),!d&&o.map(e=>{let t;return(0,s.jsxs)("div",{className:"pl-3 border-l-2 border-primary/30 space-y-2",children:[(0,s.jsxs)("button",{onClick:()=>x(e.id),className:"flex items-center gap-2 hover:opacity-80 transition-opacity",children:[(0,s.jsx)(b.ChevronDown,{className:`w-3.5 h-3.5 text-muted-foreground transition-transform ${h.has(e.id)?"-rotate-90":""}`}),(0,s.jsx)("span",{className:"text-sm font-bold",children:e.type}),e.description&&(0,s.jsx)("span",{className:"text-xs text-muted-foreground truncate max-w-[400px]",children:e.description})]}),!h.has(e.id)&&(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(C,{entries:i.get(`agent-${e.id}`)||[],compact:!0}),(t=eb(i.get(`agent-${e.id}`)||[])).length>0?(0,s.jsx)(ev,{tools:t,compact:!0}):null]})]},e.id)})]}),a.length>0&&(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"text-sm font-semibold text-muted-foreground uppercase tracking-wide",children:"Tools"}),(0,s.jsxs)("span",{className:"text-xs text-muted-foreground",children:["(",a.reduce((e,t)=>e+t.count,0),")"]})]}),(0,s.jsx)(ev,{tools:a})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("button",{onClick:()=>f(e=>!e),className:"flex items-center gap-2 hover:opacity-80 transition-opacity",children:[(0,s.jsx)(b.ChevronDown,{className:`w-4 h-4 text-muted-foreground transition-transform ${m?"-rotate-90":""}`}),(0,s.jsx)("span",{className:"text-sm font-semibold text-muted-foreground uppercase tracking-wide",children:"Logs"})]}),!m&&(0,s.jsx)("div",{className:"mt-2 bg-card border border-border rounded-lg p-4 shadow-sm",children:0===l.length?(0,s.jsx)("p",{className:"text-muted-foreground text-center py-8",children:"No entries found."}):(0,s.jsx)(eS,{entries:l,entriesBySource:i,projectName:t,sessionId:n})})]})]})}],36406)},5780,function(e){e.n(e.i(36406))}]);
|