[
  {
    "path": ".gitignore",
    "content": "node_modules"
  },
  {
    "path": "CONTRIBUTING.md",
    "content": "### contribution guide [merge from /dev here]"
  },
  {
    "path": "LICENSE",
    "content": "MIT License\n\nCopyright (c) [year] [fullname]\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE."
  },
  {
    "path": "README.md",
    "content": "\n![cofounder-og-black](https://github.com/user-attachments/assets/b4e51f02-59e4-4540-ac14-e1f40e20a658)\n\n# Cofounder | Early alpha release\n\n* project - [cofounder.openinterface.ai](https://cofounder.openinterface.ai)\n* 👋 [@n_raidenai](https://x.com/n_raidenai)\n\n**cofounder**\n- full stack generative web apps ; backend + db + stateful web apps\n- gen ui rooted in app architecture, with ai-guided mockup designer & modular design systems\n\n---\n\n# Early Alpha : Unstable ⚠️\n\nThe following points are very emphasized :\n\n- This is an **EARLY, UNSTABLE, PREVIEW RELEASE** of the project. ⚠️ Until v1 is released, it is expected to break often. \n- **It consumes a lot of tokens**. If you are on a tokens budget, wait until v1 is released.\n- Again, this is an early, unstable release. A first test run. An early preview of the project's ideas. Far from completion. Open-source iterative development. Work in progress. Unstable early alpha release. [etc]\n\n### **If any of these might be issues for you, even in the slightest way, wait until v1 is released ! Do not try the current release !**\n\nTo help you guide your decision on whether or not to try the current release , here is a guide\n\n| Situation                                                                                             | Recommendation         |\n|------------------------------------------------------------------------------------------------------|------------------------|\n| I'm not sure if this tool release is mature yet, maybe it will not work as intended and I may spend millions of tokens for nothing | Do not use it yet      |\n| I am very excited about this tool, I hope it is perfectly production-ready, because if it's not, I will make commentary about `I spent X amount on OpenAI API calls` | Do not use it yet      |\n| I am not interested in code. I want to type words into a box and have my project completed; I do not want messy broken unfinished code | Do not use it yet      |\n| I love exploring experimental tools but I am on the fence. It's going to break halfway and leave me sad | Do not use it yet      |\n| Who should even try it at this point?                                                                | Nobody. Do not use it yet |\n| But I really want to use it for some esoteric reason having read all the above.                       | Do not use it yet either |\n\n\n---\n\n\nhttps://github.com/user-attachments/assets/cfd09250-d21e-49fc-a29b-fa0c661abfc0\n\nhttps://github.com/user-attachments/assets/c055f9c4-6bc0-4b11-ba8f-cc9f149387fa\n\n---\n\n## Important\n\n**Early alpha release ; earlier than expected by few weeks**\n\nStill not merged with key target features of the project, notably :\n- project iteration modules for all dimensions of generated projects\n- admin interface for event streams and (deeper) project iterations\n- integrate the full genUI plugin :\n  * generative design systems\n  * deploy finetuned models & serve from api.cofounder\n- local, browser-based dev env for the entire project scope\n- add { react-native , flutter , other web frameworks }\n- validations & swarm code review and autofix\n- code optimization\n- [...]\n\nbe patient :)\n\n---\n\n# Usage\n\n## Install & Init\n\n* Open your terminal and run\n\n```sh\nnpx @openinterface/cofounder\n```\n\nFollow the instructions. The installer \n- will ask you for your keys\n- setup dirs & start installs\n- will start the local `cofounder/api` builder and server\n- will open the web dashboard where you can create new projects (at `http://localhost:4200` ) 🎉\n\n```\nnote :\nyou will be asked for a cofounder.openinterface.ai key\nit is recommended to use one as it enables the designer/layoutv1 and swarm/external-apis features\nand can be used without limits during the current early alpha period\n\nthe full index will be available for local download on v1 release\n```\n\n- currently using `node v22` for the whole project. \n\n\n\n```sh\n# alternatively, you can make a new project without going through the dashboard\n# by runing :\nnpx @openinterface/cofounder -p \"YourAppProjectName\" -d \"describe your app here\" -a \"(optional) design instructions\"\n```\n\n\n## Run Generated Apps\n\n- Your backend & vite+react web app will incrementally generate inside `./apps/{YourApp}`\nOpen your terminal in `./apps/{YourApp}` and run\n\n```sh\nnpm i && npm run dev\n```\n\nIt will start both the backend and vite+react, concurrently, after installing their dependencies\nGo to `http://localhost:5173/` to open the web app 🎉\n\n\n- From within the generated apps , you can use ⌘+K / Ctrl+K to iterate on UI components\n\n[more details later]\n\n## Notes\n\n### Dashboard & Local API\n\nIf you resume later and would like to iterate on your generated apps,\nthe local `./cofounder/api` server needs to be running to receive queries\n\nYou can (re)start the `local cofounder API` running the following command from `./cofounder/api`\n\n```sh\nnpm run start\n```\n\nThe dashboard will open in `http://localhost:4200`\n\n\n- note: You can also generate new apps from the same env, without the the dashboard, by running, from `./cofounder/api`, one of these commands\n    \n    ```sh\n    npm run start -- -p \"ProjectName\" -f \"some app description\" -a \"minimalist and spacious , light theme\"\n    npm run start -- -p \"ProjectName\" -f \"./example_description.txt\" -a \"minimalist and spacious , light theme\"\n    ```\n\n### Concurrency\n\n**[the architecture will be further detailed and documented later]**\n\nEvery \"node\" in the `cofounder` architecture has a defined configuration under `./cofounder/api/system/structure/nodes/{category}/{name}.yaml` to handle things like concurrency, retries and limits per time interval\n\nFor example, if you want multiple LLM generations to run in parallel (when possible - sequences and parallels are defined in DAGS under `./cofounder/api/system/structure/sequences/{definition}.yaml` ),\ngo to\n\n```yaml\n#./cofounder/api/system/structure/nodes/op/llm.yaml\nnodes:\n op:LLM::GEN:\n  desc: \"...\"\n  in: [model, messages, preparser, parser, query, stream]\n  out: [generated, usage]\n  queue:\n   concurrency: 1 # <------------------------------- here \n op:LLM::VECTORIZE:\n  desc: \"{texts} -> {vectors}\"\n  in: [texts]\n  out: [vectors, usage]\n mapreduce: true\n op:LLM::VECTORIZE:CHUNK:\n  desc: \"{texts} -> {vectors}\"\n  in: [texts]\n  out: [vectors, usage]\n  queue:\n   concurrency: 50\n```\n\nand change the `op:LLM::GEN` parameter `concurrency` to a higher value\n\nThe default LLM concurrency is set to `2` so you can see what's happening in your console streams step by step - but you can increment it depending on your api keys limits\n\n---\n\n# Changelog\n\n---\n\n# Roadmap\n\n---\n\n# Benchmarks\n\n---\n\n# Community & Links\n\n- [![Cofounder](https://img.shields.io/badge/Cofounder-gray?style=for-the-badge&logo=discord&link=https://discord.gg/2kVMzeASj9)](https://discord.gg/2kVMzeASj9) | Community discord server by @flamecoders\n\n---\n\n# Docs, Design Systems, ...\n\n**[WIP]**\n\n---\n\n# Architecture\n\n[more details later]\n\narchi/v1 is as follows :\n\n![architecture](https://github.com/user-attachments/assets/b2d8b70e-7a6d-45c9-a706-0cf955d13451)\n\n\n---\n\n# Credits\n\n- Demo design systems built using Figma renders / UI kits from:\n  * blocks.pm by Hexa Plugin (see `cofounder/api/system/presets`)\n  * google material\n  * figma core\n  * shadcn\n- Dashboard node-based ui powered by [react flow](https://reactflow.dev/)\n"
  },
  {
    "path": "ROADMAP.md",
    "content": "### roadmap to v1 [merge from /dev here]"
  },
  {
    "path": "TODO.md",
    "content": "A non-ordered roadmap & todo dump\nwill update with proper map later, ignore for now\n\n---\n\n## nearest\nmerge with browser-based local dev env using webcontainers ; console.cofounder.openinterface.ai\n\n## validation, errorfix\npost-generation validation swarm modules\nswarm autofix modules, merge\nbabel parse\n\n## build, deploy\nvite plugin to generate web app without the cofounder modules\ngenerate packed projects ready for deployment\nautomate deployments, integrate different services\n\n## design, layouts\nplug in advanced designer + models\ndocument how to custom design systems\nadd & index docs for shiny design systems\nfonts / css modules\nrelease extensive cofounder index on api access for layout designer to use\nseparate {desktop,mobile} in designer\nRAG on icons via {text/clip} (like in openv0), maybe as a vite plugin\n\n## functional\ndeploy latest index checkpoint in api.cofounder\n\n## mgmt\nmore iteration modules, sequences to handle full lifecycle of generated projects\ndocument everything\n\n## platforms\nreact-native / flutter\nmore frontend frameworks\n\n## project\ntechnical articles\nmodel train & serve from api\nadmin panel à la coolify\n\n## also\nSEO stuff\nanalytics into the dev feedback\nanimation (ie. framer-motion)\nfunctional, api, python support api-side\nbenchmarks"
  },
  {
    "path": "apps/README.md",
    "content": "## How to start apps\n\nYour backend & vite+react web app will incrementally generate inside `./apps/{YourApp}`\nOpen your terminal in `./apps/{YourApp}` and run\n\n```sh\nnpm i && npm run dev\n```\n"
  },
  {
    "path": "benchmarks/README.md",
    "content": "### benchmark cases [merge from /dev here]"
  },
  {
    "path": "cofounder/api/.gitignore",
    "content": "node_modules/\ndump/"
  },
  {
    "path": "cofounder/api/.prettierignore",
    "content": "db/\ndump/\ndist/\nnode_modules/"
  },
  {
    "path": "cofounder/api/.prettierrc",
    "content": "{\n\t\"tabWidth\": 1,\n\t\"useTabs\": true\n}\n"
  },
  {
    "path": "cofounder/api/README.md",
    "content": ""
  },
  {
    "path": "cofounder/api/build.js",
    "content": "import fs from \"fs\";\nimport path from \"path\";\nimport yaml from \"yaml-js\";\nimport yml from \"yaml\";\nimport { merge, fromPairs } from \"lodash-es\";\nimport retry from \"async-retry\";\nimport pqueue from \"p-queue\";\nimport { EventEmitter } from \"node:events\";\nimport { promisify } from \"util\";\nimport { readdir } from \"fs\";\nimport delay from \"delay\";\n\nconst functionsDir = `./system/functions`;\nconst unitsDir = `./system/structure`;\nconst LOGS_ENABLED = true;\n\nasync function build({ system }) {\n\tconsole.dir({ build: system.functions });\n\n\tif (!system.nodes) system.nodes = {};\n\tif (!system.functions) system.functions = {};\n\tif (!system.sequences) system.sequences = {};\n\n\tconst queues = {};\n\tconst events = {\n\t\tmain: new EventEmitter(),\n\t\tlog: {\n\t\t\tnode: new EventEmitter(),\n\t\t\tsequence: new EventEmitter(),\n\t\t},\n\t};\n\n\tif (LOGS_ENABLED) {\n\t\tevents.log.node.on(`enqueue`, ({ id, context, data }) => {\n\t\t\tconsole.log(\n\t\t\t\t`\\x1b[36mlog:enqueue:  node:${id}\\t${JSON.stringify({ context, data }).slice(0, 150)}\\x1b[0m`,\n\t\t\t);\n\t\t});\n\t\tevents.log.node.on(`start`, ({ id, context, data }) => {\n\t\t\tconsole.log(\n\t\t\t\t`\\x1b[33mlog:start:    node:${id}\\t${JSON.stringify({ context, data }).slice(0, 150)}\\x1b[0m`,\n\t\t\t);\n\t\t});\n\t\tevents.log.node.on(`end`, ({ id, context, data, response }) => {\n\t\t\tconsole.log(\n\t\t\t\t`\\x1b[32mlog:complete: node:${id}\\t${JSON.stringify({ context, response, data }).slice(0, 150)}\\x1b[0m`,\n\t\t\t);\n\t\t});\n\t}\n\n\tsystem.run = async ({ id, context, data }) => {\n\t\t// console.dir({ __debug__system__run : { input : { id, context, data }, system_nodes: system.nodes, } })\n\t\ttry {\n\t\t\treturn await system.nodes[id].run({ context, data });\n\t\t} catch (err) {\n\t\t\tconsole.dir({ SYSTEM_RUN_ERR: { err, id } });\n\t\t}\n\t};\n\n\tevents.main.on(`run`, async ({ id, context, data }) => {\n\t\tif (LOGS_ENABLED) {\n\t\t\tconsole.log(`\\x1b[31mevent:\\`run\\` →id:${id}\\x1b[0m`);\n\t\t}\n\t\tawait system.run({ id, context, data });\n\t});\n\n\tsystem.nodes = fromPairs(\n\t\tawait Promise.all(\n\t\t\tObject.keys(system.functions)\n\t\t\t\t.filter((id) => Object.keys(system.nodes).includes(id))\n\t\t\t\t.map(async (id) => {\n\t\t\t\t\tqueues[id] = new pqueue({\n\t\t\t\t\t\tconcurrency: parseInt(system.nodes[id].queue?.concurrency) || Infinity,\n\t\t\t\t\t\tintervalCap:\n\t\t\t\t\t\t\tparseInt(system.nodes[id].queue?.interval?.limit) || Infinity,\n\t\t\t\t\t\tinterval: parseInt(system.nodes[id].queue?.interval?.time) || 0,\n\t\t\t\t\t\ttimeout: parseInt(system.nodes[id].queue?.timeout) || undefined,\n\t\t\t\t\t});\n\t\t\t\t\t// this is the function to be ran\n\t\t\t\t\tconst fn = async ({ context = {}, data = {} }) => {\n\t\t\t\t\t\tevents.log.node.emit(`enqueue`, { id, context, data });\n\t\t\t\t\t\treturn await queues[id].add(async () => {\n\t\t\t\t\t\t\tevents.log.node.emit(`start`, { id, context, data });\n\t\t\t\t\t\t\tconst response = await retry(\n\t\t\t\t\t\t\t\tasync (bail) => {\n\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\tconst fnresponse = await system.functions[id]({\n\t\t\t\t\t\t\t\t\t\t\tcontext: { ...context, run: system.run },\n\t\t\t\t\t\t\t\t\t\t\tdata: system.nodes[id].in?.length\n\t\t\t\t\t\t\t\t\t\t\t\t? system.nodes[id].in.reduce(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t(acc, inp) => ({ ...acc, [inp]: data[inp] || null }),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{},\n\t\t\t\t\t\t\t\t\t\t\t\t\t) // higher perf than fromPairs ?\n\t\t\t\t\t\t\t\t\t\t\t\t: data,\n\t\t\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t\t\treturn !fnresponse\n\t\t\t\t\t\t\t\t\t\t\t? { success: false }\n\t\t\t\t\t\t\t\t\t\t\t: system.nodes[id].out?.length\n\t\t\t\t\t\t\t\t\t\t\t\t? system.nodes[id].out.reduce(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t(acc, inp) => ({ ...acc, [inp]: fnresponse[inp] || null }),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{},\n\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t: fnresponse;\n\t\t\t\t\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\t\t\t\t\tconsole.dir({ asyncretry_error: { id, error } }, { depth: null });\n\t\t\t\t\t\t\t\t\t\tthrow new Error(error);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tretries: parseInt(system.nodes[id].queue?.retry) || 5,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tevents.log.node.emit(`end`, { id, context, data, response });\n\t\t\t\t\t\t\treturn response;\n\t\t\t\t\t\t});\n\t\t\t\t\t};\n\n\t\t\t\t\treturn [\n\t\t\t\t\t\tid,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttype: `node`,\n\t\t\t\t\t\t\tmeta: system.nodes[id],\n\t\t\t\t\t\t\trun: fn,\n\t\t\t\t\t\t}, // to have same format as sequence : system.sequences[id].run and system.functions[id].run\n\t\t\t\t\t];\n\t\t\t\t}),\n\t\t),\n\t);\n\t/*\n    make the DAG graph decomposition parallelizor from the system and relations\n    handle : seq , parallel , recursion too !\n  */\n\t/*\n    event registration for system triggers (nodes are all registered for events node:{id} )\n  */\n\n\tif (LOGS_ENABLED) {\n\t\tevents.log.sequence.on(`sequence:start`, ({ id, context, data }) => {\n\t\t\tconsole.log(\n\t\t\t\t`\\x1b[34mlog:start:  sequence:${id}\\t${JSON.stringify({ context, data }).slice(0, 150)}\\x1b[0m`,\n\t\t\t);\n\t\t});\n\t\tevents.log.sequence.on(\n\t\t\t`sequence:step:start`,\n\t\t\t({ id, index, over, context, data }) => {\n\t\t\t\tconsole.log(\n\t\t\t\t\t`\\x1b[34mlog:start:  sequence:${id}:step:${index}/${over - 1}\\t${JSON.stringify({ context, data }).slice(0, 150)}\\x1b[0m`,\n\t\t\t\t);\n\t\t\t},\n\t\t);\n\t\tevents.log.sequence.on(\n\t\t\t`sequence:step:end`,\n\t\t\t({ id, index, over, context, data }) => {\n\t\t\t\tconsole.log(\n\t\t\t\t\t`\\x1b[35mlog:done:   sequence:${id}:step:${index}/${over - 1}\\t${JSON.stringify({ context, data }).slice(0, 150)}\\x1b[0m`,\n\t\t\t\t);\n\t\t\t},\n\t\t);\n\t\tevents.log.sequence.on(`sequence:end`, ({ id, context, data }) => {\n\t\t\tconsole.log(\n\t\t\t\t`\\x1b[35mlog:done:   sequence:${id}\\t${JSON.stringify({ context, data }).slice(0, 150)}\\x1b[0m`,\n\t\t\t);\n\t\t});\n\t}\n\n\tasync function makeDags() {\n\t\t// need to implement recursion cases next !\n\t\treturn fromPairs(\n\t\t\tObject.keys(system.sequences).map((sequenceId) => {\n\t\t\t\tconst inDegree = {},\n\t\t\t\t\tadjList = {};\n\t\t\t\tconst seq = system.sequences[sequenceId];\n\t\t\t\tconst dag = fromPairs(\n\t\t\t\t\tsystem.sequences[sequenceId].nodes.map((nodeId) => {\n\t\t\t\t\t\treturn [\n\t\t\t\t\t\t\tnodeId,\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tparents: !seq.relations?.parents\n\t\t\t\t\t\t\t\t\t? []\n\t\t\t\t\t\t\t\t\t: !seq.relations?.parents[nodeId]?.length\n\t\t\t\t\t\t\t\t\t\t? []\n\t\t\t\t\t\t\t\t\t\t: seq.relations.parents[nodeId],\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t];\n\t\t\t\t\t}),\n\t\t\t\t);\n\t\t\t\tObject.keys(dag).forEach((node) => {\n\t\t\t\t\tinDegree[node] = 0;\n\t\t\t\t\tadjList[node] = [];\n\t\t\t\t});\n\t\t\t\tObject.entries(dag).forEach(([node, { parents }]) => {\n\t\t\t\t\tif (parents) {\n\t\t\t\t\t\tparents.forEach((parent) => {\n\t\t\t\t\t\t\tif (!adjList[parent]) {\n\t\t\t\t\t\t\t\tconsole.error(\n\t\t\t\t\t\t\t\t\t`build:DAG : parent node ${parent} of node ${node} not found in DAG - skipping dependency`,\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tadjList[parent].push(node);\n\t\t\t\t\t\t\t\tinDegree[node]++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tconst queue = Object.keys(inDegree).filter((node) => inDegree[node] === 0);\n\t\t\t\tconst sequence = [],\n\t\t\t\t\tvisitedNodes = new Set();\n\t\t\t\twhile (queue.length) {\n\t\t\t\t\tconst currentLevel = queue.splice(0, queue.length);\n\t\t\t\t\tcurrentLevel.forEach((node) => {\n\t\t\t\t\t\tvisitedNodes.add(node);\n\t\t\t\t\t\tadjList[node].forEach((neighbor) => {\n\t\t\t\t\t\t\tif (--inDegree[neighbor] === 0) queue.push(neighbor);\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t\tsequence.push(currentLevel);\n\t\t\t\t}\n\t\t\t\tif (visitedNodes.size !== Object.keys(dag).length) {\n\t\t\t\t\tconsole.dir({ dag, visitedNodes }, { depth: null });\n\t\t\t\t\tthrow new Error(\"The provided DAG has cycles or unresolved dependencies\");\n\t\t\t\t}\n\n\t\t\t\t// later ; update for logging etc\n\t\t\t\tconst run = async ({ context, data }) => {\n\t\t\t\t\tevents.log.sequence.emit(`sequence:start`, {\n\t\t\t\t\t\tid: sequenceId,\n\t\t\t\t\t\tcontext,\n\t\t\t\t\t\tdata,\n\t\t\t\t\t});\n\t\t\t\t\tconst sequenceLength = sequence.length;\n\t\t\t\t\tif (context.sequence) {\n\t\t\t\t\t\tconsole.dir({ \"debug:build:context:sequence\": context.sequence });\n\t\t\t\t\t}\n\t\t\t\t\tconst resume_at = context?.sequence?.resume ? context.sequence.resume : 0;\n\t\t\t\t\tlet step_index = -1;\n\t\t\t\t\tfor (const s of sequence.entries()) {\n\t\t\t\t\t\tstep_index++;\n\t\t\t\t\t\tif (step_index >= resume_at) {\n\t\t\t\t\t\t\tconst [index, step] = s;\n\t\t\t\t\t\t\tevents.log.sequence.emit(`sequence:step:start`, {\n\t\t\t\t\t\t\t\tid: sequenceId,\n\t\t\t\t\t\t\t\tindex,\n\t\t\t\t\t\t\t\tover: sequenceLength,\n\t\t\t\t\t\t\t\tcontext,\n\t\t\t\t\t\t\t\tdata,\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tawait Promise.all(\n\t\t\t\t\t\t\t\tstep.map(async (parallelfnId) => {\n\t\t\t\t\t\t\t\t\tconst response = await system.run({\n\t\t\t\t\t\t\t\t\t\tid: parallelfnId,\n\t\t\t\t\t\t\t\t\t\tcontext: { ...context, run: system.run },\n\t\t\t\t\t\t\t\t\t\tdata,\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\tdata = merge(data, response);\n\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tevents.log.sequence.emit(`sequence:step:end`, {\n\t\t\t\t\t\t\t\tid: sequenceId,\n\t\t\t\t\t\t\t\tindex,\n\t\t\t\t\t\t\t\tover: sequenceLength,\n\t\t\t\t\t\t\t\tcontext,\n\t\t\t\t\t\t\t\tdata,\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tevents.log.sequence.emit(`sequence:end`, {\n\t\t\t\t\t\tid: sequenceId,\n\t\t\t\t\t\tcontext,\n\t\t\t\t\t\tdata,\n\t\t\t\t\t});\n\t\t\t\t\treturn data;\n\t\t\t\t};\n\t\t\t\tif (system.sequences[sequenceId].triggers?.length) {\n\t\t\t\t\tsystem.sequences[sequenceId].triggers.map((triggerevent) => {\n\t\t\t\t\t\tevents.main.on(triggerevent, async ({ context, data }) => {\n\t\t\t\t\t\t\tif (LOGS_ENABLED) {\n\t\t\t\t\t\t\t\tconsole.log(\n\t\t\t\t\t\t\t\t\t`\\x1b[31mevent:\\`${triggerevent}\\` →sequence:${sequenceId}\\x1b[0m`,\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tawait run({ context, data });\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn [\n\t\t\t\t\tsequenceId,\n\t\t\t\t\t{\n\t\t\t\t\t\ttype: `sequence`,\n\t\t\t\t\t\tmeta: {\n\t\t\t\t\t\t\t...system.sequences[sequenceId],\n\t\t\t\t\t\t\tdag: sequence,\n\t\t\t\t\t\t},\n\t\t\t\t\t\trun,\n\t\t\t\t\t},\n\t\t\t\t];\n\t\t\t}),\n\t\t);\n\t}\n\tsystem.nodes = {\n\t\t...system.nodes,\n\t\t...(await makeDags()),\n\t};\n\n\tsystem.queues = queues;\n\tsystem.events = {\n\t\tevents,\n\t\tnew: async ({ event, context = {}, data = {} }) => {\n\t\t\tevents.main.emit(event, { context, data });\n\t\t}, // trigger events\n\t\trun: async ({ id = false, context = {}, data = {} }) => {\n\t\t\tevents.main.emit(`run`, { id, context, data });\n\t\t}, // run node/seq events\n\t};\n\n\treturn system;\n}\n\nconst readdirAsync = promisify(readdir);\nasync function getFilesRecursively(dir, ext) {\n\tlet results = [];\n\tconst list = await readdirAsync(dir, { withFileTypes: true });\n\tfor (const file of list) {\n\t\tconst filePath = path.join(dir, file.name);\n\t\tif (file.isDirectory()) {\n\t\t\tresults = results.concat(await getFilesRecursively(filePath, ext));\n\t\t} else if (file.name.endsWith(ext)) {\n\t\t\tresults.push(filePath);\n\t\t}\n\t}\n\treturn results;\n}\nconst system = await build({\n\tsystem: {\n\t\tfunctions: merge(\n\t\t\t{},\n\t\t\t...(await Promise.all(\n\t\t\t\t(await getFilesRecursively(functionsDir, \".js\")).map((file) =>\n\t\t\t\t\timport(`./${file}`).then((m) => m.default),\n\t\t\t\t),\n\t\t\t)),\n\t\t),\n\t\t...merge(\n\t\t\t{},\n\t\t\t...(await Promise.all(\n\t\t\t\t(await getFilesRecursively(unitsDir, \".yaml\")).map((file) =>\n\t\t\t\t\tyaml.load(fs.readFileSync(`./${file}`, `utf-8`).toString()),\n\t\t\t\t),\n\t\t\t)),\n\t\t),\n\t},\n});\n\nexport default {\n\tsystem,\n};\n"
  },
  {
    "path": "cofounder/api/db/README.md",
    "content": ""
  },
  {
    "path": "cofounder/api/db/index/README.md",
    "content": ""
  },
  {
    "path": "cofounder/api/db/projects/README.md",
    "content": ""
  },
  {
    "path": "cofounder/api/db/storage/README.md",
    "content": ""
  },
  {
    "path": "cofounder/api/dist/assets/index-B1d7LZHm.js",
    "content": "var Wj=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Ghe=Wj((pn,mn)=>{function Kj(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!=\"string\"&&!Array.isArray(r)){for(const i in r)if(i!==\"default\"&&!(i in e)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}))}(function(){const t=document.createElement(\"link\").relList;if(t&&t.supports&&t.supports(\"modulepreload\"))return;for(const i of document.querySelectorAll('link[rel=\"modulepreload\"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type===\"childList\")for(const o of s.addedNodes)o.tagName===\"LINK\"&&o.rel===\"modulepreload\"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin===\"use-credentials\"?s.credentials=\"include\":i.crossOrigin===\"anonymous\"?s.credentials=\"omit\":s.credentials=\"same-origin\",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();var la=typeof globalThis<\"u\"?globalThis:typeof window<\"u\"?window:typeof global<\"u\"?global:typeof self<\"u\"?self:{};function ci(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,\"default\")?e.default:e}var qT={exports:{}},Sh={},YT={exports:{}},ke={};/**\n * @license React\n * react.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */var Xu=Symbol.for(\"react.element\"),qj=Symbol.for(\"react.portal\"),Yj=Symbol.for(\"react.fragment\"),Gj=Symbol.for(\"react.strict_mode\"),Xj=Symbol.for(\"react.profiler\"),Qj=Symbol.for(\"react.provider\"),Zj=Symbol.for(\"react.context\"),Jj=Symbol.for(\"react.forward_ref\"),eF=Symbol.for(\"react.suspense\"),tF=Symbol.for(\"react.memo\"),nF=Symbol.for(\"react.lazy\"),O1=Symbol.iterator;function rF(e){return e===null||typeof e!=\"object\"?null:(e=O1&&e[O1]||e[\"@@iterator\"],typeof e==\"function\"?e:null)}var GT={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},XT=Object.assign,QT={};function Pa(e,t,n){this.props=e,this.context=t,this.refs=QT,this.updater=n||GT}Pa.prototype.isReactComponent={};Pa.prototype.setState=function(e,t){if(typeof e!=\"object\"&&typeof e!=\"function\"&&e!=null)throw Error(\"setState(...): takes an object of state variables to update or a function which returns an object of state variables.\");this.updater.enqueueSetState(this,e,t,\"setState\")};Pa.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,\"forceUpdate\")};function ZT(){}ZT.prototype=Pa.prototype;function sv(e,t,n){this.props=e,this.context=t,this.refs=QT,this.updater=n||GT}var ov=sv.prototype=new ZT;ov.constructor=sv;XT(ov,Pa.prototype);ov.isPureReactComponent=!0;var L1=Array.isArray,JT=Object.prototype.hasOwnProperty,av={current:null},e_={key:!0,ref:!0,__self:!0,__source:!0};function t_(e,t,n){var r,i={},s=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(s=\"\"+t.key),t)JT.call(t,r)&&!e_.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var l=Array(a),u=0;u<a;u++)l[u]=arguments[u+2];i.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)i[r]===void 0&&(i[r]=a[r]);return{$$typeof:Xu,type:e,key:s,ref:o,props:i,_owner:av.current}}function iF(e,t){return{$$typeof:Xu,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function lv(e){return typeof e==\"object\"&&e!==null&&e.$$typeof===Xu}function sF(e){var t={\"=\":\"=0\",\":\":\"=2\"};return\"$\"+e.replace(/[=:]/g,function(n){return t[n]})}var R1=/\\/+/g;function Xp(e,t){return typeof e==\"object\"&&e!==null&&e.key!=null?sF(\"\"+e.key):t.toString(36)}function Sf(e,t,n,r,i){var s=typeof e;(s===\"undefined\"||s===\"boolean\")&&(e=null);var o=!1;if(e===null)o=!0;else switch(s){case\"string\":case\"number\":o=!0;break;case\"object\":switch(e.$$typeof){case Xu:case qj:o=!0}}if(o)return o=e,i=i(o),e=r===\"\"?\".\"+Xp(o,0):r,L1(i)?(n=\"\",e!=null&&(n=e.replace(R1,\"$&/\")+\"/\"),Sf(i,t,n,\"\",function(u){return u})):i!=null&&(lv(i)&&(i=iF(i,n+(!i.key||o&&o.key===i.key?\"\":(\"\"+i.key).replace(R1,\"$&/\")+\"/\")+e)),t.push(i)),1;if(o=0,r=r===\"\"?\".\":r+\":\",L1(e))for(var a=0;a<e.length;a++){s=e[a];var l=r+Xp(s,a);o+=Sf(s,t,n,l,i)}else if(l=rF(e),typeof l==\"function\")for(e=l.call(e),a=0;!(s=e.next()).done;)s=s.value,l=r+Xp(s,a++),o+=Sf(s,t,n,l,i);else if(s===\"object\")throw t=String(e),Error(\"Objects are not valid as a React child (found: \"+(t===\"[object Object]\"?\"object with keys {\"+Object.keys(e).join(\", \")+\"}\":t)+\"). If you meant to render a collection of children, use an array instead.\");return o}function Tc(e,t,n){if(e==null)return e;var r=[],i=0;return Sf(e,r,\"\",\"\",function(s){return t.call(n,s,i++)}),r}function oF(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Vt={current:null},kf={transition:null},aF={ReactCurrentDispatcher:Vt,ReactCurrentBatchConfig:kf,ReactCurrentOwner:av};function n_(){throw Error(\"act(...) is not supported in production builds of React.\")}ke.Children={map:Tc,forEach:function(e,t,n){Tc(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Tc(e,function(){t++}),t},toArray:function(e){return Tc(e,function(t){return t})||[]},only:function(e){if(!lv(e))throw Error(\"React.Children.only expected to receive a single React element child.\");return e}};ke.Component=Pa;ke.Fragment=Yj;ke.Profiler=Xj;ke.PureComponent=sv;ke.StrictMode=Gj;ke.Suspense=eF;ke.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=aF;ke.act=n_;ke.cloneElement=function(e,t,n){if(e==null)throw Error(\"React.cloneElement(...): The argument must be a React element, but you passed \"+e+\".\");var r=XT({},e.props),i=e.key,s=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,o=av.current),t.key!==void 0&&(i=\"\"+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)JT.call(t,l)&&!e_.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var u=0;u<l;u++)a[u]=arguments[u+2];r.children=a}return{$$typeof:Xu,type:e.type,key:i,ref:s,props:r,_owner:o}};ke.createContext=function(e){return e={$$typeof:Zj,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Qj,_context:e},e.Consumer=e};ke.createElement=t_;ke.createFactory=function(e){var t=t_.bind(null,e);return t.type=e,t};ke.createRef=function(){return{current:null}};ke.forwardRef=function(e){return{$$typeof:Jj,render:e}};ke.isValidElement=lv;ke.lazy=function(e){return{$$typeof:nF,_payload:{_status:-1,_result:e},_init:oF}};ke.memo=function(e,t){return{$$typeof:tF,type:e,compare:t===void 0?null:t}};ke.startTransition=function(e){var t=kf.transition;kf.transition={};try{e()}finally{kf.transition=t}};ke.unstable_act=n_;ke.useCallback=function(e,t){return Vt.current.useCallback(e,t)};ke.useContext=function(e){return Vt.current.useContext(e)};ke.useDebugValue=function(){};ke.useDeferredValue=function(e){return Vt.current.useDeferredValue(e)};ke.useEffect=function(e,t){return Vt.current.useEffect(e,t)};ke.useId=function(){return Vt.current.useId()};ke.useImperativeHandle=function(e,t,n){return Vt.current.useImperativeHandle(e,t,n)};ke.useInsertionEffect=function(e,t){return Vt.current.useInsertionEffect(e,t)};ke.useLayoutEffect=function(e,t){return Vt.current.useLayoutEffect(e,t)};ke.useMemo=function(e,t){return Vt.current.useMemo(e,t)};ke.useReducer=function(e,t,n){return Vt.current.useReducer(e,t,n)};ke.useRef=function(e){return Vt.current.useRef(e)};ke.useState=function(e){return Vt.current.useState(e)};ke.useSyncExternalStore=function(e,t,n){return Vt.current.useSyncExternalStore(e,t,n)};ke.useTransition=function(){return Vt.current.useTransition()};ke.version=\"18.3.1\";YT.exports=ke;var E=YT.exports;const we=ci(E),ld=Kj({__proto__:null,default:we},[E]);/**\n * @license React\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */var lF=E,uF=Symbol.for(\"react.element\"),cF=Symbol.for(\"react.fragment\"),fF=Object.prototype.hasOwnProperty,dF=lF.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,hF={key:!0,ref:!0,__self:!0,__source:!0};function r_(e,t,n){var r,i={},s=null,o=null;n!==void 0&&(s=\"\"+n),t.key!==void 0&&(s=\"\"+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)fF.call(t,r)&&!hF.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:uF,type:e,key:s,ref:o,props:i,_owner:dF.current}}Sh.Fragment=cF;Sh.jsx=r_;Sh.jsxs=r_;qT.exports=Sh;var b=qT.exports,i_={exports:{}},s_={};/**\n * @license React\n * use-sync-external-store-with-selector.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */var Qu=E;function pF(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var mF=typeof Object.is==\"function\"?Object.is:pF,gF=Qu.useSyncExternalStore,yF=Qu.useRef,vF=Qu.useEffect,wF=Qu.useMemo,xF=Qu.useDebugValue;s_.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var s=yF(null);if(s.current===null){var o={hasValue:!1,value:null};s.current=o}else o=s.current;s=wF(function(){function l(h){if(!u){if(u=!0,f=h,h=r(h),i!==void 0&&o.hasValue){var p=o.value;if(i(p,h))return c=p}return c=h}if(p=c,mF(f,h))return p;var m=r(h);return i!==void 0&&i(p,m)?p:(f=h,c=m)}var u=!1,f,c,d=n===void 0?null:n;return[function(){return l(t())},d===null?void 0:function(){return l(d())}]},[t,n,r,i]);var a=gF(e,s[0],s[1]);return vF(function(){o.hasValue=!0,o.value=a},[a]),xF(a),a};i_.exports=s_;var bF=i_.exports,dn=\"default\"in ld?we:ld,I1=Symbol.for(\"react-redux-context\"),D1=typeof globalThis<\"u\"?globalThis:{};function SF(){if(!dn.createContext)return{};const e=D1[I1]??(D1[I1]=new Map);let t=e.get(dn.createContext);return t||(t=dn.createContext(null),e.set(dn.createContext,t)),t}var Ki=SF(),kF=()=>{throw new Error(\"uSES not initialized!\")};function uv(e=Ki){return function(){return dn.useContext(e)}}var o_=uv(),a_=kF,EF=e=>{a_=e},CF=(e,t)=>e===t;function TF(e=Ki){const t=e===Ki?o_:uv(e),n=(r,i={})=>{const{equalityFn:s=CF,devModeChecks:o={}}=typeof i==\"function\"?{equalityFn:i}:i,{store:a,subscription:l,getServerState:u,stabilityCheck:f,identityFunctionCheck:c}=t();dn.useRef(!0);const d=dn.useCallback({[r.name](p){return r(p)}}[r.name],[r,f,o.stabilityCheck]),h=a_(l.addNestedSub,a.getState,u||a.getState,d,s);return dn.useDebugValue(h),h};return Object.assign(n,{withTypes:()=>n}),n}var bo=TF();function _F(e){e()}function AF(){let e=null,t=null;return{clear(){e=null,t=null},notify(){_F(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const i=t={callback:n,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!r||e===null||(r=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var M1={notify(){},get:()=>[]};function NF(e,t){let n,r=M1,i=0,s=!1;function o(m){f();const w=r.subscribe(m);let y=!1;return()=>{y||(y=!0,w(),c())}}function a(){r.notify()}function l(){p.onStateChange&&p.onStateChange()}function u(){return s}function f(){i++,n||(n=e.subscribe(l),r=AF())}function c(){i--,n&&i===0&&(n(),n=void 0,r.clear(),r=M1)}function d(){s||(s=!0,f())}function h(){s&&(s=!1,c())}const p={addNestedSub:o,notifyNestedSubs:a,handleChangeWrapper:l,isSubscribed:u,trySubscribe:d,tryUnsubscribe:h,getListeners:()=>r};return p}var PF=typeof window<\"u\"&&typeof window.document<\"u\"&&typeof window.document.createElement<\"u\",OF=typeof navigator<\"u\"&&navigator.product===\"ReactNative\",LF=PF||OF?dn.useLayoutEffect:dn.useEffect;function RF({store:e,context:t,children:n,serverState:r,stabilityCheck:i=\"once\",identityFunctionCheck:s=\"once\"}){const o=dn.useMemo(()=>{const u=NF(e);return{store:e,subscription:u,getServerState:r?()=>r:void 0,stabilityCheck:i,identityFunctionCheck:s}},[e,r,i,s]),a=dn.useMemo(()=>e.getState(),[e]);LF(()=>{const{subscription:u}=o;return u.onStateChange=u.notifyNestedSubs,u.trySubscribe(),a!==e.getState()&&u.notifyNestedSubs(),()=>{u.tryUnsubscribe(),u.onStateChange=void 0}},[o,a]);const l=t||Ki;return dn.createElement(l.Provider,{value:o},n)}var IF=RF;function l_(e=Ki){const t=e===Ki?o_:uv(e),n=()=>{const{store:r}=t();return r};return Object.assign(n,{withTypes:()=>n}),n}var DF=l_();function MF(e=Ki){const t=e===Ki?DF:l_(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var kh=MF();EF(bF.useSyncExternalStoreWithSelector);var u_={exports:{}},kn={},c_={exports:{}},f_={};/**\n * @license React\n * scheduler.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */(function(e){function t(P,D){var _=P.length;P.push(D);e:for(;0<_;){var V=_-1>>>1,W=P[V];if(0<i(W,D))P[V]=D,P[_]=W,_=V;else break e}}function n(P){return P.length===0?null:P[0]}function r(P){if(P.length===0)return null;var D=P[0],_=P.pop();if(_!==D){P[0]=_;e:for(var V=0,W=P.length,R=W>>>1;V<R;){var q=2*(V+1)-1,J=P[q],Y=q+1,re=P[Y];if(0>i(J,_))Y<W&&0>i(re,J)?(P[V]=re,P[Y]=_,V=Y):(P[V]=J,P[q]=_,V=q);else if(Y<W&&0>i(re,_))P[V]=re,P[Y]=_,V=Y;else break e}}return D}function i(P,D){var _=P.sortIndex-D.sortIndex;return _!==0?_:P.id-D.id}if(typeof performance==\"object\"&&typeof performance.now==\"function\"){var s=performance;e.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],u=[],f=1,c=null,d=3,h=!1,p=!1,m=!1,w=typeof setTimeout==\"function\"?setTimeout:null,y=typeof clearTimeout==\"function\"?clearTimeout:null,v=typeof setImmediate<\"u\"?setImmediate:null;typeof navigator<\"u\"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function g(P){for(var D=n(u);D!==null;){if(D.callback===null)r(u);else if(D.startTime<=P)r(u),D.sortIndex=D.expirationTime,t(l,D);else break;D=n(u)}}function x(P){if(m=!1,g(P),!p)if(n(l)!==null)p=!0,I(S);else{var D=n(u);D!==null&&F(x,D.startTime-P)}}function S(P,D){p=!1,m&&(m=!1,y(T),T=-1),h=!0;var _=d;try{for(g(D),c=n(l);c!==null&&(!(c.expirationTime>D)||P&&!j());){var V=c.callback;if(typeof V==\"function\"){c.callback=null,d=c.priorityLevel;var W=V(c.expirationTime<=D);D=e.unstable_now(),typeof W==\"function\"?c.callback=W:c===n(l)&&r(l),g(D)}else r(l);c=n(l)}if(c!==null)var R=!0;else{var q=n(u);q!==null&&F(x,q.startTime-D),R=!1}return R}finally{c=null,d=_,h=!1}}var k=!1,C=null,T=-1,O=5,A=-1;function j(){return!(e.unstable_now()-A<O)}function L(){if(C!==null){var P=e.unstable_now();A=P;var D=!0;try{D=C(!0,P)}finally{D?B():(k=!1,C=null)}}else k=!1}var B;if(typeof v==\"function\")B=function(){v(L)};else if(typeof MessageChannel<\"u\"){var N=new MessageChannel,M=N.port2;N.port1.onmessage=L,B=function(){M.postMessage(null)}}else B=function(){w(L,0)};function I(P){C=P,k||(k=!0,B())}function F(P,D){T=w(function(){P(e.unstable_now())},D)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(P){P.callback=null},e.unstable_continueExecution=function(){p||h||(p=!0,I(S))},e.unstable_forceFrameRate=function(P){0>P||125<P?console.error(\"forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported\"):O=0<P?Math.floor(1e3/P):5},e.unstable_getCurrentPriorityLevel=function(){return d},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(P){switch(d){case 1:case 2:case 3:var D=3;break;default:D=d}var _=d;d=D;try{return P()}finally{d=_}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(P,D){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var _=d;d=P;try{return D()}finally{d=_}},e.unstable_scheduleCallback=function(P,D,_){var V=e.unstable_now();switch(typeof _==\"object\"&&_!==null?(_=_.delay,_=typeof _==\"number\"&&0<_?V+_:V):_=V,P){case 1:var W=-1;break;case 2:W=250;break;case 5:W=1073741823;break;case 4:W=1e4;break;default:W=5e3}return W=_+W,P={id:f++,callback:D,priorityLevel:P,startTime:_,expirationTime:W,sortIndex:-1},_>V?(P.sortIndex=_,t(u,P),n(l)===null&&P===n(u)&&(m?(y(T),T=-1):m=!0,F(x,_-V))):(P.sortIndex=W,t(l,P),p||h||(p=!0,I(S))),P},e.unstable_shouldYield=j,e.unstable_wrapCallback=function(P){var D=d;return function(){var _=d;d=D;try{return P.apply(this,arguments)}finally{d=_}}}})(f_);c_.exports=f_;var jF=c_.exports;/**\n * @license React\n * react-dom.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */var FF=E,vn=jF;function Q(e){for(var t=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+e,n=1;n<arguments.length;n++)t+=\"&args[]=\"+encodeURIComponent(arguments[n]);return\"Minified React error #\"+e+\"; visit \"+t+\" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.\"}var d_=new Set,su={};function Js(e,t){ua(e,t),ua(e+\"Capture\",t)}function ua(e,t){for(su[e]=t,e=0;e<t.length;e++)d_.add(t[e])}var ei=!(typeof window>\"u\"||typeof window.document>\"u\"||typeof window.document.createElement>\"u\"),jg=Object.prototype.hasOwnProperty,$F=/^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$/,j1={},F1={};function BF(e){return jg.call(F1,e)?!0:jg.call(j1,e)?!1:$F.test(e)?F1[e]=!0:(j1[e]=!0,!1)}function VF(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case\"function\":case\"symbol\":return!0;case\"boolean\":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!==\"data-\"&&e!==\"aria-\");default:return!1}}function zF(e,t,n,r){if(t===null||typeof t>\"u\"||VF(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function zt(e,t,n,r,i,s,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=o}var kt={};\"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style\".split(\" \").forEach(function(e){kt[e]=new zt(e,0,!1,e,null,!1,!1)});[[\"acceptCharset\",\"accept-charset\"],[\"className\",\"class\"],[\"htmlFor\",\"for\"],[\"httpEquiv\",\"http-equiv\"]].forEach(function(e){var t=e[0];kt[t]=new zt(t,1,!1,e[1],null,!1,!1)});[\"contentEditable\",\"draggable\",\"spellCheck\",\"value\"].forEach(function(e){kt[e]=new zt(e,2,!1,e.toLowerCase(),null,!1,!1)});[\"autoReverse\",\"externalResourcesRequired\",\"focusable\",\"preserveAlpha\"].forEach(function(e){kt[e]=new zt(e,2,!1,e,null,!1,!1)});\"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope\".split(\" \").forEach(function(e){kt[e]=new zt(e,3,!1,e.toLowerCase(),null,!1,!1)});[\"checked\",\"multiple\",\"muted\",\"selected\"].forEach(function(e){kt[e]=new zt(e,3,!0,e,null,!1,!1)});[\"capture\",\"download\"].forEach(function(e){kt[e]=new zt(e,4,!1,e,null,!1,!1)});[\"cols\",\"rows\",\"size\",\"span\"].forEach(function(e){kt[e]=new zt(e,6,!1,e,null,!1,!1)});[\"rowSpan\",\"start\"].forEach(function(e){kt[e]=new zt(e,5,!1,e.toLowerCase(),null,!1,!1)});var cv=/[\\-:]([a-z])/g;function fv(e){return e[1].toUpperCase()}\"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height\".split(\" \").forEach(function(e){var t=e.replace(cv,fv);kt[t]=new zt(t,1,!1,e,null,!1,!1)});\"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type\".split(\" \").forEach(function(e){var t=e.replace(cv,fv);kt[t]=new zt(t,1,!1,e,\"http://www.w3.org/1999/xlink\",!1,!1)});[\"xml:base\",\"xml:lang\",\"xml:space\"].forEach(function(e){var t=e.replace(cv,fv);kt[t]=new zt(t,1,!1,e,\"http://www.w3.org/XML/1998/namespace\",!1,!1)});[\"tabIndex\",\"crossOrigin\"].forEach(function(e){kt[e]=new zt(e,1,!1,e.toLowerCase(),null,!1,!1)});kt.xlinkHref=new zt(\"xlinkHref\",1,!1,\"xlink:href\",\"http://www.w3.org/1999/xlink\",!0,!1);[\"src\",\"href\",\"action\",\"formAction\"].forEach(function(e){kt[e]=new zt(e,1,!1,e.toLowerCase(),null,!0,!0)});function dv(e,t,n,r){var i=kt.hasOwnProperty(t)?kt[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!==\"o\"&&t[0]!==\"O\"||t[1]!==\"n\"&&t[1]!==\"N\")&&(zF(t,n,i,r)&&(n=null),r||i===null?BF(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,\"\"+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:\"\":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?\"\":\"\"+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var fi=FF.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,_c=Symbol.for(\"react.element\"),So=Symbol.for(\"react.portal\"),ko=Symbol.for(\"react.fragment\"),hv=Symbol.for(\"react.strict_mode\"),Fg=Symbol.for(\"react.profiler\"),h_=Symbol.for(\"react.provider\"),p_=Symbol.for(\"react.context\"),pv=Symbol.for(\"react.forward_ref\"),$g=Symbol.for(\"react.suspense\"),Bg=Symbol.for(\"react.suspense_list\"),mv=Symbol.for(\"react.memo\"),Ei=Symbol.for(\"react.lazy\"),m_=Symbol.for(\"react.offscreen\"),$1=Symbol.iterator;function el(e){return e===null||typeof e!=\"object\"?null:(e=$1&&e[$1]||e[\"@@iterator\"],typeof e==\"function\"?e:null)}var Ge=Object.assign,Qp;function El(e){if(Qp===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\\n( *(at )?)/);Qp=t&&t[1]||\"\"}return`\n`+Qp+e}var Zp=!1;function Jp(e,t){if(!e||Zp)return\"\";Zp=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,\"props\",{set:function(){throw Error()}}),typeof Reflect==\"object\"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack==\"string\"){for(var i=u.stack.split(`\n`),s=r.stack.split(`\n`),o=i.length-1,a=s.length-1;1<=o&&0<=a&&i[o]!==s[a];)a--;for(;1<=o&&0<=a;o--,a--)if(i[o]!==s[a]){if(o!==1||a!==1)do if(o--,a--,0>a||i[o]!==s[a]){var l=`\n`+i[o].replace(\" at new \",\" at \");return e.displayName&&l.includes(\"<anonymous>\")&&(l=l.replace(\"<anonymous>\",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{Zp=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:\"\")?El(e):\"\"}function UF(e){switch(e.tag){case 5:return El(e.type);case 16:return El(\"Lazy\");case 13:return El(\"Suspense\");case 19:return El(\"SuspenseList\");case 0:case 2:case 15:return e=Jp(e.type,!1),e;case 11:return e=Jp(e.type.render,!1),e;case 1:return e=Jp(e.type,!0),e;default:return\"\"}}function Vg(e){if(e==null)return null;if(typeof e==\"function\")return e.displayName||e.name||null;if(typeof e==\"string\")return e;switch(e){case ko:return\"Fragment\";case So:return\"Portal\";case Fg:return\"Profiler\";case hv:return\"StrictMode\";case $g:return\"Suspense\";case Bg:return\"SuspenseList\"}if(typeof e==\"object\")switch(e.$$typeof){case p_:return(e.displayName||\"Context\")+\".Consumer\";case h_:return(e._context.displayName||\"Context\")+\".Provider\";case pv:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||\"\",e=e!==\"\"?\"ForwardRef(\"+e+\")\":\"ForwardRef\"),e;case mv:return t=e.displayName||null,t!==null?t:Vg(e.type)||\"Memo\";case Ei:t=e._payload,e=e._init;try{return Vg(e(t))}catch{}}return null}function HF(e){var t=e.type;switch(e.tag){case 24:return\"Cache\";case 9:return(t.displayName||\"Context\")+\".Consumer\";case 10:return(t._context.displayName||\"Context\")+\".Provider\";case 18:return\"DehydratedFragment\";case 11:return e=t.render,e=e.displayName||e.name||\"\",t.displayName||(e!==\"\"?\"ForwardRef(\"+e+\")\":\"ForwardRef\");case 7:return\"Fragment\";case 5:return t;case 4:return\"Portal\";case 3:return\"Root\";case 6:return\"Text\";case 16:return Vg(t);case 8:return t===hv?\"StrictMode\":\"Mode\";case 22:return\"Offscreen\";case 12:return\"Profiler\";case 21:return\"Scope\";case 13:return\"Suspense\";case 19:return\"SuspenseList\";case 25:return\"TracingMarker\";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t==\"function\")return t.displayName||t.name||null;if(typeof t==\"string\")return t}return null}function qi(e){switch(typeof e){case\"boolean\":case\"number\":case\"string\":case\"undefined\":return e;case\"object\":return e;default:return\"\"}}function g_(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===\"input\"&&(t===\"checkbox\"||t===\"radio\")}function WF(e){var t=g_(e)?\"checked\":\"value\",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=\"\"+e[t];if(!e.hasOwnProperty(t)&&typeof n<\"u\"&&typeof n.get==\"function\"&&typeof n.set==\"function\"){var i=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=\"\"+o,s.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=\"\"+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ac(e){e._valueTracker||(e._valueTracker=WF(e))}function y_(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=\"\";return e&&(r=g_(e)?e.checked?\"true\":\"false\":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function ud(e){if(e=e||(typeof document<\"u\"?document:void 0),typeof e>\"u\")return null;try{return e.activeElement||e.body}catch{return e.body}}function zg(e,t){var n=t.checked;return Ge({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function B1(e,t){var n=t.defaultValue==null?\"\":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=qi(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type===\"checkbox\"||t.type===\"radio\"?t.checked!=null:t.value!=null}}function v_(e,t){t=t.checked,t!=null&&dv(e,\"checked\",t,!1)}function Ug(e,t){v_(e,t);var n=qi(t.value),r=t.type;if(n!=null)r===\"number\"?(n===0&&e.value===\"\"||e.value!=n)&&(e.value=\"\"+n):e.value!==\"\"+n&&(e.value=\"\"+n);else if(r===\"submit\"||r===\"reset\"){e.removeAttribute(\"value\");return}t.hasOwnProperty(\"value\")?Hg(e,t.type,n):t.hasOwnProperty(\"defaultValue\")&&Hg(e,t.type,qi(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function V1(e,t,n){if(t.hasOwnProperty(\"value\")||t.hasOwnProperty(\"defaultValue\")){var r=t.type;if(!(r!==\"submit\"&&r!==\"reset\"||t.value!==void 0&&t.value!==null))return;t=\"\"+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==\"\"&&(e.name=\"\"),e.defaultChecked=!!e._wrapperState.initialChecked,n!==\"\"&&(e.name=n)}function Hg(e,t,n){(t!==\"number\"||ud(e.ownerDocument)!==e)&&(n==null?e.defaultValue=\"\"+e._wrapperState.initialValue:e.defaultValue!==\"\"+n&&(e.defaultValue=\"\"+n))}var Cl=Array.isArray;function qo(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[\"$\"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(\"$\"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=\"\"+qi(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Wg(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(Q(91));return Ge({},t,{value:void 0,defaultValue:void 0,children:\"\"+e._wrapperState.initialValue})}function z1(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(Q(92));if(Cl(n)){if(1<n.length)throw Error(Q(93));n=n[0]}t=n}t==null&&(t=\"\"),n=t}e._wrapperState={initialValue:qi(n)}}function w_(e,t){var n=qi(t.value),r=qi(t.defaultValue);n!=null&&(n=\"\"+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=\"\"+r)}function U1(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==\"\"&&t!==null&&(e.value=t)}function x_(e){switch(e){case\"svg\":return\"http://www.w3.org/2000/svg\";case\"math\":return\"http://www.w3.org/1998/Math/MathML\";default:return\"http://www.w3.org/1999/xhtml\"}}function Kg(e,t){return e==null||e===\"http://www.w3.org/1999/xhtml\"?x_(t):e===\"http://www.w3.org/2000/svg\"&&t===\"foreignObject\"?\"http://www.w3.org/1999/xhtml\":e}var Nc,b_=function(e){return typeof MSApp<\"u\"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!==\"http://www.w3.org/2000/svg\"||\"innerHTML\"in e)e.innerHTML=t;else{for(Nc=Nc||document.createElement(\"div\"),Nc.innerHTML=\"<svg>\"+t.valueOf().toString()+\"</svg>\",t=Nc.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ou(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var jl={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},KF=[\"Webkit\",\"ms\",\"Moz\",\"O\"];Object.keys(jl).forEach(function(e){KF.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),jl[t]=jl[e]})});function S_(e,t,n){return t==null||typeof t==\"boolean\"||t===\"\"?\"\":n||typeof t!=\"number\"||t===0||jl.hasOwnProperty(e)&&jl[e]?(\"\"+t).trim():t+\"px\"}function k_(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf(\"--\")===0,i=S_(n,t[n],r);n===\"float\"&&(n=\"cssFloat\"),r?e.setProperty(n,i):e[n]=i}}var qF=Ge({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function qg(e,t){if(t){if(qF[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Q(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Q(60));if(typeof t.dangerouslySetInnerHTML!=\"object\"||!(\"__html\"in t.dangerouslySetInnerHTML))throw Error(Q(61))}if(t.style!=null&&typeof t.style!=\"object\")throw Error(Q(62))}}function Yg(e,t){if(e.indexOf(\"-\")===-1)return typeof t.is==\"string\";switch(e){case\"annotation-xml\":case\"color-profile\":case\"font-face\":case\"font-face-src\":case\"font-face-uri\":case\"font-face-format\":case\"font-face-name\":case\"missing-glyph\":return!1;default:return!0}}var Gg=null;function gv(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Xg=null,Yo=null,Go=null;function H1(e){if(e=ec(e)){if(typeof Xg!=\"function\")throw Error(Q(280));var t=e.stateNode;t&&(t=Ah(t),Xg(e.stateNode,e.type,t))}}function E_(e){Yo?Go?Go.push(e):Go=[e]:Yo=e}function C_(){if(Yo){var e=Yo,t=Go;if(Go=Yo=null,H1(e),t)for(e=0;e<t.length;e++)H1(t[e])}}function T_(e,t){return e(t)}function __(){}var em=!1;function A_(e,t,n){if(em)return e(t,n);em=!0;try{return T_(e,t,n)}finally{em=!1,(Yo!==null||Go!==null)&&(__(),C_())}}function au(e,t){var n=e.stateNode;if(n===null)return null;var r=Ah(n);if(r===null)return null;n=r[t];e:switch(t){case\"onClick\":case\"onClickCapture\":case\"onDoubleClick\":case\"onDoubleClickCapture\":case\"onMouseDown\":case\"onMouseDownCapture\":case\"onMouseMove\":case\"onMouseMoveCapture\":case\"onMouseUp\":case\"onMouseUpCapture\":case\"onMouseEnter\":(r=!r.disabled)||(e=e.type,r=!(e===\"button\"||e===\"input\"||e===\"select\"||e===\"textarea\")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!=\"function\")throw Error(Q(231,t,typeof n));return n}var Qg=!1;if(ei)try{var tl={};Object.defineProperty(tl,\"passive\",{get:function(){Qg=!0}}),window.addEventListener(\"test\",tl,tl),window.removeEventListener(\"test\",tl,tl)}catch{Qg=!1}function YF(e,t,n,r,i,s,o,a,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(f){this.onError(f)}}var Fl=!1,cd=null,fd=!1,Zg=null,GF={onError:function(e){Fl=!0,cd=e}};function XF(e,t,n,r,i,s,o,a,l){Fl=!1,cd=null,YF.apply(GF,arguments)}function QF(e,t,n,r,i,s,o,a,l){if(XF.apply(this,arguments),Fl){if(Fl){var u=cd;Fl=!1,cd=null}else throw Error(Q(198));fd||(fd=!0,Zg=u)}}function eo(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function N_(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function W1(e){if(eo(e)!==e)throw Error(Q(188))}function ZF(e){var t=e.alternate;if(!t){if(t=eo(e),t===null)throw Error(Q(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var s=i.alternate;if(s===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return W1(i),e;if(s===r)return W1(i),t;s=s.sibling}throw Error(Q(188))}if(n.return!==r.return)n=i,r=s;else{for(var o=!1,a=i.child;a;){if(a===n){o=!0,n=i,r=s;break}if(a===r){o=!0,r=i,n=s;break}a=a.sibling}if(!o){for(a=s.child;a;){if(a===n){o=!0,n=s,r=i;break}if(a===r){o=!0,r=s,n=i;break}a=a.sibling}if(!o)throw Error(Q(189))}}if(n.alternate!==r)throw Error(Q(190))}if(n.tag!==3)throw Error(Q(188));return n.stateNode.current===n?e:t}function P_(e){return e=ZF(e),e!==null?O_(e):null}function O_(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=O_(e);if(t!==null)return t;e=e.sibling}return null}var L_=vn.unstable_scheduleCallback,K1=vn.unstable_cancelCallback,JF=vn.unstable_shouldYield,e$=vn.unstable_requestPaint,tt=vn.unstable_now,t$=vn.unstable_getCurrentPriorityLevel,yv=vn.unstable_ImmediatePriority,R_=vn.unstable_UserBlockingPriority,dd=vn.unstable_NormalPriority,n$=vn.unstable_LowPriority,I_=vn.unstable_IdlePriority,Eh=null,br=null;function r$(e){if(br&&typeof br.onCommitFiberRoot==\"function\")try{br.onCommitFiberRoot(Eh,e,void 0,(e.current.flags&128)===128)}catch{}}var nr=Math.clz32?Math.clz32:o$,i$=Math.log,s$=Math.LN2;function o$(e){return e>>>=0,e===0?32:31-(i$(e)/s$|0)|0}var Pc=64,Oc=4194304;function Tl(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function hd(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,s=e.pingedLanes,o=n&268435455;if(o!==0){var a=o&~i;a!==0?r=Tl(a):(s&=o,s!==0&&(r=Tl(s)))}else o=n&~i,o!==0?r=Tl(o):s!==0&&(r=Tl(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,s=t&-t,i>=s||i===16&&(s&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-nr(t),i=1<<n,r|=e[n],t&=~i;return r}function a$(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function l$(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var o=31-nr(s),a=1<<o,l=i[o];l===-1?(!(a&n)||a&r)&&(i[o]=a$(a,t)):l<=t&&(e.expiredLanes|=a),s&=~a}}function Jg(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function D_(){var e=Pc;return Pc<<=1,!(Pc&4194240)&&(Pc=64),e}function tm(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Zu(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-nr(t),e[t]=n}function u$(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-nr(n),s=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~s}}function vv(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-nr(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var Oe=0;function M_(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var j_,wv,F_,$_,B_,ey=!1,Lc=[],Ii=null,Di=null,Mi=null,lu=new Map,uu=new Map,_i=[],c$=\"mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit\".split(\" \");function q1(e,t){switch(e){case\"focusin\":case\"focusout\":Ii=null;break;case\"dragenter\":case\"dragleave\":Di=null;break;case\"mouseover\":case\"mouseout\":Mi=null;break;case\"pointerover\":case\"pointerout\":lu.delete(t.pointerId);break;case\"gotpointercapture\":case\"lostpointercapture\":uu.delete(t.pointerId)}}function nl(e,t,n,r,i,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[i]},t!==null&&(t=ec(t),t!==null&&wv(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function f$(e,t,n,r,i){switch(t){case\"focusin\":return Ii=nl(Ii,e,t,n,r,i),!0;case\"dragenter\":return Di=nl(Di,e,t,n,r,i),!0;case\"mouseover\":return Mi=nl(Mi,e,t,n,r,i),!0;case\"pointerover\":var s=i.pointerId;return lu.set(s,nl(lu.get(s)||null,e,t,n,r,i)),!0;case\"gotpointercapture\":return s=i.pointerId,uu.set(s,nl(uu.get(s)||null,e,t,n,r,i)),!0}return!1}function V_(e){var t=Cs(e.target);if(t!==null){var n=eo(t);if(n!==null){if(t=n.tag,t===13){if(t=N_(n),t!==null){e.blockedOn=t,B_(e.priority,function(){F_(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ef(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=ty(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Gg=r,n.target.dispatchEvent(r),Gg=null}else return t=ec(n),t!==null&&wv(t),e.blockedOn=n,!1;t.shift()}return!0}function Y1(e,t,n){Ef(e)&&n.delete(t)}function d$(){ey=!1,Ii!==null&&Ef(Ii)&&(Ii=null),Di!==null&&Ef(Di)&&(Di=null),Mi!==null&&Ef(Mi)&&(Mi=null),lu.forEach(Y1),uu.forEach(Y1)}function rl(e,t){e.blockedOn===t&&(e.blockedOn=null,ey||(ey=!0,vn.unstable_scheduleCallback(vn.unstable_NormalPriority,d$)))}function cu(e){function t(i){return rl(i,e)}if(0<Lc.length){rl(Lc[0],e);for(var n=1;n<Lc.length;n++){var r=Lc[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Ii!==null&&rl(Ii,e),Di!==null&&rl(Di,e),Mi!==null&&rl(Mi,e),lu.forEach(t),uu.forEach(t),n=0;n<_i.length;n++)r=_i[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<_i.length&&(n=_i[0],n.blockedOn===null);)V_(n),n.blockedOn===null&&_i.shift()}var Xo=fi.ReactCurrentBatchConfig,pd=!0;function h$(e,t,n,r){var i=Oe,s=Xo.transition;Xo.transition=null;try{Oe=1,xv(e,t,n,r)}finally{Oe=i,Xo.transition=s}}function p$(e,t,n,r){var i=Oe,s=Xo.transition;Xo.transition=null;try{Oe=4,xv(e,t,n,r)}finally{Oe=i,Xo.transition=s}}function xv(e,t,n,r){if(pd){var i=ty(e,t,n,r);if(i===null)fm(e,t,r,md,n),q1(e,r);else if(f$(i,e,t,n,r))r.stopPropagation();else if(q1(e,r),t&4&&-1<c$.indexOf(e)){for(;i!==null;){var s=ec(i);if(s!==null&&j_(s),s=ty(e,t,n,r),s===null&&fm(e,t,r,md,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else fm(e,t,r,null,n)}}var md=null;function ty(e,t,n,r){if(md=null,e=gv(r),e=Cs(e),e!==null)if(t=eo(e),t===null)e=null;else if(n=t.tag,n===13){if(e=N_(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return md=e,null}function z_(e){switch(e){case\"cancel\":case\"click\":case\"close\":case\"contextmenu\":case\"copy\":case\"cut\":case\"auxclick\":case\"dblclick\":case\"dragend\":case\"dragstart\":case\"drop\":case\"focusin\":case\"focusout\":case\"input\":case\"invalid\":case\"keydown\":case\"keypress\":case\"keyup\":case\"mousedown\":case\"mouseup\":case\"paste\":case\"pause\":case\"play\":case\"pointercancel\":case\"pointerdown\":case\"pointerup\":case\"ratechange\":case\"reset\":case\"resize\":case\"seeked\":case\"submit\":case\"touchcancel\":case\"touchend\":case\"touchstart\":case\"volumechange\":case\"change\":case\"selectionchange\":case\"textInput\":case\"compositionstart\":case\"compositionend\":case\"compositionupdate\":case\"beforeblur\":case\"afterblur\":case\"beforeinput\":case\"blur\":case\"fullscreenchange\":case\"focus\":case\"hashchange\":case\"popstate\":case\"select\":case\"selectstart\":return 1;case\"drag\":case\"dragenter\":case\"dragexit\":case\"dragleave\":case\"dragover\":case\"mousemove\":case\"mouseout\":case\"mouseover\":case\"pointermove\":case\"pointerout\":case\"pointerover\":case\"scroll\":case\"toggle\":case\"touchmove\":case\"wheel\":case\"mouseenter\":case\"mouseleave\":case\"pointerenter\":case\"pointerleave\":return 4;case\"message\":switch(t$()){case yv:return 1;case R_:return 4;case dd:case n$:return 16;case I_:return 536870912;default:return 16}default:return 16}}var Oi=null,bv=null,Cf=null;function U_(){if(Cf)return Cf;var e,t=bv,n=t.length,r,i=\"value\"in Oi?Oi.value:Oi.textContent,s=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[s-r];r++);return Cf=i.slice(e,1<r?1-r:void 0)}function Tf(e){var t=e.keyCode;return\"charCode\"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Rc(){return!0}function G1(){return!1}function En(e){function t(n,r,i,s,o){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=s,this.target=o,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(s):s[a]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?Rc:G1,this.isPropagationStopped=G1,this}return Ge(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!=\"unknown\"&&(n.returnValue=!1),this.isDefaultPrevented=Rc)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!=\"unknown\"&&(n.cancelBubble=!0),this.isPropagationStopped=Rc)},persist:function(){},isPersistent:Rc}),t}var Oa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Sv=En(Oa),Ju=Ge({},Oa,{view:0,detail:0}),m$=En(Ju),nm,rm,il,Ch=Ge({},Ju,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:kv,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return\"movementX\"in e?e.movementX:(e!==il&&(il&&e.type===\"mousemove\"?(nm=e.screenX-il.screenX,rm=e.screenY-il.screenY):rm=nm=0,il=e),nm)},movementY:function(e){return\"movementY\"in e?e.movementY:rm}}),X1=En(Ch),g$=Ge({},Ch,{dataTransfer:0}),y$=En(g$),v$=Ge({},Ju,{relatedTarget:0}),im=En(v$),w$=Ge({},Oa,{animationName:0,elapsedTime:0,pseudoElement:0}),x$=En(w$),b$=Ge({},Oa,{clipboardData:function(e){return\"clipboardData\"in e?e.clipboardData:window.clipboardData}}),S$=En(b$),k$=Ge({},Oa,{data:0}),Q1=En(k$),E$={Esc:\"Escape\",Spacebar:\" \",Left:\"ArrowLeft\",Up:\"ArrowUp\",Right:\"ArrowRight\",Down:\"ArrowDown\",Del:\"Delete\",Win:\"OS\",Menu:\"ContextMenu\",Apps:\"ContextMenu\",Scroll:\"ScrollLock\",MozPrintableKey:\"Unidentified\"},C$={8:\"Backspace\",9:\"Tab\",12:\"Clear\",13:\"Enter\",16:\"Shift\",17:\"Control\",18:\"Alt\",19:\"Pause\",20:\"CapsLock\",27:\"Escape\",32:\" \",33:\"PageUp\",34:\"PageDown\",35:\"End\",36:\"Home\",37:\"ArrowLeft\",38:\"ArrowUp\",39:\"ArrowRight\",40:\"ArrowDown\",45:\"Insert\",46:\"Delete\",112:\"F1\",113:\"F2\",114:\"F3\",115:\"F4\",116:\"F5\",117:\"F6\",118:\"F7\",119:\"F8\",120:\"F9\",121:\"F10\",122:\"F11\",123:\"F12\",144:\"NumLock\",145:\"ScrollLock\",224:\"Meta\"},T$={Alt:\"altKey\",Control:\"ctrlKey\",Meta:\"metaKey\",Shift:\"shiftKey\"};function _$(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=T$[e])?!!t[e]:!1}function kv(){return _$}var A$=Ge({},Ju,{key:function(e){if(e.key){var t=E$[e.key]||e.key;if(t!==\"Unidentified\")return t}return e.type===\"keypress\"?(e=Tf(e),e===13?\"Enter\":String.fromCharCode(e)):e.type===\"keydown\"||e.type===\"keyup\"?C$[e.keyCode]||\"Unidentified\":\"\"},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:kv,charCode:function(e){return e.type===\"keypress\"?Tf(e):0},keyCode:function(e){return e.type===\"keydown\"||e.type===\"keyup\"?e.keyCode:0},which:function(e){return e.type===\"keypress\"?Tf(e):e.type===\"keydown\"||e.type===\"keyup\"?e.keyCode:0}}),N$=En(A$),P$=Ge({},Ch,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Z1=En(P$),O$=Ge({},Ju,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:kv}),L$=En(O$),R$=Ge({},Oa,{propertyName:0,elapsedTime:0,pseudoElement:0}),I$=En(R$),D$=Ge({},Ch,{deltaX:function(e){return\"deltaX\"in e?e.deltaX:\"wheelDeltaX\"in e?-e.wheelDeltaX:0},deltaY:function(e){return\"deltaY\"in e?e.deltaY:\"wheelDeltaY\"in e?-e.wheelDeltaY:\"wheelDelta\"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),M$=En(D$),j$=[9,13,27,32],Ev=ei&&\"CompositionEvent\"in window,$l=null;ei&&\"documentMode\"in document&&($l=document.documentMode);var F$=ei&&\"TextEvent\"in window&&!$l,H_=ei&&(!Ev||$l&&8<$l&&11>=$l),J1=\" \",eb=!1;function W_(e,t){switch(e){case\"keyup\":return j$.indexOf(t.keyCode)!==-1;case\"keydown\":return t.keyCode!==229;case\"keypress\":case\"mousedown\":case\"focusout\":return!0;default:return!1}}function K_(e){return e=e.detail,typeof e==\"object\"&&\"data\"in e?e.data:null}var Eo=!1;function $$(e,t){switch(e){case\"compositionend\":return K_(t);case\"keypress\":return t.which!==32?null:(eb=!0,J1);case\"textInput\":return e=t.data,e===J1&&eb?null:e;default:return null}}function B$(e,t){if(Eo)return e===\"compositionend\"||!Ev&&W_(e,t)?(e=U_(),Cf=bv=Oi=null,Eo=!1,e):null;switch(e){case\"paste\":return null;case\"keypress\":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case\"compositionend\":return H_&&t.locale!==\"ko\"?null:t.data;default:return null}}var V$={color:!0,date:!0,datetime:!0,\"datetime-local\":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function tb(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===\"input\"?!!V$[e.type]:t===\"textarea\"}function q_(e,t,n,r){E_(r),t=gd(t,\"onChange\"),0<t.length&&(n=new Sv(\"onChange\",\"change\",null,n,r),e.push({event:n,listeners:t}))}var Bl=null,fu=null;function z$(e){iA(e,0)}function Th(e){var t=_o(e);if(y_(t))return e}function U$(e,t){if(e===\"change\")return t}var Y_=!1;if(ei){var sm;if(ei){var om=\"oninput\"in document;if(!om){var nb=document.createElement(\"div\");nb.setAttribute(\"oninput\",\"return;\"),om=typeof nb.oninput==\"function\"}sm=om}else sm=!1;Y_=sm&&(!document.documentMode||9<document.documentMode)}function rb(){Bl&&(Bl.detachEvent(\"onpropertychange\",G_),fu=Bl=null)}function G_(e){if(e.propertyName===\"value\"&&Th(fu)){var t=[];q_(t,fu,e,gv(e)),A_(z$,t)}}function H$(e,t,n){e===\"focusin\"?(rb(),Bl=t,fu=n,Bl.attachEvent(\"onpropertychange\",G_)):e===\"focusout\"&&rb()}function W$(e){if(e===\"selectionchange\"||e===\"keyup\"||e===\"keydown\")return Th(fu)}function K$(e,t){if(e===\"click\")return Th(t)}function q$(e,t){if(e===\"input\"||e===\"change\")return Th(t)}function Y$(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var or=typeof Object.is==\"function\"?Object.is:Y$;function du(e,t){if(or(e,t))return!0;if(typeof e!=\"object\"||e===null||typeof t!=\"object\"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!jg.call(t,i)||!or(e[i],t[i]))return!1}return!0}function ib(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function sb(e,t){var n=ib(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=ib(n)}}function X_(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?X_(e,t.parentNode):\"contains\"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Q_(){for(var e=window,t=ud();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==\"string\"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ud(e.document)}return t}function Cv(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===\"input\"&&(e.type===\"text\"||e.type===\"search\"||e.type===\"tel\"||e.type===\"url\"||e.type===\"password\")||t===\"textarea\"||e.contentEditable===\"true\")}function G$(e){var t=Q_(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&X_(n.ownerDocument.documentElement,n)){if(r!==null&&Cv(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),\"selectionStart\"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!e.extend&&s>r&&(i=r,r=s,s=i),i=sb(n,s);var o=sb(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus==\"function\"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var X$=ei&&\"documentMode\"in document&&11>=document.documentMode,Co=null,ny=null,Vl=null,ry=!1;function ob(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ry||Co==null||Co!==ud(r)||(r=Co,\"selectionStart\"in r&&Cv(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Vl&&du(Vl,r)||(Vl=r,r=gd(ny,\"onSelect\"),0<r.length&&(t=new Sv(\"onSelect\",\"select\",null,t,n),e.push({event:t,listeners:r}),t.target=Co)))}function Ic(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[\"Webkit\"+e]=\"webkit\"+t,n[\"Moz\"+e]=\"moz\"+t,n}var To={animationend:Ic(\"Animation\",\"AnimationEnd\"),animationiteration:Ic(\"Animation\",\"AnimationIteration\"),animationstart:Ic(\"Animation\",\"AnimationStart\"),transitionend:Ic(\"Transition\",\"TransitionEnd\")},am={},Z_={};ei&&(Z_=document.createElement(\"div\").style,\"AnimationEvent\"in window||(delete To.animationend.animation,delete To.animationiteration.animation,delete To.animationstart.animation),\"TransitionEvent\"in window||delete To.transitionend.transition);function _h(e){if(am[e])return am[e];if(!To[e])return e;var t=To[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Z_)return am[e]=t[n];return e}var J_=_h(\"animationend\"),eA=_h(\"animationiteration\"),tA=_h(\"animationstart\"),nA=_h(\"transitionend\"),rA=new Map,ab=\"abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel\".split(\" \");function is(e,t){rA.set(e,t),Js(t,[e])}for(var lm=0;lm<ab.length;lm++){var um=ab[lm],Q$=um.toLowerCase(),Z$=um[0].toUpperCase()+um.slice(1);is(Q$,\"on\"+Z$)}is(J_,\"onAnimationEnd\");is(eA,\"onAnimationIteration\");is(tA,\"onAnimationStart\");is(\"dblclick\",\"onDoubleClick\");is(\"focusin\",\"onFocus\");is(\"focusout\",\"onBlur\");is(nA,\"onTransitionEnd\");ua(\"onMouseEnter\",[\"mouseout\",\"mouseover\"]);ua(\"onMouseLeave\",[\"mouseout\",\"mouseover\"]);ua(\"onPointerEnter\",[\"pointerout\",\"pointerover\"]);ua(\"onPointerLeave\",[\"pointerout\",\"pointerover\"]);Js(\"onChange\",\"change click focusin focusout input keydown keyup selectionchange\".split(\" \"));Js(\"onSelect\",\"focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange\".split(\" \"));Js(\"onBeforeInput\",[\"compositionend\",\"keypress\",\"textInput\",\"paste\"]);Js(\"onCompositionEnd\",\"compositionend focusout keydown keypress keyup mousedown\".split(\" \"));Js(\"onCompositionStart\",\"compositionstart focusout keydown keypress keyup mousedown\".split(\" \"));Js(\"onCompositionUpdate\",\"compositionupdate focusout keydown keypress keyup mousedown\".split(\" \"));var _l=\"abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting\".split(\" \"),J$=new Set(\"cancel close invalid load scroll toggle\".split(\" \").concat(_l));function lb(e,t,n){var r=e.type||\"unknown-event\";e.currentTarget=n,QF(r,t,void 0,e),e.currentTarget=null}function iA(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var s=void 0;if(t)for(var o=r.length-1;0<=o;o--){var a=r[o],l=a.instance,u=a.currentTarget;if(a=a.listener,l!==s&&i.isPropagationStopped())break e;lb(i,a,u),s=l}else for(o=0;o<r.length;o++){if(a=r[o],l=a.instance,u=a.currentTarget,a=a.listener,l!==s&&i.isPropagationStopped())break e;lb(i,a,u),s=l}}}if(fd)throw e=Zg,fd=!1,Zg=null,e}function $e(e,t){var n=t[ly];n===void 0&&(n=t[ly]=new Set);var r=e+\"__bubble\";n.has(r)||(sA(t,e,2,!1),n.add(r))}function cm(e,t,n){var r=0;t&&(r|=4),sA(n,e,r,t)}var Dc=\"_reactListening\"+Math.random().toString(36).slice(2);function hu(e){if(!e[Dc]){e[Dc]=!0,d_.forEach(function(n){n!==\"selectionchange\"&&(J$.has(n)||cm(n,!1,e),cm(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Dc]||(t[Dc]=!0,cm(\"selectionchange\",!1,t))}}function sA(e,t,n,r){switch(z_(t)){case 1:var i=h$;break;case 4:i=p$;break;default:i=xv}n=i.bind(null,t,n,e),i=void 0,!Qg||t!==\"touchstart\"&&t!==\"touchmove\"&&t!==\"wheel\"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function fm(e,t,n,r,i){var s=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var a=r.stateNode.containerInfo;if(a===i||a.nodeType===8&&a.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===i||l.nodeType===8&&l.parentNode===i))return;o=o.return}for(;a!==null;){if(o=Cs(a),o===null)return;if(l=o.tag,l===5||l===6){r=s=o;continue e}a=a.parentNode}}r=r.return}A_(function(){var u=s,f=gv(n),c=[];e:{var d=rA.get(e);if(d!==void 0){var h=Sv,p=e;switch(e){case\"keypress\":if(Tf(n)===0)break e;case\"keydown\":case\"keyup\":h=N$;break;case\"focusin\":p=\"focus\",h=im;break;case\"focusout\":p=\"blur\",h=im;break;case\"beforeblur\":case\"afterblur\":h=im;break;case\"click\":if(n.button===2)break e;case\"auxclick\":case\"dblclick\":case\"mousedown\":case\"mousemove\":case\"mouseup\":case\"mouseout\":case\"mouseover\":case\"contextmenu\":h=X1;break;case\"drag\":case\"dragend\":case\"dragenter\":case\"dragexit\":case\"dragleave\":case\"dragover\":case\"dragstart\":case\"drop\":h=y$;break;case\"touchcancel\":case\"touchend\":case\"touchmove\":case\"touchstart\":h=L$;break;case J_:case eA:case tA:h=x$;break;case nA:h=I$;break;case\"scroll\":h=m$;break;case\"wheel\":h=M$;break;case\"copy\":case\"cut\":case\"paste\":h=S$;break;case\"gotpointercapture\":case\"lostpointercapture\":case\"pointercancel\":case\"pointerdown\":case\"pointermove\":case\"pointerout\":case\"pointerover\":case\"pointerup\":h=Z1}var m=(t&4)!==0,w=!m&&e===\"scroll\",y=m?d!==null?d+\"Capture\":null:d;m=[];for(var v=u,g;v!==null;){g=v;var x=g.stateNode;if(g.tag===5&&x!==null&&(g=x,y!==null&&(x=au(v,y),x!=null&&m.push(pu(v,x,g)))),w)break;v=v.return}0<m.length&&(d=new h(d,p,null,n,f),c.push({event:d,listeners:m}))}}if(!(t&7)){e:{if(d=e===\"mouseover\"||e===\"pointerover\",h=e===\"mouseout\"||e===\"pointerout\",d&&n!==Gg&&(p=n.relatedTarget||n.fromElement)&&(Cs(p)||p[ti]))break e;if((h||d)&&(d=f.window===f?f:(d=f.ownerDocument)?d.defaultView||d.parentWindow:window,h?(p=n.relatedTarget||n.toElement,h=u,p=p?Cs(p):null,p!==null&&(w=eo(p),p!==w||p.tag!==5&&p.tag!==6)&&(p=null)):(h=null,p=u),h!==p)){if(m=X1,x=\"onMouseLeave\",y=\"onMouseEnter\",v=\"mouse\",(e===\"pointerout\"||e===\"pointerover\")&&(m=Z1,x=\"onPointerLeave\",y=\"onPointerEnter\",v=\"pointer\"),w=h==null?d:_o(h),g=p==null?d:_o(p),d=new m(x,v+\"leave\",h,n,f),d.target=w,d.relatedTarget=g,x=null,Cs(f)===u&&(m=new m(y,v+\"enter\",p,n,f),m.target=g,m.relatedTarget=w,x=m),w=x,h&&p)t:{for(m=h,y=p,v=0,g=m;g;g=ao(g))v++;for(g=0,x=y;x;x=ao(x))g++;for(;0<v-g;)m=ao(m),v--;for(;0<g-v;)y=ao(y),g--;for(;v--;){if(m===y||y!==null&&m===y.alternate)break t;m=ao(m),y=ao(y)}m=null}else m=null;h!==null&&ub(c,d,h,m,!1),p!==null&&w!==null&&ub(c,w,p,m,!0)}}e:{if(d=u?_o(u):window,h=d.nodeName&&d.nodeName.toLowerCase(),h===\"select\"||h===\"input\"&&d.type===\"file\")var S=U$;else if(tb(d))if(Y_)S=q$;else{S=W$;var k=H$}else(h=d.nodeName)&&h.toLowerCase()===\"input\"&&(d.type===\"checkbox\"||d.type===\"radio\")&&(S=K$);if(S&&(S=S(e,u))){q_(c,S,n,f);break e}k&&k(e,d,u),e===\"focusout\"&&(k=d._wrapperState)&&k.controlled&&d.type===\"number\"&&Hg(d,\"number\",d.value)}switch(k=u?_o(u):window,e){case\"focusin\":(tb(k)||k.contentEditable===\"true\")&&(Co=k,ny=u,Vl=null);break;case\"focusout\":Vl=ny=Co=null;break;case\"mousedown\":ry=!0;break;case\"contextmenu\":case\"mouseup\":case\"dragend\":ry=!1,ob(c,n,f);break;case\"selectionchange\":if(X$)break;case\"keydown\":case\"keyup\":ob(c,n,f)}var C;if(Ev)e:{switch(e){case\"compositionstart\":var T=\"onCompositionStart\";break e;case\"compositionend\":T=\"onCompositionEnd\";break e;case\"compositionupdate\":T=\"onCompositionUpdate\";break e}T=void 0}else Eo?W_(e,n)&&(T=\"onCompositionEnd\"):e===\"keydown\"&&n.keyCode===229&&(T=\"onCompositionStart\");T&&(H_&&n.locale!==\"ko\"&&(Eo||T!==\"onCompositionStart\"?T===\"onCompositionEnd\"&&Eo&&(C=U_()):(Oi=f,bv=\"value\"in Oi?Oi.value:Oi.textContent,Eo=!0)),k=gd(u,T),0<k.length&&(T=new Q1(T,e,null,n,f),c.push({event:T,listeners:k}),C?T.data=C:(C=K_(n),C!==null&&(T.data=C)))),(C=F$?$$(e,n):B$(e,n))&&(u=gd(u,\"onBeforeInput\"),0<u.length&&(f=new Q1(\"onBeforeInput\",\"beforeinput\",null,n,f),c.push({event:f,listeners:u}),f.data=C))}iA(c,t)})}function pu(e,t,n){return{instance:e,listener:t,currentTarget:n}}function gd(e,t){for(var n=t+\"Capture\",r=[];e!==null;){var i=e,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=au(e,n),s!=null&&r.unshift(pu(e,s,i)),s=au(e,t),s!=null&&r.push(pu(e,s,i))),e=e.return}return r}function ao(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function ub(e,t,n,r,i){for(var s=t._reactName,o=[];n!==null&&n!==r;){var a=n,l=a.alternate,u=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&u!==null&&(a=u,i?(l=au(n,s),l!=null&&o.unshift(pu(n,l,a))):i||(l=au(n,s),l!=null&&o.push(pu(n,l,a)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var e3=/\\r\\n?/g,t3=/\\u0000|\\uFFFD/g;function cb(e){return(typeof e==\"string\"?e:\"\"+e).replace(e3,`\n`).replace(t3,\"\")}function Mc(e,t,n){if(t=cb(t),cb(e)!==t&&n)throw Error(Q(425))}function yd(){}var iy=null,sy=null;function oy(e,t){return e===\"textarea\"||e===\"noscript\"||typeof t.children==\"string\"||typeof t.children==\"number\"||typeof t.dangerouslySetInnerHTML==\"object\"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var ay=typeof setTimeout==\"function\"?setTimeout:void 0,n3=typeof clearTimeout==\"function\"?clearTimeout:void 0,fb=typeof Promise==\"function\"?Promise:void 0,r3=typeof queueMicrotask==\"function\"?queueMicrotask:typeof fb<\"u\"?function(e){return fb.resolve(null).then(e).catch(i3)}:ay;function i3(e){setTimeout(function(){throw e})}function dm(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===\"/$\"){if(r===0){e.removeChild(i),cu(t);return}r--}else n!==\"$\"&&n!==\"$?\"&&n!==\"$!\"||r++;n=i}while(n);cu(t)}function ji(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===\"$\"||t===\"$!\"||t===\"$?\")break;if(t===\"/$\")return null}}return e}function db(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===\"$\"||n===\"$!\"||n===\"$?\"){if(t===0)return e;t--}else n===\"/$\"&&t++}e=e.previousSibling}return null}var La=Math.random().toString(36).slice(2),vr=\"__reactFiber$\"+La,mu=\"__reactProps$\"+La,ti=\"__reactContainer$\"+La,ly=\"__reactEvents$\"+La,s3=\"__reactListeners$\"+La,o3=\"__reactHandles$\"+La;function Cs(e){var t=e[vr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ti]||n[vr]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=db(e);e!==null;){if(n=e[vr])return n;e=db(e)}return t}e=n,n=e.parentNode}return null}function ec(e){return e=e[vr]||e[ti],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function _o(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(Q(33))}function Ah(e){return e[mu]||null}var uy=[],Ao=-1;function ss(e){return{current:e}}function Ve(e){0>Ao||(e.current=uy[Ao],uy[Ao]=null,Ao--)}function De(e,t){Ao++,uy[Ao]=e.current,e.current=t}var Yi={},Lt=ss(Yi),tn=ss(!1),Fs=Yi;function ca(e,t){var n=e.type.contextTypes;if(!n)return Yi;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function nn(e){return e=e.childContextTypes,e!=null}function vd(){Ve(tn),Ve(Lt)}function hb(e,t,n){if(Lt.current!==Yi)throw Error(Q(168));De(Lt,t),De(tn,n)}function oA(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!=\"function\")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(Q(108,HF(e)||\"Unknown\",i));return Ge({},n,r)}function wd(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Yi,Fs=Lt.current,De(Lt,e),De(tn,tn.current),!0}function pb(e,t,n){var r=e.stateNode;if(!r)throw Error(Q(169));n?(e=oA(e,t,Fs),r.__reactInternalMemoizedMergedChildContext=e,Ve(tn),Ve(Lt),De(Lt,e)):Ve(tn),De(tn,n)}var Vr=null,Nh=!1,hm=!1;function aA(e){Vr===null?Vr=[e]:Vr.push(e)}function a3(e){Nh=!0,aA(e)}function os(){if(!hm&&Vr!==null){hm=!0;var e=0,t=Oe;try{var n=Vr;for(Oe=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Vr=null,Nh=!1}catch(i){throw Vr!==null&&(Vr=Vr.slice(e+1)),L_(yv,os),i}finally{Oe=t,hm=!1}}return null}var No=[],Po=0,xd=null,bd=0,Pn=[],On=0,$s=null,zr=1,Ur=\"\";function ys(e,t){No[Po++]=bd,No[Po++]=xd,xd=e,bd=t}function lA(e,t,n){Pn[On++]=zr,Pn[On++]=Ur,Pn[On++]=$s,$s=e;var r=zr;e=Ur;var i=32-nr(r)-1;r&=~(1<<i),n+=1;var s=32-nr(t)+i;if(30<s){var o=i-i%5;s=(r&(1<<o)-1).toString(32),r>>=o,i-=o,zr=1<<32-nr(t)+i|n<<i|r,Ur=s+e}else zr=1<<s|n<<i|r,Ur=e}function Tv(e){e.return!==null&&(ys(e,1),lA(e,1,0))}function _v(e){for(;e===xd;)xd=No[--Po],No[Po]=null,bd=No[--Po],No[Po]=null;for(;e===$s;)$s=Pn[--On],Pn[On]=null,Ur=Pn[--On],Pn[On]=null,zr=Pn[--On],Pn[On]=null}var gn=null,hn=null,ze=!1,Qn=null;function uA(e,t){var n=In(5,null,null,0);n.elementType=\"DELETED\",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function mb(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,gn=e,hn=ji(t.firstChild),!0):!1;case 6:return t=e.pendingProps===\"\"||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,gn=e,hn=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=$s!==null?{id:zr,overflow:Ur}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=In(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,gn=e,hn=null,!0):!1;default:return!1}}function cy(e){return(e.mode&1)!==0&&(e.flags&128)===0}function fy(e){if(ze){var t=hn;if(t){var n=t;if(!mb(e,t)){if(cy(e))throw Error(Q(418));t=ji(n.nextSibling);var r=gn;t&&mb(e,t)?uA(r,n):(e.flags=e.flags&-4097|2,ze=!1,gn=e)}}else{if(cy(e))throw Error(Q(418));e.flags=e.flags&-4097|2,ze=!1,gn=e}}}function gb(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;gn=e}function jc(e){if(e!==gn)return!1;if(!ze)return gb(e),ze=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!==\"head\"&&t!==\"body\"&&!oy(e.type,e.memoizedProps)),t&&(t=hn)){if(cy(e))throw cA(),Error(Q(418));for(;t;)uA(e,t),t=ji(t.nextSibling)}if(gb(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(Q(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n===\"/$\"){if(t===0){hn=ji(e.nextSibling);break e}t--}else n!==\"$\"&&n!==\"$!\"&&n!==\"$?\"||t++}e=e.nextSibling}hn=null}}else hn=gn?ji(e.stateNode.nextSibling):null;return!0}function cA(){for(var e=hn;e;)e=ji(e.nextSibling)}function fa(){hn=gn=null,ze=!1}function Av(e){Qn===null?Qn=[e]:Qn.push(e)}var l3=fi.ReactCurrentBatchConfig;function sl(e,t,n){if(e=n.ref,e!==null&&typeof e!=\"function\"&&typeof e!=\"object\"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(Q(309));var r=n.stateNode}if(!r)throw Error(Q(147,e));var i=r,s=\"\"+e;return t!==null&&t.ref!==null&&typeof t.ref==\"function\"&&t.ref._stringRef===s?t.ref:(t=function(o){var a=i.refs;o===null?delete a[s]:a[s]=o},t._stringRef=s,t)}if(typeof e!=\"string\")throw Error(Q(284));if(!n._owner)throw Error(Q(290,e))}return e}function Fc(e,t){throw e=Object.prototype.toString.call(t),Error(Q(31,e===\"[object Object]\"?\"object with keys {\"+Object.keys(t).join(\", \")+\"}\":e))}function yb(e){var t=e._init;return t(e._payload)}function fA(e){function t(y,v){if(e){var g=y.deletions;g===null?(y.deletions=[v],y.flags|=16):g.push(v)}}function n(y,v){if(!e)return null;for(;v!==null;)t(y,v),v=v.sibling;return null}function r(y,v){for(y=new Map;v!==null;)v.key!==null?y.set(v.key,v):y.set(v.index,v),v=v.sibling;return y}function i(y,v){return y=Vi(y,v),y.index=0,y.sibling=null,y}function s(y,v,g){return y.index=g,e?(g=y.alternate,g!==null?(g=g.index,g<v?(y.flags|=2,v):g):(y.flags|=2,v)):(y.flags|=1048576,v)}function o(y){return e&&y.alternate===null&&(y.flags|=2),y}function a(y,v,g,x){return v===null||v.tag!==6?(v=xm(g,y.mode,x),v.return=y,v):(v=i(v,g),v.return=y,v)}function l(y,v,g,x){var S=g.type;return S===ko?f(y,v,g.props.children,x,g.key):v!==null&&(v.elementType===S||typeof S==\"object\"&&S!==null&&S.$$typeof===Ei&&yb(S)===v.type)?(x=i(v,g.props),x.ref=sl(y,v,g),x.return=y,x):(x=Rf(g.type,g.key,g.props,null,y.mode,x),x.ref=sl(y,v,g),x.return=y,x)}function u(y,v,g,x){return v===null||v.tag!==4||v.stateNode.containerInfo!==g.containerInfo||v.stateNode.implementation!==g.implementation?(v=bm(g,y.mode,x),v.return=y,v):(v=i(v,g.children||[]),v.return=y,v)}function f(y,v,g,x,S){return v===null||v.tag!==7?(v=Is(g,y.mode,x,S),v.return=y,v):(v=i(v,g),v.return=y,v)}function c(y,v,g){if(typeof v==\"string\"&&v!==\"\"||typeof v==\"number\")return v=xm(\"\"+v,y.mode,g),v.return=y,v;if(typeof v==\"object\"&&v!==null){switch(v.$$typeof){case _c:return g=Rf(v.type,v.key,v.props,null,y.mode,g),g.ref=sl(y,null,v),g.return=y,g;case So:return v=bm(v,y.mode,g),v.return=y,v;case Ei:var x=v._init;return c(y,x(v._payload),g)}if(Cl(v)||el(v))return v=Is(v,y.mode,g,null),v.return=y,v;Fc(y,v)}return null}function d(y,v,g,x){var S=v!==null?v.key:null;if(typeof g==\"string\"&&g!==\"\"||typeof g==\"number\")return S!==null?null:a(y,v,\"\"+g,x);if(typeof g==\"object\"&&g!==null){switch(g.$$typeof){case _c:return g.key===S?l(y,v,g,x):null;case So:return g.key===S?u(y,v,g,x):null;case Ei:return S=g._init,d(y,v,S(g._payload),x)}if(Cl(g)||el(g))return S!==null?null:f(y,v,g,x,null);Fc(y,g)}return null}function h(y,v,g,x,S){if(typeof x==\"string\"&&x!==\"\"||typeof x==\"number\")return y=y.get(g)||null,a(v,y,\"\"+x,S);if(typeof x==\"object\"&&x!==null){switch(x.$$typeof){case _c:return y=y.get(x.key===null?g:x.key)||null,l(v,y,x,S);case So:return y=y.get(x.key===null?g:x.key)||null,u(v,y,x,S);case Ei:var k=x._init;return h(y,v,g,k(x._payload),S)}if(Cl(x)||el(x))return y=y.get(g)||null,f(v,y,x,S,null);Fc(v,x)}return null}function p(y,v,g,x){for(var S=null,k=null,C=v,T=v=0,O=null;C!==null&&T<g.length;T++){C.index>T?(O=C,C=null):O=C.sibling;var A=d(y,C,g[T],x);if(A===null){C===null&&(C=O);break}e&&C&&A.alternate===null&&t(y,C),v=s(A,v,T),k===null?S=A:k.sibling=A,k=A,C=O}if(T===g.length)return n(y,C),ze&&ys(y,T),S;if(C===null){for(;T<g.length;T++)C=c(y,g[T],x),C!==null&&(v=s(C,v,T),k===null?S=C:k.sibling=C,k=C);return ze&&ys(y,T),S}for(C=r(y,C);T<g.length;T++)O=h(C,y,T,g[T],x),O!==null&&(e&&O.alternate!==null&&C.delete(O.key===null?T:O.key),v=s(O,v,T),k===null?S=O:k.sibling=O,k=O);return e&&C.forEach(function(j){return t(y,j)}),ze&&ys(y,T),S}function m(y,v,g,x){var S=el(g);if(typeof S!=\"function\")throw Error(Q(150));if(g=S.call(g),g==null)throw Error(Q(151));for(var k=S=null,C=v,T=v=0,O=null,A=g.next();C!==null&&!A.done;T++,A=g.next()){C.index>T?(O=C,C=null):O=C.sibling;var j=d(y,C,A.value,x);if(j===null){C===null&&(C=O);break}e&&C&&j.alternate===null&&t(y,C),v=s(j,v,T),k===null?S=j:k.sibling=j,k=j,C=O}if(A.done)return n(y,C),ze&&ys(y,T),S;if(C===null){for(;!A.done;T++,A=g.next())A=c(y,A.value,x),A!==null&&(v=s(A,v,T),k===null?S=A:k.sibling=A,k=A);return ze&&ys(y,T),S}for(C=r(y,C);!A.done;T++,A=g.next())A=h(C,y,T,A.value,x),A!==null&&(e&&A.alternate!==null&&C.delete(A.key===null?T:A.key),v=s(A,v,T),k===null?S=A:k.sibling=A,k=A);return e&&C.forEach(function(L){return t(y,L)}),ze&&ys(y,T),S}function w(y,v,g,x){if(typeof g==\"object\"&&g!==null&&g.type===ko&&g.key===null&&(g=g.props.children),typeof g==\"object\"&&g!==null){switch(g.$$typeof){case _c:e:{for(var S=g.key,k=v;k!==null;){if(k.key===S){if(S=g.type,S===ko){if(k.tag===7){n(y,k.sibling),v=i(k,g.props.children),v.return=y,y=v;break e}}else if(k.elementType===S||typeof S==\"object\"&&S!==null&&S.$$typeof===Ei&&yb(S)===k.type){n(y,k.sibling),v=i(k,g.props),v.ref=sl(y,k,g),v.return=y,y=v;break e}n(y,k);break}else t(y,k);k=k.sibling}g.type===ko?(v=Is(g.props.children,y.mode,x,g.key),v.return=y,y=v):(x=Rf(g.type,g.key,g.props,null,y.mode,x),x.ref=sl(y,v,g),x.return=y,y=x)}return o(y);case So:e:{for(k=g.key;v!==null;){if(v.key===k)if(v.tag===4&&v.stateNode.containerInfo===g.containerInfo&&v.stateNode.implementation===g.implementation){n(y,v.sibling),v=i(v,g.children||[]),v.return=y,y=v;break e}else{n(y,v);break}else t(y,v);v=v.sibling}v=bm(g,y.mode,x),v.return=y,y=v}return o(y);case Ei:return k=g._init,w(y,v,k(g._payload),x)}if(Cl(g))return p(y,v,g,x);if(el(g))return m(y,v,g,x);Fc(y,g)}return typeof g==\"string\"&&g!==\"\"||typeof g==\"number\"?(g=\"\"+g,v!==null&&v.tag===6?(n(y,v.sibling),v=i(v,g),v.return=y,y=v):(n(y,v),v=xm(g,y.mode,x),v.return=y,y=v),o(y)):n(y,v)}return w}var da=fA(!0),dA=fA(!1),Sd=ss(null),kd=null,Oo=null,Nv=null;function Pv(){Nv=Oo=kd=null}function Ov(e){var t=Sd.current;Ve(Sd),e._currentValue=t}function dy(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Qo(e,t){kd=e,Nv=Oo=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Jt=!0),e.firstContext=null)}function Fn(e){var t=e._currentValue;if(Nv!==e)if(e={context:e,memoizedValue:t,next:null},Oo===null){if(kd===null)throw Error(Q(308));Oo=e,kd.dependencies={lanes:0,firstContext:e}}else Oo=Oo.next=e;return t}var Ts=null;function Lv(e){Ts===null?Ts=[e]:Ts.push(e)}function hA(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Lv(t)):(n.next=i.next,i.next=n),t.interleaved=n,ni(e,r)}function ni(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Ci=!1;function Rv(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function pA(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Yr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Fi(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ae&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,ni(e,n)}return i=r.interleaved,i===null?(t.next=t,Lv(r)):(t.next=i.next,i.next=t),r.interleaved=t,ni(e,n)}function _f(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,vv(e,n)}}function vb(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?i=s=o:s=s.next=o,n=n.next}while(n!==null);s===null?i=s=t:s=s.next=t}else i=s=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Ed(e,t,n,r){var i=e.updateQueue;Ci=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,u=l.next;l.next=null,o===null?s=u:o.next=u,o=l;var f=e.alternate;f!==null&&(f=f.updateQueue,a=f.lastBaseUpdate,a!==o&&(a===null?f.firstBaseUpdate=u:a.next=u,f.lastBaseUpdate=l))}if(s!==null){var c=i.baseState;o=0,f=u=l=null,a=s;do{var d=a.lane,h=a.eventTime;if((r&d)===d){f!==null&&(f=f.next={eventTime:h,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var p=e,m=a;switch(d=t,h=n,m.tag){case 1:if(p=m.payload,typeof p==\"function\"){c=p.call(h,c,d);break e}c=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=m.payload,d=typeof p==\"function\"?p.call(h,c,d):p,d==null)break e;c=Ge({},c,d);break e;case 2:Ci=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,d=i.effects,d===null?i.effects=[a]:d.push(a))}else h={eventTime:h,lane:d,tag:a.tag,payload:a.payload,callback:a.callback,next:null},f===null?(u=f=h,l=c):f=f.next=h,o|=d;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;d=a,a=d.next,d.next=null,i.lastBaseUpdate=d,i.shared.pending=null}}while(!0);if(f===null&&(l=c),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=f,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else s===null&&(i.shared.lanes=0);Vs|=o,e.lanes=o,e.memoizedState=c}}function wb(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!=\"function\")throw Error(Q(191,i));i.call(r)}}}var tc={},Sr=ss(tc),gu=ss(tc),yu=ss(tc);function _s(e){if(e===tc)throw Error(Q(174));return e}function Iv(e,t){switch(De(yu,t),De(gu,e),De(Sr,tc),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Kg(null,\"\");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Kg(t,e)}Ve(Sr),De(Sr,t)}function ha(){Ve(Sr),Ve(gu),Ve(yu)}function mA(e){_s(yu.current);var t=_s(Sr.current),n=Kg(t,e.type);t!==n&&(De(gu,e),De(Sr,n))}function Dv(e){gu.current===e&&(Ve(Sr),Ve(gu))}var We=ss(0);function Cd(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data===\"$?\"||n.data===\"$!\"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var pm=[];function Mv(){for(var e=0;e<pm.length;e++)pm[e]._workInProgressVersionPrimary=null;pm.length=0}var Af=fi.ReactCurrentDispatcher,mm=fi.ReactCurrentBatchConfig,Bs=0,Ye=null,dt=null,pt=null,Td=!1,zl=!1,vu=0,u3=0;function Et(){throw Error(Q(321))}function jv(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!or(e[n],t[n]))return!1;return!0}function Fv(e,t,n,r,i,s){if(Bs=s,Ye=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Af.current=e===null||e.memoizedState===null?h3:p3,e=n(r,i),zl){s=0;do{if(zl=!1,vu=0,25<=s)throw Error(Q(301));s+=1,pt=dt=null,t.updateQueue=null,Af.current=m3,e=n(r,i)}while(zl)}if(Af.current=_d,t=dt!==null&&dt.next!==null,Bs=0,pt=dt=Ye=null,Td=!1,t)throw Error(Q(300));return e}function $v(){var e=vu!==0;return vu=0,e}function mr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return pt===null?Ye.memoizedState=pt=e:pt=pt.next=e,pt}function $n(){if(dt===null){var e=Ye.alternate;e=e!==null?e.memoizedState:null}else e=dt.next;var t=pt===null?Ye.memoizedState:pt.next;if(t!==null)pt=t,dt=e;else{if(e===null)throw Error(Q(310));dt=e,e={memoizedState:dt.memoizedState,baseState:dt.baseState,baseQueue:dt.baseQueue,queue:dt.queue,next:null},pt===null?Ye.memoizedState=pt=e:pt=pt.next=e}return pt}function wu(e,t){return typeof t==\"function\"?t(e):t}function gm(e){var t=$n(),n=t.queue;if(n===null)throw Error(Q(311));n.lastRenderedReducer=e;var r=dt,i=r.baseQueue,s=n.pending;if(s!==null){if(i!==null){var o=i.next;i.next=s.next,s.next=o}r.baseQueue=i=s,n.pending=null}if(i!==null){s=i.next,r=r.baseState;var a=o=null,l=null,u=s;do{var f=u.lane;if((Bs&f)===f)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var c={lane:f,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(a=l=c,o=r):l=l.next=c,Ye.lanes|=f,Vs|=f}u=u.next}while(u!==null&&u!==s);l===null?o=r:l.next=a,or(r,t.memoizedState)||(Jt=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do s=i.lane,Ye.lanes|=s,Vs|=s,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function ym(e){var t=$n(),n=t.queue;if(n===null)throw Error(Q(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,s=t.memoizedState;if(i!==null){n.pending=null;var o=i=i.next;do s=e(s,o.action),o=o.next;while(o!==i);or(s,t.memoizedState)||(Jt=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function gA(){}function yA(e,t){var n=Ye,r=$n(),i=t(),s=!or(r.memoizedState,i);if(s&&(r.memoizedState=i,Jt=!0),r=r.queue,Bv(xA.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||pt!==null&&pt.memoizedState.tag&1){if(n.flags|=2048,xu(9,wA.bind(null,n,r,i,t),void 0,null),mt===null)throw Error(Q(349));Bs&30||vA(n,t,i)}return i}function vA(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ye.updateQueue,t===null?(t={lastEffect:null,stores:null},Ye.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function wA(e,t,n,r){t.value=n,t.getSnapshot=r,bA(t)&&SA(e)}function xA(e,t,n){return n(function(){bA(t)&&SA(e)})}function bA(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!or(e,n)}catch{return!0}}function SA(e){var t=ni(e,1);t!==null&&rr(t,e,1,-1)}function xb(e){var t=mr();return typeof e==\"function\"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:wu,lastRenderedState:e},t.queue=e,e=e.dispatch=d3.bind(null,Ye,e),[t.memoizedState,e]}function xu(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Ye.updateQueue,t===null?(t={lastEffect:null,stores:null},Ye.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function kA(){return $n().memoizedState}function Nf(e,t,n,r){var i=mr();Ye.flags|=e,i.memoizedState=xu(1|t,n,void 0,r===void 0?null:r)}function Ph(e,t,n,r){var i=$n();r=r===void 0?null:r;var s=void 0;if(dt!==null){var o=dt.memoizedState;if(s=o.destroy,r!==null&&jv(r,o.deps)){i.memoizedState=xu(t,n,s,r);return}}Ye.flags|=e,i.memoizedState=xu(1|t,n,s,r)}function bb(e,t){return Nf(8390656,8,e,t)}function Bv(e,t){return Ph(2048,8,e,t)}function EA(e,t){return Ph(4,2,e,t)}function CA(e,t){return Ph(4,4,e,t)}function TA(e,t){if(typeof t==\"function\")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function _A(e,t,n){return n=n!=null?n.concat([e]):null,Ph(4,4,TA.bind(null,t,e),n)}function Vv(){}function AA(e,t){var n=$n();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&jv(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function NA(e,t){var n=$n();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&jv(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function PA(e,t,n){return Bs&21?(or(n,t)||(n=D_(),Ye.lanes|=n,Vs|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Jt=!0),e.memoizedState=n)}function c3(e,t){var n=Oe;Oe=n!==0&&4>n?n:4,e(!0);var r=mm.transition;mm.transition={};try{e(!1),t()}finally{Oe=n,mm.transition=r}}function OA(){return $n().memoizedState}function f3(e,t,n){var r=Bi(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},LA(e))RA(t,n);else if(n=hA(e,t,n,r),n!==null){var i=Bt();rr(n,e,r,i),IA(n,t,r)}}function d3(e,t,n){var r=Bi(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(LA(e))RA(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var o=t.lastRenderedState,a=s(o,n);if(i.hasEagerState=!0,i.eagerState=a,or(a,o)){var l=t.interleaved;l===null?(i.next=i,Lv(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=hA(e,t,i,r),n!==null&&(i=Bt(),rr(n,e,r,i),IA(n,t,r))}}function LA(e){var t=e.alternate;return e===Ye||t!==null&&t===Ye}function RA(e,t){zl=Td=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function IA(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,vv(e,n)}}var _d={readContext:Fn,useCallback:Et,useContext:Et,useEffect:Et,useImperativeHandle:Et,useInsertionEffect:Et,useLayoutEffect:Et,useMemo:Et,useReducer:Et,useRef:Et,useState:Et,useDebugValue:Et,useDeferredValue:Et,useTransition:Et,useMutableSource:Et,useSyncExternalStore:Et,useId:Et,unstable_isNewReconciler:!1},h3={readContext:Fn,useCallback:function(e,t){return mr().memoizedState=[e,t===void 0?null:t],e},useContext:Fn,useEffect:bb,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Nf(4194308,4,TA.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Nf(4194308,4,e,t)},useInsertionEffect:function(e,t){return Nf(4,2,e,t)},useMemo:function(e,t){var n=mr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=mr();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=f3.bind(null,Ye,e),[r.memoizedState,e]},useRef:function(e){var t=mr();return e={current:e},t.memoizedState=e},useState:xb,useDebugValue:Vv,useDeferredValue:function(e){return mr().memoizedState=e},useTransition:function(){var e=xb(!1),t=e[0];return e=c3.bind(null,e[1]),mr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ye,i=mr();if(ze){if(n===void 0)throw Error(Q(407));n=n()}else{if(n=t(),mt===null)throw Error(Q(349));Bs&30||vA(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,bb(xA.bind(null,r,s,e),[e]),r.flags|=2048,xu(9,wA.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=mr(),t=mt.identifierPrefix;if(ze){var n=Ur,r=zr;n=(r&~(1<<32-nr(r)-1)).toString(32)+n,t=\":\"+t+\"R\"+n,n=vu++,0<n&&(t+=\"H\"+n.toString(32)),t+=\":\"}else n=u3++,t=\":\"+t+\"r\"+n.toString(32)+\":\";return e.memoizedState=t},unstable_isNewReconciler:!1},p3={readContext:Fn,useCallback:AA,useContext:Fn,useEffect:Bv,useImperativeHandle:_A,useInsertionEffect:EA,useLayoutEffect:CA,useMemo:NA,useReducer:gm,useRef:kA,useState:function(){return gm(wu)},useDebugValue:Vv,useDeferredValue:function(e){var t=$n();return PA(t,dt.memoizedState,e)},useTransition:function(){var e=gm(wu)[0],t=$n().memoizedState;return[e,t]},useMutableSource:gA,useSyncExternalStore:yA,useId:OA,unstable_isNewReconciler:!1},m3={readContext:Fn,useCallback:AA,useContext:Fn,useEffect:Bv,useImperativeHandle:_A,useInsertionEffect:EA,useLayoutEffect:CA,useMemo:NA,useReducer:ym,useRef:kA,useState:function(){return ym(wu)},useDebugValue:Vv,useDeferredValue:function(e){var t=$n();return dt===null?t.memoizedState=e:PA(t,dt.memoizedState,e)},useTransition:function(){var e=ym(wu)[0],t=$n().memoizedState;return[e,t]},useMutableSource:gA,useSyncExternalStore:yA,useId:OA,unstable_isNewReconciler:!1};function qn(e,t){if(e&&e.defaultProps){t=Ge({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function hy(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Ge({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Oh={isMounted:function(e){return(e=e._reactInternals)?eo(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Bt(),i=Bi(e),s=Yr(r,i);s.payload=t,n!=null&&(s.callback=n),t=Fi(e,s,i),t!==null&&(rr(t,e,i,r),_f(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Bt(),i=Bi(e),s=Yr(r,i);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=Fi(e,s,i),t!==null&&(rr(t,e,i,r),_f(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Bt(),r=Bi(e),i=Yr(n,r);i.tag=2,t!=null&&(i.callback=t),t=Fi(e,i,r),t!==null&&(rr(t,e,r,n),_f(t,e,r))}};function Sb(e,t,n,r,i,s,o){return e=e.stateNode,typeof e.shouldComponentUpdate==\"function\"?e.shouldComponentUpdate(r,s,o):t.prototype&&t.prototype.isPureReactComponent?!du(n,r)||!du(i,s):!0}function DA(e,t,n){var r=!1,i=Yi,s=t.contextType;return typeof s==\"object\"&&s!==null?s=Fn(s):(i=nn(t)?Fs:Lt.current,r=t.contextTypes,s=(r=r!=null)?ca(e,i):Yi),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Oh,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),t}function kb(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==\"function\"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==\"function\"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Oh.enqueueReplaceState(t,t.state,null)}function py(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Rv(e);var s=t.contextType;typeof s==\"object\"&&s!==null?i.context=Fn(s):(s=nn(t)?Fs:Lt.current,i.context=ca(e,s)),i.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s==\"function\"&&(hy(e,t,s,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps==\"function\"||typeof i.getSnapshotBeforeUpdate==\"function\"||typeof i.UNSAFE_componentWillMount!=\"function\"&&typeof i.componentWillMount!=\"function\"||(t=i.state,typeof i.componentWillMount==\"function\"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount==\"function\"&&i.UNSAFE_componentWillMount(),t!==i.state&&Oh.enqueueReplaceState(i,i.state,null),Ed(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount==\"function\"&&(e.flags|=4194308)}function pa(e,t){try{var n=\"\",r=t;do n+=UF(r),r=r.return;while(r);var i=n}catch(s){i=`\nError generating stack: `+s.message+`\n`+s.stack}return{value:e,source:t,stack:i,digest:null}}function vm(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function my(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var g3=typeof WeakMap==\"function\"?WeakMap:Map;function MA(e,t,n){n=Yr(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Nd||(Nd=!0,Cy=r),my(e,t)},n}function jA(e,t,n){n=Yr(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r==\"function\"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){my(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch==\"function\"&&(n.callback=function(){my(e,t),typeof r!=\"function\"&&($i===null?$i=new Set([this]):$i.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:\"\"})}),n}function Eb(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new g3;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=P3.bind(null,e,t,n),t.then(e,e))}function Cb(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Tb(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Yr(-1,1),t.tag=2,Fi(n,t,1))),n.lanes|=1),e)}var y3=fi.ReactCurrentOwner,Jt=!1;function Mt(e,t,n,r){t.child=e===null?dA(t,null,n,r):da(t,e.child,n,r)}function _b(e,t,n,r,i){n=n.render;var s=t.ref;return Qo(t,i),r=Fv(e,t,n,r,s,i),n=$v(),e!==null&&!Jt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,ri(e,t,i)):(ze&&n&&Tv(t),t.flags|=1,Mt(e,t,r,i),t.child)}function Ab(e,t,n,r,i){if(e===null){var s=n.type;return typeof s==\"function\"&&!Gv(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,FA(e,t,s,r,i)):(e=Rf(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&i)){var o=s.memoizedProps;if(n=n.compare,n=n!==null?n:du,n(o,r)&&e.ref===t.ref)return ri(e,t,i)}return t.flags|=1,e=Vi(s,r),e.ref=t.ref,e.return=t,t.child=e}function FA(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(du(s,r)&&e.ref===t.ref)if(Jt=!1,t.pendingProps=r=s,(e.lanes&i)!==0)e.flags&131072&&(Jt=!0);else return t.lanes=e.lanes,ri(e,t,i)}return gy(e,t,n,r,i)}function $A(e,t,n){var r=t.pendingProps,i=r.children,s=e!==null?e.memoizedState:null;if(r.mode===\"hidden\")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},De(Ro,ln),ln|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,De(Ro,ln),ln|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,De(Ro,ln),ln|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,De(Ro,ln),ln|=r;return Mt(e,t,i,n),t.child}function BA(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function gy(e,t,n,r,i){var s=nn(n)?Fs:Lt.current;return s=ca(t,s),Qo(t,i),n=Fv(e,t,n,r,s,i),r=$v(),e!==null&&!Jt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,ri(e,t,i)):(ze&&r&&Tv(t),t.flags|=1,Mt(e,t,n,i),t.child)}function Nb(e,t,n,r,i){if(nn(n)){var s=!0;wd(t)}else s=!1;if(Qo(t,i),t.stateNode===null)Pf(e,t),DA(t,n,r),py(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,u=n.contextType;typeof u==\"object\"&&u!==null?u=Fn(u):(u=nn(n)?Fs:Lt.current,u=ca(t,u));var f=n.getDerivedStateFromProps,c=typeof f==\"function\"||typeof o.getSnapshotBeforeUpdate==\"function\";c||typeof o.UNSAFE_componentWillReceiveProps!=\"function\"&&typeof o.componentWillReceiveProps!=\"function\"||(a!==r||l!==u)&&kb(t,o,r,u),Ci=!1;var d=t.memoizedState;o.state=d,Ed(t,r,o,i),l=t.memoizedState,a!==r||d!==l||tn.current||Ci?(typeof f==\"function\"&&(hy(t,n,f,r),l=t.memoizedState),(a=Ci||Sb(t,n,a,r,d,l,u))?(c||typeof o.UNSAFE_componentWillMount!=\"function\"&&typeof o.componentWillMount!=\"function\"||(typeof o.componentWillMount==\"function\"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount==\"function\"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount==\"function\"&&(t.flags|=4194308)):(typeof o.componentDidMount==\"function\"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),o.props=r,o.state=l,o.context=u,r=a):(typeof o.componentDidMount==\"function\"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,pA(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:qn(t.type,a),o.props=u,c=t.pendingProps,d=o.context,l=n.contextType,typeof l==\"object\"&&l!==null?l=Fn(l):(l=nn(n)?Fs:Lt.current,l=ca(t,l));var h=n.getDerivedStateFromProps;(f=typeof h==\"function\"||typeof o.getSnapshotBeforeUpdate==\"function\")||typeof o.UNSAFE_componentWillReceiveProps!=\"function\"&&typeof o.componentWillReceiveProps!=\"function\"||(a!==c||d!==l)&&kb(t,o,r,l),Ci=!1,d=t.memoizedState,o.state=d,Ed(t,r,o,i);var p=t.memoizedState;a!==c||d!==p||tn.current||Ci?(typeof h==\"function\"&&(hy(t,n,h,r),p=t.memoizedState),(u=Ci||Sb(t,n,u,r,d,p,l)||!1)?(f||typeof o.UNSAFE_componentWillUpdate!=\"function\"&&typeof o.componentWillUpdate!=\"function\"||(typeof o.componentWillUpdate==\"function\"&&o.componentWillUpdate(r,p,l),typeof o.UNSAFE_componentWillUpdate==\"function\"&&o.UNSAFE_componentWillUpdate(r,p,l)),typeof o.componentDidUpdate==\"function\"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate==\"function\"&&(t.flags|=1024)):(typeof o.componentDidUpdate!=\"function\"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!=\"function\"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),o.props=r,o.state=p,o.context=l,r=u):(typeof o.componentDidUpdate!=\"function\"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!=\"function\"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),r=!1)}return yy(e,t,n,r,s,i)}function yy(e,t,n,r,i,s){BA(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return i&&pb(t,n,!1),ri(e,t,s);r=t.stateNode,y3.current=t;var a=o&&typeof n.getDerivedStateFromError!=\"function\"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=da(t,e.child,null,s),t.child=da(t,null,a,s)):Mt(e,t,a,s),t.memoizedState=r.state,i&&pb(t,n,!0),t.child}function VA(e){var t=e.stateNode;t.pendingContext?hb(e,t.pendingContext,t.pendingContext!==t.context):t.context&&hb(e,t.context,!1),Iv(e,t.containerInfo)}function Pb(e,t,n,r,i){return fa(),Av(i),t.flags|=256,Mt(e,t,n,r),t.child}var vy={dehydrated:null,treeContext:null,retryLane:0};function wy(e){return{baseLanes:e,cachePool:null,transitions:null}}function zA(e,t,n){var r=t.pendingProps,i=We.current,s=!1,o=(t.flags&128)!==0,a;if((a=o)||(a=e!==null&&e.memoizedState===null?!1:(i&2)!==0),a?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),De(We,i&1),e===null)return fy(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data===\"$!\"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,s?(r=t.mode,s=t.child,o={mode:\"hidden\",children:o},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=o):s=Ih(o,r,0,null),e=Is(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=wy(n),t.memoizedState=vy,e):zv(t,o));if(i=e.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return v3(e,t,o,r,a,i,n);if(s){s=r.fallback,o=t.mode,i=e.child,a=i.sibling;var l={mode:\"hidden\",children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=Vi(i,l),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?s=Vi(a,s):(s=Is(s,o,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,o=e.child.memoizedState,o=o===null?wy(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=e.childLanes&~n,t.memoizedState=vy,r}return s=e.child,e=s.sibling,r=Vi(s,{mode:\"visible\",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function zv(e,t){return t=Ih({mode:\"visible\",children:t},e.mode,0,null),t.return=e,e.child=t}function $c(e,t,n,r){return r!==null&&Av(r),da(t,e.child,null,n),e=zv(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function v3(e,t,n,r,i,s,o){if(n)return t.flags&256?(t.flags&=-257,r=vm(Error(Q(422))),$c(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=Ih({mode:\"visible\",children:r.children},i,0,null),s=Is(s,i,o,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&da(t,e.child,null,o),t.child.memoizedState=wy(o),t.memoizedState=vy,s);if(!(t.mode&1))return $c(e,t,o,null);if(i.data===\"$!\"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,s=Error(Q(419)),r=vm(s,r,void 0),$c(e,t,o,r)}if(a=(o&e.childLanes)!==0,Jt||a){if(r=mt,r!==null){switch(o&-o){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|o)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,ni(e,i),rr(r,e,i,-1))}return Yv(),r=vm(Error(Q(421))),$c(e,t,o,r)}return i.data===\"$?\"?(t.flags|=128,t.child=e.child,t=O3.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,hn=ji(i.nextSibling),gn=t,ze=!0,Qn=null,e!==null&&(Pn[On++]=zr,Pn[On++]=Ur,Pn[On++]=$s,zr=e.id,Ur=e.overflow,$s=t),t=zv(t,r.children),t.flags|=4096,t)}function Ob(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),dy(e.return,t,n)}function wm(e,t,n,r,i){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i)}function UA(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail;if(Mt(e,t,r.children,n),r=We.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ob(e,n,t);else if(e.tag===19)Ob(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(De(We,r),!(t.mode&1))t.memoizedState=null;else switch(i){case\"forwards\":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Cd(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),wm(t,!1,i,n,s);break;case\"backwards\":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Cd(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}wm(t,!0,n,null,s);break;case\"together\":wm(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Pf(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function ri(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Vs|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(Q(153));if(t.child!==null){for(e=t.child,n=Vi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Vi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function w3(e,t,n){switch(t.tag){case 3:VA(t),fa();break;case 5:mA(t);break;case 1:nn(t.type)&&wd(t);break;case 4:Iv(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;De(Sd,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(De(We,We.current&1),t.flags|=128,null):n&t.child.childLanes?zA(e,t,n):(De(We,We.current&1),e=ri(e,t,n),e!==null?e.sibling:null);De(We,We.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return UA(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),De(We,We.current),r)break;return null;case 22:case 23:return t.lanes=0,$A(e,t,n)}return ri(e,t,n)}var HA,xy,WA,KA;HA=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};xy=function(){};WA=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,_s(Sr.current);var s=null;switch(n){case\"input\":i=zg(e,i),r=zg(e,r),s=[];break;case\"select\":i=Ge({},i,{value:void 0}),r=Ge({},r,{value:void 0}),s=[];break;case\"textarea\":i=Wg(e,i),r=Wg(e,r),s=[];break;default:typeof i.onClick!=\"function\"&&typeof r.onClick==\"function\"&&(e.onclick=yd)}qg(n,r);var o;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u===\"style\"){var a=i[u];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]=\"\")}else u!==\"dangerouslySetInnerHTML\"&&u!==\"children\"&&u!==\"suppressContentEditableWarning\"&&u!==\"suppressHydrationWarning\"&&u!==\"autoFocus\"&&(su.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in r){var l=r[u];if(a=i!=null?i[u]:void 0,r.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u===\"style\")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]=\"\");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(s||(s=[]),s.push(u,n)),n=l;else u===\"dangerouslySetInnerHTML\"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(s=s||[]).push(u,l)):u===\"children\"?typeof l!=\"string\"&&typeof l!=\"number\"||(s=s||[]).push(u,\"\"+l):u!==\"suppressContentEditableWarning\"&&u!==\"suppressHydrationWarning\"&&(su.hasOwnProperty(u)?(l!=null&&u===\"onScroll\"&&$e(\"scroll\",e),s||a===l||(s=[])):(s=s||[]).push(u,l))}n&&(s=s||[]).push(\"style\",n);var u=s;(t.updateQueue=u)&&(t.flags|=4)}};KA=function(e,t,n,r){n!==r&&(t.flags|=4)};function ol(e,t){if(!ze)switch(e.tailMode){case\"hidden\":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case\"collapsed\":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ct(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function x3(e,t,n){var r=t.pendingProps;switch(_v(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ct(t),null;case 1:return nn(t.type)&&vd(),Ct(t),null;case 3:return r=t.stateNode,ha(),Ve(tn),Ve(Lt),Mv(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(jc(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Qn!==null&&(Ay(Qn),Qn=null))),xy(e,t),Ct(t),null;case 5:Dv(t);var i=_s(yu.current);if(n=t.type,e!==null&&t.stateNode!=null)WA(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(Q(166));return Ct(t),null}if(e=_s(Sr.current),jc(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[vr]=t,r[mu]=s,e=(t.mode&1)!==0,n){case\"dialog\":$e(\"cancel\",r),$e(\"close\",r);break;case\"iframe\":case\"object\":case\"embed\":$e(\"load\",r);break;case\"video\":case\"audio\":for(i=0;i<_l.length;i++)$e(_l[i],r);break;case\"source\":$e(\"error\",r);break;case\"img\":case\"image\":case\"link\":$e(\"error\",r),$e(\"load\",r);break;case\"details\":$e(\"toggle\",r);break;case\"input\":B1(r,s),$e(\"invalid\",r);break;case\"select\":r._wrapperState={wasMultiple:!!s.multiple},$e(\"invalid\",r);break;case\"textarea\":z1(r,s),$e(\"invalid\",r)}qg(n,s),i=null;for(var o in s)if(s.hasOwnProperty(o)){var a=s[o];o===\"children\"?typeof a==\"string\"?r.textContent!==a&&(s.suppressHydrationWarning!==!0&&Mc(r.textContent,a,e),i=[\"children\",a]):typeof a==\"number\"&&r.textContent!==\"\"+a&&(s.suppressHydrationWarning!==!0&&Mc(r.textContent,a,e),i=[\"children\",\"\"+a]):su.hasOwnProperty(o)&&a!=null&&o===\"onScroll\"&&$e(\"scroll\",r)}switch(n){case\"input\":Ac(r),V1(r,s,!0);break;case\"textarea\":Ac(r),U1(r);break;case\"select\":case\"option\":break;default:typeof s.onClick==\"function\"&&(r.onclick=yd)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,e===\"http://www.w3.org/1999/xhtml\"&&(e=x_(n)),e===\"http://www.w3.org/1999/xhtml\"?n===\"script\"?(e=o.createElement(\"div\"),e.innerHTML=\"<script><\\/script>\",e=e.removeChild(e.firstChild)):typeof r.is==\"string\"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n===\"select\"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[vr]=t,e[mu]=r,HA(e,t,!1,!1),t.stateNode=e;e:{switch(o=Yg(n,r),n){case\"dialog\":$e(\"cancel\",e),$e(\"close\",e),i=r;break;case\"iframe\":case\"object\":case\"embed\":$e(\"load\",e),i=r;break;case\"video\":case\"audio\":for(i=0;i<_l.length;i++)$e(_l[i],e);i=r;break;case\"source\":$e(\"error\",e),i=r;break;case\"img\":case\"image\":case\"link\":$e(\"error\",e),$e(\"load\",e),i=r;break;case\"details\":$e(\"toggle\",e),i=r;break;case\"input\":B1(e,r),i=zg(e,r),$e(\"invalid\",e);break;case\"option\":i=r;break;case\"select\":e._wrapperState={wasMultiple:!!r.multiple},i=Ge({},r,{value:void 0}),$e(\"invalid\",e);break;case\"textarea\":z1(e,r),i=Wg(e,r),$e(\"invalid\",e);break;default:i=r}qg(n,i),a=i;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s===\"style\"?k_(e,l):s===\"dangerouslySetInnerHTML\"?(l=l?l.__html:void 0,l!=null&&b_(e,l)):s===\"children\"?typeof l==\"string\"?(n!==\"textarea\"||l!==\"\")&&ou(e,l):typeof l==\"number\"&&ou(e,\"\"+l):s!==\"suppressContentEditableWarning\"&&s!==\"suppressHydrationWarning\"&&s!==\"autoFocus\"&&(su.hasOwnProperty(s)?l!=null&&s===\"onScroll\"&&$e(\"scroll\",e):l!=null&&dv(e,s,l,o))}switch(n){case\"input\":Ac(e),V1(e,r,!1);break;case\"textarea\":Ac(e),U1(e);break;case\"option\":r.value!=null&&e.setAttribute(\"value\",\"\"+qi(r.value));break;case\"select\":e.multiple=!!r.multiple,s=r.value,s!=null?qo(e,!!r.multiple,s,!1):r.defaultValue!=null&&qo(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick==\"function\"&&(e.onclick=yd)}switch(n){case\"button\":case\"input\":case\"select\":case\"textarea\":r=!!r.autoFocus;break e;case\"img\":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Ct(t),null;case 6:if(e&&t.stateNode!=null)KA(e,t,e.memoizedProps,r);else{if(typeof r!=\"string\"&&t.stateNode===null)throw Error(Q(166));if(n=_s(yu.current),_s(Sr.current),jc(t)){if(r=t.stateNode,n=t.memoizedProps,r[vr]=t,(s=r.nodeValue!==n)&&(e=gn,e!==null))switch(e.tag){case 3:Mc(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Mc(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[vr]=t,t.stateNode=r}return Ct(t),null;case 13:if(Ve(We),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ze&&hn!==null&&t.mode&1&&!(t.flags&128))cA(),fa(),t.flags|=98560,s=!1;else if(s=jc(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(Q(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(Q(317));s[vr]=t}else fa(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ct(t),s=!1}else Qn!==null&&(Ay(Qn),Qn=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||We.current&1?ht===0&&(ht=3):Yv())),t.updateQueue!==null&&(t.flags|=4),Ct(t),null);case 4:return ha(),xy(e,t),e===null&&hu(t.stateNode.containerInfo),Ct(t),null;case 10:return Ov(t.type._context),Ct(t),null;case 17:return nn(t.type)&&vd(),Ct(t),null;case 19:if(Ve(We),s=t.memoizedState,s===null)return Ct(t),null;if(r=(t.flags&128)!==0,o=s.rendering,o===null)if(r)ol(s,!1);else{if(ht!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Cd(e),o!==null){for(t.flags|=128,ol(s,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)s=n,e=r,s.flags&=14680066,o=s.alternate,o===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=o.childLanes,s.lanes=o.lanes,s.child=o.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=o.memoizedProps,s.memoizedState=o.memoizedState,s.updateQueue=o.updateQueue,s.type=o.type,e=o.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return De(We,We.current&1|2),t.child}e=e.sibling}s.tail!==null&&tt()>ma&&(t.flags|=128,r=!0,ol(s,!1),t.lanes=4194304)}else{if(!r)if(e=Cd(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ol(s,!0),s.tail===null&&s.tailMode===\"hidden\"&&!o.alternate&&!ze)return Ct(t),null}else 2*tt()-s.renderingStartTime>ma&&n!==1073741824&&(t.flags|=128,r=!0,ol(s,!1),t.lanes=4194304);s.isBackwards?(o.sibling=t.child,t.child=o):(n=s.last,n!==null?n.sibling=o:t.child=o,s.last=o)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=tt(),t.sibling=null,n=We.current,De(We,r?n&1|2:n&1),t):(Ct(t),null);case 22:case 23:return qv(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?ln&1073741824&&(Ct(t),t.subtreeFlags&6&&(t.flags|=8192)):Ct(t),null;case 24:return null;case 25:return null}throw Error(Q(156,t.tag))}function b3(e,t){switch(_v(t),t.tag){case 1:return nn(t.type)&&vd(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ha(),Ve(tn),Ve(Lt),Mv(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Dv(t),null;case 13:if(Ve(We),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Q(340));fa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ve(We),null;case 4:return ha(),null;case 10:return Ov(t.type._context),null;case 22:case 23:return qv(),null;case 24:return null;default:return null}}var Bc=!1,_t=!1,S3=typeof WeakSet==\"function\"?WeakSet:Set,oe=null;function Lo(e,t){var n=e.ref;if(n!==null)if(typeof n==\"function\")try{n(null)}catch(r){Qe(e,t,r)}else n.current=null}function by(e,t,n){try{n()}catch(r){Qe(e,t,r)}}var Lb=!1;function k3(e,t){if(iy=pd,e=Q_(),Cv(e)){if(\"selectionStart\"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,u=0,f=0,c=e,d=null;t:for(;;){for(var h;c!==n||i!==0&&c.nodeType!==3||(a=o+i),c!==s||r!==0&&c.nodeType!==3||(l=o+r),c.nodeType===3&&(o+=c.nodeValue.length),(h=c.firstChild)!==null;)d=c,c=h;for(;;){if(c===e)break t;if(d===n&&++u===i&&(a=o),d===s&&++f===r&&(l=o),(h=c.nextSibling)!==null)break;c=d,d=c.parentNode}c=h}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(sy={focusedElem:e,selectionRange:n},pd=!1,oe=t;oe!==null;)if(t=oe,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,oe=e;else for(;oe!==null;){t=oe;try{var p=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var m=p.memoizedProps,w=p.memoizedState,y=t.stateNode,v=y.getSnapshotBeforeUpdate(t.elementType===t.type?m:qn(t.type,m),w);y.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var g=t.stateNode.containerInfo;g.nodeType===1?g.textContent=\"\":g.nodeType===9&&g.documentElement&&g.removeChild(g.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Q(163))}}catch(x){Qe(t,t.return,x)}if(e=t.sibling,e!==null){e.return=t.return,oe=e;break}oe=t.return}return p=Lb,Lb=!1,p}function Ul(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,s!==void 0&&by(t,n,s)}i=i.next}while(i!==r)}}function Lh(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Sy(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t==\"function\"?t(e):t.current=e}}function qA(e){var t=e.alternate;t!==null&&(e.alternate=null,qA(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[vr],delete t[mu],delete t[ly],delete t[s3],delete t[o3])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function YA(e){return e.tag===5||e.tag===3||e.tag===4}function Rb(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||YA(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function ky(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=yd));else if(r!==4&&(e=e.child,e!==null))for(ky(e,t,n),e=e.sibling;e!==null;)ky(e,t,n),e=e.sibling}function Ey(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Ey(e,t,n),e=e.sibling;e!==null;)Ey(e,t,n),e=e.sibling}var xt=null,Yn=!1;function gi(e,t,n){for(n=n.child;n!==null;)GA(e,t,n),n=n.sibling}function GA(e,t,n){if(br&&typeof br.onCommitFiberUnmount==\"function\")try{br.onCommitFiberUnmount(Eh,n)}catch{}switch(n.tag){case 5:_t||Lo(n,t);case 6:var r=xt,i=Yn;xt=null,gi(e,t,n),xt=r,Yn=i,xt!==null&&(Yn?(e=xt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):xt.removeChild(n.stateNode));break;case 18:xt!==null&&(Yn?(e=xt,n=n.stateNode,e.nodeType===8?dm(e.parentNode,n):e.nodeType===1&&dm(e,n),cu(e)):dm(xt,n.stateNode));break;case 4:r=xt,i=Yn,xt=n.stateNode.containerInfo,Yn=!0,gi(e,t,n),xt=r,Yn=i;break;case 0:case 11:case 14:case 15:if(!_t&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&by(n,t,o),i=i.next}while(i!==r)}gi(e,t,n);break;case 1:if(!_t&&(Lo(n,t),r=n.stateNode,typeof r.componentWillUnmount==\"function\"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Qe(n,t,a)}gi(e,t,n);break;case 21:gi(e,t,n);break;case 22:n.mode&1?(_t=(r=_t)||n.memoizedState!==null,gi(e,t,n),_t=r):gi(e,t,n);break;default:gi(e,t,n)}}function Ib(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new S3),t.forEach(function(r){var i=L3.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Wn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var s=e,o=t,a=o;e:for(;a!==null;){switch(a.tag){case 5:xt=a.stateNode,Yn=!1;break e;case 3:xt=a.stateNode.containerInfo,Yn=!0;break e;case 4:xt=a.stateNode.containerInfo,Yn=!0;break e}a=a.return}if(xt===null)throw Error(Q(160));GA(s,o,i),xt=null,Yn=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(u){Qe(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)XA(t,e),t=t.sibling}function XA(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Wn(t,e),pr(e),r&4){try{Ul(3,e,e.return),Lh(3,e)}catch(m){Qe(e,e.return,m)}try{Ul(5,e,e.return)}catch(m){Qe(e,e.return,m)}}break;case 1:Wn(t,e),pr(e),r&512&&n!==null&&Lo(n,n.return);break;case 5:if(Wn(t,e),pr(e),r&512&&n!==null&&Lo(n,n.return),e.flags&32){var i=e.stateNode;try{ou(i,\"\")}catch(m){Qe(e,e.return,m)}}if(r&4&&(i=e.stateNode,i!=null)){var s=e.memoizedProps,o=n!==null?n.memoizedProps:s,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a===\"input\"&&s.type===\"radio\"&&s.name!=null&&v_(i,s),Yg(a,o);var u=Yg(a,s);for(o=0;o<l.length;o+=2){var f=l[o],c=l[o+1];f===\"style\"?k_(i,c):f===\"dangerouslySetInnerHTML\"?b_(i,c):f===\"children\"?ou(i,c):dv(i,f,c,u)}switch(a){case\"input\":Ug(i,s);break;case\"textarea\":w_(i,s);break;case\"select\":var d=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var h=s.value;h!=null?qo(i,!!s.multiple,h,!1):d!==!!s.multiple&&(s.defaultValue!=null?qo(i,!!s.multiple,s.defaultValue,!0):qo(i,!!s.multiple,s.multiple?[]:\"\",!1))}i[mu]=s}catch(m){Qe(e,e.return,m)}}break;case 6:if(Wn(t,e),pr(e),r&4){if(e.stateNode===null)throw Error(Q(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(m){Qe(e,e.return,m)}}break;case 3:if(Wn(t,e),pr(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{cu(t.containerInfo)}catch(m){Qe(e,e.return,m)}break;case 4:Wn(t,e),pr(e);break;case 13:Wn(t,e),pr(e),i=e.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(Wv=tt())),r&4&&Ib(e);break;case 22:if(f=n!==null&&n.memoizedState!==null,e.mode&1?(_t=(u=_t)||f,Wn(t,e),_t=u):Wn(t,e),pr(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!f&&e.mode&1)for(oe=e,f=e.child;f!==null;){for(c=oe=f;oe!==null;){switch(d=oe,h=d.child,d.tag){case 0:case 11:case 14:case 15:Ul(4,d,d.return);break;case 1:Lo(d,d.return);var p=d.stateNode;if(typeof p.componentWillUnmount==\"function\"){r=d,n=d.return;try{t=r,p.props=t.memoizedProps,p.state=t.memoizedState,p.componentWillUnmount()}catch(m){Qe(r,n,m)}}break;case 5:Lo(d,d.return);break;case 22:if(d.memoizedState!==null){Mb(c);continue}}h!==null?(h.return=d,oe=h):Mb(c)}f=f.sibling}e:for(f=null,c=e;;){if(c.tag===5){if(f===null){f=c;try{i=c.stateNode,u?(s=i.style,typeof s.setProperty==\"function\"?s.setProperty(\"display\",\"none\",\"important\"):s.display=\"none\"):(a=c.stateNode,l=c.memoizedProps.style,o=l!=null&&l.hasOwnProperty(\"display\")?l.display:null,a.style.display=S_(\"display\",o))}catch(m){Qe(e,e.return,m)}}}else if(c.tag===6){if(f===null)try{c.stateNode.nodeValue=u?\"\":c.memoizedProps}catch(m){Qe(e,e.return,m)}}else if((c.tag!==22&&c.tag!==23||c.memoizedState===null||c===e)&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===e)break e;for(;c.sibling===null;){if(c.return===null||c.return===e)break e;f===c&&(f=null),c=c.return}f===c&&(f=null),c.sibling.return=c.return,c=c.sibling}}break;case 19:Wn(t,e),pr(e),r&4&&Ib(e);break;case 21:break;default:Wn(t,e),pr(e)}}function pr(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(YA(n)){var r=n;break e}n=n.return}throw Error(Q(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(ou(i,\"\"),r.flags&=-33);var s=Rb(e);Ey(e,s,i);break;case 3:case 4:var o=r.stateNode.containerInfo,a=Rb(e);ky(e,a,o);break;default:throw Error(Q(161))}}catch(l){Qe(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function E3(e,t,n){oe=e,QA(e)}function QA(e,t,n){for(var r=(e.mode&1)!==0;oe!==null;){var i=oe,s=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||Bc;if(!o){var a=i.alternate,l=a!==null&&a.memoizedState!==null||_t;a=Bc;var u=_t;if(Bc=o,(_t=l)&&!u)for(oe=i;oe!==null;)o=oe,l=o.child,o.tag===22&&o.memoizedState!==null?jb(i):l!==null?(l.return=o,oe=l):jb(i);for(;s!==null;)oe=s,QA(s),s=s.sibling;oe=i,Bc=a,_t=u}Db(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,oe=s):Db(e)}}function Db(e){for(;oe!==null;){var t=oe;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:_t||Lh(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!_t)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:qn(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&wb(t,s,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}wb(t,o,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var l=t.memoizedProps;switch(t.type){case\"button\":case\"input\":case\"select\":case\"textarea\":l.autoFocus&&n.focus();break;case\"img\":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var f=u.memoizedState;if(f!==null){var c=f.dehydrated;c!==null&&cu(c)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Q(163))}_t||t.flags&512&&Sy(t)}catch(d){Qe(t,t.return,d)}}if(t===e){oe=null;break}if(n=t.sibling,n!==null){n.return=t.return,oe=n;break}oe=t.return}}function Mb(e){for(;oe!==null;){var t=oe;if(t===e){oe=null;break}var n=t.sibling;if(n!==null){n.return=t.return,oe=n;break}oe=t.return}}function jb(e){for(;oe!==null;){var t=oe;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Lh(4,t)}catch(l){Qe(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount==\"function\"){var i=t.return;try{r.componentDidMount()}catch(l){Qe(t,i,l)}}var s=t.return;try{Sy(t)}catch(l){Qe(t,s,l)}break;case 5:var o=t.return;try{Sy(t)}catch(l){Qe(t,o,l)}}}catch(l){Qe(t,t.return,l)}if(t===e){oe=null;break}var a=t.sibling;if(a!==null){a.return=t.return,oe=a;break}oe=t.return}}var C3=Math.ceil,Ad=fi.ReactCurrentDispatcher,Uv=fi.ReactCurrentOwner,Dn=fi.ReactCurrentBatchConfig,Ae=0,mt=null,it=null,St=0,ln=0,Ro=ss(0),ht=0,bu=null,Vs=0,Rh=0,Hv=0,Hl=null,Xt=null,Wv=0,ma=1/0,Br=null,Nd=!1,Cy=null,$i=null,Vc=!1,Li=null,Pd=0,Wl=0,Ty=null,Of=-1,Lf=0;function Bt(){return Ae&6?tt():Of!==-1?Of:Of=tt()}function Bi(e){return e.mode&1?Ae&2&&St!==0?St&-St:l3.transition!==null?(Lf===0&&(Lf=D_()),Lf):(e=Oe,e!==0||(e=window.event,e=e===void 0?16:z_(e.type)),e):1}function rr(e,t,n,r){if(50<Wl)throw Wl=0,Ty=null,Error(Q(185));Zu(e,n,r),(!(Ae&2)||e!==mt)&&(e===mt&&(!(Ae&2)&&(Rh|=n),ht===4&&Ai(e,St)),rn(e,r),n===1&&Ae===0&&!(t.mode&1)&&(ma=tt()+500,Nh&&os()))}function rn(e,t){var n=e.callbackNode;l$(e,t);var r=hd(e,e===mt?St:0);if(r===0)n!==null&&K1(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&K1(n),t===1)e.tag===0?a3(Fb.bind(null,e)):aA(Fb.bind(null,e)),r3(function(){!(Ae&6)&&os()}),n=null;else{switch(M_(r)){case 1:n=yv;break;case 4:n=R_;break;case 16:n=dd;break;case 536870912:n=I_;break;default:n=dd}n=s2(n,ZA.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function ZA(e,t){if(Of=-1,Lf=0,Ae&6)throw Error(Q(327));var n=e.callbackNode;if(Zo()&&e.callbackNode!==n)return null;var r=hd(e,e===mt?St:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Od(e,r);else{t=r;var i=Ae;Ae|=2;var s=e2();(mt!==e||St!==t)&&(Br=null,ma=tt()+500,Rs(e,t));do try{A3();break}catch(a){JA(e,a)}while(!0);Pv(),Ad.current=s,Ae=i,it!==null?t=0:(mt=null,St=0,t=ht)}if(t!==0){if(t===2&&(i=Jg(e),i!==0&&(r=i,t=_y(e,i))),t===1)throw n=bu,Rs(e,0),Ai(e,r),rn(e,tt()),n;if(t===6)Ai(e,r);else{if(i=e.current.alternate,!(r&30)&&!T3(i)&&(t=Od(e,r),t===2&&(s=Jg(e),s!==0&&(r=s,t=_y(e,s))),t===1))throw n=bu,Rs(e,0),Ai(e,r),rn(e,tt()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(Q(345));case 2:vs(e,Xt,Br);break;case 3:if(Ai(e,r),(r&130023424)===r&&(t=Wv+500-tt(),10<t)){if(hd(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){Bt(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=ay(vs.bind(null,e,Xt,Br),t);break}vs(e,Xt,Br);break;case 4:if(Ai(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-nr(r);s=1<<o,o=t[o],o>i&&(i=o),r&=~s}if(r=i,r=tt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*C3(r/1960))-r,10<r){e.timeoutHandle=ay(vs.bind(null,e,Xt,Br),r);break}vs(e,Xt,Br);break;case 5:vs(e,Xt,Br);break;default:throw Error(Q(329))}}}return rn(e,tt()),e.callbackNode===n?ZA.bind(null,e):null}function _y(e,t){var n=Hl;return e.current.memoizedState.isDehydrated&&(Rs(e,t).flags|=256),e=Od(e,t),e!==2&&(t=Xt,Xt=n,t!==null&&Ay(t)),e}function Ay(e){Xt===null?Xt=e:Xt.push.apply(Xt,e)}function T3(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],s=i.getSnapshot;i=i.value;try{if(!or(s(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ai(e,t){for(t&=~Hv,t&=~Rh,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-nr(t),r=1<<n;e[n]=-1,t&=~r}}function Fb(e){if(Ae&6)throw Error(Q(327));Zo();var t=hd(e,0);if(!(t&1))return rn(e,tt()),null;var n=Od(e,t);if(e.tag!==0&&n===2){var r=Jg(e);r!==0&&(t=r,n=_y(e,r))}if(n===1)throw n=bu,Rs(e,0),Ai(e,t),rn(e,tt()),n;if(n===6)throw Error(Q(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,vs(e,Xt,Br),rn(e,tt()),null}function Kv(e,t){var n=Ae;Ae|=1;try{return e(t)}finally{Ae=n,Ae===0&&(ma=tt()+500,Nh&&os())}}function zs(e){Li!==null&&Li.tag===0&&!(Ae&6)&&Zo();var t=Ae;Ae|=1;var n=Dn.transition,r=Oe;try{if(Dn.transition=null,Oe=1,e)return e()}finally{Oe=r,Dn.transition=n,Ae=t,!(Ae&6)&&os()}}function qv(){ln=Ro.current,Ve(Ro)}function Rs(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,n3(n)),it!==null)for(n=it.return;n!==null;){var r=n;switch(_v(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&vd();break;case 3:ha(),Ve(tn),Ve(Lt),Mv();break;case 5:Dv(r);break;case 4:ha();break;case 13:Ve(We);break;case 19:Ve(We);break;case 10:Ov(r.type._context);break;case 22:case 23:qv()}n=n.return}if(mt=e,it=e=Vi(e.current,null),St=ln=t,ht=0,bu=null,Hv=Rh=Vs=0,Xt=Hl=null,Ts!==null){for(t=0;t<Ts.length;t++)if(n=Ts[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,s=n.pending;if(s!==null){var o=s.next;s.next=i,r.next=o}n.pending=r}Ts=null}return e}function JA(e,t){do{var n=it;try{if(Pv(),Af.current=_d,Td){for(var r=Ye.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}Td=!1}if(Bs=0,pt=dt=Ye=null,zl=!1,vu=0,Uv.current=null,n===null||n.return===null){ht=1,bu=t,it=null;break}e:{var s=e,o=n.return,a=n,l=t;if(t=St,a.flags|=32768,l!==null&&typeof l==\"object\"&&typeof l.then==\"function\"){var u=l,f=a,c=f.tag;if(!(f.mode&1)&&(c===0||c===11||c===15)){var d=f.alternate;d?(f.updateQueue=d.updateQueue,f.memoizedState=d.memoizedState,f.lanes=d.lanes):(f.updateQueue=null,f.memoizedState=null)}var h=Cb(o);if(h!==null){h.flags&=-257,Tb(h,o,a,s,t),h.mode&1&&Eb(s,u,t),t=h,l=u;var p=t.updateQueue;if(p===null){var m=new Set;m.add(l),t.updateQueue=m}else p.add(l);break e}else{if(!(t&1)){Eb(s,u,t),Yv();break e}l=Error(Q(426))}}else if(ze&&a.mode&1){var w=Cb(o);if(w!==null){!(w.flags&65536)&&(w.flags|=256),Tb(w,o,a,s,t),Av(pa(l,a));break e}}s=l=pa(l,a),ht!==4&&(ht=2),Hl===null?Hl=[s]:Hl.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var y=MA(s,l,t);vb(s,y);break e;case 1:a=l;var v=s.type,g=s.stateNode;if(!(s.flags&128)&&(typeof v.getDerivedStateFromError==\"function\"||g!==null&&typeof g.componentDidCatch==\"function\"&&($i===null||!$i.has(g)))){s.flags|=65536,t&=-t,s.lanes|=t;var x=jA(s,a,t);vb(s,x);break e}}s=s.return}while(s!==null)}n2(n)}catch(S){t=S,it===n&&n!==null&&(it=n=n.return);continue}break}while(!0)}function e2(){var e=Ad.current;return Ad.current=_d,e===null?_d:e}function Yv(){(ht===0||ht===3||ht===2)&&(ht=4),mt===null||!(Vs&268435455)&&!(Rh&268435455)||Ai(mt,St)}function Od(e,t){var n=Ae;Ae|=2;var r=e2();(mt!==e||St!==t)&&(Br=null,Rs(e,t));do try{_3();break}catch(i){JA(e,i)}while(!0);if(Pv(),Ae=n,Ad.current=r,it!==null)throw Error(Q(261));return mt=null,St=0,ht}function _3(){for(;it!==null;)t2(it)}function A3(){for(;it!==null&&!JF();)t2(it)}function t2(e){var t=i2(e.alternate,e,ln);e.memoizedProps=e.pendingProps,t===null?n2(e):it=t,Uv.current=null}function n2(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=b3(n,t),n!==null){n.flags&=32767,it=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{ht=6,it=null;return}}else if(n=x3(n,t,ln),n!==null){it=n;return}if(t=t.sibling,t!==null){it=t;return}it=t=e}while(t!==null);ht===0&&(ht=5)}function vs(e,t,n){var r=Oe,i=Dn.transition;try{Dn.transition=null,Oe=1,N3(e,t,n,r)}finally{Dn.transition=i,Oe=r}return null}function N3(e,t,n,r){do Zo();while(Li!==null);if(Ae&6)throw Error(Q(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(Q(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(u$(e,s),e===mt&&(it=mt=null,St=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Vc||(Vc=!0,s2(dd,function(){return Zo(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=Dn.transition,Dn.transition=null;var o=Oe;Oe=1;var a=Ae;Ae|=4,Uv.current=null,k3(e,n),XA(n,e),G$(sy),pd=!!iy,sy=iy=null,e.current=n,E3(n),e$(),Ae=a,Oe=o,Dn.transition=s}else e.current=n;if(Vc&&(Vc=!1,Li=e,Pd=i),s=e.pendingLanes,s===0&&($i=null),r$(n.stateNode),rn(e,tt()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(Nd)throw Nd=!1,e=Cy,Cy=null,e;return Pd&1&&e.tag!==0&&Zo(),s=e.pendingLanes,s&1?e===Ty?Wl++:(Wl=0,Ty=e):Wl=0,os(),null}function Zo(){if(Li!==null){var e=M_(Pd),t=Dn.transition,n=Oe;try{if(Dn.transition=null,Oe=16>e?16:e,Li===null)var r=!1;else{if(e=Li,Li=null,Pd=0,Ae&6)throw Error(Q(331));var i=Ae;for(Ae|=4,oe=e.current;oe!==null;){var s=oe,o=s.child;if(oe.flags&16){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for(oe=u;oe!==null;){var f=oe;switch(f.tag){case 0:case 11:case 15:Ul(8,f,s)}var c=f.child;if(c!==null)c.return=f,oe=c;else for(;oe!==null;){f=oe;var d=f.sibling,h=f.return;if(qA(f),f===u){oe=null;break}if(d!==null){d.return=h,oe=d;break}oe=h}}}var p=s.alternate;if(p!==null){var m=p.child;if(m!==null){p.child=null;do{var w=m.sibling;m.sibling=null,m=w}while(m!==null)}}oe=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,oe=o;else e:for(;oe!==null;){if(s=oe,s.flags&2048)switch(s.tag){case 0:case 11:case 15:Ul(9,s,s.return)}var y=s.sibling;if(y!==null){y.return=s.return,oe=y;break e}oe=s.return}}var v=e.current;for(oe=v;oe!==null;){o=oe;var g=o.child;if(o.subtreeFlags&2064&&g!==null)g.return=o,oe=g;else e:for(o=v;oe!==null;){if(a=oe,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Lh(9,a)}}catch(S){Qe(a,a.return,S)}if(a===o){oe=null;break e}var x=a.sibling;if(x!==null){x.return=a.return,oe=x;break e}oe=a.return}}if(Ae=i,os(),br&&typeof br.onPostCommitFiberRoot==\"function\")try{br.onPostCommitFiberRoot(Eh,e)}catch{}r=!0}return r}finally{Oe=n,Dn.transition=t}}return!1}function $b(e,t,n){t=pa(n,t),t=MA(e,t,1),e=Fi(e,t,1),t=Bt(),e!==null&&(Zu(e,1,t),rn(e,t))}function Qe(e,t,n){if(e.tag===3)$b(e,e,n);else for(;t!==null;){if(t.tag===3){$b(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==\"function\"||typeof r.componentDidCatch==\"function\"&&($i===null||!$i.has(r))){e=pa(n,e),e=jA(t,e,1),t=Fi(t,e,1),e=Bt(),t!==null&&(Zu(t,1,e),rn(t,e));break}}t=t.return}}function P3(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Bt(),e.pingedLanes|=e.suspendedLanes&n,mt===e&&(St&n)===n&&(ht===4||ht===3&&(St&130023424)===St&&500>tt()-Wv?Rs(e,0):Hv|=n),rn(e,t)}function r2(e,t){t===0&&(e.mode&1?(t=Oc,Oc<<=1,!(Oc&130023424)&&(Oc=4194304)):t=1);var n=Bt();e=ni(e,t),e!==null&&(Zu(e,t,n),rn(e,n))}function O3(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),r2(e,n)}function L3(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(Q(314))}r!==null&&r.delete(t),r2(e,n)}var i2;i2=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||tn.current)Jt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Jt=!1,w3(e,t,n);Jt=!!(e.flags&131072)}else Jt=!1,ze&&t.flags&1048576&&lA(t,bd,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Pf(e,t),e=t.pendingProps;var i=ca(t,Lt.current);Qo(t,n),i=Fv(null,t,r,e,i,n);var s=$v();return t.flags|=1,typeof i==\"object\"&&i!==null&&typeof i.render==\"function\"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,nn(r)?(s=!0,wd(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Rv(t),i.updater=Oh,t.stateNode=i,i._reactInternals=t,py(t,r,e,n),t=yy(null,t,r,!0,s,n)):(t.tag=0,ze&&s&&Tv(t),Mt(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Pf(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=I3(r),e=qn(r,e),i){case 0:t=gy(null,t,r,e,n);break e;case 1:t=Nb(null,t,r,e,n);break e;case 11:t=_b(null,t,r,e,n);break e;case 14:t=Ab(null,t,r,qn(r.type,e),n);break e}throw Error(Q(306,r,\"\"))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:qn(r,i),gy(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:qn(r,i),Nb(e,t,r,i,n);case 3:e:{if(VA(t),e===null)throw Error(Q(387));r=t.pendingProps,s=t.memoizedState,i=s.element,pA(e,t),Ed(t,r,null,n);var o=t.memoizedState;if(r=o.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){i=pa(Error(Q(423)),t),t=Pb(e,t,r,n,i);break e}else if(r!==i){i=pa(Error(Q(424)),t),t=Pb(e,t,r,n,i);break e}else for(hn=ji(t.stateNode.containerInfo.firstChild),gn=t,ze=!0,Qn=null,n=dA(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(fa(),r===i){t=ri(e,t,n);break e}Mt(e,t,r,n)}t=t.child}return t;case 5:return mA(t),e===null&&fy(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,o=i.children,oy(r,i)?o=null:s!==null&&oy(r,s)&&(t.flags|=32),BA(e,t),Mt(e,t,o,n),t.child;case 6:return e===null&&fy(t),null;case 13:return zA(e,t,n);case 4:return Iv(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=da(t,null,r,n):Mt(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:qn(r,i),_b(e,t,r,i,n);case 7:return Mt(e,t,t.pendingProps,n),t.child;case 8:return Mt(e,t,t.pendingProps.children,n),t.child;case 12:return Mt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,s=t.memoizedProps,o=i.value,De(Sd,r._currentValue),r._currentValue=o,s!==null)if(or(s.value,o)){if(s.children===i.children&&!tn.current){t=ri(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(s.tag===1){l=Yr(-1,n&-n),l.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var f=u.pending;f===null?l.next=l:(l.next=f.next,f.next=l),u.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),dy(s.return,n,t),a.lanes|=n;break}l=l.next}}else if(s.tag===10)o=s.type===t.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(Q(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),dy(o,n,t),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===t){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}Mt(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Qo(t,n),i=Fn(i),r=r(i),t.flags|=1,Mt(e,t,r,n),t.child;case 14:return r=t.type,i=qn(r,t.pendingProps),i=qn(r.type,i),Ab(e,t,r,i,n);case 15:return FA(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:qn(r,i),Pf(e,t),t.tag=1,nn(r)?(e=!0,wd(t)):e=!1,Qo(t,n),DA(t,r,i),py(t,r,i,n),yy(null,t,r,!0,e,n);case 19:return UA(e,t,n);case 22:return $A(e,t,n)}throw Error(Q(156,t.tag))};function s2(e,t){return L_(e,t)}function R3(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function In(e,t,n,r){return new R3(e,t,n,r)}function Gv(e){return e=e.prototype,!(!e||!e.isReactComponent)}function I3(e){if(typeof e==\"function\")return Gv(e)?1:0;if(e!=null){if(e=e.$$typeof,e===pv)return 11;if(e===mv)return 14}return 2}function Vi(e,t){var n=e.alternate;return n===null?(n=In(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Rf(e,t,n,r,i,s){var o=2;if(r=e,typeof e==\"function\")Gv(e)&&(o=1);else if(typeof e==\"string\")o=5;else e:switch(e){case ko:return Is(n.children,i,s,t);case hv:o=8,i|=8;break;case Fg:return e=In(12,n,t,i|2),e.elementType=Fg,e.lanes=s,e;case $g:return e=In(13,n,t,i),e.elementType=$g,e.lanes=s,e;case Bg:return e=In(19,n,t,i),e.elementType=Bg,e.lanes=s,e;case m_:return Ih(n,i,s,t);default:if(typeof e==\"object\"&&e!==null)switch(e.$$typeof){case h_:o=10;break e;case p_:o=9;break e;case pv:o=11;break e;case mv:o=14;break e;case Ei:o=16,r=null;break e}throw Error(Q(130,e==null?e:typeof e,\"\"))}return t=In(o,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function Is(e,t,n,r){return e=In(7,e,r,t),e.lanes=n,e}function Ih(e,t,n,r){return e=In(22,e,r,t),e.elementType=m_,e.lanes=n,e.stateNode={isHidden:!1},e}function xm(e,t,n){return e=In(6,e,null,t),e.lanes=n,e}function bm(e,t,n){return t=In(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function D3(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=tm(0),this.expirationTimes=tm(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=tm(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Xv(e,t,n,r,i,s,o,a,l){return e=new D3(e,t,n,a,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=In(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Rv(s),e}function M3(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:So,key:r==null?null:\"\"+r,children:e,containerInfo:t,implementation:n}}function o2(e){if(!e)return Yi;e=e._reactInternals;e:{if(eo(e)!==e||e.tag!==1)throw Error(Q(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(nn(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(Q(171))}if(e.tag===1){var n=e.type;if(nn(n))return oA(e,n,t)}return t}function a2(e,t,n,r,i,s,o,a,l){return e=Xv(n,r,!0,e,i,s,o,a,l),e.context=o2(null),n=e.current,r=Bt(),i=Bi(n),s=Yr(r,i),s.callback=t??null,Fi(n,s,i),e.current.lanes=i,Zu(e,i,r),rn(e,r),e}function Dh(e,t,n,r){var i=t.current,s=Bt(),o=Bi(i);return n=o2(n),t.context===null?t.context=n:t.pendingContext=n,t=Yr(s,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Fi(i,t,o),e!==null&&(rr(e,i,o,s),_f(e,i,o)),o}function Ld(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Bb(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Qv(e,t){Bb(e,t),(e=e.alternate)&&Bb(e,t)}function j3(){return null}var l2=typeof reportError==\"function\"?reportError:function(e){console.error(e)};function Zv(e){this._internalRoot=e}Mh.prototype.render=Zv.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(Q(409));Dh(e,t,null,null)};Mh.prototype.unmount=Zv.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;zs(function(){Dh(null,e,null,null)}),t[ti]=null}};function Mh(e){this._internalRoot=e}Mh.prototype.unstable_scheduleHydration=function(e){if(e){var t=$_();e={blockedOn:null,target:e,priority:t};for(var n=0;n<_i.length&&t!==0&&t<_i[n].priority;n++);_i.splice(n,0,e),n===0&&V_(e)}};function Jv(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function jh(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==\" react-mount-point-unstable \"))}function Vb(){}function F3(e,t,n,r,i){if(i){if(typeof r==\"function\"){var s=r;r=function(){var u=Ld(o);s.call(u)}}var o=a2(t,r,e,0,null,!1,!1,\"\",Vb);return e._reactRootContainer=o,e[ti]=o.current,hu(e.nodeType===8?e.parentNode:e),zs(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r==\"function\"){var a=r;r=function(){var u=Ld(l);a.call(u)}}var l=Xv(e,0,!1,null,null,!1,!1,\"\",Vb);return e._reactRootContainer=l,e[ti]=l.current,hu(e.nodeType===8?e.parentNode:e),zs(function(){Dh(t,l,n,r)}),l}function Fh(e,t,n,r,i){var s=n._reactRootContainer;if(s){var o=s;if(typeof i==\"function\"){var a=i;i=function(){var l=Ld(o);a.call(l)}}Dh(t,o,e,i)}else o=F3(n,t,e,i,r);return Ld(o)}j_=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Tl(t.pendingLanes);n!==0&&(vv(t,n|1),rn(t,tt()),!(Ae&6)&&(ma=tt()+500,os()))}break;case 13:zs(function(){var r=ni(e,1);if(r!==null){var i=Bt();rr(r,e,1,i)}}),Qv(e,1)}};wv=function(e){if(e.tag===13){var t=ni(e,134217728);if(t!==null){var n=Bt();rr(t,e,134217728,n)}Qv(e,134217728)}};F_=function(e){if(e.tag===13){var t=Bi(e),n=ni(e,t);if(n!==null){var r=Bt();rr(n,e,t,r)}Qv(e,t)}};$_=function(){return Oe};B_=function(e,t){var n=Oe;try{return Oe=e,t()}finally{Oe=n}};Xg=function(e,t,n){switch(t){case\"input\":if(Ug(e,n),t=n.name,n.type===\"radio\"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(\"input[name=\"+JSON.stringify(\"\"+t)+'][type=\"radio\"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=Ah(r);if(!i)throw Error(Q(90));y_(r),Ug(r,i)}}}break;case\"textarea\":w_(e,n);break;case\"select\":t=n.value,t!=null&&qo(e,!!n.multiple,t,!1)}};T_=Kv;__=zs;var $3={usingClientEntryPoint:!1,Events:[ec,_o,Ah,E_,C_,Kv]},al={findFiberByHostInstance:Cs,bundleType:0,version:\"18.3.1\",rendererPackageName:\"react-dom\"},B3={bundleType:al.bundleType,version:al.version,rendererPackageName:al.rendererPackageName,rendererConfig:al.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:fi.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=P_(e),e===null?null:e.stateNode},findFiberByHostInstance:al.findFiberByHostInstance||j3,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:\"18.3.1-next-f1338f8080-20240426\"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<\"u\"){var zc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zc.isDisabled&&zc.supportsFiber)try{Eh=zc.inject(B3),br=zc}catch{}}kn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=$3;kn.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Jv(t))throw Error(Q(200));return M3(e,t,null,n)};kn.createRoot=function(e,t){if(!Jv(e))throw Error(Q(299));var n=!1,r=\"\",i=l2;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=Xv(e,1,!1,null,null,n,!1,r,i),e[ti]=t.current,hu(e.nodeType===8?e.parentNode:e),new Zv(t)};kn.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render==\"function\"?Error(Q(188)):(e=Object.keys(e).join(\",\"),Error(Q(268,e)));return e=P_(t),e=e===null?null:e.stateNode,e};kn.flushSync=function(e){return zs(e)};kn.hydrate=function(e,t,n){if(!jh(t))throw Error(Q(200));return Fh(null,e,t,!0,n)};kn.hydrateRoot=function(e,t,n){if(!Jv(e))throw Error(Q(405));var r=n!=null&&n.hydratedSources||null,i=!1,s=\"\",o=l2;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=a2(t,null,e,1,n??null,i,!1,s,o),e[ti]=t.current,hu(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new Mh(t)};kn.render=function(e,t,n){if(!jh(t))throw Error(Q(200));return Fh(null,e,t,!1,n)};kn.unmountComponentAtNode=function(e){if(!jh(e))throw Error(Q(40));return e._reactRootContainer?(zs(function(){Fh(null,null,e,!1,function(){e._reactRootContainer=null,e[ti]=null})}),!0):!1};kn.unstable_batchedUpdates=Kv;kn.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!jh(n))throw Error(Q(200));if(e==null||e._reactInternals===void 0)throw Error(Q(38));return Fh(e,t,n,!1,r)};kn.version=\"18.3.1-next-f1338f8080-20240426\";function u2(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>\"u\"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=\"function\"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(u2)}catch(e){console.error(e)}}u2(),u_.exports=kn;var nc=u_.exports;const V3=ci(nc);var c2,zb=nc;c2=zb.createRoot,zb.hydrateRoot;/**\n * @remix-run/router v1.19.2\n *\n * Copyright (c) Remix Software Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.md file in the root directory of this source tree.\n *\n * @license MIT\n */function Su(){return Su=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Su.apply(this,arguments)}var Ri;(function(e){e.Pop=\"POP\",e.Push=\"PUSH\",e.Replace=\"REPLACE\"})(Ri||(Ri={}));const Ub=\"popstate\";function z3(e){e===void 0&&(e={});function t(r,i){let{pathname:s,search:o,hash:a}=r.location;return Ny(\"\",{pathname:s,search:o,hash:a},i.state&&i.state.usr||null,i.state&&i.state.key||\"default\")}function n(r,i){return typeof i==\"string\"?i:Rd(i)}return H3(t,n,null,e)}function ot(e,t){if(e===!1||e===null||typeof e>\"u\")throw new Error(t)}function f2(e,t){if(!e){typeof console<\"u\"&&console.warn(t);try{throw new Error(t)}catch{}}}function U3(){return Math.random().toString(36).substr(2,8)}function Hb(e,t){return{usr:e.state,key:e.key,idx:t}}function Ny(e,t,n,r){return n===void 0&&(n=null),Su({pathname:typeof e==\"string\"?e:e.pathname,search:\"\",hash:\"\"},typeof t==\"string\"?Ra(t):t,{state:n,key:t&&t.key||r||U3()})}function Rd(e){let{pathname:t=\"/\",search:n=\"\",hash:r=\"\"}=e;return n&&n!==\"?\"&&(t+=n.charAt(0)===\"?\"?n:\"?\"+n),r&&r!==\"#\"&&(t+=r.charAt(0)===\"#\"?r:\"#\"+r),t}function Ra(e){let t={};if(e){let n=e.indexOf(\"#\");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf(\"?\");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function H3(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:s=!1}=r,o=i.history,a=Ri.Pop,l=null,u=f();u==null&&(u=0,o.replaceState(Su({},o.state,{idx:u}),\"\"));function f(){return(o.state||{idx:null}).idx}function c(){a=Ri.Pop;let w=f(),y=w==null?null:w-u;u=w,l&&l({action:a,location:m.location,delta:y})}function d(w,y){a=Ri.Push;let v=Ny(m.location,w,y);u=f()+1;let g=Hb(v,u),x=m.createHref(v);try{o.pushState(g,\"\",x)}catch(S){if(S instanceof DOMException&&S.name===\"DataCloneError\")throw S;i.location.assign(x)}s&&l&&l({action:a,location:m.location,delta:1})}function h(w,y){a=Ri.Replace;let v=Ny(m.location,w,y);u=f();let g=Hb(v,u),x=m.createHref(v);o.replaceState(g,\"\",x),s&&l&&l({action:a,location:m.location,delta:0})}function p(w){let y=i.location.origin!==\"null\"?i.location.origin:i.location.href,v=typeof w==\"string\"?w:Rd(w);return v=v.replace(/ $/,\"%20\"),ot(y,\"No window.location.(origin|href) available to create URL for href: \"+v),new URL(v,y)}let m={get action(){return a},get location(){return e(i,o)},listen(w){if(l)throw new Error(\"A history only accepts one active listener\");return i.addEventListener(Ub,c),l=w,()=>{i.removeEventListener(Ub,c),l=null}},createHref(w){return t(i,w)},createURL:p,encodeLocation(w){let y=p(w);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:d,replace:h,go(w){return o.go(w)}};return m}var Wb;(function(e){e.data=\"data\",e.deferred=\"deferred\",e.redirect=\"redirect\",e.error=\"error\"})(Wb||(Wb={}));function W3(e,t,n){return n===void 0&&(n=\"/\"),K3(e,t,n,!1)}function K3(e,t,n,r){let i=typeof t==\"string\"?Ra(t):t,s=ew(i.pathname||\"/\",n);if(s==null)return null;let o=d2(e);q3(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let u=i5(s);a=n5(o[l],u,r)}return a}function d2(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r=\"\");let i=(s,o,a)=>{let l={relativePath:a===void 0?s.path||\"\":a,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};l.relativePath.startsWith(\"/\")&&(ot(l.relativePath.startsWith(r),'Absolute route path \"'+l.relativePath+'\" nested under path '+('\"'+r+'\" is not valid. An absolute child route path ')+\"must start with the combined path of all its parent routes.\"),l.relativePath=l.relativePath.slice(r.length));let u=zi([r,l.relativePath]),f=n.concat(l);s.children&&s.children.length>0&&(ot(s.index!==!0,\"Index routes must not have child routes. Please remove \"+('all child routes from route path \"'+u+'\".')),d2(s.children,t,f,u)),!(s.path==null&&!s.index)&&t.push({path:u,score:e5(u,s.index),routesMeta:f})};return e.forEach((s,o)=>{var a;if(s.path===\"\"||!((a=s.path)!=null&&a.includes(\"?\")))i(s,o);else for(let l of h2(s.path))i(s,o,l)}),t}function h2(e){let t=e.split(\"/\");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(\"?\"),s=n.replace(/\\?$/,\"\");if(r.length===0)return i?[s,\"\"]:[s];let o=h2(r.join(\"/\")),a=[];return a.push(...o.map(l=>l===\"\"?s:[s,l].join(\"/\"))),i&&a.push(...o),a.map(l=>e.startsWith(\"/\")&&l===\"\"?\"/\":l)}function q3(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:t5(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Y3=/^:[\\w-]+$/,G3=3,X3=2,Q3=1,Z3=10,J3=-2,Kb=e=>e===\"*\";function e5(e,t){let n=e.split(\"/\"),r=n.length;return n.some(Kb)&&(r+=J3),t&&(r+=X3),n.filter(i=>!Kb(i)).reduce((i,s)=>i+(Y3.test(s)?G3:s===\"\"?Q3:Z3),r)}function t5(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function n5(e,t,n){let{routesMeta:r}=e,i={},s=\"/\",o=[];for(let a=0;a<r.length;++a){let l=r[a],u=a===r.length-1,f=s===\"/\"?t:t.slice(s.length)||\"/\",c=qb({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},f),d=l.route;if(!c&&u&&n&&!r[r.length-1].route.index&&(c=qb({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},f)),!c)return null;Object.assign(i,c.params),o.push({params:i,pathname:zi([s,c.pathname]),pathnameBase:l5(zi([s,c.pathnameBase])),route:d}),c.pathnameBase!==\"/\"&&(s=zi([s,c.pathnameBase]))}return o}function qb(e,t){typeof e==\"string\"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=r5(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let s=i[0],o=s.replace(/(.)\\/+$/,\"$1\"),a=i.slice(1);return{params:r.reduce((u,f,c)=>{let{paramName:d,isOptional:h}=f;if(d===\"*\"){let m=a[c]||\"\";o=s.slice(0,s.length-m.length).replace(/(.)\\/+$/,\"$1\")}const p=a[c];return h&&!p?u[d]=void 0:u[d]=(p||\"\").replace(/%2F/g,\"/\"),u},{}),pathname:s,pathnameBase:o,pattern:e}}function r5(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),f2(e===\"*\"||!e.endsWith(\"*\")||e.endsWith(\"/*\"),'Route path \"'+e+'\" will be treated as if it were '+('\"'+e.replace(/\\*$/,\"/*\")+'\" because the `*` character must ')+\"always follow a `/` in the pattern. To get rid of this warning, \"+('please change the route path to \"'+e.replace(/\\*$/,\"/*\")+'\".'));let r=[],i=\"^\"+e.replace(/\\/*\\*?$/,\"\").replace(/^\\/*/,\"/\").replace(/[\\\\.*+^${}|()[\\]]/g,\"\\\\$&\").replace(/\\/:([\\w-]+)(\\?)?/g,(o,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?\"/?([^\\\\/]+)?\":\"/([^\\\\/]+)\"));return e.endsWith(\"*\")?(r.push({paramName:\"*\"}),i+=e===\"*\"||e===\"/*\"?\"(.*)$\":\"(?:\\\\/(.+)|\\\\/*)$\"):n?i+=\"\\\\/*$\":e!==\"\"&&e!==\"/\"&&(i+=\"(?:(?=\\\\/|$))\"),[new RegExp(i,t?void 0:\"i\"),r]}function i5(e){try{return e.split(\"/\").map(t=>decodeURIComponent(t).replace(/\\//g,\"%2F\")).join(\"/\")}catch(t){return f2(!1,'The URL path \"'+e+'\" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+(\"encoding (\"+t+\").\")),e}}function ew(e,t){if(t===\"/\")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(\"/\")?t.length-1:t.length,r=e.charAt(n);return r&&r!==\"/\"?null:e.slice(n)||\"/\"}function s5(e,t){t===void 0&&(t=\"/\");let{pathname:n,search:r=\"\",hash:i=\"\"}=typeof e==\"string\"?Ra(e):e;return{pathname:n?n.startsWith(\"/\")?n:o5(n,t):t,search:u5(r),hash:c5(i)}}function o5(e,t){let n=t.replace(/\\/+$/,\"\").split(\"/\");return e.split(\"/\").forEach(i=>{i===\"..\"?n.length>1&&n.pop():i!==\".\"&&n.push(i)}),n.length>1?n.join(\"/\"):\"/\"}function Sm(e,t,n,r){return\"Cannot include a '\"+e+\"' character in a manually specified \"+(\"`to.\"+t+\"` field [\"+JSON.stringify(r)+\"].  Please separate it out to the \")+(\"`to.\"+n+\"` field. Alternatively you may provide the full path as \")+'a string in <Link to=\"...\"> and the router will parse it for you.'}function a5(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function p2(e,t){let n=a5(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function m2(e,t,n,r){r===void 0&&(r=!1);let i;typeof e==\"string\"?i=Ra(e):(i=Su({},e),ot(!i.pathname||!i.pathname.includes(\"?\"),Sm(\"?\",\"pathname\",\"search\",i)),ot(!i.pathname||!i.pathname.includes(\"#\"),Sm(\"#\",\"pathname\",\"hash\",i)),ot(!i.search||!i.search.includes(\"#\"),Sm(\"#\",\"search\",\"hash\",i)));let s=e===\"\"||i.pathname===\"\",o=s?\"/\":i.pathname,a;if(o==null)a=n;else{let c=t.length-1;if(!r&&o.startsWith(\"..\")){let d=o.split(\"/\");for(;d[0]===\"..\";)d.shift(),c-=1;i.pathname=d.join(\"/\")}a=c>=0?t[c]:\"/\"}let l=s5(i,a),u=o&&o!==\"/\"&&o.endsWith(\"/\"),f=(s||o===\".\")&&n.endsWith(\"/\");return!l.pathname.endsWith(\"/\")&&(u||f)&&(l.pathname+=\"/\"),l}const zi=e=>e.join(\"/\").replace(/\\/\\/+/g,\"/\"),l5=e=>e.replace(/\\/+$/,\"\").replace(/^\\/*/,\"/\"),u5=e=>!e||e===\"?\"?\"\":e.startsWith(\"?\")?e:\"?\"+e,c5=e=>!e||e===\"#\"?\"\":e.startsWith(\"#\")?e:\"#\"+e;function f5(e){return e!=null&&typeof e.status==\"number\"&&typeof e.statusText==\"string\"&&typeof e.internal==\"boolean\"&&\"data\"in e}const g2=[\"post\",\"put\",\"patch\",\"delete\"];new Set(g2);const d5=[\"get\",...g2];new Set(d5);/**\n * React Router v6.26.2\n *\n * Copyright (c) Remix Software Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.md file in the root directory of this source tree.\n *\n * @license MIT\n */function ku(){return ku=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ku.apply(this,arguments)}const tw=E.createContext(null),h5=E.createContext(null),to=E.createContext(null),$h=E.createContext(null),as=E.createContext({outlet:null,matches:[],isDataRoute:!1}),y2=E.createContext(null);function p5(e,t){let{relative:n}=t===void 0?{}:t;rc()||ot(!1);let{basename:r,navigator:i}=E.useContext(to),{hash:s,pathname:o,search:a}=x2(e,{relative:n}),l=o;return r!==\"/\"&&(l=o===\"/\"?r:zi([r,o])),i.createHref({pathname:l,search:a,hash:s})}function rc(){return E.useContext($h)!=null}function ic(){return rc()||ot(!1),E.useContext($h).location}function v2(e){E.useContext(to).static||E.useLayoutEffect(e)}function w2(){let{isDataRoute:e}=E.useContext(as);return e?A5():m5()}function m5(){rc()||ot(!1);let e=E.useContext(tw),{basename:t,future:n,navigator:r}=E.useContext(to),{matches:i}=E.useContext(as),{pathname:s}=ic(),o=JSON.stringify(p2(i,n.v7_relativeSplatPath)),a=E.useRef(!1);return v2(()=>{a.current=!0}),E.useCallback(function(u,f){if(f===void 0&&(f={}),!a.current)return;if(typeof u==\"number\"){r.go(u);return}let c=m2(u,JSON.parse(o),s,f.relative===\"path\");e==null&&t!==\"/\"&&(c.pathname=c.pathname===\"/\"?t:zi([t,c.pathname])),(f.replace?r.replace:r.push)(c,f.state,f)},[t,r,o,s,e])}function g5(){let{matches:e}=E.useContext(as),t=e[e.length-1];return t?t.params:{}}function x2(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=E.useContext(to),{matches:i}=E.useContext(as),{pathname:s}=ic(),o=JSON.stringify(p2(i,r.v7_relativeSplatPath));return E.useMemo(()=>m2(e,JSON.parse(o),s,n===\"path\"),[e,o,s,n])}function y5(e,t){return v5(e,t)}function v5(e,t,n,r){rc()||ot(!1);let{navigator:i}=E.useContext(to),{matches:s}=E.useContext(as),o=s[s.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:\"/\";o&&o.route;let u=ic(),f;if(t){var c;let w=typeof t==\"string\"?Ra(t):t;l===\"/\"||(c=w.pathname)!=null&&c.startsWith(l)||ot(!1),f=w}else f=u;let d=f.pathname||\"/\",h=d;if(l!==\"/\"){let w=l.replace(/^\\//,\"\").split(\"/\");h=\"/\"+d.replace(/^\\//,\"\").split(\"/\").slice(w.length).join(\"/\")}let p=W3(e,{pathname:h}),m=k5(p&&p.map(w=>Object.assign({},w,{params:Object.assign({},a,w.params),pathname:zi([l,i.encodeLocation?i.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase===\"/\"?l:zi([l,i.encodeLocation?i.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),s,n,r);return t&&m?E.createElement($h.Provider,{value:{location:ku({pathname:\"/\",search:\"\",hash:\"\",state:null,key:\"default\"},f),navigationType:Ri.Pop}},m):m}function w5(){let e=_5(),t=f5(e)?e.status+\" \"+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:\"0.5rem\",backgroundColor:\"rgba(200,200,200, 0.5)\"};return E.createElement(E.Fragment,null,E.createElement(\"h2\",null,\"Unexpected Application Error!\"),E.createElement(\"h3\",{style:{fontStyle:\"italic\"}},t),n?E.createElement(\"pre\",{style:i},n):null,null)}const x5=E.createElement(w5,null);class b5 extends E.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!==\"idle\"&&t.revalidation===\"idle\"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error(\"React Router caught the following error during render\",t,n)}render(){return this.state.error!==void 0?E.createElement(as.Provider,{value:this.props.routeContext},E.createElement(y2.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function S5(e){let{routeContext:t,match:n,children:r}=e,i=E.useContext(tw);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),E.createElement(as.Provider,{value:t},r)}function k5(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var s;if(!n)return null;if(n.errors)e=n.matches;else if((s=r)!=null&&s.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,a=(i=n)==null?void 0:i.errors;if(a!=null){let f=o.findIndex(c=>c.route.id&&(a==null?void 0:a[c.route.id])!==void 0);f>=0||ot(!1),o=o.slice(0,Math.min(o.length,f+1))}let l=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let f=0;f<o.length;f++){let c=o[f];if((c.route.HydrateFallback||c.route.hydrateFallbackElement)&&(u=f),c.route.id){let{loaderData:d,errors:h}=n,p=c.route.loader&&d[c.route.id]===void 0&&(!h||h[c.route.id]===void 0);if(c.route.lazy||p){l=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((f,c,d)=>{let h,p=!1,m=null,w=null;n&&(h=a&&c.route.id?a[c.route.id]:void 0,m=c.route.errorElement||x5,l&&(u<0&&d===0?(p=!0,w=null):u===d&&(p=!0,w=c.route.hydrateFallbackElement||null)));let y=t.concat(o.slice(0,d+1)),v=()=>{let g;return h?g=m:p?g=w:c.route.Component?g=E.createElement(c.route.Component,null):c.route.element?g=c.route.element:g=f,E.createElement(S5,{match:c,routeContext:{outlet:f,matches:y,isDataRoute:n!=null},children:g})};return n&&(c.route.ErrorBoundary||c.route.errorElement||d===0)?E.createElement(b5,{location:n.location,revalidation:n.revalidation,component:m,error:h,children:v(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):v()},null)}var b2=function(e){return e.UseBlocker=\"useBlocker\",e.UseRevalidator=\"useRevalidator\",e.UseNavigateStable=\"useNavigate\",e}(b2||{}),Id=function(e){return e.UseBlocker=\"useBlocker\",e.UseLoaderData=\"useLoaderData\",e.UseActionData=\"useActionData\",e.UseRouteError=\"useRouteError\",e.UseNavigation=\"useNavigation\",e.UseRouteLoaderData=\"useRouteLoaderData\",e.UseMatches=\"useMatches\",e.UseRevalidator=\"useRevalidator\",e.UseNavigateStable=\"useNavigate\",e.UseRouteId=\"useRouteId\",e}(Id||{});function E5(e){let t=E.useContext(tw);return t||ot(!1),t}function C5(e){let t=E.useContext(h5);return t||ot(!1),t}function T5(e){let t=E.useContext(as);return t||ot(!1),t}function S2(e){let t=T5(),n=t.matches[t.matches.length-1];return n.route.id||ot(!1),n.route.id}function _5(){var e;let t=E.useContext(y2),n=C5(Id.UseRouteError),r=S2(Id.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function A5(){let{router:e}=E5(b2.UseNavigateStable),t=S2(Id.UseNavigateStable),n=E.useRef(!1);return v2(()=>{n.current=!0}),E.useCallback(function(i,s){s===void 0&&(s={}),n.current&&(typeof i==\"number\"?e.navigate(i):e.navigate(i,ku({fromRouteId:t},s)))},[e,t])}function yo(e){ot(!1)}function N5(e){let{basename:t=\"/\",children:n=null,location:r,navigationType:i=Ri.Pop,navigator:s,static:o=!1,future:a}=e;rc()&&ot(!1);let l=t.replace(/^\\/*/,\"/\"),u=E.useMemo(()=>({basename:l,navigator:s,static:o,future:ku({v7_relativeSplatPath:!1},a)}),[l,a,s,o]);typeof r==\"string\"&&(r=Ra(r));let{pathname:f=\"/\",search:c=\"\",hash:d=\"\",state:h=null,key:p=\"default\"}=r,m=E.useMemo(()=>{let w=ew(f,l);return w==null?null:{location:{pathname:w,search:c,hash:d,state:h,key:p},navigationType:i}},[l,f,c,d,h,p,i]);return m==null?null:E.createElement(to.Provider,{value:u},E.createElement($h.Provider,{children:n,value:m}))}function P5(e){let{children:t,location:n}=e;return y5(Py(t),n)}new Promise(()=>{});function Py(e,t){t===void 0&&(t=[]);let n=[];return E.Children.forEach(e,(r,i)=>{if(!E.isValidElement(r))return;let s=[...t,i];if(r.type===E.Fragment){n.push.apply(n,Py(r.props.children,s));return}r.type!==yo&&ot(!1),!r.props.index||!r.props.children||ot(!1);let o={id:r.props.id||s.join(\"-\"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=Py(r.props.children,s)),n.push(o)}),n}/**\n * React Router DOM v6.26.2\n *\n * Copyright (c) Remix Software Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.md file in the root directory of this source tree.\n *\n * @license MIT\n */function Oy(){return Oy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Oy.apply(this,arguments)}function O5(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,s;for(s=0;s<r.length;s++)i=r[s],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function L5(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function R5(e,t){return e.button===0&&(!t||t===\"_self\")&&!L5(e)}const I5=[\"onClick\",\"relative\",\"reloadDocument\",\"replace\",\"state\",\"target\",\"to\",\"preventScrollReset\",\"unstable_viewTransition\"],D5=\"6\";try{window.__reactRouterVersion=D5}catch{}const M5=\"startTransition\",Yb=ld[M5];function j5(e){let{basename:t,children:n,future:r,window:i}=e,s=E.useRef();s.current==null&&(s.current=z3({window:i,v5Compat:!0}));let o=s.current,[a,l]=E.useState({action:o.action,location:o.location}),{v7_startTransition:u}=r||{},f=E.useCallback(c=>{u&&Yb?Yb(()=>l(c)):l(c)},[l,u]);return E.useLayoutEffect(()=>o.listen(f),[o,f]),E.createElement(N5,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:o,future:r})}const F5=typeof window<\"u\"&&typeof window.document<\"u\"&&typeof window.document.createElement<\"u\",$5=/^(?:[a-z][a-z0-9+.-]*:|\\/\\/)/i,Kl=E.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:s,replace:o,state:a,target:l,to:u,preventScrollReset:f,unstable_viewTransition:c}=t,d=O5(t,I5),{basename:h}=E.useContext(to),p,m=!1;if(typeof u==\"string\"&&$5.test(u)&&(p=u,F5))try{let g=new URL(window.location.href),x=u.startsWith(\"//\")?new URL(g.protocol+u):new URL(u),S=ew(x.pathname,h);x.origin===g.origin&&S!=null?u=S+x.search+x.hash:m=!0}catch{}let w=p5(u,{relative:i}),y=B5(u,{replace:o,state:a,target:l,preventScrollReset:f,relative:i,unstable_viewTransition:c});function v(g){r&&r(g),g.defaultPrevented||y(g)}return E.createElement(\"a\",Oy({},d,{href:p||w,onClick:m||s?r:v,ref:n,target:l}))});var Gb;(function(e){e.UseScrollRestoration=\"useScrollRestoration\",e.UseSubmit=\"useSubmit\",e.UseSubmitFetcher=\"useSubmitFetcher\",e.UseFetcher=\"useFetcher\",e.useViewTransitionState=\"useViewTransitionState\"})(Gb||(Gb={}));var Xb;(function(e){e.UseFetcher=\"useFetcher\",e.UseFetchers=\"useFetchers\",e.UseScrollRestoration=\"useScrollRestoration\"})(Xb||(Xb={}));function B5(e,t){let{target:n,replace:r,state:i,preventScrollReset:s,relative:o,unstable_viewTransition:a}=t===void 0?{}:t,l=w2(),u=ic(),f=x2(e,{relative:o});return E.useCallback(c=>{if(R5(c,n)){c.preventDefault();let d=r!==void 0?r:Rd(u)===Rd(f);l(e,{replace:d,state:i,preventScrollReset:s,relative:o,unstable_viewTransition:a})}},[u,l,f,r,i,n,e,s,o,a])}function wt(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var V5=typeof Symbol==\"function\"&&Symbol.observable||\"@@observable\",Qb=V5,km=()=>Math.random().toString(36).substring(7).split(\"\").join(\".\"),z5={INIT:`@@redux/INIT${km()}`,REPLACE:`@@redux/REPLACE${km()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${km()}`},Dd=z5;function nw(e){if(typeof e!=\"object\"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function k2(e,t,n){if(typeof e!=\"function\")throw new Error(wt(2));if(typeof t==\"function\"&&typeof n==\"function\"||typeof n==\"function\"&&typeof arguments[3]==\"function\")throw new Error(wt(0));if(typeof t==\"function\"&&typeof n>\"u\"&&(n=t,t=void 0),typeof n<\"u\"){if(typeof n!=\"function\")throw new Error(wt(1));return n(k2)(e,t)}let r=e,i=t,s=new Map,o=s,a=0,l=!1;function u(){o===s&&(o=new Map,s.forEach((w,y)=>{o.set(y,w)}))}function f(){if(l)throw new Error(wt(3));return i}function c(w){if(typeof w!=\"function\")throw new Error(wt(4));if(l)throw new Error(wt(5));let y=!0;u();const v=a++;return o.set(v,w),function(){if(y){if(l)throw new Error(wt(6));y=!1,u(),o.delete(v),s=null}}}function d(w){if(!nw(w))throw new Error(wt(7));if(typeof w.type>\"u\")throw new Error(wt(8));if(typeof w.type!=\"string\")throw new Error(wt(17));if(l)throw new Error(wt(9));try{l=!0,i=r(i,w)}finally{l=!1}return(s=o).forEach(v=>{v()}),w}function h(w){if(typeof w!=\"function\")throw new Error(wt(10));r=w,d({type:Dd.REPLACE})}function p(){const w=c;return{subscribe(y){if(typeof y!=\"object\"||y===null)throw new Error(wt(11));function v(){const x=y;x.next&&x.next(f())}return v(),{unsubscribe:w(v)}},[Qb](){return this}}}return d({type:Dd.INIT}),{dispatch:d,subscribe:c,getState:f,replaceReducer:h,[Qb]:p}}function U5(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:Dd.INIT})>\"u\")throw new Error(wt(12));if(typeof n(void 0,{type:Dd.PROBE_UNKNOWN_ACTION()})>\"u\")throw new Error(wt(13))})}function H5(e){const t=Object.keys(e),n={};for(let s=0;s<t.length;s++){const o=t[s];typeof e[o]==\"function\"&&(n[o]=e[o])}const r=Object.keys(n);let i;try{U5(n)}catch(s){i=s}return function(o={},a){if(i)throw i;let l=!1;const u={};for(let f=0;f<r.length;f++){const c=r[f],d=n[c],h=o[c],p=d(h,a);if(typeof p>\"u\")throw a&&a.type,new Error(wt(14));u[c]=p,l=l||p!==h}return l=l||r.length!==Object.keys(o).length,l?u:o}}function Md(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function W5(...e){return t=>(n,r)=>{const i=t(n,r);let s=()=>{throw new Error(wt(15))};const o={getState:i.getState,dispatch:(l,...u)=>s(l,...u)},a=e.map(l=>l(o));return s=Md(...a)(i.dispatch),{...i,dispatch:s}}}function K5(e){return nw(e)&&\"type\"in e&&typeof e.type==\"string\"}var E2=Symbol.for(\"immer-nothing\"),Zb=Symbol.for(\"immer-draftable\"),wn=Symbol.for(\"immer-state\");function Zn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var ga=Object.getPrototypeOf;function Us(e){return!!e&&!!e[wn]}function ii(e){var t;return e?C2(e)||Array.isArray(e)||!!e[Zb]||!!((t=e.constructor)!=null&&t[Zb])||Vh(e)||zh(e):!1}var q5=Object.prototype.constructor.toString();function C2(e){if(!e||typeof e!=\"object\")return!1;const t=ga(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,\"constructor\")&&t.constructor;return n===Object?!0:typeof n==\"function\"&&Function.toString.call(n)===q5}function jd(e,t){Bh(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Bh(e){const t=e[wn];return t?t.type_:Array.isArray(e)?1:Vh(e)?2:zh(e)?3:0}function Ly(e,t){return Bh(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function T2(e,t,n){const r=Bh(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Y5(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Vh(e){return e instanceof Map}function zh(e){return e instanceof Set}function ws(e){return e.copy_||e.base_}function Ry(e,t){if(Vh(e))return new Map(e);if(zh(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=C2(e);if(t===!0||t===\"class_only\"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[wn];let i=Reflect.ownKeys(r);for(let s=0;s<i.length;s++){const o=i[s],a=r[o];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(r[o]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[o]})}return Object.create(ga(e),r)}else{const r=ga(e);if(r!==null&&n)return{...e};const i=Object.create(r);return Object.assign(i,e)}}function rw(e,t=!1){return Uh(e)||Us(e)||!ii(e)||(Bh(e)>1&&(e.set=e.add=e.clear=e.delete=G5),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>rw(r,!0))),e}function G5(){Zn(2)}function Uh(e){return Object.isFrozen(e)}var X5={};function Hs(e){const t=X5[e];return t||Zn(0,e),t}var Eu;function _2(){return Eu}function Q5(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Jb(e,t){t&&(Hs(\"Patches\"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Iy(e){Dy(e),e.drafts_.forEach(Z5),e.drafts_=null}function Dy(e){e===Eu&&(Eu=e.parent_)}function eS(e){return Eu=Q5(Eu,e)}function Z5(e){const t=e[wn];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function tS(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[wn].modified_&&(Iy(t),Zn(4)),ii(e)&&(e=Fd(t,e),t.parent_||$d(t,e)),t.patches_&&Hs(\"Patches\").generateReplacementPatches_(n[wn].base_,e,t.patches_,t.inversePatches_)):e=Fd(t,n,[]),Iy(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==E2?e:void 0}function Fd(e,t,n){if(Uh(t))return t;const r=t[wn];if(!r)return jd(t,(i,s)=>nS(e,r,t,i,s,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return $d(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const i=r.copy_;let s=i,o=!1;r.type_===3&&(s=new Set(i),i.clear(),o=!0),jd(s,(a,l)=>nS(e,r,i,a,l,n,o)),$d(e,i,!1),n&&e.patches_&&Hs(\"Patches\").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function nS(e,t,n,r,i,s,o){if(Us(i)){const a=s&&t&&t.type_!==3&&!Ly(t.assigned_,r)?s.concat(r):void 0,l=Fd(e,i,a);if(T2(n,r,l),Us(l))e.canAutoFreeze_=!1;else return}else o&&n.add(i);if(ii(i)&&!Uh(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Fd(e,i),(!t||!t.scope_.parent_)&&typeof r!=\"symbol\"&&Object.prototype.propertyIsEnumerable.call(n,r)&&$d(e,i)}}function $d(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&rw(t,n)}function J5(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:_2(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,s=iw;n&&(i=[r],s=Cu);const{revoke:o,proxy:a}=Proxy.revocable(i,s);return r.draft_=a,r.revoke_=o,a}var iw={get(e,t){if(t===wn)return e;const n=ws(e);if(!Ly(n,t))return eB(e,n,t);const r=n[t];return e.finalized_||!ii(r)?r:r===Em(e.base_,t)?(Cm(e),e.copy_[t]=jy(r,e)):r},has(e,t){return t in ws(e)},ownKeys(e){return Reflect.ownKeys(ws(e))},set(e,t,n){const r=A2(ws(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=Em(ws(e),t),s=i==null?void 0:i[wn];if(s&&s.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(Y5(n,i)&&(n!==void 0||Ly(e.base_,t)))return!0;Cm(e),My(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return Em(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Cm(e),My(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=ws(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!==\"length\",enumerable:r.enumerable,value:n[t]}},defineProperty(){Zn(11)},getPrototypeOf(e){return ga(e.base_)},setPrototypeOf(){Zn(12)}},Cu={};jd(iw,(e,t)=>{Cu[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Cu.deleteProperty=function(e,t){return Cu.set.call(this,e,t,void 0)};Cu.set=function(e,t,n){return iw.set.call(this,e[0],t,n,e[0])};function Em(e,t){const n=e[wn];return(n?ws(n):e)[t]}function eB(e,t,n){var i;const r=A2(t,n);return r?\"value\"in r?r.value:(i=r.get)==null?void 0:i.call(e.draft_):void 0}function A2(e,t){if(!(t in e))return;let n=ga(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=ga(n)}}function My(e){e.modified_||(e.modified_=!0,e.parent_&&My(e.parent_))}function Cm(e){e.copy_||(e.copy_=Ry(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var tB=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t==\"function\"&&typeof n!=\"function\"){const s=n;n=t;const o=this;return function(l=s,...u){return o.produce(l,f=>n.call(this,f,...u))}}typeof n!=\"function\"&&Zn(6),r!==void 0&&typeof r!=\"function\"&&Zn(7);let i;if(ii(t)){const s=eS(this),o=jy(t,void 0);let a=!0;try{i=n(o),a=!1}finally{a?Iy(s):Dy(s)}return Jb(s,r),tS(i,s)}else if(!t||typeof t!=\"object\"){if(i=n(t),i===void 0&&(i=t),i===E2&&(i=void 0),this.autoFreeze_&&rw(i,!0),r){const s=[],o=[];Hs(\"Patches\").generateReplacementPatches_(t,i,s,o),r(s,o)}return i}else Zn(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t==\"function\")return(o,...a)=>this.produceWithPatches(o,l=>t(l,...a));let r,i;return[this.produce(t,n,(o,a)=>{r=o,i=a}),r,i]},typeof(e==null?void 0:e.autoFreeze)==\"boolean\"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)==\"boolean\"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){ii(e)||Zn(8),Us(e)&&(e=nB(e));const t=eS(this),n=jy(e,void 0);return n[wn].isManual_=!0,Dy(t),n}finishDraft(e,t){const n=e&&e[wn];(!n||!n.isManual_)&&Zn(9);const{scope_:r}=n;return Jb(r,t),tS(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const i=t[n];if(i.path.length===0&&i.op===\"replace\"){e=i.value;break}}n>-1&&(t=t.slice(n+1));const r=Hs(\"Patches\").applyPatches_;return Us(e)?r(e,t):this.produce(e,i=>r(i,t))}};function jy(e,t){const n=Vh(e)?Hs(\"MapSet\").proxyMap_(e,t):zh(e)?Hs(\"MapSet\").proxySet_(e,t):J5(e,t);return(t?t.scope_:_2()).drafts_.push(n),n}function nB(e){return Us(e)||Zn(10,e),N2(e)}function N2(e){if(!ii(e)||Uh(e))return e;const t=e[wn];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Ry(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Ry(e,!0);return jd(n,(r,i)=>{T2(n,r,N2(i))}),t&&(t.finalized_=!1),n}var xn=new tB,P2=xn.produce;xn.produceWithPatches.bind(xn);xn.setAutoFreeze.bind(xn);xn.setUseStrictShallowCopy.bind(xn);xn.applyPatches.bind(xn);xn.createDraft.bind(xn);xn.finishDraft.bind(xn);function O2(e){return({dispatch:n,getState:r})=>i=>s=>typeof s==\"function\"?s(n,r,e):i(s)}var rB=O2(),iB=O2,sB=typeof window<\"u\"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]==\"object\"?Md:Md.apply(null,arguments)};function rS(e,t){function n(...r){if(t){let i=t(...r);if(!i)throw new Error(ir(0));return{type:e,payload:i.payload,...\"meta\"in i&&{meta:i.meta},...\"error\"in i&&{error:i.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>K5(r)&&r.type===e,n}var L2=class Al extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Al.prototype)}static get[Symbol.species](){return Al}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Al(...t[0].concat(this)):new Al(...t.concat(this))}};function iS(e){return ii(e)?P2(e,()=>{}):e}function sS(e,t,n){if(e.has(t)){let i=e.get(t);return n.update&&(i=n.update(i,t,e),e.set(t,i)),i}if(!n.insert)throw new Error(ir(10));const r=n.insert(t,e);return e.set(t,r),r}function oB(e){return typeof e==\"boolean\"}var aB=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:i=!0,actionCreatorCheck:s=!0}=t??{};let o=new L2;return n&&(oB(n)?o.push(rB):o.push(iB(n.extraArgument))),o},lB=\"RTK_autoBatch\",R2=e=>t=>{setTimeout(t,e)},uB=typeof window<\"u\"&&window.requestAnimationFrame?window.requestAnimationFrame:R2(10),cB=(e={type:\"raf\"})=>t=>(...n)=>{const r=t(...n);let i=!0,s=!1,o=!1;const a=new Set,l=e.type===\"tick\"?queueMicrotask:e.type===\"raf\"?uB:e.type===\"callback\"?e.queueNotification:R2(e.timeout),u=()=>{o=!1,s&&(s=!1,a.forEach(f=>f()))};return Object.assign({},r,{subscribe(f){const c=()=>i&&f(),d=r.subscribe(c);return a.add(f),()=>{d(),a.delete(f)}},dispatch(f){var c;try{return i=!((c=f==null?void 0:f.meta)!=null&&c[lB]),s=!i,s&&(o||(o=!0,l(u))),r.dispatch(f)}finally{i=!0}}})},fB=e=>function(n){const{autoBatch:r=!0}=n??{};let i=new L2(e);return r&&i.push(cB(typeof r==\"object\"?r:void 0)),i};function dB(e){const t=aB(),{reducer:n=void 0,middleware:r,devTools:i=!0,preloadedState:s=void 0,enhancers:o=void 0}=e||{};let a;if(typeof n==\"function\")a=n;else if(nw(n))a=H5(n);else throw new Error(ir(1));let l;typeof r==\"function\"?l=r(t):l=t();let u=Md;i&&(u=sB({trace:!1,...typeof i==\"object\"&&i}));const f=W5(...l),c=fB(f);let d=typeof o==\"function\"?o(c):c();const h=u(...d);return k2(a,s,h)}function I2(e){const t={},n=[];let r;const i={addCase(s,o){const a=typeof s==\"string\"?s:s.type;if(!a)throw new Error(ir(28));if(a in t)throw new Error(ir(29));return t[a]=o,i},addMatcher(s,o){return n.push({matcher:s,reducer:o}),i},addDefaultCase(s){return r=s,i}};return e(i),[t,n,r]}function hB(e){return typeof e==\"function\"}function pB(e,t){let[n,r,i]=I2(t),s;if(hB(e))s=()=>iS(e());else{const a=iS(e);s=()=>a}function o(a=s(),l){let u=[n[l.type],...r.filter(({matcher:f})=>f(l)).map(({reducer:f})=>f)];return u.filter(f=>!!f).length===0&&(u=[i]),u.reduce((f,c)=>{if(c)if(Us(f)){const h=c(f,l);return h===void 0?f:h}else{if(ii(f))return P2(f,d=>c(d,l));{const d=c(f,l);if(d===void 0){if(f===null)return f;throw new Error(ir(9))}return d}}return f},a)}return o.getInitialState=s,o}var mB=Symbol.for(\"rtk-slice-createasyncthunk\");function gB(e,t){return`${e}/${t}`}function yB({creators:e}={}){var n;const t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[mB];return function(i){const{name:s,reducerPath:o=s}=i;if(!s)throw new Error(ir(11));typeof process<\"u\";const a=(typeof i.reducers==\"function\"?i.reducers(xB()):i.reducers)||{},l=Object.keys(a),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},f={addCase(g,x){const S=typeof g==\"string\"?g:g.type;if(!S)throw new Error(ir(12));if(S in u.sliceCaseReducersByType)throw new Error(ir(13));return u.sliceCaseReducersByType[S]=x,f},addMatcher(g,x){return u.sliceMatchers.push({matcher:g,reducer:x}),f},exposeAction(g,x){return u.actionCreators[g]=x,f},exposeCaseReducer(g,x){return u.sliceCaseReducersByName[g]=x,f}};l.forEach(g=>{const x=a[g],S={reducerName:g,type:gB(s,g),createNotation:typeof i.reducers==\"function\"};SB(x)?EB(S,x,f,t):bB(S,x,f)});function c(){const[g={},x=[],S=void 0]=typeof i.extraReducers==\"function\"?I2(i.extraReducers):[i.extraReducers],k={...g,...u.sliceCaseReducersByType};return pB(i.initialState,C=>{for(let T in k)C.addCase(T,k[T]);for(let T of u.sliceMatchers)C.addMatcher(T.matcher,T.reducer);for(let T of x)C.addMatcher(T.matcher,T.reducer);S&&C.addDefaultCase(S)})}const d=g=>g,h=new Map;let p;function m(g,x){return p||(p=c()),p(g,x)}function w(){return p||(p=c()),p.getInitialState()}function y(g,x=!1){function S(C){let T=C[g];return typeof T>\"u\"&&x&&(T=w()),T}function k(C=d){const T=sS(h,x,{insert:()=>new WeakMap});return sS(T,C,{insert:()=>{const O={};for(const[A,j]of Object.entries(i.selectors??{}))O[A]=vB(j,C,w,x);return O}})}return{reducerPath:g,getSelectors:k,get selectors(){return k(S)},selectSlice:S}}const v={name:s,reducer:m,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:w,...y(o),injectInto(g,{reducerPath:x,...S}={}){const k=x??o;return g.inject({reducerPath:k,reducer:m},S),{...v,...y(k,!0)}}};return v}}function vB(e,t,n,r){function i(s,...o){let a=t(s);return typeof a>\"u\"&&r&&(a=n()),e(a,...o)}return i.unwrapped=e,i}var wB=yB();function xB(){function e(t,n){return{_reducerDefinitionType:\"asyncThunk\",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:\"reducer\"})},preparedReducer(t,n){return{_reducerDefinitionType:\"reducerWithPrepare\",prepare:t,reducer:n}},asyncThunk:e}}function bB({type:e,reducerName:t,createNotation:n},r,i){let s,o;if(\"reducer\"in r){if(n&&!kB(r))throw new Error(ir(17));s=r.reducer,o=r.prepare}else s=r;i.addCase(e,s).exposeCaseReducer(t,s).exposeAction(t,o?rS(e,o):rS(e))}function SB(e){return e._reducerDefinitionType===\"asyncThunk\"}function kB(e){return e._reducerDefinitionType===\"reducerWithPrepare\"}function EB({type:e,reducerName:t},n,r,i){if(!i)throw new Error(ir(18));const{payloadCreator:s,fulfilled:o,pending:a,rejected:l,settled:u,options:f}=n,c=i(e,s,f);r.exposeAction(t,c),o&&r.addCase(c.fulfilled,o),a&&r.addCase(c.pending,a),l&&r.addCase(c.rejected,l),u&&r.addMatcher(c.settled,u),r.exposeCaseReducer(t,{fulfilled:o||Uc,pending:a||Uc,rejected:l||Uc,settled:u||Uc})}function Uc(){}function ir(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}const Ar=Object.create(null);Ar.open=\"0\";Ar.close=\"1\";Ar.ping=\"2\";Ar.pong=\"3\";Ar.message=\"4\";Ar.upgrade=\"5\";Ar.noop=\"6\";const If=Object.create(null);Object.keys(Ar).forEach(e=>{If[Ar[e]]=e});const Fy={type:\"error\",data:\"parser error\"},D2=typeof Blob==\"function\"||typeof Blob<\"u\"&&Object.prototype.toString.call(Blob)===\"[object BlobConstructor]\",M2=typeof ArrayBuffer==\"function\",j2=e=>typeof ArrayBuffer.isView==\"function\"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,sw=({type:e,data:t},n,r)=>D2&&t instanceof Blob?n?r(t):oS(t,r):M2&&(t instanceof ArrayBuffer||j2(t))?n?r(t):oS(new Blob([t]),r):r(Ar[e]+(t||\"\")),oS=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(\",\")[1];t(\"b\"+(r||\"\"))},n.readAsDataURL(e)};function aS(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Tm;function CB(e,t){if(D2&&e.data instanceof Blob)return e.data.arrayBuffer().then(aS).then(t);if(M2&&(e.data instanceof ArrayBuffer||j2(e.data)))return t(aS(e.data));sw(e,!1,n=>{Tm||(Tm=new TextEncoder),t(Tm.encode(n))})}const lS=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",Nl=typeof Uint8Array>\"u\"?[]:new Uint8Array(256);for(let e=0;e<lS.length;e++)Nl[lS.charCodeAt(e)]=e;const TB=e=>{let t=e.length*.75,n=e.length,r,i=0,s,o,a,l;e[e.length-1]===\"=\"&&(t--,e[e.length-2]===\"=\"&&t--);const u=new ArrayBuffer(t),f=new Uint8Array(u);for(r=0;r<n;r+=4)s=Nl[e.charCodeAt(r)],o=Nl[e.charCodeAt(r+1)],a=Nl[e.charCodeAt(r+2)],l=Nl[e.charCodeAt(r+3)],f[i++]=s<<2|o>>4,f[i++]=(o&15)<<4|a>>2,f[i++]=(a&3)<<6|l&63;return u},_B=typeof ArrayBuffer==\"function\",ow=(e,t)=>{if(typeof e!=\"string\")return{type:\"message\",data:F2(e,t)};const n=e.charAt(0);return n===\"b\"?{type:\"message\",data:AB(e.substring(1),t)}:If[n]?e.length>1?{type:If[n],data:e.substring(1)}:{type:If[n]}:Fy},AB=(e,t)=>{if(_B){const n=TB(e);return F2(n,t)}else return{base64:!0,data:e}},F2=(e,t)=>{switch(t){case\"blob\":return e instanceof Blob?e:new Blob([e]);case\"arraybuffer\":default:return e instanceof ArrayBuffer?e:e.buffer}},$2=\"\u001e\",NB=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((s,o)=>{sw(s,!1,a=>{r[o]=a,++i===n&&t(r.join($2))})})},PB=(e,t)=>{const n=e.split($2),r=[];for(let i=0;i<n.length;i++){const s=ow(n[i],t);if(r.push(s),s.type===\"error\")break}return r};function OB(){return new TransformStream({transform(e,t){CB(e,n=>{const r=n.length;let i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);const s=new DataView(i.buffer);s.setUint8(0,126),s.setUint16(1,r)}else{i=new Uint8Array(9);const s=new DataView(i.buffer);s.setUint8(0,127),s.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!=\"string\"&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}let _m;function Hc(e){return e.reduce((t,n)=>t+n.length,0)}function Wc(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let i=0;i<t;i++)n[i]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function LB(e,t){_m||(_m=new TextDecoder);const n=[];let r=0,i=-1,s=!1;return new TransformStream({transform(o,a){for(n.push(o);;){if(r===0){if(Hc(n)<1)break;const l=Wc(n,1);s=(l[0]&128)===128,i=l[0]&127,i<126?r=3:i===126?r=1:r=2}else if(r===1){if(Hc(n)<2)break;const l=Wc(n,2);i=new DataView(l.buffer,l.byteOffset,l.length).getUint16(0),r=3}else if(r===2){if(Hc(n)<8)break;const l=Wc(n,8),u=new DataView(l.buffer,l.byteOffset,l.length),f=u.getUint32(0);if(f>Math.pow(2,21)-1){a.enqueue(Fy);break}i=f*Math.pow(2,32)+u.getUint32(4),r=3}else{if(Hc(n)<i)break;const l=Wc(n,i);a.enqueue(ow(s?l:_m.decode(l),t)),r=0}if(i===0||i>e){a.enqueue(Fy);break}}}})}const B2=4;function st(e){if(e)return RB(e)}function RB(e){for(var t in st.prototype)e[t]=st.prototype[t];return e}st.prototype.on=st.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks[\"$\"+e]=this._callbacks[\"$\"+e]||[]).push(t),this};st.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};st.prototype.off=st.prototype.removeListener=st.prototype.removeAllListeners=st.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks[\"$\"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks[\"$\"+e],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return n.length===0&&delete this._callbacks[\"$\"+e],this};st.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks[\"$\"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this};st.prototype.emitReserved=st.prototype.emit;st.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks[\"$\"+e]||[]};st.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Hh=typeof Promise==\"function\"&&typeof Promise.resolve==\"function\"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),Ln=typeof self<\"u\"?self:typeof window<\"u\"?window:Function(\"return this\")(),IB=\"arraybuffer\";function V2(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const DB=Ln.setTimeout,MB=Ln.clearTimeout;function Wh(e,t){t.useNativeTimers?(e.setTimeoutFn=DB.bind(Ln),e.clearTimeoutFn=MB.bind(Ln)):(e.setTimeoutFn=Ln.setTimeout.bind(Ln),e.clearTimeoutFn=Ln.clearTimeout.bind(Ln))}const jB=1.33;function FB(e){return typeof e==\"string\"?$B(e):Math.ceil((e.byteLength||e.size)*jB)}function $B(e){let t=0,n=0;for(let r=0,i=e.length;r<i;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function z2(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function BB(e){let t=\"\";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+=\"&\"),t+=encodeURIComponent(n)+\"=\"+encodeURIComponent(e[n]));return t}function VB(e){let t={},n=e.split(\"&\");for(let r=0,i=n.length;r<i;r++){let s=n[r].split(\"=\");t[decodeURIComponent(s[0])]=decodeURIComponent(s[1])}return t}class zB extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type=\"TransportError\"}}class aw extends st{constructor(t){super(),this.writable=!1,Wh(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,r){return super.emitReserved(\"error\",new zB(t,n,r)),this}open(){return this.readyState=\"opening\",this.doOpen(),this}close(){return(this.readyState===\"opening\"||this.readyState===\"open\")&&(this.doClose(),this.onClose()),this}send(t){this.readyState===\"open\"&&this.write(t)}onOpen(){this.readyState=\"open\",this.writable=!0,super.emitReserved(\"open\")}onData(t){const n=ow(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved(\"packet\",t)}onClose(t){this.readyState=\"closed\",super.emitReserved(\"close\",t)}pause(t){}createUri(t,n={}){return t+\"://\"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(\":\")===-1?t:\"[\"+t+\"]\"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?\":\"+this.opts.port:\"\"}_query(t){const n=BB(t);return n.length?\"?\"+n:\"\"}}class UB extends aw{constructor(){super(...arguments),this._polling=!1}get name(){return\"polling\"}doOpen(){this._poll()}pause(t){this.readyState=\"pausing\";const n=()=>{this.readyState=\"paused\",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once(\"pollComplete\",function(){--r||n()})),this.writable||(r++,this.once(\"drain\",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved(\"poll\")}onData(t){const n=r=>{if(this.readyState===\"opening\"&&r.type===\"open\"&&this.onOpen(),r.type===\"close\")return this.onClose({description:\"transport closed by the server\"}),!1;this.onPacket(r)};PB(t,this.socket.binaryType).forEach(n),this.readyState!==\"closed\"&&(this._polling=!1,this.emitReserved(\"pollComplete\"),this.readyState===\"open\"&&this._poll())}doClose(){const t=()=>{this.write([{type:\"close\"}])};this.readyState===\"open\"?t():this.once(\"open\",t)}write(t){this.writable=!1,NB(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved(\"drain\")})})}uri(){const t=this.opts.secure?\"https\":\"http\",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=z2()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let U2=!1;try{U2=typeof XMLHttpRequest<\"u\"&&\"withCredentials\"in new XMLHttpRequest}catch{}const HB=U2;function WB(){}class KB extends UB{constructor(t){if(super(t),typeof location<\"u\"){const n=location.protocol===\"https:\";let r=location.port;r||(r=n?\"443\":\"80\"),this.xd=typeof location<\"u\"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:\"POST\",data:t});r.on(\"success\",n),r.on(\"error\",(i,s)=>{this.onError(\"xhr post error\",i,s)})}doPoll(){const t=this.request();t.on(\"data\",this.onData.bind(this)),t.on(\"error\",(n,r)=>{this.onError(\"xhr poll error\",n,r)}),this.pollXhr=t}}class kr extends st{constructor(t,n,r){super(),this.createRequest=t,Wh(this,r),this._opts=r,this._method=r.method||\"GET\",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=V2(this._opts,\"agent\",\"pfx\",\"key\",\"passphrase\",\"cert\",\"ca\",\"ciphers\",\"rejectUnauthorized\",\"autoUnref\");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let i in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(i)&&r.setRequestHeader(i,this._opts.extraHeaders[i])}}catch{}if(this._method===\"POST\")try{r.setRequestHeader(\"Content-type\",\"text/plain;charset=UTF-8\")}catch{}try{r.setRequestHeader(\"Accept\",\"*/*\")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),\"withCredentials\"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var i;r.readyState===3&&((i=this._opts.cookieJar)===null||i===void 0||i.parseCookies(r.getResponseHeader(\"set-cookie\"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status==\"number\"?r.status:0)},0))},r.send(this._data)}catch(i){this.setTimeoutFn(()=>{this._onError(i)},0);return}typeof document<\"u\"&&(this._index=kr.requestsCount++,kr.requests[this._index]=this)}_onError(t){this.emitReserved(\"error\",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>\"u\"||this._xhr===null)){if(this._xhr.onreadystatechange=WB,t)try{this._xhr.abort()}catch{}typeof document<\"u\"&&delete kr.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved(\"data\",t),this.emitReserved(\"success\"),this._cleanup())}abort(){this._cleanup()}}kr.requestsCount=0;kr.requests={};if(typeof document<\"u\"){if(typeof attachEvent==\"function\")attachEvent(\"onunload\",uS);else if(typeof addEventListener==\"function\"){const e=\"onpagehide\"in Ln?\"pagehide\":\"unload\";addEventListener(e,uS,!1)}}function uS(){for(let e in kr.requests)kr.requests.hasOwnProperty(e)&&kr.requests[e].abort()}const qB=function(){const e=H2({xdomain:!1});return e&&e.responseType!==null}();class YB extends KB{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=qB&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new kr(H2,this.uri(),t)}}function H2(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<\"u\"&&(!t||HB))return new XMLHttpRequest}catch{}if(!t)try{return new Ln[[\"Active\"].concat(\"Object\").join(\"X\")](\"Microsoft.XMLHTTP\")}catch{}}const W2=typeof navigator<\"u\"&&typeof navigator.product==\"string\"&&navigator.product.toLowerCase()===\"reactnative\";class GB extends aw{get name(){return\"websocket\"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=W2?{}:V2(this.opts,\"agent\",\"perMessageDeflate\",\"pfx\",\"key\",\"passphrase\",\"cert\",\"ca\",\"ciphers\",\"rejectUnauthorized\",\"localAddress\",\"protocolVersion\",\"origin\",\"maxPayload\",\"family\",\"checkServerIdentity\");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(i){return this.emitReserved(\"error\",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:\"websocket connection closed\",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError(\"websocket error\",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;sw(r,this.supportsBinary,s=>{try{this.doWrite(r,s)}catch{}i&&Hh(()=>{this.writable=!0,this.emitReserved(\"drain\")},this.setTimeoutFn)})}}doClose(){typeof this.ws<\"u\"&&(this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?\"wss\":\"ws\",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=z2()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Am=Ln.WebSocket||Ln.MozWebSocket;class XB extends GB{createSocket(t,n,r){return W2?new Am(t,n,r):n?new Am(t,n):new Am(t)}doWrite(t,n){this.ws.send(n)}}class QB extends aw{get name(){return\"webtransport\"}doOpen(){try{this._transport=new WebTransport(this.createUri(\"https\"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved(\"error\",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError(\"webtransport error\",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=LB(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=OB();i.readable.pipeTo(t.writable),this._writer=i.writable.getWriter();const s=()=>{r.read().then(({done:a,value:l})=>{a||(this.onPacket(l),s())}).catch(a=>{})};s();const o={type:\"open\"};this.query.sid&&(o.data=`{\"sid\":\"${this.query.sid}\"}`),this._writer.write(o).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;this._writer.write(r).then(()=>{i&&Hh(()=>{this.writable=!0,this.emitReserved(\"drain\")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const ZB={websocket:XB,webtransport:QB,polling:YB},JB=/^(?:(?![^:@\\/?#]+:[^:@\\/]*@)(http|https|ws|wss):\\/\\/)?((?:(([^:@\\/?#]*)(?::([^:@\\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/,e4=[\"source\",\"protocol\",\"authority\",\"userInfo\",\"user\",\"password\",\"host\",\"port\",\"relative\",\"path\",\"directory\",\"file\",\"query\",\"anchor\"];function $y(e){if(e.length>8e3)throw\"URI too long\";const t=e,n=e.indexOf(\"[\"),r=e.indexOf(\"]\");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,\";\")+e.substring(r,e.length));let i=JB.exec(e||\"\"),s={},o=14;for(;o--;)s[e4[o]]=i[o]||\"\";return n!=-1&&r!=-1&&(s.source=t,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,\":\"),s.authority=s.authority.replace(\"[\",\"\").replace(\"]\",\"\").replace(/;/g,\":\"),s.ipv6uri=!0),s.pathNames=t4(s,s.path),s.queryKey=n4(s,s.query),s}function t4(e,t){const n=/\\/{2,9}/g,r=t.replace(n,\"/\").split(\"/\");return(t.slice(0,1)==\"/\"||t.length===0)&&r.splice(0,1),t.slice(-1)==\"/\"&&r.splice(r.length-1,1),r}function n4(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,s){i&&(n[i]=s)}),n}const By=typeof addEventListener==\"function\"&&typeof removeEventListener==\"function\",Df=[];By&&addEventListener(\"offline\",()=>{Df.forEach(e=>e())},!1);class Ui extends st{constructor(t,n){if(super(),this.binaryType=IB,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t==\"object\"&&(n=t,t=null),t){const r=$y(t);n.hostname=r.host,n.secure=r.protocol===\"https\"||r.protocol===\"wss\",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=$y(n.host).host);Wh(this,n),this.secure=n.secure!=null?n.secure:typeof location<\"u\"&&location.protocol===\"https:\",n.hostname&&!n.port&&(n.port=this.secure?\"443\":\"80\"),this.hostname=n.hostname||(typeof location<\"u\"?location.hostname:\"localhost\"),this.port=n.port||(typeof location<\"u\"&&location.port?location.port:this.secure?\"443\":\"80\"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const i=r.prototype.name;this.transports.push(i),this._transportsByName[i]=r}),this.opts=Object.assign({path:\"/engine.io\",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:\"t\",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\\/$/,\"\")+(this.opts.addTrailingSlash?\"/\":\"\"),typeof this.opts.query==\"string\"&&(this.opts.query=VB(this.opts.query)),By&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener(\"beforeunload\",this._beforeunloadEventListener,!1)),this.hostname!==\"localhost\"&&(this._offlineEventListener=()=>{this._onClose(\"transport close\",{description:\"network connection lost\"})},Df.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=B2,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved(\"error\",\"No transports available\")},0);return}const t=this.opts.rememberUpgrade&&Ui.priorWebsocketSuccess&&this.transports.indexOf(\"websocket\")!==-1?\"websocket\":this.transports[0];this.readyState=\"opening\";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on(\"drain\",this._onDrain.bind(this)).on(\"packet\",this._onPacket.bind(this)).on(\"error\",this._onError.bind(this)).on(\"close\",n=>this._onClose(\"transport close\",n))}onOpen(){this.readyState=\"open\",Ui.priorWebsocketSuccess=this.transport.name===\"websocket\",this.emitReserved(\"open\"),this.flush()}_onPacket(t){if(this.readyState===\"opening\"||this.readyState===\"open\"||this.readyState===\"closing\")switch(this.emitReserved(\"packet\",t),this.emitReserved(\"heartbeat\"),t.type){case\"open\":this.onHandshake(JSON.parse(t.data));break;case\"ping\":this._sendPacket(\"pong\"),this.emitReserved(\"ping\"),this.emitReserved(\"pong\"),this._resetPingTimeout();break;case\"error\":const n=new Error(\"server error\");n.code=t.data,this._onError(n);break;case\"message\":this.emitReserved(\"data\",t.data),this.emitReserved(\"message\",t.data);break}}onHandshake(t){this.emitReserved(\"handshake\",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!==\"closed\"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose(\"ping timeout\")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved(\"drain\"):this.flush()}flush(){if(this.readyState!==\"closed\"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved(\"flush\")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name===\"polling\"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const i=this.writeBuffer[r].data;if(i&&(n+=FB(i)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,Hh(()=>{this._onClose(\"ping timeout\")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket(\"message\",t,n,r),this}send(t,n,r){return this._sendPacket(\"message\",t,n,r),this}_sendPacket(t,n,r,i){if(typeof n==\"function\"&&(i=n,n=void 0),typeof r==\"function\"&&(i=r,r=null),this.readyState===\"closing\"||this.readyState===\"closed\")return;r=r||{},r.compress=r.compress!==!1;const s={type:t,data:n,options:r};this.emitReserved(\"packetCreate\",s),this.writeBuffer.push(s),i&&this.once(\"flush\",i),this.flush()}close(){const t=()=>{this._onClose(\"forced close\"),this.transport.close()},n=()=>{this.off(\"upgrade\",n),this.off(\"upgradeError\",n),t()},r=()=>{this.once(\"upgrade\",n),this.once(\"upgradeError\",n)};return(this.readyState===\"opening\"||this.readyState===\"open\")&&(this.readyState=\"closing\",this.writeBuffer.length?this.once(\"drain\",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(Ui.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState===\"opening\")return this.transports.shift(),this._open();this.emitReserved(\"error\",t),this._onClose(\"transport error\",t)}_onClose(t,n){if(this.readyState===\"opening\"||this.readyState===\"open\"||this.readyState===\"closing\"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners(\"close\"),this.transport.close(),this.transport.removeAllListeners(),By&&(this._beforeunloadEventListener&&removeEventListener(\"beforeunload\",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Df.indexOf(this._offlineEventListener);r!==-1&&Df.splice(r,1)}this.readyState=\"closed\",this.id=null,this.emitReserved(\"close\",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}Ui.protocol=B2;class r4 extends Ui{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState===\"open\"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),r=!1;Ui.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:\"ping\",data:\"probe\"}]),n.once(\"packet\",c=>{if(!r)if(c.type===\"pong\"&&c.data===\"probe\"){if(this.upgrading=!0,this.emitReserved(\"upgrading\",n),!n)return;Ui.priorWebsocketSuccess=n.name===\"websocket\",this.transport.pause(()=>{r||this.readyState!==\"closed\"&&(f(),this.setTransport(n),n.send([{type:\"upgrade\"}]),this.emitReserved(\"upgrade\",n),n=null,this.upgrading=!1,this.flush())})}else{const d=new Error(\"probe error\");d.transport=n.name,this.emitReserved(\"upgradeError\",d)}}))};function s(){r||(r=!0,f(),n.close(),n=null)}const o=c=>{const d=new Error(\"probe error: \"+c);d.transport=n.name,s(),this.emitReserved(\"upgradeError\",d)};function a(){o(\"transport closed\")}function l(){o(\"socket closed\")}function u(c){n&&c.name!==n.name&&s()}const f=()=>{n.removeListener(\"open\",i),n.removeListener(\"error\",o),n.removeListener(\"close\",a),this.off(\"close\",l),this.off(\"upgrading\",u)};n.once(\"open\",i),n.once(\"error\",o),n.once(\"close\",a),this.once(\"close\",l),this.once(\"upgrading\",u),this._upgrades.indexOf(\"webtransport\")!==-1&&t!==\"webtransport\"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}let i4=class extends r4{constructor(t,n={}){const r=typeof t==\"object\"?t:n;(!r.transports||r.transports&&typeof r.transports[0]==\"string\")&&(r.transports=(r.transports||[\"polling\",\"websocket\",\"webtransport\"]).map(i=>ZB[i]).filter(i=>!!i)),super(t,r)}};function s4(e,t=\"\",n){let r=e;n=n||typeof location<\"u\"&&location,e==null&&(e=n.protocol+\"//\"+n.host),typeof e==\"string\"&&(e.charAt(0)===\"/\"&&(e.charAt(1)===\"/\"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\\/\\//.test(e)||(typeof n<\"u\"?e=n.protocol+\"//\"+e:e=\"https://\"+e),r=$y(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port=\"80\":/^(http|ws)s$/.test(r.protocol)&&(r.port=\"443\")),r.path=r.path||\"/\";const s=r.host.indexOf(\":\")!==-1?\"[\"+r.host+\"]\":r.host;return r.id=r.protocol+\"://\"+s+\":\"+r.port+t,r.href=r.protocol+\"://\"+s+(n&&n.port===r.port?\"\":\":\"+r.port),r}const o4=typeof ArrayBuffer==\"function\",a4=e=>typeof ArrayBuffer.isView==\"function\"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,K2=Object.prototype.toString,l4=typeof Blob==\"function\"||typeof Blob<\"u\"&&K2.call(Blob)===\"[object BlobConstructor]\",u4=typeof File==\"function\"||typeof File<\"u\"&&K2.call(File)===\"[object FileConstructor]\";function lw(e){return o4&&(e instanceof ArrayBuffer||a4(e))||l4&&e instanceof Blob||u4&&e instanceof File}function Mf(e,t){if(!e||typeof e!=\"object\")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Mf(e[n]))return!0;return!1}if(lw(e))return!0;if(e.toJSON&&typeof e.toJSON==\"function\"&&arguments.length===1)return Mf(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Mf(e[n]))return!0;return!1}function c4(e){const t=[],n=e.data,r=e;return r.data=Vy(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Vy(e,t){if(!e)return e;if(lw(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=Vy(e[r],t);return n}else if(typeof e==\"object\"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=Vy(e[r],t));return n}return e}function f4(e,t){return e.data=zy(e.data,t),delete e.attachments,e}function zy(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num==\"number\"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error(\"illegal attachments\")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=zy(e[n],t);else if(typeof e==\"object\")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=zy(e[n],t));return e}const d4=[\"connect\",\"connect_error\",\"disconnect\",\"disconnecting\",\"newListener\",\"removeListener\"],h4=5;var Ee;(function(e){e[e.CONNECT=0]=\"CONNECT\",e[e.DISCONNECT=1]=\"DISCONNECT\",e[e.EVENT=2]=\"EVENT\",e[e.ACK=3]=\"ACK\",e[e.CONNECT_ERROR=4]=\"CONNECT_ERROR\",e[e.BINARY_EVENT=5]=\"BINARY_EVENT\",e[e.BINARY_ACK=6]=\"BINARY_ACK\"})(Ee||(Ee={}));class p4{constructor(t){this.replacer=t}encode(t){return(t.type===Ee.EVENT||t.type===Ee.ACK)&&Mf(t)?this.encodeAsBinary({type:t.type===Ee.EVENT?Ee.BINARY_EVENT:Ee.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=\"\"+t.type;return(t.type===Ee.BINARY_EVENT||t.type===Ee.BINARY_ACK)&&(n+=t.attachments+\"-\"),t.nsp&&t.nsp!==\"/\"&&(n+=t.nsp+\",\"),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=c4(t),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}function cS(e){return Object.prototype.toString.call(e)===\"[object Object]\"}class uw extends st{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t==\"string\"){if(this.reconstructor)throw new Error(\"got plaintext data when reconstructing a packet\");n=this.decodeString(t);const r=n.type===Ee.BINARY_EVENT;r||n.type===Ee.BINARY_ACK?(n.type=r?Ee.EVENT:Ee.ACK,this.reconstructor=new m4(n),n.attachments===0&&super.emitReserved(\"decoded\",n)):super.emitReserved(\"decoded\",n)}else if(lw(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved(\"decoded\",n));else throw new Error(\"got binary data when not reconstructing a packet\");else throw new Error(\"Unknown type: \"+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(Ee[r.type]===void 0)throw new Error(\"unknown packet type \"+r.type);if(r.type===Ee.BINARY_EVENT||r.type===Ee.BINARY_ACK){const s=n+1;for(;t.charAt(++n)!==\"-\"&&n!=t.length;);const o=t.substring(s,n);if(o!=Number(o)||t.charAt(n)!==\"-\")throw new Error(\"Illegal attachments\");r.attachments=Number(o)}if(t.charAt(n+1)===\"/\"){const s=n+1;for(;++n&&!(t.charAt(n)===\",\"||n===t.length););r.nsp=t.substring(s,n)}else r.nsp=\"/\";const i=t.charAt(n+1);if(i!==\"\"&&Number(i)==i){const s=n+1;for(;++n;){const o=t.charAt(n);if(o==null||Number(o)!=o){--n;break}if(n===t.length)break}r.id=Number(t.substring(s,n+1))}if(t.charAt(++n)){const s=this.tryParse(t.substr(n));if(uw.isPayloadValid(r.type,s))r.data=s;else throw new Error(\"invalid payload\")}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case Ee.CONNECT:return cS(n);case Ee.DISCONNECT:return n===void 0;case Ee.CONNECT_ERROR:return typeof n==\"string\"||cS(n);case Ee.EVENT:case Ee.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]==\"number\"||typeof n[0]==\"string\"&&d4.indexOf(n[0])===-1);case Ee.ACK:case Ee.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class m4{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=f4(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const g4=Object.freeze(Object.defineProperty({__proto__:null,Decoder:uw,Encoder:p4,get PacketType(){return Ee},protocol:h4},Symbol.toStringTag,{value:\"Module\"}));function Gn(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const y4=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class q2 extends st{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[Gn(t,\"open\",this.onopen.bind(this)),Gn(t,\"packet\",this.onpacket.bind(this)),Gn(t,\"error\",this.onerror.bind(this)),Gn(t,\"close\",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState===\"open\"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift(\"message\"),this.emit.apply(this,t),this}emit(t,...n){var r,i,s;if(y4.hasOwnProperty(t))throw new Error('\"'+t.toString()+'\" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const o={type:Ee.EVENT,data:n};if(o.options={},o.options.compress=this.flags.compress!==!1,typeof n[n.length-1]==\"function\"){const f=this.ids++,c=n.pop();this._registerAckCallback(f,c),o.id=f}const a=(i=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||i===void 0?void 0:i.writable,l=this.connected&&!(!((s=this.io.engine)===null||s===void 0)&&s._hasPingExpired());return this.flags.volatile&&!a||(l?(this.notifyOutgoingListeners(o),this.packet(o)):this.sendBuffer.push(o)),this.flags={},this}_registerAckCallback(t,n){var r;const i=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(i===void 0){this.acks[t]=n;return}const s=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===t&&this.sendBuffer.splice(a,1);n.call(this,new Error(\"operation has timed out\"))},i),o=(...a)=>{this.io.clearTimeoutFn(s),n.apply(this,a)};o.withError=!0,this.acks[t]=o}emitWithAck(t,...n){return new Promise((r,i)=>{const s=(o,a)=>o?i(o):r(a);s.withError=!0,n.push(s),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]==\"function\"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((i,...s)=>r!==this._queue[0]?void 0:(i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...s)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth==\"function\"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:Ee.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved(\"connect_error\",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved(\"disconnect\",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error(\"socket has been disconnected\"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case Ee.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved(\"connect_error\",new Error(\"It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)\"));break;case Ee.EVENT:case Ee.BINARY_EVENT:this.onevent(t);break;case Ee.ACK:case Ee.BINARY_ACK:this.onack(t);break;case Ee.DISCONNECT:this.ondisconnect();break;case Ee.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved(\"connect_error\",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]==\"string\"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:Ee.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n==\"function\"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved(\"connect\"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose(\"io server disconnect\")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Ee.DISCONNECT}),this.destroy(),this.connected&&this.onclose(\"io client disconnect\"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function Ia(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Ia.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0};Ia.prototype.reset=function(){this.attempts=0};Ia.prototype.setMin=function(e){this.ms=e};Ia.prototype.setMax=function(e){this.max=e};Ia.prototype.setJitter=function(e){this.jitter=e};class Uy extends st{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t==\"object\"&&(n=t,t=void 0),n=n||{},n.path=n.path||\"/socket.io\",this.opts=n,Wh(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Ia({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState=\"closed\",this.uri=t;const i=n.parser||g4;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf(\"open\"))return this;this.engine=new i4(this.uri,this.opts);const n=this.engine,r=this;this._readyState=\"opening\",this.skipReconnect=!1;const i=Gn(n,\"open\",function(){r.onopen(),t&&t()}),s=a=>{this.cleanup(),this._readyState=\"closed\",this.emitReserved(\"error\",a),t?t(a):this.maybeReconnectOnOpen()},o=Gn(n,\"error\",s);if(this._timeout!==!1){const a=this._timeout,l=this.setTimeoutFn(()=>{i(),s(new Error(\"timeout\")),n.close()},a);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}return this.subs.push(i),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState=\"open\",this.emitReserved(\"open\");const t=this.engine;this.subs.push(Gn(t,\"ping\",this.onping.bind(this)),Gn(t,\"data\",this.ondata.bind(this)),Gn(t,\"error\",this.onerror.bind(this)),Gn(t,\"close\",this.onclose.bind(this)),Gn(this.decoder,\"decoded\",this.ondecoded.bind(this)))}onping(){this.emitReserved(\"ping\")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose(\"parse error\",n)}}ondecoded(t){Hh(()=>{this.emitReserved(\"packet\",t)},this.setTimeoutFn)}onerror(t){this.emitReserved(\"error\",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new q2(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose(\"forced close\")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState=\"closed\",this.emitReserved(\"close\",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved(\"reconnect_failed\"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved(\"reconnect_attempt\",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved(\"reconnect_error\",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved(\"reconnect\",t)}}const ll={};function jf(e,t){typeof e==\"object\"&&(t=e,e=void 0),t=t||{};const n=s4(e,t.path||\"/socket.io\"),r=n.source,i=n.id,s=n.path,o=ll[i]&&s in ll[i].nsps,a=t.forceNew||t[\"force new connection\"]||t.multiplex===!1||o;let l;return a?l=new Uy(r,t):(ll[i]||(ll[i]=new Uy(r,t)),l=ll[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(jf,{Manager:Uy,Socket:q2,io:jf,connect:jf});var Y2=typeof global==\"object\"&&global&&global.Object===Object&&global,v4=typeof self==\"object\"&&self&&self.Object===Object&&self,Da=Y2||v4||Function(\"return this\")(),Bd=Da.Symbol,G2=Object.prototype,w4=G2.hasOwnProperty,x4=G2.toString,ul=Bd?Bd.toStringTag:void 0;function b4(e){var t=w4.call(e,ul),n=e[ul];try{e[ul]=void 0;var r=!0}catch{}var i=x4.call(e);return r&&(t?e[ul]=n:delete e[ul]),i}var S4=Object.prototype,k4=S4.toString;function E4(e){return k4.call(e)}var C4=\"[object Null]\",T4=\"[object Undefined]\",fS=Bd?Bd.toStringTag:void 0;function Kh(e){return e==null?e===void 0?T4:C4:fS&&fS in Object(e)?b4(e):E4(e)}function sc(e){return e!=null&&typeof e==\"object\"}var Hy=Array.isArray;function no(e){var t=typeof e;return e!=null&&(t==\"object\"||t==\"function\")}function X2(e){return e}var _4=\"[object AsyncFunction]\",A4=\"[object Function]\",N4=\"[object GeneratorFunction]\",P4=\"[object Proxy]\";function cw(e){if(!no(e))return!1;var t=Kh(e);return t==A4||t==N4||t==_4||t==P4}var Nm=Da[\"__core-js_shared__\"],dS=function(){var e=/[^.]+$/.exec(Nm&&Nm.keys&&Nm.keys.IE_PROTO||\"\");return e?\"Symbol(src)_1.\"+e:\"\"}();function O4(e){return!!dS&&dS in e}var L4=Function.prototype,R4=L4.toString;function I4(e){if(e!=null){try{return R4.call(e)}catch{}try{return e+\"\"}catch{}}return\"\"}var D4=/[\\\\^$.*+?()[\\]{}|]/g,M4=/^\\[object .+?Constructor\\]$/,j4=Function.prototype,F4=Object.prototype,$4=j4.toString,B4=F4.hasOwnProperty,V4=RegExp(\"^\"+$4.call(B4).replace(D4,\"\\\\$&\").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,\"$1.*?\")+\"$\");function z4(e){if(!no(e)||O4(e))return!1;var t=cw(e)?V4:M4;return t.test(I4(e))}function U4(e,t){return e==null?void 0:e[t]}function fw(e,t){var n=U4(e,t);return z4(n)?n:void 0}var hS=Object.create,H4=function(){function e(){}return function(t){if(!no(t))return{};if(hS)return hS(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function W4(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function K4(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var q4=800,Y4=16,G4=Date.now;function X4(e){var t=0,n=0;return function(){var r=G4(),i=Y4-(r-n);if(n=r,i>0){if(++t>=q4)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Q4(e){return function(){return e}}var Vd=function(){try{var e=fw(Object,\"defineProperty\");return e({},\"\",{}),e}catch{}}(),Z4=Vd?function(e,t){return Vd(e,\"toString\",{configurable:!0,enumerable:!1,value:Q4(t),writable:!0})}:X2,J4=X4(Z4),eV=9007199254740991,tV=/^(?:0|[1-9]\\d*)$/;function Q2(e,t){var n=typeof e;return t=t??eV,!!t&&(n==\"number\"||n!=\"symbol\"&&tV.test(e))&&e>-1&&e%1==0&&e<t}function dw(e,t,n){t==\"__proto__\"&&Vd?Vd(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function qh(e,t){return e===t||e!==e&&t!==t}var nV=Object.prototype,rV=nV.hasOwnProperty;function iV(e,t,n){var r=e[t];(!(rV.call(e,t)&&qh(r,n))||n===void 0&&!(t in e))&&dw(e,t,n)}function sV(e,t,n,r){var i=!n;n||(n={});for(var s=-1,o=t.length;++s<o;){var a=t[s],l=void 0;l===void 0&&(l=e[a]),i?dw(n,a,l):iV(n,a,l)}return n}var pS=Math.max;function oV(e,t,n){return t=pS(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,s=pS(r.length-t,0),o=Array(s);++i<s;)o[i]=r[t+i];i=-1;for(var a=Array(t+1);++i<t;)a[i]=r[i];return a[t]=n(o),W4(e,this,a)}}function aV(e,t){return J4(oV(e,t,X2),e+\"\")}var lV=9007199254740991;function Z2(e){return typeof e==\"number\"&&e>-1&&e%1==0&&e<=lV}function hw(e){return e!=null&&Z2(e.length)&&!cw(e)}function uV(e,t,n){if(!no(n))return!1;var r=typeof t;return(r==\"number\"?hw(n)&&Q2(t,n.length):r==\"string\"&&t in n)?qh(n[t],e):!1}function cV(e){return aV(function(t,n){var r=-1,i=n.length,s=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(s=e.length>3&&typeof s==\"function\"?(i--,s):void 0,o&&uV(n[0],n[1],o)&&(s=i<3?void 0:s,i=1),t=Object(t);++r<i;){var a=n[r];a&&e(t,a,r,s)}return t})}var fV=Object.prototype;function J2(e){var t=e&&e.constructor,n=typeof t==\"function\"&&t.prototype||fV;return e===n}function dV(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var hV=\"[object Arguments]\";function mS(e){return sc(e)&&Kh(e)==hV}var eN=Object.prototype,pV=eN.hasOwnProperty,mV=eN.propertyIsEnumerable,Wy=mS(function(){return arguments}())?mS:function(e){return sc(e)&&pV.call(e,\"callee\")&&!mV.call(e,\"callee\")};function gV(){return!1}var tN=typeof pn==\"object\"&&pn&&!pn.nodeType&&pn,gS=tN&&typeof mn==\"object\"&&mn&&!mn.nodeType&&mn,yV=gS&&gS.exports===tN,yS=yV?Da.Buffer:void 0,vV=yS?yS.isBuffer:void 0,nN=vV||gV,wV=\"[object Arguments]\",xV=\"[object Array]\",bV=\"[object Boolean]\",SV=\"[object Date]\",kV=\"[object Error]\",EV=\"[object Function]\",CV=\"[object Map]\",TV=\"[object Number]\",_V=\"[object Object]\",AV=\"[object RegExp]\",NV=\"[object Set]\",PV=\"[object String]\",OV=\"[object WeakMap]\",LV=\"[object ArrayBuffer]\",RV=\"[object DataView]\",IV=\"[object Float32Array]\",DV=\"[object Float64Array]\",MV=\"[object Int8Array]\",jV=\"[object Int16Array]\",FV=\"[object Int32Array]\",$V=\"[object Uint8Array]\",BV=\"[object Uint8ClampedArray]\",VV=\"[object Uint16Array]\",zV=\"[object Uint32Array]\",Be={};Be[IV]=Be[DV]=Be[MV]=Be[jV]=Be[FV]=Be[$V]=Be[BV]=Be[VV]=Be[zV]=!0;Be[wV]=Be[xV]=Be[LV]=Be[bV]=Be[RV]=Be[SV]=Be[kV]=Be[EV]=Be[CV]=Be[TV]=Be[_V]=Be[AV]=Be[NV]=Be[PV]=Be[OV]=!1;function UV(e){return sc(e)&&Z2(e.length)&&!!Be[Kh(e)]}function HV(e){return function(t){return e(t)}}var rN=typeof pn==\"object\"&&pn&&!pn.nodeType&&pn,ql=rN&&typeof mn==\"object\"&&mn&&!mn.nodeType&&mn,WV=ql&&ql.exports===rN,Pm=WV&&Y2.process,vS=function(){try{var e=ql&&ql.require&&ql.require(\"util\").types;return e||Pm&&Pm.binding&&Pm.binding(\"util\")}catch{}}(),wS=vS&&vS.isTypedArray,iN=wS?HV(wS):UV;function KV(e,t){var n=Hy(e),r=!n&&Wy(e),i=!n&&!r&&nN(e),s=!n&&!r&&!i&&iN(e),o=n||r||i||s,a=o?dV(e.length,String):[],l=a.length;for(var u in e)o&&(u==\"length\"||i&&(u==\"offset\"||u==\"parent\")||s&&(u==\"buffer\"||u==\"byteLength\"||u==\"byteOffset\")||Q2(u,l))||a.push(u);return a}function qV(e,t){return function(n){return e(t(n))}}function YV(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var GV=Object.prototype,XV=GV.hasOwnProperty;function QV(e){if(!no(e))return YV(e);var t=J2(e),n=[];for(var r in e)r==\"constructor\"&&(t||!XV.call(e,r))||n.push(r);return n}function sN(e){return hw(e)?KV(e):QV(e)}var Tu=fw(Object,\"create\");function ZV(){this.__data__=Tu?Tu(null):{},this.size=0}function JV(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var ez=\"__lodash_hash_undefined__\",tz=Object.prototype,nz=tz.hasOwnProperty;function rz(e){var t=this.__data__;if(Tu){var n=t[e];return n===ez?void 0:n}return nz.call(t,e)?t[e]:void 0}var iz=Object.prototype,sz=iz.hasOwnProperty;function oz(e){var t=this.__data__;return Tu?t[e]!==void 0:sz.call(t,e)}var az=\"__lodash_hash_undefined__\";function lz(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Tu&&t===void 0?az:t,this}function Ws(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ws.prototype.clear=ZV;Ws.prototype.delete=JV;Ws.prototype.get=rz;Ws.prototype.has=oz;Ws.prototype.set=lz;function uz(){this.__data__=[],this.size=0}function Yh(e,t){for(var n=e.length;n--;)if(qh(e[n][0],t))return n;return-1}var cz=Array.prototype,fz=cz.splice;function dz(e){var t=this.__data__,n=Yh(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():fz.call(t,n,1),--this.size,!0}function hz(e){var t=this.__data__,n=Yh(t,e);return n<0?void 0:t[n][1]}function pz(e){return Yh(this.__data__,e)>-1}function mz(e,t){var n=this.__data__,r=Yh(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function di(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}di.prototype.clear=uz;di.prototype.delete=dz;di.prototype.get=hz;di.prototype.has=pz;di.prototype.set=mz;var oN=fw(Da,\"Map\");function gz(){this.size=0,this.__data__={hash:new Ws,map:new(oN||di),string:new Ws}}function yz(e){var t=typeof e;return t==\"string\"||t==\"number\"||t==\"symbol\"||t==\"boolean\"?e!==\"__proto__\":e===null}function Gh(e,t){var n=e.__data__;return yz(t)?n[typeof t==\"string\"?\"string\":\"hash\"]:n.map}function vz(e){var t=Gh(this,e).delete(e);return this.size-=t?1:0,t}function wz(e){return Gh(this,e).get(e)}function xz(e){return Gh(this,e).has(e)}function bz(e,t){var n=Gh(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function Ma(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ma.prototype.clear=gz;Ma.prototype.delete=vz;Ma.prototype.get=wz;Ma.prototype.has=xz;Ma.prototype.set=bz;var aN=qV(Object.getPrototypeOf,Object),Sz=\"[object Object]\",kz=Function.prototype,Ez=Object.prototype,lN=kz.toString,Cz=Ez.hasOwnProperty,Tz=lN.call(Object);function _z(e){if(!sc(e)||Kh(e)!=Sz)return!1;var t=aN(e);if(t===null)return!0;var n=Cz.call(t,\"constructor\")&&t.constructor;return typeof n==\"function\"&&n instanceof n&&lN.call(n)==Tz}function Az(){this.__data__=new di,this.size=0}function Nz(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Pz(e){return this.__data__.get(e)}function Oz(e){return this.__data__.has(e)}var Lz=200;function Rz(e,t){var n=this.__data__;if(n instanceof di){var r=n.__data__;if(!oN||r.length<Lz-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Ma(r)}return n.set(e,t),this.size=n.size,this}function ja(e){var t=this.__data__=new di(e);this.size=t.size}ja.prototype.clear=Az;ja.prototype.delete=Nz;ja.prototype.get=Pz;ja.prototype.has=Oz;ja.prototype.set=Rz;var uN=typeof pn==\"object\"&&pn&&!pn.nodeType&&pn,xS=uN&&typeof mn==\"object\"&&mn&&!mn.nodeType&&mn,Iz=xS&&xS.exports===uN,bS=Iz?Da.Buffer:void 0;bS&&bS.allocUnsafe;function Dz(e,t){return e.slice()}var SS=Da.Uint8Array;function Mz(e){var t=new e.constructor(e.byteLength);return new SS(t).set(new SS(e)),t}function jz(e,t){var n=Mz(e.buffer);return new e.constructor(n,e.byteOffset,e.length)}function Fz(e){return typeof e.constructor==\"function\"&&!J2(e)?H4(aN(e)):{}}function $z(e){return function(t,n,r){for(var i=-1,s=Object(t),o=r(t),a=o.length;a--;){var l=o[++i];if(n(s[l],l,s)===!1)break}return t}}var Bz=$z();function Ky(e,t,n){(n!==void 0&&!qh(e[t],n)||n===void 0&&!(t in e))&&dw(e,t,n)}function Vz(e){return sc(e)&&hw(e)}function qy(e,t){if(!(t===\"constructor\"&&typeof e[t]==\"function\")&&t!=\"__proto__\")return e[t]}function zz(e){return sV(e,sN(e))}function Uz(e,t,n,r,i,s,o){var a=qy(e,n),l=qy(t,n),u=o.get(l);if(u){Ky(e,n,u);return}var f=s?s(a,l,n+\"\",e,t,o):void 0,c=f===void 0;if(c){var d=Hy(l),h=!d&&nN(l),p=!d&&!h&&iN(l);f=l,d||h||p?Hy(a)?f=a:Vz(a)?f=K4(a):h?(c=!1,f=Dz(l)):p?(c=!1,f=jz(l)):f=[]:_z(l)||Wy(l)?(f=a,Wy(a)?f=zz(a):(!no(a)||cw(a))&&(f=Fz(l))):c=!1}c&&(o.set(l,f),i(f,l,r,s,o),o.delete(l)),Ky(e,n,f)}function cN(e,t,n,r,i){e!==t&&Bz(t,function(s,o){if(i||(i=new ja),no(s))Uz(e,t,o,n,cN,r,i);else{var a=r?r(qy(e,o),s,o+\"\",e,t,i):void 0;a===void 0&&(a=s),Ky(e,o,a)}},sN)}var Hz=cV(function(e,t,n){cN(e,t,n)});const Fa=jf(\"http://localhost:4200\"),kS={project:\"\",streamEvents:{},projectData:{},nodesKeys:[],nodesKeysDict:{}},ro=wB({name:\"project\",initialState:kS,reducers:{setProject(e,t){e.project=t.payload,console.log(\"store : project : \",e.project),Fa.emit(\"subscribe\",e.project)},resetProject(e){return console.log(\"> debug : store : resetProject()\"),kS},loadProjectState(e,t){e.projectData=t.payload.state,e.nodesKeys=[...new Set([...e.nodesKeys,...Object.keys(e.projectData)])],Object.keys(e.projectData).map(n=>{e.nodesKeysDict[n]=!0})},updateProjectState(e,t){const{key:n,data:r}=t.payload;console.log(\"> debug : store : updateProjectState \",{key:n,data:r}),n&&r&&(e.projectData=Hz(e.projectData,{[n]:r}),e.nodesKeys=[...new Set([...e.nodesKeys,...Object.keys(e.projectData)])],Object.keys(e.projectData).map(i=>{e.nodesKeysDict[i]=!0}))},startStreamEvent(e,t){const{key:n,meta:r}=t.payload;e.streamEvents[n]||(e.streamEvents[n]={is_running:!0,meta:r,data:{key:n,data:\"\"}}),e.nodesKeysDict[n]||(e.nodesKeys=[...new Set([...e.nodesKeys,n])],e.nodesKeysDict[n]=!0),e.streamEvents[n].is_running||(e.streamEvents[n].is_running=!0)},updateStreamEvent(e,t){var i;const{key:n,data:r}=t.payload;(i=e.streamEvents[n])!=null&&i.data&&(e.streamEvents[n].data.data+=r.data)},endStreamEvent(e,t){const{key:n}=t.payload;e.streamEvents[n]&&(e.streamEvents[n].is_running=!1,e.streamEvents[n].data=!1,delete e.streamEvents[n])}}}),$a=dB({reducer:{project:ro.reducer}});Fa.on(\"state$load\",e=>{$a.dispatch(ro.actions.loadProjectState(e))});Fa.on(\"stream$start\",e=>{const{key:t,meta:n}=e;$a.dispatch(ro.actions.startStreamEvent({key:t,meta:n}))});Fa.on(\"stream$data\",e=>{const{key:t}=e;$a.dispatch(ro.actions.updateStreamEvent({key:t,data:e}))});Fa.on(\"stream$end\",e=>{const{key:t}=e;$a.dispatch(ro.actions.endStreamEvent({key:t}))});Fa.on(\"state$update\",e=>{$a.dispatch(ro.actions.updateProjectState(e))});const{setProject:Wz,resetProject:Kz}=ro.actions,qz=\"/assets/cofounder-ts8-tu2p.webp\";function Yz(e){if(typeof Proxy>\"u\")return e;const t=new Map,n=(...r)=>e(...r);return new Proxy(n,{get:(r,i)=>i===\"create\"?e:(t.has(i)||t.set(i,e(i)),t.get(i))})}function _u(e){return e!==null&&typeof e==\"object\"&&typeof e.start==\"function\"}const Yy=e=>Array.isArray(e);function fN(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function Au(e){return typeof e==\"string\"||Array.isArray(e)}function ES(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function pw(e,t,n,r){if(typeof t==\"function\"){const[i,s]=ES(r);t=t(n!==void 0?n:e.custom,i,s)}if(typeof t==\"string\"&&(t=e.variants&&e.variants[t]),typeof t==\"function\"){const[i,s]=ES(r);t=t(n!==void 0?n:e.custom,i,s)}return t}function Xh(e,t,n){const r=e.getProps();return pw(r,t,n!==void 0?n:r.custom,e)}const mw=[\"animate\",\"whileInView\",\"whileFocus\",\"whileHover\",\"whileTap\",\"whileDrag\",\"exit\"],gw=[\"initial\",...mw],oc=[\"transformPerspective\",\"x\",\"y\",\"z\",\"translateX\",\"translateY\",\"translateZ\",\"scale\",\"scaleX\",\"scaleY\",\"rotate\",\"rotateX\",\"rotateY\",\"rotateZ\",\"skew\",\"skewX\",\"skewY\"],ls=new Set(oc),Gr=e=>e*1e3,Xr=e=>e/1e3,Gz={type:\"spring\",stiffness:500,damping:25,restSpeed:10},Xz=e=>({type:\"spring\",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Qz={type:\"keyframes\",duration:.8},Zz={type:\"keyframes\",ease:[.25,.1,.35,1],duration:.3},Jz=(e,{keyframes:t})=>t.length>2?Qz:ls.has(e)?e.startsWith(\"scale\")?Xz(t[1]):Gz:Zz;function e9({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:s,repeatType:o,repeatDelay:a,from:l,elapsed:u,...f}){return!!Object.keys(f).length}function yw(e,t){return e[t]||e.default||e}const t9={skipAnimations:!1,useManualTiming:!1},n9=e=>e!==null;function Qh(e,{repeat:t,repeatType:n=\"loop\"},r){const i=e.filter(n9),s=t&&n!==\"loop\"&&t%2===1?0:i.length-1;return!s||r===void 0?i[s]:r}const Pt=e=>e;function r9(e){let t=new Set,n=new Set,r=!1,i=!1;const s=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function a(u){s.has(u)&&(l.schedule(u),e()),u(o)}const l={schedule:(u,f=!1,c=!1)=>{const h=c&&r?t:n;return f&&s.add(u),h.has(u)||h.add(u),u},cancel:u=>{n.delete(u),s.delete(u)},process:u=>{if(o=u,r){i=!0;return}r=!0,[t,n]=[n,t],n.clear(),t.forEach(a),r=!1,i&&(i=!1,l.process(u))}};return l}const Kc=[\"read\",\"resolveKeyframes\",\"update\",\"preRender\",\"render\",\"postRender\"],i9=40;function dN(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,o=Kc.reduce((y,v)=>(y[v]=r9(s),y),{}),{read:a,resolveKeyframes:l,update:u,preRender:f,render:c,postRender:d}=o,h=()=>{const y=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(y-i.timestamp,i9),1),i.timestamp=y,i.isProcessing=!0,a.process(i),l.process(i),u.process(i),f.process(i),c.process(i),d.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(h))},p=()=>{n=!0,r=!0,i.isProcessing||e(h)};return{schedule:Kc.reduce((y,v)=>{const g=o[v];return y[v]=(x,S=!1,k=!1)=>(n||p(),g.schedule(x,S,k)),y},{}),cancel:y=>{for(let v=0;v<Kc.length;v++)o[Kc[v]].cancel(y)},state:i,steps:o}}const{schedule:Pe,cancel:si,state:bt,steps:Om}=dN(typeof requestAnimationFrame<\"u\"?requestAnimationFrame:Pt,!0),hN=e=>/^0[^.\\s]+$/u.test(e);function s9(e){return typeof e==\"number\"?e===0:e!==null?e===\"none\"||e===\"0\"||hN(e):!0}let Gy=Pt;const pN=e=>/^-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)$/u.test(e),mN=e=>t=>typeof t==\"string\"&&t.startsWith(e),gN=mN(\"--\"),o9=mN(\"var(--\"),vw=e=>o9(e)?a9.test(e.split(\"/*\")[0].trim()):!1,a9=/var\\(--(?:[\\w-]+\\s*|[\\w-]+\\s*,(?:\\s*[^)(\\s]|\\s*\\((?:[^)(]|\\([^)(]*\\))*\\))+\\s*)\\)$/iu,l9=/^var\\(--(?:([\\w-]+)|([\\w-]+), ?([a-zA-Z\\d ()%#.,-]+))\\)/u;function u9(e){const t=l9.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function yN(e,t,n=1){const[r,i]=u9(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const o=s.trim();return pN(o)?parseFloat(o):o}return vw(i)?yN(i,t,n+1):i}const Gi=(e,t,n)=>n>t?t:n<e?e:n,Ba={test:e=>typeof e==\"number\",parse:parseFloat,transform:e=>e},Yl={...Ba,transform:e=>Gi(0,1,e)},qc={...Ba,default:1},Gl=e=>Math.round(e*1e5)/1e5,ww=/-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)/gu,c9=/(?:#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\))/giu,f9=/^(?:#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\))$/iu;function ac(e){return typeof e==\"string\"}function d9(e){return e==null}const lc=e=>({test:t=>ac(t)&&t.endsWith(e)&&t.split(\" \").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Si=lc(\"deg\"),Er=lc(\"%\"),he=lc(\"px\"),h9=lc(\"vh\"),p9=lc(\"vw\"),CS={...Er,parse:e=>Er.parse(e)/100,transform:e=>Er.transform(e*100)},m9=new Set([\"width\",\"height\",\"top\",\"left\",\"right\",\"bottom\",\"x\",\"y\",\"translateX\",\"translateY\"]),TS=e=>e===Ba||e===he,_S=(e,t)=>parseFloat(e.split(\", \")[t]),AS=(e,t)=>(n,{transform:r})=>{if(r===\"none\"||!r)return 0;const i=r.match(/^matrix3d\\((.+)\\)$/u);if(i)return _S(i[1],t);{const s=r.match(/^matrix\\((.+)\\)$/u);return s?_S(s[1],e):0}},g9=new Set([\"x\",\"y\",\"z\"]),y9=oc.filter(e=>!g9.has(e));function v9(e){const t=[];return y9.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith(\"scale\")?1:0))}),t}const ya={width:({x:e},{paddingLeft:t=\"0\",paddingRight:n=\"0\"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t=\"0\",paddingBottom:n=\"0\"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:AS(4,13),y:AS(5,14)};ya.translateX=ya.x;ya.translateY=ya.y;const vN=e=>t=>t.test(e),w9={test:e=>e===\"auto\",parse:e=>e},wN=[Ba,he,Er,Si,p9,h9,w9],NS=e=>wN.find(vN(e)),Ds=new Set;let Xy=!1,Qy=!1;function xN(){if(Qy){const e=Array.from(Ds).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=v9(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([s,o])=>{var a;(a=r.getValue(s))===null||a===void 0||a.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Qy=!1,Xy=!1,Ds.forEach(e=>e.complete()),Ds.clear()}function bN(){Ds.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Qy=!0)})}function x9(){bN(),xN()}class xw{constructor(t,n,r,i,s,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Ds.add(this),Xy||(Xy=!0,Pe.read(bN),Pe.resolveKeyframes(xN))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;for(let s=0;s<t.length;s++)if(t[s]===null)if(s===0){const o=i==null?void 0:i.get(),a=t[t.length-1];if(o!==void 0)t[0]=o;else if(r&&n){const l=r.readValue(n,a);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=a),i&&o===void 0&&i.set(t[0])}else t[s]=t[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Ds.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Ds.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const bw=(e,t)=>n=>!!(ac(n)&&f9.test(n)&&n.startsWith(e)||t&&!d9(n)&&Object.prototype.hasOwnProperty.call(n,t)),SN=(e,t,n)=>r=>{if(!ac(r))return r;const[i,s,o,a]=r.match(ww);return{[e]:parseFloat(i),[t]:parseFloat(s),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},b9=e=>Gi(0,255,e),Lm={...Ba,transform:e=>Math.round(b9(e))},As={test:bw(\"rgb\",\"red\"),parse:SN(\"red\",\"green\",\"blue\"),transform:({red:e,green:t,blue:n,alpha:r=1})=>\"rgba(\"+Lm.transform(e)+\", \"+Lm.transform(t)+\", \"+Lm.transform(n)+\", \"+Gl(Yl.transform(r))+\")\"};function S9(e){let t=\"\",n=\"\",r=\"\",i=\"\";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Zy={test:bw(\"#\"),parse:S9,transform:As.transform},Io={test:bw(\"hsl\",\"hue\"),parse:SN(\"hue\",\"saturation\",\"lightness\"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>\"hsla(\"+Math.round(e)+\", \"+Er.transform(Gl(t))+\", \"+Er.transform(Gl(n))+\", \"+Gl(Yl.transform(r))+\")\"},Tt={test:e=>As.test(e)||Zy.test(e)||Io.test(e),parse:e=>As.test(e)?As.parse(e):Io.test(e)?Io.parse(e):Zy.parse(e),transform:e=>ac(e)?e:e.hasOwnProperty(\"red\")?As.transform(e):Io.transform(e)};function k9(e){var t,n;return isNaN(e)&&ac(e)&&(((t=e.match(ww))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(c9))===null||n===void 0?void 0:n.length)||0)>0}const kN=\"number\",EN=\"color\",E9=\"var\",C9=\"var(\",PS=\"${}\",T9=/var\\s*\\(\\s*--(?:[\\w-]+\\s*|[\\w-]+\\s*,(?:\\s*[^)(\\s]|\\s*\\((?:[^)(]|\\([^)(]*\\))*\\))+\\s*)\\)|#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\)|-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)/giu;function Nu(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let s=0;const a=t.replace(T9,l=>(Tt.test(l)?(r.color.push(s),i.push(EN),n.push(Tt.parse(l))):l.startsWith(C9)?(r.var.push(s),i.push(E9),n.push(l)):(r.number.push(s),i.push(kN),n.push(parseFloat(l))),++s,PS)).split(PS);return{values:n,split:a,indexes:r,types:i}}function CN(e){return Nu(e).values}function TN(e){const{split:t,types:n}=Nu(e),r=t.length;return i=>{let s=\"\";for(let o=0;o<r;o++)if(s+=t[o],i[o]!==void 0){const a=n[o];a===kN?s+=Gl(i[o]):a===EN?s+=Tt.transform(i[o]):s+=i[o]}return s}}const _9=e=>typeof e==\"number\"?0:e;function A9(e){const t=CN(e);return TN(e)(t.map(_9))}const Xi={test:k9,parse:CN,createTransformer:TN,getAnimatableNone:A9},N9=new Set([\"brightness\",\"contrast\",\"saturate\",\"opacity\"]);function P9(e){const[t,n]=e.slice(0,-1).split(\"(\");if(t===\"drop-shadow\")return e;const[r]=n.match(ww)||[];if(!r)return e;const i=n.replace(r,\"\");let s=N9.has(t)?1:0;return r!==n&&(s*=100),t+\"(\"+s+i+\")\"}const O9=/\\b([a-z-]*)\\(.*?\\)/gu,Jy={...Xi,getAnimatableNone:e=>{const t=e.match(O9);return t?t.map(P9).join(\" \"):e}},OS={...Ba,transform:Math.round},Sw={borderWidth:he,borderTopWidth:he,borderRightWidth:he,borderBottomWidth:he,borderLeftWidth:he,borderRadius:he,radius:he,borderTopLeftRadius:he,borderTopRightRadius:he,borderBottomRightRadius:he,borderBottomLeftRadius:he,width:he,maxWidth:he,height:he,maxHeight:he,size:he,top:he,right:he,bottom:he,left:he,padding:he,paddingTop:he,paddingRight:he,paddingBottom:he,paddingLeft:he,margin:he,marginTop:he,marginRight:he,marginBottom:he,marginLeft:he,rotate:Si,rotateX:Si,rotateY:Si,rotateZ:Si,scale:qc,scaleX:qc,scaleY:qc,scaleZ:qc,skew:Si,skewX:Si,skewY:Si,distance:he,translateX:he,translateY:he,translateZ:he,x:he,y:he,z:he,perspective:he,transformPerspective:he,opacity:Yl,originX:CS,originY:CS,originZ:he,zIndex:OS,backgroundPositionX:he,backgroundPositionY:he,fillOpacity:Yl,strokeOpacity:Yl,numOctaves:OS},L9={...Sw,color:Tt,backgroundColor:Tt,outlineColor:Tt,fill:Tt,stroke:Tt,borderColor:Tt,borderTopColor:Tt,borderRightColor:Tt,borderBottomColor:Tt,borderLeftColor:Tt,filter:Jy,WebkitFilter:Jy},kw=e=>L9[e];function _N(e,t){let n=kw(e);return n!==Jy&&(n=Xi),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const R9=new Set([\"auto\",\"none\",\"0\"]);function I9(e,t,n){let r=0,i;for(;r<e.length&&!i;){const s=e[r];typeof s==\"string\"&&!R9.has(s)&&Nu(s).values.length&&(i=e[r]),r++}if(i&&n)for(const s of t)e[s]=_N(n,i)}class AN extends xw{constructor(t,n,r,i,s){super(t,n,r,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let u=t[l];if(typeof u==\"string\"&&(u=u.trim(),vw(u))){const f=yN(u,n.current);f!==void 0&&(t[l]=f),l===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!m9.has(r)||t.length!==2)return;const[i,s]=t,o=NS(i),a=NS(s);if(o!==a)if(TS(o)&&TS(a))for(let l=0;l<t.length;l++){const u=t[l];typeof u==\"string\"&&(t[l]=parseFloat(u))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)s9(t[i])&&r.push(i);r.length&&I9(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r===\"height\"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ya[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(r,i).jump(i,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:i}=this;if(!n||!n.current)return;const s=n.getValue(r);s&&s.jump(this.measuredOrigin,!1);const o=i.length-1,a=i[o];i[o]=ya[r](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,u])=>{n.getValue(l).set(u)}),this.resolveNoneKeyframes()}}function NN(e){let t;return()=>(t===void 0&&(t=e()),t)}let Ff;function D9(){Ff=void 0}const Cr={now:()=>(Ff===void 0&&Cr.set(bt.isProcessing||t9.useManualTiming?bt.timestamp:performance.now()),Ff),set:e=>{Ff=e,queueMicrotask(D9)}},LS=(e,t)=>t===\"zIndex\"?!1:!!(typeof e==\"number\"||Array.isArray(e)||typeof e==\"string\"&&(Xi.test(e)||e===\"0\")&&!e.startsWith(\"url(\"));function M9(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function j9(e,t,n,r){const i=e[0];if(i===null)return!1;if(t===\"display\"||t===\"visibility\")return!0;const s=e[e.length-1],o=LS(i,t),a=LS(s,t);return!o||!a?!1:M9(e)||n===\"spring\"&&r}const F9=40;class PN{constructor({autoplay:t=!0,delay:n=0,type:r=\"keyframes\",repeat:i=0,repeatDelay:s=0,repeatType:o=\"loop\",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Cr.now(),this.options={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:s,repeatType:o,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>F9?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&x9(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Cr.now(),this.hasAttemptedResolve=!0;const{name:r,type:i,velocity:s,delay:o,onComplete:a,onUpdate:l,isGenerator:u}=this.options;if(!u&&!j9(t,r,i,s))if(o)this.options.duration=0;else{l==null||l(Qh(t,this.options,n)),a==null||a(),this.resolveFinishedPromise();return}const f=this.initPlayback(t,n);f!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...f},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}function ON(e,t){return t?e*(1e3/t):0}const $9=5;function LN(e,t,n){const r=Math.max(t-$9,0);return ON(n-e(r),t-r)}const Rm=.001,B9=.01,V9=10,z9=.05,U9=1;function H9({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,s,o=1-t;o=Gi(z9,U9,o),e=Gi(B9,V9,Xr(e)),o<1?(i=u=>{const f=u*o,c=f*e,d=f-n,h=e0(u,o),p=Math.exp(-c);return Rm-d/h*p},s=u=>{const c=u*o*e,d=c*n+n,h=Math.pow(o,2)*Math.pow(u,2)*e,p=Math.exp(-c),m=e0(Math.pow(u,2),o);return(-i(u)+Rm>0?-1:1)*((d-h)*p)/m}):(i=u=>{const f=Math.exp(-u*e),c=(u-n)*e+1;return-Rm+f*c},s=u=>{const f=Math.exp(-u*e),c=(n-u)*(e*e);return f*c});const a=5/e,l=K9(i,s,a);if(e=Gr(e),isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:o*2*Math.sqrt(r*u),duration:e}}}const W9=12;function K9(e,t,n){let r=n;for(let i=1;i<W9;i++)r=r-e(r)/t(r);return r}function e0(e,t){return e*Math.sqrt(1-t*t)}const q9=[\"duration\",\"bounce\"],Y9=[\"stiffness\",\"damping\",\"mass\"];function RS(e,t){return t.some(n=>e[n]!==void 0)}function G9(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!RS(e,Y9)&&RS(e,q9)){const n=H9(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}function RN({keyframes:e,restDelta:t,restSpeed:n,...r}){const i=e[0],s=e[e.length-1],o={done:!1,value:i},{stiffness:a,damping:l,mass:u,duration:f,velocity:c,isResolvedFromDuration:d}=G9({...r,velocity:-Xr(r.velocity||0)}),h=c||0,p=l/(2*Math.sqrt(a*u)),m=s-i,w=Xr(Math.sqrt(a/u)),y=Math.abs(m)<5;n||(n=y?.01:2),t||(t=y?.005:.5);let v;if(p<1){const g=e0(w,p);v=x=>{const S=Math.exp(-p*w*x);return s-S*((h+p*w*m)/g*Math.sin(g*x)+m*Math.cos(g*x))}}else if(p===1)v=g=>s-Math.exp(-w*g)*(m+(h+w*m)*g);else{const g=w*Math.sqrt(p*p-1);v=x=>{const S=Math.exp(-p*w*x),k=Math.min(g*x,300);return s-S*((h+p*w*m)*Math.sinh(k)+g*m*Math.cosh(k))/g}}return{calculatedDuration:d&&f||null,next:g=>{const x=v(g);if(d)o.done=g>=f;else{let S=0;p<1&&(S=g===0?Gr(h):LN(v,g,x));const k=Math.abs(S)<=n,C=Math.abs(s-x)<=t;o.done=k&&C}return o.value=o.done?s:x,o}}}function IS({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:f}){const c=e[0],d={done:!1,value:c},h=T=>a!==void 0&&T<a||l!==void 0&&T>l,p=T=>a===void 0?l:l===void 0||Math.abs(a-T)<Math.abs(l-T)?a:l;let m=n*t;const w=c+m,y=o===void 0?w:o(w);y!==w&&(m=y-c);const v=T=>-m*Math.exp(-T/r),g=T=>y+v(T),x=T=>{const O=v(T),A=g(T);d.done=Math.abs(O)<=u,d.value=d.done?y:A};let S,k;const C=T=>{h(d.value)&&(S=T,k=RN({keyframes:[d.value,p(d.value)],velocity:LN(g,T,d.value),damping:i,stiffness:s,restDelta:u,restSpeed:f}))};return C(0),{calculatedDuration:null,next:T=>{let O=!1;return!k&&S===void 0&&(O=!0,x(T),C(T)),S!==void 0&&T>=S?k.next(T-S):(!O&&x(T),d)}}}const IN=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,X9=1e-7,Q9=12;function Z9(e,t,n,r,i){let s,o,a=0;do o=t+(n-t)/2,s=IN(o,r,i)-e,s>0?n=o:t=o;while(Math.abs(s)>X9&&++a<Q9);return o}function uc(e,t,n,r){if(e===t&&n===r)return Pt;const i=s=>Z9(s,0,1,e,n);return s=>s===0||s===1?s:IN(i(s),t,r)}const J9=uc(.42,0,1,1),e6=uc(0,0,.58,1),DN=uc(.42,0,.58,1),t6=e=>Array.isArray(e)&&typeof e[0]!=\"number\",MN=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,jN=e=>t=>1-e(1-t),Ew=e=>1-Math.sin(Math.acos(e)),FN=jN(Ew),n6=MN(Ew),$N=uc(.33,1.53,.69,.99),Cw=jN($N),r6=MN(Cw),i6=e=>(e*=2)<1?.5*Cw(e):.5*(2-Math.pow(2,-10*(e-1))),DS={linear:Pt,easeIn:J9,easeInOut:DN,easeOut:e6,circIn:Ew,circInOut:n6,circOut:FN,backIn:Cw,backInOut:r6,backOut:$N,anticipate:i6},MS=e=>{if(Array.isArray(e)){Gy(e.length===4);const[t,n,r,i]=e;return uc(t,n,r,i)}else if(typeof e==\"string\")return Gy(DS[e]!==void 0),DS[e];return e},s6=(e,t)=>n=>t(e(n)),Qr=(...e)=>e.reduce(s6),Pu=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Ke=(e,t,n)=>e+(t-e)*n;function Im(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function o6({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,s=0,o=0;if(!t)i=s=o=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;i=Im(l,a,e+1/3),s=Im(l,a,e),o=Im(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:r}}function zd(e,t){return n=>n>0?t:e}const Dm=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},a6=[Zy,As,Io],l6=e=>a6.find(t=>t.test(e));function jS(e){const t=l6(e);if(!t)return!1;let n=t.parse(e);return t===Io&&(n=o6(n)),n}const FS=(e,t)=>{const n=jS(e),r=jS(t);if(!n||!r)return zd(e,t);const i={...n};return s=>(i.red=Dm(n.red,r.red,s),i.green=Dm(n.green,r.green,s),i.blue=Dm(n.blue,r.blue,s),i.alpha=Ke(n.alpha,r.alpha,s),As.transform(i))},t0=new Set([\"none\",\"hidden\"]);function u6(e,t){return t0.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function c6(e,t){return n=>Ke(e,t,n)}function Tw(e){return typeof e==\"number\"?c6:typeof e==\"string\"?vw(e)?zd:Tt.test(e)?FS:h6:Array.isArray(e)?BN:typeof e==\"object\"?Tt.test(e)?FS:f6:zd}function BN(e,t){const n=[...e],r=n.length,i=e.map((s,o)=>Tw(s)(s,t[o]));return s=>{for(let o=0;o<r;o++)n[o]=i[o](s);return n}}function f6(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Tw(e[i])(e[i],t[i]));return i=>{for(const s in r)n[s]=r[s](i);return n}}function d6(e,t){var n;const r=[],i={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const o=t.types[s],a=e.indexes[o][i[o]],l=(n=e.values[a])!==null&&n!==void 0?n:0;r[s]=l,i[o]++}return r}const h6=(e,t)=>{const n=Xi.createTransformer(t),r=Nu(e),i=Nu(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?t0.has(e)&&!i.values.length||t0.has(t)&&!r.values.length?u6(e,t):Qr(BN(d6(r,i),i.values),n):zd(e,t)};function VN(e,t,n){return typeof e==\"number\"&&typeof t==\"number\"&&typeof n==\"number\"?Ke(e,t,n):Tw(e)(e,t)}function p6(e,t,n){const r=[],i=n||VN,s=e.length-1;for(let o=0;o<s;o++){let a=i(e[o],e[o+1]);if(t){const l=Array.isArray(t)?t[o]||Pt:t;a=Qr(l,a)}r.push(a)}return r}function m6(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const s=e.length;if(Gy(s===t.length),s===1)return()=>t[0];if(s===2&&e[0]===e[1])return()=>t[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const o=p6(t,r,i),a=o.length,l=u=>{let f=0;if(a>1)for(;f<e.length-2&&!(u<e[f+1]);f++);const c=Pu(e[f],e[f+1],u);return o[f](c)};return n?u=>l(Gi(e[0],e[s-1],u)):l}function g6(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Pu(0,t,r);e.push(Ke(n,1,i))}}function y6(e){const t=[0];return g6(t,e.length-1),t}function v6(e,t){return e.map(n=>n*t)}function w6(e,t){return e.map(()=>t||DN).splice(0,e.length-1)}function Ud({duration:e=300,keyframes:t,times:n,ease:r=\"easeInOut\"}){const i=t6(r)?r.map(MS):MS(r),s={done:!1,value:t[0]},o=v6(n&&n.length===t.length?n:y6(t),e),a=m6(o,t,{ease:Array.isArray(i)?i:w6(t,i)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const $S=2e4;function x6(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<$S;)t+=n,r=e.next(t);return t>=$S?1/0:t}const b6=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Pe.update(t,!0),stop:()=>si(t),now:()=>bt.isProcessing?bt.timestamp:Cr.now()}},S6={decay:IS,inertia:IS,tween:Ud,keyframes:Ud,spring:RN},k6=e=>e/100;class _w extends PN{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState=\"running\",this.startTime=null,this.state=\"idle\",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state===\"idle\")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:r,element:i,keyframes:s}=this.options,o=(i==null?void 0:i.KeyframeResolver)||xw,a=(l,u)=>this.onKeyframesResolved(l,u);this.resolver=new o(s,a,n,r,i),this.resolver.scheduleResolve()}initPlayback(t){const{type:n=\"keyframes\",repeat:r=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=this.options,a=S6[n]||Ud;let l,u;a!==Ud&&typeof t[0]!=\"number\"&&(l=Qr(k6,VN(t[0],t[1])),t=[0,100]);const f=a({...this.options,keyframes:t});s===\"mirror\"&&(u=a({...this.options,keyframes:[...t].reverse(),velocity:-o})),f.calculatedDuration===null&&(f.calculatedDuration=x6(f));const{calculatedDuration:c}=f,d=c+i,h=d*(r+1)-i;return{generator:f,mirroredGenerator:u,mapPercentToKeyframes:l,calculatedDuration:c,resolvedDuration:d,totalDuration:h}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState===\"paused\"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:T}=this.options;return{done:!0,value:T[T.length-1]}}const{finalKeyframe:i,generator:s,mirroredGenerator:o,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:u,totalDuration:f,resolvedDuration:c}=r;if(this.startTime===null)return s.next(0);const{delay:d,repeat:h,repeatType:p,repeatDelay:m,onUpdate:w}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-f/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const y=this.currentTime-d*(this.speed>=0?1:-1),v=this.speed>=0?y<0:y>f;this.currentTime=Math.max(y,0),this.state===\"finished\"&&this.holdTime===null&&(this.currentTime=f);let g=this.currentTime,x=s;if(h){const T=Math.min(this.currentTime,f)/c;let O=Math.floor(T),A=T%1;!A&&T>=1&&(A=1),A===1&&O--,O=Math.min(O,h+1),!!(O%2)&&(p===\"reverse\"?(A=1-A,m&&(A-=m/c)):p===\"mirror\"&&(x=o)),g=Gi(0,1,A)*c}const S=v?{done:!1,value:l[0]}:x.next(g);a&&(S.value=a(S.value));let{done:k}=S;!v&&u!==null&&(k=this.speed>=0?this.currentTime>=f:this.currentTime<=0);const C=this.holdTime===null&&(this.state===\"finished\"||this.state===\"running\"&&k);return C&&i!==void 0&&(S.value=Qh(l,this.options,i)),w&&w(S.value),C&&this.finish(),S}get duration(){const{resolved:t}=this;return t?Xr(t.calculatedDuration):0}get time(){return Xr(this.currentTime)}set time(t){t=Gr(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Xr(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState=\"running\";return}if(this.isStopped)return;const{driver:t=b6,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),n&&n();const i=this.driver.now();this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime?this.state===\"finished\"&&(this.startTime=i):this.startTime=r??this.calcStartTime(),this.state===\"finished\"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state=\"running\",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState=\"paused\";return}this.state=\"paused\",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!==\"running\"&&this.play(),this.pendingPlayState=this.state=\"finished\",this.holdTime=null}finish(){this.teardown(),this.state=\"finished\";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state=\"idle\",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const zN=new Set([\"opacity\",\"clipPath\",\"filter\",\"transform\"]),UN=e=>Array.isArray(e)&&typeof e[0]==\"number\";function HN(e){return!!(!e||typeof e==\"string\"&&e in Aw||UN(e)||Array.isArray(e)&&e.every(HN))}const Pl=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Aw={linear:\"linear\",ease:\"ease\",easeIn:\"ease-in\",easeOut:\"ease-out\",easeInOut:\"ease-in-out\",circIn:Pl([0,.65,.55,1]),circOut:Pl([.55,0,1,.45]),backIn:Pl([.31,.01,.66,-.59]),backOut:Pl([.33,1.53,.69,.99])};function E6(e){return WN(e)||Aw.easeOut}function WN(e){if(e)return UN(e)?Pl(e):Array.isArray(e)?e.map(E6):Aw[e]}function C6(e,t,n,{delay:r=0,duration:i=300,repeat:s=0,repeatType:o=\"loop\",ease:a,times:l}={}){const u={[t]:n};l&&(u.offset=l);const f=WN(a);return Array.isArray(f)&&(u.easing=f),e.animate(u,{delay:r,duration:i,easing:Array.isArray(f)?\"linear\":f,fill:\"both\",iterations:s+1,direction:o===\"reverse\"?\"alternate\":\"normal\"})}const T6=NN(()=>Object.hasOwnProperty.call(Element.prototype,\"animate\")),Hd=10,_6=2e4;function A6(e){return e.type===\"spring\"||!HN(e.ease)}function N6(e,t){const n=new _w({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const i=[];let s=0;for(;!r.done&&s<_6;)r=n.sample(s),i.push(r.value),s+=Hd;return{times:void 0,keyframes:i,duration:s-Hd,ease:\"linear\"}}class BS extends PN{constructor(t){super(t);const{name:n,motionValue:r,element:i,keyframes:s}=this.options;this.resolver=new AN(s,(o,a)=>this.onKeyframesResolved(o,a),n,r,i),this.resolver.scheduleResolve()}initPlayback(t,n){var r;let{duration:i=300,times:s,ease:o,type:a,motionValue:l,name:u,startTime:f}=this.options;if(!(!((r=l.owner)===null||r===void 0)&&r.current))return!1;if(A6(this.options)){const{onComplete:d,onUpdate:h,motionValue:p,element:m,...w}=this.options,y=N6(t,w);t=y.keyframes,t.length===1&&(t[1]=t[0]),i=y.duration,s=y.times,o=y.ease,a=\"keyframes\"}const c=C6(l.owner.current,u,t,{...this.options,duration:i,times:s,ease:o});return c.startTime=f??this.calcStartTime(),this.pendingTimeline?(c.timeline=this.pendingTimeline,this.pendingTimeline=void 0):c.onfinish=()=>{const{onComplete:d}=this.options;l.set(Qh(t,this.options,n)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:c,duration:i,times:s,type:a,ease:o,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Xr(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Xr(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=Gr(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return\"idle\";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return Pt;const{animation:r}=n;r.timeline=t,r.onfinish=null}return Pt}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState===\"finished\"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state===\"idle\")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:i,type:s,ease:o,times:a}=t;if(n.playState===\"idle\"||n.playState===\"finished\")return;if(this.time){const{motionValue:u,onUpdate:f,onComplete:c,element:d,...h}=this.options,p=new _w({...h,keyframes:r,duration:i,type:s,ease:o,times:a,isGenerator:!0}),m=Gr(this.time);u.setWithVelocity(p.sample(m-Hd).value,p.sample(m).value,Hd)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:i,repeatType:s,damping:o,type:a}=t;return T6()&&r&&zN.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!i&&s!==\"mirror\"&&o!==0&&a!==\"inertia\"}}function P6(e,t){let n;const r=()=>{const{currentTime:i}=t,o=(i===null?0:i.value)/100;n!==o&&e(o),n=o};return Pe.update(r,!0),()=>si(r)}const O6=NN(()=>window.ScrollTimeline!==void 0);class L6{constructor(t){this.stop=()=>this.runAll(\"stop\"),this.animations=t.filter(Boolean)}then(t,n){return Promise.all(this.animations).then(t).catch(n)}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t){const n=this.animations.map(r=>{if(O6()&&r.attachTimeline)r.attachTimeline(t);else return r.pause(),P6(i=>{r.time=r.duration*i},t)});return()=>{n.forEach((r,i)=>{r&&r(),this.animations[i].stop()})}}get time(){return this.getAll(\"time\")}set time(t){this.setAll(\"time\",t)}get speed(){return this.getAll(\"speed\")}set speed(t){this.setAll(\"speed\",t)}get startTime(){return this.getAll(\"startTime\")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}play(){this.runAll(\"play\")}pause(){this.runAll(\"pause\")}cancel(){this.runAll(\"cancel\")}complete(){this.runAll(\"complete\")}}const Nw=(e,t,n,r={},i,s,o)=>a=>{const l=yw(r,e)||{},u=l.delay||r.delay||0;let{elapsed:f=0}=r;f=f-Gr(u);let c={keyframes:Array.isArray(n)?n:[null,n],ease:\"easeOut\",velocity:t.getVelocity(),...l,delay:-f,onUpdate:h=>{t.set(h),l.onUpdate&&l.onUpdate(h)},onComplete:()=>{a(),l.onComplete&&l.onComplete(),o&&o()},onStop:o,name:e,motionValue:t,element:s?void 0:i};e9(l)||(c={...c,...Jz(e,c)}),c.duration&&(c.duration=Gr(c.duration)),c.repeatDelay&&(c.repeatDelay=Gr(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(c.duration=0,c.delay===0&&(d=!0)),d&&!s&&t.get()!==void 0){const h=Qh(c.keyframes,l);if(h!==void 0)return Pe.update(()=>{c.onUpdate(h),c.onComplete()}),new L6([])}return!s&&BS.supports(c)?new BS(c):new _w(c)},R6=e=>!!(e&&typeof e==\"object\"&&e.mix&&e.toValue),I6=e=>Yy(e)?e[e.length-1]||0:e;function Zh(e,t){e.indexOf(t)===-1&&e.push(t)}function Jh(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Pw{constructor(){this.subscriptions=[]}add(t){return Zh(this.subscriptions,t),()=>Jh(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let s=0;s<i;s++){const o=this.subscriptions[s];o&&o(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const VS=30,D6=e=>!isNaN(parseFloat(e));class KN{constructor(t,n={}){this.version=\"11.5.6\",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const s=Cr.now();this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Cr.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=D6(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on(\"change\",t)}on(t,n){this.events[t]||(this.events[t]=new Pw);const r=this.events[t].add(n);return t===\"change\"?()=>{r(),Pe.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Cr.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>VS)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,VS);return ON(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Ou(e,t){return new KN(e,t)}function M6(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Ou(n))}function j6(e,t){const n=Xh(e,t);let{transitionEnd:r={},transition:i={},...s}=n||{};s={...s,...r};for(const o in s){const a=I6(s[o]);M6(e,o,a)}}const ep=e=>e.replace(/([a-z])([A-Z])/gu,\"$1-$2\").toLowerCase(),F6=\"framerAppearId\",qN=\"data-\"+ep(F6);function YN(e){return e.props[qN]}function GN(e){if(ls.has(e))return\"transform\";if(zN.has(e))return ep(e)}class $6 extends KN{constructor(){super(...arguments),this.output=[],this.counts=new Map}add(t){const n=GN(t);if(!n)return;const r=this.counts.get(n)||0;this.counts.set(n,r+1),r===0&&(this.output.push(n),this.update());let i=!1;return()=>{if(i)return;i=!0;const s=this.counts.get(n)-1;this.counts.set(n,s),s===0&&(Jh(this.output,n),this.update())}}update(){this.set(this.output.length?this.output.join(\", \"):\"auto\")}}const At=e=>!!(e&&e.getVelocity);function B6(e){return!!(At(e)&&e.add)}function n0(e,t){var n;if(!e.applyWillChange)return;let r=e.getValue(\"willChange\");if(!r&&!(!((n=e.props.style)===null||n===void 0)&&n.willChange)&&(r=new $6(\"auto\"),e.addValue(\"willChange\",r)),B6(r))return r.add(t)}function V6({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function XN(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var s;let{transition:o=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(o=r);const u=[],f=i&&e.animationState&&e.animationState.getState()[i];for(const c in l){const d=e.getValue(c,(s=e.latestValues[c])!==null&&s!==void 0?s:null),h=l[c];if(h===void 0||f&&V6(f,c))continue;const p={delay:n,...yw(o||{},c)};let m=!1;if(window.MotionHandoffAnimation){const y=YN(e);if(y){const v=window.MotionHandoffAnimation(y,c,Pe);v!==null&&(p.startTime=v,m=!0)}}d.start(Nw(c,d,h,e.shouldReduceMotion&&ls.has(c)?{type:!1}:p,e,m,n0(e,c)));const w=d.animation;w&&u.push(w)}return a&&Promise.all(u).then(()=>{Pe.update(()=>{a&&j6(e,a)})}),u}function r0(e,t,n={}){var r;const i=Xh(e,t,n.type===\"exit\"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const o=i?()=>Promise.all(XN(e,i,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:f=0,staggerChildren:c,staggerDirection:d}=s;return z6(e,t,f+u,c,d,n)}:()=>Promise.resolve(),{when:l}=s;if(l){const[u,f]=l===\"beforeChildren\"?[o,a]:[a,o];return u().then(()=>f())}else return Promise.all([o(),a(n.delay)])}function z6(e,t,n=0,r=0,i=1,s){const o=[],a=(e.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>a-u*r;return Array.from(e.variantChildren).sort(U6).forEach((u,f)=>{u.notify(\"AnimationStart\",t),o.push(r0(u,t,{...s,delay:n+l(f)}).then(()=>u.notify(\"AnimationComplete\",t)))}),Promise.all(o)}function U6(e,t){return e.sortNodePosition(t)}function H6(e,t,n={}){e.notify(\"AnimationStart\",t);let r;if(Array.isArray(t)){const i=t.map(s=>r0(e,s,n));r=Promise.all(i)}else if(typeof t==\"string\")r=r0(e,t,n);else{const i=typeof t==\"function\"?Xh(e,t,n.custom):t;r=Promise.all(XN(e,i,n))}return r.then(()=>{e.notify(\"AnimationComplete\",t)})}const W6=gw.length;function QN(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?QN(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<W6;n++){const r=gw[n],i=e.props[r];(Au(i)||i===!1)&&(t[r]=i)}return t}const K6=[...mw].reverse(),q6=mw.length;function Y6(e){return t=>Promise.all(t.map(({animation:n,options:r})=>H6(e,n,r)))}function G6(e){let t=Y6(e),n=zS(),r=!0;const i=l=>(u,f)=>{var c;const d=Xh(e,f,l===\"exit\"?(c=e.presenceContext)===null||c===void 0?void 0:c.custom:void 0);if(d){const{transition:h,transitionEnd:p,...m}=d;u={...u,...m,...p}}return u};function s(l){t=l(e)}function o(l){const{props:u}=e,f=QN(e.parent)||{},c=[],d=new Set;let h={},p=1/0;for(let w=0;w<q6;w++){const y=K6[w],v=n[y],g=u[y]!==void 0?u[y]:f[y],x=Au(g),S=y===l?v.isActive:null;S===!1&&(p=w);let k=g===f[y]&&g!==u[y]&&x;if(k&&r&&e.manuallyAnimateOnMount&&(k=!1),v.protectedKeys={...h},!v.isActive&&S===null||!g&&!v.prevProp||_u(g)||typeof g==\"boolean\")continue;const C=X6(v.prevProp,g);let T=C||y===l&&v.isActive&&!k&&x||w>p&&x,O=!1;const A=Array.isArray(g)?g:[g];let j=A.reduce(i(y),{});S===!1&&(j={});const{prevResolvedValues:L={}}=v,B={...L,...j},N=F=>{T=!0,d.has(F)&&(O=!0,d.delete(F)),v.needsAnimating[F]=!0;const P=e.getValue(F);P&&(P.liveStyle=!1)};for(const F in B){const P=j[F],D=L[F];if(h.hasOwnProperty(F))continue;let _=!1;Yy(P)&&Yy(D)?_=!fN(P,D):_=P!==D,_?P!=null?N(F):d.add(F):P!==void 0&&d.has(F)?N(F):v.protectedKeys[F]=!0}v.prevProp=g,v.prevResolvedValues=j,v.isActive&&(h={...h,...j}),r&&e.blockInitialAnimation&&(T=!1),T&&(!(k&&C)||O)&&c.push(...A.map(F=>({animation:F,options:{type:y}})))}if(d.size){const w={};d.forEach(y=>{const v=e.getBaseTarget(y),g=e.getValue(y);g&&(g.liveStyle=!0),w[y]=v??null}),c.push({animation:w})}let m=!!c.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(c):Promise.resolve()}function a(l,u){var f;if(n[l].isActive===u)return Promise.resolve();(f=e.variantChildren)===null||f===void 0||f.forEach(d=>{var h;return(h=d.animationState)===null||h===void 0?void 0:h.setActive(l,u)}),n[l].isActive=u;const c=o(l);for(const d in n)n[d].protectedKeys={};return c}return{animateChanges:o,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=zS(),r=!0}}}function X6(e,t){return typeof t==\"string\"?t!==e:Array.isArray(t)?!fN(t,e):!1}function hs(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function zS(){return{animate:hs(!0),whileInView:hs(),whileHover:hs(),whileTap:hs(),whileDrag:hs(),whileFocus:hs(),exit:hs()}}class us{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Q6 extends us{constructor(t){super(t),t.animationState||(t.animationState=G6(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();_u(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let Z6=0;class J6 extends us{constructor(){super(...arguments),this.id=Z6++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive(\"exit\",!t);n&&!t&&i.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const e8={animation:{Feature:Q6},exit:{Feature:J6}},ZN=e=>e.pointerType===\"mouse\"?typeof e.button!=\"number\"||e.button<=0:e.isPrimary!==!1;function tp(e,t=\"page\"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}const t8=e=>t=>ZN(t)&&e(t,tp(t));function Hr(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Zr(e,t,n,r){return Hr(e,t,t8(n),r)}const US=(e,t)=>Math.abs(e-t);function n8(e,t){const n=US(e.x,t.x),r=US(e.y,t.y);return Math.sqrt(n**2+r**2)}class JN{constructor(t,n,{transformPagePoint:r,contextWindow:i,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const c=jm(this.lastMoveEventInfo,this.history),d=this.startEvent!==null,h=n8(c.offset,{x:0,y:0})>=3;if(!d&&!h)return;const{point:p}=c,{timestamp:m}=bt;this.history.push({...p,timestamp:m});const{onStart:w,onMove:y}=this.handlers;d||(w&&w(this.lastMoveEvent,c),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,c)},this.handlePointerMove=(c,d)=>{this.lastMoveEvent=c,this.lastMoveEventInfo=Mm(d,this.transformPagePoint),Pe.update(this.updatePoint,!0)},this.handlePointerUp=(c,d)=>{this.end();const{onEnd:h,onSessionEnd:p,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const w=jm(c.type===\"pointercancel\"?this.lastMoveEventInfo:Mm(d,this.transformPagePoint),this.history);this.startEvent&&h&&h(c,w),p&&p(c,w)},!ZN(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const o=tp(t),a=Mm(o,this.transformPagePoint),{point:l}=a,{timestamp:u}=bt;this.history=[{...l,timestamp:u}];const{onSessionStart:f}=n;f&&f(t,jm(a,this.history)),this.removeListeners=Qr(Zr(this.contextWindow,\"pointermove\",this.handlePointerMove),Zr(this.contextWindow,\"pointerup\",this.handlePointerUp),Zr(this.contextWindow,\"pointercancel\",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),si(this.updatePoint)}}function Mm(e,t){return t?{point:t(e.point)}:e}function HS(e,t){return{x:e.x-t.x,y:e.y-t.y}}function jm({point:e},t){return{point:e,delta:HS(e,eP(t)),offset:HS(e,r8(t)),velocity:i8(t,.1)}}function r8(e){return e[0]}function eP(e){return e[e.length-1]}function i8(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=eP(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Gr(t)));)n--;if(!r)return{x:0,y:0};const s=Xr(i.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const o={x:(i.x-r.x)/s,y:(i.y-r.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function tP(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const WS=tP(\"dragHorizontal\"),KS=tP(\"dragVertical\");function nP(e){let t=!1;if(e===\"y\")t=KS();else if(e===\"x\")t=WS();else{const n=WS(),r=KS();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function rP(){const e=nP(!0);return e?(e(),!1):!0}function Do(e){return e&&typeof e==\"object\"&&Object.prototype.hasOwnProperty.call(e,\"current\")}const iP=1e-4,s8=1-iP,o8=1+iP,sP=.01,a8=0-sP,l8=0+sP;function bn(e){return e.max-e.min}function u8(e,t,n){return Math.abs(e-t)<=n}function qS(e,t,n,r=.5){e.origin=r,e.originPoint=Ke(t.min,t.max,e.origin),e.scale=bn(n)/bn(t),e.translate=Ke(n.min,n.max,e.origin)-e.originPoint,(e.scale>=s8&&e.scale<=o8||isNaN(e.scale))&&(e.scale=1),(e.translate>=a8&&e.translate<=l8||isNaN(e.translate))&&(e.translate=0)}function Xl(e,t,n,r){qS(e.x,t.x,n.x,r?r.originX:void 0),qS(e.y,t.y,n.y,r?r.originY:void 0)}function YS(e,t,n){e.min=n.min+t.min,e.max=e.min+bn(t)}function c8(e,t,n){YS(e.x,t.x,n.x),YS(e.y,t.y,n.y)}function GS(e,t,n){e.min=t.min-n.min,e.max=e.min+bn(t)}function Ql(e,t,n){GS(e.x,t.x,n.x),GS(e.y,t.y,n.y)}function f8(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Ke(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Ke(n,e,r.max):Math.min(e,n)),e}function XS(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function d8(e,{top:t,left:n,bottom:r,right:i}){return{x:XS(e.x,n,i),y:XS(e.y,t,r)}}function QS(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function h8(e,t){return{x:QS(e.x,t.x),y:QS(e.y,t.y)}}function p8(e,t){let n=.5;const r=bn(e),i=bn(t);return i>r?n=Pu(t.min,t.max-r,e.min):r>i&&(n=Pu(e.min,e.max-i,t.min)),Gi(0,1,n)}function m8(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const i0=.35;function g8(e=i0){return e===!1?e=0:e===!0&&(e=i0),{x:ZS(e,\"left\",\"right\"),y:ZS(e,\"top\",\"bottom\")}}function ZS(e,t,n){return{min:JS(e,t),max:JS(e,n)}}function JS(e,t){return typeof e==\"number\"?e:e[t]||0}const ek=()=>({translate:0,scale:1,origin:0,originPoint:0}),Mo=()=>({x:ek(),y:ek()}),tk=()=>({min:0,max:0}),et=()=>({x:tk(),y:tk()});function _n(e){return[e(\"x\"),e(\"y\")]}function oP({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function y8({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function v8(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Fm(e){return e===void 0||e===1}function s0({scale:e,scaleX:t,scaleY:n}){return!Fm(e)||!Fm(t)||!Fm(n)}function xs(e){return s0(e)||aP(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function aP(e){return nk(e.x)||nk(e.y)}function nk(e){return e&&e!==\"0%\"}function Wd(e,t,n){const r=e-n,i=t*r;return n+i}function rk(e,t,n,r,i){return i!==void 0&&(e=Wd(e,i,r)),Wd(e,n,r)+t}function o0(e,t=0,n=1,r,i){e.min=rk(e.min,t,n,r,i),e.max=rk(e.max,t,n,r,i)}function lP(e,{x:t,y:n}){o0(e.x,t.translate,t.scale,t.originPoint),o0(e.y,n.translate,n.scale,n.originPoint)}const ik=.999999999999,sk=1.0000000000001;function w8(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let s,o;for(let a=0;a<i;a++){s=n[a],o=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display===\"contents\"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&Fo(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,lP(e,o)),r&&xs(s.latestValues)&&Fo(e,s.latestValues))}t.x<sk&&t.x>ik&&(t.x=1),t.y<sk&&t.y>ik&&(t.y=1)}function jo(e,t){e.min=e.min+t,e.max=e.max+t}function ok(e,t,n,r,i=.5){const s=Ke(e.min,e.max,i);o0(e,t,n,s,r)}function Fo(e,t){ok(e.x,t.x,t.scaleX,t.scale,t.originX),ok(e.y,t.y,t.scaleY,t.scale,t.originY)}function uP(e,t){return oP(v8(e.getBoundingClientRect(),t))}function x8(e,t,n){const r=uP(e,n),{scroll:i}=t;return i&&(jo(r.x,i.offset.x),jo(r.y,i.offset.y)),r}const cP=({current:e})=>e?e.ownerDocument.defaultView:null,b8=new WeakMap;class S8{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=et(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=f=>{const{dragSnapToOrigin:c}=this.getProps();c?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(tp(f,\"page\").point)},s=(f,c)=>{var d;const{drag:h,dragPropagation:p,onDragStart:m}=this.getProps();if(h&&!p&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=nP(h),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),_n(y=>{let v=this.getAxisMotionValue(y).get()||0;if(Er.test(v)){const{projection:g}=this.visualElement;if(g&&g.layout){const x=g.layout.layoutBox[y];x&&(v=bn(x)*(parseFloat(v)/100))}}this.originPoint[y]=v}),m&&Pe.postRender(()=>m(f,c)),(d=this.removeWillChange)===null||d===void 0||d.call(this),this.removeWillChange=n0(this.visualElement,\"transform\");const{animationState:w}=this.visualElement;w&&w.setActive(\"whileDrag\",!0)},o=(f,c)=>{const{dragPropagation:d,dragDirectionLock:h,onDirectionLock:p,onDrag:m}=this.getProps();if(!d&&!this.openGlobalLock)return;const{offset:w}=c;if(h&&this.currentDirection===null){this.currentDirection=k8(w),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis(\"x\",c.point,w),this.updateAxis(\"y\",c.point,w),this.visualElement.render(),m&&m(f,c)},a=(f,c)=>this.stop(f,c),l=()=>_n(f=>{var c;return this.getAnimationState(f)===\"paused\"&&((c=this.getAxisMotionValue(f).animation)===null||c===void 0?void 0:c.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new JN(t,{onSessionStart:i,onStart:s,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:cP(this.visualElement)})}stop(t,n){var r;(r=this.removeWillChange)===null||r===void 0||r.call(this);const i=this.isDragging;if(this.cancel(),!i)return;const{velocity:s}=n;this.startAnimation(s);const{onDragEnd:o}=this.getProps();o&&Pe.postRender(()=>o(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive(\"whileDrag\",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Yc(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=f8(o,this.constraints[t],this.elastic[t])),s.set(o)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,s=this.constraints;n&&Do(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=d8(i.layoutBox,n):this.constraints=!1,this.elastic=g8(r),s!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&_n(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=m8(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Do(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=x8(r,i.root,this.visualElement.getTransformPagePoint());let o=h8(i.layout.layoutBox,s);if(n){const a=n(y8(o));this.hasMutatedConstraints=!!a,a&&(o=oP(a))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=_n(f=>{if(!Yc(f,n,this.currentDirection))return;let c=l&&l[f]||{};o&&(c={min:0,max:0});const d=i?200:1e6,h=i?40:1e7,p={type:\"inertia\",velocity:r?t[f]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...c};return this.startAxisValueAnimation(f,p)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(Nw(t,r,0,n,this.visualElement,!1,n0(this.visualElement,t)))}stopAnimation(){_n(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){_n(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){_n(n=>{const{drag:r}=this.getProps();if(!Yc(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n];s.set(t[n]-Ke(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Do(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};_n(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const l=a.get();i[o]=p8({min:l,max:l},this.constraints[o])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},\"\"):\"none\",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),_n(o=>{if(!Yc(o,t,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(Ke(l,u,i[o]))})}addListeners(){if(!this.visualElement.current)return;b8.set(this.visualElement,this);const t=this.visualElement.current,n=Zr(t,\"pointerdown\",l=>{const{drag:u,dragListener:f=!0}=this.getProps();u&&f&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();Do(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,s=i.addEventListener(\"measure\",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),Pe.read(r);const o=Hr(window,\"resize\",()=>this.scalePositionWithinConstraints()),a=i.addEventListener(\"didUpdate\",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(_n(f=>{const c=this.getAxisMotionValue(f);c&&(this.originPoint[f]+=l[f].translate,c.set(c.get()+l[f].translate))}),this.visualElement.render())});return()=>{o(),n(),s(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=i0,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function Yc(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function k8(e,t=10){let n=null;return Math.abs(e.y)>t?n=\"y\":Math.abs(e.x)>t&&(n=\"x\"),n}class E8 extends us{constructor(t){super(t),this.removeGroupControls=Pt,this.removeListeners=Pt,this.controls=new S8(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Pt}unmount(){this.removeGroupControls(),this.removeListeners()}}const ak=e=>(t,n)=>{e&&Pe.postRender(()=>e(t,n))};class C8 extends us{constructor(){super(...arguments),this.removePointerDownListener=Pt}onPointerDown(t){this.session=new JN(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:cP(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:ak(t),onStart:ak(n),onMove:r,onEnd:(s,o)=>{delete this.session,i&&Pe.postRender(()=>i(s,o))}}}mount(){this.removePointerDownListener=Zr(this.node.current,\"pointerdown\",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Ow=E.createContext(null);function T8(){const e=E.useContext(Ow);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=E.useId();E.useEffect(()=>r(i),[]);const s=E.useCallback(()=>n&&n(i),[i,n]);return!t&&n?[!1,s]:[!0]}const fP=E.createContext({}),dP=E.createContext({}),$f={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function lk(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const cl={correct:(e,t)=>{if(!t.target)return e;if(typeof e==\"string\")if(he.test(e))e=parseFloat(e);else return e;const n=lk(e,t.target.x),r=lk(e,t.target.y);return`${n}% ${r}%`}},_8={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Xi.parse(e);if(i.length>5)return r;const s=Xi.createTransformer(e),o=typeof i[0]!=\"number\"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;i[0+o]/=a,i[1+o]/=l;const u=Ke(a,l,.5);return typeof i[2+o]==\"number\"&&(i[2+o]/=u),typeof i[3+o]==\"number\"&&(i[3+o]/=u),s(i)}},Kd={};function A8(e){Object.assign(Kd,e)}const{schedule:Lw,cancel:Zhe}=dN(queueMicrotask,!1);class N8 extends E.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:s}=t;A8(P8),s&&(n.group&&n.group.add(s),r&&r.register&&i&&r.register(s),s.root.didUpdate(),s.addEventListener(\"animationComplete\",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),$f.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:s}=this.props,o=r.projection;return o&&(o.isPresent=s,i||t.layoutDependency!==n||n===void 0?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||Pe.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Lw.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function hP(e){const[t,n]=T8(),r=E.useContext(fP);return b.jsx(N8,{...e,layoutGroup:r,switchLayoutGroup:E.useContext(dP),isPresent:t,safeToRemove:n})}const P8={borderRadius:{...cl,applyTo:[\"borderTopLeftRadius\",\"borderTopRightRadius\",\"borderBottomLeftRadius\",\"borderBottomRightRadius\"]},borderTopLeftRadius:cl,borderTopRightRadius:cl,borderBottomLeftRadius:cl,borderBottomRightRadius:cl,boxShadow:_8},pP=[\"TopLeft\",\"TopRight\",\"BottomLeft\",\"BottomRight\"],O8=pP.length,uk=e=>typeof e==\"string\"?parseFloat(e):e,ck=e=>typeof e==\"number\"||he.test(e);function L8(e,t,n,r,i,s){i?(e.opacity=Ke(0,n.opacity!==void 0?n.opacity:1,R8(r)),e.opacityExit=Ke(t.opacity!==void 0?t.opacity:1,0,I8(r))):s&&(e.opacity=Ke(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let o=0;o<O8;o++){const a=`border${pP[o]}Radius`;let l=fk(t,a),u=fk(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||ck(l)===ck(u)?(e[a]=Math.max(Ke(uk(l),uk(u),r),0),(Er.test(u)||Er.test(l))&&(e[a]+=\"%\")):e[a]=u}(t.rotate||n.rotate)&&(e.rotate=Ke(t.rotate||0,n.rotate||0,r))}function fk(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const R8=mP(0,.5,FN),I8=mP(.5,.95,Pt);function mP(e,t,n){return r=>r<e?0:r>t?1:n(Pu(e,t,r))}function dk(e,t){e.min=t.min,e.max=t.max}function Cn(e,t){dk(e.x,t.x),dk(e.y,t.y)}function hk(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function pk(e,t,n,r,i){return e-=t,e=Wd(e,1/n,r),i!==void 0&&(e=Wd(e,1/i,r)),e}function D8(e,t=0,n=1,r=.5,i,s=e,o=e){if(Er.test(t)&&(t=parseFloat(t),t=Ke(o.min,o.max,t/100)-o.min),typeof t!=\"number\")return;let a=Ke(s.min,s.max,r);e===s&&(a-=t),e.min=pk(e.min,t,n,a,i),e.max=pk(e.max,t,n,a,i)}function mk(e,t,[n,r,i],s,o){D8(e,t[n],t[r],t[i],t.scale,s,o)}const M8=[\"x\",\"scaleX\",\"originX\"],j8=[\"y\",\"scaleY\",\"originY\"];function gk(e,t,n,r){mk(e.x,t,M8,n?n.x:void 0,r?r.x:void 0),mk(e.y,t,j8,n?n.y:void 0,r?r.y:void 0)}function yk(e){return e.translate===0&&e.scale===1}function gP(e){return yk(e.x)&&yk(e.y)}function vk(e,t){return e.min===t.min&&e.max===t.max}function F8(e,t){return vk(e.x,t.x)&&vk(e.y,t.y)}function wk(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function yP(e,t){return wk(e.x,t.x)&&wk(e.y,t.y)}function xk(e){return bn(e.x)/bn(e.y)}function bk(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class $8{constructor(){this.members=[]}add(t){Zh(this.members,t),t.scheduleRender()}remove(t){if(Jh(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const s=this.members[i];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function B8(e,t,n){let r=\"\";const i=e.x.translate/t.x,s=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((i||s||o)&&(r=`translate3d(${i}px, ${s}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:f,rotateX:c,rotateY:d,skewX:h,skewY:p}=n;u&&(r=`perspective(${u}px) ${r}`),f&&(r+=`rotate(${f}deg) `),c&&(r+=`rotateX(${c}deg) `),d&&(r+=`rotateY(${d}deg) `),h&&(r+=`skewX(${h}deg) `),p&&(r+=`skewY(${p}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||\"none\"}const V8=(e,t)=>e.depth-t.depth;class z8{constructor(){this.children=[],this.isDirty=!1}add(t){Zh(this.children,t),this.isDirty=!0}remove(t){Jh(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(V8),this.isDirty=!1,this.children.forEach(t)}}function Bf(e){const t=At(e)?e.get():e;return R6(t)?t.toValue():t}function U8(e,t){const n=Cr.now(),r=({timestamp:i})=>{const s=i-n;s>=t&&(si(r),e(s-t))};return Pe.read(r,!0),()=>si(r)}function H8(e){return e instanceof SVGElement&&e.tagName!==\"svg\"}function W8(e,t,n){const r=At(e)?e:Ou(e);return r.start(Nw(\"\",r,t,n)),r.animation}const bs={type:\"projectionFrame\",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Ol=typeof window<\"u\"&&window.MotionDebug!==void 0,$m=[\"\",\"X\",\"Y\",\"Z\"],K8={visibility:\"hidden\"},Sk=1e3;let q8=0;function Bm(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function vP(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=YN(t);if(window.MotionHasOptimisedAnimation(n,\"transform\")){const{layout:i,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,\"transform\",Pe,!(i||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&vP(r)}function wP({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},a=t==null?void 0:t()){this.id=q8++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Ol&&(bs.totalNodes=bs.resolvedTargetDeltas=bs.recalculatedProjection=0),this.nodes.forEach(X8),this.nodes.forEach(tU),this.nodes.forEach(nU),this.nodes.forEach(Q8),Ol&&window.MotionDebug.record(bs)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new z8)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new Pw),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=H8(o),this.instance=o;const{layoutId:l,layout:u,visualElement:f}=this.options;if(f&&!f.current&&f.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(u||l)&&(this.isLayoutDirty=!0),e){let c;const d=()=>this.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,c&&c(),c=U8(d,250),$f.hasAnimatedSinceResize&&($f.hasAnimatedSinceResize=!1,this.nodes.forEach(Ek))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&f&&(l||u)&&this.addEventListener(\"didUpdate\",({delta:c,hasLayoutChanged:d,hasRelativeTargetChanged:h,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||f.getDefaultTransition()||aU,{onLayoutAnimationStart:w,onLayoutAnimationComplete:y}=f.getProps(),v=!this.targetLayout||!yP(this.targetLayout,p)||h,g=!d&&h;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||g||d&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(c,g);const x={...yw(m,\"layout\"),onPlay:w,onComplete:y};(f.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x)}else d||Ek(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,si(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(rU),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&vP(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let f=0;f<this.path.length;f++){const c=this.path[f];c.shouldResetTransform=!0,c.updateScroll(\"snapshot\"),c.options.layoutRoot&&c.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,\"\"):void 0,this.updateSnapshot(),o&&this.notifyListeners(\"willUpdate\")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(kk);return}this.isUpdating||this.nodes.forEach(J8),this.isUpdating=!1,this.nodes.forEach(eU),this.nodes.forEach(Y8),this.nodes.forEach(G8),this.clearAllSnapshots();const a=Cr.now();bt.delta=Gi(0,1e3/60,a-bt.timestamp),bt.timestamp=a,bt.isProcessing=!0,Om.update.process(bt),Om.preRender.process(bt),Om.render.process(bt),bt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Lw.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Z8),this.sharedNodes.forEach(iU)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Pe.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Pe.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=et(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(\"measure\",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify(\"LayoutMeasure\",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o=\"measure\"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!gP(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,\"\"):void 0,f=u!==this.prevTransformTemplateValue;o&&(a||xs(this.latestValues)||f)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),lU(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var o;const{visualElement:a}=this.options;if(!a)return et();const l=a.measureViewportBox();if(!(((o=this.scroll)===null||o===void 0?void 0:o.wasRoot)||this.path.some(uU))){const{scroll:f}=this.root;f&&(jo(l.x,f.offset.x),jo(l.y,f.offset.y))}return l}removeElementScroll(o){var a;const l=et();if(Cn(l,o),!((a=this.scroll)===null||a===void 0)&&a.wasRoot)return l;for(let u=0;u<this.path.length;u++){const f=this.path[u],{scroll:c,options:d}=f;f!==this.root&&c&&d.layoutScroll&&(c.wasRoot&&Cn(l,o),jo(l.x,c.offset.x),jo(l.y,c.offset.y))}return l}applyTransform(o,a=!1){const l=et();Cn(l,o);for(let u=0;u<this.path.length;u++){const f=this.path[u];!a&&f.options.layoutScroll&&f.scroll&&f!==f.root&&Fo(l,{x:-f.scroll.offset.x,y:-f.scroll.offset.y}),xs(f.latestValues)&&Fo(l,f.latestValues)}return xs(this.latestValues)&&Fo(l,this.latestValues),l}removeTransform(o){const a=et();Cn(a,o);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!xs(u.latestValues))continue;s0(u.latestValues)&&u.updateSnapshot();const f=et(),c=u.measurePageBox();Cn(f,c),gk(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,f)}return xs(this.latestValues)&&gk(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==bt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==l;if(!(o||u&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:c,layoutId:d}=this.options;if(!(!this.layout||!(c||d))){if(this.resolvedRelativeTargetAt=bt.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=et(),this.relativeTargetOrigin=et(),Ql(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),Cn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=et(),this.targetWithTransforms=et()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),c8(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Cn(this.target,this.layout.layoutBox),lP(this.target,this.targetDelta)):Cn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=et(),this.relativeTargetOrigin=et(),Ql(this.relativeTargetOrigin,this.target,h.target),Cn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Ol&&bs.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||s0(this.parent.latestValues)||aP(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var o;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let u=!0;if((this.isProjectionDirty||!((o=this.parent)===null||o===void 0)&&o.isProjectionDirty)&&(u=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===bt.timestamp&&(u=!1),u)return;const{layout:f,layoutId:c}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(f||c))return;Cn(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,h=this.treeScale.y;w8(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=et());const{target:p}=a;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(hk(this.prevProjectionDelta.x,this.projectionDelta.x),hk(this.prevProjectionDelta.y,this.projectionDelta.y)),Xl(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==h||!bk(this.projectionDelta.x,this.prevProjectionDelta.x)||!bk(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(\"projectionUpdate\",p)),Ol&&bs.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var a;if((a=this.options.visualElement)===null||a===void 0||a.scheduleRender(),o){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Mo(),this.projectionDelta=Mo(),this.projectionDeltaWithTransform=Mo()}setAnimationOrigin(o,a=!1){const l=this.snapshot,u=l?l.latestValues:{},f={...this.latestValues},c=Mo();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const d=et(),h=l?l.source:void 0,p=this.layout?this.layout.source:void 0,m=h!==p,w=this.getStack(),y=!w||w.members.length<=1,v=!!(m&&!y&&this.options.crossfade===!0&&!this.path.some(oU));this.animationProgress=0;let g;this.mixTargetDelta=x=>{const S=x/1e3;Ck(c.x,o.x,S),Ck(c.y,o.y,S),this.setTargetDelta(c),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ql(d,this.layout.layoutBox,this.relativeParent.layout.layoutBox),sU(this.relativeTarget,this.relativeTargetOrigin,d,S),g&&F8(this.relativeTarget,g)&&(this.isProjectionDirty=!1),g||(g=et()),Cn(g,this.relativeTarget)),m&&(this.animationValues=f,L8(f,u,this.latestValues,S,v,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners(\"animationStart\"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(si(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Pe.update(()=>{$f.hasAnimatedSinceResize=!0,this.currentAnimation=W8(0,Sk,{...o,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(\"animationComplete\")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Sk),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:f}=o;if(!(!a||!l||!u)){if(this!==o&&this.layout&&u&&xP(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||et();const c=bn(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+c;const d=bn(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+d}Cn(a,l),Fo(a,f),Xl(this.projectionDeltaWithTransform,this.layoutCorrected,a,f)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new $8),this.sharedNodes.get(o).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:a}=this.options;return a?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:a}=this.options;return a?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&Bm(\"z\",o,u,this.animationValues);for(let f=0;f<$m.length;f++)Bm(`rotate${$m[f]}`,o,u,this.animationValues),Bm(`skew${$m[f]}`,o,u,this.animationValues);o.render();for(const f in u)o.setStaticValue(f,u[f]),this.animationValues&&(this.animationValues[f]=u[f]);o.scheduleRender()}getProjectionStyles(o){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return K8;const u={visibility:\"\"},f=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity=\"\",u.pointerEvents=Bf(o==null?void 0:o.pointerEvents)||\"\",u.transform=f?f(this.latestValues,\"\"):\"none\",u;const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){const m={};return this.options.layoutId&&(m.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,m.pointerEvents=Bf(o==null?void 0:o.pointerEvents)||\"\"),this.hasProjected&&!xs(this.latestValues)&&(m.transform=f?f({},\"\"):\"none\",this.hasProjected=!1),m}const d=c.animationValues||c.latestValues;this.applyTransformsToTarget(),u.transform=B8(this.projectionDeltaWithTransform,this.treeScale,d),f&&(u.transform=f(d,u.transform));const{x:h,y:p}=this.projectionDelta;u.transformOrigin=`${h.origin*100}% ${p.origin*100}% 0`,c.animationValues?u.opacity=c===this?(l=(a=d.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:u.opacity=c===this?d.opacity!==void 0?d.opacity:\"\":d.opacityExit!==void 0?d.opacityExit:0;for(const m in Kd){if(d[m]===void 0)continue;const{correct:w,applyTo:y}=Kd[m],v=u.transform===\"none\"?d[m]:w(d[m],c);if(y){const g=y.length;for(let x=0;x<g;x++)u[y[x]]=v}else u[m]=v}return this.options.layoutId&&(u.pointerEvents=c===this?Bf(o==null?void 0:o.pointerEvents)||\"\":\"none\"),u}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(kk),this.root.sharedNodes.clear()}}}function Y8(e){e.updateLayout()}function G8(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners(\"didUpdate\")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:s}=e.options,o=n.source!==e.layout.source;s===\"size\"?_n(c=>{const d=o?n.measuredBox[c]:n.layoutBox[c],h=bn(d);d.min=r[c].min,d.max=d.min+h}):xP(s,n.layoutBox,r)&&_n(c=>{const d=o?n.measuredBox[c]:n.layoutBox[c],h=bn(r[c]);d.max=d.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[c].max=e.relativeTarget[c].min+h)});const a=Mo();Xl(a,r,n.layoutBox);const l=Mo();o?Xl(l,e.applyTransform(i,!0),n.measuredBox):Xl(l,r,n.layoutBox);const u=!gP(a);let f=!1;if(!e.resumeFrom){const c=e.getClosestProjectingParent();if(c&&!c.resumeFrom){const{snapshot:d,layout:h}=c;if(d&&h){const p=et();Ql(p,n.layoutBox,d.layoutBox);const m=et();Ql(m,r,h.layoutBox),yP(p,m)||(f=!0),c.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=p,e.relativeParent=c)}}}e.notifyListeners(\"didUpdate\",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeTargetChanged:f})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function X8(e){Ol&&bs.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Q8(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Z8(e){e.clearSnapshot()}function kk(e){e.clearMeasurements()}function J8(e){e.isLayoutDirty=!1}function eU(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(\"BeforeLayoutMeasure\"),e.resetTransform()}function Ek(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function tU(e){e.resolveTargetDelta()}function nU(e){e.calcProjection()}function rU(e){e.resetSkewAndRotation()}function iU(e){e.removeLeadSnapshot()}function Ck(e,t,n){e.translate=Ke(t.translate,0,n),e.scale=Ke(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Tk(e,t,n,r){e.min=Ke(t.min,n.min,r),e.max=Ke(t.max,n.max,r)}function sU(e,t,n,r){Tk(e.x,t.x,n.x,r),Tk(e.y,t.y,n.y,r)}function oU(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const aU={duration:.45,ease:[.4,0,.1,1]},_k=e=>typeof navigator<\"u\"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Ak=_k(\"applewebkit/\")&&!_k(\"chrome/\")?Math.round:Pt;function Nk(e){e.min=Ak(e.min),e.max=Ak(e.max)}function lU(e){Nk(e.x),Nk(e.y)}function xP(e,t,n){return e===\"position\"||e===\"preserve-aspect\"&&!u8(xk(t),xk(n),.2)}function uU(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const cU=wP({attachResizeListener:(e,t)=>Hr(e,\"resize\",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Vm={current:void 0},bP=wP({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Vm.current){const e=new cU({});e.mount(window),e.setOptions({layoutScroll:!0}),Vm.current=e}return Vm.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:\"none\"},checkIsScrollRoot:e=>window.getComputedStyle(e).position===\"fixed\"}),fU={pan:{Feature:C8},drag:{Feature:E8,ProjectionNode:bP,MeasureLayout:hP}};function Pk(e,t){const n=t?\"pointerenter\":\"pointerleave\",r=t?\"onHoverStart\":\"onHoverEnd\",i=(s,o)=>{if(s.pointerType===\"touch\"||rP())return;const a=e.getProps();e.animationState&&a.whileHover&&e.animationState.setActive(\"whileHover\",t);const l=a[r];l&&Pe.postRender(()=>l(s,o))};return Zr(e.current,n,i,{passive:!e.getProps()[r]})}class dU extends us{mount(){this.unmount=Qr(Pk(this.node,!0),Pk(this.node,!1))}unmount(){}}class hU extends us{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(\":focus-visible\")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive(\"whileFocus\",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive(\"whileFocus\",!1),this.isActive=!1)}mount(){this.unmount=Qr(Hr(this.node.current,\"focus\",()=>this.onFocus()),Hr(this.node.current,\"blur\",()=>this.onBlur()))}unmount(){}}const SP=(e,t)=>t?e===t?!0:SP(e,t.parentElement):!1;function zm(e,t){if(!t)return;const n=new PointerEvent(\"pointer\"+e);t(n,tp(n))}class pU extends us{constructor(){super(...arguments),this.removeStartListeners=Pt,this.removeEndListeners=Pt,this.removeAccessibleListeners=Pt,this.startPointerPress=(t,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),s=Zr(window,\"pointerup\",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:f,globalTapTarget:c}=this.node.getProps(),d=!c&&!SP(this.node.current,a.target)?f:u;d&&Pe.update(()=>d(a,l))},{passive:!(r.onTap||r.onPointerUp)}),o=Zr(window,\"pointercancel\",(a,l)=>this.cancelPress(a,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=Qr(s,o),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=s=>{if(s.key!==\"Enter\"||this.isPressing)return;const o=a=>{a.key!==\"Enter\"||!this.checkPressEnd()||zm(\"up\",(l,u)=>{const{onTap:f}=this.node.getProps();f&&Pe.postRender(()=>f(l,u))})};this.removeEndListeners(),this.removeEndListeners=Hr(this.node.current,\"keyup\",o),zm(\"down\",(a,l)=>{this.startPress(a,l)})},n=Hr(this.node.current,\"keydown\",t),r=()=>{this.isPressing&&zm(\"cancel\",(s,o)=>this.cancelPress(s,o))},i=Hr(this.node.current,\"blur\",r);this.removeAccessibleListeners=Qr(n,i)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive(\"whileTap\",!0),r&&Pe.postRender(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive(\"whileTap\",!1),!rP()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&Pe.postRender(()=>r(t,n))}mount(){const t=this.node.getProps(),n=Zr(t.globalTapTarget?window:this.node.current,\"pointerdown\",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=Hr(this.node.current,\"focus\",this.startAccessiblePress);this.removeStartListeners=Qr(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const a0=new WeakMap,Um=new WeakMap,mU=e=>{const t=a0.get(e.target);t&&t(e)},gU=e=>{e.forEach(mU)};function yU({root:e,...t}){const n=e||document;Um.has(n)||Um.set(n,{});const r=Um.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(gU,{root:e,...t})),r[i]}function vU(e,t,n){const r=yU(t);return a0.set(e,n),r.observe(e),()=>{a0.delete(e),r.unobserve(e)}}const wU={some:0,all:1};class xU extends us{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i=\"some\",once:s}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof i==\"number\"?i:wU[i]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,s&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(\"whileInView\",u);const{onViewportEnter:f,onViewportLeave:c}=this.node.getProps(),d=u?f:c;d&&d(l)};return vU(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>\"u\")return;const{props:t,prevProps:n}=this.node;[\"amount\",\"margin\",\"root\"].some(bU(t,n))&&this.startObserver()}unmount(){}}function bU({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const SU={inView:{Feature:xU},tap:{Feature:pU},focus:{Feature:hU},hover:{Feature:dU}},kU={layout:{ProjectionNode:bP,MeasureLayout:hP}},kP=E.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:\"never\"}),np=E.createContext({}),Rw=typeof window<\"u\",EU=Rw?E.useLayoutEffect:E.useEffect,EP=E.createContext({strict:!1});let Ok=!1;function CU(e,t,n,r,i){var s;const{visualElement:o}=E.useContext(np),a=E.useContext(EP),l=E.useContext(Ow),u=E.useContext(kP).reducedMotion,f=E.useRef();r=r||a.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:o,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:u}));const c=f.current,d=E.useContext(dP);c&&!c.projection&&i&&(c.type===\"html\"||c.type===\"svg\")&&_U(f.current,n,i,d),E.useInsertionEffect(()=>{c&&c.update(n,l)});const h=n[qN],p=E.useRef(!!h&&!window.MotionHandoffIsComplete&&((s=window.MotionHasOptimisedAnimation)===null||s===void 0?void 0:s.call(window,h)));return EU(()=>{c&&(c.updateFeatures(),Lw.render(c.render),p.current&&c.animationState&&c.animationState.animateChanges())}),E.useEffect(()=>{c&&(!p.current&&c.animationState&&c.animationState.animateChanges(),p.current=!1,Ok||(Ok=!0,queueMicrotask(TU)))}),c}function TU(){window.MotionHandoffIsComplete=!0}function _U(e,t,n,r){const{layoutId:i,layout:s,drag:o,dragConstraints:a,layoutScroll:l,layoutRoot:u}=t;e.projection=new n(e.latestValues,t[\"data-framer-portal-id\"]?void 0:CP(e.parent)),e.projection.setOptions({layoutId:i,layout:s,alwaysMeasureLayout:!!o||a&&Do(a),visualElement:e,animationType:typeof s==\"string\"?s:\"both\",initialPromotionConfig:r,layoutScroll:l,layoutRoot:u})}function CP(e){if(e)return e.options.allowProjection!==!1?e.projection:CP(e.parent)}function AU(e,t,n){return E.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n==\"function\"?n(r):Do(n)&&(n.current=r))},[t])}function rp(e){return _u(e.animate)||gw.some(t=>Au(e[t]))}function TP(e){return!!(rp(e)||e.variants)}function NU(e,t){if(rp(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Au(n)?n:void 0,animate:Au(r)?r:void 0}}return e.inherit!==!1?t:{}}function PU(e){const{initial:t,animate:n}=NU(e,E.useContext(np));return E.useMemo(()=>({initial:t,animate:n}),[Lk(t),Lk(n)])}function Lk(e){return Array.isArray(e)?e.join(\" \"):e}const Rk={animation:[\"animate\",\"variants\",\"whileHover\",\"whileTap\",\"exit\",\"whileInView\",\"whileFocus\",\"whileDrag\"],exit:[\"exit\"],drag:[\"drag\",\"dragControls\"],focus:[\"whileFocus\"],hover:[\"whileHover\",\"onHoverStart\",\"onHoverEnd\"],tap:[\"whileTap\",\"onTap\",\"onTapStart\",\"onTapCancel\"],pan:[\"onPan\",\"onPanStart\",\"onPanSessionStart\",\"onPanEnd\"],inView:[\"whileInView\",\"onViewportEnter\",\"onViewportLeave\"],layout:[\"layout\",\"layoutId\"]},va={};for(const e in Rk)va[e]={isEnabled:t=>Rk[e].some(n=>!!t[n])};function OU(e){for(const t in e)va[t]={...va[t],...e[t]}}const LU=Symbol.for(\"motionComponentSymbol\");function RU({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&OU(e);function s(a,l){let u;const f={...E.useContext(kP),...a,layoutId:IU(a)},{isStatic:c}=f,d=PU(a),h=r(a,c);if(!c&&Rw){DU();const p=MU(f);u=p.MeasureLayout,d.visualElement=CU(i,h,f,t,p.ProjectionNode)}return b.jsxs(np.Provider,{value:d,children:[u&&d.visualElement?b.jsx(u,{visualElement:d.visualElement,...f}):null,n(i,a,AU(h,d.visualElement,l),h,c,d.visualElement)]})}const o=E.forwardRef(s);return o[LU]=i,o}function IU({layoutId:e}){const t=E.useContext(fP).id;return t&&e!==void 0?t+\"-\"+e:e}function DU(e,t){E.useContext(EP).strict}function MU(e){const{drag:t,layout:n}=va;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const jU=[\"animate\",\"circle\",\"defs\",\"desc\",\"ellipse\",\"g\",\"image\",\"line\",\"filter\",\"marker\",\"mask\",\"metadata\",\"path\",\"pattern\",\"polygon\",\"polyline\",\"rect\",\"stop\",\"switch\",\"symbol\",\"svg\",\"text\",\"tspan\",\"use\",\"view\"];function Iw(e){return typeof e!=\"string\"||e.includes(\"-\")?!1:!!(jU.indexOf(e)>-1||/[A-Z]/u.test(e))}function _P(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const s in n)e.style.setProperty(s,n[s])}const AP=new Set([\"baseFrequency\",\"diffuseConstant\",\"kernelMatrix\",\"kernelUnitLength\",\"keySplines\",\"keyTimes\",\"limitingConeAngle\",\"markerHeight\",\"markerWidth\",\"numOctaves\",\"targetX\",\"targetY\",\"surfaceScale\",\"specularConstant\",\"specularExponent\",\"stdDeviation\",\"tableValues\",\"viewBox\",\"gradientTransform\",\"pathLength\",\"startOffset\",\"textLength\",\"lengthAdjust\"]);function NP(e,t,n,r){_P(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(AP.has(i)?i:ep(i),t.attrs[i])}function PP(e,{layout:t,layoutId:n}){return ls.has(e)||e.startsWith(\"origin\")||(t||n!==void 0)&&(!!Kd[e]||e===\"opacity\")}function Dw(e,t,n){var r;const{style:i}=e,s={};for(const o in i)(At(i[o])||t.style&&At(t.style[o])||PP(o,e)||((r=n==null?void 0:n.getValue(o))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(s[o]=i[o]);return n&&i&&typeof i.willChange==\"string\"&&(n.applyWillChange=!1),s}function OP(e,t,n){const r=Dw(e,t,n);for(const i in e)if(At(e[i])||At(t[i])){const s=oc.indexOf(i)!==-1?\"attr\"+i.charAt(0).toUpperCase()+i.substring(1):i;r[s]=e[i]}return r}function FU(e){const t=E.useRef(null);return t.current===null&&(t.current=e()),t.current}function $U({applyWillChange:e=!1,scrapeMotionValuesFromProps:t,createRenderState:n,onMount:r},i,s,o,a){const l={latestValues:VU(i,s,o,a?!1:e,t),renderState:n()};return r&&(l.mount=u=>r(i,u,l)),l}const LP=e=>(t,n)=>{const r=E.useContext(np),i=E.useContext(Ow),s=()=>$U(e,t,r,i,n);return n?s():FU(s)};function BU(e,t){const n=GN(t);n&&Zh(e,n)}function Ik(e,t,n){const r=Array.isArray(t)?t:[t];for(let i=0;i<r.length;i++){const s=pw(e,r[i]);if(s){const{transitionEnd:o,transition:a,...l}=s;n(l,o)}}}function VU(e,t,n,r,i){var s;const o={},a=[],l=r&&((s=e.style)===null||s===void 0?void 0:s.willChange)===void 0,u=i(e,{});for(const w in u)o[w]=Bf(u[w]);let{initial:f,animate:c}=e;const d=rp(e),h=TP(e);t&&h&&!d&&e.inherit!==!1&&(f===void 0&&(f=t.initial),c===void 0&&(c=t.animate));let p=n?n.initial===!1:!1;p=p||f===!1;const m=p?c:f;return m&&typeof m!=\"boolean\"&&!_u(m)&&Ik(e,m,(w,y)=>{for(const v in w){let g=w[v];if(Array.isArray(g)){const x=p?g.length-1:0;g=g[x]}g!==null&&(o[v]=g)}for(const v in y)o[v]=y[v]}),l&&(c&&f!==!1&&!_u(c)&&Ik(e,c,w=>{for(const y in w)BU(a,y)}),a.length&&(o.willChange=a.join(\",\"))),o}const Mw=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),RP=()=>({...Mw(),attrs:{}}),IP=(e,t)=>t&&typeof e==\"number\"?t.transform(e):e,zU={x:\"translateX\",y:\"translateY\",z:\"translateZ\",transformPerspective:\"perspective\"},UU=oc.length;function HU(e,t,n){let r=\"\",i=!0;for(let s=0;s<UU;s++){const o=oc[s],a=e[o];if(a===void 0)continue;let l=!0;if(typeof a==\"number\"?l=a===(o.startsWith(\"scale\")?1:0):l=parseFloat(a)===0,!l||n){const u=IP(a,Sw[o]);if(!l){i=!1;const f=zU[o]||o;r+=`${f}(${u}) `}n&&(t[o]=u)}}return r=r.trim(),n?r=n(t,i?\"\":r):i&&(r=\"none\"),r}function jw(e,t,n){const{style:r,vars:i,transformOrigin:s}=e;let o=!1,a=!1;for(const l in t){const u=t[l];if(ls.has(l)){o=!0;continue}else if(gN(l)){i[l]=u;continue}else{const f=IP(u,Sw[l]);l.startsWith(\"origin\")?(a=!0,s[l]=f):r[l]=f}}if(t.transform||(o||n?r.transform=HU(t,e.transform,n):r.transform&&(r.transform=\"none\")),a){const{originX:l=\"50%\",originY:u=\"50%\",originZ:f=0}=s;r.transformOrigin=`${l} ${u} ${f}`}}function Dk(e,t,n){return typeof e==\"string\"?e:he.transform(t+n*e)}function WU(e,t,n){const r=Dk(t,e.x,e.width),i=Dk(n,e.y,e.height);return`${r} ${i}`}const KU={offset:\"stroke-dashoffset\",array:\"stroke-dasharray\"},qU={offset:\"strokeDashoffset\",array:\"strokeDasharray\"};function YU(e,t,n=1,r=0,i=!0){e.pathLength=1;const s=i?KU:qU;e[s.offset]=he.transform(-r);const o=he.transform(t),a=he.transform(n);e[s.array]=`${o} ${a}`}function Fw(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:s,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...u},f,c){if(jw(e,u,c),f){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:h,dimensions:p}=e;d.transform&&(p&&(h.transform=d.transform),delete d.transform),p&&(i!==void 0||s!==void 0||h.transform)&&(h.transformOrigin=WU(p,i!==void 0?i:.5,s!==void 0?s:.5)),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),o!==void 0&&YU(d,o,a,l,!1)}const $w=e=>typeof e==\"string\"&&e.toLowerCase()===\"svg\",GU={useVisualState:LP({scrapeMotionValuesFromProps:OP,createRenderState:RP,onMount:(e,t,{renderState:n,latestValues:r})=>{Pe.read(()=>{try{n.dimensions=typeof t.getBBox==\"function\"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),Pe.render(()=>{Fw(n,r,$w(t.tagName),e.transformTemplate),NP(t,n)})}})},XU={useVisualState:LP({applyWillChange:!0,scrapeMotionValuesFromProps:Dw,createRenderState:Mw})};function DP(e,t,n){for(const r in t)!At(t[r])&&!PP(r,n)&&(e[r]=t[r])}function QU({transformTemplate:e},t){return E.useMemo(()=>{const n=Mw();return jw(n,t,e),Object.assign({},n.vars,n.style)},[t])}function ZU(e,t){const n=e.style||{},r={};return DP(r,n,e),Object.assign(r,QU(e,t)),r}function JU(e,t){const n={},r=ZU(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=\"none\",r.touchAction=e.drag===!0?\"none\":`pan-${e.drag===\"x\"?\"y\":\"x\"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const eH=new Set([\"animate\",\"exit\",\"variants\",\"initial\",\"style\",\"values\",\"variants\",\"transition\",\"transformTemplate\",\"custom\",\"inherit\",\"onBeforeLayoutMeasure\",\"onAnimationStart\",\"onAnimationComplete\",\"onUpdate\",\"onDragStart\",\"onDrag\",\"onDragEnd\",\"onMeasureDragConstraints\",\"onDirectionLock\",\"onDragTransitionEnd\",\"_dragX\",\"_dragY\",\"onHoverStart\",\"onHoverEnd\",\"onViewportEnter\",\"onViewportLeave\",\"globalTapTarget\",\"ignoreStrict\",\"viewport\"]);function qd(e){return e.startsWith(\"while\")||e.startsWith(\"drag\")&&e!==\"draggable\"||e.startsWith(\"layout\")||e.startsWith(\"onTap\")||e.startsWith(\"onPan\")||e.startsWith(\"onLayout\")||eH.has(e)}let MP=e=>!qd(e);function tH(e){e&&(MP=t=>t.startsWith(\"on\")?!qd(t):e(t))}try{tH(require(\"@emotion/is-prop-valid\").default)}catch{}function nH(e,t,n){const r={};for(const i in e)i===\"values\"&&typeof e.values==\"object\"||(MP(i)||n===!0&&qd(i)||!t&&!qd(i)||e.draggable&&i.startsWith(\"onDrag\"))&&(r[i]=e[i]);return r}function rH(e,t,n,r){const i=E.useMemo(()=>{const s=RP();return Fw(s,t,$w(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};DP(s,e.style,e),i.style={...s,...i.style}}return i}function iH(e=!1){return(n,r,i,{latestValues:s},o)=>{const l=(Iw(n)?rH:JU)(r,s,o,n),u=nH(r,typeof n==\"string\",e),f=n!==E.Fragment?{...u,...l,ref:i}:{},{children:c}=r,d=E.useMemo(()=>At(c)?c.get():c,[c]);return E.createElement(n,{...f,children:d})}}function sH(e,t){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={...Iw(r)?GU:XU,preloadedFeatures:e,useRender:iH(i),createVisualElement:t,Component:r};return RU(o)}}const l0={current:null},jP={current:!1};function oH(){if(jP.current=!0,!!Rw)if(window.matchMedia){const e=window.matchMedia(\"(prefers-reduced-motion)\"),t=()=>l0.current=e.matches;e.addListener(t),t()}else l0.current=!1}function aH(e,t,n){for(const r in t){const i=t[r],s=n[r];if(At(i))e.addValue(r,i);else if(At(s))e.addValue(r,Ou(i,{owner:e}));else if(s!==i)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=e.getStaticValue(r);e.addValue(r,Ou(o!==void 0?o:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Mk=new WeakMap,lH=[...wN,Tt,Xi],uH=e=>lH.find(vN(e)),jk=[\"AnimationStart\",\"AnimationComplete\",\"Update\",\"BeforeLayoutMeasure\",\"LayoutMeasure\",\"LayoutAnimationStart\",\"LayoutAnimationComplete\"];class cH{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:s,visualState:o},a={}){this.applyWillChange=!1,this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=xw,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify(\"Update\",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const d=Cr.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,Pe.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=o;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!s,this.isControllingVariants=rp(n),this.isVariantNode=TP(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:f,...c}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in c){const h=c[d];l[d]!==void 0&&At(h)&&h.set(l[d],!1)}}mount(t){this.current=t,Mk.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),jP.current||oH(),this.shouldReduceMotion=this.reducedMotionConfig===\"never\"?!1:this.reducedMotionConfig===\"always\"?!0:l0.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Mk.delete(this.current),this.projection&&this.projection.unmount(),si(this.notifyUpdate),si(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=ls.has(t),i=n.on(\"change\",a=>{this.latestValues[t]=a,this.props.onUpdate&&Pe.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on(\"renderRequest\",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),s(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t=\"animation\";for(t in va){const n=va[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):et()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<jk.length;r++){const i=jk[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const s=\"on\"+i,o=t[s];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=aH(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Ou(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i==\"string\"&&(pN(i)||hN(i))?i=parseFloat(i):!uH(i)&&Xi.test(n)&&(i=_N(t,n)),this.setBaseTarget(t,At(i)?i.get():i)),At(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let i;if(typeof r==\"string\"||typeof r==\"object\"){const o=pw(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);o&&(i=o[t])}if(r&&i!==void 0)return i;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!At(s)?s:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Pw),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class FP extends cH{constructor(){super(...arguments),this.KeyframeResolver=AN}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}}function fH(e){return window.getComputedStyle(e)}class dH extends FP{constructor(){super(...arguments),this.type=\"html\",this.applyWillChange=!0,this.renderInstance=_P}readValueFromInstance(t,n){if(ls.has(n)){const r=kw(n);return r&&r.default||0}else{const r=fH(t),i=(gN(n)?r.getPropertyValue(n):r[n])||0;return typeof i==\"string\"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return uP(t,n)}build(t,n,r){jw(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Dw(t,n,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;At(t)&&(this.childSubscription=t.on(\"change\",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class hH extends FP{constructor(){super(...arguments),this.type=\"svg\",this.isSVGTag=!1,this.measureInstanceViewportBox=et}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(ls.has(n)){const r=kw(n);return r&&r.default||0}return n=AP.has(n)?n:ep(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return OP(t,n,r)}build(t,n,r){Fw(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,i){NP(t,n,r,i)}mount(t){this.isSVGTag=$w(t.tagName),super.mount(t)}}const pH=(e,t)=>Iw(e)?new hH(t):new dH(t,{allowProjection:e!==E.Fragment}),mH=sH({...e8,...SU,...fU,...kU},pH),u0=Yz(mH);function gH({title:e,titleId:t,...n},r){return E.createElement(\"svg\",Object.assign({xmlns:\"http://www.w3.org/2000/svg\",fill:\"none\",viewBox:\"0 0 24 24\",strokeWidth:1.5,stroke:\"currentColor\",\"aria-hidden\":\"true\",\"data-slot\":\"icon\",ref:r,\"aria-labelledby\":t},n),e?E.createElement(\"title\",{id:t},e):null,E.createElement(\"path\",{strokeLinecap:\"round\",strokeLinejoin:\"round\",d:\"m19.5 8.25-7.5 7.5-7.5-7.5\"}))}const yH=E.forwardRef(gH);function vH({title:e,titleId:t,...n},r){return E.createElement(\"svg\",Object.assign({xmlns:\"http://www.w3.org/2000/svg\",fill:\"none\",viewBox:\"0 0 24 24\",strokeWidth:1.5,stroke:\"currentColor\",\"aria-hidden\":\"true\",\"data-slot\":\"icon\",ref:r,\"aria-labelledby\":t},n),e?E.createElement(\"title\",{id:t},e):null,E.createElement(\"path\",{strokeLinecap:\"round\",strokeLinejoin:\"round\",d:\"m8.25 4.5 7.5 7.5-7.5 7.5\"}))}const Fk=E.forwardRef(vH);function wH({title:e,titleId:t,...n},r){return E.createElement(\"svg\",Object.assign({xmlns:\"http://www.w3.org/2000/svg\",fill:\"none\",viewBox:\"0 0 24 24\",strokeWidth:1.5,stroke:\"currentColor\",\"aria-hidden\":\"true\",\"data-slot\":\"icon\",ref:r,\"aria-labelledby\":t},n),e?E.createElement(\"title\",{id:t},e):null,E.createElement(\"path\",{strokeLinecap:\"round\",strokeLinejoin:\"round\",d:\"M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z\"}),E.createElement(\"path\",{strokeLinecap:\"round\",strokeLinejoin:\"round\",d:\"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z\"}))}const xH=E.forwardRef(wH);function bH({title:e,titleId:t,...n},r){return E.createElement(\"svg\",Object.assign({xmlns:\"http://www.w3.org/2000/svg\",fill:\"none\",viewBox:\"0 0 24 24\",strokeWidth:1.5,stroke:\"currentColor\",\"aria-hidden\":\"true\",\"data-slot\":\"icon\",ref:r,\"aria-labelledby\":t},n),e?E.createElement(\"title\",{id:t},e):null,E.createElement(\"path\",{strokeLinecap:\"round\",strokeLinejoin:\"round\",d:\"M2.25 12.75V12A2.25 2.25 0 0 1 4.5 9.75h15A2.25 2.25 0 0 1 21.75 12v.75m-8.69-6.44-2.12-2.12a1.5 1.5 0 0 0-1.061-.44H4.5A2.25 2.25 0 0 0 2.25 6v12a2.25 2.25 0 0 0 2.25 2.25h15A2.25 2.25 0 0 0 21.75 18V9a2.25 2.25 0 0 0-2.25-2.25h-5.379a1.5 1.5 0 0 1-1.06-.44Z\"}))}const SH=E.forwardRef(bH);function kH({title:e,titleId:t,...n},r){return E.createElement(\"svg\",Object.assign({xmlns:\"http://www.w3.org/2000/svg\",fill:\"none\",viewBox:\"0 0 24 24\",strokeWidth:1.5,stroke:\"currentColor\",\"aria-hidden\":\"true\",\"data-slot\":\"icon\",ref:r,\"aria-labelledby\":t},n),e?E.createElement(\"title\",{id:t},e):null,E.createElement(\"path\",{strokeLinecap:\"round\",strokeLinejoin:\"round\",d:\"M5.25 5.653c0-.856.917-1.398 1.667-.986l11.54 6.347a1.125 1.125 0 0 1 0 1.972l-11.54 6.347a1.125 1.125 0 0 1-1.667-.986V5.653Z\"}))}const EH=E.forwardRef(kH);function CH({title:e,titleId:t,...n},r){return E.createElement(\"svg\",Object.assign({xmlns:\"http://www.w3.org/2000/svg\",fill:\"none\",viewBox:\"0 0 24 24\",strokeWidth:1.5,stroke:\"currentColor\",\"aria-hidden\":\"true\",\"data-slot\":\"icon\",ref:r,\"aria-labelledby\":t},n),e?E.createElement(\"title\",{id:t},e):null,E.createElement(\"path\",{strokeLinecap:\"round\",strokeLinejoin:\"round\",d:\"M3.75 6A2.25 2.25 0 0 1 6 3.75h2.25A2.25 2.25 0 0 1 10.5 6v2.25a2.25 2.25 0 0 1-2.25 2.25H6a2.25 2.25 0 0 1-2.25-2.25V6ZM3.75 15.75A2.25 2.25 0 0 1 6 13.5h2.25a2.25 2.25 0 0 1 2.25 2.25V18a2.25 2.25 0 0 1-2.25 2.25H6A2.25 2.25 0 0 1 3.75 18v-2.25ZM13.5 6a2.25 2.25 0 0 1 2.25-2.25H18A2.25 2.25 0 0 1 20.25 6v2.25A2.25 2.25 0 0 1 18 10.5h-2.25a2.25 2.25 0 0 1-2.25-2.25V6ZM13.5 15.75a2.25 2.25 0 0 1 2.25-2.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-2.25A2.25 2.25 0 0 1 13.5 18v-2.25Z\"}))}const TH=E.forwardRef(CH);function Qt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function _H(e,t){typeof e==\"function\"?e(t):e!=null&&(e.current=t)}function $P(...e){return t=>e.forEach(n=>_H(n,t))}function ur(...e){return E.useCallback($P(...e),e)}function AH(e,t){const n=E.createContext(t);function r(s){const{children:o,...a}=s,l=E.useMemo(()=>a,Object.values(a));return b.jsx(n.Provider,{value:l,children:o})}function i(s){const o=E.useContext(n);if(o)return o;if(t!==void 0)return t;throw new Error(`\\`${s}\\` must be used within \\`${e}\\``)}return r.displayName=e+\"Provider\",[r,i]}function Bw(e,t=[]){let n=[];function r(s,o){const a=E.createContext(o),l=n.length;n=[...n,o];function u(c){const{scope:d,children:h,...p}=c,m=(d==null?void 0:d[e][l])||a,w=E.useMemo(()=>p,Object.values(p));return b.jsx(m.Provider,{value:w,children:h})}function f(c,d){const h=(d==null?void 0:d[e][l])||a,p=E.useContext(h);if(p)return p;if(o!==void 0)return o;throw new Error(`\\`${c}\\` must be used within \\`${s}\\``)}return u.displayName=s+\"Provider\",[u,f]}const i=()=>{const s=n.map(o=>E.createContext(o));return function(a){const l=(a==null?void 0:a[e])||s;return E.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return i.scopeName=e,[r,NH(i,...t)]}function NH(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const o=r.reduce((a,{useScope:l,scopeName:u})=>{const c=l(s)[`__scope${u}`];return{...a,...c}},{});return E.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}var cc=E.forwardRef((e,t)=>{const{children:n,...r}=e,i=E.Children.toArray(n),s=i.find(PH);if(s){const o=s.props.children,a=i.map(l=>l===s?E.Children.count(o)>1?E.Children.only(null):E.isValidElement(o)?o.props.children:null:l);return b.jsx(c0,{...r,ref:t,children:E.isValidElement(o)?E.cloneElement(o,void 0,a):null})}return b.jsx(c0,{...r,ref:t,children:n})});cc.displayName=\"Slot\";var c0=E.forwardRef((e,t)=>{const{children:n,...r}=e;if(E.isValidElement(n)){const i=LH(n);return E.cloneElement(n,{...OH(r,n.props),ref:t?$P(t,i):i})}return E.Children.count(n)>1?E.Children.only(null):null});c0.displayName=\"SlotClone\";var BP=({children:e})=>b.jsx(b.Fragment,{children:e});function PH(e){return E.isValidElement(e)&&e.type===BP}function OH(e,t){const n={...t};for(const r in t){const i=e[r],s=t[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...a)=>{s(...a),i(...a)}:i&&(n[r]=i):r===\"style\"?n[r]={...i,...s}:r===\"className\"&&(n[r]=[i,s].filter(Boolean).join(\" \"))}return{...e,...n}}function LH(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,\"ref\"))==null?void 0:r.get,n=t&&\"isReactWarning\"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,\"ref\"))==null?void 0:i.get,n=t&&\"isReactWarning\"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var RH=[\"a\",\"button\",\"div\",\"form\",\"h2\",\"h3\",\"img\",\"input\",\"label\",\"li\",\"nav\",\"ol\",\"p\",\"span\",\"svg\",\"ul\"],Ut=RH.reduce((e,t)=>{const n=E.forwardRef((r,i)=>{const{asChild:s,...o}=r,a=s?cc:t;return typeof window<\"u\"&&(window[Symbol.for(\"radix-ui\")]=!0),b.jsx(a,{...o,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function IH(e,t){e&&nc.flushSync(()=>e.dispatchEvent(t))}function Qi(e){const t=E.useRef(e);return E.useEffect(()=>{t.current=e}),E.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function DH(e,t=globalThis==null?void 0:globalThis.document){const n=Qi(e);E.useEffect(()=>{const r=i=>{i.key===\"Escape\"&&n(i)};return t.addEventListener(\"keydown\",r,{capture:!0}),()=>t.removeEventListener(\"keydown\",r,{capture:!0})},[n,t])}var MH=\"DismissableLayer\",f0=\"dismissableLayer.update\",jH=\"dismissableLayer.pointerDownOutside\",FH=\"dismissableLayer.focusOutside\",$k,VP=E.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Vw=E.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:o,onDismiss:a,...l}=e,u=E.useContext(VP),[f,c]=E.useState(null),d=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=E.useState({}),p=ur(t,C=>c(C)),m=Array.from(u.layers),[w]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(w),v=f?m.indexOf(f):-1,g=u.layersWithOutsidePointerEventsDisabled.size>0,x=v>=y,S=VH(C=>{const T=C.target,O=[...u.branches].some(A=>A.contains(T));!x||O||(i==null||i(C),o==null||o(C),C.defaultPrevented||a==null||a())},d),k=zH(C=>{const T=C.target;[...u.branches].some(A=>A.contains(T))||(s==null||s(C),o==null||o(C),C.defaultPrevented||a==null||a())},d);return DH(C=>{v===u.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&a&&(C.preventDefault(),a()))},d),E.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&($k=d.body.style.pointerEvents,d.body.style.pointerEvents=\"none\"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),Bk(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=$k)}},[f,d,n,u]),E.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),Bk())},[f,u]),E.useEffect(()=>{const C=()=>h({});return document.addEventListener(f0,C),()=>document.removeEventListener(f0,C)},[]),b.jsx(Ut.div,{...l,ref:p,style:{pointerEvents:g?x?\"auto\":\"none\":void 0,...e.style},onFocusCapture:Qt(e.onFocusCapture,k.onFocusCapture),onBlurCapture:Qt(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:Qt(e.onPointerDownCapture,S.onPointerDownCapture)})});Vw.displayName=MH;var $H=\"DismissableLayerBranch\",BH=E.forwardRef((e,t)=>{const n=E.useContext(VP),r=E.useRef(null),i=ur(t,r);return E.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),b.jsx(Ut.div,{...e,ref:i})});BH.displayName=$H;function VH(e,t=globalThis==null?void 0:globalThis.document){const n=Qi(e),r=E.useRef(!1),i=E.useRef(()=>{});return E.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let l=function(){zP(jH,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType===\"touch\"?(t.removeEventListener(\"click\",i.current),i.current=l,t.addEventListener(\"click\",i.current,{once:!0})):l()}else t.removeEventListener(\"click\",i.current);r.current=!1},o=window.setTimeout(()=>{t.addEventListener(\"pointerdown\",s)},0);return()=>{window.clearTimeout(o),t.removeEventListener(\"pointerdown\",s),t.removeEventListener(\"click\",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function zH(e,t=globalThis==null?void 0:globalThis.document){const n=Qi(e),r=E.useRef(!1);return E.useEffect(()=>{const i=s=>{s.target&&!r.current&&zP(FH,n,{originalEvent:s},{discrete:!1})};return t.addEventListener(\"focusin\",i),()=>t.removeEventListener(\"focusin\",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Bk(){const e=new CustomEvent(f0);document.dispatchEvent(e)}function zP(e,t,n,{discrete:r}){const i=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?IH(i,s):i.dispatchEvent(s)}var Ks=globalThis!=null&&globalThis.document?E.useLayoutEffect:()=>{},UH=ld.useId||(()=>{}),HH=0;function Vf(e){const[t,n]=E.useState(UH());return Ks(()=>{e||n(r=>r??String(HH++))},[e]),e||(t?`radix-${t}`:\"\")}const WH=[\"top\",\"right\",\"bottom\",\"left\"],Zi=Math.min,un=Math.max,Yd=Math.round,Gc=Math.floor,Ji=e=>({x:e,y:e}),KH={left:\"right\",right:\"left\",bottom:\"top\",top:\"bottom\"},qH={start:\"end\",end:\"start\"};function d0(e,t,n){return un(e,Zi(t,n))}function oi(e,t){return typeof e==\"function\"?e(t):e}function ai(e){return e.split(\"-\")[0]}function Va(e){return e.split(\"-\")[1]}function zw(e){return e===\"x\"?\"y\":\"x\"}function Uw(e){return e===\"y\"?\"height\":\"width\"}function es(e){return[\"top\",\"bottom\"].includes(ai(e))?\"y\":\"x\"}function Hw(e){return zw(es(e))}function YH(e,t,n){n===void 0&&(n=!1);const r=Va(e),i=Hw(e),s=Uw(i);let o=i===\"x\"?r===(n?\"end\":\"start\")?\"right\":\"left\":r===\"start\"?\"bottom\":\"top\";return t.reference[s]>t.floating[s]&&(o=Gd(o)),[o,Gd(o)]}function GH(e){const t=Gd(e);return[h0(e),t,h0(t)]}function h0(e){return e.replace(/start|end/g,t=>qH[t])}function XH(e,t,n){const r=[\"left\",\"right\"],i=[\"right\",\"left\"],s=[\"top\",\"bottom\"],o=[\"bottom\",\"top\"];switch(e){case\"top\":case\"bottom\":return n?t?i:r:t?r:i;case\"left\":case\"right\":return t?s:o;default:return[]}}function QH(e,t,n,r){const i=Va(e);let s=XH(ai(e),n===\"start\",r);return i&&(s=s.map(o=>o+\"-\"+i),t&&(s=s.concat(s.map(h0)))),s}function Gd(e){return e.replace(/left|right|bottom|top/g,t=>KH[t])}function ZH(e){return{top:0,right:0,bottom:0,left:0,...e}}function UP(e){return typeof e!=\"number\"?ZH(e):{top:e,right:e,bottom:e,left:e}}function Xd(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Vk(e,t,n){let{reference:r,floating:i}=e;const s=es(t),o=Hw(t),a=Uw(o),l=ai(t),u=s===\"y\",f=r.x+r.width/2-i.width/2,c=r.y+r.height/2-i.height/2,d=r[a]/2-i[a]/2;let h;switch(l){case\"top\":h={x:f,y:r.y-i.height};break;case\"bottom\":h={x:f,y:r.y+r.height};break;case\"right\":h={x:r.x+r.width,y:c};break;case\"left\":h={x:r.x-i.width,y:c};break;default:h={x:r.x,y:r.y}}switch(Va(t)){case\"start\":h[o]-=d*(n&&u?-1:1);break;case\"end\":h[o]+=d*(n&&u?-1:1);break}return h}const JH=async(e,t,n)=>{const{placement:r=\"bottom\",strategy:i=\"absolute\",middleware:s=[],platform:o}=n,a=s.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(t));let u=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:f,y:c}=Vk(u,r,l),d=r,h={},p=0;for(let m=0;m<a.length;m++){const{name:w,fn:y}=a[m],{x:v,y:g,data:x,reset:S}=await y({x:f,y:c,initialPlacement:r,placement:d,strategy:i,middlewareData:h,rects:u,platform:o,elements:{reference:e,floating:t}});f=v??f,c=g??c,h={...h,[w]:{...h[w],...x}},S&&p<=50&&(p++,typeof S==\"object\"&&(S.placement&&(d=S.placement),S.rects&&(u=S.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):S.rects),{x:f,y:c}=Vk(u,d,l)),m=-1)}return{x:f,y:c,placement:d,strategy:i,middlewareData:h}};async function Lu(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:s,rects:o,elements:a,strategy:l}=e,{boundary:u=\"clippingAncestors\",rootBoundary:f=\"viewport\",elementContext:c=\"floating\",altBoundary:d=!1,padding:h=0}=oi(t,e),p=UP(h),w=a[d?c===\"floating\"?\"reference\":\"floating\":c],y=Xd(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(w)))==null||n?w:w.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:u,rootBoundary:f,strategy:l})),v=c===\"floating\"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,g=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),x=await(s.isElement==null?void 0:s.isElement(g))?await(s.getScale==null?void 0:s.getScale(g))||{x:1,y:1}:{x:1,y:1},S=Xd(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:g,strategy:l}):v);return{top:(y.top-S.top+p.top)/x.y,bottom:(S.bottom-y.bottom+p.bottom)/x.y,left:(y.left-S.left+p.left)/x.x,right:(S.right-y.right+p.right)/x.x}}const e7=e=>({name:\"arrow\",options:e,async fn(t){const{x:n,y:r,placement:i,rects:s,platform:o,elements:a,middlewareData:l}=t,{element:u,padding:f=0}=oi(e,t)||{};if(u==null)return{};const c=UP(f),d={x:n,y:r},h=Hw(i),p=Uw(h),m=await o.getDimensions(u),w=h===\"y\",y=w?\"top\":\"left\",v=w?\"bottom\":\"right\",g=w?\"clientHeight\":\"clientWidth\",x=s.reference[p]+s.reference[h]-d[h]-s.floating[p],S=d[h]-s.reference[h],k=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let C=k?k[g]:0;(!C||!await(o.isElement==null?void 0:o.isElement(k)))&&(C=a.floating[g]||s.floating[p]);const T=x/2-S/2,O=C/2-m[p]/2-1,A=Zi(c[y],O),j=Zi(c[v],O),L=A,B=C-m[p]-j,N=C/2-m[p]/2+T,M=d0(L,N,B),I=!l.arrow&&Va(i)!=null&&N!==M&&s.reference[p]/2-(N<L?A:j)-m[p]/2<0,F=I?N<L?N-L:N-B:0;return{[h]:d[h]+F,data:{[h]:M,centerOffset:N-M-F,...I&&{alignmentOffset:F}},reset:I}}}),t7=function(e){return e===void 0&&(e={}),{name:\"flip\",options:e,async fn(t){var n,r;const{placement:i,middlewareData:s,rects:o,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:f=!0,crossAxis:c=!0,fallbackPlacements:d,fallbackStrategy:h=\"bestFit\",fallbackAxisSideDirection:p=\"none\",flipAlignment:m=!0,...w}=oi(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const y=ai(i),v=es(a),g=ai(a)===a,x=await(l.isRTL==null?void 0:l.isRTL(u.floating)),S=d||(g||!m?[Gd(a)]:GH(a)),k=p!==\"none\";!d&&k&&S.push(...QH(a,m,p,x));const C=[a,...S],T=await Lu(t,w),O=[];let A=((r=s.flip)==null?void 0:r.overflows)||[];if(f&&O.push(T[y]),c){const N=YH(i,o,x);O.push(T[N[0]],T[N[1]])}if(A=[...A,{placement:i,overflows:O}],!O.every(N=>N<=0)){var j,L;const N=(((j=s.flip)==null?void 0:j.index)||0)+1,M=C[N];if(M)return{data:{index:N,overflows:A},reset:{placement:M}};let I=(L=A.filter(F=>F.overflows[0]<=0).sort((F,P)=>F.overflows[1]-P.overflows[1])[0])==null?void 0:L.placement;if(!I)switch(h){case\"bestFit\":{var B;const F=(B=A.filter(P=>{if(k){const D=es(P.placement);return D===v||D===\"y\"}return!0}).map(P=>[P.placement,P.overflows.filter(D=>D>0).reduce((D,_)=>D+_,0)]).sort((P,D)=>P[1]-D[1])[0])==null?void 0:B[0];F&&(I=F);break}case\"initialPlacement\":I=a;break}if(i!==I)return{reset:{placement:I}}}return{}}}};function zk(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Uk(e){return WH.some(t=>e[t]>=0)}const n7=function(e){return e===void 0&&(e={}),{name:\"hide\",options:e,async fn(t){const{rects:n}=t,{strategy:r=\"referenceHidden\",...i}=oi(e,t);switch(r){case\"referenceHidden\":{const s=await Lu(t,{...i,elementContext:\"reference\"}),o=zk(s,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Uk(o)}}}case\"escaped\":{const s=await Lu(t,{...i,altBoundary:!0}),o=zk(s,n.floating);return{data:{escapedOffsets:o,escaped:Uk(o)}}}default:return{}}}}};async function r7(e,t){const{placement:n,platform:r,elements:i}=e,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=ai(n),a=Va(n),l=es(n)===\"y\",u=[\"left\",\"top\"].includes(o)?-1:1,f=s&&l?-1:1,c=oi(t,e);let{mainAxis:d,crossAxis:h,alignmentAxis:p}=typeof c==\"number\"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return a&&typeof p==\"number\"&&(h=a===\"end\"?p*-1:p),l?{x:h*f,y:d*u}:{x:d*u,y:h*f}}const i7=function(e){return e===void 0&&(e=0),{name:\"offset\",options:e,async fn(t){var n,r;const{x:i,y:s,placement:o,middlewareData:a}=t,l=await r7(t,e);return o===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:o}}}}},s7=function(e){return e===void 0&&(e={}),{name:\"shift\",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:s=!0,crossAxis:o=!1,limiter:a={fn:w=>{let{x:y,y:v}=w;return{x:y,y:v}}},...l}=oi(e,t),u={x:n,y:r},f=await Lu(t,l),c=es(ai(i)),d=zw(c);let h=u[d],p=u[c];if(s){const w=d===\"y\"?\"top\":\"left\",y=d===\"y\"?\"bottom\":\"right\",v=h+f[w],g=h-f[y];h=d0(v,h,g)}if(o){const w=c===\"y\"?\"top\":\"left\",y=c===\"y\"?\"bottom\":\"right\",v=p+f[w],g=p-f[y];p=d0(v,p,g)}const m=a.fn({...t,[d]:h,[c]:p});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[d]:s,[c]:o}}}}}},o7=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:s,middlewareData:o}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=oi(e,t),f={x:n,y:r},c=es(i),d=zw(c);let h=f[d],p=f[c];const m=oi(a,t),w=typeof m==\"number\"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const g=d===\"y\"?\"height\":\"width\",x=s.reference[d]-s.floating[g]+w.mainAxis,S=s.reference[d]+s.reference[g]-w.mainAxis;h<x?h=x:h>S&&(h=S)}if(u){var y,v;const g=d===\"y\"?\"width\":\"height\",x=[\"top\",\"left\"].includes(ai(i)),S=s.reference[c]-s.floating[g]+(x&&((y=o.offset)==null?void 0:y[c])||0)+(x?0:w.crossAxis),k=s.reference[c]+s.reference[g]+(x?0:((v=o.offset)==null?void 0:v[c])||0)-(x?w.crossAxis:0);p<S?p=S:p>k&&(p=k)}return{[d]:h,[c]:p}}}},a7=function(e){return e===void 0&&(e={}),{name:\"size\",options:e,async fn(t){var n,r;const{placement:i,rects:s,platform:o,elements:a}=t,{apply:l=()=>{},...u}=oi(e,t),f=await Lu(t,u),c=ai(i),d=Va(i),h=es(i)===\"y\",{width:p,height:m}=s.floating;let w,y;c===\"top\"||c===\"bottom\"?(w=c,y=d===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?\"start\":\"end\")?\"left\":\"right\"):(y=c,w=d===\"end\"?\"top\":\"bottom\");const v=m-f.top-f.bottom,g=p-f.left-f.right,x=Zi(m-f[w],v),S=Zi(p-f[y],g),k=!t.middlewareData.shift;let C=x,T=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(T=g),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),k&&!d){const A=un(f.left,0),j=un(f.right,0),L=un(f.top,0),B=un(f.bottom,0);h?T=p-2*(A!==0||j!==0?A+j:un(f.left,f.right)):C=m-2*(L!==0||B!==0?L+B:un(f.top,f.bottom))}await l({...t,availableWidth:T,availableHeight:C});const O=await o.getDimensions(a.floating);return p!==O.width||m!==O.height?{reset:{rects:!0}}:{}}}};function ip(){return typeof window<\"u\"}function za(e){return HP(e)?(e.nodeName||\"\").toLowerCase():\"#document\"}function yn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Pr(e){var t;return(t=(HP(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function HP(e){return ip()?e instanceof Node||e instanceof yn(e).Node:!1}function ar(e){return ip()?e instanceof Element||e instanceof yn(e).Element:!1}function Nr(e){return ip()?e instanceof HTMLElement||e instanceof yn(e).HTMLElement:!1}function Hk(e){return!ip()||typeof ShadowRoot>\"u\"?!1:e instanceof ShadowRoot||e instanceof yn(e).ShadowRoot}function fc(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=lr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&![\"inline\",\"contents\"].includes(i)}function l7(e){return[\"table\",\"td\",\"th\"].includes(za(e))}function sp(e){return[\":popover-open\",\":modal\"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Ww(e){const t=Kw(),n=ar(e)?lr(e):e;return n.transform!==\"none\"||n.perspective!==\"none\"||(n.containerType?n.containerType!==\"normal\":!1)||!t&&(n.backdropFilter?n.backdropFilter!==\"none\":!1)||!t&&(n.filter?n.filter!==\"none\":!1)||[\"transform\",\"perspective\",\"filter\"].some(r=>(n.willChange||\"\").includes(r))||[\"paint\",\"layout\",\"strict\",\"content\"].some(r=>(n.contain||\"\").includes(r))}function u7(e){let t=ts(e);for(;Nr(t)&&!wa(t);){if(Ww(t))return t;if(sp(t))return null;t=ts(t)}return null}function Kw(){return typeof CSS>\"u\"||!CSS.supports?!1:CSS.supports(\"-webkit-backdrop-filter\",\"none\")}function wa(e){return[\"html\",\"body\",\"#document\"].includes(za(e))}function lr(e){return yn(e).getComputedStyle(e)}function op(e){return ar(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ts(e){if(za(e)===\"html\")return e;const t=e.assignedSlot||e.parentNode||Hk(e)&&e.host||Pr(e);return Hk(t)?t.host:t}function WP(e){const t=ts(e);return wa(t)?e.ownerDocument?e.ownerDocument.body:e.body:Nr(t)&&fc(t)?t:WP(t)}function Ru(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=WP(e),s=i===((r=e.ownerDocument)==null?void 0:r.body),o=yn(i);if(s){const a=p0(o);return t.concat(o,o.visualViewport||[],fc(i)?i:[],a&&n?Ru(a):[])}return t.concat(i,Ru(i,[],n))}function p0(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function KP(e){const t=lr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Nr(e),s=i?e.offsetWidth:n,o=i?e.offsetHeight:r,a=Yd(n)!==s||Yd(r)!==o;return a&&(n=s,r=o),{width:n,height:r,$:a}}function qw(e){return ar(e)?e:e.contextElement}function Jo(e){const t=qw(e);if(!Nr(t))return Ji(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:s}=KP(t);let o=(s?Yd(n.width):n.width)/r,a=(s?Yd(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const c7=Ji(0);function qP(e){const t=yn(e);return!Kw()||!t.visualViewport?c7:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function f7(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==yn(e)?!1:t}function qs(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),s=qw(e);let o=Ji(1);t&&(r?ar(r)&&(o=Jo(r)):o=Jo(e));const a=f7(s,n,r)?qP(s):Ji(0);let l=(i.left+a.x)/o.x,u=(i.top+a.y)/o.y,f=i.width/o.x,c=i.height/o.y;if(s){const d=yn(s),h=r&&ar(r)?yn(r):r;let p=d,m=p0(p);for(;m&&r&&h!==p;){const w=Jo(m),y=m.getBoundingClientRect(),v=lr(m),g=y.left+(m.clientLeft+parseFloat(v.paddingLeft))*w.x,x=y.top+(m.clientTop+parseFloat(v.paddingTop))*w.y;l*=w.x,u*=w.y,f*=w.x,c*=w.y,l+=g,u+=x,p=yn(m),m=p0(p)}}return Xd({width:f,height:c,x:l,y:u})}function d7(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const s=i===\"fixed\",o=Pr(r),a=t?sp(t.floating):!1;if(r===o||a&&s)return n;let l={scrollLeft:0,scrollTop:0},u=Ji(1);const f=Ji(0),c=Nr(r);if((c||!c&&!s)&&((za(r)!==\"body\"||fc(o))&&(l=op(r)),Nr(r))){const d=qs(r);u=Jo(r),f.x=d.x+r.clientLeft,f.y=d.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+f.x,y:n.y*u.y-l.scrollTop*u.y+f.y}}function h7(e){return Array.from(e.getClientRects())}function m0(e,t){const n=op(e).scrollLeft;return t?t.left+n:qs(Pr(e)).left+n}function p7(e){const t=Pr(e),n=op(e),r=e.ownerDocument.body,i=un(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=un(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+m0(e);const a=-n.scrollTop;return lr(r).direction===\"rtl\"&&(o+=un(t.clientWidth,r.clientWidth)-i),{width:i,height:s,x:o,y:a}}function m7(e,t){const n=yn(e),r=Pr(e),i=n.visualViewport;let s=r.clientWidth,o=r.clientHeight,a=0,l=0;if(i){s=i.width,o=i.height;const u=Kw();(!u||u&&t===\"fixed\")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:s,height:o,x:a,y:l}}function g7(e,t){const n=qs(e,!0,t===\"fixed\"),r=n.top+e.clientTop,i=n.left+e.clientLeft,s=Nr(e)?Jo(e):Ji(1),o=e.clientWidth*s.x,a=e.clientHeight*s.y,l=i*s.x,u=r*s.y;return{width:o,height:a,x:l,y:u}}function Wk(e,t,n){let r;if(t===\"viewport\")r=m7(e,n);else if(t===\"document\")r=p7(Pr(e));else if(ar(t))r=g7(t,n);else{const i=qP(e);r={...t,x:t.x-i.x,y:t.y-i.y}}return Xd(r)}function YP(e,t){const n=ts(e);return n===t||!ar(n)||wa(n)?!1:lr(n).position===\"fixed\"||YP(n,t)}function y7(e,t){const n=t.get(e);if(n)return n;let r=Ru(e,[],!1).filter(a=>ar(a)&&za(a)!==\"body\"),i=null;const s=lr(e).position===\"fixed\";let o=s?ts(e):e;for(;ar(o)&&!wa(o);){const a=lr(o),l=Ww(o);!l&&a.position===\"fixed\"&&(i=null),(s?!l&&!i:!l&&a.position===\"static\"&&!!i&&[\"absolute\",\"fixed\"].includes(i.position)||fc(o)&&!l&&YP(e,o))?r=r.filter(f=>f!==o):i=a,o=ts(o)}return t.set(e,r),r}function v7(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n===\"clippingAncestors\"?sp(t)?[]:y7(t,this._c):[].concat(n),r],a=o[0],l=o.reduce((u,f)=>{const c=Wk(t,f,i);return u.top=un(c.top,u.top),u.right=Zi(c.right,u.right),u.bottom=Zi(c.bottom,u.bottom),u.left=un(c.left,u.left),u},Wk(t,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function w7(e){const{width:t,height:n}=KP(e);return{width:t,height:n}}function x7(e,t,n){const r=Nr(t),i=Pr(t),s=n===\"fixed\",o=qs(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=Ji(0);if(r||!r&&!s)if((za(t)!==\"body\"||fc(i))&&(a=op(t)),r){const h=qs(t,!0,s,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else i&&(l.x=m0(i));let u=0,f=0;if(i&&!r&&!s){const h=i.getBoundingClientRect();f=h.top+a.scrollTop,u=h.left+a.scrollLeft-m0(i,h)}const c=o.left+a.scrollLeft-l.x-u,d=o.top+a.scrollTop-l.y-f;return{x:c,y:d,width:o.width,height:o.height}}function Hm(e){return lr(e).position===\"static\"}function Kk(e,t){if(!Nr(e)||lr(e).position===\"fixed\")return null;if(t)return t(e);let n=e.offsetParent;return Pr(e)===n&&(n=n.ownerDocument.body),n}function GP(e,t){const n=yn(e);if(sp(e))return n;if(!Nr(e)){let i=ts(e);for(;i&&!wa(i);){if(ar(i)&&!Hm(i))return i;i=ts(i)}return n}let r=Kk(e,t);for(;r&&l7(r)&&Hm(r);)r=Kk(r,t);return r&&wa(r)&&Hm(r)&&!Ww(r)?n:r||u7(e)||n}const b7=async function(e){const t=this.getOffsetParent||GP,n=this.getDimensions,r=await n(e.floating);return{reference:x7(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function S7(e){return lr(e).direction===\"rtl\"}const k7={convertOffsetParentRelativeRectToViewportRelativeRect:d7,getDocumentElement:Pr,getClippingRect:v7,getOffsetParent:GP,getElementRects:b7,getClientRects:h7,getDimensions:w7,getScale:Jo,isElement:ar,isRTL:S7};function E7(e,t){let n=null,r;const i=Pr(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const{left:u,top:f,width:c,height:d}=e.getBoundingClientRect();if(a||t(),!c||!d)return;const h=Gc(f),p=Gc(i.clientWidth-(u+c)),m=Gc(i.clientHeight-(f+d)),w=Gc(u),v={rootMargin:-h+\"px \"+-p+\"px \"+-m+\"px \"+-w+\"px\",threshold:un(0,Zi(1,l))||1};let g=!0;function x(S){const k=S[0].intersectionRatio;if(k!==l){if(!g)return o();k?o(!1,k):r=setTimeout(()=>{o(!1,1e-7)},1e3)}g=!1}try{n=new IntersectionObserver(x,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(x,v)}n.observe(e)}return o(!0),s}function C7(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver==\"function\",layoutShift:a=typeof IntersectionObserver==\"function\",animationFrame:l=!1}=r,u=qw(e),f=i||s?[...u?Ru(u):[],...Ru(t)]:[];f.forEach(y=>{i&&y.addEventListener(\"scroll\",n,{passive:!0}),s&&y.addEventListener(\"resize\",n)});const c=u&&a?E7(u,n):null;let d=-1,h=null;o&&(h=new ResizeObserver(y=>{let[v]=y;v&&v.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var g;(g=h)==null||g.observe(t)})),n()}),u&&!l&&h.observe(u),h.observe(t));let p,m=l?qs(e):null;l&&w();function w(){const y=qs(e);m&&(y.x!==m.x||y.y!==m.y||y.width!==m.width||y.height!==m.height)&&n(),m=y,p=requestAnimationFrame(w)}return n(),()=>{var y;f.forEach(v=>{i&&v.removeEventListener(\"scroll\",n),s&&v.removeEventListener(\"resize\",n)}),c==null||c(),(y=h)==null||y.disconnect(),h=null,l&&cancelAnimationFrame(p)}}const T7=i7,_7=s7,A7=t7,N7=a7,P7=n7,qk=e7,O7=o7,L7=(e,t,n)=>{const r=new Map,i={platform:k7,...n},s={...i.platform,_c:r};return JH(e,t,{...i,platform:s})};var zf=typeof document<\"u\"?E.useLayoutEffect:E.useEffect;function Qd(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==\"function\"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==\"object\"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Qd(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const s=i[r];if(!(s===\"_owner\"&&e.$$typeof)&&!Qd(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function XP(e){return typeof window>\"u\"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Yk(e,t){const n=XP(e);return Math.round(t*n)/n}function Wm(e){const t=E.useRef(e);return zf(()=>{t.current=e}),t}function R7(e){e===void 0&&(e={});const{placement:t=\"bottom\",strategy:n=\"absolute\",middleware:r=[],platform:i,elements:{reference:s,floating:o}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[f,c]=E.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[d,h]=E.useState(r);Qd(d,r)||h(r);const[p,m]=E.useState(null),[w,y]=E.useState(null),v=E.useCallback(P=>{P!==k.current&&(k.current=P,m(P))},[]),g=E.useCallback(P=>{P!==C.current&&(C.current=P,y(P))},[]),x=s||p,S=o||w,k=E.useRef(null),C=E.useRef(null),T=E.useRef(f),O=l!=null,A=Wm(l),j=Wm(i),L=Wm(u),B=E.useCallback(()=>{if(!k.current||!C.current)return;const P={placement:t,strategy:n,middleware:d};j.current&&(P.platform=j.current),L7(k.current,C.current,P).then(D=>{const _={...D,isPositioned:L.current!==!1};N.current&&!Qd(T.current,_)&&(T.current=_,nc.flushSync(()=>{c(_)}))})},[d,t,n,j,L]);zf(()=>{u===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,c(P=>({...P,isPositioned:!1})))},[u]);const N=E.useRef(!1);zf(()=>(N.current=!0,()=>{N.current=!1}),[]),zf(()=>{if(x&&(k.current=x),S&&(C.current=S),x&&S){if(A.current)return A.current(x,S,B);B()}},[x,S,B,A,O]);const M=E.useMemo(()=>({reference:k,floating:C,setReference:v,setFloating:g}),[v,g]),I=E.useMemo(()=>({reference:x,floating:S}),[x,S]),F=E.useMemo(()=>{const P={position:n,left:0,top:0};if(!I.floating)return P;const D=Yk(I.floating,f.x),_=Yk(I.floating,f.y);return a?{...P,transform:\"translate(\"+D+\"px, \"+_+\"px)\",...XP(I.floating)>=1.5&&{willChange:\"transform\"}}:{position:n,left:D,top:_}},[n,a,I.floating,f.x,f.y]);return E.useMemo(()=>({...f,update:B,refs:M,elements:I,floatingStyles:F}),[f,B,M,I,F])}const I7=e=>{function t(n){return{}.hasOwnProperty.call(n,\"current\")}return{name:\"arrow\",options:e,fn(n){const{element:r,padding:i}=typeof e==\"function\"?e(n):e;return r&&t(r)?r.current!=null?qk({element:r.current,padding:i}).fn(n):{}:r?qk({element:r,padding:i}).fn(n):{}}}},D7=(e,t)=>({...T7(e),options:[e,t]}),M7=(e,t)=>({..._7(e),options:[e,t]}),j7=(e,t)=>({...O7(e),options:[e,t]}),F7=(e,t)=>({...A7(e),options:[e,t]}),$7=(e,t)=>({...N7(e),options:[e,t]}),B7=(e,t)=>({...P7(e),options:[e,t]}),V7=(e,t)=>({...I7(e),options:[e,t]});var z7=\"Arrow\",QP=E.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...s}=e;return b.jsx(Ut.svg,{...s,ref:t,width:r,height:i,viewBox:\"0 0 30 10\",preserveAspectRatio:\"none\",children:e.asChild?n:b.jsx(\"polygon\",{points:\"0,0 30,0 15,10\"})})});QP.displayName=z7;var U7=QP;function H7(e){const[t,n]=E.useState(void 0);return Ks(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const s=i[0];let o,a;if(\"borderBoxSize\"in s){const l=s.borderBoxSize,u=Array.isArray(l)?l[0]:l;o=u.inlineSize,a=u.blockSize}else o=e.offsetWidth,a=e.offsetHeight;n({width:o,height:a})});return r.observe(e,{box:\"border-box\"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Yw=\"Popper\",[ZP,JP]=Bw(Yw),[W7,eO]=ZP(Yw),tO=e=>{const{__scopePopper:t,children:n}=e,[r,i]=E.useState(null);return b.jsx(W7,{scope:t,anchor:r,onAnchorChange:i,children:n})};tO.displayName=Yw;var nO=\"PopperAnchor\",rO=E.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,s=eO(nO,n),o=E.useRef(null),a=ur(t,o);return E.useEffect(()=>{s.onAnchorChange((r==null?void 0:r.current)||o.current)}),r?null:b.jsx(Ut.div,{...i,ref:a})});rO.displayName=nO;var Gw=\"PopperContent\",[K7,q7]=ZP(Gw),iO=E.forwardRef((e,t)=>{var re,G,le,de,ue,ie;const{__scopePopper:n,side:r=\"bottom\",sideOffset:i=0,align:s=\"center\",alignOffset:o=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:c=\"partial\",hideWhenDetached:d=!1,updatePositionStrategy:h=\"optimized\",onPlaced:p,...m}=e,w=eO(Gw,n),[y,v]=E.useState(null),g=ur(t,pe=>v(pe)),[x,S]=E.useState(null),k=H7(x),C=(k==null?void 0:k.width)??0,T=(k==null?void 0:k.height)??0,O=r+(s!==\"center\"?\"-\"+s:\"\"),A=typeof f==\"number\"?f:{top:0,right:0,bottom:0,left:0,...f},j=Array.isArray(u)?u:[u],L=j.length>0,B={padding:A,boundary:j.filter(G7),altBoundary:L},{refs:N,floatingStyles:M,placement:I,isPositioned:F,middlewareData:P}=R7({strategy:\"fixed\",placement:O,whileElementsMounted:(...pe)=>C7(...pe,{animationFrame:h===\"always\"}),elements:{reference:w.anchor},middleware:[D7({mainAxis:i+T,alignmentAxis:o}),l&&M7({mainAxis:!0,crossAxis:!1,limiter:c===\"partial\"?j7():void 0,...B}),l&&F7({...B}),$7({...B,apply:({elements:pe,rects:Ne,availableWidth:gt,availableHeight:Ht})=>{const{width:Ir,height:$}=Ne.reference,z=pe.floating.style;z.setProperty(\"--radix-popper-available-width\",`${gt}px`),z.setProperty(\"--radix-popper-available-height\",`${Ht}px`),z.setProperty(\"--radix-popper-anchor-width\",`${Ir}px`),z.setProperty(\"--radix-popper-anchor-height\",`${$}px`)}}),x&&V7({element:x,padding:a}),X7({arrowWidth:C,arrowHeight:T}),d&&B7({strategy:\"referenceHidden\",...B})]}),[D,_]=aO(I),V=Qi(p);Ks(()=>{F&&(V==null||V())},[F,V]);const W=(re=P.arrow)==null?void 0:re.x,R=(G=P.arrow)==null?void 0:G.y,q=((le=P.arrow)==null?void 0:le.centerOffset)!==0,[J,Y]=E.useState();return Ks(()=>{y&&Y(window.getComputedStyle(y).zIndex)},[y]),b.jsx(\"div\",{ref:N.setFloating,\"data-radix-popper-content-wrapper\":\"\",style:{...M,transform:F?M.transform:\"translate(0, -200%)\",minWidth:\"max-content\",zIndex:J,\"--radix-popper-transform-origin\":[(de=P.transformOrigin)==null?void 0:de.x,(ue=P.transformOrigin)==null?void 0:ue.y].join(\" \"),...((ie=P.hide)==null?void 0:ie.referenceHidden)&&{visibility:\"hidden\",pointerEvents:\"none\"}},dir:e.dir,children:b.jsx(K7,{scope:n,placedSide:D,onArrowChange:S,arrowX:W,arrowY:R,shouldHideArrow:q,children:b.jsx(Ut.div,{\"data-side\":D,\"data-align\":_,...m,ref:g,style:{...m.style,animation:F?void 0:\"none\"}})})})});iO.displayName=Gw;var sO=\"PopperArrow\",Y7={top:\"bottom\",right:\"left\",bottom:\"top\",left:\"right\"},oO=E.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,s=q7(sO,r),o=Y7[s.placedSide];return b.jsx(\"span\",{ref:s.onArrowChange,style:{position:\"absolute\",left:s.arrowX,top:s.arrowY,[o]:0,transformOrigin:{top:\"\",right:\"0 0\",bottom:\"center 0\",left:\"100% 0\"}[s.placedSide],transform:{top:\"translateY(100%)\",right:\"translateY(50%) rotate(90deg) translateX(-50%)\",bottom:\"rotate(180deg)\",left:\"translateY(50%) rotate(-90deg) translateX(50%)\"}[s.placedSide],visibility:s.shouldHideArrow?\"hidden\":void 0},children:b.jsx(U7,{...i,ref:n,style:{...i.style,display:\"block\"}})})});oO.displayName=sO;function G7(e){return e!==null}var X7=e=>({name:\"transformOrigin\",options:e,fn(t){var w,y,v;const{placement:n,rects:r,middlewareData:i}=t,o=((w=i.arrow)==null?void 0:w.centerOffset)!==0,a=o?0:e.arrowWidth,l=o?0:e.arrowHeight,[u,f]=aO(n),c={start:\"0%\",center:\"50%\",end:\"100%\"}[f],d=(((y=i.arrow)==null?void 0:y.x)??0)+a/2,h=(((v=i.arrow)==null?void 0:v.y)??0)+l/2;let p=\"\",m=\"\";return u===\"bottom\"?(p=o?c:`${d}px`,m=`${-l}px`):u===\"top\"?(p=o?c:`${d}px`,m=`${r.floating.height+l}px`):u===\"right\"?(p=`${-l}px`,m=o?c:`${h}px`):u===\"left\"&&(p=`${r.floating.width+l}px`,m=o?c:`${h}px`),{data:{x:p,y:m}}}});function aO(e){const[t,n=\"center\"]=e.split(\"-\");return[t,n]}var Q7=tO,Z7=rO,J7=iO,eW=oO,tW=\"Portal\",lO=E.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[i,s]=E.useState(!1);Ks(()=>s(!0),[]);const o=n||i&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return o?V3.createPortal(b.jsx(Ut.div,{...r,ref:t}),o):null});lO.displayName=tW;function nW(e,t){return E.useReducer((n,r)=>t[n][r]??n,e)}var dc=e=>{const{present:t,children:n}=e,r=rW(t),i=typeof n==\"function\"?n({present:r.isPresent}):E.Children.only(n),s=ur(r.ref,iW(i));return typeof n==\"function\"||r.isPresent?E.cloneElement(i,{ref:s}):null};dc.displayName=\"Presence\";function rW(e){const[t,n]=E.useState(),r=E.useRef({}),i=E.useRef(e),s=E.useRef(\"none\"),o=e?\"mounted\":\"unmounted\",[a,l]=nW(o,{mounted:{UNMOUNT:\"unmounted\",ANIMATION_OUT:\"unmountSuspended\"},unmountSuspended:{MOUNT:\"mounted\",ANIMATION_END:\"unmounted\"},unmounted:{MOUNT:\"mounted\"}});return E.useEffect(()=>{const u=Xc(r.current);s.current=a===\"mounted\"?u:\"none\"},[a]),Ks(()=>{const u=r.current,f=i.current;if(f!==e){const d=s.current,h=Xc(u);e?l(\"MOUNT\"):h===\"none\"||(u==null?void 0:u.display)===\"none\"?l(\"UNMOUNT\"):l(f&&d!==h?\"ANIMATION_OUT\":\"UNMOUNT\"),i.current=e}},[e,l]),Ks(()=>{if(t){const u=c=>{const h=Xc(r.current).includes(c.animationName);c.target===t&&h&&nc.flushSync(()=>l(\"ANIMATION_END\"))},f=c=>{c.target===t&&(s.current=Xc(r.current))};return t.addEventListener(\"animationstart\",f),t.addEventListener(\"animationcancel\",u),t.addEventListener(\"animationend\",u),()=>{t.removeEventListener(\"animationstart\",f),t.removeEventListener(\"animationcancel\",u),t.removeEventListener(\"animationend\",u)}}else l(\"ANIMATION_END\")},[t,l]),{isPresent:[\"mounted\",\"unmountSuspended\"].includes(a),ref:E.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Xc(e){return(e==null?void 0:e.animationName)||\"none\"}function iW(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,\"ref\"))==null?void 0:r.get,n=t&&\"isReactWarning\"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,\"ref\"))==null?void 0:i.get,n=t&&\"isReactWarning\"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function uO({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=sW({defaultProp:t,onChange:n}),s=e!==void 0,o=s?e:r,a=Qi(n),l=E.useCallback(u=>{if(s){const c=typeof u==\"function\"?u(e):u;c!==e&&a(c)}else i(u)},[s,e,i,a]);return[o,l]}function sW({defaultProp:e,onChange:t}){const n=E.useState(e),[r]=n,i=E.useRef(r),s=Qi(t);return E.useEffect(()=>{i.current!==r&&(s(r),i.current=r)},[r,i,s]),n}var oW=\"VisuallyHidden\",cO=E.forwardRef((e,t)=>b.jsx(Ut.span,{...e,ref:t,style:{position:\"absolute\",border:0,width:1,height:1,padding:0,margin:-1,overflow:\"hidden\",clip:\"rect(0, 0, 0, 0)\",whiteSpace:\"nowrap\",wordWrap:\"normal\",...e.style}}));cO.displayName=oW;var aW=cO,[ap,epe]=Bw(\"Tooltip\",[JP]),lp=JP(),fO=\"TooltipProvider\",lW=700,g0=\"tooltip.open\",[uW,Xw]=ap(fO),dO=e=>{const{__scopeTooltip:t,delayDuration:n=lW,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:s}=e,[o,a]=E.useState(!0),l=E.useRef(!1),u=E.useRef(0);return E.useEffect(()=>{const f=u.current;return()=>window.clearTimeout(f)},[]),b.jsx(uW,{scope:t,isOpenDelayed:o,delayDuration:n,onOpen:E.useCallback(()=>{window.clearTimeout(u.current),a(!1)},[]),onClose:E.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>a(!0),r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:E.useCallback(f=>{l.current=f},[]),disableHoverableContent:i,children:s})};dO.displayName=fO;var up=\"Tooltip\",[cW,cp]=ap(up),hO=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:i=!1,onOpenChange:s,disableHoverableContent:o,delayDuration:a}=e,l=Xw(up,e.__scopeTooltip),u=lp(t),[f,c]=E.useState(null),d=Vf(),h=E.useRef(0),p=o??l.disableHoverableContent,m=a??l.delayDuration,w=E.useRef(!1),[y=!1,v]=uO({prop:r,defaultProp:i,onChange:C=>{C?(l.onOpen(),document.dispatchEvent(new CustomEvent(g0))):l.onClose(),s==null||s(C)}}),g=E.useMemo(()=>y?w.current?\"delayed-open\":\"instant-open\":\"closed\",[y]),x=E.useCallback(()=>{window.clearTimeout(h.current),w.current=!1,v(!0)},[v]),S=E.useCallback(()=>{window.clearTimeout(h.current),v(!1)},[v]),k=E.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{w.current=!0,v(!0)},m)},[m,v]);return E.useEffect(()=>()=>window.clearTimeout(h.current),[]),b.jsx(Q7,{...u,children:b.jsx(cW,{scope:t,contentId:d,open:y,stateAttribute:g,trigger:f,onTriggerChange:c,onTriggerEnter:E.useCallback(()=>{l.isOpenDelayed?k():x()},[l.isOpenDelayed,k,x]),onTriggerLeave:E.useCallback(()=>{p?S():window.clearTimeout(h.current)},[S,p]),onOpen:x,onClose:S,disableHoverableContent:p,children:n})})};hO.displayName=up;var y0=\"TooltipTrigger\",pO=E.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=cp(y0,n),s=Xw(y0,n),o=lp(n),a=E.useRef(null),l=ur(t,a,i.onTriggerChange),u=E.useRef(!1),f=E.useRef(!1),c=E.useCallback(()=>u.current=!1,[]);return E.useEffect(()=>()=>document.removeEventListener(\"pointerup\",c),[c]),b.jsx(Z7,{asChild:!0,...o,children:b.jsx(Ut.button,{\"aria-describedby\":i.open?i.contentId:void 0,\"data-state\":i.stateAttribute,...r,ref:l,onPointerMove:Qt(e.onPointerMove,d=>{d.pointerType!==\"touch\"&&!f.current&&!s.isPointerInTransitRef.current&&(i.onTriggerEnter(),f.current=!0)}),onPointerLeave:Qt(e.onPointerLeave,()=>{i.onTriggerLeave(),f.current=!1}),onPointerDown:Qt(e.onPointerDown,()=>{u.current=!0,document.addEventListener(\"pointerup\",c,{once:!0})}),onFocus:Qt(e.onFocus,()=>{u.current||i.onOpen()}),onBlur:Qt(e.onBlur,i.onClose),onClick:Qt(e.onClick,i.onClose)})})});pO.displayName=y0;var fW=\"TooltipPortal\",[tpe,dW]=ap(fW,{forceMount:void 0}),xa=\"TooltipContent\",mO=E.forwardRef((e,t)=>{const n=dW(xa,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=\"top\",...s}=e,o=cp(xa,e.__scopeTooltip);return b.jsx(dc,{present:r||o.open,children:o.disableHoverableContent?b.jsx(gO,{side:i,...s,ref:t}):b.jsx(hW,{side:i,...s,ref:t})})}),hW=E.forwardRef((e,t)=>{const n=cp(xa,e.__scopeTooltip),r=Xw(xa,e.__scopeTooltip),i=E.useRef(null),s=ur(t,i),[o,a]=E.useState(null),{trigger:l,onClose:u}=n,f=i.current,{onPointerInTransitChange:c}=r,d=E.useCallback(()=>{a(null),c(!1)},[c]),h=E.useCallback((p,m)=>{const w=p.currentTarget,y={x:p.clientX,y:p.clientY},v=yW(y,w.getBoundingClientRect()),g=vW(y,v),x=wW(m.getBoundingClientRect()),S=bW([...g,...x]);a(S),c(!0)},[c]);return E.useEffect(()=>()=>d(),[d]),E.useEffect(()=>{if(l&&f){const p=w=>h(w,f),m=w=>h(w,l);return l.addEventListener(\"pointerleave\",p),f.addEventListener(\"pointerleave\",m),()=>{l.removeEventListener(\"pointerleave\",p),f.removeEventListener(\"pointerleave\",m)}}},[l,f,h,d]),E.useEffect(()=>{if(o){const p=m=>{const w=m.target,y={x:m.clientX,y:m.clientY},v=(l==null?void 0:l.contains(w))||(f==null?void 0:f.contains(w)),g=!xW(y,o);v?d():g&&(d(),u())};return document.addEventListener(\"pointermove\",p),()=>document.removeEventListener(\"pointermove\",p)}},[l,f,o,u,d]),b.jsx(gO,{...e,ref:s})}),[pW,mW]=ap(up,{isInside:!1}),gO=E.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,\"aria-label\":i,onEscapeKeyDown:s,onPointerDownOutside:o,...a}=e,l=cp(xa,n),u=lp(n),{onClose:f}=l;return E.useEffect(()=>(document.addEventListener(g0,f),()=>document.removeEventListener(g0,f)),[f]),E.useEffect(()=>{if(l.trigger){const c=d=>{const h=d.target;h!=null&&h.contains(l.trigger)&&f()};return window.addEventListener(\"scroll\",c,{capture:!0}),()=>window.removeEventListener(\"scroll\",c,{capture:!0})}},[l.trigger,f]),b.jsx(Vw,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:o,onFocusOutside:c=>c.preventDefault(),onDismiss:f,children:b.jsxs(J7,{\"data-state\":l.stateAttribute,...u,...a,ref:t,style:{...a.style,\"--radix-tooltip-content-transform-origin\":\"var(--radix-popper-transform-origin)\",\"--radix-tooltip-content-available-width\":\"var(--radix-popper-available-width)\",\"--radix-tooltip-content-available-height\":\"var(--radix-popper-available-height)\",\"--radix-tooltip-trigger-width\":\"var(--radix-popper-anchor-width)\",\"--radix-tooltip-trigger-height\":\"var(--radix-popper-anchor-height)\"},children:[b.jsx(BP,{children:r}),b.jsx(pW,{scope:n,isInside:!0,children:b.jsx(aW,{id:l.contentId,role:\"tooltip\",children:i||r})})]})})});mO.displayName=xa;var yO=\"TooltipArrow\",gW=E.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=lp(n);return mW(yO,n).isInside?null:b.jsx(eW,{...i,...r,ref:t})});gW.displayName=yO;function yW(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,i,s)){case s:return\"left\";case i:return\"right\";case n:return\"top\";case r:return\"bottom\";default:throw new Error(\"unreachable\")}}function vW(e,t,n=5){const r=[];switch(t){case\"top\":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case\"bottom\":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case\"left\":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case\"right\":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function wW(e){const{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function xW(e,t){const{x:n,y:r}=e;let i=!1;for(let s=0,o=t.length-1;s<t.length;o=s++){const a=t[s].x,l=t[s].y,u=t[o].x,f=t[o].y;l>r!=f>r&&n<(u-a)*(r-l)/(f-l)+a&&(i=!i)}return i}function bW(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),SW(t)}function SW(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const i=e[r];for(;t.length>=2;){const s=t[t.length-1],o=t[t.length-2];if((s.x-o.x)*(i.y-o.y)>=(s.y-o.y)*(i.x-o.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const i=e[r];for(;n.length>=2;){const s=n[n.length-1],o=n[n.length-2];if((s.x-o.x)*(i.y-o.y)>=(s.y-o.y)*(i.x-o.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var kW=dO,EW=hO,CW=pO,vO=mO;function wO(e){var t,n,r=\"\";if(typeof e==\"string\"||typeof e==\"number\")r+=e;else if(typeof e==\"object\")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=wO(e[t]))&&(r&&(r+=\" \"),r+=n)}else for(n in e)e[n]&&(r&&(r+=\" \"),r+=n);return r}function TW(){for(var e,t,n=0,r=\"\",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=wO(e))&&(r&&(r+=\" \"),r+=t);return r}const Qw=\"-\",_W=e=>{const t=NW(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const a=o.split(Qw);return a[0]===\"\"&&a.length!==1&&a.shift(),xO(a,t)||AW(o)},getConflictingClassGroupIds:(o,a)=>{const l=n[o]||[];return a&&r[o]?[...l,...r[o]]:l}}},xO=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?xO(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const s=e.join(Qw);return(o=t.validators.find(({validator:a})=>a(s)))==null?void 0:o.classGroupId},Gk=/^\\[(.+)\\]$/,AW=e=>{if(Gk.test(e)){const t=Gk.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(\":\"));if(n)return\"arbitrary..\"+n}},NW=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return OW(Object.entries(e.classGroups),n).forEach(([s,o])=>{v0(o,r,s,t)}),r},v0=(e,t,n,r)=>{e.forEach(i=>{if(typeof i==\"string\"){const s=i===\"\"?t:Xk(t,i);s.classGroupId=n;return}if(typeof i==\"function\"){if(PW(i)){v0(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([s,o])=>{v0(o,Xk(t,s),n,r)})})},Xk=(e,t)=>{let n=e;return t.split(Qw).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},PW=e=>e.isThemeGetter,OW=(e,t)=>t?e.map(([n,r])=>{const i=r.map(s=>typeof s==\"string\"?t+s:typeof s==\"object\"?Object.fromEntries(Object.entries(s).map(([o,a])=>[t+o,a])):s);return[n,i]}):e,LW=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(s,o)=>{n.set(s,o),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let o=n.get(s);if(o!==void 0)return o;if((o=r.get(s))!==void 0)return i(s,o),o},set(s,o){n.has(s)?n.set(s,o):i(s,o)}}},bO=\"!\",RW=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],s=t.length,o=a=>{const l=[];let u=0,f=0,c;for(let w=0;w<a.length;w++){let y=a[w];if(u===0){if(y===i&&(r||a.slice(w,w+s)===t)){l.push(a.slice(f,w)),f=w+s;continue}if(y===\"/\"){c=w;continue}}y===\"[\"?u++:y===\"]\"&&u--}const d=l.length===0?a:a.substring(f),h=d.startsWith(bO),p=h?d.substring(1):d,m=c&&c>f?c-f:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:m}};return n?a=>n({className:a,parseClassName:o}):o},IW=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]===\"[\"?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},DW=e=>({cache:LW(e.cacheSize),parseClassName:RW(e),..._W(e)}),MW=/\\s+/,jW=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,s=[],o=e.trim().split(MW);let a=\"\";for(let l=o.length-1;l>=0;l-=1){const u=o[l],{modifiers:f,hasImportantModifier:c,baseClassName:d,maybePostfixModifierPosition:h}=n(u);let p=!!h,m=r(p?d.substring(0,h):d);if(!m){if(!p){a=u+(a.length>0?\" \"+a:a);continue}if(m=r(d),!m){a=u+(a.length>0?\" \"+a:a);continue}p=!1}const w=IW(f).join(\":\"),y=c?w+bO:w,v=y+m;if(s.includes(v))continue;s.push(v);const g=i(m,p);for(let x=0;x<g.length;++x){const S=g[x];s.push(y+S)}a=u+(a.length>0?\" \"+a:a)}return a};function FW(){let e=0,t,n,r=\"\";for(;e<arguments.length;)(t=arguments[e++])&&(n=SO(t))&&(r&&(r+=\" \"),r+=n);return r}const SO=e=>{if(typeof e==\"string\")return e;let t,n=\"\";for(let r=0;r<e.length;r++)e[r]&&(t=SO(e[r]))&&(n&&(n+=\" \"),n+=t);return n};function $W(e,...t){let n,r,i,s=o;function o(l){const u=t.reduce((f,c)=>c(f),e());return n=DW(u),r=n.cache.get,i=n.cache.set,s=a,a(l)}function a(l){const u=r(l);if(u)return u;const f=jW(l,n);return i(l,f),f}return function(){return s(FW.apply(null,arguments))}}const je=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},kO=/^\\[(?:([a-z-]+):)?(.+)\\]$/i,BW=/^\\d+\\/\\d+$/,VW=new Set([\"px\",\"full\",\"screen\"]),zW=/^(\\d+(\\.\\d+)?)?(xs|sm|md|lg|xl)$/,UW=/\\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\\b(calc|min|max|clamp)\\(.+\\)|^0$/,HW=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\\(.+\\)$/,WW=/^(inset_)?-?((\\d+)?\\.?(\\d+)[a-z]+|0)_-?((\\d+)?\\.?(\\d+)[a-z]+|0)/,KW=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\\(.+\\)$/,Mr=e=>ea(e)||VW.has(e)||BW.test(e),yi=e=>Ua(e,\"length\",eK),ea=e=>!!e&&!Number.isNaN(Number(e)),Km=e=>Ua(e,\"number\",ea),fl=e=>!!e&&Number.isInteger(Number(e)),qW=e=>e.endsWith(\"%\")&&ea(e.slice(0,-1)),ve=e=>kO.test(e),vi=e=>zW.test(e),YW=new Set([\"length\",\"size\",\"percentage\"]),GW=e=>Ua(e,YW,EO),XW=e=>Ua(e,\"position\",EO),QW=new Set([\"image\",\"url\"]),ZW=e=>Ua(e,QW,nK),JW=e=>Ua(e,\"\",tK),dl=()=>!0,Ua=(e,t,n)=>{const r=kO.exec(e);return r?r[1]?typeof t==\"string\"?r[1]===t:t.has(r[1]):n(r[2]):!1},eK=e=>UW.test(e)&&!HW.test(e),EO=()=>!1,tK=e=>WW.test(e),nK=e=>KW.test(e),rK=()=>{const e=je(\"colors\"),t=je(\"spacing\"),n=je(\"blur\"),r=je(\"brightness\"),i=je(\"borderColor\"),s=je(\"borderRadius\"),o=je(\"borderSpacing\"),a=je(\"borderWidth\"),l=je(\"contrast\"),u=je(\"grayscale\"),f=je(\"hueRotate\"),c=je(\"invert\"),d=je(\"gap\"),h=je(\"gradientColorStops\"),p=je(\"gradientColorStopPositions\"),m=je(\"inset\"),w=je(\"margin\"),y=je(\"opacity\"),v=je(\"padding\"),g=je(\"saturate\"),x=je(\"scale\"),S=je(\"sepia\"),k=je(\"skew\"),C=je(\"space\"),T=je(\"translate\"),O=()=>[\"auto\",\"contain\",\"none\"],A=()=>[\"auto\",\"hidden\",\"clip\",\"visible\",\"scroll\"],j=()=>[\"auto\",ve,t],L=()=>[ve,t],B=()=>[\"\",Mr,yi],N=()=>[\"auto\",ea,ve],M=()=>[\"bottom\",\"center\",\"left\",\"left-bottom\",\"left-top\",\"right\",\"right-bottom\",\"right-top\",\"top\"],I=()=>[\"solid\",\"dashed\",\"dotted\",\"double\",\"none\"],F=()=>[\"normal\",\"multiply\",\"screen\",\"overlay\",\"darken\",\"lighten\",\"color-dodge\",\"color-burn\",\"hard-light\",\"soft-light\",\"difference\",\"exclusion\",\"hue\",\"saturation\",\"color\",\"luminosity\"],P=()=>[\"start\",\"end\",\"center\",\"between\",\"around\",\"evenly\",\"stretch\"],D=()=>[\"\",\"0\",ve],_=()=>[\"auto\",\"avoid\",\"all\",\"avoid-page\",\"page\",\"left\",\"right\",\"column\"],V=()=>[ea,ve];return{cacheSize:500,separator:\":\",theme:{colors:[dl],spacing:[Mr,yi],blur:[\"none\",\"\",vi,ve],brightness:V(),borderColor:[e],borderRadius:[\"none\",\"\",\"full\",vi,ve],borderSpacing:L(),borderWidth:B(),contrast:V(),grayscale:D(),hueRotate:V(),invert:D(),gap:L(),gradientColorStops:[e],gradientColorStopPositions:[qW,yi],inset:j(),margin:j(),opacity:V(),padding:L(),saturate:V(),scale:V(),sepia:D(),skew:V(),space:L(),translate:L()},classGroups:{aspect:[{aspect:[\"auto\",\"square\",\"video\",ve]}],container:[\"container\"],columns:[{columns:[vi]}],\"break-after\":[{\"break-after\":_()}],\"break-before\":[{\"break-before\":_()}],\"break-inside\":[{\"break-inside\":[\"auto\",\"avoid\",\"avoid-page\",\"avoid-column\"]}],\"box-decoration\":[{\"box-decoration\":[\"slice\",\"clone\"]}],box:[{box:[\"border\",\"content\"]}],display:[\"block\",\"inline-block\",\"inline\",\"flex\",\"inline-flex\",\"table\",\"inline-table\",\"table-caption\",\"table-cell\",\"table-column\",\"table-column-group\",\"table-footer-group\",\"table-header-group\",\"table-row-group\",\"table-row\",\"flow-root\",\"grid\",\"inline-grid\",\"contents\",\"list-item\",\"hidden\"],float:[{float:[\"right\",\"left\",\"none\",\"start\",\"end\"]}],clear:[{clear:[\"left\",\"right\",\"both\",\"none\",\"start\",\"end\"]}],isolation:[\"isolate\",\"isolation-auto\"],\"object-fit\":[{object:[\"contain\",\"cover\",\"fill\",\"none\",\"scale-down\"]}],\"object-position\":[{object:[...M(),ve]}],overflow:[{overflow:A()}],\"overflow-x\":[{\"overflow-x\":A()}],\"overflow-y\":[{\"overflow-y\":A()}],overscroll:[{overscroll:O()}],\"overscroll-x\":[{\"overscroll-x\":O()}],\"overscroll-y\":[{\"overscroll-y\":O()}],position:[\"static\",\"fixed\",\"absolute\",\"relative\",\"sticky\"],inset:[{inset:[m]}],\"inset-x\":[{\"inset-x\":[m]}],\"inset-y\":[{\"inset-y\":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:[\"visible\",\"invisible\",\"collapse\"],z:[{z:[\"auto\",fl,ve]}],basis:[{basis:j()}],\"flex-direction\":[{flex:[\"row\",\"row-reverse\",\"col\",\"col-reverse\"]}],\"flex-wrap\":[{flex:[\"wrap\",\"wrap-reverse\",\"nowrap\"]}],flex:[{flex:[\"1\",\"auto\",\"initial\",\"none\",ve]}],grow:[{grow:D()}],shrink:[{shrink:D()}],order:[{order:[\"first\",\"last\",\"none\",fl,ve]}],\"grid-cols\":[{\"grid-cols\":[dl]}],\"col-start-end\":[{col:[\"auto\",{span:[\"full\",fl,ve]},ve]}],\"col-start\":[{\"col-start\":N()}],\"col-end\":[{\"col-end\":N()}],\"grid-rows\":[{\"grid-rows\":[dl]}],\"row-start-end\":[{row:[\"auto\",{span:[fl,ve]},ve]}],\"row-start\":[{\"row-start\":N()}],\"row-end\":[{\"row-end\":N()}],\"grid-flow\":[{\"grid-flow\":[\"row\",\"col\",\"dense\",\"row-dense\",\"col-dense\"]}],\"auto-cols\":[{\"auto-cols\":[\"auto\",\"min\",\"max\",\"fr\",ve]}],\"auto-rows\":[{\"auto-rows\":[\"auto\",\"min\",\"max\",\"fr\",ve]}],gap:[{gap:[d]}],\"gap-x\":[{\"gap-x\":[d]}],\"gap-y\":[{\"gap-y\":[d]}],\"justify-content\":[{justify:[\"normal\",...P()]}],\"justify-items\":[{\"justify-items\":[\"start\",\"end\",\"center\",\"stretch\"]}],\"justify-self\":[{\"justify-self\":[\"auto\",\"start\",\"end\",\"center\",\"stretch\"]}],\"align-content\":[{content:[\"normal\",...P(),\"baseline\"]}],\"align-items\":[{items:[\"start\",\"end\",\"center\",\"baseline\",\"stretch\"]}],\"align-self\":[{self:[\"auto\",\"start\",\"end\",\"center\",\"stretch\",\"baseline\"]}],\"place-content\":[{\"place-content\":[...P(),\"baseline\"]}],\"place-items\":[{\"place-items\":[\"start\",\"end\",\"center\",\"baseline\",\"stretch\"]}],\"place-self\":[{\"place-self\":[\"auto\",\"start\",\"end\",\"center\",\"stretch\"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[w]}],mx:[{mx:[w]}],my:[{my:[w]}],ms:[{ms:[w]}],me:[{me:[w]}],mt:[{mt:[w]}],mr:[{mr:[w]}],mb:[{mb:[w]}],ml:[{ml:[w]}],\"space-x\":[{\"space-x\":[C]}],\"space-x-reverse\":[\"space-x-reverse\"],\"space-y\":[{\"space-y\":[C]}],\"space-y-reverse\":[\"space-y-reverse\"],w:[{w:[\"auto\",\"min\",\"max\",\"fit\",\"svw\",\"lvw\",\"dvw\",ve,t]}],\"min-w\":[{\"min-w\":[ve,t,\"min\",\"max\",\"fit\"]}],\"max-w\":[{\"max-w\":[ve,t,\"none\",\"full\",\"min\",\"max\",\"fit\",\"prose\",{screen:[vi]},vi]}],h:[{h:[ve,t,\"auto\",\"min\",\"max\",\"fit\",\"svh\",\"lvh\",\"dvh\"]}],\"min-h\":[{\"min-h\":[ve,t,\"min\",\"max\",\"fit\",\"svh\",\"lvh\",\"dvh\"]}],\"max-h\":[{\"max-h\":[ve,t,\"min\",\"max\",\"fit\",\"svh\",\"lvh\",\"dvh\"]}],size:[{size:[ve,t,\"auto\",\"min\",\"max\",\"fit\"]}],\"font-size\":[{text:[\"base\",vi,yi]}],\"font-smoothing\":[\"antialiased\",\"subpixel-antialiased\"],\"font-style\":[\"italic\",\"not-italic\"],\"font-weight\":[{font:[\"thin\",\"extralight\",\"light\",\"normal\",\"medium\",\"semibold\",\"bold\",\"extrabold\",\"black\",Km]}],\"font-family\":[{font:[dl]}],\"fvn-normal\":[\"normal-nums\"],\"fvn-ordinal\":[\"ordinal\"],\"fvn-slashed-zero\":[\"slashed-zero\"],\"fvn-figure\":[\"lining-nums\",\"oldstyle-nums\"],\"fvn-spacing\":[\"proportional-nums\",\"tabular-nums\"],\"fvn-fraction\":[\"diagonal-fractions\",\"stacked-fractons\"],tracking:[{tracking:[\"tighter\",\"tight\",\"normal\",\"wide\",\"wider\",\"widest\",ve]}],\"line-clamp\":[{\"line-clamp\":[\"none\",ea,Km]}],leading:[{leading:[\"none\",\"tight\",\"snug\",\"normal\",\"relaxed\",\"loose\",Mr,ve]}],\"list-image\":[{\"list-image\":[\"none\",ve]}],\"list-style-type\":[{list:[\"none\",\"disc\",\"decimal\",ve]}],\"list-style-position\":[{list:[\"inside\",\"outside\"]}],\"placeholder-color\":[{placeholder:[e]}],\"placeholder-opacity\":[{\"placeholder-opacity\":[y]}],\"text-alignment\":[{text:[\"left\",\"center\",\"right\",\"justify\",\"start\",\"end\"]}],\"text-color\":[{text:[e]}],\"text-opacity\":[{\"text-opacity\":[y]}],\"text-decoration\":[\"underline\",\"overline\",\"line-through\",\"no-underline\"],\"text-decoration-style\":[{decoration:[...I(),\"wavy\"]}],\"text-decoration-thickness\":[{decoration:[\"auto\",\"from-font\",Mr,yi]}],\"underline-offset\":[{\"underline-offset\":[\"auto\",Mr,ve]}],\"text-decoration-color\":[{decoration:[e]}],\"text-transform\":[\"uppercase\",\"lowercase\",\"capitalize\",\"normal-case\"],\"text-overflow\":[\"truncate\",\"text-ellipsis\",\"text-clip\"],\"text-wrap\":[{text:[\"wrap\",\"nowrap\",\"balance\",\"pretty\"]}],indent:[{indent:L()}],\"vertical-align\":[{align:[\"baseline\",\"top\",\"middle\",\"bottom\",\"text-top\",\"text-bottom\",\"sub\",\"super\",ve]}],whitespace:[{whitespace:[\"normal\",\"nowrap\",\"pre\",\"pre-line\",\"pre-wrap\",\"break-spaces\"]}],break:[{break:[\"normal\",\"words\",\"all\",\"keep\"]}],hyphens:[{hyphens:[\"none\",\"manual\",\"auto\"]}],content:[{content:[\"none\",ve]}],\"bg-attachment\":[{bg:[\"fixed\",\"local\",\"scroll\"]}],\"bg-clip\":[{\"bg-clip\":[\"border\",\"padding\",\"content\",\"text\"]}],\"bg-opacity\":[{\"bg-opacity\":[y]}],\"bg-origin\":[{\"bg-origin\":[\"border\",\"padding\",\"content\"]}],\"bg-position\":[{bg:[...M(),XW]}],\"bg-repeat\":[{bg:[\"no-repeat\",{repeat:[\"\",\"x\",\"y\",\"round\",\"space\"]}]}],\"bg-size\":[{bg:[\"auto\",\"cover\",\"contain\",GW]}],\"bg-image\":[{bg:[\"none\",{\"gradient-to\":[\"t\",\"tr\",\"r\",\"br\",\"b\",\"bl\",\"l\",\"tl\"]},ZW]}],\"bg-color\":[{bg:[e]}],\"gradient-from-pos\":[{from:[p]}],\"gradient-via-pos\":[{via:[p]}],\"gradient-to-pos\":[{to:[p]}],\"gradient-from\":[{from:[h]}],\"gradient-via\":[{via:[h]}],\"gradient-to\":[{to:[h]}],rounded:[{rounded:[s]}],\"rounded-s\":[{\"rounded-s\":[s]}],\"rounded-e\":[{\"rounded-e\":[s]}],\"rounded-t\":[{\"rounded-t\":[s]}],\"rounded-r\":[{\"rounded-r\":[s]}],\"rounded-b\":[{\"rounded-b\":[s]}],\"rounded-l\":[{\"rounded-l\":[s]}],\"rounded-ss\":[{\"rounded-ss\":[s]}],\"rounded-se\":[{\"rounded-se\":[s]}],\"rounded-ee\":[{\"rounded-ee\":[s]}],\"rounded-es\":[{\"rounded-es\":[s]}],\"rounded-tl\":[{\"rounded-tl\":[s]}],\"rounded-tr\":[{\"rounded-tr\":[s]}],\"rounded-br\":[{\"rounded-br\":[s]}],\"rounded-bl\":[{\"rounded-bl\":[s]}],\"border-w\":[{border:[a]}],\"border-w-x\":[{\"border-x\":[a]}],\"border-w-y\":[{\"border-y\":[a]}],\"border-w-s\":[{\"border-s\":[a]}],\"border-w-e\":[{\"border-e\":[a]}],\"border-w-t\":[{\"border-t\":[a]}],\"border-w-r\":[{\"border-r\":[a]}],\"border-w-b\":[{\"border-b\":[a]}],\"border-w-l\":[{\"border-l\":[a]}],\"border-opacity\":[{\"border-opacity\":[y]}],\"border-style\":[{border:[...I(),\"hidden\"]}],\"divide-x\":[{\"divide-x\":[a]}],\"divide-x-reverse\":[\"divide-x-reverse\"],\"divide-y\":[{\"divide-y\":[a]}],\"divide-y-reverse\":[\"divide-y-reverse\"],\"divide-opacity\":[{\"divide-opacity\":[y]}],\"divide-style\":[{divide:I()}],\"border-color\":[{border:[i]}],\"border-color-x\":[{\"border-x\":[i]}],\"border-color-y\":[{\"border-y\":[i]}],\"border-color-t\":[{\"border-t\":[i]}],\"border-color-r\":[{\"border-r\":[i]}],\"border-color-b\":[{\"border-b\":[i]}],\"border-color-l\":[{\"border-l\":[i]}],\"divide-color\":[{divide:[i]}],\"outline-style\":[{outline:[\"\",...I()]}],\"outline-offset\":[{\"outline-offset\":[Mr,ve]}],\"outline-w\":[{outline:[Mr,yi]}],\"outline-color\":[{outline:[e]}],\"ring-w\":[{ring:B()}],\"ring-w-inset\":[\"ring-inset\"],\"ring-color\":[{ring:[e]}],\"ring-opacity\":[{\"ring-opacity\":[y]}],\"ring-offset-w\":[{\"ring-offset\":[Mr,yi]}],\"ring-offset-color\":[{\"ring-offset\":[e]}],shadow:[{shadow:[\"\",\"inner\",\"none\",vi,JW]}],\"shadow-color\":[{shadow:[dl]}],opacity:[{opacity:[y]}],\"mix-blend\":[{\"mix-blend\":[...F(),\"plus-lighter\",\"plus-darker\"]}],\"bg-blend\":[{\"bg-blend\":F()}],filter:[{filter:[\"\",\"none\"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],\"drop-shadow\":[{\"drop-shadow\":[\"\",\"none\",vi,ve]}],grayscale:[{grayscale:[u]}],\"hue-rotate\":[{\"hue-rotate\":[f]}],invert:[{invert:[c]}],saturate:[{saturate:[g]}],sepia:[{sepia:[S]}],\"backdrop-filter\":[{\"backdrop-filter\":[\"\",\"none\"]}],\"backdrop-blur\":[{\"backdrop-blur\":[n]}],\"backdrop-brightness\":[{\"backdrop-brightness\":[r]}],\"backdrop-contrast\":[{\"backdrop-contrast\":[l]}],\"backdrop-grayscale\":[{\"backdrop-grayscale\":[u]}],\"backdrop-hue-rotate\":[{\"backdrop-hue-rotate\":[f]}],\"backdrop-invert\":[{\"backdrop-invert\":[c]}],\"backdrop-opacity\":[{\"backdrop-opacity\":[y]}],\"backdrop-saturate\":[{\"backdrop-saturate\":[g]}],\"backdrop-sepia\":[{\"backdrop-sepia\":[S]}],\"border-collapse\":[{border:[\"collapse\",\"separate\"]}],\"border-spacing\":[{\"border-spacing\":[o]}],\"border-spacing-x\":[{\"border-spacing-x\":[o]}],\"border-spacing-y\":[{\"border-spacing-y\":[o]}],\"table-layout\":[{table:[\"auto\",\"fixed\"]}],caption:[{caption:[\"top\",\"bottom\"]}],transition:[{transition:[\"none\",\"all\",\"\",\"colors\",\"opacity\",\"shadow\",\"transform\",ve]}],duration:[{duration:V()}],ease:[{ease:[\"linear\",\"in\",\"out\",\"in-out\",ve]}],delay:[{delay:V()}],animate:[{animate:[\"none\",\"spin\",\"ping\",\"pulse\",\"bounce\",ve]}],transform:[{transform:[\"\",\"gpu\",\"none\"]}],scale:[{scale:[x]}],\"scale-x\":[{\"scale-x\":[x]}],\"scale-y\":[{\"scale-y\":[x]}],rotate:[{rotate:[fl,ve]}],\"translate-x\":[{\"translate-x\":[T]}],\"translate-y\":[{\"translate-y\":[T]}],\"skew-x\":[{\"skew-x\":[k]}],\"skew-y\":[{\"skew-y\":[k]}],\"transform-origin\":[{origin:[\"center\",\"top\",\"top-right\",\"right\",\"bottom-right\",\"bottom\",\"bottom-left\",\"left\",\"top-left\",ve]}],accent:[{accent:[\"auto\",e]}],appearance:[{appearance:[\"none\",\"auto\"]}],cursor:[{cursor:[\"auto\",\"default\",\"pointer\",\"wait\",\"text\",\"move\",\"help\",\"not-allowed\",\"none\",\"context-menu\",\"progress\",\"cell\",\"crosshair\",\"vertical-text\",\"alias\",\"copy\",\"no-drop\",\"grab\",\"grabbing\",\"all-scroll\",\"col-resize\",\"row-resize\",\"n-resize\",\"e-resize\",\"s-resize\",\"w-resize\",\"ne-resize\",\"nw-resize\",\"se-resize\",\"sw-resize\",\"ew-resize\",\"ns-resize\",\"nesw-resize\",\"nwse-resize\",\"zoom-in\",\"zoom-out\",ve]}],\"caret-color\":[{caret:[e]}],\"pointer-events\":[{\"pointer-events\":[\"none\",\"auto\"]}],resize:[{resize:[\"none\",\"y\",\"x\",\"\"]}],\"scroll-behavior\":[{scroll:[\"auto\",\"smooth\"]}],\"scroll-m\":[{\"scroll-m\":L()}],\"scroll-mx\":[{\"scroll-mx\":L()}],\"scroll-my\":[{\"scroll-my\":L()}],\"scroll-ms\":[{\"scroll-ms\":L()}],\"scroll-me\":[{\"scroll-me\":L()}],\"scroll-mt\":[{\"scroll-mt\":L()}],\"scroll-mr\":[{\"scroll-mr\":L()}],\"scroll-mb\":[{\"scroll-mb\":L()}],\"scroll-ml\":[{\"scroll-ml\":L()}],\"scroll-p\":[{\"scroll-p\":L()}],\"scroll-px\":[{\"scroll-px\":L()}],\"scroll-py\":[{\"scroll-py\":L()}],\"scroll-ps\":[{\"scroll-ps\":L()}],\"scroll-pe\":[{\"scroll-pe\":L()}],\"scroll-pt\":[{\"scroll-pt\":L()}],\"scroll-pr\":[{\"scroll-pr\":L()}],\"scroll-pb\":[{\"scroll-pb\":L()}],\"scroll-pl\":[{\"scroll-pl\":L()}],\"snap-align\":[{snap:[\"start\",\"end\",\"center\",\"align-none\"]}],\"snap-stop\":[{snap:[\"normal\",\"always\"]}],\"snap-type\":[{snap:[\"none\",\"x\",\"y\",\"both\"]}],\"snap-strictness\":[{snap:[\"mandatory\",\"proximity\"]}],touch:[{touch:[\"auto\",\"none\",\"manipulation\"]}],\"touch-x\":[{\"touch-pan\":[\"x\",\"left\",\"right\"]}],\"touch-y\":[{\"touch-pan\":[\"y\",\"up\",\"down\"]}],\"touch-pz\":[\"touch-pinch-zoom\"],select:[{select:[\"none\",\"text\",\"all\",\"auto\"]}],\"will-change\":[{\"will-change\":[\"auto\",\"scroll\",\"contents\",\"transform\",ve]}],fill:[{fill:[e,\"none\"]}],\"stroke-w\":[{stroke:[Mr,yi,Km]}],stroke:[{stroke:[e,\"none\"]}],sr:[\"sr-only\",\"not-sr-only\"],\"forced-color-adjust\":[{\"forced-color-adjust\":[\"auto\",\"none\"]}]},conflictingClassGroups:{overflow:[\"overflow-x\",\"overflow-y\"],overscroll:[\"overscroll-x\",\"overscroll-y\"],inset:[\"inset-x\",\"inset-y\",\"start\",\"end\",\"top\",\"right\",\"bottom\",\"left\"],\"inset-x\":[\"right\",\"left\"],\"inset-y\":[\"top\",\"bottom\"],flex:[\"basis\",\"grow\",\"shrink\"],gap:[\"gap-x\",\"gap-y\"],p:[\"px\",\"py\",\"ps\",\"pe\",\"pt\",\"pr\",\"pb\",\"pl\"],px:[\"pr\",\"pl\"],py:[\"pt\",\"pb\"],m:[\"mx\",\"my\",\"ms\",\"me\",\"mt\",\"mr\",\"mb\",\"ml\"],mx:[\"mr\",\"ml\"],my:[\"mt\",\"mb\"],size:[\"w\",\"h\"],\"font-size\":[\"leading\"],\"fvn-normal\":[\"fvn-ordinal\",\"fvn-slashed-zero\",\"fvn-figure\",\"fvn-spacing\",\"fvn-fraction\"],\"fvn-ordinal\":[\"fvn-normal\"],\"fvn-slashed-zero\":[\"fvn-normal\"],\"fvn-figure\":[\"fvn-normal\"],\"fvn-spacing\":[\"fvn-normal\"],\"fvn-fraction\":[\"fvn-normal\"],\"line-clamp\":[\"display\",\"overflow\"],rounded:[\"rounded-s\",\"rounded-e\",\"rounded-t\",\"rounded-r\",\"rounded-b\",\"rounded-l\",\"rounded-ss\",\"rounded-se\",\"rounded-ee\",\"rounded-es\",\"rounded-tl\",\"rounded-tr\",\"rounded-br\",\"rounded-bl\"],\"rounded-s\":[\"rounded-ss\",\"rounded-es\"],\"rounded-e\":[\"rounded-se\",\"rounded-ee\"],\"rounded-t\":[\"rounded-tl\",\"rounded-tr\"],\"rounded-r\":[\"rounded-tr\",\"rounded-br\"],\"rounded-b\":[\"rounded-br\",\"rounded-bl\"],\"rounded-l\":[\"rounded-tl\",\"rounded-bl\"],\"border-spacing\":[\"border-spacing-x\",\"border-spacing-y\"],\"border-w\":[\"border-w-s\",\"border-w-e\",\"border-w-t\",\"border-w-r\",\"border-w-b\",\"border-w-l\"],\"border-w-x\":[\"border-w-r\",\"border-w-l\"],\"border-w-y\":[\"border-w-t\",\"border-w-b\"],\"border-color\":[\"border-color-t\",\"border-color-r\",\"border-color-b\",\"border-color-l\"],\"border-color-x\":[\"border-color-r\",\"border-color-l\"],\"border-color-y\":[\"border-color-t\",\"border-color-b\"],\"scroll-m\":[\"scroll-mx\",\"scroll-my\",\"scroll-ms\",\"scroll-me\",\"scroll-mt\",\"scroll-mr\",\"scroll-mb\",\"scroll-ml\"],\"scroll-mx\":[\"scroll-mr\",\"scroll-ml\"],\"scroll-my\":[\"scroll-mt\",\"scroll-mb\"],\"scroll-p\":[\"scroll-px\",\"scroll-py\",\"scroll-ps\",\"scroll-pe\",\"scroll-pt\",\"scroll-pr\",\"scroll-pb\",\"scroll-pl\"],\"scroll-px\":[\"scroll-pr\",\"scroll-pl\"],\"scroll-py\":[\"scroll-pt\",\"scroll-pb\"],touch:[\"touch-x\",\"touch-y\",\"touch-pz\"],\"touch-x\":[\"touch\"],\"touch-y\":[\"touch\"],\"touch-pz\":[\"touch\"]},conflictingClassGroupModifiers:{\"font-size\":[\"leading\"]}}},iK=$W(rK);function nt(...e){return iK(TW(e))}const hl=kW,pl=EW,ml=CW,vo=E.forwardRef(({className:e,sideOffset:t=4,...n},r)=>b.jsx(vO,{ref:r,sideOffset:t,className:nt(\"z-50 overflow-hidden rounded-md border border-neutral-200 bg-white px-3 py-1.5 text-sm text-neutral-950 shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50\",e),...n}));vo.displayName=vO.displayName;const sK=()=>{const[e,t]=E.useState(!1),[n,r]=E.useState(!1),i=()=>t(!e),s=()=>r(!n);return b.jsxs(u0.div,{className:\"h-screen bg-black text-[#ddd] border-r border-[#222] text-sm\",initial:{width:240},animate:{width:e?60:240},transition:{duration:.2},children:[b.jsxs(\"div\",{onClick:i,className:\"hover:bg-[#1a1a1a] cursor-pointer p-4 flex items-center justify-between\",children:[!e&&b.jsxs(\"h1\",{className:\"flex gap-2 items-center\",children:[b.jsx(Fk,{className:`w-4 h-4 text-[#bbb] transition-transform ${e?\"\":\"rotate-180\"}`}),\"Dashboard\"]}),b.jsx(hl,{children:b.jsxs(pl,{children:[b.jsx(ml,{asChild:!0,children:e&&b.jsx(\"button\",{className:\"p-2 rounded-full\",children:b.jsx(Fk,{className:\"w-4 h-4 text-[#bbb] transition-transform\"})})||b.jsx(\"div\",{className:\"h-8\"})}),b.jsx(vo,{children:b.jsxs(\"p\",{children:[e?\"Expand\":\"Collapse\",\" sidebar\"]})})]})})]}),b.jsxs(\"nav\",{className:\"mt-4\",children:[b.jsx(hl,{children:b.jsxs(pl,{children:[b.jsx(ml,{asChild:!0,children:b.jsxs(Kl,{to:\"/projects\",className:\"flex items-center p-3 hover:bg-[#1a1a1a]\",children:[b.jsx(SH,{className:\"w-3 h-3 text-[#bbb]\"}),!e&&b.jsx(\"span\",{className:\"ml-3\",children:\"Projects\"})]})}),b.jsx(vo,{children:b.jsx(\"p\",{children:\"View Projects\"})})]})}),!e&&b.jsxs(\"div\",{children:[b.jsx(hl,{children:b.jsxs(pl,{children:[b.jsx(ml,{asChild:!0,children:b.jsxs(\"button\",{onClick:s,className:\"w-full flex items-center justify-between p-3 hover:bg-[#1a1a1a]\",children:[b.jsxs(\"div\",{className:\"flex items-center\",children:[b.jsx(EH,{className:\"w-3 h-3 text-[#bbb]\"}),!e&&b.jsx(\"span\",{className:\"ml-3\",children:\"Playground\"})]}),!e&&b.jsx(yH,{className:`w-3 h-3 transition-transform ${n?\"rotate-180\":\"\"}`})]})}),b.jsx(vo,{children:b.jsxs(\"p\",{children:[n?\"Close\":\"Open\",\" Playground\"]})})]})}),n&&!e&&b.jsx(hl,{children:b.jsxs(pl,{children:[b.jsx(ml,{asChild:!0,children:b.jsxs(Kl,{to:\"/playground/designer\",className:\"flex items-center p-3 pl-6 hover:bg-[#1a1a1a]\",children:[b.jsx(TH,{className:\"w-3 h-3 text-[#bbb]\"}),b.jsx(\"span\",{className:\"ml-3\",children:\"Component Designer\"})]})}),b.jsx(vo,{children:b.jsx(\"p\",{children:\"Open Component Designer\"})})]})})]}),b.jsx(hl,{children:b.jsxs(pl,{children:[b.jsx(ml,{asChild:!0,children:b.jsxs(Kl,{to:\"/settings\",className:\"flex items-center p-3 hover:bg-[#1a1a1a]\",children:[b.jsx(xH,{className:\"w-3 h-3 text-[#bbb]\"}),!e&&b.jsx(\"span\",{className:\"ml-3\",children:\"Settings\"})]})}),b.jsx(vo,{children:b.jsx(\"p\",{children:\"Open Settings\"})})]})})]})]})};var hc=e=>e.type===\"checkbox\",$o=e=>e instanceof Date,jt=e=>e==null;const CO=e=>typeof e==\"object\";var lt=e=>!jt(e)&&!Array.isArray(e)&&CO(e)&&!$o(e),TO=e=>lt(e)&&e.target?hc(e.target)?e.target.checked:e.target.value:e,oK=e=>e.substring(0,e.search(/\\.\\d+(\\.|$)/))||e,_O=(e,t)=>e.has(oK(t)),aK=e=>{const t=e.constructor&&e.constructor.prototype;return lt(t)&&t.hasOwnProperty(\"isPrototypeOf\")},Zw=typeof window<\"u\"&&typeof window.HTMLElement<\"u\"&&typeof document<\"u\";function Yt(e){let t;const n=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(Zw&&(e instanceof Blob||e instanceof FileList))&&(n||lt(e)))if(t=n?[]:{},!n&&!aK(e))t=e;else for(const r in e)e.hasOwnProperty(r)&&(t[r]=Yt(e[r]));else return e;return t}var fp=e=>Array.isArray(e)?e.filter(Boolean):[],Ze=e=>e===void 0,te=(e,t,n)=>{if(!t||!lt(e))return n;const r=fp(t.split(/[,[\\].]+?/)).reduce((i,s)=>jt(i)?i:i[s],e);return Ze(r)||r===e?Ze(e[t])?n:e[t]:r},Nn=e=>typeof e==\"boolean\",Jw=e=>/^\\w*$/.test(e),AO=e=>fp(e.replace(/[\"|']|\\]/g,\"\").split(/\\.|\\[/)),Le=(e,t,n)=>{let r=-1;const i=Jw(t)?[t]:AO(t),s=i.length,o=s-1;for(;++r<s;){const a=i[r];let l=n;if(r!==o){const u=e[a];l=lt(u)||Array.isArray(u)?u:isNaN(+i[r+1])?{}:[]}if(a===\"__proto__\")return;e[a]=l,e=e[a]}return e};const Zd={BLUR:\"blur\",FOCUS_OUT:\"focusout\",CHANGE:\"change\"},Jn={onBlur:\"onBlur\",onChange:\"onChange\",onSubmit:\"onSubmit\",onTouched:\"onTouched\",all:\"all\"},jr={max:\"max\",min:\"min\",maxLength:\"maxLength\",minLength:\"minLength\",pattern:\"pattern\",required:\"required\",validate:\"validate\"},NO=we.createContext(null),dp=()=>we.useContext(NO),lK=e=>{const{children:t,...n}=e;return we.createElement(NO.Provider,{value:n},t)};var PO=(e,t,n,r=!0)=>{const i={defaultValues:t._defaultValues};for(const s in e)Object.defineProperty(i,s,{get:()=>{const o=s;return t._proxyFormState[o]!==Jn.all&&(t._proxyFormState[o]=!r||Jn.all),n&&(n[o]=!0),e[o]}});return i},Gt=e=>lt(e)&&!Object.keys(e).length,OO=(e,t,n,r)=>{n(e);const{name:i,...s}=e;return Gt(s)||Object.keys(s).length>=Object.keys(t).length||Object.keys(s).find(o=>t[o]===(!r||Jn.all))},Zl=e=>Array.isArray(e)?e:[e],LO=(e,t,n)=>!e||!t||e===t||Zl(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r)));function ex(e){const t=we.useRef(e);t.current=e,we.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}function uK(e){const t=dp(),{control:n=t.control,disabled:r,name:i,exact:s}=e||{},[o,a]=we.useState(n._formState),l=we.useRef(!0),u=we.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),f=we.useRef(i);return f.current=i,ex({disabled:r,next:c=>l.current&&LO(f.current,c.name,s)&&OO(c,u.current,n._updateFormState)&&a({...n._formState,...c}),subject:n._subjects.state}),we.useEffect(()=>(l.current=!0,u.current.isValid&&n._updateValid(!0),()=>{l.current=!1}),[n]),PO(o,n,u.current,!1)}var xr=e=>typeof e==\"string\",RO=(e,t,n,r,i)=>xr(e)?(r&&t.watch.add(e),te(n,e,i)):Array.isArray(e)?e.map(s=>(r&&t.watch.add(s),te(n,s))):(r&&(t.watchAll=!0),n);function cK(e){const t=dp(),{control:n=t.control,name:r,defaultValue:i,disabled:s,exact:o}=e||{},a=we.useRef(r);a.current=r,ex({disabled:s,subject:n._subjects.values,next:f=>{LO(a.current,f.name,o)&&u(Yt(RO(a.current,n._names,f.values||n._formValues,!1,i)))}});const[l,u]=we.useState(n._getWatch(r,i));return we.useEffect(()=>n._removeUnmounted()),l}function fK(e){const t=dp(),{name:n,disabled:r,control:i=t.control,shouldUnregister:s}=e,o=_O(i._names.array,n),a=cK({control:i,name:n,defaultValue:te(i._formValues,n,te(i._defaultValues,n,e.defaultValue)),exact:!0}),l=uK({control:i,name:n,exact:!0}),u=we.useRef(i.register(n,{...e.rules,value:a,...Nn(e.disabled)?{disabled:e.disabled}:{}}));return we.useEffect(()=>{const f=i._options.shouldUnregister||s,c=(d,h)=>{const p=te(i._fields,d);p&&p._f&&(p._f.mount=h)};if(c(n,!0),f){const d=Yt(te(i._options.defaultValues,n));Le(i._defaultValues,n,d),Ze(te(i._formValues,n))&&Le(i._formValues,n,d)}return()=>{(o?f&&!i._state.action:f)?i.unregister(n):c(n,!1)}},[n,i,o,s]),we.useEffect(()=>{te(i._fields,n)&&i._updateDisabledField({disabled:r,fields:i._fields,name:n,value:te(i._fields,n)._f.value})},[r,n,i]),{field:{name:n,value:a,...Nn(r)||l.disabled?{disabled:l.disabled||r}:{},onChange:we.useCallback(f=>u.current.onChange({target:{value:TO(f),name:n},type:Zd.CHANGE}),[n]),onBlur:we.useCallback(()=>u.current.onBlur({target:{value:te(i._formValues,n),name:n},type:Zd.BLUR}),[n,i]),ref:we.useCallback(f=>{const c=te(i._fields,n);c&&f&&(c._f.ref={focus:()=>f.focus(),select:()=>f.select(),setCustomValidity:d=>f.setCustomValidity(d),reportValidity:()=>f.reportValidity()})},[i._fields,n])},formState:l,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!te(l.errors,n)},isDirty:{enumerable:!0,get:()=>!!te(l.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!te(l.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!te(l.validatingFields,n)},error:{enumerable:!0,get:()=>te(l.errors,n)}})}}const dK=e=>e.render(fK(e));var hK=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},Qk=e=>({isOnSubmit:!e||e===Jn.onSubmit,isOnBlur:e===Jn.onBlur,isOnChange:e===Jn.onChange,isOnAll:e===Jn.all,isOnTouch:e===Jn.onTouched}),Zk=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\\.\\w+/.test(e.slice(r.length))));const Jl=(e,t,n,r)=>{for(const i of n||Object.keys(e)){const s=te(e,i);if(s){const{_f:o,...a}=s;if(o){if(o.refs&&o.refs[0]&&t(o.refs[0],i)&&!r)return!0;if(o.ref&&t(o.ref,o.name)&&!r)return!0;if(Jl(a,t))break}else if(lt(a)&&Jl(a,t))break}}};var pK=(e,t,n)=>{const r=Zl(te(e,n));return Le(r,\"root\",t[n]),Le(e,n,r),e},tx=e=>e.type===\"file\",Wr=e=>typeof e==\"function\",Jd=e=>{if(!Zw)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Uf=e=>xr(e),nx=e=>e.type===\"radio\",eh=e=>e instanceof RegExp;const Jk={value:!1,isValid:!1},eE={value:!0,isValid:!0};var IO=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Ze(e[0].attributes.value)?Ze(e[0].value)||e[0].value===\"\"?eE:{value:e[0].value,isValid:!0}:eE:Jk}return Jk};const tE={isValid:!1,value:null};var DO=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,tE):tE;function nE(e,t,n=\"validate\"){if(Uf(e)||Array.isArray(e)&&e.every(Uf)||Nn(e)&&!e)return{type:n,message:Uf(e)?e:\"\",ref:t}}var lo=e=>lt(e)&&!eh(e)?e:{value:e,message:\"\"},rE=async(e,t,n,r,i)=>{const{ref:s,refs:o,required:a,maxLength:l,minLength:u,min:f,max:c,pattern:d,validate:h,name:p,valueAsNumber:m,mount:w,disabled:y}=e._f,v=te(t,p);if(!w||y)return{};const g=o?o[0]:s,x=L=>{r&&g.reportValidity&&(g.setCustomValidity(Nn(L)?\"\":L||\"\"),g.reportValidity())},S={},k=nx(s),C=hc(s),T=k||C,O=(m||tx(s))&&Ze(s.value)&&Ze(v)||Jd(s)&&s.value===\"\"||v===\"\"||Array.isArray(v)&&!v.length,A=hK.bind(null,p,n,S),j=(L,B,N,M=jr.maxLength,I=jr.minLength)=>{const F=L?B:N;S[p]={type:L?M:I,message:F,ref:s,...A(L?M:I,F)}};if(i?!Array.isArray(v)||!v.length:a&&(!T&&(O||jt(v))||Nn(v)&&!v||C&&!IO(o).isValid||k&&!DO(o).isValid)){const{value:L,message:B}=Uf(a)?{value:!!a,message:a}:lo(a);if(L&&(S[p]={type:jr.required,message:B,ref:g,...A(jr.required,B)},!n))return x(B),S}if(!O&&(!jt(f)||!jt(c))){let L,B;const N=lo(c),M=lo(f);if(!jt(v)&&!isNaN(v)){const I=s.valueAsNumber||v&&+v;jt(N.value)||(L=I>N.value),jt(M.value)||(B=I<M.value)}else{const I=s.valueAsDate||new Date(v),F=_=>new Date(new Date().toDateString()+\" \"+_),P=s.type==\"time\",D=s.type==\"week\";xr(N.value)&&v&&(L=P?F(v)>F(N.value):D?v>N.value:I>new Date(N.value)),xr(M.value)&&v&&(B=P?F(v)<F(M.value):D?v<M.value:I<new Date(M.value))}if((L||B)&&(j(!!L,N.message,M.message,jr.max,jr.min),!n))return x(S[p].message),S}if((l||u)&&!O&&(xr(v)||i&&Array.isArray(v))){const L=lo(l),B=lo(u),N=!jt(L.value)&&v.length>+L.value,M=!jt(B.value)&&v.length<+B.value;if((N||M)&&(j(N,L.message,B.message),!n))return x(S[p].message),S}if(d&&!O&&xr(v)){const{value:L,message:B}=lo(d);if(eh(L)&&!v.match(L)&&(S[p]={type:jr.pattern,message:B,ref:s,...A(jr.pattern,B)},!n))return x(B),S}if(h){if(Wr(h)){const L=await h(v,t),B=nE(L,g);if(B&&(S[p]={...B,...A(jr.validate,B.message)},!n))return x(B.message),S}else if(lt(h)){let L={};for(const B in h){if(!Gt(L)&&!n)break;const N=nE(await h[B](v,t),g,B);N&&(L={...N,...A(B,N.message)},x(N.message),n&&(S[p]=L))}if(!Gt(L)&&(S[p]={ref:g,...L},!n))return S}}return x(!0),S};function mK(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=Ze(e)?r++:e[t[r++]];return e}function gK(e){for(const t in e)if(e.hasOwnProperty(t)&&!Ze(e[t]))return!1;return!0}function ft(e,t){const n=Array.isArray(t)?t:Jw(t)?[t]:AO(t),r=n.length===1?e:mK(e,n),i=n.length-1,s=n[i];return r&&delete r[s],i!==0&&(lt(r)&&Gt(r)||Array.isArray(r)&&gK(r))&&ft(e,n.slice(0,-1)),e}var qm=()=>{let e=[];return{get observers(){return e},next:i=>{for(const s of e)s.next&&s.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(s=>s!==i)}}),unsubscribe:()=>{e=[]}}},th=e=>jt(e)||!CO(e);function Ni(e,t){if(th(e)||th(t))return e===t;if($o(e)&&$o(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const i of n){const s=e[i];if(!r.includes(i))return!1;if(i!==\"ref\"){const o=t[i];if($o(s)&&$o(o)||lt(s)&&lt(o)||Array.isArray(s)&&Array.isArray(o)?!Ni(s,o):s!==o)return!1}}return!0}var MO=e=>e.type===\"select-multiple\",yK=e=>nx(e)||hc(e),Ym=e=>Jd(e)&&e.isConnected,jO=e=>{for(const t in e)if(Wr(e[t]))return!0;return!1};function nh(e,t={}){const n=Array.isArray(e);if(lt(e)||n)for(const r in e)Array.isArray(e[r])||lt(e[r])&&!jO(e[r])?(t[r]=Array.isArray(e[r])?[]:{},nh(e[r],t[r])):jt(e[r])||(t[r]=!0);return t}function FO(e,t,n){const r=Array.isArray(e);if(lt(e)||r)for(const i in e)Array.isArray(e[i])||lt(e[i])&&!jO(e[i])?Ze(t)||th(n[i])?n[i]=Array.isArray(e[i])?nh(e[i],[]):{...nh(e[i])}:FO(e[i],jt(t)?{}:t[i],n[i]):n[i]=!Ni(e[i],t[i]);return n}var Qc=(e,t)=>FO(e,t,nh(t)),$O=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>Ze(e)?e:t?e===\"\"?NaN:e&&+e:n&&xr(e)?new Date(e):r?r(e):e;function Gm(e){const t=e.ref;if(!(e.refs?e.refs.every(n=>n.disabled):t.disabled))return tx(t)?t.files:nx(t)?DO(e.refs).value:MO(t)?[...t.selectedOptions].map(({value:n})=>n):hc(t)?IO(e.refs).value:$O(Ze(t.value)?e.ref.value:t.value,e)}var vK=(e,t,n,r)=>{const i={};for(const s of e){const o=te(t,s);o&&Le(i,s,o._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}},gl=e=>Ze(e)?e:eh(e)?e.source:lt(e)?eh(e.value)?e.value.source:e.value:e;const iE=\"AsyncFunction\";var wK=e=>(!e||!e.validate)&&!!(Wr(e.validate)&&e.validate.constructor.name===iE||lt(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===iE)),xK=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function sE(e,t,n){const r=te(e,n);if(r||Jw(n))return{error:r,name:n};const i=n.split(\".\");for(;i.length;){const s=i.join(\".\"),o=te(t,s),a=te(e,s);if(o&&!Array.isArray(o)&&n!==s)return{name:n};if(a&&a.type)return{name:s,error:a};i.pop()}return{name:n}}var bK=(e,t,n,r,i)=>i.isOnAll?!1:!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:(n?r.isOnChange:i.isOnChange)?e:!0,SK=(e,t)=>!fp(te(e,t)).length&&ft(e,t);const kK={mode:Jn.onSubmit,reValidateMode:Jn.onChange,shouldFocusError:!0};function EK(e={}){let t={...kK,...e},n={submitCount:0,isDirty:!1,isLoading:Wr(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},i=lt(t.defaultValues)||lt(t.values)?Yt(t.defaultValues||t.values)||{}:{},s=t.shouldUnregister?{}:Yt(i),o={action:!1,mount:!1,watch:!1},a={mount:new Set,unMount:new Set,array:new Set,watch:new Set},l,u=0;const f={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},c={values:qm(),array:qm(),state:qm()},d=Qk(t.mode),h=Qk(t.reValidateMode),p=t.criteriaMode===Jn.all,m=$=>z=>{clearTimeout(u),u=setTimeout($,z)},w=async $=>{if(f.isValid||$){const z=t.resolver?Gt((await T()).errors):await A(r,!0);z!==n.isValid&&c.state.next({isValid:z})}},y=($,z)=>{(f.isValidating||f.validatingFields)&&(($||Array.from(a.mount)).forEach(H=>{H&&(z?Le(n.validatingFields,H,z):ft(n.validatingFields,H))}),c.state.next({validatingFields:n.validatingFields,isValidating:!Gt(n.validatingFields)}))},v=($,z=[],H,ne,ee=!0,X=!0)=>{if(ne&&H){if(o.action=!0,X&&Array.isArray(te(r,$))){const ae=H(te(r,$),ne.argA,ne.argB);ee&&Le(r,$,ae)}if(X&&Array.isArray(te(n.errors,$))){const ae=H(te(n.errors,$),ne.argA,ne.argB);ee&&Le(n.errors,$,ae),SK(n.errors,$)}if(f.touchedFields&&X&&Array.isArray(te(n.touchedFields,$))){const ae=H(te(n.touchedFields,$),ne.argA,ne.argB);ee&&Le(n.touchedFields,$,ae)}f.dirtyFields&&(n.dirtyFields=Qc(i,s)),c.state.next({name:$,isDirty:L($,z),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Le(s,$,z)},g=($,z)=>{Le(n.errors,$,z),c.state.next({errors:n.errors})},x=$=>{n.errors=$,c.state.next({errors:n.errors,isValid:!1})},S=($,z,H,ne)=>{const ee=te(r,$);if(ee){const X=te(s,$,Ze(H)?te(i,$):H);Ze(X)||ne&&ne.defaultChecked||z?Le(s,$,z?X:Gm(ee._f)):M($,X),o.mount&&w()}},k=($,z,H,ne,ee)=>{let X=!1,ae=!1;const xe={name:$},U=!!(te(r,$)&&te(r,$)._f&&te(r,$)._f.disabled);if(!H||ne){f.isDirty&&(ae=n.isDirty,n.isDirty=xe.isDirty=L(),X=ae!==xe.isDirty);const K=U||Ni(te(i,$),z);ae=!!(!U&&te(n.dirtyFields,$)),K||U?ft(n.dirtyFields,$):Le(n.dirtyFields,$,!0),xe.dirtyFields=n.dirtyFields,X=X||f.dirtyFields&&ae!==!K}if(H){const K=te(n.touchedFields,$);K||(Le(n.touchedFields,$,H),xe.touchedFields=n.touchedFields,X=X||f.touchedFields&&K!==H)}return X&&ee&&c.state.next(xe),X?xe:{}},C=($,z,H,ne)=>{const ee=te(n.errors,$),X=f.isValid&&Nn(z)&&n.isValid!==z;if(e.delayError&&H?(l=m(()=>g($,H)),l(e.delayError)):(clearTimeout(u),l=null,H?Le(n.errors,$,H):ft(n.errors,$)),(H?!Ni(ee,H):ee)||!Gt(ne)||X){const ae={...ne,...X&&Nn(z)?{isValid:z}:{},errors:n.errors,name:$};n={...n,...ae},c.state.next(ae)}},T=async $=>{y($,!0);const z=await t.resolver(s,t.context,vK($||a.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return y($),z},O=async $=>{const{errors:z}=await T($);if($)for(const H of $){const ne=te(z,H);ne?Le(n.errors,H,ne):ft(n.errors,H)}else n.errors=z;return z},A=async($,z,H={valid:!0})=>{for(const ne in $){const ee=$[ne];if(ee){const{_f:X,...ae}=ee;if(X){const xe=a.array.has(X.name),U=ee._f&&wK(ee._f);U&&f.validatingFields&&y([ne],!0);const K=await rE(ee,s,p,t.shouldUseNativeValidation&&!z,xe);if(U&&f.validatingFields&&y([ne]),K[X.name]&&(H.valid=!1,z))break;!z&&(te(K,X.name)?xe?pK(n.errors,K,X.name):Le(n.errors,X.name,K[X.name]):ft(n.errors,X.name))}!Gt(ae)&&await A(ae,z,H)}}return H.valid},j=()=>{for(const $ of a.unMount){const z=te(r,$);z&&(z._f.refs?z._f.refs.every(H=>!Ym(H)):!Ym(z._f.ref))&&Y($)}a.unMount=new Set},L=($,z)=>($&&z&&Le(s,$,z),!Ni(V(),i)),B=($,z,H)=>RO($,a,{...o.mount?s:Ze(z)?i:xr($)?{[$]:z}:z},H,z),N=$=>fp(te(o.mount?s:i,$,e.shouldUnregister?te(i,$,[]):[])),M=($,z,H={})=>{const ne=te(r,$);let ee=z;if(ne){const X=ne._f;X&&(!X.disabled&&Le(s,$,$O(z,X)),ee=Jd(X.ref)&&jt(z)?\"\":z,MO(X.ref)?[...X.ref.options].forEach(ae=>ae.selected=ee.includes(ae.value)):X.refs?hc(X.ref)?X.refs.length>1?X.refs.forEach(ae=>(!ae.defaultChecked||!ae.disabled)&&(ae.checked=Array.isArray(ee)?!!ee.find(xe=>xe===ae.value):ee===ae.value)):X.refs[0]&&(X.refs[0].checked=!!ee):X.refs.forEach(ae=>ae.checked=ae.value===ee):tx(X.ref)?X.ref.value=\"\":(X.ref.value=ee,X.ref.type||c.values.next({name:$,values:{...s}})))}(H.shouldDirty||H.shouldTouch)&&k($,ee,H.shouldTouch,H.shouldDirty,!0),H.shouldValidate&&_($)},I=($,z,H)=>{for(const ne in z){const ee=z[ne],X=`${$}.${ne}`,ae=te(r,X);(a.array.has($)||!th(ee)||ae&&!ae._f)&&!$o(ee)?I(X,ee,H):M(X,ee,H)}},F=($,z,H={})=>{const ne=te(r,$),ee=a.array.has($),X=Yt(z);Le(s,$,X),ee?(c.array.next({name:$,values:{...s}}),(f.isDirty||f.dirtyFields)&&H.shouldDirty&&c.state.next({name:$,dirtyFields:Qc(i,s),isDirty:L($,X)})):ne&&!ne._f&&!jt(X)?I($,X,H):M($,X,H),Zk($,a)&&c.state.next({...n}),c.values.next({name:o.mount?$:void 0,values:{...s}})},P=async $=>{o.mount=!0;const z=$.target;let H=z.name,ne=!0;const ee=te(r,H),X=()=>z.type?Gm(ee._f):TO($),ae=xe=>{ne=Number.isNaN(xe)||Ni(xe,te(s,H,xe))};if(ee){let xe,U;const K=X(),ce=$.type===Zd.BLUR||$.type===Zd.FOCUS_OUT,ye=!xK(ee._f)&&!t.resolver&&!te(n.errors,H)&&!ee._f.deps||bK(ce,te(n.touchedFields,H),n.isSubmitted,h,d),_e=Zk(H,a,ce);Le(s,H,K),ce?(ee._f.onBlur&&ee._f.onBlur($),l&&l(0)):ee._f.onChange&&ee._f.onChange($);const yt=k(H,K,ce,!1),Un=!Gt(yt)||_e;if(!ce&&c.values.next({name:H,type:$.type,values:{...s}}),ye)return f.isValid&&(e.mode===\"onBlur\"?ce&&w():w()),Un&&c.state.next({name:H,..._e?{}:yt});if(!ce&&_e&&c.state.next({...n}),t.resolver){const{errors:Wt}=await T([H]);if(ae(K),ne){const Dr=sE(n.errors,r,H),hr=sE(Wt,r,Dr.name||H);xe=hr.error,H=hr.name,U=Gt(Wt)}}else y([H],!0),xe=(await rE(ee,s,p,t.shouldUseNativeValidation))[H],y([H]),ae(K),ne&&(xe?U=!1:f.isValid&&(U=await A(r,!0)));ne&&(ee._f.deps&&_(ee._f.deps),C(H,U,xe,yt))}},D=($,z)=>{if(te(n.errors,z)&&$.focus)return $.focus(),1},_=async($,z={})=>{let H,ne;const ee=Zl($);if(t.resolver){const X=await O(Ze($)?$:ee);H=Gt(X),ne=$?!ee.some(ae=>te(X,ae)):H}else $?(ne=(await Promise.all(ee.map(async X=>{const ae=te(r,X);return await A(ae&&ae._f?{[X]:ae}:ae)}))).every(Boolean),!(!ne&&!n.isValid)&&w()):ne=H=await A(r);return c.state.next({...!xr($)||f.isValid&&H!==n.isValid?{}:{name:$},...t.resolver||!$?{isValid:H}:{},errors:n.errors}),z.shouldFocus&&!ne&&Jl(r,D,$?ee:a.mount),ne},V=$=>{const z={...o.mount?s:i};return Ze($)?z:xr($)?te(z,$):$.map(H=>te(z,H))},W=($,z)=>({invalid:!!te((z||n).errors,$),isDirty:!!te((z||n).dirtyFields,$),error:te((z||n).errors,$),isValidating:!!te(n.validatingFields,$),isTouched:!!te((z||n).touchedFields,$)}),R=$=>{$&&Zl($).forEach(z=>ft(n.errors,z)),c.state.next({errors:$?n.errors:{}})},q=($,z,H)=>{const ne=(te(r,$,{_f:{}})._f||{}).ref,ee=te(n.errors,$)||{},{ref:X,message:ae,type:xe,...U}=ee;Le(n.errors,$,{...U,...z,ref:ne}),c.state.next({name:$,errors:n.errors,isValid:!1}),H&&H.shouldFocus&&ne&&ne.focus&&ne.focus()},J=($,z)=>Wr($)?c.values.subscribe({next:H=>$(B(void 0,z),H)}):B($,z,!0),Y=($,z={})=>{for(const H of $?Zl($):a.mount)a.mount.delete(H),a.array.delete(H),z.keepValue||(ft(r,H),ft(s,H)),!z.keepError&&ft(n.errors,H),!z.keepDirty&&ft(n.dirtyFields,H),!z.keepTouched&&ft(n.touchedFields,H),!z.keepIsValidating&&ft(n.validatingFields,H),!t.shouldUnregister&&!z.keepDefaultValue&&ft(i,H);c.values.next({values:{...s}}),c.state.next({...n,...z.keepDirty?{isDirty:L()}:{}}),!z.keepIsValid&&w()},re=({disabled:$,name:z,field:H,fields:ne,value:ee})=>{if(Nn($)&&o.mount||$){const X=$?void 0:Ze(ee)?Gm(H?H._f:te(ne,z)._f):ee;Le(s,z,X),k(z,X,!1,!1,!0)}},G=($,z={})=>{let H=te(r,$);const ne=Nn(z.disabled)||Nn(e.disabled);return Le(r,$,{...H||{},_f:{...H&&H._f?H._f:{ref:{name:$}},name:$,mount:!0,...z}}),a.mount.add($),H?re({field:H,disabled:Nn(z.disabled)?z.disabled:e.disabled,name:$,value:z.value}):S($,!0,z.value),{...ne?{disabled:z.disabled||e.disabled}:{},...t.progressive?{required:!!z.required,min:gl(z.min),max:gl(z.max),minLength:gl(z.minLength),maxLength:gl(z.maxLength),pattern:gl(z.pattern)}:{},name:$,onChange:P,onBlur:P,ref:ee=>{if(ee){G($,z),H=te(r,$);const X=Ze(ee.value)&&ee.querySelectorAll&&ee.querySelectorAll(\"input,select,textarea\")[0]||ee,ae=yK(X),xe=H._f.refs||[];if(ae?xe.find(U=>U===X):X===H._f.ref)return;Le(r,$,{_f:{...H._f,...ae?{refs:[...xe.filter(Ym),X,...Array.isArray(te(i,$))?[{}]:[]],ref:{type:X.type,name:$}}:{ref:X}}}),S($,!1,void 0,X)}else H=te(r,$,{}),H._f&&(H._f.mount=!1),(t.shouldUnregister||z.shouldUnregister)&&!(_O(a.array,$)&&o.action)&&a.unMount.add($)}}},le=()=>t.shouldFocusError&&Jl(r,D,a.mount),de=$=>{Nn($)&&(c.state.next({disabled:$}),Jl(r,(z,H)=>{const ne=te(r,H);ne&&(z.disabled=ne._f.disabled||$,Array.isArray(ne._f.refs)&&ne._f.refs.forEach(ee=>{ee.disabled=ne._f.disabled||$}))},0,!1))},ue=($,z)=>async H=>{let ne;H&&(H.preventDefault&&H.preventDefault(),H.persist&&H.persist());let ee=Yt(s);if(c.state.next({isSubmitting:!0}),t.resolver){const{errors:X,values:ae}=await T();n.errors=X,ee=ae}else await A(r);if(ft(n.errors,\"root\"),Gt(n.errors)){c.state.next({errors:{}});try{await $(ee,H)}catch(X){ne=X}}else z&&await z({...n.errors},H),le(),setTimeout(le);if(c.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Gt(n.errors)&&!ne,submitCount:n.submitCount+1,errors:n.errors}),ne)throw ne},ie=($,z={})=>{te(r,$)&&(Ze(z.defaultValue)?F($,Yt(te(i,$))):(F($,z.defaultValue),Le(i,$,Yt(z.defaultValue))),z.keepTouched||ft(n.touchedFields,$),z.keepDirty||(ft(n.dirtyFields,$),n.isDirty=z.defaultValue?L($,Yt(te(i,$))):L()),z.keepError||(ft(n.errors,$),f.isValid&&w()),c.state.next({...n}))},pe=($,z={})=>{const H=$?Yt($):i,ne=Yt(H),ee=Gt($),X=ee?i:ne;if(z.keepDefaultValues||(i=H),!z.keepValues){if(z.keepDirtyValues)for(const ae of a.mount)te(n.dirtyFields,ae)?Le(X,ae,te(s,ae)):F(ae,te(X,ae));else{if(Zw&&Ze($))for(const ae of a.mount){const xe=te(r,ae);if(xe&&xe._f){const U=Array.isArray(xe._f.refs)?xe._f.refs[0]:xe._f.ref;if(Jd(U)){const K=U.closest(\"form\");if(K){K.reset();break}}}}r={}}s=e.shouldUnregister?z.keepDefaultValues?Yt(i):{}:Yt(X),c.array.next({values:{...X}}),c.values.next({values:{...X}})}a={mount:z.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:\"\"},o.mount=!f.isValid||!!z.keepIsValid||!!z.keepDirtyValues,o.watch=!!e.shouldUnregister,c.state.next({submitCount:z.keepSubmitCount?n.submitCount:0,isDirty:ee?!1:z.keepDirty?n.isDirty:!!(z.keepDefaultValues&&!Ni($,i)),isSubmitted:z.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:ee?{}:z.keepDirtyValues?z.keepDefaultValues&&s?Qc(i,s):n.dirtyFields:z.keepDefaultValues&&$?Qc(i,$):z.keepDirty?n.dirtyFields:{},touchedFields:z.keepTouched?n.touchedFields:{},errors:z.keepErrors?n.errors:{},isSubmitSuccessful:z.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},Ne=($,z)=>pe(Wr($)?$(s):$,z);return{control:{register:G,unregister:Y,getFieldState:W,handleSubmit:ue,setError:q,_executeSchema:T,_getWatch:B,_getDirty:L,_updateValid:w,_removeUnmounted:j,_updateFieldArray:v,_updateDisabledField:re,_getFieldArray:N,_reset:pe,_resetDefaultValues:()=>Wr(t.defaultValues)&&t.defaultValues().then($=>{Ne($,t.resetOptions),c.state.next({isLoading:!1})}),_updateFormState:$=>{n={...n,...$}},_disableForm:de,_subjects:c,_proxyFormState:f,_setErrors:x,get _fields(){return r},get _formValues(){return s},get _state(){return o},set _state($){o=$},get _defaultValues(){return i},get _names(){return a},set _names($){a=$},get _formState(){return n},set _formState($){n=$},get _options(){return t},set _options($){t={...t,...$}}},trigger:_,register:G,handleSubmit:ue,watch:J,setValue:F,getValues:V,reset:Ne,resetField:ie,clearErrors:R,unregister:Y,setError:q,setFocus:($,z={})=>{const H=te(r,$),ne=H&&H._f;if(ne){const ee=ne.refs?ne.refs[0]:ne.ref;ee.focus&&(ee.focus(),z.shouldSelect&&ee.select())}},getFieldState:W}}function CK(e={}){const t=we.useRef(),n=we.useRef(),[r,i]=we.useState({isDirty:!1,isValidating:!1,isLoading:Wr(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:Wr(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...EK(e),formState:r});const s=t.current.control;return s._options=e,ex({subject:s._subjects.state,next:o=>{OO(o,s._proxyFormState,s._updateFormState,!0)&&i({...s._formState})}}),we.useEffect(()=>s._disableForm(e.disabled),[s,e.disabled]),we.useEffect(()=>{if(s._proxyFormState.isDirty){const o=s._getDirty();o!==r.isDirty&&s._subjects.state.next({isDirty:o})}},[s,r.isDirty]),we.useEffect(()=>{e.values&&!Ni(e.values,n.current)?(s._reset(e.values,s._options.resetOptions),n.current=e.values,i(o=>({...o}))):s._resetDefaultValues()},[e.values,s]),we.useEffect(()=>{e.errors&&s._setErrors(e.errors)},[e.errors,s]),we.useEffect(()=>{s._state.mount||(s._updateValid(),s._state.mount=!0),s._state.watch&&(s._state.watch=!1,s._subjects.state.next({...s._formState})),s._removeUnmounted()}),we.useEffect(()=>{e.shouldUnregister&&s._subjects.values.next({values:s._getWatch()})},[e.shouldUnregister,s]),t.current.formState=PO(r,s),t.current}function TK({title:e,titleId:t,...n},r){return E.createElement(\"svg\",Object.assign({xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 24 24\",fill:\"currentColor\",\"aria-hidden\":\"true\",\"data-slot\":\"icon\",ref:r,\"aria-labelledby\":t},n),e?E.createElement(\"title\",{id:t},e):null,E.createElement(\"path\",{d:\"M8.25 4.5a3.75 3.75 0 1 1 7.5 0v8.25a3.75 3.75 0 1 1-7.5 0V4.5Z\"}),E.createElement(\"path\",{d:\"M6 10.5a.75.75 0 0 1 .75.75v1.5a5.25 5.25 0 1 0 10.5 0v-1.5a.75.75 0 0 1 1.5 0v1.5a6.751 6.751 0 0 1-6 6.709v2.291h3a.75.75 0 0 1 0 1.5h-7.5a.75.75 0 0 1 0-1.5h3v-2.291a6.751 6.751 0 0 1-6-6.709v-1.5A.75.75 0 0 1 6 10.5Z\"}))}const _K=E.forwardRef(TK),BO=E.forwardRef(({className:e,...t},n)=>b.jsx(\"div\",{ref:n,className:nt(\"rounded-lg border border-neutral-200 bg-white text-neutral-950 shadow-sm dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50\",e),...t}));BO.displayName=\"Card\";const VO=E.forwardRef(({className:e,...t},n)=>b.jsx(\"div\",{ref:n,className:nt(\"flex flex-col space-y-1.5 p-6\",e),...t}));VO.displayName=\"CardHeader\";const zO=E.forwardRef(({className:e,...t},n)=>b.jsx(\"h3\",{ref:n,className:nt(\"text-2xl font-semibold leading-none tracking-tight\",e),...t}));zO.displayName=\"CardTitle\";const AK=E.forwardRef(({className:e,...t},n)=>b.jsx(\"p\",{ref:n,className:nt(\"text-sm text-neutral-500 dark:text-neutral-400\",e),...t}));AK.displayName=\"CardDescription\";const UO=E.forwardRef(({className:e,...t},n)=>b.jsx(\"div\",{ref:n,className:nt(\"p-6 pt-0\",e),...t}));UO.displayName=\"CardContent\";const HO=E.forwardRef(({className:e,...t},n)=>b.jsx(\"div\",{ref:n,className:nt(\"flex items-center p-6 pt-0\",e),...t}));HO.displayName=\"CardFooter\";function WO(e){var t,n,r=\"\";if(typeof e==\"string\"||typeof e==\"number\")r+=e;else if(typeof e==\"object\")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=WO(e[t]))&&(r&&(r+=\" \"),r+=n);else for(t in e)e[t]&&(r&&(r+=\" \"),r+=t);return r}function NK(){for(var e,t,n=0,r=\"\";n<arguments.length;)(e=arguments[n++])&&(t=WO(e))&&(r&&(r+=\" \"),r+=t);return r}const oE=e=>typeof e==\"boolean\"?\"\".concat(e):e===0?\"0\":e,aE=NK,KO=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return aE(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:s}=t,o=Object.keys(i).map(u=>{const f=n==null?void 0:n[u],c=s==null?void 0:s[u];if(f===null)return null;const d=oE(f)||oE(c);return i[u][d]}),a=n&&Object.entries(n).reduce((u,f)=>{let[c,d]=f;return d===void 0||(u[c]=d),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,f)=>{let{class:c,className:d,...h}=f;return Object.entries(h).every(p=>{let[m,w]=p;return Array.isArray(w)?w.includes({...s,...a}[m]):{...s,...a}[m]===w})?[...u,c,d]:u},[]);return aE(e,o,l,n==null?void 0:n.class,n==null?void 0:n.className)},PK=KO(\"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-white transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-neutral-950 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 dark:ring-offset-neutral-950 dark:focus-visible:ring-neutral-300\",{variants:{variant:{default:\"bg-neutral-900 text-neutral-50 hover:bg-neutral-900/90 dark:bg-neutral-50 dark:text-neutral-900 dark:hover:bg-neutral-50/90\",destructive:\"bg-red-500 text-neutral-50 hover:bg-red-500/90 dark:bg-red-900 dark:text-neutral-50 dark:hover:bg-red-900/90\",outline:\"border border-neutral-200 bg-white hover:bg-neutral-100 hover:text-neutral-900 dark:border-neutral-800 dark:bg-neutral-950 dark:hover:bg-neutral-800 dark:hover:text-neutral-50\",secondary:\"bg-neutral-100 text-neutral-900 hover:bg-neutral-100/80 dark:bg-neutral-800 dark:text-neutral-50 dark:hover:bg-neutral-800/80\",ghost:\"hover:bg-neutral-100 hover:text-neutral-900 dark:hover:bg-neutral-800 dark:hover:text-neutral-50\",link:\"text-neutral-900 underline-offset-4 hover:underline dark:text-neutral-50\"},size:{default:\"h-10 px-4 py-2\",sm:\"h-9 rounded-md px-3\",lg:\"h-11 rounded-md px-8\",icon:\"h-10 w-10\"}},defaultVariants:{variant:\"default\",size:\"default\"}}),ta=E.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},s)=>{const o=r?cc:\"button\";return b.jsx(o,{className:nt(PK({variant:t,size:n,className:e})),ref:s,...i})});ta.displayName=\"Button\";var Xm=\"focusScope.autoFocusOnMount\",Qm=\"focusScope.autoFocusOnUnmount\",lE={bubbles:!1,cancelable:!0},OK=\"FocusScope\",qO=E.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...o}=e,[a,l]=E.useState(null),u=Qi(i),f=Qi(s),c=E.useRef(null),d=ur(t,m=>l(m)),h=E.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;E.useEffect(()=>{if(r){let m=function(g){if(h.paused||!a)return;const x=g.target;a.contains(x)?c.current=x:ki(c.current,{select:!0})},w=function(g){if(h.paused||!a)return;const x=g.relatedTarget;x!==null&&(a.contains(x)||ki(c.current,{select:!0}))},y=function(g){if(document.activeElement===document.body)for(const S of g)S.removedNodes.length>0&&ki(a)};document.addEventListener(\"focusin\",m),document.addEventListener(\"focusout\",w);const v=new MutationObserver(y);return a&&v.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener(\"focusin\",m),document.removeEventListener(\"focusout\",w),v.disconnect()}}},[r,a,h.paused]),E.useEffect(()=>{if(a){cE.add(h);const m=document.activeElement;if(!a.contains(m)){const y=new CustomEvent(Xm,lE);a.addEventListener(Xm,u),a.dispatchEvent(y),y.defaultPrevented||(LK(jK(YO(a)),{select:!0}),document.activeElement===m&&ki(a))}return()=>{a.removeEventListener(Xm,u),setTimeout(()=>{const y=new CustomEvent(Qm,lE);a.addEventListener(Qm,f),a.dispatchEvent(y),y.defaultPrevented||ki(m??document.body,{select:!0}),a.removeEventListener(Qm,f),cE.remove(h)},0)}}},[a,u,f,h]);const p=E.useCallback(m=>{if(!n&&!r||h.paused)return;const w=m.key===\"Tab\"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,y=document.activeElement;if(w&&y){const v=m.currentTarget,[g,x]=RK(v);g&&x?!m.shiftKey&&y===x?(m.preventDefault(),n&&ki(g,{select:!0})):m.shiftKey&&y===g&&(m.preventDefault(),n&&ki(x,{select:!0})):y===v&&m.preventDefault()}},[n,r,h.paused]);return b.jsx(Ut.div,{tabIndex:-1,...o,ref:d,onKeyDown:p})});qO.displayName=OK;function LK(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ki(r,{select:t}),document.activeElement!==n)return}function RK(e){const t=YO(e),n=uE(t,e),r=uE(t.reverse(),e);return[n,r]}function YO(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName===\"INPUT\"&&r.type===\"hidden\";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function uE(e,t){for(const n of e)if(!IK(n,{upTo:t}))return n}function IK(e,{upTo:t}){if(getComputedStyle(e).visibility===\"hidden\")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===\"none\")return!0;e=e.parentElement}return!1}function DK(e){return e instanceof HTMLInputElement&&\"select\"in e}function ki(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&DK(e)&&t&&e.select()}}var cE=MK();function MK(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=fE(e,t),e.unshift(t)},remove(t){var n;e=fE(e,t),(n=e[0])==null||n.resume()}}}function fE(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function jK(e){return e.filter(t=>t.tagName!==\"A\")}var Zm=0;function FK(){E.useEffect(()=>{const e=document.querySelectorAll(\"[data-radix-focus-guard]\");return document.body.insertAdjacentElement(\"afterbegin\",e[0]??dE()),document.body.insertAdjacentElement(\"beforeend\",e[1]??dE()),Zm++,()=>{Zm===1&&document.querySelectorAll(\"[data-radix-focus-guard]\").forEach(t=>t.remove()),Zm--}},[])}function dE(){const e=document.createElement(\"span\");return e.setAttribute(\"data-radix-focus-guard\",\"\"),e.tabIndex=0,e.style.cssText=\"outline: none; opacity: 0; position: fixed; pointer-events: none\",e}var wr=function(){return wr=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},wr.apply(this,arguments)};function GO(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==\"function\")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function $K(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,s;r<i;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var Hf=\"right-scroll-bar-position\",Wf=\"width-before-scroll-bar\",BK=\"with-scroll-bars-hidden\",VK=\"--removed-body-scroll-bar-size\";function Jm(e,t){return typeof e==\"function\"?e(t):e&&(e.current=t),e}function zK(e,t){var n=E.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var UK=typeof window<\"u\"?E.useLayoutEffect:E.useEffect,hE=new WeakMap;function HK(e,t){var n=zK(null,function(r){return e.forEach(function(i){return Jm(i,r)})});return UK(function(){var r=hE.get(n);if(r){var i=new Set(r),s=new Set(e),o=n.current;i.forEach(function(a){s.has(a)||Jm(a,null)}),s.forEach(function(a){i.has(a)||Jm(a,o)})}hE.set(n,e)},[e]),n}function WK(e){return e}function KK(e,t){t===void 0&&(t=WK);var n=[],r=!1,i={read:function(){if(r)throw new Error(\"Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.\");return n.length?n[n.length-1]:e},useMedium:function(s){var o=t(s,r);return n.push(o),function(){n=n.filter(function(a){return a!==o})}},assignSyncMedium:function(s){for(r=!0;n.length;){var o=n;n=[],o.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){r=!0;var o=[];if(n.length){var a=n;n=[],a.forEach(s),o=n}var l=function(){var f=o;o=[],f.forEach(s)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(f){o.push(f),u()},filter:function(f){return o=o.filter(f),n}}}};return i}function qK(e){e===void 0&&(e={});var t=KK(null);return t.options=wr({async:!0,ssr:!1},e),t}var XO=function(e){var t=e.sideCar,n=GO(e,[\"sideCar\"]);if(!t)throw new Error(\"Sidecar: please provide `sideCar` property to import the right car\");var r=t.read();if(!r)throw new Error(\"Sidecar medium not found\");return E.createElement(r,wr({},n))};XO.isSideCarExport=!0;function YK(e,t){return e.useMedium(t),XO}var QO=qK(),eg=function(){},hp=E.forwardRef(function(e,t){var n=E.useRef(null),r=E.useState({onScrollCapture:eg,onWheelCapture:eg,onTouchMoveCapture:eg}),i=r[0],s=r[1],o=e.forwardProps,a=e.children,l=e.className,u=e.removeScrollBar,f=e.enabled,c=e.shards,d=e.sideCar,h=e.noIsolation,p=e.inert,m=e.allowPinchZoom,w=e.as,y=w===void 0?\"div\":w,v=e.gapMode,g=GO(e,[\"forwardProps\",\"children\",\"className\",\"removeScrollBar\",\"enabled\",\"shards\",\"sideCar\",\"noIsolation\",\"inert\",\"allowPinchZoom\",\"as\",\"gapMode\"]),x=d,S=HK([n,t]),k=wr(wr({},g),i);return E.createElement(E.Fragment,null,f&&E.createElement(x,{sideCar:QO,removeScrollBar:u,shards:c,noIsolation:h,inert:p,setCallbacks:s,allowPinchZoom:!!m,lockRef:n,gapMode:v}),o?E.cloneElement(E.Children.only(a),wr(wr({},k),{ref:S})):E.createElement(y,wr({},k,{className:l,ref:S}),a))});hp.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};hp.classNames={fullWidth:Wf,zeroRight:Hf};var GK=function(){if(typeof __webpack_nonce__<\"u\")return __webpack_nonce__};function XK(){if(!document)return null;var e=document.createElement(\"style\");e.type=\"text/css\";var t=GK();return t&&e.setAttribute(\"nonce\",t),e}function QK(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function ZK(e){var t=document.head||document.getElementsByTagName(\"head\")[0];t.appendChild(e)}var JK=function(){var e=0,t=null;return{add:function(n){e==0&&(t=XK())&&(QK(t,n),ZK(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},eq=function(){var e=JK();return function(t,n){E.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},ZO=function(){var e=eq(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},tq={left:0,top:0,right:0,gap:0},tg=function(e){return parseInt(e||\"\",10)||0},nq=function(e){var t=window.getComputedStyle(document.body),n=t[e===\"padding\"?\"paddingLeft\":\"marginLeft\"],r=t[e===\"padding\"?\"paddingTop\":\"marginTop\"],i=t[e===\"padding\"?\"paddingRight\":\"marginRight\"];return[tg(n),tg(r),tg(i)]},rq=function(e){if(e===void 0&&(e=\"margin\"),typeof window>\"u\")return tq;var t=nq(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},iq=ZO(),na=\"data-scroll-locked\",sq=function(e,t,n,r){var i=e.left,s=e.top,o=e.right,a=e.gap;return n===void 0&&(n=\"margin\"),`\n  .`.concat(BK,` {\n   overflow: hidden `).concat(r,`;\n   padding-right: `).concat(a,\"px \").concat(r,`;\n  }\n  body[`).concat(na,`] {\n    overflow: hidden `).concat(r,`;\n    overscroll-behavior: contain;\n    `).concat([t&&\"position: relative \".concat(r,\";\"),n===\"margin\"&&`\n    padding-left: `.concat(i,`px;\n    padding-top: `).concat(s,`px;\n    padding-right: `).concat(o,`px;\n    margin-left:0;\n    margin-top:0;\n    margin-right: `).concat(a,\"px \").concat(r,`;\n    `),n===\"padding\"&&\"padding-right: \".concat(a,\"px \").concat(r,\";\")].filter(Boolean).join(\"\"),`\n  }\n  \n  .`).concat(Hf,` {\n    right: `).concat(a,\"px \").concat(r,`;\n  }\n  \n  .`).concat(Wf,` {\n    margin-right: `).concat(a,\"px \").concat(r,`;\n  }\n  \n  .`).concat(Hf,\" .\").concat(Hf,` {\n    right: 0 `).concat(r,`;\n  }\n  \n  .`).concat(Wf,\" .\").concat(Wf,` {\n    margin-right: 0 `).concat(r,`;\n  }\n  \n  body[`).concat(na,`] {\n    `).concat(VK,\": \").concat(a,`px;\n  }\n`)},pE=function(){var e=parseInt(document.body.getAttribute(na)||\"0\",10);return isFinite(e)?e:0},oq=function(){E.useEffect(function(){return document.body.setAttribute(na,(pE()+1).toString()),function(){var e=pE()-1;e<=0?document.body.removeAttribute(na):document.body.setAttribute(na,e.toString())}},[])},aq=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?\"margin\":r;oq();var s=E.useMemo(function(){return rq(i)},[i]);return E.createElement(iq,{styles:sq(s,!t,i,n?\"\":\"!important\")})},w0=!1;if(typeof window<\"u\")try{var Zc=Object.defineProperty({},\"passive\",{get:function(){return w0=!0,!0}});window.addEventListener(\"test\",Zc,Zc),window.removeEventListener(\"test\",Zc,Zc)}catch{w0=!1}var uo=w0?{passive:!1}:!1,lq=function(e){return e.tagName===\"TEXTAREA\"},JO=function(e,t){var n=window.getComputedStyle(e);return n[t]!==\"hidden\"&&!(n.overflowY===n.overflowX&&!lq(e)&&n[t]===\"visible\")},uq=function(e){return JO(e,\"overflowY\")},cq=function(e){return JO(e,\"overflowX\")},mE=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<\"u\"&&r instanceof ShadowRoot&&(r=r.host);var i=eL(e,r);if(i){var s=tL(e,r),o=s[1],a=s[2];if(o>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},fq=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},dq=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},eL=function(e,t){return e===\"v\"?uq(t):cq(t)},tL=function(e,t){return e===\"v\"?fq(t):dq(t)},hq=function(e,t){return e===\"h\"&&t===\"rtl\"?-1:1},pq=function(e,t,n,r,i){var s=hq(e,window.getComputedStyle(t).direction),o=s*r,a=n.target,l=t.contains(a),u=!1,f=o>0,c=0,d=0;do{var h=tL(e,a),p=h[0],m=h[1],w=h[2],y=m-w-s*p;(p||y)&&eL(e,a)&&(c+=y,d+=p),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(f&&(Math.abs(c)<1||!i)||!f&&(Math.abs(d)<1||!i))&&(u=!0),u},Jc=function(e){return\"changedTouches\"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},gE=function(e){return[e.deltaX,e.deltaY]},yE=function(e){return e&&\"current\"in e?e.current:e},mq=function(e,t){return e[0]===t[0]&&e[1]===t[1]},gq=function(e){return`\n  .block-interactivity-`.concat(e,` {pointer-events: none;}\n  .allow-interactivity-`).concat(e,` {pointer-events: all;}\n`)},yq=0,co=[];function vq(e){var t=E.useRef([]),n=E.useRef([0,0]),r=E.useRef(),i=E.useState(yq++)[0],s=E.useState(ZO)[0],o=E.useRef(e);E.useEffect(function(){o.current=e},[e]),E.useEffect(function(){if(e.inert){document.body.classList.add(\"block-interactivity-\".concat(i));var m=$K([e.lockRef.current],(e.shards||[]).map(yE),!0).filter(Boolean);return m.forEach(function(w){return w.classList.add(\"allow-interactivity-\".concat(i))}),function(){document.body.classList.remove(\"block-interactivity-\".concat(i)),m.forEach(function(w){return w.classList.remove(\"allow-interactivity-\".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var a=E.useCallback(function(m,w){if(\"touches\"in m&&m.touches.length===2)return!o.current.allowPinchZoom;var y=Jc(m),v=n.current,g=\"deltaX\"in m?m.deltaX:v[0]-y[0],x=\"deltaY\"in m?m.deltaY:v[1]-y[1],S,k=m.target,C=Math.abs(g)>Math.abs(x)?\"h\":\"v\";if(\"touches\"in m&&C===\"h\"&&k.type===\"range\")return!1;var T=mE(C,k);if(!T)return!0;if(T?S=C:(S=C===\"v\"?\"h\":\"v\",T=mE(C,k)),!T)return!1;if(!r.current&&\"changedTouches\"in m&&(g||x)&&(r.current=S),!S)return!0;var O=r.current||S;return pq(O,w,m,O===\"h\"?g:x,!0)},[]),l=E.useCallback(function(m){var w=m;if(!(!co.length||co[co.length-1]!==s)){var y=\"deltaY\"in w?gE(w):Jc(w),v=t.current.filter(function(S){return S.name===w.type&&(S.target===w.target||w.target===S.shadowParent)&&mq(S.delta,y)})[0];if(v&&v.should){w.cancelable&&w.preventDefault();return}if(!v){var g=(o.current.shards||[]).map(yE).filter(Boolean).filter(function(S){return S.contains(w.target)}),x=g.length>0?a(w,g[0]):!o.current.noIsolation;x&&w.cancelable&&w.preventDefault()}}},[]),u=E.useCallback(function(m,w,y,v){var g={name:m,delta:w,target:y,should:v,shadowParent:wq(y)};t.current.push(g),setTimeout(function(){t.current=t.current.filter(function(x){return x!==g})},1)},[]),f=E.useCallback(function(m){n.current=Jc(m),r.current=void 0},[]),c=E.useCallback(function(m){u(m.type,gE(m),m.target,a(m,e.lockRef.current))},[]),d=E.useCallback(function(m){u(m.type,Jc(m),m.target,a(m,e.lockRef.current))},[]);E.useEffect(function(){return co.push(s),e.setCallbacks({onScrollCapture:c,onWheelCapture:c,onTouchMoveCapture:d}),document.addEventListener(\"wheel\",l,uo),document.addEventListener(\"touchmove\",l,uo),document.addEventListener(\"touchstart\",f,uo),function(){co=co.filter(function(m){return m!==s}),document.removeEventListener(\"wheel\",l,uo),document.removeEventListener(\"touchmove\",l,uo),document.removeEventListener(\"touchstart\",f,uo)}},[]);var h=e.removeScrollBar,p=e.inert;return E.createElement(E.Fragment,null,p?E.createElement(s,{styles:gq(i)}):null,h?E.createElement(aq,{gapMode:e.gapMode}):null)}function wq(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const xq=YK(QO,vq);var nL=E.forwardRef(function(e,t){return E.createElement(hp,wr({},e,{ref:t,sideCar:xq}))});nL.classNames=hp.classNames;var bq=function(e){if(typeof document>\"u\")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},fo=new WeakMap,ef=new WeakMap,tf={},ng=0,rL=function(e){return e&&(e.host||rL(e.parentNode))},Sq=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=rL(n);return r&&e.contains(r)?r:(console.error(\"aria-hidden\",n,\"in not contained inside\",e,\". Doing nothing\"),null)}).filter(function(n){return!!n})},kq=function(e,t,n,r){var i=Sq(t,Array.isArray(e)?e:[e]);tf[n]||(tf[n]=new WeakMap);var s=tf[n],o=[],a=new Set,l=new Set(i),u=function(c){!c||a.has(c)||(a.add(c),u(c.parentNode))};i.forEach(u);var f=function(c){!c||l.has(c)||Array.prototype.forEach.call(c.children,function(d){if(a.has(d))f(d);else try{var h=d.getAttribute(r),p=h!==null&&h!==\"false\",m=(fo.get(d)||0)+1,w=(s.get(d)||0)+1;fo.set(d,m),s.set(d,w),o.push(d),m===1&&p&&ef.set(d,!0),w===1&&d.setAttribute(n,\"true\"),p||d.setAttribute(r,\"true\")}catch(y){console.error(\"aria-hidden: cannot operate on \",d,y)}})};return f(t),a.clear(),ng++,function(){o.forEach(function(c){var d=fo.get(c)-1,h=s.get(c)-1;fo.set(c,d),s.set(c,h),d||(ef.has(c)||c.removeAttribute(r),ef.delete(c)),h||c.removeAttribute(n)}),ng--,ng||(fo=new WeakMap,fo=new WeakMap,ef=new WeakMap,tf={})}},Eq=function(e,t,n){n===void 0&&(n=\"data-aria-hidden\");var r=Array.from(Array.isArray(e)?e:[e]),i=bq(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(\"[aria-live]\"))),kq(r,i,n,\"aria-hidden\")):function(){return null}},rx=\"Dialog\",[iL,npe]=Bw(rx),[Cq,cr]=iL(rx),sL=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:s,modal:o=!0}=e,a=E.useRef(null),l=E.useRef(null),[u=!1,f]=uO({prop:r,defaultProp:i,onChange:s});return b.jsx(Cq,{scope:t,triggerRef:a,contentRef:l,contentId:Vf(),titleId:Vf(),descriptionId:Vf(),open:u,onOpenChange:f,onOpenToggle:E.useCallback(()=>f(c=>!c),[f]),modal:o,children:n})};sL.displayName=rx;var oL=\"DialogTrigger\",aL=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=cr(oL,n),s=ur(t,i.triggerRef);return b.jsx(Ut.button,{type:\"button\",\"aria-haspopup\":\"dialog\",\"aria-expanded\":i.open,\"aria-controls\":i.contentId,\"data-state\":ox(i.open),...r,ref:s,onClick:Qt(e.onClick,i.onOpenToggle)})});aL.displayName=oL;var ix=\"DialogPortal\",[Tq,lL]=iL(ix,{forceMount:void 0}),uL=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,s=cr(ix,t);return b.jsx(Tq,{scope:t,forceMount:n,children:E.Children.map(r,o=>b.jsx(dc,{present:n||s.open,children:b.jsx(lO,{asChild:!0,container:i,children:o})}))})};uL.displayName=ix;var rh=\"DialogOverlay\",cL=E.forwardRef((e,t)=>{const n=lL(rh,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,s=cr(rh,e.__scopeDialog);return s.modal?b.jsx(dc,{present:r||s.open,children:b.jsx(_q,{...i,ref:t})}):null});cL.displayName=rh;var _q=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=cr(rh,n);return b.jsx(nL,{as:cc,allowPinchZoom:!0,shards:[i.contentRef],children:b.jsx(Ut.div,{\"data-state\":ox(i.open),...r,ref:t,style:{pointerEvents:\"auto\",...r.style}})})}),Ys=\"DialogContent\",fL=E.forwardRef((e,t)=>{const n=lL(Ys,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,s=cr(Ys,e.__scopeDialog);return b.jsx(dc,{present:r||s.open,children:s.modal?b.jsx(Aq,{...i,ref:t}):b.jsx(Nq,{...i,ref:t})})});fL.displayName=Ys;var Aq=E.forwardRef((e,t)=>{const n=cr(Ys,e.__scopeDialog),r=E.useRef(null),i=ur(t,n.contentRef,r);return E.useEffect(()=>{const s=r.current;if(s)return Eq(s)},[]),b.jsx(dL,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Qt(e.onCloseAutoFocus,s=>{var o;s.preventDefault(),(o=n.triggerRef.current)==null||o.focus()}),onPointerDownOutside:Qt(e.onPointerDownOutside,s=>{const o=s.detail.originalEvent,a=o.button===0&&o.ctrlKey===!0;(o.button===2||a)&&s.preventDefault()}),onFocusOutside:Qt(e.onFocusOutside,s=>s.preventDefault())})}),Nq=E.forwardRef((e,t)=>{const n=cr(Ys,e.__scopeDialog),r=E.useRef(!1),i=E.useRef(!1);return b.jsx(dL,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var o,a;(o=e.onCloseAutoFocus)==null||o.call(e,s),s.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),s.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:s=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type===\"pointerdown\"&&(i.current=!0));const o=s.target;((u=n.triggerRef.current)==null?void 0:u.contains(o))&&s.preventDefault(),s.detail.originalEvent.type===\"focusin\"&&i.current&&s.preventDefault()}})}),dL=E.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:s,...o}=e,a=cr(Ys,n),l=E.useRef(null),u=ur(t,l);return FK(),b.jsxs(b.Fragment,{children:[b.jsx(qO,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:s,children:b.jsx(Vw,{role:\"dialog\",id:a.contentId,\"aria-describedby\":a.descriptionId,\"aria-labelledby\":a.titleId,\"data-state\":ox(a.open),...o,ref:u,onDismiss:()=>a.onOpenChange(!1)})}),b.jsxs(b.Fragment,{children:[b.jsx(Pq,{titleId:a.titleId}),b.jsx(Lq,{contentRef:l,descriptionId:a.descriptionId})]})]})}),sx=\"DialogTitle\",hL=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=cr(sx,n);return b.jsx(Ut.h2,{id:i.titleId,...r,ref:t})});hL.displayName=sx;var pL=\"DialogDescription\",mL=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=cr(pL,n);return b.jsx(Ut.p,{id:i.descriptionId,...r,ref:t})});mL.displayName=pL;var gL=\"DialogClose\",yL=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=cr(gL,n);return b.jsx(Ut.button,{type:\"button\",...r,ref:t,onClick:Qt(e.onClick,()=>i.onOpenChange(!1))})});yL.displayName=gL;function ox(e){return e?\"open\":\"closed\"}var vL=\"DialogTitleWarning\",[rpe,wL]=AH(vL,{contentName:Ys,titleName:sx,docsSlug:\"dialog\"}),Pq=({titleId:e})=>{const t=wL(vL),n=`\\`${t.contentName}\\` requires a \\`${t.titleName}\\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \\`${t.titleName}\\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return E.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Oq=\"DialogDescriptionWarning\",Lq=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \\`Description\\` or \\`aria-describedby={undefined}\\` for {${wL(Oq).contentName}}.`;return E.useEffect(()=>{var s;const i=(s=e.current)==null?void 0:s.getAttribute(\"aria-describedby\");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Rq=sL,Iq=aL,Dq=uL,xL=cL,bL=fL,SL=hL,kL=mL,EL=yL;/**\n * @license lucide-react v0.439.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */const Mq=e=>e.replace(/([a-z0-9])([A-Z])/g,\"$1-$2\").toLowerCase(),CL=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(\" \");/**\n * @license lucide-react v0.439.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */var jq={xmlns:\"http://www.w3.org/2000/svg\",width:24,height:24,viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"currentColor\",strokeWidth:2,strokeLinecap:\"round\",strokeLinejoin:\"round\"};/**\n * @license lucide-react v0.439.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */const Fq=E.forwardRef(({color:e=\"currentColor\",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i=\"\",children:s,iconNode:o,...a},l)=>E.createElement(\"svg\",{ref:l,...jq,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:CL(\"lucide\",i),...a},[...o.map(([u,f])=>E.createElement(u,f)),...Array.isArray(s)?s:[s]]));/**\n * @license lucide-react v0.439.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */const TL=(e,t)=>{const n=E.forwardRef(({className:r,...i},s)=>E.createElement(Fq,{ref:s,iconNode:t,className:CL(`lucide-${Mq(e)}`,r),...i}));return n.displayName=`${e}`,n};/**\n * @license lucide-react v0.439.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */const $q=TL(\"ExternalLink\",[[\"path\",{d:\"M15 3h6v6\",key:\"1q9fwt\"}],[\"path\",{d:\"M10 14 21 3\",key:\"gplh6r\"}],[\"path\",{d:\"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6\",key:\"a6xqqp\"}]]);/**\n * @license lucide-react v0.439.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */const Bq=TL(\"X\",[[\"path\",{d:\"M18 6 6 18\",key:\"1bl5f8\"}],[\"path\",{d:\"m6 6 12 12\",key:\"d8bk6v\"}]]),_L=Rq,AL=Iq,Vq=Dq,zq=EL,NL=E.forwardRef(({className:e,...t},n)=>b.jsx(xL,{ref:n,className:nt(\"fixed inset-0 z-50 bg-black/80  data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",e),...t}));NL.displayName=xL.displayName;const ax=E.forwardRef(({className:e,children:t,...n},r)=>b.jsxs(Vq,{children:[b.jsx(NL,{}),b.jsxs(bL,{ref:r,className:nt(\"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-neutral-200 bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg dark:border-neutral-800 dark:bg-neutral-950\",e),...n,children:[t,b.jsxs(EL,{className:\"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-neutral-950 focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-neutral-100 data-[state=open]:text-neutral-500 dark:ring-offset-neutral-950 dark:focus:ring-neutral-300 dark:data-[state=open]:bg-neutral-800 dark:data-[state=open]:text-neutral-400\",children:[b.jsx(Bq,{className:\"h-4 w-4\"}),b.jsx(\"span\",{className:\"sr-only\",children:\"Close\"})]})]})]}));ax.displayName=bL.displayName;const lx=({className:e,...t})=>b.jsx(\"div\",{className:nt(\"flex flex-col space-y-1.5 text-center sm:text-left\",e),...t});lx.displayName=\"DialogHeader\";const ux=({className:e,...t})=>b.jsx(\"div\",{className:nt(\"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\",e),...t});ux.displayName=\"DialogFooter\";const cx=E.forwardRef(({className:e,...t},n)=>b.jsx(SL,{ref:n,className:nt(\"text-lg font-semibold leading-none tracking-tight\",e),...t}));cx.displayName=SL.displayName;const fx=E.forwardRef(({className:e,...t},n)=>b.jsx(kL,{ref:n,className:nt(\"text-sm text-neutral-500 dark:text-neutral-400\",e),...t}));fx.displayName=kL.displayName;var Uq=\"Label\",PL=E.forwardRef((e,t)=>b.jsx(Ut.label,{...e,ref:t,onMouseDown:n=>{var i;n.target.closest(\"button, input, select, textarea\")||((i=e.onMouseDown)==null||i.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));PL.displayName=Uq;var OL=PL;const Hq=KO(\"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\"),LL=E.forwardRef(({className:e,...t},n)=>b.jsx(OL,{ref:n,className:nt(Hq(),e),...t}));LL.displayName=OL.displayName;const Wq=lK,RL=E.createContext({}),rg=({...e})=>b.jsx(RL.Provider,{value:{name:e.name},children:b.jsx(dK,{...e})}),pp=()=>{const e=E.useContext(RL),t=E.useContext(IL),{getFieldState:n,formState:r}=dp(),i=n(e.name,r);if(!e)throw new Error(\"useFormField should be used within <FormField>\");const{id:s}=t;return{id:s,name:e.name,formItemId:`${s}-form-item`,formDescriptionId:`${s}-form-item-description`,formMessageId:`${s}-form-item-message`,...i}},IL=E.createContext({}),Kf=E.forwardRef(({className:e,...t},n)=>{const r=E.useId();return b.jsx(IL.Provider,{value:{id:r},children:b.jsx(\"div\",{ref:n,className:nt(\"space-y-2\",e),...t})})});Kf.displayName=\"FormItem\";const qf=E.forwardRef(({className:e,...t},n)=>{const{error:r,formItemId:i}=pp();return b.jsx(LL,{ref:n,className:nt(r&&\"text-red-500 dark:text-red-900\",e),htmlFor:i,...t})});qf.displayName=\"FormLabel\";const Yf=E.forwardRef(({...e},t)=>{const{error:n,formItemId:r,formDescriptionId:i,formMessageId:s}=pp();return b.jsx(cc,{ref:t,id:r,\"aria-describedby\":n?`${i} ${s}`:`${i}`,\"aria-invalid\":!!n,...e})});Yf.displayName=\"FormControl\";const x0=E.forwardRef(({className:e,...t},n)=>{const{formDescriptionId:r}=pp();return b.jsx(\"p\",{ref:n,id:r,className:nt(\"text-sm text-neutral-500 dark:text-neutral-400\",e),...t})});x0.displayName=\"FormDescription\";const Gf=E.forwardRef(({className:e,children:t,...n},r)=>{const{error:i,formMessageId:s}=pp(),o=i?String(i==null?void 0:i.message):t;return o?b.jsx(\"p\",{ref:r,id:s,className:nt(\"text-sm font-medium text-red-500 dark:text-red-900\",e),...n,children:o}):null});Gf.displayName=\"FormMessage\";const b0=E.forwardRef(({className:e,type:t,...n},r)=>b.jsx(\"input\",{type:t,className:nt(\"flex h-10 w-full rounded-md border border-neutral-200 bg-white px-3 py-2 text-sm ring-offset-white file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-neutral-500 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-neutral-950 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 dark:border-neutral-800 dark:bg-neutral-950 dark:ring-offset-neutral-950 dark:placeholder:text-neutral-400 dark:focus-visible:ring-neutral-300\",e),ref:r,...n}));b0.displayName=\"Input\";const DL=E.forwardRef(({className:e,...t},n)=>b.jsx(\"textarea\",{className:nt(\"flex min-h-[80px] w-full rounded-md border border-neutral-200 bg-white px-3 py-2 text-sm ring-offset-white placeholder:text-neutral-500 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-neutral-950 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 dark:border-neutral-800 dark:bg-neutral-950 dark:ring-offset-neutral-950 dark:placeholder:text-neutral-400 dark:focus-visible:ring-neutral-300\",e),ref:n,...t}));DL.displayName=\"Textarea\";const Kq=()=>{const e=\"http://localhost:4200/api\",[t,n]=E.useState([]),[r,i]=E.useState(\"\"),s=w2(),[o,a]=E.useState(!1),[l,u]=E.useState(null),f=E.useRef(null),c=E.useRef([]),d=CK({defaultValues:{project:\"\",description:\"\",aesthetics:\"\"}});E.useEffect(()=>{(async()=>{try{const k=await(await fetch(`${e}/projects/list`)).json();n(k.projects)}catch(S){console.error(\"Failed to fetch projects:\",S)}})()},[]);const h=x=>x.toString().toLowerCase().replace(/\\s+/g,\"-\").replace(/[^\\w\\-]+/g,\"\").replace(/\\-\\-+/g,\"-\").replace(/^-+/,\"\").replace(/-+$/,\"\"),p=async x=>{try{const k=await(await fetch(`${e}/projects/new`,{method:\"POST\",headers:{\"Content-Type\":\"application/json\"},body:JSON.stringify(x)})).json();s(`/project/${k.project}`)}catch(S){console.error(\"Failed to create new project:\",S)}},m=async({project:x})=>{try{const k=await(await fetch(`${e}/project/resume`,{method:\"POST\",headers:{\"Content-Type\":\"application/json\"},body:JSON.stringify({project:x})})).json();s(`/project/${x}`)}catch(S){console.error(\"Failed to resume project:\",S)}},w=async()=>{o?g():y()},y=async()=>{try{const x=await navigator.mediaDevices.getUserMedia({audio:!0});f.current=new MediaRecorder(x,{mimeType:\"audio/webm;codecs=opus\"}),c.current=[],f.current.ondataavailable=S=>{S.data.size>0&&c.current.push(S.data)},f.current.onstop=async()=>{const S=new Blob(c.current,{type:\"audio/webm;codecs=opus\"});u(S);const k=new FileReader;k.onloadend=async()=>{const C=k.result,T=await v(C);T&&d.setValue(\"description\",T)},k.readAsDataURL(S)},f.current.start(),a(!0)}catch(x){console.error(\"Error starting recording:\",x)}},v=async x=>{try{const S=await fetch(`${e}/utils/transcribe`,{method:\"POST\",headers:{\"Content-Type\":\"application/json\"},body:JSON.stringify({audio:x})});if(!S.ok)throw new Error(\"Transcription failed\");return(await S.json()).transcript}catch(S){return console.error(\"Error transcribing audio:\",S),null}},g=()=>{f.current&&o&&(f.current.stop(),a(!1),f.current.stream&&f.current.stream.getTracks().forEach(x=>x.stop()),f.current=null)};return b.jsxs(b.Fragment,{children:[b.jsxs(\"div\",{className:\"flex justify-between items-center mb-6 dark\",children:[b.jsx(\"h1\",{className:\"text-xl\",children:\"Projects\"}),b.jsxs(_L,{children:[b.jsx(AL,{asChild:!0,children:b.jsx(ta,{variant:\"secondary\",className:\"font-normal\",children:\"+ New Project\"})}),b.jsxs(ax,{className:`font-light text-white bg-[#222] backdrop-blur-md\\r\n                        border-[#222] min-w-[50vw] min-h-[65vh] max-h-[90vh] overflow-auto p-8`,children:[b.jsxs(lx,{children:[b.jsx(cx,{className:\"font-normal text-xl\",children:\"New Project\"}),b.jsx(fx,{className:\"text-base text-[#ccc]\",children:\"Enter details for your new app project\"})]}),b.jsx(Wq,{...d,children:b.jsxs(\"form\",{onSubmit:d.handleSubmit(p),className:\"flex flex-col gap-4 py-4\",children:[b.jsx(rg,{control:d.control,name:\"project\",render:({field:x})=>b.jsxs(Kf,{children:[b.jsx(qf,{className:\"font-light text-base\",children:\"Project\"}),b.jsx(Yf,{children:b.jsx(b0,{...x,onChange:S=>{x.onChange(S),i(h(S.target.value))},className:\"flex-grow bg-[#2a2a2a] border-[#333] text-base\"})}),b.jsx(x0,{className:\"text-[#aaa] text-sm\",children:r&&`id : ${r}`||\"only use   a-z/0-9/hypens\"}),b.jsx(Gf,{})]})}),b.jsx(rg,{control:d.control,name:\"description\",render:({field:x})=>b.jsxs(Kf,{className:\"border-t border-[#333] pt-4\",children:[b.jsxs(qf,{className:\"font-light text-base\",children:[\"Description \",b.jsx(\"span\",{className:\"opacity-50\",children:\"(required)\"})]}),b.jsx(Yf,{children:b.jsxs(\"div\",{className:\"relative\",children:[b.jsx(DL,{...x,className:\"flex-grow bg-[#2a2a2a] border-[#333] text-base font-light pr-10\",placeholder:\"describe your app to the best extent you can\",rows:4}),b.jsx(u0.button,{type:\"button\",onClick:w,className:\"absolute right-4 bottom-4 text-[#aaa] hover:text-white\",whileHover:{scale:1.1},whileTap:{scale:.9},children:b.jsx(\"div\",{className:\"p-2 bg-[#111] hover:bg-green-800 rounded opacity-80\",children:b.jsx(_K,{className:`h-4 w-4 ${o?\"text-red-500\":\"\"}`})})})]})}),b.jsx(Gf,{})]})}),b.jsx(rg,{control:d.control,name:\"aesthetics\",render:({field:x})=>b.jsxs(Kf,{className:\"border-t border-[#333] pt-4\",children:[b.jsxs(qf,{className:\"font-light text-base\",children:[\"Aesthetics \",b.jsx(\"span\",{className:\"opacity-50\",children:\"(optional)\"})]}),b.jsx(Yf,{children:b.jsx(b0,{...x,className:\"flex-grow bg-[#2a2a2a] border-[#333] text-base\",placeholder:\"light theme with blue as primary\"})}),b.jsx(x0,{className:\"text-[#aaa] text-sm\",children:\"the desired overall visual style of your app\"}),b.jsx(Gf,{})]})}),b.jsx(ux,{className:\"mt-4 dark\",children:b.jsx(ta,{type:\"submit\",variant:\"outline\",className:\"font-normal\",children:\"Create Project\"})})]})})]})]})]}),b.jsx(\"div\",{className:\"mt-4 pt-4 border-t border-[#222] grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6\",children:t.map(x=>b.jsx(Kl,{to:`/project/${x.id}`,children:b.jsx(u0.div,{whileHover:{x:5,transition:{duration:.2}},whileTap:{scale:.95},children:b.jsxs(BO,{className:\"h-full hover:shadow-lg transition-shadow duration-300 bg-[#1a1a1a] border-[#333333] group/card\",children:[b.jsx(VO,{children:b.jsx(zO,{className:\"text-xl font-semibold text-[#ffffff] group-hover/card:after:content-['→'] group-hover/card:after:ml-2\",children:x.id})}),b.jsx(UO,{children:x.data&&b.jsx(\"p\",{className:\"text-sm text-[#cccccc] whitespace-pre-wrap break-words line-clamp-5\",children:x.data.text})}),b.jsxs(HO,{className:\"flex gap-4 group border-t border-[#222] pt-4\",children:[b.jsx(ta,{variant:\"\",className:\"font-normal text-xs text-[#ffffff] border-[#333] hover:bg-red-700 duration-200 dark w-1/2\",onClick:S=>{S.preventDefault(),m({project:x.id})},children:\"resume\"}),b.jsx(\"span\",{className:\"hidden group-hover:block text-red-400 text-xs\",children:\"only use if generation was interrupted !\"})]})]})})},x.id))})]})},qq=()=>b.jsx(\"div\",{className:\"flex items-center justify-center h-screen w-full text-white\",children:b.jsxs(\"h1\",{className:\"text-2xl font-light opacity-50 text-center whitespace-pre-wrap break-words\",children:[\"{ playground/designer : not implemented yet }\",b.jsx(\"br\",{}),\"component designer enabled on projects (auto)\"]})}),Yq=()=>b.jsx(\"div\",{className:\"flex items-center justify-center h-screen w-full text-white\",children:b.jsx(\"h1\",{className:\"text-2xl font-light opacity-50 text-center\",children:\"{ settings : not implemented yet }\"})});function ut(e){if(typeof e==\"string\"||typeof e==\"number\")return\"\"+e;let t=\"\";if(Array.isArray(e))for(let n=0,r;n<e.length;n++)(r=ut(e[n]))!==\"\"&&(t+=(t&&\" \")+r);else for(let n in e)e[n]&&(t+=(t&&\" \")+n);return t}var Gq={value:()=>{}};function mp(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+\"\")||r in n||/[\\s.]/.test(r))throw new Error(\"illegal type: \"+r);n[r]=[]}return new Xf(n)}function Xf(e){this._=e}function Xq(e,t){return e.trim().split(/^|\\s+/).map(function(n){var r=\"\",i=n.indexOf(\".\");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error(\"unknown type: \"+n);return{type:n,name:r}})}Xf.prototype=mp.prototype={constructor:Xf,on:function(e,t){var n=this._,r=Xq(e+\"\",n),i,s=-1,o=r.length;if(arguments.length<2){for(;++s<o;)if((i=(e=r[s]).type)&&(i=Qq(n[i],e.name)))return i;return}if(t!=null&&typeof t!=\"function\")throw new Error(\"invalid callback: \"+t);for(;++s<o;)if(i=(e=r[s]).type)n[i]=vE(n[i],e.name,t);else if(t==null)for(i in n)n[i]=vE(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Xf(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,s;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error(\"unknown type: \"+e);for(s=this._[e],r=0,i=s.length;r<i;++r)s[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error(\"unknown type: \"+e);for(var r=this._[e],i=0,s=r.length;i<s;++i)r[i].value.apply(t,n)}};function Qq(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function vE(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=Gq,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var S0=\"http://www.w3.org/1999/xhtml\";const wE={svg:\"http://www.w3.org/2000/svg\",xhtml:S0,xlink:\"http://www.w3.org/1999/xlink\",xml:\"http://www.w3.org/XML/1998/namespace\",xmlns:\"http://www.w3.org/2000/xmlns/\"};function gp(e){var t=e+=\"\",n=t.indexOf(\":\");return n>=0&&(t=e.slice(0,n))!==\"xmlns\"&&(e=e.slice(n+1)),wE.hasOwnProperty(t)?{space:wE[t],local:e}:e}function Zq(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===S0&&t.documentElement.namespaceURI===S0?t.createElement(e):t.createElementNS(n,e)}}function Jq(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function ML(e){var t=gp(e);return(t.local?Jq:Zq)(t)}function eY(){}function dx(e){return e==null?eY:function(){return this.querySelector(e)}}function tY(e){typeof e!=\"function\"&&(e=dx(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var s=t[i],o=s.length,a=r[i]=new Array(o),l,u,f=0;f<o;++f)(l=s[f])&&(u=e.call(l,l.__data__,f,s))&&(\"__data__\"in l&&(u.__data__=l.__data__),a[f]=u);return new Sn(r,this._parents)}function nY(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function rY(){return[]}function jL(e){return e==null?rY:function(){return this.querySelectorAll(e)}}function iY(e){return function(){return nY(e.apply(this,arguments))}}function sY(e){typeof e==\"function\"?e=iY(e):e=jL(e);for(var t=this._groups,n=t.length,r=[],i=[],s=0;s<n;++s)for(var o=t[s],a=o.length,l,u=0;u<a;++u)(l=o[u])&&(r.push(e.call(l,l.__data__,u,o)),i.push(l));return new Sn(r,i)}function FL(e){return function(){return this.matches(e)}}function $L(e){return function(t){return t.matches(e)}}var oY=Array.prototype.find;function aY(e){return function(){return oY.call(this.children,e)}}function lY(){return this.firstElementChild}function uY(e){return this.select(e==null?lY:aY(typeof e==\"function\"?e:$L(e)))}var cY=Array.prototype.filter;function fY(){return Array.from(this.children)}function dY(e){return function(){return cY.call(this.children,e)}}function hY(e){return this.selectAll(e==null?fY:dY(typeof e==\"function\"?e:$L(e)))}function pY(e){typeof e!=\"function\"&&(e=FL(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var s=t[i],o=s.length,a=r[i]=[],l,u=0;u<o;++u)(l=s[u])&&e.call(l,l.__data__,u,s)&&a.push(l);return new Sn(r,this._parents)}function BL(e){return new Array(e.length)}function mY(){return new Sn(this._enter||this._groups.map(BL),this._parents)}function ih(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}ih.prototype={constructor:ih,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function gY(e){return function(){return e}}function yY(e,t,n,r,i,s){for(var o=0,a,l=t.length,u=s.length;o<u;++o)(a=t[o])?(a.__data__=s[o],r[o]=a):n[o]=new ih(e,s[o]);for(;o<l;++o)(a=t[o])&&(i[o]=a)}function vY(e,t,n,r,i,s,o){var a,l,u=new Map,f=t.length,c=s.length,d=new Array(f),h;for(a=0;a<f;++a)(l=t[a])&&(d[a]=h=o.call(l,l.__data__,a,t)+\"\",u.has(h)?i[a]=l:u.set(h,l));for(a=0;a<c;++a)h=o.call(e,s[a],a,s)+\"\",(l=u.get(h))?(r[a]=l,l.__data__=s[a],u.delete(h)):n[a]=new ih(e,s[a]);for(a=0;a<f;++a)(l=t[a])&&u.get(d[a])===l&&(i[a]=l)}function wY(e){return e.__data__}function xY(e,t){if(!arguments.length)return Array.from(this,wY);var n=t?vY:yY,r=this._parents,i=this._groups;typeof e!=\"function\"&&(e=gY(e));for(var s=i.length,o=new Array(s),a=new Array(s),l=new Array(s),u=0;u<s;++u){var f=r[u],c=i[u],d=c.length,h=bY(e.call(f,f&&f.__data__,u,r)),p=h.length,m=a[u]=new Array(p),w=o[u]=new Array(p),y=l[u]=new Array(d);n(f,c,m,w,y,h,t);for(var v=0,g=0,x,S;v<p;++v)if(x=m[v]){for(v>=g&&(g=v+1);!(S=w[g])&&++g<p;);x._next=S||null}}return o=new Sn(o,r),o._enter=a,o._exit=l,o}function bY(e){return typeof e==\"object\"&&\"length\"in e?e:Array.from(e)}function SY(){return new Sn(this._exit||this._groups.map(BL),this._parents)}function kY(e,t,n){var r=this.enter(),i=this,s=this.exit();return typeof e==\"function\"?(r=e(r),r&&(r=r.selection())):r=r.append(e+\"\"),t!=null&&(i=t(i),i&&(i=i.selection())),n==null?s.remove():n(s),r&&i?r.merge(i).order():i}function EY(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,s=r.length,o=Math.min(i,s),a=new Array(i),l=0;l<o;++l)for(var u=n[l],f=r[l],c=u.length,d=a[l]=new Array(c),h,p=0;p<c;++p)(h=u[p]||f[p])&&(d[p]=h);for(;l<i;++l)a[l]=n[l];return new Sn(a,this._parents)}function CY(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,s=r[i],o;--i>=0;)(o=r[i])&&(s&&o.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(o,s),s=o);return this}function TY(e){e||(e=_Y);function t(c,d){return c&&d?e(c.__data__,d.__data__):!c-!d}for(var n=this._groups,r=n.length,i=new Array(r),s=0;s<r;++s){for(var o=n[s],a=o.length,l=i[s]=new Array(a),u,f=0;f<a;++f)(u=o[f])&&(l[f]=u);l.sort(t)}return new Sn(i,this._parents).order()}function _Y(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function AY(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function NY(){return Array.from(this)}function PY(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,s=r.length;i<s;++i){var o=r[i];if(o)return o}return null}function OY(){let e=0;for(const t of this)++e;return e}function LY(){return!this.node()}function RY(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],s=0,o=i.length,a;s<o;++s)(a=i[s])&&e.call(a,a.__data__,s,i);return this}function IY(e){return function(){this.removeAttribute(e)}}function DY(e){return function(){this.removeAttributeNS(e.space,e.local)}}function MY(e,t){return function(){this.setAttribute(e,t)}}function jY(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function FY(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function $Y(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function BY(e,t){var n=gp(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?DY:IY:typeof t==\"function\"?n.local?$Y:FY:n.local?jY:MY)(n,t))}function VL(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function VY(e){return function(){this.style.removeProperty(e)}}function zY(e,t,n){return function(){this.style.setProperty(e,t,n)}}function UY(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function HY(e,t,n){return arguments.length>1?this.each((t==null?VY:typeof t==\"function\"?UY:zY)(e,t,n??\"\")):ba(this.node(),e)}function ba(e,t){return e.style.getPropertyValue(t)||VL(e).getComputedStyle(e,null).getPropertyValue(t)}function WY(e){return function(){delete this[e]}}function KY(e,t){return function(){this[e]=t}}function qY(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function YY(e,t){return arguments.length>1?this.each((t==null?WY:typeof t==\"function\"?qY:KY)(e,t)):this.node()[e]}function zL(e){return e.trim().split(/^|\\s+/)}function hx(e){return e.classList||new UL(e)}function UL(e){this._node=e,this._names=zL(e.getAttribute(\"class\")||\"\")}UL.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute(\"class\",this._names.join(\" \")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute(\"class\",this._names.join(\" \")))},contains:function(e){return this._names.indexOf(e)>=0}};function HL(e,t){for(var n=hx(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function WL(e,t){for(var n=hx(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function GY(e){return function(){HL(this,e)}}function XY(e){return function(){WL(this,e)}}function QY(e,t){return function(){(t.apply(this,arguments)?HL:WL)(this,e)}}function ZY(e,t){var n=zL(e+\"\");if(arguments.length<2){for(var r=hx(this.node()),i=-1,s=n.length;++i<s;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t==\"function\"?QY:t?GY:XY)(n,t))}function JY(){this.textContent=\"\"}function eG(e){return function(){this.textContent=e}}function tG(e){return function(){var t=e.apply(this,arguments);this.textContent=t??\"\"}}function nG(e){return arguments.length?this.each(e==null?JY:(typeof e==\"function\"?tG:eG)(e)):this.node().textContent}function rG(){this.innerHTML=\"\"}function iG(e){return function(){this.innerHTML=e}}function sG(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??\"\"}}function oG(e){return arguments.length?this.each(e==null?rG:(typeof e==\"function\"?sG:iG)(e)):this.node().innerHTML}function aG(){this.nextSibling&&this.parentNode.appendChild(this)}function lG(){return this.each(aG)}function uG(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function cG(){return this.each(uG)}function fG(e){var t=typeof e==\"function\"?e:ML(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function dG(){return null}function hG(e,t){var n=typeof e==\"function\"?e:ML(e),r=t==null?dG:typeof t==\"function\"?t:dx(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function pG(){var e=this.parentNode;e&&e.removeChild(this)}function mG(){return this.each(pG)}function gG(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function yG(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function vG(e){return this.select(e?yG:gG)}function wG(e){return arguments.length?this.property(\"__data__\",e):this.node().__data__}function xG(e){return function(t){e.call(this,t,this.__data__)}}function bG(e){return e.trim().split(/^|\\s+/).map(function(t){var n=\"\",r=t.indexOf(\".\");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function SG(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,s;n<i;++n)s=t[n],(!e.type||s.type===e.type)&&s.name===e.name?this.removeEventListener(s.type,s.listener,s.options):t[++r]=s;++r?t.length=r:delete this.__on}}}function kG(e,t,n){return function(){var r=this.__on,i,s=xG(t);if(r){for(var o=0,a=r.length;o<a;++o)if((i=r[o]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=s,i.options=n),i.value=t;return}}this.addEventListener(e.type,s,n),i={type:e.type,name:e.name,value:t,listener:s,options:n},r?r.push(i):this.__on=[i]}}function EG(e,t,n){var r=bG(e+\"\"),i,s=r.length,o;if(arguments.length<2){var a=this.node().__on;if(a){for(var l=0,u=a.length,f;l<u;++l)for(i=0,f=a[l];i<s;++i)if((o=r[i]).type===f.type&&o.name===f.name)return f.value}return}for(a=t?kG:SG,i=0;i<s;++i)this.each(a(r[i],t,n));return this}function KL(e,t,n){var r=VL(e),i=r.CustomEvent;typeof i==\"function\"?i=new i(t,n):(i=r.document.createEvent(\"Event\"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function CG(e,t){return function(){return KL(this,e,t)}}function TG(e,t){return function(){return KL(this,e,t.apply(this,arguments))}}function _G(e,t){return this.each((typeof t==\"function\"?TG:CG)(e,t))}function*AG(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,s=r.length,o;i<s;++i)(o=r[i])&&(yield o)}var qL=[null];function Sn(e,t){this._groups=e,this._parents=t}function pc(){return new Sn([[document.documentElement]],qL)}function NG(){return this}Sn.prototype=pc.prototype={constructor:Sn,select:tY,selectAll:sY,selectChild:uY,selectChildren:hY,filter:pY,data:xY,enter:mY,exit:SY,join:kY,merge:EY,selection:NG,order:CY,sort:TY,call:AY,nodes:NY,node:PY,size:OY,empty:LY,each:RY,attr:BY,style:HY,property:YY,classed:ZY,text:nG,html:oG,raise:lG,lower:cG,append:fG,insert:hG,remove:mG,clone:vG,datum:wG,on:EG,dispatch:_G,[Symbol.iterator]:AG};function cn(e){return typeof e==\"string\"?new Sn([[document.querySelector(e)]],[document.documentElement]):new Sn([[e]],qL)}function PG(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Xn(e,t){if(e=PG(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}const OG={passive:!1},Iu={capture:!0,passive:!1};function ig(e){e.stopImmediatePropagation()}function ra(e){e.preventDefault(),e.stopImmediatePropagation()}function YL(e){var t=e.document.documentElement,n=cn(e).on(\"dragstart.drag\",ra,Iu);\"onselectstart\"in t?n.on(\"selectstart.drag\",ra,Iu):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect=\"none\")}function GL(e,t){var n=e.document.documentElement,r=cn(e).on(\"dragstart.drag\",null);t&&(r.on(\"click.drag\",ra,Iu),setTimeout(function(){r.on(\"click.drag\",null)},0)),\"onselectstart\"in n?r.on(\"selectstart.drag\",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const nf=e=>()=>e;function k0(e,{sourceEvent:t,subject:n,target:r,identifier:i,active:s,x:o,y:a,dx:l,dy:u,dispatch:f}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:s,enumerable:!0,configurable:!0},x:{value:o,enumerable:!0,configurable:!0},y:{value:a,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:f}})}k0.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function LG(e){return!e.ctrlKey&&!e.button}function RG(){return this.parentNode}function IG(e,t){return t??{x:e.x,y:e.y}}function DG(){return navigator.maxTouchPoints||\"ontouchstart\"in this}function XL(){var e=LG,t=RG,n=IG,r=DG,i={},s=mp(\"start\",\"drag\",\"end\"),o=0,a,l,u,f,c=0;function d(x){x.on(\"mousedown.drag\",h).filter(r).on(\"touchstart.drag\",w).on(\"touchmove.drag\",y,OG).on(\"touchend.drag touchcancel.drag\",v).style(\"touch-action\",\"none\").style(\"-webkit-tap-highlight-color\",\"rgba(0,0,0,0)\")}function h(x,S){if(!(f||!e.call(this,x,S))){var k=g(this,t.call(this,x,S),x,S,\"mouse\");k&&(cn(x.view).on(\"mousemove.drag\",p,Iu).on(\"mouseup.drag\",m,Iu),YL(x.view),ig(x),u=!1,a=x.clientX,l=x.clientY,k(\"start\",x))}}function p(x){if(ra(x),!u){var S=x.clientX-a,k=x.clientY-l;u=S*S+k*k>c}i.mouse(\"drag\",x)}function m(x){cn(x.view).on(\"mousemove.drag mouseup.drag\",null),GL(x.view,u),ra(x),i.mouse(\"end\",x)}function w(x,S){if(e.call(this,x,S)){var k=x.changedTouches,C=t.call(this,x,S),T=k.length,O,A;for(O=0;O<T;++O)(A=g(this,C,x,S,k[O].identifier,k[O]))&&(ig(x),A(\"start\",x,k[O]))}}function y(x){var S=x.changedTouches,k=S.length,C,T;for(C=0;C<k;++C)(T=i[S[C].identifier])&&(ra(x),T(\"drag\",x,S[C]))}function v(x){var S=x.changedTouches,k=S.length,C,T;for(f&&clearTimeout(f),f=setTimeout(function(){f=null},500),C=0;C<k;++C)(T=i[S[C].identifier])&&(ig(x),T(\"end\",x,S[C]))}function g(x,S,k,C,T,O){var A=s.copy(),j=Xn(O||k,S),L,B,N;if((N=n.call(x,new k0(\"beforestart\",{sourceEvent:k,target:d,identifier:T,active:o,x:j[0],y:j[1],dx:0,dy:0,dispatch:A}),C))!=null)return L=N.x-j[0]||0,B=N.y-j[1]||0,function M(I,F,P){var D=j,_;switch(I){case\"start\":i[T]=M,_=o++;break;case\"end\":delete i[T],--o;case\"drag\":j=Xn(P||F,S),_=o;break}A.call(I,x,new k0(I,{sourceEvent:F,subject:N,target:d,identifier:T,active:_,x:j[0]+L,y:j[1]+B,dx:j[0]-D[0],dy:j[1]-D[1],dispatch:A}),C)}}return d.filter=function(x){return arguments.length?(e=typeof x==\"function\"?x:nf(!!x),d):e},d.container=function(x){return arguments.length?(t=typeof x==\"function\"?x:nf(x),d):t},d.subject=function(x){return arguments.length?(n=typeof x==\"function\"?x:nf(x),d):n},d.touchable=function(x){return arguments.length?(r=typeof x==\"function\"?x:nf(!!x),d):r},d.on=function(){var x=s.on.apply(s,arguments);return x===s?d:x},d.clickDistance=function(x){return arguments.length?(c=(x=+x)*x,d):Math.sqrt(c)},d}function px(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function QL(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function mc(){}var Du=.7,sh=1/Du,ia=\"\\\\s*([+-]?\\\\d+)\\\\s*\",Mu=\"\\\\s*([+-]?(?:\\\\d*\\\\.)?\\\\d+(?:[eE][+-]?\\\\d+)?)\\\\s*\",Tr=\"\\\\s*([+-]?(?:\\\\d*\\\\.)?\\\\d+(?:[eE][+-]?\\\\d+)?)%\\\\s*\",MG=/^#([0-9a-f]{3,8})$/,jG=new RegExp(`^rgb\\\\(${ia},${ia},${ia}\\\\)$`),FG=new RegExp(`^rgb\\\\(${Tr},${Tr},${Tr}\\\\)$`),$G=new RegExp(`^rgba\\\\(${ia},${ia},${ia},${Mu}\\\\)$`),BG=new RegExp(`^rgba\\\\(${Tr},${Tr},${Tr},${Mu}\\\\)$`),VG=new RegExp(`^hsl\\\\(${Mu},${Tr},${Tr}\\\\)$`),zG=new RegExp(`^hsla\\\\(${Mu},${Tr},${Tr},${Mu}\\\\)$`),xE={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};px(mc,ju,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:bE,formatHex:bE,formatHex8:UG,formatHsl:HG,formatRgb:SE,toString:SE});function bE(){return this.rgb().formatHex()}function UG(){return this.rgb().formatHex8()}function HG(){return ZL(this).formatHsl()}function SE(){return this.rgb().formatRgb()}function ju(e){var t,n;return e=(e+\"\").trim().toLowerCase(),(t=MG.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?kE(t):n===3?new en(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?rf(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?rf(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=jG.exec(e))?new en(t[1],t[2],t[3],1):(t=FG.exec(e))?new en(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=$G.exec(e))?rf(t[1],t[2],t[3],t[4]):(t=BG.exec(e))?rf(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=VG.exec(e))?TE(t[1],t[2]/100,t[3]/100,1):(t=zG.exec(e))?TE(t[1],t[2]/100,t[3]/100,t[4]):xE.hasOwnProperty(e)?kE(xE[e]):e===\"transparent\"?new en(NaN,NaN,NaN,0):null}function kE(e){return new en(e>>16&255,e>>8&255,e&255,1)}function rf(e,t,n,r){return r<=0&&(e=t=n=NaN),new en(e,t,n,r)}function WG(e){return e instanceof mc||(e=ju(e)),e?(e=e.rgb(),new en(e.r,e.g,e.b,e.opacity)):new en}function E0(e,t,n,r){return arguments.length===1?WG(e):new en(e,t,n,r??1)}function en(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}px(en,E0,QL(mc,{brighter(e){return e=e==null?sh:Math.pow(sh,e),new en(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Du:Math.pow(Du,e),new en(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new en(Ms(this.r),Ms(this.g),Ms(this.b),oh(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:EE,formatHex:EE,formatHex8:KG,formatRgb:CE,toString:CE}));function EE(){return`#${Ns(this.r)}${Ns(this.g)}${Ns(this.b)}`}function KG(){return`#${Ns(this.r)}${Ns(this.g)}${Ns(this.b)}${Ns((isNaN(this.opacity)?1:this.opacity)*255)}`}function CE(){const e=oh(this.opacity);return`${e===1?\"rgb(\":\"rgba(\"}${Ms(this.r)}, ${Ms(this.g)}, ${Ms(this.b)}${e===1?\")\":`, ${e})`}`}function oh(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ms(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ns(e){return e=Ms(e),(e<16?\"0\":\"\")+e.toString(16)}function TE(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new er(e,t,n,r)}function ZL(e){if(e instanceof er)return new er(e.h,e.s,e.l,e.opacity);if(e instanceof mc||(e=ju(e)),!e)return new er;if(e instanceof er)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),s=Math.max(t,n,r),o=NaN,a=s-i,l=(s+i)/2;return a?(t===s?o=(n-r)/a+(n<r)*6:n===s?o=(r-t)/a+2:o=(t-n)/a+4,a/=l<.5?s+i:2-s-i,o*=60):a=l>0&&l<1?0:o,new er(o,a,l,e.opacity)}function qG(e,t,n,r){return arguments.length===1?ZL(e):new er(e,t,n,r??1)}function er(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}px(er,qG,QL(mc,{brighter(e){return e=e==null?sh:Math.pow(sh,e),new er(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Du:Math.pow(Du,e),new er(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new en(sg(e>=240?e-240:e+120,i,r),sg(e,i,r),sg(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new er(_E(this.h),sf(this.s),sf(this.l),oh(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=oh(this.opacity);return`${e===1?\"hsl(\":\"hsla(\"}${_E(this.h)}, ${sf(this.s)*100}%, ${sf(this.l)*100}%${e===1?\")\":`, ${e})`}`}}));function _E(e){return e=(e||0)%360,e<0?e+360:e}function sf(e){return Math.max(0,Math.min(1,e||0))}function sg(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const JL=e=>()=>e;function YG(e,t){return function(n){return e+n*t}}function GG(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function XG(e){return(e=+e)==1?eR:function(t,n){return n-t?GG(t,n,e):JL(isNaN(t)?n:t)}}function eR(e,t){var n=t-e;return n?YG(e,n):JL(isNaN(e)?t:e)}const AE=function e(t){var n=XG(t);function r(i,s){var o=n((i=E0(i)).r,(s=E0(s)).r),a=n(i.g,s.g),l=n(i.b,s.b),u=eR(i.opacity,s.opacity);return function(f){return i.r=o(f),i.g=a(f),i.b=l(f),i.opacity=u(f),i+\"\"}}return r.gamma=e,r}(1);function Ti(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var C0=/[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,og=new RegExp(C0.source,\"g\");function QG(e){return function(){return e}}function ZG(e){return function(t){return e(t)+\"\"}}function JG(e,t){var n=C0.lastIndex=og.lastIndex=0,r,i,s,o=-1,a=[],l=[];for(e=e+\"\",t=t+\"\";(r=C0.exec(e))&&(i=og.exec(t));)(s=i.index)>n&&(s=t.slice(n,s),a[o]?a[o]+=s:a[++o]=s),(r=r[0])===(i=i[0])?a[o]?a[o]+=i:a[++o]=i:(a[++o]=null,l.push({i:o,x:Ti(r,i)})),n=og.lastIndex;return n<t.length&&(s=t.slice(n),a[o]?a[o]+=s:a[++o]=s),a.length<2?l[0]?ZG(l[0].x):QG(t):(t=l.length,function(u){for(var f=0,c;f<t;++f)a[(c=l[f]).i]=c.x(u);return a.join(\"\")})}var NE=180/Math.PI,T0={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function tR(e,t,n,r,i,s){var o,a,l;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(l=e*n+t*r)&&(n-=e*l,r-=t*l),(a=Math.sqrt(n*n+r*r))&&(n/=a,r/=a,l/=a),e*r<t*n&&(e=-e,t=-t,l=-l,o=-o),{translateX:i,translateY:s,rotate:Math.atan2(t,e)*NE,skewX:Math.atan(l)*NE,scaleX:o,scaleY:a}}var of;function eX(e){const t=new(typeof DOMMatrix==\"function\"?DOMMatrix:WebKitCSSMatrix)(e+\"\");return t.isIdentity?T0:tR(t.a,t.b,t.c,t.d,t.e,t.f)}function tX(e){return e==null||(of||(of=document.createElementNS(\"http://www.w3.org/2000/svg\",\"g\")),of.setAttribute(\"transform\",e),!(e=of.transform.baseVal.consolidate()))?T0:(e=e.matrix,tR(e.a,e.b,e.c,e.d,e.e,e.f))}function nR(e,t,n,r){function i(u){return u.length?u.pop()+\" \":\"\"}function s(u,f,c,d,h,p){if(u!==c||f!==d){var m=h.push(\"translate(\",null,t,null,n);p.push({i:m-4,x:Ti(u,c)},{i:m-2,x:Ti(f,d)})}else(c||d)&&h.push(\"translate(\"+c+t+d+n)}function o(u,f,c,d){u!==f?(u-f>180?f+=360:f-u>180&&(u+=360),d.push({i:c.push(i(c)+\"rotate(\",null,r)-2,x:Ti(u,f)})):f&&c.push(i(c)+\"rotate(\"+f+r)}function a(u,f,c,d){u!==f?d.push({i:c.push(i(c)+\"skewX(\",null,r)-2,x:Ti(u,f)}):f&&c.push(i(c)+\"skewX(\"+f+r)}function l(u,f,c,d,h,p){if(u!==c||f!==d){var m=h.push(i(h)+\"scale(\",null,\",\",null,\")\");p.push({i:m-4,x:Ti(u,c)},{i:m-2,x:Ti(f,d)})}else(c!==1||d!==1)&&h.push(i(h)+\"scale(\"+c+\",\"+d+\")\")}return function(u,f){var c=[],d=[];return u=e(u),f=e(f),s(u.translateX,u.translateY,f.translateX,f.translateY,c,d),o(u.rotate,f.rotate,c,d),a(u.skewX,f.skewX,c,d),l(u.scaleX,u.scaleY,f.scaleX,f.scaleY,c,d),u=f=null,function(h){for(var p=-1,m=d.length,w;++p<m;)c[(w=d[p]).i]=w.x(h);return c.join(\"\")}}}var nX=nR(eX,\"px, \",\"px)\",\"deg)\"),rX=nR(tX,\", \",\")\",\")\"),iX=1e-12;function PE(e){return((e=Math.exp(e))+1/e)/2}function sX(e){return((e=Math.exp(e))-1/e)/2}function oX(e){return((e=Math.exp(2*e))-1)/(e+1)}const aX=function e(t,n,r){function i(s,o){var a=s[0],l=s[1],u=s[2],f=o[0],c=o[1],d=o[2],h=f-a,p=c-l,m=h*h+p*p,w,y;if(m<iX)y=Math.log(d/u)/t,w=function(C){return[a+C*h,l+C*p,u*Math.exp(t*C*y)]};else{var v=Math.sqrt(m),g=(d*d-u*u+r*m)/(2*u*n*v),x=(d*d-u*u-r*m)/(2*d*n*v),S=Math.log(Math.sqrt(g*g+1)-g),k=Math.log(Math.sqrt(x*x+1)-x);y=(k-S)/t,w=function(C){var T=C*y,O=PE(S),A=u/(n*v)*(O*oX(t*T+S)-sX(S));return[a+A*h,l+A*p,u*O/PE(t*T+S)]}}return w.duration=y*1e3*t/Math.SQRT2,w}return i.rho=function(s){var o=Math.max(.001,+s),a=o*o,l=a*a;return e(o,a,l)},i}(Math.SQRT2,2,4);var Sa=0,Ll=0,yl=0,rR=1e3,ah,Rl,lh=0,Gs=0,yp=0,Fu=typeof performance==\"object\"&&performance.now?performance:Date,iR=typeof window==\"object\"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function mx(){return Gs||(iR(lX),Gs=Fu.now()+yp)}function lX(){Gs=0}function uh(){this._call=this._time=this._next=null}uh.prototype=sR.prototype={constructor:uh,restart:function(e,t,n){if(typeof e!=\"function\")throw new TypeError(\"callback is not a function\");n=(n==null?mx():+n)+(t==null?0:+t),!this._next&&Rl!==this&&(Rl?Rl._next=this:ah=this,Rl=this),this._call=e,this._time=n,_0()},stop:function(){this._call&&(this._call=null,this._time=1/0,_0())}};function sR(e,t,n){var r=new uh;return r.restart(e,t,n),r}function uX(){mx(),++Sa;for(var e=ah,t;e;)(t=Gs-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Sa}function OE(){Gs=(lh=Fu.now())+yp,Sa=Ll=0;try{uX()}finally{Sa=0,fX(),Gs=0}}function cX(){var e=Fu.now(),t=e-lh;t>rR&&(yp-=t,lh=e)}function fX(){for(var e,t=ah,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:ah=n);Rl=e,_0(r)}function _0(e){if(!Sa){Ll&&(Ll=clearTimeout(Ll));var t=e-Gs;t>24?(e<1/0&&(Ll=setTimeout(OE,e-Fu.now()-yp)),yl&&(yl=clearInterval(yl))):(yl||(lh=Fu.now(),yl=setInterval(cX,rR)),Sa=1,iR(OE))}}function LE(e,t,n){var r=new uh;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}var dX=mp(\"start\",\"end\",\"cancel\",\"interrupt\"),hX=[],oR=0,RE=1,A0=2,Qf=3,IE=4,N0=5,Zf=6;function vp(e,t,n,r,i,s){var o=e.__transition;if(!o)e.__transition={};else if(n in o)return;pX(e,n,{name:t,index:r,group:i,on:dX,tween:hX,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:oR})}function gx(e,t){var n=fr(e,t);if(n.state>oR)throw new Error(\"too late; already scheduled\");return n}function Or(e,t){var n=fr(e,t);if(n.state>Qf)throw new Error(\"too late; already running\");return n}function fr(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error(\"transition not found\");return n}function pX(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=sR(s,0,n.time);function s(u){n.state=RE,n.timer.restart(o,n.delay,n.time),n.delay<=u&&o(u-n.delay)}function o(u){var f,c,d,h;if(n.state!==RE)return l();for(f in r)if(h=r[f],h.name===n.name){if(h.state===Qf)return LE(o);h.state===IE?(h.state=Zf,h.timer.stop(),h.on.call(\"interrupt\",e,e.__data__,h.index,h.group),delete r[f]):+f<t&&(h.state=Zf,h.timer.stop(),h.on.call(\"cancel\",e,e.__data__,h.index,h.group),delete r[f])}if(LE(function(){n.state===Qf&&(n.state=IE,n.timer.restart(a,n.delay,n.time),a(u))}),n.state=A0,n.on.call(\"start\",e,e.__data__,n.index,n.group),n.state===A0){for(n.state=Qf,i=new Array(d=n.tween.length),f=0,c=-1;f<d;++f)(h=n.tween[f].value.call(e,e.__data__,n.index,n.group))&&(i[++c]=h);i.length=c+1}}function a(u){for(var f=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(l),n.state=N0,1),c=-1,d=i.length;++c<d;)i[c].call(e,f);n.state===N0&&(n.on.call(\"end\",e,e.__data__,n.index,n.group),l())}function l(){n.state=Zf,n.timer.stop(),delete r[t];for(var u in r)return;delete e.__transition}}function Jf(e,t){var n=e.__transition,r,i,s=!0,o;if(n){t=t==null?null:t+\"\";for(o in n){if((r=n[o]).name!==t){s=!1;continue}i=r.state>A0&&r.state<N0,r.state=Zf,r.timer.stop(),r.on.call(i?\"interrupt\":\"cancel\",e,e.__data__,r.index,r.group),delete n[o]}s&&delete e.__transition}}function mX(e){return this.each(function(){Jf(this,e)})}function gX(e,t){var n,r;return function(){var i=Or(this,e),s=i.tween;if(s!==n){r=n=s;for(var o=0,a=r.length;o<a;++o)if(r[o].name===t){r=r.slice(),r.splice(o,1);break}}i.tween=r}}function yX(e,t,n){var r,i;if(typeof n!=\"function\")throw new Error;return function(){var s=Or(this,e),o=s.tween;if(o!==r){i=(r=o).slice();for(var a={name:t,value:n},l=0,u=i.length;l<u;++l)if(i[l].name===t){i[l]=a;break}l===u&&i.push(a)}s.tween=i}}function vX(e,t){var n=this._id;if(e+=\"\",arguments.length<2){for(var r=fr(this.node(),n).tween,i=0,s=r.length,o;i<s;++i)if((o=r[i]).name===e)return o.value;return null}return this.each((t==null?gX:yX)(n,e,t))}function yx(e,t,n){var r=e._id;return e.each(function(){var i=Or(this,r);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return fr(i,r).value[t]}}function aR(e,t){var n;return(typeof t==\"number\"?Ti:t instanceof ju?AE:(n=ju(t))?(t=n,AE):JG)(e,t)}function wX(e){return function(){this.removeAttribute(e)}}function xX(e){return function(){this.removeAttributeNS(e.space,e.local)}}function bX(e,t,n){var r,i=n+\"\",s;return function(){var o=this.getAttribute(e);return o===i?null:o===r?s:s=t(r=o,n)}}function SX(e,t,n){var r,i=n+\"\",s;return function(){var o=this.getAttributeNS(e.space,e.local);return o===i?null:o===r?s:s=t(r=o,n)}}function kX(e,t,n){var r,i,s;return function(){var o,a=n(this),l;return a==null?void this.removeAttribute(e):(o=this.getAttribute(e),l=a+\"\",o===l?null:o===r&&l===i?s:(i=l,s=t(r=o,a)))}}function EX(e,t,n){var r,i,s;return function(){var o,a=n(this),l;return a==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),l=a+\"\",o===l?null:o===r&&l===i?s:(i=l,s=t(r=o,a)))}}function CX(e,t){var n=gp(e),r=n===\"transform\"?rX:aR;return this.attrTween(e,typeof t==\"function\"?(n.local?EX:kX)(n,r,yx(this,\"attr.\"+e,t)):t==null?(n.local?xX:wX)(n):(n.local?SX:bX)(n,r,t))}function TX(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function _X(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function AX(e,t){var n,r;function i(){var s=t.apply(this,arguments);return s!==r&&(n=(r=s)&&_X(e,s)),n}return i._value=t,i}function NX(e,t){var n,r;function i(){var s=t.apply(this,arguments);return s!==r&&(n=(r=s)&&TX(e,s)),n}return i._value=t,i}function PX(e,t){var n=\"attr.\"+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!=\"function\")throw new Error;var r=gp(e);return this.tween(n,(r.local?AX:NX)(r,t))}function OX(e,t){return function(){gx(this,e).delay=+t.apply(this,arguments)}}function LX(e,t){return t=+t,function(){gx(this,e).delay=t}}function RX(e){var t=this._id;return arguments.length?this.each((typeof e==\"function\"?OX:LX)(t,e)):fr(this.node(),t).delay}function IX(e,t){return function(){Or(this,e).duration=+t.apply(this,arguments)}}function DX(e,t){return t=+t,function(){Or(this,e).duration=t}}function MX(e){var t=this._id;return arguments.length?this.each((typeof e==\"function\"?IX:DX)(t,e)):fr(this.node(),t).duration}function jX(e,t){if(typeof t!=\"function\")throw new Error;return function(){Or(this,e).ease=t}}function FX(e){var t=this._id;return arguments.length?this.each(jX(t,e)):fr(this.node(),t).ease}function $X(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!=\"function\")throw new Error;Or(this,e).ease=n}}function BX(e){if(typeof e!=\"function\")throw new Error;return this.each($X(this._id,e))}function VX(e){typeof e!=\"function\"&&(e=FL(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var s=t[i],o=s.length,a=r[i]=[],l,u=0;u<o;++u)(l=s[u])&&e.call(l,l.__data__,u,s)&&a.push(l);return new li(r,this._parents,this._name,this._id)}function zX(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,i=n.length,s=Math.min(r,i),o=new Array(r),a=0;a<s;++a)for(var l=t[a],u=n[a],f=l.length,c=o[a]=new Array(f),d,h=0;h<f;++h)(d=l[h]||u[h])&&(c[h]=d);for(;a<r;++a)o[a]=t[a];return new li(o,this._parents,this._name,this._id)}function UX(e){return(e+\"\").trim().split(/^|\\s+/).every(function(t){var n=t.indexOf(\".\");return n>=0&&(t=t.slice(0,n)),!t||t===\"start\"})}function HX(e,t,n){var r,i,s=UX(t)?gx:Or;return function(){var o=s(this,e),a=o.on;a!==r&&(i=(r=a).copy()).on(t,n),o.on=i}}function WX(e,t){var n=this._id;return arguments.length<2?fr(this.node(),n).on.on(e):this.each(HX(n,e,t))}function KX(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function qX(){return this.on(\"end.remove\",KX(this._id))}function YX(e){var t=this._name,n=this._id;typeof e!=\"function\"&&(e=dx(e));for(var r=this._groups,i=r.length,s=new Array(i),o=0;o<i;++o)for(var a=r[o],l=a.length,u=s[o]=new Array(l),f,c,d=0;d<l;++d)(f=a[d])&&(c=e.call(f,f.__data__,d,a))&&(\"__data__\"in f&&(c.__data__=f.__data__),u[d]=c,vp(u[d],t,n,d,u,fr(f,n)));return new li(s,this._parents,t,n)}function GX(e){var t=this._name,n=this._id;typeof e!=\"function\"&&(e=jL(e));for(var r=this._groups,i=r.length,s=[],o=[],a=0;a<i;++a)for(var l=r[a],u=l.length,f,c=0;c<u;++c)if(f=l[c]){for(var d=e.call(f,f.__data__,c,l),h,p=fr(f,n),m=0,w=d.length;m<w;++m)(h=d[m])&&vp(h,t,n,m,d,p);s.push(d),o.push(f)}return new li(s,o,t,n)}var XX=pc.prototype.constructor;function QX(){return new XX(this._groups,this._parents)}function ZX(e,t){var n,r,i;return function(){var s=ba(this,e),o=(this.style.removeProperty(e),ba(this,e));return s===o?null:s===n&&o===r?i:i=t(n=s,r=o)}}function lR(e){return function(){this.style.removeProperty(e)}}function JX(e,t,n){var r,i=n+\"\",s;return function(){var o=ba(this,e);return o===i?null:o===r?s:s=t(r=o,n)}}function eQ(e,t,n){var r,i,s;return function(){var o=ba(this,e),a=n(this),l=a+\"\";return a==null&&(l=a=(this.style.removeProperty(e),ba(this,e))),o===l?null:o===r&&l===i?s:(i=l,s=t(r=o,a))}}function tQ(e,t){var n,r,i,s=\"style.\"+t,o=\"end.\"+s,a;return function(){var l=Or(this,e),u=l.on,f=l.value[s]==null?a||(a=lR(t)):void 0;(u!==n||i!==f)&&(r=(n=u).copy()).on(o,i=f),l.on=r}}function nQ(e,t,n){var r=(e+=\"\")==\"transform\"?nX:aR;return t==null?this.styleTween(e,ZX(e,r)).on(\"end.style.\"+e,lR(e)):typeof t==\"function\"?this.styleTween(e,eQ(e,r,yx(this,\"style.\"+e,t))).each(tQ(this._id,e)):this.styleTween(e,JX(e,r,t),n).on(\"end.style.\"+e,null)}function rQ(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function iQ(e,t,n){var r,i;function s(){var o=t.apply(this,arguments);return o!==i&&(r=(i=o)&&rQ(e,o,n)),r}return s._value=t,s}function sQ(e,t,n){var r=\"style.\"+(e+=\"\");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!=\"function\")throw new Error;return this.tween(r,iQ(e,t,n??\"\"))}function oQ(e){return function(){this.textContent=e}}function aQ(e){return function(){var t=e(this);this.textContent=t??\"\"}}function lQ(e){return this.tween(\"text\",typeof e==\"function\"?aQ(yx(this,\"text\",e)):oQ(e==null?\"\":e+\"\"))}function uQ(e){return function(t){this.textContent=e.call(this,t)}}function cQ(e){var t,n;function r(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&uQ(i)),t}return r._value=e,r}function fQ(e){var t=\"text\";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!=\"function\")throw new Error;return this.tween(t,cQ(e))}function dQ(){for(var e=this._name,t=this._id,n=uR(),r=this._groups,i=r.length,s=0;s<i;++s)for(var o=r[s],a=o.length,l,u=0;u<a;++u)if(l=o[u]){var f=fr(l,t);vp(l,e,n,u,o,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new li(r,this._parents,e,n)}function hQ(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(s,o){var a={value:o},l={value:function(){--i===0&&s()}};n.each(function(){var u=Or(this,r),f=u.on;f!==e&&(t=(e=f).copy(),t._.cancel.push(a),t._.interrupt.push(a),t._.end.push(l)),u.on=t}),i===0&&s()})}var pQ=0;function li(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function uR(){return++pQ}var Fr=pc.prototype;li.prototype={constructor:li,select:YX,selectAll:GX,selectChild:Fr.selectChild,selectChildren:Fr.selectChildren,filter:VX,merge:zX,selection:QX,transition:dQ,call:Fr.call,nodes:Fr.nodes,node:Fr.node,size:Fr.size,empty:Fr.empty,each:Fr.each,on:WX,attr:CX,attrTween:PX,style:nQ,styleTween:sQ,text:lQ,textTween:fQ,remove:qX,tween:vX,delay:RX,duration:MX,ease:FX,easeVarying:BX,end:hQ,[Symbol.iterator]:Fr[Symbol.iterator]};function mQ(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var gQ={time:null,delay:0,duration:250,ease:mQ};function yQ(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function vQ(e){var t,n;e instanceof li?(t=e._id,e=e._name):(t=uR(),(n=gQ).time=mx(),e=e==null?null:e+\"\");for(var r=this._groups,i=r.length,s=0;s<i;++s)for(var o=r[s],a=o.length,l,u=0;u<a;++u)(l=o[u])&&vp(l,e,t,u,o,n||yQ(l,t));return new li(r,this._parents,e,t)}pc.prototype.interrupt=mX;pc.prototype.transition=vQ;const af=e=>()=>e;function wQ(e,{sourceEvent:t,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function Kr(e,t,n){this.k=e,this.x=t,this.y=n}Kr.prototype={constructor:Kr,scale:function(e){return e===1?this:new Kr(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Kr(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return\"translate(\"+this.x+\",\"+this.y+\") scale(\"+this.k+\")\"}};var wp=new Kr(1,0,0);cR.prototype=Kr.prototype;function cR(e){for(;!e.__zoom;)if(!(e=e.parentNode))return wp;return e.__zoom}function ag(e){e.stopImmediatePropagation()}function vl(e){e.preventDefault(),e.stopImmediatePropagation()}function xQ(e){return(!e.ctrlKey||e.type===\"wheel\")&&!e.button}function bQ(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute(\"viewBox\")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function DE(){return this.__zoom||wp}function SQ(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function kQ(){return navigator.maxTouchPoints||\"ontouchstart\"in this}function EQ(e,t,n){var r=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],s=e.invertY(t[0][1])-n[0][1],o=e.invertY(t[1][1])-n[1][1];return e.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),o>s?(s+o)/2:Math.min(0,s)||Math.max(0,o))}function fR(){var e=xQ,t=bQ,n=EQ,r=SQ,i=kQ,s=[0,1/0],o=[[-1/0,-1/0],[1/0,1/0]],a=250,l=aX,u=mp(\"start\",\"zoom\",\"end\"),f,c,d,h=500,p=150,m=0,w=10;function y(N){N.property(\"__zoom\",DE).on(\"wheel.zoom\",T,{passive:!1}).on(\"mousedown.zoom\",O).on(\"dblclick.zoom\",A).filter(i).on(\"touchstart.zoom\",j).on(\"touchmove.zoom\",L).on(\"touchend.zoom touchcancel.zoom\",B).style(\"-webkit-tap-highlight-color\",\"rgba(0,0,0,0)\")}y.transform=function(N,M,I,F){var P=N.selection?N.selection():N;P.property(\"__zoom\",DE),N!==P?S(N,M,I,F):P.interrupt().each(function(){k(this,arguments).event(F).start().zoom(null,typeof M==\"function\"?M.apply(this,arguments):M).end()})},y.scaleBy=function(N,M,I,F){y.scaleTo(N,function(){var P=this.__zoom.k,D=typeof M==\"function\"?M.apply(this,arguments):M;return P*D},I,F)},y.scaleTo=function(N,M,I,F){y.transform(N,function(){var P=t.apply(this,arguments),D=this.__zoom,_=I==null?x(P):typeof I==\"function\"?I.apply(this,arguments):I,V=D.invert(_),W=typeof M==\"function\"?M.apply(this,arguments):M;return n(g(v(D,W),_,V),P,o)},I,F)},y.translateBy=function(N,M,I,F){y.transform(N,function(){return n(this.__zoom.translate(typeof M==\"function\"?M.apply(this,arguments):M,typeof I==\"function\"?I.apply(this,arguments):I),t.apply(this,arguments),o)},null,F)},y.translateTo=function(N,M,I,F,P){y.transform(N,function(){var D=t.apply(this,arguments),_=this.__zoom,V=F==null?x(D):typeof F==\"function\"?F.apply(this,arguments):F;return n(wp.translate(V[0],V[1]).scale(_.k).translate(typeof M==\"function\"?-M.apply(this,arguments):-M,typeof I==\"function\"?-I.apply(this,arguments):-I),D,o)},F,P)};function v(N,M){return M=Math.max(s[0],Math.min(s[1],M)),M===N.k?N:new Kr(M,N.x,N.y)}function g(N,M,I){var F=M[0]-I[0]*N.k,P=M[1]-I[1]*N.k;return F===N.x&&P===N.y?N:new Kr(N.k,F,P)}function x(N){return[(+N[0][0]+ +N[1][0])/2,(+N[0][1]+ +N[1][1])/2]}function S(N,M,I,F){N.on(\"start.zoom\",function(){k(this,arguments).event(F).start()}).on(\"interrupt.zoom end.zoom\",function(){k(this,arguments).event(F).end()}).tween(\"zoom\",function(){var P=this,D=arguments,_=k(P,D).event(F),V=t.apply(P,D),W=I==null?x(V):typeof I==\"function\"?I.apply(P,D):I,R=Math.max(V[1][0]-V[0][0],V[1][1]-V[0][1]),q=P.__zoom,J=typeof M==\"function\"?M.apply(P,D):M,Y=l(q.invert(W).concat(R/q.k),J.invert(W).concat(R/J.k));return function(re){if(re===1)re=J;else{var G=Y(re),le=R/G[2];re=new Kr(le,W[0]-G[0]*le,W[1]-G[1]*le)}_.zoom(null,re)}})}function k(N,M,I){return!I&&N.__zooming||new C(N,M)}function C(N,M){this.that=N,this.args=M,this.active=0,this.sourceEvent=null,this.extent=t.apply(N,M),this.taps=0}C.prototype={event:function(N){return N&&(this.sourceEvent=N),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit(\"start\")),this},zoom:function(N,M){return this.mouse&&N!==\"mouse\"&&(this.mouse[1]=M.invert(this.mouse[0])),this.touch0&&N!==\"touch\"&&(this.touch0[1]=M.invert(this.touch0[0])),this.touch1&&N!==\"touch\"&&(this.touch1[1]=M.invert(this.touch1[0])),this.that.__zoom=M,this.emit(\"zoom\"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit(\"end\")),this},emit:function(N){var M=cn(this.that).datum();u.call(N,this.that,new wQ(N,{sourceEvent:this.sourceEvent,target:y,type:N,transform:this.that.__zoom,dispatch:u}),M)}};function T(N,...M){if(!e.apply(this,arguments))return;var I=k(this,M).event(N),F=this.__zoom,P=Math.max(s[0],Math.min(s[1],F.k*Math.pow(2,r.apply(this,arguments)))),D=Xn(N);if(I.wheel)(I.mouse[0][0]!==D[0]||I.mouse[0][1]!==D[1])&&(I.mouse[1]=F.invert(I.mouse[0]=D)),clearTimeout(I.wheel);else{if(F.k===P)return;I.mouse=[D,F.invert(D)],Jf(this),I.start()}vl(N),I.wheel=setTimeout(_,p),I.zoom(\"mouse\",n(g(v(F,P),I.mouse[0],I.mouse[1]),I.extent,o));function _(){I.wheel=null,I.end()}}function O(N,...M){if(d||!e.apply(this,arguments))return;var I=N.currentTarget,F=k(this,M,!0).event(N),P=cn(N.view).on(\"mousemove.zoom\",W,!0).on(\"mouseup.zoom\",R,!0),D=Xn(N,I),_=N.clientX,V=N.clientY;YL(N.view),ag(N),F.mouse=[D,this.__zoom.invert(D)],Jf(this),F.start();function W(q){if(vl(q),!F.moved){var J=q.clientX-_,Y=q.clientY-V;F.moved=J*J+Y*Y>m}F.event(q).zoom(\"mouse\",n(g(F.that.__zoom,F.mouse[0]=Xn(q,I),F.mouse[1]),F.extent,o))}function R(q){P.on(\"mousemove.zoom mouseup.zoom\",null),GL(q.view,F.moved),vl(q),F.event(q).end()}}function A(N,...M){if(e.apply(this,arguments)){var I=this.__zoom,F=Xn(N.changedTouches?N.changedTouches[0]:N,this),P=I.invert(F),D=I.k*(N.shiftKey?.5:2),_=n(g(v(I,D),F,P),t.apply(this,M),o);vl(N),a>0?cn(this).transition().duration(a).call(S,_,F,N):cn(this).call(y.transform,_,F,N)}}function j(N,...M){if(e.apply(this,arguments)){var I=N.touches,F=I.length,P=k(this,M,N.changedTouches.length===F).event(N),D,_,V,W;for(ag(N),_=0;_<F;++_)V=I[_],W=Xn(V,this),W=[W,this.__zoom.invert(W),V.identifier],P.touch0?!P.touch1&&P.touch0[2]!==W[2]&&(P.touch1=W,P.taps=0):(P.touch0=W,D=!0,P.taps=1+!!f);f&&(f=clearTimeout(f)),D&&(P.taps<2&&(c=W[0],f=setTimeout(function(){f=null},h)),Jf(this),P.start())}}function L(N,...M){if(this.__zooming){var I=k(this,M).event(N),F=N.changedTouches,P=F.length,D,_,V,W;for(vl(N),D=0;D<P;++D)_=F[D],V=Xn(_,this),I.touch0&&I.touch0[2]===_.identifier?I.touch0[0]=V:I.touch1&&I.touch1[2]===_.identifier&&(I.touch1[0]=V);if(_=I.that.__zoom,I.touch1){var R=I.touch0[0],q=I.touch0[1],J=I.touch1[0],Y=I.touch1[1],re=(re=J[0]-R[0])*re+(re=J[1]-R[1])*re,G=(G=Y[0]-q[0])*G+(G=Y[1]-q[1])*G;_=v(_,Math.sqrt(re/G)),V=[(R[0]+J[0])/2,(R[1]+J[1])/2],W=[(q[0]+Y[0])/2,(q[1]+Y[1])/2]}else if(I.touch0)V=I.touch0[0],W=I.touch0[1];else return;I.zoom(\"touch\",n(g(_,V,W),I.extent,o))}}function B(N,...M){if(this.__zooming){var I=k(this,M).event(N),F=N.changedTouches,P=F.length,D,_;for(ag(N),d&&clearTimeout(d),d=setTimeout(function(){d=null},h),D=0;D<P;++D)_=F[D],I.touch0&&I.touch0[2]===_.identifier?delete I.touch0:I.touch1&&I.touch1[2]===_.identifier&&delete I.touch1;if(I.touch1&&!I.touch0&&(I.touch0=I.touch1,delete I.touch1),I.touch0)I.touch0[1]=this.__zoom.invert(I.touch0[0]);else if(I.end(),I.taps===2&&(_=Xn(_,this),Math.hypot(c[0]-_[0],c[1]-_[1])<w)){var V=cn(this).on(\"dblclick.zoom\");V&&V.apply(this,arguments)}}}return y.wheelDelta=function(N){return arguments.length?(r=typeof N==\"function\"?N:af(+N),y):r},y.filter=function(N){return arguments.length?(e=typeof N==\"function\"?N:af(!!N),y):e},y.touchable=function(N){return arguments.length?(i=typeof N==\"function\"?N:af(!!N),y):i},y.extent=function(N){return arguments.length?(t=typeof N==\"function\"?N:af([[+N[0][0],+N[0][1]],[+N[1][0],+N[1][1]]]),y):t},y.scaleExtent=function(N){return arguments.length?(s[0]=+N[0],s[1]=+N[1],y):[s[0],s[1]]},y.translateExtent=function(N){return arguments.length?(o[0][0]=+N[0][0],o[1][0]=+N[1][0],o[0][1]=+N[0][1],o[1][1]=+N[1][1],y):[[o[0][0],o[0][1]],[o[1][0],o[1][1]]]},y.constrain=function(N){return arguments.length?(n=N,y):n},y.duration=function(N){return arguments.length?(a=+N,y):a},y.interpolate=function(N){return arguments.length?(l=N,y):l},y.on=function(){var N=u.on.apply(u,arguments);return N===u?y:N},y.clickDistance=function(N){return arguments.length?(m=(N=+N)*N,y):Math.sqrt(m)},y.tapDistance=function(N){return arguments.length?(w=+N,y):w},y}const hi={error001:()=>\"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001\",error002:()=>\"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.\",error003:e=>`Node type \"${e}\" not found. Using fallback type \"default\".`,error004:()=>\"The React Flow parent container needs a width and a height to render the graph.\",error005:()=>\"Only child nodes can use a parent extent.\",error006:()=>\"Can't create edge. An edge needs a source and a target.\",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type \"${e}\" doesn't exist.`,error008:(e,{id:t,sourceHandle:n,targetHandle:r})=>`Couldn't create edge for ${e} handle id: \"${e===\"source\"?n:r}\", edge id: ${t}.`,error010:()=>\"Handle: No node id found. Make sure to only use a Handle inside a custom Node.\",error011:e=>`Edge type \"${e}\" not found. Using fallback type \"default\".`,error012:e=>`Node with id \"${e}\" does not exist, it may have been removed. This can happen when a node is deleted before the \"onNodeClick\" handler is called.`,error013:(e=\"react\")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`},$u=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],dR=[\"Enter\",\" \",\"Escape\"];var ka;(function(e){e.Strict=\"strict\",e.Loose=\"loose\"})(ka||(ka={}));var js;(function(e){e.Free=\"free\",e.Vertical=\"vertical\",e.Horizontal=\"horizontal\"})(js||(js={}));var Bu;(function(e){e.Partial=\"partial\",e.Full=\"full\"})(Bu||(Bu={}));const hR={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null};var Pi;(function(e){e.Bezier=\"default\",e.Straight=\"straight\",e.Step=\"step\",e.SmoothStep=\"smoothstep\",e.SimpleBezier=\"simplebezier\"})(Pi||(Pi={}));var Xs;(function(e){e.Arrow=\"arrow\",e.ArrowClosed=\"arrowclosed\"})(Xs||(Xs={}));var se;(function(e){e.Left=\"left\",e.Top=\"top\",e.Right=\"right\",e.Bottom=\"bottom\"})(se||(se={}));const ME={[se.Left]:se.Right,[se.Right]:se.Left,[se.Top]:se.Bottom,[se.Bottom]:se.Top};function pR(e){return e===null?null:e?\"valid\":\"invalid\"}const mR=e=>\"id\"in e&&\"source\"in e&&\"target\"in e,CQ=e=>\"id\"in e&&\"position\"in e&&!(\"source\"in e)&&!(\"target\"in e),vx=e=>\"id\"in e&&\"internals\"in e&&!(\"source\"in e)&&!(\"target\"in e),xp=(e,t=[0,0])=>{const{width:n,height:r}=cs(e),i=e.origin??t,s=n*i[0],o=r*i[1];return{x:e.position.x-s,y:e.position.y-o}},TQ=(e,t={nodeOrigin:[0,0],nodeLookup:void 0})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((r,i)=>{const s=typeof i==\"string\";let o=!t.nodeLookup&&!s?i:void 0;t.nodeLookup&&(o=s?t.nodeLookup.get(i):vx(i)?i:t.nodeLookup.get(i.id));const a=o?ch(o,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return bp(r,a)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Sp(n)},gc=(e,t={})=>{if(e.size===0)return{x:0,y:0,width:0,height:0};let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0};return e.forEach(r=>{if(t.filter===void 0||t.filter(r)){const i=ch(r);n=bp(n,i)}}),Sp(n)},gR=(e,t,[n,r,i]=[0,0,1],s=!1,o=!1)=>{const a={...yc(t,[n,r,i]),width:t.width/i,height:t.height/i},l=[];for(const u of e.values()){const{measured:f,selectable:c=!0,hidden:d=!1}=u;if(o&&!c||d)continue;const h=f.width??u.width??u.initialWidth??null,p=f.height??u.height??u.initialHeight??null,m=Vu(a,Ta(u)),w=(h??0)*(p??0),y=s&&m>0;(!u.internals.handleBounds||y||m>=w||u.dragging)&&l.push(u)}return l},_Q=(e,t)=>{const n=new Set;return e.forEach(r=>{n.add(r.id)}),t.filter(r=>n.has(r.source)||n.has(r.target))};function P0(e,t){const n=new Map,r=t!=null&&t.nodes?new Set(t.nodes.map(i=>i.id)):null;return e.forEach(i=>{i.measured.width&&i.measured.height&&((t==null?void 0:t.includeHiddenNodes)||!i.hidden)&&(!r||r.has(i.id))&&n.set(i.id,i)}),n}async function O0({nodes:e,width:t,height:n,panZoom:r,minZoom:i,maxZoom:s},o){if(e.size===0)return Promise.resolve(!1);const a=gc(e),l=wx(a,t,n,(o==null?void 0:o.minZoom)??i,(o==null?void 0:o.maxZoom)??s,(o==null?void 0:o.padding)??.1);return await r.setViewport(l,{duration:o==null?void 0:o.duration}),Promise.resolve(!0)}function yR({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:r=[0,0],nodeExtent:i,onError:s}){const o=n.get(e),a=o.parentId?n.get(o.parentId):void 0,{x:l,y:u}=a?a.internals.positionAbsolute:{x:0,y:0},f=o.origin??r;let c=i;if(o.extent===\"parent\"&&!o.expandParent)if(!a)s==null||s(\"005\",hi.error005());else{const h=a.measured.width,p=a.measured.height;h&&p&&(c=[[l,u],[l+h,u+p]])}else a&&zu(o.extent)&&(c=[[o.extent[0][0]+l,o.extent[0][1]+u],[o.extent[1][0]+l,o.extent[1][1]+u]]);const d=zu(c)?Ca(t,c,o.measured):t;return{position:{x:d.x-l+o.measured.width*f[0],y:d.y-u+o.measured.height*f[1]},positionAbsolute:d}}async function AQ({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:r,onBeforeDelete:i}){const s=new Set(e.map(d=>d.id)),o=[];for(const d of n){if(d.deletable===!1)continue;const h=s.has(d.id),p=!h&&d.parentId&&o.find(m=>m.id===d.parentId);(h||p)&&o.push(d)}const a=new Set(t.map(d=>d.id)),l=r.filter(d=>d.deletable!==!1),f=_Q(o,l);for(const d of l)a.has(d.id)&&!f.find(p=>p.id===d.id)&&f.push(d);if(!i)return{edges:f,nodes:o};const c=await i({nodes:o,edges:f});return typeof c==\"boolean\"?c?{edges:f,nodes:o}:{edges:[],nodes:[]}:c}const Ea=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),Ca=(e={x:0,y:0},t,n)=>({x:Ea(e.x,t[0][0],t[1][0]-((n==null?void 0:n.width)??0)),y:Ea(e.y,t[0][1],t[1][1]-((n==null?void 0:n.height)??0))});function vR(e,t,n){const{width:r,height:i}=cs(n),{x:s,y:o}=n.internals.positionAbsolute;return Ca(e,[[s,o],[s+r,o+i]],t)}const jE=(e,t,n)=>e<t?Ea(Math.abs(e-t),1,t)/t:e>n?-Ea(Math.abs(e-n),1,t)/t:0,wR=(e,t,n=15,r=40)=>{const i=jE(e.x,r,t.width-r)*n,s=jE(e.y,r,t.height-r)*n;return[i,s]},bp=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),L0=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),Sp=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),Ta=(e,t=[0,0])=>{var i,s;const{x:n,y:r}=vx(e)?e.internals.positionAbsolute:xp(e,t);return{x:n,y:r,width:((i=e.measured)==null?void 0:i.width)??e.width??e.initialWidth??0,height:((s=e.measured)==null?void 0:s.height)??e.height??e.initialHeight??0}},ch=(e,t=[0,0])=>{var i,s;const{x:n,y:r}=vx(e)?e.internals.positionAbsolute:xp(e,t);return{x:n,y:r,x2:n+(((i=e.measured)==null?void 0:i.width)??e.width??e.initialWidth??0),y2:r+(((s=e.measured)==null?void 0:s.height)??e.height??e.initialHeight??0)}},xR=(e,t)=>Sp(bp(L0(e),L0(t))),Vu=(e,t)=>{const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),r=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*r)},FE=e=>tr(e.width)&&tr(e.height)&&tr(e.x)&&tr(e.y),tr=e=>!isNaN(e)&&isFinite(e),NQ=(e,t)=>{},kp=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),yc=({x:e,y:t},[n,r,i],s=!1,o=[1,1])=>{const a={x:(e-n)/i,y:(t-r)/i};return s?kp(a,o):a},bR=({x:e,y:t},[n,r,i])=>({x:e*i+n,y:t*i+r}),wx=(e,t,n,r,i,s)=>{const o=t/(e.width*(1+s)),a=n/(e.height*(1+s)),l=Math.min(o,a),u=Ea(l,r,i),f=e.x+e.width/2,c=e.y+e.height/2,d=t/2-f*u,h=n/2-c*u;return{x:d,y:h,zoom:u}},fh=()=>{var e;return typeof navigator<\"u\"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf(\"Mac\"))>=0};function zu(e){return e!==void 0&&e!==\"parent\"}function cs(e){var t,n;return{width:((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth??0,height:((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight??0}}function SR(e){var t,n;return(((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth)!==void 0&&(((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight)!==void 0}function kR(e,t={width:0,height:0},n,r,i){let s=n;const o={...e};for(;s;){const a=r.get(s);if(s=a==null?void 0:a.parentId,a){const l=a.origin||i;o.x+=a.internals.positionAbsolute.x-(t.width??0)*l[0],o.y+=a.internals.positionAbsolute.y-(t.height??0)*l[1]}}return o}function eu(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:r}){const{x:i,y:s}=Jr(e),o=yc({x:i,y:s},r),{x:a,y:l}=n?kp(o,t):o;return{xSnapped:a,ySnapped:l,...o}}const xx=e=>({width:e.offsetWidth,height:e.offsetHeight}),ER=e=>{var t;return((t=e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},PQ=[\"INPUT\",\"SELECT\",\"TEXTAREA\"];function R0(e){var r,i;const t=((i=(r=e.composedPath)==null?void 0:r.call(e))==null?void 0:i[0])||e.target;return PQ.includes(t==null?void 0:t.nodeName)||(t==null?void 0:t.hasAttribute(\"contenteditable\"))||!!(t!=null&&t.closest(\".nokey\"))}const CR=e=>\"clientX\"in e,Jr=(e,t)=>{var s,o;const n=CR(e),r=n?e.clientX:(s=e.touches)==null?void 0:s[0].clientX,i=n?e.clientY:(o=e.touches)==null?void 0:o[0].clientY;return{x:r-((t==null?void 0:t.left)??0),y:i-((t==null?void 0:t.top)??0)}},$E=(e,t,n,r,i)=>{const s=t.querySelectorAll(`.${e}`);return!s||!s.length?null:Array.from(s).map(o=>{const a=o.getBoundingClientRect();return{id:o.getAttribute(\"data-handleid\"),type:e,nodeId:i,position:o.getAttribute(\"data-handlepos\"),x:(a.left-n.left)/r,y:(a.top-n.top)/r,...xx(o)}})};function TR({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:i,sourceControlY:s,targetControlX:o,targetControlY:a}){const l=e*.125+i*.375+o*.375+n*.125,u=t*.125+s*.375+a*.375+r*.125,f=Math.abs(l-e),c=Math.abs(u-t);return[l,u,f,c]}function lf(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function BE({pos:e,x1:t,y1:n,x2:r,y2:i,c:s}){switch(e){case se.Left:return[t-lf(t-r,s),n];case se.Right:return[t+lf(r-t,s),n];case se.Top:return[t,n-lf(n-i,s)];case se.Bottom:return[t,n+lf(i-n,s)]}}function Ep({sourceX:e,sourceY:t,sourcePosition:n=se.Bottom,targetX:r,targetY:i,targetPosition:s=se.Top,curvature:o=.25}){const[a,l]=BE({pos:n,x1:e,y1:t,x2:r,y2:i,c:o}),[u,f]=BE({pos:s,x1:r,y1:i,x2:e,y2:t,c:o}),[c,d,h,p]=TR({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:a,sourceControlY:l,targetControlX:u,targetControlY:f});return[`M${e},${t} C${a},${l} ${u},${f} ${r},${i}`,c,d,h,p]}function _R({sourceX:e,sourceY:t,targetX:n,targetY:r}){const i=Math.abs(n-e)/2,s=n<e?n+i:n-i,o=Math.abs(r-t)/2,a=r<t?r+o:r-o;return[s,a,i,o]}function OQ({sourceNode:e,targetNode:t,selected:n=!1,zIndex:r=0,elevateOnSelect:i=!1}){if(!i)return r;const s=n||t.selected||e.selected,o=Math.max(e.internals.z||0,t.internals.z||0,1e3);return r+(s?o:0)}function LQ({sourceNode:e,targetNode:t,width:n,height:r,transform:i}){const s=bp(ch(e),ch(t));s.x===s.x2&&(s.x2+=1),s.y===s.y2&&(s.y2+=1);const o={x:-i[0]/i[2],y:-i[1]/i[2],width:n/i[2],height:r/i[2]};return Vu(o,Sp(s))>0}const RQ=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`xy-edge__${e}${t||\"\"}-${n}${r||\"\"}`,IQ=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),AR=(e,t)=>{if(!e.source||!e.target)return t;let n;return mR(e)?n={...e}:n={...e,id:RQ(e)},IQ(n,t)?t:(n.sourceHandle===null&&delete n.sourceHandle,n.targetHandle===null&&delete n.targetHandle,t.concat(n))};function NR({sourceX:e,sourceY:t,targetX:n,targetY:r}){const[i,s,o,a]=_R({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,i,s,o,a]}const VE={[se.Left]:{x:-1,y:0},[se.Right]:{x:1,y:0},[se.Top]:{x:0,y:-1},[se.Bottom]:{x:0,y:1}},DQ=({source:e,sourcePosition:t=se.Bottom,target:n})=>t===se.Left||t===se.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},zE=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function MQ({source:e,sourcePosition:t=se.Bottom,target:n,targetPosition:r=se.Top,center:i,offset:s}){const o=VE[t],a=VE[r],l={x:e.x+o.x*s,y:e.y+o.y*s},u={x:n.x+a.x*s,y:n.y+a.y*s},f=DQ({source:l,sourcePosition:t,target:u}),c=f.x!==0?\"x\":\"y\",d=f[c];let h=[],p,m;const w={x:0,y:0},y={x:0,y:0},[v,g,x,S]=_R({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(o[c]*a[c]===-1){p=i.x??v,m=i.y??g;const C=[{x:p,y:l.y},{x:p,y:u.y}],T=[{x:l.x,y:m},{x:u.x,y:m}];o[c]===d?h=c===\"x\"?C:T:h=c===\"x\"?T:C}else{const C=[{x:l.x,y:u.y}],T=[{x:u.x,y:l.y}];if(c===\"x\"?h=o.x===d?T:C:h=o.y===d?C:T,t===r){const B=Math.abs(e[c]-n[c]);if(B<=s){const N=Math.min(s-1,s-B);o[c]===d?w[c]=(l[c]>e[c]?-1:1)*N:y[c]=(u[c]>n[c]?-1:1)*N}}if(t!==r){const B=c===\"x\"?\"y\":\"x\",N=o[c]===a[B],M=l[B]>u[B],I=l[B]<u[B];(o[c]===1&&(!N&&M||N&&I)||o[c]!==1&&(!N&&I||N&&M))&&(h=c===\"x\"?C:T)}const O={x:l.x+w.x,y:l.y+w.y},A={x:u.x+y.x,y:u.y+y.y},j=Math.max(Math.abs(O.x-h[0].x),Math.abs(A.x-h[0].x)),L=Math.max(Math.abs(O.y-h[0].y),Math.abs(A.y-h[0].y));j>=L?(p=(O.x+A.x)/2,m=h[0].y):(p=h[0].x,m=(O.y+A.y)/2)}return[[e,{x:l.x+w.x,y:l.y+w.y},...h,{x:u.x+y.x,y:u.y+y.y},n],p,m,x,S]}function jQ(e,t,n,r){const i=Math.min(zE(e,t)/2,zE(t,n)/2,r),{x:s,y:o}=t;if(e.x===s&&s===n.x||e.y===o&&o===n.y)return`L${s} ${o}`;if(e.y===o){const u=e.x<n.x?-1:1,f=e.y<n.y?1:-1;return`L ${s+i*u},${o}Q ${s},${o} ${s},${o+i*f}`}const a=e.x<n.x?1:-1,l=e.y<n.y?-1:1;return`L ${s},${o+i*l}Q ${s},${o} ${s+i*a},${o}`}function I0({sourceX:e,sourceY:t,sourcePosition:n=se.Bottom,targetX:r,targetY:i,targetPosition:s=se.Top,borderRadius:o=5,centerX:a,centerY:l,offset:u=20}){const[f,c,d,h,p]=MQ({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:i},targetPosition:s,center:{x:a,y:l},offset:u});return[f.reduce((w,y,v)=>{let g=\"\";return v>0&&v<f.length-1?g=jQ(f[v-1],y,f[v+1],o):g=`${v===0?\"M\":\"L\"}${y.x} ${y.y}`,w+=g,w},\"\"),c,d,h,p]}function UE(e){var t;return e&&!!(e.internals.handleBounds||(t=e.handles)!=null&&t.length)&&!!(e.measured.width||e.width||e.initialWidth)}function FQ(e){var c;const{sourceNode:t,targetNode:n}=e;if(!UE(t)||!UE(n))return null;const r=t.internals.handleBounds||HE(t.handles),i=n.internals.handleBounds||HE(n.handles),s=WE((r==null?void 0:r.source)??[],e.sourceHandle),o=WE(e.connectionMode===ka.Strict?(i==null?void 0:i.target)??[]:((i==null?void 0:i.target)??[]).concat((i==null?void 0:i.source)??[]),e.targetHandle);if(!s||!o)return(c=e.onError)==null||c.call(e,\"008\",hi.error008(s?\"target\":\"source\",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const a=(s==null?void 0:s.position)||se.Bottom,l=(o==null?void 0:o.position)||se.Top,u=Uu(t,s,a),f=Uu(n,o,l);return{sourceX:u.x,sourceY:u.y,targetX:f.x,targetY:f.y,sourcePosition:a,targetPosition:l}}function HE(e){if(!e)return null;const t=[],n=[];for(const r of e)r.width=r.width??1,r.height=r.height??1,r.type===\"source\"?t.push(r):r.type===\"target\"&&n.push(r);return{source:t,target:n}}function Uu(e,t,n=se.Left,r=!1){const i=((t==null?void 0:t.x)??0)+e.internals.positionAbsolute.x,s=((t==null?void 0:t.y)??0)+e.internals.positionAbsolute.y,{width:o,height:a}=t??cs(e);if(r)return{x:i+o/2,y:s+a/2};switch((t==null?void 0:t.position)??n){case se.Top:return{x:i+o/2,y:s};case se.Right:return{x:i+o,y:s+a/2};case se.Bottom:return{x:i+o/2,y:s+a};case se.Left:return{x:i,y:s+a/2}}}function WE(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function D0(e,t){return e?typeof e==\"string\"?e:`${t?`${t}__`:\"\"}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join(\"&\")}`:\"\"}function $Q(e,{id:t,defaultColor:n,defaultMarkerStart:r,defaultMarkerEnd:i}){const s=new Set;return e.reduce((o,a)=>([a.markerStart||r,a.markerEnd||i].forEach(l=>{if(l&&typeof l==\"object\"){const u=D0(l,t);s.has(u)||(o.push({id:u,color:l.color||n,...l}),s.add(u))}}),o),[]).sort((o,a)=>o.id.localeCompare(a.id))}const bx={nodeOrigin:[0,0],nodeExtent:$u,elevateNodesOnSelect:!0,defaults:{}},BQ={...bx,checkEquality:!0};function Sx(e,t){const n={...e};for(const r in t)t[r]!==void 0&&(n[r]=t[r]);return n}function VQ(e,t,n){const r=Sx(bx,n);for(const i of e.values())i.parentId&&kx(i,e,t,r)}function M0(e,t,n,r){var a,l;const i=Sx(BQ,r),s=new Map(t),o=i!=null&&i.elevateNodesOnSelect?1e3:0;t.clear(),n.clear();for(const u of e){let f=s.get(u.id);if(i.checkEquality&&u===(f==null?void 0:f.internals.userNode))t.set(u.id,f);else{const c=xp(u,i.nodeOrigin),d=zu(u.extent)?u.extent:i.nodeExtent,h=Ca(c,d,cs(u));f={...i.defaults,...u,measured:{width:(a=u.measured)==null?void 0:a.width,height:(l=u.measured)==null?void 0:l.height},internals:{positionAbsolute:h,handleBounds:u.measured?f==null?void 0:f.internals.handleBounds:void 0,z:PR(u,o),userNode:u}},t.set(u.id,f)}u.parentId&&kx(f,t,n,r)}}function zQ(e,t){if(!e.parentId)return;const n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function kx(e,t,n,r){const{elevateNodesOnSelect:i,nodeOrigin:s,nodeExtent:o}=Sx(bx,r),a=e.parentId,l=t.get(a);if(!l){console.warn(`Parent node ${a} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}zQ(e,n);const u=i?1e3:0,{x:f,y:c,z:d}=UQ(e,l,s,o,u),{positionAbsolute:h}=e.internals,p=f!==h.x||c!==h.y;(p||d!==e.internals.z)&&(e.internals={...e.internals,positionAbsolute:p?{x:f,y:c}:h,z:d})}function PR(e,t){return(tr(e.zIndex)?e.zIndex:0)+(e.selected?t:0)}function UQ(e,t,n,r,i){const{x:s,y:o}=t.internals.positionAbsolute,a=cs(e),l=xp(e,n),u=zu(e.extent)?Ca(l,e.extent,a):l;let f=Ca({x:s+u.x,y:o+u.y},r,a);e.extent===\"parent\"&&(f=vR(f,a,t));const c=PR(e,i),d=t.internals.z??0;return{x:f.x,y:f.y,z:d>c?d:c}}function Ex(e,t,n,r=[0,0]){var o;const i=[],s=new Map;for(const a of e){const l=t.get(a.parentId);if(!l)continue;const u=((o=s.get(a.parentId))==null?void 0:o.expandedRect)??Ta(l),f=xR(u,a.rect);s.set(a.parentId,{expandedRect:f,parent:l})}return s.size>0&&s.forEach(({expandedRect:a,parent:l},u)=>{var g;const f=l.internals.positionAbsolute,c=cs(l),d=l.origin??r,h=a.x<f.x?Math.round(Math.abs(f.x-a.x)):0,p=a.y<f.y?Math.round(Math.abs(f.y-a.y)):0,m=Math.max(c.width,Math.round(a.width)),w=Math.max(c.height,Math.round(a.height)),y=(m-c.width)*d[0],v=(w-c.height)*d[1];(h>0||p>0||y||v)&&(i.push({id:u,type:\"position\",position:{x:l.position.x-h+y,y:l.position.y-p+v}}),(g=n.get(u))==null||g.forEach(x=>{e.some(S=>S.id===x.id)||i.push({id:x.id,type:\"position\",position:{x:x.position.x+h,y:x.position.y+p}})})),(c.width<a.width||c.height<a.height||h||p)&&i.push({id:u,type:\"dimensions\",setAttributes:!0,dimensions:{width:m+(h?d[0]*h-y:0),height:w+(p?d[1]*p-v:0)}})}),i}function HQ(e,t,n,r,i,s){const o=r==null?void 0:r.querySelector(\".xyflow__viewport\");let a=!1;if(!o)return{changes:[],updatedInternals:a};const l=[],u=window.getComputedStyle(o),{m22:f}=new window.DOMMatrixReadOnly(u.transform),c=[];for(const d of e.values()){const h=t.get(d.id);if(h)if(h.hidden)h.internals={...h.internals,handleBounds:void 0},a=!0;else{const p=xx(d.nodeElement),m=h.measured.width!==p.width||h.measured.height!==p.height;if(!!(p.width&&p.height&&(m||!h.internals.handleBounds||d.force))){const y=d.nodeElement.getBoundingClientRect(),v=zu(h.extent)?h.extent:s;let{positionAbsolute:g}=h.internals;h.parentId&&h.extent===\"parent\"?g=vR(g,p,t.get(h.parentId)):v&&(g=Ca(g,v,p)),h.measured=p,h.internals={...h.internals,positionAbsolute:g,handleBounds:{source:$E(\"source\",d.nodeElement,y,f,h.id),target:$E(\"target\",d.nodeElement,y,f,h.id)}},h.parentId&&kx(h,t,n,{nodeOrigin:i}),a=!0,m&&(l.push({id:h.id,type:\"dimensions\",dimensions:p}),h.expandParent&&h.parentId&&c.push({id:h.id,parentId:h.parentId,rect:Ta(h,i)}))}}}if(c.length>0){const d=Ex(c,t,n,i);l.push(...d)}return{changes:l,updatedInternals:a}}async function WQ({delta:e,panZoom:t,transform:n,translateExtent:r,width:i,height:s}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);const o=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[i,s]],r),a=!!o&&(o.x!==n[0]||o.y!==n[1]||o.k!==n[2]);return Promise.resolve(a)}function OR(e,t,n){e.clear(),t.clear();for(const r of n){const{source:i,target:s,sourceHandle:o=null,targetHandle:a=null}=r,l=`${i}-source-${o}`,u=`${s}-target-${a}`,f=e.get(l)||new Map,c=e.get(u)||new Map,d={edgeId:r.id,source:i,target:s,sourceHandle:o,targetHandle:a};t.set(r.id,r),e.set(l,f.set(`${s}-${a}`,d)),e.set(u,c.set(`${i}-${o}`,d))}}function LR(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:LR(n,t):!1}function KE(e,t,n){let r=e;do{if(r!=null&&r.matches(t))return!0;if(r===n)return!1;r=r.parentElement}while(r);return!1}function KQ(e,t,n,r){const i=new Map;for(const[s,o]of e)if((o.selected||o.id===r)&&(!o.parentId||!LR(o,e))&&(o.draggable||t&&typeof o.draggable>\"u\")){const a=e.get(s);a&&i.set(s,{id:s,position:a.position||{x:0,y:0},distance:{x:n.x-a.internals.positionAbsolute.x,y:n.y-a.internals.positionAbsolute.y},extent:a.extent,parentId:a.parentId,origin:a.origin,expandParent:a.expandParent,internals:{positionAbsolute:a.internals.positionAbsolute||{x:0,y:0}},measured:{width:a.measured.width??0,height:a.measured.height??0}})}return i}function lg({nodeId:e,dragItems:t,nodeLookup:n,dragging:r=!0}){var o,a;const i=[];for(const[l,u]of t){const f=(o=n.get(l))==null?void 0:o.internals.userNode;f&&i.push({...f,position:u.position,dragging:r})}if(!e)return[i[0],i];const s=n.get(e).internals.userNode;return[{...s,position:((a=t.get(e))==null?void 0:a.position)||s.position,dragging:r},i]}function qQ({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:r,onDragStop:i}){let s={x:null,y:null},o=0,a=new Map,l=!1,u={x:0,y:0},f=null,c=!1,d=null,h=!1;function p({noDragClassName:w,handleSelector:y,domNode:v,isSelectable:g,nodeId:x,nodeClickDistance:S=0}){d=cn(v);function k({x:A,y:j},L){const{nodeLookup:B,nodeExtent:N,snapGrid:M,snapToGrid:I,nodeOrigin:F,onNodeDrag:P,onSelectionDrag:D,onError:_,updateNodePositions:V}=t();s={x:A,y:j};let W=!1,R={x:0,y:0,x2:0,y2:0};if(a.size>1&&N){const q=gc(a);R=L0(q)}for(const[q,J]of a){let Y={x:A-J.distance.x,y:j-J.distance.y};I&&(Y=kp(Y,M));let re=[[N[0][0],N[0][1]],[N[1][0],N[1][1]]];if(a.size>1&&N&&!J.extent){const{positionAbsolute:de}=J.internals,ue=de.x-R.x+N[0][0],ie=de.x+J.measured.width-R.x2+N[1][0],pe=de.y-R.y+N[0][1],Ne=de.y+J.measured.height-R.y2+N[1][1];re=[[ue,pe],[ie,Ne]]}const{position:G,positionAbsolute:le}=yR({nodeId:q,nextPosition:Y,nodeLookup:B,nodeExtent:re,nodeOrigin:F,onError:_});W=W||J.position.x!==G.x||J.position.y!==G.y,J.position=G,J.internals.positionAbsolute=le}if(W&&(V(a,!0),L&&(r||P||!x&&D))){const[q,J]=lg({nodeId:x,dragItems:a,nodeLookup:B});r==null||r(L,a,q,J),P==null||P(L,q,J),x||D==null||D(L,J)}}async function C(){if(!f)return;const{transform:A,panBy:j,autoPanSpeed:L}=t(),[B,N]=wR(u,f,L);(B!==0||N!==0)&&(s.x=(s.x??0)-B/A[2],s.y=(s.y??0)-N/A[2],await j({x:B,y:N})&&k(s,null)),o=requestAnimationFrame(C)}function T(A){var W;const{nodeLookup:j,multiSelectionActive:L,nodesDraggable:B,transform:N,snapGrid:M,snapToGrid:I,selectNodesOnDrag:F,onNodeDragStart:P,onSelectionDragStart:D,unselectNodesAndEdges:_}=t();c=!0,(!F||!g)&&!L&&x&&((W=j.get(x))!=null&&W.selected||_()),g&&F&&x&&(e==null||e(x));const V=eu(A.sourceEvent,{transform:N,snapGrid:M,snapToGrid:I});if(s=V,a=KQ(j,B,V,x),a.size>0&&(n||P||!x&&D)){const[R,q]=lg({nodeId:x,dragItems:a,nodeLookup:j});n==null||n(A.sourceEvent,a,R,q),P==null||P(A.sourceEvent,R,q),x||D==null||D(A.sourceEvent,q)}}const O=XL().clickDistance(S).on(\"start\",A=>{const{domNode:j,nodeDragThreshold:L,transform:B,snapGrid:N,snapToGrid:M}=t();h=!1,L===0&&T(A),s=eu(A.sourceEvent,{transform:B,snapGrid:N,snapToGrid:M}),f=(j==null?void 0:j.getBoundingClientRect())||null,u=Jr(A.sourceEvent,f)}).on(\"drag\",A=>{const{autoPanOnNodeDrag:j,transform:L,snapGrid:B,snapToGrid:N,nodeDragThreshold:M}=t(),I=eu(A.sourceEvent,{transform:L,snapGrid:B,snapToGrid:N});if(A.sourceEvent.type===\"touchmove\"&&A.sourceEvent.touches.length>1&&(h=!0),!h){if(!l&&j&&c&&(l=!0,C()),!c){const F=I.xSnapped-(s.x??0),P=I.ySnapped-(s.y??0);Math.sqrt(F*F+P*P)>M&&T(A)}(s.x!==I.xSnapped||s.y!==I.ySnapped)&&a&&c&&(u=Jr(A.sourceEvent,f),k(I,A.sourceEvent))}}).on(\"end\",A=>{if(!(!c||h)&&(l=!1,c=!1,cancelAnimationFrame(o),a.size>0)){const{nodeLookup:j,updateNodePositions:L,onNodeDragStop:B,onSelectionDragStop:N}=t();if(L(a,!1),i||B||!x&&N){const[M,I]=lg({nodeId:x,dragItems:a,nodeLookup:j,dragging:!1});i==null||i(A.sourceEvent,a,M,I),B==null||B(A.sourceEvent,M,I),x||N==null||N(A.sourceEvent,I)}}}).filter(A=>{const j=A.target;return!A.button&&(!w||!KE(j,`.${w}`,v))&&(!y||KE(j,y,v))});d.call(O)}function m(){d==null||d.on(\".drag\",null)}return{update:p,destroy:m}}function YQ(e,t,n){const r=[],i={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const s of t.values())Vu(i,Ta(s))>0&&r.push(s);return r}const GQ=250;function XQ(e,t,n,r){var a,l;let i=[],s=1/0;const o=YQ(e,n,t+GQ);for(const u of o){const f=[...((a=u.internals.handleBounds)==null?void 0:a.source)??[],...((l=u.internals.handleBounds)==null?void 0:l.target)??[]];for(const c of f){if(r.nodeId===c.nodeId&&r.type===c.type&&r.id===c.id)continue;const{x:d,y:h}=Uu(u,c,c.position,!0),p=Math.sqrt(Math.pow(d-e.x,2)+Math.pow(h-e.y,2));p>t||(p<s?(i=[{...c,x:d,y:h}],s=p):p===s&&i.push({...c,x:d,y:h}))}}if(!i.length)return null;if(i.length>1){const u=r.type===\"source\"?\"target\":\"source\";return i.find(f=>f.type===u)??i[0]}return i[0]}function RR(e,t,n,r,i,s=!1){var u,f,c;const o=r.get(e);if(!o)return null;const a=i===\"strict\"?(u=o.internals.handleBounds)==null?void 0:u[t]:[...((f=o.internals.handleBounds)==null?void 0:f.source)??[],...((c=o.internals.handleBounds)==null?void 0:c.target)??[]],l=(n?a==null?void 0:a.find(d=>d.id===n):a==null?void 0:a[0])??null;return l&&s?{...l,...Uu(o,l,l.position,!0)}:l}function IR(e,t){return e||(t!=null&&t.classList.contains(\"target\")?\"target\":t!=null&&t.classList.contains(\"source\")?\"source\":null)}function QQ(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const DR=()=>!0;function ZQ(e,{connectionMode:t,connectionRadius:n,handleId:r,nodeId:i,edgeUpdaterType:s,isTarget:o,domNode:a,nodeLookup:l,lib:u,autoPanOnConnect:f,flowId:c,panBy:d,cancelConnection:h,onConnectStart:p,onConnect:m,onConnectEnd:w,isValidConnection:y=DR,onReconnectEnd:v,updateConnection:g,getTransform:x,getFromHandle:S,autoPanSpeed:k}){const C=ER(e.target);let T=0,O;const{x:A,y:j}=Jr(e),L=C==null?void 0:C.elementFromPoint(A,j),B=IR(s,L),N=a==null?void 0:a.getBoundingClientRect();if(!N||!B)return;const M=RR(i,B,r,l,t);if(!M)return;let I=Jr(e,N),F=!1,P=null,D=!1,_=null;function V(){if(!f||!N)return;const[le,de]=wR(I,N,k);d({x:le,y:de}),T=requestAnimationFrame(V)}const W={...M,nodeId:i,type:B,position:M.position},R=l.get(i),J={inProgress:!0,isValid:null,from:Uu(R,W,se.Left,!0),fromHandle:W,fromPosition:W.position,fromNode:R,to:I,toHandle:null,toPosition:ME[W.position],toNode:null};g(J);let Y=J;p==null||p(e,{nodeId:i,handleId:r,handleType:B});function re(le){if(!S()||!W){G(le);return}const de=x();I=Jr(le,N),O=XQ(yc(I,de,!1,[1,1]),n,l,W),F||(V(),F=!0);const ue=MR(le,{handle:O,connectionMode:t,fromNodeId:i,fromHandleId:r,fromType:o?\"target\":\"source\",isValidConnection:y,doc:C,lib:u,flowId:c,nodeLookup:l});_=ue.handleDomNode,P=ue.connection,D=QQ(!!O,ue.isValid);const ie={...Y,isValid:D,to:O&&D?bR({x:O.x,y:O.y},de):I,toHandle:ue.toHandle,toPosition:D&&ue.toHandle?ue.toHandle.position:ME[W.position],toNode:ue.toHandle?l.get(ue.toHandle.nodeId):null};D&&O&&Y.toHandle&&ie.toHandle&&Y.toHandle.type===ie.toHandle.type&&Y.toHandle.nodeId===ie.toHandle.nodeId&&Y.toHandle.id===ie.toHandle.id&&Y.to.x===ie.to.x&&Y.to.y===ie.to.y||(g(ie),Y=ie)}function G(le){(O||_)&&P&&D&&(m==null||m(P));const{inProgress:de,...ue}=Y,ie={...ue,toPosition:Y.toHandle?Y.toPosition:null};w==null||w(le,ie),s&&(v==null||v(le,ie)),h(),cancelAnimationFrame(T),F=!1,D=!1,P=null,_=null,C.removeEventListener(\"mousemove\",re),C.removeEventListener(\"mouseup\",G),C.removeEventListener(\"touchmove\",re),C.removeEventListener(\"touchend\",G)}C.addEventListener(\"mousemove\",re),C.addEventListener(\"mouseup\",G),C.addEventListener(\"touchmove\",re),C.addEventListener(\"touchend\",G)}function MR(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:i,fromType:s,doc:o,lib:a,flowId:l,isValidConnection:u=DR,nodeLookup:f}){const c=s===\"target\",d=t?o.querySelector(`.${a}-flow__handle[data-id=\"${l}-${t==null?void 0:t.nodeId}-${t==null?void 0:t.id}-${t==null?void 0:t.type}\"]`):null,{x:h,y:p}=Jr(e),m=o.elementFromPoint(h,p),w=m!=null&&m.classList.contains(`${a}-flow__handle`)?m:d,y={handleDomNode:w,isValid:!1,connection:null,toHandle:null};if(w){const v=IR(void 0,w),g=w.getAttribute(\"data-nodeid\"),x=w.getAttribute(\"data-handleid\"),S=w.classList.contains(\"connectable\"),k=w.classList.contains(\"connectableend\");if(!g||!v)return y;const C={source:c?g:r,sourceHandle:c?x:i,target:c?r:g,targetHandle:c?i:x};y.connection=C;const O=S&&k&&(n===ka.Strict?c&&v===\"source\"||!c&&v===\"target\":g!==r||x!==i);y.isValid=O&&u(C),y.toHandle=RR(g,v,x,f,n,!1)}return y}const j0={onPointerDown:ZQ,isValid:MR};function JQ({domNode:e,panZoom:t,getTransform:n,getViewScale:r}){const i=cn(e);function s({translateExtent:a,width:l,height:u,zoomStep:f=10,pannable:c=!0,zoomable:d=!0,inversePan:h=!1}){const p=g=>{const x=n();if(g.sourceEvent.type!==\"wheel\"||!t)return;const S=-g.sourceEvent.deltaY*(g.sourceEvent.deltaMode===1?.05:g.sourceEvent.deltaMode?1:.002)*f,k=x[2]*Math.pow(2,S);t.scaleTo(k)};let m=[0,0];const w=g=>{(g.sourceEvent.type===\"mousedown\"||g.sourceEvent.type===\"touchstart\")&&(m=[g.sourceEvent.clientX??g.sourceEvent.touches[0].clientX,g.sourceEvent.clientY??g.sourceEvent.touches[0].clientY])},y=g=>{const x=n();if(g.sourceEvent.type!==\"mousemove\"&&g.sourceEvent.type!==\"touchmove\"||!t)return;const S=[g.sourceEvent.clientX??g.sourceEvent.touches[0].clientX,g.sourceEvent.clientY??g.sourceEvent.touches[0].clientY],k=[S[0]-m[0],S[1]-m[1]];m=S;const C=r()*Math.max(x[2],Math.log(x[2]))*(h?-1:1),T={x:x[0]-k[0]*C,y:x[1]-k[1]*C},O=[[0,0],[l,u]];t.setViewportConstrained({x:T.x,y:T.y,zoom:x[2]},O,a)},v=fR().on(\"start\",w).on(\"zoom\",c?y:null).on(\"zoom.wheel\",d?p:null);i.call(v,{})}function o(){i.on(\"zoom\",null)}return{update:s,destroy:o,pointer:Xn}}const eZ=(e,t)=>e.x!==t.x||e.y!==t.y||e.zoom!==t.k,Cp=e=>({x:e.x,y:e.y,zoom:e.k}),ug=({x:e,y:t,zoom:n})=>wp.translate(e,t).scale(n),Bo=(e,t)=>e.target.closest(`.${t}`),jR=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),cg=(e,t=0,n=()=>{})=>{const r=typeof t==\"number\"&&t>0;return r||n(),r?e.transition().duration(t).on(\"end\",n):e},FR=e=>{const t=e.ctrlKey&&fh()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function tZ({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:r,panOnScrollMode:i,panOnScrollSpeed:s,zoomOnPinch:o,onPanZoomStart:a,onPanZoom:l,onPanZoomEnd:u}){return f=>{if(Bo(f,t))return!1;f.preventDefault(),f.stopImmediatePropagation();const c=n.property(\"__zoom\").k||1;if(f.ctrlKey&&o){const w=Xn(f),y=FR(f),v=c*Math.pow(2,y);r.scaleTo(n,v,w,f);return}const d=f.deltaMode===1?20:1;let h=i===js.Vertical?0:f.deltaX*d,p=i===js.Horizontal?0:f.deltaY*d;!fh()&&f.shiftKey&&i!==js.Vertical&&(h=f.deltaY*d,p=0),r.translateBy(n,-(h/c)*s,-(p/c)*s,{internal:!0});const m=Cp(n.property(\"__zoom\"));clearTimeout(e.panScrollTimeout),e.isPanScrolling||(e.isPanScrolling=!0,a==null||a(f,m)),e.isPanScrolling&&(l==null||l(f,m),e.panScrollTimeout=setTimeout(()=>{u==null||u(f,m),e.isPanScrolling=!1},150))}}function nZ({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(r,i){if(!t&&r.type===\"wheel\"&&!r.ctrlKey||Bo(r,e))return null;r.preventDefault(),n.call(this,r,i)}}function rZ({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return r=>{var s,o,a;if((s=r.sourceEvent)!=null&&s.internal)return;const i=Cp(r.transform);e.mouseButton=((o=r.sourceEvent)==null?void 0:o.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=i,((a=r.sourceEvent)==null?void 0:a.type)===\"mousedown\"&&t(!0),n&&(n==null||n(r.sourceEvent,i))}}function iZ({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:r,onPanZoom:i}){return s=>{var o,a;e.usedRightMouseButton=!!(n&&jR(t,e.mouseButton??0)),(o=s.sourceEvent)!=null&&o.sync||r([s.transform.x,s.transform.y,s.transform.k]),i&&!((a=s.sourceEvent)!=null&&a.internal)&&(i==null||i(s.sourceEvent,Cp(s.transform)))}}function sZ({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:r,onPanZoomEnd:i,onPaneContextMenu:s}){return o=>{var a;if(!((a=o.sourceEvent)!=null&&a.internal)&&(e.isZoomingOrPanning=!1,s&&jR(t,e.mouseButton??0)&&!e.usedRightMouseButton&&o.sourceEvent&&s(o.sourceEvent),e.usedRightMouseButton=!1,r(!1),i&&eZ(e.prevViewport,o.transform))){const l=Cp(o.transform);e.prevViewport=l,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{i==null||i(o.sourceEvent,l)},n?150:0)}}}function oZ({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:r,panOnScroll:i,zoomOnDoubleClick:s,userSelectionActive:o,noWheelClassName:a,noPanClassName:l,lib:u}){return f=>{var p;const c=e||t,d=n&&f.ctrlKey;if(f.button===1&&f.type===\"mousedown\"&&(Bo(f,`${u}-flow__node`)||Bo(f,`${u}-flow__edge`)))return!0;if(!r&&!c&&!i&&!s&&!n||o||Bo(f,a)&&f.type===\"wheel\"||Bo(f,l)&&(f.type!==\"wheel\"||i&&f.type===\"wheel\"&&!e)||!n&&f.ctrlKey&&f.type===\"wheel\")return!1;if(!n&&f.type===\"touchstart\"&&((p=f.touches)==null?void 0:p.length)>1)return f.preventDefault(),!1;if(!c&&!i&&!d&&f.type===\"wheel\"||!r&&(f.type===\"mousedown\"||f.type===\"touchstart\")||Array.isArray(r)&&!r.includes(f.button)&&f.type===\"mousedown\")return!1;const h=Array.isArray(r)&&r.includes(f.button)||!f.button||f.button<=1;return(!f.ctrlKey||f.type===\"wheel\")&&h}}function aZ({domNode:e,minZoom:t,maxZoom:n,paneClickDistance:r,translateExtent:i,viewport:s,onPanZoom:o,onPanZoomStart:a,onPanZoomEnd:l,onDraggingChange:u}){const f={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{x:0,y:0,zoom:0},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},c=e.getBoundingClientRect(),d=fR().clickDistance(!tr(r)||r<0?0:r).scaleExtent([t,n]).translateExtent(i),h=cn(e).call(d);g({x:s.x,y:s.y,zoom:Ea(s.zoom,t,n)},[[0,0],[c.width,c.height]],i);const p=h.on(\"wheel.zoom\"),m=h.on(\"dblclick.zoom\");d.wheelDelta(FR);function w(L,B){return h?new Promise(N=>{d==null||d.transform(cg(h,B==null?void 0:B.duration,()=>N(!0)),L)}):Promise.resolve(!1)}function y({noWheelClassName:L,noPanClassName:B,onPaneContextMenu:N,userSelectionActive:M,panOnScroll:I,panOnDrag:F,panOnScrollMode:P,panOnScrollSpeed:D,preventScrolling:_,zoomOnPinch:V,zoomOnScroll:W,zoomOnDoubleClick:R,zoomActivationKeyPressed:q,lib:J,onTransformChange:Y}){M&&!f.isZoomingOrPanning&&v();const G=I&&!q&&!M?tZ({zoomPanValues:f,noWheelClassName:L,d3Selection:h,d3Zoom:d,panOnScrollMode:P,panOnScrollSpeed:D,zoomOnPinch:V,onPanZoomStart:a,onPanZoom:o,onPanZoomEnd:l}):nZ({noWheelClassName:L,preventScrolling:_,d3ZoomHandler:p});if(h.on(\"wheel.zoom\",G,{passive:!1}),!M){const de=rZ({zoomPanValues:f,onDraggingChange:u,onPanZoomStart:a});d.on(\"start\",de);const ue=iZ({zoomPanValues:f,panOnDrag:F,onPaneContextMenu:!!N,onPanZoom:o,onTransformChange:Y});d.on(\"zoom\",ue);const ie=sZ({zoomPanValues:f,panOnDrag:F,panOnScroll:I,onPaneContextMenu:N,onPanZoomEnd:l,onDraggingChange:u});d.on(\"end\",ie)}const le=oZ({zoomActivationKeyPressed:q,panOnDrag:F,zoomOnScroll:W,panOnScroll:I,zoomOnDoubleClick:R,zoomOnPinch:V,userSelectionActive:M,noPanClassName:B,noWheelClassName:L,lib:J});d.filter(le),R?h.on(\"dblclick.zoom\",m):h.on(\"dblclick.zoom\",null)}function v(){d.on(\"zoom\",null)}async function g(L,B,N){const M=ug(L),I=d==null?void 0:d.constrain()(M,B,N);return I&&await w(I),new Promise(F=>F(I))}async function x(L,B){const N=ug(L);return await w(N,B),new Promise(M=>M(N))}function S(L){if(h){const B=ug(L),N=h.property(\"__zoom\");(N.k!==L.zoom||N.x!==L.x||N.y!==L.y)&&(d==null||d.transform(h,B,null,{sync:!0}))}}function k(){const L=h?cR(h.node()):{x:0,y:0,k:1};return{x:L.x,y:L.y,zoom:L.k}}function C(L,B){return h?new Promise(N=>{d==null||d.scaleTo(cg(h,B==null?void 0:B.duration,()=>N(!0)),L)}):Promise.resolve(!1)}function T(L,B){return h?new Promise(N=>{d==null||d.scaleBy(cg(h,B==null?void 0:B.duration,()=>N(!0)),L)}):Promise.resolve(!1)}function O(L){d==null||d.scaleExtent(L)}function A(L){d==null||d.translateExtent(L)}function j(L){const B=!tr(L)||L<0?0:L;d==null||d.clickDistance(B)}return{update:y,destroy:v,setViewport:x,setViewportConstrained:g,getViewport:k,scaleTo:C,scaleBy:T,setScaleExtent:O,setTranslateExtent:A,syncViewport:S,setClickDistance:j}}var tu;(function(e){e.Line=\"line\",e.Handle=\"handle\"})(tu||(tu={}));function lZ({width:e,prevWidth:t,height:n,prevHeight:r,affectsX:i,affectsY:s}){const o=e-t,a=n-r,l=[o>0?1:o<0?-1:0,a>0?1:a<0?-1:0];return o&&i&&(l[0]=l[0]*-1),a&&s&&(l[1]=l[1]*-1),l}function uZ(e){const t=e.includes(\"right\")||e.includes(\"left\"),n=e.includes(\"bottom\")||e.includes(\"top\"),r=e.includes(\"left\"),i=e.includes(\"top\");return{isHorizontal:t,isVertical:n,affectsX:r,affectsY:i}}function wi(e,t){return Math.max(0,t-e)}function xi(e,t){return Math.max(0,e-t)}function uf(e,t,n){return Math.max(0,t-e,e-n)}function qE(e,t){return e?!t:t}function cZ(e,t,n,r,i,s,o,a){let{affectsX:l,affectsY:u}=t;const{isHorizontal:f,isVertical:c}=t,d=f&&c,{xSnapped:h,ySnapped:p}=n,{minWidth:m,maxWidth:w,minHeight:y,maxHeight:v}=r,{x:g,y:x,width:S,height:k,aspectRatio:C}=e;let T=Math.floor(f?h-e.pointerX:0),O=Math.floor(c?p-e.pointerY:0);const A=S+(l?-T:T),j=k+(u?-O:O),L=-s[0]*S,B=-s[1]*k;let N=uf(A,m,w),M=uf(j,y,v);if(o){let P=0,D=0;l&&T<0?P=wi(g+T+L,o[0][0]):!l&&T>0&&(P=xi(g+A+L,o[1][0])),u&&O<0?D=wi(x+O+B,o[0][1]):!u&&O>0&&(D=xi(x+j+B,o[1][1])),N=Math.max(N,P),M=Math.max(M,D)}if(a){let P=0,D=0;l&&T>0?P=xi(g+T,a[0][0]):!l&&T<0&&(P=wi(g+A,a[1][0])),u&&O>0?D=xi(x+O,a[0][1]):!u&&O<0&&(D=wi(x+j,a[1][1])),N=Math.max(N,P),M=Math.max(M,D)}if(i){if(f){const P=uf(A/C,y,v)*C;if(N=Math.max(N,P),o){let D=0;!l&&!u||l&&!u&&d?D=xi(x+B+A/C,o[1][1])*C:D=wi(x+B+(l?T:-T)/C,o[0][1])*C,N=Math.max(N,D)}if(a){let D=0;!l&&!u||l&&!u&&d?D=wi(x+A/C,a[1][1])*C:D=xi(x+(l?T:-T)/C,a[0][1])*C,N=Math.max(N,D)}}if(c){const P=uf(j*C,m,w)/C;if(M=Math.max(M,P),o){let D=0;!l&&!u||u&&!l&&d?D=xi(g+j*C+L,o[1][0])/C:D=wi(g+(u?O:-O)*C+L,o[0][0])/C,M=Math.max(M,D)}if(a){let D=0;!l&&!u||u&&!l&&d?D=wi(g+j*C,a[1][0])/C:D=xi(g+(u?O:-O)*C,a[0][0])/C,M=Math.max(M,D)}}}O=O+(O<0?M:-M),T=T+(T<0?N:-N),i&&(d?A>j*C?O=(qE(l,u)?-T:T)/C:T=(qE(l,u)?-O:O)*C:f?(O=T/C,u=l):(T=O*C,l=u));const I=l?g+T:g,F=u?x+O:x;return{width:S+(l?-T:T),height:k+(u?-O:O),x:s[0]*T*(l?-1:1)+I,y:s[1]*O*(u?-1:1)+F}}const $R={width:0,height:0,x:0,y:0},fZ={...$R,pointerX:0,pointerY:0,aspectRatio:1};function dZ(e){return[[0,0],[e.measured.width,e.measured.height]]}function hZ(e,t,n){const r=t.position.x+e.position.x,i=t.position.y+e.position.y,s=e.measured.width??0,o=e.measured.height??0,a=n[0]*s,l=n[1]*o;return[[r-a,i-l],[r+s-a,i+o-l]]}function pZ({domNode:e,nodeId:t,getStoreItems:n,onChange:r,onEnd:i}){const s=cn(e);function o({controlPosition:l,boundaries:u,keepAspectRatio:f,onResizeStart:c,onResize:d,onResizeEnd:h,shouldResize:p}){let m={...$R},w={...fZ};const y=uZ(l);let v,g=[],x,S,k;const C=XL().on(\"start\",T=>{const{nodeLookup:O,transform:A,snapGrid:j,snapToGrid:L,nodeOrigin:B}=n();if(v=O.get(t),!v)return;const{xSnapped:N,ySnapped:M}=eu(T.sourceEvent,{transform:A,snapGrid:j,snapToGrid:L});m={width:v.measured.width??0,height:v.measured.height??0,x:v.position.x??0,y:v.position.y??0},w={...m,pointerX:N,pointerY:M,aspectRatio:m.width/m.height},x=void 0,v.parentId&&(v.extent===\"parent\"||v.expandParent)&&(x=O.get(v.parentId),S=x&&v.extent===\"parent\"?dZ(x):void 0),g=[],k=void 0;for(const[I,F]of O)if(F.parentId===t&&(g.push({id:I,position:{...F.position},extent:F.extent}),F.extent===\"parent\"||F.expandParent)){const P=hZ(F,v,F.origin??B);k?k=[[Math.min(P[0][0],k[0][0]),Math.min(P[0][1],k[0][1])],[Math.max(P[1][0],k[1][0]),Math.max(P[1][1],k[1][1])]]:k=P}c==null||c(T,{...m})}).on(\"drag\",T=>{const{transform:O,snapGrid:A,snapToGrid:j,nodeOrigin:L}=n(),B=eu(T.sourceEvent,{transform:O,snapGrid:A,snapToGrid:j}),N=[];if(!v)return;const{x:M,y:I,width:F,height:P}=m,D={},_=v.origin??L,{width:V,height:W,x:R,y:q}=cZ(w,y,B,u,f,_,S,k),J=V!==F,Y=W!==P,re=R!==M&&J,G=q!==I&&Y;if(!re&&!G&&!J&&!Y)return;if((re||G||_[0]===1||_[1]===1)&&(D.x=re?R:m.x,D.y=G?q:m.y,m.x=D.x,m.y=D.y,g.length>0)){const ie=R-M,pe=q-I;for(const Ne of g)Ne.position={x:Ne.position.x-ie+_[0]*(V-F),y:Ne.position.y-pe+_[1]*(W-P)},N.push(Ne)}if((J||Y)&&(D.width=J?V:m.width,D.height=Y?W:m.height,m.width=D.width,m.height=D.height),x&&v.expandParent){const ie=_[0]*(D.width??0);D.x&&D.x<ie&&(m.x=ie,w.x=w.x-(D.x-ie));const pe=_[1]*(D.height??0);D.y&&D.y<pe&&(m.y=pe,w.y=w.y-(D.y-pe))}const le=lZ({width:m.width,prevWidth:F,height:m.height,prevHeight:P,affectsX:y.affectsX,affectsY:y.affectsY}),de={...m,direction:le};(p==null?void 0:p(T,de))!==!1&&(d==null||d(T,de),r(D,N))}).on(\"end\",T=>{h==null||h(T,{...m}),i==null||i()});s.call(C)}function a(){s.on(\".drag\",null)}return{update:o,destroy:a}}var BR={exports:{}},VR={},zR={exports:{}},UR={};/**\n * @license React\n * use-sync-external-store-shim.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */var _a=E;function mZ(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var gZ=typeof Object.is==\"function\"?Object.is:mZ,yZ=_a.useState,vZ=_a.useEffect,wZ=_a.useLayoutEffect,xZ=_a.useDebugValue;function bZ(e,t){var n=t(),r=yZ({inst:{value:n,getSnapshot:t}}),i=r[0].inst,s=r[1];return wZ(function(){i.value=n,i.getSnapshot=t,fg(i)&&s({inst:i})},[e,n,t]),vZ(function(){return fg(i)&&s({inst:i}),e(function(){fg(i)&&s({inst:i})})},[e]),xZ(n),n}function fg(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!gZ(e,n)}catch{return!0}}function SZ(e,t){return t()}var kZ=typeof window>\"u\"||typeof window.document>\"u\"||typeof window.document.createElement>\"u\"?SZ:bZ;UR.useSyncExternalStore=_a.useSyncExternalStore!==void 0?_a.useSyncExternalStore:kZ;zR.exports=UR;var EZ=zR.exports;/**\n * @license React\n * use-sync-external-store-shim/with-selector.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */var Tp=E,CZ=EZ;function TZ(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var _Z=typeof Object.is==\"function\"?Object.is:TZ,AZ=CZ.useSyncExternalStore,NZ=Tp.useRef,PZ=Tp.useEffect,OZ=Tp.useMemo,LZ=Tp.useDebugValue;VR.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var s=NZ(null);if(s.current===null){var o={hasValue:!1,value:null};s.current=o}else o=s.current;s=OZ(function(){function l(h){if(!u){if(u=!0,f=h,h=r(h),i!==void 0&&o.hasValue){var p=o.value;if(i(p,h))return c=p}return c=h}if(p=c,_Z(f,h))return p;var m=r(h);return i!==void 0&&i(p,m)?p:(f=h,c=m)}var u=!1,f,c,d=n===void 0?null:n;return[function(){return l(t())},d===null?void 0:function(){return l(d())}]},[t,n,r,i]);var a=AZ(e,s[0],s[1]);return PZ(function(){o.hasValue=!0,o.value=a},[a]),LZ(a),a};BR.exports=VR;var RZ=BR.exports;const IZ=ci(RZ),DZ={BASE_URL:\"/\",DEV:!1,MODE:\"production\",PROD:!0,SSR:!1},YE=e=>{let t;const n=new Set,r=(f,c)=>{const d=typeof f==\"function\"?f(t):f;if(!Object.is(d,t)){const h=t;t=c??(typeof d!=\"object\"||d===null)?d:Object.assign({},t,d),n.forEach(p=>p(t,h))}},i=()=>t,l={setState:r,getState:i,getInitialState:()=>u,subscribe:f=>(n.add(f),()=>n.delete(f)),destroy:()=>{(DZ?\"production\":void 0)!==\"production\"&&console.warn(\"[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected.\"),n.clear()}},u=t=e(r,i,l);return l},MZ=e=>e?YE(e):YE,{useDebugValue:jZ}=we,{useSyncExternalStoreWithSelector:FZ}=IZ,$Z=e=>e;function HR(e,t=$Z,n){const r=FZ(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return jZ(r),r}const GE=(e,t)=>{const n=MZ(e),r=(i,s=t)=>HR(n,i,s);return Object.assign(r,n),r},BZ=(e,t)=>e?GE(e,t):GE;function Xe(e,t){if(Object.is(e,t))return!0;if(typeof e!=\"object\"||e===null||typeof t!=\"object\"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,i]of e)if(!Object.is(i,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}const _p=E.createContext(null),VZ=_p.Provider,WR=hi.error001();function Te(e,t){const n=E.useContext(_p);if(n===null)throw new Error(WR);return HR(n,e,t)}function He(){const e=E.useContext(_p);if(e===null)throw new Error(WR);return E.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const XE={display:\"none\"},zZ={position:\"absolute\",width:1,height:1,margin:-1,border:0,padding:0,overflow:\"hidden\",clip:\"rect(0px, 0px, 0px, 0px)\",clipPath:\"inset(100%)\"},KR=\"react-flow__node-desc\",qR=\"react-flow__edge-desc\",UZ=\"react-flow__aria-live\",HZ=e=>e.ariaLiveMessage;function WZ({rfId:e}){const t=Te(HZ);return b.jsx(\"div\",{id:`${UZ}-${e}`,\"aria-live\":\"assertive\",\"aria-atomic\":\"true\",style:zZ,children:t})}function KZ({rfId:e,disableKeyboardA11y:t}){return b.jsxs(b.Fragment,{children:[b.jsxs(\"div\",{id:`${KR}-${e}`,style:XE,children:[\"Press enter or space to select a node.\",!t&&\"You can then use the arrow keys to move the node around.\",\" Press delete to remove it and escape to cancel.\",\" \"]}),b.jsx(\"div\",{id:`${qR}-${e}`,style:XE,children:\"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.\"}),!t&&b.jsx(WZ,{rfId:e})]})}const qZ=e=>e.userSelectionActive?\"none\":\"all\";function Cx({position:e=\"top-left\",children:t,className:n,style:r,...i}){const s=Te(qZ),o=`${e}`.split(\"-\");return b.jsx(\"div\",{className:ut([\"react-flow__panel\",n,...o]),style:{...r,pointerEvents:s},...i,children:t})}function YZ({proOptions:e,position:t=\"bottom-right\"}){return e!=null&&e.hideAttribution?null:b.jsx(Cx,{position:t,className:\"react-flow__attribution\",\"data-message\":\"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev\",children:b.jsx(\"a\",{href:\"https://reactflow.dev\",target:\"_blank\",rel:\"noopener noreferrer\",\"aria-label\":\"React Flow attribution\",children:\"React Flow\"})})}const GZ=e=>{const t=[],n=[];for(const[,r]of e.nodeLookup)r.selected&&t.push(r.internals.userNode);for(const[,r]of e.edgeLookup)r.selected&&n.push(r);return{selectedNodes:t,selectedEdges:n}},cf=e=>e.id;function XZ(e,t){return Xe(e.selectedNodes.map(cf),t.selectedNodes.map(cf))&&Xe(e.selectedEdges.map(cf),t.selectedEdges.map(cf))}function QZ({onSelectionChange:e}){const t=He(),{selectedNodes:n,selectedEdges:r}=Te(GZ,XZ);return E.useEffect(()=>{const i={nodes:n,edges:r};e==null||e(i),t.getState().onSelectionChangeHandlers.forEach(s=>s(i))},[n,r,e]),null}const ZZ=e=>!!e.onSelectionChangeHandlers;function JZ({onSelectionChange:e}){const t=Te(ZZ);return e||t?b.jsx(QZ,{onSelectionChange:e}):null}const YR=[0,0],eJ={x:0,y:0,zoom:1},tJ=[\"nodes\",\"edges\",\"defaultNodes\",\"defaultEdges\",\"onConnect\",\"onConnectStart\",\"onConnectEnd\",\"onClickConnectStart\",\"onClickConnectEnd\",\"nodesDraggable\",\"nodesConnectable\",\"nodesFocusable\",\"edgesFocusable\",\"edgesReconnectable\",\"elevateNodesOnSelect\",\"elevateEdgesOnSelect\",\"minZoom\",\"maxZoom\",\"nodeExtent\",\"onNodesChange\",\"onEdgesChange\",\"elementsSelectable\",\"connectionMode\",\"snapGrid\",\"snapToGrid\",\"translateExtent\",\"connectOnClick\",\"defaultEdgeOptions\",\"fitView\",\"fitViewOptions\",\"onNodesDelete\",\"onEdgesDelete\",\"onDelete\",\"onNodeDrag\",\"onNodeDragStart\",\"onNodeDragStop\",\"onSelectionDrag\",\"onSelectionDragStart\",\"onSelectionDragStop\",\"onMoveStart\",\"onMove\",\"onMoveEnd\",\"noPanClassName\",\"nodeOrigin\",\"autoPanOnConnect\",\"autoPanOnNodeDrag\",\"onError\",\"connectionRadius\",\"isValidConnection\",\"selectNodesOnDrag\",\"nodeDragThreshold\",\"onBeforeDelete\",\"debug\",\"autoPanSpeed\",\"paneClickDistance\"],QE=[...tJ,\"rfId\"],nJ=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges,setPaneClickDistance:e.setPaneClickDistance}),ZE={translateExtent:$u,nodeOrigin:YR,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:\"nopan\",rfId:\"1\",paneClickDistance:0};function rJ(e){const{setNodes:t,setEdges:n,setMinZoom:r,setMaxZoom:i,setTranslateExtent:s,setNodeExtent:o,reset:a,setDefaultNodesAndEdges:l,setPaneClickDistance:u}=Te(nJ,Xe),f=He();E.useEffect(()=>(l(e.defaultNodes,e.defaultEdges),()=>{c.current=ZE,a()}),[]);const c=E.useRef(ZE);return E.useEffect(()=>{for(const d of QE){const h=e[d],p=c.current[d];h!==p&&(typeof e[d]>\"u\"||(d===\"nodes\"?t(h):d===\"edges\"?n(h):d===\"minZoom\"?r(h):d===\"maxZoom\"?i(h):d===\"translateExtent\"?s(h):d===\"nodeExtent\"?o(h):d===\"paneClickDistance\"?u(h):d===\"fitView\"?f.setState({fitViewOnInit:h}):d===\"fitViewOptions\"?f.setState({fitViewOnInitOptions:h}):f.setState({[d]:h})))}c.current=e},QE.map(d=>e[d])),null}function JE(){return typeof window>\"u\"||!window.matchMedia?null:window.matchMedia(\"(prefers-color-scheme: dark)\")}function iJ(e){var r;const[t,n]=E.useState(e===\"system\"?null:e);return E.useEffect(()=>{if(e!==\"system\"){n(e);return}const i=JE(),s=()=>n(i!=null&&i.matches?\"dark\":\"light\");return s(),i==null||i.addEventListener(\"change\",s),()=>{i==null||i.removeEventListener(\"change\",s)}},[e]),t!==null?t:(r=JE())!=null&&r.matches?\"dark\":\"light\"}const eC=typeof document<\"u\"?document:null;function Hu(e=null,t={target:eC,actInsideInputWithModifier:!0}){const[n,r]=E.useState(!1),i=E.useRef(!1),s=E.useRef(new Set([])),[o,a]=E.useMemo(()=>{if(e!==null){const u=(Array.isArray(e)?e:[e]).filter(c=>typeof c==\"string\").map(c=>c.split(\"+\")),f=u.reduce((c,d)=>c.concat(...d),[]);return[u,f]}return[[],[]]},[e]);return E.useEffect(()=>{const l=(t==null?void 0:t.target)||eC;if(e!==null){const u=d=>{if(i.current=d.ctrlKey||d.metaKey||d.shiftKey,(!i.current||i.current&&!t.actInsideInputWithModifier)&&R0(d))return!1;const p=nC(d.code,a);s.current.add(d[p]),tC(o,s.current,!1)&&(d.preventDefault(),r(!0))},f=d=>{if((!i.current||i.current&&!t.actInsideInputWithModifier)&&R0(d))return!1;const p=nC(d.code,a);tC(o,s.current,!0)?(r(!1),s.current.clear()):s.current.delete(d[p]),d.key===\"Meta\"&&s.current.clear(),i.current=!1},c=()=>{s.current.clear(),r(!1)};return l==null||l.addEventListener(\"keydown\",u),l==null||l.addEventListener(\"keyup\",f),window.addEventListener(\"blur\",c),window.addEventListener(\"contextmenu\",c),()=>{l==null||l.removeEventListener(\"keydown\",u),l==null||l.removeEventListener(\"keyup\",f),window.removeEventListener(\"blur\",c),window.removeEventListener(\"contextmenu\",c)}}},[e,r]),n}function tC(e,t,n){return e.filter(r=>n||r.length===t.size).some(r=>r.every(i=>t.has(i)))}function nC(e,t){return t.includes(e)?\"code\":\"key\"}const sJ=()=>{const e=He();return E.useMemo(()=>({zoomIn:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1.2,{duration:t==null?void 0:t.duration}):Promise.resolve(!1)},zoomOut:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,{duration:t==null?void 0:t.duration}):Promise.resolve(!1)},zoomTo:(t,n)=>{const{panZoom:r}=e.getState();return r?r.scaleTo(t,{duration:n==null?void 0:n.duration}):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{const{transform:[r,i,s],panZoom:o}=e.getState();return o?(await o.setViewport({x:t.x??r,y:t.y??i,zoom:t.zoom??s},{duration:n==null?void 0:n.duration}),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[t,n,r]=e.getState().transform;return{x:t,y:n,zoom:r}},fitView:t=>{const{nodeLookup:n,width:r,height:i,minZoom:s,maxZoom:o,panZoom:a}=e.getState(),l=P0(n,t);return a?O0({nodes:l,width:r,height:i,minZoom:s,maxZoom:o,panZoom:a},t):Promise.resolve(!1)},setCenter:async(t,n,r)=>{const{width:i,height:s,maxZoom:o,panZoom:a}=e.getState(),l=typeof(r==null?void 0:r.zoom)<\"u\"?r.zoom:o,u=i/2-t*l,f=s/2-n*l;return a?(await a.setViewport({x:u,y:f,zoom:l},{duration:r==null?void 0:r.duration}),Promise.resolve(!0)):Promise.resolve(!1)},fitBounds:async(t,n)=>{const{width:r,height:i,minZoom:s,maxZoom:o,panZoom:a}=e.getState(),l=wx(t,r,i,s,o,(n==null?void 0:n.padding)??.1);return a?(await a.setViewport(l,{duration:n==null?void 0:n.duration}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(t,n={snapToGrid:!0})=>{const{transform:r,snapGrid:i,domNode:s}=e.getState();if(!s)return t;const{x:o,y:a}=s.getBoundingClientRect(),l={x:t.x-o,y:t.y-a};return yc(l,r,n.snapToGrid,i)},flowToScreenPosition:t=>{const{transform:n,domNode:r}=e.getState();if(!r)return t;const{x:i,y:s}=r.getBoundingClientRect(),o=bR(t,n);return{x:o.x+i,y:o.y+s}}}),[])};function GR(e,t){const n=[],r=new Map,i=[];for(const s of e)if(s.type===\"add\"){i.push(s);continue}else if(s.type===\"remove\"||s.type===\"replace\")r.set(s.id,[s]);else{const o=r.get(s.id);o?o.push(s):r.set(s.id,[s])}for(const s of t){const o=r.get(s.id);if(!o){n.push(s);continue}if(o[0].type===\"remove\")continue;if(o[0].type===\"replace\"){n.push({...o[0].item});continue}const a={...s};for(const l of o)oJ(l,a);n.push(a)}return i.length&&i.forEach(s=>{s.index!==void 0?n.splice(s.index,0,{...s.item}):n.push({...s.item})}),n}function oJ(e,t){switch(e.type){case\"select\":{t.selected=e.selected;break}case\"position\":{typeof e.position<\"u\"&&(t.position=e.position),typeof e.dragging<\"u\"&&(t.dragging=e.dragging);break}case\"dimensions\":{typeof e.dimensions<\"u\"&&(t.measured??(t.measured={}),t.measured.width=e.dimensions.width,t.measured.height=e.dimensions.height,e.setAttributes&&(t.width=e.dimensions.width,t.height=e.dimensions.height)),typeof e.resizing==\"boolean\"&&(t.resizing=e.resizing);break}}}function XR(e,t){return GR(e,t)}function QR(e,t){return GR(e,t)}function Ss(e,t){return{id:e,type:\"select\",selected:t}}function Vo(e,t=new Set,n=!1){const r=[];for(const[i,s]of e){const o=t.has(i);!(s.selected===void 0&&!o)&&s.selected!==o&&(n&&(s.selected=o),r.push(Ss(s.id,o)))}return r}function rC({items:e=[],lookup:t}){var i;const n=[],r=new Map(e.map(s=>[s.id,s]));for(const[s,o]of e.entries()){const a=t.get(o.id),l=((i=a==null?void 0:a.internals)==null?void 0:i.userNode)??a;l!==void 0&&l!==o&&n.push({id:o.id,item:o,type:\"replace\"}),l===void 0&&n.push({item:o,type:\"add\",index:s})}for(const[s]of t)r.get(s)===void 0&&n.push({id:s,type:\"remove\"});return n}function iC(e){return{id:e.id,type:\"remove\"}}const sC=e=>CQ(e),aJ=e=>mR(e);function ZR(e){return E.forwardRef(e)}const lJ=typeof window<\"u\"?E.useLayoutEffect:E.useEffect;function oC(e){const[t,n]=E.useState(!1),[r]=E.useState(()=>uJ(()=>n(!0)));return lJ(()=>{if(!t){r.reset();return}const i=r.get();i.length&&(e(i),r.reset()),n(!1)},[t]),r}function uJ(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}const JR=E.createContext(null);function cJ({children:e}){const t=He(),n=E.useCallback(a=>{const{nodes:l=[],setNodes:u,hasDefaultNodes:f,onNodesChange:c,nodeLookup:d}=t.getState();let h=l;for(const p of a)h=typeof p==\"function\"?p(h):p;f?u(h):c&&c(rC({items:h,lookup:d}))},[]),r=oC(n),i=E.useCallback(a=>{const{edges:l=[],setEdges:u,hasDefaultEdges:f,onEdgesChange:c,edgeLookup:d}=t.getState();let h=l;for(const p of a)h=typeof p==\"function\"?p(h):p;f?u(h):c&&c(rC({items:h,lookup:d}))},[]),s=oC(i),o=E.useMemo(()=>({nodeQueue:r,edgeQueue:s}),[]);return b.jsx(JR.Provider,{value:o,children:e})}function fJ(){const e=E.useContext(JR);if(!e)throw new Error(\"useBatchContext must be used within a BatchProvider\");return e}const dJ=e=>!!e.panZoom;function Tx(){const e=sJ(),t=He(),n=fJ(),r=Te(dJ),i=E.useMemo(()=>{const s=c=>t.getState().nodeLookup.get(c),o=c=>{n.nodeQueue.push(c)},a=c=>{n.edgeQueue.push(c)},l=c=>{var y,v;const{nodeLookup:d,nodeOrigin:h}=t.getState(),p=sC(c)?c:d.get(c.id),m=p.parentId?kR(p.position,p.measured,p.parentId,d,h):p.position,w={id:p.id,position:m,width:((y=p.measured)==null?void 0:y.width)??p.width,height:((v=p.measured)==null?void 0:v.height)??p.height,data:p.data};return Ta(w)},u=(c,d,h={replace:!1})=>{o(p=>p.map(m=>{if(m.id===c){const w=typeof d==\"function\"?d(m):d;return h.replace&&sC(w)?w:{...m,...w}}return m}))},f=(c,d,h={replace:!1})=>{a(p=>p.map(m=>{if(m.id===c){const w=typeof d==\"function\"?d(m):d;return h.replace&&aJ(w)?w:{...m,...w}}return m}))};return{getNodes:()=>t.getState().nodes.map(c=>({...c})),getNode:c=>{var d;return(d=s(c))==null?void 0:d.internals.userNode},getInternalNode:s,getEdges:()=>{const{edges:c=[]}=t.getState();return c.map(d=>({...d}))},getEdge:c=>t.getState().edgeLookup.get(c),setNodes:o,setEdges:a,addNodes:c=>{const d=Array.isArray(c)?c:[c];n.nodeQueue.push(h=>[...h,...d])},addEdges:c=>{const d=Array.isArray(c)?c:[c];n.edgeQueue.push(h=>[...h,...d])},toObject:()=>{const{nodes:c=[],edges:d=[],transform:h}=t.getState(),[p,m,w]=h;return{nodes:c.map(y=>({...y})),edges:d.map(y=>({...y})),viewport:{x:p,y:m,zoom:w}}},deleteElements:async({nodes:c=[],edges:d=[]})=>{const{nodes:h,edges:p,onNodesDelete:m,onEdgesDelete:w,triggerNodeChanges:y,triggerEdgeChanges:v,onDelete:g,onBeforeDelete:x}=t.getState(),{nodes:S,edges:k}=await AQ({nodesToRemove:c,edgesToRemove:d,nodes:h,edges:p,onBeforeDelete:x}),C=k.length>0,T=S.length>0;if(C){const O=k.map(iC);w==null||w(k),v(O)}if(T){const O=S.map(iC);m==null||m(S),y(O)}return(T||C)&&(g==null||g({nodes:S,edges:k})),{deletedNodes:S,deletedEdges:k}},getIntersectingNodes:(c,d=!0,h)=>{const p=FE(c),m=p?c:l(c),w=h!==void 0;return m?(h||t.getState().nodes).filter(y=>{const v=t.getState().nodeLookup.get(y.id);if(v&&!p&&(y.id===c.id||!v.internals.positionAbsolute))return!1;const g=Ta(w?y:v),x=Vu(g,m);return d&&x>0||x>=m.width*m.height}):[]},isNodeIntersecting:(c,d,h=!0)=>{const m=FE(c)?c:l(c);if(!m)return!1;const w=Vu(m,d);return h&&w>0||w>=m.width*m.height},updateNode:u,updateNodeData:(c,d,h={replace:!1})=>{u(c,p=>{const m=typeof d==\"function\"?d(p):d;return h.replace?{...p,data:m}:{...p,data:{...p.data,...m}}},h)},updateEdge:f,updateEdgeData:(c,d,h={replace:!1})=>{f(c,p=>{const m=typeof d==\"function\"?d(p):d;return h.replace?{...p,data:m}:{...p,data:{...p.data,...m}}},h)},getNodesBounds:c=>{const{nodeLookup:d,nodeOrigin:h}=t.getState();return TQ(c,{nodeLookup:d,nodeOrigin:h})},getHandleConnections:({type:c,id:d,nodeId:h})=>{var p;return Array.from(((p=t.getState().connectionLookup.get(`${h}-${c}-${d??null}`))==null?void 0:p.values())??[])}}},[]);return E.useMemo(()=>({...i,...e,viewportInitialized:r}),[r])}const aC=e=>e.selected,hJ={actInsideInputWithModifier:!1},pJ=typeof window<\"u\"?window:void 0;function mJ({deleteKeyCode:e,multiSelectionKeyCode:t}){const n=He(),{deleteElements:r}=Tx(),i=Hu(e,hJ),s=Hu(t,{target:pJ});E.useEffect(()=>{if(i){const{edges:o,nodes:a}=n.getState();r({nodes:a.filter(aC),edges:o.filter(aC)}),n.setState({nodesSelectionActive:!1})}},[i]),E.useEffect(()=>{n.setState({multiSelectionActive:s})},[s])}function gJ(e){const t=He();E.useEffect(()=>{const n=()=>{var i,s;if(!e.current)return!1;const r=xx(e.current);(r.height===0||r.width===0)&&((s=(i=t.getState()).onError)==null||s.call(i,\"004\",hi.error004())),t.setState({width:r.width||500,height:r.height||500})};if(e.current){n(),window.addEventListener(\"resize\",n);const r=new ResizeObserver(()=>n());return r.observe(e.current),()=>{window.removeEventListener(\"resize\",n),r&&e.current&&r.unobserve(e.current)}}},[])}const Ap={position:\"absolute\",width:\"100%\",height:\"100%\",top:0,left:0},yJ=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib});function vJ({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:r=!1,panOnScrollSpeed:i=.5,panOnScrollMode:s=js.Free,zoomOnDoubleClick:o=!0,panOnDrag:a=!0,defaultViewport:l,translateExtent:u,minZoom:f,maxZoom:c,zoomActivationKeyCode:d,preventScrolling:h=!0,children:p,noWheelClassName:m,noPanClassName:w,onViewportChange:y,isControlledViewport:v,paneClickDistance:g}){const x=He(),S=E.useRef(null),{userSelectionActive:k,lib:C}=Te(yJ,Xe),T=Hu(d),O=E.useRef();gJ(S);const A=E.useCallback(j=>{y==null||y({x:j[0],y:j[1],zoom:j[2]}),v||x.setState({transform:j})},[y,v]);return E.useEffect(()=>{if(S.current){O.current=aZ({domNode:S.current,minZoom:f,maxZoom:c,translateExtent:u,viewport:l,paneClickDistance:g,onDraggingChange:N=>x.setState({paneDragging:N}),onPanZoomStart:(N,M)=>{const{onViewportChangeStart:I,onMoveStart:F}=x.getState();F==null||F(N,M),I==null||I(M)},onPanZoom:(N,M)=>{const{onViewportChange:I,onMove:F}=x.getState();F==null||F(N,M),I==null||I(M)},onPanZoomEnd:(N,M)=>{const{onViewportChangeEnd:I,onMoveEnd:F}=x.getState();F==null||F(N,M),I==null||I(M)}});const{x:j,y:L,zoom:B}=O.current.getViewport();return x.setState({panZoom:O.current,transform:[j,L,B],domNode:S.current.closest(\".react-flow\")}),()=>{var N;(N=O.current)==null||N.destroy()}}},[]),E.useEffect(()=>{var j;(j=O.current)==null||j.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:r,panOnScrollSpeed:i,panOnScrollMode:s,zoomOnDoubleClick:o,panOnDrag:a,zoomActivationKeyPressed:T,preventScrolling:h,noPanClassName:w,userSelectionActive:k,noWheelClassName:m,lib:C,onTransformChange:A})},[e,t,n,r,i,s,o,a,T,h,w,k,m,C,A]),b.jsx(\"div\",{className:\"react-flow__renderer\",ref:S,style:Ap,children:p})}const wJ=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function xJ(){const{userSelectionActive:e,userSelectionRect:t}=Te(wJ,Xe);return e&&t?b.jsx(\"div\",{className:\"react-flow__selection react-flow__container\",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}const dg=(e,t)=>n=>{n.target===t.current&&(e==null||e(n))},bJ=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging});function SJ({isSelecting:e,selectionKeyPressed:t,selectionMode:n=Bu.Full,panOnDrag:r,selectionOnDrag:i,onSelectionStart:s,onSelectionEnd:o,onPaneClick:a,onPaneContextMenu:l,onPaneScroll:u,onPaneMouseEnter:f,onPaneMouseMove:c,onPaneMouseLeave:d,children:h}){const p=E.useRef(null),m=He(),w=E.useRef(0),y=E.useRef(0),v=E.useRef(),g=E.useRef(new Map),{userSelectionActive:x,elementsSelectable:S,dragging:k}=Te(bJ,Xe),C=S&&(e||x),T=E.useRef(!1),O=E.useRef(!1),A=()=>{m.setState({userSelectionActive:!1,userSelectionRect:null}),w.current=0,y.current=0},j=P=>{if(T.current){T.current=!1;return}a==null||a(P),m.getState().resetSelectedElements(),m.setState({nodesSelectionActive:!1})},L=P=>{if(Array.isArray(r)&&(r!=null&&r.includes(2))){P.preventDefault();return}l==null||l(P)},B=u?P=>u(P):void 0,N=P=>{var q,J,Y,re;const{resetSelectedElements:D,domNode:_,edgeLookup:V}=m.getState();if(v.current=_==null?void 0:_.getBoundingClientRect(),!S||!e||P.button!==0||P.target!==p.current||!v.current)return;(J=(q=P.target)==null?void 0:q.setPointerCapture)==null||J.call(q,P.pointerId),O.current=!0,T.current=!1,g.current=new Map;for(const[G,le]of V)g.current.set(le.source,((Y=g.current.get(le.source))==null?void 0:Y.add(G))||new Set([G])),g.current.set(le.target,((re=g.current.get(le.target))==null?void 0:re.add(G))||new Set([G]));const{x:W,y:R}=Jr(P.nativeEvent,v.current);D(),m.setState({userSelectionRect:{width:0,height:0,startX:W,startY:R,x:W,y:R}}),s==null||s(P)},M=P=>{const{userSelectionRect:D,edgeLookup:_,transform:V,nodeLookup:W,triggerNodeChanges:R,triggerEdgeChanges:q}=m.getState();if(!v.current||!D)return;T.current=!0;const{x:J,y:Y}=Jr(P.nativeEvent,v.current),{startX:re,startY:G}=D,le={startX:re,startY:G,x:J<re?J:re,y:Y<G?Y:G,width:Math.abs(J-re),height:Math.abs(Y-G)},de=gR(W,le,V,n===Bu.Partial,!0),ue=new Set,ie=new Set;for(const pe of de){ie.add(pe.id);const Ne=g.current.get(pe.id);if(Ne)for(const gt of Ne)ue.add(gt)}if(w.current!==ie.size){w.current=ie.size;const pe=Vo(W,ie,!0);R(pe)}if(y.current!==ue.size){y.current=ue.size;const pe=Vo(_,ue);q(pe)}m.setState({userSelectionRect:le,userSelectionActive:!0,nodesSelectionActive:!1})},I=P=>{var _,V;if(P.button!==0||!O.current)return;(V=(_=P.target)==null?void 0:_.releasePointerCapture)==null||V.call(_,P.pointerId);const{userSelectionRect:D}=m.getState();!x&&D&&P.target===p.current&&(j==null||j(P)),w.current>0&&m.setState({nodesSelectionActive:!0}),A(),o==null||o(P),(t||i)&&(T.current=!1),O.current=!1},F=r===!0||Array.isArray(r)&&r.includes(0);return b.jsxs(\"div\",{className:ut([\"react-flow__pane\",{draggable:F,dragging:k,selection:e}]),onClick:C?void 0:dg(j,p),onContextMenu:dg(L,p),onWheel:dg(B,p),onPointerEnter:C?void 0:f,onPointerDown:C?N:c,onPointerMove:C?M:c,onPointerUp:C?I:void 0,onPointerLeave:d,ref:p,style:Ap,children:[h,b.jsx(xJ,{})]})}function F0({id:e,store:t,unselect:n=!1,nodeRef:r}){const{addSelectedNodes:i,unselectNodesAndEdges:s,multiSelectionActive:o,nodeLookup:a,onError:l}=t.getState(),u=a.get(e);if(!u){l==null||l(\"012\",hi.error012(e));return}t.setState({nodesSelectionActive:!1}),u.selected?(n||u.selected&&o)&&(s({nodes:[u],edges:[]}),requestAnimationFrame(()=>{var f;return(f=r==null?void 0:r.current)==null?void 0:f.blur()})):i([e])}function eI({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:i,isSelectable:s,nodeClickDistance:o}){const a=He(),[l,u]=E.useState(!1),f=E.useRef();return E.useEffect(()=>{f.current=qQ({getStoreItems:()=>a.getState(),onNodeMouseDown:c=>{F0({id:c,store:a,nodeRef:e})},onDragStart:()=>{u(!0)},onDragStop:()=>{u(!1)}})},[]),E.useEffect(()=>{var c,d;if(t)(c=f.current)==null||c.destroy();else if(e.current)return(d=f.current)==null||d.update({noDragClassName:n,handleSelector:r,domNode:e.current,isSelectable:s,nodeId:i,nodeClickDistance:o}),()=>{var h;(h=f.current)==null||h.destroy()}},[n,r,t,s,e,i]),l}const kJ=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>\"u\");function tI(){const e=He();return E.useCallback(n=>{const{nodeExtent:r,snapToGrid:i,snapGrid:s,nodesDraggable:o,onError:a,updateNodePositions:l,nodeLookup:u,nodeOrigin:f}=e.getState(),c=new Map,d=kJ(o),h=i?s[0]:5,p=i?s[1]:5,m=n.direction.x*h*n.factor,w=n.direction.y*p*n.factor;for(const[,y]of u){if(!d(y))continue;let v={x:y.internals.positionAbsolute.x+m,y:y.internals.positionAbsolute.y+w};i&&(v=kp(v,s));const{position:g,positionAbsolute:x}=yR({nodeId:y.id,nextPosition:v,nodeLookup:u,nodeExtent:r,nodeOrigin:f,onError:a});y.position=g,y.internals.positionAbsolute=x,c.set(y.id,y)}l(c)},[])}const _x=E.createContext(null),EJ=_x.Provider;_x.Consumer;const nI=()=>E.useContext(_x),CJ=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),TJ=(e,t,n)=>r=>{const{connectionClickStartHandle:i,connectionMode:s,connection:o}=r,{fromHandle:a,toHandle:l,isValid:u}=o,f=(l==null?void 0:l.nodeId)===e&&(l==null?void 0:l.id)===t&&(l==null?void 0:l.type)===n;return{connectingFrom:(a==null?void 0:a.nodeId)===e&&(a==null?void 0:a.id)===t&&(a==null?void 0:a.type)===n,connectingTo:f,clickConnecting:(i==null?void 0:i.nodeId)===e&&(i==null?void 0:i.id)===t&&(i==null?void 0:i.type)===n,isPossibleEndHandle:s===ka.Strict?(a==null?void 0:a.type)!==n:e!==(a==null?void 0:a.nodeId)||t!==(a==null?void 0:a.id),connectionInProcess:!!a,valid:f&&u}};function _J({type:e=\"source\",position:t=se.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:i=!0,isConnectableEnd:s=!0,id:o,onConnect:a,children:l,className:u,onMouseDown:f,onTouchStart:c,...d},h){var N,M;const p=o||null,m=e===\"target\",w=He(),y=nI(),{connectOnClick:v,noPanClassName:g,rfId:x}=Te(CJ,Xe),{connectingFrom:S,connectingTo:k,clickConnecting:C,isPossibleEndHandle:T,connectionInProcess:O,valid:A}=Te(TJ(y,p,e),Xe);y||(M=(N=w.getState()).onError)==null||M.call(N,\"010\",hi.error010());const j=I=>{const{defaultEdgeOptions:F,onConnect:P,hasDefaultEdges:D}=w.getState(),_={...F,...I};if(D){const{edges:V,setEdges:W}=w.getState();W(AR(_,V))}P==null||P(_),a==null||a(_)},L=I=>{if(!y)return;const F=CR(I.nativeEvent);if(i&&(F&&I.button===0||!F)){const P=w.getState();j0.onPointerDown(I.nativeEvent,{autoPanOnConnect:P.autoPanOnConnect,connectionMode:P.connectionMode,connectionRadius:P.connectionRadius,domNode:P.domNode,nodeLookup:P.nodeLookup,lib:P.lib,isTarget:m,handleId:p,nodeId:y,flowId:P.rfId,panBy:P.panBy,cancelConnection:P.cancelConnection,onConnectStart:P.onConnectStart,onConnectEnd:P.onConnectEnd,updateConnection:P.updateConnection,onConnect:j,isValidConnection:n||P.isValidConnection,getTransform:()=>w.getState().transform,getFromHandle:()=>w.getState().connection.fromHandle,autoPanSpeed:P.autoPanSpeed})}F?f==null||f(I):c==null||c(I)},B=I=>{const{onClickConnectStart:F,onClickConnectEnd:P,connectionClickStartHandle:D,connectionMode:_,isValidConnection:V,lib:W,rfId:R,nodeLookup:q,connection:J}=w.getState();if(!y||!D&&!i)return;if(!D){F==null||F(I.nativeEvent,{nodeId:y,handleId:p,handleType:e}),w.setState({connectionClickStartHandle:{nodeId:y,type:e,id:p}});return}const Y=ER(I.target),re=n||V,{connection:G,isValid:le}=j0.isValid(I.nativeEvent,{handle:{nodeId:y,id:p,type:e},connectionMode:_,fromNodeId:D.nodeId,fromHandleId:D.id||null,fromType:D.type,isValidConnection:re,flowId:R,doc:Y,lib:W,nodeLookup:q});le&&G&&j(G);const de=structuredClone(J);delete de.inProgress,de.toPosition=de.toHandle?de.toHandle.position:null,P==null||P(I,de),w.setState({connectionClickStartHandle:null})};return b.jsx(\"div\",{\"data-handleid\":p,\"data-nodeid\":y,\"data-handlepos\":t,\"data-id\":`${x}-${y}-${p}-${e}`,className:ut([\"react-flow__handle\",`react-flow__handle-${t}`,\"nodrag\",g,u,{source:!m,target:m,connectable:r,connectablestart:i,connectableend:s,clickconnecting:C,connectingfrom:S,connectingto:k,valid:A,connectionindicator:r&&(!O||T)&&(O?s:i)}]),onMouseDown:L,onTouchStart:L,onClick:v?B:void 0,ref:h,...d,children:l})}const An=E.memo(ZR(_J));function AJ({data:e,isConnectable:t,sourcePosition:n=se.Bottom}){return b.jsxs(b.Fragment,{children:[e==null?void 0:e.label,b.jsx(An,{type:\"source\",position:n,isConnectable:t})]})}function NJ({data:e,isConnectable:t,targetPosition:n=se.Top,sourcePosition:r=se.Bottom}){return b.jsxs(b.Fragment,{children:[b.jsx(An,{type:\"target\",position:n,isConnectable:t}),e==null?void 0:e.label,b.jsx(An,{type:\"source\",position:r,isConnectable:t})]})}function PJ(){return null}function OJ({data:e,isConnectable:t,targetPosition:n=se.Top}){return b.jsxs(b.Fragment,{children:[b.jsx(An,{type:\"target\",position:n,isConnectable:t}),e==null?void 0:e.label]})}const dh={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},lC={input:AJ,default:NJ,output:OJ,group:PJ};function LJ(e){var t,n,r,i;return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??((t=e.style)==null?void 0:t.width),height:e.height??e.initialHeight??((n=e.style)==null?void 0:n.height)}:{width:e.width??((r=e.style)==null?void 0:r.width),height:e.height??((i=e.style)==null?void 0:i.height)}}const RJ=e=>{const{width:t,height:n,x:r,y:i}=gc(e.nodeLookup,{filter:s=>!!s.selected});return{width:tr(t)?t:null,height:tr(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${r}px,${i}px)`}};function IJ({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const r=He(),{width:i,height:s,transformString:o,userSelectionActive:a}=Te(RJ,Xe),l=tI(),u=E.useRef(null);if(E.useEffect(()=>{var d;n||(d=u.current)==null||d.focus({preventScroll:!0})},[n]),eI({nodeRef:u}),a||!i||!s)return null;const f=e?d=>{const h=r.getState().nodes.filter(p=>p.selected);e(d,h)}:void 0,c=d=>{Object.prototype.hasOwnProperty.call(dh,d.key)&&l({direction:dh[d.key],factor:d.shiftKey?4:1})};return b.jsx(\"div\",{className:ut([\"react-flow__nodesselection\",\"react-flow__container\",t]),style:{transform:o},children:b.jsx(\"div\",{ref:u,className:\"react-flow__nodesselection-rect\",onContextMenu:f,tabIndex:n?void 0:-1,onKeyDown:n?void 0:c,style:{width:i,height:s}})})}const uC=typeof window<\"u\"?window:void 0,DJ=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function rI({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:s,onPaneScroll:o,paneClickDistance:a,deleteKeyCode:l,selectionKeyCode:u,selectionOnDrag:f,selectionMode:c,onSelectionStart:d,onSelectionEnd:h,multiSelectionKeyCode:p,panActivationKeyCode:m,zoomActivationKeyCode:w,elementsSelectable:y,zoomOnScroll:v,zoomOnPinch:g,panOnScroll:x,panOnScrollSpeed:S,panOnScrollMode:k,zoomOnDoubleClick:C,panOnDrag:T,defaultViewport:O,translateExtent:A,minZoom:j,maxZoom:L,preventScrolling:B,onSelectionContextMenu:N,noWheelClassName:M,noPanClassName:I,disableKeyboardA11y:F,onViewportChange:P,isControlledViewport:D}){const{nodesSelectionActive:_,userSelectionActive:V}=Te(DJ),W=Hu(u,{target:uC}),R=Hu(m,{target:uC}),q=R||T,J=R||x,Y=f&&q!==!0,re=W||V||Y;return mJ({deleteKeyCode:l,multiSelectionKeyCode:p}),b.jsx(vJ,{onPaneContextMenu:s,elementsSelectable:y,zoomOnScroll:v,zoomOnPinch:g,panOnScroll:J,panOnScrollSpeed:S,panOnScrollMode:k,zoomOnDoubleClick:C,panOnDrag:!W&&q,defaultViewport:O,translateExtent:A,minZoom:j,maxZoom:L,zoomActivationKeyCode:w,preventScrolling:B,noWheelClassName:M,noPanClassName:I,onViewportChange:P,isControlledViewport:D,paneClickDistance:a,children:b.jsxs(SJ,{onSelectionStart:d,onSelectionEnd:h,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:s,onPaneScroll:o,panOnDrag:q,isSelecting:!!re,selectionMode:c,selectionKeyPressed:W,selectionOnDrag:Y,children:[e,_&&b.jsx(IJ,{onSelectionContextMenu:N,noPanClassName:I,disableKeyboardA11y:F})]})})}rI.displayName=\"FlowRenderer\";const MJ=E.memo(rI),jJ=e=>t=>e?gR(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(n=>n.id):Array.from(t.nodeLookup.keys());function FJ(e){return Te(E.useCallback(jJ(e),[e]),Xe)}const $J=e=>e.updateNodeInternals;function BJ(){const e=Te($J),[t]=E.useState(()=>typeof ResizeObserver>\"u\"?null:new ResizeObserver(n=>{const r=new Map;n.forEach(i=>{const s=i.target.getAttribute(\"data-id\");r.set(s,{id:s,nodeElement:i.target,force:!0})}),e(r)}));return E.useEffect(()=>()=>{t==null||t.disconnect()},[t]),t}function VJ({node:e,nodeType:t,hasDimensions:n,resizeObserver:r}){const i=He(),s=E.useRef(null),o=E.useRef(null),a=E.useRef(e.sourcePosition),l=E.useRef(e.targetPosition),u=E.useRef(t),f=n&&!!e.internals.handleBounds;return E.useEffect(()=>{s.current&&!e.hidden&&(!f||o.current!==s.current)&&(o.current&&(r==null||r.unobserve(o.current)),r==null||r.observe(s.current),o.current=s.current)},[f,e.hidden]),E.useEffect(()=>()=>{o.current&&(r==null||r.unobserve(o.current),o.current=null)},[]),E.useEffect(()=>{if(s.current){const c=u.current!==t,d=a.current!==e.sourcePosition,h=l.current!==e.targetPosition;(c||d||h)&&(u.current=t,a.current=e.sourcePosition,l.current=e.targetPosition,i.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:s.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),s}function zJ({id:e,onClick:t,onMouseEnter:n,onMouseMove:r,onMouseLeave:i,onContextMenu:s,onDoubleClick:o,nodesDraggable:a,elementsSelectable:l,nodesConnectable:u,nodesFocusable:f,resizeObserver:c,noDragClassName:d,noPanClassName:h,disableKeyboardA11y:p,rfId:m,nodeTypes:w,nodeExtent:y,nodeClickDistance:v,onError:g}){const{node:x,internals:S,isParent:k}=Te(G=>{const le=G.nodeLookup.get(e),de=G.parentLookup.has(e);return{node:le,internals:le.internals,isParent:de}},Xe);let C=x.type||\"default\",T=(w==null?void 0:w[C])||lC[C];T===void 0&&(g==null||g(\"003\",hi.error003(C)),C=\"default\",T=lC.default);const O=!!(x.draggable||a&&typeof x.draggable>\"u\"),A=!!(x.selectable||l&&typeof x.selectable>\"u\"),j=!!(x.connectable||u&&typeof x.connectable>\"u\"),L=!!(x.focusable||f&&typeof x.focusable>\"u\"),B=He(),N=SR(x),M=VJ({node:x,nodeType:C,hasDimensions:N,resizeObserver:c}),I=eI({nodeRef:M,disabled:x.hidden||!O,noDragClassName:d,handleSelector:x.dragHandle,nodeId:e,isSelectable:A,nodeClickDistance:v}),F=tI();if(x.hidden)return null;const P=cs(x),D=LJ(x),_=A||O||t||n||r||i,V=n?G=>n(G,{...S.userNode}):void 0,W=r?G=>r(G,{...S.userNode}):void 0,R=i?G=>i(G,{...S.userNode}):void 0,q=s?G=>s(G,{...S.userNode}):void 0,J=o?G=>o(G,{...S.userNode}):void 0,Y=G=>{const{selectNodesOnDrag:le,nodeDragThreshold:de}=B.getState();A&&(!le||!O||de>0)&&F0({id:e,store:B,nodeRef:M}),t&&t(G,{...S.userNode})},re=G=>{if(!(R0(G.nativeEvent)||p))if(dR.includes(G.key)&&A){const le=G.key===\"Escape\";F0({id:e,store:B,unselect:le,nodeRef:M})}else O&&x.selected&&Object.prototype.hasOwnProperty.call(dh,G.key)&&(B.setState({ariaLiveMessage:`Moved selected node ${G.key.replace(\"Arrow\",\"\").toLowerCase()}. New position, x: ${~~S.positionAbsolute.x}, y: ${~~S.positionAbsolute.y}`}),F({direction:dh[G.key],factor:G.shiftKey?4:1}))};return b.jsx(\"div\",{className:ut([\"react-flow__node\",`react-flow__node-${C}`,{[h]:O},x.className,{selected:x.selected,selectable:A,parent:k,draggable:O,dragging:I}]),ref:M,style:{zIndex:S.z,transform:`translate(${S.positionAbsolute.x}px,${S.positionAbsolute.y}px)`,pointerEvents:_?\"all\":\"none\",visibility:N?\"visible\":\"hidden\",...x.style,...D},\"data-id\":e,\"data-testid\":`rf__node-${e}`,onMouseEnter:V,onMouseMove:W,onMouseLeave:R,onContextMenu:q,onClick:Y,onDoubleClick:J,onKeyDown:L?re:void 0,tabIndex:L?0:void 0,role:L?\"button\":void 0,\"aria-describedby\":p?void 0:`${KR}-${m}`,\"aria-label\":x.ariaLabel,children:b.jsx(EJ,{value:e,children:b.jsx(T,{id:e,data:x.data,type:C,positionAbsoluteX:S.positionAbsolute.x,positionAbsoluteY:S.positionAbsolute.y,selected:x.selected,selectable:A,draggable:O,deletable:x.deletable??!0,isConnectable:j,sourcePosition:x.sourcePosition,targetPosition:x.targetPosition,dragging:I,dragHandle:x.dragHandle,zIndex:S.z,parentId:x.parentId,...P})})})}const UJ=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function iI(e){const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:i,onError:s}=Te(UJ,Xe),o=FJ(e.onlyRenderVisibleElements),a=BJ();return b.jsx(\"div\",{className:\"react-flow__nodes\",style:Ap,children:o.map(l=>b.jsx(zJ,{id:l,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:a,nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:i,nodeClickDistance:e.nodeClickDistance,onError:s},l))})}iI.displayName=\"NodeRenderer\";const HJ=E.memo(iI);function WJ(e){return Te(E.useCallback(n=>{if(!e)return n.edges.map(i=>i.id);const r=[];if(n.width&&n.height)for(const i of n.edges){const s=n.nodeLookup.get(i.source),o=n.nodeLookup.get(i.target);s&&o&&LQ({sourceNode:s,targetNode:o,width:n.width,height:n.height,transform:n.transform})&&r.push(i.id)}return r},[e]),Xe)}const KJ=({color:e=\"none\",strokeWidth:t=1})=>b.jsx(\"polyline\",{style:{stroke:e,strokeWidth:t},strokeLinecap:\"round\",strokeLinejoin:\"round\",fill:\"none\",points:\"-5,-4 0,0 -5,4\"}),qJ=({color:e=\"none\",strokeWidth:t=1})=>b.jsx(\"polyline\",{style:{stroke:e,fill:e,strokeWidth:t},strokeLinecap:\"round\",strokeLinejoin:\"round\",points:\"-5,-4 0,0 -5,4 -5,-4\"}),cC={[Xs.Arrow]:KJ,[Xs.ArrowClosed]:qJ};function YJ(e){const t=He();return E.useMemo(()=>{var i,s;return Object.prototype.hasOwnProperty.call(cC,e)?cC[e]:((s=(i=t.getState()).onError)==null||s.call(i,\"009\",hi.error009(e)),null)},[e])}const GJ=({id:e,type:t,color:n,width:r=12.5,height:i=12.5,markerUnits:s=\"strokeWidth\",strokeWidth:o,orient:a=\"auto-start-reverse\"})=>{const l=YJ(t);return l?b.jsx(\"marker\",{className:\"react-flow__arrowhead\",id:e,markerWidth:`${r}`,markerHeight:`${i}`,viewBox:\"-10 -10 20 20\",markerUnits:s,orient:a,refX:\"0\",refY:\"0\",children:b.jsx(l,{color:n,strokeWidth:o})}):null},sI=({defaultColor:e,rfId:t})=>{const n=Te(s=>s.edges),r=Te(s=>s.defaultEdgeOptions),i=E.useMemo(()=>$Q(n,{id:t,defaultColor:e,defaultMarkerStart:r==null?void 0:r.markerStart,defaultMarkerEnd:r==null?void 0:r.markerEnd}),[n,r,t,e]);return i.length?b.jsx(\"svg\",{className:\"react-flow__marker\",children:b.jsx(\"defs\",{children:i.map(s=>b.jsx(GJ,{id:s.id,type:s.type,color:s.color,width:s.width,height:s.height,markerUnits:s.markerUnits,strokeWidth:s.strokeWidth,orient:s.orient},s.id))})}):null};sI.displayName=\"MarkerDefinitions\";var XJ=E.memo(sI);function oI({x:e,y:t,label:n,labelStyle:r={},labelShowBg:i=!0,labelBgStyle:s={},labelBgPadding:o=[2,4],labelBgBorderRadius:a=2,children:l,className:u,...f}){const[c,d]=E.useState({x:1,y:0,width:0,height:0}),h=ut([\"react-flow__edge-textwrapper\",u]),p=E.useRef(null);return E.useEffect(()=>{if(p.current){const m=p.current.getBBox();d({x:m.x,y:m.y,width:m.width,height:m.height})}},[n]),typeof n>\"u\"||!n?null:b.jsxs(\"g\",{transform:`translate(${e-c.width/2} ${t-c.height/2})`,className:h,visibility:c.width?\"visible\":\"hidden\",...f,children:[i&&b.jsx(\"rect\",{width:c.width+2*o[0],x:-o[0],y:-o[1],height:c.height+2*o[1],className:\"react-flow__edge-textbg\",style:s,rx:a,ry:a}),b.jsx(\"text\",{className:\"react-flow__edge-text\",y:c.height/2,dy:\"0.3em\",ref:p,style:r,children:n}),l]})}oI.displayName=\"EdgeText\";const QJ=E.memo(oI);function Np({id:e,path:t,labelX:n,labelY:r,label:i,labelStyle:s,labelShowBg:o,labelBgStyle:a,labelBgPadding:l,labelBgBorderRadius:u,style:f,markerEnd:c,markerStart:d,className:h,interactionWidth:p=20}){return b.jsxs(b.Fragment,{children:[b.jsx(\"path\",{id:e,style:f,d:t,fill:\"none\",className:ut([\"react-flow__edge-path\",h]),markerEnd:c,markerStart:d}),p&&b.jsx(\"path\",{d:t,fill:\"none\",strokeOpacity:0,strokeWidth:p,className:\"react-flow__edge-interaction\"}),i&&tr(n)&&tr(r)?b.jsx(QJ,{x:n,y:r,label:i,labelStyle:s,labelShowBg:o,labelBgStyle:a,labelBgPadding:l,labelBgBorderRadius:u}):null]})}function fC({pos:e,x1:t,y1:n,x2:r,y2:i}){return e===se.Left||e===se.Right?[.5*(t+r),n]:[t,.5*(n+i)]}function aI({sourceX:e,sourceY:t,sourcePosition:n=se.Bottom,targetX:r,targetY:i,targetPosition:s=se.Top}){const[o,a]=fC({pos:n,x1:e,y1:t,x2:r,y2:i}),[l,u]=fC({pos:s,x1:r,y1:i,x2:e,y2:t}),[f,c,d,h]=TR({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:o,sourceControlY:a,targetControlX:l,targetControlY:u});return[`M${e},${t} C${o},${a} ${l},${u} ${r},${i}`,f,c,d,h]}function lI(e){return E.memo(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:s,sourcePosition:o=se.Bottom,targetPosition:a=se.Top,label:l,labelStyle:u,labelShowBg:f,labelBgStyle:c,labelBgPadding:d,labelBgBorderRadius:h,style:p,markerEnd:m,markerStart:w,interactionWidth:y})=>{const[v,g,x]=aI({sourceX:n,sourceY:r,sourcePosition:o,targetX:i,targetY:s,targetPosition:a}),S=e.isInternal?void 0:t;return b.jsx(Np,{id:S,path:v,labelX:g,labelY:x,label:l,labelStyle:u,labelShowBg:f,labelBgStyle:c,labelBgPadding:d,labelBgBorderRadius:h,style:p,markerEnd:m,markerStart:w,interactionWidth:y})})}const ZJ=lI({isInternal:!1}),uI=lI({isInternal:!0});ZJ.displayName=\"SimpleBezierEdge\";uI.displayName=\"SimpleBezierEdgeInternal\";function cI(e){return E.memo(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:s,label:o,labelStyle:a,labelShowBg:l,labelBgStyle:u,labelBgPadding:f,labelBgBorderRadius:c,style:d,sourcePosition:h=se.Bottom,targetPosition:p=se.Top,markerEnd:m,markerStart:w,pathOptions:y,interactionWidth:v})=>{const[g,x,S]=I0({sourceX:n,sourceY:r,sourcePosition:h,targetX:i,targetY:s,targetPosition:p,borderRadius:y==null?void 0:y.borderRadius,offset:y==null?void 0:y.offset}),k=e.isInternal?void 0:t;return b.jsx(Np,{id:k,path:g,labelX:x,labelY:S,label:o,labelStyle:a,labelShowBg:l,labelBgStyle:u,labelBgPadding:f,labelBgBorderRadius:c,style:d,markerEnd:m,markerStart:w,interactionWidth:v})})}const fI=cI({isInternal:!1}),dI=cI({isInternal:!0});fI.displayName=\"SmoothStepEdge\";dI.displayName=\"SmoothStepEdgeInternal\";function hI(e){return E.memo(({id:t,...n})=>{var i;const r=e.isInternal?void 0:t;return b.jsx(fI,{...n,id:r,pathOptions:E.useMemo(()=>{var s;return{borderRadius:0,offset:(s=n.pathOptions)==null?void 0:s.offset}},[(i=n.pathOptions)==null?void 0:i.offset])})})}const JJ=hI({isInternal:!1}),pI=hI({isInternal:!0});JJ.displayName=\"StepEdge\";pI.displayName=\"StepEdgeInternal\";function mI(e){return E.memo(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:s,label:o,labelStyle:a,labelShowBg:l,labelBgStyle:u,labelBgPadding:f,labelBgBorderRadius:c,style:d,markerEnd:h,markerStart:p,interactionWidth:m})=>{const[w,y,v]=NR({sourceX:n,sourceY:r,targetX:i,targetY:s}),g=e.isInternal?void 0:t;return b.jsx(Np,{id:g,path:w,labelX:y,labelY:v,label:o,labelStyle:a,labelShowBg:l,labelBgStyle:u,labelBgPadding:f,labelBgBorderRadius:c,style:d,markerEnd:h,markerStart:p,interactionWidth:m})})}const eee=mI({isInternal:!1}),gI=mI({isInternal:!0});eee.displayName=\"StraightEdge\";gI.displayName=\"StraightEdgeInternal\";function yI(e){return E.memo(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:s,sourcePosition:o=se.Bottom,targetPosition:a=se.Top,label:l,labelStyle:u,labelShowBg:f,labelBgStyle:c,labelBgPadding:d,labelBgBorderRadius:h,style:p,markerEnd:m,markerStart:w,pathOptions:y,interactionWidth:v})=>{const[g,x,S]=Ep({sourceX:n,sourceY:r,sourcePosition:o,targetX:i,targetY:s,targetPosition:a,curvature:y==null?void 0:y.curvature}),k=e.isInternal?void 0:t;return b.jsx(Np,{id:k,path:g,labelX:x,labelY:S,label:l,labelStyle:u,labelShowBg:f,labelBgStyle:c,labelBgPadding:d,labelBgBorderRadius:h,style:p,markerEnd:m,markerStart:w,interactionWidth:v})})}const tee=yI({isInternal:!1}),vI=yI({isInternal:!0});tee.displayName=\"BezierEdge\";vI.displayName=\"BezierEdgeInternal\";const dC={default:vI,straight:gI,step:pI,smoothstep:dI,simplebezier:uI},hC={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},nee=(e,t,n)=>n===se.Left?e-t:n===se.Right?e+t:e,ree=(e,t,n)=>n===se.Top?e-t:n===se.Bottom?e+t:e,pC=\"react-flow__edgeupdater\";function mC({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:i,onMouseEnter:s,onMouseOut:o,type:a}){return b.jsx(\"circle\",{onMouseDown:i,onMouseEnter:s,onMouseOut:o,className:ut([pC,`${pC}-${a}`]),cx:nee(t,r,e),cy:ree(n,r,e),r,stroke:\"transparent\",fill:\"transparent\"})}function iee({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:r,sourceY:i,targetX:s,targetY:o,sourcePosition:a,targetPosition:l,onReconnect:u,onReconnectStart:f,onReconnectEnd:c,setReconnecting:d,setUpdateHover:h}){const p=He(),m=(x,S)=>{if(x.button!==0)return;const{autoPanOnConnect:k,domNode:C,isValidConnection:T,connectionMode:O,connectionRadius:A,lib:j,onConnectStart:L,onConnectEnd:B,cancelConnection:N,nodeLookup:M,rfId:I,panBy:F,updateConnection:P}=p.getState(),D=S.type===\"target\";d(!0),f==null||f(x,n,S.type);const _=(W,R)=>{d(!1),c==null||c(W,n,S.type,R)},V=W=>u==null?void 0:u(n,W);j0.onPointerDown(x.nativeEvent,{autoPanOnConnect:k,connectionMode:O,connectionRadius:A,domNode:C,handleId:S.id,nodeId:S.nodeId,nodeLookup:M,isTarget:D,edgeUpdaterType:S.type,lib:j,flowId:I,cancelConnection:N,panBy:F,isValidConnection:T,onConnect:V,onConnectStart:L,onConnectEnd:B,onReconnectEnd:_,updateConnection:P,getTransform:()=>p.getState().transform,getFromHandle:()=>p.getState().connection.fromHandle})},w=x=>m(x,{nodeId:n.target,id:n.targetHandle??null,type:\"target\"}),y=x=>m(x,{nodeId:n.source,id:n.sourceHandle??null,type:\"source\"}),v=()=>h(!0),g=()=>h(!1);return b.jsxs(b.Fragment,{children:[(e===!0||e===\"source\")&&b.jsx(mC,{position:a,centerX:r,centerY:i,radius:t,onMouseDown:w,onMouseEnter:v,onMouseOut:g,type:\"source\"}),(e===!0||e===\"target\")&&b.jsx(mC,{position:l,centerX:s,centerY:o,radius:t,onMouseDown:y,onMouseEnter:v,onMouseOut:g,type:\"target\"})]})}function see({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:r,onClick:i,onDoubleClick:s,onContextMenu:o,onMouseEnter:a,onMouseMove:l,onMouseLeave:u,reconnectRadius:f,onReconnect:c,onReconnectStart:d,onReconnectEnd:h,rfId:p,edgeTypes:m,noPanClassName:w,onError:y,disableKeyboardA11y:v}){let g=Te(ie=>ie.edgeLookup.get(e));const x=Te(ie=>ie.defaultEdgeOptions);g=x?{...x,...g}:g;let S=g.type||\"default\",k=(m==null?void 0:m[S])||dC[S];k===void 0&&(y==null||y(\"011\",hi.error011(S)),S=\"default\",k=dC.default);const C=!!(g.focusable||t&&typeof g.focusable>\"u\"),T=typeof c<\"u\"&&(g.reconnectable||n&&typeof g.reconnectable>\"u\"),O=!!(g.selectable||r&&typeof g.selectable>\"u\"),A=E.useRef(null),[j,L]=E.useState(!1),[B,N]=E.useState(!1),M=He(),{zIndex:I,sourceX:F,sourceY:P,targetX:D,targetY:_,sourcePosition:V,targetPosition:W}=Te(E.useCallback(ie=>{const pe=ie.nodeLookup.get(g.source),Ne=ie.nodeLookup.get(g.target);if(!pe||!Ne)return{zIndex:g.zIndex,...hC};const gt=FQ({id:e,sourceNode:pe,targetNode:Ne,sourceHandle:g.sourceHandle||null,targetHandle:g.targetHandle||null,connectionMode:ie.connectionMode,onError:y});return{zIndex:OQ({selected:g.selected,zIndex:g.zIndex,sourceNode:pe,targetNode:Ne,elevateOnSelect:ie.elevateEdgesOnSelect}),...gt||hC}},[g.source,g.target,g.sourceHandle,g.targetHandle,g.selected,g.zIndex]),Xe),R=E.useMemo(()=>g.markerStart?`url('#${D0(g.markerStart,p)}')`:void 0,[g.markerStart,p]),q=E.useMemo(()=>g.markerEnd?`url('#${D0(g.markerEnd,p)}')`:void 0,[g.markerEnd,p]);if(g.hidden||F===null||P===null||D===null||_===null)return null;const J=ie=>{var Ht;const{addSelectedEdges:pe,unselectNodesAndEdges:Ne,multiSelectionActive:gt}=M.getState();O&&(M.setState({nodesSelectionActive:!1}),g.selected&&gt?(Ne({nodes:[],edges:[g]}),(Ht=A.current)==null||Ht.blur()):pe([e])),i&&i(ie,g)},Y=s?ie=>{s(ie,{...g})}:void 0,re=o?ie=>{o(ie,{...g})}:void 0,G=a?ie=>{a(ie,{...g})}:void 0,le=l?ie=>{l(ie,{...g})}:void 0,de=u?ie=>{u(ie,{...g})}:void 0,ue=ie=>{var pe;if(!v&&dR.includes(ie.key)&&O){const{unselectNodesAndEdges:Ne,addSelectedEdges:gt}=M.getState();ie.key===\"Escape\"?((pe=A.current)==null||pe.blur(),Ne({edges:[g]})):gt([e])}};return b.jsx(\"svg\",{style:{zIndex:I},children:b.jsxs(\"g\",{className:ut([\"react-flow__edge\",`react-flow__edge-${S}`,g.className,w,{selected:g.selected,animated:g.animated,inactive:!O&&!i,updating:j,selectable:O}]),onClick:J,onDoubleClick:Y,onContextMenu:re,onMouseEnter:G,onMouseMove:le,onMouseLeave:de,onKeyDown:C?ue:void 0,tabIndex:C?0:void 0,role:C?\"button\":\"img\",\"data-id\":e,\"data-testid\":`rf__edge-${e}`,\"aria-label\":g.ariaLabel===null?void 0:g.ariaLabel||`Edge from ${g.source} to ${g.target}`,\"aria-describedby\":C?`${qR}-${p}`:void 0,ref:A,children:[!B&&b.jsx(k,{id:e,source:g.source,target:g.target,type:g.type,selected:g.selected,animated:g.animated,selectable:O,deletable:g.deletable??!0,label:g.label,labelStyle:g.labelStyle,labelShowBg:g.labelShowBg,labelBgStyle:g.labelBgStyle,labelBgPadding:g.labelBgPadding,labelBgBorderRadius:g.labelBgBorderRadius,sourceX:F,sourceY:P,targetX:D,targetY:_,sourcePosition:V,targetPosition:W,data:g.data,style:g.style,sourceHandleId:g.sourceHandle,targetHandleId:g.targetHandle,markerStart:R,markerEnd:q,pathOptions:\"pathOptions\"in g?g.pathOptions:void 0,interactionWidth:g.interactionWidth}),T&&b.jsx(iee,{edge:g,isReconnectable:T,reconnectRadius:f,onReconnect:c,onReconnectStart:d,onReconnectEnd:h,sourceX:F,sourceY:P,targetX:D,targetY:_,sourcePosition:V,targetPosition:W,setUpdateHover:L,setReconnecting:N})]})})}const oee=e=>({width:e.width,height:e.height,edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function wI({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:r,noPanClassName:i,onReconnect:s,onEdgeContextMenu:o,onEdgeMouseEnter:a,onEdgeMouseMove:l,onEdgeMouseLeave:u,onEdgeClick:f,reconnectRadius:c,onEdgeDoubleClick:d,onReconnectStart:h,onReconnectEnd:p,disableKeyboardA11y:m}){const{edgesFocusable:w,edgesReconnectable:y,elementsSelectable:v,onError:g}=Te(oee,Xe),x=WJ(t);return b.jsxs(\"div\",{className:\"react-flow__edges\",children:[b.jsx(XJ,{defaultColor:e,rfId:n}),x.map(S=>b.jsx(see,{id:S,edgesFocusable:w,edgesReconnectable:y,elementsSelectable:v,noPanClassName:i,onReconnect:s,onContextMenu:o,onMouseEnter:a,onMouseMove:l,onMouseLeave:u,onClick:f,reconnectRadius:c,onDoubleClick:d,onReconnectStart:h,onReconnectEnd:p,rfId:n,onError:g,edgeTypes:r,disableKeyboardA11y:m},S))]})}wI.displayName=\"EdgeRenderer\";const aee=E.memo(wI),lee=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function uee({children:e}){const t=Te(lee);return b.jsx(\"div\",{className:\"react-flow__viewport xyflow__viewport react-flow__container\",style:{transform:t},children:e})}function cee(e){const t=Tx(),n=E.useRef(!1);E.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const fee=e=>{var t;return(t=e.panZoom)==null?void 0:t.syncViewport};function dee(e){const t=Te(fee),n=He();return E.useEffect(()=>{e&&(t==null||t(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function hee(e){return e.connection.inProgress?{...e.connection,to:yc(e.connection.to,e.transform)}:{...e.connection}}function pee(e){return hee}function mee(e){const t=pee();return Te(t,Xe)}const gee=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function yee({containerStyle:e,style:t,type:n,component:r}){const{nodesConnectable:i,width:s,height:o,isValid:a,inProgress:l}=Te(gee,Xe);return!(s&&i&&l)?null:b.jsx(\"svg\",{style:e,width:s,height:o,className:\"react-flow__connectionline react-flow__container\",children:b.jsx(\"g\",{className:ut([\"react-flow__connection\",pR(a)]),children:b.jsx(xI,{style:t,type:n,CustomComponent:r,isValid:a})})})}const xI=({style:e,type:t=Pi.Bezier,CustomComponent:n,isValid:r})=>{const{inProgress:i,from:s,fromNode:o,fromHandle:a,fromPosition:l,to:u,toNode:f,toHandle:c,toPosition:d}=mee();if(!i)return;if(n)return b.jsx(n,{connectionLineType:t,connectionLineStyle:e,fromNode:o,fromHandle:a,fromX:s.x,fromY:s.y,toX:u.x,toY:u.y,fromPosition:l,toPosition:d,connectionStatus:pR(r),toNode:f,toHandle:c});let h=\"\";const p={sourceX:s.x,sourceY:s.y,sourcePosition:l,targetX:u.x,targetY:u.y,targetPosition:d};switch(t){case Pi.Bezier:[h]=Ep(p);break;case Pi.SimpleBezier:[h]=aI(p);break;case Pi.Step:[h]=I0({...p,borderRadius:0});break;case Pi.SmoothStep:[h]=I0(p);break;default:[h]=NR(p)}return b.jsx(\"path\",{d:h,fill:\"none\",className:\"react-flow__connection-path\",style:e})};xI.displayName=\"ConnectionLine\";const vee={};function gC(e=vee){E.useRef(e),He(),E.useEffect(()=>{},[e])}function wee(){He(),E.useRef(!1),E.useEffect(()=>{},[])}function bI({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:r,onEdgeClick:i,onNodeDoubleClick:s,onEdgeDoubleClick:o,onNodeMouseEnter:a,onNodeMouseMove:l,onNodeMouseLeave:u,onNodeContextMenu:f,onSelectionContextMenu:c,onSelectionStart:d,onSelectionEnd:h,connectionLineType:p,connectionLineStyle:m,connectionLineComponent:w,connectionLineContainerStyle:y,selectionKeyCode:v,selectionOnDrag:g,selectionMode:x,multiSelectionKeyCode:S,panActivationKeyCode:k,zoomActivationKeyCode:C,deleteKeyCode:T,onlyRenderVisibleElements:O,elementsSelectable:A,defaultViewport:j,translateExtent:L,minZoom:B,maxZoom:N,preventScrolling:M,defaultMarkerColor:I,zoomOnScroll:F,zoomOnPinch:P,panOnScroll:D,panOnScrollSpeed:_,panOnScrollMode:V,zoomOnDoubleClick:W,panOnDrag:R,onPaneClick:q,onPaneMouseEnter:J,onPaneMouseMove:Y,onPaneMouseLeave:re,onPaneScroll:G,onPaneContextMenu:le,paneClickDistance:de,nodeClickDistance:ue,onEdgeContextMenu:ie,onEdgeMouseEnter:pe,onEdgeMouseMove:Ne,onEdgeMouseLeave:gt,reconnectRadius:Ht,onReconnect:Ir,onReconnectStart:$,onReconnectEnd:z,noDragClassName:H,noWheelClassName:ne,noPanClassName:ee,disableKeyboardA11y:X,nodeExtent:ae,rfId:xe,viewport:U,onViewportChange:K}){return gC(e),gC(t),wee(),cee(n),dee(U),b.jsx(MJ,{onPaneClick:q,onPaneMouseEnter:J,onPaneMouseMove:Y,onPaneMouseLeave:re,onPaneContextMenu:le,onPaneScroll:G,paneClickDistance:de,deleteKeyCode:T,selectionKeyCode:v,selectionOnDrag:g,selectionMode:x,onSelectionStart:d,onSelectionEnd:h,multiSelectionKeyCode:S,panActivationKeyCode:k,zoomActivationKeyCode:C,elementsSelectable:A,zoomOnScroll:F,zoomOnPinch:P,zoomOnDoubleClick:W,panOnScroll:D,panOnScrollSpeed:_,panOnScrollMode:V,panOnDrag:R,defaultViewport:j,translateExtent:L,minZoom:B,maxZoom:N,onSelectionContextMenu:c,preventScrolling:M,noDragClassName:H,noWheelClassName:ne,noPanClassName:ee,disableKeyboardA11y:X,onViewportChange:K,isControlledViewport:!!U,children:b.jsxs(uee,{children:[b.jsx(aee,{edgeTypes:t,onEdgeClick:i,onEdgeDoubleClick:o,onReconnect:Ir,onReconnectStart:$,onReconnectEnd:z,onlyRenderVisibleElements:O,onEdgeContextMenu:ie,onEdgeMouseEnter:pe,onEdgeMouseMove:Ne,onEdgeMouseLeave:gt,reconnectRadius:Ht,defaultMarkerColor:I,noPanClassName:ee,disableKeyboardA11y:X,rfId:xe}),b.jsx(yee,{style:m,type:p,component:w,containerStyle:y}),b.jsx(\"div\",{className:\"react-flow__edgelabel-renderer\"}),b.jsx(HJ,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:s,onNodeMouseEnter:a,onNodeMouseMove:l,onNodeMouseLeave:u,onNodeContextMenu:f,nodeClickDistance:ue,onlyRenderVisibleElements:O,noPanClassName:ee,noDragClassName:H,disableKeyboardA11y:X,nodeExtent:ae,rfId:xe}),b.jsx(\"div\",{className:\"react-flow__viewport-portal\"})]})})}bI.displayName=\"GraphView\";const xee=E.memo(bI),yC=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:s,fitView:o,nodeOrigin:a,nodeExtent:l}={})=>{const u=new Map,f=new Map,c=new Map,d=new Map,h=r??t??[],p=n??e??[],m=a??[0,0],w=l??$u;OR(c,d,h),M0(p,u,f,{nodeOrigin:m,nodeExtent:w,elevateNodesOnSelect:!1});let y=[0,0,1];if(o&&i&&s){const v=gc(u,{filter:k=>!!((k.width||k.initialWidth)&&(k.height||k.initialHeight))}),{x:g,y:x,zoom:S}=wx(v,i,s,.5,2,.1);y=[g,x,S]}return{rfId:\"1\",width:0,height:0,transform:y,nodes:p,nodeLookup:u,parentLookup:f,edges:h,edgeLookup:d,connectionLookup:c,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:.5,maxZoom:2,translateExtent:$u,nodeExtent:w,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:ka.Strict,domNode:null,paneDragging:!1,noPanClassName:\"nopan\",nodeOrigin:m,nodeDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!1,fitViewOnInit:!1,fitViewDone:!1,fitViewOnInitOptions:void 0,selectNodesOnDrag:!0,multiSelectionActive:!1,connection:{...hR},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:\"\",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanSpeed:15,connectionRadius:20,onError:NQ,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:\"react\",debug:!1}},bee=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:s,fitView:o,nodeOrigin:a,nodeExtent:l})=>BZ((u,f)=>({...yC({nodes:e,edges:t,width:i,height:s,fitView:o,nodeOrigin:a,nodeExtent:l,defaultNodes:n,defaultEdges:r}),setNodes:c=>{const{nodeLookup:d,parentLookup:h,nodeOrigin:p,elevateNodesOnSelect:m}=f();M0(c,d,h,{nodeOrigin:p,nodeExtent:l,elevateNodesOnSelect:m,checkEquality:!0}),u({nodes:c})},setEdges:c=>{const{connectionLookup:d,edgeLookup:h}=f();OR(d,h,c),u({edges:c})},setDefaultNodesAndEdges:(c,d)=>{if(c){const{setNodes:h}=f();h(c),u({hasDefaultNodes:!0})}if(d){const{setEdges:h}=f();h(d),u({hasDefaultEdges:!0})}},updateNodeInternals:(c,d={triggerFitView:!0})=>{const{triggerNodeChanges:h,nodeLookup:p,parentLookup:m,fitViewOnInit:w,fitViewDone:y,fitViewOnInitOptions:v,domNode:g,nodeOrigin:x,nodeExtent:S,debug:k,fitViewSync:C}=f(),{changes:T,updatedInternals:O}=HQ(c,p,m,g,x,S);if(O){if(VQ(p,m,{nodeOrigin:x,nodeExtent:S}),d.triggerFitView){let A=y;!y&&w&&(A=C({...v,nodes:v==null?void 0:v.nodes})),u({fitViewDone:A})}else u({});(T==null?void 0:T.length)>0&&(k&&console.log(\"React Flow: trigger node changes\",T),h==null||h(T))}},updateNodePositions:(c,d=!1)=>{const h=[],p=[];for(const[m,w]of c){const y={id:m,type:\"position\",position:w.position,dragging:d};w!=null&&w.expandParent&&(w!=null&&w.parentId)&&y.position&&(h.push({id:m,parentId:w.parentId,rect:{...w.internals.positionAbsolute,width:w.measured.width,height:w.measured.height}}),y.position.x=Math.max(0,y.position.x),y.position.y=Math.max(0,y.position.y)),p.push(y)}if(h.length>0){const{nodeLookup:m,parentLookup:w,nodeOrigin:y}=f(),v=Ex(h,m,w,y);p.push(...v)}f().triggerNodeChanges(p)},triggerNodeChanges:c=>{const{onNodesChange:d,setNodes:h,nodes:p,hasDefaultNodes:m,debug:w}=f();if(c!=null&&c.length){if(m){const y=XR(c,p);h(y)}w&&console.log(\"React Flow: trigger node changes\",c),d==null||d(c)}},triggerEdgeChanges:c=>{const{onEdgesChange:d,setEdges:h,edges:p,hasDefaultEdges:m,debug:w}=f();if(c!=null&&c.length){if(m){const y=QR(c,p);h(y)}w&&console.log(\"React Flow: trigger edge changes\",c),d==null||d(c)}},addSelectedNodes:c=>{const{multiSelectionActive:d,edgeLookup:h,nodeLookup:p,triggerNodeChanges:m,triggerEdgeChanges:w}=f();if(d){const y=c.map(v=>Ss(v,!0));m(y);return}m(Vo(p,new Set([...c]),!0)),w(Vo(h))},addSelectedEdges:c=>{const{multiSelectionActive:d,edgeLookup:h,nodeLookup:p,triggerNodeChanges:m,triggerEdgeChanges:w}=f();if(d){const y=c.map(v=>Ss(v,!0));w(y);return}w(Vo(h,new Set([...c]))),m(Vo(p,new Set,!0))},unselectNodesAndEdges:({nodes:c,edges:d}={})=>{const{edges:h,nodes:p,triggerNodeChanges:m,triggerEdgeChanges:w}=f(),y=c||p,v=d||h,g=y.map(S=>(S.selected=!1,Ss(S.id,!1))),x=v.map(S=>Ss(S.id,!1));m(g),w(x)},setMinZoom:c=>{const{panZoom:d,maxZoom:h}=f();d==null||d.setScaleExtent([c,h]),u({minZoom:c})},setMaxZoom:c=>{const{panZoom:d,minZoom:h}=f();d==null||d.setScaleExtent([h,c]),u({maxZoom:c})},setTranslateExtent:c=>{var d;(d=f().panZoom)==null||d.setTranslateExtent(c),u({translateExtent:c})},setPaneClickDistance:c=>{var d;(d=f().panZoom)==null||d.setClickDistance(c)},resetSelectedElements:()=>{const{edges:c,nodes:d,triggerNodeChanges:h,triggerEdgeChanges:p}=f(),m=d.reduce((y,v)=>v.selected?[...y,Ss(v.id,!1)]:y,[]),w=c.reduce((y,v)=>v.selected?[...y,Ss(v.id,!1)]:y,[]);h(m),p(w)},setNodeExtent:c=>{const{nodes:d,nodeLookup:h,parentLookup:p,nodeOrigin:m,elevateNodesOnSelect:w,nodeExtent:y}=f();c[0][0]===y[0][0]&&c[0][1]===y[0][1]&&c[1][0]===y[1][0]&&c[1][1]===y[1][1]||(M0(d,h,p,{nodeOrigin:m,nodeExtent:c,elevateNodesOnSelect:w,checkEquality:!1}),u({nodeExtent:c}))},panBy:c=>{const{transform:d,width:h,height:p,panZoom:m,translateExtent:w}=f();return WQ({delta:c,panZoom:m,transform:d,translateExtent:w,width:h,height:p})},fitView:c=>{const{panZoom:d,width:h,height:p,minZoom:m,maxZoom:w,nodeLookup:y}=f();if(!d)return Promise.resolve(!1);const v=P0(y,c);return O0({nodes:v,width:h,height:p,panZoom:d,minZoom:m,maxZoom:w},c)},fitViewSync:c=>{const{panZoom:d,width:h,height:p,minZoom:m,maxZoom:w,nodeLookup:y}=f();if(!d)return!1;const v=P0(y,c);return O0({nodes:v,width:h,height:p,panZoom:d,minZoom:m,maxZoom:w},c),v.size>0},cancelConnection:()=>{u({connection:{...hR}})},updateConnection:c=>{u({connection:c})},reset:()=>u({...yC()})}),Object.is);function See({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:r,initialWidth:i,initialHeight:s,fitView:o,nodeOrigin:a,nodeExtent:l,children:u}){const[f]=E.useState(()=>bee({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:s,fitView:o,nodeOrigin:a,nodeExtent:l}));return b.jsx(VZ,{value:f,children:b.jsx(cJ,{children:u})})}function kee({children:e,nodes:t,edges:n,defaultNodes:r,defaultEdges:i,width:s,height:o,fitView:a,nodeOrigin:l,nodeExtent:u}){return E.useContext(_p)?b.jsx(b.Fragment,{children:e}):b.jsx(See,{initialNodes:t,initialEdges:n,defaultNodes:r,defaultEdges:i,initialWidth:s,initialHeight:o,fitView:a,nodeOrigin:l,nodeExtent:u,children:e})}const Eee={width:\"100%\",height:\"100%\",overflow:\"hidden\",position:\"relative\",zIndex:0};function Cee({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:i,nodeTypes:s,edgeTypes:o,onNodeClick:a,onEdgeClick:l,onInit:u,onMove:f,onMoveStart:c,onMoveEnd:d,onConnect:h,onConnectStart:p,onConnectEnd:m,onClickConnectStart:w,onClickConnectEnd:y,onNodeMouseEnter:v,onNodeMouseMove:g,onNodeMouseLeave:x,onNodeContextMenu:S,onNodeDoubleClick:k,onNodeDragStart:C,onNodeDrag:T,onNodeDragStop:O,onNodesDelete:A,onEdgesDelete:j,onDelete:L,onSelectionChange:B,onSelectionDragStart:N,onSelectionDrag:M,onSelectionDragStop:I,onSelectionContextMenu:F,onSelectionStart:P,onSelectionEnd:D,onBeforeDelete:_,connectionMode:V,connectionLineType:W=Pi.Bezier,connectionLineStyle:R,connectionLineComponent:q,connectionLineContainerStyle:J,deleteKeyCode:Y=\"Backspace\",selectionKeyCode:re=\"Shift\",selectionOnDrag:G=!1,selectionMode:le=Bu.Full,panActivationKeyCode:de=\"Space\",multiSelectionKeyCode:ue=fh()?\"Meta\":\"Control\",zoomActivationKeyCode:ie=fh()?\"Meta\":\"Control\",snapToGrid:pe,snapGrid:Ne,onlyRenderVisibleElements:gt=!1,selectNodesOnDrag:Ht,nodesDraggable:Ir,nodesConnectable:$,nodesFocusable:z,nodeOrigin:H=YR,edgesFocusable:ne,edgesReconnectable:ee,elementsSelectable:X=!0,defaultViewport:ae=eJ,minZoom:xe=.5,maxZoom:U=2,translateExtent:K=$u,preventScrolling:ce=!0,nodeExtent:ye,defaultMarkerColor:_e=\"#b1b1b7\",zoomOnScroll:yt=!0,zoomOnPinch:Un=!0,panOnScroll:Wt=!1,panOnScrollSpeed:Dr=.5,panOnScrollMode:hr=js.Free,zoomOnDoubleClick:It=!0,panOnDrag:mi=!0,onPaneClick:Hn,onPaneMouseEnter:tj,onPaneMouseMove:nj,onPaneMouseLeave:rj,onPaneScroll:ij,onPaneContextMenu:sj,paneClickDistance:T1=0,nodeClickDistance:oj=0,children:aj,onReconnect:lj,onReconnectStart:uj,onReconnectEnd:cj,onEdgeContextMenu:fj,onEdgeDoubleClick:dj,onEdgeMouseEnter:hj,onEdgeMouseMove:pj,onEdgeMouseLeave:mj,reconnectRadius:gj=10,onNodesChange:yj,onEdgesChange:vj,noDragClassName:wj=\"nodrag\",noWheelClassName:xj=\"nowheel\",noPanClassName:_1=\"nopan\",fitView:A1,fitViewOptions:bj,connectOnClick:Sj,attributionPosition:kj,proOptions:Ej,defaultEdgeOptions:Cj,elevateNodesOnSelect:Tj,elevateEdgesOnSelect:_j,disableKeyboardA11y:N1=!1,autoPanOnConnect:Aj,autoPanOnNodeDrag:Nj,autoPanSpeed:Pj,connectionRadius:Oj,isValidConnection:Lj,onError:Rj,style:Ij,id:P1,nodeDragThreshold:Dj,viewport:Mj,onViewportChange:jj,width:Fj,height:$j,colorMode:Bj=\"light\",debug:Vj,...zj},Uj){const Gp=P1||\"1\",Hj=iJ(Bj);return b.jsx(\"div\",{...zj,style:{...Ij,...Eee},ref:Uj,className:ut([\"react-flow\",i,Hj]),\"data-testid\":\"rf__wrapper\",id:P1,children:b.jsxs(kee,{nodes:e,edges:t,width:Fj,height:$j,fitView:A1,nodeOrigin:H,nodeExtent:ye,children:[b.jsx(xee,{onInit:u,onNodeClick:a,onEdgeClick:l,onNodeMouseEnter:v,onNodeMouseMove:g,onNodeMouseLeave:x,onNodeContextMenu:S,onNodeDoubleClick:k,nodeTypes:s,edgeTypes:o,connectionLineType:W,connectionLineStyle:R,connectionLineComponent:q,connectionLineContainerStyle:J,selectionKeyCode:re,selectionOnDrag:G,selectionMode:le,deleteKeyCode:Y,multiSelectionKeyCode:ue,panActivationKeyCode:de,zoomActivationKeyCode:ie,onlyRenderVisibleElements:gt,defaultViewport:ae,translateExtent:K,minZoom:xe,maxZoom:U,preventScrolling:ce,zoomOnScroll:yt,zoomOnPinch:Un,zoomOnDoubleClick:It,panOnScroll:Wt,panOnScrollSpeed:Dr,panOnScrollMode:hr,panOnDrag:mi,onPaneClick:Hn,onPaneMouseEnter:tj,onPaneMouseMove:nj,onPaneMouseLeave:rj,onPaneScroll:ij,onPaneContextMenu:sj,paneClickDistance:T1,nodeClickDistance:oj,onSelectionContextMenu:F,onSelectionStart:P,onSelectionEnd:D,onReconnect:lj,onReconnectStart:uj,onReconnectEnd:cj,onEdgeContextMenu:fj,onEdgeDoubleClick:dj,onEdgeMouseEnter:hj,onEdgeMouseMove:pj,onEdgeMouseLeave:mj,reconnectRadius:gj,defaultMarkerColor:_e,noDragClassName:wj,noWheelClassName:xj,noPanClassName:_1,rfId:Gp,disableKeyboardA11y:N1,nodeExtent:ye,viewport:Mj,onViewportChange:jj}),b.jsx(rJ,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:h,onConnectStart:p,onConnectEnd:m,onClickConnectStart:w,onClickConnectEnd:y,nodesDraggable:Ir,nodesConnectable:$,nodesFocusable:z,edgesFocusable:ne,edgesReconnectable:ee,elementsSelectable:X,elevateNodesOnSelect:Tj,elevateEdgesOnSelect:_j,minZoom:xe,maxZoom:U,nodeExtent:ye,onNodesChange:yj,onEdgesChange:vj,snapToGrid:pe,snapGrid:Ne,connectionMode:V,translateExtent:K,connectOnClick:Sj,defaultEdgeOptions:Cj,fitView:A1,fitViewOptions:bj,onNodesDelete:A,onEdgesDelete:j,onDelete:L,onNodeDragStart:C,onNodeDrag:T,onNodeDragStop:O,onSelectionDrag:M,onSelectionDragStart:N,onSelectionDragStop:I,onMove:f,onMoveStart:c,onMoveEnd:d,noPanClassName:_1,nodeOrigin:H,rfId:Gp,autoPanOnConnect:Aj,autoPanOnNodeDrag:Nj,autoPanSpeed:Pj,onError:Rj,connectionRadius:Oj,isValidConnection:Lj,selectNodesOnDrag:Ht,nodeDragThreshold:Dj,onBeforeDelete:_,paneClickDistance:T1,debug:Vj}),b.jsx(JZ,{onSelectionChange:B}),aj,b.jsx(YZ,{proOptions:Ej,position:kj}),b.jsx(KZ,{rfId:Gp,disableKeyboardA11y:N1})]})})}var Tee=ZR(Cee);function _ee(e){const[t,n]=E.useState(e),r=E.useCallback(i=>n(s=>XR(i,s)),[]);return[t,n,r]}function Aee(e){const[t,n]=E.useState(e),r=E.useCallback(i=>n(s=>QR(i,s)),[]);return[t,n,r]}function vC(e){return Te(E.useCallback(n=>n.nodeLookup.get(e),[e]),Xe)}function Nee({dimensions:e,lineWidth:t,variant:n,className:r}){return b.jsx(\"path\",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:ut([\"react-flow__background-pattern\",n,r])})}function Pee({radius:e,className:t}){return b.jsx(\"circle\",{cx:e,cy:e,r:e,className:ut([\"react-flow__background-pattern\",\"dots\",t])})}var Hi;(function(e){e.Lines=\"lines\",e.Dots=\"dots\",e.Cross=\"cross\"})(Hi||(Hi={}));const Oee={[Hi.Dots]:1,[Hi.Lines]:1,[Hi.Cross]:6},Lee=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function SI({id:e,variant:t=Hi.Dots,gap:n=20,size:r,lineWidth:i=1,offset:s=0,color:o,bgColor:a,style:l,className:u,patternClassName:f}){const c=E.useRef(null),{transform:d,patternId:h}=Te(Lee,Xe),p=r||Oee[t],m=t===Hi.Dots,w=t===Hi.Cross,y=Array.isArray(n)?n:[n,n],v=[y[0]*d[2]||1,y[1]*d[2]||1],g=p*d[2],x=Array.isArray(s)?s:[s,s],S=w?[g,g]:v,k=[x[0]*d[2]||1+S[0]/2,x[1]*d[2]||1+S[1]/2],C=`${h}${e||\"\"}`;return b.jsxs(\"svg\",{className:ut([\"react-flow__background\",u]),style:{...l,...Ap,\"--xy-background-color-props\":a,\"--xy-background-pattern-color-props\":o},ref:c,\"data-testid\":\"rf__background\",children:[b.jsx(\"pattern\",{id:C,x:d[0]%v[0],y:d[1]%v[1],width:v[0],height:v[1],patternUnits:\"userSpaceOnUse\",patternTransform:`translate(-${k[0]},-${k[1]})`,children:m?b.jsx(Pee,{radius:g/2,className:f}):b.jsx(Nee,{dimensions:S,lineWidth:i,variant:t,className:f})}),b.jsx(\"rect\",{x:\"0\",y:\"0\",width:\"100%\",height:\"100%\",fill:`url(#${C})`})]})}SI.displayName=\"Background\";const Ree=E.memo(SI);function Iee(){return b.jsx(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 32 32\",children:b.jsx(\"path\",{d:\"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z\"})})}function Dee(){return b.jsx(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 32 5\",children:b.jsx(\"path\",{d:\"M0 0h32v4.2H0z\"})})}function Mee(){return b.jsx(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 32 30\",children:b.jsx(\"path\",{d:\"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z\"})})}function jee(){return b.jsx(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 25 32\",children:b.jsx(\"path\",{d:\"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z\"})})}function Fee(){return b.jsx(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 25 32\",children:b.jsx(\"path\",{d:\"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z\"})})}function ff({children:e,className:t,...n}){return b.jsx(\"button\",{type:\"button\",className:ut([\"react-flow__controls-button\",t]),...n,children:e})}const $ee=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom});function kI({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:r=!0,fitViewOptions:i,onZoomIn:s,onZoomOut:o,onFitView:a,onInteractiveChange:l,className:u,children:f,position:c=\"bottom-left\",orientation:d=\"vertical\",\"aria-label\":h=\"React Flow controls\"}){const p=He(),{isInteractive:m,minZoomReached:w,maxZoomReached:y}=Te($ee,Xe),{zoomIn:v,zoomOut:g,fitView:x}=Tx(),S=()=>{v(),s==null||s()},k=()=>{g(),o==null||o()},C=()=>{x(i),a==null||a()},T=()=>{p.setState({nodesDraggable:!m,nodesConnectable:!m,elementsSelectable:!m}),l==null||l(!m)},O=d===\"horizontal\"?\"horizontal\":\"vertical\";return b.jsxs(Cx,{className:ut([\"react-flow__controls\",O,u]),position:c,style:e,\"data-testid\":\"rf__controls\",\"aria-label\":h,children:[t&&b.jsxs(b.Fragment,{children:[b.jsx(ff,{onClick:S,className:\"react-flow__controls-zoomin\",title:\"zoom in\",\"aria-label\":\"zoom in\",disabled:y,children:b.jsx(Iee,{})}),b.jsx(ff,{onClick:k,className:\"react-flow__controls-zoomout\",title:\"zoom out\",\"aria-label\":\"zoom out\",disabled:w,children:b.jsx(Dee,{})})]}),n&&b.jsx(ff,{className:\"react-flow__controls-fitview\",onClick:C,title:\"fit view\",\"aria-label\":\"fit view\",children:b.jsx(Mee,{})}),r&&b.jsx(ff,{className:\"react-flow__controls-interactive\",onClick:T,title:\"toggle interactivity\",\"aria-label\":\"toggle interactivity\",children:m?b.jsx(Fee,{}):b.jsx(jee,{})}),f]})}kI.displayName=\"Controls\";const Bee=E.memo(kI);function Vee({id:e,x:t,y:n,width:r,height:i,style:s,color:o,strokeColor:a,strokeWidth:l,className:u,borderRadius:f,shapeRendering:c,selected:d,onClick:h}){const{background:p,backgroundColor:m}=s||{},w=o||p||m;return b.jsx(\"rect\",{className:ut([\"react-flow__minimap-node\",{selected:d},u]),x:t,y:n,rx:f,ry:f,width:r,height:i,style:{fill:w,stroke:a,strokeWidth:l},shapeRendering:c,onClick:h?y=>h(y,e):void 0})}const zee=E.memo(Vee),Uee=e=>e.nodes.map(t=>t.id),hg=e=>e instanceof Function?e:()=>e;function Hee({nodeStrokeColor:e,nodeColor:t,nodeClassName:n=\"\",nodeBorderRadius:r=5,nodeStrokeWidth:i,nodeComponent:s=zee,onClick:o}){const a=Te(Uee,Xe),l=hg(t),u=hg(e),f=hg(n),c=typeof window>\"u\"||window.chrome?\"crispEdges\":\"geometricPrecision\";return b.jsx(b.Fragment,{children:a.map(d=>b.jsx(Kee,{id:d,nodeColorFunc:l,nodeStrokeColorFunc:u,nodeClassNameFunc:f,nodeBorderRadius:r,nodeStrokeWidth:i,NodeComponent:s,onClick:o,shapeRendering:c},d))})}function Wee({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:r,nodeBorderRadius:i,nodeStrokeWidth:s,shapeRendering:o,NodeComponent:a,onClick:l}){const{node:u,x:f,y:c,width:d,height:h}=Te(p=>{const m=p.nodeLookup.get(e),{x:w,y}=m.internals.positionAbsolute,{width:v,height:g}=cs(m);return{node:m,x:w,y,width:v,height:g}},Xe);return!u||u.hidden||!SR(u)?null:b.jsx(a,{x:f,y:c,width:d,height:h,style:u.style,selected:!!u.selected,className:r(u),color:t(u),borderRadius:i,strokeColor:n(u),strokeWidth:s,shapeRendering:o,onClick:l,id:u.id})}const Kee=E.memo(Wee);var qee=E.memo(Hee);const Yee=200,Gee=150,Xee=e=>{const t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:t,boundingRect:e.nodeLookup.size>0?xR(gc(e.nodeLookup),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height}},Qee=\"react-flow__minimap-desc\";function EI({style:e,className:t,nodeStrokeColor:n,nodeColor:r,nodeClassName:i=\"\",nodeBorderRadius:s=5,nodeStrokeWidth:o,nodeComponent:a,bgColor:l,maskColor:u,maskStrokeColor:f,maskStrokeWidth:c,position:d=\"bottom-right\",onClick:h,onNodeClick:p,pannable:m=!1,zoomable:w=!1,ariaLabel:y=\"React Flow mini map\",inversePan:v,zoomStep:g=10,offsetScale:x=5}){const S=He(),k=E.useRef(null),{boundingRect:C,viewBB:T,rfId:O,panZoom:A,translateExtent:j,flowWidth:L,flowHeight:B}=Te(Xee,Xe),N=(e==null?void 0:e.width)??Yee,M=(e==null?void 0:e.height)??Gee,I=C.width/N,F=C.height/M,P=Math.max(I,F),D=P*N,_=P*M,V=x*P,W=C.x-(D-C.width)/2-V,R=C.y-(_-C.height)/2-V,q=D+V*2,J=_+V*2,Y=`${Qee}-${O}`,re=E.useRef(0),G=E.useRef();re.current=P,E.useEffect(()=>{if(k.current&&A)return G.current=JQ({domNode:k.current,panZoom:A,getTransform:()=>S.getState().transform,getViewScale:()=>re.current}),()=>{var ue;(ue=G.current)==null||ue.destroy()}},[A]),E.useEffect(()=>{var ue;(ue=G.current)==null||ue.update({translateExtent:j,width:L,height:B,inversePan:v,pannable:m,zoomStep:g,zoomable:w})},[m,w,v,g,j,L,B]);const le=h?ue=>{var Ne;const[ie,pe]=((Ne=G.current)==null?void 0:Ne.pointer(ue))||[0,0];h(ue,{x:ie,y:pe})}:void 0,de=p?E.useCallback((ue,ie)=>{const pe=S.getState().nodeLookup.get(ie);p(ue,pe)},[]):void 0;return b.jsx(Cx,{position:d,style:{...e,\"--xy-minimap-background-color-props\":typeof l==\"string\"?l:void 0,\"--xy-minimap-mask-background-color-props\":typeof u==\"string\"?u:void 0,\"--xy-minimap-mask-stroke-color-props\":typeof f==\"string\"?f:void 0,\"--xy-minimap-mask-stroke-width-props\":typeof c==\"number\"?c*P:void 0,\"--xy-minimap-node-background-color-props\":typeof r==\"string\"?r:void 0,\"--xy-minimap-node-stroke-color-props\":typeof n==\"string\"?n:void 0,\"--xy-minimap-node-stroke-width-props\":typeof o==\"string\"?o:void 0},className:ut([\"react-flow__minimap\",t]),\"data-testid\":\"rf__minimap\",children:b.jsxs(\"svg\",{width:N,height:M,viewBox:`${W} ${R} ${q} ${J}`,className:\"react-flow__minimap-svg\",role:\"img\",\"aria-labelledby\":Y,ref:k,onClick:le,children:[y&&b.jsx(\"title\",{id:Y,children:y}),b.jsx(qee,{onClick:de,nodeColor:r,nodeStrokeColor:n,nodeBorderRadius:s,nodeClassName:i,nodeStrokeWidth:o,nodeComponent:a}),b.jsx(\"path\",{className:\"react-flow__minimap-mask\",d:`M${W-V},${R-V}h${q+V*2}v${J+V*2}h${-q-V*2}z\n        M${T.x},${T.y}h${T.width}v${T.height}h${-T.width}z`,fillRule:\"evenodd\",pointerEvents:\"none\"})]})})}EI.displayName=\"MiniMap\";const Zee=E.memo(EI);function Jee({nodeId:e,position:t,variant:n=tu.Handle,className:r,style:i={},children:s,color:o,minWidth:a=10,minHeight:l=10,maxWidth:u=Number.MAX_VALUE,maxHeight:f=Number.MAX_VALUE,keepAspectRatio:c=!1,shouldResize:d,onResizeStart:h,onResize:p,onResizeEnd:m}){const w=nI(),y=typeof e==\"string\"?e:w,v=He(),g=E.useRef(null),x=n===tu.Line?\"right\":\"bottom-right\",S=t??x,k=E.useRef(null);E.useEffect(()=>{if(!(!g.current||!y))return k.current||(k.current=pZ({domNode:g.current,nodeId:y,getStoreItems:()=>{const{nodeLookup:A,transform:j,snapGrid:L,snapToGrid:B,nodeOrigin:N}=v.getState();return{nodeLookup:A,transform:j,snapGrid:L,snapToGrid:B,nodeOrigin:N}},onChange:(A,j)=>{const{triggerNodeChanges:L,nodeLookup:B,parentLookup:N,nodeOrigin:M}=v.getState(),I=[],F={x:A.x,y:A.y},P=B.get(y);if(P&&P.expandParent&&P.parentId){const D=P.origin??M,_=A.width??P.measured.width,V=A.height??P.measured.height,W={id:P.id,parentId:P.parentId,rect:{width:_,height:V,...kR({x:A.x??P.position.x,y:A.y??P.position.y},{width:_,height:V},P.parentId,B,D)}},R=Ex([W],B,N,M);I.push(...R),F.x=A.x?Math.max(D[0]*_,A.x):void 0,F.y=A.y?Math.max(D[1]*V,A.y):void 0}if(F.x!==void 0&&F.y!==void 0){const D={id:y,type:\"position\",position:{...F}};I.push(D)}if(A.width!==void 0&&A.height!==void 0){const D={id:y,type:\"dimensions\",resizing:!0,setAttributes:!0,dimensions:{width:A.width,height:A.height}};I.push(D)}for(const D of j){const _={...D,type:\"position\"};I.push(_)}L(I)},onEnd:()=>{const A={id:y,type:\"dimensions\",resizing:!1};v.getState().triggerNodeChanges([A])}})),k.current.update({controlPosition:S,boundaries:{minWidth:a,minHeight:l,maxWidth:u,maxHeight:f},keepAspectRatio:c,onResizeStart:h,onResize:p,onResizeEnd:m,shouldResize:d}),()=>{var A;(A=k.current)==null||A.destroy()}},[S,a,l,u,f,c,h,p,m,d]);const C=S.split(\"-\"),T=n===tu.Line?\"borderColor\":\"backgroundColor\",O=o?{...i,[T]:o}:i;return b.jsx(\"div\",{className:ut([\"react-flow__resize-control\",\"nodrag\",...C,n,r]),ref:g,style:O,children:s})}E.memo(Jee);function wC(e,t){const{width:n,height:r}=e.measured,i=e.internals.positionAbsolute,s=t.internals.positionAbsolute,o=n/2,a=r/2,l=i.x+o,u=i.y+a,f=s.x+t.measured.width/2,c=s.y+t.measured.height/2,d=(f-l)/(2*o)-(c-u)/(2*a),h=(f-l)/(2*o)+(c-u)/(2*a),p=1/(Math.abs(d)+Math.abs(h)),m=p*d,w=p*h,y=o*(m+w)+l,v=a*(-m+w)+u;return{x:y,y:v}}function xC(e,t){const n={...e.internals.positionAbsolute,...e},r=Math.round(n.x),i=Math.round(n.y),s=Math.round(t.x),o=Math.round(t.y);return s<=r+1?se.Left:s>=r+n.measured.width-1?se.Right:o<=i+1?se.Top:o>=n.y+n.measured.height-1?se.Bottom:se.Top}function CI(e,t){const n=wC(e,t),r=wC(t,e),i=xC(e,n),s=xC(t,r);return{sx:n.x,sy:n.y,tx:r.x,ty:r.y,sourcePos:i,targetPos:s}}function ete({id:e,source:t,target:n,markerEnd:r,style:i}){const s=vC(t),o=vC(n);if(!s||!o)return null;const{sx:a,sy:l,tx:u,ty:f,sourcePos:c,targetPos:d}=CI(s,o),[h]=Ep({sourceX:a,sourceY:l,sourcePosition:c,targetPosition:d,targetX:u,targetY:f});return b.jsx(\"path\",{id:e,className:\"react-flow__edge-path\",d:h,markerEnd:r,style:i})}function tte({toX:e,toY:t,fromPosition:n,toPosition:r,fromNode:i}){if(!i)return null;const s={id:\"connection-target\",measured:{width:1,height:1},internals:{positionAbsolute:{x:e,y:t}}},{sx:o,sy:a}=CI(i,s),[l]=Ep({sourceX:o,sourceY:a,sourcePosition:n,targetPosition:r,targetX:e,targetY:t});return b.jsxs(\"g\",{children:[b.jsx(\"path\",{fill:\"none\",stroke:\"#222\",strokeWidth:1.5,className:\"animated\",d:l}),b.jsx(\"circle\",{cx:e,cy:t,fill:\"#fff\",r:3,stroke:\"#222\",strokeWidth:1.5})]})}const ed=150,vt=ed*2,sn=75,ct=sn*6,$r={metrics:{PADDING_X:ed,PADDING_Y:sn,DIST_X:vt,DIST_Y:ct},layers:{},nodes:{\"pm.details\":{position:{x:vt*2,y:-ct*2}},\"pm.prd\":{position:{x:0,y:0}},\"pm.frd\":{position:{x:vt*4,y:0}},\"pm.drd\":{position:{x:vt*4,y:ct}},\"db.schemas\":{position:{x:ed*2+vt*5,y:ct+sn}},\"db.postgres\":{position:{x:ed*2+vt*6,y:ct+sn*2}},\"pm.brd\":{position:{x:vt*5,y:sn+ct*2}},\"backend.specifications.openapi\":{position:{x:vt*7,y:sn+ct*2+sn}},\"backend.specifications.asyncapi\":{position:{x:vt*7,y:sn+ct*2.75+sn}},\"backend.server.main\":{position:{x:vt*9,y:ct*2.5}},\"pm.uxsmd\":{position:{x:0,y:ct}},\"pm.uxdmd\":{position:{x:vt*2,y:ct}},\"uxsitemap.structure\":{position:{x:-vt*3.5,y:ct*4.5}},\"uxdatamap.structure\":{position:{x:vt*1.5,y:ct*2+sn}},\"uxdatamap.views\":{position:{x:vt*3,y:ct*2+sn*2}},\"webapp.react.root\":{position:{x:0,y:ct*3+sn*2}},\"webapp.react.store\":{position:{x:vt*3,y:ct*3+sn*2}},\"webapp.react.views\":{position:{x:0,y:ct*6}},\"settings.config.package\":{position:{x:vt*12,y:ct*4}},\"settings.preferences.versions\":{position:{x:-vt*5,y:ct*4.5}}},edges:[...[\"pm.prd\",\"pm.frd\"].map(e=>{const t=\"pm.details\";return{id:`${t}-${e}`,source:t,target:e}}),...[\"pm.frd\",\"pm.drd\",\"pm.uxsmd\",\"pm.uxdmd\",\"pm.brd\"].map(e=>{const t=\"pm.prd\";return{id:`${t}-${e}`,source:t,target:e}}),...[\"pm.brd\",\"db.schemas\",\"db.postgres\"].map(e=>{const t=\"pm.drd\";return{id:`${t}-${e}`,source:t,target:e}}),...[\"backend.specifications.openapi\",\"backend.specifications.asyncapi\",\"pm.uxdmd\"].map(e=>{const t=\"pm.brd\";return{id:`${t}-${e}`,source:t,target:e}}),...[\"pm.brd\",\"backend.specifications.openapi\",\"backend.specifications.asyncapi\"].map(e=>{const t=\"backend.server.main\";return{id:`${e}-${t}`,source:e,target:t}}),...[\"pm.uxdmd\",\"uxsitemap.structure\"].map(e=>{const t=\"pm.uxsmd\";return{id:`${t}-${e}`,source:t,target:e}}),...[\"uxdatamap.structure\",\"uxdatamap.views\"].map(e=>{const t=\"pm.uxdmd\";return{id:`${t}-${e}`,source:t,target:e}}),...[\"webapp.react.root.app\"].map(e=>{const t=\"uxsitemap.structure\";return{id:`${t}-${e}`,source:t,target:e}}),...[\"webapp.react.root.app\"].map(e=>{const t=\"uxdatamap.views\";return{id:`${t}-${e}`,source:t,target:e}}),...[\"webapp.react.store.redux\"].map(e=>{const t=\"uxdatamap.structure\";return{id:`${t}-${e}`,source:t,target:e}}),...[\"backend.server.main\",\"uxsitemap.structure\"].map(e=>{const t=\"settings.config.package\";return{id:`${t}-${e}`,source:t,target:e}}),...[\"uxsitemap.structure\"].map(e=>{const t=\"settings.preferences.versions\";return{id:`${t}-${e}`,source:t,target:e}})].map(e=>({animated:!0,style:{stroke:\"#999\"},type:\"floating\",markerEnd:{type:Xs.ArrowClosed,width:30,height:30},...e}))},bC={meta:{\"pm.details\":{type:\"pm\",name:\"Details\",desc:\"User-submitted Project Details\"},\"pm.prd\":{type:\"pm\",name:\"PRD\",desc:\"Product Requirements Document\"},\"pm.frd\":{type:\"pm\",name:\"FRD\",desc:\"Features Requirements Document\"},\"pm.drd\":{type:\"pm\",name:\"DRD\",desc:\"Database Requirements Document\"},\"pm.brd\":{type:\"pm\",name:\"BRD\",desc:\"Backend Requirements Document\"},\"pm.uxsmd\":{type:\"pm\",name:\"UXSMD\",desc:\"UX Sitemap Document\"},\"pm.uxdmd\":{type:\"pm\",name:\"UXDMD\",desc:\"UX Datamap Document\"},\"db.schemas\":{type:\"db\",name:\"DB/schemas\",desc:\"Database Tables Schemas\"},\"db.postgres\":{type:\"db\",name:\"DB/postgres\",desc:\"Database Postgresql Commands\"},\"backend.specifications.openapi\":{type:\"backend\",name:\"backend/define:openapi\",desc:\"Backend Definition : openAPI\"},\"backend.specifications.asyncapi\":{type:\"backend\",name:\"backend/define:asyncapi\",desc:\"Backend Definition : asyncAPI\"},\"backend.server.main\":{type:\"backend\",name:\"backend/server:main\",desc:\"Backend Server : Main\"},\"uxsitemap.structure\":{type:\"ux\",name:\"ux/sitemap:structure\",desc:\"UX Sitemap\"},\"uxdatamap.structure\":{type:\"ux\",name:\"ux/datamap:structure\",desc:\"UX Datamap Structure\"},\"uxdatamap.views\":{type:\"ux\",name:\"ux/datamap:views\",desc:\"UX Datamap Views\"},\"webapp.react.root\":{type:\"webapp-structure\",name:\"webapp/react:root\",desc:\"Webapp App Root Component\"},\"webapp.react.store\":{type:\"webapp-structure\",name:\"webapp/react:store\",desc:\"Webapp Data Store\"},\"webapp.react.views\":{type:\"webapp-view\",name:\"webapp/react:views\",desc:\"Webapp View\"},\"settings.config.package\":{type:\"ux\",name:\"settings/config:package\",desc:\"Dependencies & .env for package.json\"},\"settings.preferences.versions\":{type:\"ux\",name:\"settings/preferences:versions\",desc:\"Components versions preferences\"}},types:{\"pm.details\":\"yaml\",pm:\"markdown\",db:\"yaml\",backend:\"complex\",uxsitemap:\"yaml\",uxdatamap:\"yaml\",\"webapp-structure\":\"complex\",\"webapp-view\":\"complex\",settings:\"yaml\"}},Ax=Symbol.for(\"yaml.alias\"),$0=Symbol.for(\"yaml.document\"),Wi=Symbol.for(\"yaml.map\"),TI=Symbol.for(\"yaml.pair\"),ui=Symbol.for(\"yaml.scalar\"),Ha=Symbol.for(\"yaml.seq\"),Bn=Symbol.for(\"yaml.node.type\"),io=e=>!!e&&typeof e==\"object\"&&e[Bn]===Ax,Wa=e=>!!e&&typeof e==\"object\"&&e[Bn]===$0,Ka=e=>!!e&&typeof e==\"object\"&&e[Bn]===Wi,Ue=e=>!!e&&typeof e==\"object\"&&e[Bn]===TI,Me=e=>!!e&&typeof e==\"object\"&&e[Bn]===ui,qa=e=>!!e&&typeof e==\"object\"&&e[Bn]===Ha;function qe(e){if(e&&typeof e==\"object\")switch(e[Bn]){case Wi:case Ha:return!0}return!1}function Je(e){if(e&&typeof e==\"object\")switch(e[Bn]){case Ax:case Wi:case ui:case Ha:return!0}return!1}const nte=e=>(Me(e)||qe(e))&&!!e.anchor,Zt=Symbol(\"break visit\"),_I=Symbol(\"skip children\"),_r=Symbol(\"remove node\");function ns(e,t){const n=AI(t);Wa(e)?zo(null,e.contents,n,Object.freeze([e]))===_r&&(e.contents=null):zo(null,e,n,Object.freeze([]))}ns.BREAK=Zt;ns.SKIP=_I;ns.REMOVE=_r;function zo(e,t,n,r){const i=NI(e,t,n,r);if(Je(i)||Ue(i))return PI(e,r,i),zo(e,i,n,r);if(typeof i!=\"symbol\"){if(qe(t)){r=Object.freeze(r.concat(t));for(let s=0;s<t.items.length;++s){const o=zo(s,t.items[s],n,r);if(typeof o==\"number\")s=o-1;else{if(o===Zt)return Zt;o===_r&&(t.items.splice(s,1),s-=1)}}}else if(Ue(t)){r=Object.freeze(r.concat(t));const s=zo(\"key\",t.key,n,r);if(s===Zt)return Zt;s===_r&&(t.key=null);const o=zo(\"value\",t.value,n,r);if(o===Zt)return Zt;o===_r&&(t.value=null)}}return i}async function Pp(e,t){const n=AI(t);Wa(e)?await Uo(null,e.contents,n,Object.freeze([e]))===_r&&(e.contents=null):await Uo(null,e,n,Object.freeze([]))}Pp.BREAK=Zt;Pp.SKIP=_I;Pp.REMOVE=_r;async function Uo(e,t,n,r){const i=await NI(e,t,n,r);if(Je(i)||Ue(i))return PI(e,r,i),Uo(e,i,n,r);if(typeof i!=\"symbol\"){if(qe(t)){r=Object.freeze(r.concat(t));for(let s=0;s<t.items.length;++s){const o=await Uo(s,t.items[s],n,r);if(typeof o==\"number\")s=o-1;else{if(o===Zt)return Zt;o===_r&&(t.items.splice(s,1),s-=1)}}}else if(Ue(t)){r=Object.freeze(r.concat(t));const s=await Uo(\"key\",t.key,n,r);if(s===Zt)return Zt;s===_r&&(t.key=null);const o=await Uo(\"value\",t.value,n,r);if(o===Zt)return Zt;o===_r&&(t.value=null)}}return i}function AI(e){return typeof e==\"object\"&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function NI(e,t,n,r){var i,s,o,a,l;if(typeof n==\"function\")return n(e,t,r);if(Ka(t))return(i=n.Map)==null?void 0:i.call(n,e,t,r);if(qa(t))return(s=n.Seq)==null?void 0:s.call(n,e,t,r);if(Ue(t))return(o=n.Pair)==null?void 0:o.call(n,e,t,r);if(Me(t))return(a=n.Scalar)==null?void 0:a.call(n,e,t,r);if(io(t))return(l=n.Alias)==null?void 0:l.call(n,e,t,r)}function PI(e,t,n){const r=t[t.length-1];if(qe(r))r.items[e]=n;else if(Ue(r))e===\"key\"?r.key=n:r.value=n;else if(Wa(r))r.contents=n;else{const i=io(r)?\"alias\":\"scalar\";throw new Error(`Cannot replace node with ${i} parent`)}}const rte={\"!\":\"%21\",\",\":\"%2C\",\"[\":\"%5B\",\"]\":\"%5D\",\"{\":\"%7B\",\"}\":\"%7D\"},ite=e=>e.replace(/[!,[\\]{}]/g,t=>rte[t]);class Ft{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},Ft.defaultYaml,t),this.tags=Object.assign({},Ft.defaultTags,n)}clone(){const t=new Ft(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){const t=new Ft(this.yaml,this.tags);switch(this.yaml.version){case\"1.1\":this.atNextDocument=!0;break;case\"1.2\":this.atNextDocument=!1,this.yaml={explicit:Ft.defaultYaml.explicit,version:\"1.2\"},this.tags=Object.assign({},Ft.defaultTags);break}return t}add(t,n){this.atNextDocument&&(this.yaml={explicit:Ft.defaultYaml.explicit,version:\"1.1\"},this.tags=Object.assign({},Ft.defaultTags),this.atNextDocument=!1);const r=t.trim().split(/[ \\t]+/),i=r.shift();switch(i){case\"%TAG\":{if(r.length!==2&&(n(0,\"%TAG directive should contain exactly two parts\"),r.length<2))return!1;const[s,o]=r;return this.tags[s]=o,!0}case\"%YAML\":{if(this.yaml.explicit=!0,r.length!==1)return n(0,\"%YAML directive should contain exactly one part\"),!1;const[s]=r;if(s===\"1.1\"||s===\"1.2\")return this.yaml.version=s,!0;{const o=/^\\d+\\.\\d+$/.test(s);return n(6,`Unsupported YAML version ${s}`,o),!1}}default:return n(0,`Unknown directive ${i}`,!0),!1}}tagName(t,n){if(t===\"!\")return\"!\";if(t[0]!==\"!\")return n(`Not a valid tag: ${t}`),null;if(t[1]===\"<\"){const o=t.slice(2,-1);return o===\"!\"||o===\"!!\"?(n(`Verbatim tags aren't resolved, so ${t} is invalid.`),null):(t[t.length-1]!==\">\"&&n(\"Verbatim tags must end with a >\"),o)}const[,r,i]=t.match(/^(.*!)([^!]*)$/s);i||n(`The ${t} tag has no suffix`);const s=this.tags[r];if(s)try{return s+decodeURIComponent(i)}catch(o){return n(String(o)),null}return r===\"!\"?t:(n(`Could not resolve tag: ${t}`),null)}tagString(t){for(const[n,r]of Object.entries(this.tags))if(t.startsWith(r))return n+ite(t.substring(r.length));return t[0]===\"!\"?t:`!<${t}>`}toString(t){const n=this.yaml.explicit?[`%YAML ${this.yaml.version||\"1.2\"}`]:[],r=Object.entries(this.tags);let i;if(t&&r.length>0&&Je(t.contents)){const s={};ns(t.contents,(o,a)=>{Je(a)&&a.tag&&(s[a.tag]=!0)}),i=Object.keys(s)}else i=[];for(const[s,o]of r)s===\"!!\"&&o===\"tag:yaml.org,2002:\"||(!t||i.some(a=>a.startsWith(o)))&&n.push(`%TAG ${s} ${o}`);return n.join(`\n`)}}Ft.defaultYaml={explicit:!1,version:\"1.2\"};Ft.defaultTags={\"!!\":\"tag:yaml.org,2002:\"};function OI(e){if(/[\\x00-\\x19\\s,[\\]{}]/.test(e)){const n=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw new Error(n)}return!0}function LI(e){const t=new Set;return ns(e,{Value(n,r){r.anchor&&t.add(r.anchor)}}),t}function RI(e,t){for(let n=1;;++n){const r=`${e}${n}`;if(!t.has(r))return r}}function ste(e,t){const n=[],r=new Map;let i=null;return{onAnchor:s=>{n.push(s),i||(i=LI(e));const o=RI(t,i);return i.add(o),o},setAnchors:()=>{for(const s of n){const o=r.get(s);if(typeof o==\"object\"&&o.anchor&&(Me(o.node)||qe(o.node)))o.node.anchor=o.anchor;else{const a=new Error(\"Failed to resolve repeated object (this should not happen)\");throw a.source=s,a}}},sourceObjects:r}}function Ho(e,t,n,r){if(r&&typeof r==\"object\")if(Array.isArray(r))for(let i=0,s=r.length;i<s;++i){const o=r[i],a=Ho(e,r,String(i),o);a===void 0?delete r[i]:a!==o&&(r[i]=a)}else if(r instanceof Map)for(const i of Array.from(r.keys())){const s=r.get(i),o=Ho(e,r,i,s);o===void 0?r.delete(i):o!==s&&r.set(i,o)}else if(r instanceof Set)for(const i of Array.from(r)){const s=Ho(e,r,i,i);s===void 0?r.delete(i):s!==i&&(r.delete(i),r.add(s))}else for(const[i,s]of Object.entries(r)){const o=Ho(e,r,i,s);o===void 0?delete r[i]:o!==s&&(r[i]=o)}return e.call(t,n,r)}function Mn(e,t,n){if(Array.isArray(e))return e.map((r,i)=>Mn(r,String(i),n));if(e&&typeof e.toJSON==\"function\"){if(!n||!nte(e))return e.toJSON(t,n);const r={aliasCount:0,count:1,res:void 0};n.anchors.set(e,r),n.onCreate=s=>{r.res=s,delete n.onCreate};const i=e.toJSON(t,n);return n.onCreate&&n.onCreate(i),i}return typeof e==\"bigint\"&&!(n!=null&&n.keep)?Number(e):e}class Nx{constructor(t){Object.defineProperty(this,Bn,{value:t})}clone(){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(t.range=this.range.slice()),t}toJS(t,{mapAsMap:n,maxAliasCount:r,onAnchor:i,reviver:s}={}){if(!Wa(t))throw new TypeError(\"A document argument is required\");const o={anchors:new Map,doc:t,keep:!0,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r==\"number\"?r:100},a=Mn(this,\"\",o);if(typeof i==\"function\")for(const{count:l,res:u}of o.anchors.values())i(u,l);return typeof s==\"function\"?Ho(s,{\"\":a},\"\",a):a}}class Op extends Nx{constructor(t){super(Ax),this.source=t,Object.defineProperty(this,\"tag\",{set(){throw new Error(\"Alias nodes cannot have tags\")}})}resolve(t){let n;return ns(t,{Node:(r,i)=>{if(i===this)return ns.BREAK;i.anchor===this.source&&(n=i)}}),n}toJSON(t,n){if(!n)return{source:this.source};const{anchors:r,doc:i,maxAliasCount:s}=n,o=this.resolve(i);if(!o){const l=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(l)}let a=r.get(o);if(a||(Mn(o,null,n),a=r.get(o)),!a||a.res===void 0){const l=\"This should not happen: Alias anchor was not resolved?\";throw new ReferenceError(l)}if(s>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=td(i,o,r)),a.count*a.aliasCount>s)){const l=\"Excessive alias count indicates a resource exhaustion attack\";throw new ReferenceError(l)}return a.res}toString(t,n,r){const i=`*${this.source}`;if(t){if(OI(this.source),t.options.verifyAliasOrder&&!t.anchors.has(this.source)){const s=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(s)}if(t.implicitKey)return`${i} `}return i}}function td(e,t,n){if(io(t)){const r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}else if(qe(t)){let r=0;for(const i of t.items){const s=td(e,i,n);s>r&&(r=s)}return r}else if(Ue(t)){const r=td(e,t.key,n),i=td(e,t.value,n);return Math.max(r,i)}return 1}const II=e=>!e||typeof e!=\"function\"&&typeof e!=\"object\";class ge extends Nx{constructor(t){super(ui),this.value=t}toJSON(t,n){return n!=null&&n.keep?this.value:Mn(this.value,t,n)}toString(){return String(this.value)}}ge.BLOCK_FOLDED=\"BLOCK_FOLDED\";ge.BLOCK_LITERAL=\"BLOCK_LITERAL\";ge.PLAIN=\"PLAIN\";ge.QUOTE_DOUBLE=\"QUOTE_DOUBLE\";ge.QUOTE_SINGLE=\"QUOTE_SINGLE\";const ote=\"tag:yaml.org,2002:\";function ate(e,t,n){if(t){const r=n.filter(s=>s.tag===t),i=r.find(s=>!s.format)??r[0];if(!i)throw new Error(`Tag ${t} not found`);return i}return n.find(r=>{var i;return((i=r.identify)==null?void 0:i.call(r,e))&&!r.format})}function Wu(e,t,n){var c,d,h;if(Wa(e)&&(e=e.contents),Je(e))return e;if(Ue(e)){const p=(d=(c=n.schema[Wi]).createNode)==null?void 0:d.call(c,n.schema,null,n);return p.items.push(e),p}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<\"u\"&&e instanceof BigInt)&&(e=e.valueOf());const{aliasDuplicateObjects:r,onAnchor:i,onTagObj:s,schema:o,sourceObjects:a}=n;let l;if(r&&e&&typeof e==\"object\"){if(l=a.get(e),l)return l.anchor||(l.anchor=i(e)),new Op(l.anchor);l={anchor:null,node:null},a.set(e,l)}t!=null&&t.startsWith(\"!!\")&&(t=ote+t.slice(2));let u=ate(e,t,o.tags);if(!u){if(e&&typeof e.toJSON==\"function\"&&(e=e.toJSON()),!e||typeof e!=\"object\"){const p=new ge(e);return l&&(l.node=p),p}u=e instanceof Map?o[Wi]:Symbol.iterator in Object(e)?o[Ha]:o[Wi]}s&&(s(u),delete n.onTagObj);const f=u!=null&&u.createNode?u.createNode(n.schema,e,n):typeof((h=u==null?void 0:u.nodeClass)==null?void 0:h.from)==\"function\"?u.nodeClass.from(n.schema,e,n):new ge(e);return t?f.tag=t:u.default||(f.tag=u.tag),l&&(l.node=f),f}function hh(e,t,n){let r=n;for(let i=t.length-1;i>=0;--i){const s=t[i];if(typeof s==\"number\"&&Number.isInteger(s)&&s>=0){const o=[];o[s]=r,r=o}else r=new Map([[s,r]])}return Wu(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error(\"This should not happen, please report a bug.\")},schema:e,sourceObjects:new Map})}const Il=e=>e==null||typeof e==\"object\"&&!!e[Symbol.iterator]().next().done;class DI extends Nx{constructor(t,n){super(t),Object.defineProperty(this,\"schema\",{value:n,configurable:!0,enumerable:!1,writable:!0})}clone(t){const n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return t&&(n.schema=t),n.items=n.items.map(r=>Je(r)||Ue(r)?r.clone(t):r),this.range&&(n.range=this.range.slice()),n}addIn(t,n){if(Il(t))this.add(n);else{const[r,...i]=t,s=this.get(r,!0);if(qe(s))s.addIn(i,n);else if(s===void 0&&this.schema)this.set(r,hh(this.schema,i,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${i}`)}}deleteIn(t){const[n,...r]=t;if(r.length===0)return this.delete(n);const i=this.get(n,!0);if(qe(i))return i.deleteIn(r);throw new Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}getIn(t,n){const[r,...i]=t,s=this.get(r,!0);return i.length===0?!n&&Me(s)?s.value:s:qe(s)?s.getIn(i,n):void 0}hasAllNullValues(t){return this.items.every(n=>{if(!Ue(n))return!1;const r=n.value;return r==null||t&&Me(r)&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(t){const[n,...r]=t;if(r.length===0)return this.has(n);const i=this.get(n,!0);return qe(i)?i.hasIn(r):!1}setIn(t,n){const[r,...i]=t;if(i.length===0)this.set(r,n);else{const s=this.get(r,!0);if(qe(s))s.setIn(i,n);else if(s===void 0&&this.schema)this.set(r,hh(this.schema,i,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${i}`)}}}const lte=e=>e.replace(/^(?!$)(?: $)?/gm,\"#\");function qr(e,t){return/^\\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}const Ps=(e,t,n)=>e.endsWith(`\n`)?qr(n,t):n.includes(`\n`)?`\n`+qr(n,t):(e.endsWith(\" \")?\"\":\" \")+n,MI=\"flow\",B0=\"block\",nd=\"quoted\";function Lp(e,t,n=\"flow\",{indentAtStart:r,lineWidth:i=80,minContentWidth:s=20,onFold:o,onOverflow:a}={}){if(!i||i<0)return e;i<s&&(s=0);const l=Math.max(1+s,1+i-t.length);if(e.length<=l)return e;const u=[],f={};let c=i-t.length;typeof r==\"number\"&&(r>i-Math.max(2,s)?u.push(0):c=i-r);let d,h,p=!1,m=-1,w=-1,y=-1;n===B0&&(m=SC(e,m,t.length),m!==-1&&(c=m+l));for(let g;g=e[m+=1];){if(n===nd&&g===\"\\\\\"){switch(w=m,e[m+1]){case\"x\":m+=3;break;case\"u\":m+=5;break;case\"U\":m+=9;break;default:m+=1}y=m}if(g===`\n`)n===B0&&(m=SC(e,m,t.length)),c=m+t.length+l,d=void 0;else{if(g===\" \"&&h&&h!==\" \"&&h!==`\n`&&h!==\"\t\"){const x=e[m+1];x&&x!==\" \"&&x!==`\n`&&x!==\"\t\"&&(d=m)}if(m>=c)if(d)u.push(d),c=d+l,d=void 0;else if(n===nd){for(;h===\" \"||h===\"\t\";)h=g,g=e[m+=1],p=!0;const x=m>y+1?m-2:w-1;if(f[x])return e;u.push(x),f[x]=!0,c=x+l,d=void 0}else p=!0}h=g}if(p&&a&&a(),u.length===0)return e;o&&o();let v=e.slice(0,u[0]);for(let g=0;g<u.length;++g){const x=u[g],S=u[g+1]||e.length;x===0?v=`\n${t}${e.slice(0,S)}`:(n===nd&&f[x]&&(v+=`${e[x]}\\\\`),v+=`\n${t}${e.slice(x+1,S)}`)}return v}function SC(e,t,n){let r=t,i=t+1,s=e[i];for(;s===\" \"||s===\"\t\";)if(t<i+n)s=e[++t];else{do s=e[++t];while(s&&s!==`\n`);r=t,i=t+1,s=e[i]}return r}const Rp=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),Ip=e=>/^(%|---|\\.\\.\\.)/m.test(e);function ute(e,t,n){if(!t||t<0)return!1;const r=t-n,i=e.length;if(i<=r)return!1;for(let s=0,o=0;s<i;++s)if(e[s]===`\n`){if(s-o>r)return!0;if(o=s+1,i-o<=r)return!1}return!0}function nu(e,t){const n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;const{implicitKey:r}=t,i=t.options.doubleQuotedMinMultiLineLength,s=t.indent||(Ip(e)?\"  \":\"\");let o=\"\",a=0;for(let l=0,u=n[l];u;u=n[++l])if(u===\" \"&&n[l+1]===\"\\\\\"&&n[l+2]===\"n\"&&(o+=n.slice(a,l)+\"\\\\ \",l+=1,a=l,u=\"\\\\\"),u===\"\\\\\")switch(n[l+1]){case\"u\":{o+=n.slice(a,l);const f=n.substr(l+2,4);switch(f){case\"0000\":o+=\"\\\\0\";break;case\"0007\":o+=\"\\\\a\";break;case\"000b\":o+=\"\\\\v\";break;case\"001b\":o+=\"\\\\e\";break;case\"0085\":o+=\"\\\\N\";break;case\"00a0\":o+=\"\\\\_\";break;case\"2028\":o+=\"\\\\L\";break;case\"2029\":o+=\"\\\\P\";break;default:f.substr(0,2)===\"00\"?o+=\"\\\\x\"+f.substr(2):o+=n.substr(l,6)}l+=5,a=l+1}break;case\"n\":if(r||n[l+2]==='\"'||n.length<i)l+=1;else{for(o+=n.slice(a,l)+`\n\n`;n[l+2]===\"\\\\\"&&n[l+3]===\"n\"&&n[l+4]!=='\"';)o+=`\n`,l+=2;o+=s,n[l+2]===\" \"&&(o+=\"\\\\\"),l+=1,a=l+1}break;default:l+=1}return o=a?o+n.slice(a):n,r?o:Lp(o,s,nd,Rp(t,!1))}function V0(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes(`\n`)||/[ \\t]\\n|\\n[ \\t]/.test(e))return nu(e,t);const n=t.indent||(Ip(e)?\"  \":\"\"),r=\"'\"+e.replace(/'/g,\"''\").replace(/\\n+/g,`$&\n${n}`)+\"'\";return t.implicitKey?r:Lp(r,n,MI,Rp(t,!1))}function Wo(e,t){const{singleQuote:n}=t.options;let r;if(n===!1)r=nu;else{const i=e.includes('\"'),s=e.includes(\"'\");i&&!s?r=V0:s&&!i?r=nu:r=n?V0:nu}return r(e,t)}let z0;try{z0=new RegExp(`(^|(?<!\n))\n+(?!\n|$)`,\"g\")}catch{z0=/\\n+(?!\\n|$)/g}function rd({comment:e,type:t,value:n},r,i,s){const{blockQuote:o,commentString:a,lineWidth:l}=r.options;if(!o||/\\n[\\t ]+$/.test(n)||/^\\s*$/.test(n))return Wo(n,r);const u=r.indent||(r.forceBlockIndent||Ip(n)?\"  \":\"\"),f=o===\"literal\"?!0:o===\"folded\"||t===ge.BLOCK_FOLDED?!1:t===ge.BLOCK_LITERAL?!0:!ute(n,l,u.length);if(!n)return f?`|\n`:`>\n`;let c,d;for(d=n.length;d>0;--d){const k=n[d-1];if(k!==`\n`&&k!==\"\t\"&&k!==\" \")break}let h=n.substring(d);const p=h.indexOf(`\n`);p===-1?c=\"-\":n===h||p!==h.length-1?(c=\"+\",s&&s()):c=\"\",h&&(n=n.slice(0,-h.length),h[h.length-1]===`\n`&&(h=h.slice(0,-1)),h=h.replace(z0,`$&${u}`));let m=!1,w,y=-1;for(w=0;w<n.length;++w){const k=n[w];if(k===\" \")m=!0;else if(k===`\n`)y=w;else break}let v=n.substring(0,y<w?y+1:w);v&&(n=n.substring(v.length),v=v.replace(/\\n+/g,`$&${u}`));let x=(f?\"|\":\">\")+(m?u?\"2\":\"1\":\"\")+c;if(e&&(x+=\" \"+a(e.replace(/ ?[\\r\\n]+/g,\" \")),i&&i()),f)return n=n.replace(/\\n+/g,`$&${u}`),`${x}\n${u}${v}${n}${h}`;n=n.replace(/\\n+/g,`\n$&`).replace(/(?:^|\\n)([\\t ].*)(?:([\\n\\t ]*)\\n(?![\\n\\t ]))?/g,\"$1$2\").replace(/\\n+/g,`$&${u}`);const S=Lp(`${v}${n}${h}`,u,B0,Rp(r,!0));return`${x}\n${u}${S}`}function cte(e,t,n,r){const{type:i,value:s}=e,{actualString:o,implicitKey:a,indent:l,indentStep:u,inFlow:f}=t;if(a&&s.includes(`\n`)||f&&/[[\\]{},]/.test(s))return Wo(s,t);if(!s||/^[\\n\\t ,[\\]{}#&*!|>'\"%@`]|^[?-]$|^[?-][ \\t]|[\\n:][ \\t]|[ \\t]\\n|[\\n\\t ]#|[\\n\\t :]$/.test(s))return a||f||!s.includes(`\n`)?Wo(s,t):rd(e,t,n,r);if(!a&&!f&&i!==ge.PLAIN&&s.includes(`\n`))return rd(e,t,n,r);if(Ip(s)){if(l===\"\")return t.forceBlockIndent=!0,rd(e,t,n,r);if(a&&l===u)return Wo(s,t)}const c=s.replace(/\\n+/g,`$&\n${l}`);if(o){const d=m=>{var w;return m.default&&m.tag!==\"tag:yaml.org,2002:str\"&&((w=m.test)==null?void 0:w.test(c))},{compat:h,tags:p}=t.doc.schema;if(p.some(d)||h!=null&&h.some(d))return Wo(s,t)}return a?c:Lp(c,l,MI,Rp(t,!1))}function vc(e,t,n,r){const{implicitKey:i,inFlow:s}=t,o=typeof e.value==\"string\"?e:Object.assign({},e,{value:String(e.value)});let{type:a}=e;a!==ge.QUOTE_DOUBLE&&/[\\x00-\\x08\\x0b-\\x1f\\x7f-\\x9f\\u{D800}-\\u{DFFF}]/u.test(o.value)&&(a=ge.QUOTE_DOUBLE);const l=f=>{switch(f){case ge.BLOCK_FOLDED:case ge.BLOCK_LITERAL:return i||s?Wo(o.value,t):rd(o,t,n,r);case ge.QUOTE_DOUBLE:return nu(o.value,t);case ge.QUOTE_SINGLE:return V0(o.value,t);case ge.PLAIN:return cte(o,t,n,r);default:return null}};let u=l(a);if(u===null){const{defaultKeyType:f,defaultStringType:c}=t.options,d=i&&f||c;if(u=l(d),u===null)throw new Error(`Unsupported default string type ${d}`)}return u}function jI(e,t){const n=Object.assign({blockQuote:!0,commentString:lte,defaultKeyType:null,defaultStringType:\"PLAIN\",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:\"false\",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:\"null\",simpleKeys:!1,singleQuote:null,trueStr:\"true\",verifyAliasOrder:!0},e.schema.toStringOptions,t);let r;switch(n.collectionStyle){case\"block\":r=!1;break;case\"flow\":r=!0;break;default:r=null}return{anchors:new Set,doc:e,flowCollectionPadding:n.flowCollectionPadding?\" \":\"\",indent:\"\",indentStep:typeof n.indent==\"number\"?\" \".repeat(n.indent):\"  \",inFlow:r,options:n}}function fte(e,t){var i;if(t.tag){const s=e.filter(o=>o.tag===t.tag);if(s.length>0)return s.find(o=>o.format===t.format)??s[0]}let n,r;if(Me(t)){r=t.value;const s=e.filter(o=>{var a;return(a=o.identify)==null?void 0:a.call(o,r)});n=s.find(o=>o.format===t.format)??s.find(o=>!o.format)}else r=t,n=e.find(s=>s.nodeClass&&r instanceof s.nodeClass);if(!n){const s=((i=r==null?void 0:r.constructor)==null?void 0:i.name)??typeof r;throw new Error(`Tag not resolved for ${s} value`)}return n}function dte(e,t,{anchors:n,doc:r}){if(!r.directives)return\"\";const i=[],s=(Me(e)||qe(e))&&e.anchor;s&&OI(s)&&(n.add(s),i.push(`&${s}`));const o=e.tag?e.tag:t.default?null:t.tag;return o&&i.push(r.directives.tagString(o)),i.join(\" \")}function Aa(e,t,n,r){var l;if(Ue(e))return e.toString(t,n,r);if(io(e)){if(t.doc.directives)return e.toString(t);if((l=t.resolvedAliases)!=null&&l.has(e))throw new TypeError(\"Cannot stringify circular structure without alias nodes\");t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let i;const s=Je(e)?e:t.doc.createNode(e,{onTagObj:u=>i=u});i||(i=fte(t.doc.schema.tags,s));const o=dte(s,i,t);o.length>0&&(t.indentAtStart=(t.indentAtStart??0)+o.length+1);const a=typeof i.stringify==\"function\"?i.stringify(s,t,n,r):Me(s)?vc(s,t,n,r):s.toString(t,n,r);return o?Me(s)||a[0]===\"{\"||a[0]===\"[\"?`${o} ${a}`:`${o}\n${t.indent}${a}`:a}function hte({key:e,value:t},n,r,i){const{allNullValues:s,doc:o,indent:a,indentStep:l,options:{commentString:u,indentSeq:f,simpleKeys:c}}=n;let d=Je(e)&&e.comment||null;if(c){if(d)throw new Error(\"With simple keys, key nodes cannot have comments\");if(qe(e)||!Je(e)&&typeof e==\"object\"){const C=\"With simple keys, collection cannot be used as a key value\";throw new Error(C)}}let h=!c&&(!e||d&&t==null&&!n.inFlow||qe(e)||(Me(e)?e.type===ge.BLOCK_FOLDED||e.type===ge.BLOCK_LITERAL:typeof e==\"object\"));n=Object.assign({},n,{allNullValues:!1,implicitKey:!h&&(c||!s),indent:a+l});let p=!1,m=!1,w=Aa(e,n,()=>p=!0,()=>m=!0);if(!h&&!n.inFlow&&w.length>1024){if(c)throw new Error(\"With simple keys, single line scalar must not span more than 1024 characters\");h=!0}if(n.inFlow){if(s||t==null)return p&&r&&r(),w===\"\"?\"?\":h?`? ${w}`:w}else if(s&&!c||t==null&&h)return w=`? ${w}`,d&&!p?w+=Ps(w,n.indent,u(d)):m&&i&&i(),w;p&&(d=null),h?(d&&(w+=Ps(w,n.indent,u(d))),w=`? ${w}\n${a}:`):(w=`${w}:`,d&&(w+=Ps(w,n.indent,u(d))));let y,v,g;Je(t)?(y=!!t.spaceBefore,v=t.commentBefore,g=t.comment):(y=!1,v=null,g=null,t&&typeof t==\"object\"&&(t=o.createNode(t))),n.implicitKey=!1,!h&&!d&&Me(t)&&(n.indentAtStart=w.length+1),m=!1,!f&&l.length>=2&&!n.inFlow&&!h&&qa(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let x=!1;const S=Aa(t,n,()=>x=!0,()=>m=!0);let k=\" \";if(d||y||v){if(k=y?`\n`:\"\",v){const C=u(v);k+=`\n${qr(C,n.indent)}`}S===\"\"&&!n.inFlow?k===`\n`&&(k=`\n\n`):k+=`\n${n.indent}`}else if(!h&&qe(t)){const C=S[0],T=S.indexOf(`\n`),O=T!==-1,A=n.inFlow??t.flow??t.items.length===0;if(O||!A){let j=!1;if(O&&(C===\"&\"||C===\"!\")){let L=S.indexOf(\" \");C===\"&\"&&L!==-1&&L<T&&S[L+1]===\"!\"&&(L=S.indexOf(\" \",L+1)),(L===-1||T<L)&&(j=!0)}j||(k=`\n${n.indent}`)}}else(S===\"\"||S[0]===`\n`)&&(k=\"\");return w+=k+S,n.inFlow?x&&r&&r():g&&!x?w+=Ps(w,n.indent,u(g)):m&&i&&i(),w}function FI(e,t){(e===\"debug\"||e===\"warn\")&&(typeof process<\"u\"&&process.emitWarning?process.emitWarning(t):console.warn(t))}const kC=\"<<\";function $I(e,t,{key:n,value:r}){if(e!=null&&e.doc.schema.merge&&pte(n))if(r=io(r)?r.resolve(e.doc):r,qa(r))for(const i of r.items)pg(e,t,i);else if(Array.isArray(r))for(const i of r)pg(e,t,i);else pg(e,t,r);else{const i=Mn(n,\"\",e);if(t instanceof Map)t.set(i,Mn(r,i,e));else if(t instanceof Set)t.add(i);else{const s=mte(n,i,e),o=Mn(r,s,e);s in t?Object.defineProperty(t,s,{value:o,writable:!0,enumerable:!0,configurable:!0}):t[s]=o}}return t}const pte=e=>e===kC||Me(e)&&e.value===kC&&(!e.type||e.type===ge.PLAIN);function pg(e,t,n){const r=e&&io(n)?n.resolve(e.doc):n;if(!Ka(r))throw new Error(\"Merge sources must be maps or map aliases\");const i=r.toJSON(null,e,Map);for(const[s,o]of i)t instanceof Map?t.has(s)||t.set(s,o):t instanceof Set?t.add(s):Object.prototype.hasOwnProperty.call(t,s)||Object.defineProperty(t,s,{value:o,writable:!0,enumerable:!0,configurable:!0});return t}function mte(e,t,n){if(t===null)return\"\";if(typeof t!=\"object\")return String(t);if(Je(e)&&(n!=null&&n.doc)){const r=jI(n.doc,{});r.anchors=new Set;for(const s of n.anchors.keys())r.anchors.add(s.anchor);r.inFlow=!0,r.inStringifyKey=!0;const i=e.toString(r);if(!n.mapKeyWarned){let s=JSON.stringify(i);s.length>40&&(s=s.substring(0,36)+'...\"'),FI(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${s}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return i}return JSON.stringify(t)}function Px(e,t,n){const r=Wu(e,void 0,n),i=Wu(t,void 0,n);return new Ot(r,i)}class Ot{constructor(t,n=null){Object.defineProperty(this,Bn,{value:TI}),this.key=t,this.value=n}clone(t){let{key:n,value:r}=this;return Je(n)&&(n=n.clone(t)),Je(r)&&(r=r.clone(t)),new Ot(n,r)}toJSON(t,n){const r=n!=null&&n.mapAsMap?new Map:{};return $I(n,r,this)}toString(t,n,r){return t!=null&&t.doc?hte(this,t,n,r):JSON.stringify(this)}}function BI(e,t,n){return(t.inFlow??e.flow?yte:gte)(e,t,n)}function gte({comment:e,items:t},n,{blockItemPrefix:r,flowChars:i,itemIndent:s,onChompKeep:o,onComment:a}){const{indent:l,options:{commentString:u}}=n,f=Object.assign({},n,{indent:s,type:null});let c=!1;const d=[];for(let p=0;p<t.length;++p){const m=t[p];let w=null;if(Je(m))!c&&m.spaceBefore&&d.push(\"\"),ph(n,d,m.commentBefore,c),m.comment&&(w=m.comment);else if(Ue(m)){const v=Je(m.key)?m.key:null;v&&(!c&&v.spaceBefore&&d.push(\"\"),ph(n,d,v.commentBefore,c))}c=!1;let y=Aa(m,f,()=>w=null,()=>c=!0);w&&(y+=Ps(y,s,u(w))),c&&w&&(c=!1),d.push(r+y)}let h;if(d.length===0)h=i.start+i.end;else{h=d[0];for(let p=1;p<d.length;++p){const m=d[p];h+=m?`\n${l}${m}`:`\n`}}return e?(h+=`\n`+qr(u(e),l),a&&a()):c&&o&&o(),h}function yte({items:e},t,{flowChars:n,itemIndent:r}){const{indent:i,indentStep:s,flowCollectionPadding:o,options:{commentString:a}}=t;r+=s;const l=Object.assign({},t,{indent:r,inFlow:!0,type:null});let u=!1,f=0;const c=[];for(let p=0;p<e.length;++p){const m=e[p];let w=null;if(Je(m))m.spaceBefore&&c.push(\"\"),ph(t,c,m.commentBefore,!1),m.comment&&(w=m.comment);else if(Ue(m)){const v=Je(m.key)?m.key:null;v&&(v.spaceBefore&&c.push(\"\"),ph(t,c,v.commentBefore,!1),v.comment&&(u=!0));const g=Je(m.value)?m.value:null;g?(g.comment&&(w=g.comment),g.commentBefore&&(u=!0)):m.value==null&&(v!=null&&v.comment)&&(w=v.comment)}w&&(u=!0);let y=Aa(m,l,()=>w=null);p<e.length-1&&(y+=\",\"),w&&(y+=Ps(y,r,a(w))),!u&&(c.length>f||y.includes(`\n`))&&(u=!0),c.push(y),f=c.length}const{start:d,end:h}=n;if(c.length===0)return d+h;if(!u){const p=c.reduce((m,w)=>m+w.length+2,2);u=t.options.lineWidth>0&&p>t.options.lineWidth}if(u){let p=d;for(const m of c)p+=m?`\n${s}${i}${m}`:`\n`;return`${p}\n${i}${h}`}else return`${d}${o}${c.join(\" \")}${o}${h}`}function ph({indent:e,options:{commentString:t}},n,r,i){if(r&&i&&(r=r.replace(/^\\n+/,\"\")),r){const s=qr(t(r),e);n.push(s.trimStart())}}function Os(e,t){const n=Me(t)?t.value:t;for(const r of e)if(Ue(r)&&(r.key===t||r.key===n||Me(r.key)&&r.key.value===n))return r}class fn extends DI{static get tagName(){return\"tag:yaml.org,2002:map\"}constructor(t){super(Wi,t),this.items=[]}static from(t,n,r){const{keepUndefined:i,replacer:s}=r,o=new this(t),a=(l,u)=>{if(typeof s==\"function\")u=s.call(n,l,u);else if(Array.isArray(s)&&!s.includes(l))return;(u!==void 0||i)&&o.items.push(Px(l,u,r))};if(n instanceof Map)for(const[l,u]of n)a(l,u);else if(n&&typeof n==\"object\")for(const l of Object.keys(n))a(l,n[l]);return typeof t.sortMapEntries==\"function\"&&o.items.sort(t.sortMapEntries),o}add(t,n){var o;let r;Ue(t)?r=t:!t||typeof t!=\"object\"||!(\"key\"in t)?r=new Ot(t,t==null?void 0:t.value):r=new Ot(t.key,t.value);const i=Os(this.items,r.key),s=(o=this.schema)==null?void 0:o.sortMapEntries;if(i){if(!n)throw new Error(`Key ${r.key} already set`);Me(i.value)&&II(r.value)?i.value.value=r.value:i.value=r.value}else if(s){const a=this.items.findIndex(l=>s(r,l)<0);a===-1?this.items.push(r):this.items.splice(a,0,r)}else this.items.push(r)}delete(t){const n=Os(this.items,t);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(t,n){const r=Os(this.items,t),i=r==null?void 0:r.value;return(!n&&Me(i)?i.value:i)??void 0}has(t){return!!Os(this.items,t)}set(t,n){this.add(new Ot(t,n),!0)}toJSON(t,n,r){const i=r?new r:n!=null&&n.mapAsMap?new Map:{};n!=null&&n.onCreate&&n.onCreate(i);for(const s of this.items)$I(n,i,s);return i}toString(t,n,r){if(!t)return JSON.stringify(this);for(const i of this.items)if(!Ue(i))throw new Error(`Map items must all be pairs; found ${JSON.stringify(i)} instead`);return!t.allNullValues&&this.hasAllNullValues(!1)&&(t=Object.assign({},t,{allNullValues:!0})),BI(this,t,{blockItemPrefix:\"\",flowChars:{start:\"{\",end:\"}\"},itemIndent:t.indent||\"\",onChompKeep:r,onComment:n})}}const Ya={collection:\"map\",default:!0,nodeClass:fn,tag:\"tag:yaml.org,2002:map\",resolve(e,t){return Ka(e)||t(\"Expected a mapping for this tag\"),e},createNode:(e,t,n)=>fn.from(e,t,n)};class rs extends DI{static get tagName(){return\"tag:yaml.org,2002:seq\"}constructor(t){super(Ha,t),this.items=[]}add(t){this.items.push(t)}delete(t){const n=df(t);return typeof n!=\"number\"?!1:this.items.splice(n,1).length>0}get(t,n){const r=df(t);if(typeof r!=\"number\")return;const i=this.items[r];return!n&&Me(i)?i.value:i}has(t){const n=df(t);return typeof n==\"number\"&&n<this.items.length}set(t,n){const r=df(t);if(typeof r!=\"number\")throw new Error(`Expected a valid index, not ${t}.`);const i=this.items[r];Me(i)&&II(n)?i.value=n:this.items[r]=n}toJSON(t,n){const r=[];n!=null&&n.onCreate&&n.onCreate(r);let i=0;for(const s of this.items)r.push(Mn(s,String(i++),n));return r}toString(t,n,r){return t?BI(this,t,{blockItemPrefix:\"- \",flowChars:{start:\"[\",end:\"]\"},itemIndent:(t.indent||\"\")+\"  \",onChompKeep:r,onComment:n}):JSON.stringify(this)}static from(t,n,r){const{replacer:i}=r,s=new this(t);if(n&&Symbol.iterator in Object(n)){let o=0;for(let a of n){if(typeof i==\"function\"){const l=n instanceof Set?a:String(o++);a=i.call(n,l,a)}s.items.push(Wu(a,void 0,r))}}return s}}function df(e){let t=Me(e)?e.value:e;return t&&typeof t==\"string\"&&(t=Number(t)),typeof t==\"number\"&&Number.isInteger(t)&&t>=0?t:null}const Ga={collection:\"seq\",default:!0,nodeClass:rs,tag:\"tag:yaml.org,2002:seq\",resolve(e,t){return qa(e)||t(\"Expected a sequence for this tag\"),e},createNode:(e,t,n)=>rs.from(e,t,n)},Dp={identify:e=>typeof e==\"string\",default:!0,tag:\"tag:yaml.org,2002:str\",resolve:e=>e,stringify(e,t,n,r){return t=Object.assign({actualString:!0},t),vc(e,t,n,r)}},Mp={identify:e=>e==null,createNode:()=>new ge(null),default:!0,tag:\"tag:yaml.org,2002:null\",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new ge(null),stringify:({source:e},t)=>typeof e==\"string\"&&Mp.test.test(e)?e:t.options.nullStr},Ox={identify:e=>typeof e==\"boolean\",default:!0,tag:\"tag:yaml.org,2002:bool\",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new ge(e[0]===\"t\"||e[0]===\"T\"),stringify({source:e,value:t},n){if(e&&Ox.test.test(e)){const r=e[0]===\"t\"||e[0]===\"T\";if(t===r)return e}return t?n.options.trueStr:n.options.falseStr}};function dr({format:e,minFractionDigits:t,tag:n,value:r}){if(typeof r==\"bigint\")return String(r);const i=typeof r==\"number\"?r:Number(r);if(!isFinite(i))return isNaN(i)?\".nan\":i<0?\"-.inf\":\".inf\";let s=JSON.stringify(r);if(!e&&t&&(!n||n===\"tag:yaml.org,2002:float\")&&/^\\d/.test(s)){let o=s.indexOf(\".\");o<0&&(o=s.length,s+=\".\");let a=t-(s.length-o-1);for(;a-- >0;)s+=\"0\"}return s}const VI={identify:e=>typeof e==\"number\",default:!0,tag:\"tag:yaml.org,2002:float\",test:/^(?:[-+]?\\.(?:inf|Inf|INF)|\\.nan|\\.NaN|\\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()===\"nan\"?NaN:e[0]===\"-\"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:dr},zI={identify:e=>typeof e==\"number\",default:!0,tag:\"tag:yaml.org,2002:float\",format:\"EXP\",test:/^[-+]?(?:\\.[0-9]+|[0-9]+(?:\\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():dr(e)}},UI={identify:e=>typeof e==\"number\",default:!0,tag:\"tag:yaml.org,2002:float\",test:/^[-+]?(?:\\.[0-9]+|[0-9]+\\.[0-9]*)$/,resolve(e){const t=new ge(parseFloat(e)),n=e.indexOf(\".\");return n!==-1&&e[e.length-1]===\"0\"&&(t.minFractionDigits=e.length-n-1),t},stringify:dr},jp=e=>typeof e==\"bigint\"||Number.isInteger(e),Lx=(e,t,n,{intAsBigInt:r})=>r?BigInt(e):parseInt(e.substring(t),n);function HI(e,t,n){const{value:r}=e;return jp(r)&&r>=0?n+r.toString(t):dr(e)}const WI={identify:e=>jp(e)&&e>=0,default:!0,tag:\"tag:yaml.org,2002:int\",format:\"OCT\",test:/^0o[0-7]+$/,resolve:(e,t,n)=>Lx(e,2,8,n),stringify:e=>HI(e,8,\"0o\")},KI={identify:jp,default:!0,tag:\"tag:yaml.org,2002:int\",test:/^[-+]?[0-9]+$/,resolve:(e,t,n)=>Lx(e,0,10,n),stringify:dr},qI={identify:e=>jp(e)&&e>=0,default:!0,tag:\"tag:yaml.org,2002:int\",format:\"HEX\",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,n)=>Lx(e,2,16,n),stringify:e=>HI(e,16,\"0x\")},vte=[Ya,Ga,Dp,Mp,Ox,WI,KI,qI,VI,zI,UI];function EC(e){return typeof e==\"bigint\"||Number.isInteger(e)}const hf=({value:e})=>JSON.stringify(e),wte=[{identify:e=>typeof e==\"string\",default:!0,tag:\"tag:yaml.org,2002:str\",resolve:e=>e,stringify:hf},{identify:e=>e==null,createNode:()=>new ge(null),default:!0,tag:\"tag:yaml.org,2002:null\",test:/^null$/,resolve:()=>null,stringify:hf},{identify:e=>typeof e==\"boolean\",default:!0,tag:\"tag:yaml.org,2002:bool\",test:/^true|false$/,resolve:e=>e===\"true\",stringify:hf},{identify:EC,default:!0,tag:\"tag:yaml.org,2002:int\",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:n})=>n?BigInt(e):parseInt(e,10),stringify:({value:e})=>EC(e)?e.toString():JSON.stringify(e)},{identify:e=>typeof e==\"number\",default:!0,tag:\"tag:yaml.org,2002:float\",test:/^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:hf}],xte={default:!0,tag:\"\",test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}},bte=[Ya,Ga].concat(wte,xte),Rx={identify:e=>e instanceof Uint8Array,default:!1,tag:\"tag:yaml.org,2002:binary\",resolve(e,t){if(typeof Buffer==\"function\")return Buffer.from(e,\"base64\");if(typeof atob==\"function\"){const n=atob(e.replace(/[\\n\\r]/g,\"\")),r=new Uint8Array(n.length);for(let i=0;i<n.length;++i)r[i]=n.charCodeAt(i);return r}else return t(\"This environment does not support reading binary tags; either Buffer or atob is required\"),e},stringify({comment:e,type:t,value:n},r,i,s){const o=n;let a;if(typeof Buffer==\"function\")a=o instanceof Buffer?o.toString(\"base64\"):Buffer.from(o.buffer).toString(\"base64\");else if(typeof btoa==\"function\"){let l=\"\";for(let u=0;u<o.length;++u)l+=String.fromCharCode(o[u]);a=btoa(l)}else throw new Error(\"This environment does not support writing binary tags; either Buffer or btoa is required\");if(t||(t=ge.BLOCK_LITERAL),t!==ge.QUOTE_DOUBLE){const l=Math.max(r.options.lineWidth-r.indent.length,r.options.minContentWidth),u=Math.ceil(a.length/l),f=new Array(u);for(let c=0,d=0;c<u;++c,d+=l)f[c]=a.substr(d,l);a=f.join(t===ge.BLOCK_LITERAL?`\n`:\" \")}return vc({comment:e,type:t,value:a},r,i,s)}};function YI(e,t){if(qa(e))for(let n=0;n<e.items.length;++n){let r=e.items[n];if(!Ue(r)){if(Ka(r)){r.items.length>1&&t(\"Each pair must have its own sequence indicator\");const i=r.items[0]||new Ot(new ge(null));if(r.commentBefore&&(i.key.commentBefore=i.key.commentBefore?`${r.commentBefore}\n${i.key.commentBefore}`:r.commentBefore),r.comment){const s=i.value??i.key;s.comment=s.comment?`${r.comment}\n${s.comment}`:r.comment}r=i}e.items[n]=Ue(r)?r:new Ot(r)}}else t(\"Expected a sequence for this tag\");return e}function GI(e,t,n){const{replacer:r}=n,i=new rs(e);i.tag=\"tag:yaml.org,2002:pairs\";let s=0;if(t&&Symbol.iterator in Object(t))for(let o of t){typeof r==\"function\"&&(o=r.call(t,String(s++),o));let a,l;if(Array.isArray(o))if(o.length===2)a=o[0],l=o[1];else throw new TypeError(`Expected [key, value] tuple: ${o}`);else if(o&&o instanceof Object){const u=Object.keys(o);if(u.length===1)a=u[0],l=o[a];else throw new TypeError(`Expected tuple with one key, not ${u.length} keys`)}else a=o;i.items.push(Px(a,l,n))}return i}const Ix={collection:\"seq\",default:!1,tag:\"tag:yaml.org,2002:pairs\",resolve:YI,createNode:GI};class sa extends rs{constructor(){super(),this.add=fn.prototype.add.bind(this),this.delete=fn.prototype.delete.bind(this),this.get=fn.prototype.get.bind(this),this.has=fn.prototype.has.bind(this),this.set=fn.prototype.set.bind(this),this.tag=sa.tag}toJSON(t,n){if(!n)return super.toJSON(t);const r=new Map;n!=null&&n.onCreate&&n.onCreate(r);for(const i of this.items){let s,o;if(Ue(i)?(s=Mn(i.key,\"\",n),o=Mn(i.value,s,n)):s=Mn(i,\"\",n),r.has(s))throw new Error(\"Ordered maps must not include duplicate keys\");r.set(s,o)}return r}static from(t,n,r){const i=GI(t,n,r),s=new this;return s.items=i.items,s}}sa.tag=\"tag:yaml.org,2002:omap\";const Dx={collection:\"seq\",identify:e=>e instanceof Map,nodeClass:sa,default:!1,tag:\"tag:yaml.org,2002:omap\",resolve(e,t){const n=YI(e,t),r=[];for(const{key:i}of n.items)Me(i)&&(r.includes(i.value)?t(`Ordered maps must not include duplicate keys: ${i.value}`):r.push(i.value));return Object.assign(new sa,n)},createNode:(e,t,n)=>sa.from(e,t,n)};function XI({value:e,source:t},n){return t&&(e?QI:ZI).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}const QI={identify:e=>e===!0,default:!0,tag:\"tag:yaml.org,2002:bool\",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new ge(!0),stringify:XI},ZI={identify:e=>e===!1,default:!0,tag:\"tag:yaml.org,2002:bool\",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new ge(!1),stringify:XI},Ste={identify:e=>typeof e==\"number\",default:!0,tag:\"tag:yaml.org,2002:float\",test:/^(?:[-+]?\\.(?:inf|Inf|INF)|\\.nan|\\.NaN|\\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()===\"nan\"?NaN:e[0]===\"-\"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:dr},kte={identify:e=>typeof e==\"number\",default:!0,tag:\"tag:yaml.org,2002:float\",format:\"EXP\",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,\"\")),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():dr(e)}},Ete={identify:e=>typeof e==\"number\",default:!0,tag:\"tag:yaml.org,2002:float\",test:/^[-+]?(?:[0-9][0-9_]*)?\\.[0-9_]*$/,resolve(e){const t=new ge(parseFloat(e.replace(/_/g,\"\"))),n=e.indexOf(\".\");if(n!==-1){const r=e.substring(n+1).replace(/_/g,\"\");r[r.length-1]===\"0\"&&(t.minFractionDigits=r.length)}return t},stringify:dr},wc=e=>typeof e==\"bigint\"||Number.isInteger(e);function Fp(e,t,n,{intAsBigInt:r}){const i=e[0];if((i===\"-\"||i===\"+\")&&(t+=1),e=e.substring(t).replace(/_/g,\"\"),r){switch(n){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`;break}const o=BigInt(e);return i===\"-\"?BigInt(-1)*o:o}const s=parseInt(e,n);return i===\"-\"?-1*s:s}function Mx(e,t,n){const{value:r}=e;if(wc(r)){const i=r.toString(t);return r<0?\"-\"+n+i.substr(1):n+i}return dr(e)}const Cte={identify:wc,default:!0,tag:\"tag:yaml.org,2002:int\",format:\"BIN\",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,n)=>Fp(e,2,2,n),stringify:e=>Mx(e,2,\"0b\")},Tte={identify:wc,default:!0,tag:\"tag:yaml.org,2002:int\",format:\"OCT\",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,n)=>Fp(e,1,8,n),stringify:e=>Mx(e,8,\"0\")},_te={identify:wc,default:!0,tag:\"tag:yaml.org,2002:int\",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,n)=>Fp(e,0,10,n),stringify:dr},Ate={identify:wc,default:!0,tag:\"tag:yaml.org,2002:int\",format:\"HEX\",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,n)=>Fp(e,2,16,n),stringify:e=>Mx(e,16,\"0x\")};class oa extends fn{constructor(t){super(t),this.tag=oa.tag}add(t){let n;Ue(t)?n=t:t&&typeof t==\"object\"&&\"key\"in t&&\"value\"in t&&t.value===null?n=new Ot(t.key,null):n=new Ot(t,null),Os(this.items,n.key)||this.items.push(n)}get(t,n){const r=Os(this.items,t);return!n&&Ue(r)?Me(r.key)?r.key.value:r.key:r}set(t,n){if(typeof n!=\"boolean\")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);const r=Os(this.items,t);r&&!n?this.items.splice(this.items.indexOf(r),1):!r&&n&&this.items.push(new Ot(t))}toJSON(t,n){return super.toJSON(t,n,Set)}toString(t,n,r){if(!t)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},t,{allNullValues:!0}),n,r);throw new Error(\"Set items must all have null values\")}static from(t,n,r){const{replacer:i}=r,s=new this(t);if(n&&Symbol.iterator in Object(n))for(let o of n)typeof i==\"function\"&&(o=i.call(n,o,o)),s.items.push(Px(o,null,r));return s}}oa.tag=\"tag:yaml.org,2002:set\";const jx={collection:\"map\",identify:e=>e instanceof Set,nodeClass:oa,default:!1,tag:\"tag:yaml.org,2002:set\",createNode:(e,t,n)=>oa.from(e,t,n),resolve(e,t){if(Ka(e)){if(e.hasAllNullValues(!0))return Object.assign(new oa,e);t(\"Set items must all have null values\")}else t(\"Expected a mapping for this tag\");return e}};function Fx(e,t){const n=e[0],r=n===\"-\"||n===\"+\"?e.substring(1):e,i=o=>t?BigInt(o):Number(o),s=r.replace(/_/g,\"\").split(\":\").reduce((o,a)=>o*i(60)+i(a),i(0));return n===\"-\"?i(-1)*s:s}function JI(e){let{value:t}=e,n=o=>o;if(typeof t==\"bigint\")n=o=>BigInt(o);else if(isNaN(t)||!isFinite(t))return dr(e);let r=\"\";t<0&&(r=\"-\",t*=n(-1));const i=n(60),s=[t%i];return t<60?s.unshift(0):(t=(t-s[0])/i,s.unshift(t%i),t>=60&&(t=(t-s[0])/i,s.unshift(t))),r+s.map(o=>String(o).padStart(2,\"0\")).join(\":\").replace(/000000\\d*$/,\"\")}const eD={identify:e=>typeof e==\"bigint\"||Number.isInteger(e),default:!0,tag:\"tag:yaml.org,2002:int\",format:\"TIME\",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:n})=>Fx(e,n),stringify:JI},tD={identify:e=>typeof e==\"number\",default:!0,tag:\"tag:yaml.org,2002:float\",format:\"TIME\",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*$/,resolve:e=>Fx(e,!1),stringify:JI},$p={identify:e=>e instanceof Date,default:!0,tag:\"tag:yaml.org,2002:timestamp\",test:RegExp(\"^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\\\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\\\.[0-9]+)?)(?:[ \\\\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$\"),resolve(e){const t=e.match($p.test);if(!t)throw new Error(\"!!timestamp expects a date, starting with yyyy-mm-dd\");const[,n,r,i,s,o,a]=t.map(Number),l=t[7]?Number((t[7]+\"00\").substr(1,3)):0;let u=Date.UTC(n,r-1,i,s||0,o||0,a||0,l);const f=t[8];if(f&&f!==\"Z\"){let c=Fx(f,!1);Math.abs(c)<30&&(c*=60),u-=6e4*c}return new Date(u)},stringify:({value:e})=>e.toISOString().replace(/((T00:00)?:00)?\\.000Z$/,\"\")},CC=[Ya,Ga,Dp,Mp,QI,ZI,Cte,Tte,_te,Ate,Ste,kte,Ete,Rx,Dx,Ix,jx,eD,tD,$p],TC=new Map([[\"core\",vte],[\"failsafe\",[Ya,Ga,Dp]],[\"json\",bte],[\"yaml11\",CC],[\"yaml-1.1\",CC]]),_C={binary:Rx,bool:Ox,float:UI,floatExp:zI,floatNaN:VI,floatTime:tD,int:KI,intHex:qI,intOct:WI,intTime:eD,map:Ya,null:Mp,omap:Dx,pairs:Ix,seq:Ga,set:jx,timestamp:$p},Nte={\"tag:yaml.org,2002:binary\":Rx,\"tag:yaml.org,2002:omap\":Dx,\"tag:yaml.org,2002:pairs\":Ix,\"tag:yaml.org,2002:set\":jx,\"tag:yaml.org,2002:timestamp\":$p};function mg(e,t){let n=TC.get(t);if(!n)if(Array.isArray(e))n=[];else{const r=Array.from(TC.keys()).filter(i=>i!==\"yaml11\").map(i=>JSON.stringify(i)).join(\", \");throw new Error(`Unknown schema \"${t}\"; use one of ${r} or define customTags array`)}if(Array.isArray(e))for(const r of e)n=n.concat(r);else typeof e==\"function\"&&(n=e(n.slice()));return n.map(r=>{if(typeof r!=\"string\")return r;const i=_C[r];if(i)return i;const s=Object.keys(_C).map(o=>JSON.stringify(o)).join(\", \");throw new Error(`Unknown custom tag \"${r}\"; use one of ${s}`)})}const Pte=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;let nD=class rD{constructor({compat:t,customTags:n,merge:r,resolveKnownTags:i,schema:s,sortMapEntries:o,toStringDefaults:a}){this.compat=Array.isArray(t)?mg(t,\"compat\"):t?mg(null,t):null,this.merge=!!r,this.name=typeof s==\"string\"&&s||\"core\",this.knownTags=i?Nte:{},this.tags=mg(n,this.name),this.toStringOptions=a??null,Object.defineProperty(this,Wi,{value:Ya}),Object.defineProperty(this,ui,{value:Dp}),Object.defineProperty(this,Ha,{value:Ga}),this.sortMapEntries=typeof o==\"function\"?o:o===!0?Pte:null}clone(){const t=Object.create(rD.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}};function Ote(e,t){var l;const n=[];let r=t.directives===!0;if(t.directives!==!1&&e.directives){const u=e.directives.toString(e);u?(n.push(u),r=!0):e.directives.docStart&&(r=!0)}r&&n.push(\"---\");const i=jI(e,t),{commentString:s}=i.options;if(e.commentBefore){n.length!==1&&n.unshift(\"\");const u=s(e.commentBefore);n.unshift(qr(u,\"\"))}let o=!1,a=null;if(e.contents){if(Je(e.contents)){if(e.contents.spaceBefore&&r&&n.push(\"\"),e.contents.commentBefore){const c=s(e.contents.commentBefore);n.push(qr(c,\"\"))}i.forceBlockIndent=!!e.comment,a=e.contents.comment}const u=a?void 0:()=>o=!0;let f=Aa(e.contents,i,()=>a=null,u);a&&(f+=Ps(f,\"\",s(a))),(f[0]===\"|\"||f[0]===\">\")&&n[n.length-1]===\"---\"?n[n.length-1]=`--- ${f}`:n.push(f)}else n.push(Aa(e.contents,i));if((l=e.directives)!=null&&l.docEnd)if(e.comment){const u=s(e.comment);u.includes(`\n`)?(n.push(\"...\"),n.push(qr(u,\"\"))):n.push(`... ${u}`)}else n.push(\"...\");else{let u=e.comment;u&&o&&(u=u.replace(/^\\n+/,\"\")),u&&((!o||a)&&n[n.length-1]!==\"\"&&n.push(\"\"),n.push(qr(s(u),\"\")))}return n.join(`\n`)+`\n`}class Xa{constructor(t,n,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Bn,{value:$0});let i=null;typeof n==\"function\"||Array.isArray(n)?i=n:r===void 0&&n&&(r=n,n=void 0);const s=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:\"warn\",prettyErrors:!0,strict:!0,uniqueKeys:!0,version:\"1.2\"},r);this.options=s;let{version:o}=s;r!=null&&r._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new Ft({version:o}),this.setSchema(o,r),this.contents=t===void 0?null:this.createNode(t,i,r)}clone(){const t=Object.create(Xa.prototype,{[Bn]:{value:$0}});return t.commentBefore=this.commentBefore,t.comment=this.comment,t.errors=this.errors.slice(),t.warnings=this.warnings.slice(),t.options=Object.assign({},this.options),this.directives&&(t.directives=this.directives.clone()),t.schema=this.schema.clone(),t.contents=Je(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(t){ho(this.contents)&&this.contents.add(t)}addIn(t,n){ho(this.contents)&&this.contents.addIn(t,n)}createAlias(t,n){if(!t.anchor){const r=LI(this);t.anchor=!n||r.has(n)?RI(n||\"a\",r):n}return new Op(t.anchor)}createNode(t,n,r){let i;if(typeof n==\"function\")t=n.call({\"\":t},\"\",t),i=n;else if(Array.isArray(n)){const w=v=>typeof v==\"number\"||v instanceof String||v instanceof Number,y=n.filter(w).map(String);y.length>0&&(n=n.concat(y)),i=n}else r===void 0&&n&&(r=n,n=void 0);const{aliasDuplicateObjects:s,anchorPrefix:o,flow:a,keepUndefined:l,onTagObj:u,tag:f}=r??{},{onAnchor:c,setAnchors:d,sourceObjects:h}=ste(this,o||\"a\"),p={aliasDuplicateObjects:s??!0,keepUndefined:l??!1,onAnchor:c,onTagObj:u,replacer:i,schema:this.schema,sourceObjects:h},m=Wu(t,f,p);return a&&qe(m)&&(m.flow=!0),d(),m}createPair(t,n,r={}){const i=this.createNode(t,null,r),s=this.createNode(n,null,r);return new Ot(i,s)}delete(t){return ho(this.contents)?this.contents.delete(t):!1}deleteIn(t){return Il(t)?this.contents==null?!1:(this.contents=null,!0):ho(this.contents)?this.contents.deleteIn(t):!1}get(t,n){return qe(this.contents)?this.contents.get(t,n):void 0}getIn(t,n){return Il(t)?!n&&Me(this.contents)?this.contents.value:this.contents:qe(this.contents)?this.contents.getIn(t,n):void 0}has(t){return qe(this.contents)?this.contents.has(t):!1}hasIn(t){return Il(t)?this.contents!==void 0:qe(this.contents)?this.contents.hasIn(t):!1}set(t,n){this.contents==null?this.contents=hh(this.schema,[t],n):ho(this.contents)&&this.contents.set(t,n)}setIn(t,n){Il(t)?this.contents=n:this.contents==null?this.contents=hh(this.schema,Array.from(t),n):ho(this.contents)&&this.contents.setIn(t,n)}setSchema(t,n={}){typeof t==\"number\"&&(t=String(t));let r;switch(t){case\"1.1\":this.directives?this.directives.yaml.version=\"1.1\":this.directives=new Ft({version:\"1.1\"}),r={merge:!0,resolveKnownTags:!1,schema:\"yaml-1.1\"};break;case\"1.2\":case\"next\":this.directives?this.directives.yaml.version=t:this.directives=new Ft({version:t}),r={merge:!1,resolveKnownTags:!0,schema:\"core\"};break;case null:this.directives&&delete this.directives,r=null;break;default:{const i=JSON.stringify(t);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${i}`)}}if(n.schema instanceof Object)this.schema=n.schema;else if(r)this.schema=new nD(Object.assign(r,n));else throw new Error(\"With a null YAML version, the { schema: Schema } option is required\")}toJS({json:t,jsonArg:n,mapAsMap:r,maxAliasCount:i,onAnchor:s,reviver:o}={}){const a={anchors:new Map,doc:this,keep:!t,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof i==\"number\"?i:100},l=Mn(this.contents,n??\"\",a);if(typeof s==\"function\")for(const{count:u,res:f}of a.anchors.values())s(f,u);return typeof o==\"function\"?Ho(o,{\"\":l},\"\",l):l}toJSON(t,n){return this.toJS({json:!0,jsonArg:t,mapAsMap:!1,onAnchor:n})}toString(t={}){if(this.errors.length>0)throw new Error(\"Document with errors cannot be stringified\");if(\"indent\"in t&&(!Number.isInteger(t.indent)||Number(t.indent)<=0)){const n=JSON.stringify(t.indent);throw new Error(`\"indent\" option must be a positive integer, not ${n}`)}return Ote(this,t)}}function ho(e){if(qe(e))return!0;throw new Error(\"Expected a YAML collection as document contents\")}class $x extends Error{constructor(t,n,r,i){super(),this.name=t,this.code=r,this.message=i,this.pos=n}}class Ls extends $x{constructor(t,n,r){super(\"YAMLParseError\",t,n,r)}}class iD extends $x{constructor(t,n,r){super(\"YAMLWarning\",t,n,r)}}const mh=(e,t)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(a=>t.linePos(a));const{line:r,col:i}=n.linePos[0];n.message+=` at line ${r}, column ${i}`;let s=i-1,o=e.substring(t.lineStarts[r-1],t.lineStarts[r]).replace(/[\\n\\r]+$/,\"\");if(s>=60&&o.length>80){const a=Math.min(s-39,o.length-79);o=\"…\"+o.substring(a),s-=a-1}if(o.length>80&&(o=o.substring(0,79)+\"…\"),r>1&&/^ *$/.test(o.substring(0,s))){let a=e.substring(t.lineStarts[r-2],t.lineStarts[r-1]);a.length>80&&(a=a.substring(0,79)+`…\n`),o=a+o}if(/[^ ]/.test(o)){let a=1;const l=n.linePos[1];l&&l.line===r&&l.col>i&&(a=Math.max(1,Math.min(l.col-i,80-s)));const u=\" \".repeat(s)+\"^\".repeat(a);n.message+=`:\n\n${o}\n${u}\n`}};function Na(e,{flow:t,indicator:n,next:r,offset:i,onError:s,parentIndent:o,startOnNewline:a}){let l=!1,u=a,f=a,c=\"\",d=\"\",h=!1,p=!1,m=null,w=null,y=null,v=null,g=null,x=null,S=null;for(const T of e)switch(p&&(T.type!==\"space\"&&T.type!==\"newline\"&&T.type!==\"comma\"&&s(T.offset,\"MISSING_CHAR\",\"Tags and anchors must be separated from the next token by white space\"),p=!1),m&&(u&&T.type!==\"comment\"&&T.type!==\"newline\"&&s(m,\"TAB_AS_INDENT\",\"Tabs are not allowed as indentation\"),m=null),T.type){case\"space\":!t&&(n!==\"doc-start\"||(r==null?void 0:r.type)!==\"flow-collection\")&&T.source.includes(\"\t\")&&(m=T),f=!0;break;case\"comment\":{f||s(T,\"MISSING_CHAR\",\"Comments must be separated from other tokens by white space characters\");const O=T.source.substring(1)||\" \";c?c+=d+O:c=O,d=\"\",u=!1;break}case\"newline\":u?c?c+=T.source:l=!0:d+=T.source,u=!0,h=!0,(w||y)&&(v=T),f=!0;break;case\"anchor\":w&&s(T,\"MULTIPLE_ANCHORS\",\"A node can have at most one anchor\"),T.source.endsWith(\":\")&&s(T.offset+T.source.length-1,\"BAD_ALIAS\",\"Anchor ending in : is ambiguous\",!0),w=T,S===null&&(S=T.offset),u=!1,f=!1,p=!0;break;case\"tag\":{y&&s(T,\"MULTIPLE_TAGS\",\"A node can have at most one tag\"),y=T,S===null&&(S=T.offset),u=!1,f=!1,p=!0;break}case n:(w||y)&&s(T,\"BAD_PROP_ORDER\",`Anchors and tags must be after the ${T.source} indicator`),x&&s(T,\"UNEXPECTED_TOKEN\",`Unexpected ${T.source} in ${t??\"collection\"}`),x=T,u=n===\"seq-item-ind\"||n===\"explicit-key-ind\",f=!1;break;case\"comma\":if(t){g&&s(T,\"UNEXPECTED_TOKEN\",`Unexpected , in ${t}`),g=T,u=!1,f=!1;break}default:s(T,\"UNEXPECTED_TOKEN\",`Unexpected ${T.type} token`),u=!1,f=!1}const k=e[e.length-1],C=k?k.offset+k.source.length:i;return p&&r&&r.type!==\"space\"&&r.type!==\"newline\"&&r.type!==\"comma\"&&(r.type!==\"scalar\"||r.source!==\"\")&&s(r.offset,\"MISSING_CHAR\",\"Tags and anchors must be separated from the next token by white space\"),m&&(u&&m.indent<=o||(r==null?void 0:r.type)===\"block-map\"||(r==null?void 0:r.type)===\"block-seq\")&&s(m,\"TAB_AS_INDENT\",\"Tabs are not allowed as indentation\"),{comma:g,found:x,spaceBefore:l,comment:c,hasNewline:h,anchor:w,tag:y,newlineAfterProp:v,end:C,start:S??C}}function Ku(e){if(!e)return null;switch(e.type){case\"alias\":case\"scalar\":case\"double-quoted-scalar\":case\"single-quoted-scalar\":if(e.source.includes(`\n`))return!0;if(e.end){for(const t of e.end)if(t.type===\"newline\")return!0}return!1;case\"flow-collection\":for(const t of e.items){for(const n of t.start)if(n.type===\"newline\")return!0;if(t.sep){for(const n of t.sep)if(n.type===\"newline\")return!0}if(Ku(t.key)||Ku(t.value))return!0}return!1;default:return!0}}function U0(e,t,n){if((t==null?void 0:t.type)===\"flow-collection\"){const r=t.end[0];r.indent===e&&(r.source===\"]\"||r.source===\"}\")&&Ku(t)&&n(r,\"BAD_INDENT\",\"Flow end indicator should be more indented than parent\",!0)}}function sD(e,t,n){const{uniqueKeys:r}=e.options;if(r===!1)return!1;const i=typeof r==\"function\"?r:(s,o)=>s===o||Me(s)&&Me(o)&&s.value===o.value&&!(s.value===\"<<\"&&e.schema.merge);return t.some(s=>i(s.key,n))}const AC=\"All mapping items must start at the same column\";function Lte({composeNode:e,composeEmptyNode:t},n,r,i,s){var f;const o=(s==null?void 0:s.nodeClass)??fn,a=new o(n.schema);n.atRoot&&(n.atRoot=!1);let l=r.offset,u=null;for(const c of r.items){const{start:d,key:h,sep:p,value:m}=c,w=Na(d,{indicator:\"explicit-key-ind\",next:h??(p==null?void 0:p[0]),offset:l,onError:i,parentIndent:r.indent,startOnNewline:!0}),y=!w.found;if(y){if(h&&(h.type===\"block-seq\"?i(l,\"BLOCK_AS_IMPLICIT_KEY\",\"A block sequence may not be used as an implicit map key\"):\"indent\"in h&&h.indent!==r.indent&&i(l,\"BAD_INDENT\",AC)),!w.anchor&&!w.tag&&!p){u=w.end,w.comment&&(a.comment?a.comment+=`\n`+w.comment:a.comment=w.comment);continue}(w.newlineAfterProp||Ku(h))&&i(h??d[d.length-1],\"MULTILINE_IMPLICIT_KEY\",\"Implicit keys need to be on a single line\")}else((f=w.found)==null?void 0:f.indent)!==r.indent&&i(l,\"BAD_INDENT\",AC);const v=w.end,g=h?e(n,h,w,i):t(n,v,d,null,w,i);n.schema.compat&&U0(r.indent,h,i),sD(n,a.items,g)&&i(v,\"DUPLICATE_KEY\",\"Map keys must be unique\");const x=Na(p??[],{indicator:\"map-value-ind\",next:m,offset:g.range[2],onError:i,parentIndent:r.indent,startOnNewline:!h||h.type===\"block-scalar\"});if(l=x.end,x.found){y&&((m==null?void 0:m.type)===\"block-map\"&&!x.hasNewline&&i(l,\"BLOCK_AS_IMPLICIT_KEY\",\"Nested mappings are not allowed in compact mappings\"),n.options.strict&&w.start<x.found.offset-1024&&i(g.range,\"KEY_OVER_1024_CHARS\",\"The : indicator must be at most 1024 chars after the start of an implicit block mapping key\"));const S=m?e(n,m,x,i):t(n,l,p,null,x,i);n.schema.compat&&U0(r.indent,m,i),l=S.range[2];const k=new Ot(g,S);n.options.keepSourceTokens&&(k.srcToken=c),a.items.push(k)}else{y&&i(g.range,\"MISSING_CHAR\",\"Implicit map keys need to be followed by map values\"),x.comment&&(g.comment?g.comment+=`\n`+x.comment:g.comment=x.comment);const S=new Ot(g);n.options.keepSourceTokens&&(S.srcToken=c),a.items.push(S)}}return u&&u<l&&i(u,\"IMPOSSIBLE\",\"Map comment with trailing content\"),a.range=[r.offset,l,u??l],a}function Rte({composeNode:e,composeEmptyNode:t},n,r,i,s){const o=(s==null?void 0:s.nodeClass)??rs,a=new o(n.schema);n.atRoot&&(n.atRoot=!1);let l=r.offset,u=null;for(const{start:f,value:c}of r.items){const d=Na(f,{indicator:\"seq-item-ind\",next:c,offset:l,onError:i,parentIndent:r.indent,startOnNewline:!0});if(!d.found)if(d.anchor||d.tag||c)c&&c.type===\"block-seq\"?i(d.end,\"BAD_INDENT\",\"All sequence items must start at the same column\"):i(l,\"MISSING_CHAR\",\"Sequence item without - indicator\");else{u=d.end,d.comment&&(a.comment=d.comment);continue}const h=c?e(n,c,d,i):t(n,d.end,f,null,d,i);n.schema.compat&&U0(r.indent,c,i),l=h.range[2],a.items.push(h)}return a.range=[r.offset,l,u??l],a}function xc(e,t,n,r){let i=\"\";if(e){let s=!1,o=\"\";for(const a of e){const{source:l,type:u}=a;switch(u){case\"space\":s=!0;break;case\"comment\":{n&&!s&&r(a,\"MISSING_CHAR\",\"Comments must be separated from other tokens by white space characters\");const f=l.substring(1)||\" \";i?i+=o+f:i=f,o=\"\";break}case\"newline\":i&&(o+=l),s=!0;break;default:r(a,\"UNEXPECTED_TOKEN\",`Unexpected ${u} at node end`)}t+=l.length}}return{comment:i,offset:t}}const gg=\"Block collections are not allowed within flow collections\",yg=e=>e&&(e.type===\"block-map\"||e.type===\"block-seq\");function Ite({composeNode:e,composeEmptyNode:t},n,r,i,s){const o=r.start.source===\"{\",a=o?\"flow map\":\"flow sequence\",l=(s==null?void 0:s.nodeClass)??(o?fn:rs),u=new l(n.schema);u.flow=!0;const f=n.atRoot;f&&(n.atRoot=!1);let c=r.offset+r.start.source.length;for(let w=0;w<r.items.length;++w){const y=r.items[w],{start:v,key:g,sep:x,value:S}=y,k=Na(v,{flow:a,indicator:\"explicit-key-ind\",next:g??(x==null?void 0:x[0]),offset:c,onError:i,parentIndent:r.indent,startOnNewline:!1});if(!k.found){if(!k.anchor&&!k.tag&&!x&&!S){w===0&&k.comma?i(k.comma,\"UNEXPECTED_TOKEN\",`Unexpected , in ${a}`):w<r.items.length-1&&i(k.start,\"UNEXPECTED_TOKEN\",`Unexpected empty item in ${a}`),k.comment&&(u.comment?u.comment+=`\n`+k.comment:u.comment=k.comment),c=k.end;continue}!o&&n.options.strict&&Ku(g)&&i(g,\"MULTILINE_IMPLICIT_KEY\",\"Implicit keys of flow sequence pairs need to be on a single line\")}if(w===0)k.comma&&i(k.comma,\"UNEXPECTED_TOKEN\",`Unexpected , in ${a}`);else if(k.comma||i(k.start,\"MISSING_CHAR\",`Missing , between ${a} items`),k.comment){let C=\"\";e:for(const T of v)switch(T.type){case\"comma\":case\"space\":break;case\"comment\":C=T.source.substring(1);break e;default:break e}if(C){let T=u.items[u.items.length-1];Ue(T)&&(T=T.value??T.key),T.comment?T.comment+=`\n`+C:T.comment=C,k.comment=k.comment.substring(C.length+1)}}if(!o&&!x&&!k.found){const C=S?e(n,S,k,i):t(n,k.end,x,null,k,i);u.items.push(C),c=C.range[2],yg(S)&&i(C.range,\"BLOCK_IN_FLOW\",gg)}else{const C=k.end,T=g?e(n,g,k,i):t(n,C,v,null,k,i);yg(g)&&i(T.range,\"BLOCK_IN_FLOW\",gg);const O=Na(x??[],{flow:a,indicator:\"map-value-ind\",next:S,offset:T.range[2],onError:i,parentIndent:r.indent,startOnNewline:!1});if(O.found){if(!o&&!k.found&&n.options.strict){if(x)for(const L of x){if(L===O.found)break;if(L.type===\"newline\"){i(L,\"MULTILINE_IMPLICIT_KEY\",\"Implicit keys of flow sequence pairs need to be on a single line\");break}}k.start<O.found.offset-1024&&i(O.found,\"KEY_OVER_1024_CHARS\",\"The : indicator must be at most 1024 chars after the start of an implicit flow sequence key\")}}else S&&(\"source\"in S&&S.source&&S.source[0]===\":\"?i(S,\"MISSING_CHAR\",`Missing space after : in ${a}`):i(O.start,\"MISSING_CHAR\",`Missing , or : between ${a} items`));const A=S?e(n,S,O,i):O.found?t(n,O.end,x,null,O,i):null;A?yg(S)&&i(A.range,\"BLOCK_IN_FLOW\",gg):O.comment&&(T.comment?T.comment+=`\n`+O.comment:T.comment=O.comment);const j=new Ot(T,A);if(n.options.keepSourceTokens&&(j.srcToken=y),o){const L=u;sD(n,L.items,T)&&i(C,\"DUPLICATE_KEY\",\"Map keys must be unique\"),L.items.push(j)}else{const L=new fn(n.schema);L.flow=!0,L.items.push(j);const B=(A??T).range;L.range=[T.range[0],B[1],B[2]],u.items.push(L)}c=A?A.range[2]:O.end}}const d=o?\"}\":\"]\",[h,...p]=r.end;let m=c;if(h&&h.source===d)m=h.offset+h.source.length;else{const w=a[0].toUpperCase()+a.substring(1),y=f?`${w} must end with a ${d}`:`${w} in block collection must be sufficiently indented and end with a ${d}`;i(c,f?\"MISSING_CHAR\":\"BAD_INDENT\",y),h&&h.source.length!==1&&p.unshift(h)}if(p.length>0){const w=xc(p,m,n.options.strict,i);w.comment&&(u.comment?u.comment+=`\n`+w.comment:u.comment=w.comment),u.range=[r.offset,m,w.offset]}else u.range=[r.offset,m,m];return u}function vg(e,t,n,r,i,s){const o=n.type===\"block-map\"?Lte(e,t,n,r,s):n.type===\"block-seq\"?Rte(e,t,n,r,s):Ite(e,t,n,r,s),a=o.constructor;return i===\"!\"||i===a.tagName?(o.tag=a.tagName,o):(i&&(o.tag=i),o)}function Dte(e,t,n,r,i){var d;const s=r.tag,o=s?t.directives.tagName(s.source,h=>i(s,\"TAG_RESOLVE_FAILED\",h)):null;if(n.type===\"block-seq\"){const{anchor:h,newlineAfterProp:p}=r,m=h&&s?h.offset>s.offset?h:s:h??s;m&&(!p||p.offset<m.offset)&&i(m,\"MISSING_CHAR\",\"Missing newline after block sequence props\")}const a=n.type===\"block-map\"?\"map\":n.type===\"block-seq\"?\"seq\":n.start.source===\"{\"?\"map\":\"seq\";if(!s||!o||o===\"!\"||o===fn.tagName&&a===\"map\"||o===rs.tagName&&a===\"seq\")return vg(e,t,n,i,o);let l=t.schema.tags.find(h=>h.tag===o&&h.collection===a);if(!l){const h=t.schema.knownTags[o];if(h&&h.collection===a)t.schema.tags.push(Object.assign({},h,{default:!1})),l=h;else return h!=null&&h.collection?i(s,\"BAD_COLLECTION_TYPE\",`${h.tag} used for ${a} collection, but expects ${h.collection}`,!0):i(s,\"TAG_RESOLVE_FAILED\",`Unresolved tag: ${o}`,!0),vg(e,t,n,i,o)}const u=vg(e,t,n,i,o,l),f=((d=l.resolve)==null?void 0:d.call(l,u,h=>i(s,\"TAG_RESOLVE_FAILED\",h),t.options))??u,c=Je(f)?f:new ge(f);return c.range=u.range,c.tag=o,l!=null&&l.format&&(c.format=l.format),c}function oD(e,t,n){const r=t.offset,i=Mte(t,e.options.strict,n);if(!i)return{value:\"\",type:null,comment:\"\",range:[r,r,r]};const s=i.mode===\">\"?ge.BLOCK_FOLDED:ge.BLOCK_LITERAL,o=t.source?jte(t.source):[];let a=o.length;for(let m=o.length-1;m>=0;--m){const w=o[m][1];if(w===\"\"||w===\"\\r\")a=m;else break}if(a===0){const m=i.chomp===\"+\"&&o.length>0?`\n`.repeat(Math.max(1,o.length-1)):\"\";let w=r+i.length;return t.source&&(w+=t.source.length),{value:m,type:s,comment:i.comment,range:[r,w,w]}}let l=t.indent+i.indent,u=t.offset+i.length,f=0;for(let m=0;m<a;++m){const[w,y]=o[m];if(y===\"\"||y===\"\\r\")i.indent===0&&w.length>l&&(l=w.length);else{w.length<l&&n(u+w.length,\"MISSING_CHAR\",\"Block scalars with more-indented leading empty lines must use an explicit indentation indicator\"),i.indent===0&&(l=w.length),f=m,l===0&&!e.atRoot&&n(u,\"BAD_INDENT\",\"Block scalar values in collections must be indented\");break}u+=w.length+y.length+1}for(let m=o.length-1;m>=a;--m)o[m][0].length>l&&(a=m+1);let c=\"\",d=\"\",h=!1;for(let m=0;m<f;++m)c+=o[m][0].slice(l)+`\n`;for(let m=f;m<a;++m){let[w,y]=o[m];u+=w.length+y.length+1;const v=y[y.length-1]===\"\\r\";if(v&&(y=y.slice(0,-1)),y&&w.length<l){const x=`Block scalar lines must not be less indented than their ${i.indent?\"explicit indentation indicator\":\"first line\"}`;n(u-y.length-(v?2:1),\"BAD_INDENT\",x),w=\"\"}s===ge.BLOCK_LITERAL?(c+=d+w.slice(l)+y,d=`\n`):w.length>l||y[0]===\"\t\"?(d===\" \"?d=`\n`:!h&&d===`\n`&&(d=`\n\n`),c+=d+w.slice(l)+y,d=`\n`,h=!0):y===\"\"?d===`\n`?c+=`\n`:d=`\n`:(c+=d+y,d=\" \",h=!1)}switch(i.chomp){case\"-\":break;case\"+\":for(let m=a;m<o.length;++m)c+=`\n`+o[m][0].slice(l);c[c.length-1]!==`\n`&&(c+=`\n`);break;default:c+=`\n`}const p=r+i.length+t.source.length;return{value:c,type:s,comment:i.comment,range:[r,p,p]}}function Mte({offset:e,props:t},n,r){if(t[0].type!==\"block-scalar-header\")return r(t[0],\"IMPOSSIBLE\",\"Block scalar header not found\"),null;const{source:i}=t[0],s=i[0];let o=0,a=\"\",l=-1;for(let d=1;d<i.length;++d){const h=i[d];if(!a&&(h===\"-\"||h===\"+\"))a=h;else{const p=Number(h);!o&&p?o=p:l===-1&&(l=e+d)}}l!==-1&&r(l,\"UNEXPECTED_TOKEN\",`Block scalar header includes extra characters: ${i}`);let u=!1,f=\"\",c=i.length;for(let d=1;d<t.length;++d){const h=t[d];switch(h.type){case\"space\":u=!0;case\"newline\":c+=h.source.length;break;case\"comment\":n&&!u&&r(h,\"MISSING_CHAR\",\"Comments must be separated from other tokens by white space characters\"),c+=h.source.length,f=h.source.substring(1);break;case\"error\":r(h,\"UNEXPECTED_TOKEN\",h.message),c+=h.source.length;break;default:{const p=`Unexpected token in block scalar header: ${h.type}`;r(h,\"UNEXPECTED_TOKEN\",p);const m=h.source;m&&typeof m==\"string\"&&(c+=m.length)}}}return{mode:s,indent:o,chomp:a,comment:f,length:c}}function jte(e){const t=e.split(/\\n( *)/),n=t[0],r=n.match(/^( *)/),s=[r!=null&&r[1]?[r[1],n.slice(r[1].length)]:[\"\",n]];for(let o=1;o<t.length;o+=2)s.push([t[o],t[o+1]]);return s}function aD(e,t,n){const{offset:r,type:i,source:s,end:o}=e;let a,l;const u=(d,h,p)=>n(r+d,h,p);switch(i){case\"scalar\":a=ge.PLAIN,l=Fte(s,u);break;case\"single-quoted-scalar\":a=ge.QUOTE_SINGLE,l=$te(s,u);break;case\"double-quoted-scalar\":a=ge.QUOTE_DOUBLE,l=Bte(s,u);break;default:return n(e,\"UNEXPECTED_TOKEN\",`Expected a flow scalar value, but found: ${i}`),{value:\"\",type:null,comment:\"\",range:[r,r+s.length,r+s.length]}}const f=r+s.length,c=xc(o,f,t,n);return{value:l,type:a,comment:c.comment,range:[r,f,c.offset]}}function Fte(e,t){let n=\"\";switch(e[0]){case\"\t\":n=\"a tab character\";break;case\",\":n=\"flow indicator character ,\";break;case\"%\":n=\"directive indicator character %\";break;case\"|\":case\">\":{n=`block scalar indicator ${e[0]}`;break}case\"@\":case\"`\":{n=`reserved character ${e[0]}`;break}}return n&&t(0,\"BAD_SCALAR_START\",`Plain value cannot start with ${n}`),lD(e)}function $te(e,t){return(e[e.length-1]!==\"'\"||e.length===1)&&t(e.length,\"MISSING_CHAR\",\"Missing closing 'quote\"),lD(e.slice(1,-1)).replace(/''/g,\"'\")}function lD(e){let t,n;try{t=new RegExp(`(.*?)(?<![ \t])[ \t]*\\r?\n`,\"sy\"),n=new RegExp(`[ \t]*(.*?)(?:(?<![ \t])[ \t]*)?\\r?\n`,\"sy\")}catch{t=/(.*?)[ \\t]*\\r?\\n/sy,n=/[ \\t]*(.*?)[ \\t]*\\r?\\n/sy}let r=t.exec(e);if(!r)return e;let i=r[1],s=\" \",o=t.lastIndex;for(n.lastIndex=o;r=n.exec(e);)r[1]===\"\"?s===`\n`?i+=s:s=`\n`:(i+=s+r[1],s=\" \"),o=n.lastIndex;const a=/[ \\t]*(.*)/sy;return a.lastIndex=o,r=a.exec(e),i+s+((r==null?void 0:r[1])??\"\")}function Bte(e,t){let n=\"\";for(let r=1;r<e.length-1;++r){const i=e[r];if(!(i===\"\\r\"&&e[r+1]===`\n`))if(i===`\n`){const{fold:s,offset:o}=Vte(e,r);n+=s,r=o}else if(i===\"\\\\\"){let s=e[++r];const o=zte[s];if(o)n+=o;else if(s===`\n`)for(s=e[r+1];s===\" \"||s===\"\t\";)s=e[++r+1];else if(s===\"\\r\"&&e[r+1]===`\n`)for(s=e[++r+1];s===\" \"||s===\"\t\";)s=e[++r+1];else if(s===\"x\"||s===\"u\"||s===\"U\"){const a={x:2,u:4,U:8}[s];n+=Ute(e,r+1,a,t),r+=a}else{const a=e.substr(r-1,2);t(r-1,\"BAD_DQ_ESCAPE\",`Invalid escape sequence ${a}`),n+=a}}else if(i===\" \"||i===\"\t\"){const s=r;let o=e[r+1];for(;o===\" \"||o===\"\t\";)o=e[++r+1];o!==`\n`&&!(o===\"\\r\"&&e[r+2]===`\n`)&&(n+=r>s?e.slice(s,r+1):i)}else n+=i}return(e[e.length-1]!=='\"'||e.length===1)&&t(e.length,\"MISSING_CHAR\",'Missing closing \"quote'),n}function Vte(e,t){let n=\"\",r=e[t+1];for(;(r===\" \"||r===\"\t\"||r===`\n`||r===\"\\r\")&&!(r===\"\\r\"&&e[t+2]!==`\n`);)r===`\n`&&(n+=`\n`),t+=1,r=e[t+1];return n||(n=\" \"),{fold:n,offset:t}}const zte={0:\"\\0\",a:\"\\x07\",b:\"\\b\",e:\"\\x1B\",f:\"\\f\",n:`\n`,r:\"\\r\",t:\"\t\",v:\"\\v\",N:\"\",_:\" \",L:\"\\u2028\",P:\"\\u2029\",\" \":\" \",'\"':'\"',\"/\":\"/\",\"\\\\\":\"\\\\\",\"\t\":\"\t\"};function Ute(e,t,n,r){const i=e.substr(t,n),o=i.length===n&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;if(isNaN(o)){const a=e.substr(t-2,n+2);return r(t-2,\"BAD_DQ_ESCAPE\",`Invalid escape sequence ${a}`),a}return String.fromCodePoint(o)}function uD(e,t,n,r){const{value:i,type:s,comment:o,range:a}=t.type===\"block-scalar\"?oD(e,t,r):aD(t,e.options.strict,r),l=n?e.directives.tagName(n.source,c=>r(n,\"TAG_RESOLVE_FAILED\",c)):null,u=n&&l?Hte(e.schema,i,l,n,r):t.type===\"scalar\"?Wte(e,i,t,r):e.schema[ui];let f;try{const c=u.resolve(i,d=>r(n??t,\"TAG_RESOLVE_FAILED\",d),e.options);f=Me(c)?c:new ge(c)}catch(c){const d=c instanceof Error?c.message:String(c);r(n??t,\"TAG_RESOLVE_FAILED\",d),f=new ge(i)}return f.range=a,f.source=i,s&&(f.type=s),l&&(f.tag=l),u.format&&(f.format=u.format),o&&(f.comment=o),f}function Hte(e,t,n,r,i){var a;if(n===\"!\")return e[ui];const s=[];for(const l of e.tags)if(!l.collection&&l.tag===n)if(l.default&&l.test)s.push(l);else return l;for(const l of s)if((a=l.test)!=null&&a.test(t))return l;const o=e.knownTags[n];return o&&!o.collection?(e.tags.push(Object.assign({},o,{default:!1,test:void 0})),o):(i(r,\"TAG_RESOLVE_FAILED\",`Unresolved tag: ${n}`,n!==\"tag:yaml.org,2002:str\"),e[ui])}function Wte({directives:e,schema:t},n,r,i){const s=t.tags.find(o=>{var a;return o.default&&((a=o.test)==null?void 0:a.test(n))})||t[ui];if(t.compat){const o=t.compat.find(a=>{var l;return a.default&&((l=a.test)==null?void 0:l.test(n))})??t[ui];if(s.tag!==o.tag){const a=e.tagString(s.tag),l=e.tagString(o.tag),u=`Value may be parsed as either ${a} or ${l}`;i(r,\"TAG_RESOLVE_FAILED\",u,!0)}}return s}function Kte(e,t,n){if(t){n===null&&(n=t.length);for(let r=n-1;r>=0;--r){let i=t[r];switch(i.type){case\"space\":case\"comment\":case\"newline\":e-=i.source.length;continue}for(i=t[++r];(i==null?void 0:i.type)===\"space\";)e+=i.source.length,i=t[++r];break}}return e}const qte={composeNode:cD,composeEmptyNode:Bx};function cD(e,t,n,r){const{spaceBefore:i,comment:s,anchor:o,tag:a}=n;let l,u=!0;switch(t.type){case\"alias\":l=Yte(e,t,r),(o||a)&&r(t,\"ALIAS_PROPS\",\"An alias node must not specify any properties\");break;case\"scalar\":case\"single-quoted-scalar\":case\"double-quoted-scalar\":case\"block-scalar\":l=uD(e,t,a,r),o&&(l.anchor=o.source.substring(1));break;case\"block-map\":case\"block-seq\":case\"flow-collection\":l=Dte(qte,e,t,n,r),o&&(l.anchor=o.source.substring(1));break;default:{const f=t.type===\"error\"?t.message:`Unsupported token (type: ${t.type})`;r(t,\"UNEXPECTED_TOKEN\",f),l=Bx(e,t.offset,void 0,null,n,r),u=!1}}return o&&l.anchor===\"\"&&r(o,\"BAD_ALIAS\",\"Anchor cannot be an empty string\"),i&&(l.spaceBefore=!0),s&&(t.type===\"scalar\"&&t.source===\"\"?l.comment=s:l.commentBefore=s),e.options.keepSourceTokens&&u&&(l.srcToken=t),l}function Bx(e,t,n,r,{spaceBefore:i,comment:s,anchor:o,tag:a,end:l},u){const f={type:\"scalar\",offset:Kte(t,n,r),indent:-1,source:\"\"},c=uD(e,f,a,u);return o&&(c.anchor=o.source.substring(1),c.anchor===\"\"&&u(o,\"BAD_ALIAS\",\"Anchor cannot be an empty string\")),i&&(c.spaceBefore=!0),s&&(c.comment=s,c.range[2]=l),c}function Yte({options:e},{offset:t,source:n,end:r},i){const s=new Op(n.substring(1));s.source===\"\"&&i(t,\"BAD_ALIAS\",\"Alias cannot be an empty string\"),s.source.endsWith(\":\")&&i(t+n.length-1,\"BAD_ALIAS\",\"Alias ending in : is ambiguous\",!0);const o=t+n.length,a=xc(r,o,e.strict,i);return s.range=[t,o,a.offset],a.comment&&(s.comment=a.comment),s}function Gte(e,t,{offset:n,start:r,value:i,end:s},o){const a=Object.assign({_directives:t},e),l=new Xa(void 0,a),u={atRoot:!0,directives:l.directives,options:l.options,schema:l.schema},f=Na(r,{indicator:\"doc-start\",next:i??(s==null?void 0:s[0]),offset:n,onError:o,parentIndent:0,startOnNewline:!0});f.found&&(l.directives.docStart=!0,i&&(i.type===\"block-map\"||i.type===\"block-seq\")&&!f.hasNewline&&o(f.end,\"MISSING_CHAR\",\"Block collection cannot start on same line with directives-end marker\")),l.contents=i?cD(u,i,f,o):Bx(u,f.end,r,null,f,o);const c=l.contents.range[2],d=xc(s,c,!1,o);return d.comment&&(l.comment=d.comment),l.range=[n,c,d.offset],l}function wl(e){if(typeof e==\"number\")return[e,e+1];if(Array.isArray(e))return e.length===2?e:[e[0],e[1]];const{offset:t,source:n}=e;return[t,t+(typeof n==\"string\"?n.length:1)]}function NC(e){var i;let t=\"\",n=!1,r=!1;for(let s=0;s<e.length;++s){const o=e[s];switch(o[0]){case\"#\":t+=(t===\"\"?\"\":r?`\n\n`:`\n`)+(o.substring(1)||\" \"),n=!0,r=!1;break;case\"%\":((i=e[s+1])==null?void 0:i[0])!==\"#\"&&(s+=1),n=!1;break;default:n||(r=!0),n=!1}}return{comment:t,afterEmptyLine:r}}class Vx{constructor(t={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(n,r,i,s)=>{const o=wl(n);s?this.warnings.push(new iD(o,r,i)):this.errors.push(new Ls(o,r,i))},this.directives=new Ft({version:t.version||\"1.2\"}),this.options=t}decorate(t,n){const{comment:r,afterEmptyLine:i}=NC(this.prelude);if(r){const s=t.contents;if(n)t.comment=t.comment?`${t.comment}\n${r}`:r;else if(i||t.directives.docStart||!s)t.commentBefore=r;else if(qe(s)&&!s.flow&&s.items.length>0){let o=s.items[0];Ue(o)&&(o=o.key);const a=o.commentBefore;o.commentBefore=a?`${r}\n${a}`:r}else{const o=s.commentBefore;s.commentBefore=o?`${r}\n${o}`:r}}n?(Array.prototype.push.apply(t.errors,this.errors),Array.prototype.push.apply(t.warnings,this.warnings)):(t.errors=this.errors,t.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:NC(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(t,n=!1,r=-1){for(const i of t)yield*this.next(i);yield*this.end(n,r)}*next(t){switch(t.type){case\"directive\":this.directives.add(t.source,(n,r,i)=>{const s=wl(t);s[0]+=n,this.onError(s,\"BAD_DIRECTIVE\",r,i)}),this.prelude.push(t.source),this.atDirectives=!0;break;case\"document\":{const n=Gte(this.options,this.directives,t,this.onError);this.atDirectives&&!n.directives.docStart&&this.onError(t,\"MISSING_CHAR\",\"Missing directives-end/doc-start indicator line\"),this.decorate(n,!1),this.doc&&(yield this.doc),this.doc=n,this.atDirectives=!1;break}case\"byte-order-mark\":case\"space\":break;case\"comment\":case\"newline\":this.prelude.push(t.source);break;case\"error\":{const n=t.source?`${t.message}: ${JSON.stringify(t.source)}`:t.message,r=new Ls(wl(t),\"UNEXPECTED_TOKEN\",n);this.atDirectives||!this.doc?this.errors.push(r):this.doc.errors.push(r);break}case\"doc-end\":{if(!this.doc){const r=\"Unexpected doc-end without preceding document\";this.errors.push(new Ls(wl(t),\"UNEXPECTED_TOKEN\",r));break}this.doc.directives.docEnd=!0;const n=xc(t.end,t.offset+t.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),n.comment){const r=this.doc.comment;this.doc.comment=r?`${r}\n${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.push(new Ls(wl(t),\"UNEXPECTED_TOKEN\",`Unsupported token ${t.type}`))}}*end(t=!1,n=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(t){const r=Object.assign({_directives:this.directives},this.options),i=new Xa(void 0,r);this.atDirectives&&this.onError(n,\"MISSING_CHAR\",\"Missing directives-end indicator line\"),i.range=[0,n,n],this.decorate(i,!1),yield i}}}function Xte(e,t=!0,n){if(e){const r=(i,s,o)=>{const a=typeof i==\"number\"?i:Array.isArray(i)?i[0]:i.offset;if(n)n(a,s,o);else throw new Ls([a,a+1],s,o)};switch(e.type){case\"scalar\":case\"single-quoted-scalar\":case\"double-quoted-scalar\":return aD(e,t,r);case\"block-scalar\":return oD({options:{strict:t}},e,r)}}return null}function Qte(e,t){const{implicitKey:n=!1,indent:r,inFlow:i=!1,offset:s=-1,type:o=\"PLAIN\"}=t,a=vc({type:o,value:e},{implicitKey:n,indent:r>0?\" \".repeat(r):\"\",inFlow:i,options:{blockQuote:!0,lineWidth:-1}}),l=t.end??[{type:\"newline\",offset:-1,indent:r,source:`\n`}];switch(a[0]){case\"|\":case\">\":{const u=a.indexOf(`\n`),f=a.substring(0,u),c=a.substring(u+1)+`\n`,d=[{type:\"block-scalar-header\",offset:s,indent:r,source:f}];return fD(d,l)||d.push({type:\"newline\",offset:-1,indent:r,source:`\n`}),{type:\"block-scalar\",offset:s,indent:r,props:d,source:c}}case'\"':return{type:\"double-quoted-scalar\",offset:s,indent:r,source:a,end:l};case\"'\":return{type:\"single-quoted-scalar\",offset:s,indent:r,source:a,end:l};default:return{type:\"scalar\",offset:s,indent:r,source:a,end:l}}}function Zte(e,t,n={}){let{afterKey:r=!1,implicitKey:i=!1,inFlow:s=!1,type:o}=n,a=\"indent\"in e?e.indent:null;if(r&&typeof a==\"number\"&&(a+=2),!o)switch(e.type){case\"single-quoted-scalar\":o=\"QUOTE_SINGLE\";break;case\"double-quoted-scalar\":o=\"QUOTE_DOUBLE\";break;case\"block-scalar\":{const u=e.props[0];if(u.type!==\"block-scalar-header\")throw new Error(\"Invalid block scalar header\");o=u.source[0]===\">\"?\"BLOCK_FOLDED\":\"BLOCK_LITERAL\";break}default:o=\"PLAIN\"}const l=vc({type:o,value:t},{implicitKey:i||a===null,indent:a!==null&&a>0?\" \".repeat(a):\"\",inFlow:s,options:{blockQuote:!0,lineWidth:-1}});switch(l[0]){case\"|\":case\">\":Jte(e,l);break;case'\"':wg(e,l,\"double-quoted-scalar\");break;case\"'\":wg(e,l,\"single-quoted-scalar\");break;default:wg(e,l,\"scalar\")}}function Jte(e,t){const n=t.indexOf(`\n`),r=t.substring(0,n),i=t.substring(n+1)+`\n`;if(e.type===\"block-scalar\"){const s=e.props[0];if(s.type!==\"block-scalar-header\")throw new Error(\"Invalid block scalar header\");s.source=r,e.source=i}else{const{offset:s}=e,o=\"indent\"in e?e.indent:-1,a=[{type:\"block-scalar-header\",offset:s,indent:o,source:r}];fD(a,\"end\"in e?e.end:void 0)||a.push({type:\"newline\",offset:-1,indent:o,source:`\n`});for(const l of Object.keys(e))l!==\"type\"&&l!==\"offset\"&&delete e[l];Object.assign(e,{type:\"block-scalar\",indent:o,props:a,source:i})}}function fD(e,t){if(t)for(const n of t)switch(n.type){case\"space\":case\"comment\":e.push(n);break;case\"newline\":return e.push(n),!0}return!1}function wg(e,t,n){switch(e.type){case\"scalar\":case\"double-quoted-scalar\":case\"single-quoted-scalar\":e.type=n,e.source=t;break;case\"block-scalar\":{const r=e.props.slice(1);let i=t.length;e.props[0].type===\"block-scalar-header\"&&(i-=e.props[0].source.length);for(const s of r)s.offset+=i;delete e.props,Object.assign(e,{type:n,source:t,end:r});break}case\"block-map\":case\"block-seq\":{const i={type:\"newline\",offset:e.offset+t.length,indent:e.indent,source:`\n`};delete e.items,Object.assign(e,{type:n,source:t,end:[i]});break}default:{const r=\"indent\"in e?e.indent:-1,i=\"end\"in e&&Array.isArray(e.end)?e.end.filter(s=>s.type===\"space\"||s.type===\"comment\"||s.type===\"newline\"):[];for(const s of Object.keys(e))s!==\"type\"&&s!==\"offset\"&&delete e[s];Object.assign(e,{type:n,indent:r,source:t,end:i})}}}const ene=e=>\"type\"in e?gh(e):id(e);function gh(e){switch(e.type){case\"block-scalar\":{let t=\"\";for(const n of e.props)t+=gh(n);return t+e.source}case\"block-map\":case\"block-seq\":{let t=\"\";for(const n of e.items)t+=id(n);return t}case\"flow-collection\":{let t=e.start.source;for(const n of e.items)t+=id(n);for(const n of e.end)t+=n.source;return t}case\"document\":{let t=id(e);if(e.end)for(const n of e.end)t+=n.source;return t}default:{let t=e.source;if(\"end\"in e&&e.end)for(const n of e.end)t+=n.source;return t}}}function id({start:e,key:t,sep:n,value:r}){let i=\"\";for(const s of e)i+=s.source;if(t&&(i+=gh(t)),n)for(const s of n)i+=s.source;return r&&(i+=gh(r)),i}const H0=Symbol(\"break visit\"),tne=Symbol(\"skip children\"),dD=Symbol(\"remove item\");function Qs(e,t){\"type\"in e&&e.type===\"document\"&&(e={start:e.start,value:e.value}),hD(Object.freeze([]),e,t)}Qs.BREAK=H0;Qs.SKIP=tne;Qs.REMOVE=dD;Qs.itemAtPath=(e,t)=>{let n=e;for(const[r,i]of t){const s=n==null?void 0:n[r];if(s&&\"items\"in s)n=s.items[i];else return}return n};Qs.parentCollection=(e,t)=>{const n=Qs.itemAtPath(e,t.slice(0,-1)),r=t[t.length-1][0],i=n==null?void 0:n[r];if(i&&\"items\"in i)return i;throw new Error(\"Parent collection not found\")};function hD(e,t,n){let r=n(t,e);if(typeof r==\"symbol\")return r;for(const i of[\"key\",\"value\"]){const s=t[i];if(s&&\"items\"in s){for(let o=0;o<s.items.length;++o){const a=hD(Object.freeze(e.concat([[i,o]])),s.items[o],n);if(typeof a==\"number\")o=a-1;else{if(a===H0)return H0;a===dD&&(s.items.splice(o,1),o-=1)}}typeof r==\"function\"&&i===\"key\"&&(r=r(t,e))}}return typeof r==\"function\"?r(t,e):r}const Bp=\"\\uFEFF\",Vp=\"\u0002\",zp=\"\u0018\",qu=\"\u001f\",nne=e=>!!e&&\"items\"in e,rne=e=>!!e&&(e.type===\"scalar\"||e.type===\"single-quoted-scalar\"||e.type===\"double-quoted-scalar\"||e.type===\"block-scalar\");function ine(e){switch(e){case Bp:return\"<BOM>\";case Vp:return\"<DOC>\";case zp:return\"<FLOW_END>\";case qu:return\"<SCALAR>\";default:return JSON.stringify(e)}}function pD(e){switch(e){case Bp:return\"byte-order-mark\";case Vp:return\"doc-mode\";case zp:return\"flow-error-end\";case qu:return\"scalar\";case\"---\":return\"doc-start\";case\"...\":return\"doc-end\";case\"\":case`\n`:case`\\r\n`:return\"newline\";case\"-\":return\"seq-item-ind\";case\"?\":return\"explicit-key-ind\";case\":\":return\"map-value-ind\";case\"{\":return\"flow-map-start\";case\"}\":return\"flow-map-end\";case\"[\":return\"flow-seq-start\";case\"]\":return\"flow-seq-end\";case\",\":return\"comma\"}switch(e[0]){case\" \":case\"\t\":return\"space\";case\"#\":return\"comment\";case\"%\":return\"directive-line\";case\"*\":return\"alias\";case\"&\":return\"anchor\";case\"!\":return\"tag\";case\"'\":return\"single-quoted-scalar\";case'\"':return\"double-quoted-scalar\";case\"|\":case\">\":return\"block-scalar-header\"}return null}const sne=Object.freeze(Object.defineProperty({__proto__:null,BOM:Bp,DOCUMENT:Vp,FLOW_END:zp,SCALAR:qu,createScalarToken:Qte,isCollection:nne,isScalar:rne,prettyToken:ine,resolveAsScalar:Xte,setScalarValue:Zte,stringify:ene,tokenType:pD,visit:Qs},Symbol.toStringTag,{value:\"Module\"}));function Kn(e){switch(e){case void 0:case\" \":case`\n`:case\"\\r\":case\"\t\":return!0;default:return!1}}const PC=new Set(\"0123456789ABCDEFabcdef\"),one=new Set(\"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()\"),pf=new Set(\",[]{}\"),ane=new Set(` ,[]{}\n\\r\t`),xg=e=>!e||ane.has(e);class mD{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer=\"\",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(t,n=!1){if(t){if(typeof t!=\"string\")throw TypeError(\"source is not a string\");this.buffer=this.buffer?this.buffer+t:t,this.lineEndPos=null}this.atEnd=!n;let r=this.next??\"stream\";for(;r&&(n||this.hasChars(1));)r=yield*this.parseNext(r)}atLineEnd(){let t=this.pos,n=this.buffer[t];for(;n===\" \"||n===\"\t\";)n=this.buffer[++t];return!n||n===\"#\"||n===`\n`?!0:n===\"\\r\"?this.buffer[t+1]===`\n`:!1}charAt(t){return this.buffer[this.pos+t]}continueScalar(t){let n=this.buffer[t];if(this.indentNext>0){let r=0;for(;n===\" \";)n=this.buffer[++r+t];if(n===\"\\r\"){const i=this.buffer[r+t+1];if(i===`\n`||!i&&!this.atEnd)return t+r+1}return n===`\n`||r>=this.indentNext||!n&&!this.atEnd?t+r:-1}if(n===\"-\"||n===\".\"){const r=this.buffer.substr(t,3);if((r===\"---\"||r===\"...\")&&Kn(this.buffer[t+3]))return-1}return t}getLine(){let t=this.lineEndPos;return(typeof t!=\"number\"||t!==-1&&t<this.pos)&&(t=this.buffer.indexOf(`\n`,this.pos),this.lineEndPos=t),t===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[t-1]===\"\\r\"&&(t-=1),this.buffer.substring(this.pos,t))}hasChars(t){return this.pos+t<=this.buffer.length}setNext(t){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=t,null}peek(t){return this.buffer.substr(this.pos,t)}*parseNext(t){switch(t){case\"stream\":return yield*this.parseStream();case\"line-start\":return yield*this.parseLineStart();case\"block-start\":return yield*this.parseBlockStart();case\"doc\":return yield*this.parseDocument();case\"flow\":return yield*this.parseFlowCollection();case\"quoted-scalar\":return yield*this.parseQuotedScalar();case\"block-scalar\":return yield*this.parseBlockScalar();case\"plain-scalar\":return yield*this.parsePlainScalar()}}*parseStream(){let t=this.getLine();if(t===null)return this.setNext(\"stream\");if(t[0]===Bp&&(yield*this.pushCount(1),t=t.substring(1)),t[0]===\"%\"){let n=t.length,r=t.indexOf(\"#\");for(;r!==-1;){const s=t[r-1];if(s===\" \"||s===\"\t\"){n=r-1;break}else r=t.indexOf(\"#\",r+1)}for(;;){const s=t[n-1];if(s===\" \"||s===\"\t\")n-=1;else break}const i=(yield*this.pushCount(n))+(yield*this.pushSpaces(!0));return yield*this.pushCount(t.length-i),this.pushNewline(),\"stream\"}if(this.atLineEnd()){const n=yield*this.pushSpaces(!0);return yield*this.pushCount(t.length-n),yield*this.pushNewline(),\"stream\"}return yield Vp,yield*this.parseLineStart()}*parseLineStart(){const t=this.charAt(0);if(!t&&!this.atEnd)return this.setNext(\"line-start\");if(t===\"-\"||t===\".\"){if(!this.atEnd&&!this.hasChars(4))return this.setNext(\"line-start\");const n=this.peek(3);if((n===\"---\"||n===\"...\")&&Kn(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,n===\"---\"?\"doc\":\"stream\"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!Kn(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[t,n]=this.peek(2);if(!n&&!this.atEnd)return this.setNext(\"block-start\");if((t===\"-\"||t===\"?\"||t===\":\")&&Kn(n)){const r=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=r,yield*this.parseBlockStart()}return\"doc\"}*parseDocument(){yield*this.pushSpaces(!0);const t=this.getLine();if(t===null)return this.setNext(\"doc\");let n=yield*this.pushIndicators();switch(t[n]){case\"#\":yield*this.pushCount(t.length-n);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case\"{\":case\"[\":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,\"flow\";case\"}\":case\"]\":return yield*this.pushCount(1),\"doc\";case\"*\":return yield*this.pushUntil(xg),\"doc\";case'\"':case\"'\":return yield*this.parseQuotedScalar();case\"|\":case\">\":return n+=yield*this.parseBlockScalarHeader(),n+=yield*this.pushSpaces(!0),yield*this.pushCount(t.length-n),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let t,n,r=-1;do t=yield*this.pushNewline(),t>0?(n=yield*this.pushSpaces(!1),this.indentValue=r=n):n=0,n+=yield*this.pushSpaces(!0);while(t+n>0);const i=this.getLine();if(i===null)return this.setNext(\"flow\");if((r!==-1&&r<this.indentNext&&i[0]!==\"#\"||r===0&&(i.startsWith(\"---\")||i.startsWith(\"...\"))&&Kn(i[3]))&&!(r===this.indentNext-1&&this.flowLevel===1&&(i[0]===\"]\"||i[0]===\"}\")))return this.flowLevel=0,yield zp,yield*this.parseLineStart();let s=0;for(;i[s]===\",\";)s+=yield*this.pushCount(1),s+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(s+=yield*this.pushIndicators(),i[s]){case void 0:return\"flow\";case\"#\":return yield*this.pushCount(i.length-s),\"flow\";case\"{\":case\"[\":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,\"flow\";case\"}\":case\"]\":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?\"flow\":\"doc\";case\"*\":return yield*this.pushUntil(xg),\"flow\";case'\"':case\"'\":return this.flowKey=!0,yield*this.parseQuotedScalar();case\":\":{const o=this.charAt(1);if(this.flowKey||Kn(o)||o===\",\")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),\"flow\"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){const t=this.charAt(0);let n=this.buffer.indexOf(t,this.pos+1);if(t===\"'\")for(;n!==-1&&this.buffer[n+1]===\"'\";)n=this.buffer.indexOf(\"'\",n+2);else for(;n!==-1;){let s=0;for(;this.buffer[n-1-s]===\"\\\\\";)s+=1;if(s%2===0)break;n=this.buffer.indexOf('\"',n+1)}const r=this.buffer.substring(0,n);let i=r.indexOf(`\n`,this.pos);if(i!==-1){for(;i!==-1;){const s=this.continueScalar(i+1);if(s===-1)break;i=r.indexOf(`\n`,s)}i!==-1&&(n=i-(r[i-1]===\"\\r\"?2:1))}if(n===-1){if(!this.atEnd)return this.setNext(\"quoted-scalar\");n=this.buffer.length}return yield*this.pushToIndex(n+1,!1),this.flowLevel?\"flow\":\"doc\"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let t=this.pos;for(;;){const n=this.buffer[++t];if(n===\"+\")this.blockScalarKeep=!0;else if(n>\"0\"&&n<=\"9\")this.blockScalarIndent=Number(n)-1;else if(n!==\"-\")break}return yield*this.pushUntil(n=>Kn(n)||n===\"#\")}*parseBlockScalar(){let t=this.pos-1,n=0,r;e:for(let s=this.pos;r=this.buffer[s];++s)switch(r){case\" \":n+=1;break;case`\n`:t=s,n=0;break;case\"\\r\":{const o=this.buffer[s+1];if(!o&&!this.atEnd)return this.setNext(\"block-scalar\");if(o===`\n`)break}default:break e}if(!r&&!this.atEnd)return this.setNext(\"block-scalar\");if(n>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=n:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{const s=this.continueScalar(t+1);if(s===-1)break;t=this.buffer.indexOf(`\n`,s)}while(t!==-1);if(t===-1){if(!this.atEnd)return this.setNext(\"block-scalar\");t=this.buffer.length}}let i=t+1;for(r=this.buffer[i];r===\" \";)r=this.buffer[++i];if(r===\"\t\"){for(;r===\"\t\"||r===\" \"||r===\"\\r\"||r===`\n`;)r=this.buffer[++i];t=i-1}else if(!this.blockScalarKeep)do{let s=t-1,o=this.buffer[s];o===\"\\r\"&&(o=this.buffer[--s]);const a=s;for(;o===\" \";)o=this.buffer[--s];if(o===`\n`&&s>=this.pos&&s+1+n>a)t=s;else break}while(!0);return yield qu,yield*this.pushToIndex(t+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const t=this.flowLevel>0;let n=this.pos-1,r=this.pos-1,i;for(;i=this.buffer[++r];)if(i===\":\"){const s=this.buffer[r+1];if(Kn(s)||t&&pf.has(s))break;n=r}else if(Kn(i)){let s=this.buffer[r+1];if(i===\"\\r\"&&(s===`\n`?(r+=1,i=`\n`,s=this.buffer[r+1]):n=r),s===\"#\"||t&&pf.has(s))break;if(i===`\n`){const o=this.continueScalar(r+1);if(o===-1)break;r=Math.max(r,o-2)}}else{if(t&&pf.has(i))break;n=r}return!i&&!this.atEnd?this.setNext(\"plain-scalar\"):(yield qu,yield*this.pushToIndex(n+1,!0),t?\"flow\":\"doc\")}*pushCount(t){return t>0?(yield this.buffer.substr(this.pos,t),this.pos+=t,t):0}*pushToIndex(t,n){const r=this.buffer.slice(this.pos,t);return r?(yield r,this.pos+=r.length,r.length):(n&&(yield\"\"),0)}*pushIndicators(){switch(this.charAt(0)){case\"!\":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case\"&\":return(yield*this.pushUntil(xg))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case\"-\":case\"?\":case\":\":{const t=this.flowLevel>0,n=this.charAt(1);if(Kn(n)||t&&pf.has(n))return t?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)===\"<\"){let t=this.pos+2,n=this.buffer[t];for(;!Kn(n)&&n!==\">\";)n=this.buffer[++t];return yield*this.pushToIndex(n===\">\"?t+1:t,!1)}else{let t=this.pos+1,n=this.buffer[t];for(;n;)if(one.has(n))n=this.buffer[++t];else if(n===\"%\"&&PC.has(this.buffer[t+1])&&PC.has(this.buffer[t+2]))n=this.buffer[t+=3];else break;return yield*this.pushToIndex(t,!1)}}*pushNewline(){const t=this.buffer[this.pos];return t===`\n`?yield*this.pushCount(1):t===\"\\r\"&&this.charAt(1)===`\n`?yield*this.pushCount(2):0}*pushSpaces(t){let n=this.pos-1,r;do r=this.buffer[++n];while(r===\" \"||t&&r===\"\t\");const i=n-this.pos;return i>0&&(yield this.buffer.substr(this.pos,i),this.pos=n),i}*pushUntil(t){let n=this.pos,r=this.buffer[n];for(;!t(r);)r=this.buffer[++n];return yield*this.pushToIndex(n,!1)}}class gD{constructor(){this.lineStarts=[],this.addNewLine=t=>this.lineStarts.push(t),this.linePos=t=>{let n=0,r=this.lineStarts.length;for(;n<r;){const s=n+r>>1;this.lineStarts[s]<t?n=s+1:r=s}if(this.lineStarts[n]===t)return{line:n+1,col:1};if(n===0)return{line:0,col:t};const i=this.lineStarts[n-1];return{line:n,col:t-i+1}}}}function ks(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function OC(e){for(let t=0;t<e.length;++t)switch(e[t].type){case\"space\":case\"comment\":case\"newline\":break;default:return t}return-1}function yD(e){switch(e==null?void 0:e.type){case\"alias\":case\"scalar\":case\"single-quoted-scalar\":case\"double-quoted-scalar\":case\"flow-collection\":return!0;default:return!1}}function mf(e){switch(e.type){case\"document\":return e.start;case\"block-map\":{const t=e.items[e.items.length-1];return t.sep??t.start}case\"block-seq\":return e.items[e.items.length-1].start;default:return[]}}function po(e){var n;if(e.length===0)return[];let t=e.length;e:for(;--t>=0;)switch(e[t].type){case\"doc-start\":case\"explicit-key-ind\":case\"map-value-ind\":case\"seq-item-ind\":case\"newline\":break e}for(;((n=e[++t])==null?void 0:n.type)===\"space\";);return e.splice(t,e.length)}function LC(e){if(e.start.type===\"flow-seq-start\")for(const t of e.items)t.sep&&!t.value&&!ks(t.start,\"explicit-key-ind\")&&!ks(t.sep,\"map-value-ind\")&&(t.key&&(t.value=t.key),delete t.key,yD(t.value)?t.value.end?Array.prototype.push.apply(t.value.end,t.sep):t.value.end=t.sep:Array.prototype.push.apply(t.start,t.sep),delete t.sep)}class zx{constructor(t){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source=\"\",this.type=\"\",this.lexer=new mD,this.onNewLine=t}*parse(t,n=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const r of this.lexer.lex(t,n))yield*this.next(r);n||(yield*this.end())}*next(t){if(this.source=t,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=t.length;return}const n=pD(t);if(n)if(n===\"scalar\")this.atNewLine=!1,this.atScalar=!0,this.type=\"scalar\";else{switch(this.type=n,yield*this.step(),n){case\"newline\":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+t.length);break;case\"space\":this.atNewLine&&t[0]===\" \"&&(this.indent+=t.length);break;case\"explicit-key-ind\":case\"map-value-ind\":case\"seq-item-ind\":this.atNewLine&&(this.indent+=t.length);break;case\"doc-mode\":case\"flow-error-end\":return;default:this.atNewLine=!1}this.offset+=t.length}else{const r=`Not a YAML token: ${t}`;yield*this.pop({type:\"error\",offset:this.offset,message:r,source:t}),this.offset+=t.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const t=this.peek(1);if(this.type===\"doc-end\"&&(!t||t.type!==\"doc-end\")){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:\"doc-end\",offset:this.offset,source:this.source});return}if(!t)return yield*this.stream();switch(t.type){case\"document\":return yield*this.document(t);case\"alias\":case\"scalar\":case\"single-quoted-scalar\":case\"double-quoted-scalar\":return yield*this.scalar(t);case\"block-scalar\":return yield*this.blockScalar(t);case\"block-map\":return yield*this.blockMap(t);case\"block-seq\":return yield*this.blockSequence(t);case\"flow-collection\":return yield*this.flowCollection(t);case\"doc-end\":return yield*this.documentEnd(t)}yield*this.pop()}peek(t){return this.stack[this.stack.length-t]}*pop(t){const n=t??this.stack.pop();if(!n)yield{type:\"error\",offset:this.offset,source:\"\",message:\"Tried to pop an empty stack\"};else if(this.stack.length===0)yield n;else{const r=this.peek(1);switch(n.type===\"block-scalar\"?n.indent=\"indent\"in r?r.indent:0:n.type===\"flow-collection\"&&r.type===\"document\"&&(n.indent=0),n.type===\"flow-collection\"&&LC(n),r.type){case\"document\":r.value=n;break;case\"block-scalar\":r.props.push(n);break;case\"block-map\":{const i=r.items[r.items.length-1];if(i.value){r.items.push({start:[],key:n,sep:[]}),this.onKeyLine=!0;return}else if(i.sep)i.value=n;else{Object.assign(i,{key:n,sep:[]}),this.onKeyLine=!i.explicitKey;return}break}case\"block-seq\":{const i=r.items[r.items.length-1];i.value?r.items.push({start:[],value:n}):i.value=n;break}case\"flow-collection\":{const i=r.items[r.items.length-1];!i||i.value?r.items.push({start:[],key:n,sep:[]}):i.sep?i.value=n:Object.assign(i,{key:n,sep:[]});return}default:yield*this.pop(),yield*this.pop(n)}if((r.type===\"document\"||r.type===\"block-map\"||r.type===\"block-seq\")&&(n.type===\"block-map\"||n.type===\"block-seq\")){const i=n.items[n.items.length-1];i&&!i.sep&&!i.value&&i.start.length>0&&OC(i.start)===-1&&(n.indent===0||i.start.every(s=>s.type!==\"comment\"||s.indent<n.indent))&&(r.type===\"document\"?r.end=i.start:r.items.push({start:i.start}),n.items.splice(-1,1))}}}*stream(){switch(this.type){case\"directive-line\":yield{type:\"directive\",offset:this.offset,source:this.source};return;case\"byte-order-mark\":case\"space\":case\"comment\":case\"newline\":yield this.sourceToken;return;case\"doc-mode\":case\"doc-start\":{const t={type:\"document\",offset:this.offset,start:[]};this.type===\"doc-start\"&&t.start.push(this.sourceToken),this.stack.push(t);return}}yield{type:\"error\",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(t){if(t.value)return yield*this.lineEnd(t);switch(this.type){case\"doc-start\":{OC(t.start)!==-1?(yield*this.pop(),yield*this.step()):t.start.push(this.sourceToken);return}case\"anchor\":case\"tag\":case\"space\":case\"comment\":case\"newline\":t.start.push(this.sourceToken);return}const n=this.startBlockValue(t);n?this.stack.push(n):yield{type:\"error\",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(t){if(this.type===\"map-value-ind\"){const n=mf(this.peek(2)),r=po(n);let i;t.end?(i=t.end,i.push(this.sourceToken),delete t.end):i=[this.sourceToken];const s={type:\"block-map\",offset:t.offset,indent:t.indent,items:[{start:r,key:t,sep:i}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=s}else yield*this.lineEnd(t)}*blockScalar(t){switch(this.type){case\"space\":case\"comment\":case\"newline\":t.props.push(this.sourceToken);return;case\"scalar\":if(t.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let n=this.source.indexOf(`\n`)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`\n`,n)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(t){var r;const n=t.items[t.items.length-1];switch(this.type){case\"newline\":if(this.onKeyLine=!1,n.value){const i=\"end\"in n.value?n.value.end:void 0,s=Array.isArray(i)?i[i.length-1]:void 0;(s==null?void 0:s.type)===\"comment\"?i==null||i.push(this.sourceToken):t.items.push({start:[this.sourceToken]})}else n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case\"space\":case\"comment\":if(n.value)t.items.push({start:[this.sourceToken]});else if(n.sep)n.sep.push(this.sourceToken);else{if(this.atIndentedComment(n.start,t.indent)){const i=t.items[t.items.length-2],s=(r=i==null?void 0:i.value)==null?void 0:r.end;if(Array.isArray(s)){Array.prototype.push.apply(s,n.start),s.push(this.sourceToken),t.items.pop();return}}n.start.push(this.sourceToken)}return}if(this.indent>=t.indent){const i=!this.onKeyLine&&this.indent===t.indent,s=i&&(n.sep||n.explicitKey)&&this.type!==\"seq-item-ind\";let o=[];if(s&&n.sep&&!n.value){const a=[];for(let l=0;l<n.sep.length;++l){const u=n.sep[l];switch(u.type){case\"newline\":a.push(l);break;case\"space\":break;case\"comment\":u.indent>t.indent&&(a.length=0);break;default:a.length=0}}a.length>=2&&(o=n.sep.splice(a[1]))}switch(this.type){case\"anchor\":case\"tag\":s||n.value?(o.push(this.sourceToken),t.items.push({start:o}),this.onKeyLine=!0):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case\"explicit-key-ind\":!n.sep&&!n.explicitKey?(n.start.push(this.sourceToken),n.explicitKey=!0):s||n.value?(o.push(this.sourceToken),t.items.push({start:o,explicitKey:!0})):this.stack.push({type:\"block-map\",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case\"map-value-ind\":if(n.explicitKey)if(n.sep)if(n.value)t.items.push({start:[],key:null,sep:[this.sourceToken]});else if(ks(n.sep,\"map-value-ind\"))this.stack.push({type:\"block-map\",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]});else if(yD(n.key)&&!ks(n.sep,\"newline\")){const a=po(n.start),l=n.key,u=n.sep;u.push(this.sourceToken),delete n.key,delete n.sep,this.stack.push({type:\"block-map\",offset:this.offset,indent:this.indent,items:[{start:a,key:l,sep:u}]})}else o.length>0?n.sep=n.sep.concat(o,this.sourceToken):n.sep.push(this.sourceToken);else if(ks(n.start,\"newline\"))Object.assign(n,{key:null,sep:[this.sourceToken]});else{const a=po(n.start);this.stack.push({type:\"block-map\",offset:this.offset,indent:this.indent,items:[{start:a,key:null,sep:[this.sourceToken]}]})}else n.sep?n.value||s?t.items.push({start:o,key:null,sep:[this.sourceToken]}):ks(n.sep,\"map-value-ind\")?this.stack.push({type:\"block-map\",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case\"alias\":case\"scalar\":case\"single-quoted-scalar\":case\"double-quoted-scalar\":{const a=this.flowScalar(this.type);s||n.value?(t.items.push({start:o,key:a,sep:[]}),this.onKeyLine=!0):n.sep?this.stack.push(a):(Object.assign(n,{key:a,sep:[]}),this.onKeyLine=!0);return}default:{const a=this.startBlockValue(t);if(a){i&&a.type!==\"block-seq\"&&t.items.push({start:o}),this.stack.push(a);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(t){var r;const n=t.items[t.items.length-1];switch(this.type){case\"newline\":if(n.value){const i=\"end\"in n.value?n.value.end:void 0,s=Array.isArray(i)?i[i.length-1]:void 0;(s==null?void 0:s.type)===\"comment\"?i==null||i.push(this.sourceToken):t.items.push({start:[this.sourceToken]})}else n.start.push(this.sourceToken);return;case\"space\":case\"comment\":if(n.value)t.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(n.start,t.indent)){const i=t.items[t.items.length-2],s=(r=i==null?void 0:i.value)==null?void 0:r.end;if(Array.isArray(s)){Array.prototype.push.apply(s,n.start),s.push(this.sourceToken),t.items.pop();return}}n.start.push(this.sourceToken)}return;case\"anchor\":case\"tag\":if(n.value||this.indent<=t.indent)break;n.start.push(this.sourceToken);return;case\"seq-item-ind\":if(this.indent!==t.indent)break;n.value||ks(n.start,\"seq-item-ind\")?t.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return}if(this.indent>t.indent){const i=this.startBlockValue(t);if(i){this.stack.push(i);return}}yield*this.pop(),yield*this.step()}*flowCollection(t){const n=t.items[t.items.length-1];if(this.type===\"flow-error-end\"){let r;do yield*this.pop(),r=this.peek(1);while(r&&r.type===\"flow-collection\")}else if(t.end.length===0){switch(this.type){case\"comma\":case\"explicit-key-ind\":!n||n.sep?t.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return;case\"map-value-ind\":!n||n.value?t.items.push({start:[],key:null,sep:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});return;case\"space\":case\"comment\":case\"newline\":case\"anchor\":case\"tag\":!n||n.value?t.items.push({start:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case\"alias\":case\"scalar\":case\"single-quoted-scalar\":case\"double-quoted-scalar\":{const i=this.flowScalar(this.type);!n||n.value?t.items.push({start:[],key:i,sep:[]}):n.sep?this.stack.push(i):Object.assign(n,{key:i,sep:[]});return}case\"flow-map-end\":case\"flow-seq-end\":t.end.push(this.sourceToken);return}const r=this.startBlockValue(t);r?this.stack.push(r):(yield*this.pop(),yield*this.step())}else{const r=this.peek(2);if(r.type===\"block-map\"&&(this.type===\"map-value-ind\"&&r.indent===t.indent||this.type===\"newline\"&&!r.items[r.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type===\"map-value-ind\"&&r.type!==\"flow-collection\"){const i=mf(r),s=po(i);LC(t);const o=t.end.splice(1,t.end.length);o.push(this.sourceToken);const a={type:\"block-map\",offset:t.offset,indent:t.indent,items:[{start:s,key:t,sep:o}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=a}else yield*this.lineEnd(t)}}flowScalar(t){if(this.onNewLine){let n=this.source.indexOf(`\n`)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`\n`,n)+1}return{type:t,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(t){switch(this.type){case\"alias\":case\"scalar\":case\"single-quoted-scalar\":case\"double-quoted-scalar\":return this.flowScalar(this.type);case\"block-scalar-header\":return{type:\"block-scalar\",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:\"\"};case\"flow-map-start\":case\"flow-seq-start\":return{type:\"flow-collection\",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case\"seq-item-ind\":return{type:\"block-seq\",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case\"explicit-key-ind\":{this.onKeyLine=!0;const n=mf(t),r=po(n);return r.push(this.sourceToken),{type:\"block-map\",offset:this.offset,indent:this.indent,items:[{start:r,explicitKey:!0}]}}case\"map-value-ind\":{this.onKeyLine=!0;const n=mf(t),r=po(n);return{type:\"block-map\",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(t,n){return this.type!==\"comment\"||this.indent<=n?!1:t.every(r=>r.type===\"newline\"||r.type===\"space\")}*documentEnd(t){this.type!==\"doc-mode\"&&(t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type===\"newline\"&&(yield*this.pop()))}*lineEnd(t){switch(this.type){case\"comma\":case\"doc-start\":case\"doc-end\":case\"flow-seq-end\":case\"flow-map-end\":case\"map-value-ind\":yield*this.pop(),yield*this.step();break;case\"newline\":this.onKeyLine=!1;case\"space\":case\"comment\":default:t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type===\"newline\"&&(yield*this.pop())}}}function vD(e){const t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new gD||null,prettyErrors:t}}function lne(e,t={}){const{lineCounter:n,prettyErrors:r}=vD(t),i=new zx(n==null?void 0:n.addNewLine),s=new Vx(t),o=Array.from(s.compose(i.parse(e)));if(r&&n)for(const a of o)a.errors.forEach(mh(e,n)),a.warnings.forEach(mh(e,n));return o.length>0?o:Object.assign([],{empty:!0},s.streamInfo())}function wD(e,t={}){const{lineCounter:n,prettyErrors:r}=vD(t),i=new zx(n==null?void 0:n.addNewLine),s=new Vx(t);let o=null;for(const a of s.compose(i.parse(e),!0,e.length))if(!o)o=a;else if(o.options.logLevel!==\"silent\"){o.errors.push(new Ls(a.range.slice(0,2),\"MULTIPLE_DOCS\",\"Source contains multiple documents; please use YAML.parseAllDocuments()\"));break}return r&&n&&(o.errors.forEach(mh(e,n)),o.warnings.forEach(mh(e,n))),o}function une(e,t,n){let r;typeof t==\"function\"?r=t:n===void 0&&t&&typeof t==\"object\"&&(n=t);const i=wD(e,n);if(!i)return null;if(i.warnings.forEach(s=>FI(i.options.logLevel,s)),i.errors.length>0){if(i.options.logLevel!==\"silent\")throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:r},n))}function cne(e,t,n){let r=null;if(typeof t==\"function\"||Array.isArray(t)?r=t:n===void 0&&t&&(n=t),typeof n==\"string\"&&(n=n.length),typeof n==\"number\"){const i=Math.round(n);n=i<1?void 0:i>8?{indent:8}:{indent:i}}if(e===void 0){const{keepUndefined:i}=n??t??{};if(!i)return}return new Xa(e,r,n).toString(n)}const xl=Object.freeze(Object.defineProperty({__proto__:null,Alias:Op,CST:sne,Composer:Vx,Document:Xa,Lexer:mD,LineCounter:gD,Pair:Ot,Parser:zx,Scalar:ge,Schema:nD,YAMLError:$x,YAMLMap:fn,YAMLParseError:Ls,YAMLSeq:rs,YAMLWarning:iD,isAlias:io,isCollection:qe,isDocument:Wa,isMap:Ka,isNode:Je,isPair:Ue,isScalar:Me,isSeq:qa,parse:une,parseAllDocuments:lne,parseDocument:wD,stringify:cne,visit:ns,visitAsync:Pp},Symbol.toStringTag,{value:\"Module\"}));function fne(e,t){const n={};return(e[e.length-1]===\"\"?[...e,\"\"]:e).join((n.padRight?\" \":\"\")+\",\"+(n.padLeft===!1?\"\":\" \")).trim()}const dne=/^[$_\\p{ID_Start}][$_\\u{200C}\\u{200D}\\p{ID_Continue}]*$/u,hne=/^[$_\\p{ID_Start}][-$_\\u{200C}\\u{200D}\\p{ID_Continue}]*$/u,pne={};function RC(e,t){return(pne.jsx?hne:dne).test(e)}const mne=/[ \\t\\n\\f\\r]/g;function gne(e){return typeof e==\"object\"?e.type===\"text\"?IC(e.value):!1:IC(e)}function IC(e){return e.replace(mne,\"\")===\"\"}let bc=class{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}};bc.prototype.property={};bc.prototype.normal={};bc.prototype.space=null;function xD(e,t){const n={},r={};let i=-1;for(;++i<e.length;)Object.assign(n,e[i].property),Object.assign(r,e[i].normal);return new bc(n,r,t)}function W0(e){return e.toLowerCase()}let Vn=class{constructor(t,n){this.property=t,this.attribute=n}};Vn.prototype.space=null;Vn.prototype.boolean=!1;Vn.prototype.booleanish=!1;Vn.prototype.overloadedBoolean=!1;Vn.prototype.number=!1;Vn.prototype.commaSeparated=!1;Vn.prototype.spaceSeparated=!1;Vn.prototype.commaOrSpaceSeparated=!1;Vn.prototype.mustUseProperty=!1;Vn.prototype.defined=!1;let yne=0;const me=so(),rt=so(),bD=so(),Z=so(),Ie=so(),aa=so(),on=so();function so(){return 2**++yne}const K0=Object.freeze(Object.defineProperty({__proto__:null,boolean:me,booleanish:rt,commaOrSpaceSeparated:on,commaSeparated:aa,number:Z,overloadedBoolean:bD,spaceSeparated:Ie},Symbol.toStringTag,{value:\"Module\"})),bg=Object.keys(K0);let Ux=class extends Vn{constructor(t,n,r,i){let s=-1;if(super(t,n),DC(this,\"space\",i),typeof r==\"number\")for(;++s<bg.length;){const o=bg[s];DC(this,bg[s],(r&K0[o])===K0[o])}}};Ux.prototype.defined=!0;function DC(e,t,n){n&&(e[t]=n)}const vne={}.hasOwnProperty;function Qa(e){const t={},n={};let r;for(r in e.properties)if(vne.call(e.properties,r)){const i=e.properties[r],s=new Ux(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[W0(r)]=r,n[W0(s.attribute)]=r}return new bc(t,n,e.space)}const SD=Qa({space:\"xlink\",transform(e,t){return\"xlink:\"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),kD=Qa({space:\"xml\",transform(e,t){return\"xml:\"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function ED(e,t){return t in e?e[t]:t}function CD(e,t){return ED(e,t.toLowerCase())}const TD=Qa({space:\"xmlns\",attributes:{xmlnsxlink:\"xmlns:xlink\"},transform:CD,properties:{xmlns:null,xmlnsXLink:null}}),_D=Qa({transform(e,t){return t===\"role\"?t:\"aria-\"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:rt,ariaAutoComplete:null,ariaBusy:rt,ariaChecked:rt,ariaColCount:Z,ariaColIndex:Z,ariaColSpan:Z,ariaControls:Ie,ariaCurrent:null,ariaDescribedBy:Ie,ariaDetails:null,ariaDisabled:rt,ariaDropEffect:Ie,ariaErrorMessage:null,ariaExpanded:rt,ariaFlowTo:Ie,ariaGrabbed:rt,ariaHasPopup:null,ariaHidden:rt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ie,ariaLevel:Z,ariaLive:null,ariaModal:rt,ariaMultiLine:rt,ariaMultiSelectable:rt,ariaOrientation:null,ariaOwns:Ie,ariaPlaceholder:null,ariaPosInSet:Z,ariaPressed:rt,ariaReadOnly:rt,ariaRelevant:null,ariaRequired:rt,ariaRoleDescription:Ie,ariaRowCount:Z,ariaRowIndex:Z,ariaRowSpan:Z,ariaSelected:rt,ariaSetSize:Z,ariaSort:null,ariaValueMax:Z,ariaValueMin:Z,ariaValueNow:Z,ariaValueText:null,role:null}}),wne=Qa({space:\"html\",attributes:{acceptcharset:\"accept-charset\",classname:\"class\",htmlfor:\"for\",httpequiv:\"http-equiv\"},transform:CD,mustUseProperty:[\"checked\",\"multiple\",\"muted\",\"selected\"],properties:{abbr:null,accept:aa,acceptCharset:Ie,accessKey:Ie,action:null,allow:null,allowFullScreen:me,allowPaymentRequest:me,allowUserMedia:me,alt:null,as:null,async:me,autoCapitalize:null,autoComplete:Ie,autoFocus:me,autoPlay:me,blocking:Ie,capture:null,charSet:null,checked:me,cite:null,className:Ie,cols:Z,colSpan:null,content:null,contentEditable:rt,controls:me,controlsList:Ie,coords:Z|aa,crossOrigin:null,data:null,dateTime:null,decoding:null,default:me,defer:me,dir:null,dirName:null,disabled:me,download:bD,draggable:rt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:me,formTarget:null,headers:Ie,height:Z,hidden:me,high:Z,href:null,hrefLang:null,htmlFor:Ie,httpEquiv:Ie,id:null,imageSizes:null,imageSrcSet:null,inert:me,inputMode:null,integrity:null,is:null,isMap:me,itemId:null,itemProp:Ie,itemRef:Ie,itemScope:me,itemType:Ie,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:me,low:Z,manifest:null,max:null,maxLength:Z,media:null,method:null,min:null,minLength:Z,multiple:me,muted:me,name:null,nonce:null,noModule:me,noValidate:me,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:me,optimum:Z,pattern:null,ping:Ie,placeholder:null,playsInline:me,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:me,referrerPolicy:null,rel:Ie,required:me,reversed:me,rows:Z,rowSpan:Z,sandbox:Ie,scope:null,scoped:me,seamless:me,selected:me,shadowRootClonable:me,shadowRootDelegatesFocus:me,shadowRootMode:null,shape:null,size:Z,sizes:null,slot:null,span:Z,spellCheck:rt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Z,step:null,style:null,tabIndex:Z,target:null,title:null,translate:null,type:null,typeMustMatch:me,useMap:null,value:rt,width:Z,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ie,axis:null,background:null,bgColor:null,border:Z,borderColor:null,bottomMargin:Z,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:me,declare:me,event:null,face:null,frame:null,frameBorder:null,hSpace:Z,leftMargin:Z,link:null,longDesc:null,lowSrc:null,marginHeight:Z,marginWidth:Z,noResize:me,noHref:me,noShade:me,noWrap:me,object:null,profile:null,prompt:null,rev:null,rightMargin:Z,rules:null,scheme:null,scrolling:rt,standby:null,summary:null,text:null,topMargin:Z,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Z,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:me,disableRemotePlayback:me,prefix:null,property:null,results:Z,security:null,unselectable:null}}),xne=Qa({space:\"svg\",attributes:{accentHeight:\"accent-height\",alignmentBaseline:\"alignment-baseline\",arabicForm:\"arabic-form\",baselineShift:\"baseline-shift\",capHeight:\"cap-height\",className:\"class\",clipPath:\"clip-path\",clipRule:\"clip-rule\",colorInterpolation:\"color-interpolation\",colorInterpolationFilters:\"color-interpolation-filters\",colorProfile:\"color-profile\",colorRendering:\"color-rendering\",crossOrigin:\"crossorigin\",dataType:\"datatype\",dominantBaseline:\"dominant-baseline\",enableBackground:\"enable-background\",fillOpacity:\"fill-opacity\",fillRule:\"fill-rule\",floodColor:\"flood-color\",floodOpacity:\"flood-opacity\",fontFamily:\"font-family\",fontSize:\"font-size\",fontSizeAdjust:\"font-size-adjust\",fontStretch:\"font-stretch\",fontStyle:\"font-style\",fontVariant:\"font-variant\",fontWeight:\"font-weight\",glyphName:\"glyph-name\",glyphOrientationHorizontal:\"glyph-orientation-horizontal\",glyphOrientationVertical:\"glyph-orientation-vertical\",hrefLang:\"hreflang\",horizAdvX:\"horiz-adv-x\",horizOriginX:\"horiz-origin-x\",horizOriginY:\"horiz-origin-y\",imageRendering:\"image-rendering\",letterSpacing:\"letter-spacing\",lightingColor:\"lighting-color\",markerEnd:\"marker-end\",markerMid:\"marker-mid\",markerStart:\"marker-start\",navDown:\"nav-down\",navDownLeft:\"nav-down-left\",navDownRight:\"nav-down-right\",navLeft:\"nav-left\",navNext:\"nav-next\",navPrev:\"nav-prev\",navRight:\"nav-right\",navUp:\"nav-up\",navUpLeft:\"nav-up-left\",navUpRight:\"nav-up-right\",onAbort:\"onabort\",onActivate:\"onactivate\",onAfterPrint:\"onafterprint\",onBeforePrint:\"onbeforeprint\",onBegin:\"onbegin\",onCancel:\"oncancel\",onCanPlay:\"oncanplay\",onCanPlayThrough:\"oncanplaythrough\",onChange:\"onchange\",onClick:\"onclick\",onClose:\"onclose\",onCopy:\"oncopy\",onCueChange:\"oncuechange\",onCut:\"oncut\",onDblClick:\"ondblclick\",onDrag:\"ondrag\",onDragEnd:\"ondragend\",onDragEnter:\"ondragenter\",onDragExit:\"ondragexit\",onDragLeave:\"ondragleave\",onDragOver:\"ondragover\",onDragStart:\"ondragstart\",onDrop:\"ondrop\",onDurationChange:\"ondurationchange\",onEmptied:\"onemptied\",onEnd:\"onend\",onEnded:\"onended\",onError:\"onerror\",onFocus:\"onfocus\",onFocusIn:\"onfocusin\",onFocusOut:\"onfocusout\",onHashChange:\"onhashchange\",onInput:\"oninput\",onInvalid:\"oninvalid\",onKeyDown:\"onkeydown\",onKeyPress:\"onkeypress\",onKeyUp:\"onkeyup\",onLoad:\"onload\",onLoadedData:\"onloadeddata\",onLoadedMetadata:\"onloadedmetadata\",onLoadStart:\"onloadstart\",onMessage:\"onmessage\",onMouseDown:\"onmousedown\",onMouseEnter:\"onmouseenter\",onMouseLeave:\"onmouseleave\",onMouseMove:\"onmousemove\",onMouseOut:\"onmouseout\",onMouseOver:\"onmouseover\",onMouseUp:\"onmouseup\",onMouseWheel:\"onmousewheel\",onOffline:\"onoffline\",onOnline:\"ononline\",onPageHide:\"onpagehide\",onPageShow:\"onpageshow\",onPaste:\"onpaste\",onPause:\"onpause\",onPlay:\"onplay\",onPlaying:\"onplaying\",onPopState:\"onpopstate\",onProgress:\"onprogress\",onRateChange:\"onratechange\",onRepeat:\"onrepeat\",onReset:\"onreset\",onResize:\"onresize\",onScroll:\"onscroll\",onSeeked:\"onseeked\",onSeeking:\"onseeking\",onSelect:\"onselect\",onShow:\"onshow\",onStalled:\"onstalled\",onStorage:\"onstorage\",onSubmit:\"onsubmit\",onSuspend:\"onsuspend\",onTimeUpdate:\"ontimeupdate\",onToggle:\"ontoggle\",onUnload:\"onunload\",onVolumeChange:\"onvolumechange\",onWaiting:\"onwaiting\",onZoom:\"onzoom\",overlinePosition:\"overline-position\",overlineThickness:\"overline-thickness\",paintOrder:\"paint-order\",panose1:\"panose-1\",pointerEvents:\"pointer-events\",referrerPolicy:\"referrerpolicy\",renderingIntent:\"rendering-intent\",shapeRendering:\"shape-rendering\",stopColor:\"stop-color\",stopOpacity:\"stop-opacity\",strikethroughPosition:\"strikethrough-position\",strikethroughThickness:\"strikethrough-thickness\",strokeDashArray:\"stroke-dasharray\",strokeDashOffset:\"stroke-dashoffset\",strokeLineCap:\"stroke-linecap\",strokeLineJoin:\"stroke-linejoin\",strokeMiterLimit:\"stroke-miterlimit\",strokeOpacity:\"stroke-opacity\",strokeWidth:\"stroke-width\",tabIndex:\"tabindex\",textAnchor:\"text-anchor\",textDecoration:\"text-decoration\",textRendering:\"text-rendering\",transformOrigin:\"transform-origin\",typeOf:\"typeof\",underlinePosition:\"underline-position\",underlineThickness:\"underline-thickness\",unicodeBidi:\"unicode-bidi\",unicodeRange:\"unicode-range\",unitsPerEm:\"units-per-em\",vAlphabetic:\"v-alphabetic\",vHanging:\"v-hanging\",vIdeographic:\"v-ideographic\",vMathematical:\"v-mathematical\",vectorEffect:\"vector-effect\",vertAdvY:\"vert-adv-y\",vertOriginX:\"vert-origin-x\",vertOriginY:\"vert-origin-y\",wordSpacing:\"word-spacing\",writingMode:\"writing-mode\",xHeight:\"x-height\",playbackOrder:\"playbackorder\",timelineBegin:\"timelinebegin\"},transform:ED,properties:{about:on,accentHeight:Z,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Z,amplitude:Z,arabicForm:null,ascent:Z,attributeName:null,attributeType:null,azimuth:Z,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Z,by:null,calcMode:null,capHeight:Z,className:Ie,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Z,diffuseConstant:Z,direction:null,display:null,dur:null,divisor:Z,dominantBaseline:null,download:me,dx:null,dy:null,edgeMode:null,editable:null,elevation:Z,enableBackground:null,end:null,event:null,exponent:Z,externalResourcesRequired:null,fill:null,fillOpacity:Z,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:aa,g2:aa,glyphName:aa,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Z,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Z,horizOriginX:Z,horizOriginY:Z,id:null,ideographic:Z,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Z,k:Z,k1:Z,k2:Z,k3:Z,k4:Z,kernelMatrix:on,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Z,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Z,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Z,overlineThickness:Z,paintOrder:null,panose1:null,path:null,pathLength:Z,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ie,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Z,pointsAtY:Z,pointsAtZ:Z,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:on,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:on,rev:on,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:on,requiredFeatures:on,requiredFonts:on,requiredFormats:on,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Z,specularExponent:Z,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Z,strikethroughThickness:Z,string:null,stroke:null,strokeDashArray:on,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Z,strokeOpacity:Z,strokeWidth:null,style:null,surfaceScale:Z,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:on,tabIndex:Z,tableValues:null,target:null,targetX:Z,targetY:Z,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:on,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Z,underlineThickness:Z,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Z,values:null,vAlphabetic:Z,vMathematical:Z,vectorEffect:null,vHanging:Z,vIdeographic:Z,version:null,vertAdvY:Z,vertOriginX:Z,vertOriginY:Z,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Z,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),bne=/^data[-\\w.:]+$/i,MC=/-[a-z]/g,Sne=/[A-Z]/g;function kne(e,t){const n=W0(t);let r=t,i=Vn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===\"data\"&&bne.test(t)){if(t.charAt(4)===\"-\"){const s=t.slice(5).replace(MC,Cne);r=\"data\"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!MC.test(s)){let o=s.replace(Sne,Ene);o.charAt(0)!==\"-\"&&(o=\"-\"+o),t=\"data\"+o}}i=Ux}return new i(r,t)}function Ene(e){return\"-\"+e.toLowerCase()}function Cne(e){return e.charAt(1).toUpperCase()}const Tne={classId:\"classID\",dataType:\"datatype\",itemId:\"itemID\",strokeDashArray:\"strokeDasharray\",strokeDashOffset:\"strokeDashoffset\",strokeLineCap:\"strokeLinecap\",strokeLineJoin:\"strokeLinejoin\",strokeMiterLimit:\"strokeMiterlimit\",typeOf:\"typeof\",xLinkActuate:\"xlinkActuate\",xLinkArcRole:\"xlinkArcrole\",xLinkHref:\"xlinkHref\",xLinkRole:\"xlinkRole\",xLinkShow:\"xlinkShow\",xLinkTitle:\"xlinkTitle\",xLinkType:\"xlinkType\",xmlnsXLink:\"xmlnsXlink\"},_ne=xD([kD,SD,TD,_D,wne],\"html\"),Hx=xD([kD,SD,TD,_D,xne],\"svg\");function Ane(e){return e.join(\" \").trim()}var AD={},jC=/\\/\\*[^*]*\\*+([^/*][^*]*\\*+)*\\//g,Nne=/\\n/g,Pne=/^\\s*/,One=/^(\\*?[-#/*\\\\\\w]+(\\[[0-9a-z_-]+\\])?)\\s*/,Lne=/^:\\s*/,Rne=/^((?:'(?:\\\\'|.)*?'|\"(?:\\\\\"|.)*?\"|\\([^)]*?\\)|[^};])+)/,Ine=/^[;\\s]*/,Dne=/^\\s+|\\s+$/g,Mne=`\n`,FC=\"/\",$C=\"*\",Es=\"\",jne=\"comment\",Fne=\"declaration\",$ne=function(e,t){if(typeof e!=\"string\")throw new TypeError(\"First argument must be a string\");if(!e)return[];t=t||{};var n=1,r=1;function i(p){var m=p.match(Nne);m&&(n+=m.length);var w=p.lastIndexOf(Mne);r=~w?p.length-w:r+p.length}function s(){var p={line:n,column:r};return function(m){return m.position=new o(p),u(),m}}function o(p){this.start=p,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function a(p){var m=new Error(t.source+\":\"+n+\":\"+r+\": \"+p);if(m.reason=p,m.filename=t.source,m.line=n,m.column=r,m.source=e,!t.silent)throw m}function l(p){var m=p.exec(e);if(m){var w=m[0];return i(w),e=e.slice(w.length),m}}function u(){l(Pne)}function f(p){var m;for(p=p||[];m=c();)m!==!1&&p.push(m);return p}function c(){var p=s();if(!(FC!=e.charAt(0)||$C!=e.charAt(1))){for(var m=2;Es!=e.charAt(m)&&($C!=e.charAt(m)||FC!=e.charAt(m+1));)++m;if(m+=2,Es===e.charAt(m-1))return a(\"End of comment missing\");var w=e.slice(2,m-2);return r+=2,i(w),e=e.slice(m),r+=2,p({type:jne,comment:w})}}function d(){var p=s(),m=l(One);if(m){if(c(),!l(Lne))return a(\"property missing ':'\");var w=l(Rne),y=p({type:Fne,property:BC(m[0].replace(jC,Es)),value:w?BC(w[0].replace(jC,Es)):Es});return l(Ine),y}}function h(){var p=[];f(p);for(var m;m=d();)m!==!1&&(p.push(m),f(p));return p}return u(),h()};function BC(e){return e?e.replace(Dne,Es):Es}var Bne=la&&la.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(AD,\"__esModule\",{value:!0});var VC=AD.default=zne,Vne=Bne($ne);function zne(e,t){var n=null;if(!e||typeof e!=\"string\")return n;var r=(0,Vne.default)(e),i=typeof t==\"function\";return r.forEach(function(s){if(s.type===\"declaration\"){var o=s.property,a=s.value;i?t(o,a,s):a&&(n=n||{},n[o]=a)}}),n}const Une=VC.default||VC,ND=PD(\"end\"),Wx=PD(\"start\");function PD(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line==\"number\"&&r.line>0&&typeof r.column==\"number\"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset==\"number\"&&r.offset>-1?r.offset:void 0}}}function Hne(e){const t=Wx(e),n=ND(e);if(t&&n)return{start:t,end:n}}function ru(e){return!e||typeof e!=\"object\"?\"\":\"position\"in e||\"type\"in e?zC(e.position):\"start\"in e||\"end\"in e?zC(e):\"line\"in e||\"column\"in e?q0(e):\"\"}function q0(e){return UC(e&&e.line)+\":\"+UC(e&&e.column)}function zC(e){return q0(e&&e.start)+\"-\"+q0(e&&e.end)}function UC(e){return e&&typeof e==\"number\"?e:1}class Rt extends Error{constructor(t,n,r){super(),typeof n==\"string\"&&(r=n,n=void 0);let i=\"\",s={},o=!1;if(n&&(\"line\"in n&&\"column\"in n?s={place:n}:\"start\"in n&&\"end\"in n?s={place:n}:\"type\"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof t==\"string\"?i=t:!s.cause&&t&&(o=!0,i=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof r==\"string\"){const l=r.indexOf(\":\");l===-1?s.ruleId=r:(s.source=r.slice(0,l),s.ruleId=r.slice(l+1))}if(!s.place&&s.ancestors&&s.ancestors){const l=s.ancestors[s.ancestors.length-1];l&&(s.place=l.position)}const a=s.place&&\"start\"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=a?a.line:void 0,this.name=ru(s.place)||\"1:1\",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=o&&s.cause&&typeof s.cause.stack==\"string\"?s.cause.stack:\"\",this.actual,this.expected,this.note,this.url}}Rt.prototype.file=\"\";Rt.prototype.name=\"\";Rt.prototype.reason=\"\";Rt.prototype.message=\"\";Rt.prototype.stack=\"\";Rt.prototype.column=void 0;Rt.prototype.line=void 0;Rt.prototype.ancestors=void 0;Rt.prototype.cause=void 0;Rt.prototype.fatal=void 0;Rt.prototype.place=void 0;Rt.prototype.ruleId=void 0;Rt.prototype.source=void 0;const Kx={}.hasOwnProperty,Wne=new Map,Kne=/[A-Z]/g,qne=/-([a-z])/g,Yne=new Set([\"table\",\"tbody\",\"thead\",\"tfoot\",\"tr\"]),Gne=new Set([\"td\",\"th\"]),OD=\"https://github.com/syntax-tree/hast-util-to-jsx-runtime\";function Xne(e,t){if(!t||t.Fragment===void 0)throw new TypeError(\"Expected `Fragment` in options\");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!=\"function\")throw new TypeError(\"Expected `jsxDEV` in options when `development: true`\");r=ire(n,t.jsxDEV)}else{if(typeof t.jsx!=\"function\")throw new TypeError(\"Expected `jsx` in production options\");if(typeof t.jsxs!=\"function\")throw new TypeError(\"Expected `jsxs` in production options\");r=rre(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||\"react\",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===\"svg\"?Hx:_ne,stylePropertyNameCase:t.stylePropertyNameCase||\"dom\",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=LD(i,e,void 0);return s&&typeof s!=\"string\"?s:i.create(e,i.Fragment,{children:s||void 0},void 0)}function LD(e,t,n){if(t.type===\"element\")return Qne(e,t,n);if(t.type===\"mdxFlowExpression\"||t.type===\"mdxTextExpression\")return Zne(e,t);if(t.type===\"mdxJsxFlowElement\"||t.type===\"mdxJsxTextElement\")return ere(e,t,n);if(t.type===\"mdxjsEsm\")return Jne(e,t);if(t.type===\"root\")return tre(e,t,n);if(t.type===\"text\")return nre(e,t)}function Qne(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()===\"svg\"&&r.space===\"html\"&&(i=Hx,e.schema=i),e.ancestors.push(t);const s=ID(e,t.tagName,!1),o=sre(e,t);let a=Yx(e,t);return Yne.has(t.tagName)&&(a=a.filter(function(l){return typeof l==\"string\"?!gne(l):!0})),RD(e,o,s,t),qx(o,a),e.ancestors.pop(),e.schema=r,e.create(t,s,o,n)}function Zne(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Yu(e,t.position)}function Jne(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Yu(e,t.position)}function ere(e,t,n){const r=e.schema;let i=r;t.name===\"svg\"&&r.space===\"html\"&&(i=Hx,e.schema=i),e.ancestors.push(t);const s=t.name===null?e.Fragment:ID(e,t.name,!0),o=ore(e,t),a=Yx(e,t);return RD(e,o,s,t),qx(o,a),e.ancestors.pop(),e.schema=r,e.create(t,s,o,n)}function tre(e,t,n){const r={};return qx(r,Yx(e,t)),e.create(t,e.Fragment,r,n)}function nre(e,t){return t.value}function RD(e,t,n,r){typeof n!=\"string\"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function qx(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function rre(e,t,n){return r;function r(i,s,o,a){const u=Array.isArray(o.children)?n:t;return a?u(s,o,a):u(s,o)}}function ire(e,t){return n;function n(r,i,s,o){const a=Array.isArray(s.children),l=Wx(r);return t(i,s,o,a,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function sre(e,t){const n={};let r,i;for(i in t.properties)if(i!==\"children\"&&Kx.call(t.properties,i)){const s=are(e,i,t.properties[i]);if(s){const[o,a]=s;e.tableCellAlignToStyle&&o===\"align\"&&typeof a==\"string\"&&Gne.has(t.tagName)?r=a:n[o]=a}}if(r){const s=n.style||(n.style={});s[e.stylePropertyNameCase===\"css\"?\"text-align\":\"textAlign\"]=r}return n}function ore(e,t){const n={};for(const r of t.attributes)if(r.type===\"mdxJsxExpressionAttribute\")if(r.data&&r.data.estree&&e.evaluater){const s=r.data.estree.body[0];s.type;const o=s.expression;o.type;const a=o.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else Yu(e,t.position);else{const i=r.name;let s;if(r.value&&typeof r.value==\"object\")if(r.value.data&&r.value.data.estree&&e.evaluater){const a=r.value.data.estree.body[0];a.type,s=e.evaluater.evaluateExpression(a.expression)}else Yu(e,t.position);else s=r.value===null?!0:r.value;n[i]=s}return n}function Yx(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:Wne;for(;++r<t.children.length;){const s=t.children[r];let o;if(e.passKeys){const l=s.type===\"element\"?s.tagName:s.type===\"mdxJsxFlowElement\"||s.type===\"mdxJsxTextElement\"?s.name:void 0;if(l){const u=i.get(l)||0;o=l+\"-\"+u,i.set(l,u+1)}}const a=LD(e,s,o);a!==void 0&&n.push(a)}return n}function are(e,t,n){const r=kne(e.schema,t);if(!(n==null||typeof n==\"number\"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?fne(n):Ane(n)),r.property===\"style\"){let i=typeof n==\"object\"?n:lre(e,String(n));return e.stylePropertyNameCase===\"css\"&&(i=ure(i)),[\"style\",i]}return[e.elementAttributeNameCase===\"react\"&&r.space?Tne[r.property]||r.property:r.attribute,n]}}function lre(e,t){const n={};try{Une(t,r)}catch(i){if(!e.ignoreInvalidStyle){const s=i,o=new Rt(\"Cannot parse `style` attribute\",{ancestors:e.ancestors,cause:s,ruleId:\"style\",source:\"hast-util-to-jsx-runtime\"});throw o.file=e.filePath||void 0,o.url=OD+\"#cannot-parse-style-attribute\",o}}return n;function r(i,s){let o=i;o.slice(0,2)!==\"--\"&&(o.slice(0,4)===\"-ms-\"&&(o=\"ms-\"+o.slice(4)),o=o.replace(qne,fre)),n[o]=s}}function ID(e,t,n){let r;if(!n)r={type:\"Literal\",value:t};else if(t.includes(\".\")){const i=t.split(\".\");let s=-1,o;for(;++s<i.length;){const a=RC(i[s])?{type:\"Identifier\",name:i[s]}:{type:\"Literal\",value:i[s]};o=o?{type:\"MemberExpression\",object:o,property:a,computed:!!(s&&a.type===\"Literal\"),optional:!1}:a}r=o}else r=RC(t)&&!/^[a-z]/.test(t)?{type:\"Identifier\",name:t}:{type:\"Literal\",value:t};if(r.type===\"Literal\"){const i=r.value;return Kx.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Yu(e)}function Yu(e,t){const n=new Rt(\"Cannot handle MDX estrees without `createEvaluater`\",{ancestors:e.ancestors,place:t,ruleId:\"mdx-estree\",source:\"hast-util-to-jsx-runtime\"});throw n.file=e.filePath||void 0,n.url=OD+\"#cannot-handle-mdx-estrees-without-createevaluater\",n}function ure(e){const t={};let n;for(n in e)Kx.call(e,n)&&(t[cre(n)]=e[n]);return t}function cre(e){let t=e.replace(Kne,dre);return t.slice(0,3)===\"ms-\"&&(t=\"-\"+t),t}function fre(e,t){return t.toUpperCase()}function dre(e){return\"-\"+e.toLowerCase()}const Sg={action:[\"form\"],cite:[\"blockquote\",\"del\",\"ins\",\"q\"],data:[\"object\"],formAction:[\"button\",\"input\"],href:[\"a\",\"area\",\"base\",\"link\"],icon:[\"menuitem\"],itemId:null,manifest:[\"html\"],ping:[\"a\",\"area\"],poster:[\"video\"],src:[\"audio\",\"embed\",\"iframe\",\"img\",\"input\",\"script\",\"source\",\"track\",\"video\"]},hre={};function Gx(e,t){const n=hre,r=typeof n.includeImageAlt==\"boolean\"?n.includeImageAlt:!0,i=typeof n.includeHtml==\"boolean\"?n.includeHtml:!0;return DD(e,r,i)}function DD(e,t,n){if(pre(e)){if(\"value\"in e)return e.type===\"html\"&&!n?\"\":e.value;if(t&&\"alt\"in e&&e.alt)return e.alt;if(\"children\"in e)return HC(e.children,t,n)}return Array.isArray(e)?HC(e,t,n):\"\"}function HC(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=DD(e[i],t,n);return r.join(\"\")}function pre(e){return!!(e&&typeof e==\"object\")}const WC=document.createElement(\"i\");function Xx(e){const t=\"&\"+e+\";\";WC.innerHTML=t;const n=WC.textContent;return n.charCodeAt(n.length-1)===59&&e!==\"semi\"||n===t?!1:n}function jn(e,t,n,r){const i=e.length;let s=0,o;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);s<r.length;)o=r.slice(s,s+1e4),o.unshift(t,0),e.splice(...o),s+=1e4,t+=1e4}function Rn(e,t){return e.length>0?(jn(e,e.length,0,t),e):t}const KC={}.hasOwnProperty;function MD(e){const t={};let n=-1;for(;++n<e.length;)mre(t,e[n]);return t}function mre(e,t){let n;for(n in t){const i=(KC.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];let o;if(s)for(o in s){KC.call(i,o)||(i[o]=[]);const a=s[o];gre(i[o],Array.isArray(a)?a:a?[a]:[])}}}function gre(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add===\"after\"?e:r).push(t[n]);jn(e,0,0,r)}function jD(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?\"�\":String.fromCodePoint(n)}function sr(e){return e.replace(/[\\t\\n\\r ]+/g,\" \").replace(/^ | $/g,\"\").toLowerCase().toUpperCase()}const $t=fs(/[A-Za-z]/),Nt=fs(/[\\dA-Za-z]/),yre=fs(/[#-'*+\\--9=?A-Z^-~]/);function yh(e){return e!==null&&(e<32||e===127)}const Y0=fs(/\\d/),vre=fs(/[\\dA-Fa-f]/),wre=fs(/[!-/:-@[-`{-~]/);function fe(e){return e!==null&&e<-2}function Re(e){return e!==null&&(e<0||e===32)}function Se(e){return e===-2||e===-1||e===32}const Up=fs(new RegExp(\"\\\\p{P}|\\\\p{S}\",\"u\")),Zs=fs(/\\s/);function fs(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Za(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const s=e.charCodeAt(n);let o=\"\";if(s===37&&Nt(e.charCodeAt(n+1))&&Nt(e.charCodeAt(n+2)))i=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(o=String.fromCharCode(s));else if(s>55295&&s<57344){const a=e.charCodeAt(n+1);s<56320&&a>56319&&a<57344?(o=String.fromCharCode(s,a),i=1):o=\"�\"}else o=String.fromCharCode(s);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,o=\"\"),i&&(n+=i,i=0)}return t.join(\"\")+e.slice(r)}function Ce(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let s=0;return o;function o(l){return Se(l)?(e.enter(n),a(l)):t(l)}function a(l){return Se(l)&&s++<i?(e.consume(l),a):(e.exit(n),t(l))}}const xre={tokenize:bre};function bre(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(a){if(a===null){e.consume(a);return}return e.enter(\"lineEnding\"),e.consume(a),e.exit(\"lineEnding\"),Ce(e,t,\"linePrefix\")}function i(a){return e.enter(\"paragraph\"),s(a)}function s(a){const l=e.enter(\"chunkText\",{contentType:\"text\",previous:n});return n&&(n.next=l),n=l,o(a)}function o(a){if(a===null){e.exit(\"chunkText\"),e.exit(\"paragraph\"),e.consume(a);return}return fe(a)?(e.consume(a),e.exit(\"chunkText\"),s):(e.consume(a),o)}}const Sre={tokenize:kre},qC={tokenize:Ere};function kre(e){const t=this,n=[];let r=0,i,s,o;return a;function a(g){if(r<n.length){const x=n[r];return t.containerState=x[1],e.attempt(x[0].continuation,l,u)(g)}return u(g)}function l(g){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();const x=t.events.length;let S=x,k;for(;S--;)if(t.events[S][0]===\"exit\"&&t.events[S][1].type===\"chunkFlow\"){k=t.events[S][1].end;break}y(r);let C=x;for(;C<t.events.length;)t.events[C][1].end=Object.assign({},k),C++;return jn(t.events,S+1,0,t.events.slice(x)),t.events.length=C,u(g)}return a(g)}function u(g){if(r===n.length){if(!i)return d(g);if(i.currentConstruct&&i.currentConstruct.concrete)return p(g);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(qC,f,c)(g)}function f(g){return i&&v(),y(r),d(g)}function c(g){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,p(g)}function d(g){return t.containerState={},e.attempt(qC,h,p)(g)}function h(g){return r++,n.push([t.currentConstruct,t.containerState]),d(g)}function p(g){if(g===null){i&&v(),y(0),e.consume(g);return}return i=i||t.parser.flow(t.now()),e.enter(\"chunkFlow\",{contentType:\"flow\",previous:s,_tokenizer:i}),m(g)}function m(g){if(g===null){w(e.exit(\"chunkFlow\"),!0),y(0),e.consume(g);return}return fe(g)?(e.consume(g),w(e.exit(\"chunkFlow\")),r=0,t.interrupt=void 0,a):(e.consume(g),m)}function w(g,x){const S=t.sliceStream(g);if(x&&S.push(null),g.previous=s,s&&(s.next=g),s=g,i.defineSkip(g.start),i.write(S),t.parser.lazy[g.start.line]){let k=i.events.length;for(;k--;)if(i.events[k][1].start.offset<o&&(!i.events[k][1].end||i.events[k][1].end.offset>o))return;const C=t.events.length;let T=C,O,A;for(;T--;)if(t.events[T][0]===\"exit\"&&t.events[T][1].type===\"chunkFlow\"){if(O){A=t.events[T][1].end;break}O=!0}for(y(r),k=C;k<t.events.length;)t.events[k][1].end=Object.assign({},A),k++;jn(t.events,T+1,0,t.events.slice(C)),t.events.length=k}}function y(g){let x=n.length;for(;x-- >g;){const S=n[x];t.containerState=S[1],S[0].exit.call(t,e)}n.length=g}function v(){i.write([null]),s=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Ere(e,t,n){return Ce(e,e.attempt(this.parser.constructs.document,t,n),\"linePrefix\",this.parser.constructs.disable.null.includes(\"codeIndented\")?void 0:4)}function vh(e){if(e===null||Re(e)||Zs(e))return 1;if(Up(e))return 2}function Hp(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const s=e[i].resolveAll;s&&!r.includes(s)&&(t=s(t,n),r.push(s))}return t}const G0={name:\"attention\",tokenize:Tre,resolveAll:Cre};function Cre(e,t){let n=-1,r,i,s,o,a,l,u,f;for(;++n<e.length;)if(e[n][0]===\"enter\"&&e[n][1].type===\"attentionSequence\"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===\"exit\"&&e[r][1].type===\"attentionSequence\"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;l=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const c=Object.assign({},e[r][1].end),d=Object.assign({},e[n][1].start);YC(c,-l),YC(d,l),o={type:l>1?\"strongSequence\":\"emphasisSequence\",start:c,end:Object.assign({},e[r][1].end)},a={type:l>1?\"strongSequence\":\"emphasisSequence\",start:Object.assign({},e[n][1].start),end:d},s={type:l>1?\"strongText\":\"emphasisText\",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},i={type:l>1?\"strong\":\"emphasis\",start:Object.assign({},o.start),end:Object.assign({},a.end)},e[r][1].end=Object.assign({},o.start),e[n][1].start=Object.assign({},a.end),u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=Rn(u,[[\"enter\",e[r][1],t],[\"exit\",e[r][1],t]])),u=Rn(u,[[\"enter\",i,t],[\"enter\",o,t],[\"exit\",o,t],[\"enter\",s,t]]),u=Rn(u,Hp(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=Rn(u,[[\"exit\",s,t],[\"enter\",a,t],[\"exit\",a,t],[\"exit\",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(f=2,u=Rn(u,[[\"enter\",e[n][1],t],[\"exit\",e[n][1],t]])):f=0,jn(e,r-1,n-r+3,u),n=r+u.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type===\"attentionSequence\"&&(e[n][1].type=\"data\");return e}function Tre(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=vh(r);let s;return o;function o(l){return s=l,e.enter(\"attentionSequence\"),a(l)}function a(l){if(l===s)return e.consume(l),a;const u=e.exit(\"attentionSequence\"),f=vh(l),c=!f||f===2&&i||n.includes(l),d=!i||i===2&&f||n.includes(r);return u._open=!!(s===42?c:c&&(i||!d)),u._close=!!(s===42?d:d&&(f||!c)),t(l)}}function YC(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const _re={name:\"autolink\",tokenize:Are};function Are(e,t,n){let r=0;return i;function i(h){return e.enter(\"autolink\"),e.enter(\"autolinkMarker\"),e.consume(h),e.exit(\"autolinkMarker\"),e.enter(\"autolinkProtocol\"),s}function s(h){return $t(h)?(e.consume(h),o):h===64?n(h):u(h)}function o(h){return h===43||h===45||h===46||Nt(h)?(r=1,a(h)):u(h)}function a(h){return h===58?(e.consume(h),r=0,l):(h===43||h===45||h===46||Nt(h))&&r++<32?(e.consume(h),a):(r=0,u(h))}function l(h){return h===62?(e.exit(\"autolinkProtocol\"),e.enter(\"autolinkMarker\"),e.consume(h),e.exit(\"autolinkMarker\"),e.exit(\"autolink\"),t):h===null||h===32||h===60||yh(h)?n(h):(e.consume(h),l)}function u(h){return h===64?(e.consume(h),f):yre(h)?(e.consume(h),u):n(h)}function f(h){return Nt(h)?c(h):n(h)}function c(h){return h===46?(e.consume(h),r=0,f):h===62?(e.exit(\"autolinkProtocol\").type=\"autolinkEmail\",e.enter(\"autolinkMarker\"),e.consume(h),e.exit(\"autolinkMarker\"),e.exit(\"autolink\"),t):d(h)}function d(h){if((h===45||Nt(h))&&r++<63){const p=h===45?d:c;return e.consume(h),p}return n(h)}}const Sc={tokenize:Nre,partial:!0};function Nre(e,t,n){return r;function r(s){return Se(s)?Ce(e,i,\"linePrefix\")(s):i(s)}function i(s){return s===null||fe(s)?t(s):n(s)}}const FD={name:\"blockQuote\",tokenize:Pre,continuation:{tokenize:Ore},exit:Lre};function Pre(e,t,n){const r=this;return i;function i(o){if(o===62){const a=r.containerState;return a.open||(e.enter(\"blockQuote\",{_container:!0}),a.open=!0),e.enter(\"blockQuotePrefix\"),e.enter(\"blockQuoteMarker\"),e.consume(o),e.exit(\"blockQuoteMarker\"),s}return n(o)}function s(o){return Se(o)?(e.enter(\"blockQuotePrefixWhitespace\"),e.consume(o),e.exit(\"blockQuotePrefixWhitespace\"),e.exit(\"blockQuotePrefix\"),t):(e.exit(\"blockQuotePrefix\"),t(o))}}function Ore(e,t,n){const r=this;return i;function i(o){return Se(o)?Ce(e,s,\"linePrefix\",r.parser.constructs.disable.null.includes(\"codeIndented\")?void 0:4)(o):s(o)}function s(o){return e.attempt(FD,t,n)(o)}}function Lre(e){e.exit(\"blockQuote\")}const $D={name:\"characterEscape\",tokenize:Rre};function Rre(e,t,n){return r;function r(s){return e.enter(\"characterEscape\"),e.enter(\"escapeMarker\"),e.consume(s),e.exit(\"escapeMarker\"),i}function i(s){return wre(s)?(e.enter(\"characterEscapeValue\"),e.consume(s),e.exit(\"characterEscapeValue\"),e.exit(\"characterEscape\"),t):n(s)}}const BD={name:\"characterReference\",tokenize:Ire};function Ire(e,t,n){const r=this;let i=0,s,o;return a;function a(c){return e.enter(\"characterReference\"),e.enter(\"characterReferenceMarker\"),e.consume(c),e.exit(\"characterReferenceMarker\"),l}function l(c){return c===35?(e.enter(\"characterReferenceMarkerNumeric\"),e.consume(c),e.exit(\"characterReferenceMarkerNumeric\"),u):(e.enter(\"characterReferenceValue\"),s=31,o=Nt,f(c))}function u(c){return c===88||c===120?(e.enter(\"characterReferenceMarkerHexadecimal\"),e.consume(c),e.exit(\"characterReferenceMarkerHexadecimal\"),e.enter(\"characterReferenceValue\"),s=6,o=vre,f):(e.enter(\"characterReferenceValue\"),s=7,o=Y0,f(c))}function f(c){if(c===59&&i){const d=e.exit(\"characterReferenceValue\");return o===Nt&&!Xx(r.sliceSerialize(d))?n(c):(e.enter(\"characterReferenceMarker\"),e.consume(c),e.exit(\"characterReferenceMarker\"),e.exit(\"characterReference\"),t)}return o(c)&&i++<s?(e.consume(c),f):n(c)}}const GC={tokenize:Mre,partial:!0},XC={name:\"codeFenced\",tokenize:Dre,concrete:!0};function Dre(e,t,n){const r=this,i={tokenize:S,partial:!0};let s=0,o=0,a;return l;function l(k){return u(k)}function u(k){const C=r.events[r.events.length-1];return s=C&&C[1].type===\"linePrefix\"?C[2].sliceSerialize(C[1],!0).length:0,a=k,e.enter(\"codeFenced\"),e.enter(\"codeFencedFence\"),e.enter(\"codeFencedFenceSequence\"),f(k)}function f(k){return k===a?(o++,e.consume(k),f):o<3?n(k):(e.exit(\"codeFencedFenceSequence\"),Se(k)?Ce(e,c,\"whitespace\")(k):c(k))}function c(k){return k===null||fe(k)?(e.exit(\"codeFencedFence\"),r.interrupt?t(k):e.check(GC,m,x)(k)):(e.enter(\"codeFencedFenceInfo\"),e.enter(\"chunkString\",{contentType:\"string\"}),d(k))}function d(k){return k===null||fe(k)?(e.exit(\"chunkString\"),e.exit(\"codeFencedFenceInfo\"),c(k)):Se(k)?(e.exit(\"chunkString\"),e.exit(\"codeFencedFenceInfo\"),Ce(e,h,\"whitespace\")(k)):k===96&&k===a?n(k):(e.consume(k),d)}function h(k){return k===null||fe(k)?c(k):(e.enter(\"codeFencedFenceMeta\"),e.enter(\"chunkString\",{contentType:\"string\"}),p(k))}function p(k){return k===null||fe(k)?(e.exit(\"chunkString\"),e.exit(\"codeFencedFenceMeta\"),c(k)):k===96&&k===a?n(k):(e.consume(k),p)}function m(k){return e.attempt(i,x,w)(k)}function w(k){return e.enter(\"lineEnding\"),e.consume(k),e.exit(\"lineEnding\"),y}function y(k){return s>0&&Se(k)?Ce(e,v,\"linePrefix\",s+1)(k):v(k)}function v(k){return k===null||fe(k)?e.check(GC,m,x)(k):(e.enter(\"codeFlowValue\"),g(k))}function g(k){return k===null||fe(k)?(e.exit(\"codeFlowValue\"),v(k)):(e.consume(k),g)}function x(k){return e.exit(\"codeFenced\"),t(k)}function S(k,C,T){let O=0;return A;function A(M){return k.enter(\"lineEnding\"),k.consume(M),k.exit(\"lineEnding\"),j}function j(M){return k.enter(\"codeFencedFence\"),Se(M)?Ce(k,L,\"linePrefix\",r.parser.constructs.disable.null.includes(\"codeIndented\")?void 0:4)(M):L(M)}function L(M){return M===a?(k.enter(\"codeFencedFenceSequence\"),B(M)):T(M)}function B(M){return M===a?(O++,k.consume(M),B):O>=o?(k.exit(\"codeFencedFenceSequence\"),Se(M)?Ce(k,N,\"whitespace\")(M):N(M)):T(M)}function N(M){return M===null||fe(M)?(k.exit(\"codeFencedFence\"),C(M)):T(M)}}}function Mre(e,t,n){const r=this;return i;function i(o){return o===null?n(o):(e.enter(\"lineEnding\"),e.consume(o),e.exit(\"lineEnding\"),s)}function s(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}const kg={name:\"codeIndented\",tokenize:Fre},jre={tokenize:$re,partial:!0};function Fre(e,t,n){const r=this;return i;function i(u){return e.enter(\"codeIndented\"),Ce(e,s,\"linePrefix\",5)(u)}function s(u){const f=r.events[r.events.length-1];return f&&f[1].type===\"linePrefix\"&&f[2].sliceSerialize(f[1],!0).length>=4?o(u):n(u)}function o(u){return u===null?l(u):fe(u)?e.attempt(jre,o,l)(u):(e.enter(\"codeFlowValue\"),a(u))}function a(u){return u===null||fe(u)?(e.exit(\"codeFlowValue\"),o(u)):(e.consume(u),a)}function l(u){return e.exit(\"codeIndented\"),t(u)}}function $re(e,t,n){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):fe(o)?(e.enter(\"lineEnding\"),e.consume(o),e.exit(\"lineEnding\"),i):Ce(e,s,\"linePrefix\",5)(o)}function s(o){const a=r.events[r.events.length-1];return a&&a[1].type===\"linePrefix\"&&a[2].sliceSerialize(a[1],!0).length>=4?t(o):fe(o)?i(o):n(o)}}const Bre={name:\"codeText\",tokenize:Ure,resolve:Vre,previous:zre};function Vre(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===\"lineEnding\"||e[n][1].type===\"space\")&&(e[t][1].type===\"lineEnding\"||e[t][1].type===\"space\")){for(r=n;++r<t;)if(e[r][1].type===\"codeTextData\"){e[n][1].type=\"codeTextPadding\",e[t][1].type=\"codeTextPadding\",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==\"lineEnding\"&&(i=r):(r===t||e[r][1].type===\"lineEnding\")&&(e[i][1].type=\"codeTextData\",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function zre(e){return e!==96||this.events[this.events.length-1][1].type===\"characterEscape\"}function Ure(e,t,n){let r=0,i,s;return o;function o(c){return e.enter(\"codeText\"),e.enter(\"codeTextSequence\"),a(c)}function a(c){return c===96?(e.consume(c),r++,a):(e.exit(\"codeTextSequence\"),l(c))}function l(c){return c===null?n(c):c===32?(e.enter(\"space\"),e.consume(c),e.exit(\"space\"),l):c===96?(s=e.enter(\"codeTextSequence\"),i=0,f(c)):fe(c)?(e.enter(\"lineEnding\"),e.consume(c),e.exit(\"lineEnding\"),l):(e.enter(\"codeTextData\"),u(c))}function u(c){return c===null||c===32||c===96||fe(c)?(e.exit(\"codeTextData\"),l(c)):(e.consume(c),u)}function f(c){return c===96?(e.consume(c),i++,f):i===r?(e.exit(\"codeTextSequence\"),e.exit(\"codeText\"),t(c)):(s.type=\"codeTextData\",u(c))}}class Hre{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError(\"Cannot access index `\"+t+\"` in a splice buffer of size `\"+(this.left.length+this.right.length)+\"`\");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const s=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&bl(this.left,r),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),bl(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),bl(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);bl(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);bl(this.left,n.reverse())}}}function bl(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function VD(e){const t={};let n=-1,r,i,s,o,a,l,u;const f=new Hre(e);for(;++n<f.length;){for(;n in t;)n=t[n];if(r=f.get(n),n&&r[1].type===\"chunkFlow\"&&f.get(n-1)[1].type===\"listItemPrefix\"&&(l=r[1]._tokenizer.events,s=0,s<l.length&&l[s][1].type===\"lineEndingBlank\"&&(s+=2),s<l.length&&l[s][1].type===\"content\"))for(;++s<l.length&&l[s][1].type!==\"content\";)l[s][1].type===\"chunkText\"&&(l[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]===\"enter\")r[1].contentType&&(Object.assign(t,Wre(f,n)),n=t[n],u=!0);else if(r[1]._container){for(s=n,i=void 0;s--&&(o=f.get(s),o[1].type===\"lineEnding\"||o[1].type===\"lineEndingBlank\");)o[0]===\"enter\"&&(i&&(f.get(i)[1].type=\"lineEndingBlank\"),o[1].type=\"lineEnding\",i=s);i&&(r[1].end=Object.assign({},f.get(i)[1].start),a=f.slice(i,n),a.unshift(r),f.splice(i,n-i+1,a))}}return jn(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!u}function Wre(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const s=[],o=n._tokenizer||r.parser[n.contentType](n.start),a=o.events,l=[],u={};let f,c,d=-1,h=n,p=0,m=0;const w=[m];for(;h;){for(;e.get(++i)[1]!==h;);s.push(i),h._tokenizer||(f=r.sliceStream(h),h.next||f.push(null),c&&o.defineSkip(h.start),h._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(f),h._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),c=h,h=h.next}for(h=n;++d<a.length;)a[d][0]===\"exit\"&&a[d-1][0]===\"enter\"&&a[d][1].type===a[d-1][1].type&&a[d][1].start.line!==a[d][1].end.line&&(m=d+1,w.push(m),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(o.events=[],h?(h._tokenizer=void 0,h.previous=void 0):w.pop(),d=w.length;d--;){const y=a.slice(w[d],w[d+1]),v=s.pop();l.push([v,v+y.length-1]),e.splice(v,2,y)}for(l.reverse(),d=-1;++d<l.length;)u[p+l[d][0]]=p+l[d][1],p+=l[d][1]-l[d][0]-1;return u}const Kre={tokenize:Gre,resolve:Yre},qre={tokenize:Xre,partial:!0};function Yre(e){return VD(e),e}function Gre(e,t){let n;return r;function r(a){return e.enter(\"content\"),n=e.enter(\"chunkContent\",{contentType:\"content\"}),i(a)}function i(a){return a===null?s(a):fe(a)?e.check(qre,o,s)(a):(e.consume(a),i)}function s(a){return e.exit(\"chunkContent\"),e.exit(\"content\"),t(a)}function o(a){return e.consume(a),e.exit(\"chunkContent\"),n.next=e.enter(\"chunkContent\",{contentType:\"content\",previous:n}),n=n.next,i}}function Xre(e,t,n){const r=this;return i;function i(o){return e.exit(\"chunkContent\"),e.enter(\"lineEnding\"),e.consume(o),e.exit(\"lineEnding\"),Ce(e,s,\"linePrefix\")}function s(o){if(o===null||fe(o))return n(o);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(\"codeIndented\")&&a&&a[1].type===\"linePrefix\"&&a[2].sliceSerialize(a[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}function zD(e,t,n,r,i,s,o,a,l){const u=l||Number.POSITIVE_INFINITY;let f=0;return c;function c(y){return y===60?(e.enter(r),e.enter(i),e.enter(s),e.consume(y),e.exit(s),d):y===null||y===32||y===41||yh(y)?n(y):(e.enter(r),e.enter(o),e.enter(a),e.enter(\"chunkString\",{contentType:\"string\"}),m(y))}function d(y){return y===62?(e.enter(s),e.consume(y),e.exit(s),e.exit(i),e.exit(r),t):(e.enter(a),e.enter(\"chunkString\",{contentType:\"string\"}),h(y))}function h(y){return y===62?(e.exit(\"chunkString\"),e.exit(a),d(y)):y===null||y===60||fe(y)?n(y):(e.consume(y),y===92?p:h)}function p(y){return y===60||y===62||y===92?(e.consume(y),h):h(y)}function m(y){return!f&&(y===null||y===41||Re(y))?(e.exit(\"chunkString\"),e.exit(a),e.exit(o),e.exit(r),t(y)):f<u&&y===40?(e.consume(y),f++,m):y===41?(e.consume(y),f--,m):y===null||y===32||y===40||yh(y)?n(y):(e.consume(y),y===92?w:m)}function w(y){return y===40||y===41||y===92?(e.consume(y),m):m(y)}}function UD(e,t,n,r,i,s){const o=this;let a=0,l;return u;function u(h){return e.enter(r),e.enter(i),e.consume(h),e.exit(i),e.enter(s),f}function f(h){return a>999||h===null||h===91||h===93&&!l||h===94&&!a&&\"_hiddenFootnoteSupport\"in o.parser.constructs?n(h):h===93?(e.exit(s),e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):fe(h)?(e.enter(\"lineEnding\"),e.consume(h),e.exit(\"lineEnding\"),f):(e.enter(\"chunkString\",{contentType:\"string\"}),c(h))}function c(h){return h===null||h===91||h===93||fe(h)||a++>999?(e.exit(\"chunkString\"),f(h)):(e.consume(h),l||(l=!Se(h)),h===92?d:c)}function d(h){return h===91||h===92||h===93?(e.consume(h),a++,c):c(h)}}function HD(e,t,n,r,i,s){let o;return a;function a(d){return d===34||d===39||d===40?(e.enter(r),e.enter(i),e.consume(d),e.exit(i),o=d===40?41:d,l):n(d)}function l(d){return d===o?(e.enter(i),e.consume(d),e.exit(i),e.exit(r),t):(e.enter(s),u(d))}function u(d){return d===o?(e.exit(s),l(o)):d===null?n(d):fe(d)?(e.enter(\"lineEnding\"),e.consume(d),e.exit(\"lineEnding\"),Ce(e,u,\"linePrefix\")):(e.enter(\"chunkString\",{contentType:\"string\"}),f(d))}function f(d){return d===o||d===null||fe(d)?(e.exit(\"chunkString\"),u(d)):(e.consume(d),d===92?c:f)}function c(d){return d===o||d===92?(e.consume(d),f):f(d)}}function iu(e,t){let n;return r;function r(i){return fe(i)?(e.enter(\"lineEnding\"),e.consume(i),e.exit(\"lineEnding\"),n=!0,r):Se(i)?Ce(e,r,n?\"linePrefix\":\"lineSuffix\")(i):t(i)}}const Qre={name:\"definition\",tokenize:Jre},Zre={tokenize:eie,partial:!0};function Jre(e,t,n){const r=this;let i;return s;function s(h){return e.enter(\"definition\"),o(h)}function o(h){return UD.call(r,e,a,n,\"definitionLabel\",\"definitionLabelMarker\",\"definitionLabelString\")(h)}function a(h){return i=sr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter(\"definitionMarker\"),e.consume(h),e.exit(\"definitionMarker\"),l):n(h)}function l(h){return Re(h)?iu(e,u)(h):u(h)}function u(h){return zD(e,f,n,\"definitionDestination\",\"definitionDestinationLiteral\",\"definitionDestinationLiteralMarker\",\"definitionDestinationRaw\",\"definitionDestinationString\")(h)}function f(h){return e.attempt(Zre,c,c)(h)}function c(h){return Se(h)?Ce(e,d,\"whitespace\")(h):d(h)}function d(h){return h===null||fe(h)?(e.exit(\"definition\"),r.parser.defined.push(i),t(h)):n(h)}}function eie(e,t,n){return r;function r(a){return Re(a)?iu(e,i)(a):n(a)}function i(a){return HD(e,s,n,\"definitionTitle\",\"definitionTitleMarker\",\"definitionTitleString\")(a)}function s(a){return Se(a)?Ce(e,o,\"whitespace\")(a):o(a)}function o(a){return a===null||fe(a)?t(a):n(a)}}const tie={name:\"hardBreakEscape\",tokenize:nie};function nie(e,t,n){return r;function r(s){return e.enter(\"hardBreakEscape\"),e.consume(s),i}function i(s){return fe(s)?(e.exit(\"hardBreakEscape\"),t(s)):n(s)}}const rie={name:\"headingAtx\",tokenize:sie,resolve:iie};function iie(e,t){let n=e.length-2,r=3,i,s;return e[r][1].type===\"whitespace\"&&(r+=2),n-2>r&&e[n][1].type===\"whitespace\"&&(n-=2),e[n][1].type===\"atxHeadingSequence\"&&(r===n-1||n-4>r&&e[n-2][1].type===\"whitespace\")&&(n-=r+1===n?2:4),n>r&&(i={type:\"atxHeadingText\",start:e[r][1].start,end:e[n][1].end},s={type:\"chunkText\",start:e[r][1].start,end:e[n][1].end,contentType:\"text\"},jn(e,r,n-r+1,[[\"enter\",i,t],[\"enter\",s,t],[\"exit\",s,t],[\"exit\",i,t]])),e}function sie(e,t,n){let r=0;return i;function i(f){return e.enter(\"atxHeading\"),s(f)}function s(f){return e.enter(\"atxHeadingSequence\"),o(f)}function o(f){return f===35&&r++<6?(e.consume(f),o):f===null||Re(f)?(e.exit(\"atxHeadingSequence\"),a(f)):n(f)}function a(f){return f===35?(e.enter(\"atxHeadingSequence\"),l(f)):f===null||fe(f)?(e.exit(\"atxHeading\"),t(f)):Se(f)?Ce(e,a,\"whitespace\")(f):(e.enter(\"atxHeadingText\"),u(f))}function l(f){return f===35?(e.consume(f),l):(e.exit(\"atxHeadingSequence\"),a(f))}function u(f){return f===null||f===35||Re(f)?(e.exit(\"atxHeadingText\"),a(f)):(e.consume(f),u)}}const oie=[\"address\",\"article\",\"aside\",\"base\",\"basefont\",\"blockquote\",\"body\",\"caption\",\"center\",\"col\",\"colgroup\",\"dd\",\"details\",\"dialog\",\"dir\",\"div\",\"dl\",\"dt\",\"fieldset\",\"figcaption\",\"figure\",\"footer\",\"form\",\"frame\",\"frameset\",\"h1\",\"h2\",\"h3\",\"h4\",\"h5\",\"h6\",\"head\",\"header\",\"hr\",\"html\",\"iframe\",\"legend\",\"li\",\"link\",\"main\",\"menu\",\"menuitem\",\"nav\",\"noframes\",\"ol\",\"optgroup\",\"option\",\"p\",\"param\",\"search\",\"section\",\"summary\",\"table\",\"tbody\",\"td\",\"tfoot\",\"th\",\"thead\",\"title\",\"tr\",\"track\",\"ul\"],QC=[\"pre\",\"script\",\"style\",\"textarea\"],aie={name:\"htmlFlow\",tokenize:fie,resolveTo:cie,concrete:!0},lie={tokenize:hie,partial:!0},uie={tokenize:die,partial:!0};function cie(e){let t=e.length;for(;t--&&!(e[t][0]===\"enter\"&&e[t][1].type===\"htmlFlow\"););return t>1&&e[t-2][1].type===\"linePrefix\"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function fie(e,t,n){const r=this;let i,s,o,a,l;return u;function u(R){return f(R)}function f(R){return e.enter(\"htmlFlow\"),e.enter(\"htmlFlowData\"),e.consume(R),c}function c(R){return R===33?(e.consume(R),d):R===47?(e.consume(R),s=!0,m):R===63?(e.consume(R),i=3,r.interrupt?t:_):$t(R)?(e.consume(R),o=String.fromCharCode(R),w):n(R)}function d(R){return R===45?(e.consume(R),i=2,h):R===91?(e.consume(R),i=5,a=0,p):$t(R)?(e.consume(R),i=4,r.interrupt?t:_):n(R)}function h(R){return R===45?(e.consume(R),r.interrupt?t:_):n(R)}function p(R){const q=\"CDATA[\";return R===q.charCodeAt(a++)?(e.consume(R),a===q.length?r.interrupt?t:L:p):n(R)}function m(R){return $t(R)?(e.consume(R),o=String.fromCharCode(R),w):n(R)}function w(R){if(R===null||R===47||R===62||Re(R)){const q=R===47,J=o.toLowerCase();return!q&&!s&&QC.includes(J)?(i=1,r.interrupt?t(R):L(R)):oie.includes(o.toLowerCase())?(i=6,q?(e.consume(R),y):r.interrupt?t(R):L(R)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(R):s?v(R):g(R))}return R===45||Nt(R)?(e.consume(R),o+=String.fromCharCode(R),w):n(R)}function y(R){return R===62?(e.consume(R),r.interrupt?t:L):n(R)}function v(R){return Se(R)?(e.consume(R),v):A(R)}function g(R){return R===47?(e.consume(R),A):R===58||R===95||$t(R)?(e.consume(R),x):Se(R)?(e.consume(R),g):A(R)}function x(R){return R===45||R===46||R===58||R===95||Nt(R)?(e.consume(R),x):S(R)}function S(R){return R===61?(e.consume(R),k):Se(R)?(e.consume(R),S):g(R)}function k(R){return R===null||R===60||R===61||R===62||R===96?n(R):R===34||R===39?(e.consume(R),l=R,C):Se(R)?(e.consume(R),k):T(R)}function C(R){return R===l?(e.consume(R),l=null,O):R===null||fe(R)?n(R):(e.consume(R),C)}function T(R){return R===null||R===34||R===39||R===47||R===60||R===61||R===62||R===96||Re(R)?S(R):(e.consume(R),T)}function O(R){return R===47||R===62||Se(R)?g(R):n(R)}function A(R){return R===62?(e.consume(R),j):n(R)}function j(R){return R===null||fe(R)?L(R):Se(R)?(e.consume(R),j):n(R)}function L(R){return R===45&&i===2?(e.consume(R),I):R===60&&i===1?(e.consume(R),F):R===62&&i===4?(e.consume(R),V):R===63&&i===3?(e.consume(R),_):R===93&&i===5?(e.consume(R),D):fe(R)&&(i===6||i===7)?(e.exit(\"htmlFlowData\"),e.check(lie,W,B)(R)):R===null||fe(R)?(e.exit(\"htmlFlowData\"),B(R)):(e.consume(R),L)}function B(R){return e.check(uie,N,W)(R)}function N(R){return e.enter(\"lineEnding\"),e.consume(R),e.exit(\"lineEnding\"),M}function M(R){return R===null||fe(R)?B(R):(e.enter(\"htmlFlowData\"),L(R))}function I(R){return R===45?(e.consume(R),_):L(R)}function F(R){return R===47?(e.consume(R),o=\"\",P):L(R)}function P(R){if(R===62){const q=o.toLowerCase();return QC.includes(q)?(e.consume(R),V):L(R)}return $t(R)&&o.length<8?(e.consume(R),o+=String.fromCharCode(R),P):L(R)}function D(R){return R===93?(e.consume(R),_):L(R)}function _(R){return R===62?(e.consume(R),V):R===45&&i===2?(e.consume(R),_):L(R)}function V(R){return R===null||fe(R)?(e.exit(\"htmlFlowData\"),W(R)):(e.consume(R),V)}function W(R){return e.exit(\"htmlFlow\"),t(R)}}function die(e,t,n){const r=this;return i;function i(o){return fe(o)?(e.enter(\"lineEnding\"),e.consume(o),e.exit(\"lineEnding\"),s):n(o)}function s(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}function hie(e,t,n){return r;function r(i){return e.enter(\"lineEnding\"),e.consume(i),e.exit(\"lineEnding\"),e.attempt(Sc,t,n)}}const pie={name:\"htmlText\",tokenize:mie};function mie(e,t,n){const r=this;let i,s,o;return a;function a(_){return e.enter(\"htmlText\"),e.enter(\"htmlTextData\"),e.consume(_),l}function l(_){return _===33?(e.consume(_),u):_===47?(e.consume(_),S):_===63?(e.consume(_),g):$t(_)?(e.consume(_),T):n(_)}function u(_){return _===45?(e.consume(_),f):_===91?(e.consume(_),s=0,p):$t(_)?(e.consume(_),v):n(_)}function f(_){return _===45?(e.consume(_),h):n(_)}function c(_){return _===null?n(_):_===45?(e.consume(_),d):fe(_)?(o=c,F(_)):(e.consume(_),c)}function d(_){return _===45?(e.consume(_),h):c(_)}function h(_){return _===62?I(_):_===45?d(_):c(_)}function p(_){const V=\"CDATA[\";return _===V.charCodeAt(s++)?(e.consume(_),s===V.length?m:p):n(_)}function m(_){return _===null?n(_):_===93?(e.consume(_),w):fe(_)?(o=m,F(_)):(e.consume(_),m)}function w(_){return _===93?(e.consume(_),y):m(_)}function y(_){return _===62?I(_):_===93?(e.consume(_),y):m(_)}function v(_){return _===null||_===62?I(_):fe(_)?(o=v,F(_)):(e.consume(_),v)}function g(_){return _===null?n(_):_===63?(e.consume(_),x):fe(_)?(o=g,F(_)):(e.consume(_),g)}function x(_){return _===62?I(_):g(_)}function S(_){return $t(_)?(e.consume(_),k):n(_)}function k(_){return _===45||Nt(_)?(e.consume(_),k):C(_)}function C(_){return fe(_)?(o=C,F(_)):Se(_)?(e.consume(_),C):I(_)}function T(_){return _===45||Nt(_)?(e.consume(_),T):_===47||_===62||Re(_)?O(_):n(_)}function O(_){return _===47?(e.consume(_),I):_===58||_===95||$t(_)?(e.consume(_),A):fe(_)?(o=O,F(_)):Se(_)?(e.consume(_),O):I(_)}function A(_){return _===45||_===46||_===58||_===95||Nt(_)?(e.consume(_),A):j(_)}function j(_){return _===61?(e.consume(_),L):fe(_)?(o=j,F(_)):Se(_)?(e.consume(_),j):O(_)}function L(_){return _===null||_===60||_===61||_===62||_===96?n(_):_===34||_===39?(e.consume(_),i=_,B):fe(_)?(o=L,F(_)):Se(_)?(e.consume(_),L):(e.consume(_),N)}function B(_){return _===i?(e.consume(_),i=void 0,M):_===null?n(_):fe(_)?(o=B,F(_)):(e.consume(_),B)}function N(_){return _===null||_===34||_===39||_===60||_===61||_===96?n(_):_===47||_===62||Re(_)?O(_):(e.consume(_),N)}function M(_){return _===47||_===62||Re(_)?O(_):n(_)}function I(_){return _===62?(e.consume(_),e.exit(\"htmlTextData\"),e.exit(\"htmlText\"),t):n(_)}function F(_){return e.exit(\"htmlTextData\"),e.enter(\"lineEnding\"),e.consume(_),e.exit(\"lineEnding\"),P}function P(_){return Se(_)?Ce(e,D,\"linePrefix\",r.parser.constructs.disable.null.includes(\"codeIndented\")?void 0:4)(_):D(_)}function D(_){return e.enter(\"htmlTextData\"),o(_)}}const Qx={name:\"labelEnd\",tokenize:bie,resolveTo:xie,resolveAll:wie},gie={tokenize:Sie},yie={tokenize:kie},vie={tokenize:Eie};function wie(e){let t=-1;for(;++t<e.length;){const n=e[t][1];(n.type===\"labelImage\"||n.type===\"labelLink\"||n.type===\"labelEnd\")&&(e.splice(t+1,n.type===\"labelImage\"?4:2),n.type=\"data\",t++)}return e}function xie(e,t){let n=e.length,r=0,i,s,o,a;for(;n--;)if(i=e[n][1],s){if(i.type===\"link\"||i.type===\"labelLink\"&&i._inactive)break;e[n][0]===\"enter\"&&i.type===\"labelLink\"&&(i._inactive=!0)}else if(o){if(e[n][0]===\"enter\"&&(i.type===\"labelImage\"||i.type===\"labelLink\")&&!i._balanced&&(s=n,i.type!==\"labelLink\")){r=2;break}}else i.type===\"labelEnd\"&&(o=n);const l={type:e[s][1].type===\"labelLink\"?\"link\":\"image\",start:Object.assign({},e[s][1].start),end:Object.assign({},e[e.length-1][1].end)},u={type:\"label\",start:Object.assign({},e[s][1].start),end:Object.assign({},e[o][1].end)},f={type:\"labelText\",start:Object.assign({},e[s+r+2][1].end),end:Object.assign({},e[o-2][1].start)};return a=[[\"enter\",l,t],[\"enter\",u,t]],a=Rn(a,e.slice(s+1,s+r+3)),a=Rn(a,[[\"enter\",f,t]]),a=Rn(a,Hp(t.parser.constructs.insideSpan.null,e.slice(s+r+4,o-3),t)),a=Rn(a,[[\"exit\",f,t],e[o-2],e[o-1],[\"exit\",u,t]]),a=Rn(a,e.slice(o+1)),a=Rn(a,[[\"exit\",l,t]]),jn(e,s,e.length,a),e}function bie(e,t,n){const r=this;let i=r.events.length,s,o;for(;i--;)if((r.events[i][1].type===\"labelImage\"||r.events[i][1].type===\"labelLink\")&&!r.events[i][1]._balanced){s=r.events[i][1];break}return a;function a(d){return s?s._inactive?c(d):(o=r.parser.defined.includes(sr(r.sliceSerialize({start:s.end,end:r.now()}))),e.enter(\"labelEnd\"),e.enter(\"labelMarker\"),e.consume(d),e.exit(\"labelMarker\"),e.exit(\"labelEnd\"),l):n(d)}function l(d){return d===40?e.attempt(gie,f,o?f:c)(d):d===91?e.attempt(yie,f,o?u:c)(d):o?f(d):c(d)}function u(d){return e.attempt(vie,f,c)(d)}function f(d){return t(d)}function c(d){return s._balanced=!0,n(d)}}function Sie(e,t,n){return r;function r(c){return e.enter(\"resource\"),e.enter(\"resourceMarker\"),e.consume(c),e.exit(\"resourceMarker\"),i}function i(c){return Re(c)?iu(e,s)(c):s(c)}function s(c){return c===41?f(c):zD(e,o,a,\"resourceDestination\",\"resourceDestinationLiteral\",\"resourceDestinationLiteralMarker\",\"resourceDestinationRaw\",\"resourceDestinationString\",32)(c)}function o(c){return Re(c)?iu(e,l)(c):f(c)}function a(c){return n(c)}function l(c){return c===34||c===39||c===40?HD(e,u,n,\"resourceTitle\",\"resourceTitleMarker\",\"resourceTitleString\")(c):f(c)}function u(c){return Re(c)?iu(e,f)(c):f(c)}function f(c){return c===41?(e.enter(\"resourceMarker\"),e.consume(c),e.exit(\"resourceMarker\"),e.exit(\"resource\"),t):n(c)}}function kie(e,t,n){const r=this;return i;function i(a){return UD.call(r,e,s,o,\"reference\",\"referenceMarker\",\"referenceString\")(a)}function s(a){return r.parser.defined.includes(sr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(a):n(a)}function o(a){return n(a)}}function Eie(e,t,n){return r;function r(s){return e.enter(\"reference\"),e.enter(\"referenceMarker\"),e.consume(s),e.exit(\"referenceMarker\"),i}function i(s){return s===93?(e.enter(\"referenceMarker\"),e.consume(s),e.exit(\"referenceMarker\"),e.exit(\"reference\"),t):n(s)}}const Cie={name:\"labelStartImage\",tokenize:Tie,resolveAll:Qx.resolveAll};function Tie(e,t,n){const r=this;return i;function i(a){return e.enter(\"labelImage\"),e.enter(\"labelImageMarker\"),e.consume(a),e.exit(\"labelImageMarker\"),s}function s(a){return a===91?(e.enter(\"labelMarker\"),e.consume(a),e.exit(\"labelMarker\"),e.exit(\"labelImage\"),o):n(a)}function o(a){return a===94&&\"_hiddenFootnoteSupport\"in r.parser.constructs?n(a):t(a)}}const _ie={name:\"labelStartLink\",tokenize:Aie,resolveAll:Qx.resolveAll};function Aie(e,t,n){const r=this;return i;function i(o){return e.enter(\"labelLink\"),e.enter(\"labelMarker\"),e.consume(o),e.exit(\"labelMarker\"),e.exit(\"labelLink\"),s}function s(o){return o===94&&\"_hiddenFootnoteSupport\"in r.parser.constructs?n(o):t(o)}}const Eg={name:\"lineEnding\",tokenize:Nie};function Nie(e,t){return n;function n(r){return e.enter(\"lineEnding\"),e.consume(r),e.exit(\"lineEnding\"),Ce(e,t,\"linePrefix\")}}const sd={name:\"thematicBreak\",tokenize:Pie};function Pie(e,t,n){let r=0,i;return s;function s(u){return e.enter(\"thematicBreak\"),o(u)}function o(u){return i=u,a(u)}function a(u){return u===i?(e.enter(\"thematicBreakSequence\"),l(u)):r>=3&&(u===null||fe(u))?(e.exit(\"thematicBreak\"),t(u)):n(u)}function l(u){return u===i?(e.consume(u),r++,l):(e.exit(\"thematicBreakSequence\"),Se(u)?Ce(e,a,\"whitespace\")(u):a(u))}}const qt={name:\"list\",tokenize:Rie,continuation:{tokenize:Iie},exit:Mie},Oie={tokenize:jie,partial:!0},Lie={tokenize:Die,partial:!0};function Rie(e,t,n){const r=this,i=r.events[r.events.length-1];let s=i&&i[1].type===\"linePrefix\"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return a;function a(h){const p=r.containerState.type||(h===42||h===43||h===45?\"listUnordered\":\"listOrdered\");if(p===\"listUnordered\"?!r.containerState.marker||h===r.containerState.marker:Y0(h)){if(r.containerState.type||(r.containerState.type=p,e.enter(p,{_container:!0})),p===\"listUnordered\")return e.enter(\"listItemPrefix\"),h===42||h===45?e.check(sd,n,u)(h):u(h);if(!r.interrupt||h===49)return e.enter(\"listItemPrefix\"),e.enter(\"listItemValue\"),l(h)}return n(h)}function l(h){return Y0(h)&&++o<10?(e.consume(h),l):(!r.interrupt||o<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit(\"listItemValue\"),u(h)):n(h)}function u(h){return e.enter(\"listItemMarker\"),e.consume(h),e.exit(\"listItemMarker\"),r.containerState.marker=r.containerState.marker||h,e.check(Sc,r.interrupt?n:f,e.attempt(Oie,d,c))}function f(h){return r.containerState.initialBlankLine=!0,s++,d(h)}function c(h){return Se(h)?(e.enter(\"listItemPrefixWhitespace\"),e.consume(h),e.exit(\"listItemPrefixWhitespace\"),d):n(h)}function d(h){return r.containerState.size=s+r.sliceSerialize(e.exit(\"listItemPrefix\"),!0).length,t(h)}}function Iie(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Sc,i,s);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ce(e,t,\"listItemIndent\",r.containerState.size+1)(a)}function s(a){return r.containerState.furtherBlankLines||!Se(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Lie,t,o)(a))}function o(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ce(e,e.attempt(qt,t,n),\"linePrefix\",r.parser.constructs.disable.null.includes(\"codeIndented\")?void 0:4)(a)}}function Die(e,t,n){const r=this;return Ce(e,i,\"listItemIndent\",r.containerState.size+1);function i(s){const o=r.events[r.events.length-1];return o&&o[1].type===\"listItemIndent\"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(s):n(s)}}function Mie(e){e.exit(this.containerState.type)}function jie(e,t,n){const r=this;return Ce(e,i,\"listItemPrefixWhitespace\",r.parser.constructs.disable.null.includes(\"codeIndented\")?void 0:5);function i(s){const o=r.events[r.events.length-1];return!Se(s)&&o&&o[1].type===\"listItemPrefixWhitespace\"?t(s):n(s)}}const ZC={name:\"setextUnderline\",tokenize:$ie,resolveTo:Fie};function Fie(e,t){let n=e.length,r,i,s;for(;n--;)if(e[n][0]===\"enter\"){if(e[n][1].type===\"content\"){r=n;break}e[n][1].type===\"paragraph\"&&(i=n)}else e[n][1].type===\"content\"&&e.splice(n,1),!s&&e[n][1].type===\"definition\"&&(s=n);const o={type:\"setextHeading\",start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[i][1].type=\"setextHeadingText\",s?(e.splice(i,0,[\"enter\",o,t]),e.splice(s+1,0,[\"exit\",e[r][1],t]),e[r][1].end=Object.assign({},e[s][1].end)):e[r][1]=o,e.push([\"exit\",o,t]),e}function $ie(e,t,n){const r=this;let i;return s;function s(u){let f=r.events.length,c;for(;f--;)if(r.events[f][1].type!==\"lineEnding\"&&r.events[f][1].type!==\"linePrefix\"&&r.events[f][1].type!==\"content\"){c=r.events[f][1].type===\"paragraph\";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||c)?(e.enter(\"setextHeadingLine\"),i=u,o(u)):n(u)}function o(u){return e.enter(\"setextHeadingLineSequence\"),a(u)}function a(u){return u===i?(e.consume(u),a):(e.exit(\"setextHeadingLineSequence\"),Se(u)?Ce(e,l,\"lineSuffix\")(u):l(u))}function l(u){return u===null||fe(u)?(e.exit(\"setextHeadingLine\"),t(u)):n(u)}}const Bie={tokenize:Vie};function Vie(e){const t=this,n=e.attempt(Sc,r,e.attempt(this.parser.constructs.flowInitial,i,Ce(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Kre,i)),\"linePrefix\")));return n;function r(s){if(s===null){e.consume(s);return}return e.enter(\"lineEndingBlank\"),e.consume(s),e.exit(\"lineEndingBlank\"),t.currentConstruct=void 0,n}function i(s){if(s===null){e.consume(s);return}return e.enter(\"lineEnding\"),e.consume(s),e.exit(\"lineEnding\"),t.currentConstruct=void 0,n}}const zie={resolveAll:KD()},Uie=WD(\"string\"),Hie=WD(\"text\");function WD(e){return{tokenize:t,resolveAll:KD(e===\"text\"?Wie:void 0)};function t(n){const r=this,i=this.parser.constructs[e],s=n.attempt(i,o,a);return o;function o(f){return u(f)?s(f):a(f)}function a(f){if(f===null){n.consume(f);return}return n.enter(\"data\"),n.consume(f),l}function l(f){return u(f)?(n.exit(\"data\"),s(f)):(n.consume(f),l)}function u(f){if(f===null)return!0;const c=i[f];let d=-1;if(c)for(;++d<c.length;){const h=c[d];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function KD(e){return t;function t(n,r){let i=-1,s;for(;++i<=n.length;)s===void 0?n[i]&&n[i][1].type===\"data\"&&(s=i,i++):(!n[i]||n[i][1].type!==\"data\")&&(i!==s+2&&(n[s][1].end=n[i-1][1].end,n.splice(s+2,i-s-2),i=s+2),s=void 0);return e?e(n,r):n}}function Wie(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===\"lineEnding\")&&e[n-1][1].type===\"data\"){const r=e[n-1][1],i=t.sliceStream(r);let s=i.length,o=-1,a=0,l;for(;s--;){const u=i[s];if(typeof u==\"string\"){for(o=u.length;u.charCodeAt(o-1)===32;)a++,o--;if(o)break;o=-1}else if(u===-2)l=!0,a++;else if(u!==-1){s++;break}}if(a){const u={type:n===e.length||l||a<2?\"lineSuffix\":\"hardBreakTrailing\",start:{line:r.end.line,column:r.end.column-a,offset:r.end.offset-a,_index:r.start._index+s,_bufferIndex:s?o:r.start._bufferIndex+o},end:Object.assign({},r.end)};r.end=Object.assign({},u.start),r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,[\"enter\",u,t],[\"exit\",u,t]),n+=2)}n++}return e}function Kie(e,t,n){let r=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const i={},s=[];let o=[],a=[];const l={consume:v,enter:g,exit:x,attempt:C(S),check:C(k),interrupt:C(k,{interrupt:!0})},u={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:h,sliceSerialize:d,now:p,defineSkip:m,write:c};let f=t.tokenize.call(u,l);return t.resolveAll&&s.push(t),u;function c(j){return o=Rn(o,j),w(),o[o.length-1]!==null?[]:(T(t,0),u.events=Hp(s,u.events,u),u.events)}function d(j,L){return Yie(h(j),L)}function h(j){return qie(o,j)}function p(){const{line:j,column:L,offset:B,_index:N,_bufferIndex:M}=r;return{line:j,column:L,offset:B,_index:N,_bufferIndex:M}}function m(j){i[j.line]=j.column,A()}function w(){let j;for(;r._index<o.length;){const L=o[r._index];if(typeof L==\"string\")for(j=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===j&&r._bufferIndex<L.length;)y(L.charCodeAt(r._bufferIndex));else y(L)}}function y(j){f=f(j)}function v(j){fe(j)?(r.line++,r.column=1,r.offset+=j===-3?2:1,A()):j!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=j}function g(j,L){const B=L||{};return B.type=j,B.start=p(),u.events.push([\"enter\",B,u]),a.push(B),B}function x(j){const L=a.pop();return L.end=p(),u.events.push([\"exit\",L,u]),L}function S(j,L){T(j,L.from)}function k(j,L){L.restore()}function C(j,L){return B;function B(N,M,I){let F,P,D,_;return Array.isArray(N)?W(N):\"tokenize\"in N?W([N]):V(N);function V(Y){return re;function re(G){const le=G!==null&&Y[G],de=G!==null&&Y.null,ue=[...Array.isArray(le)?le:le?[le]:[],...Array.isArray(de)?de:de?[de]:[]];return W(ue)(G)}}function W(Y){return F=Y,P=0,Y.length===0?I:R(Y[P])}function R(Y){return re;function re(G){return _=O(),D=Y,Y.partial||(u.currentConstruct=Y),Y.name&&u.parser.constructs.disable.null.includes(Y.name)?J():Y.tokenize.call(L?Object.assign(Object.create(u),L):u,l,q,J)(G)}}function q(Y){return j(D,_),M}function J(Y){return _.restore(),++P<F.length?R(F[P]):I}}}function T(j,L){j.resolveAll&&!s.includes(j)&&s.push(j),j.resolve&&jn(u.events,L,u.events.length-L,j.resolve(u.events.slice(L),u)),j.resolveTo&&(u.events=j.resolveTo(u.events,u))}function O(){const j=p(),L=u.previous,B=u.currentConstruct,N=u.events.length,M=Array.from(a);return{restore:I,from:N};function I(){r=j,u.previous=L,u.currentConstruct=B,u.events.length=N,a=M,A()}}function A(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function qie(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,s=t.end._bufferIndex;let o;if(n===i)o=[e[n].slice(r,s)];else{if(o=e.slice(n,i),r>-1){const a=o[0];typeof a==\"string\"?o[0]=a.slice(r):o.shift()}s>0&&o.push(e[i].slice(0,s))}return o}function Yie(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const s=e[n];let o;if(typeof s==\"string\")o=s;else switch(s){case-5:{o=\"\\r\";break}case-4:{o=`\n`;break}case-3:{o=`\\r\n`;break}case-2:{o=t?\" \":\"\t\";break}case-1:{if(!t&&i)continue;o=\" \";break}default:o=String.fromCharCode(s)}i=s===-2,r.push(o)}return r.join(\"\")}const Gie={42:qt,43:qt,45:qt,48:qt,49:qt,50:qt,51:qt,52:qt,53:qt,54:qt,55:qt,56:qt,57:qt,62:FD},Xie={91:Qre},Qie={[-2]:kg,[-1]:kg,32:kg},Zie={35:rie,42:sd,45:[ZC,sd],60:aie,61:ZC,95:sd,96:XC,126:XC},Jie={38:BD,92:$D},ese={[-5]:Eg,[-4]:Eg,[-3]:Eg,33:Cie,38:BD,42:G0,60:[_re,pie],91:_ie,92:[tie,$D],93:Qx,95:G0,96:Bre},tse={null:[G0,zie]},nse={null:[42,95]},rse={null:[]},ise=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:nse,contentInitial:Xie,disable:rse,document:Gie,flow:Zie,flowInitial:Qie,insideSpan:tse,string:Jie,text:ese},Symbol.toStringTag,{value:\"Module\"}));function sse(e){const n=MD([ise,...(e||{}).extensions||[]]),r={defined:[],lazy:{},constructs:n,content:i(xre),document:i(Sre),flow:i(Bie),string:i(Uie),text:i(Hie)};return r;function i(s){return o;function o(a){return Kie(r,s,a)}}}function ose(e){for(;!VD(e););return e}const JC=/[\\0\\t\\n\\r]/g;function ase(){let e=1,t=\"\",n=!0,r;return i;function i(s,o,a){const l=[];let u,f,c,d,h;for(s=t+(typeof s==\"string\"?s.toString():new TextDecoder(o||void 0).decode(s)),c=0,t=\"\",n&&(s.charCodeAt(0)===65279&&c++,n=void 0);c<s.length;){if(JC.lastIndex=c,u=JC.exec(s),d=u&&u.index!==void 0?u.index:s.length,h=s.charCodeAt(d),!u){t=s.slice(c);break}if(h===10&&c===d&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),c<d&&(l.push(s.slice(c,d)),e+=d-c),h){case 0:{l.push(65533),e++;break}case 9:{for(f=Math.ceil(e/4)*4,l.push(-2);e++<f;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}c=d+1}return a&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const lse=/\\\\([!-/:-@[-`{-~])|&(#(?:\\d{1,7}|x[\\da-f]{1,6})|[\\da-z]{1,31});/gi;function use(e){return e.replace(lse,cse)}function cse(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),s=i===120||i===88;return jD(n.slice(s?2:1),s?16:10)}return Xx(n)||e}const qD={}.hasOwnProperty;function fse(e,t,n){return typeof t!=\"string\"&&(n=t,t=void 0),dse(n)(ose(sse(n).document().write(ase()(e,t,!0))))}function dse(e){const t={transforms:[],canContainEols:[\"emphasis\",\"fragment\",\"heading\",\"paragraph\",\"strong\"],enter:{autolink:s(z),autolinkProtocol:O,autolinkEmail:O,atxHeading:s(gt),blockQuote:s(de),characterEscape:O,characterReference:O,codeFenced:s(ue),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:s(ue,o),codeText:s(ie,o),codeTextData:O,data:O,codeFlowValue:O,definition:s(pe),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:s(Ne),hardBreakEscape:s(Ht),hardBreakTrailing:s(Ht),htmlFlow:s(Ir,o),htmlFlowData:O,htmlText:s(Ir,o),htmlTextData:O,image:s($),label:o,link:s(z),listItem:s(ne),listItemValue:d,listOrdered:s(H,c),listUnordered:s(H),paragraph:s(ee),reference:R,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:s(gt),strong:s(X),thematicBreak:s(xe)},exit:{atxHeading:l(),atxHeadingSequence:S,autolink:l(),autolinkEmail:le,autolinkProtocol:G,blockQuote:l(),characterEscapeValue:A,characterReferenceMarkerHexadecimal:J,characterReferenceMarkerNumeric:J,characterReferenceValue:Y,characterReference:re,codeFenced:l(w),codeFencedFence:m,codeFencedFenceInfo:h,codeFencedFenceMeta:p,codeFlowValue:A,codeIndented:l(y),codeText:l(M),codeTextData:A,data:A,definition:l(),definitionDestinationString:x,definitionLabelString:v,definitionTitleString:g,emphasis:l(),hardBreakEscape:l(L),hardBreakTrailing:l(L),htmlFlow:l(B),htmlFlowData:A,htmlText:l(N),htmlTextData:A,image:l(F),label:D,labelText:P,lineEnding:j,link:l(I),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:q,resourceDestinationString:_,resourceTitleString:V,resource:W,setextHeading:l(T),setextHeadingLineSequence:C,setextHeadingText:k,strong:l(),thematicBreak:l()}};YD(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(U){let K={type:\"root\",children:[]};const ce={stack:[K],tokenStack:[],config:t,enter:a,exit:u,buffer:o,resume:f,data:n},ye=[];let _e=-1;for(;++_e<U.length;)if(U[_e][1].type===\"listOrdered\"||U[_e][1].type===\"listUnordered\")if(U[_e][0]===\"enter\")ye.push(_e);else{const yt=ye.pop();_e=i(U,yt,_e)}for(_e=-1;++_e<U.length;){const yt=t[U[_e][0]];qD.call(yt,U[_e][1].type)&&yt[U[_e][1].type].call(Object.assign({sliceSerialize:U[_e][2].sliceSerialize},ce),U[_e][1])}if(ce.tokenStack.length>0){const yt=ce.tokenStack[ce.tokenStack.length-1];(yt[1]||eT).call(ce,void 0,yt[0])}for(K.position={start:bi(U.length>0?U[0][1].start:{line:1,column:1,offset:0}),end:bi(U.length>0?U[U.length-2][1].end:{line:1,column:1,offset:0})},_e=-1;++_e<t.transforms.length;)K=t.transforms[_e](K)||K;return K}function i(U,K,ce){let ye=K-1,_e=-1,yt=!1,Un,Wt,Dr,hr;for(;++ye<=ce;){const It=U[ye];switch(It[1].type){case\"listUnordered\":case\"listOrdered\":case\"blockQuote\":{It[0]===\"enter\"?_e++:_e--,hr=void 0;break}case\"lineEndingBlank\":{It[0]===\"enter\"&&(Un&&!hr&&!_e&&!Dr&&(Dr=ye),hr=void 0);break}case\"linePrefix\":case\"listItemValue\":case\"listItemMarker\":case\"listItemPrefix\":case\"listItemPrefixWhitespace\":break;default:hr=void 0}if(!_e&&It[0]===\"enter\"&&It[1].type===\"listItemPrefix\"||_e===-1&&It[0]===\"exit\"&&(It[1].type===\"listUnordered\"||It[1].type===\"listOrdered\")){if(Un){let mi=ye;for(Wt=void 0;mi--;){const Hn=U[mi];if(Hn[1].type===\"lineEnding\"||Hn[1].type===\"lineEndingBlank\"){if(Hn[0]===\"exit\")continue;Wt&&(U[Wt][1].type=\"lineEndingBlank\",yt=!0),Hn[1].type=\"lineEnding\",Wt=mi}else if(!(Hn[1].type===\"linePrefix\"||Hn[1].type===\"blockQuotePrefix\"||Hn[1].type===\"blockQuotePrefixWhitespace\"||Hn[1].type===\"blockQuoteMarker\"||Hn[1].type===\"listItemIndent\"))break}Dr&&(!Wt||Dr<Wt)&&(Un._spread=!0),Un.end=Object.assign({},Wt?U[Wt][1].start:It[1].end),U.splice(Wt||ye,0,[\"exit\",Un,It[2]]),ye++,ce++}if(It[1].type===\"listItemPrefix\"){const mi={type:\"listItem\",_spread:!1,start:Object.assign({},It[1].start),end:void 0};Un=mi,U.splice(ye,0,[\"enter\",mi,It[2]]),ye++,ce++,Dr=void 0,hr=!0}}}return U[K][1]._spread=yt,ce}function s(U,K){return ce;function ce(ye){a.call(this,U(ye),ye),K&&K.call(this,ye)}}function o(){this.stack.push({type:\"fragment\",children:[]})}function a(U,K,ce){this.stack[this.stack.length-1].children.push(U),this.stack.push(U),this.tokenStack.push([K,ce]),U.position={start:bi(K.start),end:void 0}}function l(U){return K;function K(ce){U&&U.call(this,ce),u.call(this,ce)}}function u(U,K){const ce=this.stack.pop(),ye=this.tokenStack.pop();if(ye)ye[0].type!==U.type&&(K?K.call(this,U,ye[0]):(ye[1]||eT).call(this,U,ye[0]));else throw new Error(\"Cannot close `\"+U.type+\"` (\"+ru({start:U.start,end:U.end})+\"): it’s not open\");ce.position.end=bi(U.end)}function f(){return Gx(this.stack.pop())}function c(){this.data.expectingFirstListItemValue=!0}function d(U){if(this.data.expectingFirstListItemValue){const K=this.stack[this.stack.length-2];K.start=Number.parseInt(this.sliceSerialize(U),10),this.data.expectingFirstListItemValue=void 0}}function h(){const U=this.resume(),K=this.stack[this.stack.length-1];K.lang=U}function p(){const U=this.resume(),K=this.stack[this.stack.length-1];K.meta=U}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function w(){const U=this.resume(),K=this.stack[this.stack.length-1];K.value=U.replace(/^(\\r?\\n|\\r)|(\\r?\\n|\\r)$/g,\"\"),this.data.flowCodeInside=void 0}function y(){const U=this.resume(),K=this.stack[this.stack.length-1];K.value=U.replace(/(\\r?\\n|\\r)$/g,\"\")}function v(U){const K=this.resume(),ce=this.stack[this.stack.length-1];ce.label=K,ce.identifier=sr(this.sliceSerialize(U)).toLowerCase()}function g(){const U=this.resume(),K=this.stack[this.stack.length-1];K.title=U}function x(){const U=this.resume(),K=this.stack[this.stack.length-1];K.url=U}function S(U){const K=this.stack[this.stack.length-1];if(!K.depth){const ce=this.sliceSerialize(U).length;K.depth=ce}}function k(){this.data.setextHeadingSlurpLineEnding=!0}function C(U){const K=this.stack[this.stack.length-1];K.depth=this.sliceSerialize(U).codePointAt(0)===61?1:2}function T(){this.data.setextHeadingSlurpLineEnding=void 0}function O(U){const ce=this.stack[this.stack.length-1].children;let ye=ce[ce.length-1];(!ye||ye.type!==\"text\")&&(ye=ae(),ye.position={start:bi(U.start),end:void 0},ce.push(ye)),this.stack.push(ye)}function A(U){const K=this.stack.pop();K.value+=this.sliceSerialize(U),K.position.end=bi(U.end)}function j(U){const K=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ce=K.children[K.children.length-1];ce.position.end=bi(U.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(K.type)&&(O.call(this,U),A.call(this,U))}function L(){this.data.atHardBreak=!0}function B(){const U=this.resume(),K=this.stack[this.stack.length-1];K.value=U}function N(){const U=this.resume(),K=this.stack[this.stack.length-1];K.value=U}function M(){const U=this.resume(),K=this.stack[this.stack.length-1];K.value=U}function I(){const U=this.stack[this.stack.length-1];if(this.data.inReference){const K=this.data.referenceType||\"shortcut\";U.type+=\"Reference\",U.referenceType=K,delete U.url,delete U.title}else delete U.identifier,delete U.label;this.data.referenceType=void 0}function F(){const U=this.stack[this.stack.length-1];if(this.data.inReference){const K=this.data.referenceType||\"shortcut\";U.type+=\"Reference\",U.referenceType=K,delete U.url,delete U.title}else delete U.identifier,delete U.label;this.data.referenceType=void 0}function P(U){const K=this.sliceSerialize(U),ce=this.stack[this.stack.length-2];ce.label=use(K),ce.identifier=sr(K).toLowerCase()}function D(){const U=this.stack[this.stack.length-1],K=this.resume(),ce=this.stack[this.stack.length-1];if(this.data.inReference=!0,ce.type===\"link\"){const ye=U.children;ce.children=ye}else ce.alt=K}function _(){const U=this.resume(),K=this.stack[this.stack.length-1];K.url=U}function V(){const U=this.resume(),K=this.stack[this.stack.length-1];K.title=U}function W(){this.data.inReference=void 0}function R(){this.data.referenceType=\"collapsed\"}function q(U){const K=this.resume(),ce=this.stack[this.stack.length-1];ce.label=K,ce.identifier=sr(this.sliceSerialize(U)).toLowerCase(),this.data.referenceType=\"full\"}function J(U){this.data.characterReferenceType=U.type}function Y(U){const K=this.sliceSerialize(U),ce=this.data.characterReferenceType;let ye;ce?(ye=jD(K,ce===\"characterReferenceMarkerNumeric\"?10:16),this.data.characterReferenceType=void 0):ye=Xx(K);const _e=this.stack[this.stack.length-1];_e.value+=ye}function re(U){const K=this.stack.pop();K.position.end=bi(U.end)}function G(U){A.call(this,U);const K=this.stack[this.stack.length-1];K.url=this.sliceSerialize(U)}function le(U){A.call(this,U);const K=this.stack[this.stack.length-1];K.url=\"mailto:\"+this.sliceSerialize(U)}function de(){return{type:\"blockquote\",children:[]}}function ue(){return{type:\"code\",lang:null,meta:null,value:\"\"}}function ie(){return{type:\"inlineCode\",value:\"\"}}function pe(){return{type:\"definition\",identifier:\"\",label:null,title:null,url:\"\"}}function Ne(){return{type:\"emphasis\",children:[]}}function gt(){return{type:\"heading\",depth:0,children:[]}}function Ht(){return{type:\"break\"}}function Ir(){return{type:\"html\",value:\"\"}}function $(){return{type:\"image\",title:null,url:\"\",alt:null}}function z(){return{type:\"link\",title:null,url:\"\",children:[]}}function H(U){return{type:\"list\",ordered:U.type===\"listOrdered\",start:null,spread:U._spread,children:[]}}function ne(U){return{type:\"listItem\",spread:U._spread,checked:null,children:[]}}function ee(){return{type:\"paragraph\",children:[]}}function X(){return{type:\"strong\",children:[]}}function ae(){return{type:\"text\",value:\"\"}}function xe(){return{type:\"thematicBreak\"}}}function bi(e){return{line:e.line,column:e.column,offset:e.offset}}function YD(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?YD(e,r):hse(e,r)}}function hse(e,t){let n;for(n in t)if(qD.call(t,n))switch(n){case\"canContainEols\":{const r=t[n];r&&e[n].push(...r);break}case\"transforms\":{const r=t[n];r&&e[n].push(...r);break}case\"enter\":case\"exit\":{const r=t[n];r&&Object.assign(e[n],r);break}}}function eT(e,t){throw e?new Error(\"Cannot close `\"+e.type+\"` (\"+ru({start:e.start,end:e.end})+\"): a different token (`\"+t.type+\"`, \"+ru({start:t.start,end:t.end})+\") is open\"):new Error(\"Cannot close document, a token (`\"+t.type+\"`, \"+ru({start:t.start,end:t.end})+\") is still open\")}function pse(e){const t=this;t.parser=n;function n(r){return fse(r,{...t.data(\"settings\"),...e,extensions:t.data(\"micromarkExtensions\")||[],mdastExtensions:t.data(\"fromMarkdownExtensions\")||[]})}}function mse(e,t){const n={type:\"element\",tagName:\"blockquote\",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function gse(e,t){const n={type:\"element\",tagName:\"br\",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:\"text\",value:`\n`}]}function yse(e,t){const n=t.value?t.value+`\n`:\"\",r={};t.lang&&(r.className=[\"language-\"+t.lang]);let i={type:\"element\",tagName:\"code\",properties:r,children:[{type:\"text\",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:\"element\",tagName:\"pre\",properties:{},children:[i]},e.patch(t,i),i}function vse(e,t){const n={type:\"element\",tagName:\"del\",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function wse(e,t){const n={type:\"element\",tagName:\"em\",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function xse(e,t){const n=typeof e.options.clobberPrefix==\"string\"?e.options.clobberPrefix:\"user-content-\",r=String(t.identifier).toUpperCase(),i=Za(r.toLowerCase()),s=e.footnoteOrder.indexOf(r);let o,a=e.footnoteCounts.get(r);a===void 0?(a=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=s+1,a+=1,e.footnoteCounts.set(r,a);const l={type:\"element\",tagName:\"a\",properties:{href:\"#\"+n+\"fn-\"+i,id:n+\"fnref-\"+i+(a>1?\"-\"+a:\"\"),dataFootnoteRef:!0,ariaDescribedBy:[\"footnote-label\"]},children:[{type:\"text\",value:String(o)}]};e.patch(t,l);const u={type:\"element\",tagName:\"sup\",properties:{},children:[l]};return e.patch(t,u),e.applyData(t,u)}function bse(e,t){const n={type:\"element\",tagName:\"h\"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Sse(e,t){if(e.options.allowDangerousHtml){const n={type:\"raw\",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function GD(e,t){const n=t.referenceType;let r=\"]\";if(n===\"collapsed\"?r+=\"[]\":n===\"full\"&&(r+=\"[\"+(t.label||t.identifier)+\"]\"),t.type===\"imageReference\")return[{type:\"text\",value:\"![\"+t.alt+r}];const i=e.all(t),s=i[0];s&&s.type===\"text\"?s.value=\"[\"+s.value:i.unshift({type:\"text\",value:\"[\"});const o=i[i.length-1];return o&&o.type===\"text\"?o.value+=r:i.push({type:\"text\",value:r}),i}function kse(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return GD(e,t);const i={src:Za(r.url||\"\"),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:\"element\",tagName:\"img\",properties:i,children:[]};return e.patch(t,s),e.applyData(t,s)}function Ese(e,t){const n={src:Za(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:\"element\",tagName:\"img\",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Cse(e,t){const n={type:\"text\",value:t.value.replace(/\\r?\\n|\\r/g,\" \")};e.patch(t,n);const r={type:\"element\",tagName:\"code\",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function Tse(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return GD(e,t);const i={href:Za(r.url||\"\")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:\"element\",tagName:\"a\",properties:i,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function _se(e,t){const n={href:Za(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:\"element\",tagName:\"a\",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Ase(e,t,n){const r=e.all(t),i=n?Nse(n):XD(t),s={},o=[];if(typeof t.checked==\"boolean\"){const f=r[0];let c;f&&f.type===\"element\"&&f.tagName===\"p\"?c=f:(c={type:\"element\",tagName:\"p\",properties:{},children:[]},r.unshift(c)),c.children.length>0&&c.children.unshift({type:\"text\",value:\" \"}),c.children.unshift({type:\"element\",tagName:\"input\",properties:{type:\"checkbox\",checked:t.checked,disabled:!0},children:[]}),s.className=[\"task-list-item\"]}let a=-1;for(;++a<r.length;){const f=r[a];(i||a!==0||f.type!==\"element\"||f.tagName!==\"p\")&&o.push({type:\"text\",value:`\n`}),f.type===\"element\"&&f.tagName===\"p\"&&!i?o.push(...f.children):o.push(f)}const l=r[r.length-1];l&&(i||l.type!==\"element\"||l.tagName!==\"p\")&&o.push({type:\"text\",value:`\n`});const u={type:\"element\",tagName:\"li\",properties:s,children:o};return e.patch(t,u),e.applyData(t,u)}function Nse(e){let t=!1;if(e.type===\"list\"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=XD(n[r])}return t}function XD(e){const t=e.spread;return t??e.children.length>1}function Pse(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start==\"number\"&&t.start!==1&&(n.start=t.start);++i<r.length;){const o=r[i];if(o.type===\"element\"&&o.tagName===\"li\"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes(\"task-list-item\")){n.className=[\"contains-task-list\"];break}}const s={type:\"element\",tagName:t.ordered?\"ol\":\"ul\",properties:n,children:e.wrap(r,!0)};return e.patch(t,s),e.applyData(t,s)}function Ose(e,t){const n={type:\"element\",tagName:\"p\",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Lse(e,t){const n={type:\"root\",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Rse(e,t){const n={type:\"element\",tagName:\"strong\",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ise(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const o={type:\"element\",tagName:\"thead\",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],o),i.push(o)}if(n.length>0){const o={type:\"element\",tagName:\"tbody\",properties:{},children:e.wrap(n,!0)},a=Wx(t.children[1]),l=ND(t.children[t.children.length-1]);a&&l&&(o.position={start:a,end:l}),i.push(o)}const s={type:\"element\",tagName:\"table\",properties:{},children:e.wrap(i,!0)};return e.patch(t,s),e.applyData(t,s)}function Dse(e,t,n){const r=n?n.children:void 0,s=(r?r.indexOf(t):1)===0?\"th\":\"td\",o=n&&n.type===\"table\"?n.align:void 0,a=o?o.length:t.children.length;let l=-1;const u=[];for(;++l<a;){const c=t.children[l],d={},h=o?o[l]:void 0;h&&(d.align=h);let p={type:\"element\",tagName:s,properties:d,children:[]};c&&(p.children=e.all(c),e.patch(c,p),p=e.applyData(c,p)),u.push(p)}const f={type:\"element\",tagName:\"tr\",properties:{},children:e.wrap(u,!0)};return e.patch(t,f),e.applyData(t,f)}function Mse(e,t){const n={type:\"element\",tagName:\"td\",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const tT=9,nT=32;function jse(e){const t=String(e),n=/\\r?\\n|\\r/g;let r=n.exec(t),i=0;const s=[];for(;r;)s.push(rT(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return s.push(rT(t.slice(i),i>0,!1)),s.join(\"\")}function rT(e,t,n){let r=0,i=e.length;if(t){let s=e.codePointAt(r);for(;s===tT||s===nT;)r++,s=e.codePointAt(r)}if(n){let s=e.codePointAt(i-1);for(;s===tT||s===nT;)i--,s=e.codePointAt(i-1)}return i>r?e.slice(r,i):\"\"}function Fse(e,t){const n={type:\"text\",value:jse(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function $se(e,t){const n={type:\"element\",tagName:\"hr\",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Bse={blockquote:mse,break:gse,code:yse,delete:vse,emphasis:wse,footnoteReference:xse,heading:bse,html:Sse,imageReference:kse,image:Ese,inlineCode:Cse,linkReference:Tse,link:_se,listItem:Ase,list:Pse,paragraph:Ose,root:Lse,strong:Rse,table:Ise,tableCell:Mse,tableRow:Dse,text:Fse,thematicBreak:$se,toml:gf,yaml:gf,definition:gf,footnoteDefinition:gf};function gf(){}const QD=-1,Wp=0,wh=1,xh=2,Zx=3,Jx=4,e1=5,t1=6,ZD=7,JD=8,iT=typeof self==\"object\"?self:globalThis,Vse=(e,t)=>{const n=(i,s)=>(e.set(s,i),i),r=i=>{if(e.has(i))return e.get(i);const[s,o]=t[i];switch(s){case Wp:case QD:return n(o,i);case wh:{const a=n([],i);for(const l of o)a.push(r(l));return a}case xh:{const a=n({},i);for(const[l,u]of o)a[r(l)]=r(u);return a}case Zx:return n(new Date(o),i);case Jx:{const{source:a,flags:l}=o;return n(new RegExp(a,l),i)}case e1:{const a=n(new Map,i);for(const[l,u]of o)a.set(r(l),r(u));return a}case t1:{const a=n(new Set,i);for(const l of o)a.add(r(l));return a}case ZD:{const{name:a,message:l}=o;return n(new iT[a](l),i)}case JD:return n(BigInt(o),i);case\"BigInt\":return n(Object(BigInt(o)),i)}return n(new iT[s](o),i)};return r},sT=e=>Vse(new Map,e)(0),mo=\"\",{toString:zse}={},{keys:Use}=Object,Sl=e=>{const t=typeof e;if(t!==\"object\"||!e)return[Wp,t];const n=zse.call(e).slice(8,-1);switch(n){case\"Array\":return[wh,mo];case\"Object\":return[xh,mo];case\"Date\":return[Zx,mo];case\"RegExp\":return[Jx,mo];case\"Map\":return[e1,mo];case\"Set\":return[t1,mo]}return n.includes(\"Array\")?[wh,n]:n.includes(\"Error\")?[ZD,n]:[xh,n]},yf=([e,t])=>e===Wp&&(t===\"function\"||t===\"symbol\"),Hse=(e,t,n,r)=>{const i=(o,a)=>{const l=r.push(o)-1;return n.set(a,l),l},s=o=>{if(n.has(o))return n.get(o);let[a,l]=Sl(o);switch(a){case Wp:{let f=o;switch(l){case\"bigint\":a=JD,f=o.toString();break;case\"function\":case\"symbol\":if(e)throw new TypeError(\"unable to serialize \"+l);f=null;break;case\"undefined\":return i([QD],o)}return i([a,f],o)}case wh:{if(l)return i([l,[...o]],o);const f=[],c=i([a,f],o);for(const d of o)f.push(s(d));return c}case xh:{if(l)switch(l){case\"BigInt\":return i([l,o.toString()],o);case\"Boolean\":case\"Number\":case\"String\":return i([l,o.valueOf()],o)}if(t&&\"toJSON\"in o)return s(o.toJSON());const f=[],c=i([a,f],o);for(const d of Use(o))(e||!yf(Sl(o[d])))&&f.push([s(d),s(o[d])]);return c}case Zx:return i([a,o.toISOString()],o);case Jx:{const{source:f,flags:c}=o;return i([a,{source:f,flags:c}],o)}case e1:{const f=[],c=i([a,f],o);for(const[d,h]of o)(e||!(yf(Sl(d))||yf(Sl(h))))&&f.push([s(d),s(h)]);return c}case t1:{const f=[],c=i([a,f],o);for(const d of o)(e||!yf(Sl(d)))&&f.push(s(d));return c}}const{message:u}=o;return i([a,{name:l,message:u}],o)};return s},oT=(e,{json:t,lossy:n}={})=>{const r=[];return Hse(!(t||n),!!t,new Map,r)(e),r},bh=typeof structuredClone==\"function\"?(e,t)=>t&&(\"json\"in t||\"lossy\"in t)?sT(oT(e,t)):structuredClone(e):(e,t)=>sT(oT(e,t));function Wse(e,t){const n=[{type:\"text\",value:\"↩\"}];return t>1&&n.push({type:\"element\",tagName:\"sup\",properties:{},children:[{type:\"text\",value:String(t)}]}),n}function Kse(e,t){return\"Back to reference \"+(e+1)+(t>1?\"-\"+t:\"\")}function qse(e){const t=typeof e.options.clobberPrefix==\"string\"?e.options.clobberPrefix:\"user-content-\",n=e.options.footnoteBackContent||Wse,r=e.options.footnoteBackLabel||Kse,i=e.options.footnoteLabel||\"Footnotes\",s=e.options.footnoteLabelTagName||\"h2\",o=e.options.footnoteLabelProperties||{className:[\"sr-only\"]},a=[];let l=-1;for(;++l<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[l]);if(!u)continue;const f=e.all(u),c=String(u.identifier).toUpperCase(),d=Za(c.toLowerCase());let h=0;const p=[],m=e.footnoteCounts.get(c);for(;m!==void 0&&++h<=m;){p.length>0&&p.push({type:\"text\",value:\" \"});let v=typeof n==\"string\"?n:n(l,h);typeof v==\"string\"&&(v={type:\"text\",value:v}),p.push({type:\"element\",tagName:\"a\",properties:{href:\"#\"+t+\"fnref-\"+d+(h>1?\"-\"+h:\"\"),dataFootnoteBackref:\"\",ariaLabel:typeof r==\"string\"?r:r(l,h),className:[\"data-footnote-backref\"]},children:Array.isArray(v)?v:[v]})}const w=f[f.length-1];if(w&&w.type===\"element\"&&w.tagName===\"p\"){const v=w.children[w.children.length-1];v&&v.type===\"text\"?v.value+=\" \":w.children.push({type:\"text\",value:\" \"}),w.children.push(...p)}else f.push(...p);const y={type:\"element\",tagName:\"li\",properties:{id:t+\"fn-\"+d},children:e.wrap(f,!0)};e.patch(u,y),a.push(y)}if(a.length!==0)return{type:\"element\",tagName:\"section\",properties:{dataFootnotes:!0,className:[\"footnotes\"]},children:[{type:\"element\",tagName:s,properties:{...bh(o),id:\"footnote-label\"},children:[{type:\"text\",value:i}]},{type:\"text\",value:`\n`},{type:\"element\",tagName:\"ol\",properties:{},children:e.wrap(a,!0)},{type:\"text\",value:`\n`}]}}const Kp=function(e){if(e==null)return Qse;if(typeof e==\"function\")return qp(e);if(typeof e==\"object\")return Array.isArray(e)?Yse(e):Gse(e);if(typeof e==\"string\")return Xse(e);throw new Error(\"Expected function, string, or object as test\")};function Yse(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Kp(e[n]);return qp(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function Gse(e){const t=e;return qp(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function Xse(e){return qp(t);function t(n){return n&&n.type===e}}function qp(e){return t;function t(n,r,i){return!!(Zse(n)&&e.call(this,n,typeof r==\"number\"?r:void 0,i||void 0))}}function Qse(){return!0}function Zse(e){return e!==null&&typeof e==\"object\"&&\"type\"in e}const eM=[],Jse=!0,X0=!1,eoe=\"skip\";function tM(e,t,n,r){let i;typeof t==\"function\"&&typeof n!=\"function\"?(r=n,n=t):i=t;const s=Kp(i),o=r?-1:1;a(e,void 0,[])();function a(l,u,f){const c=l&&typeof l==\"object\"?l:{};if(typeof c.type==\"string\"){const h=typeof c.tagName==\"string\"?c.tagName:typeof c.name==\"string\"?c.name:void 0;Object.defineProperty(d,\"name\",{value:\"node (\"+(l.type+(h?\"<\"+h+\">\":\"\"))+\")\"})}return d;function d(){let h=eM,p,m,w;if((!t||s(l,u,f[f.length-1]||void 0))&&(h=toe(n(l,f)),h[0]===X0))return h;if(\"children\"in l&&l.children){const y=l;if(y.children&&h[0]!==eoe)for(m=(r?y.children.length:-1)+o,w=f.concat(y);m>-1&&m<y.children.length;){const v=y.children[m];if(p=a(v,m,w)(),p[0]===X0)return p;m=typeof p[1]==\"number\"?p[1]:m+o}}return h}}}function toe(e){return Array.isArray(e)?e:typeof e==\"number\"?[Jse,e]:e==null?eM:[e]}function n1(e,t,n,r){let i,s,o;typeof t==\"function\"&&typeof n!=\"function\"?(s=void 0,o=t,i=n):(s=t,o=n,i=r),tM(e,s,a,i);function a(l,u){const f=u[u.length-1],c=f?f.children.indexOf(l):void 0;return o(l,c,f)}}const Q0={}.hasOwnProperty,noe={};function roe(e,t){const n=t||noe,r=new Map,i=new Map,s=new Map,o={...Bse,...n.handlers},a={all:u,applyData:soe,definitionById:r,footnoteById:i,footnoteCounts:s,footnoteOrder:[],handlers:o,one:l,options:n,patch:ioe,wrap:aoe};return n1(e,function(f){if(f.type===\"definition\"||f.type===\"footnoteDefinition\"){const c=f.type===\"definition\"?r:i,d=String(f.identifier).toUpperCase();c.has(d)||c.set(d,f)}}),a;function l(f,c){const d=f.type,h=a.handlers[d];if(Q0.call(a.handlers,d)&&h)return h(a,f,c);if(a.options.passThrough&&a.options.passThrough.includes(d)){if(\"children\"in f){const{children:m,...w}=f,y=bh(w);return y.children=a.all(f),y}return bh(f)}return(a.options.unknownHandler||ooe)(a,f,c)}function u(f){const c=[];if(\"children\"in f){const d=f.children;let h=-1;for(;++h<d.length;){const p=a.one(d[h],f);if(p){if(h&&d[h-1].type===\"break\"&&(!Array.isArray(p)&&p.type===\"text\"&&(p.value=aT(p.value)),!Array.isArray(p)&&p.type===\"element\")){const m=p.children[0];m&&m.type===\"text\"&&(m.value=aT(m.value))}Array.isArray(p)?c.push(...p):c.push(p)}}}return c}}function ioe(e,t){e.position&&(t.position=Hne(e))}function soe(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,s=e.data.hProperties;if(typeof r==\"string\")if(n.type===\"element\")n.tagName=r;else{const o=\"children\"in n?n.children:[n];n={type:\"element\",tagName:r,properties:{},children:o}}n.type===\"element\"&&s&&Object.assign(n.properties,bh(s)),\"children\"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function ooe(e,t){const n=t.data||{},r=\"value\"in t&&!(Q0.call(n,\"hProperties\")||Q0.call(n,\"hChildren\"))?{type:\"text\",value:t.value}:{type:\"element\",tagName:\"div\",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function aoe(e,t){const n=[];let r=-1;for(t&&n.push({type:\"text\",value:`\n`});++r<e.length;)r&&n.push({type:\"text\",value:`\n`}),n.push(e[r]);return t&&e.length>0&&n.push({type:\"text\",value:`\n`}),n}function aT(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function lT(e,t){const n=roe(e,t),r=n.one(e,void 0),i=qse(n),s=Array.isArray(r)?{type:\"root\",children:r}:r||{type:\"root\",children:[]};return i&&s.children.push({type:\"text\",value:`\n`},i),s}function loe(e,t){return e&&\"run\"in e?async function(n,r){const i=lT(n,{file:r,...t});await e.run(i,r)}:function(n,r){return lT(n,{file:r,...e||t})}}function uT(e){if(e)throw e}var od=Object.prototype.hasOwnProperty,nM=Object.prototype.toString,cT=Object.defineProperty,fT=Object.getOwnPropertyDescriptor,dT=function(t){return typeof Array.isArray==\"function\"?Array.isArray(t):nM.call(t)===\"[object Array]\"},hT=function(t){if(!t||nM.call(t)!==\"[object Object]\")return!1;var n=od.call(t,\"constructor\"),r=t.constructor&&t.constructor.prototype&&od.call(t.constructor.prototype,\"isPrototypeOf\");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>\"u\"||od.call(t,i)},pT=function(t,n){cT&&n.name===\"__proto__\"?cT(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},mT=function(t,n){if(n===\"__proto__\")if(od.call(t,n)){if(fT)return fT(t,n).value}else return;return t[n]},uoe=function e(){var t,n,r,i,s,o,a=arguments[0],l=1,u=arguments.length,f=!1;for(typeof a==\"boolean\"&&(f=a,a=arguments[1]||{},l=2),(a==null||typeof a!=\"object\"&&typeof a!=\"function\")&&(a={});l<u;++l)if(t=arguments[l],t!=null)for(n in t)r=mT(a,n),i=mT(t,n),a!==i&&(f&&i&&(hT(i)||(s=dT(i)))?(s?(s=!1,o=r&&dT(r)?r:[]):o=r&&hT(r)?r:{},pT(a,{name:n,newValue:e(f,o,i)})):typeof i<\"u\"&&pT(a,{name:n,newValue:i}));return a};const Cg=ci(uoe);function Z0(e){if(typeof e!=\"object\"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function coe(){const e=[],t={run:n,use:r};return t;function n(...i){let s=-1;const o=i.pop();if(typeof o!=\"function\")throw new TypeError(\"Expected function as last argument, not \"+o);a(null,...i);function a(l,...u){const f=e[++s];let c=-1;if(l){o(l);return}for(;++c<i.length;)(u[c]===null||u[c]===void 0)&&(u[c]=i[c]);i=u,f?foe(f,a)(...u):o(null,...u)}}function r(i){if(typeof i!=\"function\")throw new TypeError(\"Expected `middelware` to be a function, not \"+i);return e.push(i),t}}function foe(e,t){let n;return r;function r(...o){const a=e.length>o.length;let l;a&&o.push(i);try{l=e.apply(this,o)}catch(u){const f=u;if(a&&n)throw f;return i(f)}a||(l&&l.then&&typeof l.then==\"function\"?l.then(s,i):l instanceof Error?i(l):s(l))}function i(o,...a){n||(n=!0,t(o,...a))}function s(o){i(null,o)}}const gr={basename:doe,dirname:hoe,extname:poe,join:moe,sep:\"/\"};function doe(e,t){if(t!==void 0&&typeof t!=\"string\")throw new TypeError('\"ext\" argument must be a string');kc(e);let n=0,r=-1,i=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else r<0&&(s=!0,r=i+1);return r<0?\"\":e.slice(n,r)}if(t===e)return\"\";let o=-1,a=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else o<0&&(s=!0,o=i+1),a>-1&&(e.codePointAt(i)===t.codePointAt(a--)?a<0&&(r=i):(a=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function hoe(e){if(kc(e),e.length===0)return\".\";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?\"/\":\".\":t===1&&e.codePointAt(0)===47?\"//\":e.slice(0,t)}function poe(e){kc(e);let t=e.length,n=-1,r=0,i=-1,s=0,o;for(;t--;){const a=e.codePointAt(t);if(a===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),a===46?i<0?i=t:s!==1&&(s=1):i>-1&&(s=-1)}return i<0||n<0||s===0||s===1&&i===n-1&&i===r+1?\"\":e.slice(i,n)}function moe(...e){let t=-1,n;for(;++t<e.length;)kc(e[t]),e[t]&&(n=n===void 0?e[t]:n+\"/\"+e[t]);return n===void 0?\".\":goe(n)}function goe(e){kc(e);const t=e.codePointAt(0)===47;let n=yoe(e,!t);return n.length===0&&!t&&(n=\".\"),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=\"/\"),t?\"/\"+n:n}function yoe(e,t){let n=\"\",r=0,i=-1,s=0,o=-1,a,l;for(;++o<=e.length;){if(o<e.length)a=e.codePointAt(o);else{if(a===47)break;a=47}if(a===47){if(!(i===o-1||s===1))if(i!==o-1&&s===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(l=n.lastIndexOf(\"/\"),l!==n.length-1){l<0?(n=\"\",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf(\"/\")),i=o,s=0;continue}}else if(n.length>0){n=\"\",r=0,i=o,s=0;continue}}t&&(n=n.length>0?n+\"/..\":\"..\",r=2)}else n.length>0?n+=\"/\"+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,s=0}else a===46&&s>-1?s++:s=-1}return n}function kc(e){if(typeof e!=\"string\")throw new TypeError(\"Path must be a string. Received \"+JSON.stringify(e))}const voe={cwd:woe};function woe(){return\"/\"}function J0(e){return!!(e!==null&&typeof e==\"object\"&&\"href\"in e&&e.href&&\"protocol\"in e&&e.protocol&&e.auth===void 0)}function xoe(e){if(typeof e==\"string\")e=new URL(e);else if(!J0(e)){const t=new TypeError('The \"path\" argument must be of type string or an instance of URL. Received `'+e+\"`\");throw t.code=\"ERR_INVALID_ARG_TYPE\",t}if(e.protocol!==\"file:\"){const t=new TypeError(\"The URL must be of scheme file\");throw t.code=\"ERR_INVALID_URL_SCHEME\",t}return boe(e)}function boe(e){if(e.hostname!==\"\"){const r=new TypeError('File URL host must be \"localhost\" or empty on darwin');throw r.code=\"ERR_INVALID_FILE_URL_HOST\",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError(\"File URL path must not include encoded / characters\");throw i.code=\"ERR_INVALID_FILE_URL_PATH\",i}}return decodeURIComponent(t)}const Tg=[\"history\",\"path\",\"basename\",\"stem\",\"extname\",\"dirname\"];class rM{constructor(t){let n;t?J0(t)?n={path:t}:typeof t==\"string\"||Soe(t)?n={value:t}:n=t:n={},this.cwd=\"cwd\"in n?\"\":voe.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Tg.length;){const s=Tg[r];s in n&&n[s]!==void 0&&n[s]!==null&&(this[s]=s===\"history\"?[...n[s]]:n[s])}let i;for(i in n)Tg.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path==\"string\"?gr.basename(this.path):void 0}set basename(t){Ag(t,\"basename\"),_g(t,\"basename\"),this.path=gr.join(this.dirname||\"\",t)}get dirname(){return typeof this.path==\"string\"?gr.dirname(this.path):void 0}set dirname(t){gT(this.basename,\"dirname\"),this.path=gr.join(t||\"\",this.basename)}get extname(){return typeof this.path==\"string\"?gr.extname(this.path):void 0}set extname(t){if(_g(t,\"extname\"),gT(this.dirname,\"extname\"),t){if(t.codePointAt(0)!==46)throw new Error(\"`extname` must start with `.`\");if(t.includes(\".\",1))throw new Error(\"`extname` cannot contain multiple dots\")}this.path=gr.join(this.dirname,this.stem+(t||\"\"))}get path(){return this.history[this.history.length-1]}set path(t){J0(t)&&(t=xoe(t)),Ag(t,\"path\"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path==\"string\"?gr.basename(this.path,this.extname):void 0}set stem(t){Ag(t,\"stem\"),_g(t,\"stem\"),this.path=gr.join(this.dirname||\"\",t+(this.extname||\"\"))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new Rt(t,n,r);return this.path&&(i.name=this.path+\":\"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?\"\":typeof this.value==\"string\"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function _g(e,t){if(e&&e.includes(gr.sep))throw new Error(\"`\"+t+\"` cannot be a path: did not expect `\"+gr.sep+\"`\")}function Ag(e,t){if(!e)throw new Error(\"`\"+t+\"` cannot be empty\")}function gT(e,t){if(!e)throw new Error(\"Setting `\"+t+\"` requires `path` to be set too\")}function Soe(e){return!!(e&&typeof e==\"object\"&&\"byteLength\"in e&&\"byteOffset\"in e)}const koe=function(e){const r=this.constructor.prototype,i=r[e],s=function(){return i.apply(s,arguments)};return Object.setPrototypeOf(s,r),s},Eoe={}.hasOwnProperty;class r1 extends koe{constructor(){super(\"copy\"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=coe()}copy(){const t=new r1;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Cg(!0,{},this.namespace)),t}data(t,n){return typeof t==\"string\"?arguments.length===2?(Og(\"data\",this.frozen),this.namespace[t]=n,this):Eoe.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Og(\"data\",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i==\"function\"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=vf(t),r=this.parser||this.Parser;return Ng(\"parse\",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Ng(\"process\",this.parser||this.Parser),Pg(\"process\",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(s,o){const a=vf(t),l=r.parse(a);r.run(l,a,function(f,c,d){if(f||!c||!d)return u(f);const h=c,p=r.stringify(h,d);_oe(p)?d.value=p:d.result=p,u(f,d)});function u(f,c){f||!c?o(f):s?s(c):n(void 0,c)}}}processSync(t){let n=!1,r;return this.freeze(),Ng(\"processSync\",this.parser||this.Parser),Pg(\"processSync\",this.compiler||this.Compiler),this.process(t,i),vT(\"processSync\",\"process\",n),r;function i(s,o){n=!0,uT(s),r=o}}run(t,n,r){yT(t),this.freeze();const i=this.transformers;return!r&&typeof n==\"function\"&&(r=n,n=void 0),r?s(void 0,r):new Promise(s);function s(o,a){const l=vf(n);i.run(t,l,u);function u(f,c,d){const h=c||t;f?a(f):o?o(h):r(void 0,h,d)}}}runSync(t,n){let r=!1,i;return this.run(t,n,s),vT(\"runSync\",\"run\",r),i;function s(o,a){uT(o),i=a,r=!0}}stringify(t,n){this.freeze();const r=vf(n),i=this.compiler||this.Compiler;return Pg(\"stringify\",i),yT(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Og(\"use\",this.frozen),t!=null)if(typeof t==\"function\")l(t,n);else if(typeof t==\"object\")Array.isArray(t)?a(t):o(t);else throw new TypeError(\"Expected usable value, not `\"+t+\"`\");return this;function s(u){if(typeof u==\"function\")l(u,[]);else if(typeof u==\"object\")if(Array.isArray(u)){const[f,...c]=u;l(f,c)}else o(u);else throw new TypeError(\"Expected usable value, not `\"+u+\"`\")}function o(u){if(!(\"plugins\"in u)&&!(\"settings\"in u))throw new Error(\"Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither\");a(u.plugins),u.settings&&(i.settings=Cg(!0,i.settings,u.settings))}function a(u){let f=-1;if(u!=null)if(Array.isArray(u))for(;++f<u.length;){const c=u[f];s(c)}else throw new TypeError(\"Expected a list of plugins, not `\"+u+\"`\")}function l(u,f){let c=-1,d=-1;for(;++c<r.length;)if(r[c][0]===u){d=c;break}if(d===-1)r.push([u,...f]);else if(f.length>0){let[h,...p]=f;const m=r[d][1];Z0(m)&&Z0(h)&&(h=Cg(!0,m,h)),r[d]=[u,h,...p]}}}}const Coe=new r1().freeze();function Ng(e,t){if(typeof t!=\"function\")throw new TypeError(\"Cannot `\"+e+\"` without `parser`\")}function Pg(e,t){if(typeof t!=\"function\")throw new TypeError(\"Cannot `\"+e+\"` without `compiler`\")}function Og(e,t){if(t)throw new Error(\"Cannot call `\"+e+\"` on a frozen processor.\\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.\")}function yT(e){if(!Z0(e)||typeof e.type!=\"string\")throw new TypeError(\"Expected node, got `\"+e+\"`\")}function vT(e,t,n){if(!n)throw new Error(\"`\"+e+\"` finished async. Use `\"+t+\"` instead\")}function vf(e){return Toe(e)?e:new rM(e)}function Toe(e){return!!(e&&typeof e==\"object\"&&\"message\"in e&&\"messages\"in e)}function _oe(e){return typeof e==\"string\"||Aoe(e)}function Aoe(e){return!!(e&&typeof e==\"object\"&&\"byteLength\"in e&&\"byteOffset\"in e)}const Noe=\"https://github.com/remarkjs/react-markdown/blob/main/changelog.md\",wT=[],xT={allowDangerousHtml:!0},Poe=/^(https?|ircs?|mailto|xmpp)$/i,Ooe=[{from:\"astPlugins\",id:\"remove-buggy-html-in-markdown-parser\"},{from:\"allowDangerousHtml\",id:\"remove-buggy-html-in-markdown-parser\"},{from:\"allowNode\",id:\"replace-allownode-allowedtypes-and-disallowedtypes\",to:\"allowElement\"},{from:\"allowedTypes\",id:\"replace-allownode-allowedtypes-and-disallowedtypes\",to:\"allowedElements\"},{from:\"disallowedTypes\",id:\"replace-allownode-allowedtypes-and-disallowedtypes\",to:\"disallowedElements\"},{from:\"escapeHtml\",id:\"remove-buggy-html-in-markdown-parser\"},{from:\"includeElementIndex\",id:\"#remove-includeelementindex\"},{from:\"includeNodeIndex\",id:\"change-includenodeindex-to-includeelementindex\"},{from:\"linkTarget\",id:\"remove-linktarget\"},{from:\"plugins\",id:\"change-plugins-to-remarkplugins\",to:\"remarkPlugins\"},{from:\"rawSourcePos\",id:\"#remove-rawsourcepos\"},{from:\"renderers\",id:\"change-renderers-to-components\",to:\"components\"},{from:\"source\",id:\"change-source-to-children\",to:\"children\"},{from:\"sourcePos\",id:\"#remove-sourcepos\"},{from:\"transformImageUri\",id:\"#add-urltransform\",to:\"urlTransform\"},{from:\"transformLinkUri\",id:\"#add-urltransform\",to:\"urlTransform\"}];function Loe(e){const t=e.allowedElements,n=e.allowElement,r=e.children||\"\",i=e.className,s=e.components,o=e.disallowedElements,a=e.rehypePlugins||wT,l=e.remarkPlugins||wT,u=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...xT}:xT,f=e.skipHtml,c=e.unwrapDisallowed,d=e.urlTransform||Roe,h=Coe().use(pse).use(l).use(loe,u).use(a),p=new rM;typeof r==\"string\"&&(p.value=r);for(const v of Ooe)Object.hasOwn(e,v.from)&&(\"\"+v.from+(v.to?\"use `\"+v.to+\"` instead\":\"remove it\")+Noe+v.id,void 0);const m=h.parse(p);let w=h.runSync(m,p);return i&&(w={type:\"element\",tagName:\"div\",properties:{className:i},children:w.type===\"root\"?w.children:[w]}),n1(w,y),Xne(w,{Fragment:b.Fragment,components:s,ignoreInvalidStyle:!0,jsx:b.jsx,jsxs:b.jsxs,passKeys:!0,passNode:!0});function y(v,g,x){if(v.type===\"raw\"&&x&&typeof g==\"number\")return f?x.children.splice(g,1):x.children[g]={type:\"text\",value:v.value},g;if(v.type===\"element\"){let S;for(S in Sg)if(Object.hasOwn(Sg,S)&&Object.hasOwn(v.properties,S)){const k=v.properties[S],C=Sg[S];(C===null||C.includes(v.tagName))&&(v.properties[S]=d(String(k||\"\"),S,v))}}if(v.type===\"element\"){let S=t?!t.includes(v.tagName):o?o.includes(v.tagName):!1;if(!S&&n&&typeof g==\"number\"&&(S=!n(v,g,x)),S&&x&&typeof g==\"number\")return c&&v.children?x.children.splice(g,1,...v.children):x.children.splice(g,1),g}}}function Roe(e){const t=e.indexOf(\":\"),n=e.indexOf(\"?\"),r=e.indexOf(\"#\"),i=e.indexOf(\"/\");return t<0||i>-1&&t>i||n>-1&&t>n||r>-1&&t>r||Poe.test(e.slice(0,t))?e:\"\"}function bT(e,t){const n=String(e);if(typeof t!=\"string\")throw new TypeError(\"Expected character\");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function Ioe(e){if(typeof e!=\"string\")throw new TypeError(\"Expected a string\");return e.replace(/[|\\\\{}()[\\]^$+*?.]/g,\"\\\\$&\").replace(/-/g,\"\\\\x2d\")}function Doe(e,t,n){const i=Kp((n||{}).ignore||[]),s=Moe(t);let o=-1;for(;++o<s.length;)tM(e,\"text\",a);function a(u,f){let c=-1,d;for(;++c<f.length;){const h=f[c],p=d?d.children:void 0;if(i(h,p?p.indexOf(h):void 0,d))return;d=h}if(d)return l(u,f)}function l(u,f){const c=f[f.length-1],d=s[o][0],h=s[o][1];let p=0;const w=c.children.indexOf(u);let y=!1,v=[];d.lastIndex=0;let g=d.exec(u.value);for(;g;){const x=g.index,S={index:g.index,input:g.input,stack:[...f,u]};let k=h(...g,S);if(typeof k==\"string\"&&(k=k.length>0?{type:\"text\",value:k}:void 0),k===!1?d.lastIndex=x+1:(p!==x&&v.push({type:\"text\",value:u.value.slice(p,x)}),Array.isArray(k)?v.push(...k):k&&v.push(k),p=x+g[0].length,y=!0),!d.global)break;g=d.exec(u.value)}return y?(p<u.value.length&&v.push({type:\"text\",value:u.value.slice(p)}),c.children.splice(w,1,...v)):v=[u],w+v.length}}function Moe(e){const t=[];if(!Array.isArray(e))throw new TypeError(\"Expected find and replace tuple or list of tuples\");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([joe(i[0]),Foe(i[1])])}return t}function joe(e){return typeof e==\"string\"?new RegExp(Ioe(e),\"g\"):e}function Foe(e){return typeof e==\"function\"?e:function(){return e}}const Lg=\"phrasing\",Rg=[\"autolink\",\"link\",\"image\",\"label\"];function $oe(){return{transforms:[Koe],enter:{literalAutolink:Voe,literalAutolinkEmail:Ig,literalAutolinkHttp:Ig,literalAutolinkWww:Ig},exit:{literalAutolink:Woe,literalAutolinkEmail:Hoe,literalAutolinkHttp:zoe,literalAutolinkWww:Uoe}}}function Boe(){return{unsafe:[{character:\"@\",before:\"[+\\\\-.\\\\w]\",after:\"[\\\\-.\\\\w]\",inConstruct:Lg,notInConstruct:Rg},{character:\".\",before:\"[Ww]\",after:\"[\\\\-.\\\\w]\",inConstruct:Lg,notInConstruct:Rg},{character:\":\",before:\"[ps]\",after:\"\\\\/\",inConstruct:Lg,notInConstruct:Rg}]}}function Voe(e){this.enter({type:\"link\",title:null,url:\"\",children:[]},e)}function Ig(e){this.config.enter.autolinkProtocol.call(this,e)}function zoe(e){this.config.exit.autolinkProtocol.call(this,e)}function Uoe(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url=\"http://\"+this.sliceSerialize(e)}function Hoe(e){this.config.exit.autolinkEmail.call(this,e)}function Woe(e){this.exit(e)}function Koe(e){Doe(e,[[/(https?:\\/\\/|www(?=\\.))([-.\\w]+)([^ \\t\\r\\n]*)/gi,qoe],[new RegExp(\"(?<=^|\\\\s|\\\\p{P}|\\\\p{S})([-.\\\\w+]+)@([-\\\\w]+(?:\\\\.[-\\\\w]+)+)\",\"gu\"),Yoe]],{ignore:[\"link\",\"linkReference\"]})}function qoe(e,t,n,r,i){let s=\"\";if(!iM(i)||(/^w/i.test(t)&&(n=t+n,t=\"\",s=\"http://\"),!Goe(n)))return!1;const o=Xoe(n+r);if(!o[0])return!1;const a={type:\"link\",title:null,url:s+t+o[0],children:[{type:\"text\",value:t+o[0]}]};return o[1]?[a,{type:\"text\",value:o[1]}]:a}function Yoe(e,t,n,r){return!iM(r,!0)||/[-\\d_]$/.test(n)?!1:{type:\"link\",title:null,url:\"mailto:\"+t+\"@\"+n,children:[{type:\"text\",value:t+\"@\"+n}]}}function Goe(e){const t=e.split(\".\");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\\d]/.test(t[t.length-2])))}function Xoe(e){const t=/[!\"&'),.:;<>?\\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(\")\");const i=bT(e,\"(\");let s=bT(e,\")\");for(;r!==-1&&i>s;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(\")\"),s++;return[e,n]}function iM(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Zs(n)||Up(n))&&(!t||n!==47)}sM.peek=aae;function Qoe(){return{enter:{gfmFootnoteDefinition:Joe,gfmFootnoteDefinitionLabelString:eae,gfmFootnoteCall:rae,gfmFootnoteCallString:iae},exit:{gfmFootnoteDefinition:nae,gfmFootnoteDefinitionLabelString:tae,gfmFootnoteCall:oae,gfmFootnoteCallString:sae}}}function Zoe(){return{unsafe:[{character:\"[\",inConstruct:[\"phrasing\",\"label\",\"reference\"]}],handlers:{footnoteDefinition:lae,footnoteReference:sM}}}function Joe(e){this.enter({type:\"footnoteDefinition\",identifier:\"\",label:\"\",children:[]},e)}function eae(){this.buffer()}function tae(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=sr(this.sliceSerialize(e)).toLowerCase()}function nae(e){this.exit(e)}function rae(e){this.enter({type:\"footnoteReference\",identifier:\"\",label:\"\"},e)}function iae(){this.buffer()}function sae(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=sr(this.sliceSerialize(e)).toLowerCase()}function oae(e){this.exit(e)}function sM(e,t,n,r){const i=n.createTracker(r);let s=i.move(\"[^\");const o=n.enter(\"footnoteReference\"),a=n.enter(\"reference\");return s+=i.move(n.safe(n.associationId(e),{...i.current(),before:s,after:\"]\"})),a(),o(),s+=i.move(\"]\"),s}function aae(){return\"[\"}function lae(e,t,n,r){const i=n.createTracker(r);let s=i.move(\"[^\");const o=n.enter(\"footnoteDefinition\"),a=n.enter(\"label\");return s+=i.move(n.safe(n.associationId(e),{...i.current(),before:s,after:\"]\"})),a(),s+=i.move(\"]:\"+(e.children&&e.children.length>0?\" \":\"\")),i.shift(4),s+=i.move(n.indentLines(n.containerFlow(e,i.current()),uae)),o(),s}function uae(e,t,n){return t===0?e:(n?\"\":\"    \")+e}const cae=[\"autolink\",\"destinationLiteral\",\"destinationRaw\",\"reference\",\"titleQuote\",\"titleApostrophe\"];oM.peek=mae;function fae(){return{canContainEols:[\"delete\"],enter:{strikethrough:hae},exit:{strikethrough:pae}}}function dae(){return{unsafe:[{character:\"~\",inConstruct:\"phrasing\",notInConstruct:cae}],handlers:{delete:oM}}}function hae(e){this.enter({type:\"delete\",children:[]},e)}function pae(e){this.exit(e)}function oM(e,t,n,r){const i=n.createTracker(r),s=n.enter(\"strikethrough\");let o=i.move(\"~~\");return o+=n.containerPhrasing(e,{...i.current(),before:o,after:\"~\"}),o+=i.move(\"~~\"),s(),o}function mae(){return\"~\"}function gae(e,t={}){const n=(t.align||[]).concat(),r=t.stringLength||vae,i=[],s=[],o=[],a=[];let l=0,u=-1;for(;++u<e.length;){const p=[],m=[];let w=-1;for(e[u].length>l&&(l=e[u].length);++w<e[u].length;){const y=yae(e[u][w]);if(t.alignDelimiters!==!1){const v=r(y);m[w]=v,(a[w]===void 0||v>a[w])&&(a[w]=v)}p.push(y)}s[u]=p,o[u]=m}let f=-1;if(typeof n==\"object\"&&\"length\"in n)for(;++f<l;)i[f]=ST(n[f]);else{const p=ST(n);for(;++f<l;)i[f]=p}f=-1;const c=[],d=[];for(;++f<l;){const p=i[f];let m=\"\",w=\"\";p===99?(m=\":\",w=\":\"):p===108?m=\":\":p===114&&(w=\":\");let y=t.alignDelimiters===!1?1:Math.max(1,a[f]-m.length-w.length);const v=m+\"-\".repeat(y)+w;t.alignDelimiters!==!1&&(y=m.length+y+w.length,y>a[f]&&(a[f]=y),d[f]=y),c[f]=v}s.splice(1,0,c),o.splice(1,0,d),u=-1;const h=[];for(;++u<s.length;){const p=s[u],m=o[u];f=-1;const w=[];for(;++f<l;){const y=p[f]||\"\";let v=\"\",g=\"\";if(t.alignDelimiters!==!1){const x=a[f]-(m[f]||0),S=i[f];S===114?v=\" \".repeat(x):S===99?x%2?(v=\" \".repeat(x/2+.5),g=\" \".repeat(x/2-.5)):(v=\" \".repeat(x/2),g=v):g=\" \".repeat(x)}t.delimiterStart!==!1&&!f&&w.push(\"|\"),t.padding!==!1&&!(t.alignDelimiters===!1&&y===\"\")&&(t.delimiterStart!==!1||f)&&w.push(\" \"),t.alignDelimiters!==!1&&w.push(v),w.push(y),t.alignDelimiters!==!1&&w.push(g),t.padding!==!1&&w.push(\" \"),(t.delimiterEnd!==!1||f!==l-1)&&w.push(\"|\")}h.push(t.delimiterEnd===!1?w.join(\"\").replace(/ +$/,\"\"):w.join(\"\"))}return h.join(`\n`)}function yae(e){return e==null?\"\":String(e)}function vae(e){return e.length}function ST(e){const t=typeof e==\"string\"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function wae(e,t,n,r){const i=n.enter(\"blockquote\"),s=n.createTracker(r);s.move(\"> \"),s.shift(2);const o=n.indentLines(n.containerFlow(e,s.current()),xae);return i(),o}function xae(e,t,n){return\">\"+(n?\"\":\" \")+e}function bae(e,t){return kT(e,t.inConstruct,!0)&&!kT(e,t.notInConstruct,!1)}function kT(e,t,n){if(typeof t==\"string\"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function ET(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`\n`&&bae(n.stack,n.unsafe[i]))return/[ \\t]/.test(r.before)?\"\":\" \";return`\\\\\n`}function Sae(e,t){const n=String(e);let r=n.indexOf(t),i=r,s=0,o=0;if(typeof t!=\"string\")throw new TypeError(\"Expected substring\");for(;r!==-1;)r===i?++s>o&&(o=s):s=1,i=r+t.length,r=n.indexOf(t,i);return o}function kae(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \\r\\n]/.test(e.value)&&!/^[\\t ]*(?:[\\r\\n]|$)|(?:^|[\\r\\n])[\\t ]*$/.test(e.value))}function Eae(e){const t=e.options.fence||\"`\";if(t!==\"`\"&&t!==\"~\")throw new Error(\"Cannot serialize code with `\"+t+\"` for `options.fence`, expected `` ` `` or `~`\");return t}function Cae(e,t,n,r){const i=Eae(n),s=e.value||\"\",o=i===\"`\"?\"GraveAccent\":\"Tilde\";if(kae(e,n)){const c=n.enter(\"codeIndented\"),d=n.indentLines(s,Tae);return c(),d}const a=n.createTracker(r),l=i.repeat(Math.max(Sae(s,i)+1,3)),u=n.enter(\"codeFenced\");let f=a.move(l);if(e.lang){const c=n.enter(`codeFencedLang${o}`);f+=a.move(n.safe(e.lang,{before:f,after:\" \",encode:[\"`\"],...a.current()})),c()}if(e.lang&&e.meta){const c=n.enter(`codeFencedMeta${o}`);f+=a.move(\" \"),f+=a.move(n.safe(e.meta,{before:f,after:`\n`,encode:[\"`\"],...a.current()})),c()}return f+=a.move(`\n`),s&&(f+=a.move(s+`\n`)),f+=a.move(l),u(),f}function Tae(e,t,n){return(n?\"\":\"    \")+e}function i1(e){const t=e.options.quote||'\"';if(t!=='\"'&&t!==\"'\")throw new Error(\"Cannot serialize title with `\"+t+\"` for `options.quote`, expected `\\\"`, or `'`\");return t}function _ae(e,t,n,r){const i=i1(n),s=i==='\"'?\"Quote\":\"Apostrophe\",o=n.enter(\"definition\");let a=n.enter(\"label\");const l=n.createTracker(r);let u=l.move(\"[\");return u+=l.move(n.safe(n.associationId(e),{before:u,after:\"]\",...l.current()})),u+=l.move(\"]: \"),a(),!e.url||/[\\0- \\u007F]/.test(e.url)?(a=n.enter(\"destinationLiteral\"),u+=l.move(\"<\"),u+=l.move(n.safe(e.url,{before:u,after:\">\",...l.current()})),u+=l.move(\">\")):(a=n.enter(\"destinationRaw\"),u+=l.move(n.safe(e.url,{before:u,after:e.title?\" \":`\n`,...l.current()}))),a(),e.title&&(a=n.enter(`title${s}`),u+=l.move(\" \"+i),u+=l.move(n.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),a()),o(),u}function Aae(e){const t=e.options.emphasis||\"*\";if(t!==\"*\"&&t!==\"_\")throw new Error(\"Cannot serialize emphasis with `\"+t+\"` for `options.emphasis`, expected `*`, or `_`\");return t}aM.peek=Nae;function aM(e,t,n,r){const i=Aae(n),s=n.enter(\"emphasis\"),o=n.createTracker(r);let a=o.move(i);return a+=o.move(n.containerPhrasing(e,{before:a,after:i,...o.current()})),a+=o.move(i),s(),a}function Nae(e,t,n){return n.options.emphasis||\"*\"}function Pae(e,t){let n=!1;return n1(e,function(r){if(\"value\"in r&&/\\r?\\n|\\r/.test(r.value)||r.type===\"break\")return n=!0,X0}),!!((!e.depth||e.depth<3)&&Gx(e)&&(t.options.setext||n))}function Oae(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),s=n.createTracker(r);if(Pae(e,n)){const f=n.enter(\"headingSetext\"),c=n.enter(\"phrasing\"),d=n.containerPhrasing(e,{...s.current(),before:`\n`,after:`\n`});return c(),f(),d+`\n`+(i===1?\"=\":\"-\").repeat(d.length-(Math.max(d.lastIndexOf(\"\\r\"),d.lastIndexOf(`\n`))+1))}const o=\"#\".repeat(i),a=n.enter(\"headingAtx\"),l=n.enter(\"phrasing\");s.move(o+\" \");let u=n.containerPhrasing(e,{before:\"# \",after:`\n`,...s.current()});return/^[\\t ]/.test(u)&&(u=\"&#x\"+u.charCodeAt(0).toString(16).toUpperCase()+\";\"+u.slice(1)),u=u?o+\" \"+u:o,n.options.closeAtx&&(u+=\" \"+o),l(),a(),u}lM.peek=Lae;function lM(e){return e.value||\"\"}function Lae(){return\"<\"}uM.peek=Rae;function uM(e,t,n,r){const i=i1(n),s=i==='\"'?\"Quote\":\"Apostrophe\",o=n.enter(\"image\");let a=n.enter(\"label\");const l=n.createTracker(r);let u=l.move(\"![\");return u+=l.move(n.safe(e.alt,{before:u,after:\"]\",...l.current()})),u+=l.move(\"](\"),a(),!e.url&&e.title||/[\\0- \\u007F]/.test(e.url)?(a=n.enter(\"destinationLiteral\"),u+=l.move(\"<\"),u+=l.move(n.safe(e.url,{before:u,after:\">\",...l.current()})),u+=l.move(\">\")):(a=n.enter(\"destinationRaw\"),u+=l.move(n.safe(e.url,{before:u,after:e.title?\" \":\")\",...l.current()}))),a(),e.title&&(a=n.enter(`title${s}`),u+=l.move(\" \"+i),u+=l.move(n.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),a()),u+=l.move(\")\"),o(),u}function Rae(){return\"!\"}cM.peek=Iae;function cM(e,t,n,r){const i=e.referenceType,s=n.enter(\"imageReference\");let o=n.enter(\"label\");const a=n.createTracker(r);let l=a.move(\"![\");const u=n.safe(e.alt,{before:l,after:\"]\",...a.current()});l+=a.move(u+\"][\"),o();const f=n.stack;n.stack=[],o=n.enter(\"reference\");const c=n.safe(n.associationId(e),{before:l,after:\"]\",...a.current()});return o(),n.stack=f,s(),i===\"full\"||!u||u!==c?l+=a.move(c+\"]\"):i===\"shortcut\"?l=l.slice(0,-1):l+=a.move(\"]\"),l}function Iae(){return\"!\"}fM.peek=Dae;function fM(e,t,n){let r=e.value||\"\",i=\"`\",s=-1;for(;new RegExp(\"(^|[^`])\"+i+\"([^`]|$)\").test(r);)i+=\"`\";for(/[^ \\r\\n]/.test(r)&&(/^[ \\r\\n]/.test(r)&&/[ \\r\\n]$/.test(r)||/^`|`$/.test(r))&&(r=\" \"+r+\" \");++s<n.unsafe.length;){const o=n.unsafe[s],a=n.compilePattern(o);let l;if(o.atBreak)for(;l=a.exec(r);){let u=l.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+\" \"+r.slice(l.index+1)}}return i+r+i}function Dae(){return\"`\"}function dM(e,t){const n=Gx(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type===\"text\"&&(n===e.url||\"mailto:\"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\\0- <>\\u007F]/.test(e.url))}hM.peek=Mae;function hM(e,t,n,r){const i=i1(n),s=i==='\"'?\"Quote\":\"Apostrophe\",o=n.createTracker(r);let a,l;if(dM(e,n)){const f=n.stack;n.stack=[],a=n.enter(\"autolink\");let c=o.move(\"<\");return c+=o.move(n.containerPhrasing(e,{before:c,after:\">\",...o.current()})),c+=o.move(\">\"),a(),n.stack=f,c}a=n.enter(\"link\"),l=n.enter(\"label\");let u=o.move(\"[\");return u+=o.move(n.containerPhrasing(e,{before:u,after:\"](\",...o.current()})),u+=o.move(\"](\"),l(),!e.url&&e.title||/[\\0- \\u007F]/.test(e.url)?(l=n.enter(\"destinationLiteral\"),u+=o.move(\"<\"),u+=o.move(n.safe(e.url,{before:u,after:\">\",...o.current()})),u+=o.move(\">\")):(l=n.enter(\"destinationRaw\"),u+=o.move(n.safe(e.url,{before:u,after:e.title?\" \":\")\",...o.current()}))),l(),e.title&&(l=n.enter(`title${s}`),u+=o.move(\" \"+i),u+=o.move(n.safe(e.title,{before:u,after:i,...o.current()})),u+=o.move(i),l()),u+=o.move(\")\"),a(),u}function Mae(e,t,n){return dM(e,n)?\"<\":\"[\"}pM.peek=jae;function pM(e,t,n,r){const i=e.referenceType,s=n.enter(\"linkReference\");let o=n.enter(\"label\");const a=n.createTracker(r);let l=a.move(\"[\");const u=n.containerPhrasing(e,{before:l,after:\"]\",...a.current()});l+=a.move(u+\"][\"),o();const f=n.stack;n.stack=[],o=n.enter(\"reference\");const c=n.safe(n.associationId(e),{before:l,after:\"]\",...a.current()});return o(),n.stack=f,s(),i===\"full\"||!u||u!==c?l+=a.move(c+\"]\"):i===\"shortcut\"?l=l.slice(0,-1):l+=a.move(\"]\"),l}function jae(){return\"[\"}function s1(e){const t=e.options.bullet||\"*\";if(t!==\"*\"&&t!==\"+\"&&t!==\"-\")throw new Error(\"Cannot serialize items with `\"+t+\"` for `options.bullet`, expected `*`, `+`, or `-`\");return t}function Fae(e){const t=s1(e),n=e.options.bulletOther;if(!n)return t===\"*\"?\"-\":\"*\";if(n!==\"*\"&&n!==\"+\"&&n!==\"-\")throw new Error(\"Cannot serialize items with `\"+n+\"` for `options.bulletOther`, expected `*`, `+`, or `-`\");if(n===t)throw new Error(\"Expected `bullet` (`\"+t+\"`) and `bulletOther` (`\"+n+\"`) to be different\");return n}function $ae(e){const t=e.options.bulletOrdered||\".\";if(t!==\".\"&&t!==\")\")throw new Error(\"Cannot serialize items with `\"+t+\"` for `options.bulletOrdered`, expected `.` or `)`\");return t}function mM(e){const t=e.options.rule||\"*\";if(t!==\"*\"&&t!==\"-\"&&t!==\"_\")throw new Error(\"Cannot serialize rules with `\"+t+\"` for `options.rule`, expected `*`, `-`, or `_`\");return t}function Bae(e,t,n,r){const i=n.enter(\"list\"),s=n.bulletCurrent;let o=e.ordered?$ae(n):s1(n);const a=e.ordered?o===\".\"?\")\":\".\":Fae(n);let l=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((o===\"*\"||o===\"-\")&&f&&(!f.children||!f.children[0])&&n.stack[n.stack.length-1]===\"list\"&&n.stack[n.stack.length-2]===\"listItem\"&&n.stack[n.stack.length-3]===\"list\"&&n.stack[n.stack.length-4]===\"listItem\"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(l=!0),mM(n)===o&&f){let c=-1;for(;++c<e.children.length;){const d=e.children[c];if(d&&d.type===\"listItem\"&&d.children&&d.children[0]&&d.children[0].type===\"thematicBreak\"){l=!0;break}}}}l&&(o=a),n.bulletCurrent=o;const u=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=s,i(),u}function Vae(e){const t=e.options.listItemIndent||\"one\";if(t!==\"tab\"&&t!==\"one\"&&t!==\"mixed\")throw new Error(\"Cannot serialize items with `\"+t+\"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`\");return t}function zae(e,t,n,r){const i=Vae(n);let s=n.bulletCurrent||s1(n);t&&t.type===\"list\"&&t.ordered&&(s=(typeof t.start==\"number\"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+s);let o=s.length+1;(i===\"tab\"||i===\"mixed\"&&(t&&t.type===\"list\"&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);const a=n.createTracker(r);a.move(s+\" \".repeat(o-s.length)),a.shift(o);const l=n.enter(\"listItem\"),u=n.indentLines(n.containerFlow(e,a.current()),f);return l(),u;function f(c,d,h){return d?(h?\"\":\" \".repeat(o))+c:(h?s:s+\" \".repeat(o-s.length))+c}}function Uae(e,t,n,r){const i=n.enter(\"paragraph\"),s=n.enter(\"phrasing\"),o=n.containerPhrasing(e,r);return s(),i(),o}const Hae=Kp([\"break\",\"delete\",\"emphasis\",\"footnote\",\"footnoteReference\",\"image\",\"imageReference\",\"inlineCode\",\"inlineMath\",\"link\",\"linkReference\",\"mdxJsxTextElement\",\"mdxTextExpression\",\"strong\",\"text\",\"textDirective\"]);function Wae(e,t,n,r){return(e.children.some(function(o){return Hae(o)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Kae(e){const t=e.options.strong||\"*\";if(t!==\"*\"&&t!==\"_\")throw new Error(\"Cannot serialize strong with `\"+t+\"` for `options.strong`, expected `*`, or `_`\");return t}gM.peek=qae;function gM(e,t,n,r){const i=Kae(n),s=n.enter(\"strong\"),o=n.createTracker(r);let a=o.move(i+i);return a+=o.move(n.containerPhrasing(e,{before:a,after:i,...o.current()})),a+=o.move(i+i),s(),a}function qae(e,t,n){return n.options.strong||\"*\"}function Yae(e,t,n,r){return n.safe(e.value,r)}function Gae(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error(\"Cannot serialize rules with repetition `\"+t+\"` for `options.ruleRepetition`, expected `3` or more\");return t}function Xae(e,t,n){const r=(mM(n)+(n.options.ruleSpaces?\" \":\"\")).repeat(Gae(n));return n.options.ruleSpaces?r.slice(0,-1):r}const yM={blockquote:wae,break:ET,code:Cae,definition:_ae,emphasis:aM,hardBreak:ET,heading:Oae,html:lM,image:uM,imageReference:cM,inlineCode:fM,link:hM,linkReference:pM,list:Bae,listItem:zae,paragraph:Uae,root:Wae,strong:gM,text:Yae,thematicBreak:Xae};function Qae(){return{enter:{table:Zae,tableData:CT,tableHeader:CT,tableRow:ele},exit:{codeText:tle,table:Jae,tableData:Dg,tableHeader:Dg,tableRow:Dg}}}function Zae(e){const t=e._align;this.enter({type:\"table\",align:t.map(function(n){return n===\"none\"?null:n}),children:[]},e),this.data.inTable=!0}function Jae(e){this.exit(e),this.data.inTable=void 0}function ele(e){this.enter({type:\"tableRow\",children:[]},e)}function Dg(e){this.exit(e)}function CT(e){this.enter({type:\"tableCell\",children:[]},e)}function tle(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\\\([\\\\|])/g,nle));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function nle(e,t){return t===\"|\"?t:e}function rle(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,s=n?\" \":\"|\";return{unsafe:[{character:\"\\r\",inConstruct:\"tableCell\"},{character:`\n`,inConstruct:\"tableCell\"},{atBreak:!0,character:\"|\",after:\"[\t :-]\"},{character:\"|\",inConstruct:\"tableCell\"},{atBreak:!0,character:\":\",after:\"-\"},{atBreak:!0,character:\"-\",after:\"[:|-]\"}],handlers:{inlineCode:d,table:o,tableCell:l,tableRow:a}};function o(h,p,m,w){return u(f(h,m,w),h.align)}function a(h,p,m,w){const y=c(h,m,w),v=u([y]);return v.slice(0,v.indexOf(`\n`))}function l(h,p,m,w){const y=m.enter(\"tableCell\"),v=m.enter(\"phrasing\"),g=m.containerPhrasing(h,{...w,before:s,after:s});return v(),y(),g}function u(h,p){return gae(h,{align:p,alignDelimiters:r,padding:n,stringLength:i})}function f(h,p,m){const w=h.children;let y=-1;const v=[],g=p.enter(\"table\");for(;++y<w.length;)v[y]=c(w[y],p,m);return g(),v}function c(h,p,m){const w=h.children;let y=-1;const v=[],g=p.enter(\"tableRow\");for(;++y<w.length;)v[y]=l(w[y],h,p,m);return g(),v}function d(h,p,m){let w=yM.inlineCode(h,p,m);return m.stack.includes(\"tableCell\")&&(w=w.replace(/\\|/g,\"\\\\$&\")),w}}function ile(){return{exit:{taskListCheckValueChecked:TT,taskListCheckValueUnchecked:TT,paragraph:ole}}}function sle(){return{unsafe:[{atBreak:!0,character:\"-\",after:\"[:|-]\"}],handlers:{listItem:ale}}}function TT(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type===\"taskListCheckValueChecked\"}function ole(e){const t=this.stack[this.stack.length-2];if(t&&t.type===\"listItem\"&&typeof t.checked==\"boolean\"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type===\"text\"){const i=t.children;let s=-1,o;for(;++s<i.length;){const a=i[s];if(a.type===\"paragraph\"){o=a;break}}o===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset==\"number\"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function ale(e,t,n,r){const i=e.children[0],s=typeof e.checked==\"boolean\"&&i&&i.type===\"paragraph\",o=\"[\"+(e.checked?\"x\":\" \")+\"] \",a=n.createTracker(r);s&&a.move(o);let l=yM.listItem(e,t,n,{...r,...a.current()});return s&&(l=l.replace(/^(?:[*+-]|\\d+\\.)([\\r\\n]| {1,3})/,u)),l;function u(f){return f+o}}function lle(){return[$oe(),Qoe(),fae(),Qae(),ile()]}function ule(e){return{extensions:[Boe(),Zoe(),dae(),rle(e),sle()]}}const cle={tokenize:gle,partial:!0},vM={tokenize:yle,partial:!0},wM={tokenize:vle,partial:!0},xM={tokenize:wle,partial:!0},fle={tokenize:xle,partial:!0},bM={name:\"wwwAutolink\",tokenize:ple,previous:kM},SM={name:\"protocolAutolink\",tokenize:mle,previous:EM},pi={name:\"emailAutolink\",tokenize:hle,previous:CM},Lr={};function dle(){return{text:Lr}}let ps=48;for(;ps<123;)Lr[ps]=pi,ps++,ps===58?ps=65:ps===91&&(ps=97);Lr[43]=pi;Lr[45]=pi;Lr[46]=pi;Lr[95]=pi;Lr[72]=[pi,SM];Lr[104]=[pi,SM];Lr[87]=[pi,bM];Lr[119]=[pi,bM];function hle(e,t,n){const r=this;let i,s;return o;function o(c){return!ev(c)||!CM.call(r,r.previous)||o1(r.events)?n(c):(e.enter(\"literalAutolink\"),e.enter(\"literalAutolinkEmail\"),a(c))}function a(c){return ev(c)?(e.consume(c),a):c===64?(e.consume(c),l):n(c)}function l(c){return c===46?e.check(fle,f,u)(c):c===45||c===95||Nt(c)?(s=!0,e.consume(c),l):f(c)}function u(c){return e.consume(c),i=!0,l}function f(c){return s&&i&&$t(r.previous)?(e.exit(\"literalAutolinkEmail\"),e.exit(\"literalAutolink\"),t(c)):n(c)}}function ple(e,t,n){const r=this;return i;function i(o){return o!==87&&o!==119||!kM.call(r,r.previous)||o1(r.events)?n(o):(e.enter(\"literalAutolink\"),e.enter(\"literalAutolinkWww\"),e.check(cle,e.attempt(vM,e.attempt(wM,s),n),n)(o))}function s(o){return e.exit(\"literalAutolinkWww\"),e.exit(\"literalAutolink\"),t(o)}}function mle(e,t,n){const r=this;let i=\"\",s=!1;return o;function o(c){return(c===72||c===104)&&EM.call(r,r.previous)&&!o1(r.events)?(e.enter(\"literalAutolink\"),e.enter(\"literalAutolinkHttp\"),i+=String.fromCodePoint(c),e.consume(c),a):n(c)}function a(c){if($t(c)&&i.length<5)return i+=String.fromCodePoint(c),e.consume(c),a;if(c===58){const d=i.toLowerCase();if(d===\"http\"||d===\"https\")return e.consume(c),l}return n(c)}function l(c){return c===47?(e.consume(c),s?u:(s=!0,l)):n(c)}function u(c){return c===null||yh(c)||Re(c)||Zs(c)||Up(c)?n(c):e.attempt(vM,e.attempt(wM,f),n)(c)}function f(c){return e.exit(\"literalAutolinkHttp\"),e.exit(\"literalAutolink\"),t(c)}}function gle(e,t,n){let r=0;return i;function i(o){return(o===87||o===119)&&r<3?(r++,e.consume(o),i):o===46&&r===3?(e.consume(o),s):n(o)}function s(o){return o===null?n(o):t(o)}}function yle(e,t,n){let r,i,s;return o;function o(u){return u===46||u===95?e.check(xM,l,a)(u):u===null||Re(u)||Zs(u)||u!==45&&Up(u)?l(u):(s=!0,e.consume(u),o)}function a(u){return u===95?r=!0:(i=r,r=void 0),e.consume(u),o}function l(u){return i||r||!s?n(u):t(u)}}function vle(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?s(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(xM,t,s)(o):o===null||Re(o)||Zs(o)?t(o):(e.consume(o),i)}function s(o){return o===41&&r++,e.consume(o),i}}function wle(e,t,n){return r;function r(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(e.consume(a),r):a===38?(e.consume(a),s):a===93?(e.consume(a),i):a===60||a===null||Re(a)||Zs(a)?t(a):n(a)}function i(a){return a===null||a===40||a===91||Re(a)||Zs(a)?t(a):r(a)}function s(a){return $t(a)?o(a):n(a)}function o(a){return a===59?(e.consume(a),r):$t(a)?(e.consume(a),o):n(a)}}function xle(e,t,n){return r;function r(s){return e.consume(s),i}function i(s){return Nt(s)?n(s):t(s)}}function kM(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Re(e)}function EM(e){return!$t(e)}function CM(e){return!(e===47||ev(e))}function ev(e){return e===43||e===45||e===46||e===95||Nt(e)}function o1(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type===\"labelLink\"||r.type===\"labelImage\")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const ble={tokenize:Nle,partial:!0};function Sle(){return{document:{91:{name:\"gfmFootnoteDefinition\",tokenize:Tle,continuation:{tokenize:_le},exit:Ale}},text:{91:{name:\"gfmFootnoteCall\",tokenize:Cle},93:{name:\"gfmPotentialFootnoteCall\",add:\"after\",tokenize:kle,resolveTo:Ele}}}}function kle(e,t,n){const r=this;let i=r.events.length;const s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;i--;){const l=r.events[i][1];if(l.type===\"labelImage\"){o=l;break}if(l.type===\"gfmFootnoteCall\"||l.type===\"labelLink\"||l.type===\"label\"||l.type===\"image\"||l.type===\"link\")break}return a;function a(l){if(!o||!o._balanced)return n(l);const u=sr(r.sliceSerialize({start:o.end,end:r.now()}));return u.codePointAt(0)!==94||!s.includes(u.slice(1))?n(l):(e.enter(\"gfmFootnoteCallLabelMarker\"),e.consume(l),e.exit(\"gfmFootnoteCallLabelMarker\"),t(l))}}function Ele(e,t){let n=e.length;for(;n--;)if(e[n][1].type===\"labelImage\"&&e[n][0]===\"enter\"){e[n][1];break}e[n+1][1].type=\"data\",e[n+3][1].type=\"gfmFootnoteCallLabelMarker\";const r={type:\"gfmFootnoteCall\",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:\"gfmFootnoteCallMarker\",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const s={type:\"gfmFootnoteCallString\",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:\"chunkString\",contentType:\"string\",start:Object.assign({},s.start),end:Object.assign({},s.end)},a=[e[n+1],e[n+2],[\"enter\",r,t],e[n+3],e[n+4],[\"enter\",i,t],[\"exit\",i,t],[\"enter\",s,t],[\"enter\",o,t],[\"exit\",o,t],[\"exit\",s,t],e[e.length-2],e[e.length-1],[\"exit\",r,t]];return e.splice(n,e.length-n+1,...a),e}function Cle(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s=0,o;return a;function a(c){return e.enter(\"gfmFootnoteCall\"),e.enter(\"gfmFootnoteCallLabelMarker\"),e.consume(c),e.exit(\"gfmFootnoteCallLabelMarker\"),l}function l(c){return c!==94?n(c):(e.enter(\"gfmFootnoteCallMarker\"),e.consume(c),e.exit(\"gfmFootnoteCallMarker\"),e.enter(\"gfmFootnoteCallString\"),e.enter(\"chunkString\").contentType=\"string\",u)}function u(c){if(s>999||c===93&&!o||c===null||c===91||Re(c))return n(c);if(c===93){e.exit(\"chunkString\");const d=e.exit(\"gfmFootnoteCallString\");return i.includes(sr(r.sliceSerialize(d)))?(e.enter(\"gfmFootnoteCallLabelMarker\"),e.consume(c),e.exit(\"gfmFootnoteCallLabelMarker\"),e.exit(\"gfmFootnoteCall\"),t):n(c)}return Re(c)||(o=!0),s++,e.consume(c),c===92?f:u}function f(c){return c===91||c===92||c===93?(e.consume(c),s++,u):u(c)}}function Tle(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,o=0,a;return l;function l(p){return e.enter(\"gfmFootnoteDefinition\")._container=!0,e.enter(\"gfmFootnoteDefinitionLabel\"),e.enter(\"gfmFootnoteDefinitionLabelMarker\"),e.consume(p),e.exit(\"gfmFootnoteDefinitionLabelMarker\"),u}function u(p){return p===94?(e.enter(\"gfmFootnoteDefinitionMarker\"),e.consume(p),e.exit(\"gfmFootnoteDefinitionMarker\"),e.enter(\"gfmFootnoteDefinitionLabelString\"),e.enter(\"chunkString\").contentType=\"string\",f):n(p)}function f(p){if(o>999||p===93&&!a||p===null||p===91||Re(p))return n(p);if(p===93){e.exit(\"chunkString\");const m=e.exit(\"gfmFootnoteDefinitionLabelString\");return s=sr(r.sliceSerialize(m)),e.enter(\"gfmFootnoteDefinitionLabelMarker\"),e.consume(p),e.exit(\"gfmFootnoteDefinitionLabelMarker\"),e.exit(\"gfmFootnoteDefinitionLabel\"),d}return Re(p)||(a=!0),o++,e.consume(p),p===92?c:f}function c(p){return p===91||p===92||p===93?(e.consume(p),o++,f):f(p)}function d(p){return p===58?(e.enter(\"definitionMarker\"),e.consume(p),e.exit(\"definitionMarker\"),i.includes(s)||i.push(s),Ce(e,h,\"gfmFootnoteDefinitionWhitespace\")):n(p)}function h(p){return t(p)}}function _le(e,t,n){return e.check(Sc,t,e.attempt(ble,t,n))}function Ale(e){e.exit(\"gfmFootnoteDefinition\")}function Nle(e,t,n){const r=this;return Ce(e,i,\"gfmFootnoteDefinitionIndent\",5);function i(s){const o=r.events[r.events.length-1];return o&&o[1].type===\"gfmFootnoteDefinitionIndent\"&&o[2].sliceSerialize(o[1],!0).length===4?t(s):n(s)}}function Ple(e){let n=(e||{}).singleTilde;const r={name:\"strikethrough\",tokenize:s,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(o,a){let l=-1;for(;++l<o.length;)if(o[l][0]===\"enter\"&&o[l][1].type===\"strikethroughSequenceTemporary\"&&o[l][1]._close){let u=l;for(;u--;)if(o[u][0]===\"exit\"&&o[u][1].type===\"strikethroughSequenceTemporary\"&&o[u][1]._open&&o[l][1].end.offset-o[l][1].start.offset===o[u][1].end.offset-o[u][1].start.offset){o[l][1].type=\"strikethroughSequence\",o[u][1].type=\"strikethroughSequence\";const f={type:\"strikethrough\",start:Object.assign({},o[u][1].start),end:Object.assign({},o[l][1].end)},c={type:\"strikethroughText\",start:Object.assign({},o[u][1].end),end:Object.assign({},o[l][1].start)},d=[[\"enter\",f,a],[\"enter\",o[u][1],a],[\"exit\",o[u][1],a],[\"enter\",c,a]],h=a.parser.constructs.insideSpan.null;h&&jn(d,d.length,0,Hp(h,o.slice(u+1,l),a)),jn(d,d.length,0,[[\"exit\",c,a],[\"enter\",o[l][1],a],[\"exit\",o[l][1],a],[\"exit\",f,a]]),jn(o,u-1,l-u+3,d),l=u+d.length-2;break}}for(l=-1;++l<o.length;)o[l][1].type===\"strikethroughSequenceTemporary\"&&(o[l][1].type=\"data\");return o}function s(o,a,l){const u=this.previous,f=this.events;let c=0;return d;function d(p){return u===126&&f[f.length-1][1].type!==\"characterEscape\"?l(p):(o.enter(\"strikethroughSequenceTemporary\"),h(p))}function h(p){const m=vh(u);if(p===126)return c>1?l(p):(o.consume(p),c++,h);if(c<2&&!n)return l(p);const w=o.exit(\"strikethroughSequenceTemporary\"),y=vh(p);return w._open=!y||y===2&&!!m,w._close=!m||m===2&&!!y,a(p)}}}class Ole{constructor(){this.map=[]}add(t,n,r){Lle(this,t,n,r)}consume(t){if(this.map.sort(function(s,o){return s[0]-o[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push([...t]),t.length=0;let i=r.pop();for(;i;)t.push(...i),i=r.pop();this.map.length=0}}function Lle(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function Rle(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]===\"enter\")i[1].type===\"tableContent\"&&r.push(e[t+1][1].type===\"tableDelimiterMarker\"?\"left\":\"none\");else if(i[1].type===\"tableContent\"){if(e[t-1][1].type===\"tableDelimiterMarker\"){const s=r.length-1;r[s]=r[s]===\"left\"?\"center\":\"right\"}}else if(i[1].type===\"tableDelimiterRow\")break}else i[0]===\"enter\"&&i[1].type===\"tableDelimiterRow\"&&(n=!0);t+=1}return r}function Ile(){return{flow:{null:{name:\"table\",tokenize:Dle,resolveAll:Mle}}}}function Dle(e,t,n){const r=this;let i=0,s=0,o;return a;function a(A){let j=r.events.length-1;for(;j>-1;){const N=r.events[j][1].type;if(N===\"lineEnding\"||N===\"linePrefix\")j--;else break}const L=j>-1?r.events[j][1].type:null,B=L===\"tableHead\"||L===\"tableRow\"?k:l;return B===k&&r.parser.lazy[r.now().line]?n(A):B(A)}function l(A){return e.enter(\"tableHead\"),e.enter(\"tableRow\"),u(A)}function u(A){return A===124||(o=!0,s+=1),f(A)}function f(A){return A===null?n(A):fe(A)?s>1?(s=0,r.interrupt=!0,e.exit(\"tableRow\"),e.enter(\"lineEnding\"),e.consume(A),e.exit(\"lineEnding\"),h):n(A):Se(A)?Ce(e,f,\"whitespace\")(A):(s+=1,o&&(o=!1,i+=1),A===124?(e.enter(\"tableCellDivider\"),e.consume(A),e.exit(\"tableCellDivider\"),o=!0,f):(e.enter(\"data\"),c(A)))}function c(A){return A===null||A===124||Re(A)?(e.exit(\"data\"),f(A)):(e.consume(A),A===92?d:c)}function d(A){return A===92||A===124?(e.consume(A),c):c(A)}function h(A){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(A):(e.enter(\"tableDelimiterRow\"),o=!1,Se(A)?Ce(e,p,\"linePrefix\",r.parser.constructs.disable.null.includes(\"codeIndented\")?void 0:4)(A):p(A))}function p(A){return A===45||A===58?w(A):A===124?(o=!0,e.enter(\"tableCellDivider\"),e.consume(A),e.exit(\"tableCellDivider\"),m):S(A)}function m(A){return Se(A)?Ce(e,w,\"whitespace\")(A):w(A)}function w(A){return A===58?(s+=1,o=!0,e.enter(\"tableDelimiterMarker\"),e.consume(A),e.exit(\"tableDelimiterMarker\"),y):A===45?(s+=1,y(A)):A===null||fe(A)?x(A):S(A)}function y(A){return A===45?(e.enter(\"tableDelimiterFiller\"),v(A)):S(A)}function v(A){return A===45?(e.consume(A),v):A===58?(o=!0,e.exit(\"tableDelimiterFiller\"),e.enter(\"tableDelimiterMarker\"),e.consume(A),e.exit(\"tableDelimiterMarker\"),g):(e.exit(\"tableDelimiterFiller\"),g(A))}function g(A){return Se(A)?Ce(e,x,\"whitespace\")(A):x(A)}function x(A){return A===124?p(A):A===null||fe(A)?!o||i!==s?S(A):(e.exit(\"tableDelimiterRow\"),e.exit(\"tableHead\"),t(A)):S(A)}function S(A){return n(A)}function k(A){return e.enter(\"tableRow\"),C(A)}function C(A){return A===124?(e.enter(\"tableCellDivider\"),e.consume(A),e.exit(\"tableCellDivider\"),C):A===null||fe(A)?(e.exit(\"tableRow\"),t(A)):Se(A)?Ce(e,C,\"whitespace\")(A):(e.enter(\"data\"),T(A))}function T(A){return A===null||A===124||Re(A)?(e.exit(\"data\"),C(A)):(e.consume(A),A===92?O:T)}function O(A){return A===92||A===124?(e.consume(A),T):T(A)}}function Mle(e,t){let n=-1,r=!0,i=0,s=[0,0,0,0],o=[0,0,0,0],a=!1,l=0,u,f,c;const d=new Ole;for(;++n<e.length;){const h=e[n],p=h[1];h[0]===\"enter\"?p.type===\"tableHead\"?(a=!1,l!==0&&(_T(d,t,l,u,f),f=void 0,l=0),u={type:\"table\",start:Object.assign({},p.start),end:Object.assign({},p.end)},d.add(n,0,[[\"enter\",u,t]])):p.type===\"tableRow\"||p.type===\"tableDelimiterRow\"?(r=!0,c=void 0,s=[0,0,0,0],o=[0,n+1,0,0],a&&(a=!1,f={type:\"tableBody\",start:Object.assign({},p.start),end:Object.assign({},p.end)},d.add(n,0,[[\"enter\",f,t]])),i=p.type===\"tableDelimiterRow\"?2:f?3:1):i&&(p.type===\"data\"||p.type===\"tableDelimiterMarker\"||p.type===\"tableDelimiterFiller\")?(r=!1,o[2]===0&&(s[1]!==0&&(o[0]=o[1],c=wf(d,t,s,i,void 0,c),s=[0,0,0,0]),o[2]=n)):p.type===\"tableCellDivider\"&&(r?r=!1:(s[1]!==0&&(o[0]=o[1],c=wf(d,t,s,i,void 0,c)),s=o,o=[s[1],n,0,0])):p.type===\"tableHead\"?(a=!0,l=n):p.type===\"tableRow\"||p.type===\"tableDelimiterRow\"?(l=n,s[1]!==0?(o[0]=o[1],c=wf(d,t,s,i,n,c)):o[1]!==0&&(c=wf(d,t,o,i,n,c)),i=0):i&&(p.type===\"data\"||p.type===\"tableDelimiterMarker\"||p.type===\"tableDelimiterFiller\")&&(o[3]=n)}for(l!==0&&_T(d,t,l,u,f),d.consume(t.events),n=-1;++n<t.events.length;){const h=t.events[n];h[0]===\"enter\"&&h[1].type===\"table\"&&(h[1]._align=Rle(t.events,n))}return e}function wf(e,t,n,r,i,s){const o=r===1?\"tableHeader\":r===2?\"tableDelimiter\":\"tableData\",a=\"tableContent\";n[0]!==0&&(s.end=Object.assign({},wo(t.events,n[0])),e.add(n[0],0,[[\"exit\",s,t]]));const l=wo(t.events,n[1]);if(s={type:o,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[[\"enter\",s,t]]),n[2]!==0){const u=wo(t.events,n[2]),f=wo(t.events,n[3]),c={type:a,start:Object.assign({},u),end:Object.assign({},f)};if(e.add(n[2],0,[[\"enter\",c,t]]),r!==2){const d=t.events[n[2]],h=t.events[n[3]];if(d[1].end=Object.assign({},h[1].end),d[1].type=\"chunkText\",d[1].contentType=\"text\",n[3]>n[2]+1){const p=n[2]+1,m=n[3]-n[2]-1;e.add(p,m,[])}}e.add(n[3]+1,0,[[\"exit\",c,t]])}return i!==void 0&&(s.end=Object.assign({},wo(t.events,i)),e.add(i,0,[[\"exit\",s,t]]),s=void 0),s}function _T(e,t,n,r,i){const s=[],o=wo(t.events,n);i&&(i.end=Object.assign({},o),s.push([\"exit\",i,t])),r.end=Object.assign({},o),s.push([\"exit\",r,t]),e.add(n+1,0,s)}function wo(e,t){const n=e[t],r=n[0]===\"enter\"?\"start\":\"end\";return n[1][r]}const jle={name:\"tasklistCheck\",tokenize:$le};function Fle(){return{text:{91:jle}}}function $le(e,t,n){const r=this;return i;function i(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(e.enter(\"taskListCheck\"),e.enter(\"taskListCheckMarker\"),e.consume(l),e.exit(\"taskListCheckMarker\"),s)}function s(l){return Re(l)?(e.enter(\"taskListCheckValueUnchecked\"),e.consume(l),e.exit(\"taskListCheckValueUnchecked\"),o):l===88||l===120?(e.enter(\"taskListCheckValueChecked\"),e.consume(l),e.exit(\"taskListCheckValueChecked\"),o):n(l)}function o(l){return l===93?(e.enter(\"taskListCheckMarker\"),e.consume(l),e.exit(\"taskListCheckMarker\"),e.exit(\"taskListCheck\"),a):n(l)}function a(l){return fe(l)?t(l):Se(l)?e.check({tokenize:Ble},t,n)(l):n(l)}}function Ble(e,t,n){return Ce(e,r,\"whitespace\");function r(i){return i===null?n(i):t(i)}}function Vle(e){return MD([dle(),Sle(),Ple(e),Ile(),Fle()])}const zle={};function Ule(e){const t=this,n=e||zle,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(Vle(n)),s.push(lle()),o.push(ule(n))}function Hle(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}function Wle(e,t){if(e==null)return{};var n,r,i=Hle(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)n=s[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function tv(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Kle(e){if(Array.isArray(e))return tv(e)}function qle(e){if(typeof Symbol<\"u\"&&e[Symbol.iterator]!=null||e[\"@@iterator\"]!=null)return Array.from(e)}function Yle(e,t){if(e){if(typeof e==\"string\")return tv(e,t);var n={}.toString.call(e).slice(8,-1);return n===\"Object\"&&e.constructor&&(n=e.constructor.name),n===\"Map\"||n===\"Set\"?Array.from(e):n===\"Arguments\"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?tv(e,t):void 0}}function Gle(){throw new TypeError(`Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Xle(e){return Kle(e)||qle(e)||Yle(e)||Gle()}function Gu(e){\"@babel/helpers - typeof\";return Gu=typeof Symbol==\"function\"&&typeof Symbol.iterator==\"symbol\"?function(t){return typeof t}:function(t){return t&&typeof Symbol==\"function\"&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},Gu(e)}function Qle(e,t){if(Gu(e)!=\"object\"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||\"default\");if(Gu(r)!=\"object\")return r;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return(t===\"string\"?String:Number)(e)}function Zle(e){var t=Qle(e,\"string\");return Gu(t)==\"symbol\"?t:t+\"\"}function TM(e,t,n){return(t=Zle(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nv(){return nv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nv.apply(null,arguments)}function AT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ko(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?AT(Object(n),!0).forEach(function(r){TM(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Jle(e){var t=e.length;if(t===0||t===1)return e;if(t===2)return[e[0],e[1],\"\".concat(e[0],\".\").concat(e[1]),\"\".concat(e[1],\".\").concat(e[0])];if(t===3)return[e[0],e[1],e[2],\"\".concat(e[0],\".\").concat(e[1]),\"\".concat(e[0],\".\").concat(e[2]),\"\".concat(e[1],\".\").concat(e[0]),\"\".concat(e[1],\".\").concat(e[2]),\"\".concat(e[2],\".\").concat(e[0]),\"\".concat(e[2],\".\").concat(e[1]),\"\".concat(e[0],\".\").concat(e[1],\".\").concat(e[2]),\"\".concat(e[0],\".\").concat(e[2],\".\").concat(e[1]),\"\".concat(e[1],\".\").concat(e[0],\".\").concat(e[2]),\"\".concat(e[1],\".\").concat(e[2],\".\").concat(e[0]),\"\".concat(e[2],\".\").concat(e[0],\".\").concat(e[1]),\"\".concat(e[2],\".\").concat(e[1],\".\").concat(e[0])];if(t>=4)return[e[0],e[1],e[2],e[3],\"\".concat(e[0],\".\").concat(e[1]),\"\".concat(e[0],\".\").concat(e[2]),\"\".concat(e[0],\".\").concat(e[3]),\"\".concat(e[1],\".\").concat(e[0]),\"\".concat(e[1],\".\").concat(e[2]),\"\".concat(e[1],\".\").concat(e[3]),\"\".concat(e[2],\".\").concat(e[0]),\"\".concat(e[2],\".\").concat(e[1]),\"\".concat(e[2],\".\").concat(e[3]),\"\".concat(e[3],\".\").concat(e[0]),\"\".concat(e[3],\".\").concat(e[1]),\"\".concat(e[3],\".\").concat(e[2]),\"\".concat(e[0],\".\").concat(e[1],\".\").concat(e[2]),\"\".concat(e[0],\".\").concat(e[1],\".\").concat(e[3]),\"\".concat(e[0],\".\").concat(e[2],\".\").concat(e[1]),\"\".concat(e[0],\".\").concat(e[2],\".\").concat(e[3]),\"\".concat(e[0],\".\").concat(e[3],\".\").concat(e[1]),\"\".concat(e[0],\".\").concat(e[3],\".\").concat(e[2]),\"\".concat(e[1],\".\").concat(e[0],\".\").concat(e[2]),\"\".concat(e[1],\".\").concat(e[0],\".\").concat(e[3]),\"\".concat(e[1],\".\").concat(e[2],\".\").concat(e[0]),\"\".concat(e[1],\".\").concat(e[2],\".\").concat(e[3]),\"\".concat(e[1],\".\").concat(e[3],\".\").concat(e[0]),\"\".concat(e[1],\".\").concat(e[3],\".\").concat(e[2]),\"\".concat(e[2],\".\").concat(e[0],\".\").concat(e[1]),\"\".concat(e[2],\".\").concat(e[0],\".\").concat(e[3]),\"\".concat(e[2],\".\").concat(e[1],\".\").concat(e[0]),\"\".concat(e[2],\".\").concat(e[1],\".\").concat(e[3]),\"\".concat(e[2],\".\").concat(e[3],\".\").concat(e[0]),\"\".concat(e[2],\".\").concat(e[3],\".\").concat(e[1]),\"\".concat(e[3],\".\").concat(e[0],\".\").concat(e[1]),\"\".concat(e[3],\".\").concat(e[0],\".\").concat(e[2]),\"\".concat(e[3],\".\").concat(e[1],\".\").concat(e[0]),\"\".concat(e[3],\".\").concat(e[1],\".\").concat(e[2]),\"\".concat(e[3],\".\").concat(e[2],\".\").concat(e[0]),\"\".concat(e[3],\".\").concat(e[2],\".\").concat(e[1]),\"\".concat(e[0],\".\").concat(e[1],\".\").concat(e[2],\".\").concat(e[3]),\"\".concat(e[0],\".\").concat(e[1],\".\").concat(e[3],\".\").concat(e[2]),\"\".concat(e[0],\".\").concat(e[2],\".\").concat(e[1],\".\").concat(e[3]),\"\".concat(e[0],\".\").concat(e[2],\".\").concat(e[3],\".\").concat(e[1]),\"\".concat(e[0],\".\").concat(e[3],\".\").concat(e[1],\".\").concat(e[2]),\"\".concat(e[0],\".\").concat(e[3],\".\").concat(e[2],\".\").concat(e[1]),\"\".concat(e[1],\".\").concat(e[0],\".\").concat(e[2],\".\").concat(e[3]),\"\".concat(e[1],\".\").concat(e[0],\".\").concat(e[3],\".\").concat(e[2]),\"\".concat(e[1],\".\").concat(e[2],\".\").concat(e[0],\".\").concat(e[3]),\"\".concat(e[1],\".\").concat(e[2],\".\").concat(e[3],\".\").concat(e[0]),\"\".concat(e[1],\".\").concat(e[3],\".\").concat(e[0],\".\").concat(e[2]),\"\".concat(e[1],\".\").concat(e[3],\".\").concat(e[2],\".\").concat(e[0]),\"\".concat(e[2],\".\").concat(e[0],\".\").concat(e[1],\".\").concat(e[3]),\"\".concat(e[2],\".\").concat(e[0],\".\").concat(e[3],\".\").concat(e[1]),\"\".concat(e[2],\".\").concat(e[1],\".\").concat(e[0],\".\").concat(e[3]),\"\".concat(e[2],\".\").concat(e[1],\".\").concat(e[3],\".\").concat(e[0]),\"\".concat(e[2],\".\").concat(e[3],\".\").concat(e[0],\".\").concat(e[1]),\"\".concat(e[2],\".\").concat(e[3],\".\").concat(e[1],\".\").concat(e[0]),\"\".concat(e[3],\".\").concat(e[0],\".\").concat(e[1],\".\").concat(e[2]),\"\".concat(e[3],\".\").concat(e[0],\".\").concat(e[2],\".\").concat(e[1]),\"\".concat(e[3],\".\").concat(e[1],\".\").concat(e[0],\".\").concat(e[2]),\"\".concat(e[3],\".\").concat(e[1],\".\").concat(e[2],\".\").concat(e[0]),\"\".concat(e[3],\".\").concat(e[2],\".\").concat(e[0],\".\").concat(e[1]),\"\".concat(e[3],\".\").concat(e[2],\".\").concat(e[1],\".\").concat(e[0])]}var Mg={};function eue(e){if(e.length===0||e.length===1)return e;var t=e.join(\".\");return Mg[t]||(Mg[t]=Jle(e)),Mg[t]}function tue(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=e.filter(function(s){return s!==\"token\"}),i=eue(r);return i.reduce(function(s,o){return Ko(Ko({},s),n[o])},t)}function NT(e){return e.join(\" \")}function nue(e,t){var n=0;return function(r){return n+=1,r.map(function(i,s){return _M({node:i,stylesheet:e,useInlineStyles:t,key:\"code-segment-\".concat(n,\"-\").concat(s)})})}}function _M(e){var t=e.node,n=e.stylesheet,r=e.style,i=r===void 0?{}:r,s=e.useInlineStyles,o=e.key,a=t.properties,l=t.type,u=t.tagName,f=t.value;if(l===\"text\")return f;if(u){var c=nue(n,s),d;if(!s)d=Ko(Ko({},a),{},{className:NT(a.className)});else{var h=Object.keys(n).reduce(function(y,v){return v.split(\".\").forEach(function(g){y.includes(g)||y.push(g)}),y},[]),p=a.className&&a.className.includes(\"token\")?[\"token\"]:[],m=a.className&&p.concat(a.className.filter(function(y){return!h.includes(y)}));d=Ko(Ko({},a),{},{className:NT(m)||void 0,style:tue(a.className,Object.assign({},a.style,i),n)})}var w=c(t.children);return we.createElement(u,nv({key:o},d),w)}}const rue=function(e,t){var n=e.listLanguages();return n.indexOf(t)!==-1};var iue=[\"language\",\"children\",\"style\",\"customStyle\",\"codeTagProps\",\"useInlineStyles\",\"showLineNumbers\",\"showInlineLineNumbers\",\"startingLineNumber\",\"lineNumberContainerStyle\",\"lineNumberStyle\",\"wrapLines\",\"wrapLongLines\",\"lineProps\",\"renderer\",\"PreTag\",\"CodeTag\",\"code\",\"astGenerator\"];function PT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function yr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?PT(Object(n),!0).forEach(function(r){TM(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var sue=/\\n/g;function oue(e){return e.match(sue)}function aue(e){var t=e.lines,n=e.startingLineNumber,r=e.style;return t.map(function(i,s){var o=s+n;return we.createElement(\"span\",{key:\"line-\".concat(s),className:\"react-syntax-highlighter-line-number\",style:typeof r==\"function\"?r(o):r},\"\".concat(o,`\n`))})}function lue(e){var t=e.codeString,n=e.codeStyle,r=e.containerStyle,i=r===void 0?{float:\"left\",paddingRight:\"10px\"}:r,s=e.numberStyle,o=s===void 0?{}:s,a=e.startingLineNumber;return we.createElement(\"code\",{style:Object.assign({},n,i)},aue({lines:t.replace(/\\n$/,\"\").split(`\n`),style:o,startingLineNumber:a}))}function uue(e){return\"\".concat(e.toString().length,\".25em\")}function AM(e,t){return{type:\"element\",tagName:\"span\",properties:{key:\"line-number--\".concat(e),className:[\"comment\",\"linenumber\",\"react-syntax-highlighter-line-number\"],style:t},children:[{type:\"text\",value:e}]}}function NM(e,t,n){var r={display:\"inline-block\",minWidth:uue(n),paddingRight:\"1em\",textAlign:\"right\",userSelect:\"none\"},i=typeof e==\"function\"?e(t):e,s=yr(yr({},r),i);return s}function ad(e){var t=e.children,n=e.lineNumber,r=e.lineNumberStyle,i=e.largestLineNumber,s=e.showInlineLineNumbers,o=e.lineProps,a=o===void 0?{}:o,l=e.className,u=l===void 0?[]:l,f=e.showLineNumbers,c=e.wrapLongLines,d=typeof a==\"function\"?a(n):a;if(d.className=u,n&&s){var h=NM(r,n,i);t.unshift(AM(n,h))}return c&f&&(d.style=yr(yr({},d.style),{},{display:\"flex\"})),{type:\"element\",tagName:\"span\",properties:d,children:t}}function PM(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],r=0;r<e.length;r++){var i=e[r];if(i.type===\"text\")n.push(ad({children:[i],className:Xle(new Set(t))}));else if(i.children){var s=t.concat(i.properties.className);PM(i.children,s).forEach(function(o){return n.push(o)})}}return n}function cue(e,t,n,r,i,s,o,a,l){var u,f=PM(e.value),c=[],d=-1,h=0;function p(S,k){var C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];return ad({children:S,lineNumber:k,lineNumberStyle:a,largestLineNumber:o,showInlineLineNumbers:i,lineProps:n,className:C,showLineNumbers:r,wrapLongLines:l})}function m(S,k){if(r&&k&&i){var C=NM(a,k,o);S.unshift(AM(k,C))}return S}function w(S,k){var C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];return t||C.length>0?p(S,k,C):m(S,k)}for(var y=function(){var k=f[h],C=k.children[0].value,T=oue(C);if(T){var O=C.split(`\n`);O.forEach(function(A,j){var L=r&&c.length+s,B={type:\"text\",value:\"\".concat(A,`\n`)};if(j===0){var N=f.slice(d+1,h).concat(ad({children:[B],className:k.properties.className})),M=w(N,L);c.push(M)}else if(j===O.length-1){var I=f[h+1]&&f[h+1].children&&f[h+1].children[0],F={type:\"text\",value:\"\".concat(A)};if(I){var P=ad({children:[F],className:k.properties.className});f.splice(h+1,0,P)}else{var D=[F],_=w(D,L,k.properties.className);c.push(_)}}else{var V=[B],W=w(V,L,k.properties.className);c.push(W)}}),d=h}h++};h<f.length;)y();if(d!==f.length-1){var v=f.slice(d+1,f.length);if(v&&v.length){var g=r&&c.length+s,x=w(v,g);c.push(x)}}return t?c:(u=[]).concat.apply(u,c)}function fue(e){var t=e.rows,n=e.stylesheet,r=e.useInlineStyles;return t.map(function(i,s){return _M({node:i,stylesheet:n,useInlineStyles:r,key:\"code-segement\".concat(s)})})}function OM(e){return e&&typeof e.highlightAuto<\"u\"}function due(e){var t=e.astGenerator,n=e.language,r=e.code,i=e.defaultCodeValue;if(OM(t)){var s=rue(t,n);return n===\"text\"?{value:i,language:\"text\"}:s?t.highlight(n,r):t.highlightAuto(r)}try{return n&&n!==\"text\"?{value:t.highlight(r,n)}:{value:i}}catch{return{value:i}}}function hue(e,t){return function(r){var i=r.language,s=r.children,o=r.style,a=o===void 0?t:o,l=r.customStyle,u=l===void 0?{}:l,f=r.codeTagProps,c=f===void 0?{className:i?\"language-\".concat(i):void 0,style:yr(yr({},a['code[class*=\"language-\"]']),a['code[class*=\"language-'.concat(i,'\"]')])}:f,d=r.useInlineStyles,h=d===void 0?!0:d,p=r.showLineNumbers,m=p===void 0?!1:p,w=r.showInlineLineNumbers,y=w===void 0?!0:w,v=r.startingLineNumber,g=v===void 0?1:v,x=r.lineNumberContainerStyle,S=r.lineNumberStyle,k=S===void 0?{}:S,C=r.wrapLines,T=r.wrapLongLines,O=T===void 0?!1:T,A=r.lineProps,j=A===void 0?{}:A,L=r.renderer,B=r.PreTag,N=B===void 0?\"pre\":B,M=r.CodeTag,I=M===void 0?\"code\":M,F=r.code,P=F===void 0?(Array.isArray(s)?s[0]:s)||\"\":F,D=r.astGenerator,_=Wle(r,iue);D=D||e;var V=m?we.createElement(lue,{containerStyle:x,codeStyle:c.style||{},numberStyle:k,startingLineNumber:g,codeString:P}):null,W=a.hljs||a['pre[class*=\"language-\"]']||{backgroundColor:\"#fff\"},R=OM(D)?\"hljs\":\"prismjs\",q=h?Object.assign({},_,{style:Object.assign({},W,u)}):Object.assign({},_,{className:_.className?\"\".concat(R,\" \").concat(_.className):R,style:Object.assign({},u)});if(O?c.style=yr(yr({},c.style),{},{whiteSpace:\"pre-wrap\"}):c.style=yr(yr({},c.style),{},{whiteSpace:\"pre\"}),!D)return we.createElement(N,q,V,we.createElement(I,c,P));(C===void 0&&L||O)&&(C=!0),L=L||fue;var J=[{type:\"text\",value:P}],Y=due({astGenerator:D,language:i,code:P,defaultCodeValue:J});Y.language===null&&(Y.value=J);var re=Y.value.length+g,G=cue(Y,C,j,m,y,g,re,k,O);return we.createElement(N,q,we.createElement(I,c,!y&&V,L({rows:G,stylesheet:a,useInlineStyles:h})))}}var pue=gue,mue=Object.prototype.hasOwnProperty;function gue(){for(var e={},t=0;t<arguments.length;t++){var n=arguments[t];for(var r in n)mue.call(n,r)&&(e[r]=n[r])}return e}var LM=RM,a1=RM.prototype;a1.space=null;a1.normal={};a1.property={};function RM(e,t,n){this.property=e,this.normal=t,n&&(this.space=n)}var OT=pue,yue=LM,vue=wue;function wue(e){for(var t=e.length,n=[],r=[],i=-1,s,o;++i<t;)s=e[i],n.push(s.property),r.push(s.normal),o=s.space;return new yue(OT.apply(null,n),OT.apply(null,r),o)}var l1=xue;function xue(e){return e.toLowerCase()}var IM=DM,zn=DM.prototype;zn.space=null;zn.attribute=null;zn.property=null;zn.boolean=!1;zn.booleanish=!1;zn.overloadedBoolean=!1;zn.number=!1;zn.commaSeparated=!1;zn.spaceSeparated=!1;zn.commaOrSpaceSeparated=!1;zn.mustUseProperty=!1;zn.defined=!1;function DM(e,t){this.property=e,this.attribute=t}var Rr={},bue=0;Rr.boolean=oo();Rr.booleanish=oo();Rr.overloadedBoolean=oo();Rr.number=oo();Rr.spaceSeparated=oo();Rr.commaSeparated=oo();Rr.commaOrSpaceSeparated=oo();function oo(){return Math.pow(2,++bue)}var MM=IM,LT=Rr,jM=u1;u1.prototype=new MM;u1.prototype.defined=!0;var FM=[\"boolean\",\"booleanish\",\"overloadedBoolean\",\"number\",\"commaSeparated\",\"spaceSeparated\",\"commaOrSpaceSeparated\"],Sue=FM.length;function u1(e,t,n,r){var i=-1,s;for(RT(this,\"space\",r),MM.call(this,e,t);++i<Sue;)s=FM[i],RT(this,s,(n&LT[s])===LT[s])}function RT(e,t,n){n&&(e[t]=n)}var IT=l1,kue=LM,Eue=jM,Ec=Cue;function Cue(e){var t=e.space,n=e.mustUseProperty||[],r=e.attributes||{},i=e.properties,s=e.transform,o={},a={},l,u;for(l in i)u=new Eue(l,s(r,l),i[l],t),n.indexOf(l)!==-1&&(u.mustUseProperty=!0),o[l]=u,a[IT(l)]=l,a[IT(u.attribute)]=l;return new kue(o,a,t)}var Tue=Ec,_ue=Tue({space:\"xlink\",transform:Aue,properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}});function Aue(e,t){return\"xlink:\"+t.slice(5).toLowerCase()}var Nue=Ec,Pue=Nue({space:\"xml\",transform:Oue,properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function Oue(e,t){return\"xml:\"+t.slice(3).toLowerCase()}var Lue=Rue;function Rue(e,t){return t in e?e[t]:t}var Iue=Lue,$M=Due;function Due(e,t){return Iue(e,t.toLowerCase())}var Mue=Ec,jue=$M,Fue=Mue({space:\"xmlns\",attributes:{xmlnsxlink:\"xmlns:xlink\"},transform:jue,properties:{xmlns:null,xmlnsXLink:null}}),c1=Rr,$ue=Ec,Kt=c1.booleanish,Tn=c1.number,ms=c1.spaceSeparated,Bue=$ue({transform:Vue,properties:{ariaActiveDescendant:null,ariaAtomic:Kt,ariaAutoComplete:null,ariaBusy:Kt,ariaChecked:Kt,ariaColCount:Tn,ariaColIndex:Tn,ariaColSpan:Tn,ariaControls:ms,ariaCurrent:null,ariaDescribedBy:ms,ariaDetails:null,ariaDisabled:Kt,ariaDropEffect:ms,ariaErrorMessage:null,ariaExpanded:Kt,ariaFlowTo:ms,ariaGrabbed:Kt,ariaHasPopup:null,ariaHidden:Kt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ms,ariaLevel:Tn,ariaLive:null,ariaModal:Kt,ariaMultiLine:Kt,ariaMultiSelectable:Kt,ariaOrientation:null,ariaOwns:ms,ariaPlaceholder:null,ariaPosInSet:Tn,ariaPressed:Kt,ariaReadOnly:Kt,ariaRelevant:null,ariaRequired:Kt,ariaRoleDescription:ms,ariaRowCount:Tn,ariaRowIndex:Tn,ariaRowSpan:Tn,ariaSelected:Kt,ariaSetSize:Tn,ariaSort:null,ariaValueMax:Tn,ariaValueMin:Tn,ariaValueNow:Tn,ariaValueText:null,role:null}});function Vue(e,t){return t===\"role\"?t:\"aria-\"+t.slice(4).toLowerCase()}var Ja=Rr,zue=Ec,Uue=$M,be=Ja.boolean,Hue=Ja.overloadedBoolean,kl=Ja.booleanish,Fe=Ja.number,Dt=Ja.spaceSeparated,xf=Ja.commaSeparated,Wue=zue({space:\"html\",attributes:{acceptcharset:\"accept-charset\",classname:\"class\",htmlfor:\"for\",httpequiv:\"http-equiv\"},transform:Uue,mustUseProperty:[\"checked\",\"multiple\",\"muted\",\"selected\"],properties:{abbr:null,accept:xf,acceptCharset:Dt,accessKey:Dt,action:null,allow:null,allowFullScreen:be,allowPaymentRequest:be,allowUserMedia:be,alt:null,as:null,async:be,autoCapitalize:null,autoComplete:Dt,autoFocus:be,autoPlay:be,capture:be,charSet:null,checked:be,cite:null,className:Dt,cols:Fe,colSpan:null,content:null,contentEditable:kl,controls:be,controlsList:Dt,coords:Fe|xf,crossOrigin:null,data:null,dateTime:null,decoding:null,default:be,defer:be,dir:null,dirName:null,disabled:be,download:Hue,draggable:kl,encType:null,enterKeyHint:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:be,formTarget:null,headers:Dt,height:Fe,hidden:be,high:Fe,href:null,hrefLang:null,htmlFor:Dt,httpEquiv:Dt,id:null,imageSizes:null,imageSrcSet:xf,inputMode:null,integrity:null,is:null,isMap:be,itemId:null,itemProp:Dt,itemRef:Dt,itemScope:be,itemType:Dt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:be,low:Fe,manifest:null,max:null,maxLength:Fe,media:null,method:null,min:null,minLength:Fe,multiple:be,muted:be,name:null,nonce:null,noModule:be,noValidate:be,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforePrint:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextMenu:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:be,optimum:Fe,pattern:null,ping:Dt,placeholder:null,playsInline:be,poster:null,preload:null,readOnly:be,referrerPolicy:null,rel:Dt,required:be,reversed:be,rows:Fe,rowSpan:Fe,sandbox:Dt,scope:null,scoped:be,seamless:be,selected:be,shape:null,size:Fe,sizes:null,slot:null,span:Fe,spellCheck:kl,src:null,srcDoc:null,srcLang:null,srcSet:xf,start:Fe,step:null,style:null,tabIndex:Fe,target:null,title:null,translate:null,type:null,typeMustMatch:be,useMap:null,value:kl,width:Fe,wrap:null,align:null,aLink:null,archive:Dt,axis:null,background:null,bgColor:null,border:Fe,borderColor:null,bottomMargin:Fe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:be,declare:be,event:null,face:null,frame:null,frameBorder:null,hSpace:Fe,leftMargin:Fe,link:null,longDesc:null,lowSrc:null,marginHeight:Fe,marginWidth:Fe,noResize:be,noHref:be,noShade:be,noWrap:be,object:null,profile:null,prompt:null,rev:null,rightMargin:Fe,rules:null,scheme:null,scrolling:kl,standby:null,summary:null,text:null,topMargin:Fe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Fe,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:be,disableRemotePlayback:be,prefix:null,property:null,results:Fe,security:null,unselectable:null}}),Kue=vue,que=_ue,Yue=Pue,Gue=Fue,Xue=Bue,Que=Wue,Zue=Kue([Yue,que,Gue,Xue,Que]),Jue=l1,ece=jM,tce=IM,f1=\"data\",nce=sce,rce=/^data[-\\w.:]+$/i,BM=/-[a-z]/g,ice=/[A-Z]/g;function sce(e,t){var n=Jue(t),r=t,i=tce;return n in e.normal?e.property[e.normal[n]]:(n.length>4&&n.slice(0,4)===f1&&rce.test(t)&&(t.charAt(4)===\"-\"?r=oce(t):t=ace(t),i=ece),new i(r,t))}function oce(e){var t=e.slice(5).replace(BM,uce);return f1+t.charAt(0).toUpperCase()+t.slice(1)}function ace(e){var t=e.slice(4);return BM.test(t)?e:(t=t.replace(ice,lce),t.charAt(0)!==\"-\"&&(t=\"-\"+t),f1+t)}function lce(e){return\"-\"+e.toLowerCase()}function uce(e){return e.charAt(1).toUpperCase()}var cce=fce,DT=/[#.]/g;function fce(e,t){for(var n=e||\"\",r=t||\"div\",i={},s=0,o,a,l;s<n.length;)DT.lastIndex=s,l=DT.exec(n),o=n.slice(s,l?l.index:n.length),o&&(a?a===\"#\"?i.id=o:i.className?i.className.push(o):i.className=[o]:r=o,s+=o.length),l&&(a=l[0],s++);return{type:\"element\",tagName:r,properties:i,children:[]}}var d1={};d1.parse=pce;d1.stringify=mce;var MT=\"\",dce=\" \",hce=/[ \\t\\n\\r\\f]+/g;function pce(e){var t=String(e||MT).trim();return t===MT?[]:t.split(hce)}function mce(e){return e.join(dce).trim()}var h1={};h1.parse=gce;h1.stringify=yce;var rv=\",\",jT=\" \",Dl=\"\";function gce(e){for(var t=[],n=String(e||Dl),r=n.indexOf(rv),i=0,s=!1,o;!s;)r===-1&&(r=n.length,s=!0),o=n.slice(i,r).trim(),(o||!s)&&t.push(o),i=r+1,r=n.indexOf(rv,i);return t}function yce(e,t){var n=t||{},r=n.padLeft===!1?Dl:jT,i=n.padRight?jT:Dl;return e[e.length-1]===Dl&&(e=e.concat(Dl)),e.join(i+rv+r).trim()}var vce=nce,FT=l1,wce=cce,$T=d1.parse,BT=h1.parse,xce=Sce,bce={}.hasOwnProperty;function Sce(e,t,n){var r=n?_ce(n):null;return i;function i(o,a){var l=wce(o,t),u=Array.prototype.slice.call(arguments,2),f=l.tagName.toLowerCase(),c;if(l.tagName=r&&bce.call(r,f)?r[f]:f,a&&kce(a,l)&&(u.unshift(a),a=null),a)for(c in a)s(l.properties,c,a[c]);return VM(l.children,u),l.tagName===\"template\"&&(l.content={type:\"root\",children:l.children},l.children=[]),l}function s(o,a,l){var u,f,c;l==null||l!==l||(u=vce(e,a),f=u.property,c=l,typeof c==\"string\"&&(u.spaceSeparated?c=$T(c):u.commaSeparated?c=BT(c):u.commaOrSpaceSeparated&&(c=$T(BT(c).join(\" \")))),f===\"style\"&&typeof l!=\"string\"&&(c=Tce(c)),f===\"className\"&&o.className&&(c=o.className.concat(c)),o[f]=Cce(u,f,c))}}function kce(e,t){return typeof e==\"string\"||\"length\"in e||Ece(t.tagName,e)}function Ece(e,t){var n=t.type;return e===\"input\"||!n||typeof n!=\"string\"?!1:typeof t.children==\"object\"&&\"length\"in t.children?!0:(n=n.toLowerCase(),e===\"button\"?n!==\"menu\"&&n!==\"submit\"&&n!==\"reset\"&&n!==\"button\":\"value\"in t)}function VM(e,t){var n,r;if(typeof t==\"string\"||typeof t==\"number\"){e.push({type:\"text\",value:String(t)});return}if(typeof t==\"object\"&&\"length\"in t){for(n=-1,r=t.length;++n<r;)VM(e,t[n]);return}if(typeof t!=\"object\"||!(\"type\"in t))throw new Error(\"Expected node, nodes, or string, got `\"+t+\"`\");e.push(t)}function Cce(e,t,n){var r,i,s;if(typeof n!=\"object\"||!(\"length\"in n))return VT(e,t,n);for(i=n.length,r=-1,s=[];++r<i;)s[r]=VT(e,t,n[r]);return s}function VT(e,t,n){var r=n;return e.number||e.positiveNumber?!isNaN(r)&&r!==\"\"&&(r=Number(r)):(e.boolean||e.overloadedBoolean)&&typeof r==\"string\"&&(r===\"\"||FT(n)===FT(t))&&(r=!0),r}function Tce(e){var t=[],n;for(n in e)t.push([n,e[n]].join(\": \"));return t.join(\"; \")}function _ce(e){for(var t=e.length,n=-1,r={},i;++n<t;)i=e[n],r[i.toLowerCase()]=i;return r}var Ace=Zue,Nce=xce,zM=Nce(Ace,\"div\");zM.displayName=\"html\";var Pce=zM,Oce=Pce;const Lce=\"Æ\",Rce=\"&\",Ice=\"Á\",Dce=\"Â\",Mce=\"À\",jce=\"Å\",Fce=\"Ã\",$ce=\"Ä\",Bce=\"©\",Vce=\"Ç\",zce=\"Ð\",Uce=\"É\",Hce=\"Ê\",Wce=\"È\",Kce=\"Ë\",qce=\">\",Yce=\"Í\",Gce=\"Î\",Xce=\"Ì\",Qce=\"Ï\",Zce=\"<\",Jce=\"Ñ\",efe=\"Ó\",tfe=\"Ô\",nfe=\"Ò\",rfe=\"Ø\",ife=\"Õ\",sfe=\"Ö\",ofe='\"',afe=\"®\",lfe=\"Þ\",ufe=\"Ú\",cfe=\"Û\",ffe=\"Ù\",dfe=\"Ü\",hfe=\"Ý\",pfe=\"á\",mfe=\"â\",gfe=\"´\",yfe=\"æ\",vfe=\"à\",wfe=\"&\",xfe=\"å\",bfe=\"ã\",Sfe=\"ä\",kfe=\"¦\",Efe=\"ç\",Cfe=\"¸\",Tfe=\"¢\",_fe=\"©\",Afe=\"¤\",Nfe=\"°\",Pfe=\"÷\",Ofe=\"é\",Lfe=\"ê\",Rfe=\"è\",Ife=\"ð\",Dfe=\"ë\",Mfe=\"½\",jfe=\"¼\",Ffe=\"¾\",$fe=\">\",Bfe=\"í\",Vfe=\"î\",zfe=\"¡\",Ufe=\"ì\",Hfe=\"¿\",Wfe=\"ï\",Kfe=\"«\",qfe=\"<\",Yfe=\"¯\",Gfe=\"µ\",Xfe=\"·\",Qfe=\" \",Zfe=\"¬\",Jfe=\"ñ\",ede=\"ó\",tde=\"ô\",nde=\"ò\",rde=\"ª\",ide=\"º\",sde=\"ø\",ode=\"õ\",ade=\"ö\",lde=\"¶\",ude=\"±\",cde=\"£\",fde='\"',dde=\"»\",hde=\"®\",pde=\"§\",mde=\"­\",gde=\"¹\",yde=\"²\",vde=\"³\",wde=\"ß\",xde=\"þ\",bde=\"×\",Sde=\"ú\",kde=\"û\",Ede=\"ù\",Cde=\"¨\",Tde=\"ü\",_de=\"ý\",Ade=\"¥\",Nde=\"ÿ\",Pde={AElig:Lce,AMP:Rce,Aacute:Ice,Acirc:Dce,Agrave:Mce,Aring:jce,Atilde:Fce,Auml:$ce,COPY:Bce,Ccedil:Vce,ETH:zce,Eacute:Uce,Ecirc:Hce,Egrave:Wce,Euml:Kce,GT:qce,Iacute:Yce,Icirc:Gce,Igrave:Xce,Iuml:Qce,LT:Zce,Ntilde:Jce,Oacute:efe,Ocirc:tfe,Ograve:nfe,Oslash:rfe,Otilde:ife,Ouml:sfe,QUOT:ofe,REG:afe,THORN:lfe,Uacute:ufe,Ucirc:cfe,Ugrave:ffe,Uuml:dfe,Yacute:hfe,aacute:pfe,acirc:mfe,acute:gfe,aelig:yfe,agrave:vfe,amp:wfe,aring:xfe,atilde:bfe,auml:Sfe,brvbar:kfe,ccedil:Efe,cedil:Cfe,cent:Tfe,copy:_fe,curren:Afe,deg:Nfe,divide:Pfe,eacute:Ofe,ecirc:Lfe,egrave:Rfe,eth:Ife,euml:Dfe,frac12:Mfe,frac14:jfe,frac34:Ffe,gt:$fe,iacute:Bfe,icirc:Vfe,iexcl:zfe,igrave:Ufe,iquest:Hfe,iuml:Wfe,laquo:Kfe,lt:qfe,macr:Yfe,micro:Gfe,middot:Xfe,nbsp:Qfe,not:Zfe,ntilde:Jfe,oacute:ede,ocirc:tde,ograve:nde,ordf:rde,ordm:ide,oslash:sde,otilde:ode,ouml:ade,para:lde,plusmn:ude,pound:cde,quot:fde,raquo:dde,reg:hde,sect:pde,shy:mde,sup1:gde,sup2:yde,sup3:vde,szlig:wde,thorn:xde,times:bde,uacute:Sde,ucirc:kde,ugrave:Ede,uml:Cde,uuml:Tde,yacute:_de,yen:Ade,yuml:Nde},Ode={0:\"�\",128:\"€\",130:\"‚\",131:\"ƒ\",132:\"„\",133:\"…\",134:\"†\",135:\"‡\",136:\"ˆ\",137:\"‰\",138:\"Š\",139:\"‹\",140:\"Œ\",142:\"Ž\",145:\"‘\",146:\"’\",147:\"“\",148:\"”\",149:\"•\",150:\"–\",151:\"—\",152:\"˜\",153:\"™\",154:\"š\",155:\"›\",156:\"œ\",158:\"ž\",159:\"Ÿ\"};var UM=Lde;function Lde(e){var t=typeof e==\"string\"?e.charCodeAt(0):e;return t>=48&&t<=57}var Rde=Ide;function Ide(e){var t=typeof e==\"string\"?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}var Dde=Mde;function Mde(e){var t=typeof e==\"string\"?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}var jde=Dde,Fde=UM,$de=Bde;function Bde(e){return jde(e)||Fde(e)}var bf,Vde=59,zde=Ude;function Ude(e){var t=\"&\"+e+\";\",n;return bf=bf||document.createElement(\"i\"),bf.innerHTML=t,n=bf.textContent,n.charCodeAt(n.length-1)===Vde&&e!==\"semi\"||n===t?!1:n}var zT=Pde,UT=Ode,Hde=UM,Wde=Rde,HM=$de,Kde=zde,qde=ohe,Yde={}.hasOwnProperty,go=String.fromCharCode,Gde=Function.prototype,HT={warning:null,reference:null,text:null,warningContext:null,referenceContext:null,textContext:null,position:{},additional:null,attribute:!1,nonTerminated:!0},Xde=9,WT=10,Qde=12,Zde=32,KT=38,Jde=59,ehe=60,the=61,nhe=35,rhe=88,ihe=120,she=65533,xo=\"named\",p1=\"hexadecimal\",m1=\"decimal\",g1={};g1[p1]=16;g1[m1]=10;var Yp={};Yp[xo]=HM;Yp[m1]=Hde;Yp[p1]=Wde;var WM=1,KM=2,qM=3,YM=4,GM=5,iv=6,XM=7,ds={};ds[WM]=\"Named character references must be terminated by a semicolon\";ds[KM]=\"Numeric character references must be terminated by a semicolon\";ds[qM]=\"Named character references cannot be empty\";ds[YM]=\"Numeric character references cannot be empty\";ds[GM]=\"Named character references must be known\";ds[iv]=\"Numeric character references cannot be disallowed\";ds[XM]=\"Numeric character references cannot be outside the permissible Unicode range\";function ohe(e,t){var n={},r,i;t||(t={});for(i in HT)r=t[i],n[i]=r??HT[i];return(n.position.indent||n.position.start)&&(n.indent=n.position.indent||[],n.position=n.position.start),ahe(e,n)}function ahe(e,t){var n=t.additional,r=t.nonTerminated,i=t.text,s=t.reference,o=t.warning,a=t.textContext,l=t.referenceContext,u=t.warningContext,f=t.position,c=t.indent||[],d=e.length,h=0,p=-1,m=f.column||1,w=f.line||1,y=\"\",v=[],g,x,S,k,C,T,O,A,j,L,B,N,M,I,F,P,D,_,V;for(typeof n==\"string\"&&(n=n.charCodeAt(0)),P=W(),A=o?R:Gde,h--,d++;++h<d;)if(C===WT&&(m=c[p]||1),C=e.charCodeAt(h),C===KT){if(O=e.charCodeAt(h+1),O===Xde||O===WT||O===Qde||O===Zde||O===KT||O===ehe||O!==O||n&&O===n){y+=go(C),m++;continue}for(M=h+1,N=M,V=M,O===nhe?(V=++N,O=e.charCodeAt(V),O===rhe||O===ihe?(I=p1,V=++N):I=m1):I=xo,g=\"\",B=\"\",k=\"\",F=Yp[I],V--;++V<d&&(O=e.charCodeAt(V),!!F(O));)k+=go(O),I===xo&&Yde.call(zT,k)&&(g=k,B=zT[k]);S=e.charCodeAt(V)===Jde,S&&(V++,x=I===xo?Kde(k):!1,x&&(g=k,B=x)),_=1+V-M,!S&&!r||(k?I===xo?(S&&!B?A(GM,1):(g!==k&&(V=N+g.length,_=1+V-N,S=!1),S||(j=g?WM:qM,t.attribute?(O=e.charCodeAt(V),O===the?(A(j,_),B=null):HM(O)?B=null:A(j,_)):A(j,_))),T=B):(S||A(KM,_),T=parseInt(k,g1[I]),lhe(T)?(A(XM,_),T=go(she)):T in UT?(A(iv,_),T=UT[T]):(L=\"\",uhe(T)&&A(iv,_),T>65535&&(T-=65536,L+=go(T>>>10|55296),T=56320|T&1023),T=L+go(T))):I!==xo&&A(YM,_)),T?(q(),P=W(),h=V-1,m+=V-M+1,v.push(T),D=W(),D.offset++,s&&s.call(l,T,{start:P,end:D},e.slice(M-1,V)),P=D):(k=e.slice(M-1,V),y+=k,m+=k.length,h=V-1)}else C===10&&(w++,p++,m=0),C===C?(y+=go(C),m++):q();return v.join(\"\");function W(){return{line:w,column:m,offset:h+(f.offset||0)}}function R(J,Y){var re=W();re.column+=Y,re.offset+=Y,o.call(u,ds[J],re,J)}function q(){y&&(v.push(y),i&&i.call(a,y,{start:P,end:W()}),y=\"\")}}function lhe(e){return e>=55296&&e<=57343||e>1114111}function uhe(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534}var QM={exports:{}};(function(e){var t=typeof window<\"u\"?window:typeof WorkerGlobalScope<\"u\"&&self instanceof WorkerGlobalScope?self:{};/**\n * Prism: Lightweight, robust, elegant syntax highlighting\n *\n * @license MIT <https://opensource.org/licenses/MIT>\n * @author Lea Verou <https://lea.verou.me>\n * @namespace\n * @public\n */var n=function(r){var i=/(?:^|\\s)lang(?:uage)?-([\\w-]+)(?=\\s|$)/i,s=0,o={},a={manual:r.Prism&&r.Prism.manual,disableWorkerMessageHandler:r.Prism&&r.Prism.disableWorkerMessageHandler,util:{encode:function v(g){return g instanceof l?new l(g.type,v(g.content),g.alias):Array.isArray(g)?g.map(v):g.replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\").replace(/\\u00a0/g,\" \")},type:function(v){return Object.prototype.toString.call(v).slice(8,-1)},objId:function(v){return v.__id||Object.defineProperty(v,\"__id\",{value:++s}),v.__id},clone:function v(g,x){x=x||{};var S,k;switch(a.util.type(g)){case\"Object\":if(k=a.util.objId(g),x[k])return x[k];S={},x[k]=S;for(var C in g)g.hasOwnProperty(C)&&(S[C]=v(g[C],x));return S;case\"Array\":return k=a.util.objId(g),x[k]?x[k]:(S=[],x[k]=S,g.forEach(function(T,O){S[O]=v(T,x)}),S);default:return g}},getLanguage:function(v){for(;v;){var g=i.exec(v.className);if(g)return g[1].toLowerCase();v=v.parentElement}return\"none\"},setLanguage:function(v,g){v.className=v.className.replace(RegExp(i,\"gi\"),\"\"),v.classList.add(\"language-\"+g)},currentScript:function(){if(typeof document>\"u\")return null;if(\"currentScript\"in document)return document.currentScript;try{throw new Error}catch(S){var v=(/at [^(\\r\\n]*\\((.*):[^:]+:[^:]+\\)$/i.exec(S.stack)||[])[1];if(v){var g=document.getElementsByTagName(\"script\");for(var x in g)if(g[x].src==v)return g[x]}return null}},isActive:function(v,g,x){for(var S=\"no-\"+g;v;){var k=v.classList;if(k.contains(g))return!0;if(k.contains(S))return!1;v=v.parentElement}return!!x}},languages:{plain:o,plaintext:o,text:o,txt:o,extend:function(v,g){var x=a.util.clone(a.languages[v]);for(var S in g)x[S]=g[S];return x},insertBefore:function(v,g,x,S){S=S||a.languages;var k=S[v],C={};for(var T in k)if(k.hasOwnProperty(T)){if(T==g)for(var O in x)x.hasOwnProperty(O)&&(C[O]=x[O]);x.hasOwnProperty(T)||(C[T]=k[T])}var A=S[v];return S[v]=C,a.languages.DFS(a.languages,function(j,L){L===A&&j!=v&&(this[j]=C)}),C},DFS:function v(g,x,S,k){k=k||{};var C=a.util.objId;for(var T in g)if(g.hasOwnProperty(T)){x.call(g,T,g[T],S||T);var O=g[T],A=a.util.type(O);A===\"Object\"&&!k[C(O)]?(k[C(O)]=!0,v(O,x,null,k)):A===\"Array\"&&!k[C(O)]&&(k[C(O)]=!0,v(O,x,T,k))}}},plugins:{},highlightAll:function(v,g){a.highlightAllUnder(document,v,g)},highlightAllUnder:function(v,g,x){var S={callback:x,container:v,selector:'code[class*=\"language-\"], [class*=\"language-\"] code, code[class*=\"lang-\"], [class*=\"lang-\"] code'};a.hooks.run(\"before-highlightall\",S),S.elements=Array.prototype.slice.apply(S.container.querySelectorAll(S.selector)),a.hooks.run(\"before-all-elements-highlight\",S);for(var k=0,C;C=S.elements[k++];)a.highlightElement(C,g===!0,S.callback)},highlightElement:function(v,g,x){var S=a.util.getLanguage(v),k=a.languages[S];a.util.setLanguage(v,S);var C=v.parentElement;C&&C.nodeName.toLowerCase()===\"pre\"&&a.util.setLanguage(C,S);var T=v.textContent,O={element:v,language:S,grammar:k,code:T};function A(L){O.highlightedCode=L,a.hooks.run(\"before-insert\",O),O.element.innerHTML=O.highlightedCode,a.hooks.run(\"after-highlight\",O),a.hooks.run(\"complete\",O),x&&x.call(O.element)}if(a.hooks.run(\"before-sanity-check\",O),C=O.element.parentElement,C&&C.nodeName.toLowerCase()===\"pre\"&&!C.hasAttribute(\"tabindex\")&&C.setAttribute(\"tabindex\",\"0\"),!O.code){a.hooks.run(\"complete\",O),x&&x.call(O.element);return}if(a.hooks.run(\"before-highlight\",O),!O.grammar){A(a.util.encode(O.code));return}if(g&&r.Worker){var j=new Worker(a.filename);j.onmessage=function(L){A(L.data)},j.postMessage(JSON.stringify({language:O.language,code:O.code,immediateClose:!0}))}else A(a.highlight(O.code,O.grammar,O.language))},highlight:function(v,g,x){var S={code:v,grammar:g,language:x};if(a.hooks.run(\"before-tokenize\",S),!S.grammar)throw new Error('The language \"'+S.language+'\" has no grammar.');return S.tokens=a.tokenize(S.code,S.grammar),a.hooks.run(\"after-tokenize\",S),l.stringify(a.util.encode(S.tokens),S.language)},tokenize:function(v,g){var x=g.rest;if(x){for(var S in x)g[S]=x[S];delete g.rest}var k=new c;return d(k,k.head,v),f(v,k,g,k.head,0),p(k)},hooks:{all:{},add:function(v,g){var x=a.hooks.all;x[v]=x[v]||[],x[v].push(g)},run:function(v,g){var x=a.hooks.all[v];if(!(!x||!x.length))for(var S=0,k;k=x[S++];)k(g)}},Token:l};r.Prism=a;function l(v,g,x,S){this.type=v,this.content=g,this.alias=x,this.length=(S||\"\").length|0}l.stringify=function v(g,x){if(typeof g==\"string\")return g;if(Array.isArray(g)){var S=\"\";return g.forEach(function(A){S+=v(A,x)}),S}var k={type:g.type,content:v(g.content,x),tag:\"span\",classes:[\"token\",g.type],attributes:{},language:x},C=g.alias;C&&(Array.isArray(C)?Array.prototype.push.apply(k.classes,C):k.classes.push(C)),a.hooks.run(\"wrap\",k);var T=\"\";for(var O in k.attributes)T+=\" \"+O+'=\"'+(k.attributes[O]||\"\").replace(/\"/g,\"&quot;\")+'\"';return\"<\"+k.tag+' class=\"'+k.classes.join(\" \")+'\"'+T+\">\"+k.content+\"</\"+k.tag+\">\"};function u(v,g,x,S){v.lastIndex=g;var k=v.exec(x);if(k&&S&&k[1]){var C=k[1].length;k.index+=C,k[0]=k[0].slice(C)}return k}function f(v,g,x,S,k,C){for(var T in x)if(!(!x.hasOwnProperty(T)||!x[T])){var O=x[T];O=Array.isArray(O)?O:[O];for(var A=0;A<O.length;++A){if(C&&C.cause==T+\",\"+A)return;var j=O[A],L=j.inside,B=!!j.lookbehind,N=!!j.greedy,M=j.alias;if(N&&!j.pattern.global){var I=j.pattern.toString().match(/[imsuy]*$/)[0];j.pattern=RegExp(j.pattern.source,I+\"g\")}for(var F=j.pattern||j,P=S.next,D=k;P!==g.tail&&!(C&&D>=C.reach);D+=P.value.length,P=P.next){var _=P.value;if(g.length>v.length)return;if(!(_ instanceof l)){var V=1,W;if(N){if(W=u(F,D,v,B),!W||W.index>=v.length)break;var Y=W.index,R=W.index+W[0].length,q=D;for(q+=P.value.length;Y>=q;)P=P.next,q+=P.value.length;if(q-=P.value.length,D=q,P.value instanceof l)continue;for(var J=P;J!==g.tail&&(q<R||typeof J.value==\"string\");J=J.next)V++,q+=J.value.length;V--,_=v.slice(D,q),W.index-=D}else if(W=u(F,0,_,B),!W)continue;var Y=W.index,re=W[0],G=_.slice(0,Y),le=_.slice(Y+re.length),de=D+_.length;C&&de>C.reach&&(C.reach=de);var ue=P.prev;G&&(ue=d(g,ue,G),D+=G.length),h(g,ue,V);var ie=new l(T,L?a.tokenize(re,L):re,M,re);if(P=d(g,ue,ie),le&&d(g,P,le),V>1){var pe={cause:T+\",\"+A,reach:de};f(v,g,x,P.prev,D,pe),C&&pe.reach>C.reach&&(C.reach=pe.reach)}}}}}}function c(){var v={value:null,prev:null,next:null},g={value:null,prev:v,next:null};v.next=g,this.head=v,this.tail=g,this.length=0}function d(v,g,x){var S=g.next,k={value:x,prev:g,next:S};return g.next=k,S.prev=k,v.length++,k}function h(v,g,x){for(var S=g.next,k=0;k<x&&S!==v.tail;k++)S=S.next;g.next=S,S.prev=g,v.length-=k}function p(v){for(var g=[],x=v.head.next;x!==v.tail;)g.push(x.value),x=x.next;return g}if(!r.document)return r.addEventListener&&(a.disableWorkerMessageHandler||r.addEventListener(\"message\",function(v){var g=JSON.parse(v.data),x=g.language,S=g.code,k=g.immediateClose;r.postMessage(a.highlight(S,a.languages[x],x)),k&&r.close()},!1)),a;var m=a.util.currentScript();m&&(a.filename=m.src,m.hasAttribute(\"data-manual\")&&(a.manual=!0));function w(){a.manual||a.highlightAll()}if(!a.manual){var y=document.readyState;y===\"loading\"||y===\"interactive\"&&m&&m.defer?document.addEventListener(\"DOMContentLoaded\",w):window.requestAnimationFrame?window.requestAnimationFrame(w):window.setTimeout(w,16)}return a}(t);e.exports&&(e.exports=n),typeof la<\"u\"&&(la.Prism=n)})(QM);var che=QM.exports,fhe=y1;y1.displayName=\"markup\";y1.aliases=[\"html\",\"mathml\",\"svg\",\"xml\",\"ssml\",\"atom\",\"rss\"];function y1(e){e.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\\s\\S])*?-->/,greedy:!0},prolog:{pattern:/<\\?[\\s\\S]+?\\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>\"'[\\]]|\"[^\"]*\"|'[^']*')+(?:\\[(?:[^<\"'\\]]|\"[^\"]*\"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\\]\\s*)?>/i,greedy:!0,inside:{\"internal-subset\":{pattern:/(^[^\\[]*\\[)[\\s\\S]+(?=\\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/\"[^\"]*\"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\\]]/,\"doctype-tag\":/^DOCTYPE/i,name:/[^\\s<>'\"]+/}},cdata:{pattern:/<!\\[CDATA\\[[\\s\\S]*?\\]\\]>/i,greedy:!0},tag:{pattern:/<\\/?(?!\\d)[^\\s>\\/=$<%]+(?:\\s(?:\\s*[^\\s>\\/=]+(?:\\s*=\\s*(?:\"[^\"]*\"|'[^']*'|[^\\s'\">=]+(?=[\\s>]))|(?=[\\s/>])))+)?\\s*\\/?>/,greedy:!0,inside:{tag:{pattern:/^<\\/?[^\\s>\\/]+/,inside:{punctuation:/^<\\/?/,namespace:/^[^\\s>\\/:]+:/}},\"special-attr\":[],\"attr-value\":{pattern:/=\\s*(?:\"[^\"]*\"|'[^']*'|[^\\s'\">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:\"attr-equals\"},/\"|'/]}},punctuation:/\\/?>/,\"attr-name\":{pattern:/[^\\s>\\/]+/,inside:{namespace:/^[^\\s>\\/:]+:/}}}},entity:[{pattern:/&[\\da-z]{1,8};/i,alias:\"named-entity\"},/&#x?[\\da-f]{1,8};/i]},e.languages.markup.tag.inside[\"attr-value\"].inside.entity=e.languages.markup.entity,e.languages.markup.doctype.inside[\"internal-subset\"].inside=e.languages.markup,e.hooks.add(\"wrap\",function(t){t.type===\"entity\"&&(t.attributes.title=t.content.value.replace(/&amp;/,\"&\"))}),Object.defineProperty(e.languages.markup.tag,\"addInlined\",{value:function(n,r){var i={};i[\"language-\"+r]={pattern:/(^<!\\[CDATA\\[)[\\s\\S]+?(?=\\]\\]>$)/i,lookbehind:!0,inside:e.languages[r]},i.cdata=/^<!\\[CDATA\\[|\\]\\]>$/i;var s={\"included-cdata\":{pattern:/<!\\[CDATA\\[[\\s\\S]*?\\]\\]>/i,inside:i}};s[\"language-\"+r]={pattern:/[\\s\\S]+/,inside:e.languages[r]};var o={};o[n]={pattern:RegExp(/(<__[^>]*>)(?:<!\\[CDATA\\[(?:[^\\]]|\\](?!\\]>))*\\]\\]>|(?!<!\\[CDATA\\[)[\\s\\S])*?(?=<\\/__>)/.source.replace(/__/g,function(){return n}),\"i\"),lookbehind:!0,greedy:!0,inside:s},e.languages.insertBefore(\"markup\",\"cdata\",o)}}),Object.defineProperty(e.languages.markup.tag,\"addAttribute\",{value:function(t,n){e.languages.markup.tag.inside[\"special-attr\"].push({pattern:RegExp(/(^|[\"'\\s])/.source+\"(?:\"+t+\")\"+/\\s*=\\s*(?:\"[^\"]*\"|'[^']*'|[^\\s'\">=]+(?=[\\s>]))/.source,\"i\"),lookbehind:!0,inside:{\"attr-name\":/^[^\\s=]+/,\"attr-value\":{pattern:/=[\\s\\S]+/,inside:{value:{pattern:/(^=\\s*([\"']|(?![\"'])))\\S[\\s\\S]*(?=\\2$)/,lookbehind:!0,alias:[n,\"language-\"+n],inside:e.languages[n]},punctuation:[{pattern:/^=/,alias:\"attr-equals\"},/\"|'/]}}}})}}),e.languages.html=e.languages.markup,e.languages.mathml=e.languages.markup,e.languages.svg=e.languages.markup,e.languages.xml=e.languages.extend(\"markup\",{}),e.languages.ssml=e.languages.xml,e.languages.atom=e.languages.xml,e.languages.rss=e.languages.xml}var dhe=v1;v1.displayName=\"css\";v1.aliases=[];function v1(e){(function(t){var n=/(?:\"(?:\\\\(?:\\r\\n|[\\s\\S])|[^\"\\\\\\r\\n])*\"|'(?:\\\\(?:\\r\\n|[\\s\\S])|[^'\\\\\\r\\n])*')/;t.languages.css={comment:/\\/\\*[\\s\\S]*?\\*\\//,atrule:{pattern:/@[\\w-](?:[^;{\\s]|\\s+(?![\\s{]))*(?:;|(?=\\s*\\{))/,inside:{rule:/^@[\\w-]+/,\"selector-function-argument\":{pattern:/(\\bselector\\s*\\(\\s*(?![\\s)]))(?:[^()\\s]|\\s+(?![\\s)])|\\((?:[^()]|\\([^()]*\\))*\\))+(?=\\s*\\))/,lookbehind:!0,alias:\"selector\"},keyword:{pattern:/(^|[^\\w-])(?:and|not|only|or)(?![\\w-])/,lookbehind:!0}}},url:{pattern:RegExp(\"\\\\burl\\\\((?:\"+n.source+\"|\"+/(?:[^\\\\\\r\\n()\"']|\\\\[\\s\\S])*/.source+\")\\\\)\",\"i\"),greedy:!0,inside:{function:/^url/i,punctuation:/^\\(|\\)$/,string:{pattern:RegExp(\"^\"+n.source+\"$\"),alias:\"url\"}}},selector:{pattern:RegExp(`(^|[{}\\\\s])[^{}\\\\s](?:[^{};\"'\\\\s]|\\\\s+(?![\\\\s{])|`+n.source+\")*(?=\\\\s*\\\\{)\"),lookbehind:!0},string:{pattern:n,greedy:!0},property:{pattern:/(^|[^-\\w\\xA0-\\uFFFF])(?!\\s)[-_a-z\\xA0-\\uFFFF](?:(?!\\s)[-\\w\\xA0-\\uFFFF])*(?=\\s*:)/i,lookbehind:!0},important:/!important\\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\\()/i,lookbehind:!0},punctuation:/[(){};:,]/},t.languages.css.atrule.inside.rest=t.languages.css;var r=t.languages.markup;r&&(r.tag.addInlined(\"style\",\"css\"),r.tag.addAttribute(\"style\",\"css\"))})(e)}var hhe=w1;w1.displayName=\"clike\";w1.aliases=[];function w1(e){e.languages.clike={comment:[{pattern:/(^|[^\\\\])\\/\\*[\\s\\S]*?(?:\\*\\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\\\:])\\/\\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/([\"'])(?:\\\\(?:\\r\\n|[\\s\\S])|(?!\\1)[^\\\\\\r\\n])*\\1/,greedy:!0},\"class-name\":{pattern:/(\\b(?:class|extends|implements|instanceof|interface|new|trait)\\s+|\\bcatch\\s+\\()[\\w.\\\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\\\]/}},keyword:/\\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\\b/,boolean:/\\b(?:false|true)\\b/,function:/\\b\\w+(?=\\()/,number:/\\b0x[\\da-f]+\\b|(?:\\b\\d+(?:\\.\\d*)?|\\B\\.\\d+)(?:e[+-]?\\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\\+\\+?|&&?|\\|\\|?|[?*/~^%]/,punctuation:/[{}[\\];(),.:]/}}var ZM=x1;x1.displayName=\"javascript\";x1.aliases=[\"js\"];function x1(e){e.languages.javascript=e.languages.extend(\"clike\",{\"class-name\":[e.languages.clike[\"class-name\"],{pattern:/(^|[^$\\w\\xA0-\\uFFFF])(?!\\s)[_$A-Z\\xA0-\\uFFFF](?:(?!\\s)[$\\w\\xA0-\\uFFFF])*(?=\\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\\})\\s*)catch\\b/,lookbehind:!0},{pattern:/(^|[^.]|\\.\\.\\.\\s*)\\b(?:as|assert(?=\\s*\\{)|async(?=\\s*(?:function\\b|\\(|[$\\w\\xA0-\\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\\s*(?:\\{|$))|for|from(?=\\s*(?:['\"]|$))|function|(?:get|set)(?=\\s*(?:[#\\[$\\w\\xA0-\\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\\b/,lookbehind:!0}],function:/#?(?!\\s)[_$a-zA-Z\\xA0-\\uFFFF](?:(?!\\s)[$\\w\\xA0-\\uFFFF])*(?=\\s*(?:\\.\\s*(?:apply|bind|call)\\s*)?\\()/,number:{pattern:RegExp(/(^|[^\\w$])/.source+\"(?:\"+(/NaN|Infinity/.source+\"|\"+/0[bB][01]+(?:_[01]+)*n?/.source+\"|\"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+\"|\"+/0[xX][\\dA-Fa-f]+(?:_[\\dA-Fa-f]+)*n?/.source+\"|\"+/\\d+(?:_\\d+)*n/.source+\"|\"+/(?:\\d+(?:_\\d+)*(?:\\.(?:\\d+(?:_\\d+)*)?)?|\\.\\d+(?:_\\d+)*)(?:[Ee][+-]?\\d+(?:_\\d+)*)?/.source)+\")\"+/(?![\\w$])/.source),lookbehind:!0},operator:/--|\\+\\+|\\*\\*=?|=>|&&=?|\\|\\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\\.{3}|\\?\\?=?|\\?\\.?|[~:]/}),e.languages.javascript[\"class-name\"][0].pattern=/(\\b(?:class|extends|implements|instanceof|interface|new)\\s+)[\\w.\\\\]+/,e.languages.insertBefore(\"javascript\",\"keyword\",{regex:{pattern:/((?:^|[^$\\w\\xA0-\\uFFFF.\"'\\])\\s]|\\b(?:return|yield))\\s*)\\/(?:\\[(?:[^\\]\\\\\\r\\n]|\\\\.)*\\]|\\\\.|[^/\\\\\\[\\r\\n])+\\/[dgimyus]{0,7}(?=(?:\\s|\\/\\*(?:[^*]|\\*(?!\\/))*\\*\\/)*(?:$|[\\r\\n,.;:})\\]]|\\/\\/))/,lookbehind:!0,greedy:!0,inside:{\"regex-source\":{pattern:/^(\\/)[\\s\\S]+(?=\\/[a-z]*$)/,lookbehind:!0,alias:\"language-regex\",inside:e.languages.regex},\"regex-delimiter\":/^\\/|\\/$/,\"regex-flags\":/^[a-z]+$/}},\"function-variable\":{pattern:/#?(?!\\s)[_$a-zA-Z\\xA0-\\uFFFF](?:(?!\\s)[$\\w\\xA0-\\uFFFF])*(?=\\s*[=:]\\s*(?:async\\s*)?(?:\\bfunction\\b|(?:\\((?:[^()]|\\([^()]*\\))*\\)|(?!\\s)[_$a-zA-Z\\xA0-\\uFFFF](?:(?!\\s)[$\\w\\xA0-\\uFFFF])*)\\s*=>))/,alias:\"function\"},parameter:[{pattern:/(function(?:\\s+(?!\\s)[_$a-zA-Z\\xA0-\\uFFFF](?:(?!\\s)[$\\w\\xA0-\\uFFFF])*)?\\s*\\(\\s*)(?!\\s)(?:[^()\\s]|\\s+(?![\\s)])|\\([^()]*\\))+(?=\\s*\\))/,lookbehind:!0,inside:e.languages.javascript},{pattern:/(^|[^$\\w\\xA0-\\uFFFF])(?!\\s)[_$a-z\\xA0-\\uFFFF](?:(?!\\s)[$\\w\\xA0-\\uFFFF])*(?=\\s*=>)/i,lookbehind:!0,inside:e.languages.javascript},{pattern:/(\\(\\s*)(?!\\s)(?:[^()\\s]|\\s+(?![\\s)])|\\([^()]*\\))+(?=\\s*\\)\\s*=>)/,lookbehind:!0,inside:e.languages.javascript},{pattern:/((?:\\b|\\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\\w\\xA0-\\uFFFF]))(?:(?!\\s)[_$a-zA-Z\\xA0-\\uFFFF](?:(?!\\s)[$\\w\\xA0-\\uFFFF])*\\s*)\\(\\s*|\\]\\s*\\(\\s*)(?!\\s)(?:[^()\\s]|\\s+(?![\\s)])|\\([^()]*\\))+(?=\\s*\\)\\s*\\{)/,lookbehind:!0,inside:e.languages.javascript}],constant:/\\b[A-Z](?:[A-Z_]|\\dx?)*\\b/}),e.languages.insertBefore(\"javascript\",\"string\",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:\"comment\"},\"template-string\":{pattern:/`(?:\\\\[\\s\\S]|\\$\\{(?:[^{}]|\\{(?:[^{}]|\\{[^}]*\\})*\\})+\\}|(?!\\$\\{)[^\\\\`])*`/,greedy:!0,inside:{\"template-punctuation\":{pattern:/^`|`$/,alias:\"string\"},interpolation:{pattern:/((?:^|[^\\\\])(?:\\\\{2})*)\\$\\{(?:[^{}]|\\{(?:[^{}]|\\{[^}]*\\})*\\})+\\}/,lookbehind:!0,inside:{\"interpolation-punctuation\":{pattern:/^\\$\\{|\\}$/,alias:\"punctuation\"},rest:e.languages.javascript}},string:/[\\s\\S]+/}},\"string-property\":{pattern:/((?:^|[,{])[ \\t]*)([\"'])(?:\\\\(?:\\r\\n|[\\s\\S])|(?!\\2)[^\\\\\\r\\n])*\\2(?=\\s*:)/m,lookbehind:!0,greedy:!0,alias:\"property\"}}),e.languages.insertBefore(\"javascript\",\"operator\",{\"literal-property\":{pattern:/((?:^|[,{])[ \\t]*)(?!\\s)[_$a-zA-Z\\xA0-\\uFFFF](?:(?!\\s)[$\\w\\xA0-\\uFFFF])*(?=\\s*:)/m,lookbehind:!0,alias:\"property\"}}),e.languages.markup&&(e.languages.markup.tag.addInlined(\"script\",\"javascript\"),e.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,\"javascript\")),e.languages.js=e.languages.javascript}const phe=ci(ZM);var Ml=typeof globalThis==\"object\"?globalThis:typeof self==\"object\"?self:typeof window==\"object\"?window:typeof la==\"object\"?la:{},mhe=Ohe();Ml.Prism={manual:!0,disableWorkerMessageHandler:!0};var ghe=Oce,yhe=qde,JM=che,vhe=fhe,whe=dhe,xhe=hhe,bhe=ZM;mhe();var b1={}.hasOwnProperty;function ej(){}ej.prototype=JM;var at=new ej,She=at;at.highlight=Ehe;at.register=Cc;at.alias=khe;at.registered=Che;at.listLanguages=The;Cc(vhe);Cc(whe);Cc(xhe);Cc(bhe);at.util.encode=Nhe;at.Token.stringify=_he;function Cc(e){if(typeof e!=\"function\"||!e.displayName)throw new Error(\"Expected `function` for `grammar`, got `\"+e+\"`\");at.languages[e.displayName]===void 0&&e(at)}function khe(e,t){var n=at.languages,r=e,i,s,o,a;t&&(r={},r[e]=t);for(i in r)for(s=r[i],s=typeof s==\"string\"?[s]:s,o=s.length,a=-1;++a<o;)n[s[a]]=n[i]}function Ehe(e,t){var n=JM.highlight,r;if(typeof e!=\"string\")throw new Error(\"Expected `string` for `value`, got `\"+e+\"`\");if(at.util.type(t)===\"Object\")r=t,t=null;else{if(typeof t!=\"string\")throw new Error(\"Expected `string` for `name`, got `\"+t+\"`\");if(b1.call(at.languages,t))r=at.languages[t];else throw new Error(\"Unknown language: `\"+t+\"` is not registered\")}return n.call(this,e,r,t)}function Che(e){if(typeof e!=\"string\")throw new Error(\"Expected `string` for `language`, got `\"+e+\"`\");return b1.call(at.languages,e)}function The(){var e=at.languages,t=[],n;for(n in e)b1.call(e,n)&&typeof e[n]==\"object\"&&t.push(n);return t}function _he(e,t,n){var r;return typeof e==\"string\"?{type:\"text\",value:e}:at.util.type(e)===\"Array\"?Ahe(e,t):(r={type:e.type,content:at.Token.stringify(e.content,t,n),tag:\"span\",classes:[\"token\",e.type],attributes:{},language:t,parent:n},e.alias&&(r.classes=r.classes.concat(e.alias)),at.hooks.run(\"wrap\",r),ghe(r.tag+\".\"+r.classes.join(\".\"),Phe(r.attributes),r.content))}function Ahe(e,t){for(var n=[],r=e.length,i=-1,s;++i<r;)s=e[i],s!==\"\"&&s!==null&&s!==void 0&&n.push(s);for(i=-1,r=n.length;++i<r;)s=n[i],n[i]=at.Token.stringify(s,t,n);return n}function Nhe(e){return e}function Phe(e){var t;for(t in e)e[t]=yhe(e[t]);return e}function Ohe(){var e=\"Prism\"in Ml,t=e?Ml.Prism:void 0;return n;function n(){e?Ml.Prism=t:delete Ml.Prism,e=void 0,t=void 0}}const S1=ci(She);var an=hue(S1,{});an.registerLanguage=function(e,t){return S1.register(t)};an.alias=function(e,t){return S1.alias(e,t)};var Lhe=k1;k1.displayName=\"sql\";k1.aliases=[];function k1(e){e.languages.sql={comment:{pattern:/(^|[^\\\\])(?:\\/\\*[\\s\\S]*?\\*\\/|(?:--|\\/\\/|#).*)/,lookbehind:!0},variable:[{pattern:/@([\"'`])(?:\\\\[\\s\\S]|(?!\\1)[^\\\\])+\\1/,greedy:!0},/@[\\w.$]+/],string:{pattern:/(^|[^@\\\\])(\"|')(?:\\\\[\\s\\S]|(?!\\2)[^\\\\]|\\2\\2)*\\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\\\])`(?:\\\\[\\s\\S]|[^`\\\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\\s*\\()/i,keyword:/\\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\\b/i,boolean:/\\b(?:FALSE|NULL|TRUE)\\b/i,number:/\\b0x[\\da-f]+\\b|\\b\\d+(?:\\.\\d*)?|\\B\\.\\d+\\b/i,operator:/[-+*\\/=%^~]|&&?|\\|\\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\\b/i,punctuation:/[;[\\]()`,.]/}}const Rhe=ci(Lhe);var Ihe=E1;E1.displayName=\"typescript\";E1.aliases=[\"ts\"];function E1(e){(function(t){t.languages.typescript=t.languages.extend(\"javascript\",{\"class-name\":{pattern:/(\\b(?:class|extends|implements|instanceof|interface|new|type)\\s+)(?!keyof\\b)(?!\\s)[_$a-zA-Z\\xA0-\\uFFFF](?:(?!\\s)[$\\w\\xA0-\\uFFFF])*(?:\\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\\b/}),t.languages.typescript.keyword.push(/\\b(?:abstract|declare|is|keyof|readonly|require)\\b/,/\\b(?:asserts|infer|interface|module|namespace|type)\\b(?=\\s*(?:[{_$a-zA-Z\\xA0-\\uFFFF]|$))/,/\\btype\\b(?=\\s*(?:[\\{*]|$))/),delete t.languages.typescript.parameter,delete t.languages.typescript[\"literal-property\"];var n=t.languages.extend(\"typescript\",{});delete n[\"class-name\"],t.languages.typescript[\"class-name\"].inside=n,t.languages.insertBefore(\"typescript\",\"function\",{decorator:{pattern:/@[$\\w\\xA0-\\uFFFF]+/,inside:{at:{pattern:/^@/,alias:\"operator\"},function:/^[\\s\\S]+/}},\"generic-function\":{pattern:/#?(?!\\s)[_$a-zA-Z\\xA0-\\uFFFF](?:(?!\\s)[$\\w\\xA0-\\uFFFF])*\\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\\s*\\()/,greedy:!0,inside:{function:/^#?(?!\\s)[_$a-zA-Z\\xA0-\\uFFFF](?:(?!\\s)[$\\w\\xA0-\\uFFFF])*/,generic:{pattern:/<[\\s\\S]+/,alias:\"class-name\",inside:n}}}}),t.languages.ts=t.languages.typescript})(e)}const Dhe=ci(Ihe);var Mhe=C1;C1.displayName=\"yaml\";C1.aliases=[\"yml\"];function C1(e){(function(t){var n=/[*&][^\\s[\\]{},]+/,r=/!(?:<[\\w\\-%#;/?:@&=+$,.!~*'()[\\]]+>|(?:[a-zA-Z\\d-]*!)?[\\w\\-%#;/?:@&=+$.~*'()]+)?/,i=\"(?:\"+r.source+\"(?:[ \t]+\"+n.source+\")?|\"+n.source+\"(?:[ \t]+\"+r.source+\")?)\",s=/(?:[^\\s\\x00-\\x08\\x0e-\\x1f!\"#%&'*,\\-:>?@[\\]`{|}\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]|[?:-]<PLAIN>)(?:[ \\t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,function(){return/[^\\s\\x00-\\x08\\x0e-\\x1f,[\\]{}\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]/.source}),o=/\"(?:[^\"\\\\\\r\\n]|\\\\.)*\"|'(?:[^'\\\\\\r\\n]|\\\\.)*'/.source;function a(l,u){u=(u||\"\").replace(/m/g,\"\")+\"m\";var f=/([:\\-,[{]\\s*(?:\\s<<prop>>[ \\t]+)?)(?:<<value>>)(?=[ \\t]*(?:$|,|\\]|\\}|(?:[\\r\\n]\\s*)?#))/.source.replace(/<<prop>>/g,function(){return i}).replace(/<<value>>/g,function(){return l});return RegExp(f,u)}t.languages.yaml={scalar:{pattern:RegExp(/([\\-:]\\s*(?:\\s<<prop>>[ \\t]+)?[|>])[ \\t]*(?:((?:\\r?\\n|\\r)[ \\t]+)\\S[^\\r\\n]*(?:\\2[^\\r\\n]+)*)/.source.replace(/<<prop>>/g,function(){return i})),lookbehind:!0,alias:\"string\"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\\-,[{\\r\\n?])[ \\t]*(?:<<prop>>[ \\t]+)?)<<key>>(?=\\s*:\\s)/.source.replace(/<<prop>>/g,function(){return i}).replace(/<<key>>/g,function(){return\"(?:\"+s+\"|\"+o+\")\"})),lookbehind:!0,greedy:!0,alias:\"atrule\"},directive:{pattern:/(^[ \\t]*)%.+/m,lookbehind:!0,alias:\"important\"},datetime:{pattern:a(/\\d{4}-\\d\\d?-\\d\\d?(?:[tT]|[ \\t]+)\\d\\d?:\\d{2}:\\d{2}(?:\\.\\d*)?(?:[ \\t]*(?:Z|[-+]\\d\\d?(?::\\d{2})?))?|\\d{4}-\\d{2}-\\d{2}|\\d\\d?:\\d{2}(?::\\d{2}(?:\\.\\d*)?)?/.source),lookbehind:!0,alias:\"number\"},boolean:{pattern:a(/false|true/.source,\"i\"),lookbehind:!0,alias:\"important\"},null:{pattern:a(/null|~/.source,\"i\"),lookbehind:!0,alias:\"important\"},string:{pattern:a(o),lookbehind:!0,greedy:!0},number:{pattern:a(/[+-]?(?:0x[\\da-f]+|0o[0-7]+|(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:e[+-]?\\d+)?|\\.inf|\\.nan)/.source,\"i\"),lookbehind:!0},tag:r,important:n,punctuation:/---|[:[\\]{}\\-,|>?]|\\.\\.\\./},t.languages.yml=t.languages.yaml})(e)}const jhe=ci(Mhe),gs={'code[class*=\"language-\"]':{color:\"white\",fontFamily:\"JetBrains Mono\",textAlign:\"left\",whiteSpace:\"pre\",wordSpacing:\"normal\",wordBreak:\"normal\",wordWrap:\"normal\",MozTabSize:\"4\",OTabSize:\"4\",tabSize:\"4\",WebkitHyphens:\"none\",MozHyphens:\"none\",msHyphens:\"none\",hyphens:\"none\",lineHeight:\"25px\",fontSize:\"0.8rem\",margin:\"5px 0\"},'pre[class*=\"language-\"]':{color:\"white\",fontFamily:\"JetBrains Mono\",textAlign:\"left\",whiteSpace:\"pre\",wordSpacing:\"normal\",wordBreak:\"normal\",wordWrap:\"normal\",MozTabSize:\"4\",OTabSize:\"4\",tabSize:\"4\",WebkitHyphens:\"none\",MozHyphens:\"none\",msHyphens:\"none\",hyphens:\"none\",lineHeight:\"25px\",fontSize:\"0.85rem\",margin:\"0.5em 0\",background:\"#2a2a2a\",padding:\"1em\",overflow:\"auto\"},'pre[class*=\"language-\"] *':{fontFamily:\"JetBrains Mono\"},':not(pre) > code[class*=\"language-\"]':{color:\"white\",background:\"#0a143c\",padding:\"0.1em\",borderRadius:\"0.3em\",whiteSpace:\"normal\"},'pre[class*=\"language-\"]::-moz-selection':{textShadow:\"none\",background:\"rgba(29, 59, 83, 0.99)\"},'pre[class*=\"language-\"] ::-moz-selection':{textShadow:\"none\",background:\"rgba(29, 59, 83, 0.99)\"},'code[class*=\"language-\"]::-moz-selection':{textShadow:\"none\",background:\"rgba(29, 59, 83, 0.99)\"},'code[class*=\"language-\"] ::-moz-selection':{textShadow:\"none\",background:\"rgba(29, 59, 83, 0.99)\"},'pre[class*=\"language-\"]::selection':{textShadow:\"none\",background:\"rgba(29, 59, 83, 0.99)\"},'pre[class*=\"language-\"] ::selection':{textShadow:\"none\",background:\"rgba(29, 59, 83, 0.99)\"},'code[class*=\"language-\"]::selection':{textShadow:\"none\",background:\"rgba(29, 59, 83, 0.99)\"},'code[class*=\"language-\"] ::selection':{textShadow:\"none\",background:\"rgba(29, 59, 83, 0.99)\"},comment:{color:\"#6272a4\",fontStyle:\"italic\"},prolog:{color:\"#6272a4\",fontStyle:\"italic\"},cdata:{color:\"#6272a4\",fontStyle:\"italic\"},punctuation:{color:\"#f8f8f2\"},\".namespace\":{color:\"#f8f8f2\"},deleted:{color:\"#ff5555\",fontStyle:\"italic\"},symbol:{color:\"#ff79c6\"},property:{color:\"#ff79c6\"},tag:{color:\"#ff79c6\"},operator:{color:\"#ff79c6\"},keyword:{color:\"#ff79c6\"},boolean:{color:\"#bd93f9\"},number:{color:\"#bd93f9\"},constant:{color:\"#8be9fd\"},function:{color:\"#8be9fd\"},builtin:{color:\"#8be9fd\"},char:{color:\"#8be9fd\"},selector:{color:\"#ff79c6\",fontStyle:\"italic\"},doctype:{color:\"#6272a4\",fontStyle:\"italic\"},\"attr-name\":{color:\"#50fa7b\",fontStyle:\"italic\"},inserted:{color:\"#50fa7b\",fontStyle:\"italic\"},string:{color:\"#f1fa8c\"},url:{color:\"#f1fa8c\"},entity:{color:\"#f1fa8c\"},\".language-css .token.string\":{color:\"#f1fa8c\"},\".style .token.string\":{color:\"#f1fa8c\"},\"class-name\":{color:\"#8be9fd\"},atrule:{color:\"#50fa7b\"},\"attr-value\":{color:\"#f1fa8c\"},regex:{color:\"#ffb86c\"},important:{color:\"#ffb86c\",fontWeight:\"bold\"},variable:{color:\"#f8f8f2\"},bold:{fontWeight:\"bold\"},italic:{fontStyle:\"italic\"}},Fhe=E.memo(({data:e,isConnectable:t})=>{const n={pm:\"#FFA500\",db:\"#000080\",backend:\"#FF10F0\",ux:\"#A020F0\",\"webapp-structure\":\"#39FF14\",\"webapp-view\":\"#05D9FF\"};an.registerLanguage(\"yaml\",jhe),an.registerLanguage(\"js\",phe),an.registerLanguage(\"sql\",Rhe),an.registerLanguage(\"typescript\",Dhe),kh();const r=e.key.includes(\"webapp.react.views\")?bo(w=>w.project.streamEvents[`${e.key.split(\".\").slice(0,4).join(\".\")}`]):bo(w=>w.project.streamEvents[e.key]),i=bo(w=>w.project.projectData[e.key]);let s;e.key.includes(\"webapp.react.views\")&&(s=bo(w=>w.project.projectData[e.key.replace(\".react.\",\".layout.\")]));const o=E.useRef(null);E.useState(\"\");const[a,l]=E.useState(Date.now());function u(){var w;return(w=e==null?void 0:e.meta)!=null&&w.type&&n[e.meta.type]?`[${n[e.meta.type]}]`:\"none\"}function f(){return e.key===\"db.postgres\"?\"sql\":\"yaml\"}function c(){return i?e.key===\"db.postgres\"?i:xl.stringify(i):\"\"}const[d,h]=E.useState(!1);E.useEffect(()=>{e.key.includes(\"webapp.\")&&i&&Object.keys(i).length&&h(Object.keys(i).reverse()[0])},[i]);function p(){var w,y,v,g,x,S,k,C,T,O,A,j,L,B,N,M,I,F;return e.key.includes(\"webapp.react.root\")||e.key.includes(\"webapp.react.store\")?b.jsxs(\"div\",{className:\"grid grid-cols-12\",children:[b.jsxs(\"div\",{className:\"col-span-9 grid grid-cols-2\",children:[(r==null?void 0:r.is_running)&&(r==null?void 0:r.data)&&b.jsx(\"pre\",{className:\"p-2 m-2 max-h-[40vh] overflow-auto whitespace-pre-wrap break-words\",style:{fontFamily:\"JetBrains Mono\",fontWeight:400},children:b.jsx(\"div\",{className:\"mx-2\",children:b.jsx(\"div\",{className:\"flex justify-center items-center p-4 m-4\",children:b.jsx(\"div\",{className:\"animate-spin rounded-full h-5 w-5 border-r border-[#aaa]\"})})})})||b.jsx(b.Fragment,{}),b.jsx(\"pre\",{ref:o,className:`p-2 m-2 max-h-[40vh] overflow-auto whitespace-pre-wrap break-words duration-200\n\t\t\t\t\t\t\t\t\t\t\t\t\t${r!=null&&r.is_running&&(r!=null&&r.data)?\"\":\"col-span-2\"}`,style:{fontFamily:\"JetBrains Mono\",fontWeight:400},children:(r==null?void 0:r.is_running)&&(r==null?void 0:r.data)&&b.jsx(b.Fragment,{children:r.data.data})||b.jsx(b.Fragment,{children:d&&i?i[d].tsx.slice(0,300)+\" ...\":\"\"})})]}),(r==null?void 0:r.is_running)&&(r==null?void 0:r.data)&&b.jsx(b.Fragment,{children:b.jsx(\"div\",{className:\"col-span-3 text-sm p-2 m-2\",children:b.jsx(\"h3\",{className:\"py-2 mb-2 opacity-50\",children:\"processing\"})})})||b.jsx(b.Fragment,{children:i&&b.jsxs(\"div\",{className:\"col-span-3 text-sm p-2 m-2\",children:[b.jsx(\"h3\",{className:\"border-b py-2 mb-2 border-[#333]\",children:\"versions\"}),b.jsx(\"div\",{className:\"grid\",children:Object.entries(i).reverse().map(([P,D],_)=>b.jsx(\"a\",{className:`rounded cursor-pointer p-2 mb-1 hover:bg-[#222] duration-200 ${d===P?\"bg-[#333]\":\"\"} `,onClick:()=>{h(P)},children:P},_))})]})||\"\"})]}):e.key.includes(\"webapp.react.views\")?b.jsxs(\"div\",{className:\"grid grid-cols-12\",children:[b.jsxs(\"div\",{className:\"col-span-9 grid grid-cols-2\",children:[(r==null?void 0:r.is_running)&&(r==null?void 0:r.data)&&b.jsx(\"pre\",{className:\"p-2 m-2 max-h-[40vh] overflow-auto whitespace-pre-wrap break-words\",style:{fontFamily:\"JetBrains Mono\",fontWeight:400},children:b.jsx(\"div\",{className:\"mx-2\",children:b.jsx(\"div\",{className:\"flex justify-center items-center p-4 m-4\",children:b.jsx(\"div\",{className:\"animate-spin rounded-full h-5 w-5 border-r border-[#aaa]\"})})})})||b.jsx(b.Fragment,{}),b.jsx(\"pre\",{ref:o,className:`p-2 m-2 max-h-[40vh] overflow-auto whitespace-pre-wrap break-words duration-200\n\t\t\t\t\t\t\t\t\t\t\t\t\t${r!=null&&r.is_running&&(r!=null&&r.data)?\"\":\"col-span-2\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\ttext-xs\n\t\t\t\t\t\t\t\t\t\t\t\t`,style:{fontFamily:\"JetBrains Mono\",fontWeight:400},children:(r==null?void 0:r.is_running)&&(r==null?void 0:r.data)&&b.jsx(b.Fragment,{children:r.data.data})||b.jsx(b.Fragment,{children:d&&i?i[d].tsx.slice(0,300)+\" ...\":\"\"})})]}),(r==null?void 0:r.is_running)&&(r==null?void 0:r.data)&&b.jsx(b.Fragment,{children:b.jsx(\"div\",{className:\"col-span-3 text-sm p-2 m-2\",children:b.jsx(\"h3\",{className:\"py-2 mb-2 opacity-50\",children:\"processing\"})})})||b.jsx(b.Fragment,{children:b.jsxs(\"div\",{className:\"col-span-3 text-sm p-2 m-2 max-h-[40vh] overflow-auto\",children:[b.jsx(\"h3\",{className:\"border-b py-2 mb-2 border-[#333]\",children:\"versions\"}),b.jsx(\"div\",{className:\"grid\",children:i&&Object.entries(i).reverse().map(([P,D],_)=>b.jsx(\"a\",{className:`rounded cursor-pointer p-2 mb-1 hover:bg-[#222] duration-200 ${d===P?\"bg-[#333]\":\"\"} `,onClick:()=>{h(P)},children:P},_))||b.jsx(b.Fragment,{})})]})}),s&&d&&s[d]&&(((g=(v=(y=(w=s[d])==null?void 0:w.render)==null?void 0:y.image)==null?void 0:v.url)==null?void 0:g.length)||((C=(k=(S=(x=s[d])==null?void 0:x.render)==null?void 0:S.image)==null?void 0:k.local)==null?void 0:C.length))&&b.jsx(\"div\",{className:\"col-span-12 p-2 m-2 text-xs\",children:b.jsx(\"img\",{title:`Design mockup reference generated for ${e.key}, version : ${d}`,alt:`Design mockup reference generated for ${e.key}, version : ${d}`,src:(j=(A=(O=(T=s[d])==null?void 0:T.render)==null?void 0:O.image)==null?void 0:A.url)!=null&&j.length?(N=(B=(L=s[d])==null?void 0:L.render)==null?void 0:B.image)==null?void 0:N.url:`http://localhost:4200/storage/${(F=(I=(M=s[d])==null?void 0:M.render)==null?void 0:I.image)==null?void 0:F.local.split(\"/storage/\")[1]}`})})||b.jsx(b.Fragment,{})]}):b.jsxs(\"div\",{className:`grid ${r!=null&&r.is_running&&(r!=null&&r.data)?\"grid-cols-2\":\"\"}`,children:[b.jsx(\"div\",{children:b.jsxs(\"pre\",{className:\"p-2 m-2 max-h-[25vh] overflow-auto whitespace-pre-wrap break-words\",style:{fontFamily:\"JetBrains Mono\",fontWeight:400},children:[(r==null?void 0:r.is_running)&&(r==null?void 0:r.data)&&b.jsx(b.Fragment,{children:b.jsx(\"div\",{className:\"flex justify-center items-center p-4 m-4\",children:b.jsx(\"div\",{className:\"animate-spin rounded-full h-5 w-5 border-r border-[#aaa]\"})})})||b.jsx(b.Fragment,{}),i&&b.jsx(b.Fragment,{children:typeof i==\"string\"?i.slice(0,100)+\" ...\":xl.stringify(i).slice(0,100)+\" ...\"})||b.jsx(b.Fragment,{})]})}),(r==null?void 0:r.is_running)&&(r==null?void 0:r.data)&&b.jsx(\"div\",{children:b.jsx(\"pre\",{ref:o,className:\"p-2 m-2 max-h-[25vh] overflow-auto whitespace-pre-wrap break-words font-light\",children:r.data.data})})||b.jsx(b.Fragment,{})]})}function m(){var w,y,v,g;return e.key.includes(\"webapp.react.root\")||e.key.includes(\"webapp.react.store\")?d?b.jsx(b.Fragment,{children:d&&i&&b.jsxs(\"pre\",{className:\"rounded grid grid-cols-6 gap-2 rounded-lg p-2 text-white text-xs overflow-auto whitespace-pre-wrap break-words\",children:[b.jsx(an,{className:\"col-span-4 rounded bg-black text-xs\",language:\"typescript\",style:gs,wrapLines:!0,wrapLongLines:!0,children:i[d].tsx}),b.jsx(an,{className:\"col-span-2 rounded bg-black text-xs\",language:f(),style:gs,wrapLines:!0,wrapLongLines:!0,children:xl.stringify({...(w=i[d])!=null&&w.dependencies?{dependencies:i[d].dependencies}:{},...(y=i[d])!=null&&y.analysis?{analysis:i[d].analysis}:{}})})]})||\"\"}):b.jsx(b.Fragment,{}):e.key.includes(\"webapp.react.views\")?d?b.jsx(b.Fragment,{children:d&&i&&b.jsxs(\"pre\",{className:\"rounded grid grid-cols-6 gap-2 rounded-lg p-2 text-white text-xs overflow-auto whitespace-pre-wrap break-words\",children:[b.jsx(an,{className:\"col-span-4 rounded bg-black text-xs\",language:\"typescript\",style:gs,wrapLines:!0,wrapLongLines:!0,children:i[d].tsx}),b.jsx(an,{className:\"col-span-2 rounded bg-black text-xs\",language:f(),style:gs,wrapLines:!0,wrapLongLines:!0,children:xl.stringify({...(v=i[d])!=null&&v.dependencies?{dependencies:i[d].dependencies}:{},...(g=i[d])!=null&&g.analysis?{analysis:i[d].analysis}:{}})})]})||\"\"}):b.jsx(b.Fragment,{}):e.key===\"backend.server.main\"?b.jsx(b.Fragment,{children:i&&b.jsxs(\"pre\",{className:\"rounded grid grid-cols-6 gap-2 rounded-lg p-2 text-white text-xs overflow-auto whitespace-pre-wrap break-words\",children:[b.jsx(an,{className:\"col-span-4 rounded bg-black text-xs\",language:\"javascript\",style:gs,wrapLines:!0,wrapLongLines:!0,children:i.mjs}),b.jsx(an,{className:\"col-span-2 rounded bg-black text-xs\",language:f(),style:gs,wrapLines:!0,wrapLongLines:!0,children:xl.stringify({env:i.env,dependencies:i.dependencies})})]})||\"\"}):b.jsx(b.Fragment,{children:b.jsx(\"pre\",{className:\"rounded rounded-lg p-2 text-white text-xs overflow-auto whitespace-pre-wrap break-words\",children:b.jsx(an,{className:\"rounded bg-black text-xs\",language:f(),style:gs,wrapLines:!0,wrapLongLines:!0,children:c()})})})}return E.useEffect(()=>{o.current&&(o.current.scrollTop=o.current.scrollHeight)},[r]),b.jsxs(b.Fragment,{children:[b.jsx(\"div\",{className:\"hidden bg-[#FFA500] bg-[#000080] bg-[#FF10F0] bg-[#A020F0] bg-[#05D9FF] bg-[#39FF14]\",children:\"_tw_manual_debugging_ _preload_all_colors_variations_so_it_builds_them\"}),b.jsxs(\"div\",{className:`dark bg-[#0a0a0a] font-light ${r!=null&&r.is_running&&(r!=null&&r.data)?\"max-w-[60vw] xl:max-w-[50vw]\":\"max-w-[60vw] xl:max-w-[40vw]\"} overflow-auto text-xs`,children:[b.jsxs(\"div\",{className:\"opacity-0\",children:[b.jsx(An,{type:\"target\",id:\"top\",position:se.Top,style:{background:\"#555\"},onConnect:w=>console.log(\"handle onConnect\",w),isConnectable:t}),b.jsx(An,{type:\"target\",id:\"botom\",position:se.Bottom,style:{background:\"#555\"},onConnect:w=>console.log(\"handle onConnect\",w),isConnectable:t}),b.jsx(An,{type:\"target\",id:\"left\",position:se.Left,style:{background:\"#555\"},onConnect:w=>console.log(\"handle onConnect\",w),isConnectable:t}),b.jsx(An,{type:\"target\",id:\"right\",position:se.Right,style:{background:\"#555\"},onConnect:w=>console.log(\"handle onConnect\",w),isConnectable:t})]}),b.jsxs(\"div\",{className:\"text-white rounded rounded-xl p-2 font-light\",children:[b.jsxs(\"div\",{className:\"text-base p-2 m-2 duration-200 rounded flex gap-2 items-start\",children:[b.jsx(\"div\",{className:`h-8 w-8 m-2 rounded bg-${u()}`}),b.jsxs(\"div\",{children:[b.jsx(\"strong\",{children:e.meta.name}),b.jsx(\"br\",{}),b.jsxs(\"span\",{className:\"opacity-80\",children:[e.meta.desc,\" \",e.key.includes(\"webapp.react.views\")?` : ${e.key.split(\".\")[3]}`:\"\"]})]})]},a),p(),i&&b.jsxs(_L,{children:[b.jsx(\"div\",{className:\"flex justify-end border-t pt-2 my-2 border-[#222]\",children:b.jsx(AL,{asChild:!0,children:b.jsx(ta,{variant:\"outline\",children:\"View\"})})}),b.jsxs(ax,{className:\"font-light bg-white/10 backdrop-blur-md border-[#222] max-w-[90vw] h-[90vh] max-h-[90vh] overflow-auto p-8\",children:[b.jsxs(lx,{className:\"text-[#aaa]\",children:[b.jsx(cx,{children:\"Detailed View\"}),b.jsxs(fx,{className:\"text-white text-lg whitespace-pre-wrap break-words font-light\",children:[e.key,\" \",b.jsx(\"strong\",{className:\"text-base\",children:d?`{ ${d} }`:\"\"})]})]}),e.meta.content_type===\"markdown\"&&e.key!=\"pm.details\"&&b.jsx(b.Fragment,{children:b.jsx(\"div\",{className:\"rounded rounded-lg p-12 m-2 bg-[#2a2a2a] text-white text-sm overflow-auto whitespace-pre-wrap break-words\",children:b.jsx(Loe,{className:\"markdown\",remarkPlugins:[Ule],children:i})})})||m(),b.jsx(\"pre\",{className:\"\",style:{fontFamily:\"JetBrains Mono\",fontWeight:400}}),b.jsx(ux,{children:b.jsx(zq,{asChild:!0,children:b.jsx(ta,{variant:\"\",children:\"Back\"})})})]})]})||b.jsx(b.Fragment,{})]}),b.jsxs(\"div\",{className:\"opacity-0\",children:[b.jsx(An,{type:\"source\",position:se.Top,id:\"top\",style:{left:10,background:\"#555\"},isConnectable:t}),b.jsx(An,{type:\"source\",position:se.Right,id:\"right\",style:{top:10,background:\"#555\"},isConnectable:t}),b.jsx(An,{type:\"source\",position:se.Bottom,id:\"bottom\",style:{left:10,background:\"#555\"},isConnectable:t}),b.jsx(An,{type:\"source\",position:se.Left,id:\"left\",style:{top:10,background:\"#555\"},isConnectable:t})]})]},a)]})}),$he={cofounder_node:Fhe},Bhe={floating:ete},Vhe={},zhe=[],Uhe=[],Hhe=({project:e})=>{const t=kh(),n=bo(p=>p.project.nodesKeys);E.useEffect(()=>{t(Wz(e))},[t,e]);const[r,i,s]=_ee(zhe),[o,a,l]=Aee(Uhe),[u,f]=E.useState(\"dark\");E.useState(!1),E.useState(null);const[c,d]=E.useState(Date.now());E.useEffect(()=>{if(n&&n.length){let p={},m=[],w=n.filter(y=>y.startsWith(\"webapp.react.views.\"));w.length&&w.map((v,g)=>{const x=Math.floor(g/5),S=g%5;p[v]={position:{x:($r.metrics.DIST_X*2+$r.metrics.PADDING_X*.5)*S,y:$r.nodes[\"webapp.react.views\"].position.y+$r.metrics.DIST_Y*2.5*x-S*$r.metrics.PADDING_Y*2}},m.push({id:`uxsitemap.structure-${v}`,source:\"uxsitemap.structure\",target:v})}),i(y=>{const v={};return y.map(g=>{v[g.id]={position:g.position}}),n.filter(g=>Object.keys($r.nodes).some(x=>g.startsWith(x))).map((g,x)=>{let S=`${g}`,k=!1,C=!1;g.startsWith(\"webapp\")&&(S=g.split(\".\").slice(0,3).join(\".\"),k=!0,g.includes(\"webapp.react.views\")&&(C=!0));const T=bC.meta[S],O=v[g]?v[g]:k&&C?p[g]:$r.nodes[S];return{type:\"cofounder_node\",id:g,data:{key:g,meta:{...T,content_type:bC.types[T.type]}},...O}}).filter(g=>g)}),a([...$r.edges,...m.map(y=>({animated:!0,style:{stroke:\"#999\"},type:\"floating\",markerEnd:{type:Xs.ArrowClosed,width:30,height:30},...y}))])}},[n]);const h=E.useCallback(p=>a(m=>AR({...p,type:\"floating\",markerEnd:{type:Xs.Arrow}},m)),[a]);return b.jsxs(\"div\",{style:{width:\"100vw\",height:\"100vh\"},children:[b.jsx(\"pre\",{className:\"m-4 p-4 bg-black text-white text-sm hidden\",children:JSON.stringify(r)}),b.jsxs(Tee,{colorMode:u,nodes:r,edges:o,onNodesChange:s,onEdgesChange:l,onConnect:h,fitView:!0,minZoom:.1,edgeTypes:Bhe,connectionLineComponent:tte,nodeTypes:$he,proOptions:Vhe,children:[b.jsx(Bee,{}),b.jsx(Zee,{}),b.jsx(Ree,{variant:\"dots\",gap:48,size:2})]},c)]})},Whe=({project:e})=>{var u,f,c;kh();const t=bo(d=>d.project.streamEvents),[n,r]=E.useState(!0),[i,s]=E.useState(\"\"),[o,a]=E.useState(!1),l=E.useRef(null);return E.useEffect(()=>{Object.entries(t).filter(([h,p])=>p.is_running).length&&(i!=null&&i.length)&&(l.current.scrollTop=l.current.scrollHeight)},[t]),b.jsxs(b.Fragment,{children:[Object.keys(t).length&&(i==null?void 0:i.length)&&b.jsx(b.Fragment,{children:b.jsx(\"div\",{className:`fixed top-0 left-0 inset-0 flex items-start justify-center\\r\n\t\t\t\t\t\t\t\t\t\t\t\th-[80vh] w-[75vw] overflow-hidden`,style:{zIndex:999},children:b.jsx(\"div\",{className:`text-white text-sm font-light\n\t\t\t\t\t\t\t\t\t\t\t\t\toverflow-auto shadow-2xl rounded rounded-lg\n\t\t\t\t\t\t\t\t\t\t\t\t\tbg-[#444]/30 backdrop-blur-md\n\t\t\t\t\t\t\t\t\t\t\t\t\twhitespace-pre-wrap break-words\n\t\t\t\t\t\t\t\t\t\t\t\t\tmt-[10vh]\n\t\t\t\t\t\t\t\t\t\t\t\t\tw-full\n                          max-h-[65vh]\n\t\t\t\t\t\t\t\t\t\t\t\t\tm-12 p-12\n\t\t\t\t\t\t\t\t\t\t\t\t\tduration-300`,ref:l,children:b.jsx(\"p\",{children:(c=(f=(u=t[i])==null?void 0:u.data)==null?void 0:f.data)==null?void 0:c.trim()})})})})||b.jsx(b.Fragment,{}),b.jsx(\"div\",{className:`dark text-white\n\t\t\t\t\t\t\t\t\t\t\tfixed top-0 right-0 m-4\n\t\t\t\t\t\t\t\t\t\t\t${n?\"w-[25vw] h-[70vh] p-8 bg-[#333]/20\":\"w-[3vw] h-[70vh] flex items-center justify-center text-center cursor-pointer bg-[#666]/20 hover:bg-white/20\"}\n\t\t\t\t\t\t\t\t\t\t\tbackdrop-blur-md\n\t\t\t\t\t\t\t\t\t\t\trounded rounded-lg duration-300`,onClick:()=>{n||r(!0)},style:{zIndex:2},children:b.jsxs(\"div\",{children:[b.jsx(\"a\",{className:`cursor-pointer hover:text-[#ccc] duration-200  ${n?\"\":\"text-xl font-light\"}`,onClick:()=>{r(!n)},children:`${n?\"Operations Streams >\":\"<\"}`}),n&&b.jsx(b.Fragment,{children:b.jsxs(\"div\",{className:\"py-2 mt-2 border-t border-[#222] max-h-[60vh] overflow-auto\",children:[!Object.keys(t).length&&b.jsx(b.Fragment,{children:b.jsx(\"h2\",{className:\"opacity-50 text-lg font-light\",children:\"No current streaming operations\"})})||b.jsx(b.Fragment,{}),Object.entries(t).filter(([d,h])=>h.is_running).map(([d,h],p)=>{var m,w,y;return b.jsxs(\"div\",{className:\"group p-2 my-2 rounded bg-[#222] hover:bg-black cursor-pointer duration-200 font-light whitespace-pre-wrap break-words\",onMouseEnter:()=>{s(d)},onMouseLeave:()=>{o||s(\"\")},onClick:()=>{o?(s(\"\"),a(!1)):(s(d),a(!0))},children:[b.jsxs(\"div\",{className:\"flex gap-2 items-center mb-1\",children:[b.jsxs(\"div\",{role:\"status\",children:[b.jsxs(\"svg\",{\"aria-hidden\":\"true\",className:\"w-3 h-3 text-gray-200 animate-spin fill-[#666]\",viewBox:\"0 0 100 101\",fill:\"none\",xmlns:\"http://www.w3.org/2000/svg\",children:[b.jsx(\"path\",{d:\"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z\",fill:\"currentColor\"}),b.jsx(\"path\",{d:\"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z\",fill:\"currentFill\"})]}),b.jsx(\"span\",{className:\"sr-only\",children:\"Loading...\"})]}),b.jsx(\"h2\",{className:\"text-sm\",children:(m=h.meta)!=null&&m.name?h.meta.name:h.data.key})]}),((w=h.meta)==null?void 0:w.desc)&&b.jsx(b.Fragment,{children:b.jsxs(\"div\",{className:\"flex gap-2 items-center mb-1\",children:[b.jsx(\"div\",{role:\"status opacity-0\",children:b.jsxs(\"svg\",{\"aria-hidden\":\"true\",className:\"opacity-0 w-3 h-3 text-gray-200 animate-spin fill-[#666]\",viewBox:\"0 0 100 101\",fill:\"none\",xmlns:\"http://www.w3.org/2000/svg\",children:[b.jsx(\"path\",{d:\"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z\",fill:\"currentColor\"}),b.jsx(\"path\",{d:\"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z\",fill:\"currentFill\"})]})}),b.jsx(\"h3\",{className:\"text-xs text-[#aaa]\",children:(y=h.meta)==null?void 0:y.desc})]})})||b.jsx(b.Fragment,{})]},d)})]})})||b.jsx(b.Fragment,{})]})})]})},Khe=()=>{const{project:e}=g5(),[t,n]=E.useState(\"blueprint\"),[r,i]=E.useState(!1),[s,o]=E.useState(!1),[a,l]=E.useState(!1),[u,f]=E.useState(!1),c=[\"blueprint\",\"live\",\"editor\",\"export\"],d=\"http://localhost:4200/api\",h=\"http://localhost:5173\",p=kh();return E.useEffect(()=>{u||(f(!0),p(Kz()))},[]),E.useEffect(()=>{t===\"blueprint\"&&(async()=>{try{(await fetch(`${d}/ping`)).ok?i(!0):i(!1)}catch{i(!1)}l(!0)})(),t===\"live\"&&(async()=>{try{(await fetch(h)).ok?o(!0):o(!1)}catch{o(!1)}})()},[t]),a?b.jsx(b.Fragment,{children:(e==null?void 0:e.length)&&b.jsxs(b.Fragment,{children:[b.jsx(\"div\",{className:`fixed top-0 z-10\n\t\t\t\t\t\t\t\t\t\t\tbg-[#333]/20\n\t\t\t\t\t\t\t\t\t\t\tbackdrop-blur-md\n\t\t\t\t\t\t\t\t\t\t\trounded-lg shadow-md\n\t\t\t\t\t\t\t\t\t\t\ttext-sm text-white font-light\n\t\t\t\t\t\t\t\t\t\t\tmt-4 p-2 ml-2 sm:ml-0\n\t\t\t\t\t\t\t\t\t\t\tsm:left-1/2 sm:transform sm:-translate-x-1/2\n\t\t\t\t\t\t\t\t\t\t\tpx-6 `,children:b.jsxs(\"ul\",{className:\"flex justify-center space-x-4 items-center\",children:[b.jsx(Kl,{className:\"cursor-pointer p-2 rounded-xl hover:bg-[#333]/50 px-3\",to:\"/projects\",children:b.jsx(\"li\",{children:\"<\"})},e),c.map(m=>b.jsxs(\"li\",{className:`cursor-pointer p-2 rounded-xl hover:bg-[#333]/50 flex items-center gap-2 px-3\n\t\t\t\t\t\t\t\t\t\t\t${t===m?\"bg-black/50\":\"\"}`,onClick:()=>n(m),children:[m.charAt(0).toUpperCase()+m.slice(1),m===\"live\"&&b.jsx(b.Fragment,{children:b.jsx(\"a\",{href:\"http://localhost:5371\",target:\"_blank\",rel:\"noopener noreferrer\",className:\"flex items-center rounded-xl hover:bg-[#111] p-2\",children:b.jsx($q,{className:\"w-3 h-3\"})})})||\"\"]},m))]})}),b.jsx(\"div\",{className:t===\"blueprint\"?\"\":\"hidden\",children:r&&b.jsxs(b.Fragment,{children:[b.jsx(Hhe,{project:e}),b.jsx(Whe,{project:e})]})||b.jsx(b.Fragment,{children:b.jsx(\"div\",{className:\"flex items-center justify-center h-screen w-full text-white\",children:b.jsxs(\"h1\",{className:\"text-2xl font-light opacity-50 whitespace-pre-wrap break-all\",children:[`{ local cofounder/api server at \\`${d}\\` not reachable }`,b.jsx(\"br\",{}),b.jsx(\"br\",{}),\">\tmake sure local cofounder server is launched\\n\t( use `npm run start` in cofounder/api/ )\"]})})})}),b.jsx(\"div\",{className:t===\"editor\"?\"\":\"hidden\",children:b.jsx(\"div\",{className:\"flex items-center justify-center h-screen w-full text-white\",children:b.jsx(\"h1\",{className:\"text-2xl font-light opacity-50 text-center\",children:\"{ editor : not implemented yet }\"})})}),b.jsx(\"div\",{className:t===\"export\"?\"\":\"hidden\",children:b.jsx(\"div\",{className:\"flex items-center justify-center h-screen w-full text-white\",children:b.jsx(\"h1\",{className:\"text-2xl font-light opacity-50 text-center\",children:\"{ export : not implemented yet }\"})})}),b.jsx(\"div\",{className:t===\"live\"?\"\":\"hidden\",children:b.jsx(b.Fragment,{children:b.jsx(\"div\",{className:\"flex items-center justify-center h-screen w-full text-white\",children:s&&b.jsx(b.Fragment,{children:b.jsx(\"iframe\",{src:h,className:\"w-full mt-[12vh] min-h-[88vh] border-t border-[#222] overflow-auto\",style:{position:\"absolute\",top:0,left:0,right:0,bottom:0},title:\"Live mode\",sandbox:\"allow-same-origin allow-scripts allow-popups allow-forms\"})})||b.jsx(b.Fragment,{children:b.jsx(\"div\",{className:\"flex items-center justify-center h-screen w-full text-white\",children:b.jsxs(\"h1\",{className:\"text-2xl font-light opacity-50 whitespace-pre-wrap break-all\",children:[`{ app at \\`${h}\\` not reachable }`,b.jsx(\"br\",{}),b.jsx(\"br\",{}),b.jsx(\"br\",{}),`either >\twebapp vite server not launched\n\t\t\t\t( use \\`npm run dev\\` in apps/${e}/ to start )`,b.jsx(\"br\",{}),b.jsx(\"br\",{}),\"or > problem in app root/store/view\"]})})})})})})]})||b.jsx(b.Fragment,{children:b.jsx(\"div\",{className:\"flex items-center justify-center h-screen w-full text-white\",children:b.jsx(\"h1\",{className:\"text-2xl font-light opacity-50 whitespace-pre-wrap break-all\",children:\"{ project not set ; double check your url }\"})})})}):b.jsx(b.Fragment,{})},qhe=()=>{const[e,t]=E.useState(!1),[n,r]=E.useState(!1),i=ic(),s=\"http://localhost:4200/api\";return E.useEffect(()=>{(async()=>{try{(await fetch(`${s}/ping`)).ok?t(!0):t(!1)}catch{t(!1)}r(!0)})()},[]),n?b.jsx(b.Fragment,{children:e&&b.jsx(b.Fragment,{children:b.jsxs(\"div\",{className:\"flex h-screen\",children:[!i.pathname.startsWith(\"/project/\")&&b.jsx(sK,{}),b.jsx(\"div\",{className:\"flex-1 overflow-auto\",children:b.jsxs(P5,{children:[b.jsx(yo,{path:\"/\",element:b.jsx(b.Fragment,{children:b.jsxs(\"div\",{className:\"container text-white mx-auto w-full max-w-[90vw] xl:max-w-[60vw] p-12 mt-12 text-left whitespace-pre-line break-words\",children:[b.jsx(\"section\",{className:\"pb-4 mb-4 text-center\",children:b.jsx(\"a\",{href:\"https://github.com/raidendotai/cofounder\",target:\"_blank\",className:\"opacity-100 hover:opacity-90 duration-200\",children:b.jsx(\"img\",{className:\"rounded rounded-xl max-w-[90vw] md:max-w-[35vw] mx-auto\",src:qz})})}),b.jsx(\"h2\",{className:\"mt-4 text-2xl opacity-50 font-light text-center uppercase\",children:\"early alpha release\"})]})})}),b.jsx(yo,{path:\"/projects\",element:b.jsx(\"div\",{className:\"container text-white mx-auto w-full max-w-[90vw] xl:max-w-[80vw] p-6 mt-6 text-left whitespace-pre-line break-words\",children:b.jsx(Kq,{})})}),b.jsx(yo,{path:\"/project/:project\",element:b.jsx(Khe,{})}),b.jsx(yo,{path:\"/playground/designer\",element:b.jsx(qq,{})}),b.jsx(yo,{path:\"/settings\",element:b.jsx(Yq,{})})]})})]})})||b.jsx(b.Fragment,{children:b.jsx(\"div\",{className:\"flex items-center justify-center h-screen w-full text-white\",children:b.jsxs(\"h1\",{className:\"text-2xl font-light opacity-50 whitespace-pre-wrap break-all\",children:[`{ local cofounder/api server at \\`${s}\\` not reachable }`,b.jsx(\"br\",{}),b.jsx(\"br\",{}),\">\tmake sure local cofounder server is launched\\n\t( use `npm run start` in cofounder/api/ )\"]})})})}):b.jsx(b.Fragment,{})},Yhe=()=>b.jsx(b.Fragment,{children:b.jsx(qhe,{})});c2(document.getElementById(\"root\")).render(b.jsx(IF,{store:$a,children:b.jsx(j5,{children:b.jsx(Yhe,{})})}))});export default Ghe();\n"
  },
  {
    "path": "cofounder/api/dist/assets/index-COffgP7k.css",
    "content": ".react-flow{direction:ltr;--xy-edge-stroke-default: #b1b1b7;--xy-edge-stroke-width-default: 1;--xy-edge-stroke-selected-default: #555;--xy-connectionline-stroke-default: #b1b1b7;--xy-connectionline-stroke-width-default: 1;--xy-attribution-background-color-default: rgba(255, 255, 255, .5);--xy-minimap-background-color-default: #fff;--xy-minimap-mask-background-color-default: rgb(240, 240, 240, .6);--xy-minimap-mask-stroke-color-default: transparent;--xy-minimap-mask-stroke-width-default: 1;--xy-minimap-node-background-color-default: #e2e2e2;--xy-minimap-node-stroke-color-default: transparent;--xy-minimap-node-stroke-width-default: 2;--xy-background-color-default: transparent;--xy-background-pattern-dots-color-default: #91919a;--xy-background-pattern-lines-color-default: #eee;--xy-background-pattern-cross-color-default: #e2e2e2;background-color:var( --xy-background-color, var(--xy-background-color-default) );--xy-node-color-default: inherit;--xy-node-border-default: 1px solid #1a192b;--xy-node-background-color-default: #fff;--xy-node-group-background-color-default: rgba(240, 240, 240, .25);--xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(0, 0, 0, .08);--xy-node-boxshadow-selected-default: 0 0 0 .5px #1a192b;--xy-node-border-radius-default: 3px;--xy-handle-background-color-default: #1a192b;--xy-handle-border-color-default: #fff;--xy-selection-background-color-default: rgba(0, 89, 220, .08);--xy-selection-border-default: 1px dotted rgba(0, 89, 220, .8);--xy-controls-button-background-color-default: #fefefe;--xy-controls-button-background-color-hover-default: #f4f4f4;--xy-controls-button-color-default: inherit;--xy-controls-button-color-hover-default: inherit;--xy-controls-button-border-color-default: #eee;--xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, .08);--xy-edge-label-background-color-default: #ffffff;--xy-edge-label-color-default: inherit;--xy-resize-background-color-default: #3367d9}.react-flow.dark{--xy-edge-stroke-default: #5c5c5c;--xy-edge-stroke-width-default: 1;--xy-edge-stroke-selected-default: #8a8a8a;--xy-connectionline-stroke-default: #4a4a4a;--xy-connectionline-stroke-width-default: 1;--xy-attribution-background-color-default: rgba(100, 100, 100, .25);--xy-minimap-background-color-default: #1a1a1a;--xy-minimap-mask-background-color-default: rgba(80, 80, 80, .6);--xy-minimap-mask-stroke-color-default: transparent;--xy-minimap-mask-stroke-width-default: 1;--xy-minimap-node-background-color-default: #3a3a3a;--xy-minimap-node-stroke-color-default: transparent;--xy-minimap-node-stroke-width-default: 2;--xy-background-color-default: #1a1a1a;--xy-background-pattern-dots-color-default: #616161;--xy-background-pattern-lines-color-default: #141414;--xy-background-pattern-cross-color-default: #525252;--xy-node-color-default: #e0e0e0;--xy-node-border-default: 1px solid #4a4a4a;--xy-node-background-color-default: #2a2a2a;--xy-node-group-background-color-default: rgba(200, 200, 200, .25);--xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(255, 255, 255, .08);--xy-node-boxshadow-selected-default: 0 0 0 .5px #b0b0b0;--xy-handle-background-color-default: #d0d0d0;--xy-handle-border-color-default: #2a2a2a;--xy-selection-background-color-default: rgba(150, 150, 200, .08);--xy-selection-border-default: 1px dotted rgba(150, 150, 200, .8);--xy-controls-button-background-color-default: #3a3a3a;--xy-controls-button-background-color-hover-default: #4a4a4a;--xy-controls-button-color-default: #e0e0e0;--xy-controls-button-color-hover-default: #ffffff;--xy-controls-button-border-color-default: #6a6a6a;--xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, .08);--xy-edge-label-background-color-default: #1a1a1a;--xy-edge-label-color-default: #e0e0e0}.react-flow__background{background-color:var( --xy-background-color, var(--xy-background-color-props, var(--xy-background-color-default)) );pointer-events:none;z-index:-1}.react-flow__container{position:absolute;width:100%;height:100%;top:0;left:0}.react-flow__pane{z-index:1}.react-flow__pane.draggable{cursor:grab}.react-flow__pane.dragging{cursor:grabbing}.react-flow__pane.selection{cursor:pointer}.react-flow__viewport{transform-origin:0 0;z-index:2;pointer-events:none}.react-flow__renderer{z-index:4}.react-flow__selection{z-index:6}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible{outline:none}.react-flow__edge-path{stroke:var(--xy-edge-stroke, var(--xy-edge-stroke-default));stroke-width:var(--xy-edge-stroke-width, var(--xy-edge-stroke-width-default));fill:none}.react-flow__connection-path{stroke:var( --xy-connectionline-stroke, var(--xy-connectionline-stroke-default) );stroke-width:var( --xy-connectionline-stroke-width, var(--xy-connectionline-stroke-width-default) );fill:none}.react-flow .react-flow__edges{position:absolute}.react-flow .react-flow__edges svg{overflow:visible;position:absolute;pointer-events:none}.react-flow__edge{pointer-events:visibleStroke}.react-flow__edge.selectable{cursor:pointer}.react-flow__edge.animated path{stroke-dasharray:5;animation:dashdraw .5s linear infinite}.react-flow__edge.animated path.react-flow__edge-interaction{stroke-dasharray:none;animation:none}.react-flow__edge.inactive{pointer-events:none}.react-flow__edge.selected,.react-flow__edge:focus,.react-flow__edge:focus-visible{outline:none}.react-flow__edge.selected .react-flow__edge-path,.react-flow__edge.selectable:focus .react-flow__edge-path,.react-flow__edge.selectable:focus-visible .react-flow__edge-path{stroke:var(--xy-edge-stroke-selected, var(--xy-edge-stroke-selected-default))}.react-flow__edge-textwrapper{pointer-events:all}.react-flow__edge .react-flow__edge-text{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__connection{pointer-events:none}.react-flow__connection .animated{stroke-dasharray:5;animation:dashdraw .5s linear infinite}svg.react-flow__connectionline{z-index:1001;overflow:visible;position:absolute}.react-flow__nodes{pointer-events:none;transform-origin:0 0}.react-flow__node{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:all;transform-origin:0 0;box-sizing:border-box;cursor:default}.react-flow__node.selectable{cursor:pointer}.react-flow__node.draggable{cursor:grab;pointer-events:all}.react-flow__node.draggable.dragging{cursor:grabbing}.react-flow__nodesselection{z-index:3;transform-origin:left top;pointer-events:none}.react-flow__nodesselection-rect{position:absolute;pointer-events:all;cursor:grab}.react-flow__handle{position:absolute;pointer-events:none;min-width:5px;min-height:5px;width:6px;height:6px;background-color:var( --xy-handle-background-color, var(--xy-handle-background-color-default) );border:1px solid var(--xy-handle-border-color, var(--xy-handle-border-color-default));border-radius:100%}.react-flow__handle.connectingfrom{pointer-events:all}.react-flow__handle.connectionindicator{pointer-events:all;cursor:crosshair}.react-flow__handle-bottom{top:auto;left:50%;bottom:0;transform:translate(-50%,50%)}.react-flow__handle-top{top:0;left:50%;transform:translate(-50%,-50%)}.react-flow__handle-left{top:50%;left:0;transform:translate(-50%,-50%)}.react-flow__handle-right{top:50%;right:0;transform:translate(50%,-50%)}.react-flow__edgeupdater{cursor:move;pointer-events:all}.react-flow__panel{position:absolute;z-index:5;margin:15px}.react-flow__panel.top{top:0}.react-flow__panel.bottom{bottom:0}.react-flow__panel.left{left:0}.react-flow__panel.right{right:0}.react-flow__panel.center{left:50%;transform:translate(-50%)}.react-flow__attribution{font-size:10px;background:var( --xy-attribution-background-color, var(--xy-attribution-background-color-default) );padding:2px 3px;margin:0}.react-flow__attribution a{text-decoration:none;color:#999}@keyframes dashdraw{0%{stroke-dashoffset:10}}.react-flow__edgelabel-renderer{position:absolute;width:100%;height:100%;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;left:0;top:0}.react-flow__viewport-portal{position:absolute;width:100%;height:100%;left:0;top:0;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__minimap{background:var( --xy-minimap-background-color-props, var(--xy-minimap-background-color, var(--xy-minimap-background-color-default)) )}.react-flow__minimap-svg{display:block}.react-flow__minimap-mask{fill:var( --xy-minimap-mask-background-color-props, var( --xy-minimap-mask-background-color, var(--xy-minimap-mask-background-color-default) ) );stroke:var( --xy-minimap-mask-stroke-color-props, var( --xy-minimap-mask-stroke-color, var(--xy-minimap-mask-stroke-color-default) ) );stroke-width:var( --xy-minimap-mask-stroke-width-props, var( --xy-minimap-mask-stroke-width, var(--xy-minimap-mask-stroke-width-default) ) )}.react-flow__minimap-node{fill:var( --xy-minimap-node-background-color-props, var( --xy-minimap-node-background-color, var(--xy-minimap-node-background-color-default) ) );stroke:var( --xy-minimap-node-stroke-color-props, var( --xy-minimap-node-stroke-color, var(--xy-minimap-node-stroke-color-default) ) );stroke-width:var( --xy-minimap-node-stroke-width-props, var( --xy-minimap-node-stroke-width, var(--xy-minimap-node-stroke-width-default) ) )}.react-flow__background-pattern.dots{fill:var( --xy-background-pattern-color-props, var( --xy-background-pattern-color, var(--xy-background-pattern-dots-color-default) ) )}.react-flow__background-pattern.lines{stroke:var( --xy-background-pattern-color-props, var( --xy-background-pattern-color, var(--xy-background-pattern-lines-color-default) ) )}.react-flow__background-pattern.cross{stroke:var( --xy-background-pattern-color-props, var( --xy-background-pattern-color, var(--xy-background-pattern-cross-color-default) ) )}.react-flow__controls{display:flex;flex-direction:column;box-shadow:var( --xy-controls-box-shadow, var(--xy-controls-box-shadow-default) )}.react-flow__controls.horizontal{flex-direction:row}.react-flow__controls-button{display:flex;justify-content:center;align-items:center;height:26px;width:26px;padding:4px;border:none;background:var( --xy-controls-button-background-color, var(--xy-controls-button-background-color-default) );border-bottom:1px solid var( --xy-controls-button-border-color-props, var( --xy-controls-button-border-color, var(--xy-controls-button-border-color-default) ) );color:var( --xy-controls-button-color-props, var(--xy-controls-button-color, var(--xy-controls-button-color-default)) );cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__controls-button svg{width:100%;max-width:12px;max-height:12px;fill:currentColor}.react-flow__edge.updating .react-flow__edge-path{stroke:#777}.react-flow__edge-text{font-size:10px}.react-flow__node.selectable:focus,.react-flow__node.selectable:focus-visible{outline:none}.react-flow__node-input,.react-flow__node-default,.react-flow__node-output,.react-flow__node-group{padding:10px;border-radius:var( --xy-node-border-radius, var(--xy-node-border-radius-default) );width:150px;font-size:12px;color:var(--xy-node-color, var(--xy-node-color-default));text-align:center;border:var(--xy-node-border, var(--xy-node-border-default));background-color:var( --xy-node-background-color, var(--xy-node-background-color-default) )}.react-flow__node-input.selectable:hover,.react-flow__node-default.selectable:hover,.react-flow__node-output.selectable:hover,.react-flow__node-group.selectable:hover{box-shadow:var( --xy-node-boxshadow-hover, var(--xy-node-boxshadow-hover-default) )}.react-flow__node-input.selectable.selected,.react-flow__node-input.selectable:focus,.react-flow__node-input.selectable:focus-visible,.react-flow__node-default.selectable.selected,.react-flow__node-default.selectable:focus,.react-flow__node-default.selectable:focus-visible,.react-flow__node-output.selectable.selected,.react-flow__node-output.selectable:focus,.react-flow__node-output.selectable:focus-visible,.react-flow__node-group.selectable.selected,.react-flow__node-group.selectable:focus,.react-flow__node-group.selectable:focus-visible{box-shadow:var( --xy-node-boxshadow-selected, var(--xy-node-boxshadow-selected-default) )}.react-flow__node-group{background-color:var( --xy-node-group-background-color, var(--xy-node-group-background-color-default) )}.react-flow__nodesselection-rect,.react-flow__selection{background:var( --xy-selection-background-color, var(--xy-selection-background-color-default) );border:var(--xy-selection-border, var(--xy-selection-border-default))}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible,.react-flow__selection:focus,.react-flow__selection:focus-visible{outline:none}.react-flow__controls-button:hover{background:var( --xy-controls-button-background-color-hover-props, var( --xy-controls-button-background-color-hover, var(--xy-controls-button-background-color-hover-default) ) );color:var( --xy-controls-button-color-hover-props, var( --xy-controls-button-color-hover, var(--xy-controls-button-color-hover-default) ) )}.react-flow__controls-button:disabled{pointer-events:none}.react-flow__controls-button:disabled svg{fill-opacity:.4}.react-flow__controls-button:last-child{border-bottom:none}.react-flow__resize-control{position:absolute}.react-flow__resize-control.left,.react-flow__resize-control.right{cursor:ew-resize}.react-flow__resize-control.top,.react-flow__resize-control.bottom{cursor:ns-resize}.react-flow__resize-control.top.left,.react-flow__resize-control.bottom.right{cursor:nwse-resize}.react-flow__resize-control.bottom.left,.react-flow__resize-control.top.right{cursor:nesw-resize}.react-flow__resize-control.handle{width:4px;height:4px;border:1px solid #fff;border-radius:1px;background-color:var( --xy-resize-background-color, var(--xy-resize-background-color-default) );transform:translate(-50%,-50%)}.react-flow__resize-control.handle.left{left:0;top:50%}.react-flow__resize-control.handle.right{left:100%;top:50%}.react-flow__resize-control.handle.top{left:50%;top:0}.react-flow__resize-control.handle.bottom{left:50%;top:100%}.react-flow__resize-control.handle.top.left,.react-flow__resize-control.handle.bottom.left{left:0}.react-flow__resize-control.handle.top.right,.react-flow__resize-control.handle.bottom.right{left:100%}.react-flow__resize-control.line{border-color:var( --xy-resize-background-color, var(--xy-resize-background-color-default) );border-width:0;border-style:solid}.react-flow__resize-control.line.left,.react-flow__resize-control.line.right{width:1px;transform:translate(-50%);top:0;height:100%}.react-flow__resize-control.line.left{left:0;border-left-width:1px}.react-flow__resize-control.line.right{left:100%;border-right-width:1px}.react-flow__resize-control.line.top,.react-flow__resize-control.line.bottom{height:1px;transform:translateY(-50%);left:0;width:100%}.react-flow__resize-control.line.top{top:0;border-top-width:1px}.react-flow__resize-control.line.bottom{border-bottom-width:1px;top:100%}.react-flow__edge-textbg{fill:var( --xy-edge-label-background-color, var(--xy-edge-label-background-color-default) )}.react-flow__edge-text{fill:var(--xy-edge-label-color, var(--xy-edge-label-color-default))}.floatingedges{flex-direction:column;display:flex;flex-grow:1;height:100%}.floatingedges .react-flow__handle{opacity:0}.react-flow__node-cofounder_node{background:#000;border:1px solid #555;border-radius:5px;text-align:left}.markdown{color:#fff;font-size:.975rem;line-height:1.3;padding:.3rem;border-bottom:1px solid #555;margin-bottom:1rem;-webkit-font-smoothing:antialiased}.markdown h1{font-size:1.5rem;margin:.3rem 0;border-bottom:1px solid #444;padding-bottom:.2rem}.markdown h2{font-size:1.25rem;margin:.3rem 0;border-bottom:1px solid #444;padding-bottom:.2rem}.markdown h3{font-size:1rem;margin:.2rem 0;border-bottom:1px solid #444;padding-bottom:.2rem}.markdown p{margin:.3rem 0;line-height:1.75}.markdown ul,.markdown ol{margin:.3rem 0;padding-left:1.2rem}.markdown li{margin:.1rem 0;border-bottom:1px solid #222}.markdown blockquote{border-left:2px solid #555;padding-left:.5rem;color:#ccc;margin:.3rem 0;border-bottom:1px solid #222}.markdown code{background-color:#222;color:#f8f8f2;padding:.2rem .4rem;margin:.1rem;border-radius:3px}.markdown pre{background-color:#111;color:#f8f8f2;padding:.4rem;border-radius:5px;overflow:auto;margin:.3rem 0}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: \"\"}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",Segoe UI Symbol,\"Noto Color Emoji\";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}:root{--radius: .5rem}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.invisible{visibility:hidden}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.inset-x-0{left:0;right:0}.inset-y-0{top:0;bottom:0}.-bottom-12{bottom:-3rem}.-left-12{left:-3rem}.-right-12{right:-3rem}.-top-12{top:-3rem}.bottom-0{bottom:0}.bottom-4{bottom:1rem}.left-0{left:0}.left-1{left:.25rem}.left-1\\/2{left:50%}.left-2{left:.5rem}.left-\\[50\\%\\]{left:50%}.right-0{right:0}.right-1{right:.25rem}.right-2{right:.5rem}.right-4{right:1rem}.top-0{top:0}.top-1\\/2{top:50%}.top-2{top:.5rem}.top-4{top:1rem}.top-\\[1px\\]{top:1px}.top-\\[50\\%\\]{top:50%}.top-\\[60\\%\\]{top:60%}.top-full{top:100%}.z-10{z-index:10}.z-50{z-index:50}.z-\\[100\\]{z-index:100}.z-\\[1\\]{z-index:1}.col-span-12{grid-column:span 12 / span 12}.col-span-2{grid-column:span 2 / span 2}.col-span-3{grid-column:span 3 / span 3}.col-span-4{grid-column:span 4 / span 4}.col-span-9{grid-column:span 9 / span 9}.m-12{margin:3rem}.m-2{margin:.5rem}.m-4{margin:1rem}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-auto{margin-left:auto;margin-right:auto}.my-0\\.5{margin-top:.125rem;margin-bottom:.125rem}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.-ml-4{margin-left:-1rem}.-mt-4{margin-top:-1rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-auto{margin-left:auto}.mr-2{margin-right:.5rem}.mt-1\\.5{margin-top:.375rem}.mt-12{margin-top:3rem}.mt-2{margin-top:.5rem}.mt-24{margin-top:6rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-\\[10vh\\]{margin-top:10vh}.mt-\\[12vh\\]{margin-top:12vh}.mt-auto{margin-top:auto}.line-clamp-5{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:5}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.aspect-square{aspect-ratio:1 / 1}.aspect-video{aspect-ratio:16 / 9}.h-1\\.5{height:.375rem}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-2{height:.5rem}.h-2\\.5{height:.625rem}.h-3{height:.75rem}.h-3\\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\\[1px\\]{height:1px}.h-\\[70vh\\]{height:70vh}.h-\\[80vh\\]{height:80vh}.h-\\[90vh\\]{height:90vh}.h-\\[var\\(--radix-navigation-menu-viewport-height\\)\\]{height:var(--radix-navigation-menu-viewport-height)}.h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-96{max-height:24rem}.max-h-\\[25vh\\]{max-height:25vh}.max-h-\\[300px\\]{max-height:300px}.max-h-\\[40vh\\]{max-height:40vh}.max-h-\\[60vh\\]{max-height:60vh}.max-h-\\[65vh\\]{max-height:65vh}.max-h-\\[90vh\\]{max-height:90vh}.max-h-screen{max-height:100vh}.min-h-\\[65vh\\]{min-height:65vh}.min-h-\\[80px\\]{min-height:80px}.min-h-\\[88vh\\]{min-height:88vh}.w-0{width:0px}.w-1{width:.25rem}.w-1\\/2{width:50%}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-2{width:.5rem}.w-2\\.5{width:.625rem}.w-3{width:.75rem}.w-3\\.5{width:.875rem}.w-3\\/4{width:75%}.w-4{width:1rem}.w-5{width:1.25rem}.w-64{width:16rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-\\[100px\\]{width:100px}.w-\\[1px\\]{width:1px}.w-\\[25vw\\]{width:25vw}.w-\\[3vw\\]{width:3vw}.w-\\[75vw\\]{width:75vw}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.w-px{width:1px}.min-w-0{min-width:0px}.min-w-\\[12rem\\]{min-width:12rem}.min-w-\\[50vw\\]{min-width:50vw}.min-w-\\[8rem\\]{min-width:8rem}.min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.max-w-\\[30vw\\]{max-width:30vw}.max-w-\\[60vw\\]{max-width:60vw}.max-w-\\[90vw\\]{max-width:90vw}.max-w-lg{max-width:32rem}.max-w-max{max-width:-moz-max-content;max-width:max-content}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.grow-0{flex-grow:0}.basis-full{flex-basis:100%}.caption-bottom{caption-side:bottom}.border-collapse{border-collapse:collapse}.-translate-x-1\\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-\\[-50\\%\\]{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-\\[-50\\%\\]{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-45{--tw-rotate: 45deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate: 90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.list-none{list-style-type:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-stretch{align-items:stretch}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-\\[2px\\]{border-radius:2px}.rounded-\\[inherit\\]{border-radius:inherit}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:.75rem}.rounded-t-\\[10px\\]{border-top-left-radius:10px;border-top-right-radius:10px}.rounded-tl-sm{border-top-left-radius:calc(var(--radius) - 4px)}.border{border-width:1px}.border-2{border-width:2px}.border-\\[1\\.5px\\]{border-width:1.5px}.border-y{border-top-width:1px;border-bottom-width:1px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-\\[\\#222\\]{--tw-border-opacity: 1;border-color:rgb(34 34 34 / var(--tw-border-opacity))}.border-\\[\\#333333\\],.border-\\[\\#333\\]{--tw-border-opacity: 1;border-color:rgb(51 51 51 / var(--tw-border-opacity))}.border-\\[\\#aaa\\]{--tw-border-opacity: 1;border-color:rgb(170 170 170 / var(--tw-border-opacity))}.border-\\[--color-border\\]{border-color:var(--color-border)}.border-neutral-200{--tw-border-opacity: 1;border-color:rgb(229 229 229 / var(--tw-border-opacity))}.border-neutral-200\\/50{border-color:#e5e5e580}.border-neutral-900{--tw-border-opacity: 1;border-color:rgb(23 23 23 / var(--tw-border-opacity))}.border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity))}.border-red-500\\/50{border-color:#ef444480}.border-transparent{border-color:transparent}.border-l-transparent{border-left-color:transparent}.border-t-transparent{border-top-color:transparent}.bg-\\[\\#000080\\]{--tw-bg-opacity: 1;background-color:rgb(0 0 128 / var(--tw-bg-opacity))}.bg-\\[\\#05D9FF\\]{--tw-bg-opacity: 1;background-color:rgb(5 217 255 / var(--tw-bg-opacity))}.bg-\\[\\#0a0a0a\\]{--tw-bg-opacity: 1;background-color:rgb(10 10 10 / var(--tw-bg-opacity))}.bg-\\[\\#111\\]{--tw-bg-opacity: 1;background-color:rgb(17 17 17 / var(--tw-bg-opacity))}.bg-\\[\\#1a1a1a\\]{--tw-bg-opacity: 1;background-color:rgb(26 26 26 / var(--tw-bg-opacity))}.bg-\\[\\#222\\]{--tw-bg-opacity: 1;background-color:rgb(34 34 34 / var(--tw-bg-opacity))}.bg-\\[\\#2a2a2a\\]{--tw-bg-opacity: 1;background-color:rgb(42 42 42 / var(--tw-bg-opacity))}.bg-\\[\\#333\\]{--tw-bg-opacity: 1;background-color:rgb(51 51 51 / var(--tw-bg-opacity))}.bg-\\[\\#333\\]\\/20{background-color:#3333}.bg-\\[\\#39FF14\\]{--tw-bg-opacity: 1;background-color:rgb(57 255 20 / var(--tw-bg-opacity))}.bg-\\[\\#444\\]\\/30{background-color:#4444444d}.bg-\\[\\#666\\]\\/20{background-color:#6663}.bg-\\[\\#A020F0\\]{--tw-bg-opacity: 1;background-color:rgb(160 32 240 / var(--tw-bg-opacity))}.bg-\\[\\#FF10F0\\]{--tw-bg-opacity: 1;background-color:rgb(255 16 240 / var(--tw-bg-opacity))}.bg-\\[\\#FFA500\\]{--tw-bg-opacity: 1;background-color:rgb(255 165 0 / var(--tw-bg-opacity))}.bg-\\[--color-bg\\]{background-color:var(--color-bg)}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}.bg-black\\/50{background-color:#00000080}.bg-black\\/80{background-color:#000c}.bg-neutral-100{--tw-bg-opacity: 1;background-color:rgb(245 245 245 / var(--tw-bg-opacity))}.bg-neutral-100\\/50{background-color:#f5f5f580}.bg-neutral-200{--tw-bg-opacity: 1;background-color:rgb(229 229 229 / var(--tw-bg-opacity))}.bg-neutral-800{--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity))}.bg-neutral-900{--tw-bg-opacity: 1;background-color:rgb(23 23 23 / var(--tw-bg-opacity))}.bg-neutral-950{--tw-bg-opacity: 1;background-color:rgb(10 10 10 / var(--tw-bg-opacity))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-white\\/10{background-color:#ffffff1a}.fill-\\[\\#666\\]{fill:#666}.fill-current{fill:currentColor}.p-0{padding:0}.p-1{padding:.25rem}.p-12{padding:3rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.p-\\[1px\\]{padding:1px}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0\\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pl-2\\.5{padding-left:.625rem}.pl-4{padding-left:1rem}.pl-6{padding-left:1.5rem}.pl-8{padding-left:2rem}.pr-10{padding-right:2.5rem}.pr-2{padding-right:.5rem}.pr-2\\.5{padding-right:.625rem}.pr-8{padding-right:2rem}.pt-0{padding-top:0}.pt-1{padding-top:.25rem}.pt-2{padding-top:.5rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-middle{vertical-align:middle}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-\\[0\\.8rem\\]{font-size:.8rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-light{font-weight:300}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-none{line-height:1}.tracking-tight{letter-spacing:-.025em}.tracking-widest{letter-spacing:.1em}.text-\\[\\#aaa\\]{--tw-text-opacity: 1;color:rgb(170 170 170 / var(--tw-text-opacity))}.text-\\[\\#bbb\\]{--tw-text-opacity: 1;color:rgb(187 187 187 / var(--tw-text-opacity))}.text-\\[\\#ccc\\],.text-\\[\\#cccccc\\]{--tw-text-opacity: 1;color:rgb(204 204 204 / var(--tw-text-opacity))}.text-\\[\\#ddd\\]{--tw-text-opacity: 1;color:rgb(221 221 221 / var(--tw-text-opacity))}.text-\\[\\#ffffff\\]{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-current{color:currentColor}.text-gray-200{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.text-neutral-50{--tw-text-opacity: 1;color:rgb(250 250 250 / var(--tw-text-opacity))}.text-neutral-500{--tw-text-opacity: 1;color:rgb(115 115 115 / var(--tw-text-opacity))}.text-neutral-900{--tw-text-opacity: 1;color:rgb(23 23 23 / var(--tw-text-opacity))}.text-neutral-950{--tw-text-opacity: 1;color:rgb(10 10 10 / var(--tw-text-opacity))}.text-neutral-950\\/50{color:#0a0a0a80}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-80{opacity:.8}.opacity-90{opacity:.9}.shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-neutral-950{--tw-ring-opacity: 1;--tw-ring-color: rgb(10 10 10 / var(--tw-ring-opacity))}.ring-offset-white{--tw-ring-offset-color: #fff}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-md{--tw-backdrop-blur: blur(12px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-shadow{transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-1000{transition-duration:1s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.animate-in{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.fade-in-0{--tw-enter-opacity: 0}.fade-in-80{--tw-enter-opacity: .8}.zoom-in-95{--tw-enter-scale: .95}.duration-1000{animation-duration:1s}.duration-200{animation-duration:.2s}.duration-300{animation-duration:.3s}.ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}:root{font-family:Karla,system-ui,Avenir,Helvetica,Arial,sans-serif;line-height:1.5;font-weight:400;background:#111;color-scheme:light dark;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}*::-moz-selection{background-color:#bbb;color:#000}*::selection{background-color:#bbb;color:#000}::-webkit-scrollbar{width:5px;height:5px}::-webkit-scrollbar-track{background:#222}::-webkit-scrollbar-thumb{background:#69696999;height:50px}::-webkit-scrollbar-thumb:hover{background:#aaa}::-webkit-scrollbar-thumb:horizontal{height:5px}.file\\:border-0::file-selector-button{border-width:0px}.file\\:bg-transparent::file-selector-button{background-color:transparent}.file\\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\\:font-medium::file-selector-button{font-weight:500}.placeholder\\:text-neutral-500::-moz-placeholder{--tw-text-opacity: 1;color:rgb(115 115 115 / var(--tw-text-opacity))}.placeholder\\:text-neutral-500::placeholder{--tw-text-opacity: 1;color:rgb(115 115 115 / var(--tw-text-opacity))}.after\\:absolute:after{content:var(--tw-content);position:absolute}.after\\:inset-y-0:after{content:var(--tw-content);top:0;bottom:0}.after\\:left-1\\/2:after{content:var(--tw-content);left:50%}.after\\:w-1:after{content:var(--tw-content);width:.25rem}.after\\:-translate-x-1\\/2:after{content:var(--tw-content);--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.first\\:rounded-l-md:first-child{border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.first\\:border-l:first-child{border-left-width:1px}.last\\:rounded-r-md:last-child{border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.focus-within\\:relative:focus-within{position:relative}.focus-within\\:z-20:focus-within{z-index:20}.hover\\:bg-\\[\\#111\\]:hover{--tw-bg-opacity: 1;background-color:rgb(17 17 17 / var(--tw-bg-opacity))}.hover\\:bg-\\[\\#1a1a1a\\]:hover{--tw-bg-opacity: 1;background-color:rgb(26 26 26 / var(--tw-bg-opacity))}.hover\\:bg-\\[\\#222\\]:hover{--tw-bg-opacity: 1;background-color:rgb(34 34 34 / var(--tw-bg-opacity))}.hover\\:bg-\\[\\#333\\]\\/50:hover{background-color:#33333380}.hover\\:bg-black:hover{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}.hover\\:bg-green-800:hover{--tw-bg-opacity: 1;background-color:rgb(22 101 52 / var(--tw-bg-opacity))}.hover\\:bg-neutral-100:hover{--tw-bg-opacity: 1;background-color:rgb(245 245 245 / var(--tw-bg-opacity))}.hover\\:bg-neutral-100\\/50:hover{background-color:#f5f5f580}.hover\\:bg-neutral-100\\/80:hover{background-color:#f5f5f5cc}.hover\\:bg-neutral-900:hover{--tw-bg-opacity: 1;background-color:rgb(23 23 23 / var(--tw-bg-opacity))}.hover\\:bg-neutral-900\\/80:hover{background-color:#171717cc}.hover\\:bg-neutral-900\\/90:hover{background-color:#171717e6}.hover\\:bg-red-500\\/80:hover{background-color:#ef4444cc}.hover\\:bg-red-500\\/90:hover{background-color:#ef4444e6}.hover\\:bg-red-700:hover{--tw-bg-opacity: 1;background-color:rgb(185 28 28 / var(--tw-bg-opacity))}.hover\\:bg-white\\/20:hover{background-color:#fff3}.hover\\:text-\\[\\#ccc\\]:hover{--tw-text-opacity: 1;color:rgb(204 204 204 / var(--tw-text-opacity))}.hover\\:text-neutral-50:hover{--tw-text-opacity: 1;color:rgb(250 250 250 / var(--tw-text-opacity))}.hover\\:text-neutral-500:hover{--tw-text-opacity: 1;color:rgb(115 115 115 / var(--tw-text-opacity))}.hover\\:text-neutral-900:hover{--tw-text-opacity: 1;color:rgb(23 23 23 / var(--tw-text-opacity))}.hover\\:text-neutral-950:hover{--tw-text-opacity: 1;color:rgb(10 10 10 / var(--tw-text-opacity))}.hover\\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:opacity-100:hover{opacity:1}.hover\\:opacity-90:hover{opacity:.9}.hover\\:shadow-lg:hover{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus\\:bg-neutral-100:focus{--tw-bg-opacity: 1;background-color:rgb(245 245 245 / var(--tw-bg-opacity))}.focus\\:bg-neutral-900:focus{--tw-bg-opacity: 1;background-color:rgb(23 23 23 / var(--tw-bg-opacity))}.focus\\:text-neutral-50:focus{--tw-text-opacity: 1;color:rgb(250 250 250 / var(--tw-text-opacity))}.focus\\:text-neutral-900:focus{--tw-text-opacity: 1;color:rgb(23 23 23 / var(--tw-text-opacity))}.focus\\:opacity-100:focus{opacity:1}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\\:ring-neutral-950:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(10 10 10 / var(--tw-ring-opacity))}.focus\\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\\:ring-1:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\\:ring-neutral-950:focus-visible{--tw-ring-opacity: 1;--tw-ring-color: rgb(10 10 10 / var(--tw-ring-opacity))}.focus-visible\\:ring-offset-1:focus-visible{--tw-ring-offset-width: 1px}.focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.focus-visible\\:ring-offset-white:focus-visible{--tw-ring-offset-color: #fff}.disabled\\:pointer-events-none:disabled{pointer-events:none}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\\:block{display:block}.group:hover .group-hover\\:opacity-100{opacity:1}.group\\/card:hover .group-hover\\/card\\:after\\:ml-2:after{content:var(--tw-content);margin-left:.5rem}.group\\/card:hover .group-hover\\/card\\:after\\:content-\\[\\'→\\'\\]:after{--tw-content: \"→\";content:var(--tw-content)}.group.destructive .group-\\[\\.destructive\\]\\:border-neutral-100\\/40{border-color:#f5f5f566}.group.toaster .group-\\[\\.toaster\\]\\:border-neutral-200{--tw-border-opacity: 1;border-color:rgb(229 229 229 / var(--tw-border-opacity))}.group.toast .group-\\[\\.toast\\]\\:bg-neutral-100{--tw-bg-opacity: 1;background-color:rgb(245 245 245 / var(--tw-bg-opacity))}.group.toast .group-\\[\\.toast\\]\\:bg-neutral-900{--tw-bg-opacity: 1;background-color:rgb(23 23 23 / var(--tw-bg-opacity))}.group.toaster .group-\\[\\.toaster\\]\\:bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.group.destructive .group-\\[\\.destructive\\]\\:text-red-300{--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity))}.group.toast .group-\\[\\.toast\\]\\:text-neutral-50{--tw-text-opacity: 1;color:rgb(250 250 250 / var(--tw-text-opacity))}.group.toast .group-\\[\\.toast\\]\\:text-neutral-500{--tw-text-opacity: 1;color:rgb(115 115 115 / var(--tw-text-opacity))}.group.toaster .group-\\[\\.toaster\\]\\:text-neutral-950{--tw-text-opacity: 1;color:rgb(10 10 10 / var(--tw-text-opacity))}.group.toaster .group-\\[\\.toaster\\]\\:shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.group.destructive .group-\\[\\.destructive\\]\\:hover\\:border-red-500\\/30:hover{border-color:#ef44444d}.group.destructive .group-\\[\\.destructive\\]\\:hover\\:bg-red-500:hover{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity))}.group.destructive .group-\\[\\.destructive\\]\\:hover\\:text-neutral-50:hover{--tw-text-opacity: 1;color:rgb(250 250 250 / var(--tw-text-opacity))}.group.destructive .group-\\[\\.destructive\\]\\:hover\\:text-red-50:hover{--tw-text-opacity: 1;color:rgb(254 242 242 / var(--tw-text-opacity))}.group.destructive .group-\\[\\.destructive\\]\\:focus\\:ring-red-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(248 113 113 / var(--tw-ring-opacity))}.group.destructive .group-\\[\\.destructive\\]\\:focus\\:ring-red-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(239 68 68 / var(--tw-ring-opacity))}.group.destructive .group-\\[\\.destructive\\]\\:focus\\:ring-offset-red-600:focus{--tw-ring-offset-color: #dc2626}.peer:disabled~.peer-disabled\\:cursor-not-allowed{cursor:not-allowed}.peer:disabled~.peer-disabled\\:opacity-70{opacity:.7}.has-\\[\\:disabled\\]\\:opacity-50:has(:disabled){opacity:.5}.aria-selected\\:bg-neutral-100[aria-selected=true]{--tw-bg-opacity: 1;background-color:rgb(245 245 245 / var(--tw-bg-opacity))}.aria-selected\\:bg-neutral-100\\/50[aria-selected=true]{background-color:#f5f5f580}.aria-selected\\:text-neutral-500[aria-selected=true]{--tw-text-opacity: 1;color:rgb(115 115 115 / var(--tw-text-opacity))}.aria-selected\\:text-neutral-900[aria-selected=true]{--tw-text-opacity: 1;color:rgb(23 23 23 / var(--tw-text-opacity))}.aria-selected\\:opacity-100[aria-selected=true]{opacity:1}.aria-selected\\:opacity-30[aria-selected=true]{opacity:.3}.data-\\[disabled\\=true\\]\\:pointer-events-none[data-disabled=true],.data-\\[disabled\\]\\:pointer-events-none[data-disabled]{pointer-events:none}.data-\\[panel-group-direction\\=vertical\\]\\:h-px[data-panel-group-direction=vertical]{height:1px}.data-\\[panel-group-direction\\=vertical\\]\\:w-full[data-panel-group-direction=vertical]{width:100%}.data-\\[side\\=bottom\\]\\:translate-y-1[data-side=bottom]{--tw-translate-y: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[side\\=left\\]\\:-translate-x-1[data-side=left]{--tw-translate-x: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[side\\=right\\]\\:translate-x-1[data-side=right]{--tw-translate-x: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[side\\=top\\]\\:-translate-y-1[data-side=top]{--tw-translate-y: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[state\\=checked\\]\\:translate-x-5[data-state=checked]{--tw-translate-x: 1.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[state\\=unchecked\\]\\:translate-x-0[data-state=unchecked],.data-\\[swipe\\=cancel\\]\\:translate-x-0[data-swipe=cancel]{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[swipe\\=end\\]\\:translate-x-\\[var\\(--radix-toast-swipe-end-x\\)\\][data-swipe=end]{--tw-translate-x: var(--radix-toast-swipe-end-x);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[swipe\\=move\\]\\:translate-x-\\[var\\(--radix-toast-swipe-move-x\\)\\][data-swipe=move]{--tw-translate-x: var(--radix-toast-swipe-move-x);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes accordion-up{0%{height:var(--radix-accordion-content-height)}to{height:0}}.data-\\[state\\=closed\\]\\:animate-accordion-up[data-state=closed]{animation:accordion-up .2s ease-out}@keyframes accordion-down{0%{height:0}to{height:var(--radix-accordion-content-height)}}.data-\\[state\\=open\\]\\:animate-accordion-down[data-state=open]{animation:accordion-down .2s ease-out}.data-\\[panel-group-direction\\=vertical\\]\\:flex-col[data-panel-group-direction=vertical]{flex-direction:column}.data-\\[active\\]\\:bg-neutral-100\\/50[data-active]{background-color:#f5f5f580}.data-\\[selected\\=\\'true\\'\\]\\:bg-neutral-100[data-selected=true]{--tw-bg-opacity: 1;background-color:rgb(245 245 245 / var(--tw-bg-opacity))}.data-\\[state\\=active\\]\\:bg-white[data-state=active]{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.data-\\[state\\=checked\\]\\:bg-neutral-900[data-state=checked]{--tw-bg-opacity: 1;background-color:rgb(23 23 23 / var(--tw-bg-opacity))}.data-\\[state\\=on\\]\\:bg-neutral-100[data-state=on],.data-\\[state\\=open\\]\\:bg-neutral-100[data-state=open]{--tw-bg-opacity: 1;background-color:rgb(245 245 245 / var(--tw-bg-opacity))}.data-\\[state\\=open\\]\\:bg-neutral-100\\/50[data-state=open]{background-color:#f5f5f580}.data-\\[state\\=selected\\]\\:bg-neutral-100[data-state=selected]{--tw-bg-opacity: 1;background-color:rgb(245 245 245 / var(--tw-bg-opacity))}.data-\\[state\\=unchecked\\]\\:bg-neutral-200[data-state=unchecked]{--tw-bg-opacity: 1;background-color:rgb(229 229 229 / var(--tw-bg-opacity))}.data-\\[selected\\=true\\]\\:text-neutral-900[data-selected=true]{--tw-text-opacity: 1;color:rgb(23 23 23 / var(--tw-text-opacity))}.data-\\[state\\=active\\]\\:text-neutral-950[data-state=active]{--tw-text-opacity: 1;color:rgb(10 10 10 / var(--tw-text-opacity))}.data-\\[state\\=checked\\]\\:text-neutral-50[data-state=checked]{--tw-text-opacity: 1;color:rgb(250 250 250 / var(--tw-text-opacity))}.data-\\[state\\=on\\]\\:text-neutral-900[data-state=on]{--tw-text-opacity: 1;color:rgb(23 23 23 / var(--tw-text-opacity))}.data-\\[state\\=open\\]\\:text-neutral-500[data-state=open]{--tw-text-opacity: 1;color:rgb(115 115 115 / var(--tw-text-opacity))}.data-\\[state\\=open\\]\\:text-neutral-900[data-state=open]{--tw-text-opacity: 1;color:rgb(23 23 23 / var(--tw-text-opacity))}.data-\\[disabled\\=true\\]\\:opacity-50[data-disabled=true],.data-\\[disabled\\]\\:opacity-50[data-disabled]{opacity:.5}.data-\\[state\\=active\\]\\:shadow-sm[data-state=active]{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.data-\\[swipe\\=move\\]\\:transition-none[data-swipe=move]{transition-property:none}.data-\\[state\\=closed\\]\\:duration-300[data-state=closed]{transition-duration:.3s}.data-\\[state\\=open\\]\\:duration-500[data-state=open]{transition-duration:.5s}.data-\\[motion\\^\\=from-\\]\\:animate-in[data-motion^=from-],.data-\\[state\\=open\\]\\:animate-in[data-state=open],.data-\\[state\\=visible\\]\\:animate-in[data-state=visible]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.data-\\[motion\\^\\=to-\\]\\:animate-out[data-motion^=to-],.data-\\[state\\=closed\\]\\:animate-out[data-state=closed],.data-\\[state\\=hidden\\]\\:animate-out[data-state=hidden],.data-\\[swipe\\=end\\]\\:animate-out[data-swipe=end]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\\[motion\\^\\=from-\\]\\:fade-in[data-motion^=from-]{--tw-enter-opacity: 0}.data-\\[motion\\^\\=to-\\]\\:fade-out[data-motion^=to-],.data-\\[state\\=closed\\]\\:fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\\[state\\=closed\\]\\:fade-out-80[data-state=closed]{--tw-exit-opacity: .8}.data-\\[state\\=hidden\\]\\:fade-out[data-state=hidden]{--tw-exit-opacity: 0}.data-\\[state\\=open\\]\\:fade-in-0[data-state=open],.data-\\[state\\=visible\\]\\:fade-in[data-state=visible]{--tw-enter-opacity: 0}.data-\\[state\\=closed\\]\\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\\[state\\=open\\]\\:zoom-in-90[data-state=open]{--tw-enter-scale: .9}.data-\\[state\\=open\\]\\:zoom-in-95[data-state=open]{--tw-enter-scale: .95}.data-\\[motion\\=from-end\\]\\:slide-in-from-right-52[data-motion=from-end]{--tw-enter-translate-x: 13rem}.data-\\[motion\\=from-start\\]\\:slide-in-from-left-52[data-motion=from-start]{--tw-enter-translate-x: -13rem}.data-\\[motion\\=to-end\\]\\:slide-out-to-right-52[data-motion=to-end]{--tw-exit-translate-x: 13rem}.data-\\[motion\\=to-start\\]\\:slide-out-to-left-52[data-motion=to-start]{--tw-exit-translate-x: -13rem}.data-\\[side\\=bottom\\]\\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y: -.5rem}.data-\\[side\\=left\\]\\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x: .5rem}.data-\\[side\\=right\\]\\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x: -.5rem}.data-\\[side\\=top\\]\\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y: .5rem}.data-\\[state\\=closed\\]\\:slide-out-to-bottom[data-state=closed]{--tw-exit-translate-y: 100%}.data-\\[state\\=closed\\]\\:slide-out-to-left[data-state=closed]{--tw-exit-translate-x: -100%}.data-\\[state\\=closed\\]\\:slide-out-to-left-1\\/2[data-state=closed]{--tw-exit-translate-x: -50%}.data-\\[state\\=closed\\]\\:slide-out-to-right[data-state=closed],.data-\\[state\\=closed\\]\\:slide-out-to-right-full[data-state=closed]{--tw-exit-translate-x: 100%}.data-\\[state\\=closed\\]\\:slide-out-to-top[data-state=closed]{--tw-exit-translate-y: -100%}.data-\\[state\\=closed\\]\\:slide-out-to-top-\\[48\\%\\][data-state=closed]{--tw-exit-translate-y: -48%}.data-\\[state\\=open\\]\\:slide-in-from-bottom[data-state=open]{--tw-enter-translate-y: 100%}.data-\\[state\\=open\\]\\:slide-in-from-left[data-state=open]{--tw-enter-translate-x: -100%}.data-\\[state\\=open\\]\\:slide-in-from-left-1\\/2[data-state=open]{--tw-enter-translate-x: -50%}.data-\\[state\\=open\\]\\:slide-in-from-right[data-state=open]{--tw-enter-translate-x: 100%}.data-\\[state\\=open\\]\\:slide-in-from-top[data-state=open]{--tw-enter-translate-y: -100%}.data-\\[state\\=open\\]\\:slide-in-from-top-\\[48\\%\\][data-state=open]{--tw-enter-translate-y: -48%}.data-\\[state\\=open\\]\\:slide-in-from-top-full[data-state=open]{--tw-enter-translate-y: -100%}.data-\\[state\\=closed\\]\\:duration-300[data-state=closed]{animation-duration:.3s}.data-\\[state\\=open\\]\\:duration-500[data-state=open]{animation-duration:.5s}.data-\\[panel-group-direction\\=vertical\\]\\:after\\:left-0[data-panel-group-direction=vertical]:after{content:var(--tw-content);left:0}.data-\\[panel-group-direction\\=vertical\\]\\:after\\:h-1[data-panel-group-direction=vertical]:after{content:var(--tw-content);height:.25rem}.data-\\[panel-group-direction\\=vertical\\]\\:after\\:w-full[data-panel-group-direction=vertical]:after{content:var(--tw-content);width:100%}.data-\\[panel-group-direction\\=vertical\\]\\:after\\:-translate-y-1\\/2[data-panel-group-direction=vertical]:after{content:var(--tw-content);--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[panel-group-direction\\=vertical\\]\\:after\\:translate-x-0[data-panel-group-direction=vertical]:after{content:var(--tw-content);--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group[data-state=open] .group-data-\\[state\\=open\\]\\:rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.dark\\:border-neutral-50:is(.dark *){--tw-border-opacity: 1;border-color:rgb(250 250 250 / var(--tw-border-opacity))}.dark\\:border-neutral-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(38 38 38 / var(--tw-border-opacity))}.dark\\:border-neutral-800\\/50:is(.dark *){border-color:#26262680}.dark\\:border-red-500:is(.dark *){--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity))}.dark\\:border-red-900:is(.dark *){--tw-border-opacity: 1;border-color:rgb(127 29 29 / var(--tw-border-opacity))}.dark\\:border-red-900\\/50:is(.dark *){border-color:#7f1d1d80}.dark\\:dark\\:border-red-900:is(.dark *):is(.dark *){--tw-border-opacity: 1;border-color:rgb(127 29 29 / var(--tw-border-opacity))}.dark\\:bg-neutral-50:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(250 250 250 / var(--tw-bg-opacity))}.dark\\:bg-neutral-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity))}.dark\\:bg-neutral-800\\/50:is(.dark *){background-color:#26262680}.dark\\:bg-neutral-950:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(10 10 10 / var(--tw-bg-opacity))}.dark\\:bg-red-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(127 29 29 / var(--tw-bg-opacity))}.dark\\:text-neutral-400:is(.dark *){--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity))}.dark\\:text-neutral-50:is(.dark *){--tw-text-opacity: 1;color:rgb(250 250 250 / var(--tw-text-opacity))}.dark\\:text-neutral-50\\/50:is(.dark *){color:#fafafa80}.dark\\:text-neutral-900:is(.dark *){--tw-text-opacity: 1;color:rgb(23 23 23 / var(--tw-text-opacity))}.dark\\:text-red-900:is(.dark *){--tw-text-opacity: 1;color:rgb(127 29 29 / var(--tw-text-opacity))}.dark\\:ring-neutral-300:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(212 212 212 / var(--tw-ring-opacity))}.dark\\:ring-offset-neutral-950:is(.dark *){--tw-ring-offset-color: #0a0a0a}.dark\\:placeholder\\:text-neutral-400:is(.dark *)::-moz-placeholder{--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity))}.dark\\:placeholder\\:text-neutral-400:is(.dark *)::placeholder{--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity))}.dark\\:hover\\:bg-neutral-50:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(250 250 250 / var(--tw-bg-opacity))}.dark\\:hover\\:bg-neutral-50\\/80:hover:is(.dark *){background-color:#fafafacc}.dark\\:hover\\:bg-neutral-50\\/90:hover:is(.dark *){background-color:#fafafae6}.dark\\:hover\\:bg-neutral-800:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity))}.dark\\:hover\\:bg-neutral-800\\/50:hover:is(.dark *){background-color:#26262680}.dark\\:hover\\:bg-neutral-800\\/80:hover:is(.dark *){background-color:#262626cc}.dark\\:hover\\:bg-red-900\\/80:hover:is(.dark *){background-color:#7f1d1dcc}.dark\\:hover\\:bg-red-900\\/90:hover:is(.dark *){background-color:#7f1d1de6}.dark\\:hover\\:text-neutral-400:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity))}.dark\\:hover\\:text-neutral-50:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(250 250 250 / var(--tw-text-opacity))}.dark\\:hover\\:text-neutral-900:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(23 23 23 / var(--tw-text-opacity))}.dark\\:focus\\:bg-neutral-50:focus:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(250 250 250 / var(--tw-bg-opacity))}.dark\\:focus\\:bg-neutral-800:focus:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity))}.dark\\:focus\\:text-neutral-50:focus:is(.dark *){--tw-text-opacity: 1;color:rgb(250 250 250 / var(--tw-text-opacity))}.dark\\:focus\\:text-neutral-900:focus:is(.dark *){--tw-text-opacity: 1;color:rgb(23 23 23 / var(--tw-text-opacity))}.dark\\:focus\\:ring-neutral-300:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(212 212 212 / var(--tw-ring-opacity))}.dark\\:focus-visible\\:ring-neutral-300:focus-visible:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(212 212 212 / var(--tw-ring-opacity))}.dark\\:focus-visible\\:ring-offset-neutral-950:focus-visible:is(.dark *){--tw-ring-offset-color: #0a0a0a}.group.destructive .dark\\:group-\\[\\.destructive\\]\\:border-neutral-800\\/40:is(.dark *){border-color:#26262666}.group.toaster .dark\\:group-\\[\\.toaster\\]\\:border-neutral-800:is(.dark *){--tw-border-opacity: 1;border-color:rgb(38 38 38 / var(--tw-border-opacity))}.group.toast .dark\\:group-\\[\\.toast\\]\\:bg-neutral-50:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(250 250 250 / var(--tw-bg-opacity))}.group.toast .dark\\:group-\\[\\.toast\\]\\:bg-neutral-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity))}.group.toaster .dark\\:group-\\[\\.toaster\\]\\:bg-neutral-950:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(10 10 10 / var(--tw-bg-opacity))}.group.toast .dark\\:group-\\[\\.toast\\]\\:text-neutral-400:is(.dark *){--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity))}.group.toast .dark\\:group-\\[\\.toast\\]\\:text-neutral-900:is(.dark *){--tw-text-opacity: 1;color:rgb(23 23 23 / var(--tw-text-opacity))}.group.toaster .dark\\:group-\\[\\.toaster\\]\\:text-neutral-50:is(.dark *){--tw-text-opacity: 1;color:rgb(250 250 250 / var(--tw-text-opacity))}.group.destructive .dark\\:group-\\[\\.destructive\\]\\:hover\\:border-red-900\\/30:hover:is(.dark *){border-color:#7f1d1d4d}.group.destructive .dark\\:group-\\[\\.destructive\\]\\:hover\\:bg-red-900:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(127 29 29 / var(--tw-bg-opacity))}.group.destructive .dark\\:group-\\[\\.destructive\\]\\:hover\\:text-neutral-50:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(250 250 250 / var(--tw-text-opacity))}.group.destructive .dark\\:group-\\[\\.destructive\\]\\:focus\\:ring-red-900:focus:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(127 29 29 / var(--tw-ring-opacity))}.dark\\:aria-selected\\:bg-neutral-800[aria-selected=true]:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity))}.dark\\:aria-selected\\:bg-neutral-800\\/50[aria-selected=true]:is(.dark *){background-color:#26262680}.dark\\:aria-selected\\:text-neutral-400[aria-selected=true]:is(.dark *){--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity))}.dark\\:aria-selected\\:text-neutral-50[aria-selected=true]:is(.dark *){--tw-text-opacity: 1;color:rgb(250 250 250 / var(--tw-text-opacity))}.dark\\:data-\\[active\\]\\:bg-neutral-800\\/50[data-active]:is(.dark *){background-color:#26262680}.dark\\:data-\\[selected\\=\\'true\\'\\]\\:bg-neutral-800[data-selected=true]:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity))}.dark\\:data-\\[state\\=active\\]\\:bg-neutral-950[data-state=active]:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(10 10 10 / var(--tw-bg-opacity))}.dark\\:data-\\[state\\=checked\\]\\:bg-neutral-50[data-state=checked]:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(250 250 250 / var(--tw-bg-opacity))}.dark\\:data-\\[state\\=on\\]\\:bg-neutral-800[data-state=on]:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity))}.dark\\:data-\\[state\\=open\\]\\:bg-neutral-800[data-state=open]:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity))}.dark\\:data-\\[state\\=open\\]\\:bg-neutral-800\\/50[data-state=open]:is(.dark *){background-color:#26262680}.dark\\:data-\\[state\\=selected\\]\\:bg-neutral-800[data-state=selected]:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity))}.dark\\:data-\\[state\\=unchecked\\]\\:bg-neutral-800[data-state=unchecked]:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity))}.dark\\:data-\\[selected\\=true\\]\\:text-neutral-50[data-selected=true]:is(.dark *){--tw-text-opacity: 1;color:rgb(250 250 250 / var(--tw-text-opacity))}.dark\\:data-\\[state\\=active\\]\\:text-neutral-50[data-state=active]:is(.dark *){--tw-text-opacity: 1;color:rgb(250 250 250 / var(--tw-text-opacity))}.dark\\:data-\\[state\\=checked\\]\\:text-neutral-900[data-state=checked]:is(.dark *){--tw-text-opacity: 1;color:rgb(23 23 23 / var(--tw-text-opacity))}.dark\\:data-\\[state\\=on\\]\\:text-neutral-50[data-state=on]:is(.dark *){--tw-text-opacity: 1;color:rgb(250 250 250 / var(--tw-text-opacity))}.dark\\:data-\\[state\\=open\\]\\:text-neutral-400[data-state=open]:is(.dark *){--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity))}.dark\\:data-\\[state\\=open\\]\\:text-neutral-50[data-state=open]:is(.dark *){--tw-text-opacity: 1;color:rgb(250 250 250 / var(--tw-text-opacity))}@media (min-width: 640px){.sm\\:bottom-0{bottom:0}.sm\\:left-1\\/2{left:50%}.sm\\:right-0{right:0}.sm\\:top-auto{top:auto}.sm\\:ml-0{margin-left:0}.sm\\:mt-0{margin-top:0}.sm\\:max-w-\\[425px\\]{max-width:425px}.sm\\:max-w-sm{max-width:24rem}.sm\\:-translate-x-1\\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.sm\\:transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.sm\\:flex-row{flex-direction:row}.sm\\:flex-col{flex-direction:column}.sm\\:justify-end{justify-content:flex-end}.sm\\:gap-2\\.5{gap:.625rem}.sm\\:space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.sm\\:space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.sm\\:space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(0px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px * var(--tw-space-y-reverse))}.sm\\:rounded-lg{border-radius:var(--radius)}.sm\\:text-left{text-align:left}.data-\\[state\\=open\\]\\:sm\\:slide-in-from-bottom-full[data-state=open]{--tw-enter-translate-y: 100%}}@media (min-width: 768px){.md\\:absolute{position:absolute}.md\\:w-\\[var\\(--radix-navigation-menu-viewport-width\\)\\]{width:var(--radix-navigation-menu-viewport-width)}.md\\:w-auto{width:auto}.md\\:max-w-\\[35vw\\]{max-width:35vw}.md\\:max-w-\\[420px\\]{max-width:420px}.md\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (min-width: 1024px){.lg\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width: 1280px){.xl\\:max-w-\\[40vw\\]{max-width:40vw}.xl\\:max-w-\\[50vw\\]{max-width:50vw}.xl\\:max-w-\\[60vw\\]{max-width:60vw}.xl\\:max-w-\\[80vw\\]{max-width:80vw}}.\\[\\&\\:has\\(\\[aria-selected\\]\\)\\]\\:bg-neutral-100:has([aria-selected]){--tw-bg-opacity: 1;background-color:rgb(245 245 245 / var(--tw-bg-opacity))}.first\\:\\[\\&\\:has\\(\\[aria-selected\\]\\)\\]\\:rounded-l-md:has([aria-selected]):first-child{border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.last\\:\\[\\&\\:has\\(\\[aria-selected\\]\\)\\]\\:rounded-r-md:has([aria-selected]):last-child{border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.dark\\:\\[\\&\\:has\\(\\[aria-selected\\]\\)\\]\\:bg-neutral-800:has([aria-selected]):is(.dark *){--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity))}.\\[\\&\\:has\\(\\[aria-selected\\]\\.day-outside\\)\\]\\:bg-neutral-100\\/50:has([aria-selected].day-outside){background-color:#f5f5f580}.dark\\:\\[\\&\\:has\\(\\[aria-selected\\]\\.day-outside\\)\\]\\:bg-neutral-800\\/50:has([aria-selected].day-outside):is(.dark *){background-color:#26262680}.\\[\\&\\:has\\(\\[aria-selected\\]\\.day-range-end\\)\\]\\:rounded-r-md:has([aria-selected].day-range-end){border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.\\[\\&\\:has\\(\\[role\\=checkbox\\]\\)\\]\\:pr-0:has([role=checkbox]){padding-right:0}.\\[\\&\\>span\\]\\:line-clamp-1>span{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.\\[\\&\\>svg\\+div\\]\\:translate-y-\\[-3px\\]>svg+div{--tw-translate-y: -3px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\\[\\&\\>svg\\]\\:absolute>svg{position:absolute}.\\[\\&\\>svg\\]\\:left-4>svg{left:1rem}.\\[\\&\\>svg\\]\\:top-4>svg{top:1rem}.\\[\\&\\>svg\\]\\:size-3\\.5>svg{width:.875rem;height:.875rem}.\\[\\&\\>svg\\]\\:h-2\\.5>svg{height:.625rem}.\\[\\&\\>svg\\]\\:h-3>svg{height:.75rem}.\\[\\&\\>svg\\]\\:w-2\\.5>svg{width:.625rem}.\\[\\&\\>svg\\]\\:w-3>svg{width:.75rem}.\\[\\&\\>svg\\]\\:text-neutral-500>svg{--tw-text-opacity: 1;color:rgb(115 115 115 / var(--tw-text-opacity))}.\\[\\&\\>svg\\]\\:text-neutral-950>svg{--tw-text-opacity: 1;color:rgb(10 10 10 / var(--tw-text-opacity))}.\\[\\&\\>svg\\]\\:text-red-500>svg{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.dark\\:\\[\\&\\>svg\\]\\:text-neutral-400>svg:is(.dark *){--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity))}.dark\\:\\[\\&\\>svg\\]\\:text-neutral-50>svg:is(.dark *){--tw-text-opacity: 1;color:rgb(250 250 250 / var(--tw-text-opacity))}.dark\\:\\[\\&\\>svg\\]\\:text-red-900>svg:is(.dark *){--tw-text-opacity: 1;color:rgb(127 29 29 / var(--tw-text-opacity))}.\\[\\&\\>svg\\~\\*\\]\\:pl-7>svg~*{padding-left:1.75rem}.\\[\\&\\>tr\\]\\:last\\:border-b-0:last-child>tr{border-bottom-width:0px}.\\[\\&\\[data-panel-group-direction\\=vertical\\]\\>div\\]\\:rotate-90[data-panel-group-direction=vertical]>div{--tw-rotate: 90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\\[\\&\\[data-state\\=open\\]\\>svg\\]\\:rotate-180[data-state=open]>svg{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\\[\\&_\\.recharts-dot\\[stroke\\=\\'\\#fff\\'\\]\\]\\:stroke-transparent .recharts-dot[stroke=\"#fff\"]{stroke:transparent}.\\[\\&_\\.recharts-layer\\]\\:outline-none .recharts-layer{outline:2px solid transparent;outline-offset:2px}.\\[\\&_\\.recharts-sector\\[stroke\\=\\'\\#fff\\'\\]\\]\\:stroke-transparent .recharts-sector[stroke=\"#fff\"]{stroke:transparent}.\\[\\&_\\.recharts-sector\\]\\:outline-none .recharts-sector,.\\[\\&_\\.recharts-surface\\]\\:outline-none .recharts-surface{outline:2px solid transparent;outline-offset:2px}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:px-2 [cmdk-group-heading]{padding-left:.5rem;padding-right:.5rem}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:py-1\\.5 [cmdk-group-heading]{padding-top:.375rem;padding-bottom:.375rem}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:text-xs [cmdk-group-heading]{font-size:.75rem;line-height:1rem}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:font-medium [cmdk-group-heading]{font-weight:500}.\\[\\&_\\[cmdk-group-heading\\]\\]\\:text-neutral-500 [cmdk-group-heading]{--tw-text-opacity: 1;color:rgb(115 115 115 / var(--tw-text-opacity))}.dark\\:\\[\\&_\\[cmdk-group-heading\\]\\]\\:text-neutral-400 [cmdk-group-heading]:is(.dark *){--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity))}.\\[\\&_\\[cmdk-group\\]\\:not\\(\\[hidden\\]\\)_\\~\\[cmdk-group\\]\\]\\:pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:0}.\\[\\&_\\[cmdk-group\\]\\]\\:px-2 [cmdk-group]{padding-left:.5rem;padding-right:.5rem}.\\[\\&_\\[cmdk-input-wrapper\\]_svg\\]\\:h-5 [cmdk-input-wrapper] svg{height:1.25rem}.\\[\\&_\\[cmdk-input-wrapper\\]_svg\\]\\:w-5 [cmdk-input-wrapper] svg{width:1.25rem}.\\[\\&_\\[cmdk-input\\]\\]\\:h-12 [cmdk-input]{height:3rem}.\\[\\&_\\[cmdk-item\\]\\]\\:px-2 [cmdk-item]{padding-left:.5rem;padding-right:.5rem}.\\[\\&_\\[cmdk-item\\]\\]\\:py-3 [cmdk-item]{padding-top:.75rem;padding-bottom:.75rem}.\\[\\&_\\[cmdk-item\\]_svg\\]\\:h-5 [cmdk-item] svg{height:1.25rem}.\\[\\&_\\[cmdk-item\\]_svg\\]\\:w-5 [cmdk-item] svg{width:1.25rem}.\\[\\&_p\\]\\:leading-relaxed p{line-height:1.625}.\\[\\&_tr\\:last-child\\]\\:border-0 tr:last-child{border-width:0px}.\\[\\&_tr\\]\\:border-b tr{border-bottom-width:1px}\n"
  },
  {
    "path": "cofounder/api/dist/index.html",
    "content": "<!doctype html>\r\n<html lang=\"en\">\r\n\t<head>\r\n\t\t<meta charset=\"UTF-8\" />\r\n\t\t<link rel=\"icon\" type=\"image/svg+xml\" href=\"/favicon.png\" />\r\n\t\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\r\n\t\t<link\r\n\t\t\thref=\"https://fonts.googleapis.com/css2?family=Karla:wght@100;200;300;400;500;600;700;800;900&display=swap\"\r\n\t\t\trel=\"stylesheet\"\r\n\t\t/>\r\n\t\t<link\r\n\t\t\thref=\"https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@100;200;300;400;500;600;700;800;900&display=swap\"\r\n\t\t\trel=\"stylesheet\"\r\n\t\t/>\r\n\t\t<title>Cofounder Dashboard</title>\r\n\t\t<script type=\"module\" crossorigin src=\"/assets/index-B1d7LZHm.js\"></script>\n\t\t<link rel=\"stylesheet\" crossorigin href=\"/assets/index-COffgP7k.css\">\n\t</head>\r\n\t<body>\r\n\t\t<div id=\"root\"></div>\r\r\n\t\t<script>\r\n\t\t\tdocument.addEventListener(\"keydown\", (event) => {\r\n\t\t\t\tif (event.ctrlKey && event.key === \"k\") {\r\n\t\t\t\t\tconsole.log(\"Ctrl+K pressed!\");\r\n\t\t\t\t\tevent.preventDefault(); // Prevent doing a google search\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t</script>\r\n\t</body>\r\n</html>\r\n"
  },
  {
    "path": "cofounder/api/package.json",
    "content": "{\n\t\"type\": \"module\",\n\t\"aliases\": {\n\t\t\"@\": \".\"\n\t},\n\t\"scripts\": {\n\t\t\"start:npx\": \"npm i && nodemon --loader esm-module-alias/loader --no-warnings server.js\",\n\t\t\"start\": \"nodemon --loader esm-module-alias/loader --no-warnings server.js\"\n\t},\n\t\"nodemonConfig\": {\n\t\t\"ignore\": [\n\t\t\t\"db/*\"\n\t\t]\n\t},\n\t\"dependencies\": {\n\t\t\"@anthropic-ai/sdk\": \"^0.27.3\",\n\t\t\"@google-cloud/storage\": \"^7.12.1\",\n\t\t\"@resvg/resvg-js\": \"^2.6.2\",\n\t\t\"async-retry\": \"^1.3.3\",\n\t\t\"colormap\": \"^2.3.2\",\n\t\t\"cors\": \"^2.8.5\",\n\t\t\"deepmerge\": \"^4.3.1\",\n\t\t\"delay\": \"^6.0.0\",\n\t\t\"dotenv\": \"^16.4.5\",\n\t\t\"esm-module-alias\": \"^2.2.0\",\n\t\t\"express\": \"^4.19.2\",\n\t\t\"firebase-admin\": \"^12.4.0\",\n\t\t\"firestore\": \"^1.1.6\",\n\t\t\"fs-extra\": \"^11.2.0\",\n\t\t\"js-yaml\": \"^4.1.0\",\n\t\t\"lodash\": \"^4.17.21\",\n\t\t\"lodash-es\": \"^4.17.21\",\n\t\t\"module-alias\": \"^2.2.3\",\n\t\t\"nodemon\": \"*\",\n\t\t\"open\": \"^10.1.0\",\n\t\t\"openai\": \"^4.55.4\",\n\t\t\"p-all\": \"^5.0.0\",\n\t\t\"p-queue\": \"^8.0.1\",\n\t\t\"sharp\": \"^0.33.4\",\n\t\t\"slugify\": \"^1.6.6\",\n\t\t\"socket.io\": \"^4.8.0\",\n\t\t\"vectra\": \"^0.9.0\",\n\t\t\"vite\": \"^5.4.8\",\n\t\t\"vite-express\": \"^0.19.0\",\n\t\t\"xml2js\": \"^0.6.2\",\n\t\t\"yaml\": \"^2.5.0\",\n\t\t\"yaml-js\": \"^0.3.1\",\n\t\t\"yargs\": \"^17.7.2\"\n\t}\n}\n"
  },
  {
    "path": "cofounder/api/server.js",
    "content": "import { Server } from \"socket.io\";\nimport utils from \"@/utils/index.js\";\nimport path from \"path\";\nimport { fileURLToPath } from \"url\";\nimport express from \"express\";\nimport cors from \"cors\";\nimport dotenv from \"dotenv\";\nimport yargs from \"yargs\";\nimport fs from \"fs\";\nimport yaml from \"yaml\";\nimport { hideBin } from \"yargs/helpers\";\nimport { merge } from \"lodash-es\";\nimport open, { openApp, apps } from \"open\";\nimport cofounder from \"./build.js\";\ndotenv.config();\n\n// -------------------------------------------------------------- HELPERS  ------------------------\nfunction _slugify(text) {\n\treturn text\n\t\t.toString()\n\t\t.toLowerCase()\n\t\t.replace(/\\s+/g, \"-\") // Replace spaces with -\n\t\t.replace(/[^\\w\\-]+/g, \"\") // Remove all non-word chars\n\t\t.replace(/\\-\\-+/g, \"-\") // Replace multiple - with single -\n\t\t.replace(/^-+/, \"\") // Trim - from start\n\t\t.replace(/-+$/, \"\"); // Trim - from end\n}\n// ----------------------------------------------------------------------------------------------------\n\n// -------------------------------------------------------------- ARGS CASE ------------------------\n// init project from argv\n// to be called like : npm run start -- -p \"some-project-name\" -d \"app description\"\nconst timestamp = Date.now();\nconst argv = yargs(hideBin(process.argv)).argv;\nconst new_project = {\n\tproject:\n\t\t(!argv.p && !argv.project) ||\n\t\t!_slugify(argv.p || argv.project).length ||\n\t\t!_slugify(argv.p || argv.project).match(/[a-z0-9]/)\n\t\t\t? `project-${timestamp}`\n\t\t\t: _slugify(argv.p || argv.project),\n\tdescription: argv.description || argv.d || argv.desc || false,\n\taesthetics: argv.aesthetics || argv.a || argv.aesthetic || false,\n};\nif (argv.file || argv.f) {\n\tnew_project.description = fs.readFileSync(argv.file || argv.f, \"utf-8\");\n}\nasync function create_new_project() {\n\tif (!new_project.description.length) {\n\t\tconsole.error(\n\t\t\t'Error: -d \"project description\" is required and cannot be empty.',\n\t\t);\n\t\tprocess.exit(1);\n\t}\n\tconsole.log(\n\t\t`\\x1b[31minitialized generating app : ${new_project.project}\\x1b[0m`,\n\t);\n\tconsole.log(\n\t\t`\\x1b[34m(see ${process.env.EXPORT_APPS_ROOT}/${new_project.project}/README.md for more details)\\x1b[0m` +\n\t\t\t`\\n\\x1b[38;5;37mto start app (api+frontend in parallel)` +\n\t\t\t`\\n\\t> cd ${process.env.EXPORT_APPS_ROOT}/${new_project.project}` +\n\t\t\t`\\n\\t> npm i && npm run dev\\x1b[0m`,\n\t);\n\n\tconst query = {\n\t\tpm: {\n\t\t\tdetails: {\n\t\t\t\ttext: `${new_project.project != `project-${timestamp}` ? \"Project '\" + new_project.project + \"' :\" : \"\"} ${new_project.description}`,\n\t\t\t\tattachments: [],\n\t\t\t\tdesign: {\n\t\t\t\t\taesthetics: {\n\t\t\t\t\t\ttext: new_project.aesthetics,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t};\n\tconsole.dir({ query }, { depth: null });\n\n\t/*\n\t// debug : to resume ----------------------------------------------------------\n\tconst data = await cofounder.system.run({\n\t\tid: \"op:PROJECT::STATE:LOAD\",\n\t\tcontext: {\n\t\t\t...context,\n\t\t\tproject: new_project.project,\n\t\t},\n\t\tdata: {},\n\t});\n\tawait cofounder.system.run({\n\t\tid: `seq:project:init:v1:resume`,\n\t\tcontext: {\n\t\t\t...context,\n\t\t\tproject: new_project.project,\n\t\t},\n\t\tdata: merge(data, {\n\t\t\t...query,\n\t\t\tdebug: {},\n\t\t}),\n\t});\n\t----------------------------------------------------------\n\t*/\n\n\tawait cofounder.system.run({\n\t\tid: `seq:project:init:v1`,\n\t\tcontext: {\n\t\t\t...context,\n\t\t\tproject: new_project.project,\n\t\t},\n\t\tdata: query,\n\t});\n}\n// Call create_new_project if command args for init project are provided\nif (new_project.project && new_project.description) {\n\tcreate_new_project();\n}\n// ----------------------------------------------------------------------------------------------------\n\n// -------------------------------------------------------------- SERVER SETUP ------------------------\nconst app = express();\nconst PORT = process.env.PORT || 4200;\n\napp.use(cors());\napp.use(express.json({ limit: \"20mb\" }));\n\n// convert the current module's URL to a file path - necessary in ES modules to get the equivalent of __filename\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = path.dirname(__filename);\n// serve static content from ./storage ; ie. for generated layout mockup images\napp.use(\"/storage\", express.static(path.join(__dirname, \"db/storage\")));\napp.use(express.static(path.join(__dirname, \"dist\")));\napp.use(/^\\/(?!storage|api).*$/, express.static(path.join(__dirname, \"dist\")));\n\nconst server = app.listen(PORT, () => {\n\tconsole.log(\n\t\t\"\\x1b[33m\\n> cofounder/api : server is running on port \" + PORT + \"\\x1b[0m\",\n\t);\n\n\tconsole.log(`> debug : open browser enabled : http://localhost:${PORT}/`);\n\topen(`http://localhost:${PORT}/`);\n});\n\n// -------------------------------------------------------- SERVER REST API PATHS ------------------------\n\napp.get(\"/api/ping\", (req, res) => {\n\tres.status(200).json({ message: \"pong\" });\n});\n\napp.get(\"/api/projects/list\", (req, res) => {\n\tfs.readdir(\"./db/projects\", (err, files) => {\n\t\tif (err) {\n\t\t\treturn res.status(500).json({ error: \"> cant read projects directory\" });\n\t\t}\n\t\tconst projects = files\n\t\t\t.filter((file) =>\n\t\t\t\tfs.statSync(path.join(\"./db/projects\", file)).isDirectory(),\n\t\t\t)\n\t\t\t.map((projectDir) => {\n\t\t\t\tconst yamlFilePath = path.join(\n\t\t\t\t\t\"./db/projects\",\n\t\t\t\t\tprojectDir,\n\t\t\t\t\t\"state/pm/user/details.yaml\",\n\t\t\t\t);\n\t\t\t\tif (fs.existsSync(yamlFilePath)) {\n\t\t\t\t\tconst fileContent = fs.readFileSync(yamlFilePath, \"utf8\");\n\t\t\t\t\tconst parsedData = yaml.parse(fileContent);\n\t\t\t\t\treturn { id: projectDir, data: parsedData.data || false };\n\t\t\t\t}\n\t\t\t\treturn { id: projectDir, data: false };\n\t\t\t});\n\t\tres.status(200).json({ projects });\n\t});\n});\n\napp.post(\"/api/utils/transcribe\", async (req, res) => {\n\tconst uid = Math.random().toString(36).slice(2, 11); // Generate a random unique ID\n\tconst tempFilePath = path.join(__dirname, \"db/storage/temp\", `${uid}.webm`);\n\n\t// Ensure the directory exists\n\tfs.mkdirSync(path.dirname(tempFilePath), { recursive: true });\n\n\ttry {\n\t\tif (!req.body || !req.body.audio) {\n\t\t\tthrow new Error(\"No audio file uploaded\");\n\t\t}\n\n\t\tconst audioData = req.body.audio;\n\t\tconst audioBuffer = Buffer.from(audioData.split(\",\")[1], \"base64\");\n\n\t\t// Write the audio buffer to the temporary path\n\t\tfs.writeFileSync(tempFilePath, audioBuffer);\n\n\t\tconst { transcript } = await utils.openai.transcribe({ path: tempFilePath });\n\t\tres.status(200).json({ transcript });\n\t} catch (error) {\n\t\tconsole.error(\"Transcription error:\", error);\n\t\tres.status(500).json({ error: \"Failed to transcribe audio\" });\n\t} finally {\n\t\t// Delete the temporary file\n\t\tfs.unlink(tempFilePath, (err) => {\n\t\t\tif (err) console.error(\"Error deleting temporary file:\", err);\n\t\t});\n\t}\n});\n\napp.post(\"/api/projects/new\", async (req, res) => {\n\tconst request = req.body;\n\t/*\n\t\trequest : {\n\t\t\tproject? : \"project-id\" || {}\n\t\t\tdescription: \"\",\n\t\t\taeshetics?: \"\"\n\t\t}\n\t*/\n\tif (!request.description?.length) {\n\t\treturn res.status(500).json({ error: \"> no project description provided\" });\n\t}\n\tconst timestamp = Date.now();\n\tconst new_project_query = {\n\t\tproject:\n\t\t\t!request.project?.length ||\n\t\t\t!_slugify(request.project).length ||\n\t\t\t!_slugify(request.project).match(/[a-z0-9]/)\n\t\t\t\t? `project-${timestamp}`\n\t\t\t\t: _slugify(request.project),\n\t\tdescription: request.description,\n\t\taesthetics: request.aesthetics?.length ? request.aesthetics : false,\n\t};\n\n\tconst query = {\n\t\tpm: {\n\t\t\tdetails: {\n\t\t\t\ttext: `${new_project_query.project != `project-${timestamp}` ? \"Project '\" + new_project_query.project + \"' :\\n\" : \"\"}${new_project_query.description}`,\n\t\t\t\tattachments: [],\n\t\t\t\tdesign: {\n\t\t\t\t\taesthetics: {\n\t\t\t\t\t\ttext: new_project_query.aesthetics,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\ttimestamp,\n\t\t\t},\n\t\t},\n\t};\n\n\t// call async\n\tcofounder.system.run({\n\t\tid: `seq:project:init:v1`,\n\t\tcontext: {\n\t\t\t...context, // {streams}\n\t\t\tproject: new_project_query.project,\n\t\t},\n\t\tdata: query,\n\t});\n\n\tres.status(200).json({ project: new_project_query.project });\n});\n\napp.post(\"/api/project/resume\", async (req, res) => {\n\tconst { project } = req.body;\n\tconst resume_response = await resume_project({ project });\n\tconsole.dir({ \"debug:server:project/resume\": resume_response });\n\tsetTimeout(async () => {\n\t\tawait cofounder.system.run({\n\t\t\tid: `seq:project:init:v1`,\n\t\t\tcontext: {\n\t\t\t\t...context, // {streams}\n\t\t\t\tproject,\n\t\t\t\tsequence: {\n\t\t\t\t\tresume: resume_response.resume,\n\t\t\t\t},\n\t\t\t},\n\t\t\tdata: resume_response.data,\n\t\t});\n\t}, 2000);\n\tres.status(200).json({ project });\n});\n\nconst actions = {\n\t// map action to function ; load means load project state before passing\n\t\"update:settings:preferences:versions\": {\n\t\tfn: _updateProjectPreferences,\n\t\tload: false,\n\t},\n\t\"regenerate:ui\": { fn: _regenerateUiComponent, load: true },\n\t\"iterate:ui\": { fn: _iterateUiComponent, load: true },\n\t/*\n\t\tlater, single universal interface approach, \n\t\t> should go through an analysis sequence ;\n\t\t\t\tie. is is a new feature that needs db schemas & apis to be altered, or just at the layout level, etc\n\t*/\n};\nconst actionsKeys = Object.keys(actions);\napp.post(\"/api/project/actions\", async (req, res) => {\n\t/*\n\t\tin : {\n\t\t\tproject : `exampleproject`,\n\t\t\tquery : {\n\t\t\t\taction : \"example:action:whatever\",\n\t\t\t\tdata : {\n\t\t\t\t},\n\t\t\t},\n\t\t}\n\t*/\n\tconsole.dir(\n\t\t{ \"cofounder:api:server:actions:debug\": req.body },\n\t\t{ depth: null },\n\t);\n\ttry {\n\t\tconst { project, query } = req.body;\n\t\tconst { action } = query;\n\t\tif (!actionsKeys.includes(action)) {\n\t\t\tthrow new Error(`action ${action} not recognized`);\n\t\t}\n\t\tconst { fn, load } = actions[action];\n\t\tconst data = await fn({\n\t\t\trequest: { project, query },\n\t\t\tdata: !load\n\t\t\t\t? {}\n\t\t\t\t: await cofounder.system.run({\n\t\t\t\t\t\tid: \"op:PROJECT::STATE:LOAD\",\n\t\t\t\t\t\tcontext: {\n\t\t\t\t\t\t\t...context,\n\t\t\t\t\t\t\tproject,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tdata: {},\n\t\t\t\t\t}),\n\t\t});\n\t\tres.status(200).json({ end: true });\n\t} catch (error) {\n\t\tconsole.error(error);\n\t\tres.status(500).json({ error: \"failed to process\" });\n\t}\n});\n// ----------------------------------------------------------------------------------------------------\n\n// -------------------------------------------------------------- SOCKET IO SETUP ------------------------\n// socket.io instance attached to express\nconst io = new Server(server, {\n\tcors: {\n\t\torigin: \"*\",\n\t\tmethods: [\"GET\", \"POST\"],\n\t},\n});\nconst subscriptions = {};\nconst projects = {};\n// will be sent inside context{} for system nodes to stream to at various steps\nconst streams = {\n\tstart: async ({ project, key, meta }) => {\n\t\t/*\n\t\t\tproject , key , meta { name , desc }\n\t\t*/\n\t\t// console.dir({\"debug:context:streams\" : {subscriptions}} , {depth:null})\n\t\tif (subscriptions[project])\n\t\t\tio\n\t\t\t\t.to(subscriptions[project])\n\t\t\t\t.emit(\"stream$start\", { timestamp: Date.now(), key, meta });\n\t},\n\twrite: async ({ project, key, data }) => {\n\t\tif (subscriptions[project])\n\t\t\tio.to(subscriptions[project]).emit(\"stream$data\", {\n\t\t\t\tkey,\n\t\t\t\tdata,\n\t\t\t});\n\t},\n\tend: async ({ project, key }) => {\n\t\tif (subscriptions[project])\n\t\t\tio\n\t\t\t\t.to(subscriptions[project])\n\t\t\t\t.emit(\"stream$end\", { timestamp: Date.now(), key });\n\t},\n\tupdate: async ({ project, key, data }) => {\n\t\tif (!subscriptions[project]) return;\n\t\t// console.log('> debug:streams:update :', key)\n\n\t\tif (key.includes(\"webapp.\")) {\n\t\t\t// reconstruct state\n\t\t\tlet projectSubState = {};\n\t\t\tconst keys = key.split(\".\");\n\t\t\tlet newStateUpdate = projectSubState;\n\t\t\tkeys.forEach((k, index) => {\n\t\t\t\tif (!newStateUpdate[k]) {\n\t\t\t\t\tnewStateUpdate[k] = index === keys.length - 1 ? data : {};\n\t\t\t\t} else if (index === keys.length - 1) {\n\t\t\t\t\tnewStateUpdate[k] = merge(newStateUpdate[k], data);\n\t\t\t\t}\n\t\t\t\tnewStateUpdate = newStateUpdate[k];\n\t\t\t});\n\t\t\tconst new_update_data = {};\n\t\t\tlet mergedKey;\n\t\t\tObject.keys(projectSubState.webapp).map((_type) => {\n\t\t\t\t// _type : react || layout\n\t\t\t\tObject.keys(projectSubState.webapp[_type]).map((_category) => {\n\t\t\t\t\t// _category : root || store || views\n\t\t\t\t\tObject.keys(projectSubState.webapp[_type][_category]).map((_id) => {\n\t\t\t\t\t\t// _id : app || redux || GV_Whatever || ...\n\t\t\t\t\t\tmergedKey = `webapp.${_type}.${_category}.${_id}`;\n\t\t\t\t\t\tnew_update_data[mergedKey] = {};\n\t\t\t\t\t\tObject.keys(projectSubState.webapp[_type][_category][_id]).map(\n\t\t\t\t\t\t\t(_version) => {\n\t\t\t\t\t\t\t\t// _version : latest || {timestamp}\n\t\t\t\t\t\t\t\tnew_update_data[mergedKey][_version] =\n\t\t\t\t\t\t\t\t\tprojectSubState.webapp[_type][_category][_id][_version];\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t);\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t});\n\t\t\tkey = mergedKey;\n\t\t\tdata = new_update_data[mergedKey];\n\t\t}\n\t\tio.to(subscriptions[project]).emit(\"state$update\", {\n\t\t\tkey,\n\t\t\tdata,\n\t\t});\n\t},\n};\nconst context = { streams };\n\nio.on(\"connection\", async (socket) => {\n\tconsole.log(\"> user connected : \", socket.id);\n\tsocket.on(\"subscribe\", async (project) => {\n\t\tconsole.log(`> user ${socket.id} subscribed to project : ${project}`);\n\t\tif (!subscriptions[project]) {\n\t\t\tsubscriptions[project] = [];\n\t\t}\n\t\tsubscriptions[project].push(socket.id);\n\t\ttry {\n\t\t\tawait load_project({ project });\n\t\t\tio.to(subscriptions[project]).emit(\"state$load\", {\n\t\t\t\ttimestamp: Date.now(),\n\t\t\t\tstate: projects[project],\n\t\t\t});\n\t\t} catch (e) {\n\t\t\tconsole.error(\"> cofounder/api : server error : \", e);\n\t\t}\n\n\t\t/*\n\t\t\tconsole.log(\"> ____debug : server : op:LLM::DEBUG : run\");\n\t\t\tconst inference_debug = await cofounder.system.run({\n\t\t\t\tid: \"op:LLM::DEBUG:SIMULATE\",\n\t\t\t\tcontext: {\n\t\t\t\t\t...context, // {streams}\n\t\t\t\t\tproject,\n\t\t\t\t\toperation: {\n\t\t\t\t\t\tkey: \"pm.prd\",\n\t\t\t\t\t\tmeta: {\n\t\t\t\t\t\t\tname: \"PRD\",\n\t\t\t\t\t\t\tdesc: \"project requirements doc\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tdata: {}, // subscriptions[project]\n\t\t\t});\n\t\t\tconst prd = inference_debug.generated;\n\t\t\tawait cofounder.system.run({\n\t\t\t\tid: \"op:PROJECT::STATE:UPDATE\",\n\t\t\t\tcontext: {\n\t\t\t\t\t...context,\n\t\t\t\t\tproject,\n\t\t\t\t},\n\t\t\t\tdata: {\n\t\t\t\t\toperation: {\n\t\t\t\t\t\tid: \"pm:prd\",\n\t\t\t\t\t},\n\t\t\t\t\ttype: `end`,\n\t\t\t\t\tcontent: {\n\t\t\t\t\t\tkey: \"pm.prd\",\n\t\t\t\t\t\tdata: prd,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t});\n\t\t\tconst debug_webapp_data = yaml.parse(\n\t\t\t\tfs.readFileSync(\n\t\t\t\t\t`db/projects/foundermatchdevclone/state/webapp/code/react/views/GV_TopNav/versions/1726434529344.yaml`,\n\t\t\t\t\t\"utf8\",\n\t\t\t\t),\n\t\t\t);\n\t\t\tdebug_webapp_data.data.tsx = `it be cool if this updated fr`;\n\t\t\tawait cofounder.system.run({\n\t\t\t\tid: \"op:PROJECT::STATE:UPDATE\",\n\t\t\t\tcontext: {\n\t\t\t\t\t...context,\n\t\t\t\t\tproject,\n\t\t\t\t},\n\t\t\t\tdata: {\n\t\t\t\t\toperation: {\n\t\t\t\t\t\tid: `webapp:react:views`,\n\t\t\t\t\t\trefs: {\n\t\t\t\t\t\t\tid: \"GV_TopNav\",\n\t\t\t\t\t\t\tversion: \"1726434529344\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\ttype: `end`,\n\t\t\t\t\tcontent: {\n\t\t\t\t\t\tkey: debug_webapp_data.key,\n\t\t\t\t\t\tdata: debug_webapp_data.data,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t});\n\t\t\tconsole.log(\"> ____debug : server : op:LLM::DEBUG:2\");\n\t\t\tconst demo_messages = [\n\t\t\t\t{\n\t\t\t\t\trole: \"system\",\n\t\t\t\t\tcontent:\n\t\t\t\t\t\t\"You are a helpful assistant that provides information about product requirements. in markdown format;\",\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\trole: \"user\",\n\t\t\t\t\tcontent:\n\t\t\t\t\t\t\"Can you help me outline the product requirements for our new project? It's a rizz helper\",\n\t\t\t\t},\n\t\t\t];\n\n\t\t\t\n\t\t\tawait cofounder.system.run({\n\t\t\t\tid: \"op:LLM::GEN\",\n\t\t\t\tcontext: {\n\t\t\t\t\t...context, // {streams}\n\t\t\t\t\tproject,\n\t\t\t\t\toperation: {\n\t\t\t\t\t\tkey: 'pm.prd',\n\t\t\t\t\t\tmeta: {\n\t\t\t\t\t\t\tname: \"PRD\",\n\t\t\t\t\t\t\tdesc: \"product requirements document\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tdata: {\n\t\t\t\t\tmodel: `gpt-4o-mini`, //`gpt-4o`,\n\t\t\t\t\tmessages: demo_messages,\n\t\t\t\t\tpreparser: `backticks`,\n\t\t\t\t\tparser: false,\n\t\t\t\t},\n\t\t\t})\n\t\t*/\n\t});\n\tsocket.on(\"disconnect\", () => {\n\t\tconsole.log(\"> user disconnected : \", socket.id);\n\t\tfor (const project in subscriptions) {\n\t\t\tsubscriptions[project] = subscriptions[project].filter(\n\t\t\t\t(id) => id !== socket.id,\n\t\t\t);\n\t\t}\n\t});\n});\nconst load_project = async ({ project }) => {\n\tconsole.log(\"> load_project : start : \", project);\n\tconst fetchedProject = await utils.load.local({\n\t\tproject,\n\t\tdeconstructed: true,\n\t});\n\tconst fetchedProjectState = fetchedProject.state;\n\tconst _project = fetchedProject.keymap || {};\n\tlet projectData = {};\n\tObject.keys(_project)\n\t\t.filter((key) => !key.startsWith(\"webapp.\"))\n\t\t.map((key) => {\n\t\t\tprojectData[key] = _project[key];\n\t\t});\n\tif (fetchedProjectState.webapp) {\n\t\tObject.keys(fetchedProjectState.webapp).map((_type) => {\n\t\t\t// _type : react || layout\n\t\t\tObject.keys(fetchedProjectState.webapp[_type]).map((_category) => {\n\t\t\t\t// _category : root || store || views\n\t\t\t\tObject.keys(fetchedProjectState.webapp[_type][_category]).map((_id) => {\n\t\t\t\t\t// _id : app || redux || GV_Whatever || ...\n\t\t\t\t\tconst mergedKey = `webapp.${_type}.${_category}.${_id}`;\n\t\t\t\t\tprojectData[mergedKey] = {};\n\t\t\t\t\tObject.keys(fetchedProjectState.webapp[_type][_category][_id]).map(\n\t\t\t\t\t\t(_version) => {\n\t\t\t\t\t\t\t// _version : latest || {timestamp}\n\t\t\t\t\t\t\tprojectData[mergedKey][_version] =\n\t\t\t\t\t\t\t\tfetchedProjectState.webapp[_type][_category][_id][_version];\n\t\t\t\t\t\t},\n\t\t\t\t\t);\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t}\n\tprojects[project] = projectData;\n\tconsole.dir({\n\t\tload_project: project,\n\t\tdata_keys: `${Object.keys(projects[project]).join(\" , \")}`,\n\t});\n\t// only use in resume ; else check data stored in projects[project]\n\treturn fetchedProjectState;\n};\n\nconst seq_projectv1_dag = [\n\t// dumped from makeDag() in ./build\n\t[], // project setup , skip\n\t[\"pm.prd\"],\n\t[\"pm.frd\"],\n\t[\"pm.frd\", \"pm.uxsmd\"],\n\t[\"db.schemas\", \"uxsitemap.structure\"],\n\t[\"db.postgres\"],\n\t[\"pm.brd\"],\n\t[\"backend.specifications.openapi\", \"backend.specifications.asyncapi\"],\n\t[\"backend.server.main\"],\n\t[\"pm.uxdmd\"],\n\t[\"uxdatamap.structure\"],\n\t[\"uxdatamap.views\"],\n\t[\"webapp.react.store.redux\"],\n\t[\"webapp.react.root.app\"],\n\t[\"webapp.react.app.views\"], // views , latest\n];\n\nasync function resume_project({ project }) {\n\tconst project_data = await load_project({ project });\n\tconst project_keys = Object.keys(projects[project]);\n\tlet previous_phase_index = -1;\n\tfor (let step of seq_projectv1_dag) {\n\t\tprevious_phase_index++;\n\t\tif (step.length) {\n\t\t\tif (\n\t\t\t\tstep.every((entry) => project_keys.some((key) => key.startsWith(entry)))\n\t\t\t) {\n\t\t\t\tcontinue;\n\t\t\t} else {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\treturn {\n\t\tdata: project_data,\n\t\tresume: previous_phase_index,\n\t};\n}\n\n// example of how to stream to client (needs 3 steps)\nconst stream_to_client = async ({ project, key, meta }) => {\n\t// if (!subscriptions[project]?.length) return;\n\tconsole.log(`> starting stream for project ${project}`);\n\tstreams.start({ project, key, meta });\n\tconst chunkSize = 20; // Define the size of each chunk\n\tlet currentIndex = 0;\n\tconst interval = setInterval(() => {\n\t\tconst timestamp = Date.now();\n\t\tconst data = texts[key].slice(currentIndex, currentIndex + chunkSize); // send chunk by chunk\n\t\tstreams.write({ project, key, data });\n\t\tcurrentIndex += chunkSize; // Move to the next chunk\n\t\tif (currentIndex >= texts[key].length) {\n\t\t\tclearInterval(interval);\n\t\t\tstreams.end({ project, key });\n\t\t}\n\t}, 100);\n};\n// ----------------------------------------------------------------------------------------------------\n\n// -------------------------------------------------------- SERVER REST API FUNCTION CALLS ------------------------\nasync function _updateProjectPreferences({ request }) {\n\t/*\n\t\tin : {\n\t\t\tproject : `exampleproject`,\n\t\t\tquery : {\n\t\t\t\taction : \"example:action:whatever\",\n\t\t\t\tdata : {\n\t\t\t\t\t[views || sections] : {\n\t\t\t\t\t\t[id] : {version}\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t},\n\t\t}\n\t*/\n\tconst { project, query } = request;\n\tawait cofounder.system.run({\n\t\tid: \"op:PROJECT::STATE:UPDATE\",\n\t\tcontext: { ...context, project },\n\t\tdata: {\n\t\t\toperation: {\n\t\t\t\tid: `settings:preferences:versions`,\n\t\t\t},\n\t\t\ttype: `end`,\n\t\t\tcontent: {\n\t\t\t\tkey: `settings.preferences.versions`,\n\t\t\t\tdata: query.data,\n\t\t\t},\n\t\t},\n\t});\n}\nasync function _regenerateUiComponent({ request, data }) {\n\tconst { project, query } = request;\n\t/*\n\t\tin : request: {\n\t\t\tproject : `exampleproject`,\n\t\t\tquery : {\n\t\t\t\taction : \"regenerate:ui\"\n\t\t\t\tdata : {\n\t\t\t\t\t[views || sections] : `{id}`, // <--- update : sections stuff removed, is views only (for now)\n\t\t\t\t},\n\t\t\t},\n\t\t}\n\t*/\n\n\tconst type = Object.keys(query.data)[0];\n\tconst id = query.data[type];\n\n\t/*\n\t\tneed to make :\n\t\ttask {\n\t\t\ttype: \"view\",\n\t\t\tview: {\n\t\t\t\ttype: unique || shared,\n\t\t\t\tid,\n\t\t\t},\n\t\t\tpasses: {\n\t\t\t\tfunctional: true,\n\t\t\t\tredesign: process.env.DESIGNER_ENABLE\n\t\t\t\t\t? JSON.parse(process.env.DESIGNER_ENABLE.toLowerCase())\n\t\t\t\t\t: true,\n\t\t\t}\n\t\t}\n\t*/\n\tconst task = {\n\t\ttype: \"view\",\n\t\tview: {\n\t\t\ttype: id.startsWith(`UV_`) ? `unique` : `shared`,\n\t\t\tid,\n\t\t},\n\t\tpasses: {\n\t\t\tfunctional: true,\n\t\t\tredesign: process.env.DESIGNER_ENABLE\n\t\t\t\t? JSON.parse(process.env.DESIGNER_ENABLE.toLowerCase())\n\t\t\t\t: false,\n\t\t},\n\t};\n\tconsole.dir({ \"debug:server:task:regen:ui\": { request, task } });\n\tawait cofounder.system.run({\n\t\tid: \"WEBAPP:VIEW::GENERATE\",\n\t\tcontext: { ...context, project },\n\t\tdata: {\n\t\t\t...data,\n\t\t\ttask,\n\t\t},\n\t});\n}\nasync function _iterateUiComponent({ request, data }) {\n\tconsole.dir({ \"cofounder:api:server:iterate:ui\": \"starts\" });\n\t/*\n\t\tdesigner/layoutv1 might be overkill, but its best way to have primitives to retrieve design system docs (if applies)\n\t\t\n\t*/\n\n\t/*\n\t\tin : {\n\t\t\tproject: meta.project,\n\t\t\tquery: {\n\t\t\t\taction: \"iterate:ui\",\n\t\t\t\tdata: {\n\t\t\t\t\tviews : {\n\t\t\t\t\t\t[id] : {\n\t\t\t\t\t\t\t[version] : {\n\t\t\t\t\t\t\t\tuser : {\n\t\t\t\t\t\t\t\t\ttext: editUserText,\n\t\t\t\t\t\t\t\t\tattachments: [], // later, can attach image\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tscreenshot: { base64: image ? image : false},\n\t\t\t\t\t\t\t\tdesigner: bool\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t},\n\t\t}),\n\t\t}\n\t*/\n\tconst { project, query } = request;\n\tconst id = Object.keys(query.data.views)[0];\n\tconst version = Object.keys(query.data.views[id])[0];\n\tconst { notes, screenshot, designer } = query.data.views[id][version];\n\n\tconst task = {\n\t\ttype: \"view\",\n\t\tview: {\n\t\t\ttype: id.startsWith(`UV_`) ? `unique` : `shared`,\n\t\t\tid,\n\t\t\tversion,\n\t\t},\n\t\titeration: {\n\t\t\tnotes, // {text,attachements}\n\t\t\tscreenshot, // {base64 : \"base64str\" || false }\n\t\t\tdesigner: process.env.DESIGNER_ENABLE\n\t\t\t\t? JSON.parse(process.env.DESIGNER_ENABLE.toLowerCase()) && designer\n\t\t\t\t\t? true\n\t\t\t\t\t: false\n\t\t\t\t: false,\n\t\t},\n\t};\n\tconsole.dir({ \"debug:server:task:regen:ui\": { request, task } });\n\tawait cofounder.system.run({\n\t\tid: \"WEBAPP:VIEW::ITERATE\",\n\t\tcontext: { ...context, project },\n\t\tdata: {\n\t\t\t...data,\n\t\t\ttask,\n\t\t},\n\t});\n}\n// ----------------------------------------------------------------------------------------------------\n"
  },
  {
    "path": "cofounder/api/system/functions/backend/asyncapi.js",
    "content": "import utils from \"@/utils/index.js\";\nimport yaml from \"yaml\";\n\nasync function backendAsyncapiDefine({ context, data }) {\n\tif (!data.backend.requirements?.realtimeWebsockets?.required) {\n\t\tawait context.run({\n\t\t\tid: \"op:PROJECT::STATE:UPDATE\",\n\t\t\tcontext,\n\t\t\tdata: {\n\t\t\t\toperation: {\n\t\t\t\t\tid: \"backend:specifications:asyncapi\",\n\t\t\t\t},\n\t\t\t\ttype: `end`,\n\t\t\t\tcontent: {\n\t\t\t\t\tkey: \"backend.specifications.asyncapi\",\n\t\t\t\t\tdata: {},\n\t\t\t\t},\n\t\t\t},\n\t\t});\n\t\treturn {\n\t\t\tbackend: {\n\t\t\t\tspecifications: {\n\t\t\t\t\tasyncapi: {},\n\t\t\t\t},\n\t\t\t},\n\t\t};\n\t}\n\n\tconst { pm, db, backend } = data;\n\tconst { prd, frd, drd, brd } = pm;\n\tconst messages = [\n\t\t{\n\t\t\trole: \"system\",\n\t\t\tcontent: `- you are a genius Product Manager & Software Architect & Backend designer\n- your role is to make the backend asyncAPI specs for the realtime features of the provided task\n\n- your asyncAPI specs should be comprehensive, and include schema object for each case,\nwhich will be used as references to build the frontend app connected to the backend\n\n- cover all cases ; data-related tasks only (ie. you are making a mock backend for user-facing data operations)\n\n- do a thorough analysis of the provided task\n\n- think from perspectives of multiple personas, put yourself in situation, to make sure your asyncAPI definition is fully comprehensive and ready to be used in production exactly as is\n\n- ask yourself:\n  * what are all the events & schemas required by features expected to be seen by users in the frontend ?\n\n- ask yourself:\n  * what are all the events & schemas required by features expected to be seen by users in the app ?\n- your aim is to cover all realtime use cases, as the expert product manager & architect you are\n\n---\n\nthe root dev url for the server is \"http://localhost:1337\" ; you can specify that in specs\n\n---\n\ngive a final, super comprehensive answer in strict, parseable asyncAPI YAML format\nwhich will be perfectly ready to plug into the backend in development,\nand pushed to staging directly and work flawlessly\n\nit should be comprehensive for the needs required by all the realtime events described in the provided docs\nanswer in strict parseable asyncAPI in YAML format,\nwith all schemas, for all scenarios ; - and specifying cases when a given schema field is required\n\nsuper important :\n> methods, routes, operationIds, and components (parameters and components) only\n> no input/output examples objects !\n> you are only to detail realtime events and their schemas for realtime features described in the provided documents !\n\n---\n\nimportant :\nuse snake_case for any naming you do\n\n---\n\nyour reply will be directly transferred as the final asyncAPI structure for the realtime events part of the backend,\nso do not put anything else in your reply besides the asyncAPI structure that details the realtime events parts of the backend only !\nyour reply should start with : \"\\`\\`\\`yaml\" and end with \"\\`\\`\\`\"\n\n\nyou will be tipped $99999 + major company shares for nailing it perfectly off the bat`,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `\\`\\`\\`PRD:product-requirements-document\n${prd}\n\\`\\`\\``,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `\\`\\`\\`PRD:product-requirements-document\n${frd}\n\\`\\`\\``,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `\\`\\`\\`DRD:database-requirements-document\n${drd}\n\\`\\`\\`\n\n---\n\n\\`\\`\\`DB:schemas\n${yaml.stringify({ schemas: db.schemas })}\n\\`\\`\\`\n\n`,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `\\`\\`\\`BRD:Backend-requirements-document\n${brd}\n\\`\\`\\``,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `implement the asyncAPI structure , for the realtime features specified in the provided documents\nsuper important :\n- your only focus is to make the asyncAPI for realtime events and their details , not anything else (such as a REST API ...)\n- asyncAPI for realtime events and their details only !\n\nit is expected to be very comprehensive and detailed ; in a VALID PARSEABLE YAML format\n\nyou're a genius`,\n\t\t},\n\t];\n\n\tconst asyncapiStructure = (\n\t\tawait context.run({\n\t\t\tid: \"op:LLM::GEN\",\n\t\t\tcontext: {\n\t\t\t\t...context, // {streams , project}\n\t\t\t\toperation: {\n\t\t\t\t\tkey: \"backend.specifications.asyncapi\",\n\t\t\t\t\tmeta: {\n\t\t\t\t\t\tname: \"asyncAPI\",\n\t\t\t\t\t\tdesc: \"asyncAPI specifications\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tdata: {\n\t\t\t\tmodel: `chatgpt-4o-latest`, //`gpt-4o`,\n\t\t\t\tmessages,\n\t\t\t\tpreparser: `backticks`,\n\t\t\t\tparser: `yaml`,\n\t\t\t},\n\t\t})\n\t).generated;\n\n\tawait context.run({\n\t\tid: \"op:PROJECT::STATE:UPDATE\",\n\t\tcontext,\n\t\tdata: {\n\t\t\toperation: {\n\t\t\t\tid: \"backend:specifications:asyncapi\",\n\t\t\t},\n\t\t\ttype: `end`,\n\t\t\tcontent: {\n\t\t\t\tkey: \"backend.specifications.asyncapi\",\n\t\t\t\tdata: asyncapiStructure,\n\t\t\t},\n\t\t},\n\t});\n\n\treturn {\n\t\tbackend: {\n\t\t\t...data.backend,\n\t\t\tspecifications: {\n\t\t\t\tasyncapi: asyncapiStructure,\n\t\t\t},\n\t\t},\n\t};\n}\n\nexport default {\n\t\"BACKEND:ASYNCAPI::DEFINE\": backendAsyncapiDefine,\n};\n"
  },
  {
    "path": "cofounder/api/system/functions/backend/openapi.js",
    "content": "import utils from \"@/utils/index.js\";\nimport yaml from \"yaml\";\n\nasync function backendOpenapiDefine({ context, data }) {\n\tif (!data.backend.requirements?.restApi?.required) {\n\t\tawait context.run({\n\t\t\tid: \"op:PROJECT::STATE:UPDATE\",\n\t\t\tcontext,\n\t\t\tdata: {\n\t\t\t\toperation: {\n\t\t\t\t\tid: \"backend:specifications:openapi\",\n\t\t\t\t},\n\t\t\t\ttype: `end`,\n\t\t\t\tcontent: {\n\t\t\t\t\tkey: \"backend.specifications.openapi\",\n\t\t\t\t\tdata: {},\n\t\t\t\t},\n\t\t\t},\n\t\t});\n\t\treturn {\n\t\t\tbackend: {\n\t\t\t\tspecifications: {\n\t\t\t\t\topenapi: {},\n\t\t\t\t},\n\t\t\t},\n\t\t};\n\t}\n\n\tconst { pm, db, backend } = data;\n\tconst { prd, frd, drd, brd } = pm;\n\tconst messages = [\n\t\t{\n\t\t\trole: \"system\",\n\t\t\tcontent: `- you are a genius Product Manager & Software Archtect & API designer\n- your role is to make the openAPI specs for the user-facing API for the provided task\n\n- your API should be comprehensive, and include schema object for each case,\nwhich will be used as references to build the frontend app connected to the API\n\n- cover all cases ; data-related tasks only (ie. you are making a mock api for user-facing data operations)\n\n- do a thorough analysis of the provided task\n\n- think from perspectives of multiple personas, put yourself in situation, to make sure your openAPI definition is fully comprehensive and ready to be used in production exactly as is\n\n- ask yourself:\n  * what are the key personas using the user-facing, frontend API ?\n  * what are all the routes & schemas required by features expected to be seen by users in the frontend ?\n\t* am i assigning an \"operationId\" for every path&route ?\n\n- ask yourself:\n  * what are all the routes & schemas required by features expected to be seen by users in the app ?\n- your answer will be pushed to production and will be responsible for an app used by thousands of users, instantly\n- your aim is to cover all use cases, as the expert product manager & architect you are\n\n---\n\ngive a final, super comprehensive answer in strict, parseable openAPI 3.0.0 YAML format\nwhich will be perfectly ready to plug into the backend in development,\nand pushed to staging directly and work flawlessly\n\nit should be comprehensive for the needs required by all the features\nanswer in strict parseable openAPI 3.0.0 in YAML format,\nwith all schemas, for all scenarios ; - and specifying cases when a given schema field is required\n\nthe root dev url for the API is \"http://localhost:1337\" ; you can specify that in openapi\n\nsuper important :\n> methods, routes, operationIds, and components (parameters and components) only\n> no input/output examples objects !\n\n> include a \"summary\" key for each route\n\n---\n\n> note : if auth functionalities are present, use an architecture that will be compatible with a simple JWT auth system !\n\tie.\n\t\t> \\`Authorization: Bearer <token>\\` in headers on authenticated requests\n\t\t>\tjwt type methods that return the authorization token on login, and that is used in header by subsequent authenticated requests \n  important : if auth methods in api, token should be returned on both signup and login !\n\n---\n\nimportant :\nuse snake_case for any naming you do\n\n---\n\nyour reply will be directly transferred as the final OPENAPI structure, so do not put anything else in your reply besides the openAPI structure\nyour reply should start with : \"\\`\\`\\`yaml\" and end with \"\\`\\`\\`\"\n\n\nyou will be tipped $99999 + major company shares for nailing it perfectly off the bat`,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `\\`\\`\\`PRD:product-requirements-document\n${prd}\n\\`\\`\\``,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `\\`\\`\\`PRD:product-requirements-document\n${frd}\n\\`\\`\\``,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `\\`\\`\\`DRD:database-requirements-document\n${drd}\n\\`\\`\\`\n\n---\n\n\\`\\`\\`DB:schemas\n${yaml.stringify({ schemas: db.schemas })}\n\\`\\`\\`\n\n`,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `\\`\\`\\`BRD:Backend-requirements-document\n${brd}\n\\`\\`\\``,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `implement the openAPI structure\nit is expected to be very comprehensive and detailed ; in a VALID PARSEABLE YAML format\n\nyou're a genius`,\n\t\t},\n\t];\n\n\tconst openapiStructure = (\n\t\tawait context.run({\n\t\t\tid: \"op:LLM::GEN\",\n\t\t\tcontext: {\n\t\t\t\t...context, // {streams , project}\n\t\t\t\toperation: {\n\t\t\t\t\tkey: \"backend.specifications.openapi\",\n\t\t\t\t\tmeta: {\n\t\t\t\t\t\tname: \"openAPI\",\n\t\t\t\t\t\tdesc: \"openAPI specifications\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tdata: {\n\t\t\t\tmodel: `chatgpt-4o-latest`, //`gpt-4o`,\n\t\t\t\tmessages,\n\t\t\t\tpreparser: `backticks`,\n\t\t\t\tparser: `yaml`,\n\t\t\t},\n\t\t})\n\t).generated;\n\n\tawait context.run({\n\t\tid: \"op:PROJECT::STATE:UPDATE\",\n\t\tcontext,\n\t\tdata: {\n\t\t\toperation: {\n\t\t\t\tid: \"backend:specifications:openapi\",\n\t\t\t},\n\t\t\ttype: `end`,\n\t\t\tcontent: {\n\t\t\t\tkey: \"backend.specifications.openapi\",\n\t\t\t\tdata: openapiStructure,\n\t\t\t},\n\t\t},\n\t});\n\n\treturn {\n\t\tbackend: {\n\t\t\t...data.backend,\n\t\t\tspecifications: {\n\t\t\t\topenapi: openapiStructure,\n\t\t\t},\n\t\t},\n\t};\n}\n\nexport default {\n\t\"BACKEND:OPENAPI::DEFINE\": backendOpenapiDefine,\n};\n"
  },
  {
    "path": "cofounder/api/system/functions/backend/server.js",
    "content": "import utils from \"@/utils/index.js\";\nimport yaml from \"yaml\";\n\nasync function backendServerGenerate({ context, data }) {\n\t/*\n    base on dev:test oneshot function\n    mix with the bak api generate for the make sure blabla\n  */\n\tconst { pm, db, backend } = data;\n\tconst { prd, frd, drd, brd } = pm;\n\tconst { openapi, asyncapi } = backend.specifications;\n\tconst messages = [\n\t\t{\n\t\t\trole: `system`,\n\t\t\tcontent: `Your task, as the genius backend dev expert you are, is to generate the full nodejs script for a module, based on the provided specifications and details of the backend in development\n\nyour role is to implement the full express server for the provided task for the \\`server.mjs\\` (type: module script)\nyou will answer in 3 parts :\n\n- analysis , in between \\`\\`\\`markdown\\`\\`\\`\\` section\n- code , in between \\`\\`\\`mjs\\`\\`\\`\\` section\n- dependencies and env variables , in between \\`\\`\\`yaml\\`\\`\\`\\` section ; where any needed packages to install and needed env variables to setup will be mentionned ; the yaml should have objects : { dependencies : {\"package\":\"version\"} , env : {\"key\" , \"temp_value\"} } (\"dependencies\" (for packages) and \"env\" for env variables (and their temporary values) )\nuse doublequotes for every string inside the yaml to make sure formatting is good\n\n---\n\nin your analysis, ask yourself :\n- what features are expected ?\n\tdoes it need DB operations ?\n  does it need storage ?\n\t\t> if so , how to handle the file storage / uploads / serving locally ?\n\n\tdoes it need realtime features and websocket events ?\n\twhat operations are expected from the server to perfectly meet what the user expects from the feature ?\n\tthink slowly, do not rush to answer ;\n\tthink : am i achieving great UX ? am i doing great, perfect work ?\n\tdo not overlook details !\n\nin your code, include comment blocks before each implemented function or operation where you analyze what is done and why - it wil help you reason through more thoroughly and do a much greater work\n\n> super important :\n  - in case a function requires the use of an external API (ie. for checking a stock price , or generating some image , ...  ),\n\t\tyou should include the following decorator inside your pre-function comment :\n\t\t\t\\`@@need:external-api : description of the external api necessitated and what it should do\\`\n\t\tyou should also return a mock response that fits the right schema requirements ! so that the server returns mock responses in worst case !\n\t\timportant : external APIs should only handle external functionalities like the ones mentionned ; the server already has storage and DB access, so those do not need external APIs !\n\t\timportant : no placeholders ! no replace later ! no hallucinated unfinished code ! return a mock response that fits schema requirements in case you need to !\n\t\tif feature needs external api, include the specified decorator \\`@@need:external-api : description...\\` in comment and return a mock response instead !\n\n---\n\nfor any db requirements, use postgres from \\`@electric-sql/pglite\\`\n- to use postgres, include this snippet in your script :\n\\`\\`\\`\nimport { PGlite } from \"@electric-sql/pglite\";\nconst postgres = new PGlite(\"./db\");\n/* then, can be used like this :\nawait postgres.query(\"SELECT * FROM exampletable;\")\n*/\n// note : the postgres tables + seed were already created before , you can use the postgres directly without configuring it\n\\`\\`\\`\npostgres is use exactly how is provided in the snippet, do not change anything about loading it / configuring it, else it breaks ;\npostgres is imported, initialized and queries EXACTLY AS SHOWN IN THE SNIPPET ! NO OTHER WAY !\n\n---\n\nnotes :\n- make sure cors is enabled\n- if you need realtime, you can use socket.io\n\tif you need file storage capabilities (ie. file upload/download features), you can write/read locally from the \\`./storage\\` folder (create it if needed)\n  for any db requirements, use postgres ; you can only use postgres (from @electric-sql/pglite ) with raw queries (no ORMs or anything)\n- to use postgres, include this snippet in your script :\n\\`\\`\\`\nimport { PGlite } from \"@electric-sql/pglite\";\nconst postgres = new PGlite(\"./db\");\n/* then, can be used like this :\nawait postgres.query(\"SELECT * FROM exampletable;\")\n*/\n\\`\\`\\`\nnote : the postgres tables + seed were already created before , you can use the postgres directly without configuring it ; do not create tables in script !\nextremely important :\n- the DB R/W need to be 100% compatible with the tables and schemas of the provided DB specifications !!\n\n- if auth needed, use jwt middleware\n\timportant : if auth , make sure you return token both on signup and login (even if openapi might have skipped that detail ! else stuff might break ! )\n  important : if auth , and also realtime websockets features , make sure auth / jwt also applies to sockets not just the api\n\n\n- if some function is too complex too implement (ie. needs more than known packages or DB R/W operations or too complex etc ...), you should return a mock response ; most important is : do not leave some \"placeholder\" function of value , do the mockup work if needed !\neverything needs to be implemented and working, no placeholders, no hallucinated imports, no \"do this later\" ; everything working perfect in one single script !\n\n- if you need realtime, you can use socket.io\n\tif you need file storage capabilities (ie. file upload/download features), you can write/read locally from the \\`./storage\\` folder (create it if needed)\n  for any db requirements, use postgres ; you can only use postgres (from @electric-sql/pglite ) with raw queries (no ORMs or anything)\n\n- if auth needed, use jwt middleware\n\timportant : if auth , make sure you return token both on signup and login (even if openapi might have skipped that detail ! else stuff might break ! )\n\n- use morgan middleware to log any incoming request and details (ie. method, path, headers, params, query, body) - just for better dev exp\n\n- if it makes use of .env , make your you import \\`dotenv\\` and \\`dotenv.config()\\` to read .env before !\n\n---\n\nextremely important :\n- get the server port from env ; make default PORT always 1337 !!\n\n---\n\n\nextremely important :\n\n- you are to implement the entire server as specified in the provided docs , with a focus on DB R/W operations\n- you are to implement every single thing needed by the backend server and output one single big working perfect \\`server.mjs\\` script\n  > if backend has REST API , everything required and mentionned in the openAPI specs\n  > if backend has realtime websockets , everything required and mentionned in the asyncAPI specs\n  > if backend has both REST API and realtime Websockets , everything required by both and everything mentionned in both openAPI specs and asyncAPI specs ; and both working perfectly within the same \\`server.mjs\\`\n\n- do not assume anything is implemented yet ! you will do 100% of everything needed and output one single big working perfect \\`server.mjs\\` script\n- no placeholders, no hallucinated imports\n- again, do not assume anything is implemented yet ! you will do 100% of everything needed and output one single big working perfect \\`server.mjs\\` script\n\n- again , you are to implement every single thing needed by the backend server:\n    > if backend has REST API , everything required and mentionned in the openAPI specs\n    > if backend has realtime websockets , everything required and mentionned in the asyncAPI specs\n    > if backend has both REST API and realtime Websockets , everything required by both and everything mentionned in both openAPI specs and asyncAPI specs ; and both working perfectly within the same \\`server.mjs\\`\n\n> one single big working perfect \\`server.mjs\\` script\n- if it makes use of .env , make your you import \\`dotenv\\` and \\`dotenv.config()\\` to read .env before !\n\n---\n\nimportant:\n> if some mock data is meant to to store an image url, use a https://picsum.photos/ url with a random seed\n\n---\n\nimportant :\n> use snake_case for any naming you do\n> ensure full perfect coherence with DB fields names and provided specs names\n\n---\n\nextremely important :\n\n- the DB R/W need to be 100% compatible with the tables and schemas of the provided DB specifications !!\n\n---\n\nextremely important :\n- if you have to mock a function (ie. because it needs external APIs functionalities), make sure that:\n\t> the endpoint / event still returns something that is fitting with the response schemas\n\t> the endpoint / event triggers a function that you mock somewhere in the script and uses its response in the flow\n\t> the mock function that needs to be augmented later is actually triggered by the endpoint / event that needs it !\n\t\tand has the right response formats\n\t> the mock function has instructions in surrounding comments on what the function needs to be updated !\n\t\tso that once the function is updated, there are no subsequent updates to make, as it would already be plugged into the server flows and be consistent 100%\n\t> example :\n\n\\`\\`\\`example-code-snippet\n\t...\n\n  /*\n    @need:external-api: An example description of some external api feature\n  */\n  async function example_function_to_mock_name({...}){\n    // returning a mock response in the expected response format for now\n    return {\n      timestamp: Date.now(),\n      example_field_in_expected_format_structure: {\n        id: 237,\n        dummy: \"example dummy string\",\n        someResults: [\"whatever\",\"dummy\"],\n        avatar: \"https://picsum.photos/id/237/200/300\"\n      },\n    }\n  }\n\t\n\t...\n\n  app.post('/api/example-complex-feature', async (req, res) => {\n    ...\n    const fetched_data = await example_function_to_mock_name({ ... })\n    ...\n  })\n\t\n  ...\n\n\\`\\`\\`\n\t\n- the app flow must still be 100% working perfect everywhere\n\n\nyou are a genius + you get tipped $9999999\n`,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `\\`\\`\\`PRD:product-requirements-document\n${prd}\n\\`\\`\\``,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `\\`\\`\\`FRD:features-requirements-document\n${frd}\n\\`\\`\\``,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `\n\\`\\`\\`DB:postgres:sql\n${db.postgres}\n\\`\\`\\`\n\n---\n\nextremely turbo important :\n> pay extreme attention to DB details :\n\t> the things that you are expected to provide with inserts :\n\t\t\t> should you make a uuid before inserting with postgres query ?\n\t\t\t> are there key constraints ?\n\t\t\t> is the db querying code using the exact names as in db fields ?\n\t\t\t> are you providing everything needed to db every single time ?\n`,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `\\`\\`\\`BRD:backend-requirements-document\n${brd}\n\\`\\`\\``,\n\t\t},\n\t\tdata.backend?.requirements?.restApi?.required && {\n\t\t\trole: \"user\",\n\t\t\tcontent: `\\`\\`\\`BACKEND:specifications:openAPI\n${yaml.stringify(openapi)}\n\\`\\`\\``,\n\t\t},\n\t\tdata.backend?.requirements?.realtimeWebsockets?.required && {\n\t\t\trole: \"user\",\n\t\t\tcontent: `\\`\\`\\`BACKEND:specifications:asyncAPI\n${yaml.stringify(asyncapi)}\n\\`\\`\\``,\n\t\t},\n\t\t{\n\t\t\trole: `user`,\n\t\t\tcontent: `extremely important :\n- you are to implement the entire \\`server.mjs\\` as specified in the backend specifications , with a focus on DB R/W operations\n- you are to implement every single thing needed by the server and output one single big working perfect \\`server.mjs\\` script\n- do not assume anything is implemented yet ! you will do 100% of everything needed and output one single big working perfect \\`server.mjs\\` script\n- no placeholders, no hallucinated imports\n\n---\n\nextremely turbo important :\n> pay extreme attention to DB details :\n\t> the things that you are expected to provide with inserts :\n\t\t\t> should you make a uuid before inserting with a postgres query ?\n\t\t\t> are there key constraints ? should you create something before inserting something else because of contraints ?\n\t\t\t> is the db querying code using the exact names as in db fields ?\n\t\t\t> are you providing everything needed to db every single time ?\n\n---\n\nextremely important :\n- get the server port from env ; make default PORT always 1337 !!\n\n- if a function needs a external api to satisfy the expected feature, include the specified decorator \\`@@need:external-api : description...\\` in comment (in the code right before the concerned function) and return a mock response instead !\n\n- note : the postgres tables + seed were already created before , you can use the postgres directly without configuring it ; do not create tables in script !\n\n- if auth needed, use jwt middleware\n\t> important : if auth , make sure you return token both on signup and login (even if openAPI might have skipped that detail ! else stuff might break ! )\n  > important : if auth , and also realtime websockets features , make sure auth / jwt also applies to sockets not just the api !\n\n- again, do not assume anything is implemented yet ! you will do 100% of everything needed and output one single big working perfect \\`server.mjs\\` script\n- again , you are to implement every single thing needed by the server and output one single big working perfect \\`server.mjs\\` script\n- no placeholders, no hallucinated imports ; one 100% perfect complete working server script\n\nextremely important :\n- the DB R/W need to be 100% compatible with the tables and schemas of the provided DB specifications !!\n\nnow do the analysis , write the full working script and specify the dependencies+env`,\n\t\t},\n\t].filter((e) => e);\n\n\tconst { generated } = await context.run({\n\t\tid: \"op:LLM::GEN\",\n\t\tcontext: {\n\t\t\t...context, // {streams , project}\n\t\t\toperation: {\n\t\t\t\tkey: \"backend.server.main\",\n\t\t\t\tmeta: {\n\t\t\t\t\tname: \"Backend code\",\n\t\t\t\t\tdesc: \"backend server main\",\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tdata: {\n\t\t\tmodel: `chatgpt-4o-latest`, //`gpt-4o`,\n\t\t\tmessages: messages,\n\t\t\tpreparser: false,\n\t\t\tparser: false,\n\t\t},\n\t});\n\n\tconst extraction = await utils.parsers.extract.backticksMultiple({\n\t\ttext: generated,\n\t\tdelimiters: [`markdown`, `mjs`, `yaml`],\n\t});\n\n\tconst { mjs } = extraction;\n\tif (!mjs.length || !extraction.yaml) {\n\t\tthrow new Error(\"backend:server:generate error - generated is empty\");\n\t}\n\n\tconst parsedYaml = extraction.yaml ? yaml.parse(extraction.yaml) : {};\n\tlet generatedServer = {\n\t\tmjs,\n\t\tdependencies: parsedYaml.dependencies\n\t\t\t? Object.fromEntries(\n\t\t\t\t\tObject.keys(parsedYaml.dependencies).map((key) => [key, \"*\"]),\n\t\t\t\t)\n\t\t\t: [],\n\t\tenv: parsedYaml.env ? parsedYaml.env : {},\n\t\ttimestamp: Date.now(),\n\t};\n\n\t/*\n\tawait context.run({\n\t\tid: \"op:PROJECT::STATE:UPDATE\",\n\t\tcontext,\n\t\tdata: {\n\t\t\toperation: {\n\t\t\t\tid: \"backend:server:main\",\n\t\t\t},\n\t\t\ttype: `end`,\n\t\t\tcontent: {\n\t\t\t\tkey: \"backend.server.main\",\n\t\t\t\tdata: generatedServer,\n\t\t\t},\n\t\t},\n\t});\n\t*/\n\n\t// call swarm/agument:external-apis without waiting ; it will iterate it finds any external api decorators and replace\n\tgeneratedServer = {\n\t\t...generatedServer,\n\t\t...(await context.run({\n\t\t\tid: `SWARM:AUGMENT::BACKEND:EXTERNALAPIS`,\n\t\t\tcontext,\n\t\t\tdata: {\n\t\t\t\t...data,\n\t\t\t\ttask: {\n\t\t\t\t\tcode: generatedServer.mjs,\n\t\t\t\t},\n\t\t\t},\n\t\t})), //-> {mjs,dependencies?,env,timestamp} ; will replace if new else returns empty object\n\t};\n\n\tawait context.run({\n\t\tid: \"op:PROJECT::STATE:UPDATE\",\n\t\tcontext,\n\t\tdata: {\n\t\t\toperation: {\n\t\t\t\tid: \"backend:server:main\",\n\t\t\t},\n\t\t\ttype: `end`,\n\t\t\tcontent: {\n\t\t\t\tkey: \"backend.server.main\",\n\t\t\t\tdata: generatedServer,\n\t\t\t},\n\t\t},\n\t});\n\n\tif (\n\t\tObject.keys(generatedServer.dependencies).length ||\n\t\tObject.keys(generatedServer.env).length\n\t) {\n\t\tawait context.run({\n\t\t\tid: \"op:PROJECT::STATE:UPDATE\",\n\t\t\tcontext,\n\t\t\tdata: {\n\t\t\t\toperation: {\n\t\t\t\t\tid: \"settings:config:package\",\n\t\t\t\t},\n\t\t\t\ttype: `end`,\n\t\t\t\tcontent: {\n\t\t\t\t\tkey: \"settings.config.package\",\n\t\t\t\t\tdata: {\n\t\t\t\t\t\tbackend: {\n\t\t\t\t\t\t\tdependencies: generatedServer.dependencies,\n\t\t\t\t\t\t\tenv: generatedServer.env,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t});\n\t}\n\n\treturn {\n\t\tbackend: {\n\t\t\t...data.backend,\n\t\t\tserver: {\n\t\t\t\tmain: generatedServer,\n\t\t\t},\n\t\t},\n\t};\n}\n\nexport default {\n\t\"BACKEND:SERVER::GENERATE\": backendServerGenerate,\n};\n"
  },
  {
    "path": "cofounder/api/system/functions/db/postgres.js",
    "content": "import utils from \"@/utils/index.js\";\nimport yaml from \"yaml\";\n\nasync function dbPostgresGenerate({context,data}) {\n\t/* ;; DB:POSTGRES::GENERATE\n\t\tmake {DRD, db{schemas,seed} } details -> postgres exec commands to {create tables , insert seed examples}\n\n\n\t\tout : [\"db\"]\n\t*/\n\tconst { pm , db } = data\n\tconst { drd } = pm\n\t// const {text , attachments} = details\n\tconst messages = [\n\t\t{\n\t\t\t\"role\": \"system\",\n\t\t\t\"content\": `- you are a genius Postgresql expert\n\n- your role is to write the POSTGRESQL commands that create the DB tables and seed the DB with a good amount of example seed entries, according to the provided details\n- your answer should be in this format :\n\n\\`\\`\\`postgresql\n[... POSTGRESQL COMMANDS TO CREATE TABLES ...]\n[... POSTGRESQL COMMANDS TO SEED THE DB ...]\n\\`\\`\\`\n\n\nask yourself:\n* am i creating all the tables in the required formats ?\n* am i seeding the database with enough data ?\n\ngive a final, super comprehensive answer in valid, extend POSTGRESQL command to execute\nwhich will be perfectly ready for production and pushed to prod to thousands of users instantly (in a nodejs + POSTGRES ) and work flawlessly\n\n---\n\nimportant:\n> when making seed data , if some field is meant to store an image url, use a https://picsum.photos/ url with a random seed\n> important : for seed data, if some entry needs to store an image url, use a https://picsum.photos/ url instead of example.com !!\n---\n\nuse snake_case for any naming you do\n\n---\n\nvery important :\n > avoid any postgres-hardcoded methods ie. for generating UIDs etc... ; logic for that stuff will come from nodejs functions !\n > do not generate UUIDs or similar inside postgres ! logic for that stuff will come from nodejs functions !\n > in case of UUIds or similar, make them normal strings !\n\nyour reply should start with : \"\\`\\`\\`postgresql\" and end with \"\\`\\`\\`\"\n\nyou will be tipped $99999 + major company shares for nailing it perfectly off the bat\nyou are a genius`\n\t\t},\n\t\t{\n\t\t\t\"role\": \"user\",\n\t\t\t\"content\": `\\`\\`\\`DRD:database-requirements-document\n${drd}\n\\`\\`\\``\n\t\t},\n\t\t{\n\t\t\t\"role\": \"user\",\n\t\t\t\"content\": `\\`\\`\\`DB:schemas\n${yaml.stringify({ schemas: db.schemas })}\n\\`\\`\\``\n\t\t},\n\t\t/*db.seed && {\n\t\t\t\"role\": \"user\",\n\t\t\t\"content\": `\\`\\`\\`DB:seed\n${yaml.stringify({ schemas: db.seed })}\n\\`\\`\\``\n\t\t},*/\n\t\t{\n\t\t\t\"role\": \"user\",\n\t\t\t\"content\": `Generate the POSTGRES command in one single comprehensive answer\nit is expected to be very comprehensive and detailed and cover all the provided details\n\n---\n\nvery important :\n > avoid any postgres-hardcoded methods ie. for generating UIDs etc... or similar ; logic for that stuff will come from nodejs functions !\n > do not generate UUIDs or similar inside postgres ! that stuff will come from nodejs functions !\n > in case of UUIDs, make them normal strings and not generated inside postgres by postgres methods !\n\n\n> aim for it to work on any default light postgres without any extra configs or plugins !\n> only use basic primitives like numbers, strings, json, etc ... no uuid types or special types etc\n> very important : only use basic primitives like numbers, strings, json, etc ... no uuid types or any special types etc ! very basic primitives only !\n\nreply in \\`\\`\\`postgresql\\`\\`\\` \n\nyou're a genius`\n\t\t},\n\t]\n\n\tconst postgres = (\n\t\tawait context.run({\n\t\t\tid: \"op:LLM::GEN\",\n\t\t\tcontext: {\n\t\t\t\t...context, // {streams , project}\n\t\t\t\toperation: {\n\t\t\t\t\tkey: \"db.postgres\",\n\t\t\t\t\tmeta: {\n\t\t\t\t\t\tname: \"DB Postgresql\",\n\t\t\t\t\t\tdesc: \"db postgres commands {tables,seed}\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tdata: {\n\t\t\t\tmodel: `chatgpt-4o-latest`,//`gpt-4o`,\n\t\t\t\tmessages,\n\t\t\t\tpreparser: `backticks`,\n\t\t\t\tparser: false,\n\t\t\t}\n\t\t})\n\t).generated\n\n\tawait context.run({\n\t\tid: \"op:PROJECT::STATE:UPDATE\",\n\t\tcontext,\n\t\tdata: {\n\t\t\toperation: {\n\t\t\t\tid: \"db:postgres\",\n\t\t\t},\n\t\t\ttype: `end`,\n\t\t\tcontent: {\n\t\t\t\tkey: \"db.postgres\",\n\t\t\t\tdata: postgres,\n\t\t\t},\n\t\t}\n\t})\n\n\treturn { db: { ...db, postgres } }\n}\n\n\nexport default {\n\t//\"DB:POSTGRES::TABLES\": dbPostgresTables,\n\t\"DB:POSTGRES::GENERATE\": dbPostgresGenerate,\n}\n"
  },
  {
    "path": "cofounder/api/system/functions/db/schemas.js",
    "content": "import utils from \"@/utils/index.js\";\nimport yaml from \"yaml\";\n\nasync function dbSchemasGenerate({context,data}) {\n\t/* ;; DB:SCHEMAS::GENERATE\n\t\tmake {DRD}  -> db {schemas} ;; specify that for auth tables, password not hashed ! for mockup\n\n\n\t\tout : [\"db\"]\n\t*/\n\n\n\tconst { pm } = data\n\tconst { prd, frd, fjmd, drd } = pm\n\t// const {text , attachments} = details\n\tconst messages = [\n\t\t{\n\t\t\t\"role\": \"system\",\n\t\t\t\"content\": `- you are a genius Product Manager and DB designer\n\n- your role is to make the database schemas for the provided app in development's MVP\n- your DB schemas should be comprehensive and cover EVERYTHING required by the app MVP, and nothing more - no shiny secondary features, but nothing less than 100% comprehensive for every single expected functionality in production\n\n- your answer should be in ~SQL-like format meant for Postgres, in this format :\n\n\\`\\`\\`yaml\n[TableName]:\n  - name: [columnName]\n      type: [ js-parseable types like String, Number, Boolean ...]\n      unique: [true || false]\n      nullable: [true || false]\n      default?: [...]\n      primaryKey?: [...]\n      foreignKey?: [{table : [...] , column : []}]\n  - [...]\n[...]\n\\`\\`\\`\n\n- use a \\`uid\\` approach whenever possible rather than incremented Ids ; and make them normal strings !\nvery important :\n > avoid any postgres-hardcoded methods ie. for generating UIDs etc... ; logic for that stuff will come from nodejs functions !\n > do not generate UUIDs inside postgres ! that stuff will come from nodejs functions !\n\n- your current role is to make use of the provided task and analysis in order to design a perfect DB schemas for the app's MVP\n\ntry to outdo yourself by thinking of what might be omitted,\nand design super critically in order to make a comprehensive work for this app's MVP DB schemas\n\n---\n\n> note : if auth functionalities are present, use an architecture that will be compatible with a simple jwt auth system, which is very simply user and/or email strings(s) and password hash string !\n\n> very important : for the current purpose of the DB Schemas design, the environment will be a mock prototype environment\ndo not bother with security details etc, have the DB schema requirements for the mock prototype\n\n> if some ie. media entry types requires some path (ie. images, media, ...), assume usage of urls not local\n\n> aim for it to work on any default light postgres without any extra configs or plugins !\n\n---\n\nuse snake_case for any naming you do\n\n---\n\ngive a final, super comprehensive answer in strict, parseable YAML format,\nwhich will be perfectly ready for production and pushed to prod to thousands of users instantly and work flawlessly\nyour reply should start with : \"\\`\\`\\`yaml\" and end with \"\\`\\`\\`\"\n\nyou will be tipped $99999 + major company shares for nailing it perfectly off the bat\nyou are a genius`\n\t\t},\n\t\t{\n\t\t\t\"role\": \"user\",\n\t\t\t\"content\": `\\`\\`\\`PRD:product-requirements-document\n${prd}\n\\`\\`\\``\n\t\t},\n\t\t/*{\n\t\t\t\"role\": \"user\",\n\t\t\t\"content\": `\\`\\`\\`FRD:features-requirements-document\n${yaml.stringify(frd)}\n\\`\\`\\``\n\t\t},\n\t\t{\n\t\t\t\"role\": \"user\",\n\t\t\t\"content\": `\\`\\`\\`FJMD:features-journeys-map-document\n${yaml.stringify(fjmd)}\n\\`\\`\\``\n\t\t},*/\n\t\t{\n\t\t\t\"role\": \"user\",\n\t\t\t\"content\": `\\`\\`\\`DRD:database-requirements-document\n${drd}\n\\`\\`\\``\n\t\t},\t\t\n\t\t{\n\t\t\t\"role\": \"user\",\n\t\t\t\"content\": `Design the DB schemas in a comprehensive answer\nit is expected to be very comprehensive and detailed ; in a VALID PARSEABLE YAML format\n\nvery important :\n- avoid any postgres-hardcoded methods ie. for generating UIDs etc... make them normal strings\n- logic for that stuff will come from nodejs functions !\n- only use basic primitives like numbers, strings, json, etc ... no uuid types or special types etc\n- very important : only use basic primitives like numbers, strings, json, etc ... no uuid types or any special types etc ! very basic primitives only !\n\nyou're a genius`\n\t\t},\n\t]\n\n\tconst schemas = (\n\t\tawait context.run({\n\t\t\tid: \"op:LLM::GEN\",\n\t\t\tcontext: {\n\t\t\t\t...context, // {streams , project}\n\t\t\t\toperation: {\n\t\t\t\t\tkey: \"db.schemas\",\n\t\t\t\t\tmeta: {\n\t\t\t\t\t\tname: \"DB Schemas\",\n\t\t\t\t\t\tdesc: \"db tables schemas\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tdata: {\n\t\t\t\tmodel: `chatgpt-4o-latest`,//`gpt-4o`,\n\t\t\t\tmessages,\n\t\t\t\tpreparser: `backticks`,\n\t\t\t\tparser: `yaml`,\n\t\t\t}\n\t\t})\n\t).generated\n\n\tawait context.run({\n\t\tid: \"op:PROJECT::STATE:UPDATE\",\n\t\tcontext,\n\t\tdata: {\n\t\t\toperation: {\n\t\t\t\tid: \"db:schemas\",\n\t\t\t},\n\t\t\ttype: `end`,\n\t\t\tcontent: {\n\t\t\t\tkey: \"db.schemas\",\n\t\t\t\tdata: schemas,\n\t\t\t},\n\t\t}\n\t})\n\n\treturn { db : { schemas } }\n}\n\n\nexport default {\n\t\"DB:SCHEMAS::GENERATE\": dbSchemasGenerate,\n}\n"
  },
  {
    "path": "cofounder/api/system/functions/designer/layoutv1.js",
    "content": "import utils from \"@/utils/index.js\";\nimport yaml from \"yaml\";\nimport { merge } from \"lodash-es\";\nimport xml2js from \"xml2js\";\nimport sharp from \"sharp\";\n\nasync function promptGenerateAnalysis({ context, data }) {\n\t/*\n\t\ttask : { ... , rag[] }\n\t*/\n\tconst { view, rag, guidance } = data.task;\n\tconst _view = { ...view };\n\tdelete _view.type;\n\treturn [\n\t\t{\n\t\t\trole: \"system\",\n\t\t\tcontent: `your job is to make an extremely detailed analysis for a layout design for a desktop app UI based on provided specifications\n\ngreat super detailed UI and UX design task analysis\nthe UI design analysis will be the main reference for the app designers\n\n- start by reasoning and analyzing how the ui element should be layed out and distributed on the page\n  ask yourself :\n\n* what are all the sections required by this view, to make for a comprehensive design that covers all features ? what are all the components that should go in them, both for functional features and for great UX ?\n  what are all the requirements by each designed section and designed component to make for great UX ?\n* what are the best ways to distribute blocks in this UI view ?\n* how to go about making layout and ordering and distributing its block elements ? and which block elements ?\n* does it make the best choice for the app user in terms of UI/UX ?\n* how can i arrange and distribute these blocks in the section layout in the best way for the best UX/UI?\n* analysis criticism : how to make the design perfect ?\n\nbe extremely verbose in terms of spatial alignments and ui elements descriptions\n\n---\n\n> extremely important :\n> since you are working with primitives , you should be extremely detailed in your design elements !\n> do not slack in any detail in your analysis\n> think very slowly : all the elements and details that would make for a great UX !\n\n---\n\n> conduct the analysis first, reply with the analysis inside of \\`\\`\\`markdown\\`\\`\\`\n\nyou are a genius + you get $9999`,\n\t\t},\n\t\trag.length && {\n\t\t\trole: `user`,\n\t\t\tcontent: [\n\t\t\t\t{\n\t\t\t\t\ttype: `text`,\n\t\t\t\t\ttext: `for inspiration that may or may not help you with your analysis (use your best judgement),\nhere are some various screenshots of web apps that may have loosely similar sections to the view to design ;\n\nyou can use them as inspiration sources if you feel like it, and if you do, use that wisely after accurate analysis\nbut use your best judgement, you are not bound by them - only use them as inspiration if it makes sense in regards to designing the view UI`,\n\t\t\t\t},\n\t\t\t\t...rag,\n\t\t\t],\n\t\t},\n\t\tguidance &&\n\t\t\tguidance.ontology && {\n\t\t\t\trole: `user`,\n\t\t\t\tcontent: [\n\t\t\t\t\t{\n\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\ttext: `for your section design effort, your should refer to the following UI design system primitives ontology :\n\\`\\`\\`\n${yaml.stringify(guidance.ontology)}\n\\`\\`\\`\n`,\n\t\t\t\t\t},\n\t\t\t\t\tguidance.image &&\n\t\t\t\t\t\t(guidance.image?.url?.length ||\n\t\t\t\t\t\t\tguidance.image?.base64?.length ||\n\t\t\t\t\t\t\tguidance.image?.local?.length) && {\n\t\t\t\t\t\t\ttype: `image_url`,\n\t\t\t\t\t\t\timage_url: {\n\t\t\t\t\t\t\t\turl: guidance.image.url\n\t\t\t\t\t\t\t\t\t? guidance.image.url\n\t\t\t\t\t\t\t\t\t: guidance.image.base64\n\t\t\t\t\t\t\t\t\t\t? guidance.image.base64\n\t\t\t\t\t\t\t\t\t\t: guidance.image.local\n\t\t\t\t\t\t\t\t\t\t\t? `data:image/png;base64,${Buffer.from(fs.readFileSync(guidance.image.local)).toString(\"base64\")}`\n\t\t\t\t\t\t\t\t\t\t\t: \"\",\n\t\t\t\t\t\t\t\t// detail: `high`,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t].filter((e) => e),\n\t\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `designing the layout for the view id \"${view.id}\", specified in the following :\n\n\\`\\`\\`view:specifications\n${yaml.stringify(_view)}\n\\`\\`\\`\n\nthe layout design analysis should be very detailed , and cover UI details\n\nalthough , extremely important :\n\n> your analysis should be perfectly congruent with the features/data capabilities of the provided view details ;\ndo not hallucinate features that the view does not have !\nie. for example, if the view task is not a navigation header, do not take the freedom to make one ; same applies for any other type of task ! things would break ! respect the task and strictly the task !\n`,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `conduct the detailed analysis as the genius you are\n\nextremely important : design the provided view only ;\ndo not design non provided views (ie. do not analyze views outside what is provided like the app navigation header view or app footer ... stick to the task ) ;\nstick the provided view task to design and be very detailed in its design task analysis`,\n\t\t},\n\t].filter((item) => item);\n}\n\nasync function promptGenerateSvg({ context, data }) {\n\t/*\n\t\ttask : { ... , rag[] , analysis, guidance{} }\n\t*/\n\tconst { view, rag, analysis, guidance } = data.task;\n\tconst _view = { ...view };\n\tdelete _view.type;\n\treturn [\n\t\t{\n\t\t\trole: \"system\",\n\t\t\tcontent: `your job is to make a layout design for a desktop app UI based on provided description\ngreat UI and UX\n\nthe layout design mockup will be the main reference for the app designers\n\nthe layout format will be colored rectangles to identify how different components should be placed in a layout for the app view design\n\nit would be in this format:\n\n\\`\\`\\`svg\n<svg viewId=\"viewIdExample\" width=\"CANVAS_WIDTH\" height=\"CANVAS_HEIGHT\" xmlns=\"http://www.w3.org/2000/svg\" >\n  <rect primitiveId=\"example_primitive_id\" description=\"...\" x=\"X_VALUE\" y=\"Y_VALUE\" width=\"W_VALUE\" height=\"H_VALUE\" fill=\"#HEX\"></rect>\n  <rect primitiveId=\"some_other_primitive_id\" description=\"...\" x=\"X_VALUE\" y=\"Y_VALUE\" width=\"W_VALUE\" height=\"H_VALUE\" fill=\"#HEX\"></rect>\n  ...\n</svg>\n\\`\\`\\`\n\n---\n\n> pick different rectangle color fills as you wish, which will be temporarily used to differentiate between different blocks\n\n> you are not constrained by the order in which the blocks design system elements are provided (which is randomly ordered) ; you should use them in a way that makes the best sense in terms of UX for designers to implement later\n\n> you are ONLY TO MAKE:\n\n- THE RECTANGLES <rect> FOR PRIMITIVE BLOCKS and the {primitiveId} text alongside the {description}\n- no additional anything else whatsoever\n\n> the primitiveId should be coherent with the provided UI block primitives ontology\n> if a required block is not in the provided UI block primitives, set its primitiveId to \"nonprimitive\" !\n\n---\n\n- start by reasoning and analyzing how the element should be layed out and distributed on the page\n  ask yourself :\n\n* what are all the sections required by this view, to make for a comprehensive design that covers all features ?\n  what are all the requirements by each designed section and designed component to make for great UX ?\n* what are the best ways to distribute blocks in this UI view ?\n* how to go about making layout and ordering and distributing its block elements ? and which block elements ?\n* does it make the best choice for the app user in terms of UI/UX ?\n* how can i arrange and distribute these blocks in the section layout in the best way for the best UX/UI?\n* analysis criticism : how to make the design perfect ?\n\n---\n\nextremely important :\n> your mockup design should show the elements that are initially visible on the page !!\n> do not model transition states or triggered overlays, as such things would overshadow the elements underneath and fuck up the mockup layout render !!\n\n---\n\n> root <svg> node should have width , height values\n\tall <rect> elements should have x , y , width , height values\n\tall width , height values for all elements (root <svg> and <rect> nodes) should have positive nonzero integer values\n\n> extremely important : <svg> should only have <rect> nodes inside it, NO OTHER TYPE OF NODES ALLOWED, NO NESTING !!!\n> every <rect> node should have primitiveId property , which would be one of the provided primitiveId s\n> again, extremely important : <svg> should only have <rect> nodes inside it, NO OTHER TYPE OF NODES ALLOWED, NO NESTING !!!\n\n> extremely important : only use the provided primitiveIds !!! no hallucinated primitiveIds !\n\n---\n\n> extremely important :\n> since you are working with primitives , you should be extremely detailed in your design elements !\n> do not slack in any detail in your analysis or design svg implementation\n> think very slowly : all the elements that would make for a great UX !\n\n---\n\n> conduct the analysis first, reply with the analysis inside of \\`\\`\\`markdown\\`\\`\\`\n> then, answer in a strict SVG reply in \\`\\`\\`svg\\`\\`\\` based on your analysis\n\nyou are a genius + you get $9999`,\n\t\t},\n\t\trag.length && {\n\t\t\trole: `user`,\n\t\t\tcontent: [\n\t\t\t\t{\n\t\t\t\t\ttype: `text`,\n\t\t\t\t\ttext: `for inspiration that may or may not help you with your analysis (use your best judgement),\nhere are some various screenshots of web apps that may have loosely similar sections to the view to design ;\n\nyou can use them as inspiration sources if you feel like it, and if you do, use that wisely after accurate analysis\nbut use your best judgement, you are not bound by them - only use them as inspiration if it makes sense in regards to designing the view UI`,\n\t\t\t\t},\n\t\t\t\t...rag,\n\t\t\t],\n\t\t},\n\t\tguidance &&\n\t\t\tguidance.ontology && {\n\t\t\t\trole: `user`,\n\t\t\t\tcontent: [\n\t\t\t\t\t{\n\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\ttext: `for your section design effort, your should refer to the following UI design system primitives ontology:\n\\`\\`\\`\n${yaml.stringify(guidance.ontology)}\n\\`\\`\\`\n`,\n\t\t\t\t\t},\n\t\t\t\t\tguidance.image &&\n\t\t\t\t\t\t(guidance.image?.url?.length ||\n\t\t\t\t\t\t\tguidance.image?.base64?.length ||\n\t\t\t\t\t\t\tguidance.image?.local?.length) && {\n\t\t\t\t\t\t\ttype: `image_url`,\n\t\t\t\t\t\t\timage_url: {\n\t\t\t\t\t\t\t\turl: guidance.image.url\n\t\t\t\t\t\t\t\t\t? guidance.image.url\n\t\t\t\t\t\t\t\t\t: guidance.image.base64\n\t\t\t\t\t\t\t\t\t\t? guidance.image.base64\n\t\t\t\t\t\t\t\t\t\t: guidance.image.local\n\t\t\t\t\t\t\t\t\t\t\t? `data:image/png;base64,${Buffer.from(fs.readFileSync(guidance.image.local)).toString(\"base64\")}`\n\t\t\t\t\t\t\t\t\t\t\t: \"\",\n\t\t\t\t\t\t\t\t// detail: `high`,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t].filter((e) => e),\n\t\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `designing the layout for the view id \"${view.id}\", specified in the following :\n\n\\`\\`\\`view:specifications\n${yaml.stringify(_view)}\n\\`\\`\\`\n`,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `\\`\\`\\`view:design-task:detailed-analysis\n${analysis}\n\\`\\`\\`\n\nimportant :\n\n> your analysis should be perfectly congruent with the features/data capabilities of the provided view details ;\n> do not hallucinate features that the view does not have !\nie. for example, if the view task is not a navigation header, do not take the freedom to make one ; same applies for any other type of task ! things would break ! respect the task and strictly the task !\n\n`,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `make the analysis and spatial UI layout in SVG format as the genius UI designer you are\n\n> remember, you are designing for a desktop app !\n> you are designing the layout for the viewId : \"${view.id}\" !\n\n> extremely important :\n> since you are working with primitives , you should be extremely detailed in your design elements !\n> do not slack in any detail in your analysis\n> think very slowly : all the elements that would make for a great UX !\n\n---\n\n> you are only allowed to use the primitiveId s provided in the ontology ! you cannot make a primitiveId up outside of what is provided !\n> do not use a primitiveId that is not provided - and exactly as is, not a single character added or changed from the provided primitiveId s\n> the \"description\" fields are important to provide guidance for designers, write extended descriptions in them !\n\n---\n\nextremely important :\n> your mockup design should show the elements that are initially visible on the page !!\n> do not model transition states or overlays, as such things would overshadow the elements underneath and fuck up the mockup layout render !!\n\nagain, extremely important :\n> your mockup design should show the elements that are initially visible on the page !!\n> do not model transition states or overlays, as such things would overshadow the elements underneath and fuck up the mockup layout render !!\n\n---\n\nimportant :\n\n> your work is perfectly congruent with the features/data capabilities of the provided view details ;\n> do not hallucinate features that the view does not have !\n\n---\n\n> extremely important :\n> since you are working with primitives , you should be extremely detailed in your design elements !\n> do not slack in any detail in your analysis or design svg implementation\n> think very slowly : all the elements that would make for a great UX !\n\n---\n\n> conduct the analysis first, reply with the analysis inside of \\`\\`\\`markdown\\`\\`\\`\n> then, answer in a strict SVG reply in \\`\\`\\`svg\\`\\`\\` based on your analysis\n\nyou are a genius + you get $9999\n`,\n\t\t},\n\t].filter((item) => item);\n}\n\nasync function designerLayoutv1ViewGenerate({ context, data }) {\n\t/*\n\t\tdata : {\n\t\t\t...data,\n\t\t\ttask : {\n\t\t\t\ttype: \"view\",\n        view: {\n\t\t\t\t\ttype : \"unique || shared\",\n\t\t\t\t\tid\n\t\t\t\t\tdetails{}, // uxsitemap desc stuff\n\t\t\t\t\tdatamap:{}, // data stuff\n\t\t\t\t},\n\t\t\t},\n\t\t\twebapp: {\n\n\t\t\t},\n\t\t}\n\t*/\n\tconst { task, timestamp } = data;\n\tconst { view } = task;\n\n\t// rag , if available\n\tconst ragText = `Title : ${view.details.title}\\nDescription: ${view.details.extendedDescription}\\nRole: ${view.details.role}`;\n\n\tlet rag = (\n\t\tawait context.run({\n\t\t\tid: `op:INDEXDB::QUERY`,\n\t\t\tcontext,\n\t\t\tdata: {\n\t\t\t\tindex: \"layouts\",\n\t\t\t\ttext: ragText,\n\t\t\t\tamount: 5,\n\t\t\t},\n\t\t})\n\t).results\n\t\t.filter((result) => result?.url?.length || result?.base64?.length)\n\t\t.map((result) => {\n\t\t\treturn {\n\t\t\t\ttype: `image_url`,\n\t\t\t\timage_url: {\n\t\t\t\t\turl: result?.url?.length\n\t\t\t\t\t\t? result.url\n\t\t\t\t\t\t: result?.base64?.length\n\t\t\t\t\t\t\t? result.base64\n\t\t\t\t\t\t\t: \"\",\n\t\t\t\t},\n\t\t\t};\n\t\t});\n\n\t// verify,validate rag images sizes\n\trag = (\n\t\tawait Promise.all(\n\t\t\trag.map(async (item) => {\n\t\t\t\tconst { url } = item.image_url;\n\t\t\t\ttry {\n\t\t\t\t\tlet buffer;\n\t\t\t\t\tif (url.startsWith(\"data:image/\")) {\n\t\t\t\t\t\t// Handle base64 image\n\t\t\t\t\t\tconst base64Data = url.split(\"base64,\")[1];\n\t\t\t\t\t\tbuffer = Buffer.from(base64Data, \"base64\");\n\t\t\t\t\t} else if (url.startsWith(\"https://\")) {\n\t\t\t\t\t\t// Handle URL image\n\t\t\t\t\t\tconst response = await fetch(url);\n\t\t\t\t\t\tif (!response.ok) {\n\t\t\t\t\t\t\tconsole.error(`designer:layoutv1:rag : failed to fetch image`);\n\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst arrayBuffer = await response.arrayBuffer();\n\t\t\t\t\t\tbuffer = Buffer.from(arrayBuffer);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Invalid URL format, return null to filter out later\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Check image size using byteLength method\n\t\t\t\t\tif (Buffer.byteLength(buffer) > 4.5 * 1024 * 1024) {\n\t\t\t\t\t\t// 4.5 MB in bytes\n\t\t\t\t\t\tconsole.error(`> skipping : image size exceeds 4.5 MB`);\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst metadata = await sharp(buffer).metadata();\n\n\t\t\t\t\t// Check image dimensions\n\t\t\t\t\tif (\n\t\t\t\t\t\tmetadata.width >= 8000 ||\n\t\t\t\t\t\tmetadata.height >= 8000 ||\n\t\t\t\t\t\tmetadata.width <= 0 ||\n\t\t\t\t\t\tmetadata.height <= 0\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn null; // Return null if dimensions are invalid\n\t\t\t\t\t}\n\t\t\t\t\treturn item;\n\t\t\t\t} catch (error) {\n\t\t\t\t\tconsole.error(`> skipping : error processing RAG image : `, error);\n\t\t\t\t\treturn null; // Return null if there's an error\n\t\t\t\t}\n\t\t\t}),\n\t\t)\n\t)\n\t\t.filter((item) => item)\n\t\t.slice(0, 3); // fetched more than needed in case size filtered ; typically indexed landing pages dims can be too big\n\n\tdata.task.rag = rag;\n\n\t// design system guidance , if available\n\tlet guidance;\n\ttry {\n\t\tguidance = await utils.render.guidance.grid.primitives({\n\t\t\t// determined from process.env in utils/render ... designSystem: designSystem ? designSystem : `presets/protoboy-v1`,\n\t\t\tcache: true,\n\t\t}); // -> { ontology , image{base64,url?} }\n\t} catch (e) {\n\t\tconsole.error(e);\n\t}\n\tdata.task.guidance = guidance;\n\n\tconst analysisPassMessages = await promptGenerateAnalysis({\n\t\tcontext,\n\t\tdata,\n\t});\n\n\t// console.dir({ \"debug:designer:layoutv1\": { analysisPassMessages }},{depth:null})\n\n\tconst analysisPass = (\n\t\tawait context.run({\n\t\t\tid: \"op:LLM::GEN\",\n\t\t\tcontext: {\n\t\t\t\t...context, // {streams , project}\n\t\t\t\toperation: {\n\t\t\t\t\tkey: `designer.layoutv1.analysis.${view.id}`,\n\t\t\t\t\tmeta: {\n\t\t\t\t\t\tname: `Designer Analysis { ${view.id} }`,\n\t\t\t\t\t\tdesc: \"designer/layoutv1 task analysis\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tdata: {\n\t\t\t\tmodel: `chatgpt-4o-latest`, //`gpt-4o`,\n\t\t\t\tmessages: analysisPassMessages,\n\t\t\t\tpreparser: `backticks`,\n\t\t\t\tparser: false,\n\t\t\t},\n\t\t})\n\t).generated;\n\n\tdata.task.analysis = analysisPass;\n\n\tconst svgPassMessages = await promptGenerateSvg({ context, data });\n\tconst svgPass = (\n\t\tawait context.run({\n\t\t\tid: \"op:LLM::GEN\",\n\t\t\tcontext: {\n\t\t\t\t...context, // {streams , project}\n\t\t\t\toperation: {\n\t\t\t\t\tkey: `designer.layoutv1.mockup.${view.id}`,\n\t\t\t\t\tmeta: {\n\t\t\t\t\t\tname: `Designer Mockup { ${view.id} }`,\n\t\t\t\t\t\tdesc: \"designer/layoutv1 mockup generation\",\n\t\t\t\t\t},\n\t\t\t\t\tcutoff: \"```svg\",\n\t\t\t\t},\n\t\t\t},\n\t\t\tdata: {\n\t\t\t\tmodel: `chatgpt-4o-latest`, //`gpt-4o`,\n\t\t\t\tmessages: svgPassMessages,\n\t\t\t\tpreparser: false,\n\t\t\t\tparser: false,\n\t\t\t},\n\t\t})\n\t).generated;\n\n\t// raw svg string in response\n\tlet response = await utils.parsers.extract.backticksMultiple({\n\t\ttext: svgPass,\n\t\tdelimiters: [`markdown`, `svg`],\n\t});\n\n\tif (!response.svg.length)\n\t\tthrow new Error(\"designer:layoutv1:generate error - generated svg is empty\");\n\tresponse.svg = response.svg.replaceAll(\"&\", \" \"); // <---- & char crashes svg\n\n\t// validate svg?\n\tlet svg = {};\n\ttry {\n\t\tsvg = await xml2js.parseStringPromise(response.svg, {\n\t\t\texplicitArray: true,\n\t\t});\n\t\t// console.dir({ \"debug:designer:layoutv1:svg\": svg }, { depth: null });\n\t\tif (!svg.svg.rect.filter((item) => item.$?.primitiveId).length) {\n\t\t\tconsole.error(`layout error : generated != task ; skipping`);\n\t\t}\n\t} catch (e) {\n\t\tconsole.error(e);\n\t}\n\n\tlet render = {};\n\ttry {\n\t\trender = await context.run({\n\t\t\tid: \"op:RENDER::LAYOUT\",\n\t\t\tcontext,\n\t\t\tdata: {\n\t\t\t\tsvg: { string: response.svg },\n\t\t\t\tmode: task.type,\n\t\t\t},\n\t\t}); // -> { svg , image{base64,url?,local?,buffer?} }\n\t} catch (e) {\n\t\tconsole.error(e);\n\t}\n\n\t// rely on local storage as loading strategy further down, else might dump base64strings to yaml ...\n\tif (render.image?.base64) delete render.image.base64;\n\tif (render.image?.buffer) delete render.image.buffer;\n\n\tconst generatedLayout = {\n\t\tanalysis: analysisPass,\n\t\trender,\n\t};\n\n\tawait Promise.all(\n\t\t[`${timestamp}`, `latest`].map(async (version) => {\n\t\t\tawait context.run({\n\t\t\t\tid: \"op:PROJECT::STATE:UPDATE\",\n\t\t\t\tcontext,\n\t\t\t\tdata: {\n\t\t\t\t\toperation: {\n\t\t\t\t\t\tid: `webapp:layout:views`,\n\t\t\t\t\t\trefs: {\n\t\t\t\t\t\t\tid: view.id,\n\t\t\t\t\t\t\tversion,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\ttype: `end`,\n\t\t\t\t\tcontent: {\n\t\t\t\t\t\tkey: `webapp.layout.views.${view.id}.${version}`,\n\t\t\t\t\t\tdata: generatedLayout,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t});\n\t\t}),\n\t);\n\n\t/*\n\t\tshould return the RAG object and guidance too, will be used in code ? (not sure)\n\t*/\n\treturn {\n\t\tdesigner: {\n\t\t\trag,\n\t\t\tguidance,\n\t\t},\n\t\twebapp: {\n\t\t\tlayout: {\n\t\t\t\tviews: {\n\t\t\t\t\t[view.id]: {\n\t\t\t\t\t\t[timestamp]: generatedLayout,\n\t\t\t\t\t\tlatest: generatedLayout,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t};\n}\n\nasync function promptIterateSvg({ context, data }) {\n\t/*\n\t\tone pass with both analysis + svg\n\t*/\n\t/*\n\t\ttask : { ... , rag[] , analysis, guidance{} }\n\t*/\n\tconst { view, iteration, rag, analysis, guidance } = data.task;\n\tconst { notes, screenshot } = iteration;\n\tconst _view = { ...view };\n\tdelete _view.type;\n\tdelete _view.tsx;\n\n\treturn [\n\t\t{\n\t\t\trole: \"system\",\n\t\t\tcontent: `your job is to make a new layout design for a desktop app UI view based on provided instructions\ngreat UI and UX\n\nthe layout design mockup will be the main reference for the app designers to redesign the provided component\n\nthe layout format will be colored rectangles to identify how different components should be placed in a layout for the app view design\n\nit would be in this format:\n\n\\`\\`\\`svg\n<svg viewId=\"viewIdExample\" width=\"CANVAS_WIDTH\" height=\"CANVAS_HEIGHT\" xmlns=\"http://www.w3.org/2000/svg\" >\n  <rect primitiveId=\"example_primitive_id\" description=\"...\" x=\"X_VALUE\" y=\"Y_VALUE\" width=\"W_VALUE\" height=\"H_VALUE\" fill=\"#HEX\"></rect>\n  <rect primitiveId=\"some_other_primitive_id\" description=\"...\" x=\"X_VALUE\" y=\"Y_VALUE\" width=\"W_VALUE\" height=\"H_VALUE\" fill=\"#HEX\"></rect>\n  ...\n</svg>\n\\`\\`\\`\n\n---\n\n> pick different rectangle color fills as you wish, which will be temporarily used to differentiate between different blocks\n\n> you are not constrained by the order in which the blocks design system elements are provided (which is randomly ordered) ; you should use them in a way that makes the best sense in terms of UX for designers to implement later\n\n> you are ONLY TO MAKE:\n\n- THE RECTANGLES <rect> FOR PRIMITIVE BLOCKS and the {primitiveId} text alongside the {description}\n- no additional anything else whatsoever\n\n> the primitiveId should be coherent with the provided UI block primitives ontology\n> if a required block is not in the provided UI block primitives, set its primitiveId to \"nonprimitive\" !\n\n---\n\n- start by reasoning and analyzing how the element should be layed out and distributed on the page\n  ask yourself :\n\n* what are all the sections required by this view, to make for a comprehensive design that covers all features ?\n  what are all the requirements by each designed section and designed component to make for great UX ?\n* what are the best ways to distribute blocks in this UI view ?\n* how to go about making layout and ordering and distributing its block elements ? and which block elements ?\n* does it make the best choice for the app user in terms of UI/UX ?\n* how can i arrange and distribute these blocks in the section layout in the best way for the best UX/UI?\n* analysis criticism : how to make the design perfect ?\n\n---\n\nextremely important :\n> your mockup design should show the elements that are initially visible on the page !!\n> do not model transition states or triggered overlays, as such things would overshadow the elements underneath and fuck up the mockup layout render !!\n\n---\n\n> root <svg> node should have width , height values\n\tall <rect> elements should have x , y , width , height values\n\tall width , height values for all elements (root <svg> and <rect> nodes) should have positive nonzero integer values\n\n> extremely important : <svg> should only have <rect> nodes inside it, NO OTHER TYPE OF NODES ALLOWED, NO NESTING !!!\n> every <rect> node should have primitiveId property , which would be one of the provided primitiveId s\n> again, extremely important : <svg> should only have <rect> nodes inside it, NO OTHER TYPE OF NODES ALLOWED, NO NESTING !!!\n\n> extremely important : only use the provided primitiveIds !!! no hallucinated primitiveIds !\n\n---\n\n> extremely important :\n> since you are working with primitives , you should be extremely detailed in your design elements !\n> do not slack in any detail in your analysis or design svg implementation\n> think very slowly : all the elements that would make for a great UX !\n\n---\n\n> conduct the analysis first, reply with the analysis inside of \\`\\`\\`markdown\\`\\`\\`\n> then, answer in a strict SVG reply in \\`\\`\\`svg\\`\\`\\` based on your analysis\n\nyou are a genius + you get $9999`,\n\t\t},\n\t\tscreenshot &&\n\t\t\t(screenshot?.url?.length ||\n\t\t\t\tscreenshot?.base64?.length ||\n\t\t\t\tscreenshot?.local?.length) && {\n\t\t\t\trole: `user`,\n\t\t\t\tcontent: [\n\t\t\t\t\t{\n\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\ttext: `a screenshot of the current view render that you are tasked to redesign based on provided instructions :\t`,\n\t\t\t\t\t},\n\t\t\t\t\tscreenshot &&\n\t\t\t\t\t\t(screenshot?.url?.length ||\n\t\t\t\t\t\t\tscreenshot?.base64?.length ||\n\t\t\t\t\t\t\tscreenshot?.local?.length) && {\n\t\t\t\t\t\t\ttype: `image_url`,\n\t\t\t\t\t\t\timage_url: {\n\t\t\t\t\t\t\t\turl: screenshot.url\n\t\t\t\t\t\t\t\t\t? screenshot.url\n\t\t\t\t\t\t\t\t\t: screenshot.base64\n\t\t\t\t\t\t\t\t\t\t? screenshot.base64\n\t\t\t\t\t\t\t\t\t\t: screenshot.local\n\t\t\t\t\t\t\t\t\t\t\t? `data:image/png;base64,${Buffer.from(fs.readFileSync(render.image.local)).toString(\"base64\")}`\n\t\t\t\t\t\t\t\t\t\t\t: \"\",\n\t\t\t\t\t\t\t\t// detail: `high`,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t].filter((e) => e),\n\t\t\t},\n\t\trag.length && {\n\t\t\trole: `user`,\n\t\t\tcontent: [\n\t\t\t\t{\n\t\t\t\t\ttype: `text`,\n\t\t\t\t\ttext: `for inspiration that may or may not help you with your analysis to redesign the view UI (use your best judgement),\nhere are some various screenshots of web apps that may have loosely similar sections to the view you are tasked to redesign ;\n\nyou can use them as inspiration sources in various ways if you feel like it, and if you do, use that wisely after accurate analysis\nbut use your best judgement, you are not bound by them - only use them as inspiration if it makes sense in regards to making a new design for the view UI`,\n\t\t\t\t},\n\t\t\t\t...rag,\n\t\t\t],\n\t\t},\n\t\tguidance &&\n\t\t\tguidance.ontology && {\n\t\t\t\trole: `user`,\n\t\t\t\tcontent: [\n\t\t\t\t\t{\n\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\ttext: `for your section design effort, your should refer to the following UI design system primitives ontology:\n\\`\\`\\`\n${yaml.stringify(guidance.ontology)}\n\\`\\`\\`\n`,\n\t\t\t\t\t},\n\t\t\t\t\tguidance.image &&\n\t\t\t\t\t\t(guidance.image?.url?.length ||\n\t\t\t\t\t\t\tguidance.image?.base64?.length ||\n\t\t\t\t\t\t\tguidance.image?.local?.length) && {\n\t\t\t\t\t\t\ttype: `image_url`,\n\t\t\t\t\t\t\timage_url: {\n\t\t\t\t\t\t\t\turl: guidance.image.url\n\t\t\t\t\t\t\t\t\t? guidance.image.url\n\t\t\t\t\t\t\t\t\t: guidance.image.base64\n\t\t\t\t\t\t\t\t\t\t? guidance.image.base64\n\t\t\t\t\t\t\t\t\t\t: guidance.image.local\n\t\t\t\t\t\t\t\t\t\t\t? `data:image/png;base64,${Buffer.from(fs.readFileSync(guidance.image.local)).toString(\"base64\")}`\n\t\t\t\t\t\t\t\t\t\t\t: \"\",\n\t\t\t\t\t\t\t\t// detail: `high`,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t].filter((e) => e),\n\t\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `you are redesigning the layout for the view id \"${view.id}\", specified in the following :\n\n\\`\\`\\`view:specifications\n${yaml.stringify(_view)}\n\\`\\`\\`\n`,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `the main redesign task instructions - the most important part of your task - are specified in the following :\n\n\\`\\`\\`view:redesign-task:instructions\n${notes.text}\n\\`\\`\\`\n\nimportant :\n\n> your analysis should be perfectly congruent with the features/data capabilities of the provided view details ;\n> do not hallucinate features that the view does not have !\nie. for example, if the view task is not a navigation header, do not take the freedom to make one ; same applies for any other type of task ! things would break ! respect the task and strictly the task !\n\n`,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `make the analysis and spatial UI layout in SVG format as the genius UI designer you are\n\n> remember, you are designing for a desktop app !\n> you are making a new design layout for the viewId : \"${view.id}\" !\n\n> extremely important :\n> since you are working with primitives , you should be extremely detailed in your design elements !\n> do not slack in any detail in your analysis\n> think very slowly : all the elements that would make for a great UX !\n\n---\n\n> you are only allowed to use the primitiveId s provided in the ontology ! you cannot make a primitiveId up outside of what is provided !\n> do not use a primitiveId that is not provided - and exactly as is, not a single character added or changed from the provided primitiveId s\n> the \"description\" fields are important to provide guidance for designers, write extended descriptions in them !\n\n---\n\nextremely important :\n> your mockup design should show the elements that are initially visible on the page !!\n> do not model transition states or overlays, as such things would overshadow the elements underneath and fuck up the mockup layout render !!\n\nagain, extremely important :\n> your mockup design should show the elements that are initially visible on the page !!\n> do not model transition states or overlays, as such things would overshadow the elements underneath and fuck up the mockup layout render !!\n\n---\n\nimportant :\n\n> your work is perfectly congruent with the features/data capabilities of the provided view details ;\n> do not hallucinate features that the view does not have !\n\n---\n\n> extremely important :\n> since you are working with primitives , you should be extremely detailed in your design elements !\n> do not slack in any detail in your analysis or design svg implementation\n> think very slowly : all the elements that would make for a great UX !\n\n---\n\n> conduct the analysis first, reply with the analysis inside of \\`\\`\\`markdown\\`\\`\\`\n> then, answer in a strict SVG reply in \\`\\`\\`svg\\`\\`\\` based on your analysis\n\nyou are a genius + you get $9999\n`,\n\t\t},\n\t].filter((item) => item);\n}\nasync function designerLayoutv1ViewIterate({ context, data }) {\n\tconst { task, timestamp } = data;\n\tconst { view, iteration } = task;\n\tconst { notes } = iteration;\n\n\t// rag , if available\n\tconst ragText =\n\t\t`Title : ${view.details.title}\\nDescription: ${view.details.extendedDescription}\\nRole: ${view.details.role}` +\n\t\t`\\nDesign: ${notes.text}`;\n\n\tlet rag = (\n\t\tawait context.run({\n\t\t\tid: `op:INDEXDB::QUERY`,\n\t\t\tcontext,\n\t\t\tdata: {\n\t\t\t\tindex: \"layouts\",\n\t\t\t\ttext: ragText,\n\t\t\t\tamount: 5,\n\t\t\t},\n\t\t})\n\t).results\n\t\t.filter((result) => result?.url?.length || result?.base64?.length)\n\t\t.map((result) => {\n\t\t\treturn {\n\t\t\t\ttype: `image_url`,\n\t\t\t\timage_url: {\n\t\t\t\t\turl: result?.url?.length\n\t\t\t\t\t\t? result.url\n\t\t\t\t\t\t: result?.base64?.length\n\t\t\t\t\t\t\t? result.base64\n\t\t\t\t\t\t\t: \"\",\n\t\t\t\t},\n\t\t\t};\n\t\t});\n\n\t// verify,validate rag images sizes\n\trag = (\n\t\tawait Promise.all(\n\t\t\trag.map(async (item) => {\n\t\t\t\tconst { url } = item.image_url;\n\t\t\t\ttry {\n\t\t\t\t\tlet buffer;\n\t\t\t\t\tif (url.startsWith(\"data:image/\")) {\n\t\t\t\t\t\t// Handle base64 image\n\t\t\t\t\t\tconst base64Data = url.split(\"base64,\")[1];\n\t\t\t\t\t\tbuffer = Buffer.from(base64Data, \"base64\");\n\t\t\t\t\t} else if (url.startsWith(\"https://\")) {\n\t\t\t\t\t\t// Handle URL image\n\t\t\t\t\t\tconst response = await fetch(url);\n\t\t\t\t\t\tif (!response.ok) {\n\t\t\t\t\t\t\tconsole.error(`designer:layoutv1:rag : failed to fetch image`);\n\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst arrayBuffer = await response.arrayBuffer();\n\t\t\t\t\t\tbuffer = Buffer.from(arrayBuffer);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Invalid URL format, return null to filter out later\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Check image size\n\t\t\t\t\tif (Buffer.byteLength(buffer) > 4.5 * 1024 * 1024) {\n\t\t\t\t\t\t// 4.5 MB in bytes\n\t\t\t\t\t\tconsole.error(`> skipping : image size exceeds 4.5 MB`);\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst metadata = await sharp(buffer).metadata();\n\n\t\t\t\t\t// Check image dimensions\n\t\t\t\t\tif (\n\t\t\t\t\t\tmetadata.width >= 8000 ||\n\t\t\t\t\t\tmetadata.height >= 8000 ||\n\t\t\t\t\t\tmetadata.width <= 0 ||\n\t\t\t\t\t\tmetadata.height <= 0\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn null; // Return null if dimensions are invalid\n\t\t\t\t\t}\n\t\t\t\t\treturn item;\n\t\t\t\t} catch (error) {\n\t\t\t\t\tconsole.error(`> skipping : error processing RAG image`, error);\n\t\t\t\t\treturn null; // Return null if there's an error\n\t\t\t\t}\n\t\t\t}),\n\t\t)\n\t)\n\t\t.filter((item) => item !== null)\n\t\t.slice(0, 3); // fetched more than needed in case size filtered ; typically indexed landing pages dims can be too big\n\n\tdata.task.rag = rag;\n\n\t// design system guidance , if available\n\tlet guidance;\n\ttry {\n\t\tguidance = await utils.render.guidance.grid.primitives({\n\t\t\t// determined from process.env in utils/render ... designSystem: designSystem ? designSystem : `presets/protoboy-v1`,\n\t\t\tcache: true,\n\t\t}); // -> { ontology , image{base64,url?} }\n\t} catch (e) {\n\t\tconsole.error(e);\n\t}\n\tdata.task.guidance = guidance;\n\n\tconst svgIterateMessages = await promptIterateSvg({ context, data });\n\tconst svgPass = (\n\t\tawait context.run({\n\t\t\tid: \"op:LLM::GEN\",\n\t\t\tcontext: {\n\t\t\t\t...context, // {streams , project}\n\t\t\t\toperation: {\n\t\t\t\t\tkey: `designer.layoutv1.mockup.${view.id}`,\n\t\t\t\t\tmeta: {\n\t\t\t\t\t\tname: `Designer Mockup { ${view.id} }`,\n\t\t\t\t\t\tdesc: \"designer/layoutv1 mockup generation\",\n\t\t\t\t\t},\n\t\t\t\t\tcutoff: \"```svg\",\n\t\t\t\t},\n\t\t\t},\n\t\t\tdata: {\n\t\t\t\tmodel: `chatgpt-4o-latest`, //`gpt-4o`,\n\t\t\t\tmessages: svgIterateMessages,\n\t\t\t\tpreparser: false,\n\t\t\t\tparser: false,\n\t\t\t},\n\t\t})\n\t).generated;\n\n\t// raw svg string in response\n\tlet response = await utils.parsers.extract.backticksMultiple({\n\t\ttext: svgPass,\n\t\tdelimiters: [`markdown`, `svg`],\n\t});\n\n\tif (!response.svg.length)\n\t\tthrow new Error(\"designer:layoutv1:iterate error - generated svg is empty\");\n\tresponse.svg = response.svg.replaceAll(\"&\", \" \"); // <---- & char crashes svg\n\n\t// validate svg?\n\tlet svg = {};\n\ttry {\n\t\tsvg = await xml2js.parseStringPromise(response.svg, {\n\t\t\texplicitArray: true,\n\t\t});\n\t\t// console.dir({ \"debug:designer:layoutv1:svg\": svg }, { depth: null });\n\t\tif (!svg.svg.rect.filter((item) => item.$?.primitiveId).length) {\n\t\t\tconsole.error(`layout error : generated != task ; skipping`);\n\t\t}\n\t} catch (e) {\n\t\tconsole.error(e);\n\t}\n\n\tlet render = {};\n\ttry {\n\t\trender = await context.run({\n\t\t\tid: \"op:RENDER::LAYOUT\",\n\t\t\tcontext,\n\t\t\tdata: {\n\t\t\t\tsvg: { string: response.svg },\n\t\t\t\tmode: task.type,\n\t\t\t},\n\t\t}); // -> { svg , image{base64,url?,local?,buffer?} }\n\t} catch (e) {\n\t\tconsole.error(e);\n\t}\n\n\t// rely on local storage as loading strategy further down, else might dump base64strings to yaml ...\n\tif (render.image?.base64) delete render.image.base64;\n\tif (render.image?.buffer) delete render.image.buffer;\n\n\tconst generatedLayout = {\n\t\tanalysis: response.markdown,\n\t\trender,\n\t};\n\n\tawait Promise.all(\n\t\t[`${timestamp}`, `latest`].map(async (version) => {\n\t\t\tawait context.run({\n\t\t\t\tid: \"op:PROJECT::STATE:UPDATE\",\n\t\t\t\tcontext,\n\t\t\t\tdata: {\n\t\t\t\t\toperation: {\n\t\t\t\t\t\tid: `webapp:layout:views`,\n\t\t\t\t\t\trefs: {\n\t\t\t\t\t\t\tid: view.id,\n\t\t\t\t\t\t\tversion,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\ttype: `end`,\n\t\t\t\t\tcontent: {\n\t\t\t\t\t\tkey: `webapp.layout.views.${view.id}.${version}`,\n\t\t\t\t\t\tdata: generatedLayout,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t});\n\t\t}),\n\t);\n\n\t/*\n\t\tshould return the RAG object and guidance too, will be used in code ? (not sure)\n\t*/\n\treturn {\n\t\tdesigner: {\n\t\t\trag,\n\t\t\tguidance,\n\t\t},\n\t\twebapp: {\n\t\t\tlayout: {\n\t\t\t\tviews: {\n\t\t\t\t\t[view.id]: {\n\t\t\t\t\t\t[timestamp]: generatedLayout,\n\t\t\t\t\t\tlatest: generatedLayout,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t};\n}\n\nexport default {\n\t\"DESIGNER:LAYOUTV1::VIEW:GENERATE\": designerLayoutv1ViewGenerate,\n\t\"DESIGNER:LAYOUTV1::VIEW:ITERATE\": designerLayoutv1ViewIterate,\n};\n"
  },
  {
    "path": "cofounder/api/system/functions/op/convert.js",
    "content": "import utils from \"@/utils/index.js\";\n\nasync function opConvertMarkdownPdf({ context, data }) {\n\t/* ;; op:CONVERT::MARKDOWN:PDF\n\t\t{markdown} -> {pdf {base64 , url(cloudstorage) } }\n\n\n\n\t*/\n\n\treturn {};\n}\n\nexport default {\n\t\"op:CONVERT::MARKDOWN:PDF\": opConvertMarkdownPdf,\n};\n"
  },
  {
    "path": "cofounder/api/system/functions/op/indexdb.js",
    "content": "import utils from \"@/utils/index.js\";\nimport axios from \"axios\";\nimport dotenv from \"dotenv\";\ndotenv.config();\n\nasync function opIndexdbQuery({ context, data }) {\n\t/* ;; op:INDEXDB::QUERY\n    query from vector db ; currently one local index, later more indices, from url\n\n    in: {text,vector,amount} // either text or vector\n    out: {results}\n  */\n\t/*\n\t\tadd .env RAG_REMOTE_ENABLE = TRUE\n\t\tlater retest for local, esp when empty\n */\n\tconst { index, text, vector, amount } = data;\n\tlet results = [];\n\tif (\n\t\tprocess.env.RAG_REMOTE_ENABLE &&\n\t\tJSON.parse(process.env.RAG_REMOTE_ENABLE.toLowerCase()) &&\n\t\tprocess.env.COFOUNDER_API_KEY?.length &&\n\t\tprocess.env.COFOUNDER_API_KEY != \"REPLACE_WITH_COFOUNDER.OPENINTERFACE.AI_KEY\"\n\t) {\n\t\ttry {\n\t\t\tconst response = await axios.post(\n\t\t\t\t`https://api.openinterface.ai/cofounder/alpha/dev/rag/${index}`,\n\t\t\t\t{\n\t\t\t\t\tvector: vector\n\t\t\t\t\t\t? vector\n\t\t\t\t\t\t: (\n\t\t\t\t\t\t\t\tawait context.run({\n\t\t\t\t\t\t\t\t\tid: `op:LLM::VECTORIZE`,\n\t\t\t\t\t\t\t\t\tcontext,\n\t\t\t\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\t\t\t\ttexts: [text],\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t).vectors[0],\n\t\t\t\t\tamount,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\theaders: {\n\t\t\t\t\t\tAuthorization: `Bearer ${process.env.COFOUNDER_API_KEY}`,\n\t\t\t\t\t},\n\t\t\t\t\ttimeout: 30000, // 30 seconds timeout\n\t\t\t\t},\n\t\t\t);\n\t\t\treturn response.data;\n\t\t} catch (error) {\n\t\t\tconsole.error(error);\n\t\t\treturn { results: [] };\n\t\t}\n\t}\n\ttry {\n\t\t// to avoid vectorizing for nothing\n\t\tif (!utils.vectra.indexed) return { results: [] };\n\t\treturn {\n\t\t\tresults: await utils.vectra.query({\n\t\t\t\tvector: vector\n\t\t\t\t\t? vector\n\t\t\t\t\t: (\n\t\t\t\t\t\t\tawait context.run({\n\t\t\t\t\t\t\t\tid: `op:LLM::VECTORIZE`,\n\t\t\t\t\t\t\t\tcontext,\n\t\t\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\t\t\ttexts: [text],\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t).vectors[0],\n\t\t\t\tamount,\n\t\t\t}),\n\t\t};\n\t} catch (e) {\n\t\tfalse;\n\t}\n\treturn { results: [] };\n}\nexport default {\n\t\"op:INDEXDB::QUERY\": opIndexdbQuery,\n};\n"
  },
  {
    "path": "cofounder/api/system/functions/op/llm.js",
    "content": "import utils from \"@/utils/index.js\";\nimport dotenv from \"dotenv\";\ndotenv.config();\n\nasync function opLlmGen({ context, data }) {\n\t/* ;; op:LLM::GEN\n\t\t{model,messages,preparser,parser,...} -> { response , tokens (consumption) }\n\n\t\tin : [\"model\",\"messages\",\"preparser\",\"parser\",\"query\",\"stream\"]\n\t\tout : [\"generated\",\"usage\"]\n\t*/\n\t/*\n\t\tformats ;;\n\t\t\tpreparser : async ({text}) -> generated\n\t\t\tparser : async ({generated,query})\n\t*/\n\n\tlet { model, messages, preparser, parser, validate, query, stream } = data;\n\tconst { project, operation, streams } = context;\n\n\tif (operation?.key && streams) {\n\t\tawait streams.start({\n\t\t\tproject,\n\t\t\tkey: operation.key,\n\t\t\tmeta: operation.meta,\n\t\t});\n\t\tstream = {\n\t\t\twrite: async (data) => {\n\t\t\t\tstreams.write({\n\t\t\t\t\tproject,\n\t\t\t\t\tkey: operation.key,\n\t\t\t\t\tdata,\n\t\t\t\t});\n\t\t\t},\n\t\t\tcutoff: operation?.cutoff ? operation.cutoff : false,\n\t\t};\n\t}\n\tif (!stream) stream = process.stdout;\n\n\tif (process.env.COFOUNDER_NICKNAME?.length) {\n\t\tmessages[0].content = `you are : ${process.env.COFOUNDER_NICKNAME}\\n${messages[0].content}`;\n\t}\n\n\tif (!preparser) {\n\t\tpreparser = async ({ text }) => {\n\t\t\treturn { text };\n\t\t};\n\t} else if (preparser === `backticks`) {\n\t\tpreparser = utils.parsers.extract.backticks; // most likely to be used\n\t}\n\n\tif (!parser) {\n\t\tparser = async ({ generated, query }) => {\n\t\t\treturn generated.text;\n\t\t};\n\t} else if (parser === `yaml`) {\n\t\tparser = utils.parsers.parse.yaml;\n\t}\n\n\tconst llm_fn = !process.env.LLM_PROVIDER\n\t\t? utils.openai.inference\n\t\t: process.env.LLM_PROVIDER.toLowerCase() === \"openai\"\n\t\t\t? utils.openai.inference\n\t\t\t: utils.anthropic.inference;\n\n\tconst { text, usage } = await llm_fn({\n\t\tmodel: model,\n\t\tmessages,\n\t\tstream,\n\t});\n\n\tif (operation && streams) {\n\t\tawait streams.end({\n\t\t\tproject,\n\t\t\tkey: operation.key,\n\t\t});\n\t}\n\n\tconst generated_pre = await preparser({ text }); // -> typically { text : \"... extracted text ...\" }\n\tconst generated_post = await parser({\n\t\tgenerated: generated_pre,\n\t\tquery,\n\t});\n\n\tif (validate) {\n\t\ttry {\n\t\t\tawait validate({ generated: generated_post });\n\t\t} catch (e) {\n\t\t\tconsole.dir({ \"op:LLM::GEN error\": e });\n\t\t\tthrow new Error(e);\n\t\t}\n\t}\n\n\treturn {\n\t\tgenerated: generated_post,\n\t\tusage,\n\t};\n}\n\nfunction chunkify(array, chunkSize) {\n\tconst chunks = [];\n\tfor (let i = 0; i < array.length; i += chunkSize) {\n\t\tchunks.push(array.slice(i, i + chunkSize));\n\t}\n\treturn chunks;\n}\n\nasync function opLlmVectorizeChunk({ context, data }) {\n\t/* ;; op:LLM::VECTORIZE:CHUNK\n\t\t{texts} -> {vectors,usage}\n\t\tchunk processor (batches of 20)\n\t\tqueue concurrency/lims defined for this one\n\t*/\n\tconst { texts } = data;\n\treturn await utils.openai.vectorize({\n\t\ttexts,\n\t});\n}\nasync function opLlmVectorize({ context, data }) {\n\t/* ;; op:LLM::VECTORIZE\n\t\t{texts} -> {vectors,usage}\n\n\t\tchunkify, process, flatten, return\n\t*/\n\tconst { texts } = data;\n\tconst chunks = chunkify(texts, 20);\n\tlet usageAll = { prompt_tokens: 0, total_tokens: 0 };\n\tconst vectorsAll = (\n\t\tawait Promise.all(\n\t\t\tchunks.map(async (chunk) => {\n\t\t\t\tconst { vectors, usage } = await context.run({\n\t\t\t\t\tid: `op:LLM::VECTORIZE:CHUNK`,\n\t\t\t\t\tcontext,\n\t\t\t\t\tdata: { texts: chunk },\n\t\t\t\t});\n\t\t\t\tusageAll.prompt_tokens += usage.prompt_tokens;\n\t\t\t\tusageAll.total_tokens += usage.total_tokens;\n\t\t\t\treturn vectors;\n\t\t\t}),\n\t\t)\n\t).flat();\n\treturn {\n\t\tvectors: vectorsAll,\n\t\tusage: usageAll,\n\t};\n}\n\nasync function opLlmDebugSimulate({ context, data }) {\n\t/*\n\t\tdebug : simulate a stream\n\t*/\n\tconst { project, operation } = context;\n\n\tconsole.dir(\n\t\t{\n\t\t\topLlmDebugSimulate: { context, data },\n\t\t},\n\t\t{ depth: null },\n\t);\n\n\tconst text_demo = `\n# Deleuze & Guattari\n\nGilles Deleuze (1925-1995) was a French philosopher known for his influential works in metaphysics, aesthetics, and political theory. His ideas have significantly impacted various fields, including literature, film, and art.\n\n## Key Concepts\n\n### Rhizome\nDeleuze, along with Félix Guattari, introduced the concept of the **rhizome** in their work *A Thousand Plateaus*. Unlike traditional tree-like structures of knowledge, a rhizome represents a non-hierarchical and interconnected model of thought. It emphasizes multiplicity and the idea that any point can connect to any other point.\n\n### Difference and Repetition\nIn his book *Difference and Repetition*, Deleuze challenges the notion of identity and sameness. He argues that difference is fundamental to understanding reality, and repetition is not merely a return of the same but a process that produces new meanings.\n\n### Becoming\nDeleuze's notion of **becoming** refers to the process of transformation and change. It suggests that identity is not fixed but is always in a state of flux, influenced by various factors and experiences.\n\n## Conclusion\nDeleuze's philosophy encourages us to think beyond binary oppositions and embrace complexity. His work continues to inspire contemporary thought and artistic practices, making him a pivotal figure in modern philosophy.\n\t`;\n\n\tawait context.streams.start({\n\t\tproject,\n\t\tkey: operation.key,\n\t\tmeta: operation.meta,\n\t});\n\tconst chunkSize = 20; // Define the size of each chunk\n\tlet currentIndex = 0;\n\n\twhile (currentIndex < text_demo.length) {\n\t\tconst data = text_demo.slice(currentIndex, currentIndex + chunkSize); // send chunk by chunk\n\t\tcontext.streams.write({\n\t\t\tproject,\n\t\t\tkey: operation.key,\n\t\t\tdata,\n\t\t});\n\t\tcurrentIndex += chunkSize; // Move to the next chunk\n\t\tawait new Promise((resolve) => setTimeout(resolve, 100)); // Delay chunk by chunk\n\t}\n\n\tawait context.streams.end({\n\t\tproject,\n\t\tkey: operation.key,\n\t});\n\n\treturn {\n\t\tgenerated: text_demo,\n\t\tusage: {},\n\t};\n}\nexport default {\n\t\"op:LLM::GEN\": opLlmGen,\n\t\"op:LLM::VECTORIZE\": opLlmVectorize,\n\t\"op:LLM::VECTORIZE:CHUNK\": opLlmVectorizeChunk,\n\n\t\"op:LLM::DEBUG:SIMULATE\": opLlmDebugSimulate,\n};\n"
  },
  {
    "path": "cofounder/api/system/functions/op/project.js",
    "content": "import utils from \"@/utils/index.js\";\nimport { sample, merge } from \"lodash-es\";\nimport path from \"path\";\nimport fs from \"fs\";\nimport yaml from \"yaml\";\nimport dotenv from \"dotenv\";\nimport fsextra from \"fs-extra\";\nimport { exec, execSync } from \"child_process\";\ndotenv.config();\n\n/*\n  maps to local / hosted db paths\n*/\nconst pm = {\n\t\"pm:details\": \"pm/user/details\",\n\t\"pm:brd\": \"pm/docs/brd\",\n\t\"pm:drd\": \"pm/docs/drd\",\n\t\"pm:fjmd\": \"pm/docs/fjmd\",\n\t\"pm:frd\": \"pm/docs/frd\",\n\t\"pm:prd\": \"pm/docs/prd\",\n\t\"pm:uxdmd\": \"pm/docs/uxdmd\",\n\t\"pm:uxsmd\": \"pm/docs/uxsmd\",\n};\nconst architecture = {\n\t\"architecture:uxsitemap:structure\": \"architecture/uxsitemap/structure\",\n\t\"architecture:uxdatamap:structure\": \"architecture/uxdatamap/structure\",\n\t\"architecture:uxdatamap:views\": \"architecture/uxdatamap/views\",\n};\nconst backend = {\n\t\"backend:requirements\": \"backend/structure/requirements\",\n\t\"backend:specifications:asyncapi\": \"backend/specifications/asyncapi\",\n\t\"backend:specifications:openapi\": \"backend/specifications/openapi\",\n\t\"backend:server:main\": \"backend/server/main\",\n};\n\nconst db = {\n\t\"db:schemas\": \"db/mock/schemas\",\n\t\"db:seed\": \"db/mock/seed\",\n\t\"db:postgres\": \"db/mock/postgres\",\n};\n/*\nconst ui = {\n\t\"ui:layout:views\": \"ui/layout/mockup/views/{id}/versions/{version}\",\n\t\"ui:layout:sections\": \"ui/layout/mockup/sections/{id}/versions/{version}\",\n\t//\"ui:render:views\" : \"\",\n\t//\"ui:render:sections\": \"\",\n\t\"ui:code:react:stores\": \"ui/code/react/stores/{id}/versions/{version}\",\n\t\"ui:code:react:root\": \"ui/code/react/root/{id}/versions/{version}\",\n\t\"ui:code:react:views\": \"ui/code/react/views/{id}/versions/{version}\",\n\t\"ui:code:react:sections\": \"ui/code/react/sections/{id}/versions/{version}\",\n};\n*/\nconst webapp = {\n\t\"webapp:react:store\": \"webapp/code/react/store/{id}/versions/{version}\",\n\t\"webapp:react:root\": \"webapp/code/react/root/{id}/versions/{version}\",\n\t\"webapp:react:views\": \"webapp/code/react/views/{id}/versions/{version}\",\n\n\t\"webapp:layout:views\": \"webapp/design/layout/views/{id}/versions/{version}\",\n};\nconst settings = {\n\t// for version control ie. which view / section / version\n\t// data is ie. {views{[id]:[version]}}\n\t\"settings:preferences:versions\": \"settings/preferences/versions\",\n\t\"settings:config:package\": \"settings/config/package\",\n};\n\nconst modules = {\n\t...pm,\n\t...architecture,\n\t...db,\n\t...backend,\n\t...webapp,\n\t//...ui,\n\t...settings,\n};\n\nconst config = {\n\tmerge: [\n\t\t// operation ids where merge data is enabled\n\t\t\"settings:preferences:versions\",\n\t\t\"settings:config:package\",\n\t],\n\texports: [\n\t\t// events that trigger app write exports (if enabled)\n\n\t\t\"db:postgres\",\n\n\t\t\"backend:specifications:asyncapi\",\n\t\t\"backend:specifications:openapi\",\n\t\t\"backend:server:main\",\n\n\t\t\"webapp:react:store\",\n\t\t\"webapp:react:root\",\n\t\t\"webapp:react:views\",\n\t\t\"webapp:layout:views\",\n\n\t\t/*\n\t\t\"ui:layout:views\",\n\t\t\"ui:layout:sections\",\n\t\t\"ui:code:react:stores\",\n\t\t\"ui:code:react:root\",\n\t\t\"ui:code:react:views\",\n\t\t\"ui:code:react:sections\",\n\t\t*/\n\t\t\"settings:preferences:versions\",\n\t\t\"settings:config:package\",\n\t],\n};\n\nasync function run_npm_i(dependenciesRootPath) {\n\texec(`npm i`, {\n\t\tstdio: \"inherit\",\n\t\tcwd: dependenciesRootPath, // folder where package.json is\n\t});\n}\nasync function _exportOnSave({ context, data }) {\n\tif (\n\t\t!(\n\t\t\tprocess.env.AUTOEXPORT_ENABLE &&\n\t\t\tJSON.parse(process.env.AUTOEXPORT_ENABLE.toLowerCase())\n\t\t)\n\t)\n\t\treturn;\n\tconst { project } = context;\n\tconst { id, refs } = data.operation;\n\tconst root = `${process.env.EXPORT_APPS_ROOT}/${project}`;\n\tconst backendRoot = `${root}/backend`;\n\tconst appRoot = `${root}/vitereact`;\n\tconst appSrcRoot = `${appRoot}/src`;\n\t// const { data } = data.content.data\n\tlet tasks = [];\n\tif (id === `backend:server:main`) {\n\t\tconst { mjs, dependencies, env } = data.content.data;\n\n\t\ttasks.push({\n\t\t\tpath: `${backendRoot}/server.js`,\n\t\t\tdata: mjs,\n\t\t});\n\t}\n\tif (id === `backend:specifications:asyncapi`) {\n\t\tif (data.content.data) {\n\t\t\tconst exportPath = `${backendRoot}/asyncapi.yaml`;\n\t\t\tconst exportData = yaml.stringify(data.content.data);\n\t\t\ttasks.push({\n\t\t\t\tpath: exportPath,\n\t\t\t\tdata: exportData,\n\t\t\t});\n\t\t}\n\t}\n\tif (id === `backend:specifications:openapi`) {\n\t\tif (data.content.data) {\n\t\t\tconst exportPath = `${backendRoot}/openapi.yaml`;\n\t\t\tconst exportData = yaml.stringify(data.content.data);\n\t\t\ttasks.push({\n\t\t\t\tpath: exportPath,\n\t\t\t\tdata: exportData,\n\t\t\t});\n\t\t}\n\t}\n\tif (id === `db:postgres`) {\n\t\tconst exportPath = `${backendRoot}/db.sql`;\n\t\tconst exportData = data.content.data;\n\t\ttasks.push({\n\t\t\tpath: exportPath,\n\t\t\tdata: exportData,\n\t\t});\n\t}\n\tif (id === `webapp:react:store`) {\n\t\tconst exportPath = `${appSrcRoot}/store/main.tsx`;\n\t\tconst exportData = data.content.data.tsx;\n\t\ttasks.push({\n\t\t\tpath: exportPath,\n\t\t\tdata: exportData,\n\t\t});\n\t}\n\tif (id === `webapp:react:root`) {\n\t\tconst exportPath = `${appSrcRoot}/App.tsx`;\n\t\tconst exportData = data.content.data.tsx;\n\t\ttasks.push({\n\t\t\tpath: exportPath,\n\t\t\tdata: exportData,\n\t\t});\n\t\t// just in case it wasnt setup properly, lets write meta.json here too\n\t\ttasks.push({\n\t\t\tpath: `${appSrcRoot}/_cofounder/meta.json`,\n\t\t\tdata: JSON.stringify({ project }),\n\t\t});\n\t}\n\tif (id === `webapp:react:views`) {\n\t\t// exportPath = `${appSrcRoot}/components/views/${refs.id}/versions/${refs.version}.tsx`\n\t\ttasks.push({\n\t\t\tpath: `${appSrcRoot}/components/views/${refs.id}.tsx`,\n\t\t\tdata: `/*\n\t[PLACEHOLDER COMPONENT]\n\t\t> calls to this component are pre-replaced by @/_cofounder/vite-plugin\n\t\t> to edit code for this component, you should go to :\n\t\t\t@/_cofounder/generated/views/${refs.id}/{version_you_want_to_edit}.tsx\n*/`,\n\t\t});\n\t\ttasks.push({\n\t\t\tpath: `${appSrcRoot}/_cofounder/generated/views/${refs.id}/empty.tsx`,\n\t\t\tdata: `import React from \"react\";\nconst {{ID}}: React.FC<any> = (props) => {\n\treturn (\n\t\t<div className=\"bg-[#eee] text-black text-lg p-4 m-2 rounded\">\n\t\t\t<strong>{{ID}}</strong> placeholder\n\t\t\t<br /><div className=\"m-2 text-base p-4 bg-[#222] rounded text-white\">\n\t\t\t\tTo browse other versions<br/>\n\t\t\t\tUse ⌘+K / CMD+K and hover here\n\t\t\t</div>\n\t\t</div>\n\t);\n};\nexport default {{ID}};\n`.replaceAll(\"{{ID}}\", refs.id),\n\t\t});\n\n\t\ttasks.push({\n\t\t\tpath: `${appSrcRoot}/_cofounder/generated/views/${refs.id}/${refs.version}.tsx`,\n\t\t\tdata: data.content.data.tsx,\n\t\t});\n\t\t// write meta.json\n\t\tlet versions = [];\n\t\ttry {\n\t\t\tversions = fs\n\t\t\t\t.readdirSync(`${appSrcRoot}/_cofounder/generated/views/${refs.id}/`)\n\t\t\t\t.filter((filename) => filename.endsWith(\".tsx\"))\n\t\t\t\t.map((filename) => path.basename(filename, \".tsx\"));\n\t\t} catch (e) {\n\t\t\tfalse;\n\t\t\t// no dir there yet\n\t\t}\n\t\ttasks.push({\n\t\t\tpath: `${appSrcRoot}/_cofounder/generated/views/${refs.id}/meta.json`,\n\t\t\tdata: JSON.stringify(\n\t\t\t\t{\n\t\t\t\t\tversions: [...new Set([...versions, \"latest\"])],\n\t\t\t\t\tchoice: \"latest\",\n\t\t\t\t},\n\t\t\t\tnull,\n\t\t\t\t\"\\t\",\n\t\t\t),\n\t\t});\n\n\t\t/*\n\t\t\t<-------- should also merge {dependencies} with current packages.json (either directly in app , or op:state:settings:... preferably latter  ; to webapp:react:packages ) \n\t\t*/\n\t}\n\n\tif (id === `webapp:layout:views`) {\n\t\t// exportPath = `${appSrcRoot}/components/views/${refs.id}/versions/${refs.version}.tsx`\n\t\tconst exportPath = `${appRoot}/public/_cofounder/generated/layouts/views/${refs.id}.${refs.version}.png`;\n\t\tconst exportData = data.content.data.render.image;\n\t\ttasks.push({\n\t\t\tpath: exportPath,\n\t\t\tdata: exportData,\n\t\t\timage: true,\n\t\t});\n\t}\n\n\tif (id === `settings:preferences:versions`) {\n\t\t/*\n\t\t\tfor now, only handle preference exports for views || sections\n\t\t*/\n\t\tconst _category = Object.keys(data.content.data)[0];\n\t\tconst _id = Object.keys(data.content.data[_category])[0];\n\t\tconst _version = data.content.data[_category][_id];\n\t\tif (_category === `views` || _category === `sections`) {\n\t\t\t// update meta json on @/_cofounder/generated/{_category}/{id}\n\t\t\tlet versions = [];\n\t\t\ttry {\n\t\t\t\tversions = fs\n\t\t\t\t\t.readdirSync(`${appSrcRoot}/_cofounder/generated/${_category}/${_id}/`)\n\t\t\t\t\t.filter((filename) => filename.endsWith(\".tsx\"))\n\t\t\t\t\t.map((filename) => path.basename(filename, \".tsx\"));\n\t\t\t} catch (e) {\n\t\t\t\tfalse;\n\t\t\t}\n\t\t\ttasks.push({\n\t\t\t\tpath: `${appSrcRoot}/_cofounder/generated/${_category}/${_id}/meta.json`,\n\t\t\t\tdata: JSON.stringify(\n\t\t\t\t\t{\n\t\t\t\t\t\tversions: [...new Set([...versions, _version])],\n\t\t\t\t\t\tchoice: _version,\n\t\t\t\t\t},\n\t\t\t\t\tnull,\n\t\t\t\t\t\"\\t\",\n\t\t\t\t),\n\t\t\t});\n\t\t}\n\t}\n\tif (id === `settings:config:package`) {\n\t\t/*\n\t\t\tdata.content.data : {\n\t\t\t\t[backend || webapp] : {\n\t\t\t\t\tdependencies? : {}, //<--- this instead of list for merging while saving :)\n\t\t\t\t\tenv?: {},\n\t\t\t\t}\n\t\t\t}\n\t\t\tload boilerplate package.json,\n\t\t\ttry load export/.../package.json else {}\n\t\t\tmerge dependencies of both data.content.data[target].dependencies\n\t\t\t\n\t\t\tif (export/.../) merge with that package\n\t\t\telse merge with boilerplate package and export\n\n\t\t\tonly save if diff ; else might restart active dev nodemon every single time ...\n\t\t*/\n\n\t\tObject.keys(data.content.data).map((target) => {\n\t\t\t// target : \"backend\" || \"webapp\"\n\t\t\tObject.keys(data.content.data[target]).map((category) => {\n\t\t\t\t// category : \"dependencies\" || \"env\"\n\t\t\t\tconst boilerplateDir = `../boilerplate/${target === \"backend\" ? \"backend\" : target === \"webapp\" ? \"vitereact\" : false}-boilerplate`;\n\t\t\t\tconst exportDir =\n\t\t\t\t\ttarget === \"backend\" ? backendRoot : target === \"webapp\" ? appRoot : false;\n\t\t\t\tif (category === \"dependencies\") {\n\t\t\t\t\tconst newDependencies = Object.keys(\n\t\t\t\t\t\tdata.content.data[target].dependencies,\n\t\t\t\t\t);\n\n\t\t\t\t\tconst boilerplatePackage = JSON.parse(\n\t\t\t\t\t\tfs.readFileSync(`${boilerplateDir}/package.json`, \"utf8\").toString(),\n\t\t\t\t\t);\n\t\t\t\t\tlet exportedProjectPackage = { dependencies: {}, devDependencies: {} };\n\t\t\t\t\ttry {\n\t\t\t\t\t\texportedProjectPackage = JSON.parse(\n\t\t\t\t\t\t\tfs.readFileSync(`${exportDir}/package.json`, \"utf8\").toString(),\n\t\t\t\t\t\t);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tconsole.error(`op:project:_exportOnsave:error : ${e}`);\n\t\t\t\t\t}\n\n\t\t\t\t\tconsole.dir(\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"debug:op:project:_exportOnSave : settings:config:package\": {\n\t\t\t\t\t\t\t\t[target]: {\n\t\t\t\t\t\t\t\t\t[category]: {\n\t\t\t\t\t\t\t\t\t\tboilerplateDir,\n\t\t\t\t\t\t\t\t\t\texportDir,\n\t\t\t\t\t\t\t\t\t\tboilerplatePackage,\n\t\t\t\t\t\t\t\t\t\texportedProjectPackage,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\t{ depth: null },\n\t\t\t\t\t);\n\n\t\t\t\t\tconst previousDevDependencies = [\n\t\t\t\t\t\t...new Set([\n\t\t\t\t\t\t\t...Object.keys(boilerplatePackage.devDependencies),\n\t\t\t\t\t\t\t...Object.keys(exportedProjectPackage.devDependencies),\n\t\t\t\t\t\t]),\n\t\t\t\t\t];\n\n\t\t\t\t\tconst previousDependencies = [\n\t\t\t\t\t\t...new Set([\n\t\t\t\t\t\t\t...Object.keys(boilerplatePackage.dependencies),\n\t\t\t\t\t\t\t...Object.keys(exportedProjectPackage.dependencies),\n\t\t\t\t\t\t\t...previousDevDependencies,\n\t\t\t\t\t\t]),\n\t\t\t\t\t];\n\n\t\t\t\t\tconst updateDependencies = newDependencies.some(\n\t\t\t\t\t\t(dep) => !previousDependencies.includes(dep),\n\t\t\t\t\t);\n\n\t\t\t\t\tif (updateDependencies) {\n\t\t\t\t\t\tconst dependenciesToAdd = Object.fromEntries(\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t...new Set(\n\t\t\t\t\t\t\t\t\tnewDependencies.filter((dep) => !previousDependencies.includes(dep)),\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t].map((dep) => [dep, \"*\"]),\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// filter out devDependencies keys so it doesnt move everything to dependencies on export to package.json\n\t\t\t\t\t\tconst mergedDependencies = Object.fromEntries(\n\t\t\t\t\t\t\tObject.entries(\n\t\t\t\t\t\t\t\tmerge(\n\t\t\t\t\t\t\t\t\tmerge(\n\t\t\t\t\t\t\t\t\t\tboilerplatePackage.dependencies,\n\t\t\t\t\t\t\t\t\t\texportedProjectPackage.dependencies,\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\tdependenciesToAdd,\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t).filter(([key]) => !previousDevDependencies.includes(key)),\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tlet newPackageJson;\n\t\t\t\t\t\tif (exportedProjectPackage.dependencies) {\n\t\t\t\t\t\t\t// if exported package.json exists ; merge with rest and export\n\t\t\t\t\t\t\tnewPackageJson = JSON.stringify(\n\t\t\t\t\t\t\t\tmerge(exportedProjectPackage, { dependencies: mergedDependencies }),\n\t\t\t\t\t\t\t\tnull,\n\t\t\t\t\t\t\t\t2,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// else merge with boilerplate package.json and export\n\t\t\t\t\t\t\tnewPackageJson = JSON.stringify(\n\t\t\t\t\t\t\t\tmerge(boilerplatePackage, { dependencies: mergedDependencies }),\n\t\t\t\t\t\t\t\tnull,\n\t\t\t\t\t\t\t\t2,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconsole.dir(\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\"debug:op:project:_exportOnSave : settings:config:package\": {\n\t\t\t\t\t\t\t\t\t[target]: {\n\t\t\t\t\t\t\t\t\t\t[category]: {\n\t\t\t\t\t\t\t\t\t\t\tmergedDependencies,\n\t\t\t\t\t\t\t\t\t\t\tnewPackageJson,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{ depth: null },\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\ttasks.push({\n\t\t\t\t\t\t\tpath: `${exportDir}/package.json`,\n\t\t\t\t\t\t\tdata: newPackageJson,\n\t\t\t\t\t\t\tdependencies: true,\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (category === \"env\") {\n\t\t\t\t\t// applies to backend only\n\t\t\t\t\tconst envData = data.content.data[target].env;\n\t\t\t\t\tif (Object.keys(envData).length) {\n\t\t\t\t\t\tconst envString = Object.entries(envData)\n\t\t\t\t\t\t\t.map(([key, value]) => `${key}=${value}`)\n\t\t\t\t\t\t\t.join(\"\\n\");\n\t\t\t\t\t\tconsole.dir(\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\"debug:op:project:_exportOnSave : settings:config:package\": {\n\t\t\t\t\t\t\t\t\t[target]: {\n\t\t\t\t\t\t\t\t\t\t[category]: {\n\t\t\t\t\t\t\t\t\t\t\tenv: envData,\n\t\t\t\t\t\t\t\t\t\t\tenvString,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{ depth: null },\n\t\t\t\t\t\t);\n\t\t\t\t\t\ttasks.push({\n\t\t\t\t\t\t\tpath: `${exportDir}/.env`,\n\t\t\t\t\t\t\tdata: envString,\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\n\t\tconst _category = Object.keys(data.content.data)[0];\n\t\tconst _id = Object.keys(data.content.data[_category])[0];\n\t\tconst _version = data.content.data[_category][_id];\n\t\tif (_category === `views` || _category === `sections`) {\n\t\t\t// update meta json on @/_cofounder/generated/{_category}/{id}\n\t\t\tlet versions = [];\n\t\t\ttry {\n\t\t\t\tversions = fs\n\t\t\t\t\t.readdirSync(`${appSrcRoot}/_cofounder/generated/${_category}/${_id}/`)\n\t\t\t\t\t.filter((filename) => filename.endsWith(\".tsx\"))\n\t\t\t\t\t.map((filename) => path.basename(filename, \".tsx\"));\n\t\t\t} catch (e) {\n\t\t\t\tfalse;\n\t\t\t}\n\t\t\ttasks.push({\n\t\t\t\tpath: `${appSrcRoot}/_cofounder/generated/${_category}/${_id}/meta.json`,\n\t\t\t\tdata: JSON.stringify(\n\t\t\t\t\t{\n\t\t\t\t\t\tversions: [...new Set([...versions, _version])],\n\t\t\t\t\t\tchoice: _version,\n\t\t\t\t\t},\n\t\t\t\t\tnull,\n\t\t\t\t\t\"\\t\",\n\t\t\t\t),\n\t\t\t});\n\t\t}\n\t}\n\n\tawait Promise.all(\n\t\ttasks.map(async (task) => {\n\t\t\tconst dir = path.dirname(task.path);\n\t\t\tif (!fs.existsSync(dir)) {\n\t\t\t\tfs.mkdirSync(dir, { recursive: true });\n\t\t\t}\n\t\t\tif (!task.image) {\n\t\t\t\tfs.writeFileSync(task.path, task.data, \"utf8\");\n\t\t\t} else {\n\t\t\t\t// case by case :\n\t\t\t\t//\t\tlocal ? copy paste from local path\n\t\t\t\t//\t\turl ? fetch and write\n\t\t\t\tif (task.data?.local?.length) {\n\t\t\t\t\tconst sourcePath = task.data.local;\n\t\t\t\t\tawait fsextra.copyFile(sourcePath, task.path);\n\t\t\t\t} else if (task.data?.url?.length) {\n\t\t\t\t\tconst response = await fetch(task.data.url);\n\t\t\t\t\tif (!response.ok) {\n\t\t\t\t\t\tthrow new Error(`Failed to fetch image from ${task.data.url}`);\n\t\t\t\t\t}\n\t\t\t\t\tconst buffer = await response.buffer();\n\t\t\t\t\tfs.writeFileSync(task.path, buffer);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\ttask.dependencies &&\n\t\t\t\tprocess.env.AUTOINSTALL_ENABLE &&\n\t\t\t\tJSON.parse(process.env.AUTOINSTALL_ENABLE.toLowerCase())\n\t\t\t) {\n\t\t\t\tconst dependenciesRootPath = task.path.split(\"/\").slice(0, -1).join(\"/\");\n\t\t\t\tconsole.log(\n\t\t\t\t\t`\\x1b[33m> dependencies updated for : ${dependenciesRootPath}\\n> now running 'npm i' inside that folder\\x1b[0m`,\n\t\t\t\t);\n\n\t\t\t\tif (context.streams) {\n\t\t\t\t\tawait context.streams.start({\n\t\t\t\t\t\tproject,\n\t\t\t\t\t\tkey: \"project.dependencies.install\",\n\t\t\t\t\t\tmeta: {\n\t\t\t\t\t\t\tname: \"Install dependencies\",\n\t\t\t\t\t\t\tdesc: \"running 'npm i' in app dir\",\n\t\t\t\t\t\t},\n\t\t\t\t\t});\n\t\t\t\t\tawait context.streams.write({\n\t\t\t\t\t\tproject,\n\t\t\t\t\t\tkey: \"project.dependencies.install\",\n\t\t\t\t\t\tdata: `command : 'npm i'\\n\\n---\\n\\nupdate :\\n\\n${yaml.stringify(task.data)}\\n\\n---\\n\\npath : ${dependenciesRootPath}`,\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\trun_npm_i(dependenciesRootPath);\n\n\t\t\t\tif (context.streams) {\n\t\t\t\t\tawait context.streams.end({\n\t\t\t\t\t\tproject,\n\t\t\t\t\t\tkey: \"project.dependencies.install\",\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t}),\n\t);\n}\n\nasync function opProjectStateUpdate({ context, data }) {\n\t// save, modular\n\t/*\n    aim for stream structure\n  */\n\t/*\n    context : { project``, }\n    data: {\n      local: bool,\n      cloud: bool,\n      operation: {\n        id: \"ui:code:lalala\",\n        refs: {\n          [id] : \"id value to replace etc\",\n          [otherId] : \"some value etc\",\n        }\n      },\n      type: enum start,stream,end\n      stream: \"\" || false,\n      content: {\n        // should have key here as would be in state :: edge case, how to deal with '.' paths in object ?\n        key : \"\" // state key ? ie. pm.prd ; uxsitemap.views.whatever\n        data : {}\n      }\n    }\n  */\n\t/*\n    add :\n      _created?\n      _updated\n  */\n\t/*\n    update stream only if cloud\n  */\n\n\tconst { project } = context;\n\tconst { operation, type, stream, content } = data;\n\t// const [ local , cloud ] = [ process.env.STATE_LOCAL , process.env.STATE_CLOUD];\n\tconst { id, refs } = operation;\n\t/*\n    cases of start/stream/end\n  */\n\tconst query = {\n\t\tpath: modules[id],\n\t\tdata: {},\n\t};\n\tconst ogPath = `${query.path}`;\n\n\tif (refs) {\n\t\tObject.keys(refs).map((ref) => {\n\t\t\tquery.path = query.path.replace(`{${ref}}`, refs[ref]);\n\t\t});\n\t}\n\n\tif (type === `start`) {\n\t\tquery.data._created = Date.now();\n\t\tquery.data._processing = true;\n\t}\n\tif (type === `end`) {\n\t\tquery.data._updated = Date.now();\n\t\tquery.data._processing = false;\n\t\t// query.data = { ...query.data, ...content }\n\t}\n\tif (content) query.data = { ...query.data, ...content };\n\n\tconsole.dir({ \"debug:op:project:state:update\": { query } });\n\n\tif (\n\t\tprocess.env.STATE_LOCAL &&\n\t\tJSON.parse(process.env.STATE_LOCAL.toLowerCase())\n\t) {\n\t\tconst localPath = `db/projects/${project}/state/${query.path}.yaml`;\n\t\tconst dir = path.dirname(localPath);\n\t\tif (!fs.existsSync(dir)) {\n\t\t\tfs.mkdirSync(dir, { recursive: true });\n\t\t}\n\t\tif (config.merge.includes(id)) {\n\t\t\ttry {\n\t\t\t\tconst previous = yaml.parse(fs.readFileSync(localPath, \"utf8\").toString());\n\t\t\t\tquery.data = merge(previous, query.data);\n\t\t\t} catch (e) {\n\t\t\t\tconsole.dir({\n\t\t\t\t\t\"op:project:update:error\": `no previous state found for ${id}, will write new instead of merge`,\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\tfs.writeFileSync(localPath, yaml.stringify(query.data), \"utf8\");\n\t\tif (context.streams) {\n\t\t\tawait context.streams.update({\n\t\t\t\tproject,\n\t\t\t\t...query.data, // query.data : { key , data }\n\t\t\t});\n\t\t}\n\t}\n\n\tif (\n\t\tprocess.env.STATE_CLOUD &&\n\t\tJSON.parse(process.env.STATE_CLOUD.toLowerCase())\n\t) {\n\t\tif (refs) {\n\t\t\t// need to write dummy timestamp in docs in case of firestore ; to be able to query subcollections\n\t\t\t// query.path find index of \"}\" and split there+1, replace, log dummy timestamp\n\t\t\tlet subs = [];\n\t\t\tfor (let i = 0; i < ogPath.length; i++) {\n\t\t\t\tif (ogPath[i] === \"}\") {\n\t\t\t\t\tlet sub = ogPath.slice(0, i + 1);\n\t\t\t\t\tObject.keys(refs).map((ref) => {\n\t\t\t\t\t\tsub = sub.replace(`{${ref}}`, refs[ref]);\n\t\t\t\t\t});\n\t\t\t\t\tsubs.push(sub);\n\t\t\t\t}\n\t\t\t}\n\t\t\tawait Promise.all(\n\t\t\t\tsubs.map(async (p) => {\n\t\t\t\t\tawait utils.firebase.doc.update({\n\t\t\t\t\t\tpath: `/db/userdata/projects/${project}/state/${p}`,\n\t\t\t\t\t\tdata: { _created: Date.now() },\n\t\t\t\t\t});\n\t\t\t\t}),\n\t\t\t);\n\t\t}\n\n\t\tquery.path = `/db/userdata/projects/${project}/state/${query.path}`;\n\t\tif (config.merge.includes(id)) {\n\t\t\tquery.merge = true;\n\t\t}\n\t\tawait utils.firebase.doc.update(query);\n\t}\n\n\tif (\n\t\tprocess.env.AUTOEXPORT_ENABLE &&\n\t\tJSON.parse(process.env.AUTOEXPORT_ENABLE.toLowerCase()) &&\n\t\tconfig.exports.includes(id)\n\t)\n\t\tawait _exportOnSave({ context, data });\n}\n\nasync function opProjectStateLoad({ context, data }) {\n\t// should have local || cloud strategies\n\tconst { project } = context;\n\t// const [local, cloud] = [process.env.STATE_LOCAL, process.env.STATE_CLOUD];\n\ttry {\n\t\tif (\n\t\t\tprocess.env.STATE_LOCAL &&\n\t\t\tJSON.parse(process.env.STATE_LOCAL.toLowerCase())\n\t\t)\n\t\t\treturn await utils.load.local({ project });\n\t\tif (\n\t\t\tprocess.env.STATE_CLOUD &&\n\t\t\tJSON.parse(process.env.STATE_CLOUD.toLowerCase())\n\t\t)\n\t\t\treturn await utils.load.cloud({ project });\n\t} catch (e) {\n\t\tconsole.error(`op:project:state:load:error : ${e}`);\n\t}\n\tconsole.log(`found no previous local / cloud state for project : ${project}`);\n\treturn {};\n}\n\nasync function opProjectStateExport({ context, data }) {\n\t// tons to update , just disregard this for now\n\n\treturn;\n\t// force export full project ; from {data}\n}\n\nasync function opProjectStateSetup({ context, data }) {\n\t// if local export enabled, duplicate boilerplate\n\tconst { project } = context;\n\tconst dirs = [\n\t\t{\n\t\t\tsource: `../boilerplate/backend-boilerplate`,\n\t\t\ttarget: `${process.env.EXPORT_APPS_ROOT}/${project}/backend`,\n\t\t},\n\t\t{\n\t\t\tsource: `../boilerplate/vitereact-boilerplate`,\n\t\t\ttarget: `${process.env.EXPORT_APPS_ROOT}/${project}/vitereact`,\n\t\t},\n\t];\n\n\tfor (const { source, target } of dirs) {\n\t\t// Copy the directory from source to target while respecting .gitignore\n\t\tawait fsextra.copy(source, target, {\n\t\t\tfilter: (src) => {\n\t\t\t\t// Respect .gitignore by checking if the file is not listed in .gitignore\n\t\t\t\tconst ignoreFile = `${source}/.gitignore`;\n\t\t\t\tif (fs.existsSync(ignoreFile)) {\n\t\t\t\t\tconst ignoreList = fs\n\t\t\t\t\t\t.readFileSync(ignoreFile, \"utf-8\")\n\t\t\t\t\t\t.split(\"\\n\")\n\t\t\t\t\t\t.map((line) => line.trim())\n\t\t\t\t\t\t.filter(Boolean);\n\t\t\t\t\treturn !ignoreList.some((ignorePattern) => src.includes(ignorePattern));\n\t\t\t\t}\n\t\t\t\treturn true; // If no .gitignore, copy everything\n\t\t\t},\n\t\t\trecursive: true, // Ensure folders are created recursively\n\t\t});\n\t}\n\n\tawait fsextra.copyFile(\n\t\t`../boilerplate/package.json`,\n\t\t`${process.env.EXPORT_APPS_ROOT}/${project}/package.json`,\n\t);\n\tawait fsextra.copyFile(\n\t\t`../boilerplate/README.md`,\n\t\t`${process.env.EXPORT_APPS_ROOT}/${project}/README.md`,\n\t);\n\t// write meta.json\n\tfs.writeFileSync(\n\t\t`${process.env.EXPORT_APPS_ROOT}/${project}/vitereact/src/_cofounder/meta.json`,\n\t\tJSON.stringify({ project }),\n\t);\n}\n\nasync function opProjectStateSave({ context, data }) {\n\t// save, full current state of project\n}\n\nexport default {\n\t\"op:PROJECT::STATE:UPDATE\": opProjectStateUpdate,\n\t\"op:PROJECT::STATE:LOAD\": opProjectStateLoad,\n\t\"op:PROJECT::STATE:SETUP\": opProjectStateSetup,\n\t\"op:PROJECT::STATE:EXPORT\": opProjectStateExport,\n\t// \"op:PROJECT::STATE:SAVE\": opProjectStateSave,\n};\n"
  },
  {
    "path": "cofounder/api/system/functions/op/render.js",
    "content": "import utils from \"@/utils/index.js\";\n\nasync function opRenderLayout({ context, data }) {\n\t/* ;; op:RENDER::LAYOUT\n\t\trender either { view , section , block } using utils.render and svg stuff\n\t\tin : -> { svg{string``} , mode`view||...` , ...(designSystem,saveFilepath...) }\n\t\tout : [\"svg\",\"image\"]\n\t*/\n\t// const { svg , mode } = data // { svg{string``} , mode`view||...` }\n\treturn await utils.render.svg({\n\t\t...data,\n\t\t// saveFilepath: `./dump/renders/_opRenderLayoutDebug_${data.mode}_${Date.now()}.png`,\n\t});\n}\n\nexport default {\n\t\"op:RENDER::LAYOUT\": opRenderLayout,\n};\n"
  },
  {
    "path": "cofounder/api/system/functions/pm/brd.js",
    "content": "import utils from \"@/utils/index.js\";\nimport yaml from \"yaml\";\n\nasync function pmBrdAnalysis({ context, data }) {\n\tconst { pm, db } = data;\n\tconst { details, prd, frd, drd } = pm;\n\n\t/*\n\t\tshould be 2 (3?) steps :\n\t\t\tdetermine if needs { rest api , realtime socket io api }\n\t\t\tmake structure\n\t*/\n\tconst backendPrompt = [\n\t\t{\n\t\t\trole: \"system\",\n\t\t\tcontent: `you are an expert product manager and software architect and API designer ;\nyour role is to determine, based on the provided analysis documents for the app project in development, the specfications of the app backend\n\nyour task is very straightforward :\n- based strictly on provided docs and outlined features, determine whether, yes or no, for the core features of the app MVP to be implemented, the backend :\n\t\t> requires a RESTful API ?\n\t\t> requires realtime (ie. websockets) ?\n\nyou will answer exactly in this format, delimited by \\`\\`\\`yaml :\n\n\\`\\`\\`yaml\nbackend:\n  requirements:\n\t  restApi:\n\t\t  justifyYourAnswer: \"write your reasoning for your answer in case it is true\"\n\t\t\trequired: boolean # whether the backend requires or no a REST API\n\t\trealtimeWebsockets:\n\t\t  justifyYourAnswer: \"write your reasoning for your answer in case it is true\"\n\t\t\trequired: boolean # whether the backend requires or no a REST API\n\\`\\`\\`\n\nanswer in strict parseable Yaml format, exactly in the provided format structure\nyour answer should start with : \\`\\`\\`yaml\n\nyou will be tipped $9999\n`,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `\\`\\`\\`app-project:description\n${details.text}\n\\`\\`\\``,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `\\`\\`\\`PRD:product-requirements-document\n${prd}\n\\`\\`\\``,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `\\`\\`\\`FRD:features-requirements-document\n${frd}\n\\`\\`\\``,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `determine the backend specifications in terms of whether the backend needs a REST API , and whether it needs realtime Websockets.\nyour answer should start with : \\`\\`\\`yaml\n\nyou are a genius\n`,\n\t\t},\n\t];\n\tconst backendStructureRequirements = (\n\t\tawait context.run({\n\t\t\tid: \"op:LLM::GEN\",\n\t\t\tcontext: {\n\t\t\t\t...context, // {streams , project}\n\t\t\t\toperation: {\n\t\t\t\t\tkey: \"_pm.brd.requirements\",\n\t\t\t\t\tmeta: {\n\t\t\t\t\t\tname: \"BRD Prepass\",\n\t\t\t\t\t\tdesc: \"backend structure requirements check\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tdata: {\n\t\t\t\tmodel: `gpt-4o-mini`, //`gpt-4o`,\n\t\t\t\tmessages: backendPrompt,\n\t\t\t\tpreparser: `backticks`,\n\t\t\t\tparser: `yaml`,\n\t\t\t},\n\t\t})\n\t).generated;\n\n\tconst messages = [\n\t\t{\n\t\t\trole: \"system\",\n\t\t\tcontent: `you are an expert product manager and software architect and backend and server and API designer\n\nyour job is to consult the provided web app details & analysis documents\nin order to create a comprehensive and full Backend Requirements Document (BRD) for it\n\nthe emphasis are user-facing features,\nbased on the expected features and different journeys of different users in the web app\n\n- your role is to conduct the analysis required to design the user-facing server of the provided task\n- do a thorough analysis of the provided task\n\n---\n\n- think from all possibles perspectives, put yourself in situation, to make sure your server analysis is fully comprehensive and ready to be developed\n- ask yourself:\n  * what are the features involved in the user-facing server and that is called by the frontend ?\n  * if a server API is required, what are all the routes required by features expected to be seen by users in the frontend ? what should go in their schemas ? (not technical, rather analytical description from a feature perspective)\n\t* if realtime features are required, what are all the events required by features expected to be seen by users in the frontend ? what should go in their schemas ? (not technical, rather analytical description from a feature perspective)\n\n- your analysis will be used to make a prod-ready backend and will be responsible for an app used by thousands of users, instantly\n- your aim is to cover all use cases, as the expert product manager & architect you are\n\n> analyze the task thoroughly, then reply with your analysis in markdown format, in a well-formatted document to give to backend devs\n\n---\n\n> your role here is not the implementation itself, you are the product architect consultant\n> your role is to analyze the requirements for all scenarios required by all features\n  ask yourself :\n    * am i covering all needed server features?\n    * am i covering all features that the user expects ?\n\t\t* if a feature necessitates the use of an external API (ie. checking a stock price , generating an ai image, advanced features that need the use of an external API, etc ...)\n\t\t\timportant : the backend already has DB and storage capabilities , so DO NOT MENTION DB OR STORAGE AS EXTERNAL APIS ! THOSE ARE ALREADY IMPLEMENTED INTERNALLY IN THE BACKEND !\n\t\t\tam i describing the details of what is needed ?\n\t\t* am i properly aligning my server design details with other design detail aspects of the project such as DB structure ?\n  in order to ensure your analysis as a product architect consultant has covered every feature requirement\n\n> your job is to make thorough, critical analysis work which will be provided as documentation for devteams to implement\n  not a technical implementation, rather a thorough analysis, in plain language, of all expected features and their details\n\n> try to outdo yourself by thinking of what might be omitted in advance\n- the goal server should be comprehensive will be used as reference to build the app's MVP backend\n- cover all cases ; but : data-related tasks only (ie. you are making a mock server with api and/or realtime for user-facing data operations)\n\n---\n\n> very important : for the current purpose of the BRD, the environment will be a mock prototype environment\ndo not bother with security details etc, have the requirements for the mock prototype\ndo not hang on very technical details (unless specifically emphasized), as the target is a mock dev prototype env : features functionality is the aim, not advanced technical coverage !\n\n> SHOULD COVER DATA RELATED TASKS ONLY !\n> THE MOCK SERVER YOU ARE MAKING IS FOR USER-FACING DATA OPERATIONS, NOT FRONTEND / SERVING STATIC STUFF !\n> DATA RELATED TASKS ONLY !\n\n---\n\nyour analysis is concerned with these two aspects aspects :\n> if the app backend needs a server API , conduct the analysis regarding all the API needs\n> if the app backend needs realtime Websockets , conduct the analysis regarding all the realtime events needed\n\nyou can only write about these aspects (either one of them or both , depending on whats provided in task documents )\nimportant : DO NOT ANALYZE ANYTHING IN THE BACKEND BESIDES THESE 2 ASPECTS AND THEIR RELATIONS TO USER-FACING FEATURES !!\n\n---\n\nagain,\n> SHOULD COVER DATA RELATED TASKS ONLY !\n> THE MOCK SERVER YOU ARE MAKING IS FOR USER-FACING DATA OPERATIONS, NOT FRONTEND / SERVING STATIC STUFF !\n> DATA RELATED TASKS ONLY !\n\n---\n\nimportant :\nuse snake_case for any naming you do\n\n---\n\nyour reply will be directly transferred as the final BRD document, so do not put anything else in your reply besides the BRD document\nno extra comments or surrounding anything, only the markdown-formatted COMPREHENSIVE 100% COVERAGE AMAZING BEAUTIFUL GENIUS SUPER DETAILED 10/10 ARD DOCUMENT\nyour reply should start with : \"\\`\\`\\`markdown\" and end with \"\\`\\`\\`\"\n\nyou will be tipped $99999 + major company shares for nailing it perfectly off the bat`,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `\\`\\`\\`app-project:description\n${details.text}\n\\`\\`\\``,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `\\`\\`\\`PRD:product-requirements-document\n${prd}\n\\`\\`\\``,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `\\`\\`\\`FRD:features-requirements-document\n${frd}\n\\`\\`\\``,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `\\`\\`\\`DRD:database-requirements-document\n${drd}\n\\`\\`\\``,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `\\`\\`\\`DB:specs\n${yaml.stringify(db)}\n\\`\\`\\``,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `\\`\\`\\`BACKEND:specs-requirements\n${yaml.stringify(backendStructureRequirements)}\n\\`\\`\\``,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `Conduct a comprehensive analysis for the Backend Requirements Document that considers all personas and features required, in markdown format (justify your reasoning whenever possible)\n\n---\n\nRefer to this general document structure to guide you\n\n\\`\\`\\`BRD:general-structure\nI. General, Personas, Features\n  [...]\nII. REST API\n  II.A. Justification & Reasoning\n    If app needs REST API, provide your reasoning\n  II.B. API Endpoints (if applies)\n    3.B.1. [Endpoint]\n      Method & Path\n      Extended Description\n        Analyze and describe what the function does\n      Analysis\n        Interaction with <> DB\n          Analyze how does function interact with database based on provided DB details and schemas \n          ask yourself questions such as :\n            What fields does it need to insert / get / update / delete / ... for each operation ?\n            Based on provided DB details, does it need to create data on the fly such as ids / dates / ... ?\n            Does it need to insert data in multiple tables to not make DB conflicts ?\n\t\t\t\t\tBe very specific & detailed into exactly how the relationships to <> DB tables work in this function\n\t\t\t\t\t\tjustify any answer by including snippets from the provided DB postgres code and elaborating\n\t\t\t\t\t\tremember : the backend is tasked with creating any primitive required by db (ie. ids , ...),\n\t\t\t\t\t\tas you can tell from the postgres code\n\t\t\t\t\t\tmake things 100% perfectly congruent in your analysis\n\t\t\t\t\tInclude any additional important analysis notes\n        Interaction with <> External APIs\n          Analyze if function needs to interact with external APIs for needed capabilities, and if so describe\n            Remember : App already has DB and storage , so external APIs would be external capabilities outside of these 2\n        Add any important general analysis notes\n      Data Details\n        Auth\n          Does function requires the user to provided an auth token ?\n        Request\n          Body content type (json , form , ... ?)\n          Schema\n        Response\n          Content type\n          Schema\n\t\t\tAdditionals details / notes (if applies)\n    [...]\nII. Realtime Websockets (if applies)\n  III.A. Justification & Reasoning\n    If app needs realtime events, provide your reasoning\n  III.B. Events (if applies)\n    3.B.1. [Event]\n      Event name\n      Extended Description\n        Analyze and describe what the function does\n      Analysis\n        Interaction with <> DB\n          Analyze how does function interact with database based on provided DB details and schemas\n          ask yourself questions such as :\n            What fields does it need to insert / get / update / delete / ... for each operation ?\n            Based on provided DB details, does it need to create data on the fly such as ids / dates / ... ?\n            Does it need to insert data in multiple tables to not make DB conflicts ?\n\t\t\t\t\tBe very specific & detailed into exactly how the relationships to <> DB tables work in this function\n\t\t\t\t\t\tjustify any answer by including snippets from the provided DB postgres code and elaborating\n\t\t\t\t\t\tremember : the backend is tasked with creating any primitive required by db (ie. ids , ...),\n\t\t\t\t\t\tas you can tell from the postgres code\n\t\t\t\t\t\tmake things 100% perfectly congruent in your analysis\n\t\t\t\t\tInclude any additional important analysis notes\n        Interaction with <> External APIs\n          Analyze if function needs to interact with external APIs for needed capabilities, and if so describe\n            Remember : App already has DB and storage , so external APIs would be external capabilities outside of these 2\n        Add any important general analysis notes\n      Data Details\n        Auth\n          Does function requires the user to provided an auth token ?\n        Request payload\n          Schema\n        Response payload\n          Schema\n      Additional details / notes (if applies)\n    [...]\nIV. Additional Notes\n  Any additional notes worth mentionning regarding the backend requirements\n\\`\\`\\`\n\n---\nyou're a genius`,\n\t\t},\n\t];\n\n\tconst brd = (\n\t\tawait context.run({\n\t\t\tid: \"op:LLM::GEN\",\n\t\t\tcontext: {\n\t\t\t\t...context, // {streams , project}\n\t\t\t\toperation: {\n\t\t\t\t\tkey: \"pm.brd\",\n\t\t\t\t\tmeta: {\n\t\t\t\t\t\tname: \"BRD\",\n\t\t\t\t\t\tdesc: \"backend requirements document\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tdata: {\n\t\t\t\tmodel: `chatgpt-4o-latest`, //`gpt-4o`,\n\t\t\t\tmessages,\n\t\t\t\tpreparser: `backticks`,\n\t\t\t\tparser: false,\n\t\t\t},\n\t\t})\n\t).generated;\n\n\tawait context.run({\n\t\tid: \"op:PROJECT::STATE:UPDATE\",\n\t\tcontext,\n\t\tdata: {\n\t\t\toperation: {\n\t\t\t\tid: \"pm:brd\",\n\t\t\t},\n\t\t\ttype: `end`,\n\t\t\tcontent: {\n\t\t\t\tkey: \"pm.brd\",\n\t\t\t\tdata: brd,\n\t\t\t},\n\t\t},\n\t});\n\n\tconst backendRequirements = backendStructureRequirements.backend.requirements;\n\n\tawait context.run({\n\t\tid: \"op:PROJECT::STATE:UPDATE\",\n\t\tcontext,\n\t\tdata: {\n\t\t\toperation: {\n\t\t\t\tid: \"backend:requirements\",\n\t\t\t},\n\t\t\ttype: `end`,\n\t\t\tcontent: {\n\t\t\t\tkey: \"backend.requirements\",\n\t\t\t\tdata: backendRequirements,\n\t\t\t},\n\t\t},\n\t});\n\n\treturn { pm: { brd }, backend: { requirements: backendRequirements } };\n}\n\nexport default {\n\t\"PM:BRD::ANALYSIS\": pmBrdAnalysis,\n};\n"
  },
  {
    "path": "cofounder/api/system/functions/pm/drd.js",
    "content": "import utils from \"@/utils/index.js\";\nimport yaml from \"yaml\";\n\nasync function pmDrdAnalysis({ context, data }) {\n\t/* ;; PM:DRD::ANALYSIS\n\t\tmake {userdetails,prd,frd,FJMD}  -> DRD analysis\n\n\n\t\tout : [\"pm\"]\n\t*/\n\n\tconst { pm } = data;\n\tconst { details, prd, frd, fjmd } = pm;\n\t// const {text , attachments} = details\n\tconst messages = [\n\t\t{\n\t\t\trole: \"system\",\n\t\t\tcontent: `you are an expert product manager and database designer\n\nyour job is to consult the provided web app details, Product Requirements Document, Features Requirements Documents & Features Journeys Map Document\nin order to create a comprehensive and full Feature Database Requirements Document (DRD) for it\n\n---\n\nthe emphasis are user-facing features,\nbased on the expected features and different journeys of different users in the web app\n\n- your role is to conduct the analysis part for the provided app in development's DB part\n  DB schemas analysis should be comprehensive and cover EVERYTHING required by the app MVP, and nothing more - no shiny secondary features, but nothing less than 100% comprehensive for every single expected functionality in production\n\n- your current role is to do a thorough analysis of the provided task and answer with your analysis in markdown format\n\n- think from perspectives of multiple personas, put yourself in situation, to make sure your DB schemas reply is fully comprehensive and ready to be used in production exactly as is\n- your answer will be pushed to dev teams directly, and will be responsible for an app used by thousands of users\n- your aim is to cover all use cases, as the expert product manager you are\n\n- ask yourself:\n  * what are the key personas that use the app ?\n  * what are all the schemas required by features expected to be seen by users ?\n  * and what are all the schemas required internally to cover all features workflows ?\n\nvery important :\n- in the schemas parts of your analysis , only make use of basic primitives like numbers, strings, json, etc ... no uuid types or any special types etc\n- very important : in the schemas parts of your analysis , only use basic primitives like numbers, strings, json, etc ... no uuid types or any special types etc ! very basic primitives only !\n\n---\n\n> analyze the task thoroughly, then reply with your analysis in markdown format\n> try to outdo yourself by thinking of what might be omitted, and reviewing your own work super critically in order to do comprehensive analytical work for this app's MVP\n> your job is to make thorough analysis work which will be provided as documentation for devteams to implement\n> your job is not the implementation, rather it's looking at the problem from all perspective to make sure a thorough job is done,\n  and asking yourself, for every scenario, what are all the data entries that would be needed to make this function\n\n---\n\n> note : if auth functionalities are present, use an architecture that will be compatible with a simple jwt auth system, which is very simply user and/or email strings(s) and password hash string !\n\n---\n\nimportant :\nuse snake_case for any naming you do\n\n---\n\n> very important : for the current purpose of the DRD, the environment will be a mock prototype environment,\ndo not bother with security details etc, have the DB requirements for the mock prototype\n\nyour reply will be directly transferred as the final DRD document, so do not put anything else in your reply besides the DRD document\nno extra comments or surrounding anything, only the markdown-formatted COMPREHENSIVE 100% COVERAGE AMAZING BEAUTIFUL GENIUS SUPER DETAILED 10/10 DRD DOCUMENT\nyour reply should start with : \"\\`\\`\\`markdown\" and end with \"\\`\\`\\`\"\n\nyou will be tipped $99999 + major company shares for nailing it perfectly off the bat`,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `\\`\\`\\`app-project:description\n${details.text}\n\\`\\`\\``,\n\t\t},\n\t\t// <------ later on, attachments , pdf/img cases etc map\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `\\`\\`\\`PRD:product-requirements-document\n${prd}\n\\`\\`\\``,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `\\`\\`\\`FRD:features-requirements-document\n${frd}\n\\`\\`\\``,\n\t\t},\n\t\t/*{\n\t\t\trole: \"user\",\n\t\t\tcontent: `\\`\\`\\`FJMD:features-journeys-map-document\n${yaml.stringify(fjmd)}\n\\`\\`\\``,\n\t\t},*/\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `Conduct a comprehensive analysis for the DB Requirements Document that considers all personas and features required, in markdown format (justify your reasoning whenever possible)\n\nyou're a genius`,\n\t\t},\n\t];\n\n\tconst drd = (\n\t\tawait context.run({\n\t\t\tid: \"op:LLM::GEN\",\n\t\t\tcontext: {\n\t\t\t\t...context, // {streams , project}\n\t\t\t\toperation: {\n\t\t\t\t\tkey: \"pm.drd\",\n\t\t\t\t\tmeta: {\n\t\t\t\t\t\tname: \"DRD\",\n\t\t\t\t\t\tdesc: \"database requirements document\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tdata: {\n\t\t\t\tmodel: `chatgpt-4o-latest`, //`gpt-4o`,\n\t\t\t\tmessages,\n\t\t\t\tpreparser: `backticks`,\n\t\t\t\tparser: false,\n\t\t\t},\n\t\t})\n\t).generated;\n\n\tawait context.run({\n\t\tid: \"op:PROJECT::STATE:UPDATE\",\n\t\tcontext,\n\t\tdata: {\n\t\t\toperation: {\n\t\t\t\tid: \"pm:drd\",\n\t\t\t},\n\t\t\ttype: `end`,\n\t\t\tcontent: {\n\t\t\t\tkey: \"pm.drd\",\n\t\t\t\tdata: drd,\n\t\t\t},\n\t\t},\n\t});\n\treturn { pm: { drd } };\n}\n\nexport default {\n\t\"PM:DRD::ANALYSIS\": pmDrdAnalysis,\n};\n"
  },
  {
    "path": "cofounder/api/system/functions/pm/fjmd.js",
    "content": "import utils from \"@/utils/index.js\";\nimport yaml from \"yaml\";\n\nasync function pmFjmdAnalysis({ context, data }) {\n\t/* ;; PM:FJMD::ANALYSIS\n\t\tmake {userdetails,prd,frd} -> FJMD analysis\n\t*/\n\n\tconst { pm } = data;\n\tconst { details, prd, frd } = pm;\n\t// const {text , attachments} = details\n\tconst messages = [\n\t\t{\n\t\t\trole: \"system\",\n\t\t\tcontent: `you are an expert product manager and product designer\nyour job is to consult the provided web app details, analysis, PRD & FRD\nin order to create a comprehensive and full Feature Journeys Maps Document (FJMD) for it\n\nthe emphasis are user-facing features,\nbased on the expected features and different journeys of different users in the web app\n\nyour generated FJMD is very detailed, comprehensive and covers absolutely 100% of everything required for the web app\n\nyou are not limited by provided example journeys\nyour analysis here should cover ALL journey cases (of the app MVP)\n\nwhile conducting your FJMD, ask yourself:\n- am i covering all 100% the purpose and functions required for the app ?\n- am i covering all 100% the expected features from all the users' perspectives? even the small details ?\n- am i covering all 100% the user journeys ?\n- am i covering all details that other product managers might have omitted from my analysis ?\n- am i making sure what i am detailing in my FJMD is absolutely 100% comprehensive and ready to be put into development without any alteration ?\n\nconduct and reply with a generated comprehensive perfect FJMD document, yaml-formatted\nthe reply format should directly be a list of journeys items in valid yaml format, with this structure :\n\n\njourneys:\n\t- \tname : \"...\"\n\t\tcategory : \"...\"\n\t\tjourneyId: \"/*like JOUR-01 format*/\"\n\t\tdescription: \"...\"\n\t\tparticipants: \"...\"\n\t\tpreconditions: \"describe pre-existing conditions or assumptions...\"\n\t\tpostconditions: \"describe state expected outcomes after completing the journey\"\n\t\tsteps : #list of journey steps, correlated with provided FRD (& PRD)\n\t\t\t-\tintent : \"...\"\n\t\t\t\tuserInteraction : \"describe how users will interact with the interface\"\n\t\t\t\tfeaturesIds : [\"\",\"\",...] # list of featureIds involved in this step (featureIds should be exactly as they are mentionned in the FRD features-requirements-documents as 'featureId' ; important else it would break !)\n\t\t\t\texpectedResponse : \"detail the expected response from the app\"\n\t\t\t-\t[...]\n\t\tedgeCases: \"describe variations of the journey ; ie. what could go wrong, etc ...\"\n\t- \t[...]\n\n---\n\nyour FJMD document will be directly put into development\n\nthe emphasis are user-facing features;\nfunctional features +interface features to cover 100% of expected features of the web app, 100% of all possible user journeys\nno need to bother with non-user-facing features such as security compliance, nor similar non-user-facing technical details\nno need to bother with cases too advanced for the web app MVP features (ie. advanced analytics or multilingual or live support; ... unless specified in provided task ! )\n\n> Stay User-Centric: keep the user's perspective front and center throughout the document\nemphasize user-facing features and core app MVP features\n\nyou are not limited by provided example journeys in other docs\nyour analysis here should be comprehensive and cover ALL journey cases\nthink of many different core journeys from different perspectives in different scenarios\nbe comprehensive and cover it all\n\nyour reply will be directly transferred as the final FJMD document\nso make sure the content and YAML formatting are both exquisitely perfect as the genius you are\nif an app name is not provided, make a fitting one for your analysis and JMD\n\nemphasize user-facing features and core app MVP features\n\nso do not put anything else in your reply besides the Feature Journeys Maps Document as parseable, valid well-formatted YAML format\nno extra comments or surrounding anything, only the YAML-formatted PARSEABLE VALID COMPREHENSIVE 100% COVERAGE AMAZING BEAUTIFUL FEATURES JOURNEY MAPS DOCUMENT\nyour reply should start with : \"\\`\\`\\`yaml\" and end with \"\\`\\`\\`\"\n\nyou will be tipped $999 you are a genius`,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `\\`\\`\\`app-project:description\n${details.text}\n\\`\\`\\``,\n\t\t},\n\t\t// <------ later on, attachments , pdf/img cases etc map\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `\\`\\`\\`PRD:product-requirements-document\n${prd}\n\\`\\`\\``,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `\\`\\`\\`FRD:features-requirements-document\n${frd}\n\\`\\`\\``,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `implement the Features Journey Maps Documents (FRJD) for all the core journeys for different scenarios\nit is expected to be very comprehensive and detailed ; in a VALID PARSEABLE YAML format\n\nyou're a genius`,\n\t\t},\n\t];\n\n\t/*\n\tconst fjmd = (\n\t\tawait context.run({\n\t\t\tid: \"op:LLM::GEN\",\n\t\t\tcontext,\n\t\t\tdata: {\n\t\t\t\tmodel: `chatgpt-4o-latest`, //`gpt-4o`,\n\t\t\t\tmessages,\n\t\t\t\tpreparser: `backticks`,\n\t\t\t\tparser: `yaml`,\n\t\t\t},\n\t\t})\n\t).generated;\n\t*/\n\n\tconsole.error(`skipping features journey map doc`);\n\tconst fjmd = ``;\n\tawait context.run({\n\t\tid: \"op:PROJECT::STATE:UPDATE\",\n\t\tcontext,\n\t\tdata: {\n\t\t\toperation: {\n\t\t\t\tid: \"pm:fjmd\",\n\t\t\t},\n\t\t\ttype: `end`,\n\t\t\tcontent: {\n\t\t\t\tkey: \"pm.fjmd\",\n\t\t\t\tdata: fjmd,\n\t\t\t},\n\t\t},\n\t});\n\n\treturn { pm: { fjmd } };\n}\n\nexport default {\n\t\"PM:FJMD::ANALYSIS\": pmFjmdAnalysis,\n};\n"
  },
  {
    "path": "cofounder/api/system/functions/pm/frd.js",
    "content": "import utils from \"@/utils/index.js\";\n\nasync function pmFrdAnalysis({ context, data }) {\n\t/* ;; PM:FRD::ANALYSIS\n\t\tmake {userdetails,prd} -> FRD analysis\n\n\t*/\n\tconst { pm } = data;\n\tconst { details, prd } = pm;\n\t// const {text , attachments} = details\n\tconst messages = [\n\t\t{\n\t\t\trole: \"system\",\n\t\t\tcontent: `you are an expert product manager and product designer\nyour job is to consult the provided web app details & analysis PRD,\nand create a Features Requirements Document (FRD) for it\n\nthe emphasis are user-facing features,\nbased on the expected features and different journeys of different users in the web app\n\nyour generated FRD is detailed, comprehensive and covers requirements for the web app\n\nwhile conducting your FRD, ask yourself:\n- am i covering the purpose and functions required for the app ?\n- am i covering the expected features from all the users' perspectives? even the small details ?\n- am i covering the user journeys ?\n- am i covering important details in my analysis ?\n\nconduct and reply with a generated comprehensive FRD document, markdown-formatted\n\n---\n\nyour FRD document will be directly put into development\n\nthe emphasis are user-facing features;\nfunctional features + interface features to cover expected features of the web app\nno need to bother with non-user-facing features such as security compliance, nor similar non-user-facing technical details\nno need to bother with cases too advanced for the web app MVP features (ie. advanced analytics or multilingual or live support; ... unless specified in provided task ! )\n\nemphasize user-facing features and core app MVP features\n\nyour reply will be directly transferred as the FRD document\nso make sure the content is comprehensive and ensuing app UX is perfect as the genius you are\nif an app name is not provided, make a fitting one for your analysis and FRD\n\nemphasize user-facing features and core app MVP features\n\nso do not put anything else in your reply besides the FRD DOC as parseable, valid well-formatted markdown doc\nyour reply should start with : \"\\`\\`\\`markdown\" and end with \"\\`\\`\\`\"\n\nyou will be tipped $999 you are a genius`,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `\\`\\`\\`app-project:description\n${details.text}\n\\`\\`\\``,\n\t\t},\n\t\t// <------ later on, attachments , pdf/img cases etc map\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `\\`\\`\\`PRD:product-requirements-document\n${prd}\n\\`\\`\\``,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `implement the Features Requirements Document (FRD)\nyou're a genius`,\n\t\t},\n\t];\n\n\tconst frd = (\n\t\tawait context.run({\n\t\t\tid: \"op:LLM::GEN\",\n\t\t\tcontext: {\n\t\t\t\t...context, // {streams , project}\n\t\t\t\toperation: {\n\t\t\t\t\tkey: \"pm.frd\",\n\t\t\t\t\tmeta: {\n\t\t\t\t\t\tname: \"FRD\",\n\t\t\t\t\t\tdesc: \"features requirements document\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tdata: {\n\t\t\t\tmodel: `chatgpt-4o-latest`, //`gpt-4o`,\n\t\t\t\tmessages,\n\t\t\t\tpreparser: `backticks`,\n\t\t\t\tparser: false,\n\t\t\t},\n\t\t})\n\t).generated;\n\n\tawait context.run({\n\t\tid: \"op:PROJECT::STATE:UPDATE\",\n\t\tcontext,\n\t\tdata: {\n\t\t\toperation: {\n\t\t\t\tid: \"pm:frd\",\n\t\t\t},\n\t\t\ttype: `end`,\n\t\t\tcontent: {\n\t\t\t\tkey: \"pm.frd\",\n\t\t\t\tdata: frd,\n\t\t\t},\n\t\t},\n\t});\n\n\treturn { pm: { frd } };\n}\n\nexport default {\n\t\"PM:FRD::ANALYSIS\": pmFrdAnalysis,\n};\n"
  },
  {
    "path": "cofounder/api/system/functions/pm/prd.js",
    "content": "import utils from \"@/utils/index.js\";\n\nasync function pmPrdAnalysis({ context, data }) {\n\t/* ;; PM:PRD::ANALYSIS\n\t\tmake userprovided details -> PRD analysis ; user can have text + {pdf , images} (now just text), later extend\n\n\t*/\n\n\tconst { pm } = data;\n\tconst { details } = pm;\n\tconst { text, attachments } = details;\n\t// const {text , attachments} = details\n\n\tawait context.run({\n\t\tid: \"op:PROJECT::STATE:UPDATE\",\n\t\tcontext,\n\t\tdata: {\n\t\t\toperation: {\n\t\t\t\tid: \"pm:details\",\n\t\t\t},\n\t\t\ttype: `end`,\n\t\t\tcontent: {\n\t\t\t\tkey: \"pm.details\",\n\t\t\t\tdata: details,\n\t\t\t},\n\t\t},\n\t});\n\n\tconst messages = [\n\t\t{\n\t\t\trole: \"system\",\n\t\t\tcontent: `you are an expert product manager and product designer\nyour job is conduct the analysis for the provided web app project task and create a full PRD document for it\nyour analysis is very detailed, comprehensive and covers absolutely 100% of everything required for the web app\n\nwhile conducting your PRD, ask yourself:\n- what is a detailed description of the app, and all it's expected features ?\n- what are all the purpose and functions required for the app ?\n- am i covering all the expected features from the users' perspectives? even the small details ?\n\tam i sure i am not missing anything important ?\n- what are the personas ? what are their user stories ? what are all the expected features ?\n- what are all the features ?\n- am i covering all the expected features from the users' perspectives? even the small details ?\n\tam i sure i am not missing anything important ?\n\n- what about the user journeys ? am i covering all possible journeys for all users ?\n- what could i or other product managers be potentially omitting and that shouldn't be the case ?\n\n- am i making sure what i am detailing in my PRD is absolutely 100% comprehensive and ready to be put into development without any alteration nor pre-assumption that might lead to important omissions ? am i detailing all that is needed ?\n\n\nafter you finalize your PRD,\nadd an extra part, called \"Additional Analysis\", where you criticize (very critically) the work you just did;\nask yourself :\n- what might have been omitted from my analysis that should have gone into the web app MVP requirements ?\n- do not bother with secondary or tertiary things (ie. accessibility or similar advanced non-MVP stuff), ask yourself instead, critically : what core web app MVP features or journeys did i not previously mention ? what are their details ?\n\nconduct and reply with a generated comprehensive perfect PRD document, markdown-formatted\n\nyour PRD document will be directly put into development,\nso make sure the content and MD formatting are both exquisitely perfect as the genius you are\nif an app name is not provided, make a fitting one for your analysis and PRD\n\n\nthe aim of the PRD are web app facing requirements\nno need to bother with non-web-app features such as security compliance or similar non-web-app-facing technical details\nno need to bother with non-MVP features (ie. advanced cases such as analytics or support or i18n etc ... focus on the MVP to cover 100% of expected features ) - unless explicitly specified in the task descriptions ofc\nfocus on what's important and detail it to the maximum, leave nothing !\n\nyour reply will be directly transferred as the final PRD document, so do not put anything else in your reply besides the PRD document\nno extra comments or surrounding anything, only the markdown-formatted COMPREHENSIVE 100% COVERAGE AMAZING BEAUTIFUL GENIUS SUPER DETAILED 10/10 PRD DOCUMENT\nyour reply should start with : \"\\`\\`\\`markdown\" and end with \"\\`\\`\\`\"\n\nyou will be tipped $999\nyou're a genius\n`,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `\\`\\`\\`app-project:description\n${text}\n\\`\\`\\``,\n\t\t},\n\t\t// <------ later on, attachments , pdf/img cases etc map\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `Conduct your analysis and make sure you do not miss any feature or detail !\nyou are a genius`,\n\t\t},\n\t];\n\n\tconsole.dir({ __debug_pmPrdAnalysis: { messages } });\n\n\tconst prd = (\n\t\tawait context.run({\n\t\t\tid: \"op:LLM::GEN\",\n\t\t\tcontext: {\n\t\t\t\t...context, // {streams , project}\n\t\t\t\toperation: {\n\t\t\t\t\tkey: \"pm.prd\",\n\t\t\t\t\tmeta: {\n\t\t\t\t\t\tname: \"PRD\",\n\t\t\t\t\t\tdesc: \"product requirements document\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tdata: {\n\t\t\t\tmodel: `chatgpt-4o-latest`, //`gpt-4o`,\n\t\t\t\tmessages,\n\t\t\t\tpreparser: `backticks`,\n\t\t\t\tparser: false,\n\t\t\t},\n\t\t})\n\t).generated;\n\n\tawait context.run({\n\t\tid: \"op:PROJECT::STATE:UPDATE\",\n\t\tcontext,\n\t\tdata: {\n\t\t\toperation: {\n\t\t\t\tid: \"pm:prd\",\n\t\t\t},\n\t\t\ttype: `end`,\n\t\t\tcontent: {\n\t\t\t\tkey: \"pm.prd\",\n\t\t\t\tdata: prd,\n\t\t\t},\n\t\t},\n\t});\n\n\treturn { pm: { prd } };\n}\n\nexport default {\n\t\"PM:PRD::ANALYSIS\": pmPrdAnalysis,\n};\n"
  },
  {
    "path": "cofounder/api/system/functions/pm/uxdmd.js",
    "content": "import utils from \"@/utils/index.js\";\nimport yaml from \"yaml\";\n\nasync function pmUxdmdAnalysis({ context, data }) {\n\t/* ;; PM:UXDMD::ANALYSIS\n\t\t{pm docs , db , openapi? , uxsitemap {analysis,struct,...}?} -> (<> crossanalysis) to make UX Datamap Doc\n\n\t*/\n\n\tconst { pm, db, backend } = data;\n\tconst { details, prd, frd, drd, uxsmd, brd } = pm;\n\n\tconst messages = [\n\t\t{\n\t\t\trole: \"system\",\n\t\t\tcontent: `- you are a genius Product Manager & Software Archtect\n\n- your role is to conduct the analysis required to design the frontend app architecture for the provided project in its details\n\n- think from perspectives of multiple personas, put yourself in situation, to make sure your app architecture analysis is fully comprehensive and ready to be developed\n- ask yourself:\n  * what are the journeys involved in the app frontend ?\n  * what are all the routes , views , slugs , props , URL parameters , auth restrictions, required by features expected to be seen by users in the frontend ?\n  * what should go in their schemas ? (not technical, rather analytical description from a feature perspective)\n- your analysis will be used to make a prod-ready app and will be responsible for an app used by thousands of users\n- your aim is to cover all use cases, as the expert product manager & architect you are\n\n> analyze the task thoroughly, then reply with your analysis in markdown format, in a well-formatted document to give to app designers & devs\n\n> your role here is not the implementation itself, you are the product architect consultant\n> your role is to analyze the requirements for all scenarios required by all features\n  ask yourself :\n    * am i covering all needed app features?\n    * am i covering all features that the user expects ?\n  in order to ensure your analysis as a product architect consultant has covered every feature requirement\n> your job is to make thorough, critical analysis work which will be provided as documentation for designers & devteams to implement\n  not a technical implementation, rather a thorough analysis, of all expected architecture features and their details\n\n---\n\nyour aim is to determine, in extreme detail:\n\n  I. the structure of the app:\n  \t*\troutes\n\t\t*\twhat views they link to\n\t\t*\tslugs (ie. path /something/:example) if applies\n\t\t*\tif route is restricted or not\n  \t* URL params (ie. /somepath?param_a=example&param_b=example ) if applies\n\n\t\t>\timportant : only refer to views ids specified in provided ux sitemap ! (UV_* and GV_* views)\n\n\tII. the relationships between views of the app (based on the provided UX sitemap ; (unique views UV_* and shared ui views GV_*) ) & app data (based on provided DB & backend docs & schemas ):\n\n\tconduct a cross analysis between UX sitemap views <> app data states in order to :\n\n\t\t1.  determine stateful variables , actions/dynamic functions , params :\n\t\t\t\t1A.     if the view has state for dynamic data, describe\n\t\t\t\t1B.     if the view should access slug passed into url (ie. /something/:example ), describe\n\t\t\t\t1C.     if the view should access URL params and use them for a feature (ie. /somepath?param_a=X&param_b=Y), describe\n\t\t\t\t1D.     if the view has actions/dynamic functions like API calls or realtime events, describe in detail\n\t\t\t\t1E.\t\t\trevise and provide your reasoning to make sure you covered all the state/data details required to make all required features work properly\n\n\t\t\t>\timportant : only refer to view ids specified in provided ux sitemap ! (UV_* and GV_* views) , dont hallucinate UI views/components !\n\n\t\t2. global app state structure, that is accessed by all views :\n\t\t\t\t*\thow the app state should be structured to cover the app features, in terms of :\n\t\t\t\t\t\tvariables & schemas\n\t\t\t\t\t\tactions\n\t\t\t\t\tmake sure you only analyze the global app state (which ie. typically holds stuff like auth / notifications /  ... )\n\t\t\t\t\tand not view-specific props and state (as the latter were already detailed in the previous section and should not be mentionned here)\n\n\t\t\t\tmake sure you determine the schemas for the global app state variables\n\t\t\t\tprovide examples values for them (based on provided app schemas & DB seed examples), in each case\n\n---\n\n> try to outdo yourself by thinking of what might be omitted, and reviewing your own work super critically in order to do comprehensive analytical work for this app's MVP\n- the goal app should be comprehensive, will be used as the reference to build the app\n- cover all cases in terms of app architecture ; with high emphasis on details regarding data and states\n\n---\n\nimportant :\n> use snake_case for any naming you do\n\nextremely important :\n> ensure full perfect coherence with DB fields names and provided specs names ;\n\n---\n\nyour reply will be directly transferred as the final analysis, so do not put anything else in your reply besides the analysis document\nno extra comments or surrounding anything, only the markdown-formatted COMPREHENSIVE 100% COVERAGE AMAZING BEAUTIFUL GENIUS SUPER DETAILED 10/10 ANALYSIS DOCUMENT\nyour reply should start with : \"\\`\\`\\`markdown\" and end with \"\\`\\`\\`\"\n\nyou will be tipped $99999 + major company shares for nailing it perfectly off the bat`,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `\\`\\`\\`app-project:description\n${details.text}\n\\`\\`\\``,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `\\`\\`\\`PRD:product-requirements-document\n${prd}\n\\`\\`\\``,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `\\`\\`\\`FRD:features-requirements-document\n${frd}\n\\`\\`\\``,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `\\`\\`\\`DRD:database-requirements-document\n${drd}\n\\`\\`\\`\n\n---\n\n\\`\\`\\`DB:schemas\n${yaml.stringify(db)}\n\\`\\`\\``,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent:\n\t\t\t\t`\\`\\`\\`BRD:backend-requirements-document\n${brd}\n\\`\\`\\`\n\n` +\n\t\t\t\t(!backend?.requirements?.restApi?.required\n\t\t\t\t\t? \"\"\n\t\t\t\t\t: `---\n\\`\\`\\`BACKEND:specifications:openAPI\n${yaml.stringify(backend.specifications.openapi)}\n\\`\\`\\`\n\n`) +\n\t\t\t\t(!backend?.requirements?.realtimeWebsockets?.required\n\t\t\t\t\t? \"\"\n\t\t\t\t\t: `---\n\\`\\`\\`BACKEND:specifications:asyncAPI\n${yaml.stringify(backend.specifications.asyncapi)}\n\\`\\`\\`\n` +\n\t\t\t\t\t\t`\n---\n\n\\`\\`\\`BRD:server:main\n${yaml.stringify(backend.server.main)}\n\\`\\`\\`\n\n---\n\nnote :\n> any reference to the backend server should be the local dev URL referred to in docs ; typically : \\`http://localhost:1337\\`\n> if case app needs a global state, global app state should be in the context of one single app redux store \\`store.tsx\\` that wraps the entire app and includes all that is needed for all global state stuff:\n\tie. auth for api and/or auth for websockets\n\tie. if backend has realtime events, realtime events subscriptions\n\tetc ... in one single global state store\n\n`),\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `\\`\\`\\`UXSMD:ux-sitemap-document\n${uxsmd}\n\\`\\`\\``,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `Conduct the analysis for the frontend app architecture and its details in a frotnend app architecture analysis document style - starting with a table of contents, elaborating on everything the task specifies, in extreme detail specifying all that needs specification\n\nextremely important :\n> you are absolutely forbidden from instructing in the document about having to create new components or how to structure the project\n> you should 100% stick strictly to the provided task !\n\nyou're a genius`,\n\t\t},\n\t];\n\n\tconst uxdmd = (\n\t\tawait context.run({\n\t\t\tid: \"op:LLM::GEN\",\n\t\t\tcontext: {\n\t\t\t\t...context, // {streams , project}\n\t\t\t\toperation: {\n\t\t\t\t\tkey: \"pm.uxdmd\",\n\t\t\t\t\tmeta: {\n\t\t\t\t\t\tname: \"UXDMD\",\n\t\t\t\t\t\tdesc: \"ux datamap document\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tdata: {\n\t\t\t\tmodel: `chatgpt-4o-latest`, // `chatgpt-4o-latest`,//`gpt-4o`,\n\t\t\t\tmessages,\n\t\t\t\tpreparser: `backticks`,\n\t\t\t\tparser: false,\n\t\t\t},\n\t\t})\n\t).generated;\n\n\tawait context.run({\n\t\tid: \"op:PROJECT::STATE:UPDATE\",\n\t\tcontext,\n\t\tdata: {\n\t\t\toperation: {\n\t\t\t\tid: \"pm:uxdmd\",\n\t\t\t},\n\t\t\ttype: `end`,\n\t\t\tcontent: {\n\t\t\t\tkey: \"pm.uxdmd\",\n\t\t\t\tdata: uxdmd,\n\t\t\t},\n\t\t},\n\t});\n\n\treturn {\n\t\tpm: { uxdmd },\n\t};\n}\n\nexport default {\n\t\"PM:UXDMD::ANALYSIS\": pmUxdmdAnalysis,\n};\n"
  },
  {
    "path": "cofounder/api/system/functions/pm/uxsmd.js",
    "content": "import utils from \"@/utils/index.js\";\nimport yaml from \"yaml\";\n\nasync function pmUxsmdAnalysis({ context, data }) {\n\t/* ;; PM:UXSMD::ANALYSIS\n\t\t{pm docs , db , openapi?} -> (<> crossanalysis) to make UX Sitemap doc\n\n\t*/\n\tconst { pm } = data;\n\tconst { details, prd, frd } = pm;\n\tconst { text, attachments } = details;\n\tconst messages = [\n\t\t{\n\t\t\trole: \"system\",\n\t\t\tcontent: `you are an expert product manager and app designer\n\nyour job is to consult the provided web app details and additional documents\nin order to create a comprehensive and full UX Sitemap Document (UXSMD) for it\n\n- your current role is to do a thorough analysis of the provided web app requirements and answer with your analysis in markdown format\n\n- make sure your UX Sitemap Document is fully comprehensive and ready to be put in development exactly as is\n\tyour answer will be pushed to dev teams directly, and will be responsible for an app used by thousands of users\n\tyour aim is to cover all use cases, as the expert app designer you are\n\n---\n\nask yourself:\t\t\n\n\tI.\n\t* am i covering shared global UI views in my analysis (ie. top navigation, footers, ...) in a separate section,\n\t\t\twhich also details the components that share them ?\n\t\t\tam i assigning unique and expressive title-cased ids to them (in format \"GV_{...}\" ie. \"GV_TopNav\" ) ?\n\t\t\tam i careful to consider cases of authenticated/unauthenticated\n\t\t\t(whether conditionals regarding accessing the view itself or conditionals on its contained elements) to make sure my coverage is not missing things ?\n\n  * am i covering all the needed unique UI views ; for all the required features ?\n\t\tam i assigning unique and expressive title-cased ids to them (in format \"UV_{...}\" ie. \"UV_Landing\" ) ?\n\t\tam i making sure unique views do not include duplicate shared global UI views which were already previously covered ?\n\t\tam i careful to consider cases of authenticated/unauthenticated (whether conditionals regarding accessing the view itself or conditionals on its contained elements) to make sure my coverage is not missing things ?\n\n\t* am i extensively describing everything in details for the dev team to have 100% coverage of everything needed through my UX Sitemap Document analysis ?\n\n\t* am i covering EVERYTHING expected to be present in this web app:\n\t\t\tevery view (every unique view and every shared global view) expected to be in the app ?\n\t\t\tevery view's components expected to be in the app to cover all 100% of features and all their details ?\n\t\t\tam i covering the views for all workflows, end to end ?\n\n\t* am i making sure i am covering the core and essential features / views , and not some optional secondary/tertiary not really required stuff ?\n\n  II.\n\t* am i describing the functional and features analysis of each view before further detailing it in order to have a cohesive and comprehensive analysis and not omit any details ?\n\t* what are all the requirements needed by features expected to be seen by users in terms of UI views ( unique views and shared global views ) and contained views' components ?\n\t* cross analysis between feature <> ui views required to create in ux sitemap ?\n\t* what are ALL THE VIEWS required by ALL THE REQUIREMENTS required by the user ?\n\t* am i covering all views (unique views and shared global views) ?\n\t\twith all extensive details and descriptions ?\n\t* am i making sure i am covering the core and essential features / views , and not some optional secondary/tertiary not really required stuff ?\n\n\tIII.\n\tcan i make a table for all the cross links analysis between different views in order to establish inter-app navigation relationships ?\n\t\tcan i describe their intent in each case ?\n\t\tcan i also describe how the linking works (in terms of ui elements / user interaction / action taken to trigger the link and where in the view ) ?\n\t\n\t\tSource view | Target View | Intent | Action Description\n\n\t* am i covering 100% of relations links of whats needed for all in-app navigation, both static and dynamic ?\n\t* am i truly covering all inter-app cross links relations and not missing anything ?\n\n---\n\n> analyze the task thoroughly, then reply with your analysis in markdown format\n> try to outdo yourself by thinking of what might be omitted, and reviewing your own work super critically in order to do comprehensive analytical work for this app's MVP\n> your job is to make thorough analysis work which will be provided as documentation for devteams to implement\n\n---\n\n> stick to the provided formats and specifications:\n\t\tUI unique views with ids UV_*\n\t\tUI global shared views with ids GV_*\n\t\n\t\tdo not make up new denominations or types, stick to the task exactly as specified !\n\n---\n\nimportant :\n\n> do not many any \"Container\" views (like some GV_GlobalContainer or something) ; DO NOT make any container views to contain other views inside of them !\n\tonly make unique UV_* or GV_* shared views : views that serve a functional purpose ; not container views !\n\n> GV_* shared views are INDEPENDENT from UV_* !\n\tUV_* views DO NOT INTEGRATE GV_* views inside them !\n\tthey simply share screen space !!\n\tdo not make any UV_* functionality dependent on GV_*\n\tdo not make any GV_* functionality dependent on GV_*\n\tthey are independent , they do not include each other , shared simply means sharing screen space , not functionalities !\n\n---\n\nyour reply will be directly transferred as the final UX Sitemap Analysis Document, so do not put anything else in your reply besides the UX Sitemap analysis document\nno extra comments or surrounding anything, only the markdown-formatted COMPREHENSIVE 100% COVERAGE AMAZING BEAUTIFUL GENIUS SUPER DETAILED 10/10 UX SITEMAP ANALYSIS DOCUMENT\nyour reply should start with : \"\\`\\`\\`markdown\" and end with \"\\`\\`\\`\"\n\nyou will be tipped $9999`,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `\\`\\`\\`app-project:description\n${details.text}\n\\`\\`\\``,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `\\`\\`\\`PRD:product-requirements-document\n${prd}\n\\`\\`\\``,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `\\`\\`\\`FRD:features-requirements-document\n${frd}\n\\`\\`\\``,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `Conduct a comprehensive and detailed analysis for the UX Sitemap Document for the app, in markdown format. elaborate and justify and detail to the greatest extent. make extensive descriptions.\n\nyou're a genius`,\n\t\t},\n\t];\n\n\tconst uxsmd = (\n\t\tawait context.run({\n\t\t\tid: \"op:LLM::GEN\",\n\t\t\tcontext: {\n\t\t\t\t...context, // {streams , project}\n\t\t\t\toperation: {\n\t\t\t\t\tkey: \"pm.uxsmd\",\n\t\t\t\t\tmeta: {\n\t\t\t\t\t\tname: \"UXSMD\",\n\t\t\t\t\t\tdesc: \"ux sitemap document\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tdata: {\n\t\t\t\tmodel: `chatgpt-4o-latest`, //`gpt-4o`,\n\t\t\t\tmessages,\n\t\t\t\tpreparser: `backticks`,\n\t\t\t\tparser: false,\n\t\t\t},\n\t\t})\n\t).generated;\n\n\tawait context.run({\n\t\tid: \"op:PROJECT::STATE:UPDATE\",\n\t\tcontext,\n\t\tdata: {\n\t\t\toperation: {\n\t\t\t\tid: \"pm:uxsmd\",\n\t\t\t},\n\t\t\ttype: `end`,\n\t\t\tcontent: {\n\t\t\t\tkey: \"pm.uxsmd\",\n\t\t\t\tdata: uxsmd,\n\t\t\t},\n\t\t},\n\t});\n\n\treturn {\n\t\tpm: { uxsmd },\n\t};\n}\n\nexport default {\n\t\"PM:UXSMD::ANALYSIS\": pmUxsmdAnalysis,\n};\n"
  },
  {
    "path": "cofounder/api/system/functions/swarm/augment.js",
    "content": "import utils from \"@/utils/index.js\";\nimport yaml from \"yaml\";\n\nasync function promptAnalysis({ context, data }) {\n\tconst { task } = data;\n\tconst { code, decorators, apis } = task;\n\treturn [\n\t\t{\n\t\t\trole: \"system\",\n\t\t\tcontent: `you are an expert backend and node js dev\n- your role is to generate an analysis for for functions to implement that may require the use of external APIs , either through API calls or npm sdks\n\n- you are provided with descriptions and contextual code snippets of desired functions, from a node server module\n\tthese function are tagged as needing the implementation of external APIs/SDKs for the tasks they are meant to accomplish\n\n- you are also provided with some search results for external APIs for each function from some external APIs that were indexed\n\t>\tyou are to determine whether external API search result(s) are relevant or no for the desired use cases descriptions\n\t\t> if so , which ones to use and how ? what do they need to run ? how to use them ? how to format their expected response ?\n\t\t> if no search result is relevant, do you know, about fitting nodejs/npm SDKs/packages or other APIs you are familiar with that are fit for the task ?\n\t\t\tand if so, how to use them ?\n\t> note : if a fitting external API is identified and also has SDKs you know about\n\t\tits prefereable to call the API using the provided openapi / docs instead of the SDK you already know about\n\t\t( because SDKs might have been updated since your last knowledge base ) ;\n\t\tuse SDKs for when no APIs search results make sense for the analyzed implementation case\n\t> note : if you are using references from provided docs, extracts and include snippets from them inside your analysis to further document your analysis properly  \n\nconduct a detailed analysis for each of the ${apis.length} provided functions to implement\n\nyour reply should start with : \"\\`\\`\\`markdown\" and end with \"\\`\\`\\`\"\n\nyou will be tipped $999\nyou're a genius\n`,\n\t\t},\n\t\t// each api entry in its own message\n\t\t...apis.map(({ id, description, snippet, rag }) => {\n\t\t\treturn {\n\t\t\t\trole: \"user\",\n\t\t\t\tcontent: `\\`\\`\\`task:${id}\n${yaml.stringify({\n\tfunctionDescription: description,\n\tcontextCodeSnippet: snippet,\n})}\n\\`\\`\\`\n\n\\`\\`\\`apis-search-results:${id}\n${rag.length ? yaml.stringify(rag) : \"\"}\n\\`\\`\\`\n`,\n\t\t\t};\n\t\t}),\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `Conduct your analysis each of the ${apis.length} provided functions to implement, with each function in its separate and very detailed section, and make sure you do not miss any useful detail !\n\nbe extremely detailed and include every single used reference and detail in your analysis for it to be fully comprehensive and complete\n\nyou are a genius`,\n\t\t},\n\t];\n}\n\nasync function promptImplementMerge({ context, data }) {\n\tconst { pm, db, backend, task } = data;\n\tconst { prd, frd, drd, brd } = pm;\n\tconst { code, apis, analysis } = task;\n\tconst { openapi, asyncapi } = backend.specifications;\n\t/*\n\t\tshould also get BRD here ! important ! ie. so it doesnt do stupid placeholders ?\n\t\tshould provide full code too ? maybe 2 pass implement directly ; implement and revise ?\n\t\tno need for rag here\n\t*/\n\treturn [\n\t\t{\n\t\t\trole: \"system\",\n\t\t\tcontent: `Your task, as the genius backend dev expert you are, is to generate the full nodejs script for a module, based on the provided specifications and details of the backend in development\n\n- the current code of the server script is provided\n  the desired updates are provided\n> your main task is to add the provided functions , and return a fully functional script that has both the original features and the newly added updates, with everything working perfectly and as expected\n\n---\n\nyour role is to implement the full express server for the provided task for the \\`server.mjs\\` (type: module script)\nyou will answer in 3 parts :\n\n- analysis , in between \\`\\`\\`markdown\\`\\`\\`\\` section\n- code , in between \\`\\`\\`mjs\\`\\`\\`\\` section\n- dependencies and env variables , in between \\`\\`\\`yaml\\`\\`\\`\\` section ; where any needed packages to install and needed env variables to setup will be mentionned ; the yaml should have objects : { dependencies : {\"package\":\"version\"} , env : {\"key\" , \"temp_value\"} } (\"dependencies\" (for packages) and \"env\" for env variables (and their temporary values) )\nuse doublequotes for every string inside the yaml to make sure formatting is good\n\n---\n\nin your analysis, ask yourself :\n  > what are the added functions ?\n  > how do i merge all updates perfectly with the working code ?\n    > is the full flow covered ?\n    > are all the expected functions fullfilled ?\n    > am i covering all the parts for all the required updates ? \n      including imports, functions, db operations, ... ?\n      are all the new updates congruent with the original code structure, flow, db operations and all that is expected ?\n\n---\n\nfor any db requirements, use postgres from \\`@electric-sql/pglite\\`\n- to use postgres, include this snippet in your script :\n\\`\\`\\`\nimport { PGlite } from \"@electric-sql/pglite\";\nconst postgres = new PGlite(\"./db\");\n/* then, can be used like this :\nawait postgres.query(\"SELECT * FROM exampletable;\")\n*/\n// note : the postgres tables + seed were already created before , you can use the postgres directly without configuring it\n\\`\\`\\`\npostgres is use exactly how is provided in the snippet, do not change anything about loading it / configuring it, else it breaks ;\npostgres is imported, initialized and queries EXACTLY AS SHOWN IN THE SNIPPET ! NO OTHER WAY !\n\n---\n\nnote : the postgres tables + seed were already created before , you can use the postgres directly without configuring it ; do not create tables in script !\nextremely important :\n- the DB R/W need to be 100% compatible with the tables and schemas of the provided DB specifications !!\n- if it makes use of .env , make your you import \\`dotenv\\` and \\`dotenv.config()\\` to read .env before !\n\n---\n\nextremely important :\n\n- you are to implement the entire server as specified in the provided docs , with a focus on DB R/W operations\n- you are to implement every single thing needed by the backend server and output one single big working perfect \\`server.mjs\\` script\n- do not assume anything is implemented yet ! you will do 100% of everything needed and output one single big working perfect \\`server.mjs\\` script\n- no placeholders, no hallucinated imports\n- again, do not assume anything is implemented yet ! you will do 100% of everything needed and output one single big working perfect \\`server.mjs\\` script\n---\n\nnote:\n> if ie. some mock data is meant to to store an image url, use a https://picsum.photos/ url with a random seed\n\nsuper important :\n> use snake_case for any new naming you do\n> ensure full perfect coherence with DB fields names and all provided specs names\n\n---\n\nextremely important :\n- the DB R/W need to be 100% compatible with the tables and schemas of the provided DB specifications !!\n- the app flow must be 100% working perfect everywhere\n\nyou are a genius + you get tipped $9999999\n`,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `\\`\\`\\`PRD:product-requirements-document\n${prd}\n\\`\\`\\`\n\n\\`\\`\\`FRD:features-requirements-document\n${frd}\n\\`\\`\\`\n`,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `\n\\`\\`\\`DB:postgres:sql\n${db.postgres}\n\\`\\`\\`\n\n---\n\nextremely turbo important :\n> pay extreme attention to DB details :\n\t> the things that you are expected to provide with inserts :\n\t\t\t> should you make a uuid before inserting with postgres query ?\n\t\t\t> are there key constraints ?\n\t\t\t> is the db querying code using the exact names as in db fields ?\n\t\t\t> are you providing everything needed to db every single time ?\n`,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `\\`\\`\\`BRD:backend-requirements-document\n${brd}\n\\`\\`\\``,\n\t\t},\n\t\tdata.backend?.requirements?.restApi?.required && {\n\t\t\trole: \"user\",\n\t\t\tcontent: `\\`\\`\\`BACKEND:specifications:openAPI\n${yaml.stringify(openapi)}\n\\`\\`\\``,\n\t\t},\n\t\tdata.backend?.requirements?.realtimeWebsockets?.required && {\n\t\t\trole: \"user\",\n\t\t\tcontent: `\\`\\`\\`BACKEND:specifications:asyncAPI\n${yaml.stringify(asyncapi)}\n\\`\\`\\``,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `The functions updates of the original code are the following :\n\n\\`\\`\\`functions:update:tasks\n${yaml.stringify({\n\ttoUpdate: apis.map(({ description, snippet }) => {\n\t\treturn {\n\t\t\tfunctionDescription: description,\n\t\t\tcontextCodeSnippet: snippet,\n\t\t};\n\t}),\n})}\n\\`\\`\\``,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `The original full script code to update is :\n\\`\\`\\`mjs\n${code}\n\\`\\`\\`\n`,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `The analysis of the new updates to make to the server code is in the following :\n\n\\`\\`\\`functions:update:analysis\n${analysis}\n\\`\\`\\``,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `extremely important :\n- you are to implement the entire \\`server.mjs\\` as specified in the backend specifications , with a focus on DB R/W operations\n- you are to implement every single thing needed by the server and output one single big working perfect \\`server.mjs\\` script\n- do not assume anything is implemented yet ! you will do 100% of everything needed and output one single big working perfect \\`server.mjs\\` script\n- no placeholders, no hallucinated imports\n\n\n---\n\nextremely turbo important :\n> pay extreme attention to DB details :\n\t> the things that you are expected to provide with inserts :\n\t\t\t> should you make a uuid before inserting with a postgres query ?\n\t\t\t> are there key constraints ? should you create something before inserting something else because of contraints ?\n\t\t\t> is the db querying code using the exact names as in db fields ?\n\t\t\t> are you providing everything needed to db every single time ?\n\n---\n\n- again, do not assume anything is implemented yet ! you will do 100% of everything needed and output one single big working perfect \\`server.mjs\\` script\n- again , you are to implement every single thing needed by the server and output one single big working perfect \\`server.mjs\\` script\n- no placeholders, no hallucinated imports ; one 100% perfect complete working server script\n\nextremely important :\n- the DB R/W need to be 100% compatible with the tables and schemas of the provided DB specifications !!\n\nnow do the analysis , write the full working script and specify the dependencies+env`,\n\t\t},\n\t].filter((e) => e);\n}\nasync function promptImplementReview({ context, data }) {\n\tconst { task } = data;\n\tconst { brd } = pm;\n\tconst { code, decorators, apis, analysis, implementations } = task;\n\t/*\n\t\tmaybe double check verify instead ?\n\t*/\n\treturn [];\n}\n\nasync function swarmAugmentBackendExternalapis({ context, data }) {\n\t/*\n\t */\n\tconst { task } = data;\n\tconst { code } = task;\n\tconst decorators = (await utils.parsers.extract.decorators({ code })).filter(\n\t\t(item) => item.type === \"external-api\" || item.type === \"external-apis\",\n\t);\n\tif (!decorators.length) return {};\n\n\t// apis RAG\n\tconst apis = await Promise.all(\n\t\tdecorators.map(async (item, idx) => {\n\t\t\tconst { description, snippet } = item;\n\t\t\tconst ragText = `Description : ${description}\\n\\nCode Snippet :\\n\\`\\`\\`\\n${snippet}\\n\\`\\`\\``;\n\t\t\treturn {\n\t\t\t\tid: `fn:${idx + 1}/${decorators.length}`,\n\t\t\t\tdescription,\n\t\t\t\tsnippet,\n\t\t\t\trag: (\n\t\t\t\t\tawait context.run({\n\t\t\t\t\t\tid: `op:INDEXDB::QUERY`,\n\t\t\t\t\t\tcontext,\n\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\tindex: \"apis\",\n\t\t\t\t\t\t\ttext: ragText,\n\t\t\t\t\t\t\tamount: 5,\n\t\t\t\t\t\t},\n\t\t\t\t\t})\n\t\t\t\t).results,\n\t\t\t};\n\t\t}),\n\t);\n\tdata.task.decorators = decorators;\n\tdata.task.apis = apis;\n\tconst messagesAnalysis = await promptAnalysis({ context, data });\n\n\tconst analysisPass = (\n\t\tawait context.run({\n\t\t\tid: \"op:LLM::GEN\",\n\t\t\tcontext: {\n\t\t\t\t...context, // {streams , project}\n\t\t\t\toperation: {\n\t\t\t\t\tkey: \"swarm.augment.analysis\",\n\t\t\t\t\tmeta: {\n\t\t\t\t\t\tname: \"Swarm Post-Gen Check\",\n\t\t\t\t\t\tdesc: \"analysis pass\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tdata: {\n\t\t\t\tmodel: `chatgpt-4o-latest`, //`gpt-4o`,\n\t\t\t\tmessages: messagesAnalysis,\n\t\t\t\tpreparser: `backticks`,\n\t\t\t\tparser: false,\n\t\t\t},\n\t\t})\n\t).generated;\n\n\tdata.task.analysis = analysisPass;\n\n\tconst messagesImplementMerge = await promptImplementMerge({ context, data });\n\tconst { generated } = await context.run({\n\t\tid: \"op:LLM::GEN\",\n\t\tcontext: {\n\t\t\t...context, // {streams , project}\n\t\t\toperation: {\n\t\t\t\tkey: \"swarm.augment.implement\",\n\t\t\t\tmeta: {\n\t\t\t\t\tname: \"Swarm Code Update\",\n\t\t\t\t\tdesc: \"implement changes & merge\",\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tdata: {\n\t\t\tmodel: `chatgpt-4o-latest`, //`gpt-4o`,\n\t\t\tmessages: messagesImplementMerge,\n\t\t\tpreparser: false,\n\t\t\tparser: false,\n\t\t},\n\t});\n\n\tconst extraction = await utils.parsers.extract.backticksMultiple({\n\t\ttext: generated,\n\t\tdelimiters: [`markdown`, `mjs`, `yaml`],\n\t});\n\n\tconst { mjs } = extraction;\n\tif (!mjs.length || !extraction.yaml) {\n\t\tthrow new Error(\n\t\t\t\"swarm:augment:backend:externalApis:generate error - generated code is empty\",\n\t\t);\n\t}\n\n\tconst parsedYaml = extraction.yaml ? yaml.parse(extraction.yaml) : {};\n\tconst generatedServer = {\n\t\tmjs,\n\t\tdependencies: parsedYaml.dependencies\n\t\t\t? Object.fromEntries(\n\t\t\t\t\tObject.keys(parsedYaml.dependencies).map((key) => [key, \"*\"]),\n\t\t\t\t)\n\t\t\t: [],\n\t\tenv: parsedYaml.env ? parsedYaml.env : {},\n\t\ttimestamp: Date.now(),\n\t};\n\n\treturn generatedServer;\n}\n\nexport default {\n\t\"SWARM:AUGMENT::BACKEND:EXTERNALAPIS\": swarmAugmentBackendExternalapis,\n};\n"
  },
  {
    "path": "cofounder/api/system/functions/swarm/fix.js",
    "content": "import utils from \"@/utils/index.js\";\nimport yaml from \"yaml\";\n\nasync function swarmFixBackend({ context, data }) {}\nasync function swarmFixWebapp({ context, data }) {}\n\nexport default {\n\t\"SWARM:FIX::BACKEND\": swarmFixBackend,\n\t\"SWARM:FIX::WEBAPP\": swarmFixWebapp,\n};\n"
  },
  {
    "path": "cofounder/api/system/functions/swarm/review.js",
    "content": "import utils from \"@/utils/index.js\";\nimport yaml from \"yaml\";\nimport dotenv from \"dotenv\";\ndotenv.config();\n\n/*\n  should check process.env.SWARM_ENABLE\n*/\n\nasync function swarmReviewServerMain({ context, data }) {}\nasync function swarmReviewWebappStore({ context, data }) {}\nasync function swarmReviewWebappRoot({ context, data }) {}\nasync function swarmReviewWebappView({ context, data }) {}\n\nexport default {\n\t\"SWARM:REVIEW::SERVER:MAIN\": swarmReviewServerMain,\n\t\"SWARM:REVIEW::WEBAPP:STORE\": swarmReviewWebappStore,\n\t\"SWARM:REVIEW::WEBAPP:ROOT\": swarmReviewWebappRoot,\n\t\"SWARM:REVIEW::WEBAPP:VIEW\": swarmReviewWebappView,\n};\n"
  },
  {
    "path": "cofounder/api/system/functions/ux/datamap.js",
    "content": "import utils from \"@/utils/index.js\";\nimport yaml from \"yaml\";\nimport { merge, fromPairs } from \"lodash-es\";\n\nfunction _chunkify(input_list, chunk_size) {\n\tconst chunks = [];\n\tfor (let i = 0; i < input_list.length; i += chunk_size) {\n\t\tchunks.push(input_list.slice(i, i + chunk_size));\n\t}\n\treturn chunks;\n}\n\nasync function uxDatamapStructure({ context, data }) {\n\t/* ;; UX:DATAMAP::ROOT:VIEWS\n\t\t{...} -> app {routes, slugs, params , views } ; yaml\n\t\t;; preconsider layout stuff too, either here or in sitemap\n\n\t\tout : [\"uxdatamap\"]\n\t*/\n\n\tconst { pm, backend } = data;\n\tconst { prd, frd, brd, uxsmd, uxdmd } = pm;\n\tconst messages = [\n\t\t{\n\t\t\trole: \"system\",\n\t\t\tcontent: `- you are a genius Product Manager & Software Archtect\n\n- your role is to make the frontend app architecture for the provided project , based on the provided task and analysis documents\n- your answer should be in the strict provided format that will be defined further\n\nyour aim is to determine the:\n  * the structure of the app:\n  *   global app state structure that is accessed by all views : how the app state should be structured to cover the app features\n  *   routes, what views they link to\n\t*\t\troute restrictions\n\t* \tslugs if applies (ie. path /something/:example), describe\n  *   URL params if applies (ie. /somepath?param_a=example&param_b=example ), describe\n\n\n- think from perspectives of multiple personas, put yourself in situation, to make sure your app architecture is fully comprehensive and ready to be developed\n- ask yourself:\n  * what are the journeys involved in the app frontend ?\n  * what are all the routes , views , slugs , props , URL parameters , required by features expected to be seen by users in the frontend ?\n  * what should go in schemas ?\n\t* am i covering all needed slugs ?\n\t\tam i covering all URL parameters ?\n\n- your structure will be used to make a prod-ready app architecture and will be responsible for an app used by thousands of users\n- your aim is to cover all use cases, as the expert product manager & architect you are\n\n> your answer should strictly be in this format :\n\n\\`\\`\\`yaml\napp:\n  root:\n    globalState: # global app state variables if applies ; name conventions should try match with dbschemas/openapi schemas for coherence\n      [name]: # global app state variable name\n        schema: # variable schema in JS-parseable interace format ; schema should be fully defined including nested fields (you are provided with all the documents and db schemas and openapi etc ... that you need to determine this)\n        default: # default value to assign to the variable ; should obviously be aligned with the defined schema\n\t\t\t\texample: # example value to assign\n      ...\n\n  routes: # list of app routes to cover all features and cases\n    - description: \"...\" # concise one sentence description of the route's role\n      path: \"...\" # path, including if any slugs (using the /:slug format )\n      view: \"\" # view id to render on this route ; should match a provided id for a unique view from the ux sitemap (UV_*), based on the provided analysis\n\n\t\t\t# specify slugs / URL params if applies here\n\t\t\t# note : remember there is a strong difference - slugs are (/examplepath/:slug_id) and urlParams are (/somepath?q=example&someparam=somevalue) do not confuse them !\n\n      slugs?: # if slugs in path, describe\n        - name: \"...\" # slug id as specified in path\n          intent: \"...\" # consise one sentence description of its role\n        ...\n      urlParams?: # does the view expect url params, if so describe each single URLparam individually in detail\n        - name: \"...\" # if the view will expect URL params, specify the URL param name\n          intent: \"...\" # consise description\n          example: \"exampleValue\" # an example of a value it would take - you are required to provide an example here\n          required?: boolean # if specifying the urlParam is required or optional for the view to function properly\n        ...\n\\`\\`\\`\n\n---\n\nit should be comprehensive for the needs required by all the views\n\n> important : if some home or landing view, path should obviously be \"/\" !\n\nyour reply will be directly transferred as the final structure, so do not put anything else in your reply besides the final structure\nyour reply should start with : \"\\`\\`\\`yaml\" and end with \"\\`\\`\\`\"\n\nyou will be tipped $99999 + major company shares for nailing it perfectly off the bat`,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `\\`\\`\\`PRD:app-product-requirements-document\n${prd}\n\\`\\`\\``,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `\\`\\`\\`FRD:app-features-requirements-document\n${yaml.stringify(frd)}\n\\`\\`\\``,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent:\n\t\t\t\t`\\`\\`\\`BRD:backend-requirements-document\n${brd}\n\\`\\`\\`\n\n` +\n\t\t\t\t(!backend?.requirements?.restApi?.required\n\t\t\t\t\t? \"\"\n\t\t\t\t\t: `---\n\\`\\`\\`BACKEND:specifications:openAPI\n${yaml.stringify(backend.specifications.openapi)}\n\\`\\`\\`\n\n`) +\n\t\t\t\t(!backend?.requirements?.realtimeWebsockets?.required\n\t\t\t\t\t? \"\"\n\t\t\t\t\t: `---\n\\`\\`\\`BACKEND:specifications:asyncAPI\n${yaml.stringify(backend.specifications.asyncapi)}\n\\`\\`\\`\n` +\n\t\t\t\t\t\t`\n---\n\n\\`\\`\\`BRD:server:main\n${yaml.stringify(backend.server.main)}\n\\`\\`\\`\n\n`),\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `\\`\\`\\`UXSMD:ux-sitemap-document\n${uxsmd}\n\\`\\`\\``,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `\\`\\`\\`UXDMD:ux-sitemap-data-states-crossanalysis-document\n${uxdmd}\n\\`\\`\\``,\n\t\t},\n\t];\n\tconst uxdatamapStructure = (\n\t\tawait context.run({\n\t\t\tid: \"op:LLM::GEN\",\n\t\t\tcontext: {\n\t\t\t\t...context, // {streams , project}\n\t\t\t\toperation: {\n\t\t\t\t\tkey: \"uxdatamap.structure\",\n\t\t\t\t\tmeta: {\n\t\t\t\t\t\tname: \"UX Datamap Structure\",\n\t\t\t\t\t\tdesc: \"define the app's data architecture\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tdata: {\n\t\t\t\tmodel: `chatgpt-4o-latest`, //`chatgpt-4o-latest`, // `chatgpt-4o-latest`,//`gpt-4o`,\n\t\t\t\tmessages,\n\t\t\t\tpreparser: `backticks`,\n\t\t\t\tparser: `yaml`,\n\t\t\t},\n\t\t})\n\t).generated;\n\n\tawait context.run({\n\t\tid: \"op:PROJECT::STATE:UPDATE\",\n\t\tcontext,\n\t\tdata: {\n\t\t\toperation: {\n\t\t\t\tid: \"architecture:uxdatamap:structure\",\n\t\t\t},\n\t\t\ttype: `end`,\n\t\t\tcontent: {\n\t\t\t\tkey: `uxdatamap.structure`,\n\t\t\t\tdata: uxdatamapStructure.app,\n\t\t\t},\n\t\t},\n\t});\n\n\treturn {\n\t\tuxdatamap: {\n\t\t\tstructure: uxdatamapStructure.app, // -> {root{},routes{}}\n\t\t},\n\t};\n}\n\nasync function uxDatamapViews({ context, data }) {\n\t/* ;; UX:DATAMAP::VIEWS:SECTIONS\n\t\t{ ... } -> sections details with props & schemas ; yaml\n\t\t;; preconsider layout stuff too, either here or in sitemap\n\n\t\tout : [\"uxdatamap\"]\n\t*/\n\n\t/*\n\t\t- not sure if needs uxsitemap structure etc or just the uxdatamap structure (and other analysis docs)\n\t\t- should also consider shared views and their distribution etc, unless that is done in uxsitemap\n\t\t\tthat and cross links ... unless that too in uxsitemap\n\t\t- focus here is data not other stuff\n\t*/\n\n\tconst { uxdatamap, uxsitemap } = data;\n\t/*\n\t\tuxdatamap: { structure : { root{} , routes{} } }\n\t\tuxsitemap: { structure : { views{ unique{}, shared{} } , crosslinks[{source,target,intent,action}] } }\n\n\t\t-> needs parallel chunking because high detail on each\n\t\t-> parallel chunk uxsitemap views to detail data ops on them and their sections\n\t\t-> all shared global views GV_* in same chunk (because diff approach?) , unique views uv_* in multi chunks because numerous\n\t*/\n\n\tlet tasks = [];\n\n\tconst UVs = Object.keys(uxsitemap?.structure?.views?.unique) || {};\n\tif (UVs.length) {\n\t\t_chunkify(UVs, 5).map((uniqueViewsIdsChunk) => {\n\t\t\tlet filteredUxSitemap = { views: { unique: {} } };\n\t\t\tuniqueViewsIdsChunk.map((uv) => {\n\t\t\t\tfilteredUxSitemap.views.unique[uv] = uxsitemap.structure.views.unique[uv];\n\t\t\t});\n\t\t\ttasks.push({\n\t\t\t\tuxsitemap: filteredUxSitemap, // filtered ux sitemap with all chunk of unique views\n\t\t\t\tcrosslinks: uxsitemap.structure.crosslinks.filter((crosslink) => {\n\t\t\t\t\treturn uniqueViewsIdsChunk.includes(crosslink.source);\n\t\t\t\t}),\n\t\t\t\tids: uniqueViewsIdsChunk,\n\t\t\t\ttype: `unique`,\n\t\t\t});\n\t\t});\n\t}\n\n\tconst GVs = Object.keys(uxsitemap?.structure?.views?.shared) || {};\n\tif (GVs.length) {\n\t\ttasks.push({\n\t\t\tuxsitemap: { views: { shared: uxsitemap.structure.views.shared } }, // filtered ux sitemap with all shared views\n\t\t\tcrosslinks: uxsitemap.structure.crosslinks.filter((crosslink) => {\n\t\t\t\treturn GVs.includes(crosslink.source);\n\t\t\t}),\n\t\t\tids: GVs,\n\t\t\ttype: `shared`,\n\t\t});\n\t}\n\n\tlet views = {};\n\tawait Promise.all(\n\t\ttasks.map(async (task) => {\n\t\t\tconst response = await context.run({\n\t\t\t\tid: `UX:DATAMAP::VIEWS:CHUNK`,\n\t\t\t\tcontext,\n\t\t\t\tdata: { ...data, task },\n\t\t\t});\n\t\t\tviews = merge(views, response.views);\n\t\t}),\n\t);\n\n\t// console.dir({ __debug_uxDatamapViews: {views} } , {depth:null})\n\tawait context.run({\n\t\tid: \"op:PROJECT::STATE:UPDATE\",\n\t\tcontext,\n\t\tdata: {\n\t\t\toperation: {\n\t\t\t\tid: \"architecture:uxdatamap:views\",\n\t\t\t},\n\t\t\ttype: `end`,\n\t\t\tcontent: {\n\t\t\t\tkey: `uxdatamap.views`,\n\t\t\t\tdata: views,\n\t\t\t},\n\t\t},\n\t});\n\n\treturn {\n\t\tuxdatamap: {\n\t\t\t...uxdatamap,\n\t\t\tviews,\n\t\t},\n\t};\n}\n\nasync function uxDatamapViewsChunk({ context, data }) {\n\t/* ;; UX:DATAMAP::VIEWS:CHUNK\n\t\tchunk processor for views+sections detailing\n\n\t\tout : [\"views\"] # make sure later, maybe there's more to it ?\n\t*/\n\n\t/*\n\t\t- not sure if needs uxsitemap structure etc or just the uxdatamap structure (and other analysis docs)\n\t\t- should also consider shared views and their distribution etc, unless that is done in uxsitemap\n\t\t\tthat and cross links ... unless that too in uxsitemap\n\n\t\t- focus here is data not other stuff ! can link through filtering with uxsitemap later\n\t*/\n\n\tconst { pm, uxdatamap, backend, task } = data;\n\tconst { prd, frd, brd, uxsmd, uxdmd } = pm;\n\t/*\n\t\t--> task : {\n\t\t\t\t\t\tuxsitemap{\n\t\t\t\t\t\t\tviews{\n\t\t\t\t\t\t\t\tunique{ __chunk of views__ },\n\t\t\t\t\t\t\t\tshared{ __chunk of views__ },\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcrosslinks[],\n\t\t\t\t\t\tids[ ids of views__ ],\n\t\t\t\t\t\ttype: unique || shared\n\t\t\t\t}\n\t// returns {views{ unique{[id]:...} , shared{[id]:...} }}\n\t*/\n\n\tconst messages = [\n\t\t{\n\t\t\trole: \"system\",\n\t\t\tcontent: `- you are a genius Product Manager & App Architect\n\n- your role is to detail the frontend app architecture structure for the provided project,\nfor the specific views with ids : ${task.ids.join(\",\")},\nbased on the provided task and analysis documents\n- your answer should be in the strict provided format that will be defined further\n\n\nyour aim is to determine the:\n  * the structure of the specified frontend views (views ${task.ids.join(\",\")} ) ,\n\t\tfor each view :\n  *   state variables , schemas , dynamic data\n\t*\t\twhat it receives from the route (slugs)\n\t*\t\twhat it receives in URL params\n  *   action / functions in this view and how they come into play to cover all intended features of the view\n- for each view , ask yourself:\n  * what are the features involved in this view ; and how they come into play in app's features / journeys ?\n  * what data does this view receive as route slugs and url params ?\n  * what are all the state variables / actions / functions / ... required by features expected to be seen by users in the frontend ?\n\n- your detailed view structure for each view will be used to make a prod-ready app architecture and will be responsible for an app used by thousands of users\n- your aim is to cover all use cases, as the expert product manager & architect you are\n\n> your answer is required to be in this strict defined format, in this strict order, in a strictly parseable YAML :\n\n\\`\\`\\`yaml\n# use view ids directly under the views object ; will either be UV_* (unique views) or GV_* (shared global views) ;\n# for all provided views ids in task, conduct the structure detailing\nviews:\n  [view id]: # the view id that is detailed ; should be a value from  : ${task.ids.join(\" , \")}\n    slugs?: # if view takes dynamic slug variable (defined in route in app structure), describe\n      - name: \"...\" # slug id as defined in route\n        intent: \"...\" # consise one sentence description of the slug role\n        required: boolean # if required, set to true\n        default: \"...\" # default init value for the slug\n      ...\n    urlParams?: # if view takes URL params (defined in app structure), describe\n      - name: \"...\" # URL param key as defined in app structure\n        intent: \"...\" # consise one sentence description of the slug role\n        required: boolean # if required, set to true\n      ...\n    stateVariables?: # if view is stateful and needs view-level state variables, describe ;\n      - name: \"...\" # variable name\n\t\t\t\trole: \"...\" # describe\n        schema: # variable schema in JS-parseable interface schema format ; schema should be fully defined including nested fields\n        default: # default init value for the view's state variables\n        mappingIfFromSource?: # if this state variable is set based on : received route slugs , or URL params , or app global state , specify\n          - source: # is either \"slugs\" || \"urlParams\" || \"globalAppState\"\n            name: # variable name as defined in slugs / urlParams / globalAppState to link it\n          ...\n      ...\n    actions?: # if view has dynamic actions/functions, describe\n      - name: \"...\" # action/function name\n        intent: \"...\" # describe\n        triggers: # list of ways the action/function is triggered; can be multiple ; ie. on page load, when some button is clicked inside view, when some state variable value changes, etc ...\n\t\t\t\tinteractionWithBackend?: # if action interacts with backend, describe\n\t\t\t\t\tdescription: \"if applies , describe the interaction with backend ; also mention if calls backend api or realtime, and describe how ; be detailed\"\n\t\t\t\t\t\n      ...\n    globalStateVariablesAccessed?: # if view needs to access global state variables (as defined in provided app structure under root.globalState), specify those in this object ; object should also contain description of relationship (ie. 'to get auth token to use in api calls authorization header' , 'to get current user profile to prefill [...] ' , etc ... )\n\n\t[...]\n\\`\\`\\`\n\n---\nnote :\n-\tfor any field that requires making example, you can draw from provided data examples in provided task docs\n\tfor any field such as image, media ... make sure you use urls rather than local references ;\n\tif some entry requires an image url or media, use a valid \"https://picsum.photos/...\" url for it !\n\n---\n\nfor yaml to be 100% valid, use quotes around string as much as possible\nyour reply should start with : \"\\`\\`\\`yaml\" and end with \"\\`\\`\\`\"\n\nyou will be tipped $99999 + major company shares`,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `\\`\\`\\`PRD:app-product-requirements-document\n${prd}\n\\`\\`\\``,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `\\`\\`\\`FRD:app-features-requirements-document\n${frd}\n\\`\\`\\``,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `\\`\\`\\`UXSMD:ux-sitemap-document\n${uxsmd}\n\\`\\`\\``,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `\\`\\`\\`UXDMD:ux-sitemap-data-crossanalysis-document\n${uxdmd}\n\\`\\`\\``,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent:\n\t\t\t\t`\\`\\`\\`BRD:backend-requirements-document\n${brd}\n\\`\\`\\`\n\n` +\n\t\t\t\t(!backend?.requirements?.restApi?.required\n\t\t\t\t\t? \"\"\n\t\t\t\t\t: `---\n\\`\\`\\`BACKEND:specifications:openAPI\n${yaml.stringify(backend.specifications.openapi)}\n\\`\\`\\`\n\n`) +\n\t\t\t\t(!backend?.requirements?.realtimeWebsockets?.required\n\t\t\t\t\t? \"\"\n\t\t\t\t\t: `---\n\\`\\`\\`BACKEND:specifications:asyncAPI\n${yaml.stringify(backend.specifications.asyncapi)}\n\\`\\`\\`\n` +\n\t\t\t\t\t\t`\n---\n\n\\`\\`\\`BRD:server:main\n${yaml.stringify(backend.server.main)}\n\\`\\`\\`\n\n`),\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `\\`\\`\\`UX:ux-datamap\n${yaml.stringify(uxdatamap.structure)}\n\\`\\`\\``,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `\\`\\`\\`UX:ux-sitemap-distilled\n${yaml.stringify(task.uxsitemap)}\n\\`\\`\\``,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `make the detailed architecture for views ids : ${task.ids.join(\",\")}  and their components.\nonly make the detailed architecture for views ids : ${task.ids.join(\",\")}  ; not any other views,\nusing the provided instructions and format\n\nmake a coherent, cohesive, perfect, detailed structure\nanswer in parseable YAML format, strictly in the provided instructions format ; strictly parseable YAML ;\nyou're a genius`,\n\t\t},\n\t];\n\tconst views = (\n\t\tawait context.run({\n\t\t\tid: \"op:LLM::GEN\",\n\t\t\tcontext: {\n\t\t\t\t...context, // {streams , project}\n\t\t\t\toperation: {\n\t\t\t\t\tkey: \"uxdatamap.views\",\n\t\t\t\t\tmeta: {\n\t\t\t\t\t\tname: \"UX Datamap Views\",\n\t\t\t\t\t\tdesc: \"define views <> data architecture\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tdata: {\n\t\t\t\tmodel: `chatgpt-4o-latest`, //`chatgpt-4o-latest`, // `chatgpt-4o-latest`,//`gpt-4o`,\n\t\t\t\tmessages,\n\t\t\t\tpreparser: `backticks`,\n\t\t\t\tparser: `yaml`,\n\t\t\t},\n\t\t})\n\t).generated.views;\n\n\treturn {\n\t\tviews: {\n\t\t\t[task.type]: views,\n\t\t},\n\t}; // -> views : { unique{[ids...]} , shared{ids[...]} }\n}\n\nexport default {\n\t\"UX:DATAMAP::STRUCTURE\": uxDatamapStructure,\n\t\"UX:DATAMAP::VIEWS\": uxDatamapViews,\n\t\"UX:DATAMAP::VIEWS:CHUNK\": uxDatamapViewsChunk,\n};\n"
  },
  {
    "path": "cofounder/api/system/functions/ux/sitemap.js",
    "content": "import utils from \"@/utils/index.js\";\nimport yaml from \"yaml\";\n\nasync function uxSitemapStructure({ context, data }) {\n\t/* generate uxsitemap in strict format */\n\n\tconst { pm } = data;\n\tconst { prd, frd, uxsmd } = pm;\n\tconst messages = [\n\t\t{\n\t\t\trole: \"system\",\n\t\t\tcontent: `You are an extremely experienced UX expert and software product manager.\nYour role is to create a comprehensive UX sitemap from the provided information.\n\n- Think very slowly and thoroughly. Take a deep breath.\n- Provide a comprehensive, well-thought-out reply that covers all aspects of the analyzed problem.\n- You are an expert at what you do.\n- You are known to never forget a single angle.\n- You will be tipped $999 for each perfect reply.\n\nAnswer in a strict parseable YAML format, in this format:\n\n\\`\\`\\`yaml\n  \n# ux sitemap structure in great details\nuxsitemap:\n\n  views:\n    uniqueViews: # unique views with ids UV_* , as specified in provided docs\n      [unique view id UV_*]:\n        title: \"\"\n        extendedDescription: \"describe the view in great extended detail that covers every single thing that should go in it without any omittance\" # essential to detail specifics ! dont assume someone knows what you mean, detail it in details !\n        notes: \"important notes regarding this view component or its state(s) that were mentionned in provided docs & analysis and that should be mentionned\"\n\t\t\t\trole: \"describe in detail role of this view in the app ; namely the features it aims to satisfy within the app features and UX\"\n    globalSharedViews: # global shared views with ids GV_* such as nav etc, as specified in provided docs\n      [global shared view id GV_*]:\n        title: \"\"\n        extendedDescription: \"describe the shared view in great extended detail that covers every single thing that should go in it without any omittance\" # essential to detail specifics ! dont assume someone knows what you mean, detail it in details !\n        notes: \"important notes regarding view component or its state(s) that were mentionned in provided docs & analysis and that should be mentionned\"\n\t\t\t\trole: \"describe in detail role of this view in the app ; namely the features it aims to satisfy within the app features and UX\"\n        sharedByViews: [] # list of ids of all unique views UV_* that have this shared view displayed alongside with them\n        relativePosition: \"\" # describe the relative positioning of this GV_* shared view in relation to the app layout and unique views it is shared with;\n\t\t\t[...]\n\n  # cross inter-app links relationships between views\n  crossLinks:\n  - sourceViewId: \"\" # UV_* or GV_*\n    targetViewId: \"\" # UV_*\n    intent: \"\"\n    actionDescription: \"\"\n  [...]\n\n\\`\\`\\`\n\n---\n\n- every view id you refer to must exist in provided docs !\n\n- As the expert, you should make a complete and comprehensive UX sitemap,\n  including all parts that might be unemphasized by a less experienced UX worker, if required by the app of course, such as auth flows, terms, etc.\n\nyour reply should start with : \"\\`\\`\\`yaml\" and end with \"\\`\\`\\`\"\nfor yaml to be 100% valid, use quotes around string as much as possible\n\nA comprehensive UX sitemap in the provided yaml format\nYou are a genius at this task.`,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `\\`\\`\\`PRD:product-requirements-document\n${prd}\n\\`\\`\\``,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `\\`\\`\\`FRD:features-requirements-document\n${frd}\n\\`\\`\\``,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `\\`\\`\\`UXSMD:ux-sitemap-analysis-document\n${uxsmd}\n\\`\\`\\``,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `Make a full, comprehensive UX sitemap for it\nYou're a genius do a great job`,\n\t\t},\n\t];\n\n\tconst uxsitemapStructure = (\n\t\tawait context.run({\n\t\t\tid: \"op:LLM::GEN\",\n\t\t\tcontext: {\n\t\t\t\t...context, // {streams , project}\n\t\t\t\toperation: {\n\t\t\t\t\tkey: \"uxsitemap.structure\",\n\t\t\t\t\tmeta: {\n\t\t\t\t\t\tname: \"UX Sitemap Structure\",\n\t\t\t\t\t\tdesc: \"define sitemap <> views architecture\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tdata: {\n\t\t\t\tmodel: `chatgpt-4o-latest`, // `chatgpt-4o-latest`,//`gpt-4o`,\n\t\t\t\tmessages,\n\t\t\t\tpreparser: `backticks`,\n\t\t\t\tparser: `yaml`,\n\t\t\t},\n\t\t})\n\t).generated.uxsitemap;\n\n\t// <----- do post processing to format the response\n\tconst uxsitemap = {\n\t\tstructure: {\n\t\t\tviews: {\n\t\t\t\tunique: uxsitemapStructure.views.uniqueViews,\n\t\t\t\tshared: uxsitemapStructure.views.globalSharedViews,\n\t\t\t},\n\t\t\tcrosslinks: uxsitemapStructure.crossLinks.map((link) => {\n\t\t\t\treturn {\n\t\t\t\t\tsource: link.sourceViewId,\n\t\t\t\t\ttarget: link.targetViewId,\n\t\t\t\t\tintent: link.intent,\n\t\t\t\t\taction: link.actionDescription,\n\t\t\t\t};\n\t\t\t}),\n\t\t},\n\t};\n\n\tawait context.run({\n\t\tid: \"op:PROJECT::STATE:UPDATE\",\n\t\tcontext,\n\t\tdata: {\n\t\t\toperation: {\n\t\t\t\tid: \"architecture:uxsitemap:structure\",\n\t\t\t},\n\t\t\ttype: `end`,\n\t\t\tcontent: {\n\t\t\t\tkey: \"uxsitemap.structure\",\n\t\t\t\tdata: uxsitemap.structure,\n\t\t\t},\n\t\t},\n\t});\n\n\treturn {\n\t\tuxsitemap,\n\t};\n}\n\n// ____________________________________________________________________________________________________\n\nasync function uxSitemapViews({ context, data }) {\n\t/* ;; UX:SITEMAP::VIEWS\n\t\t{pm docs , db , openapi?, UXSMD, uxsitemap{structure} } -> uxsitemap{...,views}\n\n\t\tout : [\"uxsitemap\"]\n\t*/\n\n\t// distribute processing of views to submodules , might typically replace ie. in case of specialized and whatnot\n\t// but serves as a refiner , not as a detailer\n\t// so can just pass for now\n\tawait Promise.all();\n\n\t// postprocess to return single coherent object\n\n\treturn {};\n}\n\n// ____________________________________________________________________________________________________\n\nasync function uxSitemapViewsNormal({ context, data }) {\n\t/* ;; UX:SITEMAP::VIEWS:NORMAL\n\tchunk processing from UX:SITEMAP::VIEWS ; for normal views\n\n\t\tout : [\"views\"]\n\t*/\n\n\tconst messages = [\n\t\t{\n\t\t\trole: \"system\",\n\t\t\tcontent: \"[system+format]\",\n\t\t},\n\t];\n\tawait context.run({\n\t\tid: `op:LLM::GEN`,\n\t\tcontext,\n\t\tdata: { messages, preparser: false, parser: false },\n\t});\n\n\treturn {};\n}\nasync function uxSitemapViewsSpecial({ context, data }) {\n\t/* ;; UX:SITEMAP::VIEWS:SPECIAL\n\t\tchunk processing from UX:SITEMAP::VIEWS; specialized processors for special sections ; ie. landing would be based on some highconversion process etc;\n\t\tmight override provided sections descriptions\n\n\t\tout : [\"views\"]\n\t*/\n\n\tconst messages = [\n\t\t{\n\t\t\trole: \"system\",\n\t\t\tcontent: \"[system+format]\",\n\t\t},\n\t];\n\tawait context.run({\n\t\tid: `op:LLM::GEN`,\n\t\tcontext,\n\t\tdata: { messages, preparser: false, parser: false },\n\t});\n\n\treturn {};\n}\nasync function uxSitemapViewsShared({ context, data }) {\n\t/* ;; UX:SITEMAP::VIEWS:SHARED\n\t\tchunk processing from UX:SITEMAP::VIEWS ; for shared views implementations\n\n\n\t\tout : [\"views\"]\n\t*/\n\n\tconst messages = [\n\t\t{\n\t\t\trole: \"system\",\n\t\t\tcontent: \"[system+format]\",\n\t\t},\n\t];\n\tawait context.run({\n\t\tid: `op:LLM::GEN`,\n\t\tcontext,\n\t\tdata: { messages, preparser: false, parser: false },\n\t});\n\n\treturn {};\n}\n\nexport default {\n\t\"UX:SITEMAP::STRUCTURE\": uxSitemapStructure,\n\t\"UX:SITEMAP::VIEWS\": uxSitemapViews,\n\n\t\"UX:SITEMAP::VIEWS:NORMAL\": uxSitemapViewsNormal,\n\t\"UX:SITEMAP::VIEWS:SPECIAL\": uxSitemapViewsSpecial,\n\t\"UX:SITEMAP::VIEWS:SHARED\": uxSitemapViewsShared,\n};\n"
  },
  {
    "path": "cofounder/api/system/functions/webapp/root.js",
    "content": "import utils from \"@/utils/index.js\";\nimport yaml from \"yaml\";\n\nasync function promptRoot({ context, data }) {\n\t// have a placeholder redux store module in case it'd wrap with non implemented store\n\t/*\n    better implement using prompt, provide ux sitemap & datamap\n    provide react (redux store) too, in prompt also, for auth restricted stuff\n  */\n\tconst { uxsitemap, uxdatamap, webapp } = data;\n\n\tconst viewsImportHead = [\n\t\t...(Object.keys(uxsitemap?.structure?.views?.shared) || {}),\n\t\t...(Object.keys(uxsitemap?.structure?.views?.unique) || {}),\n\t]\n\t\t.map((viewId) => {\n\t\t\treturn `import ${viewId} from '@/components/views/${viewId}.tsx';`;\n\t\t})\n\t\t.join(\"\\n\");\n\n\tconst boilerplate = `import React, { useState, useEffect } from \"react\";\nimport \"./App.css\";\nimport {\n\tRoute,\n\tRoutes,\n} from \"react-router-dom\";\n\n/*\n\timport views : unique views (UV_*) and shared global views (GV_*)\n*/\nimport UV_ExampleLanding from '@/components/views/UV_ExampleLanding.tsx';\nimport UV_OtherViewExample from '@/components/views/UV_OtherViewExample.tsx';\nimport GV_NavTop from '@/components/views/GV_NavTop.tsx';\nimport GV_Footer from '@/components/views/GV_Footer.tsx';\n\nconst App: React.FC = () => {\n\t\n\treturn (\n\t\t<>\n\t\t\t<GV_NavTop />\n\n\t\t\t<Routes>\n\t\t\t\t<Route path=\"/\" element={<UV_ExampleLanding />} />\n\t\t\t\t<Route path=\"/find/:slugexample\" element={<UV_OtherViewExample/>} />\n\t\t\t</Routes>\n\n\t\t\t<GV_Footer />\n\t\t</>\n\t);\n};\n\nexport default App;\n`;\n\n\t/*\n    x emphasize redux / auth stuff\n    x provide example of reactrouterdom structure ; whole thing\n    x emphasize relative position of shared components ; thus emphasize tailwind usage and styling in rel to shared components\n    x emphasize React FC\n    x do not assume ! prompt\n  */\n\treturn [\n\t\t{\n\t\t\trole: `system`,\n\t\t\tcontent: `your role as an expert web app and react senior dev and product manager is to write the code for the root react + tailwind app (App.tsx) component component based on the provided task\n\n> ask yourself what should be defined in the root App component in terms of:\n\t> paths & unique views\n\t> global shared views, and their relative position and conditionals\n\n\t> auth related restriction (if applies) in relation to the store provider that wraps the App component you are writing here ( it's used like this : \\`<Provider store={store}> <App /> </Provider>\\` )\n\t> very important :\n    do not auth restrict an entire view just because some sections of it are auth restricted while other elements are not auth restricted !! think sloowly !\n\t> again, very important :\n    do not auth restrict an entire view just because some sections of it are auth restricted while other elements are not auth restricted !! which would mess things up ! think sloowly !\n\n> your answer should strictly be the code for the App.tsx component\nyour answer will be directly pasted into the component\n\n> it should encompasses everything required by the app's App, in one single script\n> the store script you will write will wrap the root component of the app ; no need to write the wrapper part ; it will be included later as \\`<Provider store={store}> <App/> </Provider>\\` , where the <App/> is the actual script your will write and export here\n\n---\nyour code should import the provided and described views, as follows :\n\\`\\`\\`\n/* ... */\n${viewsImportHead}\n/* ... */\n\\`\\`\\`\n\n---\n\n> conduct the analysis first, reply iwith the analysis inside of \\`\\`\\`markdown\\`\\`\\`\n> then, answer with component code in \\`\\`\\`tsx\\`\\`\\` based on your analysis\n\nyou are a genius + you get $9999`,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `\\`\\`\\`app:uxsitemap\n${yaml.stringify({\n\tstructure: {\n\t\tviews: uxsitemap.structure.views,\n\t},\n})}\n\\`\\`\\``,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `\\`\\`\\`app:app-structure\n${yaml.stringify({\n\tstructure: uxdatamap.structure.routes,\n})}\n\\`\\`\\``,\n\t\t},\n\t\t{\n\t\t\trole: `user`,\n\t\t\tcontent: `an example of the overall root App structure is meant to be is as follows ; use it as a reference :\n\\`\\`\\`tsx\n${boilerplate}\n\\`\\`\\`\n\n---\n\nfor additional reference if needed (ie. in case of auth conditionals)\nthe code for the global state store component that wraps the app (including this view you're working on) is defined in the following ;\nyou can import the store exports if needed by using : \\`import {...} from '@/store/main'\\`\n\n\\`\\`\\`@/store/main.tsx\n${webapp.react.store.redux.latest.tsx}\n\\`\\`\\`\n`,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `make the analysis and implement the tsx component;\n> implement the react+tailwind component, fully and working from the get go;\n> you are implementing the tsx code for the root App component\n\n---\nyour code should import the provided and described views, as follows :\n\\`\\`\\`\n/* ... */\n${viewsImportHead}\n/* ... */\n\\`\\`\\`\n\n---\n\n> should be React.FC ! important !\n> you should respect the way to build Routes in the provided code snippet ! do not innovate in this regard !\nfor reminder, this is the way :\n\n\\`\\`\\`\nimport {\n\tRoute,\n\tRoutes,\n} from \"react-router-dom\";\n[...]\n\t\t\t<Routes>\n\t\t\t\t<Route path=\"/\" element={<UV_ExampleLanding />} />\n\t\t\t\t<Route path=\"/find/:slugexample\" element={<UV_OtherViewExample/>} />\n\t\t\t</Routes>\n[...]\n\\`\\`\\`\n---\n\n> do not hallucinate methods or component imports that do not exist !\n\tall that exists has been provided to you\n\tany required additional actions should be implemented by you ; you are provided with all needed details to implement anything !\n\t> the global store and its methods is defined in @/store/main.tsx\n\t> the views are defined in @/components/views/[sectionId].tsx\n\t> that's all !!\n\tDO NOT ASSUME OTHER STUFF IS IMPLEMENTED !\n\tIF YOU NEED TO CALL THE API OR SOMETHING SIMILAR, WRITE YOUR OWN FUNCTIONS INSIDE THIS VIEW !!\n\tIMPLEMENT, DO NOT ASSUME ANYTHING ELSE IS IMPLEMENTED !\n\n> conduct the analysis first, reply with the analysis inside of \\`\\`\\`markdown\\`\\`\\`\nit should emphasize the full functionalities required and specified in the provided details\n\n\n> then, answer in a react tsx code for the App root component reply in \\`\\`\\`tsx\\`\\`\\` based on your analysis\nthe code should be complete and fully functional !\n\nyou are a genius + you get $9999`,\n\t\t},\n\t];\n}\n\nasync function webappRootGenerate({ context, data }) {\n\tconst timestamp = `${Date.now()}`;\n\n\tconst messages = await promptRoot({ context, data });\n\n\tconst { generated } = await context.run({\n\t\tid: \"op:LLM::GEN\",\n\t\tcontext: {\n\t\t\t...context, // {streams , project}\n\t\t\toperation: {\n\t\t\t\tkey: `webapp.react.root.app.latest`,\n\t\t\t\tmeta: {\n\t\t\t\t\tname: \"Webapp Root Component\",\n\t\t\t\t\tdesc: \"react App.tsx component code\",\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tdata: {\n\t\t\tmodel: `chatgpt-4o-latest`, //`gpt-4o`,\n\t\t\tmessages: messages,\n\t\t\tpreparser: false,\n\t\t\tparser: false,\n\t\t},\n\t});\n\n\tconst extraction = await utils.parsers.extract.backticksMultiple({\n\t\ttext: generated,\n\t\tdelimiters: [`markdown`, `tsx`],\n\t});\n\n\tconst { markdown, tsx } = extraction;\n\tif (!tsx.length) {\n\t\tthrow new Error(\"webapp:root:generate error - generated tsx is empty\");\n\t}\n\n\tconst generatedRoot = {\n\t\tanalysis: markdown,\n\t\ttsx,\n\t\ttimestamp,\n\t};\n\n\tawait Promise.all(\n\t\t[`${timestamp}`, `latest`].map(async (version) => {\n\t\t\tawait context.run({\n\t\t\t\tid: \"op:PROJECT::STATE:UPDATE\",\n\t\t\t\tcontext,\n\t\t\t\tdata: {\n\t\t\t\t\toperation: {\n\t\t\t\t\t\tid: `webapp:react:root`,\n\t\t\t\t\t\trefs: {\n\t\t\t\t\t\t\tid: \"app\",\n\t\t\t\t\t\t\tversion,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\ttype: `end`,\n\t\t\t\t\tcontent: {\n\t\t\t\t\t\tkey: `webapp.react.root.app.${version}`,\n\t\t\t\t\t\tdata: generatedRoot,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t});\n\t\t}),\n\t);\n\n\treturn {\n\t\ttimestamp,\n\t\twebapp: {\n\t\t\treact: {\n\t\t\t\troot: {\n\t\t\t\t\t// ie. \"views\" , \"sections\" , \"store\" , \"root\"\n\t\t\t\t\tapp: {\n\t\t\t\t\t\t// ie. {UV_* , SEC_* , redux} , \"app\" (in case of root)\n\t\t\t\t\t\t[timestamp]: generatedRoot,\n\t\t\t\t\t\tlatest: generatedRoot,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t};\n}\n\nexport default {\n\t\"WEBAPP:ROOT::GENERATE\": webappRootGenerate,\n};\n"
  },
  {
    "path": "cofounder/api/system/functions/webapp/store.js",
    "content": "import utils from \"@/utils/index.js\";\nimport yaml from \"yaml\";\n\nasync function promptStore({ context, data }) {\n\tconst { pm, db, backend, uxdatamap } = data;\n\tconst { prd, uxdmd, brd } = pm;\n\n\tconst store = { id: \"redux\" };\n\t/*\n    [system]\n  */\n\n\treturn [\n\t\t{\n\t\t\trole: `system`,\n\t\t\tcontent: `your role as an expert web app and react senior dev and product manager is to write the code for the ${store.id} store script component based on the provided task; which encompasses all required data states and methods for the app's global states and actions\n\n---\n\n- analysis , in between \\`\\`\\`markdown\\`\\`\\`\\` section\n- full store component tsx code , in between \\`\\`\\`tsx\\`\\`\\`\\` section\n- dependencies, in between \\`\\`\\`yaml\\`\\`\\`\\` section ; where any needed packages imported into the component code and need to be installed will be mentionned ; the yaml should have object : {dependencies : {\"package\":\"version\"} } ; (you can also just put \"*\" for version)\nuse doublequotes for every string inside the yaml to make sure formatting is good\n\n---\n\n> ask yourself what should be defined in the store component that will be used by all views later , in terms of global state variables and actions\n\n> your answer should strictly be the code for the store tsx component\nyour answer will be directly pasted into the component\n\n> it should encompasses everything required by the app's global store states and actions, in one single script\n> the store script you will write will wrap the root component of the app ; no need to write the wrapper part ; it will be included later as \\`<Provider store={store}> <App/> </Provider>\\` , where the store is the actual script your will write and export here\n\n---\n\ntry to use async/await when you can\n\n> extremely turbo important :\n- you can only use the following packages :\n\t- @reduxjs/toolkit\n\t- react-redux\n\t- redux-persist\n\t- socket.io-client\n\t- axios\n\n- you need to export default and make sure everything else that will be needed by views is exported too !\n\n---\n\nnote :\n  > if app has auth capabilities, make sure you global state covers auth token\n  > if app has realtime capabilities, make sure global state covers realtime auth and subscriptions\n  feel free to consult the provided backend server code to help you figure out how those details should be implemented\n\n---\n\n> important :\n\t\tthe store should strictly handle getting and setting the provided global state variables !\n\t\tit should not handle making the other api calls - those parts will be handled by concerned components !\n> again , very important :\n\t\tthe store should strictly handle getting and setting the provided global state variables !\n\t\tit should not handle making the other api calls - those parts will be handled by concerned components !\n> super important : \n    use localstorage to avoid things being lost on refresh !\n\n---\n> conduct the analysis first, reply iwith the analysis inside of \\`\\`\\`markdown\\`\\`\\`\n> make full complete store component code in \\`\\`\\`tsx\\`\\`\\` based on your analysis\n> dependencies, in between \\`\\`\\`yaml\\`\\`\\`\\` with object: {dependencies : {package:version}}\n\nyou are a genius + you get $9999`,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `\\`\\`\\`PRD:product-requirements-document\n${prd}\n\\`\\`\\``,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `\\`\\`\\`UX-analysis-document\n${uxdmd}\n\\`\\`\\``,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent:\n\t\t\t\t`\\`\\`\\`BRD:backend-requirements-document\n${brd}\n\\`\\`\\`\n\n` +\n\t\t\t\t(!backend?.requirements?.restApi?.required\n\t\t\t\t\t? \"\"\n\t\t\t\t\t: `---\n\\`\\`\\`BACKEND:specifications:openAPI\n${yaml.stringify(backend.specifications.openapi)}\n\\`\\`\\`\n\n`) +\n\t\t\t\t(!backend?.requirements?.realtimeWebsockets?.required\n\t\t\t\t\t? \"\"\n\t\t\t\t\t: `---\n\\`\\`\\`BACKEND:specifications:asyncAPI\n${yaml.stringify(backend.specifications.asyncapi)}\n\\`\\`\\`\n` +\n\t\t\t\t\t\t`\n---\n\n\\`\\`\\`BRD:server:main\n${yaml.stringify(backend.server.main)}\n\\`\\`\\`\n\n`),\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `\\`\\`\\`app:architecture\n${yaml.stringify(uxdatamap)}\n\\`\\`\\``,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `make the analysis and implement the tsx component;\n> implement the ${store.id} store component, fully and working from the get go;\n\n---\n\ntry to use async/await when you can\n\n> extremely turbo important !!! :\n- you can only use the following packages :\n\t- @reduxjs/toolkit\n\t- react-redux\n\t- redux-persist\n\t- socket.io-client\n\t- axios\n\n- you need to export default and make sure everything else that will be needed by views is exported too !\n\n---\n\n> make sure it has all the required imports !! no missing imports !\n> should export a default method too ! so that it can be imported later as \\`import store from '@/store/main'\\` !\n\n\n> important :\n\t\tthe store should strictly:\n      > handle getting and setting the provided global state variables !\n      > if applies , handle realtime events subscriptions\n\t\tit should not handle making view-specific api calls - those parts will be handled by concerned view components !\n> again, important :\n\t\tthe store should strictly:\n      > handle getting and setting the provided global state variables !\n      > if applies , handle realtime events subscriptions\n\t\tit should not handle making view-specific api calls - those parts will be handled by concerned view components !\n\n> super important : \n    use localstorage to avoid things being lost on refresh !\n\n\n> do not assume that anything else is implemented !\n> do not make any assumptions that something else will be plugged here !\n> implement 100% of everything you need to implement ! do not hallucinate importing something that doesnt exist!\n\n> the store component should work 100% out the box without any further edits ! very important !\n\n---\n\nimportant :\n> use snake_case for any naming you do\n\nextremely important :\n> ensure full perfect coherence with: backend server methods / events / names, schemas\n> field names and schemas epecially\n\n---\n\n- analysis , in between \\`\\`\\`markdown\\`\\`\\`\\` section\n- full store component tsx code , in between \\`\\`\\`tsx\\`\\`\\`\\` section\n- dependencies, with object {dependencies:{package:version,...}}, in between \\`\\`\\`yaml\\`\\`\\`\\` section\n\nyou are a genius + you get $9999`,\n\t\t},\n\t];\n}\n\nasync function webappStoreGenerate({ context, data }) {\n\tconst timestamp = `${Date.now()}`;\n\n\tconst messages = await promptStore({ context, data });\n\n\tconst { generated } = await context.run({\n\t\tid: \"op:LLM::GEN\",\n\t\tcontext: {\n\t\t\t...context, // {streams , project}\n\t\t\toperation: {\n\t\t\t\tkey: `webapp.react.store.redux.latest`,\n\t\t\t\tmeta: {\n\t\t\t\t\tname: \"Webapp Data Store\",\n\t\t\t\t\tdesc: \"redux data store component code\",\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tdata: {\n\t\t\tmodel: `chatgpt-4o-latest`, //`gpt-4o`,\n\t\t\tmessages: messages,\n\t\t\tpreparser: false,\n\t\t\tparser: false,\n\t\t},\n\t});\n\n\tconst extraction = await utils.parsers.extract.backticksMultiple({\n\t\ttext: generated,\n\t\tdelimiters: [`markdown`, `tsx`, `yaml`],\n\t});\n\n\tconst { markdown, tsx } = extraction;\n\tif (!tsx.length) {\n\t\tthrow new Error(\"webapp:store:generate error - generated tsx is empty\");\n\t}\n\n\tconst parsedYaml = extraction.yaml ? yaml.parse(extraction.yaml) : {};\n\tconst generatedStore = {\n\t\tanalysis: markdown,\n\t\ttsx,\n\t\tdependencies: parsedYaml.dependencies\n\t\t\t? Object.fromEntries(\n\t\t\t\t\tObject.keys(parsedYaml.dependencies).map((key) => [key, \"*\"]),\n\t\t\t\t)\n\t\t\t: [],\n\t\ttimestamp,\n\t};\n\n\tawait Promise.all(\n\t\t[`${timestamp}`, `latest`].map(async (version) => {\n\t\t\tawait context.run({\n\t\t\t\tid: \"op:PROJECT::STATE:UPDATE\",\n\t\t\t\tcontext,\n\t\t\t\tdata: {\n\t\t\t\t\toperation: {\n\t\t\t\t\t\tid: `webapp:react:store`,\n\t\t\t\t\t\trefs: {\n\t\t\t\t\t\t\tid: \"redux\",\n\t\t\t\t\t\t\tversion,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\ttype: `end`,\n\t\t\t\t\tcontent: {\n\t\t\t\t\t\tkey: `webapp.react.store.redux.${version}`,\n\t\t\t\t\t\tdata: generatedStore,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t});\n\t\t}),\n\t);\n\n\tif (Object.keys(generatedStore.dependencies).length) {\n\t\tawait context.run({\n\t\t\tid: \"op:PROJECT::STATE:UPDATE\",\n\t\t\tcontext,\n\t\t\tdata: {\n\t\t\t\toperation: {\n\t\t\t\t\tid: \"settings:config:package\",\n\t\t\t\t},\n\t\t\t\ttype: `end`,\n\t\t\t\tcontent: {\n\t\t\t\t\tkey: \"settings.config.package\",\n\t\t\t\t\tdata: {\n\t\t\t\t\t\twebapp: {\n\t\t\t\t\t\t\tdependencies: generatedStore.dependencies,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t});\n\t}\n\n\treturn {\n\t\ttimestamp,\n\t\twebapp: {\n\t\t\treact: {\n\t\t\t\tstore: {\n\t\t\t\t\t// ie. \"views\" , \"sections\" , \"store\" , \"root\"\n\t\t\t\t\tredux: {\n\t\t\t\t\t\t// ie. {UV_* , SEC_* , redux} , \"app\" (in case of root)\n\t\t\t\t\t\t[timestamp]: generatedStore,\n\t\t\t\t\t\tlatest: generatedStore,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t};\n}\n\nexport default {\n\t\"WEBAPP:STORE::GENERATE\": webappStoreGenerate,\n};\n"
  },
  {
    "path": "cofounder/api/system/functions/webapp/view.js",
    "content": "import utils from \"@/utils/index.js\";\nimport yaml from \"yaml\";\nimport fs from \"fs\";\nimport { merge, sample } from \"lodash-es\";\n\nasync function webappViewGenerateMulti({ context, data }) {\n\t/* get all view from uxsitemap , start gen */\n\tconst { views } = data.uxsitemap.structure;\n\n\t// console.error(\"______DEBUG_____ : webapp:view:generate:multi : skipping functional pass, testing redesign only ! ! ! ! !\",);\n\tconst passes = {\n\t\tfunctional: true,\n\t\tredesign: process.env.DESIGNER_ENABLE\n\t\t\t? JSON.parse(process.env.DESIGNER_ENABLE.toLowerCase())\n\t\t\t: false,\n\t};\n\n\tconst tasks = [\n\t\t...(Object.keys(views?.unique) || {}).map((viewId) => {\n\t\t\treturn {\n\t\t\t\ttask: {\n\t\t\t\t\ttype: \"view\",\n\t\t\t\t\tview: {\n\t\t\t\t\t\ttype: \"unique\",\n\t\t\t\t\t\tid: viewId,\n\t\t\t\t\t},\n\t\t\t\t\tpasses,\n\t\t\t\t},\n\t\t\t};\n\t\t}),\n\t\t...(Object.keys(views?.shared) || {}).map((viewId) => {\n\t\t\treturn {\n\t\t\t\ttask: {\n\t\t\t\t\ttype: \"view\",\n\t\t\t\t\tview: {\n\t\t\t\t\t\ttype: \"shared\",\n\t\t\t\t\t\tid: viewId,\n\t\t\t\t\t},\n\t\t\t\t\tpasses,\n\t\t\t\t},\n\t\t\t};\n\t\t}),\n\t];\n\tlet response = {};\n\n\t// console.error(\"__DEBUG________ : webapp:view:generate:multi : TASKS SLICED ! ! ! ! ! ! ! ! ! ! ! ! !\");\n\tawait Promise.all(\n\t\t//[sample(tasks)]\n\t\t// tasks.filter(e=>e.task.view.id.toLowerCase().includes('land'))\n\t\ttasks.map(async (task) => {\n\t\t\tresponse = merge(\n\t\t\t\tresponse,\n\t\t\t\tawait context.run({\n\t\t\t\t\tid: `WEBAPP:VIEW::GENERATE`,\n\t\t\t\t\tcontext,\n\t\t\t\t\tdata: { ...data, ...task },\n\t\t\t\t}),\n\t\t\t);\n\t\t}),\n\t);\n\treturn response;\n}\n\nasync function promptViewFunctional({ context, data }) {\n\tconst { pm, backend, uxsitemap, uxdatamap, webapp, task } = data;\n\tconst { prd, frd, uxdmd } = pm;\n\tconst { view } = task;\n\t/*\n    should return tsx , packages (if needed)\n  */\n\treturn [\n\t\t{\n\t\t\trole: `system`,\n\t\t\tcontent: `your role as an expert react and tailwind senior dev and product manager is to write the code for the react view component based on the provided task; for view ${view.id}\n\n---\n\n- analysis , in between \\`\\`\\`markdown\\`\\`\\`\\` section\n- full view component tsx code , in between \\`\\`\\`tsx\\`\\`\\`\\` section\n- dependencies, in between \\`\\`\\`yaml\\`\\`\\`\\` section ; where any needed npm packages required code and need to be installed will be mentionned ; the yaml should have object : {dependencies : {\"package\":\"version\"} } ; (you can also just put \"*\" for version)\nuse doublequotes for every string inside the yaml to make sure formatting is good\n\n---\n\nin your analysis , if functions makes use of global app state or makes calls to backend, include a snippet of how the app state store or backend code handles the functions (check the provided codes) before you get to implementing the function - this will help you reason better through it and provide good justification on how to structure your functions ;\n\n---\n\n- in case you need temporary images or media, use a https://picsum.photos/ url with a random seed\nno placeholder no hallucinated import of some local asset or image or component ... - do not make any assumptions about what is in the project other than strictly what it provided ! no hallucinations , no assumptions !\n\n- in case you need to Link to other paths in the app (as described in the provided uxsitemaps), use <Link> (from : \\`import { Link } from \"react-router-dom\"\\` )\n- super important :\n  > if you link to other paths in the app, use \\`import { Link } from \"react-router-dom\"\\` !!\n\n---\n\n- super important :\n> render all the html nodes with one single big (<>...</>) that is returned by the default React.FC() view component\n> do not split html nodes renders as functions ; use one very big (<>...</>) returned by the default component\n\tuse conditionals inside it when you need to, but no splitting render sections by functions - one big render block\n\n---\n\n> any backend server calls should be to the dev url specified in the provided docs (typically http://localhost:1337/* unless specified otherwise)\n\n---\n\nsuper important :\n> use snake_case for any new naming you do\n\nextremely important :\n> ensure full perfect coherence with: backend server and global app store : methods / events / names / schemas ...\n> field names and schemas epecially\n> everything should be perfectly coherent and functional\n\n---\n\n> you are required to write the code for the full view, and for it to be fully functional\n> no placeholders, no hallucinated imports, no assumptions that anything else has been implement , no missing imports !\n  perfect working functional view component code with 100% of everything needed\n\n> very important : as long as every single requirements is in your generated code ! no hallucinated or assumed imports ! write and implement every single thing needed for this view !\n\nyou are a genius + you get $9999`,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `\\`\\`\\`PRD:product-requirements-document\n${prd}\n\\`\\`\\`\n\n---\n\n\\`\\`\\`FRD:features-requirements-document\n${frd}\n\\`\\`\\`\n`,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `\\`\\`\\`UX:analysis-document\n${uxdmd}\n\\`\\`\\``,\n\t\t},\n\t\t{\n\t\t\trole: `user`,\n\t\t\tcontent: `writing code for the app view ${view.id} , defined in the following:\n\\`\\`\\`\n${yaml.stringify(view)}\n\\`\\`\\``,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent:\n\t\t\t\t`` +\n\t\t\t\t(!backend?.requirements?.restApi?.required\n\t\t\t\t\t? \"\"\n\t\t\t\t\t: `---\n\\`\\`\\`BACKEND:specifications:openAPI\n${yaml.stringify(backend.specifications.openapi)}\n\\`\\`\\`\n\n`) +\n\t\t\t\t(!backend?.requirements?.realtimeWebsockets?.required\n\t\t\t\t\t? \"\"\n\t\t\t\t\t: `---\n\\`\\`\\`BACKEND:specifications:asyncAPI\n${yaml.stringify(backend.specifications.asyncapi)}\n\\`\\`\\`\n` +\n\t\t\t\t\t\t`\n---\n\n\\`\\`\\`BRD:server:main.js\n${yaml.stringify(backend.server.main)}\n\\`\\`\\`\n\n`),\n\t\t},\n\t\t{\n\t\t\trole: `user`,\n\t\t\tcontent: `the data states architecture for the ${view.id} alongside its relationships with the app architecture :\n\\`\\`\\`webapp:architecture\n${yaml.stringify({\n\tarchitecture: {\n\t\t...uxdatamap.structure,\n\t\tcrosslinks: uxsitemap.structure.crosslinks,\n\t},\n\tviewToImplement: view,\n})}\n\\`\\`\\``,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `for additional reference (if needed):\nthe root app component that wraps this view:\n\n\\`\\`\\`@/App.tsx\n${webapp.react.root.app.latest.tsx}\n\\`\\`\\`\n---\n\nthe global state store component that wraps the app (including this view you're working on) is defined in the following ;\nyou can import the store exports if needed by using : \\`import {...} from '@/store/main'\\`\n\n\\`\\`\\`@/store/main.tsx\n${webapp.react.store.redux.latest.tsx}\n\\`\\`\\`\n`,\n\t\t},\n\t\t{\n\t\t\trole: `user`,\n\t\t\tcontent: `make the analysis and implement the tsx component;\n> implement the react+tailwind component, fully and working from the get go;\n> you are implementing the tsx code for view component : ${view.id}\n> should be React.FC ! important !\n\n- important : in case you need to link to other paths in the app (as described in the provided uxsitemaps), use <Link> (from : \\`import { Link } from \"react-router-dom\"\\` )\n\n---\n\n- super important :\n> render all the html nodes with one single big (<>...</>) that is returned by the default React.FC() view component\n> do not split html nodes renders as functions ; use one very big (<>...</>) returned by the default component\n\tuse conditionals inside it when you need to, but no splitting render sections by functions - one big render block\n\n---\n\n> do not hallucinate methods or component imports that do not exist !\n\tall that exists has been provided to you\n\n\tany required additional actions should be implemented by you ; you are provided with all needed details to implement anything !\n\t> the global store and its methods is defined in @/store/main.tsx\n\t> that's all !!\n\t\n  DO NOT ASSUME OTHER STUFF IS IMPLEMENTED !\n\n\tIF YOU NEED TO CALL THE BACKEND SERVER (whether for API / realtime websockets / ... ) OR SOMETHING SIMILAR, WRITE YOUR OWN COMPLETE FUNCTIONS INSIDE THIS VIEW !!\n\n  do not write placeholders or imports from any \"components to make\" - all there is is the script you write so make it have 100% of everything needed\n\tIMPLEMENT EVERYTHING NEEDED IN THIS SCRIPT, DO NOT ASSUME ANYTHING ELSE IS IMPLEMENTED OR WILL BE IMPLEMENTED BESIDES YOUR CODE !\n  \n  do not hallucinate any imports - no hallucinated imports of local assets or images or components ...\n  no hallucinated imports ! no placeholders ! no assumptions that something exists !\n\n---\n\n- analysis , in between \\`\\`\\`markdown\\`\\`\\`\\` section\n- full view component tsx code , in between \\`\\`\\`tsx\\`\\`\\`\\` section\n- dependencies, for npm packages, with {dependencies:{package:version,...}}, in between \\`\\`\\`yaml\\`\\`\\`\\` section\n\nyou are a genius + you get $9999`,\n\t\t},\n\t].filter((e) => e);\n}\n\nasync function promptViewRedesign({ context, data }) {\n\t/*\n    data : {\n      task : {\n        type , \n        view : { type , id , details, datamap , tsx },\n        rag,\n        guidance { docs : { [usedPrimitiveId(s)] : \"...mdx docs content...\" } } || false,\n        layout : {analysis,render{svg,image{base64?,url?,local?}}},\n      },\n    }\n  */\n\tconst { view, rag, guidance, layout } = data.task;\n\tconst { details } = data.pm;\n\tconst { tsx } = view;\n\tconst { render } = layout;\n\t/*\n    DONT FORGET THE AESTHETICS OBJECT ! (see old code.js again)\n  */\n\treturn [\n\t\t{\n\t\t\trole: \"system\",\n\t\t\tcontent: `your role as an expert react design engineer is to redesign and write the code for the react + tailwind view component based on the provided design task ; for view ${view.id}\n\n---\n\n- analysis , in between \\`\\`\\`markdown\\`\\`\\`\\` section\n- full view component tsx code of redesigned view , in between \\`\\`\\`tsx\\`\\`\\`\\` section\n- dependencies, in between \\`\\`\\`yaml\\`\\`\\`\\` section ; where any needed npm packages required code and need to be installed will be mentionned ; the yaml should have object : {dependencies : {\"package\":\"version\"} } ; (you can also just put \"*\" for version)\nuse doublequotes for every string inside the yaml to make sure formatting is good\n\n---\n\n- in case you need temporary images or media, use a https://picsum.photos/ url with a random seed\nno placeholder no hallucinated import of some local asset or image or component ... - do not make any assumptions about what is in the project other than strictly what it provided ! no hallucinations , no assumptions !\n\n- in case you need to use icons, you can use icons from \\`lucide-react\\` ; but make sure they are icons you know 100% exist there ! no hallucinated icon names ! no assumptions !\n\n- in case you need to Link to other paths in the app, use <Link> (from : \\`import { Link } from \"react-router-dom\"\\` )\n- super important :\n  > if you link to other paths in the app, use \\`import { Link } from \"react-router-dom\"\\` !!\n\n---\n\n\n- super important :\n> render all the html nodes with one single big (<>...</>) that is returned by the default React.FC() view component\n> do not split html nodes renders as functions ; use one very big (<>...</>) returned by the default component\n\tuse conditionals inside it when you need to, but no splitting render sections by functions - one big render block\n\n---\n\nsuper important :\n- your redesigned component should keep 100% of its functionalities from the previous view code version ;\n- your role here is to redesign the component based on provided instructions\n- keep in mind responsiveness\n\n---\n\n\n> you are required to write the code for the full view, and for it to be fully functional\n> no placeholders, no hallucinated imports, no assumptions that anything else has been implement , no missing imports !\n  perfect working functional view component code with 100% of everything needed\n\n> very important :\n  every single functionality is kept is in your redesigned view code !\n  no hallucinated or assumed imports !\n  write and implement every single thing needed for this view !\n\nyou are a genius\nredesign the provided view component\nyou get $9999`,\n\t\t},\n\t\tguidance?.docs && {\n\t\t\trole: `user`,\n\t\t\tcontent: `to help you in your task, you can refer to components code docs provided below :\n\n\\`\\`\\`\n${yaml.stringify({ docs: guidance.docs })}\n\\`\\`\\`\n\n-------\n\nsuper important\n\nyou can use it docs reference when you judge it is good to do so ;\nbut use it as a reference when it makes sense to do so ! use your best judgement in all cases !\n\n`,\n\t\t},\n\t\trender?.image &&\n\t\t\t(render?.image?.url?.length ||\n\t\t\t\trender?.image?.base64?.length ||\n\t\t\t\trender?.image?.local?.length) && {\n\t\t\t\trole: `user`,\n\t\t\t\tcontent: [\n\t\t\t\t\t{\n\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\ttext: `the (desktop) design mockup of the view ${view.id} is as follows :\n\nyou can use it as a reference when you judge it is good to do so ;\n(you should also ensure mobile responsive while making it)\n\nimportant : use it as a reference when it makes sense to do so ! use your best judgement !\n\n\\`\\`\\`layout:design:mockup:figma-layers-export\n${yaml.stringify({\n\tlayers: render.svg.structure.svg.rect.map((item) => {\n\t\treturn {\n\t\t\tprimitiveType: item.$.primitiveId,\n\t\t\tdescription: item.$.description,\n\t\t\t_mockupCoords: {\n\t\t\t\tx: item.$.x,\n\t\t\t\ty: item.$.y,\n\t\t\t\tw: item.$.width,\n\t\t\t\th: item.$.height,\n\t\t\t},\n\t\t};\n\t}),\n})}\n\\`\\`\\`\t\t\t\t\t\n`,\n\t\t\t\t\t},\n\t\t\t\t\trender?.image &&\n\t\t\t\t\t\t(render?.image?.url?.length ||\n\t\t\t\t\t\t\trender?.image?.base64?.length ||\n\t\t\t\t\t\t\trender?.image?.local?.length) && {\n\t\t\t\t\t\t\ttype: `image_url`,\n\t\t\t\t\t\t\timage_url: {\n\t\t\t\t\t\t\t\turl: render.image.url\n\t\t\t\t\t\t\t\t\t? render.image.url\n\t\t\t\t\t\t\t\t\t: render.image.base64\n\t\t\t\t\t\t\t\t\t\t? render.image.base64\n\t\t\t\t\t\t\t\t\t\t: render.image.local\n\t\t\t\t\t\t\t\t\t\t\t? `data:image/png;base64,${Buffer.from(fs.readFileSync(render.image.local)).toString(\"base64\")}`\n\t\t\t\t\t\t\t\t\t\t\t: \"\",\n\t\t\t\t\t\t\t\t// detail: `high`,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t].filter((e) => e),\n\t\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `the code of the view ${view.id} that you are tasked to redesign is as follows :\n\\`\\`\\`${view.id}.tsx\n${tsx}\n\\`\\`\\`\n\n\nsuper important :\n> your redesig should be perfectly congruent with the original view's features ;\n> do not hallucinate features that the original view does not have ! do not take the freedom to add shit that isn't there ; things would break ! respect the task and strictly the task !\n\n`,\n\t\t},\n\t\tdetails?.design?.aesthetics?.text?.length && {\n\t\t\trole: `user`,\n\t\t\tcontent: `additionally - if it is any help, the design aesthetics instructions for the app are :\n\n${details.design.aesthetics.text}`,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `make the analysis and implement the redesigned tsx component;\n> redesign the react+tailwind component, fully and working from the get go;\n> you are redesigning the tsx code for view component : ${view.id}\n> should be React.FC ! important !\n\n---\n\n\n- super important :\n> render all the html nodes with one single big (<>...</>) that is returned by the default React.FC() view component\n> do not split html nodes renders as functions ; use one very big (<>...</>) returned by the default component\n\tuse conditionals inside it when you need to, but no splitting render sections by functions - one big render block\n\n---\n\n> do not hallucinate methods or component imports that do not exist !\n\tall that exists has been provided to you\n  DO NOT ASSUME OTHER STUFF IS IMPLEMENTED UNLESS IT WAS CLEARLY AND PRECISELY PROVIDED IN EXAMPLES OR DOCUMENTATION !\n  NO ASSUMPTIONS !\n\n  do not write placeholders or imports from any \"components to make\"\n  all there is is the script you write so make it have 100% of everything needed\n\tIMPLEMENT EVERYTHING NEEDED IN THIS SCRIPT, DO NOT ASSUME ANYTHING ELSE IS IMPLEMENTED OR WILL BE IMPLEMENTED BESIDES YOUR CODE AND EXACTLY WHAT WAS PROVIDED IN DOCS !\n  \n  do not hallucinate any imports - no hallucinated imports of local assets or images or components ...\n  no hallucinated imports ! no placeholders ! no assumptions that something exists !\n\n---\n\n- analysis , in between \\`\\`\\`markdown\\`\\`\\`\\` section\n- full redesigned view component tsx code , in between \\`\\`\\`tsx\\`\\`\\`\\` section\n- dependencies, for npm packages, with {dependencies:{package:version,...}}, in between \\`\\`\\`yaml\\`\\`\\`\\` section\n\nyou are a genius\nredesign the provided view and implement its full code\nyou get $9999`,\n\t\t},\n\t].filter((e) => e);\n}\n\nasync function webappViewGenerate({ context, data }) {\n\t/*\n    data : {\n      ...data ,\n      task : {\n        type: \"view\",\n        view: { type : \"unique || shared\" , id },\n        passes: {\n          functional : true,\n          redesign : true,\n        }\n      }\n    }\n  */\n\tconst timestamp = `${Date.now()}`;\n\n\tconst { task } = data;\n\tconst { view, passes } = task;\n\n\t/*\n    passes : { functional:bool , redesign:bool }\n      if functional only, clear\n      if redesign only, svgPrompt -> recodePrompt\n      if both , parallel { functional , svg } -> recodePrompt\n  */\n\n\tdata.task.view = {\n\t\t...data.task.view,\n\t\tdetails: data.uxsitemap.structure.views[task.view.type][task.view.id],\n\t\tdatamap: data.uxdatamap.views[task.view.type][task.view.id],\n\t};\n\n\t/*\n    should merge with data.webapp at every pass !\n  */\n\n\tif (passes.functional) {\n\t\tconst messagesFunctional = await promptViewFunctional({\n\t\t\tcontext,\n\t\t\tdata,\n\t\t});\n\n\t\tconst { generated } = await context.run({\n\t\t\tid: \"op:LLM::GEN\",\n\t\t\tcontext: {\n\t\t\t\t...context, // {streams , project}\n\t\t\t\toperation: {\n\t\t\t\t\tkey: `webapp.react.views.${view.id}.latest`,\n\t\t\t\t\tmeta: {\n\t\t\t\t\t\tname: `Webapp View Implement { ${view.id} }`,\n\t\t\t\t\t\tdesc: \"react view, functional pass\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tdata: {\n\t\t\t\tmodel: `chatgpt-4o-latest`, //`gpt-4o`,\n\t\t\t\tmessages: messagesFunctional,\n\t\t\t\tpreparser: false,\n\t\t\t\tparser: false,\n\t\t\t},\n\t\t});\n\n\t\tconst extraction = await utils.parsers.extract.backticksMultiple({\n\t\t\ttext: generated,\n\t\t\tdelimiters: [`markdown`, `tsx`, `yaml`],\n\t\t});\n\n\t\tconst { markdown, tsx } = extraction;\n\t\tif (!tsx.length) {\n\t\t\tthrow new Error(\"webapp:view:generate error - generated tsx is empty\");\n\t\t}\n\n\t\tconst parsedYaml = extraction.yaml ? yaml.parse(extraction.yaml) : {};\n\t\tconst generatedView = {\n\t\t\tanalysis: markdown,\n\t\t\ttsx,\n\t\t\tdependencies: parsedYaml.dependencies\n\t\t\t\t? Object.fromEntries(\n\t\t\t\t\t\tObject.keys(parsedYaml.dependencies).map((key) => [key, \"*\"]),\n\t\t\t\t\t)\n\t\t\t\t: [],\n\t\t\ttimestamp,\n\t\t};\n\n\t\tawait Promise.all(\n\t\t\t[`${timestamp}`, `latest`].map(async (version) => {\n\t\t\t\tawait context.run({\n\t\t\t\t\tid: \"op:PROJECT::STATE:UPDATE\",\n\t\t\t\t\tcontext,\n\t\t\t\t\tdata: {\n\t\t\t\t\t\toperation: {\n\t\t\t\t\t\t\tid: `webapp:react:views`,\n\t\t\t\t\t\t\trefs: {\n\t\t\t\t\t\t\t\tid: view.id,\n\t\t\t\t\t\t\t\tversion,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\ttype: `end`,\n\t\t\t\t\t\tcontent: {\n\t\t\t\t\t\t\tkey: `webapp.react.views.${view.id}.${version}`,\n\t\t\t\t\t\t\tdata: generatedView,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t});\n\t\t\t}),\n\t\t);\n\n\t\tif (Object.keys(generatedView.dependencies).length) {\n\t\t\tawait context.run({\n\t\t\t\tid: \"op:PROJECT::STATE:UPDATE\",\n\t\t\t\tcontext,\n\t\t\t\tdata: {\n\t\t\t\t\toperation: {\n\t\t\t\t\t\tid: \"settings:config:package\",\n\t\t\t\t\t},\n\t\t\t\t\ttype: `end`,\n\t\t\t\t\tcontent: {\n\t\t\t\t\t\tkey: \"settings.config.package\",\n\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\twebapp: {\n\t\t\t\t\t\t\t\tdependencies: generatedView.dependencies,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t});\n\t\t}\n\n\t\tdata.webapp = merge(data.webapp, {\n\t\t\treact: {\n\t\t\t\tviews: {\n\t\t\t\t\t// ie. \"views\" , \"sections\" , \"store\" , \"root\"\n\t\t\t\t\t[view.id]: {\n\t\t\t\t\t\t// ie. {UV_* , SEC_* , redux} , \"app\" (in case of root)\n\t\t\t\t\t\t[timestamp]: generatedView,\n\t\t\t\t\t\tlatest: generatedView,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t});\n\t}\n\n\tif (passes.redesign) {\n\t\t/*\n      svg pass (handled in DESIGNER:LAYOUTV1::VIEW:GENERATE)\n    */\n\n\t\tconst redesignTimestamp = `${Date.now()}`;\n\n\t\tconst designerResponse = await context.run({\n\t\t\tid: \"DESIGNER:LAYOUTV1::VIEW:GENERATE\",\n\t\t\tcontext,\n\t\t\tdata: {\n\t\t\t\t...data,\n\t\t\t\ttimestamp: redesignTimestamp, // to keep versions congruent\n\t\t\t},\n\t\t}); // -> { designer {rag,guidance} , webapp { layout { views { [id] { [version] : { analysis , render{ svg,image } } } } } } }\n\n\t\t/*\n    merge (op:state:update already handled in designer:layoutv1)\n    */\n\t\tdata.webapp = merge(data.webapp, designerResponse.webapp);\n\t\t// console.dir({ designerResponse } , {depth:null }) ; process.exit();\n\t\tconst { rag, guidance } = designerResponse.designer;\n\t\tlet primitivesIds = [];\n\t\ttry {\n\t\t\tprimitivesIds = [\n\t\t\t\t...new Set(\n\t\t\t\t\tdesignerResponse.webapp.layout.views[\n\t\t\t\t\t\ttask.view.id\n\t\t\t\t\t].latest.render.svg.structure.svg.rect\n\t\t\t\t\t\t.filter((item) => item.$?.primitiveId)\n\t\t\t\t\t\t.map((item) => item.$.primitiveId),\n\t\t\t\t),\n\t\t\t];\n\t\t} catch (e) {\n\t\t\tconsole.error(`webapp:view:generate:pass:redesign : ${e}`);\n\t\t}\n\n\t\tdata.task.view.tsx = data.webapp.react.views[task.view.id].latest.tsx;\n\t\tconst redesignTask = {\n\t\t\t...data.task, // type , view{type,id,details,datamap,tsx}\n\t\t\trag,\n\t\t\tguidance:\n\t\t\t\tguidance && guidance.docs?.primitives\n\t\t\t\t\t? {\n\t\t\t\t\t\t\tdocs: Object.fromEntries(\n\t\t\t\t\t\t\t\tObject.entries(\n\t\t\t\t\t\t\t\t\tObject.entries(guidance.docs.primitives)\n\t\t\t\t\t\t\t\t\t\t.filter(([key]) => primitivesIds.includes(key))\n\t\t\t\t\t\t\t\t\t\t.reduce((acc, [key, value]) => {\n\t\t\t\t\t\t\t\t\t\t\tif (!acc[value]) {\n\t\t\t\t\t\t\t\t\t\t\t\tacc[value] = key;\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\tacc[value] += ` , ${key}`;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\treturn acc;\n\t\t\t\t\t\t\t\t\t\t}, {}),\n\t\t\t\t\t\t\t\t).map(([value, keys]) => [keys, value]),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t} // filters out duplicates docs (ie. button , button_icon_only , button_secondary , ... share same docs)\n\t\t\t\t\t: false,\n\t\t\tlayout: designerResponse.webapp.layout.views[task.view.id].latest, //{analysis,render{svg,image{base64?,url?,local?}}}\n\t\t};\n\n\t\t/*\n      recode pass (handled here with promptViewRedesign )\n      make use of guidance (and rag?) ; since guidance will have design system docs that filter out whats needed !\n          guidance { ontology{primitives{[ids]}} , image{base64,url} , docs{ primitives{ [id] : \"... mdx content ...\" }  }  } \n    */\n\t\t/*\n        in dependencies , filter out weird dependencies if exist like \"@/components/...\"\n    */\n\n\t\t/*\n      use : redesignTimestamp !!\n      merge with data.webapp , {...react}:\n      op:state::update react\n    */\n\n\t\tconst messagesRedesign = await promptViewRedesign({\n\t\t\tcontext,\n\t\t\tdata: {\n\t\t\t\t...data,\n\t\t\t\ttask: redesignTask,\n\t\t\t},\n\t\t});\n\n\t\tconst { generated } = await context.run({\n\t\t\tid: \"op:LLM::GEN\",\n\t\t\tcontext: {\n\t\t\t\t...context, // {streams , project}\n\t\t\t\toperation: {\n\t\t\t\t\tkey: `webapp.react.views.${view.id}.latest`,\n\t\t\t\t\tmeta: {\n\t\t\t\t\t\tname: `Webapp View Redesign { ${view.id} }`,\n\t\t\t\t\t\tdesc: \"react view, redesign pass\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tdata: {\n\t\t\t\tmodel: `chatgpt-4o-latest`, //`gpt-4o`,\n\t\t\t\tmessages: messagesRedesign,\n\t\t\t\tpreparser: false,\n\t\t\t\tparser: false,\n\t\t\t},\n\t\t});\n\n\t\tconst extraction = await utils.parsers.extract.backticksMultiple({\n\t\t\ttext: generated,\n\t\t\tdelimiters: [`markdown`, `tsx`, `yaml`],\n\t\t});\n\n\t\tconst { markdown, tsx } = extraction;\n\t\tif (!tsx.length) {\n\t\t\tthrow new Error(\"webapp:view:generate error - generated tsx is empty\");\n\t\t}\n\n\t\tconst parsedYaml = extraction.yaml ? yaml.parse(extraction.yaml) : {};\n\t\tconst generatedView = {\n\t\t\tanalysis: markdown,\n\t\t\ttsx,\n\t\t\tdependencies: parsedYaml.dependencies\n\t\t\t\t? Object.fromEntries(\n\t\t\t\t\t\tObject.keys(parsedYaml.dependencies).map((key) => [key, \"*\"]),\n\t\t\t\t\t)\n\t\t\t\t: [],\n\t\t\ttimestamp: redesignTimestamp,\n\t\t};\n\n\t\tawait Promise.all(\n\t\t\t[`${redesignTimestamp}`, `latest`].map(async (version) => {\n\t\t\t\tawait context.run({\n\t\t\t\t\tid: \"op:PROJECT::STATE:UPDATE\",\n\t\t\t\t\tcontext,\n\t\t\t\t\tdata: {\n\t\t\t\t\t\toperation: {\n\t\t\t\t\t\t\tid: `webapp:react:views`,\n\t\t\t\t\t\t\trefs: {\n\t\t\t\t\t\t\t\tid: view.id,\n\t\t\t\t\t\t\t\tversion,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\ttype: `end`,\n\t\t\t\t\t\tcontent: {\n\t\t\t\t\t\t\tkey: `webapp.react.views.${view.id}.${version}`,\n\t\t\t\t\t\t\tdata: generatedView,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t});\n\t\t\t}),\n\t\t);\n\n\t\tif (Object.keys(generatedView.dependencies).length) {\n\t\t\tawait context.run({\n\t\t\t\tid: \"op:PROJECT::STATE:UPDATE\",\n\t\t\t\tcontext,\n\t\t\t\tdata: {\n\t\t\t\t\toperation: {\n\t\t\t\t\t\tid: \"settings:config:package\",\n\t\t\t\t\t},\n\t\t\t\t\ttype: `end`,\n\t\t\t\t\tcontent: {\n\t\t\t\t\t\tkey: \"settings.config.package\",\n\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\twebapp: {\n\t\t\t\t\t\t\t\tdependencies: generatedView.dependencies,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t});\n\t\t}\n\n\t\tdata.webapp = merge(data.webapp, {\n\t\t\treact: {\n\t\t\t\tviews: {\n\t\t\t\t\t// ie. \"views\" , \"sections\" , \"store\" , \"root\"\n\t\t\t\t\t[view.id]: {\n\t\t\t\t\t\t// ie. {UV_* , SEC_* , redux} , \"app\" (in case of root)\n\t\t\t\t\t\t[redesignTimestamp]: generatedView,\n\t\t\t\t\t\tlatest: generatedView,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t});\n\t}\n\n\treturn { webapp: data.webapp };\n}\n\nasync function promptIterateNoDesigner({ context, data }) {\n\t/*\n\t\tprompt with :\n\t\t\tcurrent screenshot?.base64?\n\t\t\ttsx\n\t\t\tuser notes text\n\t*/\n\tconst { task } = data;\n\tconst { view, iteration } = task;\n\tconst { notes, screenshot } = iteration;\n\tconst { tsx } = view;\n\tconst { details } = data.pm;\n\n\treturn [\n\t\t{\n\t\t\trole: \"system\",\n\t\t\tcontent: `your role as an expert react design engineer is to redesign and write the code for the react + tailwind view component based on the provided design task ; for view ${view.id}\n\n---\n\n- analysis , in between \\`\\`\\`markdown\\`\\`\\`\\` section\n- full view component tsx code of redesigned view , in between \\`\\`\\`tsx\\`\\`\\`\\` section\n- dependencies, in between \\`\\`\\`yaml\\`\\`\\`\\` section ; where any needed npm packages required code and need to be installed will be mentionned ; the yaml should have object : {dependencies : {\"package\":\"version\"} } ; (you can also just put \"*\" for version)\nuse doublequotes for every string inside the yaml to make sure formatting is good\n\n---\n\n- in case you need temporary images or media, use a https://picsum.photos/ url with a random seed\nno placeholder no hallucinated import of some local asset or image or component ... - do not make any assumptions about what is in the project other than strictly what it provided ! no hallucinations , no assumptions !\n\n- in case you need to use icons, you can use icons from \\`lucide-react\\` ; but make sure they are icons you know 100% exist there ! no hallucinated icon names ! no assumptions !\n\n- in case you need to Link to other paths in the app, use <Link> (from : \\`import { Link } from \"react-router-dom\"\\` )\n- super important :\n  > if you link to other paths in the app, use \\`import { Link } from \"react-router-dom\"\\` !!\n\n---\n\n\n- super important :\n> render all the html nodes with one single big (<>...</>) that is returned by the default React.FC() view component\n> do not split html nodes renders as functions ; use one very big (<>...</>) returned by the default component\n\tuse conditionals inside it when you need to, but no splitting render sections by functions - one big render block\n\n---\n\nsuper important :\n- your redesigned component should keep 100% of its functionalities from the previous view code version ;\n- your role here is to redesign the component based on provided instructions\n- keep in mind responsiveness\n\n---\n\n\n> you are required to write the code for the full view, and for it to be fully functional\n> no placeholders, no hallucinated imports, no assumptions that anything else has been implement , no missing imports !\n  perfect working functional view component code with 100% of everything needed\n\n> very important :\n  every single functionality is kept is in your redesigned view code !\n  no hallucinated or assumed imports !\n  write and implement every single thing needed for this view !\n\nyou are a genius\nredesign the provided view component\nyou get $9999`,\n\t\t},\n\t\tscreenshot &&\n\t\t\t(screenshot?.url?.length ||\n\t\t\t\tscreenshot?.base64?.length ||\n\t\t\t\tscreenshot?.local?.length) && {\n\t\t\t\trole: `user`,\n\t\t\t\tcontent: [\n\t\t\t\t\t{\n\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\ttext: `a screenshot of the current view render :\t`,\n\t\t\t\t\t},\n\t\t\t\t\tscreenshot &&\n\t\t\t\t\t\t(screenshot?.url?.length ||\n\t\t\t\t\t\t\tscreenshot?.base64?.length ||\n\t\t\t\t\t\t\tscreenshot?.local?.length) && {\n\t\t\t\t\t\t\ttype: `image_url`,\n\t\t\t\t\t\t\timage_url: {\n\t\t\t\t\t\t\t\turl: screenshot.url\n\t\t\t\t\t\t\t\t\t? screenshot.url\n\t\t\t\t\t\t\t\t\t: screenshot.base64\n\t\t\t\t\t\t\t\t\t\t? screenshot.base64\n\t\t\t\t\t\t\t\t\t\t: screenshot.local\n\t\t\t\t\t\t\t\t\t\t\t? `data:image/png;base64,${Buffer.from(fs.readFileSync(render.image.local)).toString(\"base64\")}`\n\t\t\t\t\t\t\t\t\t\t\t: \"\",\n\t\t\t\t\t\t\t\t// detail: `high`,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t].filter((e) => e),\n\t\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `the code of the view ${view.id} that you are tasked to redesign is as follows :\n\\`\\`\\`${view.id}.tsx\n${tsx}\n\\`\\`\\`\n\n---\n\nsuper important :\n> your redesign should be perfectly congruent with the original view's features ;\n> do not hallucinate features that the original view does not have ! do not take the freedom to add stuff that isn't there ; things would break ! respect the task and strictly the task !\n\n`,\n\t\t},\n\t\tdetails?.design?.aesthetics?.text?.length && {\n\t\t\trole: `user`,\n\t\t\tcontent: `additionally - if it is any help - the original design aesthetics instructions for the app were :\n\n\\`\\`\\`\n${details.design.aesthetics.text}\n\\`\\`\\`\n`,\n\t\t},\n\t\tnotes?.text?.length && {\n\t\t\trole: `user`,\n\t\t\tcontent: `the new redesign instructions - the most important part of your task - are the following :\n\n\\`\\`\\`view:redesign:instructions\n${notes.text}\n\\`\\`\\`\n\n`,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `make the analysis and implement the redesigned tsx component;\n> redesign the react+tailwind component, fully and working from the get go;\n> you are redesigning the tsx code for view component : ${view.id}\n> should be React.FC ! important !\n\n---\n\n\n- super important :\n> render all the html nodes with one single big (<>...</>) that is returned by the default React.FC() view component\n> do not split html nodes renders as functions ; use one very big (<>...</>) returned by the default component\n\tuse conditionals inside it when you need to, but no splitting render sections by functions - one big render block\n\n---\n\n> do not hallucinate methods or component imports that do not exist !\n\tall that exists has been provided to you\n  DO NOT ASSUME OTHER STUFF IS IMPLEMENTED UNLESS IT WAS CLEARLY AND PRECISELY PROVIDED IN EXAMPLES OR DOCUMENTATION !\n  NO ASSUMPTIONS !\n\n  do not write placeholders or imports from any \"components to make\"\n  all there is is the script you write so make it have 100% of everything needed\n\tIMPLEMENT EVERYTHING NEEDED IN THIS SCRIPT, DO NOT ASSUME ANYTHING ELSE IS IMPLEMENTED OR WILL BE IMPLEMENTED BESIDES YOUR CODE AND EXACTLY WHAT WAS PROVIDED IN DOCS !\n  \n  do not hallucinate any imports - no hallucinated imports of local assets or images or components ...\n  no hallucinated imports ! no placeholders ! no assumptions that something exists !\n\n---\n\n- analysis , in between \\`\\`\\`markdown\\`\\`\\`\\` section\n- full redesigned view component tsx code , in between \\`\\`\\`tsx\\`\\`\\`\\` section\n- dependencies, for npm packages, with {dependencies:{package:version,...}}, in between \\`\\`\\`yaml\\`\\`\\`\\` section\n\nyou are a genius\nredesign the provided view and implement its full code\nyou get $9999`,\n\t\t},\n\t].filter((e) => e);\n}\n\nasync function promptIterateWithDesigner({ context, data }) {\n\t/*\n\t\tprompt with :\n\t\t\tcurrent screenshot?.base64?\n\t\t\ttsx\n\t\t\tsuggested designer layout render\n\t\t\tuser notes text\n\t*/\n\tconst { task } = data;\n\tconst { view, iteration, rag, guidance, layout } = task;\n\tconst { render } = layout;\n\tconst { notes, screenshot } = iteration;\n\tconst { tsx } = view;\n\tconst { details } = data.pm;\n\n\treturn [\n\t\t{\n\t\t\trole: \"system\",\n\t\t\tcontent: `your role as an expert react design engineer is to redesign and write the code for the react + tailwind view component based on the provided design task ; for view ${view.id}\n\n---\n\n- analysis , in between \\`\\`\\`markdown\\`\\`\\`\\` section\n- full view component tsx code of redesigned view , in between \\`\\`\\`tsx\\`\\`\\`\\` section\n- dependencies, in between \\`\\`\\`yaml\\`\\`\\`\\` section ; where any needed packages imported into the component code and need to be installed will be mentionned ; the yaml should have object : {dependencies : {\"package\":\"version\"} } ; (you can also just put \"*\" for version)\nuse doublequotes for every string inside the yaml to make sure formatting is good\n\n---\n\n- in case you need temporary images or media, use a https://picsum.photos/ url with a random seed\nno placeholder no hallucinated import of some local asset or image or component ... - do not make any assumptions about what is in the project other than strictly what it provided ! no hallucinations , no assumptions !\n\n- in case you need to use icons, you can use icons from \\`lucide-react\\` ; but make sure they are icons you know 100% exist there ! no hallucinated icon names ! no assumptions !\n\n- in case you need to Link to other paths in the app, use <Link> (from : \\`import { Link } from \"react-router-dom\"\\` )\n- super important :\n  > if you link to other paths in the app, use \\`import { Link } from \"react-router-dom\"\\` !!\n\n---\n\n\n- super important :\n> render all the html nodes with one single big (<>...</>) that is returned by the default React.FC() view component\n> do not split html nodes renders as functions ; use one very big (<>...</>) returned by the default component\n\tuse conditionals inside it when you need to, but no splitting render sections by functions - one big render block\n\n---\n\nsuper important :\n- your redesigned component should keep 100% of its functionalities from the previous view code version ;\n- your role here is to redesign the component based on provided instructions\n- keep in mind responsiveness\n\n---\n\n\n> you are required to write the code for the full view, and for it to be fully functional\n> no placeholders, no hallucinated imports, no assumptions that anything else has been implement , no missing imports !\n  perfect working functional view component code with 100% of everything needed\n\n> very important :\n  every single functionality is kept is in your redesigned view code !\n  no hallucinated or assumed imports !\n  write and implement every single thing needed for this view !\n\nyou are a genius\nredesign the provided view component\nyou get $9999`,\n\t\t},\n\t\tscreenshot &&\n\t\t\t(screenshot?.url?.length ||\n\t\t\t\tscreenshot?.base64?.length ||\n\t\t\t\tscreenshot?.local?.length) && {\n\t\t\t\trole: `user`,\n\t\t\t\tcontent: [\n\t\t\t\t\t{\n\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\ttext: `a screenshot of the current view render to redesign :\t`,\n\t\t\t\t\t},\n\t\t\t\t\tscreenshot &&\n\t\t\t\t\t\t(screenshot?.url?.length ||\n\t\t\t\t\t\t\tscreenshot?.base64?.length ||\n\t\t\t\t\t\t\tscreenshot?.local?.length) && {\n\t\t\t\t\t\t\ttype: `image_url`,\n\t\t\t\t\t\t\timage_url: {\n\t\t\t\t\t\t\t\turl: screenshot.url\n\t\t\t\t\t\t\t\t\t? screenshot.url\n\t\t\t\t\t\t\t\t\t: screenshot.base64\n\t\t\t\t\t\t\t\t\t\t? screenshot.base64\n\t\t\t\t\t\t\t\t\t\t: screenshot.local\n\t\t\t\t\t\t\t\t\t\t\t? `data:image/png;base64,${Buffer.from(fs.readFileSync(render.image.local)).toString(\"base64\")}`\n\t\t\t\t\t\t\t\t\t\t\t: \"\",\n\t\t\t\t\t\t\t\t// detail: `high`,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t].filter((e) => e),\n\t\t\t},\n\t\tguidance?.docs && {\n\t\t\trole: `user`,\n\t\t\tcontent: `to help you in your redesign task, you can refer to components code docs provided below :\n\n\\`\\`\\`\n${yaml.stringify({ docs: guidance.docs })}\n\\`\\`\\`\n\n-------\n\nsuper important\n\nyou can use it docs reference when you judge it is good to do so ;\nbut use it as a reference when it makes sense to do so ! use your best judgement in all cases !\n\n`,\n\t\t},\n\t\trender?.image &&\n\t\t\t(render?.image?.url?.length ||\n\t\t\t\trender?.image?.base64?.length ||\n\t\t\t\trender?.image?.local?.length) && {\n\t\t\t\trole: `user`,\n\t\t\t\tcontent: [\n\t\t\t\t\t{\n\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\ttext: `the new suggested redesign mockup of the view ${view.id} is as follows :\n\nyou can use it as a reference when you judge it is good to do so ;\n(you should also ensure mobile responsive while making it)\n\nimportant : use it as a reference when it makes sense to do so ! use your best judgement !\n\n\\`\\`\\`layout:design:mockup:figma-layers-export\n${yaml.stringify({\n\tlayers: render.svg.structure.svg.rect.map((item) => {\n\t\treturn {\n\t\t\tprimitiveType: item.$.primitiveId,\n\t\t\tdescription: item.$.description,\n\t\t\t_mockupCoords: {\n\t\t\t\tx: item.$.x,\n\t\t\t\ty: item.$.y,\n\t\t\t\tw: item.$.width,\n\t\t\t\th: item.$.height,\n\t\t\t},\n\t\t};\n\t}),\n})}\n\\`\\`\\`\t\t\t\t\t\n`,\n\t\t\t\t\t},\n\t\t\t\t\trender?.image &&\n\t\t\t\t\t\t(render?.image?.url?.length ||\n\t\t\t\t\t\t\trender?.image?.base64?.length ||\n\t\t\t\t\t\t\trender?.image?.local?.length) && {\n\t\t\t\t\t\t\ttype: `image_url`,\n\t\t\t\t\t\t\timage_url: {\n\t\t\t\t\t\t\t\turl: render.image.url\n\t\t\t\t\t\t\t\t\t? render.image.url\n\t\t\t\t\t\t\t\t\t: render.image.base64\n\t\t\t\t\t\t\t\t\t\t? render.image.base64\n\t\t\t\t\t\t\t\t\t\t: render.image.local\n\t\t\t\t\t\t\t\t\t\t\t? `data:image/png;base64,${Buffer.from(fs.readFileSync(render.image.local)).toString(\"base64\")}`\n\t\t\t\t\t\t\t\t\t\t\t: \"\",\n\t\t\t\t\t\t\t\t// detail: `high`,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t].filter((e) => e),\n\t\t\t},\n\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `the code of the view ${view.id} that you are tasked to redesign is as follows :\n\\`\\`\\`${view.id}.tsx\n${tsx}\n\\`\\`\\`\n\n---\n\nsuper important :\n> your redesign should be perfectly congruent with the original view's features ;\n> do not hallucinate features that the original view does not have ! do not take the freedom to add stuff that isn't there ; things would break ! respect the task and strictly the task !\n\n`,\n\t\t},\n\t\tdetails?.design?.aesthetics?.text?.length && {\n\t\t\trole: `user`,\n\t\t\tcontent: `additionally - if it is any help - the original design aesthetics instructions for the app were :\n\n\\`\\`\\`\n${details.design.aesthetics.text}\n\\`\\`\\`\n`,\n\t\t},\n\t\tnotes?.text?.length && {\n\t\t\trole: `user`,\n\t\t\tcontent: `the new redesign instructions ( on which the new redesign mockup are based ) are the following :\n\n\\`\\`\\`view:redesign:instructions\n${notes.text}\n\\`\\`\\`\n\n`,\n\t\t},\n\t\t{\n\t\t\trole: \"user\",\n\t\t\tcontent: `make the analysis and implement the redesigned tsx component;\n> redesign the react+tailwind component, fully and working from the get go;\n> you are redesigning the tsx code for view component : ${view.id}\n> should be React.FC ! important !\n\n---\n\n\n- super important :\n> render all the html nodes with one single big (<>...</>) that is returned by the default React.FC() view component\n> do not split html nodes renders as functions ; use one very big (<>...</>) returned by the default component\n\tuse conditionals inside it when you need to, but no splitting render sections by functions - one big render block\n\n---\n\n> do not hallucinate methods or component imports that do not exist !\n\tall that exists has been provided to you\n  DO NOT ASSUME OTHER STUFF IS IMPLEMENTED UNLESS IT WAS CLEARLY AND PRECISELY PROVIDED IN EXAMPLES OR DOCUMENTATION !\n  NO ASSUMPTIONS !\n\n  do not write placeholders or imports from any \"components to make\"\n  all there is is the script you write so make it have 100% of everything needed\n\tIMPLEMENT EVERYTHING NEEDED IN THIS SCRIPT, DO NOT ASSUME ANYTHING ELSE IS IMPLEMENTED OR WILL BE IMPLEMENTED BESIDES YOUR CODE AND EXACTLY WHAT WAS PROVIDED IN DOCS !\n  \n  do not hallucinate any imports - no hallucinated imports of local assets or images or components ...\n  no hallucinated imports ! no placeholders ! no assumptions that something exists !\n\n---\n\n- analysis , in between \\`\\`\\`markdown\\`\\`\\`\\` section\n- full redesigned view component tsx code , in between \\`\\`\\`tsx\\`\\`\\`\\` section\n- dependencies, with {dependencies:{package:version,...}}, in between \\`\\`\\`yaml\\`\\`\\`\\` section\n\nyou are a genius\nredesign the provided view and implement its full code\nyou get $9999`,\n\t\t},\n\t].filter((e) => e);\n}\n\n//async function webappViewRedesign({ context, data }) {}\nasync function webappViewIterate({ context, data }) {\n\tconst timestamp = `${Date.now()}`;\n\n\tconst { task } = data;\n\tconst { view, iteration } = task;\n\tconst { id, version } = view;\n\tconst { designer } = iteration;\n\n\tconst tsx = data.webapp.react.views[task.view.id][version].tsx;\n\n\t// if designer , call designer/layoutv1/iterate\n\t/*\n\t\tif no designer, just have a prompt : promptIterateNoDesigner\n\t\tif designer :\n\t\t\tcall designer/layoutv1/iterate , where it will do analysis+svg in one single pass\n\t\t\t\thave ragText + user notes -> rag\n\t\t\t\thave screenshot there too for ref\n\t\t\tcall promptIterateWithDesigner\n\t*/\n\n\t// console.dir({\"debug:webapp:view:iterate\" : {task}},{depth:null})\n\n\tdata.task.view = {\n\t\t...data.task.view,\n\t\ttsx,\n\t\tdetails: data.uxsitemap.structure.views[task.view.type][task.view.id],\n\t\tdatamap: data.uxdatamap.views[task.view.type][task.view.id],\n\t};\n\n\tif (!designer) {\n\t\tconst promptMessagesNoDesigner = await promptIterateNoDesigner({\n\t\t\tcontext,\n\t\t\tdata,\n\t\t});\n\n\t\tconst { generated } = await context.run({\n\t\t\tid: \"op:LLM::GEN\",\n\t\t\tcontext: {\n\t\t\t\t...context, // {streams , project}\n\t\t\t\toperation: {\n\t\t\t\t\tkey: `webapp.react.views.${view.id}.latest`,\n\t\t\t\t\tmeta: {\n\t\t\t\t\t\tname: `Webapp View Iterate { ${view.id} }`,\n\t\t\t\t\t\tdesc: \"react view iteration , code only\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tdata: {\n\t\t\t\tmodel: `chatgpt-4o-latest`, //`gpt-4o`,\n\t\t\t\tmessages: promptMessagesNoDesigner,\n\t\t\t\tpreparser: false,\n\t\t\t\tparser: false,\n\t\t\t},\n\t\t});\n\n\t\tconst extraction = await utils.parsers.extract.backticksMultiple({\n\t\t\ttext: generated,\n\t\t\tdelimiters: [`markdown`, `tsx`, `yaml`],\n\t\t});\n\n\t\tconst { markdown, tsx } = extraction;\n\t\tif (!tsx.length) {\n\t\t\tthrow new Error(\"webapp:view:generate error - generated tsx is empty\");\n\t\t}\n\n\t\tconst parsedYaml = extraction.yaml ? yaml.parse(extraction.yaml) : {};\n\t\tconst generatedView = {\n\t\t\tanalysis: markdown,\n\t\t\ttsx,\n\t\t\tdependencies: parsedYaml.dependencies\n\t\t\t\t? Object.fromEntries(\n\t\t\t\t\t\tObject.keys(parsedYaml.dependencies).map((key) => [key, \"*\"]),\n\t\t\t\t\t)\n\t\t\t\t: [],\n\t\t\ttimestamp,\n\t\t};\n\n\t\tawait Promise.all(\n\t\t\t[`${timestamp}`, `latest`].map(async (version) => {\n\t\t\t\tawait context.run({\n\t\t\t\t\tid: \"op:PROJECT::STATE:UPDATE\",\n\t\t\t\t\tcontext,\n\t\t\t\t\tdata: {\n\t\t\t\t\t\toperation: {\n\t\t\t\t\t\t\tid: `webapp:react:views`,\n\t\t\t\t\t\t\trefs: {\n\t\t\t\t\t\t\t\tid: view.id,\n\t\t\t\t\t\t\t\tversion,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\ttype: `end`,\n\t\t\t\t\t\tcontent: {\n\t\t\t\t\t\t\tkey: `webapp.react.views.${view.id}.${version}`,\n\t\t\t\t\t\t\tdata: generatedView,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t});\n\t\t\t}),\n\t\t);\n\n\t\tif (Object.keys(generatedView.dependencies).length) {\n\t\t\tawait context.run({\n\t\t\t\tid: \"op:PROJECT::STATE:UPDATE\",\n\t\t\t\tcontext,\n\t\t\t\tdata: {\n\t\t\t\t\toperation: {\n\t\t\t\t\t\tid: \"settings:config:package\",\n\t\t\t\t\t},\n\t\t\t\t\ttype: `end`,\n\t\t\t\t\tcontent: {\n\t\t\t\t\t\tkey: \"settings.config.package\",\n\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\twebapp: {\n\t\t\t\t\t\t\t\tdependencies: generatedView.dependencies,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t});\n\t\t}\n\n\t\tdata.webapp = merge(data.webapp, {\n\t\t\treact: {\n\t\t\t\tviews: {\n\t\t\t\t\t// ie. \"views\" , \"sections\" , \"store\" , \"root\"\n\t\t\t\t\t[view.id]: {\n\t\t\t\t\t\t// ie. {UV_* , SEC_* , redux} , \"app\" (in case of root)\n\t\t\t\t\t\t[timestamp]: generatedView,\n\t\t\t\t\t\tlatest: generatedView,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t});\n\t} else {\n\t\tconst redesignTimestamp = `${timestamp}`;\n\n\t\tconst designerResponse = await context.run({\n\t\t\tid: \"DESIGNER:LAYOUTV1::VIEW:ITERATE\",\n\t\t\tcontext,\n\t\t\tdata: {\n\t\t\t\t...data,\n\t\t\t\ttimestamp: redesignTimestamp, // to keep versions congruent\n\t\t\t},\n\t\t}); // -> { designer {rag,guidance} , webapp { layout { views { [id] { [version] : { analysis , render{ svg,image } } } } } } }\n\n\t\t/*\n\t\tmerge (op:state:update already handled in designer:layoutv1)\n\t\t*/\n\t\tdata.webapp = merge(data.webapp, designerResponse.webapp);\n\t\t// console.dir({ designerResponse } , {depth:null }) ; process.exit();\n\t\tconst { rag, guidance } = designerResponse.designer;\n\t\tlet primitivesIds = [];\n\t\ttry {\n\t\t\tprimitivesIds = [\n\t\t\t\t...new Set(\n\t\t\t\t\tdesignerResponse.webapp.layout.views[\n\t\t\t\t\t\ttask.view.id\n\t\t\t\t\t].latest.render.svg.structure.svg.rect\n\t\t\t\t\t\t.filter((item) => item.$?.primitiveId)\n\t\t\t\t\t\t.map((item) => item.$.primitiveId),\n\t\t\t\t),\n\t\t\t];\n\t\t} catch (e) {\n\t\t\tconsole.error(`webapp:view:generate:pass:redesign : ${e}`);\n\t\t}\n\n\t\tconst redesignTask = {\n\t\t\t...data.task, // type , view{type,id,details,datamap,tsx} , iteration{notes,screenshot}\n\t\t\trag,\n\t\t\tguidance:\n\t\t\t\tguidance && guidance.docs?.primitives\n\t\t\t\t\t? {\n\t\t\t\t\t\t\tdocs: Object.fromEntries(\n\t\t\t\t\t\t\t\tObject.entries(\n\t\t\t\t\t\t\t\t\tObject.entries(guidance.docs.primitives)\n\t\t\t\t\t\t\t\t\t\t.filter(([key]) => primitivesIds.includes(key))\n\t\t\t\t\t\t\t\t\t\t.reduce((acc, [key, value]) => {\n\t\t\t\t\t\t\t\t\t\t\tif (!acc[value]) {\n\t\t\t\t\t\t\t\t\t\t\t\tacc[value] = key;\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\tacc[value] += ` , ${key}`;\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\treturn acc;\n\t\t\t\t\t\t\t\t\t\t}, {}),\n\t\t\t\t\t\t\t\t).map(([value, keys]) => [keys, value]),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t} // filters out duplicates docs (ie. button , button_icon_only , button_secondary , ... share same docs)\n\t\t\t\t\t: false,\n\t\t\tlayout: designerResponse.webapp.layout.views[task.view.id].latest, //{analysis,render{svg,image{base64?,url?,local?}}}\n\t\t};\n\n\t\tconst mesagesIterateWithDesigner = await promptIterateWithDesigner({\n\t\t\tcontext,\n\t\t\tdata: {\n\t\t\t\t...data,\n\t\t\t\ttask: redesignTask,\n\t\t\t},\n\t\t});\n\n\t\tconst { generated } = await context.run({\n\t\t\tid: \"op:LLM::GEN\",\n\t\t\tcontext: {\n\t\t\t\t...context, // {streams , project}\n\t\t\t\toperation: {\n\t\t\t\t\tkey: `webapp.react.views.${view.id}.latest`,\n\t\t\t\t\tmeta: {\n\t\t\t\t\t\tname: `Webapp View Iterate { ${view.id} }`,\n\t\t\t\t\t\tdesc: \"react view iteration , with designer\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tdata: {\n\t\t\t\tmodel: `chatgpt-4o-latest`, //`gpt-4o`,\n\t\t\t\tmessages: mesagesIterateWithDesigner,\n\t\t\t\tpreparser: false,\n\t\t\t\tparser: false,\n\t\t\t},\n\t\t});\n\n\t\tconst extraction = await utils.parsers.extract.backticksMultiple({\n\t\t\ttext: generated,\n\t\t\tdelimiters: [`markdown`, `tsx`, `yaml`],\n\t\t});\n\n\t\tconst { markdown, tsx } = extraction;\n\t\tif (!tsx.length) {\n\t\t\tthrow new Error(\"webapp:view:generate error - generated tsx is empty\");\n\t\t}\n\n\t\tconst parsedYaml = extraction.yaml ? yaml.parse(extraction.yaml) : {};\n\t\tconst generatedView = {\n\t\t\tanalysis: markdown,\n\t\t\ttsx,\n\t\t\tdependencies: parsedYaml.dependencies\n\t\t\t\t? Object.fromEntries(\n\t\t\t\t\t\tObject.keys(parsedYaml.dependencies).map((key) => [key, \"*\"]),\n\t\t\t\t\t)\n\t\t\t\t: [],\n\t\t\ttimestamp: redesignTimestamp,\n\t\t};\n\n\t\tawait Promise.all(\n\t\t\t[`${redesignTimestamp}`, `latest`].map(async (version) => {\n\t\t\t\tawait context.run({\n\t\t\t\t\tid: \"op:PROJECT::STATE:UPDATE\",\n\t\t\t\t\tcontext,\n\t\t\t\t\tdata: {\n\t\t\t\t\t\toperation: {\n\t\t\t\t\t\t\tid: `webapp:react:views`,\n\t\t\t\t\t\t\trefs: {\n\t\t\t\t\t\t\t\tid: view.id,\n\t\t\t\t\t\t\t\tversion,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\ttype: `end`,\n\t\t\t\t\t\tcontent: {\n\t\t\t\t\t\t\tkey: `webapp.react.views.${view.id}.${version}`,\n\t\t\t\t\t\t\tdata: generatedView,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t});\n\t\t\t}),\n\t\t);\n\n\t\tif (Object.keys(generatedView.dependencies).length) {\n\t\t\tawait context.run({\n\t\t\t\tid: \"op:PROJECT::STATE:UPDATE\",\n\t\t\t\tcontext,\n\t\t\t\tdata: {\n\t\t\t\t\toperation: {\n\t\t\t\t\t\tid: \"settings:config:package\",\n\t\t\t\t\t},\n\t\t\t\t\ttype: `end`,\n\t\t\t\t\tcontent: {\n\t\t\t\t\t\tkey: \"settings.config.package\",\n\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\twebapp: {\n\t\t\t\t\t\t\t\tdependencies: generatedView.dependencies,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t});\n\t\t}\n\n\t\tdata.webapp = merge(data.webapp, {\n\t\t\treact: {\n\t\t\t\tviews: {\n\t\t\t\t\t// ie. \"views\" , \"sections\" , \"store\" , \"root\"\n\t\t\t\t\t[view.id]: {\n\t\t\t\t\t\t// ie. {UV_* , SEC_* , redux} , \"app\" (in case of root)\n\t\t\t\t\t\t[redesignTimestamp]: generatedView,\n\t\t\t\t\t\tlatest: generatedView,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t});\n\t}\n\n\treturn { webapp: data.webapp };\n}\n\nexport default {\n\t\"WEBAPP:VIEW::GENERATE:MULTI\": webappViewGenerateMulti,\n\t\"WEBAPP:VIEW::GENERATE\": webappViewGenerate,\n\t//\"WEBAPP:VIEW::REDESIGN\": webappViewRedesign,\n\t\"WEBAPP:VIEW::ITERATE\": webappViewIterate,\n};\n"
  },
  {
    "path": "cofounder/api/system/presets/ui/design/systems/protoboy-v1/README.md",
    "content": "## Notes\n\nThis is a demo design system and will be replaced on official post-alpha release\n\n## Credits\n\nRenders dumped from Figma Presets:\n\n- Blocks.pm by Hexa Plugin\n- Google Material & Figma Core Design systems\n"
  },
  {
    "path": "cofounder/api/system/presets/ui/design/systems/protoboy-v1/primitives/.gitignore",
    "content": ""
  },
  {
    "path": "cofounder/api/system/presets/ui/design/systems/protoboy-v1/primitives/ontology.yaml",
    "content": "primitives:\n - id: heading\n   description: A primary heading for sectional content\n - id: subheading\n   description: A secondary heading for a subsection of content\n - id: text_line\n   description: A single line of text\n - id: text_paragraph\n   description: A block of text longer than a line\n - id: button\n   description: A clickable element used to perform actions\n   stretch: true\n - id: link\n   description: A hyperlink pointing to another resource\n - id: tag\n   description: An small capsule for categorizing or labeling - can also be used as a small status indicator or be clickable\n - id: avatar\n   description: A graphical representation of either a user or brand, typically a photo or icon\n - id: image\n   description: An element to display pictures or graphics\n   stretch: true\n - id: icon\n   description: A graphical representation of an idea, action, or object\n - id: input_datepicker\n   stretch: true\n   description: A control allowing the user to select a specific date\n - id: input_description\n   stretch: true\n   description: An informational text describing an input field\n - id: input_field\n   stretch: true\n   description: An input area where the user can enter text\n - id: input_label\n   description: A label associated with an input field to describe its purpose\n - id: input_searchfield\n   stretch: true\n   description: An input field specifically for search queries\n - id: input_select\n   stretch: true\n   description: A dropdown menu allowing the user to choose from a list of options\n - id: input_textarea\n   stretch: true\n   description: An input field for entering multi-line text\n - id: radio_button\n   description: A control allowing the user to select one option from a group\n - id: checkbox\n   description: A control that allows the user to select or deselect an option\n - id: switch\n   description: A control allowing the user to toggle between two states\n - id: slider\n   description: A control for selecting a value from a range\n - id: media\n   description: An element for embedding video or audio\n   stretch: true\n - id: map\n   description: A graphical representation of geographical information\n   stretch: true\n - id: badge\n   description: A round indicator with a number inside it, used for example for counting or tracking\n - id: calendar\n   description: A graphical representation of a calendar\n   stretch: true\n - id: code_block\n   description: A block for displaying formatted code\n   stretch: true\n - id: button_fab\n   description: A floating action round button that is sticky and fixed to the bottom right corner of the page\n - id: progress_bar\n   description: A horizontal bar indicating progress toward completion\n   stretch: true\n - id: nonprimitive\n   description: A placeholder for non-primitive components that should be designed based on description\n   stretch: true\n"
  },
  {
    "path": "cofounder/api/system/presets/ui/design/systems/shadcn/primitives/.gitignore",
    "content": ""
  },
  {
    "path": "cofounder/api/system/presets/ui/design/systems/shadcn/primitives/docs/accordion.mdx",
    "content": "Name : Accordion\nDescription : A vertically stacked set of interactive headings that each reveal a section of content.\n\n---\n\n### import\n\n```\nimport {\n  Accordion,\n  AccordionContent,\n  AccordionItem,\n  AccordionTrigger,\n} from \"@/components/ui/accordion\"\n```\n\n---\n\n### use\n\n```accordion.mdx\n<Accordion type=\"single\" collapsible>\n  <AccordionItem value=\"item-1\">\n    <AccordionTrigger>Is it accessible?</AccordionTrigger>\n    <AccordionContent>\n      Yes. It adheres to the WAI-ARIA design pattern.\n    </AccordionContent>\n  </AccordionItem>\n</Accordion>\n```\n\n---\n\n### examples\n\n```accordion-demo.tsx\nimport {\n  Accordion,\n  AccordionContent,\n  AccordionItem,\n  AccordionTrigger,\n} from \"@/components/ui/accordion\"\n\nexport default function AccordionDemo() {\n  return (\n    <Accordion type=\"single\" collapsible className=\"w-full\">\n      <AccordionItem value=\"item-1\">\n        <AccordionTrigger>Is it accessible?</AccordionTrigger>\n        <AccordionContent>\n          Yes. It adheres to the WAI-ARIA design pattern.\n        </AccordionContent>\n      </AccordionItem>\n      <AccordionItem value=\"item-2\">\n        <AccordionTrigger>Is it styled?</AccordionTrigger>\n        <AccordionContent>\n          Yes. It comes with default styles that matches the other\n          components&apos; aesthetic.\n        </AccordionContent>\n      </AccordionItem>\n      <AccordionItem value=\"item-3\">\n        <AccordionTrigger>Is it animated?</AccordionTrigger>\n        <AccordionContent>\n          Yes. It&apos;s animated by default, but you can disable it if you\n          prefer.\n        </AccordionContent>\n      </AccordionItem>\n    </Accordion>\n  )\n}\n```\n"
  },
  {
    "path": "cofounder/api/system/presets/ui/design/systems/shadcn/primitives/docs/avatar.mdx",
    "content": "Name : Avatar\nDescription : An image element with a fallback for representing the user.\n\n---\n\n### import\n\n```\nimport { Avatar, AvatarFallback, AvatarImage } from \"@/components/ui/avatar\"\n```\n\n---\n\n### use\n\n```avatar.mdx\n<Avatar>\n  <AvatarImage src=\"https://github.com/shadcn.png\" />\n  <AvatarFallback>CN</AvatarFallback>\n</Avatar>\n```\n\n---\n\n### examples\n\n```avatar-demo.tsx\nimport {\n  Avatar,\n  AvatarFallback,\n  AvatarImage,\n} from \"@/components/ui/avatar\"\n\nexport default function AvatarDemo() {\n  return (\n    <Avatar>\n      <AvatarImage src=\"https://github.com/shadcn.png\" alt=\"@shadcn\" />\n      <AvatarFallback>CN</AvatarFallback>\n    </Avatar>\n  )\n}\n```\n"
  },
  {
    "path": "cofounder/api/system/presets/ui/design/systems/shadcn/primitives/docs/badge.mdx",
    "content": "Name : Badge\nDescription : Displays a badge or a component that looks like a badge.\n\n---\n\n### import\n\n```\nimport { Badge } from \"@/components/ui/badge\"\n```\n\n---\n\n### use\n\n```badge.mdx\n<Badge variant=\"outline\">Badge</Badge>\n```\n\n```badge.mdx\nimport { badgeVariants } from \"@/components/ui/badge\"\n<Link className={badgeVariants({ variant: \"outline\" })}>Badge</Link>\n```\n\n---\n\n### examples\n\n```badge-demo.tsx\nimport { Badge } from \"@/components/ui/badge\"\n\nexport default function BadgeDemo() {\n  return <Badge>Badge</Badge>\n}\n```\n\n```badge-destructive.tsx\nimport { Badge } from \"@/components/ui/badge\"\n\nexport default function BadgeDestructive() {\n  return <Badge variant=\"destructive\">Destructive</Badge>\n}\n```\n\n```badge-outline.tsx\nimport { Badge } from \"@/components/ui/badge\"\n\nexport default function BadgeOutline() {\n  return <Badge variant=\"outline\">Outline</Badge>\n}\n```\n\n```badge-secondary.tsx\nimport { Badge } from \"@/components/ui/badge\"\n\nexport default function BadgeSecondary() {\n  return <Badge variant=\"secondary\">Secondary</Badge>\n}\n```\n"
  },
  {
    "path": "cofounder/api/system/presets/ui/design/systems/shadcn/primitives/docs/bar_progress.mdx",
    "content": "Name : Progress\nDescription : Displays an indicator showing the completion progress of a task, typically displayed as a progress bar.\n\n---\n\n### import\n\n```\nimport { Progress } from \"@/components/ui/progress\"\n```\n\n---\n\n### use\n\n```progress.mdx\n<Progress value={33} />\n```\n\n---\n\n### examples\n\n```progress-demo.tsx\n\"use client\"\n\nimport * as React from \"react\"\n\nimport { Progress } from \"@/components/ui/progress\"\n\nexport default function ProgressDemo() {\n  const [progress, setProgress] = React.useState(13)\n\n  React.useEffect(() => {\n    const timer = setTimeout(() => setProgress(66), 500)\n    return () => clearTimeout(timer)\n  }, [])\n\n  return <Progress value={progress} className=\"w-[60%]\" />\n}\n```\n"
  },
  {
    "path": "cofounder/api/system/presets/ui/design/systems/shadcn/primitives/docs/bar_slider.mdx",
    "content": "Name : Slider\nDescription : An input where the user selects a value from within a given range.\n\n---\n\n### import\n\n```\nimport { Slider } from \"@/components/ui/slider\"\n```\n\n---\n\n### use\n\n```slider.mdx\n<Slider defaultValue={[33]} max={100} step={1} />\n```\n\n---\n\n### examples\n\n```slider-demo.tsx\nimport { cn } from \"@/lib/utils\"\nimport { Slider } from \"@/components/ui/slider\"\n\ntype SliderProps = React.ComponentProps<typeof Slider>\n\nexport default function SliderDemo({ className, ...props }: SliderProps) {\n  return (\n    <Slider\n      defaultValue={[50]}\n      max={100}\n      step={1}\n      className={cn(\"w-[60%]\", className)}\n      {...props}\n    />\n  )\n}\n```\n"
  },
  {
    "path": "cofounder/api/system/presets/ui/design/systems/shadcn/primitives/docs/breadcrumbs.mdx",
    "content": "---\ntitle: Breadcrumb\ndescription: Displays the path to the current resource using a hierarchy of links.\ncomponent: true\n---\n\n## Usage\n\n```tsx\nimport {\n\tBreadcrumb,\n\tBreadcrumbItem,\n\tBreadcrumbLink,\n\tBreadcrumbList,\n\tBreadcrumbPage,\n\tBreadcrumbSeparator,\n} from \"@/components/ui/breadcrumb\";\n```\n\n```tsx\n<Breadcrumb>\n\t<BreadcrumbList>\n\t\t<BreadcrumbItem>\n\t\t\t<BreadcrumbLink href=\"/\">Home</BreadcrumbLink>\n\t\t</BreadcrumbItem>\n\t\t<BreadcrumbSeparator />\n\t\t<BreadcrumbItem>\n\t\t\t<BreadcrumbLink href=\"/components\">Components</BreadcrumbLink>\n\t\t</BreadcrumbItem>\n\t\t<BreadcrumbSeparator />\n\t\t<BreadcrumbItem>\n\t\t\t<BreadcrumbPage>Breadcrumb</BreadcrumbPage>\n\t\t</BreadcrumbItem>\n\t</BreadcrumbList>\n</Breadcrumb>\n```\n\n## Examples\n\n### Custom separator\n\nUse a custom component as `children` for `<BreadcrumbSeparator />` to create a custom separator.\n\n```tsx\nimport { Slash } from \"lucide-react\"\n\n...\n\n<Breadcrumb>\n  <BreadcrumbList>\n    <BreadcrumbItem>\n      <BreadcrumbLink href=\"/\">Home</BreadcrumbLink>\n    </BreadcrumbItem>\n    <BreadcrumbSeparator>\n      <Slash />\n    </BreadcrumbSeparator>\n    <BreadcrumbItem>\n      <BreadcrumbLink href=\"/components\">Components</BreadcrumbLink>\n    </BreadcrumbItem>\n  </BreadcrumbList>\n</Breadcrumb>\n```\n"
  },
  {
    "path": "cofounder/api/system/presets/ui/design/systems/shadcn/primitives/docs/button.mdx",
    "content": "Name : Button\nDescription : Displays a button or a component that looks like a button.\n\n---\n\n### import\n\n```\nimport { Button } from \"@/components/ui/button\"\n```\n\n---\n\n### use\n\n```button.mdx\nimport { Button } from \"@/components/ui/button\"\n\n<Button variant=\"outline\">Button</Button>\n```\n\n```button.mdx\nimport { Link } from 'react-router-dom';\nimport { Button } from \"@/components/ui/button\"\n...\n<Link to=\"/\">\n  <Button variant=\"outline\">Button</Button>\n</Link>\n```\n\n---\n\n### examples\n\n```button-demo.tsx\nimport { Button } from \"@/components/ui/button\"\n\nexport default function ButtonDemo() {\n  return <Button>Button</Button>\n}\n```\n\n```button-destructive.tsx\nimport { Button } from \"@/components/ui/button\"\n\nexport default function ButtonDestructive() {\n  return <Button variant=\"destructive\">Destructive</Button>\n}\n```\n\n```button-ghost.tsx\nimport { Button } from \"@/components/ui/button\"\n\nexport default function ButtonGhost() {\n  return <Button variant=\"ghost\">Ghost</Button>\n}\n```\n\n```button-icon.tsx\nimport { ChevronRight } from \"lucide-react\"\n\nimport { Button } from \"@/components/ui/button\"\n\nexport default function ButtonIcon() {\n  return (\n    <Button variant=\"outline\" size=\"icon\">\n      <ChevronRight className=\"h-4 w-4\" />\n    </Button>\n  )\n}\n```\n\n```button-link.tsx\nimport { Button } from \"@/components/ui/button\"\n\nexport default function ButtonLink() {\n  return <Button variant=\"link\">Link</Button>\n}\n```\n\n```button-loading.tsx\nimport { Loader2 } from \"lucide-react\"\n\nimport { Button } from \"@/components/ui/button\"\n\nexport default function ButtonLoading() {\n  return (\n    <Button disabled>\n      <Loader2 className=\"mr-2 h-4 w-4 animate-spin\" />\n      Please wait\n    </Button>\n  )\n}\n```\n\n```button-outline.tsx\nimport { Button } from \"@/components/ui/button\"\n\nexport default function ButtonOutline() {\n  return <Button variant=\"outline\">Outline</Button>\n}\n```\n\n```button-secondary.tsx\nimport { Button } from \"@/components/ui/button\"\n\nexport default function ButtonSecondary() {\n  return <Button variant=\"secondary\">Secondary</Button>\n}\n```\n\n```button-with-icon.tsx\nimport { Mail } from \"lucide-react\"\n\nimport { Button } from \"@/components/ui/button\"\n\nexport default function ButtonWithIcon() {\n  return (\n    <Button>\n      <Mail className=\"mr-2 h-4 w-4\" /> Login with Email\n    </Button>\n  )\n}\n```\n"
  },
  {
    "path": "cofounder/api/system/presets/ui/design/systems/shadcn/primitives/docs/button_icon_only.mdx",
    "content": "Name : Button\nDescription : Displays a button or a component that looks like a button.\n\n---\n\n### import\n\n```\nimport { Button } from \"@/components/ui/button\"\n```\n\n---\n\n### use\n\n```button.mdx\nimport { Button } from \"@/components/ui/button\"\n\n<Button variant=\"outline\">Button</Button>\n```\n\n```button.mdx\nimport { Link } from 'react-router-dom';\nimport { Button } from \"@/components/ui/button\"\n...\n<Link to=\"/\">\n  <Button variant=\"outline\">Button</Button>\n</Link>\n```\n\n---\n\n### examples\n\n```button-demo.tsx\nimport { Button } from \"@/components/ui/button\"\n\nexport default function ButtonDemo() {\n  return <Button>Button</Button>\n}\n```\n\n```button-destructive.tsx\nimport { Button } from \"@/components/ui/button\"\n\nexport default function ButtonDestructive() {\n  return <Button variant=\"destructive\">Destructive</Button>\n}\n```\n\n```button-ghost.tsx\nimport { Button } from \"@/components/ui/button\"\n\nexport default function ButtonGhost() {\n  return <Button variant=\"ghost\">Ghost</Button>\n}\n```\n\n```button-icon.tsx\nimport { ChevronRight } from \"lucide-react\"\n\nimport { Button } from \"@/components/ui/button\"\n\nexport default function ButtonIcon() {\n  return (\n    <Button variant=\"outline\" size=\"icon\">\n      <ChevronRight className=\"h-4 w-4\" />\n    </Button>\n  )\n}\n```\n\n```button-link.tsx\nimport { Button } from \"@/components/ui/button\"\n\nexport default function ButtonLink() {\n  return <Button variant=\"link\">Link</Button>\n}\n```\n\n```button-loading.tsx\nimport { Loader2 } from \"lucide-react\"\n\nimport { Button } from \"@/components/ui/button\"\n\nexport default function ButtonLoading() {\n  return (\n    <Button disabled>\n      <Loader2 className=\"mr-2 h-4 w-4 animate-spin\" />\n      Please wait\n    </Button>\n  )\n}\n```\n\n```button-outline.tsx\nimport { Button } from \"@/components/ui/button\"\n\nexport default function ButtonOutline() {\n  return <Button variant=\"outline\">Outline</Button>\n}\n```\n\n```button-secondary.tsx\nimport { Button } from \"@/components/ui/button\"\n\nexport default function ButtonSecondary() {\n  return <Button variant=\"secondary\">Secondary</Button>\n}\n```\n\n```button-with-icon.tsx\nimport { Mail } from \"lucide-react\"\n\nimport { Button } from \"@/components/ui/button\"\n\nexport default function ButtonWithIcon() {\n  return (\n    <Button>\n      <Mail className=\"mr-2 h-4 w-4\" /> Login with Email\n    </Button>\n  )\n}\n```\n"
  },
  {
    "path": "cofounder/api/system/presets/ui/design/systems/shadcn/primitives/docs/button_secondary.mdx",
    "content": "Name : Button\nDescription : Displays a button or a component that looks like a button.\n\n---\n\n### import\n\n```\nimport { Button } from \"@/components/ui/button\"\n```\n\n---\n\n### use\n\n```button.mdx\nimport { Button } from \"@/components/ui/button\"\n\n<Button variant=\"outline\">Button</Button>\n```\n\n```button.mdx\nimport { Link } from 'react-router-dom';\nimport { Button } from \"@/components/ui/button\"\n...\n<Link to=\"/\">\n  <Button variant=\"outline\">Button</Button>\n</Link>\n```\n\n---\n\n### examples\n\n```button-demo.tsx\nimport { Button } from \"@/components/ui/button\"\n\nexport default function ButtonDemo() {\n  return <Button>Button</Button>\n}\n```\n\n```button-destructive.tsx\nimport { Button } from \"@/components/ui/button\"\n\nexport default function ButtonDestructive() {\n  return <Button variant=\"destructive\">Destructive</Button>\n}\n```\n\n```button-ghost.tsx\nimport { Button } from \"@/components/ui/button\"\n\nexport default function ButtonGhost() {\n  return <Button variant=\"ghost\">Ghost</Button>\n}\n```\n\n```button-icon.tsx\nimport { ChevronRight } from \"lucide-react\"\n\nimport { Button } from \"@/components/ui/button\"\n\nexport default function ButtonIcon() {\n  return (\n    <Button variant=\"outline\" size=\"icon\">\n      <ChevronRight className=\"h-4 w-4\" />\n    </Button>\n  )\n}\n```\n\n```button-link.tsx\nimport { Button } from \"@/components/ui/button\"\n\nexport default function ButtonLink() {\n  return <Button variant=\"link\">Link</Button>\n}\n```\n\n```button-loading.tsx\nimport { Loader2 } from \"lucide-react\"\n\nimport { Button } from \"@/components/ui/button\"\n\nexport default function ButtonLoading() {\n  return (\n    <Button disabled>\n      <Loader2 className=\"mr-2 h-4 w-4 animate-spin\" />\n      Please wait\n    </Button>\n  )\n}\n```\n\n```button-outline.tsx\nimport { Button } from \"@/components/ui/button\"\n\nexport default function ButtonOutline() {\n  return <Button variant=\"outline\">Outline</Button>\n}\n```\n\n```button-secondary.tsx\nimport { Button } from \"@/components/ui/button\"\n\nexport default function ButtonSecondary() {\n  return <Button variant=\"secondary\">Secondary</Button>\n}\n```\n\n```button-with-icon.tsx\nimport { Mail } from \"lucide-react\"\n\nimport { Button } from \"@/components/ui/button\"\n\nexport default function ButtonWithIcon() {\n  return (\n    <Button>\n      <Mail className=\"mr-2 h-4 w-4\" /> Login with Email\n    </Button>\n  )\n}\n```\n"
  },
  {
    "path": "cofounder/api/system/presets/ui/design/systems/shadcn/primitives/docs/button_with_icon.mdx",
    "content": "Name : Button\nDescription : Displays a button or a component that looks like a button.\n\n---\n\n### import\n\n```\nimport { Button } from \"@/components/ui/button\"\n```\n\n---\n\n### use\n\n```button.mdx\nimport { Button } from \"@/components/ui/button\"\n\n<Button variant=\"outline\">Button</Button>\n```\n\n```button.mdx\nimport { Link } from 'react-router-dom';\nimport { Button } from \"@/components/ui/button\"\n...\n<Link to=\"/\">\n  <Button variant=\"outline\">Button</Button>\n</Link>\n```\n\n---\n\n### examples\n\n```button-demo.tsx\nimport { Button } from \"@/components/ui/button\"\n\nexport default function ButtonDemo() {\n  return <Button>Button</Button>\n}\n```\n\n```button-destructive.tsx\nimport { Button } from \"@/components/ui/button\"\n\nexport default function ButtonDestructive() {\n  return <Button variant=\"destructive\">Destructive</Button>\n}\n```\n\n```button-ghost.tsx\nimport { Button } from \"@/components/ui/button\"\n\nexport default function ButtonGhost() {\n  return <Button variant=\"ghost\">Ghost</Button>\n}\n```\n\n```button-icon.tsx\nimport { ChevronRight } from \"lucide-react\"\n\nimport { Button } from \"@/components/ui/button\"\n\nexport default function ButtonIcon() {\n  return (\n    <Button variant=\"outline\" size=\"icon\">\n      <ChevronRight className=\"h-4 w-4\" />\n    </Button>\n  )\n}\n```\n\n```button-link.tsx\nimport { Button } from \"@/components/ui/button\"\n\nexport default function ButtonLink() {\n  return <Button variant=\"link\">Link</Button>\n}\n```\n\n```button-loading.tsx\nimport { Loader2 } from \"lucide-react\"\n\nimport { Button } from \"@/components/ui/button\"\n\nexport default function ButtonLoading() {\n  return (\n    <Button disabled>\n      <Loader2 className=\"mr-2 h-4 w-4 animate-spin\" />\n      Please wait\n    </Button>\n  )\n}\n```\n\n```button-outline.tsx\nimport { Button } from \"@/components/ui/button\"\n\nexport default function ButtonOutline() {\n  return <Button variant=\"outline\">Outline</Button>\n}\n```\n\n```button-secondary.tsx\nimport { Button } from \"@/components/ui/button\"\n\nexport default function ButtonSecondary() {\n  return <Button variant=\"secondary\">Secondary</Button>\n}\n```\n\n```button-with-icon.tsx\nimport { Mail } from \"lucide-react\"\n\nimport { Button } from \"@/components/ui/button\"\n\nexport default function ButtonWithIcon() {\n  return (\n    <Button>\n      <Mail className=\"mr-2 h-4 w-4\" /> Login with Email\n    </Button>\n  )\n}\n```\n"
  },
  {
    "path": "cofounder/api/system/presets/ui/design/systems/shadcn/primitives/docs/calendar_datepicker.mdx",
    "content": "Name : Calendar\nDescription : A date field component that allows users to enter and edit date.\n\n---\n\n### import\n\n```\nimport { Calendar } from \"@/components/ui/calendar\"\n```\n\n---\n\n### use\n\n```calendar.mdx\n<Calendar\n  mode=\"single\"\n  selected={date}\n  onSelect={setDate}\n  className=\"rounded-md border\"\n/>\n```\n\n---\n\n### examples\n\n```calendar-demo.tsx\n\"use client\"\n\nimport * as React from \"react\"\n\nimport { Calendar } from \"@/components/ui/calendar\"\n\nexport default function CalendarDemo() {\n  const [date, setDate] = React.useState<Date | undefined>(new Date())\n\n  return (\n    <Calendar\n      mode=\"single\"\n      selected={date}\n      onSelect={setDate}\n      className=\"rounded-md border\"\n    />\n  )\n}\n```\n"
  },
  {
    "path": "cofounder/api/system/presets/ui/design/systems/shadcn/primitives/docs/carousel_horizontal.mdx",
    "content": "---\ntitle: Carousel\ndescription: A carousel with motion and swipe built using Embla.\n---\n\n## Usage\n\n```tsx\nimport {\n\tCarousel,\n\tCarouselContent,\n\tCarouselItem,\n\tCarouselNext,\n\tCarouselPrevious,\n} from \"@/components/ui/carousel\";\n```\n\n```tsx\n<Carousel>\n\t<CarouselContent>\n\t\t<CarouselItem>...</CarouselItem>\n\t\t<CarouselItem>...</CarouselItem>\n\t\t<CarouselItem>...</CarouselItem>\n\t</CarouselContent>\n\t<CarouselPrevious />\n\t<CarouselNext />\n</Carousel>\n```\n\n## Examples\n\n### Sizes\n\nTo set the size of the items, you can use the `basis` utility class on the `<CarouselItem />`.\n\n```tsx title=\"Example\" showLineNumbers {4-6}\n// 33% of the carousel width.\n<Carousel>\n\t<CarouselContent>\n\t\t<CarouselItem className=\"basis-1/3\">...</CarouselItem>\n\t\t<CarouselItem className=\"basis-1/3\">...</CarouselItem>\n\t\t<CarouselItem className=\"basis-1/3\">...</CarouselItem>\n\t</CarouselContent>\n</Carousel>\n```\n\n```tsx title=\"Responsive\" showLineNumbers {4-6}\n// 50% on small screens and 33% on larger screens.\n<Carousel>\n\t<CarouselContent>\n\t\t<CarouselItem className=\"md:basis-1/2 lg:basis-1/3\">...</CarouselItem>\n\t\t<CarouselItem className=\"md:basis-1/2 lg:basis-1/3\">...</CarouselItem>\n\t\t<CarouselItem className=\"md:basis-1/2 lg:basis-1/3\">...</CarouselItem>\n\t</CarouselContent>\n</Carousel>\n```\n\n### Spacing\n\nTo set the spacing between the items, we use a `pl-[VALUE]` utility on the `<CarouselItem />` and a negative `-ml-[VALUE]` on the `<CarouselContent />`.\n\n<Callout className=\"mt-6\">\n  **Why:** I tried to use the `gap` property or a `grid` layout on the `\n  <CarouselContent />` but it required a lot of math and mental effort to get the\n  spacing right. I found `pl-[VALUE]` and `-ml-[VALUE]` utilities much easier to\n  use.\n\nYou can always adjust this in your own project if you need to.\n\n</Callout>\n\n<ComponentPreview\n\tname=\"carousel-spacing\"\n\ttitle=\"Carousel\"\n\tdescription=\"A carousel with 3 items with a spacing of 1rem.\"\n/>\n\n```tsx title=\"Example\" showLineNumbers /-ml-4/ /pl-4/\n<Carousel>\n\t<CarouselContent className=\"-ml-4\">\n\t\t<CarouselItem className=\"pl-4\">...</CarouselItem>\n\t\t<CarouselItem className=\"pl-4\">...</CarouselItem>\n\t\t<CarouselItem className=\"pl-4\">...</CarouselItem>\n\t</CarouselContent>\n</Carousel>\n```\n\n```tsx title=\"Responsive\" showLineNumbers /-ml-2/ /pl-2/ /md:-ml-4/ /md:pl-4/\n<Carousel>\n\t<CarouselContent className=\"-ml-2 md:-ml-4\">\n\t\t<CarouselItem className=\"pl-2 md:pl-4\">...</CarouselItem>\n\t\t<CarouselItem className=\"pl-2 md:pl-4\">...</CarouselItem>\n\t\t<CarouselItem className=\"pl-2 md:pl-4\">...</CarouselItem>\n\t</CarouselContent>\n</Carousel>\n```\n\n### Orientation\n\nUse the `orientation` prop to set the orientation of the carousel.\n\n```tsx showLineNumbers /vertical | horizontal/\n<Carousel orientation=\"vertical | horizontal\">\n\t<CarouselContent>\n\t\t<CarouselItem>...</CarouselItem>\n\t\t<CarouselItem>...</CarouselItem>\n\t\t<CarouselItem>...</CarouselItem>\n\t</CarouselContent>\n</Carousel>\n```\n\n## Options\n\nYou can pass options to the carousel using the `opts` prop.\n\n```tsx showLineNumbers {2-5}\n<Carousel\n\topts={{\n\t\talign: \"start\",\n\t\tloop: true,\n\t}}\n>\n\t<CarouselContent>\n\t\t<CarouselItem>...</CarouselItem>\n\t\t<CarouselItem>...</CarouselItem>\n\t\t<CarouselItem>...</CarouselItem>\n\t</CarouselContent>\n</Carousel>\n```\n\n## API\n\nUse a state and the `setApi` props to get an instance of the carousel API.\n\n```tsx showLineNumbers {1,4,22}\nimport { type CarouselApi } from \"@/components/ui/carousel\";\n\nexport function Example() {\n\tconst [api, setApi] = React.useState<CarouselApi>();\n\tconst [current, setCurrent] = React.useState(0);\n\tconst [count, setCount] = React.useState(0);\n\n\tReact.useEffect(() => {\n\t\tif (!api) {\n\t\t\treturn;\n\t\t}\n\n\t\tsetCount(api.scrollSnapList().length);\n\t\tsetCurrent(api.selectedScrollSnap() + 1);\n\n\t\tapi.on(\"select\", () => {\n\t\t\tsetCurrent(api.selectedScrollSnap() + 1);\n\t\t});\n\t}, [api]);\n\n\treturn (\n\t\t<Carousel setApi={setApi}>\n\t\t\t<CarouselContent>\n\t\t\t\t<CarouselItem>...</CarouselItem>\n\t\t\t\t<CarouselItem>...</CarouselItem>\n\t\t\t\t<CarouselItem>...</CarouselItem>\n\t\t\t</CarouselContent>\n\t\t</Carousel>\n\t);\n}\n```\n\n## Events\n\nYou can listen to events using the api instance from `setApi`.\n\n```tsx showLineNumbers {1,4-14,16}\nimport { type CarouselApi } from \"@/components/ui/carousel\";\n\nexport function Example() {\n\tconst [api, setApi] = React.useState<CarouselApi>();\n\n\tReact.useEffect(() => {\n\t\tif (!api) {\n\t\t\treturn;\n\t\t}\n\n\t\tapi.on(\"select\", () => {\n\t\t\t// Do something on select.\n\t\t});\n\t}, [api]);\n\n\treturn (\n\t\t<Carousel setApi={setApi}>\n\t\t\t<CarouselContent>\n\t\t\t\t<CarouselItem>...</CarouselItem>\n\t\t\t\t<CarouselItem>...</CarouselItem>\n\t\t\t\t<CarouselItem>...</CarouselItem>\n\t\t\t</CarouselContent>\n\t\t</Carousel>\n\t);\n}\n```\n\n## Plugins\n\nYou can use the `plugins` prop to add plugins to the carousel.\n\n```ts showLineNumbers {1,6-10}\nimport Autoplay from \"embla-carousel-autoplay\"\n\nexport function Example() {\n  return (\n    <Carousel\n      plugins={[\n        Autoplay({\n          delay: 2000,\n        }),\n      ]}\n    >\n      // ...\n    </Carousel>\n  )\n}\n```\n"
  },
  {
    "path": "cofounder/api/system/presets/ui/design/systems/shadcn/primitives/docs/carousel_vertical.mdx",
    "content": "---\ntitle: Carousel\ndescription: A carousel with motion and swipe built using Embla.\n---\n\n## Usage\n\n```tsx\nimport {\n\tCarousel,\n\tCarouselContent,\n\tCarouselItem,\n\tCarouselNext,\n\tCarouselPrevious,\n} from \"@/components/ui/carousel\";\n```\n\n```tsx\n<Carousel>\n\t<CarouselContent>\n\t\t<CarouselItem>...</CarouselItem>\n\t\t<CarouselItem>...</CarouselItem>\n\t\t<CarouselItem>...</CarouselItem>\n\t</CarouselContent>\n\t<CarouselPrevious />\n\t<CarouselNext />\n</Carousel>\n```\n\n## Examples\n\n### Sizes\n\nTo set the size of the items, you can use the `basis` utility class on the `<CarouselItem />`.\n\n```tsx title=\"Example\" showLineNumbers {4-6}\n// 33% of the carousel width.\n<Carousel>\n\t<CarouselContent>\n\t\t<CarouselItem className=\"basis-1/3\">...</CarouselItem>\n\t\t<CarouselItem className=\"basis-1/3\">...</CarouselItem>\n\t\t<CarouselItem className=\"basis-1/3\">...</CarouselItem>\n\t</CarouselContent>\n</Carousel>\n```\n\n```tsx title=\"Responsive\" showLineNumbers {4-6}\n// 50% on small screens and 33% on larger screens.\n<Carousel>\n\t<CarouselContent>\n\t\t<CarouselItem className=\"md:basis-1/2 lg:basis-1/3\">...</CarouselItem>\n\t\t<CarouselItem className=\"md:basis-1/2 lg:basis-1/3\">...</CarouselItem>\n\t\t<CarouselItem className=\"md:basis-1/2 lg:basis-1/3\">...</CarouselItem>\n\t</CarouselContent>\n</Carousel>\n```\n\n### Spacing\n\nTo set the spacing between the items, we use a `pl-[VALUE]` utility on the `<CarouselItem />` and a negative `-ml-[VALUE]` on the `<CarouselContent />`.\n\n<Callout className=\"mt-6\">\n  **Why:** I tried to use the `gap` property or a `grid` layout on the `\n  <CarouselContent />` but it required a lot of math and mental effort to get the\n  spacing right. I found `pl-[VALUE]` and `-ml-[VALUE]` utilities much easier to\n  use.\n\nYou can always adjust this in your own project if you need to.\n\n</Callout>\n\n<ComponentPreview\n\tname=\"carousel-spacing\"\n\ttitle=\"Carousel\"\n\tdescription=\"A carousel with 3 items with a spacing of 1rem.\"\n/>\n\n```tsx title=\"Example\" showLineNumbers /-ml-4/ /pl-4/\n<Carousel>\n\t<CarouselContent className=\"-ml-4\">\n\t\t<CarouselItem className=\"pl-4\">...</CarouselItem>\n\t\t<CarouselItem className=\"pl-4\">...</CarouselItem>\n\t\t<CarouselItem className=\"pl-4\">...</CarouselItem>\n\t</CarouselContent>\n</Carousel>\n```\n\n```tsx title=\"Responsive\" showLineNumbers /-ml-2/ /pl-2/ /md:-ml-4/ /md:pl-4/\n<Carousel>\n\t<CarouselContent className=\"-ml-2 md:-ml-4\">\n\t\t<CarouselItem className=\"pl-2 md:pl-4\">...</CarouselItem>\n\t\t<CarouselItem className=\"pl-2 md:pl-4\">...</CarouselItem>\n\t\t<CarouselItem className=\"pl-2 md:pl-4\">...</CarouselItem>\n\t</CarouselContent>\n</Carousel>\n```\n\n### Orientation\n\nUse the `orientation` prop to set the orientation of the carousel.\n\n```tsx showLineNumbers /vertical | horizontal/\n<Carousel orientation=\"vertical | horizontal\">\n\t<CarouselContent>\n\t\t<CarouselItem>...</CarouselItem>\n\t\t<CarouselItem>...</CarouselItem>\n\t\t<CarouselItem>...</CarouselItem>\n\t</CarouselContent>\n</Carousel>\n```\n\n## Options\n\nYou can pass options to the carousel using the `opts` prop.\n\n```tsx showLineNumbers {2-5}\n<Carousel\n\topts={{\n\t\talign: \"start\",\n\t\tloop: true,\n\t}}\n>\n\t<CarouselContent>\n\t\t<CarouselItem>...</CarouselItem>\n\t\t<CarouselItem>...</CarouselItem>\n\t\t<CarouselItem>...</CarouselItem>\n\t</CarouselContent>\n</Carousel>\n```\n\n## API\n\nUse a state and the `setApi` props to get an instance of the carousel API.\n\n```tsx showLineNumbers {1,4,22}\nimport { type CarouselApi } from \"@/components/ui/carousel\";\n\nexport function Example() {\n\tconst [api, setApi] = React.useState<CarouselApi>();\n\tconst [current, setCurrent] = React.useState(0);\n\tconst [count, setCount] = React.useState(0);\n\n\tReact.useEffect(() => {\n\t\tif (!api) {\n\t\t\treturn;\n\t\t}\n\n\t\tsetCount(api.scrollSnapList().length);\n\t\tsetCurrent(api.selectedScrollSnap() + 1);\n\n\t\tapi.on(\"select\", () => {\n\t\t\tsetCurrent(api.selectedScrollSnap() + 1);\n\t\t});\n\t}, [api]);\n\n\treturn (\n\t\t<Carousel setApi={setApi}>\n\t\t\t<CarouselContent>\n\t\t\t\t<CarouselItem>...</CarouselItem>\n\t\t\t\t<CarouselItem>...</CarouselItem>\n\t\t\t\t<CarouselItem>...</CarouselItem>\n\t\t\t</CarouselContent>\n\t\t</Carousel>\n\t);\n}\n```\n\n## Events\n\nYou can listen to events using the api instance from `setApi`.\n\n```tsx showLineNumbers {1,4-14,16}\nimport { type CarouselApi } from \"@/components/ui/carousel\";\n\nexport function Example() {\n\tconst [api, setApi] = React.useState<CarouselApi>();\n\n\tReact.useEffect(() => {\n\t\tif (!api) {\n\t\t\treturn;\n\t\t}\n\n\t\tapi.on(\"select\", () => {\n\t\t\t// Do something on select.\n\t\t});\n\t}, [api]);\n\n\treturn (\n\t\t<Carousel setApi={setApi}>\n\t\t\t<CarouselContent>\n\t\t\t\t<CarouselItem>...</CarouselItem>\n\t\t\t\t<CarouselItem>...</CarouselItem>\n\t\t\t\t<CarouselItem>...</CarouselItem>\n\t\t\t</CarouselContent>\n\t\t</Carousel>\n\t);\n}\n```\n\n## Plugins\n\nYou can use the `plugins` prop to add plugins to the carousel.\n\n```ts showLineNumbers {1,6-10}\nimport Autoplay from \"embla-carousel-autoplay\"\n\nexport function Example() {\n  return (\n    <Carousel\n      plugins={[\n        Autoplay({\n          delay: 2000,\n        }),\n      ]}\n    >\n      // ...\n    </Carousel>\n  )\n}\n```\n"
  },
  {
    "path": "cofounder/api/system/presets/ui/design/systems/shadcn/primitives/docs/dialog_overlay_trigger_button.mdx",
    "content": "Name : Dialog\nDescription : A window overlaid on either the primary window or another dialog window, rendering the content underneath inert.\n\n---\n\n### import\n\n```\nimport {\n  Dialog,\n  DialogContent,\n  DialogDescription,\n  DialogHeader,\n  DialogTitle,\n  DialogTrigger,\n} from \"@/components/ui/dialog\"\n```\n\n---\n\n### use\n\n```dialog.mdx\n<Dialog>\n  <DialogTrigger>Open</DialogTrigger>\n  <DialogContent>\n    <DialogHeader>\n      <DialogTitle>Are you sure absolutely sure?</DialogTitle>\n      <DialogDescription>\n        This action cannot be undone. This will permanently delete your account\n        and remove your data from our servers.\n      </DialogDescription>\n    </DialogHeader>\n  </DialogContent>\n</Dialog>\n```\n\n---\n\n### examples\n\n```dialog-demo.tsx\nimport { Button } from \"@/components/ui/button\"\nimport {\n  Dialog,\n  DialogContent,\n  DialogDescription,\n  DialogFooter,\n  DialogHeader,\n  DialogTitle,\n  DialogTrigger,\n} from \"@/components/ui/dialog\"\nimport { Input } from \"@/components/ui/input\"\nimport { Label } from \"@/components/ui/label\"\n\nexport default function DialogDemo() {\n  return (\n    <Dialog>\n      <DialogTrigger asChild>\n        <Button variant=\"outline\">Edit Profile</Button>\n      </DialogTrigger>\n      <DialogContent className=\"sm:max-w-[425px]\">\n        <DialogHeader>\n          <DialogTitle>Edit profile</DialogTitle>\n          <DialogDescription>\n            Make changes to your profile here. Click save when you're done.\n          </DialogDescription>\n        </DialogHeader>\n        <div className=\"grid gap-4 py-4\">\n          <div className=\"grid grid-cols-4 items-center gap-4\">\n            <Label htmlFor=\"name\" className=\"text-right\">\n              Name\n            </Label>\n            <Input id=\"name\" value=\"Pedro Duarte\" className=\"col-span-3\" />\n          </div>\n          <div className=\"grid grid-cols-4 items-center gap-4\">\n            <Label htmlFor=\"username\" className=\"text-right\">\n              Username\n            </Label>\n            <Input id=\"username\" value=\"@peduarte\" className=\"col-span-3\" />\n          </div>\n        </div>\n        <DialogFooter>\n          <Button type=\"submit\">Save changes</Button>\n        </DialogFooter>\n      </DialogContent>\n    </Dialog>\n  )\n}\n```\n"
  },
  {
    "path": "cofounder/api/system/presets/ui/design/systems/shadcn/primitives/docs/input_checkbox.mdx",
    "content": "Name : Checkbox\nDescription : A control that allows the user to toggle between checked and not checked.\n\n---\n\n### import\n\n```\nimport { Checkbox } from \"@/components/ui/checkbox\"\n```\n\n---\n\n### use\n\n```checkbox.mdx\n<Checkbox />\n```\n\n---\n\n### examples\n\n```checkbox-demo.tsx\n\"use client\"\n\nimport { Checkbox } from \"@/components/ui/checkbox\"\n\nexport default function CheckboxDemo() {\n  return (\n    <div className=\"flex items-center space-x-2\">\n      <Checkbox id=\"terms\" />\n      <label\n        htmlFor=\"terms\"\n        className=\"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\"\n      >\n        Accept terms and conditions\n      </label>\n    </div>\n  )\n}\n```\n\n```checkbox-disabled.tsx\nimport { Checkbox } from \"@/components/ui/checkbox\"\n\nexport default function CheckboxDisabled() {\n  return (\n    <div className=\"flex items-center space-x-2\">\n      <Checkbox id=\"terms2\" disabled />\n      <label\n        htmlFor=\"terms2\"\n        className=\"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\"\n      >\n        Accept terms and conditions\n      </label>\n    </div>\n  )\n}\n```\n\n```checkbox-with-text.tsx\n\"use client\"\n\nimport { Checkbox } from \"@/components/ui/checkbox\"\n\nexport default function CheckboxWithText() {\n  return (\n    <div className=\"items-top flex space-x-2\">\n      <Checkbox id=\"terms1\" />\n      <div className=\"grid gap-1.5 leading-none\">\n        <label\n          htmlFor=\"terms1\"\n          className=\"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\"\n        >\n          Accept terms and conditions\n        </label>\n        <p className=\"text-sm text-muted-foreground\">\n          You agree to our Terms of Service and Privacy Policy.\n        </p>\n      </div>\n    </div>\n  )\n}\n```\n"
  },
  {
    "path": "cofounder/api/system/presets/ui/design/systems/shadcn/primitives/docs/input_combobox.mdx",
    "content": "Name : Combobox\nDescription : Autocomplete input and command palette with a list of suggestions.\n\n---\n\n### import\n\n```\n\"use client\"\n\nimport * as React from \"react\"\nimport { Check, ChevronsUpDown } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport {\n  Command,\n  CommandEmpty,\n  CommandGroup,\n  CommandInput,\n  CommandItem,\n} from \"@/components/ui/command\"\nimport {\n  Popover,\n  PopoverContent,\n  PopoverTrigger,\n} from \"@/components/ui/popover\"\n\nconst frameworks = [\n  {\n    value: \"next.js\",\n    label: \"Next.js\",\n  },\n  {\n    value: \"sveltekit\",\n    label: \"SvelteKit\",\n  },\n  {\n    value: \"nuxt.js\",\n    label: \"Nuxt.js\",\n  },\n  {\n    value: \"remix\",\n    label: \"Remix\",\n  },\n  {\n    value: \"astro\",\n    label: \"Astro\",\n  },\n]\n\nexport function ComboboxDemo() {\n  const [open, setOpen] = React.useState(false)\n  const [value, setValue] = React.useState(\"\")\n\n  return (\n    <Popover open={open} onOpenChange={setOpen}>\n      <PopoverTrigger asChild>\n        <Button\n          variant=\"outline\"\n          role=\"combobox\"\n          aria-expanded={open}\n          className=\"w-[200px] justify-between\"\n        >\n          {value\n            ? frameworks.find((framework) => framework.value === value)?.label\n            : \"Select framework...\"}\n          <ChevronsUpDown className=\"ml-2 h-4 w-4 shrink-0 opacity-50\" />\n        </Button>\n      </PopoverTrigger>\n      <PopoverContent className=\"w-[200px] p-0\">\n        <Command>\n          <CommandInput placeholder=\"Search framework...\" />\n          <CommandEmpty>No framework found.</CommandEmpty>\n          <CommandGroup>\n            {frameworks.map((framework) => (\n              <CommandItem\n                key={framework.value}\n                onSelect={(currentValue) => {\n                  setValue(currentValue === value ? \"\" : currentValue)\n                  setOpen(false)\n                }}\n              >\n                <Check\n                  className={cn(\n                    \"mr-2 h-4 w-4\",\n                    value === framework.value ? \"opacity-100\" : \"opacity-0\"\n                  )}\n                />\n                {framework.label}\n              </CommandItem>\n            ))}\n          </CommandGroup>\n        </Command>\n      </PopoverContent>\n    </Popover>\n  )\n}\n```\n\n---\n\n### use\n\n---\n\n### examples\n\n```combobox-dropdown-menu.tsx\n\"use client\"\n\nimport * as React from \"react\"\nimport { Calendar, MoreHorizontal, Tags, Trash, User } from \"lucide-react\"\n\nimport { Button } from \"@/components/ui/button\"\nimport {\n  Command,\n  CommandEmpty,\n  CommandGroup,\n  CommandInput,\n  CommandItem,\n  CommandList,\n} from \"@/components/ui/command\"\nimport {\n  DropdownMenu,\n  DropdownMenuContent,\n  DropdownMenuGroup,\n  DropdownMenuItem,\n  DropdownMenuLabel,\n  DropdownMenuSeparator,\n  DropdownMenuShortcut,\n  DropdownMenuSub,\n  DropdownMenuSubContent,\n  DropdownMenuSubTrigger,\n  DropdownMenuTrigger,\n} from \"@/components/ui/dropdown-menu\"\n\nconst labels = [\n  \"feature\",\n  \"bug\",\n  \"enhancement\",\n  \"documentation\",\n  \"design\",\n  \"question\",\n  \"maintenance\",\n]\n\nexport default function ComboboxDropdownMenu() {\n  const [label, setLabel] = React.useState(\"feature\")\n  const [open, setOpen] = React.useState(false)\n\n  return (\n    <div className=\"flex w-full flex-col items-start justify-between rounded-md border px-4 py-3 sm:flex-row sm:items-center\">\n      <p className=\"text-sm font-medium leading-none\">\n        <span className=\"mr-2 rounded-lg bg-primary px-2 py-1 text-xs text-primary-foreground\">\n          {label}\n        </span>\n        <span className=\"text-muted-foreground\">Create a new project</span>\n      </p>\n      <DropdownMenu open={open} onOpenChange={setOpen}>\n        <DropdownMenuTrigger asChild>\n          <Button variant=\"ghost\" size=\"sm\">\n            <MoreHorizontal />\n          </Button>\n        </DropdownMenuTrigger>\n        <DropdownMenuContent align=\"end\" className=\"w-[200px]\">\n          <DropdownMenuLabel>Actions</DropdownMenuLabel>\n          <DropdownMenuGroup>\n            <DropdownMenuItem>\n              <User className=\"mr-2 h-4 w-4\" />\n              Assign to...\n            </DropdownMenuItem>\n            <DropdownMenuItem>\n              <Calendar className=\"mr-2 h-4 w-4\" />\n              Set due date...\n            </DropdownMenuItem>\n            <DropdownMenuSeparator />\n            <DropdownMenuSub>\n              <DropdownMenuSubTrigger>\n                <Tags className=\"mr-2 h-4 w-4\" />\n                Apply label\n              </DropdownMenuSubTrigger>\n              <DropdownMenuSubContent className=\"p-0\">\n                <Command>\n                  <CommandInput\n                    placeholder=\"Filter label...\"\n                    autoFocus={true}\n                  />\n                  <CommandList>\n                    <CommandEmpty>No label found.</CommandEmpty>\n                    <CommandGroup>\n                      {labels.map((label) => (\n                        <CommandItem\n                          key={label}\n                          onSelect={(value) => {\n                            setLabel(value)\n                            setOpen(false)\n                          }}\n                        >\n                          {label}\n                        </CommandItem>\n                      ))}\n                    </CommandGroup>\n                  </CommandList>\n                </Command>\n              </DropdownMenuSubContent>\n            </DropdownMenuSub>\n            <DropdownMenuSeparator />\n            <DropdownMenuItem className=\"text-red-600\">\n              <Trash className=\"mr-2 h-4 w-4\" />\n              Delete\n              <DropdownMenuShortcut>⌘⌫</DropdownMenuShortcut>\n            </DropdownMenuItem>\n          </DropdownMenuGroup>\n        </DropdownMenuContent>\n      </DropdownMenu>\n    </div>\n  )\n}\n```\n\n```combobox-popover.tsx\n\"use client\"\n\nimport * as React from \"react\"\nimport {\n  ArrowUpCircle,\n  CheckCircle2,\n  Circle,\n  HelpCircle,\n  LucideIcon,\n  XCircle,\n} from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport {\n  Command,\n  CommandEmpty,\n  CommandGroup,\n  CommandInput,\n  CommandItem,\n  CommandList,\n} from \"@/components/ui/command\"\nimport {\n  Popover,\n  PopoverContent,\n  PopoverTrigger,\n} from \"@/components/ui/popover\"\n\ntype Status = {\n  value: string\n  label: string\n  icon: LucideIcon\n}\n\nconst statuses: Status[] = [\n  {\n    value: \"backlog\",\n    label: \"Backlog\",\n    icon: HelpCircle,\n  },\n  {\n    value: \"todo\",\n    label: \"Todo\",\n    icon: Circle,\n  },\n  {\n    value: \"in progress\",\n    label: \"In Progress\",\n    icon: ArrowUpCircle,\n  },\n  {\n    value: \"done\",\n    label: \"Done\",\n    icon: CheckCircle2,\n  },\n  {\n    value: \"canceled\",\n    label: \"Canceled\",\n    icon: XCircle,\n  },\n]\n\nexport default function ComboboxPopover() {\n  const [open, setOpen] = React.useState(false)\n  const [selectedStatus, setSelectedStatus] = React.useState<Status | null>(\n    null\n  )\n\n  return (\n    <div className=\"flex items-center space-x-4\">\n      <p className=\"text-sm text-muted-foreground\">Status</p>\n      <Popover open={open} onOpenChange={setOpen}>\n        <PopoverTrigger asChild>\n          <Button\n            variant=\"outline\"\n            size=\"sm\"\n            className=\"w-[150px] justify-start\"\n          >\n            {selectedStatus ? (\n              <>\n                <selectedStatus.icon className=\"mr-2 h-4 w-4 shrink-0\" />\n                {selectedStatus.label}\n              </>\n            ) : (\n              <>+ Set status</>\n            )}\n          </Button>\n        </PopoverTrigger>\n        <PopoverContent className=\"p-0\" side=\"right\" align=\"start\">\n          <Command>\n            <CommandInput placeholder=\"Change status...\" />\n            <CommandList>\n              <CommandEmpty>No results found.</CommandEmpty>\n              <CommandGroup>\n                {statuses.map((status) => (\n                  <CommandItem\n                    key={status.value}\n                    onSelect={(value) => {\n                      setSelectedStatus(\n                        statuses.find((priority) => priority.value === value) ||\n                          null\n                      )\n                      setOpen(false)\n                    }}\n                  >\n                    <status.icon\n                      className={cn(\n                        \"mr-2 h-4 w-4\",\n                        status.value === selectedStatus?.value\n                          ? \"opacity-100\"\n                          : \"opacity-40\"\n                      )}\n                    />\n                    <span>{status.label}</span>\n                  </CommandItem>\n                ))}\n              </CommandGroup>\n            </CommandList>\n          </Command>\n        </PopoverContent>\n      </Popover>\n    </div>\n  )\n}\n```\n"
  },
  {
    "path": "cofounder/api/system/presets/ui/design/systems/shadcn/primitives/docs/input_datepicker.mdx",
    "content": "Name : Date Picker\nDescription : A date picker component with range and presets.\n\n---\n\n### import\n\n```\n\"use client\"\n\nimport * as React from \"react\"\nimport { format } from \"date-fns\"\nimport { Calendar as CalendarIcon } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Calendar } from \"@/components/ui/calendar\"\nimport {\n  Popover,\n  PopoverContent,\n  PopoverTrigger,\n} from \"@/components/ui/popover\"\n\nexport function DatePickerDemo() {\n  const [date, setDate] = React.useState<Date>()\n\n  return (\n    <Popover>\n      <PopoverTrigger asChild>\n        <Button\n          variant={\"outline\"}\n          className={cn(\n            \"w-[280px] justify-start text-left font-normal\",\n            !date && \"text-muted-foreground\"\n          )}\n        >\n          <CalendarIcon className=\"mr-2 h-4 w-4\" />\n          {date ? format(date, \"PPP\") : <span>Pick a date</span>}\n        </Button>\n      </PopoverTrigger>\n      <PopoverContent className=\"w-auto p-0\">\n        <Calendar\n          mode=\"single\"\n          selected={date}\n          onSelect={setDate}\n          initialFocus\n        />\n      </PopoverContent>\n    </Popover>\n  )\n}\n```\n\n---\n\n### use\n\n---\n\n### examples\n\n```date-picker-demo.tsx\n\"use client\"\n\nimport * as React from \"react\"\nimport { format } from \"date-fns\"\nimport { Calendar as CalendarIcon } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Calendar } from \"@/components/ui/calendar\"\nimport {\n  Popover,\n  PopoverContent,\n  PopoverTrigger,\n} from \"@/components/ui/popover\"\n\nexport default function DatePickerDemo() {\n  const [date, setDate] = React.useState<Date>()\n\n  return (\n    <Popover>\n      <PopoverTrigger asChild>\n        <Button\n          variant={\"outline\"}\n          className={cn(\n            \"w-[280px] justify-start text-left font-normal\",\n            !date && \"text-muted-foreground\"\n          )}\n        >\n          <CalendarIcon className=\"mr-2 h-4 w-4\" />\n          {date ? format(date, \"PPP\") : <span>Pick a date</span>}\n        </Button>\n      </PopoverTrigger>\n      <PopoverContent className=\"w-auto p-0\">\n        <Calendar\n          mode=\"single\"\n          selected={date}\n          onSelect={setDate}\n          initialFocus\n        />\n      </PopoverContent>\n    </Popover>\n  )\n}\n```\n\n```date-picker-with-presets.tsx\n\"use client\"\n\nimport * as React from \"react\"\nimport { addDays, format } from \"date-fns\"\nimport { Calendar as CalendarIcon } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Calendar } from \"@/components/ui/calendar\"\nimport {\n  Popover,\n  PopoverContent,\n  PopoverTrigger,\n} from \"@/components/ui/popover\"\nimport {\n  Select,\n  SelectContent,\n  SelectItem,\n  SelectTrigger,\n  SelectValue,\n} from \"@/components/ui/select\"\n\nexport default function DatePickerWithPresets() {\n  const [date, setDate] = React.useState<Date>()\n\n  return (\n    <Popover>\n      <PopoverTrigger asChild>\n        <Button\n          variant={\"outline\"}\n          className={cn(\n            \"w-[280px] justify-start text-left font-normal\",\n            !date && \"text-muted-foreground\"\n          )}\n        >\n          <CalendarIcon className=\"mr-2 h-4 w-4\" />\n          {date ? format(date, \"PPP\") : <span>Pick a date</span>}\n        </Button>\n      </PopoverTrigger>\n      <PopoverContent className=\"flex w-auto flex-col space-y-2 p-2\">\n        <Select\n          onValueChange={(value) =>\n            setDate(addDays(new Date(), parseInt(value)))\n          }\n        >\n          <SelectTrigger>\n            <SelectValue placeholder=\"Select\" />\n          </SelectTrigger>\n          <SelectContent position=\"popper\">\n            <SelectItem value=\"0\">Today</SelectItem>\n            <SelectItem value=\"1\">Tomorrow</SelectItem>\n            <SelectItem value=\"3\">In 3 days</SelectItem>\n            <SelectItem value=\"7\">In a week</SelectItem>\n          </SelectContent>\n        </Select>\n        <div className=\"rounded-md border\">\n          <Calendar mode=\"single\" selected={date} onSelect={setDate} />\n        </div>\n      </PopoverContent>\n    </Popover>\n  )\n}\n```\n\n```date-picker-with-range.tsx\n\"use client\"\n\nimport * as React from \"react\"\nimport { addDays, format } from \"date-fns\"\nimport { Calendar as CalendarIcon } from \"lucide-react\"\nimport { DateRange } from \"react-day-picker\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport { Calendar } from \"@/components/ui/calendar\"\nimport {\n  Popover,\n  PopoverContent,\n  PopoverTrigger,\n} from \"@/components/ui/popover\"\n\nexport default function DatePickerWithRange({\n  className,\n}: React.HTMLAttributes<HTMLDivElement>) {\n  const [date, setDate] = React.useState<DateRange | undefined>({\n    from: new Date(2022, 0, 20),\n    to: addDays(new Date(2022, 0, 20), 20),\n  })\n\n  return (\n    <div className={cn(\"grid gap-2\", className)}>\n      <Popover>\n        <PopoverTrigger asChild>\n          <Button\n            id=\"date\"\n            variant={\"outline\"}\n            className={cn(\n              \"w-[300px] justify-start text-left font-normal\",\n              !date && \"text-muted-foreground\"\n            )}\n          >\n            <CalendarIcon className=\"mr-2 h-4 w-4\" />\n            {date?.from ? (\n              date.to ? (\n                <>\n                  {format(date.from, \"LLL dd, y\")} -{\" \"}\n                  {format(date.to, \"LLL dd, y\")}\n                </>\n              ) : (\n                format(date.from, \"LLL dd, y\")\n              )\n            ) : (\n              <span>Pick a date</span>\n            )}\n          </Button>\n        </PopoverTrigger>\n        <PopoverContent className=\"w-auto p-0\" align=\"start\">\n          <Calendar\n            initialFocus\n            mode=\"range\"\n            defaultMonth={date?.from}\n            selected={date}\n            onSelect={setDate}\n            numberOfMonths={2}\n          />\n        </PopoverContent>\n      </Popover>\n    </div>\n  )\n}\n```\n"
  },
  {
    "path": "cofounder/api/system/presets/ui/design/systems/shadcn/primitives/docs/input_field.mdx",
    "content": "Name : Input\nDescription : Displays a form input field or a component that looks like an input field.\n\n---\n\n### import\n\n```\nimport { Input } from \"@/components/ui/input\"\n```\n\n---\n\n### use\n\n```input.mdx\n<Input />\n```\n\n---\n\n### examples\n\n```input-demo.tsx\nimport { Input } from \"@/components/ui/input\"\n\nexport default function InputDemo() {\n  return <Input type=\"email\" placeholder=\"Email\" />\n}\n```\n\n```input-disabled.tsx\nimport { Input } from \"@/components/ui/input\"\n\nexport default function InputDisabled() {\n  return <Input disabled type=\"email\" placeholder=\"Email\" />\n}\n```\n\n```input-file.tsx\nimport { Input } from \"@/components/ui/input\"\nimport { Label } from \"@/components/ui/label\"\n\nexport default function InputFile() {\n  return (\n    <div className=\"grid w-full max-w-sm items-center gap-1.5\">\n      <Label htmlFor=\"picture\">Picture</Label>\n      <Input id=\"picture\" type=\"file\" />\n    </div>\n  )\n}\n```\n\n```input-with-button.tsx\nimport { Button } from \"@/components/ui/button\"\nimport { Input } from \"@/components/ui/input\"\n\nexport default function InputWithButton() {\n  return (\n    <div className=\"flex w-full max-w-sm items-center space-x-2\">\n      <Input type=\"email\" placeholder=\"Email\" />\n      <Button type=\"submit\">Subscribe</Button>\n    </div>\n  )\n}\n```\n\n```input-with-label.tsx\nimport { Input } from \"@/components/ui/input\"\nimport { Label } from \"@/components/ui/label\"\n\nexport default function InputWithLabel() {\n  return (\n    <div className=\"grid w-full max-w-sm items-center gap-1.5\">\n      <Label htmlFor=\"email\">Email</Label>\n      <Input type=\"email\" id=\"email\" placeholder=\"Email\" />\n    </div>\n  )\n}\n```\n\n```input-with-text.tsx\nimport { Input } from \"@/components/ui/input\"\nimport { Label } from \"@/components/ui/label\"\n\nexport default function InputWithText() {\n  return (\n    <div className=\"grid w-full max-w-sm items-center gap-1.5\">\n      <Label htmlFor=\"email-2\">Email</Label>\n      <Input type=\"email\" id=\"email-2\" placeholder=\"Email\" />\n      <p className=\"text-sm text-muted-foreground\">Enter your email address.</p>\n    </div>\n  )\n}\n```\n"
  },
  {
    "path": "cofounder/api/system/presets/ui/design/systems/shadcn/primitives/docs/input_label.mdx",
    "content": "Name : Label\nDescription : Renders an accessible label associated with controls.\n\n---\n\n### import\n\n```\nimport { Label } from \"@/components/ui/label\"\n```\n\n---\n\n### use\n\n```label.mdx\n<Label htmlFor=\"email\">Your email address</Label>\n```\n\n---\n\n### examples\n\n```label-demo.tsx\nimport { Checkbox } from \"@/components/ui/checkbox\"\nimport { Label } from \"@/components/ui/label\"\n\nexport default function LabelDemo() {\n  return (\n    <div>\n      <div className=\"flex items-center space-x-2\">\n        <Checkbox id=\"terms\" />\n        <Label htmlFor=\"terms\">Accept terms and conditions</Label>\n      </div>\n    </div>\n  )\n}\n```\n"
  },
  {
    "path": "cofounder/api/system/presets/ui/design/systems/shadcn/primitives/docs/input_radio.mdx",
    "content": "Name : Radio Group\nDescription : A set of checkable buttons—known as radio buttons—where no more than one of the buttons can be checked at a time.\n\n---\n\n### import\n\n```\nimport { Label } from \"@/components/ui/label\"\nimport { RadioGroup, RadioGroupItem } from \"@/components/ui/radio-group\"\n```\n\n---\n\n### use\n\n```radio-group.mdx\n<RadioGroup defaultValue=\"option-one\">\n  <div className=\"flex items-center space-x-2\">\n    <RadioGroupItem value=\"option-one\" id=\"option-one\" />\n    <Label htmlFor=\"option-one\">Option One</Label>\n  </div>\n  <div className=\"flex items-center space-x-2\">\n    <RadioGroupItem value=\"option-two\" id=\"option-two\" />\n    <Label htmlFor=\"option-two\">Option Two</Label>\n  </div>\n</RadioGroup>\n```\n\n---\n\n### examples\n\n```radio-group-demo.tsx\nimport { Label } from \"@/components/ui/label\"\nimport { RadioGroup, RadioGroupItem } from \"@/components/ui/radio-group\"\n\nexport default function RadioGroupDemo() {\n  return (\n    <RadioGroup defaultValue=\"comfortable\">\n      <div className=\"flex items-center space-x-2\">\n        <RadioGroupItem value=\"default\" id=\"r1\" />\n        <Label htmlFor=\"r1\">Default</Label>\n      </div>\n      <div className=\"flex items-center space-x-2\">\n        <RadioGroupItem value=\"comfortable\" id=\"r2\" />\n        <Label htmlFor=\"r2\">Comfortable</Label>\n      </div>\n      <div className=\"flex items-center space-x-2\">\n        <RadioGroupItem value=\"compact\" id=\"r3\" />\n        <Label htmlFor=\"r3\">Compact</Label>\n      </div>\n    </RadioGroup>\n  )\n}\n```\n"
  },
  {
    "path": "cofounder/api/system/presets/ui/design/systems/shadcn/primitives/docs/input_searchfield.mdx",
    "content": "Name : Input\nDescription : Displays a form input field or a component that looks like an input field.\n\n---\n\n### import\n\n```\nimport { Input } from \"@/components/ui/input\"\n```\n\n---\n\n### use\n\n```input.mdx\n<Input />\n```\n\n---\n\n### examples\n\n```input-demo.tsx\nimport { Input } from \"@/components/ui/input\"\n\nexport default function InputDemo() {\n  return <Input type=\"email\" placeholder=\"Email\" />\n}\n```\n\n```input-disabled.tsx\nimport { Input } from \"@/components/ui/input\"\n\nexport default function InputDisabled() {\n  return <Input disabled type=\"email\" placeholder=\"Email\" />\n}\n```\n\n```input-file.tsx\nimport { Input } from \"@/components/ui/input\"\nimport { Label } from \"@/components/ui/label\"\n\nexport default function InputFile() {\n  return (\n    <div className=\"grid w-full max-w-sm items-center gap-1.5\">\n      <Label htmlFor=\"picture\">Picture</Label>\n      <Input id=\"picture\" type=\"file\" />\n    </div>\n  )\n}\n```\n\n```input-with-button.tsx\nimport { Button } from \"@/components/ui/button\"\nimport { Input } from \"@/components/ui/input\"\n\nexport default function InputWithButton() {\n  return (\n    <div className=\"flex w-full max-w-sm items-center space-x-2\">\n      <Input type=\"email\" placeholder=\"Email\" />\n      <Button type=\"submit\">Subscribe</Button>\n    </div>\n  )\n}\n```\n\n```input-with-label.tsx\nimport { Input } from \"@/components/ui/input\"\nimport { Label } from \"@/components/ui/label\"\n\nexport default function InputWithLabel() {\n  return (\n    <div className=\"grid w-full max-w-sm items-center gap-1.5\">\n      <Label htmlFor=\"email\">Email</Label>\n      <Input type=\"email\" id=\"email\" placeholder=\"Email\" />\n    </div>\n  )\n}\n```\n\n```input-with-text.tsx\nimport { Input } from \"@/components/ui/input\"\nimport { Label } from \"@/components/ui/label\"\n\nexport default function InputWithText() {\n  return (\n    <div className=\"grid w-full max-w-sm items-center gap-1.5\">\n      <Label htmlFor=\"email-2\">Email</Label>\n      <Input type=\"email\" id=\"email-2\" placeholder=\"Email\" />\n      <p className=\"text-sm text-muted-foreground\">Enter your email address.</p>\n    </div>\n  )\n}\n```\n"
  },
  {
    "path": "cofounder/api/system/presets/ui/design/systems/shadcn/primitives/docs/input_select.mdx",
    "content": "Name : Select\nDescription : Displays a list of options for the user to pick from—triggered by a button.\n\n---\n\n### import\n\n```\nimport {\n  Select,\n  SelectContent,\n  SelectItem,\n  SelectTrigger,\n  SelectValue,\n} from \"@/components/ui/select\"\n```\n\n---\n\n### use\n\n```select.mdx\n<Select>\n  <SelectTrigger className=\"w-[180px]\">\n    <SelectValue placeholder=\"Theme\" />\n  </SelectTrigger>\n  <SelectContent>\n    <SelectItem value=\"light\">Light</SelectItem>\n    <SelectItem value=\"dark\">Dark</SelectItem>\n    <SelectItem value=\"system\">System</SelectItem>\n  </SelectContent>\n</Select>\n```\n\n---\n\n### examples\n\n```select-demo.tsx\nimport * as React from \"react\"\n\nimport {\n  Select,\n  SelectContent,\n  SelectGroup,\n  SelectItem,\n  SelectLabel,\n  SelectTrigger,\n  SelectValue,\n} from \"@/components/ui/select\"\n\nexport default function SelectDemo() {\n  return (\n    <Select>\n      <SelectTrigger className=\"w-[180px]\">\n        <SelectValue placeholder=\"Select a fruit\" />\n      </SelectTrigger>\n      <SelectContent>\n        <SelectGroup>\n          <SelectLabel>Fruits</SelectLabel>\n          <SelectItem value=\"apple\">Apple</SelectItem>\n          <SelectItem value=\"banana\">Banana</SelectItem>\n          <SelectItem value=\"blueberry\">Blueberry</SelectItem>\n          <SelectItem value=\"grapes\">Grapes</SelectItem>\n          <SelectItem value=\"pineapple\">Pineapple</SelectItem>\n        </SelectGroup>\n      </SelectContent>\n    </Select>\n  )\n}\n```\n"
  },
  {
    "path": "cofounder/api/system/presets/ui/design/systems/shadcn/primitives/docs/input_switch.mdx",
    "content": "Name : Switch\nDescription : A control that allows the user to toggle between checked and not checked.\n\n---\n\n### import\n\n```\nimport { Switch } from \"@/components/ui/switch\"\n```\n\n---\n\n### use\n\n```switch.mdx\n<Switch />\n```\n\n---\n\n### examples\n\n```switch-demo.tsx\nimport { Label } from \"@/components/ui/label\"\nimport { Switch } from \"@/components/ui/switch\"\n\nexport default function SwitchDemo() {\n  return (\n    <div className=\"flex items-center space-x-2\">\n      <Switch id=\"airplane-mode\" />\n      <Label htmlFor=\"airplane-mode\">Airplane Mode</Label>\n    </div>\n  )\n}\n```\n"
  },
  {
    "path": "cofounder/api/system/presets/ui/design/systems/shadcn/primitives/docs/input_textarea.mdx",
    "content": "Name : Textarea\nDescription : Displays a form textarea or a component that looks like a textarea.\n\n---\n\n### import\n\n```\nimport { Textarea } from \"@/components/ui/textarea\"\n```\n\n---\n\n### use\n\n```textarea.mdx\n<Textarea />\n```\n\n---\n\n### examples\n\n```textarea-demo.tsx\nimport { Textarea } from \"@/components/ui/textarea\"\n\nexport default function TextareaDemo() {\n  return <Textarea placeholder=\"Type your message here.\" />\n}\n```\n\n```textarea-disabled.tsx\nimport { Textarea } from \"@/components/ui/textarea\"\n\nexport default function TextareaDisabled() {\n  return <Textarea placeholder=\"Type your message here.\" disabled />\n}\n```\n\n```textarea-with-button.tsx\nimport { Button } from \"@/components/ui/button\"\nimport { Textarea } from \"@/components/ui/textarea\"\n\nexport default function TextareaWithButton() {\n  return (\n    <div className=\"grid w-full gap-2\">\n      <Textarea placeholder=\"Type your message here.\" />\n      <Button>Send message</Button>\n    </div>\n  )\n}\n```\n\n```textarea-with-label.tsx\nimport { Label } from \"@/components/ui/label\"\nimport { Textarea } from \"@/components/ui/textarea\"\n\nexport default function TextareaWithLabel() {\n  return (\n    <div className=\"grid w-full gap-1.5\">\n      <Label htmlFor=\"message\">Your message</Label>\n      <Textarea placeholder=\"Type your message here.\" id=\"message\" />\n    </div>\n  )\n}\n```\n\n```textarea-with-text.tsx\nimport { Label } from \"@/components/ui/label\"\nimport { Textarea } from \"@/components/ui/textarea\"\n\nexport default function TextareaWithText() {\n  return (\n    <div className=\"grid w-full gap-1.5\">\n      <Label htmlFor=\"message-2\">Your Message</Label>\n      <Textarea placeholder=\"Type your message here.\" id=\"message-2\" />\n      <p className=\"text-sm text-muted-foreground\">\n        Your message will be copied to the support team.\n      </p>\n    </div>\n  )\n}\n```\n"
  },
  {
    "path": "cofounder/api/system/presets/ui/design/systems/shadcn/primitives/docs/menu_bar.mdx",
    "content": "Name : Menubar\nDescription : A visually persistent menu common in desktop applications that provides quick access to a consistent set of commands.\n\n---\n\n### import\n\n```\nimport {\n  Menubar,\n  MenubarContent,\n  MenubarItem,\n  MenubarMenu,\n  MenubarSeparator,\n  MenubarShortcut,\n  MenubarTrigger,\n} from \"@/components/ui/menubar\"\n```\n\n---\n\n### use\n\n```menubar.mdx\n<Menubar>\n  <MenubarMenu>\n    <MenubarTrigger>File</MenubarTrigger>\n    <MenubarContent>\n      <MenubarItem>\n        New Tab <MenubarShortcut>⌘T</MenubarShortcut>\n      </MenubarItem>\n      <MenubarItem>New Window</MenubarItem>\n      <MenubarSeparator />\n      <MenubarItem>Share</MenubarItem>\n      <MenubarSeparator />\n      <MenubarItem>Print</MenubarItem>\n    </MenubarContent>\n  </MenubarMenu>\n</Menubar>\n```\n\n---\n\n### examples\n\n```menubar-demo.tsx\nimport {\n  Menubar,\n  MenubarCheckboxItem,\n  MenubarContent,\n  MenubarItem,\n  MenubarMenu,\n  MenubarRadioGroup,\n  MenubarRadioItem,\n  MenubarSeparator,\n  MenubarShortcut,\n  MenubarSub,\n  MenubarSubContent,\n  MenubarSubTrigger,\n  MenubarTrigger,\n} from \"@/components/ui/menubar\"\n\nexport default function MenubarDemo() {\n  return (\n    <Menubar>\n      <MenubarMenu>\n        <MenubarTrigger>File</MenubarTrigger>\n        <MenubarContent>\n          <MenubarItem>\n            New Tab <MenubarShortcut>⌘T</MenubarShortcut>\n          </MenubarItem>\n          <MenubarItem>\n            New Window <MenubarShortcut>⌘N</MenubarShortcut>\n          </MenubarItem>\n          <MenubarItem disabled>New Incognito Window</MenubarItem>\n          <MenubarSeparator />\n          <MenubarSub>\n            <MenubarSubTrigger>Share</MenubarSubTrigger>\n            <MenubarSubContent>\n              <MenubarItem>Email link</MenubarItem>\n              <MenubarItem>Messages</MenubarItem>\n              <MenubarItem>Notes</MenubarItem>\n            </MenubarSubContent>\n          </MenubarSub>\n          <MenubarSeparator />\n          <MenubarItem>\n            Print... <MenubarShortcut>⌘P</MenubarShortcut>\n          </MenubarItem>\n        </MenubarContent>\n      </MenubarMenu>\n      <MenubarMenu>\n        <MenubarTrigger>Edit</MenubarTrigger>\n        <MenubarContent>\n          <MenubarItem>\n            Undo <MenubarShortcut>⌘Z</MenubarShortcut>\n          </MenubarItem>\n          <MenubarItem>\n            Redo <MenubarShortcut>⇧⌘Z</MenubarShortcut>\n          </MenubarItem>\n          <MenubarSeparator />\n          <MenubarSub>\n            <MenubarSubTrigger>Find</MenubarSubTrigger>\n            <MenubarSubContent>\n              <MenubarItem>Search the web</MenubarItem>\n              <MenubarSeparator />\n              <MenubarItem>Find...</MenubarItem>\n              <MenubarItem>Find Next</MenubarItem>\n              <MenubarItem>Find Previous</MenubarItem>\n            </MenubarSubContent>\n          </MenubarSub>\n          <MenubarSeparator />\n          <MenubarItem>Cut</MenubarItem>\n          <MenubarItem>Copy</MenubarItem>\n          <MenubarItem>Paste</MenubarItem>\n        </MenubarContent>\n      </MenubarMenu>\n      <MenubarMenu>\n        <MenubarTrigger>View</MenubarTrigger>\n        <MenubarContent>\n          <MenubarCheckboxItem>Always Show Bookmarks Bar</MenubarCheckboxItem>\n          <MenubarCheckboxItem checked>\n            Always Show Full URLs\n          </MenubarCheckboxItem>\n          <MenubarSeparator />\n          <MenubarItem inset>\n            Reload <MenubarShortcut>⌘R</MenubarShortcut>\n          </MenubarItem>\n          <MenubarItem disabled inset>\n            Force Reload <MenubarShortcut>⇧⌘R</MenubarShortcut>\n          </MenubarItem>\n          <MenubarSeparator />\n          <MenubarItem inset>Toggle Fullscreen</MenubarItem>\n          <MenubarSeparator />\n          <MenubarItem inset>Hide Sidebar</MenubarItem>\n        </MenubarContent>\n      </MenubarMenu>\n      <MenubarMenu>\n        <MenubarTrigger>Profiles</MenubarTrigger>\n        <MenubarContent>\n          <MenubarRadioGroup value=\"benoit\">\n            <MenubarRadioItem value=\"andy\">Andy</MenubarRadioItem>\n            <MenubarRadioItem value=\"benoit\">Benoit</MenubarRadioItem>\n            <MenubarRadioItem value=\"Luis\">Luis</MenubarRadioItem>\n          </MenubarRadioGroup>\n          <MenubarSeparator />\n          <MenubarItem inset>Edit...</MenubarItem>\n          <MenubarSeparator />\n          <MenubarItem inset>Add Profile...</MenubarItem>\n        </MenubarContent>\n      </MenubarMenu>\n    </Menubar>\n  )\n}\n```\n"
  },
  {
    "path": "cofounder/api/system/presets/ui/design/systems/shadcn/primitives/docs/menu_navigation.mdx",
    "content": "Name : Navigation Menu\nDescription : A collection of links for navigating websites.\n\n---\n\n### import\n\n```\nimport {\n  NavigationMenu,\n  NavigationMenuContent,\n  NavigationMenuIndicator,\n  NavigationMenuItem,\n  NavigationMenuLink,\n  NavigationMenuList,\n  NavigationMenuTrigger,\n  NavigationMenuViewport,\n} from \"@/components/ui/navigation-menu\"\n```\n\n---\n\n### use\n\n```navigation-menu.mdx\n<NavigationMenu>\n  <NavigationMenuList>\n    <NavigationMenuItem>\n      <NavigationMenuTrigger>Item One</NavigationMenuTrigger>\n      <NavigationMenuContent>\n        <NavigationMenuLink>Link</NavigationMenuLink>\n      </NavigationMenuContent>\n    </NavigationMenuItem>\n  </NavigationMenuList>\n</NavigationMenu>\n```\n\n```navigation-menu.mdx\nimport { navigationMenuTriggerStyle } from \"@/components/ui/navigation-menu\"\n```\n\n---\n\n### examples\n"
  },
  {
    "path": "cofounder/api/system/presets/ui/design/systems/shadcn/primitives/docs/pagination.mdx",
    "content": "---\ntitle: Pagination\ndescription: Pagination with page navigation, next and previous links.\n---\n\n## Usage\n\n```tsx\nimport {\n\tPagination,\n\tPaginationContent,\n\tPaginationEllipsis,\n\tPaginationItem,\n\tPaginationLink,\n\tPaginationNext,\n\tPaginationPrevious,\n} from \"@/components/ui/pagination\";\n```\n\n```tsx\n<Pagination>\n\t<PaginationContent>\n\t\t<PaginationItem>\n\t\t\t<PaginationPrevious href=\"#\" />\n\t\t</PaginationItem>\n\t\t<PaginationItem>\n\t\t\t<PaginationLink href=\"#\">1</PaginationLink>\n\t\t</PaginationItem>\n\t\t<PaginationItem>\n\t\t\t<PaginationEllipsis />\n\t\t</PaginationItem>\n\t\t<PaginationItem>\n\t\t\t<PaginationNext href=\"#\" />\n\t\t</PaginationItem>\n\t</PaginationContent>\n</Pagination>\n```\n"
  },
  {
    "path": "cofounder/api/system/presets/ui/design/systems/shadcn/primitives/docs/table.mdx",
    "content": "Name : Table\nDescription : A responsive table component.\n\n---\n\n### import\n\n```\nimport {\n  Table,\n  TableBody,\n  TableCaption,\n  TableCell,\n  TableHead,\n  TableHeader,\n  TableRow,\n} from \"@/components/ui/table\"\n```\n\n---\n\n### use\n\n```table.mdx\n<Table>\n  <TableCaption>A list of your recent invoices.</TableCaption>\n  <TableHeader>\n    <TableRow>\n      <TableHead className=\"w-[100px]\">Invoice</TableHead>\n      <TableHead>Status</TableHead>\n      <TableHead>Method</TableHead>\n      <TableHead className=\"text-right\">Amount</TableHead>\n    </TableRow>\n  </TableHeader>\n  <TableBody>\n    <TableRow>\n      <TableCell className=\"font-medium\">INV001</TableCell>\n      <TableCell>Paid</TableCell>\n      <TableCell>Credit Card</TableCell>\n      <TableCell className=\"text-right\">$250.00</TableCell>\n    </TableRow>\n  </TableBody>\n</Table>\n```\n\n---\n\n### examples\n\n```table-demo.tsx\nimport {\n  Table,\n  TableBody,\n  TableCaption,\n  TableCell,\n  TableHead,\n  TableHeader,\n  TableRow,\n} from \"@/components/ui/table\"\n\nconst invoices = [\n  {\n    invoice: \"INV001\",\n    paymentStatus: \"Paid\",\n    totalAmount: \"$250.00\",\n    paymentMethod: \"Credit Card\",\n  },\n  {\n    invoice: \"INV002\",\n    paymentStatus: \"Pending\",\n    totalAmount: \"$150.00\",\n    paymentMethod: \"PayPal\",\n  },\n  {\n    invoice: \"INV003\",\n    paymentStatus: \"Unpaid\",\n    totalAmount: \"$350.00\",\n    paymentMethod: \"Bank Transfer\",\n  },\n  {\n    invoice: \"INV004\",\n    paymentStatus: \"Paid\",\n    totalAmount: \"$450.00\",\n    paymentMethod: \"Credit Card\",\n  },\n  {\n    invoice: \"INV005\",\n    paymentStatus: \"Paid\",\n    totalAmount: \"$550.00\",\n    paymentMethod: \"PayPal\",\n  },\n  {\n    invoice: \"INV006\",\n    paymentStatus: \"Pending\",\n    totalAmount: \"$200.00\",\n    paymentMethod: \"Bank Transfer\",\n  },\n  {\n    invoice: \"INV007\",\n    paymentStatus: \"Unpaid\",\n    totalAmount: \"$300.00\",\n    paymentMethod: \"Credit Card\",\n  },\n]\n\nexport default function TableDemo() {\n  return (\n    <Table>\n      <TableCaption>A list of your recent invoices.</TableCaption>\n      <TableHeader>\n        <TableRow>\n          <TableHead className=\"w-[100px]\">Invoice</TableHead>\n          <TableHead>Status</TableHead>\n          <TableHead>Method</TableHead>\n          <TableHead className=\"text-right\">Amount</TableHead>\n        </TableRow>\n      </TableHeader>\n      <TableBody>\n        {invoices.map((invoice) => (\n          <TableRow key={invoice.invoice}>\n            <TableCell className=\"font-medium\">{invoice.invoice}</TableCell>\n            <TableCell>{invoice.paymentStatus}</TableCell>\n            <TableCell>{invoice.paymentMethod}</TableCell>\n            <TableCell className=\"text-right\">{invoice.totalAmount}</TableCell>\n          </TableRow>\n        ))}\n      </TableBody>\n    </Table>\n  )\n}\n```\n"
  },
  {
    "path": "cofounder/api/system/presets/ui/design/systems/shadcn/primitives/docs/tabs.mdx",
    "content": "Name : Tabs\nDescription : A set of layered sections of content—known as tab panels—that are displayed one at a time.\n\n---\n\n### import\n\n```\nimport { Tabs, TabsContent, TabsList, TabsTrigger } from \"@/components/ui/tabs\"\n```\n\n---\n\n### use\n\n```tabs.mdx\n<Tabs defaultValue=\"account\" className=\"w-[400px]\">\n  <TabsList>\n    <TabsTrigger value=\"account\">Account</TabsTrigger>\n    <TabsTrigger value=\"password\">Password</TabsTrigger>\n  </TabsList>\n  <TabsContent value=\"account\">Make changes to your account here.</TabsContent>\n  <TabsContent value=\"password\">Change your password here.</TabsContent>\n</Tabs>\n```\n\n---\n\n### examples\n\n```tabs-demo.tsx\nimport { Button } from \"@/components/ui/button\"\nimport {\n  Card,\n  CardContent,\n  CardDescription,\n  CardFooter,\n  CardHeader,\n  CardTitle,\n} from \"@/components/ui/card\"\nimport { Input } from \"@/components/ui/input\"\nimport { Label } from \"@/components/ui/label\"\nimport {\n  Tabs,\n  TabsContent,\n  TabsList,\n  TabsTrigger,\n} from \"@/components/ui/tabs\"\n\nexport default function TabsDemo() {\n  return (\n    <Tabs defaultValue=\"account\" className=\"w-[400px]\">\n      <TabsList className=\"grid w-full grid-cols-2\">\n        <TabsTrigger value=\"account\">Account</TabsTrigger>\n        <TabsTrigger value=\"password\">Password</TabsTrigger>\n      </TabsList>\n      <TabsContent value=\"account\">\n        <Card>\n          <CardHeader>\n            <CardTitle>Account</CardTitle>\n            <CardDescription>\n              Make changes to your account here. Click save when you're done.\n            </CardDescription>\n          </CardHeader>\n          <CardContent className=\"space-y-2\">\n            <div className=\"space-y-1\">\n              <Label htmlFor=\"name\">Name</Label>\n              <Input id=\"name\" defaultValue=\"Pedro Duarte\" />\n            </div>\n            <div className=\"space-y-1\">\n              <Label htmlFor=\"username\">Username</Label>\n              <Input id=\"username\" defaultValue=\"@peduarte\" />\n            </div>\n          </CardContent>\n          <CardFooter>\n            <Button>Save changes</Button>\n          </CardFooter>\n        </Card>\n      </TabsContent>\n      <TabsContent value=\"password\">\n        <Card>\n          <CardHeader>\n            <CardTitle>Password</CardTitle>\n            <CardDescription>\n              Change your password here. After saving, you'll be logged out.\n            </CardDescription>\n          </CardHeader>\n          <CardContent className=\"space-y-2\">\n            <div className=\"space-y-1\">\n              <Label htmlFor=\"current\">Current password</Label>\n              <Input id=\"current\" type=\"password\" />\n            </div>\n            <div className=\"space-y-1\">\n              <Label htmlFor=\"new\">New password</Label>\n              <Input id=\"new\" type=\"password\" />\n            </div>\n          </CardContent>\n          <CardFooter>\n            <Button>Save password</Button>\n          </CardFooter>\n        </Card>\n      </TabsContent>\n    </Tabs>\n  )\n}\n```\n"
  },
  {
    "path": "cofounder/api/system/presets/ui/design/systems/shadcn/primitives/docs/toggle.mdx",
    "content": "Name : Toggle\nDescription : A two-state button that can be either on or off.\n\n---\n\n### import\n\n```\nimport { Toggle } from \"@/components/ui/toggle\"\n```\n\n---\n\n### use\n\n```toggle.mdx\n<Toggle>Toggle</Toggle>\n```\n\n---\n\n### examples\n\n```toggle-demo.tsx\nimport { Bold } from \"lucide-react\"\n\nimport { Toggle } from \"@/components/ui/toggle\"\n\nexport default function ToggleDemo() {\n  return (\n    <Toggle aria-label=\"Toggle italic\">\n      <Bold className=\"h-4 w-4\" />\n    </Toggle>\n  )\n}\n```\n\n```toggle-disabled.tsx\nimport { Underline } from \"lucide-react\"\n\nimport { Toggle } from \"@/components/ui/toggle\"\n\nexport default function ToggleDisabled() {\n  return (\n    <Toggle aria-label=\"Toggle italic\" disabled>\n      <Underline className=\"h-4 w-4\" />\n    </Toggle>\n  )\n}\n```\n\n```toggle-lg.tsx\nimport { Italic } from \"lucide-react\"\n\nimport { Toggle } from \"@/components/ui/toggle\"\n\nexport default function ToggleLg() {\n  return (\n    <Toggle size=\"lg\" aria-label=\"Toggle italic\">\n      <Italic className=\"h-4 w-4\" />\n    </Toggle>\n  )\n}\n```\n\n```toggle-outline.tsx\nimport { Italic } from \"lucide-react\"\n\nimport { Toggle } from \"@/components/ui/toggle\"\n\nexport default function ToggleOutline() {\n  return (\n    <Toggle variant=\"outline\" aria-label=\"Toggle italic\">\n      <Italic className=\"h-4 w-4\" />\n    </Toggle>\n  )\n}\n```\n\n```toggle-sm.tsx\nimport { Italic } from \"lucide-react\"\n\nimport { Toggle } from \"@/components/ui/toggle\"\n\nexport default function ToggleSm() {\n  return (\n    <Toggle size=\"sm\" aria-label=\"Toggle italic\">\n      <Italic className=\"h-4 w-4\" />\n    </Toggle>\n  )\n}\n```\n\n```toggle-with-text.tsx\nimport { Italic } from \"lucide-react\"\n\nimport { Toggle } from \"@/components/ui/toggle\"\n\nexport default function ToggleWithText() {\n  return (\n    <Toggle aria-label=\"Toggle italic\">\n      <Italic className=\"mr-2 h-4 w-4\" />\n      Italic\n    </Toggle>\n  )\n}\n```\n"
  },
  {
    "path": "cofounder/api/system/presets/ui/design/systems/shadcn/primitives/docs/tooltip.mdx",
    "content": "Name : Tooltip\nDescription : A popup that displays information related to an element when the element receives keyboard focus or the mouse hovers over it.\n\n---\n\n### import\n\n```\nimport {\n  Tooltip,\n  TooltipContent,\n  TooltipProvider,\n  TooltipTrigger,\n} from \"@/components/ui/tooltip\"\n```\n\n---\n\n### use\n\n```tooltip.mdx\n<TooltipProvider>\n  <Tooltip>\n    <TooltipTrigger>Hover</TooltipTrigger>\n    <TooltipContent>\n      <p>Add to library</p>\n    </TooltipContent>\n  </Tooltip>\n</TooltipProvider>\n```\n\n---\n\n### examples\n\n```tooltip-demo.tsx\nimport { Button } from \"@/components/ui/button\"\nimport {\n  Tooltip,\n  TooltipContent,\n  TooltipProvider,\n  TooltipTrigger,\n} from \"@/components/ui/tooltip\"\n\nexport default function TooltipDemo() {\n  return (\n    <TooltipProvider>\n      <Tooltip>\n        <TooltipTrigger asChild>\n          <Button variant=\"outline\">Hover</Button>\n        </TooltipTrigger>\n        <TooltipContent>\n          <p>Add to library</p>\n        </TooltipContent>\n      </Tooltip>\n    </TooltipProvider>\n  )\n}\n```\n"
  },
  {
    "path": "cofounder/api/system/presets/ui/design/systems/shadcn/primitives/ontology.yaml",
    "content": "primitives:\n - id: heading_title\n   description: A primary heading for sectional content\n - id: heading_subtitle\n   description: A secondary heading for a subsection of content\n - id: text_line\n   description: A single line of text\n - id: text_paragraph\n   description: A block of paragraph text\n - id: button\n   description: Clickable element used to perform actions ; primary\n - id: button_secondary\n   description: Clickable element used to perform actions ; secondary\n - id: button_with_icon\n   description: Clickable element used to perform actions ; has both button text and icon\n - id: button_icon_only\n   description: Clickable element used to perform actions ; has icon only\n - id: link\n   description: A hyperlink pointing to another resource\n - id: badge\n   description: Displays a component that looks like a badge or tag\n - id: avatar\n   description: An image element for representing a user or brand, with a fallback to initials if the image is not loading\n   stretch: true\n - id: image\n   description: An element to display pictures or graphics\n   stretch: true\n - id: icon\n   description: A graphical representation of an idea, action, or object\n - id: input_label\n   description: A label associated with an input field to describe its purpose\n - id: input_description\n   description: An informational text describing an input field\n - id: input_field\n   description: An input area where the user can enter text\n   stretch: true\n - id: input_searchfield\n   description: An input field for search queries\n   stretch: true\n - id: input_textarea\n   description: An input field for entering multi-line text\n   stretch: true\n - id: input_combobox\n   description: Autocomplete input with a list of suggestions\n   stretch: true\n - id: input_radio\n   description: A control allowing the user to select one option from a group\n - id: input_select\n   description: A dropdown menu allowing the user to choose from a list of options\n   stretch: true\n - id: input_switch\n   description: A control allowing the user to toggle between two states\n - id: input_datepicker\n   description: A control allowing the user to select a date\n   stretch: true\n - id: input_checkbox\n   description: A control that allows the user to toggle between checked and not checked\n - id: table\n   description: A component to display data in a table format\n   stretch: true\n - id: accordion\n   description: Interactive headings that expand on tap to reveal their content\n #- id: card\n #  description: Displays a card with header, content, and footer elements; that can contain any content ; useful for repeated large card elements such as shopping products\n #  stretch: true\n - id: menu_bar\n   description: A menu to access different parts of the application\n - id: menu_navigation\n   description: A navigation menu to access different sections\n - id: pagination\n   description: A component for navigating different pages\n - id: tabs\n   description: A component for tabbed sections that allows to switch between different tabbed sections\n - id: toggle\n   description: A button that toggles between two states\n   stretch: true\n - id: bar_progress\n   description: A horizontal bar indicating progress toward completion\n   stretch: true\n - id: bar_slider\n   description: A control for selecting a value from a range\n   stretch: true\n - id: breadcrumbs\n   description: Displays the path to the current resource using a hierarchy of links\n - id: calendar_datepicker\n   description: A date field component that allows users to enter and edit a date\n - id: carousel_horizontal\n   description: A horizontal carousel for contained elements\n   stretch: true\n - id: carousel_vertical\n   description: A vertical carousel for contained elements\n   stretch: true\n - id: chart\n   description: Data-based chart component\n   stretch: true\n #- id: dialog_overlay_trigger_button\n #  description: A button that triggers an overlay component that has content (which renders the content underneath inert and displaying its content when triggered by the dialog trigger button)\n #  stretch: true\n - id: media\n   description: An element for embedding video or audio\n   stretch: true\n - id: rating_stars\n   description: A component for rating items with stars\n - id: tooltip\n   description: A small popup providing additional information about an element when it is hovered\n - id: container\n   description: An empty container on which sections are put\n   stretch: true\n - id: nonprimitive\n   description: A placeholder for non-primitive components that should be designed based on description\n   stretch: true\n"
  },
  {
    "path": "cofounder/api/system/structure/nodes/backend/asyncapi.yaml",
    "content": "nodes:\n BACKEND:ASYNCAPI::DEFINE:\n  desc: generate asyncAPI specs for realtime websockets (if applies)\n"
  },
  {
    "path": "cofounder/api/system/structure/nodes/backend/openapi.yaml",
    "content": "nodes:\n BACKEND:OPENAPI::DEFINE:\n  desc: generate asyncAPI specs for realtime websockets (if applies)\n"
  },
  {
    "path": "cofounder/api/system/structure/nodes/backend/server.yaml",
    "content": "nodes:\n BACKEND:SERVER::GENERATE:\n  desc: generate (initial) server.js ; with potential decorators for ie. external APIS for swarm modules to pick up\n"
  },
  {
    "path": "cofounder/api/system/structure/nodes/db/postgres.yaml",
    "content": "nodes:\n  DB:POSTGRES::GENERATE:\n    desc: make {DRB, db{schemas,seed} } details -> postgres exec commands to {create\n      tables , insert seed examples}\n    out:\n      - db\n"
  },
  {
    "path": "cofounder/api/system/structure/nodes/db/schemas.yaml",
    "content": "nodes:\n  DB:SCHEMAS::GENERATE:\n    desc: make {DRB}  -> db {schemas} ;; specify that for auth tables, password not\n      hashed ! for mockup\n    out:\n      - db\n"
  },
  {
    "path": "cofounder/api/system/structure/nodes/designer/layoutv1.yaml",
    "content": "# view:generate\n# view:iterate\n\nnodes:\n DESIGNER:LAYOUTV1::VIEW:GENERATE:\n  desc: \"\"\n DESIGNER:LAYOUTV1::VIEW:ITERATE:\n  desc: \"(maybe similar to generate but with frontend render attached ? still not sure)\"\n"
  },
  {
    "path": "cofounder/api/system/structure/nodes/op/convert.yaml",
    "content": "nodes:\n op:CONVERT::MARKDOWN:PDF:\n  desc: \"{markdown} -> {pdf {base64 , url(cloudstorage) } }\"\n"
  },
  {
    "path": "cofounder/api/system/structure/nodes/op/indexdb.yaml",
    "content": "nodes:\n op:INDEXDB::QUERY:\n  desc: \"query from vector db ; currently one local index, later more indices, from url\"\n  in:\n   - text\n   - vector\n   - amount\n  out:\n   - results\n"
  },
  {
    "path": "cofounder/api/system/structure/nodes/op/llm.yaml",
    "content": "nodes:\n op:LLM::GEN:\n  desc: \"{model,messages,preparser,parser,...} -> { response , tokens\n   (consumption) }\"\n  in:\n   - model\n   - messages\n   - preparser\n   - parser\n   - query\n   - stream\n  out:\n   - generated\n   - usage\n  queue:\n   concurrency: 2\n op:LLM::VECTORIZE:\n  desc: \"{texts} -> {vectors}\"\n  in:\n   - texts\n  out:\n   - vectors\n   - usage\n mapreduce: true\n op:LLM::VECTORIZE:CHUNK:\n  desc: \"{texts} -> {vectors}\"\n  in:\n   - texts\n  out:\n   - vectors\n   - usage\n  queue:\n   concurrency: 50\n op:LLM::DEBUG:SIMULATE:\n  desc: \"simulate llm streams for dev\"\n"
  },
  {
    "path": "cofounder/api/system/structure/nodes/op/project.yaml",
    "content": "nodes:\n op:PROJECT::STATE:LOAD:\n  desc: \"load project state ; local or network ; user/team and projectId should be inside context{}\"\n op:PROJECT::STATE:UPDATE:\n  desc: \"save project state, modularly\"\n op:PROJECT::STATE:SAVE:\n  desc: \"save project state, fully ; later preferably make backups before overwrite\"\n op:PROJECT::STATE:EXPORT:\n  desc: \"export project\"\n op:PROJECT::STATE:SETUP:\n  desc: \"export project\"\n"
  },
  {
    "path": "cofounder/api/system/structure/nodes/op/render.yaml",
    "content": "nodes:\n op:RENDER::LAYOUT:\n  desc: \"render either { view , section , block } using utils.render and svg stuff\"\n out:\n  - svg # the post processed svg { string , structure }\n  - image # the render image { base64 , url }\n queue:\n  concurrency: 50\n  retry: 1\n"
  },
  {
    "path": "cofounder/api/system/structure/nodes/pm/brd.yaml",
    "content": "nodes:\n PM:BRD::ANALYSIS:\n  desc: backend requirements doc\n  in:\n   - pm\n  out:\n   - pm\n   - backend\n"
  },
  {
    "path": "cofounder/api/system/structure/nodes/pm/drb.yaml",
    "content": "nodes:\n PM:DRD::ANALYSIS:\n  desc: make {userdetails,prd,frd,FJMD}  -> DRD analysis\n  out:\n   - pm\n"
  },
  {
    "path": "cofounder/api/system/structure/nodes/pm/fjmd.yaml",
    "content": "nodes:\n PM:FJMD::ANALYSIS:\n  desc: make {userdetails,prd,frd} -> FJMD analysis\n  in:\n   - pm\n  out:\n   - pm\n"
  },
  {
    "path": "cofounder/api/system/structure/nodes/pm/frd.yaml",
    "content": "nodes:\n PM:FRD::ANALYSIS:\n  desc: make {userdetails,prd} -> FRD analysis\n  in:\n   - pm\n  out:\n   - pm\n"
  },
  {
    "path": "cofounder/api/system/structure/nodes/pm/prd.yaml",
    "content": "nodes:\n PM:PRD::ANALYSIS:\n  desc: make userprovided details -> PRD analysis ; user can have text + {pdf ,\n   images} (now just text), later extend\n  in:\n   - pm\n  out:\n   - pm\n"
  },
  {
    "path": "cofounder/api/system/structure/nodes/pm/uxdmd.yaml",
    "content": "nodes:\n PM:UXDMD::ANALYSIS:\n  desc: \"{pm docs , db , openapi? , uxsitemap {analysis,struct,...}?} -> (<>\n   crossanalysis) to make UX Datamap Doc\"\n  out:\n   - pm\n"
  },
  {
    "path": "cofounder/api/system/structure/nodes/pm/uxsmd.yaml",
    "content": "nodes:\n PM:UXSMD::ANALYSIS:\n  desc: \"{pm docs , db , openapi?} -> (<> crossanalysis) to make UX Sitemap doc\"\n  out:\n   - pm\n"
  },
  {
    "path": "cofounder/api/system/structure/nodes/swarm/augment.yaml",
    "content": "# externalapis\n# packagedocs ? in case swarm modules need it\n\nnodes:\n SWARM:AUGMENT::BACKEND:EXTERNALAPIS:\n  desc: \"\"\n"
  },
  {
    "path": "cofounder/api/system/structure/nodes/swarm/fix.yaml",
    "content": "# fix : backend\n# fix : webapp\n\nnodes:\n SWARM:FIX::BACKEND:\n  desc: \"\"\n SWARM:FIX::WEBAPP:\n  desc: \"\"\n"
  },
  {
    "path": "cofounder/api/system/structure/nodes/swarm/review.yaml",
    "content": "nodes:\n SWARM:REVIEW::SERVER:MAIN:\n  desc: \"\"\n SWARM:REVIEW::WEBAPP:STORE:\n  desc: \"\"\n SWARM:REVIEW::WEBAPP:ROOT:\n  desc: \"\"\n SWARM:REVIEW::WEBAPP:VIEW:\n  desc: \"\"\n"
  },
  {
    "path": "cofounder/api/system/structure/nodes/ux/datamap.yaml",
    "content": "nodes:\n UX:DATAMAP::STRUCTURE:\n  desc: \"{...} -> app {routes, slugs, params , views} ; yaml ;; preconsider layout stuff too, either here or in sitemap\"\n  out:\n   - uxdatamap\n UX:DATAMAP::VIEWS:\n  desc: \"{ ... } -> sections details with props & schemas ; yaml ;; preconsider layout stuff too, either here or in sitemap\"\n  out:\n   - uxdatamap\n  mapreduce: true\n UX:DATAMAP::VIEWS:CHUNK:\n  desc: \"chunk processor for ux:datamap:views\"\n  out:\n   - views\n"
  },
  {
    "path": "cofounder/api/system/structure/nodes/ux/sitemap.yaml",
    "content": "nodes:\n UX:SITEMAP::STRUCTURE:\n  desc: \"{pm docs , db , openapi?, UXSMD} -> base uxsitemap {structure} : determines views; {normal,specialized,shared} ...\"\n  out:\n   - uxsitemap\n UX:SITEMAP::VIEWS:\n  desc: \"{ ... } -> uxsitemap{...,views} ; details views more + details views' sections etc ; later, incorporate some RAG on which to base descriptions ? either here or further cascaded down the chain\"\n  out:\n   - uxsitemap\n  mapreduce: true\n UX:SITEMAP::VIEWS:NORMAL:\n  desc: \"chunk processing from UX:SITEMAP::VIEWS ; for normal views\"\n  out:\n   - views\n UX:SITEMAP::VIEWS:SPECIAL:\n  desc:\n   \"chunk processing from UX:SITEMAP::VIEWS; specialized processors for special sections ; ie. landing would be based\n   on some highconversion process etc;\"\n  out:\n   - views\n UX:SITEMAP::VIEWS:SHARED:\n  desc: \"chunk processing from UX:SITEMAP::VIEWS ; for shared views implementations\"\n  out:\n   - views\n"
  },
  {
    "path": "cofounder/api/system/structure/nodes/webapp/root.yaml",
    "content": "nodes:\n WEBAPP:ROOT::GENERATE:\n  desc: \"\"\n"
  },
  {
    "path": "cofounder/api/system/structure/nodes/webapp/store.yaml",
    "content": "nodes:\n WEBAPP:STORE::GENERATE:\n  desc: \"\"\n"
  },
  {
    "path": "cofounder/api/system/structure/nodes/webapp/view.yaml",
    "content": "# generate\n# redesign\n# iterate\n\nnodes:\n WEBAPP:VIEW::GENERATE:MULTI:\n  desc: \"\"\n WEBAPP:VIEW::GENERATE:\n  desc: \"\"\n WEBAPP:VIEW::REDESIGN:\n  desc: \"\"\n WEBAPP:VIEW::ITERATE:\n  desc: \"\"\n"
  },
  {
    "path": "cofounder/api/system/structure/sequences/projectInit.yaml",
    "content": "sequences:\n \"seq:project:init:v1\":\n  desc: \"user creates project with initial set of details{}, builds different layers until app generated\"\n  nodes:\n   ## init app folders (if export enabled)\n   - op:PROJECT::STATE:SETUP\n\n   # product management layer\n   - PM:PRD::ANALYSIS\n   - PM:FRD::ANALYSIS\n   - PM:DRD::ANALYSIS\n   - PM:UXSMD::ANALYSIS\n\n   # db layer\n   - DB:SCHEMAS::GENERATE\n   - DB:POSTGRES::GENERATE\n\n   # product management layer\n   - PM:BRD::ANALYSIS\n\n   # backend layer\n   - BACKEND:OPENAPI::DEFINE # in case backend.requirements?.restApi?.required\n   - BACKEND:ASYNCAPI::DEFINE # in case backend.requirements?.realtimeWebsockets?.required\n   - BACKEND:SERVER::GENERATE\n\n   # product management layer\n   - PM:UXDMD::ANALYSIS\n\n   # ux structure layer\n   - UX:SITEMAP::STRUCTURE\n   - UX:DATAMAP::STRUCTURE\n   - UX:DATAMAP::VIEWS\n\n   # webapp & designer layer\n   - WEBAPP:STORE::GENERATE # -> in it, calls swarm/review ?\n   - WEBAPP:ROOT::GENERATE # -> in it, calls swarm/review ?\n   - WEBAPP:VIEW::GENERATE:MULTI # -> in it, calls swarm/review ? -> if process.env.DESIGNER || in task.passes , calls designer\n\n  relations:\n   parents: # child node -> parent node rels\n    # product management layer\n    PM:PRD::ANALYSIS: [\"op:PROJECT::STATE:SETUP\"]\n    PM:FRD::ANALYSIS: [\"PM:PRD::ANALYSIS\"]\n    PM:DRD::ANALYSIS: [\"PM:FRD::ANALYSIS\"]\n\n    # db layer\n    DB:SCHEMAS::GENERATE: [\"PM:DRD::ANALYSIS\"]\n    DB:POSTGRES::GENERATE: [\"DB:SCHEMAS::GENERATE\"]\n\n    # product management layer\n    PM:BRD::ANALYSIS: [\"DB:POSTGRES::GENERATE\"]\n\n    # backend layer :\n    BACKEND:OPENAPI::DEFINE: [\"PM:BRD::ANALYSIS\"]\n    BACKEND:ASYNCAPI::DEFINE: [\"PM:BRD::ANALYSIS\"]\n    BACKEND:SERVER::GENERATE:\n     [\"BACKEND:OPENAPI::DEFINE\", \"BACKEND:ASYNCAPI::DEFINE\"]\n\n    # product management layer\n    PM:UXSMD::ANALYSIS: [\"PM:FRD::ANALYSIS\"]\n    PM:UXDMD::ANALYSIS: [\"PM:UXSMD::ANALYSIS\", \"BACKEND:SERVER::GENERATE\"]\n\n    # ux structure layer\n    UX:SITEMAP::STRUCTURE: [\"PM:UXSMD::ANALYSIS\"]\n    UX:DATAMAP::STRUCTURE: [\"PM:UXDMD::ANALYSIS\"]\n    UX:DATAMAP::VIEWS: [\"UX:SITEMAP::STRUCTURE\", \"UX:DATAMAP::STRUCTURE\"]\n\n    # webapp & designer layer\n    WEBAPP:STORE::GENERATE: [\"UX:DATAMAP::VIEWS\"]\n    WEBAPP:ROOT::GENERATE: [\"WEBAPP:STORE::GENERATE\"]\n    WEBAPP:VIEW::GENERATE:MULTI: [\"WEBAPP:ROOT::GENERATE\"]\n"
  },
  {
    "path": "cofounder/api/system/structure/sequences/projectResume.yaml.bak",
    "content": "sequences:\n \"seq:project:init:v1:resume\":\n  desc: \"(for debug purposes) resume at various steps\"\n  nodes:\n   ## init app folders (if export enabled)\n   #- op:PROJECT::STATE:SETUP\n\n   # product management layer\n   #- PM:PRD::ANALYSIS\n   #- PM:FRD::ANALYSIS\n   #- PM:DRD::ANALYSIS\n   #- PM:UXSMD::ANALYSIS\n\n   # db layer\n   #- DB:SCHEMAS::GENERATE\n   #- DB:POSTGRES::GENERATE\n\n   # product management layer\n   #- PM:BRD::ANALYSIS\n\n   # backend layer\n   #- BACKEND:OPENAPI::DEFINE # in case backend.requirements?.restApi?.required\n   #- BACKEND:ASYNCAPI::DEFINE # in case backend.requirements?.realtimeWebsockets?.required\n   #- BACKEND:SERVER::GENERATE\n\n   # product management layer\n   #- PM:UXDMD::ANALYSIS\n\n   # ux structure layer\n   #- UX:SITEMAP::STRUCTURE\n   #- UX:DATAMAP::STRUCTURE\n   #- UX:DATAMAP::VIEWS\n\n   # webapp & designer layer\n   #- WEBAPP:STORE::GENERATE # -> in it, calls swarm/review ?\n   - WEBAPP:ROOT::GENERATE # -> in it, calls swarm/review ?\n   - WEBAPP:VIEW::GENERATE:MULTI # -> in it, calls swarm/review ? -> if process.env.DESIGNER || in task.passes , calls designer\n\n  relations:\n   parents: # child node -> parent node rels\n    # product management layer\n    PM:PRD::ANALYSIS: [\"op:PROJECT::STATE:SETUP\"]\n    PM:FRD::ANALYSIS: [\"PM:PRD::ANALYSIS\"]\n    PM:DRD::ANALYSIS: [\"PM:FRD::ANALYSIS\"]\n\n    # db layer\n    DB:SCHEMAS::GENERATE: [\"PM:DRD::ANALYSIS\"]\n    DB:POSTGRES::GENERATE: [\"DB:SCHEMAS::GENERATE\"]\n\n    # product management layer\n    PM:BRD::ANALYSIS: [\"DB:POSTGRES::GENERATE\"]\n\n    # backend layer :\n    BACKEND:OPENAPI::DEFINE: [\"PM:BRD::ANALYSIS\"]\n    BACKEND:ASYNCAPI::DEFINE: [\"PM:BRD::ANALYSIS\"]\n    BACKEND:SERVER::GENERATE:\n     [\"BACKEND:OPENAPI::DEFINE\", \"BACKEND:ASYNCAPI::DEFINE\"]\n\n    # product management layer\n    PM:UXSMD::ANALYSIS: [\"PM:FRD::ANALYSIS\"]\n    PM:UXDMD::ANALYSIS: [\"PM:UXSMD::ANALYSIS\", \"BACKEND:SERVER::GENERATE\"]\n\n    # ux structure layer\n    UX:SITEMAP::STRUCTURE: [\"PM:UXSMD::ANALYSIS\"]\n    UX:DATAMAP::STRUCTURE: [\"PM:UXDMD::ANALYSIS\"]\n    UX:DATAMAP::VIEWS: [\"UX:SITEMAP::STRUCTURE\", \"UX:DATAMAP::STRUCTURE\"]\n\n    # webapp & designer layer\n    WEBAPP:STORE::GENERATE: [\"UX:DATAMAP::VIEWS\"]\n    WEBAPP:ROOT::GENERATE: [\"WEBAPP:STORE::GENERATE\"]\n    WEBAPP:VIEW::GENERATE:MULTI: [\"WEBAPP:ROOT::GENERATE\"]\n"
  },
  {
    "path": "cofounder/api/utils/anthropic.js",
    "content": "import Anthropic from \"@anthropic-ai/sdk\";\nimport dotenv from \"dotenv\";\ndotenv.config();\nconst anthropic = new Anthropic();\n\nasync function _convertFromOpenaiFormat({ messages }) {\n\tconst newMessages = (\n\t\tawait Promise.all(\n\t\t\tmessages.slice(1).map(async (m) => {\n\t\t\t\tif (typeof m.content === \"string\") {\n\t\t\t\t\treturn [{ type: \"text\", text: m.content }];\n\t\t\t\t}\n\t\t\t\treturn (\n\t\t\t\t\tawait Promise.all(\n\t\t\t\t\t\tm.content.map(async (item) => {\n\t\t\t\t\t\t\tif (item.type === \"text\") return item;\n\t\t\t\t\t\t\tconst { url } = item.image_url;\n\t\t\t\t\t\t\tif (url.includes(\";base64,\")) {\n\t\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t\ttype: \"image\",\n\t\t\t\t\t\t\t\t\tsource: {\n\t\t\t\t\t\t\t\t\t\ttype: \"base64\",\n\t\t\t\t\t\t\t\t\t\tmedia_type: url.split(\";base64,\")[0].split(\"data:\")[1],\n\t\t\t\t\t\t\t\t\t\tdata: url.split(\";base64,\")[1],\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (url.includes(\"http\")) {\n\t\t\t\t\t\t\t\tconst response = await fetch(url);\n\t\t\t\t\t\t\t\tconst buffer = await response.arrayBuffer();\n\t\t\t\t\t\t\t\tconst base64String = Buffer.from(buffer).toString(\"base64\");\n\t\t\t\t\t\t\t\tconst mediaType = response.headers.get(\"content-type\");\n\t\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t\ttype: \"image\",\n\t\t\t\t\t\t\t\t\tsource: {\n\t\t\t\t\t\t\t\t\t\ttype: \"base64\",\n\t\t\t\t\t\t\t\t\t\tmedia_type: mediaType,\n\t\t\t\t\t\t\t\t\t\tdata: base64String,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t// else fetch url and convert\n\t\t\t\t\t\t}),\n\t\t\t\t\t)\n\t\t\t\t).filter((e) => e);\n\t\t\t}),\n\t\t)\n\t)\n\t\t.filter((e) => e)\n\t\t.flat();\n\n\treturn {\n\t\tsystem: messages[0].content,\n\t\tmessages: [\n\t\t\t{\n\t\t\t\trole: `user`,\n\t\t\t\tcontent: newMessages,\n\t\t\t},\n\t\t],\n\t};\n}\n\nasync function inference({\n\tmodel = \"claude-3-5-sonnet-20240620\",\n\tmessages,\n\tstream = process.stdout,\n}) {\n\t// messages are in openai format , need conversion\n\tconst converted = await _convertFromOpenaiFormat({ messages });\n\t// console.dir({ \"debug:utils:anthropic\": {messages : converted.messages} } , {depth:null})\n\n\tconst _model = model.includes(\"gpt\") ? \"claude-3-5-sonnet-20240620\" : model;\n\tconst streaming = await anthropic.messages.create({\n\t\tmodel: _model,\n\t\tstream: true,\n\t\tsystem: converted.system,\n\t\tmax_tokens: 8192,\n\t\tmessages: converted.messages,\n\t});\n\n\tlet text = \"\";\n\tlet usage = {};\n\tlet cutoff_reached = false;\n\tlet chunks_buffer = \"\";\n\tlet chunks_iterator = 0;\n\tconst chunks_every = 5;\n\tfor await (const event of streaming) {\n\t\tif (\n\t\t\tevent.type === \"content_block_delta\" &&\n\t\t\tevent.delta.type === \"text_delta\"\n\t\t) {\n\t\t\tconst content = event.delta.text;\n\t\t\tif (content) {\n\t\t\t\ttext += content;\n\t\t\t\tchunks_buffer += content;\n\t\t\t\tchunks_iterator++;\n\t\t\t\tif (stream?.cutoff) {\n\t\t\t\t\tif (!cutoff_reached && text.includes(stream.cutoff)) {\n\t\t\t\t\t\tcutoff_reached = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!(chunks_iterator % chunks_every)) {\n\t\t\t\t\tstream.write(!cutoff_reached ? chunks_buffer : \" ...\");\n\t\t\t\t\tchunks_buffer = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tstream.write(\"\\n\");\n\n\treturn {\n\t\ttext,\n\t\tusage: { model: _model, ...usage },\n\t};\n}\n\nexport default {\n\tinference,\n};\n"
  },
  {
    "path": "cofounder/api/utils/firebase.js",
    "content": "import { initializeApp, applicationDefault, cert } from \"firebase-admin/app\";\nimport { getFirestore } from \"firebase-admin/firestore\";\nimport * as admin from \"firebase-admin\";\nimport { readFileSync } from \"fs\";\nimport path from \"path\";\nimport dotenv from \"dotenv\";\ndotenv.config();\n// Initialize Firebase\nlet db;\n\ntry {\n\tif (process.env.STATE_CLOUD && process.env.FIREBASE_SERVICE_KEY_PATH?.length) {\n\t\tinitializeApp({\n\t\t\tcredential: cert(\n\t\t\t\tJSON.parse(\n\t\t\t\t\treadFileSync(\n\t\t\t\t\t\tpath.resolve(process.env.FIREBASE_SERVICE_KEY_PATH || \"\"),\n\t\t\t\t\t\t\"utf8\",\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t});\n\t}\n} catch (error) {\n\tconsole.error({ \"utils:firebase\": error });\n}\n\ntry {\n\tdb = getFirestore();\n} catch (e) {\n\tfalse;\n}\n\n// Function to load a collection\nasync function loadCollection({ path }) {\n\tconst snapshot = await db.collection(path).get();\n\treturn {\n\t\tdocs: snapshot.docs.map((doc) => ({ id: doc.id, ...doc.data() })),\n\t};\n}\n\nasync function deleteCollection({ path }) {\n\tconst collectionRef = db.collection(path);\n\tconst snapshot = await collectionRef.get();\n\n\tconst batch = admin.firestore().batch();\n\tsnapshot.docs.forEach((doc) => {\n\t\tbatch.delete(doc.ref);\n\t});\n\n\tawait batch.commit();\n}\n\n// Function to load a document\nasync function loadDocument({ path }) {\n\tconsole.dir({ \"utils:firebase:doc:get\": { path } });\n\tconst doc = await db.doc(path).get();\n\tif (!doc.exists) {\n\t\tthrow new Error(\"Document not found\");\n\t}\n\treturn { id: doc.id, ...doc.data() };\n}\n\n// Function to write a new document\nasync function writeDocument({ path, data }) {\n\tconsole.dir({ \"utils:firebase:doc:write\": { path, data } });\n\tawait db.doc(path).set(data);\n}\n\n// Function to update a document\nasync function updateDocument({ path, data, merge = false }) {\n\tconsole.dir({ \"utils:firebase:doc:update\": { path, data } });\n\tawait db.doc(path).set(data, { merge });\n}\n\n// Function to delete a document\nasync function deleteDocument({ path }) {\n\tconsole.dir({ \"utils:firebase:doc:delete\": { path } });\n\tawait db.doc(path).delete();\n}\n\nexport default {\n\tcollection: {\n\t\tget: loadCollection,\n\t\tdelete: deleteCollection,\n\t},\n\tdoc: {\n\t\tget: loadDocument,\n\t\twrite: writeDocument,\n\t\tupdate: updateDocument,\n\t\tdelete: deleteDocument,\n\t},\n};\n"
  },
  {
    "path": "cofounder/api/utils/index.js",
    "content": "import parsers from \"@/utils/parsers.js\";\nimport openai from \"@/utils/openai.js\";\nimport vectra from \"@/utils/vectra.js\";\nimport render from \"@/utils/render.js\";\nimport firebase from \"@/utils/firebase.js\";\nimport storage from \"@/utils/storage.js\";\nimport load from \"@/utils/load.js\";\nimport anthropic from \"@/utils/anthropic.js\";\n\nexport default {\n\tparsers,\n\topenai,\n\tanthropic,\n\tvectra,\n\trender,\n\tfirebase,\n\tstorage,\n\tload,\n};\n"
  },
  {
    "path": "cofounder/api/utils/load.js",
    "content": "import fs from \"fs\";\nimport yaml from \"yaml\";\nimport path from \"path\";\nimport { merge } from \"lodash-es\";\nimport utils from \"@/utils/index.js\";\nimport pqueue from \"p-queue\";\n\nasync function readLocal({ project }) {\n\t/*\n    with root dir being : ./db/projects/{project}\n    read all yaml files (including deeply nested etc) ; all objects in yaml files contain { key , data }\n    return this :\n    db : [\n      {key , data , },\n      {key , data , },\n      {key , data , },\n      {key , data , },\n    ]\n    \n    file/dir operations should be sync\n  */\n\tlet db = [];\n\tconst dir = `./db/projects/${project}`;\n\tconst files = fs.readdirSync(dir);\n\tawait Promise.all(\n\t\tfiles.map(async (file) => {\n\t\t\tconst fullPath = path.join(dir, file);\n\t\t\tconst stat = fs.statSync(fullPath);\n\t\t\tif (stat.isDirectory()) {\n\t\t\t\t// Recursively read directories if needed\n\t\t\t\tconst nestedDb = await readLocal({ project: path.join(project, file) });\n\t\t\t\tdb.push(...nestedDb);\n\t\t\t} else if (file.endsWith(\".yaml\") || file.endsWith(\".yml\")) {\n\t\t\t\tconst fileContent = fs.readFileSync(fullPath, \"utf8\");\n\t\t\t\tconst parsedData = yaml.parse(fileContent);\n\t\t\t\tdb.push({ key: parsedData.key, data: parsedData.data });\n\t\t\t}\n\t\t}),\n\t);\n\treturn db;\n}\n\nasync function loadLocal({ project, deconstructed = false }) {\n\tconst db = await readLocal({ project });\n\tlet state = {};\n\t/*\n    example of db -\n    db : [\n      {\n        key: \"example.some.nested.key\"\n        data: {\n          value: \"example\",\n          othervalue: \"someotherexample\",\n        },\n      },\n      {\n        key: \"whatever.haha\"\n        data: 99,\n      },\n    ]\n  */\n\t/*\n    expected returned by function is -\n    state : {\n      example: {\n        some : {\n          nested : {\n            key : {\n              value: \"example\",\n              othervalue: \"someotherexample\",\n            }\n          }\n        }\n      },\n      whatever: {\n        haha: 99\n      },\n    }\n  */\n\t/*\n    + write function that goes through all db items ; uses the \"key\" field and \"data\" content to build the object\n    + should consider making keys that do not exist in the path, and also make user of merge from es-lodash (already imported in this module) for deep merging\n    + consider that \"data\" field value can either be an object or a primitive \n  */\n\tdb.forEach(({ key, data }) => {\n\t\tconst keys = key.split(\".\");\n\t\tlet current = state;\n\n\t\tkeys.forEach((k, index) => {\n\t\t\tif (!current[k]) {\n\t\t\t\tcurrent[k] = index === keys.length - 1 ? data : {};\n\t\t\t} else if (index === keys.length - 1) {\n\t\t\t\tcurrent[k] = merge(current[k], data);\n\t\t\t}\n\t\t\tcurrent = current[k];\n\t\t});\n\t});\n\tif (!deconstructed) return state;\n\tconst keymap = Object.fromEntries(db.map(({ key, data }) => [key, data]));\n\treturn { state, keymap };\n}\n\nasync function readCloud({ project }) {\n\tconst queue = new pqueue({\n\t\tconcurrency: 20,\n\t});\n\tlet db = [];\n\tconst paths = {\n\t\tdocs: [\n\t\t\t\"pm/user/details\",\n\t\t\t\"pm/docs/ard\",\n\t\t\t\"pm/docs/drd\",\n\t\t\t\"pm/docs/fjmd\",\n\t\t\t\"pm/docs/frd\",\n\t\t\t\"pm/docs/prd\",\n\t\t\t\"pm/docs/uxdmd\",\n\t\t\t\"pm/docs/uxsmd\",\n\t\t\t\"architecture/uxsitemap/structure\",\n\t\t\t\"architecture/uxdatamap/structure\",\n\t\t\t\"architecture/uxdatamap/views\",\n\t\t\t\"api/openapi/structure\",\n\t\t\t\"api/openapi/components\",\n\t\t\t\"db/mock/schemas\",\n\t\t\t\"db/mock/seed\",\n\t\t\t\"db/mock/postgres\",\n\t\t\t\"settings/preferences/versions\",\n\t\t],\n\t\tcollections: [\n\t\t\t{ path: `api/operations`, sub: false },\n\t\t\t{ path: `ui/layout/mockup/views`, sub: `versions` },\n\t\t\t{ path: `ui/layout/mockup/sections`, sub: `versions` },\n\t\t\t{ path: `ui/code/react/stores`, sub: `versions` },\n\t\t\t{ path: `ui/code/react/root`, sub: `versions` },\n\t\t\t{ path: `ui/code/react/views`, sub: `versions` },\n\t\t\t{ path: `ui/code/react/sections`, sub: `versions` },\n\t\t],\n\t};\n\n\tawait Promise.all(\n\t\tpaths.docs.map(async (doc) => {\n\t\t\tawait queue.add(async () => {\n\t\t\t\ttry {\n\t\t\t\t\tconst docData = await utils.firebase.doc.get({\n\t\t\t\t\t\tpath: `/db/userdata/projects/${project}/state/${doc}`,\n\t\t\t\t\t});\n\t\t\t\t\tdb.push(docData);\n\t\t\t\t} catch (e) {\n\t\t\t\t\tconsole.log(e);\n\t\t\t\t}\n\t\t\t});\n\t\t}),\n\t);\n\n\tawait Promise.all(\n\t\tpaths.collections.map(async (col) => {\n\t\t\tconst { path, sub } = col;\n\t\t\tif (!sub) {\n\t\t\t\tawait queue.add(async () => {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst { docs } = await utils.firebase.collection.get({\n\t\t\t\t\t\t\tpath: `/db/userdata/projects/${project}/state/${path}`,\n\t\t\t\t\t\t});\n\t\t\t\t\t\tdb.push(...docs);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tconsole.log(e);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\ttry {\n\t\t\t\t\tconst { docs } = await utils.firebase.collection.get({\n\t\t\t\t\t\tpath: `/db/userdata/projects/${project}/state/${path}`,\n\t\t\t\t\t});\n\t\t\t\t\tdocs.map((doc) => {\n\t\t\t\t\t\tif (doc.data && doc.key) db.push(doc);\n\t\t\t\t\t});\n\t\t\t\t\tawait Promise.all(\n\t\t\t\t\t\tdocs.map(async (rootDoc) => {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tconst subResponse = await utils.firebase.collection.get({\n\t\t\t\t\t\t\t\t\tpath: `/db/userdata/projects/${project}/state/${path}/${rootDoc.id}/${sub}`,\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\tdb.push(...subResponse.docs);\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\tconsole.log(err);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}),\n\t\t\t\t\t);\n\t\t\t\t} catch (e) {\n\t\t\t\t\tconsole.log(e);\n\t\t\t\t}\n\t\t\t}\n\t\t}),\n\t);\n\n\treturn db.filter((item) => item.key && item.data);\n}\nasync function loadCloud({ project }) {\n\t/*\n  \n  fs.writeFileSync(\n    \"./dump/_dbFromLoadDebug.yml\",\n    yaml.stringify(db)\n    )\n    */\n\t/*\n  const db = yaml.parse(fs.readFileSync(\"./dump/_dbFromLoadDebug.yml\",\"utf8\").toString())\n  console.dir(\"op:project:load:cloud:debug  - loading from local\")\n  */\n\tconst db = JSON.parse(JSON.stringify(await readCloud({ project })));\n\tconst state = {};\n\tdb.forEach(({ key, data }) => {\n\t\tconst keys = key.split(\".\");\n\t\tlet current = state;\n\n\t\tkeys.forEach((k, index) => {\n\t\t\tif (!current[k]) {\n\t\t\t\tcurrent[k] = index === keys.length - 1 ? data : {};\n\t\t\t} else if (index === keys.length - 1) {\n\t\t\t\tcurrent[k] = merge(current[k], data);\n\t\t\t}\n\t\t\tcurrent = current[k];\n\t\t});\n\t});\n\n\treturn state;\n}\n\nexport default {\n\tlocal: loadLocal,\n\tcloud: loadCloud,\n};\n"
  },
  {
    "path": "cofounder/api/utils/openai.js",
    "content": "import fs from \"fs\";\nimport OpenAI from \"openai\";\nimport dotenv from \"dotenv\";\ndotenv.config();\n\nlet openai;\ntry {\n\topenai = new OpenAI({\n\t\tapiKey: process.env.OPENAI_API_KEY,\n\t});\n} catch (e) {\n\tconsole.error(\"utils:openai : \" + e);\n}\n\nasync function inference({\n\tmodel = `gpt-4o-mini`,\n\tmessages,\n\tstream = process.stdout,\n}) {\n\tconst streaming = await openai.chat.completions.create({\n\t\tmodel,\n\t\tmessages,\n\t\tstream: true,\n\t\tstream_options: { include_usage: true },\n\t});\n\n\tlet text = \"\";\n\tlet usage = {};\n\tlet cutoff_reached = false;\n\tlet chunks_buffer = \"\";\n\tlet chunks_iterator = 0;\n\tconst chunks_every = 5;\n\tfor await (const chunk of streaming) {\n\t\tconst content = chunk.choices[0]?.delta?.content || \"\";\n\t\tif (content) {\n\t\t\ttext += content;\n\t\t\tchunks_buffer += content;\n\t\t\tchunks_iterator++;\n\t\t\tif (stream?.cutoff) {\n\t\t\t\tif (!cutoff_reached && text.includes(stream.cutoff)) {\n\t\t\t\t\tcutoff_reached = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!(chunks_iterator % chunks_every)) {\n\t\t\t\tstream.write(!cutoff_reached ? chunks_buffer : \" ...\");\n\t\t\t\tchunks_buffer = \"\";\n\t\t\t}\n\t\t}\n\t\tif (chunk.usage) usage = { ...chunk.usage };\n\t}\n\tstream.write(`\\n`);\n\n\treturn {\n\t\ttext,\n\t\tusage: { model, ...usage },\n\t};\n}\nasync function vectorize({\n\ttexts,\n\tmodel = process.env.EMBEDDING_MODEL || `text-embedding-3-small`,\n}) {\n\tconst response = await openai.embeddings.create({\n\t\tmodel,\n\t\tinput: texts,\n\t\tencoding_format: \"float\",\n\t});\n\treturn {\n\t\tvectors: response.data\n\t\t\t.sort((a, b) => a.index - b.index)\n\t\t\t.map((e) => e.embedding),\n\t\tusage: { model, ...response.usage },\n\t};\n}\n\nasync function transcribe({ path }) {\n\tconsole.dir({ \"debug:utils:openai:transcribe:received\": { path } });\n\tconst response = await openai.audio.transcriptions.create({\n\t\tfile: fs.createReadStream(path),\n\t\tmodel: \"whisper-1\",\n\t});\n\tconsole.dir({ \"debug:utils:openai:transcribe\": { path, response } });\n\treturn {\n\t\ttranscript: response.text,\n\t};\n}\n\nexport default {\n\tinference,\n\tvectorize,\n\ttranscribe,\n};\n"
  },
  {
    "path": "cofounder/api/utils/parsers.js",
    "content": "import yaml from \"yaml\";\n\nasync function extractBackticks({ text }) {\n\ttry {\n\t\tconst lines = text.split(\"\\n\");\n\t\tconst firstLineWithBackticksIndex = lines.findIndex((line) =>\n\t\t\tline.includes(\"```\"),\n\t\t);\n\t\tconst lastBackticksIndex =\n\t\t\tlines.length -\n\t\t\t1 -\n\t\t\tlines\n\t\t\t\t.slice()\n\t\t\t\t.reverse()\n\t\t\t\t.findIndex((line) => line.includes(\"```\"));\n\t\tif (\n\t\t\tfirstLineWithBackticksIndex === -1 ||\n\t\t\tlastBackticksIndex === -1 ||\n\t\t\tlastBackticksIndex <= firstLineWithBackticksIndex\n\t\t) {\n\t\t\tthrow new Error(\"> invalid : no backticks found\");\n\t\t}\n\t\tconst extractedContent = lines\n\t\t\t.slice(firstLineWithBackticksIndex + 1, lastBackticksIndex)\n\t\t\t.join(\"\\n\")\n\t\t\t.trim();\n\t\treturn { text: extractedContent };\n\t} catch (error) {\n\t\tconsole.error(\"utils/parsers:extractAndParse:error\", error);\n\t\treturn null;\n\t}\n}\nasync function extractBackticksMultiple({ text, delimiters }) {\n\ttry {\n\t\tlet found = {};\n\t\tlet cursor = 0;\n\t\tconst lines = text.split(\"\\n\");\n\t\tfor (let delim of delimiters) {\n\t\t\tconst firstLine = lines\n\t\t\t\t.slice(cursor)\n\t\t\t\t.findIndex((line) => line.includes(`\\`\\`\\`${delim}`));\n\t\t\tconst textFromFirstLine = lines.slice(cursor).slice(firstLine);\n\t\t\tconst lastLine = textFromFirstLine\n\t\t\t\t.slice(1)\n\t\t\t\t.findIndex((line) => line.includes(\"```\"));\n\t\t\t// console.dir({ __debug__utils_parsers_backticksmultiple: `\\`\\`\\`${delim}`, textFromFirstLine, lastLine })\n\t\t\tfound[delim] = textFromFirstLine.slice(1, lastLine + 1).join(`\\n`);\n\t\t\tcursor = lastLine - 1;\n\t\t}\n\t\treturn found;\n\t} catch (error) {\n\t\tconsole.error(\"utils/parsers:extractAndParse:error\", error);\n\t\treturn null;\n\t}\n}\n\nasync function parseYaml({ generated, query }) {\n\tconst { text } = generated;\n\treturn yaml.parse(text);\n}\n\nasync function editGenUi({ tsx }) {\n\t// replace with p0 frontend editing blocks\n\t// (handles iterating on components in live view , and functionalities like screenshot passed into api etc ...)\n\tconst genUi = {\n\t\tsections: false,\n\t\tviews: false,\n\t};\n\tlet newTsx = tsx\n\t\t.split(`\\n`)\n\t\t.filter((line) => {\n\t\t\tif (line.includes(`@/components/sections/`)) {\n\t\t\t\tif (!genUi.sections) genUi.sections = [];\n\t\t\t\tconst sectionId = line.split(` `)[1];\n\t\t\t\tgenUi.sections = [...new Set([...genUi.sections, sectionId])];\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (line.includes(`@/components/views/`)) {\n\t\t\t\tif (!genUi.views) genUi.views = [];\n\t\t\t\tconst viewId = line.split(` `)[1];\n\t\t\t\tgenUi.views = [...new Set([...genUi.views, viewId])];\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t})\n\t\t.join(`\\n`);\n\tif (genUi.sections) {\n\t\tnewTsx = `import GenUiSection from '@/p0/genui/GenUiSection';\\n${newTsx}`;\n\t\tfor (let sectionId of genUi.sections) {\n\t\t\tnewTsx = newTsx.replaceAll(\n\t\t\t\t`<${sectionId}`,\n\t\t\t\t`<GenUiSection id=\"${sectionId}\"`,\n\t\t\t);\n\t\t}\n\t}\n\tif (genUi.views) {\n\t\tnewTsx = `import GenUiView from '@/p0/genui/GenUiView';\\n${newTsx}`;\n\t\tfor (let viewId of genUi.views) {\n\t\t\tnewTsx = newTsx.replaceAll(`<${viewId}`, `<GenUiView id=\"${viewId}\"`);\n\t\t}\n\t}\n\treturn { tsx, ids: genUi };\n}\n\nasync function extractCodeDecorators({ code }) {\n\t// swarm decorators from generated code to trigger swarm functions\n\tconst { pre, post } = { pre: 5, post: 15 };\n\tconst decorators = [];\n\tconst lines = code.split(\"\\n\");\n\n\tlines.forEach((line, index) => {\n\t\tconst decoratorMatch = line.match(/@need:([^:]+):(.+)/);\n\t\tif (decoratorMatch) {\n\t\t\tconst type = decoratorMatch[1].trim();\n\t\t\tconst description = decoratorMatch[2].trim();\n\n\t\t\t// Extract snippet with padding\n\t\t\tconst startLine = Math.max(0, index - pre);\n\t\t\tconst endLine = Math.min(lines.length, index + post + 1);\n\t\t\tconst snippet =\n\t\t\t\t\"{/*...*/}\\n\" + lines.slice(startLine, endLine).join(\"\\n\") + \"\\n{/*...*/}\";\n\n\t\t\tdecorators.push({\n\t\t\t\ttype,\n\t\t\t\tdescription,\n\t\t\t\tsnippet,\n\t\t\t});\n\t\t}\n\t});\n\n\treturn decorators;\n}\nexport default {\n\textract: {\n\t\tbackticks: extractBackticks,\n\t\tbackticksMultiple: extractBackticksMultiple,\n\t\tdecorators: extractCodeDecorators,\n\t},\n\tparse: {\n\t\tyaml: parseYaml,\n\t},\n\tedit: {\n\t\tgenUi: editGenUi,\n\t},\n};\n"
  },
  {
    "path": "cofounder/api/utils/render.js",
    "content": "import xml2js from \"xml2js\";\nimport fs from \"fs\";\nimport path from \"path\";\nimport { Resvg } from \"@resvg/resvg-js\";\nimport colormap from \"colormap\";\nimport sharp from \"sharp\";\nimport yaml from \"yaml\";\nimport storage from \"@/utils/storage.js\";\nimport crypto from \"crypto\";\nimport { url } from \"inspector\";\nimport dotenv from \"dotenv\";\ndotenv.config();\n\nfunction _p5map(n, start1, stop1, start2, stop2) {\n\t// map function from processing / p5js\n\treturn ((n - start1) / (stop1 - start1)) * (stop2 - start2) + start2;\n}\nasync function _parse({ svg }) {\n\t// -> { svg { string`` , } }\n\tsvg.string = svg.string.replaceAll(\"&\", \" \"); // <---- & char crashes svg\n\treturn {\n\t\tstring: svg.string,\n\t\tstructure: await xml2js.parseStringPromise(svg.string, {\n\t\t\texplicitArray: true,\n\t\t}),\n\t};\n}\nfunction _build({ svg }) {\n\t// -> { svg { structure{} } }-> { svg { structure{} , string`` }}\n\t// https://www.npmjs.com/package/xml2js : builder\n\t// useful for after making colormaps/annotations and building back to string render\n\tconst builder = new xml2js.Builder();\n\treturn {\n\t\tstructure: svg.structure,\n\t\tstring: builder.buildObject(svg.structure),\n\t};\n}\n\nasync function _render({\n\tsvg,\n\tbackground = `rgba(255,255,255,1)`,\n\tformat = `png`,\n\tfitTo = false,\n\tcloud = process.env.STATE_CLOUD\n\t\t? JSON.parse(process.env.STATE_CLOUD.toLowerCase())\n\t\t: false,\n\tlocal = process.env.STATE_LOCAL\n\t\t? JSON.parse(process.env.STATE_LOCAL.toLowerCase())\n\t\t: true,\n}) {\n\t//console.dir({__debug__render: svg })\n\tlet opts = {\n\t\tbackground,\n\t\t/*\n    fitTo: {\n      mode: 'width',\n      value: 1200,\n    },\n    */\n\t\tfont: {\n\t\t\tfontFiles: [`./utils/Karla.ttf`], // Load custom fonts.\n\t\t\tloadSystemFonts: false, // It will be faster to disable loading system fonts.\n\t\t\tdefaultFontFamily: \"Karla\", // You can omit this.\n\t\t},\n\t};\n\tif (fitTo) opts.fitTo = fitTo;\n\n\tconst resvg = new Resvg(Buffer.from(svg.string), opts);\n\tconst pngData = resvg.render();\n\tconst pngBuffer = pngData.asPng();\n\n\t/*\n\tconsole.info(\n\t\t\"> utils.render svg size : \",\n\t\t`${pngData.width}x${pngData.height}`,\n\t);\n\t*/\n\n\tconst uid = crypto.randomUUID();\n\n\tif (local) {\n\t\t// console.dir({ __debug__utils_render_svgAnnotated_saveImage: saveFilepath })\n\t\tconst outputPath = `./db/storage/dev/render/generated/${uid}.png`;\n\t\tconst dir = path.dirname(outputPath);\n\t\tif (!fs.existsSync(dir)) {\n\t\t\tfs.mkdirSync(dir, { recursive: true });\n\t\t}\n\t\tfs.writeFileSync(outputPath, pngBuffer);\n\t}\n\tconst base64 = `data:image/png;base64,${pngBuffer.toString(\"base64\")}`;\n\tconst url = !cloud\n\t\t? false\n\t\t: await storage.upload({\n\t\t\t\tpath: `userdata/dev/render/generated/${uid}.png`,\n\t\t\t\tbase64,\n\t\t\t});\n\n\treturn format === `png`\n\t\t? {\n\t\t\t\tbase64,\n\t\t\t\tbuffer: pngBuffer,\n\t\t\t\turl,\n\t\t\t\tlocal: !local ? false : `./db/storage/dev/render/generated/${uid}.png`,\n\t\t\t}\n\t\t: false; // later\n\t/*\n    else sharp to move into webp\n  */\n}\n\n/*\nasync function _svgView({ svg, highlight = false, saveFilepath = false }) {\n\t// old way, abandoned\n\tconst { structure } = svg;\n\n\tconst cmap = colormap({\n\t\tcolormap: `bluered`,\n\t\tnshades: 72,\n\t\tformat: \"hex\",\n\t\talpha: 1,\n\t});\n\tconst processedSvgStructure = {\n\t\tsvg: {\n\t\t\t$: structure.svg.$,\n\t\t\tg: structure.svg.rect\n\t\t\t\t.filter((rect) => rect.$.sectionId)\n\t\t\t\t.map((rect, idx) => {\n\t\t\t\t\tconst xywh = {\n\t\t\t\t\t\tx: rect.$.x,\n\t\t\t\t\t\ty: rect.$.y,\n\t\t\t\t\t\twidth: rect.$.width,\n\t\t\t\t\t\theight: rect.$.height,\n\t\t\t\t\t};\n\t\t\t\t\tconst fillHex = \"#bbb\"; // cmap[parseInt(_p5map(idx, 0, structure.svg.rect.length, 0, 50))];\n\t\t\t\t\treturn {\n\t\t\t\t\t\t$: {\n\t\t\t\t\t\t\t...xywh, // {x,y,w,h,}\n\t\t\t\t\t\t},\n\t\t\t\t\t\trect: {\n\t\t\t\t\t\t\t$: {\n\t\t\t\t\t\t\t\t...xywh,\n\t\t\t\t\t\t\t\tfill: fillHex,\n\t\t\t\t\t\t\t\t\"fill-opacity\": \"0.4\",\n\t\t\t\t\t\t\t\tstyle: `stroke-width:3;stroke:#000`,\n\t\t\t\t\t\t\t\topacity: \"0.4\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t\ttext: {\n\t\t\t\t\t\t\t$: {\n\t\t\t\t\t\t\t\tx: `${parseInt(rect.$.x) + parseInt(rect.$.width) / 2}`,\n\t\t\t\t\t\t\t\ty: `${parseInt(rect.$.y) + parseInt(rect.$.height) / 2}`,\n\t\t\t\t\t\t\t\twidth: parseInt(rect.$.width) / 2,\n\t\t\t\t\t\t\t\theight: parseInt(rect.$.height) / 2,\n\t\t\t\t\t\t\t\t\"dominant-baseline\": \"middle\",\n\t\t\t\t\t\t\t\t\"text-anchor\": \"middle\",\n\t\t\t\t\t\t\t\t\"font-size\": \"16\",\n\t\t\t\t\t\t\t\tfill: `#000`,\n\t\t\t\t\t\t\t\t//fill: fillHex,\n\t\t\t\t\t\t\t\t//style: `stroke-width:2;stroke:#000`,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t_: rect.$.sectionId,\n\t\t\t\t\t\t},\n\t\t\t\t\t};\n\t\t\t\t}),\n\t\t},\n\t};\n\tconst svgToRender = _build({ svg: { structure: processedSvgStructure } }); // -> {svg {string,structure}}\n\n\treturn {\n\t\tsvg: svgToRender,\n\t\timage: await _render({ svg: svgToRender, saveFilepath }),\n\t};\n}\n*/\n\nasync function _svgDesignerLayout({\n\tsvg,\n\tdesignSystem = process.env.DESIGNER_DESIGN_SYSTEM || `presets/protoboy-v1`,\n\tborders = true,\n\tsaveFilepath = false,\n\tcloud = process.env.STATE_CLOUD\n\t\t? JSON.parse(process.env.STATE_CLOUD.toLowerCase())\n\t\t: false,\n\tlocal = process.env.STATE_LOCAL\n\t\t? JSON.parse(process.env.STATE_LOCAL.toLowerCase())\n\t\t: true,\n}) {\n\t// console.dir({\"_debug:render:_svgSection\" : {svg , designSystem}} , {depth:null})\n\tconst PADDING = 50;\n\n\tconst { width, height } = svg.structure.svg.$;\n\tconst root = { width, height };\n\tconst parts = svg.structure.svg.rect\n\t\t.map((item) => item.$)\n\t\t.map((item) => {\n\t\t\tconst { x, y, width, height, primitiveId, description } = item;\n\t\t\treturn { x, y, width, height, primitiveId, description };\n\t\t});\n\tlet maxWidth = 0;\n\tlet maxHeight = 0;\n\tfor (const part of parts) {\n\t\tconst partRightEdge = parseInt(part.x) + parseInt(part.width);\n\t\tconst partBottomEdge = parseInt(part.y) + parseInt(part.height);\n\t\tif (partRightEdge > maxWidth) {\n\t\t\tmaxWidth = partRightEdge;\n\t\t}\n\t\tif (partBottomEdge > maxHeight) {\n\t\t\tmaxHeight = partBottomEdge;\n\t\t}\n\t}\n\tconst WIDTH = maxWidth + PADDING;\n\tconst HEIGHT = maxHeight + PADDING;\n\t// Create a blank white background image\n\tlet render = sharp({\n\t\tcreate: {\n\t\t\twidth: WIDTH,\n\t\t\theight: HEIGHT,\n\t\t\tchannels: 4,\n\t\t\tbackground: { r: 255, g: 255, b: 255, alpha: 1 },\n\t\t},\n\t}).png();\n\tconst compositeOperations = [];\n\n\tif (designSystem.startsWith(`presets`)) {\n\t\t/* load (cached ?) grid */\n\t\tconst rootDir = `./system/presets/ui/design/systems/${designSystem.split(\"/\")[1].trim()}/primitives`;\n\t\tconst rendersDir = `${rootDir}/renders`;\n\t\tconst ontologyFilepath = `${rootDir}/ontology.yaml`;\n\t\tlet ontology = {};\n\t\tyaml\n\t\t\t.parse(fs.readFileSync(ontologyFilepath, `utf-8`).toString())\n\t\t\t.primitives.map((primitive) => {\n\t\t\t\tontology[primitive.id] = primitive;\n\t\t\t});\n\t\t// Process each part\n\t\tfor (const part of parts) {\n\t\t\tconst { primitiveId, x, y, width, height } = part;\n\t\t\tconst imagePath = path.join(rendersDir, `${primitiveId}.png`);\n\t\t\tif (!fs.existsSync(imagePath)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// Load the image\n\n\t\t\tconst image = await sharp(imagePath)\n\t\t\t\t.resize(parseInt(width), parseInt(height), {\n\t\t\t\t\t// fit: 'fill',\n\t\t\t\t\tfit: ontology[primitiveId].stretch ? `fill` : `contain`,\n\t\t\t\t\tposition: `left top`,\n\t\t\t\t\tbackground: { r: 0, g: 0, b: 0, alpha: 0 },\n\t\t\t\t}) // or contain , but should be aligned properly\n\t\t\t\t.toBuffer();\n\n\t\t\t// Create a bordered image with a small black outline\n\t\t\tconst borderedImage = await sharp(image)\n\t\t\t\t.extend({\n\t\t\t\t\ttop: 1,\n\t\t\t\t\tbottom: 1,\n\t\t\t\t\tleft: 1,\n\t\t\t\t\tright: 1,\n\t\t\t\t\tbackground: {\n\t\t\t\t\t\tr: 0,\n\t\t\t\t\t\tg: 0,\n\t\t\t\t\t\tb: 0,\n\t\t\t\t\t\talpha: borders ? 0.1 : 0,\n\t\t\t\t\t},\n\t\t\t\t})\n\t\t\t\t.toBuffer();\n\n\t\t\t// Add the composite operation to the array\n\t\t\tcompositeOperations.push({\n\t\t\t\tinput: borderedImage,\n\t\t\t\tleft: parseInt(x),\n\t\t\t\ttop: parseInt(y),\n\t\t\t});\n\t\t}\n\n\t\t// Apply all composite operations at once\n\t\trender = render.composite(compositeOperations);\n\n\t\tconst renderBuffer = await render.toBuffer();\n\t\tif (saveFilepath) {\n\t\t\tawait render.toFile(saveFilepath);\n\t\t}\n\t\tconst uid = crypto.randomUUID();\n\t\tif (local) {\n\t\t\t// console.dir({ __debug__utils_render_svgAnnotated_saveImage: saveFilepath })\n\t\t\tconst outputPath = `./db/storage/dev/render/generated/${uid}.png`;\n\t\t\tconst dir = path.dirname(outputPath);\n\t\t\tif (!fs.existsSync(dir)) {\n\t\t\t\tfs.mkdirSync(dir, { recursive: true });\n\t\t\t}\n\t\t\tfs.writeFileSync(outputPath, renderBuffer);\n\t\t}\n\t\tconst base64 = `data:image/png;base64,${renderBuffer.toString(\"base64\")}`;\n\t\tconst url = !cloud\n\t\t\t? false\n\t\t\t: await storage.upload({\n\t\t\t\t\tpath: `userdata/dev/render/generated/${uid}.png`,\n\t\t\t\t\tbase64,\n\t\t\t\t});\n\n\t\treturn {\n\t\t\tsvg,\n\t\t\timage: {\n\t\t\t\tbase64: `data:image/png;base64,${renderBuffer.toString(\"base64\")}`,\n\t\t\t\turl,\n\t\t\t\tlocal: !local ? false : `./db/storage/dev/render/generated/${uid}.png`,\n\t\t\t},\n\t\t};\n\t}\n}\n\nasync function svgProcess(query) {\n\tconst { svg } = query;\n\tconst parsedSvg = await _parse({ svg }); // -> { structure , string }\n\treturn await _svgDesignerLayout({ ...query, svg: parsedSvg });\n}\n\nasync function guidanceGridPrimitives({\n\tdesignSystem = process.env.DESIGNER_DESIGN_SYSTEM || `presets/protoboy-v1`,\n\tcache = true,\n}) {\n\tif (designSystem.startsWith(`presets`)) {\n\t\t/* load (cached ?) grid */\n\t\tconst root = `./system/presets/ui/design/systems/${designSystem.split(\"/\")[1].trim()}/primitives`;\n\t\tconst ontologyFilepath = `${root}/ontology.yaml`;\n\t\tconst gridRenderFilepath = `${root}/grid.png`;\n\t\tconst rendersDir = `${root}/renders`;\n\t\tconst docsDir = `${root}/docs`;\n\t\tconst ontology = yaml.parse(\n\t\t\tfs.readFileSync(ontologyFilepath, `utf-8`).toString(),\n\t\t);\n\t\tconst _ontologyIds = ontology.primitives.map((e) => e.id);\n\t\tconst docs = { primitives: {} };\n\t\tfs\n\t\t\t.readdirSync(docsDir)\n\t\t\t.filter((filename) => /\\.(mdx)$/i.test(filename))\n\t\t\t.filter((filename) =>\n\t\t\t\t_ontologyIds.includes(filename.split(`.`).slice(0, -1).join(`.`)),\n\t\t\t)\n\t\t\t//.filter(filename=>filename)\n\t\t\t.map((filename) => {\n\t\t\t\tconst id = filename.split(`.`).slice(0, -1).join(`.`);\n\t\t\t\tdocs.primitives[id] = fs\n\t\t\t\t\t.readFileSync(`${docsDir}/${filename}`, `utf-8`)\n\t\t\t\t\t.toString();\n\t\t\t});\n\n\t\tif (\n\t\t\tcache &&\n\t\t\tfs.existsSync(ontologyFilepath) &&\n\t\t\tfs.existsSync(gridRenderFilepath)\n\t\t) {\n\t\t\tconsole.dir({ \"utils:render:guidanceGridPrimitives\": { cache: true } });\n\t\t\tconst buffer = await sharp(gridRenderFilepath).toBuffer();\n\t\t\tconst base64 = `data:image/png;base64,${buffer.toString(\"base64\")}`;\n\t\t\treturn {\n\t\t\t\tontology: ontology,\n\t\t\t\tdocs,\n\t\t\t\timage: {\n\t\t\t\t\tbase64,\n\t\t\t\t\turl: false,\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\n\t\tconst ontologyIdsFilepathsDict = {};\n\t\tconst ontologyIds = fs\n\t\t\t.readdirSync(rendersDir)\n\t\t\t.filter((filename) => /\\.(png|jpe?g|webp)$/i.test(filename))\n\t\t\t.filter((filename) =>\n\t\t\t\t_ontologyIds.includes(filename.split(`.`).slice(0, -1).join(`.`)),\n\t\t\t)\n\t\t\t//.filter(filename=>filename)\n\t\t\t.map((filename) => {\n\t\t\t\tconst id = filename.split(`.`).slice(0, -1).join(`.`);\n\t\t\t\tontologyIdsFilepathsDict[id] = `${rendersDir}/${filename}`;\n\t\t\t\treturn id;\n\t\t\t});\n\t\t/*\n        much better approach would be to build one single big svg with texts and grid lines using 1:1 rect with stroke \n  <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"1000\" height=\"1000\">\n    <g x=\"0\" y=\"0\" width=\"500\" height=\"500\">\n      <rect x=\"0\" y=\"0\" width=\"500\" height=\"500\" fill=\"white\" style=\"stroke-width:5;stroke:#000\" ></rect>\n      <rect x=\"0\" y=\"0\" width=\"450\" height=\"60\" fill=\"yellow\" style=\"stroke-width:5;stroke:#000\"></rect>\n      <text  x=\"10\" y=\"10\" width=\"500\" height=\"500\" font-size=\"22\" fill=\"black\" text-anchor=\"start\" dominant-baseline=\"hanging\">button_floatingActionButton</text>\n    </g>\n\n    <g x=\"500\" y=\"0\" width=\"500\" height=\"500\" >\n      <rect x=\"500\" y=\"0\" width=\"500\" height=\"500\" fill=\"white\"  style=\"stroke-width:5;stroke:#000\" ></rect>\n      <rect x=\"500\" y=\"0\" width=\"450\" height=\"60\" fill=\"yellow\" style=\"stroke-width:5;stroke:#000\"></rect>\n      <text  x=\"510\" y=\"10\" width=\"500\" height=\"500\" font-size=\"22\" fill=\"black\" text-anchor=\"start\" dominant-baseline=\"hanging\">button_floatingActionButton</text>\n    </g>\n  </svg>\n      */\n\n\t\tconst ontologyIdsWithoutNonprimitive = ontologyIds.filter(\n\t\t\t(e) => e != \"nonprimitive\",\n\t\t);\n\t\tconst GRID_COLUMNS = 6;\n\t\tconst GRID_ROWS = Math.ceil(\n\t\t\tontologyIdsWithoutNonprimitive.length / GRID_COLUMNS,\n\t\t);\n\t\tconst CELL_SIZE = 400;\n\n\t\tlet cellIdx = -1;\n\t\tconst gBlocks = [];\n\t\tlet compositeOperations = [];\n\n\t\tfor (let rowIdx of [...Array(GRID_ROWS).keys()]) {\n\t\t\tfor (let colIdx of [...Array(GRID_COLUMNS).keys()]) {\n\t\t\t\tcellIdx++;\n\t\t\t\tif (cellIdx >= ontologyIdsWithoutNonprimitive.length) break;\n\t\t\t\tconst id = ontologyIdsWithoutNonprimitive[cellIdx];\n\t\t\t\tconst x = colIdx * CELL_SIZE;\n\t\t\t\tconst y = rowIdx * CELL_SIZE;\n\t\t\t\tgBlocks.push(`<g x=\"${x}\" y=\"${y}\" width=\"500\" height=\"500\">\n    <rect x=\"${x}\" y=\"${y}\" width=\"${CELL_SIZE}\" height=\"${CELL_SIZE}\" fill=\"white\" style=\"stroke-width:5;stroke:#000\" ></rect>\n    <rect x=\"${x}\" y=\"${y}\" width=\"${CELL_SIZE - 50}\" height=\"50\" fill=\"yellow\" style=\"stroke-width:5;stroke:#000\"></rect>\n    <text  x=\"${x + 10}\" y=\"${y + 10}\" width=\"${CELL_SIZE}\" height=\"${CELL_SIZE}\" font-size=\"23\" fill=\"black\" text-anchor=\"start\" dominant-baseline=\"hanging\">${id}</text>\n  </g>`);\n\t\t\t\t// make renders composite operation\n\t\t\t\tconst imagePath = ontologyIdsFilepathsDict[id];\n\t\t\t\tconst image = await sharp(imagePath)\n\t\t\t\t\t.resize(parseInt(CELL_SIZE * 0.75), parseInt(CELL_SIZE * 0.75), {\n\t\t\t\t\t\t// fit: 'fill',\n\t\t\t\t\t\tfit: `contain`,\n\t\t\t\t\t\t// position: `left top`,\n\t\t\t\t\t\tbackground: { r: 0, g: 0, b: 0, alpha: 0 },\n\t\t\t\t\t}) // or contain , but should be aligned properly\n\t\t\t\t\t.toBuffer();\n\t\t\t\t// Create a bordered image with a small black outline\n\t\t\t\tconst borderedImage = await sharp(image)\n\t\t\t\t\t.extend({\n\t\t\t\t\t\ttop: 1,\n\t\t\t\t\t\tbottom: 1,\n\t\t\t\t\t\tleft: 1,\n\t\t\t\t\t\tright: 1,\n\t\t\t\t\t\tbackground: { r: 0, g: 0, b: 0, alpha: 0 }, // alpha: 1 ; for border\n\t\t\t\t\t})\n\t\t\t\t\t.toBuffer();\n\n\t\t\t\t// Add the composite operation to the array\n\t\t\t\tcompositeOperations.push({\n\t\t\t\t\tinput: borderedImage,\n\t\t\t\t\tleft: parseInt(x + CELL_SIZE * 0.125),\n\t\t\t\t\ttop: parseInt(y + CELL_SIZE * 0.175),\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\tconst templateSvgString = `<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"${CELL_SIZE * GRID_COLUMNS}\" height=\"${CELL_SIZE * GRID_ROWS}\">\n  ${gBlocks.join(`\\n`)}\n  </svg>`;\n\t\tconst { buffer } = await _render({\n\t\t\tsvg: { string: templateSvgString },\n\t\t\tbackground: `rgba(255,255,255,1)`,\n\t\t\t// saveFilepath: `./dump/_svg_textglyphrender.png`,\n\t\t});\n\n\t\tconst render = await sharp(buffer).composite(compositeOperations);\n\t\tconst renderBuffer = await render.toBuffer();\n\t\tif (!cache || !fs.existsSync(gridRenderFilepath)) {\n\t\t\tawait render.toFile(gridRenderFilepath);\n\t\t}\n\t\treturn {\n\t\t\tontology: {\n\t\t\t\tprimitives: ontology.primitives.filter((item) =>\n\t\t\t\t\tontologyIds.includes(item.id),\n\t\t\t\t),\n\t\t\t},\n\t\t\tdocs,\n\t\t\timage: {\n\t\t\t\tbase64: `data:image/png;base64,${renderBuffer.toString(\"base64\")}`,\n\t\t\t\turl: false,\n\t\t\t},\n\t\t};\n\t}\n}\n\nexport default {\n\tsvg: svgProcess,\n\tguidance: {\n\t\tgrid: {\n\t\t\tprimitives: guidanceGridPrimitives,\n\t\t},\n\t},\n};\n"
  },
  {
    "path": "cofounder/api/utils/storage.js",
    "content": "import { Storage } from \"@google-cloud/storage\";\nimport fs from \"fs\";\nimport path from \"path\";\nimport dotenv from \"dotenv\";\n\ndotenv.config();\n\n/*\n  no signed urls in dev mode here;\n*/\nlet storage;\nlet bucket;\ntry {\n\tif (\n\t\tprocess.env.STATE_CLOUD &&\n\t\tprocess.env.GOOGLECLOUDSTORAGE_SERVICE_KEY_PATH?.length &&\n\t\tprocess.env.GOOGLECLOUDSTORAGE_BUCKET?.length\n\t) {\n\t\tstorage = new Storage({\n\t\t\tkeyFilename: process.env.GOOGLECLOUDSTORAGE_SERVICE_KEY_PATH,\n\t\t});\n\t\tbucket = storage.bucket(process.env.GOOGLECLOUDSTORAGE_BUCKET);\n\t}\n} catch (e) {\n\tconsole.error(e);\n}\n\nconst cloudStorage = {\n\tupload: async ({ path, base64, url, file }) => {\n\t\ttry {\n\t\t\tconsole.dir({ \"utils:storage:upload\": { path } });\n\t\t\tif (base64) {\n\t\t\t\tconst buffer = Buffer.from(base64.split(\",\")[1], \"base64\");\n\t\t\t\tawait bucket.file(path).save(buffer, {\n\t\t\t\t\tmetadata: {\n\t\t\t\t\t\tcontentType: base64.split(\";base64\")[0].split(\"data:\")[1],\n\t\t\t\t\t},\n\t\t\t\t});\n\t\t\t} else if (url) {\n\t\t\t\tconst response = await fetch(url);\n\t\t\t\tconst buffer = await response.buffer();\n\t\t\t\tawait bucket.file(path).save(buffer);\n\t\t\t}\n\t\t\t/*\n      const signedUrl = await bucket.file(path).getSignedUrl({\n        action: 'read',\n        expires: Date.now() + 1000 * 60 * 60 *12, // 12 hrs\n      });\n      */\n\n\t\t\treturn `https://storage.googleapis.com/${process.env.GOOGLECLOUDSTORAGE_BUCKET}/${path}`;\n\t\t} catch (error) {\n\t\t\tconsole.error(\"Error uploading to Google Cloud Storage:\", error);\n\t\t\tthrow new Error(\"Upload failed\");\n\t\t}\n\t},\n\t/*\n  get: {\n    signed: async ({ path }) => {\n      try {\n        const signedUrl = await bucket.file(path).getSignedUrl({\n          action: 'read',\n          expires: Date.now() + 1000 * 60 * 60 *12, // 12 hrs\n        });\n        return { url: signedUrl[0] };\n      } catch (error) {\n        console.error('Error getting signed URL from Google Cloud Storage:', error);\n        throw new Error('Failed to get signed URL');\n      }\n    },\n  },\n  */\n};\n\nexport default cloudStorage;\n"
  },
  {
    "path": "cofounder/api/utils/vectra.js",
    "content": "import { LocalIndex } from \"vectra\";\n\nlet index;\nlet indexed; // amount of indexed items\ntry {\n\tindex = new LocalIndex(`./db/index`);\n\tif (!(await index.isIndexCreated())) {\n\t\tawait index.createIndex();\n\t\tconsole.dir({\n\t\t\t\"utils/vectra\":\n\t\t\t\t\"found no local index ; created temp placeholder in cofounder/api/db/index\",\n\t\t});\n\t} else {\n\t\tconsole.dir({ \"utils/vectra\": \"found local index\" });\n\t}\n\tindexed = (await index.listItems()).length;\n\tconsole.log(\n\t\t`\\x1b[33mutils/vectra :\\tindexed items : ${indexed}\\n` +\n\t\t\t`[ for advanced layout designer : recommended to use remote index using cofounder.openinterface.ai API key once available ]\\x1b[0m`,\n\t);\n} catch (e) {\n\t// typically no index to query, update on post alpha release\n\tconsole.error(`utils/vectra : ${e}`);\n\tfalse;\n}\n\nasync function query({ vector, amount }) {\n\ttry {\n\t\treturn (await index.queryItems(vector, amount)).map((entry) => {\n\t\t\treturn {\n\t\t\t\tscore: entry.score,\n\t\t\t\t...entry.item.metadata,\n\t\t\t};\n\t\t});\n\t} catch (e) {\n\t\t// typically no index to query, update on post alpha release\n\t\tconsole.error(`utils/vectra:query : ${e}`);\n\t\tfalse;\n\t}\n\treturn [];\n}\n\nexport default {\n\tquery,\n\tindexed,\n};\n"
  },
  {
    "path": "cofounder/boilerplate/README.md",
    "content": "app generated from cofounder/boilerplate\n\ninstructions here on how to start api and frontend , whether in parallel or separately"
  },
  {
    "path": "cofounder/boilerplate/backend-boilerplate/.gitignore",
    "content": "mockdb\nnode_modules"
  },
  {
    "path": "cofounder/boilerplate/backend-boilerplate/db.sql",
    "content": "-- COMMANDS FOR DB TABLES\n-- COMMANDS FOR DB SEED"
  },
  {
    "path": "cofounder/boilerplate/backend-boilerplate/initdb.js",
    "content": "import dotenv from \"dotenv\";\nimport fs from \"fs\";\nimport { PGlite } from \"@electric-sql/pglite\";\ndotenv.config();\n\nconst dbPath = `./db`;\n\nif (!fs.existsSync(dbPath)) {\n  const postgres = new PGlite(dbPath);\n  const dbInitCommands = fs\n    .readFileSync(`./db.sql`, \"utf-8\")\n    .toString()\n    .split(/(?=CREATE TABLE |INSERT INTO)/);\n  for (let cmd of dbInitCommands) {\n    console.dir({ \"backend:db:init:command\": cmd });\n    try {\n      await postgres.exec(cmd);\n    } catch (e) {\n      console.dir({ \"backend:db:init:error\": e });\n    }\n  }\n}\n"
  },
  {
    "path": "cofounder/boilerplate/backend-boilerplate/package.json",
    "content": "{\n  \"name\": \"backend\",\n  \"version\": \"1.0.0\",\n  \"description\": \"generated by cofounder backend layer\",\n  \"author\": \"n@raiden.ai\",\n  \"type\": \"module\",\n  \"main\": \"index.js\",\n  \"scripts\": {\n    \"start\": \"node initdb && nodemon server\"\n  },\n  \"nodemonConfig\": {\n    \"ignore\": [\n      \"mockdb/*\",\n      \"db/*\",\n      \"storage/*\"\n    ]\n  },\n  \"keywords\": [],\n  \"license\": \"ISC\",\n  \"dependencies\": {\n    \"@electric-sql/pglite\": \"^0.2.4\",\n    \"@types/bcryptjs\": \"^2.4.6\",\n    \"bcryptjs\": \"^2.4.3\",\n    \"cors\": \"^2.8.5\",\n    \"dotenv\": \"^16.4.5\",\n    \"express\": \"^4.19.2\",\n    \"jsonwebtoken\": \"^9.0.2\",\n    \"uuid\": \"*\",\n    \"yaml\": \"^2.5.0\"\n  },\n  \"devDependencies\": {\n    \"concurrently\": \"^9.0.1\",\n    \"morgan\": \"^1.10.0\",\n    \"nodemon\": \"^3.1.4\"\n  }\n}\n"
  },
  {
    "path": "cofounder/boilerplate/backend-boilerplate/server.js",
    "content": "import express from \"express\";\nimport cors from \"cors\";\nimport dotenv from \"dotenv\";\nimport fs from \"fs\";\nimport { PGlite } from \"@electric-sql/pglite\";\ndotenv.config();\n\nconst app = express();\nconst port = process.env.PORT || 1337;\napp.use(cors());\napp.use(express.json({ limit: \"5mb\" }));\n\napp.get(\"/\", (req, res) => {\n  res.json({ message: \"cofounder backend boilerplate :)\" });\n});\n\napp.listen(port, () => {\n  console.log(`Server is running on port ${port}`);\n});\n"
  },
  {
    "path": "cofounder/boilerplate/package.json",
    "content": "{\n  \"name\": \"boilerplate\",\n  \"version\": \"1.0.0\",\n  \"description\": \"\",\n  \"main\": \"index.js\",\n  \"scripts\": {\n    \"dev\": \"concurrently \\\"cd vitereact && npm i && npm run dev\\\" \\\"cd backend && npm i && npm run start\\\"\"\n  },\n  \"author\": \"\",\n  \"license\": \"ISC\",\n  \"dependencies\": {\n    \"concurrently\": \"^8.2.2\"\n  }\n}"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/.gitignore",
    "content": "public\n\n# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\npnpm-debug.log*\nlerna-debug.log*\n\nnode_modules\ndist\ndist-ssr\n*.local\n\n# Editor directories and files\n.vscode/*\n!.vscode/extensions.json\n.idea\n.DS_Store\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n*.sw?\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/.prettierignore",
    "content": "gits/\nvectordb/\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/.prettierrc",
    "content": "{\n\t\"tabWidth\": 1,\n\t\"useTabs\": true\n}\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/README.md",
    "content": "# React + TypeScript + Vite\n\nThis template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.\n\nCurrently, two official plugins are available:\n\n- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh\n- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh\n\n## Expanding the ESLint configuration\n\nIf you are developing a production application, we recommend updating the configuration to enable type aware lint rules:\n\n- Configure the top-level `parserOptions` property like this:\n\n```js\nexport default tseslint.config({\n\tlanguageOptions: {\n\t\t// other options...\n\t\tparserOptions: {\n\t\t\tproject: [\"./tsconfig.node.json\", \"./tsconfig.app.json\"],\n\t\t\ttsconfigRootDir: import.meta.dirname,\n\t\t},\n\t},\n});\n```\n\n- Replace `tseslint.configs.recommended` to `tseslint.configs.recommendedTypeChecked` or `tseslint.configs.strictTypeChecked`\n- Optionally add `...tseslint.configs.stylisticTypeChecked`\n- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and update the config:\n\n```js\n// eslint.config.js\nimport react from \"eslint-plugin-react\";\n\nexport default tseslint.config({\n\t// Set the react version\n\tsettings: { react: { version: \"18.3\" } },\n\tplugins: {\n\t\t// Add the react plugin\n\t\treact,\n\t},\n\trules: {\n\t\t// other rules...\n\t\t// Enable its recommended rules\n\t\t...react.configs.recommended.rules,\n\t\t...react.configs[\"jsx-runtime\"].rules,\n\t},\n});\n```\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/components.json",
    "content": "{\n\t\"$schema\": \"https://ui.shadcn.com/schema.json\",\n\t\"style\": \"default\",\n\t\"rsc\": false,\n\t\"tsx\": true,\n\t\"tailwind\": {\n\t\t\"config\": \"tailwind.config.js\",\n\t\t\"css\": \"src/index.css\",\n\t\t\"baseColor\": \"neutral\",\n\t\t\"cssVariables\": false,\n\t\t\"prefix\": \"\"\n\t},\n\t\"aliases\": {\n\t\t\"components\": \"@/components\",\n\t\t\"utils\": \"@/lib/utils\",\n\t\t\"ui\": \"@/components/ui\",\n\t\t\"lib\": \"@/lib\",\n\t\t\"hooks\": \"@/hooks\"\n\t}\n}\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/eslint.config.js",
    "content": "import js from \"@eslint/js\";\nimport globals from \"globals\";\nimport reactHooks from \"eslint-plugin-react-hooks\";\nimport reactRefresh from \"eslint-plugin-react-refresh\";\nimport tseslint from \"typescript-eslint\";\n\nexport default tseslint.config({\n\textends: [js.configs.recommended, ...tseslint.configs.recommended],\n\tfiles: [\"**/*.{ts,tsx}\"],\n\tignores: [\"dist\"],\n\tlanguageOptions: {\n\t\tecmaVersion: 2020,\n\t\tglobals: globals.browser,\n\t},\n\tplugins: {\n\t\t\"react-hooks\": reactHooks,\n\t\t\"react-refresh\": reactRefresh,\n\t},\n\trules: {\n\t\t...reactHooks.configs.recommended.rules,\n\t\t\"react-refresh/only-export-components\": [\n\t\t\t\"warn\",\n\t\t\t{ allowConstantExport: true },\n\t\t],\n\t},\n});\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n\t<head>\n\t\t<meta charset=\"UTF-8\" />\n\t\t<link rel=\"icon\" type=\"image/svg+xml\" href=\"/favicon.png\" />\n\t\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n\t\t<link\n\t\t\thref=\"https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap\"\n\t\t\trel=\"stylesheet\"\n\t\t/>\n\t\t<title>Vite + React + TS</title>\n\t</head>\n\t<body>\n\t\t<div id=\"root\"></div>\n\t\t<script type=\"module\" src=\"/src/main.tsx\"></script>\n\t\t<script>\n\t\t\tdocument.addEventListener(\"keydown\", (event) => {\n\t\t\t\tif (event.ctrlKey && event.key === \"k\") {\n\t\t\t\t\tconsole.log(\"Ctrl+K pressed!\");\n\t\t\t\t\tevent.preventDefault(); // Prevent doing a google search\n\t\t\t\t}\n\t\t\t});\n\t\t</script>\n\t</body>\n</html>\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/package.json",
    "content": "{\n\t\"name\": \"conductor\",\n\t\"private\": true,\n\t\"version\": \"0.0.0\",\n\t\"type\": \"module\",\n\t\"scripts\": {\n\t\t\"dev\": \"vite\",\n\t\t\"build\": \"vite build\",\n\t\t\"lint\": \"eslint .\",\n\t\t\"preview\": \"vite preview\"\n\t},\n\t\"dependencies\": {\n\t\t\"@hookform/resolvers\": \"^3.9.0\",\n\t\t\"@radix-ui/react-accordion\": \"^1.2.0\",\n\t\t\"@radix-ui/react-alert-dialog\": \"^1.1.1\",\n\t\t\"@radix-ui/react-aspect-ratio\": \"^1.1.0\",\n\t\t\"@radix-ui/react-avatar\": \"^1.1.0\",\n\t\t\"@radix-ui/react-checkbox\": \"^1.1.1\",\n\t\t\"@radix-ui/react-collapsible\": \"^1.1.0\",\n\t\t\"@radix-ui/react-context-menu\": \"^2.2.1\",\n\t\t\"@radix-ui/react-dialog\": \"^1.1.1\",\n\t\t\"@radix-ui/react-dropdown-menu\": \"^2.1.1\",\n\t\t\"@radix-ui/react-hover-card\": \"^1.1.1\",\n\t\t\"@radix-ui/react-label\": \"^2.1.0\",\n\t\t\"@radix-ui/react-menubar\": \"^1.1.1\",\n\t\t\"@radix-ui/react-navigation-menu\": \"^1.2.0\",\n\t\t\"@radix-ui/react-popover\": \"^1.1.1\",\n\t\t\"@radix-ui/react-progress\": \"^1.1.0\",\n\t\t\"@radix-ui/react-radio-group\": \"^1.2.0\",\n\t\t\"@radix-ui/react-scroll-area\": \"^1.1.0\",\n\t\t\"@radix-ui/react-select\": \"^2.1.1\",\n\t\t\"@radix-ui/react-separator\": \"^1.1.0\",\n\t\t\"@radix-ui/react-slider\": \"^1.2.0\",\n\t\t\"@radix-ui/react-slot\": \"^1.1.0\",\n\t\t\"@radix-ui/react-switch\": \"^1.1.0\",\n\t\t\"@radix-ui/react-tabs\": \"^1.1.0\",\n\t\t\"@radix-ui/react-toast\": \"^1.2.1\",\n\t\t\"@radix-ui/react-toggle\": \"^1.1.0\",\n\t\t\"@radix-ui/react-toggle-group\": \"^1.1.0\",\n\t\t\"@radix-ui/react-tooltip\": \"^1.1.2\",\n\t\t\"@reduxjs/toolkit\": \"^2.2.7\",\n\t\t\"axios\": \"^1.7.7\",\n\t\t\"class-variance-authority\": \"^0.7.0\",\n\t\t\"clsx\": \"^2.1.1\",\n\t\t\"cmdk\": \"^1.0.0\",\n\t\t\"date-fns\": \"^4.0.0-beta.1\",\n\t\t\"embla-carousel-autoplay\": \"^8.3.0\",\n\t\t\"embla-carousel-react\": \"^8.3.0\",\n\t\t\"framer-motion\": \"^11.5.4\",\n\t\t\"input-otp\": \"^1.2.4\",\n\t\t\"lucide-react\": \"^0.439.0\",\n\t\t\"next-themes\": \"^0.3.0\",\n\t\t\"react\": \"^18.3.1\",\n\t\t\"react-day-picker\": \"^8.10.1\",\n\t\t\"react-dom\": \"^18.3.1\",\n\t\t\"react-hook-form\": \"^7.53.0\",\n\t\t\"react-redux\": \"^9.1.2\",\n\t\t\"react-resizable-panels\": \"^2.1.3\",\n\t\t\"react-router-dom\": \"^6.26.0\",\n\t\t\"react-tooltip\": \"^5.28.0\",\n\t\t\"recharts\": \"^2.12.7\",\n\t\t\"redux\": \"^5.0.1\",\n\t\t\"redux-persist\": \"^6.0.0\",\n\t\t\"redux-thunk\": \"^3.1.0\",\n\t\t\"socket.io-client\": \"^4.7.5\",\n\t\t\"sonner\": \"^1.5.0\",\n\t\t\"tailwind-merge\": \"^2.5.2\",\n\t\t\"tailwindcss-animate\": \"^1.0.7\",\n\t\t\"use-react-screenshot\": \"^4.0.0\",\n\t\t\"use-screenshot-hook\": \"^1.0.2\",\n\t\t\"vaul\": \"^0.9.3\",\n\t\t\"zod\": \"^3.23.8\"\n\t},\n\t\"devDependencies\": {\n\t\t\"@eslint/js\": \"^9.8.0\",\n\t\t\"@types/node\": \"^22.1.0\",\n\t\t\"@types/react\": \"^18.3.3\",\n\t\t\"@types/react-dom\": \"^18.3.0\",\n\t\t\"@vitejs/plugin-react\": \"^4.3.1\",\n\t\t\"autoprefixer\": \"^10.4.20\",\n\t\t\"eslint\": \"^9.8.0\",\n\t\t\"eslint-plugin-react-hooks\": \"^5.1.0-rc.0\",\n\t\t\"eslint-plugin-react-refresh\": \"^0.4.9\",\n\t\t\"globals\": \"^15.9.0\",\n\t\t\"html2canvas\": \"^1.4.1\",\n\t\t\"postcss\": \"^8.4.41\",\n\t\t\"tailwindcss\": \"^3.4.8\",\n\t\t\"typescript\": \"^5.5.3\",\n\t\t\"typescript-eslint\": \"^8.0.0\",\n\t\t\"vite\": \"^5.4.0\"\n\t}\n}\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/postcss.config.js",
    "content": "export default {\n\tplugins: {\n\t\ttailwindcss: {},\n\t\tautoprefixer: {},\n\t},\n};\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/App.css",
    "content": "#root {\n\tmax-width: 90vw;\n\tmargin: 0 auto;\n\tpadding: 2rem;\n}\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/App.tsx",
    "content": "import React from \"react\";\nimport { Route, Routes } from \"react-router-dom\";\nimport cofounder from \"@/assets/cofounder.webp\";\n\nconst App: React.FC = () => {\n\treturn (\n\t\t<>\n\t\t\t<div className=\"container mx-auto w-full xl:w-[60vw] p-12 mt-12 text-left whitespace-pre-line break-words\">\n\t\t\t\t<section className=\"pb-4 mb-4 text-center\">\n\t\t\t\t\t<a\n\t\t\t\t\t\thref=\"https://github.com/raidendotai/cofounder\"\n\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\tclassName=\"opacity-100 hover:opacity-90 duration-200\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<img\n\t\t\t\t\t\t\tclassName=\"rounded rounded-xl md:max-w-[30vw] mx-auto\"\n\t\t\t\t\t\t\tsrc={cofounder}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</a>\n\t\t\t\t\t<h1 className=\"mt-8 text-2xl\">Vite + React</h1>\n\t\t\t\t\t<h1 className=\"mt-2\">your app will update here as it generates</h1>\n\t\t\t\t</section>\n\t\t\t</div>\n\t\t</>\n\t);\n};\n\nexport default App;\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/AppWrapper.tsx",
    "content": "import React from \"react\";\nimport App from \"./App.tsx\";\nimport FirstLaunch from \"@/_cofounder/dev/firstlaunch.tsx\";\nimport Cmdl from \"@/_cofounder/dev/cmdl.tsx\";\n\nconst AppWrapper: React.FC = () => {\n\treturn (\n\t\t<>\n\t\t\t<FirstLaunch />\n\t\t\t<Cmdl />\n\t\t\t<App />\n\t\t</>\n\t);\n};\n\nexport default AppWrapper;\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/_cofounder/dev/cmdk.tsx.bak",
    "content": "import React, { FC, useState, useRef, useEffect } from \"react\";\nimport { motion, AnimatePresence } from \"framer-motion\";\n\nconst Cmd: FC = () => {\n  const [open, setOpen] = useState(false);\n\n  const searchCommandRef = useRef<HTMLInputElement>(null);\n  // Toggle the menu when ⌘K is pressed\n  useEffect(() => {\n    const down = (e: KeyboardEvent) => {\n      if (e.key === \"k\" && (e.metaKey || e.ctrlKey)) {\n        e.preventDefault();\n        setOpen((prev) => !prev);\n      } else if (e.key === \"Escape\") {\n        setOpen(false);\n      }\n    };\n    if (open) {\n      searchCommandRef.current?.focus(); // Set input as active when opening\n    }\n    document.addEventListener(\"keydown\", down);\n    return () => document.removeEventListener(\"keydown\", down);\n  }, [open]);\n\n  return (\n    <>\n      <AnimatePresence>\n        {(open && (\n          <motion.div\n            className={`\n              fixed top-0 left-0 inset-0 bg-black backdrop-blur-sm bg-opacity-[0.05] flex items-start justify-center\n              h-[100vh] w-[100vw] overflow-hidden\n            `} style={{ zIndex: 999999999 }}\n            initial={{ opacity: 0 }}\n            animate={{ opacity: 1 }}\n            exit={{ opacity: 0 }}\n            transition={{ duration: 0.05 }}\n          >\n            <AnimatePresence>\n              {(open && (\n                <motion.div\n                  className=\"bg-white bg-opacity-100 backdrop-blur-md min-w-3xl max-w-3xl w-full overflow-auto shadow-lg\n                            mt-[15vh] min-h-[70vh] max-h-[70vh] shadow-2xl m-2 rounded rounded-lg\"\n                  style={{ zIndex: 9999999991 }}\n                  id=\"modal\"\n                  initial={{ opacity: 0, scale: 0.9 }}\n                  animate={{ opacity: 1, scale: 1 }}\n                  exit={{ opacity: 0, scale: 0.9 }}\n                  transition={{ duration: 0.05 }}\n                >\n                  <div className=\"\">\n                    <div className=\"border-b w-full p-6 py-3 flex items-center\">\n                      <span className=\"p-2 text-lg text-black\">{`>`}</span>\n                      <input ref={searchCommandRef} className=\"p-2 w-full text-lg outline-none\"\n                        placeholder=\"find command\" />\n                    </div>\n                  </div>\n                </motion.div>\n              )) ||\n                ``}\n            </AnimatePresence>\n          </motion.div>\n        )) ||\n          ``}\n      </AnimatePresence>\n    </>\n  );\n};\n\nexport default Cmd;\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/_cofounder/dev/cmdl.tsx",
    "content": "import React, { FC, useState, useRef, useEffect } from \"react\";\nimport { motion, AnimatePresence } from \"framer-motion\";\n\nconst Cmd: FC = () => {\n\tconst [open, setOpen] = useState(false);\n\n\tconst searchCommandRef = useRef<HTMLInputElement>(null);\n\t// Toggle the menu when ⌘K is pressed\n\tuseEffect(() => {\n\t\tconst down = (e: KeyboardEvent) => {\n\t\t\tif (e.key === \"l\" && (e.metaKey || e.ctrlKey)) {\n\t\t\t\te.preventDefault();\n\t\t\t\tsetOpen((prev) => !prev);\n\t\t\t} else if (e.key === \"Escape\") {\n\t\t\t\tsetOpen(false);\n\t\t\t}\n\t\t};\n\t\tif (open) {\n\t\t\tsearchCommandRef.current?.focus(); // Set input as active when opening\n\t\t}\n\t\tdocument.addEventListener(\"keydown\", down);\n\t\treturn () => document.removeEventListener(\"keydown\", down);\n\t}, [open]);\n\n\treturn (\n\t\t<>\n\t\t\t<AnimatePresence>\n\t\t\t\t{(open && (\n\t\t\t\t\t<motion.div\n\t\t\t\t\t\tclassName={`\n              fixed top-0 left-0 inset-0 bg-black backdrop-blur-sm bg-opacity-[0.05] flex items-start justify-center\n              h-[100vh] w-[100vw] overflow-hidden\n            `}\n\t\t\t\t\t\tstyle={{ zIndex: 999999999 }}\n\t\t\t\t\t\tinitial={{ opacity: 0 }}\n\t\t\t\t\t\tanimate={{ opacity: 1 }}\n\t\t\t\t\t\texit={{ opacity: 0 }}\n\t\t\t\t\t\ttransition={{ duration: 0.05 }}\n\t\t\t\t\t>\n\t\t\t\t\t\t<AnimatePresence>\n\t\t\t\t\t\t\t{(open && (\n\t\t\t\t\t\t\t\t<motion.div\n\t\t\t\t\t\t\t\t\tclassName=\"bg-white bg-opacity-100 backdrop-blur-md min-w-3xl max-w-3xl w-full overflow-auto shadow-lg\n                            mt-[15vh] min-h-[70vh] max-h-[70vh] shadow-2xl m-2 rounded rounded-lg\"\n\t\t\t\t\t\t\t\t\tstyle={{ zIndex: 9999999991 }}\n\t\t\t\t\t\t\t\t\tid=\"modal\"\n\t\t\t\t\t\t\t\t\tinitial={{ opacity: 0, scale: 0.9 }}\n\t\t\t\t\t\t\t\t\tanimate={{ opacity: 1, scale: 1 }}\n\t\t\t\t\t\t\t\t\texit={{ opacity: 0, scale: 0.9 }}\n\t\t\t\t\t\t\t\t\ttransition={{ duration: 0.05 }}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<div className=\"\">\n\t\t\t\t\t\t\t\t\t\t<div className=\"border-b w-full p-6 py-3 flex items-center\">\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"p-2 text-lg text-black\">{`>`}</span>\n\t\t\t\t\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\t\t\t\t\tref={searchCommandRef}\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"p-2 w-full text-lg outline-none\"\n\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"find\"\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<div className=\"p-4\">\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"opacity-50\">[CMD+L panel not implement yet]</span>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</motion.div>\n\t\t\t\t\t\t\t)) ||\n\t\t\t\t\t\t\t\t``}\n\t\t\t\t\t\t</AnimatePresence>\n\t\t\t\t\t</motion.div>\n\t\t\t\t)) ||\n\t\t\t\t\t``}\n\t\t\t</AnimatePresence>\n\t\t</>\n\t);\n};\n\nexport default Cmd;\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/_cofounder/dev/firstlaunch.tsx",
    "content": "import React, { useEffect, useState } from \"react\";\nimport meta from \"@/_cofounder/meta.json\";\n\nconst FirstLaunch: React.FC = () => {\n\tconst [showOverlay, setShowOverlay] = useState(true); // State to control overlay visibility\n\n\tconst handleCloseOverlay = () => {\n\t\tsetShowOverlay(false);\n\t};\n\n\tuseEffect(() => {\n\t\tconst handleClickOrKeyPress = () => {\n\t\t\tsetShowOverlay(false);\n\t\t};\n\n\t\tdocument.addEventListener(\"click\", handleClickOrKeyPress);\n\t\tdocument.addEventListener(\"keydown\", handleClickOrKeyPress);\n\n\t\treturn () => {\n\t\t\tdocument.removeEventListener(\"click\", handleClickOrKeyPress);\n\t\t\tdocument.removeEventListener(\"keydown\", handleClickOrKeyPress);\n\t\t};\n\t}, []);\n\n\treturn (\n\t\t<>\n\t\t\t{showOverlay && (\n\t\t\t\t<div className=\"fixed inset-0 bg-black bg-opacity-90 backdrop-blur-sm z-[9999] flex justify-center items-start text-white text-2xl p-5 text-center whitespace-pre-line break-words\">\n\t\t\t\t\t<div className=\"mt-20 bg-black rounded rounded-2xl p-8 bg-opacity-80\">\n\t\t\t\t\t\t<div className=\"text-left p-12 pb-0\">\n\t\t\t\t\t\t\t<p className=\"text-base text-right font-light mb-2\">\n\t\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\tclassName=\"duration-200 text-[#ccc] hover:text-white\"\n\t\t\t\t\t\t\t\t\thref=\"https://cofounder.openinterface.ai\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tcofounder.openinterface.ai\n\t\t\t\t\t\t\t\t</a>{\" \"}\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t<p className=\"text-lg text-right font-light\">\n\t\t\t\t\t\t\t\tdev mode{\" \"}\n\t\t\t\t\t\t\t\t<span className=\"ml-1 p-2 bg-[#222] rounded\">{meta.project}</span>\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t<div className=\"my-4 p-8 bg-[#222] text-white rounded\">\n\t\t\t\t\t\t\t\t<p className=\"mt-4\">use ⌘+K | CTRL+K to toggle edit mode</p>\n\t\t\t\t\t\t\t\t<p className=\"mt-4 opacity-30\">\n\t\t\t\t\t\t\t\t\tuse ⌘+L | CTRL+L for control panel (soon)\n\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t<p className=\"my-4 p-8 bg-[#000080] text-base text-white rounded whitespace-pre-line break-words justify\">\n\t\t\t\t\t\t\t\tIf app was just launched, be patient for few seconds / refresh a few\n\t\t\t\t\t\t\t\ttimes\n\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\twhile <strong>confounder/vite-plugin</strong> loads & transforms paths\n\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t<span className=\"text-sm opacity-80\">\n\t\t\t\t\t\t\t\t\tinitial errors are expected to dissapear as it rebuilds\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t\tonClick={handleCloseOverlay}\n\t\t\t\t\t\t\tclassName=\"text-right bg-[#222] rounded rounded-full hover:bg-[#000080] duration-200 mt-5 px-8 py-5 text-xl cursor-pointer\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\tGot it\n\t\t\t\t\t\t</button>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</>\n\t);\n};\n\nexport default FirstLaunch;\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/_cofounder/genui/error-boundary.tsx",
    "content": "// from : https://github.com/gabriel-barreto/react-error-boundary/blob/master/src/error-boundary.tsx\n\nimport { Component, ReactNode } from \"react\";\n\nexport type ErrorBoundaryProps = {\n\tchildren: ReactNode;\n\ttype: string; // added type prop\n\tchoice: string; // added choice prop\n\tsetVersionsWithImportProblems: React.Dispatch<React.SetStateAction<string[]>>; // made state setter prop required\n};\n\ntype ErrorBoundaryState = {\n\terror: boolean;\n};\n\nexport class ErrorBoundary extends Component<\n\tErrorBoundaryProps,\n\tErrorBoundaryState\n> {\n\tconstructor(props: ErrorBoundaryProps) {\n\t\tsuper(props);\n\t\tthis.state = { error: false };\n\t}\n\n\tcomponentDidCatch() {\n\t\tthis.setState({ error: true });\n\t\t// Check if setVersionsWithImportProblems is a function before calling it\n\t\tif (this.props.setVersionsWithImportProblems) {\n\t\t\tthis.props.setVersionsWithImportProblems((prev) => [\n\t\t\t\t...new Set([...prev, this.props.choice]),\n\t\t\t]);\n\t\t}\n\t\tconsole.log({ \"genui:error-boundary\": { choice: this.props.choice } });\n\t}\n\n\trender(): ReactNode {\n\t\tif (this.state.error) {\n\t\t\treturn <></>;\n\t\t}\n\t\treturn this.props.children;\n\t}\n}\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/_cofounder/genui/genui-loading.tsx",
    "content": "import React, { useState, useEffect } from \"react\";\n\nconst GenUiLoading: React.FC = () => {\n\tconst rows = 12;\n\tconst cols = 6;\n\tconst [activeCells, setActiveCells] = useState<number[]>([]);\n\tconst totalCells = rows * cols;\n\tconst trailLength = 6; // Length of the trail\n\n\tuseEffect(() => {\n\t\tlet currentIndex = 0;\n\t\tconst interval = setInterval(() => {\n\t\t\tsetActiveCells((prev) => {\n\t\t\t\tconst newActiveCells = Array(totalCells).fill(0);\n\t\t\t\tfor (let i = 0; i < trailLength; i++) {\n\t\t\t\t\tconst index = (currentIndex - i + totalCells) % totalCells;\n\t\t\t\t\tnewActiveCells[index] = 1 - i * (1 / trailLength); // Decaying opacity\n\t\t\t\t}\n\t\t\t\tcurrentIndex = (currentIndex + 1) % totalCells;\n\t\t\t\treturn newActiveCells;\n\t\t\t});\n\t\t}, 50);\n\n\t\treturn () => clearInterval(interval);\n\t}, [totalCells]);\n\n\treturn (\n\t\t<div className=\"grid grid-cols-12 rounded\">\n\t\t\t{Array.from({ length: totalCells }).map((_, index) => (\n\t\t\t\t<div\n\t\t\t\t\tkey={index}\n\t\t\t\t\tclassName=\"w-full\"\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\theight: \"20px\",\n\t\t\t\t\t\tbackgroundColor: \"black\", //`#${Math.floor((Math.abs(Math.sin(index) * 16777215)) % 16777215).toString(16).padStart(6, '0')}`,\n\t\t\t\t\t\topacity: activeCells[index] || 0,\n\t\t\t\t\t\ttransition: \"opacity 0.5s\",\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t))}\n\t\t</div>\n\t);\n};\n\nexport default GenUiLoading;\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/_cofounder/genui/genui-placeholder.tsx",
    "content": "import React, { useState, useEffect } from \"react\";\ninterface GenUiLoadingProps {\n\t//component: { [key: string]: any };\n\t[key: string]: any;\n}\nconst GenUiPlaceholder: React.FC<GenUiLoadingProps> = (query) => {\n\treturn (\n\t\t<div className=\"text-base my-2 p-4 bg-white text-gray-800 rounded whitespace-pre-line break-words overflow-auto flex items-center\">\n\t\t\t<div role=\"status\" className=\"mr-4\">\n\t\t\t\t<svg\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\tclass=\"w-5 h-5 text-gray-200 animate-spin fill-black\"\n\t\t\t\t\tviewBox=\"0 0 100 101\"\n\t\t\t\t\tfill=\"none\"\n\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t>\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z\"\n\t\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t\t/>\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z\"\n\t\t\t\t\t\tfill=\"currentFill\"\n\t\t\t\t\t/>\n\t\t\t\t</svg>\n\t\t\t\t<span class=\"sr-only\">Loading...</span>\n\t\t\t</div>\n\t\t\t<span>\n\t\t\t\tstream disabled , will update when done\n\t\t\t\t<br />\n\t\t\t\tcheck your cofounder/api server console logs for streams\n\t\t\t</span>\n\t\t</div>\n\t);\n};\n\nexport default GenUiPlaceholder;\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/_cofounder/genui/genui-root.tsx",
    "content": "/*\n  in all components, for better ux for customers:\n    > firestore subscriptions will {mkdir ui components + write meta.json} the second they are starting to generate\n    > just like in infragenui, have loaders to show, but instead of calling on not found/not working, only call on not working\n*/\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/_cofounder/genui/genui-section.tsx.bak",
    "content": "// @ts-ignore\n\nimport React, { useEffect, useRef, useState } from \"react\";\nimport { ErrorBoundary } from \"@/_cofounder/genui/error-boundary\";\nimport GenUiPlaceholder from \"@/_cofounder/genui/genui-placeholder\";\nimport { useScreenshot } from \"use-screenshot-hook\";\nimport { createFileName } from \"use-react-screenshot\";\nimport { RefreshCcw, PencilRuler } from \"lucide-react\";\nimport meta from \"@/_cofounder/meta.json\";\n\ninterface GenUiSectionProps {\n\t//component: { [key: string]: any };\n\t[key: string]: any;\n}\n\nconst GenUiSection: React.FC<GenUiSectionProps> = (query) => {\n\tconst COFOUNDER_LOCAL_API = `{COFOUNDER_LOCAL_API_BASE_URL}`;\n\n\tconst sectionId = query.sectionId;\n\tlet _query = { ...query };\n\tdelete _query.sectionId;\n\t// console.log({ \"genui:section\": query });\n\n\tconst [Component, setComponent] = useState<React.FC | null>(null);\n\tconst [components, setComponents] = useState<{ [key: string]: React.FC }>({});\n\tconst [choice, setChoice] = useState(\"\");\n\tconst [versions, setVersions] = useState<string[]>([]);\n\tconst [versionsWithImportProblems, setVersionsWithImportProblems] = useState<\n\t\tstring[]\n\t>([]);\n\tconst [loaded, setLoaded] = useState(false);\n\tconst [ready, setReady] = useState(false);\n\tconst [newMenu, setNewMenu] = useState(false);\n\tconst [editUserText, setEditUserText] = useState(\"\");\n\tconst [editUserLayout, setEditUserLayout] = useState(true);\n\n\tconst [inferenceStream, setInferenceStream] = useState(\"\");\n\tconst [processing, setProcessing] = useState(false);\n\n\tconst [isOpenTooltip, setIsOpenTooltip] = useState(false);\n\tconst [isOpenTooltipTab, setIsOpenTooltipTab] = useState(false);\n\tconst [layoutPreviewUrl, setLayoutPreviewUrl] = useState(``);\n\n\t// _____________________________________________________________________\n\tconst [cmdk, setCmdk] = useState(() => {\n\t\t// Retrieve the initial state from local storage or default to false\n\t\tconst savedCmdk = localStorage.getItem(\"cmdkState\");\n\t\treturn savedCmdk === \"true\"; // Convert string to boolean\n\t});\n\n\tuseEffect(() => {\n\t\tconst down = (e: KeyboardEvent) => {\n\t\t\tif (e.key === \"k\" && (e.metaKey || e.ctrlKey)) {\n\t\t\t\te.preventDefault();\n\t\t\t\tsetCmdk((prev) => {\n\t\t\t\t\tconst newState = !prev;\n\t\t\t\t\tlocalStorage.setItem(\"cmdkState\", newState.toString()); // Save the new state to local storage\n\t\t\t\t\treturn newState;\n\t\t\t\t});\n\t\t\t} else if (e.key === \"Escape\") {\n\t\t\t\tsetCmdk(false);\n\t\t\t\tlocalStorage.setItem(\"cmdkState\", \"false\"); // Reset state in local storage\n\t\t\t}\n\t\t};\n\t\tdocument.addEventListener(\"keydown\", down);\n\t\treturn () => document.removeEventListener(\"keydown\", down);\n\t}, []);\n\n\tconst ref = useRef(null);\n\tconst tooltipRef = useRef<HTMLDivElement | null>(null);\n\tconst tooltipTabRef = useRef<HTMLDivElement | null>(null);\n\tconst handleDropdownPositionTooltip = async () => {\n\t\tawait new Promise((resolve) => setTimeout(resolve, 100));\n\t\tconst dropdownRect = tooltipRef.current?.getBoundingClientRect();\n\t\tconsole.log({ dropdownRect });\n\t\tconst dropdownRightX = dropdownRect.x + dropdownRect.width;\n\t\tconst dropdownBottomY = dropdownRect.y + dropdownRect.height;\n\t\tconst screenPadding = 0;\n\n\t\t// Horizontal positioning\n\t\tif (dropdownRect.x < 0) {\n\t\t\ttooltipRef.current.style.left = \"0\";\n\t\t\ttooltipRef.current.style.right = \"auto\";\n\t\t\ttooltipRef.current.style.transform = `translateX(${-dropdownRect.x + screenPadding}px)`;\n\t\t} else if (dropdownRightX > window.innerWidth) {\n\t\t\ttooltipRef.current.style.left = \"auto\";\n\t\t\ttooltipRef.current.style.right = \"0\";\n\t\t\ttooltipRef.current.style.transform = `translateX(${window.outerWidth - dropdownRect.x - screenPadding}px)`;\n\t\t}\n\n\t\t// Vertical positioning\n\t\t/*if (dropdownRect.y < 0) {\n      tooltipRef.current.style.top = '0';\n      tooltipRef.current.style.bottom = 'auto';\n      tooltipRef.current.style.transform += ` translateY(${-dropdownRect.y + screenPadding}px)`;\n    }else if (dropdownBottomY > window.innerHeight ) {\n      tooltipRef.current.style.top = 'auto';\n      tooltipRef.current.style.bottom = '0';\n      tooltipRef.current.style.transform += ` translateY(${(window.innerHeight - dropdownRect.y) - screenPadding}px)`;\n    }*/\n\t};\n\tuseEffect(() => {\n\t\tif (isOpenTooltip) {\n\t\t\thandleDropdownPositionTooltip();\n\t\t}\n\t}, [isOpenTooltip]);\n\n\tuseEffect(() => {\n\t\tif (Component) {\n\t\t\t_delayed_screenshot();\n\t\t}\n\t}, [Component]);\n\n\tconst handleDropdownPositionTooltipTab = () => {\n\t\tconst tooltipRootRect = tooltipRef.current?.getBoundingClientRect();\n\t\tconst dropdownRect = tooltipTabRef.current?.getBoundingClientRect();\n\t\tconsole.log({ dropdownRect });\n\t\tconst dropdownRightX = dropdownRect.x + dropdownRect.width;\n\t\tconst dropdownBottomY = dropdownRect.y + dropdownRect.height;\n\t\tconst screenPadding = 0;\n\n\t\t// Horizontal positioning\n\t\tif (dropdownRect.x < 0) {\n\t\t\ttooltipTabRef.current.style.left = \"0\";\n\t\t\ttooltipTabRef.current.style.right = \"auto\";\n\t\t\ttooltipTabRef.current.style.transform = `translateX(${-dropdownRect.x + screenPadding}px)`;\n\t\t} else if (dropdownRightX > window.outerWidth) {\n\t\t\ttooltipTabRef.current.style.left = \"auto\";\n\t\t\ttooltipTabRef.current.style.right = \"0\";\n\t\t\ttooltipTabRef.current.style.transform = `translateX(${window.outerWidth - dropdownRect.x - tooltipRootRect.width - screenPadding}px)`;\n\t\t}\n\t\t/*\n    // Vertical positioning\n    if (dropdownRect.y < 0) {\n      tooltipTabRef.current.style.top = '0';\n      tooltipTabRef.current.style.bottom = 'auto';\n      tooltipTabRef.current.style.transform += ` translateY(${-dropdownRect.y + screenPadding}px)`;\n    } else if (dropdownBottomY > window.innerHeight) {\n      tooltipTabRef.current.style.top = 'auto';\n      tooltipTabRef.current.style.bottom = '0';\n      tooltipTabRef.current.style.transform += ` translateY(${(window.innerHeight - dropdownRect.y) - screenPadding}px)`;\n    }*/\n\t};\n\tuseEffect(() => {\n\t\tif (isOpenTooltipTab) {\n\t\t\thandleDropdownPositionTooltipTab();\n\t\t}\n\t}, [isOpenTooltipTab]);\n\n\t// _____________________________________________________________________\n\n\tconst { image, takeScreenshot } = useScreenshot({ ref });\n\tconst testScreenshot = () => {\n\t\ttakeScreenshot();\n\t};\n\tasync function _delayed_screenshot() {\n\t\tawait new Promise((resolve) => setTimeout(resolve, 1e3));\n\t\ttakeScreenshot();\n\t}\n\n\tconst download = (image, { name = \"img\", extension = \"png\" } = {}) => {\n\t\tconst a = document.createElement(\"a\");\n\t\ta.href = image;\n\t\ta.download = createFileName(extension, name);\n\t\ta.click();\n\t};\n\tuseEffect(() => {\n\t\tif (image) {\n\t\t\t// download(image, { name: \"lorem-ipsum\", extension: \"png\" });\n\t\t}\n\t}, [image]);\n\n\tconst api_updateVersionPreference = async ({ version }) => {\n\t\ttry {\n\t\t\tawait fetch(`${COFOUNDER_LOCAL_API}/project/actions`, {\n\t\t\t\tmethod: \"POST\",\n\t\t\t\theaders: {\n\t\t\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t\t},\n\t\t\t\tbody: JSON.stringify({\n\t\t\t\t\tproject: meta.project,\n\t\t\t\t\tquery: {\n\t\t\t\t\t\taction: \"update:settings:preferences:versions\",\n\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\tsections: {\n\t\t\t\t\t\t\t\t[sectionId]: `${version}`,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t});\n\t\t} catch (error) {\n\t\t\tconsole.error({ \"genui:callApi:error\": error });\n\t\t}\n\t};\n\n\tconst api_regenerateComponent = async () => {\n\t\tif (processing) return;\n\t\tsetProcessing(true);\n\t\ttry {\n\t\t\tawait fetch(`${COFOUNDER_LOCAL_API}/project/actions`, {\n\t\t\t\tmethod: \"POST\",\n\t\t\t\theaders: {\n\t\t\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t\t},\n\t\t\t\tbody: JSON.stringify({\n\t\t\t\t\tproject: meta.project,\n\t\t\t\t\tquery: {\n\t\t\t\t\t\taction: \"regenerate:ui\",\n\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\tsections: sectionId,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t});\n\t\t} catch (error) {\n\t\t\tconsole.error({ \"genui:callApi:error\": error });\n\t\t}\n\t\tsetProcessing(false);\n\t};\n\n\tconst api_IterateComponent = async () => {\n\t\tif (processing) return;\n\t\tsetProcessing(true);\n\t\ttry {\n\t\t\tawait fetch(`${COFOUNDER_LOCAL_API}/project/actions`, {\n\t\t\t\tmethod: \"POST\",\n\t\t\t\theaders: {\n\t\t\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t\t},\n\t\t\t\tbody: JSON.stringify({\n\t\t\t\t\tproject: meta.project,\n\t\t\t\t\tquery: {\n\t\t\t\t\t\taction: \"iterate:ui\",\n\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\tsections: {\n\t\t\t\t\t\t\t\t[sectionId]: {\n\t\t\t\t\t\t\t\t\tuser: {\n\t\t\t\t\t\t\t\t\t\ttext: editUserText,\n\t\t\t\t\t\t\t\t\t\tattachments: [], // later, can attach image\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tscreenshot: {\n\t\t\t\t\t\t\t\t\t\tbase64: image ? image : false,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\tnew: {\n\t\t\t\t\t\t\t\t\t\tlayout: editUserLayout, // whether to redo layout design or just code\n\t\t\t\t\t\t\t\t\t\tcode: true, // no need to mention but for clarity\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t});\n\t\t} catch (error) {\n\t\t\tconsole.error({ \"genui:callApi:error\": error });\n\t\t}\n\t\tsetProcessing(false);\n\t};\n\n\tconst api_updateComponent = async ({ operation }) => {\n\t\treturn; // <------- debug ; is old method ; update later\n\t\tif (processing) return;\n\t\tsetProcessing(true);\n\t\tlet _query = { ...query };\n\t\tif (operation === `edit`) {\n\t\t\t_query.edit = {\n\t\t\t\tversion: choice,\n\t\t\t\titeration: `${editUserText}`,\n\t\t\t};\n\t\t}\n\t\tsetEditUserText(``);\n\t\ttry {\n\t\t\tconst response = await fetch(`http://localhost:1337/${operation}`, {\n\t\t\t\tmethod: \"POST\",\n\t\t\t\theaders: {\n\t\t\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t\t},\n\t\t\t\tbody: JSON.stringify(_query),\n\t\t\t});\n\n\t\t\tconst reader = response.body.getReader();\n\t\t\tconst decoder = new TextDecoder();\n\t\t\tlet completion = ``;\n\t\t\twhile (true) {\n\t\t\t\tconst { done, value } = await reader.read();\n\t\t\t\tif (done) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tconst chunk = decoder.decode(value);\n\t\t\t\tcompletion += chunk;\n\t\t\t\tsetInferenceStream(completion);\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tconsole.error({ \"genui:callApi:error\": error });\n\t\t}\n\t\tsetProcessing(false);\n\t};\n\n\tconst loadComponent = async () => {\n\t\tif (loaded) return;\n\t\tsetLoaded(true);\n\n\t\t// reset everything\n\t\tsetComponent(null);\n\t\tsetComponents({});\n\t\tsetChoice(\"\");\n\t\tsetVersions([]);\n\t\t// setLoaded(false);\n\t\tsetNewMenu(false);\n\t\tsetInferenceStream(\"\");\n\t\tsetProcessing(false);\n\n\t\ttry {\n\t\t\tconst _meta = await import(\n\t\t\t\t`@/_cofounder/generated/sections/${sectionId}/meta.json`\n\t\t\t);\n\t\t\tconst meta = _meta.default; // Access the default export\n\t\t\t// console.log({ id, choice: meta.choice, versions: meta.versions });\n\n\t\t\tlet loadedComponents: { [key: string]: React.FC } = {};\n\t\t\tlet problematicVersions: string[] = [];\n\t\t\tawait Promise.all(\n\t\t\t\tmeta.versions\n\t\t\t\t\t.sort()\n\t\t\t\t\t.reverse()\n\t\t\t\t\t.map(async (version: string) => {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tconst { default: LoadedVersionComponent } = await import(\n\t\t\t\t\t\t\t\t`@/_cofounder/generated/sections/${sectionId}/${version}.tsx`\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tloadedComponents[version] = LoadedVersionComponent;\n\t\t\t\t\t\t\t// console.log({ \"genui:load:version:success\": version });\n\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t// console.log({ \"genui:load:version:error\": { version, err } });\n\t\t\t\t\t\t\tproblematicVersions.push(version);\n\t\t\t\t\t\t}\n\t\t\t\t\t}),\n\t\t\t);\n\n\t\t\tconst workingVersions = meta.versions.filter(\n\t\t\t\t(v) => !problematicVersions.includes(v),\n\t\t\t);\n\t\t\tsetVersions(workingVersions);\n\t\t\tif (!workingVersions.length) {\n\t\t\t\tthrow new Error(\"no working version found\");\n\t\t\t}\n\t\t\tproblematicVersions.map((_v) => {\n\t\t\t\tdelete loadedComponents[_v];\n\t\t\t});\n\n\t\t\tconst _choice = problematicVersions.includes(meta.choice)\n\t\t\t\t? `${workingVersions[0]}`\n\t\t\t\t: `${meta.choice}`;\n\n\t\t\tsetChoice(_choice);\n\t\t\tsetLayoutPreviewUrl(\n\t\t\t\t`/_cofounder/generated/layouts/sections/${sectionId}.${_choice}.png`,\n\t\t\t);\n\n\t\t\t/*\n      console.log({\n        sectionId: query.sectionId,\n        workingVersions,\n        problematicVersions,\n        choice: workingVersions[0],\n        loadedComponents,\n      });\n      */\n\n\t\t\tsetComponents(loadedComponents);\n\t\t\tsetComponent(() => loadedComponents[_choice]);\n\t\t} catch (e) {\n\t\t\t// console.log({ \"genui:error\": e });\n\t\t\t// await callApi({ operation: `new` });\n\t\t\t/*\n        reload this current react component right here at this point in some way\n      */\n\t\t\tsetLoaded(false);\n\t\t}\n\t\tsetReady(true);\n\t};\n\n\tuseEffect(() => {\n\t\tif (loaded) return;\n\t\tloadComponent();\n\t}, [sectionId, loaded]);\n\n\tconst _delayed_api_updateVersionPreference = async ({ version }) => {\n\t\tawait new Promise((resolve) => setTimeout(resolve, 500));\n\t\tawait api_updateVersionPreference({ version });\n\t};\n\tuseEffect(() => {\n\t\t// should cascade alongside error-boundary to filter out bad components\n\t\tif (versionsWithImportProblems.length) {\n\t\t\tsetVersions((prev) => {\n\t\t\t\tconst filteredVersions = prev.filter(\n\t\t\t\t\t(version) => !versionsWithImportProblems.includes(version),\n\t\t\t\t);\n\t\t\t\tif (\n\t\t\t\t\tfilteredVersions.length &&\n\t\t\t\t\tversionsWithImportProblems.includes(choice)\n\t\t\t\t) {\n\t\t\t\t\tsetComponent(null);\n\t\t\t\t\tsetChoice(\"\");\n\t\t\t\t\tconst newChoice = filteredVersions[0];\n\t\t\t\t\tsetChoice(newChoice);\n\t\t\t\t\tsetComponent(() => components[newChoice]);\n\n\t\t\t\t\t_delayed_api_updateVersionPreference({ version: newChoice });\n\t\t\t\t} else {\n\t\t\t\t\tsetComponent(null);\n\t\t\t\t\tsetChoice(\"\");\n\t\t\t\t}\n\t\t\t\treturn filteredVersions;\n\t\t\t});\n\t\t}\n\t}, [versionsWithImportProblems]);\n\n\tconst handleVersionChange = (version: string) => {\n\t\tconsole.log(`handleVersionChange : ${sectionId} : ${version}`);\n\t\tif (version != choice) {\n\t\t\tsetChoice(version);\n\t\t\tapi_updateVersionPreference({ version });\n\t\t\tsetLayoutPreviewUrl(\n\t\t\t\t`/_cofounder/generated/layouts/sections/${sectionId}.${version}.png`,\n\t\t\t);\n\t\t}\n\t\tsetComponent(() => components[version]);\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t{(!Component || processing) && (\n\t\t\t\t<div className=\"m-1 p-2 bg-gray-100 text-black rounded text-left text-sm\">\n\t\t\t\t\t<div className=\"mb-2\">\n\t\t\t\t\t\tbuilding <span className=\"font-semibold\">{sectionId}</span>\n\t\t\t\t\t\t<span className=\"animate-ping\"> ...</span>\n\t\t\t\t\t</div>\n\t\t\t\t\t{<GenUiPlaceholder /> || ``}\n\t\t\t\t</div>\n\t\t\t)}\n\t\t\t{(loaded && ready && !processing && !versions.length && (\n\t\t\t\t<div className=\"p-2 w-[100vw] bg-red-800 text-white text-sm\">\n\t\t\t\t\tno working version for {sectionId} ; Try to regenerate ?\n\t\t\t\t</div>\n\t\t\t)) ||\n\t\t\t\t\"\"}\n\t\t\t{(versions.length && Component && !processing && (\n\t\t\t\t<div className=\"relative group/section\">\n\t\t\t\t\t<ErrorBoundary\n\t\t\t\t\t\tkey={choice}\n\t\t\t\t\t\ttype=\"sections\"\n\t\t\t\t\t\tchoice={choice}\n\t\t\t\t\t\tsetVersionsWithImportProblems={setVersionsWithImportProblems}\n\t\t\t\t\t>\n\t\t\t\t\t\t{(Component && (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclassName={\n\t\t\t\t\t\t\t\t\tcmdk\n\t\t\t\t\t\t\t\t\t\t? `border-0 group-hover/section:border group-hover/section:border-2 group-hover/section:border-dashed group-hover/section:border-black duration-100 group-hover/section:rounded`\n\t\t\t\t\t\t\t\t\t\t: `border-0`\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\tref={ref}\n\t\t\t\t\t\t\t\t\tkey={choice}\n\t\t\t\t\t\t\t\t\tonMouseOver={() => setIsOpenTooltip(true)}\n\t\t\t\t\t\t\t\t\tonMouseOut={() => setIsOpenTooltip(false)}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Component {...(_query || {})} />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)) || <></>}\n\t\t\t\t\t</ErrorBoundary>\n\t\t\t\t\t{cmdk && (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tref={tooltipRef}\n\t\t\t\t\t\t\tid=\"version_selector_popup\"\n\t\t\t\t\t\t\tclassName=\"absolute top-0 right-0 p-2\n                          border border-4 border-gray-300\n                          bg-white text-black rounded rounded-lg shadow\n                          border\n                          hidden group-hover/section:block opacity-0 group-hover/section:opacity-100\n                          text-left text-xs\n                          min-w-[10vw]\n                          z-0\tgroup-hover/section:z-[9999]\n                          transition-opacity duration-300\"\n\t\t\t\t\t\t\tstyle={{ transform: \"translate(100%, 0%)\" }}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\tsrc={layoutPreviewUrl}\n\t\t\t\t\t\t\t\ttitle=\"Reference layout design generated by Cofounder for this ui component version\"\n\t\t\t\t\t\t\t\talt=\"Reference layout design generated by Cofounder for this ui component version\"\n\t\t\t\t\t\t\t\tclassName=\"w-[200px] h-[200px] object-contain\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t{!processing ? (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\tid=\"test_screenshot\"\n\t\t\t\t\t\t\t\t\t\tclassName=\"flex mb-1 text-left text-xs border-b p-2 bg-gray-50 hover:bg-gray-100 duration-100 w-full\"\n\t\t\t\t\t\t\t\t\t\tonClick={testScreenshot}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\ttest_screenshot\n\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\tid=\"new_generation\"\n\t\t\t\t\t\t\t\t\t\tclassName=\"flex mb-1 text-left text-xs border-b p-2 bg-gray-50 hover:bg-gray-100 duration-100 w-full\"\n\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\tapi_regenerateComponent();\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<RefreshCcw className=\"mr-2 w-4 h-4\" /> New Generation\n\t\t\t\t\t\t\t\t\t</button>\n\n\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\tid=\"new_iteration_group\"\n\t\t\t\t\t\t\t\t\t\tclassName=\"flex flex-col relative\"\n\t\t\t\t\t\t\t\t\t\tonMouseEnter={() => setNewMenu(true)}\n\t\t\t\t\t\t\t\t\t\tonMouseLeave={() => setNewMenu(false)}\n\t\t\t\t\t\t\t\t\t\tonMouseOver={() => setIsOpenTooltipTab(true)}\n\t\t\t\t\t\t\t\t\t\tonMouseOut={() => setIsOpenTooltipTab(false)}\n\t\t\t\t\t\t\t\t\t\tonClick={() => setNewMenu(true)}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\t\tid=\"new_iteration\"\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex text-left text-xs border-b p-2 bg-gray-50 hover:bg-gray-100 duration-100\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<PencilRuler className=\"mr-2 w-4 h-4\" /> Edit\n\t\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t\t{newMenu && (\n\t\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\t\tref={tooltipTabRef}\n\t\t\t\t\t\t\t\t\t\t\t\tid=\"new_iteration_menu\"\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"absolute left-full top-0 bg-white border rounded p-2 shadow-lg min-w-[20vw] max-w-[35vw] break-words\"\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<textarea\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"border rounded p-1 text-xs w-full\"\n\t\t\t\t\t\t\t\t\t\t\t\t\trows={3}\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"describe edits here ...\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={editUserText}\n\t\t\t\t\t\t\t\t\t\t\t\t\tonChange={(e) => setEditUserText(e.target.value)}\n\t\t\t\t\t\t\t\t\t\t\t\t></textarea>\n\n\t\t\t\t\t\t\t\t\t\t\t\t{editUserText.length ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center mt-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<label\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thtmlFor=\"editLayout\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"inline-flex items-center cursor-pointer\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"checkbox\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tid=\"editLayout\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tchecked={editUserLayout}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonChange={(e) => setEditUserLayout(e.target.checked)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"sr-only peer\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"relative w-11 h-6 after:h-5 after:w-5 bg-gray-200 rounded-full peer peer-focus:ring-2 peer-focus:ring-gray-300  peer-checked:bg-[#222] peer-checked:after:translate-x-full after:content-[''] after:absolute after:top-0.5 after:left-1 after:bg-white after:border-gray-300 after:border after:rounded-full after:transition-all\"></div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"ms-3 text-xs text-gray-900 mr-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{editUserLayout ? `Redesign Layout + Code` : `Code Only`}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"mt-2 text-xs bg-[#222] hover:bg-[#000] duration-100 w-full text-white shadow rounded p-2\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tapi_IterateComponent();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tStart\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<></>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<div className=\"animate-pulse text-center\">{`[...] processing [...]`}</div>\n\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t<p className=\"text-xs border-b pb-2 pt-4\">\n\t\t\t\t\t\t\t\t<span className=\"font-semibold\">{sectionId}</span> versions\n\t\t\t\t\t\t\t</p>\n\n\t\t\t\t\t\t\t{versions.map((version) => (\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\tkey={version}\n\t\t\t\t\t\t\t\t\tonClick={() => handleVersionChange(version)}\n\t\t\t\t\t\t\t\t\tonMouseEnter={() => {\n\t\t\t\t\t\t\t\t\t\tsetComponent(() => components[version]);\n\t\t\t\t\t\t\t\t\t\tsetLayoutPreviewUrl(\n\t\t\t\t\t\t\t\t\t\t\t`/_cofounder/generated/layouts/sections/${sectionId}.${version}.png`,\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\tonMouseLeave={() => {\n\t\t\t\t\t\t\t\t\t\tsetComponent(() => components[choice]);\n\t\t\t\t\t\t\t\t\t\tsetLayoutPreviewUrl(\n\t\t\t\t\t\t\t\t\t\t\t`/_cofounder/generated/layouts/sections/${sectionId}.${choice}.png`,\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\tclassName=\"cursor-pointer duration-100 hover:bg-gray-300 p-1 hover:p-2 rounded text-xs\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<div className=\"grid grid-cols-2\">\n\t\t\t\t\t\t\t\t\t\t{version === choice ? (\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"font-semibold\">{version}</span>\n\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t<span>{version}</span>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t)) || <></>}\n\t\t</>\n\t);\n};\n\nexport default GenUiSection;\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/_cofounder/genui/genui-view.tsx",
    "content": "// @ts-ignore\n\nimport React, { useEffect, useRef, useState } from \"react\";\nimport { ErrorBoundary } from \"@/_cofounder/genui/error-boundary\";\nimport GenUiPlaceholder from \"@/_cofounder/genui/genui-placeholder\";\nimport { useScreenshot } from \"use-screenshot-hook\";\nimport { createFileName } from \"use-react-screenshot\";\nimport { RefreshCcw, PencilRuler } from \"lucide-react\";\nimport meta from \"@/_cofounder/meta.json\";\n\ninterface GenUiViewProps {\n\t//component: { [key: string]: any };\n\t[key: string]: any;\n}\n\nconst GenUiView: React.FC<GenUiViewProps> = (query) => {\n\tconst COFOUNDER_LOCAL_API = `{COFOUNDER_LOCAL_API_BASE_URL}`;\n\n\tconst viewId = query.viewId;\n\tlet _query = { ...query };\n\tdelete _query.viewId;\n\n\tconst [Component, setComponent] = useState<React.FC | null>(null);\n\tconst [components, setComponents] = useState<{ [key: string]: React.FC }>({});\n\tconst [choice, setChoice] = useState(\"\");\n\tconst [versions, setVersions] = useState<string[]>([]);\n\tconst [versionsWithImportProblems, setVersionsWithImportProblems] = useState<\n\t\tstring[]\n\t>([]);\n\tconst [loaded, setLoaded] = useState(false);\n\tconst [ready, setReady] = useState(false);\n\tconst [newMenu, setNewMenu] = useState(false);\n\tconst [editUserText, setEditUserText] = useState(\"\");\n\tconst [editEnableDesigner, setEditEnableDesigner] = useState(true);\n\n\tconst [inferenceStream, setInferenceStream] = useState(\"\");\n\tconst [processing, setProcessing] = useState(false);\n\n\tconst [isOpenTooltip, setIsOpenTooltip] = useState(false);\n\tconst [isOpenTooltipTab, setIsOpenTooltipTab] = useState(false);\n\tconst [layoutPreviewUrl, setLayoutPreviewUrl] = useState(``);\n\tconst [layoutPreviewBlob, setLayoutPreviewBlob] = useState(``);\n\n\t// _____________________________________________________________________\n\tconst [cmdk, setCmdk] = useState(() => {\n\t\t// Retrieve the initial state from local storage or default to false\n\t\t// const savedCmdk = localStorage.getItem(\"cmdkState\");\n\t\t// return savedCmdk === \"true\"; // Convert string to boolean\n\t\tconst savedCmdk = false;\n\t\treturn savedCmdk;\n\t});\n\n\tuseEffect(() => {\n\t\tconst down = (e: KeyboardEvent) => {\n\t\t\tif (e.key === \"k\" && (e.metaKey || e.ctrlKey)) {\n\t\t\t\te.preventDefault();\n\t\t\t\tsetCmdk((prev) => {\n\t\t\t\t\tconst newState = !prev;\n\t\t\t\t\t// localStorage.setItem(\"cmdkState\", newState.toString()); // Save the new state to local storage\n\t\t\t\t\treturn newState;\n\t\t\t\t});\n\t\t\t} else if (e.key === \"Escape\") {\n\t\t\t\tsetCmdk(false);\n\t\t\t\t// localStorage.setItem(\"cmdkState\", \"false\"); // Reset state in local storage\n\t\t\t}\n\t\t};\n\t\tdocument.addEventListener(\"keydown\", down);\n\t\treturn () => document.removeEventListener(\"keydown\", down);\n\t}, []);\n\n\tconst ref = useRef(null);\n\tconst tooltipRef = useRef<HTMLDivElement | null>(null);\n\tconst tooltipTabRef = useRef<HTMLDivElement | null>(null);\n\n\tuseEffect(() => {\n\t\tif (Component) {\n\t\t\t_delayed_screenshot();\n\t\t}\n\t}, [Component]);\n\n\t// _____________________________________________________________________\n\n\tconst { image, takeScreenshot } = useScreenshot({ ref });\n\tconst testScreenshot = () => {\n\t\ttakeScreenshot();\n\t};\n\tasync function _delayed_screenshot() {\n\t\tawait new Promise((resolve) => setTimeout(resolve, 1e3));\n\t\ttakeScreenshot();\n\t}\n\n\tconst download = (image, { name = \"img\", extension = \"png\" } = {}) => {\n\t\tconst a = document.createElement(\"a\");\n\t\ta.href = image;\n\t\ta.download = createFileName(extension, name);\n\t\ta.click();\n\t};\n\tuseEffect(() => {\n\t\tif (image) {\n\t\t\t// download(image, { name: \"lorem-ipsum\", extension: \"png\" });\n\t\t}\n\t}, [image]);\n\n\tuseEffect(() => {\n\t\tconst loadLayoutPreview = async () => {\n\t\t\tif (layoutPreviewUrl.length > 0) {\n\t\t\t\tsetLayoutPreviewBlob(\"\");\n\t\t\t\ttry {\n\t\t\t\t\tconst layoutPreviewModule = new URL(layoutPreviewUrl, import.meta.url)\n\t\t\t\t\t\t.href;\n\t\t\t\t\tsetLayoutPreviewBlob(layoutPreviewModule);\n\t\t\t\t\t// check after\n\t\t\t\t\tconst response = await fetch(`http://localhost:5173${layoutPreviewUrl}`, {\n\t\t\t\t\t\tmethod: \"HEAD\",\n\t\t\t\t\t});\n\t\t\t\t\tif (\n\t\t\t\t\t\t!response.ok ||\n\t\t\t\t\t\t!response.headers.get(\"content-type\")?.includes(\"image\")\n\t\t\t\t\t) {\n\t\t\t\t\t\tsetLayoutPreviewBlob(\"\");\n\t\t\t\t\t\t// console.log(\"> fetched resource is not an image ; probably empty, skipping preview layout assignment\");\n\t\t\t\t\t}\n\t\t\t\t} catch (error) {\n\t\t\t\t\tconsole.error(\"no layout preview\", error);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tloadLayoutPreview();\n\t}, [layoutPreviewUrl]);\n\n\tconst api_updateVersionPreference = async ({ version }) => {\n\t\ttry {\n\t\t\tawait fetch(`${COFOUNDER_LOCAL_API}/project/actions`, {\n\t\t\t\tmethod: \"POST\",\n\t\t\t\theaders: {\n\t\t\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t\t},\n\t\t\t\tbody: JSON.stringify({\n\t\t\t\t\tproject: meta.project,\n\t\t\t\t\tquery: {\n\t\t\t\t\t\taction: \"update:settings:preferences:versions\",\n\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\tviews: {\n\t\t\t\t\t\t\t\t[viewId]: `${version}`,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t});\n\t\t} catch (error) {\n\t\t\tconsole.error({ \"genui:callApi:error\": error });\n\t\t}\n\t};\n\n\tconst api_regenerateComponent = async () => {\n\t\tif (processing) return;\n\t\tsetProcessing(true);\n\t\ttry {\n\t\t\tawait fetch(`${COFOUNDER_LOCAL_API}/project/actions`, {\n\t\t\t\tmethod: \"POST\",\n\t\t\t\theaders: {\n\t\t\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t\t},\n\t\t\t\tbody: JSON.stringify({\n\t\t\t\t\tproject: meta.project,\n\t\t\t\t\tquery: {\n\t\t\t\t\t\taction: \"regenerate:ui\",\n\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\tviews: viewId,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t});\n\t\t} catch (error) {\n\t\t\tconsole.error({ \"genui:callApi:error\": error });\n\t\t}\n\t\tsetProcessing(false);\n\t};\n\n\tconst api_iterateComponent = async () => {\n\t\tif (processing) return;\n\t\tsetProcessing(true);\n\t\ttry {\n\t\t\tawait fetch(`${COFOUNDER_LOCAL_API}/project/actions`, {\n\t\t\t\tmethod: \"POST\",\n\t\t\t\theaders: {\n\t\t\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t\t},\n\t\t\t\tbody: JSON.stringify({\n\t\t\t\t\tproject: meta.project,\n\t\t\t\t\tquery: {\n\t\t\t\t\t\taction: \"iterate:ui\",\n\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\tviews: {\n\t\t\t\t\t\t\t\t[viewId]: {\n\t\t\t\t\t\t\t\t\t[choice]: {\n\t\t\t\t\t\t\t\t\t\tnotes: {\n\t\t\t\t\t\t\t\t\t\t\ttext: editUserText,\n\t\t\t\t\t\t\t\t\t\t\tattachments: [], // later, can attach extra image dragged into dropzone\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\tscreenshot: {\n\t\t\t\t\t\t\t\t\t\t\tbase64: image ? image : false,\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\tdesigner: editEnableDesigner,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t});\n\t\t} catch (error) {\n\t\t\tconsole.error({ \"genui:callApi:error\": error });\n\t\t}\n\t\tsetProcessing(false);\n\t};\n\n\tconst api_updateComponent = async ({ operation }) => {\n\t\treturn; // <------- debug ; is old method ; update later\n\t\tif (processing) return;\n\t\tsetProcessing(true);\n\t\tlet _query = { ...query };\n\t\tif (operation === `edit`) {\n\t\t\t_query.edit = {\n\t\t\t\tversion: choice,\n\t\t\t\titeration: `${editUserText}`,\n\t\t\t};\n\t\t}\n\t\tsetEditUserText(``);\n\t\ttry {\n\t\t\tconst response = await fetch(`http://localhost:1337/${operation}`, {\n\t\t\t\tmethod: \"POST\",\n\t\t\t\theaders: {\n\t\t\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t\t},\n\t\t\t\tbody: JSON.stringify(_query),\n\t\t\t});\n\n\t\t\tconst reader = response.body.getReader();\n\t\t\tconst decoder = new TextDecoder();\n\t\t\tlet completion = ``;\n\t\t\twhile (true) {\n\t\t\t\tconst { done, value } = await reader.read();\n\t\t\t\tif (done) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tconst chunk = decoder.decode(value);\n\t\t\t\tcompletion += chunk;\n\t\t\t\tsetInferenceStream(completion);\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tconsole.error({ \"genui:callApi:error\": error });\n\t\t}\n\t\tsetProcessing(false);\n\t};\n\n\tconst loadComponent = async () => {\n\t\tif (loaded) return;\n\t\tsetLoaded(true);\n\n\t\t// reset everything\n\t\tsetComponent(null);\n\t\tsetComponents({});\n\t\tsetChoice(\"\");\n\t\tsetVersions([]);\n\t\tsetLoaded(false);\n\t\tsetNewMenu(false);\n\t\tsetInferenceStream(\"\");\n\t\tsetProcessing(false);\n\n\t\ttry {\n\t\t\tconst _meta = await import(\n\t\t\t\t`@/_cofounder/generated/views/${viewId}/meta.json`\n\t\t\t);\n\t\t\tconst meta = _meta.default; // Access the default export\n\t\t\t// console.log({ id, choice: meta.choice, versions: meta.versions });\n\n\t\t\tlet loadedComponents: { [key: string]: React.FC } = {};\n\t\t\tlet problematicVersions: string[] = [];\n\t\t\tawait Promise.all(\n\t\t\t\tmeta.versions\n\t\t\t\t\t.sort((a, b) => {\n\t\t\t\t\t\tif (a === \"empty\") return -1;\n\t\t\t\t\t\tif (b === \"empty\") return 1;\n\t\t\t\t\t\treturn a.localeCompare(b);\n\t\t\t\t\t})\n\t\t\t\t\t.reverse()\n\t\t\t\t\t.map(async (version: string) => {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tconst { default: LoadedVersionComponent } = await import(\n\t\t\t\t\t\t\t\t`@/_cofounder/generated/views/${viewId}/${version}.tsx`\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tloadedComponents[version] = LoadedVersionComponent;\n\t\t\t\t\t\t\t// console.log({ \"genui:load:version:success\": version });\n\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t// console.log({ \"genui:load:version:error\": { version, err } });\n\t\t\t\t\t\t\tproblematicVersions.push(version);\n\t\t\t\t\t\t}\n\t\t\t\t\t}),\n\t\t\t);\n\n\t\t\tconst workingVersions = meta.versions.filter(\n\t\t\t\t(v) => !problematicVersions.includes(v),\n\t\t\t);\n\t\t\tsetVersions(workingVersions);\n\t\t\tif (!workingVersions.length) {\n\t\t\t\tthrow new Error(\"no working version found\");\n\t\t\t}\n\t\t\tproblematicVersions.map((_v) => {\n\t\t\t\tdelete loadedComponents[_v];\n\t\t\t});\n\n\t\t\tconst _choice = problematicVersions.includes(meta.choice)\n\t\t\t\t? `${workingVersions[0]}`\n\t\t\t\t: `${meta.choice}`;\n\n\t\t\tsetChoice(_choice);\n\n\t\t\tsetLayoutPreviewUrl(\n\t\t\t\t`/_cofounder/generated/layouts/views/${viewId}.${_choice}.png`,\n\t\t\t);\n\n\t\t\t/*\n\t\t\tconsole.log({\n\t\t\t\tviewId: query.viewId,\n\t\t\t\tworkingVersions,\n\t\t\t\tproblematicVersions,\n\t\t\t\tchoice: workingVersions[0],\n\t\t\t\tloadedComponents,\n\t\t\t});\n\t\t\t*/\n\n\t\t\tsetComponents(loadedComponents);\n\t\t\tsetComponent(() => loadedComponents[_choice]);\n\t\t} catch (e) {\n\t\t\t// console.log({ \"genui:error\": e });\n\t\t\t// await callApi({ operation: `new` });\n\t\t\t/*\n\t\t\t\treload this current react component right here at this point in some way\n\t\t\t*/\n\t\t\tsetLoaded(false);\n\t\t}\n\t\tsetReady(true);\n\t};\n\n\tuseEffect(() => {\n\t\tif (loaded) return;\n\t\tloadComponent();\n\t}, [viewId, loaded]);\n\n\tconst _delayed_api_updateVersionPreference = async ({ version }) => {\n\t\tawait new Promise((resolve) => setTimeout(resolve, 500));\n\t\tawait api_updateVersionPreference({ version });\n\t};\n\tuseEffect(() => {\n\t\t// should cascade alongside error-boundary to filter out bad components\n\t\tif (versionsWithImportProblems.length) {\n\t\t\tsetVersions((prev) => {\n\t\t\t\tconst filteredVersions = prev.filter(\n\t\t\t\t\t(version) => !versionsWithImportProblems.includes(version),\n\t\t\t\t);\n\t\t\t\tif (\n\t\t\t\t\tfilteredVersions.length &&\n\t\t\t\t\tversionsWithImportProblems.includes(choice)\n\t\t\t\t) {\n\t\t\t\t\tsetComponent(null);\n\t\t\t\t\tsetChoice(\"\");\n\t\t\t\t\tconst newChoice = filteredVersions[0];\n\t\t\t\t\tsetChoice(newChoice);\n\t\t\t\t\tsetComponent(() => components[newChoice]);\n\n\t\t\t\t\t_delayed_api_updateVersionPreference({ version: newChoice });\n\t\t\t\t} else {\n\t\t\t\t\tsetComponent(null);\n\t\t\t\t\tsetChoice(\"\");\n\t\t\t\t}\n\t\t\t\treturn filteredVersions;\n\t\t\t});\n\t\t}\n\t}, [versionsWithImportProblems]);\n\n\tconst handleVersionChange = (version: string) => {\n\t\tconsole.log(`handleVersionChange : ${viewId} : ${version}`);\n\t\tif (version != choice) {\n\t\t\tsetChoice(version);\n\t\t\tapi_updateVersionPreference({ version });\n\t\t\tsetLayoutPreviewUrl(\n\t\t\t\t`/_cofounder/generated/layouts/views/${viewId}.${version}.png`,\n\t\t\t);\n\t\t}\n\t\tsetComponent(() => components[version]);\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t{processing && (\n\t\t\t\t<div className=\"m-2 p-4 bg-gray-100 text-black rounded text-left text-base\">\n\t\t\t\t\t<div className=\"mb-2\">\n\t\t\t\t\t\tbuilding <span className=\"font-semibold\">{viewId}</span>\n\t\t\t\t\t\t<span className=\"animate-ping\"> ...</span>\n\t\t\t\t\t</div>\n\t\t\t\t\t{<GenUiPlaceholder /> || ``}\n\t\t\t\t</div>\n\t\t\t)}\n\t\t\t{(loaded && ready && !processing && !versions.length && (\n\t\t\t\t<div className=\"m-2 p-4 w-[80vw] mx-auto bg-[#333] rounded rounded-xl text-white text-sm\">\n\t\t\t\t\t<div className=\"p-2\">\n\t\t\t\t\t\tno working version for <strong>{viewId}</strong> ; Try to regenerate ?\n\t\t\t\t\t</div>\n\t\t\t\t\t<button\n\t\t\t\t\t\tid=\"new_generation\"\n\t\t\t\t\t\tclassName=\"flex mb-1 rounded text-left text-sm p-4 bg-[#000080] hover:bg-[#0000a0] duration-100 w-full max-w-[30vw]\"\n\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\tapi_regenerateComponent();\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t<RefreshCcw className=\"mr-2 w-4 h-4\" />\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\tNew Generation\n\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t<span className=\"text-xs opacity-50\">\n\t\t\t\t\t\t\t\t{\"might trigger 2 passes : recode -> redesign\"}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t)) ||\n\t\t\t\t\"\"}\n\t\t\t{(versions.length && Component && (\n\t\t\t\t<div className=\"relative group/view\">\n\t\t\t\t\t<ErrorBoundary\n\t\t\t\t\t\tkey={choice}\n\t\t\t\t\t\ttype=\"views\"\n\t\t\t\t\t\tchoice={choice}\n\t\t\t\t\t\tsetVersionsWithImportProblems={setVersionsWithImportProblems}\n\t\t\t\t\t>\n\t\t\t\t\t\t{(Component && (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclassName={\n\t\t\t\t\t\t\t\t\tcmdk\n\t\t\t\t\t\t\t\t\t\t? `border-0 group-hover/view:border group-hover/view:border-2 group-hover/view:border-dashed group-hover/view:border-black duration-100 group-hover/view:rounded`\n\t\t\t\t\t\t\t\t\t\t: `border-0`\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\tref={ref}\n\t\t\t\t\t\t\t\t\tkey={choice}\n\t\t\t\t\t\t\t\t\tonMouseOver={() => setIsOpenTooltip(true)}\n\t\t\t\t\t\t\t\t\tonMouseOut={() => setIsOpenTooltip(false)}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Component {...(_query || {})} />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)) || <></>}\n\t\t\t\t\t</ErrorBoundary>\n\t\t\t\t\t{cmdk && (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tref={tooltipRef}\n\t\t\t\t\t\t\tid=\"version_selector_popup\"\n\t\t\t\t\t\t\tclassName=\"absolute top-2 right-2 p-2\n                          border border-4 border-gray-300\n                          bg-white text-black rounded rounded-lg shadow\n                          border\n                          hidden group-hover/view:block opacity-0 group-hover/view:opacity-100\n                          text-left text-xs\n                          min-w-[40vw] lg:min-w-[10vw]\n                          z-0\tgroup-hover/view:z-[9999]\n\t\t\t\t\t\t\t\t\t\t\t\t\tshadow shadow-xl\n                          transition-opacity duration-300\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<p className=\"text-xs border-b pb-2 my-2\">\n\t\t\t\t\t\t\t\t<span className=\"font-semibold\">{viewId}</span> versions\n\t\t\t\t\t\t\t</p>\n\n\t\t\t\t\t\t\t{!processing ? (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\tid=\"new_generation\"\n\t\t\t\t\t\t\t\t\t\tclassName=\"flex mb-1 text-left text-xs border-b p-2 bg-gray-50 hover:bg-gray-100 duration-100 w-full\"\n\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\tapi_regenerateComponent();\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<RefreshCcw className=\"mr-2 w-4 h-4\" />\n\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t\t\t\tNew Generation\n\t\t\t\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-xs opacity-50\">\n\t\t\t\t\t\t\t\t\t\t\t\t{\"might trigger 2 passes : recode -> redesign\"}\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t</button>\n\n\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\tid=\"new_iteration_group\"\n\t\t\t\t\t\t\t\t\t\tclassName=\"flex flex-col relative\"\n\t\t\t\t\t\t\t\t\t\tonMouseEnter={() => setNewMenu(true)}\n\t\t\t\t\t\t\t\t\t\tonMouseLeave={() => setNewMenu(false)}\n\t\t\t\t\t\t\t\t\t\tonMouseOver={() => setIsOpenTooltipTab(true)}\n\t\t\t\t\t\t\t\t\t\tonMouseOut={() => setIsOpenTooltipTab(false)}\n\t\t\t\t\t\t\t\t\t\tonClick={() => setNewMenu(true)}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\t\tid=\"new_iteration\"\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex text-left text-xs border-b p-2 bg-gray-50 hover:bg-gray-100 duration-100\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<PencilRuler className=\"mr-2 w-4 h-4\" />\n\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t\t\t\t\tEdit\n\t\t\t\t\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-xs opacity-50\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\"new iteration from extra notes & screenshot\"}\n\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t\t{newMenu && (\n\t\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\t\tref={tooltipTabRef}\n\t\t\t\t\t\t\t\t\t\t\t\tid=\"new_iteration_menu\"\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"absolute right-0 top-10 md:right-full md:top-0 bg-white border rounded p-2 shadow-lg\n\t\t\t\t\t\t\t\t\t\t\t\tmin-w-[60vw] max-w-[60vw] md:min-w-[30vw] md:max-w-[60vw] break-words\"\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t{image && (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"text-black text-xs py-2 border-b mb-2 text-right opacity-80\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAttached current view screenshot\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsrc={image}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitle=\"Current screenshot of the view\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\talt=\"Current screenshot of the view\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"w-[20vw] h-[20vh] object-contain m-2 mx-auto\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t<textarea\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"border rounded p-2 text-sm w-full\"\n\t\t\t\t\t\t\t\t\t\t\t\t\trows={3}\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"describe edits here ...\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={editUserText}\n\t\t\t\t\t\t\t\t\t\t\t\t\tonChange={(e) => setEditUserText(e.target.value)}\n\t\t\t\t\t\t\t\t\t\t\t\t></textarea>\n\n\t\t\t\t\t\t\t\t\t\t\t\t{editUserText.length ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center my-2 p-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<label\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thtmlFor=\"editLayout\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"inline-flex items-center cursor-pointer\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"checkbox\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tid=\"editLayout\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tchecked={editEnableDesigner}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonChange={(e) => setEditEnableDesigner(e.target.checked)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"sr-only peer\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"relative w-11 h-6 after:h-5 after:w-5 bg-gray-200 rounded-full peer peer-focus:ring-2 peer-focus:ring-gray-300  peer-checked:bg-[#222] peer-checked:after:translate-x-full after:content-[''] after:absolute after:top-0.5 after:left-1 after:bg-white after:border-gray-300 after:border after:rounded-full after:transition-all\"></div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"ms-3 text-sm text-gray-900 mr-2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tRedesign using{\" \"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<strong>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{editEnableDesigner ? `{designer/layoutv1 + code}` : `code`}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</strong>{\" \"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{(!editEnableDesigner && \"only\") || \"\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-xs opacity-80\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{editEnableDesigner\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? `Designer creates a new design before recoding the view`\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: `Useful for ie. quick fixes / adding lightweight packages / ...`}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"mt-2 text-sm bg-[#222] hover:bg-[#000] duration-100 w-full text-white shadow rounded p-2\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tapi_iterateComponent();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tStart\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<></>\n\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<div className=\"animate-pulse text-center\">{`[...] processing [...]`}</div>\n\t\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t\t{!processing &&\n\t\t\t\t\t\t\t\tversions.map((version) => (\n\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\tkey={version}\n\t\t\t\t\t\t\t\t\t\tonClick={() => handleVersionChange(version)}\n\t\t\t\t\t\t\t\t\t\tonMouseEnter={() => {\n\t\t\t\t\t\t\t\t\t\t\tsetComponent(() => components[version]);\n\t\t\t\t\t\t\t\t\t\t\tsetLayoutPreviewUrl(\n\t\t\t\t\t\t\t\t\t\t\t\t`/_cofounder/generated/layouts/views/${viewId}.${version}.png`,\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\tonMouseLeave={() => {\n\t\t\t\t\t\t\t\t\t\t\tsetComponent(() => components[choice]);\n\t\t\t\t\t\t\t\t\t\t\tsetLayoutPreviewUrl(\n\t\t\t\t\t\t\t\t\t\t\t\t`/_cofounder/generated/layouts/views/${viewId}.${choice}.png`,\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\tclassName=\"cursor-pointer duration-100 hover:bg-gray-300 p-1 hover:p-2 rounded text-xs\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<div className=\"grid grid-cols-2\">\n\t\t\t\t\t\t\t\t\t\t\t{choice === version ? (\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"font-semibold\">{version}</span>\n\t\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t\t<span>{version}</span>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t))}\n\n\t\t\t\t\t\t\t{(layoutPreviewUrl?.length && layoutPreviewBlob?.length && (\n\t\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\t\tsrc={layoutPreviewBlob}\n\t\t\t\t\t\t\t\t\ttitle=\"Reference layout design generated by Cofounder for this ui component version\"\n\t\t\t\t\t\t\t\t\talt=\"Reference layout design generated by Cofounder for this ui component version\"\n\t\t\t\t\t\t\t\t\tclassName=\"mx-auto w-[25vw] h-[25vh] object-contain\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t)) || (\n\t\t\t\t\t\t\t\t<div className=\"mx-auto w-[25vw] h-[25vh] object-contain text-xl opacity-40 p-12 whitespace-pre-line break-words\">\n\t\t\t\t\t\t\t\t\tNo reference layout design made for this version\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t)) || <></>}\n\t\t</>\n\t);\n};\n\nexport default GenUiView;\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/_cofounder/genui/genui-view.tsx.bak",
    "content": "// @ts-ignore\n\nimport React, { useEffect, useRef, useState } from \"react\";\nimport { ErrorBoundary } from \"@/_cofounder/genui/error-boundary\";\nimport GenUiPlaceholder from \"@/_cofounder/genui/genui-placeholder\";\nimport { useScreenshot } from \"use-screenshot-hook\";\nimport { createFileName } from \"use-react-screenshot\";\nimport { RefreshCcw, PencilRuler } from \"lucide-react\";\nimport meta from \"@/_cofounder/meta.json\";\n\ninterface GenUiViewProps {\n\t//component: { [key: string]: any };\n\t[key: string]: any;\n}\n\nconst GenUiView: React.FC<GenUiViewProps> = (query) => {\n\tconst COFOUNDER_LOCAL_API = `{COFOUNDER_LOCAL_API_BASE_URL}`;\n\n\tconst viewId = query.viewId;\n\tlet _query = { ...query };\n\tdelete _query.viewId;\n\t// console.log({ \"genui:section\": query });\n\n\tconst [Component, setComponent] = useState<React.FC | null>(null);\n\tconst [components, setComponents] = useState<{ [key: string]: React.FC }>({});\n\tconst [choice, setChoice] = useState<string>(\"\");\n\tconst [versions, setVersions] = useState<string[]>([]);\n\tconst [versionsWithImportProblems, setVersionsWithImportProblems] = useState<\n\t\tstring[]\n\t>([]);\n\tconst [loaded, setLoaded] = useState(false);\n\tconst [ready, setReady] = useState(false);\n\tconst [newMenu, setNewMenu] = useState(false);\n\tconst [editUserText, setEditUserText] = useState(\"\");\n\n\tconst [inferenceStream, setInferenceStream] = useState(\"\");\n\tconst [processing, setProcessing] = useState(false);\n\n\tconst [isOpenTooltip, setIsOpenTooltip] = useState(false);\n\tconst [isOpenTooltipTab, setIsOpenTooltipTab] = useState(false);\n\n\t// _____________________________________________________________________\n\tconst [cmdk, setCmdk] = useState(() => {\n\t\t// Retrieve the initial state from local storage or default to false\n\t\tconst savedCmdk = localStorage.getItem(\"cmdkState\");\n\t\treturn savedCmdk === \"true\"; // Convert string to boolean\n\t});\n\n\tuseEffect(() => {\n\t\tconst down = (e: KeyboardEvent) => {\n\t\t\tif (e.key === \"k\" && (e.metaKey || e.ctrlKey)) {\n\t\t\t\te.preventDefault();\n\t\t\t\tsetCmdk((prev) => {\n\t\t\t\t\tconst newState = !prev;\n\t\t\t\t\tlocalStorage.setItem(\"cmdkState\", newState.toString()); // Save the new state to local storage\n\t\t\t\t\treturn newState;\n\t\t\t\t});\n\t\t\t} else if (e.key === \"Escape\") {\n\t\t\t\tsetCmdk(false);\n\t\t\t\tlocalStorage.setItem(\"cmdkState\", \"false\"); // Reset state in local storage\n\t\t\t}\n\t\t};\n\t\tdocument.addEventListener(\"keydown\", down);\n\t\treturn () => document.removeEventListener(\"keydown\", down);\n\t}, []);\n\n\tconst ref = useRef(null);\n\tconst { image, takeScreenshot } = useScreenshot({ ref });\n\tconst testScreenshot = () => {\n\t\ttakeScreenshot();\n\t};\n\n\tconst download = (image, { name = \"img\", extension = \"png\" } = {}) => {\n\t\tconst a = document.createElement(\"a\");\n\t\ta.href = image;\n\t\ta.download = createFileName(extension, name);\n\t\ta.click();\n\t};\n\tuseEffect(() => {\n\t\tif (image) {\n\t\t\t// console.log({ image })\n\t\t\tdownload(image, { name: \"lorem-ipsum\", extension: \"png\" });\n\t\t}\n\t}, [image]);\n\n\tconst callApi = async ({ operation }) => {\n\t\treturn; // <------- debug ; is old method ; update later\n\t\tif (processing) return;\n\t\tsetProcessing(true);\n\t\tlet _query = { ...query };\n\t\tif (operation === `edit`) {\n\t\t\t_query.edit = {\n\t\t\t\tversion: choice,\n\t\t\t\titeration: `${editUserText}`,\n\t\t\t};\n\t\t}\n\t\tsetEditUserText(``);\n\t\ttry {\n\t\t\tconst response = await fetch(`http://localhost:1337/${operation}`, {\n\t\t\t\tmethod: \"POST\",\n\t\t\t\theaders: {\n\t\t\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t\t},\n\t\t\t\tbody: JSON.stringify(_query),\n\t\t\t});\n\n\t\t\tconst reader = response.body.getReader();\n\t\t\tconst decoder = new TextDecoder();\n\t\t\tlet completion = ``;\n\t\t\twhile (true) {\n\t\t\t\tconst { done, value } = await reader.read();\n\t\t\t\tif (done) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tconst chunk = decoder.decode(value);\n\t\t\t\tcompletion += chunk;\n\t\t\t\tsetInferenceStream(completion);\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tconsole.error({ \"genui:callApi:error\": error });\n\t\t}\n\t\tsetProcessing(false);\n\t};\n\n\tconst loadComponent = async () => {\n\t\tif (loaded) return;\n\t\tsetLoaded(true);\n\n\t\t// reset everything\n\t\tsetComponent(null);\n\t\tsetComponents({});\n\t\tsetChoice(\"\");\n\t\tsetVersions([]);\n\t\tsetLoaded(false);\n\t\tsetNewMenu(false);\n\t\tsetInferenceStream(\"\");\n\t\tsetProcessing(false);\n\n\t\ttry {\n\t\t\tconst _meta = await import(\n\t\t\t\t`@/_cofounder/generated/views/${viewId}/meta.json`\n\t\t\t);\n\t\t\tconst meta = _meta.default; // Access the default export\n\t\t\t// console.log({ id, choice: meta.choice, versions: meta.versions });\n\n\t\t\tlet loadedComponents: { [key: string]: React.FC } = {};\n\t\t\tlet problematicVersions: string[] = [];\n\n\t\t\tawait Promise.all(\n\t\t\t\tmeta.versions\n\t\t\t\t\t.sort()\n\t\t\t\t\t.reverse()\n\t\t\t\t\t.map(async (version: string) => {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t// try fetch first\n\t\t\t\t\t\t\tconst response = await fetch(\n\t\t\t\t\t\t\t\t`@/_cofounder/generated/views/${viewId}/${version}.tsx`,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tconsole.log({ \"debug:genui:view:fetch:response\": response });\n\t\t\t\t\t\t\tif (!response.ok) {\n\t\t\t\t\t\t\t\tthrow new Error(`genui:view:fetchversion:error: ${version}`);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tconst { default: LoadedVersionComponent } = await import(\n\t\t\t\t\t\t\t\t`@/_cofounder/generated/views/${viewId}/${version}.tsx`\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tloadedComponents[version] = LoadedVersionComponent;\n\t\t\t\t\t\t\t// console.log({ \"genui:load:version:success\": version });\n\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\tconsole.log({ \"genui:view:load:version:error\": { version, err } });\n\t\t\t\t\t\t\tproblematicVersions.push(version);\n\t\t\t\t\t\t}\n\t\t\t\t\t}),\n\t\t\t);\n\n\t\t\tconst workingVersions = meta.versions.filter(\n\t\t\t\t(v) => !problematicVersions.includes(v),\n\t\t\t);\n\t\t\tsetVersions(workingVersions);\n\n\t\t\tif (!workingVersions.length) {\n\t\t\t\tthrow new Error(\"no working version found\");\n\t\t\t}\n\t\t\tproblematicVersions.map((_v) => {\n\t\t\t\tdelete loadedComponents[_v];\n\t\t\t});\n\n\t\t\tconst _choice = problematicVersions.includes(meta.choice)\n\t\t\t\t? `${workingVersions[0]}`\n\t\t\t\t: `${meta.choice}`;\n\n\t\t\tsetChoice(_choice);\n\t\t\tsetComponents(loadedComponents);\n\t\t\tsetComponent(() => loadedComponents[_choice]);\n\t\t} catch (e) {\n\t\t\t// console.log({ \"genui:error\": e });\n\t\t\t// await callApi({ operation: `new` });\n\t\t\t/*\n\t\t\t\treload this current react component right here at this point in some way\n\t\t\t*/\n\t\t\tsetLoaded(false);\n\t\t}\n\t};\n\n\tuseEffect(() => {\n\t\tif (loaded) return;\n\t\tloadComponent();\n\t}, [viewId, loaded]);\n\n\tconst _delayed_api_updateVersionPreference = async ({ version }) => {\n\t\tawait new Promise((resolve) => setTimeout(resolve, 500));\n\t\tawait api_updateVersionPreference({ version });\n\t};\n\tuseEffect(() => {\n\t\t// should cascade alongside error-boundary to filter out bad components\n\t\tif (versionsWithImportProblems.length) {\n\t\t\tsetVersions((prev) => {\n\t\t\t\tconst filteredVersions = prev.filter(\n\t\t\t\t\t(version) => !versionsWithImportProblems.includes(version),\n\t\t\t\t);\n\t\t\t\tif (\n\t\t\t\t\tfilteredVersions.length &&\n\t\t\t\t\tversionsWithImportProblems.includes(choice)\n\t\t\t\t) {\n\t\t\t\t\tsetComponent(null);\n\t\t\t\t\tsetChoice(\"\");\n\t\t\t\t\tconst newChoice = filteredVersions[0];\n\t\t\t\t\tsetChoice(newChoice);\n\t\t\t\t\tsetComponent(() => components[newChoice]);\n\t\t\t\t\t_delayed_api_updateVersionPreference({ version: newChoice });\n\t\t\t\t} else {\n\t\t\t\t\tsetComponent(null);\n\t\t\t\t\tsetChoice(\"\");\n\t\t\t\t}\n\t\t\t\treturn filteredVersions;\n\t\t\t});\n\t\t}\n\t}, [versionsWithImportProblems]);\n\n\tconst api_updateVersionPreference = async ({ version }) => {\n\t\ttrue; // do this next\n\t};\n\n\tconst handleVersionChange = (version: string) => {\n\t\tconsole.log(`handleVersionChange : ${viewId} : ${version}`);\n\t\tsetChoice(version);\n\t\tsetComponent(() => components[version]);\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t{cmdk && (\n\t\t\t\t<div className=\"p-2 w-[100vw] bg-black text-white text-sm border-t border-b border-gray-500\">\n\t\t\t\t\t{viewId} : {JSON.stringify({ versions })} :{\" \"}\n\t\t\t\t\t{JSON.stringify({ versionsWithImportProblems })} :{\" \"}\n\t\t\t\t\t{JSON.stringify({ choice })}\n\t\t\t\t\t<br />\n\t\t\t\t</div>\n\t\t\t)}\n\n\t\t\t{(versions.length && Component && !processing && (\n\t\t\t\t<>\n\t\t\t\t\t<ErrorBoundary\n\t\t\t\t\t\tkey={choice}\n\t\t\t\t\t\ttype=\"views\"\n\t\t\t\t\t\tchoice={choice}\n\t\t\t\t\t\tsetVersionsWithImportProblems={setVersionsWithImportProblems}\n\t\t\t\t\t>\n\t\t\t\t\t\t{Component && (\n\t\t\t\t\t\t\t<div ref={ref} key={choice}>\n\t\t\t\t\t\t\t\t<Component {...(_query || {})} />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</ErrorBoundary>\n\t\t\t\t</>\n\t\t\t)) || <></>}\n\n\t\t\t{cmdk && !versions.length && !processing && (\n\t\t\t\t<div className=\"p-2 w-[100vw] bg-red-800 text-white text-sm\">\n\t\t\t\t\tno working version for {viewId} ; Try to regenerate ?\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</>\n\t);\n};\n\nexport default GenUiView;\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/_cofounder/genui/tooltip.tsx",
    "content": "import React, { useState, useRef, useEffect } from \"react\";\n\nconst Tooltip = () => {\n\tconst [isOpen, setIsOpen] = useState(false);\n\tconst tooltipRef = useRef<HTMLDivElement | null>(null);\n\tconst dropdownRef = useRef<HTMLDivElement | null>(null);\n\n\tconst handleDropdownPosition = () => {\n\t\tconst screenPadding = 16;\n\t\tconst placeholderRect = tooltipRef.current?.getBoundingClientRect();\n\t\tconst dropdownRect = dropdownRef.current?.getBoundingClientRect();\n\n\t\tif (!placeholderRect || !dropdownRect) return;\n\n\t\tconst dropdownRightX = dropdownRect.x + dropdownRect.width;\n\t\tconst placeholderRightX = placeholderRect.x + placeholderRect.width;\n\n\t\tif (dropdownRect.x < 0) {\n\t\t\tdropdownRef.current.style.left = \"0\";\n\t\t\tdropdownRef.current.style.right = \"auto\";\n\t\t\tdropdownRef.current.style.transform = `translateX(${-placeholderRect.x + screenPadding}px)`;\n\t\t} else if (dropdownRightX > window.outerWidth) {\n\t\t\tdropdownRef.current.style.left = \"auto\";\n\t\t\tdropdownRef.current.style.right = \"0\";\n\t\t\tdropdownRef.current.style.transform = `translateX(${window.outerWidth - placeholderRightX - screenPadding}px)`;\n\t\t}\n\t};\n\n\tconst toggleTooltip = () => {\n\t\tsetIsOpen(!isOpen);\n\t};\n\n\tuseEffect(() => {\n\t\tif (isOpen) {\n\t\t\thandleDropdownPosition();\n\t\t}\n\t}, [isOpen]);\n\n\treturn (\n\t\t<div className=\"relative inline-flex flex-col justify-center\">\n\t\t\t<div\n\t\t\t\tref={tooltipRef}\n\t\t\t\tclassName=\"tooltip__label cursor-help\"\n\t\t\t\taria-describedby=\"tooltip-demo-content\"\n\t\t\t\tdata-tooltip-placeholder\n\t\t\t\tonMouseOver={() => setIsOpen(true)}\n\t\t\t\tonMouseOut={() => setIsOpen(false)}\n\t\t\t\tonTouchStart={toggleTooltip}\n\t\t\t>\n\t\t\t\tHere is a tooltip label\n\t\t\t</div>\n\t\t\t{isOpen && (\n\t\t\t\t<div\n\t\t\t\t\tref={dropdownRef}\n\t\t\t\t\tclassName=\"tooltip-dropdown absolute top-0 left-1/2 transform -translate-x-1/2 z-10 pt-8\"\n\t\t\t\t\tdata-tooltip-dropdown\n\t\t\t\t>\n\t\t\t\t\t<div\n\t\t\t\t\t\trole=\"tooltip\"\n\t\t\t\t\t\tid=\"tooltip-demo-content\"\n\t\t\t\t\t\tclassName=\"tooltip-dropdown__content bg-black text-white rounded p-2 w-72 text-left\"\n\t\t\t\t\t>\n\t\t\t\t\t\tIt is a long established fact that a reader will be{\" \"}\n\t\t\t\t\t\t<strong>distracted</strong> by the readable content of a page when looking\n\t\t\t\t\t\tat its layout.\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n};\n\nexport default Tooltip;\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/_cofounder/meta.json",
    "content": "{ \"project\": \"foundermatch\" }\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/_cofounder/utils.js",
    "content": ""
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/_cofounder/vite-plugin/index.js",
    "content": "async function editSectionsAndViews({ path, code }) {\n\t// console.dir({ \"_confounder:vite-plugin:editSectionsAndViews\": true });\n\tconst genUi = {\n\t\tsections: false,\n\t\tviews: false,\n\t};\n\tlet newTsx = code\n\t\t.split(`\\n`)\n\t\t.filter((line) => {\n\t\t\tif (line.includes(`@/components/sections/`)) {\n\t\t\t\tif (!genUi.sections) genUi.sections = [];\n\t\t\t\tconst sectionId = line.split(` `)[1];\n\t\t\t\tgenUi.sections = [...new Set([...genUi.sections, sectionId])];\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif (line.includes(`@/components/views/`)) {\n\t\t\t\tif (!genUi.views) genUi.views = [];\n\t\t\t\tconst viewId = line.split(` `)[1];\n\t\t\t\tgenUi.views = [...new Set([...genUi.views, viewId])];\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn true;\n\t\t})\n\t\t.join(`\\n`);\n\tif (genUi.sections) {\n\t\tnewTsx = `import GenUiSection from '@/_cofounder/genui/genui-section';\\n${newTsx}`;\n\t\tfor (let sectionId of genUi.sections) {\n\t\t\tnewTsx = newTsx.replaceAll(\n\t\t\t\t`<${sectionId}`,\n\t\t\t\t`<GenUiSection sectionId=\"${sectionId}\"`,\n\t\t\t);\n\t\t}\n\t}\n\n\tif (genUi.views) {\n\t\tnewTsx = `import GenUiView from '@/_cofounder/genui/genui-view';\\n${newTsx}`;\n\t\tfor (let viewId of genUi.views) {\n\t\t\tnewTsx = newTsx.replaceAll(`<${viewId}`, `<GenUiView viewId=\"${viewId}\"`);\n\t\t}\n\t}\n\t// console.dir({ \"_confounder:vite-plugin:editSectionsAndViews\": { path, newTsx, genUi }, });\n\treturn newTsx;\n}\n\nasync function editViews({ path, code }) {\n\tconst genUi = {\n\t\tviews: false,\n\t};\n\tlet newTsx = code\n\t\t.split(`\\n`)\n\t\t.filter((line) => {\n\t\t\tif (line.includes(`@/components/views/`)) {\n\t\t\t\tif (!genUi.views) genUi.views = [];\n\t\t\t\tconst viewId = line.split(` `)[1];\n\t\t\t\tgenUi.views = [...new Set([...genUi.views, viewId])];\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t})\n\t\t.join(`\\n`);\n\tif (genUi.views) {\n\t\tnewTsx = `import GenUiView from '@/_cofounder/genui/genui-view';\\n${newTsx}`;\n\t\tfor (let viewId of genUi.views) {\n\t\t\tnewTsx = newTsx.replaceAll(`<${viewId}`, `<GenUiView viewId=\"${viewId}\"`);\n\t\t}\n\t}\n\t// console.dir({ \"_confounder:vite-plugin:editViews\": { path, newTsx, genUi } });\n\treturn newTsx;\n}\n\nasync function editSections({ path, code }) {\n\tconst genUi = {\n\t\tsections: false,\n\t};\n\tlet newTsx = code\n\t\t.split(`\\n`)\n\t\t.filter((line) => {\n\t\t\tif (line.includes(`@/components/sections/`)) {\n\t\t\t\tif (!genUi.sections) genUi.sections = [];\n\t\t\t\tconst sectionId = line.split(` `)[1];\n\t\t\t\tgenUi.sections = [...new Set([...genUi.sections, sectionId])];\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t})\n\t\t.join(`\\n`);\n\tif (genUi.sections) {\n\t\tnewTsx = `import GenUiSection from '@/_cofounder/genui/genui-section';\\n${newTsx}`;\n\t\tfor (let sectionId of genUi.sections) {\n\t\t\tnewTsx = newTsx.replaceAll(\n\t\t\t\t`<${sectionId}`,\n\t\t\t\t`<GenUiSection sectionId=\"${sectionId}\"`,\n\t\t\t);\n\t\t}\n\t}\n\t// console.dir({ \"_confounder:vite-plugin:editSections\": { path, newTsx, genUi } });\n\treturn newTsx;\n}\n\nexport default {\n\tpre: async function ({ code, path }) {\n\t\t/*\n      change logic here :\n      App tsx will change to GenUiView\n        > GenUiView will call : @/_cofounder/generated/views/\n        > @/_cofounder/generated/views/* will call GenUiSection\n        > GenUiSection will call @/_cofounder/generated/sections/\n    */\n\t\tcode = code.replaceAll(\n\t\t\t`{COFOUNDER_LOCAL_API_BASE_URL}`,\n\t\t\t`http://localhost:4200/api`,\n\t\t);\n\t\tif (path.includes(`src/App.tsx`)) {\n\t\t\treturn await editSectionsAndViews({ path, code });\n\t\t}\n\t\tif (\n\t\t\tpath.includes(`_cofounder/generated/views`) ||\n\t\t\tpath.includes(`_cofounder/generated/sections`)\n\t\t) {\n\t\t\treturn await editSectionsAndViews({ path, code });\n\t\t}\n\t\t/*\n    if (\n      path.includes(`src/App.tsx`)\n      || path.includes(`src/components/views/`)\n      || path.includes(`src/components/sections/`)\n      || path.includes(`@/_cofounder/generated/views/`)\n      || path.includes(`@/_cofounder/generated/sections/`)\n    ) {\n      return await editSectionsAndViews({ path , code });\n    }\n    */\n\t\treturn code;\n\t},\n};\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/components/ui/accordion.tsx",
    "content": "import * as React from \"react\";\nimport * as AccordionPrimitive from \"@radix-ui/react-accordion\";\nimport { ChevronDown } from \"lucide-react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst Accordion = AccordionPrimitive.Root;\n\nconst AccordionItem = React.forwardRef<\n\tReact.ElementRef<typeof AccordionPrimitive.Item>,\n\tReact.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>\n>(({ className, ...props }, ref) => (\n\t<AccordionPrimitive.Item\n\t\tref={ref}\n\t\tclassName={cn(\"border-b\", className)}\n\t\t{...props}\n\t/>\n));\nAccordionItem.displayName = \"AccordionItem\";\n\nconst AccordionTrigger = React.forwardRef<\n\tReact.ElementRef<typeof AccordionPrimitive.Trigger>,\n\tReact.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger>\n>(({ className, children, ...props }, ref) => (\n\t<AccordionPrimitive.Header className=\"flex\">\n\t\t<AccordionPrimitive.Trigger\n\t\t\tref={ref}\n\t\t\tclassName={cn(\n\t\t\t\t\"flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t\t<ChevronDown className=\"h-4 w-4 shrink-0 transition-transform duration-200\" />\n\t\t</AccordionPrimitive.Trigger>\n\t</AccordionPrimitive.Header>\n));\nAccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;\n\nconst AccordionContent = React.forwardRef<\n\tReact.ElementRef<typeof AccordionPrimitive.Content>,\n\tReact.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n\t<AccordionPrimitive.Content\n\t\tref={ref}\n\t\tclassName=\"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down\"\n\t\t{...props}\n\t>\n\t\t<div className={cn(\"pb-4 pt-0\", className)}>{children}</div>\n\t</AccordionPrimitive.Content>\n));\n\nAccordionContent.displayName = AccordionPrimitive.Content.displayName;\n\nexport { Accordion, AccordionItem, AccordionTrigger, AccordionContent };\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/components/ui/alert-dialog.tsx",
    "content": "import * as React from \"react\";\nimport * as AlertDialogPrimitive from \"@radix-ui/react-alert-dialog\";\n\nimport { cn } from \"@/lib/utils\";\nimport { buttonVariants } from \"@/components/ui/button\";\n\nconst AlertDialog = AlertDialogPrimitive.Root;\n\nconst AlertDialogTrigger = AlertDialogPrimitive.Trigger;\n\nconst AlertDialogPortal = AlertDialogPrimitive.Portal;\n\nconst AlertDialogOverlay = React.forwardRef<\n\tReact.ElementRef<typeof AlertDialogPrimitive.Overlay>,\n\tReact.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n\t<AlertDialogPrimitive.Overlay\n\t\tclassName={cn(\n\t\t\t\"fixed inset-0 z-50 bg-black/80  data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t\tref={ref}\n\t/>\n));\nAlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;\n\nconst AlertDialogContent = React.forwardRef<\n\tReact.ElementRef<typeof AlertDialogPrimitive.Content>,\n\tReact.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content>\n>(({ className, ...props }, ref) => (\n\t<AlertDialogPortal>\n\t\t<AlertDialogOverlay />\n\t\t<AlertDialogPrimitive.Content\n\t\t\tref={ref}\n\t\t\tclassName={cn(\n\t\t\t\t\"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-neutral-200 bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg dark:border-neutral-800 dark:bg-neutral-950\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t</AlertDialogPortal>\n));\nAlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;\n\nconst AlertDialogHeader = ({\n\tclassName,\n\t...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n\t<div\n\t\tclassName={cn(\"flex flex-col space-y-2 text-center sm:text-left\", className)}\n\t\t{...props}\n\t/>\n);\nAlertDialogHeader.displayName = \"AlertDialogHeader\";\n\nconst AlertDialogFooter = ({\n\tclassName,\n\t...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n\t<div\n\t\tclassName={cn(\n\t\t\t\"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n);\nAlertDialogFooter.displayName = \"AlertDialogFooter\";\n\nconst AlertDialogTitle = React.forwardRef<\n\tReact.ElementRef<typeof AlertDialogPrimitive.Title>,\n\tReact.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n\t<AlertDialogPrimitive.Title\n\t\tref={ref}\n\t\tclassName={cn(\"text-lg font-semibold\", className)}\n\t\t{...props}\n\t/>\n));\nAlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;\n\nconst AlertDialogDescription = React.forwardRef<\n\tReact.ElementRef<typeof AlertDialogPrimitive.Description>,\n\tReact.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n\t<AlertDialogPrimitive.Description\n\t\tref={ref}\n\t\tclassName={cn(\"text-sm text-neutral-500 dark:text-neutral-400\", className)}\n\t\t{...props}\n\t/>\n));\nAlertDialogDescription.displayName =\n\tAlertDialogPrimitive.Description.displayName;\n\nconst AlertDialogAction = React.forwardRef<\n\tReact.ElementRef<typeof AlertDialogPrimitive.Action>,\n\tReact.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Action>\n>(({ className, ...props }, ref) => (\n\t<AlertDialogPrimitive.Action\n\t\tref={ref}\n\t\tclassName={cn(buttonVariants(), className)}\n\t\t{...props}\n\t/>\n));\nAlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;\n\nconst AlertDialogCancel = React.forwardRef<\n\tReact.ElementRef<typeof AlertDialogPrimitive.Cancel>,\n\tReact.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Cancel>\n>(({ className, ...props }, ref) => (\n\t<AlertDialogPrimitive.Cancel\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\tbuttonVariants({ variant: \"outline\" }),\n\t\t\t\"mt-2 sm:mt-0\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nAlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;\n\nexport {\n\tAlertDialog,\n\tAlertDialogPortal,\n\tAlertDialogOverlay,\n\tAlertDialogTrigger,\n\tAlertDialogContent,\n\tAlertDialogHeader,\n\tAlertDialogFooter,\n\tAlertDialogTitle,\n\tAlertDialogDescription,\n\tAlertDialogAction,\n\tAlertDialogCancel,\n};\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/components/ui/alert.tsx",
    "content": "import * as React from \"react\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst alertVariants = cva(\n\t\"relative w-full rounded-lg border border-neutral-200 p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-neutral-950 dark:border-neutral-800 dark:[&>svg]:text-neutral-50\",\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tdefault:\n\t\t\t\t\t\"bg-white text-neutral-950 dark:bg-neutral-950 dark:text-neutral-50\",\n\t\t\t\tdestructive:\n\t\t\t\t\t\"border-red-500/50 text-red-500 dark:border-red-500 [&>svg]:text-red-500 dark:border-red-900/50 dark:text-red-900 dark:dark:border-red-900 dark:[&>svg]:text-red-900\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tvariant: \"default\",\n\t\t},\n\t},\n);\n\nconst Alert = React.forwardRef<\n\tHTMLDivElement,\n\tReact.HTMLAttributes<HTMLDivElement> & VariantProps<typeof alertVariants>\n>(({ className, variant, ...props }, ref) => (\n\t<div\n\t\tref={ref}\n\t\trole=\"alert\"\n\t\tclassName={cn(alertVariants({ variant }), className)}\n\t\t{...props}\n\t/>\n));\nAlert.displayName = \"Alert\";\n\nconst AlertTitle = React.forwardRef<\n\tHTMLParagraphElement,\n\tReact.HTMLAttributes<HTMLHeadingElement>\n>(({ className, ...props }, ref) => (\n\t<h5\n\t\tref={ref}\n\t\tclassName={cn(\"mb-1 font-medium leading-none tracking-tight\", className)}\n\t\t{...props}\n\t/>\n));\nAlertTitle.displayName = \"AlertTitle\";\n\nconst AlertDescription = React.forwardRef<\n\tHTMLParagraphElement,\n\tReact.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => (\n\t<div\n\t\tref={ref}\n\t\tclassName={cn(\"text-sm [&_p]:leading-relaxed\", className)}\n\t\t{...props}\n\t/>\n));\nAlertDescription.displayName = \"AlertDescription\";\n\nexport { Alert, AlertTitle, AlertDescription };\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/components/ui/aspect-ratio.tsx",
    "content": "import * as AspectRatioPrimitive from \"@radix-ui/react-aspect-ratio\";\n\nconst AspectRatio = AspectRatioPrimitive.Root;\n\nexport { AspectRatio };\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/components/ui/avatar.tsx",
    "content": "import * as React from \"react\";\nimport * as AvatarPrimitive from \"@radix-ui/react-avatar\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst Avatar = React.forwardRef<\n\tReact.ElementRef<typeof AvatarPrimitive.Root>,\n\tReact.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>\n>(({ className, ...props }, ref) => (\n\t<AvatarPrimitive.Root\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nAvatar.displayName = AvatarPrimitive.Root.displayName;\n\nconst AvatarImage = React.forwardRef<\n\tReact.ElementRef<typeof AvatarPrimitive.Image>,\n\tReact.ComponentPropsWithoutRef<typeof AvatarPrimitive.Image>\n>(({ className, ...props }, ref) => (\n\t<AvatarPrimitive.Image\n\t\tref={ref}\n\t\tclassName={cn(\"aspect-square h-full w-full\", className)}\n\t\t{...props}\n\t/>\n));\nAvatarImage.displayName = AvatarPrimitive.Image.displayName;\n\nconst AvatarFallback = React.forwardRef<\n\tReact.ElementRef<typeof AvatarPrimitive.Fallback>,\n\tReact.ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback>\n>(({ className, ...props }, ref) => (\n\t<AvatarPrimitive.Fallback\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"flex h-full w-full items-center justify-center rounded-full bg-neutral-100 dark:bg-neutral-800\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nAvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;\n\nexport { Avatar, AvatarImage, AvatarFallback };\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/components/ui/badge.tsx",
    "content": "import * as React from \"react\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst badgeVariants = cva(\n\t\"inline-flex items-center rounded-full border border-neutral-200 px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-neutral-950 focus:ring-offset-2 dark:border-neutral-800 dark:focus:ring-neutral-300\",\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tdefault:\n\t\t\t\t\t\"border-transparent bg-neutral-900 text-neutral-50 hover:bg-neutral-900/80 dark:bg-neutral-50 dark:text-neutral-900 dark:hover:bg-neutral-50/80\",\n\t\t\t\tsecondary:\n\t\t\t\t\t\"border-transparent bg-neutral-100 text-neutral-900 hover:bg-neutral-100/80 dark:bg-neutral-800 dark:text-neutral-50 dark:hover:bg-neutral-800/80\",\n\t\t\t\tdestructive:\n\t\t\t\t\t\"border-transparent bg-red-500 text-neutral-50 hover:bg-red-500/80 dark:bg-red-900 dark:text-neutral-50 dark:hover:bg-red-900/80\",\n\t\t\t\toutline: \"text-neutral-950 dark:text-neutral-50\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tvariant: \"default\",\n\t\t},\n\t},\n);\n\nexport interface BadgeProps\n\textends React.HTMLAttributes<HTMLDivElement>,\n\t\tVariantProps<typeof badgeVariants> {}\n\nfunction Badge({ className, variant, ...props }: BadgeProps) {\n\treturn (\n\t\t<div className={cn(badgeVariants({ variant }), className)} {...props} />\n\t);\n}\n\nexport { Badge, badgeVariants };\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/components/ui/breadcrumb.tsx",
    "content": "import * as React from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { ChevronRight, MoreHorizontal } from \"lucide-react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst Breadcrumb = React.forwardRef<\n\tHTMLElement,\n\tReact.ComponentPropsWithoutRef<\"nav\"> & {\n\t\tseparator?: React.ReactNode;\n\t}\n>(({ ...props }, ref) => <nav ref={ref} aria-label=\"breadcrumb\" {...props} />);\nBreadcrumb.displayName = \"Breadcrumb\";\n\nconst BreadcrumbList = React.forwardRef<\n\tHTMLOListElement,\n\tReact.ComponentPropsWithoutRef<\"ol\">\n>(({ className, ...props }, ref) => (\n\t<ol\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"flex flex-wrap items-center gap-1.5 break-words text-sm text-neutral-500 sm:gap-2.5 dark:text-neutral-400\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nBreadcrumbList.displayName = \"BreadcrumbList\";\n\nconst BreadcrumbItem = React.forwardRef<\n\tHTMLLIElement,\n\tReact.ComponentPropsWithoutRef<\"li\">\n>(({ className, ...props }, ref) => (\n\t<li\n\t\tref={ref}\n\t\tclassName={cn(\"inline-flex items-center gap-1.5\", className)}\n\t\t{...props}\n\t/>\n));\nBreadcrumbItem.displayName = \"BreadcrumbItem\";\n\nconst BreadcrumbLink = React.forwardRef<\n\tHTMLAnchorElement,\n\tReact.ComponentPropsWithoutRef<\"a\"> & {\n\t\tasChild?: boolean;\n\t}\n>(({ asChild, className, ...props }, ref) => {\n\tconst Comp = asChild ? Slot : \"a\";\n\n\treturn (\n\t\t<Comp\n\t\t\tref={ref}\n\t\t\tclassName={cn(\n\t\t\t\t\"transition-colors hover:text-neutral-950 dark:hover:text-neutral-50\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\nBreadcrumbLink.displayName = \"BreadcrumbLink\";\n\nconst BreadcrumbPage = React.forwardRef<\n\tHTMLSpanElement,\n\tReact.ComponentPropsWithoutRef<\"span\">\n>(({ className, ...props }, ref) => (\n\t<span\n\t\tref={ref}\n\t\trole=\"link\"\n\t\taria-disabled=\"true\"\n\t\taria-current=\"page\"\n\t\tclassName={cn(\"font-normal text-neutral-950 dark:text-neutral-50\", className)}\n\t\t{...props}\n\t/>\n));\nBreadcrumbPage.displayName = \"BreadcrumbPage\";\n\nconst BreadcrumbSeparator = ({\n\tchildren,\n\tclassName,\n\t...props\n}: React.ComponentProps<\"li\">) => (\n\t<li\n\t\trole=\"presentation\"\n\t\taria-hidden=\"true\"\n\t\tclassName={cn(\"[&>svg]:size-3.5\", className)}\n\t\t{...props}\n\t>\n\t\t{children ?? <ChevronRight />}\n\t</li>\n);\nBreadcrumbSeparator.displayName = \"BreadcrumbSeparator\";\n\nconst BreadcrumbEllipsis = ({\n\tclassName,\n\t...props\n}: React.ComponentProps<\"span\">) => (\n\t<span\n\t\trole=\"presentation\"\n\t\taria-hidden=\"true\"\n\t\tclassName={cn(\"flex h-9 w-9 items-center justify-center\", className)}\n\t\t{...props}\n\t>\n\t\t<MoreHorizontal className=\"h-4 w-4\" />\n\t\t<span className=\"sr-only\">More</span>\n\t</span>\n);\nBreadcrumbEllipsis.displayName = \"BreadcrumbElipssis\";\n\nexport {\n\tBreadcrumb,\n\tBreadcrumbList,\n\tBreadcrumbItem,\n\tBreadcrumbLink,\n\tBreadcrumbPage,\n\tBreadcrumbSeparator,\n\tBreadcrumbEllipsis,\n};\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/components/ui/button.tsx",
    "content": "import * as React from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst buttonVariants = cva(\n\t\"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-white transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-neutral-950 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 dark:ring-offset-neutral-950 dark:focus-visible:ring-neutral-300\",\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tdefault:\n\t\t\t\t\t\"bg-neutral-900 text-neutral-50 hover:bg-neutral-900/90 dark:bg-neutral-50 dark:text-neutral-900 dark:hover:bg-neutral-50/90\",\n\t\t\t\tdestructive:\n\t\t\t\t\t\"bg-red-500 text-neutral-50 hover:bg-red-500/90 dark:bg-red-900 dark:text-neutral-50 dark:hover:bg-red-900/90\",\n\t\t\t\toutline:\n\t\t\t\t\t\"border border-neutral-200 bg-white hover:bg-neutral-100 hover:text-neutral-900 dark:border-neutral-800 dark:bg-neutral-950 dark:hover:bg-neutral-800 dark:hover:text-neutral-50\",\n\t\t\t\tsecondary:\n\t\t\t\t\t\"bg-neutral-100 text-neutral-900 hover:bg-neutral-100/80 dark:bg-neutral-800 dark:text-neutral-50 dark:hover:bg-neutral-800/80\",\n\t\t\t\tghost:\n\t\t\t\t\t\"hover:bg-neutral-100 hover:text-neutral-900 dark:hover:bg-neutral-800 dark:hover:text-neutral-50\",\n\t\t\t\tlink:\n\t\t\t\t\t\"text-neutral-900 underline-offset-4 hover:underline dark:text-neutral-50\",\n\t\t\t},\n\t\t\tsize: {\n\t\t\t\tdefault: \"h-10 px-4 py-2\",\n\t\t\t\tsm: \"h-9 rounded-md px-3\",\n\t\t\t\tlg: \"h-11 rounded-md px-8\",\n\t\t\t\ticon: \"h-10 w-10\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tvariant: \"default\",\n\t\t\tsize: \"default\",\n\t\t},\n\t},\n);\n\nexport interface ButtonProps\n\textends React.ButtonHTMLAttributes<HTMLButtonElement>,\n\t\tVariantProps<typeof buttonVariants> {\n\tasChild?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n\t({ className, variant, size, asChild = false, ...props }, ref) => {\n\t\tconst Comp = asChild ? Slot : \"button\";\n\t\treturn (\n\t\t\t<Comp\n\t\t\t\tclassName={cn(buttonVariants({ variant, size, className }))}\n\t\t\t\tref={ref}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t},\n);\nButton.displayName = \"Button\";\n\nexport { Button, buttonVariants };\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/components/ui/calendar.tsx",
    "content": "import * as React from \"react\";\nimport { ChevronLeft, ChevronRight } from \"lucide-react\";\nimport { DayPicker } from \"react-day-picker\";\n\nimport { cn } from \"@/lib/utils\";\nimport { buttonVariants } from \"@/components/ui/button\";\n\nexport type CalendarProps = React.ComponentProps<typeof DayPicker>;\n\nfunction Calendar({\n\tclassName,\n\tclassNames,\n\tshowOutsideDays = true,\n\t...props\n}: CalendarProps) {\n\treturn (\n\t\t<DayPicker\n\t\t\tshowOutsideDays={showOutsideDays}\n\t\t\tclassName={cn(\"p-3\", className)}\n\t\t\tclassNames={{\n\t\t\t\tmonths: \"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0\",\n\t\t\t\tmonth: \"space-y-4\",\n\t\t\t\tcaption: \"flex justify-center pt-1 relative items-center\",\n\t\t\t\tcaption_label: \"text-sm font-medium\",\n\t\t\t\tnav: \"space-x-1 flex items-center\",\n\t\t\t\tnav_button: cn(\n\t\t\t\t\tbuttonVariants({ variant: \"outline\" }),\n\t\t\t\t\t\"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100\",\n\t\t\t\t),\n\t\t\t\tnav_button_previous: \"absolute left-1\",\n\t\t\t\tnav_button_next: \"absolute right-1\",\n\t\t\t\ttable: \"w-full border-collapse space-y-1\",\n\t\t\t\thead_row: \"flex\",\n\t\t\t\thead_cell:\n\t\t\t\t\t\"text-neutral-500 rounded-md w-9 font-normal text-[0.8rem] dark:text-neutral-400\",\n\t\t\t\trow: \"flex w-full mt-2\",\n\t\t\t\tcell:\n\t\t\t\t\t\"h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-neutral-100/50 [&:has([aria-selected])]:bg-neutral-100 first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20 dark:[&:has([aria-selected].day-outside)]:bg-neutral-800/50 dark:[&:has([aria-selected])]:bg-neutral-800\",\n\t\t\t\tday: cn(\n\t\t\t\t\tbuttonVariants({ variant: \"ghost\" }),\n\t\t\t\t\t\"h-9 w-9 p-0 font-normal aria-selected:opacity-100\",\n\t\t\t\t),\n\t\t\t\tday_range_end: \"day-range-end\",\n\t\t\t\tday_selected:\n\t\t\t\t\t\"bg-neutral-900 text-neutral-50 hover:bg-neutral-900 hover:text-neutral-50 focus:bg-neutral-900 focus:text-neutral-50 dark:bg-neutral-50 dark:text-neutral-900 dark:hover:bg-neutral-50 dark:hover:text-neutral-900 dark:focus:bg-neutral-50 dark:focus:text-neutral-900\",\n\t\t\t\tday_today:\n\t\t\t\t\t\"bg-neutral-100 text-neutral-900 dark:bg-neutral-800 dark:text-neutral-50\",\n\t\t\t\tday_outside:\n\t\t\t\t\t\"day-outside text-neutral-500 opacity-50 aria-selected:bg-neutral-100/50 aria-selected:text-neutral-500 aria-selected:opacity-30 dark:text-neutral-400 dark:aria-selected:bg-neutral-800/50 dark:aria-selected:text-neutral-400\",\n\t\t\t\tday_disabled: \"text-neutral-500 opacity-50 dark:text-neutral-400\",\n\t\t\t\tday_range_middle:\n\t\t\t\t\t\"aria-selected:bg-neutral-100 aria-selected:text-neutral-900 dark:aria-selected:bg-neutral-800 dark:aria-selected:text-neutral-50\",\n\t\t\t\tday_hidden: \"invisible\",\n\t\t\t\t...classNames,\n\t\t\t}}\n\t\t\tcomponents={{\n\t\t\t\tIconLeft: ({ ...props }) => <ChevronLeft className=\"h-4 w-4\" />,\n\t\t\t\tIconRight: ({ ...props }) => <ChevronRight className=\"h-4 w-4\" />,\n\t\t\t}}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\nCalendar.displayName = \"Calendar\";\n\nexport { Calendar };\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/components/ui/card.tsx",
    "content": "import * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst Card = React.forwardRef<\n\tHTMLDivElement,\n\tReact.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n\t<div\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"rounded-lg border border-neutral-200 bg-white text-neutral-950 shadow-sm dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nCard.displayName = \"Card\";\n\nconst CardHeader = React.forwardRef<\n\tHTMLDivElement,\n\tReact.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n\t<div\n\t\tref={ref}\n\t\tclassName={cn(\"flex flex-col space-y-1.5 p-6\", className)}\n\t\t{...props}\n\t/>\n));\nCardHeader.displayName = \"CardHeader\";\n\nconst CardTitle = React.forwardRef<\n\tHTMLParagraphElement,\n\tReact.HTMLAttributes<HTMLHeadingElement>\n>(({ className, ...props }, ref) => (\n\t<h3\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"text-2xl font-semibold leading-none tracking-tight\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nCardTitle.displayName = \"CardTitle\";\n\nconst CardDescription = React.forwardRef<\n\tHTMLParagraphElement,\n\tReact.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => (\n\t<p\n\t\tref={ref}\n\t\tclassName={cn(\"text-sm text-neutral-500 dark:text-neutral-400\", className)}\n\t\t{...props}\n\t/>\n));\nCardDescription.displayName = \"CardDescription\";\n\nconst CardContent = React.forwardRef<\n\tHTMLDivElement,\n\tReact.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n\t<div ref={ref} className={cn(\"p-6 pt-0\", className)} {...props} />\n));\nCardContent.displayName = \"CardContent\";\n\nconst CardFooter = React.forwardRef<\n\tHTMLDivElement,\n\tReact.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n\t<div\n\t\tref={ref}\n\t\tclassName={cn(\"flex items-center p-6 pt-0\", className)}\n\t\t{...props}\n\t/>\n));\nCardFooter.displayName = \"CardFooter\";\n\nexport {\n\tCard,\n\tCardHeader,\n\tCardFooter,\n\tCardTitle,\n\tCardDescription,\n\tCardContent,\n};\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/components/ui/carousel.tsx",
    "content": "import * as React from \"react\";\nimport useEmblaCarousel, {\n\ttype UseEmblaCarouselType,\n} from \"embla-carousel-react\";\nimport { ArrowLeft, ArrowRight } from \"lucide-react\";\n\nimport { cn } from \"@/lib/utils\";\nimport { Button } from \"@/components/ui/button\";\n\ntype CarouselApi = UseEmblaCarouselType[1];\ntype UseCarouselParameters = Parameters<typeof useEmblaCarousel>;\ntype CarouselOptions = UseCarouselParameters[0];\ntype CarouselPlugin = UseCarouselParameters[1];\n\ntype CarouselProps = {\n\topts?: CarouselOptions;\n\tplugins?: CarouselPlugin;\n\torientation?: \"horizontal\" | \"vertical\";\n\tsetApi?: (api: CarouselApi) => void;\n};\n\ntype CarouselContextProps = {\n\tcarouselRef: ReturnType<typeof useEmblaCarousel>[0];\n\tapi: ReturnType<typeof useEmblaCarousel>[1];\n\tscrollPrev: () => void;\n\tscrollNext: () => void;\n\tcanScrollPrev: boolean;\n\tcanScrollNext: boolean;\n} & CarouselProps;\n\nconst CarouselContext = React.createContext<CarouselContextProps | null>(null);\n\nfunction useCarousel() {\n\tconst context = React.useContext(CarouselContext);\n\n\tif (!context) {\n\t\tthrow new Error(\"useCarousel must be used within a <Carousel />\");\n\t}\n\n\treturn context;\n}\n\nconst Carousel = React.forwardRef<\n\tHTMLDivElement,\n\tReact.HTMLAttributes<HTMLDivElement> & CarouselProps\n>(\n\t(\n\t\t{\n\t\t\torientation = \"horizontal\",\n\t\t\topts,\n\t\t\tsetApi,\n\t\t\tplugins,\n\t\t\tclassName,\n\t\t\tchildren,\n\t\t\t...props\n\t\t},\n\t\tref,\n\t) => {\n\t\tconst [carouselRef, api] = useEmblaCarousel(\n\t\t\t{\n\t\t\t\t...opts,\n\t\t\t\taxis: orientation === \"horizontal\" ? \"x\" : \"y\",\n\t\t\t},\n\t\t\tplugins,\n\t\t);\n\t\tconst [canScrollPrev, setCanScrollPrev] = React.useState(false);\n\t\tconst [canScrollNext, setCanScrollNext] = React.useState(false);\n\n\t\tconst onSelect = React.useCallback((api: CarouselApi) => {\n\t\t\tif (!api) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tsetCanScrollPrev(api.canScrollPrev());\n\t\t\tsetCanScrollNext(api.canScrollNext());\n\t\t}, []);\n\n\t\tconst scrollPrev = React.useCallback(() => {\n\t\t\tapi?.scrollPrev();\n\t\t}, [api]);\n\n\t\tconst scrollNext = React.useCallback(() => {\n\t\t\tapi?.scrollNext();\n\t\t}, [api]);\n\n\t\tconst handleKeyDown = React.useCallback(\n\t\t\t(event: React.KeyboardEvent<HTMLDivElement>) => {\n\t\t\t\tif (event.key === \"ArrowLeft\") {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tscrollPrev();\n\t\t\t\t} else if (event.key === \"ArrowRight\") {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tscrollNext();\n\t\t\t\t}\n\t\t\t},\n\t\t\t[scrollPrev, scrollNext],\n\t\t);\n\n\t\tReact.useEffect(() => {\n\t\t\tif (!api || !setApi) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tsetApi(api);\n\t\t}, [api, setApi]);\n\n\t\tReact.useEffect(() => {\n\t\t\tif (!api) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tonSelect(api);\n\t\t\tapi.on(\"reInit\", onSelect);\n\t\t\tapi.on(\"select\", onSelect);\n\n\t\t\treturn () => {\n\t\t\t\tapi?.off(\"select\", onSelect);\n\t\t\t};\n\t\t}, [api, onSelect]);\n\n\t\treturn (\n\t\t\t<CarouselContext.Provider\n\t\t\t\tvalue={{\n\t\t\t\t\tcarouselRef,\n\t\t\t\t\tapi: api,\n\t\t\t\t\topts,\n\t\t\t\t\torientation:\n\t\t\t\t\t\torientation || (opts?.axis === \"y\" ? \"vertical\" : \"horizontal\"),\n\t\t\t\t\tscrollPrev,\n\t\t\t\t\tscrollNext,\n\t\t\t\t\tcanScrollPrev,\n\t\t\t\t\tcanScrollNext,\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t<div\n\t\t\t\t\tref={ref}\n\t\t\t\t\tonKeyDownCapture={handleKeyDown}\n\t\t\t\t\tclassName={cn(\"relative\", className)}\n\t\t\t\t\trole=\"region\"\n\t\t\t\t\taria-roledescription=\"carousel\"\n\t\t\t\t\t{...props}\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</div>\n\t\t\t</CarouselContext.Provider>\n\t\t);\n\t},\n);\nCarousel.displayName = \"Carousel\";\n\nconst CarouselContent = React.forwardRef<\n\tHTMLDivElement,\n\tReact.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => {\n\tconst { carouselRef, orientation } = useCarousel();\n\n\treturn (\n\t\t<div ref={carouselRef} className=\"overflow-hidden\">\n\t\t\t<div\n\t\t\t\tref={ref}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"flex\",\n\t\t\t\t\torientation === \"horizontal\" ? \"-ml-4\" : \"-mt-4 flex-col\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t</div>\n\t);\n});\nCarouselContent.displayName = \"CarouselContent\";\n\nconst CarouselItem = React.forwardRef<\n\tHTMLDivElement,\n\tReact.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => {\n\tconst { orientation } = useCarousel();\n\n\treturn (\n\t\t<div\n\t\t\tref={ref}\n\t\t\trole=\"group\"\n\t\t\taria-roledescription=\"slide\"\n\t\t\tclassName={cn(\n\t\t\t\t\"min-w-0 shrink-0 grow-0 basis-full\",\n\t\t\t\torientation === \"horizontal\" ? \"pl-4\" : \"pt-4\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\nCarouselItem.displayName = \"CarouselItem\";\n\nconst CarouselPrevious = React.forwardRef<\n\tHTMLButtonElement,\n\tReact.ComponentProps<typeof Button>\n>(({ className, variant = \"outline\", size = \"icon\", ...props }, ref) => {\n\tconst { orientation, scrollPrev, canScrollPrev } = useCarousel();\n\n\treturn (\n\t\t<Button\n\t\t\tref={ref}\n\t\t\tvariant={variant}\n\t\t\tsize={size}\n\t\t\tclassName={cn(\n\t\t\t\t\"absolute  h-8 w-8 rounded-full\",\n\t\t\t\torientation === \"horizontal\"\n\t\t\t\t\t? \"-left-12 top-1/2 -translate-y-1/2\"\n\t\t\t\t\t: \"-top-12 left-1/2 -translate-x-1/2 rotate-90\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tdisabled={!canScrollPrev}\n\t\t\tonClick={scrollPrev}\n\t\t\t{...props}\n\t\t>\n\t\t\t<ArrowLeft className=\"h-4 w-4\" />\n\t\t\t<span className=\"sr-only\">Previous slide</span>\n\t\t</Button>\n\t);\n});\nCarouselPrevious.displayName = \"CarouselPrevious\";\n\nconst CarouselNext = React.forwardRef<\n\tHTMLButtonElement,\n\tReact.ComponentProps<typeof Button>\n>(({ className, variant = \"outline\", size = \"icon\", ...props }, ref) => {\n\tconst { orientation, scrollNext, canScrollNext } = useCarousel();\n\n\treturn (\n\t\t<Button\n\t\t\tref={ref}\n\t\t\tvariant={variant}\n\t\t\tsize={size}\n\t\t\tclassName={cn(\n\t\t\t\t\"absolute h-8 w-8 rounded-full\",\n\t\t\t\torientation === \"horizontal\"\n\t\t\t\t\t? \"-right-12 top-1/2 -translate-y-1/2\"\n\t\t\t\t\t: \"-bottom-12 left-1/2 -translate-x-1/2 rotate-90\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tdisabled={!canScrollNext}\n\t\t\tonClick={scrollNext}\n\t\t\t{...props}\n\t\t>\n\t\t\t<ArrowRight className=\"h-4 w-4\" />\n\t\t\t<span className=\"sr-only\">Next slide</span>\n\t\t</Button>\n\t);\n});\nCarouselNext.displayName = \"CarouselNext\";\n\nexport {\n\ttype CarouselApi,\n\tCarousel,\n\tCarouselContent,\n\tCarouselItem,\n\tCarouselPrevious,\n\tCarouselNext,\n};\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/components/ui/chart.tsx",
    "content": "import * as React from \"react\";\nimport * as RechartsPrimitive from \"recharts\";\n\nimport { cn } from \"@/lib/utils\";\n\n// Format: { THEME_NAME: CSS_SELECTOR }\nconst THEMES = { light: \"\", dark: \".dark\" } as const;\n\nexport type ChartConfig = {\n\t[k in string]: {\n\t\tlabel?: React.ReactNode;\n\t\ticon?: React.ComponentType;\n\t} & (\n\t\t| { color?: string; theme?: never }\n\t\t| { color?: never; theme: Record<keyof typeof THEMES, string> }\n\t);\n};\n\ntype ChartContextProps = {\n\tconfig: ChartConfig;\n};\n\nconst ChartContext = React.createContext<ChartContextProps | null>(null);\n\nfunction useChart() {\n\tconst context = React.useContext(ChartContext);\n\n\tif (!context) {\n\t\tthrow new Error(\"useChart must be used within a <ChartContainer />\");\n\t}\n\n\treturn context;\n}\n\nconst ChartContainer = React.forwardRef<\n\tHTMLDivElement,\n\tReact.ComponentProps<\"div\"> & {\n\t\tconfig: ChartConfig;\n\t\tchildren: React.ComponentProps<\n\t\t\ttypeof RechartsPrimitive.ResponsiveContainer\n\t\t>[\"children\"];\n\t}\n>(({ id, className, children, config, ...props }, ref) => {\n\tconst uniqueId = React.useId();\n\tconst chartId = `chart-${id || uniqueId.replace(/:/g, \"\")}`;\n\n\treturn (\n\t\t<ChartContext.Provider value={{ config }}>\n\t\t\t<div\n\t\t\t\tdata-chart={chartId}\n\t\t\t\tref={ref}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t<ChartStyle id={chartId} config={config} />\n\t\t\t\t<RechartsPrimitive.ResponsiveContainer>\n\t\t\t\t\t{children}\n\t\t\t\t</RechartsPrimitive.ResponsiveContainer>\n\t\t\t</div>\n\t\t</ChartContext.Provider>\n\t);\n});\nChartContainer.displayName = \"Chart\";\n\nconst ChartStyle = ({ id, config }: { id: string; config: ChartConfig }) => {\n\tconst colorConfig = Object.entries(config).filter(\n\t\t([_, config]) => config.theme || config.color,\n\t);\n\n\tif (!colorConfig.length) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<style\n\t\t\tdangerouslySetInnerHTML={{\n\t\t\t\t__html: Object.entries(THEMES)\n\t\t\t\t\t.map(\n\t\t\t\t\t\t([theme, prefix]) => `\n${prefix} [data-chart=${id}] {\n${colorConfig\n\t.map(([key, itemConfig]) => {\n\t\tconst color =\n\t\t\titemConfig.theme?.[theme as keyof typeof itemConfig.theme] ||\n\t\t\titemConfig.color;\n\t\treturn color ? `  --color-${key}: ${color};` : null;\n\t})\n\t.join(\"\\n\")}\n}\n`,\n\t\t\t\t\t)\n\t\t\t\t\t.join(\"\\n\"),\n\t\t\t}}\n\t\t/>\n\t);\n};\n\nconst ChartTooltip = RechartsPrimitive.Tooltip;\n\nconst ChartTooltipContent = React.forwardRef<\n\tHTMLDivElement,\n\tReact.ComponentProps<typeof RechartsPrimitive.Tooltip> &\n\t\tReact.ComponentProps<\"div\"> & {\n\t\t\thideLabel?: boolean;\n\t\t\thideIndicator?: boolean;\n\t\t\tindicator?: \"line\" | \"dot\" | \"dashed\";\n\t\t\tnameKey?: string;\n\t\t\tlabelKey?: string;\n\t\t}\n>(\n\t(\n\t\t{\n\t\t\tactive,\n\t\t\tpayload,\n\t\t\tclassName,\n\t\t\tindicator = \"dot\",\n\t\t\thideLabel = false,\n\t\t\thideIndicator = false,\n\t\t\tlabel,\n\t\t\tlabelFormatter,\n\t\t\tlabelClassName,\n\t\t\tformatter,\n\t\t\tcolor,\n\t\t\tnameKey,\n\t\t\tlabelKey,\n\t\t},\n\t\tref,\n\t) => {\n\t\tconst { config } = useChart();\n\n\t\tconst tooltipLabel = React.useMemo(() => {\n\t\t\tif (hideLabel || !payload?.length) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tconst [item] = payload;\n\t\t\tconst key = `${labelKey || item.dataKey || item.name || \"value\"}`;\n\t\t\tconst itemConfig = getPayloadConfigFromPayload(config, item, key);\n\t\t\tconst value =\n\t\t\t\t!labelKey && typeof label === \"string\"\n\t\t\t\t\t? config[label as keyof typeof config]?.label || label\n\t\t\t\t\t: itemConfig?.label;\n\n\t\t\tif (labelFormatter) {\n\t\t\t\treturn (\n\t\t\t\t\t<div className={cn(\"font-medium\", labelClassName)}>\n\t\t\t\t\t\t{labelFormatter(value, payload)}\n\t\t\t\t\t</div>\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (!value) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\treturn <div className={cn(\"font-medium\", labelClassName)}>{value}</div>;\n\t\t}, [\n\t\t\tlabel,\n\t\t\tlabelFormatter,\n\t\t\tpayload,\n\t\t\thideLabel,\n\t\t\tlabelClassName,\n\t\t\tconfig,\n\t\t\tlabelKey,\n\t\t]);\n\n\t\tif (!active || !payload?.length) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst nestLabel = payload.length === 1 && indicator !== \"dot\";\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tref={ref}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-neutral-200 border-neutral-200/50 bg-white px-2.5 py-1.5 text-xs shadow-xl dark:border-neutral-800 dark:border-neutral-800/50 dark:bg-neutral-950\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t{!nestLabel ? tooltipLabel : null}\n\t\t\t\t<div className=\"grid gap-1.5\">\n\t\t\t\t\t{payload.map((item, index) => {\n\t\t\t\t\t\tconst key = `${nameKey || item.name || item.dataKey || \"value\"}`;\n\t\t\t\t\t\tconst itemConfig = getPayloadConfigFromPayload(config, item, key);\n\t\t\t\t\t\tconst indicatorColor = color || item.payload.fill || item.color;\n\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tkey={item.dataKey}\n\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\"flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-neutral-500 dark:[&>svg]:text-neutral-400\",\n\t\t\t\t\t\t\t\t\tindicator === \"dot\" && \"items-center\",\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{formatter && item?.value !== undefined && item.name ? (\n\t\t\t\t\t\t\t\t\tformatter(item.value, item.name, item, index, item.payload)\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t{itemConfig?.icon ? (\n\t\t\t\t\t\t\t\t\t\t\t<itemConfig.icon />\n\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t!hideIndicator && (\n\t\t\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"h-2.5 w-2.5\": indicator === \"dot\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"w-1\": indicator === \"line\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"w-0 border-[1.5px] border-dashed bg-transparent\":\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tindicator === \"dashed\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"my-0.5\": nestLabel && indicator === \"dashed\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\tstyle={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"--color-bg\": indicatorColor,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"--color-border\": indicatorColor,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t} as React.CSSProperties\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\"flex flex-1 justify-between leading-none\",\n\t\t\t\t\t\t\t\t\t\t\t\tnestLabel ? \"items-end\" : \"items-center\",\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"grid gap-1.5\">\n\t\t\t\t\t\t\t\t\t\t\t\t{nestLabel ? tooltipLabel : null}\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-neutral-500 dark:text-neutral-400\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t{itemConfig?.label || item.name}\n\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t{item.value && (\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"font-mono font-medium tabular-nums text-neutral-950 dark:text-neutral-50\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t{item.value.toLocaleString()}\n\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t);\n\t\t\t\t\t})}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t},\n);\nChartTooltipContent.displayName = \"ChartTooltip\";\n\nconst ChartLegend = RechartsPrimitive.Legend;\n\nconst ChartLegendContent = React.forwardRef<\n\tHTMLDivElement,\n\tReact.ComponentProps<\"div\"> &\n\t\tPick<RechartsPrimitive.LegendProps, \"payload\" | \"verticalAlign\"> & {\n\t\t\thideIcon?: boolean;\n\t\t\tnameKey?: string;\n\t\t}\n>(\n\t(\n\t\t{ className, hideIcon = false, payload, verticalAlign = \"bottom\", nameKey },\n\t\tref,\n\t) => {\n\t\tconst { config } = useChart();\n\n\t\tif (!payload?.length) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tref={ref}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"flex items-center justify-center gap-4\",\n\t\t\t\t\tverticalAlign === \"top\" ? \"pb-3\" : \"pt-3\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t{payload.map((item) => {\n\t\t\t\t\tconst key = `${nameKey || item.dataKey || \"value\"}`;\n\t\t\t\t\tconst itemConfig = getPayloadConfigFromPayload(config, item, key);\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tkey={item.value}\n\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\"flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-neutral-500 dark:[&>svg]:text-neutral-400\",\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{itemConfig?.icon && !hideIcon ? (\n\t\t\t\t\t\t\t\t<itemConfig.icon />\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\tclassName=\"h-2 w-2 shrink-0 rounded-[2px]\"\n\t\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\t\tbackgroundColor: item.color,\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{itemConfig?.label}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t);\n\t\t\t\t})}\n\t\t\t</div>\n\t\t);\n\t},\n);\nChartLegendContent.displayName = \"ChartLegend\";\n\n// Helper to extract item config from a payload.\nfunction getPayloadConfigFromPayload(\n\tconfig: ChartConfig,\n\tpayload: unknown,\n\tkey: string,\n) {\n\tif (typeof payload !== \"object\" || payload === null) {\n\t\treturn undefined;\n\t}\n\n\tconst payloadPayload =\n\t\t\"payload\" in payload &&\n\t\ttypeof payload.payload === \"object\" &&\n\t\tpayload.payload !== null\n\t\t\t? payload.payload\n\t\t\t: undefined;\n\n\tlet configLabelKey: string = key;\n\n\tif (\n\t\tkey in payload &&\n\t\ttypeof payload[key as keyof typeof payload] === \"string\"\n\t) {\n\t\tconfigLabelKey = payload[key as keyof typeof payload] as string;\n\t} else if (\n\t\tpayloadPayload &&\n\t\tkey in payloadPayload &&\n\t\ttypeof payloadPayload[key as keyof typeof payloadPayload] === \"string\"\n\t) {\n\t\tconfigLabelKey = payloadPayload[key as keyof typeof payloadPayload] as string;\n\t}\n\n\treturn configLabelKey in config\n\t\t? config[configLabelKey]\n\t\t: config[key as keyof typeof config];\n}\n\nexport {\n\tChartContainer,\n\tChartTooltip,\n\tChartTooltipContent,\n\tChartLegend,\n\tChartLegendContent,\n\tChartStyle,\n};\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/components/ui/checkbox.tsx",
    "content": "import * as React from \"react\";\nimport * as CheckboxPrimitive from \"@radix-ui/react-checkbox\";\nimport { Check } from \"lucide-react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst Checkbox = React.forwardRef<\n\tReact.ElementRef<typeof CheckboxPrimitive.Root>,\n\tReact.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>\n>(({ className, ...props }, ref) => (\n\t<CheckboxPrimitive.Root\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"peer h-4 w-4 shrink-0 rounded-sm border border-neutral-200 border-neutral-900 ring-offset-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-neutral-950 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-neutral-900 data-[state=checked]:text-neutral-50 dark:border-neutral-800 dark:border-neutral-50 dark:ring-offset-neutral-950 dark:focus-visible:ring-neutral-300 dark:data-[state=checked]:bg-neutral-50 dark:data-[state=checked]:text-neutral-900\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t>\n\t\t<CheckboxPrimitive.Indicator\n\t\t\tclassName={cn(\"flex items-center justify-center text-current\")}\n\t\t>\n\t\t\t<Check className=\"h-4 w-4\" />\n\t\t</CheckboxPrimitive.Indicator>\n\t</CheckboxPrimitive.Root>\n));\nCheckbox.displayName = CheckboxPrimitive.Root.displayName;\n\nexport { Checkbox };\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/components/ui/collapsible.tsx",
    "content": "import * as CollapsiblePrimitive from \"@radix-ui/react-collapsible\";\n\nconst Collapsible = CollapsiblePrimitive.Root;\n\nconst CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger;\n\nconst CollapsibleContent = CollapsiblePrimitive.CollapsibleContent;\n\nexport { Collapsible, CollapsibleTrigger, CollapsibleContent };\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/components/ui/command.tsx",
    "content": "import * as React from \"react\";\nimport { type DialogProps } from \"@radix-ui/react-dialog\";\nimport { Command as CommandPrimitive } from \"cmdk\";\nimport { Search } from \"lucide-react\";\n\nimport { cn } from \"@/lib/utils\";\nimport { Dialog, DialogContent } from \"@/components/ui/dialog\";\n\nconst Command = React.forwardRef<\n\tReact.ElementRef<typeof CommandPrimitive>,\n\tReact.ComponentPropsWithoutRef<typeof CommandPrimitive>\n>(({ className, ...props }, ref) => (\n\t<CommandPrimitive\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"flex h-full w-full flex-col overflow-hidden rounded-md bg-white text-neutral-950 dark:bg-neutral-950 dark:text-neutral-50\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nCommand.displayName = CommandPrimitive.displayName;\n\ninterface CommandDialogProps extends DialogProps {}\n\nconst CommandDialog = ({ children, ...props }: CommandDialogProps) => {\n\treturn (\n\t\t<Dialog {...props}>\n\t\t\t<DialogContent className=\"overflow-hidden p-0 shadow-lg\">\n\t\t\t\t<Command className=\"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-neutral-500 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5 dark:[&_[cmdk-group-heading]]:text-neutral-400\">\n\t\t\t\t\t{children}\n\t\t\t\t</Command>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n\nconst CommandInput = React.forwardRef<\n\tReact.ElementRef<typeof CommandPrimitive.Input>,\n\tReact.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>\n>(({ className, ...props }, ref) => (\n\t<div className=\"flex items-center border-b px-3\" cmdk-input-wrapper=\"\">\n\t\t<Search className=\"mr-2 h-4 w-4 shrink-0 opacity-50\" />\n\t\t<CommandPrimitive.Input\n\t\t\tref={ref}\n\t\t\tclassName={cn(\n\t\t\t\t\"flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-neutral-500 disabled:cursor-not-allowed disabled:opacity-50 dark:placeholder:text-neutral-400\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t</div>\n));\n\nCommandInput.displayName = CommandPrimitive.Input.displayName;\n\nconst CommandList = React.forwardRef<\n\tReact.ElementRef<typeof CommandPrimitive.List>,\n\tReact.ComponentPropsWithoutRef<typeof CommandPrimitive.List>\n>(({ className, ...props }, ref) => (\n\t<CommandPrimitive.List\n\t\tref={ref}\n\t\tclassName={cn(\"max-h-[300px] overflow-y-auto overflow-x-hidden\", className)}\n\t\t{...props}\n\t/>\n));\n\nCommandList.displayName = CommandPrimitive.List.displayName;\n\nconst CommandEmpty = React.forwardRef<\n\tReact.ElementRef<typeof CommandPrimitive.Empty>,\n\tReact.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>\n>((props, ref) => (\n\t<CommandPrimitive.Empty\n\t\tref={ref}\n\t\tclassName=\"py-6 text-center text-sm\"\n\t\t{...props}\n\t/>\n));\n\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName;\n\nconst CommandGroup = React.forwardRef<\n\tReact.ElementRef<typeof CommandPrimitive.Group>,\n\tReact.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>\n>(({ className, ...props }, ref) => (\n\t<CommandPrimitive.Group\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"overflow-hidden p-1 text-neutral-950 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-neutral-500 dark:text-neutral-50 dark:[&_[cmdk-group-heading]]:text-neutral-400\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\n\nCommandGroup.displayName = CommandPrimitive.Group.displayName;\n\nconst CommandSeparator = React.forwardRef<\n\tReact.ElementRef<typeof CommandPrimitive.Separator>,\n\tReact.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n\t<CommandPrimitive.Separator\n\t\tref={ref}\n\t\tclassName={cn(\"-mx-1 h-px bg-neutral-200 dark:bg-neutral-800\", className)}\n\t\t{...props}\n\t/>\n));\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName;\n\nconst CommandItem = React.forwardRef<\n\tReact.ElementRef<typeof CommandPrimitive.Item>,\n\tReact.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>\n>(({ className, ...props }, ref) => (\n\t<CommandPrimitive.Item\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-neutral-100 data-[selected=true]:text-neutral-900 data-[disabled=true]:opacity-50 dark:data-[selected='true']:bg-neutral-800 dark:data-[selected=true]:text-neutral-50\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\n\nCommandItem.displayName = CommandPrimitive.Item.displayName;\n\nconst CommandShortcut = ({\n\tclassName,\n\t...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n\treturn (\n\t\t<span\n\t\t\tclassName={cn(\n\t\t\t\t\"ml-auto text-xs tracking-widest text-neutral-500 dark:text-neutral-400\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n};\nCommandShortcut.displayName = \"CommandShortcut\";\n\nexport {\n\tCommand,\n\tCommandDialog,\n\tCommandInput,\n\tCommandList,\n\tCommandEmpty,\n\tCommandGroup,\n\tCommandItem,\n\tCommandShortcut,\n\tCommandSeparator,\n};\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/components/ui/context-menu.tsx",
    "content": "import * as React from \"react\";\nimport * as ContextMenuPrimitive from \"@radix-ui/react-context-menu\";\nimport { Check, ChevronRight, Circle } from \"lucide-react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst ContextMenu = ContextMenuPrimitive.Root;\n\nconst ContextMenuTrigger = ContextMenuPrimitive.Trigger;\n\nconst ContextMenuGroup = ContextMenuPrimitive.Group;\n\nconst ContextMenuPortal = ContextMenuPrimitive.Portal;\n\nconst ContextMenuSub = ContextMenuPrimitive.Sub;\n\nconst ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;\n\nconst ContextMenuSubTrigger = React.forwardRef<\n\tReact.ElementRef<typeof ContextMenuPrimitive.SubTrigger>,\n\tReact.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubTrigger> & {\n\t\tinset?: boolean;\n\t}\n>(({ className, inset, children, ...props }, ref) => (\n\t<ContextMenuPrimitive.SubTrigger\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-neutral-100 focus:text-neutral-900 data-[state=open]:bg-neutral-100 data-[state=open]:text-neutral-900 dark:focus:bg-neutral-800 dark:focus:text-neutral-50 dark:data-[state=open]:bg-neutral-800 dark:data-[state=open]:text-neutral-50\",\n\t\t\tinset && \"pl-8\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t>\n\t\t{children}\n\t\t<ChevronRight className=\"ml-auto h-4 w-4\" />\n\t</ContextMenuPrimitive.SubTrigger>\n));\nContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;\n\nconst ContextMenuSubContent = React.forwardRef<\n\tReact.ElementRef<typeof ContextMenuPrimitive.SubContent>,\n\tReact.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n\t<ContextMenuPrimitive.SubContent\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"z-50 min-w-[8rem] overflow-hidden rounded-md border border-neutral-200 bg-white p-1 text-neutral-950 shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;\n\nconst ContextMenuContent = React.forwardRef<\n\tReact.ElementRef<typeof ContextMenuPrimitive.Content>,\n\tReact.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Content>\n>(({ className, ...props }, ref) => (\n\t<ContextMenuPrimitive.Portal>\n\t\t<ContextMenuPrimitive.Content\n\t\t\tref={ref}\n\t\t\tclassName={cn(\n\t\t\t\t\"z-50 min-w-[8rem] overflow-hidden rounded-md border border-neutral-200 bg-white p-1 text-neutral-950 shadow-md animate-in fade-in-80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t</ContextMenuPrimitive.Portal>\n));\nContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;\n\nconst ContextMenuItem = React.forwardRef<\n\tReact.ElementRef<typeof ContextMenuPrimitive.Item>,\n\tReact.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Item> & {\n\t\tinset?: boolean;\n\t}\n>(({ className, inset, ...props }, ref) => (\n\t<ContextMenuPrimitive.Item\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-neutral-100 focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50\",\n\t\t\tinset && \"pl-8\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;\n\nconst ContextMenuCheckboxItem = React.forwardRef<\n\tReact.ElementRef<typeof ContextMenuPrimitive.CheckboxItem>,\n\tReact.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n\t<ContextMenuPrimitive.CheckboxItem\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-neutral-100 focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50\",\n\t\t\tclassName,\n\t\t)}\n\t\tchecked={checked}\n\t\t{...props}\n\t>\n\t\t<span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n\t\t\t<ContextMenuPrimitive.ItemIndicator>\n\t\t\t\t<Check className=\"h-4 w-4\" />\n\t\t\t</ContextMenuPrimitive.ItemIndicator>\n\t\t</span>\n\t\t{children}\n\t</ContextMenuPrimitive.CheckboxItem>\n));\nContextMenuCheckboxItem.displayName =\n\tContextMenuPrimitive.CheckboxItem.displayName;\n\nconst ContextMenuRadioItem = React.forwardRef<\n\tReact.ElementRef<typeof ContextMenuPrimitive.RadioItem>,\n\tReact.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n\t<ContextMenuPrimitive.RadioItem\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-neutral-100 focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t>\n\t\t<span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n\t\t\t<ContextMenuPrimitive.ItemIndicator>\n\t\t\t\t<Circle className=\"h-2 w-2 fill-current\" />\n\t\t\t</ContextMenuPrimitive.ItemIndicator>\n\t\t</span>\n\t\t{children}\n\t</ContextMenuPrimitive.RadioItem>\n));\nContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName;\n\nconst ContextMenuLabel = React.forwardRef<\n\tReact.ElementRef<typeof ContextMenuPrimitive.Label>,\n\tReact.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Label> & {\n\t\tinset?: boolean;\n\t}\n>(({ className, inset, ...props }, ref) => (\n\t<ContextMenuPrimitive.Label\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"px-2 py-1.5 text-sm font-semibold text-neutral-950 dark:text-neutral-50\",\n\t\t\tinset && \"pl-8\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName;\n\nconst ContextMenuSeparator = React.forwardRef<\n\tReact.ElementRef<typeof ContextMenuPrimitive.Separator>,\n\tReact.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n\t<ContextMenuPrimitive.Separator\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"-mx-1 my-1 h-px bg-neutral-200 dark:bg-neutral-800\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName;\n\nconst ContextMenuShortcut = ({\n\tclassName,\n\t...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n\treturn (\n\t\t<span\n\t\t\tclassName={cn(\n\t\t\t\t\"ml-auto text-xs tracking-widest text-neutral-500 dark:text-neutral-400\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n};\nContextMenuShortcut.displayName = \"ContextMenuShortcut\";\n\nexport {\n\tContextMenu,\n\tContextMenuTrigger,\n\tContextMenuContent,\n\tContextMenuItem,\n\tContextMenuCheckboxItem,\n\tContextMenuRadioItem,\n\tContextMenuLabel,\n\tContextMenuSeparator,\n\tContextMenuShortcut,\n\tContextMenuGroup,\n\tContextMenuPortal,\n\tContextMenuSub,\n\tContextMenuSubContent,\n\tContextMenuSubTrigger,\n\tContextMenuRadioGroup,\n};\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/components/ui/dialog.tsx",
    "content": "import * as React from \"react\";\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport { X } from \"lucide-react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst Dialog = DialogPrimitive.Root;\n\nconst DialogTrigger = DialogPrimitive.Trigger;\n\nconst DialogPortal = DialogPrimitive.Portal;\n\nconst DialogClose = DialogPrimitive.Close;\n\nconst DialogOverlay = React.forwardRef<\n\tReact.ElementRef<typeof DialogPrimitive.Overlay>,\n\tReact.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n\t<DialogPrimitive.Overlay\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"fixed inset-0 z-50 bg-black/80  data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName;\n\nconst DialogContent = React.forwardRef<\n\tReact.ElementRef<typeof DialogPrimitive.Content>,\n\tReact.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n\t<DialogPortal>\n\t\t<DialogOverlay />\n\t\t<DialogPrimitive.Content\n\t\t\tref={ref}\n\t\t\tclassName={cn(\n\t\t\t\t\"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-neutral-200 bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg dark:border-neutral-800 dark:bg-neutral-950\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t\t<DialogPrimitive.Close className=\"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-neutral-950 focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-neutral-100 data-[state=open]:text-neutral-500 dark:ring-offset-neutral-950 dark:focus:ring-neutral-300 dark:data-[state=open]:bg-neutral-800 dark:data-[state=open]:text-neutral-400\">\n\t\t\t\t<X className=\"h-4 w-4\" />\n\t\t\t\t<span className=\"sr-only\">Close</span>\n\t\t\t</DialogPrimitive.Close>\n\t\t</DialogPrimitive.Content>\n\t</DialogPortal>\n));\nDialogContent.displayName = DialogPrimitive.Content.displayName;\n\nconst DialogHeader = ({\n\tclassName,\n\t...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n\t<div\n\t\tclassName={cn(\n\t\t\t\"flex flex-col space-y-1.5 text-center sm:text-left\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n);\nDialogHeader.displayName = \"DialogHeader\";\n\nconst DialogFooter = ({\n\tclassName,\n\t...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n\t<div\n\t\tclassName={cn(\n\t\t\t\"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n);\nDialogFooter.displayName = \"DialogFooter\";\n\nconst DialogTitle = React.forwardRef<\n\tReact.ElementRef<typeof DialogPrimitive.Title>,\n\tReact.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n\t<DialogPrimitive.Title\n\t\tref={ref}\n\t\tclassName={cn(\"text-lg font-semibold leading-none tracking-tight\", className)}\n\t\t{...props}\n\t/>\n));\nDialogTitle.displayName = DialogPrimitive.Title.displayName;\n\nconst DialogDescription = React.forwardRef<\n\tReact.ElementRef<typeof DialogPrimitive.Description>,\n\tReact.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n\t<DialogPrimitive.Description\n\t\tref={ref}\n\t\tclassName={cn(\"text-sm text-neutral-500 dark:text-neutral-400\", className)}\n\t\t{...props}\n\t/>\n));\nDialogDescription.displayName = DialogPrimitive.Description.displayName;\n\nexport {\n\tDialog,\n\tDialogPortal,\n\tDialogOverlay,\n\tDialogClose,\n\tDialogTrigger,\n\tDialogContent,\n\tDialogHeader,\n\tDialogFooter,\n\tDialogTitle,\n\tDialogDescription,\n};\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/components/ui/drawer.tsx",
    "content": "import * as React from \"react\";\nimport { Drawer as DrawerPrimitive } from \"vaul\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst Drawer = ({\n\tshouldScaleBackground = true,\n\t...props\n}: React.ComponentProps<typeof DrawerPrimitive.Root>) => (\n\t<DrawerPrimitive.Root\n\t\tshouldScaleBackground={shouldScaleBackground}\n\t\t{...props}\n\t/>\n);\nDrawer.displayName = \"Drawer\";\n\nconst DrawerTrigger = DrawerPrimitive.Trigger;\n\nconst DrawerPortal = DrawerPrimitive.Portal;\n\nconst DrawerClose = DrawerPrimitive.Close;\n\nconst DrawerOverlay = React.forwardRef<\n\tReact.ElementRef<typeof DrawerPrimitive.Overlay>,\n\tReact.ComponentPropsWithoutRef<typeof DrawerPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n\t<DrawerPrimitive.Overlay\n\t\tref={ref}\n\t\tclassName={cn(\"fixed inset-0 z-50 bg-black/80\", className)}\n\t\t{...props}\n\t/>\n));\nDrawerOverlay.displayName = DrawerPrimitive.Overlay.displayName;\n\nconst DrawerContent = React.forwardRef<\n\tReact.ElementRef<typeof DrawerPrimitive.Content>,\n\tReact.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n\t<DrawerPortal>\n\t\t<DrawerOverlay />\n\t\t<DrawerPrimitive.Content\n\t\t\tref={ref}\n\t\t\tclassName={cn(\n\t\t\t\t\"fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border border-neutral-200 bg-white dark:border-neutral-800 dark:bg-neutral-950\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<div className=\"mx-auto mt-4 h-2 w-[100px] rounded-full bg-neutral-100 dark:bg-neutral-800\" />\n\t\t\t{children}\n\t\t</DrawerPrimitive.Content>\n\t</DrawerPortal>\n));\nDrawerContent.displayName = \"DrawerContent\";\n\nconst DrawerHeader = ({\n\tclassName,\n\t...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n\t<div\n\t\tclassName={cn(\"grid gap-1.5 p-4 text-center sm:text-left\", className)}\n\t\t{...props}\n\t/>\n);\nDrawerHeader.displayName = \"DrawerHeader\";\n\nconst DrawerFooter = ({\n\tclassName,\n\t...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n\t<div className={cn(\"mt-auto flex flex-col gap-2 p-4\", className)} {...props} />\n);\nDrawerFooter.displayName = \"DrawerFooter\";\n\nconst DrawerTitle = React.forwardRef<\n\tReact.ElementRef<typeof DrawerPrimitive.Title>,\n\tReact.ComponentPropsWithoutRef<typeof DrawerPrimitive.Title>\n>(({ className, ...props }, ref) => (\n\t<DrawerPrimitive.Title\n\t\tref={ref}\n\t\tclassName={cn(\"text-lg font-semibold leading-none tracking-tight\", className)}\n\t\t{...props}\n\t/>\n));\nDrawerTitle.displayName = DrawerPrimitive.Title.displayName;\n\nconst DrawerDescription = React.forwardRef<\n\tReact.ElementRef<typeof DrawerPrimitive.Description>,\n\tReact.ComponentPropsWithoutRef<typeof DrawerPrimitive.Description>\n>(({ className, ...props }, ref) => (\n\t<DrawerPrimitive.Description\n\t\tref={ref}\n\t\tclassName={cn(\"text-sm text-neutral-500 dark:text-neutral-400\", className)}\n\t\t{...props}\n\t/>\n));\nDrawerDescription.displayName = DrawerPrimitive.Description.displayName;\n\nexport {\n\tDrawer,\n\tDrawerPortal,\n\tDrawerOverlay,\n\tDrawerTrigger,\n\tDrawerClose,\n\tDrawerContent,\n\tDrawerHeader,\n\tDrawerFooter,\n\tDrawerTitle,\n\tDrawerDescription,\n};\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/components/ui/dropdown-menu.tsx",
    "content": "import * as React from \"react\";\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\";\nimport { Check, ChevronRight, Circle } from \"lucide-react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst DropdownMenu = DropdownMenuPrimitive.Root;\n\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;\n\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group;\n\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal;\n\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub;\n\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;\n\nconst DropdownMenuSubTrigger = React.forwardRef<\n\tReact.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,\n\tReact.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {\n\t\tinset?: boolean;\n\t}\n>(({ className, inset, children, ...props }, ref) => (\n\t<DropdownMenuPrimitive.SubTrigger\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-neutral-100 data-[state=open]:bg-neutral-100 dark:focus:bg-neutral-800 dark:data-[state=open]:bg-neutral-800\",\n\t\t\tinset && \"pl-8\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t>\n\t\t{children}\n\t\t<ChevronRight className=\"ml-auto h-4 w-4\" />\n\t</DropdownMenuPrimitive.SubTrigger>\n));\nDropdownMenuSubTrigger.displayName =\n\tDropdownMenuPrimitive.SubTrigger.displayName;\n\nconst DropdownMenuSubContent = React.forwardRef<\n\tReact.ElementRef<typeof DropdownMenuPrimitive.SubContent>,\n\tReact.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n\t<DropdownMenuPrimitive.SubContent\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"z-50 min-w-[8rem] overflow-hidden rounded-md border border-neutral-200 bg-white p-1 text-neutral-950 shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nDropdownMenuSubContent.displayName =\n\tDropdownMenuPrimitive.SubContent.displayName;\n\nconst DropdownMenuContent = React.forwardRef<\n\tReact.ElementRef<typeof DropdownMenuPrimitive.Content>,\n\tReact.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n\t<DropdownMenuPrimitive.Portal>\n\t\t<DropdownMenuPrimitive.Content\n\t\t\tref={ref}\n\t\t\tsideOffset={sideOffset}\n\t\t\tclassName={cn(\n\t\t\t\t\"z-50 min-w-[8rem] overflow-hidden rounded-md border border-neutral-200 bg-white p-1 text-neutral-950 shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t</DropdownMenuPrimitive.Portal>\n));\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;\n\nconst DropdownMenuItem = React.forwardRef<\n\tReact.ElementRef<typeof DropdownMenuPrimitive.Item>,\n\tReact.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {\n\t\tinset?: boolean;\n\t}\n>(({ className, inset, ...props }, ref) => (\n\t<DropdownMenuPrimitive.Item\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-neutral-100 focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50\",\n\t\t\tinset && \"pl-8\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n\tReact.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n\tReact.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n\t<DropdownMenuPrimitive.CheckboxItem\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-neutral-100 focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50\",\n\t\t\tclassName,\n\t\t)}\n\t\tchecked={checked}\n\t\t{...props}\n\t>\n\t\t<span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n\t\t\t<DropdownMenuPrimitive.ItemIndicator>\n\t\t\t\t<Check className=\"h-4 w-4\" />\n\t\t\t</DropdownMenuPrimitive.ItemIndicator>\n\t\t</span>\n\t\t{children}\n\t</DropdownMenuPrimitive.CheckboxItem>\n));\nDropdownMenuCheckboxItem.displayName =\n\tDropdownMenuPrimitive.CheckboxItem.displayName;\n\nconst DropdownMenuRadioItem = React.forwardRef<\n\tReact.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,\n\tReact.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n\t<DropdownMenuPrimitive.RadioItem\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-neutral-100 focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t>\n\t\t<span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n\t\t\t<DropdownMenuPrimitive.ItemIndicator>\n\t\t\t\t<Circle className=\"h-2 w-2 fill-current\" />\n\t\t\t</DropdownMenuPrimitive.ItemIndicator>\n\t\t</span>\n\t\t{children}\n\t</DropdownMenuPrimitive.RadioItem>\n));\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;\n\nconst DropdownMenuLabel = React.forwardRef<\n\tReact.ElementRef<typeof DropdownMenuPrimitive.Label>,\n\tReact.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {\n\t\tinset?: boolean;\n\t}\n>(({ className, inset, ...props }, ref) => (\n\t<DropdownMenuPrimitive.Label\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"px-2 py-1.5 text-sm font-semibold\",\n\t\t\tinset && \"pl-8\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;\n\nconst DropdownMenuSeparator = React.forwardRef<\n\tReact.ElementRef<typeof DropdownMenuPrimitive.Separator>,\n\tReact.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n\t<DropdownMenuPrimitive.Separator\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"-mx-1 my-1 h-px bg-neutral-100 dark:bg-neutral-800\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;\n\nconst DropdownMenuShortcut = ({\n\tclassName,\n\t...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n\treturn (\n\t\t<span\n\t\t\tclassName={cn(\"ml-auto text-xs tracking-widest opacity-60\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n};\nDropdownMenuShortcut.displayName = \"DropdownMenuShortcut\";\n\nexport {\n\tDropdownMenu,\n\tDropdownMenuTrigger,\n\tDropdownMenuContent,\n\tDropdownMenuItem,\n\tDropdownMenuCheckboxItem,\n\tDropdownMenuRadioItem,\n\tDropdownMenuLabel,\n\tDropdownMenuSeparator,\n\tDropdownMenuShortcut,\n\tDropdownMenuGroup,\n\tDropdownMenuPortal,\n\tDropdownMenuSub,\n\tDropdownMenuSubContent,\n\tDropdownMenuSubTrigger,\n\tDropdownMenuRadioGroup,\n};\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/components/ui/form.tsx",
    "content": "import * as React from \"react\";\nimport * as LabelPrimitive from \"@radix-ui/react-label\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport {\n\tController,\n\tControllerProps,\n\tFieldPath,\n\tFieldValues,\n\tFormProvider,\n\tuseFormContext,\n} from \"react-hook-form\";\n\nimport { cn } from \"@/lib/utils\";\nimport { Label } from \"@/components/ui/label\";\n\nconst Form = FormProvider;\n\ntype FormFieldContextValue<\n\tTFieldValues extends FieldValues = FieldValues,\n\tTName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> = {\n\tname: TName;\n};\n\nconst FormFieldContext = React.createContext<FormFieldContextValue>(\n\t{} as FormFieldContextValue,\n);\n\nconst FormField = <\n\tTFieldValues extends FieldValues = FieldValues,\n\tTName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n>({\n\t...props\n}: ControllerProps<TFieldValues, TName>) => {\n\treturn (\n\t\t<FormFieldContext.Provider value={{ name: props.name }}>\n\t\t\t<Controller {...props} />\n\t\t</FormFieldContext.Provider>\n\t);\n};\n\nconst useFormField = () => {\n\tconst fieldContext = React.useContext(FormFieldContext);\n\tconst itemContext = React.useContext(FormItemContext);\n\tconst { getFieldState, formState } = useFormContext();\n\n\tconst fieldState = getFieldState(fieldContext.name, formState);\n\n\tif (!fieldContext) {\n\t\tthrow new Error(\"useFormField should be used within <FormField>\");\n\t}\n\n\tconst { id } = itemContext;\n\n\treturn {\n\t\tid,\n\t\tname: fieldContext.name,\n\t\tformItemId: `${id}-form-item`,\n\t\tformDescriptionId: `${id}-form-item-description`,\n\t\tformMessageId: `${id}-form-item-message`,\n\t\t...fieldState,\n\t};\n};\n\ntype FormItemContextValue = {\n\tid: string;\n};\n\nconst FormItemContext = React.createContext<FormItemContextValue>(\n\t{} as FormItemContextValue,\n);\n\nconst FormItem = React.forwardRef<\n\tHTMLDivElement,\n\tReact.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => {\n\tconst id = React.useId();\n\n\treturn (\n\t\t<FormItemContext.Provider value={{ id }}>\n\t\t\t<div ref={ref} className={cn(\"space-y-2\", className)} {...props} />\n\t\t</FormItemContext.Provider>\n\t);\n});\nFormItem.displayName = \"FormItem\";\n\nconst FormLabel = React.forwardRef<\n\tReact.ElementRef<typeof LabelPrimitive.Root>,\n\tReact.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>\n>(({ className, ...props }, ref) => {\n\tconst { error, formItemId } = useFormField();\n\n\treturn (\n\t\t<Label\n\t\t\tref={ref}\n\t\t\tclassName={cn(error && \"text-red-500 dark:text-red-900\", className)}\n\t\t\thtmlFor={formItemId}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\nFormLabel.displayName = \"FormLabel\";\n\nconst FormControl = React.forwardRef<\n\tReact.ElementRef<typeof Slot>,\n\tReact.ComponentPropsWithoutRef<typeof Slot>\n>(({ ...props }, ref) => {\n\tconst { error, formItemId, formDescriptionId, formMessageId } = useFormField();\n\n\treturn (\n\t\t<Slot\n\t\t\tref={ref}\n\t\t\tid={formItemId}\n\t\t\taria-describedby={\n\t\t\t\t!error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`\n\t\t\t}\n\t\t\taria-invalid={!!error}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\nFormControl.displayName = \"FormControl\";\n\nconst FormDescription = React.forwardRef<\n\tHTMLParagraphElement,\n\tReact.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => {\n\tconst { formDescriptionId } = useFormField();\n\n\treturn (\n\t\t<p\n\t\t\tref={ref}\n\t\t\tid={formDescriptionId}\n\t\t\tclassName={cn(\"text-sm text-neutral-500 dark:text-neutral-400\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\nFormDescription.displayName = \"FormDescription\";\n\nconst FormMessage = React.forwardRef<\n\tHTMLParagraphElement,\n\tReact.HTMLAttributes<HTMLParagraphElement>\n>(({ className, children, ...props }, ref) => {\n\tconst { error, formMessageId } = useFormField();\n\tconst body = error ? String(error?.message) : children;\n\n\tif (!body) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<p\n\t\t\tref={ref}\n\t\t\tid={formMessageId}\n\t\t\tclassName={cn(\n\t\t\t\t\"text-sm font-medium text-red-500 dark:text-red-900\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{body}\n\t\t</p>\n\t);\n});\nFormMessage.displayName = \"FormMessage\";\n\nexport {\n\tuseFormField,\n\tForm,\n\tFormItem,\n\tFormLabel,\n\tFormControl,\n\tFormDescription,\n\tFormMessage,\n\tFormField,\n};\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/components/ui/hover-card.tsx",
    "content": "import * as React from \"react\";\nimport * as HoverCardPrimitive from \"@radix-ui/react-hover-card\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst HoverCard = HoverCardPrimitive.Root;\n\nconst HoverCardTrigger = HoverCardPrimitive.Trigger;\n\nconst HoverCardContent = React.forwardRef<\n\tReact.ElementRef<typeof HoverCardPrimitive.Content>,\n\tReact.ComponentPropsWithoutRef<typeof HoverCardPrimitive.Content>\n>(({ className, align = \"center\", sideOffset = 4, ...props }, ref) => (\n\t<HoverCardPrimitive.Content\n\t\tref={ref}\n\t\talign={align}\n\t\tsideOffset={sideOffset}\n\t\tclassName={cn(\n\t\t\t\"z-50 w-64 rounded-md border border-neutral-200 bg-white p-4 text-neutral-950 shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nHoverCardContent.displayName = HoverCardPrimitive.Content.displayName;\n\nexport { HoverCard, HoverCardTrigger, HoverCardContent };\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/components/ui/input-otp.tsx",
    "content": "import * as React from \"react\";\nimport { OTPInput, OTPInputContext } from \"input-otp\";\nimport { Dot } from \"lucide-react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst InputOTP = React.forwardRef<\n\tReact.ElementRef<typeof OTPInput>,\n\tReact.ComponentPropsWithoutRef<typeof OTPInput>\n>(({ className, containerClassName, ...props }, ref) => (\n\t<OTPInput\n\t\tref={ref}\n\t\tcontainerClassName={cn(\n\t\t\t\"flex items-center gap-2 has-[:disabled]:opacity-50\",\n\t\t\tcontainerClassName,\n\t\t)}\n\t\tclassName={cn(\"disabled:cursor-not-allowed\", className)}\n\t\t{...props}\n\t/>\n));\nInputOTP.displayName = \"InputOTP\";\n\nconst InputOTPGroup = React.forwardRef<\n\tReact.ElementRef<\"div\">,\n\tReact.ComponentPropsWithoutRef<\"div\">\n>(({ className, ...props }, ref) => (\n\t<div ref={ref} className={cn(\"flex items-center\", className)} {...props} />\n));\nInputOTPGroup.displayName = \"InputOTPGroup\";\n\nconst InputOTPSlot = React.forwardRef<\n\tReact.ElementRef<\"div\">,\n\tReact.ComponentPropsWithoutRef<\"div\"> & { index: number }\n>(({ index, className, ...props }, ref) => {\n\tconst inputOTPContext = React.useContext(OTPInputContext);\n\tconst { char, hasFakeCaret, isActive } = inputOTPContext.slots[index];\n\n\treturn (\n\t\t<div\n\t\t\tref={ref}\n\t\t\tclassName={cn(\n\t\t\t\t\"relative flex h-10 w-10 items-center justify-center border-y border-r border-neutral-200 text-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md dark:border-neutral-800\",\n\t\t\t\tisActive &&\n\t\t\t\t\t\"z-10 ring-2 ring-neutral-950 ring-offset-white dark:ring-neutral-300 dark:ring-offset-neutral-950\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{char}\n\t\t\t{hasFakeCaret && (\n\t\t\t\t<div className=\"pointer-events-none absolute inset-0 flex items-center justify-center\">\n\t\t\t\t\t<div className=\"h-4 w-px animate-caret-blink bg-neutral-950 duration-1000 dark:bg-neutral-50\" />\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n});\nInputOTPSlot.displayName = \"InputOTPSlot\";\n\nconst InputOTPSeparator = React.forwardRef<\n\tReact.ElementRef<\"div\">,\n\tReact.ComponentPropsWithoutRef<\"div\">\n>(({ ...props }, ref) => (\n\t<div ref={ref} role=\"separator\" {...props}>\n\t\t<Dot />\n\t</div>\n));\nInputOTPSeparator.displayName = \"InputOTPSeparator\";\n\nexport { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator };\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/components/ui/input.tsx",
    "content": "import * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nexport interface InputProps\n\textends React.InputHTMLAttributes<HTMLInputElement> {}\n\nconst Input = React.forwardRef<HTMLInputElement, InputProps>(\n\t({ className, type, ...props }, ref) => {\n\t\treturn (\n\t\t\t<input\n\t\t\t\ttype={type}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"flex h-10 w-full rounded-md border border-neutral-200 bg-white px-3 py-2 text-sm ring-offset-white file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-neutral-500 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-neutral-950 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 dark:border-neutral-800 dark:bg-neutral-950 dark:ring-offset-neutral-950 dark:placeholder:text-neutral-400 dark:focus-visible:ring-neutral-300\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\tref={ref}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t},\n);\nInput.displayName = \"Input\";\n\nexport { Input };\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/components/ui/label.tsx",
    "content": "import * as React from \"react\";\nimport * as LabelPrimitive from \"@radix-ui/react-label\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst labelVariants = cva(\n\t\"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\",\n);\n\nconst Label = React.forwardRef<\n\tReact.ElementRef<typeof LabelPrimitive.Root>,\n\tReact.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> &\n\t\tVariantProps<typeof labelVariants>\n>(({ className, ...props }, ref) => (\n\t<LabelPrimitive.Root\n\t\tref={ref}\n\t\tclassName={cn(labelVariants(), className)}\n\t\t{...props}\n\t/>\n));\nLabel.displayName = LabelPrimitive.Root.displayName;\n\nexport { Label };\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/components/ui/menubar.tsx",
    "content": "import * as React from \"react\";\nimport * as MenubarPrimitive from \"@radix-ui/react-menubar\";\nimport { Check, ChevronRight, Circle } from \"lucide-react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst MenubarMenu = MenubarPrimitive.Menu;\n\nconst MenubarGroup = MenubarPrimitive.Group;\n\nconst MenubarPortal = MenubarPrimitive.Portal;\n\nconst MenubarSub = MenubarPrimitive.Sub;\n\nconst MenubarRadioGroup = MenubarPrimitive.RadioGroup;\n\nconst Menubar = React.forwardRef<\n\tReact.ElementRef<typeof MenubarPrimitive.Root>,\n\tReact.ComponentPropsWithoutRef<typeof MenubarPrimitive.Root>\n>(({ className, ...props }, ref) => (\n\t<MenubarPrimitive.Root\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"flex h-10 items-center space-x-1 rounded-md border border-neutral-200 bg-white p-1 dark:border-neutral-800 dark:bg-neutral-950\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nMenubar.displayName = MenubarPrimitive.Root.displayName;\n\nconst MenubarTrigger = React.forwardRef<\n\tReact.ElementRef<typeof MenubarPrimitive.Trigger>,\n\tReact.ComponentPropsWithoutRef<typeof MenubarPrimitive.Trigger>\n>(({ className, ...props }, ref) => (\n\t<MenubarPrimitive.Trigger\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"flex cursor-default select-none items-center rounded-sm px-3 py-1.5 text-sm font-medium outline-none focus:bg-neutral-100 focus:text-neutral-900 data-[state=open]:bg-neutral-100 data-[state=open]:text-neutral-900 dark:focus:bg-neutral-800 dark:focus:text-neutral-50 dark:data-[state=open]:bg-neutral-800 dark:data-[state=open]:text-neutral-50\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nMenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName;\n\nconst MenubarSubTrigger = React.forwardRef<\n\tReact.ElementRef<typeof MenubarPrimitive.SubTrigger>,\n\tReact.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubTrigger> & {\n\t\tinset?: boolean;\n\t}\n>(({ className, inset, children, ...props }, ref) => (\n\t<MenubarPrimitive.SubTrigger\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-neutral-100 focus:text-neutral-900 data-[state=open]:bg-neutral-100 data-[state=open]:text-neutral-900 dark:focus:bg-neutral-800 dark:focus:text-neutral-50 dark:data-[state=open]:bg-neutral-800 dark:data-[state=open]:text-neutral-50\",\n\t\t\tinset && \"pl-8\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t>\n\t\t{children}\n\t\t<ChevronRight className=\"ml-auto h-4 w-4\" />\n\t</MenubarPrimitive.SubTrigger>\n));\nMenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName;\n\nconst MenubarSubContent = React.forwardRef<\n\tReact.ElementRef<typeof MenubarPrimitive.SubContent>,\n\tReact.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n\t<MenubarPrimitive.SubContent\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"z-50 min-w-[8rem] overflow-hidden rounded-md border border-neutral-200 bg-white p-1 text-neutral-950 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nMenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName;\n\nconst MenubarContent = React.forwardRef<\n\tReact.ElementRef<typeof MenubarPrimitive.Content>,\n\tReact.ComponentPropsWithoutRef<typeof MenubarPrimitive.Content>\n>(\n\t(\n\t\t{ className, align = \"start\", alignOffset = -4, sideOffset = 8, ...props },\n\t\tref,\n\t) => (\n\t\t<MenubarPrimitive.Portal>\n\t\t\t<MenubarPrimitive.Content\n\t\t\t\tref={ref}\n\t\t\t\talign={align}\n\t\t\t\talignOffset={alignOffset}\n\t\t\t\tsideOffset={sideOffset}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"z-50 min-w-[12rem] overflow-hidden rounded-md border border-neutral-200 bg-white p-1 text-neutral-950 shadow-md data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t</MenubarPrimitive.Portal>\n\t),\n);\nMenubarContent.displayName = MenubarPrimitive.Content.displayName;\n\nconst MenubarItem = React.forwardRef<\n\tReact.ElementRef<typeof MenubarPrimitive.Item>,\n\tReact.ComponentPropsWithoutRef<typeof MenubarPrimitive.Item> & {\n\t\tinset?: boolean;\n\t}\n>(({ className, inset, ...props }, ref) => (\n\t<MenubarPrimitive.Item\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-neutral-100 focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50\",\n\t\t\tinset && \"pl-8\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nMenubarItem.displayName = MenubarPrimitive.Item.displayName;\n\nconst MenubarCheckboxItem = React.forwardRef<\n\tReact.ElementRef<typeof MenubarPrimitive.CheckboxItem>,\n\tReact.ComponentPropsWithoutRef<typeof MenubarPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n\t<MenubarPrimitive.CheckboxItem\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-neutral-100 focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50\",\n\t\t\tclassName,\n\t\t)}\n\t\tchecked={checked}\n\t\t{...props}\n\t>\n\t\t<span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n\t\t\t<MenubarPrimitive.ItemIndicator>\n\t\t\t\t<Check className=\"h-4 w-4\" />\n\t\t\t</MenubarPrimitive.ItemIndicator>\n\t\t</span>\n\t\t{children}\n\t</MenubarPrimitive.CheckboxItem>\n));\nMenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName;\n\nconst MenubarRadioItem = React.forwardRef<\n\tReact.ElementRef<typeof MenubarPrimitive.RadioItem>,\n\tReact.ComponentPropsWithoutRef<typeof MenubarPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n\t<MenubarPrimitive.RadioItem\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-neutral-100 focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t>\n\t\t<span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n\t\t\t<MenubarPrimitive.ItemIndicator>\n\t\t\t\t<Circle className=\"h-2 w-2 fill-current\" />\n\t\t\t</MenubarPrimitive.ItemIndicator>\n\t\t</span>\n\t\t{children}\n\t</MenubarPrimitive.RadioItem>\n));\nMenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName;\n\nconst MenubarLabel = React.forwardRef<\n\tReact.ElementRef<typeof MenubarPrimitive.Label>,\n\tReact.ComponentPropsWithoutRef<typeof MenubarPrimitive.Label> & {\n\t\tinset?: boolean;\n\t}\n>(({ className, inset, ...props }, ref) => (\n\t<MenubarPrimitive.Label\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"px-2 py-1.5 text-sm font-semibold\",\n\t\t\tinset && \"pl-8\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nMenubarLabel.displayName = MenubarPrimitive.Label.displayName;\n\nconst MenubarSeparator = React.forwardRef<\n\tReact.ElementRef<typeof MenubarPrimitive.Separator>,\n\tReact.ComponentPropsWithoutRef<typeof MenubarPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n\t<MenubarPrimitive.Separator\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"-mx-1 my-1 h-px bg-neutral-100 dark:bg-neutral-800\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nMenubarSeparator.displayName = MenubarPrimitive.Separator.displayName;\n\nconst MenubarShortcut = ({\n\tclassName,\n\t...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n\treturn (\n\t\t<span\n\t\t\tclassName={cn(\n\t\t\t\t\"ml-auto text-xs tracking-widest text-neutral-500 dark:text-neutral-400\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n};\nMenubarShortcut.displayname = \"MenubarShortcut\";\n\nexport {\n\tMenubar,\n\tMenubarMenu,\n\tMenubarTrigger,\n\tMenubarContent,\n\tMenubarItem,\n\tMenubarSeparator,\n\tMenubarLabel,\n\tMenubarCheckboxItem,\n\tMenubarRadioGroup,\n\tMenubarRadioItem,\n\tMenubarPortal,\n\tMenubarSubContent,\n\tMenubarSubTrigger,\n\tMenubarGroup,\n\tMenubarSub,\n\tMenubarShortcut,\n};\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/components/ui/navigation-menu.tsx",
    "content": "import * as React from \"react\";\nimport * as NavigationMenuPrimitive from \"@radix-ui/react-navigation-menu\";\nimport { cva } from \"class-variance-authority\";\nimport { ChevronDown } from \"lucide-react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst NavigationMenu = React.forwardRef<\n\tReact.ElementRef<typeof NavigationMenuPrimitive.Root>,\n\tReact.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Root>\n>(({ className, children, ...props }, ref) => (\n\t<NavigationMenuPrimitive.Root\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"relative z-10 flex max-w-max flex-1 items-center justify-center\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t>\n\t\t{children}\n\t\t<NavigationMenuViewport />\n\t</NavigationMenuPrimitive.Root>\n));\nNavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName;\n\nconst NavigationMenuList = React.forwardRef<\n\tReact.ElementRef<typeof NavigationMenuPrimitive.List>,\n\tReact.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.List>\n>(({ className, ...props }, ref) => (\n\t<NavigationMenuPrimitive.List\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"group flex flex-1 list-none items-center justify-center space-x-1\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nNavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName;\n\nconst NavigationMenuItem = NavigationMenuPrimitive.Item;\n\nconst navigationMenuTriggerStyle = cva(\n\t\"group inline-flex h-10 w-max items-center justify-center rounded-md bg-white px-4 py-2 text-sm font-medium transition-colors hover:bg-neutral-100 hover:text-neutral-900 focus:bg-neutral-100 focus:text-neutral-900 focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-neutral-100/50 data-[state=open]:bg-neutral-100/50 dark:bg-neutral-950 dark:hover:bg-neutral-800 dark:hover:text-neutral-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50 dark:data-[active]:bg-neutral-800/50 dark:data-[state=open]:bg-neutral-800/50\",\n);\n\nconst NavigationMenuTrigger = React.forwardRef<\n\tReact.ElementRef<typeof NavigationMenuPrimitive.Trigger>,\n\tReact.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Trigger>\n>(({ className, children, ...props }, ref) => (\n\t<NavigationMenuPrimitive.Trigger\n\t\tref={ref}\n\t\tclassName={cn(navigationMenuTriggerStyle(), \"group\", className)}\n\t\t{...props}\n\t>\n\t\t{children}\n\t\t{\"\"}\n\t\t<ChevronDown\n\t\t\tclassName=\"relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180\"\n\t\t\taria-hidden=\"true\"\n\t\t/>\n\t</NavigationMenuPrimitive.Trigger>\n));\nNavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName;\n\nconst NavigationMenuContent = React.forwardRef<\n\tReact.ElementRef<typeof NavigationMenuPrimitive.Content>,\n\tReact.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Content>\n>(({ className, ...props }, ref) => (\n\t<NavigationMenuPrimitive.Content\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nNavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName;\n\nconst NavigationMenuLink = NavigationMenuPrimitive.Link;\n\nconst NavigationMenuViewport = React.forwardRef<\n\tReact.ElementRef<typeof NavigationMenuPrimitive.Viewport>,\n\tReact.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Viewport>\n>(({ className, ...props }, ref) => (\n\t<div className={cn(\"absolute left-0 top-full flex justify-center\")}>\n\t\t<NavigationMenuPrimitive.Viewport\n\t\t\tclassName={cn(\n\t\t\t\t\"origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border border-neutral-200 bg-white text-neutral-950 shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)] dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tref={ref}\n\t\t\t{...props}\n\t\t/>\n\t</div>\n));\nNavigationMenuViewport.displayName =\n\tNavigationMenuPrimitive.Viewport.displayName;\n\nconst NavigationMenuIndicator = React.forwardRef<\n\tReact.ElementRef<typeof NavigationMenuPrimitive.Indicator>,\n\tReact.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Indicator>\n>(({ className, ...props }, ref) => (\n\t<NavigationMenuPrimitive.Indicator\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t>\n\t\t<div className=\"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-neutral-200 shadow-md dark:bg-neutral-800\" />\n\t</NavigationMenuPrimitive.Indicator>\n));\nNavigationMenuIndicator.displayName =\n\tNavigationMenuPrimitive.Indicator.displayName;\n\nexport {\n\tnavigationMenuTriggerStyle,\n\tNavigationMenu,\n\tNavigationMenuList,\n\tNavigationMenuItem,\n\tNavigationMenuContent,\n\tNavigationMenuTrigger,\n\tNavigationMenuLink,\n\tNavigationMenuIndicator,\n\tNavigationMenuViewport,\n};\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/components/ui/pagination.tsx",
    "content": "import * as React from \"react\";\nimport { ChevronLeft, ChevronRight, MoreHorizontal } from \"lucide-react\";\n\nimport { cn } from \"@/lib/utils\";\nimport { ButtonProps, buttonVariants } from \"@/components/ui/button\";\n\nconst Pagination = ({ className, ...props }: React.ComponentProps<\"nav\">) => (\n\t<nav\n\t\trole=\"navigation\"\n\t\taria-label=\"pagination\"\n\t\tclassName={cn(\"mx-auto flex w-full justify-center\", className)}\n\t\t{...props}\n\t/>\n);\nPagination.displayName = \"Pagination\";\n\nconst PaginationContent = React.forwardRef<\n\tHTMLUListElement,\n\tReact.ComponentProps<\"ul\">\n>(({ className, ...props }, ref) => (\n\t<ul\n\t\tref={ref}\n\t\tclassName={cn(\"flex flex-row items-center gap-1\", className)}\n\t\t{...props}\n\t/>\n));\nPaginationContent.displayName = \"PaginationContent\";\n\nconst PaginationItem = React.forwardRef<\n\tHTMLLIElement,\n\tReact.ComponentProps<\"li\">\n>(({ className, ...props }, ref) => (\n\t<li ref={ref} className={cn(\"\", className)} {...props} />\n));\nPaginationItem.displayName = \"PaginationItem\";\n\ntype PaginationLinkProps = {\n\tisActive?: boolean;\n} & Pick<ButtonProps, \"size\"> &\n\tReact.ComponentProps<\"a\">;\n\nconst PaginationLink = ({\n\tclassName,\n\tisActive,\n\tsize = \"icon\",\n\t...props\n}: PaginationLinkProps) => (\n\t<a\n\t\taria-current={isActive ? \"page\" : undefined}\n\t\tclassName={cn(\n\t\t\tbuttonVariants({\n\t\t\t\tvariant: isActive ? \"outline\" : \"ghost\",\n\t\t\t\tsize,\n\t\t\t}),\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n);\nPaginationLink.displayName = \"PaginationLink\";\n\nconst PaginationPrevious = ({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof PaginationLink>) => (\n\t<PaginationLink\n\t\taria-label=\"Go to previous page\"\n\t\tsize=\"default\"\n\t\tclassName={cn(\"gap-1 pl-2.5\", className)}\n\t\t{...props}\n\t>\n\t\t<ChevronLeft className=\"h-4 w-4\" />\n\t\t<span>Previous</span>\n\t</PaginationLink>\n);\nPaginationPrevious.displayName = \"PaginationPrevious\";\n\nconst PaginationNext = ({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof PaginationLink>) => (\n\t<PaginationLink\n\t\taria-label=\"Go to next page\"\n\t\tsize=\"default\"\n\t\tclassName={cn(\"gap-1 pr-2.5\", className)}\n\t\t{...props}\n\t>\n\t\t<span>Next</span>\n\t\t<ChevronRight className=\"h-4 w-4\" />\n\t</PaginationLink>\n);\nPaginationNext.displayName = \"PaginationNext\";\n\nconst PaginationEllipsis = ({\n\tclassName,\n\t...props\n}: React.ComponentProps<\"span\">) => (\n\t<span\n\t\taria-hidden\n\t\tclassName={cn(\"flex h-9 w-9 items-center justify-center\", className)}\n\t\t{...props}\n\t>\n\t\t<MoreHorizontal className=\"h-4 w-4\" />\n\t\t<span className=\"sr-only\">More pages</span>\n\t</span>\n);\nPaginationEllipsis.displayName = \"PaginationEllipsis\";\n\nexport {\n\tPagination,\n\tPaginationContent,\n\tPaginationEllipsis,\n\tPaginationItem,\n\tPaginationLink,\n\tPaginationNext,\n\tPaginationPrevious,\n};\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/components/ui/popover.tsx",
    "content": "import * as React from \"react\";\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst Popover = PopoverPrimitive.Root;\n\nconst PopoverTrigger = PopoverPrimitive.Trigger;\n\nconst PopoverContent = React.forwardRef<\n\tReact.ElementRef<typeof PopoverPrimitive.Content>,\n\tReact.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\n>(({ className, align = \"center\", sideOffset = 4, ...props }, ref) => (\n\t<PopoverPrimitive.Portal>\n\t\t<PopoverPrimitive.Content\n\t\t\tref={ref}\n\t\t\talign={align}\n\t\t\tsideOffset={sideOffset}\n\t\t\tclassName={cn(\n\t\t\t\t\"z-50 w-72 rounded-md border border-neutral-200 bg-white p-4 text-neutral-950 shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t</PopoverPrimitive.Portal>\n));\nPopoverContent.displayName = PopoverPrimitive.Content.displayName;\n\nexport { Popover, PopoverTrigger, PopoverContent };\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/components/ui/progress.tsx",
    "content": "import * as React from \"react\";\nimport * as ProgressPrimitive from \"@radix-ui/react-progress\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst Progress = React.forwardRef<\n\tReact.ElementRef<typeof ProgressPrimitive.Root>,\n\tReact.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root>\n>(({ className, value, ...props }, ref) => (\n\t<ProgressPrimitive.Root\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"relative h-4 w-full overflow-hidden rounded-full bg-neutral-100 dark:bg-neutral-800\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t>\n\t\t<ProgressPrimitive.Indicator\n\t\t\tclassName=\"h-full w-full flex-1 bg-neutral-900 transition-all dark:bg-neutral-50\"\n\t\t\tstyle={{ transform: `translateX(-${100 - (value || 0)}%)` }}\n\t\t/>\n\t</ProgressPrimitive.Root>\n));\nProgress.displayName = ProgressPrimitive.Root.displayName;\n\nexport { Progress };\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/components/ui/radio-group.tsx",
    "content": "import * as React from \"react\";\nimport * as RadioGroupPrimitive from \"@radix-ui/react-radio-group\";\nimport { Circle } from \"lucide-react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst RadioGroup = React.forwardRef<\n\tReact.ElementRef<typeof RadioGroupPrimitive.Root>,\n\tReact.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>\n>(({ className, ...props }, ref) => {\n\treturn (\n\t\t<RadioGroupPrimitive.Root\n\t\t\tclassName={cn(\"grid gap-2\", className)}\n\t\t\t{...props}\n\t\t\tref={ref}\n\t\t/>\n\t);\n});\nRadioGroup.displayName = RadioGroupPrimitive.Root.displayName;\n\nconst RadioGroupItem = React.forwardRef<\n\tReact.ElementRef<typeof RadioGroupPrimitive.Item>,\n\tReact.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>\n>(({ className, ...props }, ref) => {\n\treturn (\n\t\t<RadioGroupPrimitive.Item\n\t\t\tref={ref}\n\t\t\tclassName={cn(\n\t\t\t\t\"aspect-square h-4 w-4 rounded-full border border-neutral-200 border-neutral-900 text-neutral-900 ring-offset-white focus:outline-none focus-visible:ring-2 focus-visible:ring-neutral-950 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 dark:border-neutral-800 dark:border-neutral-50 dark:text-neutral-50 dark:ring-offset-neutral-950 dark:focus-visible:ring-neutral-300\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<RadioGroupPrimitive.Indicator className=\"flex items-center justify-center\">\n\t\t\t\t<Circle className=\"h-2.5 w-2.5 fill-current text-current\" />\n\t\t\t</RadioGroupPrimitive.Indicator>\n\t\t</RadioGroupPrimitive.Item>\n\t);\n});\nRadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;\n\nexport { RadioGroup, RadioGroupItem };\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/components/ui/resizable.tsx",
    "content": "import { GripVertical } from \"lucide-react\";\nimport * as ResizablePrimitive from \"react-resizable-panels\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst ResizablePanelGroup = ({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>) => (\n\t<ResizablePrimitive.PanelGroup\n\t\tclassName={cn(\n\t\t\t\"flex h-full w-full data-[panel-group-direction=vertical]:flex-col\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n);\n\nconst ResizablePanel = ResizablePrimitive.Panel;\n\nconst ResizableHandle = ({\n\twithHandle,\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {\n\twithHandle?: boolean;\n}) => (\n\t<ResizablePrimitive.PanelResizeHandle\n\t\tclassName={cn(\n\t\t\t\"relative flex w-px items-center justify-center bg-neutral-200 after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-neutral-950 focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90 dark:bg-neutral-800 dark:focus-visible:ring-neutral-300\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t>\n\t\t{withHandle && (\n\t\t\t<div className=\"z-10 flex h-4 w-3 items-center justify-center rounded-sm border border-neutral-200 bg-neutral-200 dark:border-neutral-800 dark:bg-neutral-800\">\n\t\t\t\t<GripVertical className=\"h-2.5 w-2.5\" />\n\t\t\t</div>\n\t\t)}\n\t</ResizablePrimitive.PanelResizeHandle>\n);\n\nexport { ResizablePanelGroup, ResizablePanel, ResizableHandle };\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/components/ui/scroll-area.tsx",
    "content": "import * as React from \"react\";\nimport * as ScrollAreaPrimitive from \"@radix-ui/react-scroll-area\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst ScrollArea = React.forwardRef<\n\tReact.ElementRef<typeof ScrollAreaPrimitive.Root>,\n\tReact.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root>\n>(({ className, children, ...props }, ref) => (\n\t<ScrollAreaPrimitive.Root\n\t\tref={ref}\n\t\tclassName={cn(\"relative overflow-hidden\", className)}\n\t\t{...props}\n\t>\n\t\t<ScrollAreaPrimitive.Viewport className=\"h-full w-full rounded-[inherit]\">\n\t\t\t{children}\n\t\t</ScrollAreaPrimitive.Viewport>\n\t\t<ScrollBar />\n\t\t<ScrollAreaPrimitive.Corner />\n\t</ScrollAreaPrimitive.Root>\n));\nScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;\n\nconst ScrollBar = React.forwardRef<\n\tReact.ElementRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>,\n\tReact.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>\n>(({ className, orientation = \"vertical\", ...props }, ref) => (\n\t<ScrollAreaPrimitive.ScrollAreaScrollbar\n\t\tref={ref}\n\t\torientation={orientation}\n\t\tclassName={cn(\n\t\t\t\"flex touch-none select-none transition-colors\",\n\t\t\torientation === \"vertical\" &&\n\t\t\t\t\"h-full w-2.5 border-l border-l-transparent p-[1px]\",\n\t\t\torientation === \"horizontal\" &&\n\t\t\t\t\"h-2.5 flex-col border-t border-t-transparent p-[1px]\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t>\n\t\t<ScrollAreaPrimitive.ScrollAreaThumb className=\"relative flex-1 rounded-full bg-neutral-200 dark:bg-neutral-800\" />\n\t</ScrollAreaPrimitive.ScrollAreaScrollbar>\n));\nScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;\n\nexport { ScrollArea, ScrollBar };\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/components/ui/select.tsx",
    "content": "import * as React from \"react\";\nimport * as SelectPrimitive from \"@radix-ui/react-select\";\nimport { Check, ChevronDown, ChevronUp } from \"lucide-react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst Select = SelectPrimitive.Root;\n\nconst SelectGroup = SelectPrimitive.Group;\n\nconst SelectValue = SelectPrimitive.Value;\n\nconst SelectTrigger = React.forwardRef<\n\tReact.ElementRef<typeof SelectPrimitive.Trigger>,\n\tReact.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>\n>(({ className, children, ...props }, ref) => (\n\t<SelectPrimitive.Trigger\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"flex h-10 w-full items-center justify-between rounded-md border border-neutral-200 bg-white px-3 py-2 text-sm ring-offset-white placeholder:text-neutral-500 focus:outline-none focus:ring-2 focus:ring-neutral-950 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 dark:border-neutral-800 dark:bg-neutral-950 dark:ring-offset-neutral-950 dark:placeholder:text-neutral-400 dark:focus:ring-neutral-300\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t>\n\t\t{children}\n\t\t<SelectPrimitive.Icon asChild>\n\t\t\t<ChevronDown className=\"h-4 w-4 opacity-50\" />\n\t\t</SelectPrimitive.Icon>\n\t</SelectPrimitive.Trigger>\n));\nSelectTrigger.displayName = SelectPrimitive.Trigger.displayName;\n\nconst SelectScrollUpButton = React.forwardRef<\n\tReact.ElementRef<typeof SelectPrimitive.ScrollUpButton>,\n\tReact.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>\n>(({ className, ...props }, ref) => (\n\t<SelectPrimitive.ScrollUpButton\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"flex cursor-default items-center justify-center py-1\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t>\n\t\t<ChevronUp className=\"h-4 w-4\" />\n\t</SelectPrimitive.ScrollUpButton>\n));\nSelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;\n\nconst SelectScrollDownButton = React.forwardRef<\n\tReact.ElementRef<typeof SelectPrimitive.ScrollDownButton>,\n\tReact.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>\n>(({ className, ...props }, ref) => (\n\t<SelectPrimitive.ScrollDownButton\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"flex cursor-default items-center justify-center py-1\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t>\n\t\t<ChevronDown className=\"h-4 w-4\" />\n\t</SelectPrimitive.ScrollDownButton>\n));\nSelectScrollDownButton.displayName =\n\tSelectPrimitive.ScrollDownButton.displayName;\n\nconst SelectContent = React.forwardRef<\n\tReact.ElementRef<typeof SelectPrimitive.Content>,\n\tReact.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>\n>(({ className, children, position = \"popper\", ...props }, ref) => (\n\t<SelectPrimitive.Portal>\n\t\t<SelectPrimitive.Content\n\t\t\tref={ref}\n\t\t\tclassName={cn(\n\t\t\t\t\"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border border-neutral-200 bg-white text-neutral-950 shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50\",\n\t\t\t\tposition === \"popper\" &&\n\t\t\t\t\t\"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tposition={position}\n\t\t\t{...props}\n\t\t>\n\t\t\t<SelectScrollUpButton />\n\t\t\t<SelectPrimitive.Viewport\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"p-1\",\n\t\t\t\t\tposition === \"popper\" &&\n\t\t\t\t\t\t\"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]\",\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</SelectPrimitive.Viewport>\n\t\t\t<SelectScrollDownButton />\n\t\t</SelectPrimitive.Content>\n\t</SelectPrimitive.Portal>\n));\nSelectContent.displayName = SelectPrimitive.Content.displayName;\n\nconst SelectLabel = React.forwardRef<\n\tReact.ElementRef<typeof SelectPrimitive.Label>,\n\tReact.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>\n>(({ className, ...props }, ref) => (\n\t<SelectPrimitive.Label\n\t\tref={ref}\n\t\tclassName={cn(\"py-1.5 pl-8 pr-2 text-sm font-semibold\", className)}\n\t\t{...props}\n\t/>\n));\nSelectLabel.displayName = SelectPrimitive.Label.displayName;\n\nconst SelectItem = React.forwardRef<\n\tReact.ElementRef<typeof SelectPrimitive.Item>,\n\tReact.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>\n>(({ className, children, ...props }, ref) => (\n\t<SelectPrimitive.Item\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-neutral-100 focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t>\n\t\t<span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n\t\t\t<SelectPrimitive.ItemIndicator>\n\t\t\t\t<Check className=\"h-4 w-4\" />\n\t\t\t</SelectPrimitive.ItemIndicator>\n\t\t</span>\n\n\t\t<SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n\t</SelectPrimitive.Item>\n));\nSelectItem.displayName = SelectPrimitive.Item.displayName;\n\nconst SelectSeparator = React.forwardRef<\n\tReact.ElementRef<typeof SelectPrimitive.Separator>,\n\tReact.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n\t<SelectPrimitive.Separator\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"-mx-1 my-1 h-px bg-neutral-100 dark:bg-neutral-800\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nSelectSeparator.displayName = SelectPrimitive.Separator.displayName;\n\nexport {\n\tSelect,\n\tSelectGroup,\n\tSelectValue,\n\tSelectTrigger,\n\tSelectContent,\n\tSelectLabel,\n\tSelectItem,\n\tSelectSeparator,\n\tSelectScrollUpButton,\n\tSelectScrollDownButton,\n};\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/components/ui/separator.tsx",
    "content": "import * as React from \"react\";\nimport * as SeparatorPrimitive from \"@radix-ui/react-separator\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst Separator = React.forwardRef<\n\tReact.ElementRef<typeof SeparatorPrimitive.Root>,\n\tReact.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>\n>(\n\t(\n\t\t{ className, orientation = \"horizontal\", decorative = true, ...props },\n\t\tref,\n\t) => (\n\t\t<SeparatorPrimitive.Root\n\t\t\tref={ref}\n\t\t\tdecorative={decorative}\n\t\t\torientation={orientation}\n\t\t\tclassName={cn(\n\t\t\t\t\"shrink-0 bg-neutral-200 dark:bg-neutral-800\",\n\t\t\t\torientation === \"horizontal\" ? \"h-[1px] w-full\" : \"h-full w-[1px]\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t),\n);\nSeparator.displayName = SeparatorPrimitive.Root.displayName;\n\nexport { Separator };\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/components/ui/sheet.tsx",
    "content": "import * as React from \"react\";\nimport * as SheetPrimitive from \"@radix-ui/react-dialog\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { X } from \"lucide-react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst Sheet = SheetPrimitive.Root;\n\nconst SheetTrigger = SheetPrimitive.Trigger;\n\nconst SheetClose = SheetPrimitive.Close;\n\nconst SheetPortal = SheetPrimitive.Portal;\n\nconst SheetOverlay = React.forwardRef<\n\tReact.ElementRef<typeof SheetPrimitive.Overlay>,\n\tReact.ComponentPropsWithoutRef<typeof SheetPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n\t<SheetPrimitive.Overlay\n\t\tclassName={cn(\n\t\t\t\"fixed inset-0 z-50 bg-black/80  data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t\tref={ref}\n\t/>\n));\nSheetOverlay.displayName = SheetPrimitive.Overlay.displayName;\n\nconst sheetVariants = cva(\n\t\"fixed z-50 gap-4 bg-white p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500 dark:bg-neutral-950\",\n\t{\n\t\tvariants: {\n\t\t\tside: {\n\t\t\t\ttop: \"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top\",\n\t\t\t\tbottom:\n\t\t\t\t\t\"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom\",\n\t\t\t\tleft:\n\t\t\t\t\t\"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm\",\n\t\t\t\tright:\n\t\t\t\t\t\"inset-y-0 right-0 h-full w-3/4  border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tside: \"right\",\n\t\t},\n\t},\n);\n\ninterface SheetContentProps\n\textends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>,\n\t\tVariantProps<typeof sheetVariants> {}\n\nconst SheetContent = React.forwardRef<\n\tReact.ElementRef<typeof SheetPrimitive.Content>,\n\tSheetContentProps\n>(({ side = \"right\", className, children, ...props }, ref) => (\n\t<SheetPortal>\n\t\t<SheetOverlay />\n\t\t<SheetPrimitive.Content\n\t\t\tref={ref}\n\t\t\tclassName={cn(sheetVariants({ side }), className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t\t<SheetPrimitive.Close className=\"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-neutral-950 focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-neutral-100 dark:ring-offset-neutral-950 dark:focus:ring-neutral-300 dark:data-[state=open]:bg-neutral-800\">\n\t\t\t\t<X className=\"h-4 w-4\" />\n\t\t\t\t<span className=\"sr-only\">Close</span>\n\t\t\t</SheetPrimitive.Close>\n\t\t</SheetPrimitive.Content>\n\t</SheetPortal>\n));\nSheetContent.displayName = SheetPrimitive.Content.displayName;\n\nconst SheetHeader = ({\n\tclassName,\n\t...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n\t<div\n\t\tclassName={cn(\"flex flex-col space-y-2 text-center sm:text-left\", className)}\n\t\t{...props}\n\t/>\n);\nSheetHeader.displayName = \"SheetHeader\";\n\nconst SheetFooter = ({\n\tclassName,\n\t...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n\t<div\n\t\tclassName={cn(\n\t\t\t\"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n);\nSheetFooter.displayName = \"SheetFooter\";\n\nconst SheetTitle = React.forwardRef<\n\tReact.ElementRef<typeof SheetPrimitive.Title>,\n\tReact.ComponentPropsWithoutRef<typeof SheetPrimitive.Title>\n>(({ className, ...props }, ref) => (\n\t<SheetPrimitive.Title\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"text-lg font-semibold text-neutral-950 dark:text-neutral-50\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nSheetTitle.displayName = SheetPrimitive.Title.displayName;\n\nconst SheetDescription = React.forwardRef<\n\tReact.ElementRef<typeof SheetPrimitive.Description>,\n\tReact.ComponentPropsWithoutRef<typeof SheetPrimitive.Description>\n>(({ className, ...props }, ref) => (\n\t<SheetPrimitive.Description\n\t\tref={ref}\n\t\tclassName={cn(\"text-sm text-neutral-500 dark:text-neutral-400\", className)}\n\t\t{...props}\n\t/>\n));\nSheetDescription.displayName = SheetPrimitive.Description.displayName;\n\nexport {\n\tSheet,\n\tSheetPortal,\n\tSheetOverlay,\n\tSheetTrigger,\n\tSheetClose,\n\tSheetContent,\n\tSheetHeader,\n\tSheetFooter,\n\tSheetTitle,\n\tSheetDescription,\n};\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/components/ui/skeleton.tsx",
    "content": "import { cn } from \"@/lib/utils\";\n\nfunction Skeleton({\n\tclassName,\n\t...props\n}: React.HTMLAttributes<HTMLDivElement>) {\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\n\t\t\t\t\"animate-pulse rounded-md bg-neutral-100 dark:bg-neutral-800\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport { Skeleton };\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/components/ui/slider.tsx",
    "content": "import * as React from \"react\";\nimport * as SliderPrimitive from \"@radix-ui/react-slider\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst Slider = React.forwardRef<\n\tReact.ElementRef<typeof SliderPrimitive.Root>,\n\tReact.ComponentPropsWithoutRef<typeof SliderPrimitive.Root>\n>(({ className, ...props }, ref) => (\n\t<SliderPrimitive.Root\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"relative flex w-full touch-none select-none items-center\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t>\n\t\t<SliderPrimitive.Track className=\"relative h-2 w-full grow overflow-hidden rounded-full bg-neutral-100 dark:bg-neutral-800\">\n\t\t\t<SliderPrimitive.Range className=\"absolute h-full bg-neutral-900 dark:bg-neutral-50\" />\n\t\t</SliderPrimitive.Track>\n\t\t<SliderPrimitive.Thumb className=\"block h-5 w-5 rounded-full border-2 border-neutral-900 bg-white ring-offset-white transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-neutral-950 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 dark:border-neutral-50 dark:bg-neutral-950 dark:ring-offset-neutral-950 dark:focus-visible:ring-neutral-300\" />\n\t</SliderPrimitive.Root>\n));\nSlider.displayName = SliderPrimitive.Root.displayName;\n\nexport { Slider };\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/components/ui/sonner.tsx",
    "content": "import { useTheme } from \"next-themes\";\nimport { Toaster as Sonner } from \"sonner\";\n\ntype ToasterProps = React.ComponentProps<typeof Sonner>;\n\nconst Toaster = ({ ...props }: ToasterProps) => {\n\tconst { theme = \"system\" } = useTheme();\n\n\treturn (\n\t\t<Sonner\n\t\t\ttheme={theme as ToasterProps[\"theme\"]}\n\t\t\tclassName=\"toaster group\"\n\t\t\ttoastOptions={{\n\t\t\t\tclassNames: {\n\t\t\t\t\ttoast:\n\t\t\t\t\t\t\"group toast group-[.toaster]:bg-white group-[.toaster]:text-neutral-950 group-[.toaster]:border-neutral-200 group-[.toaster]:shadow-lg dark:group-[.toaster]:bg-neutral-950 dark:group-[.toaster]:text-neutral-50 dark:group-[.toaster]:border-neutral-800\",\n\t\t\t\t\tdescription:\n\t\t\t\t\t\t\"group-[.toast]:text-neutral-500 dark:group-[.toast]:text-neutral-400\",\n\t\t\t\t\tactionButton:\n\t\t\t\t\t\t\"group-[.toast]:bg-neutral-900 group-[.toast]:text-neutral-50 dark:group-[.toast]:bg-neutral-50 dark:group-[.toast]:text-neutral-900\",\n\t\t\t\t\tcancelButton:\n\t\t\t\t\t\t\"group-[.toast]:bg-neutral-100 group-[.toast]:text-neutral-500 dark:group-[.toast]:bg-neutral-800 dark:group-[.toast]:text-neutral-400\",\n\t\t\t\t},\n\t\t\t}}\n\t\t\t{...props}\n\t\t/>\n\t);\n};\n\nexport { Toaster };\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/components/ui/switch.tsx",
    "content": "import * as React from \"react\";\nimport * as SwitchPrimitives from \"@radix-ui/react-switch\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst Switch = React.forwardRef<\n\tReact.ElementRef<typeof SwitchPrimitives.Root>,\n\tReact.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root>\n>(({ className, ...props }, ref) => (\n\t<SwitchPrimitives.Root\n\t\tclassName={cn(\n\t\t\t\"peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-neutral-950 focus-visible:ring-offset-2 focus-visible:ring-offset-white disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-neutral-900 data-[state=unchecked]:bg-neutral-200 dark:focus-visible:ring-neutral-300 dark:focus-visible:ring-offset-neutral-950 dark:data-[state=checked]:bg-neutral-50 dark:data-[state=unchecked]:bg-neutral-800\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t\tref={ref}\n\t>\n\t\t<SwitchPrimitives.Thumb\n\t\t\tclassName={cn(\n\t\t\t\t\"pointer-events-none block h-5 w-5 rounded-full bg-white shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0 dark:bg-neutral-950\",\n\t\t\t)}\n\t\t/>\n\t</SwitchPrimitives.Root>\n));\nSwitch.displayName = SwitchPrimitives.Root.displayName;\n\nexport { Switch };\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/components/ui/table.tsx",
    "content": "import * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst Table = React.forwardRef<\n\tHTMLTableElement,\n\tReact.HTMLAttributes<HTMLTableElement>\n>(({ className, ...props }, ref) => (\n\t<div className=\"relative w-full overflow-auto\">\n\t\t<table\n\t\t\tref={ref}\n\t\t\tclassName={cn(\"w-full caption-bottom text-sm\", className)}\n\t\t\t{...props}\n\t\t/>\n\t</div>\n));\nTable.displayName = \"Table\";\n\nconst TableHeader = React.forwardRef<\n\tHTMLTableSectionElement,\n\tReact.HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n\t<thead ref={ref} className={cn(\"[&_tr]:border-b\", className)} {...props} />\n));\nTableHeader.displayName = \"TableHeader\";\n\nconst TableBody = React.forwardRef<\n\tHTMLTableSectionElement,\n\tReact.HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n\t<tbody\n\t\tref={ref}\n\t\tclassName={cn(\"[&_tr:last-child]:border-0\", className)}\n\t\t{...props}\n\t/>\n));\nTableBody.displayName = \"TableBody\";\n\nconst TableFooter = React.forwardRef<\n\tHTMLTableSectionElement,\n\tReact.HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n\t<tfoot\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"border-t bg-neutral-100/50 font-medium [&>tr]:last:border-b-0 dark:bg-neutral-800/50\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nTableFooter.displayName = \"TableFooter\";\n\nconst TableRow = React.forwardRef<\n\tHTMLTableRowElement,\n\tReact.HTMLAttributes<HTMLTableRowElement>\n>(({ className, ...props }, ref) => (\n\t<tr\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"border-b transition-colors hover:bg-neutral-100/50 data-[state=selected]:bg-neutral-100 dark:hover:bg-neutral-800/50 dark:data-[state=selected]:bg-neutral-800\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nTableRow.displayName = \"TableRow\";\n\nconst TableHead = React.forwardRef<\n\tHTMLTableCellElement,\n\tReact.ThHTMLAttributes<HTMLTableCellElement>\n>(({ className, ...props }, ref) => (\n\t<th\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"h-12 px-4 text-left align-middle font-medium text-neutral-500 [&:has([role=checkbox])]:pr-0 dark:text-neutral-400\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nTableHead.displayName = \"TableHead\";\n\nconst TableCell = React.forwardRef<\n\tHTMLTableCellElement,\n\tReact.TdHTMLAttributes<HTMLTableCellElement>\n>(({ className, ...props }, ref) => (\n\t<td\n\t\tref={ref}\n\t\tclassName={cn(\"p-4 align-middle [&:has([role=checkbox])]:pr-0\", className)}\n\t\t{...props}\n\t/>\n));\nTableCell.displayName = \"TableCell\";\n\nconst TableCaption = React.forwardRef<\n\tHTMLTableCaptionElement,\n\tReact.HTMLAttributes<HTMLTableCaptionElement>\n>(({ className, ...props }, ref) => (\n\t<caption\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"mt-4 text-sm text-neutral-500 dark:text-neutral-400\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nTableCaption.displayName = \"TableCaption\";\n\nexport {\n\tTable,\n\tTableHeader,\n\tTableBody,\n\tTableFooter,\n\tTableHead,\n\tTableRow,\n\tTableCell,\n\tTableCaption,\n};\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/components/ui/tabs.tsx",
    "content": "import * as React from \"react\";\nimport * as TabsPrimitive from \"@radix-ui/react-tabs\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst Tabs = TabsPrimitive.Root;\n\nconst TabsList = React.forwardRef<\n\tReact.ElementRef<typeof TabsPrimitive.List>,\n\tReact.ComponentPropsWithoutRef<typeof TabsPrimitive.List>\n>(({ className, ...props }, ref) => (\n\t<TabsPrimitive.List\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"inline-flex h-10 items-center justify-center rounded-md bg-neutral-100 p-1 text-neutral-500 dark:bg-neutral-800 dark:text-neutral-400\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nTabsList.displayName = TabsPrimitive.List.displayName;\n\nconst TabsTrigger = React.forwardRef<\n\tReact.ElementRef<typeof TabsPrimitive.Trigger>,\n\tReact.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>\n>(({ className, ...props }, ref) => (\n\t<TabsPrimitive.Trigger\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-white transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-neutral-950 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-white data-[state=active]:text-neutral-950 data-[state=active]:shadow-sm dark:ring-offset-neutral-950 dark:focus-visible:ring-neutral-300 dark:data-[state=active]:bg-neutral-950 dark:data-[state=active]:text-neutral-50\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nTabsTrigger.displayName = TabsPrimitive.Trigger.displayName;\n\nconst TabsContent = React.forwardRef<\n\tReact.ElementRef<typeof TabsPrimitive.Content>,\n\tReact.ComponentPropsWithoutRef<typeof TabsPrimitive.Content>\n>(({ className, ...props }, ref) => (\n\t<TabsPrimitive.Content\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"mt-2 ring-offset-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-neutral-950 focus-visible:ring-offset-2 dark:ring-offset-neutral-950 dark:focus-visible:ring-neutral-300\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nTabsContent.displayName = TabsPrimitive.Content.displayName;\n\nexport { Tabs, TabsList, TabsTrigger, TabsContent };\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/components/ui/textarea.tsx",
    "content": "import * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nexport interface TextareaProps\n\textends React.TextareaHTMLAttributes<HTMLTextAreaElement> {}\n\nconst Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(\n\t({ className, ...props }, ref) => {\n\t\treturn (\n\t\t\t<textarea\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"flex min-h-[80px] w-full rounded-md border border-neutral-200 bg-white px-3 py-2 text-sm ring-offset-white placeholder:text-neutral-500 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-neutral-950 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 dark:border-neutral-800 dark:bg-neutral-950 dark:ring-offset-neutral-950 dark:placeholder:text-neutral-400 dark:focus-visible:ring-neutral-300\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\tref={ref}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t},\n);\nTextarea.displayName = \"Textarea\";\n\nexport { Textarea };\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/components/ui/toast.tsx",
    "content": "import * as React from \"react\";\nimport * as ToastPrimitives from \"@radix-ui/react-toast\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { X } from \"lucide-react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst ToastProvider = ToastPrimitives.Provider;\n\nconst ToastViewport = React.forwardRef<\n\tReact.ElementRef<typeof ToastPrimitives.Viewport>,\n\tReact.ComponentPropsWithoutRef<typeof ToastPrimitives.Viewport>\n>(({ className, ...props }, ref) => (\n\t<ToastPrimitives.Viewport\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nToastViewport.displayName = ToastPrimitives.Viewport.displayName;\n\nconst toastVariants = cva(\n\t\"group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border border-neutral-200 p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full dark:border-neutral-800\",\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tdefault:\n\t\t\t\t\t\"border bg-white text-neutral-950 dark:bg-neutral-950 dark:text-neutral-50\",\n\t\t\t\tdestructive:\n\t\t\t\t\t\"destructive group border-red-500 bg-red-500 text-neutral-50 dark:border-red-900 dark:bg-red-900 dark:text-neutral-50\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tvariant: \"default\",\n\t\t},\n\t},\n);\n\nconst Toast = React.forwardRef<\n\tReact.ElementRef<typeof ToastPrimitives.Root>,\n\tReact.ComponentPropsWithoutRef<typeof ToastPrimitives.Root> &\n\t\tVariantProps<typeof toastVariants>\n>(({ className, variant, ...props }, ref) => {\n\treturn (\n\t\t<ToastPrimitives.Root\n\t\t\tref={ref}\n\t\t\tclassName={cn(toastVariants({ variant }), className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\nToast.displayName = ToastPrimitives.Root.displayName;\n\nconst ToastAction = React.forwardRef<\n\tReact.ElementRef<typeof ToastPrimitives.Action>,\n\tReact.ComponentPropsWithoutRef<typeof ToastPrimitives.Action>\n>(({ className, ...props }, ref) => (\n\t<ToastPrimitives.Action\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"inline-flex h-8 shrink-0 items-center justify-center rounded-md border border-neutral-200 bg-transparent px-3 text-sm font-medium ring-offset-white transition-colors hover:bg-neutral-100 focus:outline-none focus:ring-2 focus:ring-neutral-950 focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-neutral-100/40 group-[.destructive]:hover:border-red-500/30 group-[.destructive]:hover:bg-red-500 group-[.destructive]:hover:text-neutral-50 group-[.destructive]:focus:ring-red-500 dark:border-neutral-800 dark:ring-offset-neutral-950 dark:hover:bg-neutral-800 dark:focus:ring-neutral-300 dark:group-[.destructive]:border-neutral-800/40 dark:group-[.destructive]:hover:border-red-900/30 dark:group-[.destructive]:hover:bg-red-900 dark:group-[.destructive]:hover:text-neutral-50 dark:group-[.destructive]:focus:ring-red-900\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nToastAction.displayName = ToastPrimitives.Action.displayName;\n\nconst ToastClose = React.forwardRef<\n\tReact.ElementRef<typeof ToastPrimitives.Close>,\n\tReact.ComponentPropsWithoutRef<typeof ToastPrimitives.Close>\n>(({ className, ...props }, ref) => (\n\t<ToastPrimitives.Close\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"absolute right-2 top-2 rounded-md p-1 text-neutral-950/50 opacity-0 transition-opacity hover:text-neutral-950 focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600 dark:text-neutral-50/50 dark:hover:text-neutral-50\",\n\t\t\tclassName,\n\t\t)}\n\t\ttoast-close=\"\"\n\t\t{...props}\n\t>\n\t\t<X className=\"h-4 w-4\" />\n\t</ToastPrimitives.Close>\n));\nToastClose.displayName = ToastPrimitives.Close.displayName;\n\nconst ToastTitle = React.forwardRef<\n\tReact.ElementRef<typeof ToastPrimitives.Title>,\n\tReact.ComponentPropsWithoutRef<typeof ToastPrimitives.Title>\n>(({ className, ...props }, ref) => (\n\t<ToastPrimitives.Title\n\t\tref={ref}\n\t\tclassName={cn(\"text-sm font-semibold\", className)}\n\t\t{...props}\n\t/>\n));\nToastTitle.displayName = ToastPrimitives.Title.displayName;\n\nconst ToastDescription = React.forwardRef<\n\tReact.ElementRef<typeof ToastPrimitives.Description>,\n\tReact.ComponentPropsWithoutRef<typeof ToastPrimitives.Description>\n>(({ className, ...props }, ref) => (\n\t<ToastPrimitives.Description\n\t\tref={ref}\n\t\tclassName={cn(\"text-sm opacity-90\", className)}\n\t\t{...props}\n\t/>\n));\nToastDescription.displayName = ToastPrimitives.Description.displayName;\n\ntype ToastProps = React.ComponentPropsWithoutRef<typeof Toast>;\n\ntype ToastActionElement = React.ReactElement<typeof ToastAction>;\n\nexport {\n\ttype ToastProps,\n\ttype ToastActionElement,\n\tToastProvider,\n\tToastViewport,\n\tToast,\n\tToastTitle,\n\tToastDescription,\n\tToastClose,\n\tToastAction,\n};\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/components/ui/toaster.tsx",
    "content": "import { useToast } from \"@/hooks/use-toast\";\nimport {\n\tToast,\n\tToastClose,\n\tToastDescription,\n\tToastProvider,\n\tToastTitle,\n\tToastViewport,\n} from \"@/components/ui/toast\";\n\nexport function Toaster() {\n\tconst { toasts } = useToast();\n\n\treturn (\n\t\t<ToastProvider>\n\t\t\t{toasts.map(function ({ id, title, description, action, ...props }) {\n\t\t\t\treturn (\n\t\t\t\t\t<Toast key={id} {...props}>\n\t\t\t\t\t\t<div className=\"grid gap-1\">\n\t\t\t\t\t\t\t{title && <ToastTitle>{title}</ToastTitle>}\n\t\t\t\t\t\t\t{description && <ToastDescription>{description}</ToastDescription>}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{action}\n\t\t\t\t\t\t<ToastClose />\n\t\t\t\t\t</Toast>\n\t\t\t\t);\n\t\t\t})}\n\t\t\t<ToastViewport />\n\t\t</ToastProvider>\n\t);\n}\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/components/ui/toggle-group.tsx",
    "content": "import * as React from \"react\";\nimport * as ToggleGroupPrimitive from \"@radix-ui/react-toggle-group\";\nimport { type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"@/lib/utils\";\nimport { toggleVariants } from \"@/components/ui/toggle\";\n\nconst ToggleGroupContext = React.createContext<\n\tVariantProps<typeof toggleVariants>\n>({\n\tsize: \"default\",\n\tvariant: \"default\",\n});\n\nconst ToggleGroup = React.forwardRef<\n\tReact.ElementRef<typeof ToggleGroupPrimitive.Root>,\n\tReact.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Root> &\n\t\tVariantProps<typeof toggleVariants>\n>(({ className, variant, size, children, ...props }, ref) => (\n\t<ToggleGroupPrimitive.Root\n\t\tref={ref}\n\t\tclassName={cn(\"flex items-center justify-center gap-1\", className)}\n\t\t{...props}\n\t>\n\t\t<ToggleGroupContext.Provider value={{ variant, size }}>\n\t\t\t{children}\n\t\t</ToggleGroupContext.Provider>\n\t</ToggleGroupPrimitive.Root>\n));\n\nToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;\n\nconst ToggleGroupItem = React.forwardRef<\n\tReact.ElementRef<typeof ToggleGroupPrimitive.Item>,\n\tReact.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Item> &\n\t\tVariantProps<typeof toggleVariants>\n>(({ className, children, variant, size, ...props }, ref) => {\n\tconst context = React.useContext(ToggleGroupContext);\n\n\treturn (\n\t\t<ToggleGroupPrimitive.Item\n\t\t\tref={ref}\n\t\t\tclassName={cn(\n\t\t\t\ttoggleVariants({\n\t\t\t\t\tvariant: context.variant || variant,\n\t\t\t\t\tsize: context.size || size,\n\t\t\t\t}),\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t</ToggleGroupPrimitive.Item>\n\t);\n});\n\nToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;\n\nexport { ToggleGroup, ToggleGroupItem };\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/components/ui/toggle.tsx",
    "content": "import * as React from \"react\";\nimport * as TogglePrimitive from \"@radix-ui/react-toggle\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst toggleVariants = cva(\n\t\"inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-white transition-colors hover:bg-neutral-100 hover:text-neutral-500 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-neutral-950 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-neutral-100 data-[state=on]:text-neutral-900 dark:ring-offset-neutral-950 dark:hover:bg-neutral-800 dark:hover:text-neutral-400 dark:focus-visible:ring-neutral-300 dark:data-[state=on]:bg-neutral-800 dark:data-[state=on]:text-neutral-50\",\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tdefault: \"bg-transparent\",\n\t\t\t\toutline:\n\t\t\t\t\t\"border border-neutral-200 bg-transparent hover:bg-neutral-100 hover:text-neutral-900 dark:border-neutral-800 dark:hover:bg-neutral-800 dark:hover:text-neutral-50\",\n\t\t\t},\n\t\t\tsize: {\n\t\t\t\tdefault: \"h-10 px-3\",\n\t\t\t\tsm: \"h-9 px-2.5\",\n\t\t\t\tlg: \"h-11 px-5\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tvariant: \"default\",\n\t\t\tsize: \"default\",\n\t\t},\n\t},\n);\n\nconst Toggle = React.forwardRef<\n\tReact.ElementRef<typeof TogglePrimitive.Root>,\n\tReact.ComponentPropsWithoutRef<typeof TogglePrimitive.Root> &\n\t\tVariantProps<typeof toggleVariants>\n>(({ className, variant, size, ...props }, ref) => (\n\t<TogglePrimitive.Root\n\t\tref={ref}\n\t\tclassName={cn(toggleVariants({ variant, size, className }))}\n\t\t{...props}\n\t/>\n));\n\nToggle.displayName = TogglePrimitive.Root.displayName;\n\nexport { Toggle, toggleVariants };\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/components/ui/tooltip.tsx",
    "content": "import * as React from \"react\";\nimport * as TooltipPrimitive from \"@radix-ui/react-tooltip\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst TooltipProvider = TooltipPrimitive.Provider;\n\nconst Tooltip = TooltipPrimitive.Root;\n\nconst TooltipTrigger = TooltipPrimitive.Trigger;\n\nconst TooltipContent = React.forwardRef<\n\tReact.ElementRef<typeof TooltipPrimitive.Content>,\n\tReact.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n\t<TooltipPrimitive.Content\n\t\tref={ref}\n\t\tsideOffset={sideOffset}\n\t\tclassName={cn(\n\t\t\t\"z-50 overflow-hidden rounded-md border border-neutral-200 bg-white px-3 py-1.5 text-sm text-neutral-950 shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nTooltipContent.displayName = TooltipPrimitive.Content.displayName;\n\nexport { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/hooks/use-toast.ts",
    "content": "import * as React from \"react\";\n\nimport type { ToastActionElement, ToastProps } from \"@/components/ui/toast\";\n\nconst TOAST_LIMIT = 1;\nconst TOAST_REMOVE_DELAY = 1000000;\n\ntype ToasterToast = ToastProps & {\n\tid: string;\n\ttitle?: React.ReactNode;\n\tdescription?: React.ReactNode;\n\taction?: ToastActionElement;\n};\n\nconst actionTypes = {\n\tADD_TOAST: \"ADD_TOAST\",\n\tUPDATE_TOAST: \"UPDATE_TOAST\",\n\tDISMISS_TOAST: \"DISMISS_TOAST\",\n\tREMOVE_TOAST: \"REMOVE_TOAST\",\n} as const;\n\nlet count = 0;\n\nfunction genId() {\n\tcount = (count + 1) % Number.MAX_SAFE_INTEGER;\n\treturn count.toString();\n}\n\ntype ActionType = typeof actionTypes;\n\ntype Action =\n\t| {\n\t\t\ttype: ActionType[\"ADD_TOAST\"];\n\t\t\ttoast: ToasterToast;\n\t  }\n\t| {\n\t\t\ttype: ActionType[\"UPDATE_TOAST\"];\n\t\t\ttoast: Partial<ToasterToast>;\n\t  }\n\t| {\n\t\t\ttype: ActionType[\"DISMISS_TOAST\"];\n\t\t\ttoastId?: ToasterToast[\"id\"];\n\t  }\n\t| {\n\t\t\ttype: ActionType[\"REMOVE_TOAST\"];\n\t\t\ttoastId?: ToasterToast[\"id\"];\n\t  };\n\ninterface State {\n\ttoasts: ToasterToast[];\n}\n\nconst toastTimeouts = new Map<string, ReturnType<typeof setTimeout>>();\n\nconst addToRemoveQueue = (toastId: string) => {\n\tif (toastTimeouts.has(toastId)) {\n\t\treturn;\n\t}\n\n\tconst timeout = setTimeout(() => {\n\t\ttoastTimeouts.delete(toastId);\n\t\tdispatch({\n\t\t\ttype: \"REMOVE_TOAST\",\n\t\t\ttoastId: toastId,\n\t\t});\n\t}, TOAST_REMOVE_DELAY);\n\n\ttoastTimeouts.set(toastId, timeout);\n};\n\nexport const reducer = (state: State, action: Action): State => {\n\tswitch (action.type) {\n\t\tcase \"ADD_TOAST\":\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\ttoasts: [action.toast, ...state.toasts].slice(0, TOAST_LIMIT),\n\t\t\t};\n\n\t\tcase \"UPDATE_TOAST\":\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\ttoasts: state.toasts.map((t) =>\n\t\t\t\t\tt.id === action.toast.id ? { ...t, ...action.toast } : t,\n\t\t\t\t),\n\t\t\t};\n\n\t\tcase \"DISMISS_TOAST\": {\n\t\t\tconst { toastId } = action;\n\n\t\t\t// ! Side effects ! - This could be extracted into a dismissToast() action,\n\t\t\t// but I'll keep it here for simplicity\n\t\t\tif (toastId) {\n\t\t\t\taddToRemoveQueue(toastId);\n\t\t\t} else {\n\t\t\t\tstate.toasts.forEach((toast) => {\n\t\t\t\t\taddToRemoveQueue(toast.id);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\ttoasts: state.toasts.map((t) =>\n\t\t\t\t\tt.id === toastId || toastId === undefined\n\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t...t,\n\t\t\t\t\t\t\t\topen: false,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t: t,\n\t\t\t\t),\n\t\t\t};\n\t\t}\n\t\tcase \"REMOVE_TOAST\":\n\t\t\tif (action.toastId === undefined) {\n\t\t\t\treturn {\n\t\t\t\t\t...state,\n\t\t\t\t\ttoasts: [],\n\t\t\t\t};\n\t\t\t}\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\ttoasts: state.toasts.filter((t) => t.id !== action.toastId),\n\t\t\t};\n\t}\n};\n\nconst listeners: Array<(state: State) => void> = [];\n\nlet memoryState: State = { toasts: [] };\n\nfunction dispatch(action: Action) {\n\tmemoryState = reducer(memoryState, action);\n\tlisteners.forEach((listener) => {\n\t\tlistener(memoryState);\n\t});\n}\n\ntype Toast = Omit<ToasterToast, \"id\">;\n\nfunction toast({ ...props }: Toast) {\n\tconst id = genId();\n\n\tconst update = (props: ToasterToast) =>\n\t\tdispatch({\n\t\t\ttype: \"UPDATE_TOAST\",\n\t\t\ttoast: { ...props, id },\n\t\t});\n\tconst dismiss = () => dispatch({ type: \"DISMISS_TOAST\", toastId: id });\n\n\tdispatch({\n\t\ttype: \"ADD_TOAST\",\n\t\ttoast: {\n\t\t\t...props,\n\t\t\tid,\n\t\t\topen: true,\n\t\t\tonOpenChange: (open) => {\n\t\t\t\tif (!open) dismiss();\n\t\t\t},\n\t\t},\n\t});\n\n\treturn {\n\t\tid: id,\n\t\tdismiss,\n\t\tupdate,\n\t};\n}\n\nfunction useToast() {\n\tconst [state, setState] = React.useState<State>(memoryState);\n\n\tReact.useEffect(() => {\n\t\tlisteners.push(setState);\n\t\treturn () => {\n\t\t\tconst index = listeners.indexOf(setState);\n\t\t\tif (index > -1) {\n\t\t\t\tlisteners.splice(index, 1);\n\t\t\t}\n\t\t};\n\t}, [state]);\n\n\treturn {\n\t\t...state,\n\t\ttoast,\n\t\tdismiss: (toastId?: string) => dispatch({ type: \"DISMISS_TOAST\", toastId }),\n\t};\n}\n\nexport { useToast, toast };\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/index.css",
    "content": "@tailwind base;\n@tailwind components;\n@tailwind utilities;\n\n:root {\n\tfont-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;\n\tline-height: 1.5;\n\tfont-weight: 400;\n\n\tcolor-scheme: light dark;\n\n\tfont-synthesis: none;\n\ttext-rendering: optimizeLegibility;\n\t-webkit-font-smoothing: antialiased;\n\t-moz-osx-font-smoothing: grayscale;\n}\n\n*::selection {\n\tbackground-color: #444;\n\tcolor: white;\n\t/* Selected state text color */\n}\n\n::-webkit-scrollbar {\n\twidth: 5px;\n\t/* Super thin scrollbar */\n\theight: 5px;\n\t/* Super thin horizontal scrollbar */\n}\n\n::-webkit-scrollbar-track {\n\tbackground: #eee;\n\t/* Light track */\n}\n\n::-webkit-scrollbar-thumb {\n\tbackground: rgba(150, 150, 150, 0.4);\n\t/* Light thumb */\n\theight: 50px;\n\t/* Vertical scrollbar thumb height */\n}\n\n::-webkit-scrollbar-thumb:hover {\n\tbackground: #aaa;\n}\n\n::-webkit-scrollbar-thumb:horizontal {\n\theight: 5px;\n\t/* Horizontal scrollbar thumb height */\n}\n\n@layer base {\n\t:root {\n\t\t--radius: 0.5rem;\n\t}\n}\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/index.css.bak",
    "content": "@tailwind base;\n@tailwind components;\n@tailwind utilities;\n\n:root {\n\tfont-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;\n\tline-height: 1.5;\n\tfont-weight: 400;\n\n\tcolor-scheme: light dark;\n\n\tfont-synthesis: none;\n\ttext-rendering: optimizeLegibility;\n\t-webkit-font-smoothing: antialiased;\n\t-moz-osx-font-smoothing: grayscale;\n}\n\n*::selection {\n\tbackground-color: #444;\n\tcolor: white;\n\t/* Selected state text color */\n}\n\n::-webkit-scrollbar {\n\twidth: 5px;\n\t/* Super thin scrollbar */\n\theight: 5px;\n\t/* Super thin horizontal scrollbar */\n}\n\n::-webkit-scrollbar-track {\n\tbackground: #eee;\n\t/* Light track */\n}\n\n::-webkit-scrollbar-thumb {\n\tbackground: rgba(150, 150, 150, 0.4);\n\t/* Light thumb */\n\theight: 50px;\n\t/* Vertical scrollbar thumb height */\n}\n\n::-webkit-scrollbar-thumb:hover {\n\tbackground: #aaa;\n}\n\n::-webkit-scrollbar-thumb:horizontal {\n\theight: 5px;\n\t/* Horizontal scrollbar thumb height */\n}\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/lib/utils.ts",
    "content": "import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n\treturn twMerge(clsx(inputs));\n}\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/main.tsx",
    "content": "import { Provider } from \"react-redux\";\nimport { createRoot } from \"react-dom/client\";\nimport store from \"@/store/main\";\nimport AppWrapper from \"./AppWrapper.tsx\";\nimport \"./index.css\";\nimport { BrowserRouter } from \"react-router-dom\";\n\ncreateRoot(document.getElementById(\"root\")!).render(\n\t<Provider store={store}>\n\t\t<BrowserRouter>\n\t\t\t<AppWrapper />\n\t\t</BrowserRouter>\n\t</Provider>,\n);\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/store/main.tsx",
    "content": ""
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/src/vite-env.d.ts",
    "content": "/// <reference types=\"vite/client\" />\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/tailwind.config.js",
    "content": "/** @type {import('tailwindcss').Config} */\nexport default {\n\tdarkMode: [\"class\"],\n\tcontent: [\"./index.html\", \"./src/**/*.{js,ts,jsx,tsx}\"],\n\ttheme: {\n\t\textend: {\n\t\t\tborderRadius: {\n\t\t\t\tlg: \"var(--radius)\",\n\t\t\t\tmd: \"calc(var(--radius) - 2px)\",\n\t\t\t\tsm: \"calc(var(--radius) - 4px)\",\n\t\t\t},\n\t\t\tcolors: {},\n\t\t\tkeyframes: {\n\t\t\t\t\"accordion-down\": {\n\t\t\t\t\tfrom: {\n\t\t\t\t\t\theight: \"0\",\n\t\t\t\t\t},\n\t\t\t\t\tto: {\n\t\t\t\t\t\theight: \"var(--radix-accordion-content-height)\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"accordion-up\": {\n\t\t\t\t\tfrom: {\n\t\t\t\t\t\theight: \"var(--radix-accordion-content-height)\",\n\t\t\t\t\t},\n\t\t\t\t\tto: {\n\t\t\t\t\t\theight: \"0\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tanimation: {\n\t\t\t\t\"accordion-down\": \"accordion-down 0.2s ease-out\",\n\t\t\t\t\"accordion-up\": \"accordion-up 0.2s ease-out\",\n\t\t\t},\n\t\t},\n\t},\n\tplugins: [require(\"tailwindcss-animate\")],\n};\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/tailwind.config.js.bak",
    "content": "/** @type {import('tailwindcss').Config} */\nexport default {\n\tcontent: [\"./index.html\", \"./src/**/*.{js,ts,jsx,tsx}\"],\n\ttheme: {\n\t\textend: {},\n\t},\n\tplugins: [],\n};\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/tsconfig.app.json",
    "content": "{\n\t\"compilerOptions\": {\n\t\t\"target\": \"ES2020\",\n\t\t\"useDefineForClassFields\": true,\n\t\t\"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n\t\t\"module\": \"ESNext\",\n\t\t\"skipLibCheck\": true,\n\n\t\t/* Bundler mode */\n\t\t\"moduleResolution\": \"bundler\",\n\t\t\"allowImportingTsExtensions\": true,\n\t\t\"isolatedModules\": true,\n\t\t\"moduleDetection\": \"force\",\n\t\t\"noEmit\": true,\n\t\t\"jsx\": \"react-jsx\",\n\n\t\t/* Linting */\n\t\t\"strict\": true,\n\t\t\"noUnusedLocals\": true,\n\t\t\"noUnusedParameters\": true,\n\t\t\"noFallthroughCasesInSwitch\": true,\n\n\t\t\"baseUrl\": \".\",\n\t\t\"paths\": {\n\t\t\t\"@/*\": [\"./src/*\"]\n\t\t}\n\t},\n\t\"include\": [\"src\"]\n}\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/tsconfig.json",
    "content": "{\n\t\"files\": [],\n\t\"references\": [\n\t\t{ \"path\": \"./tsconfig.app.json\" },\n\t\t{ \"path\": \"./tsconfig.node.json\" }\n\t],\n\t\"compilerOptions\": {\n\t\t\"baseUrl\": \".\",\n\t\t\"paths\": {\n\t\t\t\"@/*\": [\"./src/*\"]\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/tsconfig.node.json",
    "content": "{\n\t\"compilerOptions\": {\n\t\t\"target\": \"ES2022\",\n\t\t\"lib\": [\"ES2023\"],\n\t\t\"module\": \"ESNext\",\n\t\t\"skipLibCheck\": true,\n\n\t\t/* Bundler mode */\n\t\t\"moduleResolution\": \"bundler\",\n\t\t\"allowImportingTsExtensions\": true,\n\t\t\"isolatedModules\": true,\n\t\t\"moduleDetection\": \"force\",\n\t\t\"noEmit\": true,\n\n\t\t/* Linting */\n\t\t\"strict\": true,\n\t\t\"noUnusedLocals\": true,\n\t\t\"noUnusedParameters\": true,\n\t\t\"noFallthroughCasesInSwitch\": true,\n\n\t\t\"baseUrl\": \".\",\n\t\t\"paths\": {\n\t\t\t\"@/*\": [\"./src/*\"]\n\t\t}\n\t},\n\t\"include\": [\"vite.config.ts\"]\n}\n"
  },
  {
    "path": "cofounder/boilerplate/vitereact-boilerplate/vite.config.ts",
    "content": "import path from \"path\";\nimport { defineConfig } from \"vite\";\nimport react from \"@vitejs/plugin-react\";\nimport cofounderVitePlugin from \"./src/_cofounder/vite-plugin/index\";\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n\tplugins: [\n\t\t// webcontainers stuff\n\t\t{\n\t\t\tname: \"isolation\",\n\t\t\tconfigureServer(server) {\n\t\t\t\tserver.middlewares.use((_req, res, next) => {\n\t\t\t\t\tres.setHeader(\"Cross-Origin-Opener-Policy\", \"same-origin\");\n\t\t\t\t\tres.setHeader(\"Cross-Origin-Embedder-Policy\", \"credentialless\");\n\t\t\t\t\tnext();\n\t\t\t\t});\n\t\t\t},\n\t\t},\n\t\t// pre transform ; to replace/inject <GenUi*> to allow editing ui\n\t\t{\n\t\t\tname: \"cofounderVitePluginPre\",\n\t\t\tasync transform(code, id) {\n\t\t\t\treturn await cofounderVitePlugin.pre({\n\t\t\t\t\tcode,\n\t\t\t\t\tpath: id,\n\t\t\t\t});\n\t\t\t},\n\t\t\tenforce: \"pre\", // ensure this plugin runs before other transformations\n\t\t},\n\n\t\treact(),\n\t],\n\tresolve: {\n\t\talias: {\n\t\t\t\"@\": path.resolve(__dirname, \"./src\"),\n\t\t},\n\t},\n});\n"
  },
  {
    "path": "cofounder/dashboard/.gitignore",
    "content": "public\n\n# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\npnpm-debug.log*\nlerna-debug.log*\n\nnode_modules\ndist\ndist-ssr\n*.local\n\n# Editor directories and files\n.vscode/*\n!.vscode/extensions.json\n.idea\n.DS_Store\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n*.sw?\n"
  },
  {
    "path": "cofounder/dashboard/.prettierignore",
    "content": "gits/\nvectordb/\n"
  },
  {
    "path": "cofounder/dashboard/.prettierrc",
    "content": "{\n\t\"tabWidth\": 1,\n\t\"useTabs\": true\n}\n"
  },
  {
    "path": "cofounder/dashboard/README.md",
    "content": "[dashboard]"
  },
  {
    "path": "cofounder/dashboard/components.json",
    "content": "{\n\t\"$schema\": \"https://ui.shadcn.com/schema.json\",\n\t\"style\": \"default\",\n\t\"rsc\": false,\n\t\"tsx\": true,\n\t\"tailwind\": {\n\t\t\"config\": \"tailwind.config.js\",\n\t\t\"css\": \"src/index.css\",\n\t\t\"baseColor\": \"neutral\",\n\t\t\"cssVariables\": false,\n\t\t\"prefix\": \"\"\n\t},\n\t\"aliases\": {\n\t\t\"components\": \"@/components\",\n\t\t\"utils\": \"@/lib/utils\",\n\t\t\"ui\": \"@/components/ui\",\n\t\t\"lib\": \"@/lib\",\n\t\t\"hooks\": \"@/hooks\"\n\t}\n}\n"
  },
  {
    "path": "cofounder/dashboard/eslint.config.js",
    "content": "import js from \"@eslint/js\";\nimport globals from \"globals\";\nimport reactHooks from \"eslint-plugin-react-hooks\";\nimport reactRefresh from \"eslint-plugin-react-refresh\";\nimport tseslint from \"typescript-eslint\";\n\nexport default tseslint.config({\n\textends: [js.configs.recommended, ...tseslint.configs.recommended],\n\tfiles: [\"**/*.{ts,tsx}\"],\n\tignores: [\"dist\"],\n\tlanguageOptions: {\n\t\tecmaVersion: 2020,\n\t\tglobals: globals.browser,\n\t},\n\tplugins: {\n\t\t\"react-hooks\": reactHooks,\n\t\t\"react-refresh\": reactRefresh,\n\t},\n\trules: {\n\t\t...reactHooks.configs.recommended.rules,\n\t\t\"react-refresh/only-export-components\": [\n\t\t\t\"warn\",\n\t\t\t{ allowConstantExport: true },\n\t\t],\n\t},\n});\n"
  },
  {
    "path": "cofounder/dashboard/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n\t<head>\n\t\t<meta charset=\"UTF-8\" />\n\t\t<link rel=\"icon\" type=\"image/svg+xml\" href=\"/favicon.png\" />\n\t\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n\t\t<link\n\t\t\thref=\"https://fonts.googleapis.com/css2?family=Karla:wght@100;200;300;400;500;600;700;800;900&display=swap\"\n\t\t\trel=\"stylesheet\"\n\t\t/>\n\t\t<link\n\t\t\thref=\"https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@100;200;300;400;500;600;700;800;900&display=swap\"\n\t\t\trel=\"stylesheet\"\n\t\t/>\n\t\t<title>Cofounder Dashboard</title>\n\t</head>\n\t<body>\n\t\t<div id=\"root\"></div>\n\t\t<script type=\"module\" src=\"/src/main.tsx\"></script>\n\t\t<script>\n\t\t\tdocument.addEventListener(\"keydown\", (event) => {\n\t\t\t\tif (event.ctrlKey && event.key === \"k\") {\n\t\t\t\t\tconsole.log(\"Ctrl+K pressed!\");\n\t\t\t\t\tevent.preventDefault(); // Prevent doing a google search\n\t\t\t\t}\n\t\t\t});\n\t\t</script>\n\t</body>\n</html>\n"
  },
  {
    "path": "cofounder/dashboard/package.json",
    "content": "{\n\t\"name\": \"dashboard\",\n\t\"private\": true,\n\t\"version\": \"0.0.0\",\n\t\"type\": \"module\",\n\t\"scripts\": {\n\t\t\"dev\": \"vite\",\n\t\t\"build\": \"vite build\",\n\t\t\"lint\": \"eslint .\",\n\t\t\"preview\": \"vite preview\"\n\t},\n\t\"dependencies\": {\n\t\t\"@heroicons/react\": \"^2.1.5\",\n\t\t\"@hookform/resolvers\": \"^3.9.0\",\n\t\t\"@radix-ui/react-accordion\": \"^1.2.0\",\n\t\t\"@radix-ui/react-alert-dialog\": \"^1.1.1\",\n\t\t\"@radix-ui/react-aspect-ratio\": \"^1.1.0\",\n\t\t\"@radix-ui/react-avatar\": \"^1.1.0\",\n\t\t\"@radix-ui/react-checkbox\": \"^1.1.1\",\n\t\t\"@radix-ui/react-collapsible\": \"^1.1.0\",\n\t\t\"@radix-ui/react-context-menu\": \"^2.2.1\",\n\t\t\"@radix-ui/react-dialog\": \"^1.1.1\",\n\t\t\"@radix-ui/react-dropdown-menu\": \"^2.1.1\",\n\t\t\"@radix-ui/react-hover-card\": \"^1.1.1\",\n\t\t\"@radix-ui/react-label\": \"^2.1.0\",\n\t\t\"@radix-ui/react-menubar\": \"^1.1.1\",\n\t\t\"@radix-ui/react-navigation-menu\": \"^1.2.0\",\n\t\t\"@radix-ui/react-popover\": \"^1.1.1\",\n\t\t\"@radix-ui/react-progress\": \"^1.1.0\",\n\t\t\"@radix-ui/react-radio-group\": \"^1.2.0\",\n\t\t\"@radix-ui/react-scroll-area\": \"^1.1.0\",\n\t\t\"@radix-ui/react-select\": \"^2.1.1\",\n\t\t\"@radix-ui/react-separator\": \"^1.1.0\",\n\t\t\"@radix-ui/react-slider\": \"^1.2.0\",\n\t\t\"@radix-ui/react-slot\": \"^1.1.0\",\n\t\t\"@radix-ui/react-switch\": \"^1.1.0\",\n\t\t\"@radix-ui/react-tabs\": \"^1.1.0\",\n\t\t\"@radix-ui/react-toast\": \"^1.2.1\",\n\t\t\"@radix-ui/react-toggle\": \"^1.1.0\",\n\t\t\"@radix-ui/react-toggle-group\": \"^1.1.0\",\n\t\t\"@radix-ui/react-tooltip\": \"^1.1.2\",\n\t\t\"@reduxjs/toolkit\": \"^2.2.7\",\n\t\t\"@trbn/jsoncanvas\": \"^1.0.6\",\n\t\t\"@xyflow/react\": \"^12.3.0\",\n\t\t\"axios\": \"^1.7.7\",\n\t\t\"class-variance-authority\": \"^0.7.0\",\n\t\t\"clsx\": \"^2.1.1\",\n\t\t\"cmdk\": \"^1.0.0\",\n\t\t\"colormap\": \"^2.3.2\",\n\t\t\"d3\": \"^7.9.0\",\n\t\t\"date-fns\": \"^4.0.0-beta.1\",\n\t\t\"embla-carousel-autoplay\": \"^8.3.0\",\n\t\t\"embla-carousel-react\": \"^8.3.0\",\n\t\t\"framer-motion\": \"^11.5.4\",\n\t\t\"input-otp\": \"^1.2.4\",\n\t\t\"lodash-es\": \"^4.17.21\",\n\t\t\"lucide-react\": \"^0.439.0\",\n\t\t\"next-themes\": \"^0.3.0\",\n\t\t\"react\": \"^18.3.1\",\n\t\t\"react-day-picker\": \"^8.10.1\",\n\t\t\"react-dom\": \"^18.3.1\",\n\t\t\"react-hook-form\": \"^7.53.0\",\n\t\t\"react-markdown\": \"^9.0.1\",\n\t\t\"react-redux\": \"^9.1.2\",\n\t\t\"react-resizable-panels\": \"^2.1.3\",\n\t\t\"react-router-dom\": \"^6.26.0\",\n\t\t\"react-speech-recognition\": \"^3.10.0\",\n\t\t\"react-syntax-highlighter\": \"^15.5.0\",\n\t\t\"react-tooltip\": \"^5.28.0\",\n\t\t\"recharts\": \"^2.12.7\",\n\t\t\"redux\": \"^5.0.1\",\n\t\t\"redux-persist\": \"^6.0.0\",\n\t\t\"redux-thunk\": \"^3.1.0\",\n\t\t\"regenerator-runtime\": \"^0.14.1\",\n\t\t\"rehype-highlight\": \"^7.0.0\",\n\t\t\"rehype-raw\": \"^7.0.0\",\n\t\t\"remark-frontmatter\": \"^5.0.0\",\n\t\t\"remark-gfm\": \"^4.0.0\",\n\t\t\"socket.io-client\": \"^4.7.5\",\n\t\t\"sonner\": \"^1.5.0\",\n\t\t\"tailwind-merge\": \"^2.5.2\",\n\t\t\"tailwindcss-animate\": \"^1.0.7\",\n\t\t\"use-react-screenshot\": \"^4.0.0\",\n\t\t\"use-screenshot-hook\": \"^1.0.2\",\n\t\t\"vaul\": \"^0.9.3\",\n\t\t\"zod\": \"^3.23.8\"\n\t},\n\t\"devDependencies\": {\n\t\t\"@eslint/js\": \"^9.8.0\",\n\t\t\"@types/lodash-es\": \"^4.17.12\",\n\t\t\"@types/node\": \"^22.1.0\",\n\t\t\"@types/react\": \"^18.3.3\",\n\t\t\"@types/react-dom\": \"^18.3.0\",\n\t\t\"@types/react-syntax-highlighter\": \"^15.5.13\",\n\t\t\"@vitejs/plugin-react\": \"^4.3.1\",\n\t\t\"autoprefixer\": \"^10.4.20\",\n\t\t\"eslint\": \"^9.8.0\",\n\t\t\"eslint-plugin-react-hooks\": \"^5.1.0-rc.0\",\n\t\t\"eslint-plugin-react-refresh\": \"^0.4.9\",\n\t\t\"globals\": \"^15.9.0\",\n\t\t\"html2canvas\": \"^1.4.1\",\n\t\t\"postcss\": \"^8.4.41\",\n\t\t\"tailwindcss\": \"^3.4.8\",\n\t\t\"typescript\": \"^5.5.3\",\n\t\t\"typescript-eslint\": \"^8.0.0\",\n\t\t\"vite\": \"^5.4.0\"\n\t}\n}\n"
  },
  {
    "path": "cofounder/dashboard/postcss.config.js",
    "content": "export default {\n\tplugins: {\n\t\ttailwindcss: {},\n\t\tautoprefixer: {},\n\t},\n};\n"
  },
  {
    "path": "cofounder/dashboard/src/App.tsx",
    "content": "import React, { useCallback, useState, useEffect } from \"react\";\nimport { Route, Routes, useLocation } from \"react-router-dom\";\nimport cofounder from \"@/assets/cofounder.webp\";\nimport Sidebar from \"@/components/views/sidebar\";\nimport ProjectsList from \"@/components/views/projects-list\";\nimport ComponentsDesigner from \"@/components/views/component-designer\";\nimport Settings from \"@/components/views/settings\";\nimport Project from \"@/components/views/project\";\n\nconst App: React.FC = () => {\n\tconst [pingServer, setPingServer] = useState(false);\n\tconst [pingServerChecked, setPingServerChecked] = useState(false);\n\tconst location = useLocation();\n\n\tconst SERVER_LOCAL_URL = \"http://localhost:4200/api\";\n\tuseEffect(() => {\n\t\tconst checkPingServer = async () => {\n\t\t\ttry {\n\t\t\t\tconst response = await fetch(`${SERVER_LOCAL_URL}/ping`);\n\t\t\t\tif (response.ok) {\n\t\t\t\t\tsetPingServer(true);\n\t\t\t\t} else {\n\t\t\t\t\tsetPingServer(false);\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\tsetPingServer(false);\n\t\t\t}\n\t\t\tsetPingServerChecked(true);\n\t\t};\n\t\tcheckPingServer();\n\t}, []);\n\tif (!pingServerChecked) return <></>;\n\n\treturn (\n\t\t<>\n\t\t\t{(pingServer && (\n\t\t\t\t<>\n\t\t\t\t\t<div className=\"flex h-screen\">\n\t\t\t\t\t\t{!location.pathname.startsWith(\"/project/\") && <Sidebar />}\n\t\t\t\t\t\t<div className=\"flex-1 overflow-auto\">\n\t\t\t\t\t\t\t<Routes>\n\t\t\t\t\t\t\t\t<Route\n\t\t\t\t\t\t\t\t\tpath=\"/\"\n\t\t\t\t\t\t\t\t\telement={\n\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"container text-white mx-auto w-full max-w-[90vw] xl:max-w-[60vw] p-12 mt-12 text-left whitespace-pre-line break-words\">\n\t\t\t\t\t\t\t\t\t\t\t\t<section className=\"pb-4 mb-4 text-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\t\t\t\t\t\t\thref=\"https://github.com/raidendotai/cofounder\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"opacity-100 hover:opacity-90 duration-200\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"rounded rounded-xl max-w-[90vw] md:max-w-[35vw] mx-auto\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsrc={cofounder}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t\t\t\t\t</section>\n\t\t\t\t\t\t\t\t\t\t\t\t<h2 className=\"mt-4 text-2xl opacity-50 font-light text-center uppercase\">\n\t\t\t\t\t\t\t\t\t\t\t\t\tearly alpha release\n\t\t\t\t\t\t\t\t\t\t\t\t</h2>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<Route\n\t\t\t\t\t\t\t\t\tpath=\"/projects\"\n\t\t\t\t\t\t\t\t\telement={\n\t\t\t\t\t\t\t\t\t\t<div className=\"container text-white mx-auto w-full max-w-[90vw] xl:max-w-[80vw] p-6 mt-6 text-left whitespace-pre-line break-words\">\n\t\t\t\t\t\t\t\t\t\t\t<ProjectsList />\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<Route path=\"/project/:project\" element={<Project />} />\n\t\t\t\t\t\t\t\t<Route path=\"/playground/designer\" element={<ComponentsDesigner />} />\n\t\t\t\t\t\t\t\t<Route path=\"/settings\" element={<Settings />} />\n\t\t\t\t\t\t\t</Routes>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</>\n\t\t\t)) || (\n\t\t\t\t<>\n\t\t\t\t\t<div className=\"flex items-center justify-center h-screen w-full text-white\">\n\t\t\t\t\t\t<h1 className=\"text-2xl font-light opacity-50 whitespace-pre-wrap break-all\">\n\t\t\t\t\t\t\t{`{ local cofounder/api server at \\`${SERVER_LOCAL_URL}\\` not reachable }`}\n\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t{`>\\tmake sure local cofounder server is launched\\n\\t( use \\`npm run start\\` in cofounder/api/ )`}\n\t\t\t\t\t\t</h1>\n\t\t\t\t\t</div>\n\t\t\t\t</>\n\t\t\t)}\n\t\t</>\n\t);\n};\n\nexport default App;\n"
  },
  {
    "path": "cofounder/dashboard/src/App.tsx.bak",
    "content": "import React from \"react\";\nimport { Route, Routes } from \"react-router-dom\";\nimport cofounder from \"@/assets/cofounder.webp\";\nimport { Button } from \"@/components/ui/button\";\n\nconst App: React.FC = () => {\n\treturn (\n\t\t<>\n\t\t\t<div className=\"container mx-auto w-full xl:w-[60vw] p-12 mt-12 text-left whitespace-pre-line break-words\">\n\t\t\t\t<section className=\"pb-4 mb-4 text-center\">\n\t\t\t\t\t<a\n\t\t\t\t\t\thref=\"https://github.com/raidendotai/cofounder\"\n\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\tclassName=\"opacity-100 hover:opacity-90 duration-200\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<img\n\t\t\t\t\t\t\tclassName=\"rounded rounded-xl md:max-w-[30vw] mx-auto\"\n\t\t\t\t\t\t\tsrc={cofounder}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</a>\n\t\t\t\t\t<h1 className=\"mt-8 text-2xl\">Vite + React</h1>\n\t\t\t\t\t<h1 className=\"mt-2\">your app will update here as it generates</h1>\n\t\t\t\t</section>\n\t\t\t</div>\n\t\t</>\n\t);\n};\n\nexport default App;\n"
  },
  {
    "path": "cofounder/dashboard/src/app-wrapper.tsx",
    "content": "import React, { useCallback, useState, useEffect } from \"react\";\nimport App from \"@/App.tsx\";\n\nconst AppWrapper: React.FC = () => {\n\treturn (\n\t\t<>\n\t\t\t{/*<Cmdl />*/}\n\t\t\t<App />\n\t\t</>\n\t);\n};\n\nexport default AppWrapper;\n"
  },
  {
    "path": "cofounder/dashboard/src/app.css",
    "content": "#root {\n\tmax-width: 90vw;\n\tmargin: 0 auto;\n\tpadding: 2rem;\n}\n"
  },
  {
    "path": "cofounder/dashboard/src/components/flow/helpers/FloatingConnectionLine.tsx",
    "content": "import React from \"react\";\nimport { getBezierPath } from \"@xyflow/react\";\n\nimport { getEdgeParams } from \"@/components/flow/helpers/utils.js\";\n\nfunction FloatingConnectionLine({\n\ttoX,\n\ttoY,\n\tfromPosition,\n\ttoPosition,\n\tfromNode,\n}) {\n\tif (!fromNode) {\n\t\treturn null;\n\t}\n\n\tconst targetNode = {\n\t\tid: \"connection-target\",\n\t\tmeasured: {\n\t\t\twidth: 1,\n\t\t\theight: 1,\n\t\t},\n\t\tinternals: {\n\t\t\tpositionAbsolute: { x: toX, y: toY },\n\t\t},\n\t};\n\n\tconst { sx, sy } = getEdgeParams(fromNode, targetNode);\n\tconst [edgePath] = getBezierPath({\n\t\tsourceX: sx,\n\t\tsourceY: sy,\n\t\tsourcePosition: fromPosition,\n\t\ttargetPosition: toPosition,\n\t\ttargetX: toX,\n\t\ttargetY: toY,\n\t});\n\n\treturn (\n\t\t<g>\n\t\t\t<path\n\t\t\t\tfill=\"none\"\n\t\t\t\tstroke=\"#222\"\n\t\t\t\tstrokeWidth={1.5}\n\t\t\t\tclassName=\"animated\"\n\t\t\t\td={edgePath}\n\t\t\t/>\n\t\t\t<circle\n\t\t\t\tcx={toX}\n\t\t\t\tcy={toY}\n\t\t\t\tfill=\"#fff\"\n\t\t\t\tr={3}\n\t\t\t\tstroke=\"#222\"\n\t\t\t\tstrokeWidth={1.5}\n\t\t\t/>\n\t\t</g>\n\t);\n}\n\nexport default FloatingConnectionLine;\n"
  },
  {
    "path": "cofounder/dashboard/src/components/flow/helpers/FloatingEdge.tsx",
    "content": "import { getBezierPath, useInternalNode } from \"@xyflow/react\";\n\nimport { getEdgeParams } from \"@/components/flow/helpers/utils.js\";\n\nfunction FloatingEdge({ id, source, target, markerEnd, style }) {\n\tconst sourceNode = useInternalNode(source);\n\tconst targetNode = useInternalNode(target);\n\n\tif (!sourceNode || !targetNode) {\n\t\treturn null;\n\t}\n\n\tconst { sx, sy, tx, ty, sourcePos, targetPos } = getEdgeParams(\n\t\tsourceNode,\n\t\ttargetNode,\n\t);\n\n\tconst [edgePath] = getBezierPath({\n\t\tsourceX: sx,\n\t\tsourceY: sy,\n\t\tsourcePosition: sourcePos,\n\t\ttargetPosition: targetPos,\n\t\ttargetX: tx,\n\t\ttargetY: ty,\n\t});\n\n\treturn (\n\t\t<path\n\t\t\tid={id}\n\t\t\tclassName=\"react-flow__edge-path\"\n\t\t\td={edgePath}\n\t\t\tmarkerEnd={markerEnd}\n\t\t\tstyle={style}\n\t\t/>\n\t);\n}\n\nexport default FloatingEdge;\n"
  },
  {
    "path": "cofounder/dashboard/src/components/flow/helpers/floating.css",
    "content": ".floatingedges {\n\tflex-direction: column;\n\tdisplay: flex;\n\tflex-grow: 1;\n\theight: 100%;\n}\n\n.floatingedges .react-flow__handle {\n\topacity: 0;\n}\n"
  },
  {
    "path": "cofounder/dashboard/src/components/flow/helpers/utils.js",
    "content": "import { Position, MarkerType } from \"@xyflow/react\";\n\n// this helper function returns the intersection point\n// of the line between the center of the intersectionNode and the target node\nfunction getNodeIntersection(intersectionNode, targetNode) {\n\t// https://math.stackexchange.com/questions/1724792/an-algorithm-for-finding-the-intersection-point-between-a-center-of-vision-and-a\n\tconst { width: intersectionNodeWidth, height: intersectionNodeHeight } =\n\t\tintersectionNode.measured;\n\tconst intersectionNodePosition = intersectionNode.internals.positionAbsolute;\n\tconst targetPosition = targetNode.internals.positionAbsolute;\n\n\tconst w = intersectionNodeWidth / 2;\n\tconst h = intersectionNodeHeight / 2;\n\n\tconst x2 = intersectionNodePosition.x + w;\n\tconst y2 = intersectionNodePosition.y + h;\n\tconst x1 = targetPosition.x + targetNode.measured.width / 2;\n\tconst y1 = targetPosition.y + targetNode.measured.height / 2;\n\n\tconst xx1 = (x1 - x2) / (2 * w) - (y1 - y2) / (2 * h);\n\tconst yy1 = (x1 - x2) / (2 * w) + (y1 - y2) / (2 * h);\n\tconst a = 1 / (Math.abs(xx1) + Math.abs(yy1));\n\tconst xx3 = a * xx1;\n\tconst yy3 = a * yy1;\n\tconst x = w * (xx3 + yy3) + x2;\n\tconst y = h * (-xx3 + yy3) + y2;\n\n\treturn { x, y };\n}\n\n// returns the position (top,right,bottom or right) passed node compared to the intersection point\nfunction getEdgePosition(node, intersectionPoint) {\n\tconst n = { ...node.internals.positionAbsolute, ...node };\n\tconst nx = Math.round(n.x);\n\tconst ny = Math.round(n.y);\n\tconst px = Math.round(intersectionPoint.x);\n\tconst py = Math.round(intersectionPoint.y);\n\n\tif (px <= nx + 1) {\n\t\treturn Position.Left;\n\t}\n\tif (px >= nx + n.measured.width - 1) {\n\t\treturn Position.Right;\n\t}\n\tif (py <= ny + 1) {\n\t\treturn Position.Top;\n\t}\n\tif (py >= n.y + n.measured.height - 1) {\n\t\treturn Position.Bottom;\n\t}\n\n\treturn Position.Top;\n}\n\n// returns the parameters (sx, sy, tx, ty, sourcePos, targetPos) you need to create an edge\nexport function getEdgeParams(source, target) {\n\tconst sourceIntersectionPoint = getNodeIntersection(source, target);\n\tconst targetIntersectionPoint = getNodeIntersection(target, source);\n\n\tconst sourcePos = getEdgePosition(source, sourceIntersectionPoint);\n\tconst targetPos = getEdgePosition(target, targetIntersectionPoint);\n\n\treturn {\n\t\tsx: sourceIntersectionPoint.x,\n\t\tsy: sourceIntersectionPoint.y,\n\t\ttx: targetIntersectionPoint.x,\n\t\tty: targetIntersectionPoint.y,\n\t\tsourcePos,\n\t\ttargetPos,\n\t};\n}\n\nexport function createNodesAndEdges() {\n\tconst nodes = [];\n\tconst edges = [];\n\tconst center = { x: window.innerWidth / 2, y: window.innerHeight / 2 };\n\n\tnodes.push({ id: \"target\", data: { label: \"Target\" }, position: center });\n\n\tfor (let i = 0; i < 8; i++) {\n\t\tconst degrees = i * (360 / 8);\n\t\tconst radians = degrees * (Math.PI / 180);\n\t\tconst x = 250 * Math.cos(radians) + center.x;\n\t\tconst y = 250 * Math.sin(radians) + center.y;\n\n\t\tnodes.push({ id: `${i}`, data: { label: \"Source\" }, position: { x, y } });\n\n\t\tedges.push({\n\t\t\tid: `edge-${i}`,\n\t\t\ttarget: \"target\",\n\t\t\tsource: `${i}`,\n\t\t\ttype: \"floating\",\n\t\t\tmarkerEnd: {\n\t\t\t\ttype: MarkerType.Arrow,\n\t\t\t},\n\t\t});\n\t}\n\n\treturn { nodes, edges };\n}\n"
  },
  {
    "path": "cofounder/dashboard/src/components/flow/helpers/zTouchEdit.js",
    "content": "export default {\n\t'code[class*=\"language-\"]': {\n\t\tcolor: \"white\",\n\t\tfontFamily: \"JetBrains Mono\",\n\t\ttextAlign: \"left\",\n\t\twhiteSpace: \"pre\",\n\t\twordSpacing: \"normal\",\n\t\twordBreak: \"normal\",\n\t\twordWrap: \"normal\",\n\t\tMozTabSize: \"4\",\n\t\tOTabSize: \"4\",\n\t\ttabSize: \"4\",\n\t\tWebkitHyphens: \"none\",\n\t\tMozHyphens: \"none\",\n\t\tmsHyphens: \"none\",\n\t\thyphens: \"none\",\n\t\tlineHeight: \"25px\",\n\t\tfontSize: \"0.8rem\",\n\t\tmargin: \"5px 0\",\n\t},\n\t'pre[class*=\"language-\"]': {\n\t\tcolor: \"white\",\n\t\tfontFamily: \"JetBrains Mono\",\n\t\ttextAlign: \"left\",\n\t\twhiteSpace: \"pre\",\n\t\twordSpacing: \"normal\",\n\t\twordBreak: \"normal\",\n\t\twordWrap: \"normal\",\n\t\tMozTabSize: \"4\",\n\t\tOTabSize: \"4\",\n\t\ttabSize: \"4\",\n\t\tWebkitHyphens: \"none\",\n\t\tMozHyphens: \"none\",\n\t\tmsHyphens: \"none\",\n\t\thyphens: \"none\",\n\t\tlineHeight: \"25px\",\n\t\tfontSize: \"0.85rem\",\n\t\tmargin: \"0.5em 0\",\n\t\tbackground: \"#2a2a2a\",\n\t\tpadding: \"1em\",\n\t\toverflow: \"auto\",\n\t},\n\t'pre[class*=\"language-\"] *': {\n\t\tfontFamily: \"JetBrains Mono\",\n\t},\n\t':not(pre) > code[class*=\"language-\"]': {\n\t\tcolor: \"white\",\n\t\tbackground: \"#0a143c\",\n\t\tpadding: \"0.1em\",\n\t\tborderRadius: \"0.3em\",\n\t\twhiteSpace: \"normal\",\n\t},\n\t'pre[class*=\"language-\"]::-moz-selection': {\n\t\ttextShadow: \"none\",\n\t\tbackground: \"rgba(29, 59, 83, 0.99)\",\n\t},\n\t'pre[class*=\"language-\"] ::-moz-selection': {\n\t\ttextShadow: \"none\",\n\t\tbackground: \"rgba(29, 59, 83, 0.99)\",\n\t},\n\t'code[class*=\"language-\"]::-moz-selection': {\n\t\ttextShadow: \"none\",\n\t\tbackground: \"rgba(29, 59, 83, 0.99)\",\n\t},\n\t'code[class*=\"language-\"] ::-moz-selection': {\n\t\ttextShadow: \"none\",\n\t\tbackground: \"rgba(29, 59, 83, 0.99)\",\n\t},\n\t'pre[class*=\"language-\"]::selection': {\n\t\ttextShadow: \"none\",\n\t\tbackground: \"rgba(29, 59, 83, 0.99)\",\n\t},\n\t'pre[class*=\"language-\"] ::selection': {\n\t\ttextShadow: \"none\",\n\t\tbackground: \"rgba(29, 59, 83, 0.99)\",\n\t},\n\t'code[class*=\"language-\"]::selection': {\n\t\ttextShadow: \"none\",\n\t\tbackground: \"rgba(29, 59, 83, 0.99)\",\n\t},\n\t'code[class*=\"language-\"] ::selection': {\n\t\ttextShadow: \"none\",\n\t\tbackground: \"rgba(29, 59, 83, 0.99)\",\n\t},\n\tcomment: {\n\t\tcolor: \"#6272a4\",\n\t\tfontStyle: \"italic\",\n\t},\n\tprolog: {\n\t\tcolor: \"#6272a4\",\n\t\tfontStyle: \"italic\",\n\t},\n\tcdata: {\n\t\tcolor: \"#6272a4\",\n\t\tfontStyle: \"italic\",\n\t},\n\tpunctuation: {\n\t\tcolor: \"#f8f8f2\",\n\t},\n\t\".namespace\": {\n\t\tcolor: \"#f8f8f2\",\n\t},\n\tdeleted: {\n\t\tcolor: \"#ff5555\",\n\t\tfontStyle: \"italic\",\n\t},\n\tsymbol: {\n\t\tcolor: \"#ff79c6\",\n\t},\n\tproperty: {\n\t\tcolor: \"#ff79c6\",\n\t},\n\ttag: {\n\t\tcolor: \"#ff79c6\",\n\t},\n\toperator: {\n\t\tcolor: \"#ff79c6\",\n\t},\n\tkeyword: {\n\t\tcolor: \"#ff79c6\",\n\t},\n\tboolean: {\n\t\tcolor: \"#bd93f9\",\n\t},\n\tnumber: {\n\t\tcolor: \"#bd93f9\",\n\t},\n\tconstant: {\n\t\tcolor: \"#8be9fd\",\n\t},\n\tfunction: {\n\t\tcolor: \"#8be9fd\",\n\t},\n\tbuiltin: {\n\t\tcolor: \"#8be9fd\",\n\t},\n\tchar: {\n\t\tcolor: \"#8be9fd\",\n\t},\n\tselector: {\n\t\tcolor: \"#ff79c6\",\n\t\tfontStyle: \"italic\",\n\t},\n\tdoctype: {\n\t\tcolor: \"#6272a4\",\n\t\tfontStyle: \"italic\",\n\t},\n\t\"attr-name\": {\n\t\tcolor: \"#50fa7b\",\n\t\tfontStyle: \"italic\",\n\t},\n\tinserted: {\n\t\tcolor: \"#50fa7b\",\n\t\tfontStyle: \"italic\",\n\t},\n\tstring: {\n\t\tcolor: \"#f1fa8c\",\n\t},\n\turl: {\n\t\tcolor: \"#f1fa8c\",\n\t},\n\tentity: {\n\t\tcolor: \"#f1fa8c\",\n\t},\n\t\".language-css .token.string\": {\n\t\tcolor: \"#f1fa8c\",\n\t},\n\t\".style .token.string\": {\n\t\tcolor: \"#f1fa8c\",\n\t},\n\t\"class-name\": {\n\t\tcolor: \"#8be9fd\",\n\t},\n\tatrule: {\n\t\tcolor: \"#50fa7b\",\n\t},\n\t\"attr-value\": {\n\t\tcolor: \"#f1fa8c\",\n\t},\n\tregex: {\n\t\tcolor: \"#ffb86c\",\n\t},\n\timportant: {\n\t\tcolor: \"#ffb86c\",\n\t\tfontWeight: \"bold\",\n\t},\n\tvariable: {\n\t\tcolor: \"#f8f8f2\",\n\t},\n\tbold: {\n\t\tfontWeight: \"bold\",\n\t},\n\titalic: {\n\t\tfontStyle: \"italic\",\n\t},\n};\n"
  },
  {
    "path": "cofounder/dashboard/src/components/flow/keymap.tsx",
    "content": "export default {\n\tmeta: {\n\t\t\"pm.details\": {\n\t\t\ttype: \"pm\",\n\t\t\tname: \"Details\",\n\t\t\tdesc: \"User-submitted Project Details\",\n\t\t},\n\n\t\t\"pm.prd\": { type: \"pm\", name: \"PRD\", desc: \"Product Requirements Document\" },\n\t\t\"pm.frd\": { type: \"pm\", name: \"FRD\", desc: \"Features Requirements Document\" },\n\t\t\"pm.drd\": { type: \"pm\", name: \"DRD\", desc: \"Database Requirements Document\" },\n\t\t\"pm.brd\": { type: \"pm\", name: \"BRD\", desc: \"Backend Requirements Document\" },\n\t\t\"pm.uxsmd\": { type: \"pm\", name: \"UXSMD\", desc: \"UX Sitemap Document\" },\n\t\t\"pm.uxdmd\": { type: \"pm\", name: \"UXDMD\", desc: \"UX Datamap Document\" },\n\n\t\t\"db.schemas\": {\n\t\t\ttype: \"db\",\n\t\t\tname: \"DB/schemas\",\n\t\t\tdesc: \"Database Tables Schemas\",\n\t\t},\n\t\t\"db.postgres\": {\n\t\t\ttype: \"db\",\n\t\t\tname: \"DB/postgres\",\n\t\t\tdesc: \"Database Postgresql Commands\",\n\t\t},\n\n\t\t\"backend.specifications.openapi\": {\n\t\t\ttype: \"backend\",\n\t\t\tname: \"backend/define:openapi\",\n\t\t\tdesc: \"Backend Definition : openAPI\",\n\t\t},\n\t\t\"backend.specifications.asyncapi\": {\n\t\t\ttype: \"backend\",\n\t\t\tname: \"backend/define:asyncapi\",\n\t\t\tdesc: \"Backend Definition : asyncAPI\",\n\t\t},\n\n\t\t\"backend.server.main\": {\n\t\t\ttype: \"backend\",\n\t\t\tname: \"backend/server:main\",\n\t\t\tdesc: \"Backend Server : Main\",\n\t\t},\n\n\t\t\"uxsitemap.structure\": {\n\t\t\ttype: \"ux\",\n\t\t\tname: \"ux/sitemap:structure\",\n\t\t\tdesc: \"UX Sitemap\",\n\t\t},\n\t\t\"uxdatamap.structure\": {\n\t\t\ttype: \"ux\",\n\t\t\tname: \"ux/datamap:structure\",\n\t\t\tdesc: \"UX Datamap Structure\",\n\t\t},\n\t\t\"uxdatamap.views\": {\n\t\t\ttype: \"ux\",\n\t\t\tname: \"ux/datamap:views\",\n\t\t\tdesc: \"UX Datamap Views\",\n\t\t},\n\n\t\t\"webapp.react.root\": {\n\t\t\ttype: \"webapp-structure\",\n\t\t\tname: \"webapp/react:root\",\n\t\t\tdesc: \"Webapp App Root Component\",\n\t\t},\n\t\t\"webapp.react.store\": {\n\t\t\ttype: \"webapp-structure\",\n\t\t\tname: \"webapp/react:store\",\n\t\t\tdesc: \"Webapp Data Store\",\n\t\t},\n\t\t\"webapp.react.views\": {\n\t\t\ttype: \"webapp-view\",\n\t\t\tname: \"webapp/react:views\",\n\t\t\tdesc: \"Webapp View\",\n\t\t},\n\t\t\"settings.config.package\": {\n\t\t\ttype: \"ux\",\n\t\t\tname: \"settings/config:package\",\n\t\t\tdesc: \"Dependencies & .env for package.json\",\n\t\t},\n\t\t\"settings.preferences.versions\": {\n\t\t\ttype: \"ux\",\n\t\t\tname: \"settings/preferences:versions\",\n\t\t\tdesc: \"Components versions preferences\",\n\t\t},\n\t},\n\ttypes: {\n\t\t\"pm.details\": \"yaml\", // is kinda ignored , hardcoded fix in \"@/components/flow/nodes/cofounder-node\"\n\t\tpm: \"markdown\",\n\t\tdb: \"yaml\",\n\t\tbackend: \"complex\",\n\t\tuxsitemap: \"yaml\",\n\t\tuxdatamap: \"yaml\",\n\t\t\"webapp-structure\": \"complex\",\n\t\t\"webapp-view\": \"complex\",\n\t\tsettings: \"yaml\",\n\t},\n};\n"
  },
  {
    "path": "cofounder/dashboard/src/components/flow/nodes/cofounder-iframe.css",
    "content": ".react-flow__node-cofounder_iframe {\n\tbackground: #000000;\n\tborder: 1px solid #555;\n\tborder-radius: 5px;\n\ttext-align: left;\n}\n"
  },
  {
    "path": "cofounder/dashboard/src/components/flow/nodes/cofounder-iframe.tsx",
    "content": ""
  },
  {
    "path": "cofounder/dashboard/src/components/flow/nodes/cofounder-node.css",
    "content": ".react-flow__node-cofounder_node {\n\tbackground: #000000;\n\tborder: 1px solid #555;\n\tborder-radius: 5px;\n\ttext-align: left;\n}\n\n.markdown {\n\tcolor: #ffffff; /* Text color for dark mode */\n\tfont-size: 0.975rem; /* 50% of typical size */\n\tline-height: 1.3; /* Adjusted spacing between lines */\n\tpadding: 0.3rem; /* Reduced padding around the markdown container */\n\tborder-bottom: 1px solid #555; /* Separator border for sections */\n\tmargin-bottom: 1rem; /* Space below the markdown container */\n\t-webkit-font-smoothing: antialiased;\n}\n.markdown h1 {\n\tfont-size: 1.5rem; /* 50% of typical h1 size */\n\tmargin: 0.3rem 0; /* Reduced margin above and below */\n\tborder-bottom: 1px solid #444; /* Separator border below h1 */\n\tpadding-bottom: 0.2rem; /* Padding below h1 */\n}\n\n.markdown h2 {\n\tfont-size: 1.25rem; /* 50% of typical h2 size */\n\tmargin: 0.3rem 0; /* Reduced margin above and below */\n\tborder-bottom: 1px solid #444; /* Separator border below h2 */\n\tpadding-bottom: 0.2rem; /* Padding below h2 */\n}\n\n.markdown h3 {\n\tfont-size: 1rem; /* 50% of typical h3 size */\n\tmargin: 0.2rem 0; /* Reduced margin above and below */\n\tborder-bottom: 1px solid #444; /* Separator border below h3 */\n\tpadding-bottom: 0.2rem; /* Padding below h3 */\n}\n\n.markdown p {\n\tmargin: 0.3rem 0; /* Reduced margin above and below paragraphs */\n\tline-height: 1.75;\n\t/* Added line spacing for better readability */\n}\n\n.markdown ul,\n.markdown ol {\n\tmargin: 0.3rem 0; /* Reduced margin above and below lists */\n\tpadding-left: 1.2rem; /* Slightly reduced indentation for lists */\n}\n\n.markdown li {\n\tmargin: 0.1rem 0; /* Reduced margin above and below list items */\n\tborder-bottom: 1px solid #222;\n}\n\n.markdown blockquote {\n\tborder-left: 2px solid #555; /* Border for blockquotes */\n\tpadding-left: 0.5rem; /* Padding for blockquote text */\n\tcolor: #cccccc; /* Lighter text color for blockquotes */\n\tmargin: 0.3rem 0; /* Reduced margin above and below blockquotes */\n\tborder-bottom: 1px solid #222;\n}\n\n.markdown code {\n\tbackground-color: #222; /* Background for inline code */\n\tcolor: #f8f8f2; /* Text color for inline code */\n\tpadding: 0.2rem 0.4rem; /* Padding for inline code */\n\tmargin: 0.1rem; /* Little margin for inline code */\n\tborder-radius: 3px; /* Rounded corners for inline code */\n}\n\n.markdown pre {\n\tbackground-color: #111; /* Background for code blocks */\n\tcolor: #f8f8f2; /* Text color for code blocks */\n\tpadding: 0.4rem; /* Reduced padding for code blocks */\n\tborder-radius: 5px; /* Rounded corners for code blocks */\n\toverflow: auto; /* Allow scrolling for long code blocks */\n\tmargin: 0.3rem 0; /* Reduced margin above and below code blocks */\n}\n"
  },
  {
    "path": "cofounder/dashboard/src/components/flow/nodes/cofounder-node.tsx",
    "content": "import React, { memo, useState, useEffect, useRef } from \"react\";\nimport { Handle, Position } from \"@xyflow/react\";\nimport { useDispatch, useSelector } from \"react-redux\";\nimport yaml from \"yaml\";\nimport colormap from \"colormap\";\n\nimport Markdown from \"react-markdown\";\nimport remarkGfm from \"remark-gfm\";\n\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n\tDialogClose,\n} from \"@/components/ui/dialog\";\nimport { Input } from \"@/components/ui/input\";\nimport { Label } from \"@/components/ui/label\";\n\nimport { PrismLight as SyntaxHighlighter } from \"react-syntax-highlighter\";\nimport yaml_syntax from \"react-syntax-highlighter/dist/esm/languages/prism/yaml\";\nimport js_syntax from \"react-syntax-highlighter/dist/esm/languages/prism/javascript\";\nimport sql_syntax from \"react-syntax-highlighter/dist/esm/languages/prism/sql\";\nimport typescript_syntax from \"react-syntax-highlighter/dist/esm/languages/prism/typescript\";\n\nimport {\n\tdracula,\n\tduotoneDark,\n\tvscDarkPlus,\n\tzTouch,\n} from \"react-syntax-highlighter/dist/esm/styles/prism\";\n\nimport zTouchEdit from \"@/components/flow/helpers/zTouchEdit.js\";\n\nexport default memo(({ data, isConnectable }) => {\n\tconst color_map = {\n\t\tpm: \"#FFA500\",\n\t\tdb: \"#000080\",\n\t\tbackend: \"#FF10F0\",\n\t\tux: \"#A020F0\",\n\t\t\"webapp-structure\": \"#39FF14\",\n\t\t\"webapp-view\": \"#05D9FF\",\n\t};\n\tSyntaxHighlighter.registerLanguage(\"yaml\", yaml_syntax);\n\tSyntaxHighlighter.registerLanguage(\"js\", js_syntax);\n\tSyntaxHighlighter.registerLanguage(\"sql\", sql_syntax);\n\tSyntaxHighlighter.registerLanguage(\"typescript\", typescript_syntax);\n\n\tconst dispatch = useDispatch();\n\tconst node_stream = !data.key.includes(\"webapp.react.views\")\n\t\t? useSelector((state: any) => state.project.streamEvents[data.key])\n\t\t: useSelector(\n\t\t\t\t(state: any) =>\n\t\t\t\t\tstate.project.streamEvents[`${data.key.split(\".\").slice(0, 4).join(\".\")}`],\n\t\t\t);\n\n\tconst node_data = useSelector(\n\t\t(state: any) => state.project.projectData[data.key],\n\t);\n\tlet node_extra;\n\tif (data.key.includes(\"webapp.react.views\")) {\n\t\tnode_extra = useSelector(\n\t\t\t(state: any) =>\n\t\t\t\tstate.project.projectData[data.key.replace(\".react.\", \".layout.\")],\n\t\t);\n\t}\n\n\tconst streamContainerRef = useRef<HTMLDivElement>(null);\n\tconst [metaHeaderClass, setMetaHeaderClass] = useState(\"\");\n\tconst [refresh, setRefresh] = useState(Date.now());\n\n\tfunction getColor() {\n\t\treturn data?.meta?.type && color_map[data.meta.type]\n\t\t\t? `[${color_map[data.meta.type]}]`\n\t\t\t: \"none\";\n\t}\n\tfunction getLanguage() {\n\t\tif (data.key === \"db.postgres\") return \"sql\";\n\t\treturn \"yaml\";\n\t}\n\tfunction getContent() {\n\t\tif (!node_data) return \"\";\n\t\tif (data.key === \"db.postgres\") return node_data;\n\t\treturn yaml.stringify(node_data);\n\t}\n\n\tconst [selectedVersion, setSelectedVersion] = useState<string | boolean>(\n\t\tfalse,\n\t);\n\tuseEffect(() => {\n\t\tif (data.key.includes(\"webapp.\")) {\n\t\t\tif (node_data && Object.keys(node_data).length) {\n\t\t\t\tsetSelectedVersion(Object.keys(node_data).reverse()[0]);\n\t\t\t}\n\t\t}\n\t}, [node_data]);\n\n\t/*\n\tuseEffect(() => {\n\t\tsetRefresh(Date.now())\n\t}, [node_data , node_stream , node_extra]);\n\t*/\n\n\tfunction getMinifiedContent() {\n\t\t// webapp component with versionning case\n\t\tif (\n\t\t\tdata.key.includes(\"webapp.react.root\") ||\n\t\t\tdata.key.includes(\"webapp.react.store\")\n\t\t) {\n\t\t\treturn (\n\t\t\t\t<div className={`grid grid-cols-12`}>\n\t\t\t\t\t<div className=\"col-span-9 grid grid-cols-2\">\n\t\t\t\t\t\t{(node_stream?.is_running && node_stream?.data && (\n\t\t\t\t\t\t\t<pre\n\t\t\t\t\t\t\t\tclassName=\"p-2 m-2 max-h-[40vh] overflow-auto whitespace-pre-wrap break-words\"\n\t\t\t\t\t\t\t\tstyle={{ fontFamily: \"JetBrains Mono\", fontWeight: 400 }}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<div className={`mx-2`}>\n\t\t\t\t\t\t\t\t\t<div className=\"flex justify-center items-center p-4 m-4\">\n\t\t\t\t\t\t\t\t\t\t<div className=\"animate-spin rounded-full h-5 w-5 border-r border-[#aaa]\"></div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</pre>\n\t\t\t\t\t\t)) || <></>}\n\n\t\t\t\t\t\t<pre\n\t\t\t\t\t\t\tref={streamContainerRef}\n\t\t\t\t\t\t\tclassName={`p-2 m-2 max-h-[40vh] overflow-auto whitespace-pre-wrap break-words duration-200\n\t\t\t\t\t\t\t\t\t\t\t\t\t${node_stream?.is_running && node_stream?.data ? \"\" : \"col-span-2\"}`}\n\t\t\t\t\t\t\tstyle={{ fontFamily: \"JetBrains Mono\", fontWeight: 400 }}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{(node_stream?.is_running && node_stream?.data && (\n\t\t\t\t\t\t\t\t<>{node_stream.data.data}</>\n\t\t\t\t\t\t\t)) || (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t{selectedVersion && node_data\n\t\t\t\t\t\t\t\t\t\t? node_data[selectedVersion].tsx.slice(0, 300) + \" ...\"\n\t\t\t\t\t\t\t\t\t\t: \"\"}\n\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</pre>\n\t\t\t\t\t</div>\n\t\t\t\t\t{(node_stream?.is_running && node_stream?.data && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<div className=\"col-span-3 text-sm p-2 m-2\">\n\t\t\t\t\t\t\t\t<h3 className=\"py-2 mb-2 opacity-50\">processing</h3>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</>\n\t\t\t\t\t)) || (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t{(node_data && (\n\t\t\t\t\t\t\t\t<div className=\"col-span-3 text-sm p-2 m-2\">\n\t\t\t\t\t\t\t\t\t<h3 className=\"border-b py-2 mb-2 border-[#333]\">versions</h3>\n\t\t\t\t\t\t\t\t\t<div className=\"grid\">\n\t\t\t\t\t\t\t\t\t\t{Object.entries(node_data)\n\t\t\t\t\t\t\t\t\t\t\t.reverse()\n\t\t\t\t\t\t\t\t\t\t\t.map(([version, item], index) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\t\t\t\t\t\tkey={index}\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={`rounded cursor-pointer p-2 mb-1 hover:bg-[#222] duration-200 ${\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tselectedVersion === version ? \"bg-[#333]\" : \"\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t} `}\n\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetSelectedVersion(version);\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{version}\n\t\t\t\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t)) ||\n\t\t\t\t\t\t\t\t\"\"}\n\t\t\t\t\t\t</>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t);\n\t\t}\n\n\t\t// webapp view with layout and versionning case\n\t\tif (data.key.includes(\"webapp.react.views\")) {\n\t\t\treturn (\n\t\t\t\t<div className={`grid grid-cols-12`}>\n\t\t\t\t\t<div className={`col-span-9 grid grid-cols-2`}>\n\t\t\t\t\t\t{(node_stream?.is_running && node_stream?.data && (\n\t\t\t\t\t\t\t<pre\n\t\t\t\t\t\t\t\tclassName=\"p-2 m-2 max-h-[40vh] overflow-auto whitespace-pre-wrap break-words\"\n\t\t\t\t\t\t\t\tstyle={{ fontFamily: \"JetBrains Mono\", fontWeight: 400 }}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<div className={`mx-2`}>\n\t\t\t\t\t\t\t\t\t<div className=\"flex justify-center items-center p-4 m-4\">\n\t\t\t\t\t\t\t\t\t\t<div className=\"animate-spin rounded-full h-5 w-5 border-r border-[#aaa]\"></div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</pre>\n\t\t\t\t\t\t)) || <></>}\n\n\t\t\t\t\t\t<pre\n\t\t\t\t\t\t\tref={streamContainerRef}\n\t\t\t\t\t\t\tclassName={`p-2 m-2 max-h-[40vh] overflow-auto whitespace-pre-wrap break-words duration-200\n\t\t\t\t\t\t\t\t\t\t\t\t\t${node_stream?.is_running && node_stream?.data ? \"\" : \"col-span-2\"}\n\t\t\t\t\t\t\t\t\t\t\t\t\ttext-xs\n\t\t\t\t\t\t\t\t\t\t\t\t`}\n\t\t\t\t\t\t\tstyle={{ fontFamily: \"JetBrains Mono\", fontWeight: 400 }}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{(node_stream?.is_running && node_stream?.data && (\n\t\t\t\t\t\t\t\t<>{node_stream.data.data}</>\n\t\t\t\t\t\t\t)) || (\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t{selectedVersion && node_data\n\t\t\t\t\t\t\t\t\t\t? node_data[selectedVersion].tsx.slice(0, 300) + \" ...\"\n\t\t\t\t\t\t\t\t\t\t: \"\"}\n\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</pre>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t{(node_stream?.is_running && node_stream?.data && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<div className=\"col-span-3 text-sm p-2 m-2\">\n\t\t\t\t\t\t\t\t<h3 className=\"py-2 mb-2 opacity-50\">processing</h3>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</>\n\t\t\t\t\t)) || (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<div className=\"col-span-3 text-sm p-2 m-2 max-h-[40vh] overflow-auto\">\n\t\t\t\t\t\t\t\t<h3 className=\"border-b py-2 mb-2 border-[#333]\">versions</h3>\n\t\t\t\t\t\t\t\t<div className=\"grid\">\n\t\t\t\t\t\t\t\t\t{(node_data &&\n\t\t\t\t\t\t\t\t\t\tObject.entries(node_data)\n\t\t\t\t\t\t\t\t\t\t\t.reverse()\n\t\t\t\t\t\t\t\t\t\t\t.map(([version, item], index) => (\n\t\t\t\t\t\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\t\t\t\t\t\tkey={index}\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={`rounded cursor-pointer p-2 mb-1 hover:bg-[#222] duration-200 ${\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tselectedVersion === version ? \"bg-[#333]\" : \"\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t} `}\n\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetSelectedVersion(version);\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{version}\n\t\t\t\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t\t\t\t))) || <></>}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</>\n\t\t\t\t\t)}\n\n\t\t\t\t\t{(node_extra &&\n\t\t\t\t\t\tselectedVersion &&\n\t\t\t\t\t\tnode_extra[selectedVersion] &&\n\t\t\t\t\t\t(node_extra[selectedVersion]?.render?.image?.url?.length ||\n\t\t\t\t\t\t\tnode_extra[selectedVersion]?.render?.image?.local?.length) && (\n\t\t\t\t\t\t\t<div className=\"col-span-12 p-2 m-2 text-xs\">\n\t\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\t\ttitle={`Design mockup reference generated for ${data.key}, version : ${selectedVersion}`}\n\t\t\t\t\t\t\t\t\talt={`Design mockup reference generated for ${data.key}, version : ${selectedVersion}`}\n\t\t\t\t\t\t\t\t\tsrc={\n\t\t\t\t\t\t\t\t\t\tnode_extra[selectedVersion]?.render?.image?.url?.length\n\t\t\t\t\t\t\t\t\t\t\t? node_extra[selectedVersion]?.render?.image?.url\n\t\t\t\t\t\t\t\t\t\t\t: `http://localhost:4200/storage/${node_extra[selectedVersion]?.render?.image?.local.split(\"/storage/\")[1]}`\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t></img>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)) || <></>}\n\t\t\t\t</div>\n\t\t\t);\n\t\t}\n\n\t\t// default case\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclassName={`grid ${node_stream?.is_running && node_stream?.data ? \"grid-cols-2\" : \"\"}`}\n\t\t\t>\n\t\t\t\t<div>\n\t\t\t\t\t<pre\n\t\t\t\t\t\tclassName=\"p-2 m-2 max-h-[25vh] overflow-auto whitespace-pre-wrap break-words\"\n\t\t\t\t\t\tstyle={{ fontFamily: \"JetBrains Mono\", fontWeight: 400 }}\n\t\t\t\t\t>\n\t\t\t\t\t\t{(node_stream?.is_running && node_stream?.data && (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<div className=\"flex justify-center items-center p-4 m-4\">\n\t\t\t\t\t\t\t\t\t<div className=\"animate-spin rounded-full h-5 w-5 border-r border-[#aaa]\"></div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t)) || <></>}\n\t\t\t\t\t\t{(node_data && (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t{typeof node_data === \"string\"\n\t\t\t\t\t\t\t\t\t? node_data.slice(0, 100) + \" ...\"\n\t\t\t\t\t\t\t\t\t: yaml.stringify(node_data).slice(0, 100) + \" ...\"}\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t)) || <></>}\n\t\t\t\t\t</pre>\n\t\t\t\t</div>\n\t\t\t\t{(node_stream?.is_running && node_stream?.data && (\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<pre\n\t\t\t\t\t\t\tref={streamContainerRef}\n\t\t\t\t\t\t\tclassName=\"p-2 m-2 max-h-[25vh] overflow-auto whitespace-pre-wrap break-words font-light\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{node_stream.data.data}\n\t\t\t\t\t\t</pre>\n\t\t\t\t\t</div>\n\t\t\t\t)) || <></>}\n\t\t\t</div>\n\t\t);\n\t}\n\n\tfunction getExpandedContent() {\n\t\t// webapp root/store case\n\t\tif (\n\t\t\tdata.key.includes(\"webapp.react.root\") ||\n\t\t\tdata.key.includes(\"webapp.react.store\")\n\t\t) {\n\t\t\tif (!selectedVersion) return <></>;\n\t\t\treturn (\n\t\t\t\t<>\n\t\t\t\t\t{(selectedVersion && node_data && (\n\t\t\t\t\t\t<pre className=\"rounded grid grid-cols-6 gap-2 rounded-lg p-2 text-white text-xs overflow-auto whitespace-pre-wrap break-words\">\n\t\t\t\t\t\t\t<SyntaxHighlighter\n\t\t\t\t\t\t\t\tclassName=\"col-span-4 rounded bg-black text-xs\"\n\t\t\t\t\t\t\t\tlanguage={\"typescript\"}\n\t\t\t\t\t\t\t\tstyle={zTouchEdit}\n\t\t\t\t\t\t\t\twrapLines={true}\n\t\t\t\t\t\t\t\twrapLongLines={true}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{node_data[selectedVersion].tsx}\n\t\t\t\t\t\t\t</SyntaxHighlighter>\n\t\t\t\t\t\t\t<SyntaxHighlighter\n\t\t\t\t\t\t\t\tclassName=\"col-span-2 rounded bg-black text-xs\"\n\t\t\t\t\t\t\t\tlanguage={getLanguage()}\n\t\t\t\t\t\t\t\tstyle={zTouchEdit}\n\t\t\t\t\t\t\t\twrapLines={true}\n\t\t\t\t\t\t\t\twrapLongLines={true}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{yaml.stringify({\n\t\t\t\t\t\t\t\t\t...(node_data[selectedVersion]?.dependencies\n\t\t\t\t\t\t\t\t\t\t? { dependencies: node_data[selectedVersion].dependencies }\n\t\t\t\t\t\t\t\t\t\t: {}),\n\t\t\t\t\t\t\t\t\t...(node_data[selectedVersion]?.analysis\n\t\t\t\t\t\t\t\t\t\t? { analysis: node_data[selectedVersion].analysis }\n\t\t\t\t\t\t\t\t\t\t: {}),\n\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t</SyntaxHighlighter>\n\t\t\t\t\t\t</pre>\n\t\t\t\t\t)) ||\n\t\t\t\t\t\t\"\"}\n\t\t\t\t</>\n\t\t\t);\n\t\t}\n\t\t// webapp view case\n\t\tif (data.key.includes(\"webapp.react.views\")) {\n\t\t\tif (!selectedVersion) return <></>;\n\t\t\treturn (\n\t\t\t\t<>\n\t\t\t\t\t{(selectedVersion && node_data && (\n\t\t\t\t\t\t<pre className=\"rounded grid grid-cols-6 gap-2 rounded-lg p-2 text-white text-xs overflow-auto whitespace-pre-wrap break-words\">\n\t\t\t\t\t\t\t<SyntaxHighlighter\n\t\t\t\t\t\t\t\tclassName=\"col-span-4 rounded bg-black text-xs\"\n\t\t\t\t\t\t\t\tlanguage={\"typescript\"}\n\t\t\t\t\t\t\t\tstyle={zTouchEdit}\n\t\t\t\t\t\t\t\twrapLines={true}\n\t\t\t\t\t\t\t\twrapLongLines={true}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{node_data[selectedVersion].tsx}\n\t\t\t\t\t\t\t</SyntaxHighlighter>\n\t\t\t\t\t\t\t<SyntaxHighlighter\n\t\t\t\t\t\t\t\tclassName=\"col-span-2 rounded bg-black text-xs\"\n\t\t\t\t\t\t\t\tlanguage={getLanguage()}\n\t\t\t\t\t\t\t\tstyle={zTouchEdit}\n\t\t\t\t\t\t\t\twrapLines={true}\n\t\t\t\t\t\t\t\twrapLongLines={true}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{yaml.stringify({\n\t\t\t\t\t\t\t\t\t...(node_data[selectedVersion]?.dependencies\n\t\t\t\t\t\t\t\t\t\t? { dependencies: node_data[selectedVersion].dependencies }\n\t\t\t\t\t\t\t\t\t\t: {}),\n\t\t\t\t\t\t\t\t\t...(node_data[selectedVersion]?.analysis\n\t\t\t\t\t\t\t\t\t\t? { analysis: node_data[selectedVersion].analysis }\n\t\t\t\t\t\t\t\t\t\t: {}),\n\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t</SyntaxHighlighter>\n\t\t\t\t\t\t</pre>\n\t\t\t\t\t)) ||\n\t\t\t\t\t\t\"\"}\n\t\t\t\t</>\n\t\t\t);\n\t\t}\n\n\t\t// server case\n\t\tif (data.key === \"backend.server.main\") {\n\t\t\treturn (\n\t\t\t\t<>\n\t\t\t\t\t{(node_data && (\n\t\t\t\t\t\t<pre className=\"rounded grid grid-cols-6 gap-2 rounded-lg p-2 text-white text-xs overflow-auto whitespace-pre-wrap break-words\">\n\t\t\t\t\t\t\t<SyntaxHighlighter\n\t\t\t\t\t\t\t\tclassName=\"col-span-4 rounded bg-black text-xs\"\n\t\t\t\t\t\t\t\tlanguage={\"javascript\"}\n\t\t\t\t\t\t\t\tstyle={zTouchEdit}\n\t\t\t\t\t\t\t\twrapLines={true}\n\t\t\t\t\t\t\t\twrapLongLines={true}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{node_data.mjs}\n\t\t\t\t\t\t\t</SyntaxHighlighter>\n\t\t\t\t\t\t\t<SyntaxHighlighter\n\t\t\t\t\t\t\t\tclassName=\"col-span-2 rounded bg-black text-xs\"\n\t\t\t\t\t\t\t\tlanguage={getLanguage()}\n\t\t\t\t\t\t\t\tstyle={zTouchEdit}\n\t\t\t\t\t\t\t\twrapLines={true}\n\t\t\t\t\t\t\t\twrapLongLines={true}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{yaml.stringify({\n\t\t\t\t\t\t\t\t\tenv: node_data.env,\n\t\t\t\t\t\t\t\t\tdependencies: node_data.dependencies,\n\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t</SyntaxHighlighter>\n\t\t\t\t\t\t</pre>\n\t\t\t\t\t)) ||\n\t\t\t\t\t\t\"\"}\n\t\t\t\t</>\n\t\t\t);\n\t\t}\n\t\t// default\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<pre className=\"rounded rounded-lg p-2 text-white text-xs overflow-auto whitespace-pre-wrap break-words\">\n\t\t\t\t\t<SyntaxHighlighter\n\t\t\t\t\t\tclassName=\"rounded bg-black text-xs\"\n\t\t\t\t\t\tlanguage={getLanguage()}\n\t\t\t\t\t\tstyle={zTouchEdit}\n\t\t\t\t\t\twrapLines={true}\n\t\t\t\t\t\twrapLongLines={true}\n\t\t\t\t\t>\n\t\t\t\t\t\t{getContent()}\n\t\t\t\t\t</SyntaxHighlighter>\n\t\t\t\t</pre>\n\t\t\t</>\n\t\t);\n\t}\n\n\tuseEffect(() => {\n\t\tif (streamContainerRef.current) {\n\t\t\tstreamContainerRef.current.scrollTop =\n\t\t\t\tstreamContainerRef.current.scrollHeight;\n\t\t}\n\t}, [node_stream]);\n\n\treturn (\n\t\t<>\n\t\t\t<div className=\"hidden bg-[#FFA500] bg-[#000080] bg-[#FF10F0] bg-[#A020F0] bg-[#05D9FF] bg-[#39FF14]\">\n\t\t\t\t_tw_manual_debugging_ _preload_all_colors_variations_so_it_builds_them\n\t\t\t</div>\n\t\t\t<div\n\t\t\t\tclassName={`dark bg-[#0a0a0a] font-light ${node_stream?.is_running && node_stream?.data ? \"max-w-[60vw] xl:max-w-[50vw]\" : \"max-w-[60vw] xl:max-w-[40vw]\"} overflow-auto text-xs`}\n\t\t\t\tkey={refresh}\n\t\t\t>\n\t\t\t\t<div className=\"opacity-0\">\n\t\t\t\t\t<Handle\n\t\t\t\t\t\ttype=\"target\"\n\t\t\t\t\t\tid=\"top\"\n\t\t\t\t\t\tposition={Position.Top}\n\t\t\t\t\t\tstyle={{ background: \"#555\" }}\n\t\t\t\t\t\tonConnect={(params) => console.log(\"handle onConnect\", params)}\n\t\t\t\t\t\tisConnectable={isConnectable}\n\t\t\t\t\t/>\n\t\t\t\t\t<Handle\n\t\t\t\t\t\ttype=\"target\"\n\t\t\t\t\t\tid=\"botom\"\n\t\t\t\t\t\tposition={Position.Bottom}\n\t\t\t\t\t\tstyle={{ background: \"#555\" }}\n\t\t\t\t\t\tonConnect={(params) => console.log(\"handle onConnect\", params)}\n\t\t\t\t\t\tisConnectable={isConnectable}\n\t\t\t\t\t/>\n\t\t\t\t\t<Handle\n\t\t\t\t\t\ttype=\"target\"\n\t\t\t\t\t\tid=\"left\"\n\t\t\t\t\t\tposition={Position.Left}\n\t\t\t\t\t\tstyle={{ background: \"#555\" }}\n\t\t\t\t\t\tonConnect={(params) => console.log(\"handle onConnect\", params)}\n\t\t\t\t\t\tisConnectable={isConnectable}\n\t\t\t\t\t/>\n\t\t\t\t\t<Handle\n\t\t\t\t\t\ttype=\"target\"\n\t\t\t\t\t\tid=\"right\"\n\t\t\t\t\t\tposition={Position.Right}\n\t\t\t\t\t\tstyle={{ background: \"#555\" }}\n\t\t\t\t\t\tonConnect={(params) => console.log(\"handle onConnect\", params)}\n\t\t\t\t\t\tisConnectable={isConnectable}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\n\t\t\t\t<div className=\"text-white rounded rounded-xl p-2 font-light\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tkey={refresh}\n\t\t\t\t\t\tclassName=\"text-base p-2 m-2 duration-200 rounded flex gap-2 items-start\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<div className={`h-8 w-8 m-2 rounded bg-${getColor()}`}></div>\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t<strong>{data.meta.name}</strong>\n\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t<span className=\"opacity-80\">\n\t\t\t\t\t\t\t\t{data.meta.desc}{\" \"}\n\t\t\t\t\t\t\t\t{!data.key.includes(\"webapp.react.views\")\n\t\t\t\t\t\t\t\t\t? \"\"\n\t\t\t\t\t\t\t\t\t: ` : ${data.key.split(\".\")[3]}`}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t{getMinifiedContent()}\n\n\t\t\t\t\t{(node_data && (\n\t\t\t\t\t\t<Dialog>\n\t\t\t\t\t\t\t<div className=\"flex justify-end border-t pt-2 my-2 border-[#222]\">\n\t\t\t\t\t\t\t\t<DialogTrigger asChild>\n\t\t\t\t\t\t\t\t\t<Button variant=\"outline\">View</Button>\n\t\t\t\t\t\t\t\t</DialogTrigger>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<DialogContent className=\"font-light bg-white/10 backdrop-blur-md border-[#222] max-w-[90vw] h-[90vh] max-h-[90vh] overflow-auto p-8\">\n\t\t\t\t\t\t\t\t<DialogHeader className=\"text-[#aaa]\">\n\t\t\t\t\t\t\t\t\t<DialogTitle>Detailed View</DialogTitle>\n\t\t\t\t\t\t\t\t\t<DialogDescription className=\"text-white text-lg whitespace-pre-wrap break-words font-light\">\n\t\t\t\t\t\t\t\t\t\t{data.key}{\" \"}\n\t\t\t\t\t\t\t\t\t\t<strong className=\"text-base\">\n\t\t\t\t\t\t\t\t\t\t\t{selectedVersion ? `{ ${selectedVersion} }` : \"\"}\n\t\t\t\t\t\t\t\t\t\t</strong>\n\t\t\t\t\t\t\t\t\t</DialogDescription>\n\t\t\t\t\t\t\t\t</DialogHeader>\n\n\t\t\t\t\t\t\t\t{(data.meta.content_type === \"markdown\" && data.key != \"pm.details\" && (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t<div className=\"rounded rounded-lg p-12 m-2 bg-[#2a2a2a] text-white text-sm overflow-auto whitespace-pre-wrap break-words\">\n\t\t\t\t\t\t\t\t\t\t\t<Markdown className=\"markdown\" remarkPlugins={[remarkGfm]}>\n\t\t\t\t\t\t\t\t\t\t\t\t{node_data}\n\t\t\t\t\t\t\t\t\t\t\t</Markdown>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t)) ||\n\t\t\t\t\t\t\t\t\tgetExpandedContent()}\n\n\t\t\t\t\t\t\t\t<pre\n\t\t\t\t\t\t\t\t\tclassName=\"\"\n\t\t\t\t\t\t\t\t\tstyle={{ fontFamily: \"JetBrains Mono\", fontWeight: 400 }}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{/*<SyntaxHighlighter language=\"yaml\" style={vscDarkPlus} wrapLines={true} wrapLongLines={true} >\n                  {yaml.stringify(node_data)}\n                </SyntaxHighlighter>\n                */}\n\t\t\t\t\t\t\t\t</pre>\n\n\t\t\t\t\t\t\t\t<DialogFooter>\n\t\t\t\t\t\t\t\t\t<DialogClose asChild>\n\t\t\t\t\t\t\t\t\t\t<Button variant=\"\">Back</Button>\n\t\t\t\t\t\t\t\t\t</DialogClose>\n\t\t\t\t\t\t\t\t</DialogFooter>\n\t\t\t\t\t\t\t</DialogContent>\n\t\t\t\t\t\t</Dialog>\n\t\t\t\t\t)) || <></>}\n\n\t\t\t\t\t{/*\n          <input\n            className=\"nodrag rounded-lg p-1\" style={{backgroundColor:bgColor}}\n            type=\"color\"\n            onChange={(event) => {\n              const newColor = event.target.value;\n              setBgColor(newColor);\n              data.onChange(event);\n            }}\n            defaultValue={data.color}\n            style={{ cursor: 'pointer', width: '50px', height: '50px' }}\n          />\n          */}\n\t\t\t\t</div>\n\t\t\t\t<div className=\"opacity-0\">\n\t\t\t\t\t<Handle\n\t\t\t\t\t\ttype=\"source\"\n\t\t\t\t\t\tposition={Position.Top}\n\t\t\t\t\t\tid=\"top\"\n\t\t\t\t\t\tstyle={{ left: 10, background: \"#555\" }}\n\t\t\t\t\t\tisConnectable={isConnectable}\n\t\t\t\t\t/>\n\t\t\t\t\t<Handle\n\t\t\t\t\t\ttype=\"source\"\n\t\t\t\t\t\tposition={Position.Right}\n\t\t\t\t\t\tid=\"right\"\n\t\t\t\t\t\tstyle={{ top: 10, background: \"#555\" }}\n\t\t\t\t\t\tisConnectable={isConnectable}\n\t\t\t\t\t/>\n\t\t\t\t\t<Handle\n\t\t\t\t\t\ttype=\"source\"\n\t\t\t\t\t\tposition={Position.Bottom}\n\t\t\t\t\t\tid=\"bottom\"\n\t\t\t\t\t\tstyle={{ left: 10, background: \"#555\" }}\n\t\t\t\t\t\tisConnectable={isConnectable}\n\t\t\t\t\t/>\n\t\t\t\t\t<Handle\n\t\t\t\t\t\ttype=\"source\"\n\t\t\t\t\t\tposition={Position.Left}\n\t\t\t\t\t\tid=\"left\"\n\t\t\t\t\t\tstyle={{ top: 10, background: \"#555\" }}\n\t\t\t\t\t\tisConnectable={isConnectable}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</>\n\t);\n});\n"
  },
  {
    "path": "cofounder/dashboard/src/components/flow/nodes/cofounder-terminal.css",
    "content": ".react-flow__node-cofounder_terminal {\n\tbackground: #000000;\n\tborder: 1px solid #555;\n\tborder-radius: 5px;\n\ttext-align: left;\n}\n"
  },
  {
    "path": "cofounder/dashboard/src/components/flow/nodes/cofounder-terminal.tsx",
    "content": ""
  },
  {
    "path": "cofounder/dashboard/src/components/flow/nodes/color-selector.css",
    "content": ".react-flow__node-colorSelector {\n\tbackground: #000000;\n\tborder: 1px solid #555;\n\tborder-radius: 5px;\n\ttext-align: center;\n}\n"
  },
  {
    "path": "cofounder/dashboard/src/components/flow/nodes/color-selector.tsx",
    "content": "import React, { memo, useState, useEffect } from \"react\";\nimport { Handle, Position } from \"@xyflow/react\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport { Input } from \"@/components/ui/input\";\nimport { Label } from \"@/components/ui/label\";\n\nexport default memo(({ data, isConnectable }) => {\n\tconst [bgColor, setBgColor] = useState(data.color);\n\tconst [randomString, setRandomString] = useState(\"\");\n\n\tuseEffect(() => {\n\t\tconst interval = setInterval(() => {\n\t\t\tsetRandomString((prev) => {\n\t\t\t\tconst newString = prev + Math.random().toString(36).charAt(2);\n\t\t\t\tif (newString.length > 500) {\n\t\t\t\t\tclearInterval(interval);\n\t\t\t\t\treturn newString;\n\t\t\t\t}\n\t\t\t\treturn newString;\n\t\t\t});\n\t\t}, 10);\n\n\t\treturn () => clearInterval(interval);\n\t}, []);\n\n\treturn (\n\t\t<div className=\"dark\">\n\t\t\t<Handle\n\t\t\t\ttype=\"target\"\n\t\t\t\tposition={Position.Top}\n\t\t\t\tstyle={{ background: \"#555\" }}\n\t\t\t\tonConnect={(params) => console.log(\"handle onConnect\", params)}\n\t\t\t\tisConnectable={isConnectable}\n\t\t\t/>\n\t\t\t<div\n\t\t\t\tclassName=\"text-white rounded rounded-xl p-2\"\n\t\t\t\tstyle={{\n\t\t\t\t\tfontFamily: \"JetBrains Mono\",\n\t\t\t\t\tfontWeight: 400,\n\t\t\t\t\tbackground: bgColor,\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t<div className=\"p-2 m-2 hover:bg-[#222] duration-200\">\n\t\t\t\t\tCustom Color Picker Node: <strong>{data.color}</strong>\n\t\t\t\t</div>\n\t\t\t\t<pre className=\"text-left m-4 p-4 bg-black text-white max-w-[30vw] whitespace-pre-line break-all overflow-auto\">\n\t\t\t\t\trandom str : {randomString}\n\t\t\t\t</pre>\n\n\t\t\t\t<Dialog>\n\t\t\t\t\t<DialogTrigger asChild>\n\t\t\t\t\t\t<Button variant=\"outline\">Edit Profile</Button>\n\t\t\t\t\t</DialogTrigger>\n\t\t\t\t\t<DialogContent className=\"sm:max-w-[425px]\">\n\t\t\t\t\t\t<DialogHeader>\n\t\t\t\t\t\t\t<DialogTitle>Edit profile</DialogTitle>\n\t\t\t\t\t\t\t<DialogDescription>\n\t\t\t\t\t\t\t\tMake changes to your profile here. Click save when you're done.\n\t\t\t\t\t\t\t</DialogDescription>\n\t\t\t\t\t\t</DialogHeader>\n\t\t\t\t\t\t<div className=\"grid gap-4 py-4\">\n\t\t\t\t\t\t\t<div className=\"grid grid-cols-4 items-center gap-4\">\n\t\t\t\t\t\t\t\t<Label htmlFor=\"name\" className=\"text-right\">\n\t\t\t\t\t\t\t\t\tName\n\t\t\t\t\t\t\t\t</Label>\n\t\t\t\t\t\t\t\t<Input id=\"name\" defaultValue=\"Pedro Duarte\" className=\"col-span-3\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div className=\"grid grid-cols-4 items-center gap-4\">\n\t\t\t\t\t\t\t\t<Label htmlFor=\"username\" className=\"text-right\">\n\t\t\t\t\t\t\t\t\tUsername\n\t\t\t\t\t\t\t\t</Label>\n\t\t\t\t\t\t\t\t<Input id=\"username\" defaultValue=\"@peduarte\" className=\"col-span-3\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<DialogFooter>\n\t\t\t\t\t\t\t<Button type=\"submit\">Save changes</Button>\n\t\t\t\t\t\t</DialogFooter>\n\t\t\t\t\t</DialogContent>\n\t\t\t\t</Dialog>\n\n\t\t\t\t{/*\n        <input\n          className=\"nodrag rounded-lg p-1\" style={{backgroundColor:bgColor}}\n          type=\"color\"\n          onChange={(event) => {\n            const newColor = event.target.value;\n            setBgColor(newColor);\n            data.onChange(event);\n          }}\n          defaultValue={data.color}\n          style={{ cursor: 'pointer', width: '50px', height: '50px' }}\n        />\n        */}\n\t\t\t</div>\n\t\t\t<Handle\n\t\t\t\ttype=\"source\"\n\t\t\t\tposition={Position.Right}\n\t\t\t\tid=\"a\"\n\t\t\t\tstyle={{ top: 10, background: \"#555\" }}\n\t\t\t\tisConnectable={isConnectable}\n\t\t\t/>\n\t\t\t<Handle\n\t\t\t\ttype=\"source\"\n\t\t\t\tposition={Position.Right}\n\t\t\t\tid=\"b\"\n\t\t\t\tstyle={{ bottom: 10, top: \"auto\", background: \"#555\" }}\n\t\t\t\tisConnectable={isConnectable}\n\t\t\t/>\n\t\t</div>\n\t);\n});\n"
  },
  {
    "path": "cofounder/dashboard/src/components/flow/template.tsx",
    "content": "import { MarkerType } from \"@xyflow/react\";\n\nconst PADDING_X = 150;\nconst DIST_X = PADDING_X * 2;\nconst PADDING_Y = 75;\nconst DIST_Y = PADDING_Y * 6;\n\nexport default {\n\tmetrics: {\n\t\tPADDING_X,\n\t\tPADDING_Y,\n\t\tDIST_X,\n\t\tDIST_Y,\n\t},\n\tlayers: {\n\t\t// pm layer , etc\n\t},\n\tnodes: {\n\t\t\"pm.details\": { position: { x: DIST_X * 2, y: -DIST_Y * 2 } },\n\t\t\"pm.prd\": { position: { x: 0, y: 0 } },\n\t\t\"pm.frd\": { position: { x: DIST_X * 4, y: 0 } },\n\n\t\t\"pm.drd\": { position: { x: DIST_X * 4, y: DIST_Y } },\n\n\t\t\"db.schemas\": {\n\t\t\tposition: { x: PADDING_X * 2 + DIST_X * 5, y: DIST_Y + PADDING_Y },\n\t\t},\n\t\t\"db.postgres\": {\n\t\t\tposition: { x: PADDING_X * 2 + DIST_X * 6, y: DIST_Y + PADDING_Y * 2 },\n\t\t},\n\n\t\t\"pm.brd\": { position: { x: DIST_X * 5, y: PADDING_Y + DIST_Y * 2 } },\n\t\t\"backend.specifications.openapi\": {\n\t\t\tposition: { x: DIST_X * 7, y: PADDING_Y + DIST_Y * 2 + PADDING_Y },\n\t\t},\n\t\t\"backend.specifications.asyncapi\": {\n\t\t\tposition: { x: DIST_X * 7, y: PADDING_Y + DIST_Y * 2.75 + PADDING_Y },\n\t\t},\n\t\t\"backend.server.main\": { position: { x: DIST_X * 9, y: DIST_Y * 2.5 } },\n\n\t\t\"pm.uxsmd\": { position: { x: 0, y: DIST_Y } },\n\t\t\"pm.uxdmd\": { position: { x: DIST_X * 2, y: DIST_Y } },\n\n\t\t\"uxsitemap.structure\": {\n\t\t\tposition: { x: -DIST_X * 3.5, y: DIST_Y * 4.5 },\n\t\t},\n\t\t\"uxdatamap.structure\": {\n\t\t\tposition: { x: DIST_X * 1.5, y: DIST_Y * 2 + PADDING_Y },\n\t\t},\n\t\t\"uxdatamap.views\": {\n\t\t\tposition: { x: DIST_X * 3, y: DIST_Y * 2 + PADDING_Y * 2 },\n\t\t},\n\n\t\t\"webapp.react.root\": { position: { x: 0, y: DIST_Y * 3 + PADDING_Y * 2 } },\n\t\t\"webapp.react.store\": {\n\t\t\tposition: { x: DIST_X * 3, y: DIST_Y * 3 + PADDING_Y * 2 },\n\t\t},\n\t\t\"webapp.react.views\": { position: { x: 0, y: DIST_Y * 6 } },\n\n\t\t\"settings.config.package\": {\n\t\t\tposition: { x: DIST_X * 12, y: DIST_Y * 4 },\n\t\t},\n\t\t\"settings.preferences.versions\": {\n\t\t\tposition: { x: -DIST_X * 5, y: DIST_Y * 4.5 },\n\t\t},\n\t},\n\n\tedges: [\n\t\t...[\"pm.prd\", \"pm.frd\"].map((target) => {\n\t\t\tconst source = \"pm.details\";\n\t\t\treturn {\n\t\t\t\tid: `${source}-${target}`,\n\t\t\t\tsource,\n\t\t\t\ttarget: target,\n\t\t\t};\n\t\t}),\n\t\t...[\"pm.frd\", \"pm.drd\", \"pm.uxsmd\", \"pm.uxdmd\", \"pm.brd\"].map((target) => {\n\t\t\tconst source = \"pm.prd\";\n\t\t\treturn {\n\t\t\t\tid: `${source}-${target}`,\n\t\t\t\tsource,\n\t\t\t\ttarget: target,\n\t\t\t};\n\t\t}),\n\t\t...[\"pm.brd\", \"db.schemas\", \"db.postgres\"].map((target) => {\n\t\t\tconst source = \"pm.drd\";\n\t\t\treturn {\n\t\t\t\tid: `${source}-${target}`,\n\t\t\t\tsource,\n\t\t\t\ttarget: target,\n\t\t\t};\n\t\t}),\n\t\t...[\n\t\t\t\"backend.specifications.openapi\",\n\t\t\t\"backend.specifications.asyncapi\",\n\t\t\t\"pm.uxdmd\",\n\t\t].map((target) => {\n\t\t\tconst source = \"pm.brd\";\n\t\t\treturn {\n\t\t\t\tid: `${source}-${target}`,\n\t\t\t\tsource,\n\t\t\t\ttarget: target,\n\t\t\t};\n\t\t}),\n\t\t...[\n\t\t\t\"pm.brd\",\n\t\t\t\"backend.specifications.openapi\",\n\t\t\t\"backend.specifications.asyncapi\",\n\t\t].map((source) => {\n\t\t\tconst target = \"backend.server.main\";\n\t\t\treturn {\n\t\t\t\tid: `${source}-${target}`,\n\t\t\t\tsource,\n\t\t\t\ttarget,\n\t\t\t};\n\t\t}),\n\n\t\t...[\"pm.uxdmd\", \"uxsitemap.structure\"].map((target) => {\n\t\t\tconst source = \"pm.uxsmd\";\n\t\t\treturn {\n\t\t\t\tid: `${source}-${target}`,\n\t\t\t\tsource,\n\t\t\t\ttarget: target,\n\t\t\t};\n\t\t}),\n\t\t...[\"uxdatamap.structure\", \"uxdatamap.views\"].map((target) => {\n\t\t\tconst source = \"pm.uxdmd\";\n\t\t\treturn {\n\t\t\t\tid: `${source}-${target}`,\n\t\t\t\tsource,\n\t\t\t\ttarget: target,\n\t\t\t};\n\t\t}),\n\n\t\t...[\"webapp.react.root.app\"].map((target) => {\n\t\t\tconst source = \"uxsitemap.structure\";\n\t\t\treturn {\n\t\t\t\tid: `${source}-${target}`,\n\t\t\t\tsource,\n\t\t\t\ttarget: target,\n\t\t\t};\n\t\t}),\n\t\t...[\"webapp.react.root.app\"].map((target) => {\n\t\t\tconst source = \"uxdatamap.views\";\n\t\t\treturn {\n\t\t\t\tid: `${source}-${target}`,\n\t\t\t\tsource,\n\t\t\t\ttarget: target,\n\t\t\t};\n\t\t}),\n\t\t...[\"webapp.react.store.redux\"].map((target) => {\n\t\t\tconst source = \"uxdatamap.structure\";\n\t\t\treturn {\n\t\t\t\tid: `${source}-${target}`,\n\t\t\t\tsource,\n\t\t\t\ttarget: target,\n\t\t\t};\n\t\t}),\n\n\t\t...[\"backend.server.main\", \"uxsitemap.structure\"].map((target) => {\n\t\t\tconst source = \"settings.config.package\";\n\t\t\treturn {\n\t\t\t\tid: `${source}-${target}`,\n\t\t\t\tsource,\n\t\t\t\ttarget: target,\n\t\t\t};\n\t\t}),\n\t\t...[\"uxsitemap.structure\"].map((target) => {\n\t\t\tconst source = \"settings.preferences.versions\";\n\t\t\treturn {\n\t\t\t\tid: `${source}-${target}`,\n\t\t\t\tsource,\n\t\t\t\ttarget: target,\n\t\t\t};\n\t\t}),\n\t].map((item) => {\n\t\treturn {\n\t\t\tanimated: true,\n\t\t\tstyle: { stroke: \"#999\" },\n\t\t\ttype: \"floating\",\n\t\t\tmarkerEnd: {\n\t\t\t\ttype: MarkerType.ArrowClosed,\n\t\t\t\twidth: 30,\n\t\t\t\theight: 30,\n\t\t\t},\n\t\t\t...item,\n\t\t};\n\t}),\n};\n"
  },
  {
    "path": "cofounder/dashboard/src/components/styles/flow.css",
    "content": "/* this gets exported as style.css and can be used for the default theming */\n/* these are the necessary styles for React/Svelte Flow, they get used by base.css and style.css */\n\n.react-flow {\n\tdirection: ltr;\n\n\t--xy-edge-stroke-default: #b1b1b7;\n\t--xy-edge-stroke-width-default: 1;\n\t--xy-edge-stroke-selected-default: #555;\n\n\t--xy-connectionline-stroke-default: #b1b1b7;\n\t--xy-connectionline-stroke-width-default: 1;\n\n\t--xy-attribution-background-color-default: rgba(255, 255, 255, 0.5);\n\n\t--xy-minimap-background-color-default: #fff;\n\t--xy-minimap-mask-background-color-default: rgb(240, 240, 240, 0.6);\n\t--xy-minimap-mask-stroke-color-default: transparent;\n\t--xy-minimap-mask-stroke-width-default: 1;\n\t--xy-minimap-node-background-color-default: #e2e2e2;\n\t--xy-minimap-node-stroke-color-default: transparent;\n\t--xy-minimap-node-stroke-width-default: 2;\n\n\t--xy-background-color-default: transparent;\n\t--xy-background-pattern-dots-color-default: #91919a;\n\t--xy-background-pattern-lines-color-default: #eee;\n\t--xy-background-pattern-cross-color-default: #e2e2e2;\n\tbackground-color: var(\n\t\t--xy-background-color,\n\t\tvar(--xy-background-color-default)\n\t);\n\t--xy-node-color-default: inherit;\n\t--xy-node-border-default: 1px solid #1a192b;\n\t--xy-node-background-color-default: #fff;\n\t--xy-node-group-background-color-default: rgba(240, 240, 240, 0.25);\n\t--xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(0, 0, 0, 0.08);\n\t--xy-node-boxshadow-selected-default: 0 0 0 0.5px #1a192b;\n\t--xy-node-border-radius-default: 3px;\n\n\t--xy-handle-background-color-default: #1a192b;\n\t--xy-handle-border-color-default: #fff;\n\n\t--xy-selection-background-color-default: rgba(0, 89, 220, 0.08);\n\t--xy-selection-border-default: 1px dotted rgba(0, 89, 220, 0.8);\n\n\t--xy-controls-button-background-color-default: #fefefe;\n\t--xy-controls-button-background-color-hover-default: #f4f4f4;\n\t--xy-controls-button-color-default: inherit;\n\t--xy-controls-button-color-hover-default: inherit;\n\t--xy-controls-button-border-color-default: #eee;\n\t--xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, 0.08);\n\n\t--xy-edge-label-background-color-default: #ffffff;\n\t--xy-edge-label-color-default: inherit;\n\t--xy-resize-background-color-default: #3367d9;\n}\n\n.react-flow.dark {\n\t--xy-edge-stroke-default: #5c5c5c;\n\t--xy-edge-stroke-width-default: 1;\n\t--xy-edge-stroke-selected-default: #8a8a8a;\n\n\t--xy-connectionline-stroke-default: #4a4a4a;\n\t--xy-connectionline-stroke-width-default: 1;\n\n\t--xy-attribution-background-color-default: rgba(100, 100, 100, 0.25);\n\n\t--xy-minimap-background-color-default: #1a1a1a;\n\t--xy-minimap-mask-background-color-default: rgba(80, 80, 80, 0.6);\n\t--xy-minimap-mask-stroke-color-default: transparent;\n\t--xy-minimap-mask-stroke-width-default: 1;\n\t--xy-minimap-node-background-color-default: #3a3a3a;\n\t--xy-minimap-node-stroke-color-default: transparent;\n\t--xy-minimap-node-stroke-width-default: 2;\n\n\t--xy-background-color-default: #1a1a1a;\n\t--xy-background-pattern-dots-color-default: #616161;\n\t--xy-background-pattern-lines-color-default: #141414;\n\t--xy-background-pattern-cross-color-default: #525252;\n\t--xy-node-color-default: #e0e0e0;\n\t--xy-node-border-default: 1px solid #4a4a4a;\n\t--xy-node-background-color-default: #2a2a2a;\n\t--xy-node-group-background-color-default: rgba(200, 200, 200, 0.25);\n\t--xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(255, 255, 255, 0.08);\n\t--xy-node-boxshadow-selected-default: 0 0 0 0.5px #b0b0b0;\n\n\t--xy-handle-background-color-default: #d0d0d0;\n\t--xy-handle-border-color-default: #2a2a2a;\n\n\t--xy-selection-background-color-default: rgba(150, 150, 200, 0.08);\n\t--xy-selection-border-default: 1px dotted rgba(150, 150, 200, 0.8);\n\n\t--xy-controls-button-background-color-default: #3a3a3a;\n\t--xy-controls-button-background-color-hover-default: #4a4a4a;\n\t--xy-controls-button-color-default: #e0e0e0;\n\t--xy-controls-button-color-hover-default: #ffffff;\n\t--xy-controls-button-border-color-default: #6a6a6a;\n\t--xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, 0.08);\n\n\t--xy-edge-label-background-color-default: #1a1a1a;\n\t--xy-edge-label-color-default: #e0e0e0;\n}\n\n.react-flow__background {\n\tbackground-color: var(\n\t\t--xy-background-color,\n\t\tvar(--xy-background-color-props, var(--xy-background-color-default))\n\t);\n\tpointer-events: none;\n\tz-index: -1;\n}\n\n.react-flow__container {\n\tposition: absolute;\n\twidth: 100%;\n\theight: 100%;\n\ttop: 0;\n\tleft: 0;\n}\n\n.react-flow__pane {\n\tz-index: 1;\n}\n\n.react-flow__pane.draggable {\n\tcursor: grab;\n}\n\n.react-flow__pane.dragging {\n\tcursor: grabbing;\n}\n\n.react-flow__pane.selection {\n\tcursor: pointer;\n}\n\n.react-flow__viewport {\n\ttransform-origin: 0 0;\n\tz-index: 2;\n\tpointer-events: none;\n}\n\n.react-flow__renderer {\n\tz-index: 4;\n}\n\n.react-flow__selection {\n\tz-index: 6;\n}\n\n.react-flow__nodesselection-rect:focus,\n.react-flow__nodesselection-rect:focus-visible {\n\toutline: none;\n}\n\n.react-flow__edge-path {\n\tstroke: var(--xy-edge-stroke, var(--xy-edge-stroke-default));\n\tstroke-width: var(--xy-edge-stroke-width, var(--xy-edge-stroke-width-default));\n\tfill: none;\n}\n\n.react-flow__connection-path {\n\tstroke: var(\n\t\t--xy-connectionline-stroke,\n\t\tvar(--xy-connectionline-stroke-default)\n\t);\n\tstroke-width: var(\n\t\t--xy-connectionline-stroke-width,\n\t\tvar(--xy-connectionline-stroke-width-default)\n\t);\n\tfill: none;\n}\n\n.react-flow .react-flow__edges {\n\tposition: absolute;\n}\n\n.react-flow .react-flow__edges svg {\n\toverflow: visible;\n\tposition: absolute;\n\tpointer-events: none;\n}\n\n.react-flow__edge {\n\tpointer-events: visibleStroke;\n}\n\n.react-flow__edge.selectable {\n\tcursor: pointer;\n}\n\n.react-flow__edge.animated path {\n\tstroke-dasharray: 5;\n\tanimation: dashdraw 0.5s linear infinite;\n}\n\n.react-flow__edge.animated path.react-flow__edge-interaction {\n\tstroke-dasharray: none;\n\tanimation: none;\n}\n\n.react-flow__edge.inactive {\n\tpointer-events: none;\n}\n\n.react-flow__edge.selected,\n.react-flow__edge:focus,\n.react-flow__edge:focus-visible {\n\toutline: none;\n}\n\n.react-flow__edge.selected .react-flow__edge-path,\n.react-flow__edge.selectable:focus .react-flow__edge-path,\n.react-flow__edge.selectable:focus-visible .react-flow__edge-path {\n\tstroke: var(--xy-edge-stroke-selected, var(--xy-edge-stroke-selected-default));\n}\n\n.react-flow__edge-textwrapper {\n\tpointer-events: all;\n}\n\n.react-flow__edge .react-flow__edge-text {\n\tpointer-events: none;\n\t-webkit-user-select: none;\n\t-moz-user-select: none;\n\tuser-select: none;\n}\n\n.react-flow__connection {\n\tpointer-events: none;\n}\n\n.react-flow__connection .animated {\n\tstroke-dasharray: 5;\n\tanimation: dashdraw 0.5s linear infinite;\n}\n\nsvg.react-flow__connectionline {\n\tz-index: 1001;\n\toverflow: visible;\n\tposition: absolute;\n}\n\n.react-flow__nodes {\n\tpointer-events: none;\n\ttransform-origin: 0 0;\n}\n\n.react-flow__node {\n\tposition: absolute;\n\t-webkit-user-select: none;\n\t-moz-user-select: none;\n\tuser-select: none;\n\tpointer-events: all;\n\ttransform-origin: 0 0;\n\tbox-sizing: border-box;\n\tcursor: default;\n}\n\n.react-flow__node.selectable {\n\tcursor: pointer;\n}\n\n.react-flow__node.draggable {\n\tcursor: grab;\n\tpointer-events: all;\n}\n\n.react-flow__node.draggable.dragging {\n\tcursor: grabbing;\n}\n\n.react-flow__nodesselection {\n\tz-index: 3;\n\ttransform-origin: left top;\n\tpointer-events: none;\n}\n\n.react-flow__nodesselection-rect {\n\tposition: absolute;\n\tpointer-events: all;\n\tcursor: grab;\n}\n\n.react-flow__handle {\n\tposition: absolute;\n\tpointer-events: none;\n\tmin-width: 5px;\n\tmin-height: 5px;\n\twidth: 6px;\n\theight: 6px;\n\tbackground-color: var(\n\t\t--xy-handle-background-color,\n\t\tvar(--xy-handle-background-color-default)\n\t);\n\tborder: 1px solid\n\t\tvar(--xy-handle-border-color, var(--xy-handle-border-color-default));\n\tborder-radius: 100%;\n}\n\n.react-flow__handle.connectingfrom {\n\tpointer-events: all;\n}\n\n.react-flow__handle.connectionindicator {\n\tpointer-events: all;\n\tcursor: crosshair;\n}\n\n.react-flow__handle-bottom {\n\ttop: auto;\n\tleft: 50%;\n\tbottom: 0;\n\ttransform: translate(-50%, 50%);\n}\n\n.react-flow__handle-top {\n\ttop: 0;\n\tleft: 50%;\n\ttransform: translate(-50%, -50%);\n}\n\n.react-flow__handle-left {\n\ttop: 50%;\n\tleft: 0;\n\ttransform: translate(-50%, -50%);\n}\n\n.react-flow__handle-right {\n\ttop: 50%;\n\tright: 0;\n\ttransform: translate(50%, -50%);\n}\n\n.react-flow__edgeupdater {\n\tcursor: move;\n\tpointer-events: all;\n}\n\n.react-flow__panel {\n\tposition: absolute;\n\tz-index: 5;\n\tmargin: 15px;\n}\n\n.react-flow__panel.top {\n\ttop: 0;\n}\n\n.react-flow__panel.bottom {\n\tbottom: 0;\n}\n\n.react-flow__panel.left {\n\tleft: 0;\n}\n\n.react-flow__panel.right {\n\tright: 0;\n}\n\n.react-flow__panel.center {\n\tleft: 50%;\n\ttransform: translateX(-50%);\n}\n\n.react-flow__attribution {\n\tfont-size: 10px;\n\tbackground: var(\n\t\t--xy-attribution-background-color,\n\t\tvar(--xy-attribution-background-color-default)\n\t);\n\tpadding: 2px 3px;\n\tmargin: 0;\n}\n\n.react-flow__attribution a {\n\ttext-decoration: none;\n\tcolor: #999;\n}\n\n@keyframes dashdraw {\n\tfrom {\n\t\tstroke-dashoffset: 10;\n\t}\n}\n\n.react-flow__edgelabel-renderer {\n\tposition: absolute;\n\twidth: 100%;\n\theight: 100%;\n\tpointer-events: none;\n\t-webkit-user-select: none;\n\t-moz-user-select: none;\n\tuser-select: none;\n\tleft: 0;\n\ttop: 0;\n}\n\n.react-flow__viewport-portal {\n\tposition: absolute;\n\twidth: 100%;\n\theight: 100%;\n\tleft: 0;\n\ttop: 0;\n\t-webkit-user-select: none;\n\t-moz-user-select: none;\n\tuser-select: none;\n}\n\n.react-flow__minimap {\n\tbackground: var(\n\t\t--xy-minimap-background-color-props,\n\t\tvar(--xy-minimap-background-color, var(--xy-minimap-background-color-default))\n\t);\n}\n\n.react-flow__minimap-svg {\n\tdisplay: block;\n}\n\n.react-flow__minimap-mask {\n\tfill: var(\n\t\t--xy-minimap-mask-background-color-props,\n\t\tvar(\n\t\t\t--xy-minimap-mask-background-color,\n\t\t\tvar(--xy-minimap-mask-background-color-default)\n\t\t)\n\t);\n\tstroke: var(\n\t\t--xy-minimap-mask-stroke-color-props,\n\t\tvar(\n\t\t\t--xy-minimap-mask-stroke-color,\n\t\t\tvar(--xy-minimap-mask-stroke-color-default)\n\t\t)\n\t);\n\tstroke-width: var(\n\t\t--xy-minimap-mask-stroke-width-props,\n\t\tvar(\n\t\t\t--xy-minimap-mask-stroke-width,\n\t\t\tvar(--xy-minimap-mask-stroke-width-default)\n\t\t)\n\t);\n}\n\n.react-flow__minimap-node {\n\tfill: var(\n\t\t--xy-minimap-node-background-color-props,\n\t\tvar(\n\t\t\t--xy-minimap-node-background-color,\n\t\t\tvar(--xy-minimap-node-background-color-default)\n\t\t)\n\t);\n\tstroke: var(\n\t\t--xy-minimap-node-stroke-color-props,\n\t\tvar(\n\t\t\t--xy-minimap-node-stroke-color,\n\t\t\tvar(--xy-minimap-node-stroke-color-default)\n\t\t)\n\t);\n\tstroke-width: var(\n\t\t--xy-minimap-node-stroke-width-props,\n\t\tvar(\n\t\t\t--xy-minimap-node-stroke-width,\n\t\t\tvar(--xy-minimap-node-stroke-width-default)\n\t\t)\n\t);\n}\n\n.react-flow__background-pattern.dots {\n\tfill: var(\n\t\t--xy-background-pattern-color-props,\n\t\tvar(\n\t\t\t--xy-background-pattern-color,\n\t\t\tvar(--xy-background-pattern-dots-color-default)\n\t\t)\n\t);\n}\n\n.react-flow__background-pattern.lines {\n\tstroke: var(\n\t\t--xy-background-pattern-color-props,\n\t\tvar(\n\t\t\t--xy-background-pattern-color,\n\t\t\tvar(--xy-background-pattern-lines-color-default)\n\t\t)\n\t);\n}\n\n.react-flow__background-pattern.cross {\n\tstroke: var(\n\t\t--xy-background-pattern-color-props,\n\t\tvar(\n\t\t\t--xy-background-pattern-color,\n\t\t\tvar(--xy-background-pattern-cross-color-default)\n\t\t)\n\t);\n}\n\n.react-flow__controls {\n\tdisplay: flex;\n\tflex-direction: column;\n\tbox-shadow: var(\n\t\t--xy-controls-box-shadow,\n\t\tvar(--xy-controls-box-shadow-default)\n\t);\n}\n\n.react-flow__controls.horizontal {\n\tflex-direction: row;\n}\n\n.react-flow__controls-button {\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\theight: 26px;\n\twidth: 26px;\n\tpadding: 4px;\n\tborder: none;\n\tbackground: var(\n\t\t--xy-controls-button-background-color,\n\t\tvar(--xy-controls-button-background-color-default)\n\t);\n\tborder-bottom: 1px solid\n\t\tvar(\n\t\t\t--xy-controls-button-border-color-props,\n\t\t\tvar(\n\t\t\t\t--xy-controls-button-border-color,\n\t\t\t\tvar(--xy-controls-button-border-color-default)\n\t\t\t)\n\t\t);\n\tcolor: var(\n\t\t--xy-controls-button-color-props,\n\t\tvar(--xy-controls-button-color, var(--xy-controls-button-color-default))\n\t);\n\tcursor: pointer;\n\t-webkit-user-select: none;\n\t-moz-user-select: none;\n\tuser-select: none;\n}\n\n.react-flow__controls-button svg {\n\twidth: 100%;\n\tmax-width: 12px;\n\tmax-height: 12px;\n\tfill: currentColor;\n}\n\n.react-flow__edge.updating .react-flow__edge-path {\n\tstroke: #777;\n}\n\n.react-flow__edge-text {\n\tfont-size: 10px;\n}\n\n.react-flow__node.selectable:focus,\n.react-flow__node.selectable:focus-visible {\n\toutline: none;\n}\n\n.react-flow__node-input,\n.react-flow__node-default,\n.react-flow__node-output,\n.react-flow__node-group {\n\tpadding: 10px;\n\tborder-radius: var(\n\t\t--xy-node-border-radius,\n\t\tvar(--xy-node-border-radius-default)\n\t);\n\twidth: 150px;\n\tfont-size: 12px;\n\tcolor: var(--xy-node-color, var(--xy-node-color-default));\n\ttext-align: center;\n\tborder: var(--xy-node-border, var(--xy-node-border-default));\n\tbackground-color: var(\n\t\t--xy-node-background-color,\n\t\tvar(--xy-node-background-color-default)\n\t);\n}\n\n.react-flow__node-input.selectable:hover,\n.react-flow__node-default.selectable:hover,\n.react-flow__node-output.selectable:hover,\n.react-flow__node-group.selectable:hover {\n\tbox-shadow: var(\n\t\t--xy-node-boxshadow-hover,\n\t\tvar(--xy-node-boxshadow-hover-default)\n\t);\n}\n\n.react-flow__node-input.selectable.selected,\n.react-flow__node-input.selectable:focus,\n.react-flow__node-input.selectable:focus-visible,\n.react-flow__node-default.selectable.selected,\n.react-flow__node-default.selectable:focus,\n.react-flow__node-default.selectable:focus-visible,\n.react-flow__node-output.selectable.selected,\n.react-flow__node-output.selectable:focus,\n.react-flow__node-output.selectable:focus-visible,\n.react-flow__node-group.selectable.selected,\n.react-flow__node-group.selectable:focus,\n.react-flow__node-group.selectable:focus-visible {\n\tbox-shadow: var(\n\t\t--xy-node-boxshadow-selected,\n\t\tvar(--xy-node-boxshadow-selected-default)\n\t);\n}\n\n.react-flow__node-group {\n\tbackground-color: var(\n\t\t--xy-node-group-background-color,\n\t\tvar(--xy-node-group-background-color-default)\n\t);\n}\n\n.react-flow__nodesselection-rect,\n.react-flow__selection {\n\tbackground: var(\n\t\t--xy-selection-background-color,\n\t\tvar(--xy-selection-background-color-default)\n\t);\n\tborder: var(--xy-selection-border, var(--xy-selection-border-default));\n}\n\n.react-flow__nodesselection-rect:focus,\n.react-flow__nodesselection-rect:focus-visible,\n.react-flow__selection:focus,\n.react-flow__selection:focus-visible {\n\toutline: none;\n}\n\n.react-flow__controls-button:hover {\n\tbackground: var(\n\t\t--xy-controls-button-background-color-hover-props,\n\t\tvar(\n\t\t\t--xy-controls-button-background-color-hover,\n\t\t\tvar(--xy-controls-button-background-color-hover-default)\n\t\t)\n\t);\n\tcolor: var(\n\t\t--xy-controls-button-color-hover-props,\n\t\tvar(\n\t\t\t--xy-controls-button-color-hover,\n\t\t\tvar(--xy-controls-button-color-hover-default)\n\t\t)\n\t);\n}\n\n.react-flow__controls-button:disabled {\n\tpointer-events: none;\n}\n\n.react-flow__controls-button:disabled svg {\n\tfill-opacity: 0.4;\n}\n\n.react-flow__controls-button:last-child {\n\tborder-bottom: none;\n}\n\n.react-flow__resize-control {\n\tposition: absolute;\n}\n\n.react-flow__resize-control.left,\n.react-flow__resize-control.right {\n\tcursor: ew-resize;\n}\n\n.react-flow__resize-control.top,\n.react-flow__resize-control.bottom {\n\tcursor: ns-resize;\n}\n\n.react-flow__resize-control.top.left,\n.react-flow__resize-control.bottom.right {\n\tcursor: nwse-resize;\n}\n\n.react-flow__resize-control.bottom.left,\n.react-flow__resize-control.top.right {\n\tcursor: nesw-resize;\n}\n\n/* handle styles */\n.react-flow__resize-control.handle {\n\twidth: 4px;\n\theight: 4px;\n\tborder: 1px solid #fff;\n\tborder-radius: 1px;\n\tbackground-color: var(\n\t\t--xy-resize-background-color,\n\t\tvar(--xy-resize-background-color-default)\n\t);\n\ttransform: translate(-50%, -50%);\n}\n\n.react-flow__resize-control.handle.left {\n\tleft: 0;\n\ttop: 50%;\n}\n\n.react-flow__resize-control.handle.right {\n\tleft: 100%;\n\ttop: 50%;\n}\n\n.react-flow__resize-control.handle.top {\n\tleft: 50%;\n\ttop: 0;\n}\n\n.react-flow__resize-control.handle.bottom {\n\tleft: 50%;\n\ttop: 100%;\n}\n\n.react-flow__resize-control.handle.top.left {\n\tleft: 0;\n}\n\n.react-flow__resize-control.handle.bottom.left {\n\tleft: 0;\n}\n\n.react-flow__resize-control.handle.top.right {\n\tleft: 100%;\n}\n\n.react-flow__resize-control.handle.bottom.right {\n\tleft: 100%;\n}\n\n/* line styles */\n.react-flow__resize-control.line {\n\tborder-color: var(\n\t\t--xy-resize-background-color,\n\t\tvar(--xy-resize-background-color-default)\n\t);\n\tborder-width: 0;\n\tborder-style: solid;\n}\n\n.react-flow__resize-control.line.left,\n.react-flow__resize-control.line.right {\n\twidth: 1px;\n\ttransform: translate(-50%, 0);\n\ttop: 0;\n\theight: 100%;\n}\n\n.react-flow__resize-control.line.left {\n\tleft: 0;\n\tborder-left-width: 1px;\n}\n\n.react-flow__resize-control.line.right {\n\tleft: 100%;\n\tborder-right-width: 1px;\n}\n\n.react-flow__resize-control.line.top,\n.react-flow__resize-control.line.bottom {\n\theight: 1px;\n\ttransform: translate(0, -50%);\n\tleft: 0;\n\twidth: 100%;\n}\n\n.react-flow__resize-control.line.top {\n\ttop: 0;\n\tborder-top-width: 1px;\n}\n\n.react-flow__resize-control.line.bottom {\n\tborder-bottom-width: 1px;\n\ttop: 100%;\n}\n\n.react-flow__edge-textbg {\n\tfill: var(\n\t\t--xy-edge-label-background-color,\n\t\tvar(--xy-edge-label-background-color-default)\n\t);\n}\n\n.react-flow__edge-text {\n\tfill: var(--xy-edge-label-color, var(--xy-edge-label-color-default));\n}\n"
  },
  {
    "path": "cofounder/dashboard/src/components/ui/accordion.tsx",
    "content": "import * as React from \"react\";\nimport * as AccordionPrimitive from \"@radix-ui/react-accordion\";\nimport { ChevronDown } from \"lucide-react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst Accordion = AccordionPrimitive.Root;\n\nconst AccordionItem = React.forwardRef<\n\tReact.ElementRef<typeof AccordionPrimitive.Item>,\n\tReact.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>\n>(({ className, ...props }, ref) => (\n\t<AccordionPrimitive.Item\n\t\tref={ref}\n\t\tclassName={cn(\"border-b\", className)}\n\t\t{...props}\n\t/>\n));\nAccordionItem.displayName = \"AccordionItem\";\n\nconst AccordionTrigger = React.forwardRef<\n\tReact.ElementRef<typeof AccordionPrimitive.Trigger>,\n\tReact.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger>\n>(({ className, children, ...props }, ref) => (\n\t<AccordionPrimitive.Header className=\"flex\">\n\t\t<AccordionPrimitive.Trigger\n\t\t\tref={ref}\n\t\t\tclassName={cn(\n\t\t\t\t\"flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t\t<ChevronDown className=\"h-4 w-4 shrink-0 transition-transform duration-200\" />\n\t\t</AccordionPrimitive.Trigger>\n\t</AccordionPrimitive.Header>\n));\nAccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;\n\nconst AccordionContent = React.forwardRef<\n\tReact.ElementRef<typeof AccordionPrimitive.Content>,\n\tReact.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n\t<AccordionPrimitive.Content\n\t\tref={ref}\n\t\tclassName=\"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down\"\n\t\t{...props}\n\t>\n\t\t<div className={cn(\"pb-4 pt-0\", className)}>{children}</div>\n\t</AccordionPrimitive.Content>\n));\n\nAccordionContent.displayName = AccordionPrimitive.Content.displayName;\n\nexport { Accordion, AccordionItem, AccordionTrigger, AccordionContent };\n"
  },
  {
    "path": "cofounder/dashboard/src/components/ui/alert-dialog.tsx",
    "content": "import * as React from \"react\";\nimport * as AlertDialogPrimitive from \"@radix-ui/react-alert-dialog\";\n\nimport { cn } from \"@/lib/utils\";\nimport { buttonVariants } from \"@/components/ui/button\";\n\nconst AlertDialog = AlertDialogPrimitive.Root;\n\nconst AlertDialogTrigger = AlertDialogPrimitive.Trigger;\n\nconst AlertDialogPortal = AlertDialogPrimitive.Portal;\n\nconst AlertDialogOverlay = React.forwardRef<\n\tReact.ElementRef<typeof AlertDialogPrimitive.Overlay>,\n\tReact.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n\t<AlertDialogPrimitive.Overlay\n\t\tclassName={cn(\n\t\t\t\"fixed inset-0 z-50 bg-black/80  data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t\tref={ref}\n\t/>\n));\nAlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;\n\nconst AlertDialogContent = React.forwardRef<\n\tReact.ElementRef<typeof AlertDialogPrimitive.Content>,\n\tReact.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content>\n>(({ className, ...props }, ref) => (\n\t<AlertDialogPortal>\n\t\t<AlertDialogOverlay />\n\t\t<AlertDialogPrimitive.Content\n\t\t\tref={ref}\n\t\t\tclassName={cn(\n\t\t\t\t\"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-neutral-200 bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg dark:border-neutral-800 dark:bg-neutral-950\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t</AlertDialogPortal>\n));\nAlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;\n\nconst AlertDialogHeader = ({\n\tclassName,\n\t...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n\t<div\n\t\tclassName={cn(\"flex flex-col space-y-2 text-center sm:text-left\", className)}\n\t\t{...props}\n\t/>\n);\nAlertDialogHeader.displayName = \"AlertDialogHeader\";\n\nconst AlertDialogFooter = ({\n\tclassName,\n\t...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n\t<div\n\t\tclassName={cn(\n\t\t\t\"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n);\nAlertDialogFooter.displayName = \"AlertDialogFooter\";\n\nconst AlertDialogTitle = React.forwardRef<\n\tReact.ElementRef<typeof AlertDialogPrimitive.Title>,\n\tReact.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n\t<AlertDialogPrimitive.Title\n\t\tref={ref}\n\t\tclassName={cn(\"text-lg font-semibold\", className)}\n\t\t{...props}\n\t/>\n));\nAlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;\n\nconst AlertDialogDescription = React.forwardRef<\n\tReact.ElementRef<typeof AlertDialogPrimitive.Description>,\n\tReact.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n\t<AlertDialogPrimitive.Description\n\t\tref={ref}\n\t\tclassName={cn(\"text-sm text-neutral-500 dark:text-neutral-400\", className)}\n\t\t{...props}\n\t/>\n));\nAlertDialogDescription.displayName =\n\tAlertDialogPrimitive.Description.displayName;\n\nconst AlertDialogAction = React.forwardRef<\n\tReact.ElementRef<typeof AlertDialogPrimitive.Action>,\n\tReact.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Action>\n>(({ className, ...props }, ref) => (\n\t<AlertDialogPrimitive.Action\n\t\tref={ref}\n\t\tclassName={cn(buttonVariants(), className)}\n\t\t{...props}\n\t/>\n));\nAlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;\n\nconst AlertDialogCancel = React.forwardRef<\n\tReact.ElementRef<typeof AlertDialogPrimitive.Cancel>,\n\tReact.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Cancel>\n>(({ className, ...props }, ref) => (\n\t<AlertDialogPrimitive.Cancel\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\tbuttonVariants({ variant: \"outline\" }),\n\t\t\t\"mt-2 sm:mt-0\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nAlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;\n\nexport {\n\tAlertDialog,\n\tAlertDialogPortal,\n\tAlertDialogOverlay,\n\tAlertDialogTrigger,\n\tAlertDialogContent,\n\tAlertDialogHeader,\n\tAlertDialogFooter,\n\tAlertDialogTitle,\n\tAlertDialogDescription,\n\tAlertDialogAction,\n\tAlertDialogCancel,\n};\n"
  },
  {
    "path": "cofounder/dashboard/src/components/ui/alert.tsx",
    "content": "import * as React from \"react\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst alertVariants = cva(\n\t\"relative w-full rounded-lg border border-neutral-200 p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-neutral-950 dark:border-neutral-800 dark:[&>svg]:text-neutral-50\",\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tdefault:\n\t\t\t\t\t\"bg-white text-neutral-950 dark:bg-neutral-950 dark:text-neutral-50\",\n\t\t\t\tdestructive:\n\t\t\t\t\t\"border-red-500/50 text-red-500 dark:border-red-500 [&>svg]:text-red-500 dark:border-red-900/50 dark:text-red-900 dark:dark:border-red-900 dark:[&>svg]:text-red-900\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tvariant: \"default\",\n\t\t},\n\t},\n);\n\nconst Alert = React.forwardRef<\n\tHTMLDivElement,\n\tReact.HTMLAttributes<HTMLDivElement> & VariantProps<typeof alertVariants>\n>(({ className, variant, ...props }, ref) => (\n\t<div\n\t\tref={ref}\n\t\trole=\"alert\"\n\t\tclassName={cn(alertVariants({ variant }), className)}\n\t\t{...props}\n\t/>\n));\nAlert.displayName = \"Alert\";\n\nconst AlertTitle = React.forwardRef<\n\tHTMLParagraphElement,\n\tReact.HTMLAttributes<HTMLHeadingElement>\n>(({ className, ...props }, ref) => (\n\t<h5\n\t\tref={ref}\n\t\tclassName={cn(\"mb-1 font-medium leading-none tracking-tight\", className)}\n\t\t{...props}\n\t/>\n));\nAlertTitle.displayName = \"AlertTitle\";\n\nconst AlertDescription = React.forwardRef<\n\tHTMLParagraphElement,\n\tReact.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => (\n\t<div\n\t\tref={ref}\n\t\tclassName={cn(\"text-sm [&_p]:leading-relaxed\", className)}\n\t\t{...props}\n\t/>\n));\nAlertDescription.displayName = \"AlertDescription\";\n\nexport { Alert, AlertTitle, AlertDescription };\n"
  },
  {
    "path": "cofounder/dashboard/src/components/ui/aspect-ratio.tsx",
    "content": "import * as AspectRatioPrimitive from \"@radix-ui/react-aspect-ratio\";\n\nconst AspectRatio = AspectRatioPrimitive.Root;\n\nexport { AspectRatio };\n"
  },
  {
    "path": "cofounder/dashboard/src/components/ui/avatar.tsx",
    "content": "import * as React from \"react\";\nimport * as AvatarPrimitive from \"@radix-ui/react-avatar\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst Avatar = React.forwardRef<\n\tReact.ElementRef<typeof AvatarPrimitive.Root>,\n\tReact.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>\n>(({ className, ...props }, ref) => (\n\t<AvatarPrimitive.Root\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nAvatar.displayName = AvatarPrimitive.Root.displayName;\n\nconst AvatarImage = React.forwardRef<\n\tReact.ElementRef<typeof AvatarPrimitive.Image>,\n\tReact.ComponentPropsWithoutRef<typeof AvatarPrimitive.Image>\n>(({ className, ...props }, ref) => (\n\t<AvatarPrimitive.Image\n\t\tref={ref}\n\t\tclassName={cn(\"aspect-square h-full w-full\", className)}\n\t\t{...props}\n\t/>\n));\nAvatarImage.displayName = AvatarPrimitive.Image.displayName;\n\nconst AvatarFallback = React.forwardRef<\n\tReact.ElementRef<typeof AvatarPrimitive.Fallback>,\n\tReact.ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback>\n>(({ className, ...props }, ref) => (\n\t<AvatarPrimitive.Fallback\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"flex h-full w-full items-center justify-center rounded-full bg-neutral-100 dark:bg-neutral-800\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nAvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;\n\nexport { Avatar, AvatarImage, AvatarFallback };\n"
  },
  {
    "path": "cofounder/dashboard/src/components/ui/badge.tsx",
    "content": "import * as React from \"react\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst badgeVariants = cva(\n\t\"inline-flex items-center rounded-full border border-neutral-200 px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-neutral-950 focus:ring-offset-2 dark:border-neutral-800 dark:focus:ring-neutral-300\",\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tdefault:\n\t\t\t\t\t\"border-transparent bg-neutral-900 text-neutral-50 hover:bg-neutral-900/80 dark:bg-neutral-50 dark:text-neutral-900 dark:hover:bg-neutral-50/80\",\n\t\t\t\tsecondary:\n\t\t\t\t\t\"border-transparent bg-neutral-100 text-neutral-900 hover:bg-neutral-100/80 dark:bg-neutral-800 dark:text-neutral-50 dark:hover:bg-neutral-800/80\",\n\t\t\t\tdestructive:\n\t\t\t\t\t\"border-transparent bg-red-500 text-neutral-50 hover:bg-red-500/80 dark:bg-red-900 dark:text-neutral-50 dark:hover:bg-red-900/80\",\n\t\t\t\toutline: \"text-neutral-950 dark:text-neutral-50\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tvariant: \"default\",\n\t\t},\n\t},\n);\n\nexport interface BadgeProps\n\textends React.HTMLAttributes<HTMLDivElement>,\n\t\tVariantProps<typeof badgeVariants> {}\n\nfunction Badge({ className, variant, ...props }: BadgeProps) {\n\treturn (\n\t\t<div className={cn(badgeVariants({ variant }), className)} {...props} />\n\t);\n}\n\nexport { Badge, badgeVariants };\n"
  },
  {
    "path": "cofounder/dashboard/src/components/ui/breadcrumb.tsx",
    "content": "import * as React from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { ChevronRight, MoreHorizontal } from \"lucide-react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst Breadcrumb = React.forwardRef<\n\tHTMLElement,\n\tReact.ComponentPropsWithoutRef<\"nav\"> & {\n\t\tseparator?: React.ReactNode;\n\t}\n>(({ ...props }, ref) => <nav ref={ref} aria-label=\"breadcrumb\" {...props} />);\nBreadcrumb.displayName = \"Breadcrumb\";\n\nconst BreadcrumbList = React.forwardRef<\n\tHTMLOListElement,\n\tReact.ComponentPropsWithoutRef<\"ol\">\n>(({ className, ...props }, ref) => (\n\t<ol\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"flex flex-wrap items-center gap-1.5 break-words text-sm text-neutral-500 sm:gap-2.5 dark:text-neutral-400\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nBreadcrumbList.displayName = \"BreadcrumbList\";\n\nconst BreadcrumbItem = React.forwardRef<\n\tHTMLLIElement,\n\tReact.ComponentPropsWithoutRef<\"li\">\n>(({ className, ...props }, ref) => (\n\t<li\n\t\tref={ref}\n\t\tclassName={cn(\"inline-flex items-center gap-1.5\", className)}\n\t\t{...props}\n\t/>\n));\nBreadcrumbItem.displayName = \"BreadcrumbItem\";\n\nconst BreadcrumbLink = React.forwardRef<\n\tHTMLAnchorElement,\n\tReact.ComponentPropsWithoutRef<\"a\"> & {\n\t\tasChild?: boolean;\n\t}\n>(({ asChild, className, ...props }, ref) => {\n\tconst Comp = asChild ? Slot : \"a\";\n\n\treturn (\n\t\t<Comp\n\t\t\tref={ref}\n\t\t\tclassName={cn(\n\t\t\t\t\"transition-colors hover:text-neutral-950 dark:hover:text-neutral-50\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\nBreadcrumbLink.displayName = \"BreadcrumbLink\";\n\nconst BreadcrumbPage = React.forwardRef<\n\tHTMLSpanElement,\n\tReact.ComponentPropsWithoutRef<\"span\">\n>(({ className, ...props }, ref) => (\n\t<span\n\t\tref={ref}\n\t\trole=\"link\"\n\t\taria-disabled=\"true\"\n\t\taria-current=\"page\"\n\t\tclassName={cn(\"font-normal text-neutral-950 dark:text-neutral-50\", className)}\n\t\t{...props}\n\t/>\n));\nBreadcrumbPage.displayName = \"BreadcrumbPage\";\n\nconst BreadcrumbSeparator = ({\n\tchildren,\n\tclassName,\n\t...props\n}: React.ComponentProps<\"li\">) => (\n\t<li\n\t\trole=\"presentation\"\n\t\taria-hidden=\"true\"\n\t\tclassName={cn(\"[&>svg]:size-3.5\", className)}\n\t\t{...props}\n\t>\n\t\t{children ?? <ChevronRight />}\n\t</li>\n);\nBreadcrumbSeparator.displayName = \"BreadcrumbSeparator\";\n\nconst BreadcrumbEllipsis = ({\n\tclassName,\n\t...props\n}: React.ComponentProps<\"span\">) => (\n\t<span\n\t\trole=\"presentation\"\n\t\taria-hidden=\"true\"\n\t\tclassName={cn(\"flex h-9 w-9 items-center justify-center\", className)}\n\t\t{...props}\n\t>\n\t\t<MoreHorizontal className=\"h-4 w-4\" />\n\t\t<span className=\"sr-only\">More</span>\n\t</span>\n);\nBreadcrumbEllipsis.displayName = \"BreadcrumbElipssis\";\n\nexport {\n\tBreadcrumb,\n\tBreadcrumbList,\n\tBreadcrumbItem,\n\tBreadcrumbLink,\n\tBreadcrumbPage,\n\tBreadcrumbSeparator,\n\tBreadcrumbEllipsis,\n};\n"
  },
  {
    "path": "cofounder/dashboard/src/components/ui/button.tsx",
    "content": "import * as React from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst buttonVariants = cva(\n\t\"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-white transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-neutral-950 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 dark:ring-offset-neutral-950 dark:focus-visible:ring-neutral-300\",\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tdefault:\n\t\t\t\t\t\"bg-neutral-900 text-neutral-50 hover:bg-neutral-900/90 dark:bg-neutral-50 dark:text-neutral-900 dark:hover:bg-neutral-50/90\",\n\t\t\t\tdestructive:\n\t\t\t\t\t\"bg-red-500 text-neutral-50 hover:bg-red-500/90 dark:bg-red-900 dark:text-neutral-50 dark:hover:bg-red-900/90\",\n\t\t\t\toutline:\n\t\t\t\t\t\"border border-neutral-200 bg-white hover:bg-neutral-100 hover:text-neutral-900 dark:border-neutral-800 dark:bg-neutral-950 dark:hover:bg-neutral-800 dark:hover:text-neutral-50\",\n\t\t\t\tsecondary:\n\t\t\t\t\t\"bg-neutral-100 text-neutral-900 hover:bg-neutral-100/80 dark:bg-neutral-800 dark:text-neutral-50 dark:hover:bg-neutral-800/80\",\n\t\t\t\tghost:\n\t\t\t\t\t\"hover:bg-neutral-100 hover:text-neutral-900 dark:hover:bg-neutral-800 dark:hover:text-neutral-50\",\n\t\t\t\tlink:\n\t\t\t\t\t\"text-neutral-900 underline-offset-4 hover:underline dark:text-neutral-50\",\n\t\t\t},\n\t\t\tsize: {\n\t\t\t\tdefault: \"h-10 px-4 py-2\",\n\t\t\t\tsm: \"h-9 rounded-md px-3\",\n\t\t\t\tlg: \"h-11 rounded-md px-8\",\n\t\t\t\ticon: \"h-10 w-10\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tvariant: \"default\",\n\t\t\tsize: \"default\",\n\t\t},\n\t},\n);\n\nexport interface ButtonProps\n\textends React.ButtonHTMLAttributes<HTMLButtonElement>,\n\t\tVariantProps<typeof buttonVariants> {\n\tasChild?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n\t({ className, variant, size, asChild = false, ...props }, ref) => {\n\t\tconst Comp = asChild ? Slot : \"button\";\n\t\treturn (\n\t\t\t<Comp\n\t\t\t\tclassName={cn(buttonVariants({ variant, size, className }))}\n\t\t\t\tref={ref}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t},\n);\nButton.displayName = \"Button\";\n\nexport { Button, buttonVariants };\n"
  },
  {
    "path": "cofounder/dashboard/src/components/ui/calendar.tsx",
    "content": "import * as React from \"react\";\nimport { ChevronLeft, ChevronRight } from \"lucide-react\";\nimport { DayPicker } from \"react-day-picker\";\n\nimport { cn } from \"@/lib/utils\";\nimport { buttonVariants } from \"@/components/ui/button\";\n\nexport type CalendarProps = React.ComponentProps<typeof DayPicker>;\n\nfunction Calendar({\n\tclassName,\n\tclassNames,\n\tshowOutsideDays = true,\n\t...props\n}: CalendarProps) {\n\treturn (\n\t\t<DayPicker\n\t\t\tshowOutsideDays={showOutsideDays}\n\t\t\tclassName={cn(\"p-3\", className)}\n\t\t\tclassNames={{\n\t\t\t\tmonths: \"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0\",\n\t\t\t\tmonth: \"space-y-4\",\n\t\t\t\tcaption: \"flex justify-center pt-1 relative items-center\",\n\t\t\t\tcaption_label: \"text-sm font-medium\",\n\t\t\t\tnav: \"space-x-1 flex items-center\",\n\t\t\t\tnav_button: cn(\n\t\t\t\t\tbuttonVariants({ variant: \"outline\" }),\n\t\t\t\t\t\"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100\",\n\t\t\t\t),\n\t\t\t\tnav_button_previous: \"absolute left-1\",\n\t\t\t\tnav_button_next: \"absolute right-1\",\n\t\t\t\ttable: \"w-full border-collapse space-y-1\",\n\t\t\t\thead_row: \"flex\",\n\t\t\t\thead_cell:\n\t\t\t\t\t\"text-neutral-500 rounded-md w-9 font-normal text-[0.8rem] dark:text-neutral-400\",\n\t\t\t\trow: \"flex w-full mt-2\",\n\t\t\t\tcell:\n\t\t\t\t\t\"h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-neutral-100/50 [&:has([aria-selected])]:bg-neutral-100 first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20 dark:[&:has([aria-selected].day-outside)]:bg-neutral-800/50 dark:[&:has([aria-selected])]:bg-neutral-800\",\n\t\t\t\tday: cn(\n\t\t\t\t\tbuttonVariants({ variant: \"ghost\" }),\n\t\t\t\t\t\"h-9 w-9 p-0 font-normal aria-selected:opacity-100\",\n\t\t\t\t),\n\t\t\t\tday_range_end: \"day-range-end\",\n\t\t\t\tday_selected:\n\t\t\t\t\t\"bg-neutral-900 text-neutral-50 hover:bg-neutral-900 hover:text-neutral-50 focus:bg-neutral-900 focus:text-neutral-50 dark:bg-neutral-50 dark:text-neutral-900 dark:hover:bg-neutral-50 dark:hover:text-neutral-900 dark:focus:bg-neutral-50 dark:focus:text-neutral-900\",\n\t\t\t\tday_today:\n\t\t\t\t\t\"bg-neutral-100 text-neutral-900 dark:bg-neutral-800 dark:text-neutral-50\",\n\t\t\t\tday_outside:\n\t\t\t\t\t\"day-outside text-neutral-500 opacity-50 aria-selected:bg-neutral-100/50 aria-selected:text-neutral-500 aria-selected:opacity-30 dark:text-neutral-400 dark:aria-selected:bg-neutral-800/50 dark:aria-selected:text-neutral-400\",\n\t\t\t\tday_disabled: \"text-neutral-500 opacity-50 dark:text-neutral-400\",\n\t\t\t\tday_range_middle:\n\t\t\t\t\t\"aria-selected:bg-neutral-100 aria-selected:text-neutral-900 dark:aria-selected:bg-neutral-800 dark:aria-selected:text-neutral-50\",\n\t\t\t\tday_hidden: \"invisible\",\n\t\t\t\t...classNames,\n\t\t\t}}\n\t\t\tcomponents={{\n\t\t\t\tIconLeft: ({ ...props }) => <ChevronLeft className=\"h-4 w-4\" />,\n\t\t\t\tIconRight: ({ ...props }) => <ChevronRight className=\"h-4 w-4\" />,\n\t\t\t}}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\nCalendar.displayName = \"Calendar\";\n\nexport { Calendar };\n"
  },
  {
    "path": "cofounder/dashboard/src/components/ui/card.tsx",
    "content": "import * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst Card = React.forwardRef<\n\tHTMLDivElement,\n\tReact.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n\t<div\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"rounded-lg border border-neutral-200 bg-white text-neutral-950 shadow-sm dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nCard.displayName = \"Card\";\n\nconst CardHeader = React.forwardRef<\n\tHTMLDivElement,\n\tReact.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n\t<div\n\t\tref={ref}\n\t\tclassName={cn(\"flex flex-col space-y-1.5 p-6\", className)}\n\t\t{...props}\n\t/>\n));\nCardHeader.displayName = \"CardHeader\";\n\nconst CardTitle = React.forwardRef<\n\tHTMLParagraphElement,\n\tReact.HTMLAttributes<HTMLHeadingElement>\n>(({ className, ...props }, ref) => (\n\t<h3\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"text-2xl font-semibold leading-none tracking-tight\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nCardTitle.displayName = \"CardTitle\";\n\nconst CardDescription = React.forwardRef<\n\tHTMLParagraphElement,\n\tReact.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => (\n\t<p\n\t\tref={ref}\n\t\tclassName={cn(\"text-sm text-neutral-500 dark:text-neutral-400\", className)}\n\t\t{...props}\n\t/>\n));\nCardDescription.displayName = \"CardDescription\";\n\nconst CardContent = React.forwardRef<\n\tHTMLDivElement,\n\tReact.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n\t<div ref={ref} className={cn(\"p-6 pt-0\", className)} {...props} />\n));\nCardContent.displayName = \"CardContent\";\n\nconst CardFooter = React.forwardRef<\n\tHTMLDivElement,\n\tReact.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n\t<div\n\t\tref={ref}\n\t\tclassName={cn(\"flex items-center p-6 pt-0\", className)}\n\t\t{...props}\n\t/>\n));\nCardFooter.displayName = \"CardFooter\";\n\nexport {\n\tCard,\n\tCardHeader,\n\tCardFooter,\n\tCardTitle,\n\tCardDescription,\n\tCardContent,\n};\n"
  },
  {
    "path": "cofounder/dashboard/src/components/ui/carousel.tsx",
    "content": "import * as React from \"react\";\nimport useEmblaCarousel, {\n\ttype UseEmblaCarouselType,\n} from \"embla-carousel-react\";\nimport { ArrowLeft, ArrowRight } from \"lucide-react\";\n\nimport { cn } from \"@/lib/utils\";\nimport { Button } from \"@/components/ui/button\";\n\ntype CarouselApi = UseEmblaCarouselType[1];\ntype UseCarouselParameters = Parameters<typeof useEmblaCarousel>;\ntype CarouselOptions = UseCarouselParameters[0];\ntype CarouselPlugin = UseCarouselParameters[1];\n\ntype CarouselProps = {\n\topts?: CarouselOptions;\n\tplugins?: CarouselPlugin;\n\torientation?: \"horizontal\" | \"vertical\";\n\tsetApi?: (api: CarouselApi) => void;\n};\n\ntype CarouselContextProps = {\n\tcarouselRef: ReturnType<typeof useEmblaCarousel>[0];\n\tapi: ReturnType<typeof useEmblaCarousel>[1];\n\tscrollPrev: () => void;\n\tscrollNext: () => void;\n\tcanScrollPrev: boolean;\n\tcanScrollNext: boolean;\n} & CarouselProps;\n\nconst CarouselContext = React.createContext<CarouselContextProps | null>(null);\n\nfunction useCarousel() {\n\tconst context = React.useContext(CarouselContext);\n\n\tif (!context) {\n\t\tthrow new Error(\"useCarousel must be used within a <Carousel />\");\n\t}\n\n\treturn context;\n}\n\nconst Carousel = React.forwardRef<\n\tHTMLDivElement,\n\tReact.HTMLAttributes<HTMLDivElement> & CarouselProps\n>(\n\t(\n\t\t{\n\t\t\torientation = \"horizontal\",\n\t\t\topts,\n\t\t\tsetApi,\n\t\t\tplugins,\n\t\t\tclassName,\n\t\t\tchildren,\n\t\t\t...props\n\t\t},\n\t\tref,\n\t) => {\n\t\tconst [carouselRef, api] = useEmblaCarousel(\n\t\t\t{\n\t\t\t\t...opts,\n\t\t\t\taxis: orientation === \"horizontal\" ? \"x\" : \"y\",\n\t\t\t},\n\t\t\tplugins,\n\t\t);\n\t\tconst [canScrollPrev, setCanScrollPrev] = React.useState(false);\n\t\tconst [canScrollNext, setCanScrollNext] = React.useState(false);\n\n\t\tconst onSelect = React.useCallback((api: CarouselApi) => {\n\t\t\tif (!api) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tsetCanScrollPrev(api.canScrollPrev());\n\t\t\tsetCanScrollNext(api.canScrollNext());\n\t\t}, []);\n\n\t\tconst scrollPrev = React.useCallback(() => {\n\t\t\tapi?.scrollPrev();\n\t\t}, [api]);\n\n\t\tconst scrollNext = React.useCallback(() => {\n\t\t\tapi?.scrollNext();\n\t\t}, [api]);\n\n\t\tconst handleKeyDown = React.useCallback(\n\t\t\t(event: React.KeyboardEvent<HTMLDivElement>) => {\n\t\t\t\tif (event.key === \"ArrowLeft\") {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tscrollPrev();\n\t\t\t\t} else if (event.key === \"ArrowRight\") {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tscrollNext();\n\t\t\t\t}\n\t\t\t},\n\t\t\t[scrollPrev, scrollNext],\n\t\t);\n\n\t\tReact.useEffect(() => {\n\t\t\tif (!api || !setApi) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tsetApi(api);\n\t\t}, [api, setApi]);\n\n\t\tReact.useEffect(() => {\n\t\t\tif (!api) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tonSelect(api);\n\t\t\tapi.on(\"reInit\", onSelect);\n\t\t\tapi.on(\"select\", onSelect);\n\n\t\t\treturn () => {\n\t\t\t\tapi?.off(\"select\", onSelect);\n\t\t\t};\n\t\t}, [api, onSelect]);\n\n\t\treturn (\n\t\t\t<CarouselContext.Provider\n\t\t\t\tvalue={{\n\t\t\t\t\tcarouselRef,\n\t\t\t\t\tapi: api,\n\t\t\t\t\topts,\n\t\t\t\t\torientation:\n\t\t\t\t\t\torientation || (opts?.axis === \"y\" ? \"vertical\" : \"horizontal\"),\n\t\t\t\t\tscrollPrev,\n\t\t\t\t\tscrollNext,\n\t\t\t\t\tcanScrollPrev,\n\t\t\t\t\tcanScrollNext,\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t<div\n\t\t\t\t\tref={ref}\n\t\t\t\t\tonKeyDownCapture={handleKeyDown}\n\t\t\t\t\tclassName={cn(\"relative\", className)}\n\t\t\t\t\trole=\"region\"\n\t\t\t\t\taria-roledescription=\"carousel\"\n\t\t\t\t\t{...props}\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</div>\n\t\t\t</CarouselContext.Provider>\n\t\t);\n\t},\n);\nCarousel.displayName = \"Carousel\";\n\nconst CarouselContent = React.forwardRef<\n\tHTMLDivElement,\n\tReact.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => {\n\tconst { carouselRef, orientation } = useCarousel();\n\n\treturn (\n\t\t<div ref={carouselRef} className=\"overflow-hidden\">\n\t\t\t<div\n\t\t\t\tref={ref}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"flex\",\n\t\t\t\t\torientation === \"horizontal\" ? \"-ml-4\" : \"-mt-4 flex-col\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t</div>\n\t);\n});\nCarouselContent.displayName = \"CarouselContent\";\n\nconst CarouselItem = React.forwardRef<\n\tHTMLDivElement,\n\tReact.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => {\n\tconst { orientation } = useCarousel();\n\n\treturn (\n\t\t<div\n\t\t\tref={ref}\n\t\t\trole=\"group\"\n\t\t\taria-roledescription=\"slide\"\n\t\t\tclassName={cn(\n\t\t\t\t\"min-w-0 shrink-0 grow-0 basis-full\",\n\t\t\t\torientation === \"horizontal\" ? \"pl-4\" : \"pt-4\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\nCarouselItem.displayName = \"CarouselItem\";\n\nconst CarouselPrevious = React.forwardRef<\n\tHTMLButtonElement,\n\tReact.ComponentProps<typeof Button>\n>(({ className, variant = \"outline\", size = \"icon\", ...props }, ref) => {\n\tconst { orientation, scrollPrev, canScrollPrev } = useCarousel();\n\n\treturn (\n\t\t<Button\n\t\t\tref={ref}\n\t\t\tvariant={variant}\n\t\t\tsize={size}\n\t\t\tclassName={cn(\n\t\t\t\t\"absolute  h-8 w-8 rounded-full\",\n\t\t\t\torientation === \"horizontal\"\n\t\t\t\t\t? \"-left-12 top-1/2 -translate-y-1/2\"\n\t\t\t\t\t: \"-top-12 left-1/2 -translate-x-1/2 rotate-90\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tdisabled={!canScrollPrev}\n\t\t\tonClick={scrollPrev}\n\t\t\t{...props}\n\t\t>\n\t\t\t<ArrowLeft className=\"h-4 w-4\" />\n\t\t\t<span className=\"sr-only\">Previous slide</span>\n\t\t</Button>\n\t);\n});\nCarouselPrevious.displayName = \"CarouselPrevious\";\n\nconst CarouselNext = React.forwardRef<\n\tHTMLButtonElement,\n\tReact.ComponentProps<typeof Button>\n>(({ className, variant = \"outline\", size = \"icon\", ...props }, ref) => {\n\tconst { orientation, scrollNext, canScrollNext } = useCarousel();\n\n\treturn (\n\t\t<Button\n\t\t\tref={ref}\n\t\t\tvariant={variant}\n\t\t\tsize={size}\n\t\t\tclassName={cn(\n\t\t\t\t\"absolute h-8 w-8 rounded-full\",\n\t\t\t\torientation === \"horizontal\"\n\t\t\t\t\t? \"-right-12 top-1/2 -translate-y-1/2\"\n\t\t\t\t\t: \"-bottom-12 left-1/2 -translate-x-1/2 rotate-90\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tdisabled={!canScrollNext}\n\t\t\tonClick={scrollNext}\n\t\t\t{...props}\n\t\t>\n\t\t\t<ArrowRight className=\"h-4 w-4\" />\n\t\t\t<span className=\"sr-only\">Next slide</span>\n\t\t</Button>\n\t);\n});\nCarouselNext.displayName = \"CarouselNext\";\n\nexport {\n\ttype CarouselApi,\n\tCarousel,\n\tCarouselContent,\n\tCarouselItem,\n\tCarouselPrevious,\n\tCarouselNext,\n};\n"
  },
  {
    "path": "cofounder/dashboard/src/components/ui/chart.tsx",
    "content": "import * as React from \"react\";\nimport * as RechartsPrimitive from \"recharts\";\n\nimport { cn } from \"@/lib/utils\";\n\n// Format: { THEME_NAME: CSS_SELECTOR }\nconst THEMES = { light: \"\", dark: \".dark\" } as const;\n\nexport type ChartConfig = {\n\t[k in string]: {\n\t\tlabel?: React.ReactNode;\n\t\ticon?: React.ComponentType;\n\t} & (\n\t\t| { color?: string; theme?: never }\n\t\t| { color?: never; theme: Record<keyof typeof THEMES, string> }\n\t);\n};\n\ntype ChartContextProps = {\n\tconfig: ChartConfig;\n};\n\nconst ChartContext = React.createContext<ChartContextProps | null>(null);\n\nfunction useChart() {\n\tconst context = React.useContext(ChartContext);\n\n\tif (!context) {\n\t\tthrow new Error(\"useChart must be used within a <ChartContainer />\");\n\t}\n\n\treturn context;\n}\n\nconst ChartContainer = React.forwardRef<\n\tHTMLDivElement,\n\tReact.ComponentProps<\"div\"> & {\n\t\tconfig: ChartConfig;\n\t\tchildren: React.ComponentProps<\n\t\t\ttypeof RechartsPrimitive.ResponsiveContainer\n\t\t>[\"children\"];\n\t}\n>(({ id, className, children, config, ...props }, ref) => {\n\tconst uniqueId = React.useId();\n\tconst chartId = `chart-${id || uniqueId.replace(/:/g, \"\")}`;\n\n\treturn (\n\t\t<ChartContext.Provider value={{ config }}>\n\t\t\t<div\n\t\t\t\tdata-chart={chartId}\n\t\t\t\tref={ref}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t<ChartStyle id={chartId} config={config} />\n\t\t\t\t<RechartsPrimitive.ResponsiveContainer>\n\t\t\t\t\t{children}\n\t\t\t\t</RechartsPrimitive.ResponsiveContainer>\n\t\t\t</div>\n\t\t</ChartContext.Provider>\n\t);\n});\nChartContainer.displayName = \"Chart\";\n\nconst ChartStyle = ({ id, config }: { id: string; config: ChartConfig }) => {\n\tconst colorConfig = Object.entries(config).filter(\n\t\t([_, config]) => config.theme || config.color,\n\t);\n\n\tif (!colorConfig.length) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<style\n\t\t\tdangerouslySetInnerHTML={{\n\t\t\t\t__html: Object.entries(THEMES)\n\t\t\t\t\t.map(\n\t\t\t\t\t\t([theme, prefix]) => `\n${prefix} [data-chart=${id}] {\n${colorConfig\n\t.map(([key, itemConfig]) => {\n\t\tconst color =\n\t\t\titemConfig.theme?.[theme as keyof typeof itemConfig.theme] ||\n\t\t\titemConfig.color;\n\t\treturn color ? `  --color-${key}: ${color};` : null;\n\t})\n\t.join(\"\\n\")}\n}\n`,\n\t\t\t\t\t)\n\t\t\t\t\t.join(\"\\n\"),\n\t\t\t}}\n\t\t/>\n\t);\n};\n\nconst ChartTooltip = RechartsPrimitive.Tooltip;\n\nconst ChartTooltipContent = React.forwardRef<\n\tHTMLDivElement,\n\tReact.ComponentProps<typeof RechartsPrimitive.Tooltip> &\n\t\tReact.ComponentProps<\"div\"> & {\n\t\t\thideLabel?: boolean;\n\t\t\thideIndicator?: boolean;\n\t\t\tindicator?: \"line\" | \"dot\" | \"dashed\";\n\t\t\tnameKey?: string;\n\t\t\tlabelKey?: string;\n\t\t}\n>(\n\t(\n\t\t{\n\t\t\tactive,\n\t\t\tpayload,\n\t\t\tclassName,\n\t\t\tindicator = \"dot\",\n\t\t\thideLabel = false,\n\t\t\thideIndicator = false,\n\t\t\tlabel,\n\t\t\tlabelFormatter,\n\t\t\tlabelClassName,\n\t\t\tformatter,\n\t\t\tcolor,\n\t\t\tnameKey,\n\t\t\tlabelKey,\n\t\t},\n\t\tref,\n\t) => {\n\t\tconst { config } = useChart();\n\n\t\tconst tooltipLabel = React.useMemo(() => {\n\t\t\tif (hideLabel || !payload?.length) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tconst [item] = payload;\n\t\t\tconst key = `${labelKey || item.dataKey || item.name || \"value\"}`;\n\t\t\tconst itemConfig = getPayloadConfigFromPayload(config, item, key);\n\t\t\tconst value =\n\t\t\t\t!labelKey && typeof label === \"string\"\n\t\t\t\t\t? config[label as keyof typeof config]?.label || label\n\t\t\t\t\t: itemConfig?.label;\n\n\t\t\tif (labelFormatter) {\n\t\t\t\treturn (\n\t\t\t\t\t<div className={cn(\"font-medium\", labelClassName)}>\n\t\t\t\t\t\t{labelFormatter(value, payload)}\n\t\t\t\t\t</div>\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (!value) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\treturn <div className={cn(\"font-medium\", labelClassName)}>{value}</div>;\n\t\t}, [\n\t\t\tlabel,\n\t\t\tlabelFormatter,\n\t\t\tpayload,\n\t\t\thideLabel,\n\t\t\tlabelClassName,\n\t\t\tconfig,\n\t\t\tlabelKey,\n\t\t]);\n\n\t\tif (!active || !payload?.length) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst nestLabel = payload.length === 1 && indicator !== \"dot\";\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tref={ref}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-neutral-200 border-neutral-200/50 bg-white px-2.5 py-1.5 text-xs shadow-xl dark:border-neutral-800 dark:border-neutral-800/50 dark:bg-neutral-950\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t{!nestLabel ? tooltipLabel : null}\n\t\t\t\t<div className=\"grid gap-1.5\">\n\t\t\t\t\t{payload.map((item, index) => {\n\t\t\t\t\t\tconst key = `${nameKey || item.name || item.dataKey || \"value\"}`;\n\t\t\t\t\t\tconst itemConfig = getPayloadConfigFromPayload(config, item, key);\n\t\t\t\t\t\tconst indicatorColor = color || item.payload.fill || item.color;\n\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tkey={item.dataKey}\n\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\"flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-neutral-500 dark:[&>svg]:text-neutral-400\",\n\t\t\t\t\t\t\t\t\tindicator === \"dot\" && \"items-center\",\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{formatter && item?.value !== undefined && item.name ? (\n\t\t\t\t\t\t\t\t\tformatter(item.value, item.name, item, index, item.payload)\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t{itemConfig?.icon ? (\n\t\t\t\t\t\t\t\t\t\t\t<itemConfig.icon />\n\t\t\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t\t\t!hideIndicator && (\n\t\t\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"h-2.5 w-2.5\": indicator === \"dot\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"w-1\": indicator === \"line\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"w-0 border-[1.5px] border-dashed bg-transparent\":\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tindicator === \"dashed\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"my-0.5\": nestLabel && indicator === \"dashed\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\tstyle={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"--color-bg\": indicatorColor,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"--color-border\": indicatorColor,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t} as React.CSSProperties\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\t\t\"flex flex-1 justify-between leading-none\",\n\t\t\t\t\t\t\t\t\t\t\t\tnestLabel ? \"items-end\" : \"items-center\",\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"grid gap-1.5\">\n\t\t\t\t\t\t\t\t\t\t\t\t{nestLabel ? tooltipLabel : null}\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"text-neutral-500 dark:text-neutral-400\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t{itemConfig?.label || item.name}\n\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t{item.value && (\n\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"font-mono font-medium tabular-nums text-neutral-950 dark:text-neutral-50\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t{item.value.toLocaleString()}\n\t\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t);\n\t\t\t\t\t})}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t},\n);\nChartTooltipContent.displayName = \"ChartTooltip\";\n\nconst ChartLegend = RechartsPrimitive.Legend;\n\nconst ChartLegendContent = React.forwardRef<\n\tHTMLDivElement,\n\tReact.ComponentProps<\"div\"> &\n\t\tPick<RechartsPrimitive.LegendProps, \"payload\" | \"verticalAlign\"> & {\n\t\t\thideIcon?: boolean;\n\t\t\tnameKey?: string;\n\t\t}\n>(\n\t(\n\t\t{ className, hideIcon = false, payload, verticalAlign = \"bottom\", nameKey },\n\t\tref,\n\t) => {\n\t\tconst { config } = useChart();\n\n\t\tif (!payload?.length) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tref={ref}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"flex items-center justify-center gap-4\",\n\t\t\t\t\tverticalAlign === \"top\" ? \"pb-3\" : \"pt-3\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t{payload.map((item) => {\n\t\t\t\t\tconst key = `${nameKey || item.dataKey || \"value\"}`;\n\t\t\t\t\tconst itemConfig = getPayloadConfigFromPayload(config, item, key);\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tkey={item.value}\n\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\"flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-neutral-500 dark:[&>svg]:text-neutral-400\",\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{itemConfig?.icon && !hideIcon ? (\n\t\t\t\t\t\t\t\t<itemConfig.icon />\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\tclassName=\"h-2 w-2 shrink-0 rounded-[2px]\"\n\t\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\t\tbackgroundColor: item.color,\n\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t{itemConfig?.label}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t);\n\t\t\t\t})}\n\t\t\t</div>\n\t\t);\n\t},\n);\nChartLegendContent.displayName = \"ChartLegend\";\n\n// Helper to extract item config from a payload.\nfunction getPayloadConfigFromPayload(\n\tconfig: ChartConfig,\n\tpayload: unknown,\n\tkey: string,\n) {\n\tif (typeof payload !== \"object\" || payload === null) {\n\t\treturn undefined;\n\t}\n\n\tconst payloadPayload =\n\t\t\"payload\" in payload &&\n\t\ttypeof payload.payload === \"object\" &&\n\t\tpayload.payload !== null\n\t\t\t? payload.payload\n\t\t\t: undefined;\n\n\tlet configLabelKey: string = key;\n\n\tif (\n\t\tkey in payload &&\n\t\ttypeof payload[key as keyof typeof payload] === \"string\"\n\t) {\n\t\tconfigLabelKey = payload[key as keyof typeof payload] as string;\n\t} else if (\n\t\tpayloadPayload &&\n\t\tkey in payloadPayload &&\n\t\ttypeof payloadPayload[key as keyof typeof payloadPayload] === \"string\"\n\t) {\n\t\tconfigLabelKey = payloadPayload[key as keyof typeof payloadPayload] as string;\n\t}\n\n\treturn configLabelKey in config\n\t\t? config[configLabelKey]\n\t\t: config[key as keyof typeof config];\n}\n\nexport {\n\tChartContainer,\n\tChartTooltip,\n\tChartTooltipContent,\n\tChartLegend,\n\tChartLegendContent,\n\tChartStyle,\n};\n"
  },
  {
    "path": "cofounder/dashboard/src/components/ui/checkbox.tsx",
    "content": "import * as React from \"react\";\nimport * as CheckboxPrimitive from \"@radix-ui/react-checkbox\";\nimport { Check } from \"lucide-react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst Checkbox = React.forwardRef<\n\tReact.ElementRef<typeof CheckboxPrimitive.Root>,\n\tReact.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>\n>(({ className, ...props }, ref) => (\n\t<CheckboxPrimitive.Root\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"peer h-4 w-4 shrink-0 rounded-sm border border-neutral-200 border-neutral-900 ring-offset-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-neutral-950 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-neutral-900 data-[state=checked]:text-neutral-50 dark:border-neutral-800 dark:border-neutral-50 dark:ring-offset-neutral-950 dark:focus-visible:ring-neutral-300 dark:data-[state=checked]:bg-neutral-50 dark:data-[state=checked]:text-neutral-900\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t>\n\t\t<CheckboxPrimitive.Indicator\n\t\t\tclassName={cn(\"flex items-center justify-center text-current\")}\n\t\t>\n\t\t\t<Check className=\"h-4 w-4\" />\n\t\t</CheckboxPrimitive.Indicator>\n\t</CheckboxPrimitive.Root>\n));\nCheckbox.displayName = CheckboxPrimitive.Root.displayName;\n\nexport { Checkbox };\n"
  },
  {
    "path": "cofounder/dashboard/src/components/ui/collapsible.tsx",
    "content": "import * as CollapsiblePrimitive from \"@radix-ui/react-collapsible\";\n\nconst Collapsible = CollapsiblePrimitive.Root;\n\nconst CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger;\n\nconst CollapsibleContent = CollapsiblePrimitive.CollapsibleContent;\n\nexport { Collapsible, CollapsibleTrigger, CollapsibleContent };\n"
  },
  {
    "path": "cofounder/dashboard/src/components/ui/command.tsx",
    "content": "import * as React from \"react\";\nimport { type DialogProps } from \"@radix-ui/react-dialog\";\nimport { Command as CommandPrimitive } from \"cmdk\";\nimport { Search } from \"lucide-react\";\n\nimport { cn } from \"@/lib/utils\";\nimport { Dialog, DialogContent } from \"@/components/ui/dialog\";\n\nconst Command = React.forwardRef<\n\tReact.ElementRef<typeof CommandPrimitive>,\n\tReact.ComponentPropsWithoutRef<typeof CommandPrimitive>\n>(({ className, ...props }, ref) => (\n\t<CommandPrimitive\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"flex h-full w-full flex-col overflow-hidden rounded-md bg-white text-neutral-950 dark:bg-neutral-950 dark:text-neutral-50\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nCommand.displayName = CommandPrimitive.displayName;\n\ninterface CommandDialogProps extends DialogProps {}\n\nconst CommandDialog = ({ children, ...props }: CommandDialogProps) => {\n\treturn (\n\t\t<Dialog {...props}>\n\t\t\t<DialogContent className=\"overflow-hidden p-0 shadow-lg\">\n\t\t\t\t<Command className=\"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-neutral-500 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5 dark:[&_[cmdk-group-heading]]:text-neutral-400\">\n\t\t\t\t\t{children}\n\t\t\t\t</Command>\n\t\t\t</DialogContent>\n\t\t</Dialog>\n\t);\n};\n\nconst CommandInput = React.forwardRef<\n\tReact.ElementRef<typeof CommandPrimitive.Input>,\n\tReact.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>\n>(({ className, ...props }, ref) => (\n\t<div className=\"flex items-center border-b px-3\" cmdk-input-wrapper=\"\">\n\t\t<Search className=\"mr-2 h-4 w-4 shrink-0 opacity-50\" />\n\t\t<CommandPrimitive.Input\n\t\t\tref={ref}\n\t\t\tclassName={cn(\n\t\t\t\t\"flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-neutral-500 disabled:cursor-not-allowed disabled:opacity-50 dark:placeholder:text-neutral-400\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t</div>\n));\n\nCommandInput.displayName = CommandPrimitive.Input.displayName;\n\nconst CommandList = React.forwardRef<\n\tReact.ElementRef<typeof CommandPrimitive.List>,\n\tReact.ComponentPropsWithoutRef<typeof CommandPrimitive.List>\n>(({ className, ...props }, ref) => (\n\t<CommandPrimitive.List\n\t\tref={ref}\n\t\tclassName={cn(\"max-h-[300px] overflow-y-auto overflow-x-hidden\", className)}\n\t\t{...props}\n\t/>\n));\n\nCommandList.displayName = CommandPrimitive.List.displayName;\n\nconst CommandEmpty = React.forwardRef<\n\tReact.ElementRef<typeof CommandPrimitive.Empty>,\n\tReact.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>\n>((props, ref) => (\n\t<CommandPrimitive.Empty\n\t\tref={ref}\n\t\tclassName=\"py-6 text-center text-sm\"\n\t\t{...props}\n\t/>\n));\n\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName;\n\nconst CommandGroup = React.forwardRef<\n\tReact.ElementRef<typeof CommandPrimitive.Group>,\n\tReact.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>\n>(({ className, ...props }, ref) => (\n\t<CommandPrimitive.Group\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"overflow-hidden p-1 text-neutral-950 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-neutral-500 dark:text-neutral-50 dark:[&_[cmdk-group-heading]]:text-neutral-400\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\n\nCommandGroup.displayName = CommandPrimitive.Group.displayName;\n\nconst CommandSeparator = React.forwardRef<\n\tReact.ElementRef<typeof CommandPrimitive.Separator>,\n\tReact.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n\t<CommandPrimitive.Separator\n\t\tref={ref}\n\t\tclassName={cn(\"-mx-1 h-px bg-neutral-200 dark:bg-neutral-800\", className)}\n\t\t{...props}\n\t/>\n));\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName;\n\nconst CommandItem = React.forwardRef<\n\tReact.ElementRef<typeof CommandPrimitive.Item>,\n\tReact.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>\n>(({ className, ...props }, ref) => (\n\t<CommandPrimitive.Item\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-neutral-100 data-[selected=true]:text-neutral-900 data-[disabled=true]:opacity-50 dark:data-[selected='true']:bg-neutral-800 dark:data-[selected=true]:text-neutral-50\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\n\nCommandItem.displayName = CommandPrimitive.Item.displayName;\n\nconst CommandShortcut = ({\n\tclassName,\n\t...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n\treturn (\n\t\t<span\n\t\t\tclassName={cn(\n\t\t\t\t\"ml-auto text-xs tracking-widest text-neutral-500 dark:text-neutral-400\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n};\nCommandShortcut.displayName = \"CommandShortcut\";\n\nexport {\n\tCommand,\n\tCommandDialog,\n\tCommandInput,\n\tCommandList,\n\tCommandEmpty,\n\tCommandGroup,\n\tCommandItem,\n\tCommandShortcut,\n\tCommandSeparator,\n};\n"
  },
  {
    "path": "cofounder/dashboard/src/components/ui/context-menu.tsx",
    "content": "import * as React from \"react\";\nimport * as ContextMenuPrimitive from \"@radix-ui/react-context-menu\";\nimport { Check, ChevronRight, Circle } from \"lucide-react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst ContextMenu = ContextMenuPrimitive.Root;\n\nconst ContextMenuTrigger = ContextMenuPrimitive.Trigger;\n\nconst ContextMenuGroup = ContextMenuPrimitive.Group;\n\nconst ContextMenuPortal = ContextMenuPrimitive.Portal;\n\nconst ContextMenuSub = ContextMenuPrimitive.Sub;\n\nconst ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;\n\nconst ContextMenuSubTrigger = React.forwardRef<\n\tReact.ElementRef<typeof ContextMenuPrimitive.SubTrigger>,\n\tReact.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubTrigger> & {\n\t\tinset?: boolean;\n\t}\n>(({ className, inset, children, ...props }, ref) => (\n\t<ContextMenuPrimitive.SubTrigger\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-neutral-100 focus:text-neutral-900 data-[state=open]:bg-neutral-100 data-[state=open]:text-neutral-900 dark:focus:bg-neutral-800 dark:focus:text-neutral-50 dark:data-[state=open]:bg-neutral-800 dark:data-[state=open]:text-neutral-50\",\n\t\t\tinset && \"pl-8\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t>\n\t\t{children}\n\t\t<ChevronRight className=\"ml-auto h-4 w-4\" />\n\t</ContextMenuPrimitive.SubTrigger>\n));\nContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;\n\nconst ContextMenuSubContent = React.forwardRef<\n\tReact.ElementRef<typeof ContextMenuPrimitive.SubContent>,\n\tReact.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n\t<ContextMenuPrimitive.SubContent\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"z-50 min-w-[8rem] overflow-hidden rounded-md border border-neutral-200 bg-white p-1 text-neutral-950 shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;\n\nconst ContextMenuContent = React.forwardRef<\n\tReact.ElementRef<typeof ContextMenuPrimitive.Content>,\n\tReact.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Content>\n>(({ className, ...props }, ref) => (\n\t<ContextMenuPrimitive.Portal>\n\t\t<ContextMenuPrimitive.Content\n\t\t\tref={ref}\n\t\t\tclassName={cn(\n\t\t\t\t\"z-50 min-w-[8rem] overflow-hidden rounded-md border border-neutral-200 bg-white p-1 text-neutral-950 shadow-md animate-in fade-in-80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t</ContextMenuPrimitive.Portal>\n));\nContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;\n\nconst ContextMenuItem = React.forwardRef<\n\tReact.ElementRef<typeof ContextMenuPrimitive.Item>,\n\tReact.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Item> & {\n\t\tinset?: boolean;\n\t}\n>(({ className, inset, ...props }, ref) => (\n\t<ContextMenuPrimitive.Item\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-neutral-100 focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50\",\n\t\t\tinset && \"pl-8\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;\n\nconst ContextMenuCheckboxItem = React.forwardRef<\n\tReact.ElementRef<typeof ContextMenuPrimitive.CheckboxItem>,\n\tReact.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n\t<ContextMenuPrimitive.CheckboxItem\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-neutral-100 focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50\",\n\t\t\tclassName,\n\t\t)}\n\t\tchecked={checked}\n\t\t{...props}\n\t>\n\t\t<span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n\t\t\t<ContextMenuPrimitive.ItemIndicator>\n\t\t\t\t<Check className=\"h-4 w-4\" />\n\t\t\t</ContextMenuPrimitive.ItemIndicator>\n\t\t</span>\n\t\t{children}\n\t</ContextMenuPrimitive.CheckboxItem>\n));\nContextMenuCheckboxItem.displayName =\n\tContextMenuPrimitive.CheckboxItem.displayName;\n\nconst ContextMenuRadioItem = React.forwardRef<\n\tReact.ElementRef<typeof ContextMenuPrimitive.RadioItem>,\n\tReact.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n\t<ContextMenuPrimitive.RadioItem\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-neutral-100 focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t>\n\t\t<span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n\t\t\t<ContextMenuPrimitive.ItemIndicator>\n\t\t\t\t<Circle className=\"h-2 w-2 fill-current\" />\n\t\t\t</ContextMenuPrimitive.ItemIndicator>\n\t\t</span>\n\t\t{children}\n\t</ContextMenuPrimitive.RadioItem>\n));\nContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName;\n\nconst ContextMenuLabel = React.forwardRef<\n\tReact.ElementRef<typeof ContextMenuPrimitive.Label>,\n\tReact.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Label> & {\n\t\tinset?: boolean;\n\t}\n>(({ className, inset, ...props }, ref) => (\n\t<ContextMenuPrimitive.Label\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"px-2 py-1.5 text-sm font-semibold text-neutral-950 dark:text-neutral-50\",\n\t\t\tinset && \"pl-8\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName;\n\nconst ContextMenuSeparator = React.forwardRef<\n\tReact.ElementRef<typeof ContextMenuPrimitive.Separator>,\n\tReact.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n\t<ContextMenuPrimitive.Separator\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"-mx-1 my-1 h-px bg-neutral-200 dark:bg-neutral-800\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName;\n\nconst ContextMenuShortcut = ({\n\tclassName,\n\t...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n\treturn (\n\t\t<span\n\t\t\tclassName={cn(\n\t\t\t\t\"ml-auto text-xs tracking-widest text-neutral-500 dark:text-neutral-400\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n};\nContextMenuShortcut.displayName = \"ContextMenuShortcut\";\n\nexport {\n\tContextMenu,\n\tContextMenuTrigger,\n\tContextMenuContent,\n\tContextMenuItem,\n\tContextMenuCheckboxItem,\n\tContextMenuRadioItem,\n\tContextMenuLabel,\n\tContextMenuSeparator,\n\tContextMenuShortcut,\n\tContextMenuGroup,\n\tContextMenuPortal,\n\tContextMenuSub,\n\tContextMenuSubContent,\n\tContextMenuSubTrigger,\n\tContextMenuRadioGroup,\n};\n"
  },
  {
    "path": "cofounder/dashboard/src/components/ui/dialog.tsx",
    "content": "import * as React from \"react\";\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport { X } from \"lucide-react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst Dialog = DialogPrimitive.Root;\n\nconst DialogTrigger = DialogPrimitive.Trigger;\n\nconst DialogPortal = DialogPrimitive.Portal;\n\nconst DialogClose = DialogPrimitive.Close;\n\nconst DialogOverlay = React.forwardRef<\n\tReact.ElementRef<typeof DialogPrimitive.Overlay>,\n\tReact.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n\t<DialogPrimitive.Overlay\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"fixed inset-0 z-50 bg-black/80  data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName;\n\nconst DialogContent = React.forwardRef<\n\tReact.ElementRef<typeof DialogPrimitive.Content>,\n\tReact.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n\t<DialogPortal>\n\t\t<DialogOverlay />\n\t\t<DialogPrimitive.Content\n\t\t\tref={ref}\n\t\t\tclassName={cn(\n\t\t\t\t\"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-neutral-200 bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg dark:border-neutral-800 dark:bg-neutral-950\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t\t<DialogPrimitive.Close className=\"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-neutral-950 focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-neutral-100 data-[state=open]:text-neutral-500 dark:ring-offset-neutral-950 dark:focus:ring-neutral-300 dark:data-[state=open]:bg-neutral-800 dark:data-[state=open]:text-neutral-400\">\n\t\t\t\t<X className=\"h-4 w-4\" />\n\t\t\t\t<span className=\"sr-only\">Close</span>\n\t\t\t</DialogPrimitive.Close>\n\t\t</DialogPrimitive.Content>\n\t</DialogPortal>\n));\nDialogContent.displayName = DialogPrimitive.Content.displayName;\n\nconst DialogHeader = ({\n\tclassName,\n\t...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n\t<div\n\t\tclassName={cn(\n\t\t\t\"flex flex-col space-y-1.5 text-center sm:text-left\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n);\nDialogHeader.displayName = \"DialogHeader\";\n\nconst DialogFooter = ({\n\tclassName,\n\t...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n\t<div\n\t\tclassName={cn(\n\t\t\t\"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n);\nDialogFooter.displayName = \"DialogFooter\";\n\nconst DialogTitle = React.forwardRef<\n\tReact.ElementRef<typeof DialogPrimitive.Title>,\n\tReact.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n\t<DialogPrimitive.Title\n\t\tref={ref}\n\t\tclassName={cn(\"text-lg font-semibold leading-none tracking-tight\", className)}\n\t\t{...props}\n\t/>\n));\nDialogTitle.displayName = DialogPrimitive.Title.displayName;\n\nconst DialogDescription = React.forwardRef<\n\tReact.ElementRef<typeof DialogPrimitive.Description>,\n\tReact.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n\t<DialogPrimitive.Description\n\t\tref={ref}\n\t\tclassName={cn(\"text-sm text-neutral-500 dark:text-neutral-400\", className)}\n\t\t{...props}\n\t/>\n));\nDialogDescription.displayName = DialogPrimitive.Description.displayName;\n\nexport {\n\tDialog,\n\tDialogPortal,\n\tDialogOverlay,\n\tDialogClose,\n\tDialogTrigger,\n\tDialogContent,\n\tDialogHeader,\n\tDialogFooter,\n\tDialogTitle,\n\tDialogDescription,\n};\n"
  },
  {
    "path": "cofounder/dashboard/src/components/ui/drawer.tsx",
    "content": "import * as React from \"react\";\nimport { Drawer as DrawerPrimitive } from \"vaul\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst Drawer = ({\n\tshouldScaleBackground = true,\n\t...props\n}: React.ComponentProps<typeof DrawerPrimitive.Root>) => (\n\t<DrawerPrimitive.Root\n\t\tshouldScaleBackground={shouldScaleBackground}\n\t\t{...props}\n\t/>\n);\nDrawer.displayName = \"Drawer\";\n\nconst DrawerTrigger = DrawerPrimitive.Trigger;\n\nconst DrawerPortal = DrawerPrimitive.Portal;\n\nconst DrawerClose = DrawerPrimitive.Close;\n\nconst DrawerOverlay = React.forwardRef<\n\tReact.ElementRef<typeof DrawerPrimitive.Overlay>,\n\tReact.ComponentPropsWithoutRef<typeof DrawerPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n\t<DrawerPrimitive.Overlay\n\t\tref={ref}\n\t\tclassName={cn(\"fixed inset-0 z-50 bg-black/80\", className)}\n\t\t{...props}\n\t/>\n));\nDrawerOverlay.displayName = DrawerPrimitive.Overlay.displayName;\n\nconst DrawerContent = React.forwardRef<\n\tReact.ElementRef<typeof DrawerPrimitive.Content>,\n\tReact.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n\t<DrawerPortal>\n\t\t<DrawerOverlay />\n\t\t<DrawerPrimitive.Content\n\t\t\tref={ref}\n\t\t\tclassName={cn(\n\t\t\t\t\"fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border border-neutral-200 bg-white dark:border-neutral-800 dark:bg-neutral-950\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<div className=\"mx-auto mt-4 h-2 w-[100px] rounded-full bg-neutral-100 dark:bg-neutral-800\" />\n\t\t\t{children}\n\t\t</DrawerPrimitive.Content>\n\t</DrawerPortal>\n));\nDrawerContent.displayName = \"DrawerContent\";\n\nconst DrawerHeader = ({\n\tclassName,\n\t...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n\t<div\n\t\tclassName={cn(\"grid gap-1.5 p-4 text-center sm:text-left\", className)}\n\t\t{...props}\n\t/>\n);\nDrawerHeader.displayName = \"DrawerHeader\";\n\nconst DrawerFooter = ({\n\tclassName,\n\t...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n\t<div className={cn(\"mt-auto flex flex-col gap-2 p-4\", className)} {...props} />\n);\nDrawerFooter.displayName = \"DrawerFooter\";\n\nconst DrawerTitle = React.forwardRef<\n\tReact.ElementRef<typeof DrawerPrimitive.Title>,\n\tReact.ComponentPropsWithoutRef<typeof DrawerPrimitive.Title>\n>(({ className, ...props }, ref) => (\n\t<DrawerPrimitive.Title\n\t\tref={ref}\n\t\tclassName={cn(\"text-lg font-semibold leading-none tracking-tight\", className)}\n\t\t{...props}\n\t/>\n));\nDrawerTitle.displayName = DrawerPrimitive.Title.displayName;\n\nconst DrawerDescription = React.forwardRef<\n\tReact.ElementRef<typeof DrawerPrimitive.Description>,\n\tReact.ComponentPropsWithoutRef<typeof DrawerPrimitive.Description>\n>(({ className, ...props }, ref) => (\n\t<DrawerPrimitive.Description\n\t\tref={ref}\n\t\tclassName={cn(\"text-sm text-neutral-500 dark:text-neutral-400\", className)}\n\t\t{...props}\n\t/>\n));\nDrawerDescription.displayName = DrawerPrimitive.Description.displayName;\n\nexport {\n\tDrawer,\n\tDrawerPortal,\n\tDrawerOverlay,\n\tDrawerTrigger,\n\tDrawerClose,\n\tDrawerContent,\n\tDrawerHeader,\n\tDrawerFooter,\n\tDrawerTitle,\n\tDrawerDescription,\n};\n"
  },
  {
    "path": "cofounder/dashboard/src/components/ui/dropdown-menu.tsx",
    "content": "import * as React from \"react\";\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\";\nimport { Check, ChevronRight, Circle } from \"lucide-react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst DropdownMenu = DropdownMenuPrimitive.Root;\n\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;\n\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group;\n\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal;\n\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub;\n\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;\n\nconst DropdownMenuSubTrigger = React.forwardRef<\n\tReact.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,\n\tReact.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {\n\t\tinset?: boolean;\n\t}\n>(({ className, inset, children, ...props }, ref) => (\n\t<DropdownMenuPrimitive.SubTrigger\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-neutral-100 data-[state=open]:bg-neutral-100 dark:focus:bg-neutral-800 dark:data-[state=open]:bg-neutral-800\",\n\t\t\tinset && \"pl-8\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t>\n\t\t{children}\n\t\t<ChevronRight className=\"ml-auto h-4 w-4\" />\n\t</DropdownMenuPrimitive.SubTrigger>\n));\nDropdownMenuSubTrigger.displayName =\n\tDropdownMenuPrimitive.SubTrigger.displayName;\n\nconst DropdownMenuSubContent = React.forwardRef<\n\tReact.ElementRef<typeof DropdownMenuPrimitive.SubContent>,\n\tReact.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n\t<DropdownMenuPrimitive.SubContent\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"z-50 min-w-[8rem] overflow-hidden rounded-md border border-neutral-200 bg-white p-1 text-neutral-950 shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nDropdownMenuSubContent.displayName =\n\tDropdownMenuPrimitive.SubContent.displayName;\n\nconst DropdownMenuContent = React.forwardRef<\n\tReact.ElementRef<typeof DropdownMenuPrimitive.Content>,\n\tReact.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n\t<DropdownMenuPrimitive.Portal>\n\t\t<DropdownMenuPrimitive.Content\n\t\t\tref={ref}\n\t\t\tsideOffset={sideOffset}\n\t\t\tclassName={cn(\n\t\t\t\t\"z-50 min-w-[8rem] overflow-hidden rounded-md border border-neutral-200 bg-white p-1 text-neutral-950 shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t</DropdownMenuPrimitive.Portal>\n));\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;\n\nconst DropdownMenuItem = React.forwardRef<\n\tReact.ElementRef<typeof DropdownMenuPrimitive.Item>,\n\tReact.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {\n\t\tinset?: boolean;\n\t}\n>(({ className, inset, ...props }, ref) => (\n\t<DropdownMenuPrimitive.Item\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-neutral-100 focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50\",\n\t\t\tinset && \"pl-8\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n\tReact.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n\tReact.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n\t<DropdownMenuPrimitive.CheckboxItem\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-neutral-100 focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50\",\n\t\t\tclassName,\n\t\t)}\n\t\tchecked={checked}\n\t\t{...props}\n\t>\n\t\t<span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n\t\t\t<DropdownMenuPrimitive.ItemIndicator>\n\t\t\t\t<Check className=\"h-4 w-4\" />\n\t\t\t</DropdownMenuPrimitive.ItemIndicator>\n\t\t</span>\n\t\t{children}\n\t</DropdownMenuPrimitive.CheckboxItem>\n));\nDropdownMenuCheckboxItem.displayName =\n\tDropdownMenuPrimitive.CheckboxItem.displayName;\n\nconst DropdownMenuRadioItem = React.forwardRef<\n\tReact.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,\n\tReact.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n\t<DropdownMenuPrimitive.RadioItem\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-neutral-100 focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t>\n\t\t<span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n\t\t\t<DropdownMenuPrimitive.ItemIndicator>\n\t\t\t\t<Circle className=\"h-2 w-2 fill-current\" />\n\t\t\t</DropdownMenuPrimitive.ItemIndicator>\n\t\t</span>\n\t\t{children}\n\t</DropdownMenuPrimitive.RadioItem>\n));\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;\n\nconst DropdownMenuLabel = React.forwardRef<\n\tReact.ElementRef<typeof DropdownMenuPrimitive.Label>,\n\tReact.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {\n\t\tinset?: boolean;\n\t}\n>(({ className, inset, ...props }, ref) => (\n\t<DropdownMenuPrimitive.Label\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"px-2 py-1.5 text-sm font-semibold\",\n\t\t\tinset && \"pl-8\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;\n\nconst DropdownMenuSeparator = React.forwardRef<\n\tReact.ElementRef<typeof DropdownMenuPrimitive.Separator>,\n\tReact.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n\t<DropdownMenuPrimitive.Separator\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"-mx-1 my-1 h-px bg-neutral-100 dark:bg-neutral-800\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;\n\nconst DropdownMenuShortcut = ({\n\tclassName,\n\t...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n\treturn (\n\t\t<span\n\t\t\tclassName={cn(\"ml-auto text-xs tracking-widest opacity-60\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n};\nDropdownMenuShortcut.displayName = \"DropdownMenuShortcut\";\n\nexport {\n\tDropdownMenu,\n\tDropdownMenuTrigger,\n\tDropdownMenuContent,\n\tDropdownMenuItem,\n\tDropdownMenuCheckboxItem,\n\tDropdownMenuRadioItem,\n\tDropdownMenuLabel,\n\tDropdownMenuSeparator,\n\tDropdownMenuShortcut,\n\tDropdownMenuGroup,\n\tDropdownMenuPortal,\n\tDropdownMenuSub,\n\tDropdownMenuSubContent,\n\tDropdownMenuSubTrigger,\n\tDropdownMenuRadioGroup,\n};\n"
  },
  {
    "path": "cofounder/dashboard/src/components/ui/form.tsx",
    "content": "import * as React from \"react\";\nimport * as LabelPrimitive from \"@radix-ui/react-label\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport {\n\tController,\n\tControllerProps,\n\tFieldPath,\n\tFieldValues,\n\tFormProvider,\n\tuseFormContext,\n} from \"react-hook-form\";\n\nimport { cn } from \"@/lib/utils\";\nimport { Label } from \"@/components/ui/label\";\n\nconst Form = FormProvider;\n\ntype FormFieldContextValue<\n\tTFieldValues extends FieldValues = FieldValues,\n\tTName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> = {\n\tname: TName;\n};\n\nconst FormFieldContext = React.createContext<FormFieldContextValue>(\n\t{} as FormFieldContextValue,\n);\n\nconst FormField = <\n\tTFieldValues extends FieldValues = FieldValues,\n\tTName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n>({\n\t...props\n}: ControllerProps<TFieldValues, TName>) => {\n\treturn (\n\t\t<FormFieldContext.Provider value={{ name: props.name }}>\n\t\t\t<Controller {...props} />\n\t\t</FormFieldContext.Provider>\n\t);\n};\n\nconst useFormField = () => {\n\tconst fieldContext = React.useContext(FormFieldContext);\n\tconst itemContext = React.useContext(FormItemContext);\n\tconst { getFieldState, formState } = useFormContext();\n\n\tconst fieldState = getFieldState(fieldContext.name, formState);\n\n\tif (!fieldContext) {\n\t\tthrow new Error(\"useFormField should be used within <FormField>\");\n\t}\n\n\tconst { id } = itemContext;\n\n\treturn {\n\t\tid,\n\t\tname: fieldContext.name,\n\t\tformItemId: `${id}-form-item`,\n\t\tformDescriptionId: `${id}-form-item-description`,\n\t\tformMessageId: `${id}-form-item-message`,\n\t\t...fieldState,\n\t};\n};\n\ntype FormItemContextValue = {\n\tid: string;\n};\n\nconst FormItemContext = React.createContext<FormItemContextValue>(\n\t{} as FormItemContextValue,\n);\n\nconst FormItem = React.forwardRef<\n\tHTMLDivElement,\n\tReact.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => {\n\tconst id = React.useId();\n\n\treturn (\n\t\t<FormItemContext.Provider value={{ id }}>\n\t\t\t<div ref={ref} className={cn(\"space-y-2\", className)} {...props} />\n\t\t</FormItemContext.Provider>\n\t);\n});\nFormItem.displayName = \"FormItem\";\n\nconst FormLabel = React.forwardRef<\n\tReact.ElementRef<typeof LabelPrimitive.Root>,\n\tReact.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>\n>(({ className, ...props }, ref) => {\n\tconst { error, formItemId } = useFormField();\n\n\treturn (\n\t\t<Label\n\t\t\tref={ref}\n\t\t\tclassName={cn(error && \"text-red-500 dark:text-red-900\", className)}\n\t\t\thtmlFor={formItemId}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\nFormLabel.displayName = \"FormLabel\";\n\nconst FormControl = React.forwardRef<\n\tReact.ElementRef<typeof Slot>,\n\tReact.ComponentPropsWithoutRef<typeof Slot>\n>(({ ...props }, ref) => {\n\tconst { error, formItemId, formDescriptionId, formMessageId } = useFormField();\n\n\treturn (\n\t\t<Slot\n\t\t\tref={ref}\n\t\t\tid={formItemId}\n\t\t\taria-describedby={\n\t\t\t\t!error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`\n\t\t\t}\n\t\t\taria-invalid={!!error}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\nFormControl.displayName = \"FormControl\";\n\nconst FormDescription = React.forwardRef<\n\tHTMLParagraphElement,\n\tReact.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => {\n\tconst { formDescriptionId } = useFormField();\n\n\treturn (\n\t\t<p\n\t\t\tref={ref}\n\t\t\tid={formDescriptionId}\n\t\t\tclassName={cn(\"text-sm text-neutral-500 dark:text-neutral-400\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\nFormDescription.displayName = \"FormDescription\";\n\nconst FormMessage = React.forwardRef<\n\tHTMLParagraphElement,\n\tReact.HTMLAttributes<HTMLParagraphElement>\n>(({ className, children, ...props }, ref) => {\n\tconst { error, formMessageId } = useFormField();\n\tconst body = error ? String(error?.message) : children;\n\n\tif (!body) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<p\n\t\t\tref={ref}\n\t\t\tid={formMessageId}\n\t\t\tclassName={cn(\n\t\t\t\t\"text-sm font-medium text-red-500 dark:text-red-900\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{body}\n\t\t</p>\n\t);\n});\nFormMessage.displayName = \"FormMessage\";\n\nexport {\n\tuseFormField,\n\tForm,\n\tFormItem,\n\tFormLabel,\n\tFormControl,\n\tFormDescription,\n\tFormMessage,\n\tFormField,\n};\n"
  },
  {
    "path": "cofounder/dashboard/src/components/ui/hover-card.tsx",
    "content": "import * as React from \"react\";\nimport * as HoverCardPrimitive from \"@radix-ui/react-hover-card\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst HoverCard = HoverCardPrimitive.Root;\n\nconst HoverCardTrigger = HoverCardPrimitive.Trigger;\n\nconst HoverCardContent = React.forwardRef<\n\tReact.ElementRef<typeof HoverCardPrimitive.Content>,\n\tReact.ComponentPropsWithoutRef<typeof HoverCardPrimitive.Content>\n>(({ className, align = \"center\", sideOffset = 4, ...props }, ref) => (\n\t<HoverCardPrimitive.Content\n\t\tref={ref}\n\t\talign={align}\n\t\tsideOffset={sideOffset}\n\t\tclassName={cn(\n\t\t\t\"z-50 w-64 rounded-md border border-neutral-200 bg-white p-4 text-neutral-950 shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nHoverCardContent.displayName = HoverCardPrimitive.Content.displayName;\n\nexport { HoverCard, HoverCardTrigger, HoverCardContent };\n"
  },
  {
    "path": "cofounder/dashboard/src/components/ui/input-otp.tsx",
    "content": "import * as React from \"react\";\nimport { OTPInput, OTPInputContext } from \"input-otp\";\nimport { Dot } from \"lucide-react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst InputOTP = React.forwardRef<\n\tReact.ElementRef<typeof OTPInput>,\n\tReact.ComponentPropsWithoutRef<typeof OTPInput>\n>(({ className, containerClassName, ...props }, ref) => (\n\t<OTPInput\n\t\tref={ref}\n\t\tcontainerClassName={cn(\n\t\t\t\"flex items-center gap-2 has-[:disabled]:opacity-50\",\n\t\t\tcontainerClassName,\n\t\t)}\n\t\tclassName={cn(\"disabled:cursor-not-allowed\", className)}\n\t\t{...props}\n\t/>\n));\nInputOTP.displayName = \"InputOTP\";\n\nconst InputOTPGroup = React.forwardRef<\n\tReact.ElementRef<\"div\">,\n\tReact.ComponentPropsWithoutRef<\"div\">\n>(({ className, ...props }, ref) => (\n\t<div ref={ref} className={cn(\"flex items-center\", className)} {...props} />\n));\nInputOTPGroup.displayName = \"InputOTPGroup\";\n\nconst InputOTPSlot = React.forwardRef<\n\tReact.ElementRef<\"div\">,\n\tReact.ComponentPropsWithoutRef<\"div\"> & { index: number }\n>(({ index, className, ...props }, ref) => {\n\tconst inputOTPContext = React.useContext(OTPInputContext);\n\tconst { char, hasFakeCaret, isActive } = inputOTPContext.slots[index];\n\n\treturn (\n\t\t<div\n\t\t\tref={ref}\n\t\t\tclassName={cn(\n\t\t\t\t\"relative flex h-10 w-10 items-center justify-center border-y border-r border-neutral-200 text-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md dark:border-neutral-800\",\n\t\t\t\tisActive &&\n\t\t\t\t\t\"z-10 ring-2 ring-neutral-950 ring-offset-white dark:ring-neutral-300 dark:ring-offset-neutral-950\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{char}\n\t\t\t{hasFakeCaret && (\n\t\t\t\t<div className=\"pointer-events-none absolute inset-0 flex items-center justify-center\">\n\t\t\t\t\t<div className=\"h-4 w-px animate-caret-blink bg-neutral-950 duration-1000 dark:bg-neutral-50\" />\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n});\nInputOTPSlot.displayName = \"InputOTPSlot\";\n\nconst InputOTPSeparator = React.forwardRef<\n\tReact.ElementRef<\"div\">,\n\tReact.ComponentPropsWithoutRef<\"div\">\n>(({ ...props }, ref) => (\n\t<div ref={ref} role=\"separator\" {...props}>\n\t\t<Dot />\n\t</div>\n));\nInputOTPSeparator.displayName = \"InputOTPSeparator\";\n\nexport { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator };\n"
  },
  {
    "path": "cofounder/dashboard/src/components/ui/input.tsx",
    "content": "import * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nexport interface InputProps\n\textends React.InputHTMLAttributes<HTMLInputElement> {}\n\nconst Input = React.forwardRef<HTMLInputElement, InputProps>(\n\t({ className, type, ...props }, ref) => {\n\t\treturn (\n\t\t\t<input\n\t\t\t\ttype={type}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"flex h-10 w-full rounded-md border border-neutral-200 bg-white px-3 py-2 text-sm ring-offset-white file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-neutral-500 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-neutral-950 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 dark:border-neutral-800 dark:bg-neutral-950 dark:ring-offset-neutral-950 dark:placeholder:text-neutral-400 dark:focus-visible:ring-neutral-300\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\tref={ref}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t},\n);\nInput.displayName = \"Input\";\n\nexport { Input };\n"
  },
  {
    "path": "cofounder/dashboard/src/components/ui/label.tsx",
    "content": "import * as React from \"react\";\nimport * as LabelPrimitive from \"@radix-ui/react-label\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst labelVariants = cva(\n\t\"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\",\n);\n\nconst Label = React.forwardRef<\n\tReact.ElementRef<typeof LabelPrimitive.Root>,\n\tReact.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> &\n\t\tVariantProps<typeof labelVariants>\n>(({ className, ...props }, ref) => (\n\t<LabelPrimitive.Root\n\t\tref={ref}\n\t\tclassName={cn(labelVariants(), className)}\n\t\t{...props}\n\t/>\n));\nLabel.displayName = LabelPrimitive.Root.displayName;\n\nexport { Label };\n"
  },
  {
    "path": "cofounder/dashboard/src/components/ui/menubar.tsx",
    "content": "import * as React from \"react\";\nimport * as MenubarPrimitive from \"@radix-ui/react-menubar\";\nimport { Check, ChevronRight, Circle } from \"lucide-react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst MenubarMenu = MenubarPrimitive.Menu;\n\nconst MenubarGroup = MenubarPrimitive.Group;\n\nconst MenubarPortal = MenubarPrimitive.Portal;\n\nconst MenubarSub = MenubarPrimitive.Sub;\n\nconst MenubarRadioGroup = MenubarPrimitive.RadioGroup;\n\nconst Menubar = React.forwardRef<\n\tReact.ElementRef<typeof MenubarPrimitive.Root>,\n\tReact.ComponentPropsWithoutRef<typeof MenubarPrimitive.Root>\n>(({ className, ...props }, ref) => (\n\t<MenubarPrimitive.Root\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"flex h-10 items-center space-x-1 rounded-md border border-neutral-200 bg-white p-1 dark:border-neutral-800 dark:bg-neutral-950\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nMenubar.displayName = MenubarPrimitive.Root.displayName;\n\nconst MenubarTrigger = React.forwardRef<\n\tReact.ElementRef<typeof MenubarPrimitive.Trigger>,\n\tReact.ComponentPropsWithoutRef<typeof MenubarPrimitive.Trigger>\n>(({ className, ...props }, ref) => (\n\t<MenubarPrimitive.Trigger\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"flex cursor-default select-none items-center rounded-sm px-3 py-1.5 text-sm font-medium outline-none focus:bg-neutral-100 focus:text-neutral-900 data-[state=open]:bg-neutral-100 data-[state=open]:text-neutral-900 dark:focus:bg-neutral-800 dark:focus:text-neutral-50 dark:data-[state=open]:bg-neutral-800 dark:data-[state=open]:text-neutral-50\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nMenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName;\n\nconst MenubarSubTrigger = React.forwardRef<\n\tReact.ElementRef<typeof MenubarPrimitive.SubTrigger>,\n\tReact.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubTrigger> & {\n\t\tinset?: boolean;\n\t}\n>(({ className, inset, children, ...props }, ref) => (\n\t<MenubarPrimitive.SubTrigger\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-neutral-100 focus:text-neutral-900 data-[state=open]:bg-neutral-100 data-[state=open]:text-neutral-900 dark:focus:bg-neutral-800 dark:focus:text-neutral-50 dark:data-[state=open]:bg-neutral-800 dark:data-[state=open]:text-neutral-50\",\n\t\t\tinset && \"pl-8\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t>\n\t\t{children}\n\t\t<ChevronRight className=\"ml-auto h-4 w-4\" />\n\t</MenubarPrimitive.SubTrigger>\n));\nMenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName;\n\nconst MenubarSubContent = React.forwardRef<\n\tReact.ElementRef<typeof MenubarPrimitive.SubContent>,\n\tReact.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n\t<MenubarPrimitive.SubContent\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"z-50 min-w-[8rem] overflow-hidden rounded-md border border-neutral-200 bg-white p-1 text-neutral-950 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nMenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName;\n\nconst MenubarContent = React.forwardRef<\n\tReact.ElementRef<typeof MenubarPrimitive.Content>,\n\tReact.ComponentPropsWithoutRef<typeof MenubarPrimitive.Content>\n>(\n\t(\n\t\t{ className, align = \"start\", alignOffset = -4, sideOffset = 8, ...props },\n\t\tref,\n\t) => (\n\t\t<MenubarPrimitive.Portal>\n\t\t\t<MenubarPrimitive.Content\n\t\t\t\tref={ref}\n\t\t\t\talign={align}\n\t\t\t\talignOffset={alignOffset}\n\t\t\t\tsideOffset={sideOffset}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"z-50 min-w-[12rem] overflow-hidden rounded-md border border-neutral-200 bg-white p-1 text-neutral-950 shadow-md data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t</MenubarPrimitive.Portal>\n\t),\n);\nMenubarContent.displayName = MenubarPrimitive.Content.displayName;\n\nconst MenubarItem = React.forwardRef<\n\tReact.ElementRef<typeof MenubarPrimitive.Item>,\n\tReact.ComponentPropsWithoutRef<typeof MenubarPrimitive.Item> & {\n\t\tinset?: boolean;\n\t}\n>(({ className, inset, ...props }, ref) => (\n\t<MenubarPrimitive.Item\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-neutral-100 focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50\",\n\t\t\tinset && \"pl-8\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nMenubarItem.displayName = MenubarPrimitive.Item.displayName;\n\nconst MenubarCheckboxItem = React.forwardRef<\n\tReact.ElementRef<typeof MenubarPrimitive.CheckboxItem>,\n\tReact.ComponentPropsWithoutRef<typeof MenubarPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n\t<MenubarPrimitive.CheckboxItem\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-neutral-100 focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50\",\n\t\t\tclassName,\n\t\t)}\n\t\tchecked={checked}\n\t\t{...props}\n\t>\n\t\t<span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n\t\t\t<MenubarPrimitive.ItemIndicator>\n\t\t\t\t<Check className=\"h-4 w-4\" />\n\t\t\t</MenubarPrimitive.ItemIndicator>\n\t\t</span>\n\t\t{children}\n\t</MenubarPrimitive.CheckboxItem>\n));\nMenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName;\n\nconst MenubarRadioItem = React.forwardRef<\n\tReact.ElementRef<typeof MenubarPrimitive.RadioItem>,\n\tReact.ComponentPropsWithoutRef<typeof MenubarPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n\t<MenubarPrimitive.RadioItem\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-neutral-100 focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t>\n\t\t<span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n\t\t\t<MenubarPrimitive.ItemIndicator>\n\t\t\t\t<Circle className=\"h-2 w-2 fill-current\" />\n\t\t\t</MenubarPrimitive.ItemIndicator>\n\t\t</span>\n\t\t{children}\n\t</MenubarPrimitive.RadioItem>\n));\nMenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName;\n\nconst MenubarLabel = React.forwardRef<\n\tReact.ElementRef<typeof MenubarPrimitive.Label>,\n\tReact.ComponentPropsWithoutRef<typeof MenubarPrimitive.Label> & {\n\t\tinset?: boolean;\n\t}\n>(({ className, inset, ...props }, ref) => (\n\t<MenubarPrimitive.Label\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"px-2 py-1.5 text-sm font-semibold\",\n\t\t\tinset && \"pl-8\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nMenubarLabel.displayName = MenubarPrimitive.Label.displayName;\n\nconst MenubarSeparator = React.forwardRef<\n\tReact.ElementRef<typeof MenubarPrimitive.Separator>,\n\tReact.ComponentPropsWithoutRef<typeof MenubarPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n\t<MenubarPrimitive.Separator\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"-mx-1 my-1 h-px bg-neutral-100 dark:bg-neutral-800\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nMenubarSeparator.displayName = MenubarPrimitive.Separator.displayName;\n\nconst MenubarShortcut = ({\n\tclassName,\n\t...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n\treturn (\n\t\t<span\n\t\t\tclassName={cn(\n\t\t\t\t\"ml-auto text-xs tracking-widest text-neutral-500 dark:text-neutral-400\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n};\nMenubarShortcut.displayname = \"MenubarShortcut\";\n\nexport {\n\tMenubar,\n\tMenubarMenu,\n\tMenubarTrigger,\n\tMenubarContent,\n\tMenubarItem,\n\tMenubarSeparator,\n\tMenubarLabel,\n\tMenubarCheckboxItem,\n\tMenubarRadioGroup,\n\tMenubarRadioItem,\n\tMenubarPortal,\n\tMenubarSubContent,\n\tMenubarSubTrigger,\n\tMenubarGroup,\n\tMenubarSub,\n\tMenubarShortcut,\n};\n"
  },
  {
    "path": "cofounder/dashboard/src/components/ui/navigation-menu.tsx",
    "content": "import * as React from \"react\";\nimport * as NavigationMenuPrimitive from \"@radix-ui/react-navigation-menu\";\nimport { cva } from \"class-variance-authority\";\nimport { ChevronDown } from \"lucide-react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst NavigationMenu = React.forwardRef<\n\tReact.ElementRef<typeof NavigationMenuPrimitive.Root>,\n\tReact.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Root>\n>(({ className, children, ...props }, ref) => (\n\t<NavigationMenuPrimitive.Root\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"relative z-10 flex max-w-max flex-1 items-center justify-center\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t>\n\t\t{children}\n\t\t<NavigationMenuViewport />\n\t</NavigationMenuPrimitive.Root>\n));\nNavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName;\n\nconst NavigationMenuList = React.forwardRef<\n\tReact.ElementRef<typeof NavigationMenuPrimitive.List>,\n\tReact.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.List>\n>(({ className, ...props }, ref) => (\n\t<NavigationMenuPrimitive.List\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"group flex flex-1 list-none items-center justify-center space-x-1\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nNavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName;\n\nconst NavigationMenuItem = NavigationMenuPrimitive.Item;\n\nconst navigationMenuTriggerStyle = cva(\n\t\"group inline-flex h-10 w-max items-center justify-center rounded-md bg-white px-4 py-2 text-sm font-medium transition-colors hover:bg-neutral-100 hover:text-neutral-900 focus:bg-neutral-100 focus:text-neutral-900 focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-neutral-100/50 data-[state=open]:bg-neutral-100/50 dark:bg-neutral-950 dark:hover:bg-neutral-800 dark:hover:text-neutral-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50 dark:data-[active]:bg-neutral-800/50 dark:data-[state=open]:bg-neutral-800/50\",\n);\n\nconst NavigationMenuTrigger = React.forwardRef<\n\tReact.ElementRef<typeof NavigationMenuPrimitive.Trigger>,\n\tReact.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Trigger>\n>(({ className, children, ...props }, ref) => (\n\t<NavigationMenuPrimitive.Trigger\n\t\tref={ref}\n\t\tclassName={cn(navigationMenuTriggerStyle(), \"group\", className)}\n\t\t{...props}\n\t>\n\t\t{children}\n\t\t{\"\"}\n\t\t<ChevronDown\n\t\t\tclassName=\"relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180\"\n\t\t\taria-hidden=\"true\"\n\t\t/>\n\t</NavigationMenuPrimitive.Trigger>\n));\nNavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName;\n\nconst NavigationMenuContent = React.forwardRef<\n\tReact.ElementRef<typeof NavigationMenuPrimitive.Content>,\n\tReact.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Content>\n>(({ className, ...props }, ref) => (\n\t<NavigationMenuPrimitive.Content\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nNavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName;\n\nconst NavigationMenuLink = NavigationMenuPrimitive.Link;\n\nconst NavigationMenuViewport = React.forwardRef<\n\tReact.ElementRef<typeof NavigationMenuPrimitive.Viewport>,\n\tReact.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Viewport>\n>(({ className, ...props }, ref) => (\n\t<div className={cn(\"absolute left-0 top-full flex justify-center\")}>\n\t\t<NavigationMenuPrimitive.Viewport\n\t\t\tclassName={cn(\n\t\t\t\t\"origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border border-neutral-200 bg-white text-neutral-950 shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)] dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tref={ref}\n\t\t\t{...props}\n\t\t/>\n\t</div>\n));\nNavigationMenuViewport.displayName =\n\tNavigationMenuPrimitive.Viewport.displayName;\n\nconst NavigationMenuIndicator = React.forwardRef<\n\tReact.ElementRef<typeof NavigationMenuPrimitive.Indicator>,\n\tReact.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Indicator>\n>(({ className, ...props }, ref) => (\n\t<NavigationMenuPrimitive.Indicator\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t>\n\t\t<div className=\"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-neutral-200 shadow-md dark:bg-neutral-800\" />\n\t</NavigationMenuPrimitive.Indicator>\n));\nNavigationMenuIndicator.displayName =\n\tNavigationMenuPrimitive.Indicator.displayName;\n\nexport {\n\tnavigationMenuTriggerStyle,\n\tNavigationMenu,\n\tNavigationMenuList,\n\tNavigationMenuItem,\n\tNavigationMenuContent,\n\tNavigationMenuTrigger,\n\tNavigationMenuLink,\n\tNavigationMenuIndicator,\n\tNavigationMenuViewport,\n};\n"
  },
  {
    "path": "cofounder/dashboard/src/components/ui/pagination.tsx",
    "content": "import * as React from \"react\";\nimport { ChevronLeft, ChevronRight, MoreHorizontal } from \"lucide-react\";\n\nimport { cn } from \"@/lib/utils\";\nimport { ButtonProps, buttonVariants } from \"@/components/ui/button\";\n\nconst Pagination = ({ className, ...props }: React.ComponentProps<\"nav\">) => (\n\t<nav\n\t\trole=\"navigation\"\n\t\taria-label=\"pagination\"\n\t\tclassName={cn(\"mx-auto flex w-full justify-center\", className)}\n\t\t{...props}\n\t/>\n);\nPagination.displayName = \"Pagination\";\n\nconst PaginationContent = React.forwardRef<\n\tHTMLUListElement,\n\tReact.ComponentProps<\"ul\">\n>(({ className, ...props }, ref) => (\n\t<ul\n\t\tref={ref}\n\t\tclassName={cn(\"flex flex-row items-center gap-1\", className)}\n\t\t{...props}\n\t/>\n));\nPaginationContent.displayName = \"PaginationContent\";\n\nconst PaginationItem = React.forwardRef<\n\tHTMLLIElement,\n\tReact.ComponentProps<\"li\">\n>(({ className, ...props }, ref) => (\n\t<li ref={ref} className={cn(\"\", className)} {...props} />\n));\nPaginationItem.displayName = \"PaginationItem\";\n\ntype PaginationLinkProps = {\n\tisActive?: boolean;\n} & Pick<ButtonProps, \"size\"> &\n\tReact.ComponentProps<\"a\">;\n\nconst PaginationLink = ({\n\tclassName,\n\tisActive,\n\tsize = \"icon\",\n\t...props\n}: PaginationLinkProps) => (\n\t<a\n\t\taria-current={isActive ? \"page\" : undefined}\n\t\tclassName={cn(\n\t\t\tbuttonVariants({\n\t\t\t\tvariant: isActive ? \"outline\" : \"ghost\",\n\t\t\t\tsize,\n\t\t\t}),\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n);\nPaginationLink.displayName = \"PaginationLink\";\n\nconst PaginationPrevious = ({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof PaginationLink>) => (\n\t<PaginationLink\n\t\taria-label=\"Go to previous page\"\n\t\tsize=\"default\"\n\t\tclassName={cn(\"gap-1 pl-2.5\", className)}\n\t\t{...props}\n\t>\n\t\t<ChevronLeft className=\"h-4 w-4\" />\n\t\t<span>Previous</span>\n\t</PaginationLink>\n);\nPaginationPrevious.displayName = \"PaginationPrevious\";\n\nconst PaginationNext = ({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof PaginationLink>) => (\n\t<PaginationLink\n\t\taria-label=\"Go to next page\"\n\t\tsize=\"default\"\n\t\tclassName={cn(\"gap-1 pr-2.5\", className)}\n\t\t{...props}\n\t>\n\t\t<span>Next</span>\n\t\t<ChevronRight className=\"h-4 w-4\" />\n\t</PaginationLink>\n);\nPaginationNext.displayName = \"PaginationNext\";\n\nconst PaginationEllipsis = ({\n\tclassName,\n\t...props\n}: React.ComponentProps<\"span\">) => (\n\t<span\n\t\taria-hidden\n\t\tclassName={cn(\"flex h-9 w-9 items-center justify-center\", className)}\n\t\t{...props}\n\t>\n\t\t<MoreHorizontal className=\"h-4 w-4\" />\n\t\t<span className=\"sr-only\">More pages</span>\n\t</span>\n);\nPaginationEllipsis.displayName = \"PaginationEllipsis\";\n\nexport {\n\tPagination,\n\tPaginationContent,\n\tPaginationEllipsis,\n\tPaginationItem,\n\tPaginationLink,\n\tPaginationNext,\n\tPaginationPrevious,\n};\n"
  },
  {
    "path": "cofounder/dashboard/src/components/ui/popover.tsx",
    "content": "import * as React from \"react\";\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst Popover = PopoverPrimitive.Root;\n\nconst PopoverTrigger = PopoverPrimitive.Trigger;\n\nconst PopoverContent = React.forwardRef<\n\tReact.ElementRef<typeof PopoverPrimitive.Content>,\n\tReact.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\n>(({ className, align = \"center\", sideOffset = 4, ...props }, ref) => (\n\t<PopoverPrimitive.Portal>\n\t\t<PopoverPrimitive.Content\n\t\t\tref={ref}\n\t\t\talign={align}\n\t\t\tsideOffset={sideOffset}\n\t\t\tclassName={cn(\n\t\t\t\t\"z-50 w-72 rounded-md border border-neutral-200 bg-white p-4 text-neutral-950 shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t</PopoverPrimitive.Portal>\n));\nPopoverContent.displayName = PopoverPrimitive.Content.displayName;\n\nexport { Popover, PopoverTrigger, PopoverContent };\n"
  },
  {
    "path": "cofounder/dashboard/src/components/ui/progress.tsx",
    "content": "import * as React from \"react\";\nimport * as ProgressPrimitive from \"@radix-ui/react-progress\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst Progress = React.forwardRef<\n\tReact.ElementRef<typeof ProgressPrimitive.Root>,\n\tReact.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root>\n>(({ className, value, ...props }, ref) => (\n\t<ProgressPrimitive.Root\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"relative h-4 w-full overflow-hidden rounded-full bg-neutral-100 dark:bg-neutral-800\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t>\n\t\t<ProgressPrimitive.Indicator\n\t\t\tclassName=\"h-full w-full flex-1 bg-neutral-900 transition-all dark:bg-neutral-50\"\n\t\t\tstyle={{ transform: `translateX(-${100 - (value || 0)}%)` }}\n\t\t/>\n\t</ProgressPrimitive.Root>\n));\nProgress.displayName = ProgressPrimitive.Root.displayName;\n\nexport { Progress };\n"
  },
  {
    "path": "cofounder/dashboard/src/components/ui/radio-group.tsx",
    "content": "import * as React from \"react\";\nimport * as RadioGroupPrimitive from \"@radix-ui/react-radio-group\";\nimport { Circle } from \"lucide-react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst RadioGroup = React.forwardRef<\n\tReact.ElementRef<typeof RadioGroupPrimitive.Root>,\n\tReact.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>\n>(({ className, ...props }, ref) => {\n\treturn (\n\t\t<RadioGroupPrimitive.Root\n\t\t\tclassName={cn(\"grid gap-2\", className)}\n\t\t\t{...props}\n\t\t\tref={ref}\n\t\t/>\n\t);\n});\nRadioGroup.displayName = RadioGroupPrimitive.Root.displayName;\n\nconst RadioGroupItem = React.forwardRef<\n\tReact.ElementRef<typeof RadioGroupPrimitive.Item>,\n\tReact.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>\n>(({ className, ...props }, ref) => {\n\treturn (\n\t\t<RadioGroupPrimitive.Item\n\t\t\tref={ref}\n\t\t\tclassName={cn(\n\t\t\t\t\"aspect-square h-4 w-4 rounded-full border border-neutral-200 border-neutral-900 text-neutral-900 ring-offset-white focus:outline-none focus-visible:ring-2 focus-visible:ring-neutral-950 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 dark:border-neutral-800 dark:border-neutral-50 dark:text-neutral-50 dark:ring-offset-neutral-950 dark:focus-visible:ring-neutral-300\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<RadioGroupPrimitive.Indicator className=\"flex items-center justify-center\">\n\t\t\t\t<Circle className=\"h-2.5 w-2.5 fill-current text-current\" />\n\t\t\t</RadioGroupPrimitive.Indicator>\n\t\t</RadioGroupPrimitive.Item>\n\t);\n});\nRadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;\n\nexport { RadioGroup, RadioGroupItem };\n"
  },
  {
    "path": "cofounder/dashboard/src/components/ui/resizable.tsx",
    "content": "import { GripVertical } from \"lucide-react\";\nimport * as ResizablePrimitive from \"react-resizable-panels\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst ResizablePanelGroup = ({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof ResizablePrimitive.PanelGroup>) => (\n\t<ResizablePrimitive.PanelGroup\n\t\tclassName={cn(\n\t\t\t\"flex h-full w-full data-[panel-group-direction=vertical]:flex-col\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n);\n\nconst ResizablePanel = ResizablePrimitive.Panel;\n\nconst ResizableHandle = ({\n\twithHandle,\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof ResizablePrimitive.PanelResizeHandle> & {\n\twithHandle?: boolean;\n}) => (\n\t<ResizablePrimitive.PanelResizeHandle\n\t\tclassName={cn(\n\t\t\t\"relative flex w-px items-center justify-center bg-neutral-200 after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-neutral-950 focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90 dark:bg-neutral-800 dark:focus-visible:ring-neutral-300\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t>\n\t\t{withHandle && (\n\t\t\t<div className=\"z-10 flex h-4 w-3 items-center justify-center rounded-sm border border-neutral-200 bg-neutral-200 dark:border-neutral-800 dark:bg-neutral-800\">\n\t\t\t\t<GripVertical className=\"h-2.5 w-2.5\" />\n\t\t\t</div>\n\t\t)}\n\t</ResizablePrimitive.PanelResizeHandle>\n);\n\nexport { ResizablePanelGroup, ResizablePanel, ResizableHandle };\n"
  },
  {
    "path": "cofounder/dashboard/src/components/ui/scroll-area.tsx",
    "content": "import * as React from \"react\";\nimport * as ScrollAreaPrimitive from \"@radix-ui/react-scroll-area\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst ScrollArea = React.forwardRef<\n\tReact.ElementRef<typeof ScrollAreaPrimitive.Root>,\n\tReact.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root>\n>(({ className, children, ...props }, ref) => (\n\t<ScrollAreaPrimitive.Root\n\t\tref={ref}\n\t\tclassName={cn(\"relative overflow-hidden\", className)}\n\t\t{...props}\n\t>\n\t\t<ScrollAreaPrimitive.Viewport className=\"h-full w-full rounded-[inherit]\">\n\t\t\t{children}\n\t\t</ScrollAreaPrimitive.Viewport>\n\t\t<ScrollBar />\n\t\t<ScrollAreaPrimitive.Corner />\n\t</ScrollAreaPrimitive.Root>\n));\nScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;\n\nconst ScrollBar = React.forwardRef<\n\tReact.ElementRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>,\n\tReact.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>\n>(({ className, orientation = \"vertical\", ...props }, ref) => (\n\t<ScrollAreaPrimitive.ScrollAreaScrollbar\n\t\tref={ref}\n\t\torientation={orientation}\n\t\tclassName={cn(\n\t\t\t\"flex touch-none select-none transition-colors\",\n\t\t\torientation === \"vertical\" &&\n\t\t\t\t\"h-full w-2.5 border-l border-l-transparent p-[1px]\",\n\t\t\torientation === \"horizontal\" &&\n\t\t\t\t\"h-2.5 flex-col border-t border-t-transparent p-[1px]\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t>\n\t\t<ScrollAreaPrimitive.ScrollAreaThumb className=\"relative flex-1 rounded-full bg-neutral-200 dark:bg-neutral-800\" />\n\t</ScrollAreaPrimitive.ScrollAreaScrollbar>\n));\nScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;\n\nexport { ScrollArea, ScrollBar };\n"
  },
  {
    "path": "cofounder/dashboard/src/components/ui/select.tsx",
    "content": "import * as React from \"react\";\nimport * as SelectPrimitive from \"@radix-ui/react-select\";\nimport { Check, ChevronDown, ChevronUp } from \"lucide-react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst Select = SelectPrimitive.Root;\n\nconst SelectGroup = SelectPrimitive.Group;\n\nconst SelectValue = SelectPrimitive.Value;\n\nconst SelectTrigger = React.forwardRef<\n\tReact.ElementRef<typeof SelectPrimitive.Trigger>,\n\tReact.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>\n>(({ className, children, ...props }, ref) => (\n\t<SelectPrimitive.Trigger\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"flex h-10 w-full items-center justify-between rounded-md border border-neutral-200 bg-white px-3 py-2 text-sm ring-offset-white placeholder:text-neutral-500 focus:outline-none focus:ring-2 focus:ring-neutral-950 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 dark:border-neutral-800 dark:bg-neutral-950 dark:ring-offset-neutral-950 dark:placeholder:text-neutral-400 dark:focus:ring-neutral-300\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t>\n\t\t{children}\n\t\t<SelectPrimitive.Icon asChild>\n\t\t\t<ChevronDown className=\"h-4 w-4 opacity-50\" />\n\t\t</SelectPrimitive.Icon>\n\t</SelectPrimitive.Trigger>\n));\nSelectTrigger.displayName = SelectPrimitive.Trigger.displayName;\n\nconst SelectScrollUpButton = React.forwardRef<\n\tReact.ElementRef<typeof SelectPrimitive.ScrollUpButton>,\n\tReact.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>\n>(({ className, ...props }, ref) => (\n\t<SelectPrimitive.ScrollUpButton\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"flex cursor-default items-center justify-center py-1\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t>\n\t\t<ChevronUp className=\"h-4 w-4\" />\n\t</SelectPrimitive.ScrollUpButton>\n));\nSelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;\n\nconst SelectScrollDownButton = React.forwardRef<\n\tReact.ElementRef<typeof SelectPrimitive.ScrollDownButton>,\n\tReact.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>\n>(({ className, ...props }, ref) => (\n\t<SelectPrimitive.ScrollDownButton\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"flex cursor-default items-center justify-center py-1\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t>\n\t\t<ChevronDown className=\"h-4 w-4\" />\n\t</SelectPrimitive.ScrollDownButton>\n));\nSelectScrollDownButton.displayName =\n\tSelectPrimitive.ScrollDownButton.displayName;\n\nconst SelectContent = React.forwardRef<\n\tReact.ElementRef<typeof SelectPrimitive.Content>,\n\tReact.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>\n>(({ className, children, position = \"popper\", ...props }, ref) => (\n\t<SelectPrimitive.Portal>\n\t\t<SelectPrimitive.Content\n\t\t\tref={ref}\n\t\t\tclassName={cn(\n\t\t\t\t\"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border border-neutral-200 bg-white text-neutral-950 shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50\",\n\t\t\t\tposition === \"popper\" &&\n\t\t\t\t\t\"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tposition={position}\n\t\t\t{...props}\n\t\t>\n\t\t\t<SelectScrollUpButton />\n\t\t\t<SelectPrimitive.Viewport\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"p-1\",\n\t\t\t\t\tposition === \"popper\" &&\n\t\t\t\t\t\t\"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]\",\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</SelectPrimitive.Viewport>\n\t\t\t<SelectScrollDownButton />\n\t\t</SelectPrimitive.Content>\n\t</SelectPrimitive.Portal>\n));\nSelectContent.displayName = SelectPrimitive.Content.displayName;\n\nconst SelectLabel = React.forwardRef<\n\tReact.ElementRef<typeof SelectPrimitive.Label>,\n\tReact.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>\n>(({ className, ...props }, ref) => (\n\t<SelectPrimitive.Label\n\t\tref={ref}\n\t\tclassName={cn(\"py-1.5 pl-8 pr-2 text-sm font-semibold\", className)}\n\t\t{...props}\n\t/>\n));\nSelectLabel.displayName = SelectPrimitive.Label.displayName;\n\nconst SelectItem = React.forwardRef<\n\tReact.ElementRef<typeof SelectPrimitive.Item>,\n\tReact.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>\n>(({ className, children, ...props }, ref) => (\n\t<SelectPrimitive.Item\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-neutral-100 focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t>\n\t\t<span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n\t\t\t<SelectPrimitive.ItemIndicator>\n\t\t\t\t<Check className=\"h-4 w-4\" />\n\t\t\t</SelectPrimitive.ItemIndicator>\n\t\t</span>\n\n\t\t<SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n\t</SelectPrimitive.Item>\n));\nSelectItem.displayName = SelectPrimitive.Item.displayName;\n\nconst SelectSeparator = React.forwardRef<\n\tReact.ElementRef<typeof SelectPrimitive.Separator>,\n\tReact.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n\t<SelectPrimitive.Separator\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"-mx-1 my-1 h-px bg-neutral-100 dark:bg-neutral-800\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nSelectSeparator.displayName = SelectPrimitive.Separator.displayName;\n\nexport {\n\tSelect,\n\tSelectGroup,\n\tSelectValue,\n\tSelectTrigger,\n\tSelectContent,\n\tSelectLabel,\n\tSelectItem,\n\tSelectSeparator,\n\tSelectScrollUpButton,\n\tSelectScrollDownButton,\n};\n"
  },
  {
    "path": "cofounder/dashboard/src/components/ui/separator.tsx",
    "content": "import * as React from \"react\";\nimport * as SeparatorPrimitive from \"@radix-ui/react-separator\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst Separator = React.forwardRef<\n\tReact.ElementRef<typeof SeparatorPrimitive.Root>,\n\tReact.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>\n>(\n\t(\n\t\t{ className, orientation = \"horizontal\", decorative = true, ...props },\n\t\tref,\n\t) => (\n\t\t<SeparatorPrimitive.Root\n\t\t\tref={ref}\n\t\t\tdecorative={decorative}\n\t\t\torientation={orientation}\n\t\t\tclassName={cn(\n\t\t\t\t\"shrink-0 bg-neutral-200 dark:bg-neutral-800\",\n\t\t\t\torientation === \"horizontal\" ? \"h-[1px] w-full\" : \"h-full w-[1px]\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t),\n);\nSeparator.displayName = SeparatorPrimitive.Root.displayName;\n\nexport { Separator };\n"
  },
  {
    "path": "cofounder/dashboard/src/components/ui/sheet.tsx",
    "content": "import * as React from \"react\";\nimport * as SheetPrimitive from \"@radix-ui/react-dialog\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { X } from \"lucide-react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst Sheet = SheetPrimitive.Root;\n\nconst SheetTrigger = SheetPrimitive.Trigger;\n\nconst SheetClose = SheetPrimitive.Close;\n\nconst SheetPortal = SheetPrimitive.Portal;\n\nconst SheetOverlay = React.forwardRef<\n\tReact.ElementRef<typeof SheetPrimitive.Overlay>,\n\tReact.ComponentPropsWithoutRef<typeof SheetPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n\t<SheetPrimitive.Overlay\n\t\tclassName={cn(\n\t\t\t\"fixed inset-0 z-50 bg-black/80  data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t\tref={ref}\n\t/>\n));\nSheetOverlay.displayName = SheetPrimitive.Overlay.displayName;\n\nconst sheetVariants = cva(\n\t\"fixed z-50 gap-4 bg-white p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500 dark:bg-neutral-950\",\n\t{\n\t\tvariants: {\n\t\t\tside: {\n\t\t\t\ttop: \"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top\",\n\t\t\t\tbottom:\n\t\t\t\t\t\"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom\",\n\t\t\t\tleft:\n\t\t\t\t\t\"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm\",\n\t\t\t\tright:\n\t\t\t\t\t\"inset-y-0 right-0 h-full w-3/4  border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tside: \"right\",\n\t\t},\n\t},\n);\n\ninterface SheetContentProps\n\textends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>,\n\t\tVariantProps<typeof sheetVariants> {}\n\nconst SheetContent = React.forwardRef<\n\tReact.ElementRef<typeof SheetPrimitive.Content>,\n\tSheetContentProps\n>(({ side = \"right\", className, children, ...props }, ref) => (\n\t<SheetPortal>\n\t\t<SheetOverlay />\n\t\t<SheetPrimitive.Content\n\t\t\tref={ref}\n\t\t\tclassName={cn(sheetVariants({ side }), className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t\t<SheetPrimitive.Close className=\"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-neutral-950 focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-neutral-100 dark:ring-offset-neutral-950 dark:focus:ring-neutral-300 dark:data-[state=open]:bg-neutral-800\">\n\t\t\t\t<X className=\"h-4 w-4\" />\n\t\t\t\t<span className=\"sr-only\">Close</span>\n\t\t\t</SheetPrimitive.Close>\n\t\t</SheetPrimitive.Content>\n\t</SheetPortal>\n));\nSheetContent.displayName = SheetPrimitive.Content.displayName;\n\nconst SheetHeader = ({\n\tclassName,\n\t...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n\t<div\n\t\tclassName={cn(\"flex flex-col space-y-2 text-center sm:text-left\", className)}\n\t\t{...props}\n\t/>\n);\nSheetHeader.displayName = \"SheetHeader\";\n\nconst SheetFooter = ({\n\tclassName,\n\t...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n\t<div\n\t\tclassName={cn(\n\t\t\t\"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n);\nSheetFooter.displayName = \"SheetFooter\";\n\nconst SheetTitle = React.forwardRef<\n\tReact.ElementRef<typeof SheetPrimitive.Title>,\n\tReact.ComponentPropsWithoutRef<typeof SheetPrimitive.Title>\n>(({ className, ...props }, ref) => (\n\t<SheetPrimitive.Title\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"text-lg font-semibold text-neutral-950 dark:text-neutral-50\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nSheetTitle.displayName = SheetPrimitive.Title.displayName;\n\nconst SheetDescription = React.forwardRef<\n\tReact.ElementRef<typeof SheetPrimitive.Description>,\n\tReact.ComponentPropsWithoutRef<typeof SheetPrimitive.Description>\n>(({ className, ...props }, ref) => (\n\t<SheetPrimitive.Description\n\t\tref={ref}\n\t\tclassName={cn(\"text-sm text-neutral-500 dark:text-neutral-400\", className)}\n\t\t{...props}\n\t/>\n));\nSheetDescription.displayName = SheetPrimitive.Description.displayName;\n\nexport {\n\tSheet,\n\tSheetPortal,\n\tSheetOverlay,\n\tSheetTrigger,\n\tSheetClose,\n\tSheetContent,\n\tSheetHeader,\n\tSheetFooter,\n\tSheetTitle,\n\tSheetDescription,\n};\n"
  },
  {
    "path": "cofounder/dashboard/src/components/ui/skeleton.tsx",
    "content": "import { cn } from \"@/lib/utils\";\n\nfunction Skeleton({\n\tclassName,\n\t...props\n}: React.HTMLAttributes<HTMLDivElement>) {\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\n\t\t\t\t\"animate-pulse rounded-md bg-neutral-100 dark:bg-neutral-800\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport { Skeleton };\n"
  },
  {
    "path": "cofounder/dashboard/src/components/ui/slider.tsx",
    "content": "import * as React from \"react\";\nimport * as SliderPrimitive from \"@radix-ui/react-slider\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst Slider = React.forwardRef<\n\tReact.ElementRef<typeof SliderPrimitive.Root>,\n\tReact.ComponentPropsWithoutRef<typeof SliderPrimitive.Root>\n>(({ className, ...props }, ref) => (\n\t<SliderPrimitive.Root\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"relative flex w-full touch-none select-none items-center\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t>\n\t\t<SliderPrimitive.Track className=\"relative h-2 w-full grow overflow-hidden rounded-full bg-neutral-100 dark:bg-neutral-800\">\n\t\t\t<SliderPrimitive.Range className=\"absolute h-full bg-neutral-900 dark:bg-neutral-50\" />\n\t\t</SliderPrimitive.Track>\n\t\t<SliderPrimitive.Thumb className=\"block h-5 w-5 rounded-full border-2 border-neutral-900 bg-white ring-offset-white transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-neutral-950 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 dark:border-neutral-50 dark:bg-neutral-950 dark:ring-offset-neutral-950 dark:focus-visible:ring-neutral-300\" />\n\t</SliderPrimitive.Root>\n));\nSlider.displayName = SliderPrimitive.Root.displayName;\n\nexport { Slider };\n"
  },
  {
    "path": "cofounder/dashboard/src/components/ui/sonner.tsx",
    "content": "import { useTheme } from \"next-themes\";\nimport { Toaster as Sonner } from \"sonner\";\n\ntype ToasterProps = React.ComponentProps<typeof Sonner>;\n\nconst Toaster = ({ ...props }: ToasterProps) => {\n\tconst { theme = \"system\" } = useTheme();\n\n\treturn (\n\t\t<Sonner\n\t\t\ttheme={theme as ToasterProps[\"theme\"]}\n\t\t\tclassName=\"toaster group\"\n\t\t\ttoastOptions={{\n\t\t\t\tclassNames: {\n\t\t\t\t\ttoast:\n\t\t\t\t\t\t\"group toast group-[.toaster]:bg-white group-[.toaster]:text-neutral-950 group-[.toaster]:border-neutral-200 group-[.toaster]:shadow-lg dark:group-[.toaster]:bg-neutral-950 dark:group-[.toaster]:text-neutral-50 dark:group-[.toaster]:border-neutral-800\",\n\t\t\t\t\tdescription:\n\t\t\t\t\t\t\"group-[.toast]:text-neutral-500 dark:group-[.toast]:text-neutral-400\",\n\t\t\t\t\tactionButton:\n\t\t\t\t\t\t\"group-[.toast]:bg-neutral-900 group-[.toast]:text-neutral-50 dark:group-[.toast]:bg-neutral-50 dark:group-[.toast]:text-neutral-900\",\n\t\t\t\t\tcancelButton:\n\t\t\t\t\t\t\"group-[.toast]:bg-neutral-100 group-[.toast]:text-neutral-500 dark:group-[.toast]:bg-neutral-800 dark:group-[.toast]:text-neutral-400\",\n\t\t\t\t},\n\t\t\t}}\n\t\t\t{...props}\n\t\t/>\n\t);\n};\n\nexport { Toaster };\n"
  },
  {
    "path": "cofounder/dashboard/src/components/ui/switch.tsx",
    "content": "import * as React from \"react\";\nimport * as SwitchPrimitives from \"@radix-ui/react-switch\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst Switch = React.forwardRef<\n\tReact.ElementRef<typeof SwitchPrimitives.Root>,\n\tReact.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root>\n>(({ className, ...props }, ref) => (\n\t<SwitchPrimitives.Root\n\t\tclassName={cn(\n\t\t\t\"peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-neutral-950 focus-visible:ring-offset-2 focus-visible:ring-offset-white disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-neutral-900 data-[state=unchecked]:bg-neutral-200 dark:focus-visible:ring-neutral-300 dark:focus-visible:ring-offset-neutral-950 dark:data-[state=checked]:bg-neutral-50 dark:data-[state=unchecked]:bg-neutral-800\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t\tref={ref}\n\t>\n\t\t<SwitchPrimitives.Thumb\n\t\t\tclassName={cn(\n\t\t\t\t\"pointer-events-none block h-5 w-5 rounded-full bg-white shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0 dark:bg-neutral-950\",\n\t\t\t)}\n\t\t/>\n\t</SwitchPrimitives.Root>\n));\nSwitch.displayName = SwitchPrimitives.Root.displayName;\n\nexport { Switch };\n"
  },
  {
    "path": "cofounder/dashboard/src/components/ui/table.tsx",
    "content": "import * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst Table = React.forwardRef<\n\tHTMLTableElement,\n\tReact.HTMLAttributes<HTMLTableElement>\n>(({ className, ...props }, ref) => (\n\t<div className=\"relative w-full overflow-auto\">\n\t\t<table\n\t\t\tref={ref}\n\t\t\tclassName={cn(\"w-full caption-bottom text-sm\", className)}\n\t\t\t{...props}\n\t\t/>\n\t</div>\n));\nTable.displayName = \"Table\";\n\nconst TableHeader = React.forwardRef<\n\tHTMLTableSectionElement,\n\tReact.HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n\t<thead ref={ref} className={cn(\"[&_tr]:border-b\", className)} {...props} />\n));\nTableHeader.displayName = \"TableHeader\";\n\nconst TableBody = React.forwardRef<\n\tHTMLTableSectionElement,\n\tReact.HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n\t<tbody\n\t\tref={ref}\n\t\tclassName={cn(\"[&_tr:last-child]:border-0\", className)}\n\t\t{...props}\n\t/>\n));\nTableBody.displayName = \"TableBody\";\n\nconst TableFooter = React.forwardRef<\n\tHTMLTableSectionElement,\n\tReact.HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n\t<tfoot\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"border-t bg-neutral-100/50 font-medium [&>tr]:last:border-b-0 dark:bg-neutral-800/50\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nTableFooter.displayName = \"TableFooter\";\n\nconst TableRow = React.forwardRef<\n\tHTMLTableRowElement,\n\tReact.HTMLAttributes<HTMLTableRowElement>\n>(({ className, ...props }, ref) => (\n\t<tr\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"border-b transition-colors hover:bg-neutral-100/50 data-[state=selected]:bg-neutral-100 dark:hover:bg-neutral-800/50 dark:data-[state=selected]:bg-neutral-800\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nTableRow.displayName = \"TableRow\";\n\nconst TableHead = React.forwardRef<\n\tHTMLTableCellElement,\n\tReact.ThHTMLAttributes<HTMLTableCellElement>\n>(({ className, ...props }, ref) => (\n\t<th\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"h-12 px-4 text-left align-middle font-medium text-neutral-500 [&:has([role=checkbox])]:pr-0 dark:text-neutral-400\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nTableHead.displayName = \"TableHead\";\n\nconst TableCell = React.forwardRef<\n\tHTMLTableCellElement,\n\tReact.TdHTMLAttributes<HTMLTableCellElement>\n>(({ className, ...props }, ref) => (\n\t<td\n\t\tref={ref}\n\t\tclassName={cn(\"p-4 align-middle [&:has([role=checkbox])]:pr-0\", className)}\n\t\t{...props}\n\t/>\n));\nTableCell.displayName = \"TableCell\";\n\nconst TableCaption = React.forwardRef<\n\tHTMLTableCaptionElement,\n\tReact.HTMLAttributes<HTMLTableCaptionElement>\n>(({ className, ...props }, ref) => (\n\t<caption\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"mt-4 text-sm text-neutral-500 dark:text-neutral-400\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nTableCaption.displayName = \"TableCaption\";\n\nexport {\n\tTable,\n\tTableHeader,\n\tTableBody,\n\tTableFooter,\n\tTableHead,\n\tTableRow,\n\tTableCell,\n\tTableCaption,\n};\n"
  },
  {
    "path": "cofounder/dashboard/src/components/ui/tabs.tsx",
    "content": "import * as React from \"react\";\nimport * as TabsPrimitive from \"@radix-ui/react-tabs\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst Tabs = TabsPrimitive.Root;\n\nconst TabsList = React.forwardRef<\n\tReact.ElementRef<typeof TabsPrimitive.List>,\n\tReact.ComponentPropsWithoutRef<typeof TabsPrimitive.List>\n>(({ className, ...props }, ref) => (\n\t<TabsPrimitive.List\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"inline-flex h-10 items-center justify-center rounded-md bg-neutral-100 p-1 text-neutral-500 dark:bg-neutral-800 dark:text-neutral-400\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nTabsList.displayName = TabsPrimitive.List.displayName;\n\nconst TabsTrigger = React.forwardRef<\n\tReact.ElementRef<typeof TabsPrimitive.Trigger>,\n\tReact.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>\n>(({ className, ...props }, ref) => (\n\t<TabsPrimitive.Trigger\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-white transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-neutral-950 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-white data-[state=active]:text-neutral-950 data-[state=active]:shadow-sm dark:ring-offset-neutral-950 dark:focus-visible:ring-neutral-300 dark:data-[state=active]:bg-neutral-950 dark:data-[state=active]:text-neutral-50\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nTabsTrigger.displayName = TabsPrimitive.Trigger.displayName;\n\nconst TabsContent = React.forwardRef<\n\tReact.ElementRef<typeof TabsPrimitive.Content>,\n\tReact.ComponentPropsWithoutRef<typeof TabsPrimitive.Content>\n>(({ className, ...props }, ref) => (\n\t<TabsPrimitive.Content\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"mt-2 ring-offset-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-neutral-950 focus-visible:ring-offset-2 dark:ring-offset-neutral-950 dark:focus-visible:ring-neutral-300\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nTabsContent.displayName = TabsPrimitive.Content.displayName;\n\nexport { Tabs, TabsList, TabsTrigger, TabsContent };\n"
  },
  {
    "path": "cofounder/dashboard/src/components/ui/textarea.tsx",
    "content": "import * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nexport interface TextareaProps\n\textends React.TextareaHTMLAttributes<HTMLTextAreaElement> {}\n\nconst Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(\n\t({ className, ...props }, ref) => {\n\t\treturn (\n\t\t\t<textarea\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"flex min-h-[80px] w-full rounded-md border border-neutral-200 bg-white px-3 py-2 text-sm ring-offset-white placeholder:text-neutral-500 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-neutral-950 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 dark:border-neutral-800 dark:bg-neutral-950 dark:ring-offset-neutral-950 dark:placeholder:text-neutral-400 dark:focus-visible:ring-neutral-300\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\tref={ref}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t},\n);\nTextarea.displayName = \"Textarea\";\n\nexport { Textarea };\n"
  },
  {
    "path": "cofounder/dashboard/src/components/ui/toast.tsx",
    "content": "import * as React from \"react\";\nimport * as ToastPrimitives from \"@radix-ui/react-toast\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { X } from \"lucide-react\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst ToastProvider = ToastPrimitives.Provider;\n\nconst ToastViewport = React.forwardRef<\n\tReact.ElementRef<typeof ToastPrimitives.Viewport>,\n\tReact.ComponentPropsWithoutRef<typeof ToastPrimitives.Viewport>\n>(({ className, ...props }, ref) => (\n\t<ToastPrimitives.Viewport\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nToastViewport.displayName = ToastPrimitives.Viewport.displayName;\n\nconst toastVariants = cva(\n\t\"group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border border-neutral-200 p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full dark:border-neutral-800\",\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tdefault:\n\t\t\t\t\t\"border bg-white text-neutral-950 dark:bg-neutral-950 dark:text-neutral-50\",\n\t\t\t\tdestructive:\n\t\t\t\t\t\"destructive group border-red-500 bg-red-500 text-neutral-50 dark:border-red-900 dark:bg-red-900 dark:text-neutral-50\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tvariant: \"default\",\n\t\t},\n\t},\n);\n\nconst Toast = React.forwardRef<\n\tReact.ElementRef<typeof ToastPrimitives.Root>,\n\tReact.ComponentPropsWithoutRef<typeof ToastPrimitives.Root> &\n\t\tVariantProps<typeof toastVariants>\n>(({ className, variant, ...props }, ref) => {\n\treturn (\n\t\t<ToastPrimitives.Root\n\t\t\tref={ref}\n\t\t\tclassName={cn(toastVariants({ variant }), className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\nToast.displayName = ToastPrimitives.Root.displayName;\n\nconst ToastAction = React.forwardRef<\n\tReact.ElementRef<typeof ToastPrimitives.Action>,\n\tReact.ComponentPropsWithoutRef<typeof ToastPrimitives.Action>\n>(({ className, ...props }, ref) => (\n\t<ToastPrimitives.Action\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"inline-flex h-8 shrink-0 items-center justify-center rounded-md border border-neutral-200 bg-transparent px-3 text-sm font-medium ring-offset-white transition-colors hover:bg-neutral-100 focus:outline-none focus:ring-2 focus:ring-neutral-950 focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-neutral-100/40 group-[.destructive]:hover:border-red-500/30 group-[.destructive]:hover:bg-red-500 group-[.destructive]:hover:text-neutral-50 group-[.destructive]:focus:ring-red-500 dark:border-neutral-800 dark:ring-offset-neutral-950 dark:hover:bg-neutral-800 dark:focus:ring-neutral-300 dark:group-[.destructive]:border-neutral-800/40 dark:group-[.destructive]:hover:border-red-900/30 dark:group-[.destructive]:hover:bg-red-900 dark:group-[.destructive]:hover:text-neutral-50 dark:group-[.destructive]:focus:ring-red-900\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nToastAction.displayName = ToastPrimitives.Action.displayName;\n\nconst ToastClose = React.forwardRef<\n\tReact.ElementRef<typeof ToastPrimitives.Close>,\n\tReact.ComponentPropsWithoutRef<typeof ToastPrimitives.Close>\n>(({ className, ...props }, ref) => (\n\t<ToastPrimitives.Close\n\t\tref={ref}\n\t\tclassName={cn(\n\t\t\t\"absolute right-2 top-2 rounded-md p-1 text-neutral-950/50 opacity-0 transition-opacity hover:text-neutral-950 focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600 dark:text-neutral-50/50 dark:hover:text-neutral-50\",\n\t\t\tclassName,\n\t\t)}\n\t\ttoast-close=\"\"\n\t\t{...props}\n\t>\n\t\t<X className=\"h-4 w-4\" />\n\t</ToastPrimitives.Close>\n));\nToastClose.displayName = ToastPrimitives.Close.displayName;\n\nconst ToastTitle = React.forwardRef<\n\tReact.ElementRef<typeof ToastPrimitives.Title>,\n\tReact.ComponentPropsWithoutRef<typeof ToastPrimitives.Title>\n>(({ className, ...props }, ref) => (\n\t<ToastPrimitives.Title\n\t\tref={ref}\n\t\tclassName={cn(\"text-sm font-semibold\", className)}\n\t\t{...props}\n\t/>\n));\nToastTitle.displayName = ToastPrimitives.Title.displayName;\n\nconst ToastDescription = React.forwardRef<\n\tReact.ElementRef<typeof ToastPrimitives.Description>,\n\tReact.ComponentPropsWithoutRef<typeof ToastPrimitives.Description>\n>(({ className, ...props }, ref) => (\n\t<ToastPrimitives.Description\n\t\tref={ref}\n\t\tclassName={cn(\"text-sm opacity-90\", className)}\n\t\t{...props}\n\t/>\n));\nToastDescription.displayName = ToastPrimitives.Description.displayName;\n\ntype ToastProps = React.ComponentPropsWithoutRef<typeof Toast>;\n\ntype ToastActionElement = React.ReactElement<typeof ToastAction>;\n\nexport {\n\ttype ToastProps,\n\ttype ToastActionElement,\n\tToastProvider,\n\tToastViewport,\n\tToast,\n\tToastTitle,\n\tToastDescription,\n\tToastClose,\n\tToastAction,\n};\n"
  },
  {
    "path": "cofounder/dashboard/src/components/ui/toaster.tsx",
    "content": "import { useToast } from \"@/hooks/use-toast\";\nimport {\n\tToast,\n\tToastClose,\n\tToastDescription,\n\tToastProvider,\n\tToastTitle,\n\tToastViewport,\n} from \"@/components/ui/toast\";\n\nexport function Toaster() {\n\tconst { toasts } = useToast();\n\n\treturn (\n\t\t<ToastProvider>\n\t\t\t{toasts.map(function ({ id, title, description, action, ...props }) {\n\t\t\t\treturn (\n\t\t\t\t\t<Toast key={id} {...props}>\n\t\t\t\t\t\t<div className=\"grid gap-1\">\n\t\t\t\t\t\t\t{title && <ToastTitle>{title}</ToastTitle>}\n\t\t\t\t\t\t\t{description && <ToastDescription>{description}</ToastDescription>}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{action}\n\t\t\t\t\t\t<ToastClose />\n\t\t\t\t\t</Toast>\n\t\t\t\t);\n\t\t\t})}\n\t\t\t<ToastViewport />\n\t\t</ToastProvider>\n\t);\n}\n"
  },
  {
    "path": "cofounder/dashboard/src/components/ui/toggle-group.tsx",
    "content": "import * as React from \"react\";\nimport * as ToggleGroupPrimitive from \"@radix-ui/react-toggle-group\";\nimport { type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"@/lib/utils\";\nimport { toggleVariants } from \"@/components/ui/toggle\";\n\nconst ToggleGroupContext = React.createContext<\n\tVariantProps<typeof toggleVariants>\n>({\n\tsize: \"default\",\n\tvariant: \"default\",\n});\n\nconst ToggleGroup = React.forwardRef<\n\tReact.ElementRef<typeof ToggleGroupPrimitive.Root>,\n\tReact.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Root> &\n\t\tVariantProps<typeof toggleVariants>\n>(({ className, variant, size, children, ...props }, ref) => (\n\t<ToggleGroupPrimitive.Root\n\t\tref={ref}\n\t\tclassName={cn(\"flex items-center justify-center gap-1\", className)}\n\t\t{...props}\n\t>\n\t\t<ToggleGroupContext.Provider value={{ variant, size }}>\n\t\t\t{children}\n\t\t</ToggleGroupContext.Provider>\n\t</ToggleGroupPrimitive.Root>\n));\n\nToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;\n\nconst ToggleGroupItem = React.forwardRef<\n\tReact.ElementRef<typeof ToggleGroupPrimitive.Item>,\n\tReact.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Item> &\n\t\tVariantProps<typeof toggleVariants>\n>(({ className, children, variant, size, ...props }, ref) => {\n\tconst context = React.useContext(ToggleGroupContext);\n\n\treturn (\n\t\t<ToggleGroupPrimitive.Item\n\t\t\tref={ref}\n\t\t\tclassName={cn(\n\t\t\t\ttoggleVariants({\n\t\t\t\t\tvariant: context.variant || variant,\n\t\t\t\t\tsize: context.size || size,\n\t\t\t\t}),\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t</ToggleGroupPrimitive.Item>\n\t);\n});\n\nToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;\n\nexport { ToggleGroup, ToggleGroupItem };\n"
  },
  {
    "path": "cofounder/dashboard/src/components/ui/toggle.tsx",
    "content": "import * as React from \"react\";\nimport * as TogglePrimitive from \"@radix-ui/react-toggle\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst toggleVariants = cva(\n\t\"inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-white transition-colors hover:bg-neutral-100 hover:text-neutral-500 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-neutral-950 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-neutral-100 data-[state=on]:text-neutral-900 dark:ring-offset-neutral-950 dark:hover:bg-neutral-800 dark:hover:text-neutral-400 dark:focus-visible:ring-neutral-300 dark:data-[state=on]:bg-neutral-800 dark:data-[state=on]:text-neutral-50\",\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tdefault: \"bg-transparent\",\n\t\t\t\toutline:\n\t\t\t\t\t\"border border-neutral-200 bg-transparent hover:bg-neutral-100 hover:text-neutral-900 dark:border-neutral-800 dark:hover:bg-neutral-800 dark:hover:text-neutral-50\",\n\t\t\t},\n\t\t\tsize: {\n\t\t\t\tdefault: \"h-10 px-3\",\n\t\t\t\tsm: \"h-9 px-2.5\",\n\t\t\t\tlg: \"h-11 px-5\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tvariant: \"default\",\n\t\t\tsize: \"default\",\n\t\t},\n\t},\n);\n\nconst Toggle = React.forwardRef<\n\tReact.ElementRef<typeof TogglePrimitive.Root>,\n\tReact.ComponentPropsWithoutRef<typeof TogglePrimitive.Root> &\n\t\tVariantProps<typeof toggleVariants>\n>(({ className, variant, size, ...props }, ref) => (\n\t<TogglePrimitive.Root\n\t\tref={ref}\n\t\tclassName={cn(toggleVariants({ variant, size, className }))}\n\t\t{...props}\n\t/>\n));\n\nToggle.displayName = TogglePrimitive.Root.displayName;\n\nexport { Toggle, toggleVariants };\n"
  },
  {
    "path": "cofounder/dashboard/src/components/ui/tooltip.tsx",
    "content": "import * as React from \"react\";\nimport * as TooltipPrimitive from \"@radix-ui/react-tooltip\";\n\nimport { cn } from \"@/lib/utils\";\n\nconst TooltipProvider = TooltipPrimitive.Provider;\n\nconst Tooltip = TooltipPrimitive.Root;\n\nconst TooltipTrigger = TooltipPrimitive.Trigger;\n\nconst TooltipContent = React.forwardRef<\n\tReact.ElementRef<typeof TooltipPrimitive.Content>,\n\tReact.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n\t<TooltipPrimitive.Content\n\t\tref={ref}\n\t\tsideOffset={sideOffset}\n\t\tclassName={cn(\n\t\t\t\"z-50 overflow-hidden rounded-md border border-neutral-200 bg-white px-3 py-1.5 text-sm text-neutral-950 shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nTooltipContent.displayName = TooltipPrimitive.Content.displayName;\n\nexport { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };\n"
  },
  {
    "path": "cofounder/dashboard/src/components/views/component-designer.tsx",
    "content": "import React from \"react\";\n\nconst ComponentDesigner: React.FC = () => {\n\treturn (\n\t\t<div className=\"flex items-center justify-center h-screen w-full text-white\">\n\t\t\t<h1 className=\"text-2xl font-light opacity-50 text-center whitespace-pre-wrap break-words\">\n\t\t\t\t{`{ playground/designer : not implemented yet }`}\n\t\t\t\t<br/>\n\t\t\t\t{`component designer enabled on projects (auto)`}\n\t\t\t</h1>\n\t\t</div>\n\t);\n};\n\nexport default ComponentDesigner;\n"
  },
  {
    "path": "cofounder/dashboard/src/components/views/events.tsx",
    "content": "import React, { useCallback, useState, useEffect, useRef } from \"react\";\nimport { useDispatch, useSelector } from \"react-redux\";\nimport { setProject } from \"@/store/main\";\n\nconst Events: React.FC<{ project: string }> = ({ project }) => {\n\tconst dispatch = useDispatch();\n\tconst streams = useSelector((state: any) => state.project.streamEvents);\n\tconst [sidebarExpanded, setSidebarExpanded] = useState(true);\n\tconst [streamExpandedKey, setStreamExpandedKey] = useState(\"\");\n\tconst [streamStayExpanded, setStreamStayExpanded] = useState(false);\n\n\tconst streamContainerRef = useRef<HTMLDivElement>(null);\n\n\t/*\n    useEffect(() => {\n    if (streamContainerRef.current) {\n      streamContainerRef.current.scrollTop = streamContainerRef.current.scrollHeight;\n    }\n  }, [node_stream]);\n  */\n\n\tuseEffect(() => {\n\t\tconst filtered_streams = Object.entries(streams).filter(\n\t\t\t([_, item]) => item.is_running,\n\t\t);\n\t\tif (filtered_streams.length && streamExpandedKey?.length) {\n\t\t\tstreamContainerRef.current.scrollTop =\n\t\t\t\tstreamContainerRef.current.scrollHeight;\n\t\t}\n\t}, [streams]);\n\n\treturn (\n\t\t<>\n\t\t\t{(Object.keys(streams).length && streamExpandedKey?.length && (\n\t\t\t\t<>\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName=\"fixed top-0 left-0 inset-0 flex items-start justify-center\n\t\t\t\t\t\t\t\t\t\t\t\th-[80vh] w-[75vw] overflow-hidden\"\n\t\t\t\t\t\tstyle={{ zIndex: 999 }}\n\t\t\t\t\t>\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName={`text-white text-sm font-light\n\t\t\t\t\t\t\t\t\t\t\t\t\toverflow-auto shadow-2xl rounded rounded-lg\n\t\t\t\t\t\t\t\t\t\t\t\t\tbg-[#444]/30 backdrop-blur-md\n\t\t\t\t\t\t\t\t\t\t\t\t\twhitespace-pre-wrap break-words\n\t\t\t\t\t\t\t\t\t\t\t\t\tmt-[10vh]\n\t\t\t\t\t\t\t\t\t\t\t\t\tw-full\n                          max-h-[65vh]\n\t\t\t\t\t\t\t\t\t\t\t\t\tm-12 p-12\n\t\t\t\t\t\t\t\t\t\t\t\t\tduration-300`}\n\t\t\t\t\t\t\tref={streamContainerRef}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<p>{streams[streamExpandedKey]?.data?.data?.trim()}</p>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</>\n\t\t\t)) || <></>}\n\n\t\t\t<div\n\t\t\t\tclassName={`dark text-white\n\t\t\t\t\t\t\t\t\t\t\tfixed top-0 right-0 m-4\n\t\t\t\t\t\t\t\t\t\t\t${\n\t\t\t\t\t\t\t\t\t\t\t\tsidebarExpanded\n\t\t\t\t\t\t\t\t\t\t\t\t\t? \"w-[25vw] h-[70vh] p-8 bg-[#333]/20\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t: \"w-[3vw] h-[70vh] flex items-center justify-center text-center cursor-pointer bg-[#666]/20 hover:bg-white/20\"\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tbackdrop-blur-md\n\t\t\t\t\t\t\t\t\t\t\trounded rounded-lg duration-300`}\n\t\t\t\tonClick={() => {\n\t\t\t\t\tif (!sidebarExpanded) setSidebarExpanded(true);\n\t\t\t\t}}\n\t\t\t\tstyle={{ zIndex: 2 }}\n\t\t\t>\n\t\t\t\t<div>\n\t\t\t\t\t<a\n\t\t\t\t\t\tclassName={`cursor-pointer hover:text-[#ccc] duration-200  ${sidebarExpanded ? \"\" : \"text-xl font-light\"}`}\n\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\tsetSidebarExpanded(!sidebarExpanded);\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t{`${sidebarExpanded ? \"Operations Streams >\" : \"<\"}`}\n\t\t\t\t\t</a>\n\t\t\t\t\t{(sidebarExpanded && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<div className=\"py-2 mt-2 border-t border-[#222] max-h-[60vh] overflow-auto\">\n\t\t\t\t\t\t\t\t{(!Object.keys(streams).length && (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t<h2 className=\"opacity-50 text-lg font-light\">\n\t\t\t\t\t\t\t\t\t\t\tNo current streaming operations\n\t\t\t\t\t\t\t\t\t\t</h2>\n\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t)) || <></>}\n\n\t\t\t\t\t\t\t\t{Object.entries(streams)\n\t\t\t\t\t\t\t\t\t.filter(([_, item]) => item.is_running)\n\t\t\t\t\t\t\t\t\t.map(([key, item], index) => (\n\t\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\t\tkey={key}\n\t\t\t\t\t\t\t\t\t\t\tclassName={`group p-2 my-2 rounded bg-[#222] hover:bg-black cursor-pointer duration-200 font-light whitespace-pre-wrap break-words`}\n\t\t\t\t\t\t\t\t\t\t\tonMouseEnter={() => {\n\t\t\t\t\t\t\t\t\t\t\t\tsetStreamExpandedKey(key);\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\tonMouseLeave={() => {\n\t\t\t\t\t\t\t\t\t\t\t\tif (!streamStayExpanded) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tsetStreamExpandedKey(\"\");\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\t\t\tif (!streamStayExpanded) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tsetStreamExpandedKey(key);\n\t\t\t\t\t\t\t\t\t\t\t\t\tsetStreamStayExpanded(true);\n\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\tsetStreamExpandedKey(\"\");\n\t\t\t\t\t\t\t\t\t\t\t\t\tsetStreamStayExpanded(false);\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex gap-2 items-center mb-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t<div role=\"status\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"w-3 h-3 text-gray-200 animate-spin fill-[#666]\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tviewBox=\"0 0 100 101\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\td=\"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\td=\"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfill=\"currentFill\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span className=\"sr-only\">Loading...</span>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t<h2 className=\"text-sm\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t{item.meta?.name ? item.meta.name : item.data.key}\n\t\t\t\t\t\t\t\t\t\t\t\t</h2>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t{(item.meta?.desc && (\n\t\t\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex gap-2 items-center mb-1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div role=\"status opacity-0\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"opacity-0 w-3 h-3 text-gray-200 animate-spin fill-[#666]\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tviewBox=\"0 0 100 101\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\td=\"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\td=\"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfill=\"currentFill\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<h3 className=\"text-xs text-[#aaa]\">{item.meta?.desc}</h3>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t\t\t)) || <></>}\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</>\n\t\t\t\t\t)) || <></>}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</>\n\t);\n};\n\nexport default Events;\n"
  },
  {
    "path": "cofounder/dashboard/src/components/views/flow.tsx",
    "content": "import React, { useCallback, useState, useEffect } from \"react\";\nimport \"@/components/styles/flow.css\";\n\nimport {\n\tReactFlow,\n\tMiniMap,\n\tControls,\n\tBackground,\n\tuseNodesState,\n\tuseEdgesState,\n\taddEdge,\n\tColorMode,\n\tMarkerType,\n} from \"@xyflow/react\";\n\nimport FloatingEdge from \"@/components/flow/helpers/FloatingEdge\";\nimport FloatingConnectionLine from \"@/components/flow/helpers/FloatingConnectionLine\";\nimport { createNodesAndEdges } from \"@/components/flow/helpers/utils\";\nimport \"@/components/flow/helpers/floating.css\";\n\nimport { useDispatch, useSelector } from \"react-redux\";\nimport { setProject } from \"@/store/main\";\n\nimport template from \"@/components/flow/template.tsx\";\nimport keymap from \"@/components/flow/keymap.tsx\";\n\nimport CofounderNode from \"@/components/flow/nodes/cofounder-node.tsx\";\nimport \"@/components/flow/nodes/cofounder-node.css\";\n\n// register new components types\nconst nodeTypes = {\n\tcofounder_node: CofounderNode,\n};\nconst edgeTypes = {\n\tfloating: FloatingEdge,\n};\n\nconst proOptions = {\n\t// hideAttribution: true\n};\n\n/*\nconst initialNodes = [\n  { id: '1', position: { x: 0, y: 0 }, data: { label: '1' } },\n  { id: '2', position: { x: 0, y: 100 }, data: { label: '2' } },\n];\nconst initialEdges = [{ id: 'e1-2', source: '1', target: '2' }];\n*/\n\nconst initialNodes = [];\nconst initialEdges = [];\n\nconst Flow: React.FC<{ project: string }> = ({ project }) => {\n\tconst dispatch = useDispatch();\n\tconst nodesKeys = useSelector((state: any) => state.project.nodesKeys);\n\n\tuseEffect(() => {\n\t\t// Set the project in the store when the component loads\n\t\tdispatch(setProject(project));\n\t}, [dispatch, project]);\n\n\tconst [nodes, setNodes, onNodesChange] = useNodesState(initialNodes);\n\tconst [edges, setEdges, onEdgesChange] = useEdgesState(initialEdges);\n\tconst [colorMode, setColorMode] = useState<ColorMode>(\"dark\");\n\n\tconst [loaded, setLoaded] = useState(false);\n\tconst [streamSimulate, setStreamSimulate] = useState<NodeJS.Timeout | null>(\n\t\tnull,\n\t);\n\tconst [refresh, setRefresh] = useState(Date.now());\n\n\tuseEffect(() => {\n\t\tif (nodesKeys && nodesKeys.length) {\n\t\t\tlet _multiple_views = {};\n\t\t\tlet _multiple_views_edges = [];\n\n\t\t\tlet _webapp_views = nodesKeys.filter((node_key) =>\n\t\t\t\tnode_key.startsWith(\"webapp.react.views.\"),\n\t\t\t);\n\t\t\tif (_webapp_views.length) {\n\t\t\t\tconst columns = 5;\n\t\t\t\t_webapp_views.map((key, idx) => {\n\t\t\t\t\tconst vertical_scroll = Math.floor(idx / columns); // increment every n indices\n\t\t\t\t\tconst horizontal_index = idx % columns; // reset every n indices\n\t\t\t\t\t_multiple_views[key] = {\n\t\t\t\t\t\tposition: {\n\t\t\t\t\t\t\tx:\n\t\t\t\t\t\t\t\t(template.metrics.DIST_X * 2 + template.metrics.PADDING_X * 0.5) *\n\t\t\t\t\t\t\t\thorizontal_index,\n\t\t\t\t\t\t\ty:\n\t\t\t\t\t\t\t\ttemplate.nodes[\"webapp.react.views\"].position.y +\n\t\t\t\t\t\t\t\ttemplate.metrics.DIST_Y * 2.5 * vertical_scroll -\n\t\t\t\t\t\t\t\thorizontal_index * template.metrics.PADDING_Y * 2,\n\t\t\t\t\t\t},\n\t\t\t\t\t};\n\t\t\t\t\t_multiple_views_edges.push({\n\t\t\t\t\t\tid: `${\"uxsitemap.structure\"}-${key}`,\n\t\t\t\t\t\tsource: \"uxsitemap.structure\",\n\t\t\t\t\t\ttarget: key,\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t\t// console.log(\"debug : multiple views \", _multiple_views);\n\t\t\t}\n\t\t\tsetNodes((prev) => {\n\t\t\t\tconst previous_ids = {};\n\t\t\t\tprev.map((n) => {\n\t\t\t\t\tprevious_ids[n.id] = { position: n.position };\n\t\t\t\t});\n\t\t\t\treturn (\n\t\t\t\t\tnodesKeys\n\t\t\t\t\t\t.filter((node_key) =>\n\t\t\t\t\t\t\tObject.keys(template.nodes).some((key) => node_key.startsWith(key)),\n\t\t\t\t\t\t)\n\t\t\t\t\t\t//.filter((node_key) => !node_key.startsWith(\"webapp.\"))\n\t\t\t\t\t\t.map((node_key, idx) => {\n\t\t\t\t\t\t\tlet _key = `${node_key}`;\n\t\t\t\t\t\t\tlet _webapp_case = false;\n\t\t\t\t\t\t\tlet _webapp_view_case = false;\n\t\t\t\t\t\t\tif (node_key.startsWith(\"webapp\")) {\n\t\t\t\t\t\t\t\t_key = node_key.split(\".\").slice(0, 3).join(\".\");\n\t\t\t\t\t\t\t\t_webapp_case = true;\n\t\t\t\t\t\t\t\tif (node_key.includes(\"webapp.react.views\")) {\n\t\t\t\t\t\t\t\t\t_webapp_view_case = true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tconst meta = keymap.meta[_key];\n\t\t\t\t\t\t\tconst pos = previous_ids[node_key]\n\t\t\t\t\t\t\t\t? previous_ids[node_key]\n\t\t\t\t\t\t\t\t: !_webapp_case\n\t\t\t\t\t\t\t\t\t? template.nodes[_key]\n\t\t\t\t\t\t\t\t\t: !_webapp_view_case\n\t\t\t\t\t\t\t\t\t\t? template.nodes[_key]\n\t\t\t\t\t\t\t\t\t\t: _multiple_views[node_key];\n\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\ttype: \"cofounder_node\",\n\t\t\t\t\t\t\t\tid: node_key,\n\t\t\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\t\t\tkey: node_key,\n\t\t\t\t\t\t\t\t\tmeta: {\n\t\t\t\t\t\t\t\t\t\t...meta,\n\t\t\t\t\t\t\t\t\t\tcontent_type: keymap.types[meta.type],\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t...pos,\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.filter((e) => e)\n\t\t\t\t);\n\t\t\t});\n\n\t\t\tsetEdges([\n\t\t\t\t...template.edges,\n\t\t\t\t..._multiple_views_edges.map((item) => {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tanimated: true,\n\t\t\t\t\t\tstyle: { stroke: \"#999\" },\n\t\t\t\t\t\ttype: \"floating\",\n\t\t\t\t\t\tmarkerEnd: {\n\t\t\t\t\t\t\ttype: MarkerType.ArrowClosed,\n\t\t\t\t\t\t\twidth: 30,\n\t\t\t\t\t\t\theight: 30,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t...item,\n\t\t\t\t\t};\n\t\t\t\t}),\n\t\t\t]);\n\t\t\t// setRefresh(Date.now())\n\t\t}\n\t}, [nodesKeys]);\n\n\tconst onConnect = useCallback(\n\t\t(params) =>\n\t\t\tsetEdges((eds) =>\n\t\t\t\taddEdge(\n\t\t\t\t\t{\n\t\t\t\t\t\t...params,\n\t\t\t\t\t\ttype: \"floating\",\n\t\t\t\t\t\tmarkerEnd: {\n\t\t\t\t\t\t\ttype: MarkerType.Arrow,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\teds,\n\t\t\t\t),\n\t\t\t),\n\t\t[setEdges],\n\t);\n\n\treturn (\n\t\t<div style={{ width: \"100vw\", height: \"100vh\" }}>\n\t\t\t<pre className=\"m-4 p-4 bg-black text-white text-sm hidden\">\n\t\t\t\t{JSON.stringify(nodes)}\n\t\t\t</pre>\n\t\t\t<ReactFlow\n\t\t\t\tkey={refresh}\n\t\t\t\tcolorMode={colorMode}\n\t\t\t\tnodes={nodes}\n\t\t\t\tedges={edges}\n\t\t\t\tonNodesChange={onNodesChange}\n\t\t\t\tonEdgesChange={onEdgesChange}\n\t\t\t\tonConnect={onConnect}\n\t\t\t\tfitView\n\t\t\t\tminZoom={0.1}\n\t\t\t\tedgeTypes={edgeTypes}\n\t\t\t\tconnectionLineComponent={FloatingConnectionLine}\n\t\t\t\tnodeTypes={nodeTypes}\n\t\t\t\tproOptions={proOptions}\n\t\t\t>\n\t\t\t\t<Controls />\n\t\t\t\t<MiniMap />\n\t\t\t\t<Background variant=\"dots\" gap={48} size={2} />\n\t\t\t</ReactFlow>\n\t\t</div>\n\t);\n};\n\nexport default Flow;\n"
  },
  {
    "path": "cofounder/dashboard/src/components/views/project.tsx",
    "content": "import React, { useCallback, useState, useEffect } from \"react\";\nimport { useParams } from \"react-router-dom\";\nimport { Link } from \"react-router-dom\";\n\nimport { useDispatch, useSelector } from \"react-redux\";\nimport { resetProject } from \"@/store/main\";\n\nimport Flow from \"@/components/views/flow.tsx\";\nimport Events from \"@/components/views/events.tsx\";\nimport { ExternalLink } from \"lucide-react\";\n\nconst Project: React.FC = () => {\n\tconst { project } = useParams();\n\tconst [tab, setTab] = useState(\"blueprint\");\n\tconst [pingServer, setPingServer] = useState(false);\n\tconst [pingApp, setPingApp] = useState(false);\n\tconst [pingServerChecked, setPingServerChecked] = useState(false);\n\n\tconst [initialLoad, setInitialLoad] = useState(false);\n\n\tconst tabs = [\"blueprint\", \"live\", \"editor\", \"export\"];\n\n\tconst SERVER_LOCAL_URL = \"http://localhost:4200/api\";\n\tconst WEBAPP_LOCAL_URL = \"http://localhost:5173\";\n\n\tconst dispatch = useDispatch();\n\n\tuseEffect(() => {\n\t\tif (!initialLoad) {\n\t\t\tsetInitialLoad(true);\n\t\t\tdispatch(resetProject());\n\t\t}\n\t}, []);\n\n\tuseEffect(() => {\n\t\tif (tab === \"blueprint\") {\n\t\t\tconst checkPingServer = async () => {\n\t\t\t\ttry {\n\t\t\t\t\tconst response = await fetch(`${SERVER_LOCAL_URL}/ping`);\n\t\t\t\t\tif (response.ok) {\n\t\t\t\t\t\tsetPingServer(true);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsetPingServer(false);\n\t\t\t\t\t}\n\t\t\t\t} catch (error) {\n\t\t\t\t\tsetPingServer(false);\n\t\t\t\t}\n\t\t\t\tsetPingServerChecked(true);\n\t\t\t};\n\n\t\t\tcheckPingServer();\n\t\t}\n\t\tif (tab === \"live\") {\n\t\t\tconst checkPingApp = async () => {\n\t\t\t\ttry {\n\t\t\t\t\tconst response = await fetch(WEBAPP_LOCAL_URL);\n\t\t\t\t\tif (response.ok) {\n\t\t\t\t\t\tsetPingApp(true);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsetPingApp(false);\n\t\t\t\t\t}\n\t\t\t\t} catch (error) {\n\t\t\t\t\tsetPingApp(false);\n\t\t\t\t}\n\t\t\t};\n\t\t\tcheckPingApp();\n\t\t}\n\t}, [tab]);\n\n\tif (!pingServerChecked) return <></>;\n\treturn (\n\t\t<>\n\t\t\t{(project?.length && (\n\t\t\t\t<>\n\t\t\t\t\t{/*<Cmdl />*/}\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={`fixed top-0 z-10\n\t\t\t\t\t\t\t\t\t\t\tbg-[#333]/20\n\t\t\t\t\t\t\t\t\t\t\tbackdrop-blur-md\n\t\t\t\t\t\t\t\t\t\t\trounded-lg shadow-md\n\t\t\t\t\t\t\t\t\t\t\ttext-sm text-white font-light\n\t\t\t\t\t\t\t\t\t\t\tmt-4 p-2 ml-2 sm:ml-0\n\t\t\t\t\t\t\t\t\t\t\tsm:left-1/2 sm:transform sm:-translate-x-1/2\n\t\t\t\t\t\t\t\t\t\t\tpx-6 `}\n\t\t\t\t\t>\n\t\t\t\t\t\t<ul className=\"flex justify-center space-x-4 items-center\">\n\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\tclassName={`cursor-pointer p-2 rounded-xl hover:bg-[#333]/50 px-3`}\n\t\t\t\t\t\t\t\tkey={project}\n\t\t\t\t\t\t\t\tto={`/projects`}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<li>{\"<\"}</li>\n\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t{tabs.map((tabName) => (\n\t\t\t\t\t\t\t\t<li\n\t\t\t\t\t\t\t\t\tkey={tabName}\n\t\t\t\t\t\t\t\t\tclassName={`cursor-pointer p-2 rounded-xl hover:bg-[#333]/50 flex items-center gap-2 px-3\n\t\t\t\t\t\t\t\t\t\t\t${tab === tabName ? \"bg-black/50\" : \"\"}`}\n\t\t\t\t\t\t\t\t\tonClick={() => setTab(tabName)}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{tabName.charAt(0).toUpperCase() + tabName.slice(1)}\n\t\t\t\t\t\t\t\t\t{(tabName === \"live\" && (\n\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\t\t\t\t\thref=\"http://localhost:5371\"\n\t\t\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t\t\t\trel=\"noopener noreferrer\"\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center rounded-xl hover:bg-[#111] p-2\"\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<ExternalLink className=\"w-3 h-3\" />\n\t\t\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t)) ||\n\t\t\t\t\t\t\t\t\t\t\"\"}\n\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div className={tab === \"blueprint\" ? \"\" : \"hidden\"}>\n\t\t\t\t\t\t{(pingServer && (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<Flow project={project} />\n\t\t\t\t\t\t\t\t<Events project={project} />\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t)) || (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<div className=\"flex items-center justify-center h-screen w-full text-white\">\n\t\t\t\t\t\t\t\t\t<h1 className=\"text-2xl font-light opacity-50 whitespace-pre-wrap break-all\">\n\t\t\t\t\t\t\t\t\t\t{`{ local cofounder/api server at \\`${SERVER_LOCAL_URL}\\` not reachable }`}\n\t\t\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t\t\t{`>\\tmake sure local cofounder server is launched\\n\\t( use \\`npm run start\\` in cofounder/api/ )`}\n\t\t\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div className={tab === \"editor\" ? \"\" : \"hidden\"}>\n\t\t\t\t\t\t<div className=\"flex items-center justify-center h-screen w-full text-white\">\n\t\t\t\t\t\t\t<h1 className=\"text-2xl font-light opacity-50 text-center\">{`{ editor : not implemented yet }`}</h1>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div className={tab === \"export\" ? \"\" : \"hidden\"}>\n\t\t\t\t\t\t<div className=\"flex items-center justify-center h-screen w-full text-white\">\n\t\t\t\t\t\t\t<h1 className=\"text-2xl font-light opacity-50 text-center\">{`{ export : not implemented yet }`}</h1>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div className={tab === \"live\" ? \"\" : \"hidden\"}>\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<div className=\"flex items-center justify-center h-screen w-full text-white\">\n\t\t\t\t\t\t\t\t{(pingApp && (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t<iframe\n\t\t\t\t\t\t\t\t\t\t\tsrc={WEBAPP_LOCAL_URL}\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"w-full mt-[12vh] min-h-[88vh] border-t border-[#222] overflow-auto\"\n\t\t\t\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\t\t\t\tposition: \"absolute\",\n\t\t\t\t\t\t\t\t\t\t\t\ttop: 0,\n\t\t\t\t\t\t\t\t\t\t\t\tleft: 0,\n\t\t\t\t\t\t\t\t\t\t\t\tright: 0,\n\t\t\t\t\t\t\t\t\t\t\t\tbottom: 0,\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\ttitle=\"Live mode\"\n\t\t\t\t\t\t\t\t\t\t\tsandbox=\"allow-same-origin allow-scripts allow-popups allow-forms\"\n\t\t\t\t\t\t\t\t\t\t></iframe>\n\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t)) || (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center justify-center h-screen w-full text-white\">\n\t\t\t\t\t\t\t\t\t\t\t<h1 className=\"text-2xl font-light opacity-50 whitespace-pre-wrap break-all\">\n\t\t\t\t\t\t\t\t\t\t\t\t{`{ app at \\`${WEBAPP_LOCAL_URL}\\` not reachable }`}\n\t\t\t\t\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t\t\t\t\t{`either >\\twebapp vite server not launched\\n\\t\\t\\t\\t( use \\`npm run dev\\` in apps/${project}/ to start )`}\n\t\t\t\t\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t\t\t\t\t<br />\n\t\t\t\t\t\t\t\t\t\t\t\t{`or > problem in app root/store/view`}\n\t\t\t\t\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</>\n\t\t\t\t\t</div>\n\t\t\t\t</>\n\t\t\t)) || (\n\t\t\t\t<>\n\t\t\t\t\t<div className=\"flex items-center justify-center h-screen w-full text-white\">\n\t\t\t\t\t\t<h1 className=\"text-2xl font-light opacity-50 whitespace-pre-wrap break-all\">\n\t\t\t\t\t\t\t{`{ project not set ; double check your url }`}\n\t\t\t\t\t\t</h1>\n\t\t\t\t\t</div>\n\t\t\t\t</>\n\t\t\t)}\n\t\t</>\n\t);\n};\n\nexport default Project;\n"
  },
  {
    "path": "cofounder/dashboard/src/components/views/projects-list.tsx",
    "content": "import React, { useEffect, useState, useRef } from \"react\";\nimport { Link, useNavigate } from \"react-router-dom\";\nimport { motion } from \"framer-motion\";\nimport { useForm } from \"react-hook-form\";\nimport { MicrophoneIcon } from \"@heroicons/react/24/solid\";\n\nimport {\n\tCard,\n\tCardContent,\n\tCardFooter,\n\tCardHeader,\n\tCardTitle,\n} from \"@/components/ui/card\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n\tDialog,\n\tDialogContent,\n\tDialogDescription,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogTitle,\n\tDialogTrigger,\n} from \"@/components/ui/dialog\";\nimport {\n\tForm,\n\tFormControl,\n\tFormDescription,\n\tFormField,\n\tFormItem,\n\tFormLabel,\n\tFormMessage,\n} from \"@/components/ui/form\";\nimport { Input } from \"@/components/ui/input\";\nimport { Textarea } from \"@/components/ui/textarea\";\n\nconst ProjectsList = () => {\n\tconst SERVER_LOCAL_URL = \"http://localhost:4200/api\";\n\tconst [projects, setProjects] = useState([]);\n\tconst [slugifiedId, setSlugifiedId] = useState(\"\");\n\tconst navigate = useNavigate();\n\n\tconst [isRecording, setIsRecording] = useState(false);\n\tconst [audioBlob, setAudioBlob] = useState<Blob | null>(null);\n\tconst mediaRecorderRef = useRef<MediaRecorder | null>(null);\n\tconst audioChunksRef = useRef<Blob[]>([]);\n\n\tconst form = useForm({\n\t\tdefaultValues: {\n\t\t\tproject: \"\",\n\t\t\tdescription: \"\",\n\t\t\taesthetics: \"\",\n\t\t},\n\t});\n\n\tuseEffect(() => {\n\t\tconst fetchProjects = async () => {\n\t\t\ttry {\n\t\t\t\tconst response = await fetch(`${SERVER_LOCAL_URL}/projects/list`);\n\t\t\t\tconst data = await response.json();\n\t\t\t\tsetProjects(data.projects);\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error(\"Failed to fetch projects:\", error);\n\t\t\t}\n\t\t};\n\n\t\tfetchProjects();\n\t}, []);\n\n\tconst slugify = (text: string) => {\n\t\treturn text\n\t\t\t.toString()\n\t\t\t.toLowerCase()\n\t\t\t.replace(/\\s+/g, \"-\")\n\t\t\t.replace(/[^\\w\\-]+/g, \"\")\n\t\t\t.replace(/\\-\\-+/g, \"-\")\n\t\t\t.replace(/^-+/, \"\")\n\t\t\t.replace(/-+$/, \"\");\n\t};\n\n\tconst onSubmit = async (data: any) => {\n\t\ttry {\n\t\t\tconst response = await fetch(`${SERVER_LOCAL_URL}/projects/new`, {\n\t\t\t\tmethod: \"POST\",\n\t\t\t\theaders: {\n\t\t\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t\t},\n\t\t\t\tbody: JSON.stringify(data),\n\t\t\t});\n\t\t\tconst responseData = await response.json();\n\t\t\tnavigate(`/project/${responseData.project}`);\n\t\t} catch (error) {\n\t\t\tconsole.error(\"Failed to create new project:\", error);\n\t\t}\n\t};\n\n\tconst api_resumeProject = async ({ project }) => {\n\t\ttry {\n\t\t\tconst response = await fetch(`${SERVER_LOCAL_URL}/project/resume`, {\n\t\t\t\tmethod: \"POST\",\n\t\t\t\theaders: {\n\t\t\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t\t},\n\t\t\t\tbody: JSON.stringify({ project }),\n\t\t\t});\n\t\t\tconst responseData = await response.json();\n\t\t\tnavigate(`/project/${project}`);\n\t\t} catch (error) {\n\t\t\tconsole.error(\"Failed to resume project:\", error);\n\t\t}\n\t};\n\n\tconst handleRecording = async () => {\n\t\tif (isRecording) {\n\t\t\tstopRecording();\n\t\t} else {\n\t\t\tstartRecording();\n\t\t}\n\t};\n\n\tconst startRecording = async () => {\n\t\ttry {\n\t\t\tconst stream = await navigator.mediaDevices.getUserMedia({ audio: true });\n\t\t\tmediaRecorderRef.current = new MediaRecorder(stream, {\n\t\t\t\tmimeType: \"audio/webm;codecs=opus\",\n\t\t\t});\n\t\t\taudioChunksRef.current = [];\n\n\t\t\tmediaRecorderRef.current.ondataavailable = (event) => {\n\t\t\t\tif (event.data.size > 0) {\n\t\t\t\t\taudioChunksRef.current.push(event.data);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tmediaRecorderRef.current.onstop = async () => {\n\t\t\t\tconst audioBlob = new Blob(audioChunksRef.current, {\n\t\t\t\t\ttype: \"audio/webm;codecs=opus\",\n\t\t\t\t});\n\t\t\t\tsetAudioBlob(audioBlob);\n\n\t\t\t\t// Convert audioBlob to base64\n\t\t\t\tconst reader = new FileReader();\n\t\t\t\treader.onloadend = async () => {\n\t\t\t\t\tconst base64Audio = reader.result as string;\n\t\t\t\t\tconst transcript = await transcribeAudio(base64Audio);\n\t\t\t\t\tif (transcript) {\n\t\t\t\t\t\tform.setValue(\"description\", transcript);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\treader.readAsDataURL(audioBlob);\n\t\t\t};\n\n\t\t\tmediaRecorderRef.current.start();\n\t\t\tsetIsRecording(true);\n\t\t} catch (error) {\n\t\t\tconsole.error(\"Error starting recording:\", error);\n\t\t}\n\t};\n\n\tconst transcribeAudio = async (base64Audio: string) => {\n\t\ttry {\n\t\t\tconst response = await fetch(`${SERVER_LOCAL_URL}/utils/transcribe`, {\n\t\t\t\tmethod: \"POST\",\n\t\t\t\theaders: {\n\t\t\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t\t},\n\t\t\t\tbody: JSON.stringify({ audio: base64Audio }),\n\t\t\t});\n\n\t\t\tif (!response.ok) {\n\t\t\t\tthrow new Error(\"Transcription failed\");\n\t\t\t}\n\n\t\t\tconst data = await response.json();\n\t\t\treturn data.transcript;\n\t\t} catch (error) {\n\t\t\tconsole.error(\"Error transcribing audio:\", error);\n\t\t\treturn null;\n\t\t}\n\t};\n\n\tconst stopRecording = () => {\n\t\tif (mediaRecorderRef.current && isRecording) {\n\t\t\tmediaRecorderRef.current.stop();\n\t\t\tsetIsRecording(false);\n\t\t\t// Stop all tracks on the stream to release the microphone\n\t\t\tif (mediaRecorderRef.current.stream) {\n\t\t\t\tmediaRecorderRef.current.stream\n\t\t\t\t\t.getTracks()\n\t\t\t\t\t.forEach((track) => track.stop());\n\t\t\t}\n\t\t\t// Clear the MediaRecorder reference\n\t\t\tmediaRecorderRef.current = null;\n\t\t}\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<div className=\"flex justify-between items-center mb-6 dark\">\n\t\t\t\t<h1 className=\"text-xl\">Projects</h1>\n\t\t\t\t<Dialog>\n\t\t\t\t\t<DialogTrigger asChild>\n\t\t\t\t\t\t<Button variant=\"secondary\" className=\"font-normal\">\n\t\t\t\t\t\t\t+&nbsp;New Project\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</DialogTrigger>\n\t\t\t\t\t<DialogContent\n\t\t\t\t\t\tclassName=\"font-light text-white bg-[#222] backdrop-blur-md\n                        border-[#222] min-w-[50vw] min-h-[65vh] max-h-[90vh] overflow-auto p-8\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<DialogHeader>\n\t\t\t\t\t\t\t<DialogTitle className=\"font-normal text-xl\">New Project</DialogTitle>\n\t\t\t\t\t\t\t<DialogDescription className=\"text-base text-[#ccc]\">\n\t\t\t\t\t\t\t\tEnter details for your new app project\n\t\t\t\t\t\t\t</DialogDescription>\n\t\t\t\t\t\t</DialogHeader>\n\t\t\t\t\t\t<Form {...form}>\n\t\t\t\t\t\t\t<form\n\t\t\t\t\t\t\t\tonSubmit={form.handleSubmit(onSubmit)}\n\t\t\t\t\t\t\t\tclassName=\"flex flex-col gap-4 py-4\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"project\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem>\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel className=\"font-light text-base\">Project</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\tonChange={(e) => {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfield.onChange(e);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsetSlugifiedId(slugify(e.target.value));\n\t\t\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex-grow bg-[#2a2a2a] border-[#333] text-base\"\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<FormDescription className=\"text-[#aaa] text-sm\">\n\t\t\t\t\t\t\t\t\t\t\t\t{(slugifiedId && `id : ${slugifiedId}`) ||\n\t\t\t\t\t\t\t\t\t\t\t\t\t`only use   a-z/0-9/hypens`}\n\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"description\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem className=\"border-t border-[#333] pt-4\">\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel className=\"font-light text-base\">\n\t\t\t\t\t\t\t\t\t\t\t\tDescription <span className=\"opacity-50\">(required)</span>\n\t\t\t\t\t\t\t\t\t\t\t</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"relative\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Textarea\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex-grow bg-[#2a2a2a] border-[#333] text-base font-light pr-10\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"describe your app to the best extent you can\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\trows={4}\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<motion.button\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tonClick={handleRecording}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"absolute right-4 bottom-4 text-[#aaa] hover:text-white\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twhileHover={{ scale: 1.1 }}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twhileTap={{ scale: 0.9 }}\n\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"p-2 bg-[#111] hover:bg-green-800 rounded opacity-80\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<MicrophoneIcon\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName={`h-4 w-4 ${isRecording ? \"text-red-500\" : \"\"}`}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</motion.button>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t{/*<div className=\"py-2 flex justify-end\">\n                        {audioBlob && (\n                          <audio className=\"w-1/2\" src={URL.createObjectURL(audioBlob)} controls=\"controls\" />\n                        )}\n                      </div>\n                      */}\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<FormField\n\t\t\t\t\t\t\t\t\tcontrol={form.control}\n\t\t\t\t\t\t\t\t\tname=\"aesthetics\"\n\t\t\t\t\t\t\t\t\trender={({ field }) => (\n\t\t\t\t\t\t\t\t\t\t<FormItem className=\"border-t border-[#333] pt-4\">\n\t\t\t\t\t\t\t\t\t\t\t<FormLabel className=\"font-light text-base\">\n\t\t\t\t\t\t\t\t\t\t\t\tAesthetics <span className=\"opacity-50\">(optional)</span>\n\t\t\t\t\t\t\t\t\t\t\t</FormLabel>\n\t\t\t\t\t\t\t\t\t\t\t<FormControl>\n\t\t\t\t\t\t\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\t\t\t\t\t\t\t{...field}\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex-grow bg-[#2a2a2a] border-[#333] text-base\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tplaceholder=\"light theme with blue as primary\"\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</FormControl>\n\t\t\t\t\t\t\t\t\t\t\t<FormDescription className=\"text-[#aaa] text-sm\">\n\t\t\t\t\t\t\t\t\t\t\t\tthe desired overall visual style of your app\n\t\t\t\t\t\t\t\t\t\t\t</FormDescription>\n\t\t\t\t\t\t\t\t\t\t\t<FormMessage />\n\t\t\t\t\t\t\t\t\t\t</FormItem>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t<DialogFooter className=\"mt-4 dark\">\n\t\t\t\t\t\t\t\t\t<Button type=\"submit\" variant=\"outline\" className=\"font-normal\">\n\t\t\t\t\t\t\t\t\t\tCreate Project\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t</DialogFooter>\n\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t</Form>\n\t\t\t\t\t</DialogContent>\n\t\t\t\t</Dialog>\n\t\t\t</div>\n\t\t\t<div className=\"mt-4 pt-4 border-t border-[#222] grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6\">\n\t\t\t\t{projects.map((project: any) => (\n\t\t\t\t\t<Link key={project.id} to={`/project/${project.id}`}>\n\t\t\t\t\t\t<motion.div\n\t\t\t\t\t\t\twhileHover={{ x: 5, transition: { duration: 0.2 } }}\n\t\t\t\t\t\t\twhileTap={{ scale: 0.95 }}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Card className=\"h-full hover:shadow-lg transition-shadow duration-300 bg-[#1a1a1a] border-[#333333] group/card\">\n\t\t\t\t\t\t\t\t<CardHeader>\n\t\t\t\t\t\t\t\t\t<CardTitle className=\"text-xl font-semibold text-[#ffffff] group-hover/card:after:content-['→'] group-hover/card:after:ml-2\">\n\t\t\t\t\t\t\t\t\t\t{project.id}\n\t\t\t\t\t\t\t\t\t</CardTitle>\n\t\t\t\t\t\t\t\t</CardHeader>\n\t\t\t\t\t\t\t\t<CardContent>\n\t\t\t\t\t\t\t\t\t{project.data && (\n\t\t\t\t\t\t\t\t\t\t<p className=\"text-sm text-[#cccccc] whitespace-pre-wrap break-words line-clamp-5\">\n\t\t\t\t\t\t\t\t\t\t\t{project.data.text}\n\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</CardContent>\n\t\t\t\t\t\t\t\t<CardFooter className=\"flex gap-4 group border-t border-[#222] pt-4\">\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\tvariant=\"\"\n\t\t\t\t\t\t\t\t\t\tclassName=\"font-normal text-xs text-[#ffffff] border-[#333] hover:bg-red-700 duration-200 dark w-1/2\"\n\t\t\t\t\t\t\t\t\t\tonClick={(e) => {\n\t\t\t\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\t\t\t\tapi_resumeProject({ project: project.id });\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\tresume\n\t\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t\t\t<span className=\"hidden group-hover:block text-red-400 text-xs\">\n\t\t\t\t\t\t\t\t\t\tonly use if generation was interrupted !\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t</CardFooter>\n\t\t\t\t\t\t\t</Card>\n\t\t\t\t\t\t</motion.div>\n\t\t\t\t\t</Link>\n\t\t\t\t))}\n\t\t\t</div>\n\t\t</>\n\t);\n};\n\nexport default ProjectsList;\n"
  },
  {
    "path": "cofounder/dashboard/src/components/views/settings.tsx",
    "content": "import React from \"react\";\n\nconst Settings: React.FC = () => {\n\treturn (\n\t\t<div className=\"flex items-center justify-center h-screen w-full text-white\">\n\t\t\t<h1 className=\"text-2xl font-light opacity-50 text-center\">{`{ settings : not implemented yet }`}</h1>\n\t\t</div>\n\t);\n};\n\nexport default Settings;\n"
  },
  {
    "path": "cofounder/dashboard/src/components/views/sidebar.tsx",
    "content": "import React, { useState } from \"react\";\nimport { Link } from \"react-router-dom\";\nimport { motion } from \"framer-motion\";\nimport {\n\tChevronRightIcon,\n\tChevronDownIcon,\n\tFolderIcon,\n\tPlayIcon,\n\tCog6ToothIcon,\n\tSquares2X2Icon,\n} from \"@heroicons/react/24/outline\";\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipProvider,\n\tTooltipTrigger,\n} from \"@/components/ui/tooltip\";\n\nconst Sidebar: React.FC = () => {\n\tconst [isCollapsed, setIsCollapsed] = useState(false);\n\tconst [isPlaygroundOpen, setIsPlaygroundOpen] = useState(false);\n\n\tconst toggleCollapse = () => setIsCollapsed(!isCollapsed);\n\tconst togglePlayground = () => setIsPlaygroundOpen(!isPlaygroundOpen);\n\n\treturn (\n\t\t<motion.div\n\t\t\tclassName=\"h-screen bg-black text-[#ddd] border-r border-[#222] text-sm\"\n\t\t\tinitial={{ width: 240 }}\n\t\t\tanimate={{ width: isCollapsed ? 60 : 240 }}\n\t\t\ttransition={{ duration: 0.2 }}\n\t\t>\n\t\t\t<div\n\t\t\t\tonClick={toggleCollapse}\n\t\t\t\tclassName=\"hover:bg-[#1a1a1a] cursor-pointer p-4 flex items-center justify-between\"\n\t\t\t>\n\t\t\t\t{!isCollapsed && (\n\t\t\t\t\t<h1 className=\"flex gap-2 items-center\">\n\t\t\t\t\t\t<ChevronRightIcon\n\t\t\t\t\t\t\tclassName={`w-4 h-4 text-[#bbb] transition-transform ${isCollapsed ? \"\" : \"rotate-180\"}`}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\tDashboard\n\t\t\t\t\t</h1>\n\t\t\t\t)}\n\t\t\t\t<TooltipProvider>\n\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t{(isCollapsed && (\n\t\t\t\t\t\t\t\t<button className=\"p-2 rounded-full\">\n\t\t\t\t\t\t\t\t\t<ChevronRightIcon\n\t\t\t\t\t\t\t\t\t\tclassName={`w-4 h-4 text-[#bbb] transition-transform`}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t)) || <div className=\"h-8\"></div>}\n\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t<TooltipContent>\n\t\t\t\t\t\t\t<p>{isCollapsed ? \"Expand\" : \"Collapse\"} sidebar</p>\n\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t</Tooltip>\n\t\t\t\t</TooltipProvider>\n\t\t\t</div>\n\n\t\t\t<nav className=\"mt-4\">\n\t\t\t\t<TooltipProvider>\n\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\tto=\"/projects\"\n\t\t\t\t\t\t\t\tclassName=\"flex items-center p-3 hover:bg-[#1a1a1a]\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<FolderIcon className=\"w-3 h-3 text-[#bbb]\" />\n\t\t\t\t\t\t\t\t{!isCollapsed && <span className=\"ml-3\">Projects</span>}\n\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t<TooltipContent>\n\t\t\t\t\t\t\t<p>View Projects</p>\n\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t</Tooltip>\n\t\t\t\t</TooltipProvider>\n\n\t\t\t\t{!isCollapsed && (\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<TooltipProvider>\n\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\tonClick={togglePlayground}\n\t\t\t\t\t\t\t\t\t\tclassName=\"w-full flex items-center justify-between p-3 hover:bg-[#1a1a1a]\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-center\">\n\t\t\t\t\t\t\t\t\t\t\t<PlayIcon className=\"w-3 h-3 text-[#bbb]\" />\n\t\t\t\t\t\t\t\t\t\t\t{!isCollapsed && <span className=\"ml-3\">Playground</span>}\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t{!isCollapsed && (\n\t\t\t\t\t\t\t\t\t\t\t<ChevronDownIcon\n\t\t\t\t\t\t\t\t\t\t\t\tclassName={`w-3 h-3 transition-transform ${isPlaygroundOpen ? \"rotate-180\" : \"\"}`}\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t<TooltipContent>\n\t\t\t\t\t\t\t\t\t<p>{isPlaygroundOpen ? \"Close\" : \"Open\"} Playground</p>\n\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t</TooltipProvider>\n\t\t\t\t\t\t{isPlaygroundOpen && !isCollapsed && (\n\t\t\t\t\t\t\t<TooltipProvider>\n\t\t\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\t\t\tto=\"/playground/designer\"\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center p-3 pl-6 hover:bg-[#1a1a1a]\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<Squares2X2Icon className=\"w-3 h-3 text-[#bbb]\" />\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"ml-3\">Component Designer</span>\n\t\t\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t\t\t<TooltipContent>\n\t\t\t\t\t\t\t\t\t\t<p>Open Component Designer</p>\n\t\t\t\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t</TooltipProvider>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\n\t\t\t\t<TooltipProvider>\n\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\tto=\"/settings\"\n\t\t\t\t\t\t\t\tclassName=\"flex items-center p-3 hover:bg-[#1a1a1a]\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<Cog6ToothIcon className=\"w-3 h-3 text-[#bbb]\" />\n\t\t\t\t\t\t\t\t{!isCollapsed && <span className=\"ml-3\">Settings</span>}\n\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t<TooltipContent>\n\t\t\t\t\t\t\t<p>Open Settings</p>\n\t\t\t\t\t\t</TooltipContent>\n\t\t\t\t\t</Tooltip>\n\t\t\t\t</TooltipProvider>\n\t\t\t</nav>\n\t\t</motion.div>\n\t);\n};\n\nexport default Sidebar;\n"
  },
  {
    "path": "cofounder/dashboard/src/hooks/use-toast.ts",
    "content": "import * as React from \"react\";\n\nimport type { ToastActionElement, ToastProps } from \"@/components/ui/toast\";\n\nconst TOAST_LIMIT = 1;\nconst TOAST_REMOVE_DELAY = 1000000;\n\ntype ToasterToast = ToastProps & {\n\tid: string;\n\ttitle?: React.ReactNode;\n\tdescription?: React.ReactNode;\n\taction?: ToastActionElement;\n};\n\nconst actionTypes = {\n\tADD_TOAST: \"ADD_TOAST\",\n\tUPDATE_TOAST: \"UPDATE_TOAST\",\n\tDISMISS_TOAST: \"DISMISS_TOAST\",\n\tREMOVE_TOAST: \"REMOVE_TOAST\",\n} as const;\n\nlet count = 0;\n\nfunction genId() {\n\tcount = (count + 1) % Number.MAX_SAFE_INTEGER;\n\treturn count.toString();\n}\n\ntype ActionType = typeof actionTypes;\n\ntype Action =\n\t| {\n\t\t\ttype: ActionType[\"ADD_TOAST\"];\n\t\t\ttoast: ToasterToast;\n\t  }\n\t| {\n\t\t\ttype: ActionType[\"UPDATE_TOAST\"];\n\t\t\ttoast: Partial<ToasterToast>;\n\t  }\n\t| {\n\t\t\ttype: ActionType[\"DISMISS_TOAST\"];\n\t\t\ttoastId?: ToasterToast[\"id\"];\n\t  }\n\t| {\n\t\t\ttype: ActionType[\"REMOVE_TOAST\"];\n\t\t\ttoastId?: ToasterToast[\"id\"];\n\t  };\n\ninterface State {\n\ttoasts: ToasterToast[];\n}\n\nconst toastTimeouts = new Map<string, ReturnType<typeof setTimeout>>();\n\nconst addToRemoveQueue = (toastId: string) => {\n\tif (toastTimeouts.has(toastId)) {\n\t\treturn;\n\t}\n\n\tconst timeout = setTimeout(() => {\n\t\ttoastTimeouts.delete(toastId);\n\t\tdispatch({\n\t\t\ttype: \"REMOVE_TOAST\",\n\t\t\ttoastId: toastId,\n\t\t});\n\t}, TOAST_REMOVE_DELAY);\n\n\ttoastTimeouts.set(toastId, timeout);\n};\n\nexport const reducer = (state: State, action: Action): State => {\n\tswitch (action.type) {\n\t\tcase \"ADD_TOAST\":\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\ttoasts: [action.toast, ...state.toasts].slice(0, TOAST_LIMIT),\n\t\t\t};\n\n\t\tcase \"UPDATE_TOAST\":\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\ttoasts: state.toasts.map((t) =>\n\t\t\t\t\tt.id === action.toast.id ? { ...t, ...action.toast } : t,\n\t\t\t\t),\n\t\t\t};\n\n\t\tcase \"DISMISS_TOAST\": {\n\t\t\tconst { toastId } = action;\n\n\t\t\t// ! Side effects ! - This could be extracted into a dismissToast() action,\n\t\t\t// but I'll keep it here for simplicity\n\t\t\tif (toastId) {\n\t\t\t\taddToRemoveQueue(toastId);\n\t\t\t} else {\n\t\t\t\tstate.toasts.forEach((toast) => {\n\t\t\t\t\taddToRemoveQueue(toast.id);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\ttoasts: state.toasts.map((t) =>\n\t\t\t\t\tt.id === toastId || toastId === undefined\n\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t...t,\n\t\t\t\t\t\t\t\topen: false,\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t: t,\n\t\t\t\t),\n\t\t\t};\n\t\t}\n\t\tcase \"REMOVE_TOAST\":\n\t\t\tif (action.toastId === undefined) {\n\t\t\t\treturn {\n\t\t\t\t\t...state,\n\t\t\t\t\ttoasts: [],\n\t\t\t\t};\n\t\t\t}\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\ttoasts: state.toasts.filter((t) => t.id !== action.toastId),\n\t\t\t};\n\t}\n};\n\nconst listeners: Array<(state: State) => void> = [];\n\nlet memoryState: State = { toasts: [] };\n\nfunction dispatch(action: Action) {\n\tmemoryState = reducer(memoryState, action);\n\tlisteners.forEach((listener) => {\n\t\tlistener(memoryState);\n\t});\n}\n\ntype Toast = Omit<ToasterToast, \"id\">;\n\nfunction toast({ ...props }: Toast) {\n\tconst id = genId();\n\n\tconst update = (props: ToasterToast) =>\n\t\tdispatch({\n\t\t\ttype: \"UPDATE_TOAST\",\n\t\t\ttoast: { ...props, id },\n\t\t});\n\tconst dismiss = () => dispatch({ type: \"DISMISS_TOAST\", toastId: id });\n\n\tdispatch({\n\t\ttype: \"ADD_TOAST\",\n\t\ttoast: {\n\t\t\t...props,\n\t\t\tid,\n\t\t\topen: true,\n\t\t\tonOpenChange: (open) => {\n\t\t\t\tif (!open) dismiss();\n\t\t\t},\n\t\t},\n\t});\n\n\treturn {\n\t\tid: id,\n\t\tdismiss,\n\t\tupdate,\n\t};\n}\n\nfunction useToast() {\n\tconst [state, setState] = React.useState<State>(memoryState);\n\n\tReact.useEffect(() => {\n\t\tlisteners.push(setState);\n\t\treturn () => {\n\t\t\tconst index = listeners.indexOf(setState);\n\t\t\tif (index > -1) {\n\t\t\t\tlisteners.splice(index, 1);\n\t\t\t}\n\t\t};\n\t}, [state]);\n\n\treturn {\n\t\t...state,\n\t\ttoast,\n\t\tdismiss: (toastId?: string) => dispatch({ type: \"DISMISS_TOAST\", toastId }),\n\t};\n}\n\nexport { useToast, toast };\n"
  },
  {
    "path": "cofounder/dashboard/src/index.css",
    "content": "@tailwind base;\n@tailwind components;\n@tailwind utilities;\n\n:root {\n\tfont-family: Karla, system-ui, Avenir, Helvetica, Arial, sans-serif;\n\tline-height: 1.5;\n\tfont-weight: 400;\n\tbackground: #111;\n\tcolor-scheme: light dark;\n\n\tfont-synthesis: none;\n\ttext-rendering: optimizeLegibility;\n\t-webkit-font-smoothing: antialiased;\n\t-moz-osx-font-smoothing: grayscale;\n}\n\n*::selection {\n\tbackground-color: #bbb; /* Inverted from #444 */\n\tcolor: black; /* Inverted from white */\n\t/* Selected state text color */\n}\n\n::-webkit-scrollbar {\n\twidth: 5px;\n\t/* Super thin scrollbar */\n\theight: 5px;\n\t/* Super thin horizontal scrollbar */\n}\n\n::-webkit-scrollbar-track {\n\tbackground: #222; /* Inverted from #eee */\n\t/* Dark track */\n}\n\n::-webkit-scrollbar-thumb {\n\tbackground: rgba(\n\t\t105,\n\t\t105,\n\t\t105,\n\t\t0.6\n\t); /* Inverted from rgba(150, 150, 150, 0.4) */\n\t/* Dark thumb */\n\theight: 50px;\n\t/* Vertical scrollbar thumb height */\n}\n\n::-webkit-scrollbar-thumb:hover {\n\tbackground: #aaa;\n}\n\n::-webkit-scrollbar-thumb:horizontal {\n\theight: 5px;\n\t/* Horizontal scrollbar thumb height */\n}\n\n@layer base {\n\t:root {\n\t\t--radius: 0.5rem;\n\t}\n}\n"
  },
  {
    "path": "cofounder/dashboard/src/lib/utils.ts",
    "content": "import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n\treturn twMerge(clsx(inputs));\n}\n"
  },
  {
    "path": "cofounder/dashboard/src/main.tsx",
    "content": "import { Provider } from \"react-redux\";\nimport { createRoot } from \"react-dom/client\";\nimport { BrowserRouter } from \"react-router-dom\";\nimport store from \"@/store/main\";\nimport AppWrapper from \"@/app-wrapper.tsx\";\nimport \"@/index.css\";\n\ncreateRoot(document.getElementById(\"root\")!).render(\n\t<Provider store={store}>\n\t\t<BrowserRouter>\n\t\t\t<AppWrapper />\n\t\t</BrowserRouter>\n\t</Provider>,\n);\n"
  },
  {
    "path": "cofounder/dashboard/src/store/main.tsx",
    "content": "import { configureStore, createSlice } from \"@reduxjs/toolkit\";\nimport { io } from \"socket.io-client\";\nimport { merge } from \"lodash-es\";\n\n// Socket.io client setup\nconst socket = io(\"http://localhost:4200\");\n\n// Initial state for the store\nconst initialState = {\n\tproject: \"\",\n\tstreamEvents: {},\n\tprojectData: {},\n\tnodesKeys: [] as string[],\n\tnodesKeysDict: {},\n};\n\n// Create a slice for the store\nconst projectSlice = createSlice({\n\tname: \"project\",\n\tinitialState,\n\treducers: {\n\t\tsetProject(state, action) {\n\t\t\tstate.project = action.payload;\n\t\t\tconsole.log(\"store : project : \", state.project);\n\t\t\t// Subscribe to the stream when the project is set\n\t\t\tsocket.emit(\"subscribe\", state.project);\n\t\t},\n\t\tresetProject(state) {\n\t\t\tconsole.log(\"> debug : store : resetProject()\");\n\t\t\tstate = initialState;\n\t\t\treturn initialState;\n\t\t},\n\t\tloadProjectState(state, action) {\n\t\t\t// action.payload : { state : { pm , db , ... } }\n\t\t\tstate.projectData = action.payload.state;\n\n\t\t\tstate.nodesKeys = [\n\t\t\t\t...new Set([...state.nodesKeys, ...Object.keys(state.projectData)]),\n\t\t\t];\n\t\t\tObject.keys(state.projectData).map((k) => {\n\t\t\t\tstate.nodesKeysDict[k] = true;\n\t\t\t});\n\t\t},\n\t\tupdateProjectState(state, message) {\n\t\t\t// action.payload : { data }\n\t\t\tconst { key, data } = message.payload;\n\t\t\tconsole.log(\"> debug : store : updateProjectState \", { key, data });\n\t\t\tif (key && data) {\n\t\t\t\tstate.projectData = merge(state.projectData, { [key]: data });\n\t\t\t\tstate.nodesKeys = [\n\t\t\t\t\t...new Set([...state.nodesKeys, ...Object.keys(state.projectData)]),\n\t\t\t\t];\n\t\t\t\tObject.keys(state.projectData).map((k) => {\n\t\t\t\t\tstate.nodesKeysDict[k] = true;\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tstartStreamEvent(state, action) {\n\t\t\tconst { key, meta } = action.payload;\n\t\t\tif (!state.streamEvents[key]) {\n\t\t\t\tstate.streamEvents[key] = {\n\t\t\t\t\tis_running: true,\n\t\t\t\t\tmeta,\n\t\t\t\t\tdata: { key, data: \"\" },\n\t\t\t\t};\n\t\t\t}\n\t\t\tif (!state.nodesKeysDict[key]) {\n\t\t\t\tstate.nodesKeys = [...new Set([...state.nodesKeys, key])];\n\t\t\t\tstate.nodesKeysDict[key] = true;\n\t\t\t}\n\t\t\tif (!state.streamEvents[key].is_running) {\n\t\t\t\tstate.streamEvents[key].is_running = true;\n\t\t\t}\n\t\t},\n\t\tupdateStreamEvent(state, action) {\n\t\t\t// add new chunk\n\t\t\tconst { key, data } = action.payload;\n\t\t\tif (state.streamEvents[key]?.data) {\n\t\t\t\tstate.streamEvents[key].data.data += data.data;\n\t\t\t}\n\t\t},\n\t\tendStreamEvent(state, action) {\n\t\t\tconst { key } = action.payload;\n\t\t\tif (state.streamEvents[key]) {\n\t\t\t\tstate.streamEvents[key].is_running = false;\n\t\t\t\tstate.streamEvents[key].data = false;\n\t\t\t\tdelete state.streamEvents[key];\n\t\t\t}\n\n\t\t\t/* // messes up when shared keys that stream also in flow nodes\n\t\t\tif (state.nodesKeysDict[key]) {\n\t\t\t\tdelete state.nodesKeysDict[key] ;\n\t\t\t\tstate.nodesKeys = [...new Set([...state.nodesKeys, key])].filter(e=>e!=key);\n\t\t\t}\n\t\t\t*/\n\t\t},\n\t},\n});\n\n// Configure the Redux store\nconst store = configureStore({\n\treducer: {\n\t\tproject: projectSlice.reducer,\n\t},\n});\n\n// Socket event listeners\nsocket.on(\"state$load\", (data) => {\n\t// console.log('> received project state :', store.getState().project.project);\n\t// data : { state : { pm , db , ... } }\n\tstore.dispatch(projectSlice.actions.loadProjectState(data));\n});\n\nsocket.on(\"stream$start\", (message) => {\n\t// console.log('> stream started for project:', store.getState().project.project);\n\tconst { key, meta } = message; // Assuming the message contains a key\n\tstore.dispatch(projectSlice.actions.startStreamEvent({ key, meta }));\n});\n\nsocket.on(\"stream$data\", (data) => {\n\t// console.log('> received stream data:', data);\n\tconst { key } = data; // Destructure the data object\n\tstore.dispatch(projectSlice.actions.updateStreamEvent({ key, data }));\n});\n\nsocket.on(\"stream$end\", (message) => {\n\t// console.log('> stream ended:', message);\n\tconst { key } = message; // Assuming the message contains a key\n\tstore.dispatch(projectSlice.actions.endStreamEvent({ key }));\n});\n\nsocket.on(\"state$update\", (message) => {\n\t// console.log('> received stream data:', message); // {key,data}\n\tstore.dispatch(projectSlice.actions.updateProjectState(message));\n});\n\n// Export the store and actions\nexport const { setProject, resetProject } = projectSlice.actions;\nexport default store;\n"
  },
  {
    "path": "cofounder/dashboard/src/vite-env.d.ts",
    "content": "/// <reference types=\"vite/client\" />\n"
  },
  {
    "path": "cofounder/dashboard/tailwind.config.js",
    "content": "/** @type {import('tailwindcss').Config} */\nexport default {\n\tdarkMode: [\"class\"],\n\tcontent: [\"./index.html\", \"./src/**/*.{js,ts,jsx,tsx}\"],\n\ttheme: {\n\t\textend: {\n\t\t\tborderRadius: {\n\t\t\t\tlg: \"var(--radius)\",\n\t\t\t\tmd: \"calc(var(--radius) - 2px)\",\n\t\t\t\tsm: \"calc(var(--radius) - 4px)\",\n\t\t\t},\n\t\t\tcolors: {},\n\t\t\tkeyframes: {\n\t\t\t\t\"accordion-down\": {\n\t\t\t\t\tfrom: {\n\t\t\t\t\t\theight: \"0\",\n\t\t\t\t\t},\n\t\t\t\t\tto: {\n\t\t\t\t\t\theight: \"var(--radix-accordion-content-height)\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t\"accordion-up\": {\n\t\t\t\t\tfrom: {\n\t\t\t\t\t\theight: \"var(--radix-accordion-content-height)\",\n\t\t\t\t\t},\n\t\t\t\t\tto: {\n\t\t\t\t\t\theight: \"0\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tanimation: {\n\t\t\t\t\"accordion-down\": \"accordion-down 0.2s ease-out\",\n\t\t\t\t\"accordion-up\": \"accordion-up 0.2s ease-out\",\n\t\t\t},\n\t\t},\n\t},\n\tplugins: [require(\"tailwindcss-animate\")],\n};\n"
  },
  {
    "path": "cofounder/dashboard/tailwind.config.js.bak",
    "content": "/** @type {import('tailwindcss').Config} */\nexport default {\n\tcontent: [\"./index.html\", \"./src/**/*.{js,ts,jsx,tsx}\"],\n\ttheme: {\n\t\textend: {},\n\t},\n\tplugins: [],\n};\n"
  },
  {
    "path": "cofounder/dashboard/tsconfig.app.json",
    "content": "{\n\t\"compilerOptions\": {\n\t\t\"target\": \"ES2020\",\n\t\t\"useDefineForClassFields\": true,\n\t\t\"lib\": [\"ES2020\", \"DOM\", \"DOM.Iterable\"],\n\t\t\"module\": \"ESNext\",\n\t\t\"skipLibCheck\": true,\n\n\t\t/* Bundler mode */\n\t\t\"moduleResolution\": \"bundler\",\n\t\t\"allowImportingTsExtensions\": true,\n\t\t\"isolatedModules\": true,\n\t\t\"moduleDetection\": \"force\",\n\t\t\"noEmit\": true,\n\t\t\"jsx\": \"react-jsx\",\n\n\t\t/* Linting */\n\t\t\"strict\": true,\n\t\t\"noUnusedLocals\": true,\n\t\t\"noUnusedParameters\": true,\n\t\t\"noFallthroughCasesInSwitch\": true,\n\n\t\t\"baseUrl\": \".\",\n\t\t\"paths\": {\n\t\t\t\"@/*\": [\"./src/*\"]\n\t\t}\n\t},\n\t\"include\": [\"src\"]\n}\n"
  },
  {
    "path": "cofounder/dashboard/tsconfig.json",
    "content": "{\n\t\"files\": [],\n\t\"references\": [\n\t\t{ \"path\": \"./tsconfig.app.json\" },\n\t\t{ \"path\": \"./tsconfig.node.json\" }\n\t],\n\t\"compilerOptions\": {\n\t\t\"baseUrl\": \".\",\n\t\t\"paths\": {\n\t\t\t\"@/*\": [\"./src/*\"]\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "cofounder/dashboard/tsconfig.node.json",
    "content": "{\n\t\"compilerOptions\": {\n\t\t\"target\": \"ES2022\",\n\t\t\"lib\": [\"ES2023\"],\n\t\t\"module\": \"ESNext\",\n\t\t\"skipLibCheck\": true,\n\n\t\t/* Bundler mode */\n\t\t\"moduleResolution\": \"bundler\",\n\t\t\"allowImportingTsExtensions\": true,\n\t\t\"isolatedModules\": true,\n\t\t\"moduleDetection\": \"force\",\n\t\t\"noEmit\": true,\n\n\t\t/* Linting */\n\t\t\"strict\": true,\n\t\t\"noUnusedLocals\": true,\n\t\t\"noUnusedParameters\": true,\n\t\t\"noFallthroughCasesInSwitch\": true,\n\n\t\t\"baseUrl\": \".\",\n\t\t\"paths\": {\n\t\t\t\"@/*\": [\"./src/*\"]\n\t\t}\n\t},\n\t\"include\": [\"vite.config.ts\"]\n}\n"
  },
  {
    "path": "cofounder/dashboard/vite.config.ts",
    "content": "import path from \"path\";\nimport { defineConfig } from \"vite\";\nimport react from \"@vitejs/plugin-react\";\nimport cofounderVitePlugin from \"./src/_cofounder/vite-plugin/index\";\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n\tserver: {\n\t\tport: 5200,\n\t},\n\tplugins: [\n\t\t// webcontainers stuff\n\t\t{\n\t\t\tname: \"isolation\",\n\t\t\tconfigureServer(server) {\n\t\t\t\tserver.middlewares.use((_req, res, next) => {\n\t\t\t\t\tres.setHeader(\"Cross-Origin-Opener-Policy\", \"same-origin\");\n\t\t\t\t\tres.setHeader(\"Cross-Origin-Embedder-Policy\", \"credentialless\");\n\t\t\t\t\tnext();\n\t\t\t\t});\n\t\t\t},\n\t\t},\n\t\t// pre transform ; to replace/inject <GenUi*> to allow editing ui\n\t\t/*\n\t\t{\n\t\t\tname: \"cofounderVitePluginPre\",\n\t\t\tasync transform(code, id) {\n\t\t\t\treturn await cofounderVitePlugin.pre({\n\t\t\t\t\tcode,\n\t\t\t\t\tpath: id,\n\t\t\t\t});\n\t\t\t},\n\t\t\tenforce: \"pre\", // ensure this plugin runs before other transformations\n\t\t},\n\t\t*/\n\n\t\treact(),\n\t],\n\tresolve: {\n\t\talias: {\n\t\t\t\"@\": path.resolve(__dirname, \"./src\"),\n\t\t},\n\t},\n\tbuild: {\n\t\toutDir: path.join(__dirname, \"../api/dist\"),\n\t\temptyOutDir: true, // also necessary\n\t},\n});\n"
  }
]