From 3505e109610c8cc70f6524765eb3d01334b6ec6e Mon Sep 17 00:00:00 2001 From: root Date: Fri, 16 Oct 2026 18:24:56 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=94=A8=E6=88=B7=E7=AE=A1=E7=90=86?= =?UTF-8?q?=EF=BC=88xionglin=20=E4=B8=BA=E7=AE=A1=E7=90=86=E5=91=98?= =?UTF-8?q?=EF=BC=89=E2=80=94=E2=80=94=E6=9C=8D=E5=8A=A1=E7=AB=AF=E8=A7=92?= =?UTF-8?q?=E8=89=B2=E5=AD=97=E6=AE=B5=E4=B8=8E=20/api/admin/users=20?= =?UTF-8?q?=E5=A2=9E=E5=88=A0=E6=94=B9=E6=9F=A5=E3=80=81=E5=AE=A2=E6=88=B7?= =?UTF-8?q?=E7=AB=AF=E7=AE=A1=E7=90=86=E5=91=98=E4=B8=93=E5=B1=9E=E5=85=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...{index-DUPSAEmu.css => index-2EGKD3r-.css} | 2 +- intern-log/dist/assets/index-BMAz2lN3.js | 26 -- intern-log/dist/assets/index-CnCk6ytG.js | 26 ++ .../{index-DPm5Ta-6.js => index-mjHPY1ZN.js} | 4 +- .../{web-XtLEyZTQ.js => web-D6Z8f91T.js} | 2 +- intern-log/dist/index.html | 4 +- intern-log/src/App.vue | 27 +- intern-log/src/components/icons.ts | 3 +- intern-log/src/views/UserAdminView.vue | 323 ++++++++++++++++++ server/index.js | 74 +++- 10 files changed, 451 insertions(+), 40 deletions(-) rename intern-log/dist/assets/{index-DUPSAEmu.css => index-2EGKD3r-.css} (60%) delete mode 100644 intern-log/dist/assets/index-BMAz2lN3.js create mode 100644 intern-log/dist/assets/index-CnCk6ytG.js rename intern-log/dist/assets/{index-DPm5Ta-6.js => index-mjHPY1ZN.js} (69%) rename intern-log/dist/assets/{web-XtLEyZTQ.js => web-D6Z8f91T.js} (98%) create mode 100644 intern-log/src/views/UserAdminView.vue diff --git a/intern-log/dist/assets/index-DUPSAEmu.css b/intern-log/dist/assets/index-2EGKD3r-.css similarity index 60% rename from intern-log/dist/assets/index-DUPSAEmu.css rename to intern-log/dist/assets/index-2EGKD3r-.css index a7a6ee8..c96566f 100644 --- a/intern-log/dist/assets/index-DUPSAEmu.css +++ b/intern-log/dist/assets/index-2EGKD3r-.css @@ -1 +1 @@ -.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-63bc0b48]{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-63bc0b48]{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-63bc0b48]{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-63bc0b48]{font-size:14px;font-weight:600;color:var(--text-1)}.dialog-sub[data-v-63bc0b48]{font-size:12px;margin-top:2px}.dialog-body[data-v-63bc0b48]{padding:16px 20px;overflow:auto}.dialog-btns[data-v-63bc0b48]{display:flex;justify-content:flex-end;gap:8px;padding:12px 20px 16px;border-top:1px solid var(--border);flex:none}.form-grid[data-v-63bc0b48]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px}.field.span2[data-v-63bc0b48]{grid-column:span 2}.field label[data-v-63bc0b48]{display:block;font-size:12px;color:var(--text-2);margin-bottom:4px}.form-error[data-v-63bc0b48]{color:var(--danger);font-size:12px;margin-top:4px}.input.invalid[data-v-63bc0b48],.input.invalid[data-v-63bc0b48]:focus{border-color:var(--danger)}.toggle-btn[data-v-63bc0b48]{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-63bc0b48]:hover{background:var(--bg-hover)}.toggle-btn.on[data-v-63bc0b48]{color:var(--accent);border-color:var(--accent);background:var(--accent-bg)}.toggle-btn.onwarn[data-v-63bc0b48]{color:var(--warn);border-color:var(--warn)}.modal-enter-active[data-v-63bc0b48],.modal-leave-active[data-v-63bc0b48]{transition:opacity .15s ease}.modal-enter-from[data-v-63bc0b48],.modal-leave-to[data-v-63bc0b48]{opacity:0}.dp-head[data-v-2e90c9d8]{margin-bottom:12px}.dp-date[data-v-2e90c9d8]{font-size:14px;font-weight:600}.sec[data-v-2e90c9d8]{padding:14px 16px;margin-bottom:12px}.sec-title[data-v-2e90c9d8]{font-size:13px;font-weight:600;margin-bottom:10px;color:var(--text-1)}.sec-head[data-v-2e90c9d8]{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin-bottom:10px}.sec-head .sec-title[data-v-2e90c9d8]{margin-bottom:0}.form-hint[data-v-2e90c9d8]{font-size:12px}.att-grid[data-v-2e90c9d8]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px}.att-cell label[data-v-2e90c9d8],.field label[data-v-2e90c9d8]{display:block;font-size:12px;color:var(--text-2);margin-bottom:4px}.att-val[data-v-2e90c9d8]{display:flex;align-items:center;gap:6px;min-height:32px;font-size:13px}.status-val[data-v-2e90c9d8]{min-height:32px}.val-empty[data-v-2e90c9d8]{color:var(--text-3)}.edit-row[data-v-2e90c9d8]{display:flex;gap:6px;align-items:center;flex-wrap:wrap}.time-input[data-v-2e90c9d8]{width:104px}.att-note[data-v-2e90c9d8]{margin-top:10px;font-size:12px}.att-actions[data-v-2e90c9d8]{display:flex;gap:8px;margin-top:12px}.form-grid[data-v-2e90c9d8]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px}.field.span2[data-v-2e90c9d8]{grid-column:span 2}.form-footer[data-v-2e90c9d8]{display:flex;justify-content:flex-end;gap:8px;margin-top:12px;padding-top:12px;border-top:1px solid var(--border)}.form-error[data-v-2e90c9d8]{color:var(--danger);font-size:12px;margin-top:4px}.input.invalid[data-v-2e90c9d8]{border-color:var(--danger)}.input.invalid[data-v-2e90c9d8]:focus{border-color:var(--danger)}.list-sec[data-v-2e90c9d8]{margin-bottom:4px}.item[data-v-2e90c9d8]{border:1px solid var(--border);border-radius:var(--radius-sm);padding:8px 10px;margin-bottom:6px;background:var(--bg-page)}.item-main[data-v-2e90c9d8]{display:flex;align-items:center;gap:8px;min-height:26px;flex-wrap:wrap}.item-content[data-v-2e90c9d8]{cursor:text;word-break:break-all}.item-meta[data-v-2e90c9d8]{font-size:12px}.item-sub[data-v-2e90c9d8]{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-2e90c9d8]{text-align:center;padding:24px 0}.dp-foot[data-v-2e90c9d8]{margin-top:10px;font-size:12px;text-align:right}@media (max-width: 560px){.att-grid[data-v-2e90c9d8],.form-grid[data-v-2e90c9d8]{grid-template-columns:1fr}.field.span2[data-v-2e90c9d8]{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-76243d98]{display:flex;align-items:center;gap:10px;margin-bottom:12px;flex-wrap:wrap}.date-title[data-v-76243d98]{font-size:14px;font-weight:600;min-width:170px;text-align:center}.date-title.is-today[data-v-76243d98]{color:var(--accent)}.w-date[data-v-76243d98]{width:150px}@media (max-width: 720px){.detail-toolbar[data-v-76243d98]{gap:8px}.date-title[data-v-76243d98]{min-width:0;flex:1;text-align:left}.w-date[data-v-76243d98]{flex:1;min-width:120px;width:auto}}.cards[data-v-73e5ba49]{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.stat-card[data-v-73e5ba49]{padding:14px 16px}.stat-num[data-v-73e5ba49]{font-size:20px;font-weight:600;margin-top:4px}.section[data-v-73e5ba49]{padding:14px 16px;margin-top:12px}.section-title[data-v-73e5ba49]{font-weight:600;margin-bottom:10px;font-size:13px}.heat[data-v-73e5ba49]{display:flex;gap:3px;overflow-x:auto;padding-bottom:4px}.heat-col[data-v-73e5ba49]{display:flex;flex-direction:column;gap:3px}.heat-cell[data-v-73e5ba49]{width:12px;height:12px;border-radius:2px;display:inline-block}.lv0[data-v-73e5ba49]{background:var(--bg-subtle);border:1px solid var(--border)}.lv1[data-v-73e5ba49]{background:#d8ecdf}.lv2[data-v-73e5ba49]{background:#a9d8bc}.lv3[data-v-73e5ba49]{background:#6fbf92}.lv4[data-v-73e5ba49]{background:var(--ok)}.heat-legend[data-v-73e5ba49]{display:flex;align-items:center;gap:3px;margin-top:8px;font-size:12px}.two-col[data-v-73e5ba49]{display:grid;grid-template-columns:1fr 1fr;gap:12px}.bar-row[data-v-73e5ba49]{display:flex;align-items:center;gap:10px;margin:6px 0}.bar-label[data-v-73e5ba49]{width:72px;flex:none;color:var(--text-2);font-size:12px;text-align:right}.bar-track[data-v-73e5ba49]{flex:1;height:8px;border-radius:4px;background:var(--bg-subtle);overflow:hidden}.bar-fill[data-v-73e5ba49]{display:block;height:100%;background:var(--accent);border-radius:4px}.bar-num[data-v-73e5ba49]{font-size:12px;width:92px;flex:none}.loc-label[data-v-73e5ba49]{width:110px;text-align:left}@media (max-width: 720px){.cards[data-v-73e5ba49]{grid-template-columns:repeat(2,1fr)}.two-col[data-v-73e5ba49]{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-edca3327]{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-edca3327]{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-edca3327]{display:flex;align-items:center;justify-content:space-between;padding:16px 20px 12px;border-bottom:1px solid var(--border)}.dialog-title[data-v-edca3327]{font-size:14px;font-weight:600;color:var(--text-1)}.dialog-body[data-v-edca3327]{padding:16px 20px}.dialog-btns[data-v-edca3327]{display:flex;justify-content:flex-end;gap:8px;padding:12px 20px 16px;border-top:1px solid var(--border)}.form-grid[data-v-edca3327]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px}.field.span2[data-v-edca3327]{grid-column:span 2}.field label[data-v-edca3327]{display:block;font-size:12px;color:var(--text-2);margin-bottom:4px}.seg[data-v-edca3327]{display:inline-flex;border:1px solid var(--border-strong);border-radius:var(--radius-sm);overflow:hidden}.seg-btn[data-v-edca3327]{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-edca3327]{border-left:1px solid var(--border)}.seg-btn.active[data-v-edca3327]{background:var(--accent-bg);color:var(--accent)}.form-error[data-v-edca3327]{color:var(--danger);font-size:12px;margin-top:8px}.input.invalid[data-v-edca3327],.input.invalid[data-v-edca3327]:focus{border-color:var(--danger)}.modal-enter-active[data-v-edca3327],.modal-leave-active[data-v-edca3327]{transition:opacity .15s ease}.modal-enter-from[data-v-edca3327],.modal-leave-to[data-v-edca3327]{opacity:0}.ledger-toolbar[data-v-0533e5f8]{display:flex;align-items:center;gap:8px;margin-bottom:12px;flex-wrap:wrap}.month-title[data-v-0533e5f8]{font-size:14px;font-weight:600;min-width:88px;text-align:center}.w-filter[data-v-0533e5f8]{width:110px;flex:none}.cards[data-v-0533e5f8]{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px}.stat-card[data-v-0533e5f8]{padding:14px 16px}.stat-num[data-v-0533e5f8]{font-size:20px;font-weight:600;margin-top:4px}.amt-income[data-v-0533e5f8]{color:var(--ok)}.amt-expense[data-v-0533e5f8]{color:var(--text-1)}.amt-warn[data-v-0533e5f8]{color:var(--warn)}.sec[data-v-0533e5f8]{padding:14px 16px;margin-top:12px}.sec-title[data-v-0533e5f8]{font-size:13px;font-weight:600;margin-bottom:10px}.sec-head[data-v-0533e5f8]{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin-bottom:10px}.sec-head .sec-title[data-v-0533e5f8]{margin-bottom:0}.form-hint[data-v-0533e5f8]{font-size:12px}.form-grid[data-v-0533e5f8]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px}.field.span2[data-v-0533e5f8]{grid-column:span 2}.field label[data-v-0533e5f8]{display:block;font-size:12px;color:var(--text-2);margin-bottom:4px}.form-error[data-v-0533e5f8]{color:var(--danger);font-size:12px;margin-top:8px}.form-footer[data-v-0533e5f8]{display:flex;justify-content:flex-end;gap:8px;margin-top:12px;padding-top:12px;border-top:1px solid var(--border)}.seg[data-v-0533e5f8]{display:inline-flex;border:1px solid var(--border-strong);border-radius:var(--radius-sm);overflow:hidden}.seg-btn[data-v-0533e5f8]{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-0533e5f8]{border-left:1px solid var(--border)}.seg-btn.active[data-v-0533e5f8]{background:var(--accent-bg);color:var(--accent)}.toggle-btn[data-v-0533e5f8]{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-0533e5f8]:hover{background:var(--bg-hover)}.toggle-btn.on[data-v-0533e5f8]{color:var(--accent);border-color:var(--accent);background:var(--accent-bg)}.bar-row[data-v-0533e5f8]{display:flex;align-items:center;gap:10px;margin:6px 0}.bar-label[data-v-0533e5f8]{width:56px;flex:none;color:var(--text-2);font-size:12px;text-align:right}.bar-track[data-v-0533e5f8]{flex:1;height:8px;border-radius:4px;background:var(--bg-subtle);overflow:hidden}.bar-fill[data-v-0533e5f8]{display:block;height:100%;background:var(--accent);border-radius:4px}.bar-num[data-v-0533e5f8]{font-size:12px;width:110px;flex:none}.table-card[data-v-0533e5f8]{overflow-x:auto}.tx-table[data-v-0533e5f8]{width:100%;border-collapse:collapse;font-size:13px}.tx-table th[data-v-0533e5f8]{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-0533e5f8]{padding:10px 12px;border-bottom:1px solid var(--border);vertical-align:top;word-break:break-all}.tx-table tbody tr[data-v-0533e5f8]:hover{background:var(--bg-subtle)}.tx-table tbody tr:last-child td[data-v-0533e5f8]{border-bottom:none}.td-note[data-v-0533e5f8]{color:var(--text-2)}.tx-pending[data-v-0533e5f8]{color:var(--warn);font-size:12px}.tx-done[data-v-0533e5f8]{color:var(--ok);font-size:12px}.th-ops[data-v-0533e5f8]{width:220px}.ops[data-v-0533e5f8]{display:flex;gap:4px;flex-wrap:wrap}.empty[data-v-0533e5f8]{text-align:center;padding:24px 0}.vault-note[data-v-0533e5f8]{margin-top:10px;font-size:12px;text-align:right}@media (max-width: 560px){.form-grid[data-v-0533e5f8]{grid-template-columns:1fr}.field.span2[data-v-0533e5f8]{grid-column:auto}.ledger-toolbar .w-filter[data-v-0533e5f8]{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-cea34561]{display:flex;flex-direction:column;gap:12px;max-width:640px}.acc-line[data-v-cea34561]{font-size:12px;margin-bottom:10px;line-height:1.7}.section[data-v-cea34561]{padding:14px 16px}.section-title[data-v-cea34561]{font-weight:600;margin-bottom:10px;font-size:13px}.rule-grid[data-v-cea34561]{display:grid;grid-template-columns:1fr 1fr;gap:10px 16px}.rule-item label[data-v-cea34561]{display:block;font-size:12px;color:var(--text-2);margin-bottom:4px}.rule-save[data-v-cea34561]{display:flex;align-items:center;gap:10px;margin-top:12px}.proj-add[data-v-cea34561]{display:flex;gap:8px}.proj-tip[data-v-cea34561]{font-size:12px;margin-top:6px}.proj-row[data-v-cea34561]{display:flex;align-items:center;gap:8px;padding:6px 0;border-bottom:1px solid var(--border)}.proj-row[data-v-cea34561]:last-child{border-bottom:none}.proj-name[data-v-cea34561]{flex:1;word-break:break-all}.proj-name.archived[data-v-cea34561]{color:var(--text-3);text-decoration:line-through}.loc-note[data-v-cea34561]{font-size:12px}.ai-grid[data-v-cea34561]{display:flex;flex-direction:column;gap:10px}.backup-row[data-v-cea34561]{display:flex;gap:8px}.import-error[data-v-cea34561]{color:var(--danger);font-size:12px;margin-top:8px}.backup-note[data-v-cea34561]{font-size:12px;margin-top:10px}.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-aa357bfc]{display:flex;height:100vh;height:100dvh;overflow:hidden}.side[data-v-aa357bfc]{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-aa357bfc]{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-aa357bfc]:hover{background:var(--bg-hover);color:var(--text-1)}.nav-btn.active[data-v-aa357bfc]{background:var(--accent-bg);color:var(--accent)}.nav-btn[data-v-aa357bfc]: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-aa357bfc]:hover:after{opacity:1}.main[data-v-aa357bfc]{flex:1;display:flex;flex-direction:column;min-width:0}.topbar[data-v-aa357bfc]{height:56px;flex:none;border-bottom:1px solid var(--border);display:flex;align-items:center;gap:12px;padding:0 20px}.title[data-v-aa357bfc]{font-size:14px;font-weight:600}.topbar-actions[data-v-aa357bfc]{display:flex;align-items:center;gap:8px}.gsearch[data-v-aa357bfc]{position:relative;width:300px;max-width:38vw}.gs-icon[data-v-aa357bfc]{position:absolute;left:10px;top:50%;transform:translateY(-50%);color:var(--text-3)}.gs-input[data-v-aa357bfc]{height:30px;padding-left:30px}.gs-panel[data-v-aa357bfc]{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-aa357bfc]{font-size:12px;padding:6px 8px 2px}.gs-item[data-v-aa357bfc]{display:flex;align-items:center;gap:8px;padding:6px 8px;border-radius:var(--radius-sm);cursor:pointer}.gs-item[data-v-aa357bfc]:hover{background:var(--bg-hover)}.gs-text[data-v-aa357bfc],.gs-sub[data-v-aa357bfc]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.gs-text[data-v-aa357bfc]{font-size:13px}.gs-sub[data-v-aa357bfc]{font-size:12px}.gs-date[data-v-aa357bfc]{font-size:12px;flex:none}.gs-empty[data-v-aa357bfc]{padding:10px;font-size:12px;text-align:center}.user-chip[data-v-aa357bfc]{font-size:12px;color:var(--text-2);padding:0 4px}.week-tip[data-v-aa357bfc]{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-aa357bfc]:hover{background:var(--bg-subtle)}.content[data-v-aa357bfc]{flex:1;overflow:auto}.content-inner[data-v-aa357bfc]{max-width:1200px;margin:0 auto;padding:20px}.toast-wrap[data-v-aa357bfc]{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-aa357bfc]{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-aa357bfc],.toast-leave-to[data-v-aa357bfc]{opacity:0;transform:translateY(-4px)}.toast-enter-active[data-v-aa357bfc],.toast-leave-active[data-v-aa357bfc]{transition:all .15s ease}.mob-search-btn[data-v-aa357bfc]{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-aa357bfc]{display:initial}.tabbar[data-v-aa357bfc]{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-aa357bfc]{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-aa357bfc]{color:var(--accent)}.sheet-mask[data-v-aa357bfc]{position:fixed;top:0;right:0;bottom:0;left:0;z-index:70;background:#1d212959}.more-sheet[data-v-aa357bfc]{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-aa357bfc]{font-size:12px;color:var(--text-3);padding:4px 6px 10px;border-bottom:1px solid var(--border);margin-bottom:4px}.sheet-row[data-v-aa357bfc]{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-aa357bfc]:hover,.sheet-row[data-v-aa357bfc]:active{background:var(--bg-hover)}.sheet-name[data-v-aa357bfc]{flex:1}.sheet-go[data-v-aa357bfc]{color:var(--text-3)}.sheet-divider[data-v-aa357bfc]{height:1px;background:var(--border);margin:6px 0}.sheet-danger[data-v-aa357bfc]{color:var(--danger)}.msw-mask[data-v-aa357bfc]{position:fixed;top:0;right:0;bottom:0;left:0;z-index:70;background:var(--bg-page)}.msw[data-v-aa357bfc]{height:100%;display:flex;flex-direction:column}.msw-bar[data-v-aa357bfc]{height:52px;flex:none;display:flex;align-items:center;gap:8px;padding:0 12px;border-bottom:1px solid var(--border)}.msw-icon[data-v-aa357bfc]{color:var(--text-3)}.msw-input[data-v-aa357bfc]{flex:1;height:34px;border:none;outline:none;font-size:14px;background:transparent;color:var(--text-1)}.msw-results[data-v-aa357bfc]{flex:1;overflow:auto;padding:10px 4px calc(20px + env(safe-area-inset-bottom))}.msw-item[data-v-aa357bfc]{display:flex;align-items:center;gap:8px;padding:10px;border-radius:var(--radius-sm);cursor:pointer}.msw-item[data-v-aa357bfc]:hover,.msw-item[data-v-aa357bfc]:active{background:var(--bg-hover)}@media (max-width: 720px){.app[data-v-aa357bfc]{display:block;height:100dvh}.side[data-v-aa357bfc]{display:none}.main[data-v-aa357bfc]{display:flex;flex-direction:column;height:100dvh;min-width:0}.topbar[data-v-aa357bfc]{height:50px;min-height:50px;padding:0 10px;gap:6px}.title[data-v-aa357bfc]{font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.gsearch[data-v-aa357bfc],.gsearch .gs-panel[data-v-aa357bfc]{display:none}.mob-search-btn[data-v-aa357bfc]{display:flex}.topbar-actions[data-v-aa357bfc]{margin-left:auto;gap:6px}.mobile-hide[data-v-aa357bfc]{display:none!important}.week-tip[data-v-aa357bfc]{height:28px;max-width:118px;padding:0 8px;white-space:nowrap;overflow:hidden}.topbar-actions .btn[data-v-aa357bfc]{padding:0 10px}.topbar-actions .btn .num[data-v-aa357bfc]{font-size:12px}.tabbar[data-v-aa357bfc]{display:flex}.content[data-v-aa357bfc]{flex:1;min-height:0}.content-inner[data-v-aa357bfc]{max-width:none;padding:12px 12px calc(66px + env(safe-area-inset-bottom))}.card[data-v-aa357bfc]{border-radius:var(--radius-md)}input.input[data-v-aa357bfc],select.select[data-v-aa357bfc],textarea.textarea[data-v-aa357bfc]{width:100%;box-sizing:border-box}.btn[data-v-aa357bfc]{touch-action:manipulation}.topbar-actions .btn-primary[data-v-aa357bfc]{height:32px}.toast-wrap[data-v-aa357bfc]{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}} +.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-63bc0b48]{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-63bc0b48]{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-63bc0b48]{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-63bc0b48]{font-size:14px;font-weight:600;color:var(--text-1)}.dialog-sub[data-v-63bc0b48]{font-size:12px;margin-top:2px}.dialog-body[data-v-63bc0b48]{padding:16px 20px;overflow:auto}.dialog-btns[data-v-63bc0b48]{display:flex;justify-content:flex-end;gap:8px;padding:12px 20px 16px;border-top:1px solid var(--border);flex:none}.form-grid[data-v-63bc0b48]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px}.field.span2[data-v-63bc0b48]{grid-column:span 2}.field label[data-v-63bc0b48]{display:block;font-size:12px;color:var(--text-2);margin-bottom:4px}.form-error[data-v-63bc0b48]{color:var(--danger);font-size:12px;margin-top:4px}.input.invalid[data-v-63bc0b48],.input.invalid[data-v-63bc0b48]:focus{border-color:var(--danger)}.toggle-btn[data-v-63bc0b48]{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-63bc0b48]:hover{background:var(--bg-hover)}.toggle-btn.on[data-v-63bc0b48]{color:var(--accent);border-color:var(--accent);background:var(--accent-bg)}.toggle-btn.onwarn[data-v-63bc0b48]{color:var(--warn);border-color:var(--warn)}.modal-enter-active[data-v-63bc0b48],.modal-leave-active[data-v-63bc0b48]{transition:opacity .15s ease}.modal-enter-from[data-v-63bc0b48],.modal-leave-to[data-v-63bc0b48]{opacity:0}.dp-head[data-v-2e90c9d8]{margin-bottom:12px}.dp-date[data-v-2e90c9d8]{font-size:14px;font-weight:600}.sec[data-v-2e90c9d8]{padding:14px 16px;margin-bottom:12px}.sec-title[data-v-2e90c9d8]{font-size:13px;font-weight:600;margin-bottom:10px;color:var(--text-1)}.sec-head[data-v-2e90c9d8]{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin-bottom:10px}.sec-head .sec-title[data-v-2e90c9d8]{margin-bottom:0}.form-hint[data-v-2e90c9d8]{font-size:12px}.att-grid[data-v-2e90c9d8]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px}.att-cell label[data-v-2e90c9d8],.field label[data-v-2e90c9d8]{display:block;font-size:12px;color:var(--text-2);margin-bottom:4px}.att-val[data-v-2e90c9d8]{display:flex;align-items:center;gap:6px;min-height:32px;font-size:13px}.status-val[data-v-2e90c9d8]{min-height:32px}.val-empty[data-v-2e90c9d8]{color:var(--text-3)}.edit-row[data-v-2e90c9d8]{display:flex;gap:6px;align-items:center;flex-wrap:wrap}.time-input[data-v-2e90c9d8]{width:104px}.att-note[data-v-2e90c9d8]{margin-top:10px;font-size:12px}.att-actions[data-v-2e90c9d8]{display:flex;gap:8px;margin-top:12px}.form-grid[data-v-2e90c9d8]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px}.field.span2[data-v-2e90c9d8]{grid-column:span 2}.form-footer[data-v-2e90c9d8]{display:flex;justify-content:flex-end;gap:8px;margin-top:12px;padding-top:12px;border-top:1px solid var(--border)}.form-error[data-v-2e90c9d8]{color:var(--danger);font-size:12px;margin-top:4px}.input.invalid[data-v-2e90c9d8]{border-color:var(--danger)}.input.invalid[data-v-2e90c9d8]:focus{border-color:var(--danger)}.list-sec[data-v-2e90c9d8]{margin-bottom:4px}.item[data-v-2e90c9d8]{border:1px solid var(--border);border-radius:var(--radius-sm);padding:8px 10px;margin-bottom:6px;background:var(--bg-page)}.item-main[data-v-2e90c9d8]{display:flex;align-items:center;gap:8px;min-height:26px;flex-wrap:wrap}.item-content[data-v-2e90c9d8]{cursor:text;word-break:break-all}.item-meta[data-v-2e90c9d8]{font-size:12px}.item-sub[data-v-2e90c9d8]{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-2e90c9d8]{text-align:center;padding:24px 0}.dp-foot[data-v-2e90c9d8]{margin-top:10px;font-size:12px;text-align:right}@media (max-width: 560px){.att-grid[data-v-2e90c9d8],.form-grid[data-v-2e90c9d8]{grid-template-columns:1fr}.field.span2[data-v-2e90c9d8]{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-76243d98]{display:flex;align-items:center;gap:10px;margin-bottom:12px;flex-wrap:wrap}.date-title[data-v-76243d98]{font-size:14px;font-weight:600;min-width:170px;text-align:center}.date-title.is-today[data-v-76243d98]{color:var(--accent)}.w-date[data-v-76243d98]{width:150px}@media (max-width: 720px){.detail-toolbar[data-v-76243d98]{gap:8px}.date-title[data-v-76243d98]{min-width:0;flex:1;text-align:left}.w-date[data-v-76243d98]{flex:1;min-width:120px;width:auto}}.cards[data-v-73e5ba49]{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.stat-card[data-v-73e5ba49]{padding:14px 16px}.stat-num[data-v-73e5ba49]{font-size:20px;font-weight:600;margin-top:4px}.section[data-v-73e5ba49]{padding:14px 16px;margin-top:12px}.section-title[data-v-73e5ba49]{font-weight:600;margin-bottom:10px;font-size:13px}.heat[data-v-73e5ba49]{display:flex;gap:3px;overflow-x:auto;padding-bottom:4px}.heat-col[data-v-73e5ba49]{display:flex;flex-direction:column;gap:3px}.heat-cell[data-v-73e5ba49]{width:12px;height:12px;border-radius:2px;display:inline-block}.lv0[data-v-73e5ba49]{background:var(--bg-subtle);border:1px solid var(--border)}.lv1[data-v-73e5ba49]{background:#d8ecdf}.lv2[data-v-73e5ba49]{background:#a9d8bc}.lv3[data-v-73e5ba49]{background:#6fbf92}.lv4[data-v-73e5ba49]{background:var(--ok)}.heat-legend[data-v-73e5ba49]{display:flex;align-items:center;gap:3px;margin-top:8px;font-size:12px}.two-col[data-v-73e5ba49]{display:grid;grid-template-columns:1fr 1fr;gap:12px}.bar-row[data-v-73e5ba49]{display:flex;align-items:center;gap:10px;margin:6px 0}.bar-label[data-v-73e5ba49]{width:72px;flex:none;color:var(--text-2);font-size:12px;text-align:right}.bar-track[data-v-73e5ba49]{flex:1;height:8px;border-radius:4px;background:var(--bg-subtle);overflow:hidden}.bar-fill[data-v-73e5ba49]{display:block;height:100%;background:var(--accent);border-radius:4px}.bar-num[data-v-73e5ba49]{font-size:12px;width:92px;flex:none}.loc-label[data-v-73e5ba49]{width:110px;text-align:left}@media (max-width: 720px){.cards[data-v-73e5ba49]{grid-template-columns:repeat(2,1fr)}.two-col[data-v-73e5ba49]{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-edca3327]{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-edca3327]{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-edca3327]{display:flex;align-items:center;justify-content:space-between;padding:16px 20px 12px;border-bottom:1px solid var(--border)}.dialog-title[data-v-edca3327]{font-size:14px;font-weight:600;color:var(--text-1)}.dialog-body[data-v-edca3327]{padding:16px 20px}.dialog-btns[data-v-edca3327]{display:flex;justify-content:flex-end;gap:8px;padding:12px 20px 16px;border-top:1px solid var(--border)}.form-grid[data-v-edca3327]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px}.field.span2[data-v-edca3327]{grid-column:span 2}.field label[data-v-edca3327]{display:block;font-size:12px;color:var(--text-2);margin-bottom:4px}.seg[data-v-edca3327]{display:inline-flex;border:1px solid var(--border-strong);border-radius:var(--radius-sm);overflow:hidden}.seg-btn[data-v-edca3327]{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-edca3327]{border-left:1px solid var(--border)}.seg-btn.active[data-v-edca3327]{background:var(--accent-bg);color:var(--accent)}.form-error[data-v-edca3327]{color:var(--danger);font-size:12px;margin-top:8px}.input.invalid[data-v-edca3327],.input.invalid[data-v-edca3327]:focus{border-color:var(--danger)}.modal-enter-active[data-v-edca3327],.modal-leave-active[data-v-edca3327]{transition:opacity .15s ease}.modal-enter-from[data-v-edca3327],.modal-leave-to[data-v-edca3327]{opacity:0}.ledger-toolbar[data-v-0533e5f8]{display:flex;align-items:center;gap:8px;margin-bottom:12px;flex-wrap:wrap}.month-title[data-v-0533e5f8]{font-size:14px;font-weight:600;min-width:88px;text-align:center}.w-filter[data-v-0533e5f8]{width:110px;flex:none}.cards[data-v-0533e5f8]{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px}.stat-card[data-v-0533e5f8]{padding:14px 16px}.stat-num[data-v-0533e5f8]{font-size:20px;font-weight:600;margin-top:4px}.amt-income[data-v-0533e5f8]{color:var(--ok)}.amt-expense[data-v-0533e5f8]{color:var(--text-1)}.amt-warn[data-v-0533e5f8]{color:var(--warn)}.sec[data-v-0533e5f8]{padding:14px 16px;margin-top:12px}.sec-title[data-v-0533e5f8]{font-size:13px;font-weight:600;margin-bottom:10px}.sec-head[data-v-0533e5f8]{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin-bottom:10px}.sec-head .sec-title[data-v-0533e5f8]{margin-bottom:0}.form-hint[data-v-0533e5f8]{font-size:12px}.form-grid[data-v-0533e5f8]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px}.field.span2[data-v-0533e5f8]{grid-column:span 2}.field label[data-v-0533e5f8]{display:block;font-size:12px;color:var(--text-2);margin-bottom:4px}.form-error[data-v-0533e5f8]{color:var(--danger);font-size:12px;margin-top:8px}.form-footer[data-v-0533e5f8]{display:flex;justify-content:flex-end;gap:8px;margin-top:12px;padding-top:12px;border-top:1px solid var(--border)}.seg[data-v-0533e5f8]{display:inline-flex;border:1px solid var(--border-strong);border-radius:var(--radius-sm);overflow:hidden}.seg-btn[data-v-0533e5f8]{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-0533e5f8]{border-left:1px solid var(--border)}.seg-btn.active[data-v-0533e5f8]{background:var(--accent-bg);color:var(--accent)}.toggle-btn[data-v-0533e5f8]{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-0533e5f8]:hover{background:var(--bg-hover)}.toggle-btn.on[data-v-0533e5f8]{color:var(--accent);border-color:var(--accent);background:var(--accent-bg)}.bar-row[data-v-0533e5f8]{display:flex;align-items:center;gap:10px;margin:6px 0}.bar-label[data-v-0533e5f8]{width:56px;flex:none;color:var(--text-2);font-size:12px;text-align:right}.bar-track[data-v-0533e5f8]{flex:1;height:8px;border-radius:4px;background:var(--bg-subtle);overflow:hidden}.bar-fill[data-v-0533e5f8]{display:block;height:100%;background:var(--accent);border-radius:4px}.bar-num[data-v-0533e5f8]{font-size:12px;width:110px;flex:none}.table-card[data-v-0533e5f8]{overflow-x:auto}.tx-table[data-v-0533e5f8]{width:100%;border-collapse:collapse;font-size:13px}.tx-table th[data-v-0533e5f8]{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-0533e5f8]{padding:10px 12px;border-bottom:1px solid var(--border);vertical-align:top;word-break:break-all}.tx-table tbody tr[data-v-0533e5f8]:hover{background:var(--bg-subtle)}.tx-table tbody tr:last-child td[data-v-0533e5f8]{border-bottom:none}.td-note[data-v-0533e5f8]{color:var(--text-2)}.tx-pending[data-v-0533e5f8]{color:var(--warn);font-size:12px}.tx-done[data-v-0533e5f8]{color:var(--ok);font-size:12px}.th-ops[data-v-0533e5f8]{width:220px}.ops[data-v-0533e5f8]{display:flex;gap:4px;flex-wrap:wrap}.empty[data-v-0533e5f8]{text-align:center;padding:24px 0}.vault-note[data-v-0533e5f8]{margin-top:10px;font-size:12px;text-align:right}@media (max-width: 560px){.form-grid[data-v-0533e5f8]{grid-template-columns:1fr}.field.span2[data-v-0533e5f8]{grid-column:auto}.ledger-toolbar .w-filter[data-v-0533e5f8]{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-cea34561]{display:flex;flex-direction:column;gap:12px;max-width:640px}.acc-line[data-v-cea34561]{font-size:12px;margin-bottom:10px;line-height:1.7}.section[data-v-cea34561]{padding:14px 16px}.section-title[data-v-cea34561]{font-weight:600;margin-bottom:10px;font-size:13px}.rule-grid[data-v-cea34561]{display:grid;grid-template-columns:1fr 1fr;gap:10px 16px}.rule-item label[data-v-cea34561]{display:block;font-size:12px;color:var(--text-2);margin-bottom:4px}.rule-save[data-v-cea34561]{display:flex;align-items:center;gap:10px;margin-top:12px}.proj-add[data-v-cea34561]{display:flex;gap:8px}.proj-tip[data-v-cea34561]{font-size:12px;margin-top:6px}.proj-row[data-v-cea34561]{display:flex;align-items:center;gap:8px;padding:6px 0;border-bottom:1px solid var(--border)}.proj-row[data-v-cea34561]:last-child{border-bottom:none}.proj-name[data-v-cea34561]{flex:1;word-break:break-all}.proj-name.archived[data-v-cea34561]{color:var(--text-3);text-decoration:line-through}.loc-note[data-v-cea34561]{font-size:12px}.ai-grid[data-v-cea34561]{display:flex;flex-direction:column;gap:10px}.backup-row[data-v-cea34561]{display:flex;gap:8px}.import-error[data-v-cea34561]{color:var(--danger);font-size:12px;margin-top:8px}.backup-note[data-v-cea34561]{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-214bbb7a]{display:flex;height:100vh;height:100dvh;overflow:hidden}.side[data-v-214bbb7a]{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-214bbb7a]{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-214bbb7a]:hover{background:var(--bg-hover);color:var(--text-1)}.nav-btn.active[data-v-214bbb7a]{background:var(--accent-bg);color:var(--accent)}.nav-btn[data-v-214bbb7a]: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-214bbb7a]:hover:after{opacity:1}.main[data-v-214bbb7a]{flex:1;display:flex;flex-direction:column;min-width:0}.topbar[data-v-214bbb7a]{height:56px;flex:none;border-bottom:1px solid var(--border);display:flex;align-items:center;gap:12px;padding:0 20px}.title[data-v-214bbb7a]{font-size:14px;font-weight:600}.topbar-actions[data-v-214bbb7a]{display:flex;align-items:center;gap:8px}.gsearch[data-v-214bbb7a]{position:relative;width:300px;max-width:38vw}.gs-icon[data-v-214bbb7a]{position:absolute;left:10px;top:50%;transform:translateY(-50%);color:var(--text-3)}.gs-input[data-v-214bbb7a]{height:30px;padding-left:30px}.gs-panel[data-v-214bbb7a]{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-214bbb7a]{font-size:12px;padding:6px 8px 2px}.gs-item[data-v-214bbb7a]{display:flex;align-items:center;gap:8px;padding:6px 8px;border-radius:var(--radius-sm);cursor:pointer}.gs-item[data-v-214bbb7a]:hover{background:var(--bg-hover)}.gs-text[data-v-214bbb7a],.gs-sub[data-v-214bbb7a]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.gs-text[data-v-214bbb7a]{font-size:13px}.gs-sub[data-v-214bbb7a]{font-size:12px}.gs-date[data-v-214bbb7a]{font-size:12px;flex:none}.gs-empty[data-v-214bbb7a]{padding:10px;font-size:12px;text-align:center}.user-chip[data-v-214bbb7a]{font-size:12px;color:var(--text-2);padding:0 4px}.week-tip[data-v-214bbb7a]{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-214bbb7a]:hover{background:var(--bg-subtle)}.content[data-v-214bbb7a]{flex:1;overflow:auto}.content-inner[data-v-214bbb7a]{max-width:1200px;margin:0 auto;padding:20px}.toast-wrap[data-v-214bbb7a]{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-214bbb7a]{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-214bbb7a],.toast-leave-to[data-v-214bbb7a]{opacity:0;transform:translateY(-4px)}.toast-enter-active[data-v-214bbb7a],.toast-leave-active[data-v-214bbb7a]{transition:all .15s ease}.mob-search-btn[data-v-214bbb7a]{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-214bbb7a]{display:initial}.tabbar[data-v-214bbb7a]{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-214bbb7a]{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-214bbb7a]{color:var(--accent)}.sheet-mask[data-v-214bbb7a]{position:fixed;top:0;right:0;bottom:0;left:0;z-index:70;background:#1d212959}.more-sheet[data-v-214bbb7a]{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-214bbb7a]{font-size:12px;color:var(--text-3);padding:4px 6px 10px;border-bottom:1px solid var(--border);margin-bottom:4px}.sheet-row[data-v-214bbb7a]{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-214bbb7a]:hover,.sheet-row[data-v-214bbb7a]:active{background:var(--bg-hover)}.sheet-name[data-v-214bbb7a]{flex:1}.sheet-go[data-v-214bbb7a]{color:var(--text-3)}.sheet-divider[data-v-214bbb7a]{height:1px;background:var(--border);margin:6px 0}.sheet-danger[data-v-214bbb7a]{color:var(--danger)}.msw-mask[data-v-214bbb7a]{position:fixed;top:0;right:0;bottom:0;left:0;z-index:70;background:var(--bg-page)}.msw[data-v-214bbb7a]{height:100%;display:flex;flex-direction:column}.msw-bar[data-v-214bbb7a]{height:52px;flex:none;display:flex;align-items:center;gap:8px;padding:0 12px;border-bottom:1px solid var(--border)}.msw-icon[data-v-214bbb7a]{color:var(--text-3)}.msw-input[data-v-214bbb7a]{flex:1;height:34px;border:none;outline:none;font-size:14px;background:transparent;color:var(--text-1)}.msw-results[data-v-214bbb7a]{flex:1;overflow:auto;padding:10px 4px calc(20px + env(safe-area-inset-bottom))}.msw-item[data-v-214bbb7a]{display:flex;align-items:center;gap:8px;padding:10px;border-radius:var(--radius-sm);cursor:pointer}.msw-item[data-v-214bbb7a]:hover,.msw-item[data-v-214bbb7a]:active{background:var(--bg-hover)}@media (max-width: 720px){.app[data-v-214bbb7a]{display:block;height:100dvh}.side[data-v-214bbb7a]{display:none}.main[data-v-214bbb7a]{display:flex;flex-direction:column;height:100dvh;min-width:0}.topbar[data-v-214bbb7a]{height:50px;min-height:50px;padding:0 10px;gap:6px}.title[data-v-214bbb7a]{font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.gsearch[data-v-214bbb7a],.gsearch .gs-panel[data-v-214bbb7a]{display:none}.mob-search-btn[data-v-214bbb7a]{display:flex}.topbar-actions[data-v-214bbb7a]{margin-left:auto;gap:6px}.mobile-hide[data-v-214bbb7a]{display:none!important}.week-tip[data-v-214bbb7a]{height:28px;max-width:118px;padding:0 8px;white-space:nowrap;overflow:hidden}.topbar-actions .btn[data-v-214bbb7a]{padding:0 10px}.topbar-actions .btn .num[data-v-214bbb7a]{font-size:12px}.tabbar[data-v-214bbb7a]{display:flex}.content[data-v-214bbb7a]{flex:1;min-height:0}.content-inner[data-v-214bbb7a]{max-width:none;padding:12px 12px calc(66px + env(safe-area-inset-bottom))}.card[data-v-214bbb7a]{border-radius:var(--radius-md)}input.input[data-v-214bbb7a],select.select[data-v-214bbb7a],textarea.textarea[data-v-214bbb7a]{width:100%;box-sizing:border-box}.btn[data-v-214bbb7a]{touch-action:manipulation}.topbar-actions .btn-primary[data-v-214bbb7a]{height:32px}.toast-wrap[data-v-214bbb7a]{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/index-BMAz2lN3.js b/intern-log/dist/assets/index-BMAz2lN3.js deleted file mode 100644 index 53f5788..0000000 --- a/intern-log/dist/assets/index-BMAz2lN3.js +++ /dev/null @@ -1,26 +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"]'))s(o);new MutationObserver(o=>{for(const a of o)if(a.type==="childList")for(const c of a.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&s(c)}).observe(document,{childList:!0,subtree:!0});function n(o){const a={};return o.integrity&&(a.integrity=o.integrity),o.referrerPolicy&&(a.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?a.credentials="include":o.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function s(o){if(o.ep)return;o.ep=!0;const a=n(o);fetch(o.href,a)}})();/** -* @vue/shared v3.5.44 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/function Ha(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const pt={},Ar=[],$n=()=>{},Uu=()=>!1,ii=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),ai=e=>e.startsWith("onUpdate:"),$t=Object.assign,Wa=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},od=Object.prototype.hasOwnProperty,ft=(e,t)=>od.call(e,t),Re=Array.isArray,nr=e=>Vs(e)==="[object Map]",Ir=e=>Vs(e)==="[object Set]",Jl=e=>Vs(e)==="[object Date]",ze=e=>typeof e=="function",wt=e=>typeof e=="string",Tn=e=>typeof e=="symbol",dt=e=>e!==null&&typeof e=="object",qu=e=>(dt(e)||ze(e))&&ze(e.then)&&ze(e.catch),Hu=Object.prototype.toString,Vs=e=>Hu.call(e),id=e=>Vs(e).slice(8,-1),Wu=e=>Vs(e)==="[object Object]",za=e=>wt(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,_s=Ha(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),li=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},ad=/-\w/g,vn=li(e=>e.replace(ad,t=>t.slice(1).toUpperCase())),ld=/\B([A-Z])/g,cr=li(e=>e.replace(ld,"-$1").toLowerCase()),zu=li(e=>e.charAt(0).toUpperCase()+e.slice(1)),ta=li(e=>e?`on${zu(e)}`:""),En=(e,t)=>!Object.is(e,t),$o=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},ui=e=>{const t=parseFloat(e);return isNaN(t)?e:t},ud=e=>{const t=wt(e)?Number(e):NaN;return isNaN(t)?e:t};let Xl;const ci=()=>Xl||(Xl=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function rr(e){if(Re(e)){const t={};for(let n=0;nn.startsWith("/*")?"":n).split(cd).forEach(n=>{if(n){const s=n.split(fd);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function Ze(e){let t="";if(wt(e))t=e;else if(Re(e))for(let n=0;nor(n,t))}const Ju=e=>!!(e&&e.__v_isRef===!0),ne=e=>wt(e)?e:e==null?"":Re(e)||dt(e)&&(e.toString===Hu||!ze(e.toString))?Ju(e)?ne(e.value):JSON.stringify(e,Xu,2):String(e),Xu=(e,t)=>Ju(t)?Xu(e,t.value):nr(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,o],a)=>(n[na(s,a)+" =>"]=o,n),{})}:Ir(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>na(n))}:Tn(t)?na(t):dt(t)&&!Re(t)&&!Wu(t)?String(t):t,na=(e,t="")=>{var n;return Tn(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 Dt;class bd{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&&Dt&&(Dt.active?(this.parent=Dt,this.index=(Dt.scopes||(Dt.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 s=this.scopes.slice();for(t=0,n=s.length;t0&&--this._on===0){if(Dt===this)Dt=this.prevScope;else{let t=Dt;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,s;for(n=0,s=this.effects.length;n0)return;if(xs){let t=xs;for(xs=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;ks;){let t=ks;for(ks=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){e||(e=s)}t=n}}if(e)throw e}function tc(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function nc(e){let t,n=e.depsTail,s=n;for(;s;){const o=s.prevDep;s.version===-1?(s===n&&(n=o),Ja(s),_d(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=o}e.deps=t,e.depsTail=n}function ya(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===Ps)||(e.globalVersion=Ps,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!ya(e))))return;e.flags|=2;const t=e.dep,n=vt,s=mn;vt=e,mn=!0;try{tc(e);const o=e.fn(e._value);(t.version===0||En(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{vt=n,mn=s,nc(e),e.flags&=-3}}function Ja(e,t=!1){const{dep:n,prevSub:s,nextSub:o}=e;if(s&&(s.nextSub=o,e.prevSub=void 0),o&&(o.prevSub=s,e.nextSub=void 0),n.subs===e&&(n.subs=s,!s&&n.computed)){n.computed.flags&=-5;for(let a=n.computed.deps;a;a=a.nextDep)Ja(a,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function _d(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let mn=!0;const sc=[];function An(){sc.push(mn),mn=!1}function Pn(){const e=sc.pop();mn=e===void 0?!0:e}function eu(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=vt;vt=void 0;try{t()}finally{vt=n}}}let Ps=0;class kd{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 Xa{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(!vt||!mn||vt===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==vt)n=this.activeLink=new kd(vt,this),vt.deps?(n.prevDep=vt.depsTail,vt.depsTail.nextDep=n,vt.depsTail=n):vt.deps=vt.depsTail=n,oc(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const s=n.nextDep;s.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=s),n.prevDep=vt.depsTail,n.nextDep=void 0,vt.depsTail.nextDep=n,vt.depsTail=n,vt.deps===n&&(vt.deps=s)}return n}trigger(t){this.version++,Ps++,this.notify(t)}notify(t){Ga();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Ya()}}}function oc(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)oc(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const ga=new WeakMap,Or=Symbol(""),ba=Symbol(""),Os=Symbol("");function Bt(e,t,n){if(mn&&vt){let s=ga.get(e);s||ga.set(e,s=new Map);let o=s.get(n);o||(s.set(n,o=new Xa),o.map=s,o.key=n),o.track()}}function Rn(e,t,n,s,o,a){const c=ga.get(e);if(!c){Ps++;return}const d=h=>{h&&h.trigger()};if(Ga(),t==="clear")c.forEach(d);else{const h=Re(e),y=h&&za(n);if(h&&n==="length"){const m=Number(s);c.forEach((_,C)=>{(C==="length"||C===Os||!Tn(C)&&C>=m)&&d(_)})}else switch((n!==void 0||c.has(void 0))&&d(c.get(n)),y&&d(c.get(Os)),t){case"add":h?y&&d(c.get("length")):(d(c.get(Or)),nr(e)&&d(c.get(ba)));break;case"delete":h||(d(c.get(Or)),nr(e)&&d(c.get(ba)));break;case"set":nr(e)&&d(c.get(Or));break}}Ya()}function Hr(e){const t=lt(e);return t===e||(Bt(t,"iterate",Os),un(e))?t:On(e)?sr(e)?t.map(n=>ir(cn(n))):t.map(ir):t.map(cn)}function fi(e){return Bt(e=lt(e),"iterate",Os),e}function xn(e,t){return On(e)?ir(sr(e)?cn(t):t):cn(t)}const xd={__proto__:null,[Symbol.iterator](){return sa(this,Symbol.iterator,e=>xn(this,e))},concat(...e){return Hr(this).concat(...e.map(t=>Re(t)?Hr(t):t))},entries(){return sa(this,"entries",e=>(e[1]=xn(this,e[1]),e))},every(e,t){return jn(this,"every",e,t,void 0,arguments)},filter(e,t){return jn(this,"filter",e,t,n=>n.map(s=>xn(this,s)),arguments)},find(e,t){return jn(this,"find",e,t,n=>xn(this,n),arguments)},findIndex(e,t){return jn(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return jn(this,"findLast",e,t,n=>xn(this,n),arguments)},findLastIndex(e,t){return jn(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return jn(this,"forEach",e,t,void 0,arguments)},includes(...e){return oa(this,"includes",e)},indexOf(...e){return oa(this,"indexOf",e)},join(e){return Hr(this).join(e)},lastIndexOf(...e){return oa(this,"lastIndexOf",e)},map(e,t){return jn(this,"map",e,t,void 0,arguments)},pop(){return vs(this,"pop")},push(...e){return vs(this,"push",e)},reduce(e,...t){return nu(this,"reduce",e,t)},reduceRight(e,...t){return nu(this,"reduceRight",e,t)},shift(){return vs(this,"shift")},some(e,t){return jn(this,"some",e,t,void 0,arguments)},splice(...e){return vs(this,"splice",e)},toReversed(){return Hr(this).toReversed()},toSorted(e){return Hr(this).toSorted(e)},toSpliced(...e){return Hr(this).toSpliced(...e)},unshift(...e){return vs(this,"unshift",e)},values(){return sa(this,"values",e=>xn(this,e))}};function sa(e,t,n){const s=fi(e),o=s[t],a=o.call(s);if(s!==e&&!un(e)){if(a[Symbol.toStringTag]==="Array Iterator"){const c=Object.create(Object.getPrototypeOf(a));return c.next=()=>tu(a.next(),n),o!==ic[t]&&Object.defineProperties(c,{return:{get(){const d=a.return;return typeof d=="function"?d.bind(a):d}},throw:{get(){const d=a.throw;return typeof d=="function"?d.bind(a):d}}}),c}a._next=a.next,a.next=()=>tu(a._next(),n)}return a}function tu(e,t){return e.done||(e.value=t(e.value)),e}const ic=Array.prototype;function jn(e,t,n,s,o,a){const c=fi(e),d=c!==e&&!un(e),h=c[t];if(h!==ic[t]){const _=h.apply(e,a);return d?cn(_):_}let y=n;c!==e&&(d?y=function(_,C){return n.call(this,xn(e,_),C,e)}:n.length>2&&(y=function(_,C){return n.call(this,_,C,e)}));const m=h.call(c,y,s);return d&&o?o(m):m}function nu(e,t,n,s){const o=fi(e),a=o!==e&&!un(e);let c=n,d=!1;o!==e&&(a?(d=s.length===0,c=function(y,m,_){return d&&(d=!1,y=xn(e,y)),n.call(this,y,xn(e,m),_,e)}):n.length>3&&(c=function(y,m,_){return n.call(this,y,m,_,e)}));const h=o[t](c,...s);return d?xn(e,h):h}function oa(e,t,n){const s=lt(e);Bt(s,"iterate",Os);const o=s[t](...n);return(o===-1||o===!1)&&tl(n[0])?(n[0]=lt(n[0]),s[t](...n)):o}function vs(e,t,n=[]){An(),Ga();const s=lt(e)[t].apply(e,n);return Ya(),Pn(),s}const Cd=Ha("__proto__,__v_isRef,__isVue"),ac=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Tn));function Sd(e){Tn(e)||(e=String(e));const t=lt(this);return Bt(t,"has",e),t.hasOwnProperty(e)}class lc{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){if(n==="__v_skip")return t.__v_skip;const o=this._isReadonly,a=this._isShallow;if(n==="__v_isReactive")return!o;if(n==="__v_isReadonly")return o;if(n==="__v_isShallow")return a;if(n==="__v_raw")return s===(o?a?Dd:dc:a?fc:cc).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const c=Re(t);if(!o){let h;if(c&&(h=xd[n]))return h;if(n==="hasOwnProperty")return Sd}const d=Reflect.get(t,n,qt(t)?t:s);if((Tn(n)?ac.has(n):Cd(n))||(o||Bt(t,"get",n),a))return d;if(qt(d)){const h=c&&za(n)?d:d.value;return o&&dt(h)?_a(h):h}return dt(d)?o?_a(d):Za(d):d}}class uc extends lc{constructor(t=!1){super(!1,t)}set(t,n,s,o){let a=t[n];const c=Re(t)&&za(n);if(!this._isShallow){const y=On(a);if(!un(s)&&!On(s)&&(a=lt(a),s=lt(s)),!c&&qt(a)&&!qt(s))return y||(a.value=s),!0}const d=c?Number(n)e,wo=e=>Reflect.getPrototypeOf(e);function Pd(e,t,n){return function(...s){const o=this.__v_raw,a=lt(o),c=nr(a),d=e==="entries"||e===Symbol.iterator&&c,h=e==="keys"&&c,y=o[e](...s),m=n?wa:t?ir:cn;return!t&&Bt(a,"iterate",h?ba:Or),$t(Object.create(y),{next(){const{value:_,done:C}=y.next();return C?{value:_,done:C}:{value:d?[m(_[0]),m(_[1])]:m(_),done:C}}})}}function _o(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Od(e,t){const n={get(o){const a=this.__v_raw,c=lt(a),d=lt(o);e||(En(o,d)&&Bt(c,"get",o),Bt(c,"get",d));const{has:h}=wo(c),y=t?wa:e?ir:cn;if(h.call(c,o))return y(a.get(o));if(h.call(c,d))return y(a.get(d));a!==c&&a.get(o)},get size(){const o=this.__v_raw;return!e&&Bt(lt(o),"iterate",Or),o.size},has(o){const a=this.__v_raw,c=lt(a),d=lt(o);return e||(En(o,d)&&Bt(c,"has",o),Bt(c,"has",d)),o===d?a.has(o):a.has(o)||a.has(d)},forEach(o,a){const c=this,d=c.__v_raw,h=lt(d),y=t?wa:e?ir:cn;return!e&&Bt(h,"iterate",Or),d.forEach((m,_)=>o.call(a,y(m),y(_),c))}};return $t(n,e?{add:_o("add"),set:_o("set"),delete:_o("delete"),clear:_o("clear")}:{add(o){const a=lt(this),c=wo(a),d=lt(o),h=!t&&!un(o)&&!On(o)?d:o;return c.has.call(a,h)||En(o,h)&&c.has.call(a,o)||En(d,h)&&c.has.call(a,d)||(a.add(h),Rn(a,"add",h,h)),this},set(o,a){!t&&!un(a)&&!On(a)&&(a=lt(a));const c=lt(this),{has:d,get:h}=wo(c);let y=d.call(c,o);y||(o=lt(o),y=d.call(c,o));const m=h.call(c,o);return c.set(o,a),y?En(a,m)&&Rn(c,"set",o,a):Rn(c,"add",o,a),this},delete(o){const a=lt(this),{has:c,get:d}=wo(a);let h=c.call(a,o);h||(o=lt(o),h=c.call(a,o)),d&&d.call(a,o);const y=a.delete(o);return h&&Rn(a,"delete",o,void 0),y},clear(){const o=lt(this),a=o.size!==0,c=o.clear();return a&&Rn(o,"clear",void 0,void 0),c}}),["keys","values","entries",Symbol.iterator].forEach(o=>{n[o]=Pd(o,e,t)}),n}function Qa(e,t){const n=Od(e,t);return(s,o,a)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_isShallow"?t:o==="__v_raw"?s:Reflect.get(ft(n,o)&&o in s?n:s,o,a)}const Md={get:Qa(!1,!1)},Id={get:Qa(!1,!0)},jd={get:Qa(!0,!1)};const cc=new WeakMap,fc=new WeakMap,dc=new WeakMap,Dd=new WeakMap;function Ld(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Za(e){return On(e)?e:el(e,!1,$d,Md,cc)}function Rd(e){return el(e,!1,Ad,Id,fc)}function _a(e){return el(e,!0,Td,jd,dc)}function el(e,t,n,s,o){if(!dt(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const a=o.get(e);if(a)return a;const c=Ld(id(e));if(c===0)return e;const d=new Proxy(e,c===2?s:n);return o.set(e,d),d}function sr(e){return On(e)?sr(e.__v_raw):!!(e&&e.__v_isReactive)}function On(e){return!!(e&&e.__v_isReadonly)}function un(e){return!!(e&&e.__v_isShallow)}function tl(e){return e?!!e.__v_raw:!1}function lt(e){const t=e&&e.__v_raw;return t?lt(t):e}function Kd(e){return!ft(e,"__v_skip")&&Object.isExtensible(e)&&Gu(e,"__v_skip",!0),e}const cn=e=>dt(e)?Za(e):e,ir=e=>dt(e)?_a(e):e;function qt(e){return e?e.__v_isRef===!0:!1}function N(e){return Fd(e,!1)}function Fd(e,t){return qt(e)?e:new Nd(e,t)}class Nd{constructor(t,n){this.dep=new Xa,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:lt(t),this._value=n?t:cn(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||un(t)||On(t);t=s?t:lt(t),En(t,n)&&(this._rawValue=t,this._value=s?t:cn(t),this.dep.trigger())}}function Kt(e){return qt(e)?e.value:e}const Vd={get:(e,t,n)=>t==="__v_raw"?e:Kt(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const o=e[t];return qt(o)&&!qt(n)?(o.value=n,!0):Reflect.set(e,t,n,s)}};function pc(e){return sr(e)?e:new Proxy(e,Vd)}class Bd{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Xa(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Ps-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&vt!==this)return ec(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 Ud(e,t,n=!1){let s,o;return ze(e)?s=e:(s=e.get,o=e.set),new Bd(s,o,n)}const ko={},Ro=new WeakMap;let Sr;function qd(e,t=!1,n=Sr){if(n){let s=Ro.get(n);s||Ro.set(n,s=[]),s.push(e)}}function Hd(e,t,n=pt){const{immediate:s,deep:o,once:a,scheduler:c,augmentJob:d,call:h}=n,y=X=>o?X:un(X)||o===!1||o===0?Kn(X,1):Kn(X);let m,_,C,A,V=!1,Z=!1;if(qt(e)?(_=()=>e.value,V=un(e)):sr(e)?(_=()=>y(e),V=!0):Re(e)?(Z=!0,V=e.some(X=>sr(X)||un(X)),_=()=>e.map(X=>{if(qt(X))return X.value;if(sr(X))return y(X);if(ze(X))return h?h(X,2):X()})):ze(e)?t?_=h?()=>h(e,2):e:_=()=>{if(C){An();try{C()}finally{Pn()}}const X=Sr;Sr=m;try{return h?h(e,3,[A]):e(A)}finally{Sr=X}}:_=$n,t&&o){const X=_,fe=o===!0?1/0:o;_=()=>Kn(X(),fe)}const te=wd(),ue=()=>{m.stop(),te&&te.active&&Wa(te.effects,m)};if(a&&t){const X=t;t=(...fe)=>{try{return X(...fe)}finally{ue()}}}let P=Z?new Array(e.length).fill(ko):ko;const R=X=>{if(!(!(m.flags&1)||!m.dirty&&!X))if(t){const fe=m.run();if(X||o||V||(Z?fe.some((ie,ee)=>En(ie,P[ee])):En(fe,P))){const ie=Sr;An();try{C&&C(),Sr=m;const ee=[fe,P===ko?void 0:Z&&P[0]===ko?[]:P,A];P=fe,h?h(t,3,ee):t(...ee)}finally{Sr=ie,Pn()}}}else m.run()};return d&&d(R),m=new Qu(_),m.scheduler=c?()=>c(R,!1):R,A=X=>qd(X,!1,m),C=m.onStop=()=>{const X=Ro.get(m);if(X){if(h)h(X,4);else for(const fe of X)fe();Ro.delete(m)}},t?s?R(!0):P=m.run():c?c(R.bind(null,!0),!0):m.run(),ue.pause=m.pause.bind(m),ue.resume=m.resume.bind(m),ue.stop=ue,ue}function Kn(e,t=1/0,n){if(t<=0||!dt(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,qt(e))Kn(e.value,t,n);else if(Re(e))for(let s=0;s{Kn(s,t,n)});else if(Wu(e)){for(const s in e)Kn(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&Kn(e[s],t,n)}return e}/** -* @vue/runtime-core v3.5.44 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/function Bs(e,t,n,s){try{return s?e(...s):e()}catch(o){di(o,t,n)}}function fn(e,t,n,s){if(ze(e)){const o=Bs(e,t,n,s);return o&&qu(o)&&o.catch(a=>{di(a,t,n)}),o}if(Re(e)){const o=[];for(let a=0;a>>1,o=Jt[s],a=Ms(o);a=Ms(n)?Jt.push(e):Jt.splice(zd(t),0,e),e.flags|=1,vc()}}function vc(){Ko||(Ko=hc.then(gc))}function Gd(e){if(!Re(e))er&&e.id===-1?er.splice(Wr+1,0,e):e.flags&1||(Cn.push(e),e.flags|=1);else for(let t=0;t=t))continue;Jt.splice(s,1),s=e?s-1:pn,o.flags&4&&(o.flags&=-2),o(),o.flags&4||(o.flags&=-2)}}}function yc(e,t,n=0){if(Cn.length){let s=Cn,o=0;if(t){s=[];for(let c=0;cMs(c)-Ms(d));if(Cn.length=o,er){for(let c=0;ce.id==null?e.flags&2?-1:1/0:e.id;function gc(e){try{for(pn=0;pn{s._d&&Uo(-1);const a=Fo(t),c=Mr.length;let d;try{d=e(...o)}finally{for(let h=Mr.length;h>c;h--)zc();Fo(a),s._d&&Uo(1)}return d};return s._n=!0,s._c=!0,s._d=!0,s}function Ae(e,t){if(ln===null)return e;const n=gi(ln),s=e.dirs||(e.dirs=[]);for(let o=0;o1)return n&&ze(t)?t.call(s&&s.proxy):t}}const Xd=Symbol.for("v-scx"),Qd=()=>To(Xd);function mt(e,t,n){return wc(e,t,n)}function wc(e,t,n=pt){const{immediate:s,deep:o,flush:a,once:c}=n,d=$t({},n),h=t&&s||!t&&a!=="post";let y;if(Ks){if(a==="sync"){const A=Qd();y=A.__watcherHandles||(A.__watcherHandles=[])}else if(!h){const A=()=>{};return A.stop=$n,A.resume=$n,A.pause=$n,A}}const m=Xt;d.call=(A,V,Z)=>fn(A,m,V,Z);let _=!1;a==="post"?d.scheduler=A=>{A.i=m,Yt(A,m&&m.suspense)}:a!=="sync"&&(_=!0,d.scheduler=(A,V)=>{V?A():nl(A)}),d.augmentJob=A=>{t&&(A.flags|=4),_&&(A.flags|=2,m&&(A.id=m.uid,A.i=m))};const C=Hd(e,t,d);return Ks&&(y?y.push(C):h&&C()),C}function Zd(e,t,n){const s=this.proxy,o=wt(e)?e.includes(".")?_c(s,e):()=>s[e]:e.bind(s,s);let a;ze(t)?a=t:(a=t.handler,n=t);const c=qs(this),d=wc(o,a.bind(s),n);return c(),d}function _c(e,t){const n=t.split(".");return()=>{let s=e;for(let o=0;oe.__isTeleport,Er=e=>e&&(e.disabled||e.disabled===""),ep=e=>e&&(e.defer||e.defer===""),ru=e=>typeof SVGElement<"u"&&e instanceof SVGElement,su=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,ka=(e,t)=>{const n=e&&e.to;return wt(n)?t?t(n):null:n},tp={name:"Teleport",__isTeleport:!0,process(e,t,n,s,o,a,c,d,h,y){const{mc:m,pc:_,pbc:C,o:{insert:A,querySelector:V,createText:Z,createComment:te,parentNode:ue}}=y,P=Er(t.props);let{dynamicChildren:R}=t;const X=(ee,M,S)=>{ee.shapeFlag&16&&m(ee.children,M,S,o,a,c,d,h)},fe=(ee=t)=>{const M=Er(ee.props),S=ee.target=ka(ee.props,V),oe=xa(S,ee,Z,A);S&&(c!=="svg"&&ru(S)?c="svg":c!=="mathml"&&su(S)&&(c="mathml"),o&&o.isCE&&(o.ce._teleportTargets||(o.ce._teleportTargets=new Set)).add(S),M||(X(ee,S,oe),gs(ee,!1)))},ie=ee=>{const M=()=>{if(Qn.get(ee)===M){if(Qn.delete(ee),Er(ee.props)){const S=ue(ee.el)||n;X(ee,S,ee.anchor),gs(ee,!0)}fe(ee)}};Qn.set(ee,M),Yt(M,a)};if(e==null){const ee=t.el=Z(""),M=t.anchor=Z("");if(A(ee,n,s),A(M,n,s),ep(t.props)||a&&a.pendingBranch){ie(t);return}P&&(X(t,n,M),gs(t,!0)),fe()}else{t.el=e.el;const ee=t.anchor=e.anchor,M=Qn.get(e);if(M){M.flags|=8,Qn.delete(e),ie(t);return}t.targetStart=e.targetStart;const S=t.target=e.target,oe=t.targetAnchor=e.targetAnchor,be=Er(e.props),z=be?n:S,xe=be?ee:oe;if(c==="svg"||ru(S)?c="svg":(c==="mathml"||su(S))&&(c="mathml"),R?(C(e.dynamicChildren,R,z,o,a,c,d),il(e,t,!0)):h||_(e,t,z,xe,o,a,c,d,!1),P)be?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):xo(t,n,ee,y,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const Le=ka(t.props,V);Le&&(t.target=Le,xo(t,Le,null,y,0))}else be&&xo(t,S,oe,y,1);gs(t,P)}},remove(e,t,n,{um:s,o:{remove:o}},a){const{shapeFlag:c,children:d,anchor:h,targetStart:y,targetAnchor:m,target:_,props:C}=e,A=Er(C),V=a||!A,Z=Qn.get(e);if(Z&&(Z.flags|=8,Qn.delete(e)),_&&(o(y),o(m)),a&&o(h),!Z&&(A||_)&&c&16)for(let te=0;te{e.isMounted=!0}),Pc(()=>{e.isUnmounting=!0}),e}const on=[Function,Array],Cc={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:on,onEnter:on,onAfterEnter:on,onEnterCancelled:on,onBeforeLeave:on,onLeave:on,onAfterLeave:on,onLeaveCancelled:on,onBeforeAppear:on,onAppear:on,onAfterAppear:on,onAppearCancelled:on},rp={name:"BaseTransition",props:Cc,setup(e,{slots:t}){const n=al(),s=xc();return()=>{const o=t.default&&rl(t.default(),!0),a=o&&o.length?Sc(o):n.subTree?Ee():void 0;if(!a)return;const c=lt(e),{mode:d}=c;if(s.isLeaving)return aa(a);const h=No(a);if(!h)return aa(a);let y=Is(h,c,s,n,_=>y=_);h.type!==Ut&&ar(h,y);let m=n.subTree&&No(n.subTree);if(m&&m.type!==Ut&&!$r(m,h)&&js(n.subTree)){let _=Is(m,c,s,n);if(ar(m,_),d==="out-in"&&h.type!==Ut)return s.isLeaving=!0,_.afterLeave=()=>{s.isLeaving=!1,n.job.flags&8||n.update(),delete _.afterLeave,m=void 0},aa(a);d==="in-out"&&h.type!==Ut?_.delayLeave=(C,A,V)=>{const Z=Ec(s,m);Z[String(m.key)]=m,C[an]=()=>{A(),C[an]=void 0,delete y.delayedLeave,m=void 0},y.delayedLeave=()=>{V(),delete y.delayedLeave,m=void 0}}:m=void 0}else m&&(m=void 0);return a}}};function Sc(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==Ut){t=n;break}}return t}const sp=rp;function Ec(e,t){const{leavingVNodes:n}=e;let s=n.get(t.type);return s||(s=Object.create(null),n.set(t.type,s)),s}function Is(e,t,n,s,o){const{appear:a,mode:c,persisted:d=!1,onBeforeEnter:h,onEnter:y,onAfterEnter:m,onEnterCancelled:_,onBeforeLeave:C,onLeave:A,onAfterLeave:V,onLeaveCancelled:Z,onBeforeAppear:te,onAppear:ue,onAfterAppear:P,onAppearCancelled:R}=t,X=String(e.key),fe=Ec(n,e),ie=(S,oe)=>{S&&fn(S,s,9,oe)},ee=(S,oe)=>{const be=oe[1];ie(S,oe),Re(S)?S.every(z=>z.length<=1)&&be():S.length<=1&&be()},M={mode:c,persisted:d,beforeEnter(S){let oe=h;if(!n.isMounted)if(a)oe=te||h;else return;S[an]&&S[an](!0);const be=fe[X];if(be&&$r(e,be)){let z=be.el[an];if(!z){const xe=js(be);z=xe&&xe.el[an]}z&&z()}ie(oe,[S])},enter(S){if(fe[X]===e)return;let oe=y,be=m,z=_;if(!n.isMounted)if(a)oe=ue||y,be=P||m,z=R||_;else return;let xe=!1;S[ms]=rt=>{xe||(xe=!0,rt?ie(z,[S]):ie(be,[S]),M.delayedLeave&&M.delayedLeave(),S[ms]=void 0)};const Le=S[ms].bind(null,!1);oe?ee(oe,[S,Le]):Le()},leave(S,oe){const be=String(e.key);if(S[ms]&&S[ms](!0),n.isUnmounting)return oe();ie(C,[S]);let z=!1;S[an]=Le=>{z||(z=!0,oe(),Le?ie(Z,[S]):ie(V,[S]),S[an]=void 0,fe[be]===e&&delete fe[be])};const xe=S[an].bind(null,!1);fe[be]=e,A?ee(A,[S,xe]):xe()},clone(S){const oe=Is(S,t,n,s,o);return o&&o(oe),oe}};return M}function aa(e){if(hi(e))return e=lr(e),e.children=null,e}function No(e){if(!hi(e))return pi(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&&ze(n.default))return n.default()}}function ar(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;const n=e.component.subTree;ar(pi(n.type)&&No(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&&Re(e.children)){const n=Dc(e.children,!1);n&&ar(n,t)}}function rl(e,t=!1,n){let s=[],o=0;for(let a=0;a1)for(let a=0;aCs(Z,t&&(Re(t)?t[te]:t),n,s,o));return}if(Ss(s)&&!o){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&Cs(e,t,n,s.component.subTree);return}const a=s.shapeFlag&4?gi(s.component):s.el,c=o?null:a,{i:d,r:h}=e,y=t&&t.r,m=d.refs===pt?d.refs={}:d.refs,_=d.setupState,C=lt(_),A=_===pt?Uu:Z=>ou(m,Z)?!1:ft(C,Z),V=(Z,te)=>!(te&&ou(m,te));if(y!=null&&y!==h){if(iu(t),wt(y))m[y]=null,A(y)&&(_[y]=null);else if(qt(y)){const Z=t;V(y,Z.k)&&(y.value=null),Z.k&&(m[Z.k]=null)}}if(ze(h))Bs(h,d,12,[c,m]);else{const Z=wt(h),te=qt(h);if(Z||te){const ue=()=>{if(e.f){const P=Z?A(h)?_[h]:m[h]:V()||!e.k?h.value:m[e.k];if(o)Re(P)&&Wa(P,a);else if(Re(P))P.includes(a)||P.push(a);else if(Z)m[h]=[a],A(h)&&(_[h]=m[h]);else{const R=[a];V(h,e.k)&&(h.value=R),e.k&&(m[e.k]=R)}}else Z?(m[h]=c,A(h)&&(_[h]=c)):te&&(V(h,e.k)&&(h.value=c),e.k&&(m[e.k]=c))};if(c){const P=()=>{ue(),Vo.delete(e)};P.id=-1,Vo.set(e,P),Yt(P,n)}else iu(e),ue()}}}function iu(e){const t=Vo.get(e);t&&(t.flags|=8,Vo.delete(e))}ci().requestIdleCallback;ci().cancelIdleCallback;const Ss=e=>!!e.type.__asyncLoader,hi=e=>e.type.__isKeepAlive;function op(e,t){Tc(e,"a",t)}function ip(e,t){Tc(e,"da",t)}function Tc(e,t,n=Xt){const s=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(vi(t,s,n),n){let o=n.parent;for(;o&&o.parent;)hi(o.parent.vnode)&&ap(s,t,n,o),o=o.parent}}function ap(e,t,n,s){const o=vi(t,e,s,!0);dr(()=>{Wa(s[t],o)},n)}function vi(e,t,n=Xt,s=!1){if(n){const o=n[e]||(n[e]=[]),a=t.__weh||(t.__weh=(...c)=>{An();const d=qs(n),h=fn(t,n,e,c);return d(),Pn(),h});return s?o.unshift(a):o.push(a),a}}const Un=e=>(t,n=Xt)=>{(!Ks||e==="sp")&&vi(e,(...s)=>t(...s),n)},lp=Un("bm"),yn=Un("m"),up=Un("bu"),Ac=Un("u"),Pc=Un("bum"),dr=Un("um"),cp=Un("sp"),fp=Un("rtg"),dp=Un("rtc");function pp(e,t=Xt){vi("ec",e,t)}const hp=Symbol.for("v-ndc");function it(e,t,n,s){let o;const a=n,c=Re(e);if(c||wt(e)){const d=c&&sr(e);let h=!1,y=!1;d&&(h=!un(e),y=On(e),e=fi(e)),o=new Array(e.length);for(let m=0,_=e.length;m<_;m++)o[m]=t(h?y?ir(cn(e[m])):cn(e[m]):e[m],m,void 0,a)}else if(typeof e=="number")if(!Number.isInteger(e)||e<0)o=[];else{o=new Array(e);for(let d=0;dt(d,h,void 0,a));else{const d=Object.keys(e);o=new Array(d.length);for(let h=0,y=d.length;he?Xc(e)?gi(e):Ca(e.parent):null,Es=$t(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=>Ca(e.parent),$root:e=>Ca(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Mc(e),$forceUpdate:e=>e.f||(e.f=()=>{nl(e.update)}),$nextTick:e=>e.n||(e.n=rs.bind(e.proxy)),$watch:e=>Zd.bind(e)}),la=(e,t)=>e!==pt&&!e.__isScriptSetup&&ft(e,t),vp={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:o,props:a,accessCache:c,type:d,appContext:h}=e;if(t[0]!=="$"){const C=c[t];if(C!==void 0)switch(C){case 1:return s[t];case 2:return o[t];case 4:return n[t];case 3:return a[t]}else{if(la(s,t))return c[t]=1,s[t];if(o!==pt&&ft(o,t))return c[t]=2,o[t];if(ft(a,t))return c[t]=3,a[t];if(n!==pt&&ft(n,t))return c[t]=4,n[t];Sa&&(c[t]=0)}}const y=Es[t];let m,_;if(y)return t==="$attrs"&&Bt(e.attrs,"get",""),y(e);if((m=d.__cssModules)&&(m=m[t]))return m;if(n!==pt&&ft(n,t))return c[t]=4,n[t];if(_=h.config.globalProperties,ft(_,t))return _[t]},set({_:e},t,n){const{data:s,setupState:o,ctx:a}=e;return la(o,t)?(o[t]=n,!0):s!==pt&&ft(s,t)?(s[t]=n,!0):ft(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(a[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:o,props:a,type:c}},d){let h;return!!(n[d]||e!==pt&&d[0]!=="$"&&ft(e,d)||la(t,d)||ft(a,d)||ft(s,d)||ft(Es,d)||ft(o.config.globalProperties,d)||(h=c.__cssModules)&&h[d])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:ft(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function au(e){return Re(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let Sa=!0;function mp(e){const t=Mc(e),n=e.proxy,s=e.ctx;Sa=!1,t.beforeCreate&&lu(t.beforeCreate,e,"bc");const{data:o,computed:a,methods:c,watch:d,provide:h,inject:y,created:m,beforeMount:_,mounted:C,beforeUpdate:A,updated:V,activated:Z,deactivated:te,beforeDestroy:ue,beforeUnmount:P,destroyed:R,unmounted:X,render:fe,renderTracked:ie,renderTriggered:ee,errorCaptured:M,serverPrefetch:S,expose:oe,inheritAttrs:be,components:z,directives:xe,filters:Le}=t;if(y&&yp(y,s,null),c)for(const Ye in c){const Ke=c[Ye];ze(Ke)&&(s[Ye]=Ke.bind(n))}if(o){const Ye=o.call(n,n);dt(Ye)&&(e.data=Za(Ye))}if(Sa=!0,a)for(const Ye in a){const Ke=a[Ye],st=ze(Ke)?Ke.bind(n,n):ze(Ke.get)?Ke.get.bind(n,n):$n,qe=!ze(Ke)&&ze(Ke.set)?Ke.set.bind(n):$n,Qe=ut({get:st,set:qe});Object.defineProperty(s,Ye,{enumerable:!0,configurable:!0,get:()=>Qe.value,set:Ce=>Qe.value=Ce})}if(d)for(const Ye in d)Oc(d[Ye],s,n,Ye);if(h){const Ye=ze(h)?h.call(n):h;Reflect.ownKeys(Ye).forEach(Ke=>{Jd(Ke,Ye[Ke])})}m&&lu(m,e,"c");function He(Ye,Ke){Re(Ke)?Ke.forEach(st=>Ye(st.bind(n))):Ke&&Ye(Ke.bind(n))}if(He(lp,_),He(yn,C),He(up,A),He(Ac,V),He(op,Z),He(ip,te),He(pp,M),He(dp,ie),He(fp,ee),He(Pc,P),He(dr,X),He(cp,S),Re(oe))if(oe.length){const Ye=e.exposed||(e.exposed={});oe.forEach(Ke=>{Object.defineProperty(Ye,Ke,{get:()=>n[Ke],set:st=>n[Ke]=st,enumerable:!0})})}else e.exposed||(e.exposed={});fe&&e.render===$n&&(e.render=fe),be!=null&&(e.inheritAttrs=be),z&&(e.components=z),xe&&(e.directives=xe),S&&$c(e)}function yp(e,t,n=$n){Re(e)&&(e=Ea(e));for(const s in e){const o=e[s];let a;dt(o)?"default"in o?a=To(o.from||s,o.default,!0):a=To(o.from||s):a=To(o),qt(a)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>a.value,set:c=>a.value=c}):t[s]=a}}function lu(e,t,n){fn(Re(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function Oc(e,t,n,s){let o=s.includes(".")?_c(n,s):()=>n[s];if(wt(e)){const a=t[e];ze(a)&&mt(o,a)}else if(ze(e))mt(o,e.bind(n));else if(dt(e))if(Re(e))e.forEach(a=>Oc(a,t,n,s));else{const a=ze(e.handler)?e.handler.bind(n):t[e.handler];ze(a)&&mt(o,a,e)}}function Mc(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:o,optionsCache:a,config:{optionMergeStrategies:c}}=e.appContext,d=a.get(t);let h;return d?h=d:!o.length&&!n&&!s?h=t:(h={},o.length&&o.forEach(y=>Bo(h,y,c,!0)),Bo(h,t,c)),dt(t)&&a.set(t,h),h}function Bo(e,t,n,s=!1){const{mixins:o,extends:a}=t;a&&Bo(e,a,n,!0),o&&o.forEach(c=>Bo(e,c,n,!0));for(const c in t)if(!(s&&c==="expose")){const d=gp[c]||n&&n[c];e[c]=d?d(e[c],t[c]):t[c]}return e}const gp={data:uu,props:cu,emits:cu,methods:bs,computed:bs,beforeCreate:Gt,created:Gt,beforeMount:Gt,mounted:Gt,beforeUpdate:Gt,updated:Gt,beforeDestroy:Gt,beforeUnmount:Gt,destroyed:Gt,unmounted:Gt,activated:Gt,deactivated:Gt,errorCaptured:Gt,serverPrefetch:Gt,components:bs,directives:bs,watch:wp,provide:uu,inject:bp};function uu(e,t){return t?e?function(){return $t(ze(e)?e.call(this,this):e,ze(t)?t.call(this,this):t)}:t:e}function bp(e,t){return bs(Ea(e),Ea(t))}function Ea(e){if(Re(e)){const t={};for(let n=0;nt==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${vn(t)}Modifiers`]||e[`${cr(t)}Modifiers`];function Cp(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||pt;let o=n;const a=t.startsWith("update:"),c=a&&xp(s,t.slice(7));c&&(c.trim&&(o=n.map(m=>wt(m)?m.trim():m)),c.number&&(o=o.map(ui)));let d,h=s[d=ta(t)]||s[d=ta(vn(t))];!h&&a&&(h=s[d=ta(cr(t))]),h&&fn(h,e,6,o);const y=s[d+"Once"];if(y){if(!e.emitted)e.emitted={};else if(e.emitted[d])return;e.emitted[d]=!0,fn(y,e,6,o)}}const Sp=new WeakMap;function jc(e,t,n=!1){const s=n?Sp:t.emitsCache,o=s.get(e);if(o!==void 0)return o;const a=e.emits;let c={},d=!1;if(!ze(e)){const h=y=>{const m=jc(y,t,!0);m&&(d=!0,$t(c,m))};!n&&t.mixins.length&&t.mixins.forEach(h),e.extends&&h(e.extends),e.mixins&&e.mixins.forEach(h)}return!a&&!d?(dt(e)&&s.set(e,null),null):(Re(a)?a.forEach(h=>c[h]=null):$t(c,a),dt(e)&&s.set(e,c),c)}function mi(e,t){return!e||!ii(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),ft(e,t[0].toLowerCase()+t.slice(1))||ft(e,cr(t))||ft(e,t))}function fu(e){const{type:t,vnode:n,proxy:s,withProxy:o,propsOptions:[a],slots:c,attrs:d,emit:h,render:y,renderCache:m,props:_,data:C,setupState:A,ctx:V,inheritAttrs:Z}=e,te=Fo(e);let ue,P;try{if(n.shapeFlag&4){const X=o||s,fe=X;ue=Sn(y.call(fe,X,m,_,A,C,V)),P=d}else{const X=t;ue=Sn(X.length>1?X(_,{attrs:d,slots:c,emit:h}):X(_,null)),P=t.props?d:Ep(d)}}catch(X){Mr.length=0,di(X,e,1),ue=Te(Ut)}let R=ue;if(P&&Z!==!1){const X=Object.keys(P),{shapeFlag:fe}=R;X.length&&fe&7&&(a&&X.some(ai)&&(P=$p(P,a)),R=lr(R,P,!1,!0))}if(n.dirs&&(R=lr(R,null,!1,!0),R.dirs=R.dirs?R.dirs.concat(n.dirs):n.dirs),n.transition){const X=pi(R.type)&&No(R)||R;ar(X,n.transition)}return ue=R,Fo(te),ue}function Dc(e,t=!0){let n;for(let s=0;s{let t;for(const n in e)(n==="class"||n==="style"||ii(n))&&((t||(t={}))[n]=e[n]);return t},$p=(e,t)=>{const n={};for(const s in e)(!ai(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function Tp(e,t,n){const{props:s,children:o,component:a}=e,{props:c,children:d,patchFlag:h}=t,y=a.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&h>=0){if(h&1024)return!0;if(h&16)return s?du(s,c,y):!!c;if(h&8){const m=t.dynamicProps;for(let _=0;_Object.create(Rc),Fc=e=>Object.getPrototypeOf(e)===Rc;function Pp(e,t,n,s=!1){const o={},a=Kc();e.propsDefaults=Object.create(null),Nc(e,t,o,a);for(const c in e.propsOptions[0])c in o||(o[c]=void 0);n?e.props=s?o:Rd(o):e.type.props?e.props=o:e.props=a,e.attrs=a}function Op(e,t,n,s){const{props:o,attrs:a,vnode:{patchFlag:c}}=e,d=lt(o),[h]=e.propsOptions;let y=!1;if((s||c>0)&&!(c&16)){if(c&8){const m=e.vnode.dynamicProps;for(let _=0;_{h=!0;const[C,A]=Vc(_,t,!0);$t(c,C),A&&d.push(...A)};!n&&t.mixins.length&&t.mixins.forEach(m),e.extends&&m(e.extends),e.mixins&&e.mixins.forEach(m)}if(!a&&!h)return dt(e)&&s.set(e,Ar),Ar;if(Re(a))for(let m=0;me==="_"||e==="_ctx"||e==="$stable",ol=e=>Re(e)?e.map(Sn):[Sn(e)],Ip=(e,t,n)=>{if(t._n)return t;const s=fr((...o)=>ol(t(...o)),n);return s._c=!1,s},Bc=(e,t,n)=>{const s=e._ctx;for(const o in e){if(sl(o))continue;const a=e[o];if(ze(a))t[o]=Ip(o,a,s);else if(a!=null){const c=ol(a);t[o]=()=>c}}},Uc=(e,t)=>{const n=ol(t);e.slots.default=()=>n},qc=(e,t,n)=>{for(const s in t)(n||!sl(s))&&(e[s]=t[s])},jp=(e,t,n)=>{const s=e.slots=Kc();if(e.vnode.shapeFlag&32){const o=t._;o?(qc(s,t,n),n&&Gu(s,"_",o,!0)):Bc(t,s)}else t&&Uc(e,t)},Dp=(e,t,n)=>{const{vnode:s,slots:o}=e;let a=!0,c=pt;if(s.shapeFlag&32){const d=t._;d?n&&d===1?a=!1:qc(o,t,n):(a=!t.$stable,Bc(t,o)),c=t}else t&&(Uc(e,t),c={default:1});if(a)for(const d in o)!sl(d)&&c[d]==null&&delete o[d]},Yt=Np;function Lp(e){return Rp(e)}function Rp(e,t){const n=ci();n.__VUE__=!0;const{insert:s,remove:o,patchProp:a,createElement:c,createText:d,createComment:h,setText:y,setElementText:m,parentNode:_,nextSibling:C,setScopeId:A=$n,insertStaticContent:V}=e,Z=(x,k,b,W=null,re=null,le=null,ge=void 0,me=null,ae=!!k.dynamicChildren)=>{if(x===k)return;x&&!$r(x,k)&&(W=ct(x),Ce(x,re,le,!0),x=null),k.patchFlag===-2&&(ae=!1,k.dynamicChildren=null),k.dynamicChildren&&x&&x.dynamicChildren&&x.dynamicChildren.hasOnce&&(k.dynamicChildren===Ar&&(k.dynamicChildren=[]),k.dynamicChildren.hasOnce=!0);const{type:q,ref:H,shapeFlag:Y}=k;switch(q){case yi:te(x,k,b,W);break;case Ut:ue(x,k,b,W);break;case Ao:x==null&&P(k,b,W,ge);break;case je:z(x,k,b,W,re,le,ge,me,ae);break;default:Y&1?fe(x,k,b,W,re,le,ge,me,ae):Y&6?xe(x,k,b,W,re,le,ge,me,ae):(Y&64||Y&128)&&q.process(x,k,b,W,re,le,ge,me,ae,$e)}H!=null&&re?Cs(H,x&&x.ref,le,k||x,!k):H==null&&x&&x.ref!=null&&Cs(x.ref,null,le,x,!0)},te=(x,k,b,W)=>{if(x==null)s(k.el=d(k.children),b,W);else{const re=k.el=x.el;k.children!==x.children&&y(re,k.children)}},ue=(x,k,b,W)=>{x==null?s(k.el=h(k.children||""),b,W):k.el=x.el},P=(x,k,b,W)=>{[x.el,x.anchor]=V(x.children,k,b,W,x.el,x.anchor)},R=({el:x,anchor:k},b,W)=>{let re;for(;x&&x!==k;)re=C(x),s(x,b,W),x=re;s(k,b,W)},X=({el:x,anchor:k})=>{let b;for(;x&&x!==k;)b=C(x),o(x),x=b;o(k)},fe=(x,k,b,W,re,le,ge,me,ae)=>{if(k.type==="svg"?ge="svg":k.type==="math"&&(ge="mathml"),x==null)ie(k,b,W,re,le,ge,me,ae);else{const q=x.el&&x.el._isVueCE?x.el:null;try{q&&q._beginPatch(),S(x,k,re,le,ge,me,ae)}finally{q&&q._endPatch()}}},ie=(x,k,b,W,re,le,ge,me)=>{let ae,q;const{props:H,shapeFlag:Y,transition:Pe,dirs:Ne}=x;if(ae=x.el=c(x.type,le,H&&H.is,H),Y&8?m(ae,x.children):Y&16&&M(x.children,ae,null,W,re,ua(x,le),ge,me),Ne&&kr(x,null,W,"created"),ee(ae,x,x.scopeId,ge,W),H){for(const Je in H)Je!=="value"&&!_s(Je)&&a(ae,Je,null,H[Je],le,W);"value"in H&&a(ae,"value",null,H.value,le),(q=H.onVnodeBeforeMount)&&wn(q,W,x)}Ne&&kr(x,null,W,"beforeMount");const Xe=Kp(re,Pe);Xe&&Pe.beforeEnter(ae),s(ae,k,b),((q=H&&H.onVnodeMounted)||Xe||Ne)&&Yt(()=>{try{q&&wn(q,W,x),Xe&&Pe.enter(ae),Ne&&kr(x,null,W,"mounted")}finally{}},re)},ee=(x,k,b,W,re)=>{if(b&&A(x,b),W)for(let le=0;le{for(let q=ae;q{const me=k.el=x.el;let{patchFlag:ae,dynamicChildren:q,dirs:H}=k;ae|=x.patchFlag&16;const Y=x.props||pt,Pe=k.props||pt;let Ne;if(b&&xr(b,!1),(Ne=Pe.onVnodeBeforeUpdate)&&wn(Ne,b,k,x),H&&kr(k,x,b,"beforeUpdate"),b&&xr(b,!0),q&&(!x.dynamicChildren||x.dynamicChildren.length!==q.length)&&(ae=0,ge=!1,q=null),(Y.innerHTML&&Pe.innerHTML==null||Y.textContent&&Pe.textContent==null)&&m(me,""),q?oe(x.dynamicChildren,q,me,b,W,ua(k,re),le):ge||Ke(x,k,me,null,b,W,ua(k,re),le,!1),ae>0){if(ae&16)be(me,Y,Pe,b,re);else if(ae&2&&Y.class!==Pe.class&&a(me,"class",null,Pe.class,re),ae&4&&a(me,"style",Y.style,Pe.style,re),ae&8){const Xe=k.dynamicProps;for(let Je=0;Je{Ne&&wn(Ne,b,k,x),H&&kr(k,x,b,"updated")},W)},oe=(x,k,b,W,re,le,ge)=>{for(let me=0;me{if(k!==b){if(k!==pt)for(const le in k)!_s(le)&&!(le in b)&&a(x,le,k[le],null,re,W);for(const le in b){if(_s(le))continue;const ge=b[le],me=k[le];ge!==me&&le!=="value"&&a(x,le,me,ge,re,W)}"value"in b&&a(x,"value",k.value,b.value,re)}},z=(x,k,b,W,re,le,ge,me,ae)=>{const q=k.el=x?x.el:d(""),H=k.anchor=x?x.anchor:d("");let{patchFlag:Y,dynamicChildren:Pe,slotScopeIds:Ne}=k;Ne&&(me=me?me.concat(Ne):Ne),x==null?(s(q,b,W),s(H,b,W),M(k.children||[],b,H,re,le,ge,me,ae)):Y>0&&Y&64&&Pe&&x.dynamicChildren&&x.dynamicChildren.length===Pe.length?(oe(x.dynamicChildren,Pe,b,re,le,ge,me),(k.key!=null||re&&k===re.subTree)&&il(x,k,!0)):Ke(x,k,b,H,re,le,ge,me,ae)},xe=(x,k,b,W,re,le,ge,me,ae)=>{k.slotScopeIds=me,x==null?k.shapeFlag&512?re.ctx.activate(k,b,W,ge,ae):Le(k,b,W,re,le,ge,ae):rt(x,k,ae)},Le=(x,k,b,W,re,le,ge)=>{const me=x.component=zp(x,W,re);if(hi(x)&&(me.ctx.renderer=$e),Gp(me,!1,ge),me.asyncDep){if(re&&re.registerDep(me,He,ge,le),!x.el){const ae=me.subTree=Te(Ut);ue(null,ae,k,b),x.placeholder=ae.el}}else He(me,x,k,b,re,le,ge)},rt=(x,k,b)=>{const W=k.component=x.component;if(Tp(x,k,b))if(W.asyncDep&&!W.asyncResolved){k.el=x.el,k.placeholder=x.placeholder,Ye(W,k,b);return}else W.next=k,W.update();else k.el=x.el,k.placeholder=x.placeholder,W.vnode=k},He=(x,k,b,W,re,le,ge)=>{const me=()=>{if(x.isMounted){let{next:Y,bu:Pe,u:Ne,parent:Xe,vnode:Je}=x;{const Wt=Hc(x);if(Wt){Y&&(Y.el=Je.el,Ye(x,Y,ge)),Wt.asyncDep.then(()=>{Yt(()=>{x.isUnmounted||q()},re)});return}}let tt=Y,yt;xr(x,!1),Y?(Y.el=Je.el,Ye(x,Y,ge)):Y=Je,Pe&&$o(Pe),(yt=Y.props&&Y.props.onVnodeBeforeUpdate)&&wn(yt,Xe,Y,Je),xr(x,!0);const xt=fu(x),Zt=x.subTree;x.subTree=xt,Z(Zt,xt,_(Zt.el),ct(Zt),x,re,le),Y.el=xt.el,tt===null&&Ap(x,xt.el),Ne&&Yt(Ne,re),(yt=Y.props&&Y.props.onVnodeUpdated)&&Yt(()=>wn(yt,Xe,Y,Je),re)}else{let Y;const{el:Pe,props:Ne}=k,{bm:Xe,m:Je,parent:tt,root:yt,type:xt}=x,Zt=Ss(k);xr(x,!1),Xe&&$o(Xe),!Zt&&(Y=Ne&&Ne.onVnodeBeforeMount)&&wn(Y,tt,k),xr(x,!0);{yt.ce&&yt.ce._hasShadowRoot()&&yt.ce._injectChildStyle(xt,x.parent?x.parent.type:void 0);const Wt=x.subTree=fu(x);Z(null,Wt,b,W,x,re,le),k.el=Wt.el}if(Je&&Yt(Je,re),!Zt&&(Y=Ne&&Ne.onVnodeMounted)){const Wt=k;Yt(()=>wn(Y,tt,Wt),re)}(k.shapeFlag&256||tt&&Ss(tt.vnode)&&tt.vnode.shapeFlag&256)&&x.a&&Yt(x.a,re),x.isMounted=!0,k=b=W=null}};x.scope.on();const ae=x.effect=new Qu(me);x.scope.off();const q=x.update=ae.run.bind(ae),H=x.job=ae.runIfDirty.bind(ae);H.i=x,H.id=x.uid,ae.scheduler=()=>nl(H),xr(x,!0),q()},Ye=(x,k,b)=>{k.component=x;const W=x.vnode.props;x.vnode=k,x.next=null,Op(x,k.props,W,b),Dp(x,k.children,b),An(),mc(x),Pn()},Ke=(x,k,b,W,re,le,ge,me,ae=!1)=>{const q=x&&x.children,H=x?x.shapeFlag:0,Y=k.children,{patchFlag:Pe,shapeFlag:Ne}=k;if(Pe>0){if(Pe&128){qe(q,Y,b,W,re,le,ge,me,ae);return}else if(Pe&256){st(q,Y,b,W,re,le,ge,me,ae);return}}Ne&8?(H&16&&Fe(q,re,le),Y!==q&&m(b,Y)):H&16?Ne&16?qe(q,Y,b,W,re,le,ge,me,ae):Fe(q,re,le,!0):(H&8&&m(b,""),Ne&16&&M(Y,b,W,re,le,ge,me,ae))},st=(x,k,b,W,re,le,ge,me,ae)=>{x=x||Ar,k=k||Ar;const q=x.length,H=k.length,Y=Math.min(q,H);let Pe;for(Pe=0;PeH?Fe(x,re,le,!0,!1,Y):M(k,b,W,re,le,ge,me,ae,Y)},qe=(x,k,b,W,re,le,ge,me,ae)=>{let q=0;const H=k.length;let Y=x.length-1,Pe=H-1;for(;q<=Y&&q<=Pe;){const Ne=x[q],Xe=k[q]=ae?Ln(k[q]):Sn(k[q]);if($r(Ne,Xe))Z(Ne,Xe,b,null,re,le,ge,me,ae);else break;q++}for(;q<=Y&&q<=Pe;){const Ne=x[Y],Xe=k[Pe]=ae?Ln(k[Pe]):Sn(k[Pe]);if($r(Ne,Xe))Z(Ne,Xe,b,null,re,le,ge,me,ae);else break;Y--,Pe--}if(q>Y){if(q<=Pe){const Ne=Pe+1,Xe=NePe)for(;q<=Y;)Ce(x[q],re,le,!0),q++;else{const Ne=q,Xe=q,Je=new Map;for(q=Xe;q<=Pe;q++){const jt=k[q]=ae?Ln(k[q]):Sn(k[q]);jt.key!=null&&Je.set(jt.key,q)}let tt,yt=0;const xt=Pe-Xe+1;let Zt=!1,Wt=0;const en=new Array(xt);for(q=0;q=xt){Ce(jt,re,le,!0);continue}let Tt;if(jt.key!=null)Tt=Je.get(jt.key);else for(tt=Xe;tt<=Pe;tt++)if(en[tt-Xe]===0&&$r(jt,k[tt])){Tt=tt;break}Tt===void 0?Ce(jt,re,le,!0):(en[Tt-Xe]=q+1,Tt>=Wt?Wt=Tt:Zt=!0,Z(jt,k[Tt],b,null,re,le,ge,me,ae),yt++)}const hr=Zt?Fp(en):Ar;for(tt=hr.length-1,q=xt-1;q>=0;q--){const jt=Xe+q,Tt=k[jt],Ie=k[jt+1],qn=jt+1{const{el:le,type:ge,transition:me,children:ae,shapeFlag:q}=x;if(q&6){Qe(x.component.subTree,k,b,W);return}if(q&128){x.suspense.move(k,b,W);return}if(q&64){ge.move(x,k,b,$e);return}if(ge===je){s(le,k,b);for(let Y=0;Yme.enter(le),re));else{const{leave:Y,delayLeave:Pe,afterLeave:Ne}=me,Xe=()=>{x.ctx.isUnmounted?o(le):s(le,k,b)},Je=()=>{const tt=le._isLeaving||!!le[an];le._isLeaving&&le[an](!0),me.persisted&&!tt?Xe():Y(le,()=>{Xe(),Ne&&Ne()})};Pe?Pe(le,Xe,Je):Je()}else s(le,k,b)},Ce=(x,k,b,W=!1,re=!1)=>{const{type:le,props:ge,ref:me,children:ae,dynamicChildren:q,shapeFlag:H,patchFlag:Y,dirs:Pe,cacheIndex:Ne,memo:Xe}=x;if((Y===-2||q&&q.hasOnce)&&(re=!1),me!=null&&(An(),Cs(me,null,b,x,!0),Pn()),Ne!=null&&(!x.ctx||x.ctx===k)&&(k.renderCache[Ne]=void 0),H&256){k.ctx.deactivate(x);return}const Je=H&1&&Pe,tt=!Ss(x);let yt;if(tt&&(yt=ge&&ge.onVnodeBeforeUnmount)&&wn(yt,k,x),H&6)ke(x.component,b,W);else{if(H&128){x.suspense.unmount(b,W);return}Je&&kr(x,null,k,"beforeUnmount"),H&64?x.type.remove(x,k,b,$e,W):q&&!q.hasOnce&&(le!==je||Y>0&&Y&64)?Fe(q,k,b,!1,!0):(le===je&&Y&384||!re&&H&16)&&Fe(ae,k,b),W&&J(x)}const xt=Xe!=null&&Ne==null;(tt&&(yt=ge&&ge.onVnodeUnmounted)||Je||xt)&&Yt(()=>{yt&&wn(yt,k,x),Je&&kr(x,null,k,"unmounted"),xt&&(x.el=null)},b)},J=x=>{const{type:k,el:b,anchor:W,transition:re}=x,le=k===je;if(le&&!re){Q(b,W);return}if(k===Ao){X(x),re&&!re.persisted&&re.afterLeave&&re.afterLeave();return}const ge=le?js(x):x,me=()=>{le?_(b)&&Q(b,W):o(b),re&&!re.persisted&&re.afterLeave&&re.afterLeave()};if(ge&&ge.shapeFlag&1&&re&&!re.persisted){const{leave:ae,delayLeave:q}=re,H=ge.el,Y=()=>ae(H,me);q?q(H,me,Y):Y()}else me()},Q=(x,k)=>{let b;for(;x!==k;)b=C(x),o(x),x=b;o(k)},ke=(x,k,b)=>{const{bum:W,scope:re,job:le,subTree:ge,um:me,m:ae,a:q}=x;hu(ae),hu(q),W&&$o(W),re.stop(),le?(le.flags|=8,Ce(ge,x,k,b)):x.vnode.el&&ge&&(ge.transition=x.vnode.transition,Ce(ge,x,k,b)),me&&Yt(me,k),Yt(()=>{x.isUnmounted=!0},k)},Fe=(x,k,b,W=!1,re=!1,le=0)=>{for(let ge=le;ge{if(x.shapeFlag&6)return ct(x.component.subTree);if(x.shapeFlag&128)return x.suspense.next();const k=C(x.anchor||x.el),b=k&&k[kc];return b?C(b):k},It=(x,k,b)=>{const W=x&&k._vnode?void 0:x&&x.component?x.component.uid:Wp();Yd(()=>{x==null?k._vnode&&Ce(k._vnode,null,null,!0):Z(k._vnode||null,x,k,null,null,null,b),k._vnode=x},W)},$e={p:Z,um:Ce,m:Qe,r:J,mt:Le,mc:M,pc:Ke,pbc:oe,n:ct,o:e};return{render:It,hydrate:void 0,createApp:kp(It)}}function ua({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 xr({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Kp(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function il(e,t,n=!1){const s=e.children,o=t.children;if(Re(s)&&Re(o))for(let a=0;a>1,e[n[d]]0&&(t[s]=n[a-1]),n[a]=s)}}for(a=n.length,c=n[a-1];a-- >0;)n[a]=c,c=t[c];return n}function Hc(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Hc(t)}function hu(e){if(e)for(let t=0;te.__isSuspense;function Np(e,t){t&&t.pendingBranch?Re(e)?t.effects.push(...e):t.effects.push(e):Gd(e)}const je=Symbol.for("v-fgt"),yi=Symbol.for("v-txt"),Ut=Symbol.for("v-cmt"),Ao=Symbol.for("v-stc"),Mr=[];let sn=null;function O(e=!1){Mr.push(sn=e?null:[])}function zc(){Mr.pop(),sn=Mr[Mr.length-1]||null}let Ds=1;function Uo(e,t=!1){Ds+=e,e<0&&sn&&t&&(sn.hasOnce=!0)}function Gc(e){return e.dynamicChildren=Ds>0?sn||Ar:null,zc(),Ds>0&&sn&&sn.push(e),e}function F(e,t,n,s,o,a){return Gc(u(e,t,n,s,o,a,!0))}function Lt(e,t,n,s,o){return Gc(Te(e,t,n,s,o,!0))}function Ls(e){return e?e.__v_isVNode===!0:!1}function $r(e,t){return e.type===t.type&&e.key===t.key}const Yc=({key:e})=>e??null,Po=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?wt(e)||qt(e)||ze(e)?{i:ln,r:e,k:t,f:!!n}:e:null);function u(e,t=null,n=null,s=0,o=null,a=e===je?0:1,c=!1,d=!1){const h={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Yc(t),ref:t&&Po(t),scopeId:bc,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:a,patchFlag:s,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:ln};return d?(qo(h,n),a&128&&e.normalize(h)):n&&(h.shapeFlag|=wt(n)?8:16),Ds>0&&!c&&sn&&(h.patchFlag>0||a&6)&&h.patchFlag!==32&&sn.push(h),h}const Te=Vp;function Vp(e,t=null,n=null,s=0,o=null,a=!1){if((!e||e===hp)&&(e=Ut),Ls(e)){const d=lr(e,t,!0);return n&&qo(d,n),Ds>0&&!a&&sn&&(d.shapeFlag&6?sn[sn.indexOf(e)]=d:sn.push(d)),d.patchFlag=-2,d}if(Qp(e)&&(e=e.__vccOpts),t){t=Bp(t);let{class:d,style:h}=t;d&&!wt(d)&&(t.class=Ze(d)),dt(h)&&(tl(h)&&!Re(h)&&(h=$t({},h)),t.style=rr(h))}const c=wt(e)?1:Wc(e)?128:pi(e)?64:dt(e)?4:ze(e)?2:0;return u(e,t,n,s,o,c,a,!0)}function Bp(e){return e?tl(e)||Fc(e)?$t({},e):e:null}function lr(e,t,n=!1,s=!1){const{props:o,ref:a,patchFlag:c,children:d,transition:h}=e,y=t?qp(o||{},t):o,m={__v_isVNode:!0,__v_skip:!0,type:e.type,props:y,key:y&&Yc(y),ref:t&&t.ref?n&&a?Re(a)?a.concat(Po(t)):[a,Po(t)]:Po(t):a,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:d,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:h,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&lr(e.ssContent),ssFallback:e.ssFallback&&lr(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce,cacheIndex:e.cacheIndex};return h&&s&&ar(m,h.clone(m)),m}function rn(e=" ",t=0){return Te(yi,null,e,t)}function Up(e,t){const n=Te(Ao,null,e);return n.staticCount=t,n}function Ee(e="",t=!1){return t?(O(),Lt(Ut,null,e)):Te(Ut,null,e)}function Sn(e){return e==null||typeof e=="boolean"?Te(Ut):Re(e)?Te(je,null,e.slice()):Ls(e)?Ln(e):Te(yi,null,String(e))}function Ln(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:lr(e)}function qo(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(Re(t))n=16;else if(typeof t=="object")if(s&65){const o=t.default;o&&(o._c&&(o._d=!1),qo(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!Fc(t)?t._ctx=ln:o===3&&ln&&(ln.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(ze(t)){if(s&65){qo(e,{default:t});return}t={default:t,_ctx:ln},n=32}else t=String(t),s&64?(n=16,t=[rn(t)]):n=8;e.children=t,e.shapeFlag|=n}function qp(...e){const t={};for(let n=0;nXt||ln;let Ho,Rs;{const e=ci(),t=(n,s)=>{let o;return(o=e[n])||(o=e[n]=[]),o.push(s),a=>{o.length>1?o.forEach(c=>c(a)):o[0](a)}};Ho=t("__VUE_INSTANCE_SETTERS__",n=>Xt=n),Rs=t("__VUE_SSR_SETTERS__",n=>Ks=n)}const qs=e=>{const t=Xt;return Ho(e),e.scope.on(),()=>{e.scope.off(),Ho(t)}},vu=()=>{Xt&&Xt.scope.off(),Ho(null)};function Xc(e){return e.vnode.shapeFlag&4}let Ks=!1;function Gp(e,t=!1,n=!1){t&&Rs(t);const{props:s,children:o}=e.vnode,a=Xc(e);Pp(e,s,a,t),jp(e,o,n||t);const c=a?Yp(e,t):void 0;return t&&Rs(!1),c}function Yp(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,vp);const{setup:s}=n;if(s){An();const o=e.setupContext=s.length>1?Xp(e):null,a=qs(e),c=Bs(s,e,0,[e.props,o]),d=qu(c);if(Pn(),a(),(d||e.sp)&&!Ss(e)&&$c(e),d){if(c.then(vu,vu),t)return c.then(h=>{Rs(!0);try{mu(e,h,t)}finally{Rs(!1)}}).catch(h=>{di(h,e,0)});e.asyncDep=c}else mu(e,c)}else Qc(e)}function mu(e,t,n){ze(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:dt(t)&&(e.setupState=pc(t)),Qc(e)}function Qc(e,t,n){const s=e.type;e.render||(e.render=s.render||$n);{const o=qs(e);An();try{mp(e)}finally{Pn(),o()}}}const Jp={get(e,t){return Bt(e,"get",""),e[t]}};function Xp(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Jp),slots:e.slots,emit:e.emit,expose:t}}function gi(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(pc(Kd(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Es)return Es[n](e)},has(t,n){return n in t||n in Es}})):e.proxy}function Qp(e){return ze(e)&&"__vccOpts"in e}const ut=(e,t)=>Ud(e,t,Ks);function Zp(e,t,n){try{Uo(-1);const s=arguments.length;return s===2?dt(t)&&!Re(t)?Ls(t)?Te(e,null,[t]):Te(e,t):Te(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&Ls(n)&&(n=[n]),Te(e,t,n))}finally{Uo(1)}}const eh="3.5.44";/** -* @vue/runtime-dom v3.5.44 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/let Aa;const yu=typeof window<"u"&&window.trustedTypes;if(yu)try{Aa=yu.createPolicy("vue",{createHTML:e=>e})}catch{}const Zc=Aa?e=>Aa.createHTML(e):e=>e,th="http://www.w3.org/2000/svg",nh="http://www.w3.org/1998/Math/MathML",Dn=typeof document<"u"?document:null,gu=Dn&&Dn.createElement("template"),rh={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const o=t==="svg"?Dn.createElementNS(th,e):t==="mathml"?Dn.createElementNS(nh,e):n?Dn.createElement(e,{is:n}):Dn.createElement(e);return e==="select"&&s&&s.multiple!=null&&o.setAttribute("multiple",s.multiple),o},createText:e=>Dn.createTextNode(e),createComment:e=>Dn.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Dn.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,o,a){const c=n?n.previousSibling:t.lastChild;if(o&&(o===a||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),!(o===a||!(o=o.nextSibling)););else{gu.innerHTML=Zc(s==="svg"?`${e}`:s==="mathml"?`${e}`:e);const d=gu.content;if(s==="svg"||s==="mathml"){const h=d.firstChild;for(;h.firstChild;)d.appendChild(h.firstChild);d.removeChild(h)}t.insertBefore(d,n)}return[c?c.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Xn="transition",ys="animation",Zr=Symbol("_vtc"),ef={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},tf=$t({},Cc,ef),sh=e=>(e.displayName="Transition",e.props=tf,e),ss=sh((e,{slots:t})=>Zp(sp,nf(e),t)),Cr=(e,t=[])=>{Re(e)?e.forEach(n=>n(...t)):e&&e(...t)},bu=e=>e?Re(e)?e.some(t=>t.length>1):e.length>1:!1;function nf(e){const t={};for(const z in e)z in ef||(t[z]=e[z]);if(e.css===!1)return t;const{name:n="v",type:s,duration:o,enterFromClass:a=`${n}-enter-from`,enterActiveClass:c=`${n}-enter-active`,enterToClass:d=`${n}-enter-to`,appearFromClass:h=a,appearActiveClass:y=c,appearToClass:m=d,leaveFromClass:_=`${n}-leave-from`,leaveActiveClass:C=`${n}-leave-active`,leaveToClass:A=`${n}-leave-to`}=e,V=oh(o),Z=V&&V[0],te=V&&V[1],{onBeforeEnter:ue,onEnter:P,onEnterCancelled:R,onLeave:X,onLeaveCancelled:fe,onBeforeAppear:ie=ue,onAppear:ee=P,onAppearCancelled:M=R}=t,S=(z,xe,Le,rt)=>{z._enterCancelled=rt,Zn(z,xe?m:d),Zn(z,xe?y:c),Le&&Le()},oe=(z,xe)=>{z._isLeaving=!1,Zn(z,_),Zn(z,A),Zn(z,C),xe&&xe()},be=z=>(xe,Le)=>{const rt=z?ee:P,He=()=>S(xe,z,Le);Cr(rt,[xe,He]),wu(()=>{Zn(xe,z?h:a),_n(xe,z?m:d),bu(rt)||_u(xe,s,Z,He)})};return $t(t,{onBeforeEnter(z){Cr(ue,[z]),_n(z,a),_n(z,c)},onBeforeAppear(z){Cr(ie,[z]),_n(z,h),_n(z,y)},onEnter:be(!1),onAppear:be(!0),onLeave(z,xe){z._isLeaving=!0;const Le=()=>oe(z,xe);_n(z,_),z._enterCancelled?(_n(z,C),Pa(z)):(Pa(z),_n(z,C)),wu(()=>{z._isLeaving&&(Zn(z,_),_n(z,A),bu(X)||_u(z,s,te,Le))}),Cr(X,[z,Le])},onEnterCancelled(z){S(z,!1,void 0,!0),Cr(R,[z])},onAppearCancelled(z){S(z,!0,void 0,!0),Cr(M,[z])},onLeaveCancelled(z){oe(z),Cr(fe,[z])}})}function oh(e){if(e==null)return null;if(dt(e))return[ca(e.enter),ca(e.leave)];{const t=ca(e);return[t,t]}}function ca(e){return ud(e)}function _n(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Zr]||(e[Zr]=new Set)).add(t)}function Zn(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const n=e[Zr];n&&(n.delete(t),n.size||(e[Zr]=void 0))}function wu(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let ih=0;function _u(e,t,n,s){const o=e._endId=++ih,a=()=>{o===e._endId&&s()};if(n!=null)return setTimeout(a,n);const{type:c,timeout:d,propCount:h}=rf(e,t);if(!c)return s();const y=c+"end";let m=0;const _=()=>{e.removeEventListener(y,C),a()},C=A=>{A.target===e&&++m>=h&&_()};setTimeout(()=>{m(n[V]||"").split(", "),o=s(`${Xn}Delay`),a=s(`${Xn}Duration`),c=ku(o,a),d=s(`${ys}Delay`),h=s(`${ys}Duration`),y=ku(d,h);let m=null,_=0,C=0;t===Xn?c>0&&(m=Xn,_=c,C=a.length):t===ys?y>0&&(m=ys,_=y,C=h.length):(_=Math.max(c,y),m=_>0?c>y?Xn:ys:null,C=m?m===Xn?a.length:h.length:0);const A=m===Xn&&/\b(?:transform|all)(?:,|$)/.test(s(`${Xn}Property`).toString());return{type:m,timeout:_,propCount:C,hasTransform:A}}function ku(e,t){for(;e.lengthxu(n)+xu(e[s])))}function xu(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Pa(e){return(e?e.ownerDocument:document).body.offsetHeight}function ah(e,t,n){const s=e[Zr];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Cu=Symbol("_vod"),sf=Symbol("_vsh"),lh=Symbol(""),uh=/(?:^|;)\s*display\s*:/;function ch(e,t,n){const s=e.style,o=wt(n);let a=!1;if(n&&!o){if(t)if(wt(t))for(const c of t.split(";")){const d=c.slice(0,c.indexOf(":")).trim();n[d]==null&&ws(s,d,"")}else for(const c in t)n[c]==null&&ws(s,c,"");for(const c in n){c==="display"&&(a=!0);const d=n[c];d!=null?dh(e,c,!wt(t)&&t?t[c]:void 0,d)||ws(s,c,d):ws(s,c,"")}}else if(o){if(t!==n){const c=s[lh];c&&(n+=";"+c),s.cssText=n,a=uh.test(n)}}else t&&e.removeAttribute("style");Cu in e&&((!o||t!==n)&&(e[Cu]=a?s.display:""),e[sf]&&(s.display="none"))}const Co=/\s*!important$/;function ws(e,t,n){if(Re(n))n.forEach(s=>ws(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))Co.test(n)?e.setProperty(t,n.replace(Co,""),"important"):e.setProperty(t,n);else{const s=fh(e,t);Co.test(n)?e.setProperty(cr(s),n.replace(Co,""),"important"):e[s]=n}}const Su=["Webkit","Moz","ms"],fa={};function fh(e,t){const n=fa[t];if(n)return n;let s=vn(t);if(s!=="filter"&&s in e)return fa[t]=s;s=zu(s);for(let o=0;oda||(gh.then(()=>da=0),da=Date.now());function wh(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;const o=n.value;if(Re(o)){const a=s.stopImmediatePropagation;s.stopImmediatePropagation=()=>{a.call(s),s._stopped=!0};const c=o.slice(),d=[s];for(let h=0;he.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,_h=(e,t,n,s,o,a)=>{const c=o==="svg";t==="class"?ah(e,s,c):t==="style"?ch(e,n,s):ii(t)?ai(t)||hh(e,t,n,s,a):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):kh(e,t,s,c))?(Tu(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&$u(e,t,s,c,a,t!=="value")):e._isVueCE&&(xh(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!wt(s)))?Tu(e,vn(t),s,a,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),$u(e,t,s,c))};function kh(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&Pu(t)&&ze(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 Pu(t)&&wt(n)?!1:t in e}function xh(e,t){const n=e._def.props;if(!n)return!1;const s=vn(t);return Array.isArray(n)?n.some(o=>vn(o)===s):Object.keys(n).some(o=>vn(o)===s)}const of=new WeakMap,af=new WeakMap,Wo=Symbol("_moveCb"),Ou=Symbol("_enterCb"),Oa=new WeakMap,Ch=e=>(delete e.props.mode,e),Sh=Ch({name:"TransitionGroup",props:$t({},tf,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=al(),s=xc();let o,a,c,d;const h=()=>(d===void 0&&(d=o.length>0&&Ih(o[0].el,n.vnode.el,Mu(e))),d);return Ac(()=>{if(Oa.delete(n),!h()){o=[],c=void 0;return}const y=Mu(e);o.forEach($h);const m=c&&Mh(c,n.vnode.el);c=void 0,o.forEach(C=>Th(C,m));const _=o.filter(Ah);Pa(n.vnode.el),_.forEach(C=>{const A=C.el,V=A.style;_n(A,y),V.transform=V.webkitTransform=V.transitionDuration="";const Z=A[Wo]=te=>{te&&te.target!==A||(!te||te.propertyName.endsWith("transform"))&&(A.removeEventListener("transitionend",Z),A[Wo]=null,Zn(A,y))};A.addEventListener("transitionend",Z)}),o=[]}),()=>{const y=lt(e),m=nf(y);let _=y.tag||je;if(o=[],d=void 0,a)for(let C=0;Cs.willMove()&&s.item.contains(t));return n&&bi(n.item,n)}function Ih(e,t,n){const s=e.cloneNode(),o=e[Zr];o&&o.forEach(d=>{d.split(/\s+/).forEach(h=>h&&s.classList.remove(h))}),n.split(/\s+/).forEach(d=>d&&s.classList.add(d)),s.style.display="none";const a=t.nodeType===1?t:t.parentNode;a.appendChild(s);const{hasTransform:c}=rf(s);return a.removeChild(s),c}const zo=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Re(t)?n=>$o(t,n):t};function jh(e){e.target.composing=!0}function Iu(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Pr=Symbol("_assign"),So=Symbol("_initialValue");function pa(e,t,n){return t&&(e=e.trim()),n&&(e=ui(e)),e}const De={created(e,{modifiers:{lazy:t,trim:n,number:s}},o){e.parentNode&&(e.type==="text"?e[So]=e.defaultValue.replace(/[\r\n]/g,""):e.type==="textarea"&&(e[So]=e.defaultValue.replace(/\r\n?/g,` -`))),e[Pr]=zo(o);const a=s||o.props&&o.props.type==="number";Tr(e,t?"change":"input",c=>{c.target.composing||e[Pr](pa(e.value,n,a))}),(n||a)&&Tr(e,"change",()=>{e.value=pa(e.value,n,a)}),t||(Tr(e,"compositionstart",jh),Tr(e,"compositionend",Iu),Tr(e,"change",Iu))},mounted(e,{value:t,modifiers:{trim:n,number:s}}){const o=t??"",a=e[So];delete e[So],a!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==a?e[Pr](pa(e.value,n,s)):e.value=o},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:o,number:a}},c){if(e[Pr]=zo(c),e.composing)return;const d=(a||e.type==="number")&&!/^0\d/.test(e.value)?ui(e.value):e.value,h=t??"";if(d===h)return;const y=e.getRootNode();(y instanceof Document||y instanceof ShadowRoot)&&y.activeElement===e&&e.type!=="range"&&(s&&t===n||o&&e.value.trim()===h)||(e.value=h)}},Nn={deep:!0,created(e,{value:t,modifiers:{number:n}},s){e._modelValue=t,Tr(e,"change",()=>{const o=Array.prototype.filter.call(e.options,h=>h.selected).map(h=>n?ui(Go(h)):Go(h)),a=e.multiple,c=a?Ir(e._modelValue)?new Set(o):o:o[0],d=e._pendingValue=[a,a?Re(c)?o.slice():o:c];try{e[Pr](c)}finally{rs(()=>{e._pendingValue===d&&(e._pendingValue=void 0)})}}),e[Pr]=zo(s)},mounted(e,{value:t}){ju(e,t)},beforeUpdate(e,{value:t},n){e._modelValue=t,e[Pr]=zo(n)},updated(e,{value:t}){const n=e._pendingValue;e._pendingValue=void 0,(!n||n[0]!==e.multiple||!Dh(t,n[1],n[0]))&&ju(e,t)}};function Dh(e,t,n){if(!n||Re(e))return or(e,t);if(Ir(e)){if(e.size!==t.length)return!1;for(const s of t)if(!e.has(s))return!1;return!0}return!1}function ju(e,t){const n=e.multiple,s=Re(t);if(!(n&&!s&&!Ir(t))){for(let o=0,a=e.options.length;oString(y)===String(d)):c.selected=gd(t,d)>-1}else c.selected=t.has(d);else if(or(Go(c),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Go(e){return"_value"in e?e._value:e.value}const Lh=["ctrl","shift","alt","meta"],Rh={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)=>Lh.some(n=>e[`${n}Key`]&&!t.includes(n))},hn=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=(o,...a)=>{for(let c=0;c{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=o=>{if(!("key"in o))return;const a=cr(o.key);if(t.some(c=>c===a||Kh[c]===a))return e(o)})},Fh=$t({patchProp:_h},rh);let Du;function Nh(){return Du||(Du=Lp(Fh))}const Vh=(...e)=>{const t=Nh().createApp(...e),{mount:n}=t;return t.mount=s=>{const o=Uh(s);if(!o)return;const a=t._component;!ze(a)&&!a.render&&!a.template&&(a.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const c=n(o,!1,Bh(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),c},t};function Bh(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Uh(e){return wt(e)?document.querySelector(e):e}function At(e){return''+e+""}const qh={calendar:At(''),clock:At(''),"check-circle":At(''),edit:At(''),tag:At(''),star:At(''),close:At(''),flag:At(''),chart:At(''),export:At(''),"chevron-left":At(''),"chevron-right":At(''),"chevron-down":At(''),plus:At(''),search:At(''),settings:At(''),memo:At(''),lock:At(''),wallet:At(''),more:At('')},Hh=["innerHTML"],et=Ht({__name:"Icon",props:{name:{},size:{default:16}},setup(e){const t=e,n=ut(()=>qh[t.name]||"");return(s,o)=>(O(),F("span",{class:"icon",style:rr({width:e.size+"px",height:e.size+"px"}),innerHTML:n.value},null,12,Hh))}}),Wh=["aria-label"],zh={class:"dialog-title"},Gh={class:"dialog-msg"},Yh={class:"dialog-btns"},Jh=Ht({__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,s=t;function o(a){n.open&&a.key==="Escape"&&s("cancel")}return mt(()=>n.open,a=>{a?window.addEventListener("keydown",o):window.removeEventListener("keydown",o)}),dr(()=>window.removeEventListener("keydown",o)),(a,c)=>(O(),Lt(Us,{to:"body"},[Te(ss,{name:"modal"},{default:fr(()=>[e.open?(O(),F("div",{key:0,class:"mask",onClick:c[2]||(c[2]=hn(d=>s("cancel"),["self"]))},[u("div",{class:"dialog",role:"dialog","aria-label":e.title},[u("div",zh,ne(e.title),1),u("div",Gh,ne(e.message),1),u("div",Yh,[u("button",{class:"btn btn-sm",onClick:c[0]||(c[0]=d=>s("cancel"))},ne(e.cancelText),1),u("button",{class:Ze(["btn btn-sm",e.danger?"btn-danger-solid":"btn-primary"]),onClick:c[1]||(c[1]=d=>s("confirm"))},ne(e.confirmText),3)])],8,Wh)])):Ee("",!0)]),_:1})]))}}),Qt=(e,t)=>{const n=e.__vccOpts||e;for(const[s,o]of t)n[s]=o;return n},ur=Qt(Jh,[["__scopeId","data-v-f27041d4"]]);var Lu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Xh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var lf={exports:{}};(function(e,t){((n,s)=>{e.exports=s()})(Lu,function(){var n=function(r,i){return(n=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(l,f){l.__proto__=f}:function(l,f){for(var p in f)Object.prototype.hasOwnProperty.call(f,p)&&(l[p]=f[p])}))(r,i)},s=function(){return(s=Object.assign||function(r){for(var i,l=1,f=arguments.length;l"u"||a.Promise||(a.Promise=Promise);var y=Object.getPrototypeOf,m={}.hasOwnProperty;function _(r,i){return m.call(r,i)}function C(r,i){typeof i=="function"&&(i=i(y(r))),(typeof Reflect>"u"?c:Reflect.ownKeys)(i).forEach(function(l){V(r,l,i[l])})}var A=Object.defineProperty;function V(r,i,l,f){A(r,i,h(l&&_(l,"get")&&typeof l.get=="function"?{get:l.get,set:l.set,configurable:!0}:{value:l,configurable:!0,writable:!0},f))}function Z(r){return{from:function(i){return r.prototype=Object.create(i.prototype),V(r.prototype,"constructor",r),{extend:C.bind(null,r.prototype)}}}}var te=Object.getOwnPropertyDescriptor,ue=[].slice;function P(r,i,l){return ue.call(r,i,l)}function R(r,i){return i(r)}function X(r){if(!r)throw new Error("Assertion Failed")}function fe(r){a.setImmediate?setImmediate(r):setTimeout(r,0)}function ie(r,i){if(typeof i=="string"&&_(r,i))return r[i];if(!i)return r;if(typeof i!="string"){for(var l=[],f=0,p=i.length;f"u"?[]:(Je=Promise.resolve(),typeof crypto<"u"&&crypto.subtle?[Xe=crypto.subtle.digest("SHA-512",new Uint8Array([0])),y(Xe),Je]:[Je,y(Je),Je]),Je=Xe[0],Ur=Xe[1],Ur=Ur&&Ur.then,tt=Je&&Je.constructor,yt=!!Xe[2],xt=function(r,i){qn.push([r,i]),Wt&&(queueMicrotask(Df),Wt=!1)},Zt=!0,Wt=!0,en=[],hr=[],jt=b,Tt={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:k,pgp:!1,env:{},finalize:k},Ie=Tt,qn=[],vr=0,Gs=[];function Se(r){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var i=this._PSD=Ie;if(typeof r!="function"){if(r!==Pe)throw new TypeError("Not a function");this._state=arguments[1],this._value=arguments[2],this._state===!1&&Si(this,this._value)}else this._state=null,this._value=null,++i.ref,function l(f,p){try{p(function(v){if(f._state===null){if(v===f)throw new TypeError("A promise cannot be resolved with itself.");var g=f._lib&&Rr();v&&typeof v.then=="function"?l(f,function(w,$){v instanceof Se?v._then(w,$):v.then(w,$)}):(f._state=!0,f._value=v,gl(f)),g&&Kr()}},Si.bind(null,f))}catch(v){Si(f,v)}}(this,r)}var Ci={get:function(){var r=Ie,i=Qs;function l(f,p){var v=this,g=!r.global&&(r!==Ie||i!==Qs),w=g&&!Wn(),$=new Se(function(B,I){Ei(v,new yl(wl(f,r,g,w),wl(p,r,g,w),B,I,r))});return this._consoleTask&&($._consoleTask=this._consoleTask),$}return l.prototype=Pe,l},set:function(r){V(this,"then",r&&r.prototype===Pe?Ci:{get:function(){return r},set:Ci.set})}};function yl(r,i,l,f,p){this.onFulfilled=typeof r=="function"?r:null,this.onRejected=typeof i=="function"?i:null,this.resolve=l,this.reject=f,this.psd=p}function Si(r,i){var l,f;hr.push(i),r._state===null&&(l=r._lib&&Rr(),i=jt(i),r._state=!1,r._value=i,f=r,en.some(function(p){return p._value===f._value})||en.push(f),gl(r),l)&&Kr()}function gl(r){var i=r._listeners;r._listeners=[];for(var l=0,f=i.length;l{for(var g=en.length;g;)if(en[--g]._value===v._value)return en.splice(g,1)})(i),l.resolve(f)}catch(v){l.reject(v)}finally{--vr==0&&$i(),--l.psd.ref||l.psd.finalize()}}function Df(){mr(Tt,function(){Rr()&&Kr()})}function Rr(){var r=Zt;return Wt=Zt=!1,r}function Kr(){var r,i,l;do for(;0.",_l="String expected.",eo="__dbnames",Ai="readonly",Pi="readwrite";function gr(r,i){return r?i?function(){return r.apply(this,arguments)&&i.apply(this,arguments)}:r:i}var kl={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function to(r){return typeof r!="string"||/\./.test(r)?function(i){return i}:function(i){return i[r]===void 0&&r in i&&delete(i=xe(i))[r],i}}function xl(){throw ce.Type("Entity instances must never be new:ed. Instances are generated by the framework bypassing the constructor.")}function ot(r,i){try{var l=Cl(r),f=Cl(i);if(l!==f)return l==="Array"?1:f==="Array"?-1:l==="binary"?1:f==="binary"?-1:l==="string"?1:f==="string"?-1:l==="Date"?1:f!=="Date"?NaN:-1;switch(l){case"number":case"Date":case"string":return i{var w=I,$=g;if(typeof $!="function"&&$!==null)throw new TypeError("Class extends value "+String($)+" is not a constructor or null");function B(){this.constructor=w}function I(){return g!==null&&g.apply(this,arguments)||this}return n(w,$),w.prototype=$===null?Object.create($):(B.prototype=$.prototype,new B),Object.defineProperty(I.prototype,"db",{get:function(){return i},enumerable:!1,configurable:!0}),I.prototype.table=function(){return l},I})(r)),new Set),p=r.prototype;p;p=y(p))Object.getOwnPropertyNames(p).forEach(function(g){return f.add(g)});function v(g){if(!g)return g;var w,$=Object.create(r.prototype);for(w in g)if(!f.has(w))try{$[w]=g[w]}catch{}return $}return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=v,this.hook("reading",v),r},ht.prototype.defineClass=function(){return this.mapToClass(function(r){h(this,r)})},ht.prototype.add=function(r,i){var l=this,f=this.schema.primKey,p=f.auto,v=f.keyPath,g=r;return v&&p&&(g=to(v)(r)),this._trans("readwrite",function(w){return l.core.mutate({trans:w,type:"add",keys:i!=null?[i]:null,values:[g]})}).then(function(w){return w.numFailures?Se.reject(w.failures[0]):w.lastResult}).then(function(w){if(v)try{ee(r,v,w)}catch{}return w})},ht.prototype.upsert=function(r,i){var l=this,f=this.schema.primKey.keyPath;return this._trans("readwrite",function(p){return l.core.get({trans:p,key:r}).then(function(v){var g=v??{};return $l(g,i),f&&ee(g,f,r),l.core.mutate({trans:p,type:"put",values:[g],keys:[r],upsert:!0,updates:{keys:[r],changeSpecs:[i]}}).then(function(w){return w.numFailures?Se.reject(w.failures[0]):!!v})})})},ht.prototype.update=function(r,i){return typeof r!="object"||d(r)?this.where(":id").equals(r).modify(i):(r=ie(r,this.schema.primKey.keyPath))===void 0?St(new ce.InvalidArgument("Given object does not contain its primary key")):this.where(":id").equals(r).modify(i)},ht.prototype.put=function(r,i){var l=this,f=this.schema.primKey,p=f.auto,v=f.keyPath,g=r;return v&&p&&(g=to(v)(r)),this._trans("readwrite",function(w){return l.core.mutate({trans:w,type:"put",values:[g],keys:i!=null?[i]:null})}).then(function(w){return w.numFailures?Se.reject(w.failures[0]):w.lastResult}).then(function(w){if(v)try{ee(r,v,w)}catch{}return w})},ht.prototype.delete=function(r){var i=this;return this._trans("readwrite",function(l){return i.core.mutate({trans:l,type:"delete",keys:[r]}).then(function(f){return no(i,[r],f)}).then(function(f){return f.numFailures?Se.reject(f.failures[0]):void 0})})},ht.prototype.clear=function(){var r=this;return this._trans("readwrite",function(i){return r.core.mutate({trans:i,type:"deleteRange",range:kl}).then(function(l){return no(r,null,l)})}).then(function(i){return i.numFailures?Se.reject(i.failures[0]):void 0})},ht.prototype.bulkGet=function(r){var i=this;return this._trans("readonly",function(l){return i.core.getMany({keys:r,trans:l}).then(function(f){return f.map(function(p){return i.hook.reading.fire(p)})})})},ht.prototype.bulkAdd=function(r,i,l){var f=this,p=Array.isArray(i)?i:void 0,v=(l=l||(p?void 0:i))?l.allKeys:void 0;return this._trans("readwrite",function(g){var w=f.schema.primKey,B=w.auto,w=w.keyPath;if(w&&p)throw new ce.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(p&&p.length!==r.length)throw new ce.InvalidArgument("Arguments objects and keys must have the same length");var $=r.length,B=w&&B?r.map(to(w)):r;return f.core.mutate({trans:g,type:"add",keys:p,values:B,wantResults:v}).then(function(I){var E=I.numFailures,T=I.failures;if(E===0)return v?I.results:I.lastResult;throw new ct("".concat(f.name,".bulkAdd(): ").concat(E," of ").concat($," operations failed"),T)})})},ht.prototype.bulkPut=function(r,i,l){var f=this,p=Array.isArray(i)?i:void 0,v=(l=l||(p?void 0:i))?l.allKeys:void 0;return this._trans("readwrite",function(g){var w=f.schema.primKey,B=w.auto,w=w.keyPath;if(w&&p)throw new ce.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(p&&p.length!==r.length)throw new ce.InvalidArgument("Arguments objects and keys must have the same length");var $=r.length,B=w&&B?r.map(to(w)):r;return f.core.mutate({trans:g,type:"put",keys:p,values:B,wantResults:v}).then(function(I){var E=I.numFailures,T=I.failures;if(E===0)return v?I.results:I.lastResult;throw new ct("".concat(f.name,".bulkPut(): ").concat(E," of ").concat($," operations failed"),T)})})},ht.prototype.bulkUpdate=function(r){var i=this,l=this.core,f=r.map(function(g){return g.key}),p=r.map(function(g){return g.changes}),v=[];return this._trans("readwrite",function(g){return l.getMany({trans:g,keys:f,cache:"clone"}).then(function(w){var $=[],B=[],I=(r.forEach(function(E,T){var K=E.key,D=E.changes,j=w[T];if(j){for(var L=0,G=Object.keys(D);LU+se&&L(U+B)})})}var G=Nr(l)&&l.limit===1/0&&(typeof r!="function"||D)&&{index:l.index,range:l.range};return L(0).then(function(){if(0{for(var Ue=Math.min(ye.length,Me.length),Ge=-1,nt=0;nt=T})).length===0?Se.resolve():(L.forEach(function(U){j.push(function(){var se,pe,ve,_e=G,ye=U._cfg.dbschema,Oe=(fo(E,_e,D),fo(E,ye,D),G=E._dbSchema=ye,Ki(_e,ye)),we=(Oe.add.forEach(function(Me){Fi(D,Me[0],Me[1].primKey,Me[1].indexes)}),Oe.change.forEach(function(Me){if(Me.recreate)throw new ce.Upgrade("Not yet support for changing primary key");var he=D.objectStore(Me.name);Me.add.forEach(function(Be){return uo(he,Be)}),Me.change.forEach(function(Be){he.deleteIndex(Be.name),uo(he,Be)}),Me.del.forEach(function(Be){return he.deleteIndex(Be)})}),U._cfg.contentUpgrade);if(we&&U._cfg.version>T)return ao(E,D),K._memoizedTables={},se=M(ye),Oe.del.forEach(function(Me){se[Me]=_e[Me]}),Ri(E,[E.Transaction.prototype]),lo(E,[E.Transaction.prototype],c(se),se),K.schema=se,(pe=Qe(we))&&Fr(),ye=Se.follow(function(){var Me;(ve=we(K))&&pe&&(Me=Wn.bind(null,null),ve.then(Me,Me))}),ve&&typeof ve.then=="function"?Se.resolve(ve):ye.then(function(){return ve})}),j.push(function(se){var pe,ve,_e=U._cfg.dbschema;pe=_e,ve=se,[].slice.call(ve.db.objectStoreNames).forEach(function(ye){return pe[ye]==null&&ve.db.deleteObjectStore(ye)}),Ri(E,[E.Transaction.prototype]),lo(E,[E.Transaction.prototype],E._storeNames,E._dbSchema),K.schema=E._dbSchema}),j.push(function(se){E.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(E.idbdb.version/10)===U._cfg.version?(E.idbdb.deleteObjectStore("$meta"),delete E._dbSchema.$meta,E._storeNames=E._storeNames.filter(function(pe){return pe!=="$meta"})):se.objectStore("$meta").put(U._cfg.version,"version"))})}),function U(){return j.length?Se.resolve(j.shift()(K.idbtrans)).then(U):Se.resolve()}().then(function(){Ll(G,D)}))}).catch(g);var $,B;c(p).forEach(function(I){Fi(l,I,p[I].primKey,p[I].indexes)}),ao(r,l),Se.follow(function(){return r.on.populate.fire(v)}).catch(g)})}function Gf(r,i){Ll(r._dbSchema,i),i.db.version%10!=0||i.objectStoreNames.contains("$meta")||i.db.createObjectStore("$meta").add(Math.ceil(i.db.version/10-1),"version");var l=co(0,r.idbdb,i);fo(r,r._dbSchema,i);for(var f=0,p=Ki(l,r._dbSchema).change;f{if(g.change.length||g.recreate)return console.warn("Unable to patch indexes of table ".concat(g.name," because it has changes on the type of index or primary key.")),{value:void 0};var w=i.objectStore(g.name);g.add.forEach(function($){H&&console.debug("Dexie upgrade patch: Creating missing index ".concat(g.name,".").concat($.src)),uo(w,$)})})(p[f]);if(typeof v=="object")return v.value}}function Ki(r,i){var l,f={del:[],add:[],change:[]};for(l in r)i[l]||f.del.push(l);for(l in i){var p=r[l],v=i[l];if(p){var g={name:l,def:v,recreate:!1,del:[],add:[],change:[]};if(""+(p.primKey.keyPath||"")!=""+(v.primKey.keyPath||"")||p.primKey.auto!==v.primKey.auto)g.recreate=!0,f.change.push(g);else{var w=p.idxByName,$=v.idxByName,B=void 0;for(B in w)$[B]||g.del.push(B);for(B in $){var I=w[B],E=$[B];I?I.src!==E.src&&g.change.push(E):g.add.push(E)}(0{var r,i,l;return typeof FinalizationRegistry<"u"&&typeof WeakRef<"u"?(r=new Set,i=new FinalizationRegistry(function(f){r.delete(f)}),{toArray:function(){return Array.from(r).map(function(f){return f.deref()}).filter(function(f){return f!==void 0})},add:function(f){var p=new WeakRef(f._novip);r.add(p),i.register(f._novip,p,p),r.size>f._options.maxConnections&&(p=r.values().next().value,r.delete(p),i.unregister(p))},remove:function(f){if(f)for(var p=r.values(),v=p.next();!v.done;){var g=v.value;if(g.deref()===f._novip)return r.delete(g),void i.unregister(g);v=p.next()}}}):(l=[],{toArray:function(){return l},add:function(f){l.push(f._novip)},remove:function(f){f&&(f=l.indexOf(f._novip))!==-1&&l.splice(f,1)}})})();function Ni(r,i){var l=r._dbNamesDB;return l||(l=r._dbNamesDB=new In(eo,{addons:[],indexedDB:r,IDBKeyRange:i})).version(1).stores({dbnames:"name"}),l.table("dbnames")}function Vi(r){return r&&typeof r.databases=="function"}function Bi(r){return Hn(function(){return Ie.letThrough=!0,r()})}function Ui(r){return!("from"in r)}var Ft=function(r,i){var l;if(!this)return l=new Ft,r&&"d"in r&&h(l,r),l;h(this,arguments.length?{d:1,from:r,to:1Math.pow(2,62)?0:L.oldVersion,E=G<1,r.idbdb=j.result,v&&Gf(r,I),zf(r,G/10,I,K))},K),j.onsuccess=gt(function(){I=null;var L,G,U,se,pe,ve,_e=r.idbdb=j.result,ye=P(_e.objectStoreNames);if(0"u"?Se.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(T){function K(){return indexedDB.databases().finally(T)}$=setInterval(K,100),K()}).finally(function(){return clearInterval($)}):Promise.resolve()).then(w)]).then(function(){return g(),i.onReadyBeingFired=[],Se.resolve(Bi(function(){return r.on.ready.fire(r.vip)})).then(function T(){var K;if(0i.limit?f.length=i.limit:r.length===i.limit&&f.length{if(l===void 0)return f!==void 0?-1:0;if(f===void 0)return 1;if((l=ot(l,f))===0){if(p&&v)return 0;if(p)return 1;if(v)return-1}return l})(r.lower,i.lower,r.lowerOpen,i.lowerOpen)<=0&&0<=((l,f,p,v)=>{if(l===void 0)return f!==void 0?1:0;if(f===void 0)return-1;if((l=ot(l,f))===0){if(p&&v)return 0;if(p)return-1;if(v)return 1}return l})(r.upper,i.upper,r.upperOpen,i.upperOpen)}function nd(r,i,l,f){r.subscribers.add(l),f.addEventListener("abort",function(){var p,v;r.subscribers.delete(l),r.subscribers.size===0&&(p=r,v=i,setTimeout(function(){p.subscribers.size===0&&Ke(v,p)},3e3))})}var rd={stack:"dbcore",level:0,name:"Cache",create:function(r){var i=r.schema.name;return s(s({},r),{transaction:function(l,f,p){var v,g,w=r.transaction(l,f,p);return f==="readwrite"&&(p=(v=new AbortController).signal,w.addEventListener("abort",(g=function($){return function(){if(v.abort(),f==="readwrite"){for(var B=new Set,I=0,E=l;I{var G=br["idb://".concat(K,"/").concat(D)];if(!G)return[];if(!(K=G.queries[j]))return[null,!1,G,null];var U=K[(L.query?L.query.index.name:null)||""];if(!U)return[null,!1,G,null];switch(j){case"query":var se=(pe=L.direction)!=null?pe:"next",pe=U.find(function(ve){var _e;return ve.req.limit===L.limit&&ve.req.values===L.values&&((_e=ve.req.direction)!=null?_e:"next")===se&&zl(ve.req.query.range,L.query.range)});return pe?[pe,!0,G,U]:[U.find(function(ve){var _e;return("limit"in ve.req?ve.req.limit:1/0)>=L.limit&&((_e=ve.req.direction)!=null?_e:"next")===se&&(!L.values||ve.req.values)&&td(ve.req.query.range,L.query.range)}),!1,G,U];case"count":return pe=U.find(function(ve){return zl(ve.req.query.range,L.query.range)}),[pe,!!pe,G,U]}})(i,l,"query",v),T=E[0],B=E[2],I=E[3],T&&E[1]?T.obsSet=v.obsSet:(E=f.query(v).then(function(K){var D=K.result;if(T&&(T.res=D),g){for(var j=0,L=D.length;j{var pe=Rr();try{v&&Fr();var ve=Hn(r,se);return ve=v?ve.finally(Wn):ve}finally{pe&&Kr()}})(G={subscr:L,signal:g.signal,requery:T,querier:r,trans:null}),E||(Yn.storagemutated.subscribe(D),E=!0),Promise.resolve(U).then(function(se){l=!0,i=se,w||G.signal.aborted||(K()||(B=L,K())?T():($={},Ti(function(){return!w&&p.next&&p.next(se)})))},function(se){l=!1,["DatabaseClosedError","AbortError"].includes(se==null?void 0:se.name)||w||Ti(function(){w||p.error&&p.error(se)})}))};return setTimeout(T,0),I});return f.hasValue=function(){return l},f.getValue=function(){return i},f}var wr=In;function Zi(r){var i=Jn;try{Jn=!0,Yn.storagemutated.fire(r),zi(r,!0)}finally{Jn=i}}C(wr,s(s({},Ce),{delete:function(r){return new wr(r,{addons:[]}).delete()},exists:function(r){return new wr(r,{addons:[]}).open().then(function(i){return i.close(),!0}).catch("NoSuchDatabaseError",function(){return!1})},getDatabaseNames:function(r){try{return i=wr.dependencies,l=i.indexedDB,i=i.IDBKeyRange,(Vi(l)?Promise.resolve(l.databases()).then(function(f){return f.map(function(p){return p.name}).filter(function(p){return p!==eo})}):Ni(l,i).toCollection().primaryKeys()).then(r)}catch{return St(new ce.MissingAPI)}var i,l},defineClass:function(){return function(r){h(this,r)}},ignoreTransaction:function(r){return Ie.trans?mr(Ie.transless||Tt,r):r()},vip:Bi,async:function(r){return function(){try{var i=Gi(r.apply(this,arguments));return i&&typeof i.then=="function"?i:Se.resolve(i)}catch(l){return St(l)}}},spawn:function(r,i,l){try{var f=Gi(r.apply(l,i||[]));return f&&typeof f.then=="function"?f:Se.resolve(f)}catch(p){return St(p)}},currentTransaction:{get:function(){return Ie.trans||null}},waitFor:function(r,i){return r=Se.resolve(typeof r=="function"?wr.ignoreTransaction(r):r).timeout(i||6e4),Ie.trans?Ie.trans.waitFor(r):r},Promise:Se,debug:{get:function(){return H},set:function(r){Y(r)}},derive:Z,extend:h,props:C,override:R,Events:as,on:Yn,liveQuery:Gl,extendObservabilitySet:ho,getByKeyPath:ie,setByKeyPath:ee,delByKeyPath:function(r,i){typeof i=="string"?ee(r,i,void 0):"length"in i&&[].map.call(i,function(l){ee(r,l,void 0)})},shallowClone:M,deepClone:xe,getObjectDiff:Yi,cmp:ot,asap:fe,minKey:-1/0,addons:[],connections:{get:ds.toArray},errnames:It,dependencies:go,cache:br,semVer:"4.4.6",version:"4.4.6".split(".").map(function(r){return parseInt(r)}).reduce(function(r,i,l){return r+i/Math.pow(10,2*l)})})),wr.maxKey=cs(wr.dependencies.IDBKeyRange),typeof dispatchEvent<"u"&&typeof addEventListener<"u"&&(Yn(io,function(r){Jn||(r=new CustomEvent(Ii,{detail:r}),Jn=!0,dispatchEvent(r),Jn=!1)}),addEventListener(Ii,function(r){r=r.detail,Jn||Zi(r)}));var qr,Jn=!1,Yl=function(){};return typeof BroadcastChannel<"u"&&((Yl=function(){(qr=new BroadcastChannel(Ii)).onmessage=function(r){return r.data&&Zi(r.data)}})(),typeof qr.unref=="function"&&qr.unref(),Yn(io,function(r){Jn||qr.postMessage(r)})),typeof addEventListener<"u"&&(addEventListener("pagehide",function(r){if(!In.disableBfCache&&r.persisted){H&&console.debug("Dexie: handling persisted pagehide"),qr!=null&&qr.close();for(var i=0,l=ds.toArray();in.key===e);return t?t.label:"其他"}const rv={class:"dialog",role:"dialog","aria-label":"编辑工作记录"},sv={class:"dialog-head"},ov={key:0,class:"muted dialog-sub"},iv={class:"dialog-body"},av={class:"form-grid"},lv={class:"field span2"},uv={key:0,class:"form-error"},cv={class:"field"},fv=["value"],dv={class:"field"},pv=["value"],hv={class:"field"},vv={class:"field"},mv={class:"field span2"},yv={class:"field"},gv={class:"field"},bv={class:"dialog-btns"},wv=Ht({__name:"EditLogDialog",props:{open:{type:Boolean},item:{},projects:{},date:{}},emits:["cancel","save"],setup(e,{emit:t}){const n=e,s=t,o=N(""),a=N(null),c=N("dev"),d=N(null),h=N(""),y=N(""),m=N(0),_=N(0),C=N(""),A=N(null),V=ut(()=>{var R;const ue=n.projects.filter(X=>X.archived!==1),P=(R=n.item)==null?void 0:R.project_id;if(P&&!ue.some(X=>X.id===P)){const X=n.projects.find(ie=>ie.id===P),fe=ue.slice();return X&&fe.unshift({...X,name:X.name+"(已归档)"}),fe}return ue});function Z(ue){n.open&&ue.key==="Escape"&&s("cancel")}mt(()=>n.open,async ue=>{var P;if(ue){const R=n.item;o.value=(R==null?void 0:R.content)??"",a.value=(R==null?void 0:R.project_id)??null,c.value=(R==null?void 0:R.category)??"dev",d.value=(R==null?void 0:R.minutes)??null,h.value=(R==null?void 0:R.takeaway)??"",y.value=(R==null?void 0:R.remark)??"",m.value=(R==null?void 0:R.is_milestone)??0,_.value=(R==null?void 0:R.needs_followup)??0,C.value="",window.addEventListener("keydown",Z),await rs(),(P=A.value)==null||P.focus()}else window.removeEventListener("keydown",Z)}),dr(()=>window.removeEventListener("keydown",Z)),mt(o,()=>{C.value&&(C.value="")});function te(){const ue=o.value.trim();if(!ue){C.value="请填写工作内容";return}if(!n.item||!n.item.id){s("cancel");return}s("save",{id:n.item.id,content:ue,project_id:a.value,category:c.value,minutes:d.value&&d.value>0?d.value:null,takeaway:h.value.trim()||null,remark:y.value.trim()||null,is_milestone:m.value?1:0,needs_followup:_.value?1:0})}return(ue,P)=>(O(),Lt(Us,{to:"body"},[Te(ss,{name:"modal"},{default:fr(()=>[e.open?(O(),F("div",{key:0,class:"mask",onClick:P[10]||(P[10]=hn(R=>s("cancel"),["self"]))},[u("div",rv,[u("div",sv,[u("div",null,[P[11]||(P[11]=u("div",{class:"dialog-title"},"编辑工作记录",-1)),e.date?(O(),F("div",ov,ne(e.date),1)):Ee("",!0)]),u("button",{class:"icon-btn",title:"关闭",onClick:P[0]||(P[0]=R=>s("cancel"))},[Te(et,{name:"close",size:16})])]),u("div",iv,[u("div",av,[u("div",lv,[P[12]||(P[12]=u("label",null,"工作内容(必填)",-1)),Ae(u("input",{ref_key:"contentInput",ref:A,class:Ze(["input",{invalid:C.value}]),"onUpdate:modelValue":P[1]||(P[1]=R=>o.value=R),onKeydown:Mt(te,["enter"])},null,34),[[De,o.value]]),C.value?(O(),F("div",uv,ne(C.value),1)):Ee("",!0)]),u("div",cv,[P[14]||(P[14]=u("label",null,"所属项目",-1)),Ae(u("select",{class:"select","onUpdate:modelValue":P[2]||(P[2]=R=>a.value=R)},[P[13]||(P[13]=u("option",{value:null},"无项目",-1)),(O(!0),F(je,null,it(V.value,R=>(O(),F("option",{key:R.id,value:R.id},ne(R.name),9,fv))),128))],512),[[Nn,a.value]])]),u("div",dv,[P[15]||(P[15]=u("label",null,"工作分类",-1)),Ae(u("select",{class:"select","onUpdate:modelValue":P[3]||(P[3]=R=>c.value=R)},[(O(!0),F(je,null,it(Kt(Hs),R=>(O(),F("option",{key:R.key,value:R.key},ne(R.label),9,pv))),128))],512),[[Nn,c.value]])]),u("div",hv,[P[16]||(P[16]=u("label",null,"耗时(分钟)",-1)),Ae(u("input",{class:"input",type:"number",min:"0","onUpdate:modelValue":P[4]||(P[4]=R=>d.value=R),placeholder:"选填"},null,512),[[De,d.value,void 0,{number:!0}]])]),u("div",vv,[P[17]||(P[17]=u("label",null,"主要收获",-1)),Ae(u("input",{class:"input","onUpdate:modelValue":P[5]||(P[5]=R=>h.value=R),placeholder:"一句话:学到了什么"},null,512),[[De,h.value]])]),u("div",mv,[P[18]||(P[18]=u("label",null,"备注",-1)),Ae(u("textarea",{class:"textarea","onUpdate:modelValue":P[6]||(P[6]=R=>y.value=R),placeholder:"背景、链接、未决事项(选填)"},null,512),[[De,y.value]])]),u("div",yv,[P[19]||(P[19]=u("label",null,"成果标记",-1)),u("button",{class:Ze(["toggle-btn",{on:m.value===1}]),onClick:P[7]||(P[7]=R=>m.value=m.value===1?0:1)},ne(m.value===1?"已标记为成果":"未标记"),3)]),u("div",gv,[P[20]||(P[20]=u("label",null,"待跟进",-1)),u("button",{class:Ze(["toggle-btn",{onwarn:_.value===1}]),onClick:P[8]||(P[8]=R=>_.value=_.value===1?0:1)},ne(_.value===1?"需要跟进":"无需跟进"),3)])])]),u("div",bv,[u("button",{class:"btn btn-sm",onClick:P[9]||(P[9]=R=>s("cancel"))},"取消"),u("button",{class:"btn btn-primary btn-sm",onClick:te},"保存修改")])])])):Ee("",!0)]),_:1})]))}}),_v=Qt(wv,[["__scopeId","data-v-63bc0b48"]]);function $s(e){return e<10?"0"+e:String(e)}function Vn(e){return e.getFullYear()+"-"+$s(e.getMonth()+1)+"-"+$s(e.getDate())}function Ct(){return Vn(new Date)}function _t(){const e=new Date;return Vn(e)+"T"+$s(e.getHours())+":"+$s(e.getMinutes())+":"+$s(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 os(e){const t=e.split("-").map(Number);return new Date(t[0],t[1]-1,t[2])}function Fn(e,t){const n=os(e);return n.setDate(n.getDate()+t),Vn(n)}function Qo(e,t){const n=os(e),s=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(s,o)),Vn(n)}function Ts(e){const t=os(e),n=(t.getDay()+6)%7;return t.setDate(t.getDate()-n),Vn(t)}function kv(e){const t=os(e).getDay();return t===0||t===6}function xv(e,t){return Math.round((new Date(t).getTime()-new Date(e).getTime())/6e4)}function uf(e){const t=os(e),n=["周日","周一","周二","周三","周四","周五","周六"];return t.getFullYear()+" 年 "+(t.getMonth()+1)+" 月 "+t.getDate()+" 日 "+n[t.getDay()]}const Cv=15e4;function Ia(e){const t=new Uint8Array(e);let n="";for(let s=0;s({}));if(!o.ok){const c=a&&a.error||"服务返回 "+o.status;throw e==="register"&&o.status===409?new Error("云端已有同名账号且密码一致,直接登录即可"):new Error(String(c))}if(!a.userId||!a.username)throw new Error("登录响应异常");return{userId:String(a.userId),username:String(a.username)}}async function pl(e,t,n){const s=await Nv(n,e,t);ri(s.userId);const o={userId:s.userId,username:s.username};return Kv(o),gf(s.username,t),o}async function Vv(e,t){const n=(e||"").trim();if(!n||!t)throw new Error("请输入用户名与密码");return pl(n,t,"login")}async function Bv(e,t,n){const s=(e||"").trim();if(s.length<2||s.length>20)throw new Error("用户名需 2 到 20 个字符");if(t.length<6)throw new Error("登录密码至少 6 位");return pl(s,t,"register")}async function Uv(){const e=pr();if(!e)return null;try{return await pl(e.username,e.password,"login")}catch{return null}}async function qv(){ti(),ll(),ni=null,yf()}function Hv(){ti(),ll(),ni=null,yf(),Fv()}async function Wv(e,t){if(!_i())throw new Error("未登录");if(t.length<6)throw new Error("新密码至少 6 位");const s=pr();if(!s||s.password!==e)throw new Error("旧密码不正确");const o=await Lr();let a;try{a=await fetch(o+"/api/auth/password",{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+bf()},body:JSON.stringify({oldPassword:e,newPassword:t})})}catch{throw new Error("无法连接同步服务器")}if(!a.ok){const c=await a.json().catch(()=>({}));throw new Error(c&&c.error||"修改失败 "+a.status)}gf(s.username,t)}async function zv(){if(!_i())throw new Error("未登录");const t=await Lr();let n;try{n=await fetch(t+"/api/auth/delete",{method:"POST",headers:{Authorization:"Bearer "+bf()}})}catch{throw new Error("无法连接同步服务器")}if(!n.ok){const s=await n.json().catch(()=>({}));throw new Error(s&&s.error||"删除失败 "+n.status)}Hv()}function bf(){return cl()}const Ka=N(null),Fa=N(null),Ws=N(0);function tr(){Ws.value++}const Jr=N(""),Fs=["project","work_log","log_item","attendance","weekly_note","setting","memo","credential","transaction"],Gr=new Set(["sync_cursor","sync_last_time","sync_token","last_project","last_category"]),Gv=Lr;function Oo(e){return JSON.stringify(e)}async function Yv(e){return de.table(e).toArray()}function Mo(e,t){return e==="setting"?t.key:t.id}async function Jv(){for(const e of Fs){const t=de.table(e),n=await t.toArray();for(const s of n){if(e==="setting"&&Gr.has(s.key))continue;const o={};s.uuid||(o.uuid=Xv()),!s.updated_at&&s.created_at&&(o.updated_at=s.created_at),Object.keys(o).length&&await t.update(Mo(e,s),o)}}}function Xv(){return typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():"u"+Date.now().toString(36)+Math.random().toString(36).slice(2,10)}async function Qv(){return pr()!=null}async function Zv(){try{return localStorage.getItem("dsh_last_sync")||""}catch{return""}}async function em(e){try{localStorage.setItem("dsh_last_sync",e)}catch{}}async function wf(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 s=await n.json();if(!s||!s.token)throw new Error("云端登录异常");return String(s.token)}async function tm(e,t){let n=cl();return n||(n=await wf(e,t),Ra(n),n)}async function _f(){const e=pr();if(!e)throw new Error("未登录");const t=await Lr(),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 Na(){const e=pr();if(!e)throw new Error("未登录,无法同步");return Sf({baseUrl:await Lr(),username:e.username,password:e.password})}async function kf(){try{await Na()}catch(e){Jr.value=e instanceof Error?e.message:String(e);try{await Na()}catch{}throw e}}function xf(e,t,n){const s={};for(const o of Object.keys(t))o!=="id"&&(s[o]=t[o]);if(e==="log_item"){delete s.work_log_id,delete s.project_id;const o=t.work_log_id?n.workLog.get(t.work_log_id):null;o&&o.uuid&&(s.wuuid=o.uuid);const a=t.project_id?n.project.get(t.project_id):null;a&&a.uuid&&(s.puuid=a.uuid)}return s}async function Cf(){const e=await de.work_log.toArray(),t=await de.project.toArray();return{workLog:new Map(e.map(n=>[n.id,n])),project:new Map(t.map(n=>[n.id,n]))}}let As=!1,Io=!1,Va=!1,Xr=null,kn=null,Ba="",Ua=!1,jo=null;async function Qr(){if(As){Io=!0;return}try{if(!await Qv())return;await Sf(await nm()),Jr.value=""}catch(e){Jr.value=e instanceof Error?e.message:String(e)}}async function nm(){const e=pr();if(!e)throw new Error("未登录,无法同步");return{baseUrl:await Lr(),username:e.username,password:e.password}}function rm(){if(Ua)return;Ua=!0,jo=Zh(async()=>{const t={};for(const n of Fs)t[n]=await de.table(n).count();return t}).subscribe({next:()=>{Va||As||(Xr&&globalThis.clearTimeout(Xr),Xr=globalThis.setTimeout(()=>{Qr()},3e3))},error:()=>{}})}function sm(){jo&&(jo.unsubscribe(),jo=null),kn&&(kn.close(),kn=null,Ba=""),Xr&&(globalThis.clearTimeout(Xr),Xr=null),Ua=!1}function om(e,t){const n=e+"|"+t;if(!(kn&&Ba===n)){kn&&(kn.close(),kn=null);try{kn=new EventSource(e+"/api/events?token="+encodeURIComponent(t)),Ba=n,kn.onmessage=()=>{Qr()}}catch{kn=null}}}async function Sf(e){if(As)return Io=!0,{pushed:0,pulled:0,removed:0,errors:0,at:""};As=!0,Va=!0;try{const t=await im(e);return Io&&(Io=!1,globalThis.setTimeout(()=>{Qr()},800)),t}finally{As=!1,Va=!1}}async function im(e){const t=e.baseUrl.trim().replace(/\/+$/,"");if(!t)throw new Error("请先配置同步服务地址");await Jv();const n=await Cf(),s=await de.sync_mirror.toArray(),o=new Map;for(const te of s)o.set(te.table+"|"+te.uuid,te);const a={},c=[];let d=0;for(const te of Fs){let ue=await Yv(te);te==="setting"&&(ue=ue.filter(R=>!Gr.has(R.key)));const P=new Map;for(const R of ue)P.set(R.uuid,R);for(const[R,X]of P){const fe=xf(te,X,n),ie=Oo(fe),ee=o.get(te+"|"+R);(!ee||ee.hash!==ie)&&(a[te]=a[te]||[],a[te].push(fe),d++)}for(const[R,X]of o)R.startsWith(te+"|")&&!P.has(X.uuid)&&c.push({table:te,uuid:X.uuid,deleted_at:_t()});a[te]=a[te]||[]}c.push(...fm());const h=await tm(t,e),y=te=>fetch(t+"/api/sync",{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+te},body:JSON.stringify({device:"client",tables:a,tombstones:c})});let m=await y(h);if(m.status===401){Ra("");const te=await wf(t,e);Ra(te),m=await y(te)}if(!m.ok)throw new Error("同步服务返回 "+m.status);const _=await m.json(),C=_.tables||{},A=_.tombstones||[],V=await um(C,A);om(t,cl()||h);const Z=_t();return await em(Z),(V.changed>0||V.removed>0||d>0)&&tr(),{pushed:d,pulled:V.changed,removed:V.removed,errors:0,at:Z}}function Ef(){var t;return"dsh_idmap_"+(((t=pr())==null?void 0:t.username)||"anon")}function am(){try{const e=localStorage.getItem(Ef());if(e)return JSON.parse(e)}catch{}return{}}function lm(e){try{localStorage.setItem(Ef(),JSON.stringify(e))}catch{}}async function um(e,t){const n=am(),s=new Set(t.map(C=>C.table+"|"+C.uuid)),o=new Map;for(const C of await de.sync_mirror.toArray())o.set(C.table+"|"+C.uuid,C);const a=new Set(Array.from(o.keys()).map(C=>C.split("|")[1]));let c=0,d=0;const h={},y={};for(const C of Fs){const A=de.table(C),V=await A.toArray(),Z=new Map(V.map(S=>[Mo(C,S),S])),te=new Map(V.filter(S=>S.uuid).map(S=>[S.uuid,S])),ue=(e[C]||[]).filter(S=>!s.has(C+"|"+S.uuid)),P=ue.filter(S=>!(C==="setting"&&Gr.has(S.key))),R=ue.filter(S=>C==="setting"&&Gr.has(S.key));for(const S of R)cm(C,S.uuid);const X=C==="setting"?[]:V.filter(S=>S.uuid&&!a.has(S.uuid)&&!s.has(C+"|"+S.uuid)),fe={v:Math.max(0,...V.map(S=>Number(S.id)||0))};P.length;const ie=[];for(const S of P){const oe={...S};if(C==="log_item"){const xe=oe.wuuid?h[oe.wuuid]:void 0;if(!xe)continue;oe.work_log_id=xe,delete oe.wuuid,oe.project_id=oe.puuid?y[oe.puuid]??null:null,delete oe.puuid}let be=Mo(C,S);if(C==="setting")be=S.key;else{const xe=n[C]&&n[C][S.uuid],Le=te.get(S.uuid);Le&&Le.id!=null?be=Le.id:typeof xe=="number"?be=xe:be=++fe.v}const z={...oe,id:be};C==="setting"&&Gr.has(z.key)||(ie.push(z),C==="work_log"&&(h[S.uuid]=be),C==="project"&&(y[S.uuid]=be))}const ee=ie.concat(X);for(const S of ee){const oe=Z.get(Mo(C,S));(!oe||Oo(oe)!==Oo(S))&&c++}d+=V.filter(S=>S.uuid&&!ie.some(oe=>oe.uuid===S.uuid)&&!s.has(C+"|"+S.uuid)).length,await A.clear(),ee.length&&await A.bulkPut(ee);const M={};for(const S of ee)S.uuid&&(M[S.uuid]=S.id);n[C]=M}lm(n);const m=await Cf(),_=[];for(const C of Fs){const A=await de.table(C).toArray();for(const V of A)C==="setting"&&Gr.has(V.key)||V.uuid&&_.push({table:C,uuid:V.uuid,hash:Oo(xf(C,V,m))})}return await de.sync_mirror.clear(),_.length&&await de.sync_mirror.bulkAdd(_.map(C=>({...C}))),await de.tombstone.clear(),{changed:c,removed:d+si.length}}const si=[];function cm(e,t){si.some(n=>n.table===e&&n.uuid===t)||si.push({table:e,uuid:t,deleted_at:_t()})}function fm(){return si.splice(0)}const dm=new Set(["sync_cursor","sync_last_time","sync_token","last_project","last_category"]);async function kt(){await kf()}async function bt(e,t){const n=await de.setting.get(e);return n?n.value:t}async function Rt(e,t){await de.setting.put({key:e,value:t}),dm.has(e)||await kt()}async function Dr(){const e=await Promise.all([bt("work_start","09:00"),bt("work_end","18:00"),bt("grace_minutes","10"),bt("lunch_minutes","60"),bt("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 pm(){const e=await bt("last_project",""),t=await bt("last_category","dev");return{project_id:e?Number(e):null,category:t||"dev"}}async function hm(){return bt("last_location","")}async function vm(e,t){const n=t.trim();await Rt("last_location",n),n&&await oi(n);let s=!1;const o=await gn(e);o&&o.id?(o.location||"")!==n&&(await de.attendance.update(o.id,{location:n||null}),s=!0):n&&(await de.attendance.add({date:e,clock_in_at:null,clock_out_at:null,kind:"normal",note:null,location:n,created_at:_t()}),s=!0),s&&await kt()}async function hl(){const e=await bt("location_presets","");if(!e)return Ku.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 Ku.slice()}async function $f(e){const t=Array.from(new Set(e.map(n=>n.trim()).filter(Boolean)));await Rt("location_presets",JSON.stringify(t))}async function oi(e){const t=e.trim();if(!t)return;const n=await hl();n.includes(t)||await $f([...n,t])}async function Ns(e=!1){const t=await de.project.orderBy("name").toArray();return e?t:t.filter(n=>n.archived!==1)}async function mm(e){await de.project.add({name:e.trim(),archived:0,created_at:_t()}),await kt()}async function ym(e,t){await de.project.update(e,{name:t.trim()}),await kt()}async function gm(e,t){await de.project.update(e,{archived:t?1:0}),await kt()}async function gn(e){return de.attendance.where("date").equals(e).first()}async function Tf(e,t){const n=((t===void 0?await bt("last_location",""):t)||"").trim();let s=!1;const o=await gn(e);if(o&&o.id){if(!o.clock_in_at){const a={clock_in_at:_t()};n&&(a.location=n),await de.attendance.update(o.id,a),s=!0}n&&(await bt("last_location","")!==n&&await Rt("last_location",n),await oi(n)),s&&await kt();return}await de.attendance.add({date:e,clock_in_at:_t(),clock_out_at:null,kind:"normal",note:null,location:n||null,created_at:_t()}),n&&(await Rt("last_location",n),await oi(n)),await kt()}async function bm(e){const t=await gn(e);t&&t.id&&t.clock_in_at&&!t.clock_out_at&&(await de.attendance.update(t.id,{clock_out_at:_t()}),await kt())}async function wm(){const e=new Date,t=Vn(e);let n="";if(e.getHours()<4){const s=await gn(Fn(t,-1));s&&s.id&&s.clock_in_at&&!s.clock_out_at&&(await de.attendance.update(s.id,{clock_out_at:_t()}),n=s.date)}if(!n){const s=await gn(t);s&&s.id&&s.clock_in_at&&!s.clock_out_at&&(await de.attendance.update(s.id,{clock_out_at:_t()}),n=s.date)}if(!n)throw new Error("没有进行中的打卡");return await kt(),n}async function _m(e,t,n,s,o){(o||"").trim()&&await oi(o);const a=await gn(e),c={date:e,clock_in_at:t,clock_out_at:n,kind:"makeup",note:s||null,location:(o||"").trim()||null,created_at:_t()};a&&a.id?await de.attendance.update(a.id,c):await de.attendance.add(c),await kt()}async function km(e,t,n){const s=(n||"").trim();if(!s)return;const o=await gn(e);o&&o.id&&(await de.attendance.update(o.id,{[t]:e+"T"+s+":00"}),await kt())}async function ki(e,t){return de.attendance.where("date").between(e,t,!0,!0).toArray()}async function xm(e,t){const n=await gn(e);if(t){const s={date:e,kind:"leave",clock_in_at:null,clock_out_at:null,created_at:_t()};n&&n.id?await de.attendance.update(n.id,s):await de.attendance.add({...s,note:null,location:null})}else n&&n.id&&await de.attendance.update(n.id,{kind:"normal"});await kt()}async function Cm(e){const t=await de.work_log.where("date").equals(e).first();return t||{id:await de.work_log.add({date:e,created_at:_t()}),date:e,created_at:_t()}}async function Sm(e){return de.work_log.where("date").equals(e).first()}async function Em(e){const t=await Sm(e);return!t||!t.id?[]:(await de.log_item.where("work_log_id").equals(t.id).toArray()).sort((s,o)=>o.id-s.id)}async function $m(e,t){const n=await de.work_log.where("date").equals(e).first();let s;n&&n.id?s=n:s=await Cm(e),await de.table("log_item").add({work_log_id:s.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:_t()});const o=t.project_id?String(t.project_id):"";await bt("last_project","")!==o&&await Rt("last_project",o),await bt("last_category","")!==t.category&&await Rt("last_category",t.category),await kt()}async function va(e,t){await de.table("log_item").update(e,t),await kt()}async function Tm(e){await de.table("log_item").delete(e),await kt()}async function xi(e,t){const n=await de.work_log.where("date").between(e,t,!0,!0).toArray();if(!n.length)return[];const s=new Map(n.map(a=>[a.id,a.date]));return(await de.table("log_item").where("work_log_id").anyOf(n.map(a=>a.id)).toArray()).map(a=>({...a,date:s.get(a.work_log_id)||""})).sort((a,c)=>a.date===c.date?a.id-c.id:a.datet.updated_at[c.id,c.date]));return(await de.table("log_item").toArray()).filter(c=>((c.content||"")+" "+(c.takeaway||"")+" "+(c.remark||"")).toLowerCase().includes(n)).sort((c,d)=>d.id-c.id).slice(0,t).map(c=>({...c,date:o.get(c.work_log_id)||""}))}async function Lm(e,t=4){const n=e.trim().toLowerCase();return n?(await de.memo.toArray()).filter(o=>((o.title||"")+" "+(o.content||"")).toLowerCase().includes(n)).sort((o,a)=>o.updated_at{await Promise.all([de.project.clear(),de.work_log.clear(),s.clear(),de.attendance.clear(),de.weekly_note.clear(),de.setting.clear(),de.memo.clear(),de.credential.clear(),o.clear()]),n.project&&n.project.length&&await de.project.bulkAdd(n.project),n.work_log&&n.work_log.length&&await de.work_log.bulkAdd(n.work_log),n.log_item&&n.log_item.length&&await s.bulkAdd(n.log_item),n.attendance&&n.attendance.length&&await de.attendance.bulkAdd(n.attendance),n.weekly_note&&n.weekly_note.length&&await de.weekly_note.bulkAdd(n.weekly_note),n.setting&&n.setting.length&&await de.setting.bulkAdd(n.setting),n.memo&&n.memo.length&&await de.memo.bulkAdd(n.memo),n.credential&&n.credential.length&&await de.credential.bulkAdd(n.credential),n.transaction&&n.transaction.length&&await o.bulkAdd(n.transaction)}),await kt()}function Eo(e){const t=e.split(":");return Number(t[0])*60+Number(t[1])}function zs(e,t,n,s){if(e&&e.kind==="leave")return{status:"leave",label:"请假",makeup:!1,workedMinutes:null};if(kv(t))return{status:"rest",label:"休息日",makeup:!1,workedMinutes:null};if(!e||!e.clock_in_at)return s?{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:s?"进行中":"未完成",makeup:o,workedMinutes:null};const a=Eo(Bn(e.clock_in_at)),c=Eo(Bn(e.clock_out_at)),d=Eo(n.work_start),h=Eo(n.work_end);let y="normal";!o&&a>d+n.grace_minutes?y="late":!o&&c{Do.value=Do.value.filter(n=>n.id!==t)},2e3)}function Hm(){return Do}const Wm={class:"day-panel"},zm={class:"dp-head"},Gm={class:"dp-date"},Ym={class:"card sec"},Jm={class:"att-grid"},Xm={class:"att-cell"},Qm={key:0,class:"edit-row"},Zm={key:1,class:"att-val"},ey={class:"att-cell"},ty={key:0,class:"edit-row"},ny={key:1,class:"att-val"},ry={class:"att-cell"},sy=["list"],oy=["id"],iy=["value"],ay={class:"att-cell"},ly={class:"att-val status-val"},uy={key:0,class:"tag"},cy={key:1,class:"muted"},fy={key:0,class:"att-note muted"},dy={class:"att-actions"},py=["disabled"],hy=["disabled"],vy=["disabled"],my=["disabled"],yy={key:0,class:"card sec makeup"},gy={class:"form-grid"},by={class:"field"},wy={class:"field"},_y={class:"field span2"},ky=["list"],xy={class:"field span2"},Cy={key:0,class:"form-error"},Sy={class:"form-footer"},Ey={class:"card sec"},$y={class:"form-grid"},Ty={class:"field span2"},Ay={key:0,class:"form-error"},Py={class:"field"},Oy=["value"],My={class:"field"},Iy=["value"],jy={class:"field"},Dy={class:"field"},Ly={class:"field span2"},Ry={class:"form-footer"},Ky=["disabled"],Fy=["disabled"],Ny={class:"list-sec"},Vy={class:"sec-title"},By={key:0,class:"empty muted"},Uy={class:"item-main"},qy={class:"tag"},Hy=["onClick"],Wy={key:0,class:"muted item-meta"},zy={key:1,class:"muted num item-meta"},Gy=["onClick"],Yy=["onClick"],Jy=["onClick"],Xy=["onClick"],Qy={key:0,class:"item-sub"},Zy={key:0,class:"muted2"},eg={key:1,class:"muted"},tg={key:1,class:"dp-foot muted num"},ng=Ht({__name:"DayPanel",props:{date:{}},setup(e){const t=e,n=N(!0),s=N(null),o=N(void 0),a=N([]),c=N([]),d=N(""),h=N([]),y=ut(()=>"loc-list-"+t.date),m=ut(()=>t.date===Ct());async function _(){n.value=!0,s.value=await Dr(),o.value=await gn(t.date),a.value=await Em(t.date),c.value=await Ns(!0),h.value=await hl(),d.value=o.value&&o.value.location||await hm(),n.value=!1}yn(_),mt(()=>t.date,_),mt(Ws,()=>{_()});const C=ut(()=>c.value.filter(q=>q.archived!==1));function A(q){if(!q)return"";const H=c.value.find(Y=>Y.id===q);return H?H.name:"已删除项目"}const V=ut(()=>s.value?zs(o.value,t.date,s.value,m.value):null),Z=ut(()=>a.value.reduce((q,H)=>q+(H.minutes||0),0)),te=N(!1);async function ue(){te.value||(te.value=!0,await Tf(t.date,d.value),await _(),tr(),Ve("上班打卡成功"),te.value=!1)}async function P(){te.value||(te.value=!0,await bm(t.date),await _(),tr(),Ve("下班打卡成功"),te.value=!1)}async function R(){await vm(t.date,d.value),tr(),Ve("地点已更新")}const X=N(!1),fe=ut(()=>{var q;return((q=o.value)==null?void 0:q.kind)==="leave"});function ie(){if(o.value&&o.value.clock_in_at){X.value=!0;return}ee(!0)}async function ee(q){X.value=!1,await xm(t.date,q),await _(),tr(),Ve(q?"已标记为休假":"已取消休假")}const M=N(null),S=N(""),oe=N(null);mt(M,async q=>{var H;q&&(await rs(),(H=oe.value)==null||H.focus())});function be(q){var Y,Pe;const H=q==="in"?(Y=o.value)==null?void 0:Y.clock_in_at:(Pe=o.value)==null?void 0:Pe.clock_out_at;M.value=q,S.value=H?Bn(H):q==="in"?"09:00":"18:00"}function z(){M.value=null}async function xe(){const q=M.value;q&&(M.value=null,S.value&&(await km(t.date,q==="in"?"clock_in_at":"clock_out_at",S.value),await _(),tr(),Ve("打卡时间已修改")))}const Le=N(!1),rt=N("09:00"),He=N("18:00"),Ye=N(""),Ke=N(""),st=N("");function qe(){Ke.value=d.value,st.value="",Le.value=!Le.value}async function Qe(){if(!rt.value||!He.value){st.value="请填写上班与下班时间";return}await _m(t.date,t.date+"T"+rt.value+":00",t.date+"T"+He.value+":00",Ye.value.trim(),Ke.value),Le.value=!1,Ye.value="",st.value="",await _(),tr(),Ve("补卡已保存")}const Ce=N(""),J=N("");mt(Ce,()=>{J.value&&(J.value="")});const Q=N(null),ke=N("dev"),Fe=N(null),ct=N(""),It=N(""),$e=N(!1),ce=ut(()=>!!(Ce.value.trim()||Fe.value||ct.value.trim()||It.value.trim()));yn(async()=>{const q=await pm();Q.value=q.project_id,ke.value=q.category});function x(){Ce.value="",Fe.value=null,ct.value="",It.value="",J.value=""}async function k(){const q=Ce.value.trim();if(!q){J.value="请填写工作内容";return}$e.value||($e.value=!0,await $m(t.date,{content:q,project_id:Q.value,category:ke.value,minutes:Fe.value&&Fe.value>0?Fe.value:null,takeaway:ct.value.trim()||null,remark:It.value.trim()||null}),x(),await _(),Ve("记录已添加"),$e.value=!1)}const b=N(null);function W(q){b.value=q}async function re(q){const H=q.id,Y={content:q.content,project_id:q.project_id,category:q.category,minutes:q.minutes,takeaway:q.takeaway,remark:q.remark,is_milestone:q.is_milestone,needs_followup:q.needs_followup};await va(H,Y),b.value=null,await _(),Ve("修改已保存")}async function le(q){await va(q.id,{is_milestone:q.is_milestone?0:1}),await _()}async function ge(q){await va(q.id,{needs_followup:q.needs_followup?0:1}),await _()}const me=N(null);async function ae(){me.value&&me.value.id&&await Tm(me.value.id),me.value=null,await _(),Ve("记录已删除")}return(q,H)=>(O(),F("div",Wm,[u("div",zm,[u("div",Gm,ne(Kt(uf)(e.date)),1)]),u("div",Ym,[H[25]||(H[25]=u("div",{class:"sec-title"},"出勤信息",-1)),u("div",Jm,[u("div",Xm,[H[21]||(H[21]=u("label",null,"上班时间",-1)),M.value==="in"?(O(),F("div",Qm,[Ae(u("input",{ref_key:"timeInput",ref:oe,type:"time",class:"input time-input","onUpdate:modelValue":H[0]||(H[0]=Y=>S.value=Y),onKeydown:[Mt(xe,["enter"]),Mt(z,["esc"])]},null,544),[[De,S.value]]),u("button",{class:"btn btn-primary btn-sm",onClick:xe},"确认"),u("button",{class:"btn btn-sm",onClick:z},"取消")])):(O(),F("div",Zm,[u("span",{class:Ze(["num",{"val-empty":!(o.value&&o.value.clock_in_at)}])},ne(o.value&&o.value.clock_in_at?Kt(Bn)(o.value.clock_in_at):"未打卡"),3),o.value&&o.value.id?(O(),F("button",{key:0,class:"icon-btn",title:"修改上班时间",onClick:H[1]||(H[1]=Y=>be("in"))},[Te(et,{name:"edit",size:13})])):Ee("",!0)]))]),u("div",ey,[H[22]||(H[22]=u("label",null,"下班时间",-1)),M.value==="out"?(O(),F("div",ty,[Ae(u("input",{ref_key:"timeInput",ref:oe,type:"time",class:"input time-input","onUpdate:modelValue":H[2]||(H[2]=Y=>S.value=Y),onKeydown:[Mt(xe,["enter"]),Mt(z,["esc"])]},null,544),[[De,S.value]]),u("button",{class:"btn btn-primary btn-sm",onClick:xe},"确认"),u("button",{class:"btn btn-sm",onClick:z},"取消")])):(O(),F("div",ny,[u("span",{class:Ze(["num",{"val-empty":!(o.value&&o.value.clock_out_at)}])},ne(o.value&&o.value.clock_out_at?Kt(Bn)(o.value.clock_out_at):"未打卡"),3),o.value&&o.value.id?(O(),F("button",{key:0,class:"icon-btn",title:"修改下班时间",onClick:H[3]||(H[3]=Y=>be("out"))},[Te(et,{name:"edit",size:13})])):Ee("",!0)]))]),u("div",ry,[H[23]||(H[23]=u("label",null,"上班地点",-1)),Ae(u("input",{class:"input","onUpdate:modelValue":H[4]||(H[4]=Y=>d.value=Y),list:y.value,placeholder:"可直接输入",title:"上班地点,可自由输入",onChange:R},null,40,sy),[[De,d.value]]),u("datalist",{id:y.value},[(O(!0),F(je,null,it(h.value,Y=>(O(),F("option",{key:Y,value:Y},null,8,iy))),128))],8,oy)]),u("div",ay,[H[24]||(H[24]=u("label",null,"考勤状态",-1)),u("div",ly,[V.value?(O(),F(je,{key:0},[u("span",{class:Ze(["dot",V.value.status])},null,2),u("span",null,ne(V.value.label),1),o.value&&o.value.kind==="makeup"?(O(),F("span",uy,"补卡")):Ee("",!0)],64)):(O(),F("span",cy,"--"))])])]),o.value&&o.value.note?(O(),F("div",fy,"补卡说明:"+ne(o.value.note),1)):Ee("",!0),u("div",dy,[m.value&&(!o.value||!o.value.clock_in_at)?(O(),F("button",{key:0,class:"btn btn-primary btn-sm",disabled:te.value,onClick:ue},"上班打卡",8,py)):m.value&&o.value&&o.value.clock_in_at&&!o.value.clock_out_at?(O(),F("button",{key:1,class:"btn btn-primary btn-sm",disabled:te.value,onClick:P},"下班打卡",8,hy)):Ee("",!0),!m.value&&(!o.value||!o.value.clock_in_at)?(O(),F("button",{key:2,class:"btn btn-sm",onClick:qe},"补卡")):Ee("",!0),fe.value?(O(),F("button",{key:4,class:"btn btn-sm",disabled:te.value,onClick:H[5]||(H[5]=Y=>ee(!1))},"取消休假",8,my)):(O(),F("button",{key:3,class:"btn btn-sm",disabled:te.value,onClick:ie},"标记休假",8,vy))])]),Le.value?(O(),F("div",yy,[H[30]||(H[30]=u("div",{class:"sec-title"},"补卡登记",-1)),u("div",gy,[u("div",by,[H[26]||(H[26]=u("label",null,"上班时间",-1)),Ae(u("input",{type:"time",class:"input","onUpdate:modelValue":H[6]||(H[6]=Y=>rt.value=Y)},null,512),[[De,rt.value]])]),u("div",wy,[H[27]||(H[27]=u("label",null,"下班时间",-1)),Ae(u("input",{type:"time",class:"input","onUpdate:modelValue":H[7]||(H[7]=Y=>He.value=Y)},null,512),[[De,He.value]])]),u("div",_y,[H[28]||(H[28]=u("label",null,"上班地点",-1)),Ae(u("input",{class:"input",list:y.value,"onUpdate:modelValue":H[8]||(H[8]=Y=>Ke.value=Y),placeholder:"可直接输入"},null,8,ky),[[De,Ke.value]])]),u("div",xy,[H[29]||(H[29]=u("label",null,"补卡原因",-1)),Ae(u("input",{class:"input","onUpdate:modelValue":H[9]||(H[9]=Y=>Ye.value=Y),placeholder:"如:外出拜访客户忘记打卡"},null,512),[[De,Ye.value]])])]),st.value?(O(),F("div",Cy,ne(st.value),1)):Ee("",!0),u("div",Sy,[u("button",{class:"btn btn-sm",onClick:H[10]||(H[10]=Y=>Le.value=!1)},"取消"),u("button",{class:"btn btn-primary btn-sm",onClick:Qe},"保存补卡")])])):Ee("",!0),u("div",Ey,[H[38]||(H[38]=u("div",{class:"sec-head"},[u("span",{class:"sec-title"},"新增工作记录"),u("span",{class:"muted form-hint"},"内容必填,其余选填")],-1)),u("div",$y,[u("div",Ty,[H[31]||(H[31]=u("label",null,"工作内容(必填)",-1)),Ae(u("input",{class:Ze(["input",{invalid:J.value}]),"onUpdate:modelValue":H[11]||(H[11]=Y=>Ce.value=Y),placeholder:"做了什么,一句话一条",onKeydown:Mt(k,["enter"])},null,34),[[De,Ce.value]]),J.value?(O(),F("div",Ay,ne(J.value),1)):Ee("",!0)]),u("div",Py,[H[33]||(H[33]=u("label",null,"所属项目",-1)),Ae(u("select",{class:"select","onUpdate:modelValue":H[12]||(H[12]=Y=>Q.value=Y)},[H[32]||(H[32]=u("option",{value:null},"无项目",-1)),(O(!0),F(je,null,it(C.value,Y=>(O(),F("option",{key:Y.id,value:Y.id},ne(Y.name),9,Oy))),128))],512),[[Nn,Q.value]])]),u("div",My,[H[34]||(H[34]=u("label",null,"工作分类",-1)),Ae(u("select",{class:"select","onUpdate:modelValue":H[13]||(H[13]=Y=>ke.value=Y)},[(O(!0),F(je,null,it(Kt(Hs),Y=>(O(),F("option",{key:Y.key,value:Y.key},ne(Y.label),9,Iy))),128))],512),[[Nn,ke.value]])]),u("div",jy,[H[35]||(H[35]=u("label",null,"耗时(分钟)",-1)),Ae(u("input",{class:"input",type:"number",min:"0","onUpdate:modelValue":H[14]||(H[14]=Y=>Fe.value=Y),placeholder:"选填"},null,512),[[De,Fe.value,void 0,{number:!0}]])]),u("div",Dy,[H[36]||(H[36]=u("label",null,"主要收获",-1)),Ae(u("input",{class:"input","onUpdate:modelValue":H[15]||(H[15]=Y=>ct.value=Y),placeholder:"一句话:学到了什么"},null,512),[[De,ct.value]])]),u("div",Ly,[H[37]||(H[37]=u("label",null,"备注",-1)),Ae(u("textarea",{class:"textarea","onUpdate:modelValue":H[16]||(H[16]=Y=>It.value=Y),placeholder:"背景、链接、未决事项(选填)"},null,512),[[De,It.value]])])]),u("div",Ry,[u("button",{class:"btn btn-sm",disabled:!ce.value,onClick:x},"重置",8,Ky),u("button",{class:"btn btn-primary btn-sm",disabled:$e.value,onClick:k},"添加记录",8,Fy)])]),u("div",Ny,[u("div",Vy,"工作记录("+ne(a.value.length)+")",1),!a.value.length&&!n.value?(O(),F("div",By,"暂无记录")):Ee("",!0),(O(!0),F(je,null,it(a.value,Y=>(O(),F("div",{key:Y.id,class:"item"},[u("div",Uy,[u("span",qy,ne(Kt(Xo)(Y.category)),1),u("span",{class:"item-content",title:"点击编辑",onClick:Pe=>W(Y)},ne(Y.content),9,Hy),Y.project_id?(O(),F("span",Wy,ne(A(Y.project_id)),1)):Ee("",!0),Y.minutes?(O(),F("span",zy,ne(Y.minutes)+" 分钟",1)):Ee("",!0),H[39]||(H[39]=u("span",{class:"flex1"},null,-1)),u("button",{class:"icon-btn",title:"编辑完整信息",onClick:Pe=>W(Y)},[Te(et,{name:"edit",size:14})],8,Gy),u("button",{class:Ze(["icon-btn",{active:Y.is_milestone===1}]),title:"成果标记",onClick:Pe=>le(Y)},[Te(et,{name:"star",size:14})],10,Yy),u("button",{class:Ze(["icon-btn",{"active-warn":Y.needs_followup===1}]),title:"待跟进",onClick:Pe=>ge(Y)},[Te(et,{name:"flag",size:14})],10,Jy),u("button",{class:"icon-btn",title:"删除",onClick:Pe=>me.value=Y},[Te(et,{name:"close",size:14})],8,Xy)]),Y.takeaway||Y.remark?(O(),F("div",Qy,[Y.takeaway?(O(),F("div",Zy,"收获:"+ne(Y.takeaway),1)):Ee("",!0),Y.remark?(O(),F("div",eg,"备注:"+ne(Y.remark),1)):Ee("",!0)])):Ee("",!0)]))),128)),a.value.length?(O(),F("div",tg,[rn(" 共 "+ne(a.value.length)+" 条事项 ",1),Z.value?(O(),F(je,{key:0},[rn(" · "+ne((Z.value/60).toFixed(1))+" 小时",1)],64)):Ee("",!0)])):Ee("",!0)]),Te(ur,{open:!!me.value,title:"删除确认",message:me.value?"将删除工作记录「"+me.value.content+"」。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:H[17]||(H[17]=Y=>me.value=null),onConfirm:ae},null,8,["open","message"]),Te(ur,{open:X.value,title:"标记休假确认",message:"该日已有打卡记录,标记休假将清空上下班时间。是否继续?","confirm-text":"标记休假",danger:"",onCancel:H[18]||(H[18]=Y=>X.value=!1),onConfirm:H[19]||(H[19]=Y=>ee(!0))},null,8,["open"]),Te(_v,{open:!!b.value,item:b.value,projects:c.value,date:e.date,onCancel:H[20]||(H[20]=Y=>b.value=null),onSave:re},null,8,["open","item","projects","date"])]))}}),Af=Qt(ng,[["__scopeId","data-v-2e90c9d8"]]),rg={class:"cal-page"},sg={class:"cal-toolbar"},og={class:"cal-title num"},ig={class:"cal-head"},ag={class:"cal-grid"},lg=["title","onClick"],ug={class:"cal-marks"},cg={key:0,class:"drawer"},fg={class:"drawer-head"},dg={class:"drawer-body"},pg=Ht({__name:"CalendarView",setup(e){const t=N(Ct()),n=ut(()=>Number(t.value.slice(0,4))),s=ut(()=>Number(t.value.slice(5,7))-1),o=ut(()=>n.value+" 年 "+(s.value+1)+" 月"),a=["一","二","三","四","五","六","日"],c=ut(()=>{const X=(new Date(n.value,s.value,1).getDay()+6)%7,fe=new Date(n.value,s.value+1,0).getDate(),ie=[];for(let ee=0;ee[be.date,be])),M=fe[2],S=new Map;for(const be of c.value){if(!be.inMonth)continue;const z=zs(ee.get(be.date),be.date,ie,be.date===h),xe=M.filter(Le=>Le.date===be.date);S.set(be.date,{status:z.status,label:z.label,location:((oe=ee.get(be.date))==null?void 0:oe.location)||"",hasLog:xe.length>0,hasMilestone:xe.some(Le=>Le.is_milestone===1)})}d.value=S}mt([n,s],y,{immediate:!0}),mt(Ws,()=>{y()});function m(R){var X;return((X=d.value.get(R))==null?void 0:X.status)??""}function _(R){const X=d.value.get(R);return X?R+" · "+X.label+(X.location?" · "+X.location:""):R}function C(R){var X;return!!((X=d.value.get(R))!=null&&X.hasLog)}function A(R){var X;return!!((X=d.value.get(R))!=null&&X.hasMilestone)}function V(){t.value=Qo(t.value,-1)}function Z(){t.value=Qo(t.value,1)}function te(){t.value=Ct()}const ue=N(null);function P(R,X){X&&(ue.value=R)}return mt(Ka,R=>{R&&(t.value=R,ue.value=R,Ka.value=null)},{immediate:!0}),(R,X)=>(O(),F("div",rg,[u("div",sg,[u("button",{class:"icon-btn",onClick:V},[Te(et,{name:"chevron-left",size:16})]),u("span",og,ne(o.value),1),u("button",{class:"icon-btn",onClick:Z},[Te(et,{name:"chevron-right",size:16})]),u("button",{class:"btn btn-sm",onClick:te},"回到今天")]),u("div",ig,[(O(),F(je,null,it(a,fe=>u("span",{key:fe,class:"cal-week muted"},ne(fe),1)),64))]),u("div",ag,[(O(!0),F(je,null,it(c.value,(fe,ie)=>(O(),F("button",{key:ie,class:Ze(["cal-cell",{blank:!fe.inMonth,weekend:fe.weekend,selected:ue.value===fe.date}]),title:fe.inMonth?_(fe.date):void 0,onClick:ee=>P(fe.date,fe.inMonth)},[fe.inMonth?(O(),F(je,{key:0},[u("span",{class:Ze(["daynum num",{today:fe.date===Kt(h)}])},ne(Number(fe.date.slice(8,10))),3),u("span",ug,[m(fe.date)?(O(),F("span",{key:0,class:Ze(["dot",m(fe.date)])},null,2)):Ee("",!0),C(fe.date)?(O(),Lt(et,{key:1,name:"check-circle",size:12,class:"mark-log"})):Ee("",!0),A(fe.date)?(O(),Lt(et,{key:2,name:"star",size:12,class:"mark-star"})):Ee("",!0)])],64)):Ee("",!0)],10,lg))),128))]),Te(ss,{name:"drawer"},{default:fr(()=>[ue.value?(O(),F("aside",cg,[u("div",fg,[X[1]||(X[1]=u("span",{class:"drawer-title"},"当日详情",-1)),u("button",{class:"icon-btn",onClick:X[0]||(X[0]=fe=>ue.value=null)},[Te(et,{name:"close",size:16})])]),u("div",dg,[Te(Af,{date:ue.value},null,8,["date"])])])):Ee("",!0)]),_:1})]))}}),hg=Qt(pg,[["__scopeId","data-v-2404dfbe"]]),vg={class:"detail-page"},mg={class:"detail-toolbar"},yg=["value"],gg=["disabled"],bg=Ht({__name:"TodayView",setup(e){const t=N(Ct()),n=ut(()=>t.value===Ct());function s(){t.value=Fn(t.value,-1)}function o(){t.value=Fn(t.value,1)}function a(){t.value=Ct()}function c(d){const h=d.target.value;h&&(t.value=h)}return(d,h)=>(O(),F("div",vg,[u("div",mg,[u("button",{class:"icon-btn",title:"前一天",onClick:s},[Te(et,{name:"chevron-left",size:16})]),u("span",{class:Ze(["date-title num",{"is-today":n.value}])},ne(Kt(uf)(t.value)),3),u("button",{class:"icon-btn",title:"后一天",onClick:o},[Te(et,{name:"chevron-right",size:16})]),u("input",{type:"date",class:"input w-date",value:t.value,onChange:c},null,40,yg),u("button",{class:"btn btn-sm",disabled:n.value,onClick:a},"回到今天",8,gg)]),Te(Af,{date:t.value},null,8,["date"])]))}}),wg=Qt(bg,[["__scopeId","data-v-76243d98"]]),_g={class:"stats"},kg={class:"cards"},xg={class:"card stat-card"},Cg={class:"stat-num num"},Sg={class:"card stat-card"},Eg={class:"stat-num num"},$g={class:"card stat-card"},Tg={class:"stat-num num"},Ag={class:"card stat-card"},Pg={class:"stat-num num"},Og={class:"card section"},Mg={class:"heat"},Ig=["title"],jg={class:"two-col"},Dg={class:"card section"},Lg={class:"bar-label"},Rg={class:"bar-track"},Kg={class:"muted num bar-num"},Fg={key:0,class:"muted"},Ng={class:"card section"},Vg={class:"bar-label"},Bg={class:"bar-track"},Ug={class:"muted num bar-num"},qg={key:0,class:"muted"},Hg={class:"card section"},Wg={class:"bar-label loc-label"},zg={class:"bar-track"},Gg={class:"muted num bar-num"},Yg={key:0,class:"muted"},Jg=Ht({__name:"StatsView",setup(e){const t=N({attendDays:0,totalHours:"0",itemCount:0,streak:0}),n=N([]),s=N([]),o=N([]),a=N([]);async function c(){const y=Ct(),m="2000-01-01",_=await Promise.all([Dr(),ki(m,y),xi(m,y),Ns(!0)]),C=_[0],A=_[1],V=_[2],Z=_[3],te=A.filter(z=>z.clock_in_at||z.kind==="makeup");let ue=0;for(const z of te){const xe=zs(z,z.date,C,z.date===y);ue+=xe.workedMinutes??0}const P=new Set(V.map(z=>z.date));let R=0,X=y;for(P.has(X)||(X=Fn(y,-1));P.has(X);)R++,X=Fn(X,-1);t.value={attendDays:te.length,totalHours:(ue/60).toFixed(1),itemCount:V.length,streak:R};const fe=new Map;for(const z of te){const xe=z.location||"未记录";fe.set(xe,(fe.get(xe)||0)+1)}a.value=Array.from(fe.entries()).map(z=>({name:z[0],count:z[1],percent:Math.round(z[1]/(te.length||1)*100)})).sort((z,xe)=>xe.count-z.count);const ie=V.length||1;s.value=Hs.map(z=>{const xe=V.filter(Le=>Le.category===z.key).length;return{key:z.key,label:z.label,count:xe,percent:Math.round(xe/ie*100)}}).filter(z=>z.count>0).sort((z,xe)=>xe.count-z.count);const ee=new Map(Z.map(z=>[z.id,z.name])),M=new Map;for(const z of V){const xe=z.project_id?ee.get(z.project_id)||"已删除项目":"无项目";M.set(xe,(M.get(xe)||0)+1)}o.value=Array.from(M.entries()).map(z=>({name:z[0],count:z[1],percent:Math.round(z[1]/ie*100)})).sort((z,xe)=>xe.count-z.count);const S=new Map;for(const z of V)S.set(z.date,(S.get(z.date)||0)+1);const oe=Ts(y),be=[];for(let z=11;z>=0;z--){const xe=Fn(oe,-7*z),Le=[];for(let rt=0;rt<7;rt++){const He=Fn(xe,rt);Le.push({date:He,count:S.get(He)||0})}be.push(Le)}n.value=be}yn(async()=>{await c()}),mt(Ws,()=>{c()});function d(y){return y===0?0:y===1?1:y<=3?2:y<=5?3:4}function h(y,m){return y+" · "+(m?m+" 条":"无记录")}return(y,m)=>(O(),F("div",_g,[u("div",kg,[u("div",xg,[m[0]||(m[0]=u("div",{class:"muted"},"出勤天数",-1)),u("div",Cg,ne(t.value.attendDays),1)]),u("div",Sg,[m[1]||(m[1]=u("div",{class:"muted"},"累计工时(小时)",-1)),u("div",Eg,ne(t.value.totalHours),1)]),u("div",$g,[m[2]||(m[2]=u("div",{class:"muted"},"记录条数",-1)),u("div",Tg,ne(t.value.itemCount),1)]),u("div",Ag,[m[3]||(m[3]=u("div",{class:"muted"},"连续记录(天)",-1)),u("div",Pg,ne(t.value.streak),1)])]),u("div",Og,[m[4]||(m[4]=u("div",{class:"section-title"},"记录热力图(近 12 周)",-1)),u("div",Mg,[(O(!0),F(je,null,it(n.value,(_,C)=>(O(),F("div",{key:C,class:"heat-col"},[(O(!0),F(je,null,it(_,A=>(O(),F("span",{key:A.date,class:Ze(["heat-cell","lv"+d(A.count)]),title:h(A.date,A.count)},null,10,Ig))),128))]))),128))]),m[5]||(m[5]=Up('
少多
',1))]),u("div",jg,[u("div",Dg,[m[6]||(m[6]=u("div",{class:"section-title"},"分类分布",-1)),(O(!0),F(je,null,it(s.value,_=>(O(),F("div",{key:_.key,class:"bar-row"},[u("span",Lg,ne(_.label),1),u("span",Rg,[u("span",{class:"bar-fill",style:rr({width:_.percent+"%"})},null,4)]),u("span",Kg,ne(_.count)+" 条 · "+ne(_.percent)+"%",1)]))),128)),s.value.length?Ee("",!0):(O(),F("div",Fg,"暂无数据"))]),u("div",Ng,[m[7]||(m[7]=u("div",{class:"section-title"},"项目投入",-1)),(O(!0),F(je,null,it(o.value,_=>(O(),F("div",{key:_.name,class:"bar-row"},[u("span",Vg,ne(_.name),1),u("span",Bg,[u("span",{class:"bar-fill",style:rr({width:_.percent+"%"})},null,4)]),u("span",Ug,ne(_.count)+" 条 · "+ne(_.percent)+"%",1)]))),128)),o.value.length?Ee("",!0):(O(),F("div",qg,"暂无数据"))])]),u("div",Hg,[m[8]||(m[8]=u("div",{class:"section-title"},"地点分布(按出勤天)",-1)),(O(!0),F(je,null,it(a.value,_=>(O(),F("div",{key:_.name,class:"bar-row"},[u("span",Wg,ne(_.name),1),u("span",zg,[u("span",{class:"bar-fill",style:rr({width:_.percent+"%"})},null,4)]),u("span",Gg,ne(_.count)+" 天 · "+ne(_.percent)+"%",1)]))),128)),a.value.length?Ee("",!0):(O(),F("div",Yg,"暂无数据"))])]))}}),Xg=Qt(Jg,[["__scopeId","data-v-73e5ba49"]]);async function Qg(e,t,n){const s=Ct(),o=await Promise.all([Dr(),ki(e,t),xi(e,t),Ns(!0),Pm(e,t)]),a=o[0],c=o[1],d=o[2],h=o[3],y=o[4];let m=0,_=0,C=0;for(const M of c){(M.clock_in_at||M.kind==="makeup")&&m++,M.kind==="makeup"&&C++;const S=zs(M,M.date,a,M.date===s);_+=S.workedMinutes??0}const A=new Map;for(const M of c){if(!(M.clock_in_at||M.kind==="makeup"))continue;const S=M.location||"未记录";A.set(S,(A.get(S)||0)+1)}const V=Array.from(A.entries()).map(M=>({name:M[0],count:M[1]})).sort((M,S)=>S.count-M.count),Z=d.length||1,te=Hs.map(M=>{const S=d.filter(oe=>oe.category===M.key).length;return{key:M.key,label:M.label,count:S,percent:Math.round(S/Z*100)}}).filter(M=>M.count>0).sort((M,S)=>S.count-M.count),ue=new Map(h.map(M=>[M.id,M.name])),P=new Map;for(const M of d){const S=M.project_id?ue.get(M.project_id)||"已删除项目":"无项目";P.set(S,(P.get(S)||0)+1)}const R=Array.from(P.entries()).map(M=>({name:M[0],count:M[1]})).sort((M,S)=>S.count-M.count),X=d.filter(M=>M.is_milestone===1).map(M=>({date:M.date,content:M.content})),fe=d.filter(M=>M.needs_followup===1).map(M=>({date:M.date,content:M.content,remark:M.remark||""})),ie=d.filter(M=>!!M.takeaway).map(M=>({date:M.date,text:M.takeaway})),ee=y.map(M=>({weekStart:M.week_start,highlights:M.highlights||"",challenges:M.challenges||"",plan_next:M.plan_next||""}));return{range:{start:e,end:t,label:n},attendDays:m,totalHours:(_/60).toFixed(1),makeupCount:C,leaveCount:c.filter(M=>M.kind==="leave").length,itemCount:d.length,categoryStats:te,projectStats:R,locationStats:V,milestones:X,followups:fe,takeaways:ie,weekNotes:ee}}function Zg(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(s=>s.name!=="未记录");n.length&&t.push("其中:"+n.map(s=>s.name+" "+s.count+" 天").join(",")),t.push(""),t.push("## 二、工作内容分布"),t.push(""),t.push(e.categoryStats.length?e.categoryStats.map(s=>s.label+" "+s.percent+"%("+s.count+" 条)").join(","):"(无记录)"),t.push(""),t.push("## 三、项目投入"),t.push(""),t.push(e.projectStats.length?e.projectStats.map(s=>s.name+" "+s.count+" 条").join(","):"(无记录)"),t.push(""),t.push("## 四、主要成果"),t.push(""),e.milestones.length?e.milestones.forEach((s,o)=>t.push(o+1+". 【成果】"+s.content+"("+s.date+")")):t.push("(无)"),t.push(""),t.push("## 五、待跟进事项"),t.push(""),e.followups.length?e.followups.forEach(s=>t.push("- 【待跟进】"+s.content+(s.remark?"("+s.date+" 备注:"+s.remark+")":"("+s.date+")"))):t.push("(无)"),t.push(""),t.push("## 六、学习与成长"),t.push(""),e.takeaways.length?e.takeaways.forEach(s=>t.push("- "+s.text+"("+s.date+")")):t.push("(无)");for(const s of e.weekNotes)t.push(""),t.push("### 周记("+s.weekStart+" 起)"),t.push(""),t.push("- 本周亮点:"+(s.highlights||"(无)")),t.push("- 踩的坑:"+(s.challenges||"(无)")),t.push("- 下周计划:"+(s.plan_next||"(无)"));return t.push(""),t.join(` -`)}const eb="modulepreload",tb=function(e,t){return new URL(e,t).href},Fu={},Pf=function(t,n,s){let o=Promise.resolve();if(n&&n.length>0){const c=document.getElementsByTagName("link"),d=document.querySelector("meta[property=csp-nonce]"),h=(d==null?void 0:d.nonce)||(d==null?void 0:d.getAttribute("nonce"));o=Promise.allSettled(n.map(y=>{if(y=tb(y,s),y in Fu)return;Fu[y]=!0;const m=y.endsWith(".css"),_=m?'[rel="stylesheet"]':"";if(!!s)for(let V=c.length-1;V>=0;V--){const Z=c[V];if(Z.href===y&&(!m||Z.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${y}"]${_}`))return;const A=document.createElement("link");if(A.rel=m?"stylesheet":eb,m||(A.as="script"),A.crossOrigin="",A.href=y,h&&A.setAttribute("nonce",h),document.head.appendChild(A),m)return new Promise((V,Z)=>{A.addEventListener("load",V),A.addEventListener("error",()=>Z(new Error(`Unable to preload CSS for ${y}`)))})}))}function a(c){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=c,window.dispatchEvent(d),!d.defaultPrevented)throw c}return o.then(c=>{for(const d of c||[])d.status==="rejected"&&a(d.reason);return t().catch(a)})};/*! Capacitor: https://capacitorjs.com/ - MIT License */const nb=e=>{const t=new Map;t.set("web",{name:"web"});const n=e.CapacitorPlatforms||{currentPlatform:{name:"web"},platforms:t},s=(a,c)=>{n.platforms.set(a,c)},o=a=>{n.platforms.has(a)&&(n.currentPlatform=n.platforms.get(a))};return n.addPlatform=s,n.setPlatform=o,n},rb=e=>e.CapacitorPlatforms=nb(e),Of=rb(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});Of.addPlatform;Of.setPlatform;var ts;(function(e){e.Unimplemented="UNIMPLEMENTED",e.Unavailable="UNAVAILABLE"})(ts||(ts={}));class ma extends Error{constructor(t,n,s){super(t),this.message=t,this.code=n,this.data=s}}const sb=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"},ob=e=>{var t,n,s,o,a;const c=e.CapacitorCustomPlatform||null,d=e.Capacitor||{},h=d.Plugins=d.Plugins||{},y=e.CapacitorPlatforms,m=()=>c!==null?c.name:sb(e),_=((t=y==null?void 0:y.currentPlatform)===null||t===void 0?void 0:t.getPlatform)||m,C=()=>_()!=="web",A=((n=y==null?void 0:y.currentPlatform)===null||n===void 0?void 0:n.isNativePlatform)||C,V=ee=>{const M=X.get(ee);return!!(M!=null&&M.platforms.has(_())||ue(ee))},Z=((s=y==null?void 0:y.currentPlatform)===null||s===void 0?void 0:s.isPluginAvailable)||V,te=ee=>{var M;return(M=d.PluginHeaders)===null||M===void 0?void 0:M.find(S=>S.name===ee)},ue=((o=y==null?void 0:y.currentPlatform)===null||o===void 0?void 0:o.getPluginHeader)||te,P=ee=>e.console.error(ee),R=(ee,M,S)=>Promise.reject(`${S} does not have an implementation of "${M}".`),X=new Map,fe=(ee,M={})=>{const S=X.get(ee);if(S)return console.warn(`Capacitor plugin "${ee}" already registered. Cannot register plugins twice.`),S.proxy;const oe=_(),be=ue(ee);let z;const xe=async()=>(!z&&oe in M?z=typeof M[oe]=="function"?z=await M[oe]():z=M[oe]:c!==null&&!z&&"web"in M&&(z=typeof M.web=="function"?z=await M.web():z=M.web),z),Le=(qe,Qe)=>{var Ce,J;if(be){const Q=be==null?void 0:be.methods.find(ke=>Qe===ke.name);if(Q)return Q.rtype==="promise"?ke=>d.nativePromise(ee,Qe.toString(),ke):(ke,Fe)=>d.nativeCallback(ee,Qe.toString(),ke,Fe);if(qe)return(Ce=qe[Qe])===null||Ce===void 0?void 0:Ce.bind(qe)}else{if(qe)return(J=qe[Qe])===null||J===void 0?void 0:J.bind(qe);throw new ma(`"${ee}" plugin is not implemented on ${oe}`,ts.Unimplemented)}},rt=qe=>{let Qe;const Ce=(...J)=>{const Q=xe().then(ke=>{const Fe=Le(ke,qe);if(Fe){const ct=Fe(...J);return Qe=ct==null?void 0:ct.remove,ct}else throw new ma(`"${ee}.${qe}()" is not implemented on ${oe}`,ts.Unimplemented)});return qe==="addListener"&&(Q.remove=async()=>Qe()),Q};return Ce.toString=()=>`${qe.toString()}() { [capacitor code] }`,Object.defineProperty(Ce,"name",{value:qe,writable:!1,configurable:!1}),Ce},He=rt("addListener"),Ye=rt("removeListener"),Ke=(qe,Qe)=>{const Ce=He({eventName:qe},Qe),J=async()=>{const ke=await Ce;Ye({eventName:qe,callbackId:ke},Qe)},Q=new Promise(ke=>Ce.then(()=>ke({remove:J})));return Q.remove=async()=>{console.warn("Using addListener() without 'await' is deprecated."),await J()},Q},st=new Proxy({},{get(qe,Qe){switch(Qe){case"$$typeof":return;case"toJSON":return()=>({});case"addListener":return be?Ke:He;case"removeListener":return Ye;default:return rt(Qe)}}});return h[ee]=st,X.set(ee,{name:ee,proxy:st,platforms:new Set([...Object.keys(M),...be?[oe]:[]])}),st},ie=((a=y==null?void 0:y.currentPlatform)===null||a===void 0?void 0:a.registerPlugin)||fe;return d.convertFileSrc||(d.convertFileSrc=ee=>ee),d.getPlatform=_,d.handleError=P,d.isNativePlatform=A,d.isPluginAvailable=Z,d.pluginMethodNoop=R,d.registerPlugin=ie,d.Exception=ma,d.DEBUG=!!d.DEBUG,d.isLoggingEnabled=!!d.isLoggingEnabled,d.platform=d.getPlatform(),d.isNative=d.isNativePlatform(),d},ib=e=>e.Capacitor=ob(e),ns=ib(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),Mf=ns.registerPlugin;ns.Plugins;class If{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 s=!1;this.listeners[t]||(this.listeners[t]=[],s=!0),this.listeners[t].push(n);const a=this.windowListeners[t];a&&!a.registered&&this.addWindowListener(a),s&&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,s){const o=this.listeners[t];if(!o){if(s){let a=this.retainedEventArguments[t];a||(a=[]),a.push(n),this.retainedEventArguments[t]=a}return}o.forEach(a=>a(n))}hasListeners(t){return!!this.listeners[t].length}registerWindowListener(t,n){this.windowListeners[n]={registered:!1,windowEventName:t,pluginEventName:n,handler:s=>{this.notifyListeners(n,s)}}}unimplemented(t="not implemented"){return new ns.Exception(t,ts.Unimplemented)}unavailable(t="not available"){return new ns.Exception(t,ts.Unavailable)}async removeListener(t,n){const s=this.listeners[t];if(!s)return;const o=s.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(s=>{this.notifyListeners(t,s)}))}}const Nu=e=>encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),Vu=e=>e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent);class ab extends If{async getCookies(){const t=document.cookie,n={};return t.split(";").forEach(s=>{if(s.length<=0)return;let[o,a]=s.replace(/=/,"CAP_COOKIE").split("CAP_COOKIE");o=Vu(o).trim(),a=Vu(a).trim(),n[o]=a}),n}async setCookie(t){try{const n=Nu(t.key),s=Nu(t.value),o=`; expires=${(t.expires||"").replace("expires=","")}`,a=(t.path||"/").replace("path=",""),c=t.url!=null&&t.url.length>0?`domain=${t.url}`:"";document.cookie=`${n}=${s||""}${o}; path=${a}; ${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)}}}Mf("CapacitorCookies",{web:()=>new ab});const lb=async e=>new Promise((t,n)=>{const s=new FileReader;s.onload=()=>{const o=s.result;t(o.indexOf(",")>=0?o.split(",")[1]:o)},s.onerror=o=>n(o),s.readAsDataURL(e)}),ub=(e={})=>{const t=Object.keys(e);return Object.keys(e).map(o=>o.toLocaleLowerCase()).reduce((o,a,c)=>(o[a]=e[t[c]],o),{})},cb=(e,t=!0)=>e?Object.entries(e).reduce((s,o)=>{const[a,c]=o;let d,h;return Array.isArray(c)?(h="",c.forEach(y=>{d=t?encodeURIComponent(y):y,h+=`${a}=${d}&`}),h.slice(0,-1)):(d=t?encodeURIComponent(c):c,h=`${a}=${d}`),`${s}&${h}`},"").substr(1):null,fb=(e,t={})=>{const n=Object.assign({method:e.method||"GET",headers:e.headers},t),o=ub(e.headers)["content-type"]||"";if(typeof e.data=="string")n.body=e.data;else if(o.includes("application/x-www-form-urlencoded")){const a=new URLSearchParams;for(const[c,d]of Object.entries(e.data||{}))a.set(c,d);n.body=a.toString()}else if(o.includes("multipart/form-data")||e.data instanceof FormData){const a=new FormData;if(e.data instanceof FormData)e.data.forEach((d,h)=>{a.append(h,d)});else for(const d of Object.keys(e.data))a.append(d,e.data[d]);n.body=a;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 db extends If{async request(t){const n=fb(t,t.webFetchExtra),s=cb(t.params,t.shouldEncodeUrlParams),o=s?`${t.url}?${s}`:t.url,a=await fetch(o,n),c=a.headers.get("content-type")||"";let{responseType:d="text"}=a.ok?t:{};c.includes("application/json")&&(d="json");let h,y;switch(d){case"arraybuffer":case"blob":y=await a.blob(),h=await lb(y);break;case"json":h=await a.json();break;case"document":case"text":default:h=await a.text()}const m={};return a.headers.forEach((_,C)=>{m[C]=_}),{data:h,headers:m,status:a.status,url:a.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"}))}}Mf("CapacitorHttp",{web:()=>new db});async function ml(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(ns.isNativePlatform()){const{Filesystem:c,Directory:d,Encoding:h}=await Pf(async()=>{const{Filesystem:y,Directory:m,Encoding:_}=await import("./index-DPm5Ta-6.js");return{Filesystem:y,Directory:m,Encoding:_}},[],import.meta.url);try{return(await c.writeFile({path:e,data:t,directory:d.Documents,encoding:h.UTF8,recursive:!0})).uri}catch{return(await c.writeFile({path:e,data:t,directory:d.Cache,encoding:h.UTF8,recursive:!0})).uri}}const s=new Blob([t],{type:"text/plain;charset=utf-8"}),o=URL.createObjectURL(s),a=document.createElement("a");return a.href=o,a.download=e,a.click(),window.setTimeout(()=>URL.revokeObjectURL(o),1e4),""}const pb=Object.freeze(Object.defineProperty({__proto__:null,downloadText:ml},Symbol.toStringTag,{value:"Module"}));async function qa(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 hb(e){const t=await Promise.all([bt("ai_base_url",""),bt("ai_api_key",""),bt("ai_model","")]),n=t[0].trim().replace(/\/+$/,""),s=t[1].trim(),o=t[2].trim();if(!n||!o)throw new Error("请先在设置页配置 AI 接口地址与模型名称");const a=n+"/chat/completions",c={"Content-Type":"application/json"};s&&(c.Authorization="Bearer "+s);const h=JSON.stringify({model:o,messages:[{role:"system",content:"你是一名严谨的中文助理。请将用户提供的工作总结 Markdown 草稿润色为通顺、专业、简洁的工作总结。要求:保留原有章节结构与全部事实数据(数字、日期、条目),不得虚构或遗漏内容,只输出 Markdown 正文。"},{role:"user",content:e}],temperature:.3});let y;try{y=await fetch(a,{method:"POST",headers:c,body:h})}catch{throw new Error("无法访问 AI 接口:请检查地址是否正确、服务端是否允许浏览器跨域访问")}if(!y.ok){let C="接口返回 "+y.status;try{const A=await y.json();A&&A.error&&A.error.message&&(C+=":"+A.error.message)}catch{}throw new Error(C)}const m=await y.json(),_=m&&m.choices&&m.choices[0]&&m.choices[0].message&&m.choices[0].message.content;if(!_)throw new Error("接口未返回内容");return String(_)}const vb={class:"report"},mb={class:"report-toolbar"},yb={class:"seg"},gb=["onClick"],bb=["disabled"],wb=["disabled"],_b={key:0,class:"ai-error"},kb={class:"report-grid"},xb={class:"report-left"},Cb={class:"card section"},Sb={class:"section-title"},Eb={class:"muted note-saved"},$b={class:"card section"},Tb={class:"report-right"},Ab={key:0,class:"card section"},Pb={class:"sum-row"},Ob={class:"num"},Mb={class:"sum-row"},Ib={class:"num"},jb={class:"sum-row"},Db={class:"num"},Lb={class:"sum-row"},Rb={class:"num"},Kb={class:"sum-row"},Fb={class:"num"},Nb={class:"muted"},Vb={class:"num"},Bb={key:0,class:"muted sum-empty"},Ub={class:"muted"},qb={key:1,class:"muted sum-empty"},Hb={class:"muted"},Wb={key:2,class:"muted sum-empty"},zb={class:"muted"},Gb={key:3,class:"muted sum-empty"},Yb=Ht({__name:"ReportView",setup(e){const t=[{key:"week",label:"本周"},{key:"month",label:"本月"},{key:"all",label:"全部"},{key:"custom",label:"自定义"}],n=N("week"),s=N(Ts(Ct())),o=N(Ct()),a=N(null),c=N(""),d=N(!1),h=N(!1),y=N(null),m=N(""),_=N(Ts(Ct())),C=N(""),A=N(""),V=N(""),Z=N(!1);async function te(){const M=await vl(_.value);C.value=(M==null?void 0:M.highlights)||"",A.value=(M==null?void 0:M.challenges)||"",V.value=(M==null?void 0:M.plan_next)||"",Z.value=!1}async function ue(){await Am(_.value,{highlights:C.value.trim()||null,challenges:A.value.trim()||null,plan_next:V.value.trim()||null}),Z.value=!0,await R()}function P(M){const S=Ct();if(M==="week"){const oe=Ts(S);return{start:oe,end:Fn(oe,6),label:"本周"}}if(M==="month"){const oe=S.slice(0,7);return{start:oe+"-01",end:S,label:oe+" 本月"}}return M==="all"?{start:"2000-01-01",end:S,label:"全部实习期"}:{start:s.value,end:o.value,label:s.value+" ~ "+o.value}}async function R(){d.value=!0;const M=P(n.value),S=await Qg(M.start,M.end,M.label);a.value=S,c.value=Zg(S),d.value=!1}mt(n,R),mt([s,o],()=>{n.value==="custom"&&R()}),yn(async()=>{await te(),await R()});async function X(){const M=Ct().replace(/-/g,""),S=await ml("实习工作总结_"+M+".md",c.value);Ve(S?"总结已导出到:"+S:"总结已导出到系统下载目录")}async function fe(){await qa(c.value),Ve("总结已复制到剪贴板")}async function ie(){if(h.value)return;m.value="";const M=c.value.trim();if(!M){m.value="当前草稿为空,无法润色";return}h.value=!0;try{y.value=c.value,c.value=await hb(M),Ve("AI 润色完成")}catch(S){y.value=null,m.value=S instanceof Error?S.message:"润色失败"}h.value=!1}function ee(){y.value!==null&&(c.value=y.value),y.value=null}return(M,S)=>(O(),F("div",vb,[u("div",mb,[u("div",yb,[(O(),F(je,null,it(t,oe=>u("button",{key:oe.key,class:Ze(["seg-btn",{active:n.value===oe.key}]),onClick:be=>n.value=oe.key},ne(oe.label),11,gb)),64))]),n.value==="custom"?(O(),F(je,{key:0},[Ae(u("input",{type:"date",class:"input w-date","onUpdate:modelValue":S[0]||(S[0]=oe=>s.value=oe)},null,512),[[De,s.value]]),S[6]||(S[6]=u("span",{class:"muted"},"至",-1)),Ae(u("input",{type:"date",class:"input w-date","onUpdate:modelValue":S[1]||(S[1]=oe=>o.value=oe)},null,512),[[De,o.value]])],64)):Ee("",!0),S[10]||(S[10]=u("span",{class:"flex1"},null,-1)),u("button",{class:"btn btn-sm",disabled:h.value,onClick:ie},[Te(et,{name:"edit",size:14}),S[7]||(S[7]=rn("AI 润色 ",-1))],8,bb),y.value!==null?(O(),F("button",{key:1,class:"btn btn-sm",onClick:ee},"还原润色前")):Ee("",!0),u("button",{class:"btn btn-sm",disabled:d.value,onClick:R},[Te(et,{name:"edit",size:14}),S[8]||(S[8]=rn("重新生成 ",-1))],8,wb),u("button",{class:"btn btn-sm",onClick:fe},"复制"),u("button",{class:"btn btn-primary btn-sm",onClick:X},[Te(et,{name:"export",size:14}),S[9]||(S[9]=rn("导出 Markdown ",-1))])]),m.value?(O(),F("div",_b,ne(m.value),1)):Ee("",!0),u("div",kb,[u("div",xb,[u("div",Cb,[u("div",Sb,"本周周记("+ne(_.value)+" 起)",1),S[11]||(S[11]=u("label",{class:"note-label muted"},"本周亮点",-1)),Ae(u("textarea",{class:"textarea","onUpdate:modelValue":S[2]||(S[2]=oe=>C.value=oe),placeholder:"本周最有价值的一件事",onBlur:ue},null,544),[[De,C.value]]),S[12]||(S[12]=u("label",{class:"note-label muted"},"踩的坑",-1)),Ae(u("textarea",{class:"textarea","onUpdate:modelValue":S[3]||(S[3]=oe=>A.value=oe),placeholder:"遇到的问题与教训",onBlur:ue},null,544),[[De,A.value]]),S[13]||(S[13]=u("label",{class:"note-label muted"},"下周计划",-1)),Ae(u("textarea",{class:"textarea","onUpdate:modelValue":S[4]||(S[4]=oe=>V.value=oe),placeholder:"下周准备做什么",onBlur:ue},null,544),[[De,V.value]]),u("div",Eb,ne(Z.value?"已保存":"失焦自动保存"),1)]),u("div",$b,[S[14]||(S[14]=u("div",{class:"section-title"},"总结草稿(可编辑)",-1)),Ae(u("textarea",{class:"textarea md-editor","onUpdate:modelValue":S[5]||(S[5]=oe=>c.value=oe),spellcheck:"false"},null,512),[[De,c.value]])])]),u("div",Tb,[a.value?(O(),F("div",Ab,[S[20]||(S[20]=u("div",{class:"section-title"},"数据摘要",-1)),u("div",Pb,[S[15]||(S[15]=u("span",{class:"muted"},"出勤",-1)),u("span",Ob,ne(a.value.attendDays)+" 天",1)]),u("div",Mb,[S[16]||(S[16]=u("span",{class:"muted"},"工时",-1)),u("span",Ib,ne(a.value.totalHours)+" 小时",1)]),u("div",jb,[S[17]||(S[17]=u("span",{class:"muted"},"补卡",-1)),u("span",Db,ne(a.value.makeupCount)+" 次",1)]),u("div",Lb,[S[18]||(S[18]=u("span",{class:"muted"},"请假",-1)),u("span",Rb,ne(a.value.leaveCount)+" 天",1)]),u("div",Kb,[S[19]||(S[19]=u("span",{class:"muted"},"记录",-1)),u("span",Fb,ne(a.value.itemCount)+" 条",1)]),S[21]||(S[21]=u("div",{class:"section-sub"},"分类分布",-1)),(O(!0),F(je,null,it(a.value.categoryStats,oe=>(O(),F("div",{key:oe.key,class:"sum-row"},[u("span",Nb,ne(oe.label),1),u("span",Vb,ne(oe.count)+" 条 · "+ne(oe.percent)+"%",1)]))),128)),a.value.categoryStats.length?Ee("",!0):(O(),F("div",Bb,"(无)")),S[22]||(S[22]=u("div",{class:"section-sub"},"主要成果",-1)),(O(!0),F(je,null,it(a.value.milestones,(oe,be)=>(O(),F("div",{key:"m"+be,class:"sum-item"},[rn(ne(oe.content),1),u("span",Ub,"("+ne(oe.date)+")",1)]))),128)),a.value.milestones.length?Ee("",!0):(O(),F("div",qb,"(无)")),S[23]||(S[23]=u("div",{class:"section-sub"},"待跟进",-1)),(O(!0),F(je,null,it(a.value.followups,(oe,be)=>(O(),F("div",{key:"f"+be,class:"sum-item"},[rn(ne(oe.content),1),u("span",Hb,"("+ne(oe.date)+")",1)]))),128)),a.value.followups.length?Ee("",!0):(O(),F("div",Wb,"(无)")),S[24]||(S[24]=u("div",{class:"section-sub"},"学习与成长",-1)),(O(!0),F(je,null,it(a.value.takeaways,(oe,be)=>(O(),F("div",{key:"t"+be,class:"sum-item"},[rn(ne(oe.text),1),u("span",zb,"("+ne(oe.date)+")",1)]))),128)),a.value.takeaways.length?Ee("",!0):(O(),F("div",Gb,"(无)"))])):Ee("",!0)])])]))}}),Jb=Qt(Yb,[["__scopeId","data-v-43f9c59b"]]),Xb=["aria-label"],Qb={class:"dialog-head"},Zb={class:"dialog-title"},ew={class:"dialog-body"},tw={class:"form-grid"},nw={class:"field span2"},rw={class:"seg"},sw={class:"field"},ow={class:"field"},iw={class:"field"},aw=["value"],lw={key:0,class:"field"},uw={class:"seg"},cw={class:"field span2"},fw={key:0,class:"form-error"},dw={class:"dialog-btns"},pw=Ht({__name:"TransactionDialog",props:{open:{type:Boolean},title:{},initial:{}},emits:["cancel","save"],setup(e,{emit:t}){const n=e,s=t,o=N("expense"),a=N("餐饮"),c=N(""),d=N(""),h=N(""),y=N(!1),m=N(!1),_=N(""),C=N(null);function A(ue){n.open&&ue.key==="Escape"&&s("cancel")}mt(()=>n.open,async ue=>{var P;ue?(o.value=n.initial.type==="income"?"income":"expense",a.value=n.initial.category,c.value=n.initial.amountYuan,d.value=n.initial.date,h.value=n.initial.note,y.value=n.initial.reimbursable===1,m.value=n.initial.reimbursed===1,_.value="",window.addEventListener("keydown",A),await rs(),(P=C.value)==null||P.focus()):window.removeEventListener("keydown",A)}),dr(()=>window.removeEventListener("keydown",A)),mt(o,ue=>{a.value=ue==="expense"?zr[0]:Jo[0]});const V=ut(()=>o.value==="expense"?zr:Jo);function Z(){return a.value&&V.value.includes(a.value)?a.value:V.value[0]}function te(){const ue=String(c.value??"").trim(),P=Number(ue);if(!ue||!isFinite(P)||P<=0){_.value="请填写大于 0 的金额";return}if(!d.value){_.value="请选择日期";return}const R=o.value==="expense"&&y.value?1:0;s("save",{type:o.value,category:Z(),amount:Math.round(P*100),date:d.value,note:String(h.value??"").trim(),reimbursable:R,reimbursed:R&&m.value?1:0})}return(ue,P)=>(O(),Lt(Us,{to:"body"},[Te(ss,{name:"modal"},{default:fr(()=>[e.open?(O(),F("div",{key:0,class:"mask",onClick:P[11]||(P[11]=hn(R=>s("cancel"),["self"]))},[u("div",{class:"dialog",role:"dialog","aria-label":e.title},[u("div",Qb,[u("span",Zb,ne(e.title),1),u("button",{class:"icon-btn",title:"关闭",onClick:P[0]||(P[0]=R=>s("cancel"))},[Te(et,{name:"close",size:16})])]),u("div",ew,[u("div",tw,[u("div",nw,[P[12]||(P[12]=u("label",null,"类型",-1)),u("div",rw,[u("button",{class:Ze(["seg-btn",{active:o.value==="expense"}]),onClick:P[1]||(P[1]=R=>o.value="expense")},"支出",2),u("button",{class:Ze(["seg-btn",{active:o.value==="income"}]),onClick:P[2]||(P[2]=R=>o.value="income")},"收入",2)])]),u("div",sw,[P[13]||(P[13]=u("label",null,"金额(元,必填)",-1)),Ae(u("input",{ref_key:"amountInput",ref:C,class:Ze(["input",{invalid:_.value}]),"onUpdate:modelValue":P[3]||(P[3]=R=>c.value=R),type:"number",min:"0",step:"0.01",placeholder:"0.00"},null,2),[[De,c.value]])]),u("div",ow,[P[14]||(P[14]=u("label",null,"日期(必填)",-1)),Ae(u("input",{class:"input",type:"date","onUpdate:modelValue":P[4]||(P[4]=R=>d.value=R)},null,512),[[De,d.value]])]),u("div",iw,[P[15]||(P[15]=u("label",null,"分类",-1)),Ae(u("select",{class:"select","onUpdate:modelValue":P[5]||(P[5]=R=>a.value=R)},[(O(!0),F(je,null,it(V.value,R=>(O(),F("option",{key:R,value:R},ne(R),9,aw))),128))],512),[[Nn,a.value]])]),o.value==="expense"?(O(),F("div",lw,[P[16]||(P[16]=u("label",null,"报销状态",-1)),u("div",uw,[u("button",{class:Ze(["seg-btn",{active:!y.value}]),onClick:P[6]||(P[6]=R=>{y.value=!1,m.value=!1})},"无需报销",2),u("button",{class:Ze(["seg-btn",{active:y.value&&!m.value}]),onClick:P[7]||(P[7]=R=>{y.value=!0,m.value=!1})},"待报销",2),u("button",{class:Ze(["seg-btn",{active:y.value&&m.value}]),onClick:P[8]||(P[8]=R=>{y.value=!0,m.value=!0})},"已报销",2)])])):Ee("",!0),u("div",cw,[P[17]||(P[17]=u("label",null,"备注",-1)),Ae(u("textarea",{class:"textarea","onUpdate:modelValue":P[9]||(P[9]=R=>h.value=R),placeholder:"选填"},null,512),[[De,h.value]])])]),_.value?(O(),F("div",fw,ne(_.value),1)):Ee("",!0)]),u("div",dw,[u("button",{class:"btn btn-sm",onClick:P[10]||(P[10]=R=>s("cancel"))},"取消"),u("button",{class:"btn btn-primary btn-sm",onClick:te},"保存")])],8,Xb)])):Ee("",!0)]),_:1})]))}}),hw=Qt(pw,[["__scopeId","data-v-edca3327"]]),vw={class:"ledger-page"},mw={class:"ledger-toolbar"},yw={class:"month-title num"},gw={class:"cards"},bw={class:"card stat-card"},ww={class:"stat-num num amt-income"},_w={class:"card stat-card"},kw={class:"stat-num num"},xw={class:"card stat-card"},Cw={class:"card stat-card"},Sw={class:"stat-num num amt-warn"},Ew={class:"card sec"},$w={class:"form-grid"},Tw={class:"field span2"},Aw={class:"seg"},Pw={class:"field"},Ow={class:"field"},Mw={class:"field"},Iw=["value"],jw={key:0,class:"field"},Dw={class:"field span2"},Lw={key:0,class:"form-error"},Rw={class:"form-footer"},Kw=["disabled"],Fw=["disabled"],Nw={key:0,class:"card sec"},Vw={class:"bar-label"},Bw={class:"bar-track"},Uw={class:"muted num bar-num"},qw={key:1,class:"card section"},Hw={class:"form-error"},Ww={class:"card table-card"},zw={class:"tx-table"},Gw={class:"num","data-label":"日期"},Yw={"data-label":"分类"},Jw={class:"tag"},Xw={class:"td-note","data-label":"备注"},Qw={"data-label":"报销"},Zw={key:0,class:"muted"},e_={key:1,class:"tx-done"},t_={key:2,class:"tx-pending"},n_={class:"ops-cell"},r_={class:"ops"},s_=["onClick"],o_=["onClick"],i_=["onClick"],a_={key:0},l_={class:"muted vault-note num"},u_=Ht({__name:"LedgerView",setup(e){const t=N(Ct()),n=N([]),s=N(!0),o=N("expense"),a=N(""),c=N(zr[0]),d=N(Ct()),h=N(""),y=N(!1),m=N(""),_=N(""),C=N(!1),A=N(!1),V=N(null),Z=N({type:"expense",category:zr[0],amountYuan:"",date:Ct(),note:"",reimbursable:0,reimbursed:0}),te=N(null),ue=ut(()=>t.value.slice(0,7)+"-01"),P=ut(()=>{const J=Number(t.value.slice(0,4)),Q=Number(t.value.slice(5,7))-1,ke=new Date(J,Q+1,0).getDate();return t.value.slice(0,7)+"-"+(ke<10?"0"+ke:String(ke))}),R=ut(()=>Number(t.value.slice(0,4))+" 年 "+Number(t.value.slice(5,7))+" 月");async function X(){s.value=!0;try{n.value=await Rm(ue.value,P.value),_.value=""}catch(J){_.value="账目加载失败:"+(J instanceof Error?J.stack||J.message:String(J)),Ve("账目加载失败")}s.value=!1}yn(X),mt(t,X),mt(o,J=>{c.value=J==="expense"?zr[0]:Jo[0]});const fe=ut(()=>n.value.slice().sort((J,Q)=>J.date===Q.date?Q.id-J.id:J.date{let J=0,Q=0,ke=0;for(const Fe of n.value)Fe.type==="income"?J+=Fe.amount:(Q+=Fe.amount,Fe.reimbursable===1&&Fe.reimbursed!==1&&(ke+=Fe.amount));return{income:J,expense:Q,pending:ke,balance:J-Q}}),ee=N("all"),M=N("all"),S=ut(()=>fe.value.filter(J=>!(ee.value!=="all"&&J.type!==ee.value||M.value==="pending"&&!(J.type==="expense"&&J.reimbursable===1&&J.reimbursed!==1)||M.value==="done"&&!(J.reimbursable===1&&J.reimbursed===1)))),oe=ut(()=>{const J=new Map;let Q=0;for(const Fe of n.value)Fe.type==="expense"&&(J.set(Fe.category,(J.get(Fe.category)||0)+Fe.amount),Q+=Fe.amount);const ke=Q||1;return Array.from(J.entries()).map(Fe=>({name:Fe[0],amount:Fe[1],percent:Math.round(Fe[1]/ke*100)})).sort((Fe,ct)=>ct.amount-Fe.amount)});function be(J){return(J/100).toFixed(2)}function z(J){return(J.type==="income"?"+":"-")+be(J.amount)}function xe(){t.value=Qo(t.value,-1)}function Le(){t.value=Qo(t.value,1)}function rt(){t.value=Ct()}mt(a,()=>{m.value&&(m.value="")});async function He(){const J=String(a.value??"").trim(),Q=Number(J);if(!J||!isFinite(Q)||Q<=0){m.value="请填写大于 0 的金额";return}if(!d.value){m.value="请选择日期";return}if(!C.value){C.value=!0;try{await Km({type:o.value,category:c.value,amount:Math.round(Q*100),date:d.value,note:String(h.value??"").trim(),reimbursable:o.value==="expense"&&y.value?1:0,reimbursed:0})}catch(ke){Ve("添加失败:"+(ke instanceof Error?ke.message:String(ke))),C.value=!1;return}a.value="",h.value="",y.value=!1,m.value="",await X(),Ve("记账已添加"),C.value=!1}}const Ye=ut(()=>String(a.value??"").trim()!==""||String(h.value??"").trim()!=="");function Ke(){a.value="",h.value="",y.value=!1,m.value=""}async function st(J){await Vm(J.id),await X(),Ve("已标记为已报销")}function qe(J){V.value=J.id,Z.value={type:J.type,category:J.category,amountYuan:be(J.amount),date:J.date,note:J.note||"",reimbursable:J.reimbursable,reimbursed:J.reimbursed},A.value=!0}async function Qe(J){const Q=V.value;await Fm(Q,J),A.value=!1,await X(),Ve("账目已更新")}async function Ce(){te.value&&te.value.id&&await Nm(te.value.id),te.value=null,await X(),Ve("账目已删除")}return(J,Q)=>(O(),F("div",vw,[u("div",mw,[u("button",{class:"icon-btn",onClick:xe},[Te(et,{name:"chevron-left",size:16})]),u("span",yw,ne(R.value),1),u("button",{class:"icon-btn",onClick:Le},[Te(et,{name:"chevron-right",size:16})]),u("button",{class:"btn btn-sm",onClick:rt},"回到本月"),Q[13]||(Q[13]=u("span",{class:"flex1"},null,-1)),Ae(u("select",{class:"select w-filter","onUpdate:modelValue":Q[0]||(Q[0]=ke=>ee.value=ke)},[...Q[11]||(Q[11]=[u("option",{value:"all"},"全部类型",-1),u("option",{value:"expense"},"仅支出",-1),u("option",{value:"income"},"仅收入",-1)])],512),[[Nn,ee.value]]),Ae(u("select",{class:"select w-filter","onUpdate:modelValue":Q[1]||(Q[1]=ke=>M.value=ke)},[...Q[12]||(Q[12]=[u("option",{value:"all"},"全部报销",-1),u("option",{value:"pending"},"待报销",-1),u("option",{value:"done"},"已报销",-1)])],512),[[Nn,M.value]])]),u("div",gw,[u("div",bw,[Q[14]||(Q[14]=u("div",{class:"muted"},"本月收入(元)",-1)),u("div",ww,ne(be(ie.value.income)),1)]),u("div",_w,[Q[15]||(Q[15]=u("div",{class:"muted"},"本月支出(元)",-1)),u("div",kw,ne(be(ie.value.expense)),1)]),u("div",xw,[Q[16]||(Q[16]=u("div",{class:"muted"},"本月结余(元)",-1)),u("div",{class:Ze(["stat-num num",{"amt-income":ie.value.balance>=0,"amt-expense":ie.value.balance<0}])},ne(be(ie.value.balance)),3)]),u("div",Cw,[Q[17]||(Q[17]=u("div",{class:"muted"},"待报销(元)",-1)),u("div",Sw,ne(be(ie.value.pending)),1)])]),u("div",Ew,[Q[24]||(Q[24]=u("div",{class:"sec-head"},[u("span",{class:"sec-title"},"新增一笔"),u("span",{class:"muted form-hint"},"金额必填,回车快速添加")],-1)),u("div",$w,[u("div",Tw,[Q[18]||(Q[18]=u("label",null,"类型",-1)),u("div",Aw,[u("button",{class:Ze(["seg-btn",{active:o.value==="expense"}]),onClick:Q[2]||(Q[2]=ke=>o.value="expense")},"支出",2),u("button",{class:Ze(["seg-btn",{active:o.value==="income"}]),onClick:Q[3]||(Q[3]=ke=>o.value="income")},"收入",2)])]),u("div",Pw,[Q[19]||(Q[19]=u("label",null,"金额(元,必填)",-1)),Ae(u("input",{class:Ze(["input",{invalid:m.value}]),"onUpdate:modelValue":Q[4]||(Q[4]=ke=>a.value=ke),type:"number",min:"0",step:"0.01",placeholder:"0.00",onKeydown:Mt(He,["enter"])},null,34),[[De,a.value]])]),u("div",Ow,[Q[20]||(Q[20]=u("label",null,"日期",-1)),Ae(u("input",{class:"input",type:"date","onUpdate:modelValue":Q[5]||(Q[5]=ke=>d.value=ke)},null,512),[[De,d.value]])]),u("div",Mw,[Q[21]||(Q[21]=u("label",null,"分类",-1)),Ae(u("select",{class:"select","onUpdate:modelValue":Q[6]||(Q[6]=ke=>c.value=ke)},[(O(!0),F(je,null,it(o.value==="expense"?Kt(zr):Kt(Jo),ke=>(O(),F("option",{key:ke,value:ke},ne(ke),9,Iw))),128))],512),[[Nn,c.value]])]),o.value==="expense"?(O(),F("div",jw,[Q[22]||(Q[22]=u("label",null,"报销",-1)),u("button",{class:Ze(["toggle-btn",{on:y.value}]),onClick:Q[7]||(Q[7]=ke=>y.value=!y.value)},ne(y.value?"需要报销":"无需报销"),3)])):Ee("",!0),u("div",Dw,[Q[23]||(Q[23]=u("label",null,"备注",-1)),Ae(u("input",{class:"input","onUpdate:modelValue":Q[8]||(Q[8]=ke=>h.value=ke),placeholder:"选填,如:客户现场午餐",onKeydown:Mt(He,["enter"])},null,544),[[De,h.value]])])]),m.value?(O(),F("div",Lw,ne(m.value),1)):Ee("",!0),u("div",Rw,[u("button",{class:"btn btn-sm",disabled:!Ye.value,onClick:Ke},"重置",8,Kw),u("button",{class:"btn btn-primary btn-sm",disabled:C.value,onClick:He},"添加记录",8,Fw)])]),oe.value.length?(O(),F("div",Nw,[Q[25]||(Q[25]=u("div",{class:"sec-title"},"本月支出分类",-1)),(O(!0),F(je,null,it(oe.value,ke=>(O(),F("div",{key:ke.name,class:"bar-row"},[u("span",Vw,ne(ke.name),1),u("span",Bw,[u("span",{class:"bar-fill",style:rr({width:ke.percent+"%"})},null,4)]),u("span",Uw,ne(be(ke.amount))+" 元 · "+ne(ke.percent)+"%",1)]))),128))])):Ee("",!0),_.value?(O(),F("div",qw,[u("div",Hw,ne(_.value),1),Q[26]||(Q[26]=u("div",{class:"muted loc-note"},"请将上方完整错误文字发送给开发者",-1))])):Ee("",!0),u("div",Ww,[u("table",zw,[Q[28]||(Q[28]=u("thead",null,[u("tr",null,[u("th",null,"日期"),u("th",null,"分类"),u("th",null,"金额(元)"),u("th",null,"备注"),u("th",null,"报销"),u("th",{class:"th-ops"},"操作")])],-1)),u("tbody",null,[(O(!0),F(je,null,it(S.value,ke=>(O(),F("tr",{key:ke.id},[u("td",Gw,ne(ke.date),1),u("td",Yw,[u("span",Jw,ne(ke.category),1)]),u("td",{class:Ze(["num",ke.type==="income"?"amt-income":"amt-expense"]),"data-label":"金额"},ne(z(ke)),3),u("td",Xw,ne(ke.note||"--"),1),u("td",Qw,[ke.type!=="expense"||ke.reimbursable!==1?(O(),F("span",Zw,"--")):ke.reimbursed===1?(O(),F("span",e_,"已报销")):(O(),F("span",t_,"待报销"))]),u("td",n_,[u("div",r_,[ke.type==="expense"&&ke.reimbursable===1&&ke.reimbursed!==1?(O(),F("button",{key:0,class:"btn btn-xs",onClick:Fe=>st(ke)},"标记已报销",8,s_)):Ee("",!0),u("button",{class:"btn btn-xs",onClick:Fe=>qe(ke)},"编辑",8,o_),u("button",{class:"btn btn-xs",onClick:Fe=>te.value=ke},"删除",8,i_)])])]))),128)),!S.value.length&&!s.value?(O(),F("tr",a_,[...Q[27]||(Q[27]=[u("td",{colspan:"6",class:"empty muted"},"本月暂无账目",-1)])])):Ee("",!0)])])]),u("div",l_,"筛选结果 "+ne(S.value.length)+" 条 / 本月共 "+ne(n.value.length)+" 条",1),Te(hw,{open:A.value,title:(V.value,"编辑账目"),initial:Z.value,onCancel:Q[9]||(Q[9]=ke=>A.value=!1),onSave:Qe},null,8,["open","title","initial"]),Te(ur,{open:!!te.value,title:"删除确认",message:te.value?"将删除 "+te.value.date+" 的账目("+te.value.category+" "+be(te.value.amount)+" 元)。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:Q[10]||(Q[10]=ke=>te.value=null),onConfirm:Ce},null,8,["open","message"])]))}}),c_=Qt(u_,[["__scopeId","data-v-0533e5f8"]]),f_={class:"memo-page"},d_={class:"card memo-list"},p_={class:"pane-head"},h_={class:"pane-title"},v_={class:"memo-scroll"},m_=["onClick"],y_={class:"memo-item-title"},g_={class:"muted memo-item-sub"},b_={class:"muted num memo-item-time"},w_={key:0,class:"muted empty"},__={class:"card memo-editor"},k_={class:"editor-foot"},x_={class:"muted foot-info"},C_=["disabled"],S_=["disabled"],E_={key:1,class:"empty muted editor-empty"},$_=Ht({__name:"MemoView",setup(e){const t=N([]),n=N(null),s=N(!1),o=N(""),a=N(""),c=N(null),d=N(null);async function h(){if(t.value=await Om(),n.value&&n.value.id){const ie=t.value.find(ee=>ee.id===n.value.id);ie&&(n.value=ie)}}yn(async()=>{await h(),t.value.length&&_(t.value[0]),window.addEventListener("keydown",y)}),dr(()=>window.removeEventListener("keydown",y)),mt(Fa,async ie=>{if(!ie)return;t.value.length||await h();const ee=t.value.find(M=>M.id===ie);Fa.value=null,ee&&C(ee)},{immediate:!0});function y(ie){(ie.ctrlKey||ie.metaKey)&&ie.key.toLowerCase()==="s"&&s.value&&m.value&&(ie.preventDefault(),te())}const m=ut(()=>{if(!s.value)return!1;const ie=n.value?n.value.title:"",ee=n.value?n.value.content:"";return o.value!==ie||a.value!==ee});function _(ie){n.value=ie,s.value=!0,o.value=ie.title,a.value=ie.content}function C(ie){if(!(s.value&&n.value&&n.value.id===ie.id)){if(m.value){d.value={type:"select",memo:ie};return}_(ie)}}function A(){if(m.value){d.value={type:"new"};return}V()}function V(){n.value=null,s.value=!0,o.value="",a.value=""}function Z(){n.value?_(n.value):V()}async function te(){if(!o.value.trim()&&!a.value.trim()){Ve("标题与内容不能都为空");return}if(n.value&&n.value.id)await Im(n.value.id,o.value,a.value),Ve("备忘已保存");else{const ie=await Mm(o.value,a.value);n.value=ie,o.value=ie.title,a.value=ie.content,Ve("备忘已创建")}await h()}function ue(){n.value&&n.value.id&&(c.value=n.value)}async function P(){c.value&&c.value.id&&(await jm(c.value.id),Ve("备忘已删除")),c.value=null,await h(),V()}function R(){const ie=d.value;d.value=null,ie&&(ie.type==="select"?_(ie.memo):V())}function X(ie){return(ie.content||"").replace(/\s+/g," ").slice(0,30)}function fe(ie){return ie.replace("T"," ").slice(0,16)}return(ie,ee)=>(O(),F("div",f_,[u("aside",d_,[u("div",p_,[u("span",h_,"备忘录("+ne(t.value.length)+")",1),u("button",{class:"btn btn-primary btn-sm",onClick:A},"新建")]),u("div",v_,[(O(!0),F(je,null,it(t.value,M=>(O(),F("div",{key:M.id,class:Ze(["memo-item",{active:s.value&&n.value&&n.value.id===M.id}]),onClick:S=>C(M)},[u("div",y_,ne(M.title||"无标题"),1),u("div",g_,ne(X(M)||"空"),1),u("div",b_,ne(fe(M.updated_at)),1)],10,m_))),128)),t.value.length?Ee("",!0):(O(),F("div",w_,"暂无备忘"))])]),u("section",__,[s.value?(O(),F(je,{key:0},[Ae(u("input",{class:"input title-input","onUpdate:modelValue":ee[0]||(ee[0]=M=>o.value=M),placeholder:"标题"},null,512),[[De,o.value]]),Ae(u("textarea",{class:"textarea content-textarea","onUpdate:modelValue":ee[1]||(ee[1]=M=>a.value=M),placeholder:"内容"},null,512),[[De,a.value]]),u("div",k_,[u("span",x_,[m.value?(O(),F(je,{key:0},[rn("有未保存修改")],64)):n.value&&n.value.id?(O(),F(je,{key:1},[rn("更新于 "+ne(fe(n.value.updated_at)),1)],64)):(O(),F(je,{key:2},[rn("新备忘")],64))]),ee[4]||(ee[4]=u("span",{class:"flex1"},null,-1)),n.value&&n.value.id?(O(),F("button",{key:0,class:"btn btn-sm",onClick:ue},"删除")):Ee("",!0),u("button",{class:"btn btn-sm",disabled:!m.value,onClick:Z},"放弃修改",8,C_),u("button",{class:"btn btn-primary btn-sm",disabled:!m.value,onClick:te},"保存",8,S_)])],64)):(O(),F("div",E_,"选择左侧备忘,或点击右上角新建"))]),Te(ur,{open:!!c.value,title:"删除确认",message:c.value?"将删除备忘「"+(c.value.title||"无标题")+"」。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:ee[2]||(ee[2]=M=>c.value=null),onConfirm:P},null,8,["open","message"]),Te(ur,{open:!!d.value,title:"未保存提示",message:"当前备忘有未保存的修改,继续操作将丢失这些修改。","confirm-text":"放弃修改并继续",onCancel:ee[3]||(ee[3]=M=>d.value=null),onConfirm:R},null,8,["open"])]))}}),T_=Qt($_,[["__scopeId","data-v-74d60dba"]]),A_=["aria-label"],P_={class:"dialog-head"},O_={class:"dialog-title"},M_={class:"dialog-body"},I_={class:"form-grid"},j_={class:"field span2"},D_={class:"field span2"},L_={class:"field span2"},R_={class:"pwd-row"},K_={class:"field span2"},F_={key:0,class:"form-error"},N_={class:"dialog-btns"},V_=Ht({__name:"CredentialDialog",props:{open:{type:Boolean},title:{},initial:{}},emits:["cancel","save"],setup(e,{emit:t}){const n=e,s=t,o=N(""),a=N(""),c=N(""),d=N(""),h=N(""),y=N(null);function m(A){n.open&&A.key==="Escape"&&s("cancel")}mt(()=>n.open,async A=>{var V;A?(o.value=n.initial.system,a.value=n.initial.account,c.value=n.initial.password,d.value=n.initial.remark,h.value="",window.addEventListener("keydown",m),await rs(),(V=y.value)==null||V.focus()):window.removeEventListener("keydown",m)}),dr(()=>window.removeEventListener("keydown",m));function _(){const A="ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz23456789",V="!@#$%^&*",Z=crypto.getRandomValues(new Uint8Array(14));let te="";for(let ue=0;ue(O(),Lt(Us,{to:"body"},[Te(ss,{name:"modal"},{default:fr(()=>[e.open?(O(),F("div",{key:0,class:"mask",onClick:V[6]||(V[6]=hn(Z=>s("cancel"),["self"]))},[u("div",{class:"dialog",role:"dialog","aria-label":e.title},[u("div",P_,[u("span",O_,ne(e.title),1),u("button",{class:"icon-btn",title:"关闭",onClick:V[0]||(V[0]=Z=>s("cancel"))},[Te(et,{name:"close",size:16})])]),u("div",M_,[u("div",I_,[u("div",j_,[V[7]||(V[7]=u("label",null,"系统名称(必填)",-1)),Ae(u("input",{ref_key:"systemInput",ref:y,class:"input","onUpdate:modelValue":V[1]||(V[1]=Z=>o.value=Z),placeholder:"如:企业邮箱 / OA / VPN"},null,512),[[De,o.value]])]),u("div",D_,[V[8]||(V[8]=u("label",null,"账号(必填)",-1)),Ae(u("input",{class:"input","onUpdate:modelValue":V[2]||(V[2]=Z=>a.value=Z),placeholder:"用户名、工号或邮箱"},null,512),[[De,a.value]])]),u("div",L_,[V[9]||(V[9]=u("label",null,"密码(必填)",-1)),u("div",R_,[Ae(u("input",{class:"input","onUpdate:modelValue":V[3]||(V[3]=Z=>c.value=Z),placeholder:"输入或点击生成"},null,512),[[De,c.value]]),u("button",{class:"btn btn-sm",onClick:_},"生成")])]),u("div",K_,[V[10]||(V[10]=u("label",null,"备注",-1)),Ae(u("textarea",{class:"textarea","onUpdate:modelValue":V[4]||(V[4]=Z=>d.value=Z),placeholder:"用途、到期时间、负责人等(选填)"},null,512),[[De,d.value]])])]),h.value?(O(),F("div",F_,ne(h.value),1)):Ee("",!0)]),u("div",N_,[u("button",{class:"btn btn-sm",onClick:V[5]||(V[5]=Z=>s("cancel"))},"取消"),u("button",{class:"btn btn-primary btn-sm",onClick:C},"保存")])],8,A_)])):Ee("",!0)]),_:1})]))}}),B_=Qt(V_,[["__scopeId","data-v-f383b0a6"]]),U_={class:"vault-page"},q_={key:0,class:"empty muted"},H_={key:1,class:"card lock-card"},W_={class:"lock-badge"},z_={key:0,class:"form-error"},G_=["disabled"],Y_={key:0,class:"form-error"},J_=["disabled"],X_={class:"vault-toolbar"},Q_={class:"search-wrap"},Z_={class:"card table-card"},e1={class:"cred-table"},t1={class:"td-system"},n1=["onClick"],r1={class:"pwd-cell"},s1={class:"num pwd-text"},o1=["onClick"],i1=["onClick"],a1={class:"td-remark"},l1={class:"td-ops"},u1={class:"ops"},c1=["onClick"],f1=["onClick"],d1={key:0},p1={class:"muted vault-note num"},h1={class:"dialog pwd-dialog"},v1={class:"dialog-head"},m1={class:"dialog-body"},y1={class:"vp-field"},g1={class:"vp-field"},b1={class:"vp-field"},w1={key:0,class:"form-error"},_1={class:"dialog-btns"},k1=5*60*1e3,x1=Ht({__name:"VaultView",setup(e){const t=N(null),n=N(Ev()),s=N(!1),o=N(""),a=N(""),c=N(""),d=N(""),h=N(""),y=N([]),m=N(""),_=N({}),C=N(!1),A=N(null),V=N({system:"",account:"",password:"",remark:""}),Z=N(null),te=N(!1),ue=N(""),P=N(""),R=N(""),X=N("");async function fe(){y.value=await Ov(),_.value={}}let ie=null;function ee(){ie!==null&&window.clearTimeout(ie),ie=window.setTimeout(()=>{n.value&&(ti(),n.value=!1,y.value=[],_.value={},Ve("长时间未操作,密码库已自动锁定"))},k1)}function M(){n.value&&ee()}yn(async()=>{t.value=await ff(),window.addEventListener("click",M),window.addEventListener("keydown",M),n.value&&ee()}),dr(()=>{window.removeEventListener("click",M),window.removeEventListener("keydown",M),ie!==null&&window.clearTimeout(ie)});const S=ut(()=>{const Ce=m.value.trim().toLowerCase();return Ce?y.value.filter(J=>(J.system+" "+J.account+" "+(J.remark||"")).toLowerCase().includes(Ce)):y.value});async function oe(){if(!s.value){if(c.value="",!o.value){c.value="请输入主密码";return}if(o.value.length<6){c.value="主密码至少 6 位";return}if(o.value!==a.value){c.value="两次输入的主密码不一致";return}s.value=!0;try{await $v(o.value),o.value="",a.value="",n.value=!0,ee(),await fe(),Ve("主密码已设置,密码库已解锁")}catch(Ce){c.value=Ce instanceof Error?Ce.message:"设置失败"}s.value=!1}}async function be(){if(!s.value){if(h.value="",!d.value){h.value="请输入主密码";return}s.value=!0;try{await Tv(d.value),d.value="",n.value=!0,ee(),await fe()}catch(Ce){h.value=Ce instanceof Error?Ce.message:"解锁失败"}s.value=!1}}function z(){ti(),n.value=!1,y.value=[],_.value={},ie!==null&&window.clearTimeout(ie),Ve("密码库已锁定")}async function xe(Ce){const J=Ce.id;if(_.value[J]){_.value[J]=!1;return}try{Ce.passwordPlain=await ha(J),_.value[J]=!0}catch(Q){Ve(Q instanceof Error?Q.message:"解密失败")}}async function Le(Ce){try{const J=await ha(Ce.id);await qa(J),Ve("密码已复制")}catch(J){Ve(J instanceof Error?J.message:"复制失败")}}async function rt(Ce){await qa(Ce.account),Ve("账号已复制")}function He(){A.value=null,V.value={system:"",account:"",password:"",remark:""},C.value=!0}async function Ye(Ce){try{const J=await ha(Ce.id);A.value=Ce.id,V.value={system:Ce.system,account:Ce.account,password:J,remark:Ce.remark||""},C.value=!0}catch(J){Ve(J instanceof Error?J.message:"解密失败")}}async function Ke(Ce){const J=A.value??void 0;await Mv(Ce,J),C.value=!1,await fe(),Ve(J?"账号已更新":"账号已添加")}async function st(){Z.value&&Z.value.id&&(await Iv(Z.value.id),Ve("账号已删除")),Z.value=null,await fe()}function qe(){ue.value="",P.value="",R.value="",X.value="",te.value=!0}async function Qe(){X.value="";try{const Ce=await jv(ue.value,P.value);te.value=!1,ue.value="",P.value="",R.value="",Ve("主密码已修改,"+Ce+" 条账号密码已重新加密")}catch(Ce){X.value=Ce instanceof Error?Ce.message:"修改失败"}}return(Ce,J)=>(O(),F("div",U_,[t.value===null?(O(),F("div",q_,"加载中")):n.value?(O(),F(je,{key:2},[u("div",X_,[u("div",Q_,[Te(et,{name:"search",size:14,class:"search-icon"}),Ae(u("input",{class:"input","onUpdate:modelValue":J[3]||(J[3]=Q=>m.value=Q),placeholder:"搜索系统名称、账号或备注"},null,512),[[De,m.value]])]),J[16]||(J[16]=u("span",{class:"flex1"},null,-1)),u("button",{class:"btn btn-sm",onClick:qe},"修改主密码"),u("button",{class:"btn btn-sm",onClick:z},"锁定"),u("button",{class:"btn btn-primary btn-sm",onClick:He},"新增账号")]),u("div",Z_,[u("table",e1,[J[18]||(J[18]=u("thead",null,[u("tr",null,[u("th",null,"系统名称"),u("th",null,"账号"),u("th",null,"密码"),u("th",null,"备注"),u("th",{class:"th-ops"},"操作")])],-1)),u("tbody",null,[(O(!0),F(je,null,it(S.value,Q=>(O(),F("tr",{key:Q.id},[u("td",t1,ne(Q.system),1),u("td",null,[u("span",{class:"copyable",title:"点击复制账号",onClick:ke=>rt(Q)},ne(Q.account),9,n1)]),u("td",null,[u("div",r1,[u("span",s1,ne(_.value[Q.id]?Q.passwordPlain:"........"),1),u("button",{class:"btn btn-xs",onClick:ke=>xe(Q)},ne(_.value[Q.id]?"隐藏":"显示"),9,o1),u("button",{class:"btn btn-xs",onClick:ke=>Le(Q)},"复制",8,i1)])]),u("td",a1,ne(Q.remark||"--"),1),u("td",l1,[u("div",u1,[u("button",{class:"btn btn-xs",onClick:ke=>Ye(Q)},"编辑",8,c1),u("button",{class:"btn btn-xs",onClick:ke=>Z.value=Q},"删除",8,f1)])])]))),128)),S.value.length?Ee("",!0):(O(),F("tr",d1,[...J[17]||(J[17]=[u("td",{colspan:"5",class:"empty muted"},"暂无账号,点击右上角新增",-1)])]))])])]),u("div",p1,"共 "+ne(y.value.length)+" 条账号记录 · 密码以 AES-256-GCM 加密,服务器仅存密文",1)],64)):(O(),F("div",H_,[u("div",W_,[Te(et,{name:"lock",size:26})]),t.value===!1?(O(),F(je,{key:0},[J[12]||(J[12]=u("div",{class:"lock-title"},"设置主密码",-1)),J[13]||(J[13]=u("div",{class:"muted lock-tip"},"主密码用于加密保存在本机的账号密码,遗忘后无法找回,请务必牢记",-1)),Ae(u("input",{type:"password",class:"input","onUpdate:modelValue":J[0]||(J[0]=Q=>o.value=Q),placeholder:"设置主密码(至少 6 位)",onKeydown:Mt(oe,["enter"])},null,544),[[De,o.value]]),Ae(u("input",{type:"password",class:"input","onUpdate:modelValue":J[1]||(J[1]=Q=>a.value=Q),placeholder:"再次输入主密码",onKeydown:Mt(oe,["enter"])},null,544),[[De,a.value]]),c.value?(O(),F("div",z_,ne(c.value),1)):Ee("",!0),u("button",{class:"btn btn-primary lock-btn",disabled:s.value,onClick:oe},"完成设置并解锁",8,G_)],64)):(O(),F(je,{key:1},[J[14]||(J[14]=u("div",{class:"lock-title"},"密码库已锁定",-1)),J[15]||(J[15]=u("div",{class:"muted lock-tip"},"输入主密码解锁后查看与复制密码",-1)),Ae(u("input",{type:"password",class:"input","onUpdate:modelValue":J[2]||(J[2]=Q=>d.value=Q),placeholder:"主密码",onKeydown:Mt(be,["enter"])},null,544),[[De,d.value]]),h.value?(O(),F("div",Y_,ne(h.value),1)):Ee("",!0),u("button",{class:"btn btn-primary lock-btn",disabled:s.value,onClick:be},"解锁",8,J_)],64))])),Te(B_,{open:C.value,title:A.value?"编辑账号":"新增账号",initial:V.value,onCancel:J[4]||(J[4]=Q=>C.value=!1),onSave:Ke},null,8,["open","title","initial"]),Te(ur,{open:!!Z.value,title:"删除确认",message:Z.value?"将删除系统「"+Z.value.system+"」的账号记录。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:J[5]||(J[5]=Q=>Z.value=null),onConfirm:st},null,8,["open","message"]),(O(),Lt(Us,{to:"body"},[Te(ss,{name:"modal"},{default:fr(()=>[te.value?(O(),F("div",{key:0,class:"mask",onClick:J[11]||(J[11]=hn(Q=>te.value=!1,["self"]))},[u("div",h1,[u("div",v1,[J[19]||(J[19]=u("span",{class:"dialog-title"},"修改主密码",-1)),u("button",{class:"icon-btn",title:"关闭",onClick:J[6]||(J[6]=Q=>te.value=!1)},[Te(et,{name:"close",size:16})])]),u("div",m1,[u("div",y1,[J[20]||(J[20]=u("label",null,"旧主密码",-1)),Ae(u("input",{type:"password",class:"input","onUpdate:modelValue":J[7]||(J[7]=Q=>ue.value=Q)},null,512),[[De,ue.value]])]),u("div",g1,[J[21]||(J[21]=u("label",null,"新主密码(至少 6 位)",-1)),Ae(u("input",{type:"password",class:"input","onUpdate:modelValue":J[8]||(J[8]=Q=>P.value=Q)},null,512),[[De,P.value]])]),u("div",b1,[J[22]||(J[22]=u("label",null,"确认新主密码",-1)),Ae(u("input",{type:"password",class:"input","onUpdate:modelValue":J[9]||(J[9]=Q=>R.value=Q)},null,512),[[De,R.value]])]),X.value?(O(),F("div",w1,ne(X.value),1)):Ee("",!0),J[23]||(J[23]=u("div",{class:"muted vp-tip"},"确认后所有账号密码将使用新主密码重新加密",-1))]),u("div",_1,[u("button",{class:"btn btn-sm",onClick:J[10]||(J[10]=Q=>te.value=!1)},"取消"),u("button",{class:"btn btn-primary btn-sm",onClick:Qe},"确认修改")])])])):Ee("",!0)]),_:1})]))]))}}),C1=Qt(x1,[["__scopeId","data-v-c2db283d"]]);function S1(e){return'"'+(e==null?"":String(e)).replace(/"/g,'""')+'"'}async function Bu(e,t){const s="\uFEFF"+t.map(d=>d.map(S1).join(",")).join(`\r -`);if(ns.isNativePlatform()){const{downloadText:d}=await Pf(async()=>{const{downloadText:h}=await Promise.resolve().then(()=>pb);return{downloadText:h}},void 0,import.meta.url);return d(e,s)}const o=new Blob([s],{type:"text/csv;charset=utf-8"}),a=URL.createObjectURL(o),c=document.createElement("a");return c.href=a,c.download=e,c.click(),window.setTimeout(()=>URL.revokeObjectURL(a),1e4),""}const E1={class:"settings"},$1={class:"card section"},T1={class:"muted acc-line"},A1={class:"ai-grid"},P1={class:"rule-item"},O1={class:"rule-item"},M1={class:"rule-item"},I1={key:0,class:"form-error"},j1={class:"rule-save"},D1={class:"card section"},L1={class:"rule-grid"},R1={class:"rule-item"},K1={class:"rule-item"},F1={class:"rule-item"},N1={class:"rule-item"},V1={class:"rule-item"},B1={class:"card section"},U1={class:"proj-add"},q1={key:0,class:"muted proj-tip"},H1=["onKeydown"],W1=["onClick"],z1=["onClick"],G1=["onClick"],Y1={key:1,class:"muted"},J1={class:"card section"},X1={class:"card section"},Q1={class:"muted acc-line"},Z1={class:"rule-item"},e0={class:"rule-save"},t0=["disabled"],n0={key:0,class:"muted acc-line"},r0={key:1,class:"form-error"},s0={key:2,class:"form-error"},o0={class:"card section"},i0={class:"ai-grid"},a0={class:"rule-item"},l0={class:"rule-item"},u0={class:"rule-item"},c0={class:"card section"},f0={class:"backup-row"},d0={key:0,class:"import-error"},p0=Ht({__name:"SettingsView",setup(e){var x;const t=N({work_start:"09:00",work_end:"18:00",grace_minutes:10,lunch_minutes:60,remind_weekly:"friday"}),n=N([]),s=N(""),o=N(""),a=N(""),c=N(""),d=N(""),h=N(""),y=N(null),m=N(""),_=N(null),C=N(null),A=N(""),V=N(((x=_i())==null?void 0:x.username)||""),Z=N(""),te=N(""),ue=N(""),P=N(""),R=N(!1),X="0.2.0",fe=N(""),ie=N(""),ee=N(""),M=N(""),S=N(""),oe=N(!1),be=N("");async function z(){var k;fe.value=await Gv(),ie.value=((k=pr())==null?void 0:k.username)||"",be.value=await Zv(),S.value=Jr.value}mt(Jr,k=>{S.value=k});async function xe(){await Lv(fe.value.trim()),Ve("同步地址已保存")}async function Le(){M.value="";try{await _f(),Ve("云端绑定已重建")}catch(k){M.value=k instanceof Error?k.message:"绑定失败"}}async function rt(){if(!oe.value){M.value="",S.value=Jr.value,oe.value=!0;try{await xe();const k=await Na();be.value=k.at,ee.value="推送 "+k.pushed+" 条 · 拉取 "+k.pulled+" 条 · 删除 "+k.removed+" 条",S.value="",Ve("同步完成")}catch(k){M.value=k instanceof Error?k.message:"同步失败"}oe.value=!1}}async function He(){if(P.value="",te.value!==ue.value){P.value="两次输入的新密码不一致";return}try{await Wv(Z.value,te.value),Z.value="",te.value="",ue.value="",Ve("登录密码已修改")}catch(k){P.value=k instanceof Error?k.message:"修改失败"}}async function Ye(){await zv(),window.location.reload()}async function Ke(){t.value=await Dr(),n.value=await Ns(!0),a.value=(await hl()).join(` -`),c.value=await bt("ai_base_url",""),d.value=await bt("ai_api_key",""),h.value=await bt("ai_model",""),await z()}async function st(){await Rt("ai_base_url",c.value.trim()),await Rt("ai_api_key",d.value.trim()),await Rt("ai_model",h.value.trim()),Ve("AI 配置已保存")}async function qe(){const k=Ct(),b=await Promise.all([xi("2000-01-01",k),Ns(!0)]),W=b[0],re=b[1],le=new Map(re.map(ae=>[ae.id,ae.name])),ge=[["日期","分类","项目","内容","耗时(分钟)","成果","待跟进","收获","备注"]];for(const ae of W)ge.push([ae.date,Xo(ae.category),ae.project_id&&le.get(ae.project_id)||"",ae.content,ae.minutes==null?"":ae.minutes,ae.is_milestone?"是":"",ae.needs_followup?"是":"",ae.takeaway||"",ae.remark||""]);const me=await Bu("工作记录_"+k.replace(/-/g,"")+".csv",ge);Ve(me?"CSV 已导出到:"+me:"CSV 已导出到系统下载目录")}async function Qe(){const k=Ct(),b=await Promise.all([Dr(),ki("2000-01-01",k)]),W=b[0],re=b[1],le=["周日","周一","周二","周三","周四","周五","周六"],ge=[["日期","星期","状态","上班时间","下班时间","地点","类型","说明"]];for(const ae of re){const q=zs(ae,ae.date,W,ae.date===k);ge.push([ae.date,le[os(ae.date).getDay()],q.label,ae.clock_in_at?Bn(ae.clock_in_at):"",ae.clock_out_at?Bn(ae.clock_out_at):"",ae.location||"",ae.kind==="makeup"?"补卡":ae.kind==="leave"?"休假":"正常",ae.note||""])}const me=await Bu("考勤记录_"+k.replace(/-/g,"")+".csv",ge);Ve(me?"CSV 已导出到:"+me:"CSV 已导出到系统下载目录")}yn(Ke);async function Ce(){await Rt("work_start",t.value.work_start),await Rt("work_end",t.value.work_end),await Rt("grace_minutes",String(t.value.grace_minutes)),await Rt("lunch_minutes",String(t.value.lunch_minutes)),await Rt("remind_weekly",t.value.remind_weekly),Ve("打卡规则已保存")}async function J(){await $f(a.value.split(` -`)),Ve("常用地点已保存")}async function Q(){const k=s.value.trim();if(k){try{await mm(k),o.value="",s.value=""}catch{o.value="项目名已存在"}await Ke()}}function ke(k){y.value=k.id,m.value=k.name}async function Fe(k){const b=m.value.trim();if(b)try{await ym(k.id,b),o.value=""}catch{o.value="项目名已存在"}y.value=null,await Ke()}async function ct(k){await gm(k.id,k.archived!==1),await Ke()}async function It(){try{const k=await Bm(),b=await ml("实习日志备份_"+Ct().replace(/-/g,"")+".json",k);Ve(b?"备份已导出到:"+b:"备份已导出到系统下载目录")}catch(k){Ve("导出失败:"+(k instanceof Error?k.message:String(k)))}}function $e(k){const b=k.target,W=b.files&&b.files[0];if(A.value="",!W)return;const re=W.name;W.text().then(le=>{C.value={name:re,text:le}}),b.value=""}async function ce(){if(C.value)try{await Um(C.value.text),C.value=null,A.value="",await Ke(),Ve("数据导入完成")}catch(k){C.value=null,A.value=k instanceof Error?k.message:"导入失败"}}return(k,b)=>(O(),F("div",E1,[u("div",$1,[b[23]||(b[23]=u("div",{class:"section-title"},"账号与隐私",-1)),u("div",T1,"版本 v"+ne(Kt(X))+" · 当前用户:"+ne(V.value)+" · 每位用户独立数据库隔离存储于本机 · 登录密码仅保存 PBKDF2 哈希",1),u("div",A1,[u("div",P1,[b[20]||(b[20]=u("label",null,"旧登录密码",-1)),Ae(u("input",{type:"password",class:"input","onUpdate:modelValue":b[0]||(b[0]=W=>Z.value=W)},null,512),[[De,Z.value]])]),u("div",O1,[b[21]||(b[21]=u("label",null,"新登录密码(至少 6 位)",-1)),Ae(u("input",{type:"password",class:"input","onUpdate:modelValue":b[1]||(b[1]=W=>te.value=W)},null,512),[[De,te.value]])]),u("div",M1,[b[22]||(b[22]=u("label",null,"确认新登录密码",-1)),Ae(u("input",{type:"password",class:"input","onUpdate:modelValue":b[2]||(b[2]=W=>ue.value=W)},null,512),[[De,ue.value]])])]),P.value?(O(),F("div",I1,ne(P.value),1)):Ee("",!0),u("div",j1,[u("button",{class:"btn btn-primary btn-sm",onClick:He},"修改登录密码"),u("button",{class:"btn btn-sm btn-danger",onClick:b[3]||(b[3]=W=>R.value=!0)},"删除此用户及全部数据")])]),u("div",D1,[b[30]||(b[30]=u("div",{class:"section-title"},"打卡规则",-1)),u("div",L1,[u("div",R1,[b[24]||(b[24]=u("label",null,"上班时间",-1)),Ae(u("input",{type:"time",class:"input","onUpdate:modelValue":b[4]||(b[4]=W=>t.value.work_start=W)},null,512),[[De,t.value.work_start]])]),u("div",K1,[b[25]||(b[25]=u("label",null,"下班时间",-1)),Ae(u("input",{type:"time",class:"input","onUpdate:modelValue":b[5]||(b[5]=W=>t.value.work_end=W)},null,512),[[De,t.value.work_end]])]),u("div",F1,[b[26]||(b[26]=u("label",null,"迟到宽限(分钟)",-1)),Ae(u("input",{type:"number",class:"input",min:"0","onUpdate:modelValue":b[6]||(b[6]=W=>t.value.grace_minutes=W)},null,512),[[De,t.value.grace_minutes,void 0,{number:!0}]])]),u("div",N1,[b[27]||(b[27]=u("label",null,"午休扣除(分钟)",-1)),Ae(u("input",{type:"number",class:"input",min:"0","onUpdate:modelValue":b[7]||(b[7]=W=>t.value.lunch_minutes=W)},null,512),[[De,t.value.lunch_minutes,void 0,{number:!0}]])]),u("div",V1,[b[29]||(b[29]=u("label",null,"周记提醒",-1)),Ae(u("select",{class:"select","onUpdate:modelValue":b[8]||(b[8]=W=>t.value.remind_weekly=W)},[...b[28]||(b[28]=[u("option",{value:"friday"},"每周五提醒",-1),u("option",{value:"off"},"关闭",-1)])],512),[[Nn,t.value.remind_weekly]])])]),u("div",{class:"rule-save"},[u("button",{class:"btn btn-primary btn-sm",onClick:Ce},"保存规则")])]),u("div",B1,[b[31]||(b[31]=u("div",{class:"section-title"},"项目管理",-1)),u("div",U1,[Ae(u("input",{class:"input","onUpdate:modelValue":b[9]||(b[9]=W=>s.value=W),placeholder:"新项目名称",onKeydown:Mt(Q,["enter"])},null,544),[[De,s.value]]),u("button",{class:"btn btn-sm",onClick:Q},"添加")]),o.value?(O(),F("div",q1,ne(o.value),1)):Ee("",!0),(O(!0),F(je,null,it(n.value,W=>(O(),F("div",{key:W.id,class:"proj-row"},[y.value===W.id?(O(),F(je,{key:0},[Ae(u("input",{class:"input","onUpdate:modelValue":b[10]||(b[10]=re=>m.value=re),onKeydown:Mt(re=>Fe(W),["enter"])},null,40,H1),[[De,m.value]]),u("button",{class:"btn btn-sm",onClick:re=>Fe(W)},"保存",8,W1),u("button",{class:"btn btn-sm",onClick:b[11]||(b[11]=re=>y.value=null)},"取消")],64)):(O(),F(je,{key:1},[u("span",{class:Ze(["proj-name",{archived:W.archived===1}])},ne(W.name),3),u("button",{class:"icon-btn",title:"重命名",onClick:re=>ke(W)},[Te(et,{name:"edit",size:14})],8,z1),u("button",{class:"btn btn-sm",onClick:re=>ct(W)},ne(W.archived===1?"恢复":"归档"),9,G1)],64))]))),128)),n.value.length?Ee("",!0):(O(),F("div",Y1,"暂无项目,先添加一个"))]),u("div",J1,[b[33]||(b[33]=u("div",{class:"section-title"},"常用地点",-1)),Ae(u("textarea",{class:"textarea","onUpdate:modelValue":b[12]||(b[12]=W=>a.value=W),placeholder:"每行一个地点,如:公司、客户现场、出差、居家办公"},null,512),[[De,a.value]]),u("div",{class:"rule-save"},[u("button",{class:"btn btn-primary btn-sm",onClick:J},"保存地点"),b[32]||(b[32]=u("span",{class:"muted loc-note"},"打卡时可直接输入新地点,保存后自动加入列表",-1))])]),u("div",X1,[b[35]||(b[35]=u("div",{class:"section-title"},"多端数据同步",-1)),u("div",Q1,"云端账号:"+ne(ie.value||"未绑定")+" · 数据仅保存在服务器,本机只是实时缓存(变更 ~3 秒推上云端 + 其他端秒级自动刷新);密码库同步密文,主密码永不出本机",1),u("div",Z1,[b[34]||(b[34]=u("label",null,"同步服务地址(默认即可)",-1)),Ae(u("input",{class:"input","onUpdate:modelValue":b[13]||(b[13]=W=>fe.value=W),placeholder:"https://daywk.linyux.cn"},null,512),[[De,fe.value]])]),u("div",e0,[u("button",{class:"btn btn-sm",onClick:xe},"保存地址"),u("button",{class:"btn btn-primary btn-sm",disabled:oe.value,onClick:rt},ne(oe.value?"同步中":"立即同步"),9,t0),u("button",{class:"btn btn-sm",onClick:Le},"重建云端绑定")]),ee.value?(O(),F("div",n0,"上次同步:"+ne(be.value||"--")+" · "+ne(ee.value),1)):Ee("",!0),M.value?(O(),F("div",r0,ne(M.value),1)):Ee("",!0),S.value?(O(),F("div",s0,"最近自动同步失败:"+ne(S.value)+"(可点「立即同步」重试)",1)):Ee("",!0)]),u("div",o0,[b[40]||(b[40]=u("div",{class:"section-title"},"AI 润色配置(可选)",-1)),u("div",i0,[u("div",a0,[b[36]||(b[36]=u("label",null,"接口地址(OpenAI 兼容,到 /v1 为止)",-1)),Ae(u("input",{class:"input","onUpdate:modelValue":b[14]||(b[14]=W=>c.value=W),placeholder:"https://api.example.com/v1"},null,512),[[De,c.value]])]),u("div",l0,[b[37]||(b[37]=u("label",null,"API Key",-1)),Ae(u("input",{class:"input","onUpdate:modelValue":b[15]||(b[15]=W=>d.value=W),placeholder:"sk-..."},null,512),[[De,d.value]])]),u("div",u0,[b[38]||(b[38]=u("label",null,"模型名称",-1)),Ae(u("input",{class:"input","onUpdate:modelValue":b[16]||(b[16]=W=>h.value=W),placeholder:"如:deepseek-chat"},null,512),[[De,h.value]])])]),u("div",{class:"rule-save"},[u("button",{class:"btn btn-primary btn-sm",onClick:st},"保存 AI 配置"),b[39]||(b[39]=u("span",{class:"muted loc-note"},"配置仅保存在本机浏览器;总结页可用 AI 润色草稿,需服务端允许浏览器跨域",-1))])]),u("div",c0,[b[41]||(b[41]=u("div",{class:"section-title"},"数据备份",-1)),u("div",f0,[u("button",{class:"btn btn-sm",onClick:It},"导出 JSON 备份"),u("button",{class:"btn btn-sm",onClick:b[17]||(b[17]=W=>{var re;return(re=_.value)==null?void 0:re.click()})},"导入 JSON 备份"),u("button",{class:"btn btn-sm",onClick:qe},"导出工作记录 CSV"),u("button",{class:"btn btn-sm",onClick:Qe},"导出考勤 CSV"),u("input",{ref_key:"fileInput",ref:_,type:"file",accept:"application/json,.json",style:{display:"none"},onChange:$e},null,544)]),A.value?(O(),F("div",d0,ne(A.value),1)):Ee("",!0),b[42]||(b[42]=u("div",{class:"muted backup-note"},"数据保存在浏览器 IndexedDB 中,建议定期导出 JSON 备份。",-1))]),Te(ur,{open:!!C.value,title:"导入确认",message:C.value?"将从文件「"+C.value.name+"」导入备份。现有全部数据将被覆盖,且不可恢复,请先确认已导出当前备份。":"","confirm-text":"覆盖导入",danger:"",onCancel:b[18]||(b[18]=W=>C.value=null),onConfirm:ce},null,8,["open","message"]),Te(ur,{open:R.value,title:"删除用户确认",message:"将永久删除云端账号「"+V.value+"」及其服务器上的全部数据:工作日志、考勤、备忘录、账号密码库都将被清除,任何设备都无法再取回,且不可恢复。请确认。","confirm-text":"永久删除",danger:"",onCancel:b[19]||(b[19]=W=>R.value=!1),onConfirm:Ye},null,8,["open","message"])]))}}),h0=Qt(p0,[["__scopeId","data-v-cea34561"]]),v0={class:"login-page"},m0={class:"card login-card"},y0={class:"login-brand"},g0={class:"brand-icon"},b0={class:"seg"},w0=["placeholder"],_0={key:1,class:"form-error"},k0=["disabled"],x0=Ht({__name:"LoginView",emits:["login"],setup(e,{emit:t}){const n=t,s=N("login"),o=N(""),a=N(""),c=N(""),d=N(""),h=N(!1);function y(_){s.value=_,d.value="",c.value=""}async function m(){if(!h.value){d.value="",h.value=!0;try{let _;if(s.value==="login")_=await Vv(o.value,a.value);else{if(a.value.length<6){d.value="登录密码至少 6 位",h.value=!1;return}if(a.value!==c.value){d.value="两次输入的密码不一致",h.value=!1;return}_=await Bv(o.value,a.value)}n("login",_)}catch(_){d.value=_ instanceof Error?_.message:"操作失败"}h.value=!1}}return(_,C)=>(O(),F("div",v0,[u("div",m0,[u("div",y0,[u("div",g0,[Te(et,{name:"calendar",size:22})]),C[5]||(C[5]=u("div",{class:"login-title"},"实习工作日志",-1)),C[6]||(C[6]=u("div",{class:"muted login-sub"},"打卡 · 记录 · 总结 · 备忘录 · 密码库",-1)),C[7]||(C[7]=u("div",{class:"muted login-sub"},"数据保存在云端服务器,所有设备登录同一账号即可实时同步",-1))]),u("div",b0,[u("button",{class:Ze(["seg-btn",{active:s.value==="login"}]),onClick:C[0]||(C[0]=A=>y("login"))},"登录",2),u("button",{class:Ze(["seg-btn",{active:s.value==="create"}]),onClick:C[1]||(C[1]=A=>y("create"))},"创建用户",2)]),Ae(u("input",{class:"input","onUpdate:modelValue":C[2]||(C[2]=A=>o.value=A),placeholder:"用户名(2 到 20 个字符)",onKeydown:Mt(m,["enter"])},null,544),[[De,o.value]]),Ae(u("input",{type:"password",class:"input","onUpdate:modelValue":C[3]||(C[3]=A=>a.value=A),placeholder:s.value==="login"?"登录密码":"设置登录密码(至少 6 位)",onKeydown:Mt(m,["enter"])},null,40,w0),[[De,a.value]]),s.value==="create"?Ae((O(),F("input",{key:0,type:"password",class:"input","onUpdate:modelValue":C[4]||(C[4]=A=>c.value=A),placeholder:"再次输入密码",onKeydown:Mt(m,["enter"])},null,544)),[[De,c.value]]):Ee("",!0),d.value?(O(),F("div",_0,ne(d.value),1)):Ee("",!0),u("button",{class:"btn btn-primary login-btn",disabled:h.value,onClick:m},ne(s.value==="login"?"登录":"创建并进入"),9,k0),C[8]||(C[8]=u("div",{class:"muted login-note"}," 登录密码仅服务器保存哈希;本机保存加密的自动登录凭据,登录后无需重复输入 ",-1))])]))}}),C0=Qt(x0,[["__scopeId","data-v-bf714afa"]]),S0={key:1,class:"app"},E0={class:"side"},$0=["data-tip","onClick"],T0={class:"main"},A0={class:"topbar"},P0={class:"title"},O0={class:"gsearch"},M0={key:0,class:"gs-panel"},I0={key:0,class:"gs-group muted"},j0=["onMousedown"],D0={class:"tag"},L0={class:"gs-text"},R0={class:"muted num gs-date"},K0={key:1,class:"gs-group muted"},F0=["onMousedown"],N0={class:"gs-text"},V0={class:"muted gs-sub"},B0={key:1,class:"gs-empty muted"},U0={class:"topbar-actions"},q0={class:"user-chip num mobile-hide"},H0=["disabled"],W0={class:"num"},z0={class:"content"},G0={class:"content-inner"},Y0={class:"tabbar"},J0=["onClick"],X0={class:"sheet-user num"},Q0=["onClick"],Z0={class:"sheet-name"},ek={class:"msw"},tk={class:"msw-bar"},nk={class:"msw-results"},rk={key:0,class:"gs-group muted"},sk=["onMousedown"],ok={class:"tag"},ik={class:"gs-text"},ak={class:"muted num gs-date"},lk={key:1,class:"gs-group muted"},uk=["onMousedown"],ck={class:"gs-text"},fk={class:"muted gs-sub"},dk={key:1,class:"gs-empty muted"},pk={class:"toast-wrap"},hk=Ht({__name:"App",setup(e){const t=Hm(),n=N(_i());async function s($e){n.value=$e,ri($e.userId),location.hash="#/calendar",fe.value="calendar",await Ce(),await It(),c();try{await _f(),await Qr()}catch{}Ve("欢迎,"+$e.username);const ce=sessionStorage.getItem("dsh_migrate_toast");ce&&(sessionStorage.removeItem("dsh_migrate_toast"),Ve("已迁移原有数据 "+ce+" 条"))}async function o(){Le.value=!1,z.value=!1,sm(),a!==null&&(window.clearInterval(a),a=null),await qv(),n.value=null,fe.value="calendar",location.hash="#/calendar",Ve("已退出登录")}let a=null;function c(){rm(),a!==null&&window.clearInterval(a),a=window.setInterval(()=>{Qr()},60*1e3),Qr()}const d=N(null),h=N(""),y=N(!1),m=N({logs:[],memos:[]});let _=null;const C=ut(()=>!!(m.value.logs.length||m.value.memos.length));function A(){_&&window.clearTimeout(_);const $e=h.value;_=window.setTimeout(async()=>{const ce=$e.trim();if(!ce){m.value={logs:[],memos:[]};return}const x=await Promise.all([Dm(ce,8),Lm(ce,4)]);m.value={logs:x[0],memos:x[1]}},200)}function V(){h.value="",m.value={logs:[],memos:[]},y.value=!1}function Z($e){Ka.value=$e.date,ie("calendar"),V()}function te($e){Fa.value=$e.id,ie("memo"),V()}function ue(){window.setTimeout(()=>{y.value=!1},150)}function P($e){var ce;($e.ctrlKey||$e.metaKey)&&$e.key.toLowerCase()==="k"&&($e.preventDefault(),(ce=d.value)==null||ce.focus())}const R=[{key:"calendar",name:"日历",icon:"calendar"},{key:"today",name:"详情",icon:"edit"},{key:"stats",name:"统计",icon:"chart"},{key:"report",name:"总结",icon:"export"},{key:"ledger",name:"记账",icon:"wallet"},{key:"memo",name:"备忘录",icon:"memo"},{key:"vault",name:"密码库",icon:"lock"},{key:"settings",name:"设置",icon:"settings"}];function X(){const $e=(location.hash||"").replace("#/","");return R.some(ce=>ce.key===$e)?$e:"calendar"}const fe=N(X());window.addEventListener("hashchange",()=>{fe.value=X()});function ie($e){location.hash="#/"+$e}const ee=ut(()=>R.find($e=>$e.key===fe.value)||R[0]),M=["calendar","today","ledger","memo"],S=R.filter($e=>M.includes($e.key)),oe=R.filter($e=>!M.includes($e.key)),be=ut(()=>oe.some($e=>$e.key===fe.value)),z=N(!1);function xe($e){z.value=!1,ie($e)}const Le=N(!1),rt=N(null);function He(){Le.value=!0,window.setTimeout(()=>{var $e;return($e=rt.value)==null?void 0:$e.focus()},60)}function Ye($e){Z($e),Le.value=!1}function Ke($e){te($e),Le.value=!1}const st=N(Ct()),qe=N(void 0),Qe=N(!1);async function Ce(){if(qe.value=await gn(st.value),Qe.value=!1,new Date().getHours()<4){const ce=await gn(Fn(st.value,-1));Qe.value=!!(ce&&ce.clock_in_at&&!ce.clock_out_at)}}const J=ut(()=>{const $e=qe.value;return $e&&$e.clock_in_at&&!$e.clock_out_at?!0:Qe.value&&!($e&&$e.clock_in_at)}),Q=ut(()=>{const $e=qe.value;return!!($e&&$e.clock_in_at&&$e.clock_out_at)}),ke=ut(()=>{const $e=qe.value;return J.value?"下班打卡":Q.value?"已打卡 "+Bn($e==null?void 0:$e.clock_in_at)+" - "+Bn($e==null?void 0:$e.clock_out_at):"上班打卡"});async function Fe(){if(J.value)try{await wm()}catch{}else await Tf(st.value);await Ce(),tr()}mt(Ws,()=>{n.value&&Ce()});const ct=N(!1);async function It(){if((await Dr()).remind_weekly==="off"){ct.value=!1;return}const ce=new Date().getDay();if(ce===5||ce===6||ce===0){const x=await vl(Ts(st.value));ct.value=!x||!x.highlights&&!x.challenges&&!x.plan_next}else ct.value=!1}return yn(async()=>{window.addEventListener("keydown",P),n.value&&(ri(n.value.userId),await Ce(),await It(),c())}),($e,ce)=>{var x,k;return n.value?(O(),F("div",S0,[u("nav",E0,[(O(),F(je,null,it(R,b=>u("button",{key:b.key,class:Ze(["nav-btn",{active:fe.value===b.key}]),"data-tip":b.name,onClick:W=>ie(b.key)},[Te(et,{name:b.icon,size:18},null,8,["name"])],10,$0)),64))]),u("div",T0,[u("header",A0,[u("span",P0,ne(ee.value.name),1),u("button",{class:"mob-search-btn",title:"搜索",onClick:He},[Te(et,{name:"search",size:16})]),u("div",O0,[Te(et,{name:"search",size:14,class:"gs-icon"}),Ae(u("input",{ref_key:"gsInput",ref:d,class:"input gs-input","onUpdate:modelValue":ce[0]||(ce[0]=b=>h.value=b),placeholder:"搜索工作记录与备忘录(Ctrl+K)",onInput:A,onFocus:ce[1]||(ce[1]=b=>y.value=!0),onBlur:ue,onKeydown:Mt(V,["esc"])},null,544),[[De,h.value]]),y.value&&h.value.trim()?(O(),F("div",M0,[C.value?(O(),F(je,{key:0},[m.value.logs.length?(O(),F("div",I0,"工作记录")):Ee("",!0),(O(!0),F(je,null,it(m.value.logs,b=>(O(),F("div",{key:"l"+b.id,class:"gs-item",onMousedown:hn(W=>Z(b),["prevent"])},[u("span",D0,ne(Kt(Xo)(b.category)),1),u("span",L0,ne(b.content),1),u("span",R0,ne(b.date),1)],40,j0))),128)),m.value.memos.length?(O(),F("div",K0,"备忘录")):Ee("",!0),(O(!0),F(je,null,it(m.value.memos,b=>(O(),F("div",{key:"m"+b.id,class:"gs-item",onMousedown:hn(W=>te(b),["prevent"])},[u("span",N0,ne(b.title||"无标题"),1),u("span",V0,ne(b.content),1)],40,F0))),128))],64)):(O(),F("div",B0,"无匹配结果"))])):Ee("",!0)]),ce[12]||(ce[12]=u("span",{class:"flex1"},null,-1)),u("div",U0,[ct.value?(O(),F("button",{key:0,class:"week-tip",onClick:ce[2]||(ce[2]=b=>ie("report"))},[...ce[11]||(ce[11]=[u("span",{class:"dot",style:{background:"var(--warn)"}},null,-1),rn(" 填写本周周记 ",-1)])])):Ee("",!0),u("span",q0,ne((x=n.value)==null?void 0:x.username),1),u("button",{class:"btn btn-sm mobile-hide",onClick:o},"退出"),u("button",{class:"btn btn-primary btn-sm",disabled:Q.value,onClick:Fe},[Te(et,{name:Q.value?"check-circle":"clock",size:14},null,8,["name"]),u("span",W0,ne(ke.value),1)],8,H0)])]),u("main",z0,[u("div",G0,[fe.value==="calendar"?(O(),Lt(hg,{key:0})):fe.value==="today"?(O(),Lt(wg,{key:1})):fe.value==="stats"?(O(),Lt(Xg,{key:2})):fe.value==="report"?(O(),Lt(Jb,{key:3})):fe.value==="ledger"?(O(),Lt(c_,{key:4})):fe.value==="memo"?(O(),Lt(T_,{key:5})):fe.value==="vault"?(O(),Lt(C1,{key:6})):(O(),Lt(h0,{key:7}))])]),u("nav",Y0,[(O(!0),F(je,null,it(Kt(S),b=>(O(),F("button",{key:b.key,class:Ze(["tab-btn",{active:fe.value===b.key}]),onClick:W=>ie(b.key)},[Te(et,{name:b.icon,size:20},null,8,["name"]),u("span",null,ne(b.name),1)],10,J0))),128)),u("button",{class:Ze(["tab-btn",{active:be.value}]),onClick:ce[3]||(ce[3]=b=>z.value=!0)},[Te(et,{name:"more",size:20}),ce[13]||(ce[13]=u("span",null,"更多",-1))],2)]),z.value?(O(),F("div",{key:0,class:"sheet-mask",onClick:ce[6]||(ce[6]=b=>z.value=!1)},[u("div",{class:"more-sheet",onClick:ce[5]||(ce[5]=hn(()=>{},["stop"]))},[u("div",X0,ne((k=n.value)==null?void 0:k.username),1),(O(!0),F(je,null,it(Kt(oe),b=>(O(),F("button",{key:b.key,class:"sheet-row",onClick:W=>xe(b.key)},[Te(et,{name:b.icon,size:18},null,8,["name"]),u("span",Z0,ne(b.name),1),Te(et,{name:"chevron-right",size:14,class:"sheet-go"})],8,Q0))),128)),ce[15]||(ce[15]=u("div",{class:"sheet-divider"},null,-1)),u("button",{class:"sheet-row sheet-danger",onClick:ce[4]||(ce[4]=b=>{z.value=!1,o()})},[Te(et,{name:"close",size:18}),ce[14]||(ce[14]=u("span",{class:"sheet-name"},"退出登录",-1))])])])):Ee("",!0),Le.value?(O(),F("div",{key:1,class:"msw-mask",onClick:ce[10]||(ce[10]=hn(b=>Le.value=!1,["self"]))},[u("div",ek,[u("div",tk,[Te(et,{name:"search",size:16,class:"msw-icon"}),Ae(u("input",{ref_key:"msInput",ref:rt,class:"msw-input","onUpdate:modelValue":ce[7]||(ce[7]=b=>h.value=b),placeholder:"搜索工作记录与备忘录",onInput:A,onKeydown:ce[8]||(ce[8]=Mt(b=>Le.value=!1,["esc"]))},null,544),[[De,h.value]]),u("button",{class:"icon-btn",onClick:ce[9]||(ce[9]=b=>{V(),Le.value=!1})},[Te(et,{name:"close",size:16})])]),u("div",nk,[C.value?(O(),F(je,{key:0},[m.value.logs.length?(O(),F("div",rk,"工作记录")):Ee("",!0),(O(!0),F(je,null,it(m.value.logs,b=>(O(),F("div",{key:"l"+b.id,class:"msw-item",onMousedown:hn(W=>Ye(b),["prevent"])},[u("span",ok,ne(Kt(Xo)(b.category)),1),u("span",ik,ne(b.content),1),u("span",ak,ne(b.date),1)],40,sk))),128)),m.value.memos.length?(O(),F("div",lk,"备忘录")):Ee("",!0),(O(!0),F(je,null,it(m.value.memos,b=>(O(),F("div",{key:"m"+b.id,class:"msw-item",onMousedown:hn(W=>Ke(b),["prevent"])},[u("span",ck,ne(b.title||"无标题"),1),u("span",fk,ne(b.content),1)],40,uk))),128))],64)):h.value.trim()?(O(),F("div",dk,"无匹配结果")):Ee("",!0)])])])):Ee("",!0)]),u("div",pk,[Te(Eh,{name:"toast"},{default:fr(()=>[(O(!0),F(je,null,it(Kt(t),b=>(O(),F("div",{key:b.id,class:"toast"},ne(b.text),1))),128))]),_:1})])])):(O(),Lt(C0,{key:0,onLogin:s}))}}}),vk=Qt(hk,[["__scopeId","data-v-aa357bfc"]]);function Lo(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",o=>{o.target===n&&n.parentElement&&n.parentElement.removeChild(n)}),document.body.appendChild(n));const s=document.createElement("div");s.style.cssText="border:1px solid #E5484D;border-radius:8px;padding:12px;margin-bottom:12px;word-break:break-all;white-space:pre-wrap;",s.textContent=e+` -`+t,n.appendChild(s)}catch{}}async function mk(){const e=await Uv();e&&ri(e.userId);const t=Vh(vk);t.config.errorHandler=(n,s,o)=>{const a=n;Lo("应用内部错误(点击空白处关闭,请将以下内容发送给开发者)",a&&(a.stack||a.message)||String(n)+` -触发位置: `+o)},window.addEventListener("unhandledrejection",n=>{const s=n.reason;Lo("未处理的异步错误(点击空白处关闭)",s&&(s.stack||s.message)||String(n.reason))}),window.addEventListener("error",n=>{n.message&&n.message!=="ResizeObserver loop limit exceeded"&&Lo("运行错误(点击空白处关闭)",n.message)}),t.mount("#app"),"serviceWorker"in navigator&&location.protocol.startsWith("http")&&window.addEventListener("load",()=>{navigator.serviceWorker.register("sw.js").catch(()=>{})})}mk().catch(e=>{Lo("无法启动:连接同步服务器失败",e&&(e.stack||e.message)||String(e))});export{If as W,Pf as _,fb as b,Mf as r}; diff --git a/intern-log/dist/assets/index-CnCk6ytG.js b/intern-log/dist/assets/index-CnCk6ytG.js new file mode 100644 index 0000000..95a9272 --- /dev/null +++ b/intern-log/dist/assets/index-CnCk6ytG.js @@ -0,0 +1,26 @@ +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))s(o);new MutationObserver(o=>{for(const a of o)if(a.type==="childList")for(const c of a.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&s(c)}).observe(document,{childList:!0,subtree:!0});function n(o){const a={};return o.integrity&&(a.integrity=o.integrity),o.referrerPolicy&&(a.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?a.credentials="include":o.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function s(o){if(o.ep)return;o.ep=!0;const a=n(o);fetch(o.href,a)}})();/** +* @vue/shared v3.5.44 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function Wa(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const ft={},Ar=[],Tn=()=>{},Uu=()=>!1,li=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),ui=e=>e.startsWith("onUpdate:"),$t=Object.assign,za=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},sf=Object.prototype.hasOwnProperty,ut=(e,t)=>sf.call(e,t),Re=Array.isArray,sr=e=>qs(e)==="[object Map]",jr=e=>qs(e)==="[object Set]",Jl=e=>qs(e)==="[object Date]",We=e=>typeof e=="function",bt=e=>typeof e=="string",Pn=e=>typeof e=="symbol",ct=e=>e!==null&&typeof e=="object",qu=e=>(ct(e)||We(e))&&We(e.then)&&We(e.catch),Hu=Object.prototype.toString,qs=e=>Hu.call(e),of=e=>qs(e).slice(8,-1),Wu=e=>qs(e)==="[object Object]",Ga=e=>bt(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,ks=Wa(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),ci=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},af=/-\w/g,mn=ci(e=>e.replace(af,t=>t.slice(1).toUpperCase())),lf=/\B([A-Z])/g,dr=ci(e=>e.replace(lf,"-$1").toLowerCase()),zu=ci(e=>e.charAt(0).toUpperCase()+e.slice(1)),ra=ci(e=>e?`on${zu(e)}`:""),$n=(e,t)=>!Object.is(e,t),Po=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},di=e=>{const t=parseFloat(e);return isNaN(t)?e:t},uf=e=>{const t=bt(e)?Number(e):NaN;return isNaN(t)?e:t};let Xl;const fi=()=>Xl||(Xl=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function or(e){if(Re(e)){const t={};for(let n=0;nn.startsWith("/*")?"":n).split(cf).forEach(n=>{if(n){const s=n.split(df);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function et(e){let t="";if(bt(e))t=e;else if(Re(e))for(let n=0;nar(n,t))}const Ju=e=>!!(e&&e.__v_isRef===!0),ne=e=>bt(e)?e:e==null?"":Re(e)||ct(e)&&(e.toString===Hu||!We(e.toString))?Ju(e)?ne(e.value):JSON.stringify(e,Xu,2):String(e),Xu=(e,t)=>Ju(t)?Xu(e,t.value):sr(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,o],a)=>(n[sa(s,a)+" =>"]=o,n),{})}:jr(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>sa(n))}:Pn(t)?sa(t):ct(t)&&!Re(t)&&!Wu(t)?String(t):t,sa=(e,t="")=>{var n;return Pn(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 Dt;class bf{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&&Dt&&(Dt.active?(this.parent=Dt,this.index=(Dt.scopes||(Dt.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 s=this.scopes.slice();for(t=0,n=s.length;t0&&--this._on===0){if(Dt===this)Dt=this.prevScope;else{let t=Dt;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,s;for(n=0,s=this.effects.length;n0)return;if(Cs){let t=Cs;for(Cs=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;xs;){let t=xs;for(xs=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){e||(e=s)}t=n}}if(e)throw e}function tc(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function nc(e){let t,n=e.depsTail,s=n;for(;s;){const o=s.prevDep;s.version===-1?(s===n&&(n=o),Xa(s),_f(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=o}e.deps=t,e.depsTail=n}function ba(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===Os)||(e.globalVersion=Os,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!ba(e))))return;e.flags|=2;const t=e.dep,n=vt,s=yn;vt=e,yn=!0;try{tc(e);const o=e.fn(e._value);(t.version===0||$n(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{vt=n,yn=s,nc(e),e.flags&=-3}}function Xa(e,t=!1){const{dep:n,prevSub:s,nextSub:o}=e;if(s&&(s.nextSub=o,e.prevSub=void 0),o&&(o.prevSub=s,e.nextSub=void 0),n.subs===e&&(n.subs=s,!s&&n.computed)){n.computed.flags&=-5;for(let a=n.computed.deps;a;a=a.nextDep)Xa(a,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function _f(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let yn=!0;const sc=[];function An(){sc.push(yn),yn=!1}function On(){const e=sc.pop();yn=e===void 0?!0:e}function eu(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=vt;vt=void 0;try{t()}finally{vt=n}}}let Os=0;class kf{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 Qa{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(!vt||!yn||vt===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==vt)n=this.activeLink=new kf(vt,this),vt.deps?(n.prevDep=vt.depsTail,vt.depsTail.nextDep=n,vt.depsTail=n):vt.deps=vt.depsTail=n,oc(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const s=n.nextDep;s.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=s),n.prevDep=vt.depsTail,n.nextDep=void 0,vt.depsTail.nextDep=n,vt.depsTail=n,vt.deps===n&&(vt.deps=s)}return n}trigger(t){this.version++,Os++,this.notify(t)}notify(t){Ya();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Ja()}}}function oc(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)oc(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const wa=new WeakMap,Mr=Symbol(""),_a=Symbol(""),Ms=Symbol("");function Bt(e,t,n){if(yn&&vt){let s=wa.get(e);s||wa.set(e,s=new Map);let o=s.get(n);o||(s.set(n,o=new Qa),o.map=s,o.key=n),o.track()}}function Kn(e,t,n,s,o,a){const c=wa.get(e);if(!c){Os++;return}const f=v=>{v&&v.trigger()};if(Ya(),t==="clear")c.forEach(f);else{const v=Re(e),y=v&&Ga(n);if(v&&n==="length"){const m=Number(s);c.forEach((_,S)=>{(S==="length"||S===Ms||!Pn(S)&&S>=m)&&f(_)})}else switch((n!==void 0||c.has(void 0))&&f(c.get(n)),y&&f(c.get(Ms)),t){case"add":v?y&&f(c.get("length")):(f(c.get(Mr)),sr(e)&&f(c.get(_a)));break;case"delete":v||(f(c.get(Mr)),sr(e)&&f(c.get(_a)));break;case"set":sr(e)&&f(c.get(Mr));break}}Ja()}function Wr(e){const t=lt(e);return t===e||(Bt(t,"iterate",Ms),cn(e))?t:Mn(e)?ir(e)?t.map(n=>lr(dn(n))):t.map(lr):t.map(dn)}function pi(e){return Bt(e=lt(e),"iterate",Ms),e}function Cn(e,t){return Mn(e)?lr(ir(e)?dn(t):t):dn(t)}const xf={__proto__:null,[Symbol.iterator](){return ia(this,Symbol.iterator,e=>Cn(this,e))},concat(...e){return Wr(this).concat(...e.map(t=>Re(t)?Wr(t):t))},entries(){return ia(this,"entries",e=>(e[1]=Cn(this,e[1]),e))},every(e,t){return Dn(this,"every",e,t,void 0,arguments)},filter(e,t){return Dn(this,"filter",e,t,n=>n.map(s=>Cn(this,s)),arguments)},find(e,t){return Dn(this,"find",e,t,n=>Cn(this,n),arguments)},findIndex(e,t){return Dn(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Dn(this,"findLast",e,t,n=>Cn(this,n),arguments)},findLastIndex(e,t){return Dn(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Dn(this,"forEach",e,t,void 0,arguments)},includes(...e){return aa(this,"includes",e)},indexOf(...e){return aa(this,"indexOf",e)},join(e){return Wr(this).join(e)},lastIndexOf(...e){return aa(this,"lastIndexOf",e)},map(e,t){return Dn(this,"map",e,t,void 0,arguments)},pop(){return ms(this,"pop")},push(...e){return ms(this,"push",e)},reduce(e,...t){return nu(this,"reduce",e,t)},reduceRight(e,...t){return nu(this,"reduceRight",e,t)},shift(){return ms(this,"shift")},some(e,t){return Dn(this,"some",e,t,void 0,arguments)},splice(...e){return ms(this,"splice",e)},toReversed(){return Wr(this).toReversed()},toSorted(e){return Wr(this).toSorted(e)},toSpliced(...e){return Wr(this).toSpliced(...e)},unshift(...e){return ms(this,"unshift",e)},values(){return ia(this,"values",e=>Cn(this,e))}};function ia(e,t,n){const s=pi(e),o=s[t],a=o.call(s);if(s!==e&&!cn(e)){if(a[Symbol.toStringTag]==="Array Iterator"){const c=Object.create(Object.getPrototypeOf(a));return c.next=()=>tu(a.next(),n),o!==ic[t]&&Object.defineProperties(c,{return:{get(){const f=a.return;return typeof f=="function"?f.bind(a):f}},throw:{get(){const f=a.throw;return typeof f=="function"?f.bind(a):f}}}),c}a._next=a.next,a.next=()=>tu(a._next(),n)}return a}function tu(e,t){return e.done||(e.value=t(e.value)),e}const ic=Array.prototype;function Dn(e,t,n,s,o,a){const c=pi(e),f=c!==e&&!cn(e),v=c[t];if(v!==ic[t]){const _=v.apply(e,a);return f?dn(_):_}let y=n;c!==e&&(f?y=function(_,S){return n.call(this,Cn(e,_),S,e)}:n.length>2&&(y=function(_,S){return n.call(this,_,S,e)}));const m=v.call(c,y,s);return f&&o?o(m):m}function nu(e,t,n,s){const o=pi(e),a=o!==e&&!cn(e);let c=n,f=!1;o!==e&&(a?(f=s.length===0,c=function(y,m,_){return f&&(f=!1,y=Cn(e,y)),n.call(this,y,Cn(e,m),_,e)}):n.length>3&&(c=function(y,m,_){return n.call(this,y,m,_,e)}));const v=o[t](c,...s);return f?Cn(e,v):v}function aa(e,t,n){const s=lt(e);Bt(s,"iterate",Ms);const o=s[t](...n);return(o===-1||o===!1)&&nl(n[0])?(n[0]=lt(n[0]),s[t](...n)):o}function ms(e,t,n=[]){An(),Ya();const s=lt(e)[t].apply(e,n);return Ja(),On(),s}const Cf=Wa("__proto__,__v_isRef,__isVue"),ac=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Pn));function Sf(e){Pn(e)||(e=String(e));const t=lt(this);return Bt(t,"has",e),t.hasOwnProperty(e)}class lc{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){if(n==="__v_skip")return t.__v_skip;const o=this._isReadonly,a=this._isShallow;if(n==="__v_isReactive")return!o;if(n==="__v_isReadonly")return o;if(n==="__v_isShallow")return a;if(n==="__v_raw")return s===(o?a?Df:fc:a?dc:cc).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const c=Re(t);if(!o){let v;if(c&&(v=xf[n]))return v;if(n==="hasOwnProperty")return Sf}const f=Reflect.get(t,n,Ht(t)?t:s);if((Pn(n)?ac.has(n):Cf(n))||(o||Bt(t,"get",n),a))return f;if(Ht(f)){const v=c&&Ga(n)?f:f.value;return o&&ct(v)?xa(v):v}return ct(f)?o?xa(f):el(f):f}}class uc extends lc{constructor(t=!1){super(!1,t)}set(t,n,s,o){let a=t[n];const c=Re(t)&&Ga(n);if(!this._isShallow){const y=Mn(a);if(!cn(s)&&!Mn(s)&&(a=lt(a),s=lt(s)),!c&&Ht(a)&&!Ht(s))return y||(a.value=s),!0}const f=c?Number(n)e,ko=e=>Reflect.getPrototypeOf(e);function Af(e,t,n){return function(...s){const o=this.__v_raw,a=lt(o),c=sr(a),f=e==="entries"||e===Symbol.iterator&&c,v=e==="keys"&&c,y=o[e](...s),m=n?ka:t?lr:dn;return!t&&Bt(a,"iterate",v?_a:Mr),$t(Object.create(y),{next(){const{value:_,done:S}=y.next();return S?{value:_,done:S}:{value:f?[m(_[0]),m(_[1])]:m(_),done:S}}})}}function xo(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Of(e,t){const n={get(o){const a=this.__v_raw,c=lt(a),f=lt(o);e||($n(o,f)&&Bt(c,"get",o),Bt(c,"get",f));const{has:v}=ko(c),y=t?ka:e?lr:dn;if(v.call(c,o))return y(a.get(o));if(v.call(c,f))return y(a.get(f));a!==c&&a.get(o)},get size(){const o=this.__v_raw;return!e&&Bt(lt(o),"iterate",Mr),o.size},has(o){const a=this.__v_raw,c=lt(a),f=lt(o);return e||($n(o,f)&&Bt(c,"has",o),Bt(c,"has",f)),o===f?a.has(o):a.has(o)||a.has(f)},forEach(o,a){const c=this,f=c.__v_raw,v=lt(f),y=t?ka:e?lr:dn;return!e&&Bt(v,"iterate",Mr),f.forEach((m,_)=>o.call(a,y(m),y(_),c))}};return $t(n,e?{add:xo("add"),set:xo("set"),delete:xo("delete"),clear:xo("clear")}:{add(o){const a=lt(this),c=ko(a),f=lt(o),v=!t&&!cn(o)&&!Mn(o)?f:o;return c.has.call(a,v)||$n(o,v)&&c.has.call(a,o)||$n(f,v)&&c.has.call(a,f)||(a.add(v),Kn(a,"add",v,v)),this},set(o,a){!t&&!cn(a)&&!Mn(a)&&(a=lt(a));const c=lt(this),{has:f,get:v}=ko(c);let y=f.call(c,o);y||(o=lt(o),y=f.call(c,o));const m=v.call(c,o);return c.set(o,a),y?$n(a,m)&&Kn(c,"set",o,a):Kn(c,"add",o,a),this},delete(o){const a=lt(this),{has:c,get:f}=ko(a);let v=c.call(a,o);v||(o=lt(o),v=c.call(a,o)),f&&f.call(a,o);const y=a.delete(o);return v&&Kn(a,"delete",o,void 0),y},clear(){const o=lt(this),a=o.size!==0,c=o.clear();return a&&Kn(o,"clear",void 0,void 0),c}}),["keys","values","entries",Symbol.iterator].forEach(o=>{n[o]=Af(o,e,t)}),n}function Za(e,t){const n=Of(e,t);return(s,o,a)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_isShallow"?t:o==="__v_raw"?s:Reflect.get(ut(n,o)&&o in s?n:s,o,a)}const Mf={get:Za(!1,!1)},If={get:Za(!1,!0)},jf={get:Za(!0,!1)};const cc=new WeakMap,dc=new WeakMap,fc=new WeakMap,Df=new WeakMap;function Lf(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function el(e){return Mn(e)?e:tl(e,!1,$f,Mf,cc)}function Rf(e){return tl(e,!1,Pf,If,dc)}function xa(e){return tl(e,!0,Tf,jf,fc)}function tl(e,t,n,s,o){if(!ct(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const a=o.get(e);if(a)return a;const c=Lf(of(e));if(c===0)return e;const f=new Proxy(e,c===2?s:n);return o.set(e,f),f}function ir(e){return Mn(e)?ir(e.__v_raw):!!(e&&e.__v_isReactive)}function Mn(e){return!!(e&&e.__v_isReadonly)}function cn(e){return!!(e&&e.__v_isShallow)}function nl(e){return e?!!e.__v_raw:!1}function lt(e){const t=e&&e.__v_raw;return t?lt(t):e}function Kf(e){return!ut(e,"__v_skip")&&Object.isExtensible(e)&&Gu(e,"__v_skip",!0),e}const dn=e=>ct(e)?el(e):e,lr=e=>ct(e)?xa(e):e;function Ht(e){return e?e.__v_isRef===!0:!1}function L(e){return Ff(e,!1)}function Ff(e,t){return Ht(e)?e:new Nf(e,t)}class Nf{constructor(t,n){this.dep=new Qa,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:lt(t),this._value=n?t:dn(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||cn(t)||Mn(t);t=s?t:lt(t),$n(t,n)&&(this._rawValue=t,this._value=s?t:dn(t),this.dep.trigger())}}function Ut(e){return Ht(e)?e.value:e}const Vf={get:(e,t,n)=>t==="__v_raw"?e:Ut(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const o=e[t];return Ht(o)&&!Ht(n)?(o.value=n,!0):Reflect.set(e,t,n,s)}};function pc(e){return ir(e)?e:new Proxy(e,Vf)}class Bf{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Qa(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Os-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&vt!==this)return ec(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 Uf(e,t,n=!1){let s,o;return We(e)?s=e:(s=e.get,o=e.set),new Bf(s,o,n)}const Co={},Fo=new WeakMap;let Er;function qf(e,t=!1,n=Er){if(n){let s=Fo.get(n);s||Fo.set(n,s=[]),s.push(e)}}function Hf(e,t,n=ft){const{immediate:s,deep:o,once:a,scheduler:c,augmentJob:f,call:v}=n,y=Z=>o?Z:cn(Z)||o===!1||o===0?Fn(Z,1):Fn(Z);let m,_,S,$,U=!1,re=!1;if(Ht(e)?(_=()=>e.value,U=cn(e)):ir(e)?(_=()=>y(e),U=!0):Re(e)?(re=!0,U=e.some(Z=>ir(Z)||cn(Z)),_=()=>e.map(Z=>{if(Ht(Z))return Z.value;if(ir(Z))return y(Z);if(We(Z))return v?v(Z,2):Z()})):We(e)?t?_=v?()=>v(e,2):e:_=()=>{if(S){An();try{S()}finally{On()}}const Z=Er;Er=m;try{return v?v(e,3,[$]):e($)}finally{Er=Z}}:_=Tn,t&&o){const Z=_,de=o===!0?1/0:o;_=()=>Fn(Z(),de)}const se=wf(),ie=()=>{m.stop(),se&&se.active&&za(se.effects,m)};if(a&&t){const Z=t;t=(...de)=>{try{return Z(...de)}finally{ie()}}}let T=re?new Array(e.length).fill(Co):Co;const I=Z=>{if(!(!(m.flags&1)||!m.dirty&&!Z))if(t){const de=m.run();if(Z||o||U||(re?de.some((ae,X)=>$n(ae,T[X])):$n(de,T))){const ae=Er;An();try{S&&S(),Er=m;const X=[de,T===Co?void 0:re&&T[0]===Co?[]:T,$];T=de,v?v(t,3,X):t(...X)}finally{Er=ae,On()}}}else m.run()};return f&&f(I),m=new Qu(_),m.scheduler=c?()=>c(I,!1):I,$=Z=>qf(Z,!1,m),S=m.onStop=()=>{const Z=Fo.get(m);if(Z){if(v)v(Z,4);else for(const de of Z)de();Fo.delete(m)}},t?s?I(!0):T=m.run():c?c(I.bind(null,!0),!0):m.run(),ie.pause=m.pause.bind(m),ie.resume=m.resume.bind(m),ie.stop=ie,ie}function Fn(e,t=1/0,n){if(t<=0||!ct(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Ht(e))Fn(e.value,t,n);else if(Re(e))for(let s=0;s{Fn(s,t,n)});else if(Wu(e)){for(const s in e)Fn(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&Fn(e[s],t,n)}return e}/** +* @vue/runtime-core v3.5.44 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function Hs(e,t,n,s){try{return s?e(...s):e()}catch(o){vi(o,t,n)}}function fn(e,t,n,s){if(We(e)){const o=Hs(e,t,n,s);return o&&qu(o)&&o.catch(a=>{vi(a,t,n)}),o}if(Re(e)){const o=[];for(let a=0;a>>1,o=Xt[s],a=Is(o);a=Is(n)?Xt.push(e):Xt.splice(zf(t),0,e),e.flags|=1,hc()}}function hc(){No||(No=vc.then(gc))}function Gf(e){if(!Re(e))nr&&e.id===-1?nr.splice(zr+1,0,e):e.flags&1||(Sn.push(e),e.flags|=1);else for(let t=0;t=t))continue;Xt.splice(s,1),s=e?s-1:hn,o.flags&4&&(o.flags&=-2),o(),o.flags&4||(o.flags&=-2)}}}function yc(e,t,n=0){if(Sn.length){let s=Sn,o=0;if(t){s=[];for(let c=0;cIs(c)-Is(f));if(Sn.length=o,nr){for(let c=0;ce.id==null?e.flags&2?-1:1/0:e.id;function gc(e){try{for(hn=0;hn{s._d&&Ho(-1);const a=Vo(t),c=Ir.length;let f;try{f=e(...o)}finally{for(let v=Ir.length;v>c;v--)zc();Vo(a),s._d&&Ho(1)}return f};return s._n=!0,s._c=!0,s._d=!0,s}function $e(e,t){if(un===null)return e;const n=wi(un),s=e.dirs||(e.dirs=[]);for(let o=0;o1)return n&&We(t)?t.call(s&&s.proxy):t}}const Xf=Symbol.for("v-scx"),Qf=()=>Ao(Xf);function ht(e,t,n){return wc(e,t,n)}function wc(e,t,n=ft){const{immediate:s,deep:o,flush:a,once:c}=n,f=$t({},n),v=t&&s||!t&&a!=="post";let y;if(Fs){if(a==="sync"){const $=Qf();y=$.__watcherHandles||($.__watcherHandles=[])}else if(!v){const $=()=>{};return $.stop=Tn,$.resume=Tn,$.pause=Tn,$}}const m=Qt;f.call=($,U,re)=>fn($,m,U,re);let _=!1;a==="post"?f.scheduler=$=>{$.i=m,Jt($,m&&m.suspense)}:a!=="sync"&&(_=!0,f.scheduler=($,U)=>{U?$():rl($)}),f.augmentJob=$=>{t&&($.flags|=4),_&&($.flags|=2,m&&($.id=m.uid,$.i=m))};const S=Hf(e,t,f);return Fs&&(y?y.push(S):v&&S()),S}function Zf(e,t,n){const s=this.proxy,o=bt(e)?e.includes(".")?_c(s,e):()=>s[e]:e.bind(s,s);let a;We(t)?a=t:(a=t.handler,n=t);const c=Ws(this),f=wc(o,a.bind(s),n);return c(),f}function _c(e,t){const n=t.split(".");return()=>{let s=e;for(let o=0;oe.__isTeleport,$r=e=>e&&(e.disabled||e.disabled===""),ep=e=>e&&(e.defer||e.defer===""),ru=e=>typeof SVGElement<"u"&&e instanceof SVGElement,su=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Ca=(e,t)=>{const n=e&&e.to;return bt(n)?t?t(n):null:n},tp={name:"Teleport",__isTeleport:!0,process(e,t,n,s,o,a,c,f,v,y){const{mc:m,pc:_,pbc:S,o:{insert:$,querySelector:U,createText:re,createComment:se,parentNode:ie}}=y,T=$r(t.props);let{dynamicChildren:I}=t;const Z=(X,O,x)=>{X.shapeFlag&16&&m(X.children,O,x,o,a,c,f,v)},de=(X=t)=>{const O=$r(X.props),x=X.target=Ca(X.props,U),V=Sa(x,X,re,$);x&&(c!=="svg"&&ru(x)?c="svg":c!=="mathml"&&su(x)&&(c="mathml"),o&&o.isCE&&(o.ce._teleportTargets||(o.ce._teleportTargets=new Set)).add(x),O||(Z(X,x,V),bs(X,!1)))},ae=X=>{const O=()=>{if(er.get(X)===O){if(er.delete(X),$r(X.props)){const x=ie(X.el)||n;Z(X,x,X.anchor),bs(X,!0)}de(X)}};er.set(X,O),Jt(O,a)};if(e==null){const X=t.el=re(""),O=t.anchor=re("");if($(X,n,s),$(O,n,s),ep(t.props)||a&&a.pendingBranch){ae(t);return}T&&(Z(t,n,O),bs(t,!0)),de()}else{t.el=e.el;const X=t.anchor=e.anchor,O=er.get(e);if(O){O.flags|=8,er.delete(e),ae(t);return}t.targetStart=e.targetStart;const x=t.target=e.target,V=t.targetAnchor=e.targetAnchor,ue=$r(e.props),W=ue?n:x,ke=ue?X:V;if(c==="svg"||ru(x)?c="svg":(c==="mathml"||su(x))&&(c="mathml"),I?(S(e.dynamicChildren,I,W,o,a,c,f),al(e,t,!0)):v||_(e,t,W,ke,o,a,c,f,!1),T)ue?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):So(t,n,X,y,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const Te=Ca(t.props,U);Te&&(t.target=Te,So(t,Te,null,y,0))}else ue&&So(t,x,V,y,1);bs(t,T)}},remove(e,t,n,{um:s,o:{remove:o}},a){const{shapeFlag:c,children:f,anchor:v,targetStart:y,targetAnchor:m,target:_,props:S}=e,$=$r(S),U=a||!$,re=er.get(e);if(re&&(re.flags|=8,er.delete(e)),_&&(o(y),o(m)),a&&o(v),!re&&($||_)&&c&16)for(let se=0;se{e.isMounted=!0}),Ac(()=>{e.isUnmounting=!0}),e}const an=[Function,Array],Cc={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},rp={name:"BaseTransition",props:Cc,setup(e,{slots:t}){const n=ll(),s=xc();return()=>{const o=t.default&&sl(t.default(),!0),a=o&&o.length?Sc(o):n.subTree?xe():void 0;if(!a)return;const c=lt(e),{mode:f}=c;if(s.isLeaving)return ua(a);const v=Bo(a);if(!v)return ua(a);let y=js(v,c,s,n,_=>y=_);v.type!==qt&&ur(v,y);let m=n.subTree&&Bo(n.subTree);if(m&&m.type!==qt&&!Tr(m,v)&&Ds(n.subTree)){let _=js(m,c,s,n);if(ur(m,_),f==="out-in"&&v.type!==qt)return s.isLeaving=!0,_.afterLeave=()=>{s.isLeaving=!1,n.job.flags&8||n.update(),delete _.afterLeave,m=void 0},ua(a);f==="in-out"&&v.type!==qt?_.delayLeave=(S,$,U)=>{const re=Ec(s,m);re[String(m.key)]=m,S[ln]=()=>{$(),S[ln]=void 0,delete y.delayedLeave,m=void 0},y.delayedLeave=()=>{U(),delete y.delayedLeave,m=void 0}}:m=void 0}else m&&(m=void 0);return a}}};function Sc(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==qt){t=n;break}}return t}const sp=rp;function Ec(e,t){const{leavingVNodes:n}=e;let s=n.get(t.type);return s||(s=Object.create(null),n.set(t.type,s)),s}function js(e,t,n,s,o){const{appear:a,mode:c,persisted:f=!1,onBeforeEnter:v,onEnter:y,onAfterEnter:m,onEnterCancelled:_,onBeforeLeave:S,onLeave:$,onAfterLeave:U,onLeaveCancelled:re,onBeforeAppear:se,onAppear:ie,onAfterAppear:T,onAppearCancelled:I}=t,Z=String(e.key),de=Ec(n,e),ae=(x,V)=>{x&&fn(x,s,9,V)},X=(x,V)=>{const ue=V[1];ae(x,V),Re(x)?x.every(W=>W.length<=1)&&ue():x.length<=1&&ue()},O={mode:c,persisted:f,beforeEnter(x){let V=v;if(!n.isMounted)if(a)V=se||v;else return;x[ln]&&x[ln](!0);const ue=de[Z];if(ue&&Tr(e,ue)){let W=ue.el[ln];if(!W){const ke=Ds(ue);W=ke&&ke.el[ln]}W&&W()}ae(V,[x])},enter(x){if(de[Z]===e)return;let V=y,ue=m,W=_;if(!n.isMounted)if(a)V=ie||y,ue=T||m,W=I||_;else return;let ke=!1;x[ys]=Je=>{ke||(ke=!0,Je?ae(W,[x]):ae(ue,[x]),O.delayedLeave&&O.delayedLeave(),x[ys]=void 0)};const Te=x[ys].bind(null,!1);V?X(V,[x,Te]):Te()},leave(x,V){const ue=String(e.key);if(x[ys]&&x[ys](!0),n.isUnmounting)return V();ae(S,[x]);let W=!1;x[ln]=Te=>{W||(W=!0,V(),Te?ae(re,[x]):ae(U,[x]),x[ln]=void 0,de[ue]===e&&delete de[ue])};const ke=x[ln].bind(null,!1);de[ue]=e,$?X($,[x,ke]):ke()},clone(x){const V=js(x,t,n,s,o);return o&&o(V),V}};return O}function ua(e){if(mi(e))return e=cr(e),e.children=null,e}function Bo(e){if(!mi(e))return hi(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&&We(n.default))return n.default()}}function ur(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;const n=e.component.subTree;ur(hi(n.type)&&Bo(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&&Re(e.children)){const n=Dc(e.children,!1);n&&ur(n,t)}}function sl(e,t=!1,n){let s=[],o=0;for(let a=0;a1)for(let a=0;aSs(re,t&&(Re(t)?t[se]:t),n,s,o));return}if(Es(s)&&!o){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&Ss(e,t,n,s.component.subTree);return}const a=s.shapeFlag&4?wi(s.component):s.el,c=o?null:a,{i:f,r:v}=e,y=t&&t.r,m=f.refs===ft?f.refs={}:f.refs,_=f.setupState,S=lt(_),$=_===ft?Uu:re=>ou(m,re)?!1:ut(S,re),U=(re,se)=>!(se&&ou(m,se));if(y!=null&&y!==v){if(iu(t),bt(y))m[y]=null,$(y)&&(_[y]=null);else if(Ht(y)){const re=t;U(y,re.k)&&(y.value=null),re.k&&(m[re.k]=null)}}if(We(v))Hs(v,f,12,[c,m]);else{const re=bt(v),se=Ht(v);if(re||se){const ie=()=>{if(e.f){const T=re?$(v)?_[v]:m[v]:U()||!e.k?v.value:m[e.k];if(o)Re(T)&&za(T,a);else if(Re(T))T.includes(a)||T.push(a);else if(re)m[v]=[a],$(v)&&(_[v]=m[v]);else{const I=[a];U(v,e.k)&&(v.value=I),e.k&&(m[e.k]=I)}}else re?(m[v]=c,$(v)&&(_[v]=c)):se&&(U(v,e.k)&&(v.value=c),e.k&&(m[e.k]=c))};if(c){const T=()=>{ie(),Uo.delete(e)};T.id=-1,Uo.set(e,T),Jt(T,n)}else iu(e),ie()}}}function iu(e){const t=Uo.get(e);t&&(t.flags|=8,Uo.delete(e))}fi().requestIdleCallback;fi().cancelIdleCallback;const Es=e=>!!e.type.__asyncLoader,mi=e=>e.type.__isKeepAlive;function op(e,t){Tc(e,"a",t)}function ip(e,t){Tc(e,"da",t)}function Tc(e,t,n=Qt){const s=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(yi(t,s,n),n){let o=n.parent;for(;o&&o.parent;)mi(o.parent.vnode)&&ap(s,t,n,o),o=o.parent}}function ap(e,t,n,s){const o=yi(t,e,s,!0);pr(()=>{za(s[t],o)},n)}function yi(e,t,n=Qt,s=!1){if(n){const o=n[e]||(n[e]=[]),a=t.__weh||(t.__weh=(...c)=>{An();const f=Ws(n),v=fn(t,n,e,c);return f(),On(),v});return s?o.unshift(a):o.push(a),a}}const Hn=e=>(t,n=Qt)=>{(!Fs||e==="sp")&&yi(e,(...s)=>t(...s),n)},lp=Hn("bm"),pn=Hn("m"),up=Hn("bu"),Pc=Hn("u"),Ac=Hn("bum"),pr=Hn("um"),cp=Hn("sp"),dp=Hn("rtg"),fp=Hn("rtc");function pp(e,t=Qt){yi("ec",e,t)}const vp=Symbol.for("v-ndc");function ot(e,t,n,s){let o;const a=n,c=Re(e);if(c||bt(e)){const f=c&&ir(e);let v=!1,y=!1;f&&(v=!cn(e),y=Mn(e),e=pi(e)),o=new Array(e.length);for(let m=0,_=e.length;m<_;m++)o[m]=t(v?y?lr(dn(e[m])):dn(e[m]):e[m],m,void 0,a)}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,a));else{const f=Object.keys(e);o=new Array(f.length);for(let v=0,y=f.length;ve?Xc(e)?wi(e):Ea(e.parent):null,$s=$t(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=>Ea(e.parent),$root:e=>Ea(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Mc(e),$forceUpdate:e=>e.f||(e.f=()=>{rl(e.update)}),$nextTick:e=>e.n||(e.n=ss.bind(e.proxy)),$watch:e=>Zf.bind(e)}),ca=(e,t)=>e!==ft&&!e.__isScriptSetup&&ut(e,t),hp={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:o,props:a,accessCache:c,type:f,appContext:v}=e;if(t[0]!=="$"){const S=c[t];if(S!==void 0)switch(S){case 1:return s[t];case 2:return o[t];case 4:return n[t];case 3:return a[t]}else{if(ca(s,t))return c[t]=1,s[t];if(o!==ft&&ut(o,t))return c[t]=2,o[t];if(ut(a,t))return c[t]=3,a[t];if(n!==ft&&ut(n,t))return c[t]=4,n[t];$a&&(c[t]=0)}}const y=$s[t];let m,_;if(y)return t==="$attrs"&&Bt(e.attrs,"get",""),y(e);if((m=f.__cssModules)&&(m=m[t]))return m;if(n!==ft&&ut(n,t))return c[t]=4,n[t];if(_=v.config.globalProperties,ut(_,t))return _[t]},set({_:e},t,n){const{data:s,setupState:o,ctx:a}=e;return ca(o,t)?(o[t]=n,!0):s!==ft&&ut(s,t)?(s[t]=n,!0):ut(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(a[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:o,props:a,type:c}},f){let v;return!!(n[f]||e!==ft&&f[0]!=="$"&&ut(e,f)||ca(t,f)||ut(a,f)||ut(s,f)||ut($s,f)||ut(o.config.globalProperties,f)||(v=c.__cssModules)&&v[f])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:ut(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function au(e){return Re(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let $a=!0;function mp(e){const t=Mc(e),n=e.proxy,s=e.ctx;$a=!1,t.beforeCreate&&lu(t.beforeCreate,e,"bc");const{data:o,computed:a,methods:c,watch:f,provide:v,inject:y,created:m,beforeMount:_,mounted:S,beforeUpdate:$,updated:U,activated:re,deactivated:se,beforeDestroy:ie,beforeUnmount:T,destroyed:I,unmounted:Z,render:de,renderTracked:ae,renderTriggered:X,errorCaptured:O,serverPrefetch:x,expose:V,inheritAttrs:ue,components:W,directives:ke,filters:Te}=t;if(y&&yp(y,s,null),c)for(const qe in c){const Ke=c[qe];We(Ke)&&(s[qe]=Ke.bind(n))}if(o){const qe=o.call(n,n);ct(qe)&&(e.data=el(qe))}if($a=!0,a)for(const qe in a){const Ke=a[qe],it=We(Ke)?Ke.bind(n,n):We(Ke.get)?Ke.get.bind(n,n):Tn,Ge=!We(Ke)&&We(Ke.set)?Ke.set.bind(n):Tn,Qe=st({get:it,set:Ge});Object.defineProperty(s,qe,{enumerable:!0,configurable:!0,get:()=>Qe.value,set:Ce=>Qe.value=Ce})}if(f)for(const qe in f)Oc(f[qe],s,n,qe);if(v){const qe=We(v)?v.call(n):v;Reflect.ownKeys(qe).forEach(Ke=>{Jf(Ke,qe[Ke])})}m&&lu(m,e,"c");function Le(qe,Ke){Re(Ke)?Ke.forEach(it=>qe(it.bind(n))):Ke&&qe(Ke.bind(n))}if(Le(lp,_),Le(pn,S),Le(up,$),Le(Pc,U),Le(op,re),Le(ip,se),Le(pp,O),Le(fp,ae),Le(dp,X),Le(Ac,T),Le(pr,Z),Le(cp,x),Re(V))if(V.length){const qe=e.exposed||(e.exposed={});V.forEach(Ke=>{Object.defineProperty(qe,Ke,{get:()=>n[Ke],set:it=>n[Ke]=it,enumerable:!0})})}else e.exposed||(e.exposed={});de&&e.render===Tn&&(e.render=de),ue!=null&&(e.inheritAttrs=ue),W&&(e.components=W),ke&&(e.directives=ke),x&&$c(e)}function yp(e,t,n=Tn){Re(e)&&(e=Ta(e));for(const s in e){const o=e[s];let a;ct(o)?"default"in o?a=Ao(o.from||s,o.default,!0):a=Ao(o.from||s):a=Ao(o),Ht(a)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>a.value,set:c=>a.value=c}):t[s]=a}}function lu(e,t,n){fn(Re(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function Oc(e,t,n,s){let o=s.includes(".")?_c(n,s):()=>n[s];if(bt(e)){const a=t[e];We(a)&&ht(o,a)}else if(We(e))ht(o,e.bind(n));else if(ct(e))if(Re(e))e.forEach(a=>Oc(a,t,n,s));else{const a=We(e.handler)?e.handler.bind(n):t[e.handler];We(a)&&ht(o,a,e)}}function Mc(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:o,optionsCache:a,config:{optionMergeStrategies:c}}=e.appContext,f=a.get(t);let v;return f?v=f:!o.length&&!n&&!s?v=t:(v={},o.length&&o.forEach(y=>qo(v,y,c,!0)),qo(v,t,c)),ct(t)&&a.set(t,v),v}function qo(e,t,n,s=!1){const{mixins:o,extends:a}=t;a&&qo(e,a,n,!0),o&&o.forEach(c=>qo(e,c,n,!0));for(const c in t)if(!(s&&c==="expose")){const f=gp[c]||n&&n[c];e[c]=f?f(e[c],t[c]):t[c]}return e}const gp={data:uu,props:cu,emits:cu,methods:ws,computed:ws,beforeCreate:Yt,created:Yt,beforeMount:Yt,mounted:Yt,beforeUpdate:Yt,updated:Yt,beforeDestroy:Yt,beforeUnmount:Yt,destroyed:Yt,unmounted:Yt,activated:Yt,deactivated:Yt,errorCaptured:Yt,serverPrefetch:Yt,components:ws,directives:ws,watch:wp,provide:uu,inject:bp};function uu(e,t){return t?e?function(){return $t(We(e)?e.call(this,this):e,We(t)?t.call(this,this):t)}:t:e}function bp(e,t){return ws(Ta(e),Ta(t))}function Ta(e){if(Re(e)){const t={};for(let n=0;nt==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${mn(t)}Modifiers`]||e[`${dr(t)}Modifiers`];function Cp(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||ft;let o=n;const a=t.startsWith("update:"),c=a&&xp(s,t.slice(7));c&&(c.trim&&(o=n.map(m=>bt(m)?m.trim():m)),c.number&&(o=o.map(di)));let f,v=s[f=ra(t)]||s[f=ra(mn(t))];!v&&a&&(v=s[f=ra(dr(t))]),v&&fn(v,e,6,o);const y=s[f+"Once"];if(y){if(!e.emitted)e.emitted={};else if(e.emitted[f])return;e.emitted[f]=!0,fn(y,e,6,o)}}const Sp=new WeakMap;function jc(e,t,n=!1){const s=n?Sp:t.emitsCache,o=s.get(e);if(o!==void 0)return o;const a=e.emits;let c={},f=!1;if(!We(e)){const v=y=>{const m=jc(y,t,!0);m&&(f=!0,$t(c,m))};!n&&t.mixins.length&&t.mixins.forEach(v),e.extends&&v(e.extends),e.mixins&&e.mixins.forEach(v)}return!a&&!f?(ct(e)&&s.set(e,null),null):(Re(a)?a.forEach(v=>c[v]=null):$t(c,a),ct(e)&&s.set(e,c),c)}function gi(e,t){return!e||!li(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),ut(e,t[0].toLowerCase()+t.slice(1))||ut(e,dr(t))||ut(e,t))}function du(e){const{type:t,vnode:n,proxy:s,withProxy:o,propsOptions:[a],slots:c,attrs:f,emit:v,render:y,renderCache:m,props:_,data:S,setupState:$,ctx:U,inheritAttrs:re}=e,se=Vo(e);let ie,T;try{if(n.shapeFlag&4){const Z=o||s,de=Z;ie=En(y.call(de,Z,m,_,$,S,U)),T=f}else{const Z=t;ie=En(Z.length>1?Z(_,{attrs:f,slots:c,emit:v}):Z(_,null)),T=t.props?f:Ep(f)}}catch(Z){Ir.length=0,vi(Z,e,1),ie=Ee(qt)}let I=ie;if(T&&re!==!1){const Z=Object.keys(T),{shapeFlag:de}=I;Z.length&&de&7&&(a&&Z.some(ui)&&(T=$p(T,a)),I=cr(I,T,!1,!0))}if(n.dirs&&(I=cr(I,null,!1,!0),I.dirs=I.dirs?I.dirs.concat(n.dirs):n.dirs),n.transition){const Z=hi(I.type)&&Bo(I)||I;ur(Z,n.transition)}return ie=I,Vo(se),ie}function Dc(e,t=!0){let n;for(let s=0;s{let t;for(const n in e)(n==="class"||n==="style"||li(n))&&((t||(t={}))[n]=e[n]);return t},$p=(e,t)=>{const n={};for(const s in e)(!ui(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function Tp(e,t,n){const{props:s,children:o,component:a}=e,{props:c,children:f,patchFlag:v}=t,y=a.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&v>=0){if(v&1024)return!0;if(v&16)return s?fu(s,c,y):!!c;if(v&8){const m=t.dynamicProps;for(let _=0;_Object.create(Rc),Fc=e=>Object.getPrototypeOf(e)===Rc;function Ap(e,t,n,s=!1){const o={},a=Kc();e.propsDefaults=Object.create(null),Nc(e,t,o,a);for(const c in e.propsOptions[0])c in o||(o[c]=void 0);n?e.props=s?o:Rf(o):e.type.props?e.props=o:e.props=a,e.attrs=a}function Op(e,t,n,s){const{props:o,attrs:a,vnode:{patchFlag:c}}=e,f=lt(o),[v]=e.propsOptions;let y=!1;if((s||c>0)&&!(c&16)){if(c&8){const m=e.vnode.dynamicProps;for(let _=0;_{v=!0;const[S,$]=Vc(_,t,!0);$t(c,S),$&&f.push(...$)};!n&&t.mixins.length&&t.mixins.forEach(m),e.extends&&m(e.extends),e.mixins&&e.mixins.forEach(m)}if(!a&&!v)return ct(e)&&s.set(e,Ar),Ar;if(Re(a))for(let m=0;me==="_"||e==="_ctx"||e==="$stable",il=e=>Re(e)?e.map(En):[En(e)],Ip=(e,t,n)=>{if(t._n)return t;const s=fr((...o)=>il(t(...o)),n);return s._c=!1,s},Bc=(e,t,n)=>{const s=e._ctx;for(const o in e){if(ol(o))continue;const a=e[o];if(We(a))t[o]=Ip(o,a,s);else if(a!=null){const c=il(a);t[o]=()=>c}}},Uc=(e,t)=>{const n=il(t);e.slots.default=()=>n},qc=(e,t,n)=>{for(const s in t)(n||!ol(s))&&(e[s]=t[s])},jp=(e,t,n)=>{const s=e.slots=Kc();if(e.vnode.shapeFlag&32){const o=t._;o?(qc(s,t,n),n&&Gu(s,"_",o,!0)):Bc(t,s)}else t&&Uc(e,t)},Dp=(e,t,n)=>{const{vnode:s,slots:o}=e;let a=!0,c=ft;if(s.shapeFlag&32){const f=t._;f?n&&f===1?a=!1:qc(o,t,n):(a=!t.$stable,Bc(t,o)),c=t}else t&&(Uc(e,t),c={default:1});if(a)for(const f in o)!ol(f)&&c[f]==null&&delete o[f]},Jt=Np;function Lp(e){return Rp(e)}function Rp(e,t){const n=fi();n.__VUE__=!0;const{insert:s,remove:o,patchProp:a,createElement:c,createText:f,createComment:v,setText:y,setElementText:m,parentNode:_,nextSibling:S,setScopeId:$=Tn,insertStaticContent:U}=e,re=(b,g,C,Y=null,R=null,le=null,ge=void 0,me=null,ce=!!g.dynamicChildren)=>{if(b===g)return;b&&!Tr(b,g)&&(Y=dt(b),Ce(b,R,le,!0),b=null),g.patchFlag===-2&&(ce=!1,g.dynamicChildren=null),g.dynamicChildren&&b&&b.dynamicChildren&&b.dynamicChildren.hasOnce&&(g.dynamicChildren===Ar&&(g.dynamicChildren=[]),g.dynamicChildren.hasOnce=!0);const{type:z,ref:G,shapeFlag:Q}=g;switch(z){case bi:se(b,g,C,Y);break;case qt:ie(b,g,C,Y);break;case Oo:b==null&&T(g,C,Y,ge);break;case je:W(b,g,C,Y,R,le,ge,me,ce);break;default:Q&1?de(b,g,C,Y,R,le,ge,me,ce):Q&6?ke(b,g,C,Y,R,le,ge,me,ce):(Q&64||Q&128)&&z.process(b,g,C,Y,R,le,ge,me,ce,Ot)}G!=null&&R?Ss(G,b&&b.ref,le,g||b,!g):G==null&&b&&b.ref!=null&&Ss(b.ref,null,le,b,!0)},se=(b,g,C,Y)=>{if(b==null)s(g.el=f(g.children),C,Y);else{const R=g.el=b.el;g.children!==b.children&&y(R,g.children)}},ie=(b,g,C,Y)=>{b==null?s(g.el=v(g.children||""),C,Y):g.el=b.el},T=(b,g,C,Y)=>{[b.el,b.anchor]=U(b.children,g,C,Y,b.el,b.anchor)},I=({el:b,anchor:g},C,Y)=>{let R;for(;b&&b!==g;)R=S(b),s(b,C,Y),b=R;s(g,C,Y)},Z=({el:b,anchor:g})=>{let C;for(;b&&b!==g;)C=S(b),o(b),b=C;o(g)},de=(b,g,C,Y,R,le,ge,me,ce)=>{if(g.type==="svg"?ge="svg":g.type==="math"&&(ge="mathml"),b==null)ae(g,C,Y,R,le,ge,me,ce);else{const z=b.el&&b.el._isVueCE?b.el:null;try{z&&z._beginPatch(),x(b,g,R,le,ge,me,ce)}finally{z&&z._endPatch()}}},ae=(b,g,C,Y,R,le,ge,me)=>{let ce,z;const{props:G,shapeFlag:Q,transition:Pe,dirs:Ve}=b;if(ce=b.el=c(b.type,le,G&&G.is,G),Q&8?m(ce,b.children):Q&16&&O(b.children,ce,null,Y,R,da(b,le),ge,me),Ve&&xr(b,null,Y,"created"),X(ce,b,b.scopeId,ge,Y),G){for(const Ye in G)Ye!=="value"&&!ks(Ye)&&a(ce,Ye,null,G[Ye],le,Y);"value"in G&&a(ce,"value",null,G.value,le),(z=G.onVnodeBeforeMount)&&_n(z,Y,b)}Ve&&xr(b,null,Y,"beforeMount");const Ze=Kp(R,Pe);Ze&&Pe.beforeEnter(ce),s(ce,g,C),((z=G&&G.onVnodeMounted)||Ze||Ve)&&Jt(()=>{try{z&&_n(z,Y,b),Ze&&Pe.enter(ce),Ve&&xr(b,null,Y,"mounted")}finally{}},R)},X=(b,g,C,Y,R)=>{if(C&&$(b,C),Y)for(let le=0;le{for(let z=ce;z{const me=g.el=b.el;let{patchFlag:ce,dynamicChildren:z,dirs:G}=g;ce|=b.patchFlag&16;const Q=b.props||ft,Pe=g.props||ft;let Ve;if(C&&Cr(C,!1),(Ve=Pe.onVnodeBeforeUpdate)&&_n(Ve,C,g,b),G&&xr(g,b,C,"beforeUpdate"),C&&Cr(C,!0),z&&(!b.dynamicChildren||b.dynamicChildren.length!==z.length)&&(ce=0,ge=!1,z=null),(Q.innerHTML&&Pe.innerHTML==null||Q.textContent&&Pe.textContent==null)&&m(me,""),z?V(b.dynamicChildren,z,me,C,Y,da(g,R),le):ge||Ke(b,g,me,null,C,Y,da(g,R),le,!1),ce>0){if(ce&16)ue(me,Q,Pe,C,R);else if(ce&2&&Q.class!==Pe.class&&a(me,"class",null,Pe.class,R),ce&4&&a(me,"style",Q.style,Pe.style,R),ce&8){const Ze=g.dynamicProps;for(let Ye=0;Ye{Ve&&_n(Ve,C,g,b),G&&xr(g,b,C,"updated")},Y)},V=(b,g,C,Y,R,le,ge)=>{for(let me=0;me{if(g!==C){if(g!==ft)for(const le in g)!ks(le)&&!(le in C)&&a(b,le,g[le],null,R,Y);for(const le in C){if(ks(le))continue;const ge=C[le],me=g[le];ge!==me&&le!=="value"&&a(b,le,me,ge,R,Y)}"value"in C&&a(b,"value",g.value,C.value,R)}},W=(b,g,C,Y,R,le,ge,me,ce)=>{const z=g.el=b?b.el:f(""),G=g.anchor=b?b.anchor:f("");let{patchFlag:Q,dynamicChildren:Pe,slotScopeIds:Ve}=g;Ve&&(me=me?me.concat(Ve):Ve),b==null?(s(z,C,Y),s(G,C,Y),O(g.children||[],C,G,R,le,ge,me,ce)):Q>0&&Q&64&&Pe&&b.dynamicChildren&&b.dynamicChildren.length===Pe.length?(V(b.dynamicChildren,Pe,C,R,le,ge,me),(g.key!=null||R&&g===R.subTree)&&al(b,g,!0)):Ke(b,g,C,G,R,le,ge,me,ce)},ke=(b,g,C,Y,R,le,ge,me,ce)=>{g.slotScopeIds=me,b==null?g.shapeFlag&512?R.ctx.activate(g,C,Y,ge,ce):Te(g,C,Y,R,le,ge,ce):Je(b,g,ce)},Te=(b,g,C,Y,R,le,ge)=>{const me=b.component=zp(b,Y,R);if(mi(b)&&(me.ctx.renderer=Ot),Gp(me,!1,ge),me.asyncDep){if(R&&R.registerDep(me,Le,ge,le),!b.el){const ce=me.subTree=Ee(qt);ie(null,ce,g,C),b.placeholder=ce.el}}else Le(me,b,g,C,R,le,ge)},Je=(b,g,C)=>{const Y=g.component=b.component;if(Tp(b,g,C))if(Y.asyncDep&&!Y.asyncResolved){g.el=b.el,g.placeholder=b.placeholder,qe(Y,g,C);return}else Y.next=g,Y.update();else g.el=b.el,g.placeholder=b.placeholder,Y.vnode=g},Le=(b,g,C,Y,R,le,ge)=>{const me=()=>{if(b.isMounted){let{next:Q,bu:Pe,u:Ve,parent:Ze,vnode:Ye}=b;{const zt=Hc(b);if(zt){Q&&(Q.el=Ye.el,qe(b,Q,ge)),zt.asyncDep.then(()=>{Jt(()=>{b.isUnmounted||z()},R)});return}}let tt=Q,mt;Cr(b,!1),Q?(Q.el=Ye.el,qe(b,Q,ge)):Q=Ye,Pe&&Po(Pe),(mt=Q.props&&Q.props.onVnodeBeforeUpdate)&&_n(mt,Ze,Q,Ye),Cr(b,!0);const kt=du(b),Zt=b.subTree;b.subTree=kt,re(Zt,kt,_(Zt.el),dt(Zt),b,R,le),Q.el=kt.el,tt===null&&Pp(b,kt.el),Ve&&Jt(Ve,R),(mt=Q.props&&Q.props.onVnodeUpdated)&&Jt(()=>_n(mt,Ze,Q,Ye),R)}else{let Q;const{el:Pe,props:Ve}=g,{bm:Ze,m:Ye,parent:tt,root:mt,type:kt}=b,Zt=Es(g);Cr(b,!1),Ze&&Po(Ze),!Zt&&(Q=Ve&&Ve.onVnodeBeforeMount)&&_n(Q,tt,g),Cr(b,!0);{mt.ce&&mt.ce._hasShadowRoot()&&mt.ce._injectChildStyle(kt,b.parent?b.parent.type:void 0);const zt=b.subTree=du(b);re(null,zt,C,Y,b,R,le),g.el=zt.el}if(Ye&&Jt(Ye,R),!Zt&&(Q=Ve&&Ve.onVnodeMounted)){const zt=g;Jt(()=>_n(Q,tt,zt),R)}(g.shapeFlag&256||tt&&Es(tt.vnode)&&tt.vnode.shapeFlag&256)&&b.a&&Jt(b.a,R),b.isMounted=!0,g=C=Y=null}};b.scope.on();const ce=b.effect=new Qu(me);b.scope.off();const z=b.update=ce.run.bind(ce),G=b.job=ce.runIfDirty.bind(ce);G.i=b,G.id=b.uid,ce.scheduler=()=>rl(G),Cr(b,!0),z()},qe=(b,g,C)=>{g.component=b;const Y=b.vnode.props;b.vnode=g,b.next=null,Op(b,g.props,Y,C),Dp(b,g.children,C),An(),mc(b),On()},Ke=(b,g,C,Y,R,le,ge,me,ce=!1)=>{const z=b&&b.children,G=b?b.shapeFlag:0,Q=g.children,{patchFlag:Pe,shapeFlag:Ve}=g;if(Pe>0){if(Pe&128){Ge(z,Q,C,Y,R,le,ge,me,ce);return}else if(Pe&256){it(z,Q,C,Y,R,le,ge,me,ce);return}}Ve&8?(G&16&&Fe(z,R,le),Q!==z&&m(C,Q)):G&16?Ve&16?Ge(z,Q,C,Y,R,le,ge,me,ce):Fe(z,R,le,!0):(G&8&&m(C,""),Ve&16&&O(Q,C,Y,R,le,ge,me,ce))},it=(b,g,C,Y,R,le,ge,me,ce)=>{b=b||Ar,g=g||Ar;const z=b.length,G=g.length,Q=Math.min(z,G);let Pe;for(Pe=0;PeG?Fe(b,R,le,!0,!1,Q):O(g,C,Y,R,le,ge,me,ce,Q)},Ge=(b,g,C,Y,R,le,ge,me,ce)=>{let z=0;const G=g.length;let Q=b.length-1,Pe=G-1;for(;z<=Q&&z<=Pe;){const Ve=b[z],Ze=g[z]=ce?Rn(g[z]):En(g[z]);if(Tr(Ve,Ze))re(Ve,Ze,C,null,R,le,ge,me,ce);else break;z++}for(;z<=Q&&z<=Pe;){const Ve=b[Q],Ze=g[Pe]=ce?Rn(g[Pe]):En(g[Pe]);if(Tr(Ve,Ze))re(Ve,Ze,C,null,R,le,ge,me,ce);else break;Q--,Pe--}if(z>Q){if(z<=Pe){const Ve=Pe+1,Ze=VePe)for(;z<=Q;)Ce(b[z],R,le,!0),z++;else{const Ve=z,Ze=z,Ye=new Map;for(z=Ze;z<=Pe;z++){const jt=g[z]=ce?Rn(g[z]):En(g[z]);jt.key!=null&&Ye.set(jt.key,z)}let tt,mt=0;const kt=Pe-Ze+1;let Zt=!1,zt=0;const tn=new Array(kt);for(z=0;z=kt){Ce(jt,R,le,!0);continue}let Tt;if(jt.key!=null)Tt=Ye.get(jt.key);else for(tt=Ze;tt<=Pe;tt++)if(tn[tt-Ze]===0&&Tr(jt,g[tt])){Tt=tt;break}Tt===void 0?Ce(jt,R,le,!0):(tn[Tt-Ze]=z+1,Tt>=zt?zt=Tt:Zt=!0,re(jt,g[Tt],C,null,R,le,ge,me,ce),mt++)}const hr=Zt?Fp(tn):Ar;for(tt=hr.length-1,z=kt-1;z>=0;z--){const jt=Ze+z,Tt=g[jt],De=g[jt+1],Wn=jt+1{const{el:le,type:ge,transition:me,children:ce,shapeFlag:z}=b;if(z&6){Qe(b.component.subTree,g,C,Y);return}if(z&128){b.suspense.move(g,C,Y);return}if(z&64){ge.move(b,g,C,Ot);return}if(ge===je){s(le,g,C);for(let Q=0;Qme.enter(le),R));else{const{leave:Q,delayLeave:Pe,afterLeave:Ve}=me,Ze=()=>{b.ctx.isUnmounted?o(le):s(le,g,C)},Ye=()=>{const tt=le._isLeaving||!!le[ln];le._isLeaving&&le[ln](!0),me.persisted&&!tt?Ze():Q(le,()=>{Ze(),Ve&&Ve()})};Pe?Pe(le,Ze,Ye):Ye()}else s(le,g,C)},Ce=(b,g,C,Y=!1,R=!1)=>{const{type:le,props:ge,ref:me,children:ce,dynamicChildren:z,shapeFlag:G,patchFlag:Q,dirs:Pe,cacheIndex:Ve,memo:Ze}=b;if((Q===-2||z&&z.hasOnce)&&(R=!1),me!=null&&(An(),Ss(me,null,C,b,!0),On()),Ve!=null&&(!b.ctx||b.ctx===g)&&(g.renderCache[Ve]=void 0),G&256){g.ctx.deactivate(b);return}const Ye=G&1&&Pe,tt=!Es(b);let mt;if(tt&&(mt=ge&&ge.onVnodeBeforeUnmount)&&_n(mt,g,b),G&6)we(b.component,C,Y);else{if(G&128){b.suspense.unmount(C,Y);return}Ye&&xr(b,null,g,"beforeUnmount"),G&64?b.type.remove(b,g,C,Ot,Y):z&&!z.hasOnce&&(le!==je||Q>0&&Q&64)?Fe(z,g,C,!1,!0):(le===je&&Q&384||!R&&G&16)&&Fe(ce,g,C),Y&&ee(b)}const kt=Ze!=null&&Ve==null;(tt&&(mt=ge&&ge.onVnodeUnmounted)||Ye||kt)&&Jt(()=>{mt&&_n(mt,g,b),Ye&&xr(b,null,g,"unmounted"),kt&&(b.el=null)},C)},ee=b=>{const{type:g,el:C,anchor:Y,transition:R}=b,le=g===je;if(le&&!R){te(C,Y);return}if(g===Oo){Z(b),R&&!R.persisted&&R.afterLeave&&R.afterLeave();return}const ge=le?Ds(b):b,me=()=>{le?_(C)&&te(C,Y):o(C),R&&!R.persisted&&R.afterLeave&&R.afterLeave()};if(ge&&ge.shapeFlag&1&&R&&!R.persisted){const{leave:ce,delayLeave:z}=R,G=ge.el,Q=()=>ce(G,me);z?z(G,me,Q):Q()}else me()},te=(b,g)=>{let C;for(;b!==g;)C=S(b),o(b),b=C;o(g)},we=(b,g,C)=>{const{bum:Y,scope:R,job:le,subTree:ge,um:me,m:ce,a:z}=b;vu(ce),vu(z),Y&&Po(Y),R.stop(),le?(le.flags|=8,Ce(ge,b,g,C)):b.vnode.el&&ge&&(ge.transition=b.vnode.transition,Ce(ge,b,g,C)),me&&Jt(me,g),Jt(()=>{b.isUnmounted=!0},g)},Fe=(b,g,C,Y=!1,R=!1,le=0)=>{for(let ge=le;ge{if(b.shapeFlag&6)return dt(b.component.subTree);if(b.shapeFlag&128)return b.suspense.next();const g=S(b.anchor||b.el),C=g&&g[kc];return C?S(C):g},Kt=(b,g,C)=>{const Y=b&&g._vnode?void 0:b&&b.component?b.component.uid:Wp();Yf(()=>{b==null?g._vnode&&Ce(g._vnode,null,null,!0):re(g._vnode||null,b,g,null,null,null,C),g._vnode=b},Y)},Ot={p:re,um:Ce,m:Qe,r:ee,mt:Te,mc:O,pc:Ke,pbc:V,n:dt,o:e};return{render:Kt,hydrate:void 0,createApp:kp(Kt)}}function da({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 Cr({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Kp(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function al(e,t,n=!1){const s=e.children,o=t.children;if(Re(s)&&Re(o))for(let a=0;a>1,e[n[f]]0&&(t[s]=n[a-1]),n[a]=s)}}for(a=n.length,c=n[a-1];a-- >0;)n[a]=c,c=t[c];return n}function Hc(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Hc(t)}function vu(e){if(e)for(let t=0;te.__isSuspense;function Np(e,t){t&&t.pendingBranch?Re(e)?t.effects.push(...e):t.effects.push(e):Gf(e)}const je=Symbol.for("v-fgt"),bi=Symbol.for("v-txt"),qt=Symbol.for("v-cmt"),Oo=Symbol.for("v-stc"),Ir=[];let on=null;function E(e=!1){Ir.push(on=e?null:[])}function zc(){Ir.pop(),on=Ir[Ir.length-1]||null}let Ls=1;function Ho(e,t=!1){Ls+=e,e<0&&on&&t&&(on.hasOnce=!0)}function Gc(e){return e.dynamicChildren=Ls>0?on||Ar:null,zc(),Ls>0&&on&&on.push(e),e}function D(e,t,n,s,o,a){return Gc(l(e,t,n,s,o,a,!0))}function Pt(e,t,n,s,o){return Gc(Ee(e,t,n,s,o,!0))}function Rs(e){return e?e.__v_isVNode===!0:!1}function Tr(e,t){return e.type===t.type&&e.key===t.key}const Yc=({key:e})=>e??null,Mo=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?bt(e)||Ht(e)||We(e)?{i:un,r:e,k:t,f:!!n}:e:null);function l(e,t=null,n=null,s=0,o=null,a=e===je?0:1,c=!1,f=!1){const v={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Yc(t),ref:t&&Mo(t),scopeId:bc,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:a,patchFlag:s,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:un};return f?(Wo(v,n),a&128&&e.normalize(v)):n&&(v.shapeFlag|=bt(n)?8:16),Ls>0&&!c&&on&&(v.patchFlag>0||a&6)&&v.patchFlag!==32&&on.push(v),v}const Ee=Vp;function Vp(e,t=null,n=null,s=0,o=null,a=!1){if((!e||e===vp)&&(e=qt),Rs(e)){const f=cr(e,t,!0);return n&&Wo(f,n),Ls>0&&!a&&on&&(f.shapeFlag&6?on[on.indexOf(e)]=f:on.push(f)),f.patchFlag=-2,f}if(Qp(e)&&(e=e.__vccOpts),t){t=Bp(t);let{class:f,style:v}=t;f&&!bt(f)&&(t.class=et(f)),ct(v)&&(nl(v)&&!Re(v)&&(v=$t({},v)),t.style=or(v))}const c=bt(e)?1:Wc(e)?128:hi(e)?64:ct(e)?4:We(e)?2:0;return l(e,t,n,s,o,c,a,!0)}function Bp(e){return e?nl(e)||Fc(e)?$t({},e):e:null}function cr(e,t,n=!1,s=!1){const{props:o,ref:a,patchFlag:c,children:f,transition:v}=e,y=t?qp(o||{},t):o,m={__v_isVNode:!0,__v_skip:!0,type:e.type,props:y,key:y&&Yc(y),ref:t&&t.ref?n&&a?Re(a)?a.concat(Mo(t)):[a,Mo(t)]:Mo(t):a,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&&cr(e.ssContent),ssFallback:e.ssFallback&&cr(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce,cacheIndex:e.cacheIndex};return v&&s&&ur(m,v.clone(m)),m}function en(e=" ",t=0){return Ee(bi,null,e,t)}function Up(e,t){const n=Ee(Oo,null,e);return n.staticCount=t,n}function xe(e="",t=!1){return t?(E(),Pt(qt,null,e)):Ee(qt,null,e)}function En(e){return e==null||typeof e=="boolean"?Ee(qt):Re(e)?Ee(je,null,e.slice()):Rs(e)?Rn(e):Ee(bi,null,String(e))}function Rn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:cr(e)}function Wo(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(Re(t))n=16;else if(typeof t=="object")if(s&65){const o=t.default;o&&(o._c&&(o._d=!1),Wo(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!Fc(t)?t._ctx=un:o===3&&un&&(un.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(We(t)){if(s&65){Wo(e,{default:t});return}t={default:t,_ctx:un},n=32}else t=String(t),s&64?(n=16,t=[en(t)]):n=8;e.children=t,e.shapeFlag|=n}function qp(...e){const t={};for(let n=0;nQt||un;let zo,Ks;{const e=fi(),t=(n,s)=>{let o;return(o=e[n])||(o=e[n]=[]),o.push(s),a=>{o.length>1?o.forEach(c=>c(a)):o[0](a)}};zo=t("__VUE_INSTANCE_SETTERS__",n=>Qt=n),Ks=t("__VUE_SSR_SETTERS__",n=>Fs=n)}const Ws=e=>{const t=Qt;return zo(e),e.scope.on(),()=>{e.scope.off(),zo(t)}},hu=()=>{Qt&&Qt.scope.off(),zo(null)};function Xc(e){return e.vnode.shapeFlag&4}let Fs=!1;function Gp(e,t=!1,n=!1){t&&Ks(t);const{props:s,children:o}=e.vnode,a=Xc(e);Ap(e,s,a,t),jp(e,o,n||t);const c=a?Yp(e,t):void 0;return t&&Ks(!1),c}function Yp(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,hp);const{setup:s}=n;if(s){An();const o=e.setupContext=s.length>1?Xp(e):null,a=Ws(e),c=Hs(s,e,0,[e.props,o]),f=qu(c);if(On(),a(),(f||e.sp)&&!Es(e)&&$c(e),f){if(c.then(hu,hu),t)return c.then(v=>{Ks(!0);try{mu(e,v,t)}finally{Ks(!1)}}).catch(v=>{vi(v,e,0)});e.asyncDep=c}else mu(e,c)}else Qc(e)}function mu(e,t,n){We(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ct(t)&&(e.setupState=pc(t)),Qc(e)}function Qc(e,t,n){const s=e.type;e.render||(e.render=s.render||Tn);{const o=Ws(e);An();try{mp(e)}finally{On(),o()}}}const Jp={get(e,t){return Bt(e,"get",""),e[t]}};function Xp(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Jp),slots:e.slots,emit:e.emit,expose:t}}function wi(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(pc(Kf(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in $s)return $s[n](e)},has(t,n){return n in t||n in $s}})):e.proxy}function Qp(e){return We(e)&&"__vccOpts"in e}const st=(e,t)=>Uf(e,t,Fs);function Zp(e,t,n){try{Ho(-1);const s=arguments.length;return s===2?ct(t)&&!Re(t)?Rs(t)?Ee(e,null,[t]):Ee(e,t):Ee(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&Rs(n)&&(n=[n]),Ee(e,t,n))}finally{Ho(1)}}const ev="3.5.44";/** +* @vue/runtime-dom v3.5.44 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let Oa;const yu=typeof window<"u"&&window.trustedTypes;if(yu)try{Oa=yu.createPolicy("vue",{createHTML:e=>e})}catch{}const Zc=Oa?e=>Oa.createHTML(e):e=>e,tv="http://www.w3.org/2000/svg",nv="http://www.w3.org/1998/Math/MathML",Ln=typeof document<"u"?document:null,gu=Ln&&Ln.createElement("template"),rv={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const o=t==="svg"?Ln.createElementNS(tv,e):t==="mathml"?Ln.createElementNS(nv,e):n?Ln.createElement(e,{is:n}):Ln.createElement(e);return e==="select"&&s&&s.multiple!=null&&o.setAttribute("multiple",s.multiple),o},createText:e=>Ln.createTextNode(e),createComment:e=>Ln.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Ln.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,o,a){const c=n?n.previousSibling:t.lastChild;if(o&&(o===a||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),!(o===a||!(o=o.nextSibling)););else{gu.innerHTML=Zc(s==="svg"?`${e}`:s==="mathml"?`${e}`:e);const f=gu.content;if(s==="svg"||s==="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]}},Zn="transition",gs="animation",es=Symbol("_vtc"),ed={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},td=$t({},Cc,ed),sv=e=>(e.displayName="Transition",e.props=td,e),os=sv((e,{slots:t})=>Zp(sp,nd(e),t)),Sr=(e,t=[])=>{Re(e)?e.forEach(n=>n(...t)):e&&e(...t)},bu=e=>e?Re(e)?e.some(t=>t.length>1):e.length>1:!1;function nd(e){const t={};for(const W in e)W in ed||(t[W]=e[W]);if(e.css===!1)return t;const{name:n="v",type:s,duration:o,enterFromClass:a=`${n}-enter-from`,enterActiveClass:c=`${n}-enter-active`,enterToClass:f=`${n}-enter-to`,appearFromClass:v=a,appearActiveClass:y=c,appearToClass:m=f,leaveFromClass:_=`${n}-leave-from`,leaveActiveClass:S=`${n}-leave-active`,leaveToClass:$=`${n}-leave-to`}=e,U=ov(o),re=U&&U[0],se=U&&U[1],{onBeforeEnter:ie,onEnter:T,onEnterCancelled:I,onLeave:Z,onLeaveCancelled:de,onBeforeAppear:ae=ie,onAppear:X=T,onAppearCancelled:O=I}=t,x=(W,ke,Te,Je)=>{W._enterCancelled=Je,tr(W,ke?m:f),tr(W,ke?y:c),Te&&Te()},V=(W,ke)=>{W._isLeaving=!1,tr(W,_),tr(W,$),tr(W,S),ke&&ke()},ue=W=>(ke,Te)=>{const Je=W?X:T,Le=()=>x(ke,W,Te);Sr(Je,[ke,Le]),wu(()=>{tr(ke,W?v:a),kn(ke,W?m:f),bu(Je)||_u(ke,s,re,Le)})};return $t(t,{onBeforeEnter(W){Sr(ie,[W]),kn(W,a),kn(W,c)},onBeforeAppear(W){Sr(ae,[W]),kn(W,v),kn(W,y)},onEnter:ue(!1),onAppear:ue(!0),onLeave(W,ke){W._isLeaving=!0;const Te=()=>V(W,ke);kn(W,_),W._enterCancelled?(kn(W,S),Ma(W)):(Ma(W),kn(W,S)),wu(()=>{W._isLeaving&&(tr(W,_),kn(W,$),bu(Z)||_u(W,s,se,Te))}),Sr(Z,[W,Te])},onEnterCancelled(W){x(W,!1,void 0,!0),Sr(I,[W])},onAppearCancelled(W){x(W,!0,void 0,!0),Sr(O,[W])},onLeaveCancelled(W){V(W),Sr(de,[W])}})}function ov(e){if(e==null)return null;if(ct(e))return[fa(e.enter),fa(e.leave)];{const t=fa(e);return[t,t]}}function fa(e){return uf(e)}function kn(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[es]||(e[es]=new Set)).add(t)}function tr(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const n=e[es];n&&(n.delete(t),n.size||(e[es]=void 0))}function wu(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let iv=0;function _u(e,t,n,s){const o=e._endId=++iv,a=()=>{o===e._endId&&s()};if(n!=null)return setTimeout(a,n);const{type:c,timeout:f,propCount:v}=rd(e,t);if(!c)return s();const y=c+"end";let m=0;const _=()=>{e.removeEventListener(y,S),a()},S=$=>{$.target===e&&++m>=v&&_()};setTimeout(()=>{m(n[U]||"").split(", "),o=s(`${Zn}Delay`),a=s(`${Zn}Duration`),c=ku(o,a),f=s(`${gs}Delay`),v=s(`${gs}Duration`),y=ku(f,v);let m=null,_=0,S=0;t===Zn?c>0&&(m=Zn,_=c,S=a.length):t===gs?y>0&&(m=gs,_=y,S=v.length):(_=Math.max(c,y),m=_>0?c>y?Zn:gs:null,S=m?m===Zn?a.length:v.length:0);const $=m===Zn&&/\b(?:transform|all)(?:,|$)/.test(s(`${Zn}Property`).toString());return{type:m,timeout:_,propCount:S,hasTransform:$}}function ku(e,t){for(;e.lengthxu(n)+xu(e[s])))}function xu(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Ma(e){return(e?e.ownerDocument:document).body.offsetHeight}function av(e,t,n){const s=e[es];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Cu=Symbol("_vod"),sd=Symbol("_vsh"),lv=Symbol(""),uv=/(?:^|;)\s*display\s*:/;function cv(e,t,n){const s=e.style,o=bt(n);let a=!1;if(n&&!o){if(t)if(bt(t))for(const c of t.split(";")){const f=c.slice(0,c.indexOf(":")).trim();n[f]==null&&_s(s,f,"")}else for(const c in t)n[c]==null&&_s(s,c,"");for(const c in n){c==="display"&&(a=!0);const f=n[c];f!=null?fv(e,c,!bt(t)&&t?t[c]:void 0,f)||_s(s,c,f):_s(s,c,"")}}else if(o){if(t!==n){const c=s[lv];c&&(n+=";"+c),s.cssText=n,a=uv.test(n)}}else t&&e.removeAttribute("style");Cu in e&&((!o||t!==n)&&(e[Cu]=a?s.display:""),e[sd]&&(s.display="none"))}const Eo=/\s*!important$/;function _s(e,t,n){if(Re(n))n.forEach(s=>_s(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))Eo.test(n)?e.setProperty(t,n.replace(Eo,""),"important"):e.setProperty(t,n);else{const s=dv(e,t);Eo.test(n)?e.setProperty(dr(s),n.replace(Eo,""),"important"):e[s]=n}}const Su=["Webkit","Moz","ms"],pa={};function dv(e,t){const n=pa[t];if(n)return n;let s=mn(t);if(s!=="filter"&&s in e)return pa[t]=s;s=zu(s);for(let o=0;ova||(gv.then(()=>va=0),va=Date.now());function wv(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;const o=n.value;if(Re(o)){const a=s.stopImmediatePropagation;s.stopImmediatePropagation=()=>{a.call(s),s._stopped=!0};const c=o.slice(),f=[s];for(let v=0;ve.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,_v=(e,t,n,s,o,a)=>{const c=o==="svg";t==="class"?av(e,s,c):t==="style"?cv(e,n,s):li(t)?ui(t)||vv(e,t,n,s,a):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):kv(e,t,s,c))?(Tu(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&$u(e,t,s,c,a,t!=="value")):e._isVueCE&&(xv(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!bt(s)))?Tu(e,mn(t),s,a,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),$u(e,t,s,c))};function kv(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&Au(t)&&We(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 Au(t)&&bt(n)?!1:t in e}function xv(e,t){const n=e._def.props;if(!n)return!1;const s=mn(t);return Array.isArray(n)?n.some(o=>mn(o)===s):Object.keys(n).some(o=>mn(o)===s)}const od=new WeakMap,id=new WeakMap,Go=Symbol("_moveCb"),Ou=Symbol("_enterCb"),Ia=new WeakMap,Cv=e=>(delete e.props.mode,e),Sv=Cv({name:"TransitionGroup",props:$t({},td,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=ll(),s=xc();let o,a,c,f;const v=()=>(f===void 0&&(f=o.length>0&&Iv(o[0].el,n.vnode.el,Mu(e))),f);return Pc(()=>{if(Ia.delete(n),!v()){o=[],c=void 0;return}const y=Mu(e);o.forEach($v);const m=c&&Mv(c,n.vnode.el);c=void 0,o.forEach(S=>Tv(S,m));const _=o.filter(Pv);Ma(n.vnode.el),_.forEach(S=>{const $=S.el,U=$.style;kn($,y),U.transform=U.webkitTransform=U.transitionDuration="";const re=$[Go]=se=>{se&&se.target!==$||(!se||se.propertyName.endsWith("transform"))&&($.removeEventListener("transitionend",re),$[Go]=null,tr($,y))};$.addEventListener("transitionend",re)}),o=[]}),()=>{const y=lt(e),m=nd(y);let _=y.tag||je;if(o=[],f=void 0,a)for(let S=0;Ss.willMove()&&s.item.contains(t));return n&&_i(n.item,n)}function Iv(e,t,n){const s=e.cloneNode(),o=e[es];o&&o.forEach(f=>{f.split(/\s+/).forEach(v=>v&&s.classList.remove(v))}),n.split(/\s+/).forEach(f=>f&&s.classList.add(f)),s.style.display="none";const a=t.nodeType===1?t:t.parentNode;a.appendChild(s);const{hasTransform:c}=rd(s);return a.removeChild(s),c}const Yo=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Re(t)?n=>Po(t,n):t};function jv(e){e.target.composing=!0}function Iu(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Or=Symbol("_assign"),$o=Symbol("_initialValue");function ha(e,t,n){return t&&(e=e.trim()),n&&(e=di(e)),e}const Me={created(e,{modifiers:{lazy:t,trim:n,number:s}},o){e.parentNode&&(e.type==="text"?e[$o]=e.defaultValue.replace(/[\r\n]/g,""):e.type==="textarea"&&(e[$o]=e.defaultValue.replace(/\r\n?/g,` +`))),e[Or]=Yo(o);const a=s||o.props&&o.props.type==="number";Pr(e,t?"change":"input",c=>{c.target.composing||e[Or](ha(e.value,n,a))}),(n||a)&&Pr(e,"change",()=>{e.value=ha(e.value,n,a)}),t||(Pr(e,"compositionstart",jv),Pr(e,"compositionend",Iu),Pr(e,"change",Iu))},mounted(e,{value:t,modifiers:{trim:n,number:s}}){const o=t??"",a=e[$o];delete e[$o],a!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==a?e[Or](ha(e.value,n,s)):e.value=o},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:o,number:a}},c){if(e[Or]=Yo(c),e.composing)return;const f=(a||e.type==="number")&&!/^0\d/.test(e.value)?di(e.value):e.value,v=t??"";if(f===v)return;const y=e.getRootNode();(y instanceof Document||y instanceof ShadowRoot)&&y.activeElement===e&&e.type!=="range"&&(s&&t===n||o&&e.value.trim()===v)||(e.value=v)}},Vn={deep:!0,created(e,{value:t,modifiers:{number:n}},s){e._modelValue=t,Pr(e,"change",()=>{const o=Array.prototype.filter.call(e.options,v=>v.selected).map(v=>n?di(Jo(v)):Jo(v)),a=e.multiple,c=a?jr(e._modelValue)?new Set(o):o:o[0],f=e._pendingValue=[a,a?Re(c)?o.slice():o:c];try{e[Or](c)}finally{ss(()=>{e._pendingValue===f&&(e._pendingValue=void 0)})}}),e[Or]=Yo(s)},mounted(e,{value:t}){ju(e,t)},beforeUpdate(e,{value:t},n){e._modelValue=t,e[Or]=Yo(n)},updated(e,{value:t}){const n=e._pendingValue;e._pendingValue=void 0,(!n||n[0]!==e.multiple||!Dv(t,n[1],n[0]))&&ju(e,t)}};function Dv(e,t,n){if(!n||Re(e))return ar(e,t);if(jr(e)){if(e.size!==t.length)return!1;for(const s of t)if(!e.has(s))return!1;return!0}return!1}function ju(e,t){const n=e.multiple,s=Re(t);if(!(n&&!s&&!jr(t))){for(let o=0,a=e.options.length;oString(y)===String(f)):c.selected=gf(t,f)>-1}else c.selected=t.has(f);else if(ar(Jo(c),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Jo(e){return"_value"in e?e._value:e.value}const Lv=["ctrl","shift","alt","meta"],Rv={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)=>Lv.some(n=>e[`${n}Key`]&&!t.includes(n))},sn=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=(o,...a)=>{for(let c=0;c{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=o=>{if(!("key"in o))return;const a=dr(o.key);if(t.some(c=>c===a||Kv[c]===a))return e(o)})},Fv=$t({patchProp:_v},rv);let Du;function Nv(){return Du||(Du=Lp(Fv))}const Vv=(...e)=>{const t=Nv().createApp(...e),{mount:n}=t;return t.mount=s=>{const o=Uv(s);if(!o)return;const a=t._component;!We(a)&&!a.render&&!a.template&&(a.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const c=n(o,!1,Bv(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),c},t};function Bv(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Uv(e){return bt(e)?document.querySelector(e):e}function Et(e){return''+e+""}const qv={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('')},Hv=["innerHTML"],Xe=Rt({__name:"Icon",props:{name:{},size:{default:16}},setup(e){const t=e,n=st(()=>qv[t.name]||"");return(s,o)=>(E(),D("span",{class:"icon",style:or({width:e.size+"px",height:e.size+"px"}),innerHTML:n.value},null,12,Hv))}}),Wv=["aria-label"],zv={class:"dialog-title"},Gv={class:"dialog-msg"},Yv={class:"dialog-btns"},Jv=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,s=t;function o(a){n.open&&a.key==="Escape"&&s("cancel")}return ht(()=>n.open,a=>{a?window.addEventListener("keydown",o):window.removeEventListener("keydown",o)}),pr(()=>window.removeEventListener("keydown",o)),(a,c)=>(E(),Pt(Dr,{to:"body"},[Ee(os,{name:"modal"},{default:fr(()=>[e.open?(E(),D("div",{key:0,class:"mask",onClick:c[2]||(c[2]=sn(f=>s("cancel"),["self"]))},[l("div",{class:"dialog",role:"dialog","aria-label":e.title},[l("div",zv,ne(e.title),1),l("div",Gv,ne(e.message),1),l("div",Yv,[l("button",{class:"btn btn-sm",onClick:c[0]||(c[0]=f=>s("cancel"))},ne(e.cancelText),1),l("button",{class:et(["btn btn-sm",e.danger?"btn-danger-solid":"btn-primary"]),onClick:c[1]||(c[1]=f=>s("confirm"))},ne(e.confirmText),3)])],8,Wv)])):xe("",!0)]),_:1})]))}}),Wt=(e,t)=>{const n=e.__vccOpts||e;for(const[s,o]of t)n[s]=o;return n},qn=Wt(Jv,[["__scopeId","data-v-f27041d4"]]);var Lu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Xv(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ad={exports:{}};(function(e,t){((n,s)=>{e.exports=s()})(Lu,function(){var n=function(r,i){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])}))(r,i)},s=function(){return(s=Object.assign||function(r){for(var i,u=1,d=arguments.length;u"u"||a.Promise||(a.Promise=Promise);var y=Object.getPrototypeOf,m={}.hasOwnProperty;function _(r,i){return m.call(r,i)}function S(r,i){typeof i=="function"&&(i=i(y(r))),(typeof Reflect>"u"?c:Reflect.ownKeys)(i).forEach(function(u){U(r,u,i[u])})}var $=Object.defineProperty;function U(r,i,u,d){$(r,i,v(u&&_(u,"get")&&typeof u.get=="function"?{get:u.get,set:u.set,configurable:!0}:{value:u,configurable:!0,writable:!0},d))}function re(r){return{from:function(i){return r.prototype=Object.create(i.prototype),U(r.prototype,"constructor",r),{extend:S.bind(null,r.prototype)}}}}var se=Object.getOwnPropertyDescriptor,ie=[].slice;function T(r,i,u){return ie.call(r,i,u)}function I(r,i){return i(r)}function Z(r){if(!r)throw new Error("Assertion Failed")}function de(r){a.setImmediate?setImmediate(r):setTimeout(r,0)}function ae(r,i){if(typeof i=="string"&&_(r,i))return r[i];if(!i)return r;if(typeof i!="string"){for(var u=[],d=0,p=i.length;d"u"?[]:(Ye=Promise.resolve(),typeof crypto<"u"&&crypto.subtle?[Ze=crypto.subtle.digest("SHA-512",new Uint8Array([0])),y(Ze),Ye]:[Ye,y(Ye),Ye]),Ye=Ze[0],qr=Ze[1],qr=qr&&qr.then,tt=Ye&&Ye.constructor,mt=!!Ze[2],kt=function(r,i){Wn.push([r,i]),zt&&(queueMicrotask(jd),zt=!1)},Zt=!0,zt=!0,tn=[],hr=[],jt=C,Tt={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:g,pgp:!1,env:{},finalize:g},De=Tt,Wn=[],mr=0,Js=[];function Se(r){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var i=this._PSD=De;if(typeof r!="function"){if(r!==Pe)throw new TypeError("Not a function");this._state=arguments[1],this._value=arguments[2],this._state===!1&&$i(this,this._value)}else this._state=null,this._value=null,++i.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&&Kr();h&&typeof h.then=="function"?u(d,function(k,A){h instanceof Se?h._then(k,A):h.then(k,A)}):(d._state=!0,d._value=h,gl(d)),w&&Fr()}},$i.bind(null,d))}catch(h){$i(d,h)}}(this,r)}var Ei={get:function(){var r=De,i=eo;function u(d,p){var h=this,w=!r.global&&(r!==De||i!==eo),k=w&&!Gn(),A=new Se(function(q,j){Ti(h,new yl(wl(d,r,w,k),wl(p,r,w,k),q,j,r))});return this._consoleTask&&(A._consoleTask=this._consoleTask),A}return u.prototype=Pe,u},set:function(r){U(this,"then",r&&r.prototype===Pe?Ei:{get:function(){return r},set:Ei.set})}};function yl(r,i,u,d,p){this.onFulfilled=typeof r=="function"?r:null,this.onRejected=typeof i=="function"?i:null,this.resolve=u,this.reject=d,this.psd=p}function $i(r,i){var u,d;hr.push(i),r._state===null&&(u=r._lib&&Kr(),i=jt(i),r._state=!1,r._value=i,d=r,tn.some(function(p){return p._value===d._value})||tn.push(d),gl(r),u)&&Fr()}function gl(r){var i=r._listeners;r._listeners=[];for(var u=0,d=i.length;u{for(var w=tn.length;w;)if(tn[--w]._value===h._value)return tn.splice(w,1)})(i),u.resolve(d)}catch(h){u.reject(h)}finally{--mr==0&&Pi(),--u.psd.ref||u.psd.finalize()}}function jd(){yr(Tt,function(){Kr()&&Fr()})}function Kr(){var r=Zt;return zt=Zt=!1,r}function Fr(){var r,i,u;do for(;0.",_l="String expected.",no="__dbnames",Oi="readonly",Mi="readwrite";function br(r,i){return r?i?function(){return r.apply(this,arguments)&&i.apply(this,arguments)}:r:i}var kl={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function ro(r){return typeof r!="string"||/\./.test(r)?function(i){return i}:function(i){return i[r]===void 0&&r in i&&delete(i=ke(i))[r],i}}function xl(){throw Ie.Type("Entity instances must never be new:ed. Instances are generated by the framework bypassing the constructor.")}function rt(r,i){try{var u=Cl(r),d=Cl(i);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 i{var k=j,A=w;if(typeof A!="function"&&A!==null)throw new TypeError("Class extends value "+String(A)+" is not a constructor or null");function q(){this.constructor=k}function j(){return w!==null&&w.apply(this,arguments)||this}return n(k,A),k.prototype=A===null?Object.create(A):(q.prototype=A.prototype,new q),Object.defineProperty(j.prototype,"db",{get:function(){return i},enumerable:!1,configurable:!0}),j.prototype.table=function(){return u},j})(r)),new Set),p=r.prototype;p;p=y(p))Object.getOwnPropertyNames(p).forEach(function(w){return d.add(w)});function h(w){if(!w)return w;var k,A=Object.create(r.prototype);for(k in w)if(!d.has(k))try{A[k]=w[k]}catch{}return A}return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=h,this.hook("reading",h),r},pt.prototype.defineClass=function(){return this.mapToClass(function(r){v(this,r)})},pt.prototype.add=function(r,i){var u=this,d=this.schema.primKey,p=d.auto,h=d.keyPath,w=r;return h&&p&&(w=ro(h)(r)),this._trans("readwrite",function(k){return u.core.mutate({trans:k,type:"add",keys:i!=null?[i]:null,values:[w]})}).then(function(k){return k.numFailures?Se.reject(k.failures[0]):k.lastResult}).then(function(k){if(h)try{X(r,h,k)}catch{}return k})},pt.prototype.upsert=function(r,i){var u=this,d=this.schema.primKey.keyPath;return this._trans("readwrite",function(p){return u.core.get({trans:p,key:r}).then(function(h){var w=h??{};return $l(w,i),d&&X(w,d,r),u.core.mutate({trans:p,type:"put",values:[w],keys:[r],upsert:!0,updates:{keys:[r],changeSpecs:[i]}}).then(function(k){return k.numFailures?Se.reject(k.failures[0]):!!h})})})},pt.prototype.update=function(r,i){return typeof r!="object"||f(r)?this.where(":id").equals(r).modify(i):(r=ae(r,this.schema.primKey.keyPath))===void 0?Ct(new Ie.InvalidArgument("Given object does not contain its primary key")):this.where(":id").equals(r).modify(i)},pt.prototype.put=function(r,i){var u=this,d=this.schema.primKey,p=d.auto,h=d.keyPath,w=r;return h&&p&&(w=ro(h)(r)),this._trans("readwrite",function(k){return u.core.mutate({trans:k,type:"put",values:[w],keys:i!=null?[i]:null})}).then(function(k){return k.numFailures?Se.reject(k.failures[0]):k.lastResult}).then(function(k){if(h)try{X(r,h,k)}catch{}return k})},pt.prototype.delete=function(r){var i=this;return this._trans("readwrite",function(u){return i.core.mutate({trans:u,type:"delete",keys:[r]}).then(function(d){return so(i,[r],d)}).then(function(d){return d.numFailures?Se.reject(d.failures[0]):void 0})})},pt.prototype.clear=function(){var r=this;return this._trans("readwrite",function(i){return r.core.mutate({trans:i,type:"deleteRange",range:kl}).then(function(u){return so(r,null,u)})}).then(function(i){return i.numFailures?Se.reject(i.failures[0]):void 0})},pt.prototype.bulkGet=function(r){var i=this;return this._trans("readonly",function(u){return i.core.getMany({keys:r,trans:u}).then(function(d){return d.map(function(p){return i.hook.reading.fire(p)})})})},pt.prototype.bulkAdd=function(r,i,u){var d=this,p=Array.isArray(i)?i:void 0,h=(u=u||(p?void 0:i))?u.allKeys:void 0;return this._trans("readwrite",function(w){var k=d.schema.primKey,q=k.auto,k=k.keyPath;if(k&&p)throw new Ie.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(p&&p.length!==r.length)throw new Ie.InvalidArgument("Arguments objects and keys must have the same length");var A=r.length,q=k&&q?r.map(ro(k)):r;return d.core.mutate({trans:w,type:"add",keys:p,values:q,wantResults:h}).then(function(j){var P=j.numFailures,M=j.failures;if(P===0)return h?j.results:j.lastResult;throw new dt("".concat(d.name,".bulkAdd(): ").concat(P," of ").concat(A," operations failed"),M)})})},pt.prototype.bulkPut=function(r,i,u){var d=this,p=Array.isArray(i)?i:void 0,h=(u=u||(p?void 0:i))?u.allKeys:void 0;return this._trans("readwrite",function(w){var k=d.schema.primKey,q=k.auto,k=k.keyPath;if(k&&p)throw new Ie.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(p&&p.length!==r.length)throw new Ie.InvalidArgument("Arguments objects and keys must have the same length");var A=r.length,q=k&&q?r.map(ro(k)):r;return d.core.mutate({trans:w,type:"put",keys:p,values:q,wantResults:h}).then(function(j){var P=j.numFailures,M=j.failures;if(P===0)return h?j.results:j.lastResult;throw new dt("".concat(d.name,".bulkPut(): ").concat(P," of ").concat(A," operations failed"),M)})})},pt.prototype.bulkUpdate=function(r){var i=this,u=this.core,d=r.map(function(w){return w.key}),p=r.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 A=[],q=[],j=(r.forEach(function(P,M){var B=P.key,F=P.changes,K=k[M];if(K){for(var N=0,J=Object.keys(F);NH+oe&&N(H+q)})})}var J=Vr(u)&&u.limit===1/0&&(typeof r!="function"||F)&&{index:u.index,range:u.range};return N(0).then(function(){if(0{for(var Ue=Math.min(ye.length,Oe.length),ze=-1,nt=0;nt=M})).length===0?Se.resolve():(N.forEach(function(H){K.push(function(){var oe,pe,he,_e=J,ye=H._cfg.dbschema,Ae=(vo(P,_e,F),vo(P,ye,F),J=P._dbSchema=ye,Ni(_e,ye)),be=(Ae.add.forEach(function(Oe){Vi(F,Oe[0],Oe[1].primKey,Oe[1].indexes)}),Ae.change.forEach(function(Oe){if(Oe.recreate)throw new Ie.Upgrade("Not yet support for changing primary key");var ve=F.objectStore(Oe.name);Oe.add.forEach(function(Be){return fo(ve,Be)}),Oe.change.forEach(function(Be){ve.deleteIndex(Be.name),fo(ve,Be)}),Oe.del.forEach(function(Be){return ve.deleteIndex(Be)})}),H._cfg.contentUpgrade);if(be&&H._cfg.version>M)return uo(P,F),B._memoizedTables={},oe=O(ye),Ae.del.forEach(function(Oe){oe[Oe]=_e[Oe]}),Fi(P,[P.Transaction.prototype]),co(P,[P.Transaction.prototype],c(oe),oe),B.schema=oe,(pe=Qe(be))&&Nr(),ye=Se.follow(function(){var Oe;(he=be(B))&&pe&&(Oe=Gn.bind(null,null),he.then(Oe,Oe))}),he&&typeof he.then=="function"?Se.resolve(he):ye.then(function(){return he})}),K.push(function(oe){var pe,he,_e=H._cfg.dbschema;pe=_e,he=oe,[].slice.call(he.db.objectStoreNames).forEach(function(ye){return pe[ye]==null&&he.db.deleteObjectStore(ye)}),Fi(P,[P.Transaction.prototype]),co(P,[P.Transaction.prototype],P._storeNames,P._dbSchema),B.schema=P._dbSchema}),K.push(function(oe){P.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(P.idbdb.version/10)===H._cfg.version?(P.idbdb.deleteObjectStore("$meta"),delete P._dbSchema.$meta,P._storeNames=P._storeNames.filter(function(pe){return pe!=="$meta"})):oe.objectStore("$meta").put(H._cfg.version,"version"))})}),function H(){return K.length?Se.resolve(K.shift()(B.idbtrans)).then(H):Se.resolve()}().then(function(){Ll(J,F)}))}).catch(w);var A,q;c(p).forEach(function(j){Vi(u,j,p[j].primKey,p[j].indexes)}),uo(r,u),Se.follow(function(){return r.on.populate.fire(h)}).catch(w)})}function zd(r,i){Ll(r._dbSchema,i),i.db.version%10!=0||i.objectStoreNames.contains("$meta")||i.db.createObjectStore("$meta").add(Math.ceil(i.db.version/10-1),"version");var u=po(0,r.idbdb,i);vo(r,r._dbSchema,i);for(var d=0,p=Ni(u,r._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=i.objectStore(w.name);w.add.forEach(function(A){G&&console.debug("Dexie upgrade patch: Creating missing index ".concat(w.name,".").concat(A.src)),fo(k,A)})})(p[d]);if(typeof h=="object")return h.value}}function Ni(r,i){var u,d={del:[],add:[],change:[]};for(u in r)i[u]||d.del.push(u);for(u in i){var p=r[u],h=i[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,A=h.idxByName,q=void 0;for(q in k)A[q]||w.del.push(q);for(q in A){var j=k[q],P=A[q];j?j.src!==P.src&&w.change.push(P):w.add.push(P)}(0{var r,i,u;return typeof FinalizationRegistry<"u"&&typeof WeakRef<"u"?(r=new Set,i=new FinalizationRegistry(function(d){r.delete(d)}),{toArray:function(){return Array.from(r).map(function(d){return d.deref()}).filter(function(d){return d!==void 0})},add:function(d){var p=new WeakRef(d._novip);r.add(p),i.register(d._novip,p,p),r.size>d._options.maxConnections&&(p=r.values().next().value,r.delete(p),i.unregister(p))},remove:function(d){if(d)for(var p=r.values(),h=p.next();!h.done;){var w=h.value;if(w.deref()===d._novip)return r.delete(w),void i.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 Bi(r,i){var u=r._dbNamesDB;return u||(u=r._dbNamesDB=new jn(no,{addons:[],indexedDB:r,IDBKeyRange:i})).version(1).stores({dbnames:"name"}),u.table("dbnames")}function Ui(r){return r&&typeof r.databases=="function"}function qi(r){return zn(function(){return De.letThrough=!0,r()})}function Hi(r){return!("from"in r)}var Ft=function(r,i){var u;if(!this)return u=new Ft,r&&"d"in r&&v(u,r),u;v(this,arguments.length?{d:1,from:r,to:1Math.pow(2,62)?0:N.oldVersion,P=J<1,r.idbdb=K.result,h&&zd(r,j),Wd(r,J/10,j,B))},B),K.onsuccess=yt(function(){j=null;var N,J,H,oe,pe,he,_e=r.idbdb=K.result,ye=T(_e.objectStoreNames);if(0"u"?Se.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(M){function B(){return indexedDB.databases().finally(M)}A=setInterval(B,100),B()}).finally(function(){return clearInterval(A)}):Promise.resolve()).then(k)]).then(function(){return w(),i.onReadyBeingFired=[],Se.resolve(qi(function(){return r.on.ready.fire(r.vip)})).then(function M(){var B;if(0i.limit?d.length=i.limit:r.length===i.limit&&d.length{if(u===void 0)return d!==void 0?-1:0;if(d===void 0)return 1;if((u=rt(u,d))===0){if(p&&h)return 0;if(p)return 1;if(h)return-1}return u})(r.lower,i.lower,r.lowerOpen,i.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=rt(u,d))===0){if(p&&h)return 0;if(p)return-1;if(h)return 1}return u})(r.upper,i.upper,r.upperOpen,i.upperOpen)}function tf(r,i,u,d){r.subscribers.add(u),d.addEventListener("abort",function(){var p,h;r.subscribers.delete(u),r.subscribers.size===0&&(p=r,h=i,setTimeout(function(){p.subscribers.size===0&&Ke(h,p)},3e3))})}var nf={stack:"dbcore",level:0,name:"Cache",create:function(r){var i=r.schema.name;return s(s({},r),{transaction:function(u,d,p){var h,w,k=r.transaction(u,d,p);return d==="readwrite"&&(p=(h=new AbortController).signal,k.addEventListener("abort",(w=function(A){return function(){if(h.abort(),d==="readwrite"){for(var q=new Set,j=0,P=u;j{var J=wr["idb://".concat(B,"/").concat(F)];if(!J)return[];if(!(B=J.queries[K]))return[null,!1,J,null];var H=B[(N.query?N.query.index.name:null)||""];if(!H)return[null,!1,J,null];switch(K){case"query":var oe=(pe=N.direction)!=null?pe:"next",pe=H.find(function(he){var _e;return he.req.limit===N.limit&&he.req.values===N.values&&((_e=he.req.direction)!=null?_e:"next")===oe&&zl(he.req.query.range,N.query.range)});return pe?[pe,!0,J,H]:[H.find(function(he){var _e;return("limit"in he.req?he.req.limit:1/0)>=N.limit&&((_e=he.req.direction)!=null?_e:"next")===oe&&(!N.values||he.req.values)&&ef(he.req.query.range,N.query.range)}),!1,J,H];case"count":return pe=H.find(function(he){return zl(he.req.query.range,N.query.range)}),[pe,!!pe,J,H]}})(i,u,"query",h),M=P[0],q=P[2],j=P[3],M&&P[1]?M.obsSet=h.obsSet:(P=d.query(h).then(function(B){var F=B.result;if(M&&(M.res=F),w){for(var K=0,N=F.length;K{var pe=Kr();try{h&&Nr();var he=zn(r,oe);return he=h?he.finally(Gn):he}finally{pe&&Fr()}})(J={subscr:N,signal:w.signal,requery:M,querier:r,trans:null}),P||(Xn.storagemutated.subscribe(F),P=!0),Promise.resolve(H).then(function(oe){u=!0,i=oe,k||J.signal.aborted||(B()||(q=N,B())?M():(A={},Ai(function(){return!k&&p.next&&p.next(oe)})))},function(oe){u=!1,["DatabaseClosedError","AbortError"].includes(oe==null?void 0:oe.name)||k||Ai(function(){k||p.error&&p.error(oe)})}))};return setTimeout(M,0),j});return d.hasValue=function(){return u},d.getValue=function(){return i},d}var _r=jn;function ta(r){var i=Qn;try{Qn=!0,Xn.storagemutated.fire(r),Yi(r,!0)}finally{Qn=i}}S(_r,s(s({},Ce),{delete:function(r){return new _r(r,{addons:[]}).delete()},exists:function(r){return new _r(r,{addons:[]}).open().then(function(i){return i.close(),!0}).catch("NoSuchDatabaseError",function(){return!1})},getDatabaseNames:function(r){try{return i=_r.dependencies,u=i.indexedDB,i=i.IDBKeyRange,(Ui(u)?Promise.resolve(u.databases()).then(function(d){return d.map(function(p){return p.name}).filter(function(p){return p!==no})}):Bi(u,i).toCollection().primaryKeys()).then(r)}catch{return Ct(new Ie.MissingAPI)}var i,u},defineClass:function(){return function(r){v(this,r)}},ignoreTransaction:function(r){return De.trans?yr(De.transless||Tt,r):r()},vip:qi,async:function(r){return function(){try{var i=Ji(r.apply(this,arguments));return i&&typeof i.then=="function"?i:Se.resolve(i)}catch(u){return Ct(u)}}},spawn:function(r,i,u){try{var d=Ji(r.apply(u,i||[]));return d&&typeof d.then=="function"?d:Se.resolve(d)}catch(p){return Ct(p)}},currentTransaction:{get:function(){return De.trans||null}},waitFor:function(r,i){return r=Se.resolve(typeof r=="function"?_r.ignoreTransaction(r):r).timeout(i||6e4),De.trans?De.trans.waitFor(r):r},Promise:Se,debug:{get:function(){return G},set:function(r){Q(r)}},derive:re,extend:v,props:S,override:I,Events:ls,on:Xn,liveQuery:Gl,extendObservabilitySet:mo,getByKeyPath:ae,setByKeyPath:X,delByKeyPath:function(r,i){typeof i=="string"?X(r,i,void 0):"length"in i&&[].map.call(i,function(u){X(r,u,void 0)})},shallowClone:O,deepClone:ke,getObjectDiff:Xi,cmp:rt,asap:de,minKey:-1/0,addons:[],connections:{get:ps.toArray},errnames:Kt,dependencies:wo,cache:wr,semVer:"4.4.6",version:"4.4.6".split(".").map(function(r){return parseInt(r)}).reduce(function(r,i,u){return r+i/Math.pow(10,2*u)})})),_r.maxKey=ds(_r.dependencies.IDBKeyRange),typeof dispatchEvent<"u"&&typeof addEventListener<"u"&&(Xn(lo,function(r){Qn||(r=new CustomEvent(Di,{detail:r}),Qn=!0,dispatchEvent(r),Qn=!1)}),addEventListener(Di,function(r){r=r.detail,Qn||ta(r)}));var Hr,Qn=!1,Yl=function(){};return typeof BroadcastChannel<"u"&&((Yl=function(){(Hr=new BroadcastChannel(Di)).onmessage=function(r){return r.data&&ta(r.data)}})(),typeof Hr.unref=="function"&&Hr.unref(),Xn(lo,function(r){Qn||Hr.postMessage(r)})),typeof addEventListener<"u"&&(addEventListener("pagehide",function(r){if(!jn.disableBfCache&&r.persisted){G&&console.debug("Dexie: handling persisted pagehide"),Hr!=null&&Hr.close();for(var i=0,u=ps.toArray();in.key===e);return t?t.label:"其他"}const rh={class:"dialog",role:"dialog","aria-label":"编辑工作记录"},sh={class:"dialog-head"},oh={key:0,class:"muted dialog-sub"},ih={class:"dialog-body"},ah={class:"form-grid"},lh={class:"field span2"},uh={key:0,class:"form-error"},ch={class:"field"},dh=["value"],fh={class:"field"},ph=["value"],vh={class:"field"},hh={class:"field"},mh={class:"field span2"},yh={class:"field"},gh={class:"field"},bh={class:"dialog-btns"},wh=Rt({__name:"EditLogDialog",props:{open:{type:Boolean},item:{},projects:{},date:{}},emits:["cancel","save"],setup(e,{emit:t}){const n=e,s=t,o=L(""),a=L(null),c=L("dev"),f=L(null),v=L(""),y=L(""),m=L(0),_=L(0),S=L(""),$=L(null),U=st(()=>{var I;const ie=n.projects.filter(Z=>Z.archived!==1),T=(I=n.item)==null?void 0:I.project_id;if(T&&!ie.some(Z=>Z.id===T)){const Z=n.projects.find(ae=>ae.id===T),de=ie.slice();return Z&&de.unshift({...Z,name:Z.name+"(已归档)"}),de}return ie});function re(ie){n.open&&ie.key==="Escape"&&s("cancel")}ht(()=>n.open,async ie=>{var T;if(ie){const I=n.item;o.value=(I==null?void 0:I.content)??"",a.value=(I==null?void 0:I.project_id)??null,c.value=(I==null?void 0:I.category)??"dev",f.value=(I==null?void 0:I.minutes)??null,v.value=(I==null?void 0:I.takeaway)??"",y.value=(I==null?void 0:I.remark)??"",m.value=(I==null?void 0:I.is_milestone)??0,_.value=(I==null?void 0:I.needs_followup)??0,S.value="",window.addEventListener("keydown",re),await ss(),(T=$.value)==null||T.focus()}else window.removeEventListener("keydown",re)}),pr(()=>window.removeEventListener("keydown",re)),ht(o,()=>{S.value&&(S.value="")});function se(){const ie=o.value.trim();if(!ie){S.value="请填写工作内容";return}if(!n.item||!n.item.id){s("cancel");return}s("save",{id:n.item.id,content:ie,project_id:a.value,category:c.value,minutes:f.value&&f.value>0?f.value:null,takeaway:v.value.trim()||null,remark:y.value.trim()||null,is_milestone:m.value?1:0,needs_followup:_.value?1:0})}return(ie,T)=>(E(),Pt(Dr,{to:"body"},[Ee(os,{name:"modal"},{default:fr(()=>[e.open?(E(),D("div",{key:0,class:"mask",onClick:T[10]||(T[10]=sn(I=>s("cancel"),["self"]))},[l("div",rh,[l("div",sh,[l("div",null,[T[11]||(T[11]=l("div",{class:"dialog-title"},"编辑工作记录",-1)),e.date?(E(),D("div",oh,ne(e.date),1)):xe("",!0)]),l("button",{class:"icon-btn",title:"关闭",onClick:T[0]||(T[0]=I=>s("cancel"))},[Ee(Xe,{name:"close",size:16})])]),l("div",ih,[l("div",ah,[l("div",lh,[T[12]||(T[12]=l("label",null,"工作内容(必填)",-1)),$e(l("input",{ref_key:"contentInput",ref:$,class:et(["input",{invalid:S.value}]),"onUpdate:modelValue":T[1]||(T[1]=I=>o.value=I),onKeydown:At(se,["enter"])},null,34),[[Me,o.value]]),S.value?(E(),D("div",uh,ne(S.value),1)):xe("",!0)]),l("div",ch,[T[14]||(T[14]=l("label",null,"所属项目",-1)),$e(l("select",{class:"select","onUpdate:modelValue":T[2]||(T[2]=I=>a.value=I)},[T[13]||(T[13]=l("option",{value:null},"无项目",-1)),(E(!0),D(je,null,ot(U.value,I=>(E(),D("option",{key:I.id,value:I.id},ne(I.name),9,dh))),128))],512),[[Vn,a.value]])]),l("div",fh,[T[15]||(T[15]=l("label",null,"工作分类",-1)),$e(l("select",{class:"select","onUpdate:modelValue":T[3]||(T[3]=I=>c.value=I)},[(E(!0),D(je,null,ot(Ut(zs),I=>(E(),D("option",{key:I.key,value:I.key},ne(I.label),9,ph))),128))],512),[[Vn,c.value]])]),l("div",vh,[T[16]||(T[16]=l("label",null,"耗时(分钟)",-1)),$e(l("input",{class:"input",type:"number",min:"0","onUpdate:modelValue":T[4]||(T[4]=I=>f.value=I),placeholder:"选填"},null,512),[[Me,f.value,void 0,{number:!0}]])]),l("div",hh,[T[17]||(T[17]=l("label",null,"主要收获",-1)),$e(l("input",{class:"input","onUpdate:modelValue":T[5]||(T[5]=I=>v.value=I),placeholder:"一句话:学到了什么"},null,512),[[Me,v.value]])]),l("div",mh,[T[18]||(T[18]=l("label",null,"备注",-1)),$e(l("textarea",{class:"textarea","onUpdate:modelValue":T[6]||(T[6]=I=>y.value=I),placeholder:"背景、链接、未决事项(选填)"},null,512),[[Me,y.value]])]),l("div",yh,[T[19]||(T[19]=l("label",null,"成果标记",-1)),l("button",{class:et(["toggle-btn",{on:m.value===1}]),onClick:T[7]||(T[7]=I=>m.value=m.value===1?0:1)},ne(m.value===1?"已标记为成果":"未标记"),3)]),l("div",gh,[T[20]||(T[20]=l("label",null,"待跟进",-1)),l("button",{class:et(["toggle-btn",{onwarn:_.value===1}]),onClick:T[8]||(T[8]=I=>_.value=_.value===1?0:1)},ne(_.value===1?"需要跟进":"无需跟进"),3)])])]),l("div",bh,[l("button",{class:"btn btn-sm",onClick:T[9]||(T[9]=I=>s("cancel"))},"取消"),l("button",{class:"btn btn-primary btn-sm",onClick:se},"保存修改")])])])):xe("",!0)]),_:1})]))}}),_h=Wt(wh,[["__scopeId","data-v-63bc0b48"]]);function Ts(e){return e<10?"0"+e:String(e)}function Bn(e){return e.getFullYear()+"-"+Ts(e.getMonth()+1)+"-"+Ts(e.getDate())}function xt(){return Bn(new Date)}function wt(){const e=new Date;return Bn(e)+"T"+Ts(e.getHours())+":"+Ts(e.getMinutes())+":"+Ts(e.getSeconds())}function Un(e){if(!e)return"--:--";const t=e.indexOf("T");return t>=0?e.slice(t+1,t+6):e.slice(0,5)}function is(e){const t=e.split("-").map(Number);return new Date(t[0],t[1]-1,t[2])}function Nn(e,t){const n=is(e);return n.setDate(n.getDate()+t),Bn(n)}function ei(e,t){const n=is(e),s=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(s,o)),Bn(n)}function Ps(e){const t=is(e),n=(t.getDay()+6)%7;return t.setDate(t.getDate()-n),Bn(t)}function kh(e){const t=is(e).getDay();return t===0||t===6}function xh(e,t){return Math.round((new Date(t).getTime()-new Date(e).getTime())/6e4)}function ld(e){const t=is(e),n=["周日","周一","周二","周三","周四","周五","周六"];return t.getFullYear()+" 年 "+(t.getMonth()+1)+" 月 "+t.getDate()+" 日 "+n[t.getDay()]}const Ch=15e4;function Da(e){const t=new Uint8Array(e);let n="";for(let s=0;s({}));if(!o.ok){const c=a&&a.error||"服务返回 "+o.status;throw e==="register"&&o.status===409?new Error("云端已有同名账号且密码一致,直接登录即可"):new Error(String(c))}if(!a.userId||!a.username)throw new Error("登录响应异常");return{userId:String(a.userId),username:String(a.username)}}async function pl(e,t,n){const s=await Nh(n,e,t);oi(s.userId);const o={userId:s.userId,username:s.username};return Kh(o),yd(s.username,t),o}async function Vh(e,t){const n=(e||"").trim();if(!n||!t)throw new Error("请输入用户名与密码");return pl(n,t,"login")}async function Bh(e,t,n){const s=(e||"").trim();if(s.length<2||s.length>20)throw new Error("用户名需 2 到 20 个字符");if(t.length<6)throw new Error("登录密码至少 6 位");return pl(s,t,"register")}async function Uh(){const e=gn();if(!e)return null;try{return await pl(e.username,e.password,"login")}catch{return null}}async function qh(){ri(),ul(),si=null,md()}function Hh(){ri(),ul(),si=null,md(),Fh()}async function Wh(e,t){if(!Vs())throw new Error("未登录");if(t.length<6)throw new Error("新密码至少 6 位");const s=gn();if(!s||s.password!==e)throw new Error("旧密码不正确");const o=await vr();let a;try{a=await fetch(o+"/api/auth/password",{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+gd()},body:JSON.stringify({oldPassword:e,newPassword:t})})}catch{throw new Error("无法连接同步服务器")}if(!a.ok){const c=await a.json().catch(()=>({}));throw new Error(c&&c.error||"修改失败 "+a.status)}yd(s.username,t)}async function zh(){if(!Vs())throw new Error("未登录");const t=await vr();let n;try{n=await fetch(t+"/api/auth/delete",{method:"POST",headers:{Authorization:"Bearer "+gd()}})}catch{throw new Error("无法连接同步服务器")}if(!n.ok){const s=await n.json().catch(()=>({}));throw new Error(s&&s.error||"删除失败 "+n.status)}Hh()}function gd(){return xi()}const Fa=L(null),Na=L(null),Gs=L(0);function rr(){Gs.value++}const Xr=L(""),Bs=["project","work_log","log_item","attendance","weekly_note","setting","memo","credential","transaction"],Yr=new Set(["sync_cursor","sync_last_time","sync_token","last_project","last_category"]),Gh=vr;function Io(e){return JSON.stringify(e)}async function Yh(e){return fe.table(e).toArray()}function jo(e,t){return e==="setting"?t.key:t.id}async function Jh(){for(const e of Bs){const t=fe.table(e),n=await t.toArray();for(const s of n){if(e==="setting"&&Yr.has(s.key))continue;const o={};s.uuid||(o.uuid=Xh()),!s.updated_at&&s.created_at&&(o.updated_at=s.created_at),Object.keys(o).length&&await t.update(jo(e,s),o)}}}function Xh(){return typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():"u"+Date.now().toString(36)+Math.random().toString(36).slice(2,10)}async function Qh(){return gn()!=null}async function Zh(){try{return localStorage.getItem("dsh_last_sync")||""}catch{return""}}async function em(e){try{localStorage.setItem("dsh_last_sync",e)}catch{}}async function bd(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 s=await n.json();if(!s||!s.token)throw new Error("云端登录异常");return String(s.token)}async function tm(e,t){let n=xi();return n||(n=await bd(e,t),Ns(n),n)}async function wd(){const e=gn();if(!e)throw new Error("未登录");const t=await vr(),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 Va(){const e=gn();if(!e)throw new Error("未登录,无法同步");return Cd({baseUrl:await vr(),username:e.username,password:e.password})}async function _d(){try{await Va()}catch(e){Xr.value=e instanceof Error?e.message:String(e);try{await Va()}catch{}throw e}}function kd(e,t,n){const s={};for(const o of Object.keys(t))o!=="id"&&(s[o]=t[o]);if(e==="log_item"){delete s.work_log_id,delete s.project_id;const o=t.work_log_id?n.workLog.get(t.work_log_id):null;o&&o.uuid&&(s.wuuid=o.uuid);const a=t.project_id?n.project.get(t.project_id):null;a&&a.uuid&&(s.puuid=a.uuid)}return s}async function xd(){const e=await fe.work_log.toArray(),t=await fe.project.toArray();return{workLog:new Map(e.map(n=>[n.id,n])),project:new Map(t.map(n=>[n.id,n]))}}let As=!1,Do=!1,Ba=!1,Qr=null,xn=null,Ua="",qa=!1,Lo=null;async function Zr(){if(As){Do=!0;return}try{if(!await Qh())return;await Cd(await nm()),Xr.value=""}catch(e){Xr.value=e instanceof Error?e.message:String(e)}}async function nm(){const e=gn();if(!e)throw new Error("未登录,无法同步");return{baseUrl:await vr(),username:e.username,password:e.password}}function rm(){if(qa)return;qa=!0,Lo=Zv(async()=>{const t={};for(const n of Bs)t[n]=await fe.table(n).count();return t}).subscribe({next:()=>{Ba||As||(Qr&&globalThis.clearTimeout(Qr),Qr=globalThis.setTimeout(()=>{Zr()},3e3))},error:()=>{}})}function sm(){Lo&&(Lo.unsubscribe(),Lo=null),xn&&(xn.close(),xn=null,Ua=""),Qr&&(globalThis.clearTimeout(Qr),Qr=null),qa=!1}function om(e,t){const n=e+"|"+t;if(!(xn&&Ua===n)){xn&&(xn.close(),xn=null);try{xn=new EventSource(e+"/api/events?token="+encodeURIComponent(t)),Ua=n,xn.onmessage=()=>{Zr()}}catch{xn=null}}}async function Cd(e){if(As)return Do=!0,{pushed:0,pulled:0,removed:0,errors:0,at:""};As=!0,Ba=!0;try{const t=await im(e);return Do&&(Do=!1,globalThis.setTimeout(()=>{Zr()},800)),t}finally{As=!1,Ba=!1}}async function im(e){const t=e.baseUrl.trim().replace(/\/+$/,"");if(!t)throw new Error("请先配置同步服务地址");await Jh();const n=await xd(),s=await fe.sync_mirror.toArray(),o=new Map;for(const se of s)o.set(se.table+"|"+se.uuid,se);const a={},c=[];let f=0;for(const se of Bs){let ie=await Yh(se);se==="setting"&&(ie=ie.filter(I=>!Yr.has(I.key)));const T=new Map;for(const I of ie)T.set(I.uuid,I);for(const[I,Z]of T){const de=kd(se,Z,n),ae=Io(de),X=o.get(se+"|"+I);(!X||X.hash!==ae)&&(a[se]=a[se]||[],a[se].push(de),f++)}for(const[I,Z]of o)I.startsWith(se+"|")&&!T.has(Z.uuid)&&c.push({table:se,uuid:Z.uuid,deleted_at:wt()});a[se]=a[se]||[]}c.push(...dm());const v=await tm(t,e),y=se=>fetch(t+"/api/sync",{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+se},body:JSON.stringify({device:"client",tables:a,tombstones:c})});let m=await y(v);if(m.status===401){Ns("");const se=await bd(t,e);Ns(se),m=await y(se)}if(!m.ok)throw new Error("同步服务返回 "+m.status);const _=await m.json(),S=_.tables||{},$=_.tombstones||[],U=await um(S,$);om(t,xi()||v);const re=wt();return await em(re),(U.changed>0||U.removed>0||f>0)&&rr(),{pushed:f,pulled:U.changed,removed:U.removed,errors:0,at:re}}function Sd(){var t;return"dsh_idmap_"+(((t=gn())==null?void 0:t.username)||"anon")}function am(){try{const e=localStorage.getItem(Sd());if(e)return JSON.parse(e)}catch{}return{}}function lm(e){try{localStorage.setItem(Sd(),JSON.stringify(e))}catch{}}async function um(e,t){const n=am(),s=new Set(t.map(S=>S.table+"|"+S.uuid)),o=new Map;for(const S of await fe.sync_mirror.toArray())o.set(S.table+"|"+S.uuid,S);const a=new Set(Array.from(o.keys()).map(S=>S.split("|")[1]));let c=0,f=0;const v={},y={};for(const S of Bs){const $=fe.table(S),U=await $.toArray(),re=new Map(U.map(x=>[jo(S,x),x])),se=new Map(U.filter(x=>x.uuid).map(x=>[x.uuid,x])),ie=(e[S]||[]).filter(x=>!s.has(S+"|"+x.uuid)),T=ie.filter(x=>!(S==="setting"&&Yr.has(x.key))),I=ie.filter(x=>S==="setting"&&Yr.has(x.key));for(const x of I)cm(S,x.uuid);const Z=S==="setting"?[]:U.filter(x=>x.uuid&&!a.has(x.uuid)&&!s.has(S+"|"+x.uuid)),de={v:Math.max(0,...U.map(x=>Number(x.id)||0))};T.length;const ae=[];for(const x of T){const V={...x};if(S==="log_item"){const ke=V.wuuid?v[V.wuuid]:void 0;if(!ke)continue;V.work_log_id=ke,delete V.wuuid,V.project_id=V.puuid?y[V.puuid]??null:null,delete V.puuid}let ue=jo(S,x);if(S==="setting")ue=x.key;else{const ke=n[S]&&n[S][x.uuid],Te=se.get(x.uuid);Te&&Te.id!=null?ue=Te.id:typeof ke=="number"?ue=ke:ue=++de.v}const W={...V,id:ue};S==="setting"&&Yr.has(W.key)||(ae.push(W),S==="work_log"&&(v[x.uuid]=ue),S==="project"&&(y[x.uuid]=ue))}const X=ae.concat(Z);for(const x of X){const V=re.get(jo(S,x));(!V||Io(V)!==Io(x))&&c++}f+=U.filter(x=>x.uuid&&!ae.some(V=>V.uuid===x.uuid)&&!s.has(S+"|"+x.uuid)).length,await $.clear(),X.length&&await $.bulkPut(X);const O={};for(const x of X)x.uuid&&(O[x.uuid]=x.id);n[S]=O}lm(n);const m=await xd(),_=[];for(const S of Bs){const $=await fe.table(S).toArray();for(const U of $)S==="setting"&&Yr.has(U.key)||U.uuid&&_.push({table:S,uuid:U.uuid,hash:Io(kd(S,U,m))})}return await fe.sync_mirror.clear(),_.length&&await fe.sync_mirror.bulkAdd(_.map(S=>({...S}))),await fe.tombstone.clear(),{changed:c,removed:f+ii.length}}const ii=[];function cm(e,t){ii.some(n=>n.table===e&&n.uuid===t)||ii.push({table:e,uuid:t,deleted_at:wt()})}function dm(){return ii.splice(0)}const fm=new Set(["sync_cursor","sync_last_time","sync_token","last_project","last_category"]);async function _t(){await _d()}async function gt(e,t){const n=await fe.setting.get(e);return n?n.value:t}async function Lt(e,t){await fe.setting.put({key:e,value:t}),fm.has(e)||await _t()}async function Rr(){const e=await Promise.all([gt("work_start","09:00"),gt("work_end","18:00"),gt("grace_minutes","10"),gt("lunch_minutes","60"),gt("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 pm(){const e=await gt("last_project",""),t=await gt("last_category","dev");return{project_id:e?Number(e):null,category:t||"dev"}}async function vm(){return gt("last_location","")}async function hm(e,t){const n=t.trim();await Lt("last_location",n),n&&await ai(n);let s=!1;const o=await bn(e);o&&o.id?(o.location||"")!==n&&(await fe.attendance.update(o.id,{location:n||null}),s=!0):n&&(await fe.attendance.add({date:e,clock_in_at:null,clock_out_at:null,kind:"normal",note:null,location:n,created_at:wt()}),s=!0),s&&await _t()}async function vl(){const e=await gt("location_presets","");if(!e)return Ku.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 Ku.slice()}async function Ed(e){const t=Array.from(new Set(e.map(n=>n.trim()).filter(Boolean)));await Lt("location_presets",JSON.stringify(t))}async function ai(e){const t=e.trim();if(!t)return;const n=await vl();n.includes(t)||await Ed([...n,t])}async function Us(e=!1){const t=await fe.project.orderBy("name").toArray();return e?t:t.filter(n=>n.archived!==1)}async function mm(e){await fe.project.add({name:e.trim(),archived:0,created_at:wt()}),await _t()}async function ym(e,t){await fe.project.update(e,{name:t.trim()}),await _t()}async function gm(e,t){await fe.project.update(e,{archived:t?1:0}),await _t()}async function bn(e){return fe.attendance.where("date").equals(e).first()}async function $d(e,t){const n=((t===void 0?await gt("last_location",""):t)||"").trim();let s=!1;const o=await bn(e);if(o&&o.id){if(!o.clock_in_at){const a={clock_in_at:wt()};n&&(a.location=n),await fe.attendance.update(o.id,a),s=!0}n&&(await gt("last_location","")!==n&&await Lt("last_location",n),await ai(n)),s&&await _t();return}await fe.attendance.add({date:e,clock_in_at:wt(),clock_out_at:null,kind:"normal",note:null,location:n||null,created_at:wt()}),n&&(await Lt("last_location",n),await ai(n)),await _t()}async function bm(e){const t=await bn(e);t&&t.id&&t.clock_in_at&&!t.clock_out_at&&(await fe.attendance.update(t.id,{clock_out_at:wt()}),await _t())}async function wm(){const e=new Date,t=Bn(e);let n="";if(e.getHours()<4){const s=await bn(Nn(t,-1));s&&s.id&&s.clock_in_at&&!s.clock_out_at&&(await fe.attendance.update(s.id,{clock_out_at:wt()}),n=s.date)}if(!n){const s=await bn(t);s&&s.id&&s.clock_in_at&&!s.clock_out_at&&(await fe.attendance.update(s.id,{clock_out_at:wt()}),n=s.date)}if(!n)throw new Error("没有进行中的打卡");return await _t(),n}async function _m(e,t,n,s,o){(o||"").trim()&&await ai(o);const a=await bn(e),c={date:e,clock_in_at:t,clock_out_at:n,kind:"makeup",note:s||null,location:(o||"").trim()||null,created_at:wt()};a&&a.id?await fe.attendance.update(a.id,c):await fe.attendance.add(c),await _t()}async function km(e,t,n){const s=(n||"").trim();if(!s)return;const o=await bn(e);o&&o.id&&(await fe.attendance.update(o.id,{[t]:e+"T"+s+":00"}),await _t())}async function Ci(e,t){return fe.attendance.where("date").between(e,t,!0,!0).toArray()}async function xm(e,t){const n=await bn(e);if(t){const s={date:e,kind:"leave",clock_in_at:null,clock_out_at:null,created_at:wt()};n&&n.id?await fe.attendance.update(n.id,s):await fe.attendance.add({...s,note:null,location:null})}else n&&n.id&&await fe.attendance.update(n.id,{kind:"normal"});await _t()}async function Cm(e){const t=await fe.work_log.where("date").equals(e).first();return t||{id:await fe.work_log.add({date:e,created_at:wt()}),date:e,created_at:wt()}}async function Sm(e){return fe.work_log.where("date").equals(e).first()}async function Em(e){const t=await Sm(e);return!t||!t.id?[]:(await fe.log_item.where("work_log_id").equals(t.id).toArray()).sort((s,o)=>o.id-s.id)}async function $m(e,t){const n=await fe.work_log.where("date").equals(e).first();let s;n&&n.id?s=n:s=await Cm(e),await fe.table("log_item").add({work_log_id:s.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:wt()});const o=t.project_id?String(t.project_id):"";await gt("last_project","")!==o&&await Lt("last_project",o),await gt("last_category","")!==t.category&&await Lt("last_category",t.category),await _t()}async function ya(e,t){await fe.table("log_item").update(e,t),await _t()}async function Tm(e){await fe.table("log_item").delete(e),await _t()}async function Si(e,t){const n=await fe.work_log.where("date").between(e,t,!0,!0).toArray();if(!n.length)return[];const s=new Map(n.map(a=>[a.id,a.date]));return(await fe.table("log_item").where("work_log_id").anyOf(n.map(a=>a.id)).toArray()).map(a=>({...a,date:s.get(a.work_log_id)||""})).sort((a,c)=>a.date===c.date?a.id-c.id:a.datet.updated_at[c.id,c.date]));return(await fe.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 Lm(e,t=4){const n=e.trim().toLowerCase();return n?(await fe.memo.toArray()).filter(o=>((o.title||"")+" "+(o.content||"")).toLowerCase().includes(n)).sort((o,a)=>o.updated_at{await Promise.all([fe.project.clear(),fe.work_log.clear(),s.clear(),fe.attendance.clear(),fe.weekly_note.clear(),fe.setting.clear(),fe.memo.clear(),fe.credential.clear(),o.clear()]),n.project&&n.project.length&&await fe.project.bulkAdd(n.project),n.work_log&&n.work_log.length&&await fe.work_log.bulkAdd(n.work_log),n.log_item&&n.log_item.length&&await s.bulkAdd(n.log_item),n.attendance&&n.attendance.length&&await fe.attendance.bulkAdd(n.attendance),n.weekly_note&&n.weekly_note.length&&await fe.weekly_note.bulkAdd(n.weekly_note),n.setting&&n.setting.length&&await fe.setting.bulkAdd(n.setting),n.memo&&n.memo.length&&await fe.memo.bulkAdd(n.memo),n.credential&&n.credential.length&&await fe.credential.bulkAdd(n.credential),n.transaction&&n.transaction.length&&await o.bulkAdd(n.transaction)}),await _t()}function To(e){const t=e.split(":");return Number(t[0])*60+Number(t[1])}function Ys(e,t,n,s){if(e&&e.kind==="leave")return{status:"leave",label:"请假",makeup:!1,workedMinutes:null};if(kh(t))return{status:"rest",label:"休息日",makeup:!1,workedMinutes:null};if(!e||!e.clock_in_at)return s?{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:s?"进行中":"未完成",makeup:o,workedMinutes:null};const a=To(Un(e.clock_in_at)),c=To(Un(e.clock_out_at)),f=To(n.work_start),v=To(n.work_end);let y="normal";!o&&a>f+n.grace_minutes?y="late":!o&&c{Ro.value=Ro.value.filter(n=>n.id!==t)},2e3)}function Hm(){return Ro}const Wm={class:"day-panel"},zm={class:"dp-head"},Gm={class:"dp-date"},Ym={class:"card sec"},Jm={class:"att-grid"},Xm={class:"att-cell"},Qm={key:0,class:"edit-row"},Zm={key:1,class:"att-val"},ey={class:"att-cell"},ty={key:0,class:"edit-row"},ny={key:1,class:"att-val"},ry={class:"att-cell"},sy=["list"],oy=["id"],iy=["value"],ay={class:"att-cell"},ly={class:"att-val status-val"},uy={key:0,class:"tag"},cy={key:1,class:"muted"},dy={key:0,class:"att-note muted"},fy={class:"att-actions"},py=["disabled"],vy=["disabled"],hy=["disabled"],my=["disabled"],yy={key:0,class:"card sec makeup"},gy={class:"form-grid"},by={class:"field"},wy={class:"field"},_y={class:"field span2"},ky=["list"],xy={class:"field span2"},Cy={key:0,class:"form-error"},Sy={class:"form-footer"},Ey={class:"card sec"},$y={class:"form-grid"},Ty={class:"field span2"},Py={key:0,class:"form-error"},Ay={class:"field"},Oy=["value"],My={class:"field"},Iy=["value"],jy={class:"field"},Dy={class:"field"},Ly={class:"field span2"},Ry={class:"form-footer"},Ky=["disabled"],Fy=["disabled"],Ny={class:"list-sec"},Vy={class:"sec-title"},By={key:0,class:"empty muted"},Uy={class:"item-main"},qy={class:"tag"},Hy=["onClick"],Wy={key:0,class:"muted item-meta"},zy={key:1,class:"muted num item-meta"},Gy=["onClick"],Yy=["onClick"],Jy=["onClick"],Xy=["onClick"],Qy={key:0,class:"item-sub"},Zy={key:0,class:"muted2"},eg={key:1,class:"muted"},tg={key:1,class:"dp-foot muted num"},ng=Rt({__name:"DayPanel",props:{date:{}},setup(e){const t=e,n=L(!0),s=L(null),o=L(void 0),a=L([]),c=L([]),f=L(""),v=L([]),y=st(()=>"loc-list-"+t.date),m=st(()=>t.date===xt());async function _(){n.value=!0,s.value=await Rr(),o.value=await bn(t.date),a.value=await Em(t.date),c.value=await Us(!0),v.value=await vl(),f.value=o.value&&o.value.location||await vm(),n.value=!1}pn(_),ht(()=>t.date,_),ht(Gs,()=>{_()});const S=st(()=>c.value.filter(z=>z.archived!==1));function $(z){if(!z)return"";const G=c.value.find(Q=>Q.id===z);return G?G.name:"已删除项目"}const U=st(()=>s.value?Ys(o.value,t.date,s.value,m.value):null),re=st(()=>a.value.reduce((z,G)=>z+(G.minutes||0),0)),se=L(!1);async function ie(){se.value||(se.value=!0,await $d(t.date,f.value),await _(),rr(),Ne("上班打卡成功"),se.value=!1)}async function T(){se.value||(se.value=!0,await bm(t.date),await _(),rr(),Ne("下班打卡成功"),se.value=!1)}async function I(){await hm(t.date,f.value),rr(),Ne("地点已更新")}const Z=L(!1),de=st(()=>{var z;return((z=o.value)==null?void 0:z.kind)==="leave"});function ae(){if(o.value&&o.value.clock_in_at){Z.value=!0;return}X(!0)}async function X(z){Z.value=!1,await xm(t.date,z),await _(),rr(),Ne(z?"已标记为休假":"已取消休假")}const O=L(null),x=L(""),V=L(null);ht(O,async z=>{var G;z&&(await ss(),(G=V.value)==null||G.focus())});function ue(z){var Q,Pe;const G=z==="in"?(Q=o.value)==null?void 0:Q.clock_in_at:(Pe=o.value)==null?void 0:Pe.clock_out_at;O.value=z,x.value=G?Un(G):z==="in"?"09:00":"18:00"}function W(){O.value=null}async function ke(){const z=O.value;z&&(O.value=null,x.value&&(await km(t.date,z==="in"?"clock_in_at":"clock_out_at",x.value),await _(),rr(),Ne("打卡时间已修改")))}const Te=L(!1),Je=L("09:00"),Le=L("18:00"),qe=L(""),Ke=L(""),it=L("");function Ge(){Ke.value=f.value,it.value="",Te.value=!Te.value}async function Qe(){if(!Je.value||!Le.value){it.value="请填写上班与下班时间";return}await _m(t.date,t.date+"T"+Je.value+":00",t.date+"T"+Le.value+":00",qe.value.trim(),Ke.value),Te.value=!1,qe.value="",it.value="",await _(),rr(),Ne("补卡已保存")}const Ce=L(""),ee=L("");ht(Ce,()=>{ee.value&&(ee.value="")});const te=L(null),we=L("dev"),Fe=L(null),dt=L(""),Kt=L(""),Ot=L(!1),Ie=st(()=>!!(Ce.value.trim()||Fe.value||dt.value.trim()||Kt.value.trim()));pn(async()=>{const z=await pm();te.value=z.project_id,we.value=z.category});function b(){Ce.value="",Fe.value=null,dt.value="",Kt.value="",ee.value=""}async function g(){const z=Ce.value.trim();if(!z){ee.value="请填写工作内容";return}Ot.value||(Ot.value=!0,await $m(t.date,{content:z,project_id:te.value,category:we.value,minutes:Fe.value&&Fe.value>0?Fe.value:null,takeaway:dt.value.trim()||null,remark:Kt.value.trim()||null}),b(),await _(),Ne("记录已添加"),Ot.value=!1)}const C=L(null);function Y(z){C.value=z}async function R(z){const G=z.id,Q={content:z.content,project_id:z.project_id,category:z.category,minutes:z.minutes,takeaway:z.takeaway,remark:z.remark,is_milestone:z.is_milestone,needs_followup:z.needs_followup};await ya(G,Q),C.value=null,await _(),Ne("修改已保存")}async function le(z){await ya(z.id,{is_milestone:z.is_milestone?0:1}),await _()}async function ge(z){await ya(z.id,{needs_followup:z.needs_followup?0:1}),await _()}const me=L(null);async function ce(){me.value&&me.value.id&&await Tm(me.value.id),me.value=null,await _(),Ne("记录已删除")}return(z,G)=>(E(),D("div",Wm,[l("div",zm,[l("div",Gm,ne(Ut(ld)(e.date)),1)]),l("div",Ym,[G[25]||(G[25]=l("div",{class:"sec-title"},"出勤信息",-1)),l("div",Jm,[l("div",Xm,[G[21]||(G[21]=l("label",null,"上班时间",-1)),O.value==="in"?(E(),D("div",Qm,[$e(l("input",{ref_key:"timeInput",ref:V,type:"time",class:"input time-input","onUpdate:modelValue":G[0]||(G[0]=Q=>x.value=Q),onKeydown:[At(ke,["enter"]),At(W,["esc"])]},null,544),[[Me,x.value]]),l("button",{class:"btn btn-primary btn-sm",onClick:ke},"确认"),l("button",{class:"btn btn-sm",onClick:W},"取消")])):(E(),D("div",Zm,[l("span",{class:et(["num",{"val-empty":!(o.value&&o.value.clock_in_at)}])},ne(o.value&&o.value.clock_in_at?Ut(Un)(o.value.clock_in_at):"未打卡"),3),o.value&&o.value.id?(E(),D("button",{key:0,class:"icon-btn",title:"修改上班时间",onClick:G[1]||(G[1]=Q=>ue("in"))},[Ee(Xe,{name:"edit",size:13})])):xe("",!0)]))]),l("div",ey,[G[22]||(G[22]=l("label",null,"下班时间",-1)),O.value==="out"?(E(),D("div",ty,[$e(l("input",{ref_key:"timeInput",ref:V,type:"time",class:"input time-input","onUpdate:modelValue":G[2]||(G[2]=Q=>x.value=Q),onKeydown:[At(ke,["enter"]),At(W,["esc"])]},null,544),[[Me,x.value]]),l("button",{class:"btn btn-primary btn-sm",onClick:ke},"确认"),l("button",{class:"btn btn-sm",onClick:W},"取消")])):(E(),D("div",ny,[l("span",{class:et(["num",{"val-empty":!(o.value&&o.value.clock_out_at)}])},ne(o.value&&o.value.clock_out_at?Ut(Un)(o.value.clock_out_at):"未打卡"),3),o.value&&o.value.id?(E(),D("button",{key:0,class:"icon-btn",title:"修改下班时间",onClick:G[3]||(G[3]=Q=>ue("out"))},[Ee(Xe,{name:"edit",size:13})])):xe("",!0)]))]),l("div",ry,[G[23]||(G[23]=l("label",null,"上班地点",-1)),$e(l("input",{class:"input","onUpdate:modelValue":G[4]||(G[4]=Q=>f.value=Q),list:y.value,placeholder:"可直接输入",title:"上班地点,可自由输入",onChange:I},null,40,sy),[[Me,f.value]]),l("datalist",{id:y.value},[(E(!0),D(je,null,ot(v.value,Q=>(E(),D("option",{key:Q,value:Q},null,8,iy))),128))],8,oy)]),l("div",ay,[G[24]||(G[24]=l("label",null,"考勤状态",-1)),l("div",ly,[U.value?(E(),D(je,{key:0},[l("span",{class:et(["dot",U.value.status])},null,2),l("span",null,ne(U.value.label),1),o.value&&o.value.kind==="makeup"?(E(),D("span",uy,"补卡")):xe("",!0)],64)):(E(),D("span",cy,"--"))])])]),o.value&&o.value.note?(E(),D("div",dy,"补卡说明:"+ne(o.value.note),1)):xe("",!0),l("div",fy,[m.value&&(!o.value||!o.value.clock_in_at)?(E(),D("button",{key:0,class:"btn btn-primary btn-sm",disabled:se.value,onClick:ie},"上班打卡",8,py)):m.value&&o.value&&o.value.clock_in_at&&!o.value.clock_out_at?(E(),D("button",{key:1,class:"btn btn-primary btn-sm",disabled:se.value,onClick:T},"下班打卡",8,vy)):xe("",!0),!m.value&&(!o.value||!o.value.clock_in_at)?(E(),D("button",{key:2,class:"btn btn-sm",onClick:Ge},"补卡")):xe("",!0),de.value?(E(),D("button",{key:4,class:"btn btn-sm",disabled:se.value,onClick:G[5]||(G[5]=Q=>X(!1))},"取消休假",8,my)):(E(),D("button",{key:3,class:"btn btn-sm",disabled:se.value,onClick:ae},"标记休假",8,hy))])]),Te.value?(E(),D("div",yy,[G[30]||(G[30]=l("div",{class:"sec-title"},"补卡登记",-1)),l("div",gy,[l("div",by,[G[26]||(G[26]=l("label",null,"上班时间",-1)),$e(l("input",{type:"time",class:"input","onUpdate:modelValue":G[6]||(G[6]=Q=>Je.value=Q)},null,512),[[Me,Je.value]])]),l("div",wy,[G[27]||(G[27]=l("label",null,"下班时间",-1)),$e(l("input",{type:"time",class:"input","onUpdate:modelValue":G[7]||(G[7]=Q=>Le.value=Q)},null,512),[[Me,Le.value]])]),l("div",_y,[G[28]||(G[28]=l("label",null,"上班地点",-1)),$e(l("input",{class:"input",list:y.value,"onUpdate:modelValue":G[8]||(G[8]=Q=>Ke.value=Q),placeholder:"可直接输入"},null,8,ky),[[Me,Ke.value]])]),l("div",xy,[G[29]||(G[29]=l("label",null,"补卡原因",-1)),$e(l("input",{class:"input","onUpdate:modelValue":G[9]||(G[9]=Q=>qe.value=Q),placeholder:"如:外出拜访客户忘记打卡"},null,512),[[Me,qe.value]])])]),it.value?(E(),D("div",Cy,ne(it.value),1)):xe("",!0),l("div",Sy,[l("button",{class:"btn btn-sm",onClick:G[10]||(G[10]=Q=>Te.value=!1)},"取消"),l("button",{class:"btn btn-primary btn-sm",onClick:Qe},"保存补卡")])])):xe("",!0),l("div",Ey,[G[38]||(G[38]=l("div",{class:"sec-head"},[l("span",{class:"sec-title"},"新增工作记录"),l("span",{class:"muted form-hint"},"内容必填,其余选填")],-1)),l("div",$y,[l("div",Ty,[G[31]||(G[31]=l("label",null,"工作内容(必填)",-1)),$e(l("input",{class:et(["input",{invalid:ee.value}]),"onUpdate:modelValue":G[11]||(G[11]=Q=>Ce.value=Q),placeholder:"做了什么,一句话一条",onKeydown:At(g,["enter"])},null,34),[[Me,Ce.value]]),ee.value?(E(),D("div",Py,ne(ee.value),1)):xe("",!0)]),l("div",Ay,[G[33]||(G[33]=l("label",null,"所属项目",-1)),$e(l("select",{class:"select","onUpdate:modelValue":G[12]||(G[12]=Q=>te.value=Q)},[G[32]||(G[32]=l("option",{value:null},"无项目",-1)),(E(!0),D(je,null,ot(S.value,Q=>(E(),D("option",{key:Q.id,value:Q.id},ne(Q.name),9,Oy))),128))],512),[[Vn,te.value]])]),l("div",My,[G[34]||(G[34]=l("label",null,"工作分类",-1)),$e(l("select",{class:"select","onUpdate:modelValue":G[13]||(G[13]=Q=>we.value=Q)},[(E(!0),D(je,null,ot(Ut(zs),Q=>(E(),D("option",{key:Q.key,value:Q.key},ne(Q.label),9,Iy))),128))],512),[[Vn,we.value]])]),l("div",jy,[G[35]||(G[35]=l("label",null,"耗时(分钟)",-1)),$e(l("input",{class:"input",type:"number",min:"0","onUpdate:modelValue":G[14]||(G[14]=Q=>Fe.value=Q),placeholder:"选填"},null,512),[[Me,Fe.value,void 0,{number:!0}]])]),l("div",Dy,[G[36]||(G[36]=l("label",null,"主要收获",-1)),$e(l("input",{class:"input","onUpdate:modelValue":G[15]||(G[15]=Q=>dt.value=Q),placeholder:"一句话:学到了什么"},null,512),[[Me,dt.value]])]),l("div",Ly,[G[37]||(G[37]=l("label",null,"备注",-1)),$e(l("textarea",{class:"textarea","onUpdate:modelValue":G[16]||(G[16]=Q=>Kt.value=Q),placeholder:"背景、链接、未决事项(选填)"},null,512),[[Me,Kt.value]])])]),l("div",Ry,[l("button",{class:"btn btn-sm",disabled:!Ie.value,onClick:b},"重置",8,Ky),l("button",{class:"btn btn-primary btn-sm",disabled:Ot.value,onClick:g},"添加记录",8,Fy)])]),l("div",Ny,[l("div",Vy,"工作记录("+ne(a.value.length)+")",1),!a.value.length&&!n.value?(E(),D("div",By,"暂无记录")):xe("",!0),(E(!0),D(je,null,ot(a.value,Q=>(E(),D("div",{key:Q.id,class:"item"},[l("div",Uy,[l("span",qy,ne(Ut(Zo)(Q.category)),1),l("span",{class:"item-content",title:"点击编辑",onClick:Pe=>Y(Q)},ne(Q.content),9,Hy),Q.project_id?(E(),D("span",Wy,ne($(Q.project_id)),1)):xe("",!0),Q.minutes?(E(),D("span",zy,ne(Q.minutes)+" 分钟",1)):xe("",!0),G[39]||(G[39]=l("span",{class:"flex1"},null,-1)),l("button",{class:"icon-btn",title:"编辑完整信息",onClick:Pe=>Y(Q)},[Ee(Xe,{name:"edit",size:14})],8,Gy),l("button",{class:et(["icon-btn",{active:Q.is_milestone===1}]),title:"成果标记",onClick:Pe=>le(Q)},[Ee(Xe,{name:"star",size:14})],10,Yy),l("button",{class:et(["icon-btn",{"active-warn":Q.needs_followup===1}]),title:"待跟进",onClick:Pe=>ge(Q)},[Ee(Xe,{name:"flag",size:14})],10,Jy),l("button",{class:"icon-btn",title:"删除",onClick:Pe=>me.value=Q},[Ee(Xe,{name:"close",size:14})],8,Xy)]),Q.takeaway||Q.remark?(E(),D("div",Qy,[Q.takeaway?(E(),D("div",Zy,"收获:"+ne(Q.takeaway),1)):xe("",!0),Q.remark?(E(),D("div",eg,"备注:"+ne(Q.remark),1)):xe("",!0)])):xe("",!0)]))),128)),a.value.length?(E(),D("div",tg,[en(" 共 "+ne(a.value.length)+" 条事项 ",1),re.value?(E(),D(je,{key:0},[en(" · "+ne((re.value/60).toFixed(1))+" 小时",1)],64)):xe("",!0)])):xe("",!0)]),Ee(qn,{open:!!me.value,title:"删除确认",message:me.value?"将删除工作记录「"+me.value.content+"」。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:G[17]||(G[17]=Q=>me.value=null),onConfirm:ce},null,8,["open","message"]),Ee(qn,{open:Z.value,title:"标记休假确认",message:"该日已有打卡记录,标记休假将清空上下班时间。是否继续?","confirm-text":"标记休假",danger:"",onCancel:G[18]||(G[18]=Q=>Z.value=!1),onConfirm:G[19]||(G[19]=Q=>X(!0))},null,8,["open"]),Ee(_h,{open:!!C.value,item:C.value,projects:c.value,date:e.date,onCancel:G[20]||(G[20]=Q=>C.value=null),onSave:R},null,8,["open","item","projects","date"])]))}}),Td=Wt(ng,[["__scopeId","data-v-2e90c9d8"]]),rg={class:"cal-page"},sg={class:"cal-toolbar"},og={class:"cal-title num"},ig={class:"cal-head"},ag={class:"cal-grid"},lg=["title","onClick"],ug={class:"cal-marks"},cg={key:0,class:"drawer"},dg={class:"drawer-head"},fg={class:"drawer-body"},pg=Rt({__name:"CalendarView",setup(e){const t=L(xt()),n=st(()=>Number(t.value.slice(0,4))),s=st(()=>Number(t.value.slice(5,7))-1),o=st(()=>n.value+" 年 "+(s.value+1)+" 月"),a=["一","二","三","四","五","六","日"],c=st(()=>{const Z=(new Date(n.value,s.value,1).getDay()+6)%7,de=new Date(n.value,s.value+1,0).getDate(),ae=[];for(let X=0;X[ue.date,ue])),O=de[2],x=new Map;for(const ue of c.value){if(!ue.inMonth)continue;const W=Ys(X.get(ue.date),ue.date,ae,ue.date===v),ke=O.filter(Te=>Te.date===ue.date);x.set(ue.date,{status:W.status,label:W.label,location:((V=X.get(ue.date))==null?void 0:V.location)||"",hasLog:ke.length>0,hasMilestone:ke.some(Te=>Te.is_milestone===1)})}f.value=x}ht([n,s],y,{immediate:!0}),ht(Gs,()=>{y()});function m(I){var Z;return((Z=f.value.get(I))==null?void 0:Z.status)??""}function _(I){const Z=f.value.get(I);return Z?I+" · "+Z.label+(Z.location?" · "+Z.location:""):I}function S(I){var Z;return!!((Z=f.value.get(I))!=null&&Z.hasLog)}function $(I){var Z;return!!((Z=f.value.get(I))!=null&&Z.hasMilestone)}function U(){t.value=ei(t.value,-1)}function re(){t.value=ei(t.value,1)}function se(){t.value=xt()}const ie=L(null);function T(I,Z){Z&&(ie.value=I)}return ht(Fa,I=>{I&&(t.value=I,ie.value=I,Fa.value=null)},{immediate:!0}),(I,Z)=>(E(),D("div",rg,[l("div",sg,[l("button",{class:"icon-btn",onClick:U},[Ee(Xe,{name:"chevron-left",size:16})]),l("span",og,ne(o.value),1),l("button",{class:"icon-btn",onClick:re},[Ee(Xe,{name:"chevron-right",size:16})]),l("button",{class:"btn btn-sm",onClick:se},"回到今天")]),l("div",ig,[(E(),D(je,null,ot(a,de=>l("span",{key:de,class:"cal-week muted"},ne(de),1)),64))]),l("div",ag,[(E(!0),D(je,null,ot(c.value,(de,ae)=>(E(),D("button",{key:ae,class:et(["cal-cell",{blank:!de.inMonth,weekend:de.weekend,selected:ie.value===de.date}]),title:de.inMonth?_(de.date):void 0,onClick:X=>T(de.date,de.inMonth)},[de.inMonth?(E(),D(je,{key:0},[l("span",{class:et(["daynum num",{today:de.date===Ut(v)}])},ne(Number(de.date.slice(8,10))),3),l("span",ug,[m(de.date)?(E(),D("span",{key:0,class:et(["dot",m(de.date)])},null,2)):xe("",!0),S(de.date)?(E(),Pt(Xe,{key:1,name:"check-circle",size:12,class:"mark-log"})):xe("",!0),$(de.date)?(E(),Pt(Xe,{key:2,name:"star",size:12,class:"mark-star"})):xe("",!0)])],64)):xe("",!0)],10,lg))),128))]),Ee(os,{name:"drawer"},{default:fr(()=>[ie.value?(E(),D("aside",cg,[l("div",dg,[Z[1]||(Z[1]=l("span",{class:"drawer-title"},"当日详情",-1)),l("button",{class:"icon-btn",onClick:Z[0]||(Z[0]=de=>ie.value=null)},[Ee(Xe,{name:"close",size:16})])]),l("div",fg,[Ee(Td,{date:ie.value},null,8,["date"])])])):xe("",!0)]),_:1})]))}}),vg=Wt(pg,[["__scopeId","data-v-2404dfbe"]]),hg={class:"detail-page"},mg={class:"detail-toolbar"},yg=["value"],gg=["disabled"],bg=Rt({__name:"TodayView",setup(e){const t=L(xt()),n=st(()=>t.value===xt());function s(){t.value=Nn(t.value,-1)}function o(){t.value=Nn(t.value,1)}function a(){t.value=xt()}function c(f){const v=f.target.value;v&&(t.value=v)}return(f,v)=>(E(),D("div",hg,[l("div",mg,[l("button",{class:"icon-btn",title:"前一天",onClick:s},[Ee(Xe,{name:"chevron-left",size:16})]),l("span",{class:et(["date-title num",{"is-today":n.value}])},ne(Ut(ld)(t.value)),3),l("button",{class:"icon-btn",title:"后一天",onClick:o},[Ee(Xe,{name:"chevron-right",size:16})]),l("input",{type:"date",class:"input w-date",value:t.value,onChange:c},null,40,yg),l("button",{class:"btn btn-sm",disabled:n.value,onClick:a},"回到今天",8,gg)]),Ee(Td,{date:t.value},null,8,["date"])]))}}),wg=Wt(bg,[["__scopeId","data-v-76243d98"]]),_g={class:"stats"},kg={class:"cards"},xg={class:"card stat-card"},Cg={class:"stat-num num"},Sg={class:"card stat-card"},Eg={class:"stat-num num"},$g={class:"card stat-card"},Tg={class:"stat-num num"},Pg={class:"card stat-card"},Ag={class:"stat-num num"},Og={class:"card section"},Mg={class:"heat"},Ig=["title"],jg={class:"two-col"},Dg={class:"card section"},Lg={class:"bar-label"},Rg={class:"bar-track"},Kg={class:"muted num bar-num"},Fg={key:0,class:"muted"},Ng={class:"card section"},Vg={class:"bar-label"},Bg={class:"bar-track"},Ug={class:"muted num bar-num"},qg={key:0,class:"muted"},Hg={class:"card section"},Wg={class:"bar-label loc-label"},zg={class:"bar-track"},Gg={class:"muted num bar-num"},Yg={key:0,class:"muted"},Jg=Rt({__name:"StatsView",setup(e){const t=L({attendDays:0,totalHours:"0",itemCount:0,streak:0}),n=L([]),s=L([]),o=L([]),a=L([]);async function c(){const y=xt(),m="2000-01-01",_=await Promise.all([Rr(),Ci(m,y),Si(m,y),Us(!0)]),S=_[0],$=_[1],U=_[2],re=_[3],se=$.filter(W=>W.clock_in_at||W.kind==="makeup");let ie=0;for(const W of se){const ke=Ys(W,W.date,S,W.date===y);ie+=ke.workedMinutes??0}const T=new Set(U.map(W=>W.date));let I=0,Z=y;for(T.has(Z)||(Z=Nn(y,-1));T.has(Z);)I++,Z=Nn(Z,-1);t.value={attendDays:se.length,totalHours:(ie/60).toFixed(1),itemCount:U.length,streak:I};const de=new Map;for(const W of se){const ke=W.location||"未记录";de.set(ke,(de.get(ke)||0)+1)}a.value=Array.from(de.entries()).map(W=>({name:W[0],count:W[1],percent:Math.round(W[1]/(se.length||1)*100)})).sort((W,ke)=>ke.count-W.count);const ae=U.length||1;s.value=zs.map(W=>{const ke=U.filter(Te=>Te.category===W.key).length;return{key:W.key,label:W.label,count:ke,percent:Math.round(ke/ae*100)}}).filter(W=>W.count>0).sort((W,ke)=>ke.count-W.count);const X=new Map(re.map(W=>[W.id,W.name])),O=new Map;for(const W of U){const ke=W.project_id?X.get(W.project_id)||"已删除项目":"无项目";O.set(ke,(O.get(ke)||0)+1)}o.value=Array.from(O.entries()).map(W=>({name:W[0],count:W[1],percent:Math.round(W[1]/ae*100)})).sort((W,ke)=>ke.count-W.count);const x=new Map;for(const W of U)x.set(W.date,(x.get(W.date)||0)+1);const V=Ps(y),ue=[];for(let W=11;W>=0;W--){const ke=Nn(V,-7*W),Te=[];for(let Je=0;Je<7;Je++){const Le=Nn(ke,Je);Te.push({date:Le,count:x.get(Le)||0})}ue.push(Te)}n.value=ue}pn(async()=>{await c()}),ht(Gs,()=>{c()});function f(y){return y===0?0:y===1?1:y<=3?2:y<=5?3:4}function v(y,m){return y+" · "+(m?m+" 条":"无记录")}return(y,m)=>(E(),D("div",_g,[l("div",kg,[l("div",xg,[m[0]||(m[0]=l("div",{class:"muted"},"出勤天数",-1)),l("div",Cg,ne(t.value.attendDays),1)]),l("div",Sg,[m[1]||(m[1]=l("div",{class:"muted"},"累计工时(小时)",-1)),l("div",Eg,ne(t.value.totalHours),1)]),l("div",$g,[m[2]||(m[2]=l("div",{class:"muted"},"记录条数",-1)),l("div",Tg,ne(t.value.itemCount),1)]),l("div",Pg,[m[3]||(m[3]=l("div",{class:"muted"},"连续记录(天)",-1)),l("div",Ag,ne(t.value.streak),1)])]),l("div",Og,[m[4]||(m[4]=l("div",{class:"section-title"},"记录热力图(近 12 周)",-1)),l("div",Mg,[(E(!0),D(je,null,ot(n.value,(_,S)=>(E(),D("div",{key:S,class:"heat-col"},[(E(!0),D(je,null,ot(_,$=>(E(),D("span",{key:$.date,class:et(["heat-cell","lv"+f($.count)]),title:v($.date,$.count)},null,10,Ig))),128))]))),128))]),m[5]||(m[5]=Up('
少多
',1))]),l("div",jg,[l("div",Dg,[m[6]||(m[6]=l("div",{class:"section-title"},"分类分布",-1)),(E(!0),D(je,null,ot(s.value,_=>(E(),D("div",{key:_.key,class:"bar-row"},[l("span",Lg,ne(_.label),1),l("span",Rg,[l("span",{class:"bar-fill",style:or({width:_.percent+"%"})},null,4)]),l("span",Kg,ne(_.count)+" 条 · "+ne(_.percent)+"%",1)]))),128)),s.value.length?xe("",!0):(E(),D("div",Fg,"暂无数据"))]),l("div",Ng,[m[7]||(m[7]=l("div",{class:"section-title"},"项目投入",-1)),(E(!0),D(je,null,ot(o.value,_=>(E(),D("div",{key:_.name,class:"bar-row"},[l("span",Vg,ne(_.name),1),l("span",Bg,[l("span",{class:"bar-fill",style:or({width:_.percent+"%"})},null,4)]),l("span",Ug,ne(_.count)+" 条 · "+ne(_.percent)+"%",1)]))),128)),o.value.length?xe("",!0):(E(),D("div",qg,"暂无数据"))])]),l("div",Hg,[m[8]||(m[8]=l("div",{class:"section-title"},"地点分布(按出勤天)",-1)),(E(!0),D(je,null,ot(a.value,_=>(E(),D("div",{key:_.name,class:"bar-row"},[l("span",Wg,ne(_.name),1),l("span",zg,[l("span",{class:"bar-fill",style:or({width:_.percent+"%"})},null,4)]),l("span",Gg,ne(_.count)+" 天 · "+ne(_.percent)+"%",1)]))),128)),a.value.length?xe("",!0):(E(),D("div",Yg,"暂无数据"))])]))}}),Xg=Wt(Jg,[["__scopeId","data-v-73e5ba49"]]);async function Qg(e,t,n){const s=xt(),o=await Promise.all([Rr(),Ci(e,t),Si(e,t),Us(!0),Am(e,t)]),a=o[0],c=o[1],f=o[2],v=o[3],y=o[4];let m=0,_=0,S=0;for(const O of c){(O.clock_in_at||O.kind==="makeup")&&m++,O.kind==="makeup"&&S++;const x=Ys(O,O.date,a,O.date===s);_+=x.workedMinutes??0}const $=new Map;for(const O of c){if(!(O.clock_in_at||O.kind==="makeup"))continue;const x=O.location||"未记录";$.set(x,($.get(x)||0)+1)}const U=Array.from($.entries()).map(O=>({name:O[0],count:O[1]})).sort((O,x)=>x.count-O.count),re=f.length||1,se=zs.map(O=>{const x=f.filter(V=>V.category===O.key).length;return{key:O.key,label:O.label,count:x,percent:Math.round(x/re*100)}}).filter(O=>O.count>0).sort((O,x)=>x.count-O.count),ie=new Map(v.map(O=>[O.id,O.name])),T=new Map;for(const O of f){const x=O.project_id?ie.get(O.project_id)||"已删除项目":"无项目";T.set(x,(T.get(x)||0)+1)}const I=Array.from(T.entries()).map(O=>({name:O[0],count:O[1]})).sort((O,x)=>x.count-O.count),Z=f.filter(O=>O.is_milestone===1).map(O=>({date:O.date,content:O.content})),de=f.filter(O=>O.needs_followup===1).map(O=>({date:O.date,content:O.content,remark:O.remark||""})),ae=f.filter(O=>!!O.takeaway).map(O=>({date:O.date,text:O.takeaway})),X=y.map(O=>({weekStart:O.week_start,highlights:O.highlights||"",challenges:O.challenges||"",plan_next:O.plan_next||""}));return{range:{start:e,end:t,label:n},attendDays:m,totalHours:(_/60).toFixed(1),makeupCount:S,leaveCount:c.filter(O=>O.kind==="leave").length,itemCount:f.length,categoryStats:se,projectStats:I,locationStats:U,milestones:Z,followups:de,takeaways:ae,weekNotes:X}}function Zg(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(s=>s.name!=="未记录");n.length&&t.push("其中:"+n.map(s=>s.name+" "+s.count+" 天").join(",")),t.push(""),t.push("## 二、工作内容分布"),t.push(""),t.push(e.categoryStats.length?e.categoryStats.map(s=>s.label+" "+s.percent+"%("+s.count+" 条)").join(","):"(无记录)"),t.push(""),t.push("## 三、项目投入"),t.push(""),t.push(e.projectStats.length?e.projectStats.map(s=>s.name+" "+s.count+" 条").join(","):"(无记录)"),t.push(""),t.push("## 四、主要成果"),t.push(""),e.milestones.length?e.milestones.forEach((s,o)=>t.push(o+1+". 【成果】"+s.content+"("+s.date+")")):t.push("(无)"),t.push(""),t.push("## 五、待跟进事项"),t.push(""),e.followups.length?e.followups.forEach(s=>t.push("- 【待跟进】"+s.content+(s.remark?"("+s.date+" 备注:"+s.remark+")":"("+s.date+")"))):t.push("(无)"),t.push(""),t.push("## 六、学习与成长"),t.push(""),e.takeaways.length?e.takeaways.forEach(s=>t.push("- "+s.text+"("+s.date+")")):t.push("(无)");for(const s of e.weekNotes)t.push(""),t.push("### 周记("+s.weekStart+" 起)"),t.push(""),t.push("- 本周亮点:"+(s.highlights||"(无)")),t.push("- 踩的坑:"+(s.challenges||"(无)")),t.push("- 下周计划:"+(s.plan_next||"(无)"));return t.push(""),t.join(` +`)}const eb="modulepreload",tb=function(e,t){return new URL(e,t).href},Fu={},Pd=function(t,n,s){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(y=>{if(y=tb(y,s),y in Fu)return;Fu[y]=!0;const m=y.endsWith(".css"),_=m?'[rel="stylesheet"]':"";if(!!s)for(let U=c.length-1;U>=0;U--){const re=c[U];if(re.href===y&&(!m||re.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${y}"]${_}`))return;const $=document.createElement("link");if($.rel=m?"stylesheet":eb,m||($.as="script"),$.crossOrigin="",$.href=y,v&&$.setAttribute("nonce",v),document.head.appendChild($),m)return new Promise((U,re)=>{$.addEventListener("load",U),$.addEventListener("error",()=>re(new Error(`Unable to preload CSS for ${y}`)))})}))}function a(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"&&a(f.reason);return t().catch(a)})};/*! Capacitor: https://capacitorjs.com/ - MIT License */const nb=e=>{const t=new Map;t.set("web",{name:"web"});const n=e.CapacitorPlatforms||{currentPlatform:{name:"web"},platforms:t},s=(a,c)=>{n.platforms.set(a,c)},o=a=>{n.platforms.has(a)&&(n.currentPlatform=n.platforms.get(a))};return n.addPlatform=s,n.setPlatform=o,n},rb=e=>e.CapacitorPlatforms=nb(e),Ad=rb(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});Ad.addPlatform;Ad.setPlatform;var ns;(function(e){e.Unimplemented="UNIMPLEMENTED",e.Unavailable="UNAVAILABLE"})(ns||(ns={}));class ga extends Error{constructor(t,n,s){super(t),this.message=t,this.code=n,this.data=s}}const sb=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"},ob=e=>{var t,n,s,o,a;const c=e.CapacitorCustomPlatform||null,f=e.Capacitor||{},v=f.Plugins=f.Plugins||{},y=e.CapacitorPlatforms,m=()=>c!==null?c.name:sb(e),_=((t=y==null?void 0:y.currentPlatform)===null||t===void 0?void 0:t.getPlatform)||m,S=()=>_()!=="web",$=((n=y==null?void 0:y.currentPlatform)===null||n===void 0?void 0:n.isNativePlatform)||S,U=X=>{const O=Z.get(X);return!!(O!=null&&O.platforms.has(_())||ie(X))},re=((s=y==null?void 0:y.currentPlatform)===null||s===void 0?void 0:s.isPluginAvailable)||U,se=X=>{var O;return(O=f.PluginHeaders)===null||O===void 0?void 0:O.find(x=>x.name===X)},ie=((o=y==null?void 0:y.currentPlatform)===null||o===void 0?void 0:o.getPluginHeader)||se,T=X=>e.console.error(X),I=(X,O,x)=>Promise.reject(`${x} does not have an implementation of "${O}".`),Z=new Map,de=(X,O={})=>{const x=Z.get(X);if(x)return console.warn(`Capacitor plugin "${X}" already registered. Cannot register plugins twice.`),x.proxy;const V=_(),ue=ie(X);let W;const ke=async()=>(!W&&V in O?W=typeof O[V]=="function"?W=await O[V]():W=O[V]:c!==null&&!W&&"web"in O&&(W=typeof O.web=="function"?W=await O.web():W=O.web),W),Te=(Ge,Qe)=>{var Ce,ee;if(ue){const te=ue==null?void 0:ue.methods.find(we=>Qe===we.name);if(te)return te.rtype==="promise"?we=>f.nativePromise(X,Qe.toString(),we):(we,Fe)=>f.nativeCallback(X,Qe.toString(),we,Fe);if(Ge)return(Ce=Ge[Qe])===null||Ce===void 0?void 0:Ce.bind(Ge)}else{if(Ge)return(ee=Ge[Qe])===null||ee===void 0?void 0:ee.bind(Ge);throw new ga(`"${X}" plugin is not implemented on ${V}`,ns.Unimplemented)}},Je=Ge=>{let Qe;const Ce=(...ee)=>{const te=ke().then(we=>{const Fe=Te(we,Ge);if(Fe){const dt=Fe(...ee);return Qe=dt==null?void 0:dt.remove,dt}else throw new ga(`"${X}.${Ge}()" is not implemented on ${V}`,ns.Unimplemented)});return Ge==="addListener"&&(te.remove=async()=>Qe()),te};return Ce.toString=()=>`${Ge.toString()}() { [capacitor code] }`,Object.defineProperty(Ce,"name",{value:Ge,writable:!1,configurable:!1}),Ce},Le=Je("addListener"),qe=Je("removeListener"),Ke=(Ge,Qe)=>{const Ce=Le({eventName:Ge},Qe),ee=async()=>{const we=await Ce;qe({eventName:Ge,callbackId:we},Qe)},te=new Promise(we=>Ce.then(()=>we({remove:ee})));return te.remove=async()=>{console.warn("Using addListener() without 'await' is deprecated."),await ee()},te},it=new Proxy({},{get(Ge,Qe){switch(Qe){case"$$typeof":return;case"toJSON":return()=>({});case"addListener":return ue?Ke:Le;case"removeListener":return qe;default:return Je(Qe)}}});return v[X]=it,Z.set(X,{name:X,proxy:it,platforms:new Set([...Object.keys(O),...ue?[V]:[]])}),it},ae=((a=y==null?void 0:y.currentPlatform)===null||a===void 0?void 0:a.registerPlugin)||de;return f.convertFileSrc||(f.convertFileSrc=X=>X),f.getPlatform=_,f.handleError=T,f.isNativePlatform=$,f.isPluginAvailable=re,f.pluginMethodNoop=I,f.registerPlugin=ae,f.Exception=ga,f.DEBUG=!!f.DEBUG,f.isLoggingEnabled=!!f.isLoggingEnabled,f.platform=f.getPlatform(),f.isNative=f.isNativePlatform(),f},ib=e=>e.Capacitor=ob(e),rs=ib(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),Od=rs.registerPlugin;rs.Plugins;class Md{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 s=!1;this.listeners[t]||(this.listeners[t]=[],s=!0),this.listeners[t].push(n);const a=this.windowListeners[t];a&&!a.registered&&this.addWindowListener(a),s&&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,s){const o=this.listeners[t];if(!o){if(s){let a=this.retainedEventArguments[t];a||(a=[]),a.push(n),this.retainedEventArguments[t]=a}return}o.forEach(a=>a(n))}hasListeners(t){return!!this.listeners[t].length}registerWindowListener(t,n){this.windowListeners[n]={registered:!1,windowEventName:t,pluginEventName:n,handler:s=>{this.notifyListeners(n,s)}}}unimplemented(t="not implemented"){return new rs.Exception(t,ns.Unimplemented)}unavailable(t="not available"){return new rs.Exception(t,ns.Unavailable)}async removeListener(t,n){const s=this.listeners[t];if(!s)return;const o=s.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(s=>{this.notifyListeners(t,s)}))}}const Nu=e=>encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),Vu=e=>e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent);class ab extends Md{async getCookies(){const t=document.cookie,n={};return t.split(";").forEach(s=>{if(s.length<=0)return;let[o,a]=s.replace(/=/,"CAP_COOKIE").split("CAP_COOKIE");o=Vu(o).trim(),a=Vu(a).trim(),n[o]=a}),n}async setCookie(t){try{const n=Nu(t.key),s=Nu(t.value),o=`; expires=${(t.expires||"").replace("expires=","")}`,a=(t.path||"/").replace("path=",""),c=t.url!=null&&t.url.length>0?`domain=${t.url}`:"";document.cookie=`${n}=${s||""}${o}; path=${a}; ${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)}}}Od("CapacitorCookies",{web:()=>new ab});const lb=async e=>new Promise((t,n)=>{const s=new FileReader;s.onload=()=>{const o=s.result;t(o.indexOf(",")>=0?o.split(",")[1]:o)},s.onerror=o=>n(o),s.readAsDataURL(e)}),ub=(e={})=>{const t=Object.keys(e);return Object.keys(e).map(o=>o.toLocaleLowerCase()).reduce((o,a,c)=>(o[a]=e[t[c]],o),{})},cb=(e,t=!0)=>e?Object.entries(e).reduce((s,o)=>{const[a,c]=o;let f,v;return Array.isArray(c)?(v="",c.forEach(y=>{f=t?encodeURIComponent(y):y,v+=`${a}=${f}&`}),v.slice(0,-1)):(f=t?encodeURIComponent(c):c,v=`${a}=${f}`),`${s}&${v}`},"").substr(1):null,db=(e,t={})=>{const n=Object.assign({method:e.method||"GET",headers:e.headers},t),o=ub(e.headers)["content-type"]||"";if(typeof e.data=="string")n.body=e.data;else if(o.includes("application/x-www-form-urlencoded")){const a=new URLSearchParams;for(const[c,f]of Object.entries(e.data||{}))a.set(c,f);n.body=a.toString()}else if(o.includes("multipart/form-data")||e.data instanceof FormData){const a=new FormData;if(e.data instanceof FormData)e.data.forEach((f,v)=>{a.append(v,f)});else for(const f of Object.keys(e.data))a.append(f,e.data[f]);n.body=a;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 fb extends Md{async request(t){const n=db(t,t.webFetchExtra),s=cb(t.params,t.shouldEncodeUrlParams),o=s?`${t.url}?${s}`:t.url,a=await fetch(o,n),c=a.headers.get("content-type")||"";let{responseType:f="text"}=a.ok?t:{};c.includes("application/json")&&(f="json");let v,y;switch(f){case"arraybuffer":case"blob":y=await a.blob(),v=await lb(y);break;case"json":v=await a.json();break;case"document":case"text":default:v=await a.text()}const m={};return a.headers.forEach((_,S)=>{m[S]=_}),{data:v,headers:m,status:a.status,url:a.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"}))}}Od("CapacitorHttp",{web:()=>new fb});async function ml(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(rs.isNativePlatform()){const{Filesystem:c,Directory:f,Encoding:v}=await Pd(async()=>{const{Filesystem:y,Directory:m,Encoding:_}=await import("./index-mjHPY1ZN.js");return{Filesystem:y,Directory:m,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 s=new Blob([t],{type:"text/plain;charset=utf-8"}),o=URL.createObjectURL(s),a=document.createElement("a");return a.href=o,a.download=e,a.click(),window.setTimeout(()=>URL.revokeObjectURL(o),1e4),""}const pb=Object.freeze(Object.defineProperty({__proto__:null,downloadText:ml},Symbol.toStringTag,{value:"Module"}));async function Ha(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 vb(e){const t=await Promise.all([gt("ai_base_url",""),gt("ai_api_key",""),gt("ai_model","")]),n=t[0].trim().replace(/\/+$/,""),s=t[1].trim(),o=t[2].trim();if(!n||!o)throw new Error("请先在设置页配置 AI 接口地址与模型名称");const a=n+"/chat/completions",c={"Content-Type":"application/json"};s&&(c.Authorization="Bearer "+s);const v=JSON.stringify({model:o,messages:[{role:"system",content:"你是一名严谨的中文助理。请将用户提供的工作总结 Markdown 草稿润色为通顺、专业、简洁的工作总结。要求:保留原有章节结构与全部事实数据(数字、日期、条目),不得虚构或遗漏内容,只输出 Markdown 正文。"},{role:"user",content:e}],temperature:.3});let y;try{y=await fetch(a,{method:"POST",headers:c,body:v})}catch{throw new Error("无法访问 AI 接口:请检查地址是否正确、服务端是否允许浏览器跨域访问")}if(!y.ok){let S="接口返回 "+y.status;try{const $=await y.json();$&&$.error&&$.error.message&&(S+=":"+$.error.message)}catch{}throw new Error(S)}const m=await y.json(),_=m&&m.choices&&m.choices[0]&&m.choices[0].message&&m.choices[0].message.content;if(!_)throw new Error("接口未返回内容");return String(_)}const hb={class:"report"},mb={class:"report-toolbar"},yb={class:"seg"},gb=["onClick"],bb=["disabled"],wb=["disabled"],_b={key:0,class:"ai-error"},kb={class:"report-grid"},xb={class:"report-left"},Cb={class:"card section"},Sb={class:"section-title"},Eb={class:"muted note-saved"},$b={class:"card section"},Tb={class:"report-right"},Pb={key:0,class:"card section"},Ab={class:"sum-row"},Ob={class:"num"},Mb={class:"sum-row"},Ib={class:"num"},jb={class:"sum-row"},Db={class:"num"},Lb={class:"sum-row"},Rb={class:"num"},Kb={class:"sum-row"},Fb={class:"num"},Nb={class:"muted"},Vb={class:"num"},Bb={key:0,class:"muted sum-empty"},Ub={class:"muted"},qb={key:1,class:"muted sum-empty"},Hb={class:"muted"},Wb={key:2,class:"muted sum-empty"},zb={class:"muted"},Gb={key:3,class:"muted sum-empty"},Yb=Rt({__name:"ReportView",setup(e){const t=[{key:"week",label:"本周"},{key:"month",label:"本月"},{key:"all",label:"全部"},{key:"custom",label:"自定义"}],n=L("week"),s=L(Ps(xt())),o=L(xt()),a=L(null),c=L(""),f=L(!1),v=L(!1),y=L(null),m=L(""),_=L(Ps(xt())),S=L(""),$=L(""),U=L(""),re=L(!1);async function se(){const O=await hl(_.value);S.value=(O==null?void 0:O.highlights)||"",$.value=(O==null?void 0:O.challenges)||"",U.value=(O==null?void 0:O.plan_next)||"",re.value=!1}async function ie(){await Pm(_.value,{highlights:S.value.trim()||null,challenges:$.value.trim()||null,plan_next:U.value.trim()||null}),re.value=!0,await I()}function T(O){const x=xt();if(O==="week"){const V=Ps(x);return{start:V,end:Nn(V,6),label:"本周"}}if(O==="month"){const V=x.slice(0,7);return{start:V+"-01",end:x,label:V+" 本月"}}return O==="all"?{start:"2000-01-01",end:x,label:"全部实习期"}:{start:s.value,end:o.value,label:s.value+" ~ "+o.value}}async function I(){f.value=!0;const O=T(n.value),x=await Qg(O.start,O.end,O.label);a.value=x,c.value=Zg(x),f.value=!1}ht(n,I),ht([s,o],()=>{n.value==="custom"&&I()}),pn(async()=>{await se(),await I()});async function Z(){const O=xt().replace(/-/g,""),x=await ml("实习工作总结_"+O+".md",c.value);Ne(x?"总结已导出到:"+x:"总结已导出到系统下载目录")}async function de(){await Ha(c.value),Ne("总结已复制到剪贴板")}async function ae(){if(v.value)return;m.value="";const O=c.value.trim();if(!O){m.value="当前草稿为空,无法润色";return}v.value=!0;try{y.value=c.value,c.value=await vb(O),Ne("AI 润色完成")}catch(x){y.value=null,m.value=x instanceof Error?x.message:"润色失败"}v.value=!1}function X(){y.value!==null&&(c.value=y.value),y.value=null}return(O,x)=>(E(),D("div",hb,[l("div",mb,[l("div",yb,[(E(),D(je,null,ot(t,V=>l("button",{key:V.key,class:et(["seg-btn",{active:n.value===V.key}]),onClick:ue=>n.value=V.key},ne(V.label),11,gb)),64))]),n.value==="custom"?(E(),D(je,{key:0},[$e(l("input",{type:"date",class:"input w-date","onUpdate:modelValue":x[0]||(x[0]=V=>s.value=V)},null,512),[[Me,s.value]]),x[6]||(x[6]=l("span",{class:"muted"},"至",-1)),$e(l("input",{type:"date",class:"input w-date","onUpdate:modelValue":x[1]||(x[1]=V=>o.value=V)},null,512),[[Me,o.value]])],64)):xe("",!0),x[10]||(x[10]=l("span",{class:"flex1"},null,-1)),l("button",{class:"btn btn-sm",disabled:v.value,onClick:ae},[Ee(Xe,{name:"edit",size:14}),x[7]||(x[7]=en("AI 润色 ",-1))],8,bb),y.value!==null?(E(),D("button",{key:1,class:"btn btn-sm",onClick:X},"还原润色前")):xe("",!0),l("button",{class:"btn btn-sm",disabled:f.value,onClick:I},[Ee(Xe,{name:"edit",size:14}),x[8]||(x[8]=en("重新生成 ",-1))],8,wb),l("button",{class:"btn btn-sm",onClick:de},"复制"),l("button",{class:"btn btn-primary btn-sm",onClick:Z},[Ee(Xe,{name:"export",size:14}),x[9]||(x[9]=en("导出 Markdown ",-1))])]),m.value?(E(),D("div",_b,ne(m.value),1)):xe("",!0),l("div",kb,[l("div",xb,[l("div",Cb,[l("div",Sb,"本周周记("+ne(_.value)+" 起)",1),x[11]||(x[11]=l("label",{class:"note-label muted"},"本周亮点",-1)),$e(l("textarea",{class:"textarea","onUpdate:modelValue":x[2]||(x[2]=V=>S.value=V),placeholder:"本周最有价值的一件事",onBlur:ie},null,544),[[Me,S.value]]),x[12]||(x[12]=l("label",{class:"note-label muted"},"踩的坑",-1)),$e(l("textarea",{class:"textarea","onUpdate:modelValue":x[3]||(x[3]=V=>$.value=V),placeholder:"遇到的问题与教训",onBlur:ie},null,544),[[Me,$.value]]),x[13]||(x[13]=l("label",{class:"note-label muted"},"下周计划",-1)),$e(l("textarea",{class:"textarea","onUpdate:modelValue":x[4]||(x[4]=V=>U.value=V),placeholder:"下周准备做什么",onBlur:ie},null,544),[[Me,U.value]]),l("div",Eb,ne(re.value?"已保存":"失焦自动保存"),1)]),l("div",$b,[x[14]||(x[14]=l("div",{class:"section-title"},"总结草稿(可编辑)",-1)),$e(l("textarea",{class:"textarea md-editor","onUpdate:modelValue":x[5]||(x[5]=V=>c.value=V),spellcheck:"false"},null,512),[[Me,c.value]])])]),l("div",Tb,[a.value?(E(),D("div",Pb,[x[20]||(x[20]=l("div",{class:"section-title"},"数据摘要",-1)),l("div",Ab,[x[15]||(x[15]=l("span",{class:"muted"},"出勤",-1)),l("span",Ob,ne(a.value.attendDays)+" 天",1)]),l("div",Mb,[x[16]||(x[16]=l("span",{class:"muted"},"工时",-1)),l("span",Ib,ne(a.value.totalHours)+" 小时",1)]),l("div",jb,[x[17]||(x[17]=l("span",{class:"muted"},"补卡",-1)),l("span",Db,ne(a.value.makeupCount)+" 次",1)]),l("div",Lb,[x[18]||(x[18]=l("span",{class:"muted"},"请假",-1)),l("span",Rb,ne(a.value.leaveCount)+" 天",1)]),l("div",Kb,[x[19]||(x[19]=l("span",{class:"muted"},"记录",-1)),l("span",Fb,ne(a.value.itemCount)+" 条",1)]),x[21]||(x[21]=l("div",{class:"section-sub"},"分类分布",-1)),(E(!0),D(je,null,ot(a.value.categoryStats,V=>(E(),D("div",{key:V.key,class:"sum-row"},[l("span",Nb,ne(V.label),1),l("span",Vb,ne(V.count)+" 条 · "+ne(V.percent)+"%",1)]))),128)),a.value.categoryStats.length?xe("",!0):(E(),D("div",Bb,"(无)")),x[22]||(x[22]=l("div",{class:"section-sub"},"主要成果",-1)),(E(!0),D(je,null,ot(a.value.milestones,(V,ue)=>(E(),D("div",{key:"m"+ue,class:"sum-item"},[en(ne(V.content),1),l("span",Ub,"("+ne(V.date)+")",1)]))),128)),a.value.milestones.length?xe("",!0):(E(),D("div",qb,"(无)")),x[23]||(x[23]=l("div",{class:"section-sub"},"待跟进",-1)),(E(!0),D(je,null,ot(a.value.followups,(V,ue)=>(E(),D("div",{key:"f"+ue,class:"sum-item"},[en(ne(V.content),1),l("span",Hb,"("+ne(V.date)+")",1)]))),128)),a.value.followups.length?xe("",!0):(E(),D("div",Wb,"(无)")),x[24]||(x[24]=l("div",{class:"section-sub"},"学习与成长",-1)),(E(!0),D(je,null,ot(a.value.takeaways,(V,ue)=>(E(),D("div",{key:"t"+ue,class:"sum-item"},[en(ne(V.text),1),l("span",zb,"("+ne(V.date)+")",1)]))),128)),a.value.takeaways.length?xe("",!0):(E(),D("div",Gb,"(无)"))])):xe("",!0)])])]))}}),Jb=Wt(Yb,[["__scopeId","data-v-43f9c59b"]]),Xb=["aria-label"],Qb={class:"dialog-head"},Zb={class:"dialog-title"},ew={class:"dialog-body"},tw={class:"form-grid"},nw={class:"field span2"},rw={class:"seg"},sw={class:"field"},ow={class:"field"},iw={class:"field"},aw=["value"],lw={key:0,class:"field"},uw={class:"seg"},cw={class:"field span2"},dw={key:0,class:"form-error"},fw={class:"dialog-btns"},pw=Rt({__name:"TransactionDialog",props:{open:{type:Boolean},title:{},initial:{}},emits:["cancel","save"],setup(e,{emit:t}){const n=e,s=t,o=L("expense"),a=L("餐饮"),c=L(""),f=L(""),v=L(""),y=L(!1),m=L(!1),_=L(""),S=L(null);function $(ie){n.open&&ie.key==="Escape"&&s("cancel")}ht(()=>n.open,async ie=>{var T;ie?(o.value=n.initial.type==="income"?"income":"expense",a.value=n.initial.category,c.value=n.initial.amountYuan,f.value=n.initial.date,v.value=n.initial.note,y.value=n.initial.reimbursable===1,m.value=n.initial.reimbursed===1,_.value="",window.addEventListener("keydown",$),await ss(),(T=S.value)==null||T.focus()):window.removeEventListener("keydown",$)}),pr(()=>window.removeEventListener("keydown",$)),ht(o,ie=>{a.value=ie==="expense"?Gr[0]:Qo[0]});const U=st(()=>o.value==="expense"?Gr:Qo);function re(){return a.value&&U.value.includes(a.value)?a.value:U.value[0]}function se(){const ie=String(c.value??"").trim(),T=Number(ie);if(!ie||!isFinite(T)||T<=0){_.value="请填写大于 0 的金额";return}if(!f.value){_.value="请选择日期";return}const I=o.value==="expense"&&y.value?1:0;s("save",{type:o.value,category:re(),amount:Math.round(T*100),date:f.value,note:String(v.value??"").trim(),reimbursable:I,reimbursed:I&&m.value?1:0})}return(ie,T)=>(E(),Pt(Dr,{to:"body"},[Ee(os,{name:"modal"},{default:fr(()=>[e.open?(E(),D("div",{key:0,class:"mask",onClick:T[11]||(T[11]=sn(I=>s("cancel"),["self"]))},[l("div",{class:"dialog",role:"dialog","aria-label":e.title},[l("div",Qb,[l("span",Zb,ne(e.title),1),l("button",{class:"icon-btn",title:"关闭",onClick:T[0]||(T[0]=I=>s("cancel"))},[Ee(Xe,{name:"close",size:16})])]),l("div",ew,[l("div",tw,[l("div",nw,[T[12]||(T[12]=l("label",null,"类型",-1)),l("div",rw,[l("button",{class:et(["seg-btn",{active:o.value==="expense"}]),onClick:T[1]||(T[1]=I=>o.value="expense")},"支出",2),l("button",{class:et(["seg-btn",{active:o.value==="income"}]),onClick:T[2]||(T[2]=I=>o.value="income")},"收入",2)])]),l("div",sw,[T[13]||(T[13]=l("label",null,"金额(元,必填)",-1)),$e(l("input",{ref_key:"amountInput",ref:S,class:et(["input",{invalid:_.value}]),"onUpdate:modelValue":T[3]||(T[3]=I=>c.value=I),type:"number",min:"0",step:"0.01",placeholder:"0.00"},null,2),[[Me,c.value]])]),l("div",ow,[T[14]||(T[14]=l("label",null,"日期(必填)",-1)),$e(l("input",{class:"input",type:"date","onUpdate:modelValue":T[4]||(T[4]=I=>f.value=I)},null,512),[[Me,f.value]])]),l("div",iw,[T[15]||(T[15]=l("label",null,"分类",-1)),$e(l("select",{class:"select","onUpdate:modelValue":T[5]||(T[5]=I=>a.value=I)},[(E(!0),D(je,null,ot(U.value,I=>(E(),D("option",{key:I,value:I},ne(I),9,aw))),128))],512),[[Vn,a.value]])]),o.value==="expense"?(E(),D("div",lw,[T[16]||(T[16]=l("label",null,"报销状态",-1)),l("div",uw,[l("button",{class:et(["seg-btn",{active:!y.value}]),onClick:T[6]||(T[6]=I=>{y.value=!1,m.value=!1})},"无需报销",2),l("button",{class:et(["seg-btn",{active:y.value&&!m.value}]),onClick:T[7]||(T[7]=I=>{y.value=!0,m.value=!1})},"待报销",2),l("button",{class:et(["seg-btn",{active:y.value&&m.value}]),onClick:T[8]||(T[8]=I=>{y.value=!0,m.value=!0})},"已报销",2)])])):xe("",!0),l("div",cw,[T[17]||(T[17]=l("label",null,"备注",-1)),$e(l("textarea",{class:"textarea","onUpdate:modelValue":T[9]||(T[9]=I=>v.value=I),placeholder:"选填"},null,512),[[Me,v.value]])])]),_.value?(E(),D("div",dw,ne(_.value),1)):xe("",!0)]),l("div",fw,[l("button",{class:"btn btn-sm",onClick:T[10]||(T[10]=I=>s("cancel"))},"取消"),l("button",{class:"btn btn-primary btn-sm",onClick:se},"保存")])],8,Xb)])):xe("",!0)]),_:1})]))}}),vw=Wt(pw,[["__scopeId","data-v-edca3327"]]),hw={class:"ledger-page"},mw={class:"ledger-toolbar"},yw={class:"month-title num"},gw={class:"cards"},bw={class:"card stat-card"},ww={class:"stat-num num amt-income"},_w={class:"card stat-card"},kw={class:"stat-num num"},xw={class:"card stat-card"},Cw={class:"card stat-card"},Sw={class:"stat-num num amt-warn"},Ew={class:"card sec"},$w={class:"form-grid"},Tw={class:"field span2"},Pw={class:"seg"},Aw={class:"field"},Ow={class:"field"},Mw={class:"field"},Iw=["value"],jw={key:0,class:"field"},Dw={class:"field span2"},Lw={key:0,class:"form-error"},Rw={class:"form-footer"},Kw=["disabled"],Fw=["disabled"],Nw={key:0,class:"card sec"},Vw={class:"bar-label"},Bw={class:"bar-track"},Uw={class:"muted num bar-num"},qw={key:1,class:"card section"},Hw={class:"form-error"},Ww={class:"card table-card"},zw={class:"tx-table"},Gw={class:"num","data-label":"日期"},Yw={"data-label":"分类"},Jw={class:"tag"},Xw={class:"td-note","data-label":"备注"},Qw={"data-label":"报销"},Zw={key:0,class:"muted"},e_={key:1,class:"tx-done"},t_={key:2,class:"tx-pending"},n_={class:"ops-cell"},r_={class:"ops"},s_=["onClick"],o_=["onClick"],i_=["onClick"],a_={key:0},l_={class:"muted vault-note num"},u_=Rt({__name:"LedgerView",setup(e){const t=L(xt()),n=L([]),s=L(!0),o=L("expense"),a=L(""),c=L(Gr[0]),f=L(xt()),v=L(""),y=L(!1),m=L(""),_=L(""),S=L(!1),$=L(!1),U=L(null),re=L({type:"expense",category:Gr[0],amountYuan:"",date:xt(),note:"",reimbursable:0,reimbursed:0}),se=L(null),ie=st(()=>t.value.slice(0,7)+"-01"),T=st(()=>{const ee=Number(t.value.slice(0,4)),te=Number(t.value.slice(5,7))-1,we=new Date(ee,te+1,0).getDate();return t.value.slice(0,7)+"-"+(we<10?"0"+we:String(we))}),I=st(()=>Number(t.value.slice(0,4))+" 年 "+Number(t.value.slice(5,7))+" 月");async function Z(){s.value=!0;try{n.value=await Rm(ie.value,T.value),_.value=""}catch(ee){_.value="账目加载失败:"+(ee instanceof Error?ee.stack||ee.message:String(ee)),Ne("账目加载失败")}s.value=!1}pn(Z),ht(t,Z),ht(o,ee=>{c.value=ee==="expense"?Gr[0]:Qo[0]});const de=st(()=>n.value.slice().sort((ee,te)=>ee.date===te.date?te.id-ee.id:ee.date{let ee=0,te=0,we=0;for(const Fe of n.value)Fe.type==="income"?ee+=Fe.amount:(te+=Fe.amount,Fe.reimbursable===1&&Fe.reimbursed!==1&&(we+=Fe.amount));return{income:ee,expense:te,pending:we,balance:ee-te}}),X=L("all"),O=L("all"),x=st(()=>de.value.filter(ee=>!(X.value!=="all"&&ee.type!==X.value||O.value==="pending"&&!(ee.type==="expense"&&ee.reimbursable===1&&ee.reimbursed!==1)||O.value==="done"&&!(ee.reimbursable===1&&ee.reimbursed===1)))),V=st(()=>{const ee=new Map;let te=0;for(const Fe of n.value)Fe.type==="expense"&&(ee.set(Fe.category,(ee.get(Fe.category)||0)+Fe.amount),te+=Fe.amount);const we=te||1;return Array.from(ee.entries()).map(Fe=>({name:Fe[0],amount:Fe[1],percent:Math.round(Fe[1]/we*100)})).sort((Fe,dt)=>dt.amount-Fe.amount)});function ue(ee){return(ee/100).toFixed(2)}function W(ee){return(ee.type==="income"?"+":"-")+ue(ee.amount)}function ke(){t.value=ei(t.value,-1)}function Te(){t.value=ei(t.value,1)}function Je(){t.value=xt()}ht(a,()=>{m.value&&(m.value="")});async function Le(){const ee=String(a.value??"").trim(),te=Number(ee);if(!ee||!isFinite(te)||te<=0){m.value="请填写大于 0 的金额";return}if(!f.value){m.value="请选择日期";return}if(!S.value){S.value=!0;try{await Km({type:o.value,category:c.value,amount:Math.round(te*100),date:f.value,note:String(v.value??"").trim(),reimbursable:o.value==="expense"&&y.value?1:0,reimbursed:0})}catch(we){Ne("添加失败:"+(we instanceof Error?we.message:String(we))),S.value=!1;return}a.value="",v.value="",y.value=!1,m.value="",await Z(),Ne("记账已添加"),S.value=!1}}const qe=st(()=>String(a.value??"").trim()!==""||String(v.value??"").trim()!=="");function Ke(){a.value="",v.value="",y.value=!1,m.value=""}async function it(ee){await Vm(ee.id),await Z(),Ne("已标记为已报销")}function Ge(ee){U.value=ee.id,re.value={type:ee.type,category:ee.category,amountYuan:ue(ee.amount),date:ee.date,note:ee.note||"",reimbursable:ee.reimbursable,reimbursed:ee.reimbursed},$.value=!0}async function Qe(ee){const te=U.value;await Fm(te,ee),$.value=!1,await Z(),Ne("账目已更新")}async function Ce(){se.value&&se.value.id&&await Nm(se.value.id),se.value=null,await Z(),Ne("账目已删除")}return(ee,te)=>(E(),D("div",hw,[l("div",mw,[l("button",{class:"icon-btn",onClick:ke},[Ee(Xe,{name:"chevron-left",size:16})]),l("span",yw,ne(I.value),1),l("button",{class:"icon-btn",onClick:Te},[Ee(Xe,{name:"chevron-right",size:16})]),l("button",{class:"btn btn-sm",onClick:Je},"回到本月"),te[13]||(te[13]=l("span",{class:"flex1"},null,-1)),$e(l("select",{class:"select w-filter","onUpdate:modelValue":te[0]||(te[0]=we=>X.value=we)},[...te[11]||(te[11]=[l("option",{value:"all"},"全部类型",-1),l("option",{value:"expense"},"仅支出",-1),l("option",{value:"income"},"仅收入",-1)])],512),[[Vn,X.value]]),$e(l("select",{class:"select w-filter","onUpdate:modelValue":te[1]||(te[1]=we=>O.value=we)},[...te[12]||(te[12]=[l("option",{value:"all"},"全部报销",-1),l("option",{value:"pending"},"待报销",-1),l("option",{value:"done"},"已报销",-1)])],512),[[Vn,O.value]])]),l("div",gw,[l("div",bw,[te[14]||(te[14]=l("div",{class:"muted"},"本月收入(元)",-1)),l("div",ww,ne(ue(ae.value.income)),1)]),l("div",_w,[te[15]||(te[15]=l("div",{class:"muted"},"本月支出(元)",-1)),l("div",kw,ne(ue(ae.value.expense)),1)]),l("div",xw,[te[16]||(te[16]=l("div",{class:"muted"},"本月结余(元)",-1)),l("div",{class:et(["stat-num num",{"amt-income":ae.value.balance>=0,"amt-expense":ae.value.balance<0}])},ne(ue(ae.value.balance)),3)]),l("div",Cw,[te[17]||(te[17]=l("div",{class:"muted"},"待报销(元)",-1)),l("div",Sw,ne(ue(ae.value.pending)),1)])]),l("div",Ew,[te[24]||(te[24]=l("div",{class:"sec-head"},[l("span",{class:"sec-title"},"新增一笔"),l("span",{class:"muted form-hint"},"金额必填,回车快速添加")],-1)),l("div",$w,[l("div",Tw,[te[18]||(te[18]=l("label",null,"类型",-1)),l("div",Pw,[l("button",{class:et(["seg-btn",{active:o.value==="expense"}]),onClick:te[2]||(te[2]=we=>o.value="expense")},"支出",2),l("button",{class:et(["seg-btn",{active:o.value==="income"}]),onClick:te[3]||(te[3]=we=>o.value="income")},"收入",2)])]),l("div",Aw,[te[19]||(te[19]=l("label",null,"金额(元,必填)",-1)),$e(l("input",{class:et(["input",{invalid:m.value}]),"onUpdate:modelValue":te[4]||(te[4]=we=>a.value=we),type:"number",min:"0",step:"0.01",placeholder:"0.00",onKeydown:At(Le,["enter"])},null,34),[[Me,a.value]])]),l("div",Ow,[te[20]||(te[20]=l("label",null,"日期",-1)),$e(l("input",{class:"input",type:"date","onUpdate:modelValue":te[5]||(te[5]=we=>f.value=we)},null,512),[[Me,f.value]])]),l("div",Mw,[te[21]||(te[21]=l("label",null,"分类",-1)),$e(l("select",{class:"select","onUpdate:modelValue":te[6]||(te[6]=we=>c.value=we)},[(E(!0),D(je,null,ot(o.value==="expense"?Ut(Gr):Ut(Qo),we=>(E(),D("option",{key:we,value:we},ne(we),9,Iw))),128))],512),[[Vn,c.value]])]),o.value==="expense"?(E(),D("div",jw,[te[22]||(te[22]=l("label",null,"报销",-1)),l("button",{class:et(["toggle-btn",{on:y.value}]),onClick:te[7]||(te[7]=we=>y.value=!y.value)},ne(y.value?"需要报销":"无需报销"),3)])):xe("",!0),l("div",Dw,[te[23]||(te[23]=l("label",null,"备注",-1)),$e(l("input",{class:"input","onUpdate:modelValue":te[8]||(te[8]=we=>v.value=we),placeholder:"选填,如:客户现场午餐",onKeydown:At(Le,["enter"])},null,544),[[Me,v.value]])])]),m.value?(E(),D("div",Lw,ne(m.value),1)):xe("",!0),l("div",Rw,[l("button",{class:"btn btn-sm",disabled:!qe.value,onClick:Ke},"重置",8,Kw),l("button",{class:"btn btn-primary btn-sm",disabled:S.value,onClick:Le},"添加记录",8,Fw)])]),V.value.length?(E(),D("div",Nw,[te[25]||(te[25]=l("div",{class:"sec-title"},"本月支出分类",-1)),(E(!0),D(je,null,ot(V.value,we=>(E(),D("div",{key:we.name,class:"bar-row"},[l("span",Vw,ne(we.name),1),l("span",Bw,[l("span",{class:"bar-fill",style:or({width:we.percent+"%"})},null,4)]),l("span",Uw,ne(ue(we.amount))+" 元 · "+ne(we.percent)+"%",1)]))),128))])):xe("",!0),_.value?(E(),D("div",qw,[l("div",Hw,ne(_.value),1),te[26]||(te[26]=l("div",{class:"muted loc-note"},"请将上方完整错误文字发送给开发者",-1))])):xe("",!0),l("div",Ww,[l("table",zw,[te[28]||(te[28]=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,[(E(!0),D(je,null,ot(x.value,we=>(E(),D("tr",{key:we.id},[l("td",Gw,ne(we.date),1),l("td",Yw,[l("span",Jw,ne(we.category),1)]),l("td",{class:et(["num",we.type==="income"?"amt-income":"amt-expense"]),"data-label":"金额"},ne(W(we)),3),l("td",Xw,ne(we.note||"--"),1),l("td",Qw,[we.type!=="expense"||we.reimbursable!==1?(E(),D("span",Zw,"--")):we.reimbursed===1?(E(),D("span",e_,"已报销")):(E(),D("span",t_,"待报销"))]),l("td",n_,[l("div",r_,[we.type==="expense"&&we.reimbursable===1&&we.reimbursed!==1?(E(),D("button",{key:0,class:"btn btn-xs",onClick:Fe=>it(we)},"标记已报销",8,s_)):xe("",!0),l("button",{class:"btn btn-xs",onClick:Fe=>Ge(we)},"编辑",8,o_),l("button",{class:"btn btn-xs",onClick:Fe=>se.value=we},"删除",8,i_)])])]))),128)),!x.value.length&&!s.value?(E(),D("tr",a_,[...te[27]||(te[27]=[l("td",{colspan:"6",class:"empty muted"},"本月暂无账目",-1)])])):xe("",!0)])])]),l("div",l_,"筛选结果 "+ne(x.value.length)+" 条 / 本月共 "+ne(n.value.length)+" 条",1),Ee(vw,{open:$.value,title:(U.value,"编辑账目"),initial:re.value,onCancel:te[9]||(te[9]=we=>$.value=!1),onSave:Qe},null,8,["open","title","initial"]),Ee(qn,{open:!!se.value,title:"删除确认",message:se.value?"将删除 "+se.value.date+" 的账目("+se.value.category+" "+ue(se.value.amount)+" 元)。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:te[10]||(te[10]=we=>se.value=null),onConfirm:Ce},null,8,["open","message"])]))}}),c_=Wt(u_,[["__scopeId","data-v-0533e5f8"]]),d_={class:"memo-page"},f_={class:"card memo-list"},p_={class:"pane-head"},v_={class:"pane-title"},h_={class:"memo-scroll"},m_=["onClick"],y_={class:"memo-item-title"},g_={class:"muted memo-item-sub"},b_={class:"muted num memo-item-time"},w_={key:0,class:"muted empty"},__={class:"card memo-editor"},k_={class:"editor-foot"},x_={class:"muted foot-info"},C_=["disabled"],S_=["disabled"],E_={key:1,class:"empty muted editor-empty"},$_=Rt({__name:"MemoView",setup(e){const t=L([]),n=L(null),s=L(!1),o=L(""),a=L(""),c=L(null),f=L(null);async function v(){if(t.value=await Om(),n.value&&n.value.id){const ae=t.value.find(X=>X.id===n.value.id);ae&&(n.value=ae)}}pn(async()=>{await v(),t.value.length&&_(t.value[0]),window.addEventListener("keydown",y)}),pr(()=>window.removeEventListener("keydown",y)),ht(Na,async ae=>{if(!ae)return;t.value.length||await v();const X=t.value.find(O=>O.id===ae);Na.value=null,X&&S(X)},{immediate:!0});function y(ae){(ae.ctrlKey||ae.metaKey)&&ae.key.toLowerCase()==="s"&&s.value&&m.value&&(ae.preventDefault(),se())}const m=st(()=>{if(!s.value)return!1;const ae=n.value?n.value.title:"",X=n.value?n.value.content:"";return o.value!==ae||a.value!==X});function _(ae){n.value=ae,s.value=!0,o.value=ae.title,a.value=ae.content}function S(ae){if(!(s.value&&n.value&&n.value.id===ae.id)){if(m.value){f.value={type:"select",memo:ae};return}_(ae)}}function $(){if(m.value){f.value={type:"new"};return}U()}function U(){n.value=null,s.value=!0,o.value="",a.value=""}function re(){n.value?_(n.value):U()}async function se(){if(!o.value.trim()&&!a.value.trim()){Ne("标题与内容不能都为空");return}if(n.value&&n.value.id)await Im(n.value.id,o.value,a.value),Ne("备忘已保存");else{const ae=await Mm(o.value,a.value);n.value=ae,o.value=ae.title,a.value=ae.content,Ne("备忘已创建")}await v()}function ie(){n.value&&n.value.id&&(c.value=n.value)}async function T(){c.value&&c.value.id&&(await jm(c.value.id),Ne("备忘已删除")),c.value=null,await v(),U()}function I(){const ae=f.value;f.value=null,ae&&(ae.type==="select"?_(ae.memo):U())}function Z(ae){return(ae.content||"").replace(/\s+/g," ").slice(0,30)}function de(ae){return ae.replace("T"," ").slice(0,16)}return(ae,X)=>(E(),D("div",d_,[l("aside",f_,[l("div",p_,[l("span",v_,"备忘录("+ne(t.value.length)+")",1),l("button",{class:"btn btn-primary btn-sm",onClick:$},"新建")]),l("div",h_,[(E(!0),D(je,null,ot(t.value,O=>(E(),D("div",{key:O.id,class:et(["memo-item",{active:s.value&&n.value&&n.value.id===O.id}]),onClick:x=>S(O)},[l("div",y_,ne(O.title||"无标题"),1),l("div",g_,ne(Z(O)||"空"),1),l("div",b_,ne(de(O.updated_at)),1)],10,m_))),128)),t.value.length?xe("",!0):(E(),D("div",w_,"暂无备忘"))])]),l("section",__,[s.value?(E(),D(je,{key:0},[$e(l("input",{class:"input title-input","onUpdate:modelValue":X[0]||(X[0]=O=>o.value=O),placeholder:"标题"},null,512),[[Me,o.value]]),$e(l("textarea",{class:"textarea content-textarea","onUpdate:modelValue":X[1]||(X[1]=O=>a.value=O),placeholder:"内容"},null,512),[[Me,a.value]]),l("div",k_,[l("span",x_,[m.value?(E(),D(je,{key:0},[en("有未保存修改")],64)):n.value&&n.value.id?(E(),D(je,{key:1},[en("更新于 "+ne(de(n.value.updated_at)),1)],64)):(E(),D(je,{key:2},[en("新备忘")],64))]),X[4]||(X[4]=l("span",{class:"flex1"},null,-1)),n.value&&n.value.id?(E(),D("button",{key:0,class:"btn btn-sm",onClick:ie},"删除")):xe("",!0),l("button",{class:"btn btn-sm",disabled:!m.value,onClick:re},"放弃修改",8,C_),l("button",{class:"btn btn-primary btn-sm",disabled:!m.value,onClick:se},"保存",8,S_)])],64)):(E(),D("div",E_,"选择左侧备忘,或点击右上角新建"))]),Ee(qn,{open:!!c.value,title:"删除确认",message:c.value?"将删除备忘「"+(c.value.title||"无标题")+"」。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:X[2]||(X[2]=O=>c.value=null),onConfirm:T},null,8,["open","message"]),Ee(qn,{open:!!f.value,title:"未保存提示",message:"当前备忘有未保存的修改,继续操作将丢失这些修改。","confirm-text":"放弃修改并继续",onCancel:X[3]||(X[3]=O=>f.value=null),onConfirm:I},null,8,["open"])]))}}),T_=Wt($_,[["__scopeId","data-v-74d60dba"]]),P_=["aria-label"],A_={class:"dialog-head"},O_={class:"dialog-title"},M_={class:"dialog-body"},I_={class:"form-grid"},j_={class:"field span2"},D_={class:"field span2"},L_={class:"field span2"},R_={class:"pwd-row"},K_={class:"field span2"},F_={key:0,class:"form-error"},N_={class:"dialog-btns"},V_=Rt({__name:"CredentialDialog",props:{open:{type:Boolean},title:{},initial:{}},emits:["cancel","save"],setup(e,{emit:t}){const n=e,s=t,o=L(""),a=L(""),c=L(""),f=L(""),v=L(""),y=L(null);function m($){n.open&&$.key==="Escape"&&s("cancel")}ht(()=>n.open,async $=>{var U;$?(o.value=n.initial.system,a.value=n.initial.account,c.value=n.initial.password,f.value=n.initial.remark,v.value="",window.addEventListener("keydown",m),await ss(),(U=y.value)==null||U.focus()):window.removeEventListener("keydown",m)}),pr(()=>window.removeEventListener("keydown",m));function _(){const $="ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz23456789",U="!@#$%^&*",re=crypto.getRandomValues(new Uint8Array(14));let se="";for(let ie=0;ie(E(),Pt(Dr,{to:"body"},[Ee(os,{name:"modal"},{default:fr(()=>[e.open?(E(),D("div",{key:0,class:"mask",onClick:U[6]||(U[6]=sn(re=>s("cancel"),["self"]))},[l("div",{class:"dialog",role:"dialog","aria-label":e.title},[l("div",A_,[l("span",O_,ne(e.title),1),l("button",{class:"icon-btn",title:"关闭",onClick:U[0]||(U[0]=re=>s("cancel"))},[Ee(Xe,{name:"close",size:16})])]),l("div",M_,[l("div",I_,[l("div",j_,[U[7]||(U[7]=l("label",null,"系统名称(必填)",-1)),$e(l("input",{ref_key:"systemInput",ref:y,class:"input","onUpdate:modelValue":U[1]||(U[1]=re=>o.value=re),placeholder:"如:企业邮箱 / OA / VPN"},null,512),[[Me,o.value]])]),l("div",D_,[U[8]||(U[8]=l("label",null,"账号(必填)",-1)),$e(l("input",{class:"input","onUpdate:modelValue":U[2]||(U[2]=re=>a.value=re),placeholder:"用户名、工号或邮箱"},null,512),[[Me,a.value]])]),l("div",L_,[U[9]||(U[9]=l("label",null,"密码(必填)",-1)),l("div",R_,[$e(l("input",{class:"input","onUpdate:modelValue":U[3]||(U[3]=re=>c.value=re),placeholder:"输入或点击生成"},null,512),[[Me,c.value]]),l("button",{class:"btn btn-sm",onClick:_},"生成")])]),l("div",K_,[U[10]||(U[10]=l("label",null,"备注",-1)),$e(l("textarea",{class:"textarea","onUpdate:modelValue":U[4]||(U[4]=re=>f.value=re),placeholder:"用途、到期时间、负责人等(选填)"},null,512),[[Me,f.value]])])]),v.value?(E(),D("div",F_,ne(v.value),1)):xe("",!0)]),l("div",N_,[l("button",{class:"btn btn-sm",onClick:U[5]||(U[5]=re=>s("cancel"))},"取消"),l("button",{class:"btn btn-primary btn-sm",onClick:S},"保存")])],8,P_)])):xe("",!0)]),_:1})]))}}),B_=Wt(V_,[["__scopeId","data-v-f383b0a6"]]),U_={class:"vault-page"},q_={key:0,class:"empty muted"},H_={key:1,class:"card lock-card"},W_={class:"lock-badge"},z_={key:0,class:"form-error"},G_=["disabled"],Y_={key:0,class:"form-error"},J_=["disabled"],X_={class:"vault-toolbar"},Q_={class:"search-wrap"},Z_={class:"card table-card"},e1={class:"cred-table"},t1={class:"td-system"},n1=["onClick"],r1={class:"pwd-cell"},s1={class:"num pwd-text"},o1=["onClick"],i1=["onClick"],a1={class:"td-remark"},l1={class:"td-ops"},u1={class:"ops"},c1=["onClick"],d1=["onClick"],f1={key:0},p1={class:"muted vault-note num"},v1={class:"dialog pwd-dialog"},h1={class:"dialog-head"},m1={class:"dialog-body"},y1={class:"vp-field"},g1={class:"vp-field"},b1={class:"vp-field"},w1={key:0,class:"form-error"},_1={class:"dialog-btns"},k1=5*60*1e3,x1=Rt({__name:"VaultView",setup(e){const t=L(null),n=L(Eh()),s=L(!1),o=L(""),a=L(""),c=L(""),f=L(""),v=L(""),y=L([]),m=L(""),_=L({}),S=L(!1),$=L(null),U=L({system:"",account:"",password:"",remark:""}),re=L(null),se=L(!1),ie=L(""),T=L(""),I=L(""),Z=L("");async function de(){y.value=await Oh(),_.value={}}let ae=null;function X(){ae!==null&&window.clearTimeout(ae),ae=window.setTimeout(()=>{n.value&&(ri(),n.value=!1,y.value=[],_.value={},Ne("长时间未操作,密码库已自动锁定"))},k1)}function O(){n.value&&X()}pn(async()=>{t.value=await cd(),window.addEventListener("click",O),window.addEventListener("keydown",O),n.value&&X()}),pr(()=>{window.removeEventListener("click",O),window.removeEventListener("keydown",O),ae!==null&&window.clearTimeout(ae)});const x=st(()=>{const Ce=m.value.trim().toLowerCase();return Ce?y.value.filter(ee=>(ee.system+" "+ee.account+" "+(ee.remark||"")).toLowerCase().includes(Ce)):y.value});async function V(){if(!s.value){if(c.value="",!o.value){c.value="请输入主密码";return}if(o.value.length<6){c.value="主密码至少 6 位";return}if(o.value!==a.value){c.value="两次输入的主密码不一致";return}s.value=!0;try{await $h(o.value),o.value="",a.value="",n.value=!0,X(),await de(),Ne("主密码已设置,密码库已解锁")}catch(Ce){c.value=Ce instanceof Error?Ce.message:"设置失败"}s.value=!1}}async function ue(){if(!s.value){if(v.value="",!f.value){v.value="请输入主密码";return}s.value=!0;try{await Th(f.value),f.value="",n.value=!0,X(),await de()}catch(Ce){v.value=Ce instanceof Error?Ce.message:"解锁失败"}s.value=!1}}function W(){ri(),n.value=!1,y.value=[],_.value={},ae!==null&&window.clearTimeout(ae),Ne("密码库已锁定")}async function ke(Ce){const ee=Ce.id;if(_.value[ee]){_.value[ee]=!1;return}try{Ce.passwordPlain=await ma(ee),_.value[ee]=!0}catch(te){Ne(te instanceof Error?te.message:"解密失败")}}async function Te(Ce){try{const ee=await ma(Ce.id);await Ha(ee),Ne("密码已复制")}catch(ee){Ne(ee instanceof Error?ee.message:"复制失败")}}async function Je(Ce){await Ha(Ce.account),Ne("账号已复制")}function Le(){$.value=null,U.value={system:"",account:"",password:"",remark:""},S.value=!0}async function qe(Ce){try{const ee=await ma(Ce.id);$.value=Ce.id,U.value={system:Ce.system,account:Ce.account,password:ee,remark:Ce.remark||""},S.value=!0}catch(ee){Ne(ee instanceof Error?ee.message:"解密失败")}}async function Ke(Ce){const ee=$.value??void 0;await Mh(Ce,ee),S.value=!1,await de(),Ne(ee?"账号已更新":"账号已添加")}async function it(){re.value&&re.value.id&&(await Ih(re.value.id),Ne("账号已删除")),re.value=null,await de()}function Ge(){ie.value="",T.value="",I.value="",Z.value="",se.value=!0}async function Qe(){Z.value="";try{const Ce=await jh(ie.value,T.value);se.value=!1,ie.value="",T.value="",I.value="",Ne("主密码已修改,"+Ce+" 条账号密码已重新加密")}catch(Ce){Z.value=Ce instanceof Error?Ce.message:"修改失败"}}return(Ce,ee)=>(E(),D("div",U_,[t.value===null?(E(),D("div",q_,"加载中")):n.value?(E(),D(je,{key:2},[l("div",X_,[l("div",Q_,[Ee(Xe,{name:"search",size:14,class:"search-icon"}),$e(l("input",{class:"input","onUpdate:modelValue":ee[3]||(ee[3]=te=>m.value=te),placeholder:"搜索系统名称、账号或备注"},null,512),[[Me,m.value]])]),ee[16]||(ee[16]=l("span",{class:"flex1"},null,-1)),l("button",{class:"btn btn-sm",onClick:Ge},"修改主密码"),l("button",{class:"btn btn-sm",onClick:W},"锁定"),l("button",{class:"btn btn-primary btn-sm",onClick:Le},"新增账号")]),l("div",Z_,[l("table",e1,[ee[18]||(ee[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,[(E(!0),D(je,null,ot(x.value,te=>(E(),D("tr",{key:te.id},[l("td",t1,ne(te.system),1),l("td",null,[l("span",{class:"copyable",title:"点击复制账号",onClick:we=>Je(te)},ne(te.account),9,n1)]),l("td",null,[l("div",r1,[l("span",s1,ne(_.value[te.id]?te.passwordPlain:"........"),1),l("button",{class:"btn btn-xs",onClick:we=>ke(te)},ne(_.value[te.id]?"隐藏":"显示"),9,o1),l("button",{class:"btn btn-xs",onClick:we=>Te(te)},"复制",8,i1)])]),l("td",a1,ne(te.remark||"--"),1),l("td",l1,[l("div",u1,[l("button",{class:"btn btn-xs",onClick:we=>qe(te)},"编辑",8,c1),l("button",{class:"btn btn-xs",onClick:we=>re.value=te},"删除",8,d1)])])]))),128)),x.value.length?xe("",!0):(E(),D("tr",f1,[...ee[17]||(ee[17]=[l("td",{colspan:"5",class:"empty muted"},"暂无账号,点击右上角新增",-1)])]))])])]),l("div",p1,"共 "+ne(y.value.length)+" 条账号记录 · 密码以 AES-256-GCM 加密,服务器仅存密文",1)],64)):(E(),D("div",H_,[l("div",W_,[Ee(Xe,{name:"lock",size:26})]),t.value===!1?(E(),D(je,{key:0},[ee[12]||(ee[12]=l("div",{class:"lock-title"},"设置主密码",-1)),ee[13]||(ee[13]=l("div",{class:"muted lock-tip"},"主密码用于加密保存在本机的账号密码,遗忘后无法找回,请务必牢记",-1)),$e(l("input",{type:"password",class:"input","onUpdate:modelValue":ee[0]||(ee[0]=te=>o.value=te),placeholder:"设置主密码(至少 6 位)",onKeydown:At(V,["enter"])},null,544),[[Me,o.value]]),$e(l("input",{type:"password",class:"input","onUpdate:modelValue":ee[1]||(ee[1]=te=>a.value=te),placeholder:"再次输入主密码",onKeydown:At(V,["enter"])},null,544),[[Me,a.value]]),c.value?(E(),D("div",z_,ne(c.value),1)):xe("",!0),l("button",{class:"btn btn-primary lock-btn",disabled:s.value,onClick:V},"完成设置并解锁",8,G_)],64)):(E(),D(je,{key:1},[ee[14]||(ee[14]=l("div",{class:"lock-title"},"密码库已锁定",-1)),ee[15]||(ee[15]=l("div",{class:"muted lock-tip"},"输入主密码解锁后查看与复制密码",-1)),$e(l("input",{type:"password",class:"input","onUpdate:modelValue":ee[2]||(ee[2]=te=>f.value=te),placeholder:"主密码",onKeydown:At(ue,["enter"])},null,544),[[Me,f.value]]),v.value?(E(),D("div",Y_,ne(v.value),1)):xe("",!0),l("button",{class:"btn btn-primary lock-btn",disabled:s.value,onClick:ue},"解锁",8,J_)],64))])),Ee(B_,{open:S.value,title:$.value?"编辑账号":"新增账号",initial:U.value,onCancel:ee[4]||(ee[4]=te=>S.value=!1),onSave:Ke},null,8,["open","title","initial"]),Ee(qn,{open:!!re.value,title:"删除确认",message:re.value?"将删除系统「"+re.value.system+"」的账号记录。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:ee[5]||(ee[5]=te=>re.value=null),onConfirm:it},null,8,["open","message"]),(E(),Pt(Dr,{to:"body"},[Ee(os,{name:"modal"},{default:fr(()=>[se.value?(E(),D("div",{key:0,class:"mask",onClick:ee[11]||(ee[11]=sn(te=>se.value=!1,["self"]))},[l("div",v1,[l("div",h1,[ee[19]||(ee[19]=l("span",{class:"dialog-title"},"修改主密码",-1)),l("button",{class:"icon-btn",title:"关闭",onClick:ee[6]||(ee[6]=te=>se.value=!1)},[Ee(Xe,{name:"close",size:16})])]),l("div",m1,[l("div",y1,[ee[20]||(ee[20]=l("label",null,"旧主密码",-1)),$e(l("input",{type:"password",class:"input","onUpdate:modelValue":ee[7]||(ee[7]=te=>ie.value=te)},null,512),[[Me,ie.value]])]),l("div",g1,[ee[21]||(ee[21]=l("label",null,"新主密码(至少 6 位)",-1)),$e(l("input",{type:"password",class:"input","onUpdate:modelValue":ee[8]||(ee[8]=te=>T.value=te)},null,512),[[Me,T.value]])]),l("div",b1,[ee[22]||(ee[22]=l("label",null,"确认新主密码",-1)),$e(l("input",{type:"password",class:"input","onUpdate:modelValue":ee[9]||(ee[9]=te=>I.value=te)},null,512),[[Me,I.value]])]),Z.value?(E(),D("div",w1,ne(Z.value),1)):xe("",!0),ee[23]||(ee[23]=l("div",{class:"muted vp-tip"},"确认后所有账号密码将使用新主密码重新加密",-1))]),l("div",_1,[l("button",{class:"btn btn-sm",onClick:ee[10]||(ee[10]=te=>se.value=!1)},"取消"),l("button",{class:"btn btn-primary btn-sm",onClick:Qe},"确认修改")])])])):xe("",!0)]),_:1})]))]))}}),C1=Wt(x1,[["__scopeId","data-v-c2db283d"]]);function S1(e){return'"'+(e==null?"":String(e)).replace(/"/g,'""')+'"'}async function Bu(e,t){const s="\uFEFF"+t.map(f=>f.map(S1).join(",")).join(`\r +`);if(rs.isNativePlatform()){const{downloadText:f}=await Pd(async()=>{const{downloadText:v}=await Promise.resolve().then(()=>pb);return{downloadText:v}},void 0,import.meta.url);return f(e,s)}const o=new Blob([s],{type:"text/csv;charset=utf-8"}),a=URL.createObjectURL(o),c=document.createElement("a");return c.href=a,c.download=e,c.click(),window.setTimeout(()=>URL.revokeObjectURL(a),1e4),""}const E1={class:"settings"},$1={class:"card section"},T1={class:"muted acc-line"},P1={class:"ai-grid"},A1={class:"rule-item"},O1={class:"rule-item"},M1={class:"rule-item"},I1={key:0,class:"form-error"},j1={class:"rule-save"},D1={class:"card section"},L1={class:"rule-grid"},R1={class:"rule-item"},K1={class:"rule-item"},F1={class:"rule-item"},N1={class:"rule-item"},V1={class:"rule-item"},B1={class:"card section"},U1={class:"proj-add"},q1={key:0,class:"muted proj-tip"},H1=["onKeydown"],W1=["onClick"],z1=["onClick"],G1=["onClick"],Y1={key:1,class:"muted"},J1={class:"card section"},X1={class:"card section"},Q1={class:"muted acc-line"},Z1={class:"rule-item"},e0={class:"rule-save"},t0=["disabled"],n0={key:0,class:"muted acc-line"},r0={key:1,class:"form-error"},s0={key:2,class:"form-error"},o0={class:"card section"},i0={class:"ai-grid"},a0={class:"rule-item"},l0={class:"rule-item"},u0={class:"rule-item"},c0={class:"card section"},d0={class:"backup-row"},f0={key:0,class:"import-error"},p0=Rt({__name:"SettingsView",setup(e){var b;const t=L({work_start:"09:00",work_end:"18:00",grace_minutes:10,lunch_minutes:60,remind_weekly:"friday"}),n=L([]),s=L(""),o=L(""),a=L(""),c=L(""),f=L(""),v=L(""),y=L(null),m=L(""),_=L(null),S=L(null),$=L(""),U=L(((b=Vs())==null?void 0:b.username)||""),re=L(""),se=L(""),ie=L(""),T=L(""),I=L(!1),Z="0.2.0",de=L(""),ae=L(""),X=L(""),O=L(""),x=L(""),V=L(!1),ue=L("");async function W(){var g;de.value=await Gh(),ae.value=((g=gn())==null?void 0:g.username)||"",ue.value=await Zh(),x.value=Xr.value}ht(Xr,g=>{x.value=g});async function ke(){await Lh(de.value.trim()),Ne("同步地址已保存")}async function Te(){O.value="";try{await wd(),Ne("云端绑定已重建")}catch(g){O.value=g instanceof Error?g.message:"绑定失败"}}async function Je(){if(!V.value){O.value="",x.value=Xr.value,V.value=!0;try{await ke();const g=await Va();ue.value=g.at,X.value="推送 "+g.pushed+" 条 · 拉取 "+g.pulled+" 条 · 删除 "+g.removed+" 条",x.value="",Ne("同步完成")}catch(g){O.value=g instanceof Error?g.message:"同步失败"}V.value=!1}}async function Le(){if(T.value="",se.value!==ie.value){T.value="两次输入的新密码不一致";return}try{await Wh(re.value,se.value),re.value="",se.value="",ie.value="",Ne("登录密码已修改")}catch(g){T.value=g instanceof Error?g.message:"修改失败"}}async function qe(){await zh(),window.location.reload()}async function Ke(){t.value=await Rr(),n.value=await Us(!0),a.value=(await vl()).join(` +`),c.value=await gt("ai_base_url",""),f.value=await gt("ai_api_key",""),v.value=await gt("ai_model",""),await W()}async function it(){await Lt("ai_base_url",c.value.trim()),await Lt("ai_api_key",f.value.trim()),await Lt("ai_model",v.value.trim()),Ne("AI 配置已保存")}async function Ge(){const g=xt(),C=await Promise.all([Si("2000-01-01",g),Us(!0)]),Y=C[0],R=C[1],le=new Map(R.map(ce=>[ce.id,ce.name])),ge=[["日期","分类","项目","内容","耗时(分钟)","成果","待跟进","收获","备注"]];for(const ce of Y)ge.push([ce.date,Zo(ce.category),ce.project_id&&le.get(ce.project_id)||"",ce.content,ce.minutes==null?"":ce.minutes,ce.is_milestone?"是":"",ce.needs_followup?"是":"",ce.takeaway||"",ce.remark||""]);const me=await Bu("工作记录_"+g.replace(/-/g,"")+".csv",ge);Ne(me?"CSV 已导出到:"+me:"CSV 已导出到系统下载目录")}async function Qe(){const g=xt(),C=await Promise.all([Rr(),Ci("2000-01-01",g)]),Y=C[0],R=C[1],le=["周日","周一","周二","周三","周四","周五","周六"],ge=[["日期","星期","状态","上班时间","下班时间","地点","类型","说明"]];for(const ce of R){const z=Ys(ce,ce.date,Y,ce.date===g);ge.push([ce.date,le[is(ce.date).getDay()],z.label,ce.clock_in_at?Un(ce.clock_in_at):"",ce.clock_out_at?Un(ce.clock_out_at):"",ce.location||"",ce.kind==="makeup"?"补卡":ce.kind==="leave"?"休假":"正常",ce.note||""])}const me=await Bu("考勤记录_"+g.replace(/-/g,"")+".csv",ge);Ne(me?"CSV 已导出到:"+me:"CSV 已导出到系统下载目录")}pn(Ke);async function Ce(){await Lt("work_start",t.value.work_start),await Lt("work_end",t.value.work_end),await Lt("grace_minutes",String(t.value.grace_minutes)),await Lt("lunch_minutes",String(t.value.lunch_minutes)),await Lt("remind_weekly",t.value.remind_weekly),Ne("打卡规则已保存")}async function ee(){await Ed(a.value.split(` +`)),Ne("常用地点已保存")}async function te(){const g=s.value.trim();if(g){try{await mm(g),o.value="",s.value=""}catch{o.value="项目名已存在"}await Ke()}}function we(g){y.value=g.id,m.value=g.name}async function Fe(g){const C=m.value.trim();if(C)try{await ym(g.id,C),o.value=""}catch{o.value="项目名已存在"}y.value=null,await Ke()}async function dt(g){await gm(g.id,g.archived!==1),await Ke()}async function Kt(){try{const g=await Bm(),C=await ml("实习日志备份_"+xt().replace(/-/g,"")+".json",g);Ne(C?"备份已导出到:"+C:"备份已导出到系统下载目录")}catch(g){Ne("导出失败:"+(g instanceof Error?g.message:String(g)))}}function Ot(g){const C=g.target,Y=C.files&&C.files[0];if($.value="",!Y)return;const R=Y.name;Y.text().then(le=>{S.value={name:R,text:le}}),C.value=""}async function Ie(){if(S.value)try{await Um(S.value.text),S.value=null,$.value="",await Ke(),Ne("数据导入完成")}catch(g){S.value=null,$.value=g instanceof Error?g.message:"导入失败"}}return(g,C)=>(E(),D("div",E1,[l("div",$1,[C[23]||(C[23]=l("div",{class:"section-title"},"账号与隐私",-1)),l("div",T1,"版本 v"+ne(Ut(Z))+" · 当前用户:"+ne(U.value)+" · 每位用户独立数据库隔离存储于本机 · 登录密码仅保存 PBKDF2 哈希",1),l("div",P1,[l("div",A1,[C[20]||(C[20]=l("label",null,"旧登录密码",-1)),$e(l("input",{type:"password",class:"input","onUpdate:modelValue":C[0]||(C[0]=Y=>re.value=Y)},null,512),[[Me,re.value]])]),l("div",O1,[C[21]||(C[21]=l("label",null,"新登录密码(至少 6 位)",-1)),$e(l("input",{type:"password",class:"input","onUpdate:modelValue":C[1]||(C[1]=Y=>se.value=Y)},null,512),[[Me,se.value]])]),l("div",M1,[C[22]||(C[22]=l("label",null,"确认新登录密码",-1)),$e(l("input",{type:"password",class:"input","onUpdate:modelValue":C[2]||(C[2]=Y=>ie.value=Y)},null,512),[[Me,ie.value]])])]),T.value?(E(),D("div",I1,ne(T.value),1)):xe("",!0),l("div",j1,[l("button",{class:"btn btn-primary btn-sm",onClick:Le},"修改登录密码"),l("button",{class:"btn btn-sm btn-danger",onClick:C[3]||(C[3]=Y=>I.value=!0)},"删除此用户及全部数据")])]),l("div",D1,[C[30]||(C[30]=l("div",{class:"section-title"},"打卡规则",-1)),l("div",L1,[l("div",R1,[C[24]||(C[24]=l("label",null,"上班时间",-1)),$e(l("input",{type:"time",class:"input","onUpdate:modelValue":C[4]||(C[4]=Y=>t.value.work_start=Y)},null,512),[[Me,t.value.work_start]])]),l("div",K1,[C[25]||(C[25]=l("label",null,"下班时间",-1)),$e(l("input",{type:"time",class:"input","onUpdate:modelValue":C[5]||(C[5]=Y=>t.value.work_end=Y)},null,512),[[Me,t.value.work_end]])]),l("div",F1,[C[26]||(C[26]=l("label",null,"迟到宽限(分钟)",-1)),$e(l("input",{type:"number",class:"input",min:"0","onUpdate:modelValue":C[6]||(C[6]=Y=>t.value.grace_minutes=Y)},null,512),[[Me,t.value.grace_minutes,void 0,{number:!0}]])]),l("div",N1,[C[27]||(C[27]=l("label",null,"午休扣除(分钟)",-1)),$e(l("input",{type:"number",class:"input",min:"0","onUpdate:modelValue":C[7]||(C[7]=Y=>t.value.lunch_minutes=Y)},null,512),[[Me,t.value.lunch_minutes,void 0,{number:!0}]])]),l("div",V1,[C[29]||(C[29]=l("label",null,"周记提醒",-1)),$e(l("select",{class:"select","onUpdate:modelValue":C[8]||(C[8]=Y=>t.value.remind_weekly=Y)},[...C[28]||(C[28]=[l("option",{value:"friday"},"每周五提醒",-1),l("option",{value:"off"},"关闭",-1)])],512),[[Vn,t.value.remind_weekly]])])]),l("div",{class:"rule-save"},[l("button",{class:"btn btn-primary btn-sm",onClick:Ce},"保存规则")])]),l("div",B1,[C[31]||(C[31]=l("div",{class:"section-title"},"项目管理",-1)),l("div",U1,[$e(l("input",{class:"input","onUpdate:modelValue":C[9]||(C[9]=Y=>s.value=Y),placeholder:"新项目名称",onKeydown:At(te,["enter"])},null,544),[[Me,s.value]]),l("button",{class:"btn btn-sm",onClick:te},"添加")]),o.value?(E(),D("div",q1,ne(o.value),1)):xe("",!0),(E(!0),D(je,null,ot(n.value,Y=>(E(),D("div",{key:Y.id,class:"proj-row"},[y.value===Y.id?(E(),D(je,{key:0},[$e(l("input",{class:"input","onUpdate:modelValue":C[10]||(C[10]=R=>m.value=R),onKeydown:At(R=>Fe(Y),["enter"])},null,40,H1),[[Me,m.value]]),l("button",{class:"btn btn-sm",onClick:R=>Fe(Y)},"保存",8,W1),l("button",{class:"btn btn-sm",onClick:C[11]||(C[11]=R=>y.value=null)},"取消")],64)):(E(),D(je,{key:1},[l("span",{class:et(["proj-name",{archived:Y.archived===1}])},ne(Y.name),3),l("button",{class:"icon-btn",title:"重命名",onClick:R=>we(Y)},[Ee(Xe,{name:"edit",size:14})],8,z1),l("button",{class:"btn btn-sm",onClick:R=>dt(Y)},ne(Y.archived===1?"恢复":"归档"),9,G1)],64))]))),128)),n.value.length?xe("",!0):(E(),D("div",Y1,"暂无项目,先添加一个"))]),l("div",J1,[C[33]||(C[33]=l("div",{class:"section-title"},"常用地点",-1)),$e(l("textarea",{class:"textarea","onUpdate:modelValue":C[12]||(C[12]=Y=>a.value=Y),placeholder:"每行一个地点,如:公司、客户现场、出差、居家办公"},null,512),[[Me,a.value]]),l("div",{class:"rule-save"},[l("button",{class:"btn btn-primary btn-sm",onClick:ee},"保存地点"),C[32]||(C[32]=l("span",{class:"muted loc-note"},"打卡时可直接输入新地点,保存后自动加入列表",-1))])]),l("div",X1,[C[35]||(C[35]=l("div",{class:"section-title"},"多端数据同步",-1)),l("div",Q1,"云端账号:"+ne(ae.value||"未绑定")+" · 数据仅保存在服务器,本机只是实时缓存(变更 ~3 秒推上云端 + 其他端秒级自动刷新);密码库同步密文,主密码永不出本机",1),l("div",Z1,[C[34]||(C[34]=l("label",null,"同步服务地址(默认即可)",-1)),$e(l("input",{class:"input","onUpdate:modelValue":C[13]||(C[13]=Y=>de.value=Y),placeholder:"https://daywk.linyux.cn"},null,512),[[Me,de.value]])]),l("div",e0,[l("button",{class:"btn btn-sm",onClick:ke},"保存地址"),l("button",{class:"btn btn-primary btn-sm",disabled:V.value,onClick:Je},ne(V.value?"同步中":"立即同步"),9,t0),l("button",{class:"btn btn-sm",onClick:Te},"重建云端绑定")]),X.value?(E(),D("div",n0,"上次同步:"+ne(ue.value||"--")+" · "+ne(X.value),1)):xe("",!0),O.value?(E(),D("div",r0,ne(O.value),1)):xe("",!0),x.value?(E(),D("div",s0,"最近自动同步失败:"+ne(x.value)+"(可点「立即同步」重试)",1)):xe("",!0)]),l("div",o0,[C[40]||(C[40]=l("div",{class:"section-title"},"AI 润色配置(可选)",-1)),l("div",i0,[l("div",a0,[C[36]||(C[36]=l("label",null,"接口地址(OpenAI 兼容,到 /v1 为止)",-1)),$e(l("input",{class:"input","onUpdate:modelValue":C[14]||(C[14]=Y=>c.value=Y),placeholder:"https://api.example.com/v1"},null,512),[[Me,c.value]])]),l("div",l0,[C[37]||(C[37]=l("label",null,"API Key",-1)),$e(l("input",{class:"input","onUpdate:modelValue":C[15]||(C[15]=Y=>f.value=Y),placeholder:"sk-..."},null,512),[[Me,f.value]])]),l("div",u0,[C[38]||(C[38]=l("label",null,"模型名称",-1)),$e(l("input",{class:"input","onUpdate:modelValue":C[16]||(C[16]=Y=>v.value=Y),placeholder:"如:deepseek-chat"},null,512),[[Me,v.value]])])]),l("div",{class:"rule-save"},[l("button",{class:"btn btn-primary btn-sm",onClick:it},"保存 AI 配置"),C[39]||(C[39]=l("span",{class:"muted loc-note"},"配置仅保存在本机浏览器;总结页可用 AI 润色草稿,需服务端允许浏览器跨域",-1))])]),l("div",c0,[C[41]||(C[41]=l("div",{class:"section-title"},"数据备份",-1)),l("div",d0,[l("button",{class:"btn btn-sm",onClick:Kt},"导出 JSON 备份"),l("button",{class:"btn btn-sm",onClick:C[17]||(C[17]=Y=>{var R;return(R=_.value)==null?void 0:R.click()})},"导入 JSON 备份"),l("button",{class:"btn btn-sm",onClick:Ge},"导出工作记录 CSV"),l("button",{class:"btn btn-sm",onClick:Qe},"导出考勤 CSV"),l("input",{ref_key:"fileInput",ref:_,type:"file",accept:"application/json,.json",style:{display:"none"},onChange:Ot},null,544)]),$.value?(E(),D("div",f0,ne($.value),1)):xe("",!0),C[42]||(C[42]=l("div",{class:"muted backup-note"},"数据保存在浏览器 IndexedDB 中,建议定期导出 JSON 备份。",-1))]),Ee(qn,{open:!!S.value,title:"导入确认",message:S.value?"将从文件「"+S.value.name+"」导入备份。现有全部数据将被覆盖,且不可恢复,请先确认已导出当前备份。":"","confirm-text":"覆盖导入",danger:"",onCancel:C[18]||(C[18]=Y=>S.value=null),onConfirm:Ie},null,8,["open","message"]),Ee(qn,{open:I.value,title:"删除用户确认",message:"将永久删除云端账号「"+U.value+"」及其服务器上的全部数据:工作日志、考勤、备忘录、账号密码库都将被清除,任何设备都无法再取回,且不可恢复。请确认。","confirm-text":"永久删除",danger:"",onCancel:C[19]||(C[19]=Y=>I.value=!1),onConfirm:qe},null,8,["open","message"])]))}}),v0=Wt(p0,[["__scopeId","data-v-cea34561"]]),h0={class:"admin-page"},m0={class:"card sec"},y0={class:"toolbar"},g0={key:0,class:"form-error"},b0={class:"card table-card admin-table-card"},w0={class:"admin-table"},_0={class:"td-name","data-label":"用户名"},k0={"data-label":"角色"},x0={key:0,class:"role-badge"},C0={key:1,class:"muted"},S0={class:"muted num","data-label":"创建时间"},E0={class:"muted num","data-label":"数据量"},$0={class:"td-ops"},T0={class:"ops"},P0=["onClick"],A0=["disabled","onClick"],O0={key:0},M0={key:0,class:"muted load-line"},I0={class:"dialog create-dialog",role:"dialog","aria-label":"新增用户"},j0={class:"dialog-head"},D0={class:"dialog-body"},L0={class:"form-row"},R0={class:"form-row"},K0={class:"form-row"},F0={key:0,class:"form-error"},N0={class:"dialog-btns"},V0=["disabled"],B0={class:"dialog create-dialog",role:"dialog","aria-label":"重置密码"},U0={class:"dialog-head"},q0={class:"dialog-title"},H0={class:"dialog-body"},W0={class:"form-row"},z0={key:0,class:"form-error"},G0={class:"dialog-btns"},Y0=["disabled"],J0=Rt({__name:"UserAdminView",setup(e){const t=L([]),n=L(""),s=L(!0),o=L("");async function a(x,V){const ue=await vr();let W=xi();if(!W){const Te=gn(),Je=await fetch(ue+"/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:Te==null?void 0:Te.username,password:Te==null?void 0:Te.password})});if(Je.ok){const Le=await Je.json();W=String(Le.token||""),Ns(W)}}const ke=await fetch(ue+x,{method:V?"POST":"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+W},body:V?JSON.stringify(V):void 0});if(ke.status===401&&gn()){const Te=gn(),Je=await fetch(ue+"/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:Te==null?void 0:Te.username,password:Te==null?void 0:Te.password})});if(Je.ok){const Le=await Je.json();W=String(Le.token||""),Ns(W);const qe=await fetch(ue+x,{method:V?"POST":"GET",headers:{"Content-Type":"application/json",Authorization:"Bearer "+W},body:V?JSON.stringify(V):void 0});return{ok:qe.ok,status:qe.status,data:await qe.json().catch(()=>({}))}}}return{ok:ke.ok,status:ke.status,data:await ke.json().catch(()=>({}))}}async function c(){s.value=!0,o.value="";const x=await a("/api/admin/users");if(!x.ok){s.value=!1,o.value=x.data&&x.data.error||"加载失败 "+x.status;return}t.value=x.data.users||[],n.value=x.data.me||"",s.value=!1}function f(x){return x<=0?"--":x<1024?x+" B":x<1024*1024?(x/1024).toFixed(1)+" KB":(x/1024/1024).toFixed(2)+" MB"}function v(x){return(x||"").slice(0,10)}const y=L(!1),m=L(""),_=L(""),S=L(""),$=L(""),U=L(!1);function re(){y.value=!0,$.value="",m.value="",_.value="",S.value=""}async function se(){const x=m.value.trim();if(_.value!==S.value){$.value="两次输入的密码不一致";return}if(_.value.length<6){$.value="密码至少 6 位";return}U.value=!0;const V=await a("/api/admin/users/create",{username:x,password:_.value});if(U.value=!1,!V.ok){$.value=V.data&&V.data.error||"创建失败 "+V.status;return}Ne("用户「"+x+"」已创建"),y.value=!1,await c()}const ie=L(null),T=L(""),I=L(""),Z=L(!1);function de(x){ie.value=x,T.value="",I.value=""}async function ae(){if(!ie.value)return;if(T.value.length<6){I.value="密码至少 6 位";return}Z.value=!0;const x=await a("/api/admin/users/password",{userId:ie.value.id,newPassword:T.value});if(Z.value=!1,!x.ok){I.value=x.data&&x.data.error||"重置失败 "+x.status;return}Ne("已重置「"+ie.value.username+"」的登录密码"),ie.value=null}const X=L(null);async function O(){if(!X.value)return;const x=await a("/api/admin/users/delete",{userId:X.value.id});if(!x.ok){X.value=null,Ne(x.data&&x.data.error||"删除失败");return}Ne("已删除账号「"+X.value.username+"」及其全部云端数据"),X.value=null,await c()}return pn(c),(x,V)=>(E(),D("div",h0,[l("div",m0,[l("div",y0,[V[12]||(V[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:re},[Ee(Xe,{name:"plus",size:14}),V[11]||(V[11]=en(" 新增用户 ",-1))])]),o.value?(E(),D("div",g0,ne(o.value),1)):xe("",!0)]),l("div",b0,[l("table",w0,[V[14]||(V[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,[(E(!0),D(je,null,ot(t.value,ue=>(E(),D("tr",{key:ue.id},[l("td",_0,ne(ue.username),1),l("td",k0,[ue.role==="admin"?(E(),D("span",x0,"管理员")):(E(),D("span",C0,"普通用户"))]),l("td",S0,ne(v(ue.created_at)),1),l("td",E0,ne(f(ue.data_bytes)),1),l("td",$0,[l("div",T0,[l("button",{class:"btn btn-xs",onClick:W=>de(ue)},"重置密码",8,P0),l("button",{class:"btn btn-xs btn-danger",disabled:ue.id===n.value,onClick:W=>X.value=ue},"删除",8,A0)])])]))),128)),!s.value&&!t.value.length?(E(),D("tr",O0,[...V[13]||(V[13]=[l("td",{colspan:"5",class:"empty muted"},"加载结果为空",-1)])])):xe("",!0)])]),s.value?(E(),D("div",M0,"加载中")):xe("",!0)]),V[20]||(V[20]=l("div",{class:"muted admin-note"},"重置密码立即生效;删除账号将移除其全部云端数据,不可恢复。自己的账号不能删除。",-1)),(E(),Pt(Dr,{to:"body"},[y.value?(E(),D("div",{key:0,class:"fixed-mask",onClick:V[5]||(V[5]=sn(ue=>y.value=!1,["self"]))},[l("div",I0,[l("div",j0,[V[15]||(V[15]=l("span",{class:"dialog-title"},"新增用户",-1)),l("button",{class:"icon-btn",onClick:V[0]||(V[0]=ue=>y.value=!1)},[Ee(Xe,{name:"close",size:16})])]),l("div",D0,[l("div",L0,[V[16]||(V[16]=l("label",null,"用户名(2 到 20 个字符)",-1)),$e(l("input",{class:"input","onUpdate:modelValue":V[1]||(V[1]=ue=>m.value=ue),placeholder:"如:xiaowang"},null,512),[[Me,m.value]])]),l("div",R0,[V[17]||(V[17]=l("label",null,"初始登录密码(至少 6 位)",-1)),$e(l("input",{class:"input",type:"password","onUpdate:modelValue":V[2]||(V[2]=ue=>_.value=ue),placeholder:"转发给使用者,登录后可自行修改"},null,512),[[Me,_.value]])]),l("div",K0,[V[18]||(V[18]=l("label",null,"确认密码",-1)),$e(l("input",{class:"input",type:"password","onUpdate:modelValue":V[3]||(V[3]=ue=>S.value=ue),onKeydown:At(se,["enter"])},null,544),[[Me,S.value]])]),$.value?(E(),D("div",F0,ne($.value),1)):xe("",!0)]),l("div",N0,[l("button",{class:"btn btn-sm",onClick:V[4]||(V[4]=ue=>y.value=!1)},"取消"),l("button",{class:"btn btn-primary btn-sm",disabled:U.value||!m.value.trim(),onClick:se},ne(U.value?"创建中":"创建"),9,V0)])])])):xe("",!0)])),(E(),Pt(Dr,{to:"body"},[ie.value?(E(),D("div",{key:0,class:"fixed-mask",onClick:V[9]||(V[9]=sn(ue=>ie.value=null,["self"]))},[l("div",B0,[l("div",U0,[l("span",q0,"重置「"+ne(ie.value.username)+"」的登录密码",1),l("button",{class:"icon-btn",onClick:V[6]||(V[6]=ue=>ie.value=null)},[Ee(Xe,{name:"close",size:16})])]),l("div",H0,[l("div",W0,[V[19]||(V[19]=l("label",null,"新登录密码(至少 6 位)",-1)),$e(l("input",{class:"input",type:"password","onUpdate:modelValue":V[7]||(V[7]=ue=>T.value=ue),onKeydown:At(ae,["enter"])},null,544),[[Me,T.value]])]),I.value?(E(),D("div",z0,ne(I.value),1)):xe("",!0)]),l("div",G0,[l("button",{class:"btn btn-sm",onClick:V[8]||(V[8]=ue=>ie.value=null)},"取消"),l("button",{class:"btn btn-primary btn-sm",disabled:Z.value,onClick:ae},ne(Z.value?"提交中":"重置"),9,Y0)])])])):xe("",!0)])),Ee(qn,{open:!!X.value,title:"删除用户确认",message:X.value?"将永久删除云端账号「"+X.value.username+"」及其服务器上的全部数据,不可恢复。请确认。":"","confirm-text":"永久删除",danger:"",onCancel:V[10]||(V[10]=ue=>X.value=null),onConfirm:O},null,8,["open","message"])]))}}),X0=Wt(J0,[["__scopeId","data-v-06be07ff"]]),Q0={class:"login-page"},Z0={class:"card login-card"},ek={class:"login-brand"},tk={class:"brand-icon"},nk={class:"seg"},rk=["placeholder"],sk={key:1,class:"form-error"},ok=["disabled"],ik=Rt({__name:"LoginView",emits:["login"],setup(e,{emit:t}){const n=t,s=L("login"),o=L(""),a=L(""),c=L(""),f=L(""),v=L(!1);function y(_){s.value=_,f.value="",c.value=""}async function m(){if(!v.value){f.value="",v.value=!0;try{let _;if(s.value==="login")_=await Vh(o.value,a.value);else{if(a.value.length<6){f.value="登录密码至少 6 位",v.value=!1;return}if(a.value!==c.value){f.value="两次输入的密码不一致",v.value=!1;return}_=await Bh(o.value,a.value)}n("login",_)}catch(_){f.value=_ instanceof Error?_.message:"操作失败"}v.value=!1}}return(_,S)=>(E(),D("div",Q0,[l("div",Z0,[l("div",ek,[l("div",tk,[Ee(Xe,{name:"calendar",size:22})]),S[5]||(S[5]=l("div",{class:"login-title"},"实习工作日志",-1)),S[6]||(S[6]=l("div",{class:"muted login-sub"},"打卡 · 记录 · 总结 · 备忘录 · 密码库",-1)),S[7]||(S[7]=l("div",{class:"muted login-sub"},"数据保存在云端服务器,所有设备登录同一账号即可实时同步",-1))]),l("div",nk,[l("button",{class:et(["seg-btn",{active:s.value==="login"}]),onClick:S[0]||(S[0]=$=>y("login"))},"登录",2),l("button",{class:et(["seg-btn",{active:s.value==="create"}]),onClick:S[1]||(S[1]=$=>y("create"))},"创建用户",2)]),$e(l("input",{class:"input","onUpdate:modelValue":S[2]||(S[2]=$=>o.value=$),placeholder:"用户名(2 到 20 个字符)",onKeydown:At(m,["enter"])},null,544),[[Me,o.value]]),$e(l("input",{type:"password",class:"input","onUpdate:modelValue":S[3]||(S[3]=$=>a.value=$),placeholder:s.value==="login"?"登录密码":"设置登录密码(至少 6 位)",onKeydown:At(m,["enter"])},null,40,rk),[[Me,a.value]]),s.value==="create"?$e((E(),D("input",{key:0,type:"password",class:"input","onUpdate:modelValue":S[4]||(S[4]=$=>c.value=$),placeholder:"再次输入密码",onKeydown:At(m,["enter"])},null,544)),[[Me,c.value]]):xe("",!0),f.value?(E(),D("div",sk,ne(f.value),1)):xe("",!0),l("button",{class:"btn btn-primary login-btn",disabled:v.value,onClick:m},ne(s.value==="login"?"登录":"创建并进入"),9,ok),S[8]||(S[8]=l("div",{class:"muted login-note"}," 登录密码仅服务器保存哈希;本机保存加密的自动登录凭据,登录后无需重复输入 ",-1))])]))}}),ak=Wt(ik,[["__scopeId","data-v-bf714afa"]]),lk={key:1,class:"app"},uk={class:"side"},ck=["data-tip","onClick"],dk={class:"main"},fk={class:"topbar"},pk={class:"title"},vk={class:"gsearch"},hk={key:0,class:"gs-panel"},mk={key:0,class:"gs-group muted"},yk=["onMousedown"],gk={class:"tag"},bk={class:"gs-text"},wk={class:"muted num gs-date"},_k={key:1,class:"gs-group muted"},kk=["onMousedown"],xk={class:"gs-text"},Ck={class:"muted gs-sub"},Sk={key:1,class:"gs-empty muted"},Ek={class:"topbar-actions"},$k={class:"user-chip num mobile-hide"},Tk=["disabled"],Pk={class:"num"},Ak={class:"content"},Ok={class:"content-inner"},Mk={class:"tabbar"},Ik=["onClick"],jk={class:"sheet-user num"},Dk=["onClick"],Lk={class:"sheet-name"},Rk={class:"msw"},Kk={class:"msw-bar"},Fk={class:"msw-results"},Nk={key:0,class:"gs-group muted"},Vk=["onMousedown"],Bk={class:"tag"},Uk={class:"gs-text"},qk={class:"muted num gs-date"},Hk={key:1,class:"gs-group muted"},Wk=["onMousedown"],zk={class:"gs-text"},Gk={class:"muted gs-sub"},Yk={key:1,class:"gs-empty muted"},Jk={class:"toast-wrap"},Xk=Rt({__name:"App",setup(e){const t=Hm(),n=L(Vs());async function s(b){n.value=b,oi(b.userId),location.hash="#/calendar",de.value="calendar",await te(),await Ie(),c();try{await wd(),await Zr()}catch{}Ne("欢迎,"+b.username);const g=sessionStorage.getItem("dsh_migrate_toast");g&&(sessionStorage.removeItem("dsh_migrate_toast"),Ne("已迁移原有数据 "+g+" 条"))}async function o(){Le.value=!1,Te.value=!1,sm(),a!==null&&(window.clearInterval(a),a=null),await qh(),n.value=null,de.value="calendar",location.hash="#/calendar",Ne("已退出登录")}let a=null;function c(){rm(),a!==null&&window.clearInterval(a),a=window.setInterval(()=>{Zr()},60*1e3),Zr()}const f=L(null),v=L(""),y=L(!1),m=L({logs:[],memos:[]});let _=null;const S=st(()=>!!(m.value.logs.length||m.value.memos.length));function $(){_&&window.clearTimeout(_);const b=v.value;_=window.setTimeout(async()=>{const g=b.trim();if(!g){m.value={logs:[],memos:[]};return}const C=await Promise.all([Dm(g,8),Lm(g,4)]);m.value={logs:C[0],memos:C[1]}},200)}function U(){v.value="",m.value={logs:[],memos:[]},y.value=!1}function re(b){Fa.value=b.date,ae("calendar"),U()}function se(b){Na.value=b.id,ae("memo"),U()}function ie(){window.setTimeout(()=>{y.value=!1},150)}function T(b){var g;(b.ctrlKey||b.metaKey)&&b.key.toLowerCase()==="k"&&(b.preventDefault(),(g=f.value)==null||g.focus())}const I=[{key:"calendar",name:"日历",icon:"calendar"},{key:"today",name:"详情",icon:"edit"},{key:"stats",name:"统计",icon:"chart"},{key:"report",name:"总结",icon:"export"},{key:"ledger",name:"记账",icon:"wallet"},{key:"memo",name:"备忘录",icon:"memo"},{key:"vault",name:"密码库",icon:"lock"},{key:"settings",name:"设置",icon:"settings"},{key:"admin",name:"用户管理",icon:"shield"}];function Z(){var g;const b=(location.hash||"").replace("#/","");return!I.some(C=>C.key===b)||b==="admin"&&(((g=Vs())==null?void 0:g.username)||"")!=="xionglin"?"calendar":b}const de=L(Z());window.addEventListener("hashchange",()=>{de.value=Z()});function ae(b){location.hash="#/"+b}const X=st(()=>I.find(b=>b.key===de.value)||I[0]),O=st(()=>{var b;return(((b=n.value)==null?void 0:b.username)||"")==="xionglin"}),x=st(()=>O.value?I:I.filter(b=>b.key!=="admin")),V=st(()=>{const b=I.filter(g=>!W.includes(g.key));return O.value?b:b.filter(g=>g.key!=="admin")}),ue=st(()=>V.value.some(b=>b.key===de.value));ht([O,de],()=>{de.value==="admin"&&!O.value&&ae("calendar")},{immediate:!0});const W=["calendar","today","ledger","memo"],ke=I.filter(b=>W.includes(b.key)),Te=L(!1);function Je(b){Te.value=!1,ae(b)}const Le=L(!1),qe=L(null);function Ke(){Le.value=!0,window.setTimeout(()=>{var b;return(b=qe.value)==null?void 0:b.focus()},60)}function it(b){re(b),Le.value=!1}function Ge(b){se(b),Le.value=!1}const Qe=L(xt()),Ce=L(void 0),ee=L(!1);async function te(){if(Ce.value=await bn(Qe.value),ee.value=!1,new Date().getHours()<4){const g=await bn(Nn(Qe.value,-1));ee.value=!!(g&&g.clock_in_at&&!g.clock_out_at)}}const we=st(()=>{const b=Ce.value;return b&&b.clock_in_at&&!b.clock_out_at?!0:ee.value&&!(b&&b.clock_in_at)}),Fe=st(()=>{const b=Ce.value;return!!(b&&b.clock_in_at&&b.clock_out_at)}),dt=st(()=>{const b=Ce.value;return we.value?"下班打卡":Fe.value?"已打卡 "+Un(b==null?void 0:b.clock_in_at)+" - "+Un(b==null?void 0:b.clock_out_at):"上班打卡"});async function Kt(){if(we.value)try{await wm()}catch{}else await $d(Qe.value);await te(),rr()}ht(Gs,()=>{n.value&&te()});const Ot=L(!1);async function Ie(){if((await Rr()).remind_weekly==="off"){Ot.value=!1;return}const g=new Date().getDay();if(g===5||g===6||g===0){const C=await hl(Ps(Qe.value));Ot.value=!C||!C.highlights&&!C.challenges&&!C.plan_next}else Ot.value=!1}return pn(async()=>{window.addEventListener("keydown",T),n.value&&(oi(n.value.userId),await te(),await Ie(),c())}),(b,g)=>{var C,Y;return n.value?(E(),D("div",lk,[l("nav",uk,[(E(!0),D(je,null,ot(x.value,R=>(E(),D("button",{key:R.key,class:et(["nav-btn",{active:de.value===R.key}]),"data-tip":R.name,onClick:le=>ae(R.key)},[Ee(Xe,{name:R.icon,size:18},null,8,["name"])],10,ck))),128))]),l("div",dk,[l("header",fk,[l("span",pk,ne(X.value.name),1),l("button",{class:"mob-search-btn",title:"搜索",onClick:Ke},[Ee(Xe,{name:"search",size:16})]),l("div",vk,[Ee(Xe,{name:"search",size:14,class:"gs-icon"}),$e(l("input",{ref_key:"gsInput",ref:f,class:"input gs-input","onUpdate:modelValue":g[0]||(g[0]=R=>v.value=R),placeholder:"搜索工作记录与备忘录(Ctrl+K)",onInput:$,onFocus:g[1]||(g[1]=R=>y.value=!0),onBlur:ie,onKeydown:At(U,["esc"])},null,544),[[Me,v.value]]),y.value&&v.value.trim()?(E(),D("div",hk,[S.value?(E(),D(je,{key:0},[m.value.logs.length?(E(),D("div",mk,"工作记录")):xe("",!0),(E(!0),D(je,null,ot(m.value.logs,R=>(E(),D("div",{key:"l"+R.id,class:"gs-item",onMousedown:sn(le=>re(R),["prevent"])},[l("span",gk,ne(Ut(Zo)(R.category)),1),l("span",bk,ne(R.content),1),l("span",wk,ne(R.date),1)],40,yk))),128)),m.value.memos.length?(E(),D("div",_k,"备忘录")):xe("",!0),(E(!0),D(je,null,ot(m.value.memos,R=>(E(),D("div",{key:"m"+R.id,class:"gs-item",onMousedown:sn(le=>se(R),["prevent"])},[l("span",xk,ne(R.title||"无标题"),1),l("span",Ck,ne(R.content),1)],40,kk))),128))],64)):(E(),D("div",Sk,"无匹配结果"))])):xe("",!0)]),g[12]||(g[12]=l("span",{class:"flex1"},null,-1)),l("div",Ek,[Ot.value?(E(),D("button",{key:0,class:"week-tip",onClick:g[2]||(g[2]=R=>ae("report"))},[...g[11]||(g[11]=[l("span",{class:"dot",style:{background:"var(--warn)"}},null,-1),en(" 填写本周周记 ",-1)])])):xe("",!0),l("span",$k,ne((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:Fe.value,onClick:Kt},[Ee(Xe,{name:Fe.value?"check-circle":"clock",size:14},null,8,["name"]),l("span",Pk,ne(dt.value),1)],8,Tk)])]),l("main",Ak,[l("div",Ok,[de.value==="calendar"?(E(),Pt(vg,{key:0})):de.value==="today"?(E(),Pt(wg,{key:1})):de.value==="stats"?(E(),Pt(Xg,{key:2})):de.value==="report"?(E(),Pt(Jb,{key:3})):de.value==="ledger"?(E(),Pt(c_,{key:4})):de.value==="memo"?(E(),Pt(T_,{key:5})):de.value==="vault"?(E(),Pt(C1,{key:6})):de.value==="admin"?(E(),Pt(X0,{key:7})):(E(),Pt(v0,{key:8}))])]),l("nav",Mk,[(E(!0),D(je,null,ot(Ut(ke),R=>(E(),D("button",{key:R.key,class:et(["tab-btn",{active:de.value===R.key}]),onClick:le=>ae(R.key)},[Ee(Xe,{name:R.icon,size:20},null,8,["name"]),l("span",null,ne(R.name),1)],10,Ik))),128)),l("button",{class:et(["tab-btn",{active:ue.value}]),onClick:g[3]||(g[3]=R=>Te.value=!0)},[Ee(Xe,{name:"more",size:20}),g[13]||(g[13]=l("span",null,"更多",-1))],2)]),Te.value?(E(),D("div",{key:0,class:"sheet-mask",onClick:g[6]||(g[6]=R=>Te.value=!1)},[l("div",{class:"more-sheet",onClick:g[5]||(g[5]=sn(()=>{},["stop"]))},[l("div",jk,ne((Y=n.value)==null?void 0:Y.username),1),(E(!0),D(je,null,ot(V.value,R=>(E(),D("button",{key:R.key,class:"sheet-row",onClick:le=>Je(R.key)},[Ee(Xe,{name:R.icon,size:18},null,8,["name"]),l("span",Lk,ne(R.name),1),Ee(Xe,{name:"chevron-right",size:14,class:"sheet-go"})],8,Dk))),128)),g[15]||(g[15]=l("div",{class:"sheet-divider"},null,-1)),l("button",{class:"sheet-row sheet-danger",onClick:g[4]||(g[4]=R=>{Te.value=!1,o()})},[Ee(Xe,{name:"close",size:18}),g[14]||(g[14]=l("span",{class:"sheet-name"},"退出登录",-1))])])])):xe("",!0),Le.value?(E(),D("div",{key:1,class:"msw-mask",onClick:g[10]||(g[10]=sn(R=>Le.value=!1,["self"]))},[l("div",Rk,[l("div",Kk,[Ee(Xe,{name:"search",size:16,class:"msw-icon"}),$e(l("input",{ref_key:"msInput",ref:qe,class:"msw-input","onUpdate:modelValue":g[7]||(g[7]=R=>v.value=R),placeholder:"搜索工作记录与备忘录",onInput:$,onKeydown:g[8]||(g[8]=At(R=>Le.value=!1,["esc"]))},null,544),[[Me,v.value]]),l("button",{class:"icon-btn",onClick:g[9]||(g[9]=R=>{U(),Le.value=!1})},[Ee(Xe,{name:"close",size:16})])]),l("div",Fk,[S.value?(E(),D(je,{key:0},[m.value.logs.length?(E(),D("div",Nk,"工作记录")):xe("",!0),(E(!0),D(je,null,ot(m.value.logs,R=>(E(),D("div",{key:"l"+R.id,class:"msw-item",onMousedown:sn(le=>it(R),["prevent"])},[l("span",Bk,ne(Ut(Zo)(R.category)),1),l("span",Uk,ne(R.content),1),l("span",qk,ne(R.date),1)],40,Vk))),128)),m.value.memos.length?(E(),D("div",Hk,"备忘录")):xe("",!0),(E(!0),D(je,null,ot(m.value.memos,R=>(E(),D("div",{key:"m"+R.id,class:"msw-item",onMousedown:sn(le=>Ge(R),["prevent"])},[l("span",zk,ne(R.title||"无标题"),1),l("span",Gk,ne(R.content),1)],40,Wk))),128))],64)):v.value.trim()?(E(),D("div",Yk,"无匹配结果")):xe("",!0)])])])):xe("",!0)]),l("div",Jk,[Ee(Ev,{name:"toast"},{default:fr(()=>[(E(!0),D(je,null,ot(Ut(t),R=>(E(),D("div",{key:R.id,class:"toast"},ne(R.text),1))),128))]),_:1})])])):(E(),Pt(ak,{key:0,onLogin:s}))}}}),Qk=Wt(Xk,[["__scopeId","data-v-214bbb7a"]]);function Ko(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",o=>{o.target===n&&n.parentElement&&n.parentElement.removeChild(n)}),document.body.appendChild(n));const s=document.createElement("div");s.style.cssText="border:1px solid #E5484D;border-radius:8px;padding:12px;margin-bottom:12px;word-break:break-all;white-space:pre-wrap;",s.textContent=e+` +`+t,n.appendChild(s)}catch{}}async function Zk(){const e=await Uh();e&&oi(e.userId);const t=Vv(Qk);t.config.errorHandler=(n,s,o)=>{const a=n;Ko("应用内部错误(点击空白处关闭,请将以下内容发送给开发者)",a&&(a.stack||a.message)||String(n)+` +触发位置: `+o)},window.addEventListener("unhandledrejection",n=>{const s=n.reason;Ko("未处理的异步错误(点击空白处关闭)",s&&(s.stack||s.message)||String(n.reason))}),window.addEventListener("error",n=>{n.message&&n.message!=="ResizeObserver loop limit exceeded"&&Ko("运行错误(点击空白处关闭)",n.message)}),t.mount("#app"),"serviceWorker"in navigator&&location.protocol.startsWith("http")&&window.addEventListener("load",()=>{navigator.serviceWorker.register("sw.js").catch(()=>{})})}Zk().catch(e=>{Ko("无法启动:连接同步服务器失败",e&&(e.stack||e.message)||String(e))});export{Md as W,Pd as _,db as b,Od as r}; diff --git a/intern-log/dist/assets/index-DPm5Ta-6.js b/intern-log/dist/assets/index-mjHPY1ZN.js similarity index 69% rename from intern-log/dist/assets/index-DPm5Ta-6.js rename to intern-log/dist/assets/index-mjHPY1ZN.js index 7ed4bce..9b0356b 100644 --- a/intern-log/dist/assets/index-DPm5Ta-6.js +++ b/intern-log/dist/assets/index-mjHPY1ZN.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./web-XtLEyZTQ.js","./index-BMAz2lN3.js","./index-DUPSAEmu.css"])))=>i.map(i=>d[i]); -import{r as s,_ as i}from"./index-BMAz2lN3.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-XtLEyZTQ.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-D6Z8f91T.js","./index-CnCk6ytG.js","./index-2EGKD3r-.css"])))=>i.map(i=>d[i]); +import{r as s,_ as i}from"./index-CnCk6ytG.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-D6Z8f91T.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/web-XtLEyZTQ.js b/intern-log/dist/assets/web-D6Z8f91T.js similarity index 98% rename from intern-log/dist/assets/web-XtLEyZTQ.js rename to intern-log/dist/assets/web-D6Z8f91T.js index e441038..cdcadc8 100644 --- a/intern-log/dist/assets/web-XtLEyZTQ.js +++ b/intern-log/dist/assets/web-D6Z8f91T.js @@ -1 +1 @@ -import{W as P,b as x}from"./index-BMAz2lN3.js";import{Encoding as E}from"./index-DPm5Ta-6.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-CnCk6ytG.js";import{Encoding as E}from"./index-mjHPY1ZN.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 bce7fb8..6c2c2e4 100644 --- a/intern-log/dist/index.html +++ b/intern-log/dist/index.html @@ -8,8 +8,8 @@ 实习工作日志 - - + +
diff --git a/intern-log/src/App.vue b/intern-log/src/App.vue index 2039a84..6d713ce 100644 --- a/intern-log/src/App.vue +++ b/intern-log/src/App.vue @@ -9,6 +9,7 @@ import LedgerView from './views/LedgerView.vue' import MemoView from './views/MemoView.vue' import VaultView from './views/VaultView.vue' import SettingsView from './views/SettingsView.vue' +import UserAdminView from './views/UserAdminView.vue' import LoginView from './views/LoginView.vue' import { getSession, logoutUser, openUserDatabase, type Session } from './db/auth' import { autoSyncNow, enableRealtimeSync, ensureCloudBinding, stopRealtime } from './sync/engine' @@ -116,23 +117,36 @@ const VIEWS = [ { key: 'ledger', name: '记账', icon: 'wallet' }, { key: 'memo', name: '备忘录', icon: 'memo' }, { key: 'vault', name: '密码库', icon: 'lock' }, - { key: 'settings', name: '设置', icon: 'settings' } + { key: 'settings', name: '设置', icon: 'settings' }, + { key: 'admin', name: '用户管理', icon: 'shield' } ] function readRoute(): string { const h = (location.hash || '').replace('#/', '') - return VIEWS.some(v => v.key === h) ? h : 'calendar' + if (!VIEWS.some(v => v.key === h)) return 'calendar' + if (h === 'admin' && (getSession()?.username || '') !== 'xionglin') return 'calendar' + return h } const route = ref(readRoute()) window.addEventListener('hashchange', () => { route.value = readRoute() }) function nav(key: string) { location.hash = '#/' + key } const current = computed(() => VIEWS.find(v => v.key === route.value) || VIEWS[0]) +// ---- 用户管理:仅管理员 xionglin 可见 ---- +const isAdminUser = computed(() => (session.value?.username || '') === 'xionglin') +const shownViews = computed(() => isAdminUser.value ? VIEWS : VIEWS.filter(v => v.key !== 'admin')) +const moreViews = computed(() => { + const list = VIEWS.filter(v => !TAB_KEYS.includes(v.key)) + return isAdminUser.value ? list : list.filter(v => v.key !== 'admin') +}) +const isMoreActive = computed(() => moreViews.value.some(v => v.key === route.value)) +watch([isAdminUser, route], () => { + if (route.value === 'admin' && !isAdminUser.value) nav('calendar') +}, { immediate: true }) + // 手机端底部标签页:4 个主功能 + 「更多」弹层(统计/总结/密码库/设置/退出) const TAB_KEYS = ['calendar', 'today', 'ledger', 'memo'] const TABS = VIEWS.filter(v => TAB_KEYS.includes(v.key)) -const MORE_VIEWS = VIEWS.filter(v => !TAB_KEYS.includes(v.key)) -const isMoreActive = computed(() => MORE_VIEWS.some(v => v.key === route.value)) const moreOpen = ref(false) function navFromSheet(key: string) { moreOpen.value = false; nav(key) } @@ -220,7 +234,7 @@ onMounted(async () => {
@@ -304,7 +319,7 @@ onMounted(async () => {
{{ session?.username }}
-