chatluna-plugin-livingmemory 0.0.9 → 0.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -3
- package/client/index.ts +1 -0
- package/client/locales/en.yml +16 -5
- package/client/locales/zh.yml +17 -6
- package/client/page.css +65 -0
- package/client/page.tsx +246 -131
- package/dist/.vite/manifest.json +5 -1
- package/dist/client.css +3 -1
- package/dist/client.js +1 -1
- package/dist/page-Cv573unw.js +7 -0
- package/lib/contracts/rpc.d.ts +3 -1
- package/lib/contracts/rpc.d.ts.map +1 -1
- package/lib/contracts/webui.d.ts +3 -1
- package/lib/contracts/webui.d.ts.map +1 -1
- package/lib/contracts/webui_live.d.ts +2 -1
- package/lib/contracts/webui_live.d.ts.map +1 -1
- package/lib/index.js +116 -49
- package/lib/index.js.map +1 -1
- package/lib/query.d.ts +3 -3
- package/lib/query.d.ts.map +1 -1
- package/lib/routing.d.ts.map +1 -1
- package/lib/service/app/admin_service.d.ts +2 -2
- package/lib/service/app/admin_service.d.ts.map +1 -1
- package/lib/service/app/webui.d.ts.map +1 -1
- package/lib/service/persistence/repository.d.ts +3 -0
- package/lib/service/persistence/repository.d.ts.map +1 -1
- package/lib/service.d.ts.map +1 -1
- package/package.json +4 -1
- package/src/contracts/rpc.ts +6 -1
- package/src/contracts/webui.ts +3 -1
- package/src/contracts/webui_live.ts +2 -0
- package/dist/page-EGG2hcC3.js +0 -3
package/dist/client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e={"preset.placeholder":`选择预设`,"nativeMemory.title":`检测到您已同时启动原生 memory 插件`,"nativeMemory.description":`LivingMemory 和原生 memory 插件在功能上较为相似,建议仅启用其中一个。`,"nativeMemory.risk":`否则可能会带来额外的 token 开销或其他未知问题。`,"nativeMemory.close":`本次关闭`,"nativeMemory.neverShow":`我知道了,且以后不再提示`,"preset.actions":`预设操作`,"tab.navigation":`记忆管理`,"transfer.export":`导出记忆`,"transfer.import":`导入记忆`,"transfer.confirmTitle":`导入到「{target}」?`,"transfer.preview":`文件导出自「{source}」,包含 {entries} 条记忆、{profiles} 份画像和 {speakers} 位说话者。`,"transfer.merge":`相同 ID 的记忆和同一说话者的画像会被覆盖,其他记忆保留。`,"transfer.confirm":`确认导入`,"transfer.invalid":`无法识别该文件。请选择 LivingMemory 导出的 JSON 文件(格式版本 1–6)。`,"transfer.imported":`已导入到「{target}」:{entries} 条记忆、{profiles} 份画像、{speakers} 位说话者。`,"empty.noPreset":`还没有预设数据。可以新建第一条记忆,也可以从文件导入。`,"tab.entries":`记忆`,"tab.settings":`插件配置`,"tab.guide":`插件配置指南`,"guide.start":`第一次使用`,"guide.intro":`先配置模型、选好要记录的对话,再用一条记忆试试检索。下面也说明了机器人何时提取记忆、何时想起它,以及 Dream 如何整理已有的记忆。`,"guide.contents":`本页目录`,"guide.models.title":`配置模型`,"guide.models.text":`在「插件配置 → 模型配置」选择模型。主模型需要支持工具调用,用于提取和整理记忆、更新人物画像和人设卡。召回模型判断当前聊天是否需要查找记忆。嵌入模型将记忆和查询文本转换为向量,供插件比较语义相似度。重排序模型是可选的:它根据查询与每条候选记忆的相关性,重新排列检索结果。点「保存设置」后,这些选择对当前插件实例的所有预设生效。`,"guide.openSettings":`打开插件配置`,"guide.rules.title":`选择在哪些对话中自动提取记忆`,"guide.rules.text":`在「对话规则 → 能力 → LivingMemory」设置「从聊天中提取记忆的间隔」,默认是 60 条聊天消息。要只在某个群自动提取,把全局间隔设为 0,再把该群规则的间隔设为 60。`,"guide.check.title":`用一条记忆试试检索`,"guide.check.text":`在「记忆」页点「新建记忆」,选好预设,写下“我喝咖啡不加糖”并保存。到同一预设的「召回测试」搜索“我喜欢喝什么咖啡”,查看检索结果。测试不会更新快照。实际聊天的快照正文在「快照」页查看,展开「召回详情」可以看到搜索词和命中的记忆。`,"guide.timing":`提取与召回的时机`,"guide.buffer.title":`调大间隔前,先看聊天缓存`,"guide.buffer.text":`在 ChatLuna 的「插件 → 对话与路由 → @chatluna/chat-observer → 缓存条数」调整。默认每个频道保留最近 200 条消息,提取和召回都只能统计还在缓存里的聊天。例如,缓存是 200 条,提取间隔设为 300 条,就永远凑不够。即使间隔较小,两次检查之间被挤出缓存的旧消息也不会补读。`,"guide.context":`快照与用户画像`,"guide.interval.title":`「记忆自动召回的间隔」和「用于召回记忆的聊天消息数」有什么区别?`,"guide.interval.text":`bot 发完一轮回复后检查召回间隔。首次直接召回,之后累计够指定条数的新消息才再次召回;设为 0 会关闭自动召回。后者决定从 bot 最后一条回复(含)向前读多少条聊天,为后续对话准备快照。两项默认都是 20 条。`,"guide.overheard.title":`群友之间的闲聊什么时候会触发提取?`,"guide.overheard.text":`「允许群友闲聊触发记忆提取」默认关闭。等 bot 回复后,插件才检查未提取的消息是否达到设定条数,先前的闲聊也计入条数。开启后,即使 bot 没有参与,群友闲聊达到设定条数也会触发提取。`,"guide.sharing.title":`同一预设下的两个群能共用快照吗?`,"guide.sharing.text":`默认每个会话各用一份快照。要让同一预设下的两个群共用一份,在适用于这两个群的对话规则中,将「记忆快照的使用范围」设为「所有会话共享一个记忆快照」。两个群共享召回结果,仍各自读取聊天记录、计算召回间隔。开启「会话记忆隔离」后,这份规则涉及的会话各用独立快照。`,"guide.profiles.title":`已经生成了用户画像,怎样在聊天中使用?`,"guide.profiles.text":`默认在提取或 Dream 整理后更新画像,每位用户至少需要 3 条关联的活跃记忆。这些条件在「插件配置」中调整。要让机器人在聊天中使用已有画像,还需在对话规则中打开「向 bot 注入用户画像」(默认关闭)。注入哪些人的画像,取决于本轮唤醒时的最近聊天中有哪些用户发过言。`,"guide.dream":`Dream 如何整理记忆`,"guide.dream.intro":`Dream 让主模型对照已有的记忆,决定哪些该保留、更新、合并、拆分或归档。例如,“我喝咖啡不加糖”和“我喜欢无糖咖啡”可以合并成一条偏好。使用 Dream 时,请选择上下文窗口至少为 200k tokens 的主模型。`,"guide.dream.auto.title":`自动整理:从刚提取的新记忆开始`,"guide.dream.auto.text":`对话规则中的「是否在提取新记忆后进行 Dream 整理」默认开启。每次自动提取保存新记忆后,Dream 会为每条新记忆查找同一预设下相关的活跃旧记忆,放在一起整理。找不到相关旧记忆时,新条目保持原样。`,"guide.dream.manual.title":`手动整理:检查整个预设`,"guide.dream.manual.text":`预设里至少有 30 条活跃记忆时,可以在「记忆」页选择该预设,点「运行 Dream」。Dream 会把活跃记忆按内容相关性分组,逐组检查。30 条的门槛只用于手动整理。`,"guide.dream.result.title":`查看整理结果`,"guide.dream.result.text":`在同一预设的「任务」页查看处理条数、操作统计和失败原因。改动会直接保存到「记忆」页;要查看合并或拆分前的原条目,把状态筛选切到「已归档」。`,"settings.scope":`插件设置对所有预设生效。`,"settings.save":`保存设置`,"settings.discard":`放弃更改`,"settings.saved":`设置已保存`,"settings.noEntry":`当前实例未通过配置文件加载,无法在此编辑。`,"settings.noSchema":`无法读取 LivingMemory 的配置表单。`,"tab.jobs":`任务`,"tab.personas":`人设卡片`,"status.active":`活跃`,"status.archived":`已归档`,"status.all":`全部`,"type.all":`全部类型`,"type.identity":`身份`,"type.preference":`偏好`,"type.fact":`事实`,"type.plan":`计划`,"type.context":`背景`,"type.other":`其他`,"entries.search":`搜索内容、摘要或关键词`,"entries.total":`共 {count} 条`,"entries.empty":`这里还没有记忆`,"entries.edit":`编辑`,"entries.create":`新建记忆`,"entries.editTitle":`编辑记忆`,"entries.created":`已创建记忆`,"entries.saved":`已保存记忆`,"entries.choosePreset":`选择或输入预设 ID`,"entries.noSpeakers":`未关联用户`,"entries.archive":`归档`,"entries.archiveCount":`归档({count})`,"entries.archivedCount":`已归档 {count} 条记忆`,"entries.purge":`彻底删除`,"deletion.selectEntry":`选择记忆:{label}`,"deletion.selectPage":`全选本页`,"deletion.selectAll":`全选`,"deletion.selectMatches":`选择全部 {count} 条结果`,"deletion.selected":`已选 {count} 条`,"deletion.deselect":`清除选择`,"deletion.confirmDelete":`确认彻底删除`,"deletion.entryWarning":`将永久删除预设「{preset}」中的 {count} 条记忆,删除后无法恢复。`,"deletion.deleted":`已删除 {count} 条记忆`,"deletion.clearPreset":`清空预设数据`,"deletion.clearWarning":`预设「{preset}」的数据清空后无法恢复。`,"deletion.typePhrase":`输入以下完整语句以确认清空`,"deletion.phrase":`我确认清空预设 {preset} 的全部记忆、用户画像、人设卡片、快照和任务记录`,"deletion.confirmClear":`确认清空`,"deletion.cleared":`已清空预设「{preset}」的数据`,"field.keywords":`关键词(每行一个,最多 {max} 个)`,"field.preset":`预设`,"field.summary":`摘要`,"field.type":`类型`,"field.status":`状态`,"field.sentiment":`情绪`,"field.importance":`重要度`,"field.speakers":`关联用户`,"field.createdAt":`创建`,"field.updatedAt":`更新`,"field.content":`内容`,"jobs.dream":`运行 Dream`,"jobs.dreamStarted":`「{preset}」的 Dream 已启动`,"jobs.dreamRunning":`「{preset}」已有 Dream 在运行`,"jobs.dreamInsufficient":`「{preset}」可整理的记忆不足`,"jobs.rebuildIndex":`重建向量索引`,"jobs.empty":`还没有任务记录`,"job.kind.extract":`提取`,"job.kind.dream":`Dream`,"job.kind.recall":`召回`,"job.kind.index":`索引`,"job.status.pending":`排队中`,"job.status.running":`运行中`,"job.status.completed":`已完成`,"job.status.partial":`部分完成`,"job.status.failed":`失败`,"personas.empty":`当前预设还没有人设卡片`,"personas.stale":`预设已变更`,"personas.reset":`重新生成`,"personas.hint":`卡片由预设的 system 部分摘录生成;手工保存后不再被自动覆盖。`,"persona.source.generated":`自动生成`,"persona.source.manual":`手工编辑`,"common.save":`保存`,"common.cancel":`取消`,"common.edit":`编辑`,"common.prev":`上一页`,"common.next":`下一页`,"tab.profiles":`用户画像`,"tab.snapshots":`快照`,"profiles.empty":`还没有为这个预设生成过用户画像`,"profiles.hint":`画像由模型从关联记忆提炼;保存后不再被自动生成覆盖。`,"profiles.sourceCount":`关联 {count} 条记忆`,"profiles.regenerate":`重新生成`,"profiles.delete":`删除`,"snapshots.presetShared":`预设共享快照`,"snapshots.empty":`还没有召回快照`,"snapshots.conversation":`会话 {id}`,"snapshots.noContent":`快照内容为空`,"snapshots.details":`召回详情`,"snapshots.searchTexts":`搜索词`,"snapshots.noSearch":`本次没有搜索`,"snapshots.matches":`召回的记忆({count} 条)`,"common.delete":`删除`,"tab.search":`召回测试`,"search.text":`搜索文本(第一人称描述)`,"search.keywords":`关键词(逗号分隔,选填)`,"search.run":`搜索`,"search.empty":`未找到匹配的记忆`,"search.scores":`cosine {cosine} · 关键词 {keyword} · 加权 {boosted}`},t={"preset.placeholder":`Select a preset`,"nativeMemory.title":`The built-in memory plugin is also running`,"nativeMemory.description":`LivingMemory and the built-in memory plugin have similar features. We recommend enabling only one.`,"nativeMemory.risk":`Running both may use extra tokens or cause unexpected issues.`,"nativeMemory.close":`Dismiss for now`,"nativeMemory.neverShow":`Got it, don’t show this again`,"transfer.export":`Export memories`,"transfer.import":`Import memories`,"transfer.confirmTitle":`Import into “{target}”?`,"transfer.preview":`Export from “{source}”: {entries} memories, {profiles} profiles and {speakers} speakers.`,"transfer.merge":`Memories with matching IDs and profiles for the same speaker will be replaced. Other memories are kept.`,"transfer.confirm":`Confirm import`,"transfer.invalid":`Choose a JSON file exported by LivingMemory (format versions 1–6).`,"transfer.imported":`Imported into “{target}”: {entries} memories, {profiles} profiles and {speakers} speakers.`,"empty.noPreset":`No preset data yet. Create your first memory or import a file.`,"tab.entries":`Memories`,"tab.jobs":`Jobs`,"tab.personas":`Personas`,"status.active":`Active`,"status.archived":`Archived`,"status.all":`All`,"type.all":`All types`,"type.identity":`Identity`,"type.preference":`Preference`,"type.fact":`Fact`,"type.plan":`Plan`,"type.context":`Context`,"type.other":`Other`,"entries.search":`Search content, summary or keywords`,"entries.total":`{count} entries`,"entries.empty":`No memories here yet`,"entries.edit":`Edit`,"entries.create":`New memory`,"entries.editTitle":`Edit memory`,"entries.created":`Memory created`,"entries.saved":`Memory saved`,"entries.choosePreset":`Select or enter a preset ID`,"entries.noSpeakers":`No users linked`,"entries.archive":`Archive`,"entries.archiveCount":`Archive ({count})`,"entries.archivedCount":`Archived {count} memories`,"entries.purge":`Delete`,"deletion.selectEntry":`Select memory: {label}`,"deletion.selectPage":`Select this page`,"deletion.selectAll":`Select all`,"deletion.selectMatches":`Select all {count} results`,"deletion.selected":`{count} selected`,"deletion.deselect":`Clear selection`,"deletion.confirmDelete":`Confirm permanent deletion`,"deletion.entryWarning":`Permanently delete {count} memories from “{preset}”? This cannot be undone.`,"deletion.deleted":`Deleted {count} memories`,"deletion.clearPreset":`Clear preset data`,"deletion.clearWarning":`Clearing the data in “{preset}” cannot be undone.`,"deletion.typePhrase":`Type the following sentence to confirm`,"deletion.phrase":`I confirm clearing all memories, user profiles, persona cards, snapshots and job records for preset {preset}`,"deletion.confirmClear":`Confirm clearing`,"deletion.cleared":`Cleared data for “{preset}”`,"field.keywords":`Keywords (one per line, up to {max})`,"field.preset":`Preset`,"field.summary":`Summary`,"field.type":`Type`,"field.status":`Status`,"field.sentiment":`Sentiment`,"field.importance":`Importance`,"field.speakers":`Linked users`,"field.createdAt":`Created`,"field.updatedAt":`Updated`,"field.content":`Content`,"jobs.dream":`Run Dream`,"jobs.dreamStarted":`Dream started for “{preset}”`,"jobs.dreamRunning":`Dream is already running for “{preset}”`,"jobs.dreamInsufficient":`Not enough memories in “{preset}” to run Dream`,"jobs.rebuildIndex":`Rebuild vector index`,"jobs.empty":`No jobs recorded yet`,"job.kind.extract":`Extract`,"job.kind.dream":`Dream`,"job.kind.recall":`Recall`,"job.kind.index":`Index`,"job.status.pending":`Pending`,"job.status.running":`Running`,"job.status.completed":`Completed`,"job.status.partial":`Partial`,"job.status.failed":`Failed`,"personas.empty":`This preset has no persona card yet`,"personas.stale":`Preset changed`,"personas.reset":`Regenerate`,"personas.hint":`The card is distilled from the preset's system section; once saved by hand it is no longer overwritten automatically.`,"persona.source.generated":`Generated`,"persona.source.manual":`Edited by hand`,"common.save":`Save`,"common.cancel":`Cancel`,"common.edit":`Edit`,"common.prev":`Previous`,"common.next":`Next`,"tab.profiles":`Profiles`,"tab.snapshots":`Snapshots`,"profiles.empty":`No user profile has been generated for this preset`,"profiles.hint":`The profile is distilled from linked memories; once saved it is no longer overwritten automatically.`,"profiles.sourceCount":`{count} linked memories`,"profiles.regenerate":`Regenerate`,"profiles.delete":`Delete`,"snapshots.presetShared":`Shared preset snapshot`,"snapshots.empty":`No recall snapshot yet`,"snapshots.conversation":`Conversation {id}`,"snapshots.noContent":`This snapshot is empty`,"snapshots.details":`Recall details`,"snapshots.searchTexts":`Search terms`,"snapshots.noSearch":`No search was made`,"snapshots.matches":`Recalled memories ({count})`,"common.delete":`Delete`,"tab.search":`Recall test`,"search.text":`Search text (first-person description)`,"search.keywords":`Keywords (comma separated, optional)`,"search.run":`Search`,"search.empty":`No memory matched`,"search.scores":`cosine {cosine} · keywords {keyword} · boosted {boosted}`,"preset.actions":`Preset actions`,"tab.navigation":`Memory management`,"tab.settings":`Plugin configuration`,"tab.guide":`Plugin configuration guide`,"guide.start":`Getting started`,"guide.intro":`Choose your models and conversations, then try a search with one memory. The following sections explain when the bot saves and recalls memories, how to use profiles, and how Dream organizes existing memories.`,"guide.contents":`On this page`,"guide.models.title":`Choose your models`,"guide.models.text":`Under Plugin configuration → Model configuration, choose a main model that supports tool calls. It extracts and organizes memories and updates user profiles and persona cards. The recall model decides whether to look up memories. The embedding model converts memories and queries into vectors so the plugin can compare their meanings. An optional reranker reorders the candidate memories by their relevance to the query. Select Save settings to apply these choices to all presets in this plugin instance.`,"guide.openSettings":`Open plugin configuration`,"guide.rules.title":`Choose which conversations use automatic extraction`,"guide.rules.text":`Open Conversation rules → Capabilities → LivingMemory and set the extraction interval. The default is 60 chat messages. To enable automatic extraction in just one group, set the global interval to 0 and that group’s interval to 60.`,"guide.check.title":`Try a search with one memory`,"guide.check.text":`Under Memories, select New memory, choose a preset, and save “I drink my coffee without sugar.” Under Recall test for the same preset, search for “How do I like my coffee?” to see the matches. The test leaves snapshots unchanged. Under Snapshots you can read the snapshot from an actual chat. Expand Recall details to see the search terms and matching memories.`,"guide.timing":`When extraction and recall run`,"guide.buffer.title":`Check the chat buffer before raising an interval`,"guide.buffer.text":`In ChatLuna, open Plugins → Conversation and routing → @chatluna/chat-observer and adjust the buffer limit. Each channel keeps its latest 200 messages by default. Extraction and recall can only count chats still in that buffer. For example, a 300-message extraction interval can never be reached with a 200-message buffer. Even with a shorter interval, messages evicted between checks cannot be read later.`,"guide.context":`Snapshots and user profiles`,"guide.interval.title":`How does the recall interval differ from the history length?`,"guide.interval.text":`The bot checks after it finishes sending a reply. It recalls after the first reply, then waits until enough new messages have accumulated. Set the interval to 0 to disable automatic recall. The history length sets how many messages to read, up to and including the final part of the reply, to prepare a snapshot for future turns. Both default to 20 messages.`,"guide.overheard.title":`When can chat between group members trigger extraction?`,"guide.overheard.text":`Overheard extraction is off by default. Group chatter alone will not trigger extraction. Once the bot replies, the plugin counts unprocessed messages up to that reply, including earlier chatter, and starts extraction if the interval has been reached. With overheard extraction on, group members can reach the threshold on their own without calling the bot or waiting for a reply.`,"guide.sharing.title":`Can two groups using the same preset share a snapshot?`,"guide.sharing.text":`Each conversation has its own snapshot by default. To share one between two groups using the same preset, select preset sharing in both groups’ conversation rules. The groups share recall results; each still reads its own chat history and tracks its own recall interval. A group with conversation isolation enabled always uses its own snapshot and searches only its own and global memories within the preset.`,"guide.profiles.title":`How do I use existing user profiles in a chat?`,"guide.profiles.text":`By default, profiles are updated after extraction or Dream, and each person needs at least three linked active memories. You can change these settings under Plugin configuration. To use existing profiles during a chat, enable profile injection in the conversation rule (off by default). The bot receives profiles for users who spoke in the recent messages leading up to the wake, using the same history length as recall.`,"guide.dream":`How Dream organizes memories`,"guide.dream.intro":`Dream uses the main model to compare memories and decide which to keep, update, merge, split, or archive. For example, “I take my coffee without sugar” and “I like unsweetened coffee” can become a single preference. Choose a main model with a context window of at least 200k tokens for Dream.`,"guide.dream.auto.title":`Automatic runs start with newly extracted memories`,"guide.dream.auto.text":`Conversation rules enable Dream after extraction by default. For each newly saved memory, Dream looks for related active memories already in the same preset and reviews them together. If it finds no related older memory, the new entry stays as it is.`,"guide.dream.manual.title":`Manual runs review a whole preset`,"guide.dream.manual.text":`Once a preset has at least 30 active memories, select it under Memories and click Run Dream. Dream groups its active memories by similarity and reviews each group in turn. The 30-memory minimum applies only to manual runs.`,"guide.dream.result.title":`See what changed`,"guide.dream.result.text":`Open Jobs for the same preset to see how many memories Dream processed, which operations it performed, and any errors. Changes are saved directly to Memories. To see the original entries after a merge or split, change the status filter to Archived.`,"settings.scope":`Plugin settings apply to all presets.`,"settings.save":`Save settings`,"settings.discard":`Discard changes`,"settings.saved":`Settings saved`,"settings.noEntry":`This instance was not loaded from a configuration file and cannot be edited here.`,"settings.noSchema":`The LivingMemory configuration form is unavailable.`};function n(n){n.locale.register(`livingmemory`,{zh:e,en:t}),n.slots.route({path:`/livingmemory`,page:async()=>(await import(`./page-EGG2hcC3.js`)).LivingMemoryPage,title:`LivingMemory`,icon:`brain`,order:36,group:`capabilities`,groupOrder:36})}export{n as default};
|
|
1
|
+
var e={"preset.placeholder":`选择预设`,"nativeMemory.title":`检测到您已同时启动原生 memory 插件`,"nativeMemory.description":`LivingMemory 和原生 memory 插件在功能上较为相似,建议仅启用其中一个。`,"nativeMemory.risk":`否则可能会带来额外的 token 开销或其他未知问题。`,"nativeMemory.close":`本次关闭`,"nativeMemory.neverShow":`我知道了,且以后不再提示`,"preset.actions":`预设操作`,"tab.navigation":`记忆管理`,"transfer.export":`导出记忆`,"transfer.import":`导入记忆`,"transfer.confirmTitle":`导入到「{target}」?`,"transfer.preview":`文件导出自「{source}」,包含 {entries} 条记忆、{profiles} 份画像和 {speakers} 位说话者。`,"transfer.merge":`相同 ID 的记忆和同一说话者的画像会被覆盖,其他记忆保留。`,"transfer.confirm":`确认导入`,"transfer.invalid":`无法识别该文件。请选择 LivingMemory 导出的 JSON 文件(格式版本 1–6)。`,"transfer.imported":`已导入到「{target}」:{entries} 条记忆、{profiles} 份画像、{speakers} 位说话者。`,"empty.noPreset":`还没有预设数据。可以新建第一条记忆,也可以从文件导入。`,"tab.entries":`记忆`,"tab.settings":`插件配置`,"tab.guide":`插件配置指南`,"guide.start":`第一次使用`,"guide.intro":`先配置模型、选好要记录的对话,再用一条记忆试试检索。下面也说明了机器人何时提取记忆、何时想起它,以及 Dream 如何整理已有的记忆。`,"guide.contents":`本页目录`,"guide.models.title":`配置模型`,"guide.models.text":`在「插件配置 → 模型配置」选择模型。主模型需要支持工具调用,用于提取和整理记忆、更新人物画像和人设卡。召回模型判断当前聊天是否需要查找记忆。嵌入模型将记忆和查询文本转换为向量,供插件比较语义相似度。重排序模型是可选的:它根据查询与每条候选记忆的相关性,重新排列检索结果。点「保存设置」后,这些选择对当前插件实例的所有预设生效。`,"guide.openSettings":`打开插件配置`,"guide.rules.title":`选择在哪些对话中自动提取记忆`,"guide.rules.text":`在「对话规则 → 能力 → LivingMemory」设置「从聊天中提取记忆的间隔」,默认是 60 条聊天消息。要只在某个群或某位用户的私聊中自动提取,把全局间隔设为 0,再把对应群或用户私聊规则的间隔设为 60。`,"guide.check.title":`用一条记忆试试检索`,"guide.check.text":`在「记忆」页点「新建记忆」,选好预设,写下“我喝咖啡不加糖”并保存。到同一预设的「召回测试」搜索“我喜欢喝什么咖啡”,查看检索结果。测试不会更新快照。实际聊天的快照正文在「快照」页查看,展开「召回详情」可以看到搜索词和命中的记忆。`,"guide.timing":`提取与召回的时机`,"guide.buffer.title":`调大间隔前,先看聊天缓存`,"guide.buffer.text":`在 ChatLuna 的「插件 → 对话与路由 → @chatluna/chat-observer → 缓存条数」调整。默认每个频道保留最近 200 条消息,提取和召回都只能统计还在缓存里的聊天。例如,缓存是 200 条,提取间隔设为 300 条,就永远凑不够。即使间隔较小,两次检查之间被挤出缓存的旧消息也不会补读。`,"guide.context":`快照与用户画像`,"guide.interval.title":`「记忆自动召回的间隔」和「用于召回记忆的聊天消息数」有什么区别?`,"guide.interval.text":`bot 发完一轮回复后检查召回间隔。首次直接召回,之后累计够指定条数的新消息才再次召回;设为 0 会关闭自动召回。后者决定从 bot 最后一条回复(含)向前读多少条聊天,为后续对话准备快照。两项默认都是 20 条。`,"guide.overheard.title":`群友之间的闲聊什么时候会触发提取?`,"guide.overheard.text":`「允许群友闲聊触发记忆提取」仅用于群聊,默认关闭。关闭时,插件在 bot 回复后检查未提取的消息,先前的闲聊也计入条数。开启后,群友闲聊达到设定条数就会触发提取。私聊始终在 bot 回复后检查。`,"guide.sharing.title":`同一预设下的两个群能共用快照吗?`,"guide.sharing.text":`默认每个会话各用一份快照。要让同一预设下的两个群共用一份,在适用于这两个群的对话规则中,将「记忆快照的使用范围」设为「所有会话共享一个记忆快照」。两个群共享召回结果,仍各自读取聊天记录、计算召回间隔。开启「会话记忆隔离」后,这份规则涉及的会话各用独立快照。`,"guide.profiles.title":`已经生成了用户画像,怎样在聊天中使用?`,"guide.profiles.text":`默认在提取或 Dream 整理后更新画像,每位用户至少需要 3 条关联的活跃记忆。这些条件在「插件配置」中调整。要让机器人在聊天中使用已有画像,还需在对话规则中打开「向 bot 注入用户画像」(默认关闭)。注入哪些人的画像,取决于本轮唤醒时的最近聊天中有哪些用户发过言。`,"guide.dream":`Dream 如何整理记忆`,"guide.dream.intro":`Dream 让主模型对照已有的记忆,决定哪些该保留、更新、合并、拆分或归档。例如,“我喝咖啡不加糖”和“我喜欢无糖咖啡”可以合并成一条偏好。使用 Dream 时,请选择上下文窗口至少为 200k tokens 的主模型。`,"guide.dream.auto.title":`自动整理:从刚提取的新记忆开始`,"guide.dream.auto.text":`对话规则中的「是否在提取新记忆后进行 Dream 整理」默认开启。每次自动提取保存新记忆后,Dream 会为每条新记忆查找同一预设下相关的活跃旧记忆,放在一起整理。找不到相关旧记忆时,新条目保持原样。`,"guide.dream.manual.title":`手动整理:检查整个预设`,"guide.dream.manual.text":`预设里至少有 30 条活跃记忆时,可以在「记忆」页选择该预设,点「运行 Dream」。Dream 会把活跃记忆按内容相关性分组,逐组检查。30 条的门槛只用于手动整理。`,"guide.dream.result.title":`查看整理结果`,"guide.dream.result.text":`在同一预设的「任务」页查看处理条数、操作统计和失败原因。改动会直接保存到「记忆」页;要查看合并或拆分前的原条目,把状态筛选切到「已归档」。`,"settings.scope":`插件设置对所有预设生效。`,"settings.save":`保存设置`,"settings.discard":`放弃更改`,"settings.saved":`设置已保存`,"settings.noEntry":`当前实例未通过配置文件加载,无法在此编辑。`,"settings.noSchema":`无法读取 LivingMemory 的配置表单。`,"tab.jobs":`任务`,"tab.personas":`人设卡片`,"status.active":`活跃`,"status.archived":`已归档`,"status.all":`全部`,"type.all":`全部类型`,"type.identity":`身份`,"type.preference":`偏好`,"type.fact":`事实`,"type.plan":`计划`,"type.context":`背景`,"type.other":`其他`,"entries.search":`搜索内容、摘要或关键词`,"entries.total":`共 {count} 条`,"entries.empty":`这里还没有记忆`,"entries.edit":`编辑`,"entries.create":`新建记忆`,"entries.editTitle":`编辑记忆`,"entries.created":`已创建记忆`,"entries.saved":`已保存记忆`,"entries.choosePreset":`选择或输入预设 ID`,"entries.noSpeakers":`未关联用户`,"entries.archive":`归档`,"entries.archiveCount":`归档({count})`,"entries.archivedCount":`已归档 {count} 条记忆`,"entries.purge":`彻底删除`,"deletion.selectEntry":`选择记忆:{label}`,"deletion.selectPage":`全选本页`,"deletion.selectAll":`全选`,"deletion.selectMatches":`选择全部 {count} 条结果`,"deletion.selected":`已选 {count} 条`,"deletion.deselect":`清除选择`,"deletion.confirmDelete":`确认彻底删除`,"deletion.entryWarning":`将永久删除预设「{preset}」中的 {count} 条记忆,删除后无法恢复。`,"deletion.deleted":`已删除 {count} 条记忆`,"deletion.clearPreset":`清空预设数据`,"deletion.clearWarning":`预设「{preset}」的数据清空后无法恢复。`,"deletion.typePhrase":`输入以下完整语句以确认清空`,"deletion.phrase":`我确认清空预设 {preset} 的全部记忆、用户画像、人设卡片、快照和任务记录`,"deletion.confirmClear":`确认清空`,"deletion.cleared":`已清空预设「{preset}」的数据`,"field.keywords":`关键词(每行一个,最多 {max} 个)`,"field.preset":`预设`,"field.summary":`摘要`,"field.type":`类型`,"field.status":`状态`,"field.sentiment":`情绪`,"field.importance":`重要度`,"field.speakers":`关联用户`,"field.createdAt":`创建`,"field.updatedAt":`更新`,"field.content":`内容`,"jobs.dream":`运行 Dream`,"jobs.dreamStarted":`「{preset}」的 Dream 已启动`,"jobs.dreamRunning":`「{preset}」已有 Dream 在运行`,"jobs.dreamInsufficient":`「{preset}」可整理的记忆不足`,"jobs.rebuildIndex":`重建向量索引`,"jobs.empty":`还没有任务记录`,"jobs.startedAt":`开始`,"jobs.finishedAt":`结束`,"jobs.id":`任务 ID`,"jobs.detail":`查看原始记录`,"job.kind.extract":`记忆提取`,"job.kind.dream":`Dream 整理`,"job.kind.recall":`记忆召回`,"job.kind.index":`索引维护`,"job.status.pending":`排队中`,"job.status.running":`运行中`,"job.status.completed":`已完成`,"job.status.partial":`部分完成`,"job.status.failed":`失败`,"personas.empty":`当前预设还没有人设卡片`,"personas.stale":`预设已变更`,"personas.reset":`重新生成`,"personas.hint":`卡片由预设的 system 部分摘录生成;手工保存后不再被自动覆盖。`,"persona.source.generated":`自动生成`,"persona.source.manual":`手工编辑`,"common.save":`保存`,"common.cancel":`取消`,"common.edit":`编辑`,"common.prev":`上一页`,"common.next":`下一页`,"tab.profiles":`用户画像`,"tab.snapshots":`快照`,"profiles.empty":`还没有为这个预设生成过用户画像`,"profiles.directory":`用户目录`,"profiles.linkedMemories":`关联记忆`,"profiles.search":`搜索昵称或用户 ID`,"profiles.clearSearch":`清除搜索`,"profiles.noMatch":`没有找到匹配的用户`,"profiles.noMemories":`这份画像没有关联记忆。`,"profiles.unavailableMemories":`有 {count} 条关联记忆已无法查看。`,"profiles.hint":`画像由模型从关联记忆提炼;保存后不再被自动生成覆盖。`,"profiles.sourceCount":`关联 {count} 条记忆`,"profiles.regenerate":`重新生成`,"profiles.delete":`删除`,"snapshots.presetShared":`预设共享快照`,"snapshots.empty":`还没有召回快照`,"snapshots.conversation":`会话 {id}`,"snapshots.noContent":`快照内容为空`,"snapshots.details":`召回详情`,"snapshots.searchTexts":`搜索词`,"snapshots.noSearch":`本次没有搜索`,"snapshots.matches":`召回的记忆({count} 条)`,"common.delete":`删除`,"tab.search":`召回测试`,"search.text":`搜索文本(第一人称描述)`,"search.keywords":`关键词(逗号分隔,选填)`,"search.run":`搜索`,"search.empty":`未找到匹配的记忆`,"search.scores":`cosine {cosine} · 关键词 {keyword} · 加权 {boosted}`},t={"preset.placeholder":`Select a preset`,"nativeMemory.title":`The built-in memory plugin is also running`,"nativeMemory.description":`LivingMemory and the built-in memory plugin have similar features. We recommend enabling only one.`,"nativeMemory.risk":`Running both may use extra tokens or cause unexpected issues.`,"nativeMemory.close":`Dismiss for now`,"nativeMemory.neverShow":`Got it, don’t show this again`,"transfer.export":`Export memories`,"transfer.import":`Import memories`,"transfer.confirmTitle":`Import into “{target}”?`,"transfer.preview":`Export from “{source}”: {entries} memories, {profiles} profiles and {speakers} speakers.`,"transfer.merge":`Memories with matching IDs and profiles for the same speaker will be replaced. Other memories are kept.`,"transfer.confirm":`Confirm import`,"transfer.invalid":`Choose a JSON file exported by LivingMemory (format versions 1–6).`,"transfer.imported":`Imported into “{target}”: {entries} memories, {profiles} profiles and {speakers} speakers.`,"empty.noPreset":`No preset data yet. Create your first memory or import a file.`,"tab.entries":`Memories`,"tab.jobs":`Jobs`,"tab.personas":`Personas`,"status.active":`Active`,"status.archived":`Archived`,"status.all":`All`,"type.all":`All types`,"type.identity":`Identity`,"type.preference":`Preference`,"type.fact":`Fact`,"type.plan":`Plan`,"type.context":`Context`,"type.other":`Other`,"entries.search":`Search content, summary or keywords`,"entries.total":`{count} entries`,"entries.empty":`No memories here yet`,"entries.edit":`Edit`,"entries.create":`New memory`,"entries.editTitle":`Edit memory`,"entries.created":`Memory created`,"entries.saved":`Memory saved`,"entries.choosePreset":`Select or enter a preset ID`,"entries.noSpeakers":`No users linked`,"entries.archive":`Archive`,"entries.archiveCount":`Archive ({count})`,"entries.archivedCount":`Archived {count} memories`,"entries.purge":`Delete`,"deletion.selectEntry":`Select memory: {label}`,"deletion.selectPage":`Select this page`,"deletion.selectAll":`Select all`,"deletion.selectMatches":`Select all {count} results`,"deletion.selected":`{count} selected`,"deletion.deselect":`Clear selection`,"deletion.confirmDelete":`Confirm permanent deletion`,"deletion.entryWarning":`Permanently delete {count} memories from “{preset}”? This cannot be undone.`,"deletion.deleted":`Deleted {count} memories`,"deletion.clearPreset":`Clear preset data`,"deletion.clearWarning":`Clearing the data in “{preset}” cannot be undone.`,"deletion.typePhrase":`Type the following sentence to confirm`,"deletion.phrase":`I confirm clearing all memories, user profiles, persona cards, snapshots and job records for preset {preset}`,"deletion.confirmClear":`Confirm clearing`,"deletion.cleared":`Cleared data for “{preset}”`,"field.keywords":`Keywords (one per line, up to {max})`,"field.preset":`Preset`,"field.summary":`Summary`,"field.type":`Type`,"field.status":`Status`,"field.sentiment":`Sentiment`,"field.importance":`Importance`,"field.speakers":`Linked users`,"field.createdAt":`Created`,"field.updatedAt":`Updated`,"field.content":`Content`,"jobs.dream":`Run Dream`,"jobs.dreamStarted":`Dream started for “{preset}”`,"jobs.dreamRunning":`Dream is already running for “{preset}”`,"jobs.dreamInsufficient":`Not enough memories in “{preset}” to run Dream`,"jobs.rebuildIndex":`Rebuild vector index`,"jobs.empty":`No jobs recorded yet`,"jobs.startedAt":`Started`,"jobs.finishedAt":`Finished`,"jobs.id":`Job ID`,"jobs.detail":`View original record`,"job.kind.extract":`Memory extraction`,"job.kind.dream":`Dream`,"job.kind.recall":`Memory recall`,"job.kind.index":`Index maintenance`,"job.status.pending":`Pending`,"job.status.running":`Running`,"job.status.completed":`Completed`,"job.status.partial":`Partial`,"job.status.failed":`Failed`,"personas.empty":`This preset has no persona card yet`,"personas.stale":`Preset changed`,"personas.reset":`Regenerate`,"personas.hint":`The card is distilled from the preset's system section; once saved by hand it is no longer overwritten automatically.`,"persona.source.generated":`Generated`,"persona.source.manual":`Edited by hand`,"common.save":`Save`,"common.cancel":`Cancel`,"common.edit":`Edit`,"common.prev":`Previous`,"common.next":`Next`,"tab.profiles":`Profiles`,"tab.snapshots":`Snapshots`,"profiles.empty":`No user profile has been generated for this preset`,"profiles.directory":`User directory`,"profiles.linkedMemories":`Linked memories`,"profiles.search":`Search by name or user ID`,"profiles.clearSearch":`Clear search`,"profiles.noMatch":`No matching users`,"profiles.noMemories":`This profile has no linked memories.`,"profiles.unavailableMemories":`Linked memories no longer available: {count}.`,"profiles.hint":`The profile is distilled from linked memories; once saved it is no longer overwritten automatically.`,"profiles.sourceCount":`{count} linked memories`,"profiles.regenerate":`Regenerate`,"profiles.delete":`Delete`,"snapshots.presetShared":`Shared preset snapshot`,"snapshots.empty":`No recall snapshot yet`,"snapshots.conversation":`Conversation {id}`,"snapshots.noContent":`This snapshot is empty`,"snapshots.details":`Recall details`,"snapshots.searchTexts":`Search terms`,"snapshots.noSearch":`No search was made`,"snapshots.matches":`Recalled memories ({count})`,"common.delete":`Delete`,"tab.search":`Recall test`,"search.text":`Search text (first-person description)`,"search.keywords":`Keywords (comma separated, optional)`,"search.run":`Search`,"search.empty":`No memory matched`,"search.scores":`cosine {cosine} · keywords {keyword} · boosted {boosted}`,"preset.actions":`Preset actions`,"tab.navigation":`Memory management`,"tab.settings":`Plugin configuration`,"tab.guide":`Plugin configuration guide`,"guide.start":`Getting started`,"guide.intro":`Choose your models and conversations, then try a search with one memory. The following sections explain when the bot saves and recalls memories, how to use profiles, and how Dream organizes existing memories.`,"guide.contents":`On this page`,"guide.models.title":`Choose your models`,"guide.models.text":`Under Plugin configuration → Model configuration, choose a main model that supports tool calls. It extracts and organizes memories and updates user profiles and persona cards. The recall model decides whether to look up memories. The embedding model converts memories and queries into vectors so the plugin can compare their meanings. An optional reranker reorders the candidate memories by their relevance to the query. Select Save settings to apply these choices to all presets in this plugin instance.`,"guide.openSettings":`Open plugin configuration`,"guide.rules.title":`Choose which conversations use automatic extraction`,"guide.rules.text":`Open Conversation rules → Capabilities → LivingMemory and set the extraction interval. The default is 60 chat messages. To enable automatic extraction in just one group or one user’s private chat, set the global interval to 0 and the interval for that group or private chat to 60.`,"guide.check.title":`Try a search with one memory`,"guide.check.text":`Under Memories, select New memory, choose a preset, and save “I drink my coffee without sugar.” Under Recall test for the same preset, search for “How do I like my coffee?” to see the matches. The test leaves snapshots unchanged. Under Snapshots you can read the snapshot from an actual chat. Expand Recall details to see the search terms and matching memories.`,"guide.timing":`When extraction and recall run`,"guide.buffer.title":`Check the chat buffer before raising an interval`,"guide.buffer.text":`In ChatLuna, open Plugins → Conversation and routing → @chatluna/chat-observer and adjust the buffer limit. Each channel keeps its latest 200 messages by default. Extraction and recall can only count chats still in that buffer. For example, a 300-message extraction interval can never be reached with a 200-message buffer. Even with a shorter interval, messages evicted between checks cannot be read later.`,"guide.context":`Snapshots and user profiles`,"guide.interval.title":`How does the recall interval differ from the history length?`,"guide.interval.text":`The bot checks after it finishes sending a reply. It recalls after the first reply, then waits until enough new messages have accumulated. Set the interval to 0 to disable automatic recall. The history length sets how many messages to read, up to and including the final part of the reply, to prepare a snapshot for future turns. Both default to 20 messages.`,"guide.overheard.title":`When can chat between group members trigger extraction?`,"guide.overheard.text":`Overheard extraction applies only to groups and is off by default. When off, the plugin checks the threshold after the bot replies, counting earlier chatter too. When on, group chatter can trigger extraction as soon as it reaches the threshold. Private chats always check after the bot replies.`,"guide.sharing.title":`Can two groups using the same preset share a snapshot?`,"guide.sharing.text":`Each conversation has its own snapshot by default. To share one between two groups using the same preset, select preset sharing in both groups’ conversation rules. The groups share recall results; each still reads its own chat history and tracks its own recall interval. A group with conversation isolation enabled always uses its own snapshot and searches only its own and global memories within the preset.`,"guide.profiles.title":`How do I use existing user profiles in a chat?`,"guide.profiles.text":`By default, profiles are updated after extraction or Dream, and each person needs at least three linked active memories. You can change these settings under Plugin configuration. To use existing profiles during a chat, enable profile injection in the conversation rule (off by default). The bot receives profiles for users who spoke in the recent messages leading up to the wake, using the same history length as recall.`,"guide.dream":`How Dream organizes memories`,"guide.dream.intro":`Dream uses the main model to compare memories and decide which to keep, update, merge, split, or archive. For example, “I take my coffee without sugar” and “I like unsweetened coffee” can become a single preference. Choose a main model with a context window of at least 200k tokens for Dream.`,"guide.dream.auto.title":`Automatic runs start with newly extracted memories`,"guide.dream.auto.text":`Conversation rules enable Dream after extraction by default. For each newly saved memory, Dream looks for related active memories already in the same preset and reviews them together. If it finds no related older memory, the new entry stays as it is.`,"guide.dream.manual.title":`Manual runs review a whole preset`,"guide.dream.manual.text":`Once a preset has at least 30 active memories, select it under Memories and click Run Dream. Dream groups its active memories by similarity and reviews each group in turn. The 30-memory minimum applies only to manual runs.`,"guide.dream.result.title":`See what changed`,"guide.dream.result.text":`Open Jobs for the same preset to see how many memories Dream processed, which operations it performed, and any errors. Changes are saved directly to Memories. To see the original entries after a merge or split, change the status filter to Archived.`,"settings.scope":`Plugin settings apply to all presets.`,"settings.save":`Save settings`,"settings.discard":`Discard changes`,"settings.saved":`Settings saved`,"settings.noEntry":`This instance was not loaded from a configuration file and cannot be edited here.`,"settings.noSchema":`The LivingMemory configuration form is unavailable.`};function n(n){n.locale.register(`livingmemory`,{zh:e,en:t}),n.slots.route({path:`/livingmemory`,page:async()=>(await import(`./page-Cv573unw.js`)).LivingMemoryPage,title:`LivingMemory`,icon:`brain`,order:36,group:`capabilities`,groupOrder:36})}export{n as default};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import*as e from"react";import{createContext as t,createElement as n,forwardRef as r,useContext as i}from"react";import{apiErrorMessage as a,callAction as o,request as s,toast as c,useAction as l,useLive as u,useLocale as d,useTranslate as f}from"@chatluna/ui-client/client";import{skipToken as p,useQuery as m}from"@tanstack/react-query";import{Fragment as h,jsx as g,jsxs as _}from"react/jsx-runtime";import{Button as v}from"@base-ui/react/button";import{Dialog as y}from"@base-ui/react/dialog";import{Input as b}from"@base-ui/react/input";import{Tooltip as x}from"@base-ui/react/tooltip";import{Avatar as S}from"@base-ui/react/avatar";import{mergeProps as C}from"@base-ui/react/merge-props";import{useRender as w}from"@base-ui/react/use-render";import{Checkbox as T}from"@base-ui/react/checkbox";import{Collapsible as E}from"@base-ui/react/collapsible";import{Combobox as ee}from"@base-ui/react";import{Menu as D}from"@base-ui/react/menu";import{Select as O}from"@base-ui/react/select";import{useStored as te}from"@chatluna/ui-storage";import{SchemaForm as k,deepEqual as A,useFormValidation as j}from"@chatluna/ui-schema-form/client";function ne(e,t){let n=new URLSearchParams({kind:e.kind,platform:e.platform,selfId:e.selfId,id:e.id});return s(`/api/koishi/entity?${n}`,{signal:t})}function M(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=M(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function N(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=M(e))&&(r&&(r+=` `),r+=t);return r}var re=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},ie=(e,t)=>({classGroupId:e,validator:t}),ae=(e=/* @__PURE__ */ new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),P=`-`,F=[],I=`arbitrary..`,oe=e=>{let t=ce(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return L(e);let n=e.split(P);return se(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?re(i,t):t:i||F}return n[e]||F}}},se=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=se(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(P):e.slice(t).join(P),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},L=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?I+r:void 0})(),ce=e=>{let{theme:t,classGroups:n}=e;return le(n,t)},le=(e,t)=>{let n=ae();for(let r in e){let i=e[r];ue(i,n,r,t)}return n},ue=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];de(i,t,n,r)}},de=(e,t,n,r)=>{typeof e==`string`?fe(e,t,n):typeof e==`function`?pe(e,t,n,r):me(e,t,n,r)},fe=(e,t,n)=>{let r=e===``?t:he(t,e);r.classGroupId=n},pe=(e,t,n,r)=>{ge(e)?ue(e(r),t,n,r):(t.validators===null&&(t.validators=[]),t.validators.push(ie(n,e)))},me=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];ue(o,he(t,a),n,r)}},he=(e,t)=>{let n=e,r=t.split(P),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=ae(),n.nextPart.set(t,i)),n=i}return n},ge=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,_e=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},ve=`!`,ye=`:`,be=[],xe=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),Se=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===ye){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(ve)?(c=s.slice(0,-1),l=!0):s.startsWith(ve)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return xe(t,l,c,u)};if(t){let e=t+ye,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):xe(be,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},Ce=e=>{let t=/* @__PURE__ */ new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},we=e=>({cache:_e(e.cacheSize),parseClassName:Se(e),sortModifiers:Ce(e),postfixLookupClassGroupIds:Te(e),...oe(e)}),Te=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},Ee=/\s+/,De=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(Ee),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h||(g=r(p),!g)){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+ve:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},Oe=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=ke(n))&&(i&&(i+=` `),i+=r);return i},ke=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=ke(e[r]))&&(n&&(n+=` `),n+=t);return n},Ae=(e,...t)=>{let n,r,i,a,o=o=>(n=we(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=De(e,n);return i(e,a),a};return a=o,(...e)=>a(Oe(...e))},je=[],R=e=>{let t=t=>t[e]||je;return t.isThemeGetter=!0,t.themeKey=e,t},Me=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ne=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Pe=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Fe=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ie=/\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$/,Le=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/,Re=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ze=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Be=e=>Pe.test(e),z=e=>!!e&&!Number.isNaN(Number(e)),B=e=>!!e&&Number.isInteger(Number(e)),Ve=e=>e.endsWith(`%`)&&z(e.slice(0,-1)),V=e=>Fe.test(e),He=()=>!0,Ue=e=>Ie.test(e)&&!Le.test(e),We=()=>!1,Ge=e=>Re.test(e),Ke=e=>ze.test(e),qe=e=>!H(e)&&!U(e),Je=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),Ye=e=>W(e,pt,We),H=e=>Me.test(e),Xe=e=>W(e,mt,Ue),Ze=e=>W(e,ht,z),Qe=e=>W(e,_t,He),$e=e=>W(e,gt,We),et=e=>W(e,dt,We),tt=e=>W(e,ft,Ke),nt=e=>W(e,vt,Ge),U=e=>Ne.test(e),rt=e=>ut(e,mt),it=e=>ut(e,gt),at=e=>ut(e,dt),ot=e=>ut(e,pt),st=e=>ut(e,ft),ct=e=>ut(e,vt,!0),lt=e=>ut(e,_t,!0),W=(e,t,n)=>{let r=Me.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},ut=(e,t,n=!1)=>{let r=Ne.exec(e);return r?r[1]?t(r[1]):n:!1},dt=e=>e===`position`||e===`percentage`,ft=e=>e===`image`||e===`url`,pt=e=>e===`length`||e===`size`||e===`bg-size`,mt=e=>e===`length`,ht=e=>e===`number`,gt=e=>e===`family-name`,_t=e=>e===`number`||e===`weight`,vt=e=>e===`shadow`,yt=/*#__PURE__*/ Ae(()=>{let e=R(`color`),t=R(`font`),n=R(`text`),r=R(`font-weight`),i=R(`tracking`),a=R(`leading`),o=R(`breakpoint`),s=R(`container`),c=R(`spacing`),l=R(`radius`),u=R(`shadow`),d=R(`inset-shadow`),f=R(`text-shadow`),p=R(`drop-shadow`),m=R(`blur`),h=R(`perspective`),g=R(`aspect`),_=R(`ease`),v=R(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),U,H],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[U,H,c],T=()=>[Be,`full`,`auto`,...w()],E=()=>[B,`none`,`subgrid`,U,H],ee=()=>[`auto`,{span:[`full`,B,U,H]},B,U,H],D=()=>[B,`auto`,U,H],O=()=>[`auto`,`min`,`max`,`fr`,U,H],te=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],k=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],A=()=>[`auto`,...w()],j=()=>[Be,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],ne=()=>[s,Be,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],M=()=>[Be,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],N=()=>[e,U,H],re=()=>[...b(),at,et,{position:[U,H]}],ie=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ae=()=>[`auto`,`cover`,`contain`,ot,Ye,{size:[U,H]}],P=()=>[Ve,rt,Xe],F=()=>[``,`none`,`full`,l,U,H],I=()=>[``,z,rt,Xe],oe=()=>[`solid`,`dashed`,`dotted`,`double`],se=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],L=()=>[z,Ve,at,et],ce=()=>[``,`none`,m,U,H],le=()=>[`none`,z,U,H],ue=()=>[`none`,z,U,H],de=()=>[z,U,H],fe=()=>[Be,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[V],breakpoint:[V],color:[He],container:[V],"drop-shadow":[V],ease:[`in`,`out`,`in-out`],font:[qe],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[V],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[V],shadow:[V],spacing:[`px`,z],text:[V],"text-shadow":[V],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,Be,H,U,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,U,H]}],"container-named":[Je],columns:[{columns:[z,`auto`,H,U,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"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`],sr:[`sr-only`,`not-sr-only`],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:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[B,`auto`,U,H]}],basis:[{basis:[Be,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[z,Be,`auto`,`initial`,`none`,H]}],grow:[{grow:[``,z,U,H]}],shrink:[{shrink:[``,z,U,H]}],order:[{order:[B,`first`,`last`,`none`,U,H]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:ee()}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:ee()}],"row-start":[{"row-start":D()}],"row-end":[{"row-end":D()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":O()}],"auto-rows":[{"auto-rows":O()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...te(),`normal`]}],"justify-items":[{"justify-items":[...k(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...k()]}],"align-content":[{content:[`normal`,...te()]}],"align-items":[{items:[...k(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...k(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":te()}],"place-items":[{"place-items":[...k(),`baseline`]}],"place-self":[{"place-self":[`auto`,...k()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:A()}],mx:[{mx:A()}],my:[{my:A()}],ms:[{ms:A()}],me:[{me:A()}],mbs:[{mbs:A()}],mbe:[{mbe:A()}],mt:[{mt:A()}],mr:[{mr:A()}],mb:[{mb:A()}],ml:[{ml:A()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:j()}],"inline-size":[{inline:[`auto`,...ne()]}],"min-inline-size":[{"min-inline":[`auto`,...ne()]}],"max-inline-size":[{"max-inline":[`none`,...ne()]}],"block-size":[{block:[`auto`,...M()]}],"min-block-size":[{"min-block":[`auto`,...M()]}],"max-block-size":[{"max-block":[`none`,...M()]}],w:[{w:[s,`screen`,...j()]}],"min-w":[{"min-w":[s,`screen`,`none`,...j()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...j()]}],h:[{h:[`screen`,`lh`,...j()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...j()]}],"max-h":[{"max-h":[`screen`,`lh`,`none`,...j()]}],"font-size":[{text:[`base`,n,rt,Xe]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,lt,Qe]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,Ve,H]}],"font-family":[{font:[it,$e,t]}],"font-features":[{"font-features":[H]}],"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-fractions`],tracking:[{tracking:[i,U,H]}],"line-clamp":[{"line-clamp":[z,`none`,U,Ze]}],leading:[{leading:[`none`,a,...w()]}],"list-image":[{"list-image":[`none`,U,H]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,U,H]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:N()}],"text-color":[{text:N()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...oe(),`wavy`]}],"text-decoration-thickness":[{decoration:[z,`from-font`,`auto`,U,Xe]}],"text-decoration-color":[{decoration:N()}],"underline-offset":[{"underline-offset":[z,`auto`,U,H]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[B,U,H]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,U,H]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,U,H]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:re()}],"bg-repeat":[{bg:ie()}],"bg-size":[{bg:ae()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},B,U,H],radial:[``,U,H],conic:[``,B,U,H]},st,tt]}],"bg-color":[{bg:N()}],"gradient-from-pos":[{from:P()}],"gradient-via-pos":[{via:P()}],"gradient-to-pos":[{to:P()}],"gradient-from":[{from:N()}],"gradient-via":[{via:N()}],"gradient-to":[{to:N()}],rounded:[{rounded:F()}],"rounded-s":[{"rounded-s":F()}],"rounded-e":[{"rounded-e":F()}],"rounded-t":[{"rounded-t":F()}],"rounded-r":[{"rounded-r":F()}],"rounded-b":[{"rounded-b":F()}],"rounded-l":[{"rounded-l":F()}],"rounded-ss":[{"rounded-ss":F()}],"rounded-se":[{"rounded-se":F()}],"rounded-ee":[{"rounded-ee":F()}],"rounded-es":[{"rounded-es":F()}],"rounded-tl":[{"rounded-tl":F()}],"rounded-tr":[{"rounded-tr":F()}],"rounded-br":[{"rounded-br":F()}],"rounded-bl":[{"rounded-bl":F()}],"border-w":[{border:I()}],"border-w-x":[{"border-x":I()}],"border-w-y":[{"border-y":I()}],"border-w-s":[{"border-s":I()}],"border-w-e":[{"border-e":I()}],"border-w-bs":[{"border-bs":I()}],"border-w-be":[{"border-be":I()}],"border-w-t":[{"border-t":I()}],"border-w-r":[{"border-r":I()}],"border-w-b":[{"border-b":I()}],"border-w-l":[{"border-l":I()}],"divide-x":[{"divide-x":I()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":I()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...oe(),`hidden`,`none`]}],"divide-style":[{divide:[...oe(),`hidden`,`none`]}],"border-color":[{border:N()}],"border-color-x":[{"border-x":N()}],"border-color-y":[{"border-y":N()}],"border-color-s":[{"border-s":N()}],"border-color-e":[{"border-e":N()}],"border-color-bs":[{"border-bs":N()}],"border-color-be":[{"border-be":N()}],"border-color-t":[{"border-t":N()}],"border-color-r":[{"border-r":N()}],"border-color-b":[{"border-b":N()}],"border-color-l":[{"border-l":N()}],"divide-color":[{divide:N()}],"outline-style":[{outline:[...oe(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[z,U,H]}],"outline-w":[{outline:[``,z,rt,Xe]}],"outline-color":[{outline:N()}],shadow:[{shadow:[``,`inner`,`none`,u,ct,nt]}],"shadow-color":[{shadow:N()}],"inset-shadow":[{"inset-shadow":[`none`,d,ct,nt]}],"inset-shadow-color":[{"inset-shadow":N()}],"ring-w":[{ring:I()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:N()}],"ring-offset-w":[{"ring-offset":[z,Xe]}],"ring-offset-color":[{"ring-offset":N()}],"inset-ring-w":[{"inset-ring":I()}],"inset-ring-color":[{"inset-ring":N()}],"text-shadow":[{"text-shadow":[`none`,f,ct,nt]}],"text-shadow-color":[{"text-shadow":N()}],opacity:[{opacity:[z,U,H]}],"mix-blend":[{"mix-blend":[...se(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":se()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[z]}],"mask-image-linear-from-pos":[{"mask-linear-from":L()}],"mask-image-linear-to-pos":[{"mask-linear-to":L()}],"mask-image-linear-from-color":[{"mask-linear-from":N()}],"mask-image-linear-to-color":[{"mask-linear-to":N()}],"mask-image-t-from-pos":[{"mask-t-from":L()}],"mask-image-t-to-pos":[{"mask-t-to":L()}],"mask-image-t-from-color":[{"mask-t-from":N()}],"mask-image-t-to-color":[{"mask-t-to":N()}],"mask-image-r-from-pos":[{"mask-r-from":L()}],"mask-image-r-to-pos":[{"mask-r-to":L()}],"mask-image-r-from-color":[{"mask-r-from":N()}],"mask-image-r-to-color":[{"mask-r-to":N()}],"mask-image-b-from-pos":[{"mask-b-from":L()}],"mask-image-b-to-pos":[{"mask-b-to":L()}],"mask-image-b-from-color":[{"mask-b-from":N()}],"mask-image-b-to-color":[{"mask-b-to":N()}],"mask-image-l-from-pos":[{"mask-l-from":L()}],"mask-image-l-to-pos":[{"mask-l-to":L()}],"mask-image-l-from-color":[{"mask-l-from":N()}],"mask-image-l-to-color":[{"mask-l-to":N()}],"mask-image-x-from-pos":[{"mask-x-from":L()}],"mask-image-x-to-pos":[{"mask-x-to":L()}],"mask-image-x-from-color":[{"mask-x-from":N()}],"mask-image-x-to-color":[{"mask-x-to":N()}],"mask-image-y-from-pos":[{"mask-y-from":L()}],"mask-image-y-to-pos":[{"mask-y-to":L()}],"mask-image-y-from-color":[{"mask-y-from":N()}],"mask-image-y-to-color":[{"mask-y-to":N()}],"mask-image-radial":[{"mask-radial":[U,H]}],"mask-image-radial-from-pos":[{"mask-radial-from":L()}],"mask-image-radial-to-pos":[{"mask-radial-to":L()}],"mask-image-radial-from-color":[{"mask-radial-from":N()}],"mask-image-radial-to-color":[{"mask-radial-to":N()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[z]}],"mask-image-conic-from-pos":[{"mask-conic-from":L()}],"mask-image-conic-to-pos":[{"mask-conic-to":L()}],"mask-image-conic-from-color":[{"mask-conic-from":N()}],"mask-image-conic-to-color":[{"mask-conic-to":N()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:re()}],"mask-repeat":[{mask:ie()}],"mask-size":[{mask:ae()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,U,H]}],filter:[{filter:[``,`none`,U,H]}],blur:[{blur:ce()}],brightness:[{brightness:[z,U,H]}],contrast:[{contrast:[z,U,H]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,ct,nt]}],"drop-shadow-color":[{"drop-shadow":N()}],grayscale:[{grayscale:[``,z,U,H]}],"hue-rotate":[{"hue-rotate":[z,U,H]}],invert:[{invert:[``,z,U,H]}],saturate:[{saturate:[z,U,H]}],sepia:[{sepia:[``,z,U,H]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,U,H]}],"backdrop-blur":[{"backdrop-blur":ce()}],"backdrop-brightness":[{"backdrop-brightness":[z,U,H]}],"backdrop-contrast":[{"backdrop-contrast":[z,U,H]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,z,U,H]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[z,U,H]}],"backdrop-invert":[{"backdrop-invert":[``,z,U,H]}],"backdrop-opacity":[{"backdrop-opacity":[z,U,H]}],"backdrop-saturate":[{"backdrop-saturate":[z,U,H]}],"backdrop-sepia":[{"backdrop-sepia":[``,z,U,H]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,U,H]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[z,`initial`,U,H]}],ease:[{ease:[`linear`,`initial`,_,U,H]}],delay:[{delay:[z,U,H]}],animate:[{animate:[`none`,v,U,H]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,U,H]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:le()}],"rotate-x":[{"rotate-x":le()}],"rotate-y":[{"rotate-y":le()}],"rotate-z":[{"rotate-z":le()}],scale:[{scale:ue()}],"scale-x":[{"scale-x":ue()}],"scale-y":[{"scale-y":ue()}],"scale-z":[{"scale-z":ue()}],"scale-3d":[`scale-3d`],skew:[{skew:de()}],"skew-x":[{"skew-x":de()}],"skew-y":[{"skew-y":de()}],transform:[{transform:[U,H,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:fe()}],"translate-x":[{"translate-x":fe()}],"translate-y":[{"translate-y":fe()}],"translate-z":[{"translate-z":fe()}],"translate-none":[`translate-none`],zoom:[{zoom:[B,U,H]}],accent:[{accent:N()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:N()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],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`,U,H]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":N()}],"scrollbar-track-color":[{"scrollbar-track":N()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"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`,U,H]}],fill:[{fill:[`none`,...N()]}],"stroke-w":[{stroke:[z,rt,Xe,Ze]}],stroke:[{stroke:[`none`,...N()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`start`,`end`,`right`,`left`],"inset-y":[`inset-bs`,`inset-be`,`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`ps`,`pe`,`pr`,`pl`],py:[`pbs`,`pbe`,`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`ms`,`me`,`mr`,`ml`],my:[`mbs`,`mbe`,`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-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-s`,`border-w-e`,`border-w-r`,`border-w-l`],"border-w-y":[`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-s`,`border-color-e`,`border-color-r`,`border-color-l`],"border-color-y":[`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-ms`,`scroll-me`,`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-ps`,`scroll-pe`,`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function G(...e){return yt(N(e))}var bt=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function xt(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:bt(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var St=e=>{let t=``,n=!1;for(let r of e)r===`-`||r===`_`||r<=` `?n=t.length>0:(t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1);return t},Ct=e=>{let t=St(e);return t.charAt(0).toUpperCase()+t.slice(1)},wt=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Tt={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function Et(e){return e!=null}function Dt(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??Tt.width,a=e.size??e.height??Tt.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?wt(...c):wt(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??Tt[`stroke-width`])*Number(e.size??e.width??Tt.width)/Number(t.size??t.width??Tt.width):t.strokeWidth??Tt[`stroke-width`];return[`svg`,{...Object.entries(Tt).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&Et(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&Et(t.width)&&{[r(`width`)]:t.width},...`height`in t&&Et(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}function Ot(e,t={}){return Dt(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var kt=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},At=t({}),jt=()=>i(At),Mt=r(({color:e,size:t,width:r,height:i,strokeWidth:a,absoluteStrokeWidth:o,nonScalingStroke:s,className:c=``,children:l,iconNode:u=[],icon:d={node:u,aliases:[],size:24},...f},p)=>{let{size:m=24,strokeWidth:h=2,absoluteStrokeWidth:g=!1,nonScalingStroke:_=!1,color:v=`currentColor`,className:y=``}=jt()??{},b=!!l||kt(f),[x,S,C=[]]=Ot(d,{color:e??v,width:r??t??m,height:i??t??m,strokeWidth:a??h,absoluteStrokeWidth:o??g,nonScalingStroke:s??_,className:wt(y,c),hasA11yProp:b,attributes:f});return n(x,{ref:p,...S},[...C.map(([e,t])=>n(e,t)),...Array.isArray(l)?l:[l]])});function Nt(e,t=[],i=[]){let a=typeof e==`string`?xt(e,t,i):e,o=r(({className:e,...t},r)=>n(Mt,{ref:r,icon:a,className:e,...t}));return a.name&&(o.displayName=Ct(a.name)),o}var Pt={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]};Pt.node;var Ft=Nt(Pt),It={name:`chevron-down`,size:24,node:[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]};It.node;var Lt=Nt(It),Rt={name:`chevron-up`,size:24,node:[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]};Rt.node;var zt=Nt(Rt),Bt={name:`search`,size:24,node:[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]};Bt.node;var Vt=Nt(Bt),Ht={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]};Ht.node;var Ut=Nt(Ht),Wt=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,Gt=N,Kt=(e,t)=>n=>{if(t?.variants==null)return Gt(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=Wt(t)||Wt(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return Gt(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},qt=Kt(`group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-[13px] font-medium whitespace-nowrap transition-[background-color,border-color,color,scale] duration-150 ease-spring outline-none select-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring active:not-aria-[haspopup]:scale-[0.97] disabled:pointer-events-none disabled:opacity-40 aria-invalid:border-destructive motion-reduce:active:scale-100 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 max-sm:has-[>[data-slot=button-label]]:aspect-square max-sm:has-[>[data-slot=button-label]]:px-0!`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-[color-mix(in_oklab,var(--primary),var(--primary-foreground)_14%)] active:bg-[color-mix(in_oklab,var(--primary),var(--primary-foreground)_20%)]`,outline:`border-input bg-control hover:border-muted-foreground/60 hover:bg-foreground/4 aria-expanded:bg-foreground/6`,secondary:`bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklab,var(--secondary),var(--foreground)_6%)] active:bg-[color-mix(in_oklab,var(--secondary),var(--foreground)_10%)] aria-expanded:bg-[color-mix(in_oklab,var(--secondary),var(--foreground)_6%)]`,ghost:`hover:bg-foreground/6 active:bg-foreground/10 aria-expanded:bg-foreground/6`,destructive:`bg-destructive/10 text-destructive hover:bg-destructive/16 active:bg-destructive/22 focus-visible:outline-destructive`,link:`text-primary underline-offset-4 hover:underline active:scale-100`},size:{default:`h-[30px] gap-1.5 px-3 has-data-[icon=inline-end]:pr-2.5 has-data-[icon=inline-start]:pl-2.5`,xs:`h-[22px] gap-1 rounded-md px-2 text-xs has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3`,sm:`h-[26px] gap-1 rounded-md px-2.5 text-[12.5px] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5`,lg:`h-9 gap-1.5 px-4 text-sm has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3`,icon:`size-[30px]`,"icon-xs":`size-[22px] rounded-md [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-[26px] rounded-md`,"icon-lg":`size-9`}},defaultVariants:{variant:`default`,size:`default`}});function K({className:e,variant:t=`default`,size:n=`default`,...r}){return/* @__PURE__ */ g(v,{"data-slot":`button`,className:G(qt({variant:t,size:n,className:e})),...r})}function Jt({className:e,...t}){return/* @__PURE__ */ g(`div`,{"data-slot":`empty`,className:G(`flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-xl border-dashed p-6 text-center text-balance`,e),...t})}function Yt({className:e,...t}){return/* @__PURE__ */ g(`div`,{"data-slot":`empty-header`,className:G(`flex max-w-sm flex-col items-center gap-2`,e),...t})}function Xt({className:e,...t}){return/* @__PURE__ */ g(`div`,{"data-slot":`empty-title`,className:G(`text-sm font-medium tracking-tight`,e),...t})}function Zt({className:e,...t}){return/* @__PURE__ */ g(`div`,{"data-slot":`empty-description`,className:G(`text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary`,e),...t})}function Qt({className:e,...t}){return/* @__PURE__ */ g(`div`,{"data-slot":`empty-content`,className:G(`flex w-full max-w-sm min-w-0 flex-col items-center gap-2.5 text-sm text-balance`,e),...t})}function $t({art:e}){return g(e===`search`?en:tn,{})}function en(){return/* @__PURE__ */ _(`svg`,{viewBox:`0 0 160 120`,fill:`none`,"aria-hidden":`true`,className:`h-28 w-auto`,children:[/* @__PURE__ */ g(`ellipse`,{cx:`80`,cy:`108`,rx:`52`,ry:`5`,className:`fill-muted`}),/* @__PURE__ */ g(`rect`,{x:`30`,y:`22`,width:`76`,height:`80`,rx:`10`,className:`fill-muted stroke-border`,strokeWidth:`1.5`}),/* @__PURE__ */ g(`rect`,{x:`40`,y:`12`,width:`76`,height:`80`,rx:`10`,className:`fill-background stroke-border`,strokeWidth:`1.5`}),/* @__PURE__ */ g(`rect`,{x:`52`,y:`26`,width:`16`,height:`16`,rx:`4`,className:`fill-muted`}),/* @__PURE__ */ g(`rect`,{x:`74`,y:`28`,width:`30`,height:`4`,rx:`2`,className:`fill-muted-foreground/25`}),/* @__PURE__ */ g(`rect`,{x:`74`,y:`36`,width:`20`,height:`3`,rx:`1.5`,className:`fill-muted-foreground/15`}),/* @__PURE__ */ g(`rect`,{x:`52`,y:`52`,width:`16`,height:`16`,rx:`4`,className:`fill-muted`}),/* @__PURE__ */ g(`rect`,{x:`74`,y:`54`,width:`26`,height:`4`,rx:`2`,className:`fill-muted-foreground/25`}),/* @__PURE__ */ g(`rect`,{x:`74`,y:`62`,width:`16`,height:`3`,rx:`1.5`,className:`fill-muted-foreground/15`}),/* @__PURE__ */ g(`path`,{d:`M114 86 L128 100`,className:`stroke-primary`,strokeWidth:`6`,strokeLinecap:`round`}),/* @__PURE__ */ g(`circle`,{cx:`102`,cy:`74`,r:`17`,className:`fill-background stroke-primary`,strokeWidth:`4`}),/* @__PURE__ */ g(`circle`,{cx:`102`,cy:`74`,r:`11`,className:`fill-primary/10`}),/* @__PURE__ */ g(`path`,{d:`M97 69 L107 79 M107 69 L97 79`,className:`stroke-primary/70`,strokeWidth:`2.5`,strokeLinecap:`round`}),/* @__PURE__ */ g(`circle`,{cx:`26`,cy:`16`,r:`2.5`,className:`fill-primary/40`}),/* @__PURE__ */ g(`circle`,{cx:`136`,cy:`30`,r:`2`,className:`fill-primary/30`})]})}function tn(){return/* @__PURE__ */ _(`svg`,{viewBox:`0 0 160 120`,fill:`none`,"aria-hidden":`true`,className:`h-28 w-auto`,children:[/* @__PURE__ */ g(`ellipse`,{cx:`80`,cy:`108`,rx:`56`,ry:`5`,className:`fill-muted`}),/* @__PURE__ */ g(`path`,{d:`M34 58 L48 30 H112 L126 58`,className:`fill-muted stroke-border`,strokeWidth:`1.5`,strokeLinejoin:`round`}),/* @__PURE__ */ g(`rect`,{x:`58`,y:`22`,width:`44`,height:`30`,rx:`5`,className:`fill-background stroke-border`,strokeWidth:`1.5`}),/* @__PURE__ */ g(`rect`,{x:`66`,y:`31`,width:`22`,height:`3.5`,rx:`1.75`,className:`fill-muted-foreground/25`}),/* @__PURE__ */ g(`rect`,{x:`66`,y:`39`,width:`14`,height:`3`,rx:`1.5`,className:`fill-muted-foreground/15`}),/* @__PURE__ */ g(`path`,{d:`M34 58 H60 a4 4 0 0 1 4 4 a8 8 0 0 0 8 8 h16 a8 8 0 0 0 8 -8 a4 4 0 0 1 4 -4 H126 V92 a8 8 0 0 1 -8 8 H42 a8 8 0 0 1 -8 -8 Z`,className:`fill-background stroke-border`,strokeWidth:`1.5`,strokeLinejoin:`round`}),/* @__PURE__ */ g(`path`,{d:`M120 14 v8 M116 18 h8`,className:`stroke-primary/60`,strokeWidth:`2`,strokeLinecap:`round`}),/* @__PURE__ */ g(`path`,{d:`M36 20 v6 M33 23 h6`,className:`stroke-primary/40`,strokeWidth:`2`,strokeLinecap:`round`}),/* @__PURE__ */ g(`circle`,{cx:`138`,cy:`44`,r:`2.5`,className:`fill-primary/30`})]})}function nn({...e}){return/* @__PURE__ */ g(y.Root,{"data-slot":`dialog`,...e})}function rn({...e}){return/* @__PURE__ */ g(y.Portal,{"data-slot":`dialog-portal`,...e})}function an({className:e,...t}){return/* @__PURE__ */ g(y.Backdrop,{forceRender:!0,"data-slot":`dialog-overlay`,className:G(`fixed inset-0 isolate z-50 bg-linear-to-b from-scrim-from to-scrim-to duration-200 data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0`,e),...t})}function on({className:e,children:t,showCloseButton:n=!0,...r}){return/* @__PURE__ */ _(rn,{children:[/* @__PURE__ */ g(an,{}),/* @__PURE__ */ _(y.Popup,{"data-slot":`dialog-content`,className:G(`[--control:var(--popover)] fixed top-1/2 left-1/2 z-50 grid max-h-[calc(100dvh-2rem)] w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 overflow-y-auto rounded-[20px] bg-popover p-5 text-sm text-popover-foreground shadow-[0_24px_64px_rgb(0_0_0/0.22)] ring-1 ring-border duration-200 ease-spring outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 [&:not(.flex)>:first-child]:[grid-area:1/1]`,e),...r,children:[t,n&&/* @__PURE__ */ _(y.Close,{"data-slot":`dialog-close`,render:/* @__PURE__ */ g(K,{variant:`ghost`,className:`absolute top-2 right-2 z-20 [.p-5:not(.flex)>&]:sticky [.p-5:not(.flex)>&]:-top-3 [.p-5:not(.flex)>&]:right-auto [.p-5:not(.flex)>&]:col-start-1 [.p-5:not(.flex)>&]:row-start-1 [.p-5:not(.flex)>&]:-mt-3 [.p-5:not(.flex)>&]:-mr-3 [.p-5:not(.flex)>&]:-mb-3.5 [.p-5:not(.flex)>&]:ml-auto`,size:`icon-sm`}),children:[/* @__PURE__ */ g(Ut,{}),/* @__PURE__ */ g(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function sn({className:e,...t}){return/* @__PURE__ */ g(`div`,{"data-slot":`dialog-header`,className:G(`sticky top-0 z-10 flex shrink-0 flex-col gap-2 bg-popover before:absolute before:inset-x-0 before:bottom-full before:bg-popover [[data-slot=dialog-content].p-5>&]:before:h-5`,e),...t})}function cn({className:e,showCloseButton:t=!1,children:n,...r}){return/* @__PURE__ */ _(`div`,{"data-slot":`dialog-footer`,className:G(`sticky bottom-0 z-10 flex shrink-0 flex-col-reverse gap-2 bg-popover pt-2 sm:flex-row sm:justify-end after:absolute after:inset-x-0 after:top-full after:bg-popover [[data-slot=dialog-content].p-5>&]:after:h-5`,e),...r,children:[n,t&&/* @__PURE__ */ g(y.Close,{render:/* @__PURE__ */ g(K,{variant:`outline`}),children:`Close`})]})}function ln({className:e,...t}){return/* @__PURE__ */ g(y.Title,{"data-slot":`dialog-title`,className:G(`text-base leading-none font-medium`,e),...t})}function un({className:e,...t}){return/* @__PURE__ */ g(y.Description,{"data-slot":`dialog-description`,className:G(`text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground`,e),...t})}function dn({className:e,...t}){return/* @__PURE__ */ g(`textarea`,{"data-slot":`textarea`,className:G(`flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-control px-2.5 py-2 text-(length:--field-text) leading-normal [--field-text:1rem] transition-colors duration-150 outline-none placeholder:text-muted-foreground/70 hover:border-muted-foreground/60 focus-visible:border-primary disabled:cursor-not-allowed disabled:border-border disabled:bg-muted disabled:text-muted-foreground aria-invalid:border-destructive md:[--field-text:13px] pointer-coarse:text-base!`,e),...t})}function q({className:e,type:t,...n}){return/* @__PURE__ */ g(b,{type:t,"data-slot":`input`,className:G(`h-[30px] w-full min-w-0 text-ellipsis rounded-lg border border-input bg-control px-2.5 py-1 text-(length:--field-text) leading-normal [--field-text:1rem] transition-colors duration-150 outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground/70 hover:border-muted-foreground/60 focus-visible:border-primary disabled:pointer-events-none disabled:cursor-not-allowed disabled:border-border disabled:bg-muted disabled:text-muted-foreground aria-invalid:border-destructive md:[--field-text:13px] pointer-coarse:text-base!`,e),...n})}function fn({className:e,...t}){return/* @__PURE__ */ g(`div`,{"data-slot":`input-group`,role:`group`,className:G(`group/input-group relative flex h-[30px] w-full min-w-0 items-center rounded-lg border border-input bg-control transition-colors duration-150 outline-none hover:border-muted-foreground/60 in-data-[slot=combobox-content]:focus-within:border-inherit has-[[data-slot=input-group-control]:disabled]:border-border has-[[data-slot=input-group-control]:disabled]:bg-muted has-[[data-slot=input-group-control]:disabled]:text-muted-foreground has-[[data-slot=input-group-control]:focus-visible]:border-primary has-[[data-slot][aria-invalid=true]]:border-destructive has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5`,e),...t})}var pn=Kt(`flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4`,{variants:{align:{"inline-start":`order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]`,"inline-end":`order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]`,"block-start":`order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2`,"block-end":`order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2`}},defaultVariants:{align:`inline-start`}});function mn({className:e,align:t=`inline-start`,...n}){return/* @__PURE__ */ g(`div`,{role:`group`,"data-slot":`input-group-addon`,"data-align":t,className:G(pn({align:t}),e),onClick:e=>{e.currentTarget.contains(e.target)&&!e.target.closest(`button`)&&e.currentTarget.parentElement?.querySelector(`input`)?.focus()},...n})}var hn=Kt(`flex items-center gap-2 text-sm shadow-none`,{variants:{size:{xs:`h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5`,sm:``,"icon-xs":`size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0`,"icon-sm":`size-8 p-0 has-[>svg]:p-0`}},defaultVariants:{size:`xs`}});function gn({className:e,type:t=`button`,variant:n=`ghost`,size:r=`xs`,...i}){return/* @__PURE__ */ g(K,{type:t,"data-size":r,variant:n,className:G(hn({size:r}),e),...i})}function _n({className:e,...t}){return/* @__PURE__ */ g(q,{"data-slot":`input-group-control`,className:G(`flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent`,e),...t})}function vn({attribute:t=`data-highlighted`,hover:n,className:r}){let i=e.useRef(null);return e.useEffect(()=>{let e=i.current,r=e?.parentElement;if(!e||!r)return;let a=null,o=null,s=``,c,l=()=>n===void 0?r.querySelector(`[${t}]`):a?.isConnected?a:null,u=t=>{let n=l();if(n!==o&&(o&&d.unobserve(o),n&&d.observe(n),o=n),!n){s=``,e.style.opacity=`0`;return}let i=0,a=0;for(let e=n;e&&e!==r;e=e.offsetParent instanceof HTMLElement?e.offsetParent:null)i+=e.offsetLeft,a+=e.offsetTop;let c=`${i} ${a} ${n.offsetWidth} ${n.offsetHeight}`;if(c===s)return;let u=t||s===``;s=c,u&&(e.style.transitionProperty=`opacity`),e.style.transform=`translate(${i}px, ${a}px)`,e.style.width=`${n.offsetWidth}px`,e.style.height=`${n.offsetHeight}px`,e.style.opacity=`1`,u&&(e.getBoundingClientRect(),e.style.transitionProperty=``)},d=new ResizeObserver(()=>u(!0));d.observe(r);for(let e of r.children)d.observe(e);let f=new MutationObserver(e=>{for(let t of e)if(t.target===r){for(let e of t.addedNodes)e instanceof Element&&d.observe(e);for(let e of t.removedNodes)e instanceof Element&&d.unobserve(e)}u(!1)});if(f.observe(r,n===void 0?{subtree:!0,childList:!0,attributes:!0,attributeFilter:[t]}:{subtree:!0,childList:!0}),n===void 0)return u(!1),()=>{f.disconnect(),d.disconnect()};let p=e=>{if(e.pointerType!==`mouse`)return;clearTimeout(c);let t=e.target instanceof Element?e.target.closest(n):null;t&&r.contains(t)?(a=t,u(!1)):c=setTimeout(()=>{a=null,u(!1)},100)},m=()=>{clearTimeout(c),a=null,u(!1)};return r.addEventListener(`pointerover`,p),r.addEventListener(`pointerleave`,m),()=>{clearTimeout(c),r.removeEventListener(`pointerover`,p),r.removeEventListener(`pointerleave`,m),f.disconnect(),d.disconnect()}},[t,n]),/* @__PURE__ */ g(`span`,{ref:i,"aria-hidden":!0,"data-slot":`sliding-highlight`,className:G(`pointer-events-none absolute top-0 left-0 -z-1 rounded-md bg-accent opacity-0 transition-[transform,width,height,opacity] duration-200 ease-fluid motion-reduce:transition-none`,r)})}e.createContext({size:`default`,variant:`default`,spacing:2,orientation:`horizontal`});function yn({...e}){return/* @__PURE__ */ g(x.Root,{"data-slot":`tooltip`,...e})}function bn({...e}){return/* @__PURE__ */ g(x.Trigger,{"data-slot":`tooltip-trigger`,...e})}function xn({className:e,side:t=`top`,sideOffset:n=6,align:r=`center`,alignOffset:i=0,children:a,...o}){return/* @__PURE__ */ g(x.Portal,{children:/* @__PURE__ */ g(x.Positioner,{align:r,alignOffset:i,side:t,sideOffset:n,className:`isolate z-50`,children:/* @__PURE__ */ g(x.Popup,{"data-slot":`tooltip-content`,className:G(`z-50 inline-flex w-max max-w-[min(20rem,var(--available-width))] origin-(--transform-origin) items-center gap-1.5 rounded-lg bg-foreground px-2 py-1 text-xs leading-4 text-background shadow-popup duration-150 ease-fluid has-data-[slot=kbd]:pr-1 dark:bg-popover dark:text-popover-foreground dark:ring-1 dark:ring-border data-[side=bottom]:slide-in-from-top-1 data-[side=inline-end]:slide-in-from-left-1 data-[side=inline-start]:slide-in-from-right-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 motion-reduce:animate-none`,e),...o,children:a})})})}function Sn({art:e=`empty`,title:t,hint:n,actions:r}){return/* @__PURE__ */ _(Jt,{className:`gap-3 py-12`,children:[/* @__PURE__ */ _(Yt,{className:`gap-3`,children:[/* @__PURE__ */ g($t,{art:e}),/* @__PURE__ */ g(Xt,{children:t}),n!==void 0&&/* @__PURE__ */ g(Zt,{children:n})]}),r!==void 0&&/* @__PURE__ */ g(Qt,{className:`flex-row flex-wrap justify-center`,children:r})]})}function Cn({value:t,onChange:n,placeholder:r,clearLabel:i,className:a}){let o=e.useRef(null),[s,c]=e.useState();return/* @__PURE__ */ _(fn,{className:G(`w-full sm:w-72`,a),children:[/* @__PURE__ */ g(mn,{children:/* @__PURE__ */ g(Vt,{})}),/* @__PURE__ */ g(_n,{ref:o,type:`text`,role:`searchbox`,"aria-label":r,placeholder:r,value:s??t,onChange:e=>{s===void 0?n(e.target.value):c(e.target.value)},onCompositionStart:e=>c(e.currentTarget.value),onCompositionEnd:e=>{c(void 0),n(e.currentTarget.value)},onKeyDown:e=>{e.key===`Escape`&&!e.nativeEvent.isComposing&&t!==``&&(e.preventDefault(),n(``))}}),/* @__PURE__ */ g(mn,{align:`inline-end`,children:/* @__PURE__ */ g(gn,{size:`icon-xs`,"aria-label":i,className:t===``?`invisible`:``,onClick:()=>{n(``),o.current?.focus()},children:/* @__PURE__ */ g(Ut,{})})})]})}e.createContext(null),e.createContext(null);function wn({className:e,...t}){return/* @__PURE__ */ g(`div`,{"data-slot":`skeleton`,className:G(`animate-pulse rounded-md bg-muted`,e),...t})}typeof navigator<`u`&&/Mac|iPhone|iPad/.test(navigator.userAgent);var Tn=Kt(`group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-card text-card-foreground`,destructive:`bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current`}},defaultVariants:{variant:`default`}});function En({className:e,variant:t,...n}){return/* @__PURE__ */ g(`div`,{"data-slot":`alert`,role:`alert`,className:G(Tn({variant:t}),e),...n})}function Dn({className:e,size:t=`default`,...n}){return/* @__PURE__ */ g(S.Root,{"data-slot":`avatar`,"data-size":t,className:G(`group/avatar relative isolate flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:border-border after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten`,e),...n})}function On({className:e,...t}){return/* @__PURE__ */ g(S.Image,{"data-slot":`avatar-image`,className:G(`aspect-square size-full rounded-full object-cover`,e),...t})}function kn({className:e,...t}){return/* @__PURE__ */ g(S.Fallback,{"data-slot":`avatar-fallback`,className:G(`flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs`,e),...t})}var An=Kt(`group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-md border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-colors focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive [&>svg]:pointer-events-none [&>svg]:size-3!`,{variants:{variant:{default:`bg-primary text-primary-foreground [a]:hover:bg-primary/80`,secondary:`bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80`,destructive:`bg-destructive/10 text-destructive focus-visible:outline-destructive dark:bg-destructive/16 [a]:hover:bg-destructive/20`,outline:`border-input text-foreground [a]:hover:bg-muted`,ghost:`hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50`,link:`text-primary underline-offset-4 hover:underline`}},defaultVariants:{variant:`default`}});function jn({className:e,variant:t=`default`,render:n,...r}){return w({defaultTagName:`span`,props:C({className:G(An({variant:t}),e)},r),render:n,state:{slot:`badge`,variant:t}})}function Mn({className:e,...t}){return/* @__PURE__ */ g(T.Root,{"data-slot":`checkbox`,className:G(`peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border-[1.5px] border-input bg-control transition-[background-color,border-color,scale] duration-150 ease-spring outline-none group-has-disabled/field:opacity-50 group-has-[:focus-visible]/field-label:outline-none after:absolute after:-inset-x-3 after:-inset-y-2 hover:border-muted-foreground active:scale-90 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring disabled:cursor-not-allowed disabled:opacity-40 aria-invalid:border-destructive data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground motion-reduce:active:scale-100`,e),...t,children:/* @__PURE__ */ g(T.Indicator,{"data-slot":`checkbox-indicator`,className:`grid place-content-center text-current transition-none [&>svg]:size-3 [&>svg]:stroke-3 [&_path]:[stroke-dasharray:24] [&_path]:animate-[check-draw_260ms_var(--ease-fluid)] motion-reduce:[&_path]:animate-none`,children:/* @__PURE__ */ g(Ft,{})})})}function Nn({...e}){return/* @__PURE__ */ g(E.Root,{"data-slot":`collapsible`,...e})}function Pn({...e}){return/* @__PURE__ */ g(E.Trigger,{"data-slot":`collapsible-trigger`,...e})}function Fn({...e}){return/* @__PURE__ */ g(E.Panel,{"data-slot":`collapsible-content`,...e})}ee.Root;function In({...e}){return/* @__PURE__ */ g(D.Root,{"data-slot":`dropdown-menu`,...e})}function Ln({...e}){return/* @__PURE__ */ g(D.Trigger,{"data-slot":`dropdown-menu-trigger`,...e})}function Rn({align:e=`start`,alignOffset:t=0,side:n=`bottom`,sideOffset:r=4,className:i,children:a,...o}){return/* @__PURE__ */ g(D.Portal,{children:/* @__PURE__ */ g(D.Positioner,{className:`isolate z-50 outline-none`,align:e,alignOffset:t,side:n,sideOffset:r,children:/* @__PURE__ */ _(D.Popup,{"data-slot":`dropdown-menu-content`,className:G(`relative z-50 max-h-(--available-height) w-max max-w-(--available-width) min-w-[max(8rem,var(--anchor-width))] origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-xl bg-popover p-[5px] text-popover-foreground shadow-popup ring-1 ring-border duration-200 ease-fluid outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95`,i),...o,children:[/* @__PURE__ */ g(vn,{}),a]})})})}function zn({className:e,inset:t,variant:n=`default`,...r}){return/* @__PURE__ */ g(D.Item,{"data-slot":`dropdown-menu-item`,"data-inset":t,"data-variant":n,className:G(`group/dropdown-menu-item relative flex cursor-default items-center min-h-[30px] gap-2.5 rounded-md px-2.5 py-1 text-[13px] outline-hidden select-none data-inset:pl-[35px] data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-[15px] *:[svg]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive`,e),...r})}function Bn({className:e,...t}){return/* @__PURE__ */ g(D.Separator,{"data-slot":`dropdown-menu-separator`,className:G(`-mx-[5px] my-[5px] h-px bg-border`,e),...t})}function Vn({className:e,...t}){return/* @__PURE__ */ g(`label`,{"data-slot":`label`,className:G(`flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50`,e),...t})}var Hn=Kt(`group/field flex w-full gap-2 data-[invalid=true]:text-destructive`,{variants:{orientation:{vertical:`flex-col *:w-full [&>.sr-only]:w-auto`,horizontal:`flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`,responsive:`flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`}},defaultVariants:{orientation:`vertical`}});function J({className:e,orientation:t=`vertical`,...n}){return/* @__PURE__ */ g(`div`,{role:`group`,"data-slot":`field`,"data-orientation":t,className:G(Hn({orientation:t}),e),...n})}function Un({className:e,...t}){return/* @__PURE__ */ g(Vn,{"data-slot":`field-label`,className:G(`group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-muted/50 has-[>[data-slot=field]]:has-[:focus-visible]:outline-2 has-[>[data-slot=field]]:has-[:focus-visible]:outline-offset-2 has-[>[data-slot=field]]:has-[:focus-visible]:outline-ring *:data-[slot=field]:p-2.5 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10`,`has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col`,e),...t})}var Wn=O.Root;function Gn({className:e,...t}){return/* @__PURE__ */ g(O.Value,{"data-slot":`select-value`,className:G(`flex flex-1 text-left`,e),...t})}function Kn({className:e,size:t=`default`,children:n,...r}){return/* @__PURE__ */ _(O.Trigger,{"data-slot":`select-trigger`,"data-size":t,className:G(`flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-control py-2 pr-2 pl-2.5 text-[13px] whitespace-nowrap transition-colors duration-150 outline-none select-none hover:border-muted-foreground/60 focus-visible:border-primary data-popup-open:border-primary disabled:cursor-not-allowed disabled:border-border disabled:bg-muted disabled:text-muted-foreground aria-invalid:border-destructive data-placeholder:text-muted-foreground data-[size=default]:h-[30px] data-[size=sm]:h-[26px] data-[size=sm]:rounded-md *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[popup-open]:[&_[data-slot=select-icon]]:rotate-180`,e),...r,children:[n,/* @__PURE__ */ g(O.Icon,{render:/* @__PURE__ */ g(Lt,{"data-slot":`select-icon`,className:`pointer-events-none size-4 text-muted-foreground transition-transform duration-200 ease-fluid`})})]})}function qn({className:e,children:t,side:n=`bottom`,sideOffset:r=4,align:i=`center`,alignOffset:a=0,alignItemWithTrigger:o=!1,...s}){return/* @__PURE__ */ g(O.Portal,{children:/* @__PURE__ */ g(O.Positioner,{side:n,sideOffset:r,align:i,alignOffset:a,alignItemWithTrigger:o,className:`isolate z-50`,children:/* @__PURE__ */ _(O.Popup,{"data-slot":`select-content`,"data-align-trigger":o,className:G(`relative isolate z-50 max-h-(--available-height) w-max max-w-[min(24rem,var(--available-width))] min-w-(--anchor-width) origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-xl bg-popover text-popover-foreground shadow-popup ring-1 ring-border duration-200 ease-fluid data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...s,children:[/* @__PURE__ */ g(vn,{}),/* @__PURE__ */ g(Jn,{}),/* @__PURE__ */ g(O.List,{children:t}),/* @__PURE__ */ g(Yn,{})]})})})}function Y({className:e,children:t,...n}){return/* @__PURE__ */ _(O.Item,{"data-slot":`select-item`,className:G(`relative flex w-full cursor-default items-center min-h-[30px] gap-2.5 rounded-md py-1 pr-8 pl-2.5 text-[13px] outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-[15px] *:[svg]:text-muted-foreground *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2`,e),...n,children:[/* @__PURE__ */ g(O.ItemText,{className:`flex flex-1 shrink-0 gap-2 whitespace-nowrap`,children:t}),/* @__PURE__ */ g(O.ItemIndicator,{render:/* @__PURE__ */ g(`span`,{className:`pointer-events-none absolute right-2.5 flex size-4 items-center justify-center`}),children:/* @__PURE__ */ g(Ft,{className:`pointer-events-none`})})]})}function Jn({className:e,...t}){return/* @__PURE__ */ g(O.ScrollUpArrow,{"data-slot":`select-scroll-up-button`,className:G(`top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-[15px] *:[svg]:text-muted-foreground`,e),...t,children:/* @__PURE__ */ g(zt,{})})}function Yn({className:e,...t}){return/* @__PURE__ */ g(O.ScrollDownArrow,{"data-slot":`select-scroll-down-button`,className:G(`bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-[15px] *:[svg]:text-muted-foreground`,e),...t,children:/* @__PURE__ */ g(Lt,{})})}e.createContext(null);function Xn(e){let t;try{t=JSON.parse(e)}catch{return}if(t&&[1,2,3,4,5,6].includes(t.version)&&typeof t.sourcePresetId==`string`&&t.sourcePresetId.trim()&&Array.isArray(t.entries)&&Array.isArray(t.userProfiles)&&Array.isArray(t.presetSpeakers))return t}function Zn(e,t){let n=new Blob([JSON.stringify(t,null,2)],{type:`application/json`}),r=URL.createObjectURL(n),i=document.createElement(`a`);i.href=r,i.download=`livingmemory-${e.replace(/[<>:"/\\|?*]/g,`_`)}-${(/* @__PURE__ */ new Date()).toISOString().slice(0,10)}.json`,i.click(),setTimeout(()=>URL.revokeObjectURL(r),0)}function Qn({presetId:t,onClear:n}){let r=f(`livingmemory`),i=e.useRef(null),[s,l]=e.useState(!1),[u,d]=e.useState();async function p(){if(t){l(!0);try{let{data:e}=await o(`livingmemory.exportPreset`,{presetId:t});Zn(t,e)}catch(e){c.error(a(e))}finally{l(!1)}}}async function m(e){let n=e.currentTarget.files?.[0];if(e.currentTarget.value=``,n){l(!0);try{let e=Xn(await n.text());if(!e)return c.error(r(`transfer.invalid`));d({data:e,target:t??e.sourcePresetId})}catch(e){c.error(a(e))}finally{l(!1)}}}async function v(){if(u){l(!0);try{let e=await o(`livingmemory.importPreset`,{presetId:u.target,data:u.data});d(void 0),c.success(r(`transfer.imported`,{target:u.target,entries:e.entries,profiles:e.userProfiles,speakers:e.presetSpeakers}))}catch(e){c.error(a(e))}finally{l(!1)}}}return/* @__PURE__ */ _(h,{children:[/* @__PURE__ */ g(`input`,{ref:i,type:`file`,hidden:!0,accept:`.json,application/json`,onChange:m}),/* @__PURE__ */ _(In,{children:[/* @__PURE__ */ _(Ln,{render:/* @__PURE__ */ g(K,{variant:`outline`}),children:[r(`preset.actions`),` `,/* @__PURE__ */ g(`span`,{"aria-hidden":`true`,children:`▾`})]}),/* @__PURE__ */ _(Rn,{align:`end`,children:[/* @__PURE__ */ g(zn,{disabled:s,onClick:()=>i.current?.click(),children:r(`transfer.import`)}),/* @__PURE__ */ g(zn,{disabled:s||!t,onClick:p,children:r(`transfer.export`)}),/* @__PURE__ */ g(Bn,{}),/* @__PURE__ */ g(zn,{disabled:s||!t,variant:`destructive`,onClick:()=>{t&&n(t)},children:r(`deletion.clearPreset`)})]})]}),u&&/* @__PURE__ */ g(nn,{open:!0,onOpenChange:e=>{!e&&!s&&d(void 0)},children:/* @__PURE__ */ _(on,{children:[/* @__PURE__ */ _(sn,{children:[/* @__PURE__ */ g(ln,{children:r(`transfer.confirmTitle`,{target:u.target})}),/* @__PURE__ */ g(un,{children:r(`transfer.preview`,{source:u.data.sourcePresetId,entries:u.data.entries.length,profiles:u.data.userProfiles.length,speakers:u.data.presetSpeakers.length})})]}),/* @__PURE__ */ g(`p`,{className:`text-sm`,children:r(`transfer.merge`)}),/* @__PURE__ */ _(`div`,{className:`flex justify-end gap-2`,children:[/* @__PURE__ */ g(K,{variant:`ghost`,disabled:s,onClick:()=>d(void 0),children:r(`common.cancel`)}),/* @__PURE__ */ g(K,{disabled:s,onClick:v,children:r(`transfer.confirm`)})]})]})})]})}function $n(){let e=f(`livingmemory`),t=u(`livingmemory.settingsEntry`);return t.error?/* @__PURE__ */ g(En,{variant:`destructive`,children:t.error}):t.data?/* @__PURE__ */ g(er,{id:t.data.id,name:t.data.name},t.data.id):t.status===`ready`?/* @__PURE__ */ g(En,{children:e(`settings.noEntry`)}):/* @__PURE__ */ g(wn,{className:`h-32 w-full`})}function er({id:t,name:n}){let r=f(`livingmemory`),i=d(),a=u(`plugins.runtime`,{name:n,locale:i.active.startsWith(`zh`)?`zh`:`en`}),o=u(`plugins.document`,{id:t}),s=j(),[p,m]=e.useState();function h(){m(void 0),s.reset()}let v=l(`plugins.save`,{onSuccess:()=>{h(),c.success(r(`settings.saved`))}}),y=a.error||o.error||a.data?.error;if(y)return/* @__PURE__ */ g(En,{variant:`destructive`,children:y});if(!a.data||!o.data)return/* @__PURE__ */ g(wn,{className:`h-32 w-full`});if(!a.data.schema)return/* @__PURE__ */ g(En,{variant:`destructive`,children:r(`settings.noSchema`)});let b=p?.base??o.data;function x(e){m(A(e,b.values)?void 0:{base:b,values:e})}function S(){p&&s.attempt()&&v({id:t,config:p.values,revision:p.base.revision})}return/* @__PURE__ */ _(`section`,{className:`mx-auto w-full max-w-3xl space-y-4`,children:[/* @__PURE__ */ _(`div`,{className:`sticky top-0 z-10 flex flex-wrap items-center justify-between gap-2 bg-background py-2`,children:[/* @__PURE__ */ g(`p`,{className:`text-sm text-muted-foreground`,children:r(`settings.scope`)}),/* @__PURE__ */ _(`div`,{className:`flex gap-2`,children:[/* @__PURE__ */ g(K,{variant:`outline`,disabled:!p||v.pending,onClick:h,children:r(`settings.discard`)}),/* @__PURE__ */ g(K,{disabled:!p||v.pending||v.offline,onClick:S,children:r(`settings.save`)})]})]}),/* @__PURE__ */ g(`fieldset`,{disabled:v.pending,className:`min-w-0`,children:/* @__PURE__ */ g(k,{schema:a.data.schema,formId:`plugin:${t}`,initial:b.values,value:p?.values??b.values,credentials:b.credentials,validation:s,onChange:x})})]})}var tr=[{key:`start`,topics:[`models`,`rules`,`check`]},{key:`timing`,topics:[`overheard`,`interval`]},{key:`context`,topics:[`sharing`,`profiles`]},{key:`dream`,topics:[`dream.auto`,`dream.manual`,`dream.result`]}];function nr(e){let t=document.getElementById(`livingmemory-guide-${e}`);t&&(t.focus({preventScroll:!0}),t.scrollIntoView({block:`start`}))}function rr({onOpenSettings:e}){let t=f(`livingmemory`);return/* @__PURE__ */ g(`div`,{className:`@container w-full`,children:/* @__PURE__ */ _(`div`,{className:`mx-auto grid max-w-5xl gap-y-7 pb-12 pt-3 @3xl:grid-cols-[minmax(0,1fr)_11rem] @3xl:gap-x-12 @3xl:pt-6`,children:[/* @__PURE__ */ _(`header`,{className:`@3xl:col-start-1`,children:[/* @__PURE__ */ g(`h1`,{className:`text-3xl font-bold tracking-tight`,children:t(`tab.guide`)}),/* @__PURE__ */ g(`p`,{className:`mt-3 max-w-prose leading-7 text-muted-foreground`,children:t(`guide.intro`)})]}),/* @__PURE__ */ _(`nav`,{"aria-label":t(`guide.contents`),className:`border-l border-border pl-4 @3xl:sticky @3xl:top-5 @3xl:col-start-2 @3xl:row-span-2 @3xl:row-start-1 @3xl:self-start`,children:[/* @__PURE__ */ g(`p`,{className:`mb-2 text-sm font-semibold`,children:t(`guide.contents`)}),/* @__PURE__ */ g(`ul`,{className:`flex flex-wrap gap-x-4 gap-y-1 @3xl:flex-col`,children:tr.map(({key:e})=>/* @__PURE__ */ g(`li`,{children:/* @__PURE__ */ g(`button`,{type:`button`,onClick:()=>nr(e),className:`block py-1 text-left text-sm text-muted-foreground hover:text-foreground hover:underline`,children:t(`guide.${e}`)})},e))})]}),/* @__PURE__ */ g(`article`,{className:`min-w-0 space-y-9 @3xl:col-start-1`,children:tr.map(({key:n,topics:r})=>/* @__PURE__ */ _(`section`,{className:`border-t border-border pt-6`,children:[/* @__PURE__ */ g(`h2`,{id:`livingmemory-guide-${n}`,tabIndex:-1,className:`scroll-mt-5 text-xl font-semibold tracking-tight`,children:t(`guide.${n}`)}),n===`dream`&&/* @__PURE__ */ g(`p`,{className:`mt-3 leading-7`,children:t(`guide.dream.intro`)}),r.map((r,i)=>/* @__PURE__ */ _(`div`,{className:`mt-5`,children:[/* @__PURE__ */ _(`h3`,{className:`font-semibold`,children:[n===`start`&&/* @__PURE__ */ _(`span`,{className:`mr-2 text-muted-foreground`,children:[i+1,`.`]}),t(`guide.${r}.title`)]}),/* @__PURE__ */ g(`p`,{className:`mt-1.5 leading-7`,children:t(`guide.${r}.text`)}),r===`models`&&/* @__PURE__ */ g(K,{variant:`outline`,className:`mt-3`,onClick:e,children:t(`guide.openSettings`)})]},r)),n===`timing`&&/* @__PURE__ */ _(`aside`,{className:`mt-5 rounded-lg bg-muted px-5 py-4`,children:[/* @__PURE__ */ g(`h3`,{className:`font-semibold`,children:t(`guide.buffer.title`)}),/* @__PURE__ */ g(`p`,{className:`mt-1.5 leading-7`,children:t(`guide.buffer.text`)})]})]},n))})]})})}var ir=[`identity`,`preference`,`fact`,`plan`,`context`,`other`];[...ir];function ar({presetId:t,presets:n=[],entry:r,onSaved:i,onClose:s}){let l=f(`livingmemory`),[u,d]=e.useState(t),[p,m]=e.useState(r?.summary??``),[h,v]=e.useState(r?.content??``),[y,b]=e.useState(r?.type??`fact`),[x,S]=e.useState(r?.status??`active`),[C,w]=e.useState(r?.sentiment??``),[T,E]=e.useState(r?.importance?.toString()??``),[ee,D]=e.useState(r?.keywords.join(`
|
|
2
|
+
`)??``),[O,te]=e.useState(r?.speakerKeys??[]),[k,A]=e.useState(!1),j=u.trim(),ne=[...new Set(ee.split(`
|
|
3
|
+
`).map(e=>e.trim()).filter(Boolean))],M=T===``?null:Number(T),N=!r||!!r.summary,re=!r||!!r.sentiment,ie=!r||r.importance!==null,ae=!r||r.keywords.length>0,P=j!==``&&h.trim()!==``&&(!N||p.trim()!==``)&&(!re||C.trim()!==``)&&(!ae||ne.length>0)&&ne.length<=12&&(M===null?!ie:M>=0&&M<=1);async function F(e){if(e.preventDefault(),P&&!k){A(!0);try{let e={content:h.trim(),status:x,keywords:ne,speakerKeys:O,...p.trim()?{summary:p.trim()}:{},...C.trim()?{sentiment:C.trim()}:{},...M===null?{}:{importance:M}};r?await o(`livingmemory.update`,{id:r.id,...e,...y===r.type?{}:{type:y}}):await o(`livingmemory.create`,{presetId:j,type:y,...e}),c.success(l(r?`entries.saved`:`entries.created`)),i({presetId:j,status:x})}catch(e){c.error(a(e))}finally{A(!1)}}}return/* @__PURE__ */ g(nn,{open:!0,onOpenChange:e=>{!e&&!k&&s()},children:/* @__PURE__ */ _(on,{className:`max-h-[85dvh] overflow-y-auto sm:max-w-2xl`,children:[/* @__PURE__ */ g(sn,{children:/* @__PURE__ */ g(ln,{children:l(r?`entries.editTitle`:`entries.create`)})}),/* @__PURE__ */ _(`form`,{className:`flex flex-col gap-4`,onSubmit:F,noValidate:!0,children:[!r&&/* @__PURE__ */ _(J,{children:[/* @__PURE__ */ g(or,{required:!0,htmlFor:`memory-preset`,children:l(`field.preset`)}),/* @__PURE__ */ g(q,{id:`memory-preset`,list:`memory-preset-options`,value:u,required:!0,placeholder:l(`entries.choosePreset`),onChange:e=>{j!==e.target.value.trim()&&te([]),d(e.target.value)}}),/* @__PURE__ */ g(`datalist`,{id:`memory-preset-options`,children:n.map(e=>/* @__PURE__ */ g(`option`,{value:e},e))})]}),/* @__PURE__ */ _(J,{children:[/* @__PURE__ */ g(or,{required:N,htmlFor:`memory-summary`,children:l(`field.summary`)}),/* @__PURE__ */ g(dn,{id:`memory-summary`,rows:2,value:p,required:N,onChange:e=>m(e.target.value)})]}),/* @__PURE__ */ _(J,{children:[/* @__PURE__ */ g(or,{required:!0,htmlFor:`memory-content`,children:l(`field.content`)}),/* @__PURE__ */ g(dn,{id:`memory-content`,rows:5,value:h,required:!0,onChange:e=>v(e.target.value)})]}),/* @__PURE__ */ _(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[/* @__PURE__ */ _(J,{children:[/* @__PURE__ */ g(Un,{htmlFor:`memory-type`,children:l(`field.type`)}),/* @__PURE__ */ _(Wn,{value:y,onValueChange:e=>{e!==null&&b(e)},children:[/* @__PURE__ */ g(Kn,{id:`memory-type`,children:/* @__PURE__ */ g(Gn,{children:l(`type.${y}`)})}),/* @__PURE__ */ g(qn,{children:ir.map(e=>/* @__PURE__ */ g(Y,{value:e,children:l(`type.${e}`)},e))})]})]}),/* @__PURE__ */ _(J,{children:[/* @__PURE__ */ g(Un,{htmlFor:`memory-status`,children:l(`field.status`)}),/* @__PURE__ */ _(Wn,{value:x,onValueChange:e=>{e!==null&&S(e)},children:[/* @__PURE__ */ g(Kn,{id:`memory-status`,children:/* @__PURE__ */ g(Gn,{children:l(`status.${x}`)})}),/* @__PURE__ */ _(qn,{children:[/* @__PURE__ */ g(Y,{value:`active`,children:l(`status.active`)}),/* @__PURE__ */ g(Y,{value:`archived`,children:l(`status.archived`)})]})]})]}),/* @__PURE__ */ _(J,{children:[/* @__PURE__ */ g(or,{required:re,htmlFor:`memory-sentiment`,children:l(`field.sentiment`)}),/* @__PURE__ */ g(q,{id:`memory-sentiment`,value:C,required:re,onChange:e=>w(e.target.value)})]}),/* @__PURE__ */ _(J,{children:[/* @__PURE__ */ g(or,{required:ie,htmlFor:`memory-importance`,children:l(`field.importance`)}),/* @__PURE__ */ g(q,{id:`memory-importance`,type:`number`,min:0,max:1,step:.05,placeholder:`0–1`,value:T,required:ie,onChange:e=>E(e.target.value)})]})]}),/* @__PURE__ */ _(J,{children:[/* @__PURE__ */ g(or,{required:ae,htmlFor:`memory-keywords`,children:l(`field.keywords`,{max:12})}),/* @__PURE__ */ g(dn,{id:`memory-keywords`,rows:2,value:ee,required:ae,onChange:e=>D(e.target.value)})]}),(r||n.includes(j))&&/* @__PURE__ */ g(sr,{presetId:j,value:O,onChange:te},j),/* @__PURE__ */ _(`div`,{className:`flex justify-end gap-2`,children:[/* @__PURE__ */ g(K,{type:`button`,variant:`ghost`,disabled:k,onClick:s,children:l(`common.cancel`)}),/* @__PURE__ */ g(K,{type:`submit`,disabled:!P||k,children:l(r?`common.save`:`entries.create`)})]})]})]})})}function or({htmlFor:e,required:t,children:n}){return/* @__PURE__ */ _(Un,{htmlFor:e,children:[n,t&&/* @__PURE__ */ g(`span`,{"aria-hidden":`true`,className:`text-destructive`,children:`*`})]})}function sr({presetId:e,value:t,onChange:n}){let r=f(`livingmemory`),i=u(`livingmemory.speakers`,{presetId:e}),a=new Map(i.data?.map(e=>[e.speakerKey,e.speakerLabel]));for(let e of t)a.has(e)||a.set(e,e);return/* @__PURE__ */ _(J,{children:[/* @__PURE__ */ g(Un,{htmlFor:`memory-speakers`,children:r(`field.speakers`)}),/* @__PURE__ */ _(Wn,{multiple:!0,value:t,onValueChange:n,disabled:a.size===0,children:[/* @__PURE__ */ g(Kn,{id:`memory-speakers`,children:/* @__PURE__ */ g(Gn,{children:t.map(e=>a.get(e)).join(`, `)||r(`entries.noSpeakers`)})}),/* @__PURE__ */ g(qn,{children:Array.from(a,([e,t])=>/* @__PURE__ */ g(Y,{value:e,children:t},e))})]}),i.error&&/* @__PURE__ */ g(`p`,{role:`alert`,className:`text-sm text-destructive`,children:i.error})]})}function cr({target:t,onClose:n,onDeleted:r}){let i=f(`livingmemory`),[s,l]=e.useState(``),[u,d]=e.useState(!1),p=i(`deletion.phrase`,{preset:t.presetId}),m=!u&&(t.kind===`entries`||s===p);async function h(){if(m){d(!0);try{if(t.kind===`preset`)await o(`livingmemory.clearPreset`,{presetId:t.presetId}),c.success(i(`deletion.cleared`,{preset:t.presetId}));else{let e=await o(`livingmemory.deleteMemories`,{presetId:t.presetId,ids:t.ids});c.success(i(`deletion.deleted`,{count:e.deleted}))}r()}catch(e){c.error(a(e))}finally{d(!1)}}}return/* @__PURE__ */ g(nn,{open:!0,onOpenChange:e=>{!e&&!u&&n()},children:/* @__PURE__ */ _(on,{showCloseButton:!u,children:[/* @__PURE__ */ _(sn,{children:[/* @__PURE__ */ g(ln,{children:i(t.kind===`preset`?`deletion.clearPreset`:`deletion.confirmDelete`)}),/* @__PURE__ */ g(un,{children:t.kind===`preset`?i(`deletion.clearWarning`,{preset:t.presetId}):i(`deletion.entryWarning`,{preset:t.presetId,count:t.ids.length})})]}),t.kind===`entries`&&t.preview&&/* @__PURE__ */ g(`p`,{className:`line-clamp-3 whitespace-pre-wrap break-words text-sm`,children:t.preview}),t.kind===`preset`&&/* @__PURE__ */ _(J,{children:[/* @__PURE__ */ g(Un,{htmlFor:`clear-preset-confirmation`,children:i(`deletion.typePhrase`)}),/* @__PURE__ */ g(`p`,{id:`clear-preset-phrase`,className:`break-words text-sm font-medium`,children:p}),/* @__PURE__ */ g(q,{id:`clear-preset-confirmation`,"aria-describedby":`clear-preset-phrase`,autoComplete:`off`,disabled:u,value:s,onChange:e=>l(e.target.value)})]}),/* @__PURE__ */ _(cn,{children:[/* @__PURE__ */ g(K,{variant:`outline`,disabled:u,onClick:n,children:i(`common.cancel`)}),/* @__PURE__ */ g(K,{variant:`destructive`,disabled:!m,onClick:()=>void h(),children:i(t.kind===`preset`?`deletion.confirmClear`:`deletion.confirmDelete`)})]})]})})}var lr=`livingmemory`,X=20,Z=()=>f(lr),Q=e=>c.error(a(e)),ur=e=>`${e.getFullYear()}/${e.getMonth()+1}/${e.getDate()}`,dr=e=>[e.getHours(),e.getMinutes()].map(e=>String(e).padStart(2,`0`)).join(`:`),$=e=>{if(e==null)return`—`;let t=new Date(e);return`${ur(t)} ${dr(t)}`},fr=[`entries`,`profiles`,`personas`,`snapshots`,`jobs`,`search`,`settings`,`guide`];function pr(){let t=Z(),n=u(`livingmemory.status`),r=n.data?.presets??[],[i,a]=e.useState({presetId:void 0,status:`active`,revision:0}),[o,s]=e.useState(!1),[c,l]=e.useState(),[d,f]=e.useState(`entries`),p=e.useRef(null),m=e.useRef(d);e.useLayoutEffect(()=>{if(m.current===d||(m.current=d,window.matchMedia(`(prefers-reduced-motion: reduce)`).matches))return;let e=p.current?.animate([{opacity:0,transform:`translateY(4px)`},{opacity:1,transform:`none`}],{duration:160,easing:`ease-out`});return()=>e?.cancel()},[d]);let h=i.presetId??r[0];function v(e,t=`active`){a(n=>({presetId:e,status:t,revision:n.revision+1}))}function y(){if(d===`settings`)return null;if(d===`guide`)return/* @__PURE__ */ g(rr,{onOpenSettings:()=>f(`settings`)});if(h===void 0)return/* @__PURE__ */ _(`div`,{className:`flex flex-col items-center gap-3`,children:[/* @__PURE__ */ g(Sn,{title:t(`empty.noPreset`)}),d===`entries`&&/* @__PURE__ */ g(K,{onClick:()=>s(!0),children:t(`entries.create`)})]});switch(d){case`entries`:return/* @__PURE__ */ g(vr,{presetId:h,initialStatus:i.status,onCreate:()=>s(!0)},`${i.revision}:${h}`);case`profiles`:return/* @__PURE__ */ g(Tr,{presetId:h},h);case`personas`:return/* @__PURE__ */ g(Ir,{presetId:h},h);case`snapshots`:return/* @__PURE__ */ g(kr,{presetId:h});case`jobs`:return/* @__PURE__ */ g(Pr,{presetId:h});case`search`:return/* @__PURE__ */ g(Mr,{presetId:h})}}return/* @__PURE__ */ _(`div`,{className:`livingmemory-page flex h-full min-w-0 flex-col gap-4 overflow-y-auto p-4 sm:p-6`,children:[/* @__PURE__ */ _(`header`,{className:`flex flex-wrap items-center justify-between gap-x-4 gap-y-2 border-b border-border pb-2`,children:[/* @__PURE__ */ g(`nav`,{className:`flex max-w-full items-center gap-1 overflow-x-auto`,"aria-label":t(`tab.navigation`),children:fr.map(e=>/* @__PURE__ */ g(`button`,{type:`button`,"aria-current":d===e?`page`:void 0,className:`shrink-0 border-b-2 border-transparent px-2 py-2 text-sm text-muted-foreground hover:text-foreground focus-visible:outline-ring focus-visible:-outline-offset-2 aria-[current=page]:border-primary aria-[current=page]:font-medium aria-[current=page]:text-foreground`,onClick:()=>f(e),children:t(`tab.${e}`)},e))}),d!==`settings`&&d!==`guide`&&/* @__PURE__ */ _(`div`,{className:`flex flex-wrap items-center gap-2`,children:[/* @__PURE__ */ g(hr,{presets:r,value:h,onChange:v}),/* @__PURE__ */ g(Qn,{presetId:h,onClear:l})]})]}),o&&/* @__PURE__ */ g(ar,{presetId:h??``,presets:r,onClose:()=>s(!1),onSaved:({presetId:e,status:t})=>{v(e,t),s(!1),f(`entries`)}}),c!==void 0&&/* @__PURE__ */ g(cr,{target:{kind:`preset`,presetId:c},onClose:()=>l(void 0),onDeleted:()=>{l(void 0),v(),f(`entries`)}}),/* @__PURE__ */ g(gr,{warnings:n.data?.warnings??[]}),/* @__PURE__ */ g(mr,{active:n.data?.nativeMemoryActive===!0}),/* @__PURE__ */ _(`div`,{ref:p,className:`flex min-h-0 min-w-0 flex-1 flex-col`,children:[y(),/* @__PURE__ */ g(e.Activity,{mode:d===`settings`?`visible`:`hidden`,children:/* @__PURE__ */ g($n,{})})]})]})}function mr({active:t}){let n=Z(),[r,i]=e.useState(!1),[a,o]=te(`livingmemory.hideNativeMemoryNotice`,e=>e===!0);return!t||r||a?null:/* @__PURE__ */ g(nn,{open:!0,onOpenChange:e=>{e||i(!0)},children:/* @__PURE__ */ _(on,{showCloseButton:!1,className:`flex flex-col gap-0 p-0 sm:max-w-[31rem]`,children:[/* @__PURE__ */ _(`div`,{className:`px-5 pt-6 pb-5 sm:px-7 sm:pt-7 sm:pb-6`,children:[/* @__PURE__ */ g(ln,{className:`mb-3 text-xl leading-snug font-semibold text-balance`,children:n(`nativeMemory.title`)}),/* @__PURE__ */ _(un,{className:`text-sm leading-6 text-balance text-popover-foreground`,children:[n(`nativeMemory.description`),/* @__PURE__ */ g(`span`,{className:`mt-1 block text-muted-foreground`,children:n(`nativeMemory.risk`)})]})]}),/* @__PURE__ */ _(`div`,{className:`flex flex-col gap-2 border-t border-border bg-muted/30 px-5 py-4 sm:flex-row sm:items-center sm:justify-between sm:px-7`,children:[/* @__PURE__ */ g(K,{size:`lg`,variant:`ghost`,onClick:()=>i(!0),children:n(`nativeMemory.close`)}),/* @__PURE__ */ g(K,{size:`lg`,className:`bg-neutral-800 text-white hover:bg-neutral-700 active:bg-neutral-600 dark:bg-neutral-200 dark:text-neutral-900 dark:hover:bg-neutral-300 dark:active:bg-neutral-400`,onClick:()=>o(!0),children:n(`nativeMemory.neverShow`)})]})]})})}function hr({presets:e,value:t,onChange:n}){let r=Z();return/* @__PURE__ */ _(Wn,{value:t??null,onValueChange:e=>{e!==null&&n(e)},children:[/* @__PURE__ */ g(Kn,{className:`w-40`,"aria-label":r(`field.preset`),children:/* @__PURE__ */ g(Gn,{placeholder:r(`preset.placeholder`),children:t})}),/* @__PURE__ */ g(qn,{children:e.map(e=>/* @__PURE__ */ g(Y,{value:e,children:e},e))})]})}function gr({warnings:e}){return e.length===0?null:/* @__PURE__ */ g(`ul`,{className:`flex flex-col gap-1 rounded-md border border-amber-500/40 bg-amber-500/10 p-3 text-sm`,children:e.map(e=>/* @__PURE__ */ g(`li`,{children:e.message},e.code))})}function _r(e){let t=u(`livingmemory.speakers`,{presetId:e});return new Map(t.data?.map(e=>[e.speakerKey,e.speakerLabel]))}function vr({presetId:t,initialStatus:n,onCreate:r}){let i=Z(),[a,s]=e.useState(n),[c,l]=e.useState(`all`),[u,d]=e.useState(``),f={presetId:t,status:a};c!==`all`&&(f.type=c),u.trim()&&(f.keyword=u.trim());let p=_r(t);return/* @__PURE__ */ _(`div`,{className:`flex min-h-0 flex-1 flex-col gap-3`,children:[/* @__PURE__ */ _(`div`,{className:`flex flex-wrap items-center gap-2`,children:[/* @__PURE__ */ g(q,{className:`h-[30px] w-full sm:w-64`,value:u,placeholder:i(`entries.search`),onChange:e=>d(e.target.value)}),/* @__PURE__ */ _(Wn,{value:a,onValueChange:e=>s(e),children:[/* @__PURE__ */ g(Kn,{className:`w-28`,children:/* @__PURE__ */ g(Gn,{children:i(`status.${a}`)})}),/* @__PURE__ */ _(qn,{children:[/* @__PURE__ */ g(Y,{value:`active`,children:i(`status.active`)}),/* @__PURE__ */ g(Y,{value:`archived`,children:i(`status.archived`)}),/* @__PURE__ */ g(Y,{value:`all`,children:i(`status.all`)})]})]}),/* @__PURE__ */ _(Wn,{value:c,onValueChange:e=>l(e),children:[/* @__PURE__ */ g(Kn,{className:`w-28`,children:/* @__PURE__ */ g(Gn,{children:i(`type.${c}`)})}),/* @__PURE__ */ _(qn,{children:[/* @__PURE__ */ g(Y,{value:`all`,children:i(`type.all`)}),ir.map(e=>/* @__PURE__ */ g(Y,{value:e,children:i(`type.${e}`)},e))]})]}),/* @__PURE__ */ _(`div`,{className:`ml-auto flex flex-wrap items-center gap-2`,children:[/* @__PURE__ */ g(K,{variant:`outline`,onClick:()=>void o(`livingmemory.rebuildIndex`,{presetId:t}).catch(Q),children:i(`jobs.rebuildIndex`)}),/* @__PURE__ */ g(Nr,{presetId:t}),/* @__PURE__ */ g(K,{onClick:r,children:i(`entries.create`)})]})]}),/* @__PURE__ */ g(yr,{filter:f,names:p},JSON.stringify(f))]})}function yr({filter:t,names:n}){let r=Z(),{presetId:i}=t,[a,s]=e.useState(1),[l,d]=e.useState(),[f,p]=e.useState(()=>/* @__PURE__ */ new Map),[m,v]=e.useState(!1),[y,b]=e.useState(),x=u(`livingmemory.entries`,{...t,page:a,pageSize:X}),S=x.data?.entries??[],C=x.data?.total??0,w=S.filter(e=>f.has(e.id)).length,T=S.length>0&&w===S.length,E=C>X,ee=e.useId(),D=[...f].filter(([,e])=>e===`active`).map(([e])=>e);e.useEffect(()=>{if(!x.data)return;let{entries:e,total:t}=x.data;s(e=>Math.min(e,Math.max(1,Math.ceil(t/X))));let n=new Map(e.map(e=>[e.id,e.status]));p(r=>{let i=new Map(r);for(let[a,o]of r)(e.length===t||n.has(a))&&n.get(a)!==o&&i.delete(a);return i.size===r.size?r:i})},[x.data]);function O(e,t){p(n=>{let r=new Map(n);for(let{id:n,status:i}of e)t?r.set(n,i):r.delete(n);return r})}async function te(){v(!0);try{let e=await o(`livingmemory.listMemorySelection`,t);p(new Map(e.map(e=>[e.id,e.status])))}catch(e){Q(e)}finally{v(!1)}}function k(e){p(t=>{let n=new Map(t);for(let t of e)n.delete(t);return n})}async function A(e){v(!0);try{let{archived:t}=await o(`livingmemory.archiveMemories`,{presetId:i,ids:e});k(e),c.success(r(`entries.archivedCount`,{count:t}))}catch(e){Q(e)}finally{v(!1)}}return/* @__PURE__ */ _(`div`,{className:`@container flex min-h-0 flex-1 flex-col gap-3`,children:[/* @__PURE__ */ _(`div`,{className:`flex min-h-8 flex-wrap items-center gap-x-3 gap-y-1 px-3 text-sm`,children:[/* @__PURE__ */ _(`div`,{className:`flex items-center gap-2`,children:[/* @__PURE__ */ g(Mn,{id:ee,disabled:m||!S.length,checked:T,indeterminate:w>0&&!T,className:`data-indeterminate:border-primary data-indeterminate:before:h-0.5 data-indeterminate:before:w-2 data-indeterminate:before:bg-primary data-indeterminate:[&>span]:hidden`,onCheckedChange:e=>O(S,e)}),/* @__PURE__ */ g(`label`,{htmlFor:ee,children:r(E?`deletion.selectPage`:`deletion.selectAll`)})]}),T&&E&&f.size<C&&/* @__PURE__ */ g(K,{size:`sm`,variant:`link`,disabled:m,onClick:()=>void te(),children:r(`deletion.selectMatches`,{count:C})}),f.size>0&&/* @__PURE__ */ _(h,{children:[/* @__PURE__ */ g(`span`,{className:`text-muted-foreground`,children:r(`deletion.selected`,{count:f.size})}),E&&/* @__PURE__ */ g(K,{size:`sm`,variant:`ghost`,disabled:m,onClick:()=>p(/* @__PURE__ */ new Map),children:r(`deletion.deselect`)}),D.length>0?/* @__PURE__ */ g(K,{size:`sm`,variant:`outline`,disabled:m,onClick:()=>void A(D),children:r(`entries.archiveCount`,{count:D.length})}):/* @__PURE__ */ g(K,{size:`sm`,variant:`outline`,disabled:m,onClick:()=>b({kind:`entries`,presetId:i,ids:[...f.keys()]}),children:r(`entries.purge`)})]}),/* @__PURE__ */ g(`span`,{className:`ml-auto text-sm opacity-70`,children:r(`entries.total`,{count:C})})]}),S.length===0?/* @__PURE__ */ g(Sn,{title:r(`entries.empty`)}):/* @__PURE__ */ g(`ul`,{className:`grid min-h-0 flex-1 grid-cols-1 content-start gap-3 overflow-y-auto @min-[38rem]:grid-cols-2 @min-[57rem]:grid-cols-3 @min-[76rem]:grid-cols-4`,children:S.map(e=>/* @__PURE__ */ g(br,{entry:e,names:n,selected:f.has(e.id),selecting:m,onSelect:t=>O([e],t),onEdit:()=>d(e),onArchive:()=>void A([e.id]),onDelete:()=>b({kind:`entries`,presetId:i,ids:[e.id],preview:e.summary||e.content})},e.id))}),/* @__PURE__ */ g(Rr,{page:a,pageSize:X,total:x.data?.total??0,onChange:s}),l!==void 0&&/* @__PURE__ */ g(ar,{presetId:i,entry:l,onSaved:({status:e})=>{l.status!==e&&k([l.id]),d(void 0)},onClose:()=>d(void 0)}),y&&/* @__PURE__ */ g(cr,{target:y,onClose:()=>b(void 0),onDeleted:()=>{k(y.ids),b(void 0)}})]})}function br({entry:e,names:t,selected:n,selecting:r,onSelect:i,onEdit:a,onArchive:o,onDelete:s}){let c=Z();return/* @__PURE__ */ _(`li`,{"data-selected":n,className:`row-span-4 grid min-w-0 grid-rows-subgrid gap-y-0 rounded-xl border border-border bg-card text-card-foreground data-[selected=true]:border-primary`,children:[/* @__PURE__ */ _(`div`,{className:`flex flex-wrap items-center gap-2 px-3 pt-3 pb-2.5 text-xs text-muted-foreground`,children:[/* @__PURE__ */ g(Mn,{"aria-label":c(`deletion.selectEntry`,{label:e.summary||e.content}),disabled:r,checked:n,onCheckedChange:i}),/* @__PURE__ */ g(jn,{variant:`secondary`,children:c(`type.${e.type}`)}),/* @__PURE__ */ g(`span`,{children:c(`status.${e.status}`)}),/* @__PURE__ */ _(`span`,{className:`ml-auto`,children:[c(`field.createdAt`),` `,$(e.createdAt)]})]}),e.summary&&/* @__PURE__ */ g(`h2`,{className:`px-3 pb-1.5 text-base font-semibold leading-snug [overflow-wrap:anywhere]`,children:e.summary}),/* @__PURE__ */ _(`div`,{className:`row-start-3 flex flex-col gap-2.5 px-3 pb-3`,children:[/* @__PURE__ */ g(Sr,{content:e.content}),/* @__PURE__ */ g(xr,{entry:e,names:t})]}),/* @__PURE__ */ _(`footer`,{className:`row-start-4 flex flex-wrap items-center justify-between gap-2 rounded-b-xl border-t border-border bg-muted/30 px-3 py-1.5`,children:[/* @__PURE__ */ _(`span`,{className:`text-xs text-muted-foreground`,children:[c(`field.updatedAt`),` `,$(e.updatedAt)]}),/* @__PURE__ */ _(`div`,{className:`flex flex-wrap gap-1`,children:[/* @__PURE__ */ g(K,{size:`sm`,variant:`outline`,onClick:a,children:c(`entries.edit`)}),e.status===`active`?/* @__PURE__ */ g(K,{size:`sm`,variant:`outline`,disabled:r,onClick:o,children:c(`entries.archive`)}):/* @__PURE__ */ g(K,{size:`sm`,variant:`outline`,disabled:r,onClick:s,children:c(`entries.purge`)})]})]})]})}function xr({entry:e,names:t}){let n=Z(),r=e.speakerKeys.map(e=>t.get(e)??e).join(`, `);return/* @__PURE__ */ _(h,{children:[e.keywords.length>0&&/* @__PURE__ */ g(`ul`,{className:`flex flex-wrap gap-x-3 gap-y-1 text-xs text-muted-foreground`,children:e.keywords.map(e=>/* @__PURE__ */ _(`li`,{className:`min-w-0 [overflow-wrap:anywhere]`,children:[`#`,e]},e))}),/* @__PURE__ */ _(`div`,{className:`border-t border-border pt-2 text-xs leading-relaxed [overflow-wrap:anywhere]`,children:[/* @__PURE__ */ _(`dl`,{className:`grid grid-cols-[auto_1fr] items-baseline gap-x-3 gap-y-0.5`,children:[/* @__PURE__ */ g(`dt`,{className:`text-muted-foreground`,children:n(`field.importance`)}),/* @__PURE__ */ g(`dd`,{children:e.importance??`—`}),e.sentiment&&/* @__PURE__ */ _(h,{children:[/* @__PURE__ */ g(`dt`,{className:`text-muted-foreground`,children:n(`field.sentiment`)}),/* @__PURE__ */ g(`dd`,{children:e.sentiment})]}),/* @__PURE__ */ g(`dt`,{className:`text-muted-foreground`,children:n(`field.speakers`)}),/* @__PURE__ */ g(`dd`,{children:r||n(`entries.noSpeakers`)})]}),/* @__PURE__ */ g(`p`,{className:`mt-0.5`,children:e.sourceLabel})]})]})}function Sr({content:t}){let n=e.useRef(null),r=e.useRef(null),[i,a]=e.useState(!1);function o(e){let t=r.current;if(!(!t||t.scrollHeight<=t.clientHeight||e.altKey||e.ctrlKey||e.metaKey)){switch(e.key){case`ArrowDown`:t.scrollTop+=24;break;case`ArrowUp`:t.scrollTop-=24;break;case`PageDown`:t.scrollTop+=t.clientHeight;break;case`PageUp`:t.scrollTop-=t.clientHeight;break;case`Home`:t.scrollTop=0;break;case`End`:t.scrollTop=t.scrollHeight;break;default:return}e.preventDefault()}}return e.useLayoutEffect(()=>{let e=n.current,t=()=>a(e.offsetHeight>e.parentElement.clientHeight);t();let r=new ResizeObserver(t);return r.observe(e),()=>r.disconnect()},[t]),/* @__PURE__ */ g(`div`,{className:`grow text-sm leading-6 text-card-foreground/85`,children:/* @__PURE__ */ _(yn,{children:[/* @__PURE__ */ _(bn,{render:/* @__PURE__ */ g(`div`,{}),disabled:!i,tabIndex:i?0:-1,onKeyDown:o,children:[/* @__PURE__ */ g(`div`,{className:`max-h-[3lh] overflow-hidden`,children:/* @__PURE__ */ g(`p`,{ref:n,className:`whitespace-pre-wrap [overflow-wrap:anywhere]`,children:t})}),i&&/* @__PURE__ */ g(`span`,{"aria-hidden":`true`,className:`block text-muted-foreground`,children:`…`})]}),i&&/* @__PURE__ */ g(xn,{ref:r,side:`bottom`,align:`start`,className:`block max-h-[min(55vh,var(--available-height))] max-w-[min(32rem,var(--available-width))] overflow-y-auto whitespace-pre-wrap px-3 py-2 text-sm leading-6 [overflow-wrap:anywhere]`,children:t})]})})}var Cr=({speakerLabel:e,speakerId:t})=>t?`${e}(${t})`:e;function wr({profile:e,selfId:t}){let{platform:n,speakerId:r}=e,{data:i}=m({queryKey:[`directory`,`entity`,`user`,n,t,r],queryFn:n&&t&&r?({signal:e})=>ne({kind:`user`,platform:n,selfId:t,id:r},e):p,staleTime:6e4});return/* @__PURE__ */ _(Dn,{"aria-hidden":`true`,style:{width:32,height:32,overflow:`hidden`},children:[i?.avatar&&/* @__PURE__ */ g(On,{src:i.avatar,alt:``,referrerPolicy:`no-referrer`}),/* @__PURE__ */ g(kn,{children:Array.from(e.speakerLabel)[0]})]})}function Tr({presetId:t}){let n=Z(),[r,i]=e.useState(1),[a,s]=e.useState(``),[c,l]=e.useState(),[d,f]=e.useState(),p=u(`adapters.bots`).data?.bots,{data:m,error:h}=u(`livingmemory.profiles`,{presetId:t,keyword:a,page:r,pageSize:X}),v=m?.profiles.find(e=>e.id===c)??m?.profiles[0];e.useEffect(()=>{m&&r>1&&!m.profiles.length&&i(Math.max(1,Math.ceil(m.total/X)))},[m,r]);function y(e){let t=p?.find(t=>t.platform===e.platform)?.selfId;return/* @__PURE__ */ g(wr,{profile:e,selfId:t})}return/* @__PURE__ */ _(`div`,{className:`@container min-h-0 flex-1`,children:[/* @__PURE__ */ _(`div`,{className:`grid gap-5 @2xl:h-full @2xl:grid-cols-[minmax(0,1fr)_15rem] @2xl:gap-6`,children:[/* @__PURE__ */ _(`nav`,{"aria-label":n(`profiles.directory`),className:`flex min-h-0 min-w-0 flex-col gap-2 border-b border-border pb-4 @2xl:col-start-2 @2xl:row-start-1 @2xl:border-b-0 @2xl:border-l @2xl:pb-0 @2xl:pl-4`,children:[/* @__PURE__ */ g(`h2`,{className:`text-sm font-semibold`,children:n(`profiles.directory`)}),/* @__PURE__ */ g(Cn,{value:a,onChange:e=>{s(e),i(1)},placeholder:n(`profiles.search`),clearLabel:n(`profiles.clearSearch`),className:`sm:w-full`}),/* @__PURE__ */ _(`div`,{className:`relative isolate max-h-44 overflow-y-auto @2xl:max-h-none`,children:[/* @__PURE__ */ g(vn,{hover:`[data-profile-row]`,className:`rounded-lg bg-sidebar-accent/60 duration-150`}),/* @__PURE__ */ g(vn,{attribute:`aria-current`,className:`rounded-lg bg-sidebar-accent`}),/* @__PURE__ */ g(`ul`,{className:`space-y-0.5`,children:m?.profiles.map(e=>/* @__PURE__ */ g(`li`,{children:/* @__PURE__ */ _(`button`,{type:`button`,"data-profile-row":!0,"aria-current":e.id===v?.id?`true`:void 0,onClick:()=>l(e.id),className:`flex w-full items-center gap-3 rounded-lg px-2 py-2 text-left transition-colors hover:text-sidebar-accent-foreground aria-current:text-sidebar-accent-foreground focus-visible:-outline-offset-2`,children:[y(e),/* @__PURE__ */ _(`span`,{className:`min-w-0`,children:[/* @__PURE__ */ g(`span`,{className:`block text-sm font-medium [overflow-wrap:anywhere]`,children:Cr(e)}),/* @__PURE__ */ g(`span`,{className:`block text-xs text-muted-foreground`,children:n(`profiles.sourceCount`,{count:e.sourceMemoryCount})})]})]})},e.id))})]}),/* @__PURE__ */ g(Rr,{page:r,pageSize:X,total:m?.total??0,onChange:i})]}),/* @__PURE__ */ _(`div`,{className:`min-w-0 overflow-y-auto @2xl:col-start-1 @2xl:row-start-1`,children:[h&&/* @__PURE__ */ g(En,{variant:`destructive`,children:h}),!h&&!m&&/* @__PURE__ */ g(wn,{className:`h-32 w-full`}),!h&&m&&!v&&/* @__PURE__ */ g(Sn,{title:n(a.trim()?`profiles.noMatch`:`profiles.empty`)}),v&&/* @__PURE__ */ _(`article`,{className:`livingmemory-profile space-y-4 pb-8`,children:[/* @__PURE__ */ _(`header`,{className:`flex flex-wrap items-center justify-between gap-4 px-1 pb-1`,children:[/* @__PURE__ */ _(`div`,{className:`flex min-w-0 items-center gap-4`,children:[y(v),/* @__PURE__ */ _(`div`,{className:`min-w-0`,children:[/* @__PURE__ */ g(`h1`,{className:`text-2xl font-semibold tracking-tight [overflow-wrap:anywhere]`,children:Cr(v)}),/* @__PURE__ */ _(`p`,{className:`mt-1 text-xs tabular-nums text-muted-foreground`,children:[n(`field.updatedAt`),` · `,$(v.updatedAt)]})]})]}),/* @__PURE__ */ _(`div`,{className:`flex flex-wrap gap-2`,children:[/* @__PURE__ */ g(K,{size:`sm`,variant:`outline`,onClick:()=>f(v),children:n(`common.edit`)}),/* @__PURE__ */ g(K,{size:`sm`,variant:`outline`,onClick:()=>void o(`livingmemory.regenerateProfile`,{presetId:t,speakerKey:v.speakerKey}).catch(Q),children:n(`profiles.regenerate`)}),/* @__PURE__ */ g(K,{size:`sm`,variant:`outline`,onClick:()=>void o(`livingmemory.deleteProfile`,{id:v.id}).catch(Q),children:n(`profiles.delete`)})]})]}),/* @__PURE__ */ _(`section`,{className:`livingmemory-profile-group livingmemory-profile-reading`,children:[/* @__PURE__ */ g(`h2`,{className:`mb-3 text-sm font-semibold text-muted-foreground`,children:n(`tab.profiles`)}),/* @__PURE__ */ g(`p`,{className:`whitespace-pre-wrap text-base leading-8 [overflow-wrap:anywhere]`,children:v.content})]}),/* @__PURE__ */ g(Er,{presetId:t,profile:v})]})]},v?.id)]}),d&&/* @__PURE__ */ g(Or,{profile:d,onClose:()=>f(void 0)})]})}function Er({presetId:e,profile:t}){let n=Z(),r=t.sourceMemoryCount;return r?/* @__PURE__ */ _(Nn,{className:`livingmemory-profile-group`,children:[/* @__PURE__ */ _(Pn,{className:`livingmemory-profile-trigger flex w-full items-center gap-3 text-left text-sm font-semibold hover:bg-muted/50 focus-visible:-outline-offset-2`,children:[/* @__PURE__ */ g(`svg`,{"aria-hidden":`true`,className:`size-5 shrink-0 text-muted-foreground`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.6`,strokeLinejoin:`round`,children:/* @__PURE__ */ g(`path`,{d:`M3 5.5c3.5-1 6-.7 9 1.2 3-1.9 5.5-2.2 9-1.2V19c-3.5-1-6-.7-9 1.2-3-1.9-5.5-2.2-9-1.2zM12 6.7v13.5`})}),n(`profiles.linkedMemories`),/* @__PURE__ */ g(`span`,{className:`ml-auto text-sm font-normal tabular-nums text-muted-foreground`,children:r}),/* @__PURE__ */ g(`span`,{"aria-hidden":`true`,className:`livingmemory-profile-chevron`})]}),/* @__PURE__ */ g(Fn,{className:`livingmemory-profile-sources`,children:/* @__PURE__ */ g(Dr,{presetId:e,profileId:t.id,count:r})})]}):/* @__PURE__ */ g(`p`,{className:`livingmemory-profile-group px-5 py-4 text-sm text-muted-foreground`,children:n(`profiles.noMemories`)})}function Dr({presetId:e,profileId:t,count:n}){let r=Z(),{data:i,error:a}=u(`livingmemory.profileMemories`,{presetId:e,profileId:t}),o=_r(e);return a?/* @__PURE__ */ g(En,{variant:`destructive`,children:a}):i?/* @__PURE__ */ _(`div`,{className:`livingmemory-profile-list`,children:[/* @__PURE__ */ g(`ol`,{className:`divide-y divide-border/50`,children:i.map((e,t)=>/* @__PURE__ */ _(`li`,{className:`flex gap-4 py-4`,children:[/* @__PURE__ */ g(`span`,{"aria-hidden":`true`,className:`pt-0.5 text-xs tabular-nums text-muted-foreground`,children:String(t+1).padStart(2,`0`)}),/* @__PURE__ */ _(`div`,{className:`min-w-0 flex-1`,children:[/* @__PURE__ */ g(jn,{variant:`secondary`,children:r(`type.${e.type}`)}),/* @__PURE__ */ g(`span`,{className:`ml-2 text-xs text-muted-foreground`,children:r(`status.${e.status}`)}),e.summary&&/* @__PURE__ */ g(`h3`,{className:`mt-2 font-semibold [overflow-wrap:anywhere]`,children:e.summary}),/* @__PURE__ */ g(`p`,{className:`mt-2 whitespace-pre-wrap text-sm leading-6 [overflow-wrap:anywhere]`,children:e.content}),/* @__PURE__ */ _(`div`,{className:`mt-3 space-y-2`,children:[/* @__PURE__ */ g(xr,{entry:e,names:o}),/* @__PURE__ */ _(`p`,{className:`flex flex-wrap gap-x-4 text-xs text-muted-foreground`,children:[/* @__PURE__ */ _(`span`,{children:[r(`field.createdAt`),` `,$(e.createdAt)]}),/* @__PURE__ */ _(`span`,{children:[r(`field.updatedAt`),` `,$(e.updatedAt)]})]})]})]})]},e.id))}),n>i.length&&/* @__PURE__ */ g(`p`,{className:`py-3 text-sm text-muted-foreground`,children:r(`profiles.unavailableMemories`,{count:n-i.length})})]}):/* @__PURE__ */ g(wn,{className:`mx-5 mb-4 h-16`})}function Or({profile:t,onClose:n}){let r=Z(),[i,a]=e.useState(t.content);return/* @__PURE__ */ g(nn,{open:!0,onOpenChange:e=>e?void 0:n(),children:/* @__PURE__ */ _(on,{className:`max-h-[85dvh] overflow-y-auto sm:max-w-2xl`,children:[/* @__PURE__ */ _(sn,{children:[/* @__PURE__ */ g(ln,{children:Cr(t)}),/* @__PURE__ */ g(un,{children:r(`profiles.hint`)})]}),/* @__PURE__ */ g(dn,{rows:16,value:i,onChange:e=>a(e.target.value)}),/* @__PURE__ */ _(`div`,{className:`flex justify-end gap-2`,children:[/* @__PURE__ */ g(K,{variant:`ghost`,onClick:n,children:r(`common.cancel`)}),/* @__PURE__ */ g(K,{onClick:()=>void o(`livingmemory.updateProfile`,{id:t.id,content:i}).then(n).catch(Q),children:r(`common.save`)})]})]})})}function kr({presetId:t}){let n=Z(),[r,i]=e.useState(1),a=u(`livingmemory.snapshots`,{presetId:t,page:r,pageSize:X}),o=a.data?.snapshots??[];return e.useEffect(()=>i(1),[t]),o.length===0?/* @__PURE__ */ g(Sn,{title:n(`snapshots.empty`)}):/* @__PURE__ */ _(`div`,{className:`flex min-h-0 flex-1 flex-col gap-2`,children:[/* @__PURE__ */ g(`ul`,{className:`flex min-h-0 flex-1 flex-col gap-2 overflow-y-auto`,children:o.map(e=>/* @__PURE__ */ g(Ar,{snapshot:e},e.id))}),/* @__PURE__ */ g(Rr,{page:r,pageSize:X,total:a.data?.total??0,onChange:i})]})}function Ar({snapshot:e}){let t=Z(),n=e.conversationId===null?t(`snapshots.presetShared`):e.conversationLabel??t(`snapshots.conversation`,{id:e.conversationId});function r(){o(`livingmemory.deleteSnapshot`,{id:e.id}).catch(Q)}return/* @__PURE__ */ _(`li`,{className:`flex flex-col gap-2 rounded-md border border-border p-3 text-sm`,children:[/* @__PURE__ */ _(`div`,{className:`flex flex-wrap items-center gap-2`,children:[/* @__PURE__ */ g(`span`,{className:`min-w-0 break-words font-medium`,children:n}),/* @__PURE__ */ g(`span`,{className:`ml-auto text-xs text-muted-foreground`,children:$(e.createdAt)}),/* @__PURE__ */ g(K,{size:`sm`,variant:`ghost`,onClick:r,children:t(`common.delete`)})]}),/* @__PURE__ */ g(`p`,{className:`whitespace-pre-wrap break-words`,children:e.content||t(`snapshots.noContent`)}),/* @__PURE__ */ _(`details`,{className:`border-t border-border pt-2`,children:[/* @__PURE__ */ g(`summary`,{className:`cursor-pointer text-xs text-muted-foreground`,children:t(`snapshots.details`)}),/* @__PURE__ */ _(`div`,{className:`mt-3 flex flex-col gap-3`,children:[/* @__PURE__ */ _(`section`,{children:[/* @__PURE__ */ g(`h4`,{className:`font-medium`,children:t(`snapshots.searchTexts`)}),/* @__PURE__ */ g(jr,{searchTexts:e.searchTexts,searchKeywords:e.searchKeywords})]}),/* @__PURE__ */ _(`section`,{children:[/* @__PURE__ */ g(`h4`,{className:`font-medium`,children:t(`snapshots.matches`,{count:e.matchedMemories.length})}),/* @__PURE__ */ g(`ol`,{className:`list-decimal space-y-1 pl-5`,children:e.matchedMemories.map((e,n)=>/* @__PURE__ */ _(`li`,{className:`whitespace-pre-wrap break-words`,children:[/* @__PURE__ */ g(jn,{variant:`outline`,className:`mr-2`,children:t(`type.${e.type}`)}),e.content]},n))})]})]})]})]})}function jr({searchTexts:e,searchKeywords:t}){let n=Z();return e.length===0&&t.length===0?/* @__PURE__ */ g(`p`,{children:n(`snapshots.noSearch`)}):/* @__PURE__ */ _(h,{children:[/* @__PURE__ */ g(`ul`,{className:`list-disc space-y-1 pl-5`,children:e.map(e=>/* @__PURE__ */ g(`li`,{className:`break-words`,children:e},e))}),t.length>0&&/* @__PURE__ */ g(`div`,{className:`mt-1 flex flex-wrap gap-1`,children:t.map(e=>/* @__PURE__ */ g(jn,{variant:`outline`,children:e},e))})]})}function Mr({presetId:t}){let n=Z(),[r,i]=e.useState(``),[a,s]=e.useState(``),[c,l]=e.useState(`all`),[u,d]=e.useState(),[f,p]=e.useState(!1),m=()=>{p(!0);let e=a.split(`,`).map(e=>e.trim()).filter(e=>e.length>0);o(`livingmemory.search`,{presetId:t,searchTexts:[r],...e.length===0?{}:{searchKeywords:e},...c===`all`?{}:{memoryTypes:[c]}}).then(e=>d(e.hits)).catch(Q).finally(()=>p(!1))};return/* @__PURE__ */ _(`div`,{className:`flex min-h-0 flex-1 flex-col gap-3`,children:[/* @__PURE__ */ _(`div`,{className:`flex flex-wrap items-center gap-2`,children:[/* @__PURE__ */ g(q,{className:`w-64`,value:r,placeholder:n(`search.text`),onChange:e=>i(e.target.value),onKeyDown:e=>{e.key===`Enter`&&m()}}),/* @__PURE__ */ g(q,{className:`w-48`,value:a,placeholder:n(`search.keywords`),onChange:e=>s(e.target.value)}),/* @__PURE__ */ _(Wn,{value:c,onValueChange:e=>l(e),children:[/* @__PURE__ */ g(Kn,{className:`w-32`,children:/* @__PURE__ */ g(Gn,{})}),/* @__PURE__ */ _(qn,{children:[/* @__PURE__ */ g(Y,{value:`all`,children:n(`type.all`)}),ir.map(e=>/* @__PURE__ */ g(Y,{value:e,children:n(`type.${e}`)},e))]})]}),/* @__PURE__ */ g(K,{disabled:f||r.trim().length===0,onClick:m,children:n(`search.run`)})]}),u?.length===0&&/* @__PURE__ */ g(Sn,{title:n(`search.empty`)}),u&&u.length>0&&/* @__PURE__ */ g(`ul`,{className:`flex min-h-0 flex-1 flex-col gap-2 overflow-y-auto`,children:u.map((e,t)=>/* @__PURE__ */ _(`li`,{className:`flex flex-col gap-1 rounded-md border border-border p-3 text-sm`,children:[/* @__PURE__ */ _(`div`,{className:`flex items-center gap-2`,children:[/* @__PURE__ */ _(`span`,{className:`text-xs opacity-60`,children:[`#`,t+1]}),/* @__PURE__ */ g(jn,{variant:`outline`,children:n(`type.${e.type}`)}),/* @__PURE__ */ g(`span`,{className:`ml-auto text-xs opacity-60`,children:n(`search.scores`,{cosine:e.cosineScore.toFixed(4),keyword:e.keywordMatchCount,boosted:e.boostedScore.toFixed(4)})})]}),/* @__PURE__ */ g(`p`,{className:`whitespace-pre-wrap break-words opacity-80`,children:e.summary??e.content})]},e.id))})]})}function Nr({presetId:t}){let n=Z(),[r,i]=e.useState(!1);async function a(){i(!0);try{let e=await o(`livingmemory.dream`,{presetId:t});e.started?c.success(n(`jobs.dreamStarted`,{preset:t})):e.reason===`preset-locked`?c.info(n(`jobs.dreamRunning`,{preset:t})):e.reason===`insufficient-memories`&&c.info(n(`jobs.dreamInsufficient`,{preset:t}))}catch(e){Q(e)}finally{i(!1)}}return/* @__PURE__ */ g(K,{variant:`outline`,disabled:r,onClick:a,children:n(`jobs.dream`)})}function Pr({presetId:e}){let t=Z(),{data:n,error:r}=u(`livingmemory.jobs`,{presetId:e});if(r)return/* @__PURE__ */ g(En,{variant:`destructive`,children:r});if(!n)return/* @__PURE__ */ g(wn,{className:`h-12 w-full`});if(!n.length)return/* @__PURE__ */ g(Sn,{title:t(`jobs.empty`)});let i=Map.groupBy(n,e=>ur(new Date(e.createdAt)));return/* @__PURE__ */ g(`div`,{className:`@container min-h-0 flex-1 overflow-y-auto`,children:/* @__PURE__ */ g(`div`,{className:`mx-auto max-w-6xl space-y-7 px-1 py-2`,children:Array.from(i,([e,t])=>/* @__PURE__ */ _(`section`,{children:[/* @__PURE__ */ g(`h2`,{className:`mb-1 border-b border-border pb-2 text-sm font-semibold tabular-nums`,children:e}),/* @__PURE__ */ g(`ul`,{className:`divide-y divide-border/60`,children:t.map(e=>/* @__PURE__ */ g(Fr,{job:e},e.id))})]},e))})})}function Fr({job:e}){let t=Z(),[n,...r]=e.detail.split(`
|
|
4
|
+
`,3),i=e.kind===`dream`&&e.detail!==e.error?r.shift():void 0,a=e.error?.split(`
|
|
5
|
+
`,1)[0],o=r.length?e.detail:``,s=[o,e.error&&e.error!==a&&!o.includes(e.error)?e.error:``].filter(Boolean).join(`
|
|
6
|
+
|
|
7
|
+
`),c=new Date(e.createdAt);return/* @__PURE__ */ g(`li`,{children:/* @__PURE__ */ _(`details`,{className:`group`,children:[/* @__PURE__ */ _(`summary`,{className:`grid cursor-pointer list-none grid-cols-[3rem_1fr_auto_1rem] items-baseline gap-x-3 gap-y-1 rounded-md px-2 py-3 text-sm hover:bg-muted/40 focus-visible:outline-ring @xl:grid-cols-[3rem_7rem_5rem_minmax(0,1fr)_1rem] [&::-webkit-details-marker]:hidden`,children:[/* @__PURE__ */ g(`time`,{dateTime:c.toISOString(),className:`text-xs tabular-nums text-muted-foreground`,children:dr(c)}),/* @__PURE__ */ g(`span`,{className:`font-medium`,children:t(`job.kind.${e.kind}`)}),/* @__PURE__ */ g(`span`,{"data-status":e.status,className:`text-xs font-medium text-muted-foreground data-[status=failed]:text-destructive data-[status=running]:text-primary data-[status=partial]:text-foreground`,children:t(`job.status.${e.status}`)}),/* @__PURE__ */ _(`span`,{className:`col-span-full row-start-2 min-w-0 space-y-0.5 @xl:col-span-1 @xl:col-start-4 @xl:row-start-1`,children:[n&&n!==a&&/* @__PURE__ */ g(`span`,{className:`line-clamp-1 text-muted-foreground group-open:line-clamp-none [overflow-wrap:anywhere]`,children:n}),a&&/* @__PURE__ */ g(`span`,{className:`line-clamp-1 text-destructive group-open:line-clamp-none [overflow-wrap:anywhere]`,children:a})]}),/* @__PURE__ */ g(`span`,{"aria-hidden":`true`,className:`col-start-4 row-start-1 self-center justify-self-center text-muted-foreground transition-transform group-open:rotate-90 motion-reduce:transition-none @xl:col-start-5`,children:`›`})]}),/* @__PURE__ */ _(`div`,{className:`mb-3 ml-2 space-y-3 border-l-2 border-border py-1 pl-4 text-sm`,children:[/* @__PURE__ */ _(`dl`,{className:`flex flex-wrap gap-x-6 gap-y-1 text-xs text-muted-foreground`,children:[e.startedAt!==null&&/* @__PURE__ */ _(`div`,{children:[/* @__PURE__ */ _(`dt`,{className:`inline`,children:[t(`jobs.startedAt`),` · `]}),/* @__PURE__ */ g(`dd`,{className:`inline`,children:$(e.startedAt)})]}),e.finishedAt!==null&&/* @__PURE__ */ _(`div`,{children:[/* @__PURE__ */ _(`dt`,{className:`inline`,children:[t(`jobs.finishedAt`),` · `]}),/* @__PURE__ */ g(`dd`,{className:`inline`,children:$(e.finishedAt)})]}),/* @__PURE__ */ _(`div`,{children:[/* @__PURE__ */ _(`dt`,{className:`inline`,children:[t(`jobs.id`),` · `]}),/* @__PURE__ */ g(`dd`,{className:`inline font-mono [overflow-wrap:anywhere]`,children:e.id})]})]}),i&&/* @__PURE__ */ g(`p`,{className:`text-muted-foreground [overflow-wrap:anywhere]`,children:i}),s&&/* @__PURE__ */ _(`details`,{children:[/* @__PURE__ */ g(`summary`,{className:`cursor-pointer text-muted-foreground`,children:t(`jobs.detail`)}),/* @__PURE__ */ g(`pre`,{className:`mt-2 max-h-64 overflow-y-auto whitespace-pre-wrap bg-muted/40 p-3 text-xs leading-relaxed [overflow-wrap:anywhere]`,children:s})]})]})]})})}function Ir({presetId:t}){let n=Z(),{data:r,error:i}=u(`livingmemory.persona`,{presetId:t}),[a,s]=e.useState(!1);if(i)return/* @__PURE__ */ g(Sn,{title:i});if(r===void 0)return null;let{persona:c}=r;return c===null?/* @__PURE__ */ g(Sn,{title:n(`personas.empty`)}):/* @__PURE__ */ _(`article`,{className:`space-y-4 rounded-md border border-border p-4`,children:[/* @__PURE__ */ _(`header`,{className:`flex flex-wrap items-center gap-2`,children:[/* @__PURE__ */ g(`h2`,{className:`font-medium`,children:t}),/* @__PURE__ */ g(jn,{variant:`outline`,children:n(`persona.source.${c.source}`)}),c.stale&&/* @__PURE__ */ g(jn,{variant:`secondary`,children:n(`personas.stale`)}),/* @__PURE__ */ g(`span`,{className:`text-xs text-muted-foreground`,children:$(c.updatedAt)}),/* @__PURE__ */ _(`div`,{className:`ml-auto flex gap-2`,children:[/* @__PURE__ */ g(K,{size:`sm`,variant:`outline`,onClick:()=>s(!0),children:n(`common.edit`)}),/* @__PURE__ */ g(K,{size:`sm`,variant:`outline`,onClick:()=>void o(`livingmemory.resetPersona`,{presetId:t}).catch(Q),children:n(`personas.reset`)})]})]}),/* @__PURE__ */ g(`p`,{className:`whitespace-pre-wrap break-words text-sm leading-relaxed`,children:c.card}),a&&/* @__PURE__ */ g(Lr,{persona:c,onClose:()=>s(!1)})]})}function Lr({persona:t,onClose:n}){let r=Z(),[i,a]=e.useState(t.card);return/* @__PURE__ */ g(nn,{open:!0,onOpenChange:e=>e?void 0:n(),children:/* @__PURE__ */ _(on,{className:`max-h-[85dvh] overflow-y-auto sm:max-w-2xl`,children:[/* @__PURE__ */ _(sn,{children:[/* @__PURE__ */ g(ln,{children:t.presetId}),/* @__PURE__ */ g(un,{children:r(`personas.hint`)})]}),/* @__PURE__ */ g(dn,{rows:16,value:i,onChange:e=>a(e.target.value)}),/* @__PURE__ */ _(`div`,{className:`flex justify-end gap-2`,children:[/* @__PURE__ */ g(K,{variant:`ghost`,onClick:n,children:r(`common.cancel`)}),/* @__PURE__ */ g(K,{onClick:()=>void o(`livingmemory.savePersona`,{presetId:t.presetId,card:i}).then(n).catch(Q),children:r(`common.save`)})]})]})})}function Rr({page:e,pageSize:t,total:n,onChange:r}){let i=Z(),a=Math.max(1,Math.ceil(n/t));return a<=1?null:/* @__PURE__ */ _(`div`,{className:`flex items-center justify-end gap-2 text-sm`,children:[/* @__PURE__ */ g(K,{size:`sm`,variant:`ghost`,disabled:e<=1,onClick:()=>r(e-1),children:i(`common.prev`)}),/* @__PURE__ */ _(`span`,{className:`opacity-70`,children:[e,` / `,a]}),/* @__PURE__ */ g(K,{size:`sm`,variant:`ghost`,disabled:e>=a,onClick:()=>r(e+1),children:i(`common.next`)})]})}export{pr as LivingMemoryPage};
|
package/lib/contracts/rpc.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { MemoryEntryRecord, MemoryEntryStatus, MemoryEntryType, MemoryJobRecord, MemoryJobStatus } from './memory.ts';
|
|
1
|
+
import type { MemoryEntryRecord, MemoryEntryStatus, MemoryEntryType, MemoryJobRecord, MemoryJobStatus, PresetSpeakerRecord, UserProfileRecord } from './memory.ts';
|
|
2
2
|
export interface PageRequest {
|
|
3
3
|
page?: number;
|
|
4
4
|
pageSize?: number;
|
|
@@ -23,7 +23,9 @@ export interface JobListQuery extends PageRequest {
|
|
|
23
23
|
}
|
|
24
24
|
export interface UserProfileListQuery extends PageRequest {
|
|
25
25
|
presetId: string;
|
|
26
|
+
keyword?: string;
|
|
26
27
|
}
|
|
28
|
+
export type UserProfileListItem = UserProfileRecord & Pick<PresetSpeakerRecord, 'speakerId' | 'platform'>;
|
|
27
29
|
export interface PageResult<T> {
|
|
28
30
|
items: T[];
|
|
29
31
|
page: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rpc.d.ts","sourceRoot":"","sources":["../../src/contracts/rpc.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,eAAe,
|
|
1
|
+
{"version":3,"file":"rpc.d.ts","sourceRoot":"","sources":["../../src/contracts/rpc.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,EACf,eAAe,EACf,eAAe,EACf,mBAAmB,EACnB,iBAAiB,EACpB,MAAM,aAAa,CAAA;AAEpB,MAAM,WAAW,WAAW;IACxB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,gBAAgB;IAC7B,QAAQ,EAAE,MAAM,CA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M,EAAE,gBAAgB,CAAA;CAC3B"}
|
package/lib/contracts/webui.d.ts
CHANGED
|
@@ -74,8 +74,10 @@ export interface LivingMemoryProfileView {
|
|
|
74
74
|
id: string;
|
|
75
75
|
speakerKey: string;
|
|
76
76
|
speakerLabel: string;
|
|
77
|
+
speakerId: string | null;
|
|
78
|
+
platform: string | null;
|
|
77
79
|
content: string;
|
|
78
|
-
|
|
80
|
+
sourceMemoryCount: number;
|
|
79
81
|
updatedAt: number;
|
|
80
82
|
}
|
|
81
83
|
export interface LivingMemorySnapshotView {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webui.d.ts","sourceRoot":"","sources":["../../src/contracts/webui.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAC7G,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAC/C,OAAO,KAAK,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAA;AAE7E,MAAM,WAAW,qBAAqB;IAClC,EAAE,EAAE,MAAM,CAAA;IACV,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,iBAAiB,CAAC,MAAM,CAAC,CAAA;IAC/B,MAAM,EAAE,iBAAiB,CAAC,QAAQ,CAAC,CAAA;IACnC,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB,WAAW,EAAE,MAAM,EAAE,CAAA;IACrB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,WAAW,EAAE,iBAAiB,CAAA;IAC9B,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,uBAAuB;IACpC,UAAU,E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CAAA;IACf,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB,WAAW,EAAE,MAAM,CAAA;IACnB,iBAAiB,EAAE,MAAM,CAAA;IACzB,YAAY,EAAE,MAAM,CAAA;IACpB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,SAAS,EAAE,MAAM,CAAA;CACpB;AAED,sCAAsC;AACtC,MAAM,MAAM,yBAAyB,GAAG,IAAI,CACxC,eAAe,EACf,MAAM,GAAG,UAAU,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,GAAG,YAAY,CACrE,CAAA;AAED,YAAY,EAAE,kBAAkB,EAAE,CAAA;AAClC,YAAY,EAAE,iBAAiB,EAAE,eAAe,EAAE,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { LivingMemoryEntriesParams, LivingMemoryEntriesSnapshot, LivingMemoryJobView, LivingMemoryPersonaView, LivingMemoryProfilesSnapshot, LivingMemorySearchHitView, LivingMemorySpeakerView, LivingMemorySnapshotsSnapshot, LivingMemoryStatusSnapshot } from './webui.ts';
|
|
1
|
+
import type { LivingMemoryEntriesParams, LivingMemoryEntriesSnapshot, LivingMemoryEntryView, LivingMemoryJobView, LivingMemoryPersonaView, LivingMemoryProfilesSnapshot, LivingMemorySearchHitView, LivingMemorySpeakerView, LivingMemorySnapshotsSnapshot, LivingMemoryStatusSnapshot } from './webui.ts';
|
|
2
2
|
import type { LivingMemorySearchMemoryType, MemoryEntryRecord, MemoryMutationInput, MemorySearchStatus } from './memory.ts';
|
|
3
3
|
import type { MemoryListFilter } from './rpc.ts';
|
|
4
4
|
import type { DreamTriggerResult } from './workflows.ts';
|
|
@@ -22,6 +22,7 @@ declare module '@chatluna/ui-client/client' {
|
|
|
22
22
|
persona: LivingMemoryPersonaView | null;
|
|
23
23
|
};
|
|
24
24
|
'livingmemory.profiles': LivingMemoryProfilesSnapshot;
|
|
25
|
+
'livingmemory.profileMemories': LivingMemoryEntryView[];
|
|
25
26
|
'livingmemory.snapshots': LivingMemorySnapshotsSnapshot;
|
|
26
27
|
'livingmemory.status': LivingMemoryStatusSnapshot;
|
|
27
28
|
'livingmemory.settingsEntry': {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webui_live.d.ts","sourceRoot":"","sources":["../../src/contracts/webui_live.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACR,yBAAyB,EACzB,2BAA2B,EAC3B,mBAAmB,EACnB,uBAAuB,EACvB,4BAA4B,EAC5B,yBAAyB,EACzB,uBAAuB,EACvB,6BAA6B,EAC7B,0BAA0B,EAC7B,MAAM,YAAY,CAAA;AACnB,OAAO,KAAK,EACR,4BAA4B,EAC5B,iBAAiB,EACjB,mBAAmB,EACnB,kBAAkB,EACrB,MAAM,aAAa,CAAA;AACpB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAChD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AAExD,KAAK,UAAU,GAAG,mBAAmB,GAAG;IAAE,WAAW,CAAC,EAAE,MAAM,EAAE,CAAA;CAAE,CAAA;AAElE;;;;;;;GAOG;AACH,OAAO,QAAQ,4BAA4B,CAAC;IACxC,UAAU,MAAM;QACZ,sBAAsB,EAAE,2BAA2B,CAAA;QACnD,uBAAuB,EAAE,uBAAuB,EAAE,CAAA;QAClD,mBAAmB,EAAE,mBAAmB,EAAE,CAAA;QAC1C,sBAAsB,EAAE;YAAE,OAAO,EAAE,uBAAuB,GAAG,IAAI,CAAA;SAAE,CAAA;QACnE,uBAAuB,EAAE,4BAA4B,CAAA;QACrD,wBAAwB,EAAE,6BAA6B,CAAA;QACvD,qBAAqB,EAAE,0BAA0B,CAAA;QACjD,4BAA4B,EAAE;YAAE,EAAE,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAA;SAAE,GAAG,IAAI,CAAA;KACpE;IACD,UAAU,OAA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