From 7a36fd4e04a025523c9eb9f54f00ca7c354b7898 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 26 Oct 2026 12:40:54 +0800 Subject: [PATCH] =?UTF-8?q?ui:=20=E5=85=A8=E7=AB=99=E7=95=8C=E9=9D=A2?= =?UTF-8?q?=E9=87=8D=E8=AE=BE=E8=AE=A1(=E6=96=87=E5=AD=97=E4=BE=A7?= =?UTF-8?q?=E6=A0=8F+=E7=81=B0=E5=BA=95=E7=99=BD=E5=8D=A1=E5=B1=82?= =?UTF-8?q?=E6=AC=A1+=E7=BB=84=E4=BB=B6=E7=BB=9F=E4=B8=80)=20fix:=20?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=AE=B0=E5=BD=95=E5=BC=B9=E7=AA=97=E4=B8=8D?= =?UTF-8?q?=E6=98=BE=E7=A4=BA/=E8=AE=A1=E6=97=B6=E6=B1=87=E6=80=BB?= =?UTF-8?q?=E5=B4=A9=E6=BA=83/CSV=E5=AF=BC=E5=87=BA=E5=B4=A9=E6=BA=83/?= =?UTF-8?q?=E8=AE=B0=E8=B4=A6=E5=88=87=E6=8D=A2=E7=B1=BB=E5=9E=8B=E5=B4=A9?= =?UTF-8?q?=E6=BA=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/release-notes-v0.6.0.md | 29 ++ .../{index-CJCBehez.js => index-C-oU33BQ.js} | 4 +- intern-log/dist/assets/index-C8-KlPfD.css | 1 + intern-log/dist/assets/index-CtHE6m7N.js | 27 ++ intern-log/dist/assets/index-DLDMtYxl.js | 27 -- intern-log/dist/assets/index-ieoBMDLY.css | 1 - .../{web-e9jKyg3_.js => web-BbcS1QA8.js} | 2 +- intern-log/dist/index.html | 4 +- intern-log/package.json | 2 +- intern-log/src/App.vue | 222 +++++++++------- intern-log/src/components/ConfirmDialog.vue | 26 +- .../src/components/CredentialDialog.vue | 39 +-- .../src/components/TransactionDialog.vue | 58 +--- intern-log/src/components/log/DayPanel.vue | 41 +-- .../src/components/log/EditLogDialog.vue | 66 +---- intern-log/src/db/repo.ts | 3 + intern-log/src/env.d.ts | 3 + intern-log/src/styles/mobile.css | 33 ++- intern-log/src/styles/tokens.css | 251 +++++++++++++++--- intern-log/src/views/CalendarView.vue | 78 +++--- intern-log/src/views/LedgerView.vue | 62 +---- intern-log/src/views/LoginView.vue | 40 +-- intern-log/src/views/MemoView.vue | 8 +- intern-log/src/views/PlanView.vue | 173 ++++++------ intern-log/src/views/ReportView.vue | 17 +- intern-log/src/views/SettingsView.vue | 19 +- intern-log/src/views/StatsView.vue | 26 +- intern-log/src/views/TodayView.vue | 69 +++-- intern-log/src/views/UserAdminView.vue | 72 ++--- intern-log/src/views/VaultView.vue | 62 +---- 30 files changed, 697 insertions(+), 768 deletions(-) create mode 100644 docs/release-notes-v0.6.0.md rename intern-log/dist/assets/{index-CJCBehez.js => index-C-oU33BQ.js} (69%) create mode 100644 intern-log/dist/assets/index-C8-KlPfD.css create mode 100644 intern-log/dist/assets/index-CtHE6m7N.js delete mode 100644 intern-log/dist/assets/index-DLDMtYxl.js delete mode 100644 intern-log/dist/assets/index-ieoBMDLY.css rename intern-log/dist/assets/{web-e9jKyg3_.js => web-BbcS1QA8.js} (98%) create mode 100644 intern-log/src/env.d.ts diff --git a/docs/release-notes-v0.6.0.md b/docs/release-notes-v0.6.0.md new file mode 100644 index 0000000..238a1e7 --- /dev/null +++ b/docs/release-notes-v0.6.0.md @@ -0,0 +1,29 @@ +# v0.6.0 发布说明(2026-10-26) + +## 界面整体重设计 + +本版本对全部界面做了系统性改版,统一为「高级白」企业级视觉,信息层次更清晰: + +- **桌面侧栏重做**:由纯图标改为「图标 + 文字」导航,按 记录 / 工具 / 分析 / 系统 分组;新增品牌区与当前用户区(头像、用户名、退出)。 +- **顶栏精简**:只保留页面标题、全局搜索与打卡按钮;用户信息与退出移入侧栏底部。 +- **内容层次**:内容区改为浅灰底 + 白色卡片,卡片带细边框与轻投影,主次分明。 +- **组件统一**:按钮、输入框、表格、弹窗、分段选择器、进度条等全部收敛为全局统一样式,各页面不再各自为政。 +- **逐页重排**:日历(网格线 + 选中描边)、详情(导航与导出合并为一条工具栏)、计划(长期计划与每日安排分区块、列表合并为单卡)、记账、统计(热力图改品牌蓝)、总结、备忘录、密码库、设置、用户管理。 +- **登录页升级**:品牌标识、卡片投影。 +- **平板适配**:721–1000px 侧栏自动折叠为图标栏。 +- **移动端**:底部标签栏与「更多」弹层沿用,并随新基座精修间距与弹窗。 + +## 问题修复 + +- 修复:详情页「添加记录」按钮点击无反应(弹窗开关与编辑目标状态混用所致)。 +- 修复:计划页有任务正在计时时,汇总行会触发未定义函数导致整页报错。 +- 修复:设置页导出工作记录 CSV 缺少分类标签导入,触发即报错。 +- 修复:记账弹窗切换收支类型时引用了不存在的分类常量,触发即报错。 +- 记录弹窗标题与按钮文案随「新增 / 编辑」模式正确切换。 + +## 升级与部署 + +- 桌面端:安装 InternLog-Setup-0.6.0.exe。 +- 安卓端:安装 InternLog-0.6.0-debug.apk。 +- 服务器:`cd /opt/daywork && git pull && cd server && docker compose up -d --build`(网页端 bundle 随仓库更新)。 +- 数据结构无变更,v0.5.0 及之前版本可直接升级。 diff --git a/intern-log/dist/assets/index-CJCBehez.js b/intern-log/dist/assets/index-C-oU33BQ.js similarity index 69% rename from intern-log/dist/assets/index-CJCBehez.js rename to intern-log/dist/assets/index-C-oU33BQ.js index d9ebf8b..9b41511 100644 --- a/intern-log/dist/assets/index-CJCBehez.js +++ b/intern-log/dist/assets/index-C-oU33BQ.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./web-e9jKyg3_.js","./index-DLDMtYxl.js","./index-ieoBMDLY.css"])))=>i.map(i=>d[i]); -import{r as s,_ as i}from"./index-DLDMtYxl.js";var t;(function(e){e.Documents="DOCUMENTS",e.Data="DATA",e.Library="LIBRARY",e.Cache="CACHE",e.External="EXTERNAL",e.ExternalStorage="EXTERNAL_STORAGE"})(t||(t={}));var a;(function(e){e.UTF8="utf8",e.ASCII="ascii",e.UTF16="utf16"})(a||(a={}));const E=s("Filesystem",{web:()=>i(()=>import("./web-e9jKyg3_.js"),__vite__mapDeps([0,1,2]),import.meta.url).then(e=>new e.FilesystemWeb)});export{t as Directory,a as Encoding,E as Filesystem}; +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./web-BbcS1QA8.js","./index-CtHE6m7N.js","./index-C8-KlPfD.css"])))=>i.map(i=>d[i]); +import{r as s,_ as i}from"./index-CtHE6m7N.js";var t;(function(e){e.Documents="DOCUMENTS",e.Data="DATA",e.Library="LIBRARY",e.Cache="CACHE",e.External="EXTERNAL",e.ExternalStorage="EXTERNAL_STORAGE"})(t||(t={}));var a;(function(e){e.UTF8="utf8",e.ASCII="ascii",e.UTF16="utf16"})(a||(a={}));const E=s("Filesystem",{web:()=>i(()=>import("./web-BbcS1QA8.js"),__vite__mapDeps([0,1,2]),import.meta.url).then(e=>new e.FilesystemWeb)});export{t as Directory,a as Encoding,E as Filesystem}; diff --git a/intern-log/dist/assets/index-C8-KlPfD.css b/intern-log/dist/assets/index-C8-KlPfD.css new file mode 100644 index 0000000..6adfddf --- /dev/null +++ b/intern-log/dist/assets/index-C8-KlPfD.css @@ -0,0 +1 @@ +.dialog[data-v-2e4b0ab5]{width:380px}.dialog-msg[data-v-2e4b0ab5]{margin-top:8px;color:var(--text-2);font-size:13px;line-height:1.7;word-break:break-all}.dialog-btns[data-v-2e4b0ab5]{margin-top:20px}.dialog[data-v-f3b19176]{width:560px}.dp-head[data-v-b7bec4fa]{margin-bottom:12px}.dp-date[data-v-b7bec4fa]{font-size:14px;font-weight:600}.att-grid[data-v-b7bec4fa]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px}.att-cell label[data-v-b7bec4fa]{display:block;font-size:12px;color:var(--text-2);margin-bottom:4px}.att-val[data-v-b7bec4fa]{display:flex;align-items:center;gap:6px;min-height:32px;font-size:13px}.val-empty[data-v-b7bec4fa]{color:var(--text-3)}.edit-row[data-v-b7bec4fa]{display:flex;gap:6px;align-items:center;flex-wrap:wrap}.time-input[data-v-b7bec4fa]{width:104px}.att-note[data-v-b7bec4fa]{margin-top:10px;font-size:12px}.att-actions[data-v-b7bec4fa]{display:flex;gap:8px;margin-top:12px;flex-wrap:wrap}.form-footer[data-v-b7bec4fa]{display:flex;justify-content:flex-end;gap:8px;margin-top:12px;padding-top:12px;border-top:1px solid var(--border)}.list-sec[data-v-b7bec4fa]{margin-bottom:4px}.sec-head[data-v-b7bec4fa]{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin-bottom:10px}.sec-head .sec-title[data-v-b7bec4fa]{margin-bottom:0}.item[data-v-b7bec4fa]{border:1px solid var(--border);border-radius:var(--radius-sm);padding:9px 12px;margin-bottom:6px;background:var(--bg-subtle);transition:border-color .12s,background .12s}.item[data-v-b7bec4fa]:hover{border-color:var(--border-strong);background:var(--bg-page)}.item-main[data-v-b7bec4fa]{display:flex;align-items:center;gap:8px;min-height:26px;flex-wrap:wrap}.item-content[data-v-b7bec4fa]{cursor:text;word-break:break-all}.item-meta[data-v-b7bec4fa]{font-size:12px}.item-sub[data-v-b7bec4fa]{margin-top:6px;padding-top:6px;border-top:1px dashed var(--border);font-size:12px;display:flex;flex-direction:column;gap:2px}.dp-foot[data-v-b7bec4fa]{margin-top:10px;font-size:12px;text-align:right}@media (max-width: 560px){.att-grid[data-v-b7bec4fa]{grid-template-columns:1fr}}.cal-toolbar[data-v-8a3b0422]{display:flex;align-items:center;gap:10px;margin-bottom:12px}.cal-title[data-v-8a3b0422]{font-size:14px;font-weight:600;min-width:96px;text-align:center}.cal-card[data-v-8a3b0422]{padding:0;overflow:hidden}.cal-head[data-v-8a3b0422],.cal-grid[data-v-8a3b0422]{display:grid;grid-template-columns:repeat(7,1fr);gap:1px;background:var(--border)}.cal-week[data-v-8a3b0422]{background:var(--bg-subtle);text-align:center;padding:7px 0;font-size:12px;color:var(--text-3)}.cal-cell[data-v-8a3b0422]{min-height:92px;padding:6px 8px;text-align:left;background:var(--bg-page);border:none;cursor:pointer;display:block;font-size:13px;transition:background .12s}.cal-cell[data-v-8a3b0422]:hover{background:var(--bg-subtle)}.cal-cell.blank[data-v-8a3b0422]{cursor:default}.cal-cell.selected[data-v-8a3b0422]{background:var(--accent-bg);box-shadow:inset 0 0 0 2px var(--accent)}.daynum.today[data-v-8a3b0422]{color:var(--accent);font-weight:600}.cal-cell.weekend .daynum[data-v-8a3b0422]{color:var(--text-3)}.cal-marks[data-v-8a3b0422]{display:flex;align-items:center;gap:4px;margin-top:8px;height:14px}.mark-log[data-v-8a3b0422]{color:var(--text-3)}.mark-star[data-v-8a3b0422]{color:var(--accent)}.drawer[data-v-8a3b0422]{position:fixed;top:0;right:0;bottom:0;width:min(440px,100%);background:var(--bg-page);border-left:1px solid var(--border);box-shadow:var(--shadow-float);z-index:20;display:flex;flex-direction:column}.drawer-head[data-v-8a3b0422]{height:48px;flex:none;display:flex;align-items:center;justify-content:space-between;padding:0 16px;border-bottom:1px solid var(--border)}.drawer-title[data-v-8a3b0422]{font-weight:600}.drawer-body[data-v-8a3b0422]{flex:1;overflow:auto;padding:16px}.drawer-enter-active[data-v-8a3b0422],.drawer-leave-active[data-v-8a3b0422]{transition:opacity .15s ease}.drawer-enter-from[data-v-8a3b0422],.drawer-leave-to[data-v-8a3b0422]{opacity:0}@media (max-width: 720px){.cal-cell[data-v-8a3b0422]{min-height:60px;padding:4px 5px}.cal-title[data-v-8a3b0422]{min-width:76px;font-size:13px}.cal-marks[data-v-8a3b0422]{gap:3px;margin-top:4px;height:12px}.drawer[data-v-8a3b0422]{width:100%}}.detail-page[data-v-4db7eb3d]{display:flex;flex-direction:column}.toolbar[data-v-4db7eb3d]{padding:10px 16px;display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-bottom:12px}.nav-row[data-v-4db7eb3d]{display:flex;align-items:center;gap:6px}.date-title[data-v-4db7eb3d]{font-size:14px;font-weight:600;min-width:170px;text-align:center}.date-title.is-today[data-v-4db7eb3d]{color:var(--accent)}.w-date[data-v-4db7eb3d]{width:150px;flex:none}.tool-sep[data-v-4db7eb3d]{width:1px;align-self:stretch;background:var(--border)}.exp-row[data-v-4db7eb3d]{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.exp-label[data-v-4db7eb3d]{font-size:12px}.w-exp[data-v-4db7eb3d]{width:140px;flex:none}@media (max-width: 720px){.tool-sep[data-v-4db7eb3d]{display:none}.nav-row[data-v-4db7eb3d]{flex:1}.date-title[data-v-4db7eb3d]{min-width:0;flex:1;text-align:left}.w-date[data-v-4db7eb3d]{flex:1;min-width:120px;width:auto}}.plan-page[data-v-69eb7b43]{display:flex;flex-direction:column}.blk-head[data-v-69eb7b43]{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:4px 2px 10px}.blk-head-text[data-v-69eb7b43]{min-width:0}.blk-title[data-v-69eb7b43]{font-size:14px;font-weight:600}.blk-sub[data-v-69eb7b43]{font-size:12px;margin-top:1px}.day-head[data-v-69eb7b43]{margin-top:18px}.day-ops[data-v-69eb7b43]{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.date-chip[data-v-69eb7b43]{min-width:74px;text-align:center;font-weight:600;font-size:13px}.date-chip.today[data-v-69eb7b43]{color:var(--accent)}.timer-live[data-v-69eb7b43]{color:var(--accent);font-weight:600}.goal-card[data-v-69eb7b43]{display:flex;align-items:flex-start;gap:12px;padding:14px 16px;margin-bottom:10px}.goal-main[data-v-69eb7b43]{flex:1;min-width:0}.goal-line[data-v-69eb7b43]{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.goal-name[data-v-69eb7b43]{font-size:14px;font-weight:500;word-break:break-all}.goal-range[data-v-69eb7b43]{font-size:12px}.goal-bar[data-v-69eb7b43]{height:6px;border-radius:3px;background:var(--bg-subtle);overflow:hidden;margin-top:10px}.goal-bar-fill[data-v-69eb7b43]{display:block;height:100%;background:var(--accent);border-radius:3px}.goal-meta[data-v-69eb7b43]{font-size:12px;margin-top:6px}.goal-ops[data-v-69eb7b43]{display:flex;gap:4px}.list-card[data-v-69eb7b43]{overflow:hidden}.plan-item[data-v-69eb7b43]{display:flex;align-items:flex-start;gap:12px;padding:12px 16px;border-bottom:1px solid var(--border)}.plan-item[data-v-69eb7b43]:last-child{border-bottom:none}.plan-item.done[data-v-69eb7b43]{opacity:.6}.plan-item.skip[data-v-69eb7b43]{opacity:.48}.plan-item.running[data-v-69eb7b43]{box-shadow:inset 3px 0 0 var(--accent)}.pi-time[data-v-69eb7b43]{font-size:13px;font-weight:600;min-width:92px;padding-top:2px}.pi-main[data-v-69eb7b43]{flex:1;min-width:0}.pi-title[data-v-69eb7b43]{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.pi-text[data-v-69eb7b43]{font-size:14px;font-weight:500;word-break:break-all}.pi-text.strike[data-v-69eb7b43]{text-decoration:line-through}.state-done[data-v-69eb7b43]{color:var(--ok);font-size:12px}.state-skip[data-v-69eb7b43]{color:var(--text-3);font-size:12px}.pi-note[data-v-69eb7b43],.pi-meta[data-v-69eb7b43]{font-size:12px;margin-top:3px}.pi-ops[data-v-69eb7b43]{display:flex;align-items:center;gap:6px;flex-wrap:wrap;justify-content:flex-end}.timer-on[data-v-69eb7b43]{color:var(--accent);border-color:var(--accent)}.empty[data-v-69eb7b43]{padding:28px 16px}.dialog[data-v-69eb7b43]{width:420px}.form-row[data-v-69eb7b43]{display:flex;flex-direction:column;gap:5px;margin-top:10px}.form-row.two[data-v-69eb7b43]{flex-direction:row;gap:10px}.form-row.two>div[data-v-69eb7b43]{flex:1;display:flex;flex-direction:column;gap:5px}.goal-hint[data-v-69eb7b43]{font-size:12px;margin-top:8px}@media (max-width: 720px){.plan-item[data-v-69eb7b43]{flex-wrap:wrap}.pi-ops[data-v-69eb7b43]{width:100%;justify-content:flex-start}.day-ops[data-v-69eb7b43]{width:100%}}.cards[data-v-5469ae68]{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.section[data-v-5469ae68]{margin-top:12px}.heat[data-v-5469ae68]{display:flex;gap:3px;overflow-x:auto;padding-bottom:4px}.heat-col[data-v-5469ae68]{display:flex;flex-direction:column;gap:3px}.heat-cell[data-v-5469ae68]{width:12px;height:12px;border-radius:3px;display:inline-block}.lv0[data-v-5469ae68]{background:var(--bg-subtle);border:1px solid var(--border)}.lv1[data-v-5469ae68]{background:#e4eeff}.lv2[data-v-5469ae68]{background:#bfd6ff}.lv3[data-v-5469ae68]{background:#7fa8f5}.lv4[data-v-5469ae68]{background:var(--accent)}.heat-legend[data-v-5469ae68]{display:flex;align-items:center;gap:3px;margin-top:10px;font-size:12px}.two-col[data-v-5469ae68]{display:grid;grid-template-columns:1fr 1fr;gap:12px}.two-col .section[data-v-5469ae68]{margin-top:0}.bar-label[data-v-5469ae68]{width:72px}.bar-num[data-v-5469ae68]{width:92px}.loc-label[data-v-5469ae68]{width:110px;text-align:left}@media (max-width: 720px){.cards[data-v-5469ae68]{grid-template-columns:repeat(2,1fr)}.two-col[data-v-5469ae68]{grid-template-columns:1fr}.two-col .section[data-v-5469ae68]{margin-top:12px}}.report-toolbar[data-v-36db413b]{display:flex;align-items:center;gap:10px;margin-bottom:12px;flex-wrap:wrap}.ai-error[data-v-36db413b]{color:var(--danger);font-size:12px;margin:0 0 8px}.w-date[data-v-36db413b]{width:140px;flex:none}.report-grid[data-v-36db413b]{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:12px;align-items:start}.section-title[data-v-36db413b]{margin-bottom:10px}.section+.section[data-v-36db413b]{margin-top:12px}.note-label[data-v-36db413b]{display:block;font-size:12px;margin:8px 0 4px}.note-saved[data-v-36db413b]{font-size:12px;margin-top:6px}.md-editor[data-v-36db413b]{min-height:420px;line-height:1.7}.sum-row[data-v-36db413b]{display:flex;justify-content:space-between;padding:3px 0;font-size:12px}.section-sub[data-v-36db413b]{font-weight:600;margin:12px 0 4px;font-size:12px;color:var(--text-2)}.sum-item[data-v-36db413b]{font-size:12px;padding:2px 0;word-break:break-all}.sum-empty[data-v-36db413b]{font-size:12px}@media (max-width: 960px){.report-grid[data-v-36db413b]{grid-template-columns:1fr}}.dialog[data-v-a4b3a7d0]{width:480px}.add-cat[data-v-a4b3a7d0]{display:flex;gap:6px;margin-top:6px}.add-cat-input[data-v-a4b3a7d0]{flex:1;height:28px;font-size:12px}.ledger-toolbar[data-v-1d69492f]{display:flex;align-items:center;gap:8px;margin-bottom:12px;flex-wrap:wrap}.month-title[data-v-1d69492f]{font-size:14px;font-weight:600;min-width:88px;text-align:center}.w-filter[data-v-1d69492f]{width:110px;flex:none}.cards[data-v-1d69492f]{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px}.card.sec[data-v-1d69492f],.card.section[data-v-1d69492f]{margin-top:12px}.bar-label[data-v-1d69492f]{width:56px}.bar-num[data-v-1d69492f]{width:118px}.td-note[data-v-1d69492f]{color:var(--text-2)}.tx-pending[data-v-1d69492f]{color:var(--warn);font-size:12px}.tx-done[data-v-1d69492f]{color:var(--ok);font-size:12px}.th-ops[data-v-1d69492f]{width:220px}.ops[data-v-1d69492f]{display:flex;gap:4px;flex-wrap:wrap}.table-card[data-v-1d69492f]{overflow-x:auto}.table-note[data-v-1d69492f]{margin-top:10px;font-size:12px;text-align:right}@media (max-width: 560px){.ledger-toolbar .w-filter[data-v-1d69492f]{flex:1;min-width:0;width:auto}}.memo-page[data-v-123c0b8c]{display:grid;grid-template-columns:280px minmax(0,1fr);gap:12px;align-items:stretch}.memo-list[data-v-123c0b8c]{display:flex;flex-direction:column;max-height:calc(100vh - 150px)}.pane-head[data-v-123c0b8c]{display:flex;align-items:center;justify-content:space-between;padding:12px 12px 10px;border-bottom:1px solid var(--border);flex:none}.pane-title[data-v-123c0b8c]{font-size:13px;font-weight:600}.memo-scroll[data-v-123c0b8c]{overflow:auto;padding:6px}.memo-item[data-v-123c0b8c]{padding:8px 10px;border-radius:var(--radius-sm);cursor:pointer;margin-bottom:2px}.memo-item[data-v-123c0b8c]:hover{background:var(--bg-hover)}.memo-item.active[data-v-123c0b8c]{background:var(--accent-bg)}.memo-item.active .memo-item-title[data-v-123c0b8c]{color:var(--accent)}.memo-item-title[data-v-123c0b8c]{font-size:13px;font-weight:500;word-break:break-all}.memo-item-sub[data-v-123c0b8c]{font-size:12px;margin-top:2px;word-break:break-all}.memo-item-time[data-v-123c0b8c]{font-size:11px;margin-top:2px}.memo-editor[data-v-123c0b8c]{padding:16px 18px;min-height:420px;display:flex;flex-direction:column}.title-input[data-v-123c0b8c]{font-size:15px;font-weight:600;margin-bottom:10px}.content-textarea[data-v-123c0b8c]{flex:1;min-height:340px;line-height:1.8}.editor-foot[data-v-123c0b8c]{display:flex;align-items:center;gap:8px;margin-top:10px;padding-top:10px;border-top:1px solid var(--border)}.foot-info[data-v-123c0b8c]{font-size:12px}.editor-empty[data-v-123c0b8c]{display:flex;align-items:center;justify-content:center;flex:1;padding:60px 0}@media (max-width: 800px){.memo-page[data-v-123c0b8c]{grid-template-columns:1fr}.memo-list[data-v-123c0b8c]{max-height:240px}.content-textarea[data-v-123c0b8c]{min-height:240px}}.dialog[data-v-2eafe20e]{width:480px}.pwd-row[data-v-2eafe20e]{display:flex;gap:8px}.pwd-row .input[data-v-2eafe20e]{flex:1}.lock-card[data-v-a96af9e5]{max-width:380px;margin:60px auto 0;padding:28px 24px;text-align:center;display:flex;flex-direction:column;gap:10px}.lock-badge[data-v-a96af9e5]{width:52px;height:52px;margin:0 auto;border-radius:50%;background:var(--accent-bg);color:var(--accent);display:flex;align-items:center;justify-content:center}.lock-title[data-v-a96af9e5]{font-size:15px;font-weight:600}.lock-tip[data-v-a96af9e5]{font-size:12px;line-height:1.7}.lock-btn[data-v-a96af9e5]{margin-top:4px}.vault-toolbar[data-v-a96af9e5]{display:flex;align-items:center;gap:8px;margin-bottom:12px;flex-wrap:wrap}.search-wrap[data-v-a96af9e5]{position:relative;width:280px;max-width:100%}.search-wrap .input[data-v-a96af9e5]{padding-left:30px}.search-icon[data-v-a96af9e5]{position:absolute;left:10px;top:50%;transform:translateY(-50%);color:var(--text-3)}.table-card[data-v-a96af9e5]{overflow-x:auto}.td-system[data-v-a96af9e5]{font-weight:500}.th-ops[data-v-a96af9e5]{width:150px}.pwd-cell[data-v-a96af9e5]{display:flex;align-items:center;gap:4px;flex-wrap:wrap}.pwd-text[data-v-a96af9e5]{letter-spacing:1px}.copyable[data-v-a96af9e5]{cursor:pointer}.copyable[data-v-a96af9e5]:hover{color:var(--accent)}.ops[data-v-a96af9e5]{display:flex;gap:4px;flex-wrap:wrap}.table-note[data-v-a96af9e5]{margin-top:10px;font-size:12px;text-align:right}.dialog[data-v-a96af9e5]{width:440px}.vp-field[data-v-a96af9e5]{margin-bottom:10px}.vp-tip[data-v-a96af9e5]{font-size:12px;margin-top:8px}.settings[data-v-aad752b5]{display:flex;flex-direction:column;gap:12px;max-width:640px}.acc-line[data-v-aad752b5]{font-size:12px;margin-bottom:10px;line-height:1.7}.rule-grid[data-v-aad752b5]{display:grid;grid-template-columns:1fr 1fr;gap:10px 16px}.rule-item label[data-v-aad752b5]{display:block;font-size:12px;color:var(--text-2);margin-bottom:4px}.rule-save[data-v-aad752b5]{display:flex;align-items:center;gap:10px;margin-top:12px;flex-wrap:wrap}.proj-add[data-v-aad752b5]{display:flex;gap:8px}.proj-tip[data-v-aad752b5]{font-size:12px;margin-top:6px}.proj-row[data-v-aad752b5]{display:flex;align-items:center;gap:8px;padding:7px 0;border-bottom:1px solid var(--border)}.proj-row[data-v-aad752b5]:last-child{border-bottom:none}.proj-name[data-v-aad752b5]{flex:1;word-break:break-all}.proj-name.archived[data-v-aad752b5]{color:var(--text-3);text-decoration:line-through}.loc-note[data-v-aad752b5]{font-size:12px}.ai-grid[data-v-aad752b5]{display:flex;flex-direction:column;gap:10px}.backup-row[data-v-aad752b5]{display:flex;gap:8px;flex-wrap:wrap}.cat-block[data-v-aad752b5]{margin-top:12px}.cat-block[data-v-aad752b5]:first-of-type{margin-top:0}.cat-head[data-v-aad752b5]{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px;font-size:12px}.cat-chips[data-v-aad752b5]{display:flex;flex-wrap:wrap;gap:6px}.cat-chip[data-v-aad752b5]{display:inline-flex;align-items:center;gap:4px;border:1px solid var(--border);border-radius:999px;padding:2px 8px;font-size:12px;background:var(--bg-subtle)}.chip-btn[data-v-aad752b5]{border:none;background:transparent;color:var(--text-3);cursor:pointer;font-size:11px;padding:0 1px}.chip-btn[data-v-aad752b5]:hover{color:var(--accent)}.import-error[data-v-aad752b5]{color:var(--danger);font-size:12px;margin-top:8px}.backup-note[data-v-aad752b5]{font-size:12px;margin-top:10px}.admin-page[data-v-2d48d2c9]{display:flex;flex-direction:column;gap:12px;max-width:860px}.toolbar[data-v-2d48d2c9]{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;border-bottom:1px solid var(--border);flex-wrap:wrap}.head-wrap[data-v-2d48d2c9]{flex:1;min-width:0}.tb-title[data-v-2d48d2c9]{font-weight:600;font-size:14px}.tb-sub[data-v-2d48d2c9]{font-size:12px;margin-top:2px}.tb-error[data-v-2d48d2c9]{padding:8px 16px 0}.table-card[data-v-2d48d2c9]{overflow-x:auto}.admin-table td[data-v-2d48d2c9]{white-space:nowrap}.td-name[data-v-2d48d2c9]{font-weight:500}.role-badge[data-v-2d48d2c9]{display:inline-flex;align-items:center;background:var(--accent-bg);color:var(--accent);border-radius:999px;font-size:12px;line-height:18px;padding:1px 9px}.load-line[data-v-2d48d2c9]{padding:12px 16px;font-size:12px}.admin-note[data-v-2d48d2c9]{font-size:12px;padding:0 2px}.ops[data-v-2d48d2c9]{display:inline-flex;gap:6px}.form-row[data-v-2d48d2c9]{display:flex;flex-direction:column;gap:5px;margin-top:10px}.dialog[data-v-2d48d2c9]{width:420px}.empty[data-v-2d48d2c9]{text-align:center}@media (max-width: 720px){.admin-table td[data-v-2d48d2c9],.admin-table th[data-v-2d48d2c9]{white-space:normal}}.login-page[data-v-089817d7]{min-height:100vh;min-height:100dvh;background:var(--bg-app);display:flex;align-items:center;justify-content:center;padding:20px}.login-card[data-v-089817d7]{width:400px;max-width:100%;padding:30px 28px;display:flex;flex-direction:column;gap:12px;box-shadow:var(--shadow-float);border-radius:var(--radius-lg)}.login-brand[data-v-089817d7]{text-align:center;margin-bottom:6px}.brand-icon[data-v-089817d7]{width:46px;height:46px;margin:0 auto 10px;border-radius:12px;background:var(--accent);color:#fff;display:flex;align-items:center;justify-content:center}.login-title[data-v-089817d7]{font-size:18px;font-weight:600;color:var(--text-1)}.login-sub[data-v-089817d7]{font-size:12px;margin-top:4px;line-height:1.7}.form-error[data-v-089817d7]{color:var(--danger);font-size:12px}.login-btn[data-v-089817d7]{margin-top:2px;height:36px}.login-note[data-v-089817d7]{font-size:12px;text-align:center;line-height:1.7}.app[data-v-834d188d]{display:flex;height:100vh;height:100dvh;overflow:hidden;background:var(--bg-app)}.side[data-v-834d188d]{width:var(--side-w);flex:none;display:flex;flex-direction:column;background:var(--bg-page);border-right:1px solid var(--border)}.brand[data-v-834d188d]{display:flex;align-items:center;gap:9px;height:var(--topbar-h);flex:none;padding:0 16px;border-bottom:1px solid var(--border);cursor:pointer}.brand-mark[data-v-834d188d]{width:26px;height:26px;flex:none;border-radius:7px;background:var(--accent);color:#fff;display:flex;align-items:center;justify-content:center}.brand-name[data-v-834d188d]{font-size:14px;font-weight:600;letter-spacing:.3px;white-space:nowrap}.side-nav[data-v-834d188d]{flex:1;overflow-y:auto;padding:10px;display:flex;flex-direction:column;gap:2px}.nav-group[data-v-834d188d]{font-size:11px;color:var(--text-3);padding:12px 8px 4px;letter-spacing:2px;white-space:nowrap}.nav-btn[data-v-834d188d]{display:flex;align-items:center;gap:10px;height:36px;padding:0 10px;border:none;background:transparent;border-radius:var(--radius-sm);color:var(--text-2);cursor:pointer;font-size:13px;position:relative;text-align:left;transition:background .12s,color .12s}.nav-btn[data-v-834d188d]:hover{background:var(--bg-hover);color:var(--text-1)}.nav-btn.active[data-v-834d188d]{background:var(--accent-bg);color:var(--accent);font-weight:500}.nav-btn.active[data-v-834d188d]:before{content:"";position:absolute;left:0;top:8px;bottom:8px;width:3px;border-radius:2px;background:var(--accent)}.nav-label[data-v-834d188d]{white-space:nowrap}.nav-btn[data-v-834d188d]:after{content:attr(data-tip);position:absolute;left:50px;top:50%;transform:translateY(-50%);background:var(--text-1);color:#fff;font-size:12px;line-height:1.4;padding:2px 8px;border-radius:4px;white-space:nowrap;opacity:0;pointer-events:none;transition:opacity .15s;z-index:40}.side-foot[data-v-834d188d]{flex:none;display:flex;align-items:center;gap:8px;padding:10px 12px;border-top:1px solid var(--border)}.avatar[data-v-834d188d]{width:28px;height:28px;flex:none;border-radius:50%;background:var(--accent-bg);color:var(--accent);display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:600}.foot-name[data-v-834d188d]{flex:1;min-width:0;font-size:13px;color:var(--text-2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.main[data-v-834d188d]{flex:1;display:flex;flex-direction:column;min-width:0}.topbar[data-v-834d188d]{height:var(--topbar-h);flex:none;background:var(--bg-page);border-bottom:1px solid var(--border);display:flex;align-items:center;gap:12px;padding:0 20px;z-index:10}.title[data-v-834d188d]{font-size:15px;font-weight:600;white-space:nowrap}.topbar-actions[data-v-834d188d]{display:flex;align-items:center;gap:8px}.gsearch[data-v-834d188d]{position:relative;width:320px;max-width:38vw}.gs-icon[data-v-834d188d]{position:absolute;left:11px;top:50%;transform:translateY(-50%);color:var(--text-3)}.gs-input[data-v-834d188d]{height:32px;padding-left:31px;border-radius:999px;background:var(--bg-subtle);border-color:transparent}.gs-input[data-v-834d188d]:focus{background:var(--bg-page);border-color:var(--accent)}.gs-panel[data-v-834d188d]{position:absolute;top:38px;left:0;right:0;background:var(--bg-page);border:1px solid var(--border);border-radius:var(--radius-md);box-shadow:var(--shadow-float);z-index:50;max-height:420px;overflow:auto;padding:6px}.gs-group[data-v-834d188d]{font-size:12px;padding:6px 8px 2px}.gs-item[data-v-834d188d]{display:flex;align-items:center;gap:8px;padding:7px 8px;border-radius:var(--radius-sm);cursor:pointer}.gs-item[data-v-834d188d]:hover{background:var(--bg-hover)}.gs-text[data-v-834d188d],.gs-sub[data-v-834d188d]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.gs-text[data-v-834d188d]{font-size:13px}.gs-sub[data-v-834d188d]{font-size:12px}.gs-date[data-v-834d188d]{font-size:12px;flex:none}.gs-empty[data-v-834d188d]{padding:10px;font-size:12px;text-align:center}.week-tip[data-v-834d188d]{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--warn);color:var(--warn);background:var(--bg-page);border-radius:999px;height:28px;padding:0 10px;font-size:12px;cursor:pointer;white-space:nowrap}.week-tip[data-v-834d188d]:hover{background:#fdf4ec}.content[data-v-834d188d]{flex:1;overflow:auto}.content-inner[data-v-834d188d]{max-width:1280px;margin:0 auto;padding:20px 24px 48px}.toast-wrap[data-v-834d188d]{position:fixed;top:68px;right:20px;z-index:60;display:flex;flex-direction:column;gap:8px;align-items:flex-end;pointer-events:none}.toast[data-v-834d188d]{background:var(--bg-page);border:1px solid var(--border);box-shadow:var(--shadow-float);border-radius:var(--radius-sm);padding:8px 14px;font-size:13px;color:var(--text-1)}.toast-enter-from[data-v-834d188d],.toast-leave-to[data-v-834d188d]{opacity:0;transform:translateY(-4px)}.toast-enter-active[data-v-834d188d],.toast-leave-active[data-v-834d188d]{transition:all .15s ease}.mob-search-btn[data-v-834d188d]{display:none;width:32px;height:32px;border:none;background:transparent;border-radius:var(--radius-sm);color:var(--text-2);cursor:pointer;align-items:center;justify-content:center}.tabbar[data-v-834d188d]{display:none;position:fixed;left:0;right:0;bottom:0;z-index:30;background:var(--bg-page);border-top:1px solid var(--border);padding-bottom:env(safe-area-inset-bottom)}.tab-btn[data-v-834d188d]{flex:1;height:50px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;border:none;background:transparent;color:var(--text-3);cursor:pointer;font-size:11px}.tab-btn.active[data-v-834d188d]{color:var(--accent);font-weight:500}.sheet-mask[data-v-834d188d]{position:fixed;top:0;right:0;bottom:0;left:0;z-index:70;background:#1d212966}.more-sheet[data-v-834d188d]{position:absolute;left:0;right:0;bottom:0;background:var(--bg-page);border-radius:16px 16px 0 0;padding:10px 14px calc(14px + env(safe-area-inset-bottom));display:flex;flex-direction:column}.sheet-user[data-v-834d188d]{font-size:12px;color:var(--text-3);padding:4px 6px 10px;border-bottom:1px solid var(--border);margin-bottom:4px}.sheet-row[data-v-834d188d]{display:flex;align-items:center;gap:12px;height:46px;border:none;background:transparent;color:var(--text-1);font-size:14px;cursor:pointer;border-radius:var(--radius-sm);text-align:left;padding:0 6px}.sheet-row[data-v-834d188d]:hover,.sheet-row[data-v-834d188d]:active{background:var(--bg-hover)}.sheet-name[data-v-834d188d]{flex:1}.sheet-go[data-v-834d188d]{color:var(--text-3)}.sheet-divider[data-v-834d188d]{height:1px;background:var(--border);margin:6px 0}.sheet-danger[data-v-834d188d]{color:var(--danger)}.msw-mask[data-v-834d188d]{position:fixed;top:0;right:0;bottom:0;left:0;z-index:70;background:var(--bg-page)}.msw[data-v-834d188d]{height:100%;display:flex;flex-direction:column}.msw-bar[data-v-834d188d]{height:52px;flex:none;display:flex;align-items:center;gap:8px;padding:0 12px;border-bottom:1px solid var(--border)}.msw-icon[data-v-834d188d]{color:var(--text-3)}.msw-input[data-v-834d188d]{flex:1;height:34px;border:none;outline:none;font-size:14px;background:transparent;color:var(--text-1)}.msw-results[data-v-834d188d]{flex:1;overflow:auto;padding:10px 4px calc(20px + env(safe-area-inset-bottom))}.msw-item[data-v-834d188d]{display:flex;align-items:center;gap:8px;padding:10px;border-radius:var(--radius-sm);cursor:pointer}.msw-item[data-v-834d188d]:hover,.msw-item[data-v-834d188d]:active{background:var(--bg-hover)}@media (max-width: 1000px) and (min-width: 721px){.side[data-v-834d188d]{width:var(--side-w-collapsed)}.brand[data-v-834d188d]{justify-content:center;padding:0}.brand-name[data-v-834d188d],.nav-label[data-v-834d188d],.nav-group[data-v-834d188d]{display:none}.nav-btn[data-v-834d188d]{justify-content:center;padding:0;width:40px;align-self:center}.nav-btn.active[data-v-834d188d]:before{display:none}.side-foot[data-v-834d188d]{flex-direction:column;gap:6px}.foot-name[data-v-834d188d]{display:none}}@media (max-width: 720px){.app[data-v-834d188d]{display:block;height:100dvh}.side[data-v-834d188d]{display:none}.main[data-v-834d188d]{display:flex;flex-direction:column;height:100dvh;min-width:0}.topbar[data-v-834d188d]{height:50px;min-height:50px;padding:0 10px;gap:6px}.title[data-v-834d188d]{font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.gsearch[data-v-834d188d],.gsearch .gs-panel[data-v-834d188d]{display:none}.mob-search-btn[data-v-834d188d]{display:flex}.topbar-actions[data-v-834d188d]{margin-left:auto;gap:6px}.week-tip[data-v-834d188d]{height:28px;max-width:118px;padding:0 8px;white-space:nowrap;overflow:hidden}.topbar-actions .btn[data-v-834d188d]{padding:0 10px;height:32px}.topbar-actions .btn .num[data-v-834d188d]{font-size:12px}.tabbar[data-v-834d188d]{display:flex}.content[data-v-834d188d]{flex:1;min-height:0}.content-inner[data-v-834d188d]{max-width:none;padding:12px 12px calc(70px + env(safe-area-inset-bottom))}.toast-wrap[data-v-834d188d]{top:6px;right:10px;left:10px;align-items:flex-start}}:root{--bg-app: #F5F6F8;--bg-page: #FFFFFF;--bg-subtle: #F7F8FA;--bg-hover: #F2F3F5;--text-1: #1D2129;--text-2: #4E5969;--text-3: #86909C;--border: #E8EAEE;--border-strong: #DCDFE4;--accent: #3370FF;--accent-deep: #2B5FD9;--accent-bg: #EEF4FF;--ok: #23A757;--warn: #E8842C;--danger: #E5484D;--dot-empty: #C9CDD4;--radius-sm: 6px;--radius-md: 10px;--radius-lg: 14px;--shadow-card: 0 1px 2px rgba(16, 24, 40, .04);--shadow-float: 0 12px 32px -8px rgba(16, 24, 40, .14), 0 4px 12px rgba(16, 24, 40, .06);--side-w: 216px;--side-w-collapsed: 60px;--topbar-h: 56px}*{box-sizing:border-box}html,body{margin:0;padding:0}body{background:var(--bg-app);color:var(--text-1);font-family:-apple-system,PingFang SC,Microsoft YaHei,system-ui,sans-serif;font-size:13px;line-height:1.6;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}button,input,select,textarea{font:inherit;color:inherit}.num{font-variant-numeric:tabular-nums}.flex1{flex:1;min-width:0}.muted{color:var(--text-3)}.muted2{color:var(--text-2)}:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:0 14px;height:32px;border-radius:var(--radius-sm);border:1px solid var(--border-strong);background:var(--bg-page);color:var(--text-1);cursor:pointer;white-space:nowrap;font-weight:500;transition:background .12s,border-color .12s,color .12s}.btn:hover{background:var(--bg-hover);border-color:var(--border-strong)}.btn:disabled{opacity:.45;cursor:not-allowed}.btn-primary{background:var(--accent);border-color:var(--accent);color:#fff}.btn-primary:hover{background:var(--accent-deep);border-color:var(--accent-deep)}.btn-danger{color:var(--danger);border-color:var(--danger);background:var(--bg-page)}.btn-danger:hover{background:#fdf0f0}.btn-danger-solid{background:var(--danger);border-color:var(--danger);color:#fff}.btn-danger-solid:hover{background:#d13a3f}.btn-sm{height:28px;padding:0 12px;font-size:12px}.btn-xs{height:24px;padding:0 10px;font-size:12px}.icon-btn{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;flex:none;border:none;background:transparent;border-radius:var(--radius-sm);color:var(--text-3);cursor:pointer;transition:background .12s,color .12s}.icon-btn:hover{background:var(--bg-hover);color:var(--text-1)}.icon-btn.active{color:var(--accent)}.icon-btn.active-warn{color:var(--warn)}.input,.select,.textarea{height:32px;padding:0 10px;border:1px solid var(--border-strong);border-radius:var(--radius-sm);background:var(--bg-page);outline:none;width:100%;transition:border-color .12s,box-shadow .12s}.textarea{height:auto;min-height:64px;padding:8px 10px;resize:vertical;line-height:1.7}.input:focus,.select:focus,.textarea:focus{border-color:var(--accent);box-shadow:0 0 0 3px #3370ff1a}.input::placeholder,.textarea::placeholder{color:var(--text-3)}.input.invalid,.input.invalid:focus{border-color:var(--danger);box-shadow:0 0 0 3px #e5484d1a}.card{border:1px solid var(--border);border-radius:var(--radius-md);background:var(--bg-page);box-shadow:var(--shadow-card)}.section{padding:16px 18px}.section-title,.sec-title{font-weight:600;margin-bottom:12px;font-size:13px;color:var(--text-1)}.sec{padding:16px 18px}.empty{text-align:center;padding:28px 0}.tag{display:inline-block;padding:0 8px;height:22px;line-height:20px;border-radius:4px;font-size:12px;background:var(--bg-subtle);color:var(--text-2);border:1px solid var(--border);white-space:nowrap}.dot{width:6px;height:6px;border-radius:50%;display:inline-block;flex:none}.dot.normal{background:var(--ok)}.dot.late,.dot.early,.dot.incomplete{background:var(--warn)}.dot.absent{background:var(--danger)}.dot.none,.dot.leave{background:var(--dot-empty)}.dot.rest{background:var(--border)}.amt-income{color:var(--ok)}.amt-expense{color:var(--text-1)}.amt-warn{color:var(--warn)}.seg{display:inline-flex;border:1px solid var(--border-strong);border-radius:var(--radius-sm);overflow:hidden;background:var(--bg-page)}.seg-btn{border:none;background:var(--bg-page);color:var(--text-2);cursor:pointer;font-size:12px;height:28px;padding:0 12px;border-right:1px solid var(--border);transition:background .12s,color .12s}.seg-btn:last-child{border-right:none}.seg-btn:hover{background:var(--bg-hover)}.seg-btn.active{background:var(--accent-bg);color:var(--accent);font-weight:500}.toggle-btn{height:32px;width:100%;border:1px solid var(--border-strong);background:var(--bg-page);border-radius:var(--radius-sm);cursor:pointer;font-size:13px;color:var(--text-2);transition:all .12s}.toggle-btn:hover{background:var(--bg-hover)}.toggle-btn.on{color:var(--accent);border-color:var(--accent);background:var(--accent-bg)}.toggle-btn.onwarn{color:var(--warn);border-color:var(--warn);background:#fdf4ec}.tx-table,.cred-table,.admin-table{width:100%;border-collapse:collapse;font-size:13px}.tx-table th,.cred-table th,.admin-table th{text-align:left;font-weight:500;color:var(--text-3);font-size:12px;background:var(--bg-subtle);padding:9px 14px;border-bottom:1px solid var(--border);white-space:nowrap}.tx-table td,.cred-table td,.admin-table td{padding:10px 14px;border-bottom:1px solid var(--border);vertical-align:top;word-break:break-all}.tx-table tbody tr:hover,.cred-table tbody tr:hover,.admin-table tbody tr:hover{background:#fafbfc}.tx-table tbody tr:last-child td,.cred-table tbody tr:last-child td,.admin-table tbody tr:last-child td{border-bottom:none}.mask{position:fixed;top:0;right:0;bottom:0;left:0;background:#1d212973;display:flex;align-items:center;justify-content:center;z-index:90;padding:16px}.dialog{width:480px;max-width:calc(100vw - 32px);max-height:86vh;max-height:86dvh;overflow:auto;background:var(--bg-page);border-radius:var(--radius-lg);box-shadow:var(--shadow-float);display:flex;flex-direction:column}.dialog-head{display:flex;align-items:flex-start;justify-content:space-between;padding:16px 20px 12px;border-bottom:1px solid var(--border);flex:none}.dialog-title{font-size:14px;font-weight:600;color:var(--text-1)}.dialog-sub{font-size:12px;margin-top:2px;color:var(--text-3)}.dialog-body{padding:16px 20px;overflow:auto}.dialog-btns{display:flex;justify-content:flex-end;gap:8px;padding:12px 20px 16px;border-top:1px solid var(--border);flex:none}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px}.form-grid .field.span2,.field.span2{grid-column:span 2}.field label,.form-row label{display:block;font-size:12px;color:var(--text-2);margin-bottom:4px}.form-error{color:var(--danger);font-size:12px;margin-top:8px}.stat-card{padding:14px 16px}.stat-num{font-size:22px;font-weight:600;margin-top:2px;letter-spacing:-.2px}.bar-row{display:flex;align-items:center;gap:10px;margin:7px 0}.bar-label{flex:none;color:var(--text-2);font-size:12px;text-align:right}.bar-track{flex:1;height:8px;border-radius:4px;background:var(--bg-subtle);overflow:hidden}.bar-fill{display:block;height:100%;background:var(--accent);border-radius:4px}.bar-num{font-size:12px;flex:none;color:var(--text-3)}.icon{display:inline-flex;align-items:center;justify-content:center;flex:none}.icon svg{width:100%;height:100%;display:block}@media (max-width: 720px){input,select,textarea{font-size:16px!important}input[type=checkbox]{font-size:initial}}@media (max-width: 720px){.card{border-radius:12px}input.input,select.select,textarea.textarea{width:100%;box-sizing:border-box}.btn{touch-action:manipulation}.dialog{width:calc(100vw - 20px)!important;max-width:calc(100vw - 20px)!important;max-height:88vh;max-height:88dvh}.dialog-head{padding:14px 16px 10px!important}.dialog-body{padding:14px 16px!important}.dialog-btns{padding:10px 16px 14px!important}.dialog-btns .btn{flex:1}.form-grid{grid-template-columns:1fr!important}.drawer{top:auto!important;left:0!important;width:100%!important;height:min(86vh,86dvh)!important;border-left:none!important;border-top:1px solid var(--border);border-radius:14px 14px 0 0!important;box-shadow:0 -8px 24px #1018281a}.drawer-enter-active,.drawer-leave-active{transition:transform .2s ease,opacity .2s ease}.drawer-enter-from,.drawer-leave-to{transform:translateY(28px);opacity:0}.drawer-head{border-radius:14px 14px 0 0}.drawer-body{padding:12px!important}.tx-table{min-width:0!important}.tx-table thead{display:none!important}.tx-table tr{display:block;padding:10px 12px;border-bottom:1px solid var(--border);background:transparent}.tx-table tbody tr:last-child{border-bottom:none}.tx-table td{display:flex!important;align-items:center;justify-content:space-between;gap:12px;padding:3px 0!important;border:none!important;white-space:normal!important}.tx-table td:before{content:attr(data-label);color:var(--text-3);font-size:12px;flex:none}.tx-table td.ops-cell:before{content:none}.tx-table td.ops-cell{justify-content:flex-end}.tx-table td.empty{justify-content:center}.tx-table td.empty:before{content:none!important}.table-card,.tx-card{overflow-x:auto}.cred-table{min-width:560px!important}.th-ops{width:auto!important}.vault-toolbar{flex-wrap:wrap;row-gap:8px}.vault-toolbar .search-wrap{width:100%;max-width:none!important}.vault-toolbar .flex1{display:none}.vault-toolbar .btn{flex:none}.cards{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}.stat-card{padding:12px 14px!important}.stat-num{font-size:19px!important}.section,.sec{padding:12px!important}.rule-grid,.two-col{grid-template-columns:1fr!important}.cal-toolbar{margin-bottom:8px}.cal-cell{min-height:54px!important;padding:4px 5px!important}.cal-marks{margin-top:3px!important;height:12px!important;gap:3px!important}} diff --git a/intern-log/dist/assets/index-CtHE6m7N.js b/intern-log/dist/assets/index-CtHE6m7N.js new file mode 100644 index 0000000..7c8a378 --- /dev/null +++ b/intern-log/dist/assets/index-CtHE6m7N.js @@ -0,0 +1,27 @@ +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const c of i.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&r(c)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();/** +* @vue/shared v3.5.44 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function Wi(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const vt={},Ms=[],Pn=()=>{},qu=()=>!1,ca=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),da=e=>e.startsWith("onUpdate:"),Pt=Object.assign,Gi=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},af=Object.prototype.hasOwnProperty,dt=(e,t)=>af.call(e,t),He=Array.isArray,as=e=>Gr(e)==="[object Map]",Ls=e=>Gr(e)==="[object Set]",Xl=e=>Gr(e)==="[object Date]",Ye=e=>typeof e=="function",Ct=e=>typeof e=="string",On=e=>typeof e=="symbol",ft=e=>e!==null&&typeof e=="object",Hu=e=>(ft(e)||Ye(e))&&Ye(e.then)&&Ye(e.catch),zu=Object.prototype.toString,Gr=e=>zu.call(e),lf=e=>Gr(e).slice(8,-1),Wu=e=>Gr(e)==="[object Object]",Yi=e=>Ct(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Sr=Wi(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),fa=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},uf=/-\w/g,yn=fa(e=>e.replace(uf,t=>t.slice(1).toUpperCase())),cf=/\B([A-Z])/g,vs=fa(e=>e.replace(cf,"-$1").toLowerCase()),Gu=fa(e=>e.charAt(0).toUpperCase()+e.slice(1)),ri=fa(e=>e?`on${Gu(e)}`:""),An=(e,t)=>!Object.is(e,t),Io=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},pa=e=>{const t=parseFloat(e);return isNaN(t)?e:t},df=e=>{const t=Ct(e)?Number(e):NaN;return isNaN(t)?e:t};let Ql;const va=()=>Ql||(Ql=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Un(e){if(He(e)){const t={};for(let n=0;nn.startsWith("/*")?"":n).split(ff).forEach(n=>{if(n){const r=n.split(pf);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function Xe(e){let t="";if(Ct(e))t=e;else if(He(e))for(let n=0;nls(n,t))}const Xu=e=>!!(e&&e.__v_isRef===!0),W=e=>Ct(e)?e:e==null?"":He(e)||ft(e)&&(e.toString===zu||!Ye(e.toString))?Xu(e)?W(e.value):JSON.stringify(e,Qu,2):String(e),Qu=(e,t)=>Xu(t)?Qu(e,t.value):as(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,o],i)=>(n[oi(r,i)+" =>"]=o,n),{})}:Ls(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>oi(n))}:On(t)?oi(t):ft(t)&&!He(t)&&!Wu(t)?String(t):t,oi=(e,t="")=>{var n;return On(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** +* @vue/reactivity v3.5.44 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let Rt;class _f{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&Rt&&(Rt.active?(this.parent=Rt,this.index=(Rt.scopes||(Rt.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes){const r=this.scopes.slice();for(t=0,n=r.length;t0&&--this._on===0){if(Rt===this)Rt=this.prevScope;else{let t=Rt;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let n,r;for(n=0,r=this.effects.length;n0)return;if(Tr){let t=Tr;for(Tr=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;Er;){let t=Er;for(Er=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(r){e||(e=r)}t=n}}if(e)throw e}function nc(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function sc(e){let t,n=e.depsTail,r=n;for(;r;){const o=r.prevDep;r.version===-1?(r===n&&(n=o),Qi(r),xf(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=o}e.deps=t,e.depsTail=n}function _i(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(rc(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function rc(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===jr)||(e.globalVersion=jr,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!_i(e))))return;e.flags|=2;const t=e.dep,n=yt,r=gn;yt=e,gn=!0;try{nc(e);const o=e.fn(e._value);(t.version===0||An(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{yt=n,gn=r,sc(e),e.flags&=-3}}function Qi(e,t=!1){const{dep:n,prevSub:r,nextSub:o}=e;if(r&&(r.nextSub=o,e.prevSub=void 0),o&&(o.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let i=n.computed.deps;i;i=i.nextDep)Qi(i,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function xf(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let gn=!0;const oc=[];function Mn(){oc.push(gn),gn=!1}function In(){const e=oc.pop();gn=e===void 0?!0:e}function tu(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=yt;yt=void 0;try{t()}finally{yt=n}}}let jr=0;class Cf{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Zi{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!yt||!gn||yt===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==yt)n=this.activeLink=new Cf(yt,this),yt.deps?(n.prevDep=yt.depsTail,yt.depsTail.nextDep=n,yt.depsTail=n):yt.deps=yt.depsTail=n,ac(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const r=n.nextDep;r.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=r),n.prevDep=yt.depsTail,n.nextDep=void 0,yt.depsTail.nextDep=n,yt.depsTail=n,yt.deps===n&&(yt.deps=r)}return n}trigger(t){this.version++,jr++,this.notify(t)}notify(t){Ji();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Xi()}}}function ac(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let r=t.deps;r;r=r.nextDep)ac(r)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const ki=new WeakMap,js=Symbol(""),xi=Symbol(""),Dr=Symbol("");function Ht(e,t,n){if(gn&&yt){let r=ki.get(e);r||ki.set(e,r=new Map);let o=r.get(n);o||(r.set(n,o=new Zi),o.map=r,o.key=n),o.track()}}function Vn(e,t,n,r,o,i){const c=ki.get(e);if(!c){jr++;return}const f=v=>{v&&v.trigger()};if(Ji(),t==="clear")c.forEach(f);else{const v=He(e),b=v&&Yi(n);if(v&&n==="length"){const y=Number(r);c.forEach((_,E)=>{(E==="length"||E===Dr||!On(E)&&E>=y)&&f(_)})}else switch((n!==void 0||c.has(void 0))&&f(c.get(n)),b&&f(c.get(Dr)),t){case"add":v?b&&f(c.get("length")):(f(c.get(js)),as(e)&&f(c.get(xi)));break;case"delete":v||(f(c.get(js)),as(e)&&f(c.get(xi)));break;case"set":as(e)&&f(c.get(js));break}}Xi()}function Gs(e){const t=ut(e);return t===e||(Ht(t,"iterate",Dr),dn(e))?t:jn(e)?is(e)?t.map(n=>us(fn(n))):t.map(us):t.map(fn)}function ma(e){return Ht(e=ut(e),"iterate",Dr),e}function Sn(e,t){return jn(e)?us(is(e)?fn(t):t):fn(t)}const $f={__proto__:null,[Symbol.iterator](){return ii(this,Symbol.iterator,e=>Sn(this,e))},concat(...e){return Gs(this).concat(...e.map(t=>He(t)?Gs(t):t))},entries(){return ii(this,"entries",e=>(e[1]=Sn(this,e[1]),e))},every(e,t){return Rn(this,"every",e,t,void 0,arguments)},filter(e,t){return Rn(this,"filter",e,t,n=>n.map(r=>Sn(this,r)),arguments)},find(e,t){return Rn(this,"find",e,t,n=>Sn(this,n),arguments)},findIndex(e,t){return Rn(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Rn(this,"findLast",e,t,n=>Sn(this,n),arguments)},findLastIndex(e,t){return Rn(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Rn(this,"forEach",e,t,void 0,arguments)},includes(...e){return li(this,"includes",e)},indexOf(...e){return li(this,"indexOf",e)},join(e){return Gs(this).join(e)},lastIndexOf(...e){return li(this,"lastIndexOf",e)},map(e,t){return Rn(this,"map",e,t,void 0,arguments)},pop(){return wr(this,"pop")},push(...e){return wr(this,"push",e)},reduce(e,...t){return su(this,"reduce",e,t)},reduceRight(e,...t){return su(this,"reduceRight",e,t)},shift(){return wr(this,"shift")},some(e,t){return Rn(this,"some",e,t,void 0,arguments)},splice(...e){return wr(this,"splice",e)},toReversed(){return Gs(this).toReversed()},toSorted(e){return Gs(this).toSorted(e)},toSpliced(...e){return Gs(this).toSpliced(...e)},unshift(...e){return wr(this,"unshift",e)},values(){return ii(this,"values",e=>Sn(this,e))}};function ii(e,t,n){const r=ma(e),o=r[t],i=o.call(r);if(r!==e&&!dn(e)){if(i[Symbol.toStringTag]==="Array Iterator"){const c=Object.create(Object.getPrototypeOf(i));return c.next=()=>nu(i.next(),n),o!==ic[t]&&Object.defineProperties(c,{return:{get(){const f=i.return;return typeof f=="function"?f.bind(i):f}},throw:{get(){const f=i.throw;return typeof f=="function"?f.bind(i):f}}}),c}i._next=i.next,i.next=()=>nu(i._next(),n)}return i}function nu(e,t){return e.done||(e.value=t(e.value)),e}const ic=Array.prototype;function Rn(e,t,n,r,o,i){const c=ma(e),f=c!==e&&!dn(e),v=c[t];if(v!==ic[t]){const _=v.apply(e,i);return f?fn(_):_}let b=n;c!==e&&(f?b=function(_,E){return n.call(this,Sn(e,_),E,e)}:n.length>2&&(b=function(_,E){return n.call(this,_,E,e)}));const y=v.call(c,b,r);return f&&o?o(y):y}function su(e,t,n,r){const o=ma(e),i=o!==e&&!dn(e);let c=n,f=!1;o!==e&&(i?(f=r.length===0,c=function(b,y,_){return f&&(f=!1,b=Sn(e,b)),n.call(this,b,Sn(e,y),_,e)}):n.length>3&&(c=function(b,y,_){return n.call(this,b,y,_,e)}));const v=o[t](c,...r);return f?Sn(e,v):v}function li(e,t,n){const r=ut(e);Ht(r,"iterate",Dr);const o=r[t](...n);return(o===-1||o===!1)&&sl(n[0])?(n[0]=ut(n[0]),r[t](...n)):o}function wr(e,t,n=[]){Mn(),Ji();const r=ut(e)[t].apply(e,n);return Xi(),In(),r}const Sf=Wi("__proto__,__v_isRef,__isVue"),lc=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(On));function Ef(e){On(e)||(e=String(e));const t=ut(this);return Ht(t,"has",e),t.hasOwnProperty(e)}class uc{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,r){if(n==="__v_skip")return t.__v_skip;const o=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!o;if(n==="__v_isReadonly")return o;if(n==="__v_isShallow")return i;if(n==="__v_raw")return r===(o?i?Kf:pc:i?fc:dc).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const c=He(t);if(!o){let v;if(c&&(v=$f[n]))return v;if(n==="hasOwnProperty")return Ef}const f=Reflect.get(t,n,Gt(t)?t:r);if((On(n)?lc.has(n):Sf(n))||(o||Ht(t,"get",n),i))return f;if(Gt(f)){const v=c&&Yi(n)?f:f.value;return o&&ft(v)?$i(v):v}return ft(f)?o?$i(f):tl(f):f}}class cc extends uc{constructor(t=!1){super(!1,t)}set(t,n,r,o){let i=t[n];const c=He(t)&&Yi(n);if(!this._isShallow){const b=jn(i);if(!dn(r)&&!jn(r)&&(i=ut(i),r=ut(r)),!c&&Gt(i)&&!Gt(r))return b||(i.value=r),!0}const f=c?Number(n)e,So=e=>Reflect.getPrototypeOf(e);function Mf(e,t,n){return function(...r){const o=this.__v_raw,i=ut(o),c=as(i),f=e==="entries"||e===Symbol.iterator&&c,v=e==="keys"&&c,b=o[e](...r),y=n?Ci:t?us:fn;return!t&&Ht(i,"iterate",v?xi:js),Pt(Object.create(b),{next(){const{value:_,done:E}=b.next();return E?{value:_,done:E}:{value:f?[y(_[0]),y(_[1])]:y(_),done:E}}})}}function Eo(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function If(e,t){const n={get(o){const i=this.__v_raw,c=ut(i),f=ut(o);e||(An(o,f)&&Ht(c,"get",o),Ht(c,"get",f));const{has:v}=So(c),b=t?Ci:e?us:fn;if(v.call(c,o))return b(i.get(o));if(v.call(c,f))return b(i.get(f));i!==c&&i.get(o)},get size(){const o=this.__v_raw;return!e&&Ht(ut(o),"iterate",js),o.size},has(o){const i=this.__v_raw,c=ut(i),f=ut(o);return e||(An(o,f)&&Ht(c,"has",o),Ht(c,"has",f)),o===f?i.has(o):i.has(o)||i.has(f)},forEach(o,i){const c=this,f=c.__v_raw,v=ut(f),b=t?Ci:e?us:fn;return!e&&Ht(v,"iterate",js),f.forEach((y,_)=>o.call(i,b(y),b(_),c))}};return Pt(n,e?{add:Eo("add"),set:Eo("set"),delete:Eo("delete"),clear:Eo("clear")}:{add(o){const i=ut(this),c=So(i),f=ut(o),v=!t&&!dn(o)&&!jn(o)?f:o;return c.has.call(i,v)||An(o,v)&&c.has.call(i,o)||An(f,v)&&c.has.call(i,f)||(i.add(v),Vn(i,"add",v,v)),this},set(o,i){!t&&!dn(i)&&!jn(i)&&(i=ut(i));const c=ut(this),{has:f,get:v}=So(c);let b=f.call(c,o);b||(o=ut(o),b=f.call(c,o));const y=v.call(c,o);return c.set(o,i),b?An(i,y)&&Vn(c,"set",o,i):Vn(c,"add",o,i),this},delete(o){const i=ut(this),{has:c,get:f}=So(i);let v=c.call(i,o);v||(o=ut(o),v=c.call(i,o)),f&&f.call(i,o);const b=i.delete(o);return v&&Vn(i,"delete",o,void 0),b},clear(){const o=ut(this),i=o.size!==0,c=o.clear();return i&&Vn(o,"clear",void 0,void 0),c}}),["keys","values","entries",Symbol.iterator].forEach(o=>{n[o]=Mf(o,e,t)}),n}function el(e,t){const n=If(e,t);return(r,o,i)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_isShallow"?t:o==="__v_raw"?r:Reflect.get(dt(n,o)&&o in r?n:r,o,i)}const jf={get:el(!1,!1)},Df={get:el(!1,!0)},Lf={get:el(!0,!1)};const dc=new WeakMap,fc=new WeakMap,pc=new WeakMap,Kf=new WeakMap;function Rf(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function tl(e){return jn(e)?e:nl(e,!1,Af,jf,dc)}function Ff(e){return nl(e,!1,Of,Df,fc)}function $i(e){return nl(e,!0,Pf,Lf,pc)}function nl(e,t,n,r,o){if(!ft(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const i=o.get(e);if(i)return i;const c=Rf(lf(e));if(c===0)return e;const f=new Proxy(e,c===2?r:n);return o.set(e,f),f}function is(e){return jn(e)?is(e.__v_raw):!!(e&&e.__v_isReactive)}function jn(e){return!!(e&&e.__v_isReadonly)}function dn(e){return!!(e&&e.__v_isShallow)}function sl(e){return e?!!e.__v_raw:!1}function ut(e){const t=e&&e.__v_raw;return t?ut(t):e}function Nf(e){return!dt(e,"__v_skip")&&Object.isExtensible(e)&&Yu(e,"__v_skip",!0),e}const fn=e=>ft(e)?tl(e):e,us=e=>ft(e)?$i(e):e;function Gt(e){return e?e.__v_isRef===!0:!1}function O(e){return Vf(e,!1)}function Vf(e,t){return Gt(e)?e:new Bf(e,t)}class Bf{constructor(t,n){this.dep=new Zi,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:ut(t),this._value=n?t:fn(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,r=this.__v_isShallow||dn(t)||jn(t);t=r?t:ut(t),An(t,n)&&(this._rawValue=t,this._value=r?t:fn(t),this.dep.trigger())}}function on(e){return Gt(e)?e.value:e}const Uf={get:(e,t,n)=>t==="__v_raw"?e:on(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const o=e[t];return Gt(o)&&!Gt(n)?(o.value=n,!0):Reflect.set(e,t,n,r)}};function vc(e){return is(e)?e:new Proxy(e,Uf)}class qf{constructor(t,n,r){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Zi(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=jr-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&yt!==this)return tc(this,!0),!0}get value(){const t=this.dep.track();return rc(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Hf(e,t,n=!1){let r,o;return Ye(e)?r=e:(r=e.get,o=e.set),new qf(r,o,n)}const To={},Uo=new WeakMap;let Es;function zf(e,t=!1,n=Es){if(n){let r=Uo.get(n);r||Uo.set(n,r=[]),r.push(e)}}function Wf(e,t,n=vt){const{immediate:r,deep:o,once:i,scheduler:c,augmentJob:f,call:v}=n,b=T=>o?T:dn(T)||o===!1||o===0?Bn(T,1):Bn(T);let y,_,E,C,M=!1,J=!1;if(Gt(e)?(_=()=>e.value,M=dn(e)):is(e)?(_=()=>b(e),M=!0):He(e)?(J=!0,M=e.some(T=>is(T)||dn(T)),_=()=>e.map(T=>{if(Gt(T))return T.value;if(is(T))return b(T);if(Ye(T))return v?v(T,2):T()})):Ye(e)?t?_=v?()=>v(e,2):e:_=()=>{if(E){Mn();try{E()}finally{In()}}const T=Es;Es=y;try{return v?v(e,3,[C]):e(C)}finally{Es=T}}:_=Pn,t&&o){const T=_,q=o===!0?1/0:o;_=()=>Bn(T(),q)}const oe=kf(),ue=()=>{y.stop(),oe&&oe.active&&Gi(oe.effects,y)};if(i&&t){const T=t;t=(...q)=>{try{return T(...q)}finally{ue()}}}let ce=J?new Array(e.length).fill(To):To;const U=T=>{if(!(!(y.flags&1)||!y.dirty&&!T))if(t){const q=y.run();if(T||o||M||(J?q.some((Z,G)=>An(Z,ce[G])):An(q,ce))){const Z=Es;Mn();try{E&&E(),Es=y;const G=[q,ce===To?void 0:J&&ce[0]===To?[]:ce,C];ce=q,v?v(t,3,G):t(...G)}finally{Es=Z,In()}}}else y.run()};return f&&f(U),y=new Zu(_),y.scheduler=c?()=>c(U,!1):U,C=T=>zf(T,!1,y),E=y.onStop=()=>{const T=Uo.get(y);if(T){if(v)v(T,4);else for(const q of T)q();Uo.delete(y)}},t?r?U(!0):ce=y.run():c?c(U.bind(null,!0),!0):y.run(),ue.pause=y.pause.bind(y),ue.resume=y.resume.bind(y),ue.stop=ue,ue}function Bn(e,t=1/0,n){if(t<=0||!ft(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Gt(e))Bn(e.value,t,n);else if(He(e))for(let r=0;r{Bn(r,t,n)});else if(Wu(e)){for(const r in e)Bn(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&Bn(e[r],t,n)}return e}/** +* @vue/runtime-core v3.5.44 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function Yr(e,t,n,r){try{return r?e(...r):e()}catch(o){ha(o,t,n)}}function pn(e,t,n,r){if(Ye(e)){const o=Yr(e,t,n,r);return o&&Hu(o)&&o.catch(i=>{ha(i,t,n)}),o}if(He(e)){const o=[];for(let i=0;i>>1,o=Zt[r],i=Lr(o);i=Lr(n)?Zt.push(e):Zt.splice(Yf(t),0,e),e.flags|=1,hc()}}function hc(){qo||(qo=mc.then(bc))}function Jf(e){if(!He(e))rs&&e.id===-1?rs.splice(Ys+1,0,e):e.flags&1||(En.push(e),e.flags|=1);else for(let t=0;t=t))continue;Zt.splice(r,1),r=e?r-1:hn,o.flags&4&&(o.flags&=-2),o(),o.flags&4||(o.flags&=-2)}}}function gc(e,t,n=0){if(En.length){let r=En,o=0;if(t){r=[];for(let c=0;cLr(c)-Lr(f));if(En.length=o,rs){for(let c=0;ce.id==null?e.flags&2?-1:1/0:e.id;function bc(e){try{for(hn=0;hn{r._d&&Yo(-1);const i=Ho(t),c=Ds.length;let f;try{f=e(...o)}finally{for(let v=Ds.length;v>c;v--)Gc();Ho(i),r._d&&Yo(1)}return f};return r._n=!0,r._c=!0,r._d=!0,r}function Oe(e,t){if(cn===null)return e;const n=ka(cn),r=e.dirs||(e.dirs=[]);for(let o=0;o1)return n&&Ye(t)?t.call(r&&r.proxy):t}}const Zf=Symbol.for("v-scx"),ep=()=>jo(Zf);function gt(e,t,n){return _c(e,t,n)}function _c(e,t,n=vt){const{immediate:r,deep:o,flush:i,once:c}=n,f=Pt({},n),v=t&&r||!t&&i!=="post";let b;if(Br){if(i==="sync"){const C=ep();b=C.__watcherHandles||(C.__watcherHandles=[])}else if(!v){const C=()=>{};return C.stop=Pn,C.resume=Pn,C.pause=Pn,C}}const y=en;f.call=(C,M,J)=>pn(C,y,M,J);let _=!1;i==="post"?f.scheduler=C=>{C.i=y,Qt(C,y&&y.suspense)}:i!=="sync"&&(_=!0,f.scheduler=(C,M)=>{M?C():rl(C)}),f.augmentJob=C=>{t&&(C.flags|=4),_&&(C.flags|=2,y&&(C.id=y.uid,C.i=y))};const E=Wf(e,t,f);return Br&&(b?b.push(E):v&&E()),E}function tp(e,t,n){const r=this.proxy,o=Ct(e)?e.includes(".")?kc(r,e):()=>r[e]:e.bind(r,r);let i;Ye(t)?i=t:(i=t.handler,n=t);const c=Jr(this),f=_c(o,i.bind(r),n);return c(),f}function kc(e,t){const n=t.split(".");return()=>{let r=e;for(let o=0;oe.__isTeleport,As=e=>e&&(e.disabled||e.disabled===""),np=e=>e&&(e.defer||e.defer===""),ru=e=>typeof SVGElement<"u"&&e instanceof SVGElement,ou=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Si=(e,t)=>{const n=e&&e.to;return Ct(n)?t?t(n):null:n},sp={name:"Teleport",__isTeleport:!0,process(e,t,n,r,o,i,c,f,v,b){const{mc:y,pc:_,pbc:E,o:{insert:C,querySelector:M,createText:J,createComment:oe,parentNode:ue}}=b,ce=As(t.props);let{dynamicChildren:U}=t;const T=(G,re,I)=>{G.shapeFlag&16&&y(G.children,re,I,o,i,c,f,v)},q=(G=t)=>{const re=As(G.props),I=G.target=Si(G.props,M),S=Ei(I,G,J,C);I&&(c!=="svg"&&ru(I)?c="svg":c!=="mathml"&&ou(I)&&(c="mathml"),o&&o.isCE&&(o.ce._teleportTargets||(o.ce._teleportTargets=new Set)).add(I),re||(T(G,I,S),xr(G,!1)))},Z=G=>{const re=()=>{if(ns.get(G)===re){if(ns.delete(G),As(G.props)){const I=ue(G.el)||n;T(G,I,G.anchor),xr(G,!0)}q(G)}};ns.set(G,re),Qt(re,i)};if(e==null){const G=t.el=J(""),re=t.anchor=J("");if(C(G,n,r),C(re,n,r),np(t.props)||i&&i.pendingBranch){Z(t);return}ce&&(T(t,n,re),xr(t,!0)),q()}else{t.el=e.el;const G=t.anchor=e.anchor,re=ns.get(e);if(re){re.flags|=8,ns.delete(e),Z(t);return}t.targetStart=e.targetStart;const I=t.target=e.target,S=t.targetAnchor=e.targetAnchor,j=As(e.props),ne=j?n:I,Me=j?G:S;if(c==="svg"||ru(I)?c="svg":(c==="mathml"||ou(I))&&(c="mathml"),U?(E(e.dynamicChildren,U,ne,o,i,c,f),ll(e,t,!0)):v||_(e,t,ne,Me,o,i,c,f,!1),ce)j?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Ao(t,n,G,b,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const Ee=Si(t.props,M);Ee&&(t.target=Ee,Ao(t,Ee,null,b,0))}else j&&Ao(t,I,S,b,1);xr(t,ce)}},remove(e,t,n,{um:r,o:{remove:o}},i){const{shapeFlag:c,children:f,anchor:v,targetStart:b,targetAnchor:y,target:_,props:E}=e,C=As(E),M=i||!C,J=ns.get(e);if(J&&(J.flags|=8,ns.delete(e)),_&&(o(b),o(y)),i&&o(v),!J&&(C||_)&&c&16)for(let oe=0;oe{e.isMounted=!0}),Oc(()=>{e.isUnmounting=!0}),e}const ln=[Function,Array],$c={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:ln,onEnter:ln,onAfterEnter:ln,onEnterCancelled:ln,onBeforeLeave:ln,onLeave:ln,onAfterLeave:ln,onLeaveCancelled:ln,onBeforeAppear:ln,onAppear:ln,onAfterAppear:ln,onAppearCancelled:ln},op={name:"BaseTransition",props:$c,setup(e,{slots:t}){const n=ul(),r=Cc();return()=>{const o=t.default&&ol(t.default(),!0),i=o&&o.length?Sc(o):n.subTree?ye():void 0;if(!i)return;const c=ut(e),{mode:f}=c;if(r.isLeaving)return ci(i);const v=zo(i);if(!v)return ci(i);let b=Kr(v,c,r,n,_=>b=_);v.type!==Wt&&cs(v,b);let y=n.subTree&&zo(n.subTree);if(y&&y.type!==Wt&&!Ps(y,v)&&Rr(n.subTree)){let _=Kr(y,c,r,n);if(cs(y,_),f==="out-in"&&v.type!==Wt)return r.isLeaving=!0,_.afterLeave=()=>{r.isLeaving=!1,n.job.flags&8||n.update(),delete _.afterLeave,y=void 0},ci(i);f==="in-out"&&v.type!==Wt?_.delayLeave=(E,C,M)=>{const J=Ec(r,y);J[String(y.key)]=y,E[un]=()=>{C(),E[un]=void 0,delete b.delayedLeave,y=void 0},b.delayedLeave=()=>{M(),delete b.delayedLeave,y=void 0}}:y=void 0}else y&&(y=void 0);return i}}};function Sc(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==Wt){t=n;break}}return t}const ap=op;function Ec(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function Kr(e,t,n,r,o){const{appear:i,mode:c,persisted:f=!1,onBeforeEnter:v,onEnter:b,onAfterEnter:y,onEnterCancelled:_,onBeforeLeave:E,onLeave:C,onAfterLeave:M,onLeaveCancelled:J,onBeforeAppear:oe,onAppear:ue,onAfterAppear:ce,onAppearCancelled:U}=t,T=String(e.key),q=Ec(n,e),Z=(I,S)=>{I&&pn(I,r,9,S)},G=(I,S)=>{const j=S[1];Z(I,S),He(I)?I.every(ne=>ne.length<=1)&&j():I.length<=1&&j()},re={mode:c,persisted:f,beforeEnter(I){let S=v;if(!n.isMounted)if(i)S=oe||v;else return;I[un]&&I[un](!0);const j=q[T];if(j&&Ps(e,j)){let ne=j.el[un];if(!ne){const Me=Rr(j);ne=Me&&Me.el[un]}ne&&ne()}Z(S,[I])},enter(I){if(q[T]===e)return;let S=b,j=y,ne=_;if(!n.isMounted)if(i)S=ue||b,j=ce||y,ne=U||_;else return;let Me=!1;I[_r]=he=>{Me||(Me=!0,he?Z(ne,[I]):Z(j,[I]),re.delayedLeave&&re.delayedLeave(),I[_r]=void 0)};const Ee=I[_r].bind(null,!1);S?G(S,[I,Ee]):Ee()},leave(I,S){const j=String(e.key);if(I[_r]&&I[_r](!0),n.isUnmounting)return S();Z(E,[I]);let ne=!1;I[un]=Ee=>{ne||(ne=!0,S(),Ee?Z(J,[I]):Z(M,[I]),I[un]=void 0,q[j]===e&&delete q[j])};const Me=I[un].bind(null,!1);q[j]=e,C?G(C,[I,Me]):Me()},clone(I){const S=Kr(I,t,n,r,o);return o&&o(S),S}};return re}function ci(e){if(ga(e))return e=ds(e),e.children=null,e}function zo(e){if(!ga(e))return ya(e.type)&&e.children?Sc(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&Ye(n.default))return n.default()}}function cs(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;const n=e.component.subTree;cs(ya(n.type)&&zo(n)||n,t)}else if(e.shapeFlag&128)e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback);else if(e.transition=t,e.type===je&&He(e.children)){const n=Lc(e.children,!1);n&&cs(n,t)}}function ol(e,t=!1,n){let r=[],o=0;for(let i=0;i1)for(let i=0;iAr(J,t&&(He(t)?t[oe]:t),n,r,o));return}if(Pr(r)&&!o){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&Ar(e,t,n,r.component.subTree);return}const i=r.shapeFlag&4?ka(r.component):r.el,c=o?null:i,{i:f,r:v}=e,b=t&&t.r,y=f.refs===vt?f.refs={}:f.refs,_=f.setupState,E=ut(_),C=_===vt?qu:J=>au(y,J)?!1:dt(E,J),M=(J,oe)=>!(oe&&au(y,oe));if(b!=null&&b!==v){if(iu(t),Ct(b))y[b]=null,C(b)&&(_[b]=null);else if(Gt(b)){const J=t;M(b,J.k)&&(b.value=null),J.k&&(y[J.k]=null)}}if(Ye(v))Yr(v,f,12,[c,y]);else{const J=Ct(v),oe=Gt(v);if(J||oe){const ue=()=>{if(e.f){const ce=J?C(v)?_[v]:y[v]:M()||!e.k?v.value:y[e.k];if(o)He(ce)&&Gi(ce,i);else if(He(ce))ce.includes(i)||ce.push(i);else if(J)y[v]=[i],C(v)&&(_[v]=y[v]);else{const U=[i];M(v,e.k)&&(v.value=U),e.k&&(y[e.k]=U)}}else J?(y[v]=c,C(v)&&(_[v]=c)):oe&&(M(v,e.k)&&(v.value=c),e.k&&(y[e.k]=c))};if(c){const ce=()=>{ue(),Wo.delete(e)};ce.id=-1,Wo.set(e,ce),Qt(ce,n)}else iu(e),ue()}}}function iu(e){const t=Wo.get(e);t&&(t.flags|=8,Wo.delete(e))}va().requestIdleCallback;va().cancelIdleCallback;const Pr=e=>!!e.type.__asyncLoader,ga=e=>e.type.__isKeepAlive;function ip(e,t){Ac(e,"a",t)}function lp(e,t){Ac(e,"da",t)}function Ac(e,t,n=en){const r=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(ba(t,r,n),n){let o=n.parent;for(;o&&o.parent;)ga(o.parent.vnode)&&up(r,t,n,o),o=o.parent}}function up(e,t,n,r){const o=ba(t,e,r,!0);Wn(()=>{Gi(r[t],o)},n)}function ba(e,t,n=en,r=!1){if(n){const o=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...c)=>{Mn();const f=Jr(n),v=pn(t,n,e,c);return f(),In(),v});return r?o.unshift(i):o.push(i),i}}const zn=e=>(t,n=en)=>{(!Br||e==="sp")&&ba(e,(...r)=>t(...r),n)},cp=zn("bm"),vn=zn("m"),dp=zn("bu"),Pc=zn("u"),Oc=zn("bum"),Wn=zn("um"),fp=zn("sp"),pp=zn("rtg"),vp=zn("rtc");function mp(e,t=en){ba("ec",e,t)}const hp=Symbol.for("v-ndc");function et(e,t,n,r){let o;const i=n,c=He(e);if(c||Ct(e)){const f=c&&is(e);let v=!1,b=!1;f&&(v=!dn(e),b=jn(e),e=ma(e)),o=new Array(e.length);for(let y=0,_=e.length;y<_;y++)o[y]=t(v?b?us(fn(e[y])):fn(e[y]):e[y],y,void 0,i)}else if(typeof e=="number")if(!Number.isInteger(e)||e<0)o=[];else{o=new Array(e);for(let f=0;ft(f,v,void 0,i));else{const f=Object.keys(e);o=new Array(f.length);for(let v=0,b=f.length;ve?Qc(e)?ka(e):Ti(e.parent):null,Or=Pt(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Ti(e.parent),$root:e=>Ti(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Ic(e),$forceUpdate:e=>e.f||(e.f=()=>{rl(e.update)}),$nextTick:e=>e.n||(e.n=ir.bind(e.proxy)),$watch:e=>tp.bind(e)}),di=(e,t)=>e!==vt&&!e.__isScriptSetup&&dt(e,t),yp={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:r,data:o,props:i,accessCache:c,type:f,appContext:v}=e;if(t[0]!=="$"){const E=c[t];if(E!==void 0)switch(E){case 1:return r[t];case 2:return o[t];case 4:return n[t];case 3:return i[t]}else{if(di(r,t))return c[t]=1,r[t];if(o!==vt&&dt(o,t))return c[t]=2,o[t];if(dt(i,t))return c[t]=3,i[t];if(n!==vt&&dt(n,t))return c[t]=4,n[t];Ai&&(c[t]=0)}}const b=Or[t];let y,_;if(b)return t==="$attrs"&&Ht(e.attrs,"get",""),b(e);if((y=f.__cssModules)&&(y=y[t]))return y;if(n!==vt&&dt(n,t))return c[t]=4,n[t];if(_=v.config.globalProperties,dt(_,t))return _[t]},set({_:e},t,n){const{data:r,setupState:o,ctx:i}=e;return di(o,t)?(o[t]=n,!0):r!==vt&&dt(r,t)?(r[t]=n,!0):dt(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:o,props:i,type:c}},f){let v;return!!(n[f]||e!==vt&&f[0]!=="$"&&dt(e,f)||di(t,f)||dt(i,f)||dt(r,f)||dt(Or,f)||dt(o.config.globalProperties,f)||(v=c.__cssModules)&&v[f])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:dt(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function lu(e){return He(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let Ai=!0;function gp(e){const t=Ic(e),n=e.proxy,r=e.ctx;Ai=!1,t.beforeCreate&&uu(t.beforeCreate,e,"bc");const{data:o,computed:i,methods:c,watch:f,provide:v,inject:b,created:y,beforeMount:_,mounted:E,beforeUpdate:C,updated:M,activated:J,deactivated:oe,beforeDestroy:ue,beforeUnmount:ce,destroyed:U,unmounted:T,render:q,renderTracked:Z,renderTriggered:G,errorCaptured:re,serverPrefetch:I,expose:S,inheritAttrs:j,components:ne,directives:Me,filters:Ee}=t;if(b&&bp(b,r,null),c)for(const Ue in c){const de=c[Ue];Ye(de)&&(r[Ue]=de.bind(n))}if(o){const Ue=o.call(n,n);ft(Ue)&&(e.data=tl(Ue))}if(Ai=!0,i)for(const Ue in i){const de=i[Ue],ke=Ye(de)?de.bind(n,n):Ye(de.get)?de.get.bind(n,n):Pn,Se=!Ye(de)&&Ye(de.set)?de.set.bind(n):Pn,De=rt({get:ke,set:Se});Object.defineProperty(r,Ue,{enumerable:!0,configurable:!0,get:()=>De.value,set:$e=>De.value=$e})}if(f)for(const Ue in f)Mc(f[Ue],r,n,Ue);if(v){const Ue=Ye(v)?v.call(n):v;Reflect.ownKeys(Ue).forEach(de=>{Qf(de,Ue[de])})}y&&uu(y,e,"c");function Ae(Ue,de){He(de)?de.forEach(ke=>Ue(ke.bind(n))):de&&Ue(de.bind(n))}if(Ae(cp,_),Ae(vn,E),Ae(dp,C),Ae(Pc,M),Ae(ip,J),Ae(lp,oe),Ae(mp,re),Ae(vp,Z),Ae(pp,G),Ae(Oc,ce),Ae(Wn,T),Ae(fp,I),He(S))if(S.length){const Ue=e.exposed||(e.exposed={});S.forEach(de=>{Object.defineProperty(Ue,de,{get:()=>n[de],set:ke=>n[de]=ke,enumerable:!0})})}else e.exposed||(e.exposed={});q&&e.render===Pn&&(e.render=q),j!=null&&(e.inheritAttrs=j),ne&&(e.components=ne),Me&&(e.directives=Me),I&&Tc(e)}function bp(e,t,n=Pn){He(e)&&(e=Pi(e));for(const r in e){const o=e[r];let i;ft(o)?"default"in o?i=jo(o.from||r,o.default,!0):i=jo(o.from||r):i=jo(o),Gt(i)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>i.value,set:c=>i.value=c}):t[r]=i}}function uu(e,t,n){pn(He(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function Mc(e,t,n,r){let o=r.includes(".")?kc(n,r):()=>n[r];if(Ct(e)){const i=t[e];Ye(i)&>(o,i)}else if(Ye(e))gt(o,e.bind(n));else if(ft(e))if(He(e))e.forEach(i=>Mc(i,t,n,r));else{const i=Ye(e.handler)?e.handler.bind(n):t[e.handler];Ye(i)&>(o,i,e)}}function Ic(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:o,optionsCache:i,config:{optionMergeStrategies:c}}=e.appContext,f=i.get(t);let v;return f?v=f:!o.length&&!n&&!r?v=t:(v={},o.length&&o.forEach(b=>Go(v,b,c,!0)),Go(v,t,c)),ft(t)&&i.set(t,v),v}function Go(e,t,n,r=!1){const{mixins:o,extends:i}=t;i&&Go(e,i,n,!0),o&&o.forEach(c=>Go(e,c,n,!0));for(const c in t)if(!(r&&c==="expose")){const f=wp[c]||n&&n[c];e[c]=f?f(e[c],t[c]):t[c]}return e}const wp={data:cu,props:du,emits:du,methods:Cr,computed:Cr,beforeCreate:Xt,created:Xt,beforeMount:Xt,mounted:Xt,beforeUpdate:Xt,updated:Xt,beforeDestroy:Xt,beforeUnmount:Xt,destroyed:Xt,unmounted:Xt,activated:Xt,deactivated:Xt,errorCaptured:Xt,serverPrefetch:Xt,components:Cr,directives:Cr,watch:kp,provide:cu,inject:_p};function cu(e,t){return t?e?function(){return Pt(Ye(e)?e.call(this,this):e,Ye(t)?t.call(this,this):t)}:t:e}function _p(e,t){return Cr(Pi(e),Pi(t))}function Pi(e){if(He(e)){const t={};for(let n=0;nt==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${yn(t)}Modifiers`]||e[`${vs(t)}Modifiers`];function Sp(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||vt;let o=n;const i=t.startsWith("update:"),c=i&&$p(r,t.slice(7));c&&(c.trim&&(o=n.map(y=>Ct(y)?y.trim():y)),c.number&&(o=o.map(pa)));let f,v=r[f=ri(t)]||r[f=ri(yn(t))];!v&&i&&(v=r[f=ri(vs(t))]),v&&pn(v,e,6,o);const b=r[f+"Once"];if(b){if(!e.emitted)e.emitted={};else if(e.emitted[f])return;e.emitted[f]=!0,pn(b,e,6,o)}}const Ep=new WeakMap;function Dc(e,t,n=!1){const r=n?Ep:t.emitsCache,o=r.get(e);if(o!==void 0)return o;const i=e.emits;let c={},f=!1;if(!Ye(e)){const v=b=>{const y=Dc(b,t,!0);y&&(f=!0,Pt(c,y))};!n&&t.mixins.length&&t.mixins.forEach(v),e.extends&&v(e.extends),e.mixins&&e.mixins.forEach(v)}return!i&&!f?(ft(e)&&r.set(e,null),null):(He(i)?i.forEach(v=>c[v]=null):Pt(c,i),ft(e)&&r.set(e,c),c)}function wa(e,t){return!e||!ca(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),dt(e,t[0].toLowerCase()+t.slice(1))||dt(e,vs(t))||dt(e,t))}function fu(e){const{type:t,vnode:n,proxy:r,withProxy:o,propsOptions:[i],slots:c,attrs:f,emit:v,render:b,renderCache:y,props:_,data:E,setupState:C,ctx:M,inheritAttrs:J}=e,oe=Ho(e);let ue,ce;try{if(n.shapeFlag&4){const T=o||r,q=T;ue=Tn(b.call(q,T,y,_,C,E,M)),ce=f}else{const T=t;ue=Tn(T.length>1?T(_,{attrs:f,slots:c,emit:v}):T(_,null)),ce=t.props?f:Tp(f)}}catch(T){Ds.length=0,ha(T,e,1),ue=we(Wt)}let U=ue;if(ce&&J!==!1){const T=Object.keys(ce),{shapeFlag:q}=U;T.length&&q&7&&(i&&T.some(da)&&(ce=Ap(ce,i)),U=ds(U,ce,!1,!0))}if(n.dirs&&(U=ds(U,null,!1,!0),U.dirs=U.dirs?U.dirs.concat(n.dirs):n.dirs),n.transition){const T=ya(U.type)&&zo(U)||U;cs(T,n.transition)}return ue=U,Ho(oe),ue}function Lc(e,t=!0){let n;for(let r=0;r{let t;for(const n in e)(n==="class"||n==="style"||ca(n))&&((t||(t={}))[n]=e[n]);return t},Ap=(e,t)=>{const n={};for(const r in e)(!da(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function Pp(e,t,n){const{props:r,children:o,component:i}=e,{props:c,children:f,patchFlag:v}=t,b=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&v>=0){if(v&1024)return!0;if(v&16)return r?pu(r,c,b):!!c;if(v&8){const y=t.dynamicProps;for(let _=0;_Object.create(Rc),Nc=e=>Object.getPrototypeOf(e)===Rc;function Mp(e,t,n,r=!1){const o={},i=Fc();e.propsDefaults=Object.create(null),Vc(e,t,o,i);for(const c in e.propsOptions[0])c in o||(o[c]=void 0);n?e.props=r?o:Ff(o):e.type.props?e.props=o:e.props=i,e.attrs=i}function Ip(e,t,n,r){const{props:o,attrs:i,vnode:{patchFlag:c}}=e,f=ut(o),[v]=e.propsOptions;let b=!1;if((r||c>0)&&!(c&16)){if(c&8){const y=e.vnode.dynamicProps;for(let _=0;_{v=!0;const[E,C]=Bc(_,t,!0);Pt(c,E),C&&f.push(...C)};!n&&t.mixins.length&&t.mixins.forEach(y),e.extends&&y(e.extends),e.mixins&&e.mixins.forEach(y)}if(!i&&!v)return ft(e)&&r.set(e,Ms),Ms;if(He(i))for(let y=0;ye==="_"||e==="_ctx"||e==="$stable",il=e=>He(e)?e.map(Tn):[Tn(e)],Dp=(e,t,n)=>{if(t._n)return t;const r=ms((...o)=>il(t(...o)),n);return r._c=!1,r},Uc=(e,t,n)=>{const r=e._ctx;for(const o in e){if(al(o))continue;const i=e[o];if(Ye(i))t[o]=Dp(o,i,r);else if(i!=null){const c=il(i);t[o]=()=>c}}},qc=(e,t)=>{const n=il(t);e.slots.default=()=>n},Hc=(e,t,n)=>{for(const r in t)(n||!al(r))&&(e[r]=t[r])},Lp=(e,t,n)=>{const r=e.slots=Fc();if(e.vnode.shapeFlag&32){const o=t._;o?(Hc(r,t,n),n&&Yu(r,"_",o,!0)):Uc(t,r)}else t&&qc(e,t)},Kp=(e,t,n)=>{const{vnode:r,slots:o}=e;let i=!0,c=vt;if(r.shapeFlag&32){const f=t._;f?n&&f===1?i=!1:Hc(o,t,n):(i=!t.$stable,Uc(t,o)),c=t}else t&&(qc(e,t),c={default:1});if(i)for(const f in o)!al(f)&&c[f]==null&&delete o[f]},Qt=Bp;function Rp(e){return Fp(e)}function Fp(e,t){const n=va();n.__VUE__=!0;const{insert:r,remove:o,patchProp:i,createElement:c,createText:f,createComment:v,setText:b,setElementText:y,parentNode:_,nextSibling:E,setScopeId:C=Pn,insertStaticContent:M}=e,J=(g,m,x,D=null,ae=null,z=null,ee=void 0,A=null,X=!!m.dynamicChildren)=>{if(g===m)return;g&&!Ps(g,m)&&(D=wt(g),$e(g,ae,z,!0),g=null),m.patchFlag===-2&&(X=!1,m.dynamicChildren=null),m.dynamicChildren&&g&&g.dynamicChildren&&g.dynamicChildren.hasOnce&&(m.dynamicChildren===Ms&&(m.dynamicChildren=[]),m.dynamicChildren.hasOnce=!0);const{type:te,ref:Ce,shapeFlag:be}=m;switch(te){case _a:oe(g,m,x,D);break;case Wt:ue(g,m,x,D);break;case Do:g==null&&ce(m,x,D,ee);break;case je:ne(g,m,x,D,ae,z,ee,A,X);break;default:be&1?q(g,m,x,D,ae,z,ee,A,X):be&6?Me(g,m,x,D,ae,z,ee,A,X):(be&64||be&128)&&te.process(g,m,x,D,ae,z,ee,A,X,pt)}Ce!=null&&ae?Ar(Ce,g&&g.ref,z,m||g,!m):Ce==null&&g&&g.ref!=null&&Ar(g.ref,null,z,g,!0)},oe=(g,m,x,D)=>{if(g==null)r(m.el=f(m.children),x,D);else{const ae=m.el=g.el;m.children!==g.children&&b(ae,m.children)}},ue=(g,m,x,D)=>{g==null?r(m.el=v(m.children||""),x,D):m.el=g.el},ce=(g,m,x,D)=>{[g.el,g.anchor]=M(g.children,m,x,D,g.el,g.anchor)},U=({el:g,anchor:m},x,D)=>{let ae;for(;g&&g!==m;)ae=E(g),r(g,x,D),g=ae;r(m,x,D)},T=({el:g,anchor:m})=>{let x;for(;g&&g!==m;)x=E(g),o(g),g=x;o(m)},q=(g,m,x,D,ae,z,ee,A,X)=>{if(m.type==="svg"?ee="svg":m.type==="math"&&(ee="mathml"),g==null)Z(m,x,D,ae,z,ee,A,X);else{const te=g.el&&g.el._isVueCE?g.el:null;try{te&&te._beginPatch(),I(g,m,ae,z,ee,A,X)}finally{te&&te._endPatch()}}},Z=(g,m,x,D,ae,z,ee,A)=>{let X,te;const{props:Ce,shapeFlag:be,transition:Le,dirs:Te}=g;if(X=g.el=c(g.type,z,Ce&&Ce.is,Ce),be&8?y(X,g.children):be&16&&re(g.children,X,null,D,ae,fi(g,z),ee,A),Te&&Cs(g,null,D,"created"),G(X,g,g.scopeId,ee,D),Ce){for(const Ze in Ce)Ze!=="value"&&!Sr(Ze)&&i(X,Ze,null,Ce[Ze],z,D);"value"in Ce&&i(X,"value",null,Ce.value,z),(te=Ce.onVnodeBeforeMount)&&xn(te,D,g)}Te&&Cs(g,null,D,"beforeMount");const Qe=Np(ae,Le);Qe&&Le.beforeEnter(X),r(X,m,x),((te=Ce&&Ce.onVnodeMounted)||Qe||Te)&&Qt(()=>{try{te&&xn(te,D,g),Qe&&Le.enter(X),Te&&Cs(g,null,D,"mounted")}finally{}},ae)},G=(g,m,x,D,ae)=>{if(x&&C(g,x),D)for(let z=0;z{for(let te=X;te{const A=m.el=g.el;let{patchFlag:X,dynamicChildren:te,dirs:Ce}=m;X|=g.patchFlag&16;const be=g.props||vt,Le=m.props||vt;let Te;if(x&&$s(x,!1),(Te=Le.onVnodeBeforeUpdate)&&xn(Te,x,m,g),Ce&&Cs(m,g,x,"beforeUpdate"),x&&$s(x,!0),te&&(!g.dynamicChildren||g.dynamicChildren.length!==te.length)&&(X=0,ee=!1,te=null),(be.innerHTML&&Le.innerHTML==null||be.textContent&&Le.textContent==null)&&y(A,""),te?S(g.dynamicChildren,te,A,x,D,fi(m,ae),z):ee||de(g,m,A,null,x,D,fi(m,ae),z,!1),X>0){if(X&16)j(A,be,Le,x,ae);else if(X&2&&be.class!==Le.class&&i(A,"class",null,Le.class,ae),X&4&&i(A,"style",be.style,Le.style,ae),X&8){const Qe=m.dynamicProps;for(let Ze=0;Ze{Te&&xn(Te,x,m,g),Ce&&Cs(m,g,x,"updated")},D)},S=(g,m,x,D,ae,z,ee)=>{for(let A=0;A{if(m!==x){if(m!==vt)for(const z in m)!Sr(z)&&!(z in x)&&i(g,z,m[z],null,ae,D);for(const z in x){if(Sr(z))continue;const ee=x[z],A=m[z];ee!==A&&z!=="value"&&i(g,z,A,ee,ae,D)}"value"in x&&i(g,"value",m.value,x.value,ae)}},ne=(g,m,x,D,ae,z,ee,A,X)=>{const te=m.el=g?g.el:f(""),Ce=m.anchor=g?g.anchor:f("");let{patchFlag:be,dynamicChildren:Le,slotScopeIds:Te}=m;Te&&(A=A?A.concat(Te):Te),g==null?(r(te,x,D),r(Ce,x,D),re(m.children||[],x,Ce,ae,z,ee,A,X)):be>0&&be&64&&Le&&g.dynamicChildren&&g.dynamicChildren.length===Le.length?(S(g.dynamicChildren,Le,x,ae,z,ee,A),(m.key!=null||ae&&m===ae.subTree)&&ll(g,m,!0)):de(g,m,x,Ce,ae,z,ee,A,X)},Me=(g,m,x,D,ae,z,ee,A,X)=>{m.slotScopeIds=A,g==null?m.shapeFlag&512?ae.ctx.activate(m,x,D,ee,X):Ee(m,x,D,ae,z,ee,X):he(g,m,X)},Ee=(g,m,x,D,ae,z,ee)=>{const A=g.component=Yp(g,D,ae);if(ga(g)&&(A.ctx.renderer=pt),Jp(A,!1,ee),A.asyncDep){if(ae&&ae.registerDep(A,Ae,ee,z),!g.el){const X=A.subTree=we(Wt);ue(null,X,m,x),g.placeholder=X.el}}else Ae(A,g,m,x,ae,z,ee)},he=(g,m,x)=>{const D=m.component=g.component;if(Pp(g,m,x))if(D.asyncDep&&!D.asyncResolved){m.el=g.el,m.placeholder=g.placeholder,Ue(D,m,x);return}else D.next=m,D.update();else m.el=g.el,m.placeholder=g.placeholder,D.vnode=m},Ae=(g,m,x,D,ae,z,ee)=>{const A=()=>{if(g.isMounted){let{next:be,bu:Le,u:Te,parent:Qe,vnode:Ze}=g;{const Yt=zc(g);if(Yt){be&&(be.el=Ze.el,Ue(g,be,ee)),Yt.asyncDep.then(()=>{Qt(()=>{g.isUnmounted||te()},ae)});return}}let tt=be,_t;$s(g,!1),be?(be.el=Ze.el,Ue(g,be,ee)):be=Ze,Le&&Io(Le),(_t=be.props&&be.props.onVnodeBeforeUpdate)&&xn(_t,Qe,be,Ze),$s(g,!0);const $t=fu(g),tn=g.subTree;g.subTree=$t,J(tn,$t,_(tn.el),wt(tn),g,ae,z),be.el=$t.el,tt===null&&Op(g,$t.el),Te&&Qt(Te,ae),(_t=be.props&&be.props.onVnodeUpdated)&&Qt(()=>xn(_t,Qe,be,Ze),ae)}else{let be;const{el:Le,props:Te}=m,{bm:Qe,m:Ze,parent:tt,root:_t,type:$t}=g,tn=Pr(m);$s(g,!1),Qe&&Io(Qe),!tn&&(be=Te&&Te.onVnodeBeforeMount)&&xn(be,tt,m),$s(g,!0);{_t.ce&&_t.ce._hasShadowRoot()&&_t.ce._injectChildStyle($t,g.parent?g.parent.type:void 0);const Yt=g.subTree=fu(g);J(null,Yt,x,D,g,ae,z),m.el=Yt.el}if(Ze&&Qt(Ze,ae),!tn&&(be=Te&&Te.onVnodeMounted)){const Yt=m;Qt(()=>xn(be,tt,Yt),ae)}(m.shapeFlag&256||tt&&Pr(tt.vnode)&&tt.vnode.shapeFlag&256)&&g.a&&Qt(g.a,ae),g.isMounted=!0,m=x=D=null}};g.scope.on();const X=g.effect=new Zu(A);g.scope.off();const te=g.update=X.run.bind(X),Ce=g.job=X.runIfDirty.bind(X);Ce.i=g,Ce.id=g.uid,X.scheduler=()=>rl(Ce),$s(g,!0),te()},Ue=(g,m,x)=>{m.component=g;const D=g.vnode.props;g.vnode=m,g.next=null,Ip(g,m.props,D,x),Kp(g,m.children,x),Mn(),yc(g),In()},de=(g,m,x,D,ae,z,ee,A,X=!1)=>{const te=g&&g.children,Ce=g?g.shapeFlag:0,be=m.children,{patchFlag:Le,shapeFlag:Te}=m;if(Le>0){if(Le&128){Se(te,be,x,D,ae,z,ee,A,X);return}else if(Le&256){ke(te,be,x,D,ae,z,ee,A,X);return}}Te&8?(Ce&16&&bt(te,ae,z),be!==te&&y(x,be)):Ce&16?Te&16?Se(te,be,x,D,ae,z,ee,A,X):bt(te,ae,z,!0):(Ce&8&&y(x,""),Te&16&&re(be,x,D,ae,z,ee,A,X))},ke=(g,m,x,D,ae,z,ee,A,X)=>{g=g||Ms,m=m||Ms;const te=g.length,Ce=m.length,be=Math.min(te,Ce);let Le;for(Le=0;LeCe?bt(g,ae,z,!0,!1,be):re(m,x,D,ae,z,ee,A,X,be)},Se=(g,m,x,D,ae,z,ee,A,X)=>{let te=0;const Ce=m.length;let be=g.length-1,Le=Ce-1;for(;te<=be&&te<=Le;){const Te=g[te],Qe=m[te]=X?Nn(m[te]):Tn(m[te]);if(Ps(Te,Qe))J(Te,Qe,x,null,ae,z,ee,A,X);else break;te++}for(;te<=be&&te<=Le;){const Te=g[be],Qe=m[Le]=X?Nn(m[Le]):Tn(m[Le]);if(Ps(Te,Qe))J(Te,Qe,x,null,ae,z,ee,A,X);else break;be--,Le--}if(te>be){if(te<=Le){const Te=Le+1,Qe=TeLe)for(;te<=be;)$e(g[te],ae,z,!0),te++;else{const Te=te,Qe=te,Ze=new Map;for(te=Qe;te<=Le;te++){const Kt=m[te]=X?Nn(m[te]):Tn(m[te]);Kt.key!=null&&Ze.set(Kt.key,te)}let tt,_t=0;const $t=Le-Qe+1;let tn=!1,Yt=0;const nn=new Array($t);for(te=0;te<$t;te++)nn[te]=0;for(te=Te;te<=be;te++){const Kt=g[te];if(_t>=$t){$e(Kt,ae,z,!0);continue}let Ot;if(Kt.key!=null)Ot=Ze.get(Kt.key);else for(tt=Qe;tt<=Le;tt++)if(nn[tt-Qe]===0&&Ps(Kt,m[tt])){Ot=tt;break}Ot===void 0?$e(Kt,ae,z,!0):(nn[Ot-Qe]=te+1,Ot>=Yt?Yt=Ot:tn=!0,J(Kt,m[Ot],x,null,ae,z,ee,A,X),_t++)}const hs=tn?Vp(nn):Ms;for(tt=hs.length-1,te=$t-1;te>=0;te--){const Kt=Qe+te,Ot=m[Kt],Be=m[Kt+1],Gn=Kt+1{const{el:z,type:ee,transition:A,children:X,shapeFlag:te}=g;if(te&6){De(g.component.subTree,m,x,D);return}if(te&128){g.suspense.move(m,x,D);return}if(te&64){ee.move(g,m,x,pt);return}if(ee===je){r(z,m,x);for(let be=0;beA.enter(z),ae));else{const{leave:be,delayLeave:Le,afterLeave:Te}=A,Qe=()=>{g.ctx.isUnmounted?o(z):r(z,m,x)},Ze=()=>{const tt=z._isLeaving||!!z[un];z._isLeaving&&z[un](!0),A.persisted&&!tt?Qe():be(z,()=>{Qe(),Te&&Te()})};Le?Le(z,Qe,Ze):Ze()}else r(z,m,x)},$e=(g,m,x,D=!1,ae=!1)=>{const{type:z,props:ee,ref:A,children:X,dynamicChildren:te,shapeFlag:Ce,patchFlag:be,dirs:Le,cacheIndex:Te,memo:Qe}=g;if((be===-2||te&&te.hasOnce)&&(ae=!1),A!=null&&(Mn(),Ar(A,null,x,g,!0),In()),Te!=null&&(!g.ctx||g.ctx===m)&&(m.renderCache[Te]=void 0),Ce&256){m.ctx.deactivate(g);return}const Ze=Ce&1&&Le,tt=!Pr(g);let _t;if(tt&&(_t=ee&&ee.onVnodeBeforeUnmount)&&xn(_t,m,g),Ce&6)ct(g.component,x,D);else{if(Ce&128){g.suspense.unmount(x,D);return}Ze&&Cs(g,null,m,"beforeUnmount"),Ce&64?g.type.remove(g,m,x,pt,D):te&&!te.hasOnce&&(z!==je||be>0&&be&64)?bt(te,m,x,!1,!0):(z===je&&be&384||!ae&&Ce&16)&&bt(X,m,x),D&&fe(g)}const $t=Qe!=null&&Te==null;(tt&&(_t=ee&&ee.onVnodeUnmounted)||Ze||$t)&&Qt(()=>{_t&&xn(_t,m,g),Ze&&Cs(g,null,m,"unmounted"),$t&&(g.el=null)},x)},fe=g=>{const{type:m,el:x,anchor:D,transition:ae}=g,z=m===je;if(z&&!ae){Ie(x,D);return}if(m===Do){T(g),ae&&!ae.persisted&&ae.afterLeave&&ae.afterLeave();return}const ee=z?Rr(g):g,A=()=>{z?_(x)&&Ie(x,D):o(x),ae&&!ae.persisted&&ae.afterLeave&&ae.afterLeave()};if(ee&&ee.shapeFlag&1&&ae&&!ae.persisted){const{leave:X,delayLeave:te}=ae,Ce=ee.el,be=()=>X(Ce,A);te?te(Ce,A,be):be()}else A()},Ie=(g,m)=>{let x;for(;g!==m;)x=E(g),o(g),g=x;o(m)},ct=(g,m,x)=>{const{bum:D,scope:ae,job:z,subTree:ee,um:A,m:X,a:te}=g;mu(X),mu(te),D&&Io(D),ae.stop(),z?(z.flags|=8,$e(ee,g,m,x)):g.vnode.el&&ee&&(ee.transition=g.vnode.transition,$e(ee,g,m,x)),A&&Qt(A,m),Qt(()=>{g.isUnmounted=!0},m)},bt=(g,m,x,D=!1,ae=!1,z=0)=>{for(let ee=z;ee{if(g.shapeFlag&6)return wt(g.component.subTree);if(g.shapeFlag&128)return g.suspense.next();const m=E(g.anchor||g.el),x=m&&m[xc];return x?E(x):m},Vt=(g,m,x)=>{const D=g&&m._vnode?void 0:g&&g.component?g.component.uid:Gp();Xf(()=>{g==null?m._vnode&&$e(m._vnode,null,null,!0):J(m._vnode||null,g,m,null,null,null,x),m._vnode=g},D)},pt={p:J,um:$e,m:De,r:fe,mt:Ee,mc:re,pc:de,pbc:S,n:wt,o:e};return{render:Vt,hydrate:void 0,createApp:Cp(Vt)}}function fi({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function $s({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Np(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function ll(e,t,n=!1){const r=e.children,o=t.children;if(He(r)&&He(o))for(let i=0;i>1,e[n[f]]0&&(t[r]=n[i-1]),n[i]=r)}}for(i=n.length,c=n[i-1];i-- >0;)n[i]=c,c=t[c];return n}function zc(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:zc(t)}function mu(e){if(e)for(let t=0;te.__isSuspense;function Bp(e,t){t&&t.pendingBranch?He(e)?t.effects.push(...e):t.effects.push(e):Jf(e)}const je=Symbol.for("v-fgt"),_a=Symbol.for("v-txt"),Wt=Symbol.for("v-cmt"),Do=Symbol.for("v-stc"),Ds=[];let an=null;function $(e=!1){Ds.push(an=e?null:[])}function Gc(){Ds.pop(),an=Ds[Ds.length-1]||null}let Fr=1;function Yo(e,t=!1){Fr+=e,e<0&&an&&t&&(an.hasOnce=!0)}function Yc(e){return e.dynamicChildren=Fr>0?an||Ms:null,Gc(),Fr>0&&an&&an.push(e),e}function P(e,t,n,r,o,i){return Yc(l(e,t,n,r,o,i,!0))}function St(e,t,n,r,o){return Yc(we(e,t,n,r,o,!0))}function Nr(e){return e?e.__v_isVNode===!0:!1}function Ps(e,t){return e.type===t.type&&e.key===t.key}const Jc=({key:e})=>e??null,Lo=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Ct(e)||Gt(e)||Ye(e)?{i:cn,r:e,k:t,f:!!n}:e:null);function l(e,t=null,n=null,r=0,o=null,i=e===je?0:1,c=!1,f=!1){const v={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Jc(t),ref:t&&Lo(t),scopeId:wc,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:r,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:cn};return f?(Jo(v,n),i&128&&e.normalize(v)):n&&(v.shapeFlag|=Ct(n)?8:16),Fr>0&&!c&&an&&(v.patchFlag>0||i&6)&&v.patchFlag!==32&&an.push(v),v}const we=Up;function Up(e,t=null,n=null,r=0,o=null,i=!1){if((!e||e===hp)&&(e=Wt),Nr(e)){const f=ds(e,t,!0);return n&&Jo(f,n),Fr>0&&!i&&an&&(f.shapeFlag&6?an[an.indexOf(e)]=f:an.push(f)),f.patchFlag=-2,f}if(ev(e)&&(e=e.__vccOpts),t){t=qp(t);let{class:f,style:v}=t;f&&!Ct(f)&&(t.class=Xe(f)),ft(v)&&(sl(v)&&!He(v)&&(v=Pt({},v)),t.style=Un(v))}const c=Ct(e)?1:Wc(e)?128:ya(e)?64:ft(e)?4:Ye(e)?2:0;return l(e,t,n,r,o,c,i,!0)}function qp(e){return e?sl(e)||Nc(e)?Pt({},e):e:null}function ds(e,t,n=!1,r=!1){const{props:o,ref:i,patchFlag:c,children:f,transition:v}=e,b=t?zp(o||{},t):o,y={__v_isVNode:!0,__v_skip:!0,type:e.type,props:b,key:b&&Jc(b),ref:t&&t.ref?n&&i?He(i)?i.concat(Lo(t)):[i,Lo(t)]:Lo(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:f,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==je?c===-1?16:c|16:c,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:v,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&ds(e.ssContent),ssFallback:e.ssFallback&&ds(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce,cacheIndex:e.cacheIndex};return v&&r&&cs(y,v.clone(y)),y}function mt(e=" ",t=0){return we(_a,null,e,t)}function Hp(e,t){const n=we(Do,null,e);return n.staticCount=t,n}function ye(e="",t=!1){return t?($(),St(Wt,null,e)):we(Wt,null,e)}function Tn(e){return e==null||typeof e=="boolean"?we(Wt):He(e)?we(je,null,e.slice()):Nr(e)?Nn(e):we(_a,null,String(e))}function Nn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:ds(e)}function Jo(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(He(t))n=16;else if(typeof t=="object")if(r&65){const o=t.default;o&&(o._c&&(o._d=!1),Jo(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!Nc(t)?t._ctx=cn:o===3&&cn&&(cn.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(Ye(t)){if(r&65){Jo(e,{default:t});return}t={default:t,_ctx:cn},n=32}else t=String(t),r&64?(n=16,t=[mt(t)]):n=8;e.children=t,e.shapeFlag|=n}function zp(...e){const t={};for(let n=0;nen||cn;let Xo,Vr;{const e=va(),t=(n,r)=>{let o;return(o=e[n])||(o=e[n]=[]),o.push(r),i=>{o.length>1?o.forEach(c=>c(i)):o[0](i)}};Xo=t("__VUE_INSTANCE_SETTERS__",n=>en=n),Vr=t("__VUE_SSR_SETTERS__",n=>Br=n)}const Jr=e=>{const t=en;return Xo(e),e.scope.on(),()=>{e.scope.off(),Xo(t)}},hu=()=>{en&&en.scope.off(),Xo(null)};function Qc(e){return e.vnode.shapeFlag&4}let Br=!1;function Jp(e,t=!1,n=!1){t&&Vr(t);const{props:r,children:o}=e.vnode,i=Qc(e);Mp(e,r,i,t),Lp(e,o,n||t);const c=i?Xp(e,t):void 0;return t&&Vr(!1),c}function Xp(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,yp);const{setup:r}=n;if(r){Mn();const o=e.setupContext=r.length>1?Zp(e):null,i=Jr(e),c=Yr(r,e,0,[e.props,o]),f=Hu(c);if(In(),i(),(f||e.sp)&&!Pr(e)&&Tc(e),f){if(c.then(hu,hu),t)return c.then(v=>{Vr(!0);try{yu(e,v,t)}finally{Vr(!1)}}).catch(v=>{ha(v,e,0)});e.asyncDep=c}else yu(e,c)}else Zc(e)}function yu(e,t,n){Ye(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ft(t)&&(e.setupState=vc(t)),Zc(e)}function Zc(e,t,n){const r=e.type;e.render||(e.render=r.render||Pn);{const o=Jr(e);Mn();try{gp(e)}finally{In(),o()}}}const Qp={get(e,t){return Ht(e,"get",""),e[t]}};function Zp(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Qp),slots:e.slots,emit:e.emit,expose:t}}function ka(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(vc(Nf(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Or)return Or[n](e)},has(t,n){return n in t||n in Or}})):e.proxy}function ev(e){return Ye(e)&&"__vccOpts"in e}const rt=(e,t)=>Hf(e,t,Br);function tv(e,t,n){try{Yo(-1);const r=arguments.length;return r===2?ft(t)&&!He(t)?Nr(t)?we(e,null,[t]):we(e,t):we(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&Nr(n)&&(n=[n]),we(e,t,n))}finally{Yo(1)}}const nv="3.5.44";/** +* @vue/runtime-dom v3.5.44 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let Ii;const gu=typeof window<"u"&&window.trustedTypes;if(gu)try{Ii=gu.createPolicy("vue",{createHTML:e=>e})}catch{}const ed=Ii?e=>Ii.createHTML(e):e=>e,sv="http://www.w3.org/2000/svg",rv="http://www.w3.org/1998/Math/MathML",Fn=typeof document<"u"?document:null,bu=Fn&&Fn.createElement("template"),ov={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const o=t==="svg"?Fn.createElementNS(sv,e):t==="mathml"?Fn.createElementNS(rv,e):n?Fn.createElement(e,{is:n}):Fn.createElement(e);return e==="select"&&r&&r.multiple!=null&&o.setAttribute("multiple",r.multiple),o},createText:e=>Fn.createTextNode(e),createComment:e=>Fn.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Fn.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,o,i){const c=n?n.previousSibling:t.lastChild;if(o&&(o===i||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),!(o===i||!(o=o.nextSibling)););else{bu.innerHTML=ed(r==="svg"?`${e}`:r==="mathml"?`${e}`:e);const f=bu.content;if(r==="svg"||r==="mathml"){const v=f.firstChild;for(;v.firstChild;)f.appendChild(v.firstChild);f.removeChild(v)}t.insertBefore(f,n)}return[c?c.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},ts="transition",kr="animation",nr=Symbol("_vtc"),td={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},nd=Pt({},$c,td),av=e=>(e.displayName="Transition",e.props=nd,e),lr=av((e,{slots:t})=>tv(ap,sd(e),t)),Ss=(e,t=[])=>{He(e)?e.forEach(n=>n(...t)):e&&e(...t)},wu=e=>e?He(e)?e.some(t=>t.length>1):e.length>1:!1;function sd(e){const t={};for(const ne in e)ne in td||(t[ne]=e[ne]);if(e.css===!1)return t;const{name:n="v",type:r,duration:o,enterFromClass:i=`${n}-enter-from`,enterActiveClass:c=`${n}-enter-active`,enterToClass:f=`${n}-enter-to`,appearFromClass:v=i,appearActiveClass:b=c,appearToClass:y=f,leaveFromClass:_=`${n}-leave-from`,leaveActiveClass:E=`${n}-leave-active`,leaveToClass:C=`${n}-leave-to`}=e,M=iv(o),J=M&&M[0],oe=M&&M[1],{onBeforeEnter:ue,onEnter:ce,onEnterCancelled:U,onLeave:T,onLeaveCancelled:q,onBeforeAppear:Z=ue,onAppear:G=ce,onAppearCancelled:re=U}=t,I=(ne,Me,Ee,he)=>{ne._enterCancelled=he,ss(ne,Me?y:f),ss(ne,Me?b:c),Ee&&Ee()},S=(ne,Me)=>{ne._isLeaving=!1,ss(ne,_),ss(ne,C),ss(ne,E),Me&&Me()},j=ne=>(Me,Ee)=>{const he=ne?G:ce,Ae=()=>I(Me,ne,Ee);Ss(he,[Me,Ae]),_u(()=>{ss(Me,ne?v:i),Cn(Me,ne?y:f),wu(he)||ku(Me,r,J,Ae)})};return Pt(t,{onBeforeEnter(ne){Ss(ue,[ne]),Cn(ne,i),Cn(ne,c)},onBeforeAppear(ne){Ss(Z,[ne]),Cn(ne,v),Cn(ne,b)},onEnter:j(!1),onAppear:j(!0),onLeave(ne,Me){ne._isLeaving=!0;const Ee=()=>S(ne,Me);Cn(ne,_),ne._enterCancelled?(Cn(ne,E),ji(ne)):(ji(ne),Cn(ne,E)),_u(()=>{ne._isLeaving&&(ss(ne,_),Cn(ne,C),wu(T)||ku(ne,r,oe,Ee))}),Ss(T,[ne,Ee])},onEnterCancelled(ne){I(ne,!1,void 0,!0),Ss(U,[ne])},onAppearCancelled(ne){I(ne,!0,void 0,!0),Ss(re,[ne])},onLeaveCancelled(ne){S(ne),Ss(q,[ne])}})}function iv(e){if(e==null)return null;if(ft(e))return[pi(e.enter),pi(e.leave)];{const t=pi(e);return[t,t]}}function pi(e){return df(e)}function Cn(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[nr]||(e[nr]=new Set)).add(t)}function ss(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[nr];n&&(n.delete(t),n.size||(e[nr]=void 0))}function _u(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let lv=0;function ku(e,t,n,r){const o=e._endId=++lv,i=()=>{o===e._endId&&r()};if(n!=null)return setTimeout(i,n);const{type:c,timeout:f,propCount:v}=rd(e,t);if(!c)return r();const b=c+"end";let y=0;const _=()=>{e.removeEventListener(b,E),i()},E=C=>{C.target===e&&++y>=v&&_()};setTimeout(()=>{y(n[M]||"").split(", "),o=r(`${ts}Delay`),i=r(`${ts}Duration`),c=xu(o,i),f=r(`${kr}Delay`),v=r(`${kr}Duration`),b=xu(f,v);let y=null,_=0,E=0;t===ts?c>0&&(y=ts,_=c,E=i.length):t===kr?b>0&&(y=kr,_=b,E=v.length):(_=Math.max(c,b),y=_>0?c>b?ts:kr:null,E=y?y===ts?i.length:v.length:0);const C=y===ts&&/\b(?:transform|all)(?:,|$)/.test(r(`${ts}Property`).toString());return{type:y,timeout:_,propCount:E,hasTransform:C}}function xu(e,t){for(;e.lengthCu(n)+Cu(e[r])))}function Cu(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function ji(e){return(e?e.ownerDocument:document).body.offsetHeight}function uv(e,t,n){const r=e[nr];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const $u=Symbol("_vod"),od=Symbol("_vsh"),cv=Symbol(""),dv=/(?:^|;)\s*display\s*:/;function fv(e,t,n){const r=e.style,o=Ct(n);let i=!1;if(n&&!o){if(t)if(Ct(t))for(const c of t.split(";")){const f=c.slice(0,c.indexOf(":")).trim();n[f]==null&&$r(r,f,"")}else for(const c in t)n[c]==null&&$r(r,c,"");for(const c in n){c==="display"&&(i=!0);const f=n[c];f!=null?vv(e,c,!Ct(t)&&t?t[c]:void 0,f)||$r(r,c,f):$r(r,c,"")}}else if(o){if(t!==n){const c=r[cv];c&&(n+=";"+c),r.cssText=n,i=dv.test(n)}}else t&&e.removeAttribute("style");$u in e&&((!o||t!==n)&&(e[$u]=i?r.display:""),e[od]&&(r.display="none"))}const Po=/\s*!important$/;function $r(e,t,n){if(He(n))n.forEach(r=>$r(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))Po.test(n)?e.setProperty(t,n.replace(Po,""),"important"):e.setProperty(t,n);else{const r=pv(e,t);Po.test(n)?e.setProperty(vs(r),n.replace(Po,""),"important"):e[r]=n}}const Su=["Webkit","Moz","ms"],vi={};function pv(e,t){const n=vi[t];if(n)return n;let r=yn(t);if(r!=="filter"&&r in e)return vi[t]=r;r=Gu(r);for(let o=0;omi||(wv.then(()=>mi=0),mi=Date.now());function kv(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;const o=n.value;if(He(o)){const i=r.stopImmediatePropagation;r.stopImmediatePropagation=()=>{i.call(r),r._stopped=!0};const c=o.slice(),f=[r];for(let v=0;ve.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,xv=(e,t,n,r,o,i)=>{const c=o==="svg";t==="class"?uv(e,r,c):t==="style"?fv(e,n,r):ca(t)?da(t)||hv(e,t,n,r,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Cv(e,t,r,c))?(Au(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Tu(e,t,r,c,i,t!=="value")):e._isVueCE&&($v(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!Ct(r)))?Au(e,yn(t),r,i,t):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),Tu(e,t,r,c))};function Cv(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&Ou(t)&&Ye(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const o=e.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return Ou(t)&&Ct(n)?!1:t in e}function $v(e,t){const n=e._def.props;if(!n)return!1;const r=yn(t);return Array.isArray(n)?n.some(o=>yn(o)===r):Object.keys(n).some(o=>yn(o)===r)}const ad=new WeakMap,id=new WeakMap,Qo=Symbol("_moveCb"),Mu=Symbol("_enterCb"),Di=new WeakMap,Sv=e=>(delete e.props.mode,e),Ev=Sv({name:"TransitionGroup",props:Pt({},nd,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=ul(),r=Cc();let o,i,c,f;const v=()=>(f===void 0&&(f=o.length>0&&Dv(o[0].el,n.vnode.el,Iu(e))),f);return Pc(()=>{if(Di.delete(n),!v()){o=[],c=void 0;return}const b=Iu(e);o.forEach(Av);const y=c&&jv(c,n.vnode.el);c=void 0,o.forEach(E=>Pv(E,y));const _=o.filter(Ov);ji(n.vnode.el),_.forEach(E=>{const C=E.el,M=C.style;Cn(C,b),M.transform=M.webkitTransform=M.transitionDuration="";const J=C[Qo]=oe=>{oe&&oe.target!==C||(!oe||oe.propertyName.endsWith("transform"))&&(C.removeEventListener("transitionend",J),C[Qo]=null,ss(C,b))};C.addEventListener("transitionend",J)}),o=[]}),()=>{const b=ut(e),y=sd(b);let _=b.tag||je;if(o=[],f=void 0,i)for(let E=0;Er.willMove()&&r.item.contains(t));return n&&xa(n.item,n)}function Dv(e,t,n){const r=e.cloneNode(),o=e[nr];o&&o.forEach(f=>{f.split(/\s+/).forEach(v=>v&&r.classList.remove(v))}),n.split(/\s+/).forEach(f=>f&&r.classList.add(f)),r.style.display="none";const i=t.nodeType===1?t:t.parentNode;i.appendChild(r);const{hasTransform:c}=rd(r);return i.removeChild(r),c}const Zo=e=>{const t=e.props["onUpdate:modelValue"]||!1;return He(t)?n=>Io(t,n):t};function Lv(e){e.target.composing=!0}function ju(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Is=Symbol("_assign"),Oo=Symbol("_initialValue");function hi(e,t,n){return t&&(e=e.trim()),n&&(e=pa(e)),e}const Re={created(e,{modifiers:{lazy:t,trim:n,number:r}},o){e.parentNode&&(e.type==="text"?e[Oo]=e.defaultValue.replace(/[\r\n]/g,""):e.type==="textarea"&&(e[Oo]=e.defaultValue.replace(/\r\n?/g,` +`))),e[Is]=Zo(o);const i=r||o.props&&o.props.type==="number";Os(e,t?"change":"input",c=>{c.target.composing||e[Is](hi(e.value,n,i))}),(n||i)&&Os(e,"change",()=>{e.value=hi(e.value,n,i)}),t||(Os(e,"compositionstart",Lv),Os(e,"compositionend",ju),Os(e,"change",ju))},mounted(e,{value:t,modifiers:{trim:n,number:r}}){const o=t??"",i=e[Oo];delete e[Oo],i!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==i?e[Is](hi(e.value,n,r)):e.value=o},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:o,number:i}},c){if(e[Is]=Zo(c),e.composing)return;const f=(i||e.type==="number")&&!/^0\d/.test(e.value)?pa(e.value):e.value,v=t??"";if(f===v)return;const b=e.getRootNode();(b instanceof Document||b instanceof ShadowRoot)&&b.activeElement===e&&e.type!=="range"&&(r&&t===n||o&&e.value.trim()===v)||(e.value=v)}},fs={deep:!0,created(e,{value:t,modifiers:{number:n}},r){e._modelValue=t,Os(e,"change",()=>{const o=Array.prototype.filter.call(e.options,v=>v.selected).map(v=>n?pa(ea(v)):ea(v)),i=e.multiple,c=i?Ls(e._modelValue)?new Set(o):o:o[0],f=e._pendingValue=[i,i?He(c)?o.slice():o:c];try{e[Is](c)}finally{ir(()=>{e._pendingValue===f&&(e._pendingValue=void 0)})}}),e[Is]=Zo(r)},mounted(e,{value:t}){Du(e,t)},beforeUpdate(e,{value:t},n){e._modelValue=t,e[Is]=Zo(n)},updated(e,{value:t}){const n=e._pendingValue;e._pendingValue=void 0,(!n||n[0]!==e.multiple||!Kv(t,n[1],n[0]))&&Du(e,t)}};function Kv(e,t,n){if(!n||He(e))return ls(e,t);if(Ls(e)){if(e.size!==t.length)return!1;for(const r of t)if(!e.has(r))return!1;return!0}return!1}function Du(e,t){const n=e.multiple,r=He(t);if(!(n&&!r&&!Ls(t))){for(let o=0,i=e.options.length;oString(b)===String(f)):c.selected=wf(t,f)>-1}else c.selected=t.has(f);else if(ls(ea(c),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function ea(e){return"_value"in e?e._value:e.value}const Rv=["ctrl","shift","alt","meta"],Fv={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Rv.some(n=>e[`${n}Key`]&&!t.includes(n))},zt=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),r=t.join(".");return n[r]||(n[r]=(o,...i)=>{for(let c=0;c{const n=e._withKeys||(e._withKeys={}),r=t.join(".");return n[r]||(n[r]=o=>{if(!("key"in o))return;const i=vs(o.key);if(t.some(c=>c===i||Nv[c]===i))return e(o)})},Vv=Pt({patchProp:xv},ov);let Lu;function Bv(){return Lu||(Lu=Rp(Vv))}const Uv=(...e)=>{const t=Bv().createApp(...e),{mount:n}=t;return t.mount=r=>{const o=Hv(r);if(!o)return;const i=t._component;!Ye(i)&&!i.render&&!i.template&&(i.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const c=n(o,!1,qv(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),c},t};function qv(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Hv(e){return Ct(e)?document.querySelector(e):e}function Et(e){return''+e+""}const zv={calendar:Et(''),clock:Et(''),"check-circle":Et(''),edit:Et(''),tag:Et(''),star:Et(''),close:Et(''),flag:Et(''),chart:Et(''),export:Et(''),"chevron-left":Et(''),"chevron-right":Et(''),"chevron-down":Et(''),plus:Et(''),search:Et(''),settings:Et(''),memo:Et(''),lock:Et(''),wallet:Et(''),more:Et(''),shield:Et(''),plan:Et('')},Wv=["innerHTML"],qe=Lt({__name:"Icon",props:{name:{},size:{default:16}},setup(e){const t=e,n=rt(()=>zv[t.name]||"");return(r,o)=>($(),P("span",{class:"icon",style:Un({width:e.size+"px",height:e.size+"px"}),innerHTML:n.value},null,12,Wv))}}),Gv=["aria-label"],Yv={class:"dialog-title"},Jv={class:"dialog-msg"},Xv={class:"dialog-btns"},Qv=Lt({__name:"ConfirmDialog",props:{open:{type:Boolean},title:{},message:{},confirmText:{default:"确认"},cancelText:{default:"取消"},danger:{type:Boolean,default:!1}},emits:["cancel","confirm"],setup(e,{emit:t}){const n=e,r=t;function o(i){n.open&&i.key==="Escape"&&r("cancel")}return gt(()=>n.open,i=>{i?window.addEventListener("keydown",o):window.removeEventListener("keydown",o)}),Wn(()=>window.removeEventListener("keydown",o)),(i,c)=>($(),St(Hn,{to:"body"},[we(lr,{name:"modal"},{default:ms(()=>[e.open?($(),P("div",{key:0,class:"mask",onClick:c[2]||(c[2]=zt(f=>r("cancel"),["self"]))},[l("div",{class:"dialog",role:"dialog","aria-label":e.title},[l("div",Yv,W(e.title),1),l("div",Jv,W(e.message),1),l("div",Xv,[l("button",{class:"btn btn-sm",onClick:c[0]||(c[0]=f=>r("cancel"))},W(e.cancelText),1),l("button",{class:Xe(["btn btn-sm",e.danger?"btn-danger-solid":"btn-primary"]),onClick:c[1]||(c[1]=f=>r("confirm"))},W(e.confirmText),3)])],8,Gv)])):ye("",!0)]),_:1})]))}}),Nt=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n},Dn=Nt(Qv,[["__scopeId","data-v-2e4b0ab5"]]);var Ku=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Zv(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ld={exports:{}};(function(e,t){((n,r)=>{e.exports=r()})(Ku,function(){var n=function(s,a){return(n=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(u,d){u.__proto__=d}:function(u,d){for(var p in d)Object.prototype.hasOwnProperty.call(d,p)&&(u[p]=d[p])}))(s,a)},r=function(){return(r=Object.assign||function(s){for(var a,u=1,d=arguments.length;u"u"||i.Promise||(i.Promise=Promise);var b=Object.getPrototypeOf,y={}.hasOwnProperty;function _(s,a){return y.call(s,a)}function E(s,a){typeof a=="function"&&(a=a(b(s))),(typeof Reflect>"u"?c:Reflect.ownKeys)(a).forEach(function(u){M(s,u,a[u])})}var C=Object.defineProperty;function M(s,a,u,d){C(s,a,v(u&&_(u,"get")&&typeof u.get=="function"?{get:u.get,set:u.set,configurable:!0}:{value:u,configurable:!0,writable:!0},d))}function J(s){return{from:function(a){return s.prototype=Object.create(a.prototype),M(s.prototype,"constructor",s),{extend:E.bind(null,s.prototype)}}}}var oe=Object.getOwnPropertyDescriptor,ue=[].slice;function ce(s,a,u){return ue.call(s,a,u)}function U(s,a){return a(s)}function T(s){if(!s)throw new Error("Assertion Failed")}function q(s){i.setImmediate?setImmediate(s):setTimeout(s,0)}function Z(s,a){if(typeof a=="string"&&_(s,a))return s[a];if(!a)return s;if(typeof a!="string"){for(var u=[],d=0,p=a.length;d"u"?[]:(Ze=Promise.resolve(),typeof crypto<"u"&&crypto.subtle?[Qe=crypto.subtle.digest("SHA-512",new Uint8Array([0])),b(Qe),Ze]:[Ze,b(Ze),Ze]),Ze=Qe[0],zs=Qe[1],zs=zs&&zs.then,tt=Ze&&Ze.constructor,_t=!!Qe[2],$t=function(s,a){Gn.push([s,a]),Yt&&(queueMicrotask(Ld),Yt=!1)},tn=!0,Yt=!0,nn=[],hs=[],Kt=x,Ot={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:m,pgp:!1,env:{},finalize:m},Be=Ot,Gn=[],ys=0,eo=[];function Pe(s){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var a=this._PSD=Be;if(typeof s!="function"){if(s!==Le)throw new TypeError("Not a function");this._state=arguments[1],this._value=arguments[2],this._state===!1&&Ta(this,this._value)}else this._state=null,this._value=null,++a.ref,function u(d,p){try{p(function(h){if(d._state===null){if(h===d)throw new TypeError("A promise cannot be resolved with itself.");var w=d._lib&&Ns();h&&typeof h.then=="function"?u(d,function(k,K){h instanceof Pe?h._then(k,K):h.then(k,K)}):(d._state=!0,d._value=h,bl(d)),w&&Vs()}},Ta.bind(null,d))}catch(h){Ta(d,h)}}(this,s)}var Ea={get:function(){var s=Be,a=ro;function u(d,p){var h=this,w=!s.global&&(s!==Be||a!==ro),k=w&&!Jn(),K=new Pe(function(Y,F){Aa(h,new gl(_l(d,s,w,k),_l(p,s,w,k),Y,F,s))});return this._consoleTask&&(K._consoleTask=this._consoleTask),K}return u.prototype=Le,u},set:function(s){M(this,"then",s&&s.prototype===Le?Ea:{get:function(){return s},set:Ea.set})}};function gl(s,a,u,d,p){this.onFulfilled=typeof s=="function"?s:null,this.onRejected=typeof a=="function"?a:null,this.resolve=u,this.reject=d,this.psd=p}function Ta(s,a){var u,d;hs.push(a),s._state===null&&(u=s._lib&&Ns(),a=Kt(a),s._state=!1,s._value=a,d=s,nn.some(function(p){return p._value===d._value})||nn.push(d),bl(s),u)&&Vs()}function bl(s){var a=s._listeners;s._listeners=[];for(var u=0,d=a.length;u{for(var w=nn.length;w;)if(nn[--w]._value===h._value)return nn.splice(w,1)})(a),u.resolve(d)}catch(h){u.reject(h)}finally{--ys==0&&Pa(),--u.psd.ref||u.psd.finalize()}}function Ld(){gs(Ot,function(){Ns()&&Vs()})}function Ns(){var s=tn;return Yt=tn=!1,s}function Vs(){var s,a,u;do for(;0.",kl="String expected.",ao="__dbnames",Ma="readonly",Ia="readwrite";function ws(s,a){return s?a?function(){return s.apply(this,arguments)&&a.apply(this,arguments)}:s:a}var xl={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function io(s){return typeof s!="string"||/\./.test(s)?function(a){return a}:function(a){return a[s]===void 0&&s in a&&delete(a=Me(a))[s],a}}function Cl(){throw Fe.Type("Entity instances must never be new:ed. Instances are generated by the framework bypassing the constructor.")}function st(s,a){try{var u=$l(s),d=$l(a);if(u!==d)return u==="Array"?1:d==="Array"?-1:u==="binary"?1:d==="binary"?-1:u==="string"?1:d==="string"?-1:u==="Date"?1:d!=="Date"?NaN:-1;switch(u){case"number":case"Date":case"string":return a{var k=F,K=w;if(typeof K!="function"&&K!==null)throw new TypeError("Class extends value "+String(K)+" is not a constructor or null");function Y(){this.constructor=k}function F(){return w!==null&&w.apply(this,arguments)||this}return n(k,K),k.prototype=K===null?Object.create(K):(Y.prototype=K.prototype,new Y),Object.defineProperty(F.prototype,"db",{get:function(){return a},enumerable:!1,configurable:!0}),F.prototype.table=function(){return u},F})(s)),new Set),p=s.prototype;p;p=b(p))Object.getOwnPropertyNames(p).forEach(function(w){return d.add(w)});function h(w){if(!w)return w;var k,K=Object.create(s.prototype);for(k in w)if(!d.has(k))try{K[k]=w[k]}catch{}return K}return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=h,this.hook("reading",h),s},ht.prototype.defineClass=function(){return this.mapToClass(function(s){v(this,s)})},ht.prototype.add=function(s,a){var u=this,d=this.schema.primKey,p=d.auto,h=d.keyPath,w=s;return h&&p&&(w=io(h)(s)),this._trans("readwrite",function(k){return u.core.mutate({trans:k,type:"add",keys:a!=null?[a]:null,values:[w]})}).then(function(k){return k.numFailures?Pe.reject(k.failures[0]):k.lastResult}).then(function(k){if(h)try{G(s,h,k)}catch{}return k})},ht.prototype.upsert=function(s,a){var u=this,d=this.schema.primKey.keyPath;return this._trans("readwrite",function(p){return u.core.get({trans:p,key:s}).then(function(h){var w=h??{};return Tl(w,a),d&&G(w,d,s),u.core.mutate({trans:p,type:"put",values:[w],keys:[s],upsert:!0,updates:{keys:[s],changeSpecs:[a]}}).then(function(k){return k.numFailures?Pe.reject(k.failures[0]):!!h})})})},ht.prototype.update=function(s,a){return typeof s!="object"||f(s)?this.where(":id").equals(s).modify(a):(s=Z(s,this.schema.primKey.keyPath))===void 0?Tt(new Fe.InvalidArgument("Given object does not contain its primary key")):this.where(":id").equals(s).modify(a)},ht.prototype.put=function(s,a){var u=this,d=this.schema.primKey,p=d.auto,h=d.keyPath,w=s;return h&&p&&(w=io(h)(s)),this._trans("readwrite",function(k){return u.core.mutate({trans:k,type:"put",values:[w],keys:a!=null?[a]:null})}).then(function(k){return k.numFailures?Pe.reject(k.failures[0]):k.lastResult}).then(function(k){if(h)try{G(s,h,k)}catch{}return k})},ht.prototype.delete=function(s){var a=this;return this._trans("readwrite",function(u){return a.core.mutate({trans:u,type:"delete",keys:[s]}).then(function(d){return lo(a,[s],d)}).then(function(d){return d.numFailures?Pe.reject(d.failures[0]):void 0})})},ht.prototype.clear=function(){var s=this;return this._trans("readwrite",function(a){return s.core.mutate({trans:a,type:"deleteRange",range:xl}).then(function(u){return lo(s,null,u)})}).then(function(a){return a.numFailures?Pe.reject(a.failures[0]):void 0})},ht.prototype.bulkGet=function(s){var a=this;return this._trans("readonly",function(u){return a.core.getMany({keys:s,trans:u}).then(function(d){return d.map(function(p){return a.hook.reading.fire(p)})})})},ht.prototype.bulkAdd=function(s,a,u){var d=this,p=Array.isArray(a)?a:void 0,h=(u=u||(p?void 0:a))?u.allKeys:void 0;return this._trans("readwrite",function(w){var k=d.schema.primKey,Y=k.auto,k=k.keyPath;if(k&&p)throw new Fe.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(p&&p.length!==s.length)throw new Fe.InvalidArgument("Arguments objects and keys must have the same length");var K=s.length,Y=k&&Y?s.map(io(k)):s;return d.core.mutate({trans:w,type:"add",keys:p,values:Y,wantResults:h}).then(function(F){var L=F.numFailures,R=F.failures;if(L===0)return h?F.results:F.lastResult;throw new wt("".concat(d.name,".bulkAdd(): ").concat(L," of ").concat(K," operations failed"),R)})})},ht.prototype.bulkPut=function(s,a,u){var d=this,p=Array.isArray(a)?a:void 0,h=(u=u||(p?void 0:a))?u.allKeys:void 0;return this._trans("readwrite",function(w){var k=d.schema.primKey,Y=k.auto,k=k.keyPath;if(k&&p)throw new Fe.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(p&&p.length!==s.length)throw new Fe.InvalidArgument("Arguments objects and keys must have the same length");var K=s.length,Y=k&&Y?s.map(io(k)):s;return d.core.mutate({trans:w,type:"put",keys:p,values:Y,wantResults:h}).then(function(F){var L=F.numFailures,R=F.failures;if(L===0)return h?F.results:F.lastResult;throw new wt("".concat(d.name,".bulkPut(): ").concat(L," of ").concat(K," operations failed"),R)})})},ht.prototype.bulkUpdate=function(s){var a=this,u=this.core,d=s.map(function(w){return w.key}),p=s.map(function(w){return w.changes}),h=[];return this._trans("readwrite",function(w){return u.getMany({trans:w,keys:d,cache:"clone"}).then(function(k){var K=[],Y=[],F=(s.forEach(function(L,R){var H=L.key,V=L.changes,N=k[R];if(N){for(var B=0,se=Object.keys(V);BQ+le&&B(Q+Y)})})}var se=Us(u)&&u.limit===1/0&&(typeof s!="function"||V)&&{index:u.index,range:u.range};return B(0).then(function(){if(0{for(var We=Math.min(ge.length,Ne.length),Je=-1,nt=0;nt=R})).length===0?Pe.resolve():(B.forEach(function(Q){N.push(function(){var le,pe,me,xe=se,ge=Q._cfg.dbschema,Ke=(go(L,xe,V),go(L,ge,V),se=L._dbSchema=ge,Va(xe,ge)),_e=(Ke.add.forEach(function(Ne){Ba(V,Ne[0],Ne[1].primKey,Ne[1].indexes)}),Ke.change.forEach(function(Ne){if(Ne.recreate)throw new Fe.Upgrade("Not yet support for changing primary key");var ve=V.objectStore(Ne.name);Ne.add.forEach(function(ze){return ho(ve,ze)}),Ne.change.forEach(function(ze){ve.deleteIndex(ze.name),ho(ve,ze)}),Ne.del.forEach(function(ze){return ve.deleteIndex(ze)})}),Q._cfg.contentUpgrade);if(_e&&Q._cfg.version>R)return vo(L,V),H._memoizedTables={},le=re(ge),Ke.del.forEach(function(Ne){le[Ne]=xe[Ne]}),Na(L,[L.Transaction.prototype]),mo(L,[L.Transaction.prototype],c(le),le),H.schema=le,(pe=De(_e))&&Bs(),ge=Pe.follow(function(){var Ne;(me=_e(H))&&pe&&(Ne=Jn.bind(null,null),me.then(Ne,Ne))}),me&&typeof me.then=="function"?Pe.resolve(me):ge.then(function(){return me})}),N.push(function(le){var pe,me,xe=Q._cfg.dbschema;pe=xe,me=le,[].slice.call(me.db.objectStoreNames).forEach(function(ge){return pe[ge]==null&&me.db.deleteObjectStore(ge)}),Na(L,[L.Transaction.prototype]),mo(L,[L.Transaction.prototype],L._storeNames,L._dbSchema),H.schema=L._dbSchema}),N.push(function(le){L.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(L.idbdb.version/10)===Q._cfg.version?(L.idbdb.deleteObjectStore("$meta"),delete L._dbSchema.$meta,L._storeNames=L._storeNames.filter(function(pe){return pe!=="$meta"})):le.objectStore("$meta").put(Q._cfg.version,"version"))})}),function Q(){return N.length?Pe.resolve(N.shift()(H.idbtrans)).then(Q):Pe.resolve()}().then(function(){Kl(se,V)}))}).catch(w);var K,Y;c(p).forEach(function(F){Ba(u,F,p[F].primKey,p[F].indexes)}),vo(s,u),Pe.follow(function(){return s.on.populate.fire(h)}).catch(w)})}function Yd(s,a){Kl(s._dbSchema,a),a.db.version%10!=0||a.objectStoreNames.contains("$meta")||a.db.createObjectStore("$meta").add(Math.ceil(a.db.version/10-1),"version");var u=yo(0,s.idbdb,a);go(s,s._dbSchema,a);for(var d=0,p=Va(u,s._dbSchema).change;d{if(w.change.length||w.recreate)return console.warn("Unable to patch indexes of table ".concat(w.name," because it has changes on the type of index or primary key.")),{value:void 0};var k=a.objectStore(w.name);w.add.forEach(function(K){Ce&&console.debug("Dexie upgrade patch: Creating missing index ".concat(w.name,".").concat(K.src)),ho(k,K)})})(p[d]);if(typeof h=="object")return h.value}}function Va(s,a){var u,d={del:[],add:[],change:[]};for(u in s)a[u]||d.del.push(u);for(u in a){var p=s[u],h=a[u];if(p){var w={name:u,def:h,recreate:!1,del:[],add:[],change:[]};if(""+(p.primKey.keyPath||"")!=""+(h.primKey.keyPath||"")||p.primKey.auto!==h.primKey.auto)w.recreate=!0,d.change.push(w);else{var k=p.idxByName,K=h.idxByName,Y=void 0;for(Y in k)K[Y]||w.del.push(Y);for(Y in K){var F=k[Y],L=K[Y];F?F.src!==L.src&&w.change.push(L):w.add.push(L)}(0{var s,a,u;return typeof FinalizationRegistry<"u"&&typeof WeakRef<"u"?(s=new Set,a=new FinalizationRegistry(function(d){s.delete(d)}),{toArray:function(){return Array.from(s).map(function(d){return d.deref()}).filter(function(d){return d!==void 0})},add:function(d){var p=new WeakRef(d._novip);s.add(p),a.register(d._novip,p,p),s.size>d._options.maxConnections&&(p=s.values().next().value,s.delete(p),a.unregister(p))},remove:function(d){if(d)for(var p=s.values(),h=p.next();!h.done;){var w=h.value;if(w.deref()===d._novip)return s.delete(w),void a.unregister(w);h=p.next()}}}):(u=[],{toArray:function(){return u},add:function(d){u.push(d._novip)},remove:function(d){d&&(d=u.indexOf(d._novip))!==-1&&u.splice(d,1)}})})();function Ua(s,a){var u=s._dbNamesDB;return u||(u=s._dbNamesDB=new Kn(ao,{addons:[],indexedDB:s,IDBKeyRange:a})).version(1).stores({dbnames:"name"}),u.table("dbnames")}function qa(s){return s&&typeof s.databases=="function"}function Ha(s){return Yn(function(){return Be.letThrough=!0,s()})}function za(s){return!("from"in s)}var Bt=function(s,a){var u;if(!this)return u=new Bt,s&&"d"in s&&v(u,s),u;v(this,arguments.length?{d:1,from:s,to:1Math.pow(2,62)?0:B.oldVersion,L=se<1,s.idbdb=N.result,h&&Yd(s,F),Gd(s,se/10,F,H))},H),N.onsuccess=kt(function(){F=null;var B,se,Q,le,pe,me,xe=s.idbdb=N.result,ge=ce(xe.objectStoreNames);if(0"u"?Pe.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(R){function H(){return indexedDB.databases().finally(R)}K=setInterval(H,100),H()}).finally(function(){return clearInterval(K)}):Promise.resolve()).then(k)]).then(function(){return w(),a.onReadyBeingFired=[],Pe.resolve(Ha(function(){return s.on.ready.fire(s.vip)})).then(function R(){var H;if(0a.limit?d.length=a.limit:s.length===a.limit&&d.length{if(u===void 0)return d!==void 0?-1:0;if(d===void 0)return 1;if((u=st(u,d))===0){if(p&&h)return 0;if(p)return 1;if(h)return-1}return u})(s.lower,a.lower,s.lowerOpen,a.lowerOpen)<=0&&0<=((u,d,p,h)=>{if(u===void 0)return d!==void 0?1:0;if(d===void 0)return-1;if((u=st(u,d))===0){if(p&&h)return 0;if(p)return-1;if(h)return 1}return u})(s.upper,a.upper,s.upperOpen,a.upperOpen)}function sf(s,a,u,d){s.subscribers.add(u),d.addEventListener("abort",function(){var p,h;s.subscribers.delete(u),s.subscribers.size===0&&(p=s,h=a,setTimeout(function(){p.subscribers.size===0&&de(h,p)},3e3))})}var rf={stack:"dbcore",level:0,name:"Cache",create:function(s){var a=s.schema.name;return r(r({},s),{transaction:function(u,d,p){var h,w,k=s.transaction(u,d,p);return d==="readwrite"&&(p=(h=new AbortController).signal,k.addEventListener("abort",(w=function(K){return function(){if(h.abort(),d==="readwrite"){for(var Y=new Set,F=0,L=u;F{var se=_s["idb://".concat(H,"/").concat(V)];if(!se)return[];if(!(H=se.queries[N]))return[null,!1,se,null];var Q=H[(B.query?B.query.index.name:null)||""];if(!Q)return[null,!1,se,null];switch(N){case"query":var le=(pe=B.direction)!=null?pe:"next",pe=Q.find(function(me){var xe;return me.req.limit===B.limit&&me.req.values===B.values&&((xe=me.req.direction)!=null?xe:"next")===le&&Gl(me.req.query.range,B.query.range)});return pe?[pe,!0,se,Q]:[Q.find(function(me){var xe;return("limit"in me.req?me.req.limit:1/0)>=B.limit&&((xe=me.req.direction)!=null?xe:"next")===le&&(!B.values||me.req.values)&&nf(me.req.query.range,B.query.range)}),!1,se,Q];case"count":return pe=Q.find(function(me){return Gl(me.req.query.range,B.query.range)}),[pe,!!pe,se,Q]}})(a,u,"query",h),R=L[0],Y=L[2],F=L[3],R&&L[1]?R.obsSet=h.obsSet:(L=d.query(h).then(function(H){var V=H.result;if(R&&(R.res=V),w){for(var N=0,B=V.length;N{var pe=Ns();try{h&&Bs();var me=Yn(s,le);return me=h?me.finally(Jn):me}finally{pe&&Vs()}})(se={subscr:B,signal:w.signal,requery:R,querier:s,trans:null}),L||(Zn.storagemutated.subscribe(V),L=!0),Promise.resolve(Q).then(function(le){u=!0,a=le,k||se.signal.aborted||(H()||(Y=B,H())?R():(K={},Oa(function(){return!k&&p.next&&p.next(le)})))},function(le){u=!1,["DatabaseClosedError","AbortError"].includes(le==null?void 0:le.name)||k||Oa(function(){k||p.error&&p.error(le)})}))};return setTimeout(R,0),F});return d.hasValue=function(){return u},d.getValue=function(){return a},d}var ks=Kn;function ni(s){var a=es;try{es=!0,Zn.storagemutated.fire(s),Ja(s,!0)}finally{es=a}}E(ks,r(r({},$e),{delete:function(s){return new ks(s,{addons:[]}).delete()},exists:function(s){return new ks(s,{addons:[]}).open().then(function(a){return a.close(),!0}).catch("NoSuchDatabaseError",function(){return!1})},getDatabaseNames:function(s){try{return a=ks.dependencies,u=a.indexedDB,a=a.IDBKeyRange,(qa(u)?Promise.resolve(u.databases()).then(function(d){return d.map(function(p){return p.name}).filter(function(p){return p!==ao})}):Ua(u,a).toCollection().primaryKeys()).then(s)}catch{return Tt(new Fe.MissingAPI)}var a,u},defineClass:function(){return function(s){v(this,s)}},ignoreTransaction:function(s){return Be.trans?gs(Be.transless||Ot,s):s()},vip:Ha,async:function(s){return function(){try{var a=Xa(s.apply(this,arguments));return a&&typeof a.then=="function"?a:Pe.resolve(a)}catch(u){return Tt(u)}}},spawn:function(s,a,u){try{var d=Xa(s.apply(u,a||[]));return d&&typeof d.then=="function"?d:Pe.resolve(d)}catch(p){return Tt(p)}},currentTransaction:{get:function(){return Be.trans||null}},waitFor:function(s,a){return s=Pe.resolve(typeof s=="function"?ks.ignoreTransaction(s):s).timeout(a||6e4),Be.trans?Be.trans.waitFor(s):s},Promise:Pe,debug:{get:function(){return Ce},set:function(s){be(s)}},derive:J,extend:v,props:E,override:U,Events:fr,on:Zn,liveQuery:Yl,extendObservabilitySet:wo,getByKeyPath:Z,setByKeyPath:G,delByKeyPath:function(s,a){typeof a=="string"?G(s,a,void 0):"length"in a&&[].map.call(a,function(u){G(s,u,void 0)})},shallowClone:re,deepClone:Me,getObjectDiff:Qa,cmp:st,asap:q,minKey:-1/0,addons:[],connections:{get:yr.toArray},errnames:Vt,dependencies:Co,cache:_s,semVer:"4.4.6",version:"4.4.6".split(".").map(function(s){return parseInt(s)}).reduce(function(s,a,u){return s+a/Math.pow(10,2*u)})})),ks.maxKey=mr(ks.dependencies.IDBKeyRange),typeof dispatchEvent<"u"&&typeof addEventListener<"u"&&(Zn(po,function(s){es||(s=new CustomEvent(La,{detail:s}),es=!0,dispatchEvent(s),es=!1)}),addEventListener(La,function(s){s=s.detail,es||ni(s)}));var Ws,es=!1,Jl=function(){};return typeof BroadcastChannel<"u"&&((Jl=function(){(Ws=new BroadcastChannel(La)).onmessage=function(s){return s.data&&ni(s.data)}})(),typeof Ws.unref=="function"&&Ws.unref(),Zn(po,function(s){es||Ws.postMessage(s)})),typeof addEventListener<"u"&&(addEventListener("pagehide",function(s){if(!Kn.disableBfCache&&s.persisted){Ce&&console.debug("Dexie: handling persisted pagehide"),Ws!=null&&Ws.close();for(var a=0,u=yr.toArray();a{const r={dev:"项目实操",test:"项目实操",bugfix:"售后服务",learning:"产品学习",meeting:"打杂",doc:"打杂",other:"打杂"};await n.table("log_item").toCollection().modify(o=>{o.category&&r[o.category]&&(o.category=r[o.category])})}),this.version(6).stores({plan:"++id, date, status, goal_id",goal:"++id, start_date"})}}let ie;function sm(e){ie=e}function cl(){ie&&ie.close(),ie=void 0}const rm=6,Fu=["公司","客户现场","出差","居家办公"],om={dev:"项目实操",test:"项目实操",bugfix:"售后服务",learning:"产品学习",meeting:"打杂",doc:"打杂",other:"打杂"};function Ur(e){return om[e]||e}function Mr(e){return e<10?"0"+e:String(e)}function qn(e){return e.getFullYear()+"-"+Mr(e.getMonth()+1)+"-"+Mr(e.getDate())}function ot(){return qn(new Date)}function at(){const e=new Date;return qn(e)+"T"+Mr(e.getHours())+":"+Mr(e.getMinutes())+":"+Mr(e.getSeconds())}function bn(e){if(!e)return"--:--";const t=e.indexOf("T");return t>=0?e.slice(t+1,t+6):e.slice(0,5)}function Rs(e){const t=e.split("-").map(Number);return new Date(t[0],t[1]-1,t[2])}function Ft(e,t){const n=Rs(e);return n.setDate(n.getDate()+t),qn(n)}function na(e,t){const n=Rs(e),r=n.getDate();n.setDate(1),n.setMonth(n.getMonth()+t);const o=new Date(n.getFullYear(),n.getMonth()+1,0).getDate();return n.setDate(Math.min(r,o)),qn(n)}function Qs(e){const t=Rs(e),n=(t.getDay()+6)%7;return t.setDate(t.getDate()-n),qn(t)}function am(e){const t=Rs(e).getDay();return t===0||t===6}function im(e,t){return Math.round((new Date(t).getTime()-new Date(e).getTime())/6e4)}function ud(e){const t=Rs(e),n=["周日","周一","周二","周三","周四","周五","周六"];return t.getFullYear()+" 年 "+(t.getMonth()+1)+" 月 "+t.getDate()+" 日 "+n[t.getDay()]}const lm=15e4;function Ki(e){const t=new Uint8Array(e);let n="";for(let r=0;r({}));if(!o.ok){const c=i&&i.error||"服务返回 "+o.status;throw e==="register"&&o.status===409?new Error("云端已有同名账号且密码一致,直接登录即可"):new Error(String(c))}if(!i.userId||!i.username)throw new Error("登录响应异常");return{userId:String(i.userId),username:String(i.username)}}async function vl(e,t,n){const r=await Em(n,e,t);ia(r.userId);const o={userId:r.userId,username:r.username};return $m(o),md(r.username,t),o}async function Tm(e,t){const n=(e||"").trim();if(!n||!t)throw new Error("请输入用户名与密码");return vl(n,t,"login")}async function Am(e,t,n){const r=(e||"").trim();if(r.length<2||r.length>20)throw new Error("用户名需 2 到 20 个字符");if(t.length<6)throw new Error("登录密码至少 6 位");return vl(r,t,"register")}async function Pm(){const e=wn();if(!e)return null;try{return await vl(e.username,e.password,"login")}catch{return null}}async function Om(){oa(),cl(),aa=null,vd()}function Mm(){oa(),cl(),aa=null,vd(),Sm()}async function Im(e,t){if(!Hr())throw new Error("未登录");if(t.length<6)throw new Error("新密码至少 6 位");const r=wn();if(!r||r.password!==e)throw new Error("旧密码不正确");const o=await Fs();let i;try{i=await fetch(o+"/api/auth/password",{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+hd()},body:JSON.stringify({oldPassword:e,newPassword:t})})}catch{throw new Error("无法连接同步服务器")}if(!i.ok){const c=await i.json().catch(()=>({}));throw new Error(c&&c.error||"修改失败 "+i.status)}md(r.username,t)}async function jm(){if(!Hr())throw new Error("未登录");const t=await Fs();let n;try{n=await fetch(t+"/api/auth/delete",{method:"POST",headers:{Authorization:"Bearer "+hd()}})}catch{throw new Error("无法连接同步服务器")}if(!n.ok){const r=await n.json().catch(()=>({}));throw new Error(r&&r.error||"删除失败 "+n.status)}Mm()}function hd(){return $a()}const Ni=O(null),Vi=O(null),ur=O(0);function os(){ur.value++}const Zs=O(""),zr=["project","work_log","log_item","attendance","weekly_note","setting","memo","credential","goal","transaction","plan"],Js=new Set(["sync_cursor","sync_last_time","sync_token","last_project","last_category"]);function Ko(e){return JSON.stringify(e)}async function Dm(e){return ie.table(e).toArray()}function Ro(e,t){return e==="setting"?t.key:t.id}async function Lm(){for(const e of zr){const t=ie.table(e),n=await t.toArray();for(const r of n){if(e==="setting"&&Js.has(r.key))continue;const o={};r.uuid||(o.uuid=Km()),!r.updated_at&&r.created_at&&(o.updated_at=r.created_at),Object.keys(o).length&&await t.update(Ro(e,r),o)}}}function Km(){return typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():"u"+Date.now().toString(36)+Math.random().toString(36).slice(2,10)}async function Rm(){return wn()!=null}async function Fm(){try{return localStorage.getItem("dsh_last_sync")||""}catch{return""}}async function Nm(e){try{localStorage.setItem("dsh_last_sync",e)}catch{}}async function yd(e,t){const n=await fetch(e+"/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:t.username.trim(),password:t.password})});if(!n.ok)throw new Error("云端账号或密码不正确");const r=await n.json();if(!r||!r.token)throw new Error("云端登录异常");return String(r.token)}async function Vm(e,t){let n=$a();return n||(n=await yd(e,t),qr(n),n)}async function gd(){const e=wn();if(!e)throw new Error("未登录");const t=await Fs(),n=await fetch(t+"/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:e.username,password:e.password})});if(!n.ok)throw new Error("云端账号校验失败:"+n.status)}async function Bi(){const e=wn();if(!e)throw new Error("未登录,无法同步");return kd({baseUrl:await Fs(),username:e.username,password:e.password})}async function bd(){try{await Bi()}catch(e){Zs.value=e instanceof Error?e.message:String(e);try{await Bi()}catch{}throw e}}function wd(e,t,n){const r={};for(const o of Object.keys(t))o!=="id"&&(r[o]=t[o]);if(e==="log_item"){delete r.work_log_id,delete r.project_id;const o=t.work_log_id?n.workLog.get(t.work_log_id):null;o&&o.uuid&&(r.wuuid=o.uuid);const i=t.project_id?n.project.get(t.project_id):null;i&&i.uuid&&(r.puuid=i.uuid)}if(e==="plan"){delete r.goal_id;const o=t.goal_id?n.goal.get(t.goal_id):null;o&&o.uuid&&(r.guuid=o.uuid)}return r}async function _d(){const e=await ie.work_log.toArray(),t=await ie.project.toArray(),n=await ie.goal.toArray();return{workLog:new Map(e.map(r=>[r.id,r])),project:new Map(t.map(r=>[r.id,r])),goal:new Map(n.map(r=>[r.id,r]))}}let Ir=!1,Fo=!1,Ui=!1,er=null,$n=null,qi="",Hi=!1,No=null;async function tr(){if(Ir){Fo=!0;return}try{if(!await Rm())return;await kd(await Bm()),Zs.value=""}catch(e){Zs.value=e instanceof Error?e.message:String(e)}}async function Bm(){const e=wn();if(!e)throw new Error("未登录,无法同步");return{baseUrl:await Fs(),username:e.username,password:e.password}}function Um(){if(Hi)return;Hi=!0,No=tm(async()=>{const t={};for(const n of zr)t[n]=await ie.table(n).count();return t}).subscribe({next:()=>{Ui||Ir||(er&&globalThis.clearTimeout(er),er=globalThis.setTimeout(()=>{tr()},3e3))},error:()=>{}})}function qm(){No&&(No.unsubscribe(),No=null),$n&&($n.close(),$n=null,qi=""),er&&(globalThis.clearTimeout(er),er=null),Hi=!1}function Hm(e,t){const n=e+"|"+t;if(!($n&&qi===n)){$n&&($n.close(),$n=null);try{$n=new EventSource(e+"/api/events?token="+encodeURIComponent(t)),qi=n,$n.onmessage=()=>{tr()}}catch{$n=null}}}async function kd(e){if(Ir)return Fo=!0,{pushed:0,pulled:0,removed:0,errors:0,at:""};Ir=!0,Ui=!0;try{const t=await zm(e);return Fo&&(Fo=!1,globalThis.setTimeout(()=>{tr()},800)),t}finally{Ir=!1,Ui=!1}}async function zm(e){const t=e.baseUrl.trim().replace(/\/+$/,"");if(!t)throw new Error("请先配置同步服务地址");await Lm();const n=await _d(),r=await ie.sync_mirror.toArray(),o=new Map;for(const oe of r)o.set(oe.table+"|"+oe.uuid,oe);const i={},c=[];let f=0;for(const oe of zr){let ue=await Dm(oe);oe==="setting"&&(ue=ue.filter(U=>!Js.has(U.key)));const ce=new Map;for(const U of ue)ce.set(U.uuid,U);for(const[U,T]of ce){const q=wd(oe,T,n),Z=Ko(q),G=o.get(oe+"|"+U);(!G||G.hash!==Z)&&(i[oe]=i[oe]||[],i[oe].push(q),f++)}for(const[U,T]of o)U.startsWith(oe+"|")&&!ce.has(T.uuid)&&c.push({table:oe,uuid:T.uuid,deleted_at:at()});i[oe]=i[oe]||[]}c.push(...Xm());const v=await Vm(t,e),b=oe=>fetch(t+"/api/sync",{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+oe},body:JSON.stringify({device:"client",tables:i,tombstones:c})});let y=await b(v);if(y.status===401){qr("");const oe=await yd(t,e);qr(oe),y=await b(oe)}if(!y.ok)throw new Error("同步服务返回 "+y.status);const _=await y.json(),E=_.tables||{},C=_.tombstones||[],M=await Ym(E,C);Hm(t,$a()||v);const J=at();return await Nm(J),(M.changed>0||M.removed>0||f>0)&&os(),{pushed:f,pulled:M.changed,removed:M.removed,errors:0,at:J}}function xd(){var t;return"dsh_idmap_"+(((t=wn())==null?void 0:t.username)||"anon")}function Wm(){try{const e=localStorage.getItem(xd());if(e)return JSON.parse(e)}catch{}return{}}function Gm(e){try{localStorage.setItem(xd(),JSON.stringify(e))}catch{}}async function Ym(e,t){const n=Wm(),r=new Set(t.map(C=>C.table+"|"+C.uuid)),o=new Map;for(const C of await ie.sync_mirror.toArray())o.set(C.table+"|"+C.uuid,C);const i=new Set(Array.from(o.keys()).map(C=>C.split("|")[1]));let c=0,f=0;const v={},b={},y={};for(const C of zr){const M=ie.table(C),J=await M.toArray(),oe=new Map(J.map(S=>[Ro(C,S),S])),ue=new Map(J.filter(S=>S.uuid).map(S=>[S.uuid,S])),ce=(e[C]||[]).filter(S=>!r.has(C+"|"+S.uuid)),U=ce.filter(S=>!(C==="setting"&&Js.has(S.key))),T=ce.filter(S=>C==="setting"&&Js.has(S.key));for(const S of T)Jm(C,S.uuid);const q=C==="setting"?[]:J.filter(S=>S.uuid&&!i.has(S.uuid)&&!r.has(C+"|"+S.uuid)),Z={v:Math.max(0,...J.map(S=>Number(S.id)||0))};U.length;const G=[];for(const S of U){const j={...S};if(C==="log_item"){const Ee=j.wuuid?v[j.wuuid]:void 0;if(!Ee)continue;j.work_log_id=Ee,delete j.wuuid,j.project_id=j.puuid?b[j.puuid]??null:null,delete j.puuid}if(C==="plan")if(j.guuid){const Ee=y[j.guuid];j.goal_id=Ee??null,delete j.guuid}else j.goal_id=null;let ne=Ro(C,S);if(C==="setting")ne=S.key;else{const Ee=n[C]&&n[C][S.uuid],he=ue.get(S.uuid);he&&he.id!=null?ne=he.id:typeof Ee=="number"?ne=Ee:ne=++Z.v}const Me={...j,id:ne};C==="setting"&&Js.has(Me.key)||(G.push(Me),C==="work_log"&&(v[S.uuid]=ne),C==="project"&&(b[S.uuid]=ne),C==="goal"&&(y[S.uuid]=ne))}const re=G.concat(q);for(const S of re){const j=oe.get(Ro(C,S));(!j||Ko(j)!==Ko(S))&&c++}f+=J.filter(S=>S.uuid&&!G.some(j=>j.uuid===S.uuid)&&!r.has(C+"|"+S.uuid)).length,await M.clear(),re.length&&await M.bulkPut(re);const I={};for(const S of re)S.uuid&&(I[S.uuid]=S.id);n[C]=I}Gm(n);const _=await _d(),E=[];for(const C of zr){const M=await ie.table(C).toArray();for(const J of M)C==="setting"&&Js.has(J.key)||J.uuid&&E.push({table:C,uuid:J.uuid,hash:Ko(wd(C,J,_))})}return await ie.sync_mirror.clear(),E.length&&await ie.sync_mirror.bulkAdd(E.map(C=>({...C}))),await ie.tombstone.clear(),{changed:c,removed:f+la.length}}const la=[];function Jm(e,t){la.some(n=>n.table===e&&n.uuid===t)||la.push({table:e,uuid:t,deleted_at:at()})}function Xm(){return la.splice(0)}const Qm=new Set(["sync_cursor","sync_last_time","sync_token","last_project","last_category"]);async function it(){await bd()}async function xt(e,t){const n=await ie.setting.get(e);return n?n.value:t}async function It(e,t){await ie.setting.put({key:e,value:t}),Qm.has(e)||await it()}async function ps(){const e=await Promise.all([xt("work_start","09:00"),xt("work_end","18:00"),xt("grace_minutes","10"),xt("lunch_minutes","60"),xt("remind_weekly","friday")]);return{work_start:e[0],work_end:e[1],grace_minutes:Number(e[2])||0,lunch_minutes:Number(e[3])||0,remind_weekly:e[4]}}async function Zm(){return xt("last_location","")}async function eh(e,t){const n=t.trim();await It("last_location",n),n&&await ua(n);let r=!1;const o=await _n(e);o&&o.id?(o.location||"")!==n&&(await ie.attendance.update(o.id,{location:n||null}),r=!0):n&&(await ie.attendance.add({date:e,clock_in_at:null,clock_out_at:null,kind:"normal",note:null,location:n,created_at:at()}),r=!0),r&&await it()}async function ml(){const e=await xt("location_presets","");if(!e)return Fu.slice();try{const t=JSON.parse(e);if(Array.isArray(t))return t.filter(n=>typeof n=="string"&&n.trim()).map(n=>n.trim())}catch{}return Fu.slice()}async function Cd(e){const t=Array.from(new Set(e.map(n=>n.trim()).filter(Boolean)));await It("location_presets",JSON.stringify(t))}async function ua(e){const t=e.trim();if(!t)return;const n=await ml();n.includes(t)||await Cd([...n,t])}async function rr(e=!1){const t=await ie.project.orderBy("name").toArray();return e?t:t.filter(n=>n.archived!==1)}async function th(e){await ie.project.add({name:e.trim(),archived:0,created_at:at()}),await it()}async function nh(e,t){await ie.project.update(e,{name:t.trim()}),await it()}async function sh(e,t){await ie.project.update(e,{archived:t?1:0}),await it()}async function _n(e){return ie.attendance.where("date").equals(e).first()}async function $d(e,t){const n=((t===void 0?await xt("last_location",""):t)||"").trim();let r=!1;const o=await _n(e);if(o&&o.id){if(!o.clock_in_at){const i={clock_in_at:at()};n&&(i.location=n),await ie.attendance.update(o.id,i),r=!0}n&&(await xt("last_location","")!==n&&await It("last_location",n),await ua(n)),r&&await it();return}await ie.attendance.add({date:e,clock_in_at:at(),clock_out_at:null,kind:"normal",note:null,location:n||null,created_at:at()}),n&&(await It("last_location",n),await ua(n)),await it()}async function rh(e){const t=await _n(e);t&&t.id&&t.clock_in_at&&!t.clock_out_at&&(await ie.attendance.update(t.id,{clock_out_at:at()}),await it())}async function oh(){const e=new Date,t=qn(e);let n="";if(e.getHours()<4){const r=await _n(Ft(t,-1));r&&r.id&&r.clock_in_at&&!r.clock_out_at&&(await ie.attendance.update(r.id,{clock_out_at:at()}),n=r.date)}if(!n){const r=await _n(t);r&&r.id&&r.clock_in_at&&!r.clock_out_at&&(await ie.attendance.update(r.id,{clock_out_at:at()}),n=r.date)}if(!n)throw new Error("没有进行中的打卡");return await it(),n}async function ah(e,t,n,r,o){(o||"").trim()&&await ua(o);const i=await _n(e),c={date:e,clock_in_at:t,clock_out_at:n,kind:"makeup",note:r||null,location:(o||"").trim()||null,created_at:at()};i&&i.id?await ie.attendance.update(i.id,c):await ie.attendance.add(c),await it()}async function ih(e,t,n){const r=(n||"").trim();if(!r)return;const o=await _n(e);o&&o.id&&(await ie.attendance.update(o.id,{[t]:e+"T"+r+":00"}),await it())}async function Xr(e,t){return ie.attendance.where("date").between(e,t,!0,!0).toArray()}async function lh(e,t){const n=await _n(e);if(t){const r={date:e,kind:"leave",clock_in_at:null,clock_out_at:null,created_at:at()};n&&n.id?await ie.attendance.update(n.id,r):await ie.attendance.add({...r,note:null,location:null})}else n&&n.id&&await ie.attendance.update(n.id,{kind:"normal"});await it()}async function uh(e){const t=await ie.work_log.where("date").equals(e).first();return t||{id:await ie.work_log.add({date:e,created_at:at()}),date:e,created_at:at()}}async function ch(e){return ie.work_log.where("date").equals(e).first()}async function dh(e){const t=await ch(e);return!t||!t.id?[]:(await ie.log_item.where("work_log_id").equals(t.id).toArray()).sort((r,o)=>o.id-r.id)}async function fh(e,t){const n=await ie.work_log.where("date").equals(e).first();let r;n&&n.id?r=n:r=await uh(e),await ie.table("log_item").add({work_log_id:r.id,content:t.content,project_id:t.project_id,category:t.category,minutes:t.minutes,is_milestone:0,needs_followup:0,takeaway:t.takeaway,remark:t.remark,sort_order:0,created_at:at()});const o=t.project_id?String(t.project_id):"";await xt("last_project","")!==o&&await It("last_project",o),await xt("last_category","")!==t.category&&await It("last_category",t.category),await it()}async function gi(e,t){await ie.table("log_item").update(e,t),await it()}async function ph(e){await ie.table("log_item").delete(e),await it()}async function Qr(e,t){const n=await ie.work_log.where("date").between(e,t,!0,!0).toArray();if(!n.length)return[];const r=new Map(n.map(i=>[i.id,i.date]));return(await ie.table("log_item").where("work_log_id").anyOf(n.map(i=>i.id)).toArray()).map(i=>({...i,date:r.get(i.work_log_id)||""})).sort((i,c)=>i.date===c.date?i.id-c.id:i.daten.start_time!!n.timer_started_at).toArray();for(const n of t)n.id!==e&&await yl(n.id);await ie.plan.update(e,{timer_started_at:at(),updated_at:at()}),await it()}async function yl(e){const t=await ie.plan.get(e);if(!t||!t.timer_started_at)return;const n=Math.max(0,Math.round((Date.now()-new Date(t.timer_started_at).getTime())/6e4));await ie.plan.update(e,{actual_minutes:(t.actual_minutes||0)+n,timer_started_at:null,updated_at:at()}),await it()}const kh=366;function xh(e,t){const n=[];let r=e,o=0;for(;r<=t&&oo.status==="done").length,total:r.length})}return t}async function $h(){return(await ie.goal.toArray()).sort((t,n)=>t.start_datet.updated_at[c.id,c.date]));return(await ie.table("log_item").toArray()).filter(c=>((c.content||"")+" "+(c.takeaway||"")+" "+(c.remark||"")).toLowerCase().includes(n)).sort((c,f)=>f.id-c.id).slice(0,t).map(c=>({...c,date:o.get(c.work_log_id)||""}))}async function jh(e,t=4){const n=e.trim().toLowerCase();return n?(await ie.memo.toArray()).filter(o=>((o.title||"")+" "+(o.content||"")).toLowerCase().includes(n)).sort((o,i)=>o.updated_at{await Promise.all([ie.project.clear(),ie.work_log.clear(),r.clear(),ie.attendance.clear(),ie.weekly_note.clear(),ie.setting.clear(),ie.memo.clear(),ie.credential.clear(),o.clear(),c.clear(),i.clear()]),n.project&&n.project.length&&await ie.project.bulkAdd(n.project),n.work_log&&n.work_log.length&&await ie.work_log.bulkAdd(n.work_log),n.log_item&&n.log_item.length&&await r.bulkAdd(n.log_item),n.attendance&&n.attendance.length&&await ie.attendance.bulkAdd(n.attendance),n.weekly_note&&n.weekly_note.length&&await ie.weekly_note.bulkAdd(n.weekly_note),n.setting&&n.setting.length&&await ie.setting.bulkAdd(n.setting),n.memo&&n.memo.length&&await ie.memo.bulkAdd(n.memo),n.credential&&n.credential.length&&await ie.credential.bulkAdd(n.credential),n.transaction&&n.transaction.length&&await o.bulkAdd(n.transaction),n.goal&&n.goal.length&&await c.bulkAdd(n.goal),n.plan&&n.plan.length&&await i.bulkAdd(n.plan)}),await it()}const Bh=["制度学习","产品学习","打杂","项目实操","售后服务"],Uh=["餐饮","交通","住房","通讯","学习","娱乐","其他"],qh=["工资","报销","其他"],Sd="log_categories",Ed="ledger_expense_categories",Td="ledger_income_categories";function Ad(e,t){if(!e)return t.slice();try{const n=JSON.parse(e);if(Array.isArray(n)){const r=n.filter(o=>typeof o=="string"&&o.trim()).map(o=>o.trim());if(r.length)return Array.from(new Set(r))}}catch{}return t.slice()}async function Zr(){return Ad(await xt(Sd,""),Bh)}async function bi(e){await It(Sd,JSON.stringify(e))}async function Wr(e){return Ad(await xt(e==="expense"?Ed:Td,""),e==="expense"?Uh:qh)}async function Ts(e,t){await It(e==="expense"?Ed:Td,JSON.stringify(t))}const Hh={class:"dialog",role:"dialog","aria-label":"编辑工作记录"},zh={class:"dialog-head"},Wh={class:"dialog-title"},Gh={key:0,class:"muted dialog-sub"},Yh={class:"dialog-body"},Jh={class:"form-grid"},Xh={class:"field span2"},Qh={key:0,class:"form-error"},Zh={class:"field"},ey=["value"],ty={class:"field"},ny=["value"],sy={class:"field"},ry={class:"field"},oy={class:"field span2"},ay={class:"field"},iy={class:"field"},ly={class:"dialog-btns"},uy=Lt({__name:"EditLogDialog",props:{open:{type:Boolean},item:{},projects:{},date:{}},emits:["cancel","save"],setup(e,{emit:t}){const n=O([]);Zr().then(ce=>{n.value=ce});const r=e,o=t,i=O(""),c=O(null),f=O("dev"),v=O(null),b=O(""),y=O(""),_=O(0),E=O(0),C=O(""),M=O(null),J=rt(()=>{var T;const ce=r.projects.filter(q=>q.archived!==1),U=(T=r.item)==null?void 0:T.project_id;if(U&&!ce.some(q=>q.id===U)){const q=r.projects.find(G=>G.id===U),Z=ce.slice();return q&&Z.unshift({...q,name:q.name+"(已归档)"}),Z}return ce});function oe(ce){r.open&&ce.key==="Escape"&&o("cancel")}gt(()=>r.open,async ce=>{var U;if(ce){const T=r.item;i.value=(T==null?void 0:T.content)??"",c.value=(T==null?void 0:T.project_id)??null,f.value=(T==null?void 0:T.category)??"dev",v.value=(T==null?void 0:T.minutes)??null,b.value=(T==null?void 0:T.takeaway)??"",y.value=(T==null?void 0:T.remark)??"",_.value=(T==null?void 0:T.is_milestone)??0,E.value=(T==null?void 0:T.needs_followup)??0,C.value="",window.addEventListener("keydown",oe),await ir(),(U=M.value)==null||U.focus()}else window.removeEventListener("keydown",oe)}),Wn(()=>window.removeEventListener("keydown",oe)),gt(i,()=>{C.value&&(C.value="")});function ue(){const ce=i.value.trim();if(!ce){C.value="请填写工作内容";return}if(!r.item||!r.item.id){o("save",{id:0,content:ce,project_id:c.value,category:f.value,minutes:v.value&&v.value>0?v.value:null,takeaway:b.value.trim()||null,remark:y.value.trim()||null,is_milestone:_.value,needs_followup:E.value});return}o("save",{id:r.item.id,content:ce,project_id:c.value,category:f.value,minutes:v.value&&v.value>0?v.value:null,takeaway:b.value.trim()||null,remark:y.value.trim()||null,is_milestone:_.value?1:0,needs_followup:E.value?1:0})}return(ce,U)=>($(),St(Hn,{to:"body"},[we(lr,{name:"modal"},{default:ms(()=>[e.open?($(),P("div",{key:0,class:"mask",onClick:U[10]||(U[10]=zt(T=>o("cancel"),["self"]))},[l("div",Hh,[l("div",zh,[l("div",null,[l("div",Wh,W(e.item?"编辑工作记录":"添加工作记录"),1),e.date?($(),P("div",Gh,W(e.date),1)):ye("",!0)]),l("button",{class:"icon-btn",title:"关闭",onClick:U[0]||(U[0]=T=>o("cancel"))},[we(qe,{name:"close",size:16})])]),l("div",Yh,[l("div",Jh,[l("div",Xh,[U[11]||(U[11]=l("label",null,"工作内容(必填)",-1)),Oe(l("input",{ref_key:"contentInput",ref:M,class:Xe(["input",{invalid:C.value}]),"onUpdate:modelValue":U[1]||(U[1]=T=>i.value=T),onKeydown:Mt(ue,["enter"])},null,34),[[Re,i.value]]),C.value?($(),P("div",Qh,W(C.value),1)):ye("",!0)]),l("div",Zh,[U[13]||(U[13]=l("label",null,"所属项目",-1)),Oe(l("select",{class:"select","onUpdate:modelValue":U[2]||(U[2]=T=>c.value=T)},[U[12]||(U[12]=l("option",{value:null},"无项目",-1)),($(!0),P(je,null,et(J.value,T=>($(),P("option",{key:T.id,value:T.id},W(T.name),9,ey))),128))],512),[[fs,c.value]])]),l("div",ty,[U[14]||(U[14]=l("label",null,"工作分类",-1)),Oe(l("select",{class:"select","onUpdate:modelValue":U[3]||(U[3]=T=>f.value=T)},[($(!0),P(je,null,et(n.value,T=>($(),P("option",{key:T,value:T},W(T),9,ny))),128))],512),[[fs,f.value]])]),l("div",sy,[U[15]||(U[15]=l("label",null,"耗时(分钟)",-1)),Oe(l("input",{class:"input",type:"number",min:"0","onUpdate:modelValue":U[4]||(U[4]=T=>v.value=T),placeholder:"选填"},null,512),[[Re,v.value,void 0,{number:!0}]])]),l("div",ry,[U[16]||(U[16]=l("label",null,"主要收获",-1)),Oe(l("input",{class:"input","onUpdate:modelValue":U[5]||(U[5]=T=>b.value=T),placeholder:"一句话:学到了什么"},null,512),[[Re,b.value]])]),l("div",oy,[U[17]||(U[17]=l("label",null,"备注",-1)),Oe(l("textarea",{class:"textarea","onUpdate:modelValue":U[6]||(U[6]=T=>y.value=T),placeholder:"背景、链接、未决事项(选填)"},null,512),[[Re,y.value]])]),l("div",ay,[U[18]||(U[18]=l("label",null,"成果标记",-1)),l("button",{class:Xe(["toggle-btn",{on:_.value===1}]),onClick:U[7]||(U[7]=T=>_.value=_.value===1?0:1)},W(_.value===1?"已标记为成果":"未标记"),3)]),l("div",iy,[U[19]||(U[19]=l("label",null,"待跟进",-1)),l("button",{class:Xe(["toggle-btn",{onwarn:E.value===1}]),onClick:U[8]||(U[8]=T=>E.value=E.value===1?0:1)},W(E.value===1?"需要跟进":"无需跟进"),3)])])]),l("div",ly,[l("button",{class:"btn btn-sm",onClick:U[9]||(U[9]=T=>o("cancel"))},"取消"),l("button",{class:"btn btn-primary btn-sm",onClick:ue},W(e.item?"保存修改":"添加"),1)])])])):ye("",!0)]),_:1})]))}}),cy=Nt(uy,[["__scopeId","data-v-f3b19176"]]);function Mo(e){const t=e.split(":");return Number(t[0])*60+Number(t[1])}function cr(e,t,n,r){if(e&&e.kind==="leave")return{status:"leave",label:"请假",makeup:!1,workedMinutes:null};if(am(t))return{status:"rest",label:"休息日",makeup:!1,workedMinutes:null};if(!e||!e.clock_in_at)return r?{status:"none",label:"未打卡",makeup:!1,workedMinutes:null}:{status:"absent",label:"缺勤",makeup:!!(e&&e.kind==="makeup"),workedMinutes:null};const o=e.kind==="makeup";if(!e.clock_out_at)return{status:"incomplete",label:r?"进行中":"未完成",makeup:o,workedMinutes:null};const i=Mo(bn(e.clock_in_at)),c=Mo(bn(e.clock_out_at)),f=Mo(n.work_start),v=Mo(n.work_end);let b="normal";!o&&i>f+n.grace_minutes?b="late":!o&&c{Vo.value=Vo.value.filter(n=>n.id!==t)},2e3)}function fy(){return Vo}const py={class:"day-panel"},vy={class:"dp-head"},my={class:"dp-date"},hy={class:"card sec"},yy={class:"att-grid"},gy={class:"att-cell"},by={key:0,class:"edit-row"},wy={key:1,class:"att-val"},_y={class:"att-cell"},ky={key:0,class:"edit-row"},xy={key:1,class:"att-val"},Cy={class:"att-cell"},$y=["list"],Sy=["id"],Ey=["value"],Ty={class:"att-cell"},Ay={class:"att-val status-val"},Py={key:0,class:"tag"},Oy={key:1,class:"muted"},My={key:0,class:"att-note muted"},Iy={class:"att-actions"},jy=["disabled"],Dy=["disabled"],Ly=["disabled"],Ky=["disabled"],Ry={key:0,class:"card sec makeup"},Fy={class:"form-grid"},Ny={class:"field"},Vy={class:"field"},By={class:"field span2"},Uy=["list"],qy={class:"field span2"},Hy={key:0,class:"form-error"},zy={class:"form-footer"},Wy={class:"list-sec"},Gy={class:"sec-head"},Yy={class:"sec-title"},Jy={key:0,class:"empty muted"},Xy={class:"item-main"},Qy={class:"tag"},Zy=["onClick"],eg={key:0,class:"muted item-meta"},tg={key:1,class:"muted num item-meta"},ng=["onClick"],sg=["onClick"],rg=["onClick"],og=["onClick"],ag={key:0,class:"item-sub"},ig={key:0,class:"muted2"},lg={key:1,class:"muted"},ug={key:1,class:"dp-foot muted num"},cg=Lt({__name:"DayPanel",props:{date:{}},setup(e){const t=O([]);Zr().then(g=>{t.value=g});const n=e,r=O(!0),o=O(null),i=O(void 0),c=O([]),f=O([]),v=O(""),b=O([]),y=rt(()=>"loc-list-"+n.date),_=rt(()=>n.date===ot());async function E(){r.value=!0,o.value=await ps(),i.value=await _n(n.date),c.value=await dh(n.date),f.value=await rr(!0),b.value=await ml(),v.value=i.value&&i.value.location||await Zm(),r.value=!1}vn(E),gt(()=>n.date,E),gt(ur,()=>{E()});function C(g){if(!g)return"";const m=f.value.find(x=>x.id===g);return m?m.name:"已删除项目"}const M=rt(()=>o.value?cr(i.value,n.date,o.value,_.value):null),J=rt(()=>c.value.reduce((g,m)=>g+(m.minutes||0),0)),oe=O(!1);async function ue(){oe.value||(oe.value=!0,await $d(n.date,v.value),await E(),os(),Ve("上班打卡成功"),oe.value=!1)}async function ce(){oe.value||(oe.value=!0,await rh(n.date),await E(),os(),Ve("下班打卡成功"),oe.value=!1)}async function U(){await eh(n.date,v.value),os(),Ve("地点已更新")}const T=O(!1),q=rt(()=>{var g;return((g=i.value)==null?void 0:g.kind)==="leave"});function Z(){if(i.value&&i.value.clock_in_at){T.value=!0;return}G(!0)}async function G(g){T.value=!1,await lh(n.date,g),await E(),os(),Ve(g?"已标记为休假":"已取消休假")}const re=O(null),I=O(""),S=O(null);gt(re,async g=>{var m;g&&(await ir(),(m=S.value)==null||m.focus())});function j(g){var x,D;const m=g==="in"?(x=i.value)==null?void 0:x.clock_in_at:(D=i.value)==null?void 0:D.clock_out_at;re.value=g,I.value=m?bn(m):g==="in"?"09:00":"18:00"}function ne(){re.value=null}async function Me(){const g=re.value;g&&(re.value=null,I.value&&(await ih(n.date,g==="in"?"clock_in_at":"clock_out_at",I.value),await E(),os(),Ve("打卡时间已修改")))}const Ee=O(!1),he=O("09:00"),Ae=O("18:00"),Ue=O(""),de=O(""),ke=O("");function Se(){de.value=v.value,ke.value="",Ee.value=!Ee.value}async function De(){if(!he.value||!Ae.value){ke.value="请填写上班与下班时间";return}await ah(n.date,n.date+"T"+he.value+":00",n.date+"T"+Ae.value+":00",Ue.value.trim(),de.value),Ee.value=!1,Ue.value="",ke.value="",await E(),os(),Ve("补卡已保存")}const $e=O(null),fe=O(!1);function Ie(g){$e.value=g,fe.value=!0}function ct(){$e.value=null,fe.value=!0}async function bt(g){g.id?(await gi(g.id,{content:g.content,project_id:g.project_id,category:g.category,minutes:g.minutes,takeaway:g.takeaway,remark:g.remark,is_milestone:g.is_milestone,needs_followup:g.needs_followup}),Ve("记录已更新")):(await fh(n.date,{content:g.content,project_id:g.project_id,category:g.category,minutes:g.minutes,takeaway:g.takeaway,remark:g.remark}),Ve("记录已添加")),$e.value=null,fe.value=!1,await E()}async function wt(g){await gi(g.id,{is_milestone:g.is_milestone?0:1}),await E()}async function Vt(g){await gi(g.id,{needs_followup:g.needs_followup?0:1}),await E()}const pt=O(null);async function Fe(){pt.value&&pt.value.id&&await ph(pt.value.id),pt.value=null,await E(),Ve("记录已删除")}return(g,m)=>($(),P("div",py,[l("div",vy,[l("div",my,W(on(ud)(e.date)),1)]),l("div",hy,[m[19]||(m[19]=l("div",{class:"sec-title"},"出勤信息",-1)),l("div",yy,[l("div",gy,[m[15]||(m[15]=l("label",null,"上班时间",-1)),re.value==="in"?($(),P("div",by,[Oe(l("input",{ref_key:"timeInput",ref:S,type:"time",class:"input time-input","onUpdate:modelValue":m[0]||(m[0]=x=>I.value=x),onKeydown:[Mt(Me,["enter"]),Mt(ne,["esc"])]},null,544),[[Re,I.value]]),l("button",{class:"btn btn-primary btn-sm",onClick:Me},"确认"),l("button",{class:"btn btn-sm",onClick:ne},"取消")])):($(),P("div",wy,[l("span",{class:Xe(["num",{"val-empty":!(i.value&&i.value.clock_in_at)}])},W(i.value&&i.value.clock_in_at?on(bn)(i.value.clock_in_at):"未打卡"),3),i.value&&i.value.id?($(),P("button",{key:0,class:"icon-btn",title:"修改上班时间",onClick:m[1]||(m[1]=x=>j("in"))},[we(qe,{name:"edit",size:13})])):ye("",!0)]))]),l("div",_y,[m[16]||(m[16]=l("label",null,"下班时间",-1)),re.value==="out"?($(),P("div",ky,[Oe(l("input",{ref_key:"timeInput",ref:S,type:"time",class:"input time-input","onUpdate:modelValue":m[2]||(m[2]=x=>I.value=x),onKeydown:[Mt(Me,["enter"]),Mt(ne,["esc"])]},null,544),[[Re,I.value]]),l("button",{class:"btn btn-primary btn-sm",onClick:Me},"确认"),l("button",{class:"btn btn-sm",onClick:ne},"取消")])):($(),P("div",xy,[l("span",{class:Xe(["num",{"val-empty":!(i.value&&i.value.clock_out_at)}])},W(i.value&&i.value.clock_out_at?on(bn)(i.value.clock_out_at):"未打卡"),3),i.value&&i.value.id?($(),P("button",{key:0,class:"icon-btn",title:"修改下班时间",onClick:m[3]||(m[3]=x=>j("out"))},[we(qe,{name:"edit",size:13})])):ye("",!0)]))]),l("div",Cy,[m[17]||(m[17]=l("label",null,"上班地点",-1)),Oe(l("input",{class:"input","onUpdate:modelValue":m[4]||(m[4]=x=>v.value=x),list:y.value,placeholder:"可直接输入",title:"上班地点,可自由输入",onChange:U},null,40,$y),[[Re,v.value]]),l("datalist",{id:y.value},[($(!0),P(je,null,et(b.value,x=>($(),P("option",{key:x,value:x},null,8,Ey))),128))],8,Sy)]),l("div",Ty,[m[18]||(m[18]=l("label",null,"考勤状态",-1)),l("div",Ay,[M.value?($(),P(je,{key:0},[l("span",{class:Xe(["dot",M.value.status])},null,2),l("span",null,W(M.value.label),1),i.value&&i.value.kind==="makeup"?($(),P("span",Py,"补卡")):ye("",!0)],64)):($(),P("span",Oy,"--"))])])]),i.value&&i.value.note?($(),P("div",My,"补卡说明:"+W(i.value.note),1)):ye("",!0),l("div",Iy,[_.value&&(!i.value||!i.value.clock_in_at)?($(),P("button",{key:0,class:"btn btn-primary btn-sm",disabled:oe.value,onClick:ue},"上班打卡",8,jy)):_.value&&i.value&&i.value.clock_in_at&&!i.value.clock_out_at?($(),P("button",{key:1,class:"btn btn-primary btn-sm",disabled:oe.value,onClick:ce},"下班打卡",8,Dy)):ye("",!0),!_.value&&(!i.value||!i.value.clock_in_at)?($(),P("button",{key:2,class:"btn btn-sm",onClick:Se},"补卡")):ye("",!0),q.value?($(),P("button",{key:4,class:"btn btn-sm",disabled:oe.value,onClick:m[5]||(m[5]=x=>G(!1))},"取消休假",8,Ky)):($(),P("button",{key:3,class:"btn btn-sm",disabled:oe.value,onClick:Z},"标记休假",8,Ly))])]),Ee.value?($(),P("div",Ry,[m[24]||(m[24]=l("div",{class:"sec-title"},"补卡登记",-1)),l("div",Fy,[l("div",Ny,[m[20]||(m[20]=l("label",null,"上班时间",-1)),Oe(l("input",{type:"time",class:"input","onUpdate:modelValue":m[6]||(m[6]=x=>he.value=x)},null,512),[[Re,he.value]])]),l("div",Vy,[m[21]||(m[21]=l("label",null,"下班时间",-1)),Oe(l("input",{type:"time",class:"input","onUpdate:modelValue":m[7]||(m[7]=x=>Ae.value=x)},null,512),[[Re,Ae.value]])]),l("div",By,[m[22]||(m[22]=l("label",null,"上班地点",-1)),Oe(l("input",{class:"input",list:y.value,"onUpdate:modelValue":m[8]||(m[8]=x=>de.value=x),placeholder:"可直接输入"},null,8,Uy),[[Re,de.value]])]),l("div",qy,[m[23]||(m[23]=l("label",null,"补卡原因",-1)),Oe(l("input",{class:"input","onUpdate:modelValue":m[9]||(m[9]=x=>Ue.value=x),placeholder:"如:外出拜访客户忘记打卡"},null,512),[[Re,Ue.value]])])]),ke.value?($(),P("div",Hy,W(ke.value),1)):ye("",!0),l("div",zy,[l("button",{class:"btn btn-sm",onClick:m[10]||(m[10]=x=>Ee.value=!1)},"取消"),l("button",{class:"btn btn-primary btn-sm",onClick:De},"保存补卡")])])):ye("",!0),l("div",Wy,[l("div",Gy,[l("span",Yy,"工作记录("+W(c.value.length)+")",1),l("button",{class:"btn btn-primary btn-sm",onClick:ct},[we(qe,{name:"plus",size:14}),m[25]||(m[25]=mt(" 添加记录",-1))])]),!c.value.length&&!r.value?($(),P("div",Jy,"暂无记录")):ye("",!0),($(!0),P(je,null,et(c.value,x=>($(),P("div",{key:x.id,class:"item"},[l("div",Xy,[l("span",Qy,W(on(Ur)(x.category)),1),l("span",{class:"item-content",title:"点击编辑",onClick:D=>Ie(x)},W(x.content),9,Zy),x.project_id?($(),P("span",eg,W(C(x.project_id)),1)):ye("",!0),x.minutes?($(),P("span",tg,W(x.minutes)+" 分钟",1)):ye("",!0),m[26]||(m[26]=l("span",{class:"flex1"},null,-1)),l("button",{class:"icon-btn",title:"编辑完整信息",onClick:D=>Ie(x)},[we(qe,{name:"edit",size:14})],8,ng),l("button",{class:Xe(["icon-btn",{active:x.is_milestone===1}]),title:"成果标记",onClick:D=>wt(x)},[we(qe,{name:"star",size:14})],10,sg),l("button",{class:Xe(["icon-btn",{"active-warn":x.needs_followup===1}]),title:"待跟进",onClick:D=>Vt(x)},[we(qe,{name:"flag",size:14})],10,rg),l("button",{class:"icon-btn",title:"删除",onClick:D=>pt.value=x},[we(qe,{name:"close",size:14})],8,og)]),x.takeaway||x.remark?($(),P("div",ag,[x.takeaway?($(),P("div",ig,"收获:"+W(x.takeaway),1)):ye("",!0),x.remark?($(),P("div",lg,"备注:"+W(x.remark),1)):ye("",!0)])):ye("",!0)]))),128)),c.value.length?($(),P("div",ug,[mt(" 共 "+W(c.value.length)+" 条事项 ",1),J.value?($(),P(je,{key:0},[mt(" · "+W((J.value/60).toFixed(1))+" 小时",1)],64)):ye("",!0)])):ye("",!0)]),we(Dn,{open:!!pt.value,title:"删除确认",message:pt.value?"将删除工作记录「"+pt.value.content+"」。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:m[11]||(m[11]=x=>pt.value=null),onConfirm:Fe},null,8,["open","message"]),we(Dn,{open:T.value,title:"标记休假确认",message:"该日已有打卡记录,标记休假将清空上下班时间。是否继续?","confirm-text":"标记休假",danger:"",onCancel:m[12]||(m[12]=x=>T.value=!1),onConfirm:m[13]||(m[13]=x=>G(!0))},null,8,["open"]),we(cy,{open:fe.value,item:$e.value,projects:f.value,date:e.date,onCancel:m[14]||(m[14]=x=>fe.value=!1),onSave:bt},null,8,["open","item","projects","date"])]))}}),Pd=Nt(cg,[["__scopeId","data-v-b7bec4fa"]]),dg={class:"cal-page"},fg={class:"cal-toolbar"},pg={class:"cal-title num"},vg=["disabled"],mg={class:"card cal-card"},hg={class:"cal-head"},yg={class:"cal-grid"},gg=["title","onClick"],bg={class:"cal-marks"},wg={key:0,class:"drawer"},_g={class:"drawer-head"},kg={class:"drawer-body"},xg=Lt({__name:"CalendarView",setup(e){const t=O(ot()),n=rt(()=>Number(t.value.slice(0,4))),r=rt(()=>Number(t.value.slice(5,7))-1),o=rt(()=>n.value+" 年 "+(r.value+1)+" 月"),i=["一","二","三","四","五","六","日"],c=rt(()=>{const T=(new Date(n.value,r.value,1).getDay()+6)%7,q=new Date(n.value,r.value+1,0).getDate(),Z=[];for(let G=0;G[j.date,j])),re=q[2],I=new Map;for(const j of c.value){if(!j.inMonth)continue;const ne=cr(G.get(j.date),j.date,Z,j.date===v),Me=re.filter(Ee=>Ee.date===j.date);I.set(j.date,{status:ne.status,label:ne.label,location:((S=G.get(j.date))==null?void 0:S.location)||"",hasLog:Me.length>0,hasMilestone:Me.some(Ee=>Ee.is_milestone===1)})}f.value=I}gt([n,r],b,{immediate:!0}),gt(ur,()=>{b()});function y(U){var T;return((T=f.value.get(U))==null?void 0:T.status)??""}function _(U){const T=f.value.get(U);return T?U+" · "+T.label+(T.location?" · "+T.location:""):U}function E(U){var T;return!!((T=f.value.get(U))!=null&&T.hasLog)}function C(U){var T;return!!((T=f.value.get(U))!=null&&T.hasMilestone)}function M(){t.value=na(t.value,-1)}function J(){t.value=na(t.value,1)}function oe(){t.value=ot()}const ue=O(null);function ce(U,T){T&&(ue.value=U)}return gt(Ni,U=>{U&&(t.value=U,ue.value=U,Ni.value=null)},{immediate:!0}),(U,T)=>($(),P("div",dg,[l("div",fg,[l("button",{class:"icon-btn",title:"上一月",onClick:M},[we(qe,{name:"chevron-left",size:16})]),l("span",pg,W(o.value),1),l("button",{class:"icon-btn",title:"下一月",onClick:J},[we(qe,{name:"chevron-right",size:16})]),l("button",{class:"btn btn-sm",disabled:t.value===on(v),onClick:oe},"回到本月",8,vg)]),l("div",mg,[l("div",hg,[($(),P(je,null,et(i,q=>l("span",{key:q,class:"cal-week"},W(q),1)),64))]),l("div",yg,[($(!0),P(je,null,et(c.value,(q,Z)=>($(),P("button",{key:Z,class:Xe(["cal-cell",{blank:!q.inMonth,weekend:q.weekend,selected:ue.value===q.date}]),title:q.inMonth?_(q.date):void 0,onClick:G=>ce(q.date,q.inMonth)},[q.inMonth?($(),P(je,{key:0},[l("span",{class:Xe(["daynum num",{today:q.date===on(v)}])},W(Number(q.date.slice(8,10))),3),l("span",bg,[y(q.date)?($(),P("span",{key:0,class:Xe(["dot",y(q.date)])},null,2)):ye("",!0),E(q.date)?($(),St(qe,{key:1,name:"check-circle",size:12,class:"mark-log"})):ye("",!0),C(q.date)?($(),St(qe,{key:2,name:"star",size:12,class:"mark-star"})):ye("",!0)])],64)):ye("",!0)],10,gg))),128))])]),we(lr,{name:"drawer"},{default:ms(()=>[ue.value?($(),P("aside",wg,[l("div",_g,[T[1]||(T[1]=l("span",{class:"drawer-title"},"当日详情",-1)),l("button",{class:"icon-btn",onClick:T[0]||(T[0]=q=>ue.value=null)},[we(qe,{name:"close",size:16})])]),l("div",kg,[we(Pd,{date:ue.value},null,8,["date"])])])):ye("",!0)]),_:1})]))}}),Cg=Nt(xg,[["__scopeId","data-v-8a3b0422"]]),$g="modulepreload",Sg=function(e,t){return new URL(e,t).href},Nu={},Od=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){const c=document.getElementsByTagName("link"),f=document.querySelector("meta[property=csp-nonce]"),v=(f==null?void 0:f.nonce)||(f==null?void 0:f.getAttribute("nonce"));o=Promise.allSettled(n.map(b=>{if(b=Sg(b,r),b in Nu)return;Nu[b]=!0;const y=b.endsWith(".css"),_=y?'[rel="stylesheet"]':"";if(!!r)for(let M=c.length-1;M>=0;M--){const J=c[M];if(J.href===b&&(!y||J.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${b}"]${_}`))return;const C=document.createElement("link");if(C.rel=y?"stylesheet":$g,y||(C.as="script"),C.crossOrigin="",C.href=b,v&&C.setAttribute("nonce",v),document.head.appendChild(C),y)return new Promise((M,J)=>{C.addEventListener("load",M),C.addEventListener("error",()=>J(new Error(`Unable to preload CSS for ${b}`)))})}))}function i(c){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=c,window.dispatchEvent(f),!f.defaultPrevented)throw c}return o.then(c=>{for(const f of c||[])f.status==="rejected"&&i(f.reason);return t().catch(i)})};/*! Capacitor: https://capacitorjs.com/ - MIT License */const Eg=e=>{const t=new Map;t.set("web",{name:"web"});const n=e.CapacitorPlatforms||{currentPlatform:{name:"web"},platforms:t},r=(i,c)=>{n.platforms.set(i,c)},o=i=>{n.platforms.has(i)&&(n.currentPlatform=n.platforms.get(i))};return n.addPlatform=r,n.setPlatform=o,n},Tg=e=>e.CapacitorPlatforms=Eg(e),Md=Tg(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});Md.addPlatform;Md.setPlatform;var or;(function(e){e.Unimplemented="UNIMPLEMENTED",e.Unavailable="UNAVAILABLE"})(or||(or={}));class wi extends Error{constructor(t,n,r){super(t),this.message=t,this.code=n,this.data=r}}const Ag=e=>{var t,n;return e!=null&&e.androidBridge?"android":!((n=(t=e==null?void 0:e.webkit)===null||t===void 0?void 0:t.messageHandlers)===null||n===void 0)&&n.bridge?"ios":"web"},Pg=e=>{var t,n,r,o,i;const c=e.CapacitorCustomPlatform||null,f=e.Capacitor||{},v=f.Plugins=f.Plugins||{},b=e.CapacitorPlatforms,y=()=>c!==null?c.name:Ag(e),_=((t=b==null?void 0:b.currentPlatform)===null||t===void 0?void 0:t.getPlatform)||y,E=()=>_()!=="web",C=((n=b==null?void 0:b.currentPlatform)===null||n===void 0?void 0:n.isNativePlatform)||E,M=G=>{const re=T.get(G);return!!(re!=null&&re.platforms.has(_())||ue(G))},J=((r=b==null?void 0:b.currentPlatform)===null||r===void 0?void 0:r.isPluginAvailable)||M,oe=G=>{var re;return(re=f.PluginHeaders)===null||re===void 0?void 0:re.find(I=>I.name===G)},ue=((o=b==null?void 0:b.currentPlatform)===null||o===void 0?void 0:o.getPluginHeader)||oe,ce=G=>e.console.error(G),U=(G,re,I)=>Promise.reject(`${I} does not have an implementation of "${re}".`),T=new Map,q=(G,re={})=>{const I=T.get(G);if(I)return console.warn(`Capacitor plugin "${G}" already registered. Cannot register plugins twice.`),I.proxy;const S=_(),j=ue(G);let ne;const Me=async()=>(!ne&&S in re?ne=typeof re[S]=="function"?ne=await re[S]():ne=re[S]:c!==null&&!ne&&"web"in re&&(ne=typeof re.web=="function"?ne=await re.web():ne=re.web),ne),Ee=(Se,De)=>{var $e,fe;if(j){const Ie=j==null?void 0:j.methods.find(ct=>De===ct.name);if(Ie)return Ie.rtype==="promise"?ct=>f.nativePromise(G,De.toString(),ct):(ct,bt)=>f.nativeCallback(G,De.toString(),ct,bt);if(Se)return($e=Se[De])===null||$e===void 0?void 0:$e.bind(Se)}else{if(Se)return(fe=Se[De])===null||fe===void 0?void 0:fe.bind(Se);throw new wi(`"${G}" plugin is not implemented on ${S}`,or.Unimplemented)}},he=Se=>{let De;const $e=(...fe)=>{const Ie=Me().then(ct=>{const bt=Ee(ct,Se);if(bt){const wt=bt(...fe);return De=wt==null?void 0:wt.remove,wt}else throw new wi(`"${G}.${Se}()" is not implemented on ${S}`,or.Unimplemented)});return Se==="addListener"&&(Ie.remove=async()=>De()),Ie};return $e.toString=()=>`${Se.toString()}() { [capacitor code] }`,Object.defineProperty($e,"name",{value:Se,writable:!1,configurable:!1}),$e},Ae=he("addListener"),Ue=he("removeListener"),de=(Se,De)=>{const $e=Ae({eventName:Se},De),fe=async()=>{const ct=await $e;Ue({eventName:Se,callbackId:ct},De)},Ie=new Promise(ct=>$e.then(()=>ct({remove:fe})));return Ie.remove=async()=>{console.warn("Using addListener() without 'await' is deprecated."),await fe()},Ie},ke=new Proxy({},{get(Se,De){switch(De){case"$$typeof":return;case"toJSON":return()=>({});case"addListener":return j?de:Ae;case"removeListener":return Ue;default:return he(De)}}});return v[G]=ke,T.set(G,{name:G,proxy:ke,platforms:new Set([...Object.keys(re),...j?[S]:[]])}),ke},Z=((i=b==null?void 0:b.currentPlatform)===null||i===void 0?void 0:i.registerPlugin)||q;return f.convertFileSrc||(f.convertFileSrc=G=>G),f.getPlatform=_,f.handleError=ce,f.isNativePlatform=C,f.isPluginAvailable=J,f.pluginMethodNoop=U,f.registerPlugin=Z,f.Exception=wi,f.DEBUG=!!f.DEBUG,f.isLoggingEnabled=!!f.isLoggingEnabled,f.platform=f.getPlatform(),f.isNative=f.isNativePlatform(),f},Og=e=>e.Capacitor=Pg(e),ar=Og(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),Id=ar.registerPlugin;ar.Plugins;class jd{constructor(t){this.listeners={},this.retainedEventArguments={},this.windowListeners={},t&&(console.warn(`Capacitor WebPlugin "${t.name}" config object was deprecated in v3 and will be removed in v4.`),this.config=t)}addListener(t,n){let r=!1;this.listeners[t]||(this.listeners[t]=[],r=!0),this.listeners[t].push(n);const i=this.windowListeners[t];i&&!i.registered&&this.addWindowListener(i),r&&this.sendRetainedArgumentsForEvent(t);const c=async()=>this.removeListener(t,n);return Promise.resolve({remove:c})}async removeAllListeners(){this.listeners={};for(const t in this.windowListeners)this.removeWindowListener(this.windowListeners[t]);this.windowListeners={}}notifyListeners(t,n,r){const o=this.listeners[t];if(!o){if(r){let i=this.retainedEventArguments[t];i||(i=[]),i.push(n),this.retainedEventArguments[t]=i}return}o.forEach(i=>i(n))}hasListeners(t){return!!this.listeners[t].length}registerWindowListener(t,n){this.windowListeners[n]={registered:!1,windowEventName:t,pluginEventName:n,handler:r=>{this.notifyListeners(n,r)}}}unimplemented(t="not implemented"){return new ar.Exception(t,or.Unimplemented)}unavailable(t="not available"){return new ar.Exception(t,or.Unavailable)}async removeListener(t,n){const r=this.listeners[t];if(!r)return;const o=r.indexOf(n);this.listeners[t].splice(o,1),this.listeners[t].length||this.removeWindowListener(this.windowListeners[t])}addWindowListener(t){window.addEventListener(t.windowEventName,t.handler),t.registered=!0}removeWindowListener(t){t&&(window.removeEventListener(t.windowEventName,t.handler),t.registered=!1)}sendRetainedArgumentsForEvent(t){const n=this.retainedEventArguments[t];n&&(delete this.retainedEventArguments[t],n.forEach(r=>{this.notifyListeners(t,r)}))}}const Vu=e=>encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),Bu=e=>e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent);class Mg extends jd{async getCookies(){const t=document.cookie,n={};return t.split(";").forEach(r=>{if(r.length<=0)return;let[o,i]=r.replace(/=/,"CAP_COOKIE").split("CAP_COOKIE");o=Bu(o).trim(),i=Bu(i).trim(),n[o]=i}),n}async setCookie(t){try{const n=Vu(t.key),r=Vu(t.value),o=`; expires=${(t.expires||"").replace("expires=","")}`,i=(t.path||"/").replace("path=",""),c=t.url!=null&&t.url.length>0?`domain=${t.url}`:"";document.cookie=`${n}=${r||""}${o}; path=${i}; ${c};`}catch(n){return Promise.reject(n)}}async deleteCookie(t){try{document.cookie=`${t.key}=; Max-Age=0`}catch(n){return Promise.reject(n)}}async clearCookies(){try{const t=document.cookie.split(";")||[];for(const n of t)document.cookie=n.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}catch(t){return Promise.reject(t)}}async clearAllCookies(){try{await this.clearCookies()}catch(t){return Promise.reject(t)}}}Id("CapacitorCookies",{web:()=>new Mg});const Ig=async e=>new Promise((t,n)=>{const r=new FileReader;r.onload=()=>{const o=r.result;t(o.indexOf(",")>=0?o.split(",")[1]:o)},r.onerror=o=>n(o),r.readAsDataURL(e)}),jg=(e={})=>{const t=Object.keys(e);return Object.keys(e).map(o=>o.toLocaleLowerCase()).reduce((o,i,c)=>(o[i]=e[t[c]],o),{})},Dg=(e,t=!0)=>e?Object.entries(e).reduce((r,o)=>{const[i,c]=o;let f,v;return Array.isArray(c)?(v="",c.forEach(b=>{f=t?encodeURIComponent(b):b,v+=`${i}=${f}&`}),v.slice(0,-1)):(f=t?encodeURIComponent(c):c,v=`${i}=${f}`),`${r}&${v}`},"").substr(1):null,Lg=(e,t={})=>{const n=Object.assign({method:e.method||"GET",headers:e.headers},t),o=jg(e.headers)["content-type"]||"";if(typeof e.data=="string")n.body=e.data;else if(o.includes("application/x-www-form-urlencoded")){const i=new URLSearchParams;for(const[c,f]of Object.entries(e.data||{}))i.set(c,f);n.body=i.toString()}else if(o.includes("multipart/form-data")||e.data instanceof FormData){const i=new FormData;if(e.data instanceof FormData)e.data.forEach((f,v)=>{i.append(v,f)});else for(const f of Object.keys(e.data))i.append(f,e.data[f]);n.body=i;const c=new Headers(n.headers);c.delete("content-type"),n.headers=c}else(o.includes("application/json")||typeof e.data=="object")&&(n.body=JSON.stringify(e.data));return n};class Kg extends jd{async request(t){const n=Lg(t,t.webFetchExtra),r=Dg(t.params,t.shouldEncodeUrlParams),o=r?`${t.url}?${r}`:t.url,i=await fetch(o,n),c=i.headers.get("content-type")||"";let{responseType:f="text"}=i.ok?t:{};c.includes("application/json")&&(f="json");let v,b;switch(f){case"arraybuffer":case"blob":b=await i.blob(),v=await Ig(b);break;case"json":v=await i.json();break;case"document":case"text":default:v=await i.text()}const y={};return i.headers.forEach((_,E)=>{y[E]=_}),{data:v,headers:y,status:i.status,url:i.url}}async get(t){return this.request(Object.assign(Object.assign({},t),{method:"GET"}))}async post(t){return this.request(Object.assign(Object.assign({},t),{method:"POST"}))}async put(t){return this.request(Object.assign(Object.assign({},t),{method:"PUT"}))}async patch(t){return this.request(Object.assign(Object.assign({},t),{method:"PATCH"}))}async delete(t){return this.request(Object.assign(Object.assign({},t),{method:"DELETE"}))}}Id("CapacitorHttp",{web:()=>new Kg});async function Sa(e,t){const n=window;if(n.electronAPI&&n.electronAPI.saveFile){const c=await n.electronAPI.saveFile(e,t);return c&&c.saved?c.path:""}if(ar.isNativePlatform()){const{Filesystem:c,Directory:f,Encoding:v}=await Od(async()=>{const{Filesystem:b,Directory:y,Encoding:_}=await import("./index-C-oU33BQ.js");return{Filesystem:b,Directory:y,Encoding:_}},[],import.meta.url);try{return(await c.writeFile({path:e,data:t,directory:f.Documents,encoding:v.UTF8,recursive:!0})).uri}catch{return(await c.writeFile({path:e,data:t,directory:f.Cache,encoding:v.UTF8,recursive:!0})).uri}}const r=new Blob([t],{type:"text/plain;charset=utf-8"}),o=URL.createObjectURL(r),i=document.createElement("a");return i.href=o,i.download=e,i.click(),window.setTimeout(()=>URL.revokeObjectURL(o),1e4),""}const Rg=Object.freeze(Object.defineProperty({__proto__:null,downloadText:Sa},Symbol.toStringTag,{value:"Module"})),Fg={class:"detail-page"},Ng={class:"card toolbar"},Vg={class:"nav-row"},Bg=["value"],Ug=["disabled"],qg={class:"exp-row"},Hg={class:"seg"},zg=["disabled"],Wg=Lt({__name:"TodayView",setup(e){const t=O(ot()),n=rt(()=>t.value===ot());function r(){t.value=Ft(t.value,-1)}function o(){t.value=Ft(t.value,1)}function i(){t.value=ot()}const c=O("day"),f=O(ot()),v=O(ot()),b=O(!1);function y(){if(c.value==="day")return{start:f.value,end:f.value,label:f.value};if(c.value==="week"){const C=Qs(f.value);return{start:C,end:Ft(C,6),label:C+"_"+Ft(C,6)}}if(c.value==="month"){const C=f.value.slice(0,4),M=f.value.slice(5,7),J=new Date(Number(C),Number(M),0).getDate();return{start:C+"-"+M+"-01",end:C+"-"+M+"-"+J,label:C+"-"+M}}return{start:f.value,end:v.value,label:f.value+"_"+v.value}}async function _(){if(!b.value){b.value=!0;try{const{start:C,end:M,label:J}=y(),[oe,ue,ce,U]=await Promise.all([ps(),Xr(C,M),Qr(C,M),rr(!0)]),T=new Map(U.map(I=>[I.id,I.name])),q=["# 工作详情 "+J,""],Z=["周日","周一","周二","周三","周四","周五","周六"];let G=C,re=0;for(;G<=M&&re<400;){const I=ce.filter(j=>j.date===G),S=ue.find(j=>j.date===G);if(S||I.length){if(q.push("## "+G+" "+Z[new Date(G+"T00:00:00").getDay()],""),S&&(S.clock_in_at||S.kind==="makeup")){const j=cr(S,G,oe,G===ot()),ne=[bn(S.clock_in_at),"–",bn(S.clock_out_at),"·",j.label];S.location&&ne.push("· 地点:"+S.location),q.push("考勤:"+ne.join(" "),"")}for(const j of I){const ne=j.project_id&&T.get(j.project_id)||"",Me="- 【"+Ur(j.category)+"】"+j.content+(j.minutes?"("+j.minutes+" 分钟)":"")+(ne?" @"+ne:"");q.push(Me),j.takeaway&&q.push(" - 收获:"+j.takeaway),j.needs_followup===1&&j.remark?q.push(" - 待跟进:"+j.remark):j.remark&&q.push(" - 备注:"+j.remark)}q.push("")}G=Ft(G,1),re++}await Sa("工作详情_"+J+".md",q.join(` +`)),Ve("已导出 Markdown")}finally{b.value=!1}}}function E(C){const M=C.target.value;M&&(t.value=M)}return(C,M)=>($(),P("div",Fg,[l("div",Ng,[l("div",Vg,[l("button",{class:"icon-btn",title:"前一天",onClick:r},[we(qe,{name:"chevron-left",size:16})]),l("span",{class:Xe(["date-title num",{"is-today":n.value}])},W(on(ud)(t.value)),3),l("button",{class:"icon-btn",title:"后一天",onClick:o},[we(qe,{name:"chevron-right",size:16})]),l("input",{type:"date",class:"input w-date",value:t.value,onChange:E},null,40,Bg),l("button",{class:"btn btn-sm",disabled:n.value,onClick:i},"回到今天",8,Ug)]),M[7]||(M[7]=l("div",{class:"tool-sep"},null,-1)),l("div",qg,[M[6]||(M[6]=l("span",{class:"muted exp-label"},"导出",-1)),l("div",Hg,[l("button",{class:Xe(["seg-btn",{active:c.value==="day"}]),onClick:M[0]||(M[0]=J=>c.value="day")},"当日",2),l("button",{class:Xe(["seg-btn",{active:c.value==="week"}]),onClick:M[1]||(M[1]=J=>c.value="week")},"当周",2),l("button",{class:Xe(["seg-btn",{active:c.value==="month"}]),onClick:M[2]||(M[2]=J=>c.value="month")},"当月",2),l("button",{class:Xe(["seg-btn",{active:c.value==="custom"}]),onClick:M[3]||(M[3]=J=>c.value="custom")},"自定义",2)]),c.value!=="day"?Oe(($(),P("input",{key:0,class:"input w-exp",type:"date","onUpdate:modelValue":M[4]||(M[4]=J=>f.value=J)},null,512)),[[Re,f.value]]):ye("",!0),c.value==="custom"?Oe(($(),P("input",{key:1,class:"input w-exp",type:"date","onUpdate:modelValue":M[5]||(M[5]=J=>v.value=J)},null,512)),[[Re,v.value]]):ye("",!0),l("button",{class:"btn btn-sm",disabled:b.value,onClick:_},"导出 Markdown",8,zg)])]),we(Pd,{date:t.value},null,8,["date"])]))}}),Gg=Nt(Wg,[["__scopeId","data-v-4db7eb3d"]]),Yg={class:"plan-page"},Jg={class:"blk-head"},Xg={key:0,class:"card empty muted"},Qg={class:"goal-main"},Zg={class:"goal-line"},eb={class:"tag"},tb={class:"goal-name"},nb={class:"muted num goal-range"},sb={class:"goal-bar"},rb={class:"muted num goal-meta"},ob={class:"goal-ops"},ab=["onClick"],ib=["onClick"],lb={class:"blk-head day-head"},ub={class:"blk-head-text"},cb={class:"muted blk-sub num"},db={class:"day-ops"},fb={class:"card list-card"},pb={key:0,class:"empty muted"},vb={class:"pi-time num"},mb={class:"muted"},hb={class:"pi-main"},yb={class:"pi-title"},gb={class:"tag"},bb={key:0,class:"tag tag-goal"},wb={key:1,class:"state-done"},_b={key:2,class:"state-skip"},kb={key:0,class:"muted pi-note"},xb={class:"muted pi-meta num"},Cb={key:0,class:"timer-live"},$b={class:"pi-ops"},Sb=["onClick"],Eb=["onClick"],Tb=["onClick"],Ab=["onClick"],Pb=["onClick"],Ob=["onClick"],Mb={class:"dialog",role:"dialog","aria-label":"计划"},Ib={class:"dialog-head"},jb={class:"dialog-title"},Db={class:"dialog-body"},Lb={class:"form-row"},Kb={class:"form-row"},Rb=["value"],Fb={class:"form-row two"},Nb={class:"form-row"},Vb={key:0,class:"form-error"},Bb={class:"dialog-btns"},Ub={class:"dialog",role:"dialog","aria-label":"长期计划"},qb={class:"dialog-head"},Hb={class:"dialog-title"},zb={class:"dialog-body"},Wb={class:"form-row"},Gb={class:"form-row"},Yb=["value"],Jb={class:"form-row two"},Xb={class:"form-row"},Qb={key:0,class:"form-error"},Zb={class:"dialog-btns"},ew=Lt({__name:"PlanView",setup(e){const t=O([]),n=O({}),r=O(!1),o=O(null),i=O(""),c=O("学习"),f=O(ot()),v=O(Ft(ot(),6)),b=O(""),y=O(""),_=O(null);function E(){o.value=null,i.value="",c.value="学习",f.value=ot(),v.value=Ft(ot(),6),b.value="",y.value="",r.value=!0}function C(m){o.value=m,i.value=m.title,c.value=m.kind,f.value=m.start_date,v.value=m.end_date,b.value=m.note||"",y.value="",r.value=!0}async function M(){if(!i.value.trim()){y.value="请填写计划名称";return}if(v.valueoe.value===ot());async function Z(){ce.value=!0;const[m,x,D]=await Promise.all([hh(oe.value),$h(),Ch()]);ue.value=m,t.value=x;const ae={};for(const z of D)ae[String(z.goalId)]={done:z.done,total:z.total};n.value=ae,ce.value=!1}gt(oe,Z),gt(ur,Z),vn(()=>{Z(),T=window.setInterval(()=>{U.value=Date.now()},3e4)}),Wn(()=>{T&&window.clearInterval(T)});function G(){oe.value=Ft(oe.value,-1)}function re(){oe.value=Ft(oe.value,1)}function I(){oe.value=ot()}const S=rt(()=>{const m=ue.value.length,x=ue.value.filter(A=>A.status==="done").length,D=ue.value.reduce((A,X)=>A+j(X),0),ae=ue.value.reduce((A,X)=>A+(X.actual_minutes||0),0);let z=0;const ee=Me.value;if(ee){const A=ue.value.find(X=>X.id===ee);A&&(z=Ee(A))}return{total:m,done:x,plannedMin:D,actualMin:ae+z}});function j(m){const[x,D]=m.start_time.split(":").map(Number),[ae,z]=m.end_time.split(":").map(Number);return Math.max(0,ae*60+z-(x*60+D))}function ne(m){return m<60?m+" 分钟":Math.floor(m/60)+" 小时 "+m%60+" 分"}const Me=rt(()=>{const m=ue.value.find(x=>!!x.timer_started_at);return m?m.id:null});function Ee(m){if(!m.timer_started_at)return m.actual_minutes||0;const x=Math.max(0,Math.round((U.value-new Date(m.timer_started_at).getTime())/6e4));return(m.actual_minutes||0)+x}async function he(m){m.timer_started_at?(await yl(m.id),Ve("已停止计时:"+m.title)):(await _h(m.id),Ve("开始计时:"+m.title)),await Z()}async function Ae(m,x){await wh(m.id,x),await Z()}const Ue=O(!1),de=O(null),ke=O(""),Se=O("学习"),De=O("09:00"),$e=O("10:00"),fe=O(""),Ie=O(""),ct=["学习","健身","自律","工作","阅读","其他"];function bt(){de.value=null,ke.value="",Se.value="学习",De.value="09:00",$e.value="10:00",fe.value="",Ie.value="",Ue.value=!0}function wt(m){de.value=m.id,ke.value=m.title,Se.value=m.kind,De.value=m.start_time,$e.value=m.end_time,fe.value=m.note||"",Ie.value="",Ue.value=!0}async function Vt(){if(!ke.value.trim()){Ie.value="请填写计划内容";return}if($e.value<=De.value){Ie.value="结束时间需晚于开始时间";return}de.value?(await gh(de.value,{title:ke.value.trim(),kind:Se.value,start_time:De.value,end_time:$e.value,note:fe.value}),Ve("计划已更新")):(await yh({date:oe.value,start_time:De.value,end_time:$e.value,title:ke.value,kind:Se.value,note:fe.value}),Ve("计划已添加")),Ue.value=!1,await Z()}async function pt(m){await bh(m.id),Ve("已删除"),await Z()}const Fe=["周日","周一","周二","周三","周四","周五","周六"];function g(m){return Fe[Rs(m).getDay()]}return(m,x)=>($(),P("div",Yg,[l("div",Jg,[x[18]||(x[18]=l("div",{class:"blk-head-text"},[l("div",{class:"blk-title"},"长期计划"),l("div",{class:"muted blk-sub"},"跨越多天的目标,自动落实到每一天")],-1)),l("button",{class:"btn btn-sm",onClick:E},[we(qe,{name:"plus",size:14}),x[17]||(x[17]=mt(" 新建长期计划",-1))])]),t.value.length?ye("",!0):($(),P("div",Xg," 暂无长期计划。创建一个跨越多天的目标(如「产品文档学习」),系统会自动生成每天的打卡任务。 ")),($(!0),P(je,null,et(t.value,D=>($(),P("div",{key:D.id,class:"card goal-card"},[l("div",Qg,[l("div",Zg,[l("span",eb,W(D.kind),1),l("span",tb,W(D.title),1),l("span",nb,W(D.start_date.slice(5))+" ~ "+W(D.end_date.slice(5)),1)]),l("div",sb,[l("span",{class:"goal-bar-fill",style:Un({width:(n.value[String(D.id)]?Math.round(n.value[String(D.id)].done/Math.max(1,n.value[String(D.id)].total)*100):0)+"%"})},null,4)]),l("div",rb,[mt(W(n.value[String(D.id)]?n.value[String(D.id)].done+"/"+n.value[String(D.id)].total+" 天已完成":"0/"+(n.value[String(D.id)]?n.value[String(D.id)].total:0)+" 天")+" ",1),D.note?($(),P(je,{key:0},[mt(" · "+W(D.note),1)],64)):ye("",!0)])]),l("div",ob,[l("button",{class:"icon-btn",title:"编辑",onClick:ae=>C(D)},[we(qe,{name:"edit",size:14})],8,ab),l("button",{class:"icon-btn",title:"删除",onClick:ae=>_.value=D},[we(qe,{name:"close",size:14})],8,ib)])]))),128)),l("div",lb,[l("div",ub,[x[21]||(x[21]=l("div",{class:"blk-title"},"每日安排",-1)),l("div",cb,[mt(" 共 "+W(S.value.total)+" 项 · 完成 "+W(S.value.done)+" 项 · 计划 "+W(ne(S.value.plannedMin))+" · 实际投入 "+W(ne(S.value.actualMin))+" ",1),Me.value?($(),P(je,{key:0},[x[19]||(x[19]=mt(" · ",-1)),x[20]||(x[20]=l("span",{class:"timer-live"},"计时中",-1))],64)):ye("",!0)])]),l("div",db,[l("button",{class:"icon-btn",title:"前一天",onClick:G},[we(qe,{name:"chevron-left",size:16})]),l("span",{class:Xe(["date-chip num",{today:q.value}])},W(oe.value.slice(5))+" "+W(g(oe.value)),3),l("button",{class:"icon-btn",title:"后一天",onClick:re},[we(qe,{name:"chevron-right",size:16})]),l("button",{class:Xe(["btn btn-sm",{"btn-primary":!q.value}]),onClick:I},"今天",2),l("button",{class:"btn btn-primary btn-sm",onClick:bt},[we(qe,{name:"plus",size:14}),x[22]||(x[22]=mt(" 添加计划",-1))])])]),l("div",fb,[!ce.value&&!ue.value.length?($(),P("div",pb,"今天还没有计划,点「添加计划」开始规划。")):ye("",!0),($(!0),P(je,null,et(ue.value,D=>($(),P("div",{key:D.id,class:Xe(["plan-item",{done:D.status==="done",skip:D.status==="skip",running:!!D.timer_started_at}])},[l("div",vb,[mt(W(D.start_time),1),l("span",mb," - "+W(D.end_time),1)]),l("div",hb,[l("div",yb,[l("span",gb,W(D.kind),1),D.goal_id?($(),P("span",bb,"长期")):ye("",!0),l("span",{class:Xe(["pi-text",{strike:D.status==="done"}])},W(D.title),3),D.status==="done"?($(),P("span",wb,"已完成")):D.status==="skip"?($(),P("span",_b,"已跳过")):ye("",!0)]),D.note?($(),P("div",kb,W(D.note),1)):ye("",!0),l("div",xb,[D.timer_started_at?($(),P("span",Cb,"计时中 · 已 "+W(Ee(D))+" 分钟",1)):D.actual_minutes>0?($(),P(je,{key:1},[mt("实际投入 "+W(D.actual_minutes)+" 分钟",1)],64)):ye("",!0)])]),l("div",$b,[D.status!=="done"?($(),P("button",{key:0,class:Xe(["btn btn-xs",{"timer-on":!!D.timer_started_at}]),onClick:ae=>he(D)},W(D.timer_started_at?"停止计时":"计时"),11,Sb)):ye("",!0),D.status!=="done"?($(),P("button",{key:1,class:"btn btn-xs",onClick:ae=>Ae(D,"done")},"完成",8,Eb)):ye("",!0),D.status==="todo"?($(),P("button",{key:2,class:"btn btn-xs",onClick:ae=>Ae(D,"skip")},"跳过",8,Tb)):ye("",!0),D.status!=="todo"?($(),P("button",{key:3,class:"btn btn-xs",onClick:ae=>Ae(D,"todo")},"恢复",8,Ab)):ye("",!0),l("button",{class:"icon-btn",title:"编辑",onClick:ae=>wt(D)},[we(qe,{name:"edit",size:14})],8,Pb),l("button",{class:"icon-btn",title:"删除",onClick:ae=>pt(D)},[we(qe,{name:"close",size:14})],8,Ob)])],2))),128))]),($(),St(Hn,{to:"body"},[Ue.value?($(),P("div",{key:0,class:"mask",onClick:x[7]||(x[7]=zt(D=>Ue.value=!1,["self"]))},[l("div",Mb,[l("div",Ib,[l("span",jb,W(de.value?"编辑计划":"添加计划"),1),l("button",{class:"icon-btn",onClick:x[0]||(x[0]=D=>Ue.value=!1)},[we(qe,{name:"close",size:16})])]),l("div",Db,[l("div",Lb,[x[23]||(x[23]=l("label",null,"计划内容(学什么、做什么)",-1)),Oe(l("input",{class:"input","onUpdate:modelValue":x[1]||(x[1]=D=>ke.value=D),placeholder:"如:产品文档第三章 / 晨跑 5 公里",onKeydown:Mt(Vt,["enter"])},null,544),[[Re,ke.value]])]),l("div",Kb,[x[24]||(x[24]=l("label",null,"类别",-1)),Oe(l("select",{class:"select","onUpdate:modelValue":x[2]||(x[2]=D=>Se.value=D)},[($(),P(je,null,et(ct,D=>l("option",{key:D,value:D},W(D),9,Rb)),64))],512),[[fs,Se.value]])]),l("div",Fb,[l("div",null,[x[25]||(x[25]=l("label",null,"开始时间",-1)),Oe(l("input",{class:"input",type:"time","onUpdate:modelValue":x[3]||(x[3]=D=>De.value=D)},null,512),[[Re,De.value]])]),l("div",null,[x[26]||(x[26]=l("label",null,"结束时间",-1)),Oe(l("input",{class:"input",type:"time","onUpdate:modelValue":x[4]||(x[4]=D=>$e.value=D)},null,512),[[Re,$e.value]])])]),l("div",Nb,[x[27]||(x[27]=l("label",null,"备注(选填)",-1)),Oe(l("input",{class:"input","onUpdate:modelValue":x[5]||(x[5]=D=>fe.value=D),placeholder:"目标、资料、提醒等",onKeydown:Mt(Vt,["enter"])},null,544),[[Re,fe.value]])]),Ie.value?($(),P("div",Vb,W(Ie.value),1)):ye("",!0)]),l("div",Bb,[l("button",{class:"btn btn-sm",onClick:x[6]||(x[6]=D=>Ue.value=!1)},"取消"),l("button",{class:"btn btn-primary btn-sm",onClick:Vt},W(de.value?"保存":"添加"),1)])])])):ye("",!0)])),($(),St(Hn,{to:"body"},[r.value?($(),P("div",{key:0,class:"mask",onClick:x[15]||(x[15]=zt(D=>r.value=!1,["self"]))},[l("div",Ub,[l("div",qb,[l("span",Hb,W(o.value?"编辑长期计划":"新建长期计划"),1),l("button",{class:"icon-btn",onClick:x[8]||(x[8]=D=>r.value=!1)},[we(qe,{name:"close",size:16})])]),l("div",zb,[l("div",Wb,[x[28]||(x[28]=l("label",null,"计划名称(落实为每天一条任务)",-1)),Oe(l("input",{class:"input","onUpdate:modelValue":x[9]||(x[9]=D=>i.value=D),placeholder:"如:产品文档学习 / 健身月计划"},null,512),[[Re,i.value]])]),l("div",Gb,[x[29]||(x[29]=l("label",null,"类别",-1)),Oe(l("select",{class:"select","onUpdate:modelValue":x[10]||(x[10]=D=>c.value=D)},[($(),P(je,null,et(ct,D=>l("option",{key:D,value:D},W(D),9,Yb)),64))],512),[[fs,c.value]])]),l("div",Jb,[l("div",null,[x[30]||(x[30]=l("label",null,"开始日期",-1)),Oe(l("input",{class:"input",type:"date","onUpdate:modelValue":x[11]||(x[11]=D=>f.value=D)},null,512),[[Re,f.value]])]),l("div",null,[x[31]||(x[31]=l("label",null,"结束日期",-1)),Oe(l("input",{class:"input",type:"date","onUpdate:modelValue":x[12]||(x[12]=D=>v.value=D)},null,512),[[Re,v.value]])])]),l("div",Xb,[x[32]||(x[32]=l("label",null,"备注(选填)",-1)),Oe(l("input",{class:"input","onUpdate:modelValue":x[13]||(x[13]=D=>b.value=D)},null,512),[[Re,b.value]])]),y.value?($(),P("div",Qb,W(y.value),1)):ye("",!0),x[33]||(x[33]=l("div",{class:"muted goal-hint"},"创建后区间内每一天都会生成一条任务,可在每日安排中逐日打卡与计时。",-1))]),l("div",Zb,[l("button",{class:"btn btn-sm",onClick:x[14]||(x[14]=D=>r.value=!1)},"取消"),l("button",{class:"btn btn-primary btn-sm",onClick:M},W(o.value?"保存":"创建"),1)])])])):ye("",!0)])),we(Dn,{open:!!_.value,title:"删除长期计划",message:_.value?"将删除「"+_.value.title+"」及其全部每日任务(含已完成记录),不可恢复。":"","confirm-text":"删除",danger:"",onCancel:x[16]||(x[16]=D=>_.value=null),onConfirm:J},null,8,["open","message"])]))}}),tw=Nt(ew,[["__scopeId","data-v-69eb7b43"]]),nw={class:"stats"},sw={class:"cards"},rw={class:"card stat-card"},ow={class:"stat-num num"},aw={class:"card stat-card"},iw={class:"stat-num num"},lw={class:"card stat-card"},uw={class:"stat-num num"},cw={class:"card stat-card"},dw={class:"stat-num num"},fw={class:"card section"},pw={class:"heat"},vw=["title"],mw={class:"two-col"},hw={class:"card section"},yw={class:"bar-label"},gw={class:"bar-track"},bw={class:"muted num bar-num"},ww={key:0,class:"muted"},_w={class:"card section"},kw={class:"bar-label"},xw={class:"bar-track"},Cw={class:"muted num bar-num"},$w={key:0,class:"muted"},Sw={class:"card section"},Ew={class:"bar-label loc-label"},Tw={class:"bar-track"},Aw={class:"muted num bar-num"},Pw={key:0,class:"muted"},Ow=Lt({__name:"StatsView",setup(e){const t=O({attendDays:0,totalHours:"0",itemCount:0,streak:0}),n=O([]),r=O([]),o=O([]),i=O([]);async function c(){const b=ot(),y="2000-01-01",_=await Promise.all([ps(),Xr(y,b),Qr(y,b),rr(!0)]),E=_[0],C=_[1],M=_[2],J=_[3],oe=C.filter(he=>he.clock_in_at||he.kind==="makeup");let ue=0;for(const he of oe){const Ae=cr(he,he.date,E,he.date===b);ue+=Ae.workedMinutes??0}const ce=new Set(M.map(he=>he.date));let U=0,T=b;for(ce.has(T)||(T=Ft(b,-1));ce.has(T);)U++,T=Ft(T,-1);t.value={attendDays:oe.length,totalHours:(ue/60).toFixed(1),itemCount:M.length,streak:U};const q=new Map;for(const he of oe){const Ae=he.location||"未记录";q.set(Ae,(q.get(Ae)||0)+1)}i.value=Array.from(q.entries()).map(he=>({name:he[0],count:he[1],percent:Math.round(he[1]/(oe.length||1)*100)})).sort((he,Ae)=>Ae.count-he.count);const Z=M.length||1,G=await Zr(),re=new Map;for(const he of M)re.set(he.category,(re.get(he.category)||0)+1);const I=new Set(G);for(const he of re.keys())I.has(he)||G.push(he);r.value=G.map(he=>{const Ae=re.get(he)||0;return{key:he,label:he,count:Ae,percent:Math.round(Ae/Z*100)}}).filter(he=>he.count>0).sort((he,Ae)=>Ae.count-he.count);const S=new Map(J.map(he=>[he.id,he.name])),j=new Map;for(const he of M){const Ae=he.project_id?S.get(he.project_id)||"已删除项目":"无项目";j.set(Ae,(j.get(Ae)||0)+1)}o.value=Array.from(j.entries()).map(he=>({name:he[0],count:he[1],percent:Math.round(he[1]/Z*100)})).sort((he,Ae)=>Ae.count-he.count);const ne=new Map;for(const he of M)ne.set(he.date,(ne.get(he.date)||0)+1);const Me=Qs(b),Ee=[];for(let he=11;he>=0;he--){const Ae=Ft(Me,-7*he),Ue=[];for(let de=0;de<7;de++){const ke=Ft(Ae,de);Ue.push({date:ke,count:ne.get(ke)||0})}Ee.push(Ue)}n.value=Ee}vn(async()=>{await c()}),gt(ur,()=>{c()});function f(b){return b===0?0:b===1?1:b<=3?2:b<=5?3:4}function v(b,y){return b+" · "+(y?y+" 条":"无记录")}return(b,y)=>($(),P("div",nw,[l("div",sw,[l("div",rw,[y[0]||(y[0]=l("div",{class:"muted"},"出勤天数",-1)),l("div",ow,W(t.value.attendDays),1)]),l("div",aw,[y[1]||(y[1]=l("div",{class:"muted"},"累计工时(小时)",-1)),l("div",iw,W(t.value.totalHours),1)]),l("div",lw,[y[2]||(y[2]=l("div",{class:"muted"},"记录条数",-1)),l("div",uw,W(t.value.itemCount),1)]),l("div",cw,[y[3]||(y[3]=l("div",{class:"muted"},"连续记录(天)",-1)),l("div",dw,W(t.value.streak),1)])]),l("div",fw,[y[4]||(y[4]=l("div",{class:"section-title"},"记录热力图(近 12 周)",-1)),l("div",pw,[($(!0),P(je,null,et(n.value,(_,E)=>($(),P("div",{key:E,class:"heat-col"},[($(!0),P(je,null,et(_,C=>($(),P("span",{key:C.date,class:Xe(["heat-cell","lv"+f(C.count)]),title:v(C.date,C.count)},null,10,vw))),128))]))),128))]),y[5]||(y[5]=Hp('
少多
',1))]),l("div",mw,[l("div",hw,[y[6]||(y[6]=l("div",{class:"section-title"},"分类分布",-1)),($(!0),P(je,null,et(r.value,_=>($(),P("div",{key:_.key,class:"bar-row"},[l("span",yw,W(_.label),1),l("span",gw,[l("span",{class:"bar-fill",style:Un({width:_.percent+"%"})},null,4)]),l("span",bw,W(_.count)+" 条 · "+W(_.percent)+"%",1)]))),128)),r.value.length?ye("",!0):($(),P("div",ww,"暂无数据"))]),l("div",_w,[y[7]||(y[7]=l("div",{class:"section-title"},"项目投入",-1)),($(!0),P(je,null,et(o.value,_=>($(),P("div",{key:_.name,class:"bar-row"},[l("span",kw,W(_.name),1),l("span",xw,[l("span",{class:"bar-fill",style:Un({width:_.percent+"%"})},null,4)]),l("span",Cw,W(_.count)+" 条 · "+W(_.percent)+"%",1)]))),128)),o.value.length?ye("",!0):($(),P("div",$w,"暂无数据"))])]),l("div",Sw,[y[8]||(y[8]=l("div",{class:"section-title"},"地点分布(按出勤天)",-1)),($(!0),P(je,null,et(i.value,_=>($(),P("div",{key:_.name,class:"bar-row"},[l("span",Ew,W(_.name),1),l("span",Tw,[l("span",{class:"bar-fill",style:Un({width:_.percent+"%"})},null,4)]),l("span",Aw,W(_.count)+" 天 · "+W(_.percent)+"%",1)]))),128)),i.value.length?ye("",!0):($(),P("div",Pw,"暂无数据"))])]))}}),Mw=Nt(Ow,[["__scopeId","data-v-5469ae68"]]);async function Iw(e,t,n){const r=ot(),o=await Promise.all([ps(),Xr(e,t),Qr(e,t),rr(!0),mh(e,t),Zr()]),i=o[0],c=o[1],f=o[2],v=o[3],b=o[4],y=o[5];let _=0,E=0,C=0;for(const j of c){(j.clock_in_at||j.kind==="makeup")&&_++,j.kind==="makeup"&&C++;const ne=cr(j,j.date,i,j.date===r);E+=ne.workedMinutes??0}const M=new Map;for(const j of c){if(!(j.clock_in_at||j.kind==="makeup"))continue;const ne=j.location||"未记录";M.set(ne,(M.get(ne)||0)+1)}const J=Array.from(M.entries()).map(j=>({name:j[0],count:j[1]})).sort((j,ne)=>ne.count-j.count),oe=f.length||1,ue=new Map;for(const j of f)ue.set(j.category,(ue.get(j.category)||0)+1);const ce=new Set(y);for(const j of ue.keys())ce.has(j)||y.push(j);const U=y.map(j=>{const ne=ue.get(j)||0;return{key:j,label:j,count:ne,percent:Math.round(ne/oe*100)}}).filter(j=>j.count>0).sort((j,ne)=>ne.count-j.count),T=new Map(v.map(j=>[j.id,j.name])),q=new Map;for(const j of f){const ne=j.project_id?T.get(j.project_id)||"已删除项目":"无项目";q.set(ne,(q.get(ne)||0)+1)}const Z=Array.from(q.entries()).map(j=>({name:j[0],count:j[1]})).sort((j,ne)=>ne.count-j.count),G=f.filter(j=>j.is_milestone===1).map(j=>({date:j.date,content:j.content})),re=f.filter(j=>j.needs_followup===1).map(j=>({date:j.date,content:j.content,remark:j.remark||""})),I=f.filter(j=>!!j.takeaway).map(j=>({date:j.date,text:j.takeaway})),S=b.map(j=>({weekStart:j.week_start,highlights:j.highlights||"",challenges:j.challenges||"",plan_next:j.plan_next||""}));return{range:{start:e,end:t,label:n},attendDays:_,totalHours:(E/60).toFixed(1),makeupCount:C,leaveCount:c.filter(j=>j.kind==="leave").length,itemCount:f.length,categoryStats:U,projectStats:Z,locationStats:J,milestones:G,followups:re,takeaways:I,weekNotes:S}}function jw(e){const t=[];t.push("# 实习工作总结("+e.range.start+" ~ "+e.range.end+")"),t.push(""),t.push("## 一、考勤概况"),t.push(""),t.push("出勤 "+e.attendDays+" 天,累计工时 "+e.totalHours+" 小时,补卡 "+e.makeupCount+" 次"+(e.leaveCount?",请假 "+e.leaveCount+" 天":""));const n=e.locationStats.filter(r=>r.name!=="未记录");n.length&&t.push("其中:"+n.map(r=>r.name+" "+r.count+" 天").join(",")),t.push(""),t.push("## 二、工作内容分布"),t.push(""),t.push(e.categoryStats.length?e.categoryStats.map(r=>r.label+" "+r.percent+"%("+r.count+" 条)").join(","):"(无记录)"),t.push(""),t.push("## 三、项目投入"),t.push(""),t.push(e.projectStats.length?e.projectStats.map(r=>r.name+" "+r.count+" 条").join(","):"(无记录)"),t.push(""),t.push("## 四、主要成果"),t.push(""),e.milestones.length?e.milestones.forEach((r,o)=>t.push(o+1+". 【成果】"+r.content+"("+r.date+")")):t.push("(无)"),t.push(""),t.push("## 五、待跟进事项"),t.push(""),e.followups.length?e.followups.forEach(r=>t.push("- 【待跟进】"+r.content+(r.remark?"("+r.date+" 备注:"+r.remark+")":"("+r.date+")"))):t.push("(无)"),t.push(""),t.push("## 六、学习与成长"),t.push(""),e.takeaways.length?e.takeaways.forEach(r=>t.push("- "+r.text+"("+r.date+")")):t.push("(无)");for(const r of e.weekNotes)t.push(""),t.push("### 周记("+r.weekStart+" 起)"),t.push(""),t.push("- 本周亮点:"+(r.highlights||"(无)")),t.push("- 踩的坑:"+(r.challenges||"(无)")),t.push("- 下周计划:"+(r.plan_next||"(无)"));return t.push(""),t.join(` +`)}async function zi(e){try{await navigator.clipboard.writeText(e)}catch{const t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}}async function Dw(e){const t=await Promise.all([xt("ai_base_url",""),xt("ai_api_key",""),xt("ai_model","")]),n=t[0].trim().replace(/\/+$/,""),r=t[1].trim(),o=t[2].trim();if(!n||!o)throw new Error("请先在设置页配置 AI 接口地址与模型名称");const i=n+"/chat/completions",c={"Content-Type":"application/json"};r&&(c.Authorization="Bearer "+r);const v=JSON.stringify({model:o,messages:[{role:"system",content:"你是一名严谨的中文助理。请将用户提供的工作总结 Markdown 草稿润色为通顺、专业、简洁的工作总结。要求:保留原有章节结构与全部事实数据(数字、日期、条目),不得虚构或遗漏内容,只输出 Markdown 正文。"},{role:"user",content:e}],temperature:.3});let b;try{b=await fetch(i,{method:"POST",headers:c,body:v})}catch{throw new Error("无法访问 AI 接口:请检查地址是否正确、服务端是否允许浏览器跨域访问")}if(!b.ok){let E="接口返回 "+b.status;try{const C=await b.json();C&&C.error&&C.error.message&&(E+=":"+C.error.message)}catch{}throw new Error(E)}const y=await b.json(),_=y&&y.choices&&y.choices[0]&&y.choices[0].message&&y.choices[0].message.content;if(!_)throw new Error("接口未返回内容");return String(_)}const Lw={class:"report"},Kw={class:"report-toolbar"},Rw={class:"seg"},Fw=["onClick"],Nw=["disabled"],Vw=["disabled"],Bw={key:0,class:"ai-error"},Uw={class:"report-grid"},qw={class:"report-left"},Hw={class:"card section"},zw={class:"section-title"},Ww={class:"muted note-saved"},Gw={class:"card section"},Yw={class:"report-right"},Jw={key:0,class:"card section"},Xw={class:"sum-row"},Qw={class:"num"},Zw={class:"sum-row"},e_={class:"num"},t_={class:"sum-row"},n_={class:"num"},s_={class:"sum-row"},r_={class:"num"},o_={class:"sum-row"},a_={class:"num"},i_={class:"muted"},l_={class:"num"},u_={key:0,class:"muted sum-empty"},c_={class:"muted"},d_={key:1,class:"muted sum-empty"},f_={class:"muted"},p_={key:2,class:"muted sum-empty"},v_={class:"muted"},m_={key:3,class:"muted sum-empty"},h_=Lt({__name:"ReportView",setup(e){const t=[{key:"week",label:"本周"},{key:"month",label:"本月"},{key:"all",label:"全部"},{key:"custom",label:"自定义"}],n=O("week"),r=O(Qs(ot())),o=O(ot()),i=O(null),c=O(""),f=O(!1),v=O(!1),b=O(null),y=O(""),_=O(Qs(ot())),E=O(""),C=O(""),M=O(""),J=O(!1);async function oe(){const re=await hl(_.value);E.value=(re==null?void 0:re.highlights)||"",C.value=(re==null?void 0:re.challenges)||"",M.value=(re==null?void 0:re.plan_next)||"",J.value=!1}async function ue(){await vh(_.value,{highlights:E.value.trim()||null,challenges:C.value.trim()||null,plan_next:M.value.trim()||null}),J.value=!0,await U()}function ce(re){const I=ot();if(re==="week"){const S=Qs(I);return{start:S,end:Ft(S,6),label:"本周"}}if(re==="month"){const S=I.slice(0,7);return{start:S+"-01",end:I,label:S+" 本月"}}return re==="all"?{start:"2000-01-01",end:I,label:"全部实习期"}:{start:r.value,end:o.value,label:r.value+" ~ "+o.value}}async function U(){f.value=!0;const re=ce(n.value),I=await Iw(re.start,re.end,re.label);i.value=I,c.value=jw(I),f.value=!1}gt(n,U),gt([r,o],()=>{n.value==="custom"&&U()}),vn(async()=>{await oe(),await U()});async function T(){const re=ot().replace(/-/g,""),I=await Sa("实习工作总结_"+re+".md",c.value);Ve(I?"总结已导出到:"+I:"总结已导出到系统下载目录")}async function q(){await zi(c.value),Ve("总结已复制到剪贴板")}async function Z(){if(v.value)return;y.value="";const re=c.value.trim();if(!re){y.value="当前草稿为空,无法润色";return}v.value=!0;try{b.value=c.value,c.value=await Dw(re),Ve("AI 润色完成")}catch(I){b.value=null,y.value=I instanceof Error?I.message:"润色失败"}v.value=!1}function G(){b.value!==null&&(c.value=b.value),b.value=null}return(re,I)=>($(),P("div",Lw,[l("div",Kw,[l("div",Rw,[($(),P(je,null,et(t,S=>l("button",{key:S.key,class:Xe(["seg-btn",{active:n.value===S.key}]),onClick:j=>n.value=S.key},W(S.label),11,Fw)),64))]),n.value==="custom"?($(),P(je,{key:0},[Oe(l("input",{type:"date",class:"input w-date","onUpdate:modelValue":I[0]||(I[0]=S=>r.value=S)},null,512),[[Re,r.value]]),I[6]||(I[6]=l("span",{class:"muted"},"至",-1)),Oe(l("input",{type:"date",class:"input w-date","onUpdate:modelValue":I[1]||(I[1]=S=>o.value=S)},null,512),[[Re,o.value]])],64)):ye("",!0),I[10]||(I[10]=l("span",{class:"flex1"},null,-1)),l("button",{class:"btn btn-sm",disabled:v.value,onClick:Z},[we(qe,{name:"edit",size:14}),I[7]||(I[7]=mt("AI 润色 ",-1))],8,Nw),b.value!==null?($(),P("button",{key:1,class:"btn btn-sm",onClick:G},"还原润色前")):ye("",!0),l("button",{class:"btn btn-sm",disabled:f.value,onClick:U},[we(qe,{name:"edit",size:14}),I[8]||(I[8]=mt("重新生成 ",-1))],8,Vw),l("button",{class:"btn btn-sm",onClick:q},"复制"),l("button",{class:"btn btn-primary btn-sm",onClick:T},[we(qe,{name:"export",size:14}),I[9]||(I[9]=mt("导出 Markdown ",-1))])]),y.value?($(),P("div",Bw,W(y.value),1)):ye("",!0),l("div",Uw,[l("div",qw,[l("div",Hw,[l("div",zw,"本周周记("+W(_.value)+" 起)",1),I[11]||(I[11]=l("label",{class:"note-label muted"},"本周亮点",-1)),Oe(l("textarea",{class:"textarea","onUpdate:modelValue":I[2]||(I[2]=S=>E.value=S),placeholder:"本周最有价值的一件事",onBlur:ue},null,544),[[Re,E.value]]),I[12]||(I[12]=l("label",{class:"note-label muted"},"踩的坑",-1)),Oe(l("textarea",{class:"textarea","onUpdate:modelValue":I[3]||(I[3]=S=>C.value=S),placeholder:"遇到的问题与教训",onBlur:ue},null,544),[[Re,C.value]]),I[13]||(I[13]=l("label",{class:"note-label muted"},"下周计划",-1)),Oe(l("textarea",{class:"textarea","onUpdate:modelValue":I[4]||(I[4]=S=>M.value=S),placeholder:"下周准备做什么",onBlur:ue},null,544),[[Re,M.value]]),l("div",Ww,W(J.value?"已保存":"失焦自动保存"),1)]),l("div",Gw,[I[14]||(I[14]=l("div",{class:"section-title"},"总结草稿(可编辑)",-1)),Oe(l("textarea",{class:"textarea md-editor","onUpdate:modelValue":I[5]||(I[5]=S=>c.value=S),spellcheck:"false"},null,512),[[Re,c.value]])])]),l("div",Yw,[i.value?($(),P("div",Jw,[I[20]||(I[20]=l("div",{class:"section-title"},"数据摘要",-1)),l("div",Xw,[I[15]||(I[15]=l("span",{class:"muted"},"出勤",-1)),l("span",Qw,W(i.value.attendDays)+" 天",1)]),l("div",Zw,[I[16]||(I[16]=l("span",{class:"muted"},"工时",-1)),l("span",e_,W(i.value.totalHours)+" 小时",1)]),l("div",t_,[I[17]||(I[17]=l("span",{class:"muted"},"补卡",-1)),l("span",n_,W(i.value.makeupCount)+" 次",1)]),l("div",s_,[I[18]||(I[18]=l("span",{class:"muted"},"请假",-1)),l("span",r_,W(i.value.leaveCount)+" 天",1)]),l("div",o_,[I[19]||(I[19]=l("span",{class:"muted"},"记录",-1)),l("span",a_,W(i.value.itemCount)+" 条",1)]),I[21]||(I[21]=l("div",{class:"section-sub"},"分类分布",-1)),($(!0),P(je,null,et(i.value.categoryStats,S=>($(),P("div",{key:S.key,class:"sum-row"},[l("span",i_,W(S.label),1),l("span",l_,W(S.count)+" 条 · "+W(S.percent)+"%",1)]))),128)),i.value.categoryStats.length?ye("",!0):($(),P("div",u_,"(无)")),I[22]||(I[22]=l("div",{class:"section-sub"},"主要成果",-1)),($(!0),P(je,null,et(i.value.milestones,(S,j)=>($(),P("div",{key:"m"+j,class:"sum-item"},[mt(W(S.content),1),l("span",c_,"("+W(S.date)+")",1)]))),128)),i.value.milestones.length?ye("",!0):($(),P("div",d_,"(无)")),I[23]||(I[23]=l("div",{class:"section-sub"},"待跟进",-1)),($(!0),P(je,null,et(i.value.followups,(S,j)=>($(),P("div",{key:"f"+j,class:"sum-item"},[mt(W(S.content),1),l("span",f_,"("+W(S.date)+")",1)]))),128)),i.value.followups.length?ye("",!0):($(),P("div",p_,"(无)")),I[24]||(I[24]=l("div",{class:"section-sub"},"学习与成长",-1)),($(!0),P(je,null,et(i.value.takeaways,(S,j)=>($(),P("div",{key:"t"+j,class:"sum-item"},[mt(W(S.text),1),l("span",v_,"("+W(S.date)+")",1)]))),128)),i.value.takeaways.length?ye("",!0):($(),P("div",m_,"(无)"))])):ye("",!0)])])]))}}),y_=Nt(h_,[["__scopeId","data-v-36db413b"]]),g_=["aria-label"],b_={class:"dialog-head"},w_={class:"dialog-title"},__={class:"dialog-body"},k_={class:"form-grid"},x_={class:"field span2"},C_={class:"seg"},$_={class:"field"},S_={class:"field"},E_={class:"field"},T_=["value"],A_={class:"add-cat"},P_=["onKeydown"],O_={key:0,class:"field"},M_={class:"seg"},I_={class:"field span2"},j_={key:0,class:"form-error"},D_={class:"dialog-btns"},L_=Lt({__name:"TransactionDialog",props:{open:{type:Boolean},title:{},initial:{}},emits:["cancel","save"],setup(e,{emit:t}){const n=e,r=t,o=O("expense"),i=O(""),c=O(""),f=O(""),v=O(""),b=O(!1),y=O(!1),_=O(""),E=O(null);function C(T){n.open&&T.key==="Escape"&&r("cancel")}gt(()=>n.open,async T=>{var q;T?(await J(),o.value=n.initial.type==="income"?"income":"expense",i.value=n.initial.category,c.value=n.initial.amountYuan,f.value=n.initial.date,v.value=n.initial.note,b.value=n.initial.reimbursable===1,y.value=n.initial.reimbursed===1,_.value="",window.addEventListener("keydown",C),await ir(),(q=E.value)==null||q.focus()):window.removeEventListener("keydown",C)}),Wn(()=>window.removeEventListener("keydown",C)),gt(o,async()=>{await J(),i.value=M.value[0]||""});const M=O([]);async function J(){M.value=await Wr(o.value)}const oe=O("");async function ue(){const T=oe.value.trim();if(T){if(M.value.includes(T)){oe.value="";return}M.value.push(T),await Ts(o.value,M.value),i.value=T,oe.value=""}}function ce(){return i.value&&M.value.includes(i.value)?i.value:M.value[0]}function U(){const T=String(c.value??"").trim(),q=Number(T);if(!T||!isFinite(q)||q<=0){_.value="请填写大于 0 的金额";return}if(!f.value){_.value="请选择日期";return}const Z=o.value==="expense"&&b.value?1:0;r("save",{type:o.value,category:ce(),amount:Math.round(q*100),date:f.value,note:String(v.value??"").trim(),reimbursable:Z,reimbursed:Z&&y.value?1:0})}return(T,q)=>($(),St(Hn,{to:"body"},[we(lr,{name:"modal"},{default:ms(()=>[e.open?($(),P("div",{key:0,class:"mask",onClick:q[12]||(q[12]=zt(Z=>r("cancel"),["self"]))},[l("div",{class:"dialog",role:"dialog","aria-label":e.title},[l("div",b_,[l("span",w_,W(e.title),1),l("button",{class:"icon-btn",title:"关闭",onClick:q[0]||(q[0]=Z=>r("cancel"))},[we(qe,{name:"close",size:16})])]),l("div",__,[l("div",k_,[l("div",x_,[q[13]||(q[13]=l("label",null,"类型",-1)),l("div",C_,[l("button",{class:Xe(["seg-btn",{active:o.value==="expense"}]),onClick:q[1]||(q[1]=Z=>o.value="expense")},"支出",2),l("button",{class:Xe(["seg-btn",{active:o.value==="income"}]),onClick:q[2]||(q[2]=Z=>o.value="income")},"收入",2)])]),l("div",$_,[q[14]||(q[14]=l("label",null,"金额(元,必填)",-1)),Oe(l("input",{ref_key:"amountInput",ref:E,class:Xe(["input",{invalid:_.value}]),"onUpdate:modelValue":q[3]||(q[3]=Z=>c.value=Z),type:"number",min:"0",step:"0.01",placeholder:"0.00"},null,2),[[Re,c.value]])]),l("div",S_,[q[15]||(q[15]=l("label",null,"日期(必填)",-1)),Oe(l("input",{class:"input",type:"date","onUpdate:modelValue":q[4]||(q[4]=Z=>f.value=Z)},null,512),[[Re,f.value]])]),l("div",E_,[q[16]||(q[16]=l("label",null,"分类(可直接新增)",-1)),Oe(l("select",{class:"select","onUpdate:modelValue":q[5]||(q[5]=Z=>i.value=Z)},[($(!0),P(je,null,et(M.value,Z=>($(),P("option",{key:Z,value:Z},W(Z),9,T_))),128))],512),[[fs,i.value]]),l("div",A_,[Oe(l("input",{class:"input add-cat-input","onUpdate:modelValue":q[6]||(q[6]=Z=>oe.value=Z),placeholder:"新增分类名",onKeydown:Mt(zt(ue,["prevent"]),["enter"])},null,40,P_),[[Re,oe.value]]),l("button",{class:"btn btn-xs",type:"button",onClick:ue},"添加")])]),o.value==="expense"?($(),P("div",O_,[q[17]||(q[17]=l("label",null,"报销状态",-1)),l("div",M_,[l("button",{class:Xe(["seg-btn",{active:!b.value}]),onClick:q[7]||(q[7]=Z=>{b.value=!1,y.value=!1})},"无需报销",2),l("button",{class:Xe(["seg-btn",{active:b.value&&!y.value}]),onClick:q[8]||(q[8]=Z=>{b.value=!0,y.value=!1})},"待报销",2),l("button",{class:Xe(["seg-btn",{active:b.value&&y.value}]),onClick:q[9]||(q[9]=Z=>{b.value=!0,y.value=!0})},"已报销",2)])])):ye("",!0),l("div",I_,[q[18]||(q[18]=l("label",null,"备注",-1)),Oe(l("textarea",{class:"textarea","onUpdate:modelValue":q[10]||(q[10]=Z=>v.value=Z),placeholder:"选填"},null,512),[[Re,v.value]])])]),_.value?($(),P("div",j_,W(_.value),1)):ye("",!0)]),l("div",D_,[l("button",{class:"btn btn-sm",onClick:q[11]||(q[11]=Z=>r("cancel"))},"取消"),l("button",{class:"btn btn-primary btn-sm",onClick:U},"保存")])],8,g_)])):ye("",!0)]),_:1})]))}}),K_=Nt(L_,[["__scopeId","data-v-a4b3a7d0"]]),R_={class:"ledger-page"},F_={class:"ledger-toolbar"},N_={class:"month-title num"},V_={class:"cards"},B_={class:"card stat-card"},U_={class:"stat-num num amt-income"},q_={class:"card stat-card"},H_={class:"stat-num num"},z_={class:"card stat-card"},W_={class:"card stat-card"},G_={class:"stat-num num amt-warn"},Y_={key:0,class:"card sec"},J_={class:"bar-label"},X_={class:"bar-track"},Q_={class:"muted num bar-num"},Z_={key:1,class:"card section"},e1={class:"form-error"},t1={class:"card table-card"},n1={class:"tx-table"},s1={class:"num","data-label":"日期"},r1={"data-label":"分类"},o1={class:"tag"},a1={class:"td-note","data-label":"备注"},i1={"data-label":"报销"},l1={key:0,class:"muted"},u1={key:1,class:"tx-done"},c1={key:2,class:"tx-pending"},d1={class:"ops-cell"},f1={class:"ops"},p1=["onClick"],v1=["onClick"],m1=["onClick"],h1={key:0},y1={class:"muted table-note num"},g1=Lt({__name:"LedgerView",setup(e){const t=O(ot()),n=O([]),r=O(!0),o=O("");ot();const i=O(""),c=O(""),f=O(!1),v=O(null),b=O({type:"expense",category:"",amountYuan:"",date:ot(),note:"",reimbursable:0,reimbursed:0}),y=O(null),_=rt(()=>t.value.slice(0,7)+"-01"),E=rt(()=>{const de=Number(t.value.slice(0,4)),ke=Number(t.value.slice(5,7))-1,Se=new Date(de,ke+1,0).getDate();return t.value.slice(0,7)+"-"+(Se<10?"0"+Se:String(Se))}),C=rt(()=>Number(t.value.slice(0,4))+" 年 "+Number(t.value.slice(5,7))+" 月");async function M(){r.value=!0;try{n.value=await Dh(_.value,E.value),c.value=""}catch(de){c.value="账目加载失败:"+(de instanceof Error?de.stack||de.message:String(de)),Ve("账目加载失败")}r.value=!1}vn(M),gt(t,M);const J=O([]),oe=O([]);async function ue(){J.value=await Wr("expense"),oe.value=await Wr("income")}ue();const ce=rt(()=>n.value.slice().sort((de,ke)=>de.date===ke.date?ke.id-de.id:de.date{let de=0,ke=0,Se=0;for(const De of n.value)De.type==="income"?de+=De.amount:(ke+=De.amount,De.reimbursable===1&&De.reimbursed!==1&&(Se+=De.amount));return{income:de,expense:ke,pending:Se,balance:de-ke}}),T=O("all"),q=O("all"),Z=rt(()=>ce.value.filter(de=>!(T.value!=="all"&&de.type!==T.value||q.value==="pending"&&!(de.type==="expense"&&de.reimbursable===1&&de.reimbursed!==1)||q.value==="done"&&!(de.reimbursable===1&&de.reimbursed===1)))),G=rt(()=>{const de=new Map;let ke=0;for(const De of n.value)De.type==="expense"&&(de.set(De.category,(de.get(De.category)||0)+De.amount),ke+=De.amount);const Se=ke||1;return Array.from(de.entries()).map(De=>({name:De[0],amount:De[1],percent:Math.round(De[1]/Se*100)})).sort((De,$e)=>$e.amount-De.amount)});function re(de){return(de/100).toFixed(2)}function I(de){return(de.type==="income"?"+":"-")+re(de.amount)}function S(){t.value=na(t.value,-1)}function j(){t.value=na(t.value,1)}function ne(){t.value=ot()}gt(o,()=>{i.value&&(i.value="")});async function Me(de){await Fh(de.id),await M(),Ve("已标记为已报销")}function Ee(de){v.value=de.id,b.value={type:de.type,category:de.category,amountYuan:re(de.amount),date:de.date,note:de.note||"",reimbursable:de.reimbursable,reimbursed:de.reimbursed},f.value=!0}function he(){v.value=null,b.value={type:"expense",category:J.value[0]||"",amountYuan:"",date:ot(),note:"",reimbursable:0,reimbursed:0},f.value=!0}async function Ae(de){if(v.value){await Kh(v.value,de),f.value=!1,await M(),Ve("账目已更新");return}await Lh({type:de.type,category:de.category,amount:de.amount,date:de.date,note:de.note,reimbursable:de.reimbursable,reimbursed:de.reimbursed}),f.value=!1,await M(),Ve("已记一笔")}async function Ue(){y.value&&y.value.id&&await Rh(y.value.id),y.value=null,await M(),Ve("账目已删除")}return(de,ke)=>($(),P("div",R_,[l("div",F_,[l("button",{class:"icon-btn",onClick:S},[we(qe,{name:"chevron-left",size:16})]),l("span",N_,W(C.value),1),l("button",{class:"icon-btn",onClick:j},[we(qe,{name:"chevron-right",size:16})]),l("button",{class:"btn btn-sm",onClick:ne},"回到本月"),ke[7]||(ke[7]=l("span",{class:"flex1"},null,-1)),Oe(l("select",{class:"select w-filter","onUpdate:modelValue":ke[0]||(ke[0]=Se=>T.value=Se)},[...ke[4]||(ke[4]=[l("option",{value:"all"},"全部类型",-1),l("option",{value:"expense"},"仅支出",-1),l("option",{value:"income"},"仅收入",-1)])],512),[[fs,T.value]]),Oe(l("select",{class:"select w-filter","onUpdate:modelValue":ke[1]||(ke[1]=Se=>q.value=Se)},[...ke[5]||(ke[5]=[l("option",{value:"all"},"全部报销",-1),l("option",{value:"pending"},"待报销",-1),l("option",{value:"done"},"已报销",-1)])],512),[[fs,q.value]]),l("button",{class:"btn btn-primary btn-sm",onClick:he},[we(qe,{name:"plus",size:14}),ke[6]||(ke[6]=mt(" 记一笔",-1))])]),l("div",V_,[l("div",B_,[ke[8]||(ke[8]=l("div",{class:"muted"},"本月收入(元)",-1)),l("div",U_,W(re(U.value.income)),1)]),l("div",q_,[ke[9]||(ke[9]=l("div",{class:"muted"},"本月支出(元)",-1)),l("div",H_,W(re(U.value.expense)),1)]),l("div",z_,[ke[10]||(ke[10]=l("div",{class:"muted"},"本月结余(元)",-1)),l("div",{class:Xe(["stat-num num",{"amt-income":U.value.balance>=0,"amt-expense":U.value.balance<0}])},W(re(U.value.balance)),3)]),l("div",W_,[ke[11]||(ke[11]=l("div",{class:"muted"},"待报销(元)",-1)),l("div",G_,W(re(U.value.pending)),1)])]),G.value.length?($(),P("div",Y_,[ke[12]||(ke[12]=l("div",{class:"sec-title"},"本月支出分类",-1)),($(!0),P(je,null,et(G.value,Se=>($(),P("div",{key:Se.name,class:"bar-row"},[l("span",J_,W(Se.name),1),l("span",X_,[l("span",{class:"bar-fill",style:Un({width:Se.percent+"%"})},null,4)]),l("span",Q_,W(re(Se.amount))+" 元 · "+W(Se.percent)+"%",1)]))),128))])):ye("",!0),c.value?($(),P("div",Z_,[l("div",e1,W(c.value),1),ke[13]||(ke[13]=l("div",{class:"muted loc-note"},"请将上方完整错误文字发送给开发者",-1))])):ye("",!0),l("div",t1,[l("table",n1,[ke[15]||(ke[15]=l("thead",null,[l("tr",null,[l("th",null,"日期"),l("th",null,"分类"),l("th",null,"金额(元)"),l("th",null,"备注"),l("th",null,"报销"),l("th",{class:"th-ops"},"操作")])],-1)),l("tbody",null,[($(!0),P(je,null,et(Z.value,Se=>($(),P("tr",{key:Se.id},[l("td",s1,W(Se.date),1),l("td",r1,[l("span",o1,W(Se.category),1)]),l("td",{class:Xe(["num",Se.type==="income"?"amt-income":"amt-expense"]),"data-label":"金额"},W(I(Se)),3),l("td",a1,W(Se.note||"--"),1),l("td",i1,[Se.type!=="expense"||Se.reimbursable!==1?($(),P("span",l1,"--")):Se.reimbursed===1?($(),P("span",u1,"已报销")):($(),P("span",c1,"待报销"))]),l("td",d1,[l("div",f1,[Se.type==="expense"&&Se.reimbursable===1&&Se.reimbursed!==1?($(),P("button",{key:0,class:"btn btn-xs",onClick:De=>Me(Se)},"标记已报销",8,p1)):ye("",!0),l("button",{class:"btn btn-xs",onClick:De=>Ee(Se)},"编辑",8,v1),l("button",{class:"btn btn-xs",onClick:De=>y.value=Se},"删除",8,m1)])])]))),128)),!Z.value.length&&!r.value?($(),P("tr",h1,[...ke[14]||(ke[14]=[l("td",{colspan:"6",class:"empty muted"},"本月暂无账目",-1)])])):ye("",!0)])])]),l("div",y1,"本月 "+W(n.value.length)+" 条 · 当前筛选 "+W(Z.value.length)+" 条",1),we(K_,{open:f.value,title:v.value?"编辑账目":"记一笔",initial:b.value,onCancel:ke[2]||(ke[2]=Se=>f.value=!1),onSave:Ae},null,8,["open","title","initial"]),we(Dn,{open:!!y.value,title:"删除确认",message:y.value?"将删除 "+y.value.date+" 的账目("+y.value.category+" "+re(y.value.amount)+" 元)。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:ke[3]||(ke[3]=Se=>y.value=null),onConfirm:Ue},null,8,["open","message"])]))}}),b1=Nt(g1,[["__scopeId","data-v-1d69492f"]]),w1={class:"memo-page"},_1={class:"card memo-list"},k1={class:"pane-head"},x1={class:"pane-title"},C1={class:"memo-scroll"},$1=["onClick"],S1={class:"memo-item-title"},E1={class:"muted memo-item-sub"},T1={class:"muted num memo-item-time"},A1={key:0,class:"muted empty"},P1={class:"card memo-editor"},O1={class:"editor-foot"},M1={class:"muted foot-info"},I1=["disabled"],j1=["disabled"],D1={key:1,class:"empty muted editor-empty"},L1=Lt({__name:"MemoView",setup(e){const t=O([]),n=O(null),r=O(!1),o=O(""),i=O(""),c=O(null),f=O(null);async function v(){if(t.value=await Ah(),n.value&&n.value.id){const Z=t.value.find(G=>G.id===n.value.id);Z&&(n.value=Z)}}vn(async()=>{await v(),t.value.length&&_(t.value[0]),window.addEventListener("keydown",b)}),Wn(()=>window.removeEventListener("keydown",b)),gt(Vi,async Z=>{if(!Z)return;t.value.length||await v();const G=t.value.find(re=>re.id===Z);Vi.value=null,G&&E(G)},{immediate:!0});function b(Z){(Z.ctrlKey||Z.metaKey)&&Z.key.toLowerCase()==="s"&&r.value&&y.value&&(Z.preventDefault(),oe())}const y=rt(()=>{if(!r.value)return!1;const Z=n.value?n.value.title:"",G=n.value?n.value.content:"";return o.value!==Z||i.value!==G});function _(Z){n.value=Z,r.value=!0,o.value=Z.title,i.value=Z.content}function E(Z){if(!(r.value&&n.value&&n.value.id===Z.id)){if(y.value){f.value={type:"select",memo:Z};return}_(Z)}}function C(){if(y.value){f.value={type:"new"};return}M()}function M(){n.value=null,r.value=!0,o.value="",i.value=""}function J(){n.value?_(n.value):M()}async function oe(){if(!o.value.trim()&&!i.value.trim()){Ve("标题与内容不能都为空");return}if(n.value&&n.value.id)await Oh(n.value.id,o.value,i.value),Ve("备忘已保存");else{const Z=await Ph(o.value,i.value);n.value=Z,o.value=Z.title,i.value=Z.content,Ve("备忘已创建")}await v()}function ue(){n.value&&n.value.id&&(c.value=n.value)}async function ce(){c.value&&c.value.id&&(await Mh(c.value.id),Ve("备忘已删除")),c.value=null,await v(),M()}function U(){const Z=f.value;f.value=null,Z&&(Z.type==="select"?_(Z.memo):M())}function T(Z){return(Z.content||"").replace(/\s+/g," ").slice(0,30)}function q(Z){return Z.replace("T"," ").slice(0,16)}return(Z,G)=>($(),P("div",w1,[l("aside",_1,[l("div",k1,[l("span",x1,"备忘录("+W(t.value.length)+")",1),l("button",{class:"btn btn-primary btn-sm",onClick:C},"新建")]),l("div",C1,[($(!0),P(je,null,et(t.value,re=>($(),P("div",{key:re.id,class:Xe(["memo-item",{active:r.value&&n.value&&n.value.id===re.id}]),onClick:I=>E(re)},[l("div",S1,W(re.title||"无标题"),1),l("div",E1,W(T(re)||"空"),1),l("div",T1,W(q(re.updated_at)),1)],10,$1))),128)),t.value.length?ye("",!0):($(),P("div",A1,"暂无备忘"))])]),l("section",P1,[r.value?($(),P(je,{key:0},[Oe(l("input",{class:"input title-input","onUpdate:modelValue":G[0]||(G[0]=re=>o.value=re),placeholder:"标题"},null,512),[[Re,o.value]]),Oe(l("textarea",{class:"textarea content-textarea","onUpdate:modelValue":G[1]||(G[1]=re=>i.value=re),placeholder:"内容"},null,512),[[Re,i.value]]),l("div",O1,[l("span",M1,[y.value?($(),P(je,{key:0},[mt("有未保存修改")],64)):n.value&&n.value.id?($(),P(je,{key:1},[mt("更新于 "+W(q(n.value.updated_at)),1)],64)):($(),P(je,{key:2},[mt("新备忘")],64))]),G[4]||(G[4]=l("span",{class:"flex1"},null,-1)),n.value&&n.value.id?($(),P("button",{key:0,class:"btn btn-sm",onClick:ue},"删除")):ye("",!0),l("button",{class:"btn btn-sm",disabled:!y.value,onClick:J},"放弃修改",8,I1),l("button",{class:"btn btn-primary btn-sm",disabled:!y.value,onClick:oe},"保存",8,j1)])],64)):($(),P("div",D1,"选择左侧备忘,或点击右上角新建"))]),we(Dn,{open:!!c.value,title:"删除确认",message:c.value?"将删除备忘「"+(c.value.title||"无标题")+"」。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:G[2]||(G[2]=re=>c.value=null),onConfirm:ce},null,8,["open","message"]),we(Dn,{open:!!f.value,title:"未保存提示",message:"当前备忘有未保存的修改,继续操作将丢失这些修改。","confirm-text":"放弃修改并继续",onCancel:G[3]||(G[3]=re=>f.value=null),onConfirm:U},null,8,["open"])]))}}),K1=Nt(L1,[["__scopeId","data-v-123c0b8c"]]),R1=["aria-label"],F1={class:"dialog-head"},N1={class:"dialog-title"},V1={class:"dialog-body"},B1={class:"form-grid"},U1={class:"field span2"},q1={class:"field span2"},H1={class:"field span2"},z1={class:"pwd-row"},W1={class:"field span2"},G1={key:0,class:"form-error"},Y1={class:"dialog-btns"},J1=Lt({__name:"CredentialDialog",props:{open:{type:Boolean},title:{},initial:{}},emits:["cancel","save"],setup(e,{emit:t}){const n=e,r=t,o=O(""),i=O(""),c=O(""),f=O(""),v=O(""),b=O(null);function y(C){n.open&&C.key==="Escape"&&r("cancel")}gt(()=>n.open,async C=>{var M;C?(o.value=n.initial.system,i.value=n.initial.account,c.value=n.initial.password,f.value=n.initial.remark,v.value="",window.addEventListener("keydown",y),await ir(),(M=b.value)==null||M.focus()):window.removeEventListener("keydown",y)}),Wn(()=>window.removeEventListener("keydown",y));function _(){const C="ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz23456789",M="!@#$%^&*",J=crypto.getRandomValues(new Uint8Array(14));let oe="";for(let ue=0;ue($(),St(Hn,{to:"body"},[we(lr,{name:"modal"},{default:ms(()=>[e.open?($(),P("div",{key:0,class:"mask",onClick:M[6]||(M[6]=zt(J=>r("cancel"),["self"]))},[l("div",{class:"dialog",role:"dialog","aria-label":e.title},[l("div",F1,[l("span",N1,W(e.title),1),l("button",{class:"icon-btn",title:"关闭",onClick:M[0]||(M[0]=J=>r("cancel"))},[we(qe,{name:"close",size:16})])]),l("div",V1,[l("div",B1,[l("div",U1,[M[7]||(M[7]=l("label",null,"系统名称(必填)",-1)),Oe(l("input",{ref_key:"systemInput",ref:b,class:"input","onUpdate:modelValue":M[1]||(M[1]=J=>o.value=J),placeholder:"如:企业邮箱 / OA / VPN"},null,512),[[Re,o.value]])]),l("div",q1,[M[8]||(M[8]=l("label",null,"账号(必填)",-1)),Oe(l("input",{class:"input","onUpdate:modelValue":M[2]||(M[2]=J=>i.value=J),placeholder:"用户名、工号或邮箱"},null,512),[[Re,i.value]])]),l("div",H1,[M[9]||(M[9]=l("label",null,"密码(必填)",-1)),l("div",z1,[Oe(l("input",{class:"input","onUpdate:modelValue":M[3]||(M[3]=J=>c.value=J),placeholder:"输入或点击生成"},null,512),[[Re,c.value]]),l("button",{class:"btn btn-sm",onClick:_},"生成")])]),l("div",W1,[M[10]||(M[10]=l("label",null,"备注",-1)),Oe(l("textarea",{class:"textarea","onUpdate:modelValue":M[4]||(M[4]=J=>f.value=J),placeholder:"用途、到期时间、负责人等(选填)"},null,512),[[Re,f.value]])])]),v.value?($(),P("div",G1,W(v.value),1)):ye("",!0)]),l("div",Y1,[l("button",{class:"btn btn-sm",onClick:M[5]||(M[5]=J=>r("cancel"))},"取消"),l("button",{class:"btn btn-primary btn-sm",onClick:E},"保存")])],8,R1)])):ye("",!0)]),_:1})]))}}),X1=Nt(J1,[["__scopeId","data-v-2eafe20e"]]),Q1={class:"vault-page"},Z1={key:0,class:"empty muted"},e0={key:1,class:"card lock-card"},t0={class:"lock-badge"},n0={key:0,class:"form-error"},s0=["disabled"],r0={key:0,class:"form-error"},o0=["disabled"],a0={class:"vault-toolbar"},i0={class:"search-wrap"},l0={class:"card table-card"},u0={class:"cred-table"},c0={class:"td-system"},d0=["onClick"],f0={class:"pwd-cell"},p0={class:"num pwd-text"},v0=["onClick"],m0=["onClick"],h0={class:"td-remark"},y0={class:"td-ops"},g0={class:"ops"},b0=["onClick"],w0=["onClick"],_0={key:0},k0={class:"muted table-note num"},x0={class:"dialog pwd-dialog"},C0={class:"dialog-head"},$0={class:"dialog-body"},S0={class:"vp-field"},E0={class:"vp-field"},T0={class:"vp-field"},A0={key:0,class:"form-error"},P0={class:"dialog-btns"},O0=5*60*1e3,M0=Lt({__name:"VaultView",setup(e){const t=O(null),n=O(cm()),r=O(!1),o=O(""),i=O(""),c=O(""),f=O(""),v=O(""),b=O([]),y=O(""),_=O({}),E=O(!1),C=O(null),M=O({system:"",account:"",password:"",remark:""}),J=O(null),oe=O(!1),ue=O(""),ce=O(""),U=O(""),T=O("");async function q(){b.value=await mm(),_.value={}}let Z=null;function G(){Z!==null&&window.clearTimeout(Z),Z=window.setTimeout(()=>{n.value&&(oa(),n.value=!1,b.value=[],_.value={},Ve("长时间未操作,密码库已自动锁定"))},O0)}function re(){n.value&&G()}vn(async()=>{t.value=await dd(),window.addEventListener("click",re),window.addEventListener("keydown",re),n.value&&G()}),Wn(()=>{window.removeEventListener("click",re),window.removeEventListener("keydown",re),Z!==null&&window.clearTimeout(Z)});const I=rt(()=>{const $e=y.value.trim().toLowerCase();return $e?b.value.filter(fe=>(fe.system+" "+fe.account+" "+(fe.remark||"")).toLowerCase().includes($e)):b.value});async function S(){if(!r.value){if(c.value="",!o.value){c.value="请输入主密码";return}if(o.value.length<6){c.value="主密码至少 6 位";return}if(o.value!==i.value){c.value="两次输入的主密码不一致";return}r.value=!0;try{await dm(o.value),o.value="",i.value="",n.value=!0,G(),await q(),Ve("主密码已设置,密码库已解锁")}catch($e){c.value=$e instanceof Error?$e.message:"设置失败"}r.value=!1}}async function j(){if(!r.value){if(v.value="",!f.value){v.value="请输入主密码";return}r.value=!0;try{await fm(f.value),f.value="",n.value=!0,G(),await q()}catch($e){v.value=$e instanceof Error?$e.message:"解锁失败"}r.value=!1}}function ne(){oa(),n.value=!1,b.value=[],_.value={},Z!==null&&window.clearTimeout(Z),Ve("密码库已锁定")}async function Me($e){const fe=$e.id;if(_.value[fe]){_.value[fe]=!1;return}try{$e.passwordPlain=await yi(fe),_.value[fe]=!0}catch(Ie){Ve(Ie instanceof Error?Ie.message:"解密失败")}}async function Ee($e){try{const fe=await yi($e.id);await zi(fe),Ve("密码已复制")}catch(fe){Ve(fe instanceof Error?fe.message:"复制失败")}}async function he($e){await zi($e.account),Ve("账号已复制")}function Ae(){C.value=null,M.value={system:"",account:"",password:"",remark:""},E.value=!0}async function Ue($e){try{const fe=await yi($e.id);C.value=$e.id,M.value={system:$e.system,account:$e.account,password:fe,remark:$e.remark||""},E.value=!0}catch(fe){Ve(fe instanceof Error?fe.message:"解密失败")}}async function de($e){const fe=C.value??void 0;await hm($e,fe),E.value=!1,await q(),Ve(fe?"账号已更新":"账号已添加")}async function ke(){J.value&&J.value.id&&(await ym(J.value.id),Ve("账号已删除")),J.value=null,await q()}function Se(){ue.value="",ce.value="",U.value="",T.value="",oe.value=!0}async function De(){T.value="";try{const $e=await gm(ue.value,ce.value);oe.value=!1,ue.value="",ce.value="",U.value="",Ve("主密码已修改,"+$e+" 条账号密码已重新加密")}catch($e){T.value=$e instanceof Error?$e.message:"修改失败"}}return($e,fe)=>($(),P("div",Q1,[t.value===null?($(),P("div",Z1,"加载中")):n.value?($(),P(je,{key:2},[l("div",a0,[l("div",i0,[we(qe,{name:"search",size:14,class:"search-icon"}),Oe(l("input",{class:"input","onUpdate:modelValue":fe[3]||(fe[3]=Ie=>y.value=Ie),placeholder:"搜索系统名称、账号或备注"},null,512),[[Re,y.value]])]),fe[16]||(fe[16]=l("span",{class:"flex1"},null,-1)),l("button",{class:"btn btn-sm",onClick:Se},"修改主密码"),l("button",{class:"btn btn-sm",onClick:ne},"锁定"),l("button",{class:"btn btn-primary btn-sm",onClick:Ae},"新增账号")]),l("div",l0,[l("table",u0,[fe[18]||(fe[18]=l("thead",null,[l("tr",null,[l("th",null,"系统名称"),l("th",null,"账号"),l("th",null,"密码"),l("th",null,"备注"),l("th",{class:"th-ops"},"操作")])],-1)),l("tbody",null,[($(!0),P(je,null,et(I.value,Ie=>($(),P("tr",{key:Ie.id},[l("td",c0,W(Ie.system),1),l("td",null,[l("span",{class:"copyable",title:"点击复制账号",onClick:ct=>he(Ie)},W(Ie.account),9,d0)]),l("td",null,[l("div",f0,[l("span",p0,W(_.value[Ie.id]?Ie.passwordPlain:"........"),1),l("button",{class:"btn btn-xs",onClick:ct=>Me(Ie)},W(_.value[Ie.id]?"隐藏":"显示"),9,v0),l("button",{class:"btn btn-xs",onClick:ct=>Ee(Ie)},"复制",8,m0)])]),l("td",h0,W(Ie.remark||"--"),1),l("td",y0,[l("div",g0,[l("button",{class:"btn btn-xs",onClick:ct=>Ue(Ie)},"编辑",8,b0),l("button",{class:"btn btn-xs",onClick:ct=>J.value=Ie},"删除",8,w0)])])]))),128)),I.value.length?ye("",!0):($(),P("tr",_0,[...fe[17]||(fe[17]=[l("td",{colspan:"5",class:"empty muted"},"暂无账号,点击右上角新增",-1)])]))])])]),l("div",k0,"共 "+W(b.value.length)+" 条账号记录 · 密码以 AES-256-GCM 加密,服务器仅存密文",1)],64)):($(),P("div",e0,[l("div",t0,[we(qe,{name:"lock",size:26})]),t.value===!1?($(),P(je,{key:0},[fe[12]||(fe[12]=l("div",{class:"lock-title"},"设置主密码",-1)),fe[13]||(fe[13]=l("div",{class:"muted lock-tip"},"主密码用于加密保存在本机的账号密码,遗忘后无法找回,请务必牢记",-1)),Oe(l("input",{type:"password",class:"input","onUpdate:modelValue":fe[0]||(fe[0]=Ie=>o.value=Ie),placeholder:"设置主密码(至少 6 位)",onKeydown:Mt(S,["enter"])},null,544),[[Re,o.value]]),Oe(l("input",{type:"password",class:"input","onUpdate:modelValue":fe[1]||(fe[1]=Ie=>i.value=Ie),placeholder:"再次输入主密码",onKeydown:Mt(S,["enter"])},null,544),[[Re,i.value]]),c.value?($(),P("div",n0,W(c.value),1)):ye("",!0),l("button",{class:"btn btn-primary lock-btn",disabled:r.value,onClick:S},"完成设置并解锁",8,s0)],64)):($(),P(je,{key:1},[fe[14]||(fe[14]=l("div",{class:"lock-title"},"密码库已锁定",-1)),fe[15]||(fe[15]=l("div",{class:"muted lock-tip"},"输入主密码解锁后查看与复制密码",-1)),Oe(l("input",{type:"password",class:"input","onUpdate:modelValue":fe[2]||(fe[2]=Ie=>f.value=Ie),placeholder:"主密码",onKeydown:Mt(j,["enter"])},null,544),[[Re,f.value]]),v.value?($(),P("div",r0,W(v.value),1)):ye("",!0),l("button",{class:"btn btn-primary lock-btn",disabled:r.value,onClick:j},"解锁",8,o0)],64))])),we(X1,{open:E.value,title:C.value?"编辑账号":"新增账号",initial:M.value,onCancel:fe[4]||(fe[4]=Ie=>E.value=!1),onSave:de},null,8,["open","title","initial"]),we(Dn,{open:!!J.value,title:"删除确认",message:J.value?"将删除系统「"+J.value.system+"」的账号记录。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:fe[5]||(fe[5]=Ie=>J.value=null),onConfirm:ke},null,8,["open","message"]),($(),St(Hn,{to:"body"},[we(lr,{name:"modal"},{default:ms(()=>[oe.value?($(),P("div",{key:0,class:"mask",onClick:fe[11]||(fe[11]=zt(Ie=>oe.value=!1,["self"]))},[l("div",x0,[l("div",C0,[fe[19]||(fe[19]=l("span",{class:"dialog-title"},"修改主密码",-1)),l("button",{class:"icon-btn",title:"关闭",onClick:fe[6]||(fe[6]=Ie=>oe.value=!1)},[we(qe,{name:"close",size:16})])]),l("div",$0,[l("div",S0,[fe[20]||(fe[20]=l("label",null,"旧主密码",-1)),Oe(l("input",{type:"password",class:"input","onUpdate:modelValue":fe[7]||(fe[7]=Ie=>ue.value=Ie)},null,512),[[Re,ue.value]])]),l("div",E0,[fe[21]||(fe[21]=l("label",null,"新主密码(至少 6 位)",-1)),Oe(l("input",{type:"password",class:"input","onUpdate:modelValue":fe[8]||(fe[8]=Ie=>ce.value=Ie)},null,512),[[Re,ce.value]])]),l("div",T0,[fe[22]||(fe[22]=l("label",null,"确认新主密码",-1)),Oe(l("input",{type:"password",class:"input","onUpdate:modelValue":fe[9]||(fe[9]=Ie=>U.value=Ie)},null,512),[[Re,U.value]])]),T.value?($(),P("div",A0,W(T.value),1)):ye("",!0),fe[23]||(fe[23]=l("div",{class:"muted vp-tip"},"确认后所有账号密码将使用新主密码重新加密",-1))]),l("div",P0,[l("button",{class:"btn btn-sm",onClick:fe[10]||(fe[10]=Ie=>oe.value=!1)},"取消"),l("button",{class:"btn btn-primary btn-sm",onClick:De},"确认修改")])])])):ye("",!0)]),_:1})]))]))}}),I0=Nt(M0,[["__scopeId","data-v-a96af9e5"]]);function j0(e){return'"'+(e==null?"":String(e)).replace(/"/g,'""')+'"'}async function Uu(e,t){const r="\uFEFF"+t.map(f=>f.map(j0).join(",")).join(`\r +`);if(ar.isNativePlatform()){const{downloadText:f}=await Od(async()=>{const{downloadText:v}=await Promise.resolve().then(()=>Rg);return{downloadText:v}},void 0,import.meta.url);return f(e,r)}const o=new Blob([r],{type:"text/csv;charset=utf-8"}),i=URL.createObjectURL(o),c=document.createElement("a");return c.href=i,c.download=e,c.click(),window.setTimeout(()=>URL.revokeObjectURL(i),1e4),""}const D0={class:"settings"},L0={class:"card section"},K0={class:"muted acc-line"},R0={class:"ai-grid"},F0={class:"rule-item"},N0={class:"rule-item"},V0={class:"rule-item"},B0={key:0,class:"form-error"},U0={class:"rule-save"},q0={class:"card section"},H0={class:"rule-grid"},z0={class:"rule-item"},W0={class:"rule-item"},G0={class:"rule-item"},Y0={class:"rule-item"},J0={class:"rule-item"},X0={class:"card section"},Q0={class:"proj-add"},Z0={key:0,class:"muted proj-tip"},ek=["onKeydown"],tk=["onClick"],nk=["onClick"],sk=["onClick"],rk={key:1,class:"muted"},ok={class:"card section"},ak={class:"card section"},ik={class:"muted acc-line"},lk={class:"rule-save"},uk=["disabled"],ck={key:0,class:"muted acc-line"},dk={key:1,class:"form-error"},fk={key:2,class:"form-error"},pk={class:"card section"},vk={class:"ai-grid"},mk={class:"rule-item"},hk={class:"rule-item"},yk={class:"rule-item"},gk={class:"card section"},bk={class:"cat-block"},wk={class:"cat-head"},_k={class:"cat-chips"},kk=["onClick"],xk=["onClick"],Ck={class:"cat-block"},$k={class:"cat-head"},Sk={class:"cat-chips"},Ek=["onClick"],Tk=["onClick"],Ak={class:"cat-block"},Pk={class:"cat-head"},Ok={class:"cat-chips"},Mk=["onClick"],Ik=["onClick"],jk={class:"card section"},Dk={class:"backup-row"},Lk={key:0,class:"import-error"},Kk=Lt({__name:"SettingsView",setup(e){var z;const t=O({work_start:"09:00",work_end:"18:00",grace_minutes:10,lunch_minutes:60,remind_weekly:"friday"}),n=O([]),r=O(""),o=O(""),i=O(""),c=O(""),f=O(""),v=O(""),b=O(null),y=O(""),_=O([]),E=O([]),C=O([]);async function M(){_.value=await Zr(),E.value=await Wr("expense"),C.value=await Wr("income")}async function J(ee){const A=window.prompt("新分类名称");if(!A||!A.trim())return;const X=ee==="log"?_.value:ee==="expense"?E.value:C.value,te=A.trim();if(X.includes(te)){Ve("分类已存在");return}const Ce=[...X,te];ee==="log"?(_.value=Ce,await bi(Ce)):ee==="expense"?(E.value=Ce,await Ts("expense",Ce)):(C.value=Ce,await Ts("income",Ce)),Ve("分类已添加")}async function oe(ee,A,X){const te=window.prompt("修改分类名称",X);if(!te||!te.trim()||te.trim()===X)return;const be=(ee==="log"?_.value:ee==="expense"?E.value:C.value).map((Le,Te)=>Te===A?te.trim():Le);ee==="log"?(_.value=be,await bi(be)):ee==="expense"?(E.value=be,await Ts("expense",be)):(C.value=be,await Ts("income",be)),Ve("分类已更新(历史记录自动跟随显示)")}async function ue(ee,A){const X=ee==="log"?_.value:ee==="expense"?E.value:C.value;if(X.length<=1){Ve("至少保留一个分类");return}if(!window.confirm("删除分类「"+X[A]+"」?历史记录不受影响。"))return;const te=X.filter((Ce,be)=>be!==A);ee==="log"?(_.value=te,await bi(te)):ee==="expense"?(E.value=te,await Ts("expense",te)):(C.value=te,await Ts("income",te)),Ve("分类已删除")}const ce=O(null),U=O(null),T=O(""),q=O(((z=Hr())==null?void 0:z.username)||""),Z=O(""),G=O(""),re=O(""),I=O(""),S=O(!1),j="0.6.0",ne=O(""),Me=O(""),Ee=O(""),he=O(""),Ae=O(!1),Ue=O("");async function de(){var ee;ne.value=((ee=wn())==null?void 0:ee.username)||"",Ue.value=await Fm(),he.value=Zs.value}gt(Zs,ee=>{he.value=ee});async function ke(){Ee.value="";try{await gd(),Ve("云端绑定已重建")}catch(ee){Ee.value=ee instanceof Error?ee.message:"绑定失败"}}async function Se(){if(!Ae.value){Ee.value="",he.value=Zs.value,Ae.value=!0;try{const ee=await Bi();Ue.value=ee.at,Me.value="推送 "+ee.pushed+" 条 · 拉取 "+ee.pulled+" 条 · 删除 "+ee.removed+" 条",he.value="",Ve("同步完成")}catch(ee){Ee.value=ee instanceof Error?ee.message:"同步失败"}Ae.value=!1}}async function De(){if(I.value="",G.value!==re.value){I.value="两次输入的新密码不一致";return}try{await Im(Z.value,G.value),Z.value="",G.value="",re.value="",Ve("登录密码已修改")}catch(ee){I.value=ee instanceof Error?ee.message:"修改失败"}}async function $e(){await jm(),window.location.reload()}async function fe(){t.value=await ps(),n.value=await rr(!0),i.value=(await ml()).join(` +`),c.value=await xt("ai_base_url",""),f.value=await xt("ai_api_key",""),v.value=await xt("ai_model",""),await de(),await M()}async function Ie(){await It("ai_base_url",c.value.trim()),await It("ai_api_key",f.value.trim()),await It("ai_model",v.value.trim()),Ve("AI 配置已保存")}async function ct(){const ee=ot(),A=await Promise.all([Qr("2000-01-01",ee),rr(!0)]),X=A[0],te=A[1],Ce=new Map(te.map(Te=>[Te.id,Te.name])),be=[["日期","分类","项目","内容","耗时(分钟)","成果","待跟进","收获","备注"]];for(const Te of X)be.push([Te.date,Ur(Te.category),Te.project_id&&Ce.get(Te.project_id)||"",Te.content,Te.minutes==null?"":Te.minutes,Te.is_milestone?"是":"",Te.needs_followup?"是":"",Te.takeaway||"",Te.remark||""]);const Le=await Uu("工作记录_"+ee.replace(/-/g,"")+".csv",be);Ve(Le?"CSV 已导出到:"+Le:"CSV 已导出到系统下载目录")}async function bt(){const ee=ot(),A=await Promise.all([ps(),Xr("2000-01-01",ee)]),X=A[0],te=A[1],Ce=["周日","周一","周二","周三","周四","周五","周六"],be=[["日期","星期","状态","上班时间","下班时间","地点","类型","说明"]];for(const Te of te){const Qe=cr(Te,Te.date,X,Te.date===ee);be.push([Te.date,Ce[Rs(Te.date).getDay()],Qe.label,Te.clock_in_at?bn(Te.clock_in_at):"",Te.clock_out_at?bn(Te.clock_out_at):"",Te.location||"",Te.kind==="makeup"?"补卡":Te.kind==="leave"?"休假":"正常",Te.note||""])}const Le=await Uu("考勤记录_"+ee.replace(/-/g,"")+".csv",be);Ve(Le?"CSV 已导出到:"+Le:"CSV 已导出到系统下载目录")}vn(fe);async function wt(){await It("work_start",t.value.work_start),await It("work_end",t.value.work_end),await It("grace_minutes",String(t.value.grace_minutes)),await It("lunch_minutes",String(t.value.lunch_minutes)),await It("remind_weekly",t.value.remind_weekly),Ve("打卡规则已保存")}async function Vt(){await Cd(i.value.split(` +`)),Ve("常用地点已保存")}async function pt(){const ee=r.value.trim();if(ee){try{await th(ee),o.value="",r.value=""}catch{o.value="项目名已存在"}await fe()}}function Fe(ee){b.value=ee.id,y.value=ee.name}async function g(ee){const A=y.value.trim();if(A)try{await nh(ee.id,A),o.value=""}catch{o.value="项目名已存在"}b.value=null,await fe()}async function m(ee){await sh(ee.id,ee.archived!==1),await fe()}async function x(){try{const ee=await Nh(),A=await Sa("实习日志备份_"+ot().replace(/-/g,"")+".json",ee);Ve(A?"备份已导出到:"+A:"备份已导出到系统下载目录")}catch(ee){Ve("导出失败:"+(ee instanceof Error?ee.message:String(ee)))}}function D(ee){const A=ee.target,X=A.files&&A.files[0];if(T.value="",!X)return;const te=X.name;X.text().then(Ce=>{U.value={name:te,text:Ce}}),A.value=""}async function ae(){if(U.value)try{await Vh(U.value.text),U.value=null,T.value="",await fe(),Ve("数据导入完成")}catch(ee){U.value=null,T.value=ee instanceof Error?ee.message:"导入失败"}}return(ee,A)=>($(),P("div",D0,[l("div",L0,[A[25]||(A[25]=l("div",{class:"section-title"},"账号与隐私",-1)),l("div",K0,"v"+W(on(j))+" · 当前账号 "+W(q.value)+" · 登录密码仅存 PBKDF2 哈希",1),l("div",R0,[l("div",F0,[A[22]||(A[22]=l("label",null,"旧登录密码",-1)),Oe(l("input",{type:"password",class:"input","onUpdate:modelValue":A[0]||(A[0]=X=>Z.value=X)},null,512),[[Re,Z.value]])]),l("div",N0,[A[23]||(A[23]=l("label",null,"新登录密码(至少 6 位)",-1)),Oe(l("input",{type:"password",class:"input","onUpdate:modelValue":A[1]||(A[1]=X=>G.value=X)},null,512),[[Re,G.value]])]),l("div",V0,[A[24]||(A[24]=l("label",null,"确认新登录密码",-1)),Oe(l("input",{type:"password",class:"input","onUpdate:modelValue":A[2]||(A[2]=X=>re.value=X)},null,512),[[Re,re.value]])])]),I.value?($(),P("div",B0,W(I.value),1)):ye("",!0),l("div",U0,[l("button",{class:"btn btn-primary btn-sm",onClick:De},"修改登录密码"),l("button",{class:"btn btn-sm btn-danger",onClick:A[3]||(A[3]=X=>S.value=!0)},"删除此用户及全部数据")])]),l("div",q0,[A[32]||(A[32]=l("div",{class:"section-title"},"打卡规则",-1)),l("div",H0,[l("div",z0,[A[26]||(A[26]=l("label",null,"上班时间",-1)),Oe(l("input",{type:"time",class:"input","onUpdate:modelValue":A[4]||(A[4]=X=>t.value.work_start=X)},null,512),[[Re,t.value.work_start]])]),l("div",W0,[A[27]||(A[27]=l("label",null,"下班时间",-1)),Oe(l("input",{type:"time",class:"input","onUpdate:modelValue":A[5]||(A[5]=X=>t.value.work_end=X)},null,512),[[Re,t.value.work_end]])]),l("div",G0,[A[28]||(A[28]=l("label",null,"迟到宽限(分钟)",-1)),Oe(l("input",{type:"number",class:"input",min:"0","onUpdate:modelValue":A[6]||(A[6]=X=>t.value.grace_minutes=X)},null,512),[[Re,t.value.grace_minutes,void 0,{number:!0}]])]),l("div",Y0,[A[29]||(A[29]=l("label",null,"午休扣除(分钟)",-1)),Oe(l("input",{type:"number",class:"input",min:"0","onUpdate:modelValue":A[7]||(A[7]=X=>t.value.lunch_minutes=X)},null,512),[[Re,t.value.lunch_minutes,void 0,{number:!0}]])]),l("div",J0,[A[31]||(A[31]=l("label",null,"周记提醒",-1)),Oe(l("select",{class:"select","onUpdate:modelValue":A[8]||(A[8]=X=>t.value.remind_weekly=X)},[...A[30]||(A[30]=[l("option",{value:"friday"},"每周五提醒",-1),l("option",{value:"off"},"关闭",-1)])],512),[[fs,t.value.remind_weekly]])])]),l("div",{class:"rule-save"},[l("button",{class:"btn btn-primary btn-sm",onClick:wt},"保存规则")])]),l("div",X0,[A[33]||(A[33]=l("div",{class:"section-title"},"项目管理",-1)),l("div",Q0,[Oe(l("input",{class:"input","onUpdate:modelValue":A[9]||(A[9]=X=>r.value=X),placeholder:"新项目名称",onKeydown:Mt(pt,["enter"])},null,544),[[Re,r.value]]),l("button",{class:"btn btn-sm",onClick:pt},"添加")]),o.value?($(),P("div",Z0,W(o.value),1)):ye("",!0),($(!0),P(je,null,et(n.value,X=>($(),P("div",{key:X.id,class:"proj-row"},[b.value===X.id?($(),P(je,{key:0},[Oe(l("input",{class:"input","onUpdate:modelValue":A[10]||(A[10]=te=>y.value=te),onKeydown:Mt(te=>g(X),["enter"])},null,40,ek),[[Re,y.value]]),l("button",{class:"btn btn-sm",onClick:te=>g(X)},"保存",8,tk),l("button",{class:"btn btn-sm",onClick:A[11]||(A[11]=te=>b.value=null)},"取消")],64)):($(),P(je,{key:1},[l("span",{class:Xe(["proj-name",{archived:X.archived===1}])},W(X.name),3),l("button",{class:"icon-btn",title:"重命名",onClick:te=>Fe(X)},[we(qe,{name:"edit",size:14})],8,nk),l("button",{class:"btn btn-sm",onClick:te=>m(X)},W(X.archived===1?"恢复":"归档"),9,sk)],64))]))),128)),n.value.length?ye("",!0):($(),P("div",rk,"暂无项目,先添加一个"))]),l("div",ok,[A[35]||(A[35]=l("div",{class:"section-title"},"常用地点",-1)),Oe(l("textarea",{class:"textarea","onUpdate:modelValue":A[12]||(A[12]=X=>i.value=X),placeholder:"每行一个地点,如:公司、客户现场、出差、居家办公"},null,512),[[Re,i.value]]),l("div",{class:"rule-save"},[l("button",{class:"btn btn-primary btn-sm",onClick:Vt},"保存地点"),A[34]||(A[34]=l("span",{class:"muted loc-note"},"打卡时可直接输入新地点,保存后自动加入列表",-1))])]),l("div",ak,[A[36]||(A[36]=l("div",{class:"section-title"},"多端数据同步",-1)),l("div",ik,"云端账号:"+W(ne.value||"未绑定")+" · 数据存于服务器,其他端变更秒级自动刷新",1),l("div",lk,[l("button",{class:"btn btn-primary btn-sm",disabled:Ae.value,onClick:Se},W(Ae.value?"同步中":"立即同步"),9,uk),l("button",{class:"btn btn-sm",onClick:ke},"重新校验连接")]),Me.value?($(),P("div",ck,"上次同步:"+W(Ue.value||"--")+" · "+W(Me.value),1)):ye("",!0),Ee.value?($(),P("div",dk,W(Ee.value),1)):ye("",!0),he.value?($(),P("div",fk,"最近自动同步失败:"+W(he.value)+"(可点「立即同步」重试)",1)):ye("",!0)]),l("div",pk,[A[41]||(A[41]=l("div",{class:"section-title"},"AI 润色配置(可选)",-1)),l("div",vk,[l("div",mk,[A[37]||(A[37]=l("label",null,"接口地址(OpenAI 兼容,到 /v1 为止)",-1)),Oe(l("input",{class:"input","onUpdate:modelValue":A[13]||(A[13]=X=>c.value=X),placeholder:"https://api.example.com/v1"},null,512),[[Re,c.value]])]),l("div",hk,[A[38]||(A[38]=l("label",null,"API Key",-1)),Oe(l("input",{class:"input","onUpdate:modelValue":A[14]||(A[14]=X=>f.value=X),placeholder:"sk-..."},null,512),[[Re,f.value]])]),l("div",yk,[A[39]||(A[39]=l("label",null,"模型名称",-1)),Oe(l("input",{class:"input","onUpdate:modelValue":A[15]||(A[15]=X=>v.value=X),placeholder:"如:deepseek-chat"},null,512),[[Re,v.value]])])]),l("div",{class:"rule-save"},[l("button",{class:"btn btn-primary btn-sm",onClick:Ie},"保存 AI 配置"),A[40]||(A[40]=l("span",{class:"muted loc-note"},"配置仅保存在本机;总结页「AI 润色」需此处先配置",-1))])]),l("div",gk,[A[45]||(A[45]=l("div",{class:"section-title"},"工作分类",-1)),l("div",bk,[l("div",wk,[A[42]||(A[42]=l("span",{class:"muted"},"工作记录分类",-1)),l("button",{class:"btn btn-xs",onClick:A[16]||(A[16]=X=>J("log"))},"添加")]),l("div",_k,[($(!0),P(je,null,et(_.value,(X,te)=>($(),P("span",{key:X+te,class:"cat-chip"},[mt(W(X)+" ",1),l("button",{class:"chip-btn",title:"修改",onClick:Ce=>oe("log",te,X)},"改",8,kk),l("button",{class:"chip-btn",title:"删除",onClick:Ce=>ue("log",te)},"删",8,xk)]))),128))])]),l("div",Ck,[l("div",$k,[A[43]||(A[43]=l("span",{class:"muted"},"记账支出分类",-1)),l("button",{class:"btn btn-xs",onClick:A[17]||(A[17]=X=>J("expense"))},"添加")]),l("div",Sk,[($(!0),P(je,null,et(E.value,(X,te)=>($(),P("span",{key:X+te,class:"cat-chip"},[mt(W(X)+" ",1),l("button",{class:"chip-btn",title:"修改",onClick:Ce=>oe("expense",te,X)},"改",8,Ek),l("button",{class:"chip-btn",title:"删除",onClick:Ce=>ue("expense",te)},"删",8,Tk)]))),128))])]),l("div",Ak,[l("div",Pk,[A[44]||(A[44]=l("span",{class:"muted"},"记账收入分类",-1)),l("button",{class:"btn btn-xs",onClick:A[18]||(A[18]=X=>J("income"))},"添加")]),l("div",Ok,[($(!0),P(je,null,et(C.value,(X,te)=>($(),P("span",{key:X+te,class:"cat-chip"},[mt(W(X)+" ",1),l("button",{class:"chip-btn",title:"修改",onClick:Ce=>oe("income",te,X)},"改",8,Mk),l("button",{class:"chip-btn",title:"删除",onClick:Ce=>ue("income",te)},"删",8,Ik)]))),128))])])]),l("div",jk,[A[46]||(A[46]=l("div",{class:"section-title"},"数据备份",-1)),l("div",Dk,[l("button",{class:"btn btn-sm",onClick:x},"导出 JSON 备份"),l("button",{class:"btn btn-sm",onClick:A[19]||(A[19]=X=>{var te;return(te=ce.value)==null?void 0:te.click()})},"导入 JSON 备份"),l("button",{class:"btn btn-sm",onClick:ct},"导出工作记录 CSV"),l("button",{class:"btn btn-sm",onClick:bt},"导出考勤 CSV"),l("input",{ref_key:"fileInput",ref:ce,type:"file",accept:"application/json,.json",style:{display:"none"},onChange:D},null,544)]),T.value?($(),P("div",Lk,W(T.value),1)):ye("",!0),A[47]||(A[47]=l("div",{class:"muted backup-note"},"数据保存在云端服务器;导出的 JSON 备份用于跨设备迁移或灾后恢复。",-1))]),we(Dn,{open:!!U.value,title:"导入确认",message:U.value?"将从文件「"+U.value.name+"」导入备份。现有全部数据将被覆盖,且不可恢复,请先确认已导出当前备份。":"","confirm-text":"覆盖导入",danger:"",onCancel:A[20]||(A[20]=X=>U.value=null),onConfirm:ae},null,8,["open","message"]),we(Dn,{open:S.value,title:"删除用户确认",message:"将永久删除云端账号「"+q.value+"」及其服务器上的全部数据:工作日志、考勤、备忘录、账号密码库都将被清除,任何设备都无法再取回,且不可恢复。请确认。","confirm-text":"永久删除",danger:"",onCancel:A[21]||(A[21]=X=>S.value=!1),onConfirm:$e},null,8,["open","message"])]))}}),Rk=Nt(Kk,[["__scopeId","data-v-aad752b5"]]),Fk={class:"admin-page"},Nk={class:"card table-card"},Vk={class:"toolbar"},Bk={key:0,class:"form-error tb-error"},Uk={class:"admin-table"},qk={class:"td-name","data-label":"用户名"},Hk={"data-label":"角色"},zk={key:0,class:"role-badge"},Wk={key:1,class:"muted"},Gk={class:"muted num","data-label":"创建时间"},Yk={class:"muted num","data-label":"数据量"},Jk={class:"td-ops"},Xk={class:"ops"},Qk=["onClick"],Zk=["disabled","onClick"],ex={key:0},tx={key:1,class:"muted load-line"},nx={class:"dialog",role:"dialog","aria-label":"新增用户"},sx={class:"dialog-head"},rx={class:"dialog-body"},ox={class:"form-row"},ax={class:"form-row"},ix={class:"form-row"},lx={key:0,class:"form-error"},ux={class:"dialog-btns"},cx=["disabled"],dx={class:"dialog",role:"dialog","aria-label":"重置密码"},fx={class:"dialog-head"},px={class:"dialog-title"},vx={class:"dialog-body"},mx={class:"form-row"},hx={key:0,class:"form-error"},yx={class:"dialog-btns"},gx=["disabled"],bx=Lt({__name:"UserAdminView",setup(e){const t=O([]),n=O(""),r=O(!0),o=O("");async function i(I,S){const j=await Fs();let ne=$a();if(!ne){const Ee=wn(),he=await fetch(j+"/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:Ee==null?void 0:Ee.username,password:Ee==null?void 0:Ee.password})});if(he.ok){const Ae=await he.json();ne=String(Ae.token||""),qr(ne)}}const Me=await fetch(j+I,{method:S?"POST":"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+ne},body:S?JSON.stringify(S):void 0});if(Me.status===401&&wn()){const Ee=wn(),he=await fetch(j+"/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:Ee==null?void 0:Ee.username,password:Ee==null?void 0:Ee.password})});if(he.ok){const Ae=await he.json();ne=String(Ae.token||""),qr(ne);const Ue=await fetch(j+I,{method:S?"POST":"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+ne},body:S?JSON.stringify(S):void 0});return{ok:Ue.ok,status:Ue.status,data:await Ue.json().catch(()=>({}))}}}return{ok:Me.ok,status:Me.status,data:await Me.json().catch(()=>({}))}}async function c(){r.value=!0,o.value="";const I=await i("/api/admin/users");if(!I.ok){r.value=!1,o.value=I.data&&I.data.error||"加载失败 "+I.status;return}t.value=I.data.users||[],n.value=I.data.me||"",r.value=!1}function f(I){return I<=0?"--":I<1024?I+" B":I<1024*1024?(I/1024).toFixed(1)+" KB":(I/1024/1024).toFixed(2)+" MB"}function v(I){return(I||"").slice(0,10)}const b=O(!1),y=O(""),_=O(""),E=O(""),C=O(""),M=O(!1);function J(){b.value=!0,C.value="",y.value="",_.value="",E.value=""}async function oe(){const I=y.value.trim();if(_.value!==E.value){C.value="两次输入的密码不一致";return}if(_.value.length<6){C.value="密码至少 6 位";return}M.value=!0;const S=await i("/api/admin/users/create",{username:I,password:_.value});if(M.value=!1,!S.ok){C.value=S.data&&S.data.error||"创建失败 "+S.status;return}Ve("用户「"+I+"」已创建"),b.value=!1,await c()}const ue=O(null),ce=O(""),U=O(""),T=O(!1);function q(I){ue.value=I,ce.value="",U.value=""}async function Z(){if(!ue.value)return;if(ce.value.length<6){U.value="密码至少 6 位";return}T.value=!0;const I=await i("/api/admin/users/password",{userId:ue.value.id,newPassword:ce.value});if(T.value=!1,!I.ok){U.value=I.data&&I.data.error||"重置失败 "+I.status;return}Ve("已重置「"+ue.value.username+"」的登录密码"),ue.value=null}const G=O(null);async function re(){if(!G.value)return;const I=await i("/api/admin/users/delete",{userId:G.value.id});if(!I.ok){G.value=null,Ve(I.data&&I.data.error||"删除失败");return}Ve("已删除账号「"+G.value.username+"」及其全部云端数据"),G.value=null,await c()}return vn(c),(I,S)=>($(),P("div",Fk,[l("div",Nk,[l("div",Vk,[S[12]||(S[12]=l("div",{class:"head-wrap"},[l("div",{class:"tb-title"},"用户管理"),l("div",{class:"muted tb-sub"},"云端账号统一管理 · 管理员:xionglin")],-1)),l("button",{class:"btn btn-primary btn-sm",onClick:J},[we(qe,{name:"plus",size:14}),S[11]||(S[11]=mt(" 新增用户 ",-1))])]),o.value?($(),P("div",Bk,W(o.value),1)):ye("",!0),l("table",Uk,[S[14]||(S[14]=l("thead",null,[l("tr",null,[l("th",null,"用户名"),l("th",null,"角色"),l("th",null,"创建时间"),l("th",null,"数据量"),l("th",{class:"th-ops"},"操作")])],-1)),l("tbody",null,[($(!0),P(je,null,et(t.value,j=>($(),P("tr",{key:j.id},[l("td",qk,W(j.username),1),l("td",Hk,[j.role==="admin"?($(),P("span",zk,"管理员")):($(),P("span",Wk,"普通用户"))]),l("td",Gk,W(v(j.created_at)),1),l("td",Yk,W(f(j.data_bytes)),1),l("td",Jk,[l("div",Xk,[l("button",{class:"btn btn-xs",onClick:ne=>q(j)},"重置密码",8,Qk),l("button",{class:"btn btn-xs btn-danger",disabled:j.id===n.value,onClick:ne=>G.value=j},"删除",8,Zk)])])]))),128)),!r.value&&!t.value.length?($(),P("tr",ex,[...S[13]||(S[13]=[l("td",{colspan:"5",class:"empty muted"},"加载结果为空",-1)])])):ye("",!0)])]),r.value?($(),P("div",tx,"加载中")):ye("",!0)]),S[20]||(S[20]=l("div",{class:"muted admin-note"},"重置密码立即生效;删除账号将移除其全部云端数据,不可恢复。自己的账号不能删除。",-1)),($(),St(Hn,{to:"body"},[b.value?($(),P("div",{key:0,class:"mask",onClick:S[5]||(S[5]=zt(j=>b.value=!1,["self"]))},[l("div",nx,[l("div",sx,[S[15]||(S[15]=l("span",{class:"dialog-title"},"新增用户",-1)),l("button",{class:"icon-btn",onClick:S[0]||(S[0]=j=>b.value=!1)},[we(qe,{name:"close",size:16})])]),l("div",rx,[l("div",ox,[S[16]||(S[16]=l("label",null,"用户名(2 到 20 个字符)",-1)),Oe(l("input",{class:"input","onUpdate:modelValue":S[1]||(S[1]=j=>y.value=j),placeholder:"如:xiaowang"},null,512),[[Re,y.value]])]),l("div",ax,[S[17]||(S[17]=l("label",null,"初始登录密码(至少 6 位)",-1)),Oe(l("input",{class:"input",type:"password","onUpdate:modelValue":S[2]||(S[2]=j=>_.value=j),placeholder:"转发给使用者,登录后可自行修改"},null,512),[[Re,_.value]])]),l("div",ix,[S[18]||(S[18]=l("label",null,"确认密码",-1)),Oe(l("input",{class:"input",type:"password","onUpdate:modelValue":S[3]||(S[3]=j=>E.value=j),onKeydown:Mt(oe,["enter"])},null,544),[[Re,E.value]])]),C.value?($(),P("div",lx,W(C.value),1)):ye("",!0)]),l("div",ux,[l("button",{class:"btn btn-sm",onClick:S[4]||(S[4]=j=>b.value=!1)},"取消"),l("button",{class:"btn btn-primary btn-sm",disabled:M.value||!y.value.trim(),onClick:oe},W(M.value?"创建中":"创建"),9,cx)])])])):ye("",!0)])),($(),St(Hn,{to:"body"},[ue.value?($(),P("div",{key:0,class:"mask",onClick:S[9]||(S[9]=zt(j=>ue.value=null,["self"]))},[l("div",dx,[l("div",fx,[l("span",px,"重置「"+W(ue.value.username)+"」的登录密码",1),l("button",{class:"icon-btn",onClick:S[6]||(S[6]=j=>ue.value=null)},[we(qe,{name:"close",size:16})])]),l("div",vx,[l("div",mx,[S[19]||(S[19]=l("label",null,"新登录密码(至少 6 位)",-1)),Oe(l("input",{class:"input",type:"password","onUpdate:modelValue":S[7]||(S[7]=j=>ce.value=j),onKeydown:Mt(Z,["enter"])},null,544),[[Re,ce.value]])]),U.value?($(),P("div",hx,W(U.value),1)):ye("",!0)]),l("div",yx,[l("button",{class:"btn btn-sm",onClick:S[8]||(S[8]=j=>ue.value=null)},"取消"),l("button",{class:"btn btn-primary btn-sm",disabled:T.value,onClick:Z},W(T.value?"提交中":"重置"),9,gx)])])])):ye("",!0)])),we(Dn,{open:!!G.value,title:"删除用户确认",message:G.value?"将永久删除云端账号「"+G.value.username+"」及其服务器上的全部数据,不可恢复。请确认。":"","confirm-text":"永久删除",danger:"",onCancel:S[10]||(S[10]=j=>G.value=null),onConfirm:re},null,8,["open","message"])]))}}),wx=Nt(bx,[["__scopeId","data-v-2d48d2c9"]]),_x={class:"login-page"},kx={class:"card login-card"},xx={class:"login-brand"},Cx={class:"brand-icon"},$x={class:"seg"},Sx=["placeholder"],Ex={key:1,class:"form-error"},Tx=["disabled"],Ax=Lt({__name:"LoginView",emits:["login"],setup(e,{emit:t}){const n=t,r=O("login"),o=O(""),i=O(""),c=O(""),f=O(""),v=O(!1);function b(_){r.value=_,f.value="",c.value=""}async function y(){if(!v.value){f.value="",v.value=!0;try{let _;if(r.value==="login")_=await Tm(o.value,i.value);else{if(i.value.length<6){f.value="登录密码至少 6 位",v.value=!1;return}if(i.value!==c.value){f.value="两次输入的密码不一致",v.value=!1;return}_=await Am(o.value,i.value)}n("login",_)}catch(_){f.value=_ instanceof Error?_.message:"操作失败"}v.value=!1}}return(_,E)=>($(),P("div",_x,[l("div",kx,[l("div",xx,[l("div",Cx,[we(qe,{name:"calendar",size:22})]),E[5]||(E[5]=l("div",{class:"login-title"},"实习工作日志",-1)),E[6]||(E[6]=l("div",{class:"muted login-sub"},"打卡 · 记录 · 总结 · 备忘录 · 密码库",-1)),E[7]||(E[7]=l("div",{class:"muted login-sub"},"数据保存在云端服务器,所有设备登录同一账号即可实时同步",-1))]),l("div",$x,[l("button",{class:Xe(["seg-btn",{active:r.value==="login"}]),onClick:E[0]||(E[0]=C=>b("login"))},"登录",2),l("button",{class:Xe(["seg-btn",{active:r.value==="create"}]),onClick:E[1]||(E[1]=C=>b("create"))},"创建用户",2)]),Oe(l("input",{class:"input","onUpdate:modelValue":E[2]||(E[2]=C=>o.value=C),placeholder:"用户名(2 到 20 个字符)",onKeydown:Mt(y,["enter"])},null,544),[[Re,o.value]]),Oe(l("input",{type:"password",class:"input","onUpdate:modelValue":E[3]||(E[3]=C=>i.value=C),placeholder:r.value==="login"?"登录密码":"设置登录密码(至少 6 位)",onKeydown:Mt(y,["enter"])},null,40,Sx),[[Re,i.value]]),r.value==="create"?Oe(($(),P("input",{key:0,type:"password",class:"input","onUpdate:modelValue":E[4]||(E[4]=C=>c.value=C),placeholder:"再次输入密码",onKeydown:Mt(y,["enter"])},null,544)),[[Re,c.value]]):ye("",!0),f.value?($(),P("div",Ex,W(f.value),1)):ye("",!0),l("button",{class:"btn btn-primary login-btn",disabled:v.value,onClick:y},W(r.value==="login"?"登录":"创建并进入"),9,Tx),E[8]||(E[8]=l("div",{class:"muted login-note"}," 登录密码仅服务器保存哈希;本机保存加密的自动登录凭据,登录后无需重复输入 ",-1))])]))}}),Px=Nt(Ax,[["__scopeId","data-v-089817d7"]]),Ox={key:1,class:"app"},Mx={class:"side"},Ix={class:"brand-mark"},jx={class:"side-nav"},Dx={key:0,class:"nav-group"},Lx=["data-tip","onClick"],Kx={class:"nav-label"},Rx={class:"side-foot"},Fx={class:"avatar"},Nx={class:"foot-name"},Vx={class:"main"},Bx={class:"topbar"},Ux={class:"title"},qx={class:"gsearch"},Hx={key:0,class:"gs-panel"},zx={key:0,class:"gs-group muted"},Wx=["onMousedown"],Gx={class:"tag"},Yx={class:"gs-text"},Jx={class:"muted num gs-date"},Xx={key:1,class:"gs-group muted"},Qx=["onMousedown"],Zx={class:"gs-text"},eC={class:"muted gs-sub"},tC={key:1,class:"gs-empty muted"},nC={class:"topbar-actions"},sC=["disabled"],rC={class:"num"},oC={class:"content"},aC={class:"content-inner"},iC={class:"tabbar"},lC=["onClick"],uC={class:"sheet-user num"},cC=["onClick"],dC={class:"sheet-name"},fC={class:"msw"},pC={class:"msw-bar"},vC={class:"msw-results"},mC={key:0,class:"gs-group muted"},hC=["onMousedown"],yC={class:"tag"},gC={class:"gs-text"},bC={class:"muted num gs-date"},wC={key:1,class:"gs-group muted"},_C=["onMousedown"],kC={class:"gs-text"},xC={class:"muted gs-sub"},CC={key:1,class:"gs-empty muted"},$C={class:"toast-wrap"},SC=Lt({__name:"App",setup(e){const t=fy(),n=O(Hr());async function r(g){n.value=g,ia(g.userId),location.hash="#/calendar",q.value="calendar",await Ie(),await Fe(),c();try{await gd(),await tr()}catch{}Ve("欢迎,"+g.username);const m=sessionStorage.getItem("dsh_migrate_toast");m&&(sessionStorage.removeItem("dsh_migrate_toast"),Ve("已迁移原有数据 "+m+" 条"))}async function o(){Ae.value=!1,Ee.value=!1,qm(),i!==null&&(window.clearInterval(i),i=null),await Om(),n.value=null,q.value="calendar",location.hash="#/calendar",Ve("已退出登录")}let i=null;function c(){Um(),i!==null&&window.clearInterval(i),i=window.setInterval(()=>{tr()},60*1e3),tr()}const f=O(null),v=O(""),b=O(!1),y=O({logs:[],memos:[]});let _=null;const E=rt(()=>!!(y.value.logs.length||y.value.memos.length));function C(){_&&window.clearTimeout(_);const g=v.value;_=window.setTimeout(async()=>{const m=g.trim();if(!m){y.value={logs:[],memos:[]};return}const x=await Promise.all([Ih(m,8),jh(m,4)]);y.value={logs:x[0],memos:x[1]}},200)}function M(){v.value="",y.value={logs:[],memos:[]},b.value=!1}function J(g){Ni.value=g.date,Z("calendar"),M()}function oe(g){Vi.value=g.id,Z("memo"),M()}function ue(){window.setTimeout(()=>{b.value=!1},150)}function ce(g){var m;(g.ctrlKey||g.metaKey)&&g.key.toLowerCase()==="k"&&(g.preventDefault(),(m=f.value)==null||m.focus())}const U=[{key:"calendar",name:"日历",icon:"calendar",group:"记录"},{key:"today",name:"详情",icon:"edit",group:"记录"},{key:"plan",name:"计划",icon:"plan",group:"记录"},{key:"ledger",name:"记账",icon:"wallet",group:"工具"},{key:"memo",name:"备忘录",icon:"memo",group:"工具"},{key:"stats",name:"统计",icon:"chart",group:"分析"},{key:"report",name:"总结",icon:"export",group:"分析"},{key:"vault",name:"密码库",icon:"lock",group:"系统"},{key:"settings",name:"设置",icon:"settings",group:"系统"},{key:"admin",name:"用户管理",icon:"shield",group:"系统"}];function T(){var m;const g=(location.hash||"").replace("#/","");return!U.some(x=>x.key===g)||g==="admin"&&(((m=Hr())==null?void 0:m.username)||"")!=="xionglin"?"calendar":g}const q=O(T());window.addEventListener("hashchange",()=>{q.value=T()});function Z(g){location.hash="#/"+g}const G=rt(()=>U.find(g=>g.key===q.value)||U[0]),re=rt(()=>{var g;return(((g=n.value)==null?void 0:g.username)||"")==="xionglin"}),I=rt(()=>re.value?U:U.filter(g=>g.key!=="admin")),S=rt(()=>{const g=U.filter(m=>!ne.includes(m.key));return re.value?g:g.filter(m=>m.key!=="admin")}),j=rt(()=>S.value.some(g=>g.key===q.value));gt([re,q],()=>{q.value==="admin"&&!re.value&&Z("calendar")},{immediate:!0});const ne=["calendar","today","plan","ledger"],Me=U.filter(g=>ne.includes(g.key)),Ee=O(!1);function he(g){Ee.value=!1,Z(g)}const Ae=O(!1),Ue=O(null);function de(){Ae.value=!0,window.setTimeout(()=>{var g;return(g=Ue.value)==null?void 0:g.focus()},60)}function ke(g){J(g),Ae.value=!1}function Se(g){oe(g),Ae.value=!1}const De=O(ot()),$e=O(void 0),fe=O(!1);async function Ie(){if($e.value=await _n(De.value),fe.value=!1,new Date().getHours()<4){const m=await _n(Ft(De.value,-1));fe.value=!!(m&&m.clock_in_at&&!m.clock_out_at)}}const ct=rt(()=>{const g=$e.value;return g&&g.clock_in_at&&!g.clock_out_at?!0:fe.value&&!(g&&g.clock_in_at)}),bt=rt(()=>{const g=$e.value;return!!(g&&g.clock_in_at&&g.clock_out_at)}),wt=rt(()=>{const g=$e.value;return ct.value?"下班打卡":bt.value?"已打卡 "+bn(g==null?void 0:g.clock_in_at)+" - "+bn(g==null?void 0:g.clock_out_at):"上班打卡"});async function Vt(){if(ct.value)try{await oh()}catch{}else await $d(De.value);await Ie(),os()}gt(ur,()=>{n.value&&Ie()});const pt=O(!1);async function Fe(){if((await ps()).remind_weekly==="off"){pt.value=!1;return}const m=new Date().getDay();if(m===5||m===6||m===0){const x=await hl(Qs(De.value));pt.value=!x||!x.highlights&&!x.challenges&&!x.plan_next}else pt.value=!1}return vn(async()=>{window.addEventListener("keydown",ce),n.value&&(ia(n.value.userId),await Ie(),await Fe(),c())}),(g,m)=>{var x,D,ae;return n.value?($(),P("div",Ox,[l("nav",Mx,[l("div",{class:"brand",onClick:m[0]||(m[0]=z=>Z("calendar"))},[l("span",Ix,[we(qe,{name:"calendar",size:15})]),m[12]||(m[12]=l("span",{class:"brand-name"},"实习工作日志",-1))]),l("div",jx,[($(!0),P(je,null,et(I.value,(z,ee)=>($(),P(je,{key:z.key},[ee===0||z.group!==I.value[ee-1].group?($(),P("div",Dx,W(z.group),1)):ye("",!0),l("button",{class:Xe(["nav-btn",{active:q.value===z.key}]),"data-tip":z.name,onClick:A=>Z(z.key)},[we(qe,{name:z.icon,size:17},null,8,["name"]),l("span",Kx,W(z.name),1)],10,Lx)],64))),128))]),l("div",Rx,[l("span",Fx,W((((x=n.value)==null?void 0:x.username)||"用户").slice(0,1).toUpperCase()),1),l("span",Nx,W((D=n.value)==null?void 0:D.username),1),l("button",{class:"icon-btn",title:"退出登录",onClick:o},[we(qe,{name:"export",size:15})])])]),l("div",Vx,[l("header",Bx,[l("span",Ux,W(G.value.name),1),l("button",{class:"mob-search-btn",title:"搜索",onClick:de},[we(qe,{name:"search",size:16})]),l("div",qx,[we(qe,{name:"search",size:14,class:"gs-icon"}),Oe(l("input",{ref_key:"gsInput",ref:f,class:"input gs-input","onUpdate:modelValue":m[1]||(m[1]=z=>v.value=z),placeholder:"搜索工作记录与备忘录(Ctrl+K)",onInput:C,onFocus:m[2]||(m[2]=z=>b.value=!0),onBlur:ue,onKeydown:Mt(M,["esc"])},null,544),[[Re,v.value]]),b.value&&v.value.trim()?($(),P("div",Hx,[E.value?($(),P(je,{key:0},[y.value.logs.length?($(),P("div",zx,"工作记录")):ye("",!0),($(!0),P(je,null,et(y.value.logs,z=>($(),P("div",{key:"l"+z.id,class:"gs-item",onMousedown:zt(ee=>J(z),["prevent"])},[l("span",Gx,W(on(Ur)(z.category)),1),l("span",Yx,W(z.content),1),l("span",Jx,W(z.date),1)],40,Wx))),128)),y.value.memos.length?($(),P("div",Xx,"备忘录")):ye("",!0),($(!0),P(je,null,et(y.value.memos,z=>($(),P("div",{key:"m"+z.id,class:"gs-item",onMousedown:zt(ee=>oe(z),["prevent"])},[l("span",Zx,W(z.title||"无标题"),1),l("span",eC,W(z.content),1)],40,Qx))),128))],64)):($(),P("div",tC,"无匹配结果"))])):ye("",!0)]),m[14]||(m[14]=l("span",{class:"flex1"},null,-1)),l("div",nC,[pt.value?($(),P("button",{key:0,class:"week-tip",onClick:m[3]||(m[3]=z=>Z("report"))},[...m[13]||(m[13]=[l("span",{class:"dot",style:{background:"var(--warn)"}},null,-1),mt(" 填写本周周记 ",-1)])])):ye("",!0),l("button",{class:"btn btn-primary",disabled:bt.value,onClick:Vt},[we(qe,{name:bt.value?"check-circle":"clock",size:14},null,8,["name"]),l("span",rC,W(wt.value),1)],8,sC)])]),l("main",oC,[l("div",aC,[q.value==="calendar"?($(),St(Cg,{key:0})):q.value==="today"?($(),St(Gg,{key:1})):q.value==="plan"?($(),St(tw,{key:2})):q.value==="stats"?($(),St(Mw,{key:3})):q.value==="report"?($(),St(y_,{key:4})):q.value==="ledger"?($(),St(b1,{key:5})):q.value==="memo"?($(),St(K1,{key:6})):q.value==="vault"?($(),St(I0,{key:7})):q.value==="admin"?($(),St(wx,{key:8})):($(),St(Rk,{key:9}))])]),l("nav",iC,[($(!0),P(je,null,et(on(Me),z=>($(),P("button",{key:z.key,class:Xe(["tab-btn",{active:q.value===z.key}]),onClick:ee=>Z(z.key)},[we(qe,{name:z.icon,size:20},null,8,["name"]),l("span",null,W(z.name),1)],10,lC))),128)),l("button",{class:Xe(["tab-btn",{active:j.value}]),onClick:m[4]||(m[4]=z=>Ee.value=!0)},[we(qe,{name:"more",size:20}),m[15]||(m[15]=l("span",null,"更多",-1))],2)]),Ee.value?($(),P("div",{key:0,class:"sheet-mask",onClick:m[7]||(m[7]=z=>Ee.value=!1)},[l("div",{class:"more-sheet",onClick:m[6]||(m[6]=zt(()=>{},["stop"]))},[l("div",uC,W((ae=n.value)==null?void 0:ae.username),1),($(!0),P(je,null,et(S.value,z=>($(),P("button",{key:z.key,class:"sheet-row",onClick:ee=>he(z.key)},[we(qe,{name:z.icon,size:18},null,8,["name"]),l("span",dC,W(z.name),1),we(qe,{name:"chevron-right",size:14,class:"sheet-go"})],8,cC))),128)),m[17]||(m[17]=l("div",{class:"sheet-divider"},null,-1)),l("button",{class:"sheet-row sheet-danger",onClick:m[5]||(m[5]=z=>{Ee.value=!1,o()})},[we(qe,{name:"close",size:18}),m[16]||(m[16]=l("span",{class:"sheet-name"},"退出登录",-1))])])])):ye("",!0),Ae.value?($(),P("div",{key:1,class:"msw-mask",onClick:m[11]||(m[11]=zt(z=>Ae.value=!1,["self"]))},[l("div",fC,[l("div",pC,[we(qe,{name:"search",size:16,class:"msw-icon"}),Oe(l("input",{ref_key:"msInput",ref:Ue,class:"msw-input","onUpdate:modelValue":m[8]||(m[8]=z=>v.value=z),placeholder:"搜索工作记录与备忘录",onInput:C,onKeydown:m[9]||(m[9]=Mt(z=>Ae.value=!1,["esc"]))},null,544),[[Re,v.value]]),l("button",{class:"icon-btn",onClick:m[10]||(m[10]=z=>{M(),Ae.value=!1})},[we(qe,{name:"close",size:16})])]),l("div",vC,[E.value?($(),P(je,{key:0},[y.value.logs.length?($(),P("div",mC,"工作记录")):ye("",!0),($(!0),P(je,null,et(y.value.logs,z=>($(),P("div",{key:"l"+z.id,class:"msw-item",onMousedown:zt(ee=>ke(z),["prevent"])},[l("span",yC,W(on(Ur)(z.category)),1),l("span",gC,W(z.content),1),l("span",bC,W(z.date),1)],40,hC))),128)),y.value.memos.length?($(),P("div",wC,"备忘录")):ye("",!0),($(!0),P(je,null,et(y.value.memos,z=>($(),P("div",{key:"m"+z.id,class:"msw-item",onMousedown:zt(ee=>Se(z),["prevent"])},[l("span",kC,W(z.title||"无标题"),1),l("span",xC,W(z.content),1)],40,_C))),128))],64)):v.value.trim()?($(),P("div",CC,"无匹配结果")):ye("",!0)])])])):ye("",!0)]),l("div",$C,[we(Tv,{name:"toast"},{default:ms(()=>[($(!0),P(je,null,et(on(t),z=>($(),P("div",{key:z.id,class:"toast"},W(z.text),1))),128))]),_:1})])])):($(),St(Px,{key:0,onLogin:r}))}}}),EC=Nt(SC,[["__scopeId","data-v-834d188d"]]);function Bo(e,t){try{let n=document.getElementById("fatal-overlay");n||(n=document.createElement("div"),n.id="fatal-overlay",n.style.cssText="position:fixed;inset:0;z-index:99999;background:#FFFFFF;color:#1D2129;padding:20px;overflow:auto;font:13px/1.7 -apple-system,PingFang SC,Microsoft YaHei,sans-serif;",n.addEventListener("click",i=>{i.target===n&&n.parentElement&&n.parentElement.removeChild(n)}),document.body.appendChild(n));const r=document.createElement("div");r.style.cssText="border:1px solid #E5484D;border-radius:8px;padding:12px;margin-bottom:12px;word-break:break-all;white-space:pre-wrap;",r.textContent=e+` +`+t;const o=document.createElement("button");o.textContent="重新加载",o.style.cssText="margin:-4px 0 12px;padding:6px 16px;border:1px solid #E5484D;border-radius:6px;background:#FFFFFF;color:#E5484D;font-size:13px;cursor:pointer;",o.addEventListener("click",()=>{try{location.reload()}catch{}}),n.appendChild(r),n.appendChild(o)}catch{}}async function TC(){const e=await Pm();e&&ia(e.userId);const t=Uv(EC);t.config.errorHandler=(n,r,o)=>{const i=n;Bo("应用内部错误(点击空白处关闭,请将以下内容发送给开发者)",i&&(i.stack||i.message)||String(n)+` +触发位置: `+o)},window.addEventListener("unhandledrejection",n=>{const r=n.reason;Bo("未处理的异步错误(点击空白处关闭)",r&&(r.stack||r.message)||String(n.reason))}),window.addEventListener("error",n=>{n.message&&n.message!=="ResizeObserver loop limit exceeded"&&Bo("运行错误(点击空白处关闭)",n.message)}),t.mount("#app"),"serviceWorker"in navigator&&location.protocol.startsWith("http")&&window.addEventListener("load",()=>{navigator.serviceWorker.register("sw.js").catch(()=>{})})}TC().catch(e=>{Bo("无法启动:连接同步服务器失败",e&&(e.stack||e.message)||String(e))});export{jd as W,Od as _,Lg as b,Id as r}; diff --git a/intern-log/dist/assets/index-DLDMtYxl.js b/intern-log/dist/assets/index-DLDMtYxl.js deleted file mode 100644 index 67a63e6..0000000 --- a/intern-log/dist/assets/index-DLDMtYxl.js +++ /dev/null @@ -1,27 +0,0 @@ -(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const c of i.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&r(c)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();/** -* @vue/shared v3.5.44 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/function Wi(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const pt={},Ms=[],Pn=()=>{},qu=()=>!1,ca=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),da=e=>e.startsWith("onUpdate:"),Pt=Object.assign,Gi=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},af=Object.prototype.hasOwnProperty,dt=(e,t)=>af.call(e,t),qe=Array.isArray,as=e=>Wr(e)==="[object Map]",Ls=e=>Wr(e)==="[object Set]",Xl=e=>Wr(e)==="[object Date]",Ye=e=>typeof e=="function",Ct=e=>typeof e=="string",On=e=>typeof e=="symbol",ft=e=>e!==null&&typeof e=="object",Hu=e=>(ft(e)||Ye(e))&&Ye(e.then)&&Ye(e.catch),zu=Object.prototype.toString,Wr=e=>zu.call(e),lf=e=>Wr(e).slice(8,-1),Wu=e=>Wr(e)==="[object Object]",Yi=e=>Ct(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Sr=Wi(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),fa=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},uf=/-\w/g,yn=fa(e=>e.replace(uf,t=>t.slice(1).toUpperCase())),cf=/\B([A-Z])/g,vs=fa(e=>e.replace(cf,"-$1").toLowerCase()),Gu=fa(e=>e.charAt(0).toUpperCase()+e.slice(1)),ri=fa(e=>e?`on${Gu(e)}`:""),An=(e,t)=>!Object.is(e,t),Mo=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},pa=e=>{const t=parseFloat(e);return isNaN(t)?e:t},df=e=>{const t=Ct(e)?Number(e):NaN;return isNaN(t)?e:t};let Ql;const va=()=>Ql||(Ql=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Un(e){if(qe(e)){const t={};for(let n=0;nn.startsWith("/*")?"":n).split(ff).forEach(n=>{if(n){const r=n.split(pf);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function Ze(e){let t="";if(Ct(e))t=e;else if(qe(e))for(let n=0;nls(n,t))}const Xu=e=>!!(e&&e.__v_isRef===!0),W=e=>Ct(e)?e:e==null?"":qe(e)||ft(e)&&(e.toString===zu||!Ye(e.toString))?Xu(e)?W(e.value):JSON.stringify(e,Qu,2):String(e),Qu=(e,t)=>Xu(t)?Qu(e,t.value):as(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[r,o],i)=>(n[oi(r,i)+" =>"]=o,n),{})}:Ls(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>oi(n))}:On(t)?oi(t):ft(t)&&!qe(t)&&!Wu(t)?String(t):t,oi=(e,t="")=>{var n;return On(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** -* @vue/reactivity v3.5.44 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/let Nt;class _f{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&Nt&&(Nt.active?(this.parent=Nt,this.index=(Nt.scopes||(Nt.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes){const r=this.scopes.slice();for(t=0,n=r.length;t0&&--this._on===0){if(Nt===this)Nt=this.prevScope;else{let t=Nt;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let n,r;for(n=0,r=this.effects.length;n0)return;if(Tr){let t=Tr;for(Tr=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;Er;){let t=Er;for(Er=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(r){e||(e=r)}t=n}}if(e)throw e}function nc(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function sc(e){let t,n=e.depsTail,r=n;for(;r;){const o=r.prevDep;r.version===-1?(r===n&&(n=o),Qi(r),xf(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=o}e.deps=t,e.depsTail=n}function _i(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(rc(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function rc(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===jr)||(e.globalVersion=jr,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!_i(e))))return;e.flags|=2;const t=e.dep,n=ht,r=gn;ht=e,gn=!0;try{nc(e);const o=e.fn(e._value);(t.version===0||An(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{ht=n,gn=r,sc(e),e.flags&=-3}}function Qi(e,t=!1){const{dep:n,prevSub:r,nextSub:o}=e;if(r&&(r.nextSub=o,e.prevSub=void 0),o&&(o.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let i=n.computed.deps;i;i=i.nextDep)Qi(i,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function xf(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let gn=!0;const oc=[];function Mn(){oc.push(gn),gn=!1}function In(){const e=oc.pop();gn=e===void 0?!0:e}function tu(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=ht;ht=void 0;try{t()}finally{ht=n}}}let jr=0;class Cf{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Zi{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!ht||!gn||ht===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==ht)n=this.activeLink=new Cf(ht,this),ht.deps?(n.prevDep=ht.depsTail,ht.depsTail.nextDep=n,ht.depsTail=n):ht.deps=ht.depsTail=n,ac(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const r=n.nextDep;r.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=r),n.prevDep=ht.depsTail,n.nextDep=void 0,ht.depsTail.nextDep=n,ht.depsTail=n,ht.deps===n&&(ht.deps=r)}return n}trigger(t){this.version++,jr++,this.notify(t)}notify(t){Ji();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Xi()}}}function ac(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let r=t.deps;r;r=r.nextDep)ac(r)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const ki=new WeakMap,js=Symbol(""),xi=Symbol(""),Dr=Symbol("");function Ht(e,t,n){if(gn&&ht){let r=ki.get(e);r||ki.set(e,r=new Map);let o=r.get(n);o||(r.set(n,o=new Zi),o.map=r,o.key=n),o.track()}}function Vn(e,t,n,r,o,i){const c=ki.get(e);if(!c){jr++;return}const f=v=>{v&&v.trigger()};if(Ji(),t==="clear")c.forEach(f);else{const v=qe(e),b=v&&Yi(n);if(v&&n==="length"){const g=Number(r);c.forEach((_,T)=>{(T==="length"||T===Dr||!On(T)&&T>=g)&&f(_)})}else switch((n!==void 0||c.has(void 0))&&f(c.get(n)),b&&f(c.get(Dr)),t){case"add":v?b&&f(c.get("length")):(f(c.get(js)),as(e)&&f(c.get(xi)));break;case"delete":v||(f(c.get(js)),as(e)&&f(c.get(xi)));break;case"set":as(e)&&f(c.get(js));break}}Xi()}function Gs(e){const t=ut(e);return t===e||(Ht(t,"iterate",Dr),dn(e))?t:jn(e)?is(e)?t.map(n=>us(fn(n))):t.map(us):t.map(fn)}function ma(e){return Ht(e=ut(e),"iterate",Dr),e}function Sn(e,t){return jn(e)?us(is(e)?fn(t):t):fn(t)}const $f={__proto__:null,[Symbol.iterator](){return ii(this,Symbol.iterator,e=>Sn(this,e))},concat(...e){return Gs(this).concat(...e.map(t=>qe(t)?Gs(t):t))},entries(){return ii(this,"entries",e=>(e[1]=Sn(this,e[1]),e))},every(e,t){return Kn(this,"every",e,t,void 0,arguments)},filter(e,t){return Kn(this,"filter",e,t,n=>n.map(r=>Sn(this,r)),arguments)},find(e,t){return Kn(this,"find",e,t,n=>Sn(this,n),arguments)},findIndex(e,t){return Kn(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Kn(this,"findLast",e,t,n=>Sn(this,n),arguments)},findLastIndex(e,t){return Kn(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Kn(this,"forEach",e,t,void 0,arguments)},includes(...e){return li(this,"includes",e)},indexOf(...e){return li(this,"indexOf",e)},join(e){return Gs(this).join(e)},lastIndexOf(...e){return li(this,"lastIndexOf",e)},map(e,t){return Kn(this,"map",e,t,void 0,arguments)},pop(){return wr(this,"pop")},push(...e){return wr(this,"push",e)},reduce(e,...t){return su(this,"reduce",e,t)},reduceRight(e,...t){return su(this,"reduceRight",e,t)},shift(){return wr(this,"shift")},some(e,t){return Kn(this,"some",e,t,void 0,arguments)},splice(...e){return wr(this,"splice",e)},toReversed(){return Gs(this).toReversed()},toSorted(e){return Gs(this).toSorted(e)},toSpliced(...e){return Gs(this).toSpliced(...e)},unshift(...e){return wr(this,"unshift",e)},values(){return ii(this,"values",e=>Sn(this,e))}};function ii(e,t,n){const r=ma(e),o=r[t],i=o.call(r);if(r!==e&&!dn(e)){if(i[Symbol.toStringTag]==="Array Iterator"){const c=Object.create(Object.getPrototypeOf(i));return c.next=()=>nu(i.next(),n),o!==ic[t]&&Object.defineProperties(c,{return:{get(){const f=i.return;return typeof f=="function"?f.bind(i):f}},throw:{get(){const f=i.throw;return typeof f=="function"?f.bind(i):f}}}),c}i._next=i.next,i.next=()=>nu(i._next(),n)}return i}function nu(e,t){return e.done||(e.value=t(e.value)),e}const ic=Array.prototype;function Kn(e,t,n,r,o,i){const c=ma(e),f=c!==e&&!dn(e),v=c[t];if(v!==ic[t]){const _=v.apply(e,i);return f?fn(_):_}let b=n;c!==e&&(f?b=function(_,T){return n.call(this,Sn(e,_),T,e)}:n.length>2&&(b=function(_,T){return n.call(this,_,T,e)}));const g=v.call(c,b,r);return f&&o?o(g):g}function su(e,t,n,r){const o=ma(e),i=o!==e&&!dn(e);let c=n,f=!1;o!==e&&(i?(f=r.length===0,c=function(b,g,_){return f&&(f=!1,b=Sn(e,b)),n.call(this,b,Sn(e,g),_,e)}):n.length>3&&(c=function(b,g,_){return n.call(this,b,g,_,e)}));const v=o[t](c,...r);return f?Sn(e,v):v}function li(e,t,n){const r=ut(e);Ht(r,"iterate",Dr);const o=r[t](...n);return(o===-1||o===!1)&&sl(n[0])?(n[0]=ut(n[0]),r[t](...n)):o}function wr(e,t,n=[]){Mn(),Ji();const r=ut(e)[t].apply(e,n);return Xi(),In(),r}const Sf=Wi("__proto__,__v_isRef,__isVue"),lc=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(On));function Ef(e){On(e)||(e=String(e));const t=ut(this);return Ht(t,"has",e),t.hasOwnProperty(e)}class uc{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,r){if(n==="__v_skip")return t.__v_skip;const o=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!o;if(n==="__v_isReadonly")return o;if(n==="__v_isShallow")return i;if(n==="__v_raw")return r===(o?i?Rf:pc:i?fc:dc).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const c=qe(t);if(!o){let v;if(c&&(v=$f[n]))return v;if(n==="hasOwnProperty")return Ef}const f=Reflect.get(t,n,Gt(t)?t:r);if((On(n)?lc.has(n):Sf(n))||(o||Ht(t,"get",n),i))return f;if(Gt(f)){const v=c&&Yi(n)?f:f.value;return o&&ft(v)?$i(v):v}return ft(f)?o?$i(f):tl(f):f}}class cc extends uc{constructor(t=!1){super(!1,t)}set(t,n,r,o){let i=t[n];const c=qe(t)&&Yi(n);if(!this._isShallow){const b=jn(i);if(!dn(r)&&!jn(r)&&(i=ut(i),r=ut(r)),!c&&Gt(i)&&!Gt(r))return b||(i.value=r),!0}const f=c?Number(n)e,$o=e=>Reflect.getPrototypeOf(e);function Mf(e,t,n){return function(...r){const o=this.__v_raw,i=ut(o),c=as(i),f=e==="entries"||e===Symbol.iterator&&c,v=e==="keys"&&c,b=o[e](...r),g=n?Ci:t?us:fn;return!t&&Ht(i,"iterate",v?xi:js),Pt(Object.create(b),{next(){const{value:_,done:T}=b.next();return T?{value:_,done:T}:{value:f?[g(_[0]),g(_[1])]:g(_),done:T}}})}}function So(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function If(e,t){const n={get(o){const i=this.__v_raw,c=ut(i),f=ut(o);e||(An(o,f)&&Ht(c,"get",o),Ht(c,"get",f));const{has:v}=$o(c),b=t?Ci:e?us:fn;if(v.call(c,o))return b(i.get(o));if(v.call(c,f))return b(i.get(f));i!==c&&i.get(o)},get size(){const o=this.__v_raw;return!e&&Ht(ut(o),"iterate",js),o.size},has(o){const i=this.__v_raw,c=ut(i),f=ut(o);return e||(An(o,f)&&Ht(c,"has",o),Ht(c,"has",f)),o===f?i.has(o):i.has(o)||i.has(f)},forEach(o,i){const c=this,f=c.__v_raw,v=ut(f),b=t?Ci:e?us:fn;return!e&&Ht(v,"iterate",js),f.forEach((g,_)=>o.call(i,b(g),b(_),c))}};return Pt(n,e?{add:So("add"),set:So("set"),delete:So("delete"),clear:So("clear")}:{add(o){const i=ut(this),c=$o(i),f=ut(o),v=!t&&!dn(o)&&!jn(o)?f:o;return c.has.call(i,v)||An(o,v)&&c.has.call(i,o)||An(f,v)&&c.has.call(i,f)||(i.add(v),Vn(i,"add",v,v)),this},set(o,i){!t&&!dn(i)&&!jn(i)&&(i=ut(i));const c=ut(this),{has:f,get:v}=$o(c);let b=f.call(c,o);b||(o=ut(o),b=f.call(c,o));const g=v.call(c,o);return c.set(o,i),b?An(i,g)&&Vn(c,"set",o,i):Vn(c,"add",o,i),this},delete(o){const i=ut(this),{has:c,get:f}=$o(i);let v=c.call(i,o);v||(o=ut(o),v=c.call(i,o)),f&&f.call(i,o);const b=i.delete(o);return v&&Vn(i,"delete",o,void 0),b},clear(){const o=ut(this),i=o.size!==0,c=o.clear();return i&&Vn(o,"clear",void 0,void 0),c}}),["keys","values","entries",Symbol.iterator].forEach(o=>{n[o]=Mf(o,e,t)}),n}function el(e,t){const n=If(e,t);return(r,o,i)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_isShallow"?t:o==="__v_raw"?r:Reflect.get(dt(n,o)&&o in r?n:r,o,i)}const jf={get:el(!1,!1)},Df={get:el(!1,!0)},Lf={get:el(!0,!1)};const dc=new WeakMap,fc=new WeakMap,pc=new WeakMap,Rf=new WeakMap;function Kf(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function tl(e){return jn(e)?e:nl(e,!1,Af,jf,dc)}function Nf(e){return nl(e,!1,Of,Df,fc)}function $i(e){return nl(e,!0,Pf,Lf,pc)}function nl(e,t,n,r,o){if(!ft(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const i=o.get(e);if(i)return i;const c=Kf(lf(e));if(c===0)return e;const f=new Proxy(e,c===2?r:n);return o.set(e,f),f}function is(e){return jn(e)?is(e.__v_raw):!!(e&&e.__v_isReactive)}function jn(e){return!!(e&&e.__v_isReadonly)}function dn(e){return!!(e&&e.__v_isShallow)}function sl(e){return e?!!e.__v_raw:!1}function ut(e){const t=e&&e.__v_raw;return t?ut(t):e}function Ff(e){return!dt(e,"__v_skip")&&Object.isExtensible(e)&&Yu(e,"__v_skip",!0),e}const fn=e=>ft(e)?tl(e):e,us=e=>ft(e)?$i(e):e;function Gt(e){return e?e.__v_isRef===!0:!1}function O(e){return Vf(e,!1)}function Vf(e,t){return Gt(e)?e:new Bf(e,t)}class Bf{constructor(t,n){this.dep=new Zi,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:ut(t),this._value=n?t:fn(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,r=this.__v_isShallow||dn(t)||jn(t);t=r?t:ut(t),An(t,n)&&(this._rawValue=t,this._value=r?t:fn(t),this.dep.trigger())}}function un(e){return Gt(e)?e.value:e}const Uf={get:(e,t,n)=>t==="__v_raw"?e:un(Reflect.get(e,t,n)),set:(e,t,n,r)=>{const o=e[t];return Gt(o)&&!Gt(n)?(o.value=n,!0):Reflect.set(e,t,n,r)}};function vc(e){return is(e)?e:new Proxy(e,Uf)}class qf{constructor(t,n,r){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Zi(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=jr-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&ht!==this)return tc(this,!0),!0}get value(){const t=this.dep.track();return rc(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Hf(e,t,n=!1){let r,o;return Ye(e)?r=e:(r=e.get,o=e.set),new qf(r,o,n)}const Eo={},Bo=new WeakMap;let Es;function zf(e,t=!1,n=Es){if(n){let r=Bo.get(n);r||Bo.set(n,r=[]),r.push(e)}}function Wf(e,t,n=pt){const{immediate:r,deep:o,once:i,scheduler:c,augmentJob:f,call:v}=n,b=S=>o?S:dn(S)||o===!1||o===0?Bn(S,1):Bn(S);let g,_,T,x,j=!1,J=!1;if(Gt(e)?(_=()=>e.value,j=dn(e)):is(e)?(_=()=>b(e),j=!0):qe(e)?(J=!0,j=e.some(S=>is(S)||dn(S)),_=()=>e.map(S=>{if(Gt(S))return S.value;if(is(S))return b(S);if(Ye(S))return v?v(S,2):S()})):Ye(e)?t?_=v?()=>v(e,2):e:_=()=>{if(T){Mn();try{T()}finally{In()}}const S=Es;Es=g;try{return v?v(e,3,[x]):e(x)}finally{Es=S}}:_=Pn,t&&o){const S=_,H=o===!0?1/0:o;_=()=>Bn(S(),H)}const oe=kf(),ue=()=>{g.stop(),oe&&oe.active&&Gi(oe.effects,g)};if(i&&t){const S=t;t=(...H)=>{try{return S(...H)}finally{ue()}}}let ce=J?new Array(e.length).fill(Eo):Eo;const q=S=>{if(!(!(g.flags&1)||!g.dirty&&!S))if(t){const H=g.run();if(S||o||j||(J?H.some((Q,G)=>An(Q,ce[G])):An(H,ce))){const Q=Es;Mn();try{T&&T(),Es=g;const G=[H,ce===Eo?void 0:J&&ce[0]===Eo?[]:ce,x];ce=H,v?v(t,3,G):t(...G)}finally{Es=Q,In()}}}else g.run()};return f&&f(q),g=new Zu(_),g.scheduler=c?()=>c(q,!1):q,x=S=>zf(S,!1,g),T=g.onStop=()=>{const S=Bo.get(g);if(S){if(v)v(S,4);else for(const H of S)H();Bo.delete(g)}},t?r?q(!0):ce=g.run():c?c(q.bind(null,!0),!0):g.run(),ue.pause=g.pause.bind(g),ue.resume=g.resume.bind(g),ue.stop=ue,ue}function Bn(e,t=1/0,n){if(t<=0||!ft(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Gt(e))Bn(e.value,t,n);else if(qe(e))for(let r=0;r{Bn(r,t,n)});else if(Wu(e)){for(const r in e)Bn(e[r],t,n);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&Bn(e[r],t,n)}return e}/** -* @vue/runtime-core v3.5.44 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/function Gr(e,t,n,r){try{return r?e(...r):e()}catch(o){ha(o,t,n)}}function pn(e,t,n,r){if(Ye(e)){const o=Gr(e,t,n,r);return o&&Hu(o)&&o.catch(i=>{ha(i,t,n)}),o}if(qe(e)){const o=[];for(let i=0;i>>1,o=Zt[r],i=Lr(o);i=Lr(n)?Zt.push(e):Zt.splice(Yf(t),0,e),e.flags|=1,hc()}}function hc(){Uo||(Uo=mc.then(bc))}function Jf(e){if(!qe(e))rs&&e.id===-1?rs.splice(Ys+1,0,e):e.flags&1||(En.push(e),e.flags|=1);else for(let t=0;t=t))continue;Zt.splice(r,1),r=e?r-1:hn,o.flags&4&&(o.flags&=-2),o(),o.flags&4||(o.flags&=-2)}}}function gc(e,t,n=0){if(En.length){let r=En,o=0;if(t){r=[];for(let c=0;cLr(c)-Lr(f));if(En.length=o,rs){for(let c=0;ce.id==null?e.flags&2?-1:1/0:e.id;function bc(e){try{for(hn=0;hn{r._d&&Go(-1);const i=qo(t),c=Ds.length;let f;try{f=e(...o)}finally{for(let v=Ds.length;v>c;v--)Gc();qo(i),r._d&&Go(1)}return f};return r._n=!0,r._c=!0,r._d=!0,r}function Me(e,t){if(cn===null)return e;const n=ka(cn),r=e.dirs||(e.dirs=[]);for(let o=0;o1)return n&&Ye(t)?t.call(r&&r.proxy):t}}const Zf=Symbol.for("v-scx"),ep=()=>Io(Zf);function yt(e,t,n){return _c(e,t,n)}function _c(e,t,n=pt){const{immediate:r,deep:o,flush:i,once:c}=n,f=Pt({},n),v=t&&r||!t&&i!=="post";let b;if(Br){if(i==="sync"){const x=ep();b=x.__watcherHandles||(x.__watcherHandles=[])}else if(!v){const x=()=>{};return x.stop=Pn,x.resume=Pn,x.pause=Pn,x}}const g=en;f.call=(x,j,J)=>pn(x,g,j,J);let _=!1;i==="post"?f.scheduler=x=>{x.i=g,Qt(x,g&&g.suspense)}:i!=="sync"&&(_=!0,f.scheduler=(x,j)=>{j?x():rl(x)}),f.augmentJob=x=>{t&&(x.flags|=4),_&&(x.flags|=2,g&&(x.id=g.uid,x.i=g))};const T=Wf(e,t,f);return Br&&(b?b.push(T):v&&T()),T}function tp(e,t,n){const r=this.proxy,o=Ct(e)?e.includes(".")?kc(r,e):()=>r[e]:e.bind(r,r);let i;Ye(t)?i=t:(i=t.handler,n=t);const c=Yr(this),f=_c(o,i.bind(r),n);return c(),f}function kc(e,t){const n=t.split(".");return()=>{let r=e;for(let o=0;oe.__isTeleport,As=e=>e&&(e.disabled||e.disabled===""),np=e=>e&&(e.defer||e.defer===""),ru=e=>typeof SVGElement<"u"&&e instanceof SVGElement,ou=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Si=(e,t)=>{const n=e&&e.to;return Ct(n)?t?t(n):null:n},sp={name:"Teleport",__isTeleport:!0,process(e,t,n,r,o,i,c,f,v,b){const{mc:g,pc:_,pbc:T,o:{insert:x,querySelector:j,createText:J,createComment:oe,parentNode:ue}}=b,ce=As(t.props);let{dynamicChildren:q}=t;const S=(G,re,M)=>{G.shapeFlag&16&&g(G.children,re,M,o,i,c,f,v)},H=(G=t)=>{const re=As(G.props),M=G.target=Si(G.props,j),E=Ei(M,G,J,x);M&&(c!=="svg"&&ru(M)?c="svg":c!=="mathml"&&ou(M)&&(c="mathml"),o&&o.isCE&&(o.ce._teleportTargets||(o.ce._teleportTargets=new Set)).add(M),re||(S(G,M,E),xr(G,!1)))},Q=G=>{const re=()=>{if(ns.get(G)===re){if(ns.delete(G),As(G.props)){const M=ue(G.el)||n;S(G,M,G.anchor),xr(G,!0)}H(G)}};ns.set(G,re),Qt(re,i)};if(e==null){const G=t.el=J(""),re=t.anchor=J("");if(x(G,n,r),x(re,n,r),np(t.props)||i&&i.pendingBranch){Q(t);return}ce&&(S(t,n,re),xr(t,!0)),H()}else{t.el=e.el;const G=t.anchor=e.anchor,re=ns.get(e);if(re){re.flags|=8,ns.delete(e),Q(t);return}t.targetStart=e.targetStart;const M=t.target=e.target,E=t.targetAnchor=e.targetAnchor,I=As(e.props),ne=I?n:M,Ie=I?G:E;if(c==="svg"||ru(M)?c="svg":(c==="mathml"||ou(M))&&(c="mathml"),q?(T(e.dynamicChildren,q,ne,o,i,c,f),ll(e,t,!0)):v||_(e,t,ne,Ie,o,i,c,f,!1),ce)I?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):To(t,n,G,b,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const Ae=Si(t.props,j);Ae&&(t.target=Ae,To(t,Ae,null,b,0))}else I&&To(t,M,E,b,1);xr(t,ce)}},remove(e,t,n,{um:r,o:{remove:o}},i){const{shapeFlag:c,children:f,anchor:v,targetStart:b,targetAnchor:g,target:_,props:T}=e,x=As(T),j=i||!x,J=ns.get(e);if(J&&(J.flags|=8,ns.delete(e)),_&&(o(b),o(g)),i&&o(v),!J&&(x||_)&&c&16)for(let oe=0;oe{e.isMounted=!0}),Oc(()=>{e.isUnmounting=!0}),e}const an=[Function,Array],$c={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:an,onEnter:an,onAfterEnter:an,onEnterCancelled:an,onBeforeLeave:an,onLeave:an,onAfterLeave:an,onLeaveCancelled:an,onBeforeAppear:an,onAppear:an,onAfterAppear:an,onAppearCancelled:an},op={name:"BaseTransition",props:$c,setup(e,{slots:t}){const n=ul(),r=Cc();return()=>{const o=t.default&&ol(t.default(),!0),i=o&&o.length?Sc(o):n.subTree?ge():void 0;if(!i)return;const c=ut(e),{mode:f}=c;if(r.isLeaving)return ci(i);const v=Ho(i);if(!v)return ci(i);let b=Rr(v,c,r,n,_=>b=_);v.type!==Wt&&cs(v,b);let g=n.subTree&&Ho(n.subTree);if(g&&g.type!==Wt&&!Ps(g,v)&&Kr(n.subTree)){let _=Rr(g,c,r,n);if(cs(g,_),f==="out-in"&&v.type!==Wt)return r.isLeaving=!0,_.afterLeave=()=>{r.isLeaving=!1,n.job.flags&8||n.update(),delete _.afterLeave,g=void 0},ci(i);f==="in-out"&&v.type!==Wt?_.delayLeave=(T,x,j)=>{const J=Ec(r,g);J[String(g.key)]=g,T[ln]=()=>{x(),T[ln]=void 0,delete b.delayedLeave,g=void 0},b.delayedLeave=()=>{j(),delete b.delayedLeave,g=void 0}}:g=void 0}else g&&(g=void 0);return i}}};function Sc(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==Wt){t=n;break}}return t}const ap=op;function Ec(e,t){const{leavingVNodes:n}=e;let r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function Rr(e,t,n,r,o){const{appear:i,mode:c,persisted:f=!1,onBeforeEnter:v,onEnter:b,onAfterEnter:g,onEnterCancelled:_,onBeforeLeave:T,onLeave:x,onAfterLeave:j,onLeaveCancelled:J,onBeforeAppear:oe,onAppear:ue,onAfterAppear:ce,onAppearCancelled:q}=t,S=String(e.key),H=Ec(n,e),Q=(M,E)=>{M&&pn(M,r,9,E)},G=(M,E)=>{const I=E[1];Q(M,E),qe(M)?M.every(ne=>ne.length<=1)&&I():M.length<=1&&I()},re={mode:c,persisted:f,beforeEnter(M){let E=v;if(!n.isMounted)if(i)E=oe||v;else return;M[ln]&&M[ln](!0);const I=H[S];if(I&&Ps(e,I)){let ne=I.el[ln];if(!ne){const Ie=Kr(I);ne=Ie&&Ie.el[ln]}ne&&ne()}Q(E,[M])},enter(M){if(H[S]===e)return;let E=b,I=g,ne=_;if(!n.isMounted)if(i)E=ue||b,I=ce||g,ne=q||_;else return;let Ie=!1;M[_r]=ye=>{Ie||(Ie=!0,ye?Q(ne,[M]):Q(I,[M]),re.delayedLeave&&re.delayedLeave(),M[_r]=void 0)};const Ae=M[_r].bind(null,!1);E?G(E,[M,Ae]):Ae()},leave(M,E){const I=String(e.key);if(M[_r]&&M[_r](!0),n.isUnmounting)return E();Q(T,[M]);let ne=!1;M[ln]=Ae=>{ne||(ne=!0,E(),Ae?Q(J,[M]):Q(j,[M]),M[ln]=void 0,H[I]===e&&delete H[I])};const Ie=M[ln].bind(null,!1);H[I]=e,x?G(x,[M,Ie]):Ie()},clone(M){const E=Rr(M,t,n,r,o);return o&&o(E),E}};return re}function ci(e){if(ga(e))return e=ds(e),e.children=null,e}function Ho(e){if(!ga(e))return ya(e.type)&&e.children?Sc(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&Ye(n.default))return n.default()}}function cs(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;const n=e.component.subTree;cs(ya(n.type)&&Ho(n)||n,t)}else if(e.shapeFlag&128)e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback);else if(e.transition=t,e.type===je&&qe(e.children)){const n=Lc(e.children,!1);n&&cs(n,t)}}function ol(e,t=!1,n){let r=[],o=0;for(let i=0;i1)for(let i=0;iAr(J,t&&(qe(t)?t[oe]:t),n,r,o));return}if(Pr(r)&&!o){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&Ar(e,t,n,r.component.subTree);return}const i=r.shapeFlag&4?ka(r.component):r.el,c=o?null:i,{i:f,r:v}=e,b=t&&t.r,g=f.refs===pt?f.refs={}:f.refs,_=f.setupState,T=ut(_),x=_===pt?qu:J=>au(g,J)?!1:dt(T,J),j=(J,oe)=>!(oe&&au(g,oe));if(b!=null&&b!==v){if(iu(t),Ct(b))g[b]=null,x(b)&&(_[b]=null);else if(Gt(b)){const J=t;j(b,J.k)&&(b.value=null),J.k&&(g[J.k]=null)}}if(Ye(v))Gr(v,f,12,[c,g]);else{const J=Ct(v),oe=Gt(v);if(J||oe){const ue=()=>{if(e.f){const ce=J?x(v)?_[v]:g[v]:j()||!e.k?v.value:g[e.k];if(o)qe(ce)&&Gi(ce,i);else if(qe(ce))ce.includes(i)||ce.push(i);else if(J)g[v]=[i],x(v)&&(_[v]=g[v]);else{const q=[i];j(v,e.k)&&(v.value=q),e.k&&(g[e.k]=q)}}else J?(g[v]=c,x(v)&&(_[v]=c)):oe&&(j(v,e.k)&&(v.value=c),e.k&&(g[e.k]=c))};if(c){const ce=()=>{ue(),zo.delete(e)};ce.id=-1,zo.set(e,ce),Qt(ce,n)}else iu(e),ue()}}}function iu(e){const t=zo.get(e);t&&(t.flags|=8,zo.delete(e))}va().requestIdleCallback;va().cancelIdleCallback;const Pr=e=>!!e.type.__asyncLoader,ga=e=>e.type.__isKeepAlive;function ip(e,t){Ac(e,"a",t)}function lp(e,t){Ac(e,"da",t)}function Ac(e,t,n=en){const r=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(ba(t,r,n),n){let o=n.parent;for(;o&&o.parent;)ga(o.parent.vnode)&&up(r,t,n,o),o=o.parent}}function up(e,t,n,r){const o=ba(t,e,r,!0);Wn(()=>{Gi(r[t],o)},n)}function ba(e,t,n=en,r=!1){if(n){const o=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...c)=>{Mn();const f=Yr(n),v=pn(t,n,e,c);return f(),In(),v});return r?o.unshift(i):o.push(i),i}}const zn=e=>(t,n=en)=>{(!Br||e==="sp")&&ba(e,(...r)=>t(...r),n)},cp=zn("bm"),vn=zn("m"),dp=zn("bu"),Pc=zn("u"),Oc=zn("bum"),Wn=zn("um"),fp=zn("sp"),pp=zn("rtg"),vp=zn("rtc");function mp(e,t=en){ba("ec",e,t)}const hp=Symbol.for("v-ndc");function et(e,t,n,r){let o;const i=n,c=qe(e);if(c||Ct(e)){const f=c&&is(e);let v=!1,b=!1;f&&(v=!dn(e),b=jn(e),e=ma(e)),o=new Array(e.length);for(let g=0,_=e.length;g<_;g++)o[g]=t(v?b?us(fn(e[g])):fn(e[g]):e[g],g,void 0,i)}else if(typeof e=="number")if(!Number.isInteger(e)||e<0)o=[];else{o=new Array(e);for(let f=0;ft(f,v,void 0,i));else{const f=Object.keys(e);o=new Array(f.length);for(let v=0,b=f.length;ve?Qc(e)?ka(e):Ti(e.parent):null,Or=Pt(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Ti(e.parent),$root:e=>Ti(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Ic(e),$forceUpdate:e=>e.f||(e.f=()=>{rl(e.update)}),$nextTick:e=>e.n||(e.n=ir.bind(e.proxy)),$watch:e=>tp.bind(e)}),di=(e,t)=>e!==pt&&!e.__isScriptSetup&&dt(e,t),yp={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:r,data:o,props:i,accessCache:c,type:f,appContext:v}=e;if(t[0]!=="$"){const T=c[t];if(T!==void 0)switch(T){case 1:return r[t];case 2:return o[t];case 4:return n[t];case 3:return i[t]}else{if(di(r,t))return c[t]=1,r[t];if(o!==pt&&dt(o,t))return c[t]=2,o[t];if(dt(i,t))return c[t]=3,i[t];if(n!==pt&&dt(n,t))return c[t]=4,n[t];Ai&&(c[t]=0)}}const b=Or[t];let g,_;if(b)return t==="$attrs"&&Ht(e.attrs,"get",""),b(e);if((g=f.__cssModules)&&(g=g[t]))return g;if(n!==pt&&dt(n,t))return c[t]=4,n[t];if(_=v.config.globalProperties,dt(_,t))return _[t]},set({_:e},t,n){const{data:r,setupState:o,ctx:i}=e;return di(o,t)?(o[t]=n,!0):r!==pt&&dt(r,t)?(r[t]=n,!0):dt(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:o,props:i,type:c}},f){let v;return!!(n[f]||e!==pt&&f[0]!=="$"&&dt(e,f)||di(t,f)||dt(i,f)||dt(r,f)||dt(Or,f)||dt(o.config.globalProperties,f)||(v=c.__cssModules)&&v[f])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:dt(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function lu(e){return qe(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let Ai=!0;function gp(e){const t=Ic(e),n=e.proxy,r=e.ctx;Ai=!1,t.beforeCreate&&uu(t.beforeCreate,e,"bc");const{data:o,computed:i,methods:c,watch:f,provide:v,inject:b,created:g,beforeMount:_,mounted:T,beforeUpdate:x,updated:j,activated:J,deactivated:oe,beforeDestroy:ue,beforeUnmount:ce,destroyed:q,unmounted:S,render:H,renderTracked:Q,renderTriggered:G,errorCaptured:re,serverPrefetch:M,expose:E,inheritAttrs:I,components:ne,directives:Ie,filters:Ae}=t;if(b&&bp(b,r,null),c)for(const Ue in c){const de=c[Ue];Ye(de)&&(r[Ue]=de.bind(n))}if(o){const Ue=o.call(n,n);ft(Ue)&&(e.data=tl(Ue))}if(Ai=!0,i)for(const Ue in i){const de=i[Ue],ke=Ye(de)?de.bind(n,n):Ye(de.get)?de.get.bind(n,n):Pn,Ee=!Ye(de)&&Ye(de.set)?de.set.bind(n):Pn,Le=rt({get:ke,set:Ee});Object.defineProperty(r,Ue,{enumerable:!0,configurable:!0,get:()=>Le.value,set:$e=>Le.value=$e})}if(f)for(const Ue in f)Mc(f[Ue],r,n,Ue);if(v){const Ue=Ye(v)?v.call(n):v;Reflect.ownKeys(Ue).forEach(de=>{Qf(de,Ue[de])})}g&&uu(g,e,"c");function Pe(Ue,de){qe(de)?de.forEach(ke=>Ue(ke.bind(n))):de&&Ue(de.bind(n))}if(Pe(cp,_),Pe(vn,T),Pe(dp,x),Pe(Pc,j),Pe(ip,J),Pe(lp,oe),Pe(mp,re),Pe(vp,Q),Pe(pp,G),Pe(Oc,ce),Pe(Wn,S),Pe(fp,M),qe(E))if(E.length){const Ue=e.exposed||(e.exposed={});E.forEach(de=>{Object.defineProperty(Ue,de,{get:()=>n[de],set:ke=>n[de]=ke,enumerable:!0})})}else e.exposed||(e.exposed={});H&&e.render===Pn&&(e.render=H),I!=null&&(e.inheritAttrs=I),ne&&(e.components=ne),Ie&&(e.directives=Ie),M&&Tc(e)}function bp(e,t,n=Pn){qe(e)&&(e=Pi(e));for(const r in e){const o=e[r];let i;ft(o)?"default"in o?i=Io(o.from||r,o.default,!0):i=Io(o.from||r):i=Io(o),Gt(i)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>i.value,set:c=>i.value=c}):t[r]=i}}function uu(e,t,n){pn(qe(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,n)}function Mc(e,t,n,r){let o=r.includes(".")?kc(n,r):()=>n[r];if(Ct(e)){const i=t[e];Ye(i)&&yt(o,i)}else if(Ye(e))yt(o,e.bind(n));else if(ft(e))if(qe(e))e.forEach(i=>Mc(i,t,n,r));else{const i=Ye(e.handler)?e.handler.bind(n):t[e.handler];Ye(i)&&yt(o,i,e)}}function Ic(e){const t=e.type,{mixins:n,extends:r}=t,{mixins:o,optionsCache:i,config:{optionMergeStrategies:c}}=e.appContext,f=i.get(t);let v;return f?v=f:!o.length&&!n&&!r?v=t:(v={},o.length&&o.forEach(b=>Wo(v,b,c,!0)),Wo(v,t,c)),ft(t)&&i.set(t,v),v}function Wo(e,t,n,r=!1){const{mixins:o,extends:i}=t;i&&Wo(e,i,n,!0),o&&o.forEach(c=>Wo(e,c,n,!0));for(const c in t)if(!(r&&c==="expose")){const f=wp[c]||n&&n[c];e[c]=f?f(e[c],t[c]):t[c]}return e}const wp={data:cu,props:du,emits:du,methods:Cr,computed:Cr,beforeCreate:Xt,created:Xt,beforeMount:Xt,mounted:Xt,beforeUpdate:Xt,updated:Xt,beforeDestroy:Xt,beforeUnmount:Xt,destroyed:Xt,unmounted:Xt,activated:Xt,deactivated:Xt,errorCaptured:Xt,serverPrefetch:Xt,components:Cr,directives:Cr,watch:kp,provide:cu,inject:_p};function cu(e,t){return t?e?function(){return Pt(Ye(e)?e.call(this,this):e,Ye(t)?t.call(this,this):t)}:t:e}function _p(e,t){return Cr(Pi(e),Pi(t))}function Pi(e){if(qe(e)){const t={};for(let n=0;nt==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${yn(t)}Modifiers`]||e[`${vs(t)}Modifiers`];function Sp(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||pt;let o=n;const i=t.startsWith("update:"),c=i&&$p(r,t.slice(7));c&&(c.trim&&(o=n.map(g=>Ct(g)?g.trim():g)),c.number&&(o=o.map(pa)));let f,v=r[f=ri(t)]||r[f=ri(yn(t))];!v&&i&&(v=r[f=ri(vs(t))]),v&&pn(v,e,6,o);const b=r[f+"Once"];if(b){if(!e.emitted)e.emitted={};else if(e.emitted[f])return;e.emitted[f]=!0,pn(b,e,6,o)}}const Ep=new WeakMap;function Dc(e,t,n=!1){const r=n?Ep:t.emitsCache,o=r.get(e);if(o!==void 0)return o;const i=e.emits;let c={},f=!1;if(!Ye(e)){const v=b=>{const g=Dc(b,t,!0);g&&(f=!0,Pt(c,g))};!n&&t.mixins.length&&t.mixins.forEach(v),e.extends&&v(e.extends),e.mixins&&e.mixins.forEach(v)}return!i&&!f?(ft(e)&&r.set(e,null),null):(qe(i)?i.forEach(v=>c[v]=null):Pt(c,i),ft(e)&&r.set(e,c),c)}function wa(e,t){return!e||!ca(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),dt(e,t[0].toLowerCase()+t.slice(1))||dt(e,vs(t))||dt(e,t))}function fu(e){const{type:t,vnode:n,proxy:r,withProxy:o,propsOptions:[i],slots:c,attrs:f,emit:v,render:b,renderCache:g,props:_,data:T,setupState:x,ctx:j,inheritAttrs:J}=e,oe=qo(e);let ue,ce;try{if(n.shapeFlag&4){const S=o||r,H=S;ue=Tn(b.call(H,S,g,_,x,T,j)),ce=f}else{const S=t;ue=Tn(S.length>1?S(_,{attrs:f,slots:c,emit:v}):S(_,null)),ce=t.props?f:Tp(f)}}catch(S){Ds.length=0,ha(S,e,1),ue=Ce(Wt)}let q=ue;if(ce&&J!==!1){const S=Object.keys(ce),{shapeFlag:H}=q;S.length&&H&7&&(i&&S.some(da)&&(ce=Ap(ce,i)),q=ds(q,ce,!1,!0))}if(n.dirs&&(q=ds(q,null,!1,!0),q.dirs=q.dirs?q.dirs.concat(n.dirs):n.dirs),n.transition){const S=ya(q.type)&&Ho(q)||q;cs(S,n.transition)}return ue=q,qo(oe),ue}function Lc(e,t=!0){let n;for(let r=0;r{let t;for(const n in e)(n==="class"||n==="style"||ca(n))&&((t||(t={}))[n]=e[n]);return t},Ap=(e,t)=>{const n={};for(const r in e)(!da(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function Pp(e,t,n){const{props:r,children:o,component:i}=e,{props:c,children:f,patchFlag:v}=t,b=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&v>=0){if(v&1024)return!0;if(v&16)return r?pu(r,c,b):!!c;if(v&8){const g=t.dynamicProps;for(let _=0;_Object.create(Kc),Fc=e=>Object.getPrototypeOf(e)===Kc;function Mp(e,t,n,r=!1){const o={},i=Nc();e.propsDefaults=Object.create(null),Vc(e,t,o,i);for(const c in e.propsOptions[0])c in o||(o[c]=void 0);n?e.props=r?o:Nf(o):e.type.props?e.props=o:e.props=i,e.attrs=i}function Ip(e,t,n,r){const{props:o,attrs:i,vnode:{patchFlag:c}}=e,f=ut(o),[v]=e.propsOptions;let b=!1;if((r||c>0)&&!(c&16)){if(c&8){const g=e.vnode.dynamicProps;for(let _=0;_{v=!0;const[T,x]=Bc(_,t,!0);Pt(c,T),x&&f.push(...x)};!n&&t.mixins.length&&t.mixins.forEach(g),e.extends&&g(e.extends),e.mixins&&e.mixins.forEach(g)}if(!i&&!v)return ft(e)&&r.set(e,Ms),Ms;if(qe(i))for(let g=0;ge==="_"||e==="_ctx"||e==="$stable",il=e=>qe(e)?e.map(Tn):[Tn(e)],Dp=(e,t,n)=>{if(t._n)return t;const r=ms((...o)=>il(t(...o)),n);return r._c=!1,r},Uc=(e,t,n)=>{const r=e._ctx;for(const o in e){if(al(o))continue;const i=e[o];if(Ye(i))t[o]=Dp(o,i,r);else if(i!=null){const c=il(i);t[o]=()=>c}}},qc=(e,t)=>{const n=il(t);e.slots.default=()=>n},Hc=(e,t,n)=>{for(const r in t)(n||!al(r))&&(e[r]=t[r])},Lp=(e,t,n)=>{const r=e.slots=Nc();if(e.vnode.shapeFlag&32){const o=t._;o?(Hc(r,t,n),n&&Yu(r,"_",o,!0)):Uc(t,r)}else t&&qc(e,t)},Rp=(e,t,n)=>{const{vnode:r,slots:o}=e;let i=!0,c=pt;if(r.shapeFlag&32){const f=t._;f?n&&f===1?i=!1:Hc(o,t,n):(i=!t.$stable,Uc(t,o)),c=t}else t&&(qc(e,t),c={default:1});if(i)for(const f in o)!al(f)&&c[f]==null&&delete o[f]},Qt=Bp;function Kp(e){return Np(e)}function Np(e,t){const n=va();n.__VUE__=!0;const{insert:r,remove:o,patchProp:i,createElement:c,createText:f,createComment:v,setText:b,setElementText:g,parentNode:_,nextSibling:T,setScopeId:x=Pn,insertStaticContent:j}=e,J=(h,y,C,R=null,F=null,le=null,ee=void 0,P=null,Z=!!y.dynamicChildren)=>{if(h===y)return;h&&!Ps(h,y)&&(R=bt(h),$e(h,F,le,!0),h=null),y.patchFlag===-2&&(Z=!1,y.dynamicChildren=null),y.dynamicChildren&&h&&h.dynamicChildren&&h.dynamicChildren.hasOnce&&(y.dynamicChildren===Ms&&(y.dynamicChildren=[]),y.dynamicChildren.hasOnce=!0);const{type:te,ref:Se,shapeFlag:we}=y;switch(te){case _a:oe(h,y,C,R);break;case Wt:ue(h,y,C,R);break;case jo:h==null&&ce(y,C,R,ee);break;case je:ne(h,y,C,R,F,le,ee,P,Z);break;default:we&1?H(h,y,C,R,F,le,ee,P,Z):we&6?Ie(h,y,C,R,F,le,ee,P,Z):(we&64||we&128)&&te.process(h,y,C,R,F,le,ee,P,Z,It)}Se!=null&&F?Ar(Se,h&&h.ref,le,y||h,!y):Se==null&&h&&h.ref!=null&&Ar(h.ref,null,le,h,!0)},oe=(h,y,C,R)=>{if(h==null)r(y.el=f(y.children),C,R);else{const F=y.el=h.el;y.children!==h.children&&b(F,y.children)}},ue=(h,y,C,R)=>{h==null?r(y.el=v(y.children||""),C,R):y.el=h.el},ce=(h,y,C,R)=>{[h.el,h.anchor]=j(h.children,y,C,R,h.el,h.anchor)},q=({el:h,anchor:y},C,R)=>{let F;for(;h&&h!==y;)F=T(h),r(h,C,R),h=F;r(y,C,R)},S=({el:h,anchor:y})=>{let C;for(;h&&h!==y;)C=T(h),o(h),h=C;o(y)},H=(h,y,C,R,F,le,ee,P,Z)=>{if(y.type==="svg"?ee="svg":y.type==="math"&&(ee="mathml"),h==null)Q(y,C,R,F,le,ee,P,Z);else{const te=h.el&&h.el._isVueCE?h.el:null;try{te&&te._beginPatch(),M(h,y,F,le,ee,P,Z)}finally{te&&te._endPatch()}}},Q=(h,y,C,R,F,le,ee,P)=>{let Z,te;const{props:Se,shapeFlag:we,transition:Re,dirs:Te}=h;if(Z=h.el=c(h.type,le,Se&&Se.is,Se),we&8?g(Z,h.children):we&16&&re(h.children,Z,null,R,F,fi(h,le),ee,P),Te&&Cs(h,null,R,"created"),G(Z,h,h.scopeId,ee,R),Se){for(const Qe in Se)Qe!=="value"&&!Sr(Qe)&&i(Z,Qe,null,Se[Qe],le,R);"value"in Se&&i(Z,"value",null,Se.value,le),(te=Se.onVnodeBeforeMount)&&xn(te,R,h)}Te&&Cs(h,null,R,"beforeMount");const Xe=Fp(F,Re);Xe&&Re.beforeEnter(Z),r(Z,y,C),((te=Se&&Se.onVnodeMounted)||Xe||Te)&&Qt(()=>{try{te&&xn(te,R,h),Xe&&Re.enter(Z),Te&&Cs(h,null,R,"mounted")}finally{}},F)},G=(h,y,C,R,F)=>{if(C&&x(h,C),R)for(let le=0;le{for(let te=Z;te{const P=y.el=h.el;let{patchFlag:Z,dynamicChildren:te,dirs:Se}=y;Z|=h.patchFlag&16;const we=h.props||pt,Re=y.props||pt;let Te;if(C&&$s(C,!1),(Te=Re.onVnodeBeforeUpdate)&&xn(Te,C,y,h),Se&&Cs(y,h,C,"beforeUpdate"),C&&$s(C,!0),te&&(!h.dynamicChildren||h.dynamicChildren.length!==te.length)&&(Z=0,ee=!1,te=null),(we.innerHTML&&Re.innerHTML==null||we.textContent&&Re.textContent==null)&&g(P,""),te?E(h.dynamicChildren,te,P,C,R,fi(y,F),le):ee||de(h,y,P,null,C,R,fi(y,F),le,!1),Z>0){if(Z&16)I(P,we,Re,C,F);else if(Z&2&&we.class!==Re.class&&i(P,"class",null,Re.class,F),Z&4&&i(P,"style",we.style,Re.style,F),Z&8){const Xe=y.dynamicProps;for(let Qe=0;Qe{Te&&xn(Te,C,y,h),Se&&Cs(y,h,C,"updated")},R)},E=(h,y,C,R,F,le,ee)=>{for(let P=0;P{if(y!==C){if(y!==pt)for(const le in y)!Sr(le)&&!(le in C)&&i(h,le,y[le],null,F,R);for(const le in C){if(Sr(le))continue;const ee=C[le],P=y[le];ee!==P&&le!=="value"&&i(h,le,P,ee,F,R)}"value"in C&&i(h,"value",y.value,C.value,F)}},ne=(h,y,C,R,F,le,ee,P,Z)=>{const te=y.el=h?h.el:f(""),Se=y.anchor=h?h.anchor:f("");let{patchFlag:we,dynamicChildren:Re,slotScopeIds:Te}=y;Te&&(P=P?P.concat(Te):Te),h==null?(r(te,C,R),r(Se,C,R),re(y.children||[],C,Se,F,le,ee,P,Z)):we>0&&we&64&&Re&&h.dynamicChildren&&h.dynamicChildren.length===Re.length?(E(h.dynamicChildren,Re,C,F,le,ee,P),(y.key!=null||F&&y===F.subTree)&&ll(h,y,!0)):de(h,y,C,Se,F,le,ee,P,Z)},Ie=(h,y,C,R,F,le,ee,P,Z)=>{y.slotScopeIds=P,h==null?y.shapeFlag&512?F.ctx.activate(y,C,R,ee,Z):Ae(y,C,R,F,le,ee,Z):ye(h,y,Z)},Ae=(h,y,C,R,F,le,ee)=>{const P=h.component=Yp(h,R,F);if(ga(h)&&(P.ctx.renderer=It),Jp(P,!1,ee),P.asyncDep){if(F&&F.registerDep(P,Pe,ee,le),!h.el){const Z=P.subTree=Ce(Wt);ue(null,Z,y,C),h.placeholder=Z.el}}else Pe(P,h,y,C,F,le,ee)},ye=(h,y,C)=>{const R=y.component=h.component;if(Pp(h,y,C))if(R.asyncDep&&!R.asyncResolved){y.el=h.el,y.placeholder=h.placeholder,Ue(R,y,C);return}else R.next=y,R.update();else y.el=h.el,y.placeholder=h.placeholder,R.vnode=y},Pe=(h,y,C,R,F,le,ee)=>{const P=()=>{if(h.isMounted){let{next:we,bu:Re,u:Te,parent:Xe,vnode:Qe}=h;{const Yt=zc(h);if(Yt){we&&(we.el=Qe.el,Ue(h,we,ee)),Yt.asyncDep.then(()=>{Qt(()=>{h.isUnmounted||te()},F)});return}}let tt=we,_t;$s(h,!1),we?(we.el=Qe.el,Ue(h,we,ee)):we=Qe,Re&&Mo(Re),(_t=we.props&&we.props.onVnodeBeforeUpdate)&&xn(_t,Xe,we,Qe),$s(h,!0);const $t=fu(h),tn=h.subTree;h.subTree=$t,J(tn,$t,_(tn.el),bt(tn),h,F,le),we.el=$t.el,tt===null&&Op(h,$t.el),Te&&Qt(Te,F),(_t=we.props&&we.props.onVnodeUpdated)&&Qt(()=>xn(_t,Xe,we,Qe),F)}else{let we;const{el:Re,props:Te}=y,{bm:Xe,m:Qe,parent:tt,root:_t,type:$t}=h,tn=Pr(y);$s(h,!1),Xe&&Mo(Xe),!tn&&(we=Te&&Te.onVnodeBeforeMount)&&xn(we,tt,y),$s(h,!0);{_t.ce&&_t.ce._hasShadowRoot()&&_t.ce._injectChildStyle($t,h.parent?h.parent.type:void 0);const Yt=h.subTree=fu(h);J(null,Yt,C,R,h,F,le),y.el=Yt.el}if(Qe&&Qt(Qe,F),!tn&&(we=Te&&Te.onVnodeMounted)){const Yt=y;Qt(()=>xn(we,tt,Yt),F)}(y.shapeFlag&256||tt&&Pr(tt.vnode)&&tt.vnode.shapeFlag&256)&&h.a&&Qt(h.a,F),h.isMounted=!0,y=C=R=null}};h.scope.on();const Z=h.effect=new Zu(P);h.scope.off();const te=h.update=Z.run.bind(Z),Se=h.job=Z.runIfDirty.bind(Z);Se.i=h,Se.id=h.uid,Z.scheduler=()=>rl(Se),$s(h,!0),te()},Ue=(h,y,C)=>{y.component=h;const R=h.vnode.props;h.vnode=y,h.next=null,Ip(h,y.props,R,C),Rp(h,y.children,C),Mn(),yc(h),In()},de=(h,y,C,R,F,le,ee,P,Z=!1)=>{const te=h&&h.children,Se=h?h.shapeFlag:0,we=y.children,{patchFlag:Re,shapeFlag:Te}=y;if(Re>0){if(Re&128){Ee(te,we,C,R,F,le,ee,P,Z);return}else if(Re&256){ke(te,we,C,R,F,le,ee,P,Z);return}}Te&8?(Se&16&>(te,F,le),we!==te&&g(C,we)):Se&16?Te&16?Ee(te,we,C,R,F,le,ee,P,Z):gt(te,F,le,!0):(Se&8&&g(C,""),Te&16&&re(we,C,R,F,le,ee,P,Z))},ke=(h,y,C,R,F,le,ee,P,Z)=>{h=h||Ms,y=y||Ms;const te=h.length,Se=y.length,we=Math.min(te,Se);let Re;for(Re=0;ReSe?gt(h,F,le,!0,!1,we):re(y,C,R,F,le,ee,P,Z,we)},Ee=(h,y,C,R,F,le,ee,P,Z)=>{let te=0;const Se=y.length;let we=h.length-1,Re=Se-1;for(;te<=we&&te<=Re;){const Te=h[te],Xe=y[te]=Z?Fn(y[te]):Tn(y[te]);if(Ps(Te,Xe))J(Te,Xe,C,null,F,le,ee,P,Z);else break;te++}for(;te<=we&&te<=Re;){const Te=h[we],Xe=y[Re]=Z?Fn(y[Re]):Tn(y[Re]);if(Ps(Te,Xe))J(Te,Xe,C,null,F,le,ee,P,Z);else break;we--,Re--}if(te>we){if(te<=Re){const Te=Re+1,Xe=TeRe)for(;te<=we;)$e(h[te],F,le,!0),te++;else{const Te=te,Xe=te,Qe=new Map;for(te=Xe;te<=Re;te++){const Kt=y[te]=Z?Fn(y[te]):Tn(y[te]);Kt.key!=null&&Qe.set(Kt.key,te)}let tt,_t=0;const $t=Re-Xe+1;let tn=!1,Yt=0;const nn=new Array($t);for(te=0;te<$t;te++)nn[te]=0;for(te=Te;te<=we;te++){const Kt=h[te];if(_t>=$t){$e(Kt,F,le,!0);continue}let Ot;if(Kt.key!=null)Ot=Qe.get(Kt.key);else for(tt=Xe;tt<=Re;tt++)if(nn[tt-Xe]===0&&Ps(Kt,y[tt])){Ot=tt;break}Ot===void 0?$e(Kt,F,le,!0):(nn[Ot-Xe]=te+1,Ot>=Yt?Yt=Ot:tn=!0,J(Kt,y[Ot],C,null,F,le,ee,P,Z),_t++)}const hs=tn?Vp(nn):Ms;for(tt=hs.length-1,te=$t-1;te>=0;te--){const Kt=Xe+te,Ot=y[Kt],Be=y[Kt+1],Gn=Kt+1{const{el:le,type:ee,transition:P,children:Z,shapeFlag:te}=h;if(te&6){Le(h.component.subTree,y,C,R);return}if(te&128){h.suspense.move(y,C,R);return}if(te&64){ee.move(h,y,C,It);return}if(ee===je){r(le,y,C);for(let we=0;weP.enter(le),F));else{const{leave:we,delayLeave:Re,afterLeave:Te}=P,Xe=()=>{h.ctx.isUnmounted?o(le):r(le,y,C)},Qe=()=>{const tt=le._isLeaving||!!le[ln];le._isLeaving&&le[ln](!0),P.persisted&&!tt?Xe():we(le,()=>{Xe(),Te&&Te()})};Re?Re(le,Xe,Qe):Qe()}else r(le,y,C)},$e=(h,y,C,R=!1,F=!1)=>{const{type:le,props:ee,ref:P,children:Z,dynamicChildren:te,shapeFlag:Se,patchFlag:we,dirs:Re,cacheIndex:Te,memo:Xe}=h;if((we===-2||te&&te.hasOnce)&&(F=!1),P!=null&&(Mn(),Ar(P,null,C,h,!0),In()),Te!=null&&(!h.ctx||h.ctx===y)&&(y.renderCache[Te]=void 0),Se&256){y.ctx.deactivate(h);return}const Qe=Se&1&&Re,tt=!Pr(h);let _t;if(tt&&(_t=ee&&ee.onVnodeBeforeUnmount)&&xn(_t,y,h),Se&6)ct(h.component,C,R);else{if(Se&128){h.suspense.unmount(C,R);return}Qe&&Cs(h,null,y,"beforeUnmount"),Se&64?h.type.remove(h,y,C,It,R):te&&!te.hasOnce&&(le!==je||we>0&&we&64)?gt(te,y,C,!1,!0):(le===je&&we&384||!F&&Se&16)&>(Z,y,C),R&&pe(h)}const $t=Xe!=null&&Te==null;(tt&&(_t=ee&&ee.onVnodeUnmounted)||Qe||$t)&&Qt(()=>{_t&&xn(_t,y,h),Qe&&Cs(h,null,y,"unmounted"),$t&&(h.el=null)},C)},pe=h=>{const{type:y,el:C,anchor:R,transition:F}=h,le=y===je;if(le&&!F){De(C,R);return}if(y===jo){S(h),F&&!F.persisted&&F.afterLeave&&F.afterLeave();return}const ee=le?Kr(h):h,P=()=>{le?_(C)&&De(C,R):o(C),F&&!F.persisted&&F.afterLeave&&F.afterLeave()};if(ee&&ee.shapeFlag&1&&F&&!F.persisted){const{leave:Z,delayLeave:te}=F,Se=ee.el,we=()=>Z(Se,P);te?te(Se,P,we):we()}else P()},De=(h,y)=>{let C;for(;h!==y;)C=T(h),o(h),h=C;o(y)},ct=(h,y,C)=>{const{bum:R,scope:F,job:le,subTree:ee,um:P,m:Z,a:te}=h;mu(Z),mu(te),R&&Mo(R),F.stop(),le?(le.flags|=8,$e(ee,h,y,C)):h.vnode.el&&ee&&(ee.transition=h.vnode.transition,$e(ee,h,y,C)),P&&Qt(P,y),Qt(()=>{h.isUnmounted=!0},y)},gt=(h,y,C,R=!1,F=!1,le=0)=>{for(let ee=le;ee{if(h.shapeFlag&6)return bt(h.component.subTree);if(h.shapeFlag&128)return h.suspense.next();const y=T(h.anchor||h.el),C=y&&y[xc];return C?T(C):y},wt=(h,y,C)=>{const R=h&&y._vnode?void 0:h&&h.component?h.component.uid:Gp();Xf(()=>{h==null?y._vnode&&$e(y._vnode,null,null,!0):J(y._vnode||null,h,y,null,null,null,C),y._vnode=h},R)},It={p:J,um:$e,m:Le,r:pe,mt:Ae,mc:re,pc:de,pbc:E,n:bt,o:e};return{render:wt,hydrate:void 0,createApp:Cp(wt)}}function fi({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function $s({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Fp(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function ll(e,t,n=!1){const r=e.children,o=t.children;if(qe(r)&&qe(o))for(let i=0;i>1,e[n[f]]0&&(t[r]=n[i-1]),n[i]=r)}}for(i=n.length,c=n[i-1];i-- >0;)n[i]=c,c=t[c];return n}function zc(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:zc(t)}function mu(e){if(e)for(let t=0;te.__isSuspense;function Bp(e,t){t&&t.pendingBranch?qe(e)?t.effects.push(...e):t.effects.push(e):Jf(e)}const je=Symbol.for("v-fgt"),_a=Symbol.for("v-txt"),Wt=Symbol.for("v-cmt"),jo=Symbol.for("v-stc"),Ds=[];let on=null;function $(e=!1){Ds.push(on=e?null:[])}function Gc(){Ds.pop(),on=Ds[Ds.length-1]||null}let Nr=1;function Go(e,t=!1){Nr+=e,e<0&&on&&t&&(on.hasOnce=!0)}function Yc(e){return e.dynamicChildren=Nr>0?on||Ms:null,Gc(),Nr>0&&on&&on.push(e),e}function A(e,t,n,r,o,i){return Yc(l(e,t,n,r,o,i,!0))}function St(e,t,n,r,o){return Yc(Ce(e,t,n,r,o,!0))}function Fr(e){return e?e.__v_isVNode===!0:!1}function Ps(e,t){return e.type===t.type&&e.key===t.key}const Jc=({key:e})=>e??null,Do=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Ct(e)||Gt(e)||Ye(e)?{i:cn,r:e,k:t,f:!!n}:e:null);function l(e,t=null,n=null,r=0,o=null,i=e===je?0:1,c=!1,f=!1){const v={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Jc(t),ref:t&&Do(t),scopeId:wc,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:r,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:cn};return f?(Yo(v,n),i&128&&e.normalize(v)):n&&(v.shapeFlag|=Ct(n)?8:16),Nr>0&&!c&&on&&(v.patchFlag>0||i&6)&&v.patchFlag!==32&&on.push(v),v}const Ce=Up;function Up(e,t=null,n=null,r=0,o=null,i=!1){if((!e||e===hp)&&(e=Wt),Fr(e)){const f=ds(e,t,!0);return n&&Yo(f,n),Nr>0&&!i&&on&&(f.shapeFlag&6?on[on.indexOf(e)]=f:on.push(f)),f.patchFlag=-2,f}if(ev(e)&&(e=e.__vccOpts),t){t=qp(t);let{class:f,style:v}=t;f&&!Ct(f)&&(t.class=Ze(f)),ft(v)&&(sl(v)&&!qe(v)&&(v=Pt({},v)),t.style=Un(v))}const c=Ct(e)?1:Wc(e)?128:ya(e)?64:ft(e)?4:Ye(e)?2:0;return l(e,t,n,r,o,c,i,!0)}function qp(e){return e?sl(e)||Fc(e)?Pt({},e):e:null}function ds(e,t,n=!1,r=!1){const{props:o,ref:i,patchFlag:c,children:f,transition:v}=e,b=t?zp(o||{},t):o,g={__v_isVNode:!0,__v_skip:!0,type:e.type,props:b,key:b&&Jc(b),ref:t&&t.ref?n&&i?qe(i)?i.concat(Do(t)):[i,Do(t)]:Do(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:f,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==je?c===-1?16:c|16:c,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:v,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&ds(e.ssContent),ssFallback:e.ssFallback&&ds(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce,cacheIndex:e.cacheIndex};return v&&r&&cs(g,v.clone(g)),g}function vt(e=" ",t=0){return Ce(_a,null,e,t)}function Hp(e,t){const n=Ce(jo,null,e);return n.staticCount=t,n}function ge(e="",t=!1){return t?($(),St(Wt,null,e)):Ce(Wt,null,e)}function Tn(e){return e==null||typeof e=="boolean"?Ce(Wt):qe(e)?Ce(je,null,e.slice()):Fr(e)?Fn(e):Ce(_a,null,String(e))}function Fn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:ds(e)}function Yo(e,t){let n=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(qe(t))n=16;else if(typeof t=="object")if(r&65){const o=t.default;o&&(o._c&&(o._d=!1),Yo(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!Fc(t)?t._ctx=cn:o===3&&cn&&(cn.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(Ye(t)){if(r&65){Yo(e,{default:t});return}t={default:t,_ctx:cn},n=32}else t=String(t),r&64?(n=16,t=[vt(t)]):n=8;e.children=t,e.shapeFlag|=n}function zp(...e){const t={};for(let n=0;nen||cn;let Jo,Vr;{const e=va(),t=(n,r)=>{let o;return(o=e[n])||(o=e[n]=[]),o.push(r),i=>{o.length>1?o.forEach(c=>c(i)):o[0](i)}};Jo=t("__VUE_INSTANCE_SETTERS__",n=>en=n),Vr=t("__VUE_SSR_SETTERS__",n=>Br=n)}const Yr=e=>{const t=en;return Jo(e),e.scope.on(),()=>{e.scope.off(),Jo(t)}},hu=()=>{en&&en.scope.off(),Jo(null)};function Qc(e){return e.vnode.shapeFlag&4}let Br=!1;function Jp(e,t=!1,n=!1){t&&Vr(t);const{props:r,children:o}=e.vnode,i=Qc(e);Mp(e,r,i,t),Lp(e,o,n||t);const c=i?Xp(e,t):void 0;return t&&Vr(!1),c}function Xp(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,yp);const{setup:r}=n;if(r){Mn();const o=e.setupContext=r.length>1?Zp(e):null,i=Yr(e),c=Gr(r,e,0,[e.props,o]),f=Hu(c);if(In(),i(),(f||e.sp)&&!Pr(e)&&Tc(e),f){if(c.then(hu,hu),t)return c.then(v=>{Vr(!0);try{yu(e,v,t)}finally{Vr(!1)}}).catch(v=>{ha(v,e,0)});e.asyncDep=c}else yu(e,c)}else Zc(e)}function yu(e,t,n){Ye(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ft(t)&&(e.setupState=vc(t)),Zc(e)}function Zc(e,t,n){const r=e.type;e.render||(e.render=r.render||Pn);{const o=Yr(e);Mn();try{gp(e)}finally{In(),o()}}}const Qp={get(e,t){return Ht(e,"get",""),e[t]}};function Zp(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Qp),slots:e.slots,emit:e.emit,expose:t}}function ka(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(vc(Ff(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Or)return Or[n](e)},has(t,n){return n in t||n in Or}})):e.proxy}function ev(e){return Ye(e)&&"__vccOpts"in e}const rt=(e,t)=>Hf(e,t,Br);function tv(e,t,n){try{Go(-1);const r=arguments.length;return r===2?ft(t)&&!qe(t)?Fr(t)?Ce(e,null,[t]):Ce(e,t):Ce(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&Fr(n)&&(n=[n]),Ce(e,t,n))}finally{Go(1)}}const nv="3.5.44";/** -* @vue/runtime-dom v3.5.44 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/let Ii;const gu=typeof window<"u"&&window.trustedTypes;if(gu)try{Ii=gu.createPolicy("vue",{createHTML:e=>e})}catch{}const ed=Ii?e=>Ii.createHTML(e):e=>e,sv="http://www.w3.org/2000/svg",rv="http://www.w3.org/1998/Math/MathML",Nn=typeof document<"u"?document:null,bu=Nn&&Nn.createElement("template"),ov={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{const o=t==="svg"?Nn.createElementNS(sv,e):t==="mathml"?Nn.createElementNS(rv,e):n?Nn.createElement(e,{is:n}):Nn.createElement(e);return e==="select"&&r&&r.multiple!=null&&o.setAttribute("multiple",r.multiple),o},createText:e=>Nn.createTextNode(e),createComment:e=>Nn.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Nn.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,o,i){const c=n?n.previousSibling:t.lastChild;if(o&&(o===i||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),!(o===i||!(o=o.nextSibling)););else{bu.innerHTML=ed(r==="svg"?`${e}`:r==="mathml"?`${e}`:e);const f=bu.content;if(r==="svg"||r==="mathml"){const v=f.firstChild;for(;v.firstChild;)f.appendChild(v.firstChild);f.removeChild(v)}t.insertBefore(f,n)}return[c?c.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},ts="transition",kr="animation",nr=Symbol("_vtc"),td={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},nd=Pt({},$c,td),av=e=>(e.displayName="Transition",e.props=nd,e),lr=av((e,{slots:t})=>tv(ap,sd(e),t)),Ss=(e,t=[])=>{qe(e)?e.forEach(n=>n(...t)):e&&e(...t)},wu=e=>e?qe(e)?e.some(t=>t.length>1):e.length>1:!1;function sd(e){const t={};for(const ne in e)ne in td||(t[ne]=e[ne]);if(e.css===!1)return t;const{name:n="v",type:r,duration:o,enterFromClass:i=`${n}-enter-from`,enterActiveClass:c=`${n}-enter-active`,enterToClass:f=`${n}-enter-to`,appearFromClass:v=i,appearActiveClass:b=c,appearToClass:g=f,leaveFromClass:_=`${n}-leave-from`,leaveActiveClass:T=`${n}-leave-active`,leaveToClass:x=`${n}-leave-to`}=e,j=iv(o),J=j&&j[0],oe=j&&j[1],{onBeforeEnter:ue,onEnter:ce,onEnterCancelled:q,onLeave:S,onLeaveCancelled:H,onBeforeAppear:Q=ue,onAppear:G=ce,onAppearCancelled:re=q}=t,M=(ne,Ie,Ae,ye)=>{ne._enterCancelled=ye,ss(ne,Ie?g:f),ss(ne,Ie?b:c),Ae&&Ae()},E=(ne,Ie)=>{ne._isLeaving=!1,ss(ne,_),ss(ne,x),ss(ne,T),Ie&&Ie()},I=ne=>(Ie,Ae)=>{const ye=ne?G:ce,Pe=()=>M(Ie,ne,Ae);Ss(ye,[Ie,Pe]),_u(()=>{ss(Ie,ne?v:i),Cn(Ie,ne?g:f),wu(ye)||ku(Ie,r,J,Pe)})};return Pt(t,{onBeforeEnter(ne){Ss(ue,[ne]),Cn(ne,i),Cn(ne,c)},onBeforeAppear(ne){Ss(Q,[ne]),Cn(ne,v),Cn(ne,b)},onEnter:I(!1),onAppear:I(!0),onLeave(ne,Ie){ne._isLeaving=!0;const Ae=()=>E(ne,Ie);Cn(ne,_),ne._enterCancelled?(Cn(ne,T),ji(ne)):(ji(ne),Cn(ne,T)),_u(()=>{ne._isLeaving&&(ss(ne,_),Cn(ne,x),wu(S)||ku(ne,r,oe,Ae))}),Ss(S,[ne,Ae])},onEnterCancelled(ne){M(ne,!1,void 0,!0),Ss(q,[ne])},onAppearCancelled(ne){M(ne,!0,void 0,!0),Ss(re,[ne])},onLeaveCancelled(ne){E(ne),Ss(H,[ne])}})}function iv(e){if(e==null)return null;if(ft(e))return[pi(e.enter),pi(e.leave)];{const t=pi(e);return[t,t]}}function pi(e){return df(e)}function Cn(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[nr]||(e[nr]=new Set)).add(t)}function ss(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const n=e[nr];n&&(n.delete(t),n.size||(e[nr]=void 0))}function _u(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let lv=0;function ku(e,t,n,r){const o=e._endId=++lv,i=()=>{o===e._endId&&r()};if(n!=null)return setTimeout(i,n);const{type:c,timeout:f,propCount:v}=rd(e,t);if(!c)return r();const b=c+"end";let g=0;const _=()=>{e.removeEventListener(b,T),i()},T=x=>{x.target===e&&++g>=v&&_()};setTimeout(()=>{g(n[j]||"").split(", "),o=r(`${ts}Delay`),i=r(`${ts}Duration`),c=xu(o,i),f=r(`${kr}Delay`),v=r(`${kr}Duration`),b=xu(f,v);let g=null,_=0,T=0;t===ts?c>0&&(g=ts,_=c,T=i.length):t===kr?b>0&&(g=kr,_=b,T=v.length):(_=Math.max(c,b),g=_>0?c>b?ts:kr:null,T=g?g===ts?i.length:v.length:0);const x=g===ts&&/\b(?:transform|all)(?:,|$)/.test(r(`${ts}Property`).toString());return{type:g,timeout:_,propCount:T,hasTransform:x}}function xu(e,t){for(;e.lengthCu(n)+Cu(e[r])))}function Cu(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function ji(e){return(e?e.ownerDocument:document).body.offsetHeight}function uv(e,t,n){const r=e[nr];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const $u=Symbol("_vod"),od=Symbol("_vsh"),cv=Symbol(""),dv=/(?:^|;)\s*display\s*:/;function fv(e,t,n){const r=e.style,o=Ct(n);let i=!1;if(n&&!o){if(t)if(Ct(t))for(const c of t.split(";")){const f=c.slice(0,c.indexOf(":")).trim();n[f]==null&&$r(r,f,"")}else for(const c in t)n[c]==null&&$r(r,c,"");for(const c in n){c==="display"&&(i=!0);const f=n[c];f!=null?vv(e,c,!Ct(t)&&t?t[c]:void 0,f)||$r(r,c,f):$r(r,c,"")}}else if(o){if(t!==n){const c=r[cv];c&&(n+=";"+c),r.cssText=n,i=dv.test(n)}}else t&&e.removeAttribute("style");$u in e&&((!o||t!==n)&&(e[$u]=i?r.display:""),e[od]&&(r.display="none"))}const Ao=/\s*!important$/;function $r(e,t,n){if(qe(n))n.forEach(r=>$r(e,t,r));else if(n==null&&(n=""),t.startsWith("--"))Ao.test(n)?e.setProperty(t,n.replace(Ao,""),"important"):e.setProperty(t,n);else{const r=pv(e,t);Ao.test(n)?e.setProperty(vs(r),n.replace(Ao,""),"important"):e[r]=n}}const Su=["Webkit","Moz","ms"],vi={};function pv(e,t){const n=vi[t];if(n)return n;let r=yn(t);if(r!=="filter"&&r in e)return vi[t]=r;r=Gu(r);for(let o=0;omi||(wv.then(()=>mi=0),mi=Date.now());function kv(e,t){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;const o=n.value;if(qe(o)){const i=r.stopImmediatePropagation;r.stopImmediatePropagation=()=>{i.call(r),r._stopped=!0};const c=o.slice(),f=[r];for(let v=0;ve.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,xv=(e,t,n,r,o,i)=>{const c=o==="svg";t==="class"?uv(e,r,c):t==="style"?fv(e,n,r):ca(t)?da(t)||hv(e,t,n,r,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Cv(e,t,r,c))?(Au(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Tu(e,t,r,c,i,t!=="value")):e._isVueCE&&($v(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!Ct(r)))?Au(e,yn(t),r,i,t):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),Tu(e,t,r,c))};function Cv(e,t,n,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&Ou(t)&&Ye(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const o=e.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return Ou(t)&&Ct(n)?!1:t in e}function $v(e,t){const n=e._def.props;if(!n)return!1;const r=yn(t);return Array.isArray(n)?n.some(o=>yn(o)===r):Object.keys(n).some(o=>yn(o)===r)}const ad=new WeakMap,id=new WeakMap,Xo=Symbol("_moveCb"),Mu=Symbol("_enterCb"),Di=new WeakMap,Sv=e=>(delete e.props.mode,e),Ev=Sv({name:"TransitionGroup",props:Pt({},nd,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=ul(),r=Cc();let o,i,c,f;const v=()=>(f===void 0&&(f=o.length>0&&Dv(o[0].el,n.vnode.el,Iu(e))),f);return Pc(()=>{if(Di.delete(n),!v()){o=[],c=void 0;return}const b=Iu(e);o.forEach(Av);const g=c&&jv(c,n.vnode.el);c=void 0,o.forEach(T=>Pv(T,g));const _=o.filter(Ov);ji(n.vnode.el),_.forEach(T=>{const x=T.el,j=x.style;Cn(x,b),j.transform=j.webkitTransform=j.transitionDuration="";const J=x[Xo]=oe=>{oe&&oe.target!==x||(!oe||oe.propertyName.endsWith("transform"))&&(x.removeEventListener("transitionend",J),x[Xo]=null,ss(x,b))};x.addEventListener("transitionend",J)}),o=[]}),()=>{const b=ut(e),g=sd(b);let _=b.tag||je;if(o=[],f=void 0,i)for(let T=0;Tr.willMove()&&r.item.contains(t));return n&&xa(n.item,n)}function Dv(e,t,n){const r=e.cloneNode(),o=e[nr];o&&o.forEach(f=>{f.split(/\s+/).forEach(v=>v&&r.classList.remove(v))}),n.split(/\s+/).forEach(f=>f&&r.classList.add(f)),r.style.display="none";const i=t.nodeType===1?t:t.parentNode;i.appendChild(r);const{hasTransform:c}=rd(r);return i.removeChild(r),c}const Qo=e=>{const t=e.props["onUpdate:modelValue"]||!1;return qe(t)?n=>Mo(t,n):t};function Lv(e){e.target.composing=!0}function ju(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Is=Symbol("_assign"),Po=Symbol("_initialValue");function hi(e,t,n){return t&&(e=e.trim()),n&&(e=pa(e)),e}const Ne={created(e,{modifiers:{lazy:t,trim:n,number:r}},o){e.parentNode&&(e.type==="text"?e[Po]=e.defaultValue.replace(/[\r\n]/g,""):e.type==="textarea"&&(e[Po]=e.defaultValue.replace(/\r\n?/g,` -`))),e[Is]=Qo(o);const i=r||o.props&&o.props.type==="number";Os(e,t?"change":"input",c=>{c.target.composing||e[Is](hi(e.value,n,i))}),(n||i)&&Os(e,"change",()=>{e.value=hi(e.value,n,i)}),t||(Os(e,"compositionstart",Lv),Os(e,"compositionend",ju),Os(e,"change",ju))},mounted(e,{value:t,modifiers:{trim:n,number:r}}){const o=t??"",i=e[Po];delete e[Po],i!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==i?e[Is](hi(e.value,n,r)):e.value=o},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:o,number:i}},c){if(e[Is]=Qo(c),e.composing)return;const f=(i||e.type==="number")&&!/^0\d/.test(e.value)?pa(e.value):e.value,v=t??"";if(f===v)return;const b=e.getRootNode();(b instanceof Document||b instanceof ShadowRoot)&&b.activeElement===e&&e.type!=="range"&&(r&&t===n||o&&e.value.trim()===v)||(e.value=v)}},fs={deep:!0,created(e,{value:t,modifiers:{number:n}},r){e._modelValue=t,Os(e,"change",()=>{const o=Array.prototype.filter.call(e.options,v=>v.selected).map(v=>n?pa(Zo(v)):Zo(v)),i=e.multiple,c=i?Ls(e._modelValue)?new Set(o):o:o[0],f=e._pendingValue=[i,i?qe(c)?o.slice():o:c];try{e[Is](c)}finally{ir(()=>{e._pendingValue===f&&(e._pendingValue=void 0)})}}),e[Is]=Qo(r)},mounted(e,{value:t}){Du(e,t)},beforeUpdate(e,{value:t},n){e._modelValue=t,e[Is]=Qo(n)},updated(e,{value:t}){const n=e._pendingValue;e._pendingValue=void 0,(!n||n[0]!==e.multiple||!Rv(t,n[1],n[0]))&&Du(e,t)}};function Rv(e,t,n){if(!n||qe(e))return ls(e,t);if(Ls(e)){if(e.size!==t.length)return!1;for(const r of t)if(!e.has(r))return!1;return!0}return!1}function Du(e,t){const n=e.multiple,r=qe(t);if(!(n&&!r&&!Ls(t))){for(let o=0,i=e.options.length;oString(b)===String(f)):c.selected=wf(t,f)>-1}else c.selected=t.has(f);else if(ls(Zo(c),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Zo(e){return"_value"in e?e._value:e.value}const Kv=["ctrl","shift","alt","meta"],Nv={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Kv.some(n=>e[`${n}Key`]&&!t.includes(n))},zt=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),r=t.join(".");return n[r]||(n[r]=(o,...i)=>{for(let c=0;c{const n=e._withKeys||(e._withKeys={}),r=t.join(".");return n[r]||(n[r]=o=>{if(!("key"in o))return;const i=vs(o.key);if(t.some(c=>c===i||Fv[c]===i))return e(o)})},Vv=Pt({patchProp:xv},ov);let Lu;function Bv(){return Lu||(Lu=Kp(Vv))}const Uv=(...e)=>{const t=Bv().createApp(...e),{mount:n}=t;return t.mount=r=>{const o=Hv(r);if(!o)return;const i=t._component;!Ye(i)&&!i.render&&!i.template&&(i.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const c=n(o,!1,qv(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),c},t};function qv(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Hv(e){return Ct(e)?document.querySelector(e):e}function Et(e){return''+e+""}const zv={calendar:Et(''),clock:Et(''),"check-circle":Et(''),edit:Et(''),tag:Et(''),star:Et(''),close:Et(''),flag:Et(''),chart:Et(''),export:Et(''),"chevron-left":Et(''),"chevron-right":Et(''),"chevron-down":Et(''),plus:Et(''),search:Et(''),settings:Et(''),memo:Et(''),lock:Et(''),wallet:Et(''),more:Et(''),shield:Et(''),plan:Et('')},Wv=["innerHTML"],He=Rt({__name:"Icon",props:{name:{},size:{default:16}},setup(e){const t=e,n=rt(()=>zv[t.name]||"");return(r,o)=>($(),A("span",{class:"icon",style:Un({width:e.size+"px",height:e.size+"px"}),innerHTML:n.value},null,12,Wv))}}),Gv=["aria-label"],Yv={class:"dialog-title"},Jv={class:"dialog-msg"},Xv={class:"dialog-btns"},Qv=Rt({__name:"ConfirmDialog",props:{open:{type:Boolean},title:{},message:{},confirmText:{default:"确认"},cancelText:{default:"取消"},danger:{type:Boolean,default:!1}},emits:["cancel","confirm"],setup(e,{emit:t}){const n=e,r=t;function o(i){n.open&&i.key==="Escape"&&r("cancel")}return yt(()=>n.open,i=>{i?window.addEventListener("keydown",o):window.removeEventListener("keydown",o)}),Wn(()=>window.removeEventListener("keydown",o)),(i,c)=>($(),St(Hn,{to:"body"},[Ce(lr,{name:"modal"},{default:ms(()=>[e.open?($(),A("div",{key:0,class:"mask",onClick:c[2]||(c[2]=zt(f=>r("cancel"),["self"]))},[l("div",{class:"dialog",role:"dialog","aria-label":e.title},[l("div",Yv,W(e.title),1),l("div",Jv,W(e.message),1),l("div",Xv,[l("button",{class:"btn btn-sm",onClick:c[0]||(c[0]=f=>r("cancel"))},W(e.cancelText),1),l("button",{class:Ze(["btn btn-sm",e.danger?"btn-danger-solid":"btn-primary"]),onClick:c[1]||(c[1]=f=>r("confirm"))},W(e.confirmText),3)])],8,Gv)])):ge("",!0)]),_:1})]))}}),Vt=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n},Dn=Vt(Qv,[["__scopeId","data-v-f27041d4"]]);var Ru=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Zv(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ld={exports:{}};(function(e,t){((n,r)=>{e.exports=r()})(Ru,function(){var n=function(s,a){return(n=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(u,d){u.__proto__=d}:function(u,d){for(var p in d)Object.prototype.hasOwnProperty.call(d,p)&&(u[p]=d[p])}))(s,a)},r=function(){return(r=Object.assign||function(s){for(var a,u=1,d=arguments.length;u"u"||i.Promise||(i.Promise=Promise);var b=Object.getPrototypeOf,g={}.hasOwnProperty;function _(s,a){return g.call(s,a)}function T(s,a){typeof a=="function"&&(a=a(b(s))),(typeof Reflect>"u"?c:Reflect.ownKeys)(a).forEach(function(u){j(s,u,a[u])})}var x=Object.defineProperty;function j(s,a,u,d){x(s,a,v(u&&_(u,"get")&&typeof u.get=="function"?{get:u.get,set:u.set,configurable:!0}:{value:u,configurable:!0,writable:!0},d))}function J(s){return{from:function(a){return s.prototype=Object.create(a.prototype),j(s.prototype,"constructor",s),{extend:T.bind(null,s.prototype)}}}}var oe=Object.getOwnPropertyDescriptor,ue=[].slice;function ce(s,a,u){return ue.call(s,a,u)}function q(s,a){return a(s)}function S(s){if(!s)throw new Error("Assertion Failed")}function H(s){i.setImmediate?setImmediate(s):setTimeout(s,0)}function Q(s,a){if(typeof a=="string"&&_(s,a))return s[a];if(!a)return s;if(typeof a!="string"){for(var u=[],d=0,p=a.length;d"u"?[]:(Qe=Promise.resolve(),typeof crypto<"u"&&crypto.subtle?[Xe=crypto.subtle.digest("SHA-512",new Uint8Array([0])),b(Xe),Qe]:[Qe,b(Qe),Qe]),Qe=Xe[0],zs=Xe[1],zs=zs&&zs.then,tt=Qe&&Qe.constructor,_t=!!Xe[2],$t=function(s,a){Gn.push([s,a]),Yt&&(queueMicrotask(Ld),Yt=!1)},tn=!0,Yt=!0,nn=[],hs=[],Kt=C,Ot={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:y,pgp:!1,env:{},finalize:y},Be=Ot,Gn=[],ys=0,Zr=[];function Oe(s){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var a=this._PSD=Be;if(typeof s!="function"){if(s!==Re)throw new TypeError("Not a function");this._state=arguments[1],this._value=arguments[2],this._state===!1&&Ta(this,this._value)}else this._state=null,this._value=null,++a.ref,function u(d,p){try{p(function(m){if(d._state===null){if(m===d)throw new TypeError("A promise cannot be resolved with itself.");var w=d._lib&&Fs();m&&typeof m.then=="function"?u(d,function(k,L){m instanceof Oe?m._then(k,L):m.then(k,L)}):(d._state=!0,d._value=m,bl(d)),w&&Vs()}},Ta.bind(null,d))}catch(m){Ta(d,m)}}(this,s)}var Ea={get:function(){var s=Be,a=so;function u(d,p){var m=this,w=!s.global&&(s!==Be||a!==so),k=w&&!Jn(),L=new Oe(function(Y,N){Aa(m,new gl(_l(d,s,w,k),_l(p,s,w,k),Y,N,s))});return this._consoleTask&&(L._consoleTask=this._consoleTask),L}return u.prototype=Re,u},set:function(s){j(this,"then",s&&s.prototype===Re?Ea:{get:function(){return s},set:Ea.set})}};function gl(s,a,u,d,p){this.onFulfilled=typeof s=="function"?s:null,this.onRejected=typeof a=="function"?a:null,this.resolve=u,this.reject=d,this.psd=p}function Ta(s,a){var u,d;hs.push(a),s._state===null&&(u=s._lib&&Fs(),a=Kt(a),s._state=!1,s._value=a,d=s,nn.some(function(p){return p._value===d._value})||nn.push(d),bl(s),u)&&Vs()}function bl(s){var a=s._listeners;s._listeners=[];for(var u=0,d=a.length;u{for(var w=nn.length;w;)if(nn[--w]._value===m._value)return nn.splice(w,1)})(a),u.resolve(d)}catch(m){u.reject(m)}finally{--ys==0&&Pa(),--u.psd.ref||u.psd.finalize()}}function Ld(){gs(Ot,function(){Fs()&&Vs()})}function Fs(){var s=tn;return Yt=tn=!1,s}function Vs(){var s,a,u;do for(;0.",kl="String expected.",oo="__dbnames",Ma="readonly",Ia="readwrite";function ws(s,a){return s?a?function(){return s.apply(this,arguments)&&a.apply(this,arguments)}:s:a}var xl={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function ao(s){return typeof s!="string"||/\./.test(s)?function(a){return a}:function(a){return a[s]===void 0&&s in a&&delete(a=Ie(a))[s],a}}function Cl(){throw fe.Type("Entity instances must never be new:ed. Instances are generated by the framework bypassing the constructor.")}function st(s,a){try{var u=$l(s),d=$l(a);if(u!==d)return u==="Array"?1:d==="Array"?-1:u==="binary"?1:d==="binary"?-1:u==="string"?1:d==="string"?-1:u==="Date"?1:d!=="Date"?NaN:-1;switch(u){case"number":case"Date":case"string":return a{var k=N,L=w;if(typeof L!="function"&&L!==null)throw new TypeError("Class extends value "+String(L)+" is not a constructor or null");function Y(){this.constructor=k}function N(){return w!==null&&w.apply(this,arguments)||this}return n(k,L),k.prototype=L===null?Object.create(L):(Y.prototype=L.prototype,new Y),Object.defineProperty(N.prototype,"db",{get:function(){return a},enumerable:!1,configurable:!0}),N.prototype.table=function(){return u},N})(s)),new Set),p=s.prototype;p;p=b(p))Object.getOwnPropertyNames(p).forEach(function(w){return d.add(w)});function m(w){if(!w)return w;var k,L=Object.create(s.prototype);for(k in w)if(!d.has(k))try{L[k]=w[k]}catch{}return L}return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=m,this.hook("reading",m),s},mt.prototype.defineClass=function(){return this.mapToClass(function(s){v(this,s)})},mt.prototype.add=function(s,a){var u=this,d=this.schema.primKey,p=d.auto,m=d.keyPath,w=s;return m&&p&&(w=ao(m)(s)),this._trans("readwrite",function(k){return u.core.mutate({trans:k,type:"add",keys:a!=null?[a]:null,values:[w]})}).then(function(k){return k.numFailures?Oe.reject(k.failures[0]):k.lastResult}).then(function(k){if(m)try{G(s,m,k)}catch{}return k})},mt.prototype.upsert=function(s,a){var u=this,d=this.schema.primKey.keyPath;return this._trans("readwrite",function(p){return u.core.get({trans:p,key:s}).then(function(m){var w=m??{};return Tl(w,a),d&&G(w,d,s),u.core.mutate({trans:p,type:"put",values:[w],keys:[s],upsert:!0,updates:{keys:[s],changeSpecs:[a]}}).then(function(k){return k.numFailures?Oe.reject(k.failures[0]):!!m})})})},mt.prototype.update=function(s,a){return typeof s!="object"||f(s)?this.where(":id").equals(s).modify(a):(s=Q(s,this.schema.primKey.keyPath))===void 0?Tt(new fe.InvalidArgument("Given object does not contain its primary key")):this.where(":id").equals(s).modify(a)},mt.prototype.put=function(s,a){var u=this,d=this.schema.primKey,p=d.auto,m=d.keyPath,w=s;return m&&p&&(w=ao(m)(s)),this._trans("readwrite",function(k){return u.core.mutate({trans:k,type:"put",values:[w],keys:a!=null?[a]:null})}).then(function(k){return k.numFailures?Oe.reject(k.failures[0]):k.lastResult}).then(function(k){if(m)try{G(s,m,k)}catch{}return k})},mt.prototype.delete=function(s){var a=this;return this._trans("readwrite",function(u){return a.core.mutate({trans:u,type:"delete",keys:[s]}).then(function(d){return io(a,[s],d)}).then(function(d){return d.numFailures?Oe.reject(d.failures[0]):void 0})})},mt.prototype.clear=function(){var s=this;return this._trans("readwrite",function(a){return s.core.mutate({trans:a,type:"deleteRange",range:xl}).then(function(u){return io(s,null,u)})}).then(function(a){return a.numFailures?Oe.reject(a.failures[0]):void 0})},mt.prototype.bulkGet=function(s){var a=this;return this._trans("readonly",function(u){return a.core.getMany({keys:s,trans:u}).then(function(d){return d.map(function(p){return a.hook.reading.fire(p)})})})},mt.prototype.bulkAdd=function(s,a,u){var d=this,p=Array.isArray(a)?a:void 0,m=(u=u||(p?void 0:a))?u.allKeys:void 0;return this._trans("readwrite",function(w){var k=d.schema.primKey,Y=k.auto,k=k.keyPath;if(k&&p)throw new fe.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(p&&p.length!==s.length)throw new fe.InvalidArgument("Arguments objects and keys must have the same length");var L=s.length,Y=k&&Y?s.map(ao(k)):s;return d.core.mutate({trans:w,type:"add",keys:p,values:Y,wantResults:m}).then(function(N){var D=N.numFailures,K=N.failures;if(D===0)return m?N.results:N.lastResult;throw new bt("".concat(d.name,".bulkAdd(): ").concat(D," of ").concat(L," operations failed"),K)})})},mt.prototype.bulkPut=function(s,a,u){var d=this,p=Array.isArray(a)?a:void 0,m=(u=u||(p?void 0:a))?u.allKeys:void 0;return this._trans("readwrite",function(w){var k=d.schema.primKey,Y=k.auto,k=k.keyPath;if(k&&p)throw new fe.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(p&&p.length!==s.length)throw new fe.InvalidArgument("Arguments objects and keys must have the same length");var L=s.length,Y=k&&Y?s.map(ao(k)):s;return d.core.mutate({trans:w,type:"put",keys:p,values:Y,wantResults:m}).then(function(N){var D=N.numFailures,K=N.failures;if(D===0)return m?N.results:N.lastResult;throw new bt("".concat(d.name,".bulkPut(): ").concat(D," of ").concat(L," operations failed"),K)})})},mt.prototype.bulkUpdate=function(s){var a=this,u=this.core,d=s.map(function(w){return w.key}),p=s.map(function(w){return w.changes}),m=[];return this._trans("readwrite",function(w){return u.getMany({trans:w,keys:d,cache:"clone"}).then(function(k){var L=[],Y=[],N=(s.forEach(function(D,K){var z=D.key,B=D.changes,V=k[K];if(V){for(var U=0,se=Object.keys(B);UX+ie&&U(X+Y)})})}var se=Us(u)&&u.limit===1/0&&(typeof s!="function"||B)&&{index:u.index,range:u.range};return U(0).then(function(){if(0{for(var We=Math.min(be.length,Fe.length),Je=-1,nt=0;nt=K})).length===0?Oe.resolve():(U.forEach(function(X){V.push(function(){var ie,ve,he,xe=se,be=X._cfg.dbschema,Ke=(yo(D,xe,B),yo(D,be,B),se=D._dbSchema=be,Va(xe,be)),_e=(Ke.add.forEach(function(Fe){Ba(B,Fe[0],Fe[1].primKey,Fe[1].indexes)}),Ke.change.forEach(function(Fe){if(Fe.recreate)throw new fe.Upgrade("Not yet support for changing primary key");var me=B.objectStore(Fe.name);Fe.add.forEach(function(ze){return mo(me,ze)}),Fe.change.forEach(function(ze){me.deleteIndex(ze.name),mo(me,ze)}),Fe.del.forEach(function(ze){return me.deleteIndex(ze)})}),X._cfg.contentUpgrade);if(_e&&X._cfg.version>K)return po(D,B),z._memoizedTables={},ie=re(be),Ke.del.forEach(function(Fe){ie[Fe]=xe[Fe]}),Fa(D,[D.Transaction.prototype]),vo(D,[D.Transaction.prototype],c(ie),ie),z.schema=ie,(ve=Le(_e))&&Bs(),be=Oe.follow(function(){var Fe;(he=_e(z))&&ve&&(Fe=Jn.bind(null,null),he.then(Fe,Fe))}),he&&typeof he.then=="function"?Oe.resolve(he):be.then(function(){return he})}),V.push(function(ie){var ve,he,xe=X._cfg.dbschema;ve=xe,he=ie,[].slice.call(he.db.objectStoreNames).forEach(function(be){return ve[be]==null&&he.db.deleteObjectStore(be)}),Fa(D,[D.Transaction.prototype]),vo(D,[D.Transaction.prototype],D._storeNames,D._dbSchema),z.schema=D._dbSchema}),V.push(function(ie){D.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(D.idbdb.version/10)===X._cfg.version?(D.idbdb.deleteObjectStore("$meta"),delete D._dbSchema.$meta,D._storeNames=D._storeNames.filter(function(ve){return ve!=="$meta"})):ie.objectStore("$meta").put(X._cfg.version,"version"))})}),function X(){return V.length?Oe.resolve(V.shift()(z.idbtrans)).then(X):Oe.resolve()}().then(function(){Rl(se,B)}))}).catch(w);var L,Y;c(p).forEach(function(N){Ba(u,N,p[N].primKey,p[N].indexes)}),po(s,u),Oe.follow(function(){return s.on.populate.fire(m)}).catch(w)})}function Yd(s,a){Rl(s._dbSchema,a),a.db.version%10!=0||a.objectStoreNames.contains("$meta")||a.db.createObjectStore("$meta").add(Math.ceil(a.db.version/10-1),"version");var u=ho(0,s.idbdb,a);yo(s,s._dbSchema,a);for(var d=0,p=Va(u,s._dbSchema).change;d{if(w.change.length||w.recreate)return console.warn("Unable to patch indexes of table ".concat(w.name," because it has changes on the type of index or primary key.")),{value:void 0};var k=a.objectStore(w.name);w.add.forEach(function(L){Se&&console.debug("Dexie upgrade patch: Creating missing index ".concat(w.name,".").concat(L.src)),mo(k,L)})})(p[d]);if(typeof m=="object")return m.value}}function Va(s,a){var u,d={del:[],add:[],change:[]};for(u in s)a[u]||d.del.push(u);for(u in a){var p=s[u],m=a[u];if(p){var w={name:u,def:m,recreate:!1,del:[],add:[],change:[]};if(""+(p.primKey.keyPath||"")!=""+(m.primKey.keyPath||"")||p.primKey.auto!==m.primKey.auto)w.recreate=!0,d.change.push(w);else{var k=p.idxByName,L=m.idxByName,Y=void 0;for(Y in k)L[Y]||w.del.push(Y);for(Y in L){var N=k[Y],D=L[Y];N?N.src!==D.src&&w.change.push(D):w.add.push(D)}(0{var s,a,u;return typeof FinalizationRegistry<"u"&&typeof WeakRef<"u"?(s=new Set,a=new FinalizationRegistry(function(d){s.delete(d)}),{toArray:function(){return Array.from(s).map(function(d){return d.deref()}).filter(function(d){return d!==void 0})},add:function(d){var p=new WeakRef(d._novip);s.add(p),a.register(d._novip,p,p),s.size>d._options.maxConnections&&(p=s.values().next().value,s.delete(p),a.unregister(p))},remove:function(d){if(d)for(var p=s.values(),m=p.next();!m.done;){var w=m.value;if(w.deref()===d._novip)return s.delete(w),void a.unregister(w);m=p.next()}}}):(u=[],{toArray:function(){return u},add:function(d){u.push(d._novip)},remove:function(d){d&&(d=u.indexOf(d._novip))!==-1&&u.splice(d,1)}})})();function Ua(s,a){var u=s._dbNamesDB;return u||(u=s._dbNamesDB=new Rn(oo,{addons:[],indexedDB:s,IDBKeyRange:a})).version(1).stores({dbnames:"name"}),u.table("dbnames")}function qa(s){return s&&typeof s.databases=="function"}function Ha(s){return Yn(function(){return Be.letThrough=!0,s()})}function za(s){return!("from"in s)}var Bt=function(s,a){var u;if(!this)return u=new Bt,s&&"d"in s&&v(u,s),u;v(this,arguments.length?{d:1,from:s,to:1Math.pow(2,62)?0:U.oldVersion,D=se<1,s.idbdb=V.result,m&&Yd(s,N),Gd(s,se/10,N,z))},z),V.onsuccess=kt(function(){N=null;var U,se,X,ie,ve,he,xe=s.idbdb=V.result,be=ce(xe.objectStoreNames);if(0"u"?Oe.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(K){function z(){return indexedDB.databases().finally(K)}L=setInterval(z,100),z()}).finally(function(){return clearInterval(L)}):Promise.resolve()).then(k)]).then(function(){return w(),a.onReadyBeingFired=[],Oe.resolve(Ha(function(){return s.on.ready.fire(s.vip)})).then(function K(){var z;if(0a.limit?d.length=a.limit:s.length===a.limit&&d.length{if(u===void 0)return d!==void 0?-1:0;if(d===void 0)return 1;if((u=st(u,d))===0){if(p&&m)return 0;if(p)return 1;if(m)return-1}return u})(s.lower,a.lower,s.lowerOpen,a.lowerOpen)<=0&&0<=((u,d,p,m)=>{if(u===void 0)return d!==void 0?1:0;if(d===void 0)return-1;if((u=st(u,d))===0){if(p&&m)return 0;if(p)return-1;if(m)return 1}return u})(s.upper,a.upper,s.upperOpen,a.upperOpen)}function sf(s,a,u,d){s.subscribers.add(u),d.addEventListener("abort",function(){var p,m;s.subscribers.delete(u),s.subscribers.size===0&&(p=s,m=a,setTimeout(function(){p.subscribers.size===0&&de(m,p)},3e3))})}var rf={stack:"dbcore",level:0,name:"Cache",create:function(s){var a=s.schema.name;return r(r({},s),{transaction:function(u,d,p){var m,w,k=s.transaction(u,d,p);return d==="readwrite"&&(p=(m=new AbortController).signal,k.addEventListener("abort",(w=function(L){return function(){if(m.abort(),d==="readwrite"){for(var Y=new Set,N=0,D=u;N{var se=_s["idb://".concat(z,"/").concat(B)];if(!se)return[];if(!(z=se.queries[V]))return[null,!1,se,null];var X=z[(U.query?U.query.index.name:null)||""];if(!X)return[null,!1,se,null];switch(V){case"query":var ie=(ve=U.direction)!=null?ve:"next",ve=X.find(function(he){var xe;return he.req.limit===U.limit&&he.req.values===U.values&&((xe=he.req.direction)!=null?xe:"next")===ie&&Gl(he.req.query.range,U.query.range)});return ve?[ve,!0,se,X]:[X.find(function(he){var xe;return("limit"in he.req?he.req.limit:1/0)>=U.limit&&((xe=he.req.direction)!=null?xe:"next")===ie&&(!U.values||he.req.values)&&nf(he.req.query.range,U.query.range)}),!1,se,X];case"count":return ve=X.find(function(he){return Gl(he.req.query.range,U.query.range)}),[ve,!!ve,se,X]}})(a,u,"query",m),K=D[0],Y=D[2],N=D[3],K&&D[1]?K.obsSet=m.obsSet:(D=d.query(m).then(function(z){var B=z.result;if(K&&(K.res=B),w){for(var V=0,U=B.length;V{var ve=Fs();try{m&&Bs();var he=Yn(s,ie);return he=m?he.finally(Jn):he}finally{ve&&Vs()}})(se={subscr:U,signal:w.signal,requery:K,querier:s,trans:null}),D||(Zn.storagemutated.subscribe(B),D=!0),Promise.resolve(X).then(function(ie){u=!0,a=ie,k||se.signal.aborted||(z()||(Y=U,z())?K():(L={},Oa(function(){return!k&&p.next&&p.next(ie)})))},function(ie){u=!1,["DatabaseClosedError","AbortError"].includes(ie==null?void 0:ie.name)||k||Oa(function(){k||p.error&&p.error(ie)})}))};return setTimeout(K,0),N});return d.hasValue=function(){return u},d.getValue=function(){return a},d}var ks=Rn;function ni(s){var a=es;try{es=!0,Zn.storagemutated.fire(s),Ja(s,!0)}finally{es=a}}T(ks,r(r({},$e),{delete:function(s){return new ks(s,{addons:[]}).delete()},exists:function(s){return new ks(s,{addons:[]}).open().then(function(a){return a.close(),!0}).catch("NoSuchDatabaseError",function(){return!1})},getDatabaseNames:function(s){try{return a=ks.dependencies,u=a.indexedDB,a=a.IDBKeyRange,(qa(u)?Promise.resolve(u.databases()).then(function(d){return d.map(function(p){return p.name}).filter(function(p){return p!==oo})}):Ua(u,a).toCollection().primaryKeys()).then(s)}catch{return Tt(new fe.MissingAPI)}var a,u},defineClass:function(){return function(s){v(this,s)}},ignoreTransaction:function(s){return Be.trans?gs(Be.transless||Ot,s):s()},vip:Ha,async:function(s){return function(){try{var a=Xa(s.apply(this,arguments));return a&&typeof a.then=="function"?a:Oe.resolve(a)}catch(u){return Tt(u)}}},spawn:function(s,a,u){try{var d=Xa(s.apply(u,a||[]));return d&&typeof d.then=="function"?d:Oe.resolve(d)}catch(p){return Tt(p)}},currentTransaction:{get:function(){return Be.trans||null}},waitFor:function(s,a){return s=Oe.resolve(typeof s=="function"?ks.ignoreTransaction(s):s).timeout(a||6e4),Be.trans?Be.trans.waitFor(s):s},Promise:Oe,debug:{get:function(){return Se},set:function(s){we(s)}},derive:J,extend:v,props:T,override:q,Events:fr,on:Zn,liveQuery:Yl,extendObservabilitySet:bo,getByKeyPath:Q,setByKeyPath:G,delByKeyPath:function(s,a){typeof a=="string"?G(s,a,void 0):"length"in a&&[].map.call(a,function(u){G(s,u,void 0)})},shallowClone:re,deepClone:Ie,getObjectDiff:Qa,cmp:st,asap:H,minKey:-1/0,addons:[],connections:{get:yr.toArray},errnames:wt,dependencies:xo,cache:_s,semVer:"4.4.6",version:"4.4.6".split(".").map(function(s){return parseInt(s)}).reduce(function(s,a,u){return s+a/Math.pow(10,2*u)})})),ks.maxKey=mr(ks.dependencies.IDBKeyRange),typeof dispatchEvent<"u"&&typeof addEventListener<"u"&&(Zn(fo,function(s){es||(s=new CustomEvent(La,{detail:s}),es=!0,dispatchEvent(s),es=!1)}),addEventListener(La,function(s){s=s.detail,es||ni(s)}));var Ws,es=!1,Jl=function(){};return typeof BroadcastChannel<"u"&&((Jl=function(){(Ws=new BroadcastChannel(La)).onmessage=function(s){return s.data&&ni(s.data)}})(),typeof Ws.unref=="function"&&Ws.unref(),Zn(fo,function(s){es||Ws.postMessage(s)})),typeof addEventListener<"u"&&(addEventListener("pagehide",function(s){if(!Rn.disableBfCache&&s.persisted){Se&&console.debug("Dexie: handling persisted pagehide"),Ws!=null&&Ws.close();for(var a=0,u=yr.toArray();a{const r={dev:"项目实操",test:"项目实操",bugfix:"售后服务",learning:"产品学习",meeting:"打杂",doc:"打杂",other:"打杂"};await n.table("log_item").toCollection().modify(o=>{o.category&&r[o.category]&&(o.category=r[o.category])})}),this.version(6).stores({plan:"++id, date, status, goal_id",goal:"++id, start_date"})}}let ae;function sm(e){ae=e}function cl(){ae&&ae.close(),ae=void 0}const rm=6,Nu=["公司","客户现场","出差","居家办公"],om={dev:"项目实操",test:"项目实操",bugfix:"售后服务",learning:"产品学习",meeting:"打杂",doc:"打杂",other:"打杂"};function ta(e){return om[e]||e}function Mr(e){return e<10?"0"+e:String(e)}function qn(e){return e.getFullYear()+"-"+Mr(e.getMonth()+1)+"-"+Mr(e.getDate())}function ot(){return qn(new Date)}function at(){const e=new Date;return qn(e)+"T"+Mr(e.getHours())+":"+Mr(e.getMinutes())+":"+Mr(e.getSeconds())}function bn(e){if(!e)return"--:--";const t=e.indexOf("T");return t>=0?e.slice(t+1,t+6):e.slice(0,5)}function Ks(e){const t=e.split("-").map(Number);return new Date(t[0],t[1]-1,t[2])}function Ft(e,t){const n=Ks(e);return n.setDate(n.getDate()+t),qn(n)}function na(e,t){const n=Ks(e),r=n.getDate();n.setDate(1),n.setMonth(n.getMonth()+t);const o=new Date(n.getFullYear(),n.getMonth()+1,0).getDate();return n.setDate(Math.min(r,o)),qn(n)}function Qs(e){const t=Ks(e),n=(t.getDay()+6)%7;return t.setDate(t.getDate()-n),qn(t)}function am(e){const t=Ks(e).getDay();return t===0||t===6}function im(e,t){return Math.round((new Date(t).getTime()-new Date(e).getTime())/6e4)}function ud(e){const t=Ks(e),n=["周日","周一","周二","周三","周四","周五","周六"];return t.getFullYear()+" 年 "+(t.getMonth()+1)+" 月 "+t.getDate()+" 日 "+n[t.getDay()]}const lm=15e4;function Ri(e){const t=new Uint8Array(e);let n="";for(let r=0;r({}));if(!o.ok){const c=i&&i.error||"服务返回 "+o.status;throw e==="register"&&o.status===409?new Error("云端已有同名账号且密码一致,直接登录即可"):new Error(String(c))}if(!i.userId||!i.username)throw new Error("登录响应异常");return{userId:String(i.userId),username:String(i.username)}}async function vl(e,t,n){const r=await Em(n,e,t);ia(r.userId);const o={userId:r.userId,username:r.username};return $m(o),md(r.username,t),o}async function Tm(e,t){const n=(e||"").trim();if(!n||!t)throw new Error("请输入用户名与密码");return vl(n,t,"login")}async function Am(e,t,n){const r=(e||"").trim();if(r.length<2||r.length>20)throw new Error("用户名需 2 到 20 个字符");if(t.length<6)throw new Error("登录密码至少 6 位");return vl(r,t,"register")}async function Pm(){const e=wn();if(!e)return null;try{return await vl(e.username,e.password,"login")}catch{return null}}async function Om(){oa(),cl(),aa=null,vd()}function Mm(){oa(),cl(),aa=null,vd(),Sm()}async function Im(e,t){if(!qr())throw new Error("未登录");if(t.length<6)throw new Error("新密码至少 6 位");const r=wn();if(!r||r.password!==e)throw new Error("旧密码不正确");const o=await Ns();let i;try{i=await fetch(o+"/api/auth/password",{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+hd()},body:JSON.stringify({oldPassword:e,newPassword:t})})}catch{throw new Error("无法连接同步服务器")}if(!i.ok){const c=await i.json().catch(()=>({}));throw new Error(c&&c.error||"修改失败 "+i.status)}md(r.username,t)}async function jm(){if(!qr())throw new Error("未登录");const t=await Ns();let n;try{n=await fetch(t+"/api/auth/delete",{method:"POST",headers:{Authorization:"Bearer "+hd()}})}catch{throw new Error("无法连接同步服务器")}if(!n.ok){const r=await n.json().catch(()=>({}));throw new Error(r&&r.error||"删除失败 "+n.status)}Mm()}function hd(){return $a()}const Fi=O(null),Vi=O(null),ur=O(0);function os(){ur.value++}const Zs=O(""),Hr=["project","work_log","log_item","attendance","weekly_note","setting","memo","credential","goal","transaction","plan"],Js=new Set(["sync_cursor","sync_last_time","sync_token","last_project","last_category"]);function Lo(e){return JSON.stringify(e)}async function Dm(e){return ae.table(e).toArray()}function Ro(e,t){return e==="setting"?t.key:t.id}async function Lm(){for(const e of Hr){const t=ae.table(e),n=await t.toArray();for(const r of n){if(e==="setting"&&Js.has(r.key))continue;const o={};r.uuid||(o.uuid=Rm()),!r.updated_at&&r.created_at&&(o.updated_at=r.created_at),Object.keys(o).length&&await t.update(Ro(e,r),o)}}}function Rm(){return typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():"u"+Date.now().toString(36)+Math.random().toString(36).slice(2,10)}async function Km(){return wn()!=null}async function Nm(){try{return localStorage.getItem("dsh_last_sync")||""}catch{return""}}async function Fm(e){try{localStorage.setItem("dsh_last_sync",e)}catch{}}async function yd(e,t){const n=await fetch(e+"/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:t.username.trim(),password:t.password})});if(!n.ok)throw new Error("云端账号或密码不正确");const r=await n.json();if(!r||!r.token)throw new Error("云端登录异常");return String(r.token)}async function Vm(e,t){let n=$a();return n||(n=await yd(e,t),Ur(n),n)}async function gd(){const e=wn();if(!e)throw new Error("未登录");const t=await Ns(),n=await fetch(t+"/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:e.username,password:e.password})});if(!n.ok)throw new Error("云端账号校验失败:"+n.status)}async function Bi(){const e=wn();if(!e)throw new Error("未登录,无法同步");return kd({baseUrl:await Ns(),username:e.username,password:e.password})}async function bd(){try{await Bi()}catch(e){Zs.value=e instanceof Error?e.message:String(e);try{await Bi()}catch{}throw e}}function wd(e,t,n){const r={};for(const o of Object.keys(t))o!=="id"&&(r[o]=t[o]);if(e==="log_item"){delete r.work_log_id,delete r.project_id;const o=t.work_log_id?n.workLog.get(t.work_log_id):null;o&&o.uuid&&(r.wuuid=o.uuid);const i=t.project_id?n.project.get(t.project_id):null;i&&i.uuid&&(r.puuid=i.uuid)}if(e==="plan"){delete r.goal_id;const o=t.goal_id?n.goal.get(t.goal_id):null;o&&o.uuid&&(r.guuid=o.uuid)}return r}async function _d(){const e=await ae.work_log.toArray(),t=await ae.project.toArray(),n=await ae.goal.toArray();return{workLog:new Map(e.map(r=>[r.id,r])),project:new Map(t.map(r=>[r.id,r])),goal:new Map(n.map(r=>[r.id,r]))}}let Ir=!1,Ko=!1,Ui=!1,er=null,$n=null,qi="",Hi=!1,No=null;async function tr(){if(Ir){Ko=!0;return}try{if(!await Km())return;await kd(await Bm()),Zs.value=""}catch(e){Zs.value=e instanceof Error?e.message:String(e)}}async function Bm(){const e=wn();if(!e)throw new Error("未登录,无法同步");return{baseUrl:await Ns(),username:e.username,password:e.password}}function Um(){if(Hi)return;Hi=!0,No=tm(async()=>{const t={};for(const n of Hr)t[n]=await ae.table(n).count();return t}).subscribe({next:()=>{Ui||Ir||(er&&globalThis.clearTimeout(er),er=globalThis.setTimeout(()=>{tr()},3e3))},error:()=>{}})}function qm(){No&&(No.unsubscribe(),No=null),$n&&($n.close(),$n=null,qi=""),er&&(globalThis.clearTimeout(er),er=null),Hi=!1}function Hm(e,t){const n=e+"|"+t;if(!($n&&qi===n)){$n&&($n.close(),$n=null);try{$n=new EventSource(e+"/api/events?token="+encodeURIComponent(t)),qi=n,$n.onmessage=()=>{tr()}}catch{$n=null}}}async function kd(e){if(Ir)return Ko=!0,{pushed:0,pulled:0,removed:0,errors:0,at:""};Ir=!0,Ui=!0;try{const t=await zm(e);return Ko&&(Ko=!1,globalThis.setTimeout(()=>{tr()},800)),t}finally{Ir=!1,Ui=!1}}async function zm(e){const t=e.baseUrl.trim().replace(/\/+$/,"");if(!t)throw new Error("请先配置同步服务地址");await Lm();const n=await _d(),r=await ae.sync_mirror.toArray(),o=new Map;for(const oe of r)o.set(oe.table+"|"+oe.uuid,oe);const i={},c=[];let f=0;for(const oe of Hr){let ue=await Dm(oe);oe==="setting"&&(ue=ue.filter(q=>!Js.has(q.key)));const ce=new Map;for(const q of ue)ce.set(q.uuid,q);for(const[q,S]of ce){const H=wd(oe,S,n),Q=Lo(H),G=o.get(oe+"|"+q);(!G||G.hash!==Q)&&(i[oe]=i[oe]||[],i[oe].push(H),f++)}for(const[q,S]of o)q.startsWith(oe+"|")&&!ce.has(S.uuid)&&c.push({table:oe,uuid:S.uuid,deleted_at:at()});i[oe]=i[oe]||[]}c.push(...Xm());const v=await Vm(t,e),b=oe=>fetch(t+"/api/sync",{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+oe},body:JSON.stringify({device:"client",tables:i,tombstones:c})});let g=await b(v);if(g.status===401){Ur("");const oe=await yd(t,e);Ur(oe),g=await b(oe)}if(!g.ok)throw new Error("同步服务返回 "+g.status);const _=await g.json(),T=_.tables||{},x=_.tombstones||[],j=await Ym(T,x);Hm(t,$a()||v);const J=at();return await Fm(J),(j.changed>0||j.removed>0||f>0)&&os(),{pushed:f,pulled:j.changed,removed:j.removed,errors:0,at:J}}function xd(){var t;return"dsh_idmap_"+(((t=wn())==null?void 0:t.username)||"anon")}function Wm(){try{const e=localStorage.getItem(xd());if(e)return JSON.parse(e)}catch{}return{}}function Gm(e){try{localStorage.setItem(xd(),JSON.stringify(e))}catch{}}async function Ym(e,t){const n=Wm(),r=new Set(t.map(x=>x.table+"|"+x.uuid)),o=new Map;for(const x of await ae.sync_mirror.toArray())o.set(x.table+"|"+x.uuid,x);const i=new Set(Array.from(o.keys()).map(x=>x.split("|")[1]));let c=0,f=0;const v={},b={},g={};for(const x of Hr){const j=ae.table(x),J=await j.toArray(),oe=new Map(J.map(E=>[Ro(x,E),E])),ue=new Map(J.filter(E=>E.uuid).map(E=>[E.uuid,E])),ce=(e[x]||[]).filter(E=>!r.has(x+"|"+E.uuid)),q=ce.filter(E=>!(x==="setting"&&Js.has(E.key))),S=ce.filter(E=>x==="setting"&&Js.has(E.key));for(const E of S)Jm(x,E.uuid);const H=x==="setting"?[]:J.filter(E=>E.uuid&&!i.has(E.uuid)&&!r.has(x+"|"+E.uuid)),Q={v:Math.max(0,...J.map(E=>Number(E.id)||0))};q.length;const G=[];for(const E of q){const I={...E};if(x==="log_item"){const Ae=I.wuuid?v[I.wuuid]:void 0;if(!Ae)continue;I.work_log_id=Ae,delete I.wuuid,I.project_id=I.puuid?b[I.puuid]??null:null,delete I.puuid}if(x==="plan")if(I.guuid){const Ae=g[I.guuid];I.goal_id=Ae??null,delete I.guuid}else I.goal_id=null;let ne=Ro(x,E);if(x==="setting")ne=E.key;else{const Ae=n[x]&&n[x][E.uuid],ye=ue.get(E.uuid);ye&&ye.id!=null?ne=ye.id:typeof Ae=="number"?ne=Ae:ne=++Q.v}const Ie={...I,id:ne};x==="setting"&&Js.has(Ie.key)||(G.push(Ie),x==="work_log"&&(v[E.uuid]=ne),x==="project"&&(b[E.uuid]=ne),x==="goal"&&(g[E.uuid]=ne))}const re=G.concat(H);for(const E of re){const I=oe.get(Ro(x,E));(!I||Lo(I)!==Lo(E))&&c++}f+=J.filter(E=>E.uuid&&!G.some(I=>I.uuid===E.uuid)&&!r.has(x+"|"+E.uuid)).length,await j.clear(),re.length&&await j.bulkPut(re);const M={};for(const E of re)E.uuid&&(M[E.uuid]=E.id);n[x]=M}Gm(n);const _=await _d(),T=[];for(const x of Hr){const j=await ae.table(x).toArray();for(const J of j)x==="setting"&&Js.has(J.key)||J.uuid&&T.push({table:x,uuid:J.uuid,hash:Lo(wd(x,J,_))})}return await ae.sync_mirror.clear(),T.length&&await ae.sync_mirror.bulkAdd(T.map(x=>({...x}))),await ae.tombstone.clear(),{changed:c,removed:f+la.length}}const la=[];function Jm(e,t){la.some(n=>n.table===e&&n.uuid===t)||la.push({table:e,uuid:t,deleted_at:at()})}function Xm(){return la.splice(0)}const Qm=new Set(["sync_cursor","sync_last_time","sync_token","last_project","last_category"]);async function it(){await bd()}async function xt(e,t){const n=await ae.setting.get(e);return n?n.value:t}async function jt(e,t){await ae.setting.put({key:e,value:t}),Qm.has(e)||await it()}async function ps(){const e=await Promise.all([xt("work_start","09:00"),xt("work_end","18:00"),xt("grace_minutes","10"),xt("lunch_minutes","60"),xt("remind_weekly","friday")]);return{work_start:e[0],work_end:e[1],grace_minutes:Number(e[2])||0,lunch_minutes:Number(e[3])||0,remind_weekly:e[4]}}async function Zm(){return xt("last_location","")}async function eh(e,t){const n=t.trim();await jt("last_location",n),n&&await ua(n);let r=!1;const o=await _n(e);o&&o.id?(o.location||"")!==n&&(await ae.attendance.update(o.id,{location:n||null}),r=!0):n&&(await ae.attendance.add({date:e,clock_in_at:null,clock_out_at:null,kind:"normal",note:null,location:n,created_at:at()}),r=!0),r&&await it()}async function ml(){const e=await xt("location_presets","");if(!e)return Nu.slice();try{const t=JSON.parse(e);if(Array.isArray(t))return t.filter(n=>typeof n=="string"&&n.trim()).map(n=>n.trim())}catch{}return Nu.slice()}async function Cd(e){const t=Array.from(new Set(e.map(n=>n.trim()).filter(Boolean)));await jt("location_presets",JSON.stringify(t))}async function ua(e){const t=e.trim();if(!t)return;const n=await ml();n.includes(t)||await Cd([...n,t])}async function rr(e=!1){const t=await ae.project.orderBy("name").toArray();return e?t:t.filter(n=>n.archived!==1)}async function th(e){await ae.project.add({name:e.trim(),archived:0,created_at:at()}),await it()}async function nh(e,t){await ae.project.update(e,{name:t.trim()}),await it()}async function sh(e,t){await ae.project.update(e,{archived:t?1:0}),await it()}async function _n(e){return ae.attendance.where("date").equals(e).first()}async function $d(e,t){const n=((t===void 0?await xt("last_location",""):t)||"").trim();let r=!1;const o=await _n(e);if(o&&o.id){if(!o.clock_in_at){const i={clock_in_at:at()};n&&(i.location=n),await ae.attendance.update(o.id,i),r=!0}n&&(await xt("last_location","")!==n&&await jt("last_location",n),await ua(n)),r&&await it();return}await ae.attendance.add({date:e,clock_in_at:at(),clock_out_at:null,kind:"normal",note:null,location:n||null,created_at:at()}),n&&(await jt("last_location",n),await ua(n)),await it()}async function rh(e){const t=await _n(e);t&&t.id&&t.clock_in_at&&!t.clock_out_at&&(await ae.attendance.update(t.id,{clock_out_at:at()}),await it())}async function oh(){const e=new Date,t=qn(e);let n="";if(e.getHours()<4){const r=await _n(Ft(t,-1));r&&r.id&&r.clock_in_at&&!r.clock_out_at&&(await ae.attendance.update(r.id,{clock_out_at:at()}),n=r.date)}if(!n){const r=await _n(t);r&&r.id&&r.clock_in_at&&!r.clock_out_at&&(await ae.attendance.update(r.id,{clock_out_at:at()}),n=r.date)}if(!n)throw new Error("没有进行中的打卡");return await it(),n}async function ah(e,t,n,r,o){(o||"").trim()&&await ua(o);const i=await _n(e),c={date:e,clock_in_at:t,clock_out_at:n,kind:"makeup",note:r||null,location:(o||"").trim()||null,created_at:at()};i&&i.id?await ae.attendance.update(i.id,c):await ae.attendance.add(c),await it()}async function ih(e,t,n){const r=(n||"").trim();if(!r)return;const o=await _n(e);o&&o.id&&(await ae.attendance.update(o.id,{[t]:e+"T"+r+":00"}),await it())}async function Jr(e,t){return ae.attendance.where("date").between(e,t,!0,!0).toArray()}async function lh(e,t){const n=await _n(e);if(t){const r={date:e,kind:"leave",clock_in_at:null,clock_out_at:null,created_at:at()};n&&n.id?await ae.attendance.update(n.id,r):await ae.attendance.add({...r,note:null,location:null})}else n&&n.id&&await ae.attendance.update(n.id,{kind:"normal"});await it()}async function uh(e){const t=await ae.work_log.where("date").equals(e).first();return t||{id:await ae.work_log.add({date:e,created_at:at()}),date:e,created_at:at()}}async function ch(e){return ae.work_log.where("date").equals(e).first()}async function dh(e){const t=await ch(e);return!t||!t.id?[]:(await ae.log_item.where("work_log_id").equals(t.id).toArray()).sort((r,o)=>o.id-r.id)}async function fh(e,t){const n=await ae.work_log.where("date").equals(e).first();let r;n&&n.id?r=n:r=await uh(e),await ae.table("log_item").add({work_log_id:r.id,content:t.content,project_id:t.project_id,category:t.category,minutes:t.minutes,is_milestone:0,needs_followup:0,takeaway:t.takeaway,remark:t.remark,sort_order:0,created_at:at()});const o=t.project_id?String(t.project_id):"";await xt("last_project","")!==o&&await jt("last_project",o),await xt("last_category","")!==t.category&&await jt("last_category",t.category),await it()}async function gi(e,t){await ae.table("log_item").update(e,t),await it()}async function ph(e){await ae.table("log_item").delete(e),await it()}async function Xr(e,t){const n=await ae.work_log.where("date").between(e,t,!0,!0).toArray();if(!n.length)return[];const r=new Map(n.map(i=>[i.id,i.date]));return(await ae.table("log_item").where("work_log_id").anyOf(n.map(i=>i.id)).toArray()).map(i=>({...i,date:r.get(i.work_log_id)||""})).sort((i,c)=>i.date===c.date?i.id-c.id:i.daten.start_time!!n.timer_started_at).toArray();for(const n of t)n.id!==e&&await yl(n.id);await ae.plan.update(e,{timer_started_at:at(),updated_at:at()}),await it()}async function yl(e){const t=await ae.plan.get(e);if(!t||!t.timer_started_at)return;const n=Math.max(0,Math.round((Date.now()-new Date(t.timer_started_at).getTime())/6e4));await ae.plan.update(e,{actual_minutes:(t.actual_minutes||0)+n,timer_started_at:null,updated_at:at()}),await it()}const kh=366;function xh(e,t){const n=[];let r=e,o=0;for(;r<=t&&oo.status==="done").length,total:r.length})}return t}async function $h(){return(await ae.goal.toArray()).sort((t,n)=>t.start_datet.updated_at[c.id,c.date]));return(await ae.table("log_item").toArray()).filter(c=>((c.content||"")+" "+(c.takeaway||"")+" "+(c.remark||"")).toLowerCase().includes(n)).sort((c,f)=>f.id-c.id).slice(0,t).map(c=>({...c,date:o.get(c.work_log_id)||""}))}async function jh(e,t=4){const n=e.trim().toLowerCase();return n?(await ae.memo.toArray()).filter(o=>((o.title||"")+" "+(o.content||"")).toLowerCase().includes(n)).sort((o,i)=>o.updated_at{await Promise.all([ae.project.clear(),ae.work_log.clear(),r.clear(),ae.attendance.clear(),ae.weekly_note.clear(),ae.setting.clear(),ae.memo.clear(),ae.credential.clear(),o.clear(),c.clear(),i.clear()]),n.project&&n.project.length&&await ae.project.bulkAdd(n.project),n.work_log&&n.work_log.length&&await ae.work_log.bulkAdd(n.work_log),n.log_item&&n.log_item.length&&await r.bulkAdd(n.log_item),n.attendance&&n.attendance.length&&await ae.attendance.bulkAdd(n.attendance),n.weekly_note&&n.weekly_note.length&&await ae.weekly_note.bulkAdd(n.weekly_note),n.setting&&n.setting.length&&await ae.setting.bulkAdd(n.setting),n.memo&&n.memo.length&&await ae.memo.bulkAdd(n.memo),n.credential&&n.credential.length&&await ae.credential.bulkAdd(n.credential),n.transaction&&n.transaction.length&&await o.bulkAdd(n.transaction),n.goal&&n.goal.length&&await c.bulkAdd(n.goal),n.plan&&n.plan.length&&await i.bulkAdd(n.plan)}),await it()}const Bh=["制度学习","产品学习","打杂","项目实操","售后服务"],Uh=["餐饮","交通","住房","通讯","学习","娱乐","其他"],qh=["工资","报销","其他"],Sd="log_categories",Ed="ledger_expense_categories",Td="ledger_income_categories";function Ad(e,t){if(!e)return t.slice();try{const n=JSON.parse(e);if(Array.isArray(n)){const r=n.filter(o=>typeof o=="string"&&o.trim()).map(o=>o.trim());if(r.length)return Array.from(new Set(r))}}catch{}return t.slice()}async function Qr(){return Ad(await xt(Sd,""),Bh)}async function bi(e){await jt(Sd,JSON.stringify(e))}async function zr(e){return Ad(await xt(e==="expense"?Ed:Td,""),e==="expense"?Uh:qh)}async function Ts(e,t){await jt(e==="expense"?Ed:Td,JSON.stringify(t))}const Hh={class:"dialog",role:"dialog","aria-label":"编辑工作记录"},zh={class:"dialog-head"},Wh={key:0,class:"muted dialog-sub"},Gh={class:"dialog-body"},Yh={class:"form-grid"},Jh={class:"field span2"},Xh={key:0,class:"form-error"},Qh={class:"field"},Zh=["value"],ey={class:"field"},ty=["value"],ny={class:"field"},sy={class:"field"},ry={class:"field span2"},oy={class:"field"},ay={class:"field"},iy={class:"dialog-btns"},ly=Rt({__name:"EditLogDialog",props:{open:{type:Boolean},item:{},projects:{},date:{}},emits:["cancel","save"],setup(e,{emit:t}){const n=O([]);Qr().then(ce=>{n.value=ce});const r=e,o=t,i=O(""),c=O(null),f=O("dev"),v=O(null),b=O(""),g=O(""),_=O(0),T=O(0),x=O(""),j=O(null),J=rt(()=>{var S;const ce=r.projects.filter(H=>H.archived!==1),q=(S=r.item)==null?void 0:S.project_id;if(q&&!ce.some(H=>H.id===q)){const H=r.projects.find(G=>G.id===q),Q=ce.slice();return H&&Q.unshift({...H,name:H.name+"(已归档)"}),Q}return ce});function oe(ce){r.open&&ce.key==="Escape"&&o("cancel")}yt(()=>r.open,async ce=>{var q;if(ce){const S=r.item;i.value=(S==null?void 0:S.content)??"",c.value=(S==null?void 0:S.project_id)??null,f.value=(S==null?void 0:S.category)??"dev",v.value=(S==null?void 0:S.minutes)??null,b.value=(S==null?void 0:S.takeaway)??"",g.value=(S==null?void 0:S.remark)??"",_.value=(S==null?void 0:S.is_milestone)??0,T.value=(S==null?void 0:S.needs_followup)??0,x.value="",window.addEventListener("keydown",oe),await ir(),(q=j.value)==null||q.focus()}else window.removeEventListener("keydown",oe)}),Wn(()=>window.removeEventListener("keydown",oe)),yt(i,()=>{x.value&&(x.value="")});function ue(){const ce=i.value.trim();if(!ce){x.value="请填写工作内容";return}if(!r.item||!r.item.id){o("save",{id:0,content:ce,project_id:c.value,category:f.value,minutes:v.value&&v.value>0?v.value:null,takeaway:b.value.trim()||null,remark:g.value.trim()||null,is_milestone:_.value,needs_followup:T.value});return}o("save",{id:r.item.id,content:ce,project_id:c.value,category:f.value,minutes:v.value&&v.value>0?v.value:null,takeaway:b.value.trim()||null,remark:g.value.trim()||null,is_milestone:_.value?1:0,needs_followup:T.value?1:0})}return(ce,q)=>($(),St(Hn,{to:"body"},[Ce(lr,{name:"modal"},{default:ms(()=>[e.open?($(),A("div",{key:0,class:"mask",onClick:q[10]||(q[10]=zt(S=>o("cancel"),["self"]))},[l("div",Hh,[l("div",zh,[l("div",null,[q[11]||(q[11]=l("div",{class:"dialog-title"},"编辑工作记录",-1)),e.date?($(),A("div",Wh,W(e.date),1)):ge("",!0)]),l("button",{class:"icon-btn",title:"关闭",onClick:q[0]||(q[0]=S=>o("cancel"))},[Ce(He,{name:"close",size:16})])]),l("div",Gh,[l("div",Yh,[l("div",Jh,[q[12]||(q[12]=l("label",null,"工作内容(必填)",-1)),Me(l("input",{ref_key:"contentInput",ref:j,class:Ze(["input",{invalid:x.value}]),"onUpdate:modelValue":q[1]||(q[1]=S=>i.value=S),onKeydown:Mt(ue,["enter"])},null,34),[[Ne,i.value]]),x.value?($(),A("div",Xh,W(x.value),1)):ge("",!0)]),l("div",Qh,[q[14]||(q[14]=l("label",null,"所属项目",-1)),Me(l("select",{class:"select","onUpdate:modelValue":q[2]||(q[2]=S=>c.value=S)},[q[13]||(q[13]=l("option",{value:null},"无项目",-1)),($(!0),A(je,null,et(J.value,S=>($(),A("option",{key:S.id,value:S.id},W(S.name),9,Zh))),128))],512),[[fs,c.value]])]),l("div",ey,[q[15]||(q[15]=l("label",null,"工作分类",-1)),Me(l("select",{class:"select","onUpdate:modelValue":q[3]||(q[3]=S=>f.value=S)},[($(!0),A(je,null,et(n.value,S=>($(),A("option",{key:S,value:S},W(S),9,ty))),128))],512),[[fs,f.value]])]),l("div",ny,[q[16]||(q[16]=l("label",null,"耗时(分钟)",-1)),Me(l("input",{class:"input",type:"number",min:"0","onUpdate:modelValue":q[4]||(q[4]=S=>v.value=S),placeholder:"选填"},null,512),[[Ne,v.value,void 0,{number:!0}]])]),l("div",sy,[q[17]||(q[17]=l("label",null,"主要收获",-1)),Me(l("input",{class:"input","onUpdate:modelValue":q[5]||(q[5]=S=>b.value=S),placeholder:"一句话:学到了什么"},null,512),[[Ne,b.value]])]),l("div",ry,[q[18]||(q[18]=l("label",null,"备注",-1)),Me(l("textarea",{class:"textarea","onUpdate:modelValue":q[6]||(q[6]=S=>g.value=S),placeholder:"背景、链接、未决事项(选填)"},null,512),[[Ne,g.value]])]),l("div",oy,[q[19]||(q[19]=l("label",null,"成果标记",-1)),l("button",{class:Ze(["toggle-btn",{on:_.value===1}]),onClick:q[7]||(q[7]=S=>_.value=_.value===1?0:1)},W(_.value===1?"已标记为成果":"未标记"),3)]),l("div",ay,[q[20]||(q[20]=l("label",null,"待跟进",-1)),l("button",{class:Ze(["toggle-btn",{onwarn:T.value===1}]),onClick:q[8]||(q[8]=S=>T.value=T.value===1?0:1)},W(T.value===1?"需要跟进":"无需跟进"),3)])])]),l("div",iy,[l("button",{class:"btn btn-sm",onClick:q[9]||(q[9]=S=>o("cancel"))},"取消"),l("button",{class:"btn btn-primary btn-sm",onClick:ue},"保存修改")])])])):ge("",!0)]),_:1})]))}}),uy=Vt(ly,[["__scopeId","data-v-bd00bec4"]]);function Oo(e){const t=e.split(":");return Number(t[0])*60+Number(t[1])}function cr(e,t,n,r){if(e&&e.kind==="leave")return{status:"leave",label:"请假",makeup:!1,workedMinutes:null};if(am(t))return{status:"rest",label:"休息日",makeup:!1,workedMinutes:null};if(!e||!e.clock_in_at)return r?{status:"none",label:"未打卡",makeup:!1,workedMinutes:null}:{status:"absent",label:"缺勤",makeup:!!(e&&e.kind==="makeup"),workedMinutes:null};const o=e.kind==="makeup";if(!e.clock_out_at)return{status:"incomplete",label:r?"进行中":"未完成",makeup:o,workedMinutes:null};const i=Oo(bn(e.clock_in_at)),c=Oo(bn(e.clock_out_at)),f=Oo(n.work_start),v=Oo(n.work_end);let b="normal";!o&&i>f+n.grace_minutes?b="late":!o&&c{Fo.value=Fo.value.filter(n=>n.id!==t)},2e3)}function dy(){return Fo}const fy={class:"day-panel"},py={class:"dp-head"},vy={class:"dp-date"},my={class:"card sec"},hy={class:"att-grid"},yy={class:"att-cell"},gy={key:0,class:"edit-row"},by={key:1,class:"att-val"},wy={class:"att-cell"},_y={key:0,class:"edit-row"},ky={key:1,class:"att-val"},xy={class:"att-cell"},Cy=["list"],$y=["id"],Sy=["value"],Ey={class:"att-cell"},Ty={class:"att-val status-val"},Ay={key:0,class:"tag"},Py={key:1,class:"muted"},Oy={key:0,class:"att-note muted"},My={class:"att-actions"},Iy=["disabled"],jy=["disabled"],Dy=["disabled"],Ly=["disabled"],Ry={key:0,class:"card sec makeup"},Ky={class:"form-grid"},Ny={class:"field"},Fy={class:"field"},Vy={class:"field span2"},By=["list"],Uy={class:"field span2"},qy={key:0,class:"form-error"},Hy={class:"form-footer"},zy={class:"list-sec"},Wy={class:"sec-head"},Gy={class:"sec-title"},Yy={key:0,class:"empty muted"},Jy={class:"item-main"},Xy={class:"tag"},Qy=["onClick"],Zy={key:0,class:"muted item-meta"},eg={key:1,class:"muted num item-meta"},tg=["onClick"],ng=["onClick"],sg=["onClick"],rg=["onClick"],og={key:0,class:"item-sub"},ag={key:0,class:"muted2"},ig={key:1,class:"muted"},lg={key:1,class:"dp-foot muted num"},ug=Rt({__name:"DayPanel",props:{date:{}},setup(e){const t=O([]);Qr().then(fe=>{t.value=fe});const n=e,r=O(!0),o=O(null),i=O(void 0),c=O([]),f=O([]),v=O(""),b=O([]),g=rt(()=>"loc-list-"+n.date),_=rt(()=>n.date===ot());async function T(){r.value=!0,o.value=await ps(),i.value=await _n(n.date),c.value=await dh(n.date),f.value=await rr(!0),b.value=await ml(),v.value=i.value&&i.value.location||await Zm(),r.value=!1}vn(T),yt(()=>n.date,T),yt(ur,()=>{T()});function x(fe){if(!fe)return"";const h=f.value.find(y=>y.id===fe);return h?h.name:"已删除项目"}const j=rt(()=>o.value?cr(i.value,n.date,o.value,_.value):null),J=rt(()=>c.value.reduce((fe,h)=>fe+(h.minutes||0),0)),oe=O(!1);async function ue(){oe.value||(oe.value=!0,await $d(n.date,v.value),await T(),os(),Ve("上班打卡成功"),oe.value=!1)}async function ce(){oe.value||(oe.value=!0,await rh(n.date),await T(),os(),Ve("下班打卡成功"),oe.value=!1)}async function q(){await eh(n.date,v.value),os(),Ve("地点已更新")}const S=O(!1),H=rt(()=>{var fe;return((fe=i.value)==null?void 0:fe.kind)==="leave"});function Q(){if(i.value&&i.value.clock_in_at){S.value=!0;return}G(!0)}async function G(fe){S.value=!1,await lh(n.date,fe),await T(),os(),Ve(fe?"已标记为休假":"已取消休假")}const re=O(null),M=O(""),E=O(null);yt(re,async fe=>{var h;fe&&(await ir(),(h=E.value)==null||h.focus())});function I(fe){var y,C;const h=fe==="in"?(y=i.value)==null?void 0:y.clock_in_at:(C=i.value)==null?void 0:C.clock_out_at;re.value=fe,M.value=h?bn(h):fe==="in"?"09:00":"18:00"}function ne(){re.value=null}async function Ie(){const fe=re.value;fe&&(re.value=null,M.value&&(await ih(n.date,fe==="in"?"clock_in_at":"clock_out_at",M.value),await T(),os(),Ve("打卡时间已修改")))}const Ae=O(!1),ye=O("09:00"),Pe=O("18:00"),Ue=O(""),de=O(""),ke=O("");function Ee(){de.value=v.value,ke.value="",Ae.value=!Ae.value}async function Le(){if(!ye.value||!Pe.value){ke.value="请填写上班与下班时间";return}await ah(n.date,n.date+"T"+ye.value+":00",n.date+"T"+Pe.value+":00",Ue.value.trim(),de.value),Ae.value=!1,Ue.value="",ke.value="",await T(),os(),Ve("补卡已保存")}const $e=O(null);function pe(fe){$e.value=fe}function De(){$e.value=null}async function ct(fe){fe.id?(await gi(fe.id,{content:fe.content,project_id:fe.project_id,category:fe.category,minutes:fe.minutes,takeaway:fe.takeaway,remark:fe.remark,is_milestone:fe.is_milestone,needs_followup:fe.needs_followup}),Ve("记录已更新")):(await fh(n.date,{content:fe.content,project_id:fe.project_id,category:fe.category,minutes:fe.minutes,takeaway:fe.takeaway,remark:fe.remark}),Ve("记录已添加")),$e.value=null,await T()}async function gt(fe){await gi(fe.id,{is_milestone:fe.is_milestone?0:1}),await T()}async function bt(fe){await gi(fe.id,{needs_followup:fe.needs_followup?0:1}),await T()}const wt=O(null);async function It(){wt.value&&wt.value.id&&await ph(wt.value.id),wt.value=null,await T(),Ve("记录已删除")}return(fe,h)=>($(),A("div",fy,[l("div",py,[l("div",vy,W(un(ud)(e.date)),1)]),l("div",my,[h[19]||(h[19]=l("div",{class:"sec-title"},"出勤信息",-1)),l("div",hy,[l("div",yy,[h[15]||(h[15]=l("label",null,"上班时间",-1)),re.value==="in"?($(),A("div",gy,[Me(l("input",{ref_key:"timeInput",ref:E,type:"time",class:"input time-input","onUpdate:modelValue":h[0]||(h[0]=y=>M.value=y),onKeydown:[Mt(Ie,["enter"]),Mt(ne,["esc"])]},null,544),[[Ne,M.value]]),l("button",{class:"btn btn-primary btn-sm",onClick:Ie},"确认"),l("button",{class:"btn btn-sm",onClick:ne},"取消")])):($(),A("div",by,[l("span",{class:Ze(["num",{"val-empty":!(i.value&&i.value.clock_in_at)}])},W(i.value&&i.value.clock_in_at?un(bn)(i.value.clock_in_at):"未打卡"),3),i.value&&i.value.id?($(),A("button",{key:0,class:"icon-btn",title:"修改上班时间",onClick:h[1]||(h[1]=y=>I("in"))},[Ce(He,{name:"edit",size:13})])):ge("",!0)]))]),l("div",wy,[h[16]||(h[16]=l("label",null,"下班时间",-1)),re.value==="out"?($(),A("div",_y,[Me(l("input",{ref_key:"timeInput",ref:E,type:"time",class:"input time-input","onUpdate:modelValue":h[2]||(h[2]=y=>M.value=y),onKeydown:[Mt(Ie,["enter"]),Mt(ne,["esc"])]},null,544),[[Ne,M.value]]),l("button",{class:"btn btn-primary btn-sm",onClick:Ie},"确认"),l("button",{class:"btn btn-sm",onClick:ne},"取消")])):($(),A("div",ky,[l("span",{class:Ze(["num",{"val-empty":!(i.value&&i.value.clock_out_at)}])},W(i.value&&i.value.clock_out_at?un(bn)(i.value.clock_out_at):"未打卡"),3),i.value&&i.value.id?($(),A("button",{key:0,class:"icon-btn",title:"修改下班时间",onClick:h[3]||(h[3]=y=>I("out"))},[Ce(He,{name:"edit",size:13})])):ge("",!0)]))]),l("div",xy,[h[17]||(h[17]=l("label",null,"上班地点",-1)),Me(l("input",{class:"input","onUpdate:modelValue":h[4]||(h[4]=y=>v.value=y),list:g.value,placeholder:"可直接输入",title:"上班地点,可自由输入",onChange:q},null,40,Cy),[[Ne,v.value]]),l("datalist",{id:g.value},[($(!0),A(je,null,et(b.value,y=>($(),A("option",{key:y,value:y},null,8,Sy))),128))],8,$y)]),l("div",Ey,[h[18]||(h[18]=l("label",null,"考勤状态",-1)),l("div",Ty,[j.value?($(),A(je,{key:0},[l("span",{class:Ze(["dot",j.value.status])},null,2),l("span",null,W(j.value.label),1),i.value&&i.value.kind==="makeup"?($(),A("span",Ay,"补卡")):ge("",!0)],64)):($(),A("span",Py,"--"))])])]),i.value&&i.value.note?($(),A("div",Oy,"补卡说明:"+W(i.value.note),1)):ge("",!0),l("div",My,[_.value&&(!i.value||!i.value.clock_in_at)?($(),A("button",{key:0,class:"btn btn-primary btn-sm",disabled:oe.value,onClick:ue},"上班打卡",8,Iy)):_.value&&i.value&&i.value.clock_in_at&&!i.value.clock_out_at?($(),A("button",{key:1,class:"btn btn-primary btn-sm",disabled:oe.value,onClick:ce},"下班打卡",8,jy)):ge("",!0),!_.value&&(!i.value||!i.value.clock_in_at)?($(),A("button",{key:2,class:"btn btn-sm",onClick:Ee},"补卡")):ge("",!0),H.value?($(),A("button",{key:4,class:"btn btn-sm",disabled:oe.value,onClick:h[5]||(h[5]=y=>G(!1))},"取消休假",8,Ly)):($(),A("button",{key:3,class:"btn btn-sm",disabled:oe.value,onClick:Q},"标记休假",8,Dy))])]),Ae.value?($(),A("div",Ry,[h[24]||(h[24]=l("div",{class:"sec-title"},"补卡登记",-1)),l("div",Ky,[l("div",Ny,[h[20]||(h[20]=l("label",null,"上班时间",-1)),Me(l("input",{type:"time",class:"input","onUpdate:modelValue":h[6]||(h[6]=y=>ye.value=y)},null,512),[[Ne,ye.value]])]),l("div",Fy,[h[21]||(h[21]=l("label",null,"下班时间",-1)),Me(l("input",{type:"time",class:"input","onUpdate:modelValue":h[7]||(h[7]=y=>Pe.value=y)},null,512),[[Ne,Pe.value]])]),l("div",Vy,[h[22]||(h[22]=l("label",null,"上班地点",-1)),Me(l("input",{class:"input",list:g.value,"onUpdate:modelValue":h[8]||(h[8]=y=>de.value=y),placeholder:"可直接输入"},null,8,By),[[Ne,de.value]])]),l("div",Uy,[h[23]||(h[23]=l("label",null,"补卡原因",-1)),Me(l("input",{class:"input","onUpdate:modelValue":h[9]||(h[9]=y=>Ue.value=y),placeholder:"如:外出拜访客户忘记打卡"},null,512),[[Ne,Ue.value]])])]),ke.value?($(),A("div",qy,W(ke.value),1)):ge("",!0),l("div",Hy,[l("button",{class:"btn btn-sm",onClick:h[10]||(h[10]=y=>Ae.value=!1)},"取消"),l("button",{class:"btn btn-primary btn-sm",onClick:Le},"保存补卡")])])):ge("",!0),l("div",zy,[l("div",Wy,[l("span",Gy,"工作记录("+W(c.value.length)+")",1),l("button",{class:"btn btn-primary btn-sm",onClick:De},[Ce(He,{name:"plus",size:14}),h[25]||(h[25]=vt(" 添加记录",-1))])]),!c.value.length&&!r.value?($(),A("div",Yy,"暂无记录")):ge("",!0),($(!0),A(je,null,et(c.value,y=>($(),A("div",{key:y.id,class:"item"},[l("div",Jy,[l("span",Xy,W(un(ta)(y.category)),1),l("span",{class:"item-content",title:"点击编辑",onClick:C=>pe(y)},W(y.content),9,Qy),y.project_id?($(),A("span",Zy,W(x(y.project_id)),1)):ge("",!0),y.minutes?($(),A("span",eg,W(y.minutes)+" 分钟",1)):ge("",!0),h[26]||(h[26]=l("span",{class:"flex1"},null,-1)),l("button",{class:"icon-btn",title:"编辑完整信息",onClick:C=>pe(y)},[Ce(He,{name:"edit",size:14})],8,tg),l("button",{class:Ze(["icon-btn",{active:y.is_milestone===1}]),title:"成果标记",onClick:C=>gt(y)},[Ce(He,{name:"star",size:14})],10,ng),l("button",{class:Ze(["icon-btn",{"active-warn":y.needs_followup===1}]),title:"待跟进",onClick:C=>bt(y)},[Ce(He,{name:"flag",size:14})],10,sg),l("button",{class:"icon-btn",title:"删除",onClick:C=>wt.value=y},[Ce(He,{name:"close",size:14})],8,rg)]),y.takeaway||y.remark?($(),A("div",og,[y.takeaway?($(),A("div",ag,"收获:"+W(y.takeaway),1)):ge("",!0),y.remark?($(),A("div",ig,"备注:"+W(y.remark),1)):ge("",!0)])):ge("",!0)]))),128)),c.value.length?($(),A("div",lg,[vt(" 共 "+W(c.value.length)+" 条事项 ",1),J.value?($(),A(je,{key:0},[vt(" · "+W((J.value/60).toFixed(1))+" 小时",1)],64)):ge("",!0)])):ge("",!0)]),Ce(Dn,{open:!!wt.value,title:"删除确认",message:wt.value?"将删除工作记录「"+wt.value.content+"」。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:h[11]||(h[11]=y=>wt.value=null),onConfirm:It},null,8,["open","message"]),Ce(Dn,{open:S.value,title:"标记休假确认",message:"该日已有打卡记录,标记休假将清空上下班时间。是否继续?","confirm-text":"标记休假",danger:"",onCancel:h[12]||(h[12]=y=>S.value=!1),onConfirm:h[13]||(h[13]=y=>G(!0))},null,8,["open"]),Ce(uy,{open:!!$e.value,item:$e.value,projects:f.value,date:e.date,onCancel:h[14]||(h[14]=y=>$e.value=null),onSave:ct},null,8,["open","item","projects","date"])]))}}),Pd=Vt(ug,[["__scopeId","data-v-4b7234c4"]]),cg={class:"cal-page"},dg={class:"cal-toolbar"},fg={class:"cal-title num"},pg={class:"cal-head"},vg={class:"cal-grid"},mg=["title","onClick"],hg={class:"cal-marks"},yg={key:0,class:"drawer"},gg={class:"drawer-head"},bg={class:"drawer-body"},wg=Rt({__name:"CalendarView",setup(e){const t=O(ot()),n=rt(()=>Number(t.value.slice(0,4))),r=rt(()=>Number(t.value.slice(5,7))-1),o=rt(()=>n.value+" 年 "+(r.value+1)+" 月"),i=["一","二","三","四","五","六","日"],c=rt(()=>{const S=(new Date(n.value,r.value,1).getDay()+6)%7,H=new Date(n.value,r.value+1,0).getDate(),Q=[];for(let G=0;G[I.date,I])),re=H[2],M=new Map;for(const I of c.value){if(!I.inMonth)continue;const ne=cr(G.get(I.date),I.date,Q,I.date===v),Ie=re.filter(Ae=>Ae.date===I.date);M.set(I.date,{status:ne.status,label:ne.label,location:((E=G.get(I.date))==null?void 0:E.location)||"",hasLog:Ie.length>0,hasMilestone:Ie.some(Ae=>Ae.is_milestone===1)})}f.value=M}yt([n,r],b,{immediate:!0}),yt(ur,()=>{b()});function g(q){var S;return((S=f.value.get(q))==null?void 0:S.status)??""}function _(q){const S=f.value.get(q);return S?q+" · "+S.label+(S.location?" · "+S.location:""):q}function T(q){var S;return!!((S=f.value.get(q))!=null&&S.hasLog)}function x(q){var S;return!!((S=f.value.get(q))!=null&&S.hasMilestone)}function j(){t.value=na(t.value,-1)}function J(){t.value=na(t.value,1)}function oe(){t.value=ot()}const ue=O(null);function ce(q,S){S&&(ue.value=q)}return yt(Fi,q=>{q&&(t.value=q,ue.value=q,Fi.value=null)},{immediate:!0}),(q,S)=>($(),A("div",cg,[l("div",dg,[l("button",{class:"icon-btn",onClick:j},[Ce(He,{name:"chevron-left",size:16})]),l("span",fg,W(o.value),1),l("button",{class:"icon-btn",onClick:J},[Ce(He,{name:"chevron-right",size:16})]),l("button",{class:"btn btn-sm",onClick:oe},"回到今天")]),l("div",pg,[($(),A(je,null,et(i,H=>l("span",{key:H,class:"cal-week muted"},W(H),1)),64))]),l("div",vg,[($(!0),A(je,null,et(c.value,(H,Q)=>($(),A("button",{key:Q,class:Ze(["cal-cell",{blank:!H.inMonth,weekend:H.weekend,selected:ue.value===H.date}]),title:H.inMonth?_(H.date):void 0,onClick:G=>ce(H.date,H.inMonth)},[H.inMonth?($(),A(je,{key:0},[l("span",{class:Ze(["daynum num",{today:H.date===un(v)}])},W(Number(H.date.slice(8,10))),3),l("span",hg,[g(H.date)?($(),A("span",{key:0,class:Ze(["dot",g(H.date)])},null,2)):ge("",!0),T(H.date)?($(),St(He,{key:1,name:"check-circle",size:12,class:"mark-log"})):ge("",!0),x(H.date)?($(),St(He,{key:2,name:"star",size:12,class:"mark-star"})):ge("",!0)])],64)):ge("",!0)],10,mg))),128))]),Ce(lr,{name:"drawer"},{default:ms(()=>[ue.value?($(),A("aside",yg,[l("div",gg,[S[1]||(S[1]=l("span",{class:"drawer-title"},"当日详情",-1)),l("button",{class:"icon-btn",onClick:S[0]||(S[0]=H=>ue.value=null)},[Ce(He,{name:"close",size:16})])]),l("div",bg,[Ce(Pd,{date:ue.value},null,8,["date"])])])):ge("",!0)]),_:1})]))}}),_g=Vt(wg,[["__scopeId","data-v-2404dfbe"]]),kg="modulepreload",xg=function(e,t){return new URL(e,t).href},Fu={},Od=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){const c=document.getElementsByTagName("link"),f=document.querySelector("meta[property=csp-nonce]"),v=(f==null?void 0:f.nonce)||(f==null?void 0:f.getAttribute("nonce"));o=Promise.allSettled(n.map(b=>{if(b=xg(b,r),b in Fu)return;Fu[b]=!0;const g=b.endsWith(".css"),_=g?'[rel="stylesheet"]':"";if(!!r)for(let j=c.length-1;j>=0;j--){const J=c[j];if(J.href===b&&(!g||J.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${b}"]${_}`))return;const x=document.createElement("link");if(x.rel=g?"stylesheet":kg,g||(x.as="script"),x.crossOrigin="",x.href=b,v&&x.setAttribute("nonce",v),document.head.appendChild(x),g)return new Promise((j,J)=>{x.addEventListener("load",j),x.addEventListener("error",()=>J(new Error(`Unable to preload CSS for ${b}`)))})}))}function i(c){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=c,window.dispatchEvent(f),!f.defaultPrevented)throw c}return o.then(c=>{for(const f of c||[])f.status==="rejected"&&i(f.reason);return t().catch(i)})};/*! Capacitor: https://capacitorjs.com/ - MIT License */const Cg=e=>{const t=new Map;t.set("web",{name:"web"});const n=e.CapacitorPlatforms||{currentPlatform:{name:"web"},platforms:t},r=(i,c)=>{n.platforms.set(i,c)},o=i=>{n.platforms.has(i)&&(n.currentPlatform=n.platforms.get(i))};return n.addPlatform=r,n.setPlatform=o,n},$g=e=>e.CapacitorPlatforms=Cg(e),Md=$g(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});Md.addPlatform;Md.setPlatform;var or;(function(e){e.Unimplemented="UNIMPLEMENTED",e.Unavailable="UNAVAILABLE"})(or||(or={}));class wi extends Error{constructor(t,n,r){super(t),this.message=t,this.code=n,this.data=r}}const Sg=e=>{var t,n;return e!=null&&e.androidBridge?"android":!((n=(t=e==null?void 0:e.webkit)===null||t===void 0?void 0:t.messageHandlers)===null||n===void 0)&&n.bridge?"ios":"web"},Eg=e=>{var t,n,r,o,i;const c=e.CapacitorCustomPlatform||null,f=e.Capacitor||{},v=f.Plugins=f.Plugins||{},b=e.CapacitorPlatforms,g=()=>c!==null?c.name:Sg(e),_=((t=b==null?void 0:b.currentPlatform)===null||t===void 0?void 0:t.getPlatform)||g,T=()=>_()!=="web",x=((n=b==null?void 0:b.currentPlatform)===null||n===void 0?void 0:n.isNativePlatform)||T,j=G=>{const re=S.get(G);return!!(re!=null&&re.platforms.has(_())||ue(G))},J=((r=b==null?void 0:b.currentPlatform)===null||r===void 0?void 0:r.isPluginAvailable)||j,oe=G=>{var re;return(re=f.PluginHeaders)===null||re===void 0?void 0:re.find(M=>M.name===G)},ue=((o=b==null?void 0:b.currentPlatform)===null||o===void 0?void 0:o.getPluginHeader)||oe,ce=G=>e.console.error(G),q=(G,re,M)=>Promise.reject(`${M} does not have an implementation of "${re}".`),S=new Map,H=(G,re={})=>{const M=S.get(G);if(M)return console.warn(`Capacitor plugin "${G}" already registered. Cannot register plugins twice.`),M.proxy;const E=_(),I=ue(G);let ne;const Ie=async()=>(!ne&&E in re?ne=typeof re[E]=="function"?ne=await re[E]():ne=re[E]:c!==null&&!ne&&"web"in re&&(ne=typeof re.web=="function"?ne=await re.web():ne=re.web),ne),Ae=(Ee,Le)=>{var $e,pe;if(I){const De=I==null?void 0:I.methods.find(ct=>Le===ct.name);if(De)return De.rtype==="promise"?ct=>f.nativePromise(G,Le.toString(),ct):(ct,gt)=>f.nativeCallback(G,Le.toString(),ct,gt);if(Ee)return($e=Ee[Le])===null||$e===void 0?void 0:$e.bind(Ee)}else{if(Ee)return(pe=Ee[Le])===null||pe===void 0?void 0:pe.bind(Ee);throw new wi(`"${G}" plugin is not implemented on ${E}`,or.Unimplemented)}},ye=Ee=>{let Le;const $e=(...pe)=>{const De=Ie().then(ct=>{const gt=Ae(ct,Ee);if(gt){const bt=gt(...pe);return Le=bt==null?void 0:bt.remove,bt}else throw new wi(`"${G}.${Ee}()" is not implemented on ${E}`,or.Unimplemented)});return Ee==="addListener"&&(De.remove=async()=>Le()),De};return $e.toString=()=>`${Ee.toString()}() { [capacitor code] }`,Object.defineProperty($e,"name",{value:Ee,writable:!1,configurable:!1}),$e},Pe=ye("addListener"),Ue=ye("removeListener"),de=(Ee,Le)=>{const $e=Pe({eventName:Ee},Le),pe=async()=>{const ct=await $e;Ue({eventName:Ee,callbackId:ct},Le)},De=new Promise(ct=>$e.then(()=>ct({remove:pe})));return De.remove=async()=>{console.warn("Using addListener() without 'await' is deprecated."),await pe()},De},ke=new Proxy({},{get(Ee,Le){switch(Le){case"$$typeof":return;case"toJSON":return()=>({});case"addListener":return I?de:Pe;case"removeListener":return Ue;default:return ye(Le)}}});return v[G]=ke,S.set(G,{name:G,proxy:ke,platforms:new Set([...Object.keys(re),...I?[E]:[]])}),ke},Q=((i=b==null?void 0:b.currentPlatform)===null||i===void 0?void 0:i.registerPlugin)||H;return f.convertFileSrc||(f.convertFileSrc=G=>G),f.getPlatform=_,f.handleError=ce,f.isNativePlatform=x,f.isPluginAvailable=J,f.pluginMethodNoop=q,f.registerPlugin=Q,f.Exception=wi,f.DEBUG=!!f.DEBUG,f.isLoggingEnabled=!!f.isLoggingEnabled,f.platform=f.getPlatform(),f.isNative=f.isNativePlatform(),f},Tg=e=>e.Capacitor=Eg(e),ar=Tg(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),Id=ar.registerPlugin;ar.Plugins;class jd{constructor(t){this.listeners={},this.retainedEventArguments={},this.windowListeners={},t&&(console.warn(`Capacitor WebPlugin "${t.name}" config object was deprecated in v3 and will be removed in v4.`),this.config=t)}addListener(t,n){let r=!1;this.listeners[t]||(this.listeners[t]=[],r=!0),this.listeners[t].push(n);const i=this.windowListeners[t];i&&!i.registered&&this.addWindowListener(i),r&&this.sendRetainedArgumentsForEvent(t);const c=async()=>this.removeListener(t,n);return Promise.resolve({remove:c})}async removeAllListeners(){this.listeners={};for(const t in this.windowListeners)this.removeWindowListener(this.windowListeners[t]);this.windowListeners={}}notifyListeners(t,n,r){const o=this.listeners[t];if(!o){if(r){let i=this.retainedEventArguments[t];i||(i=[]),i.push(n),this.retainedEventArguments[t]=i}return}o.forEach(i=>i(n))}hasListeners(t){return!!this.listeners[t].length}registerWindowListener(t,n){this.windowListeners[n]={registered:!1,windowEventName:t,pluginEventName:n,handler:r=>{this.notifyListeners(n,r)}}}unimplemented(t="not implemented"){return new ar.Exception(t,or.Unimplemented)}unavailable(t="not available"){return new ar.Exception(t,or.Unavailable)}async removeListener(t,n){const r=this.listeners[t];if(!r)return;const o=r.indexOf(n);this.listeners[t].splice(o,1),this.listeners[t].length||this.removeWindowListener(this.windowListeners[t])}addWindowListener(t){window.addEventListener(t.windowEventName,t.handler),t.registered=!0}removeWindowListener(t){t&&(window.removeEventListener(t.windowEventName,t.handler),t.registered=!1)}sendRetainedArgumentsForEvent(t){const n=this.retainedEventArguments[t];n&&(delete this.retainedEventArguments[t],n.forEach(r=>{this.notifyListeners(t,r)}))}}const Vu=e=>encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),Bu=e=>e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent);class Ag extends jd{async getCookies(){const t=document.cookie,n={};return t.split(";").forEach(r=>{if(r.length<=0)return;let[o,i]=r.replace(/=/,"CAP_COOKIE").split("CAP_COOKIE");o=Bu(o).trim(),i=Bu(i).trim(),n[o]=i}),n}async setCookie(t){try{const n=Vu(t.key),r=Vu(t.value),o=`; expires=${(t.expires||"").replace("expires=","")}`,i=(t.path||"/").replace("path=",""),c=t.url!=null&&t.url.length>0?`domain=${t.url}`:"";document.cookie=`${n}=${r||""}${o}; path=${i}; ${c};`}catch(n){return Promise.reject(n)}}async deleteCookie(t){try{document.cookie=`${t.key}=; Max-Age=0`}catch(n){return Promise.reject(n)}}async clearCookies(){try{const t=document.cookie.split(";")||[];for(const n of t)document.cookie=n.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}catch(t){return Promise.reject(t)}}async clearAllCookies(){try{await this.clearCookies()}catch(t){return Promise.reject(t)}}}Id("CapacitorCookies",{web:()=>new Ag});const Pg=async e=>new Promise((t,n)=>{const r=new FileReader;r.onload=()=>{const o=r.result;t(o.indexOf(",")>=0?o.split(",")[1]:o)},r.onerror=o=>n(o),r.readAsDataURL(e)}),Og=(e={})=>{const t=Object.keys(e);return Object.keys(e).map(o=>o.toLocaleLowerCase()).reduce((o,i,c)=>(o[i]=e[t[c]],o),{})},Mg=(e,t=!0)=>e?Object.entries(e).reduce((r,o)=>{const[i,c]=o;let f,v;return Array.isArray(c)?(v="",c.forEach(b=>{f=t?encodeURIComponent(b):b,v+=`${i}=${f}&`}),v.slice(0,-1)):(f=t?encodeURIComponent(c):c,v=`${i}=${f}`),`${r}&${v}`},"").substr(1):null,Ig=(e,t={})=>{const n=Object.assign({method:e.method||"GET",headers:e.headers},t),o=Og(e.headers)["content-type"]||"";if(typeof e.data=="string")n.body=e.data;else if(o.includes("application/x-www-form-urlencoded")){const i=new URLSearchParams;for(const[c,f]of Object.entries(e.data||{}))i.set(c,f);n.body=i.toString()}else if(o.includes("multipart/form-data")||e.data instanceof FormData){const i=new FormData;if(e.data instanceof FormData)e.data.forEach((f,v)=>{i.append(v,f)});else for(const f of Object.keys(e.data))i.append(f,e.data[f]);n.body=i;const c=new Headers(n.headers);c.delete("content-type"),n.headers=c}else(o.includes("application/json")||typeof e.data=="object")&&(n.body=JSON.stringify(e.data));return n};class jg extends jd{async request(t){const n=Ig(t,t.webFetchExtra),r=Mg(t.params,t.shouldEncodeUrlParams),o=r?`${t.url}?${r}`:t.url,i=await fetch(o,n),c=i.headers.get("content-type")||"";let{responseType:f="text"}=i.ok?t:{};c.includes("application/json")&&(f="json");let v,b;switch(f){case"arraybuffer":case"blob":b=await i.blob(),v=await Pg(b);break;case"json":v=await i.json();break;case"document":case"text":default:v=await i.text()}const g={};return i.headers.forEach((_,T)=>{g[T]=_}),{data:v,headers:g,status:i.status,url:i.url}}async get(t){return this.request(Object.assign(Object.assign({},t),{method:"GET"}))}async post(t){return this.request(Object.assign(Object.assign({},t),{method:"POST"}))}async put(t){return this.request(Object.assign(Object.assign({},t),{method:"PUT"}))}async patch(t){return this.request(Object.assign(Object.assign({},t),{method:"PATCH"}))}async delete(t){return this.request(Object.assign(Object.assign({},t),{method:"DELETE"}))}}Id("CapacitorHttp",{web:()=>new jg});async function Sa(e,t){const n=window;if(n.electronAPI&&n.electronAPI.saveFile){const c=await n.electronAPI.saveFile(e,t);return c&&c.saved?c.path:""}if(ar.isNativePlatform()){const{Filesystem:c,Directory:f,Encoding:v}=await Od(async()=>{const{Filesystem:b,Directory:g,Encoding:_}=await import("./index-CJCBehez.js");return{Filesystem:b,Directory:g,Encoding:_}},[],import.meta.url);try{return(await c.writeFile({path:e,data:t,directory:f.Documents,encoding:v.UTF8,recursive:!0})).uri}catch{return(await c.writeFile({path:e,data:t,directory:f.Cache,encoding:v.UTF8,recursive:!0})).uri}}const r=new Blob([t],{type:"text/plain;charset=utf-8"}),o=URL.createObjectURL(r),i=document.createElement("a");return i.href=o,i.download=e,i.click(),window.setTimeout(()=>URL.revokeObjectURL(o),1e4),""}const Dg=Object.freeze(Object.defineProperty({__proto__:null,downloadText:Sa},Symbol.toStringTag,{value:"Module"})),Lg={class:"detail-page"},Rg={class:"detail-toolbar"},Kg=["value"],Ng=["disabled"],Fg={class:"export-row"},Vg={class:"seg"},Bg=["disabled"],Ug=Rt({__name:"TodayView",setup(e){const t=O(ot()),n=rt(()=>t.value===ot());function r(){t.value=Ft(t.value,-1)}function o(){t.value=Ft(t.value,1)}function i(){t.value=ot()}const c=O("day"),f=O(ot()),v=O(ot()),b=O(!1);function g(){if(c.value==="day")return{start:f.value,end:f.value,label:f.value};if(c.value==="week"){const x=Qs(f.value);return{start:x,end:Ft(x,6),label:x+"_"+Ft(x,6)}}if(c.value==="month"){const x=f.value.slice(0,4),j=f.value.slice(5,7),J=new Date(Number(x),Number(j),0).getDate();return{start:x+"-"+j+"-01",end:x+"-"+j+"-"+J,label:x+"-"+j}}return{start:f.value,end:v.value,label:f.value+"_"+v.value}}async function _(){if(!b.value){b.value=!0;try{const{start:x,end:j,label:J}=g(),[oe,ue,ce,q]=await Promise.all([ps(),Jr(x,j),Xr(x,j),rr(!0)]),S=new Map(q.map(M=>[M.id,M.name])),H=["# 工作详情 "+J,""],Q=["周日","周一","周二","周三","周四","周五","周六"];let G=x,re=0;for(;G<=j&&re<400;){const M=ce.filter(I=>I.date===G),E=ue.find(I=>I.date===G);if(E||M.length){if(H.push("## "+G+" "+Q[new Date(G+"T00:00:00").getDay()],""),E&&(E.clock_in_at||E.kind==="makeup")){const I=cr(E,G,oe,G===ot()),ne=[bn(E.clock_in_at),"–",bn(E.clock_out_at),"·",I.label];E.location&&ne.push("· 地点:"+E.location),H.push("考勤:"+ne.join(" "),"")}for(const I of M){const ne=I.project_id&&S.get(I.project_id)||"",Ie="- 【"+ta(I.category)+"】"+I.content+(I.minutes?"("+I.minutes+" 分钟)":"")+(ne?" @"+ne:"");H.push(Ie),I.takeaway&&H.push(" - 收获:"+I.takeaway),I.needs_followup===1&&I.remark?H.push(" - 待跟进:"+I.remark):I.remark&&H.push(" - 备注:"+I.remark)}H.push("")}G=Ft(G,1),re++}await Sa("工作详情_"+J+".md",H.join(` -`)),Ve("已导出 Markdown")}finally{b.value=!1}}}function T(x){const j=x.target.value;j&&(t.value=j)}return(x,j)=>($(),A("div",Lg,[l("div",Rg,[l("button",{class:"icon-btn",title:"前一天",onClick:r},[Ce(He,{name:"chevron-left",size:16})]),l("span",{class:Ze(["date-title num",{"is-today":n.value}])},W(un(ud)(t.value)),3),l("button",{class:"icon-btn",title:"后一天",onClick:o},[Ce(He,{name:"chevron-right",size:16})]),l("input",{type:"date",class:"input w-date",value:t.value,onChange:T},null,40,Kg),l("button",{class:"btn btn-sm",disabled:n.value,onClick:i},"回到今天",8,Ng)]),l("div",Fg,[j[6]||(j[6]=l("span",{class:"muted exp-label"},"导出工作详情",-1)),l("div",Vg,[l("button",{class:Ze(["seg-btn",{active:c.value==="day"}]),onClick:j[0]||(j[0]=J=>c.value="day")},"当日",2),l("button",{class:Ze(["seg-btn",{active:c.value==="week"}]),onClick:j[1]||(j[1]=J=>c.value="week")},"当周",2),l("button",{class:Ze(["seg-btn",{active:c.value==="month"}]),onClick:j[2]||(j[2]=J=>c.value="month")},"当月",2),l("button",{class:Ze(["seg-btn",{active:c.value==="custom"}]),onClick:j[3]||(j[3]=J=>c.value="custom")},"自定义",2)]),c.value!=="day"?Me(($(),A("input",{key:0,class:"input w-exp",type:"date","onUpdate:modelValue":j[4]||(j[4]=J=>f.value=J)},null,512)),[[Ne,f.value]]):ge("",!0),c.value==="custom"?Me(($(),A("input",{key:1,class:"input w-exp",type:"date","onUpdate:modelValue":j[5]||(j[5]=J=>v.value=J)},null,512)),[[Ne,v.value]]):ge("",!0),l("button",{class:"btn btn-sm",disabled:b.value,onClick:_},"导出 Markdown",8,Bg)]),Ce(Pd,{date:t.value},null,8,["date"])]))}}),qg=Vt(Ug,[["__scopeId","data-v-799fe8de"]]),Hg={class:"plan-page"},zg={class:"card sec plan-head"},Wg={class:"nav-row"},Gg={class:"date-box"},Yg={class:"date-main num"},Jg={class:"muted date-sub num"},Xg={class:"muted sum-line"},Qg={class:"goals-sec"},Zg={class:"goals-head"},eb={key:0,class:"muted goals-empty"},tb={class:"goal-main"},nb={class:"goal-line"},sb={class:"tag"},rb={class:"goal-name"},ob={class:"muted num goal-range"},ab={class:"goal-bar"},ib={class:"muted num goal-meta"},lb={class:"goal-ops"},ub=["onClick"],cb=["onClick"],db={class:"plan-list"},fb={key:0,class:"card sec empty muted"},pb={class:"pi-time num"},vb={class:"muted"},mb={class:"pi-main"},hb={class:"pi-title"},yb={class:"tag"},gb={key:0,class:"tag tag-goal"},bb={key:1,class:"state-done"},wb={key:2,class:"state-skip"},_b={key:0,class:"muted pi-note"},kb={class:"muted pi-meta num"},xb={key:0,class:"timer-live"},Cb={class:"pi-ops"},$b=["onClick"],Sb=["onClick"],Eb=["onClick"],Tb=["onClick"],Ab=["onClick"],Pb=["onClick"],Ob={class:"dialog",role:"dialog","aria-label":"计划"},Mb={class:"dialog-head"},Ib={class:"dialog-title"},jb={class:"dialog-body"},Db={class:"form-row"},Lb={class:"form-row"},Rb=["value"],Kb={class:"form-row two"},Nb={class:"form-row"},Fb={key:0,class:"form-error"},Vb={class:"dialog-btns"},Bb={class:"dialog",role:"dialog","aria-label":"长期计划"},Ub={class:"dialog-head"},qb={class:"dialog-title"},Hb={class:"dialog-body"},zb={class:"form-row"},Wb={class:"form-row"},Gb=["value"],Yb={class:"form-row two"},Jb={class:"form-row"},Xb={key:0,class:"form-error"},Qb={class:"dialog-btns"},Zb=Rt({__name:"PlanView",setup(e){const t=O([]),n=O({}),r=O(!1),o=O(null),i=O(""),c=O("学习"),f=O(ot()),v=O(Ft(ot(),6)),b=O(""),g=O(""),_=O(null);function T(){o.value=null,i.value="",c.value="学习",f.value=ot(),v.value=Ft(ot(),6),b.value="",g.value="",r.value=!0}function x(y){o.value=y,i.value=y.title,c.value=y.kind,f.value=y.start_date,v.value=y.end_date,b.value=y.note||"",g.value="",r.value=!0}async function j(){if(!i.value.trim()){g.value="请填写计划名称";return}if(v.valueoe.value===ot());async function Q(){ce.value=!0;const[y,C,R]=await Promise.all([hh(oe.value),$h(),Ch()]);ue.value=y,t.value=C;const F={};for(const le of R)F[String(le.goalId)]={done:le.done,total:le.total};n.value=F,ce.value=!1}yt(oe,Q),yt(ur,Q),vn(()=>{Q(),S=window.setInterval(()=>{q.value=Date.now()},3e4)}),Wn(()=>{S&&window.clearInterval(S)});function G(){oe.value=Ft(oe.value,-1)}function re(){oe.value=Ft(oe.value,1)}function M(){oe.value=ot()}const E=rt(()=>{const y=ue.value.length,C=ue.value.filter(ee=>ee.status==="done").length,R=ue.value.reduce((ee,P)=>ee+I(P),0),F=ue.value.reduce((ee,P)=>ee+(P.actual_minutes||0),0),le=Ie.value;if(le){const ee=ue.value.find(P=>P.id===le);ee&&F+elapsedMinutes(ee)}return{total:y,done:C,plannedMin:R,actualMin:F}});function I(y){const[C,R]=y.start_time.split(":").map(Number),[F,le]=y.end_time.split(":").map(Number);return Math.max(0,F*60+le-(C*60+R))}function ne(y){return y<60?y+" 分钟":Math.floor(y/60)+" 小时 "+y%60+" 分"}const Ie=rt(()=>{const y=ue.value.find(C=>!!C.timer_started_at);return y?y.id:null});function Ae(y){if(!y.timer_started_at)return y.actual_minutes||0;const C=Math.max(0,Math.round((q.value-new Date(y.timer_started_at).getTime())/6e4));return(y.actual_minutes||0)+C}async function ye(y){y.timer_started_at?(await yl(y.id),Ve("已停止计时:"+y.title)):(await _h(y.id),Ve("开始计时:"+y.title)),await Q()}async function Pe(y,C){await wh(y.id,C),await Q()}const Ue=O(!1),de=O(null),ke=O(""),Ee=O("学习"),Le=O("09:00"),$e=O("10:00"),pe=O(""),De=O(""),ct=["学习","健身","自律","工作","阅读","其他"];function gt(){de.value=null,ke.value="",Ee.value="学习",Le.value="09:00",$e.value="10:00",pe.value="",De.value="",Ue.value=!0}function bt(y){de.value=y.id,ke.value=y.title,Ee.value=y.kind,Le.value=y.start_time,$e.value=y.end_time,pe.value=y.note||"",De.value="",Ue.value=!0}async function wt(){if(!ke.value.trim()){De.value="请填写计划内容";return}if($e.value<=Le.value){De.value="结束时间需晚于开始时间";return}de.value?(await gh(de.value,{title:ke.value.trim(),kind:Ee.value,start_time:Le.value,end_time:$e.value,note:pe.value}),Ve("计划已更新")):(await yh({date:oe.value,start_time:Le.value,end_time:$e.value,title:ke.value,kind:Ee.value,note:pe.value}),Ve("计划已添加")),Ue.value=!1,await Q()}async function It(y){await bh(y.id),Ve("已删除"),await Q()}const fe=["周日","周一","周二","周三","周四","周五","周六"];function h(y){return fe[Ks(y).getDay()]}return(y,C)=>($(),A("div",Hg,[l("div",zg,[l("div",Wg,[l("button",{class:"icon-btn",onClick:G},[Ce(He,{name:"chevron-left",size:16})]),l("div",Gg,[l("span",Yg,W(oe.value.slice(5))+" "+W(h(oe.value)),1),l("span",Jg,W(oe.value),1)]),l("button",{class:"icon-btn",onClick:re},[Ce(He,{name:"chevron-right",size:16})]),l("button",{class:Ze(["btn btn-sm",{"btn-primary":!H.value}]),onClick:M},"今天",2),C[18]||(C[18]=l("span",{class:"flex1"},null,-1)),l("button",{class:"btn btn-primary btn-sm",onClick:gt},[Ce(He,{name:"plus",size:14}),C[17]||(C[17]=vt(" 添加计划",-1))])]),l("div",Xg,[vt(" 共 "+W(E.value.total)+" 项 · 完成 "+W(E.value.done)+" 项 · 计划 "+W(ne(E.value.plannedMin))+" · 实际投入 "+W(ne(E.value.actualMin))+" ",1),Ie.value?($(),A(je,{key:0},[C[19]||(C[19]=vt(" · ",-1)),C[20]||(C[20]=l("span",{class:"timer-live"},"计时中",-1))],64)):ge("",!0)])]),l("div",Qg,[l("div",Zg,[C[22]||(C[22]=l("span",{class:"goals-title"},"长期计划",-1)),l("button",{class:"btn btn-sm",onClick:T},[Ce(He,{name:"plus",size:14}),C[21]||(C[21]=vt(" 新建长期计划",-1))])]),t.value.length?ge("",!0):($(),A("div",eb,"暂无长期计划。可以创建一个跨越多天的目标(如「产品文档学习」),系统会自动生成每天的打卡任务。")),($(!0),A(je,null,et(t.value,R=>($(),A("div",{key:R.id,class:"card sec goal-card"},[l("div",tb,[l("div",nb,[l("span",sb,W(R.kind),1),l("span",rb,W(R.title),1),l("span",ob,W(R.start_date.slice(5))+" ~ "+W(R.end_date.slice(5)),1)]),l("div",ab,[l("span",{class:"goal-bar-fill",style:Un({width:(n.value[String(R.id)]?Math.round(n.value[String(R.id)].done/Math.max(1,n.value[String(R.id)].total)*100):0)+"%"})},null,4)]),l("div",ib,[vt(W(n.value[String(R.id)]?n.value[String(R.id)].done+"/"+n.value[String(R.id)].total+" 天已完成":"0/"+(n.value[String(R.id)]?n.value[String(R.id)].total:0)+" 天")+" ",1),R.note?($(),A(je,{key:0},[vt(" · "+W(R.note),1)],64)):ge("",!0)])]),l("div",lb,[l("button",{class:"icon-btn",title:"编辑",onClick:F=>x(R)},[Ce(He,{name:"edit",size:14})],8,ub),l("button",{class:"icon-btn",title:"删除",onClick:F=>_.value=R},[Ce(He,{name:"close",size:14})],8,cb)])]))),128))]),l("div",db,[!ce.value&&!ue.value.length?($(),A("div",fb," 今天还没有计划,点右上角「添加计划」开始规划:学习、健身、自律…… ")):ge("",!0),($(!0),A(je,null,et(ue.value,R=>($(),A("div",{key:R.id,class:Ze(["card sec plan-item",{done:R.status==="done",skip:R.status==="skip",running:!!R.timer_started_at}])},[l("div",pb,[vt(W(R.start_time),1),l("span",vb," - "+W(R.end_time),1)]),l("div",mb,[l("div",hb,[l("span",yb,W(R.kind),1),R.goal_id?($(),A("span",gb,"长期")):ge("",!0),l("span",{class:Ze(["pi-text",{strike:R.status==="done"}])},W(R.title),3),R.status==="done"?($(),A("span",bb,"已完成")):R.status==="skip"?($(),A("span",wb,"已跳过")):ge("",!0)]),R.note?($(),A("div",_b,W(R.note),1)):ge("",!0),l("div",kb,[R.timer_started_at?($(),A("span",xb,"计时中 · 已 "+W(Ae(R))+" 分钟",1)):R.actual_minutes>0?($(),A(je,{key:1},[vt("实际投入 "+W(R.actual_minutes)+" 分钟",1)],64)):ge("",!0)])]),l("div",Cb,[R.status!=="done"?($(),A("button",{key:0,class:Ze(["btn btn-xs",{"timer-on":!!R.timer_started_at}]),onClick:F=>ye(R)},W(R.timer_started_at?"停止计时":"计时"),11,$b)):ge("",!0),R.status!=="done"?($(),A("button",{key:1,class:"btn btn-xs",onClick:F=>Pe(R,"done")},"完成",8,Sb)):ge("",!0),R.status==="todo"?($(),A("button",{key:2,class:"btn btn-xs",onClick:F=>Pe(R,"skip")},"跳过",8,Eb)):ge("",!0),R.status!=="todo"?($(),A("button",{key:3,class:"btn btn-xs",onClick:F=>Pe(R,"todo")},"恢复",8,Tb)):ge("",!0),l("button",{class:"icon-btn",title:"编辑",onClick:F=>bt(R)},[Ce(He,{name:"edit",size:14})],8,Ab),l("button",{class:"icon-btn",title:"删除",onClick:F=>It(R)},[Ce(He,{name:"close",size:14})],8,Pb)])],2))),128))]),($(),St(Hn,{to:"body"},[Ue.value?($(),A("div",{key:0,class:"fixed-mask",onClick:C[7]||(C[7]=zt(R=>Ue.value=!1,["self"]))},[l("div",Ob,[l("div",Mb,[l("span",Ib,W(de.value?"编辑计划":"添加计划"),1),l("button",{class:"icon-btn",onClick:C[0]||(C[0]=R=>Ue.value=!1)},[Ce(He,{name:"close",size:16})])]),l("div",jb,[l("div",Db,[C[23]||(C[23]=l("label",null,"计划内容(学什么、做什么)",-1)),Me(l("input",{class:"input","onUpdate:modelValue":C[1]||(C[1]=R=>ke.value=R),placeholder:"如:产品文档第三章 / 晨跑 5 公里",onKeydown:Mt(wt,["enter"])},null,544),[[Ne,ke.value]])]),l("div",Lb,[C[24]||(C[24]=l("label",null,"类别",-1)),Me(l("select",{class:"select","onUpdate:modelValue":C[2]||(C[2]=R=>Ee.value=R)},[($(),A(je,null,et(ct,R=>l("option",{key:R,value:R},W(R),9,Rb)),64))],512),[[fs,Ee.value]])]),l("div",Kb,[l("div",null,[C[25]||(C[25]=l("label",null,"开始时间",-1)),Me(l("input",{class:"input",type:"time","onUpdate:modelValue":C[3]||(C[3]=R=>Le.value=R)},null,512),[[Ne,Le.value]])]),l("div",null,[C[26]||(C[26]=l("label",null,"结束时间",-1)),Me(l("input",{class:"input",type:"time","onUpdate:modelValue":C[4]||(C[4]=R=>$e.value=R)},null,512),[[Ne,$e.value]])])]),l("div",Nb,[C[27]||(C[27]=l("label",null,"备注(选填)",-1)),Me(l("input",{class:"input","onUpdate:modelValue":C[5]||(C[5]=R=>pe.value=R),placeholder:"目标、资料、提醒等",onKeydown:Mt(wt,["enter"])},null,544),[[Ne,pe.value]])]),De.value?($(),A("div",Fb,W(De.value),1)):ge("",!0)]),l("div",Vb,[l("button",{class:"btn btn-sm",onClick:C[6]||(C[6]=R=>Ue.value=!1)},"取消"),l("button",{class:"btn btn-primary btn-sm",onClick:wt},W(de.value?"保存":"添加"),1)])])])):ge("",!0)])),($(),St(Hn,{to:"body"},[r.value?($(),A("div",{key:0,class:"fixed-mask",onClick:C[15]||(C[15]=zt(R=>r.value=!1,["self"]))},[l("div",Bb,[l("div",Ub,[l("span",qb,W(o.value?"编辑长期计划":"新建长期计划"),1),l("button",{class:"icon-btn",onClick:C[8]||(C[8]=R=>r.value=!1)},[Ce(He,{name:"close",size:16})])]),l("div",Hb,[l("div",zb,[C[28]||(C[28]=l("label",null,"计划名称(落实为每天一条任务)",-1)),Me(l("input",{class:"input","onUpdate:modelValue":C[9]||(C[9]=R=>i.value=R),placeholder:"如:产品文档学习 / 健身月计划"},null,512),[[Ne,i.value]])]),l("div",Wb,[C[29]||(C[29]=l("label",null,"类别",-1)),Me(l("select",{class:"select","onUpdate:modelValue":C[10]||(C[10]=R=>c.value=R)},[($(),A(je,null,et(ct,R=>l("option",{key:R,value:R},W(R),9,Gb)),64))],512),[[fs,c.value]])]),l("div",Yb,[l("div",null,[C[30]||(C[30]=l("label",null,"开始日期",-1)),Me(l("input",{class:"input",type:"date","onUpdate:modelValue":C[11]||(C[11]=R=>f.value=R)},null,512),[[Ne,f.value]])]),l("div",null,[C[31]||(C[31]=l("label",null,"结束日期",-1)),Me(l("input",{class:"input",type:"date","onUpdate:modelValue":C[12]||(C[12]=R=>v.value=R)},null,512),[[Ne,v.value]])])]),l("div",Jb,[C[32]||(C[32]=l("label",null,"备注(选填)",-1)),Me(l("input",{class:"input","onUpdate:modelValue":C[13]||(C[13]=R=>b.value=R)},null,512),[[Ne,b.value]])]),g.value?($(),A("div",Xb,W(g.value),1)):ge("",!0),C[33]||(C[33]=l("div",{class:"muted goal-hint"},"创建后区间内每一天都会生成一条任务,可在每日安排中逐日打卡与计时。",-1))]),l("div",Qb,[l("button",{class:"btn btn-sm",onClick:C[14]||(C[14]=R=>r.value=!1)},"取消"),l("button",{class:"btn btn-primary btn-sm",onClick:j},W(o.value?"保存":"创建"),1)])])])):ge("",!0)])),Ce(Dn,{open:!!_.value,title:"删除长期计划",message:_.value?"将删除「"+_.value.title+"」及其全部每日任务(含已完成记录),不可恢复。":"","confirm-text":"删除",danger:"",onCancel:C[16]||(C[16]=R=>_.value=null),onConfirm:J},null,8,["open","message"])]))}}),ew=Vt(Zb,[["__scopeId","data-v-c917531a"]]),tw={class:"stats"},nw={class:"cards"},sw={class:"card stat-card"},rw={class:"stat-num num"},ow={class:"card stat-card"},aw={class:"stat-num num"},iw={class:"card stat-card"},lw={class:"stat-num num"},uw={class:"card stat-card"},cw={class:"stat-num num"},dw={class:"card section"},fw={class:"heat"},pw=["title"],vw={class:"two-col"},mw={class:"card section"},hw={class:"bar-label"},yw={class:"bar-track"},gw={class:"muted num bar-num"},bw={key:0,class:"muted"},ww={class:"card section"},_w={class:"bar-label"},kw={class:"bar-track"},xw={class:"muted num bar-num"},Cw={key:0,class:"muted"},$w={class:"card section"},Sw={class:"bar-label loc-label"},Ew={class:"bar-track"},Tw={class:"muted num bar-num"},Aw={key:0,class:"muted"},Pw=Rt({__name:"StatsView",setup(e){const t=O({attendDays:0,totalHours:"0",itemCount:0,streak:0}),n=O([]),r=O([]),o=O([]),i=O([]);async function c(){const b=ot(),g="2000-01-01",_=await Promise.all([ps(),Jr(g,b),Xr(g,b),rr(!0)]),T=_[0],x=_[1],j=_[2],J=_[3],oe=x.filter(ye=>ye.clock_in_at||ye.kind==="makeup");let ue=0;for(const ye of oe){const Pe=cr(ye,ye.date,T,ye.date===b);ue+=Pe.workedMinutes??0}const ce=new Set(j.map(ye=>ye.date));let q=0,S=b;for(ce.has(S)||(S=Ft(b,-1));ce.has(S);)q++,S=Ft(S,-1);t.value={attendDays:oe.length,totalHours:(ue/60).toFixed(1),itemCount:j.length,streak:q};const H=new Map;for(const ye of oe){const Pe=ye.location||"未记录";H.set(Pe,(H.get(Pe)||0)+1)}i.value=Array.from(H.entries()).map(ye=>({name:ye[0],count:ye[1],percent:Math.round(ye[1]/(oe.length||1)*100)})).sort((ye,Pe)=>Pe.count-ye.count);const Q=j.length||1,G=await Qr(),re=new Map;for(const ye of j)re.set(ye.category,(re.get(ye.category)||0)+1);const M=new Set(G);for(const ye of re.keys())M.has(ye)||G.push(ye);r.value=G.map(ye=>{const Pe=re.get(ye)||0;return{key:ye,label:ye,count:Pe,percent:Math.round(Pe/Q*100)}}).filter(ye=>ye.count>0).sort((ye,Pe)=>Pe.count-ye.count);const E=new Map(J.map(ye=>[ye.id,ye.name])),I=new Map;for(const ye of j){const Pe=ye.project_id?E.get(ye.project_id)||"已删除项目":"无项目";I.set(Pe,(I.get(Pe)||0)+1)}o.value=Array.from(I.entries()).map(ye=>({name:ye[0],count:ye[1],percent:Math.round(ye[1]/Q*100)})).sort((ye,Pe)=>Pe.count-ye.count);const ne=new Map;for(const ye of j)ne.set(ye.date,(ne.get(ye.date)||0)+1);const Ie=Qs(b),Ae=[];for(let ye=11;ye>=0;ye--){const Pe=Ft(Ie,-7*ye),Ue=[];for(let de=0;de<7;de++){const ke=Ft(Pe,de);Ue.push({date:ke,count:ne.get(ke)||0})}Ae.push(Ue)}n.value=Ae}vn(async()=>{await c()}),yt(ur,()=>{c()});function f(b){return b===0?0:b===1?1:b<=3?2:b<=5?3:4}function v(b,g){return b+" · "+(g?g+" 条":"无记录")}return(b,g)=>($(),A("div",tw,[l("div",nw,[l("div",sw,[g[0]||(g[0]=l("div",{class:"muted"},"出勤天数",-1)),l("div",rw,W(t.value.attendDays),1)]),l("div",ow,[g[1]||(g[1]=l("div",{class:"muted"},"累计工时(小时)",-1)),l("div",aw,W(t.value.totalHours),1)]),l("div",iw,[g[2]||(g[2]=l("div",{class:"muted"},"记录条数",-1)),l("div",lw,W(t.value.itemCount),1)]),l("div",uw,[g[3]||(g[3]=l("div",{class:"muted"},"连续记录(天)",-1)),l("div",cw,W(t.value.streak),1)])]),l("div",dw,[g[4]||(g[4]=l("div",{class:"section-title"},"记录热力图(近 12 周)",-1)),l("div",fw,[($(!0),A(je,null,et(n.value,(_,T)=>($(),A("div",{key:T,class:"heat-col"},[($(!0),A(je,null,et(_,x=>($(),A("span",{key:x.date,class:Ze(["heat-cell","lv"+f(x.count)]),title:v(x.date,x.count)},null,10,pw))),128))]))),128))]),g[5]||(g[5]=Hp('
少多
',1))]),l("div",vw,[l("div",mw,[g[6]||(g[6]=l("div",{class:"section-title"},"分类分布",-1)),($(!0),A(je,null,et(r.value,_=>($(),A("div",{key:_.key,class:"bar-row"},[l("span",hw,W(_.label),1),l("span",yw,[l("span",{class:"bar-fill",style:Un({width:_.percent+"%"})},null,4)]),l("span",gw,W(_.count)+" 条 · "+W(_.percent)+"%",1)]))),128)),r.value.length?ge("",!0):($(),A("div",bw,"暂无数据"))]),l("div",ww,[g[7]||(g[7]=l("div",{class:"section-title"},"项目投入",-1)),($(!0),A(je,null,et(o.value,_=>($(),A("div",{key:_.name,class:"bar-row"},[l("span",_w,W(_.name),1),l("span",kw,[l("span",{class:"bar-fill",style:Un({width:_.percent+"%"})},null,4)]),l("span",xw,W(_.count)+" 条 · "+W(_.percent)+"%",1)]))),128)),o.value.length?ge("",!0):($(),A("div",Cw,"暂无数据"))])]),l("div",$w,[g[8]||(g[8]=l("div",{class:"section-title"},"地点分布(按出勤天)",-1)),($(!0),A(je,null,et(i.value,_=>($(),A("div",{key:_.name,class:"bar-row"},[l("span",Sw,W(_.name),1),l("span",Ew,[l("span",{class:"bar-fill",style:Un({width:_.percent+"%"})},null,4)]),l("span",Tw,W(_.count)+" 天 · "+W(_.percent)+"%",1)]))),128)),i.value.length?ge("",!0):($(),A("div",Aw,"暂无数据"))])]))}}),Ow=Vt(Pw,[["__scopeId","data-v-f8410651"]]);async function Mw(e,t,n){const r=ot(),o=await Promise.all([ps(),Jr(e,t),Xr(e,t),rr(!0),mh(e,t),Qr()]),i=o[0],c=o[1],f=o[2],v=o[3],b=o[4],g=o[5];let _=0,T=0,x=0;for(const I of c){(I.clock_in_at||I.kind==="makeup")&&_++,I.kind==="makeup"&&x++;const ne=cr(I,I.date,i,I.date===r);T+=ne.workedMinutes??0}const j=new Map;for(const I of c){if(!(I.clock_in_at||I.kind==="makeup"))continue;const ne=I.location||"未记录";j.set(ne,(j.get(ne)||0)+1)}const J=Array.from(j.entries()).map(I=>({name:I[0],count:I[1]})).sort((I,ne)=>ne.count-I.count),oe=f.length||1,ue=new Map;for(const I of f)ue.set(I.category,(ue.get(I.category)||0)+1);const ce=new Set(g);for(const I of ue.keys())ce.has(I)||g.push(I);const q=g.map(I=>{const ne=ue.get(I)||0;return{key:I,label:I,count:ne,percent:Math.round(ne/oe*100)}}).filter(I=>I.count>0).sort((I,ne)=>ne.count-I.count),S=new Map(v.map(I=>[I.id,I.name])),H=new Map;for(const I of f){const ne=I.project_id?S.get(I.project_id)||"已删除项目":"无项目";H.set(ne,(H.get(ne)||0)+1)}const Q=Array.from(H.entries()).map(I=>({name:I[0],count:I[1]})).sort((I,ne)=>ne.count-I.count),G=f.filter(I=>I.is_milestone===1).map(I=>({date:I.date,content:I.content})),re=f.filter(I=>I.needs_followup===1).map(I=>({date:I.date,content:I.content,remark:I.remark||""})),M=f.filter(I=>!!I.takeaway).map(I=>({date:I.date,text:I.takeaway})),E=b.map(I=>({weekStart:I.week_start,highlights:I.highlights||"",challenges:I.challenges||"",plan_next:I.plan_next||""}));return{range:{start:e,end:t,label:n},attendDays:_,totalHours:(T/60).toFixed(1),makeupCount:x,leaveCount:c.filter(I=>I.kind==="leave").length,itemCount:f.length,categoryStats:q,projectStats:Q,locationStats:J,milestones:G,followups:re,takeaways:M,weekNotes:E}}function Iw(e){const t=[];t.push("# 实习工作总结("+e.range.start+" ~ "+e.range.end+")"),t.push(""),t.push("## 一、考勤概况"),t.push(""),t.push("出勤 "+e.attendDays+" 天,累计工时 "+e.totalHours+" 小时,补卡 "+e.makeupCount+" 次"+(e.leaveCount?",请假 "+e.leaveCount+" 天":""));const n=e.locationStats.filter(r=>r.name!=="未记录");n.length&&t.push("其中:"+n.map(r=>r.name+" "+r.count+" 天").join(",")),t.push(""),t.push("## 二、工作内容分布"),t.push(""),t.push(e.categoryStats.length?e.categoryStats.map(r=>r.label+" "+r.percent+"%("+r.count+" 条)").join(","):"(无记录)"),t.push(""),t.push("## 三、项目投入"),t.push(""),t.push(e.projectStats.length?e.projectStats.map(r=>r.name+" "+r.count+" 条").join(","):"(无记录)"),t.push(""),t.push("## 四、主要成果"),t.push(""),e.milestones.length?e.milestones.forEach((r,o)=>t.push(o+1+". 【成果】"+r.content+"("+r.date+")")):t.push("(无)"),t.push(""),t.push("## 五、待跟进事项"),t.push(""),e.followups.length?e.followups.forEach(r=>t.push("- 【待跟进】"+r.content+(r.remark?"("+r.date+" 备注:"+r.remark+")":"("+r.date+")"))):t.push("(无)"),t.push(""),t.push("## 六、学习与成长"),t.push(""),e.takeaways.length?e.takeaways.forEach(r=>t.push("- "+r.text+"("+r.date+")")):t.push("(无)");for(const r of e.weekNotes)t.push(""),t.push("### 周记("+r.weekStart+" 起)"),t.push(""),t.push("- 本周亮点:"+(r.highlights||"(无)")),t.push("- 踩的坑:"+(r.challenges||"(无)")),t.push("- 下周计划:"+(r.plan_next||"(无)"));return t.push(""),t.join(` -`)}async function zi(e){try{await navigator.clipboard.writeText(e)}catch{const t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}}async function jw(e){const t=await Promise.all([xt("ai_base_url",""),xt("ai_api_key",""),xt("ai_model","")]),n=t[0].trim().replace(/\/+$/,""),r=t[1].trim(),o=t[2].trim();if(!n||!o)throw new Error("请先在设置页配置 AI 接口地址与模型名称");const i=n+"/chat/completions",c={"Content-Type":"application/json"};r&&(c.Authorization="Bearer "+r);const v=JSON.stringify({model:o,messages:[{role:"system",content:"你是一名严谨的中文助理。请将用户提供的工作总结 Markdown 草稿润色为通顺、专业、简洁的工作总结。要求:保留原有章节结构与全部事实数据(数字、日期、条目),不得虚构或遗漏内容,只输出 Markdown 正文。"},{role:"user",content:e}],temperature:.3});let b;try{b=await fetch(i,{method:"POST",headers:c,body:v})}catch{throw new Error("无法访问 AI 接口:请检查地址是否正确、服务端是否允许浏览器跨域访问")}if(!b.ok){let T="接口返回 "+b.status;try{const x=await b.json();x&&x.error&&x.error.message&&(T+=":"+x.error.message)}catch{}throw new Error(T)}const g=await b.json(),_=g&&g.choices&&g.choices[0]&&g.choices[0].message&&g.choices[0].message.content;if(!_)throw new Error("接口未返回内容");return String(_)}const Dw={class:"report"},Lw={class:"report-toolbar"},Rw={class:"seg"},Kw=["onClick"],Nw=["disabled"],Fw=["disabled"],Vw={key:0,class:"ai-error"},Bw={class:"report-grid"},Uw={class:"report-left"},qw={class:"card section"},Hw={class:"section-title"},zw={class:"muted note-saved"},Ww={class:"card section"},Gw={class:"report-right"},Yw={key:0,class:"card section"},Jw={class:"sum-row"},Xw={class:"num"},Qw={class:"sum-row"},Zw={class:"num"},e_={class:"sum-row"},t_={class:"num"},n_={class:"sum-row"},s_={class:"num"},r_={class:"sum-row"},o_={class:"num"},a_={class:"muted"},i_={class:"num"},l_={key:0,class:"muted sum-empty"},u_={class:"muted"},c_={key:1,class:"muted sum-empty"},d_={class:"muted"},f_={key:2,class:"muted sum-empty"},p_={class:"muted"},v_={key:3,class:"muted sum-empty"},m_=Rt({__name:"ReportView",setup(e){const t=[{key:"week",label:"本周"},{key:"month",label:"本月"},{key:"all",label:"全部"},{key:"custom",label:"自定义"}],n=O("week"),r=O(Qs(ot())),o=O(ot()),i=O(null),c=O(""),f=O(!1),v=O(!1),b=O(null),g=O(""),_=O(Qs(ot())),T=O(""),x=O(""),j=O(""),J=O(!1);async function oe(){const re=await hl(_.value);T.value=(re==null?void 0:re.highlights)||"",x.value=(re==null?void 0:re.challenges)||"",j.value=(re==null?void 0:re.plan_next)||"",J.value=!1}async function ue(){await vh(_.value,{highlights:T.value.trim()||null,challenges:x.value.trim()||null,plan_next:j.value.trim()||null}),J.value=!0,await q()}function ce(re){const M=ot();if(re==="week"){const E=Qs(M);return{start:E,end:Ft(E,6),label:"本周"}}if(re==="month"){const E=M.slice(0,7);return{start:E+"-01",end:M,label:E+" 本月"}}return re==="all"?{start:"2000-01-01",end:M,label:"全部实习期"}:{start:r.value,end:o.value,label:r.value+" ~ "+o.value}}async function q(){f.value=!0;const re=ce(n.value),M=await Mw(re.start,re.end,re.label);i.value=M,c.value=Iw(M),f.value=!1}yt(n,q),yt([r,o],()=>{n.value==="custom"&&q()}),vn(async()=>{await oe(),await q()});async function S(){const re=ot().replace(/-/g,""),M=await Sa("实习工作总结_"+re+".md",c.value);Ve(M?"总结已导出到:"+M:"总结已导出到系统下载目录")}async function H(){await zi(c.value),Ve("总结已复制到剪贴板")}async function Q(){if(v.value)return;g.value="";const re=c.value.trim();if(!re){g.value="当前草稿为空,无法润色";return}v.value=!0;try{b.value=c.value,c.value=await jw(re),Ve("AI 润色完成")}catch(M){b.value=null,g.value=M instanceof Error?M.message:"润色失败"}v.value=!1}function G(){b.value!==null&&(c.value=b.value),b.value=null}return(re,M)=>($(),A("div",Dw,[l("div",Lw,[l("div",Rw,[($(),A(je,null,et(t,E=>l("button",{key:E.key,class:Ze(["seg-btn",{active:n.value===E.key}]),onClick:I=>n.value=E.key},W(E.label),11,Kw)),64))]),n.value==="custom"?($(),A(je,{key:0},[Me(l("input",{type:"date",class:"input w-date","onUpdate:modelValue":M[0]||(M[0]=E=>r.value=E)},null,512),[[Ne,r.value]]),M[6]||(M[6]=l("span",{class:"muted"},"至",-1)),Me(l("input",{type:"date",class:"input w-date","onUpdate:modelValue":M[1]||(M[1]=E=>o.value=E)},null,512),[[Ne,o.value]])],64)):ge("",!0),M[10]||(M[10]=l("span",{class:"flex1"},null,-1)),l("button",{class:"btn btn-sm",disabled:v.value,onClick:Q},[Ce(He,{name:"edit",size:14}),M[7]||(M[7]=vt("AI 润色 ",-1))],8,Nw),b.value!==null?($(),A("button",{key:1,class:"btn btn-sm",onClick:G},"还原润色前")):ge("",!0),l("button",{class:"btn btn-sm",disabled:f.value,onClick:q},[Ce(He,{name:"edit",size:14}),M[8]||(M[8]=vt("重新生成 ",-1))],8,Fw),l("button",{class:"btn btn-sm",onClick:H},"复制"),l("button",{class:"btn btn-primary btn-sm",onClick:S},[Ce(He,{name:"export",size:14}),M[9]||(M[9]=vt("导出 Markdown ",-1))])]),g.value?($(),A("div",Vw,W(g.value),1)):ge("",!0),l("div",Bw,[l("div",Uw,[l("div",qw,[l("div",Hw,"本周周记("+W(_.value)+" 起)",1),M[11]||(M[11]=l("label",{class:"note-label muted"},"本周亮点",-1)),Me(l("textarea",{class:"textarea","onUpdate:modelValue":M[2]||(M[2]=E=>T.value=E),placeholder:"本周最有价值的一件事",onBlur:ue},null,544),[[Ne,T.value]]),M[12]||(M[12]=l("label",{class:"note-label muted"},"踩的坑",-1)),Me(l("textarea",{class:"textarea","onUpdate:modelValue":M[3]||(M[3]=E=>x.value=E),placeholder:"遇到的问题与教训",onBlur:ue},null,544),[[Ne,x.value]]),M[13]||(M[13]=l("label",{class:"note-label muted"},"下周计划",-1)),Me(l("textarea",{class:"textarea","onUpdate:modelValue":M[4]||(M[4]=E=>j.value=E),placeholder:"下周准备做什么",onBlur:ue},null,544),[[Ne,j.value]]),l("div",zw,W(J.value?"已保存":"失焦自动保存"),1)]),l("div",Ww,[M[14]||(M[14]=l("div",{class:"section-title"},"总结草稿(可编辑)",-1)),Me(l("textarea",{class:"textarea md-editor","onUpdate:modelValue":M[5]||(M[5]=E=>c.value=E),spellcheck:"false"},null,512),[[Ne,c.value]])])]),l("div",Gw,[i.value?($(),A("div",Yw,[M[20]||(M[20]=l("div",{class:"section-title"},"数据摘要",-1)),l("div",Jw,[M[15]||(M[15]=l("span",{class:"muted"},"出勤",-1)),l("span",Xw,W(i.value.attendDays)+" 天",1)]),l("div",Qw,[M[16]||(M[16]=l("span",{class:"muted"},"工时",-1)),l("span",Zw,W(i.value.totalHours)+" 小时",1)]),l("div",e_,[M[17]||(M[17]=l("span",{class:"muted"},"补卡",-1)),l("span",t_,W(i.value.makeupCount)+" 次",1)]),l("div",n_,[M[18]||(M[18]=l("span",{class:"muted"},"请假",-1)),l("span",s_,W(i.value.leaveCount)+" 天",1)]),l("div",r_,[M[19]||(M[19]=l("span",{class:"muted"},"记录",-1)),l("span",o_,W(i.value.itemCount)+" 条",1)]),M[21]||(M[21]=l("div",{class:"section-sub"},"分类分布",-1)),($(!0),A(je,null,et(i.value.categoryStats,E=>($(),A("div",{key:E.key,class:"sum-row"},[l("span",a_,W(E.label),1),l("span",i_,W(E.count)+" 条 · "+W(E.percent)+"%",1)]))),128)),i.value.categoryStats.length?ge("",!0):($(),A("div",l_,"(无)")),M[22]||(M[22]=l("div",{class:"section-sub"},"主要成果",-1)),($(!0),A(je,null,et(i.value.milestones,(E,I)=>($(),A("div",{key:"m"+I,class:"sum-item"},[vt(W(E.content),1),l("span",u_,"("+W(E.date)+")",1)]))),128)),i.value.milestones.length?ge("",!0):($(),A("div",c_,"(无)")),M[23]||(M[23]=l("div",{class:"section-sub"},"待跟进",-1)),($(!0),A(je,null,et(i.value.followups,(E,I)=>($(),A("div",{key:"f"+I,class:"sum-item"},[vt(W(E.content),1),l("span",d_,"("+W(E.date)+")",1)]))),128)),i.value.followups.length?ge("",!0):($(),A("div",f_,"(无)")),M[24]||(M[24]=l("div",{class:"section-sub"},"学习与成长",-1)),($(!0),A(je,null,et(i.value.takeaways,(E,I)=>($(),A("div",{key:"t"+I,class:"sum-item"},[vt(W(E.text),1),l("span",p_,"("+W(E.date)+")",1)]))),128)),i.value.takeaways.length?ge("",!0):($(),A("div",v_,"(无)"))])):ge("",!0)])])]))}}),h_=Vt(m_,[["__scopeId","data-v-43f9c59b"]]),y_=["aria-label"],g_={class:"dialog-head"},b_={class:"dialog-title"},w_={class:"dialog-body"},__={class:"form-grid"},k_={class:"field span2"},x_={class:"seg"},C_={class:"field"},$_={class:"field"},S_={class:"field"},E_=["value"],T_={class:"add-cat"},A_=["onKeydown"],P_={key:0,class:"field"},O_={class:"seg"},M_={class:"field span2"},I_={key:0,class:"form-error"},j_={class:"dialog-btns"},D_=Rt({__name:"TransactionDialog",props:{open:{type:Boolean},title:{},initial:{}},emits:["cancel","save"],setup(e,{emit:t}){const n=e,r=t,o=O("expense"),i=O(""),c=O(""),f=O(""),v=O(""),b=O(!1),g=O(!1),_=O(""),T=O(null);function x(S){n.open&&S.key==="Escape"&&r("cancel")}yt(()=>n.open,async S=>{var H;S?(await J(),o.value=n.initial.type==="income"?"income":"expense",i.value=n.initial.category,c.value=n.initial.amountYuan,f.value=n.initial.date,v.value=n.initial.note,b.value=n.initial.reimbursable===1,g.value=n.initial.reimbursed===1,_.value="",window.addEventListener("keydown",x),await ir(),(H=T.value)==null||H.focus()):window.removeEventListener("keydown",x)}),Wn(()=>window.removeEventListener("keydown",x)),yt(o,S=>{i.value=S==="expense"?EXPENSE_CATEGORIES[0]:INCOME_CATEGORIES[0]});const j=O([]);async function J(){j.value=await zr(o.value)}const oe=O("");async function ue(){const S=oe.value.trim();if(S){if(j.value.includes(S)){oe.value="";return}j.value.push(S),await Ts(o.value,j.value),i.value=S,oe.value=""}}function ce(){return i.value&&j.value.includes(i.value)?i.value:j.value[0]}function q(){const S=String(c.value??"").trim(),H=Number(S);if(!S||!isFinite(H)||H<=0){_.value="请填写大于 0 的金额";return}if(!f.value){_.value="请选择日期";return}const Q=o.value==="expense"&&b.value?1:0;r("save",{type:o.value,category:ce(),amount:Math.round(H*100),date:f.value,note:String(v.value??"").trim(),reimbursable:Q,reimbursed:Q&&g.value?1:0})}return(S,H)=>($(),St(Hn,{to:"body"},[Ce(lr,{name:"modal"},{default:ms(()=>[e.open?($(),A("div",{key:0,class:"mask",onClick:H[12]||(H[12]=zt(Q=>r("cancel"),["self"]))},[l("div",{class:"dialog",role:"dialog","aria-label":e.title},[l("div",g_,[l("span",b_,W(e.title),1),l("button",{class:"icon-btn",title:"关闭",onClick:H[0]||(H[0]=Q=>r("cancel"))},[Ce(He,{name:"close",size:16})])]),l("div",w_,[l("div",__,[l("div",k_,[H[13]||(H[13]=l("label",null,"类型",-1)),l("div",x_,[l("button",{class:Ze(["seg-btn",{active:o.value==="expense"}]),onClick:H[1]||(H[1]=Q=>o.value="expense")},"支出",2),l("button",{class:Ze(["seg-btn",{active:o.value==="income"}]),onClick:H[2]||(H[2]=Q=>o.value="income")},"收入",2)])]),l("div",C_,[H[14]||(H[14]=l("label",null,"金额(元,必填)",-1)),Me(l("input",{ref_key:"amountInput",ref:T,class:Ze(["input",{invalid:_.value}]),"onUpdate:modelValue":H[3]||(H[3]=Q=>c.value=Q),type:"number",min:"0",step:"0.01",placeholder:"0.00"},null,2),[[Ne,c.value]])]),l("div",$_,[H[15]||(H[15]=l("label",null,"日期(必填)",-1)),Me(l("input",{class:"input",type:"date","onUpdate:modelValue":H[4]||(H[4]=Q=>f.value=Q)},null,512),[[Ne,f.value]])]),l("div",S_,[H[16]||(H[16]=l("label",null,"分类(可直接新增)",-1)),Me(l("select",{class:"select","onUpdate:modelValue":H[5]||(H[5]=Q=>i.value=Q)},[($(!0),A(je,null,et(j.value,Q=>($(),A("option",{key:Q,value:Q},W(Q),9,E_))),128))],512),[[fs,i.value]]),l("div",T_,[Me(l("input",{class:"input add-cat-input","onUpdate:modelValue":H[6]||(H[6]=Q=>oe.value=Q),placeholder:"新增分类名",onKeydown:Mt(zt(ue,["prevent"]),["enter"])},null,40,A_),[[Ne,oe.value]]),l("button",{class:"btn btn-xs",type:"button",onClick:ue},"添加")])]),o.value==="expense"?($(),A("div",P_,[H[17]||(H[17]=l("label",null,"报销状态",-1)),l("div",O_,[l("button",{class:Ze(["seg-btn",{active:!b.value}]),onClick:H[7]||(H[7]=Q=>{b.value=!1,g.value=!1})},"无需报销",2),l("button",{class:Ze(["seg-btn",{active:b.value&&!g.value}]),onClick:H[8]||(H[8]=Q=>{b.value=!0,g.value=!1})},"待报销",2),l("button",{class:Ze(["seg-btn",{active:b.value&&g.value}]),onClick:H[9]||(H[9]=Q=>{b.value=!0,g.value=!0})},"已报销",2)])])):ge("",!0),l("div",M_,[H[18]||(H[18]=l("label",null,"备注",-1)),Me(l("textarea",{class:"textarea","onUpdate:modelValue":H[10]||(H[10]=Q=>v.value=Q),placeholder:"选填"},null,512),[[Ne,v.value]])])]),_.value?($(),A("div",I_,W(_.value),1)):ge("",!0)]),l("div",j_,[l("button",{class:"btn btn-sm",onClick:H[11]||(H[11]=Q=>r("cancel"))},"取消"),l("button",{class:"btn btn-primary btn-sm",onClick:q},"保存")])],8,y_)])):ge("",!0)]),_:1})]))}}),L_=Vt(D_,[["__scopeId","data-v-9f38206c"]]),R_={class:"ledger-page"},K_={class:"ledger-toolbar"},N_={class:"month-title num"},F_={class:"cards"},V_={class:"card stat-card"},B_={class:"stat-num num amt-income"},U_={class:"card stat-card"},q_={class:"stat-num num"},H_={class:"card stat-card"},z_={class:"card stat-card"},W_={class:"stat-num num amt-warn"},G_={key:0,class:"card sec"},Y_={class:"bar-label"},J_={class:"bar-track"},X_={class:"muted num bar-num"},Q_={key:1,class:"card section"},Z_={class:"form-error"},e1={class:"card table-card"},t1={class:"tx-table"},n1={class:"num","data-label":"日期"},s1={"data-label":"分类"},r1={class:"tag"},o1={class:"td-note","data-label":"备注"},a1={"data-label":"报销"},i1={key:0,class:"muted"},l1={key:1,class:"tx-done"},u1={key:2,class:"tx-pending"},c1={class:"ops-cell"},d1={class:"ops"},f1=["onClick"],p1=["onClick"],v1=["onClick"],m1={key:0},h1={class:"muted vault-note num"},y1=Rt({__name:"LedgerView",setup(e){const t=O(ot()),n=O([]),r=O(!0),o=O("");ot();const i=O(""),c=O(""),f=O(!1),v=O(null),b=O({type:"expense",category:"",amountYuan:"",date:ot(),note:"",reimbursable:0,reimbursed:0}),g=O(null),_=rt(()=>t.value.slice(0,7)+"-01"),T=rt(()=>{const de=Number(t.value.slice(0,4)),ke=Number(t.value.slice(5,7))-1,Ee=new Date(de,ke+1,0).getDate();return t.value.slice(0,7)+"-"+(Ee<10?"0"+Ee:String(Ee))}),x=rt(()=>Number(t.value.slice(0,4))+" 年 "+Number(t.value.slice(5,7))+" 月");async function j(){r.value=!0;try{n.value=await Dh(_.value,T.value),c.value=""}catch(de){c.value="账目加载失败:"+(de instanceof Error?de.stack||de.message:String(de)),Ve("账目加载失败")}r.value=!1}vn(j),yt(t,j);const J=O([]),oe=O([]);async function ue(){J.value=await zr("expense"),oe.value=await zr("income")}ue();const ce=rt(()=>n.value.slice().sort((de,ke)=>de.date===ke.date?ke.id-de.id:de.date{let de=0,ke=0,Ee=0;for(const Le of n.value)Le.type==="income"?de+=Le.amount:(ke+=Le.amount,Le.reimbursable===1&&Le.reimbursed!==1&&(Ee+=Le.amount));return{income:de,expense:ke,pending:Ee,balance:de-ke}}),S=O("all"),H=O("all"),Q=rt(()=>ce.value.filter(de=>!(S.value!=="all"&&de.type!==S.value||H.value==="pending"&&!(de.type==="expense"&&de.reimbursable===1&&de.reimbursed!==1)||H.value==="done"&&!(de.reimbursable===1&&de.reimbursed===1)))),G=rt(()=>{const de=new Map;let ke=0;for(const Le of n.value)Le.type==="expense"&&(de.set(Le.category,(de.get(Le.category)||0)+Le.amount),ke+=Le.amount);const Ee=ke||1;return Array.from(de.entries()).map(Le=>({name:Le[0],amount:Le[1],percent:Math.round(Le[1]/Ee*100)})).sort((Le,$e)=>$e.amount-Le.amount)});function re(de){return(de/100).toFixed(2)}function M(de){return(de.type==="income"?"+":"-")+re(de.amount)}function E(){t.value=na(t.value,-1)}function I(){t.value=na(t.value,1)}function ne(){t.value=ot()}yt(o,()=>{i.value&&(i.value="")});async function Ie(de){await Nh(de.id),await j(),Ve("已标记为已报销")}function Ae(de){v.value=de.id,b.value={type:de.type,category:de.category,amountYuan:re(de.amount),date:de.date,note:de.note||"",reimbursable:de.reimbursable,reimbursed:de.reimbursed},f.value=!0}function ye(){v.value=null,b.value={type:"expense",category:J.value[0]||"",amountYuan:"",date:ot(),note:"",reimbursable:0,reimbursed:0},f.value=!0}async function Pe(de){if(v.value){await Rh(v.value,de),f.value=!1,await j(),Ve("账目已更新");return}await Lh({type:de.type,category:de.category,amount:de.amount,date:de.date,note:de.note,reimbursable:de.reimbursable,reimbursed:de.reimbursed}),f.value=!1,await j(),Ve("已记一笔")}async function Ue(){g.value&&g.value.id&&await Kh(g.value.id),g.value=null,await j(),Ve("账目已删除")}return(de,ke)=>($(),A("div",R_,[l("div",K_,[l("button",{class:"icon-btn",onClick:E},[Ce(He,{name:"chevron-left",size:16})]),l("span",N_,W(x.value),1),l("button",{class:"icon-btn",onClick:I},[Ce(He,{name:"chevron-right",size:16})]),l("button",{class:"btn btn-sm",onClick:ne},"回到本月"),ke[7]||(ke[7]=l("span",{class:"flex1"},null,-1)),Me(l("select",{class:"select w-filter","onUpdate:modelValue":ke[0]||(ke[0]=Ee=>S.value=Ee)},[...ke[4]||(ke[4]=[l("option",{value:"all"},"全部类型",-1),l("option",{value:"expense"},"仅支出",-1),l("option",{value:"income"},"仅收入",-1)])],512),[[fs,S.value]]),Me(l("select",{class:"select w-filter","onUpdate:modelValue":ke[1]||(ke[1]=Ee=>H.value=Ee)},[...ke[5]||(ke[5]=[l("option",{value:"all"},"全部报销",-1),l("option",{value:"pending"},"待报销",-1),l("option",{value:"done"},"已报销",-1)])],512),[[fs,H.value]]),l("button",{class:"btn btn-primary btn-sm",onClick:ye},[Ce(He,{name:"plus",size:14}),ke[6]||(ke[6]=vt(" 记一笔",-1))])]),l("div",F_,[l("div",V_,[ke[8]||(ke[8]=l("div",{class:"muted"},"本月收入(元)",-1)),l("div",B_,W(re(q.value.income)),1)]),l("div",U_,[ke[9]||(ke[9]=l("div",{class:"muted"},"本月支出(元)",-1)),l("div",q_,W(re(q.value.expense)),1)]),l("div",H_,[ke[10]||(ke[10]=l("div",{class:"muted"},"本月结余(元)",-1)),l("div",{class:Ze(["stat-num num",{"amt-income":q.value.balance>=0,"amt-expense":q.value.balance<0}])},W(re(q.value.balance)),3)]),l("div",z_,[ke[11]||(ke[11]=l("div",{class:"muted"},"待报销(元)",-1)),l("div",W_,W(re(q.value.pending)),1)])]),G.value.length?($(),A("div",G_,[ke[12]||(ke[12]=l("div",{class:"sec-title"},"本月支出分类",-1)),($(!0),A(je,null,et(G.value,Ee=>($(),A("div",{key:Ee.name,class:"bar-row"},[l("span",Y_,W(Ee.name),1),l("span",J_,[l("span",{class:"bar-fill",style:Un({width:Ee.percent+"%"})},null,4)]),l("span",X_,W(re(Ee.amount))+" 元 · "+W(Ee.percent)+"%",1)]))),128))])):ge("",!0),c.value?($(),A("div",Q_,[l("div",Z_,W(c.value),1),ke[13]||(ke[13]=l("div",{class:"muted loc-note"},"请将上方完整错误文字发送给开发者",-1))])):ge("",!0),l("div",e1,[l("table",t1,[ke[15]||(ke[15]=l("thead",null,[l("tr",null,[l("th",null,"日期"),l("th",null,"分类"),l("th",null,"金额(元)"),l("th",null,"备注"),l("th",null,"报销"),l("th",{class:"th-ops"},"操作")])],-1)),l("tbody",null,[($(!0),A(je,null,et(Q.value,Ee=>($(),A("tr",{key:Ee.id},[l("td",n1,W(Ee.date),1),l("td",s1,[l("span",r1,W(Ee.category),1)]),l("td",{class:Ze(["num",Ee.type==="income"?"amt-income":"amt-expense"]),"data-label":"金额"},W(M(Ee)),3),l("td",o1,W(Ee.note||"--"),1),l("td",a1,[Ee.type!=="expense"||Ee.reimbursable!==1?($(),A("span",i1,"--")):Ee.reimbursed===1?($(),A("span",l1,"已报销")):($(),A("span",u1,"待报销"))]),l("td",c1,[l("div",d1,[Ee.type==="expense"&&Ee.reimbursable===1&&Ee.reimbursed!==1?($(),A("button",{key:0,class:"btn btn-xs",onClick:Le=>Ie(Ee)},"标记已报销",8,f1)):ge("",!0),l("button",{class:"btn btn-xs",onClick:Le=>Ae(Ee)},"编辑",8,p1),l("button",{class:"btn btn-xs",onClick:Le=>g.value=Ee},"删除",8,v1)])])]))),128)),!Q.value.length&&!r.value?($(),A("tr",m1,[...ke[14]||(ke[14]=[l("td",{colspan:"6",class:"empty muted"},"本月暂无账目",-1)])])):ge("",!0)])])]),l("div",h1,"本月 "+W(n.value.length)+" 条 · 当前筛选 "+W(Q.value.length)+" 条",1),Ce(L_,{open:f.value,title:v.value?"编辑账目":"记一笔",initial:b.value,onCancel:ke[2]||(ke[2]=Ee=>f.value=!1),onSave:Pe},null,8,["open","title","initial"]),Ce(Dn,{open:!!g.value,title:"删除确认",message:g.value?"将删除 "+g.value.date+" 的账目("+g.value.category+" "+re(g.value.amount)+" 元)。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:ke[3]||(ke[3]=Ee=>g.value=null),onConfirm:Ue},null,8,["open","message"])]))}}),g1=Vt(y1,[["__scopeId","data-v-e8759c3f"]]),b1={class:"memo-page"},w1={class:"card memo-list"},_1={class:"pane-head"},k1={class:"pane-title"},x1={class:"memo-scroll"},C1=["onClick"],$1={class:"memo-item-title"},S1={class:"muted memo-item-sub"},E1={class:"muted num memo-item-time"},T1={key:0,class:"muted empty"},A1={class:"card memo-editor"},P1={class:"editor-foot"},O1={class:"muted foot-info"},M1=["disabled"],I1=["disabled"],j1={key:1,class:"empty muted editor-empty"},D1=Rt({__name:"MemoView",setup(e){const t=O([]),n=O(null),r=O(!1),o=O(""),i=O(""),c=O(null),f=O(null);async function v(){if(t.value=await Ah(),n.value&&n.value.id){const Q=t.value.find(G=>G.id===n.value.id);Q&&(n.value=Q)}}vn(async()=>{await v(),t.value.length&&_(t.value[0]),window.addEventListener("keydown",b)}),Wn(()=>window.removeEventListener("keydown",b)),yt(Vi,async Q=>{if(!Q)return;t.value.length||await v();const G=t.value.find(re=>re.id===Q);Vi.value=null,G&&T(G)},{immediate:!0});function b(Q){(Q.ctrlKey||Q.metaKey)&&Q.key.toLowerCase()==="s"&&r.value&&g.value&&(Q.preventDefault(),oe())}const g=rt(()=>{if(!r.value)return!1;const Q=n.value?n.value.title:"",G=n.value?n.value.content:"";return o.value!==Q||i.value!==G});function _(Q){n.value=Q,r.value=!0,o.value=Q.title,i.value=Q.content}function T(Q){if(!(r.value&&n.value&&n.value.id===Q.id)){if(g.value){f.value={type:"select",memo:Q};return}_(Q)}}function x(){if(g.value){f.value={type:"new"};return}j()}function j(){n.value=null,r.value=!0,o.value="",i.value=""}function J(){n.value?_(n.value):j()}async function oe(){if(!o.value.trim()&&!i.value.trim()){Ve("标题与内容不能都为空");return}if(n.value&&n.value.id)await Oh(n.value.id,o.value,i.value),Ve("备忘已保存");else{const Q=await Ph(o.value,i.value);n.value=Q,o.value=Q.title,i.value=Q.content,Ve("备忘已创建")}await v()}function ue(){n.value&&n.value.id&&(c.value=n.value)}async function ce(){c.value&&c.value.id&&(await Mh(c.value.id),Ve("备忘已删除")),c.value=null,await v(),j()}function q(){const Q=f.value;f.value=null,Q&&(Q.type==="select"?_(Q.memo):j())}function S(Q){return(Q.content||"").replace(/\s+/g," ").slice(0,30)}function H(Q){return Q.replace("T"," ").slice(0,16)}return(Q,G)=>($(),A("div",b1,[l("aside",w1,[l("div",_1,[l("span",k1,"备忘录("+W(t.value.length)+")",1),l("button",{class:"btn btn-primary btn-sm",onClick:x},"新建")]),l("div",x1,[($(!0),A(je,null,et(t.value,re=>($(),A("div",{key:re.id,class:Ze(["memo-item",{active:r.value&&n.value&&n.value.id===re.id}]),onClick:M=>T(re)},[l("div",$1,W(re.title||"无标题"),1),l("div",S1,W(S(re)||"空"),1),l("div",E1,W(H(re.updated_at)),1)],10,C1))),128)),t.value.length?ge("",!0):($(),A("div",T1,"暂无备忘"))])]),l("section",A1,[r.value?($(),A(je,{key:0},[Me(l("input",{class:"input title-input","onUpdate:modelValue":G[0]||(G[0]=re=>o.value=re),placeholder:"标题"},null,512),[[Ne,o.value]]),Me(l("textarea",{class:"textarea content-textarea","onUpdate:modelValue":G[1]||(G[1]=re=>i.value=re),placeholder:"内容"},null,512),[[Ne,i.value]]),l("div",P1,[l("span",O1,[g.value?($(),A(je,{key:0},[vt("有未保存修改")],64)):n.value&&n.value.id?($(),A(je,{key:1},[vt("更新于 "+W(H(n.value.updated_at)),1)],64)):($(),A(je,{key:2},[vt("新备忘")],64))]),G[4]||(G[4]=l("span",{class:"flex1"},null,-1)),n.value&&n.value.id?($(),A("button",{key:0,class:"btn btn-sm",onClick:ue},"删除")):ge("",!0),l("button",{class:"btn btn-sm",disabled:!g.value,onClick:J},"放弃修改",8,M1),l("button",{class:"btn btn-primary btn-sm",disabled:!g.value,onClick:oe},"保存",8,I1)])],64)):($(),A("div",j1,"选择左侧备忘,或点击右上角新建"))]),Ce(Dn,{open:!!c.value,title:"删除确认",message:c.value?"将删除备忘「"+(c.value.title||"无标题")+"」。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:G[2]||(G[2]=re=>c.value=null),onConfirm:ce},null,8,["open","message"]),Ce(Dn,{open:!!f.value,title:"未保存提示",message:"当前备忘有未保存的修改,继续操作将丢失这些修改。","confirm-text":"放弃修改并继续",onCancel:G[3]||(G[3]=re=>f.value=null),onConfirm:q},null,8,["open"])]))}}),L1=Vt(D1,[["__scopeId","data-v-74d60dba"]]),R1=["aria-label"],K1={class:"dialog-head"},N1={class:"dialog-title"},F1={class:"dialog-body"},V1={class:"form-grid"},B1={class:"field span2"},U1={class:"field span2"},q1={class:"field span2"},H1={class:"pwd-row"},z1={class:"field span2"},W1={key:0,class:"form-error"},G1={class:"dialog-btns"},Y1=Rt({__name:"CredentialDialog",props:{open:{type:Boolean},title:{},initial:{}},emits:["cancel","save"],setup(e,{emit:t}){const n=e,r=t,o=O(""),i=O(""),c=O(""),f=O(""),v=O(""),b=O(null);function g(x){n.open&&x.key==="Escape"&&r("cancel")}yt(()=>n.open,async x=>{var j;x?(o.value=n.initial.system,i.value=n.initial.account,c.value=n.initial.password,f.value=n.initial.remark,v.value="",window.addEventListener("keydown",g),await ir(),(j=b.value)==null||j.focus()):window.removeEventListener("keydown",g)}),Wn(()=>window.removeEventListener("keydown",g));function _(){const x="ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz23456789",j="!@#$%^&*",J=crypto.getRandomValues(new Uint8Array(14));let oe="";for(let ue=0;ue($(),St(Hn,{to:"body"},[Ce(lr,{name:"modal"},{default:ms(()=>[e.open?($(),A("div",{key:0,class:"mask",onClick:j[6]||(j[6]=zt(J=>r("cancel"),["self"]))},[l("div",{class:"dialog",role:"dialog","aria-label":e.title},[l("div",K1,[l("span",N1,W(e.title),1),l("button",{class:"icon-btn",title:"关闭",onClick:j[0]||(j[0]=J=>r("cancel"))},[Ce(He,{name:"close",size:16})])]),l("div",F1,[l("div",V1,[l("div",B1,[j[7]||(j[7]=l("label",null,"系统名称(必填)",-1)),Me(l("input",{ref_key:"systemInput",ref:b,class:"input","onUpdate:modelValue":j[1]||(j[1]=J=>o.value=J),placeholder:"如:企业邮箱 / OA / VPN"},null,512),[[Ne,o.value]])]),l("div",U1,[j[8]||(j[8]=l("label",null,"账号(必填)",-1)),Me(l("input",{class:"input","onUpdate:modelValue":j[2]||(j[2]=J=>i.value=J),placeholder:"用户名、工号或邮箱"},null,512),[[Ne,i.value]])]),l("div",q1,[j[9]||(j[9]=l("label",null,"密码(必填)",-1)),l("div",H1,[Me(l("input",{class:"input","onUpdate:modelValue":j[3]||(j[3]=J=>c.value=J),placeholder:"输入或点击生成"},null,512),[[Ne,c.value]]),l("button",{class:"btn btn-sm",onClick:_},"生成")])]),l("div",z1,[j[10]||(j[10]=l("label",null,"备注",-1)),Me(l("textarea",{class:"textarea","onUpdate:modelValue":j[4]||(j[4]=J=>f.value=J),placeholder:"用途、到期时间、负责人等(选填)"},null,512),[[Ne,f.value]])])]),v.value?($(),A("div",W1,W(v.value),1)):ge("",!0)]),l("div",G1,[l("button",{class:"btn btn-sm",onClick:j[5]||(j[5]=J=>r("cancel"))},"取消"),l("button",{class:"btn btn-primary btn-sm",onClick:T},"保存")])],8,R1)])):ge("",!0)]),_:1})]))}}),J1=Vt(Y1,[["__scopeId","data-v-f383b0a6"]]),X1={class:"vault-page"},Q1={key:0,class:"empty muted"},Z1={key:1,class:"card lock-card"},e0={class:"lock-badge"},t0={key:0,class:"form-error"},n0=["disabled"],s0={key:0,class:"form-error"},r0=["disabled"],o0={class:"vault-toolbar"},a0={class:"search-wrap"},i0={class:"card table-card"},l0={class:"cred-table"},u0={class:"td-system"},c0=["onClick"],d0={class:"pwd-cell"},f0={class:"num pwd-text"},p0=["onClick"],v0=["onClick"],m0={class:"td-remark"},h0={class:"td-ops"},y0={class:"ops"},g0=["onClick"],b0=["onClick"],w0={key:0},_0={class:"muted vault-note num"},k0={class:"dialog pwd-dialog"},x0={class:"dialog-head"},C0={class:"dialog-body"},$0={class:"vp-field"},S0={class:"vp-field"},E0={class:"vp-field"},T0={key:0,class:"form-error"},A0={class:"dialog-btns"},P0=5*60*1e3,O0=Rt({__name:"VaultView",setup(e){const t=O(null),n=O(cm()),r=O(!1),o=O(""),i=O(""),c=O(""),f=O(""),v=O(""),b=O([]),g=O(""),_=O({}),T=O(!1),x=O(null),j=O({system:"",account:"",password:"",remark:""}),J=O(null),oe=O(!1),ue=O(""),ce=O(""),q=O(""),S=O("");async function H(){b.value=await mm(),_.value={}}let Q=null;function G(){Q!==null&&window.clearTimeout(Q),Q=window.setTimeout(()=>{n.value&&(oa(),n.value=!1,b.value=[],_.value={},Ve("长时间未操作,密码库已自动锁定"))},P0)}function re(){n.value&&G()}vn(async()=>{t.value=await dd(),window.addEventListener("click",re),window.addEventListener("keydown",re),n.value&&G()}),Wn(()=>{window.removeEventListener("click",re),window.removeEventListener("keydown",re),Q!==null&&window.clearTimeout(Q)});const M=rt(()=>{const $e=g.value.trim().toLowerCase();return $e?b.value.filter(pe=>(pe.system+" "+pe.account+" "+(pe.remark||"")).toLowerCase().includes($e)):b.value});async function E(){if(!r.value){if(c.value="",!o.value){c.value="请输入主密码";return}if(o.value.length<6){c.value="主密码至少 6 位";return}if(o.value!==i.value){c.value="两次输入的主密码不一致";return}r.value=!0;try{await dm(o.value),o.value="",i.value="",n.value=!0,G(),await H(),Ve("主密码已设置,密码库已解锁")}catch($e){c.value=$e instanceof Error?$e.message:"设置失败"}r.value=!1}}async function I(){if(!r.value){if(v.value="",!f.value){v.value="请输入主密码";return}r.value=!0;try{await fm(f.value),f.value="",n.value=!0,G(),await H()}catch($e){v.value=$e instanceof Error?$e.message:"解锁失败"}r.value=!1}}function ne(){oa(),n.value=!1,b.value=[],_.value={},Q!==null&&window.clearTimeout(Q),Ve("密码库已锁定")}async function Ie($e){const pe=$e.id;if(_.value[pe]){_.value[pe]=!1;return}try{$e.passwordPlain=await yi(pe),_.value[pe]=!0}catch(De){Ve(De instanceof Error?De.message:"解密失败")}}async function Ae($e){try{const pe=await yi($e.id);await zi(pe),Ve("密码已复制")}catch(pe){Ve(pe instanceof Error?pe.message:"复制失败")}}async function ye($e){await zi($e.account),Ve("账号已复制")}function Pe(){x.value=null,j.value={system:"",account:"",password:"",remark:""},T.value=!0}async function Ue($e){try{const pe=await yi($e.id);x.value=$e.id,j.value={system:$e.system,account:$e.account,password:pe,remark:$e.remark||""},T.value=!0}catch(pe){Ve(pe instanceof Error?pe.message:"解密失败")}}async function de($e){const pe=x.value??void 0;await hm($e,pe),T.value=!1,await H(),Ve(pe?"账号已更新":"账号已添加")}async function ke(){J.value&&J.value.id&&(await ym(J.value.id),Ve("账号已删除")),J.value=null,await H()}function Ee(){ue.value="",ce.value="",q.value="",S.value="",oe.value=!0}async function Le(){S.value="";try{const $e=await gm(ue.value,ce.value);oe.value=!1,ue.value="",ce.value="",q.value="",Ve("主密码已修改,"+$e+" 条账号密码已重新加密")}catch($e){S.value=$e instanceof Error?$e.message:"修改失败"}}return($e,pe)=>($(),A("div",X1,[t.value===null?($(),A("div",Q1,"加载中")):n.value?($(),A(je,{key:2},[l("div",o0,[l("div",a0,[Ce(He,{name:"search",size:14,class:"search-icon"}),Me(l("input",{class:"input","onUpdate:modelValue":pe[3]||(pe[3]=De=>g.value=De),placeholder:"搜索系统名称、账号或备注"},null,512),[[Ne,g.value]])]),pe[16]||(pe[16]=l("span",{class:"flex1"},null,-1)),l("button",{class:"btn btn-sm",onClick:Ee},"修改主密码"),l("button",{class:"btn btn-sm",onClick:ne},"锁定"),l("button",{class:"btn btn-primary btn-sm",onClick:Pe},"新增账号")]),l("div",i0,[l("table",l0,[pe[18]||(pe[18]=l("thead",null,[l("tr",null,[l("th",null,"系统名称"),l("th",null,"账号"),l("th",null,"密码"),l("th",null,"备注"),l("th",{class:"th-ops"},"操作")])],-1)),l("tbody",null,[($(!0),A(je,null,et(M.value,De=>($(),A("tr",{key:De.id},[l("td",u0,W(De.system),1),l("td",null,[l("span",{class:"copyable",title:"点击复制账号",onClick:ct=>ye(De)},W(De.account),9,c0)]),l("td",null,[l("div",d0,[l("span",f0,W(_.value[De.id]?De.passwordPlain:"........"),1),l("button",{class:"btn btn-xs",onClick:ct=>Ie(De)},W(_.value[De.id]?"隐藏":"显示"),9,p0),l("button",{class:"btn btn-xs",onClick:ct=>Ae(De)},"复制",8,v0)])]),l("td",m0,W(De.remark||"--"),1),l("td",h0,[l("div",y0,[l("button",{class:"btn btn-xs",onClick:ct=>Ue(De)},"编辑",8,g0),l("button",{class:"btn btn-xs",onClick:ct=>J.value=De},"删除",8,b0)])])]))),128)),M.value.length?ge("",!0):($(),A("tr",w0,[...pe[17]||(pe[17]=[l("td",{colspan:"5",class:"empty muted"},"暂无账号,点击右上角新增",-1)])]))])])]),l("div",_0,"共 "+W(b.value.length)+" 条账号记录 · 密码以 AES-256-GCM 加密,服务器仅存密文",1)],64)):($(),A("div",Z1,[l("div",e0,[Ce(He,{name:"lock",size:26})]),t.value===!1?($(),A(je,{key:0},[pe[12]||(pe[12]=l("div",{class:"lock-title"},"设置主密码",-1)),pe[13]||(pe[13]=l("div",{class:"muted lock-tip"},"主密码用于加密保存在本机的账号密码,遗忘后无法找回,请务必牢记",-1)),Me(l("input",{type:"password",class:"input","onUpdate:modelValue":pe[0]||(pe[0]=De=>o.value=De),placeholder:"设置主密码(至少 6 位)",onKeydown:Mt(E,["enter"])},null,544),[[Ne,o.value]]),Me(l("input",{type:"password",class:"input","onUpdate:modelValue":pe[1]||(pe[1]=De=>i.value=De),placeholder:"再次输入主密码",onKeydown:Mt(E,["enter"])},null,544),[[Ne,i.value]]),c.value?($(),A("div",t0,W(c.value),1)):ge("",!0),l("button",{class:"btn btn-primary lock-btn",disabled:r.value,onClick:E},"完成设置并解锁",8,n0)],64)):($(),A(je,{key:1},[pe[14]||(pe[14]=l("div",{class:"lock-title"},"密码库已锁定",-1)),pe[15]||(pe[15]=l("div",{class:"muted lock-tip"},"输入主密码解锁后查看与复制密码",-1)),Me(l("input",{type:"password",class:"input","onUpdate:modelValue":pe[2]||(pe[2]=De=>f.value=De),placeholder:"主密码",onKeydown:Mt(I,["enter"])},null,544),[[Ne,f.value]]),v.value?($(),A("div",s0,W(v.value),1)):ge("",!0),l("button",{class:"btn btn-primary lock-btn",disabled:r.value,onClick:I},"解锁",8,r0)],64))])),Ce(J1,{open:T.value,title:x.value?"编辑账号":"新增账号",initial:j.value,onCancel:pe[4]||(pe[4]=De=>T.value=!1),onSave:de},null,8,["open","title","initial"]),Ce(Dn,{open:!!J.value,title:"删除确认",message:J.value?"将删除系统「"+J.value.system+"」的账号记录。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:pe[5]||(pe[5]=De=>J.value=null),onConfirm:ke},null,8,["open","message"]),($(),St(Hn,{to:"body"},[Ce(lr,{name:"modal"},{default:ms(()=>[oe.value?($(),A("div",{key:0,class:"mask",onClick:pe[11]||(pe[11]=zt(De=>oe.value=!1,["self"]))},[l("div",k0,[l("div",x0,[pe[19]||(pe[19]=l("span",{class:"dialog-title"},"修改主密码",-1)),l("button",{class:"icon-btn",title:"关闭",onClick:pe[6]||(pe[6]=De=>oe.value=!1)},[Ce(He,{name:"close",size:16})])]),l("div",C0,[l("div",$0,[pe[20]||(pe[20]=l("label",null,"旧主密码",-1)),Me(l("input",{type:"password",class:"input","onUpdate:modelValue":pe[7]||(pe[7]=De=>ue.value=De)},null,512),[[Ne,ue.value]])]),l("div",S0,[pe[21]||(pe[21]=l("label",null,"新主密码(至少 6 位)",-1)),Me(l("input",{type:"password",class:"input","onUpdate:modelValue":pe[8]||(pe[8]=De=>ce.value=De)},null,512),[[Ne,ce.value]])]),l("div",E0,[pe[22]||(pe[22]=l("label",null,"确认新主密码",-1)),Me(l("input",{type:"password",class:"input","onUpdate:modelValue":pe[9]||(pe[9]=De=>q.value=De)},null,512),[[Ne,q.value]])]),S.value?($(),A("div",T0,W(S.value),1)):ge("",!0),pe[23]||(pe[23]=l("div",{class:"muted vp-tip"},"确认后所有账号密码将使用新主密码重新加密",-1))]),l("div",A0,[l("button",{class:"btn btn-sm",onClick:pe[10]||(pe[10]=De=>oe.value=!1)},"取消"),l("button",{class:"btn btn-primary btn-sm",onClick:Le},"确认修改")])])])):ge("",!0)]),_:1})]))]))}}),M0=Vt(O0,[["__scopeId","data-v-c2db283d"]]);function I0(e){return'"'+(e==null?"":String(e)).replace(/"/g,'""')+'"'}async function Uu(e,t){const r="\uFEFF"+t.map(f=>f.map(I0).join(",")).join(`\r -`);if(ar.isNativePlatform()){const{downloadText:f}=await Od(async()=>{const{downloadText:v}=await Promise.resolve().then(()=>Dg);return{downloadText:v}},void 0,import.meta.url);return f(e,r)}const o=new Blob([r],{type:"text/csv;charset=utf-8"}),i=URL.createObjectURL(o),c=document.createElement("a");return c.href=i,c.download=e,c.click(),window.setTimeout(()=>URL.revokeObjectURL(i),1e4),""}const j0={class:"settings"},D0={class:"card section"},L0={class:"muted acc-line"},R0={class:"ai-grid"},K0={class:"rule-item"},N0={class:"rule-item"},F0={class:"rule-item"},V0={key:0,class:"form-error"},B0={class:"rule-save"},U0={class:"card section"},q0={class:"rule-grid"},H0={class:"rule-item"},z0={class:"rule-item"},W0={class:"rule-item"},G0={class:"rule-item"},Y0={class:"rule-item"},J0={class:"card section"},X0={class:"proj-add"},Q0={key:0,class:"muted proj-tip"},Z0=["onKeydown"],ek=["onClick"],tk=["onClick"],nk=["onClick"],sk={key:1,class:"muted"},rk={class:"card section"},ok={class:"card section"},ak={class:"muted acc-line"},ik={class:"rule-save"},lk=["disabled"],uk={key:0,class:"muted acc-line"},ck={key:1,class:"form-error"},dk={key:2,class:"form-error"},fk={class:"card section"},pk={class:"ai-grid"},vk={class:"rule-item"},mk={class:"rule-item"},hk={class:"rule-item"},yk={class:"card section"},gk={class:"cat-block"},bk={class:"cat-head"},wk={class:"cat-chips"},_k=["onClick"],kk=["onClick"],xk={class:"cat-block"},Ck={class:"cat-head"},$k={class:"cat-chips"},Sk=["onClick"],Ek=["onClick"],Tk={class:"cat-block"},Ak={class:"cat-head"},Pk={class:"cat-chips"},Ok=["onClick"],Mk=["onClick"],Ik={class:"card section"},jk={class:"backup-row"},Dk={key:0,class:"import-error"},Lk=Rt({__name:"SettingsView",setup(e){var le;const t=O({work_start:"09:00",work_end:"18:00",grace_minutes:10,lunch_minutes:60,remind_weekly:"friday"}),n=O([]),r=O(""),o=O(""),i=O(""),c=O(""),f=O(""),v=O(""),b=O(null),g=O(""),_=O([]),T=O([]),x=O([]);async function j(){_.value=await Qr(),T.value=await zr("expense"),x.value=await zr("income")}async function J(ee){const P=window.prompt("新分类名称");if(!P||!P.trim())return;const Z=ee==="log"?_.value:ee==="expense"?T.value:x.value,te=P.trim();if(Z.includes(te)){Ve("分类已存在");return}const Se=[...Z,te];ee==="log"?(_.value=Se,await bi(Se)):ee==="expense"?(T.value=Se,await Ts("expense",Se)):(x.value=Se,await Ts("income",Se)),Ve("分类已添加")}async function oe(ee,P,Z){const te=window.prompt("修改分类名称",Z);if(!te||!te.trim()||te.trim()===Z)return;const we=(ee==="log"?_.value:ee==="expense"?T.value:x.value).map((Re,Te)=>Te===P?te.trim():Re);ee==="log"?(_.value=we,await bi(we)):ee==="expense"?(T.value=we,await Ts("expense",we)):(x.value=we,await Ts("income",we)),Ve("分类已更新(历史记录自动跟随显示)")}async function ue(ee,P){const Z=ee==="log"?_.value:ee==="expense"?T.value:x.value;if(Z.length<=1){Ve("至少保留一个分类");return}if(!window.confirm("删除分类「"+Z[P]+"」?历史记录不受影响。"))return;const te=Z.filter((Se,we)=>we!==P);ee==="log"?(_.value=te,await bi(te)):ee==="expense"?(T.value=te,await Ts("expense",te)):(x.value=te,await Ts("income",te)),Ve("分类已删除")}const ce=O(null),q=O(null),S=O(""),H=O(((le=qr())==null?void 0:le.username)||""),Q=O(""),G=O(""),re=O(""),M=O(""),E=O(!1),I="0.5.0",ne=O(""),Ie=O(""),Ae=O(""),ye=O(""),Pe=O(!1),Ue=O("");async function de(){var ee;ne.value=((ee=wn())==null?void 0:ee.username)||"",Ue.value=await Nm(),ye.value=Zs.value}yt(Zs,ee=>{ye.value=ee});async function ke(){Ae.value="";try{await gd(),Ve("云端绑定已重建")}catch(ee){Ae.value=ee instanceof Error?ee.message:"绑定失败"}}async function Ee(){if(!Pe.value){Ae.value="",ye.value=Zs.value,Pe.value=!0;try{const ee=await Bi();Ue.value=ee.at,Ie.value="推送 "+ee.pushed+" 条 · 拉取 "+ee.pulled+" 条 · 删除 "+ee.removed+" 条",ye.value="",Ve("同步完成")}catch(ee){Ae.value=ee instanceof Error?ee.message:"同步失败"}Pe.value=!1}}async function Le(){if(M.value="",G.value!==re.value){M.value="两次输入的新密码不一致";return}try{await Im(Q.value,G.value),Q.value="",G.value="",re.value="",Ve("登录密码已修改")}catch(ee){M.value=ee instanceof Error?ee.message:"修改失败"}}async function $e(){await jm(),window.location.reload()}async function pe(){t.value=await ps(),n.value=await rr(!0),i.value=(await ml()).join(` -`),c.value=await xt("ai_base_url",""),f.value=await xt("ai_api_key",""),v.value=await xt("ai_model",""),await de(),await j()}async function De(){await jt("ai_base_url",c.value.trim()),await jt("ai_api_key",f.value.trim()),await jt("ai_model",v.value.trim()),Ve("AI 配置已保存")}async function ct(){const ee=ot(),P=await Promise.all([Xr("2000-01-01",ee),rr(!0)]),Z=P[0],te=P[1],Se=new Map(te.map(Te=>[Te.id,Te.name])),we=[["日期","分类","项目","内容","耗时(分钟)","成果","待跟进","收获","备注"]];for(const Te of Z)we.push([Te.date,categoryLabel(Te.category),Te.project_id&&Se.get(Te.project_id)||"",Te.content,Te.minutes==null?"":Te.minutes,Te.is_milestone?"是":"",Te.needs_followup?"是":"",Te.takeaway||"",Te.remark||""]);const Re=await Uu("工作记录_"+ee.replace(/-/g,"")+".csv",we);Ve(Re?"CSV 已导出到:"+Re:"CSV 已导出到系统下载目录")}async function gt(){const ee=ot(),P=await Promise.all([ps(),Jr("2000-01-01",ee)]),Z=P[0],te=P[1],Se=["周日","周一","周二","周三","周四","周五","周六"],we=[["日期","星期","状态","上班时间","下班时间","地点","类型","说明"]];for(const Te of te){const Xe=cr(Te,Te.date,Z,Te.date===ee);we.push([Te.date,Se[Ks(Te.date).getDay()],Xe.label,Te.clock_in_at?bn(Te.clock_in_at):"",Te.clock_out_at?bn(Te.clock_out_at):"",Te.location||"",Te.kind==="makeup"?"补卡":Te.kind==="leave"?"休假":"正常",Te.note||""])}const Re=await Uu("考勤记录_"+ee.replace(/-/g,"")+".csv",we);Ve(Re?"CSV 已导出到:"+Re:"CSV 已导出到系统下载目录")}vn(pe);async function bt(){await jt("work_start",t.value.work_start),await jt("work_end",t.value.work_end),await jt("grace_minutes",String(t.value.grace_minutes)),await jt("lunch_minutes",String(t.value.lunch_minutes)),await jt("remind_weekly",t.value.remind_weekly),Ve("打卡规则已保存")}async function wt(){await Cd(i.value.split(` -`)),Ve("常用地点已保存")}async function It(){const ee=r.value.trim();if(ee){try{await th(ee),o.value="",r.value=""}catch{o.value="项目名已存在"}await pe()}}function fe(ee){b.value=ee.id,g.value=ee.name}async function h(ee){const P=g.value.trim();if(P)try{await nh(ee.id,P),o.value=""}catch{o.value="项目名已存在"}b.value=null,await pe()}async function y(ee){await sh(ee.id,ee.archived!==1),await pe()}async function C(){try{const ee=await Fh(),P=await Sa("实习日志备份_"+ot().replace(/-/g,"")+".json",ee);Ve(P?"备份已导出到:"+P:"备份已导出到系统下载目录")}catch(ee){Ve("导出失败:"+(ee instanceof Error?ee.message:String(ee)))}}function R(ee){const P=ee.target,Z=P.files&&P.files[0];if(S.value="",!Z)return;const te=Z.name;Z.text().then(Se=>{q.value={name:te,text:Se}}),P.value=""}async function F(){if(q.value)try{await Vh(q.value.text),q.value=null,S.value="",await pe(),Ve("数据导入完成")}catch(ee){q.value=null,S.value=ee instanceof Error?ee.message:"导入失败"}}return(ee,P)=>($(),A("div",j0,[l("div",D0,[P[25]||(P[25]=l("div",{class:"section-title"},"账号与隐私",-1)),l("div",L0,"v"+W(un(I))+" · 当前账号 "+W(H.value)+" · 登录密码仅存 PBKDF2 哈希",1),l("div",R0,[l("div",K0,[P[22]||(P[22]=l("label",null,"旧登录密码",-1)),Me(l("input",{type:"password",class:"input","onUpdate:modelValue":P[0]||(P[0]=Z=>Q.value=Z)},null,512),[[Ne,Q.value]])]),l("div",N0,[P[23]||(P[23]=l("label",null,"新登录密码(至少 6 位)",-1)),Me(l("input",{type:"password",class:"input","onUpdate:modelValue":P[1]||(P[1]=Z=>G.value=Z)},null,512),[[Ne,G.value]])]),l("div",F0,[P[24]||(P[24]=l("label",null,"确认新登录密码",-1)),Me(l("input",{type:"password",class:"input","onUpdate:modelValue":P[2]||(P[2]=Z=>re.value=Z)},null,512),[[Ne,re.value]])])]),M.value?($(),A("div",V0,W(M.value),1)):ge("",!0),l("div",B0,[l("button",{class:"btn btn-primary btn-sm",onClick:Le},"修改登录密码"),l("button",{class:"btn btn-sm btn-danger",onClick:P[3]||(P[3]=Z=>E.value=!0)},"删除此用户及全部数据")])]),l("div",U0,[P[32]||(P[32]=l("div",{class:"section-title"},"打卡规则",-1)),l("div",q0,[l("div",H0,[P[26]||(P[26]=l("label",null,"上班时间",-1)),Me(l("input",{type:"time",class:"input","onUpdate:modelValue":P[4]||(P[4]=Z=>t.value.work_start=Z)},null,512),[[Ne,t.value.work_start]])]),l("div",z0,[P[27]||(P[27]=l("label",null,"下班时间",-1)),Me(l("input",{type:"time",class:"input","onUpdate:modelValue":P[5]||(P[5]=Z=>t.value.work_end=Z)},null,512),[[Ne,t.value.work_end]])]),l("div",W0,[P[28]||(P[28]=l("label",null,"迟到宽限(分钟)",-1)),Me(l("input",{type:"number",class:"input",min:"0","onUpdate:modelValue":P[6]||(P[6]=Z=>t.value.grace_minutes=Z)},null,512),[[Ne,t.value.grace_minutes,void 0,{number:!0}]])]),l("div",G0,[P[29]||(P[29]=l("label",null,"午休扣除(分钟)",-1)),Me(l("input",{type:"number",class:"input",min:"0","onUpdate:modelValue":P[7]||(P[7]=Z=>t.value.lunch_minutes=Z)},null,512),[[Ne,t.value.lunch_minutes,void 0,{number:!0}]])]),l("div",Y0,[P[31]||(P[31]=l("label",null,"周记提醒",-1)),Me(l("select",{class:"select","onUpdate:modelValue":P[8]||(P[8]=Z=>t.value.remind_weekly=Z)},[...P[30]||(P[30]=[l("option",{value:"friday"},"每周五提醒",-1),l("option",{value:"off"},"关闭",-1)])],512),[[fs,t.value.remind_weekly]])])]),l("div",{class:"rule-save"},[l("button",{class:"btn btn-primary btn-sm",onClick:bt},"保存规则")])]),l("div",J0,[P[33]||(P[33]=l("div",{class:"section-title"},"项目管理",-1)),l("div",X0,[Me(l("input",{class:"input","onUpdate:modelValue":P[9]||(P[9]=Z=>r.value=Z),placeholder:"新项目名称",onKeydown:Mt(It,["enter"])},null,544),[[Ne,r.value]]),l("button",{class:"btn btn-sm",onClick:It},"添加")]),o.value?($(),A("div",Q0,W(o.value),1)):ge("",!0),($(!0),A(je,null,et(n.value,Z=>($(),A("div",{key:Z.id,class:"proj-row"},[b.value===Z.id?($(),A(je,{key:0},[Me(l("input",{class:"input","onUpdate:modelValue":P[10]||(P[10]=te=>g.value=te),onKeydown:Mt(te=>h(Z),["enter"])},null,40,Z0),[[Ne,g.value]]),l("button",{class:"btn btn-sm",onClick:te=>h(Z)},"保存",8,ek),l("button",{class:"btn btn-sm",onClick:P[11]||(P[11]=te=>b.value=null)},"取消")],64)):($(),A(je,{key:1},[l("span",{class:Ze(["proj-name",{archived:Z.archived===1}])},W(Z.name),3),l("button",{class:"icon-btn",title:"重命名",onClick:te=>fe(Z)},[Ce(He,{name:"edit",size:14})],8,tk),l("button",{class:"btn btn-sm",onClick:te=>y(Z)},W(Z.archived===1?"恢复":"归档"),9,nk)],64))]))),128)),n.value.length?ge("",!0):($(),A("div",sk,"暂无项目,先添加一个"))]),l("div",rk,[P[35]||(P[35]=l("div",{class:"section-title"},"常用地点",-1)),Me(l("textarea",{class:"textarea","onUpdate:modelValue":P[12]||(P[12]=Z=>i.value=Z),placeholder:"每行一个地点,如:公司、客户现场、出差、居家办公"},null,512),[[Ne,i.value]]),l("div",{class:"rule-save"},[l("button",{class:"btn btn-primary btn-sm",onClick:wt},"保存地点"),P[34]||(P[34]=l("span",{class:"muted loc-note"},"打卡时可直接输入新地点,保存后自动加入列表",-1))])]),l("div",ok,[P[36]||(P[36]=l("div",{class:"section-title"},"多端数据同步",-1)),l("div",ak,"云端账号:"+W(ne.value||"未绑定")+" · 数据存于服务器,其他端变更秒级自动刷新",1),l("div",ik,[l("button",{class:"btn btn-primary btn-sm",disabled:Pe.value,onClick:Ee},W(Pe.value?"同步中":"立即同步"),9,lk),l("button",{class:"btn btn-sm",onClick:ke},"重新校验连接")]),Ie.value?($(),A("div",uk,"上次同步:"+W(Ue.value||"--")+" · "+W(Ie.value),1)):ge("",!0),Ae.value?($(),A("div",ck,W(Ae.value),1)):ge("",!0),ye.value?($(),A("div",dk,"最近自动同步失败:"+W(ye.value)+"(可点「立即同步」重试)",1)):ge("",!0)]),l("div",fk,[P[41]||(P[41]=l("div",{class:"section-title"},"AI 润色配置(可选)",-1)),l("div",pk,[l("div",vk,[P[37]||(P[37]=l("label",null,"接口地址(OpenAI 兼容,到 /v1 为止)",-1)),Me(l("input",{class:"input","onUpdate:modelValue":P[13]||(P[13]=Z=>c.value=Z),placeholder:"https://api.example.com/v1"},null,512),[[Ne,c.value]])]),l("div",mk,[P[38]||(P[38]=l("label",null,"API Key",-1)),Me(l("input",{class:"input","onUpdate:modelValue":P[14]||(P[14]=Z=>f.value=Z),placeholder:"sk-..."},null,512),[[Ne,f.value]])]),l("div",hk,[P[39]||(P[39]=l("label",null,"模型名称",-1)),Me(l("input",{class:"input","onUpdate:modelValue":P[15]||(P[15]=Z=>v.value=Z),placeholder:"如:deepseek-chat"},null,512),[[Ne,v.value]])])]),l("div",{class:"rule-save"},[l("button",{class:"btn btn-primary btn-sm",onClick:De},"保存 AI 配置"),P[40]||(P[40]=l("span",{class:"muted loc-note"},"配置仅保存在本机;总结页「AI 润色」需此处先配置",-1))])]),l("div",yk,[P[45]||(P[45]=l("div",{class:"section-title"},"工作分类",-1)),l("div",gk,[l("div",bk,[P[42]||(P[42]=l("span",{class:"muted"},"工作记录分类",-1)),l("button",{class:"btn btn-xs",onClick:P[16]||(P[16]=Z=>J("log"))},"添加")]),l("div",wk,[($(!0),A(je,null,et(_.value,(Z,te)=>($(),A("span",{key:Z+te,class:"cat-chip"},[vt(W(Z)+" ",1),l("button",{class:"chip-btn",title:"修改",onClick:Se=>oe("log",te,Z)},"改",8,_k),l("button",{class:"chip-btn",title:"删除",onClick:Se=>ue("log",te)},"删",8,kk)]))),128))])]),l("div",xk,[l("div",Ck,[P[43]||(P[43]=l("span",{class:"muted"},"记账支出分类",-1)),l("button",{class:"btn btn-xs",onClick:P[17]||(P[17]=Z=>J("expense"))},"添加")]),l("div",$k,[($(!0),A(je,null,et(T.value,(Z,te)=>($(),A("span",{key:Z+te,class:"cat-chip"},[vt(W(Z)+" ",1),l("button",{class:"chip-btn",title:"修改",onClick:Se=>oe("expense",te,Z)},"改",8,Sk),l("button",{class:"chip-btn",title:"删除",onClick:Se=>ue("expense",te)},"删",8,Ek)]))),128))])]),l("div",Tk,[l("div",Ak,[P[44]||(P[44]=l("span",{class:"muted"},"记账收入分类",-1)),l("button",{class:"btn btn-xs",onClick:P[18]||(P[18]=Z=>J("income"))},"添加")]),l("div",Pk,[($(!0),A(je,null,et(x.value,(Z,te)=>($(),A("span",{key:Z+te,class:"cat-chip"},[vt(W(Z)+" ",1),l("button",{class:"chip-btn",title:"修改",onClick:Se=>oe("income",te,Z)},"改",8,Ok),l("button",{class:"chip-btn",title:"删除",onClick:Se=>ue("income",te)},"删",8,Mk)]))),128))])])]),l("div",Ik,[P[46]||(P[46]=l("div",{class:"section-title"},"数据备份",-1)),l("div",jk,[l("button",{class:"btn btn-sm",onClick:C},"导出 JSON 备份"),l("button",{class:"btn btn-sm",onClick:P[19]||(P[19]=Z=>{var te;return(te=ce.value)==null?void 0:te.click()})},"导入 JSON 备份"),l("button",{class:"btn btn-sm",onClick:ct},"导出工作记录 CSV"),l("button",{class:"btn btn-sm",onClick:gt},"导出考勤 CSV"),l("input",{ref_key:"fileInput",ref:ce,type:"file",accept:"application/json,.json",style:{display:"none"},onChange:R},null,544)]),S.value?($(),A("div",Dk,W(S.value),1)):ge("",!0),P[47]||(P[47]=l("div",{class:"muted backup-note"},"数据保存在云端服务器;导出的 JSON 备份用于跨设备迁移或灾后恢复。",-1))]),Ce(Dn,{open:!!q.value,title:"导入确认",message:q.value?"将从文件「"+q.value.name+"」导入备份。现有全部数据将被覆盖,且不可恢复,请先确认已导出当前备份。":"","confirm-text":"覆盖导入",danger:"",onCancel:P[20]||(P[20]=Z=>q.value=null),onConfirm:F},null,8,["open","message"]),Ce(Dn,{open:E.value,title:"删除用户确认",message:"将永久删除云端账号「"+H.value+"」及其服务器上的全部数据:工作日志、考勤、备忘录、账号密码库都将被清除,任何设备都无法再取回,且不可恢复。请确认。","confirm-text":"永久删除",danger:"",onCancel:P[21]||(P[21]=Z=>E.value=!1),onConfirm:$e},null,8,["open","message"])]))}}),Rk=Vt(Lk,[["__scopeId","data-v-d8d0f782"]]),Kk={class:"admin-page"},Nk={class:"card sec"},Fk={class:"toolbar"},Vk={key:0,class:"form-error"},Bk={class:"card table-card admin-table-card"},Uk={class:"admin-table"},qk={class:"td-name","data-label":"用户名"},Hk={"data-label":"角色"},zk={key:0,class:"role-badge"},Wk={key:1,class:"muted"},Gk={class:"muted num","data-label":"创建时间"},Yk={class:"muted num","data-label":"数据量"},Jk={class:"td-ops"},Xk={class:"ops"},Qk=["onClick"],Zk=["disabled","onClick"],ex={key:0},tx={key:0,class:"muted load-line"},nx={class:"dialog create-dialog",role:"dialog","aria-label":"新增用户"},sx={class:"dialog-head"},rx={class:"dialog-body"},ox={class:"form-row"},ax={class:"form-row"},ix={class:"form-row"},lx={key:0,class:"form-error"},ux={class:"dialog-btns"},cx=["disabled"],dx={class:"dialog create-dialog",role:"dialog","aria-label":"重置密码"},fx={class:"dialog-head"},px={class:"dialog-title"},vx={class:"dialog-body"},mx={class:"form-row"},hx={key:0,class:"form-error"},yx={class:"dialog-btns"},gx=["disabled"],bx=Rt({__name:"UserAdminView",setup(e){const t=O([]),n=O(""),r=O(!0),o=O("");async function i(M,E){const I=await Ns();let ne=$a();if(!ne){const Ae=wn(),ye=await fetch(I+"/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:Ae==null?void 0:Ae.username,password:Ae==null?void 0:Ae.password})});if(ye.ok){const Pe=await ye.json();ne=String(Pe.token||""),Ur(ne)}}const Ie=await fetch(I+M,{method:E?"POST":"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+ne},body:E?JSON.stringify(E):void 0});if(Ie.status===401&&wn()){const Ae=wn(),ye=await fetch(I+"/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:Ae==null?void 0:Ae.username,password:Ae==null?void 0:Ae.password})});if(ye.ok){const Pe=await ye.json();ne=String(Pe.token||""),Ur(ne);const Ue=await fetch(I+M,{method:E?"POST":"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+ne},body:E?JSON.stringify(E):void 0});return{ok:Ue.ok,status:Ue.status,data:await Ue.json().catch(()=>({}))}}}return{ok:Ie.ok,status:Ie.status,data:await Ie.json().catch(()=>({}))}}async function c(){r.value=!0,o.value="";const M=await i("/api/admin/users");if(!M.ok){r.value=!1,o.value=M.data&&M.data.error||"加载失败 "+M.status;return}t.value=M.data.users||[],n.value=M.data.me||"",r.value=!1}function f(M){return M<=0?"--":M<1024?M+" B":M<1024*1024?(M/1024).toFixed(1)+" KB":(M/1024/1024).toFixed(2)+" MB"}function v(M){return(M||"").slice(0,10)}const b=O(!1),g=O(""),_=O(""),T=O(""),x=O(""),j=O(!1);function J(){b.value=!0,x.value="",g.value="",_.value="",T.value=""}async function oe(){const M=g.value.trim();if(_.value!==T.value){x.value="两次输入的密码不一致";return}if(_.value.length<6){x.value="密码至少 6 位";return}j.value=!0;const E=await i("/api/admin/users/create",{username:M,password:_.value});if(j.value=!1,!E.ok){x.value=E.data&&E.data.error||"创建失败 "+E.status;return}Ve("用户「"+M+"」已创建"),b.value=!1,await c()}const ue=O(null),ce=O(""),q=O(""),S=O(!1);function H(M){ue.value=M,ce.value="",q.value=""}async function Q(){if(!ue.value)return;if(ce.value.length<6){q.value="密码至少 6 位";return}S.value=!0;const M=await i("/api/admin/users/password",{userId:ue.value.id,newPassword:ce.value});if(S.value=!1,!M.ok){q.value=M.data&&M.data.error||"重置失败 "+M.status;return}Ve("已重置「"+ue.value.username+"」的登录密码"),ue.value=null}const G=O(null);async function re(){if(!G.value)return;const M=await i("/api/admin/users/delete",{userId:G.value.id});if(!M.ok){G.value=null,Ve(M.data&&M.data.error||"删除失败");return}Ve("已删除账号「"+G.value.username+"」及其全部云端数据"),G.value=null,await c()}return vn(c),(M,E)=>($(),A("div",Kk,[l("div",Nk,[l("div",Fk,[E[12]||(E[12]=l("div",{class:"head-wrap"},[l("div",{class:"sec-title"},"用户管理"),l("div",{class:"muted head-sub"},"云端账号统一管理 · 管理员:xionglin")],-1)),l("button",{class:"btn btn-primary btn-sm",onClick:J},[Ce(He,{name:"plus",size:14}),E[11]||(E[11]=vt(" 新增用户 ",-1))])]),o.value?($(),A("div",Vk,W(o.value),1)):ge("",!0)]),l("div",Bk,[l("table",Uk,[E[14]||(E[14]=l("thead",null,[l("tr",null,[l("th",null,"用户名"),l("th",null,"角色"),l("th",null,"创建时间"),l("th",null,"数据量"),l("th",{class:"th-ops"},"操作")])],-1)),l("tbody",null,[($(!0),A(je,null,et(t.value,I=>($(),A("tr",{key:I.id},[l("td",qk,W(I.username),1),l("td",Hk,[I.role==="admin"?($(),A("span",zk,"管理员")):($(),A("span",Wk,"普通用户"))]),l("td",Gk,W(v(I.created_at)),1),l("td",Yk,W(f(I.data_bytes)),1),l("td",Jk,[l("div",Xk,[l("button",{class:"btn btn-xs",onClick:ne=>H(I)},"重置密码",8,Qk),l("button",{class:"btn btn-xs btn-danger",disabled:I.id===n.value,onClick:ne=>G.value=I},"删除",8,Zk)])])]))),128)),!r.value&&!t.value.length?($(),A("tr",ex,[...E[13]||(E[13]=[l("td",{colspan:"5",class:"empty muted"},"加载结果为空",-1)])])):ge("",!0)])]),r.value?($(),A("div",tx,"加载中")):ge("",!0)]),E[20]||(E[20]=l("div",{class:"muted admin-note"},"重置密码立即生效;删除账号将移除其全部云端数据,不可恢复。自己的账号不能删除。",-1)),($(),St(Hn,{to:"body"},[b.value?($(),A("div",{key:0,class:"fixed-mask",onClick:E[5]||(E[5]=zt(I=>b.value=!1,["self"]))},[l("div",nx,[l("div",sx,[E[15]||(E[15]=l("span",{class:"dialog-title"},"新增用户",-1)),l("button",{class:"icon-btn",onClick:E[0]||(E[0]=I=>b.value=!1)},[Ce(He,{name:"close",size:16})])]),l("div",rx,[l("div",ox,[E[16]||(E[16]=l("label",null,"用户名(2 到 20 个字符)",-1)),Me(l("input",{class:"input","onUpdate:modelValue":E[1]||(E[1]=I=>g.value=I),placeholder:"如:xiaowang"},null,512),[[Ne,g.value]])]),l("div",ax,[E[17]||(E[17]=l("label",null,"初始登录密码(至少 6 位)",-1)),Me(l("input",{class:"input",type:"password","onUpdate:modelValue":E[2]||(E[2]=I=>_.value=I),placeholder:"转发给使用者,登录后可自行修改"},null,512),[[Ne,_.value]])]),l("div",ix,[E[18]||(E[18]=l("label",null,"确认密码",-1)),Me(l("input",{class:"input",type:"password","onUpdate:modelValue":E[3]||(E[3]=I=>T.value=I),onKeydown:Mt(oe,["enter"])},null,544),[[Ne,T.value]])]),x.value?($(),A("div",lx,W(x.value),1)):ge("",!0)]),l("div",ux,[l("button",{class:"btn btn-sm",onClick:E[4]||(E[4]=I=>b.value=!1)},"取消"),l("button",{class:"btn btn-primary btn-sm",disabled:j.value||!g.value.trim(),onClick:oe},W(j.value?"创建中":"创建"),9,cx)])])])):ge("",!0)])),($(),St(Hn,{to:"body"},[ue.value?($(),A("div",{key:0,class:"fixed-mask",onClick:E[9]||(E[9]=zt(I=>ue.value=null,["self"]))},[l("div",dx,[l("div",fx,[l("span",px,"重置「"+W(ue.value.username)+"」的登录密码",1),l("button",{class:"icon-btn",onClick:E[6]||(E[6]=I=>ue.value=null)},[Ce(He,{name:"close",size:16})])]),l("div",vx,[l("div",mx,[E[19]||(E[19]=l("label",null,"新登录密码(至少 6 位)",-1)),Me(l("input",{class:"input",type:"password","onUpdate:modelValue":E[7]||(E[7]=I=>ce.value=I),onKeydown:Mt(Q,["enter"])},null,544),[[Ne,ce.value]])]),q.value?($(),A("div",hx,W(q.value),1)):ge("",!0)]),l("div",yx,[l("button",{class:"btn btn-sm",onClick:E[8]||(E[8]=I=>ue.value=null)},"取消"),l("button",{class:"btn btn-primary btn-sm",disabled:S.value,onClick:Q},W(S.value?"提交中":"重置"),9,gx)])])])):ge("",!0)])),Ce(Dn,{open:!!G.value,title:"删除用户确认",message:G.value?"将永久删除云端账号「"+G.value.username+"」及其服务器上的全部数据,不可恢复。请确认。":"","confirm-text":"永久删除",danger:"",onCancel:E[10]||(E[10]=I=>G.value=null),onConfirm:re},null,8,["open","message"])]))}}),wx=Vt(bx,[["__scopeId","data-v-06be07ff"]]),_x={class:"login-page"},kx={class:"card login-card"},xx={class:"login-brand"},Cx={class:"brand-icon"},$x={class:"seg"},Sx=["placeholder"],Ex={key:1,class:"form-error"},Tx=["disabled"],Ax=Rt({__name:"LoginView",emits:["login"],setup(e,{emit:t}){const n=t,r=O("login"),o=O(""),i=O(""),c=O(""),f=O(""),v=O(!1);function b(_){r.value=_,f.value="",c.value=""}async function g(){if(!v.value){f.value="",v.value=!0;try{let _;if(r.value==="login")_=await Tm(o.value,i.value);else{if(i.value.length<6){f.value="登录密码至少 6 位",v.value=!1;return}if(i.value!==c.value){f.value="两次输入的密码不一致",v.value=!1;return}_=await Am(o.value,i.value)}n("login",_)}catch(_){f.value=_ instanceof Error?_.message:"操作失败"}v.value=!1}}return(_,T)=>($(),A("div",_x,[l("div",kx,[l("div",xx,[l("div",Cx,[Ce(He,{name:"calendar",size:22})]),T[5]||(T[5]=l("div",{class:"login-title"},"实习工作日志",-1)),T[6]||(T[6]=l("div",{class:"muted login-sub"},"打卡 · 记录 · 总结 · 备忘录 · 密码库",-1)),T[7]||(T[7]=l("div",{class:"muted login-sub"},"数据保存在云端服务器,所有设备登录同一账号即可实时同步",-1))]),l("div",$x,[l("button",{class:Ze(["seg-btn",{active:r.value==="login"}]),onClick:T[0]||(T[0]=x=>b("login"))},"登录",2),l("button",{class:Ze(["seg-btn",{active:r.value==="create"}]),onClick:T[1]||(T[1]=x=>b("create"))},"创建用户",2)]),Me(l("input",{class:"input","onUpdate:modelValue":T[2]||(T[2]=x=>o.value=x),placeholder:"用户名(2 到 20 个字符)",onKeydown:Mt(g,["enter"])},null,544),[[Ne,o.value]]),Me(l("input",{type:"password",class:"input","onUpdate:modelValue":T[3]||(T[3]=x=>i.value=x),placeholder:r.value==="login"?"登录密码":"设置登录密码(至少 6 位)",onKeydown:Mt(g,["enter"])},null,40,Sx),[[Ne,i.value]]),r.value==="create"?Me(($(),A("input",{key:0,type:"password",class:"input","onUpdate:modelValue":T[4]||(T[4]=x=>c.value=x),placeholder:"再次输入密码",onKeydown:Mt(g,["enter"])},null,544)),[[Ne,c.value]]):ge("",!0),f.value?($(),A("div",Ex,W(f.value),1)):ge("",!0),l("button",{class:"btn btn-primary login-btn",disabled:v.value,onClick:g},W(r.value==="login"?"登录":"创建并进入"),9,Tx),T[8]||(T[8]=l("div",{class:"muted login-note"}," 登录密码仅服务器保存哈希;本机保存加密的自动登录凭据,登录后无需重复输入 ",-1))])]))}}),Px=Vt(Ax,[["__scopeId","data-v-bf714afa"]]),Ox={key:1,class:"app"},Mx={class:"side"},Ix={key:0,class:"nav-sep"},jx=["data-tip","onClick"],Dx={class:"main"},Lx={class:"topbar"},Rx={class:"title"},Kx={class:"gsearch"},Nx={key:0,class:"gs-panel"},Fx={key:0,class:"gs-group muted"},Vx=["onMousedown"],Bx={class:"tag"},Ux={class:"gs-text"},qx={class:"muted num gs-date"},Hx={key:1,class:"gs-group muted"},zx=["onMousedown"],Wx={class:"gs-text"},Gx={class:"muted gs-sub"},Yx={key:1,class:"gs-empty muted"},Jx={class:"topbar-actions"},Xx={class:"user-chip num mobile-hide"},Qx=["disabled"],Zx={class:"num"},eC={class:"content"},tC={class:"content-inner"},nC={class:"tabbar"},sC=["onClick"],rC={class:"sheet-user num"},oC=["onClick"],aC={class:"sheet-name"},iC={class:"msw"},lC={class:"msw-bar"},uC={class:"msw-results"},cC={key:0,class:"gs-group muted"},dC=["onMousedown"],fC={class:"tag"},pC={class:"gs-text"},vC={class:"muted num gs-date"},mC={key:1,class:"gs-group muted"},hC=["onMousedown"],yC={class:"gs-text"},gC={class:"muted gs-sub"},bC={key:1,class:"gs-empty muted"},wC={class:"toast-wrap"},_C=Rt({__name:"App",setup(e){const t=dy(),n=O(qr());async function r(h){n.value=h,ia(h.userId),location.hash="#/calendar",H.value="calendar",await De(),await fe(),c();try{await gd(),await tr()}catch{}Ve("欢迎,"+h.username);const y=sessionStorage.getItem("dsh_migrate_toast");y&&(sessionStorage.removeItem("dsh_migrate_toast"),Ve("已迁移原有数据 "+y+" 条"))}async function o(){Pe.value=!1,Ae.value=!1,qm(),i!==null&&(window.clearInterval(i),i=null),await Om(),n.value=null,H.value="calendar",location.hash="#/calendar",Ve("已退出登录")}let i=null;function c(){Um(),i!==null&&window.clearInterval(i),i=window.setInterval(()=>{tr()},60*1e3),tr()}const f=O(null),v=O(""),b=O(!1),g=O({logs:[],memos:[]});let _=null;const T=rt(()=>!!(g.value.logs.length||g.value.memos.length));function x(){_&&window.clearTimeout(_);const h=v.value;_=window.setTimeout(async()=>{const y=h.trim();if(!y){g.value={logs:[],memos:[]};return}const C=await Promise.all([Ih(y,8),jh(y,4)]);g.value={logs:C[0],memos:C[1]}},200)}function j(){v.value="",g.value={logs:[],memos:[]},b.value=!1}function J(h){Fi.value=h.date,Q("calendar"),j()}function oe(h){Vi.value=h.id,Q("memo"),j()}function ue(){window.setTimeout(()=>{b.value=!1},150)}function ce(h){var y;(h.ctrlKey||h.metaKey)&&h.key.toLowerCase()==="k"&&(h.preventDefault(),(y=f.value)==null||y.focus())}const q=[{key:"calendar",name:"日历",icon:"calendar",group:"记录"},{key:"today",name:"详情",icon:"edit",group:"记录"},{key:"plan",name:"计划",icon:"plan",group:"记录"},{key:"ledger",name:"记账",icon:"wallet",group:"工具"},{key:"memo",name:"备忘录",icon:"memo",group:"工具"},{key:"stats",name:"统计",icon:"chart",group:"分析"},{key:"report",name:"总结",icon:"export",group:"分析"},{key:"vault",name:"密码库",icon:"lock",group:"系统"},{key:"settings",name:"设置",icon:"settings",group:"系统"},{key:"admin",name:"用户管理",icon:"shield",group:"系统"}];function S(){var y;const h=(location.hash||"").replace("#/","");return!q.some(C=>C.key===h)||h==="admin"&&(((y=qr())==null?void 0:y.username)||"")!=="xionglin"?"calendar":h}const H=O(S());window.addEventListener("hashchange",()=>{H.value=S()});function Q(h){location.hash="#/"+h}const G=rt(()=>q.find(h=>h.key===H.value)||q[0]),re=rt(()=>{var h;return(((h=n.value)==null?void 0:h.username)||"")==="xionglin"}),M=rt(()=>re.value?q:q.filter(h=>h.key!=="admin")),E=rt(()=>{const h=q.filter(y=>!ne.includes(y.key));return re.value?h:h.filter(y=>y.key!=="admin")}),I=rt(()=>E.value.some(h=>h.key===H.value));yt([re,H],()=>{H.value==="admin"&&!re.value&&Q("calendar")},{immediate:!0});const ne=["calendar","today","plan","ledger"],Ie=q.filter(h=>ne.includes(h.key)),Ae=O(!1);function ye(h){Ae.value=!1,Q(h)}const Pe=O(!1),Ue=O(null);function de(){Pe.value=!0,window.setTimeout(()=>{var h;return(h=Ue.value)==null?void 0:h.focus()},60)}function ke(h){J(h),Pe.value=!1}function Ee(h){oe(h),Pe.value=!1}const Le=O(ot()),$e=O(void 0),pe=O(!1);async function De(){if($e.value=await _n(Le.value),pe.value=!1,new Date().getHours()<4){const y=await _n(Ft(Le.value,-1));pe.value=!!(y&&y.clock_in_at&&!y.clock_out_at)}}const ct=rt(()=>{const h=$e.value;return h&&h.clock_in_at&&!h.clock_out_at?!0:pe.value&&!(h&&h.clock_in_at)}),gt=rt(()=>{const h=$e.value;return!!(h&&h.clock_in_at&&h.clock_out_at)}),bt=rt(()=>{const h=$e.value;return ct.value?"下班打卡":gt.value?"已打卡 "+bn(h==null?void 0:h.clock_in_at)+" - "+bn(h==null?void 0:h.clock_out_at):"上班打卡"});async function wt(){if(ct.value)try{await oh()}catch{}else await $d(Le.value);await De(),os()}yt(ur,()=>{n.value&&De()});const It=O(!1);async function fe(){if((await ps()).remind_weekly==="off"){It.value=!1;return}const y=new Date().getDay();if(y===5||y===6||y===0){const C=await hl(Qs(Le.value));It.value=!C||!C.highlights&&!C.challenges&&!C.plan_next}else It.value=!1}return vn(async()=>{window.addEventListener("keydown",ce),n.value&&(ia(n.value.userId),await De(),await fe(),c())}),(h,y)=>{var C,R;return n.value?($(),A("div",Ox,[l("nav",Mx,[($(!0),A(je,null,et(M.value,(F,le)=>($(),A(je,{key:F.key},[le>0&&F.group!==M.value[le-1].group?($(),A("div",Ix)):ge("",!0),l("button",{class:Ze(["nav-btn",{active:H.value===F.key}]),"data-tip":F.name,onClick:ee=>Q(F.key)},[Ce(He,{name:F.icon,size:18},null,8,["name"])],10,jx)],64))),128))]),l("div",Dx,[l("header",Lx,[l("span",Rx,W(G.value.name),1),l("button",{class:"mob-search-btn",title:"搜索",onClick:de},[Ce(He,{name:"search",size:16})]),l("div",Kx,[Ce(He,{name:"search",size:14,class:"gs-icon"}),Me(l("input",{ref_key:"gsInput",ref:f,class:"input gs-input","onUpdate:modelValue":y[0]||(y[0]=F=>v.value=F),placeholder:"搜索工作记录与备忘录(Ctrl+K)",onInput:x,onFocus:y[1]||(y[1]=F=>b.value=!0),onBlur:ue,onKeydown:Mt(j,["esc"])},null,544),[[Ne,v.value]]),b.value&&v.value.trim()?($(),A("div",Nx,[T.value?($(),A(je,{key:0},[g.value.logs.length?($(),A("div",Fx,"工作记录")):ge("",!0),($(!0),A(je,null,et(g.value.logs,F=>($(),A("div",{key:"l"+F.id,class:"gs-item",onMousedown:zt(le=>J(F),["prevent"])},[l("span",Bx,W(un(ta)(F.category)),1),l("span",Ux,W(F.content),1),l("span",qx,W(F.date),1)],40,Vx))),128)),g.value.memos.length?($(),A("div",Hx,"备忘录")):ge("",!0),($(!0),A(je,null,et(g.value.memos,F=>($(),A("div",{key:"m"+F.id,class:"gs-item",onMousedown:zt(le=>oe(F),["prevent"])},[l("span",Wx,W(F.title||"无标题"),1),l("span",Gx,W(F.content),1)],40,zx))),128))],64)):($(),A("div",Yx,"无匹配结果"))])):ge("",!0)]),y[12]||(y[12]=l("span",{class:"flex1"},null,-1)),l("div",Jx,[It.value?($(),A("button",{key:0,class:"week-tip",onClick:y[2]||(y[2]=F=>Q("report"))},[...y[11]||(y[11]=[l("span",{class:"dot",style:{background:"var(--warn)"}},null,-1),vt(" 填写本周周记 ",-1)])])):ge("",!0),l("span",Xx,W((C=n.value)==null?void 0:C.username),1),l("button",{class:"btn btn-sm mobile-hide",onClick:o},"退出"),l("button",{class:"btn btn-primary btn-sm",disabled:gt.value,onClick:wt},[Ce(He,{name:gt.value?"check-circle":"clock",size:14},null,8,["name"]),l("span",Zx,W(bt.value),1)],8,Qx)])]),l("main",eC,[l("div",tC,[H.value==="calendar"?($(),St(_g,{key:0})):H.value==="today"?($(),St(qg,{key:1})):H.value==="plan"?($(),St(ew,{key:2})):H.value==="stats"?($(),St(Ow,{key:3})):H.value==="report"?($(),St(h_,{key:4})):H.value==="ledger"?($(),St(g1,{key:5})):H.value==="memo"?($(),St(L1,{key:6})):H.value==="vault"?($(),St(M0,{key:7})):H.value==="admin"?($(),St(wx,{key:8})):($(),St(Rk,{key:9}))])]),l("nav",nC,[($(!0),A(je,null,et(un(Ie),F=>($(),A("button",{key:F.key,class:Ze(["tab-btn",{active:H.value===F.key}]),onClick:le=>Q(F.key)},[Ce(He,{name:F.icon,size:20},null,8,["name"]),l("span",null,W(F.name),1)],10,sC))),128)),l("button",{class:Ze(["tab-btn",{active:I.value}]),onClick:y[3]||(y[3]=F=>Ae.value=!0)},[Ce(He,{name:"more",size:20}),y[13]||(y[13]=l("span",null,"更多",-1))],2)]),Ae.value?($(),A("div",{key:0,class:"sheet-mask",onClick:y[6]||(y[6]=F=>Ae.value=!1)},[l("div",{class:"more-sheet",onClick:y[5]||(y[5]=zt(()=>{},["stop"]))},[l("div",rC,W((R=n.value)==null?void 0:R.username),1),($(!0),A(je,null,et(E.value,F=>($(),A("button",{key:F.key,class:"sheet-row",onClick:le=>ye(F.key)},[Ce(He,{name:F.icon,size:18},null,8,["name"]),l("span",aC,W(F.name),1),Ce(He,{name:"chevron-right",size:14,class:"sheet-go"})],8,oC))),128)),y[15]||(y[15]=l("div",{class:"sheet-divider"},null,-1)),l("button",{class:"sheet-row sheet-danger",onClick:y[4]||(y[4]=F=>{Ae.value=!1,o()})},[Ce(He,{name:"close",size:18}),y[14]||(y[14]=l("span",{class:"sheet-name"},"退出登录",-1))])])])):ge("",!0),Pe.value?($(),A("div",{key:1,class:"msw-mask",onClick:y[10]||(y[10]=zt(F=>Pe.value=!1,["self"]))},[l("div",iC,[l("div",lC,[Ce(He,{name:"search",size:16,class:"msw-icon"}),Me(l("input",{ref_key:"msInput",ref:Ue,class:"msw-input","onUpdate:modelValue":y[7]||(y[7]=F=>v.value=F),placeholder:"搜索工作记录与备忘录",onInput:x,onKeydown:y[8]||(y[8]=Mt(F=>Pe.value=!1,["esc"]))},null,544),[[Ne,v.value]]),l("button",{class:"icon-btn",onClick:y[9]||(y[9]=F=>{j(),Pe.value=!1})},[Ce(He,{name:"close",size:16})])]),l("div",uC,[T.value?($(),A(je,{key:0},[g.value.logs.length?($(),A("div",cC,"工作记录")):ge("",!0),($(!0),A(je,null,et(g.value.logs,F=>($(),A("div",{key:"l"+F.id,class:"msw-item",onMousedown:zt(le=>ke(F),["prevent"])},[l("span",fC,W(un(ta)(F.category)),1),l("span",pC,W(F.content),1),l("span",vC,W(F.date),1)],40,dC))),128)),g.value.memos.length?($(),A("div",mC,"备忘录")):ge("",!0),($(!0),A(je,null,et(g.value.memos,F=>($(),A("div",{key:"m"+F.id,class:"msw-item",onMousedown:zt(le=>Ee(F),["prevent"])},[l("span",yC,W(F.title||"无标题"),1),l("span",gC,W(F.content),1)],40,hC))),128))],64)):v.value.trim()?($(),A("div",bC,"无匹配结果")):ge("",!0)])])])):ge("",!0)]),l("div",wC,[Ce(Tv,{name:"toast"},{default:ms(()=>[($(!0),A(je,null,et(un(t),F=>($(),A("div",{key:F.id,class:"toast"},W(F.text),1))),128))]),_:1})])])):($(),St(Px,{key:0,onLogin:r}))}}}),kC=Vt(_C,[["__scopeId","data-v-c88c3788"]]);function Vo(e,t){try{let n=document.getElementById("fatal-overlay");n||(n=document.createElement("div"),n.id="fatal-overlay",n.style.cssText="position:fixed;inset:0;z-index:99999;background:#FFFFFF;color:#1D2129;padding:20px;overflow:auto;font:13px/1.7 -apple-system,PingFang SC,Microsoft YaHei,sans-serif;",n.addEventListener("click",i=>{i.target===n&&n.parentElement&&n.parentElement.removeChild(n)}),document.body.appendChild(n));const r=document.createElement("div");r.style.cssText="border:1px solid #E5484D;border-radius:8px;padding:12px;margin-bottom:12px;word-break:break-all;white-space:pre-wrap;",r.textContent=e+` -`+t;const o=document.createElement("button");o.textContent="重新加载",o.style.cssText="margin:-4px 0 12px;padding:6px 16px;border:1px solid #E5484D;border-radius:6px;background:#FFFFFF;color:#E5484D;font-size:13px;cursor:pointer;",o.addEventListener("click",()=>{try{location.reload()}catch{}}),n.appendChild(r),n.appendChild(o)}catch{}}async function xC(){const e=await Pm();e&&ia(e.userId);const t=Uv(kC);t.config.errorHandler=(n,r,o)=>{const i=n;Vo("应用内部错误(点击空白处关闭,请将以下内容发送给开发者)",i&&(i.stack||i.message)||String(n)+` -触发位置: `+o)},window.addEventListener("unhandledrejection",n=>{const r=n.reason;Vo("未处理的异步错误(点击空白处关闭)",r&&(r.stack||r.message)||String(n.reason))}),window.addEventListener("error",n=>{n.message&&n.message!=="ResizeObserver loop limit exceeded"&&Vo("运行错误(点击空白处关闭)",n.message)}),t.mount("#app"),"serviceWorker"in navigator&&location.protocol.startsWith("http")&&window.addEventListener("load",()=>{navigator.serviceWorker.register("sw.js").catch(()=>{})})}xC().catch(e=>{Vo("无法启动:连接同步服务器失败",e&&(e.stack||e.message)||String(e))});export{jd as W,Od as _,Ig as b,Id as r}; diff --git a/intern-log/dist/assets/index-ieoBMDLY.css b/intern-log/dist/assets/index-ieoBMDLY.css deleted file mode 100644 index 9d0668b..0000000 --- a/intern-log/dist/assets/index-ieoBMDLY.css +++ /dev/null @@ -1 +0,0 @@ -.mask[data-v-f27041d4]{position:fixed;top:0;right:0;bottom:0;left:0;background:#1d212966;display:flex;align-items:center;justify-content:center;z-index:100}.dialog[data-v-f27041d4]{width:380px;max-width:calc(100vw - 32px);background:var(--bg-page);border-radius:var(--radius-lg);box-shadow:var(--shadow-float);padding:20px}.dialog-title[data-v-f27041d4]{font-size:14px;font-weight:600;color:var(--text-1)}.dialog-msg[data-v-f27041d4]{margin-top:8px;color:var(--text-2);font-size:13px;line-height:1.7;word-break:break-all}.dialog-btns[data-v-f27041d4]{margin-top:20px;display:flex;justify-content:flex-end;gap:8px}.btn-danger-solid[data-v-f27041d4]{background:var(--danger);border-color:var(--danger);color:#fff}.btn-danger-solid[data-v-f27041d4]:hover{background:#d13a3f}.modal-enter-active[data-v-f27041d4],.modal-leave-active[data-v-f27041d4]{transition:opacity .15s ease}.modal-enter-from[data-v-f27041d4],.modal-leave-to[data-v-f27041d4]{opacity:0}.mask[data-v-bd00bec4]{position:fixed;top:0;right:0;bottom:0;left:0;background:#1d212966;display:flex;align-items:center;justify-content:center;z-index:90}.dialog[data-v-bd00bec4]{width:560px;max-width:calc(100vw - 32px);max-height:85vh;background:var(--bg-page);border-radius:var(--radius-lg);box-shadow:var(--shadow-float);display:flex;flex-direction:column}.dialog-head[data-v-bd00bec4]{display:flex;align-items:flex-start;justify-content:space-between;padding:16px 20px 12px;border-bottom:1px solid var(--border);flex:none}.dialog-title[data-v-bd00bec4]{font-size:14px;font-weight:600;color:var(--text-1)}.dialog-sub[data-v-bd00bec4]{font-size:12px;margin-top:2px}.dialog-body[data-v-bd00bec4]{padding:16px 20px;overflow:auto}.dialog-btns[data-v-bd00bec4]{display:flex;justify-content:flex-end;gap:8px;padding:12px 20px 16px;border-top:1px solid var(--border);flex:none}.form-grid[data-v-bd00bec4]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px}.field.span2[data-v-bd00bec4]{grid-column:span 2}.field label[data-v-bd00bec4]{display:block;font-size:12px;color:var(--text-2);margin-bottom:4px}.form-error[data-v-bd00bec4]{color:var(--danger);font-size:12px;margin-top:4px}.input.invalid[data-v-bd00bec4],.input.invalid[data-v-bd00bec4]:focus{border-color:var(--danger)}.toggle-btn[data-v-bd00bec4]{height:32px;width:100%;border:1px solid var(--border-strong);background:var(--bg-page);border-radius:var(--radius-sm);cursor:pointer;font-size:13px;color:var(--text-2)}.toggle-btn[data-v-bd00bec4]:hover{background:var(--bg-hover)}.toggle-btn.on[data-v-bd00bec4]{color:var(--accent);border-color:var(--accent);background:var(--accent-bg)}.toggle-btn.onwarn[data-v-bd00bec4]{color:var(--warn);border-color:var(--warn)}.modal-enter-active[data-v-bd00bec4],.modal-leave-active[data-v-bd00bec4]{transition:opacity .15s ease}.modal-enter-from[data-v-bd00bec4],.modal-leave-to[data-v-bd00bec4]{opacity:0}.dp-head[data-v-4b7234c4]{margin-bottom:12px}.dp-date[data-v-4b7234c4]{font-size:14px;font-weight:600}.sec[data-v-4b7234c4]{padding:14px 16px;margin-bottom:12px}.sec-title[data-v-4b7234c4]{font-size:13px;font-weight:600;margin-bottom:10px;color:var(--text-1)}.sec-head[data-v-4b7234c4]{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin-bottom:10px}.sec-head .sec-title[data-v-4b7234c4]{margin-bottom:0}.form-hint[data-v-4b7234c4]{font-size:12px}.att-grid[data-v-4b7234c4]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px}.att-cell label[data-v-4b7234c4],.field label[data-v-4b7234c4]{display:block;font-size:12px;color:var(--text-2);margin-bottom:4px}.att-val[data-v-4b7234c4]{display:flex;align-items:center;gap:6px;min-height:32px;font-size:13px}.status-val[data-v-4b7234c4]{min-height:32px}.val-empty[data-v-4b7234c4]{color:var(--text-3)}.edit-row[data-v-4b7234c4]{display:flex;gap:6px;align-items:center;flex-wrap:wrap}.time-input[data-v-4b7234c4]{width:104px}.att-note[data-v-4b7234c4]{margin-top:10px;font-size:12px}.att-actions[data-v-4b7234c4]{display:flex;gap:8px;margin-top:12px}.form-grid[data-v-4b7234c4]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px}.field.span2[data-v-4b7234c4]{grid-column:span 2}.form-footer[data-v-4b7234c4]{display:flex;justify-content:flex-end;gap:8px;margin-top:12px;padding-top:12px;border-top:1px solid var(--border)}.form-error[data-v-4b7234c4]{color:var(--danger);font-size:12px;margin-top:4px}.input.invalid[data-v-4b7234c4]{border-color:var(--danger)}.input.invalid[data-v-4b7234c4]:focus{border-color:var(--danger)}.list-sec[data-v-4b7234c4]{margin-bottom:4px}.item[data-v-4b7234c4]{border:1px solid var(--border);border-radius:var(--radius-sm);padding:8px 10px;margin-bottom:6px;background:var(--bg-page)}.item-main[data-v-4b7234c4]{display:flex;align-items:center;gap:8px;min-height:26px;flex-wrap:wrap}.item-content[data-v-4b7234c4]{cursor:text;word-break:break-all}.item-meta[data-v-4b7234c4]{font-size:12px}.item-sub[data-v-4b7234c4]{margin-top:6px;padding-top:6px;border-top:1px dashed var(--border);font-size:12px;display:flex;flex-direction:column;gap:2px}.empty[data-v-4b7234c4]{text-align:center;padding:24px 0}.dp-foot[data-v-4b7234c4]{margin-top:10px;font-size:12px;text-align:right}@media (max-width: 560px){.att-grid[data-v-4b7234c4],.form-grid[data-v-4b7234c4]{grid-template-columns:1fr}.field.span2[data-v-4b7234c4]{grid-column:auto}}.cal-toolbar[data-v-2404dfbe]{display:flex;align-items:center;gap:10px;margin-bottom:12px}.cal-title[data-v-2404dfbe]{font-size:14px;font-weight:600;min-width:96px;text-align:center}.cal-head[data-v-2404dfbe]{display:grid;grid-template-columns:repeat(7,1fr);border-top:1px solid var(--border);border-left:1px solid var(--border)}.cal-week[data-v-2404dfbe]{text-align:center;padding:6px 0;font-size:12px;border-right:1px solid var(--border);border-bottom:1px solid var(--border)}.cal-grid[data-v-2404dfbe]{display:grid;grid-template-columns:repeat(7,1fr);border-top:1px solid var(--border);border-left:1px solid var(--border)}.cal-cell[data-v-2404dfbe]{min-height:92px;padding:6px 8px;text-align:left;background:var(--bg-page);border:none;border-right:1px solid var(--border);border-bottom:1px solid var(--border);cursor:pointer;display:block;font-size:13px}.cal-cell[data-v-2404dfbe]:hover{background:var(--bg-subtle)}.cal-cell.blank[data-v-2404dfbe]{cursor:default}.cal-cell.blank[data-v-2404dfbe]:hover{background:var(--bg-page)}.cal-cell.selected[data-v-2404dfbe]{background:var(--accent-bg)}.daynum.today[data-v-2404dfbe]{color:var(--accent);font-weight:600}.cal-cell.weekend .daynum[data-v-2404dfbe]{color:var(--text-3)}.cal-marks[data-v-2404dfbe]{display:flex;align-items:center;gap:4px;margin-top:8px;height:14px}.mark-log[data-v-2404dfbe]{color:var(--text-3)}.mark-star[data-v-2404dfbe]{color:var(--accent)}.drawer[data-v-2404dfbe]{position:fixed;top:0;right:0;bottom:0;width:min(420px,100%);background:var(--bg-page);border-left:1px solid var(--border);box-shadow:var(--shadow-float);z-index:20;display:flex;flex-direction:column}.drawer-head[data-v-2404dfbe]{height:48px;flex:none;display:flex;align-items:center;justify-content:space-between;padding:0 16px;border-bottom:1px solid var(--border)}.drawer-title[data-v-2404dfbe]{font-weight:600}.drawer-body[data-v-2404dfbe]{flex:1;overflow:auto;padding:16px}.drawer-enter-active[data-v-2404dfbe],.drawer-leave-active[data-v-2404dfbe]{transition:opacity .15s ease}.drawer-enter-from[data-v-2404dfbe],.drawer-leave-to[data-v-2404dfbe]{opacity:0}@media (max-width: 720px){.cal-cell[data-v-2404dfbe]{min-height:60px;padding:4px 5px}.cal-title[data-v-2404dfbe]{min-width:76px;font-size:13px}.cal-marks[data-v-2404dfbe]{gap:3px;margin-top:4px;height:12px}.drawer[data-v-2404dfbe]{width:100%}}.detail-toolbar[data-v-799fe8de]{display:flex;align-items:center;gap:10px;margin-bottom:12px;flex-wrap:wrap}.date-title[data-v-799fe8de]{font-size:14px;font-weight:600;min-width:170px;text-align:center}.date-title.is-today[data-v-799fe8de]{color:var(--accent)}.w-date[data-v-799fe8de]{width:150px}.export-row[data-v-799fe8de]{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:12px;padding:8px 12px;border:1px solid var(--border);border-radius:var(--radius-md);background:var(--bg-page)}.exp-label[data-v-799fe8de]{font-size:12px}.seg[data-v-799fe8de]{display:inline-flex;border:1px solid var(--border);border-radius:var(--radius-sm);overflow:hidden}.seg-btn[data-v-799fe8de]{border:none;background:var(--bg-page);color:var(--text-2);cursor:pointer;font-size:12px;padding:4px 10px}.seg-btn.active[data-v-799fe8de]{background:var(--accent-bg);color:var(--accent)}.w-exp[data-v-799fe8de]{width:140px}@media (max-width: 720px){.detail-toolbar[data-v-799fe8de]{gap:8px}.date-title[data-v-799fe8de]{min-width:0;flex:1;text-align:left}.w-date[data-v-799fe8de]{flex:1;min-width:120px;width:auto}}.plan-page[data-v-c917531a]{display:flex;flex-direction:column;gap:10px;max-width:760px}.plan-head[data-v-c917531a]{padding:12px 16px}.nav-row[data-v-c917531a]{display:flex;align-items:center;gap:8px}.date-box[data-v-c917531a]{min-width:150px;text-align:center}.date-main[data-v-c917531a]{font-weight:600;font-size:14px}.date-sub[data-v-c917531a]{font-size:11px;margin-left:6px}.sum-line[data-v-c917531a]{font-size:12px;margin-top:8px}.timer-live[data-v-c917531a]{color:var(--accent);font-weight:600}.flex1[data-v-c917531a]{flex:1}.plan-item[data-v-c917531a]{display:flex;align-items:flex-start;gap:12px;padding:12px 14px}.plan-item.done[data-v-c917531a]{opacity:.62}.plan-item.skip[data-v-c917531a]{opacity:.5}.plan-item.running[data-v-c917531a]{border-left:3px solid var(--accent)}.pi-time[data-v-c917531a]{font-size:13px;font-weight:600;min-width:92px;padding-top:2px}.pi-main[data-v-c917531a]{flex:1;min-width:0}.pi-title[data-v-c917531a]{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.pi-text[data-v-c917531a]{font-size:14px;font-weight:500;word-break:break-all}.pi-text.strike[data-v-c917531a]{text-decoration:line-through}.state-done[data-v-c917531a]{color:var(--ok, #2e9e5b);font-size:12px}.state-skip[data-v-c917531a]{color:var(--text-3);font-size:12px}.pi-note[data-v-c917531a],.pi-meta[data-v-c917531a]{font-size:12px;margin-top:3px}.pi-ops[data-v-c917531a]{display:flex;align-items:center;gap:6px;flex-wrap:wrap;justify-content:flex-end}.timer-on[data-v-c917531a]{color:var(--accent);border-color:var(--accent)}.empty[data-v-c917531a]{text-align:center;padding:26px 16px}.fixed-mask[data-v-c917531a]{position:fixed;top:0;right:0;bottom:0;left:0;z-index:80;background:#1d212959;display:flex;align-items:center;justify-content:center;padding:16px}.dialog[data-v-c917531a]{background:var(--bg-page);border-radius:12px;width:420px;max-width:100%}.dialog-head[data-v-c917531a]{display:flex;align-items:center;justify-content:space-between;padding:14px 16px 0}.dialog-title[data-v-c917531a]{font-weight:600;font-size:14px}.dialog-body[data-v-c917531a]{padding:6px 16px 4px}.dialog-btns[data-v-c917531a]{display:flex;justify-content:flex-end;gap:10px;padding:12px 16px 16px}.form-row[data-v-c917531a]{display:flex;flex-direction:column;gap:5px;margin-top:10px}.form-row label[data-v-c917531a]{font-size:12px;color:var(--text-2)}.form-row.two[data-v-c917531a]{flex-direction:row;gap:10px}.form-row.two>div[data-v-c917531a]{flex:1;display:flex;flex-direction:column;gap:5px}@media (max-width: 720px){.plan-item[data-v-c917531a]{flex-wrap:wrap}.pi-ops[data-v-c917531a]{width:100%;justify-content:flex-start}}.cards[data-v-f8410651]{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.stat-card[data-v-f8410651]{padding:14px 16px}.stat-num[data-v-f8410651]{font-size:20px;font-weight:600;margin-top:4px}.section[data-v-f8410651]{padding:14px 16px;margin-top:12px}.section-title[data-v-f8410651]{font-weight:600;margin-bottom:10px;font-size:13px}.heat[data-v-f8410651]{display:flex;gap:3px;overflow-x:auto;padding-bottom:4px}.heat-col[data-v-f8410651]{display:flex;flex-direction:column;gap:3px}.heat-cell[data-v-f8410651]{width:12px;height:12px;border-radius:2px;display:inline-block}.lv0[data-v-f8410651]{background:var(--bg-subtle);border:1px solid var(--border)}.lv1[data-v-f8410651]{background:#d8ecdf}.lv2[data-v-f8410651]{background:#a9d8bc}.lv3[data-v-f8410651]{background:#6fbf92}.lv4[data-v-f8410651]{background:var(--ok)}.heat-legend[data-v-f8410651]{display:flex;align-items:center;gap:3px;margin-top:8px;font-size:12px}.two-col[data-v-f8410651]{display:grid;grid-template-columns:1fr 1fr;gap:12px}.bar-row[data-v-f8410651]{display:flex;align-items:center;gap:10px;margin:6px 0}.bar-label[data-v-f8410651]{width:72px;flex:none;color:var(--text-2);font-size:12px;text-align:right}.bar-track[data-v-f8410651]{flex:1;height:8px;border-radius:4px;background:var(--bg-subtle);overflow:hidden}.bar-fill[data-v-f8410651]{display:block;height:100%;background:var(--accent);border-radius:4px}.bar-num[data-v-f8410651]{font-size:12px;width:92px;flex:none}.loc-label[data-v-f8410651]{width:110px;text-align:left}@media (max-width: 720px){.cards[data-v-f8410651]{grid-template-columns:repeat(2,1fr)}.two-col[data-v-f8410651]{grid-template-columns:1fr}}.report-toolbar[data-v-43f9c59b]{display:flex;align-items:center;gap:10px;margin-bottom:12px;flex-wrap:wrap}.ai-error[data-v-43f9c59b]{color:var(--danger);font-size:12px;margin:0 0 8px}.seg[data-v-43f9c59b]{display:inline-flex;border:1px solid var(--border-strong);border-radius:6px;overflow:hidden}.seg-btn[data-v-43f9c59b]{height:28px;padding:0 12px;border:none;background:var(--bg-page);color:var(--text-2);cursor:pointer;font-size:12px;border-right:1px solid var(--border)}.seg-btn[data-v-43f9c59b]:last-child{border-right:none}.seg-btn[data-v-43f9c59b]:hover{background:var(--bg-hover)}.seg-btn.active[data-v-43f9c59b]{background:var(--accent-bg);color:var(--accent)}.w-date[data-v-43f9c59b]{width:140px}.report-grid[data-v-43f9c59b]{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:12px;align-items:start}.section[data-v-43f9c59b]{padding:14px 16px}.section-title[data-v-43f9c59b]{font-weight:600;margin-bottom:8px;font-size:13px}.section+.section[data-v-43f9c59b]{margin-top:12px}.note-label[data-v-43f9c59b]{display:block;font-size:12px;margin:8px 0 4px}.note-saved[data-v-43f9c59b]{font-size:12px;margin-top:6px}.md-editor[data-v-43f9c59b]{min-height:420px;line-height:1.7}.sum-row[data-v-43f9c59b]{display:flex;justify-content:space-between;padding:3px 0;font-size:12px}.section-sub[data-v-43f9c59b]{font-weight:600;margin:10px 0 4px;font-size:12px}.sum-item[data-v-43f9c59b]{font-size:12px;padding:2px 0;word-break:break-all}.sum-empty[data-v-43f9c59b]{font-size:12px}@media (max-width: 960px){.report-grid[data-v-43f9c59b]{grid-template-columns:1fr}}.mask[data-v-9f38206c]{position:fixed;top:0;right:0;bottom:0;left:0;background:#1d212966;display:flex;align-items:center;justify-content:center;z-index:90}.dialog[data-v-9f38206c]{width:480px;max-width:calc(100vw - 32px);background:var(--bg-page);border-radius:var(--radius-lg);box-shadow:var(--shadow-float)}.dialog-head[data-v-9f38206c]{display:flex;align-items:center;justify-content:space-between;padding:16px 20px 12px;border-bottom:1px solid var(--border)}.dialog-title[data-v-9f38206c]{font-size:14px;font-weight:600;color:var(--text-1)}.add-cat[data-v-9f38206c]{display:flex;gap:6px;margin-top:6px}.add-cat-input[data-v-9f38206c]{flex:1;height:28px;font-size:12px}.dialog-body[data-v-9f38206c]{padding:16px 20px}.dialog-btns[data-v-9f38206c]{display:flex;justify-content:flex-end;gap:8px;padding:12px 20px 16px;border-top:1px solid var(--border)}.form-grid[data-v-9f38206c]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px}.field.span2[data-v-9f38206c]{grid-column:span 2}.field label[data-v-9f38206c]{display:block;font-size:12px;color:var(--text-2);margin-bottom:4px}.seg[data-v-9f38206c]{display:inline-flex;border:1px solid var(--border-strong);border-radius:var(--radius-sm);overflow:hidden}.seg-btn[data-v-9f38206c]{height:30px;padding:0 14px;border:none;background:var(--bg-page);color:var(--text-2);cursor:pointer;font-size:13px}.seg-btn+.seg-btn[data-v-9f38206c]{border-left:1px solid var(--border)}.seg-btn.active[data-v-9f38206c]{background:var(--accent-bg);color:var(--accent)}.form-error[data-v-9f38206c]{color:var(--danger);font-size:12px;margin-top:8px}.input.invalid[data-v-9f38206c],.input.invalid[data-v-9f38206c]:focus{border-color:var(--danger)}.modal-enter-active[data-v-9f38206c],.modal-leave-active[data-v-9f38206c]{transition:opacity .15s ease}.modal-enter-from[data-v-9f38206c],.modal-leave-to[data-v-9f38206c]{opacity:0}.ledger-toolbar[data-v-e8759c3f]{display:flex;align-items:center;gap:8px;margin-bottom:12px;flex-wrap:wrap}.month-title[data-v-e8759c3f]{font-size:14px;font-weight:600;min-width:88px;text-align:center}.w-filter[data-v-e8759c3f]{width:110px;flex:none}.cards[data-v-e8759c3f]{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px}.stat-card[data-v-e8759c3f]{padding:14px 16px}.stat-num[data-v-e8759c3f]{font-size:20px;font-weight:600;margin-top:4px}.amt-income[data-v-e8759c3f]{color:var(--ok)}.amt-expense[data-v-e8759c3f]{color:var(--text-1)}.amt-warn[data-v-e8759c3f]{color:var(--warn)}.sec[data-v-e8759c3f]{padding:14px 16px;margin-top:12px}.sec-title[data-v-e8759c3f]{font-size:13px;font-weight:600;margin-bottom:10px}.sec-head[data-v-e8759c3f]{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin-bottom:10px}.sec-head .sec-title[data-v-e8759c3f]{margin-bottom:0}.form-hint[data-v-e8759c3f]{font-size:12px}.form-grid[data-v-e8759c3f]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px}.field.span2[data-v-e8759c3f]{grid-column:span 2}.field label[data-v-e8759c3f]{display:block;font-size:12px;color:var(--text-2);margin-bottom:4px}.form-error[data-v-e8759c3f]{color:var(--danger);font-size:12px;margin-top:8px}.form-footer[data-v-e8759c3f]{display:flex;justify-content:flex-end;gap:8px;margin-top:12px;padding-top:12px;border-top:1px solid var(--border)}.seg[data-v-e8759c3f]{display:inline-flex;border:1px solid var(--border-strong);border-radius:var(--radius-sm);overflow:hidden}.seg-btn[data-v-e8759c3f]{height:30px;padding:0 14px;border:none;background:var(--bg-page);color:var(--text-2);cursor:pointer;font-size:13px}.seg-btn+.seg-btn[data-v-e8759c3f]{border-left:1px solid var(--border)}.seg-btn.active[data-v-e8759c3f]{background:var(--accent-bg);color:var(--accent)}.toggle-btn[data-v-e8759c3f]{height:32px;width:100%;border:1px solid var(--border-strong);background:var(--bg-page);border-radius:var(--radius-sm);cursor:pointer;font-size:13px;color:var(--text-2)}.toggle-btn[data-v-e8759c3f]:hover{background:var(--bg-hover)}.toggle-btn.on[data-v-e8759c3f]{color:var(--accent);border-color:var(--accent);background:var(--accent-bg)}.bar-row[data-v-e8759c3f]{display:flex;align-items:center;gap:10px;margin:6px 0}.bar-label[data-v-e8759c3f]{width:56px;flex:none;color:var(--text-2);font-size:12px;text-align:right}.bar-track[data-v-e8759c3f]{flex:1;height:8px;border-radius:4px;background:var(--bg-subtle);overflow:hidden}.bar-fill[data-v-e8759c3f]{display:block;height:100%;background:var(--accent);border-radius:4px}.bar-num[data-v-e8759c3f]{font-size:12px;width:110px;flex:none}.table-card[data-v-e8759c3f]{overflow-x:auto}.tx-table[data-v-e8759c3f]{width:100%;border-collapse:collapse;font-size:13px}.tx-table th[data-v-e8759c3f]{text-align:left;font-weight:500;color:var(--text-2);background:var(--bg-subtle);padding:10px 12px;border-bottom:1px solid var(--border);white-space:nowrap}.tx-table td[data-v-e8759c3f]{padding:10px 12px;border-bottom:1px solid var(--border);vertical-align:top;word-break:break-all}.tx-table tbody tr[data-v-e8759c3f]:hover{background:var(--bg-subtle)}.tx-table tbody tr:last-child td[data-v-e8759c3f]{border-bottom:none}.td-note[data-v-e8759c3f]{color:var(--text-2)}.tx-pending[data-v-e8759c3f]{color:var(--warn);font-size:12px}.tx-done[data-v-e8759c3f]{color:var(--ok);font-size:12px}.th-ops[data-v-e8759c3f]{width:220px}.ops[data-v-e8759c3f]{display:flex;gap:4px;flex-wrap:wrap}.empty[data-v-e8759c3f]{text-align:center;padding:24px 0}.vault-note[data-v-e8759c3f]{margin-top:10px;font-size:12px;text-align:right}@media (max-width: 560px){.form-grid[data-v-e8759c3f]{grid-template-columns:1fr}.field.span2[data-v-e8759c3f]{grid-column:auto}.ledger-toolbar .w-filter[data-v-e8759c3f]{flex:1;min-width:0;width:auto}}.memo-page[data-v-74d60dba]{display:grid;grid-template-columns:280px minmax(0,1fr);gap:12px;align-items:stretch}.memo-list[data-v-74d60dba]{display:flex;flex-direction:column;max-height:calc(100vh - 140px)}.pane-head[data-v-74d60dba]{display:flex;align-items:center;justify-content:space-between;padding:12px 12px 8px;border-bottom:1px solid var(--border);flex:none}.pane-title[data-v-74d60dba]{font-size:13px;font-weight:600}.memo-scroll[data-v-74d60dba]{overflow:auto;padding:6px}.memo-item[data-v-74d60dba]{padding:8px 10px;border-radius:var(--radius-sm);cursor:pointer;margin-bottom:2px}.memo-item[data-v-74d60dba]:hover{background:var(--bg-hover)}.memo-item.active[data-v-74d60dba]{background:var(--accent-bg)}.memo-item.active .memo-item-title[data-v-74d60dba]{color:var(--accent)}.memo-item-title[data-v-74d60dba]{font-size:13px;font-weight:500;word-break:break-all}.memo-item-sub[data-v-74d60dba]{font-size:12px;margin-top:2px;word-break:break-all}.memo-item-time[data-v-74d60dba]{font-size:11px;margin-top:2px}.memo-editor[data-v-74d60dba]{padding:16px;min-height:420px;display:flex;flex-direction:column}.title-input[data-v-74d60dba]{font-size:14px;font-weight:500;margin-bottom:10px}.content-textarea[data-v-74d60dba]{flex:1;min-height:340px;line-height:1.8}.editor-foot[data-v-74d60dba]{display:flex;align-items:center;gap:8px;margin-top:10px;padding-top:10px;border-top:1px solid var(--border)}.foot-info[data-v-74d60dba]{font-size:12px}.editor-empty[data-v-74d60dba]{display:flex;align-items:center;justify-content:center;flex:1;padding:60px 0}@media (max-width: 800px){.memo-page[data-v-74d60dba]{grid-template-columns:1fr}.memo-list[data-v-74d60dba]{max-height:240px}.content-textarea[data-v-74d60dba]{min-height:240px}}.mask[data-v-f383b0a6]{position:fixed;top:0;right:0;bottom:0;left:0;background:#1d212966;display:flex;align-items:center;justify-content:center;z-index:90}.dialog[data-v-f383b0a6]{width:480px;max-width:calc(100vw - 32px);background:var(--bg-page);border-radius:var(--radius-lg);box-shadow:var(--shadow-float)}.dialog-head[data-v-f383b0a6]{display:flex;align-items:center;justify-content:space-between;padding:16px 20px 12px;border-bottom:1px solid var(--border)}.dialog-title[data-v-f383b0a6]{font-size:14px;font-weight:600;color:var(--text-1)}.dialog-body[data-v-f383b0a6]{padding:16px 20px}.dialog-btns[data-v-f383b0a6]{display:flex;justify-content:flex-end;gap:8px;padding:12px 20px 16px;border-top:1px solid var(--border)}.form-grid[data-v-f383b0a6]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px}.field.span2[data-v-f383b0a6]{grid-column:span 2}.field label[data-v-f383b0a6]{display:block;font-size:12px;color:var(--text-2);margin-bottom:4px}.pwd-row[data-v-f383b0a6]{display:flex;gap:8px}.pwd-row .input[data-v-f383b0a6]{flex:1}.form-error[data-v-f383b0a6]{color:var(--danger);font-size:12px;margin-top:8px}.modal-enter-active[data-v-f383b0a6],.modal-leave-active[data-v-f383b0a6]{transition:opacity .15s ease}.modal-enter-from[data-v-f383b0a6],.modal-leave-to[data-v-f383b0a6]{opacity:0}.lock-card[data-v-c2db283d]{max-width:380px;margin:60px auto 0;padding:28px 24px;text-align:center;display:flex;flex-direction:column;gap:10px}.lock-badge[data-v-c2db283d]{width:52px;height:52px;margin:0 auto;border-radius:50%;background:var(--bg-subtle);border:1px solid var(--border);display:flex;align-items:center;justify-content:center;color:var(--text-2)}.lock-title[data-v-c2db283d]{font-size:14px;font-weight:600}.lock-tip[data-v-c2db283d]{font-size:12px;line-height:1.7}.lock-btn[data-v-c2db283d]{margin-top:4px}.form-error[data-v-c2db283d]{color:var(--danger);font-size:12px}.empty[data-v-c2db283d]{text-align:center;padding:24px 0}.vault-toolbar[data-v-c2db283d]{display:flex;align-items:center;gap:8px;margin-bottom:12px;flex-wrap:wrap}.search-wrap[data-v-c2db283d]{position:relative;width:280px;max-width:100%}.search-wrap .input[data-v-c2db283d]{padding-left:30px}.search-icon[data-v-c2db283d]{position:absolute;left:10px;top:50%;transform:translateY(-50%);color:var(--text-3)}.table-card[data-v-c2db283d]{overflow-x:auto}.cred-table[data-v-c2db283d]{width:100%;border-collapse:collapse;font-size:13px}.cred-table th[data-v-c2db283d]{text-align:left;font-weight:500;color:var(--text-2);background:var(--bg-subtle);padding:10px 12px;border-bottom:1px solid var(--border);white-space:nowrap}.cred-table td[data-v-c2db283d]{padding:10px 12px;border-bottom:1px solid var(--border);vertical-align:top;word-break:break-all}.cred-table tbody tr[data-v-c2db283d]:hover{background:var(--bg-subtle)}.cred-table tbody tr:last-child td[data-v-c2db283d]{border-bottom:none}.td-system[data-v-c2db283d]{font-weight:500}.th-ops[data-v-c2db283d]{width:150px}.pwd-cell[data-v-c2db283d]{display:flex;align-items:center;gap:4px;flex-wrap:wrap}.pwd-text[data-v-c2db283d]{letter-spacing:1px}.copyable[data-v-c2db283d]{cursor:pointer}.copyable[data-v-c2db283d]:hover{color:var(--accent)}.ops[data-v-c2db283d]{display:flex;gap:4px;flex-wrap:wrap}.vault-note[data-v-c2db283d]{margin-top:10px;font-size:12px;text-align:right}.mask[data-v-c2db283d]{position:fixed;top:0;right:0;bottom:0;left:0;background:#1d212966;display:flex;align-items:center;justify-content:center;z-index:90}.dialog[data-v-c2db283d]{width:440px;max-width:calc(100vw - 32px);background:var(--bg-page);border-radius:var(--radius-lg);box-shadow:var(--shadow-float)}.dialog-head[data-v-c2db283d]{display:flex;align-items:center;justify-content:space-between;padding:16px 20px 12px;border-bottom:1px solid var(--border)}.dialog-title[data-v-c2db283d]{font-size:14px;font-weight:600}.dialog-body[data-v-c2db283d]{padding:16px 20px}.dialog-btns[data-v-c2db283d]{display:flex;justify-content:flex-end;gap:8px;padding:12px 20px 16px;border-top:1px solid var(--border)}.vp-field[data-v-c2db283d]{margin-bottom:10px}.vp-field label[data-v-c2db283d]{display:block;font-size:12px;color:var(--text-2);margin-bottom:4px}.vp-tip[data-v-c2db283d]{font-size:12px;margin-top:8px}.modal-enter-active[data-v-c2db283d],.modal-leave-active[data-v-c2db283d]{transition:opacity .15s ease}.modal-enter-from[data-v-c2db283d],.modal-leave-to[data-v-c2db283d]{opacity:0}.settings[data-v-d8d0f782]{display:flex;flex-direction:column;gap:12px;max-width:640px}.acc-line[data-v-d8d0f782]{font-size:12px;margin-bottom:10px;line-height:1.7}.section[data-v-d8d0f782]{padding:14px 16px}.section-title[data-v-d8d0f782]{font-weight:600;margin-bottom:10px;font-size:13px}.rule-grid[data-v-d8d0f782]{display:grid;grid-template-columns:1fr 1fr;gap:10px 16px}.rule-item label[data-v-d8d0f782]{display:block;font-size:12px;color:var(--text-2);margin-bottom:4px}.rule-save[data-v-d8d0f782]{display:flex;align-items:center;gap:10px;margin-top:12px}.proj-add[data-v-d8d0f782]{display:flex;gap:8px}.proj-tip[data-v-d8d0f782]{font-size:12px;margin-top:6px}.proj-row[data-v-d8d0f782]{display:flex;align-items:center;gap:8px;padding:6px 0;border-bottom:1px solid var(--border)}.proj-row[data-v-d8d0f782]:last-child{border-bottom:none}.proj-name[data-v-d8d0f782]{flex:1;word-break:break-all}.proj-name.archived[data-v-d8d0f782]{color:var(--text-3);text-decoration:line-through}.loc-note[data-v-d8d0f782]{font-size:12px}.ai-grid[data-v-d8d0f782]{display:flex;flex-direction:column;gap:10px}.backup-row[data-v-d8d0f782]{display:flex;gap:8px}.cat-block[data-v-d8d0f782]{margin-top:10px}.cat-head[data-v-d8d0f782]{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px;font-size:12px}.cat-chips[data-v-d8d0f782]{display:flex;flex-wrap:wrap;gap:6px}.cat-chip[data-v-d8d0f782]{display:inline-flex;align-items:center;gap:4px;border:1px solid var(--border);border-radius:999px;padding:2px 8px;font-size:12px}.chip-btn[data-v-d8d0f782]{border:none;background:transparent;color:var(--text-3);cursor:pointer;font-size:11px;padding:0 1px}.chip-btn[data-v-d8d0f782]:hover{color:var(--accent)}.exp-dates[data-v-d8d0f782]{display:flex;align-items:center;gap:8px;margin-top:10px;flex-wrap:wrap}.exp-dates .input[data-v-d8d0f782]{width:150px}.seg[data-v-d8d0f782]{display:inline-flex;border:1px solid var(--border-strong);border-radius:var(--radius-sm);overflow:hidden}.seg-btn[data-v-d8d0f782]{border:none;background:var(--bg-page);color:var(--text-2);cursor:pointer;font-size:12px;padding:5px 12px}.seg-btn.active[data-v-d8d0f782]{background:var(--accent-bg);color:var(--accent)}.import-error[data-v-d8d0f782]{color:var(--danger);font-size:12px;margin-top:8px}.backup-note[data-v-d8d0f782]{font-size:12px;margin-top:10px}.admin-page[data-v-06be07ff]{display:flex;flex-direction:column;gap:12px;max-width:860px}.toolbar[data-v-06be07ff]{display:flex;align-items:center;gap:12px}.head-wrap[data-v-06be07ff]{flex:1;min-width:0}.sec-title[data-v-06be07ff]{font-weight:600;font-size:13px}.head-sub[data-v-06be07ff]{font-size:12px;margin-top:2px}.sec[data-v-06be07ff]{padding:14px 16px}.admin-table-card[data-v-06be07ff]{overflow-x:auto}.admin-table[data-v-06be07ff]{width:100%;border-collapse:collapse;font-size:13px}.admin-table th[data-v-06be07ff]{text-align:left;font-weight:500;color:var(--text-3);font-size:12px;padding:8px 12px;border-bottom:1px solid var(--border)}.admin-table td[data-v-06be07ff]{padding:9px 12px;border-bottom:1px solid var(--border);white-space:nowrap}.admin-table td[data-v-06be07ff]:last-child{border-bottom:none}.td-name[data-v-06be07ff]{font-weight:500}.role-badge[data-v-06be07ff]{display:inline-flex;align-items:center;border:1px solid var(--accent);color:var(--accent);border-radius:999px;font-size:12px;line-height:16px;padding:1px 8px}.load-line[data-v-06be07ff]{padding:12px;font-size:12px}.admin-note[data-v-06be07ff]{font-size:12px;padding:0 2px}.ops[data-v-06be07ff]{display:inline-flex;gap:6px}.form-row[data-v-06be07ff]{display:flex;flex-direction:column;gap:5px;margin-top:10px}.form-row label[data-v-06be07ff]{font-size:12px;color:var(--text-2)}.fixed-mask[data-v-06be07ff]{position:fixed;top:0;right:0;bottom:0;left:0;z-index:80;background:#1d212959;display:flex;align-items:center;justify-content:center;padding:16px}.dialog[data-v-06be07ff]{background:var(--bg-page);border-radius:12px;width:420px;max-width:100%}.dialog-head[data-v-06be07ff]{display:flex;align-items:center;justify-content:space-between;padding:14px 16px 0}.dialog-title[data-v-06be07ff]{font-weight:600;font-size:14px}.dialog-body[data-v-06be07ff]{padding:6px 16px 4px}.dialog-btns[data-v-06be07ff]{display:flex;justify-content:flex-end;gap:10px;padding:12px 16px 16px}.btn-danger[data-v-06be07ff]{color:var(--danger)}.empty[data-v-06be07ff]{text-align:center}@media (max-width: 720px){.toolbar[data-v-06be07ff]{flex-wrap:wrap;row-gap:8px}.admin-table td[data-v-06be07ff],.admin-table th[data-v-06be07ff]{white-space:normal}}.login-page[data-v-bf714afa]{min-height:100vh;background:var(--bg-subtle);display:flex;align-items:center;justify-content:center;padding:20px}.login-card[data-v-bf714afa]{width:400px;max-width:100%;padding:28px 26px;display:flex;flex-direction:column;gap:12px;background:var(--bg-page)}.login-brand[data-v-bf714afa]{text-align:center;margin-bottom:6px}.brand-icon[data-v-bf714afa]{width:46px;height:46px;margin:0 auto 10px;border-radius:var(--radius-md);background:var(--accent-bg);color:var(--accent);display:flex;align-items:center;justify-content:center}.login-title[data-v-bf714afa]{font-size:18px;font-weight:600;color:var(--text-1)}.login-sub[data-v-bf714afa]{font-size:12px;margin-top:4px;line-height:1.7}.seg[data-v-bf714afa]{display:inline-flex;border:1px solid var(--border-strong);border-radius:var(--radius-sm);overflow:hidden}.seg-btn[data-v-bf714afa]{flex:1;height:30px;border:none;background:var(--bg-page);color:var(--text-2);cursor:pointer;font-size:13px}.seg-btn+.seg-btn[data-v-bf714afa]{border-left:1px solid var(--border)}.seg-btn.active[data-v-bf714afa]{background:var(--accent-bg);color:var(--accent)}.mig-row[data-v-bf714afa]{display:flex;align-items:flex-start;gap:8px;font-size:12px;color:var(--text-2);cursor:pointer;line-height:1.6}.mig-row input[data-v-bf714afa]{margin-top:3px}.form-error[data-v-bf714afa]{color:var(--danger);font-size:12px}.login-btn[data-v-bf714afa]{margin-top:2px}.login-note[data-v-bf714afa]{font-size:12px;text-align:center;line-height:1.7}.app[data-v-c88c3788]{display:flex;height:100vh;height:100dvh;overflow:hidden}.side[data-v-c88c3788]{width:56px;flex:none;border-right:1px solid var(--border);display:flex;flex-direction:column;align-items:center;padding-top:10px;gap:4px;background:var(--bg-page)}.nav-btn[data-v-c88c3788]{width:40px;height:40px;display:flex;align-items:center;justify-content:center;border-radius:var(--radius-md);color:var(--text-3);cursor:pointer;border:none;background:transparent;position:relative}.nav-btn[data-v-c88c3788]:hover{background:var(--bg-hover);color:var(--text-1)}.nav-btn.active[data-v-c88c3788]{background:var(--accent-bg);color:var(--accent)}.nav-btn[data-v-c88c3788]:after{content:attr(data-tip);position:absolute;left:46px;top:50%;transform:translateY(-50%);background:var(--text-1);color:#fff;font-size:12px;line-height:1.4;padding:2px 8px;border-radius:4px;white-space:nowrap;opacity:0;pointer-events:none;transition:opacity .15s}.nav-btn[data-v-c88c3788]:hover:after{opacity:1}.nav-sep[data-v-c88c3788]{width:26px;height:1px;flex:none;background:var(--border);margin:5px 0}[data-v-c88c3788]:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.main[data-v-c88c3788]{flex:1;display:flex;flex-direction:column;min-width:0}.topbar[data-v-c88c3788]{height:56px;flex:none;border-bottom:1px solid var(--border);display:flex;align-items:center;gap:12px;padding:0 20px}.title[data-v-c88c3788]{font-size:14px;font-weight:600}.topbar-actions[data-v-c88c3788]{display:flex;align-items:center;gap:8px}.gsearch[data-v-c88c3788]{position:relative;width:300px;max-width:38vw}.gs-icon[data-v-c88c3788]{position:absolute;left:10px;top:50%;transform:translateY(-50%);color:var(--text-3)}.gs-input[data-v-c88c3788]{height:30px;padding-left:30px}.gs-panel[data-v-c88c3788]{position:absolute;top:36px;left:0;right:0;background:var(--bg-page);border:1px solid var(--border);border-radius:var(--radius-md);box-shadow:var(--shadow-float);z-index:50;max-height:420px;overflow:auto;padding:6px}.gs-group[data-v-c88c3788]{font-size:12px;padding:6px 8px 2px}.gs-item[data-v-c88c3788]{display:flex;align-items:center;gap:8px;padding:6px 8px;border-radius:var(--radius-sm);cursor:pointer}.gs-item[data-v-c88c3788]:hover{background:var(--bg-hover)}.gs-text[data-v-c88c3788],.gs-sub[data-v-c88c3788]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.gs-text[data-v-c88c3788]{font-size:13px}.gs-sub[data-v-c88c3788]{font-size:12px}.gs-date[data-v-c88c3788]{font-size:12px;flex:none}.gs-empty[data-v-c88c3788]{padding:10px;font-size:12px;text-align:center}.user-chip[data-v-c88c3788]{font-size:12px;color:var(--text-2);padding:0 4px}.week-tip[data-v-c88c3788]{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--warn);color:var(--warn);background:var(--bg-page);border-radius:999px;height:26px;padding:0 10px;font-size:12px;cursor:pointer}.week-tip[data-v-c88c3788]:hover{background:var(--bg-subtle)}.content[data-v-c88c3788]{flex:1;overflow:auto}.content-inner[data-v-c88c3788]{max-width:1200px;margin:0 auto;padding:20px}.toast-wrap[data-v-c88c3788]{position:fixed;top:68px;right:20px;z-index:60;display:flex;flex-direction:column;gap:8px;align-items:flex-end;pointer-events:none}.toast[data-v-c88c3788]{background:var(--bg-page);border:1px solid var(--border);box-shadow:var(--shadow-float);border-radius:var(--radius-sm);padding:8px 14px;font-size:13px;color:var(--text-1)}.toast-enter-from[data-v-c88c3788],.toast-leave-to[data-v-c88c3788]{opacity:0;transform:translateY(-4px)}.toast-enter-active[data-v-c88c3788],.toast-leave-active[data-v-c88c3788]{transition:all .15s ease}.mob-search-btn[data-v-c88c3788]{display:none;width:30px;height:30px;border:none;background:transparent;border-radius:var(--radius-sm);color:var(--text-2);cursor:pointer;align-items:center;justify-content:center}.mobile-hide[data-v-c88c3788]{display:initial}.tabbar[data-v-c88c3788]{display:none;position:fixed;left:0;right:0;bottom:0;z-index:30;background:var(--bg-page);border-top:1px solid var(--border);padding-bottom:env(safe-area-inset-bottom)}.tab-btn[data-v-c88c3788]{flex:1;height:46px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;border:none;background:transparent;color:var(--text-3);cursor:pointer;font-size:11px}.tab-btn.active[data-v-c88c3788]{color:var(--accent)}.sheet-mask[data-v-c88c3788]{position:fixed;top:0;right:0;bottom:0;left:0;z-index:70;background:#1d212959}.more-sheet[data-v-c88c3788]{position:absolute;left:0;right:0;bottom:0;background:var(--bg-page);border-radius:14px 14px 0 0;padding:10px 14px calc(14px + env(safe-area-inset-bottom));display:flex;flex-direction:column}.sheet-user[data-v-c88c3788]{font-size:12px;color:var(--text-3);padding:4px 6px 10px;border-bottom:1px solid var(--border);margin-bottom:4px}.sheet-row[data-v-c88c3788]{display:flex;align-items:center;gap:12px;height:46px;border:none;background:transparent;color:var(--text-1);font-size:14px;cursor:pointer;border-radius:var(--radius-sm);text-align:left;padding:0 6px}.sheet-row[data-v-c88c3788]:hover,.sheet-row[data-v-c88c3788]:active{background:var(--bg-hover)}.sheet-name[data-v-c88c3788]{flex:1}.sheet-go[data-v-c88c3788]{color:var(--text-3)}.sheet-divider[data-v-c88c3788]{height:1px;background:var(--border);margin:6px 0}.sheet-danger[data-v-c88c3788]{color:var(--danger)}.msw-mask[data-v-c88c3788]{position:fixed;top:0;right:0;bottom:0;left:0;z-index:70;background:var(--bg-page)}.msw[data-v-c88c3788]{height:100%;display:flex;flex-direction:column}.msw-bar[data-v-c88c3788]{height:52px;flex:none;display:flex;align-items:center;gap:8px;padding:0 12px;border-bottom:1px solid var(--border)}.msw-icon[data-v-c88c3788]{color:var(--text-3)}.msw-input[data-v-c88c3788]{flex:1;height:34px;border:none;outline:none;font-size:14px;background:transparent;color:var(--text-1)}.msw-results[data-v-c88c3788]{flex:1;overflow:auto;padding:10px 4px calc(20px + env(safe-area-inset-bottom))}.msw-item[data-v-c88c3788]{display:flex;align-items:center;gap:8px;padding:10px;border-radius:var(--radius-sm);cursor:pointer}.msw-item[data-v-c88c3788]:hover,.msw-item[data-v-c88c3788]:active{background:var(--bg-hover)}@media (max-width: 720px){.app[data-v-c88c3788]{display:block;height:100dvh}.side[data-v-c88c3788]{display:none}.main[data-v-c88c3788]{display:flex;flex-direction:column;height:100dvh;min-width:0}.topbar[data-v-c88c3788]{height:50px;min-height:50px;padding:0 10px;gap:6px}.title[data-v-c88c3788]{font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.gsearch[data-v-c88c3788],.gsearch .gs-panel[data-v-c88c3788]{display:none}.mob-search-btn[data-v-c88c3788]{display:flex}.topbar-actions[data-v-c88c3788]{margin-left:auto;gap:6px}.mobile-hide[data-v-c88c3788]{display:none!important}.week-tip[data-v-c88c3788]{height:28px;max-width:118px;padding:0 8px;white-space:nowrap;overflow:hidden}.topbar-actions .btn[data-v-c88c3788]{padding:0 10px}.topbar-actions .btn .num[data-v-c88c3788]{font-size:12px}.tabbar[data-v-c88c3788]{display:flex}.content[data-v-c88c3788]{flex:1;min-height:0}.content-inner[data-v-c88c3788]{max-width:none;padding:12px 12px calc(66px + env(safe-area-inset-bottom))}.card[data-v-c88c3788]{border-radius:var(--radius-md)}input.input[data-v-c88c3788],select.select[data-v-c88c3788],textarea.textarea[data-v-c88c3788]{width:100%;box-sizing:border-box}.btn[data-v-c88c3788]{touch-action:manipulation}.topbar-actions .btn-primary[data-v-c88c3788]{height:32px}.toast-wrap[data-v-c88c3788]{top:6px;right:10px;left:10px;align-items:flex-start}}:root{--bg-page: #FFFFFF;--bg-subtle: #F7F8FA;--bg-hover: #F2F3F5;--border: #EBEDF0;--border-strong: #DCDEE3;--text-1: #1D2129;--text-2: #4E5969;--text-3: #86909C;--accent: #3370FF;--accent-bg: #F0F5FF;--ok: #23A757;--warn: #E8842C;--danger: #E5484D;--dot-empty: #C9CDD4;--radius-sm: 6px;--radius-md: 8px;--radius-lg: 12px;--shadow-float: 0 4px 16px rgba(29, 33, 41, .08)}*{box-sizing:border-box}html,body{margin:0;padding:0}body{background:var(--bg-page);color:var(--text-1);font-family:-apple-system,PingFang SC,Microsoft YaHei,system-ui,sans-serif;font-size:13px;line-height:1.6;-webkit-font-smoothing:antialiased}button,input,select,textarea{font:inherit;color:inherit}.num{font-variant-numeric:tabular-nums}.flex1{flex:1}.muted{color:var(--text-3)}.muted2{color:var(--text-2)}.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:0 12px;height:32px;border-radius:var(--radius-sm);border:1px solid var(--border-strong);background:var(--bg-page);color:var(--text-1);cursor:pointer;white-space:nowrap}.btn:hover{background:var(--bg-hover)}.btn:disabled{opacity:.45;cursor:not-allowed}.btn-primary{background:var(--accent);border-color:var(--accent);color:#fff}.btn-primary:hover{background:#2b5fd9}.btn-danger{color:var(--danger);border-color:var(--danger)}.btn-sm{height:26px;padding:0 10px;font-size:12px}.btn-xs{height:22px;padding:0 8px;font-size:12px}.input,.select,.textarea{height:32px;padding:0 10px;border:1px solid var(--border-strong);border-radius:var(--radius-sm);background:var(--bg-page);outline:none;width:100%}.textarea{height:auto;min-height:56px;padding:8px 10px;resize:vertical}.input:focus,.select:focus,.textarea:focus{border-color:var(--accent)}.input::placeholder,.textarea::placeholder{color:var(--text-3)}.card{border:1px solid var(--border);border-radius:var(--radius-md);background:var(--bg-page)}.icon-btn{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;flex:none;border:none;background:transparent;border-radius:var(--radius-sm);color:var(--text-3);cursor:pointer}.icon-btn:hover{background:var(--bg-hover);color:var(--text-1)}.icon-btn.active{color:var(--accent)}.icon-btn.active-warn{color:var(--warn)}.tag{display:inline-block;padding:0 8px;height:22px;line-height:20px;border-radius:4px;font-size:12px;background:var(--bg-subtle);color:var(--text-2);border:1px solid var(--border);white-space:nowrap}.dot{width:6px;height:6px;border-radius:50%;display:inline-block;flex:none}.dot.normal{background:var(--ok)}.dot.late,.dot.early,.dot.incomplete{background:var(--warn)}.dot.absent{background:var(--danger)}.dot.none,.dot.leave{background:var(--dot-empty)}@media (max-width: 720px){input,select,textarea{font-size:16px!important}input[type=checkbox]{font-size:initial}}.dot.rest{background:var(--border)}.icon{display:inline-flex;align-items:center;justify-content:center;flex:none}.icon svg{width:100%;height:100%;display:block}@media (max-width: 720px){.card{border-radius:12px}input.input,select.select,textarea.textarea{width:100%;box-sizing:border-box}.btn{touch-action:manipulation}.dialog{width:calc(100vw - 20px)!important;max-width:calc(100vw - 20px)!important;max-height:86vh;max-height:86dvh;overflow:auto}.dialog-body{padding:14px!important}.form-grid{grid-template-columns:1fr!important}.dialog-btns{gap:8px}.dialog-btns .btn{flex:1}.drawer{top:auto!important;left:0!important;width:100%!important;height:min(86vh,86dvh)!important;border-left:none!important;border-top:1px solid var(--border);border-radius:14px 14px 0 0!important}.drawer-enter-active,.drawer-leave-active{transition:transform .2s ease,opacity .2s ease}.drawer-enter-from,.drawer-leave-to{transform:translateY(28px);opacity:0}.drawer-head{border-radius:14px 14px 0 0}.drawer-body{padding:12px!important}.tx-table{min-width:0!important}.tx-table thead{display:none!important}.tx-table tr{display:block;padding:10px 12px;border-bottom:1px solid var(--border);background:transparent}.tx-table tbody tr:last-child{border-bottom:none}.tx-table td{display:flex!important;align-items:center;justify-content:space-between;gap:12px;padding:3px 0!important;border:none!important;white-space:normal!important}.tx-table td:before{content:attr(data-label);color:var(--text-3);font-size:12px;flex:none}.tx-table td.ops-cell:before{content:none}.tx-table td.ops-cell{justify-content:flex-end}.tx-table td.empty{justify-content:center}.tx-table td.empty:before{content:none!important}.table-card,.tx-card{overflow-x:auto}.cred-table{min-width:560px!important}.th-ops{width:auto!important}.vault-toolbar{flex-wrap:wrap;row-gap:8px}.vault-toolbar .search-wrap{width:100%;max-width:none!important}.vault-toolbar .flex1{display:none}.vault-toolbar .btn{flex:none}.cal-toolbar{margin-bottom:8px}.cal-cell{min-height:54px!important;padding:4px 5px!important}.cal-marks{margin-top:3px!important;height:12px!important;gap:3px!important}.section,.sec{padding:12px!important}.rule-grid{grid-template-columns:1fr!important}} diff --git a/intern-log/dist/assets/web-e9jKyg3_.js b/intern-log/dist/assets/web-BbcS1QA8.js similarity index 98% rename from intern-log/dist/assets/web-e9jKyg3_.js rename to intern-log/dist/assets/web-BbcS1QA8.js index ee68217..10dce67 100644 --- a/intern-log/dist/assets/web-e9jKyg3_.js +++ b/intern-log/dist/assets/web-BbcS1QA8.js @@ -1 +1 @@ -import{W as P,b as x}from"./index-DLDMtYxl.js";import{Encoding as E}from"./index-CJCBehez.js";function m(w){const e=w.split("/").filter(t=>t!=="."),r=[];return e.forEach(t=>{t===".."&&r.length>0&&r[r.length-1]!==".."?r.pop():r.push(t)}),r.join("/")}function R(w,e){w=m(w),e=m(e);const r=w.split("/"),t=e.split("/");return w!==e&&r.every((i,n)=>i===t[n])}class g extends P{constructor(){super(...arguments),this.DB_VERSION=1,this.DB_NAME="Disc",this._writeCmds=["add","put","delete"],this.downloadFile=async e=>{var r,t;const i=x(e,e.webFetchExtra),n=await fetch(e.url,i);let s;if(!e.progress)s=await n.blob();else if(!(n!=null&&n.body))s=new Blob;else{const c=n.body.getReader();let o=0;const d=[],h=n.headers.get("content-type"),y=parseInt(n.headers.get("content-length")||"0",10);for(;;){const{done:f,value:p}=await c.read();if(f)break;d.push(p),o+=(p==null?void 0:p.length)||0;const b={url:e.url,bytes:o,contentLength:y};this.notifyListeners("progress",b)}const u=new Uint8Array(o);let l=0;for(const f of d)typeof f>"u"||(u.set(f,l),l+=f.length);s=new Blob([u.buffer],{type:h||void 0})}return{path:(await this.writeFile({path:e.path,directory:(r=e.directory)!==null&&r!==void 0?r:void 0,recursive:(t=e.recursive)!==null&&t!==void 0?t:!1,data:s})).uri,blob:s}}}async initDb(){if(this._db!==void 0)return this._db;if(!("indexedDB"in window))throw this.unavailable("This browser doesn't support IndexedDB");return new Promise((e,r)=>{const t=indexedDB.open(this.DB_NAME,this.DB_VERSION);t.onupgradeneeded=g.doUpgrade,t.onsuccess=()=>{this._db=t.result,e(t.result)},t.onerror=()=>r(t.error),t.onblocked=()=>{console.warn("db blocked")}})}static doUpgrade(e){const t=e.target.result;switch(e.oldVersion){case 0:case 1:default:t.objectStoreNames.contains("FileStorage")&&t.deleteObjectStore("FileStorage"),t.createObjectStore("FileStorage",{keyPath:"path"}).createIndex("by_folder","folder")}}async dbRequest(e,r){const t=this._writeCmds.indexOf(e)!==-1?"readwrite":"readonly";return this.initDb().then(i=>new Promise((n,s)=>{const o=i.transaction(["FileStorage"],t).objectStore("FileStorage")[e](...r);o.onsuccess=()=>n(o.result),o.onerror=()=>s(o.error)}))}async dbIndexRequest(e,r,t){const i=this._writeCmds.indexOf(r)!==-1?"readwrite":"readonly";return this.initDb().then(n=>new Promise((s,a)=>{const h=n.transaction(["FileStorage"],i).objectStore("FileStorage").index(e)[r](...t);h.onsuccess=()=>s(h.result),h.onerror=()=>a(h.error)}))}getPath(e,r){const t=r!==void 0?r.replace(/^[/]+|[/]+$/g,""):"";let i="";return e!==void 0&&(i+="/"+e),r!==""&&(i+="/"+t),i}async clear(){(await this.initDb()).transaction(["FileStorage"],"readwrite").objectStore("FileStorage").clear()}async readFile(e){const r=this.getPath(e.directory,e.path),t=await this.dbRequest("get",[r]);if(t===void 0)throw Error("File does not exist.");return{data:t.content?t.content:""}}async writeFile(e){const r=this.getPath(e.directory,e.path);let t=e.data;const i=e.encoding,n=e.recursive,s=await this.dbRequest("get",[r]);if(s&&s.type==="directory")throw Error("The supplied path is a directory.");const a=r.substr(0,r.lastIndexOf("/"));if(await this.dbRequest("get",[a])===void 0){const h=a.indexOf("/",1);if(h!==-1){const y=a.substr(h);await this.mkdir({path:y,directory:e.directory,recursive:n})}}if(!i&&!(t instanceof Blob)&&(t=t.indexOf(",")>=0?t.split(",")[1]:t,!this.isBase64String(t)))throw Error("The supplied data is not valid base64 content.");const o=Date.now(),d={path:r,folder:a,type:"file",size:t instanceof Blob?t.size:t.length,ctime:o,mtime:o,content:t};return await this.dbRequest("put",[d]),{uri:d.path}}async appendFile(e){const r=this.getPath(e.directory,e.path);let t=e.data;const i=e.encoding,n=r.substr(0,r.lastIndexOf("/")),s=Date.now();let a=s;const c=await this.dbRequest("get",[r]);if(c&&c.type==="directory")throw Error("The supplied path is a directory.");if(await this.dbRequest("get",[n])===void 0){const h=n.indexOf("/",1);if(h!==-1){const y=n.substr(h);await this.mkdir({path:y,directory:e.directory,recursive:!0})}}if(!i&&!this.isBase64String(t))throw Error("The supplied data is not valid base64 content.");if(c!==void 0){if(c.content instanceof Blob)throw Error("The occupied entry contains a Blob object which cannot be appended to.");c.content!==void 0&&!i?t=btoa(atob(c.content)+atob(t)):t=c.content+t,a=c.ctime}const d={path:r,folder:n,type:"file",size:t.length,ctime:a,mtime:s,content:t};await this.dbRequest("put",[d])}async deleteFile(e){const r=this.getPath(e.directory,e.path);if(await this.dbRequest("get",[r])===void 0)throw Error("File does not exist.");if((await this.dbIndexRequest("by_folder","getAllKeys",[IDBKeyRange.only(r)])).length!==0)throw Error("Folder is not empty.");await this.dbRequest("delete",[r])}async mkdir(e){const r=this.getPath(e.directory,e.path),t=e.recursive,i=r.substr(0,r.lastIndexOf("/")),n=(r.match(/\//g)||[]).length,s=await this.dbRequest("get",[i]),a=await this.dbRequest("get",[r]);if(n===1)throw Error("Cannot create Root directory");if(a!==void 0)throw Error("Current directory does already exist.");if(!t&&n!==2&&s===void 0)throw Error("Parent directory must exist");if(t&&n!==2&&s===void 0){const d=i.substr(i.indexOf("/",1));await this.mkdir({path:d,directory:e.directory,recursive:t})}const c=Date.now(),o={path:r,folder:i,type:"directory",size:0,ctime:c,mtime:c};await this.dbRequest("put",[o])}async rmdir(e){const{path:r,directory:t,recursive:i}=e,n=this.getPath(t,r),s=await this.dbRequest("get",[n]);if(s===void 0)throw Error("Folder does not exist.");if(s.type!=="directory")throw Error("Requested path is not a directory");const a=await this.readdir({path:r,directory:t});if(a.files.length!==0&&!i)throw Error("Folder is not empty");for(const c of a.files){const o=`${r}/${c.name}`;(await this.stat({path:o,directory:t})).type==="file"?await this.deleteFile({path:o,directory:t}):await this.rmdir({path:o,directory:t,recursive:i})}await this.dbRequest("delete",[n])}async readdir(e){const r=this.getPath(e.directory,e.path),t=await this.dbRequest("get",[r]);if(e.path!==""&&t===void 0)throw Error("Folder does not exist.");const i=await this.dbIndexRequest("by_folder","getAllKeys",[IDBKeyRange.only(r)]);return{files:await Promise.all(i.map(async s=>{let a=await this.dbRequest("get",[s]);return a===void 0&&(a=await this.dbRequest("get",[s+"/"])),{name:s.substring(r.length+1),type:a.type,size:a.size,ctime:a.ctime,mtime:a.mtime,uri:a.path}}))}}async getUri(e){const r=this.getPath(e.directory,e.path);let t=await this.dbRequest("get",[r]);return t===void 0&&(t=await this.dbRequest("get",[r+"/"])),{uri:(t==null?void 0:t.path)||r}}async stat(e){const r=this.getPath(e.directory,e.path);let t=await this.dbRequest("get",[r]);if(t===void 0&&(t=await this.dbRequest("get",[r+"/"])),t===void 0)throw Error("Entry does not exist.");return{type:t.type,size:t.size,ctime:t.ctime,mtime:t.mtime,uri:t.path}}async rename(e){await this._copy(e,!0)}async copy(e){return this._copy(e,!1)}async requestPermissions(){return{publicStorage:"granted"}}async checkPermissions(){return{publicStorage:"granted"}}async _copy(e,r=!1){let{toDirectory:t}=e;const{to:i,from:n,directory:s}=e;if(!i||!n)throw Error("Both to and from must be provided");t||(t=s);const a=this.getPath(s,n),c=this.getPath(t,i);if(a===c)return{uri:c};if(R(a,c))throw Error("To path cannot contain the from path");let o;try{o=await this.stat({path:i,directory:t})}catch{const l=i.split("/");l.pop();const f=l.join("/");if(l.length>0&&(await this.stat({path:f,directory:t})).type!=="directory")throw new Error("Parent directory of the to path is a file")}if(o&&o.type==="directory")throw new Error("Cannot overwrite a directory with a file");const d=await this.stat({path:n,directory:s}),h=async(u,l,f)=>{const p=this.getPath(t,u),b=await this.dbRequest("get",[p]);b.ctime=l,b.mtime=f,await this.dbRequest("put",[b])},y=d.ctime?d.ctime:Date.now();switch(d.type){case"file":{const u=await this.readFile({path:n,directory:s});r&&await this.deleteFile({path:n,directory:s});let l;!(u.data instanceof Blob)&&!this.isBase64String(u.data)&&(l=E.UTF8);const f=await this.writeFile({path:i,directory:t,data:u.data,encoding:l});return r&&await h(i,y,d.mtime),f}case"directory":{if(o)throw Error("Cannot move a directory over an existing object");try{await this.mkdir({path:i,directory:t,recursive:!1}),r&&await h(i,y,d.mtime)}catch{}const u=(await this.readdir({path:n,directory:s})).files;for(const l of u)await this._copy({from:`${n}/${l.name}`,to:`${i}/${l.name}`,directory:s,toDirectory:t},r);r&&await this.rmdir({path:n,directory:s})}}return{uri:c}}isBase64String(e){try{return btoa(atob(e))==e}catch{return!1}}}g._debug=!0;export{g as FilesystemWeb}; +import{W as P,b as x}from"./index-CtHE6m7N.js";import{Encoding as E}from"./index-C-oU33BQ.js";function m(w){const e=w.split("/").filter(t=>t!=="."),r=[];return e.forEach(t=>{t===".."&&r.length>0&&r[r.length-1]!==".."?r.pop():r.push(t)}),r.join("/")}function R(w,e){w=m(w),e=m(e);const r=w.split("/"),t=e.split("/");return w!==e&&r.every((i,n)=>i===t[n])}class g extends P{constructor(){super(...arguments),this.DB_VERSION=1,this.DB_NAME="Disc",this._writeCmds=["add","put","delete"],this.downloadFile=async e=>{var r,t;const i=x(e,e.webFetchExtra),n=await fetch(e.url,i);let s;if(!e.progress)s=await n.blob();else if(!(n!=null&&n.body))s=new Blob;else{const c=n.body.getReader();let o=0;const d=[],h=n.headers.get("content-type"),y=parseInt(n.headers.get("content-length")||"0",10);for(;;){const{done:f,value:p}=await c.read();if(f)break;d.push(p),o+=(p==null?void 0:p.length)||0;const b={url:e.url,bytes:o,contentLength:y};this.notifyListeners("progress",b)}const u=new Uint8Array(o);let l=0;for(const f of d)typeof f>"u"||(u.set(f,l),l+=f.length);s=new Blob([u.buffer],{type:h||void 0})}return{path:(await this.writeFile({path:e.path,directory:(r=e.directory)!==null&&r!==void 0?r:void 0,recursive:(t=e.recursive)!==null&&t!==void 0?t:!1,data:s})).uri,blob:s}}}async initDb(){if(this._db!==void 0)return this._db;if(!("indexedDB"in window))throw this.unavailable("This browser doesn't support IndexedDB");return new Promise((e,r)=>{const t=indexedDB.open(this.DB_NAME,this.DB_VERSION);t.onupgradeneeded=g.doUpgrade,t.onsuccess=()=>{this._db=t.result,e(t.result)},t.onerror=()=>r(t.error),t.onblocked=()=>{console.warn("db blocked")}})}static doUpgrade(e){const t=e.target.result;switch(e.oldVersion){case 0:case 1:default:t.objectStoreNames.contains("FileStorage")&&t.deleteObjectStore("FileStorage"),t.createObjectStore("FileStorage",{keyPath:"path"}).createIndex("by_folder","folder")}}async dbRequest(e,r){const t=this._writeCmds.indexOf(e)!==-1?"readwrite":"readonly";return this.initDb().then(i=>new Promise((n,s)=>{const o=i.transaction(["FileStorage"],t).objectStore("FileStorage")[e](...r);o.onsuccess=()=>n(o.result),o.onerror=()=>s(o.error)}))}async dbIndexRequest(e,r,t){const i=this._writeCmds.indexOf(r)!==-1?"readwrite":"readonly";return this.initDb().then(n=>new Promise((s,a)=>{const h=n.transaction(["FileStorage"],i).objectStore("FileStorage").index(e)[r](...t);h.onsuccess=()=>s(h.result),h.onerror=()=>a(h.error)}))}getPath(e,r){const t=r!==void 0?r.replace(/^[/]+|[/]+$/g,""):"";let i="";return e!==void 0&&(i+="/"+e),r!==""&&(i+="/"+t),i}async clear(){(await this.initDb()).transaction(["FileStorage"],"readwrite").objectStore("FileStorage").clear()}async readFile(e){const r=this.getPath(e.directory,e.path),t=await this.dbRequest("get",[r]);if(t===void 0)throw Error("File does not exist.");return{data:t.content?t.content:""}}async writeFile(e){const r=this.getPath(e.directory,e.path);let t=e.data;const i=e.encoding,n=e.recursive,s=await this.dbRequest("get",[r]);if(s&&s.type==="directory")throw Error("The supplied path is a directory.");const a=r.substr(0,r.lastIndexOf("/"));if(await this.dbRequest("get",[a])===void 0){const h=a.indexOf("/",1);if(h!==-1){const y=a.substr(h);await this.mkdir({path:y,directory:e.directory,recursive:n})}}if(!i&&!(t instanceof Blob)&&(t=t.indexOf(",")>=0?t.split(",")[1]:t,!this.isBase64String(t)))throw Error("The supplied data is not valid base64 content.");const o=Date.now(),d={path:r,folder:a,type:"file",size:t instanceof Blob?t.size:t.length,ctime:o,mtime:o,content:t};return await this.dbRequest("put",[d]),{uri:d.path}}async appendFile(e){const r=this.getPath(e.directory,e.path);let t=e.data;const i=e.encoding,n=r.substr(0,r.lastIndexOf("/")),s=Date.now();let a=s;const c=await this.dbRequest("get",[r]);if(c&&c.type==="directory")throw Error("The supplied path is a directory.");if(await this.dbRequest("get",[n])===void 0){const h=n.indexOf("/",1);if(h!==-1){const y=n.substr(h);await this.mkdir({path:y,directory:e.directory,recursive:!0})}}if(!i&&!this.isBase64String(t))throw Error("The supplied data is not valid base64 content.");if(c!==void 0){if(c.content instanceof Blob)throw Error("The occupied entry contains a Blob object which cannot be appended to.");c.content!==void 0&&!i?t=btoa(atob(c.content)+atob(t)):t=c.content+t,a=c.ctime}const d={path:r,folder:n,type:"file",size:t.length,ctime:a,mtime:s,content:t};await this.dbRequest("put",[d])}async deleteFile(e){const r=this.getPath(e.directory,e.path);if(await this.dbRequest("get",[r])===void 0)throw Error("File does not exist.");if((await this.dbIndexRequest("by_folder","getAllKeys",[IDBKeyRange.only(r)])).length!==0)throw Error("Folder is not empty.");await this.dbRequest("delete",[r])}async mkdir(e){const r=this.getPath(e.directory,e.path),t=e.recursive,i=r.substr(0,r.lastIndexOf("/")),n=(r.match(/\//g)||[]).length,s=await this.dbRequest("get",[i]),a=await this.dbRequest("get",[r]);if(n===1)throw Error("Cannot create Root directory");if(a!==void 0)throw Error("Current directory does already exist.");if(!t&&n!==2&&s===void 0)throw Error("Parent directory must exist");if(t&&n!==2&&s===void 0){const d=i.substr(i.indexOf("/",1));await this.mkdir({path:d,directory:e.directory,recursive:t})}const c=Date.now(),o={path:r,folder:i,type:"directory",size:0,ctime:c,mtime:c};await this.dbRequest("put",[o])}async rmdir(e){const{path:r,directory:t,recursive:i}=e,n=this.getPath(t,r),s=await this.dbRequest("get",[n]);if(s===void 0)throw Error("Folder does not exist.");if(s.type!=="directory")throw Error("Requested path is not a directory");const a=await this.readdir({path:r,directory:t});if(a.files.length!==0&&!i)throw Error("Folder is not empty");for(const c of a.files){const o=`${r}/${c.name}`;(await this.stat({path:o,directory:t})).type==="file"?await this.deleteFile({path:o,directory:t}):await this.rmdir({path:o,directory:t,recursive:i})}await this.dbRequest("delete",[n])}async readdir(e){const r=this.getPath(e.directory,e.path),t=await this.dbRequest("get",[r]);if(e.path!==""&&t===void 0)throw Error("Folder does not exist.");const i=await this.dbIndexRequest("by_folder","getAllKeys",[IDBKeyRange.only(r)]);return{files:await Promise.all(i.map(async s=>{let a=await this.dbRequest("get",[s]);return a===void 0&&(a=await this.dbRequest("get",[s+"/"])),{name:s.substring(r.length+1),type:a.type,size:a.size,ctime:a.ctime,mtime:a.mtime,uri:a.path}}))}}async getUri(e){const r=this.getPath(e.directory,e.path);let t=await this.dbRequest("get",[r]);return t===void 0&&(t=await this.dbRequest("get",[r+"/"])),{uri:(t==null?void 0:t.path)||r}}async stat(e){const r=this.getPath(e.directory,e.path);let t=await this.dbRequest("get",[r]);if(t===void 0&&(t=await this.dbRequest("get",[r+"/"])),t===void 0)throw Error("Entry does not exist.");return{type:t.type,size:t.size,ctime:t.ctime,mtime:t.mtime,uri:t.path}}async rename(e){await this._copy(e,!0)}async copy(e){return this._copy(e,!1)}async requestPermissions(){return{publicStorage:"granted"}}async checkPermissions(){return{publicStorage:"granted"}}async _copy(e,r=!1){let{toDirectory:t}=e;const{to:i,from:n,directory:s}=e;if(!i||!n)throw Error("Both to and from must be provided");t||(t=s);const a=this.getPath(s,n),c=this.getPath(t,i);if(a===c)return{uri:c};if(R(a,c))throw Error("To path cannot contain the from path");let o;try{o=await this.stat({path:i,directory:t})}catch{const l=i.split("/");l.pop();const f=l.join("/");if(l.length>0&&(await this.stat({path:f,directory:t})).type!=="directory")throw new Error("Parent directory of the to path is a file")}if(o&&o.type==="directory")throw new Error("Cannot overwrite a directory with a file");const d=await this.stat({path:n,directory:s}),h=async(u,l,f)=>{const p=this.getPath(t,u),b=await this.dbRequest("get",[p]);b.ctime=l,b.mtime=f,await this.dbRequest("put",[b])},y=d.ctime?d.ctime:Date.now();switch(d.type){case"file":{const u=await this.readFile({path:n,directory:s});r&&await this.deleteFile({path:n,directory:s});let l;!(u.data instanceof Blob)&&!this.isBase64String(u.data)&&(l=E.UTF8);const f=await this.writeFile({path:i,directory:t,data:u.data,encoding:l});return r&&await h(i,y,d.mtime),f}case"directory":{if(o)throw Error("Cannot move a directory over an existing object");try{await this.mkdir({path:i,directory:t,recursive:!1}),r&&await h(i,y,d.mtime)}catch{}const u=(await this.readdir({path:n,directory:s})).files;for(const l of u)await this._copy({from:`${n}/${l.name}`,to:`${i}/${l.name}`,directory:s,toDirectory:t},r);r&&await this.rmdir({path:n,directory:s})}}return{uri:c}}isBase64String(e){try{return btoa(atob(e))==e}catch{return!1}}}g._debug=!0;export{g as FilesystemWeb}; diff --git a/intern-log/dist/index.html b/intern-log/dist/index.html index 049bab3..9d65a57 100644 --- a/intern-log/dist/index.html +++ b/intern-log/dist/index.html @@ -8,8 +8,8 @@ 实习工作日志 - - + +
diff --git a/intern-log/package.json b/intern-log/package.json index 1972592..5b3ee60 100644 --- a/intern-log/package.json +++ b/intern-log/package.json @@ -1,7 +1,7 @@ { "name": "intern-log", "private": true, - "version": "0.5.0", + "version": "0.6.0", "type": "module", "scripts": { "dev": "vite", diff --git a/intern-log/src/App.vue b/intern-log/src/App.vue index bf3b11e..086f603 100644 --- a/intern-log/src/App.vue +++ b/intern-log/src/App.vue @@ -230,20 +230,31 @@ onMounted(async () => { } }) - - diff --git a/intern-log/src/components/CredentialDialog.vue b/intern-log/src/components/CredentialDialog.vue index e4944d2..3964d84 100644 --- a/intern-log/src/components/CredentialDialog.vue +++ b/intern-log/src/components/CredentialDialog.vue @@ -112,44 +112,7 @@ function save() { diff --git a/intern-log/src/components/TransactionDialog.vue b/intern-log/src/components/TransactionDialog.vue index 5c1679f..e0b28a8 100644 --- a/intern-log/src/components/TransactionDialog.vue +++ b/intern-log/src/components/TransactionDialog.vue @@ -48,8 +48,10 @@ watch(() => props.open, async v => { }) onUnmounted(() => window.removeEventListener('keydown', onKey)) -watch(fType, t => { - fCategory.value = t === 'expense' ? EXPENSE_CATEGORIES[0] : INCOME_CATEGORIES[0] +// 切换收支类型后:重新拉取对应分类列表,并回落到第一项 +watch(fType, async () => { + await loadCats() + fCategory.value = categoryOptions.value[0] || '' }) const categoryOptions = ref([]) @@ -158,57 +160,7 @@ function save() { diff --git a/intern-log/src/components/log/DayPanel.vue b/intern-log/src/components/log/DayPanel.vue index 49764f1..6e35af3 100644 --- a/intern-log/src/components/log/DayPanel.vue +++ b/intern-log/src/components/log/DayPanel.vue @@ -163,12 +163,16 @@ async function saveMakeupForm() { // ---- 条目操作 ---- +// 弹窗开关与编辑目标分离:添加模式 editTarget 为 null,但弹窗也要打开 const editTarget = ref(null) +const dialogOpen = ref(false) function openEdit(it: LogItem) { editTarget.value = it + dialogOpen.value = true } function openAdd() { editTarget.value = null + dialogOpen.value = true } async function onEditSave(payload: { id: number @@ -196,6 +200,7 @@ async function onEditSave(payload: { showToast('记录已添加') } editTarget.value = null + dialogOpen.value = false await load() } async function toggleMilestone(it: LogItem) { @@ -398,11 +403,11 @@ async function confirmDelete() { /> @@ -412,34 +417,32 @@ async function confirmDelete() { .dp-head { margin-bottom: 12px; } .dp-date { font-size: 14px; font-weight: 600; } -.sec { padding: 14px 16px; margin-bottom: 12px; } -.sec-title { font-size: 13px; font-weight: 600; margin-bottom: 10px; color: var(--text-1); } -.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 10px; } -.sec-head .sec-title { margin-bottom: 0; } -.form-hint { font-size: 12px; } - .att-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; } -.att-cell label, .field label { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 4px; } +.att-cell label { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 4px; } .att-val { display: flex; align-items: center; gap: 6px; min-height: 32px; font-size: 13px; } -.status-val { min-height: 32px; } .val-empty { color: var(--text-3); } .edit-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; } .time-input { width: 104px; } .att-note { margin-top: 10px; font-size: 12px; } -.att-actions { display: flex; gap: 8px; margin-top: 12px; } +.att-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; } -.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; } -.field.span2 { grid-column: span 2; } .form-footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); } -.form-error { color: var(--danger); font-size: 12px; margin-top: 4px; } -.input.invalid { border-color: var(--danger); } -.input.invalid:focus { border-color: var(--danger); } .list-sec { margin-bottom: 4px; } -.item { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 10px; margin-bottom: 6px; background: var(--bg-page); } +.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 10px; } +.sec-head .sec-title { margin-bottom: 0; } +.item { + border: 1px solid var(--border); + border-radius: var(--radius-sm); + padding: 9px 12px; + margin-bottom: 6px; + background: var(--bg-subtle); + transition: border-color 0.12s, background 0.12s; +} +.item:hover { border-color: var(--border-strong); background: var(--bg-page); } .item-main { display: flex; align-items: center; gap: 8px; min-height: 26px; flex-wrap: wrap; } .item-content { cursor: text; word-break: break-all; } .item-meta { font-size: 12px; } @@ -447,11 +450,9 @@ async function confirmDelete() { margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--border); font-size: 12px; display: flex; flex-direction: column; gap: 2px; } -.empty { text-align: center; padding: 24px 0; } .dp-foot { margin-top: 10px; font-size: 12px; text-align: right; } @media (max-width: 560px) { - .att-grid, .form-grid { grid-template-columns: 1fr; } - .field.span2 { grid-column: auto; } + .att-grid { grid-template-columns: 1fr; } } diff --git a/intern-log/src/components/log/EditLogDialog.vue b/intern-log/src/components/log/EditLogDialog.vue index a7a0210..f020e36 100644 --- a/intern-log/src/components/log/EditLogDialog.vue +++ b/intern-log/src/components/log/EditLogDialog.vue @@ -113,7 +113,7 @@ function save() { @@ -182,65 +182,5 @@ function save() { diff --git a/intern-log/src/db/repo.ts b/intern-log/src/db/repo.ts index 7992d81..544c4c8 100644 --- a/intern-log/src/db/repo.ts +++ b/intern-log/src/db/repo.ts @@ -2,6 +2,9 @@ // 约定:每个写函数修改本地缓存后立即调用 commit() —— 推送差异给服务器, // 并以服务器返回的权威快照重建缓存;断网时抛出错误(纯在线模式)。 import { db, DEFAULT_LOCATIONS, SCHEMA_VERSION, type Attendance, type Credential, type LogItem, type Memo, type Goal, type PlanItem, type Project, type Transaction, type WeeklyNote, type WorkLog } from './schema' + +// 视图直接从 repo 导入这些类型:在此统一再导出 +export type { Attendance, Credential, LogItem, Memo, Goal, PlanItem, Project, Transaction, WeeklyNote, WorkLog } import { addDays, nowLocalISO, toDateStr } from '../lib/date' import { flushAfterWrite } from '../sync/engine' diff --git a/intern-log/src/env.d.ts b/intern-log/src/env.d.ts new file mode 100644 index 0000000..54eaa07 --- /dev/null +++ b/intern-log/src/env.d.ts @@ -0,0 +1,3 @@ +/// + +declare const __APP_VERSION__: string diff --git a/intern-log/src/styles/mobile.css b/intern-log/src/styles/mobile.css index ca80e87..cbb0b03 100644 --- a/intern-log/src/styles/mobile.css +++ b/intern-log/src/styles/mobile.css @@ -3,8 +3,8 @@ (App.vue 的壳层样式是 scoped,跨组件规则统一放这里,便于集中管理) ============================================================ */ -/* 通用的白底卡片在窄屏贴边 */ @media (max-width: 720px) { + /* 卡片在窄屏贴边、圆角略收 */ .card { border-radius: 12px; } input.input, select.select, textarea.textarea { @@ -13,18 +13,18 @@ } .btn { touch-action: manipulation; } - /* ---------- 弹窗:窄屏一体布局,覆盖组件内固定宽度 ---------- */ + /* ---------- 弹窗:窄屏近全屏 ---------- */ .dialog { width: calc(100vw - 20px) !important; max-width: calc(100vw - 20px) !important; - max-height: 86vh; - max-height: 86dvh; - overflow: auto; + max-height: 88vh; + max-height: 88dvh; } - .dialog-body { padding: 14px !important; } - .form-grid { grid-template-columns: 1fr !important; } - .dialog-btns { gap: 8px; } + .dialog-head { padding: 14px 16px 10px !important; } + .dialog-body { padding: 14px 16px !important; } + .dialog-btns { padding: 10px 16px 14px !important; } .dialog-btns .btn { flex: 1; } + .form-grid { grid-template-columns: 1fr !important; } /* ---------- 日历当日抽屉:改为底部抽屉 ---------- */ .drawer { @@ -35,6 +35,7 @@ border-left: none !important; border-top: 1px solid var(--border); border-radius: 14px 14px 0 0 !important; + box-shadow: 0 -8px 24px rgba(16, 24, 40, 0.10); } .drawer-enter-active, .drawer-leave-active { transition: transform 0.2s ease, opacity 0.2s ease; } .drawer-enter-from, .drawer-leave-to { transform: translateY(28px); opacity: 0; } @@ -66,7 +67,7 @@ .tx-table td.empty { justify-content: center; } .tx-table td.empty::before { content: none !important; } - /* ---------- 密码库等其余宽表:横向滚动,不再挤压折行 ---------- */ + /* ---------- 密码库等其余宽表:横向滚动 ---------- */ .table-card, .tx-card { overflow-x: auto; } .cred-table { min-width: 560px !important; } .th-ops { width: auto !important; } @@ -75,12 +76,18 @@ .vault-toolbar .flex1 { display: none; } .vault-toolbar .btn { flex: none; } + /* ---------- 统计卡两列 ---------- */ + .cards { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; } + .stat-card { padding: 12px 14px !important; } + .stat-num { font-size: 19px !important; } + + /* ---------- 分区与栅格收窄 ---------- */ + .section, .sec { padding: 12px 12px !important; } + .rule-grid { grid-template-columns: 1fr !important; } + .two-col { grid-template-columns: 1fr !important; } + /* ---------- 日历格子收窄 ---------- */ .cal-toolbar { margin-bottom: 8px; } .cal-cell { min-height: 54px !important; padding: 4px 5px !important; } .cal-marks { margin-top: 3px !important; height: 12px !important; gap: 3px !important; } - - /* ---------- 各种桌面习惯型小间距收敛 ---------- */ - .section, .sec { padding: 12px 12px !important; } - .rule-grid { grid-template-columns: 1fr !important; } } diff --git a/intern-log/src/styles/tokens.css b/intern-log/src/styles/tokens.css index d048fe9..7c77488 100644 --- a/intern-log/src/styles/tokens.css +++ b/intern-log/src/styles/tokens.css @@ -1,50 +1,72 @@ +/* ============================================================ + 设计基座 ·「高级白」企业级 + 层次模型:内容区浅灰底(--bg-app) → 白色卡片(--bg-page) → + 浅灰内嵌块(--bg-subtle)。所有视图共用此处组件类,禁止各自造轮子。 + ============================================================ */ :root { - --bg-page: #FFFFFF; - --bg-subtle: #F7F8FA; + /* 表面 */ + --bg-app: #F5F6F8; /* 应用内容区底色 */ + --bg-page: #FFFFFF; /* 卡片 / 面板 */ + --bg-subtle: #F7F8FA; /* 表头 / 内嵌块 */ --bg-hover: #F2F3F5; - --border: #EBEDF0; - --border-strong: #DCDEE3; + /* 文字 */ --text-1: #1D2129; --text-2: #4E5969; --text-3: #86909C; + /* 线 */ + --border: #E8EAEE; + --border-strong: #DCDFE4; + /* 品牌与语义色 */ --accent: #3370FF; - --accent-bg: #F0F5FF; + --accent-deep: #2B5FD9; + --accent-bg: #EEF4FF; --ok: #23A757; --warn: #E8842C; --danger: #E5484D; --dot-empty: #C9CDD4; + /* 几何 */ --radius-sm: 6px; - --radius-md: 8px; - --radius-lg: 12px; - --shadow-float: 0 4px 16px rgba(29, 33, 41, 0.08); + --radius-md: 10px; + --radius-lg: 14px; + /* 阴影 */ + --shadow-card: 0 1px 2px rgba(16, 24, 40, 0.04); + --shadow-float: 0 12px 32px -8px rgba(16, 24, 40, 0.14), 0 4px 12px rgba(16, 24, 40, 0.06); + /* 布局 */ + --side-w: 216px; + --side-w-collapsed: 60px; + --topbar-h: 56px; } * { box-sizing: border-box; } - html, body { margin: 0; padding: 0; } body { - background: var(--bg-page); + background: var(--bg-app); color: var(--text-1); font-family: -apple-system, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; font-size: 13px; line-height: 1.6; -webkit-font-smoothing: antialiased; + text-rendering: optimizeLegibility; } button, input, select, textarea { font: inherit; color: inherit; } +/* ---------- 通用工具类 ---------- */ .num { font-variant-numeric: tabular-nums; } -.flex1 { flex: 1; } +.flex1 { flex: 1; min-width: 0; } .muted { color: var(--text-3); } .muted2 { color: var(--text-2); } +:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; } + +/* ---------- 按钮 ---------- */ .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; - padding: 0 12px; + padding: 0 14px; height: 32px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); @@ -52,15 +74,39 @@ button, input, select, textarea { font: inherit; color: inherit; } color: var(--text-1); cursor: pointer; white-space: nowrap; + font-weight: 500; + transition: background 0.12s, border-color 0.12s, color 0.12s; } -.btn:hover { background: var(--bg-hover); } +.btn:hover { background: var(--bg-hover); border-color: var(--border-strong); } .btn:disabled { opacity: 0.45; cursor: not-allowed; } .btn-primary { background: var(--accent); border-color: var(--accent); color: #FFFFFF; } -.btn-primary:hover { background: #2B5FD9; } -.btn-danger { color: var(--danger); border-color: var(--danger); } -.btn-sm { height: 26px; padding: 0 10px; font-size: 12px; } -.btn-xs { height: 22px; padding: 0 8px; font-size: 12px; } +.btn-primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); } +.btn-danger { color: var(--danger); border-color: var(--danger); background: var(--bg-page); } +.btn-danger:hover { background: #FDF0F0; } +.btn-danger-solid { background: var(--danger); border-color: var(--danger); color: #FFFFFF; } +.btn-danger-solid:hover { background: #D13A3F; } +.btn-sm { height: 28px; padding: 0 12px; font-size: 12px; } +.btn-xs { height: 24px; padding: 0 10px; font-size: 12px; } +.icon-btn { + display: inline-flex; + align-items: center; + justify-content: center; + width: 28px; + height: 28px; + flex: none; + border: none; + background: transparent; + border-radius: var(--radius-sm); + color: var(--text-3); + cursor: pointer; + transition: background 0.12s, color 0.12s; +} +.icon-btn:hover { background: var(--bg-hover); color: var(--text-1); } +.icon-btn.active { color: var(--accent); } +.icon-btn.active-warn { color: var(--warn); } + +/* ---------- 表单 ---------- */ .input, .select, .textarea { height: 32px; padding: 0 10px; @@ -69,30 +115,30 @@ button, input, select, textarea { font: inherit; color: inherit; } background: var(--bg-page); outline: none; width: 100%; + transition: border-color 0.12s, box-shadow 0.12s; +} +.textarea { height: auto; min-height: 64px; padding: 8px 10px; resize: vertical; line-height: 1.7; } +.input:focus, .select:focus, .textarea:focus { + border-color: var(--accent); + box-shadow: 0 0 0 3px rgba(51, 112, 255, 0.10); } -.textarea { height: auto; min-height: 56px; padding: 8px 10px; resize: vertical; } -.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); } .input::placeholder, .textarea::placeholder { color: var(--text-3); } +.input.invalid, .input.invalid:focus { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(229, 72, 77, 0.10); } -.card { border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg-page); } - -.icon-btn { - display: inline-flex; - align-items: center; - justify-content: center; - width: 26px; - height: 26px; - flex: none; - border: none; - background: transparent; - border-radius: var(--radius-sm); - color: var(--text-3); - cursor: pointer; +/* ---------- 卡片与分区 ---------- */ +.card { + border: 1px solid var(--border); + border-radius: var(--radius-md); + background: var(--bg-page); + box-shadow: var(--shadow-card); } -.icon-btn:hover { background: var(--bg-hover); color: var(--text-1); } -.icon-btn.active { color: var(--accent); } -.icon-btn.active-warn { color: var(--warn); } +.section { padding: 16px 18px; } +.section-title, .sec-title { font-weight: 600; margin-bottom: 12px; font-size: 13px; color: var(--text-1); } +.sec { padding: 16px 18px; } +.empty { text-align: center; padding: 28px 0; } + +/* ---------- 标签与状态点 ---------- */ .tag { display: inline-block; padding: 0 8px; @@ -105,19 +151,140 @@ button, input, select, textarea { font: inherit; color: inherit; } border: 1px solid var(--border); white-space: nowrap; } - .dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; flex: none; } .dot.normal { background: var(--ok); } .dot.late, .dot.early, .dot.incomplete { background: var(--warn); } .dot.absent { background: var(--danger); } .dot.none, .dot.leave { background: var(--dot-empty); } +.dot.rest { background: var(--border); } -/* 移动端:避免 iOS 聚焦缩放,输入字号提到 16px */ +/* ---------- 金额 ---------- */ +.amt-income { color: var(--ok); } +.amt-expense { color: var(--text-1); } +.amt-warn { color: var(--warn); } + +/* ---------- 分段选择器(seg) ---------- */ +.seg { + display: inline-flex; + border: 1px solid var(--border-strong); + border-radius: var(--radius-sm); + overflow: hidden; + background: var(--bg-page); +} +.seg-btn { + border: none; + background: var(--bg-page); + color: var(--text-2); + cursor: pointer; + font-size: 12px; + height: 28px; + padding: 0 12px; + border-right: 1px solid var(--border); + transition: background 0.12s, color 0.12s; +} +.seg-btn:last-child { border-right: none; } +.seg-btn:hover { background: var(--bg-hover); } +.seg-btn.active { background: var(--accent-bg); color: var(--accent); font-weight: 500; } + +/* ---------- 开关按钮(toggle) ---------- */ +.toggle-btn { + height: 32px; + width: 100%; + border: 1px solid var(--border-strong); + background: var(--bg-page); + border-radius: var(--radius-sm); + cursor: pointer; + font-size: 13px; + color: var(--text-2); + transition: all 0.12s; +} +.toggle-btn:hover { background: var(--bg-hover); } +.toggle-btn.on { color: var(--accent); border-color: var(--accent); background: var(--accent-bg); } +.toggle-btn.onwarn { color: var(--warn); border-color: var(--warn); background: #FDF4EC; } + +/* ---------- 数据表格(记账/密码库/用户管理共用) ---------- */ +.tx-table, .cred-table, .admin-table { width: 100%; border-collapse: collapse; font-size: 13px; } +.tx-table th, .cred-table th, .admin-table th { + text-align: left; + font-weight: 500; + color: var(--text-3); + font-size: 12px; + background: var(--bg-subtle); + padding: 9px 14px; + border-bottom: 1px solid var(--border); + white-space: nowrap; +} +.tx-table td, .cred-table td, .admin-table td { + padding: 10px 14px; + border-bottom: 1px solid var(--border); + vertical-align: top; + word-break: break-all; +} +.tx-table tbody tr:hover, .cred-table tbody tr:hover, .admin-table tbody tr:hover { background: #FAFBFC; } +.tx-table tbody tr:last-child td, .cred-table tbody tr:last-child td, .admin-table tbody tr:last-child td { border-bottom: none; } + +/* ---------- 弹窗(全部对话框共用) ---------- */ +.mask { + position: fixed; + inset: 0; + background: rgba(29, 33, 41, 0.45); + display: flex; + align-items: center; + justify-content: center; + z-index: 90; + padding: 16px; +} +.dialog { + width: 480px; + max-width: calc(100vw - 32px); + max-height: 86vh; + max-height: 86dvh; + overflow: auto; + background: var(--bg-page); + border-radius: var(--radius-lg); + box-shadow: var(--shadow-float); + display: flex; + flex-direction: column; +} +.dialog-head { + display: flex; + align-items: flex-start; + justify-content: space-between; + padding: 16px 20px 12px; + border-bottom: 1px solid var(--border); + flex: none; +} +.dialog-title { font-size: 14px; font-weight: 600; color: var(--text-1); } +.dialog-sub { font-size: 12px; margin-top: 2px; color: var(--text-3); } +.dialog-body { padding: 16px 20px; overflow: auto; } +.dialog-btns { + display: flex; + justify-content: flex-end; + gap: 8px; + padding: 12px 20px 16px; + border-top: 1px solid var(--border); + flex: none; +} +.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; } +.form-grid .field.span2, .field.span2 { grid-column: span 2; } +.field label, .form-row label { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 4px; } +.form-error { color: var(--danger); font-size: 12px; margin-top: 8px; } + +/* ---------- 统计卡与横向条 ---------- */ +.stat-card { padding: 14px 16px; } +.stat-num { font-size: 22px; font-weight: 600; margin-top: 2px; letter-spacing: -0.2px; } +.bar-row { display: flex; align-items: center; gap: 10px; margin: 7px 0; } +.bar-label { flex: none; color: var(--text-2); font-size: 12px; text-align: right; } +.bar-track { flex: 1; height: 8px; border-radius: 4px; background: var(--bg-subtle); overflow: hidden; } +.bar-fill { display: block; height: 100%; background: var(--accent); border-radius: 4px; } +.bar-num { font-size: 12px; flex: none; color: var(--text-3); } + +/* ---------- 图标 ---------- */ +.icon { display: inline-flex; align-items: center; justify-content: center; flex: none; } +.icon svg { width: 100%; height: 100%; display: block; } + +/* ---------- 移动端:避免 iOS 聚焦缩放 ---------- */ @media (max-width: 720px) { input, select, textarea { font-size: 16px !important; } input[type="checkbox"] { font-size: initial; } } -.dot.rest { background: var(--border); } - -.icon { display: inline-flex; align-items: center; justify-content: center; flex: none; } -.icon svg { width: 100%; height: 100%; display: block; } diff --git a/intern-log/src/views/CalendarView.vue b/intern-log/src/views/CalendarView.vue index 9e223af..d92195b 100644 --- a/intern-log/src/views/CalendarView.vue +++ b/intern-log/src/views/CalendarView.vue @@ -87,36 +87,37 @@ watch(focusDate, d => { focusDate.value = null }, { immediate: true }) - - diff --git a/intern-log/src/views/LoginView.vue b/intern-log/src/views/LoginView.vue index 7ac94d8..b609855 100644 --- a/intern-log/src/views/LoginView.vue +++ b/intern-log/src/views/LoginView.vue @@ -77,7 +77,8 @@ async function submit() { diff --git a/intern-log/src/views/MemoView.vue b/intern-log/src/views/MemoView.vue index e155300..033f070 100644 --- a/intern-log/src/views/MemoView.vue +++ b/intern-log/src/views/MemoView.vue @@ -197,13 +197,13 @@ function fmtTime(s: string): string { .memo-list { display: flex; flex-direction: column; - max-height: calc(100vh - 140px); + max-height: calc(100vh - 150px); } .pane-head { display: flex; align-items: center; justify-content: space-between; - padding: 12px 12px 8px; + padding: 12px 12px 10px; border-bottom: 1px solid var(--border); flex: none; } @@ -223,12 +223,12 @@ function fmtTime(s: string): string { .memo-item-time { font-size: 11px; margin-top: 2px; } .memo-editor { - padding: 16px; + padding: 16px 18px; min-height: 420px; display: flex; flex-direction: column; } -.title-input { font-size: 14px; font-weight: 500; margin-bottom: 10px; } +.title-input { font-size: 15px; font-weight: 600; margin-bottom: 10px; } .content-textarea { flex: 1; min-height: 340px; line-height: 1.8; } .editor-foot { display: flex; diff --git a/intern-log/src/views/PlanView.vue b/intern-log/src/views/PlanView.vue index c999af1..4702a25 100644 --- a/intern-log/src/views/PlanView.vue +++ b/intern-log/src/views/PlanView.vue @@ -108,12 +108,13 @@ const summary = computed(() => { const done = items.value.filter(p => p.status === 'done').length const plannedMin = items.value.reduce((acc, p) => acc + spanMinutes(p), 0) const actualMin = items.value.reduce((acc, p) => acc + (p.actual_minutes || 0), 0) + let liveExtra = 0 const runningId = running.value if (runningId) { const rp = items.value.find(p => p.id === runningId) - if (rp) actualMin + elapsedMinutes(rp) + if (rp) liveExtra = liveElapsed(rp) } - return { total, done, plannedMin, actualMin } + return { total, done, plannedMin, actualMin: actualMin + liveExtra } }) function spanMinutes(p: PlanItem): number { const [sh, sm] = p.start_time.split(':').map(Number) @@ -211,62 +212,65 @@ function weekday(s: string): string { return wdNames[parseDateStr(s).getDay()] } - - diff --git a/intern-log/src/views/ReportView.vue b/intern-log/src/views/ReportView.vue index 53db9cb..381eaed 100644 --- a/intern-log/src/views/ReportView.vue +++ b/intern-log/src/views/ReportView.vue @@ -210,21 +210,10 @@ function undoPolish() { diff --git a/intern-log/src/views/StatsView.vue b/intern-log/src/views/StatsView.vue index fe9359b..3ac1bc0 100644 --- a/intern-log/src/views/StatsView.vue +++ b/intern-log/src/views/StatsView.vue @@ -180,32 +180,28 @@ function heatTitle(date: string, count: number): string { diff --git a/intern-log/src/views/TodayView.vue b/intern-log/src/views/TodayView.vue index f8d57a8..d4dcb08 100644 --- a/intern-log/src/views/TodayView.vue +++ b/intern-log/src/views/TodayView.vue @@ -88,58 +88,53 @@ function onDateInput(e: Event) { if (v) date.value = v } - - diff --git a/intern-log/src/views/VaultView.vue b/intern-log/src/views/VaultView.vue index 00189f7..aaac98b 100644 --- a/intern-log/src/views/VaultView.vue +++ b/intern-log/src/views/VaultView.vue @@ -284,7 +284,7 @@ async function doChangePwd() { -
共 {{ rows.length }} 条账号记录 · 密码以 AES-256-GCM 加密,服务器仅存密文
+
共 {{ rows.length }} 条账号记录 · 密码以 AES-256-GCM 加密,服务器仅存密文