@geminilight/mindos 0.6.40 → 0.6.41
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/_standalone/.mindos-build-version +1 -1
- package/_standalone/.next/BUILD_ID +1 -1
- package/_standalone/.next/app-path-routes-manifest.json +18 -18
- package/_standalone/.next/build-manifest.json +3 -3
- package/_standalone/.next/cache/.previewinfo +1 -1
- package/_standalone/.next/cache/.rscinfo +1 -1
- package/_standalone/.next/cache/config.json +3 -3
- package/_standalone/.next/prerender-manifest.json +3 -3
- package/_standalone/.next/react-loadable-manifest.json +5 -1
- package/_standalone/.next/server/app/.well-known/agent-card.json/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/_global-error.html +2 -2
- package/_standalone/.next/server/app/_global-error.rsc +1 -1
- package/_standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/_standalone/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/_standalone/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/_standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/_standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/_standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/_standalone/.next/server/app/_not-found/page.js +1 -1
- package/_standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/_standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/agents/[agentKey]/page.js +1 -1
- package/_standalone/.next/server/app/agents/[agentKey]/page.js.nft.json +1 -1
- package/_standalone/.next/server/app/agents/[agentKey]/page_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/agents/page.js +2 -2
- package/_standalone/.next/server/app/agents/page.js.nft.json +1 -1
- package/_standalone/.next/server/app/agents/page_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/a2a/agents/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/a2a/delegations/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/a2a/discover/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/a2a/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/acp/config/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/acp/detect/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/acp/install/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/acp/registry/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/acp/session/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/agent-activity/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/ask/route.js +1 -1
- package/_standalone/.next/server/app/api/ask/route.js.nft.json +1 -1
- package/_standalone/.next/server/app/api/ask/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/ask-sessions/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/auth/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/backlinks/route.js.nft.json +1 -1
- package/_standalone/.next/server/app/api/backlinks/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/bootstrap/route.js.nft.json +1 -1
- package/_standalone/.next/server/app/api/bootstrap/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/changes/route.js.nft.json +1 -1
- package/_standalone/.next/server/app/api/changes/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/export/route.js.nft.json +1 -1
- package/_standalone/.next/server/app/api/export/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/extract-pdf/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/file/import/route.js.nft.json +1 -1
- package/_standalone/.next/server/app/api/file/import/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/file/route.js.nft.json +1 -1
- package/_standalone/.next/server/app/api/file/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/files/route.js.nft.json +1 -1
- package/_standalone/.next/server/app/api/files/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/git/route.js.nft.json +1 -1
- package/_standalone/.next/server/app/api/git/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/graph/route.js.nft.json +1 -1
- package/_standalone/.next/server/app/api/graph/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/health/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/inbox/route.js.nft.json +1 -1
- package/_standalone/.next/server/app/api/inbox/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/init/route.js.nft.json +1 -1
- package/_standalone/.next/server/app/api/init/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/mcp/agents/route.js.nft.json +1 -1
- package/_standalone/.next/server/app/api/mcp/agents/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/mcp/install/route.js +1 -1
- package/_standalone/.next/server/app/api/mcp/install/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/mcp/install-skill/route.js.nft.json +1 -1
- package/_standalone/.next/server/app/api/mcp/install-skill/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/mcp/restart/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/mcp/status/route.js +1 -1
- package/_standalone/.next/server/app/api/mcp/status/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/monitoring/route.js.nft.json +1 -1
- package/_standalone/.next/server/app/api/monitoring/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/recent-files/route.js.nft.json +1 -1
- package/_standalone/.next/server/app/api/recent-files/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/restart/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/search/route.js.nft.json +1 -1
- package/_standalone/.next/server/app/api/search/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/settings/list-models/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/settings/reset-token/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/settings/route.js.nft.json +1 -1
- package/_standalone/.next/server/app/api/settings/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/settings/test-key/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/setup/check-path/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/setup/check-port/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/setup/generate-token/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/setup/ls/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/setup/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/skills/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/sync/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/tree-version/route.js.nft.json +1 -1
- package/_standalone/.next/server/app/api/tree-version/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/uninstall/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/update/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/update-check/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/update-status/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/workflows/route.js.nft.json +1 -1
- package/_standalone/.next/server/app/api/workflows/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/changes/page.js +1 -1
- package/_standalone/.next/server/app/changes/page.js.nft.json +1 -1
- package/_standalone/.next/server/app/changes/page_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/echo/[segment]/page.js +1 -1
- package/_standalone/.next/server/app/echo/[segment]/page.js.nft.json +1 -1
- package/_standalone/.next/server/app/echo/[segment]/page_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/echo/page.js +1 -1
- package/_standalone/.next/server/app/echo/page.js.nft.json +1 -1
- package/_standalone/.next/server/app/echo/page_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/explore/page.js +1 -1
- package/_standalone/.next/server/app/explore/page.js.nft.json +1 -1
- package/_standalone/.next/server/app/explore/page_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/help/page.js +2 -2
- package/_standalone/.next/server/app/help/page.js.nft.json +1 -1
- package/_standalone/.next/server/app/help/page_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/login/page.js +1 -1
- package/_standalone/.next/server/app/login/page.js.nft.json +1 -1
- package/_standalone/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/page.js +2 -2
- package/_standalone/.next/server/app/page.js.nft.json +1 -1
- package/_standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/setup/page.js +2 -2
- package/_standalone/.next/server/app/setup/page.js.nft.json +1 -1
- package/_standalone/.next/server/app/setup/page_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/trash/page.js +3 -3
- package/_standalone/.next/server/app/trash/page.js.nft.json +1 -1
- package/_standalone/.next/server/app/trash/page_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/view/[...path]/page.js +3 -3
- package/_standalone/.next/server/app/view/[...path]/page.js.nft.json +1 -1
- package/_standalone/.next/server/app/view/[...path]/page_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app-paths-manifest.json +18 -18
- package/_standalone/.next/server/chunks/1550.js +1 -1
- package/_standalone/.next/server/chunks/2190.js +11 -0
- package/_standalone/.next/server/chunks/{6365.js → 2536.js} +2 -2
- package/_standalone/.next/server/chunks/5648.js +2 -0
- package/_standalone/.next/server/chunks/8388.js +1 -1
- package/_standalone/.next/server/chunks/953.js +1 -1
- package/_standalone/.next/server/chunks/9539.js +219 -0
- package/_standalone/.next/server/middleware-build-manifest.js +1 -1
- package/_standalone/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/_standalone/.next/server/next-font-manifest.js +1 -1
- package/_standalone/.next/server/next-font-manifest.json +1 -1
- package/_standalone/.next/server/pages/500.html +2 -2
- package/_standalone/.next/server/server-reference-manifest.js +1 -1
- package/_standalone/.next/server/server-reference-manifest.json +1 -1
- package/_standalone/.next/static/chunks/1053-b70535785cc5aaee.js +29 -0
- package/_standalone/.next/static/chunks/{8663-de911d2d395622be.js → 1880-c2a9e76201841c86.js} +1 -1
- package/_standalone/.next/static/chunks/3637.0541ac2d0ea7de1f.js +1 -0
- package/_standalone/.next/static/chunks/4563-b2a2ce80aff845af.js +6 -0
- package/_standalone/.next/static/chunks/6981-3d7dcac2d12a5670.js +1 -0
- package/_standalone/.next/static/chunks/7144-5febf62f1a79fe64.js +1 -0
- package/_standalone/.next/static/chunks/app/agents/[agentKey]/page-773071a99c4daac2.js +1 -0
- package/_standalone/.next/static/chunks/app/agents/page-6102a884b2cb3cfe.js +5 -0
- package/_standalone/.next/static/chunks/app/help/page-2325d25b6846ca07.js +1 -0
- package/_standalone/.next/static/chunks/app/{layout-9378c1c8d3e5761b.js → layout-42cdbce19f404567.js} +34 -34
- package/_standalone/.next/static/chunks/app/{page-9bae420fbbdc5fff.js → page-8c9643b649e01735.js} +1 -1
- package/_standalone/.next/static/chunks/app/setup/page-d158b8cb533feb1e.js +1 -0
- package/_standalone/.next/static/chunks/app/trash/{page-b61ef2d5cd4f8d73.js → page-e9ab74ffeb96af41.js} +1 -1
- package/_standalone/.next/static/chunks/app/view/[...path]/page-764a69a1c8bd4eef.js +12 -0
- package/_standalone/.next/static/chunks/{webpack-c28c55d0a6021a6b.js → webpack-7b276daaa930d480.js} +1 -1
- package/_standalone/.next/static/css/bc9179074eaf65ae.css +1 -0
- package/_standalone/.next/trace +63 -63
- package/_standalone/__tests__/api/mcp-install.test.ts +23 -0
- package/_standalone/__tests__/cli/agent-routing.test.ts +232 -0
- package/_standalone/__tests__/cli/file-subcommands.test.ts +379 -0
- package/_standalone/__tests__/core/tools.test.ts +3 -6
- package/_standalone/components/FileTree.tsx +3 -2
- package/_standalone/components/MarkdownView.tsx +30 -15
- package/_standalone/components/RightAskPanel.tsx +36 -6
- package/_standalone/components/Sidebar.tsx +3 -3
- package/_standalone/components/agents/AgentsMcpSection.tsx +3 -0
- package/_standalone/components/settings/McpAgentInstall.tsx +94 -27
- package/_standalone/components/settings/McpSkillsSection.tsx +1 -1
- package/_standalone/components/settings/McpTab.tsx +484 -340
- package/_standalone/components/settings/SettingsContent.tsx +12 -6
- package/_standalone/components/settings/types.ts +3 -0
- package/_standalone/components/setup/StepAgents.tsx +113 -47
- package/_standalone/components/setup/StepReview.tsx +14 -27
- package/_standalone/components/setup/types.ts +6 -0
- package/_standalone/data/skills/mindos/SKILL.md +92 -92
- package/_standalone/data/skills/mindos/references/write-supplement.md +119 -0
- package/_standalone/data/skills/mindos-zh/SKILL.md +100 -104
- package/_standalone/data/skills/mindos-zh/references/write-supplement.md +119 -0
- package/_standalone/lib/i18n/modules/features.ts +4 -4
- package/_standalone/lib/i18n/modules/knowledge.ts +4 -0
- package/_standalone/lib/i18n/modules/onboarding.ts +40 -30
- package/_standalone/lib/i18n/modules/settings.ts +78 -6
- package/_standalone/lib/mcp-snippets.ts +5 -1
- package/_standalone/tsconfig.tsbuildinfo +1 -1
- package/app/app/api/ask/route.ts +3 -2
- package/app/app/api/mcp/install/route.ts +2 -1
- package/app/app/api/mcp/status/route.ts +14 -6
- package/app/app/view/[...path]/ViewPageClient.tsx +12 -27
- package/app/components/FileTree.tsx +3 -2
- package/app/components/MarkdownView.tsx +30 -15
- package/app/components/RightAskPanel.tsx +36 -6
- package/app/components/Sidebar.tsx +3 -3
- package/app/components/agents/AgentsMcpSection.tsx +3 -0
- package/app/components/help/HelpContent.tsx +1 -0
- package/app/components/settings/McpAgentInstall.tsx +94 -27
- package/app/components/settings/McpSkillsSection.tsx +1 -1
- package/app/components/settings/McpTab.tsx +484 -340
- package/app/components/settings/SettingsContent.tsx +12 -6
- package/app/components/settings/types.ts +3 -0
- package/app/components/setup/StepAgents.tsx +113 -47
- package/app/components/setup/StepReview.tsx +14 -27
- package/app/components/setup/index.tsx +12 -11
- package/app/components/setup/types.ts +6 -0
- package/app/data/skills/mindos/SKILL.md +92 -92
- package/app/data/skills/mindos/references/write-supplement.md +119 -0
- package/app/data/skills/mindos-zh/SKILL.md +100 -104
- package/app/data/skills/mindos-zh/references/write-supplement.md +119 -0
- package/app/lib/fs.ts +0 -6
- package/app/lib/i18n/modules/features.ts +4 -4
- package/app/lib/i18n/modules/knowledge.ts +4 -0
- package/app/lib/i18n/modules/onboarding.ts +40 -30
- package/app/lib/i18n/modules/settings.ts +78 -6
- package/app/lib/mcp-agents.ts +1 -2
- package/app/lib/mcp-snippets.ts +5 -1
- package/app/lib/renderers/index.ts +2 -1
- package/bin/cli.js +168 -1404
- package/bin/commands/agent.js +156 -20
- package/bin/commands/api.js +14 -11
- package/bin/commands/ask.js +79 -68
- package/bin/commands/build.js +26 -0
- package/bin/commands/config.js +170 -0
- package/bin/commands/dev.js +58 -0
- package/bin/commands/doctor.js +205 -0
- package/bin/commands/file.js +551 -36
- package/bin/commands/gateway.js +42 -0
- package/bin/commands/init-skills.js +56 -0
- package/bin/commands/logs.js +32 -0
- package/bin/commands/mcp-cmd.js +57 -0
- package/bin/commands/onboard.js +25 -0
- package/bin/commands/open.js +41 -0
- package/bin/commands/restart.js +48 -0
- package/bin/commands/search.js +16 -14
- package/bin/commands/space.js +96 -25
- package/bin/commands/start.js +262 -0
- package/bin/commands/status.js +2 -2
- package/bin/commands/stop.js +14 -0
- package/bin/commands/sync-cmd.js +134 -0
- package/bin/commands/token.js +98 -0
- package/bin/commands/uninstall.js +154 -0
- package/bin/commands/update.js +286 -0
- package/bin/lib/build.js +1 -1
- package/bin/lib/colors.js +8 -7
- package/bin/lib/command.js +37 -96
- package/bin/lib/config.js +5 -0
- package/bin/lib/csv.js +19 -0
- package/bin/lib/jsonc.js +12 -0
- package/bin/lib/markdown.js +69 -0
- package/bin/lib/mcp-agents.js +1 -6
- package/bin/lib/mcp-build.js +1 -1
- package/bin/lib/mcp-install.js +2 -1
- package/bin/lib/one-shot.js +88 -0
- package/bin/lib/path-expand.js +9 -0
- package/bin/lib/remote.js +65 -0
- package/bin/lib/repl.js +167 -0
- package/bin/lib/{utils.js → shell.js} +10 -26
- package/bin/lib/skill-check.js +1 -1
- package/bin/lib/sse-stream.js +167 -0
- package/package.json +2 -2
- package/scripts/setup.js +182 -120
- package/skills/mindos/SKILL.md +92 -92
- package/skills/mindos-zh/SKILL.md +100 -104
- package/_standalone/.next/server/chunks/1955.js +0 -11
- package/_standalone/.next/server/chunks/3680.js +0 -1
- package/_standalone/.next/server/chunks/4497.js +0 -219
- package/_standalone/.next/server/chunks/5560.js +0 -2
- package/_standalone/.next/static/chunks/1053-0adaccc98a752a58.js +0 -29
- package/_standalone/.next/static/chunks/3637.f9a42cca59fd5bb5.js +0 -1
- package/_standalone/.next/static/chunks/4563-c2afaeacb241d1d0.js +0 -6
- package/_standalone/.next/static/chunks/6090-c98268ca726a68d3.js +0 -1
- package/_standalone/.next/static/chunks/9371-575600301da5d6bb.js +0 -1
- package/_standalone/.next/static/chunks/app/agents/[agentKey]/page-3e08abb495ecd5fd.js +0 -1
- package/_standalone/.next/static/chunks/app/agents/page-e7e0f87ad3d765ac.js +0 -5
- package/_standalone/.next/static/chunks/app/help/page-3d0e1ceaa4abc243.js +0 -1
- package/_standalone/.next/static/chunks/app/setup/page-99ed3d1bb6b8f4ef.js +0 -1
- package/_standalone/.next/static/chunks/app/view/[...path]/page-44fa78cbea613a78.js +0 -12
- package/_standalone/.next/static/css/d300701f384db50d.css +0 -1
- package/_standalone/components/renderers/agent-inspector/manifest.ts +0 -16
- /package/_standalone/.next/static/{rZLs1krFuduixvcVNe6q3 → Ij3PFh-a0zi5K_ANoSAW0}/_buildManifest.js +0 -0
- /package/_standalone/.next/static/{rZLs1krFuduixvcVNe6q3 → Ij3PFh-a0zi5K_ANoSAW0}/_ssgManifest.js +0 -0
|
@@ -12,4 +12,4 @@ ${b}`))}function M(){let a=new AbortController;return a.abort(Object.definePrope
|
|
|
12
12
|
Read more: https://nextjs.org/docs/messages/middleware-request-page
|
|
13
13
|
`)}}class g extends Error{constructor(){super(`The request.ua has been removed in favour of \`userAgent\` function.
|
|
14
14
|
Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent
|
|
15
|
-
`)}}},79364:(a,b,c)=>{"use strict";function d(a){if(!a||"object"!=typeof a||Array.isArray(a))return;let b={},c=!1;for(let[d,e]of Object.entries(a)){if(!e||"object"!=typeof e||Array.isArray(e))continue;let a={};if("string"==typeof e.command&&e.command.trim()&&(a.command=e.command.trim()),Array.isArray(e.args)&&(a.args=e.args.filter(a=>"string"==typeof a)),e.env&&"object"==typeof e.env&&!Array.isArray(e.env)){let b={};for(let[a,c]of Object.entries(e.env))"string"==typeof c&&(b[a]=c);Object.keys(b).length>0&&(a.env=b)}"boolean"==typeof e.enabled&&(a.enabled=e.enabled),Object.keys(a).length>0&&(b[d]=a,c=!0)}return c?b:void 0}c.d(b,{gG:()=>d})},90307:(a,b,c)=>{"use strict";c(29021),c(33873)},96482:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"pathHasPrefix",{enumerable:!0,get:function(){return e}});let d=c(23692);function e(a,b){if("string"!=typeof a)return!1;let{pathname:c}=(0,d.parsePath)(a);return c===b||c.startsWith(b+"/")}},98365:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"NextURL",{enumerable:!0,get:function(){return k}});let d=c(4845),e=c(21558),f=c(54059),g=c(28743),h=/(?!^https?:\/\/)(127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}|\[::1\]|localhost)/;function i(a,b){return new URL(String(a).replace(h,"localhost"),b&&String(b).replace(h,"localhost"))}let j=Symbol("NextURLInternal");class k{constructor(a,b,c){let d,e;"object"==typeof b&&"pathname"in b||"string"==typeof b?(d=b,e=c||{}):e=c||b||{},this[j]={url:i(a,d??e.base),options:e,basePath:""},this.analyze()}analyze(){var a,b,c,e,h;let i=(0,g.getNextPathnameInfo)(this[j].url.pathname,{nextConfig:this[j].options.nextConfig,parseData:!0,i18nProvider:this[j].options.i18nProvider}),k=(0,f.getHostname)(this[j].url,this[j].options.headers);this[j].domainLocale=this[j].options.i18nProvider?this[j].options.i18nProvider.detectDomainLocale(k):(0,d.detectDomainLocale)(null==(b=this[j].options.nextConfig)||null==(a=b.i18n)?void 0:a.domains,k);let l=(null==(c=this[j].domainLocale)?void 0:c.defaultLocale)||(null==(h=this[j].options.nextConfig)||null==(e=h.i18n)?void 0:e.defaultLocale);this[j].url.pathname=i.pathname,this[j].defaultLocale=l,this[j].basePath=i.basePath??"",this[j].buildId=i.buildId,this[j].locale=i.locale??l,this[j].trailingSlash=i.trailingSlash}formatPathname(){return(0,e.formatNextPathnameInfo)({basePath:this[j].basePath,buildId:this[j].buildId,defaultLocale:this[j].options.forceLocale?void 0:this[j].defaultLocale,locale:this[j].locale,pathname:this[j].url.pathname,trailingSlash:this[j].trailingSlash})}formatSearch(){return this[j].url.search}get buildId(){return this[j].buildId}set buildId(a){this[j].buildId=a}get locale(){return this[j].locale??""}set locale(a){var b,c;if(!this[j].locale||!(null==(c=this[j].options.nextConfig)||null==(b=c.i18n)?void 0:b.locales.includes(a)))throw Object.defineProperty(TypeError(`The NextURL configuration includes no locale "${a}"`),"__NEXT_ERROR_CODE",{value:"E597",enumerable:!1,configurable:!0});this[j].locale=a}get defaultLocale(){return this[j].defaultLocale}get domainLocale(){return this[j].domainLocale}get searchParams(){return this[j].url.searchParams}get host(){return this[j].url.host}set host(a){this[j].url.host=a}get hostname(){return this[j].url.hostname}set hostname(a){this[j].url.hostname=a}get port(){return this[j].url.port}set port(a){this[j].url.port=a}get protocol(){return this[j].url.protocol}set protocol(a){this[j].url.protocol=a}get href(){let a=this.formatPathname(),b=this.formatSearch();return`${this.protocol}//${this.host}${a}${b}${this.hash}`}set href(a){this[j].url=i(a),this.analyze()}get origin(){return this[j].url.origin}get pathname(){return this[j].url.pathname}set pathname(a){this[j].url.pathname=a}get hash(){return this[j].url.hash}set hash(a){this[j].url.hash=a}get search(){return this[j].url.search}set search(a){this[j].url.search=a}get password(){return this[j].url.password}set password(a){this[j].url.password=a}get username(){return this[j].url.username}set username(a){this[j].url.username=a}get basePath(){return this[j].basePath}set basePath(a){this[j].basePath=a.startsWith("/")?a:`/${a}`}toString(){return this.href}toJSON(){return this.href}[Symbol.for("edge-runtime.inspect.custom")](){return{href:this.href,origin:this.origin,protocol:this.protocol,username:this.username,password:this.password,host:this.host,hostname:this.hostname,port:this.port,pathname:this.pathname,search:this.search,searchParams:this.searchParams,hash:this.hash}}clone(){return new k(String(this),this[j].options)}}},98368:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});var c={StaticGenBailoutError:function(){return f},isStaticGenBailoutError:function(){return g}};for(var d in c)Object.defineProperty(b,d,{enumerable:!0,get:c[d]});let e="NEXT_STATIC_GEN_BAILOUT";class f extends Error{constructor(...a){super(...a),this.code=e}}function g(a){return"object"==typeof a&&null!==a&&"code"in a&&a.code===e}("function"==typeof b.default||"object"==typeof b.default&&null!==b.default)&&void 0===b.default.__esModule&&(Object.defineProperty(b.default,"__esModule",{value:!0}),Object.assign(b.default,b),a.exports=b.default)},98388:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{getFileTree:()=>p,startFileWatcher:()=>m});var e=c(29021),f=c.n(e),g=c(33873),h=c.n(g);c(40265);var i=c(63810),j=c(40002);c(90307);var k=a([j]);function l(){return(0,j.kh)()}j=(k.then?(await k)():k)[0];let q=new Set([".git","node_modules","app",".next",".DS_Store"]),r=new Set([".md",".csv",".json"]),s=new Set(["INSTRUCTION.md","README.md","CONFIG.json","CHANGELOG.md"]),t=null;new i.Xs;let u=null,v=null;function m(){let a;if(!u){try{a=l()}catch{return}try{(u=f().watch(a,{recursive:!0},(a,b)=>{!b||b.startsWith(".git")||b.includes("node_modules")||b.includes(".next")||(v&&clearTimeout(v),v=setTimeout(()=>{t=null,v=null},500))})).on("error",()=>{v&&(clearTimeout(v),v=null),u&&(u.close(),u=null)})}catch{u=null}}}function n(a,b){try{let c=f().readFileSync(a,"utf-8"),d=[];for(let a of c.split("\n")){let c=a.trim();if(!(!c||c.startsWith("#"))&&(d.push(c),d.length>=b))break}return d}catch{return[]}}let w=["Define local execution rules for this directory.","(your files here)","(Describe the purpose and usage of this space.)","(Add usage guidelines for this space.)"];function o(a){try{let b=f().readFileSync(a,"utf-8");return w.some(a=>b.includes(a))}catch{return!1}}function p(){var a;let b,c;return(null!==t&&Date.now()-t.timestamp<5e3?t:(a=l(),b=function a(b,c){let d,e=c??l();try{d=f().readdirSync(b,{withFileTypes:!0})}catch{return[]}let g=[];for(let c of d){let d=h().join(b,c.name),f=h().relative(e,d);if(c.isDirectory()){if(q.has(c.name))continue;let b=a(d,e);if(b.length>0){let a=b.some(a=>"file"===a.type&&"INSTRUCTION.md"===a.name),e={name:c.name,path:f,type:"directory",children:b};a&&(e.isSpace=!0,e.spacePreview=function(a){let b=h().join(a,"INSTRUCTION.md"),c=h().join(a,"README.md");return{instructionLines:n(b,3),readmeLines:n(c,3),isTemplate:o(b)&&o(c)}}(d)),g.push(e)}}else if(c.isFile()){if(b===e&&s.has(c.name))continue;let a=h().extname(c.name).toLowerCase();r.has(a)&&g.push({name:c.name,path:f,type:"file",extension:a})}}return g.sort((a,b)=>a.type!==b.type?"directory"===a.type?-1:1:a.name.localeCompare(b.name)),g}(a),c=[],function a(b){for(let d of b)"file"===d.type?c.push(d.path):d.children&&a(d.children)}(b),t={tree:b,allFiles:c,timestamp:Date.now()},u||m(),t)).tree}d()}catch(a){d(a)}})},98628:a=>{"use strict";var b=Object.defineProperty,c=Object.getOwnPropertyDescriptor,d=Object.getOwnPropertyNames,e=Object.prototype.hasOwnProperty,f={},g={RequestCookies:()=>n,ResponseCookies:()=>o,parseCookie:()=>j,parseSetCookie:()=>k,stringifyCookie:()=>i};for(var h in g)b(f,h,{get:g[h],enumerable:!0});function i(a){var b;let c=["path"in a&&a.path&&`Path=${a.path}`,"expires"in a&&(a.expires||0===a.expires)&&`Expires=${("number"==typeof a.expires?new Date(a.expires):a.expires).toUTCString()}`,"maxAge"in a&&"number"==typeof a.maxAge&&`Max-Age=${a.maxAge}`,"domain"in a&&a.domain&&`Domain=${a.domain}`,"secure"in a&&a.secure&&"Secure","httpOnly"in a&&a.httpOnly&&"HttpOnly","sameSite"in a&&a.sameSite&&`SameSite=${a.sameSite}`,"partitioned"in a&&a.partitioned&&"Partitioned","priority"in a&&a.priority&&`Priority=${a.priority}`].filter(Boolean),d=`${a.name}=${encodeURIComponent(null!=(b=a.value)?b:"")}`;return 0===c.length?d:`${d}; ${c.join("; ")}`}function j(a){let b=new Map;for(let c of a.split(/; */)){if(!c)continue;let a=c.indexOf("=");if(-1===a){b.set(c,"true");continue}let[d,e]=[c.slice(0,a),c.slice(a+1)];try{b.set(d,decodeURIComponent(null!=e?e:"true"))}catch{}}return b}function k(a){if(!a)return;let[[b,c],...d]=j(a),{domain:e,expires:f,httponly:g,maxage:h,path:i,samesite:k,secure:n,partitioned:o,priority:p}=Object.fromEntries(d.map(([a,b])=>[a.toLowerCase().replace(/-/g,""),b]));{var q,r,s={name:b,value:decodeURIComponent(c),domain:e,...f&&{expires:new Date(f)},...g&&{httpOnly:!0},..."string"==typeof h&&{maxAge:Number(h)},path:i,...k&&{sameSite:l.includes(q=(q=k).toLowerCase())?q:void 0},...n&&{secure:!0},...p&&{priority:m.includes(r=(r=p).toLowerCase())?r:void 0},...o&&{partitioned:!0}};let a={};for(let b in s)s[b]&&(a[b]=s[b]);return a}}a.exports=((a,f,g,h)=>{if(f&&"object"==typeof f||"function"==typeof f)for(let g of d(f))e.call(a,g)||void 0===g||b(a,g,{get:()=>f[g],enumerable:!(h=c(f,g))||h.enumerable});return a})(b({},"__esModule",{value:!0}),f);var l=["strict","lax","none"],m=["low","medium","high"],n=class{constructor(a){this._parsed=new Map,this._headers=a;const b=a.get("cookie");if(b)for(const[a,c]of j(b))this._parsed.set(a,{name:a,value:c})}[Symbol.iterator](){return this._parsed[Symbol.iterator]()}get size(){return this._parsed.size}get(...a){let b="string"==typeof a[0]?a[0]:a[0].name;return this._parsed.get(b)}getAll(...a){var b;let c=Array.from(this._parsed);if(!a.length)return c.map(([a,b])=>b);let d="string"==typeof a[0]?a[0]:null==(b=a[0])?void 0:b.name;return c.filter(([a])=>a===d).map(([a,b])=>b)}has(a){return this._parsed.has(a)}set(...a){let[b,c]=1===a.length?[a[0].name,a[0].value]:a,d=this._parsed;return d.set(b,{name:b,value:c}),this._headers.set("cookie",Array.from(d).map(([a,b])=>i(b)).join("; ")),this}delete(a){let b=this._parsed,c=Array.isArray(a)?a.map(a=>b.delete(a)):b.delete(a);return this._headers.set("cookie",Array.from(b).map(([a,b])=>i(b)).join("; ")),c}clear(){return this.delete(Array.from(this._parsed.keys())),this}[Symbol.for("edge-runtime.inspect.custom")](){return`RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(a=>`${a.name}=${encodeURIComponent(a.value)}`).join("; ")}},o=class{constructor(a){var b,c,d;this._parsed=new Map,this._headers=a;const e=null!=(d=null!=(c=null==(b=a.getSetCookie)?void 0:b.call(a))?c:a.get("set-cookie"))?d:[];for(const a of Array.isArray(e)?e:function(a){if(!a)return[];var b,c,d,e,f,g=[],h=0;function i(){for(;h<a.length&&/\s/.test(a.charAt(h));)h+=1;return h<a.length}for(;h<a.length;){for(b=h,f=!1;i();)if(","===(c=a.charAt(h))){for(d=h,h+=1,i(),e=h;h<a.length&&"="!==(c=a.charAt(h))&&";"!==c&&","!==c;)h+=1;h<a.length&&"="===a.charAt(h)?(f=!0,h=e,g.push(a.substring(b,d)),b=h):h=d+1}else h+=1;(!f||h>=a.length)&&g.push(a.substring(b,a.length))}return g}(e)){const b=k(a);b&&this._parsed.set(b.name,b)}}get(...a){let b="string"==typeof a[0]?a[0]:a[0].name;return this._parsed.get(b)}getAll(...a){var b;let c=Array.from(this._parsed.values());if(!a.length)return c;let d="string"==typeof a[0]?a[0]:null==(b=a[0])?void 0:b.name;return c.filter(a=>a.name===d)}has(a){return this._parsed.has(a)}set(...a){let[b,c,d]=1===a.length?[a[0].name,a[0].value,a[0]]:a,e=this._parsed;return e.set(b,function(a={name:"",value:""}){return"number"==typeof a.expires&&(a.expires=new Date(a.expires)),a.maxAge&&(a.expires=new Date(Date.now()+1e3*a.maxAge)),(null===a.path||void 0===a.path)&&(a.path="/"),a}({name:b,value:c,...d})),function(a,b){for(let[,c]of(b.delete("set-cookie"),a)){let a=i(c);b.append("set-cookie",a)}}(e,this._headers),this}delete(...a){let[b,c]="string"==typeof a[0]?[a[0]]:[a[0].name,a[0]];return this.set({...c,name:b,value:"",expires:new Date(0)})}[Symbol.for("edge-runtime.inspect.custom")](){return`ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(i).join("; ")}}}};
|
|
15
|
+
`)}}},79364:(a,b,c)=>{"use strict";function d(a){if(!a||"object"!=typeof a||Array.isArray(a))return;let b={},c=!1;for(let[d,e]of Object.entries(a)){if(!e||"object"!=typeof e||Array.isArray(e))continue;let a={};if("string"==typeof e.command&&e.command.trim()&&(a.command=e.command.trim()),Array.isArray(e.args)&&(a.args=e.args.filter(a=>"string"==typeof a)),e.env&&"object"==typeof e.env&&!Array.isArray(e.env)){let b={};for(let[a,c]of Object.entries(e.env))"string"==typeof c&&(b[a]=c);Object.keys(b).length>0&&(a.env=b)}"boolean"==typeof e.enabled&&(a.enabled=e.enabled),Object.keys(a).length>0&&(b[d]=a,c=!0)}return c?b:void 0}c.d(b,{gG:()=>d})},90307:(a,b,c)=>{"use strict";c(29021),c(33873)},96482:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"pathHasPrefix",{enumerable:!0,get:function(){return e}});let d=c(23692);function e(a,b){if("string"!=typeof a)return!1;let{pathname:c}=(0,d.parsePath)(a);return c===b||c.startsWith(b+"/")}},98365:(a,b,c)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0}),Object.defineProperty(b,"NextURL",{enumerable:!0,get:function(){return k}});let d=c(4845),e=c(21558),f=c(54059),g=c(28743),h=/(?!^https?:\/\/)(127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}|\[::1\]|localhost)/;function i(a,b){return new URL(String(a).replace(h,"localhost"),b&&String(b).replace(h,"localhost"))}let j=Symbol("NextURLInternal");class k{constructor(a,b,c){let d,e;"object"==typeof b&&"pathname"in b||"string"==typeof b?(d=b,e=c||{}):e=c||b||{},this[j]={url:i(a,d??e.base),options:e,basePath:""},this.analyze()}analyze(){var a,b,c,e,h;let i=(0,g.getNextPathnameInfo)(this[j].url.pathname,{nextConfig:this[j].options.nextConfig,parseData:!0,i18nProvider:this[j].options.i18nProvider}),k=(0,f.getHostname)(this[j].url,this[j].options.headers);this[j].domainLocale=this[j].options.i18nProvider?this[j].options.i18nProvider.detectDomainLocale(k):(0,d.detectDomainLocale)(null==(b=this[j].options.nextConfig)||null==(a=b.i18n)?void 0:a.domains,k);let l=(null==(c=this[j].domainLocale)?void 0:c.defaultLocale)||(null==(h=this[j].options.nextConfig)||null==(e=h.i18n)?void 0:e.defaultLocale);this[j].url.pathname=i.pathname,this[j].defaultLocale=l,this[j].basePath=i.basePath??"",this[j].buildId=i.buildId,this[j].locale=i.locale??l,this[j].trailingSlash=i.trailingSlash}formatPathname(){return(0,e.formatNextPathnameInfo)({basePath:this[j].basePath,buildId:this[j].buildId,defaultLocale:this[j].options.forceLocale?void 0:this[j].defaultLocale,locale:this[j].locale,pathname:this[j].url.pathname,trailingSlash:this[j].trailingSlash})}formatSearch(){return this[j].url.search}get buildId(){return this[j].buildId}set buildId(a){this[j].buildId=a}get locale(){return this[j].locale??""}set locale(a){var b,c;if(!this[j].locale||!(null==(c=this[j].options.nextConfig)||null==(b=c.i18n)?void 0:b.locales.includes(a)))throw Object.defineProperty(TypeError(`The NextURL configuration includes no locale "${a}"`),"__NEXT_ERROR_CODE",{value:"E597",enumerable:!1,configurable:!0});this[j].locale=a}get defaultLocale(){return this[j].defaultLocale}get domainLocale(){return this[j].domainLocale}get searchParams(){return this[j].url.searchParams}get host(){return this[j].url.host}set host(a){this[j].url.host=a}get hostname(){return this[j].url.hostname}set hostname(a){this[j].url.hostname=a}get port(){return this[j].url.port}set port(a){this[j].url.port=a}get protocol(){return this[j].url.protocol}set protocol(a){this[j].url.protocol=a}get href(){let a=this.formatPathname(),b=this.formatSearch();return`${this.protocol}//${this.host}${a}${b}${this.hash}`}set href(a){this[j].url=i(a),this.analyze()}get origin(){return this[j].url.origin}get pathname(){return this[j].url.pathname}set pathname(a){this[j].url.pathname=a}get hash(){return this[j].url.hash}set hash(a){this[j].url.hash=a}get search(){return this[j].url.search}set search(a){this[j].url.search=a}get password(){return this[j].url.password}set password(a){this[j].url.password=a}get username(){return this[j].url.username}set username(a){this[j].url.username=a}get basePath(){return this[j].basePath}set basePath(a){this[j].basePath=a.startsWith("/")?a:`/${a}`}toString(){return this.href}toJSON(){return this.href}[Symbol.for("edge-runtime.inspect.custom")](){return{href:this.href,origin:this.origin,protocol:this.protocol,username:this.username,password:this.password,host:this.host,hostname:this.hostname,port:this.port,pathname:this.pathname,search:this.search,searchParams:this.searchParams,hash:this.hash}}clone(){return new k(String(this),this[j].options)}}},98368:(a,b)=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});var c={StaticGenBailoutError:function(){return f},isStaticGenBailoutError:function(){return g}};for(var d in c)Object.defineProperty(b,d,{enumerable:!0,get:c[d]});let e="NEXT_STATIC_GEN_BAILOUT";class f extends Error{constructor(...a){super(...a),this.code=e}}function g(a){return"object"==typeof a&&null!==a&&"code"in a&&a.code===e}("function"==typeof b.default||"object"==typeof b.default&&null!==b.default)&&void 0===b.default.__esModule&&(Object.defineProperty(b.default,"__esModule",{value:!0}),Object.assign(b.default,b),a.exports=b.default)},98388:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{getFileTree:()=>p,startFileWatcher:()=>m});var e=c(29021),f=c.n(e),g=c(33873),h=c.n(g);c(40265);var i=c(63810),j=c(40002);c(90307);var k=a([j]);function l(){return(0,j.kh)()}j=(k.then?(await k)():k)[0];let q=new Set([".git","node_modules","app",".next",".DS_Store"]),r=new Set([".md",".csv",".json"]),s=null;new i.Xs;let t=null,u=null;function m(){let a;if(!t){try{a=l()}catch{return}try{(t=f().watch(a,{recursive:!0},(a,b)=>{!b||b.startsWith(".git")||b.includes("node_modules")||b.includes(".next")||(u&&clearTimeout(u),u=setTimeout(()=>{s=null,u=null},500))})).on("error",()=>{u&&(clearTimeout(u),u=null),t&&(t.close(),t=null)})}catch{t=null}}}function n(a,b){try{let c=f().readFileSync(a,"utf-8"),d=[];for(let a of c.split("\n")){let c=a.trim();if(!(!c||c.startsWith("#"))&&(d.push(c),d.length>=b))break}return d}catch{return[]}}let v=["Define local execution rules for this directory.","(your files here)","(Describe the purpose and usage of this space.)","(Add usage guidelines for this space.)"];function o(a){try{let b=f().readFileSync(a,"utf-8");return v.some(a=>b.includes(a))}catch{return!1}}function p(){var a;let b,c;return(null!==s&&Date.now()-s.timestamp<5e3?s:(a=l(),b=function a(b,c){let d,e=c??l();try{d=f().readdirSync(b,{withFileTypes:!0})}catch{return[]}let g=[];for(let c of d){let d=h().join(b,c.name),f=h().relative(e,d);if(c.isDirectory()){if(q.has(c.name))continue;let b=a(d,e);if(b.length>0){let a=b.some(a=>"file"===a.type&&"INSTRUCTION.md"===a.name),e={name:c.name,path:f,type:"directory",children:b};a&&(e.isSpace=!0,e.spacePreview=function(a){let b=h().join(a,"INSTRUCTION.md"),c=h().join(a,"README.md");return{instructionLines:n(b,3),readmeLines:n(c,3),isTemplate:o(b)&&o(c)}}(d)),g.push(e)}}else if(c.isFile()){let a=h().extname(c.name).toLowerCase();r.has(a)&&g.push({name:c.name,path:f,type:"file",extension:a})}}return g.sort((a,b)=>a.type!==b.type?"directory"===a.type?-1:1:a.name.localeCompare(b.name)),g}(a),c=[],function a(b){for(let d of b)"file"===d.type?c.push(d.path):d.children&&a(d.children)}(b),s={tree:b,allFiles:c,timestamp:Date.now()},t||m(),s)).tree}d()}catch(a){d(a)}})},98628:a=>{"use strict";var b=Object.defineProperty,c=Object.getOwnPropertyDescriptor,d=Object.getOwnPropertyNames,e=Object.prototype.hasOwnProperty,f={},g={RequestCookies:()=>n,ResponseCookies:()=>o,parseCookie:()=>j,parseSetCookie:()=>k,stringifyCookie:()=>i};for(var h in g)b(f,h,{get:g[h],enumerable:!0});function i(a){var b;let c=["path"in a&&a.path&&`Path=${a.path}`,"expires"in a&&(a.expires||0===a.expires)&&`Expires=${("number"==typeof a.expires?new Date(a.expires):a.expires).toUTCString()}`,"maxAge"in a&&"number"==typeof a.maxAge&&`Max-Age=${a.maxAge}`,"domain"in a&&a.domain&&`Domain=${a.domain}`,"secure"in a&&a.secure&&"Secure","httpOnly"in a&&a.httpOnly&&"HttpOnly","sameSite"in a&&a.sameSite&&`SameSite=${a.sameSite}`,"partitioned"in a&&a.partitioned&&"Partitioned","priority"in a&&a.priority&&`Priority=${a.priority}`].filter(Boolean),d=`${a.name}=${encodeURIComponent(null!=(b=a.value)?b:"")}`;return 0===c.length?d:`${d}; ${c.join("; ")}`}function j(a){let b=new Map;for(let c of a.split(/; */)){if(!c)continue;let a=c.indexOf("=");if(-1===a){b.set(c,"true");continue}let[d,e]=[c.slice(0,a),c.slice(a+1)];try{b.set(d,decodeURIComponent(null!=e?e:"true"))}catch{}}return b}function k(a){if(!a)return;let[[b,c],...d]=j(a),{domain:e,expires:f,httponly:g,maxage:h,path:i,samesite:k,secure:n,partitioned:o,priority:p}=Object.fromEntries(d.map(([a,b])=>[a.toLowerCase().replace(/-/g,""),b]));{var q,r,s={name:b,value:decodeURIComponent(c),domain:e,...f&&{expires:new Date(f)},...g&&{httpOnly:!0},..."string"==typeof h&&{maxAge:Number(h)},path:i,...k&&{sameSite:l.includes(q=(q=k).toLowerCase())?q:void 0},...n&&{secure:!0},...p&&{priority:m.includes(r=(r=p).toLowerCase())?r:void 0},...o&&{partitioned:!0}};let a={};for(let b in s)s[b]&&(a[b]=s[b]);return a}}a.exports=((a,f,g,h)=>{if(f&&"object"==typeof f||"function"==typeof f)for(let g of d(f))e.call(a,g)||void 0===g||b(a,g,{get:()=>f[g],enumerable:!(h=c(f,g))||h.enumerable});return a})(b({},"__esModule",{value:!0}),f);var l=["strict","lax","none"],m=["low","medium","high"],n=class{constructor(a){this._parsed=new Map,this._headers=a;const b=a.get("cookie");if(b)for(const[a,c]of j(b))this._parsed.set(a,{name:a,value:c})}[Symbol.iterator](){return this._parsed[Symbol.iterator]()}get size(){return this._parsed.size}get(...a){let b="string"==typeof a[0]?a[0]:a[0].name;return this._parsed.get(b)}getAll(...a){var b;let c=Array.from(this._parsed);if(!a.length)return c.map(([a,b])=>b);let d="string"==typeof a[0]?a[0]:null==(b=a[0])?void 0:b.name;return c.filter(([a])=>a===d).map(([a,b])=>b)}has(a){return this._parsed.has(a)}set(...a){let[b,c]=1===a.length?[a[0].name,a[0].value]:a,d=this._parsed;return d.set(b,{name:b,value:c}),this._headers.set("cookie",Array.from(d).map(([a,b])=>i(b)).join("; ")),this}delete(a){let b=this._parsed,c=Array.isArray(a)?a.map(a=>b.delete(a)):b.delete(a);return this._headers.set("cookie",Array.from(b).map(([a,b])=>i(b)).join("; ")),c}clear(){return this.delete(Array.from(this._parsed.keys())),this}[Symbol.for("edge-runtime.inspect.custom")](){return`RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(a=>`${a.name}=${encodeURIComponent(a.value)}`).join("; ")}},o=class{constructor(a){var b,c,d;this._parsed=new Map,this._headers=a;const e=null!=(d=null!=(c=null==(b=a.getSetCookie)?void 0:b.call(a))?c:a.get("set-cookie"))?d:[];for(const a of Array.isArray(e)?e:function(a){if(!a)return[];var b,c,d,e,f,g=[],h=0;function i(){for(;h<a.length&&/\s/.test(a.charAt(h));)h+=1;return h<a.length}for(;h<a.length;){for(b=h,f=!1;i();)if(","===(c=a.charAt(h))){for(d=h,h+=1,i(),e=h;h<a.length&&"="!==(c=a.charAt(h))&&";"!==c&&","!==c;)h+=1;h<a.length&&"="===a.charAt(h)?(f=!0,h=e,g.push(a.substring(b,d)),b=h):h=d+1}else h+=1;(!f||h>=a.length)&&g.push(a.substring(b,a.length))}return g}(e)){const b=k(a);b&&this._parsed.set(b.name,b)}}get(...a){let b="string"==typeof a[0]?a[0]:a[0].name;return this._parsed.get(b)}getAll(...a){var b;let c=Array.from(this._parsed.values());if(!a.length)return c;let d="string"==typeof a[0]?a[0]:null==(b=a[0])?void 0:b.name;return c.filter(a=>a.name===d)}has(a){return this._parsed.has(a)}set(...a){let[b,c,d]=1===a.length?[a[0].name,a[0].value,a[0]]:a,e=this._parsed;return e.set(b,function(a={name:"",value:""}){return"number"==typeof a.expires&&(a.expires=new Date(a.expires)),a.maxAge&&(a.expires=new Date(Date.now()+1e3*a.maxAge)),(null===a.path||void 0===a.path)&&(a.path="/"),a}({name:b,value:c,...d})),function(a,b){for(let[,c]of(b.delete("set-cookie"),a)){let a=i(c);b.append("set-cookie",a)}}(e,this._headers),this}delete(...a){let[b,c]="string"==typeof a[0]?[a[0]]:[a[0].name,a[0]];return this.set({...c,name:b,value:"",expires:new Date(0)})}[Symbol.for("edge-runtime.inspect.custom")](){return`ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(i).join("; ")}}}};
|
|
@@ -49,7 +49,7 @@ ${a}/
|
|
|
49
49
|
## 💡 Usage
|
|
50
50
|
|
|
51
51
|
(Add usage guidelines for this space.)
|
|
52
|
-
`}function l(a,b,c,d=""){let f=b.trim();if(!f)throw new h.Vt(h.tG.INVALID_REQUEST,"Space name is required",{name:b});if(f.includes("/")||f.includes("\\"))throw new h.Vt(h.tG.INVALID_PATH,"Space name must not contain path separators",{name:f});let m=d.replace(/\/+$/,"").trim();if(m.includes("..")||m.startsWith("/")||m.includes("\\"))throw new h.Vt(h.tG.INVALID_PATH,"Invalid parent path",{parentPath:d});let n=m?`${m}/`:"",o=`${n}${f}`,p=k(o,f,c);(0,i.x3)(a,`${o}/README.md`,p);let q=g().resolve(a,o),r=g().join(q,"INSTRUCTION.md");return e().existsSync(r)||e().writeFileSync(r,(0,j.GL)((0,j.e1)(f)),"utf-8"),{path:o}}},42181:(a,b,c)=>{c.d(b,{As:()=>t,_E:()=>r,KZ:()=>s});var d=c(29021),e=c.n(d),f=c(33873),g=c.n(f),h=c(21820),i=c.n(h),j=c(35032),k=c(32870);let l=/[\u4e00-\u9fff\u3040-\u309f\u30a0-\u30ff\uac00-\ud7af]/,m="u">typeof Intl&&Intl.Segmenter?new Intl.Segmenter("zh",{granularity:"word"}):null;function n(a){let b=new Set,c=a.toLowerCase(),d=c.match(/[a-z0-9_$@#]+/g);if(d)for(let a of d)a.length>=2&&b.add(a);if(l.test(c))if(m)for(let{segment:a,isWordLike:d}of m.segment(c)){if(!d)continue;let c=a.trim();if(c)for(let a of(b.add(c),c))l.test(a)&&b.add(a)}else{let a=[];for(let d of c)l.test(d)?a.push(d):a.length>0&&(o(a,b),a.length=0);a.length>0&&o(a,b)}return b}function o(a,b){for(let c=0;c<a.length;c++)b.add(a[c]),c+1<a.length&&b.add(a[c]+a[c+1])}class p{rebuild(a){let b=(0,j.f)(a),c=new Map,d=new Map,e=new Map,f=0;for(let g of b){let b;try{b=(0,k.TA)(a,g)}catch{continue}d.set(g,b.length),f+=b.length,b.length>5e4&&(b=b.slice(0,5e4));let h=n(g+"\n"+b);for(let a of(e.set(g,h),h)){let b=c.get(a);b||(b=new Set,c.set(a,b)),b.add(g)}}this.invertedIndex=c,this.builtForRoot=a,this.fileCount=b.length,this.docLengths=d,this.totalChars=f,this.fileTokens=e}invalidate(){this.invertedIndex=null,this.builtForRoot=null,this.fileCount=0,this.docLengths.clear(),this.totalChars=0,this.fileTokens.clear()}removeFile(a){if(!this.invertedIndex)return;let b=this.fileTokens.get(a);if(b){for(let c of b)this.invertedIndex.get(c)?.delete(a);this.fileTokens.delete(a)}let c=this.docLengths.get(a)??0;this.totalChars-=c,this.docLengths.delete(a),this.fileCount=Math.max(0,this.fileCount-1)}addFile(a,b){let c;if(!this.invertedIndex)return;try{c=(0,k.TA)(a,b)}catch{return}this.docLengths.set(b,c.length),this.totalChars+=c.length,this.fileCount++,c.length>5e4&&(c=c.slice(0,5e4));let d=n(b+"\n"+c);for(let a of(this.fileTokens.set(b,d),d)){let c=this.invertedIndex.get(a);c||(c=new Set,this.invertedIndex.set(a,c)),c.add(b)}}updateFile(a,b){this.invertedIndex&&(this.removeFile(b),this.addFile(a,b))}isBuiltFor(a){return null!==this.invertedIndex&&this.builtForRoot===a}isBuilt(){return null!==this.invertedIndex}getFileCount(){return this.fileCount}getAvgDocLength(){return this.fileCount>0?this.totalChars/this.fileCount:0}getDocLength(a){return this.docLengths.get(a)??0}getDocFrequency(a){return this.invertedIndex?this.invertedIndex.get(a)?.size??0:0}getCandidatesUnion(a){if(!a.trim()||!this.invertedIndex)return null;let b=n(a.toLowerCase().trim());if(0===b.size)return null;let c=new Map;for(let a of b){let b=this.invertedIndex.get(a);if(b)for(let a of b)c.set(a,(c.get(a)??0)+1)}if(0===c.size)return[];let d=b.size;if(d>=3){let a=Math.max(1,Math.floor(d/2)),b=[...c.entries()].filter(([,b])=>b>=a).map(([a])=>a);if(b.length>0)return b}return[...c.keys()]}getCandidates(a){if(!a.trim()||!this.invertedIndex)return null;let b=n(a.toLowerCase().trim());if(0===b.size)return null;let c=null;for(let a of b){let b=this.invertedIndex.get(a);if(!b)return[];if(null===c)c=new Set(b);else{for(let a of c)b.has(a)||c.delete(a);if(0===c.size)return[]}}return c?Array.from(c):[]}persist(a){if(!this.invertedIndex)return;let b={version:1,builtForRoot:this.builtForRoot??"",fileCount:this.fileCount,totalChars:this.totalChars,docLengths:Object.fromEntries(this.docLengths),invertedIndex:{},timestamp:Date.now()};for(let[a,c]of this.invertedIndex)b.invertedIndex[a]=[...c];let c=g().join(a,"search-index.json");try{e().mkdirSync(a,{recursive:!0}),e().writeFileSync(c,JSON.stringify(b),"utf-8")}catch{}}load(a,b){let c,d,f=g().join(a,"search-index.json");try{c=e().readFileSync(f,"utf-8")}catch{return!1}try{d=JSON.parse(c)}catch{return!1}if(1!==d.version||d.builtForRoot!==b||(0,j.f)(b).length!==d.fileCount)return!1;let h=Object.keys(d.docLengths);if(Math.min(50,h.length)===h.length)for(let a of h)try{if(e().statSync(g().join(b,a)).mtimeMs>d.timestamp)return!1}catch{return!1}else{let a=Math.max(1,Math.floor(h.length/40)),c=new Set;for(let b=0;b<h.length;b+=a)c.add(b);for(let a=Math.max(0,h.length-10);a<h.length;a++)c.add(a);for(let a of c)try{if(e().statSync(g().join(b,h[a])).mtimeMs>d.timestamp)return!1}catch{return!1}}this.builtForRoot=d.builtForRoot,this.fileCount=d.fileCount,this.totalChars=d.totalChars,this.docLengths=new Map(Object.entries(d.docLengths).map(([a,b])=>[a,b]));let i=new Map,k=new Map;for(let[a,b]of Object.entries(d.invertedIndex)){let c=new Set(b);for(let b of(i.set(a,c),c)){let c=k.get(b);c||(c=new Set,k.set(b,c)),c.add(a)}}return this.invertedIndex=i,this.fileTokens=k,!0}constructor(){this.invertedIndex=null,this.builtForRoot=null,this.fileCount=0,this.docLengths=new Map,this.totalChars=0,this.fileTokens=new Map}}let q=new p;function r(){q.invalidate()}function s(a,b){q.isBuilt()&&(q.updateFile(a,b),w())}function t(a,b){q.isBuilt()&&(q.addFile(a,b),w())}let u=null,v=!1;function w(){v=!0,u&&clearTimeout(u),u=setTimeout(x,5e3)}function x(){if(u&&(clearTimeout(u),u=null),v){v=!1;try{q.persist(g().join(i().homedir(),".mindos"))}catch{}}}"u">typeof process&&(process.on("beforeExit",x),process.on("SIGTERM",()=>{x(),process.exit(0)}),process.on("SIGINT",()=>{x(),process.exit(0)}))},50953:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{El:()=>J,F2:()=>X,F3:()=>C,FN:()=>R,FR:()=>$,G1:()=>ab,H$:()=>D,H5:()=>N,JX:()=>n,Jh:()=>O,MG:()=>B,P2:()=>S,QX:()=>E,Se:()=>Q,WZ:()=>T,_K:()=>W,_P:()=>K,bd:()=>r,bv:()=>F,f:()=>G,fu:()=>L,g7:()=>_,gm:()=>s,mV:()=>Y,mZ:()=>A,rt:()=>P,tj:()=>Z,vV:()=>p,vg:()=>V,wd:()=>H,wf:()=>U,x3:()=>M,xY:()=>z,y3:()=>I,zK:()=>aa});var e=c(29021),f=c.n(e),g=c(33873),h=c.n(g),i=c(94241);c(11181);var j=c(3045),k=c(76223),l=c(59520),m=a([k]);function n(){return(0,k.kh)()}k=(m.then?(await m)():m)[0];let ac=new Set([".git","node_modules","app",".next",".DS_Store"]),ad=new Set([".md",".csv",".json"]),ae=new Set(["INSTRUCTION.md","README.md","CONFIG.json","CHANGELOG.md"]),af=null,ag=0;function o(a){let b=y(a),c=[];return!function a(b){for(let d of b)"file"===d.type?c.push(d.path):d.children&&a(d.children)}(b),{tree:b,allFiles:c,timestamp:Date.now()}}function p(){if(af&&!q()){let a=o(n()),b=!function(a,b){if(a.length!==b.length)return!1;let c=[...a].sort(),d=[...b].sort();return c.every((a,b)=>a===d[b])}(af.allFiles,a.allFiles);af=a,al=null,b&&ag++}return ag}function q(){return null!==af&&Date.now()-af.timestamp<5e3}let ah=new j.Xs;function r(){let a=n();return ah.isBuiltFor(a)||ah.rebuild(a),ah}function s(){af=null,al=null,ag++,(0,j._E)(),ah.invalidate()}function t(a){af=null,al=null,ag++,(0,j.KZ)(n(),a),ah.isBuilt()&&ah.updateFile(n(),a)}function u(){if(q())return af;let a=n();return af=o(a),ai||function(){let a;if(!ai){try{a=n()}catch{return}try{(ai=f().watch(a,{recursive:!0},(a,b)=>{!b||b.startsWith(".git")||b.includes("node_modules")||b.includes(".next")||(aj&&clearTimeout(aj),aj=setTimeout(()=>{af=null,aj=null},500))})).on("error",()=>{aj&&(clearTimeout(aj),aj=null),ai&&(ai.close(),ai=null)})}catch{ai=null}}}(),af}let ai=null,aj=null;function v(a,b){try{let c=f().readFileSync(a,"utf-8"),d=[];for(let a of c.split("\n")){let c=a.trim();if(!(!c||c.startsWith("#"))&&(d.push(c),d.length>=b))break}return d}catch{return[]}}let ak=["Define local execution rules for this directory.","(your files here)","(Describe the purpose and usage of this space.)","(Add usage guidelines for this space.)"];function w(a){try{let b=f().readFileSync(a,"utf-8");return ak.some(a=>b.includes(a))}catch{return!1}}function x(a){let b=h().join(a,"INSTRUCTION.md"),c=h().join(a,"README.md");return{instructionLines:v(b,3),readmeLines:v(c,3),isTemplate:w(b)&&w(c)}}function y(a,b){let c,d=b??n();try{c=f().readdirSync(a,{withFileTypes:!0})}catch{return[]}let e=[];for(let b of c){let c=h().join(a,b.name),f=h().relative(d,c);if(b.isDirectory()){if(ac.has(b.name))continue;let a=y(c,d);if(a.length>0){let d=a.some(a=>"file"===a.type&&"INSTRUCTION.md"===a.name),g={name:b.name,path:f,type:"directory",children:a};d&&(g.isSpace=!0,g.spacePreview=x(c)),e.push(g)}}else if(b.isFile()){if(a===d&&ae.has(b.name))continue;let c=h().extname(b.name).toLowerCase();ad.has(c)&&e.push({name:b.name,path:f,type:"file",extension:c})}}return e.sort((a,b)=>a.type!==b.type?"directory"===a.type?-1:1:a.name.localeCompare(b.name)),e}function z(){return u().tree}function A(){return(0,j.IE)(n(),u().tree)}function B(a){return(0,j.MG)(n(),a)}function C(a={}){return(0,j.F3)(n(),a)}function D(){(0,j.H$)(n())}function E(){return(0,j.QX)(n())}function F(a){let b=n(),c=h().join(b,a),d=h().join(c,"INSTRUCTION.md");return f().existsSync(d)?x(c):null}function G(){return u().allFiles}function H(a){try{let b=h().resolve(n()),c=h().resolve(h().join(b,a));return f().statSync(c).isDirectory()}catch{return!1}}function I(a){let b,c=n(),d=h().resolve(c),e=h().resolve(h().join(d,a));try{b=f().readdirSync(e,{withFileTypes:!0})}catch{return[]}let g=[];for(let a of b){if(ac.has(a.name))continue;let b=h().join(e,a.name),c=h().relative(d,b);if(a.isDirectory()){let d=y(b);d.length>0&&g.push({name:a.name,path:c,type:"directory",children:d})}else if(a.isFile()){let d=h().extname(a.name).toLowerCase();if(ad.has(d)){let e;try{e=f().statSync(b).mtimeMs}catch{}g.push({name:a.name,path:c,type:"file",extension:d,mtime:e})}}}return g.sort((a,b)=>a.type!==b.type?"directory"===a.type?-1:1:a.name.localeCompare(b.name)),g}function J(a=10){let b=n(),c=G().map(a=>{try{let c=h().join(b,a),d=f().statSync(c);return{path:a,mtime:d.mtimeMs}}catch{return null}}).filter(Boolean);return c.sort((a,b)=>b.mtime-a.mtime),c.slice(0,a)}function K(a){return(0,j.TA)(n(),a)}function L(a,b){(0,j._h)(n(),a,b),t(a)}function M(a,b=""){(0,j.x3)(n(),a,b),af=null,al=null,ag++,(0,j.As)(n(),a),ah.isBuilt()&&ah.updateFile(n(),a)}function N(a,b){let c=(0,j.H5)(n(),a,b);return s(),c}function O(a,b){let c=(0,j.OV)(n(),a,b);return s(),c}function P(a){(0,j.rt)(n(),a),s()}function Q(a){return(0,j.Se)(n(),a)}function R(a,b,c){(0,j.FN)(n(),a,b,c),t(a)}function S(a,b,c,d){(0,j.updateLines)(n(),a,b,c,d),t(a)}function T(a,b){(0,j.WZ)(n(),a,b),t(a)}function U(a,b,c){(0,j.wf)(n(),a,b,c),t(a)}function V(a,b,c){(0,j.vg)(n(),a,b,c),t(a)}let al=null;function W(a){if(!a.trim())return[];let{fuse:b}=function(){if(al&&q())return al;let a=G(),b=[];for(let c of a){let a;try{a=K(c)}catch{continue}a.length>5e4&&(a=a.slice(0,5e4)),b.push({path:c,fileName:h().basename(c),content:a})}return al={fuse:new i.A(b,{keys:[{name:"fileName",weight:.3},{name:"path",weight:.2},{name:"content",weight:.5}],includeScore:!0,includeMatches:!0,threshold:.4,ignoreLocation:!0,minMatchCharLength:2,useExtendedSearch:!0}),documents:b,timestamp:Date.now()}}(),c=/[\u4e00-\u9fff\u3040-\u309f\u30a0-\u30ff\uac00-\ud7af]/.test(a)?`'${a}`:a;return b.search(c,{limit:20}).map(a=>{let b=a.item.path,c=a.item.content,d=1-(a.score??1),e=function(a,b){let c=b?.find(a=>"content"===a.key);if(!c||0===c.indices.length){let b=a.slice(0,120).replace(/\n/g," ").trim();return a.length>120?b+"...":b}let d=0,e=0,f=0;for(let[a,b]of c.indices){let c=b-a;c>f&&(d=a,e=b,f=c)}let g=Math.max(0,d-120),h=Math.min(a.length,e+120),i=g;if(i>0){let b=a.indexOf(" ",i);-1!==b&&b<d&&(i=b+1)}let j=h;if(j<a.length){let b=a.lastIndexOf(" ",j);b>e&&(j=b)}let k=a.slice(i,j).trim();return k=k.replace(/\n{2,}/g," ↵ "),i>0&&(k="..."+k),j<a.length&&(k+="..."),k}(c,a.matches),f=a.matches?.map(a=>({indices:a.indices,value:a.value??"",key:a.key??""}));return{path:b,snippet:e,score:d,matches:f}})}function X(a,b){let c=(0,j.F2)(n(),a,b);return s(),c}function Y(a,b){let c=(0,j.mV)(n(),a,b,j.G1);return s(),c}function Z(){return(0,j.tj)(n())}function $(a,b=10){return(0,j.FR)(n(),a,b)}function _(a,b){return(0,j.g7)(n(),a,b)}function aa(a){let b=(0,l.F0)(n(),a);return s(),b}function ab(a){let b=n(),c=r().getBacklinks(a);return(0,j.G1)(b,a,c)}d()}catch(a){d(a)}})},54948:(a,b,c)=>{c.d(b,{_c:()=>h,m_:()=>f,xH:()=>g});var d=c(33873),e=c.n(d);let f=new Set([".txt",".md",".markdown",".csv",".json",".yaml",".yml",".xml",".html",".htm",".pdf"]);function g(a){let b=a.replace(/\\/g,"/").split("/").pop()??"";return(b=(b=(b=(b=b.replace(/\.\./g,"").replace(/^\/+/,"")).replace(/[\\:*?"<>|]/g,"-")).replace(/-{2,}/g,"-")).replace(/^[-\s]+|[-\s]+$/g,""))||"imported-file"}function h(a,b){let c,d,f=e().extname(a).toLowerCase(),h=e().basename(a,f)||"note",i=0!==(d=((c=e().extname(a))?a.slice(0,-c.length):a).replace(/^\.+/,"").replace(/[-_]+/g," ").trim().split(/\s+/)).length&&(1!==d.length||d[0])?d.map(a=>a.charAt(0).toUpperCase()+a.slice(1)).join(" "):"Untitled";if(".md"===f||".markdown"===f||".csv"===f||".json"===f)return{content:b,originalName:a,targetName:g(a)};if(".txt"===f)return{content:`# ${i}
|
|
52
|
+
`}function l(a,b,c,d=""){let f=b.trim();if(!f)throw new h.Vt(h.tG.INVALID_REQUEST,"Space name is required",{name:b});if(f.includes("/")||f.includes("\\"))throw new h.Vt(h.tG.INVALID_PATH,"Space name must not contain path separators",{name:f});let m=d.replace(/\/+$/,"").trim();if(m.includes("..")||m.startsWith("/")||m.includes("\\"))throw new h.Vt(h.tG.INVALID_PATH,"Invalid parent path",{parentPath:d});let n=m?`${m}/`:"",o=`${n}${f}`,p=k(o,f,c);(0,i.x3)(a,`${o}/README.md`,p);let q=g().resolve(a,o),r=g().join(q,"INSTRUCTION.md");return e().existsSync(r)||e().writeFileSync(r,(0,j.GL)((0,j.e1)(f)),"utf-8"),{path:o}}},42181:(a,b,c)=>{c.d(b,{As:()=>t,_E:()=>r,KZ:()=>s});var d=c(29021),e=c.n(d),f=c(33873),g=c.n(f),h=c(21820),i=c.n(h),j=c(35032),k=c(32870);let l=/[\u4e00-\u9fff\u3040-\u309f\u30a0-\u30ff\uac00-\ud7af]/,m="u">typeof Intl&&Intl.Segmenter?new Intl.Segmenter("zh",{granularity:"word"}):null;function n(a){let b=new Set,c=a.toLowerCase(),d=c.match(/[a-z0-9_$@#]+/g);if(d)for(let a of d)a.length>=2&&b.add(a);if(l.test(c))if(m)for(let{segment:a,isWordLike:d}of m.segment(c)){if(!d)continue;let c=a.trim();if(c)for(let a of(b.add(c),c))l.test(a)&&b.add(a)}else{let a=[];for(let d of c)l.test(d)?a.push(d):a.length>0&&(o(a,b),a.length=0);a.length>0&&o(a,b)}return b}function o(a,b){for(let c=0;c<a.length;c++)b.add(a[c]),c+1<a.length&&b.add(a[c]+a[c+1])}class p{rebuild(a){let b=(0,j.f)(a),c=new Map,d=new Map,e=new Map,f=0;for(let g of b){let b;try{b=(0,k.TA)(a,g)}catch{continue}d.set(g,b.length),f+=b.length,b.length>5e4&&(b=b.slice(0,5e4));let h=n(g+"\n"+b);for(let a of(e.set(g,h),h)){let b=c.get(a);b||(b=new Set,c.set(a,b)),b.add(g)}}this.invertedIndex=c,this.builtForRoot=a,this.fileCount=b.length,this.docLengths=d,this.totalChars=f,this.fileTokens=e}invalidate(){this.invertedIndex=null,this.builtForRoot=null,this.fileCount=0,this.docLengths.clear(),this.totalChars=0,this.fileTokens.clear()}removeFile(a){if(!this.invertedIndex)return;let b=this.fileTokens.get(a);if(b){for(let c of b)this.invertedIndex.get(c)?.delete(a);this.fileTokens.delete(a)}let c=this.docLengths.get(a)??0;this.totalChars-=c,this.docLengths.delete(a),this.fileCount=Math.max(0,this.fileCount-1)}addFile(a,b){let c;if(!this.invertedIndex)return;try{c=(0,k.TA)(a,b)}catch{return}this.docLengths.set(b,c.length),this.totalChars+=c.length,this.fileCount++,c.length>5e4&&(c=c.slice(0,5e4));let d=n(b+"\n"+c);for(let a of(this.fileTokens.set(b,d),d)){let c=this.invertedIndex.get(a);c||(c=new Set,this.invertedIndex.set(a,c)),c.add(b)}}updateFile(a,b){this.invertedIndex&&(this.removeFile(b),this.addFile(a,b))}isBuiltFor(a){return null!==this.invertedIndex&&this.builtForRoot===a}isBuilt(){return null!==this.invertedIndex}getFileCount(){return this.fileCount}getAvgDocLength(){return this.fileCount>0?this.totalChars/this.fileCount:0}getDocLength(a){return this.docLengths.get(a)??0}getDocFrequency(a){return this.invertedIndex?this.invertedIndex.get(a)?.size??0:0}getCandidatesUnion(a){if(!a.trim()||!this.invertedIndex)return null;let b=n(a.toLowerCase().trim());if(0===b.size)return null;let c=new Map;for(let a of b){let b=this.invertedIndex.get(a);if(b)for(let a of b)c.set(a,(c.get(a)??0)+1)}if(0===c.size)return[];let d=b.size;if(d>=3){let a=Math.max(1,Math.floor(d/2)),b=[...c.entries()].filter(([,b])=>b>=a).map(([a])=>a);if(b.length>0)return b}return[...c.keys()]}getCandidates(a){if(!a.trim()||!this.invertedIndex)return null;let b=n(a.toLowerCase().trim());if(0===b.size)return null;let c=null;for(let a of b){let b=this.invertedIndex.get(a);if(!b)return[];if(null===c)c=new Set(b);else{for(let a of c)b.has(a)||c.delete(a);if(0===c.size)return[]}}return c?Array.from(c):[]}persist(a){if(!this.invertedIndex)return;let b={version:1,builtForRoot:this.builtForRoot??"",fileCount:this.fileCount,totalChars:this.totalChars,docLengths:Object.fromEntries(this.docLengths),invertedIndex:{},timestamp:Date.now()};for(let[a,c]of this.invertedIndex)b.invertedIndex[a]=[...c];let c=g().join(a,"search-index.json");try{e().mkdirSync(a,{recursive:!0}),e().writeFileSync(c,JSON.stringify(b),"utf-8")}catch{}}load(a,b){let c,d,f=g().join(a,"search-index.json");try{c=e().readFileSync(f,"utf-8")}catch{return!1}try{d=JSON.parse(c)}catch{return!1}if(1!==d.version||d.builtForRoot!==b||(0,j.f)(b).length!==d.fileCount)return!1;let h=Object.keys(d.docLengths);if(Math.min(50,h.length)===h.length)for(let a of h)try{if(e().statSync(g().join(b,a)).mtimeMs>d.timestamp)return!1}catch{return!1}else{let a=Math.max(1,Math.floor(h.length/40)),c=new Set;for(let b=0;b<h.length;b+=a)c.add(b);for(let a=Math.max(0,h.length-10);a<h.length;a++)c.add(a);for(let a of c)try{if(e().statSync(g().join(b,h[a])).mtimeMs>d.timestamp)return!1}catch{return!1}}this.builtForRoot=d.builtForRoot,this.fileCount=d.fileCount,this.totalChars=d.totalChars,this.docLengths=new Map(Object.entries(d.docLengths).map(([a,b])=>[a,b]));let i=new Map,k=new Map;for(let[a,b]of Object.entries(d.invertedIndex)){let c=new Set(b);for(let b of(i.set(a,c),c)){let c=k.get(b);c||(c=new Set,k.set(b,c)),c.add(a)}}return this.invertedIndex=i,this.fileTokens=k,!0}constructor(){this.invertedIndex=null,this.builtForRoot=null,this.fileCount=0,this.docLengths=new Map,this.totalChars=0,this.fileTokens=new Map}}let q=new p;function r(){q.invalidate()}function s(a,b){q.isBuilt()&&(q.updateFile(a,b),w())}function t(a,b){q.isBuilt()&&(q.addFile(a,b),w())}let u=null,v=!1;function w(){v=!0,u&&clearTimeout(u),u=setTimeout(x,5e3)}function x(){if(u&&(clearTimeout(u),u=null),v){v=!1;try{q.persist(g().join(i().homedir(),".mindos"))}catch{}}}"u">typeof process&&(process.on("beforeExit",x),process.on("SIGTERM",()=>{x(),process.exit(0)}),process.on("SIGINT",()=>{x(),process.exit(0)}))},50953:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{El:()=>J,F2:()=>X,F3:()=>C,FN:()=>R,FR:()=>$,G1:()=>ab,H$:()=>D,H5:()=>N,JX:()=>n,Jh:()=>O,MG:()=>B,P2:()=>S,QX:()=>E,Se:()=>Q,WZ:()=>T,_K:()=>W,_P:()=>K,bd:()=>r,bv:()=>F,f:()=>G,fu:()=>L,g7:()=>_,gm:()=>s,mV:()=>Y,mZ:()=>A,rt:()=>P,tj:()=>Z,vV:()=>p,vg:()=>V,wd:()=>H,wf:()=>U,x3:()=>M,xY:()=>z,y3:()=>I,zK:()=>aa});var e=c(29021),f=c.n(e),g=c(33873),h=c.n(g),i=c(94241);c(11181);var j=c(3045),k=c(76223),l=c(59520),m=a([k]);function n(){return(0,k.kh)()}k=(m.then?(await m)():m)[0];let ac=new Set([".git","node_modules","app",".next",".DS_Store"]),ad=new Set([".md",".csv",".json"]),ae=null,af=0;function o(a){let b=y(a),c=[];return!function a(b){for(let d of b)"file"===d.type?c.push(d.path):d.children&&a(d.children)}(b),{tree:b,allFiles:c,timestamp:Date.now()}}function p(){if(ae&&!q()){let a=o(n()),b=!function(a,b){if(a.length!==b.length)return!1;let c=[...a].sort(),d=[...b].sort();return c.every((a,b)=>a===d[b])}(ae.allFiles,a.allFiles);ae=a,ak=null,b&&af++}return af}function q(){return null!==ae&&Date.now()-ae.timestamp<5e3}let ag=new j.Xs;function r(){let a=n();return ag.isBuiltFor(a)||ag.rebuild(a),ag}function s(){ae=null,ak=null,af++,(0,j._E)(),ag.invalidate()}function t(a){ae=null,ak=null,af++,(0,j.KZ)(n(),a),ag.isBuilt()&&ag.updateFile(n(),a)}function u(){if(q())return ae;let a=n();return ae=o(a),ah||function(){let a;if(!ah){try{a=n()}catch{return}try{(ah=f().watch(a,{recursive:!0},(a,b)=>{!b||b.startsWith(".git")||b.includes("node_modules")||b.includes(".next")||(ai&&clearTimeout(ai),ai=setTimeout(()=>{ae=null,ai=null},500))})).on("error",()=>{ai&&(clearTimeout(ai),ai=null),ah&&(ah.close(),ah=null)})}catch{ah=null}}}(),ae}let ah=null,ai=null;function v(a,b){try{let c=f().readFileSync(a,"utf-8"),d=[];for(let a of c.split("\n")){let c=a.trim();if(!(!c||c.startsWith("#"))&&(d.push(c),d.length>=b))break}return d}catch{return[]}}let aj=["Define local execution rules for this directory.","(your files here)","(Describe the purpose and usage of this space.)","(Add usage guidelines for this space.)"];function w(a){try{let b=f().readFileSync(a,"utf-8");return aj.some(a=>b.includes(a))}catch{return!1}}function x(a){let b=h().join(a,"INSTRUCTION.md"),c=h().join(a,"README.md");return{instructionLines:v(b,3),readmeLines:v(c,3),isTemplate:w(b)&&w(c)}}function y(a,b){let c,d=b??n();try{c=f().readdirSync(a,{withFileTypes:!0})}catch{return[]}let e=[];for(let b of c){let c=h().join(a,b.name),f=h().relative(d,c);if(b.isDirectory()){if(ac.has(b.name))continue;let a=y(c,d);if(a.length>0){let d=a.some(a=>"file"===a.type&&"INSTRUCTION.md"===a.name),g={name:b.name,path:f,type:"directory",children:a};d&&(g.isSpace=!0,g.spacePreview=x(c)),e.push(g)}}else if(b.isFile()){let a=h().extname(b.name).toLowerCase();ad.has(a)&&e.push({name:b.name,path:f,type:"file",extension:a})}}return e.sort((a,b)=>a.type!==b.type?"directory"===a.type?-1:1:a.name.localeCompare(b.name)),e}function z(){return u().tree}function A(){return(0,j.IE)(n(),u().tree)}function B(a){return(0,j.MG)(n(),a)}function C(a={}){return(0,j.F3)(n(),a)}function D(){(0,j.H$)(n())}function E(){return(0,j.QX)(n())}function F(a){let b=n(),c=h().join(b,a),d=h().join(c,"INSTRUCTION.md");return f().existsSync(d)?x(c):null}function G(){return u().allFiles}function H(a){try{let b=h().resolve(n()),c=h().resolve(h().join(b,a));return f().statSync(c).isDirectory()}catch{return!1}}function I(a){let b,c=n(),d=h().resolve(c),e=h().resolve(h().join(d,a));try{b=f().readdirSync(e,{withFileTypes:!0})}catch{return[]}let g=[];for(let a of b){if(ac.has(a.name))continue;let b=h().join(e,a.name),c=h().relative(d,b);if(a.isDirectory()){let d=y(b);d.length>0&&g.push({name:a.name,path:c,type:"directory",children:d})}else if(a.isFile()){let d=h().extname(a.name).toLowerCase();if(ad.has(d)){let e;try{e=f().statSync(b).mtimeMs}catch{}g.push({name:a.name,path:c,type:"file",extension:d,mtime:e})}}}return g.sort((a,b)=>a.type!==b.type?"directory"===a.type?-1:1:a.name.localeCompare(b.name)),g}function J(a=10){let b=n(),c=G().map(a=>{try{let c=h().join(b,a),d=f().statSync(c);return{path:a,mtime:d.mtimeMs}}catch{return null}}).filter(Boolean);return c.sort((a,b)=>b.mtime-a.mtime),c.slice(0,a)}function K(a){return(0,j.TA)(n(),a)}function L(a,b){(0,j._h)(n(),a,b),t(a)}function M(a,b=""){(0,j.x3)(n(),a,b),ae=null,ak=null,af++,(0,j.As)(n(),a),ag.isBuilt()&&ag.updateFile(n(),a)}function N(a,b){let c=(0,j.H5)(n(),a,b);return s(),c}function O(a,b){let c=(0,j.OV)(n(),a,b);return s(),c}function P(a){(0,j.rt)(n(),a),s()}function Q(a){return(0,j.Se)(n(),a)}function R(a,b,c){(0,j.FN)(n(),a,b,c),t(a)}function S(a,b,c,d){(0,j.updateLines)(n(),a,b,c,d),t(a)}function T(a,b){(0,j.WZ)(n(),a,b),t(a)}function U(a,b,c){(0,j.wf)(n(),a,b,c),t(a)}function V(a,b,c){(0,j.vg)(n(),a,b,c),t(a)}let ak=null;function W(a){if(!a.trim())return[];let{fuse:b}=function(){if(ak&&q())return ak;let a=G(),b=[];for(let c of a){let a;try{a=K(c)}catch{continue}a.length>5e4&&(a=a.slice(0,5e4)),b.push({path:c,fileName:h().basename(c),content:a})}return ak={fuse:new i.A(b,{keys:[{name:"fileName",weight:.3},{name:"path",weight:.2},{name:"content",weight:.5}],includeScore:!0,includeMatches:!0,threshold:.4,ignoreLocation:!0,minMatchCharLength:2,useExtendedSearch:!0}),documents:b,timestamp:Date.now()}}(),c=/[\u4e00-\u9fff\u3040-\u309f\u30a0-\u30ff\uac00-\ud7af]/.test(a)?`'${a}`:a;return b.search(c,{limit:20}).map(a=>{let b=a.item.path,c=a.item.content,d=1-(a.score??1),e=function(a,b){let c=b?.find(a=>"content"===a.key);if(!c||0===c.indices.length){let b=a.slice(0,120).replace(/\n/g," ").trim();return a.length>120?b+"...":b}let d=0,e=0,f=0;for(let[a,b]of c.indices){let c=b-a;c>f&&(d=a,e=b,f=c)}let g=Math.max(0,d-120),h=Math.min(a.length,e+120),i=g;if(i>0){let b=a.indexOf(" ",i);-1!==b&&b<d&&(i=b+1)}let j=h;if(j<a.length){let b=a.lastIndexOf(" ",j);b>e&&(j=b)}let k=a.slice(i,j).trim();return k=k.replace(/\n{2,}/g," ↵ "),i>0&&(k="..."+k),j<a.length&&(k+="..."),k}(c,a.matches),f=a.matches?.map(a=>({indices:a.indices,value:a.value??"",key:a.key??""}));return{path:b,snippet:e,score:d,matches:f}})}function X(a,b){let c=(0,j.F2)(n(),a,b);return s(),c}function Y(a,b){let c=(0,j.mV)(n(),a,b,j.G1);return s(),c}function Z(){return(0,j.tj)(n())}function $(a,b=10){return(0,j.FR)(n(),a,b)}function _(a,b){return(0,j.g7)(n(),a,b)}function aa(a){let b=(0,l.F0)(n(),a);return s(),b}function ab(a){let b=n(),c=r().getBacklinks(a);return(0,j.G1)(b,a,c)}d()}catch(a){d(a)}})},54948:(a,b,c)=>{c.d(b,{_c:()=>h,m_:()=>f,xH:()=>g});var d=c(33873),e=c.n(d);let f=new Set([".txt",".md",".markdown",".csv",".json",".yaml",".yml",".xml",".html",".htm",".pdf"]);function g(a){let b=a.replace(/\\/g,"/").split("/").pop()??"";return(b=(b=(b=(b=b.replace(/\.\./g,"").replace(/^\/+/,"")).replace(/[\\:*?"<>|]/g,"-")).replace(/-{2,}/g,"-")).replace(/^[-\s]+|[-\s]+$/g,""))||"imported-file"}function h(a,b){let c,d,f=e().extname(a).toLowerCase(),h=e().basename(a,f)||"note",i=0!==(d=((c=e().extname(a))?a.slice(0,-c.length):a).replace(/^\.+/,"").replace(/[-_]+/g," ").trim().split(/\s+/)).length&&(1!==d.length||d[0])?d.map(a=>a.charAt(0).toUpperCase()+a.slice(1)).join(" "):"Untitled";if(".md"===f||".markdown"===f||".csv"===f||".json"===f)return{content:b,originalName:a,targetName:g(a)};if(".txt"===f)return{content:`# ${i}
|
|
53
53
|
|
|
54
54
|
${b}`,originalName:a,targetName:g(`${h}.md`)};if(".yaml"===f||".yml"===f)return{content:`# ${i}
|
|
55
55
|
|