From aaf8ea602cd026726c010d1317ccc50ebb9d48cb Mon Sep 17 00:00:00 2001 From: root Date: Fri, 16 Oct 2026 15:06:21 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=BE=93=E5=85=A5=E6=A0=A1=E9=AA=8C?= =?UTF-8?q?=E7=BB=9F=E4=B8=80=E5=AD=97=E7=AC=A6=E4=B8=B2=E9=98=B2=E5=BE=A1?= =?UTF-8?q?=EF=BC=88=E6=95=B0=E5=AD=97=E8=BE=93=E5=85=A5=E4=B8=8D=E5=86=8D?= =?UTF-8?q?=E5=BC=95=E5=8F=91=20trim=20=E7=B1=BB=E5=9E=8B=E5=B4=A9?= =?UTF-8?q?=E6=BA=83=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{index-fvhfb3wJ.js => index-BzA9f9V8.js} | 4 +-- intern-log/dist/assets/index-WHahwity.js | 26 +++++++++++++++++++ ...{index-B9eVtom_.css => index-_AL8y0Nb.css} | 2 +- intern-log/dist/assets/index-o1hiWX9Y.js | 26 ------------------- .../{web-C9gz15N3.js => web-B9VoRh8-.js} | 2 +- intern-log/dist/index.html | 4 +-- .../src/components/TransactionDialog.vue | 7 ++--- intern-log/src/views/LedgerView.vue | 11 +++++--- 8 files changed, 43 insertions(+), 39 deletions(-) rename intern-log/dist/assets/{index-fvhfb3wJ.js => index-BzA9f9V8.js} (69%) create mode 100644 intern-log/dist/assets/index-WHahwity.js rename intern-log/dist/assets/{index-B9eVtom_.css => index-_AL8y0Nb.css} (87%) delete mode 100644 intern-log/dist/assets/index-o1hiWX9Y.js rename intern-log/dist/assets/{web-C9gz15N3.js => web-B9VoRh8-.js} (98%) diff --git a/intern-log/dist/assets/index-fvhfb3wJ.js b/intern-log/dist/assets/index-BzA9f9V8.js similarity index 69% rename from intern-log/dist/assets/index-fvhfb3wJ.js rename to intern-log/dist/assets/index-BzA9f9V8.js index 91d4dab..9bb8625 100644 --- a/intern-log/dist/assets/index-fvhfb3wJ.js +++ b/intern-log/dist/assets/index-BzA9f9V8.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./web-C9gz15N3.js","./index-o1hiWX9Y.js","./index-B9eVtom_.css"])))=>i.map(i=>d[i]); -import{r as s,_ as i}from"./index-o1hiWX9Y.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-C9gz15N3.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-B9VoRh8-.js","./index-WHahwity.js","./index-_AL8y0Nb.css"])))=>i.map(i=>d[i]); +import{r as s,_ as i}from"./index-WHahwity.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-B9VoRh8-.js"),__vite__mapDeps([0,1,2]),import.meta.url).then(e=>new e.FilesystemWeb)});export{t as Directory,a as Encoding,E as Filesystem}; diff --git a/intern-log/dist/assets/index-WHahwity.js b/intern-log/dist/assets/index-WHahwity.js new file mode 100644 index 0000000..6eecaae --- /dev/null +++ b/intern-log/dist/assets/index-WHahwity.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 u of a.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&s(u)}).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 Fa(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const dt={},Ar=[],En=()=>{},Hu=()=>!1,ni=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),ri=e=>e.startsWith("onUpdate:"),Et=Object.assign,Na=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},of=Object.prototype.hasOwnProperty,it=(e,t)=>of.call(e,t),Ke=Array.isArray,sr=e=>Vs(e)==="[object Map]",Bn=e=>Vs(e)==="[object Set]",Wl=e=>Vs(e)==="[object Date]",Ye=e=>typeof e=="function",wt=e=>typeof e=="string",$n=e=>typeof e=="symbol",lt=e=>e!==null&&typeof e=="object",Wu=e=>(lt(e)||Ye(e))&&Ye(e.then)&&Ye(e.catch),zu=Object.prototype.toString,Vs=e=>zu.call(e),af=e=>Vs(e).slice(8,-1),Gu=e=>Vs(e)==="[object Object]",Va=e=>wt(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,bs=Fa(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),si=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},lf=/-\w/g,hn=si(e=>e.replace(lf,t=>t.slice(1).toUpperCase())),uf=/\B([A-Z])/g,dr=si(e=>e.replace(uf,"-$1").toLowerCase()),Yu=si(e=>e.charAt(0).toUpperCase()+e.slice(1)),Qi=si(e=>e?`on${Yu(e)}`:""),Cn=(e,t)=>!Object.is(e,t),Ao=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},oi=e=>{const t=parseFloat(e);return isNaN(t)?e:t},cf=e=>{const t=wt(e)?Number(e):NaN;return isNaN(t)?e:t};let zl;const ii=()=>zl||(zl=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function or(e){if(Ke(e)){const t={};for(let n=0;nn.startsWith("/*")?"":n).split(df).forEach(n=>{if(n){const s=n.split(ff);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function tt(e){let t="";if(wt(e))t=e;else if(Ke(e))for(let n=0;nUn(n,t))}const Qu=e=>!!(e&&e.__v_isRef===!0),ne=e=>wt(e)?e:e==null?"":Ke(e)||lt(e)&&(e.toString===zu||!Ye(e.toString))?Qu(e)?ne(e.value):JSON.stringify(e,Zu,2):String(e),Zu=(e,t)=>Qu(t)?Zu(e,t.value):sr(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,o],a)=>(n[Zi(s,a)+" =>"]=o,n),{})}:Bn(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Zi(n))}:$n(t)?Zi(t):lt(t)&&!Ke(t)&&!Gu(t)?String(t):t,Zi=(e,t="")=>{var n;return $n(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 Mt;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&&Mt&&(Mt.active?(this.parent=Mt,this.index=(Mt.scopes||(Mt.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(Mt===this)Mt=this.prevScope;else{let t=Mt;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(_s){let t=_s;for(_s=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;ws;){let t=ws;for(ws=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 rc(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function sc(e){let t,n=e.depsTail,s=n;for(;s;){const o=s.prevDep;s.version===-1?(s===n&&(n=o),Ha(s),_f(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=o}e.deps=t,e.depsTail=n}function ma(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(oc(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function oc(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===As)||(e.globalVersion=As,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!ma(e))))return;e.flags|=2;const t=e.dep,n=ht,s=vn;ht=e,vn=!0;try{rc(e);const o=e.fn(e._value);(t.version===0||Cn(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{ht=n,vn=s,sc(e),e.flags&=-3}}function Ha(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)Ha(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 vn=!0;const ic=[];function An(){ic.push(vn),vn=!1}function Tn(){const e=ic.pop();vn=e===void 0?!0:e}function Jl(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=ht;ht=void 0;try{t()}finally{ht=n}}}let As=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 Wa{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!ht||!vn||ht===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==ht)n=this.activeLink=new kf(ht,this),ht.deps?(n.prevDep=ht.depsTail,ht.depsTail.nextDep=n,ht.depsTail=n):ht.deps=ht.depsTail=n,ac(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const s=n.nextDep;s.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=s),n.prevDep=ht.depsTail,n.nextDep=void 0,ht.depsTail.nextDep=n,ht.depsTail=n,ht.deps===n&&(ht.deps=s)}return n}trigger(t){this.version++,As++,this.notify(t)}notify(t){Ua();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{qa()}}}function ac(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)ac(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const ya=new WeakMap,Tr=Symbol(""),ga=Symbol(""),Ts=Symbol("");function Kt(e,t,n){if(vn&&ht){let s=ya.get(e);s||ya.set(e,s=new Map);let o=s.get(n);o||(s.set(n,o=new Wa),o.map=s,o.key=n),o.track()}}function Rn(e,t,n,s,o,a){const u=ya.get(e);if(!u){As++;return}const f=h=>{h&&h.trigger()};if(Ua(),t==="clear")u.forEach(f);else{const h=Ke(e),y=h&&Va(n);if(h&&n==="length"){const m=Number(s);u.forEach((k,x)=>{(x==="length"||x===Ts||!$n(x)&&x>=m)&&f(k)})}else switch((n!==void 0||u.has(void 0))&&f(u.get(n)),y&&f(u.get(Ts)),t){case"add":h?y&&f(u.get("length")):(f(u.get(Tr)),sr(e)&&f(u.get(ga)));break;case"delete":h||(f(u.get(Tr)),sr(e)&&f(u.get(ga)));break;case"set":sr(e)&&f(u.get(Tr));break}}qa()}function qr(e){const t=ot(e);return t===e||(Kt(t,"iterate",Ts),ln(e))?t:Pn(e)?ir(e)?t.map(n=>ar(un(n))):t.map(ar):t.map(un)}function ai(e){return Kt(e=ot(e),"iterate",Ts),e}function _n(e,t){return Pn(e)?ar(ir(e)?un(t):t):un(t)}const xf={__proto__:null,[Symbol.iterator](){return ta(this,Symbol.iterator,e=>_n(this,e))},concat(...e){return qr(this).concat(...e.map(t=>Ke(t)?qr(t):t))},entries(){return ta(this,"entries",e=>(e[1]=_n(this,e[1]),e))},every(e,t){return In(this,"every",e,t,void 0,arguments)},filter(e,t){return In(this,"filter",e,t,n=>n.map(s=>_n(this,s)),arguments)},find(e,t){return In(this,"find",e,t,n=>_n(this,n),arguments)},findIndex(e,t){return In(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return In(this,"findLast",e,t,n=>_n(this,n),arguments)},findLastIndex(e,t){return In(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return In(this,"forEach",e,t,void 0,arguments)},includes(...e){return na(this,"includes",e)},indexOf(...e){return na(this,"indexOf",e)},join(e){return qr(this).join(e)},lastIndexOf(...e){return na(this,"lastIndexOf",e)},map(e,t){return In(this,"map",e,t,void 0,arguments)},pop(){return ps(this,"pop")},push(...e){return ps(this,"push",e)},reduce(e,...t){return Ql(this,"reduce",e,t)},reduceRight(e,...t){return Ql(this,"reduceRight",e,t)},shift(){return ps(this,"shift")},some(e,t){return In(this,"some",e,t,void 0,arguments)},splice(...e){return ps(this,"splice",e)},toReversed(){return qr(this).toReversed()},toSorted(e){return qr(this).toSorted(e)},toSpliced(...e){return qr(this).toSpliced(...e)},unshift(...e){return ps(this,"unshift",e)},values(){return ta(this,"values",e=>_n(this,e))}};function ta(e,t,n){const s=ai(e),o=s[t],a=o.call(s);if(s!==e&&!ln(e)){if(a[Symbol.toStringTag]==="Array Iterator"){const u=Object.create(Object.getPrototypeOf(a));return u.next=()=>Xl(a.next(),n),o!==lc[t]&&Object.defineProperties(u,{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}}}),u}a._next=a.next,a.next=()=>Xl(a._next(),n)}return a}function Xl(e,t){return e.done||(e.value=t(e.value)),e}const lc=Array.prototype;function In(e,t,n,s,o,a){const u=ai(e),f=u!==e&&!ln(e),h=u[t];if(h!==lc[t]){const k=h.apply(e,a);return f?un(k):k}let y=n;u!==e&&(f?y=function(k,x){return n.call(this,_n(e,k),x,e)}:n.length>2&&(y=function(k,x){return n.call(this,k,x,e)}));const m=h.call(u,y,s);return f&&o?o(m):m}function Ql(e,t,n,s){const o=ai(e),a=o!==e&&!ln(e);let u=n,f=!1;o!==e&&(a?(f=s.length===0,u=function(y,m,k){return f&&(f=!1,y=_n(e,y)),n.call(this,y,_n(e,m),k,e)}):n.length>3&&(u=function(y,m,k){return n.call(this,y,m,k,e)}));const h=o[t](u,...s);return f?_n(e,h):h}function na(e,t,n){const s=ot(e);Kt(s,"iterate",Ts);const o=s[t](...n);return(o===-1||o===!1)&&Ja(n[0])?(n[0]=ot(n[0]),s[t](...n)):o}function ps(e,t,n=[]){An(),Ua();const s=ot(e)[t].apply(e,n);return qa(),Tn(),s}const Cf=Fa("__proto__,__v_isRef,__isVue"),uc=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter($n));function Sf(e){$n(e)||(e=String(e));const t=ot(this);return Kt(t,"has",e),t.hasOwnProperty(e)}class cc{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:hc:a?pc:fc).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const u=Ke(t);if(!o){let h;if(u&&(h=xf[n]))return h;if(n==="hasOwnProperty")return Sf}const f=Reflect.get(t,n,Nt(t)?t:s);if(($n(n)?uc.has(n):Cf(n))||(o||Kt(t,"get",n),a))return f;if(Nt(f)){const h=u&&Va(n)?f:f.value;return o&<(h)?wa(h):h}return lt(f)?o?wa(f):Ga(f):f}}class dc extends cc{constructor(t=!1){super(!1,t)}set(t,n,s,o){let a=t[n];const u=Ke(t)&&Va(n);if(!this._isShallow){const y=Pn(a);if(!ln(s)&&!Pn(s)&&(a=ot(a),s=ot(s)),!u&&Nt(a)&&!Nt(s))return y||(a.value=s),!0}const f=u?Number(n)e,_o=e=>Reflect.getPrototypeOf(e);function Pf(e,t,n){return function(...s){const o=this.__v_raw,a=ot(o),u=sr(a),f=e==="entries"||e===Symbol.iterator&&u,h=e==="keys"&&u,y=o[e](...s),m=n?ba:t?ar:un;return!t&&Kt(a,"iterate",h?ga:Tr),Et(Object.create(y),{next(){const{value:k,done:x}=y.next();return x?{value:k,done:x}:{value:f?[m(k[0]),m(k[1])]:m(k),done:x}}})}}function ko(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,u=ot(a),f=ot(o);e||(Cn(o,f)&&Kt(u,"get",o),Kt(u,"get",f));const{has:h}=_o(u),y=t?ba:e?ar:un;if(h.call(u,o))return y(a.get(o));if(h.call(u,f))return y(a.get(f));a!==u&&a.get(o)},get size(){const o=this.__v_raw;return!e&&Kt(ot(o),"iterate",Tr),o.size},has(o){const a=this.__v_raw,u=ot(a),f=ot(o);return e||(Cn(o,f)&&Kt(u,"has",o),Kt(u,"has",f)),o===f?a.has(o):a.has(o)||a.has(f)},forEach(o,a){const u=this,f=u.__v_raw,h=ot(f),y=t?ba:e?ar:un;return!e&&Kt(h,"iterate",Tr),f.forEach((m,k)=>o.call(a,y(m),y(k),u))}};return Et(n,e?{add:ko("add"),set:ko("set"),delete:ko("delete"),clear:ko("clear")}:{add(o){const a=ot(this),u=_o(a),f=ot(o),h=!t&&!ln(o)&&!Pn(o)?f:o;return u.has.call(a,h)||Cn(o,h)&&u.has.call(a,o)||Cn(f,h)&&u.has.call(a,f)||(a.add(h),Rn(a,"add",h,h)),this},set(o,a){!t&&!ln(a)&&!Pn(a)&&(a=ot(a));const u=ot(this),{has:f,get:h}=_o(u);let y=f.call(u,o);y||(o=ot(o),y=f.call(u,o));const m=h.call(u,o);return u.set(o,a),y?Cn(a,m)&&Rn(u,"set",o,a):Rn(u,"add",o,a),this},delete(o){const a=ot(this),{has:u,get:f}=_o(a);let h=u.call(a,o);h||(o=ot(o),h=u.call(a,o)),f&&f.call(a,o);const y=a.delete(o);return h&&Rn(a,"delete",o,void 0),y},clear(){const o=ot(this),a=o.size!==0,u=o.clear();return a&&Rn(o,"clear",void 0,void 0),u}}),["keys","values","entries",Symbol.iterator].forEach(o=>{n[o]=Pf(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(it(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 fc=new WeakMap,pc=new WeakMap,hc=new WeakMap,Df=new WeakMap;function Rf(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Ga(e){return Pn(e)?e:Ya(e,!1,$f,Mf,fc)}function Lf(e){return Ya(e,!1,Tf,If,pc)}function wa(e){return Ya(e,!0,Af,jf,hc)}function Ya(e,t,n,s,o){if(!lt(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 u=Rf(af(e));if(u===0)return e;const f=new Proxy(e,u===2?s:n);return o.set(e,f),f}function ir(e){return Pn(e)?ir(e.__v_raw):!!(e&&e.__v_isReactive)}function Pn(e){return!!(e&&e.__v_isReadonly)}function ln(e){return!!(e&&e.__v_isShallow)}function Ja(e){return e?!!e.__v_raw:!1}function ot(e){const t=e&&e.__v_raw;return t?ot(t):e}function Kf(e){return!it(e,"__v_skip")&&Object.isExtensible(e)&&Ju(e,"__v_skip",!0),e}const un=e=>lt(e)?Ga(e):e,ar=e=>lt(e)?wa(e):e;function Nt(e){return e?e.__v_isRef===!0:!1}function N(e){return Ff(e,!1)}function Ff(e,t){return Nt(e)?e:new Nf(e,t)}class Nf{constructor(t,n){this.dep=new Wa,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:ot(t),this._value=n?t:un(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||ln(t)||Pn(t);t=s?t:ot(t),Cn(t,n)&&(this._rawValue=t,this._value=s?t:un(t),this.dep.trigger())}}function Qt(e){return Nt(e)?e.value:e}const Vf={get:(e,t,n)=>t==="__v_raw"?e:Qt(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const o=e[t];return Nt(o)&&!Nt(n)?(o.value=n,!0):Reflect.set(e,t,n,s)}};function vc(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 Wa(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=As-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&ht!==this)return nc(this,!0),!0}get value(){const t=this.dep.track();return oc(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 Ye(e)?s=e:(s=e.get,o=e.set),new Bf(s,o,n)}const xo={},Ro=new WeakMap;let Sr;function qf(e,t=!1,n=Sr){if(n){let s=Ro.get(n);s||Ro.set(n,s=[]),s.push(e)}}function Hf(e,t,n=dt){const{immediate:s,deep:o,once:a,scheduler:u,augmentJob:f,call:h}=n,y=J=>o?J:ln(J)||o===!1||o===0?Ln(J,1):Ln(J);let m,k,x,C,M=!1,B=!1;if(Nt(e)?(k=()=>e.value,M=ln(e)):ir(e)?(k=()=>y(e),M=!0):Ke(e)?(B=!0,M=e.some(J=>ir(J)||ln(J)),k=()=>e.map(J=>{if(Nt(J))return J.value;if(ir(J))return y(J);if(Ye(J))return h?h(J,2):J()})):Ye(e)?t?k=h?()=>h(e,2):e:k=()=>{if(x){An();try{x()}finally{Tn()}}const J=Sr;Sr=m;try{return h?h(e,3,[C]):e(C)}finally{Sr=J}}:k=En,t&&o){const J=k,de=o===!0?1/0:o;k=()=>Ln(J(),de)}const re=wf(),ae=()=>{m.stop(),re&&re.active&&Na(re.effects,m)};if(a&&t){const J=t;t=(...de)=>{try{return J(...de)}finally{ae()}}}let T=B?new Array(e.length).fill(xo):xo;const S=J=>{if(!(!(m.flags&1)||!m.dirty&&!J))if(t){const de=m.run();if(J||o||M||(B?de.some((ie,ee)=>Cn(ie,T[ee])):Cn(de,T))){const ie=Sr;An();try{x&&x(),Sr=m;const ee=[de,T===xo?void 0:B&&T[0]===xo?[]:T,C];T=de,h?h(t,3,ee):t(...ee)}finally{Sr=ie,Tn()}}}else m.run()};return f&&f(S),m=new ec(k),m.scheduler=u?()=>u(S,!1):S,C=J=>qf(J,!1,m),x=m.onStop=()=>{const J=Ro.get(m);if(J){if(h)h(J,4);else for(const de of J)de();Ro.delete(m)}},t?s?S(!0):T=m.run():u?u(S.bind(null,!0),!0):m.run(),ae.pause=m.pause.bind(m),ae.resume=m.resume.bind(m),ae.stop=ae,ae}function Ln(e,t=1/0,n){if(t<=0||!lt(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Nt(e))Ln(e.value,t,n);else if(Ke(e))for(let s=0;s{Ln(s,t,n)});else if(Gu(e)){for(const s in e)Ln(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&Ln(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){li(o,t,n)}}function cn(e,t,n,s){if(Ye(e)){const o=Bs(e,t,n,s);return o&&Wu(o)&&o.catch(a=>{li(a,t,n)}),o}if(Ke(e)){const o=[];for(let a=0;a>>1,o=Wt[s],a=Ps(o);a=Ps(n)?Wt.push(e):Wt.splice(zf(t),0,e),e.flags|=1,yc()}}function yc(){Lo||(Lo=mc.then(wc))}function Gf(e){if(!Ke(e))tr&&e.id===-1?tr.splice(Hr+1,0,e):e.flags&1||(kn.push(e),e.flags|=1);else for(let t=0;t=t))continue;Wt.splice(s,1),s=e?s-1:pn,o.flags&4&&(o.flags&=-2),o(),o.flags&4||(o.flags&=-2)}}}function bc(e,t,n=0){if(kn.length){let s=kn,o=0;if(t){s=[];for(let u=0;uPs(u)-Ps(f));if(kn.length=o,tr){for(let u=0;ue.id==null?e.flags&2?-1:1/0:e.id;function wc(e){try{for(pn=0;pn{s._d&&Bo(-1);const a=Ko(t),u=Pr.length;let f;try{f=e(...o)}finally{for(let h=Pr.length;h>u;h--)Yc();Ko(a),s._d&&Bo(1)}return f};return s._n=!0,s._c=!0,s._d=!0,s}function $e(e,t){if(an===null)return e;const n=hi(an),s=e.dirs||(e.dirs=[]);for(let o=0;o1)return n&&Ye(t)?t.call(s&&s.proxy):t}}const Xf=Symbol.for("v-scx"),Qf=()=>To(Xf);function bt(e,t,n){return kc(e,t,n)}function kc(e,t,n=dt){const{immediate:s,deep:o,flush:a,once:u}=n,f=Et({},n),h=t&&s||!t&&a!=="post";let y;if(Rs){if(a==="sync"){const C=Qf();y=C.__watcherHandles||(C.__watcherHandles=[])}else if(!h){const C=()=>{};return C.stop=En,C.resume=En,C.pause=En,C}}const m=zt;f.call=(C,M,B)=>cn(C,m,M,B);let k=!1;a==="post"?f.scheduler=C=>{C.i=m,Ht(C,m&&m.suspense)}:a!=="sync"&&(k=!0,f.scheduler=(C,M)=>{M?C():Xa(C)}),f.augmentJob=C=>{t&&(C.flags|=4),k&&(C.flags|=2,m&&(C.id=m.uid,C.i=m))};const x=Hf(e,t,f);return Rs&&(y?y.push(x):h&&x()),x}function Zf(e,t,n){const s=this.proxy,o=wt(e)?e.includes(".")?xc(s,e):()=>s[e]:e.bind(s,s);let a;Ye(t)?a=t:(a=t.handler,n=t);const u=qs(this),f=kc(o,a.bind(s),n);return u(),f}function xc(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===""),Zl=e=>typeof SVGElement<"u"&&e instanceof SVGElement,eu=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,_a=(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,u,f,h,y){const{mc:m,pc:k,pbc:x,o:{insert:C,querySelector:M,createText:B,createComment:re,parentNode:ae}}=y,T=Er(t.props);let{dynamicChildren:S}=t;const J=(ee,P,j)=>{ee.shapeFlag&16&&m(ee.children,P,j,o,a,u,f,h)},de=(ee=t)=>{const P=Er(ee.props),j=ee.target=_a(ee.props,M),ce=ka(j,ee,B,C);j&&(u!=="svg"&&Zl(j)?u="svg":u!=="mathml"&&eu(j)&&(u="mathml"),o&&o.isCE&&(o.ce._teleportTargets||(o.ce._teleportTargets=new Set)).add(j),P||(J(ee,j,ce),ms(ee,!1)))},ie=ee=>{const P=()=>{if(Zn.get(ee)===P){if(Zn.delete(ee),Er(ee.props)){const j=ae(ee.el)||n;J(ee,j,ee.anchor),ms(ee,!0)}de(ee)}};Zn.set(ee,P),Ht(P,a)};if(e==null){const ee=t.el=B(""),P=t.anchor=B("");if(C(ee,n,s),C(P,n,s),ep(t.props)||a&&a.pendingBranch){ie(t);return}T&&(J(t,n,P),ms(t,!0)),de()}else{t.el=e.el;const ee=t.anchor=e.anchor,P=Zn.get(e);if(P){P.flags|=8,Zn.delete(e),ie(t);return}t.targetStart=e.targetStart;const j=t.target=e.target,ce=t.targetAnchor=e.targetAnchor,ke=Er(e.props),Y=ke?n:j,xe=ke?ee:ce;if(u==="svg"||Zl(j)?u="svg":(u==="mathml"||eu(j))&&(u="mathml"),S?(x(e.dynamicChildren,S,Y,o,a,u,f),tl(e,t,!0)):h||k(e,t,Y,xe,o,a,u,f,!1),T)ke?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Co(t,n,ee,y,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const Ve=_a(t.props,M);Ve&&(t.target=Ve,Co(t,Ve,null,y,0))}else ke&&Co(t,j,ce,y,1);ms(t,T)}},remove(e,t,n,{um:s,o:{remove:o}},a){const{shapeFlag:u,children:f,anchor:h,targetStart:y,targetAnchor:m,target:k,props:x}=e,C=Er(x),M=a||!C,B=Zn.get(e);if(B&&(B.flags|=8,Zn.delete(e)),k&&(o(y),o(m)),a&&o(h),!B&&(C||k)&&u&16)for(let re=0;re{e.isMounted=!0}),Mc(()=>{e.isUnmounting=!0}),e}const sn=[Function,Array],Ec={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:sn,onEnter:sn,onAfterEnter:sn,onEnterCancelled:sn,onBeforeLeave:sn,onLeave:sn,onAfterLeave:sn,onLeaveCancelled:sn,onBeforeAppear:sn,onAppear:sn,onAfterAppear:sn,onAppearCancelled:sn},rp={name:"BaseTransition",props:Ec,setup(e,{slots:t}){const n=nl(),s=Sc();return()=>{const o=t.default&&Qa(t.default(),!0),a=o&&o.length?$c(o):n.subTree?Ee():void 0;if(!a)return;const u=ot(e),{mode:f}=u;if(s.isLeaving)return sa(a);const h=Fo(a);if(!h)return sa(a);let y=Os(h,u,s,n,k=>y=k);h.type!==Ft&&lr(h,y);let m=n.subTree&&Fo(n.subTree);if(m&&m.type!==Ft&&!$r(m,h)&&Ms(n.subTree)){let k=Os(m,u,s,n);if(lr(m,k),f==="out-in"&&h.type!==Ft)return s.isLeaving=!0,k.afterLeave=()=>{s.isLeaving=!1,n.job.flags&8||n.update(),delete k.afterLeave,m=void 0},sa(a);f==="in-out"&&h.type!==Ft?k.delayLeave=(x,C,M)=>{const B=Ac(s,m);B[String(m.key)]=m,x[on]=()=>{C(),x[on]=void 0,delete y.delayedLeave,m=void 0},y.delayedLeave=()=>{M(),delete y.delayedLeave,m=void 0}}:m=void 0}else m&&(m=void 0);return a}}};function $c(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==Ft){t=n;break}}return t}const sp=rp;function Ac(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 Os(e,t,n,s,o){const{appear:a,mode:u,persisted:f=!1,onBeforeEnter:h,onEnter:y,onAfterEnter:m,onEnterCancelled:k,onBeforeLeave:x,onLeave:C,onAfterLeave:M,onLeaveCancelled:B,onBeforeAppear:re,onAppear:ae,onAfterAppear:T,onAppearCancelled:S}=t,J=String(e.key),de=Ac(n,e),ie=(j,ce)=>{j&&cn(j,s,9,ce)},ee=(j,ce)=>{const ke=ce[1];ie(j,ce),Ke(j)?j.every(Y=>Y.length<=1)&&ke():j.length<=1&&ke()},P={mode:u,persisted:f,beforeEnter(j){let ce=h;if(!n.isMounted)if(a)ce=re||h;else return;j[on]&&j[on](!0);const ke=de[J];if(ke&&$r(e,ke)){let Y=ke.el[on];if(!Y){const xe=Ms(ke);Y=xe&&xe.el[on]}Y&&Y()}ie(ce,[j])},enter(j){if(de[J]===e)return;let ce=y,ke=m,Y=k;if(!n.isMounted)if(a)ce=ae||y,ke=T||m,Y=S||k;else return;let xe=!1;j[hs]=rt=>{xe||(xe=!0,rt?ie(Y,[j]):ie(ke,[j]),P.delayedLeave&&P.delayedLeave(),j[hs]=void 0)};const Ve=j[hs].bind(null,!1);ce?ee(ce,[j,Ve]):Ve()},leave(j,ce){const ke=String(e.key);if(j[hs]&&j[hs](!0),n.isUnmounting)return ce();ie(x,[j]);let Y=!1;j[on]=Ve=>{Y||(Y=!0,ce(),Ve?ie(B,[j]):ie(M,[j]),j[on]=void 0,de[ke]===e&&delete de[ke])};const xe=j[on].bind(null,!1);de[ke]=e,C?ee(C,[j,xe]):xe()},clone(j){const ce=Os(j,t,n,s,o);return o&&o(ce),ce}};return P}function sa(e){if(ci(e))return e=ur(e),e.children=null,e}function Fo(e){if(!ci(e))return ui(e.type)&&e.children?$c(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&Ye(n.default))return n.default()}}function lr(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;const n=e.component.subTree;lr(ui(n.type)&&Fo(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===Le&&Ke(e.children)){const n=Lc(e.children,!1);n&&lr(n,t)}}function Qa(e,t=!1,n){let s=[],o=0;for(let a=0;a1)for(let a=0;aks(B,t&&(Ke(t)?t[re]:t),n,s,o));return}if(xs(s)&&!o){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&ks(e,t,n,s.component.subTree);return}const a=s.shapeFlag&4?hi(s.component):s.el,u=o?null:a,{i:f,r:h}=e,y=t&&t.r,m=f.refs===dt?f.refs={}:f.refs,k=f.setupState,x=ot(k),C=k===dt?Hu:B=>tu(m,B)?!1:it(x,B),M=(B,re)=>!(re&&tu(m,re));if(y!=null&&y!==h){if(nu(t),wt(y))m[y]=null,C(y)&&(k[y]=null);else if(Nt(y)){const B=t;M(y,B.k)&&(y.value=null),B.k&&(m[B.k]=null)}}if(Ye(h))Bs(h,f,12,[u,m]);else{const B=wt(h),re=Nt(h);if(B||re){const ae=()=>{if(e.f){const T=B?C(h)?k[h]:m[h]:M()||!e.k?h.value:m[e.k];if(o)Ke(T)&&Na(T,a);else if(Ke(T))T.includes(a)||T.push(a);else if(B)m[h]=[a],C(h)&&(k[h]=m[h]);else{const S=[a];M(h,e.k)&&(h.value=S),e.k&&(m[e.k]=S)}}else B?(m[h]=u,C(h)&&(k[h]=u)):re&&(M(h,e.k)&&(h.value=u),e.k&&(m[e.k]=u))};if(u){const T=()=>{ae(),No.delete(e)};T.id=-1,No.set(e,T),Ht(T,n)}else nu(e),ae()}}}function nu(e){const t=No.get(e);t&&(t.flags|=8,No.delete(e))}ii().requestIdleCallback;ii().cancelIdleCallback;const xs=e=>!!e.type.__asyncLoader,ci=e=>e.type.__isKeepAlive;function op(e,t){Pc(e,"a",t)}function ip(e,t){Pc(e,"da",t)}function Pc(e,t,n=zt){const s=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(di(t,s,n),n){let o=n.parent;for(;o&&o.parent;)ci(o.parent.vnode)&&ap(s,t,n,o),o=o.parent}}function ap(e,t,n,s){const o=di(t,e,s,!0);pr(()=>{Na(s[t],o)},n)}function di(e,t,n=zt,s=!1){if(n){const o=n[e]||(n[e]=[]),a=t.__weh||(t.__weh=(...u)=>{An();const f=qs(n),h=cn(t,n,e,u);return f(),Tn(),h});return s?o.unshift(a):o.push(a),a}}const qn=e=>(t,n=zt)=>{(!Rs||e==="sp")&&di(e,(...s)=>t(...s),n)},lp=qn("bm"),dn=qn("m"),up=qn("bu"),Oc=qn("u"),Mc=qn("bum"),pr=qn("um"),cp=qn("sp"),dp=qn("rtg"),fp=qn("rtc");function pp(e,t=zt){di("ec",e,t)}const hp=Symbol.for("v-ndc");function ct(e,t,n,s){let o;const a=n,u=Ke(e);if(u||wt(e)){const f=u&&ir(e);let h=!1,y=!1;f&&(h=!ln(e),y=Pn(e),e=ai(e)),o=new Array(e.length);for(let m=0,k=e.length;mt(f,h,void 0,a));else{const f=Object.keys(e);o=new Array(f.length);for(let h=0,y=f.length;he?Zc(e)?hi(e):xa(e.parent):null,Cs=Et(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=>xa(e.parent),$root:e=>xa(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>jc(e),$forceUpdate:e=>e.f||(e.f=()=>{Xa(e.update)}),$nextTick:e=>e.n||(e.n=ts.bind(e.proxy)),$watch:e=>Zf.bind(e)}),oa=(e,t)=>e!==dt&&!e.__isScriptSetup&&it(e,t),vp={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:o,props:a,accessCache:u,type:f,appContext:h}=e;if(t[0]!=="$"){const x=u[t];if(x!==void 0)switch(x){case 1:return s[t];case 2:return o[t];case 4:return n[t];case 3:return a[t]}else{if(oa(s,t))return u[t]=1,s[t];if(o!==dt&&it(o,t))return u[t]=2,o[t];if(it(a,t))return u[t]=3,a[t];if(n!==dt&&it(n,t))return u[t]=4,n[t];Ca&&(u[t]=0)}}const y=Cs[t];let m,k;if(y)return t==="$attrs"&&Kt(e.attrs,"get",""),y(e);if((m=f.__cssModules)&&(m=m[t]))return m;if(n!==dt&&it(n,t))return u[t]=4,n[t];if(k=h.config.globalProperties,it(k,t))return k[t]},set({_:e},t,n){const{data:s,setupState:o,ctx:a}=e;return oa(o,t)?(o[t]=n,!0):s!==dt&&it(s,t)?(s[t]=n,!0):it(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:u}},f){let h;return!!(n[f]||e!==dt&&f[0]!=="$"&&it(e,f)||oa(t,f)||it(a,f)||it(s,f)||it(Cs,f)||it(o.config.globalProperties,f)||(h=u.__cssModules)&&h[f])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:it(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function ru(e){return Ke(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let Ca=!0;function mp(e){const t=jc(e),n=e.proxy,s=e.ctx;Ca=!1,t.beforeCreate&&su(t.beforeCreate,e,"bc");const{data:o,computed:a,methods:u,watch:f,provide:h,inject:y,created:m,beforeMount:k,mounted:x,beforeUpdate:C,updated:M,activated:B,deactivated:re,beforeDestroy:ae,beforeUnmount:T,destroyed:S,unmounted:J,render:de,renderTracked:ie,renderTriggered:ee,errorCaptured:P,serverPrefetch:j,expose:ce,inheritAttrs:ke,components:Y,directives:xe,filters:Ve}=t;if(y&&yp(y,s,null),u)for(const We in u){const me=u[We];Ye(me)&&(s[We]=me.bind(n))}if(o){const We=o.call(n,n);lt(We)&&(e.data=Ga(We))}if(Ca=!0,a)for(const We in a){const me=a[We],Me=Ye(me)?me.bind(n,n):Ye(me.get)?me.get.bind(n,n):En,Fe=!Ye(me)&&Ye(me.set)?me.set.bind(n):En,De=at({get:Me,set:Fe});Object.defineProperty(s,We,{enumerable:!0,configurable:!0,get:()=>De.value,set:Ce=>De.value=Ce})}if(f)for(const We in f)Ic(f[We],s,n,We);if(h){const We=Ye(h)?h.call(n):h;Reflect.ownKeys(We).forEach(me=>{Jf(me,We[me])})}m&&su(m,e,"c");function He(We,me){Ke(me)?me.forEach(Me=>We(Me.bind(n))):me&&We(me.bind(n))}if(He(lp,k),He(dn,x),He(up,C),He(Oc,M),He(op,B),He(ip,re),He(pp,P),He(fp,ie),He(dp,ee),He(Mc,T),He(pr,J),He(cp,j),Ke(ce))if(ce.length){const We=e.exposed||(e.exposed={});ce.forEach(me=>{Object.defineProperty(We,me,{get:()=>n[me],set:Me=>n[me]=Me,enumerable:!0})})}else e.exposed||(e.exposed={});de&&e.render===En&&(e.render=de),ke!=null&&(e.inheritAttrs=ke),Y&&(e.components=Y),xe&&(e.directives=xe),j&&Tc(e)}function yp(e,t,n=En){Ke(e)&&(e=Sa(e));for(const s in e){const o=e[s];let a;lt(o)?"default"in o?a=To(o.from||s,o.default,!0):a=To(o.from||s):a=To(o),Nt(a)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>a.value,set:u=>a.value=u}):t[s]=a}}function su(e,t,n){cn(Ke(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function Ic(e,t,n,s){let o=s.includes(".")?xc(n,s):()=>n[s];if(wt(e)){const a=t[e];Ye(a)&&bt(o,a)}else if(Ye(e))bt(o,e.bind(n));else if(lt(e))if(Ke(e))e.forEach(a=>Ic(a,t,n,s));else{const a=Ye(e.handler)?e.handler.bind(n):t[e.handler];Ye(a)&&bt(o,a,e)}}function jc(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:o,optionsCache:a,config:{optionMergeStrategies:u}}=e.appContext,f=a.get(t);let h;return f?h=f:!o.length&&!n&&!s?h=t:(h={},o.length&&o.forEach(y=>Vo(h,y,u,!0)),Vo(h,t,u)),lt(t)&&a.set(t,h),h}function Vo(e,t,n,s=!1){const{mixins:o,extends:a}=t;a&&Vo(e,a,n,!0),o&&o.forEach(u=>Vo(e,u,n,!0));for(const u in t)if(!(s&&u==="expose")){const f=gp[u]||n&&n[u];e[u]=f?f(e[u],t[u]):t[u]}return e}const gp={data:ou,props:iu,emits:iu,methods:ys,computed:ys,beforeCreate:qt,created:qt,beforeMount:qt,mounted:qt,beforeUpdate:qt,updated:qt,beforeDestroy:qt,beforeUnmount:qt,destroyed:qt,unmounted:qt,activated:qt,deactivated:qt,errorCaptured:qt,serverPrefetch:qt,components:ys,directives:ys,watch:wp,provide:ou,inject:bp};function ou(e,t){return t?e?function(){return Et(Ye(e)?e.call(this,this):e,Ye(t)?t.call(this,this):t)}:t:e}function bp(e,t){return ys(Sa(e),Sa(t))}function Sa(e){if(Ke(e)){const t={};for(let n=0;nt==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${hn(t)}Modifiers`]||e[`${dr(t)}Modifiers`];function Cp(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||dt;let o=n;const a=t.startsWith("update:"),u=a&&xp(s,t.slice(7));u&&(u.trim&&(o=n.map(m=>wt(m)?m.trim():m)),u.number&&(o=o.map(oi)));let f,h=s[f=Qi(t)]||s[f=Qi(hn(t))];!h&&a&&(h=s[f=Qi(dr(t))]),h&&cn(h,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,cn(y,e,6,o)}}const Sp=new WeakMap;function Rc(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 u={},f=!1;if(!Ye(e)){const h=y=>{const m=Rc(y,t,!0);m&&(f=!0,Et(u,m))};!n&&t.mixins.length&&t.mixins.forEach(h),e.extends&&h(e.extends),e.mixins&&e.mixins.forEach(h)}return!a&&!f?(lt(e)&&s.set(e,null),null):(Ke(a)?a.forEach(h=>u[h]=null):Et(u,a),lt(e)&&s.set(e,u),u)}function fi(e,t){return!e||!ni(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),it(e,t[0].toLowerCase()+t.slice(1))||it(e,dr(t))||it(e,t))}function au(e){const{type:t,vnode:n,proxy:s,withProxy:o,propsOptions:[a],slots:u,attrs:f,emit:h,render:y,renderCache:m,props:k,data:x,setupState:C,ctx:M,inheritAttrs:B}=e,re=Ko(e);let ae,T;try{if(n.shapeFlag&4){const J=o||s,de=J;ae=xn(y.call(de,J,m,k,C,x,M)),T=f}else{const J=t;ae=xn(J.length>1?J(k,{attrs:f,slots:u,emit:h}):J(k,null)),T=t.props?f:Ep(f)}}catch(J){Pr.length=0,li(J,e,1),ae=Oe(Ft)}let S=ae;if(T&&B!==!1){const J=Object.keys(T),{shapeFlag:de}=S;J.length&&de&7&&(a&&J.some(ri)&&(T=$p(T,a)),S=ur(S,T,!1,!0))}if(n.dirs&&(S=ur(S,null,!1,!0),S.dirs=S.dirs?S.dirs.concat(n.dirs):n.dirs),n.transition){const J=ui(S.type)&&Fo(S)||S;lr(J,n.transition)}return ae=S,Ko(re),ae}function Lc(e,t=!0){let n;for(let s=0;s{let t;for(const n in e)(n==="class"||n==="style"||ni(n))&&((t||(t={}))[n]=e[n]);return t},$p=(e,t)=>{const n={};for(const s in e)(!ri(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function Ap(e,t,n){const{props:s,children:o,component:a}=e,{props:u,children:f,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?lu(s,u,y):!!u;if(h&8){const m=t.dynamicProps;for(let k=0;kObject.create(Fc),Vc=e=>Object.getPrototypeOf(e)===Fc;function Pp(e,t,n,s=!1){const o={},a=Nc();e.propsDefaults=Object.create(null),Bc(e,t,o,a);for(const u in e.propsOptions[0])u in o||(o[u]=void 0);n?e.props=s?o:Lf(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:u}}=e,f=ot(o),[h]=e.propsOptions;let y=!1;if((s||u>0)&&!(u&16)){if(u&8){const m=e.vnode.dynamicProps;for(let k=0;k{h=!0;const[x,C]=Uc(k,t,!0);Et(u,x),C&&f.push(...C)};!n&&t.mixins.length&&t.mixins.forEach(m),e.extends&&m(e.extends),e.mixins&&e.mixins.forEach(m)}if(!a&&!h)return lt(e)&&s.set(e,Ar),Ar;if(Ke(a))for(let m=0;me==="_"||e==="_ctx"||e==="$stable",el=e=>Ke(e)?e.map(xn):[xn(e)],Ip=(e,t,n)=>{if(t._n)return t;const s=fr((...o)=>el(t(...o)),n);return s._c=!1,s},qc=(e,t,n)=>{const s=e._ctx;for(const o in e){if(Za(o))continue;const a=e[o];if(Ye(a))t[o]=Ip(o,a,s);else if(a!=null){const u=el(a);t[o]=()=>u}}},Hc=(e,t)=>{const n=el(t);e.slots.default=()=>n},Wc=(e,t,n)=>{for(const s in t)(n||!Za(s))&&(e[s]=t[s])},jp=(e,t,n)=>{const s=e.slots=Nc();if(e.vnode.shapeFlag&32){const o=t._;o?(Wc(s,t,n),n&&Ju(s,"_",o,!0)):qc(t,s)}else t&&Hc(e,t)},Dp=(e,t,n)=>{const{vnode:s,slots:o}=e;let a=!0,u=dt;if(s.shapeFlag&32){const f=t._;f?n&&f===1?a=!1:Wc(o,t,n):(a=!t.$stable,qc(t,o)),u=t}else t&&(Hc(e,t),u={default:1});if(a)for(const f in o)!Za(f)&&u[f]==null&&delete o[f]},Ht=Np;function Rp(e){return Lp(e)}function Lp(e,t){const n=ii();n.__VUE__=!0;const{insert:s,remove:o,patchProp:a,createElement:u,createText:f,createComment:h,setText:y,setElementText:m,parentNode:k,nextSibling:x,setScopeId:C=En,insertStaticContent:M}=e,B=(w,g,O,le=null,se=null,ue=null,ye=void 0,oe=null,be=!!g.dynamicChildren)=>{if(w===g)return;w&&!$r(w,g)&&(le=ft(w),Ce(w,se,ue,!0),w=null),g.patchFlag===-2&&(be=!1,g.dynamicChildren=null),g.dynamicChildren&&w&&w.dynamicChildren&&w.dynamicChildren.hasOnce&&(g.dynamicChildren===Ar&&(g.dynamicChildren=[]),g.dynamicChildren.hasOnce=!0);const{type:W,ref:q,shapeFlag:G}=g;switch(W){case pi:re(w,g,O,le);break;case Ft:ae(w,g,O,le);break;case Po:w==null&&T(g,O,le,ye);break;case Le:Y(w,g,O,le,se,ue,ye,oe,be);break;default:G&1?de(w,g,O,le,se,ue,ye,oe,be):G&6?xe(w,g,O,le,se,ue,ye,oe,be):(G&64||G&128)&&W.process(w,g,O,le,se,ue,ye,oe,be,Jt)}q!=null&&se?ks(q,w&&w.ref,ue,g||w,!g):q==null&&w&&w.ref!=null&&ks(w.ref,null,ue,w,!0)},re=(w,g,O,le)=>{if(w==null)s(g.el=f(g.children),O,le);else{const se=g.el=w.el;g.children!==w.children&&y(se,g.children)}},ae=(w,g,O,le)=>{w==null?s(g.el=h(g.children||""),O,le):g.el=w.el},T=(w,g,O,le)=>{[w.el,w.anchor]=M(w.children,g,O,le,w.el,w.anchor)},S=({el:w,anchor:g},O,le)=>{let se;for(;w&&w!==g;)se=x(w),s(w,O,le),w=se;s(g,O,le)},J=({el:w,anchor:g})=>{let O;for(;w&&w!==g;)O=x(w),o(w),w=O;o(g)},de=(w,g,O,le,se,ue,ye,oe,be)=>{if(g.type==="svg"?ye="svg":g.type==="math"&&(ye="mathml"),w==null)ie(g,O,le,se,ue,ye,oe,be);else{const W=w.el&&w.el._isVueCE?w.el:null;try{W&&W._beginPatch(),j(w,g,se,ue,ye,oe,be)}finally{W&&W._endPatch()}}},ie=(w,g,O,le,se,ue,ye,oe)=>{let be,W;const{props:q,shapeFlag:G,transition:Ae,dirs:Ne}=w;if(be=w.el=u(w.type,ue,q&&q.is,q),G&8?m(be,w.children):G&16&&P(w.children,be,null,le,se,ia(w,ue),ye,oe),Ne&&kr(w,null,le,"created"),ee(be,w,w.scopeId,ye,le),q){for(const Xe in q)Xe!=="value"&&!bs(Xe)&&a(be,Xe,null,q[Xe],ue,le);"value"in q&&a(be,"value",null,q.value,ue),(W=q.onVnodeBeforeMount)&&gn(W,le,w)}Ne&&kr(w,null,le,"beforeMount");const Qe=Kp(se,Ae);Qe&&Ae.beforeEnter(be),s(be,g,O),((W=q&&q.onVnodeMounted)||Qe||Ne)&&Ht(()=>{try{W&&gn(W,le,w),Qe&&Ae.enter(be),Ne&&kr(w,null,le,"mounted")}finally{}},se)},ee=(w,g,O,le,se)=>{if(O&&C(w,O),le)for(let ue=0;ue{for(let W=be;W{const oe=g.el=w.el;let{patchFlag:be,dynamicChildren:W,dirs:q}=g;be|=w.patchFlag&16;const G=w.props||dt,Ae=g.props||dt;let Ne;if(O&&xr(O,!1),(Ne=Ae.onVnodeBeforeUpdate)&&gn(Ne,O,g,w),q&&kr(g,w,O,"beforeUpdate"),O&&xr(O,!0),W&&(!w.dynamicChildren||w.dynamicChildren.length!==W.length)&&(be=0,ye=!1,W=null),(G.innerHTML&&Ae.innerHTML==null||G.textContent&&Ae.textContent==null)&&m(oe,""),W?ce(w.dynamicChildren,W,oe,O,le,ia(g,se),ue):ye||me(w,g,oe,null,O,le,ia(g,se),ue,!1),be>0){if(be&16)ke(oe,G,Ae,O,se);else if(be&2&&G.class!==Ae.class&&a(oe,"class",null,Ae.class,se),be&4&&a(oe,"style",G.style,Ae.style,se),be&8){const Qe=g.dynamicProps;for(let Xe=0;Xe{Ne&&gn(Ne,O,g,w),q&&kr(g,w,O,"updated")},le)},ce=(w,g,O,le,se,ue,ye)=>{for(let oe=0;oe{if(g!==O){if(g!==dt)for(const ue in g)!bs(ue)&&!(ue in O)&&a(w,ue,g[ue],null,se,le);for(const ue in O){if(bs(ue))continue;const ye=O[ue],oe=g[ue];ye!==oe&&ue!=="value"&&a(w,ue,oe,ye,se,le)}"value"in O&&a(w,"value",g.value,O.value,se)}},Y=(w,g,O,le,se,ue,ye,oe,be)=>{const W=g.el=w?w.el:f(""),q=g.anchor=w?w.anchor:f("");let{patchFlag:G,dynamicChildren:Ae,slotScopeIds:Ne}=g;Ne&&(oe=oe?oe.concat(Ne):Ne),w==null?(s(W,O,le),s(q,O,le),P(g.children||[],O,q,se,ue,ye,oe,be)):G>0&&G&64&&Ae&&w.dynamicChildren&&w.dynamicChildren.length===Ae.length?(ce(w.dynamicChildren,Ae,O,se,ue,ye,oe),(g.key!=null||se&&g===se.subTree)&&tl(w,g,!0)):me(w,g,O,q,se,ue,ye,oe,be)},xe=(w,g,O,le,se,ue,ye,oe,be)=>{g.slotScopeIds=oe,w==null?g.shapeFlag&512?se.ctx.activate(g,O,le,ye,be):Ve(g,O,le,se,ue,ye,be):rt(w,g,be)},Ve=(w,g,O,le,se,ue,ye)=>{const oe=w.component=zp(w,le,se);if(ci(w)&&(oe.ctx.renderer=Jt),Gp(oe,!1,ye),oe.asyncDep){if(se&&se.registerDep(oe,He,ye,ue),!w.el){const be=oe.subTree=Oe(Ft);ae(null,be,g,O),w.placeholder=be.el}}else He(oe,w,g,O,se,ue,ye)},rt=(w,g,O)=>{const le=g.component=w.component;if(Ap(w,g,O))if(le.asyncDep&&!le.asyncResolved){g.el=w.el,g.placeholder=w.placeholder,We(le,g,O);return}else le.next=g,le.update();else g.el=w.el,g.placeholder=w.placeholder,le.vnode=g},He=(w,g,O,le,se,ue,ye)=>{const oe=()=>{if(w.isMounted){let{next:G,bu:Ae,u:Ne,parent:Qe,vnode:Xe}=w;{const Bt=zc(w);if(Bt){G&&(G.el=Xe.el,We(w,G,ye)),Bt.asyncDep.then(()=>{Ht(()=>{w.isUnmounted||W()},se)});return}}let Ze=G,mt;xr(w,!1),G?(G.el=Xe.el,We(w,G,ye)):G=Xe,Ae&&Ao(Ae),(mt=G.props&&G.props.onVnodeBeforeUpdate)&&gn(mt,Qe,G,Xe),xr(w,!0);const _t=au(w),Xt=w.subTree;w.subTree=_t,B(Xt,_t,k(Xt.el),ft(Xt),w,se,ue),G.el=_t.el,Ze===null&&Tp(w,_t.el),Ne&&Ht(Ne,se),(mt=G.props&&G.props.onVnodeUpdated)&&Ht(()=>gn(mt,Qe,G,Xe),se)}else{let G;const{el:Ae,props:Ne}=g,{bm:Qe,m:Xe,parent:Ze,root:mt,type:_t}=w,Xt=xs(g);xr(w,!1),Qe&&Ao(Qe),!Xt&&(G=Ne&&Ne.onVnodeBeforeMount)&&gn(G,Ze,g),xr(w,!0);{mt.ce&&mt.ce._hasShadowRoot()&&mt.ce._injectChildStyle(_t,w.parent?w.parent.type:void 0);const Bt=w.subTree=au(w);B(null,Bt,O,le,w,se,ue),g.el=Bt.el}if(Xe&&Ht(Xe,se),!Xt&&(G=Ne&&Ne.onVnodeMounted)){const Bt=g;Ht(()=>gn(G,Ze,Bt),se)}(g.shapeFlag&256||Ze&&xs(Ze.vnode)&&Ze.vnode.shapeFlag&256)&&w.a&&Ht(w.a,se),w.isMounted=!0,g=O=le=null}};w.scope.on();const be=w.effect=new ec(oe);w.scope.off();const W=w.update=be.run.bind(be),q=w.job=be.runIfDirty.bind(be);q.i=w,q.id=w.uid,be.scheduler=()=>Xa(q),xr(w,!0),W()},We=(w,g,O)=>{g.component=w;const le=w.vnode.props;w.vnode=g,w.next=null,Op(w,g.props,le,O),Dp(w,g.children,O),An(),gc(w),Tn()},me=(w,g,O,le,se,ue,ye,oe,be=!1)=>{const W=w&&w.children,q=w?w.shapeFlag:0,G=g.children,{patchFlag:Ae,shapeFlag:Ne}=g;if(Ae>0){if(Ae&128){Fe(W,G,O,le,se,ue,ye,oe,be);return}else if(Ae&256){Me(W,G,O,le,se,ue,ye,oe,be);return}}Ne&8?(q&16&&Be(W,se,ue),G!==W&&m(O,G)):q&16?Ne&16?Fe(W,G,O,le,se,ue,ye,oe,be):Be(W,se,ue,!0):(q&8&&m(O,""),Ne&16&&P(G,O,le,se,ue,ye,oe,be))},Me=(w,g,O,le,se,ue,ye,oe,be)=>{w=w||Ar,g=g||Ar;const W=w.length,q=g.length,G=Math.min(W,q);let Ae;for(Ae=0;Aeq?Be(w,se,ue,!0,!1,G):P(g,O,le,se,ue,ye,oe,be,G)},Fe=(w,g,O,le,se,ue,ye,oe,be)=>{let W=0;const q=g.length;let G=w.length-1,Ae=q-1;for(;W<=G&&W<=Ae;){const Ne=w[W],Qe=g[W]=be?Dn(g[W]):xn(g[W]);if($r(Ne,Qe))B(Ne,Qe,O,null,se,ue,ye,oe,be);else break;W++}for(;W<=G&&W<=Ae;){const Ne=w[G],Qe=g[Ae]=be?Dn(g[Ae]):xn(g[Ae]);if($r(Ne,Qe))B(Ne,Qe,O,null,se,ue,ye,oe,be);else break;G--,Ae--}if(W>G){if(W<=Ae){const Ne=Ae+1,Qe=NeAe)for(;W<=G;)Ce(w[W],se,ue,!0),W++;else{const Ne=W,Qe=W,Xe=new Map;for(W=Qe;W<=Ae;W++){const Ot=g[W]=be?Dn(g[W]):xn(g[W]);Ot.key!=null&&Xe.set(Ot.key,W)}let Ze,mt=0;const _t=Ae-Qe+1;let Xt=!1,Bt=0;const Zt=new Array(_t);for(W=0;W<_t;W++)Zt[W]=0;for(W=Ne;W<=G;W++){const Ot=w[W];if(mt>=_t){Ce(Ot,se,ue,!0);continue}let $t;if(Ot.key!=null)$t=Xe.get(Ot.key);else for(Ze=Qe;Ze<=Ae;Ze++)if(Zt[Ze-Qe]===0&&$r(Ot,g[Ze])){$t=Ze;break}$t===void 0?Ce(Ot,se,ue,!0):(Zt[$t-Qe]=W+1,$t>=Bt?Bt=$t:Xt=!0,B(Ot,g[$t],O,null,se,ue,ye,oe,be),mt++)}const hr=Xt?Fp(Zt):Ar;for(Ze=hr.length-1,W=_t-1;W>=0;W--){const Ot=Qe+W,$t=g[Ot],Ie=g[Ot+1],Hn=Ot+1{const{el:ue,type:ye,transition:oe,children:be,shapeFlag:W}=w;if(W&6){De(w.component.subTree,g,O,le);return}if(W&128){w.suspense.move(g,O,le);return}if(W&64){ye.move(w,g,O,Jt);return}if(ye===Le){s(ue,g,O);for(let G=0;Goe.enter(ue),se));else{const{leave:G,delayLeave:Ae,afterLeave:Ne}=oe,Qe=()=>{w.ctx.isUnmounted?o(ue):s(ue,g,O)},Xe=()=>{const Ze=ue._isLeaving||!!ue[on];ue._isLeaving&&ue[on](!0),oe.persisted&&!Ze?Qe():G(ue,()=>{Qe(),Ne&&Ne()})};Ae?Ae(ue,Qe,Xe):Xe()}else s(ue,g,O)},Ce=(w,g,O,le=!1,se=!1)=>{const{type:ue,props:ye,ref:oe,children:be,dynamicChildren:W,shapeFlag:q,patchFlag:G,dirs:Ae,cacheIndex:Ne,memo:Qe}=w;if((G===-2||W&&W.hasOnce)&&(se=!1),oe!=null&&(An(),ks(oe,null,O,w,!0),Tn()),Ne!=null&&(!w.ctx||w.ctx===g)&&(g.renderCache[Ne]=void 0),q&256){g.ctx.deactivate(w);return}const Xe=q&1&&Ae,Ze=!xs(w);let mt;if(Ze&&(mt=ye&&ye.onVnodeBeforeUnmount)&&gn(mt,g,w),q&6)_e(w.component,O,le);else{if(q&128){w.suspense.unmount(O,le);return}Xe&&kr(w,null,g,"beforeUnmount"),q&64?w.type.remove(w,g,O,Jt,le):W&&!W.hasOnce&&(ue!==Le||G>0&&G&64)?Be(W,g,O,!1,!0):(ue===Le&&G&384||!se&&q&16)&&Be(be,g,O),le&&X(w)}const _t=Qe!=null&&Ne==null;(Ze&&(mt=ye&&ye.onVnodeUnmounted)||Xe||_t)&&Ht(()=>{mt&&gn(mt,g,w),Xe&&kr(w,null,g,"unmounted"),_t&&(w.el=null)},O)},X=w=>{const{type:g,el:O,anchor:le,transition:se}=w,ue=g===Le;if(ue&&!se){Z(O,le);return}if(g===Po){J(w),se&&!se.persisted&&se.afterLeave&&se.afterLeave();return}const ye=ue?Ms(w):w,oe=()=>{ue?k(O)&&Z(O,le):o(O),se&&!se.persisted&&se.afterLeave&&se.afterLeave()};if(ye&&ye.shapeFlag&1&&se&&!se.persisted){const{leave:be,delayLeave:W}=se,q=ye.el,G=()=>be(q,oe);W?W(q,oe,G):G()}else oe()},Z=(w,g)=>{let O;for(;w!==g;)O=x(w),o(w),w=O;o(g)},_e=(w,g,O)=>{const{bum:le,scope:se,job:ue,subTree:ye,um:oe,m:be,a:W}=w;cu(be),cu(W),le&&Ao(le),se.stop(),ue?(ue.flags|=8,Ce(ye,w,g,O)):w.vnode.el&&ye&&(ye.transition=w.vnode.transition,Ce(ye,w,g,O)),oe&&Ht(oe,g),Ht(()=>{w.isUnmounted=!0},g)},Be=(w,g,O,le=!1,se=!1,ue=0)=>{for(let ye=ue;ye{if(w.shapeFlag&6)return ft(w.component.subTree);if(w.shapeFlag&128)return w.suspense.next();const g=x(w.anchor||w.el),O=g&&g[Cc];return O?x(O):g},Yt=(w,g,O)=>{const le=w&&g._vnode?void 0:w&&w.component?w.component.uid:Wp();Yf(()=>{w==null?g._vnode&&Ce(g._vnode,null,null,!0):B(g._vnode||null,w,g,null,null,null,O),g._vnode=w},le)},Jt={p:B,um:Ce,m:De,r:X,mt:Ve,mc:P,pc:me,pbc:ce,n:ft,o:e};return{render:Yt,hydrate:void 0,createApp:kp(Yt)}}function ia({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 tl(e,t,n=!1){const s=e.children,o=t.children;if(Ke(s)&&Ke(o))for(let a=0;a>1,e[n[f]]0&&(t[s]=n[a-1]),n[a]=s)}}for(a=n.length,u=n[a-1];a-- >0;)n[a]=u,u=t[u];return n}function zc(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:zc(t)}function cu(e){if(e)for(let t=0;te.__isSuspense;function Np(e,t){t&&t.pendingBranch?Ke(e)?t.effects.push(...e):t.effects.push(e):Gf(e)}const Le=Symbol.for("v-fgt"),pi=Symbol.for("v-txt"),Ft=Symbol.for("v-cmt"),Po=Symbol.for("v-stc"),Pr=[];let rn=null;function F(e=!1){Pr.push(rn=e?null:[])}function Yc(){Pr.pop(),rn=Pr[Pr.length-1]||null}let Is=1;function Bo(e,t=!1){Is+=e,e<0&&rn&&t&&(rn.hasOnce=!0)}function Jc(e){return e.dynamicChildren=Is>0?rn||Ar:null,Yc(),Is>0&&rn&&rn.push(e),e}function H(e,t,n,s,o,a){return Jc(c(e,t,n,s,o,a,!0))}function It(e,t,n,s,o){return Jc(Oe(e,t,n,s,o,!0))}function js(e){return e?e.__v_isVNode===!0:!1}function $r(e,t){return e.type===t.type&&e.key===t.key}const Xc=({key:e})=>e??null,Oo=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?wt(e)||Nt(e)||Ye(e)?{i:an,r:e,k:t,f:!!n}:e:null);function c(e,t=null,n=null,s=0,o=null,a=e===Le?0:1,u=!1,f=!1){const h={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Xc(t),ref:t&&Oo(t),scopeId:_c,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:an};return f?(Uo(h,n),a&128&&e.normalize(h)):n&&(h.shapeFlag|=wt(n)?8:16),Is>0&&!u&&rn&&(h.patchFlag>0||a&6)&&h.patchFlag!==32&&rn.push(h),h}const Oe=Vp;function Vp(e,t=null,n=null,s=0,o=null,a=!1){if((!e||e===hp)&&(e=Ft),js(e)){const f=ur(e,t,!0);return n&&Uo(f,n),Is>0&&!a&&rn&&(f.shapeFlag&6?rn[rn.indexOf(e)]=f:rn.push(f)),f.patchFlag=-2,f}if(Qp(e)&&(e=e.__vccOpts),t){t=Bp(t);let{class:f,style:h}=t;f&&!wt(f)&&(t.class=tt(f)),lt(h)&&(Ja(h)&&!Ke(h)&&(h=Et({},h)),t.style=or(h))}const u=wt(e)?1:Gc(e)?128:ui(e)?64:lt(e)?4:Ye(e)?2:0;return c(e,t,n,s,o,u,a,!0)}function Bp(e){return e?Ja(e)||Vc(e)?Et({},e):e:null}function ur(e,t,n=!1,s=!1){const{props:o,ref:a,patchFlag:u,children:f,transition:h}=e,y=t?qp(o||{},t):o,m={__v_isVNode:!0,__v_skip:!0,type:e.type,props:y,key:y&&Xc(y),ref:t&&t.ref?n&&a?Ke(a)?a.concat(Oo(t)):[a,Oo(t)]:Oo(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!==Le?u===-1?16:u|16:u,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:h,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&ur(e.ssContent),ssFallback:e.ssFallback&&ur(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce,cacheIndex:e.cacheIndex};return h&&s&&lr(m,h.clone(m)),m}function nn(e=" ",t=0){return Oe(pi,null,e,t)}function Up(e,t){const n=Oe(Po,null,e);return n.staticCount=t,n}function Ee(e="",t=!1){return t?(F(),It(Ft,null,e)):Oe(Ft,null,e)}function xn(e){return e==null||typeof e=="boolean"?Oe(Ft):Ke(e)?Oe(Le,null,e.slice()):js(e)?Dn(e):Oe(pi,null,String(e))}function Dn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:ur(e)}function Uo(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(Ke(t))n=16;else if(typeof t=="object")if(s&65){const o=t.default;o&&(o._c&&(o._d=!1),Uo(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!Vc(t)?t._ctx=an:o===3&&an&&(an.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(Ye(t)){if(s&65){Uo(e,{default:t});return}t={default:t,_ctx:an},n=32}else t=String(t),s&64?(n=16,t=[nn(t)]):n=8;e.children=t,e.shapeFlag|=n}function qp(...e){const t={};for(let n=0;nzt||an;let qo,Ds;{const e=ii(),t=(n,s)=>{let o;return(o=e[n])||(o=e[n]=[]),o.push(s),a=>{o.length>1?o.forEach(u=>u(a)):o[0](a)}};qo=t("__VUE_INSTANCE_SETTERS__",n=>zt=n),Ds=t("__VUE_SSR_SETTERS__",n=>Rs=n)}const qs=e=>{const t=zt;return qo(e),e.scope.on(),()=>{e.scope.off(),qo(t)}},du=()=>{zt&&zt.scope.off(),qo(null)};function Zc(e){return e.vnode.shapeFlag&4}let Rs=!1;function Gp(e,t=!1,n=!1){t&&Ds(t);const{props:s,children:o}=e.vnode,a=Zc(e);Pp(e,s,a,t),jp(e,o,n||t);const u=a?Yp(e,t):void 0;return t&&Ds(!1),u}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),u=Bs(s,e,0,[e.props,o]),f=Wu(u);if(Tn(),a(),(f||e.sp)&&!xs(e)&&Tc(e),f){if(u.then(du,du),t)return u.then(h=>{Ds(!0);try{fu(e,h,t)}finally{Ds(!1)}}).catch(h=>{li(h,e,0)});e.asyncDep=u}else fu(e,u)}else ed(e)}function fu(e,t,n){Ye(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:lt(t)&&(e.setupState=vc(t)),ed(e)}function ed(e,t,n){const s=e.type;e.render||(e.render=s.render||En);{const o=qs(e);An();try{mp(e)}finally{Tn(),o()}}}const Jp={get(e,t){return Kt(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 hi(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(vc(Kf(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Cs)return Cs[n](e)},has(t,n){return n in t||n in Cs}})):e.proxy}function Qp(e){return Ye(e)&&"__vccOpts"in e}const at=(e,t)=>Uf(e,t,Rs);function Zp(e,t,n){try{Bo(-1);const s=arguments.length;return s===2?lt(t)&&!Ke(t)?js(t)?Oe(e,null,[t]):Oe(e,t):Oe(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&js(n)&&(n=[n]),Oe(e,t,n))}finally{Bo(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 pu=typeof window<"u"&&window.trustedTypes;if(pu)try{Aa=pu.createPolicy("vue",{createHTML:e=>e})}catch{}const td=Aa?e=>Aa.createHTML(e):e=>e,th="http://www.w3.org/2000/svg",nh="http://www.w3.org/1998/Math/MathML",jn=typeof document<"u"?document:null,hu=jn&&jn.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"?jn.createElementNS(th,e):t==="mathml"?jn.createElementNS(nh,e):n?jn.createElement(e,{is:n}):jn.createElement(e);return e==="select"&&s&&s.multiple!=null&&o.setAttribute("multiple",s.multiple),o},createText:e=>jn.createTextNode(e),createComment:e=>jn.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>jn.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,o,a){const u=n?n.previousSibling:t.lastChild;if(o&&(o===a||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),!(o===a||!(o=o.nextSibling)););else{hu.innerHTML=td(s==="svg"?`${e}`:s==="mathml"?`${e}`:e);const f=hu.content;if(s==="svg"||s==="mathml"){const h=f.firstChild;for(;h.firstChild;)f.appendChild(h.firstChild);f.removeChild(h)}t.insertBefore(f,n)}return[u?u.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Qn="transition",vs="animation",Jr=Symbol("_vtc"),nd={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},rd=Et({},Ec,nd),sh=e=>(e.displayName="Transition",e.props=rd,e),ns=sh((e,{slots:t})=>Zp(sp,sd(e),t)),Cr=(e,t=[])=>{Ke(e)?e.forEach(n=>n(...t)):e&&e(...t)},vu=e=>e?Ke(e)?e.some(t=>t.length>1):e.length>1:!1;function sd(e){const t={};for(const Y in e)Y in nd||(t[Y]=e[Y]);if(e.css===!1)return t;const{name:n="v",type:s,duration:o,enterFromClass:a=`${n}-enter-from`,enterActiveClass:u=`${n}-enter-active`,enterToClass:f=`${n}-enter-to`,appearFromClass:h=a,appearActiveClass:y=u,appearToClass:m=f,leaveFromClass:k=`${n}-leave-from`,leaveActiveClass:x=`${n}-leave-active`,leaveToClass:C=`${n}-leave-to`}=e,M=oh(o),B=M&&M[0],re=M&&M[1],{onBeforeEnter:ae,onEnter:T,onEnterCancelled:S,onLeave:J,onLeaveCancelled:de,onBeforeAppear:ie=ae,onAppear:ee=T,onAppearCancelled:P=S}=t,j=(Y,xe,Ve,rt)=>{Y._enterCancelled=rt,er(Y,xe?m:f),er(Y,xe?y:u),Ve&&Ve()},ce=(Y,xe)=>{Y._isLeaving=!1,er(Y,k),er(Y,C),er(Y,x),xe&&xe()},ke=Y=>(xe,Ve)=>{const rt=Y?ee:T,He=()=>j(xe,Y,Ve);Cr(rt,[xe,He]),mu(()=>{er(xe,Y?h:a),bn(xe,Y?m:f),vu(rt)||yu(xe,s,B,He)})};return Et(t,{onBeforeEnter(Y){Cr(ae,[Y]),bn(Y,a),bn(Y,u)},onBeforeAppear(Y){Cr(ie,[Y]),bn(Y,h),bn(Y,y)},onEnter:ke(!1),onAppear:ke(!0),onLeave(Y,xe){Y._isLeaving=!0;const Ve=()=>ce(Y,xe);bn(Y,k),Y._enterCancelled?(bn(Y,x),Ta(Y)):(Ta(Y),bn(Y,x)),mu(()=>{Y._isLeaving&&(er(Y,k),bn(Y,C),vu(J)||yu(Y,s,re,Ve))}),Cr(J,[Y,Ve])},onEnterCancelled(Y){j(Y,!1,void 0,!0),Cr(S,[Y])},onAppearCancelled(Y){j(Y,!0,void 0,!0),Cr(P,[Y])},onLeaveCancelled(Y){ce(Y),Cr(de,[Y])}})}function oh(e){if(e==null)return null;if(lt(e))return[aa(e.enter),aa(e.leave)];{const t=aa(e);return[t,t]}}function aa(e){return cf(e)}function bn(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Jr]||(e[Jr]=new Set)).add(t)}function er(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const n=e[Jr];n&&(n.delete(t),n.size||(e[Jr]=void 0))}function mu(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let ih=0;function yu(e,t,n,s){const o=e._endId=++ih,a=()=>{o===e._endId&&s()};if(n!=null)return setTimeout(a,n);const{type:u,timeout:f,propCount:h}=od(e,t);if(!u)return s();const y=u+"end";let m=0;const k=()=>{e.removeEventListener(y,x),a()},x=C=>{C.target===e&&++m>=h&&k()};setTimeout(()=>{m(n[M]||"").split(", "),o=s(`${Qn}Delay`),a=s(`${Qn}Duration`),u=gu(o,a),f=s(`${vs}Delay`),h=s(`${vs}Duration`),y=gu(f,h);let m=null,k=0,x=0;t===Qn?u>0&&(m=Qn,k=u,x=a.length):t===vs?y>0&&(m=vs,k=y,x=h.length):(k=Math.max(u,y),m=k>0?u>y?Qn:vs:null,x=m?m===Qn?a.length:h.length:0);const C=m===Qn&&/\b(?:transform|all)(?:,|$)/.test(s(`${Qn}Property`).toString());return{type:m,timeout:k,propCount:x,hasTransform:C}}function gu(e,t){for(;e.lengthbu(n)+bu(e[s])))}function bu(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Ta(e){return(e?e.ownerDocument:document).body.offsetHeight}function ah(e,t,n){const s=e[Jr];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const wu=Symbol("_vod"),id=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 u of t.split(";")){const f=u.slice(0,u.indexOf(":")).trim();n[f]==null&&gs(s,f,"")}else for(const u in t)n[u]==null&&gs(s,u,"");for(const u in n){u==="display"&&(a=!0);const f=n[u];f!=null?fh(e,u,!wt(t)&&t?t[u]:void 0,f)||gs(s,u,f):gs(s,u,"")}}else if(o){if(t!==n){const u=s[lh];u&&(n+=";"+u),s.cssText=n,a=uh.test(n)}}else t&&e.removeAttribute("style");wu in e&&((!o||t!==n)&&(e[wu]=a?s.display:""),e[id]&&(s.display="none"))}const So=/\s*!important$/;function gs(e,t,n){if(Ke(n))n.forEach(s=>gs(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))So.test(n)?e.setProperty(t,n.replace(So,""),"important"):e.setProperty(t,n);else{const s=dh(e,t);So.test(n)?e.setProperty(dr(s),n.replace(So,""),"important"):e[s]=n}}const _u=["Webkit","Moz","ms"],la={};function dh(e,t){const n=la[t];if(n)return n;let s=hn(t);if(s!=="filter"&&s in e)return la[t]=s;s=Yu(s);for(let o=0;o<_u.length;o++){const a=_u[o]+s;if(a in e)return la[t]=a}return t}function fh(e,t,n,s){return e.tagName==="TEXTAREA"&&(t==="width"||t==="height")&&wt(s)&&n===s}const ku="http://www.w3.org/1999/xlink";function xu(e,t,n,s,o,a=mf(t)){s&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(ku,t.slice(6,t.length)):e.setAttributeNS(ku,t,n):n==null||a&&!Xu(n)?e.removeAttribute(t):e.setAttribute(t,a?"":$n(n)?String(n):n)}function Cu(e,t,n,s,o){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?td(n):n);return}const a=e.tagName;if(t==="value"&&a!=="PROGRESS"&&!a.includes("-")){const f=a==="OPTION"?e.getAttribute("value")||"":e.value,h=n==null?e.type==="checkbox"?"on":"":String(n);(f!==h||!("_value"in e))&&(e.value=h),n==null&&e.removeAttribute(t),e._value=n;return}let u=!1;if(n===""||n==null){const f=typeof e[t];f==="boolean"?n=Xu(n):n==null&&f==="string"?(n="",u=!0):f==="number"&&(n=0,u=!0)}try{e[t]=n}catch{}u&&e.removeAttribute(o||t)}function rr(e,t,n,s){e.addEventListener(t,n,s)}function ph(e,t,n,s){e.removeEventListener(t,n,s)}const Su=Symbol("_vei");function hh(e,t,n,s,o=null){const a=e[Su]||(e[Su]={}),u=a[t];if(s&&u)u.value=s;else{const[f,h]=yh(t);if(s){const y=a[t]=wh(s,o);rr(e,f,y,h)}else u&&(ph(e,f,u,h),a[t]=void 0)}}const vh=/(Once|Passive|Capture)$/,mh=/^on:?(?:Once|Passive|Capture)$/;function yh(e){let t,n;for(;(n=e.match(vh))&&!mh.test(e);)t||(t={}),e=e.slice(0,e.length-n[1].length),t[n[1].toLowerCase()]=!0;return[e[2]===":"?e.slice(3):dr(e.slice(2)),t]}let ua=0;const gh=Promise.resolve(),bh=()=>ua||(gh.then(()=>ua=0),ua=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(Ke(o)){const a=s.stopImmediatePropagation;s.stopImmediatePropagation=()=>{a.call(s),s._stopped=!0};const u=o.slice(),f=[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 u=o==="svg";t==="class"?ah(e,s,u):t==="style"?ch(e,n,s):ni(t)?ri(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,u))?(Cu(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&xu(e,t,s,u,a,t!=="value")):e._isVueCE&&(xh(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!wt(s)))?Cu(e,hn(t),s,a,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),xu(e,t,s,u))};function kh(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&Eu(t)&&Ye(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const o=e.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return Eu(t)&&wt(n)?!1:t in e}function xh(e,t){const n=e._def.props;if(!n)return!1;const s=hn(t);return Array.isArray(n)?n.some(o=>hn(o)===s):Object.keys(n).some(o=>hn(o)===s)}const ad=new WeakMap,ld=new WeakMap,Ho=Symbol("_moveCb"),$u=Symbol("_enterCb"),Pa=new WeakMap,Ch=e=>(delete e.props.mode,e),Sh=Ch({name:"TransitionGroup",props:Et({},rd,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=nl(),s=Sc();let o,a,u,f;const h=()=>(f===void 0&&(f=o.length>0&&Ih(o[0].el,n.vnode.el,Au(e))),f);return Oc(()=>{if(Pa.delete(n),!h()){o=[],u=void 0;return}const y=Au(e);o.forEach($h);const m=u&&Mh(u,n.vnode.el);u=void 0,o.forEach(x=>Ah(x,m));const k=o.filter(Th);Ta(n.vnode.el),k.forEach(x=>{const C=x.el,M=C.style;bn(C,y),M.transform=M.webkitTransform=M.transitionDuration="";const B=C[Ho]=re=>{re&&re.target!==C||(!re||re.propertyName.endsWith("transform"))&&(C.removeEventListener("transitionend",B),C[Ho]=null,er(C,y))};C.addEventListener("transitionend",B)}),o=[]}),()=>{const y=ot(e),m=sd(y);let k=y.tag||Le;if(o=[],f=void 0,a)for(let x=0;xs.willMove()&&s.item.contains(t));return n&&vi(n.item,n)}function Ih(e,t,n){const s=e.cloneNode(),o=e[Jr];o&&o.forEach(f=>{f.split(/\s+/).forEach(h=>h&&s.classList.remove(h))}),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:u}=od(s);return a.removeChild(s),u}const Xr=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Ke(t)?n=>Ao(t,n):t};function jh(e){e.target.composing=!0}function Tu(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Sn=Symbol("_assign"),Eo=Symbol("_initialValue");function ca(e,t,n){return t&&(e=e.trim()),n&&(e=oi(e)),e}const Re={created(e,{modifiers:{lazy:t,trim:n,number:s}},o){e.parentNode&&(e.type==="text"?e[Eo]=e.defaultValue.replace(/[\r\n]/g,""):e.type==="textarea"&&(e[Eo]=e.defaultValue.replace(/\r\n?/g,` +`))),e[Sn]=Xr(o);const a=s||o.props&&o.props.type==="number";rr(e,t?"change":"input",u=>{u.target.composing||e[Sn](ca(e.value,n,a))}),(n||a)&&rr(e,"change",()=>{e.value=ca(e.value,n,a)}),t||(rr(e,"compositionstart",jh),rr(e,"compositionend",Tu),rr(e,"change",Tu))},mounted(e,{value:t,modifiers:{trim:n,number:s}}){const o=t??"",a=e[Eo];delete e[Eo],a!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==a?e[Sn](ca(e.value,n,s)):e.value=o},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:o,number:a}},u){if(e[Sn]=Xr(u),e.composing)return;const f=(a||e.type==="number")&&!/^0\d/.test(e.value)?oi(e.value):e.value,h=t??"";if(f===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)}},Dh={deep:!0,created(e,t,n){e[Sn]=Xr(n),rr(e,"change",()=>{const s=e._modelValue,o=Ls(e),a=e.checked,u=e[Sn];if(Ke(s)){const f=Ba(s,o),h=f!==-1;if(a&&!h)u(s.concat(o));else if(!a&&h){const y=[...s];y.splice(f,1),u(y)}}else if(Bn(s)){const f=new Set(s);a?f.add(o):f.delete(o),u(f)}else u(ud(e,a))})},mounted:Pu,beforeUpdate(e,t,n){e[Sn]=Xr(n),Pu(e,t,n)}};function Pu(e,{value:t,oldValue:n},s){e._modelValue=t;let o;if(Ke(t))o=Ba(t,s.props.value)>-1;else if(Bn(t))o=t.has(s.props.value);else{if(t===n)return;o=Un(t,ud(e,!0))}e.checked!==o&&(e.checked=o)}const Fn={deep:!0,created(e,{value:t,modifiers:{number:n}},s){e._modelValue=t,rr(e,"change",()=>{const o=Array.prototype.filter.call(e.options,h=>h.selected).map(h=>n?oi(Ls(h)):Ls(h)),a=e.multiple,u=a?Bn(e._modelValue)?new Set(o):o:o[0],f=e._pendingValue=[a,a?Ke(u)?o.slice():o:u];try{e[Sn](u)}finally{ts(()=>{e._pendingValue===f&&(e._pendingValue=void 0)})}}),e[Sn]=Xr(s)},mounted(e,{value:t}){Ou(e,t)},beforeUpdate(e,{value:t},n){e._modelValue=t,e[Sn]=Xr(n)},updated(e,{value:t}){const n=e._pendingValue;e._pendingValue=void 0,(!n||n[0]!==e.multiple||!Rh(t,n[1],n[0]))&&Ou(e,t)}};function Rh(e,t,n){if(!n||Ke(e))return Un(e,t);if(Bn(e)){if(e.size!==t.length)return!1;for(const s of t)if(!e.has(s))return!1;return!0}return!1}function Ou(e,t){const n=e.multiple,s=Ke(t);if(!(n&&!s&&!Bn(t))){for(let o=0,a=e.options.length;oString(y)===String(f)):u.selected=Ba(t,f)>-1}else u.selected=t.has(f);else if(Un(Ls(u),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Ls(e){return"_value"in e?e._value:e.value}function ud(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const Lh=["ctrl","shift","alt","meta"],Kh={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))},Mr=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=(o,...a)=>{for(let u=0;u{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(u=>u===a||Fh[u]===a))return e(o)})},Nh=Et({patchProp:_h},rh);let Mu;function Vh(){return Mu||(Mu=Rp(Nh))}const Bh=(...e)=>{const t=Vh().createApp(...e),{mount:n}=t;return t.mount=s=>{const o=qh(s);if(!o)return;const a=t._component;!Ye(a)&&!a.render&&!a.template&&(a.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const u=n(o,!1,Uh(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),u},t};function Uh(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function qh(e){return wt(e)?document.querySelector(e):e}function At(e){return''+e+""}const Hh={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('')},Wh=["innerHTML"],ut=Vt({__name:"Icon",props:{name:{},size:{default:16}},setup(e){const t=e,n=at(()=>Hh[t.name]||"");return(s,o)=>(F(),H("span",{class:"icon",style:or({width:e.size+"px",height:e.size+"px"}),innerHTML:n.value},null,12,Wh))}}),zh=["aria-label"],Gh={class:"dialog-title"},Yh={class:"dialog-msg"},Jh={class:"dialog-btns"},Xh=Vt({__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 bt(()=>n.open,a=>{a?window.addEventListener("keydown",o):window.removeEventListener("keydown",o)}),pr(()=>window.removeEventListener("keydown",o)),(a,u)=>(F(),It(Us,{to:"body"},[Oe(ns,{name:"modal"},{default:fr(()=>[e.open?(F(),H("div",{key:0,class:"mask",onClick:u[2]||(u[2]=Mr(f=>s("cancel"),["self"]))},[c("div",{class:"dialog",role:"dialog","aria-label":e.title},[c("div",Gh,ne(e.title),1),c("div",Yh,ne(e.message),1),c("div",Jh,[c("button",{class:"btn btn-sm",onClick:u[0]||(u[0]=f=>s("cancel"))},ne(e.cancelText),1),c("button",{class:tt(["btn btn-sm",e.danger?"btn-danger-solid":"btn-primary"]),onClick:u[1]||(u[1]=f=>s("confirm"))},ne(e.confirmText),3)])],8,zh)])):Ee("",!0)]),_:1})]))}}),Gt=(e,t)=>{const n=e.__vccOpts||e;for(const[s,o]of t)n[s]=o;return n},cr=Gt(Xh,[["__scopeId","data-v-f27041d4"]]);var Iu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Qh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var cd={exports:{}};(function(e,t){((n,s)=>{e.exports=s()})(Iu,function(){var n=function(r,i){return(n=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(l,d){l.__proto__=d}:function(l,d){for(var p in d)Object.prototype.hasOwnProperty.call(d,p)&&(l[p]=d[p])}))(r,i)},s=function(){return(s=Object.assign||function(r){for(var i,l=1,d=arguments.length;l"u"||a.Promise||(a.Promise=Promise);var y=Object.getPrototypeOf,m={}.hasOwnProperty;function k(r,i){return m.call(r,i)}function x(r,i){typeof i=="function"&&(i=i(y(r))),(typeof Reflect>"u"?u:Reflect.ownKeys)(i).forEach(function(l){M(r,l,i[l])})}var C=Object.defineProperty;function M(r,i,l,d){C(r,i,h(l&&k(l,"get")&&typeof l.get=="function"?{get:l.get,set:l.set,configurable:!0}:{value:l,configurable:!0,writable:!0},d))}function B(r){return{from:function(i){return r.prototype=Object.create(i.prototype),M(r.prototype,"constructor",r),{extend:x.bind(null,r.prototype)}}}}var re=Object.getOwnPropertyDescriptor,ae=[].slice;function T(r,i,l){return ae.call(r,i,l)}function S(r,i){return i(r)}function J(r){if(!r)throw new Error("Assertion Failed")}function de(r){a.setImmediate?setImmediate(r):setTimeout(r,0)}function ie(r,i){if(typeof i=="string"&&k(r,i))return r[i];if(!i)return r;if(typeof i!="string"){for(var l=[],d=0,p=i.length;d"u"?[]:(Xe=Promise.resolve(),typeof crypto<"u"&&crypto.subtle?[Qe=crypto.subtle.digest("SHA-512",new Uint8Array([0])),y(Qe),Xe]:[Xe,y(Xe),Xe]),Xe=Qe[0],Br=Qe[1],Br=Br&&Br.then,Ze=Xe&&Xe.constructor,mt=!!Qe[2],_t=function(r,i){Hn.push([r,i]),Bt&&(queueMicrotask(Dd),Bt=!1)},Xt=!0,Bt=!0,Zt=[],hr=[],Ot=O,$t={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:g,pgp:!1,env:{},finalize:g},Ie=$t,Hn=[],vr=0,Ys=[];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!==Ae)throw new TypeError("Not a function");this._state=arguments[1],this._value=arguments[2],this._state===!1&&ki(this,this._value)}else this._state=null,this._value=null,++i.ref,function l(d,p){try{p(function(v){if(d._state===null){if(v===d)throw new TypeError("A promise cannot be resolved with itself.");var b=d._lib&&Rr();v&&typeof v.then=="function"?l(d,function(_,$){v instanceof Se?v._then(_,$):v.then(_,$)}):(d._state=!0,d._value=v,hl(d)),b&&Lr()}},ki.bind(null,d))}catch(v){ki(d,v)}}(this,r)}var _i={get:function(){var r=Ie,i=Zs;function l(d,p){var v=this,b=!r.global&&(r!==Ie||i!==Zs),_=b&&!zn(),$=new Se(function(V,I){xi(v,new pl(ml(d,r,b,_),ml(p,r,b,_),V,I,r))});return this._consoleTask&&($._consoleTask=this._consoleTask),$}return l.prototype=Ae,l},set:function(r){M(this,"then",r&&r.prototype===Ae?_i:{get:function(){return r},set:_i.set})}};function pl(r,i,l,d,p){this.onFulfilled=typeof r=="function"?r:null,this.onRejected=typeof i=="function"?i:null,this.resolve=l,this.reject=d,this.psd=p}function ki(r,i){var l,d;hr.push(i),r._state===null&&(l=r._lib&&Rr(),i=Ot(i),r._state=!1,r._value=i,d=r,Zt.some(function(p){return p._value===d._value})||Zt.push(d),hl(r),l)&&Lr()}function hl(r){var i=r._listeners;r._listeners=[];for(var l=0,d=i.length;l{for(var b=Zt.length;b;)if(Zt[--b]._value===v._value)return Zt.splice(b,1)})(i),l.resolve(d)}catch(v){l.reject(v)}finally{--vr==0&&Ci(),--l.psd.ref||l.psd.finalize()}}function Dd(){mr($t,function(){Rr()&&Lr()})}function Rr(){var r=Xt;return Bt=Xt=!1,r}function Lr(){var r,i,l;do for(;0.",yl="String expected.",to="__dbnames",Ei="readonly",$i="readwrite";function gr(r,i){return r?i?function(){return r.apply(this,arguments)&&i.apply(this,arguments)}:r:i}var gl={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function no(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 bl(){throw je.Type("Entity instances must never be new:ed. Instances are generated by the framework bypassing the constructor.")}function nt(r,i){try{var l=wl(r),d=wl(i);if(l!==d)return l==="Array"?1:d==="Array"?-1:l==="binary"?1:d==="binary"?-1:l==="string"?1:d==="string"?-1:l==="Date"?1:d!=="Date"?NaN:-1;switch(l){case"number":case"Date":case"string":return i{var _=I,$=b;if(typeof $!="function"&&$!==null)throw new TypeError("Class extends value "+String($)+" is not a constructor or null");function V(){this.constructor=_}function I(){return b!==null&&b.apply(this,arguments)||this}return n(_,$),_.prototype=$===null?Object.create($):(V.prototype=$.prototype,new V),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(b){return d.add(b)});function v(b){if(!b)return b;var _,$=Object.create(r.prototype);for(_ in b)if(!d.has(_))try{$[_]=b[_]}catch{}return $}return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=v,this.hook("reading",v),r},pt.prototype.defineClass=function(){return this.mapToClass(function(r){h(this,r)})},pt.prototype.add=function(r,i){var l=this,d=this.schema.primKey,p=d.auto,v=d.keyPath,b=r;return v&&p&&(b=no(v)(r)),this._trans("readwrite",function(_){return l.core.mutate({trans:_,type:"add",keys:i!=null?[i]:null,values:[b]})}).then(function(_){return _.numFailures?Se.reject(_.failures[0]):_.lastResult}).then(function(_){if(v)try{ee(r,v,_)}catch{}return _})},pt.prototype.upsert=function(r,i){var l=this,d=this.schema.primKey.keyPath;return this._trans("readwrite",function(p){return l.core.get({trans:p,key:r}).then(function(v){var b=v??{};return xl(b,i),d&&ee(b,d,r),l.core.mutate({trans:p,type:"put",values:[b],keys:[r],upsert:!0,updates:{keys:[r],changeSpecs:[i]}}).then(function(_){return _.numFailures?Se.reject(_.failures[0]):!!v})})})},pt.prototype.update=function(r,i){return typeof r!="object"||f(r)?this.where(":id").equals(r).modify(i):(r=ie(r,this.schema.primKey.keyPath))===void 0?Ct(new je.InvalidArgument("Given object does not contain its primary key")):this.where(":id").equals(r).modify(i)},pt.prototype.put=function(r,i){var l=this,d=this.schema.primKey,p=d.auto,v=d.keyPath,b=r;return v&&p&&(b=no(v)(r)),this._trans("readwrite",function(_){return l.core.mutate({trans:_,type:"put",values:[b],keys:i!=null?[i]:null})}).then(function(_){return _.numFailures?Se.reject(_.failures[0]):_.lastResult}).then(function(_){if(v)try{ee(r,v,_)}catch{}return _})},pt.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(d){return ro(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:gl}).then(function(l){return ro(r,null,l)})}).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(l){return i.core.getMany({keys:r,trans:l}).then(function(d){return d.map(function(p){return i.hook.reading.fire(p)})})})},pt.prototype.bulkAdd=function(r,i,l){var d=this,p=Array.isArray(i)?i:void 0,v=(l=l||(p?void 0:i))?l.allKeys:void 0;return this._trans("readwrite",function(b){var _=d.schema.primKey,V=_.auto,_=_.keyPath;if(_&&p)throw new je.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(p&&p.length!==r.length)throw new je.InvalidArgument("Arguments objects and keys must have the same length");var $=r.length,V=_&&V?r.map(no(_)):r;return d.core.mutate({trans:b,type:"add",keys:p,values:V,wantResults:v}).then(function(I){var E=I.numFailures,A=I.failures;if(E===0)return v?I.results:I.lastResult;throw new ft("".concat(d.name,".bulkAdd(): ").concat(E," of ").concat($," operations failed"),A)})})},pt.prototype.bulkPut=function(r,i,l){var d=this,p=Array.isArray(i)?i:void 0,v=(l=l||(p?void 0:i))?l.allKeys:void 0;return this._trans("readwrite",function(b){var _=d.schema.primKey,V=_.auto,_=_.keyPath;if(_&&p)throw new je.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(p&&p.length!==r.length)throw new je.InvalidArgument("Arguments objects and keys must have the same length");var $=r.length,V=_&&V?r.map(no(_)):r;return d.core.mutate({trans:b,type:"put",keys:p,values:V,wantResults:v}).then(function(I){var E=I.numFailures,A=I.failures;if(E===0)return v?I.results:I.lastResult;throw new ft("".concat(d.name,".bulkPut(): ").concat(E," of ").concat($," operations failed"),A)})})},pt.prototype.bulkUpdate=function(r){var i=this,l=this.core,d=r.map(function(b){return b.key}),p=r.map(function(b){return b.changes}),v=[];return this._trans("readwrite",function(b){return l.getMany({trans:b,keys:d,cache:"clone"}).then(function(_){var $=[],V=[],I=(r.forEach(function(E,A){var K=E.key,R=E.changes,D=_[A];if(D){for(var L=0,z=Object.keys(R);LU+te&&L(U+V)})})}var z=Fr(l)&&l.limit===1/0&&(typeof r!="function"||R)&&{index:l.index,range:l.range};return L(0).then(function(){if(0{for(var qe=Math.min(ve.length,Pe.length),Je=-1,et=0;et=A})).length===0?Se.resolve():(L.forEach(function(U){D.push(function(){var te,fe,he,we=z,ve=U._cfg.dbschema,Te=(po(E,we,R),po(E,ve,R),z=E._dbSchema=ve,Di(we,ve)),ge=(Te.add.forEach(function(Pe){Ri(R,Pe[0],Pe[1].primKey,Pe[1].indexes)}),Te.change.forEach(function(Pe){if(Pe.recreate)throw new je.Upgrade("Not yet support for changing primary key");var pe=R.objectStore(Pe.name);Pe.add.forEach(function(Ue){return co(pe,Ue)}),Pe.change.forEach(function(Ue){pe.deleteIndex(Ue.name),co(pe,Ue)}),Pe.del.forEach(function(Ue){return pe.deleteIndex(Ue)})}),U._cfg.contentUpgrade);if(ge&&U._cfg.version>A)return lo(E,R),K._memoizedTables={},te=P(ve),Te.del.forEach(function(Pe){te[Pe]=we[Pe]}),ji(E,[E.Transaction.prototype]),uo(E,[E.Transaction.prototype],u(te),te),K.schema=te,(fe=De(ge))&&Kr(),ve=Se.follow(function(){var Pe;(he=ge(K))&&fe&&(Pe=zn.bind(null,null),he.then(Pe,Pe))}),he&&typeof he.then=="function"?Se.resolve(he):ve.then(function(){return he})}),D.push(function(te){var fe,he,we=U._cfg.dbschema;fe=we,he=te,[].slice.call(he.db.objectStoreNames).forEach(function(ve){return fe[ve]==null&&he.db.deleteObjectStore(ve)}),ji(E,[E.Transaction.prototype]),uo(E,[E.Transaction.prototype],E._storeNames,E._dbSchema),K.schema=E._dbSchema}),D.push(function(te){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(fe){return fe!=="$meta"})):te.objectStore("$meta").put(U._cfg.version,"version"))})}),function U(){return D.length?Se.resolve(D.shift()(K.idbtrans)).then(U):Se.resolve()}().then(function(){Ml(z,R)}))}).catch(b);var $,V;u(p).forEach(function(I){Ri(l,I,p[I].primKey,p[I].indexes)}),lo(r,l),Se.follow(function(){return r.on.populate.fire(v)}).catch(b)})}function Gd(r,i){Ml(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=fo(0,r.idbdb,i);po(r,r._dbSchema,i);for(var d=0,p=Di(l,r._dbSchema).change;d{if(b.change.length||b.recreate)return console.warn("Unable to patch indexes of table ".concat(b.name," because it has changes on the type of index or primary key.")),{value:void 0};var _=i.objectStore(b.name);b.add.forEach(function($){q&&console.debug("Dexie upgrade patch: Creating missing index ".concat(b.name,".").concat($.src)),co(_,$)})})(p[d]);if(typeof v=="object")return v.value}}function Di(r,i){var l,d={del:[],add:[],change:[]};for(l in r)i[l]||d.del.push(l);for(l in i){var p=r[l],v=i[l];if(p){var b={name:l,def:v,recreate:!1,del:[],add:[],change:[]};if(""+(p.primKey.keyPath||"")!=""+(v.primKey.keyPath||"")||p.primKey.auto!==v.primKey.auto)b.recreate=!0,d.change.push(b);else{var _=p.idxByName,$=v.idxByName,V=void 0;for(V in _)$[V]||b.del.push(V);for(V in $){var I=_[V],E=$[V];I?I.src!==E.src&&b.change.push(E):b.add.push(E)}(0{var r,i,l;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(),v=p.next();!v.done;){var b=v.value;if(b.deref()===d._novip)return r.delete(b),void i.unregister(b);v=p.next()}}}):(l=[],{toArray:function(){return l},add:function(d){l.push(d._novip)},remove:function(d){d&&(d=l.indexOf(d._novip))!==-1&&l.splice(d,1)}})})();function Li(r,i){var l=r._dbNamesDB;return l||(l=r._dbNamesDB=new Mn(to,{addons:[],indexedDB:r,IDBKeyRange:i})).version(1).stores({dbnames:"name"}),l.table("dbnames")}function Ki(r){return r&&typeof r.databases=="function"}function Fi(r){return Wn(function(){return Ie.letThrough=!0,r()})}function Ni(r){return!("from"in r)}var Dt=function(r,i){var l;if(!this)return l=new Dt,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=z<1,r.idbdb=D.result,v&&Gd(r,I),zd(r,z/10,I,K))},K),D.onsuccess=yt(function(){I=null;var L,z,U,te,fe,he,we=r.idbdb=D.result,ve=T(we.objectStoreNames);if(0"u"?Se.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(A){function K(){return indexedDB.databases().finally(A)}$=setInterval(K,100),K()}).finally(function(){return clearInterval($)}):Promise.resolve()).then(_)]).then(function(){return b(),i.onReadyBeingFired=[],Se.resolve(Fi(function(){return r.on.ready.fire(r.vip)})).then(function A(){var K;if(0i.limit?d.length=i.limit:r.length===i.limit&&d.length{if(l===void 0)return d!==void 0?-1:0;if(d===void 0)return 1;if((l=nt(l,d))===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,d,p,v)=>{if(l===void 0)return d!==void 0?1:0;if(d===void 0)return-1;if((l=nt(l,d))===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 nf(r,i,l,d){r.subscribers.add(l),d.addEventListener("abort",function(){var p,v;r.subscribers.delete(l),r.subscribers.size===0&&(p=r,v=i,setTimeout(function(){p.subscribers.size===0&&me(v,p)},3e3))})}var rf={stack:"dbcore",level:0,name:"Cache",create:function(r){var i=r.schema.name;return s(s({},r),{transaction:function(l,d,p){var v,b,_=r.transaction(l,d,p);return d==="readwrite"&&(p=(v=new AbortController).signal,_.addEventListener("abort",(b=function($){return function(){if(v.abort(),d==="readwrite"){for(var V=new Set,I=0,E=l;I{var z=br["idb://".concat(K,"/").concat(R)];if(!z)return[];if(!(K=z.queries[D]))return[null,!1,z,null];var U=K[(L.query?L.query.index.name:null)||""];if(!U)return[null,!1,z,null];switch(D){case"query":var te=(fe=L.direction)!=null?fe:"next",fe=U.find(function(he){var we;return he.req.limit===L.limit&&he.req.values===L.values&&((we=he.req.direction)!=null?we:"next")===te&&Ul(he.req.query.range,L.query.range)});return fe?[fe,!0,z,U]:[U.find(function(he){var we;return("limit"in he.req?he.req.limit:1/0)>=L.limit&&((we=he.req.direction)!=null?we:"next")===te&&(!L.values||he.req.values)&&tf(he.req.query.range,L.query.range)}),!1,z,U];case"count":return fe=U.find(function(he){return Ul(he.req.query.range,L.query.range)}),[fe,!!fe,z,U]}})(i,l,"query",v),A=E[0],V=E[2],I=E[3],A&&E[1]?A.obsSet=v.obsSet:(E=d.query(v).then(function(K){var R=K.result;if(A&&(A.res=R),b){for(var D=0,L=R.length;D{var fe=Rr();try{v&&Kr();var he=Wn(r,te);return he=v?he.finally(zn):he}finally{fe&&Lr()}})(z={subscr:L,signal:b.signal,requery:A,querier:r,trans:null}),E||(Jn.storagemutated.subscribe(R),E=!0),Promise.resolve(U).then(function(te){l=!0,i=te,_||z.signal.aborted||(K()||(V=L,K())?A():($={},Si(function(){return!_&&p.next&&p.next(te)})))},function(te){l=!1,["DatabaseClosedError","AbortError"].includes(te==null?void 0:te.name)||_||Si(function(){_||p.error&&p.error(te)})}))};return setTimeout(A,0),I});return d.hasValue=function(){return l},d.getValue=function(){return i},d}var wr=Mn;function Ji(r){var i=Xn;try{Xn=!0,Jn.storagemutated.fire(r),qi(r,!0)}finally{Xn=i}}x(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,(Ki(l)?Promise.resolve(l.databases()).then(function(d){return d.map(function(p){return p.name}).filter(function(p){return p!==to})}):Li(l,i).toCollection().primaryKeys()).then(r)}catch{return Ct(new je.MissingAPI)}var i,l},defineClass:function(){return function(r){h(this,r)}},ignoreTransaction:function(r){return Ie.trans?mr(Ie.transless||$t,r):r()},vip:Fi,async:function(r){return function(){try{var i=Hi(r.apply(this,arguments));return i&&typeof i.then=="function"?i:Se.resolve(i)}catch(l){return Ct(l)}}},spawn:function(r,i,l){try{var d=Hi(r.apply(l,i||[]));return d&&typeof d.then=="function"?d:Se.resolve(d)}catch(p){return Ct(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 q},set:function(r){G(r)}},derive:B,extend:h,props:x,override:S,Events:os,on:Jn,liveQuery:ql,extendObservabilitySet:vo,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:P,deepClone:xe,getObjectDiff:Wi,cmp:nt,asap:de,minKey:-1/0,addons:[],connections:{get:cs.toArray},errnames:Yt,dependencies:bo,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=ls(wr.dependencies.IDBKeyRange),typeof dispatchEvent<"u"&&typeof addEventListener<"u"&&(Jn(ao,function(r){Xn||(r=new CustomEvent(Pi,{detail:r}),Xn=!0,dispatchEvent(r),Xn=!1)}),addEventListener(Pi,function(r){r=r.detail,Xn||Ji(r)}));var Ur,Xn=!1,Hl=function(){};return typeof BroadcastChannel<"u"&&((Hl=function(){(Ur=new BroadcastChannel(Pi)).onmessage=function(r){return r.data&&Ji(r.data)}})(),typeof Ur.unref=="function"&&Ur.unref(),Jn(ao,function(r){Xn||Ur.postMessage(r)})),typeof addEventListener<"u"&&(addEventListener("pagehide",function(r){if(!Mn.disableBfCache&&r.persisted){q&&console.debug("Dexie: handling persisted pagehide"),Ur!=null&&Ur.close();for(var i=0,l=cs.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"},dv=["value"],fv={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=Vt({__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),u=N("dev"),f=N(null),h=N(""),y=N(""),m=N(0),k=N(0),x=N(""),C=N(null),M=at(()=>{var S;const ae=n.projects.filter(J=>J.archived!==1),T=(S=n.item)==null?void 0:S.project_id;if(T&&!ae.some(J=>J.id===T)){const J=n.projects.find(ie=>ie.id===T),de=ae.slice();return J&&de.unshift({...J,name:J.name+"(已归档)"}),de}return ae});function B(ae){n.open&&ae.key==="Escape"&&s("cancel")}bt(()=>n.open,async ae=>{var T;if(ae){const S=n.item;o.value=(S==null?void 0:S.content)??"",a.value=(S==null?void 0:S.project_id)??null,u.value=(S==null?void 0:S.category)??"dev",f.value=(S==null?void 0:S.minutes)??null,h.value=(S==null?void 0:S.takeaway)??"",y.value=(S==null?void 0:S.remark)??"",m.value=(S==null?void 0:S.is_milestone)??0,k.value=(S==null?void 0:S.needs_followup)??0,x.value="",window.addEventListener("keydown",B),await ts(),(T=C.value)==null||T.focus()}else window.removeEventListener("keydown",B)}),pr(()=>window.removeEventListener("keydown",B)),bt(o,()=>{x.value&&(x.value="")});function re(){const ae=o.value.trim();if(!ae){x.value="请填写工作内容";return}if(!n.item||!n.item.id){s("cancel");return}s("save",{id:n.item.id,content:ae,project_id:a.value,category:u.value,minutes:f.value&&f.value>0?f.value:null,takeaway:h.value.trim()||null,remark:y.value.trim()||null,is_milestone:m.value?1:0,needs_followup:k.value?1:0})}return(ae,T)=>(F(),It(Us,{to:"body"},[Oe(ns,{name:"modal"},{default:fr(()=>[e.open?(F(),H("div",{key:0,class:"mask",onClick:T[10]||(T[10]=Mr(S=>s("cancel"),["self"]))},[c("div",rv,[c("div",sv,[c("div",null,[T[11]||(T[11]=c("div",{class:"dialog-title"},"编辑工作记录",-1)),e.date?(F(),H("div",ov,ne(e.date),1)):Ee("",!0)]),c("button",{class:"icon-btn",title:"关闭",onClick:T[0]||(T[0]=S=>s("cancel"))},[Oe(ut,{name:"close",size:16})])]),c("div",iv,[c("div",av,[c("div",lv,[T[12]||(T[12]=c("label",null,"工作内容(必填)",-1)),$e(c("input",{ref_key:"contentInput",ref:C,class:tt(["input",{invalid:x.value}]),"onUpdate:modelValue":T[1]||(T[1]=S=>o.value=S),onKeydown:jt(re,["enter"])},null,34),[[Re,o.value]]),x.value?(F(),H("div",uv,ne(x.value),1)):Ee("",!0)]),c("div",cv,[T[14]||(T[14]=c("label",null,"所属项目",-1)),$e(c("select",{class:"select","onUpdate:modelValue":T[2]||(T[2]=S=>a.value=S)},[T[13]||(T[13]=c("option",{value:null},"无项目",-1)),(F(!0),H(Le,null,ct(M.value,S=>(F(),H("option",{key:S.id,value:S.id},ne(S.name),9,dv))),128))],512),[[Fn,a.value]])]),c("div",fv,[T[15]||(T[15]=c("label",null,"工作分类",-1)),$e(c("select",{class:"select","onUpdate:modelValue":T[3]||(T[3]=S=>u.value=S)},[(F(!0),H(Le,null,ct(Qt(Hs),S=>(F(),H("option",{key:S.key,value:S.key},ne(S.label),9,pv))),128))],512),[[Fn,u.value]])]),c("div",hv,[T[16]||(T[16]=c("label",null,"耗时(分钟)",-1)),$e(c("input",{class:"input",type:"number",min:"0","onUpdate:modelValue":T[4]||(T[4]=S=>f.value=S),placeholder:"选填"},null,512),[[Re,f.value,void 0,{number:!0}]])]),c("div",vv,[T[17]||(T[17]=c("label",null,"主要收获",-1)),$e(c("input",{class:"input","onUpdate:modelValue":T[5]||(T[5]=S=>h.value=S),placeholder:"一句话:学到了什么"},null,512),[[Re,h.value]])]),c("div",mv,[T[18]||(T[18]=c("label",null,"备注",-1)),$e(c("textarea",{class:"textarea","onUpdate:modelValue":T[6]||(T[6]=S=>y.value=S),placeholder:"背景、链接、未决事项(选填)"},null,512),[[Re,y.value]])]),c("div",yv,[T[19]||(T[19]=c("label",null,"成果标记",-1)),c("button",{class:tt(["toggle-btn",{on:m.value===1}]),onClick:T[7]||(T[7]=S=>m.value=m.value===1?0:1)},ne(m.value===1?"已标记为成果":"未标记"),3)]),c("div",gv,[T[20]||(T[20]=c("label",null,"待跟进",-1)),c("button",{class:tt(["toggle-btn",{onwarn:k.value===1}]),onClick:T[8]||(T[8]=S=>k.value=k.value===1?0:1)},ne(k.value===1?"需要跟进":"无需跟进"),3)])])]),c("div",bv,[c("button",{class:"btn btn-sm",onClick:T[9]||(T[9]=S=>s("cancel"))},"取消"),c("button",{class:"btn btn-primary btn-sm",onClick:re},"保存修改")])])])):Ee("",!0)]),_:1})]))}}),_v=Gt(wv,[["__scopeId","data-v-63bc0b48"]]);function Ss(e){return e<10?"0"+e:String(e)}function Nn(e){return e.getFullYear()+"-"+Ss(e.getMonth()+1)+"-"+Ss(e.getDate())}function xt(){return Nn(new Date)}function vt(){const e=new Date;return Nn(e)+"T"+Ss(e.getHours())+":"+Ss(e.getMinutes())+":"+Ss(e.getSeconds())}function Vn(e){if(!e)return"--:--";const t=e.indexOf("T");return t>=0?e.slice(t+1,t+6):e.slice(0,5)}function rs(e){const t=e.split("-").map(Number);return new Date(t[0],t[1]-1,t[2])}function Kn(e,t){const n=rs(e);return n.setDate(n.getDate()+t),Nn(n)}function zo(e,t){const n=rs(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)),Nn(n)}function Es(e){const t=rs(e),n=(t.getDay()+6)%7;return t.setDate(t.getDate()-n),Nn(t)}function kv(e){const t=rs(e).getDay();return t===0||t===6}function xv(e,t){return Math.round((new Date(t).getTime()-new Date(e).getTime())/6e4)}function fd(e){const t=rs(e),n=["周日","周一","周二","周三","周四","周五","周六"];return t.getFullYear()+" 年 "+(t.getMonth()+1)+" 月 "+t.getDate()+" 日 "+n[t.getDay()]}async function gt(e,t){const n=await Q.setting.get(e);return n?n.value:t}async function kt(e,t){await Q.setting.put({key:e,value:t})}async function jr(){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 Cv(){const e=await gt("last_project",""),t=await gt("last_category","dev");return{project_id:e?Number(e):null,category:t||"dev"}}async function Sv(){return gt("last_location","")}async function Ev(e,t){const n=t.trim();await kt("last_location",n),n&&await Go(n);const s=await mn(e);s&&s.id?await Q.attendance.update(s.id,{location:n||null}):n&&await Q.attendance.add({date:e,clock_in_at:null,clock_out_at:null,kind:"normal",note:null,location:n,created_at:vt()})}async function ol(){const e=await gt("location_presets","");if(!e)return Du.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 Du.slice()}async function pd(e){const t=Array.from(new Set(e.map(n=>n.trim()).filter(Boolean)));await kt("location_presets",JSON.stringify(t))}async function Go(e){const t=e.trim();if(!t)return;const n=await ol();n.includes(t)||await pd([...n,t])}async function Ks(e=!1){const t=await Q.project.orderBy("name").toArray();return e?t:t.filter(n=>n.archived!==1)}async function $v(e){await Q.project.add({name:e.trim(),archived:0,created_at:vt()})}async function Av(e,t){await Q.project.update(e,{name:t.trim()})}async function Tv(e,t){await Q.project.update(e,{archived:t?1:0})}async function mn(e){return Q.attendance.where("date").equals(e).first()}async function hd(e,t){const n=((t===void 0?await gt("last_location",""):t)||"").trim(),s=await mn(e);if(s&&s.id){if(!s.clock_in_at){const o={clock_in_at:vt()};n&&(o.location=n),await Q.attendance.update(s.id,o)}n&&(await kt("last_location",n),await Go(n));return}await Q.attendance.add({date:e,clock_in_at:vt(),clock_out_at:null,kind:"normal",note:null,location:n||null,created_at:vt()}),n&&(await kt("last_location",n),await Go(n))}async function Pv(e){const t=await mn(e);t&&t.id&&t.clock_in_at&&!t.clock_out_at&&await Q.attendance.update(t.id,{clock_out_at:vt()})}async function Ov(){const e=new Date,t=Nn(e);if(e.getHours()<4){const s=await mn(Kn(t,-1));if(s&&s.id&&s.clock_in_at&&!s.clock_out_at)return await Q.attendance.update(s.id,{clock_out_at:vt()}),s.date}const n=await mn(t);if(n&&n.id&&n.clock_in_at&&!n.clock_out_at)return await Q.attendance.update(n.id,{clock_out_at:vt()}),n.date;throw new Error("没有进行中的打卡")}async function Mv(e,t,n,s,o){(o||"").trim()&&await Go(o);const a=await mn(e),u={date:e,clock_in_at:t,clock_out_at:n,kind:"makeup",note:s||null,location:(o||"").trim()||null,created_at:vt()};a&&a.id?await Q.attendance.update(a.id,u):await Q.attendance.add(u)}async function Iv(e,t,n){const s=(n||"").trim();if(!s)return;const o=await mn(e);o&&o.id&&await Q.attendance.update(o.id,{[t]:e+"T"+s+":00"})}async function mi(e,t){return Q.attendance.where("date").between(e,t,!0,!0).toArray()}async function jv(e,t){const n=await mn(e);if(t){const s={date:e,kind:"leave",clock_in_at:null,clock_out_at:null,created_at:vt()};n&&n.id?await Q.attendance.update(n.id,s):await Q.attendance.add({...s,note:null,location:null})}else n&&n.id&&await Q.attendance.update(n.id,{kind:"normal"})}async function Dv(e){const t=await Q.work_log.where("date").equals(e).first();return t||{id:await Q.work_log.add({date:e,created_at:vt()}),date:e,created_at:vt()}}async function Rv(e){return Q.work_log.where("date").equals(e).first()}async function Lv(e){const t=await Rv(e);return!t||!t.id?[]:(await Q.log_item.where("work_log_id").equals(t.id).toArray()).sort((s,o)=>o.id-s.id)}async function Kv(e,t){const n=await Dv(e);await Q.log_item.add({work_log_id:n.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:vt()}),await kt("last_project",t.project_id?String(t.project_id):""),await kt("last_category",t.category)}async function da(e,t){await Q.log_item.update(e,t)}async function Fv(e){await Q.log_item.delete(e)}async function yi(e,t){const n=await Q.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 Q.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,u)=>a.date===u.date?a.id-u.id:a.datet.updated_at[u.id,u.date]));return(await Q.log_item.toArray()).filter(u=>((u.content||"")+" "+(u.takeaway||"")+" "+(u.remark||"")).toLowerCase().includes(n)).sort((u,f)=>f.id-u.id).slice(0,t).map(u=>({...u,date:o.get(u.work_log_id)||""}))}async function zv(e,t=4){const n=e.trim().toLowerCase();return n?(await Q.memo.toArray()).filter(o=>((o.title||"")+" "+(o.content||"")).toLowerCase().includes(n)).sort((o,a)=>o.updated_at{await Promise.all([Q.project.clear(),Q.work_log.clear(),Q.log_item.clear(),Q.attendance.clear(),Q.weekly_note.clear(),Q.setting.clear(),Q.memo.clear(),Q.credential.clear(),Q.table("transaction").clear()]),n.project&&n.project.length&&await Q.project.bulkAdd(n.project),n.work_log&&n.work_log.length&&await Q.work_log.bulkAdd(n.work_log),n.log_item&&n.log_item.length&&await Q.log_item.bulkAdd(n.log_item),n.attendance&&n.attendance.length&&await Q.attendance.bulkAdd(n.attendance),n.weekly_note&&n.weekly_note.length&&await Q.weekly_note.bulkAdd(n.weekly_note),n.setting&&n.setting.length&&await Q.setting.bulkAdd(n.setting),n.memo&&n.memo.length&&await Q.memo.bulkAdd(n.memo),n.credential&&n.credential.length&&await Q.credential.bulkAdd(n.credential),n.transaction&&n.transaction.length&&await Q.table("transaction").bulkAdd(n.transaction)})}function $o(e){const t=e.split(":");return Number(t[0])*60+Number(t[1])}function Ws(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=$o(Vn(e.clock_in_at)),u=$o(Vn(e.clock_out_at)),f=$o(n.work_start),h=$o(n.work_end);let y="normal";!o&&a>f+n.grace_minutes?y="late":!o&&u{Mo.value=Mo.value.filter(n=>n.id!==t)},2e3)}function nm(){return Mo}const Ma=N(null),Ia=N(null),zs=N(0);function nr(){zs.value++}const rm={class:"day-panel"},sm={class:"dp-head"},om={class:"dp-date"},im={class:"card sec"},am={class:"att-grid"},lm={class:"att-cell"},um={key:0,class:"edit-row"},cm={key:1,class:"att-val"},dm={class:"att-cell"},fm={key:0,class:"edit-row"},pm={key:1,class:"att-val"},hm={class:"att-cell"},vm=["list"],mm=["id"],ym=["value"],gm={class:"att-cell"},bm={class:"att-val status-val"},wm={key:0,class:"tag"},_m={key:1,class:"muted"},km={key:0,class:"att-note muted"},xm={class:"att-actions"},Cm=["disabled"],Sm=["disabled"],Em=["disabled"],$m=["disabled"],Am={key:0,class:"card sec makeup"},Tm={class:"form-grid"},Pm={class:"field"},Om={class:"field"},Mm={class:"field span2"},Im=["list"],jm={class:"field span2"},Dm={key:0,class:"form-error"},Rm={class:"form-footer"},Lm={class:"card sec"},Km={class:"form-grid"},Fm={class:"field span2"},Nm={key:0,class:"form-error"},Vm={class:"field"},Bm=["value"],Um={class:"field"},qm=["value"],Hm={class:"field"},Wm={class:"field"},zm={class:"field span2"},Gm={class:"form-footer"},Ym=["disabled"],Jm=["disabled"],Xm={class:"list-sec"},Qm={class:"sec-title"},Zm={key:0,class:"empty muted"},ey={class:"item-main"},ty={class:"tag"},ny=["onClick"],ry={key:0,class:"muted item-meta"},sy={key:1,class:"muted num item-meta"},oy=["onClick"],iy=["onClick"],ay=["onClick"],ly=["onClick"],uy={key:0,class:"item-sub"},cy={key:0,class:"muted2"},dy={key:1,class:"muted"},fy={key:1,class:"dp-foot muted num"},py=Vt({__name:"DayPanel",props:{date:{}},setup(e){const t=e,n=N(!0),s=N(null),o=N(void 0),a=N([]),u=N([]),f=N(""),h=N([]),y=at(()=>"loc-list-"+t.date),m=at(()=>t.date===xt());async function k(){n.value=!0,s.value=await jr(),o.value=await mn(t.date),a.value=await Lv(t.date),u.value=await Ks(!0),h.value=await ol(),f.value=o.value&&o.value.location||await Sv(),n.value=!1}dn(k),bt(()=>t.date,k),bt(zs,()=>{k()});const x=at(()=>u.value.filter(W=>W.archived!==1));function C(W){if(!W)return"";const q=u.value.find(G=>G.id===W);return q?q.name:"已删除项目"}const M=at(()=>s.value?Ws(o.value,t.date,s.value,m.value):null),B=at(()=>a.value.reduce((W,q)=>W+(q.minutes||0),0)),re=N(!1);async function ae(){re.value||(re.value=!0,await hd(t.date,f.value),await k(),nr(),ze("上班打卡成功"),re.value=!1)}async function T(){re.value||(re.value=!0,await Pv(t.date),await k(),nr(),ze("下班打卡成功"),re.value=!1)}async function S(){await Ev(t.date,f.value),nr(),ze("地点已更新")}const J=N(!1),de=at(()=>{var W;return((W=o.value)==null?void 0:W.kind)==="leave"});function ie(){if(o.value&&o.value.clock_in_at){J.value=!0;return}ee(!0)}async function ee(W){J.value=!1,await jv(t.date,W),await k(),nr(),ze(W?"已标记为休假":"已取消休假")}const P=N(null),j=N(""),ce=N(null);bt(P,async W=>{var q;W&&(await ts(),(q=ce.value)==null||q.focus())});function ke(W){var G,Ae;const q=W==="in"?(G=o.value)==null?void 0:G.clock_in_at:(Ae=o.value)==null?void 0:Ae.clock_out_at;P.value=W,j.value=q?Vn(q):W==="in"?"09:00":"18:00"}function Y(){P.value=null}async function xe(){const W=P.value;W&&(P.value=null,j.value&&(await Iv(t.date,W==="in"?"clock_in_at":"clock_out_at",j.value),await k(),nr(),ze("打卡时间已修改")))}const Ve=N(!1),rt=N("09:00"),He=N("18:00"),We=N(""),me=N(""),Me=N("");function Fe(){me.value=f.value,Me.value="",Ve.value=!Ve.value}async function De(){if(!rt.value||!He.value){Me.value="请填写上班与下班时间";return}await Mv(t.date,t.date+"T"+rt.value+":00",t.date+"T"+He.value+":00",We.value.trim(),me.value),Ve.value=!1,We.value="",Me.value="",await k(),nr(),ze("补卡已保存")}const Ce=N(""),X=N("");bt(Ce,()=>{X.value&&(X.value="")});const Z=N(null),_e=N("dev"),Be=N(null),ft=N(""),Yt=N(""),Jt=N(!1),je=at(()=>!!(Ce.value.trim()||Be.value||ft.value.trim()||Yt.value.trim()));dn(async()=>{const W=await Cv();Z.value=W.project_id,_e.value=W.category});function w(){Ce.value="",Be.value=null,ft.value="",Yt.value="",X.value=""}async function g(){const W=Ce.value.trim();if(!W){X.value="请填写工作内容";return}Jt.value||(Jt.value=!0,await Kv(t.date,{content:W,project_id:Z.value,category:_e.value,minutes:Be.value&&Be.value>0?Be.value:null,takeaway:ft.value.trim()||null,remark:Yt.value.trim()||null}),w(),await k(),ze("记录已添加"),Jt.value=!1)}const O=N(null);function le(W){O.value=W}async function se(W){const q=W.id,G={content:W.content,project_id:W.project_id,category:W.category,minutes:W.minutes,takeaway:W.takeaway,remark:W.remark,is_milestone:W.is_milestone,needs_followup:W.needs_followup};await da(q,G),O.value=null,await k(),ze("修改已保存")}async function ue(W){await da(W.id,{is_milestone:W.is_milestone?0:1}),await k()}async function ye(W){await da(W.id,{needs_followup:W.needs_followup?0:1}),await k()}const oe=N(null);async function be(){oe.value&&oe.value.id&&await Fv(oe.value.id),oe.value=null,await k(),ze("记录已删除")}return(W,q)=>(F(),H("div",rm,[c("div",sm,[c("div",om,ne(Qt(fd)(e.date)),1)]),c("div",im,[q[25]||(q[25]=c("div",{class:"sec-title"},"出勤信息",-1)),c("div",am,[c("div",lm,[q[21]||(q[21]=c("label",null,"上班时间",-1)),P.value==="in"?(F(),H("div",um,[$e(c("input",{ref_key:"timeInput",ref:ce,type:"time",class:"input time-input","onUpdate:modelValue":q[0]||(q[0]=G=>j.value=G),onKeydown:[jt(xe,["enter"]),jt(Y,["esc"])]},null,544),[[Re,j.value]]),c("button",{class:"btn btn-primary btn-sm",onClick:xe},"确认"),c("button",{class:"btn btn-sm",onClick:Y},"取消")])):(F(),H("div",cm,[c("span",{class:tt(["num",{"val-empty":!(o.value&&o.value.clock_in_at)}])},ne(o.value&&o.value.clock_in_at?Qt(Vn)(o.value.clock_in_at):"未打卡"),3),o.value&&o.value.id?(F(),H("button",{key:0,class:"icon-btn",title:"修改上班时间",onClick:q[1]||(q[1]=G=>ke("in"))},[Oe(ut,{name:"edit",size:13})])):Ee("",!0)]))]),c("div",dm,[q[22]||(q[22]=c("label",null,"下班时间",-1)),P.value==="out"?(F(),H("div",fm,[$e(c("input",{ref_key:"timeInput",ref:ce,type:"time",class:"input time-input","onUpdate:modelValue":q[2]||(q[2]=G=>j.value=G),onKeydown:[jt(xe,["enter"]),jt(Y,["esc"])]},null,544),[[Re,j.value]]),c("button",{class:"btn btn-primary btn-sm",onClick:xe},"确认"),c("button",{class:"btn btn-sm",onClick:Y},"取消")])):(F(),H("div",pm,[c("span",{class:tt(["num",{"val-empty":!(o.value&&o.value.clock_out_at)}])},ne(o.value&&o.value.clock_out_at?Qt(Vn)(o.value.clock_out_at):"未打卡"),3),o.value&&o.value.id?(F(),H("button",{key:0,class:"icon-btn",title:"修改下班时间",onClick:q[3]||(q[3]=G=>ke("out"))},[Oe(ut,{name:"edit",size:13})])):Ee("",!0)]))]),c("div",hm,[q[23]||(q[23]=c("label",null,"上班地点",-1)),$e(c("input",{class:"input","onUpdate:modelValue":q[4]||(q[4]=G=>f.value=G),list:y.value,placeholder:"可直接输入",title:"上班地点,可自由输入",onChange:S},null,40,vm),[[Re,f.value]]),c("datalist",{id:y.value},[(F(!0),H(Le,null,ct(h.value,G=>(F(),H("option",{key:G,value:G},null,8,ym))),128))],8,mm)]),c("div",gm,[q[24]||(q[24]=c("label",null,"考勤状态",-1)),c("div",bm,[M.value?(F(),H(Le,{key:0},[c("span",{class:tt(["dot",M.value.status])},null,2),c("span",null,ne(M.value.label),1),o.value&&o.value.kind==="makeup"?(F(),H("span",wm,"补卡")):Ee("",!0)],64)):(F(),H("span",_m,"--"))])])]),o.value&&o.value.note?(F(),H("div",km,"补卡说明:"+ne(o.value.note),1)):Ee("",!0),c("div",xm,[m.value&&(!o.value||!o.value.clock_in_at)?(F(),H("button",{key:0,class:"btn btn-primary btn-sm",disabled:re.value,onClick:ae},"上班打卡",8,Cm)):m.value&&o.value&&o.value.clock_in_at&&!o.value.clock_out_at?(F(),H("button",{key:1,class:"btn btn-primary btn-sm",disabled:re.value,onClick:T},"下班打卡",8,Sm)):Ee("",!0),!m.value&&(!o.value||!o.value.clock_in_at)?(F(),H("button",{key:2,class:"btn btn-sm",onClick:Fe},"补卡")):Ee("",!0),de.value?(F(),H("button",{key:4,class:"btn btn-sm",disabled:re.value,onClick:q[5]||(q[5]=G=>ee(!1))},"取消休假",8,$m)):(F(),H("button",{key:3,class:"btn btn-sm",disabled:re.value,onClick:ie},"标记休假",8,Em))])]),Ve.value?(F(),H("div",Am,[q[30]||(q[30]=c("div",{class:"sec-title"},"补卡登记",-1)),c("div",Tm,[c("div",Pm,[q[26]||(q[26]=c("label",null,"上班时间",-1)),$e(c("input",{type:"time",class:"input","onUpdate:modelValue":q[6]||(q[6]=G=>rt.value=G)},null,512),[[Re,rt.value]])]),c("div",Om,[q[27]||(q[27]=c("label",null,"下班时间",-1)),$e(c("input",{type:"time",class:"input","onUpdate:modelValue":q[7]||(q[7]=G=>He.value=G)},null,512),[[Re,He.value]])]),c("div",Mm,[q[28]||(q[28]=c("label",null,"上班地点",-1)),$e(c("input",{class:"input",list:y.value,"onUpdate:modelValue":q[8]||(q[8]=G=>me.value=G),placeholder:"可直接输入"},null,8,Im),[[Re,me.value]])]),c("div",jm,[q[29]||(q[29]=c("label",null,"补卡原因",-1)),$e(c("input",{class:"input","onUpdate:modelValue":q[9]||(q[9]=G=>We.value=G),placeholder:"如:外出拜访客户忘记打卡"},null,512),[[Re,We.value]])])]),Me.value?(F(),H("div",Dm,ne(Me.value),1)):Ee("",!0),c("div",Rm,[c("button",{class:"btn btn-sm",onClick:q[10]||(q[10]=G=>Ve.value=!1)},"取消"),c("button",{class:"btn btn-primary btn-sm",onClick:De},"保存补卡")])])):Ee("",!0),c("div",Lm,[q[38]||(q[38]=c("div",{class:"sec-head"},[c("span",{class:"sec-title"},"新增工作记录"),c("span",{class:"muted form-hint"},"内容必填,其余选填")],-1)),c("div",Km,[c("div",Fm,[q[31]||(q[31]=c("label",null,"工作内容(必填)",-1)),$e(c("input",{class:tt(["input",{invalid:X.value}]),"onUpdate:modelValue":q[11]||(q[11]=G=>Ce.value=G),placeholder:"做了什么,一句话一条",onKeydown:jt(g,["enter"])},null,34),[[Re,Ce.value]]),X.value?(F(),H("div",Nm,ne(X.value),1)):Ee("",!0)]),c("div",Vm,[q[33]||(q[33]=c("label",null,"所属项目",-1)),$e(c("select",{class:"select","onUpdate:modelValue":q[12]||(q[12]=G=>Z.value=G)},[q[32]||(q[32]=c("option",{value:null},"无项目",-1)),(F(!0),H(Le,null,ct(x.value,G=>(F(),H("option",{key:G.id,value:G.id},ne(G.name),9,Bm))),128))],512),[[Fn,Z.value]])]),c("div",Um,[q[34]||(q[34]=c("label",null,"工作分类",-1)),$e(c("select",{class:"select","onUpdate:modelValue":q[13]||(q[13]=G=>_e.value=G)},[(F(!0),H(Le,null,ct(Qt(Hs),G=>(F(),H("option",{key:G.key,value:G.key},ne(G.label),9,qm))),128))],512),[[Fn,_e.value]])]),c("div",Hm,[q[35]||(q[35]=c("label",null,"耗时(分钟)",-1)),$e(c("input",{class:"input",type:"number",min:"0","onUpdate:modelValue":q[14]||(q[14]=G=>Be.value=G),placeholder:"选填"},null,512),[[Re,Be.value,void 0,{number:!0}]])]),c("div",Wm,[q[36]||(q[36]=c("label",null,"主要收获",-1)),$e(c("input",{class:"input","onUpdate:modelValue":q[15]||(q[15]=G=>ft.value=G),placeholder:"一句话:学到了什么"},null,512),[[Re,ft.value]])]),c("div",zm,[q[37]||(q[37]=c("label",null,"备注",-1)),$e(c("textarea",{class:"textarea","onUpdate:modelValue":q[16]||(q[16]=G=>Yt.value=G),placeholder:"背景、链接、未决事项(选填)"},null,512),[[Re,Yt.value]])])]),c("div",Gm,[c("button",{class:"btn btn-sm",disabled:!je.value,onClick:w},"重置",8,Ym),c("button",{class:"btn btn-primary btn-sm",disabled:Jt.value,onClick:g},"添加记录",8,Jm)])]),c("div",Xm,[c("div",Qm,"工作记录("+ne(a.value.length)+")",1),!a.value.length&&!n.value?(F(),H("div",Zm,"暂无记录")):Ee("",!0),(F(!0),H(Le,null,ct(a.value,G=>(F(),H("div",{key:G.id,class:"item"},[c("div",ey,[c("span",ty,ne(Qt(sl)(G.category)),1),c("span",{class:"item-content",title:"点击编辑",onClick:Ae=>le(G)},ne(G.content),9,ny),G.project_id?(F(),H("span",ry,ne(C(G.project_id)),1)):Ee("",!0),G.minutes?(F(),H("span",sy,ne(G.minutes)+" 分钟",1)):Ee("",!0),q[39]||(q[39]=c("span",{class:"flex1"},null,-1)),c("button",{class:"icon-btn",title:"编辑完整信息",onClick:Ae=>le(G)},[Oe(ut,{name:"edit",size:14})],8,oy),c("button",{class:tt(["icon-btn",{active:G.is_milestone===1}]),title:"成果标记",onClick:Ae=>ue(G)},[Oe(ut,{name:"star",size:14})],10,iy),c("button",{class:tt(["icon-btn",{"active-warn":G.needs_followup===1}]),title:"待跟进",onClick:Ae=>ye(G)},[Oe(ut,{name:"flag",size:14})],10,ay),c("button",{class:"icon-btn",title:"删除",onClick:Ae=>oe.value=G},[Oe(ut,{name:"close",size:14})],8,ly)]),G.takeaway||G.remark?(F(),H("div",uy,[G.takeaway?(F(),H("div",cy,"收获:"+ne(G.takeaway),1)):Ee("",!0),G.remark?(F(),H("div",dy,"备注:"+ne(G.remark),1)):Ee("",!0)])):Ee("",!0)]))),128)),a.value.length?(F(),H("div",fy,[nn(" 共 "+ne(a.value.length)+" 条事项 ",1),B.value?(F(),H(Le,{key:0},[nn(" · "+ne((B.value/60).toFixed(1))+" 小时",1)],64)):Ee("",!0)])):Ee("",!0)]),Oe(cr,{open:!!oe.value,title:"删除确认",message:oe.value?"将删除工作记录「"+oe.value.content+"」。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:q[17]||(q[17]=G=>oe.value=null),onConfirm:be},null,8,["open","message"]),Oe(cr,{open:J.value,title:"标记休假确认",message:"该日已有打卡记录,标记休假将清空上下班时间。是否继续?","confirm-text":"标记休假",danger:"",onCancel:q[18]||(q[18]=G=>J.value=!1),onConfirm:q[19]||(q[19]=G=>ee(!0))},null,8,["open"]),Oe(_v,{open:!!O.value,item:O.value,projects:u.value,date:e.date,onCancel:q[20]||(q[20]=G=>O.value=null),onSave:se},null,8,["open","item","projects","date"])]))}}),vd=Gt(py,[["__scopeId","data-v-2e90c9d8"]]),hy={class:"cal-page"},vy={class:"cal-toolbar"},my={class:"cal-title num"},yy={class:"cal-head"},gy={class:"cal-grid"},by=["title","onClick"],wy={class:"cal-marks"},_y={key:0,class:"drawer"},ky={class:"drawer-head"},xy={class:"drawer-body"},Cy=Vt({__name:"CalendarView",setup(e){const t=N(xt()),n=at(()=>Number(t.value.slice(0,4))),s=at(()=>Number(t.value.slice(5,7))-1),o=at(()=>n.value+" 年 "+(s.value+1)+" 月"),a=["一","二","三","四","五","六","日"],u=at(()=>{const J=(new Date(n.value,s.value,1).getDay()+6)%7,de=new Date(n.value,s.value+1,0).getDate(),ie=[];for(let ee=0;ee[ke.date,ke])),P=de[2],j=new Map;for(const ke of u.value){if(!ke.inMonth)continue;const Y=Ws(ee.get(ke.date),ke.date,ie,ke.date===h),xe=P.filter(Ve=>Ve.date===ke.date);j.set(ke.date,{status:Y.status,label:Y.label,location:((ce=ee.get(ke.date))==null?void 0:ce.location)||"",hasLog:xe.length>0,hasMilestone:xe.some(Ve=>Ve.is_milestone===1)})}f.value=j}bt([n,s],y,{immediate:!0}),bt(zs,()=>{y()});function m(S){var J;return((J=f.value.get(S))==null?void 0:J.status)??""}function k(S){const J=f.value.get(S);return J?S+" · "+J.label+(J.location?" · "+J.location:""):S}function x(S){var J;return!!((J=f.value.get(S))!=null&&J.hasLog)}function C(S){var J;return!!((J=f.value.get(S))!=null&&J.hasMilestone)}function M(){t.value=zo(t.value,-1)}function B(){t.value=zo(t.value,1)}function re(){t.value=xt()}const ae=N(null);function T(S,J){J&&(ae.value=S)}return bt(Ma,S=>{S&&(t.value=S,ae.value=S,Ma.value=null)},{immediate:!0}),(S,J)=>(F(),H("div",hy,[c("div",vy,[c("button",{class:"icon-btn",onClick:M},[Oe(ut,{name:"chevron-left",size:16})]),c("span",my,ne(o.value),1),c("button",{class:"icon-btn",onClick:B},[Oe(ut,{name:"chevron-right",size:16})]),c("button",{class:"btn btn-sm",onClick:re},"回到今天")]),c("div",yy,[(F(),H(Le,null,ct(a,de=>c("span",{key:de,class:"cal-week muted"},ne(de),1)),64))]),c("div",gy,[(F(!0),H(Le,null,ct(u.value,(de,ie)=>(F(),H("button",{key:ie,class:tt(["cal-cell",{blank:!de.inMonth,weekend:de.weekend,selected:ae.value===de.date}]),title:de.inMonth?k(de.date):void 0,onClick:ee=>T(de.date,de.inMonth)},[de.inMonth?(F(),H(Le,{key:0},[c("span",{class:tt(["daynum num",{today:de.date===Qt(h)}])},ne(Number(de.date.slice(8,10))),3),c("span",wy,[m(de.date)?(F(),H("span",{key:0,class:tt(["dot",m(de.date)])},null,2)):Ee("",!0),x(de.date)?(F(),It(ut,{key:1,name:"check-circle",size:12,class:"mark-log"})):Ee("",!0),C(de.date)?(F(),It(ut,{key:2,name:"star",size:12,class:"mark-star"})):Ee("",!0)])],64)):Ee("",!0)],10,by))),128))]),Oe(ns,{name:"drawer"},{default:fr(()=>[ae.value?(F(),H("aside",_y,[c("div",ky,[J[1]||(J[1]=c("span",{class:"drawer-title"},"当日详情",-1)),c("button",{class:"icon-btn",onClick:J[0]||(J[0]=de=>ae.value=null)},[Oe(ut,{name:"close",size:16})])]),c("div",xy,[Oe(vd,{date:ae.value},null,8,["date"])])])):Ee("",!0)]),_:1})]))}}),Sy=Gt(Cy,[["__scopeId","data-v-2404dfbe"]]),Ey={class:"detail-page"},$y={class:"detail-toolbar"},Ay=["value"],Ty=["disabled"],Py=Vt({__name:"TodayView",setup(e){const t=N(xt()),n=at(()=>t.value===xt());function s(){t.value=Kn(t.value,-1)}function o(){t.value=Kn(t.value,1)}function a(){t.value=xt()}function u(f){const h=f.target.value;h&&(t.value=h)}return(f,h)=>(F(),H("div",Ey,[c("div",$y,[c("button",{class:"icon-btn",title:"前一天",onClick:s},[Oe(ut,{name:"chevron-left",size:16})]),c("span",{class:tt(["date-title num",{"is-today":n.value}])},ne(Qt(fd)(t.value)),3),c("button",{class:"icon-btn",title:"后一天",onClick:o},[Oe(ut,{name:"chevron-right",size:16})]),c("input",{type:"date",class:"input w-date",value:t.value,onChange:u},null,40,Ay),c("button",{class:"btn btn-sm",disabled:n.value,onClick:a},"回到今天",8,Ty)]),Oe(vd,{date:t.value},null,8,["date"])]))}}),Oy=Gt(Py,[["__scopeId","data-v-76243d98"]]),My={class:"stats"},Iy={class:"cards"},jy={class:"card stat-card"},Dy={class:"stat-num num"},Ry={class:"card stat-card"},Ly={class:"stat-num num"},Ky={class:"card stat-card"},Fy={class:"stat-num num"},Ny={class:"card stat-card"},Vy={class:"stat-num num"},By={class:"card section"},Uy={class:"heat"},qy=["title"],Hy={class:"two-col"},Wy={class:"card section"},zy={class:"bar-label"},Gy={class:"bar-track"},Yy={class:"muted num bar-num"},Jy={key:0,class:"muted"},Xy={class:"card section"},Qy={class:"bar-label"},Zy={class:"bar-track"},eg={class:"muted num bar-num"},tg={key:0,class:"muted"},ng={class:"card section"},rg={class:"bar-label loc-label"},sg={class:"bar-track"},og={class:"muted num bar-num"},ig={key:0,class:"muted"},ag=Vt({__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 u(){const y=xt(),m="2000-01-01",k=await Promise.all([jr(),mi(m,y),yi(m,y),Ks(!0)]),x=k[0],C=k[1],M=k[2],B=k[3],re=C.filter(Y=>Y.clock_in_at||Y.kind==="makeup");let ae=0;for(const Y of re){const xe=Ws(Y,Y.date,x,Y.date===y);ae+=xe.workedMinutes??0}const T=new Set(M.map(Y=>Y.date));let S=0,J=y;for(T.has(J)||(J=Kn(y,-1));T.has(J);)S++,J=Kn(J,-1);t.value={attendDays:re.length,totalHours:(ae/60).toFixed(1),itemCount:M.length,streak:S};const de=new Map;for(const Y of re){const xe=Y.location||"未记录";de.set(xe,(de.get(xe)||0)+1)}a.value=Array.from(de.entries()).map(Y=>({name:Y[0],count:Y[1],percent:Math.round(Y[1]/(re.length||1)*100)})).sort((Y,xe)=>xe.count-Y.count);const ie=M.length||1;s.value=Hs.map(Y=>{const xe=M.filter(Ve=>Ve.category===Y.key).length;return{key:Y.key,label:Y.label,count:xe,percent:Math.round(xe/ie*100)}}).filter(Y=>Y.count>0).sort((Y,xe)=>xe.count-Y.count);const ee=new Map(B.map(Y=>[Y.id,Y.name])),P=new Map;for(const Y of M){const xe=Y.project_id?ee.get(Y.project_id)||"已删除项目":"无项目";P.set(xe,(P.get(xe)||0)+1)}o.value=Array.from(P.entries()).map(Y=>({name:Y[0],count:Y[1],percent:Math.round(Y[1]/ie*100)})).sort((Y,xe)=>xe.count-Y.count);const j=new Map;for(const Y of M)j.set(Y.date,(j.get(Y.date)||0)+1);const ce=Es(y),ke=[];for(let Y=11;Y>=0;Y--){const xe=Kn(ce,-7*Y),Ve=[];for(let rt=0;rt<7;rt++){const He=Kn(xe,rt);Ve.push({date:He,count:j.get(He)||0})}ke.push(Ve)}n.value=ke}dn(async()=>{await u()}),bt(zs,()=>{u()});function f(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)=>(F(),H("div",My,[c("div",Iy,[c("div",jy,[m[0]||(m[0]=c("div",{class:"muted"},"出勤天数",-1)),c("div",Dy,ne(t.value.attendDays),1)]),c("div",Ry,[m[1]||(m[1]=c("div",{class:"muted"},"累计工时(小时)",-1)),c("div",Ly,ne(t.value.totalHours),1)]),c("div",Ky,[m[2]||(m[2]=c("div",{class:"muted"},"记录条数",-1)),c("div",Fy,ne(t.value.itemCount),1)]),c("div",Ny,[m[3]||(m[3]=c("div",{class:"muted"},"连续记录(天)",-1)),c("div",Vy,ne(t.value.streak),1)])]),c("div",By,[m[4]||(m[4]=c("div",{class:"section-title"},"记录热力图(近 12 周)",-1)),c("div",Uy,[(F(!0),H(Le,null,ct(n.value,(k,x)=>(F(),H("div",{key:x,class:"heat-col"},[(F(!0),H(Le,null,ct(k,C=>(F(),H("span",{key:C.date,class:tt(["heat-cell","lv"+f(C.count)]),title:h(C.date,C.count)},null,10,qy))),128))]))),128))]),m[5]||(m[5]=Up('
少多
',1))]),c("div",Hy,[c("div",Wy,[m[6]||(m[6]=c("div",{class:"section-title"},"分类分布",-1)),(F(!0),H(Le,null,ct(s.value,k=>(F(),H("div",{key:k.key,class:"bar-row"},[c("span",zy,ne(k.label),1),c("span",Gy,[c("span",{class:"bar-fill",style:or({width:k.percent+"%"})},null,4)]),c("span",Yy,ne(k.count)+" 条 · "+ne(k.percent)+"%",1)]))),128)),s.value.length?Ee("",!0):(F(),H("div",Jy,"暂无数据"))]),c("div",Xy,[m[7]||(m[7]=c("div",{class:"section-title"},"项目投入",-1)),(F(!0),H(Le,null,ct(o.value,k=>(F(),H("div",{key:k.name,class:"bar-row"},[c("span",Qy,ne(k.name),1),c("span",Zy,[c("span",{class:"bar-fill",style:or({width:k.percent+"%"})},null,4)]),c("span",eg,ne(k.count)+" 条 · "+ne(k.percent)+"%",1)]))),128)),o.value.length?Ee("",!0):(F(),H("div",tg,"暂无数据"))])]),c("div",ng,[m[8]||(m[8]=c("div",{class:"section-title"},"地点分布(按出勤天)",-1)),(F(!0),H(Le,null,ct(a.value,k=>(F(),H("div",{key:k.name,class:"bar-row"},[c("span",rg,ne(k.name),1),c("span",sg,[c("span",{class:"bar-fill",style:or({width:k.percent+"%"})},null,4)]),c("span",og,ne(k.count)+" 天 · "+ne(k.percent)+"%",1)]))),128)),a.value.length?Ee("",!0):(F(),H("div",ig,"暂无数据"))])]))}}),lg=Gt(ag,[["__scopeId","data-v-73e5ba49"]]);async function ug(e,t,n){const s=xt(),o=await Promise.all([jr(),mi(e,t),yi(e,t),Ks(!0),Vv(e,t)]),a=o[0],u=o[1],f=o[2],h=o[3],y=o[4];let m=0,k=0,x=0;for(const P of u){(P.clock_in_at||P.kind==="makeup")&&m++,P.kind==="makeup"&&x++;const j=Ws(P,P.date,a,P.date===s);k+=j.workedMinutes??0}const C=new Map;for(const P of u){if(!(P.clock_in_at||P.kind==="makeup"))continue;const j=P.location||"未记录";C.set(j,(C.get(j)||0)+1)}const M=Array.from(C.entries()).map(P=>({name:P[0],count:P[1]})).sort((P,j)=>j.count-P.count),B=f.length||1,re=Hs.map(P=>{const j=f.filter(ce=>ce.category===P.key).length;return{key:P.key,label:P.label,count:j,percent:Math.round(j/B*100)}}).filter(P=>P.count>0).sort((P,j)=>j.count-P.count),ae=new Map(h.map(P=>[P.id,P.name])),T=new Map;for(const P of f){const j=P.project_id?ae.get(P.project_id)||"已删除项目":"无项目";T.set(j,(T.get(j)||0)+1)}const S=Array.from(T.entries()).map(P=>({name:P[0],count:P[1]})).sort((P,j)=>j.count-P.count),J=f.filter(P=>P.is_milestone===1).map(P=>({date:P.date,content:P.content})),de=f.filter(P=>P.needs_followup===1).map(P=>({date:P.date,content:P.content,remark:P.remark||""})),ie=f.filter(P=>!!P.takeaway).map(P=>({date:P.date,text:P.takeaway})),ee=y.map(P=>({weekStart:P.week_start,highlights:P.highlights||"",challenges:P.challenges||"",plan_next:P.plan_next||""}));return{range:{start:e,end:t,label:n},attendDays:m,totalHours:(k/60).toFixed(1),makeupCount:x,leaveCount:u.filter(P=>P.kind==="leave").length,itemCount:f.length,categoryStats:re,projectStats:S,locationStats:M,milestones:J,followups:de,takeaways:ie,weekNotes:ee}}function cg(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 dg="modulepreload",fg=function(e,t){return new URL(e,t).href},Ru={},md=function(t,n,s){let o=Promise.resolve();if(n&&n.length>0){const u=document.getElementsByTagName("link"),f=document.querySelector("meta[property=csp-nonce]"),h=(f==null?void 0:f.nonce)||(f==null?void 0:f.getAttribute("nonce"));o=Promise.allSettled(n.map(y=>{if(y=fg(y,s),y in Ru)return;Ru[y]=!0;const m=y.endsWith(".css"),k=m?'[rel="stylesheet"]':"";if(!!s)for(let M=u.length-1;M>=0;M--){const B=u[M];if(B.href===y&&(!m||B.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${y}"]${k}`))return;const C=document.createElement("link");if(C.rel=m?"stylesheet":dg,m||(C.as="script"),C.crossOrigin="",C.href=y,h&&C.setAttribute("nonce",h),document.head.appendChild(C),m)return new Promise((M,B)=>{C.addEventListener("load",M),C.addEventListener("error",()=>B(new Error(`Unable to preload CSS for ${y}`)))})}))}function a(u){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=u,window.dispatchEvent(f),!f.defaultPrevented)throw u}return o.then(u=>{for(const f of u||[])f.status==="rejected"&&a(f.reason);return t().catch(a)})};/*! Capacitor: https://capacitorjs.com/ - MIT License */const pg=e=>{const t=new Map;t.set("web",{name:"web"});const n=e.CapacitorPlatforms||{currentPlatform:{name:"web"},platforms:t},s=(a,u)=>{n.platforms.set(a,u)},o=a=>{n.platforms.has(a)&&(n.currentPlatform=n.platforms.get(a))};return n.addPlatform=s,n.setPlatform=o,n},hg=e=>e.CapacitorPlatforms=pg(e),yd=hg(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});yd.addPlatform;yd.setPlatform;var Qr;(function(e){e.Unimplemented="UNIMPLEMENTED",e.Unavailable="UNAVAILABLE"})(Qr||(Qr={}));class fa extends Error{constructor(t,n,s){super(t),this.message=t,this.code=n,this.data=s}}const vg=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"},mg=e=>{var t,n,s,o,a;const u=e.CapacitorCustomPlatform||null,f=e.Capacitor||{},h=f.Plugins=f.Plugins||{},y=e.CapacitorPlatforms,m=()=>u!==null?u.name:vg(e),k=((t=y==null?void 0:y.currentPlatform)===null||t===void 0?void 0:t.getPlatform)||m,x=()=>k()!=="web",C=((n=y==null?void 0:y.currentPlatform)===null||n===void 0?void 0:n.isNativePlatform)||x,M=ee=>{const P=J.get(ee);return!!(P!=null&&P.platforms.has(k())||ae(ee))},B=((s=y==null?void 0:y.currentPlatform)===null||s===void 0?void 0:s.isPluginAvailable)||M,re=ee=>{var P;return(P=f.PluginHeaders)===null||P===void 0?void 0:P.find(j=>j.name===ee)},ae=((o=y==null?void 0:y.currentPlatform)===null||o===void 0?void 0:o.getPluginHeader)||re,T=ee=>e.console.error(ee),S=(ee,P,j)=>Promise.reject(`${j} does not have an implementation of "${P}".`),J=new Map,de=(ee,P={})=>{const j=J.get(ee);if(j)return console.warn(`Capacitor plugin "${ee}" already registered. Cannot register plugins twice.`),j.proxy;const ce=k(),ke=ae(ee);let Y;const xe=async()=>(!Y&&ce in P?Y=typeof P[ce]=="function"?Y=await P[ce]():Y=P[ce]:u!==null&&!Y&&"web"in P&&(Y=typeof P.web=="function"?Y=await P.web():Y=P.web),Y),Ve=(Fe,De)=>{var Ce,X;if(ke){const Z=ke==null?void 0:ke.methods.find(_e=>De===_e.name);if(Z)return Z.rtype==="promise"?_e=>f.nativePromise(ee,De.toString(),_e):(_e,Be)=>f.nativeCallback(ee,De.toString(),_e,Be);if(Fe)return(Ce=Fe[De])===null||Ce===void 0?void 0:Ce.bind(Fe)}else{if(Fe)return(X=Fe[De])===null||X===void 0?void 0:X.bind(Fe);throw new fa(`"${ee}" plugin is not implemented on ${ce}`,Qr.Unimplemented)}},rt=Fe=>{let De;const Ce=(...X)=>{const Z=xe().then(_e=>{const Be=Ve(_e,Fe);if(Be){const ft=Be(...X);return De=ft==null?void 0:ft.remove,ft}else throw new fa(`"${ee}.${Fe}()" is not implemented on ${ce}`,Qr.Unimplemented)});return Fe==="addListener"&&(Z.remove=async()=>De()),Z};return Ce.toString=()=>`${Fe.toString()}() { [capacitor code] }`,Object.defineProperty(Ce,"name",{value:Fe,writable:!1,configurable:!1}),Ce},He=rt("addListener"),We=rt("removeListener"),me=(Fe,De)=>{const Ce=He({eventName:Fe},De),X=async()=>{const _e=await Ce;We({eventName:Fe,callbackId:_e},De)},Z=new Promise(_e=>Ce.then(()=>_e({remove:X})));return Z.remove=async()=>{console.warn("Using addListener() without 'await' is deprecated."),await X()},Z},Me=new Proxy({},{get(Fe,De){switch(De){case"$$typeof":return;case"toJSON":return()=>({});case"addListener":return ke?me:He;case"removeListener":return We;default:return rt(De)}}});return h[ee]=Me,J.set(ee,{name:ee,proxy:Me,platforms:new Set([...Object.keys(P),...ke?[ce]:[]])}),Me},ie=((a=y==null?void 0:y.currentPlatform)===null||a===void 0?void 0:a.registerPlugin)||de;return f.convertFileSrc||(f.convertFileSrc=ee=>ee),f.getPlatform=k,f.handleError=T,f.isNativePlatform=C,f.isPluginAvailable=B,f.pluginMethodNoop=S,f.registerPlugin=ie,f.Exception=fa,f.DEBUG=!!f.DEBUG,f.isLoggingEnabled=!!f.isLoggingEnabled,f.platform=f.getPlatform(),f.isNative=f.isNativePlatform(),f},yg=e=>e.Capacitor=mg(e),Zr=yg(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),gd=Zr.registerPlugin;Zr.Plugins;class bd{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 u=async()=>this.removeListener(t,n);return Promise.resolve({remove:u})}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 Zr.Exception(t,Qr.Unimplemented)}unavailable(t="not available"){return new Zr.Exception(t,Qr.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 Lu=e=>encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),Ku=e=>e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent);class gg extends bd{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=Ku(o).trim(),a=Ku(a).trim(),n[o]=a}),n}async setCookie(t){try{const n=Lu(t.key),s=Lu(t.value),o=`; expires=${(t.expires||"").replace("expires=","")}`,a=(t.path||"/").replace("path=",""),u=t.url!=null&&t.url.length>0?`domain=${t.url}`:"";document.cookie=`${n}=${s||""}${o}; path=${a}; ${u};`}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)}}}gd("CapacitorCookies",{web:()=>new gg});const bg=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)}),wg=(e={})=>{const t=Object.keys(e);return Object.keys(e).map(o=>o.toLocaleLowerCase()).reduce((o,a,u)=>(o[a]=e[t[u]],o),{})},_g=(e,t=!0)=>e?Object.entries(e).reduce((s,o)=>{const[a,u]=o;let f,h;return Array.isArray(u)?(h="",u.forEach(y=>{f=t?encodeURIComponent(y):y,h+=`${a}=${f}&`}),h.slice(0,-1)):(f=t?encodeURIComponent(u):u,h=`${a}=${f}`),`${s}&${h}`},"").substr(1):null,kg=(e,t={})=>{const n=Object.assign({method:e.method||"GET",headers:e.headers},t),o=wg(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[u,f]of Object.entries(e.data||{}))a.set(u,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,h)=>{a.append(h,f)});else for(const f of Object.keys(e.data))a.append(f,e.data[f]);n.body=a;const u=new Headers(n.headers);u.delete("content-type"),n.headers=u}else(o.includes("application/json")||typeof e.data=="object")&&(n.body=JSON.stringify(e.data));return n};class xg extends bd{async request(t){const n=kg(t,t.webFetchExtra),s=_g(t.params,t.shouldEncodeUrlParams),o=s?`${t.url}?${s}`:t.url,a=await fetch(o,n),u=a.headers.get("content-type")||"";let{responseType:f="text"}=a.ok?t:{};u.includes("application/json")&&(f="json");let h,y;switch(f){case"arraybuffer":case"blob":y=await a.blob(),h=await bg(y);break;case"json":h=await a.json();break;case"document":case"text":default:h=await a.text()}const m={};return a.headers.forEach((k,x)=>{m[x]=k}),{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"}))}}gd("CapacitorHttp",{web:()=>new xg});async function al(e,t){const n=window;if(n.electronAPI&&n.electronAPI.saveFile){const u=await n.electronAPI.saveFile(e,t);return u&&u.saved?u.path:""}if(Zr.isNativePlatform()){const{Filesystem:u,Directory:f,Encoding:h}=await md(async()=>{const{Filesystem:y,Directory:m,Encoding:k}=await import("./index-BzA9f9V8.js");return{Filesystem:y,Directory:m,Encoding:k}},[],import.meta.url);try{return(await u.writeFile({path:e,data:t,directory:f.Documents,encoding:h.UTF8,recursive:!0})).uri}catch{return(await u.writeFile({path:e,data:t,directory:f.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 Cg=Object.freeze(Object.defineProperty({__proto__:null,downloadText:al},Symbol.toStringTag,{value:"Module"}));async function ja(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 Sg(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",u={"Content-Type":"application/json"};s&&(u.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:u,body:h})}catch{throw new Error("无法访问 AI 接口:请检查地址是否正确、服务端是否允许浏览器跨域访问")}if(!y.ok){let x="接口返回 "+y.status;try{const C=await y.json();C&&C.error&&C.error.message&&(x+=":"+C.error.message)}catch{}throw new Error(x)}const m=await y.json(),k=m&&m.choices&&m.choices[0]&&m.choices[0].message&&m.choices[0].message.content;if(!k)throw new Error("接口未返回内容");return String(k)}const Eg={class:"report"},$g={class:"report-toolbar"},Ag={class:"seg"},Tg=["onClick"],Pg=["disabled"],Og=["disabled"],Mg={key:0,class:"ai-error"},Ig={class:"report-grid"},jg={class:"report-left"},Dg={class:"card section"},Rg={class:"section-title"},Lg={class:"muted note-saved"},Kg={class:"card section"},Fg={class:"report-right"},Ng={key:0,class:"card section"},Vg={class:"sum-row"},Bg={class:"num"},Ug={class:"sum-row"},qg={class:"num"},Hg={class:"sum-row"},Wg={class:"num"},zg={class:"sum-row"},Gg={class:"num"},Yg={class:"sum-row"},Jg={class:"num"},Xg={class:"muted"},Qg={class:"num"},Zg={key:0,class:"muted sum-empty"},eb={class:"muted"},tb={key:1,class:"muted sum-empty"},nb={class:"muted"},rb={key:2,class:"muted sum-empty"},sb={class:"muted"},ob={key:3,class:"muted sum-empty"},ib=Vt({__name:"ReportView",setup(e){const t=[{key:"week",label:"本周"},{key:"month",label:"本月"},{key:"all",label:"全部"},{key:"custom",label:"自定义"}],n=N("week"),s=N(Es(xt())),o=N(xt()),a=N(null),u=N(""),f=N(!1),h=N(!1),y=N(null),m=N(""),k=N(Es(xt())),x=N(""),C=N(""),M=N(""),B=N(!1);async function re(){const P=await il(k.value);x.value=(P==null?void 0:P.highlights)||"",C.value=(P==null?void 0:P.challenges)||"",M.value=(P==null?void 0:P.plan_next)||"",B.value=!1}async function ae(){await Nv(k.value,{highlights:x.value.trim()||null,challenges:C.value.trim()||null,plan_next:M.value.trim()||null}),B.value=!0,await S()}function T(P){const j=xt();if(P==="week"){const ce=Es(j);return{start:ce,end:Kn(ce,6),label:"本周"}}if(P==="month"){const ce=j.slice(0,7);return{start:ce+"-01",end:j,label:ce+" 本月"}}return P==="all"?{start:"2000-01-01",end:j,label:"全部实习期"}:{start:s.value,end:o.value,label:s.value+" ~ "+o.value}}async function S(){f.value=!0;const P=T(n.value),j=await ug(P.start,P.end,P.label);a.value=j,u.value=cg(j),f.value=!1}bt(n,S),bt([s,o],()=>{n.value==="custom"&&S()}),dn(async()=>{await re(),await S()});async function J(){const P=xt().replace(/-/g,""),j=await al("实习工作总结_"+P+".md",u.value);ze(j?"总结已导出到:"+j:"总结已导出到系统下载目录")}async function de(){await ja(u.value),ze("总结已复制到剪贴板")}async function ie(){if(h.value)return;m.value="";const P=u.value.trim();if(!P){m.value="当前草稿为空,无法润色";return}h.value=!0;try{y.value=u.value,u.value=await Sg(P),ze("AI 润色完成")}catch(j){y.value=null,m.value=j instanceof Error?j.message:"润色失败"}h.value=!1}function ee(){y.value!==null&&(u.value=y.value),y.value=null}return(P,j)=>(F(),H("div",Eg,[c("div",$g,[c("div",Ag,[(F(),H(Le,null,ct(t,ce=>c("button",{key:ce.key,class:tt(["seg-btn",{active:n.value===ce.key}]),onClick:ke=>n.value=ce.key},ne(ce.label),11,Tg)),64))]),n.value==="custom"?(F(),H(Le,{key:0},[$e(c("input",{type:"date",class:"input w-date","onUpdate:modelValue":j[0]||(j[0]=ce=>s.value=ce)},null,512),[[Re,s.value]]),j[6]||(j[6]=c("span",{class:"muted"},"至",-1)),$e(c("input",{type:"date",class:"input w-date","onUpdate:modelValue":j[1]||(j[1]=ce=>o.value=ce)},null,512),[[Re,o.value]])],64)):Ee("",!0),j[10]||(j[10]=c("span",{class:"flex1"},null,-1)),c("button",{class:"btn btn-sm",disabled:h.value,onClick:ie},[Oe(ut,{name:"edit",size:14}),j[7]||(j[7]=nn("AI 润色 ",-1))],8,Pg),y.value!==null?(F(),H("button",{key:1,class:"btn btn-sm",onClick:ee},"还原润色前")):Ee("",!0),c("button",{class:"btn btn-sm",disabled:f.value,onClick:S},[Oe(ut,{name:"edit",size:14}),j[8]||(j[8]=nn("重新生成 ",-1))],8,Og),c("button",{class:"btn btn-sm",onClick:de},"复制"),c("button",{class:"btn btn-primary btn-sm",onClick:J},[Oe(ut,{name:"export",size:14}),j[9]||(j[9]=nn("导出 Markdown ",-1))])]),m.value?(F(),H("div",Mg,ne(m.value),1)):Ee("",!0),c("div",Ig,[c("div",jg,[c("div",Dg,[c("div",Rg,"本周周记("+ne(k.value)+" 起)",1),j[11]||(j[11]=c("label",{class:"note-label muted"},"本周亮点",-1)),$e(c("textarea",{class:"textarea","onUpdate:modelValue":j[2]||(j[2]=ce=>x.value=ce),placeholder:"本周最有价值的一件事",onBlur:ae},null,544),[[Re,x.value]]),j[12]||(j[12]=c("label",{class:"note-label muted"},"踩的坑",-1)),$e(c("textarea",{class:"textarea","onUpdate:modelValue":j[3]||(j[3]=ce=>C.value=ce),placeholder:"遇到的问题与教训",onBlur:ae},null,544),[[Re,C.value]]),j[13]||(j[13]=c("label",{class:"note-label muted"},"下周计划",-1)),$e(c("textarea",{class:"textarea","onUpdate:modelValue":j[4]||(j[4]=ce=>M.value=ce),placeholder:"下周准备做什么",onBlur:ae},null,544),[[Re,M.value]]),c("div",Lg,ne(B.value?"已保存":"失焦自动保存"),1)]),c("div",Kg,[j[14]||(j[14]=c("div",{class:"section-title"},"总结草稿(可编辑)",-1)),$e(c("textarea",{class:"textarea md-editor","onUpdate:modelValue":j[5]||(j[5]=ce=>u.value=ce),spellcheck:"false"},null,512),[[Re,u.value]])])]),c("div",Fg,[a.value?(F(),H("div",Ng,[j[20]||(j[20]=c("div",{class:"section-title"},"数据摘要",-1)),c("div",Vg,[j[15]||(j[15]=c("span",{class:"muted"},"出勤",-1)),c("span",Bg,ne(a.value.attendDays)+" 天",1)]),c("div",Ug,[j[16]||(j[16]=c("span",{class:"muted"},"工时",-1)),c("span",qg,ne(a.value.totalHours)+" 小时",1)]),c("div",Hg,[j[17]||(j[17]=c("span",{class:"muted"},"补卡",-1)),c("span",Wg,ne(a.value.makeupCount)+" 次",1)]),c("div",zg,[j[18]||(j[18]=c("span",{class:"muted"},"请假",-1)),c("span",Gg,ne(a.value.leaveCount)+" 天",1)]),c("div",Yg,[j[19]||(j[19]=c("span",{class:"muted"},"记录",-1)),c("span",Jg,ne(a.value.itemCount)+" 条",1)]),j[21]||(j[21]=c("div",{class:"section-sub"},"分类分布",-1)),(F(!0),H(Le,null,ct(a.value.categoryStats,ce=>(F(),H("div",{key:ce.key,class:"sum-row"},[c("span",Xg,ne(ce.label),1),c("span",Qg,ne(ce.count)+" 条 · "+ne(ce.percent)+"%",1)]))),128)),a.value.categoryStats.length?Ee("",!0):(F(),H("div",Zg,"(无)")),j[22]||(j[22]=c("div",{class:"section-sub"},"主要成果",-1)),(F(!0),H(Le,null,ct(a.value.milestones,(ce,ke)=>(F(),H("div",{key:"m"+ke,class:"sum-item"},[nn(ne(ce.content),1),c("span",eb,"("+ne(ce.date)+")",1)]))),128)),a.value.milestones.length?Ee("",!0):(F(),H("div",tb,"(无)")),j[23]||(j[23]=c("div",{class:"section-sub"},"待跟进",-1)),(F(!0),H(Le,null,ct(a.value.followups,(ce,ke)=>(F(),H("div",{key:"f"+ke,class:"sum-item"},[nn(ne(ce.content),1),c("span",nb,"("+ne(ce.date)+")",1)]))),128)),a.value.followups.length?Ee("",!0):(F(),H("div",rb,"(无)")),j[24]||(j[24]=c("div",{class:"section-sub"},"学习与成长",-1)),(F(!0),H(Le,null,ct(a.value.takeaways,(ce,ke)=>(F(),H("div",{key:"t"+ke,class:"sum-item"},[nn(ne(ce.text),1),c("span",sb,"("+ne(ce.date)+")",1)]))),128)),a.value.takeaways.length?Ee("",!0):(F(),H("div",ob,"(无)"))])):Ee("",!0)])])]))}}),ab=Gt(ib,[["__scopeId","data-v-43f9c59b"]]),lb=["aria-label"],ub={class:"dialog-head"},cb={class:"dialog-title"},db={class:"dialog-body"},fb={class:"form-grid"},pb={class:"field span2"},hb={class:"seg"},vb={class:"field"},mb={class:"field"},yb={class:"field"},gb=["value"],bb={key:0,class:"field"},wb={class:"seg"},_b={class:"field span2"},kb={key:0,class:"form-error"},xb={class:"dialog-btns"},Cb=Vt({__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("餐饮"),u=N(""),f=N(""),h=N(""),y=N(!1),m=N(!1),k=N(""),x=N(null);function C(ae){n.open&&ae.key==="Escape"&&s("cancel")}bt(()=>n.open,async ae=>{var T;ae?(o.value=n.initial.type==="income"?"income":"expense",a.value=n.initial.category,u.value=n.initial.amountYuan,f.value=n.initial.date,h.value=n.initial.note,y.value=n.initial.reimbursable===1,m.value=n.initial.reimbursed===1,k.value="",window.addEventListener("keydown",C),await ts(),(T=x.value)==null||T.focus()):window.removeEventListener("keydown",C)}),pr(()=>window.removeEventListener("keydown",C)),bt(o,ae=>{a.value=ae==="expense"?Wr[0]:Wo[0]});const M=at(()=>o.value==="expense"?Wr:Wo);function B(){return a.value&&M.value.includes(a.value)?a.value:M.value[0]}function re(){const ae=String(u.value??"").trim(),T=Number(ae);if(!ae||!isFinite(T)||T<=0){k.value="请填写大于 0 的金额";return}if(!f.value){k.value="请选择日期";return}const S=o.value==="expense"&&y.value?1:0;s("save",{type:o.value,category:B(),amount:Math.round(T*100),date:f.value,note:String(h.value??"").trim(),reimbursable:S,reimbursed:S&&m.value?1:0})}return(ae,T)=>(F(),It(Us,{to:"body"},[Oe(ns,{name:"modal"},{default:fr(()=>[e.open?(F(),H("div",{key:0,class:"mask",onClick:T[11]||(T[11]=Mr(S=>s("cancel"),["self"]))},[c("div",{class:"dialog",role:"dialog","aria-label":e.title},[c("div",ub,[c("span",cb,ne(e.title),1),c("button",{class:"icon-btn",title:"关闭",onClick:T[0]||(T[0]=S=>s("cancel"))},[Oe(ut,{name:"close",size:16})])]),c("div",db,[c("div",fb,[c("div",pb,[T[12]||(T[12]=c("label",null,"类型",-1)),c("div",hb,[c("button",{class:tt(["seg-btn",{active:o.value==="expense"}]),onClick:T[1]||(T[1]=S=>o.value="expense")},"支出",2),c("button",{class:tt(["seg-btn",{active:o.value==="income"}]),onClick:T[2]||(T[2]=S=>o.value="income")},"收入",2)])]),c("div",vb,[T[13]||(T[13]=c("label",null,"金额(元,必填)",-1)),$e(c("input",{ref_key:"amountInput",ref:x,class:tt(["input",{invalid:k.value}]),"onUpdate:modelValue":T[3]||(T[3]=S=>u.value=S),type:"number",min:"0",step:"0.01",placeholder:"0.00"},null,2),[[Re,u.value]])]),c("div",mb,[T[14]||(T[14]=c("label",null,"日期(必填)",-1)),$e(c("input",{class:"input",type:"date","onUpdate:modelValue":T[4]||(T[4]=S=>f.value=S)},null,512),[[Re,f.value]])]),c("div",yb,[T[15]||(T[15]=c("label",null,"分类",-1)),$e(c("select",{class:"select","onUpdate:modelValue":T[5]||(T[5]=S=>a.value=S)},[(F(!0),H(Le,null,ct(M.value,S=>(F(),H("option",{key:S,value:S},ne(S),9,gb))),128))],512),[[Fn,a.value]])]),o.value==="expense"?(F(),H("div",bb,[T[16]||(T[16]=c("label",null,"报销状态",-1)),c("div",wb,[c("button",{class:tt(["seg-btn",{active:!y.value}]),onClick:T[6]||(T[6]=S=>{y.value=!1,m.value=!1})},"无需报销",2),c("button",{class:tt(["seg-btn",{active:y.value&&!m.value}]),onClick:T[7]||(T[7]=S=>{y.value=!0,m.value=!1})},"待报销",2),c("button",{class:tt(["seg-btn",{active:y.value&&m.value}]),onClick:T[8]||(T[8]=S=>{y.value=!0,m.value=!0})},"已报销",2)])])):Ee("",!0),c("div",_b,[T[17]||(T[17]=c("label",null,"备注",-1)),$e(c("textarea",{class:"textarea","onUpdate:modelValue":T[9]||(T[9]=S=>h.value=S),placeholder:"选填"},null,512),[[Re,h.value]])])]),k.value?(F(),H("div",kb,ne(k.value),1)):Ee("",!0)]),c("div",xb,[c("button",{class:"btn btn-sm",onClick:T[10]||(T[10]=S=>s("cancel"))},"取消"),c("button",{class:"btn btn-primary btn-sm",onClick:re},"保存")])],8,lb)])):Ee("",!0)]),_:1})]))}}),Sb=Gt(Cb,[["__scopeId","data-v-edca3327"]]),Eb={class:"ledger-page"},$b={class:"ledger-toolbar"},Ab={class:"month-title num"},Tb={class:"cards"},Pb={class:"card stat-card"},Ob={class:"stat-num num amt-income"},Mb={class:"card stat-card"},Ib={class:"stat-num num"},jb={class:"card stat-card"},Db={class:"card stat-card"},Rb={class:"stat-num num amt-warn"},Lb={class:"card sec"},Kb={class:"form-grid"},Fb={class:"field span2"},Nb={class:"seg"},Vb={class:"field"},Bb={class:"field"},Ub={class:"field"},qb=["value"],Hb={key:0,class:"field"},Wb={class:"field span2"},zb={key:0,class:"form-error"},Gb={class:"form-footer"},Yb=["disabled"],Jb=["disabled"],Xb={key:0,class:"card sec"},Qb={class:"bar-label"},Zb={class:"bar-track"},ew={class:"muted num bar-num"},tw={key:1,class:"card section"},nw={class:"form-error"},rw={class:"card table-card"},sw={class:"tx-table"},ow={class:"num"},iw={class:"tag"},aw={class:"td-note"},lw={key:0,class:"muted"},uw={key:1,class:"tx-done"},cw={key:2,class:"tx-pending"},dw={class:"ops"},fw=["onClick"],pw=["onClick"],hw=["onClick"],vw={key:0},mw={class:"muted vault-note num"},yw=Vt({__name:"LedgerView",setup(e){const t=N(xt()),n=N([]),s=N(!0),o=N("expense"),a=N(""),u=N(Wr[0]),f=N(xt()),h=N(""),y=N(!1),m=N(""),k=N(""),x=N(!1),C=N(!1),M=N(null),B=N({type:"expense",category:Wr[0],amountYuan:"",date:xt(),note:"",reimbursable:0,reimbursed:0}),re=N(null),ae=at(()=>t.value.slice(0,7)+"-01"),T=at(()=>{const X=Number(t.value.slice(0,4)),Z=Number(t.value.slice(5,7))-1,_e=new Date(X,Z+1,0).getDate();return t.value.slice(0,7)+"-"+(_e<10?"0"+_e:String(_e))}),S=at(()=>Number(t.value.slice(0,4))+" 年 "+Number(t.value.slice(5,7))+" 月");async function J(){s.value=!0;try{n.value=await Gv(ae.value,T.value),k.value=""}catch(X){k.value="账目加载失败:"+(X instanceof Error?X.stack||X.message:String(X)),ze("账目加载失败")}s.value=!1}dn(J),bt(t,J),bt(o,X=>{u.value=X==="expense"?Wr[0]:Wo[0]});const de=at(()=>n.value.slice().sort((X,Z)=>X.date===Z.date?Z.id-X.id:X.date{let X=0,Z=0,_e=0;for(const Be of n.value)Be.type==="income"?X+=Be.amount:(Z+=Be.amount,Be.reimbursable===1&&Be.reimbursed!==1&&(_e+=Be.amount));return{income:X,expense:Z,pending:_e,balance:X-Z}}),ee=N("all"),P=N("all"),j=at(()=>de.value.filter(X=>!(ee.value!=="all"&&X.type!==ee.value||P.value==="pending"&&!(X.type==="expense"&&X.reimbursable===1&&X.reimbursed!==1)||P.value==="done"&&!(X.reimbursable===1&&X.reimbursed===1)))),ce=at(()=>{const X=new Map;let Z=0;for(const Be of n.value)Be.type==="expense"&&(X.set(Be.category,(X.get(Be.category)||0)+Be.amount),Z+=Be.amount);const _e=Z||1;return Array.from(X.entries()).map(Be=>({name:Be[0],amount:Be[1],percent:Math.round(Be[1]/_e*100)})).sort((Be,ft)=>ft.amount-Be.amount)});function ke(X){return(X/100).toFixed(2)}function Y(X){return(X.type==="income"?"+":"-")+ke(X.amount)}function xe(){t.value=zo(t.value,-1)}function Ve(){t.value=zo(t.value,1)}function rt(){t.value=xt()}bt(a,()=>{m.value&&(m.value="")});async function He(){const X=String(a.value??"").trim(),Z=Number(X);if(!X||!isFinite(Z)||Z<=0){m.value="请填写大于 0 的金额";return}if(!f.value){m.value="请选择日期";return}if(!x.value){x.value=!0;try{await Yv({type:o.value,category:u.value,amount:Math.round(Z*100),date:f.value,note:String(h.value??"").trim(),reimbursable:o.value==="expense"&&y.value?1:0,reimbursed:0})}catch(_e){ze("添加失败:"+(_e instanceof Error?_e.message:String(_e))),x.value=!1;return}a.value="",h.value="",y.value=!1,m.value="",await J(),ze("记账已添加"),x.value=!1}}const We=at(()=>String(a.value??"").trim()!==""||String(h.value??"").trim()!=="");function me(){a.value="",h.value="",y.value=!1,m.value=""}async function Me(X){await Qv(X.id),await J(),ze("已标记为已报销")}function Fe(X){M.value=X.id,B.value={type:X.type,category:X.category,amountYuan:ke(X.amount),date:X.date,note:X.note||"",reimbursable:X.reimbursable,reimbursed:X.reimbursed},C.value=!0}async function De(X){const Z=M.value;await Jv(Z,X),C.value=!1,await J(),ze("账目已更新")}async function Ce(){re.value&&re.value.id&&await Xv(re.value.id),re.value=null,await J(),ze("账目已删除")}return(X,Z)=>(F(),H("div",Eb,[c("div",$b,[c("button",{class:"icon-btn",onClick:xe},[Oe(ut,{name:"chevron-left",size:16})]),c("span",Ab,ne(S.value),1),c("button",{class:"icon-btn",onClick:Ve},[Oe(ut,{name:"chevron-right",size:16})]),c("button",{class:"btn btn-sm",onClick:rt},"回到本月"),Z[13]||(Z[13]=c("span",{class:"flex1"},null,-1)),$e(c("select",{class:"select w-filter","onUpdate:modelValue":Z[0]||(Z[0]=_e=>ee.value=_e)},[...Z[11]||(Z[11]=[c("option",{value:"all"},"全部类型",-1),c("option",{value:"expense"},"仅支出",-1),c("option",{value:"income"},"仅收入",-1)])],512),[[Fn,ee.value]]),$e(c("select",{class:"select w-filter","onUpdate:modelValue":Z[1]||(Z[1]=_e=>P.value=_e)},[...Z[12]||(Z[12]=[c("option",{value:"all"},"全部报销",-1),c("option",{value:"pending"},"待报销",-1),c("option",{value:"done"},"已报销",-1)])],512),[[Fn,P.value]])]),c("div",Tb,[c("div",Pb,[Z[14]||(Z[14]=c("div",{class:"muted"},"本月收入(元)",-1)),c("div",Ob,ne(ke(ie.value.income)),1)]),c("div",Mb,[Z[15]||(Z[15]=c("div",{class:"muted"},"本月支出(元)",-1)),c("div",Ib,ne(ke(ie.value.expense)),1)]),c("div",jb,[Z[16]||(Z[16]=c("div",{class:"muted"},"本月结余(元)",-1)),c("div",{class:tt(["stat-num num",{"amt-income":ie.value.balance>=0,"amt-expense":ie.value.balance<0}])},ne(ke(ie.value.balance)),3)]),c("div",Db,[Z[17]||(Z[17]=c("div",{class:"muted"},"待报销(元)",-1)),c("div",Rb,ne(ke(ie.value.pending)),1)])]),c("div",Lb,[Z[24]||(Z[24]=c("div",{class:"sec-head"},[c("span",{class:"sec-title"},"新增一笔"),c("span",{class:"muted form-hint"},"金额必填,回车快速添加")],-1)),c("div",Kb,[c("div",Fb,[Z[18]||(Z[18]=c("label",null,"类型",-1)),c("div",Nb,[c("button",{class:tt(["seg-btn",{active:o.value==="expense"}]),onClick:Z[2]||(Z[2]=_e=>o.value="expense")},"支出",2),c("button",{class:tt(["seg-btn",{active:o.value==="income"}]),onClick:Z[3]||(Z[3]=_e=>o.value="income")},"收入",2)])]),c("div",Vb,[Z[19]||(Z[19]=c("label",null,"金额(元,必填)",-1)),$e(c("input",{class:tt(["input",{invalid:m.value}]),"onUpdate:modelValue":Z[4]||(Z[4]=_e=>a.value=_e),type:"number",min:"0",step:"0.01",placeholder:"0.00",onKeydown:jt(He,["enter"])},null,34),[[Re,a.value]])]),c("div",Bb,[Z[20]||(Z[20]=c("label",null,"日期",-1)),$e(c("input",{class:"input",type:"date","onUpdate:modelValue":Z[5]||(Z[5]=_e=>f.value=_e)},null,512),[[Re,f.value]])]),c("div",Ub,[Z[21]||(Z[21]=c("label",null,"分类",-1)),$e(c("select",{class:"select","onUpdate:modelValue":Z[6]||(Z[6]=_e=>u.value=_e)},[(F(!0),H(Le,null,ct(o.value==="expense"?Qt(Wr):Qt(Wo),_e=>(F(),H("option",{key:_e,value:_e},ne(_e),9,qb))),128))],512),[[Fn,u.value]])]),o.value==="expense"?(F(),H("div",Hb,[Z[22]||(Z[22]=c("label",null,"报销",-1)),c("button",{class:tt(["toggle-btn",{on:y.value}]),onClick:Z[7]||(Z[7]=_e=>y.value=!y.value)},ne(y.value?"需要报销":"无需报销"),3)])):Ee("",!0),c("div",Wb,[Z[23]||(Z[23]=c("label",null,"备注",-1)),$e(c("input",{class:"input","onUpdate:modelValue":Z[8]||(Z[8]=_e=>h.value=_e),placeholder:"选填,如:客户现场午餐",onKeydown:jt(He,["enter"])},null,544),[[Re,h.value]])])]),m.value?(F(),H("div",zb,ne(m.value),1)):Ee("",!0),c("div",Gb,[c("button",{class:"btn btn-sm",disabled:!We.value,onClick:me},"重置",8,Yb),c("button",{class:"btn btn-primary btn-sm",disabled:x.value,onClick:He},"添加记录",8,Jb)])]),ce.value.length?(F(),H("div",Xb,[Z[25]||(Z[25]=c("div",{class:"sec-title"},"本月支出分类",-1)),(F(!0),H(Le,null,ct(ce.value,_e=>(F(),H("div",{key:_e.name,class:"bar-row"},[c("span",Qb,ne(_e.name),1),c("span",Zb,[c("span",{class:"bar-fill",style:or({width:_e.percent+"%"})},null,4)]),c("span",ew,ne(ke(_e.amount))+" 元 · "+ne(_e.percent)+"%",1)]))),128))])):Ee("",!0),k.value?(F(),H("div",tw,[c("div",nw,ne(k.value),1),Z[26]||(Z[26]=c("div",{class:"muted loc-note"},"请将上方完整错误文字发送给开发者",-1))])):Ee("",!0),c("div",rw,[c("table",sw,[Z[28]||(Z[28]=c("thead",null,[c("tr",null,[c("th",null,"日期"),c("th",null,"分类"),c("th",null,"金额(元)"),c("th",null,"备注"),c("th",null,"报销"),c("th",{class:"th-ops"},"操作")])],-1)),c("tbody",null,[(F(!0),H(Le,null,ct(j.value,_e=>(F(),H("tr",{key:_e.id},[c("td",ow,ne(_e.date),1),c("td",null,[c("span",iw,ne(_e.category),1)]),c("td",{class:tt(["num",_e.type==="income"?"amt-income":"amt-expense"])},ne(Y(_e)),3),c("td",aw,ne(_e.note||"--"),1),c("td",null,[_e.type!=="expense"||_e.reimbursable!==1?(F(),H("span",lw,"--")):_e.reimbursed===1?(F(),H("span",uw,"已报销")):(F(),H("span",cw,"待报销"))]),c("td",null,[c("div",dw,[_e.type==="expense"&&_e.reimbursable===1&&_e.reimbursed!==1?(F(),H("button",{key:0,class:"btn btn-xs",onClick:Be=>Me(_e)},"标记已报销",8,fw)):Ee("",!0),c("button",{class:"btn btn-xs",onClick:Be=>Fe(_e)},"编辑",8,pw),c("button",{class:"btn btn-xs",onClick:Be=>re.value=_e},"删除",8,hw)])])]))),128)),!j.value.length&&!s.value?(F(),H("tr",vw,[...Z[27]||(Z[27]=[c("td",{colspan:"6",class:"empty muted"},"本月暂无账目",-1)])])):Ee("",!0)])])]),c("div",mw,"筛选结果 "+ne(j.value.length)+" 条 / 本月共 "+ne(n.value.length)+" 条",1),Oe(Sb,{open:C.value,title:(M.value,"编辑账目"),initial:B.value,onCancel:Z[9]||(Z[9]=_e=>C.value=!1),onSave:De},null,8,["open","title","initial"]),Oe(cr,{open:!!re.value,title:"删除确认",message:re.value?"将删除 "+re.value.date+" 的账目("+re.value.category+" "+ke(re.value.amount)+" 元)。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:Z[10]||(Z[10]=_e=>re.value=null),onConfirm:Ce},null,8,["open","message"])]))}}),gw=Gt(yw,[["__scopeId","data-v-0f950d19"]]),bw={class:"memo-page"},ww={class:"card memo-list"},_w={class:"pane-head"},kw={class:"pane-title"},xw={class:"memo-scroll"},Cw=["onClick"],Sw={class:"memo-item-title"},Ew={class:"muted memo-item-sub"},$w={class:"muted num memo-item-time"},Aw={key:0,class:"muted empty"},Tw={class:"card memo-editor"},Pw={class:"editor-foot"},Ow={class:"muted foot-info"},Mw=["disabled"],Iw=["disabled"],jw={key:1,class:"empty muted editor-empty"},Dw=Vt({__name:"MemoView",setup(e){const t=N([]),n=N(null),s=N(!1),o=N(""),a=N(""),u=N(null),f=N(null);async function h(){if(t.value=await Bv(),n.value&&n.value.id){const ie=t.value.find(ee=>ee.id===n.value.id);ie&&(n.value=ie)}}dn(async()=>{await h(),t.value.length&&k(t.value[0]),window.addEventListener("keydown",y)}),pr(()=>window.removeEventListener("keydown",y)),bt(Ia,async ie=>{if(!ie)return;t.value.length||await h();const ee=t.value.find(P=>P.id===ie);Ia.value=null,ee&&x(ee)},{immediate:!0});function y(ie){(ie.ctrlKey||ie.metaKey)&&ie.key.toLowerCase()==="s"&&s.value&&m.value&&(ie.preventDefault(),re())}const m=at(()=>{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 k(ie){n.value=ie,s.value=!0,o.value=ie.title,a.value=ie.content}function x(ie){if(!(s.value&&n.value&&n.value.id===ie.id)){if(m.value){f.value={type:"select",memo:ie};return}k(ie)}}function C(){if(m.value){f.value={type:"new"};return}M()}function M(){n.value=null,s.value=!0,o.value="",a.value=""}function B(){n.value?k(n.value):M()}async function re(){if(!o.value.trim()&&!a.value.trim()){ze("标题与内容不能都为空");return}if(n.value&&n.value.id)await qv(n.value.id,o.value,a.value),ze("备忘已保存");else{const ie=await Uv(o.value,a.value);n.value=ie,o.value=ie.title,a.value=ie.content,ze("备忘已创建")}await h()}function ae(){n.value&&n.value.id&&(u.value=n.value)}async function T(){u.value&&u.value.id&&(await Hv(u.value.id),ze("备忘已删除")),u.value=null,await h(),M()}function S(){const ie=f.value;f.value=null,ie&&(ie.type==="select"?k(ie.memo):M())}function J(ie){return(ie.content||"").replace(/\s+/g," ").slice(0,30)}function de(ie){return ie.replace("T"," ").slice(0,16)}return(ie,ee)=>(F(),H("div",bw,[c("aside",ww,[c("div",_w,[c("span",kw,"备忘录("+ne(t.value.length)+")",1),c("button",{class:"btn btn-primary btn-sm",onClick:C},"新建")]),c("div",xw,[(F(!0),H(Le,null,ct(t.value,P=>(F(),H("div",{key:P.id,class:tt(["memo-item",{active:s.value&&n.value&&n.value.id===P.id}]),onClick:j=>x(P)},[c("div",Sw,ne(P.title||"无标题"),1),c("div",Ew,ne(J(P)||"空"),1),c("div",$w,ne(de(P.updated_at)),1)],10,Cw))),128)),t.value.length?Ee("",!0):(F(),H("div",Aw,"暂无备忘"))])]),c("section",Tw,[s.value?(F(),H(Le,{key:0},[$e(c("input",{class:"input title-input","onUpdate:modelValue":ee[0]||(ee[0]=P=>o.value=P),placeholder:"标题"},null,512),[[Re,o.value]]),$e(c("textarea",{class:"textarea content-textarea","onUpdate:modelValue":ee[1]||(ee[1]=P=>a.value=P),placeholder:"内容"},null,512),[[Re,a.value]]),c("div",Pw,[c("span",Ow,[m.value?(F(),H(Le,{key:0},[nn("有未保存修改")],64)):n.value&&n.value.id?(F(),H(Le,{key:1},[nn("更新于 "+ne(de(n.value.updated_at)),1)],64)):(F(),H(Le,{key:2},[nn("新备忘")],64))]),ee[4]||(ee[4]=c("span",{class:"flex1"},null,-1)),n.value&&n.value.id?(F(),H("button",{key:0,class:"btn btn-sm",onClick:ae},"删除")):Ee("",!0),c("button",{class:"btn btn-sm",disabled:!m.value,onClick:B},"放弃修改",8,Mw),c("button",{class:"btn btn-primary btn-sm",disabled:!m.value,onClick:re},"保存",8,Iw)])],64)):(F(),H("div",jw,"选择左侧备忘,或点击右上角新建"))]),Oe(cr,{open:!!u.value,title:"删除确认",message:u.value?"将删除备忘「"+(u.value.title||"无标题")+"」。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:ee[2]||(ee[2]=P=>u.value=null),onConfirm:T},null,8,["open","message"]),Oe(cr,{open:!!f.value,title:"未保存提示",message:"当前备忘有未保存的修改,继续操作将丢失这些修改。","confirm-text":"放弃修改并继续",onCancel:ee[3]||(ee[3]=P=>f.value=null),onConfirm:S},null,8,["open"])]))}}),Rw=Gt(Dw,[["__scopeId","data-v-74d60dba"]]),Lw=["aria-label"],Kw={class:"dialog-head"},Fw={class:"dialog-title"},Nw={class:"dialog-body"},Vw={class:"form-grid"},Bw={class:"field span2"},Uw={class:"field span2"},qw={class:"field span2"},Hw={class:"pwd-row"},Ww={class:"field span2"},zw={key:0,class:"form-error"},Gw={class:"dialog-btns"},Yw=Vt({__name:"CredentialDialog",props:{open:{type:Boolean},title:{},initial:{}},emits:["cancel","save"],setup(e,{emit:t}){const n=e,s=t,o=N(""),a=N(""),u=N(""),f=N(""),h=N(""),y=N(null);function m(C){n.open&&C.key==="Escape"&&s("cancel")}bt(()=>n.open,async C=>{var M;C?(o.value=n.initial.system,a.value=n.initial.account,u.value=n.initial.password,f.value=n.initial.remark,h.value="",window.addEventListener("keydown",m),await ts(),(M=y.value)==null||M.focus()):window.removeEventListener("keydown",m)}),pr(()=>window.removeEventListener("keydown",m));function k(){const C="ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz23456789",M="!@#$%^&*",B=crypto.getRandomValues(new Uint8Array(14));let re="";for(let ae=0;ae(F(),It(Us,{to:"body"},[Oe(ns,{name:"modal"},{default:fr(()=>[e.open?(F(),H("div",{key:0,class:"mask",onClick:M[6]||(M[6]=Mr(B=>s("cancel"),["self"]))},[c("div",{class:"dialog",role:"dialog","aria-label":e.title},[c("div",Kw,[c("span",Fw,ne(e.title),1),c("button",{class:"icon-btn",title:"关闭",onClick:M[0]||(M[0]=B=>s("cancel"))},[Oe(ut,{name:"close",size:16})])]),c("div",Nw,[c("div",Vw,[c("div",Bw,[M[7]||(M[7]=c("label",null,"系统名称(必填)",-1)),$e(c("input",{ref_key:"systemInput",ref:y,class:"input","onUpdate:modelValue":M[1]||(M[1]=B=>o.value=B),placeholder:"如:企业邮箱 / OA / VPN"},null,512),[[Re,o.value]])]),c("div",Uw,[M[8]||(M[8]=c("label",null,"账号(必填)",-1)),$e(c("input",{class:"input","onUpdate:modelValue":M[2]||(M[2]=B=>a.value=B),placeholder:"用户名、工号或邮箱"},null,512),[[Re,a.value]])]),c("div",qw,[M[9]||(M[9]=c("label",null,"密码(必填)",-1)),c("div",Hw,[$e(c("input",{class:"input","onUpdate:modelValue":M[3]||(M[3]=B=>u.value=B),placeholder:"输入或点击生成"},null,512),[[Re,u.value]]),c("button",{class:"btn btn-sm",onClick:k},"生成")])]),c("div",Ww,[M[10]||(M[10]=c("label",null,"备注",-1)),$e(c("textarea",{class:"textarea","onUpdate:modelValue":M[4]||(M[4]=B=>f.value=B),placeholder:"用途、到期时间、负责人等(选填)"},null,512),[[Re,f.value]])])]),h.value?(F(),H("div",zw,ne(h.value),1)):Ee("",!0)]),c("div",Gw,[c("button",{class:"btn btn-sm",onClick:M[5]||(M[5]=B=>s("cancel"))},"取消"),c("button",{class:"btn btn-primary btn-sm",onClick:x},"保存")])],8,Lw)])):Ee("",!0)]),_:1})]))}}),Jw=Gt(Yw,[["__scopeId","data-v-f383b0a6"]]),wd=15e4;function Yo(e){const t=new Uint8Array(e);let n="";for(let s=0;s{n.value&&(ei(),n.value=!1,y.value=[],k.value={},ze("长时间未操作,密码库已自动锁定"))},F_)}function P(){n.value&&ee()}dn(async()=>{t.value=await kd(),window.addEventListener("click",P),window.addEventListener("keydown",P),n.value&&ee()}),pr(()=>{window.removeEventListener("click",P),window.removeEventListener("keydown",P),ie!==null&&window.clearTimeout(ie)});const j=at(()=>{const Ce=m.value.trim().toLowerCase();return Ce?y.value.filter(X=>(X.system+" "+X.account+" "+(X.remark||"")).toLowerCase().includes(Ce)):y.value});async function ce(){if(!s.value){if(u.value="",!o.value){u.value="请输入主密码";return}if(o.value.length<6){u.value="主密码至少 6 位";return}if(o.value!==a.value){u.value="两次输入的主密码不一致";return}s.value=!0;try{await Qw(o.value),o.value="",a.value="",n.value=!0,ee(),await de(),ze("主密码已设置,密码库已解锁")}catch(Ce){u.value=Ce instanceof Error?Ce.message:"设置失败"}s.value=!1}}async function ke(){if(!s.value){if(h.value="",!f.value){h.value="请输入主密码";return}s.value=!0;try{await Zw(f.value),f.value="",n.value=!0,ee(),await de()}catch(Ce){h.value=Ce instanceof Error?Ce.message:"解锁失败"}s.value=!1}}function Y(){ei(),n.value=!1,y.value=[],k.value={},ie!==null&&window.clearTimeout(ie),ze("密码库已锁定")}async function xe(Ce){const X=Ce.id;if(k.value[X]){k.value[X]=!1;return}try{Ce.passwordPlain=await pa(X),k.value[X]=!0}catch(Z){ze(Z instanceof Error?Z.message:"解密失败")}}async function Ve(Ce){try{const X=await pa(Ce.id);await ja(X),ze("密码已复制")}catch(X){ze(X instanceof Error?X.message:"复制失败")}}async function rt(Ce){await ja(Ce.account),ze("账号已复制")}function He(){C.value=null,M.value={system:"",account:"",password:"",remark:""},x.value=!0}async function We(Ce){try{const X=await pa(Ce.id);C.value=Ce.id,M.value={system:Ce.system,account:Ce.account,password:X,remark:Ce.remark||""},x.value=!0}catch(X){ze(X instanceof Error?X.message:"解密失败")}}async function me(Ce){const X=C.value??void 0;await r_(Ce,X),x.value=!1,await de(),ze(X?"账号已更新":"账号已添加")}async function Me(){B.value&&B.value.id&&(await s_(B.value.id),ze("账号已删除")),B.value=null,await de()}function Fe(){ae.value="",T.value="",S.value="",J.value="",re.value=!0}async function De(){J.value="";try{const Ce=await o_(ae.value,T.value);re.value=!1,ae.value="",T.value="",S.value="",ze("主密码已修改,"+Ce+" 条账号密码已重新加密")}catch(Ce){J.value=Ce instanceof Error?Ce.message:"修改失败"}}return(Ce,X)=>(F(),H("div",a_,[t.value===null?(F(),H("div",l_,"加载中")):n.value?(F(),H(Le,{key:2},[c("div",v_,[c("div",m_,[Oe(ut,{name:"search",size:14,class:"search-icon"}),$e(c("input",{class:"input","onUpdate:modelValue":X[3]||(X[3]=Z=>m.value=Z),placeholder:"搜索系统名称、账号或备注"},null,512),[[Re,m.value]])]),X[16]||(X[16]=c("span",{class:"flex1"},null,-1)),c("button",{class:"btn btn-sm",onClick:Fe},"修改主密码"),c("button",{class:"btn btn-sm",onClick:Y},"锁定"),c("button",{class:"btn btn-primary btn-sm",onClick:He},"新增账号")]),c("div",y_,[c("table",g_,[X[18]||(X[18]=c("thead",null,[c("tr",null,[c("th",null,"系统名称"),c("th",null,"账号"),c("th",null,"密码"),c("th",null,"备注"),c("th",{class:"th-ops"},"操作")])],-1)),c("tbody",null,[(F(!0),H(Le,null,ct(j.value,Z=>(F(),H("tr",{key:Z.id},[c("td",b_,ne(Z.system),1),c("td",null,[c("span",{class:"copyable",title:"点击复制账号",onClick:_e=>rt(Z)},ne(Z.account),9,w_)]),c("td",null,[c("div",__,[c("span",k_,ne(k.value[Z.id]?Z.passwordPlain:"........"),1),c("button",{class:"btn btn-xs",onClick:_e=>xe(Z)},ne(k.value[Z.id]?"隐藏":"显示"),9,x_),c("button",{class:"btn btn-xs",onClick:_e=>Ve(Z)},"复制",8,C_)])]),c("td",S_,ne(Z.remark||"--"),1),c("td",null,[c("div",E_,[c("button",{class:"btn btn-xs",onClick:_e=>We(Z)},"编辑",8,$_),c("button",{class:"btn btn-xs",onClick:_e=>B.value=Z},"删除",8,A_)])])]))),128)),j.value.length?Ee("",!0):(F(),H("tr",T_,[...X[17]||(X[17]=[c("td",{colspan:"5",class:"empty muted"},"暂无账号,点击右上角新增",-1)])]))])])]),c("div",P_,"共 "+ne(y.value.length)+" 条账号记录 · 密码以 AES-256-GCM 加密存储于本机",1)],64)):(F(),H("div",u_,[c("div",c_,[Oe(ut,{name:"lock",size:26})]),t.value===!1?(F(),H(Le,{key:0},[X[12]||(X[12]=c("div",{class:"lock-title"},"设置主密码",-1)),X[13]||(X[13]=c("div",{class:"muted lock-tip"},"主密码用于加密保存在本机的账号密码,遗忘后无法找回,请务必牢记",-1)),$e(c("input",{type:"password",class:"input","onUpdate:modelValue":X[0]||(X[0]=Z=>o.value=Z),placeholder:"设置主密码(至少 6 位)",onKeydown:jt(ce,["enter"])},null,544),[[Re,o.value]]),$e(c("input",{type:"password",class:"input","onUpdate:modelValue":X[1]||(X[1]=Z=>a.value=Z),placeholder:"再次输入主密码",onKeydown:jt(ce,["enter"])},null,544),[[Re,a.value]]),u.value?(F(),H("div",d_,ne(u.value),1)):Ee("",!0),c("button",{class:"btn btn-primary lock-btn",disabled:s.value,onClick:ce},"完成设置并解锁",8,f_)],64)):(F(),H(Le,{key:1},[X[14]||(X[14]=c("div",{class:"lock-title"},"密码库已锁定",-1)),X[15]||(X[15]=c("div",{class:"muted lock-tip"},"输入主密码解锁后查看与复制密码",-1)),$e(c("input",{type:"password",class:"input","onUpdate:modelValue":X[2]||(X[2]=Z=>f.value=Z),placeholder:"主密码",onKeydown:jt(ke,["enter"])},null,544),[[Re,f.value]]),h.value?(F(),H("div",p_,ne(h.value),1)):Ee("",!0),c("button",{class:"btn btn-primary lock-btn",disabled:s.value,onClick:ke},"解锁",8,h_)],64))])),Oe(Jw,{open:x.value,title:C.value?"编辑账号":"新增账号",initial:M.value,onCancel:X[4]||(X[4]=Z=>x.value=!1),onSave:me},null,8,["open","title","initial"]),Oe(cr,{open:!!B.value,title:"删除确认",message:B.value?"将删除系统「"+B.value.system+"」的账号记录。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:X[5]||(X[5]=Z=>B.value=null),onConfirm:Me},null,8,["open","message"]),(F(),It(Us,{to:"body"},[Oe(ns,{name:"modal"},{default:fr(()=>[re.value?(F(),H("div",{key:0,class:"mask",onClick:X[11]||(X[11]=Mr(Z=>re.value=!1,["self"]))},[c("div",O_,[c("div",M_,[X[19]||(X[19]=c("span",{class:"dialog-title"},"修改主密码",-1)),c("button",{class:"icon-btn",title:"关闭",onClick:X[6]||(X[6]=Z=>re.value=!1)},[Oe(ut,{name:"close",size:16})])]),c("div",I_,[c("div",j_,[X[20]||(X[20]=c("label",null,"旧主密码",-1)),$e(c("input",{type:"password",class:"input","onUpdate:modelValue":X[7]||(X[7]=Z=>ae.value=Z)},null,512),[[Re,ae.value]])]),c("div",D_,[X[21]||(X[21]=c("label",null,"新主密码(至少 6 位)",-1)),$e(c("input",{type:"password",class:"input","onUpdate:modelValue":X[8]||(X[8]=Z=>T.value=Z)},null,512),[[Re,T.value]])]),c("div",R_,[X[22]||(X[22]=c("label",null,"确认新主密码",-1)),$e(c("input",{type:"password",class:"input","onUpdate:modelValue":X[9]||(X[9]=Z=>S.value=Z)},null,512),[[Re,S.value]])]),J.value?(F(),H("div",L_,ne(J.value),1)):Ee("",!0),X[23]||(X[23]=c("div",{class:"muted vp-tip"},"确认后所有账号密码将使用新主密码重新加密",-1))]),c("div",K_,[c("button",{class:"btn btn-sm",onClick:X[10]||(X[10]=Z=>re.value=!1)},"取消"),c("button",{class:"btn btn-primary btn-sm",onClick:De},"确认修改")])])])):Ee("",!0)]),_:1})]))]))}}),V_=Gt(N_,[["__scopeId","data-v-6820bc9c"]]);function B_(e){return'"'+(e==null?"":String(e)).replace(/"/g,'""')+'"'}async function Fu(e,t){const s="\uFEFF"+t.map(f=>f.map(B_).join(",")).join(`\r +`);if(Zr.isNativePlatform()){const{downloadText:f}=await md(async()=>{const{downloadText:h}=await Promise.resolve().then(()=>Cg);return{downloadText:h}},void 0,import.meta.url);return f(e,s)}const o=new Blob([s],{type:"text/csv;charset=utf-8"}),a=URL.createObjectURL(o),u=document.createElement("a");return u.href=a,u.download=e,u.click(),window.setTimeout(()=>URL.revokeObjectURL(a),1e4),""}class U_ extends Ir{constructor(){super("intern_worklog_users"),this.version(1).stores({user:"id, &username"})}}const Or=new U_,bi="intern_worklog",ul="dsh_session_user";function Gs(){try{const e=localStorage.getItem(ul);if(!e)return null;const t=JSON.parse(e);if(t&&t.userId&&t.username)return t}catch{}return null}function Cd(e){localStorage.setItem(ul,JSON.stringify(e))}function Sd(){localStorage.removeItem(ul)}const cl="dsh_cloud_creds";function Ed(e,t){localStorage.setItem(cl,JSON.stringify({username:e,password:t}))}function wi(){try{const e=localStorage.getItem(cl);if(!e)return null;const t=JSON.parse(e);if(t&&t.username&&t.password)return t}catch{}return null}function $d(){localStorage.removeItem(cl)}let ti=null;function Fs(e){ti===e&&Q||(Q&&rl(),tv(new dd(bi+"_"+e)),ti=e)}async function q_(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 位");if(await Or.user.where("username").equals(s).first())throw new Error("用户名已存在");const a=ll(),u=await Xo(t,a),f="u_"+Date.now().toString(36)+"_"+Math.random().toString(36).slice(2,6);await Or.user.add({id:f,username:s,pwd_hash:u,pwd_salt:a,created_at:new Date().toISOString()}),Fs(f);let h=0;n&&await Ad()&&(h=await Y_(),await Or.user.update(f,{legacy_imported_at:new Date().toISOString()}));const y={userId:f,username:s};return Cd(y),Ed(y.username,t),h&&J_(h),y}async function H_(e,t){const n=e.trim(),s=await Or.user.where("username").equals(n).first();if(!s)throw new Error("用户不存在");if(await Xo(t,s.pwd_salt)!==s.pwd_hash)throw new Error("密码不正确");Fs(s.id);const a={userId:s.id,username:s.username};return Cd(a),Ed(a.username,t),a}async function W_(){ei(),rl(),ti=null,Sd(),$d()}async function z_(e,t){const n=Gs();if(!n)throw new Error("未登录");if(t.length<6)throw new Error("新密码至少 6 位");const s=await Or.user.get(n.userId);if(!s)throw new Error("用户不存在");if(await Xo(e,s.pwd_salt)!==s.pwd_hash)throw new Error("旧密码不正确");const a=ll(),u=await Xo(t,a);await Or.user.update(s.id,{pwd_hash:u,pwd_salt:a})}async function G_(){const e=Gs();if(!e)throw new Error("未登录");ei(),rl(),ti=null,await Ir.delete(bi+"_"+e.userId),await Or.user.delete(e.userId),Sd(),$d()}async function Ad(){return Ir.exists(bi)}async function Y_(){if(!Q)throw new Error("用户数据库未就绪");const e=new dd(bi),t=await Promise.all([e.project.toArray(),e.work_log.toArray(),e.log_item.toArray(),e.attendance.toArray(),e.weekly_note.toArray(),e.setting.toArray(),e.memo.toArray(),e.credential.toArray()]);await Q.transaction("rw",[Q.project,Q.work_log,Q.log_item,Q.attendance,Q.weekly_note,Q.setting,Q.memo,Q.credential],async()=>{await Promise.all([Q.project.clear(),Q.work_log.clear(),Q.log_item.clear(),Q.attendance.clear(),Q.weekly_note.clear(),Q.setting.clear(),Q.memo.clear(),Q.credential.clear()]),t[0].length&&await Q.project.bulkAdd(t[0]),t[1].length&&await Q.work_log.bulkAdd(t[1]),t[2].length&&await Q.log_item.bulkAdd(t[2]),t[3].length&&await Q.attendance.bulkAdd(t[3]),t[4].length&&await Q.weekly_note.bulkAdd(t[4]),t[5].length&&await Q.setting.bulkAdd(t[5]),t[6].length&&await Q.memo.bulkAdd(t[6]),t[7].length&&await Q.credential.bulkAdd(t[7])});const n=t[0].length+t[1].length+t[2].length+t[3].length+t[4].length+t[6].length+t[7].length;return e.close(),n}function J_(e){try{sessionStorage.setItem("dsh_migrate_toast",String(e))}catch{}}const Ns=["project","work_log","log_item","attendance","weekly_note","setting","memo","credential","transaction"],Da=new Set(["sync_cursor","sync_last_time","sync_token","last_project","last_category"]),X_={project:"name",work_log:"date",attendance:"date",weekly_note:"week_start",setting:"key"};function Q_(){return typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}function Nu(e){return JSON.stringify(e)}async function Z_(e){return Q.table(e).toArray()}function Ra(e,t){return e==="setting"?t.key:t.id}async function e1(){for(const e of Ns){const t=Q.table(e),n=await t.toArray();for(const s of n){if(e==="setting"&&Da.has(s.key))continue;const o={};s.uuid||(o.uuid=Q_()),s.updated_at||(o.updated_at=s.created_at||vt()),Object.keys(o).length&&await t.update(Ra(e,s),o)}}}async function t1(){return wi()!=null}async function n1(){return gt("sync_last_time","")}async function Td(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 r1(e,t){let n=await gt("sync_token","");return n||(n=await Td(e,t),await kt("sync_token",n),n)}let $s=!1,Io=!1,La=!1,Gr=null,wn=null,Ka="",Vu=!1,jo=null;async function Yr(){if($s){Io=!0;return}try{if(!await t1())return;await Md(await Pd())}catch{}}function s1(){if(Vu)return;Vu=!0,jo=ev(async()=>{const t={};for(const n of Ns)t[n]=await Q.table(n).count();return t}).subscribe({next:()=>{La||$s||(Gr&&globalThis.clearTimeout(Gr),Gr=globalThis.setTimeout(()=>{Yr()},3e3))},error:()=>{}})}function o1(){jo&&(jo.unsubscribe(),jo=null),wn&&(wn.close(),wn=null,Ka=""),Gr&&(globalThis.clearTimeout(Gr),Gr=null)}function i1(e,t){const n=e+"|"+t;if(!(wn&&Ka===n)){wn&&(wn.close(),wn=null);try{wn=new EventSource(e+"/api/events?token="+encodeURIComponent(t)),Ka=n,wn.onmessage=()=>{Yr()}}catch{wn=null}}}async function dl(){return await gt("sync_base_url","")||a1}const a1="https://daywk.linyux.cn";async function Pd(){const e=wi();if(!e)throw new Error("未登录,无法同步");return{baseUrl:await dl(),username:e.username,password:e.password}}async function Od(){const e=wi();if(!e)throw new Error("未登录");const t=await dl(),n={"Content-Type":"application/json"},s=JSON.stringify({username:e.username,password:e.password});let o=await fetch(t+"/api/auth/register",{method:"POST",headers:n,body:s});if(o.status===409){if(o=await fetch(t+"/api/auth/login",{method:"POST",headers:n,body:s}),!o.ok)throw new Error("云端已存在同名账号且密码不一致,请检查")}else if(!o.ok)throw new Error("云端绑定失败:"+o.status)}async function l1(){return Md(await Pd())}function Bu(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 Uu(){const e=await Q.work_log.toArray(),t=await Q.project.toArray();return{workLog:new Map(e.map(n=>[n.id,n])),project:new Map(t.map(n=>[n.id,n]))}}let Do=0;async function Md(e){if($s)return Io=!0,{pushed:0,pulled:0,removed:0,errors:0,at:""};$s=!0,La=!0,Do=0;try{const t=await u1(e);return Io&&(Io=!1,globalThis.setTimeout(()=>{Yr()},800)),t}finally{$s=!1,La=!1}}async function u1(e){const t=e.baseUrl.trim().replace(/\/+$/,"");if(!t)throw new Error("请先配置同步服务地址");await e1();const n=await Uu(),s=await Q.sync_mirror.toArray(),o=new Map;for(const S of s)o.set(S.table+"|"+S.uuid,S);const a={},u=[];let f=0;for(const S of Ns){let J=await Z_(S);S==="setting"&&(J=J.filter(ie=>!Da.has(ie.key)));const de=new Map;for(const ie of J)de.set(ie.uuid,ie);for(const[ie,ee]of de){const P=Bu(S,ee,n),j=Nu(P),ce=o.get(S+"|"+ie);(!ce||ce.hash!==j)&&(a[S]=a[S]||[],a[S].push(P),f++)}for(const[ie,ee]of o)ie.startsWith(S+"|")&&!de.has(ee.uuid)&&u.push({table:S,uuid:ee.uuid,deleted_at:vt()});a[S]=a[S]||[]}const h=await Q.tombstone.toArray();for(const S of h)u.push({table:S.table,uuid:S.uuid,deleted_at:S.deleted_at});const y=await r1(t,e),m=S=>fetch(t+"/api/sync",{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+S},body:JSON.stringify({device:"client",tables:a,tombstones:u})});let k=await m(y);if(k.status===401){await kt("sync_token","");const S=await Td(t,e);await kt("sync_token",S),k=await m(S)}if(!k.ok)throw new Error("同步服务返回 "+k.status);const x=await k.json(),C=x.tables||{},M=x.tombstones||[],B=await d1(C,M),re=await Uu(),ae=[];for(const S of Ns){const J=await Q.table(S).toArray();for(const de of J)S==="setting"&&Da.has(de.key)||ae.push({table:S,uuid:de.uuid,hash:Nu(Bu(S,de,re))})}await Q.sync_mirror.clear(),ae.length&&await Q.sync_mirror.bulkAdd(ae.map(S=>({...S}))),i1(t,y);const T=vt();if(await kt("sync_last_time",T),(B.pulled>0||B.removed>0)&&nr(),h.length){const S=new Set(h.map(J=>J.id));await Q.tombstone.where("id").anyOf(Array.from(S)).delete()}return{pushed:f,pulled:B.pulled,removed:B.removed,errors:B.errors,at:T}}let ha=new Map,va=new Map,c1=0;async function d1(e,t){let n=0,s=0;for(const o of Ns){const a=Q.table(o),u=await a.toArray(),f=new Map;for(const x of u)f.set(x.uuid,x);const h=X_[o]||null,y=new Map;if(h)for(const x of u){const C=x[h];C!=null&&C!==""&&y.set(String(C),x)}const m=new Set(t.filter(x=>x.table===o).map(x=>x.uuid)),k=e[o]||[];for(const x of k)try{if(m.has(x.uuid))continue;const C=f.get(x.uuid);if(C){const M=String(C.updated_at||"");if(String(x.updated_at||"")>M){const re={...x};if(o==="setting"&&delete re.key,o==="log_item"){const ae=x.wuuid?ha.get(x.wuuid):null;if(!ae)continue;re.work_log_id=ae,delete re.wuuid,re.project_id=x.puuid?va.get(x.puuid)??null:C.project_id??null,delete re.puuid}await a.update(C.id,re),n++}}else{const M=h&&x[h]!=null&&x[h]!==""?String(x[h]):null,B=M?y.get(M):void 0;if(B&&B.uuid!==x.uuid){const re=String(B.updated_at||"");if(String(x.updated_at||"")>=re){o==="work_log"&&await Q.log_item.where("work_log_id").equals(B.id).modify({work_log_id:-1}),await a.delete(Ra(o,B)),await Q.tombstone.add({table:o,uuid:B.uuid,deleted_at:vt()});const T=await a.add({...x});o==="work_log"&&await Q.log_item.where("work_log_id").equals(-1).modify({work_log_id:T}),f.set(x.uuid,{...x,id:T}),h&&M&&y.set(M,{...x,id:T}),n++}else await Q.tombstone.add({table:o,uuid:x.uuid,deleted_at:vt()}),c1++}else{if(o==="log_item"){const ae=x.wuuid?ha.get(x.wuuid):null;if(!ae)continue;x.work_log_id=ae,delete x.wuuid,x.project_id=x.puuid?va.get(x.puuid)??null:null,delete x.puuid}const re=await a.add({...x});f.set(x.uuid,{...x,id:re}),h&&M&&y.set(M,{...x,id:re}),n++}}}catch(C){Do++,C instanceof Error?C.message:String(C)}for(const x of u)if(m.has(x.uuid))try{if(o==="work_log"){const M=(await a.toArray()).find(B=>B.date===x.date&&!m.has(B.uuid)&&B.uuid!==x.uuid);M&&x.id&&await Q.log_item.where("work_log_id").equals(x.id).modify({work_log_id:M.id})}await a.delete(Ra(o,x)),s++}catch{Do++}if(o==="work_log"){const x=await a.toArray();ha=new Map(x.map(C=>[C.uuid,C.id]))}if(o==="project"){const x=await a.toArray();va=new Map(x.map(C=>[C.uuid,C.id]))}}return{pulled:n,removed:s,errors:Do}}const f1={class:"settings"},p1={class:"card section"},h1={class:"muted acc-line"},v1={class:"ai-grid"},m1={class:"rule-item"},y1={class:"rule-item"},g1={class:"rule-item"},b1={key:0,class:"form-error"},w1={class:"rule-save"},_1={class:"card section"},k1={class:"rule-grid"},x1={class:"rule-item"},C1={class:"rule-item"},S1={class:"rule-item"},E1={class:"rule-item"},$1={class:"rule-item"},A1={class:"card section"},T1={class:"proj-add"},P1={key:0,class:"muted proj-tip"},O1=["onKeydown"],M1=["onClick"],I1=["onClick"],j1=["onClick"],D1={key:1,class:"muted"},R1={class:"card section"},L1={class:"card section"},K1={class:"muted acc-line"},F1={class:"rule-item"},N1={class:"rule-save"},V1=["disabled"],B1={key:0,class:"muted acc-line"},U1={key:1,class:"form-error"},q1={class:"card section"},H1={class:"ai-grid"},W1={class:"rule-item"},z1={class:"rule-item"},G1={class:"rule-item"},Y1={class:"card section"},J1={class:"backup-row"},X1={key:0,class:"import-error"},Q1=Vt({__name:"SettingsView",setup(e){var je;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(""),u=N(""),f=N(""),h=N(""),y=N(null),m=N(""),k=N(null),x=N(null),C=N(""),M=N(((je=Gs())==null?void 0:je.username)||""),B=N(""),re=N(""),ae=N(""),T=N(""),S=N(!1),J="0.2.0",de=N(""),ie=N(""),ee=N(""),P=N(""),j=N(!1),ce=N("");async function ke(){var w;de.value=await dl(),ie.value=((w=wi())==null?void 0:w.username)||"",ce.value=await n1()}async function Y(){await kt("sync_base_url",de.value.trim()),ze("同步地址已保存")}async function xe(){P.value="";try{await Od(),ze("云端绑定已重建")}catch(w){P.value=w instanceof Error?w.message:"绑定失败"}}async function Ve(){if(!j.value){P.value="",j.value=!0;try{await Y();const w=await l1();ce.value=w.at,ee.value="推送 "+w.pushed+" 条 · 拉取 "+w.pulled+" 条 · 删除 "+w.removed+" 条",ze("同步完成")}catch(w){P.value=w instanceof Error?w.message:"同步失败"}j.value=!1}}async function rt(){if(T.value="",re.value!==ae.value){T.value="两次输入的新密码不一致";return}try{await z_(B.value,re.value),B.value="",re.value="",ae.value="",ze("登录密码已修改")}catch(w){T.value=w instanceof Error?w.message:"修改失败"}}async function He(){await G_(),window.location.reload()}async function We(){t.value=await jr(),n.value=await Ks(!0),a.value=(await ol()).join(` +`),u.value=await gt("ai_base_url",""),f.value=await gt("ai_api_key",""),h.value=await gt("ai_model",""),await ke()}async function me(){await kt("ai_base_url",u.value.trim()),await kt("ai_api_key",f.value.trim()),await kt("ai_model",h.value.trim()),ze("AI 配置已保存")}async function Me(){const w=xt(),g=await Promise.all([yi("2000-01-01",w),Ks(!0)]),O=g[0],le=g[1],se=new Map(le.map(oe=>[oe.id,oe.name])),ue=[["日期","分类","项目","内容","耗时(分钟)","成果","待跟进","收获","备注"]];for(const oe of O)ue.push([oe.date,sl(oe.category),oe.project_id&&se.get(oe.project_id)||"",oe.content,oe.minutes==null?"":oe.minutes,oe.is_milestone?"是":"",oe.needs_followup?"是":"",oe.takeaway||"",oe.remark||""]);const ye=await Fu("工作记录_"+w.replace(/-/g,"")+".csv",ue);ze(ye?"CSV 已导出到:"+ye:"CSV 已导出到系统下载目录")}async function Fe(){const w=xt(),g=await Promise.all([jr(),mi("2000-01-01",w)]),O=g[0],le=g[1],se=["周日","周一","周二","周三","周四","周五","周六"],ue=[["日期","星期","状态","上班时间","下班时间","地点","类型","说明"]];for(const oe of le){const be=Ws(oe,oe.date,O,oe.date===w);ue.push([oe.date,se[rs(oe.date).getDay()],be.label,oe.clock_in_at?Vn(oe.clock_in_at):"",oe.clock_out_at?Vn(oe.clock_out_at):"",oe.location||"",oe.kind==="makeup"?"补卡":oe.kind==="leave"?"休假":"正常",oe.note||""])}const ye=await Fu("考勤记录_"+w.replace(/-/g,"")+".csv",ue);ze(ye?"CSV 已导出到:"+ye:"CSV 已导出到系统下载目录")}dn(We);async function De(){await kt("work_start",t.value.work_start),await kt("work_end",t.value.work_end),await kt("grace_minutes",String(t.value.grace_minutes)),await kt("lunch_minutes",String(t.value.lunch_minutes)),await kt("remind_weekly",t.value.remind_weekly),ze("打卡规则已保存")}async function Ce(){await pd(a.value.split(` +`)),ze("常用地点已保存")}async function X(){const w=s.value.trim();if(w){try{await $v(w),o.value="",s.value=""}catch{o.value="项目名已存在"}await We()}}function Z(w){y.value=w.id,m.value=w.name}async function _e(w){const g=m.value.trim();if(g)try{await Av(w.id,g),o.value=""}catch{o.value="项目名已存在"}y.value=null,await We()}async function Be(w){await Tv(w.id,w.archived!==1),await We()}async function ft(){try{const w=await Zv(),g=await al("实习日志备份_"+xt().replace(/-/g,"")+".json",w);ze(g?"备份已导出到:"+g:"备份已导出到系统下载目录")}catch(w){ze("导出失败:"+(w instanceof Error?w.message:String(w)))}}function Yt(w){const g=w.target,O=g.files&&g.files[0];if(C.value="",!O)return;const le=O.name;O.text().then(se=>{x.value={name:le,text:se}}),g.value=""}async function Jt(){if(x.value)try{await em(x.value.text),x.value=null,C.value="",await We(),ze("数据导入完成")}catch(w){x.value=null,C.value=w instanceof Error?w.message:"导入失败"}}return(w,g)=>(F(),H("div",f1,[c("div",p1,[g[23]||(g[23]=c("div",{class:"section-title"},"账号与隐私",-1)),c("div",h1,"版本 v"+ne(Qt(J))+" · 当前用户:"+ne(M.value)+" · 每位用户独立数据库隔离存储于本机 · 登录密码仅保存 PBKDF2 哈希",1),c("div",v1,[c("div",m1,[g[20]||(g[20]=c("label",null,"旧登录密码",-1)),$e(c("input",{type:"password",class:"input","onUpdate:modelValue":g[0]||(g[0]=O=>B.value=O)},null,512),[[Re,B.value]])]),c("div",y1,[g[21]||(g[21]=c("label",null,"新登录密码(至少 6 位)",-1)),$e(c("input",{type:"password",class:"input","onUpdate:modelValue":g[1]||(g[1]=O=>re.value=O)},null,512),[[Re,re.value]])]),c("div",g1,[g[22]||(g[22]=c("label",null,"确认新登录密码",-1)),$e(c("input",{type:"password",class:"input","onUpdate:modelValue":g[2]||(g[2]=O=>ae.value=O)},null,512),[[Re,ae.value]])])]),T.value?(F(),H("div",b1,ne(T.value),1)):Ee("",!0),c("div",w1,[c("button",{class:"btn btn-primary btn-sm",onClick:rt},"修改登录密码"),c("button",{class:"btn btn-sm btn-danger",onClick:g[3]||(g[3]=O=>S.value=!0)},"删除此用户及全部数据")])]),c("div",_1,[g[30]||(g[30]=c("div",{class:"section-title"},"打卡规则",-1)),c("div",k1,[c("div",x1,[g[24]||(g[24]=c("label",null,"上班时间",-1)),$e(c("input",{type:"time",class:"input","onUpdate:modelValue":g[4]||(g[4]=O=>t.value.work_start=O)},null,512),[[Re,t.value.work_start]])]),c("div",C1,[g[25]||(g[25]=c("label",null,"下班时间",-1)),$e(c("input",{type:"time",class:"input","onUpdate:modelValue":g[5]||(g[5]=O=>t.value.work_end=O)},null,512),[[Re,t.value.work_end]])]),c("div",S1,[g[26]||(g[26]=c("label",null,"迟到宽限(分钟)",-1)),$e(c("input",{type:"number",class:"input",min:"0","onUpdate:modelValue":g[6]||(g[6]=O=>t.value.grace_minutes=O)},null,512),[[Re,t.value.grace_minutes,void 0,{number:!0}]])]),c("div",E1,[g[27]||(g[27]=c("label",null,"午休扣除(分钟)",-1)),$e(c("input",{type:"number",class:"input",min:"0","onUpdate:modelValue":g[7]||(g[7]=O=>t.value.lunch_minutes=O)},null,512),[[Re,t.value.lunch_minutes,void 0,{number:!0}]])]),c("div",$1,[g[29]||(g[29]=c("label",null,"周记提醒",-1)),$e(c("select",{class:"select","onUpdate:modelValue":g[8]||(g[8]=O=>t.value.remind_weekly=O)},[...g[28]||(g[28]=[c("option",{value:"friday"},"每周五提醒",-1),c("option",{value:"off"},"关闭",-1)])],512),[[Fn,t.value.remind_weekly]])])]),c("div",{class:"rule-save"},[c("button",{class:"btn btn-primary btn-sm",onClick:De},"保存规则")])]),c("div",A1,[g[31]||(g[31]=c("div",{class:"section-title"},"项目管理",-1)),c("div",T1,[$e(c("input",{class:"input","onUpdate:modelValue":g[9]||(g[9]=O=>s.value=O),placeholder:"新项目名称",onKeydown:jt(X,["enter"])},null,544),[[Re,s.value]]),c("button",{class:"btn btn-sm",onClick:X},"添加")]),o.value?(F(),H("div",P1,ne(o.value),1)):Ee("",!0),(F(!0),H(Le,null,ct(n.value,O=>(F(),H("div",{key:O.id,class:"proj-row"},[y.value===O.id?(F(),H(Le,{key:0},[$e(c("input",{class:"input","onUpdate:modelValue":g[10]||(g[10]=le=>m.value=le),onKeydown:jt(le=>_e(O),["enter"])},null,40,O1),[[Re,m.value]]),c("button",{class:"btn btn-sm",onClick:le=>_e(O)},"保存",8,M1),c("button",{class:"btn btn-sm",onClick:g[11]||(g[11]=le=>y.value=null)},"取消")],64)):(F(),H(Le,{key:1},[c("span",{class:tt(["proj-name",{archived:O.archived===1}])},ne(O.name),3),c("button",{class:"icon-btn",title:"重命名",onClick:le=>Z(O)},[Oe(ut,{name:"edit",size:14})],8,I1),c("button",{class:"btn btn-sm",onClick:le=>Be(O)},ne(O.archived===1?"恢复":"归档"),9,j1)],64))]))),128)),n.value.length?Ee("",!0):(F(),H("div",D1,"暂无项目,先添加一个"))]),c("div",R1,[g[33]||(g[33]=c("div",{class:"section-title"},"常用地点",-1)),$e(c("textarea",{class:"textarea","onUpdate:modelValue":g[12]||(g[12]=O=>a.value=O),placeholder:"每行一个地点,如:公司、客户现场、出差、居家办公"},null,512),[[Re,a.value]]),c("div",{class:"rule-save"},[c("button",{class:"btn btn-primary btn-sm",onClick:Ce},"保存地点"),g[32]||(g[32]=c("span",{class:"muted loc-note"},"打卡时可直接输入新地点,保存后自动加入列表",-1))])]),c("div",L1,[g[35]||(g[35]=c("div",{class:"section-title"},"多端数据同步",-1)),c("div",K1,"云端账号:"+ne(ie.value||"未绑定")+" · 登录即自动绑定并同步(变更实时推送 + 每 5 分钟兜底);密码库以密文同步,主密码永不出本机",1),c("div",F1,[g[34]||(g[34]=c("label",null,"同步服务地址(默认即可)",-1)),$e(c("input",{class:"input","onUpdate:modelValue":g[13]||(g[13]=O=>de.value=O),placeholder:"https://daywk.linyux.cn"},null,512),[[Re,de.value]])]),c("div",N1,[c("button",{class:"btn btn-sm",onClick:Y},"保存地址"),c("button",{class:"btn btn-primary btn-sm",disabled:j.value,onClick:Ve},ne(j.value?"同步中":"立即同步"),9,V1),c("button",{class:"btn btn-sm",onClick:xe},"重建云端绑定")]),ee.value?(F(),H("div",B1,"上次同步:"+ne(ce.value||"--")+" · "+ne(ee.value),1)):Ee("",!0),P.value?(F(),H("div",U1,ne(P.value),1)):Ee("",!0)]),c("div",q1,[g[40]||(g[40]=c("div",{class:"section-title"},"AI 润色配置(可选)",-1)),c("div",H1,[c("div",W1,[g[36]||(g[36]=c("label",null,"接口地址(OpenAI 兼容,到 /v1 为止)",-1)),$e(c("input",{class:"input","onUpdate:modelValue":g[14]||(g[14]=O=>u.value=O),placeholder:"https://api.example.com/v1"},null,512),[[Re,u.value]])]),c("div",z1,[g[37]||(g[37]=c("label",null,"API Key",-1)),$e(c("input",{class:"input","onUpdate:modelValue":g[15]||(g[15]=O=>f.value=O),placeholder:"sk-..."},null,512),[[Re,f.value]])]),c("div",G1,[g[38]||(g[38]=c("label",null,"模型名称",-1)),$e(c("input",{class:"input","onUpdate:modelValue":g[16]||(g[16]=O=>h.value=O),placeholder:"如:deepseek-chat"},null,512),[[Re,h.value]])])]),c("div",{class:"rule-save"},[c("button",{class:"btn btn-primary btn-sm",onClick:me},"保存 AI 配置"),g[39]||(g[39]=c("span",{class:"muted loc-note"},"配置仅保存在本机浏览器;总结页可用 AI 润色草稿,需服务端允许浏览器跨域",-1))])]),c("div",Y1,[g[41]||(g[41]=c("div",{class:"section-title"},"数据备份",-1)),c("div",J1,[c("button",{class:"btn btn-sm",onClick:ft},"导出 JSON 备份"),c("button",{class:"btn btn-sm",onClick:g[17]||(g[17]=O=>{var le;return(le=k.value)==null?void 0:le.click()})},"导入 JSON 备份"),c("button",{class:"btn btn-sm",onClick:Me},"导出工作记录 CSV"),c("button",{class:"btn btn-sm",onClick:Fe},"导出考勤 CSV"),c("input",{ref_key:"fileInput",ref:k,type:"file",accept:"application/json,.json",style:{display:"none"},onChange:Yt},null,544)]),C.value?(F(),H("div",X1,ne(C.value),1)):Ee("",!0),g[42]||(g[42]=c("div",{class:"muted backup-note"},"数据保存在浏览器 IndexedDB 中,建议定期导出 JSON 备份。",-1))]),Oe(cr,{open:!!x.value,title:"导入确认",message:x.value?"将从文件「"+x.value.name+"」导入备份。现有全部数据将被覆盖,且不可恢复,请先确认已导出当前备份。":"","confirm-text":"覆盖导入",danger:"",onCancel:g[18]||(g[18]=O=>x.value=null),onConfirm:Jt},null,8,["open","message"]),Oe(cr,{open:S.value,title:"删除用户确认",message:"将永久删除用户「"+M.value+"」及其全部数据:工作日志、考勤、备忘录、账号密码库都将被清除,且不可恢复。请确认。","confirm-text":"永久删除",danger:"",onCancel:g[19]||(g[19]=O=>S.value=!1),onConfirm:He},null,8,["open","message"])]))}}),Z1=Gt(Q1,[["__scopeId","data-v-81598f02"]]),e0={class:"login-page"},t0={class:"card login-card"},n0={class:"login-brand"},r0={class:"brand-icon"},s0={class:"seg"},o0=["placeholder"],i0={key:1,class:"mig-row"},a0={key:2,class:"form-error"},l0=["disabled"],u0=Vt({__name:"LoginView",emits:["login"],setup(e,{emit:t}){const n=t,s=N("login"),o=N(""),a=N(""),u=N(""),f=N(!0),h=N(!1),y=N(""),m=N(!1);dn(async()=>{h.value=await Ad()});function k(C){s.value=C,y.value="",u.value=""}async function x(){if(!m.value){y.value="",m.value=!0;try{let C;if(s.value==="login")C=await H_(o.value,a.value);else{if(a.value.length<6){y.value="登录密码至少 6 位",m.value=!1;return}if(a.value!==u.value){y.value="两次输入的密码不一致",m.value=!1;return}C=await q_(o.value,a.value,f.value)}n("login",C)}catch(C){y.value=C instanceof Error?C.message:"操作失败"}m.value=!1}}return(C,M)=>(F(),H("div",e0,[c("div",t0,[c("div",n0,[c("div",r0,[Oe(ut,{name:"calendar",size:22})]),M[6]||(M[6]=c("div",{class:"login-title"},"实习工作日志",-1)),M[7]||(M[7]=c("div",{class:"muted login-sub"},"打卡 · 记录 · 总结 · 备忘录 · 密码库",-1)),M[8]||(M[8]=c("div",{class:"muted login-sub"},"每位用户独立数据库,数据彼此隔离并保存在本机",-1))]),c("div",s0,[c("button",{class:tt(["seg-btn",{active:s.value==="login"}]),onClick:M[0]||(M[0]=B=>k("login"))},"登录",2),c("button",{class:tt(["seg-btn",{active:s.value==="create"}]),onClick:M[1]||(M[1]=B=>k("create"))},"创建用户",2)]),$e(c("input",{class:"input","onUpdate:modelValue":M[2]||(M[2]=B=>o.value=B),placeholder:"用户名(2 到 20 个字符)",onKeydown:jt(x,["enter"])},null,544),[[Re,o.value]]),$e(c("input",{type:"password",class:"input","onUpdate:modelValue":M[3]||(M[3]=B=>a.value=B),placeholder:s.value==="login"?"登录密码":"设置登录密码(至少 6 位)",onKeydown:jt(x,["enter"])},null,40,o0),[[Re,a.value]]),s.value==="create"?$e((F(),H("input",{key:0,type:"password",class:"input","onUpdate:modelValue":M[4]||(M[4]=B=>u.value=B),placeholder:"再次输入密码",onKeydown:jt(x,["enter"])},null,544)),[[Re,u.value]]):Ee("",!0),s.value==="create"&&h.value?(F(),H("label",i0,[$e(c("input",{type:"checkbox","onUpdate:modelValue":M[5]||(M[5]=B=>f.value=B)},null,512),[[Dh,f.value]]),M[9]||(M[9]=c("span",null,"导入本机原有工作日志数据到此用户(原数据保留不删除)",-1))])):Ee("",!0),y.value?(F(),H("div",a0,ne(y.value),1)):Ee("",!0),c("button",{class:"btn btn-primary login-btn",disabled:m.value,onClick:x},ne(s.value==="login"?"登录":"创建并进入"),9,l0),M[10]||(M[10]=c("div",{class:"muted login-note"}," 登录后自动开启云端同步(密码会保存在本机用于云同步);系统只保存密码哈希,忘记密码将无法访问该用户数据 ",-1))])]))}}),c0=Gt(u0,[["__scopeId","data-v-d3d6c8cb"]]),d0={key:1,class:"app"},f0={class:"side"},p0=["data-tip","onClick"],h0={class:"main"},v0={class:"topbar"},m0={class:"title"},y0={class:"gsearch"},g0={key:0,class:"gs-panel"},b0={key:0,class:"gs-group muted"},w0=["onMousedown"],_0={class:"tag"},k0={class:"gs-text"},x0={class:"muted num gs-date"},C0={key:1,class:"gs-group muted"},S0=["onMousedown"],E0={class:"gs-text"},$0={class:"muted gs-sub"},A0={key:1,class:"gs-empty muted"},T0={class:"topbar-actions"},P0={class:"user-chip num"},O0=["disabled"],M0={class:"num"},I0={class:"content"},j0={class:"content-inner"},D0={class:"toast-wrap"},R0=Vt({__name:"App",setup(e){const t=nm(),n=N(Gs());async function s(me){n.value=me,Fs(me.userId),location.hash="#/calendar",de.value="calendar",await ke(),await We(),u();try{await Od(),await Yr()}catch{}showToast("欢迎,"+me.username);const Me=sessionStorage.getItem("dsh_migrate_toast");Me&&(sessionStorage.removeItem("dsh_migrate_toast"),showToast("已迁移原有数据 "+Me+" 条"))}async function o(){o1(),a!==null&&(window.clearInterval(a),a=null),await W_(),n.value=null,de.value="calendar",location.hash="#/calendar",showToast("已退出登录")}let a=null;function u(){s1(),a!==null&&window.clearInterval(a),a=window.setInterval(()=>{Yr()},60*1e3),Yr()}const f=N(null),h=N(""),y=N(!1),m=N({logs:[],memos:[]});let k=null;const x=at(()=>!!(m.value.logs.length||m.value.memos.length));function C(){k&&window.clearTimeout(k);const me=h.value;k=window.setTimeout(async()=>{const Me=me.trim();if(!Me){m.value={logs:[],memos:[]};return}const Fe=await Promise.all([Wv(Me,8),zv(Me,4)]);m.value={logs:Fe[0],memos:Fe[1]}},200)}function M(){h.value="",m.value={logs:[],memos:[]},y.value=!1}function B(me){Ma.value=me.date,ie("calendar"),M()}function re(me){Ia.value=me.id,ie("memo"),M()}function ae(){window.setTimeout(()=>{y.value=!1},150)}function T(me){var Me;(me.ctrlKey||me.metaKey)&&me.key.toLowerCase()==="k"&&(me.preventDefault(),(Me=f.value)==null||Me.focus())}const S=[{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 J(){const me=(location.hash||"").replace("#/","");return S.some(Me=>Me.key===me)?me:"calendar"}const de=N(J());window.addEventListener("hashchange",()=>{de.value=J()});function ie(me){location.hash="#/"+me}const ee=at(()=>S.find(me=>me.key===de.value)||S[0]),P=N(xt()),j=N(void 0),ce=N(!1);async function ke(){if(j.value=await mn(P.value),ce.value=!1,new Date().getHours()<4){const Me=await mn(Kn(P.value,-1));ce.value=!!(Me&&Me.clock_in_at&&!Me.clock_out_at)}}const Y=at(()=>{const me=j.value;return me&&me.clock_in_at&&!me.clock_out_at?!0:ce.value&&!(me&&me.clock_in_at)}),xe=at(()=>{const me=j.value;return!!(me&&me.clock_in_at&&me.clock_out_at)}),Ve=at(()=>{const me=j.value;return Y.value?"下班打卡":xe.value?"已打卡 "+Vn(me==null?void 0:me.clock_in_at)+" - "+Vn(me==null?void 0:me.clock_out_at):"上班打卡"});async function rt(){if(Y.value)try{await Ov()}catch{}else await hd(P.value);await ke(),nr()}bt(zs,()=>{n.value&&ke()});const He=N(!1);async function We(){if((await jr()).remind_weekly==="off"){He.value=!1;return}const Me=new Date().getDay();if(Me===5||Me===6||Me===0){const Fe=await il(Es(P.value));He.value=!Fe||!Fe.highlights&&!Fe.challenges&&!Fe.plan_next}else He.value=!1}return dn(async()=>{window.addEventListener("keydown",T),n.value&&(Fs(n.value.userId),await ke(),await We(),u())}),(me,Me)=>{var Fe;return n.value?(F(),H("div",d0,[c("nav",f0,[(F(),H(Le,null,ct(S,De=>c("button",{key:De.key,class:tt(["nav-btn",{active:de.value===De.key}]),"data-tip":De.name,onClick:Ce=>ie(De.key)},[Oe(ut,{name:De.icon,size:18},null,8,["name"])],10,p0)),64))]),c("div",h0,[c("header",v0,[c("span",m0,ne(ee.value.name),1),c("div",y0,[Oe(ut,{name:"search",size:14,class:"gs-icon"}),$e(c("input",{ref_key:"gsInput",ref:f,class:"input gs-input","onUpdate:modelValue":Me[0]||(Me[0]=De=>h.value=De),placeholder:"搜索工作记录与备忘录(Ctrl+K)",onInput:C,onFocus:Me[1]||(Me[1]=De=>y.value=!0),onBlur:ae,onKeydown:jt(M,["esc"])},null,544),[[Re,h.value]]),y.value&&h.value.trim()?(F(),H("div",g0,[x.value?(F(),H(Le,{key:0},[m.value.logs.length?(F(),H("div",b0,"工作记录")):Ee("",!0),(F(!0),H(Le,null,ct(m.value.logs,De=>(F(),H("div",{key:"l"+De.id,class:"gs-item",onMousedown:Mr(Ce=>B(De),["prevent"])},[c("span",_0,ne(Qt(sl)(De.category)),1),c("span",k0,ne(De.content),1),c("span",x0,ne(De.date),1)],40,w0))),128)),m.value.memos.length?(F(),H("div",C0,"备忘录")):Ee("",!0),(F(!0),H(Le,null,ct(m.value.memos,De=>(F(),H("div",{key:"m"+De.id,class:"gs-item",onMousedown:Mr(Ce=>re(De),["prevent"])},[c("span",E0,ne(De.title||"无标题"),1),c("span",$0,ne(De.content),1)],40,S0))),128))],64)):(F(),H("div",A0,"无匹配结果"))])):Ee("",!0)]),Me[4]||(Me[4]=c("span",{class:"flex1"},null,-1)),c("div",T0,[He.value?(F(),H("button",{key:0,class:"week-tip",onClick:Me[2]||(Me[2]=De=>ie("report"))},[...Me[3]||(Me[3]=[c("span",{class:"dot",style:{background:"var(--warn)"}},null,-1),nn(" 填写本周周记 ",-1)])])):Ee("",!0),c("span",P0,ne((Fe=n.value)==null?void 0:Fe.username),1),c("button",{class:"btn btn-sm",onClick:o},"退出"),c("button",{class:"btn btn-primary btn-sm",disabled:xe.value,onClick:rt},[Oe(ut,{name:xe.value?"check-circle":"clock",size:14},null,8,["name"]),c("span",M0,ne(Ve.value),1)],8,O0)])]),c("main",I0,[c("div",j0,[de.value==="calendar"?(F(),It(Sy,{key:0})):de.value==="today"?(F(),It(Oy,{key:1})):de.value==="stats"?(F(),It(lg,{key:2})):de.value==="report"?(F(),It(ab,{key:3})):de.value==="ledger"?(F(),It(gw,{key:4})):de.value==="memo"?(F(),It(Rw,{key:5})):de.value==="vault"?(F(),It(V_,{key:6})):(F(),It(Z1,{key:7}))])])]),c("div",D0,[Oe(Eh,{name:"toast"},{default:fr(()=>[(F(!0),H(Le,null,ct(Qt(t),De=>(F(),H("div",{key:De.id,class:"toast"},ne(De.text),1))),128))]),_:1})])])):(F(),It(c0,{key:0,onLogin:s}))}}}),L0=Gt(R0,[["__scopeId","data-v-0d619789"]]);function fl(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{}}const qu=Gs();qu&&Fs(qu.userId);const Id=Bh(L0);Id.config.errorHandler=(e,t,n)=>{const s=e;fl("应用内部错误(点击空白处关闭,请将以下内容发送给开发者)",s&&(s.stack||s.message)||String(e)+` +触发位置: `+n)};window.addEventListener("unhandledrejection",e=>{const t=e.reason;fl("未处理的异步错误(点击空白处关闭)",t&&(t.stack||t.message)||String(e.reason))});window.addEventListener("error",e=>{e.message&&e.message!=="ResizeObserver loop limit exceeded"&&fl("运行错误(点击空白处关闭)",e.message)});Id.mount("#app");"serviceWorker"in navigator&&location.protocol.startsWith("http")&&window.addEventListener("load",()=>{navigator.serviceWorker.register("sw.js").catch(()=>{})});export{bd as W,md as _,kg as b,gd as r}; diff --git a/intern-log/dist/assets/index-B9eVtom_.css b/intern-log/dist/assets/index-_AL8y0Nb.css similarity index 87% rename from intern-log/dist/assets/index-B9eVtom_.css rename to intern-log/dist/assets/index-_AL8y0Nb.css index 6e6f6e0..2cb9bf9 100644 --- a/intern-log/dist/assets/index-B9eVtom_.css +++ b/intern-log/dist/assets/index-_AL8y0Nb.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-e3568c0d]{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-e3568c0d]{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-e3568c0d]{display:flex;align-items:center;justify-content:space-between;padding:16px 20px 12px;border-bottom:1px solid var(--border)}.dialog-title[data-v-e3568c0d]{font-size:14px;font-weight:600;color:var(--text-1)}.dialog-body[data-v-e3568c0d]{padding:16px 20px}.dialog-btns[data-v-e3568c0d]{display:flex;justify-content:flex-end;gap:8px;padding:12px 20px 16px;border-top:1px solid var(--border)}.form-grid[data-v-e3568c0d]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px}.field.span2[data-v-e3568c0d]{grid-column:span 2}.field label[data-v-e3568c0d]{display:block;font-size:12px;color:var(--text-2);margin-bottom:4px}.seg[data-v-e3568c0d]{display:inline-flex;border:1px solid var(--border-strong);border-radius:var(--radius-sm);overflow:hidden}.seg-btn[data-v-e3568c0d]{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-e3568c0d]{border-left:1px solid var(--border)}.seg-btn.active[data-v-e3568c0d]{background:var(--accent-bg);color:var(--accent)}.form-error[data-v-e3568c0d]{color:var(--danger);font-size:12px;margin-top:8px}.input.invalid[data-v-e3568c0d],.input.invalid[data-v-e3568c0d]:focus{border-color:var(--danger)}.modal-enter-active[data-v-e3568c0d],.modal-leave-active[data-v-e3568c0d]{transition:opacity .15s ease}.modal-enter-from[data-v-e3568c0d],.modal-leave-to[data-v-e3568c0d]{opacity:0}.ledger-toolbar[data-v-2b678001]{display:flex;align-items:center;gap:8px;margin-bottom:12px;flex-wrap:wrap}.month-title[data-v-2b678001]{font-size:14px;font-weight:600;min-width:88px;text-align:center}.w-filter[data-v-2b678001]{width:110px;flex:none}.cards[data-v-2b678001]{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px}.stat-card[data-v-2b678001]{padding:14px 16px}.stat-num[data-v-2b678001]{font-size:20px;font-weight:600;margin-top:4px}.amt-income[data-v-2b678001]{color:var(--ok)}.amt-expense[data-v-2b678001]{color:var(--text-1)}.amt-warn[data-v-2b678001]{color:var(--warn)}.sec[data-v-2b678001]{padding:14px 16px;margin-top:12px}.sec-title[data-v-2b678001]{font-size:13px;font-weight:600;margin-bottom:10px}.sec-head[data-v-2b678001]{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin-bottom:10px}.sec-head .sec-title[data-v-2b678001]{margin-bottom:0}.form-hint[data-v-2b678001]{font-size:12px}.form-grid[data-v-2b678001]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px}.field.span2[data-v-2b678001]{grid-column:span 2}.field label[data-v-2b678001]{display:block;font-size:12px;color:var(--text-2);margin-bottom:4px}.form-error[data-v-2b678001]{color:var(--danger);font-size:12px;margin-top:8px}.form-footer[data-v-2b678001]{display:flex;justify-content:flex-end;gap:8px;margin-top:12px;padding-top:12px;border-top:1px solid var(--border)}.seg[data-v-2b678001]{display:inline-flex;border:1px solid var(--border-strong);border-radius:var(--radius-sm);overflow:hidden}.seg-btn[data-v-2b678001]{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-2b678001]{border-left:1px solid var(--border)}.seg-btn.active[data-v-2b678001]{background:var(--accent-bg);color:var(--accent)}.toggle-btn[data-v-2b678001]{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-2b678001]:hover{background:var(--bg-hover)}.toggle-btn.on[data-v-2b678001]{color:var(--accent);border-color:var(--accent);background:var(--accent-bg)}.bar-row[data-v-2b678001]{display:flex;align-items:center;gap:10px;margin:6px 0}.bar-label[data-v-2b678001]{width:56px;flex:none;color:var(--text-2);font-size:12px;text-align:right}.bar-track[data-v-2b678001]{flex:1;height:8px;border-radius:4px;background:var(--bg-subtle);overflow:hidden}.bar-fill[data-v-2b678001]{display:block;height:100%;background:var(--accent);border-radius:4px}.bar-num[data-v-2b678001]{font-size:12px;width:110px;flex:none}.table-card[data-v-2b678001]{overflow-x:auto}.tx-table[data-v-2b678001]{width:100%;border-collapse:collapse;font-size:13px}.tx-table th[data-v-2b678001]{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-2b678001]{padding:10px 12px;border-bottom:1px solid var(--border);vertical-align:top;word-break:break-all}.tx-table tbody tr[data-v-2b678001]:hover{background:var(--bg-subtle)}.tx-table tbody tr:last-child td[data-v-2b678001]{border-bottom:none}.td-note[data-v-2b678001]{color:var(--text-2)}.tx-pending[data-v-2b678001]{color:var(--warn);font-size:12px}.tx-done[data-v-2b678001]{color:var(--ok);font-size:12px}.th-ops[data-v-2b678001]{width:220px}.ops[data-v-2b678001]{display:flex;gap:4px;flex-wrap:wrap}.empty[data-v-2b678001]{text-align:center;padding:24px 0}.vault-note[data-v-2b678001]{margin-top:10px;font-size:12px;text-align:right}@media (max-width: 560px){.form-grid[data-v-2b678001]{grid-template-columns:1fr}.field.span2[data-v-2b678001]{grid-column:auto}.ledger-toolbar .w-filter[data-v-2b678001]{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-6820bc9c]{max-width:380px;margin:60px auto 0;padding:28px 24px;text-align:center;display:flex;flex-direction:column;gap:10px}.lock-badge[data-v-6820bc9c]{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-6820bc9c]{font-size:14px;font-weight:600}.lock-tip[data-v-6820bc9c]{font-size:12px;line-height:1.7}.lock-btn[data-v-6820bc9c]{margin-top:4px}.form-error[data-v-6820bc9c]{color:var(--danger);font-size:12px}.empty[data-v-6820bc9c]{text-align:center;padding:24px 0}.vault-toolbar[data-v-6820bc9c]{display:flex;align-items:center;gap:8px;margin-bottom:12px;flex-wrap:wrap}.search-wrap[data-v-6820bc9c]{position:relative;width:280px;max-width:100%}.search-wrap .input[data-v-6820bc9c]{padding-left:30px}.search-icon[data-v-6820bc9c]{position:absolute;left:10px;top:50%;transform:translateY(-50%);color:var(--text-3)}.table-card[data-v-6820bc9c]{overflow-x:auto}.cred-table[data-v-6820bc9c]{width:100%;border-collapse:collapse;font-size:13px}.cred-table th[data-v-6820bc9c]{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-6820bc9c]{padding:10px 12px;border-bottom:1px solid var(--border);vertical-align:top;word-break:break-all}.cred-table tbody tr[data-v-6820bc9c]:hover{background:var(--bg-subtle)}.cred-table tbody tr:last-child td[data-v-6820bc9c]{border-bottom:none}.td-system[data-v-6820bc9c]{font-weight:500}.th-ops[data-v-6820bc9c]{width:150px}.pwd-cell[data-v-6820bc9c]{display:flex;align-items:center;gap:4px;flex-wrap:wrap}.pwd-text[data-v-6820bc9c]{letter-spacing:1px}.copyable[data-v-6820bc9c]{cursor:pointer}.copyable[data-v-6820bc9c]:hover{color:var(--accent)}.ops[data-v-6820bc9c]{display:flex;gap:4px;flex-wrap:wrap}.vault-note[data-v-6820bc9c]{margin-top:10px;font-size:12px;text-align:right}.mask[data-v-6820bc9c]{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-6820bc9c]{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-6820bc9c]{display:flex;align-items:center;justify-content:space-between;padding:16px 20px 12px;border-bottom:1px solid var(--border)}.dialog-title[data-v-6820bc9c]{font-size:14px;font-weight:600}.dialog-body[data-v-6820bc9c]{padding:16px 20px}.dialog-btns[data-v-6820bc9c]{display:flex;justify-content:flex-end;gap:8px;padding:12px 20px 16px;border-top:1px solid var(--border)}.vp-field[data-v-6820bc9c]{margin-bottom:10px}.vp-field label[data-v-6820bc9c]{display:block;font-size:12px;color:var(--text-2);margin-bottom:4px}.vp-tip[data-v-6820bc9c]{font-size:12px;margin-top:8px}.modal-enter-active[data-v-6820bc9c],.modal-leave-active[data-v-6820bc9c]{transition:opacity .15s ease}.modal-enter-from[data-v-6820bc9c],.modal-leave-to[data-v-6820bc9c]{opacity:0}.settings[data-v-81598f02]{display:flex;flex-direction:column;gap:12px;max-width:640px}.acc-line[data-v-81598f02]{font-size:12px;margin-bottom:10px;line-height:1.7}.section[data-v-81598f02]{padding:14px 16px}.section-title[data-v-81598f02]{font-weight:600;margin-bottom:10px;font-size:13px}.rule-grid[data-v-81598f02]{display:grid;grid-template-columns:1fr 1fr;gap:10px 16px}.rule-item label[data-v-81598f02]{display:block;font-size:12px;color:var(--text-2);margin-bottom:4px}.rule-save[data-v-81598f02]{display:flex;align-items:center;gap:10px;margin-top:12px}.proj-add[data-v-81598f02]{display:flex;gap:8px}.proj-tip[data-v-81598f02]{font-size:12px;margin-top:6px}.proj-row[data-v-81598f02]{display:flex;align-items:center;gap:8px;padding:6px 0;border-bottom:1px solid var(--border)}.proj-row[data-v-81598f02]:last-child{border-bottom:none}.proj-name[data-v-81598f02]{flex:1;word-break:break-all}.proj-name.archived[data-v-81598f02]{color:var(--text-3);text-decoration:line-through}.loc-note[data-v-81598f02]{font-size:12px}.ai-grid[data-v-81598f02]{display:flex;flex-direction:column;gap:10px}.backup-row[data-v-81598f02]{display:flex;gap:8px}.import-error[data-v-81598f02]{color:var(--danger);font-size:12px;margin-top:8px}.backup-note[data-v-81598f02]{font-size:12px;margin-top:10px}.login-page[data-v-d3d6c8cb]{min-height:100vh;background:var(--bg-subtle);display:flex;align-items:center;justify-content:center;padding:20px}.login-card[data-v-d3d6c8cb]{width:400px;max-width:100%;padding:28px 26px;display:flex;flex-direction:column;gap:12px;background:var(--bg-page)}.login-brand[data-v-d3d6c8cb]{text-align:center;margin-bottom:6px}.brand-icon[data-v-d3d6c8cb]{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-d3d6c8cb]{font-size:18px;font-weight:600;color:var(--text-1)}.login-sub[data-v-d3d6c8cb]{font-size:12px;margin-top:4px;line-height:1.7}.seg[data-v-d3d6c8cb]{display:inline-flex;border:1px solid var(--border-strong);border-radius:var(--radius-sm);overflow:hidden}.seg-btn[data-v-d3d6c8cb]{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-d3d6c8cb]{border-left:1px solid var(--border)}.seg-btn.active[data-v-d3d6c8cb]{background:var(--accent-bg);color:var(--accent)}.mig-row[data-v-d3d6c8cb]{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-d3d6c8cb]{margin-top:3px}.form-error[data-v-d3d6c8cb]{color:var(--danger);font-size:12px}.login-btn[data-v-d3d6c8cb]{margin-top:2px}.login-note[data-v-d3d6c8cb]{font-size:12px;text-align:center;line-height:1.7}.app[data-v-0d619789]{display:flex;height:100vh;height:100dvh;overflow:hidden}.side[data-v-0d619789]{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-0d619789]{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-0d619789]:hover{background:var(--bg-hover);color:var(--text-1)}.nav-btn.active[data-v-0d619789]{background:var(--accent-bg);color:var(--accent)}.nav-btn[data-v-0d619789]: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-0d619789]:hover:after{opacity:1}.main[data-v-0d619789]{flex:1;display:flex;flex-direction:column;min-width:0}.topbar[data-v-0d619789]{height:56px;flex:none;border-bottom:1px solid var(--border);display:flex;align-items:center;gap:12px;padding:0 20px}.title[data-v-0d619789]{font-size:14px;font-weight:600}.topbar-actions[data-v-0d619789]{display:flex;align-items:center;gap:8px}.gsearch[data-v-0d619789]{position:relative;width:300px;max-width:38vw}.gs-icon[data-v-0d619789]{position:absolute;left:10px;top:50%;transform:translateY(-50%);color:var(--text-3)}.gs-input[data-v-0d619789]{height:30px;padding-left:30px}.gs-panel[data-v-0d619789]{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-0d619789]{font-size:12px;padding:6px 8px 2px}.gs-item[data-v-0d619789]{display:flex;align-items:center;gap:8px;padding:6px 8px;border-radius:var(--radius-sm);cursor:pointer}.gs-item[data-v-0d619789]:hover{background:var(--bg-hover)}.gs-text[data-v-0d619789],.gs-sub[data-v-0d619789]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.gs-text[data-v-0d619789]{font-size:13px}.gs-sub[data-v-0d619789]{font-size:12px}.gs-date[data-v-0d619789]{font-size:12px;flex:none}.gs-empty[data-v-0d619789]{padding:10px;font-size:12px;text-align:center}.user-chip[data-v-0d619789]{font-size:12px;color:var(--text-2);padding:0 4px}.week-tip[data-v-0d619789]{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-0d619789]:hover{background:var(--bg-subtle)}.content[data-v-0d619789]{flex:1;overflow:auto}.content-inner[data-v-0d619789]{max-width:1200px;margin:0 auto;padding:20px}.toast-wrap[data-v-0d619789]{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-0d619789]{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-0d619789],.toast-leave-to[data-v-0d619789]{opacity:0;transform:translateY(-4px)}.toast-enter-active[data-v-0d619789],.toast-leave-active[data-v-0d619789]{transition:all .15s ease}@media (max-width: 720px){.app[data-v-0d619789]{flex-direction:column;height:100dvh}.side[data-v-0d619789]{order:2;width:100%;height:calc(54px + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom);flex-direction:row;justify-content:space-around;border-right:none;border-top:1px solid var(--border);padding-top:0}.main[data-v-0d619789]{order:1;flex:1;min-height:0}.nav-btn[data-v-0d619789]{width:44px;height:42px}.nav-btn[data-v-0d619789]:after{display:none}.topbar[data-v-0d619789]{flex-wrap:wrap;height:auto;min-height:52px;padding:8px 12px;row-gap:8px}.topbar>.flex1[data-v-0d619789]{display:none}.gsearch[data-v-0d619789]{order:10;width:100%;max-width:100%}.gs-input[data-v-0d619789]{height:34px}.gs-panel[data-v-0d619789]{top:100%}.topbar-actions[data-v-0d619789]{margin-left:auto}.user-chip[data-v-0d619789]{max-width:72px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.content-inner[data-v-0d619789]{padding:12px}.toast-wrap[data-v-0d619789]{top:8px;right:12px;left:12px;align-items:flex-end}}: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} +.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-0f950d19]{display:flex;align-items:center;gap:8px;margin-bottom:12px;flex-wrap:wrap}.month-title[data-v-0f950d19]{font-size:14px;font-weight:600;min-width:88px;text-align:center}.w-filter[data-v-0f950d19]{width:110px;flex:none}.cards[data-v-0f950d19]{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px}.stat-card[data-v-0f950d19]{padding:14px 16px}.stat-num[data-v-0f950d19]{font-size:20px;font-weight:600;margin-top:4px}.amt-income[data-v-0f950d19]{color:var(--ok)}.amt-expense[data-v-0f950d19]{color:var(--text-1)}.amt-warn[data-v-0f950d19]{color:var(--warn)}.sec[data-v-0f950d19]{padding:14px 16px;margin-top:12px}.sec-title[data-v-0f950d19]{font-size:13px;font-weight:600;margin-bottom:10px}.sec-head[data-v-0f950d19]{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin-bottom:10px}.sec-head .sec-title[data-v-0f950d19]{margin-bottom:0}.form-hint[data-v-0f950d19]{font-size:12px}.form-grid[data-v-0f950d19]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px}.field.span2[data-v-0f950d19]{grid-column:span 2}.field label[data-v-0f950d19]{display:block;font-size:12px;color:var(--text-2);margin-bottom:4px}.form-error[data-v-0f950d19]{color:var(--danger);font-size:12px;margin-top:8px}.form-footer[data-v-0f950d19]{display:flex;justify-content:flex-end;gap:8px;margin-top:12px;padding-top:12px;border-top:1px solid var(--border)}.seg[data-v-0f950d19]{display:inline-flex;border:1px solid var(--border-strong);border-radius:var(--radius-sm);overflow:hidden}.seg-btn[data-v-0f950d19]{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-0f950d19]{border-left:1px solid var(--border)}.seg-btn.active[data-v-0f950d19]{background:var(--accent-bg);color:var(--accent)}.toggle-btn[data-v-0f950d19]{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-0f950d19]:hover{background:var(--bg-hover)}.toggle-btn.on[data-v-0f950d19]{color:var(--accent);border-color:var(--accent);background:var(--accent-bg)}.bar-row[data-v-0f950d19]{display:flex;align-items:center;gap:10px;margin:6px 0}.bar-label[data-v-0f950d19]{width:56px;flex:none;color:var(--text-2);font-size:12px;text-align:right}.bar-track[data-v-0f950d19]{flex:1;height:8px;border-radius:4px;background:var(--bg-subtle);overflow:hidden}.bar-fill[data-v-0f950d19]{display:block;height:100%;background:var(--accent);border-radius:4px}.bar-num[data-v-0f950d19]{font-size:12px;width:110px;flex:none}.table-card[data-v-0f950d19]{overflow-x:auto}.tx-table[data-v-0f950d19]{width:100%;border-collapse:collapse;font-size:13px}.tx-table th[data-v-0f950d19]{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-0f950d19]{padding:10px 12px;border-bottom:1px solid var(--border);vertical-align:top;word-break:break-all}.tx-table tbody tr[data-v-0f950d19]:hover{background:var(--bg-subtle)}.tx-table tbody tr:last-child td[data-v-0f950d19]{border-bottom:none}.td-note[data-v-0f950d19]{color:var(--text-2)}.tx-pending[data-v-0f950d19]{color:var(--warn);font-size:12px}.tx-done[data-v-0f950d19]{color:var(--ok);font-size:12px}.th-ops[data-v-0f950d19]{width:220px}.ops[data-v-0f950d19]{display:flex;gap:4px;flex-wrap:wrap}.empty[data-v-0f950d19]{text-align:center;padding:24px 0}.vault-note[data-v-0f950d19]{margin-top:10px;font-size:12px;text-align:right}@media (max-width: 560px){.form-grid[data-v-0f950d19]{grid-template-columns:1fr}.field.span2[data-v-0f950d19]{grid-column:auto}.ledger-toolbar .w-filter[data-v-0f950d19]{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-6820bc9c]{max-width:380px;margin:60px auto 0;padding:28px 24px;text-align:center;display:flex;flex-direction:column;gap:10px}.lock-badge[data-v-6820bc9c]{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-6820bc9c]{font-size:14px;font-weight:600}.lock-tip[data-v-6820bc9c]{font-size:12px;line-height:1.7}.lock-btn[data-v-6820bc9c]{margin-top:4px}.form-error[data-v-6820bc9c]{color:var(--danger);font-size:12px}.empty[data-v-6820bc9c]{text-align:center;padding:24px 0}.vault-toolbar[data-v-6820bc9c]{display:flex;align-items:center;gap:8px;margin-bottom:12px;flex-wrap:wrap}.search-wrap[data-v-6820bc9c]{position:relative;width:280px;max-width:100%}.search-wrap .input[data-v-6820bc9c]{padding-left:30px}.search-icon[data-v-6820bc9c]{position:absolute;left:10px;top:50%;transform:translateY(-50%);color:var(--text-3)}.table-card[data-v-6820bc9c]{overflow-x:auto}.cred-table[data-v-6820bc9c]{width:100%;border-collapse:collapse;font-size:13px}.cred-table th[data-v-6820bc9c]{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-6820bc9c]{padding:10px 12px;border-bottom:1px solid var(--border);vertical-align:top;word-break:break-all}.cred-table tbody tr[data-v-6820bc9c]:hover{background:var(--bg-subtle)}.cred-table tbody tr:last-child td[data-v-6820bc9c]{border-bottom:none}.td-system[data-v-6820bc9c]{font-weight:500}.th-ops[data-v-6820bc9c]{width:150px}.pwd-cell[data-v-6820bc9c]{display:flex;align-items:center;gap:4px;flex-wrap:wrap}.pwd-text[data-v-6820bc9c]{letter-spacing:1px}.copyable[data-v-6820bc9c]{cursor:pointer}.copyable[data-v-6820bc9c]:hover{color:var(--accent)}.ops[data-v-6820bc9c]{display:flex;gap:4px;flex-wrap:wrap}.vault-note[data-v-6820bc9c]{margin-top:10px;font-size:12px;text-align:right}.mask[data-v-6820bc9c]{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-6820bc9c]{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-6820bc9c]{display:flex;align-items:center;justify-content:space-between;padding:16px 20px 12px;border-bottom:1px solid var(--border)}.dialog-title[data-v-6820bc9c]{font-size:14px;font-weight:600}.dialog-body[data-v-6820bc9c]{padding:16px 20px}.dialog-btns[data-v-6820bc9c]{display:flex;justify-content:flex-end;gap:8px;padding:12px 20px 16px;border-top:1px solid var(--border)}.vp-field[data-v-6820bc9c]{margin-bottom:10px}.vp-field label[data-v-6820bc9c]{display:block;font-size:12px;color:var(--text-2);margin-bottom:4px}.vp-tip[data-v-6820bc9c]{font-size:12px;margin-top:8px}.modal-enter-active[data-v-6820bc9c],.modal-leave-active[data-v-6820bc9c]{transition:opacity .15s ease}.modal-enter-from[data-v-6820bc9c],.modal-leave-to[data-v-6820bc9c]{opacity:0}.settings[data-v-81598f02]{display:flex;flex-direction:column;gap:12px;max-width:640px}.acc-line[data-v-81598f02]{font-size:12px;margin-bottom:10px;line-height:1.7}.section[data-v-81598f02]{padding:14px 16px}.section-title[data-v-81598f02]{font-weight:600;margin-bottom:10px;font-size:13px}.rule-grid[data-v-81598f02]{display:grid;grid-template-columns:1fr 1fr;gap:10px 16px}.rule-item label[data-v-81598f02]{display:block;font-size:12px;color:var(--text-2);margin-bottom:4px}.rule-save[data-v-81598f02]{display:flex;align-items:center;gap:10px;margin-top:12px}.proj-add[data-v-81598f02]{display:flex;gap:8px}.proj-tip[data-v-81598f02]{font-size:12px;margin-top:6px}.proj-row[data-v-81598f02]{display:flex;align-items:center;gap:8px;padding:6px 0;border-bottom:1px solid var(--border)}.proj-row[data-v-81598f02]:last-child{border-bottom:none}.proj-name[data-v-81598f02]{flex:1;word-break:break-all}.proj-name.archived[data-v-81598f02]{color:var(--text-3);text-decoration:line-through}.loc-note[data-v-81598f02]{font-size:12px}.ai-grid[data-v-81598f02]{display:flex;flex-direction:column;gap:10px}.backup-row[data-v-81598f02]{display:flex;gap:8px}.import-error[data-v-81598f02]{color:var(--danger);font-size:12px;margin-top:8px}.backup-note[data-v-81598f02]{font-size:12px;margin-top:10px}.login-page[data-v-d3d6c8cb]{min-height:100vh;background:var(--bg-subtle);display:flex;align-items:center;justify-content:center;padding:20px}.login-card[data-v-d3d6c8cb]{width:400px;max-width:100%;padding:28px 26px;display:flex;flex-direction:column;gap:12px;background:var(--bg-page)}.login-brand[data-v-d3d6c8cb]{text-align:center;margin-bottom:6px}.brand-icon[data-v-d3d6c8cb]{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-d3d6c8cb]{font-size:18px;font-weight:600;color:var(--text-1)}.login-sub[data-v-d3d6c8cb]{font-size:12px;margin-top:4px;line-height:1.7}.seg[data-v-d3d6c8cb]{display:inline-flex;border:1px solid var(--border-strong);border-radius:var(--radius-sm);overflow:hidden}.seg-btn[data-v-d3d6c8cb]{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-d3d6c8cb]{border-left:1px solid var(--border)}.seg-btn.active[data-v-d3d6c8cb]{background:var(--accent-bg);color:var(--accent)}.mig-row[data-v-d3d6c8cb]{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-d3d6c8cb]{margin-top:3px}.form-error[data-v-d3d6c8cb]{color:var(--danger);font-size:12px}.login-btn[data-v-d3d6c8cb]{margin-top:2px}.login-note[data-v-d3d6c8cb]{font-size:12px;text-align:center;line-height:1.7}.app[data-v-0d619789]{display:flex;height:100vh;height:100dvh;overflow:hidden}.side[data-v-0d619789]{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-0d619789]{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-0d619789]:hover{background:var(--bg-hover);color:var(--text-1)}.nav-btn.active[data-v-0d619789]{background:var(--accent-bg);color:var(--accent)}.nav-btn[data-v-0d619789]: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-0d619789]:hover:after{opacity:1}.main[data-v-0d619789]{flex:1;display:flex;flex-direction:column;min-width:0}.topbar[data-v-0d619789]{height:56px;flex:none;border-bottom:1px solid var(--border);display:flex;align-items:center;gap:12px;padding:0 20px}.title[data-v-0d619789]{font-size:14px;font-weight:600}.topbar-actions[data-v-0d619789]{display:flex;align-items:center;gap:8px}.gsearch[data-v-0d619789]{position:relative;width:300px;max-width:38vw}.gs-icon[data-v-0d619789]{position:absolute;left:10px;top:50%;transform:translateY(-50%);color:var(--text-3)}.gs-input[data-v-0d619789]{height:30px;padding-left:30px}.gs-panel[data-v-0d619789]{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-0d619789]{font-size:12px;padding:6px 8px 2px}.gs-item[data-v-0d619789]{display:flex;align-items:center;gap:8px;padding:6px 8px;border-radius:var(--radius-sm);cursor:pointer}.gs-item[data-v-0d619789]:hover{background:var(--bg-hover)}.gs-text[data-v-0d619789],.gs-sub[data-v-0d619789]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.gs-text[data-v-0d619789]{font-size:13px}.gs-sub[data-v-0d619789]{font-size:12px}.gs-date[data-v-0d619789]{font-size:12px;flex:none}.gs-empty[data-v-0d619789]{padding:10px;font-size:12px;text-align:center}.user-chip[data-v-0d619789]{font-size:12px;color:var(--text-2);padding:0 4px}.week-tip[data-v-0d619789]{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-0d619789]:hover{background:var(--bg-subtle)}.content[data-v-0d619789]{flex:1;overflow:auto}.content-inner[data-v-0d619789]{max-width:1200px;margin:0 auto;padding:20px}.toast-wrap[data-v-0d619789]{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-0d619789]{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-0d619789],.toast-leave-to[data-v-0d619789]{opacity:0;transform:translateY(-4px)}.toast-enter-active[data-v-0d619789],.toast-leave-active[data-v-0d619789]{transition:all .15s ease}@media (max-width: 720px){.app[data-v-0d619789]{flex-direction:column;height:100dvh}.side[data-v-0d619789]{order:2;width:100%;height:calc(54px + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom);flex-direction:row;justify-content:space-around;border-right:none;border-top:1px solid var(--border);padding-top:0}.main[data-v-0d619789]{order:1;flex:1;min-height:0}.nav-btn[data-v-0d619789]{width:44px;height:42px}.nav-btn[data-v-0d619789]:after{display:none}.topbar[data-v-0d619789]{flex-wrap:wrap;height:auto;min-height:52px;padding:8px 12px;row-gap:8px}.topbar>.flex1[data-v-0d619789]{display:none}.gsearch[data-v-0d619789]{order:10;width:100%;max-width:100%}.gs-input[data-v-0d619789]{height:34px}.gs-panel[data-v-0d619789]{top:100%}.topbar-actions[data-v-0d619789]{margin-left:auto}.user-chip[data-v-0d619789]{max-width:72px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.content-inner[data-v-0d619789]{padding:12px}.toast-wrap[data-v-0d619789]{top:8px;right:12px;left:12px;align-items:flex-end}}: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} diff --git a/intern-log/dist/assets/index-o1hiWX9Y.js b/intern-log/dist/assets/index-o1hiWX9Y.js deleted file mode 100644 index f4e6d19..0000000 --- a/intern-log/dist/assets/index-o1hiWX9Y.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 u of a.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&s(u)}).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 Fa(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const dt={},Ar=[],En=()=>{},Hu=()=>!1,ni=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),ri=e=>e.startsWith("onUpdate:"),Et=Object.assign,Na=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},of=Object.prototype.hasOwnProperty,ot=(e,t)=>of.call(e,t),Le=Array.isArray,sr=e=>Vs(e)==="[object Map]",Bn=e=>Vs(e)==="[object Set]",Wl=e=>Vs(e)==="[object Date]",Ge=e=>typeof e=="function",wt=e=>typeof e=="string",$n=e=>typeof e=="symbol",at=e=>e!==null&&typeof e=="object",Wu=e=>(at(e)||Ge(e))&&Ge(e.then)&&Ge(e.catch),zu=Object.prototype.toString,Vs=e=>zu.call(e),af=e=>Vs(e).slice(8,-1),Gu=e=>Vs(e)==="[object Object]",Va=e=>wt(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,bs=Fa(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),si=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},lf=/-\w/g,hn=si(e=>e.replace(lf,t=>t.slice(1).toUpperCase())),uf=/\B([A-Z])/g,dr=si(e=>e.replace(uf,"-$1").toLowerCase()),Yu=si(e=>e.charAt(0).toUpperCase()+e.slice(1)),Qi=si(e=>e?`on${Yu(e)}`:""),Cn=(e,t)=>!Object.is(e,t),Ao=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},oi=e=>{const t=parseFloat(e);return isNaN(t)?e:t},cf=e=>{const t=wt(e)?Number(e):NaN;return isNaN(t)?e:t};let zl;const ii=()=>zl||(zl=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function or(e){if(Le(e)){const t={};for(let n=0;nn.startsWith("/*")?"":n).split(df).forEach(n=>{if(n){const s=n.split(ff);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function et(e){let t="";if(wt(e))t=e;else if(Le(e))for(let n=0;nUn(n,t))}const Qu=e=>!!(e&&e.__v_isRef===!0),ne=e=>wt(e)?e:e==null?"":Le(e)||at(e)&&(e.toString===zu||!Ge(e.toString))?Qu(e)?ne(e.value):JSON.stringify(e,Zu,2):String(e),Zu=(e,t)=>Qu(t)?Zu(e,t.value):sr(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,o],a)=>(n[Zi(s,a)+" =>"]=o,n),{})}:Bn(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Zi(n))}:$n(t)?Zi(t):at(t)&&!Le(t)&&!Gu(t)?String(t):t,Zi=(e,t="")=>{var n;return $n(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 Mt;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&&Mt&&(Mt.active?(this.parent=Mt,this.index=(Mt.scopes||(Mt.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(Mt===this)Mt=this.prevScope;else{let t=Mt;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(_s){let t=_s;for(_s=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;ws;){let t=ws;for(ws=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 rc(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function sc(e){let t,n=e.depsTail,s=n;for(;s;){const o=s.prevDep;s.version===-1?(s===n&&(n=o),Ha(s),_f(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=o}e.deps=t,e.depsTail=n}function ma(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(oc(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function oc(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===As)||(e.globalVersion=As,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!ma(e))))return;e.flags|=2;const t=e.dep,n=pt,s=vn;pt=e,vn=!0;try{rc(e);const o=e.fn(e._value);(t.version===0||Cn(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{pt=n,vn=s,sc(e),e.flags&=-3}}function Ha(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)Ha(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 vn=!0;const ic=[];function An(){ic.push(vn),vn=!1}function Tn(){const e=ic.pop();vn=e===void 0?!0:e}function Jl(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=pt;pt=void 0;try{t()}finally{pt=n}}}let As=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 Wa{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(!pt||!vn||pt===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==pt)n=this.activeLink=new kf(pt,this),pt.deps?(n.prevDep=pt.depsTail,pt.depsTail.nextDep=n,pt.depsTail=n):pt.deps=pt.depsTail=n,ac(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=pt.depsTail,n.nextDep=void 0,pt.depsTail.nextDep=n,pt.depsTail=n,pt.deps===n&&(pt.deps=s)}return n}trigger(t){this.version++,As++,this.notify(t)}notify(t){Ua();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{qa()}}}function ac(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)ac(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const ya=new WeakMap,Tr=Symbol(""),ga=Symbol(""),Ts=Symbol("");function Kt(e,t,n){if(vn&&pt){let s=ya.get(e);s||ya.set(e,s=new Map);let o=s.get(n);o||(s.set(n,o=new Wa),o.map=s,o.key=n),o.track()}}function Rn(e,t,n,s,o,a){const u=ya.get(e);if(!u){As++;return}const f=h=>{h&&h.trigger()};if(Ua(),t==="clear")u.forEach(f);else{const h=Le(e),y=h&&Va(n);if(h&&n==="length"){const m=Number(s);u.forEach((k,x)=>{(x==="length"||x===Ts||!$n(x)&&x>=m)&&f(k)})}else switch((n!==void 0||u.has(void 0))&&f(u.get(n)),y&&f(u.get(Ts)),t){case"add":h?y&&f(u.get("length")):(f(u.get(Tr)),sr(e)&&f(u.get(ga)));break;case"delete":h||(f(u.get(Tr)),sr(e)&&f(u.get(ga)));break;case"set":sr(e)&&f(u.get(Tr));break}}qa()}function qr(e){const t=st(e);return t===e||(Kt(t,"iterate",Ts),ln(e))?t:Pn(e)?ir(e)?t.map(n=>ar(un(n))):t.map(ar):t.map(un)}function ai(e){return Kt(e=st(e),"iterate",Ts),e}function _n(e,t){return Pn(e)?ar(ir(e)?un(t):t):un(t)}const xf={__proto__:null,[Symbol.iterator](){return ta(this,Symbol.iterator,e=>_n(this,e))},concat(...e){return qr(this).concat(...e.map(t=>Le(t)?qr(t):t))},entries(){return ta(this,"entries",e=>(e[1]=_n(this,e[1]),e))},every(e,t){return In(this,"every",e,t,void 0,arguments)},filter(e,t){return In(this,"filter",e,t,n=>n.map(s=>_n(this,s)),arguments)},find(e,t){return In(this,"find",e,t,n=>_n(this,n),arguments)},findIndex(e,t){return In(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return In(this,"findLast",e,t,n=>_n(this,n),arguments)},findLastIndex(e,t){return In(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return In(this,"forEach",e,t,void 0,arguments)},includes(...e){return na(this,"includes",e)},indexOf(...e){return na(this,"indexOf",e)},join(e){return qr(this).join(e)},lastIndexOf(...e){return na(this,"lastIndexOf",e)},map(e,t){return In(this,"map",e,t,void 0,arguments)},pop(){return ps(this,"pop")},push(...e){return ps(this,"push",e)},reduce(e,...t){return Ql(this,"reduce",e,t)},reduceRight(e,...t){return Ql(this,"reduceRight",e,t)},shift(){return ps(this,"shift")},some(e,t){return In(this,"some",e,t,void 0,arguments)},splice(...e){return ps(this,"splice",e)},toReversed(){return qr(this).toReversed()},toSorted(e){return qr(this).toSorted(e)},toSpliced(...e){return qr(this).toSpliced(...e)},unshift(...e){return ps(this,"unshift",e)},values(){return ta(this,"values",e=>_n(this,e))}};function ta(e,t,n){const s=ai(e),o=s[t],a=o.call(s);if(s!==e&&!ln(e)){if(a[Symbol.toStringTag]==="Array Iterator"){const u=Object.create(Object.getPrototypeOf(a));return u.next=()=>Xl(a.next(),n),o!==lc[t]&&Object.defineProperties(u,{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}}}),u}a._next=a.next,a.next=()=>Xl(a._next(),n)}return a}function Xl(e,t){return e.done||(e.value=t(e.value)),e}const lc=Array.prototype;function In(e,t,n,s,o,a){const u=ai(e),f=u!==e&&!ln(e),h=u[t];if(h!==lc[t]){const k=h.apply(e,a);return f?un(k):k}let y=n;u!==e&&(f?y=function(k,x){return n.call(this,_n(e,k),x,e)}:n.length>2&&(y=function(k,x){return n.call(this,k,x,e)}));const m=h.call(u,y,s);return f&&o?o(m):m}function Ql(e,t,n,s){const o=ai(e),a=o!==e&&!ln(e);let u=n,f=!1;o!==e&&(a?(f=s.length===0,u=function(y,m,k){return f&&(f=!1,y=_n(e,y)),n.call(this,y,_n(e,m),k,e)}):n.length>3&&(u=function(y,m,k){return n.call(this,y,m,k,e)}));const h=o[t](u,...s);return f?_n(e,h):h}function na(e,t,n){const s=st(e);Kt(s,"iterate",Ts);const o=s[t](...n);return(o===-1||o===!1)&&Ja(n[0])?(n[0]=st(n[0]),s[t](...n)):o}function ps(e,t,n=[]){An(),Ua();const s=st(e)[t].apply(e,n);return qa(),Tn(),s}const Cf=Fa("__proto__,__v_isRef,__isVue"),uc=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter($n));function Sf(e){$n(e)||(e=String(e));const t=st(this);return Kt(t,"has",e),t.hasOwnProperty(e)}class cc{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:hc:a?pc:fc).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const u=Le(t);if(!o){let h;if(u&&(h=xf[n]))return h;if(n==="hasOwnProperty")return Sf}const f=Reflect.get(t,n,Nt(t)?t:s);if(($n(n)?uc.has(n):Cf(n))||(o||Kt(t,"get",n),a))return f;if(Nt(f)){const h=u&&Va(n)?f:f.value;return o&&at(h)?wa(h):h}return at(f)?o?wa(f):Ga(f):f}}class dc extends cc{constructor(t=!1){super(!1,t)}set(t,n,s,o){let a=t[n];const u=Le(t)&&Va(n);if(!this._isShallow){const y=Pn(a);if(!ln(s)&&!Pn(s)&&(a=st(a),s=st(s)),!u&&Nt(a)&&!Nt(s))return y||(a.value=s),!0}const f=u?Number(n)e,_o=e=>Reflect.getPrototypeOf(e);function Pf(e,t,n){return function(...s){const o=this.__v_raw,a=st(o),u=sr(a),f=e==="entries"||e===Symbol.iterator&&u,h=e==="keys"&&u,y=o[e](...s),m=n?ba:t?ar:un;return!t&&Kt(a,"iterate",h?ga:Tr),Et(Object.create(y),{next(){const{value:k,done:x}=y.next();return x?{value:k,done:x}:{value:f?[m(k[0]),m(k[1])]:m(k),done:x}}})}}function ko(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,u=st(a),f=st(o);e||(Cn(o,f)&&Kt(u,"get",o),Kt(u,"get",f));const{has:h}=_o(u),y=t?ba:e?ar:un;if(h.call(u,o))return y(a.get(o));if(h.call(u,f))return y(a.get(f));a!==u&&a.get(o)},get size(){const o=this.__v_raw;return!e&&Kt(st(o),"iterate",Tr),o.size},has(o){const a=this.__v_raw,u=st(a),f=st(o);return e||(Cn(o,f)&&Kt(u,"has",o),Kt(u,"has",f)),o===f?a.has(o):a.has(o)||a.has(f)},forEach(o,a){const u=this,f=u.__v_raw,h=st(f),y=t?ba:e?ar:un;return!e&&Kt(h,"iterate",Tr),f.forEach((m,k)=>o.call(a,y(m),y(k),u))}};return Et(n,e?{add:ko("add"),set:ko("set"),delete:ko("delete"),clear:ko("clear")}:{add(o){const a=st(this),u=_o(a),f=st(o),h=!t&&!ln(o)&&!Pn(o)?f:o;return u.has.call(a,h)||Cn(o,h)&&u.has.call(a,o)||Cn(f,h)&&u.has.call(a,f)||(a.add(h),Rn(a,"add",h,h)),this},set(o,a){!t&&!ln(a)&&!Pn(a)&&(a=st(a));const u=st(this),{has:f,get:h}=_o(u);let y=f.call(u,o);y||(o=st(o),y=f.call(u,o));const m=h.call(u,o);return u.set(o,a),y?Cn(a,m)&&Rn(u,"set",o,a):Rn(u,"add",o,a),this},delete(o){const a=st(this),{has:u,get:f}=_o(a);let h=u.call(a,o);h||(o=st(o),h=u.call(a,o)),f&&f.call(a,o);const y=a.delete(o);return h&&Rn(a,"delete",o,void 0),y},clear(){const o=st(this),a=o.size!==0,u=o.clear();return a&&Rn(o,"clear",void 0,void 0),u}}),["keys","values","entries",Symbol.iterator].forEach(o=>{n[o]=Pf(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(ot(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 fc=new WeakMap,pc=new WeakMap,hc=new WeakMap,Df=new WeakMap;function Rf(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Ga(e){return Pn(e)?e:Ya(e,!1,$f,Mf,fc)}function Lf(e){return Ya(e,!1,Tf,If,pc)}function wa(e){return Ya(e,!0,Af,jf,hc)}function Ya(e,t,n,s,o){if(!at(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 u=Rf(af(e));if(u===0)return e;const f=new Proxy(e,u===2?s:n);return o.set(e,f),f}function ir(e){return Pn(e)?ir(e.__v_raw):!!(e&&e.__v_isReactive)}function Pn(e){return!!(e&&e.__v_isReadonly)}function ln(e){return!!(e&&e.__v_isShallow)}function Ja(e){return e?!!e.__v_raw:!1}function st(e){const t=e&&e.__v_raw;return t?st(t):e}function Kf(e){return!ot(e,"__v_skip")&&Object.isExtensible(e)&&Ju(e,"__v_skip",!0),e}const un=e=>at(e)?Ga(e):e,ar=e=>at(e)?wa(e):e;function Nt(e){return e?e.__v_isRef===!0:!1}function V(e){return Ff(e,!1)}function Ff(e,t){return Nt(e)?e:new Nf(e,t)}class Nf{constructor(t,n){this.dep=new Wa,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:st(t),this._value=n?t:un(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||ln(t)||Pn(t);t=s?t:st(t),Cn(t,n)&&(this._rawValue=t,this._value=s?t:un(t),this.dep.trigger())}}function Qt(e){return Nt(e)?e.value:e}const Vf={get:(e,t,n)=>t==="__v_raw"?e:Qt(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const o=e[t];return Nt(o)&&!Nt(n)?(o.value=n,!0):Reflect.set(e,t,n,s)}};function vc(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 Wa(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=As-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&pt!==this)return nc(this,!0),!0}get value(){const t=this.dep.track();return oc(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 Ge(e)?s=e:(s=e.get,o=e.set),new Bf(s,o,n)}const xo={},Ro=new WeakMap;let Sr;function qf(e,t=!1,n=Sr){if(n){let s=Ro.get(n);s||Ro.set(n,s=[]),s.push(e)}}function Hf(e,t,n=dt){const{immediate:s,deep:o,once:a,scheduler:u,augmentJob:f,call:h}=n,y=X=>o?X:ln(X)||o===!1||o===0?Ln(X,1):Ln(X);let m,k,x,C,M=!1,U=!1;if(Nt(e)?(k=()=>e.value,M=ln(e)):ir(e)?(k=()=>y(e),M=!0):Le(e)?(U=!0,M=e.some(X=>ir(X)||ln(X)),k=()=>e.map(X=>{if(Nt(X))return X.value;if(ir(X))return y(X);if(Ge(X))return h?h(X,2):X()})):Ge(e)?t?k=h?()=>h(e,2):e:k=()=>{if(x){An();try{x()}finally{Tn()}}const X=Sr;Sr=m;try{return h?h(e,3,[C]):e(C)}finally{Sr=X}}:k=En,t&&o){const X=k,fe=o===!0?1/0:o;k=()=>Ln(X(),fe)}const re=wf(),ae=()=>{m.stop(),re&&re.active&&Na(re.effects,m)};if(a&&t){const X=t;t=(...fe)=>{try{return X(...fe)}finally{ae()}}}let O=U?new Array(e.length).fill(xo):xo;const S=X=>{if(!(!(m.flags&1)||!m.dirty&&!X))if(t){const fe=m.run();if(X||o||M||(U?fe.some((ie,Z)=>Cn(ie,O[Z])):Cn(fe,O))){const ie=Sr;An();try{x&&x(),Sr=m;const Z=[fe,O===xo?void 0:U&&O[0]===xo?[]:O,C];O=fe,h?h(t,3,Z):t(...Z)}finally{Sr=ie,Tn()}}}else m.run()};return f&&f(S),m=new ec(k),m.scheduler=u?()=>u(S,!1):S,C=X=>qf(X,!1,m),x=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?S(!0):O=m.run():u?u(S.bind(null,!0),!0):m.run(),ae.pause=m.pause.bind(m),ae.resume=m.resume.bind(m),ae.stop=ae,ae}function Ln(e,t=1/0,n){if(t<=0||!at(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Nt(e))Ln(e.value,t,n);else if(Le(e))for(let s=0;s{Ln(s,t,n)});else if(Gu(e)){for(const s in e)Ln(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&Ln(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){li(o,t,n)}}function cn(e,t,n,s){if(Ge(e)){const o=Bs(e,t,n,s);return o&&Wu(o)&&o.catch(a=>{li(a,t,n)}),o}if(Le(e)){const o=[];for(let a=0;a>>1,o=Wt[s],a=Ps(o);a=Ps(n)?Wt.push(e):Wt.splice(zf(t),0,e),e.flags|=1,yc()}}function yc(){Lo||(Lo=mc.then(wc))}function Gf(e){if(!Le(e))tr&&e.id===-1?tr.splice(Hr+1,0,e):e.flags&1||(kn.push(e),e.flags|=1);else for(let t=0;t=t))continue;Wt.splice(s,1),s=e?s-1:pn,o.flags&4&&(o.flags&=-2),o(),o.flags&4||(o.flags&=-2)}}}function bc(e,t,n=0){if(kn.length){let s=kn,o=0;if(t){s=[];for(let u=0;uPs(u)-Ps(f));if(kn.length=o,tr){for(let u=0;ue.id==null?e.flags&2?-1:1/0:e.id;function wc(e){try{for(pn=0;pn{s._d&&Bo(-1);const a=Ko(t),u=Pr.length;let f;try{f=e(...o)}finally{for(let h=Pr.length;h>u;h--)Yc();Ko(a),s._d&&Bo(1)}return f};return s._n=!0,s._c=!0,s._d=!0,s}function Ee(e,t){if(an===null)return e;const n=hi(an),s=e.dirs||(e.dirs=[]);for(let o=0;o1)return n&&Ge(t)?t.call(s&&s.proxy):t}}const Xf=Symbol.for("v-scx"),Qf=()=>To(Xf);function bt(e,t,n){return kc(e,t,n)}function kc(e,t,n=dt){const{immediate:s,deep:o,flush:a,once:u}=n,f=Et({},n),h=t&&s||!t&&a!=="post";let y;if(Rs){if(a==="sync"){const C=Qf();y=C.__watcherHandles||(C.__watcherHandles=[])}else if(!h){const C=()=>{};return C.stop=En,C.resume=En,C.pause=En,C}}const m=zt;f.call=(C,M,U)=>cn(C,m,M,U);let k=!1;a==="post"?f.scheduler=C=>{C.i=m,Ht(C,m&&m.suspense)}:a!=="sync"&&(k=!0,f.scheduler=(C,M)=>{M?C():Xa(C)}),f.augmentJob=C=>{t&&(C.flags|=4),k&&(C.flags|=2,m&&(C.id=m.uid,C.i=m))};const x=Hf(e,t,f);return Rs&&(y?y.push(x):h&&x()),x}function Zf(e,t,n){const s=this.proxy,o=wt(e)?e.includes(".")?xc(s,e):()=>s[e]:e.bind(s,s);let a;Ge(t)?a=t:(a=t.handler,n=t);const u=qs(this),f=kc(o,a.bind(s),n);return u(),f}function xc(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===""),Zl=e=>typeof SVGElement<"u"&&e instanceof SVGElement,eu=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,_a=(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,u,f,h,y){const{mc:m,pc:k,pbc:x,o:{insert:C,querySelector:M,createText:U,createComment:re,parentNode:ae}}=y,O=Er(t.props);let{dynamicChildren:S}=t;const X=(Z,T,j)=>{Z.shapeFlag&16&&m(Z.children,T,j,o,a,u,f,h)},fe=(Z=t)=>{const T=Er(Z.props),j=Z.target=_a(Z.props,M),de=ka(j,Z,U,C);j&&(u!=="svg"&&Zl(j)?u="svg":u!=="mathml"&&eu(j)&&(u="mathml"),o&&o.isCE&&(o.ce._teleportTargets||(o.ce._teleportTargets=new Set)).add(j),T||(X(Z,j,de),ms(Z,!1)))},ie=Z=>{const T=()=>{if(Zn.get(Z)===T){if(Zn.delete(Z),Er(Z.props)){const j=ae(Z.el)||n;X(Z,j,Z.anchor),ms(Z,!0)}fe(Z)}};Zn.set(Z,T),Ht(T,a)};if(e==null){const Z=t.el=U(""),T=t.anchor=U("");if(C(Z,n,s),C(T,n,s),ep(t.props)||a&&a.pendingBranch){ie(t);return}O&&(X(t,n,T),ms(t,!0)),fe()}else{t.el=e.el;const Z=t.anchor=e.anchor,T=Zn.get(e);if(T){T.flags|=8,Zn.delete(e),ie(t);return}t.targetStart=e.targetStart;const j=t.target=e.target,de=t.targetAnchor=e.targetAnchor,ke=Er(e.props),J=ke?n:j,xe=ke?Z:de;if(u==="svg"||Zl(j)?u="svg":(u==="mathml"||eu(j))&&(u="mathml"),S?(x(e.dynamicChildren,S,J,o,a,u,f),tl(e,t,!0)):h||k(e,t,J,xe,o,a,u,f,!1),O)ke?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Co(t,n,Z,y,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const Ve=_a(t.props,M);Ve&&(t.target=Ve,Co(t,Ve,null,y,0))}else ke&&Co(t,j,de,y,1);ms(t,O)}},remove(e,t,n,{um:s,o:{remove:o}},a){const{shapeFlag:u,children:f,anchor:h,targetStart:y,targetAnchor:m,target:k,props:x}=e,C=Er(x),M=a||!C,U=Zn.get(e);if(U&&(U.flags|=8,Zn.delete(e)),k&&(o(y),o(m)),a&&o(h),!U&&(C||k)&&u&16)for(let re=0;re{e.isMounted=!0}),Mc(()=>{e.isUnmounting=!0}),e}const sn=[Function,Array],Ec={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:sn,onEnter:sn,onAfterEnter:sn,onEnterCancelled:sn,onBeforeLeave:sn,onLeave:sn,onAfterLeave:sn,onLeaveCancelled:sn,onBeforeAppear:sn,onAppear:sn,onAfterAppear:sn,onAppearCancelled:sn},rp={name:"BaseTransition",props:Ec,setup(e,{slots:t}){const n=nl(),s=Sc();return()=>{const o=t.default&&Qa(t.default(),!0),a=o&&o.length?$c(o):n.subTree?Se():void 0;if(!a)return;const u=st(e),{mode:f}=u;if(s.isLeaving)return sa(a);const h=Fo(a);if(!h)return sa(a);let y=Os(h,u,s,n,k=>y=k);h.type!==Ft&&lr(h,y);let m=n.subTree&&Fo(n.subTree);if(m&&m.type!==Ft&&!$r(m,h)&&Ms(n.subTree)){let k=Os(m,u,s,n);if(lr(m,k),f==="out-in"&&h.type!==Ft)return s.isLeaving=!0,k.afterLeave=()=>{s.isLeaving=!1,n.job.flags&8||n.update(),delete k.afterLeave,m=void 0},sa(a);f==="in-out"&&h.type!==Ft?k.delayLeave=(x,C,M)=>{const U=Ac(s,m);U[String(m.key)]=m,x[on]=()=>{C(),x[on]=void 0,delete y.delayedLeave,m=void 0},y.delayedLeave=()=>{M(),delete y.delayedLeave,m=void 0}}:m=void 0}else m&&(m=void 0);return a}}};function $c(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==Ft){t=n;break}}return t}const sp=rp;function Ac(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 Os(e,t,n,s,o){const{appear:a,mode:u,persisted:f=!1,onBeforeEnter:h,onEnter:y,onAfterEnter:m,onEnterCancelled:k,onBeforeLeave:x,onLeave:C,onAfterLeave:M,onLeaveCancelled:U,onBeforeAppear:re,onAppear:ae,onAfterAppear:O,onAppearCancelled:S}=t,X=String(e.key),fe=Ac(n,e),ie=(j,de)=>{j&&cn(j,s,9,de)},Z=(j,de)=>{const ke=de[1];ie(j,de),Le(j)?j.every(J=>J.length<=1)&&ke():j.length<=1&&ke()},T={mode:u,persisted:f,beforeEnter(j){let de=h;if(!n.isMounted)if(a)de=re||h;else return;j[on]&&j[on](!0);const ke=fe[X];if(ke&&$r(e,ke)){let J=ke.el[on];if(!J){const xe=Ms(ke);J=xe&&xe.el[on]}J&&J()}ie(de,[j])},enter(j){if(fe[X]===e)return;let de=y,ke=m,J=k;if(!n.isMounted)if(a)de=ae||y,ke=O||m,J=S||k;else return;let xe=!1;j[hs]=nt=>{xe||(xe=!0,nt?ie(J,[j]):ie(ke,[j]),T.delayedLeave&&T.delayedLeave(),j[hs]=void 0)};const Ve=j[hs].bind(null,!1);de?Z(de,[j,Ve]):Ve()},leave(j,de){const ke=String(e.key);if(j[hs]&&j[hs](!0),n.isUnmounting)return de();ie(x,[j]);let J=!1;j[on]=Ve=>{J||(J=!0,de(),Ve?ie(U,[j]):ie(M,[j]),j[on]=void 0,fe[ke]===e&&delete fe[ke])};const xe=j[on].bind(null,!1);fe[ke]=e,C?Z(C,[j,xe]):xe()},clone(j){const de=Os(j,t,n,s,o);return o&&o(de),de}};return T}function sa(e){if(ci(e))return e=ur(e),e.children=null,e}function Fo(e){if(!ci(e))return ui(e.type)&&e.children?$c(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&&Ge(n.default))return n.default()}}function lr(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;const n=e.component.subTree;lr(ui(n.type)&&Fo(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===Re&&Le(e.children)){const n=Lc(e.children,!1);n&&lr(n,t)}}function Qa(e,t=!1,n){let s=[],o=0;for(let a=0;a1)for(let a=0;aks(U,t&&(Le(t)?t[re]:t),n,s,o));return}if(xs(s)&&!o){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&ks(e,t,n,s.component.subTree);return}const a=s.shapeFlag&4?hi(s.component):s.el,u=o?null:a,{i:f,r:h}=e,y=t&&t.r,m=f.refs===dt?f.refs={}:f.refs,k=f.setupState,x=st(k),C=k===dt?Hu:U=>tu(m,U)?!1:ot(x,U),M=(U,re)=>!(re&&tu(m,re));if(y!=null&&y!==h){if(nu(t),wt(y))m[y]=null,C(y)&&(k[y]=null);else if(Nt(y)){const U=t;M(y,U.k)&&(y.value=null),U.k&&(m[U.k]=null)}}if(Ge(h))Bs(h,f,12,[u,m]);else{const U=wt(h),re=Nt(h);if(U||re){const ae=()=>{if(e.f){const O=U?C(h)?k[h]:m[h]:M()||!e.k?h.value:m[e.k];if(o)Le(O)&&Na(O,a);else if(Le(O))O.includes(a)||O.push(a);else if(U)m[h]=[a],C(h)&&(k[h]=m[h]);else{const S=[a];M(h,e.k)&&(h.value=S),e.k&&(m[e.k]=S)}}else U?(m[h]=u,C(h)&&(k[h]=u)):re&&(M(h,e.k)&&(h.value=u),e.k&&(m[e.k]=u))};if(u){const O=()=>{ae(),No.delete(e)};O.id=-1,No.set(e,O),Ht(O,n)}else nu(e),ae()}}}function nu(e){const t=No.get(e);t&&(t.flags|=8,No.delete(e))}ii().requestIdleCallback;ii().cancelIdleCallback;const xs=e=>!!e.type.__asyncLoader,ci=e=>e.type.__isKeepAlive;function op(e,t){Pc(e,"a",t)}function ip(e,t){Pc(e,"da",t)}function Pc(e,t,n=zt){const s=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(di(t,s,n),n){let o=n.parent;for(;o&&o.parent;)ci(o.parent.vnode)&&ap(s,t,n,o),o=o.parent}}function ap(e,t,n,s){const o=di(t,e,s,!0);pr(()=>{Na(s[t],o)},n)}function di(e,t,n=zt,s=!1){if(n){const o=n[e]||(n[e]=[]),a=t.__weh||(t.__weh=(...u)=>{An();const f=qs(n),h=cn(t,n,e,u);return f(),Tn(),h});return s?o.unshift(a):o.push(a),a}}const qn=e=>(t,n=zt)=>{(!Rs||e==="sp")&&di(e,(...s)=>t(...s),n)},lp=qn("bm"),dn=qn("m"),up=qn("bu"),Oc=qn("u"),Mc=qn("bum"),pr=qn("um"),cp=qn("sp"),dp=qn("rtg"),fp=qn("rtc");function pp(e,t=zt){di("ec",e,t)}const hp=Symbol.for("v-ndc");function ut(e,t,n,s){let o;const a=n,u=Le(e);if(u||wt(e)){const f=u&&ir(e);let h=!1,y=!1;f&&(h=!ln(e),y=Pn(e),e=ai(e)),o=new Array(e.length);for(let m=0,k=e.length;mt(f,h,void 0,a));else{const f=Object.keys(e);o=new Array(f.length);for(let h=0,y=f.length;he?Zc(e)?hi(e):xa(e.parent):null,Cs=Et(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=>xa(e.parent),$root:e=>xa(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>jc(e),$forceUpdate:e=>e.f||(e.f=()=>{Xa(e.update)}),$nextTick:e=>e.n||(e.n=ts.bind(e.proxy)),$watch:e=>Zf.bind(e)}),oa=(e,t)=>e!==dt&&!e.__isScriptSetup&&ot(e,t),vp={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:o,props:a,accessCache:u,type:f,appContext:h}=e;if(t[0]!=="$"){const x=u[t];if(x!==void 0)switch(x){case 1:return s[t];case 2:return o[t];case 4:return n[t];case 3:return a[t]}else{if(oa(s,t))return u[t]=1,s[t];if(o!==dt&&ot(o,t))return u[t]=2,o[t];if(ot(a,t))return u[t]=3,a[t];if(n!==dt&&ot(n,t))return u[t]=4,n[t];Ca&&(u[t]=0)}}const y=Cs[t];let m,k;if(y)return t==="$attrs"&&Kt(e.attrs,"get",""),y(e);if((m=f.__cssModules)&&(m=m[t]))return m;if(n!==dt&&ot(n,t))return u[t]=4,n[t];if(k=h.config.globalProperties,ot(k,t))return k[t]},set({_:e},t,n){const{data:s,setupState:o,ctx:a}=e;return oa(o,t)?(o[t]=n,!0):s!==dt&&ot(s,t)?(s[t]=n,!0):ot(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:u}},f){let h;return!!(n[f]||e!==dt&&f[0]!=="$"&&ot(e,f)||oa(t,f)||ot(a,f)||ot(s,f)||ot(Cs,f)||ot(o.config.globalProperties,f)||(h=u.__cssModules)&&h[f])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:ot(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function ru(e){return Le(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let Ca=!0;function mp(e){const t=jc(e),n=e.proxy,s=e.ctx;Ca=!1,t.beforeCreate&&su(t.beforeCreate,e,"bc");const{data:o,computed:a,methods:u,watch:f,provide:h,inject:y,created:m,beforeMount:k,mounted:x,beforeUpdate:C,updated:M,activated:U,deactivated:re,beforeDestroy:ae,beforeUnmount:O,destroyed:S,unmounted:X,render:fe,renderTracked:ie,renderTriggered:Z,errorCaptured:T,serverPrefetch:j,expose:de,inheritAttrs:ke,components:J,directives:xe,filters:Ve}=t;if(y&&yp(y,s,null),u)for(const He in u){const ye=u[He];Ge(ye)&&(s[He]=ye.bind(n))}if(o){const He=o.call(n,n);at(He)&&(e.data=Ga(He))}if(Ca=!0,a)for(const He in a){const ye=a[He],Oe=Ge(ye)?ye.bind(n,n):Ge(ye.get)?ye.get.bind(n,n):En,Fe=!Ge(ye)&&Ge(ye.set)?ye.set.bind(n):En,je=it({get:Oe,set:Fe});Object.defineProperty(s,He,{enumerable:!0,configurable:!0,get:()=>je.value,set:te=>je.value=te})}if(f)for(const He in f)Ic(f[He],s,n,He);if(h){const He=Ge(h)?h.call(n):h;Reflect.ownKeys(He).forEach(ye=>{Jf(ye,He[ye])})}m&&su(m,e,"c");function qe(He,ye){Le(ye)?ye.forEach(Oe=>He(Oe.bind(n))):ye&&He(ye.bind(n))}if(qe(lp,k),qe(dn,x),qe(up,C),qe(Oc,M),qe(op,U),qe(ip,re),qe(pp,T),qe(fp,ie),qe(dp,Z),qe(Mc,O),qe(pr,X),qe(cp,j),Le(de))if(de.length){const He=e.exposed||(e.exposed={});de.forEach(ye=>{Object.defineProperty(He,ye,{get:()=>n[ye],set:Oe=>n[ye]=Oe,enumerable:!0})})}else e.exposed||(e.exposed={});fe&&e.render===En&&(e.render=fe),ke!=null&&(e.inheritAttrs=ke),J&&(e.components=J),xe&&(e.directives=xe),j&&Tc(e)}function yp(e,t,n=En){Le(e)&&(e=Sa(e));for(const s in e){const o=e[s];let a;at(o)?"default"in o?a=To(o.from||s,o.default,!0):a=To(o.from||s):a=To(o),Nt(a)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>a.value,set:u=>a.value=u}):t[s]=a}}function su(e,t,n){cn(Le(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function Ic(e,t,n,s){let o=s.includes(".")?xc(n,s):()=>n[s];if(wt(e)){const a=t[e];Ge(a)&&bt(o,a)}else if(Ge(e))bt(o,e.bind(n));else if(at(e))if(Le(e))e.forEach(a=>Ic(a,t,n,s));else{const a=Ge(e.handler)?e.handler.bind(n):t[e.handler];Ge(a)&&bt(o,a,e)}}function jc(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:o,optionsCache:a,config:{optionMergeStrategies:u}}=e.appContext,f=a.get(t);let h;return f?h=f:!o.length&&!n&&!s?h=t:(h={},o.length&&o.forEach(y=>Vo(h,y,u,!0)),Vo(h,t,u)),at(t)&&a.set(t,h),h}function Vo(e,t,n,s=!1){const{mixins:o,extends:a}=t;a&&Vo(e,a,n,!0),o&&o.forEach(u=>Vo(e,u,n,!0));for(const u in t)if(!(s&&u==="expose")){const f=gp[u]||n&&n[u];e[u]=f?f(e[u],t[u]):t[u]}return e}const gp={data:ou,props:iu,emits:iu,methods:ys,computed:ys,beforeCreate:qt,created:qt,beforeMount:qt,mounted:qt,beforeUpdate:qt,updated:qt,beforeDestroy:qt,beforeUnmount:qt,destroyed:qt,unmounted:qt,activated:qt,deactivated:qt,errorCaptured:qt,serverPrefetch:qt,components:ys,directives:ys,watch:wp,provide:ou,inject:bp};function ou(e,t){return t?e?function(){return Et(Ge(e)?e.call(this,this):e,Ge(t)?t.call(this,this):t)}:t:e}function bp(e,t){return ys(Sa(e),Sa(t))}function Sa(e){if(Le(e)){const t={};for(let n=0;nt==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${hn(t)}Modifiers`]||e[`${dr(t)}Modifiers`];function Cp(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||dt;let o=n;const a=t.startsWith("update:"),u=a&&xp(s,t.slice(7));u&&(u.trim&&(o=n.map(m=>wt(m)?m.trim():m)),u.number&&(o=o.map(oi)));let f,h=s[f=Qi(t)]||s[f=Qi(hn(t))];!h&&a&&(h=s[f=Qi(dr(t))]),h&&cn(h,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,cn(y,e,6,o)}}const Sp=new WeakMap;function Rc(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 u={},f=!1;if(!Ge(e)){const h=y=>{const m=Rc(y,t,!0);m&&(f=!0,Et(u,m))};!n&&t.mixins.length&&t.mixins.forEach(h),e.extends&&h(e.extends),e.mixins&&e.mixins.forEach(h)}return!a&&!f?(at(e)&&s.set(e,null),null):(Le(a)?a.forEach(h=>u[h]=null):Et(u,a),at(e)&&s.set(e,u),u)}function fi(e,t){return!e||!ni(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),ot(e,t[0].toLowerCase()+t.slice(1))||ot(e,dr(t))||ot(e,t))}function au(e){const{type:t,vnode:n,proxy:s,withProxy:o,propsOptions:[a],slots:u,attrs:f,emit:h,render:y,renderCache:m,props:k,data:x,setupState:C,ctx:M,inheritAttrs:U}=e,re=Ko(e);let ae,O;try{if(n.shapeFlag&4){const X=o||s,fe=X;ae=xn(y.call(fe,X,m,k,C,x,M)),O=f}else{const X=t;ae=xn(X.length>1?X(k,{attrs:f,slots:u,emit:h}):X(k,null)),O=t.props?f:Ep(f)}}catch(X){Pr.length=0,li(X,e,1),ae=Pe(Ft)}let S=ae;if(O&&U!==!1){const X=Object.keys(O),{shapeFlag:fe}=S;X.length&&fe&7&&(a&&X.some(ri)&&(O=$p(O,a)),S=ur(S,O,!1,!0))}if(n.dirs&&(S=ur(S,null,!1,!0),S.dirs=S.dirs?S.dirs.concat(n.dirs):n.dirs),n.transition){const X=ui(S.type)&&Fo(S)||S;lr(X,n.transition)}return ae=S,Ko(re),ae}function Lc(e,t=!0){let n;for(let s=0;s{let t;for(const n in e)(n==="class"||n==="style"||ni(n))&&((t||(t={}))[n]=e[n]);return t},$p=(e,t)=>{const n={};for(const s in e)(!ri(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function Ap(e,t,n){const{props:s,children:o,component:a}=e,{props:u,children:f,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?lu(s,u,y):!!u;if(h&8){const m=t.dynamicProps;for(let k=0;kObject.create(Fc),Vc=e=>Object.getPrototypeOf(e)===Fc;function Pp(e,t,n,s=!1){const o={},a=Nc();e.propsDefaults=Object.create(null),Bc(e,t,o,a);for(const u in e.propsOptions[0])u in o||(o[u]=void 0);n?e.props=s?o:Lf(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:u}}=e,f=st(o),[h]=e.propsOptions;let y=!1;if((s||u>0)&&!(u&16)){if(u&8){const m=e.vnode.dynamicProps;for(let k=0;k{h=!0;const[x,C]=Uc(k,t,!0);Et(u,x),C&&f.push(...C)};!n&&t.mixins.length&&t.mixins.forEach(m),e.extends&&m(e.extends),e.mixins&&e.mixins.forEach(m)}if(!a&&!h)return at(e)&&s.set(e,Ar),Ar;if(Le(a))for(let m=0;me==="_"||e==="_ctx"||e==="$stable",el=e=>Le(e)?e.map(xn):[xn(e)],Ip=(e,t,n)=>{if(t._n)return t;const s=fr((...o)=>el(t(...o)),n);return s._c=!1,s},qc=(e,t,n)=>{const s=e._ctx;for(const o in e){if(Za(o))continue;const a=e[o];if(Ge(a))t[o]=Ip(o,a,s);else if(a!=null){const u=el(a);t[o]=()=>u}}},Hc=(e,t)=>{const n=el(t);e.slots.default=()=>n},Wc=(e,t,n)=>{for(const s in t)(n||!Za(s))&&(e[s]=t[s])},jp=(e,t,n)=>{const s=e.slots=Nc();if(e.vnode.shapeFlag&32){const o=t._;o?(Wc(s,t,n),n&&Ju(s,"_",o,!0)):qc(t,s)}else t&&Hc(e,t)},Dp=(e,t,n)=>{const{vnode:s,slots:o}=e;let a=!0,u=dt;if(s.shapeFlag&32){const f=t._;f?n&&f===1?a=!1:Wc(o,t,n):(a=!t.$stable,qc(t,o)),u=t}else t&&(Hc(e,t),u={default:1});if(a)for(const f in o)!Za(f)&&u[f]==null&&delete o[f]},Ht=Np;function Rp(e){return Lp(e)}function Lp(e,t){const n=ii();n.__VUE__=!0;const{insert:s,remove:o,patchProp:a,createElement:u,createText:f,createComment:h,setText:y,setElementText:m,parentNode:k,nextSibling:x,setScopeId:C=En,insertStaticContent:M}=e,U=(w,g,P,le=null,se=null,ue=null,ge=void 0,oe=null,we=!!g.dynamicChildren)=>{if(w===g)return;w&&!$r(w,g)&&(le=vt(w),te(w,se,ue,!0),w=null),g.patchFlag===-2&&(we=!1,g.dynamicChildren=null),g.dynamicChildren&&w&&w.dynamicChildren&&w.dynamicChildren.hasOnce&&(g.dynamicChildren===Ar&&(g.dynamicChildren=[]),g.dynamicChildren.hasOnce=!0);const{type:z,ref:H,shapeFlag:Y}=g;switch(z){case pi:re(w,g,P,le);break;case Ft:ae(w,g,P,le);break;case Po:w==null&&O(g,P,le,ge);break;case Re:J(w,g,P,le,se,ue,ge,oe,we);break;default:Y&1?fe(w,g,P,le,se,ue,ge,oe,we):Y&6?xe(w,g,P,le,se,ue,ge,oe,we):(Y&64||Y&128)&&z.process(w,g,P,le,se,ue,ge,oe,we,Jt)}H!=null&&se?ks(H,w&&w.ref,ue,g||w,!g):H==null&&w&&w.ref!=null&&ks(w.ref,null,ue,w,!0)},re=(w,g,P,le)=>{if(w==null)s(g.el=f(g.children),P,le);else{const se=g.el=w.el;g.children!==w.children&&y(se,g.children)}},ae=(w,g,P,le)=>{w==null?s(g.el=h(g.children||""),P,le):g.el=w.el},O=(w,g,P,le)=>{[w.el,w.anchor]=M(w.children,g,P,le,w.el,w.anchor)},S=({el:w,anchor:g},P,le)=>{let se;for(;w&&w!==g;)se=x(w),s(w,P,le),w=se;s(g,P,le)},X=({el:w,anchor:g})=>{let P;for(;w&&w!==g;)P=x(w),o(w),w=P;o(g)},fe=(w,g,P,le,se,ue,ge,oe,we)=>{if(g.type==="svg"?ge="svg":g.type==="math"&&(ge="mathml"),w==null)ie(g,P,le,se,ue,ge,oe,we);else{const z=w.el&&w.el._isVueCE?w.el:null;try{z&&z._beginPatch(),j(w,g,se,ue,ge,oe,we)}finally{z&&z._endPatch()}}},ie=(w,g,P,le,se,ue,ge,oe)=>{let we,z;const{props:H,shapeFlag:Y,transition:$e,dirs:Ne}=w;if(we=w.el=u(w.type,ue,H&&H.is,H),Y&8?m(we,w.children):Y&16&&T(w.children,we,null,le,se,ia(w,ue),ge,oe),Ne&&kr(w,null,le,"created"),Z(we,w,w.scopeId,ge,le),H){for(const Je in H)Je!=="value"&&!bs(Je)&&a(we,Je,null,H[Je],ue,le);"value"in H&&a(we,"value",null,H.value,ue),(z=H.onVnodeBeforeMount)&&gn(z,le,w)}Ne&&kr(w,null,le,"beforeMount");const Xe=Kp(se,$e);Xe&&$e.beforeEnter(we),s(we,g,P),((z=H&&H.onVnodeMounted)||Xe||Ne)&&Ht(()=>{try{z&&gn(z,le,w),Xe&&$e.enter(we),Ne&&kr(w,null,le,"mounted")}finally{}},se)},Z=(w,g,P,le,se)=>{if(P&&C(w,P),le)for(let ue=0;ue{for(let z=we;z{const oe=g.el=w.el;let{patchFlag:we,dynamicChildren:z,dirs:H}=g;we|=w.patchFlag&16;const Y=w.props||dt,$e=g.props||dt;let Ne;if(P&&xr(P,!1),(Ne=$e.onVnodeBeforeUpdate)&&gn(Ne,P,g,w),H&&kr(g,w,P,"beforeUpdate"),P&&xr(P,!0),z&&(!w.dynamicChildren||w.dynamicChildren.length!==z.length)&&(we=0,ge=!1,z=null),(Y.innerHTML&&$e.innerHTML==null||Y.textContent&&$e.textContent==null)&&m(oe,""),z?de(w.dynamicChildren,z,oe,P,le,ia(g,se),ue):ge||ye(w,g,oe,null,P,le,ia(g,se),ue,!1),we>0){if(we&16)ke(oe,Y,$e,P,se);else if(we&2&&Y.class!==$e.class&&a(oe,"class",null,$e.class,se),we&4&&a(oe,"style",Y.style,$e.style,se),we&8){const Xe=g.dynamicProps;for(let Je=0;Je{Ne&&gn(Ne,P,g,w),H&&kr(g,w,P,"updated")},le)},de=(w,g,P,le,se,ue,ge)=>{for(let oe=0;oe{if(g!==P){if(g!==dt)for(const ue in g)!bs(ue)&&!(ue in P)&&a(w,ue,g[ue],null,se,le);for(const ue in P){if(bs(ue))continue;const ge=P[ue],oe=g[ue];ge!==oe&&ue!=="value"&&a(w,ue,oe,ge,se,le)}"value"in P&&a(w,"value",g.value,P.value,se)}},J=(w,g,P,le,se,ue,ge,oe,we)=>{const z=g.el=w?w.el:f(""),H=g.anchor=w?w.anchor:f("");let{patchFlag:Y,dynamicChildren:$e,slotScopeIds:Ne}=g;Ne&&(oe=oe?oe.concat(Ne):Ne),w==null?(s(z,P,le),s(H,P,le),T(g.children||[],P,H,se,ue,ge,oe,we)):Y>0&&Y&64&&$e&&w.dynamicChildren&&w.dynamicChildren.length===$e.length?(de(w.dynamicChildren,$e,P,se,ue,ge,oe),(g.key!=null||se&&g===se.subTree)&&tl(w,g,!0)):ye(w,g,P,H,se,ue,ge,oe,we)},xe=(w,g,P,le,se,ue,ge,oe,we)=>{g.slotScopeIds=oe,w==null?g.shapeFlag&512?se.ctx.activate(g,P,le,ge,we):Ve(g,P,le,se,ue,ge,we):nt(w,g,we)},Ve=(w,g,P,le,se,ue,ge)=>{const oe=w.component=zp(w,le,se);if(ci(w)&&(oe.ctx.renderer=Jt),Gp(oe,!1,ge),oe.asyncDep){if(se&&se.registerDep(oe,qe,ge,ue),!w.el){const we=oe.subTree=Pe(Ft);ae(null,we,g,P),w.placeholder=we.el}}else qe(oe,w,g,P,se,ue,ge)},nt=(w,g,P)=>{const le=g.component=w.component;if(Ap(w,g,P))if(le.asyncDep&&!le.asyncResolved){g.el=w.el,g.placeholder=w.placeholder,He(le,g,P);return}else le.next=g,le.update();else g.el=w.el,g.placeholder=w.placeholder,le.vnode=g},qe=(w,g,P,le,se,ue,ge)=>{const oe=()=>{if(w.isMounted){let{next:Y,bu:$e,u:Ne,parent:Xe,vnode:Je}=w;{const Bt=zc(w);if(Bt){Y&&(Y.el=Je.el,He(w,Y,ge)),Bt.asyncDep.then(()=>{Ht(()=>{w.isUnmounted||z()},se)});return}}let Qe=Y,mt;xr(w,!1),Y?(Y.el=Je.el,He(w,Y,ge)):Y=Je,$e&&Ao($e),(mt=Y.props&&Y.props.onVnodeBeforeUpdate)&&gn(mt,Xe,Y,Je),xr(w,!0);const _t=au(w),Xt=w.subTree;w.subTree=_t,U(Xt,_t,k(Xt.el),vt(Xt),w,se,ue),Y.el=_t.el,Qe===null&&Tp(w,_t.el),Ne&&Ht(Ne,se),(mt=Y.props&&Y.props.onVnodeUpdated)&&Ht(()=>gn(mt,Xe,Y,Je),se)}else{let Y;const{el:$e,props:Ne}=g,{bm:Xe,m:Je,parent:Qe,root:mt,type:_t}=w,Xt=xs(g);xr(w,!1),Xe&&Ao(Xe),!Xt&&(Y=Ne&&Ne.onVnodeBeforeMount)&&gn(Y,Qe,g),xr(w,!0);{mt.ce&&mt.ce._hasShadowRoot()&&mt.ce._injectChildStyle(_t,w.parent?w.parent.type:void 0);const Bt=w.subTree=au(w);U(null,Bt,P,le,w,se,ue),g.el=Bt.el}if(Je&&Ht(Je,se),!Xt&&(Y=Ne&&Ne.onVnodeMounted)){const Bt=g;Ht(()=>gn(Y,Qe,Bt),se)}(g.shapeFlag&256||Qe&&xs(Qe.vnode)&&Qe.vnode.shapeFlag&256)&&w.a&&Ht(w.a,se),w.isMounted=!0,g=P=le=null}};w.scope.on();const we=w.effect=new ec(oe);w.scope.off();const z=w.update=we.run.bind(we),H=w.job=we.runIfDirty.bind(we);H.i=w,H.id=w.uid,we.scheduler=()=>Xa(H),xr(w,!0),z()},He=(w,g,P)=>{g.component=w;const le=w.vnode.props;w.vnode=g,w.next=null,Op(w,g.props,le,P),Dp(w,g.children,P),An(),gc(w),Tn()},ye=(w,g,P,le,se,ue,ge,oe,we=!1)=>{const z=w&&w.children,H=w?w.shapeFlag:0,Y=g.children,{patchFlag:$e,shapeFlag:Ne}=g;if($e>0){if($e&128){Fe(z,Y,P,le,se,ue,ge,oe,we);return}else if($e&256){Oe(z,Y,P,le,se,ue,ge,oe,we);return}}Ne&8?(H&16&&ct(z,se,ue),Y!==z&&m(P,Y)):H&16?Ne&16?Fe(z,Y,P,le,se,ue,ge,oe,we):ct(z,se,ue,!0):(H&8&&m(P,""),Ne&16&&T(Y,P,le,se,ue,ge,oe,we))},Oe=(w,g,P,le,se,ue,ge,oe,we)=>{w=w||Ar,g=g||Ar;const z=w.length,H=g.length,Y=Math.min(z,H);let $e;for($e=0;$eH?ct(w,se,ue,!0,!1,Y):T(g,P,le,se,ue,ge,oe,we,Y)},Fe=(w,g,P,le,se,ue,ge,oe,we)=>{let z=0;const H=g.length;let Y=w.length-1,$e=H-1;for(;z<=Y&&z<=$e;){const Ne=w[z],Xe=g[z]=we?Dn(g[z]):xn(g[z]);if($r(Ne,Xe))U(Ne,Xe,P,null,se,ue,ge,oe,we);else break;z++}for(;z<=Y&&z<=$e;){const Ne=w[Y],Xe=g[$e]=we?Dn(g[$e]):xn(g[$e]);if($r(Ne,Xe))U(Ne,Xe,P,null,se,ue,ge,oe,we);else break;Y--,$e--}if(z>Y){if(z<=$e){const Ne=$e+1,Xe=Ne$e)for(;z<=Y;)te(w[z],se,ue,!0),z++;else{const Ne=z,Xe=z,Je=new Map;for(z=Xe;z<=$e;z++){const Ot=g[z]=we?Dn(g[z]):xn(g[z]);Ot.key!=null&&Je.set(Ot.key,z)}let Qe,mt=0;const _t=$e-Xe+1;let Xt=!1,Bt=0;const Zt=new Array(_t);for(z=0;z<_t;z++)Zt[z]=0;for(z=Ne;z<=Y;z++){const Ot=w[z];if(mt>=_t){te(Ot,se,ue,!0);continue}let $t;if(Ot.key!=null)$t=Je.get(Ot.key);else for(Qe=Xe;Qe<=$e;Qe++)if(Zt[Qe-Xe]===0&&$r(Ot,g[Qe])){$t=Qe;break}$t===void 0?te(Ot,se,ue,!0):(Zt[$t-Xe]=z+1,$t>=Bt?Bt=$t:Xt=!0,U(Ot,g[$t],P,null,se,ue,ge,oe,we),mt++)}const hr=Xt?Fp(Zt):Ar;for(Qe=hr.length-1,z=_t-1;z>=0;z--){const Ot=Xe+z,$t=g[Ot],Me=g[Ot+1],Hn=Ot+1{const{el:ue,type:ge,transition:oe,children:we,shapeFlag:z}=w;if(z&6){je(w.component.subTree,g,P,le);return}if(z&128){w.suspense.move(g,P,le);return}if(z&64){ge.move(w,g,P,Jt);return}if(ge===Re){s(ue,g,P);for(let Y=0;Yoe.enter(ue),se));else{const{leave:Y,delayLeave:$e,afterLeave:Ne}=oe,Xe=()=>{w.ctx.isUnmounted?o(ue):s(ue,g,P)},Je=()=>{const Qe=ue._isLeaving||!!ue[on];ue._isLeaving&&ue[on](!0),oe.persisted&&!Qe?Xe():Y(ue,()=>{Xe(),Ne&&Ne()})};$e?$e(ue,Xe,Je):Je()}else s(ue,g,P)},te=(w,g,P,le=!1,se=!1)=>{const{type:ue,props:ge,ref:oe,children:we,dynamicChildren:z,shapeFlag:H,patchFlag:Y,dirs:$e,cacheIndex:Ne,memo:Xe}=w;if((Y===-2||z&&z.hasOnce)&&(se=!1),oe!=null&&(An(),ks(oe,null,P,w,!0),Tn()),Ne!=null&&(!w.ctx||w.ctx===g)&&(g.renderCache[Ne]=void 0),H&256){g.ctx.deactivate(w);return}const Je=H&1&&$e,Qe=!xs(w);let mt;if(Qe&&(mt=ge&&ge.onVnodeBeforeUnmount)&&gn(mt,g,w),H&6)Ke(w.component,P,le);else{if(H&128){w.suspense.unmount(P,le);return}Je&&kr(w,null,g,"beforeUnmount"),H&64?w.type.remove(w,g,P,Jt,le):z&&!z.hasOnce&&(ue!==Re||Y>0&&Y&64)?ct(z,g,P,!1,!0):(ue===Re&&Y&384||!se&&H&16)&&ct(we,g,P),le&&N(w)}const _t=Xe!=null&&Ne==null;(Qe&&(mt=ge&&ge.onVnodeUnmounted)||Je||_t)&&Ht(()=>{mt&&gn(mt,g,w),Je&&kr(w,null,g,"unmounted"),_t&&(w.el=null)},P)},N=w=>{const{type:g,el:P,anchor:le,transition:se}=w,ue=g===Re;if(ue&&!se){ce(P,le);return}if(g===Po){X(w),se&&!se.persisted&&se.afterLeave&&se.afterLeave();return}const ge=ue?Ms(w):w,oe=()=>{ue?k(P)&&ce(P,le):o(P),se&&!se.persisted&&se.afterLeave&&se.afterLeave()};if(ge&&ge.shapeFlag&1&&se&&!se.persisted){const{leave:we,delayLeave:z}=se,H=ge.el,Y=()=>we(H,oe);z?z(H,oe,Y):Y()}else oe()},ce=(w,g)=>{let P;for(;w!==g;)P=x(w),o(w),w=P;o(g)},Ke=(w,g,P)=>{const{bum:le,scope:se,job:ue,subTree:ge,um:oe,m:we,a:z}=w;cu(we),cu(z),le&&Ao(le),se.stop(),ue?(ue.flags|=8,te(ge,w,g,P)):w.vnode.el&&ge&&(ge.transition=w.vnode.transition,te(ge,w,g,P)),oe&&Ht(oe,g),Ht(()=>{w.isUnmounted=!0},g)},ct=(w,g,P,le=!1,se=!1,ue=0)=>{for(let ge=ue;ge{if(w.shapeFlag&6)return vt(w.component.subTree);if(w.shapeFlag&128)return w.suspense.next();const g=x(w.anchor||w.el),P=g&&g[Cc];return P?x(P):g},Yt=(w,g,P)=>{const le=w&&g._vnode?void 0:w&&w.component?w.component.uid:Wp();Yf(()=>{w==null?g._vnode&&te(g._vnode,null,null,!0):U(g._vnode||null,w,g,null,null,null,P),g._vnode=w},le)},Jt={p:U,um:te,m:je,r:N,mt:Ve,mc:T,pc:ye,pbc:de,n:vt,o:e};return{render:Yt,hydrate:void 0,createApp:kp(Yt)}}function ia({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 tl(e,t,n=!1){const s=e.children,o=t.children;if(Le(s)&&Le(o))for(let a=0;a>1,e[n[f]]0&&(t[s]=n[a-1]),n[a]=s)}}for(a=n.length,u=n[a-1];a-- >0;)n[a]=u,u=t[u];return n}function zc(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:zc(t)}function cu(e){if(e)for(let t=0;te.__isSuspense;function Np(e,t){t&&t.pendingBranch?Le(e)?t.effects.push(...e):t.effects.push(e):Gf(e)}const Re=Symbol.for("v-fgt"),pi=Symbol.for("v-txt"),Ft=Symbol.for("v-cmt"),Po=Symbol.for("v-stc"),Pr=[];let rn=null;function F(e=!1){Pr.push(rn=e?null:[])}function Yc(){Pr.pop(),rn=Pr[Pr.length-1]||null}let Is=1;function Bo(e,t=!1){Is+=e,e<0&&rn&&t&&(rn.hasOnce=!0)}function Jc(e){return e.dynamicChildren=Is>0?rn||Ar:null,Yc(),Is>0&&rn&&rn.push(e),e}function W(e,t,n,s,o,a){return Jc(c(e,t,n,s,o,a,!0))}function It(e,t,n,s,o){return Jc(Pe(e,t,n,s,o,!0))}function js(e){return e?e.__v_isVNode===!0:!1}function $r(e,t){return e.type===t.type&&e.key===t.key}const Xc=({key:e})=>e??null,Oo=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?wt(e)||Nt(e)||Ge(e)?{i:an,r:e,k:t,f:!!n}:e:null);function c(e,t=null,n=null,s=0,o=null,a=e===Re?0:1,u=!1,f=!1){const h={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Xc(t),ref:t&&Oo(t),scopeId:_c,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:an};return f?(Uo(h,n),a&128&&e.normalize(h)):n&&(h.shapeFlag|=wt(n)?8:16),Is>0&&!u&&rn&&(h.patchFlag>0||a&6)&&h.patchFlag!==32&&rn.push(h),h}const Pe=Vp;function Vp(e,t=null,n=null,s=0,o=null,a=!1){if((!e||e===hp)&&(e=Ft),js(e)){const f=ur(e,t,!0);return n&&Uo(f,n),Is>0&&!a&&rn&&(f.shapeFlag&6?rn[rn.indexOf(e)]=f:rn.push(f)),f.patchFlag=-2,f}if(Qp(e)&&(e=e.__vccOpts),t){t=Bp(t);let{class:f,style:h}=t;f&&!wt(f)&&(t.class=et(f)),at(h)&&(Ja(h)&&!Le(h)&&(h=Et({},h)),t.style=or(h))}const u=wt(e)?1:Gc(e)?128:ui(e)?64:at(e)?4:Ge(e)?2:0;return c(e,t,n,s,o,u,a,!0)}function Bp(e){return e?Ja(e)||Vc(e)?Et({},e):e:null}function ur(e,t,n=!1,s=!1){const{props:o,ref:a,patchFlag:u,children:f,transition:h}=e,y=t?qp(o||{},t):o,m={__v_isVNode:!0,__v_skip:!0,type:e.type,props:y,key:y&&Xc(y),ref:t&&t.ref?n&&a?Le(a)?a.concat(Oo(t)):[a,Oo(t)]:Oo(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!==Re?u===-1?16:u|16:u,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:h,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&ur(e.ssContent),ssFallback:e.ssFallback&&ur(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce,cacheIndex:e.cacheIndex};return h&&s&&lr(m,h.clone(m)),m}function nn(e=" ",t=0){return Pe(pi,null,e,t)}function Up(e,t){const n=Pe(Po,null,e);return n.staticCount=t,n}function Se(e="",t=!1){return t?(F(),It(Ft,null,e)):Pe(Ft,null,e)}function xn(e){return e==null||typeof e=="boolean"?Pe(Ft):Le(e)?Pe(Re,null,e.slice()):js(e)?Dn(e):Pe(pi,null,String(e))}function Dn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:ur(e)}function Uo(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(Le(t))n=16;else if(typeof t=="object")if(s&65){const o=t.default;o&&(o._c&&(o._d=!1),Uo(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!Vc(t)?t._ctx=an:o===3&&an&&(an.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(Ge(t)){if(s&65){Uo(e,{default:t});return}t={default:t,_ctx:an},n=32}else t=String(t),s&64?(n=16,t=[nn(t)]):n=8;e.children=t,e.shapeFlag|=n}function qp(...e){const t={};for(let n=0;nzt||an;let qo,Ds;{const e=ii(),t=(n,s)=>{let o;return(o=e[n])||(o=e[n]=[]),o.push(s),a=>{o.length>1?o.forEach(u=>u(a)):o[0](a)}};qo=t("__VUE_INSTANCE_SETTERS__",n=>zt=n),Ds=t("__VUE_SSR_SETTERS__",n=>Rs=n)}const qs=e=>{const t=zt;return qo(e),e.scope.on(),()=>{e.scope.off(),qo(t)}},du=()=>{zt&&zt.scope.off(),qo(null)};function Zc(e){return e.vnode.shapeFlag&4}let Rs=!1;function Gp(e,t=!1,n=!1){t&&Ds(t);const{props:s,children:o}=e.vnode,a=Zc(e);Pp(e,s,a,t),jp(e,o,n||t);const u=a?Yp(e,t):void 0;return t&&Ds(!1),u}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),u=Bs(s,e,0,[e.props,o]),f=Wu(u);if(Tn(),a(),(f||e.sp)&&!xs(e)&&Tc(e),f){if(u.then(du,du),t)return u.then(h=>{Ds(!0);try{fu(e,h,t)}finally{Ds(!1)}}).catch(h=>{li(h,e,0)});e.asyncDep=u}else fu(e,u)}else ed(e)}function fu(e,t,n){Ge(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:at(t)&&(e.setupState=vc(t)),ed(e)}function ed(e,t,n){const s=e.type;e.render||(e.render=s.render||En);{const o=qs(e);An();try{mp(e)}finally{Tn(),o()}}}const Jp={get(e,t){return Kt(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 hi(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(vc(Kf(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Cs)return Cs[n](e)},has(t,n){return n in t||n in Cs}})):e.proxy}function Qp(e){return Ge(e)&&"__vccOpts"in e}const it=(e,t)=>Uf(e,t,Rs);function Zp(e,t,n){try{Bo(-1);const s=arguments.length;return s===2?at(t)&&!Le(t)?js(t)?Pe(e,null,[t]):Pe(e,t):Pe(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&js(n)&&(n=[n]),Pe(e,t,n))}finally{Bo(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 pu=typeof window<"u"&&window.trustedTypes;if(pu)try{Aa=pu.createPolicy("vue",{createHTML:e=>e})}catch{}const td=Aa?e=>Aa.createHTML(e):e=>e,th="http://www.w3.org/2000/svg",nh="http://www.w3.org/1998/Math/MathML",jn=typeof document<"u"?document:null,hu=jn&&jn.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"?jn.createElementNS(th,e):t==="mathml"?jn.createElementNS(nh,e):n?jn.createElement(e,{is:n}):jn.createElement(e);return e==="select"&&s&&s.multiple!=null&&o.setAttribute("multiple",s.multiple),o},createText:e=>jn.createTextNode(e),createComment:e=>jn.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>jn.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,o,a){const u=n?n.previousSibling:t.lastChild;if(o&&(o===a||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),!(o===a||!(o=o.nextSibling)););else{hu.innerHTML=td(s==="svg"?`${e}`:s==="mathml"?`${e}`:e);const f=hu.content;if(s==="svg"||s==="mathml"){const h=f.firstChild;for(;h.firstChild;)f.appendChild(h.firstChild);f.removeChild(h)}t.insertBefore(f,n)}return[u?u.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Qn="transition",vs="animation",Jr=Symbol("_vtc"),nd={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},rd=Et({},Ec,nd),sh=e=>(e.displayName="Transition",e.props=rd,e),ns=sh((e,{slots:t})=>Zp(sp,sd(e),t)),Cr=(e,t=[])=>{Le(e)?e.forEach(n=>n(...t)):e&&e(...t)},vu=e=>e?Le(e)?e.some(t=>t.length>1):e.length>1:!1;function sd(e){const t={};for(const J in e)J in nd||(t[J]=e[J]);if(e.css===!1)return t;const{name:n="v",type:s,duration:o,enterFromClass:a=`${n}-enter-from`,enterActiveClass:u=`${n}-enter-active`,enterToClass:f=`${n}-enter-to`,appearFromClass:h=a,appearActiveClass:y=u,appearToClass:m=f,leaveFromClass:k=`${n}-leave-from`,leaveActiveClass:x=`${n}-leave-active`,leaveToClass:C=`${n}-leave-to`}=e,M=oh(o),U=M&&M[0],re=M&&M[1],{onBeforeEnter:ae,onEnter:O,onEnterCancelled:S,onLeave:X,onLeaveCancelled:fe,onBeforeAppear:ie=ae,onAppear:Z=O,onAppearCancelled:T=S}=t,j=(J,xe,Ve,nt)=>{J._enterCancelled=nt,er(J,xe?m:f),er(J,xe?y:u),Ve&&Ve()},de=(J,xe)=>{J._isLeaving=!1,er(J,k),er(J,C),er(J,x),xe&&xe()},ke=J=>(xe,Ve)=>{const nt=J?Z:O,qe=()=>j(xe,J,Ve);Cr(nt,[xe,qe]),mu(()=>{er(xe,J?h:a),bn(xe,J?m:f),vu(nt)||yu(xe,s,U,qe)})};return Et(t,{onBeforeEnter(J){Cr(ae,[J]),bn(J,a),bn(J,u)},onBeforeAppear(J){Cr(ie,[J]),bn(J,h),bn(J,y)},onEnter:ke(!1),onAppear:ke(!0),onLeave(J,xe){J._isLeaving=!0;const Ve=()=>de(J,xe);bn(J,k),J._enterCancelled?(bn(J,x),Ta(J)):(Ta(J),bn(J,x)),mu(()=>{J._isLeaving&&(er(J,k),bn(J,C),vu(X)||yu(J,s,re,Ve))}),Cr(X,[J,Ve])},onEnterCancelled(J){j(J,!1,void 0,!0),Cr(S,[J])},onAppearCancelled(J){j(J,!0,void 0,!0),Cr(T,[J])},onLeaveCancelled(J){de(J),Cr(fe,[J])}})}function oh(e){if(e==null)return null;if(at(e))return[aa(e.enter),aa(e.leave)];{const t=aa(e);return[t,t]}}function aa(e){return cf(e)}function bn(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Jr]||(e[Jr]=new Set)).add(t)}function er(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const n=e[Jr];n&&(n.delete(t),n.size||(e[Jr]=void 0))}function mu(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let ih=0;function yu(e,t,n,s){const o=e._endId=++ih,a=()=>{o===e._endId&&s()};if(n!=null)return setTimeout(a,n);const{type:u,timeout:f,propCount:h}=od(e,t);if(!u)return s();const y=u+"end";let m=0;const k=()=>{e.removeEventListener(y,x),a()},x=C=>{C.target===e&&++m>=h&&k()};setTimeout(()=>{m(n[M]||"").split(", "),o=s(`${Qn}Delay`),a=s(`${Qn}Duration`),u=gu(o,a),f=s(`${vs}Delay`),h=s(`${vs}Duration`),y=gu(f,h);let m=null,k=0,x=0;t===Qn?u>0&&(m=Qn,k=u,x=a.length):t===vs?y>0&&(m=vs,k=y,x=h.length):(k=Math.max(u,y),m=k>0?u>y?Qn:vs:null,x=m?m===Qn?a.length:h.length:0);const C=m===Qn&&/\b(?:transform|all)(?:,|$)/.test(s(`${Qn}Property`).toString());return{type:m,timeout:k,propCount:x,hasTransform:C}}function gu(e,t){for(;e.lengthbu(n)+bu(e[s])))}function bu(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Ta(e){return(e?e.ownerDocument:document).body.offsetHeight}function ah(e,t,n){const s=e[Jr];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const wu=Symbol("_vod"),id=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 u of t.split(";")){const f=u.slice(0,u.indexOf(":")).trim();n[f]==null&&gs(s,f,"")}else for(const u in t)n[u]==null&&gs(s,u,"");for(const u in n){u==="display"&&(a=!0);const f=n[u];f!=null?fh(e,u,!wt(t)&&t?t[u]:void 0,f)||gs(s,u,f):gs(s,u,"")}}else if(o){if(t!==n){const u=s[lh];u&&(n+=";"+u),s.cssText=n,a=uh.test(n)}}else t&&e.removeAttribute("style");wu in e&&((!o||t!==n)&&(e[wu]=a?s.display:""),e[id]&&(s.display="none"))}const So=/\s*!important$/;function gs(e,t,n){if(Le(n))n.forEach(s=>gs(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))So.test(n)?e.setProperty(t,n.replace(So,""),"important"):e.setProperty(t,n);else{const s=dh(e,t);So.test(n)?e.setProperty(dr(s),n.replace(So,""),"important"):e[s]=n}}const _u=["Webkit","Moz","ms"],la={};function dh(e,t){const n=la[t];if(n)return n;let s=hn(t);if(s!=="filter"&&s in e)return la[t]=s;s=Yu(s);for(let o=0;o<_u.length;o++){const a=_u[o]+s;if(a in e)return la[t]=a}return t}function fh(e,t,n,s){return e.tagName==="TEXTAREA"&&(t==="width"||t==="height")&&wt(s)&&n===s}const ku="http://www.w3.org/1999/xlink";function xu(e,t,n,s,o,a=mf(t)){s&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(ku,t.slice(6,t.length)):e.setAttributeNS(ku,t,n):n==null||a&&!Xu(n)?e.removeAttribute(t):e.setAttribute(t,a?"":$n(n)?String(n):n)}function Cu(e,t,n,s,o){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?td(n):n);return}const a=e.tagName;if(t==="value"&&a!=="PROGRESS"&&!a.includes("-")){const f=a==="OPTION"?e.getAttribute("value")||"":e.value,h=n==null?e.type==="checkbox"?"on":"":String(n);(f!==h||!("_value"in e))&&(e.value=h),n==null&&e.removeAttribute(t),e._value=n;return}let u=!1;if(n===""||n==null){const f=typeof e[t];f==="boolean"?n=Xu(n):n==null&&f==="string"?(n="",u=!0):f==="number"&&(n=0,u=!0)}try{e[t]=n}catch{}u&&e.removeAttribute(o||t)}function rr(e,t,n,s){e.addEventListener(t,n,s)}function ph(e,t,n,s){e.removeEventListener(t,n,s)}const Su=Symbol("_vei");function hh(e,t,n,s,o=null){const a=e[Su]||(e[Su]={}),u=a[t];if(s&&u)u.value=s;else{const[f,h]=yh(t);if(s){const y=a[t]=wh(s,o);rr(e,f,y,h)}else u&&(ph(e,f,u,h),a[t]=void 0)}}const vh=/(Once|Passive|Capture)$/,mh=/^on:?(?:Once|Passive|Capture)$/;function yh(e){let t,n;for(;(n=e.match(vh))&&!mh.test(e);)t||(t={}),e=e.slice(0,e.length-n[1].length),t[n[1].toLowerCase()]=!0;return[e[2]===":"?e.slice(3):dr(e.slice(2)),t]}let ua=0;const gh=Promise.resolve(),bh=()=>ua||(gh.then(()=>ua=0),ua=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(Le(o)){const a=s.stopImmediatePropagation;s.stopImmediatePropagation=()=>{a.call(s),s._stopped=!0};const u=o.slice(),f=[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 u=o==="svg";t==="class"?ah(e,s,u):t==="style"?ch(e,n,s):ni(t)?ri(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,u))?(Cu(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&xu(e,t,s,u,a,t!=="value")):e._isVueCE&&(xh(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!wt(s)))?Cu(e,hn(t),s,a,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),xu(e,t,s,u))};function kh(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&Eu(t)&&Ge(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 Eu(t)&&wt(n)?!1:t in e}function xh(e,t){const n=e._def.props;if(!n)return!1;const s=hn(t);return Array.isArray(n)?n.some(o=>hn(o)===s):Object.keys(n).some(o=>hn(o)===s)}const ad=new WeakMap,ld=new WeakMap,Ho=Symbol("_moveCb"),$u=Symbol("_enterCb"),Pa=new WeakMap,Ch=e=>(delete e.props.mode,e),Sh=Ch({name:"TransitionGroup",props:Et({},rd,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=nl(),s=Sc();let o,a,u,f;const h=()=>(f===void 0&&(f=o.length>0&&Ih(o[0].el,n.vnode.el,Au(e))),f);return Oc(()=>{if(Pa.delete(n),!h()){o=[],u=void 0;return}const y=Au(e);o.forEach($h);const m=u&&Mh(u,n.vnode.el);u=void 0,o.forEach(x=>Ah(x,m));const k=o.filter(Th);Ta(n.vnode.el),k.forEach(x=>{const C=x.el,M=C.style;bn(C,y),M.transform=M.webkitTransform=M.transitionDuration="";const U=C[Ho]=re=>{re&&re.target!==C||(!re||re.propertyName.endsWith("transform"))&&(C.removeEventListener("transitionend",U),C[Ho]=null,er(C,y))};C.addEventListener("transitionend",U)}),o=[]}),()=>{const y=st(e),m=sd(y);let k=y.tag||Re;if(o=[],f=void 0,a)for(let x=0;xs.willMove()&&s.item.contains(t));return n&&vi(n.item,n)}function Ih(e,t,n){const s=e.cloneNode(),o=e[Jr];o&&o.forEach(f=>{f.split(/\s+/).forEach(h=>h&&s.classList.remove(h))}),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:u}=od(s);return a.removeChild(s),u}const Xr=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Le(t)?n=>Ao(t,n):t};function jh(e){e.target.composing=!0}function Tu(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Sn=Symbol("_assign"),Eo=Symbol("_initialValue");function ca(e,t,n){return t&&(e=e.trim()),n&&(e=oi(e)),e}const De={created(e,{modifiers:{lazy:t,trim:n,number:s}},o){e.parentNode&&(e.type==="text"?e[Eo]=e.defaultValue.replace(/[\r\n]/g,""):e.type==="textarea"&&(e[Eo]=e.defaultValue.replace(/\r\n?/g,` -`))),e[Sn]=Xr(o);const a=s||o.props&&o.props.type==="number";rr(e,t?"change":"input",u=>{u.target.composing||e[Sn](ca(e.value,n,a))}),(n||a)&&rr(e,"change",()=>{e.value=ca(e.value,n,a)}),t||(rr(e,"compositionstart",jh),rr(e,"compositionend",Tu),rr(e,"change",Tu))},mounted(e,{value:t,modifiers:{trim:n,number:s}}){const o=t??"",a=e[Eo];delete e[Eo],a!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==a?e[Sn](ca(e.value,n,s)):e.value=o},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:o,number:a}},u){if(e[Sn]=Xr(u),e.composing)return;const f=(a||e.type==="number")&&!/^0\d/.test(e.value)?oi(e.value):e.value,h=t??"";if(f===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)}},Dh={deep:!0,created(e,t,n){e[Sn]=Xr(n),rr(e,"change",()=>{const s=e._modelValue,o=Ls(e),a=e.checked,u=e[Sn];if(Le(s)){const f=Ba(s,o),h=f!==-1;if(a&&!h)u(s.concat(o));else if(!a&&h){const y=[...s];y.splice(f,1),u(y)}}else if(Bn(s)){const f=new Set(s);a?f.add(o):f.delete(o),u(f)}else u(ud(e,a))})},mounted:Pu,beforeUpdate(e,t,n){e[Sn]=Xr(n),Pu(e,t,n)}};function Pu(e,{value:t,oldValue:n},s){e._modelValue=t;let o;if(Le(t))o=Ba(t,s.props.value)>-1;else if(Bn(t))o=t.has(s.props.value);else{if(t===n)return;o=Un(t,ud(e,!0))}e.checked!==o&&(e.checked=o)}const Fn={deep:!0,created(e,{value:t,modifiers:{number:n}},s){e._modelValue=t,rr(e,"change",()=>{const o=Array.prototype.filter.call(e.options,h=>h.selected).map(h=>n?oi(Ls(h)):Ls(h)),a=e.multiple,u=a?Bn(e._modelValue)?new Set(o):o:o[0],f=e._pendingValue=[a,a?Le(u)?o.slice():o:u];try{e[Sn](u)}finally{ts(()=>{e._pendingValue===f&&(e._pendingValue=void 0)})}}),e[Sn]=Xr(s)},mounted(e,{value:t}){Ou(e,t)},beforeUpdate(e,{value:t},n){e._modelValue=t,e[Sn]=Xr(n)},updated(e,{value:t}){const n=e._pendingValue;e._pendingValue=void 0,(!n||n[0]!==e.multiple||!Rh(t,n[1],n[0]))&&Ou(e,t)}};function Rh(e,t,n){if(!n||Le(e))return Un(e,t);if(Bn(e)){if(e.size!==t.length)return!1;for(const s of t)if(!e.has(s))return!1;return!0}return!1}function Ou(e,t){const n=e.multiple,s=Le(t);if(!(n&&!s&&!Bn(t))){for(let o=0,a=e.options.length;oString(y)===String(f)):u.selected=Ba(t,f)>-1}else u.selected=t.has(f);else if(Un(Ls(u),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Ls(e){return"_value"in e?e._value:e.value}function ud(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const Lh=["ctrl","shift","alt","meta"],Kh={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))},Mr=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=(o,...a)=>{for(let u=0;u{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(u=>u===a||Fh[u]===a))return e(o)})},Nh=Et({patchProp:_h},rh);let Mu;function Vh(){return Mu||(Mu=Rp(Nh))}const Bh=(...e)=>{const t=Vh().createApp(...e),{mount:n}=t;return t.mount=s=>{const o=qh(s);if(!o)return;const a=t._component;!Ge(a)&&!a.render&&!a.template&&(a.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const u=n(o,!1,Uh(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),u},t};function Uh(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function qh(e){return wt(e)?document.querySelector(e):e}function At(e){return''+e+""}const Hh={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('')},Wh=["innerHTML"],lt=Vt({__name:"Icon",props:{name:{},size:{default:16}},setup(e){const t=e,n=it(()=>Hh[t.name]||"");return(s,o)=>(F(),W("span",{class:"icon",style:or({width:e.size+"px",height:e.size+"px"}),innerHTML:n.value},null,12,Wh))}}),zh=["aria-label"],Gh={class:"dialog-title"},Yh={class:"dialog-msg"},Jh={class:"dialog-btns"},Xh=Vt({__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 bt(()=>n.open,a=>{a?window.addEventListener("keydown",o):window.removeEventListener("keydown",o)}),pr(()=>window.removeEventListener("keydown",o)),(a,u)=>(F(),It(Us,{to:"body"},[Pe(ns,{name:"modal"},{default:fr(()=>[e.open?(F(),W("div",{key:0,class:"mask",onClick:u[2]||(u[2]=Mr(f=>s("cancel"),["self"]))},[c("div",{class:"dialog",role:"dialog","aria-label":e.title},[c("div",Gh,ne(e.title),1),c("div",Yh,ne(e.message),1),c("div",Jh,[c("button",{class:"btn btn-sm",onClick:u[0]||(u[0]=f=>s("cancel"))},ne(e.cancelText),1),c("button",{class:et(["btn btn-sm",e.danger?"btn-danger-solid":"btn-primary"]),onClick:u[1]||(u[1]=f=>s("confirm"))},ne(e.confirmText),3)])],8,zh)])):Se("",!0)]),_:1})]))}}),Gt=(e,t)=>{const n=e.__vccOpts||e;for(const[s,o]of t)n[s]=o;return n},cr=Gt(Xh,[["__scopeId","data-v-f27041d4"]]);var Iu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Qh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var cd={exports:{}};(function(e,t){((n,s)=>{e.exports=s()})(Iu,function(){var n=function(r,i){return(n=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(l,d){l.__proto__=d}:function(l,d){for(var p in d)Object.prototype.hasOwnProperty.call(d,p)&&(l[p]=d[p])}))(r,i)},s=function(){return(s=Object.assign||function(r){for(var i,l=1,d=arguments.length;l"u"||a.Promise||(a.Promise=Promise);var y=Object.getPrototypeOf,m={}.hasOwnProperty;function k(r,i){return m.call(r,i)}function x(r,i){typeof i=="function"&&(i=i(y(r))),(typeof Reflect>"u"?u:Reflect.ownKeys)(i).forEach(function(l){M(r,l,i[l])})}var C=Object.defineProperty;function M(r,i,l,d){C(r,i,h(l&&k(l,"get")&&typeof l.get=="function"?{get:l.get,set:l.set,configurable:!0}:{value:l,configurable:!0,writable:!0},d))}function U(r){return{from:function(i){return r.prototype=Object.create(i.prototype),M(r.prototype,"constructor",r),{extend:x.bind(null,r.prototype)}}}}var re=Object.getOwnPropertyDescriptor,ae=[].slice;function O(r,i,l){return ae.call(r,i,l)}function S(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"&&k(r,i))return r[i];if(!i)return r;if(typeof i!="string"){for(var l=[],d=0,p=i.length;d"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],Br=Xe[1],Br=Br&&Br.then,Qe=Je&&Je.constructor,mt=!!Xe[2],_t=function(r,i){Hn.push([r,i]),Bt&&(queueMicrotask(Dd),Bt=!1)},Xt=!0,Bt=!0,Zt=[],hr=[],Ot=P,$t={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:g,pgp:!1,env:{},finalize:g},Me=$t,Hn=[],vr=0,Ys=[];function Ce(r){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var i=this._PSD=Me;if(typeof r!="function"){if(r!==$e)throw new TypeError("Not a function");this._state=arguments[1],this._value=arguments[2],this._state===!1&&ki(this,this._value)}else this._state=null,this._value=null,++i.ref,function l(d,p){try{p(function(v){if(d._state===null){if(v===d)throw new TypeError("A promise cannot be resolved with itself.");var b=d._lib&&Rr();v&&typeof v.then=="function"?l(d,function(_,$){v instanceof Ce?v._then(_,$):v.then(_,$)}):(d._state=!0,d._value=v,hl(d)),b&&Lr()}},ki.bind(null,d))}catch(v){ki(d,v)}}(this,r)}var _i={get:function(){var r=Me,i=Zs;function l(d,p){var v=this,b=!r.global&&(r!==Me||i!==Zs),_=b&&!zn(),$=new Ce(function(B,I){xi(v,new pl(ml(d,r,b,_),ml(p,r,b,_),B,I,r))});return this._consoleTask&&($._consoleTask=this._consoleTask),$}return l.prototype=$e,l},set:function(r){M(this,"then",r&&r.prototype===$e?_i:{get:function(){return r},set:_i.set})}};function pl(r,i,l,d,p){this.onFulfilled=typeof r=="function"?r:null,this.onRejected=typeof i=="function"?i:null,this.resolve=l,this.reject=d,this.psd=p}function ki(r,i){var l,d;hr.push(i),r._state===null&&(l=r._lib&&Rr(),i=Ot(i),r._state=!1,r._value=i,d=r,Zt.some(function(p){return p._value===d._value})||Zt.push(d),hl(r),l)&&Lr()}function hl(r){var i=r._listeners;r._listeners=[];for(var l=0,d=i.length;l{for(var b=Zt.length;b;)if(Zt[--b]._value===v._value)return Zt.splice(b,1)})(i),l.resolve(d)}catch(v){l.reject(v)}finally{--vr==0&&Ci(),--l.psd.ref||l.psd.finalize()}}function Dd(){mr($t,function(){Rr()&&Lr()})}function Rr(){var r=Xt;return Bt=Xt=!1,r}function Lr(){var r,i,l;do for(;0.",yl="String expected.",to="__dbnames",Ei="readonly",$i="readwrite";function gr(r,i){return r?i?function(){return r.apply(this,arguments)&&i.apply(this,arguments)}:r:i}var gl={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function no(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 bl(){throw Ie.Type("Entity instances must never be new:ed. Instances are generated by the framework bypassing the constructor.")}function tt(r,i){try{var l=wl(r),d=wl(i);if(l!==d)return l==="Array"?1:d==="Array"?-1:l==="binary"?1:d==="binary"?-1:l==="string"?1:d==="string"?-1:l==="Date"?1:d!=="Date"?NaN:-1;switch(l){case"number":case"Date":case"string":return i{var _=I,$=b;if(typeof $!="function"&&$!==null)throw new TypeError("Class extends value "+String($)+" is not a constructor or null");function B(){this.constructor=_}function I(){return b!==null&&b.apply(this,arguments)||this}return n(_,$),_.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(b){return d.add(b)});function v(b){if(!b)return b;var _,$=Object.create(r.prototype);for(_ in b)if(!d.has(_))try{$[_]=b[_]}catch{}return $}return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=v,this.hook("reading",v),r},ft.prototype.defineClass=function(){return this.mapToClass(function(r){h(this,r)})},ft.prototype.add=function(r,i){var l=this,d=this.schema.primKey,p=d.auto,v=d.keyPath,b=r;return v&&p&&(b=no(v)(r)),this._trans("readwrite",function(_){return l.core.mutate({trans:_,type:"add",keys:i!=null?[i]:null,values:[b]})}).then(function(_){return _.numFailures?Ce.reject(_.failures[0]):_.lastResult}).then(function(_){if(v)try{Z(r,v,_)}catch{}return _})},ft.prototype.upsert=function(r,i){var l=this,d=this.schema.primKey.keyPath;return this._trans("readwrite",function(p){return l.core.get({trans:p,key:r}).then(function(v){var b=v??{};return xl(b,i),d&&Z(b,d,r),l.core.mutate({trans:p,type:"put",values:[b],keys:[r],upsert:!0,updates:{keys:[r],changeSpecs:[i]}}).then(function(_){return _.numFailures?Ce.reject(_.failures[0]):!!v})})})},ft.prototype.update=function(r,i){return typeof r!="object"||f(r)?this.where(":id").equals(r).modify(i):(r=ie(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)},ft.prototype.put=function(r,i){var l=this,d=this.schema.primKey,p=d.auto,v=d.keyPath,b=r;return v&&p&&(b=no(v)(r)),this._trans("readwrite",function(_){return l.core.mutate({trans:_,type:"put",values:[b],keys:i!=null?[i]:null})}).then(function(_){return _.numFailures?Ce.reject(_.failures[0]):_.lastResult}).then(function(_){if(v)try{Z(r,v,_)}catch{}return _})},ft.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(d){return ro(i,[r],d)}).then(function(d){return d.numFailures?Ce.reject(d.failures[0]):void 0})})},ft.prototype.clear=function(){var r=this;return this._trans("readwrite",function(i){return r.core.mutate({trans:i,type:"deleteRange",range:gl}).then(function(l){return ro(r,null,l)})}).then(function(i){return i.numFailures?Ce.reject(i.failures[0]):void 0})},ft.prototype.bulkGet=function(r){var i=this;return this._trans("readonly",function(l){return i.core.getMany({keys:r,trans:l}).then(function(d){return d.map(function(p){return i.hook.reading.fire(p)})})})},ft.prototype.bulkAdd=function(r,i,l){var d=this,p=Array.isArray(i)?i:void 0,v=(l=l||(p?void 0:i))?l.allKeys:void 0;return this._trans("readwrite",function(b){var _=d.schema.primKey,B=_.auto,_=_.keyPath;if(_&&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 $=r.length,B=_&&B?r.map(no(_)):r;return d.core.mutate({trans:b,type:"add",keys:p,values:B,wantResults:v}).then(function(I){var E=I.numFailures,A=I.failures;if(E===0)return v?I.results:I.lastResult;throw new vt("".concat(d.name,".bulkAdd(): ").concat(E," of ").concat($," operations failed"),A)})})},ft.prototype.bulkPut=function(r,i,l){var d=this,p=Array.isArray(i)?i:void 0,v=(l=l||(p?void 0:i))?l.allKeys:void 0;return this._trans("readwrite",function(b){var _=d.schema.primKey,B=_.auto,_=_.keyPath;if(_&&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 $=r.length,B=_&&B?r.map(no(_)):r;return d.core.mutate({trans:b,type:"put",keys:p,values:B,wantResults:v}).then(function(I){var E=I.numFailures,A=I.failures;if(E===0)return v?I.results:I.lastResult;throw new vt("".concat(d.name,".bulkPut(): ").concat(E," of ").concat($," operations failed"),A)})})},ft.prototype.bulkUpdate=function(r){var i=this,l=this.core,d=r.map(function(b){return b.key}),p=r.map(function(b){return b.changes}),v=[];return this._trans("readwrite",function(b){return l.getMany({trans:b,keys:d,cache:"clone"}).then(function(_){var $=[],B=[],I=(r.forEach(function(E,A){var K=E.key,R=E.changes,D=_[A];if(D){for(var L=0,G=Object.keys(R);Lq+ee&&L(q+B)})})}var G=Fr(l)&&l.limit===1/0&&(typeof r!="function"||R)&&{index:l.index,range:l.range};return L(0).then(function(){if(0{for(var Ue=Math.min(me.length,Te.length),Ye=-1,Ze=0;Ze=A})).length===0?Ce.resolve():(L.forEach(function(q){D.push(function(){var ee,pe,ve,_e=G,me=q._cfg.dbschema,Ae=(po(E,_e,R),po(E,me,R),G=E._dbSchema=me,Di(_e,me)),be=(Ae.add.forEach(function(Te){Ri(R,Te[0],Te[1].primKey,Te[1].indexes)}),Ae.change.forEach(function(Te){if(Te.recreate)throw new Ie.Upgrade("Not yet support for changing primary key");var he=R.objectStore(Te.name);Te.add.forEach(function(Be){return co(he,Be)}),Te.change.forEach(function(Be){he.deleteIndex(Be.name),co(he,Be)}),Te.del.forEach(function(Be){return he.deleteIndex(Be)})}),q._cfg.contentUpgrade);if(be&&q._cfg.version>A)return lo(E,R),K._memoizedTables={},ee=T(me),Ae.del.forEach(function(Te){ee[Te]=_e[Te]}),ji(E,[E.Transaction.prototype]),uo(E,[E.Transaction.prototype],u(ee),ee),K.schema=ee,(pe=je(be))&&Kr(),me=Ce.follow(function(){var Te;(ve=be(K))&&pe&&(Te=zn.bind(null,null),ve.then(Te,Te))}),ve&&typeof ve.then=="function"?Ce.resolve(ve):me.then(function(){return ve})}),D.push(function(ee){var pe,ve,_e=q._cfg.dbschema;pe=_e,ve=ee,[].slice.call(ve.db.objectStoreNames).forEach(function(me){return pe[me]==null&&ve.db.deleteObjectStore(me)}),ji(E,[E.Transaction.prototype]),uo(E,[E.Transaction.prototype],E._storeNames,E._dbSchema),K.schema=E._dbSchema}),D.push(function(ee){E.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(E.idbdb.version/10)===q._cfg.version?(E.idbdb.deleteObjectStore("$meta"),delete E._dbSchema.$meta,E._storeNames=E._storeNames.filter(function(pe){return pe!=="$meta"})):ee.objectStore("$meta").put(q._cfg.version,"version"))})}),function q(){return D.length?Ce.resolve(D.shift()(K.idbtrans)).then(q):Ce.resolve()}().then(function(){Ml(G,R)}))}).catch(b);var $,B;u(p).forEach(function(I){Ri(l,I,p[I].primKey,p[I].indexes)}),lo(r,l),Ce.follow(function(){return r.on.populate.fire(v)}).catch(b)})}function Gd(r,i){Ml(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=fo(0,r.idbdb,i);po(r,r._dbSchema,i);for(var d=0,p=Di(l,r._dbSchema).change;d{if(b.change.length||b.recreate)return console.warn("Unable to patch indexes of table ".concat(b.name," because it has changes on the type of index or primary key.")),{value:void 0};var _=i.objectStore(b.name);b.add.forEach(function($){H&&console.debug("Dexie upgrade patch: Creating missing index ".concat(b.name,".").concat($.src)),co(_,$)})})(p[d]);if(typeof v=="object")return v.value}}function Di(r,i){var l,d={del:[],add:[],change:[]};for(l in r)i[l]||d.del.push(l);for(l in i){var p=r[l],v=i[l];if(p){var b={name:l,def:v,recreate:!1,del:[],add:[],change:[]};if(""+(p.primKey.keyPath||"")!=""+(v.primKey.keyPath||"")||p.primKey.auto!==v.primKey.auto)b.recreate=!0,d.change.push(b);else{var _=p.idxByName,$=v.idxByName,B=void 0;for(B in _)$[B]||b.del.push(B);for(B in $){var I=_[B],E=$[B];I?I.src!==E.src&&b.change.push(E):b.add.push(E)}(0{var r,i,l;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(),v=p.next();!v.done;){var b=v.value;if(b.deref()===d._novip)return r.delete(b),void i.unregister(b);v=p.next()}}}):(l=[],{toArray:function(){return l},add:function(d){l.push(d._novip)},remove:function(d){d&&(d=l.indexOf(d._novip))!==-1&&l.splice(d,1)}})})();function Li(r,i){var l=r._dbNamesDB;return l||(l=r._dbNamesDB=new Mn(to,{addons:[],indexedDB:r,IDBKeyRange:i})).version(1).stores({dbnames:"name"}),l.table("dbnames")}function Ki(r){return r&&typeof r.databases=="function"}function Fi(r){return Wn(function(){return Me.letThrough=!0,r()})}function Ni(r){return!("from"in r)}var Dt=function(r,i){var l;if(!this)return l=new Dt,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=D.result,v&&Gd(r,I),zd(r,G/10,I,K))},K),D.onsuccess=yt(function(){I=null;var L,G,q,ee,pe,ve,_e=r.idbdb=D.result,me=O(_e.objectStoreNames);if(0"u"?Ce.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(A){function K(){return indexedDB.databases().finally(A)}$=setInterval(K,100),K()}).finally(function(){return clearInterval($)}):Promise.resolve()).then(_)]).then(function(){return b(),i.onReadyBeingFired=[],Ce.resolve(Fi(function(){return r.on.ready.fire(r.vip)})).then(function A(){var K;if(0i.limit?d.length=i.limit:r.length===i.limit&&d.length{if(l===void 0)return d!==void 0?-1:0;if(d===void 0)return 1;if((l=tt(l,d))===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,d,p,v)=>{if(l===void 0)return d!==void 0?1:0;if(d===void 0)return-1;if((l=tt(l,d))===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 nf(r,i,l,d){r.subscribers.add(l),d.addEventListener("abort",function(){var p,v;r.subscribers.delete(l),r.subscribers.size===0&&(p=r,v=i,setTimeout(function(){p.subscribers.size===0&&ye(v,p)},3e3))})}var rf={stack:"dbcore",level:0,name:"Cache",create:function(r){var i=r.schema.name;return s(s({},r),{transaction:function(l,d,p){var v,b,_=r.transaction(l,d,p);return d==="readwrite"&&(p=(v=new AbortController).signal,_.addEventListener("abort",(b=function($){return function(){if(v.abort(),d==="readwrite"){for(var B=new Set,I=0,E=l;I{var G=br["idb://".concat(K,"/").concat(R)];if(!G)return[];if(!(K=G.queries[D]))return[null,!1,G,null];var q=K[(L.query?L.query.index.name:null)||""];if(!q)return[null,!1,G,null];switch(D){case"query":var ee=(pe=L.direction)!=null?pe:"next",pe=q.find(function(ve){var _e;return ve.req.limit===L.limit&&ve.req.values===L.values&&((_e=ve.req.direction)!=null?_e:"next")===ee&&Ul(ve.req.query.range,L.query.range)});return pe?[pe,!0,G,q]:[q.find(function(ve){var _e;return("limit"in ve.req?ve.req.limit:1/0)>=L.limit&&((_e=ve.req.direction)!=null?_e:"next")===ee&&(!L.values||ve.req.values)&&tf(ve.req.query.range,L.query.range)}),!1,G,q];case"count":return pe=q.find(function(ve){return Ul(ve.req.query.range,L.query.range)}),[pe,!!pe,G,q]}})(i,l,"query",v),A=E[0],B=E[2],I=E[3],A&&E[1]?A.obsSet=v.obsSet:(E=d.query(v).then(function(K){var R=K.result;if(A&&(A.res=R),b){for(var D=0,L=R.length;D{var pe=Rr();try{v&&Kr();var ve=Wn(r,ee);return ve=v?ve.finally(zn):ve}finally{pe&&Lr()}})(G={subscr:L,signal:b.signal,requery:A,querier:r,trans:null}),E||(Jn.storagemutated.subscribe(R),E=!0),Promise.resolve(q).then(function(ee){l=!0,i=ee,_||G.signal.aborted||(K()||(B=L,K())?A():($={},Si(function(){return!_&&p.next&&p.next(ee)})))},function(ee){l=!1,["DatabaseClosedError","AbortError"].includes(ee==null?void 0:ee.name)||_||Si(function(){_||p.error&&p.error(ee)})}))};return setTimeout(A,0),I});return d.hasValue=function(){return l},d.getValue=function(){return i},d}var wr=Mn;function Ji(r){var i=Xn;try{Xn=!0,Jn.storagemutated.fire(r),qi(r,!0)}finally{Xn=i}}x(wr,s(s({},te),{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,(Ki(l)?Promise.resolve(l.databases()).then(function(d){return d.map(function(p){return p.name}).filter(function(p){return p!==to})}):Li(l,i).toCollection().primaryKeys()).then(r)}catch{return Ct(new Ie.MissingAPI)}var i,l},defineClass:function(){return function(r){h(this,r)}},ignoreTransaction:function(r){return Me.trans?mr(Me.transless||$t,r):r()},vip:Fi,async:function(r){return function(){try{var i=Hi(r.apply(this,arguments));return i&&typeof i.then=="function"?i:Ce.resolve(i)}catch(l){return Ct(l)}}},spawn:function(r,i,l){try{var d=Hi(r.apply(l,i||[]));return d&&typeof d.then=="function"?d:Ce.resolve(d)}catch(p){return Ct(p)}},currentTransaction:{get:function(){return Me.trans||null}},waitFor:function(r,i){return r=Ce.resolve(typeof r=="function"?wr.ignoreTransaction(r):r).timeout(i||6e4),Me.trans?Me.trans.waitFor(r):r},Promise:Ce,debug:{get:function(){return H},set:function(r){Y(r)}},derive:U,extend:h,props:x,override:S,Events:os,on:Jn,liveQuery:ql,extendObservabilitySet:vo,getByKeyPath:ie,setByKeyPath:Z,delByKeyPath:function(r,i){typeof i=="string"?Z(r,i,void 0):"length"in i&&[].map.call(i,function(l){Z(r,l,void 0)})},shallowClone:T,deepClone:xe,getObjectDiff:Wi,cmp:tt,asap:fe,minKey:-1/0,addons:[],connections:{get:cs.toArray},errnames:Yt,dependencies:bo,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=ls(wr.dependencies.IDBKeyRange),typeof dispatchEvent<"u"&&typeof addEventListener<"u"&&(Jn(ao,function(r){Xn||(r=new CustomEvent(Pi,{detail:r}),Xn=!0,dispatchEvent(r),Xn=!1)}),addEventListener(Pi,function(r){r=r.detail,Xn||Ji(r)}));var Ur,Xn=!1,Hl=function(){};return typeof BroadcastChannel<"u"&&((Hl=function(){(Ur=new BroadcastChannel(Pi)).onmessage=function(r){return r.data&&Ji(r.data)}})(),typeof Ur.unref=="function"&&Ur.unref(),Jn(ao,function(r){Xn||Ur.postMessage(r)})),typeof addEventListener<"u"&&(addEventListener("pagehide",function(r){if(!Mn.disableBfCache&&r.persisted){H&&console.debug("Dexie: handling persisted pagehide"),Ur!=null&&Ur.close();for(var i=0,l=cs.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"},dv=["value"],fv={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=Vt({__name:"EditLogDialog",props:{open:{type:Boolean},item:{},projects:{},date:{}},emits:["cancel","save"],setup(e,{emit:t}){const n=e,s=t,o=V(""),a=V(null),u=V("dev"),f=V(null),h=V(""),y=V(""),m=V(0),k=V(0),x=V(""),C=V(null),M=it(()=>{var S;const ae=n.projects.filter(X=>X.archived!==1),O=(S=n.item)==null?void 0:S.project_id;if(O&&!ae.some(X=>X.id===O)){const X=n.projects.find(ie=>ie.id===O),fe=ae.slice();return X&&fe.unshift({...X,name:X.name+"(已归档)"}),fe}return ae});function U(ae){n.open&&ae.key==="Escape"&&s("cancel")}bt(()=>n.open,async ae=>{var O;if(ae){const S=n.item;o.value=(S==null?void 0:S.content)??"",a.value=(S==null?void 0:S.project_id)??null,u.value=(S==null?void 0:S.category)??"dev",f.value=(S==null?void 0:S.minutes)??null,h.value=(S==null?void 0:S.takeaway)??"",y.value=(S==null?void 0:S.remark)??"",m.value=(S==null?void 0:S.is_milestone)??0,k.value=(S==null?void 0:S.needs_followup)??0,x.value="",window.addEventListener("keydown",U),await ts(),(O=C.value)==null||O.focus()}else window.removeEventListener("keydown",U)}),pr(()=>window.removeEventListener("keydown",U)),bt(o,()=>{x.value&&(x.value="")});function re(){const ae=o.value.trim();if(!ae){x.value="请填写工作内容";return}if(!n.item||!n.item.id){s("cancel");return}s("save",{id:n.item.id,content:ae,project_id:a.value,category:u.value,minutes:f.value&&f.value>0?f.value:null,takeaway:h.value.trim()||null,remark:y.value.trim()||null,is_milestone:m.value?1:0,needs_followup:k.value?1:0})}return(ae,O)=>(F(),It(Us,{to:"body"},[Pe(ns,{name:"modal"},{default:fr(()=>[e.open?(F(),W("div",{key:0,class:"mask",onClick:O[10]||(O[10]=Mr(S=>s("cancel"),["self"]))},[c("div",rv,[c("div",sv,[c("div",null,[O[11]||(O[11]=c("div",{class:"dialog-title"},"编辑工作记录",-1)),e.date?(F(),W("div",ov,ne(e.date),1)):Se("",!0)]),c("button",{class:"icon-btn",title:"关闭",onClick:O[0]||(O[0]=S=>s("cancel"))},[Pe(lt,{name:"close",size:16})])]),c("div",iv,[c("div",av,[c("div",lv,[O[12]||(O[12]=c("label",null,"工作内容(必填)",-1)),Ee(c("input",{ref_key:"contentInput",ref:C,class:et(["input",{invalid:x.value}]),"onUpdate:modelValue":O[1]||(O[1]=S=>o.value=S),onKeydown:jt(re,["enter"])},null,34),[[De,o.value]]),x.value?(F(),W("div",uv,ne(x.value),1)):Se("",!0)]),c("div",cv,[O[14]||(O[14]=c("label",null,"所属项目",-1)),Ee(c("select",{class:"select","onUpdate:modelValue":O[2]||(O[2]=S=>a.value=S)},[O[13]||(O[13]=c("option",{value:null},"无项目",-1)),(F(!0),W(Re,null,ut(M.value,S=>(F(),W("option",{key:S.id,value:S.id},ne(S.name),9,dv))),128))],512),[[Fn,a.value]])]),c("div",fv,[O[15]||(O[15]=c("label",null,"工作分类",-1)),Ee(c("select",{class:"select","onUpdate:modelValue":O[3]||(O[3]=S=>u.value=S)},[(F(!0),W(Re,null,ut(Qt(Hs),S=>(F(),W("option",{key:S.key,value:S.key},ne(S.label),9,pv))),128))],512),[[Fn,u.value]])]),c("div",hv,[O[16]||(O[16]=c("label",null,"耗时(分钟)",-1)),Ee(c("input",{class:"input",type:"number",min:"0","onUpdate:modelValue":O[4]||(O[4]=S=>f.value=S),placeholder:"选填"},null,512),[[De,f.value,void 0,{number:!0}]])]),c("div",vv,[O[17]||(O[17]=c("label",null,"主要收获",-1)),Ee(c("input",{class:"input","onUpdate:modelValue":O[5]||(O[5]=S=>h.value=S),placeholder:"一句话:学到了什么"},null,512),[[De,h.value]])]),c("div",mv,[O[18]||(O[18]=c("label",null,"备注",-1)),Ee(c("textarea",{class:"textarea","onUpdate:modelValue":O[6]||(O[6]=S=>y.value=S),placeholder:"背景、链接、未决事项(选填)"},null,512),[[De,y.value]])]),c("div",yv,[O[19]||(O[19]=c("label",null,"成果标记",-1)),c("button",{class:et(["toggle-btn",{on:m.value===1}]),onClick:O[7]||(O[7]=S=>m.value=m.value===1?0:1)},ne(m.value===1?"已标记为成果":"未标记"),3)]),c("div",gv,[O[20]||(O[20]=c("label",null,"待跟进",-1)),c("button",{class:et(["toggle-btn",{onwarn:k.value===1}]),onClick:O[8]||(O[8]=S=>k.value=k.value===1?0:1)},ne(k.value===1?"需要跟进":"无需跟进"),3)])])]),c("div",bv,[c("button",{class:"btn btn-sm",onClick:O[9]||(O[9]=S=>s("cancel"))},"取消"),c("button",{class:"btn btn-primary btn-sm",onClick:re},"保存修改")])])])):Se("",!0)]),_:1})]))}}),_v=Gt(wv,[["__scopeId","data-v-63bc0b48"]]);function Ss(e){return e<10?"0"+e:String(e)}function Nn(e){return e.getFullYear()+"-"+Ss(e.getMonth()+1)+"-"+Ss(e.getDate())}function xt(){return Nn(new Date)}function ht(){const e=new Date;return Nn(e)+"T"+Ss(e.getHours())+":"+Ss(e.getMinutes())+":"+Ss(e.getSeconds())}function Vn(e){if(!e)return"--:--";const t=e.indexOf("T");return t>=0?e.slice(t+1,t+6):e.slice(0,5)}function rs(e){const t=e.split("-").map(Number);return new Date(t[0],t[1]-1,t[2])}function Kn(e,t){const n=rs(e);return n.setDate(n.getDate()+t),Nn(n)}function zo(e,t){const n=rs(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)),Nn(n)}function Es(e){const t=rs(e),n=(t.getDay()+6)%7;return t.setDate(t.getDate()-n),Nn(t)}function kv(e){const t=rs(e).getDay();return t===0||t===6}function xv(e,t){return Math.round((new Date(t).getTime()-new Date(e).getTime())/6e4)}function fd(e){const t=rs(e),n=["周日","周一","周二","周三","周四","周五","周六"];return t.getFullYear()+" 年 "+(t.getMonth()+1)+" 月 "+t.getDate()+" 日 "+n[t.getDay()]}async function gt(e,t){const n=await Q.setting.get(e);return n?n.value:t}async function kt(e,t){await Q.setting.put({key:e,value:t})}async function jr(){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 Cv(){const e=await gt("last_project",""),t=await gt("last_category","dev");return{project_id:e?Number(e):null,category:t||"dev"}}async function Sv(){return gt("last_location","")}async function Ev(e,t){const n=t.trim();await kt("last_location",n),n&&await Go(n);const s=await mn(e);s&&s.id?await Q.attendance.update(s.id,{location:n||null}):n&&await Q.attendance.add({date:e,clock_in_at:null,clock_out_at:null,kind:"normal",note:null,location:n,created_at:ht()})}async function ol(){const e=await gt("location_presets","");if(!e)return Du.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 Du.slice()}async function pd(e){const t=Array.from(new Set(e.map(n=>n.trim()).filter(Boolean)));await kt("location_presets",JSON.stringify(t))}async function Go(e){const t=e.trim();if(!t)return;const n=await ol();n.includes(t)||await pd([...n,t])}async function Ks(e=!1){const t=await Q.project.orderBy("name").toArray();return e?t:t.filter(n=>n.archived!==1)}async function $v(e){await Q.project.add({name:e.trim(),archived:0,created_at:ht()})}async function Av(e,t){await Q.project.update(e,{name:t.trim()})}async function Tv(e,t){await Q.project.update(e,{archived:t?1:0})}async function mn(e){return Q.attendance.where("date").equals(e).first()}async function hd(e,t){const n=((t===void 0?await gt("last_location",""):t)||"").trim(),s=await mn(e);if(s&&s.id){if(!s.clock_in_at){const o={clock_in_at:ht()};n&&(o.location=n),await Q.attendance.update(s.id,o)}n&&(await kt("last_location",n),await Go(n));return}await Q.attendance.add({date:e,clock_in_at:ht(),clock_out_at:null,kind:"normal",note:null,location:n||null,created_at:ht()}),n&&(await kt("last_location",n),await Go(n))}async function Pv(e){const t=await mn(e);t&&t.id&&t.clock_in_at&&!t.clock_out_at&&await Q.attendance.update(t.id,{clock_out_at:ht()})}async function Ov(){const e=new Date,t=Nn(e);if(e.getHours()<4){const s=await mn(Kn(t,-1));if(s&&s.id&&s.clock_in_at&&!s.clock_out_at)return await Q.attendance.update(s.id,{clock_out_at:ht()}),s.date}const n=await mn(t);if(n&&n.id&&n.clock_in_at&&!n.clock_out_at)return await Q.attendance.update(n.id,{clock_out_at:ht()}),n.date;throw new Error("没有进行中的打卡")}async function Mv(e,t,n,s,o){(o||"").trim()&&await Go(o);const a=await mn(e),u={date:e,clock_in_at:t,clock_out_at:n,kind:"makeup",note:s||null,location:(o||"").trim()||null,created_at:ht()};a&&a.id?await Q.attendance.update(a.id,u):await Q.attendance.add(u)}async function Iv(e,t,n){const s=(n||"").trim();if(!s)return;const o=await mn(e);o&&o.id&&await Q.attendance.update(o.id,{[t]:e+"T"+s+":00"})}async function mi(e,t){return Q.attendance.where("date").between(e,t,!0,!0).toArray()}async function jv(e,t){const n=await mn(e);if(t){const s={date:e,kind:"leave",clock_in_at:null,clock_out_at:null,created_at:ht()};n&&n.id?await Q.attendance.update(n.id,s):await Q.attendance.add({...s,note:null,location:null})}else n&&n.id&&await Q.attendance.update(n.id,{kind:"normal"})}async function Dv(e){const t=await Q.work_log.where("date").equals(e).first();return t||{id:await Q.work_log.add({date:e,created_at:ht()}),date:e,created_at:ht()}}async function Rv(e){return Q.work_log.where("date").equals(e).first()}async function Lv(e){const t=await Rv(e);return!t||!t.id?[]:(await Q.log_item.where("work_log_id").equals(t.id).toArray()).sort((s,o)=>o.id-s.id)}async function Kv(e,t){const n=await Dv(e);await Q.log_item.add({work_log_id:n.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:ht()}),await kt("last_project",t.project_id?String(t.project_id):""),await kt("last_category",t.category)}async function da(e,t){await Q.log_item.update(e,t)}async function Fv(e){await Q.log_item.delete(e)}async function yi(e,t){const n=await Q.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 Q.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,u)=>a.date===u.date?a.id-u.id:a.datet.updated_at[u.id,u.date]));return(await Q.log_item.toArray()).filter(u=>((u.content||"")+" "+(u.takeaway||"")+" "+(u.remark||"")).toLowerCase().includes(n)).sort((u,f)=>f.id-u.id).slice(0,t).map(u=>({...u,date:o.get(u.work_log_id)||""}))}async function zv(e,t=4){const n=e.trim().toLowerCase();return n?(await Q.memo.toArray()).filter(o=>((o.title||"")+" "+(o.content||"")).toLowerCase().includes(n)).sort((o,a)=>o.updated_at{await Promise.all([Q.project.clear(),Q.work_log.clear(),Q.log_item.clear(),Q.attendance.clear(),Q.weekly_note.clear(),Q.setting.clear(),Q.memo.clear(),Q.credential.clear(),Q.table("transaction").clear()]),n.project&&n.project.length&&await Q.project.bulkAdd(n.project),n.work_log&&n.work_log.length&&await Q.work_log.bulkAdd(n.work_log),n.log_item&&n.log_item.length&&await Q.log_item.bulkAdd(n.log_item),n.attendance&&n.attendance.length&&await Q.attendance.bulkAdd(n.attendance),n.weekly_note&&n.weekly_note.length&&await Q.weekly_note.bulkAdd(n.weekly_note),n.setting&&n.setting.length&&await Q.setting.bulkAdd(n.setting),n.memo&&n.memo.length&&await Q.memo.bulkAdd(n.memo),n.credential&&n.credential.length&&await Q.credential.bulkAdd(n.credential),n.transaction&&n.transaction.length&&await Q.table("transaction").bulkAdd(n.transaction)})}function $o(e){const t=e.split(":");return Number(t[0])*60+Number(t[1])}function Ws(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=$o(Vn(e.clock_in_at)),u=$o(Vn(e.clock_out_at)),f=$o(n.work_start),h=$o(n.work_end);let y="normal";!o&&a>f+n.grace_minutes?y="late":!o&&u{Mo.value=Mo.value.filter(n=>n.id!==t)},2e3)}function nm(){return Mo}const Ma=V(null),Ia=V(null),zs=V(0);function nr(){zs.value++}const rm={class:"day-panel"},sm={class:"dp-head"},om={class:"dp-date"},im={class:"card sec"},am={class:"att-grid"},lm={class:"att-cell"},um={key:0,class:"edit-row"},cm={key:1,class:"att-val"},dm={class:"att-cell"},fm={key:0,class:"edit-row"},pm={key:1,class:"att-val"},hm={class:"att-cell"},vm=["list"],mm=["id"],ym=["value"],gm={class:"att-cell"},bm={class:"att-val status-val"},wm={key:0,class:"tag"},_m={key:1,class:"muted"},km={key:0,class:"att-note muted"},xm={class:"att-actions"},Cm=["disabled"],Sm=["disabled"],Em=["disabled"],$m=["disabled"],Am={key:0,class:"card sec makeup"},Tm={class:"form-grid"},Pm={class:"field"},Om={class:"field"},Mm={class:"field span2"},Im=["list"],jm={class:"field span2"},Dm={key:0,class:"form-error"},Rm={class:"form-footer"},Lm={class:"card sec"},Km={class:"form-grid"},Fm={class:"field span2"},Nm={key:0,class:"form-error"},Vm={class:"field"},Bm=["value"],Um={class:"field"},qm=["value"],Hm={class:"field"},Wm={class:"field"},zm={class:"field span2"},Gm={class:"form-footer"},Ym=["disabled"],Jm=["disabled"],Xm={class:"list-sec"},Qm={class:"sec-title"},Zm={key:0,class:"empty muted"},ey={class:"item-main"},ty={class:"tag"},ny=["onClick"],ry={key:0,class:"muted item-meta"},sy={key:1,class:"muted num item-meta"},oy=["onClick"],iy=["onClick"],ay=["onClick"],ly=["onClick"],uy={key:0,class:"item-sub"},cy={key:0,class:"muted2"},dy={key:1,class:"muted"},fy={key:1,class:"dp-foot muted num"},py=Vt({__name:"DayPanel",props:{date:{}},setup(e){const t=e,n=V(!0),s=V(null),o=V(void 0),a=V([]),u=V([]),f=V(""),h=V([]),y=it(()=>"loc-list-"+t.date),m=it(()=>t.date===xt());async function k(){n.value=!0,s.value=await jr(),o.value=await mn(t.date),a.value=await Lv(t.date),u.value=await Ks(!0),h.value=await ol(),f.value=o.value&&o.value.location||await Sv(),n.value=!1}dn(k),bt(()=>t.date,k),bt(zs,()=>{k()});const x=it(()=>u.value.filter(z=>z.archived!==1));function C(z){if(!z)return"";const H=u.value.find(Y=>Y.id===z);return H?H.name:"已删除项目"}const M=it(()=>s.value?Ws(o.value,t.date,s.value,m.value):null),U=it(()=>a.value.reduce((z,H)=>z+(H.minutes||0),0)),re=V(!1);async function ae(){re.value||(re.value=!0,await hd(t.date,f.value),await k(),nr(),We("上班打卡成功"),re.value=!1)}async function O(){re.value||(re.value=!0,await Pv(t.date),await k(),nr(),We("下班打卡成功"),re.value=!1)}async function S(){await Ev(t.date,f.value),nr(),We("地点已更新")}const X=V(!1),fe=it(()=>{var z;return((z=o.value)==null?void 0:z.kind)==="leave"});function ie(){if(o.value&&o.value.clock_in_at){X.value=!0;return}Z(!0)}async function Z(z){X.value=!1,await jv(t.date,z),await k(),nr(),We(z?"已标记为休假":"已取消休假")}const T=V(null),j=V(""),de=V(null);bt(T,async z=>{var H;z&&(await ts(),(H=de.value)==null||H.focus())});function ke(z){var Y,$e;const H=z==="in"?(Y=o.value)==null?void 0:Y.clock_in_at:($e=o.value)==null?void 0:$e.clock_out_at;T.value=z,j.value=H?Vn(H):z==="in"?"09:00":"18:00"}function J(){T.value=null}async function xe(){const z=T.value;z&&(T.value=null,j.value&&(await Iv(t.date,z==="in"?"clock_in_at":"clock_out_at",j.value),await k(),nr(),We("打卡时间已修改")))}const Ve=V(!1),nt=V("09:00"),qe=V("18:00"),He=V(""),ye=V(""),Oe=V("");function Fe(){ye.value=f.value,Oe.value="",Ve.value=!Ve.value}async function je(){if(!nt.value||!qe.value){Oe.value="请填写上班与下班时间";return}await Mv(t.date,t.date+"T"+nt.value+":00",t.date+"T"+qe.value+":00",He.value.trim(),ye.value),Ve.value=!1,He.value="",Oe.value="",await k(),nr(),We("补卡已保存")}const te=V(""),N=V("");bt(te,()=>{N.value&&(N.value="")});const ce=V(null),Ke=V("dev"),ct=V(null),vt=V(""),Yt=V(""),Jt=V(!1),Ie=it(()=>!!(te.value.trim()||ct.value||vt.value.trim()||Yt.value.trim()));dn(async()=>{const z=await Cv();ce.value=z.project_id,Ke.value=z.category});function w(){te.value="",ct.value=null,vt.value="",Yt.value="",N.value=""}async function g(){const z=te.value.trim();if(!z){N.value="请填写工作内容";return}Jt.value||(Jt.value=!0,await Kv(t.date,{content:z,project_id:ce.value,category:Ke.value,minutes:ct.value&&ct.value>0?ct.value:null,takeaway:vt.value.trim()||null,remark:Yt.value.trim()||null}),w(),await k(),We("记录已添加"),Jt.value=!1)}const P=V(null);function le(z){P.value=z}async function se(z){const H=z.id,Y={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 da(H,Y),P.value=null,await k(),We("修改已保存")}async function ue(z){await da(z.id,{is_milestone:z.is_milestone?0:1}),await k()}async function ge(z){await da(z.id,{needs_followup:z.needs_followup?0:1}),await k()}const oe=V(null);async function we(){oe.value&&oe.value.id&&await Fv(oe.value.id),oe.value=null,await k(),We("记录已删除")}return(z,H)=>(F(),W("div",rm,[c("div",sm,[c("div",om,ne(Qt(fd)(e.date)),1)]),c("div",im,[H[25]||(H[25]=c("div",{class:"sec-title"},"出勤信息",-1)),c("div",am,[c("div",lm,[H[21]||(H[21]=c("label",null,"上班时间",-1)),T.value==="in"?(F(),W("div",um,[Ee(c("input",{ref_key:"timeInput",ref:de,type:"time",class:"input time-input","onUpdate:modelValue":H[0]||(H[0]=Y=>j.value=Y),onKeydown:[jt(xe,["enter"]),jt(J,["esc"])]},null,544),[[De,j.value]]),c("button",{class:"btn btn-primary btn-sm",onClick:xe},"确认"),c("button",{class:"btn btn-sm",onClick:J},"取消")])):(F(),W("div",cm,[c("span",{class:et(["num",{"val-empty":!(o.value&&o.value.clock_in_at)}])},ne(o.value&&o.value.clock_in_at?Qt(Vn)(o.value.clock_in_at):"未打卡"),3),o.value&&o.value.id?(F(),W("button",{key:0,class:"icon-btn",title:"修改上班时间",onClick:H[1]||(H[1]=Y=>ke("in"))},[Pe(lt,{name:"edit",size:13})])):Se("",!0)]))]),c("div",dm,[H[22]||(H[22]=c("label",null,"下班时间",-1)),T.value==="out"?(F(),W("div",fm,[Ee(c("input",{ref_key:"timeInput",ref:de,type:"time",class:"input time-input","onUpdate:modelValue":H[2]||(H[2]=Y=>j.value=Y),onKeydown:[jt(xe,["enter"]),jt(J,["esc"])]},null,544),[[De,j.value]]),c("button",{class:"btn btn-primary btn-sm",onClick:xe},"确认"),c("button",{class:"btn btn-sm",onClick:J},"取消")])):(F(),W("div",pm,[c("span",{class:et(["num",{"val-empty":!(o.value&&o.value.clock_out_at)}])},ne(o.value&&o.value.clock_out_at?Qt(Vn)(o.value.clock_out_at):"未打卡"),3),o.value&&o.value.id?(F(),W("button",{key:0,class:"icon-btn",title:"修改下班时间",onClick:H[3]||(H[3]=Y=>ke("out"))},[Pe(lt,{name:"edit",size:13})])):Se("",!0)]))]),c("div",hm,[H[23]||(H[23]=c("label",null,"上班地点",-1)),Ee(c("input",{class:"input","onUpdate:modelValue":H[4]||(H[4]=Y=>f.value=Y),list:y.value,placeholder:"可直接输入",title:"上班地点,可自由输入",onChange:S},null,40,vm),[[De,f.value]]),c("datalist",{id:y.value},[(F(!0),W(Re,null,ut(h.value,Y=>(F(),W("option",{key:Y,value:Y},null,8,ym))),128))],8,mm)]),c("div",gm,[H[24]||(H[24]=c("label",null,"考勤状态",-1)),c("div",bm,[M.value?(F(),W(Re,{key:0},[c("span",{class:et(["dot",M.value.status])},null,2),c("span",null,ne(M.value.label),1),o.value&&o.value.kind==="makeup"?(F(),W("span",wm,"补卡")):Se("",!0)],64)):(F(),W("span",_m,"--"))])])]),o.value&&o.value.note?(F(),W("div",km,"补卡说明:"+ne(o.value.note),1)):Se("",!0),c("div",xm,[m.value&&(!o.value||!o.value.clock_in_at)?(F(),W("button",{key:0,class:"btn btn-primary btn-sm",disabled:re.value,onClick:ae},"上班打卡",8,Cm)):m.value&&o.value&&o.value.clock_in_at&&!o.value.clock_out_at?(F(),W("button",{key:1,class:"btn btn-primary btn-sm",disabled:re.value,onClick:O},"下班打卡",8,Sm)):Se("",!0),!m.value&&(!o.value||!o.value.clock_in_at)?(F(),W("button",{key:2,class:"btn btn-sm",onClick:Fe},"补卡")):Se("",!0),fe.value?(F(),W("button",{key:4,class:"btn btn-sm",disabled:re.value,onClick:H[5]||(H[5]=Y=>Z(!1))},"取消休假",8,$m)):(F(),W("button",{key:3,class:"btn btn-sm",disabled:re.value,onClick:ie},"标记休假",8,Em))])]),Ve.value?(F(),W("div",Am,[H[30]||(H[30]=c("div",{class:"sec-title"},"补卡登记",-1)),c("div",Tm,[c("div",Pm,[H[26]||(H[26]=c("label",null,"上班时间",-1)),Ee(c("input",{type:"time",class:"input","onUpdate:modelValue":H[6]||(H[6]=Y=>nt.value=Y)},null,512),[[De,nt.value]])]),c("div",Om,[H[27]||(H[27]=c("label",null,"下班时间",-1)),Ee(c("input",{type:"time",class:"input","onUpdate:modelValue":H[7]||(H[7]=Y=>qe.value=Y)},null,512),[[De,qe.value]])]),c("div",Mm,[H[28]||(H[28]=c("label",null,"上班地点",-1)),Ee(c("input",{class:"input",list:y.value,"onUpdate:modelValue":H[8]||(H[8]=Y=>ye.value=Y),placeholder:"可直接输入"},null,8,Im),[[De,ye.value]])]),c("div",jm,[H[29]||(H[29]=c("label",null,"补卡原因",-1)),Ee(c("input",{class:"input","onUpdate:modelValue":H[9]||(H[9]=Y=>He.value=Y),placeholder:"如:外出拜访客户忘记打卡"},null,512),[[De,He.value]])])]),Oe.value?(F(),W("div",Dm,ne(Oe.value),1)):Se("",!0),c("div",Rm,[c("button",{class:"btn btn-sm",onClick:H[10]||(H[10]=Y=>Ve.value=!1)},"取消"),c("button",{class:"btn btn-primary btn-sm",onClick:je},"保存补卡")])])):Se("",!0),c("div",Lm,[H[38]||(H[38]=c("div",{class:"sec-head"},[c("span",{class:"sec-title"},"新增工作记录"),c("span",{class:"muted form-hint"},"内容必填,其余选填")],-1)),c("div",Km,[c("div",Fm,[H[31]||(H[31]=c("label",null,"工作内容(必填)",-1)),Ee(c("input",{class:et(["input",{invalid:N.value}]),"onUpdate:modelValue":H[11]||(H[11]=Y=>te.value=Y),placeholder:"做了什么,一句话一条",onKeydown:jt(g,["enter"])},null,34),[[De,te.value]]),N.value?(F(),W("div",Nm,ne(N.value),1)):Se("",!0)]),c("div",Vm,[H[33]||(H[33]=c("label",null,"所属项目",-1)),Ee(c("select",{class:"select","onUpdate:modelValue":H[12]||(H[12]=Y=>ce.value=Y)},[H[32]||(H[32]=c("option",{value:null},"无项目",-1)),(F(!0),W(Re,null,ut(x.value,Y=>(F(),W("option",{key:Y.id,value:Y.id},ne(Y.name),9,Bm))),128))],512),[[Fn,ce.value]])]),c("div",Um,[H[34]||(H[34]=c("label",null,"工作分类",-1)),Ee(c("select",{class:"select","onUpdate:modelValue":H[13]||(H[13]=Y=>Ke.value=Y)},[(F(!0),W(Re,null,ut(Qt(Hs),Y=>(F(),W("option",{key:Y.key,value:Y.key},ne(Y.label),9,qm))),128))],512),[[Fn,Ke.value]])]),c("div",Hm,[H[35]||(H[35]=c("label",null,"耗时(分钟)",-1)),Ee(c("input",{class:"input",type:"number",min:"0","onUpdate:modelValue":H[14]||(H[14]=Y=>ct.value=Y),placeholder:"选填"},null,512),[[De,ct.value,void 0,{number:!0}]])]),c("div",Wm,[H[36]||(H[36]=c("label",null,"主要收获",-1)),Ee(c("input",{class:"input","onUpdate:modelValue":H[15]||(H[15]=Y=>vt.value=Y),placeholder:"一句话:学到了什么"},null,512),[[De,vt.value]])]),c("div",zm,[H[37]||(H[37]=c("label",null,"备注",-1)),Ee(c("textarea",{class:"textarea","onUpdate:modelValue":H[16]||(H[16]=Y=>Yt.value=Y),placeholder:"背景、链接、未决事项(选填)"},null,512),[[De,Yt.value]])])]),c("div",Gm,[c("button",{class:"btn btn-sm",disabled:!Ie.value,onClick:w},"重置",8,Ym),c("button",{class:"btn btn-primary btn-sm",disabled:Jt.value,onClick:g},"添加记录",8,Jm)])]),c("div",Xm,[c("div",Qm,"工作记录("+ne(a.value.length)+")",1),!a.value.length&&!n.value?(F(),W("div",Zm,"暂无记录")):Se("",!0),(F(!0),W(Re,null,ut(a.value,Y=>(F(),W("div",{key:Y.id,class:"item"},[c("div",ey,[c("span",ty,ne(Qt(sl)(Y.category)),1),c("span",{class:"item-content",title:"点击编辑",onClick:$e=>le(Y)},ne(Y.content),9,ny),Y.project_id?(F(),W("span",ry,ne(C(Y.project_id)),1)):Se("",!0),Y.minutes?(F(),W("span",sy,ne(Y.minutes)+" 分钟",1)):Se("",!0),H[39]||(H[39]=c("span",{class:"flex1"},null,-1)),c("button",{class:"icon-btn",title:"编辑完整信息",onClick:$e=>le(Y)},[Pe(lt,{name:"edit",size:14})],8,oy),c("button",{class:et(["icon-btn",{active:Y.is_milestone===1}]),title:"成果标记",onClick:$e=>ue(Y)},[Pe(lt,{name:"star",size:14})],10,iy),c("button",{class:et(["icon-btn",{"active-warn":Y.needs_followup===1}]),title:"待跟进",onClick:$e=>ge(Y)},[Pe(lt,{name:"flag",size:14})],10,ay),c("button",{class:"icon-btn",title:"删除",onClick:$e=>oe.value=Y},[Pe(lt,{name:"close",size:14})],8,ly)]),Y.takeaway||Y.remark?(F(),W("div",uy,[Y.takeaway?(F(),W("div",cy,"收获:"+ne(Y.takeaway),1)):Se("",!0),Y.remark?(F(),W("div",dy,"备注:"+ne(Y.remark),1)):Se("",!0)])):Se("",!0)]))),128)),a.value.length?(F(),W("div",fy,[nn(" 共 "+ne(a.value.length)+" 条事项 ",1),U.value?(F(),W(Re,{key:0},[nn(" · "+ne((U.value/60).toFixed(1))+" 小时",1)],64)):Se("",!0)])):Se("",!0)]),Pe(cr,{open:!!oe.value,title:"删除确认",message:oe.value?"将删除工作记录「"+oe.value.content+"」。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:H[17]||(H[17]=Y=>oe.value=null),onConfirm:we},null,8,["open","message"]),Pe(cr,{open:X.value,title:"标记休假确认",message:"该日已有打卡记录,标记休假将清空上下班时间。是否继续?","confirm-text":"标记休假",danger:"",onCancel:H[18]||(H[18]=Y=>X.value=!1),onConfirm:H[19]||(H[19]=Y=>Z(!0))},null,8,["open"]),Pe(_v,{open:!!P.value,item:P.value,projects:u.value,date:e.date,onCancel:H[20]||(H[20]=Y=>P.value=null),onSave:se},null,8,["open","item","projects","date"])]))}}),vd=Gt(py,[["__scopeId","data-v-2e90c9d8"]]),hy={class:"cal-page"},vy={class:"cal-toolbar"},my={class:"cal-title num"},yy={class:"cal-head"},gy={class:"cal-grid"},by=["title","onClick"],wy={class:"cal-marks"},_y={key:0,class:"drawer"},ky={class:"drawer-head"},xy={class:"drawer-body"},Cy=Vt({__name:"CalendarView",setup(e){const t=V(xt()),n=it(()=>Number(t.value.slice(0,4))),s=it(()=>Number(t.value.slice(5,7))-1),o=it(()=>n.value+" 年 "+(s.value+1)+" 月"),a=["一","二","三","四","五","六","日"],u=it(()=>{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 Z=0;Z[ke.date,ke])),T=fe[2],j=new Map;for(const ke of u.value){if(!ke.inMonth)continue;const J=Ws(Z.get(ke.date),ke.date,ie,ke.date===h),xe=T.filter(Ve=>Ve.date===ke.date);j.set(ke.date,{status:J.status,label:J.label,location:((de=Z.get(ke.date))==null?void 0:de.location)||"",hasLog:xe.length>0,hasMilestone:xe.some(Ve=>Ve.is_milestone===1)})}f.value=j}bt([n,s],y,{immediate:!0}),bt(zs,()=>{y()});function m(S){var X;return((X=f.value.get(S))==null?void 0:X.status)??""}function k(S){const X=f.value.get(S);return X?S+" · "+X.label+(X.location?" · "+X.location:""):S}function x(S){var X;return!!((X=f.value.get(S))!=null&&X.hasLog)}function C(S){var X;return!!((X=f.value.get(S))!=null&&X.hasMilestone)}function M(){t.value=zo(t.value,-1)}function U(){t.value=zo(t.value,1)}function re(){t.value=xt()}const ae=V(null);function O(S,X){X&&(ae.value=S)}return bt(Ma,S=>{S&&(t.value=S,ae.value=S,Ma.value=null)},{immediate:!0}),(S,X)=>(F(),W("div",hy,[c("div",vy,[c("button",{class:"icon-btn",onClick:M},[Pe(lt,{name:"chevron-left",size:16})]),c("span",my,ne(o.value),1),c("button",{class:"icon-btn",onClick:U},[Pe(lt,{name:"chevron-right",size:16})]),c("button",{class:"btn btn-sm",onClick:re},"回到今天")]),c("div",yy,[(F(),W(Re,null,ut(a,fe=>c("span",{key:fe,class:"cal-week muted"},ne(fe),1)),64))]),c("div",gy,[(F(!0),W(Re,null,ut(u.value,(fe,ie)=>(F(),W("button",{key:ie,class:et(["cal-cell",{blank:!fe.inMonth,weekend:fe.weekend,selected:ae.value===fe.date}]),title:fe.inMonth?k(fe.date):void 0,onClick:Z=>O(fe.date,fe.inMonth)},[fe.inMonth?(F(),W(Re,{key:0},[c("span",{class:et(["daynum num",{today:fe.date===Qt(h)}])},ne(Number(fe.date.slice(8,10))),3),c("span",wy,[m(fe.date)?(F(),W("span",{key:0,class:et(["dot",m(fe.date)])},null,2)):Se("",!0),x(fe.date)?(F(),It(lt,{key:1,name:"check-circle",size:12,class:"mark-log"})):Se("",!0),C(fe.date)?(F(),It(lt,{key:2,name:"star",size:12,class:"mark-star"})):Se("",!0)])],64)):Se("",!0)],10,by))),128))]),Pe(ns,{name:"drawer"},{default:fr(()=>[ae.value?(F(),W("aside",_y,[c("div",ky,[X[1]||(X[1]=c("span",{class:"drawer-title"},"当日详情",-1)),c("button",{class:"icon-btn",onClick:X[0]||(X[0]=fe=>ae.value=null)},[Pe(lt,{name:"close",size:16})])]),c("div",xy,[Pe(vd,{date:ae.value},null,8,["date"])])])):Se("",!0)]),_:1})]))}}),Sy=Gt(Cy,[["__scopeId","data-v-2404dfbe"]]),Ey={class:"detail-page"},$y={class:"detail-toolbar"},Ay=["value"],Ty=["disabled"],Py=Vt({__name:"TodayView",setup(e){const t=V(xt()),n=it(()=>t.value===xt());function s(){t.value=Kn(t.value,-1)}function o(){t.value=Kn(t.value,1)}function a(){t.value=xt()}function u(f){const h=f.target.value;h&&(t.value=h)}return(f,h)=>(F(),W("div",Ey,[c("div",$y,[c("button",{class:"icon-btn",title:"前一天",onClick:s},[Pe(lt,{name:"chevron-left",size:16})]),c("span",{class:et(["date-title num",{"is-today":n.value}])},ne(Qt(fd)(t.value)),3),c("button",{class:"icon-btn",title:"后一天",onClick:o},[Pe(lt,{name:"chevron-right",size:16})]),c("input",{type:"date",class:"input w-date",value:t.value,onChange:u},null,40,Ay),c("button",{class:"btn btn-sm",disabled:n.value,onClick:a},"回到今天",8,Ty)]),Pe(vd,{date:t.value},null,8,["date"])]))}}),Oy=Gt(Py,[["__scopeId","data-v-76243d98"]]),My={class:"stats"},Iy={class:"cards"},jy={class:"card stat-card"},Dy={class:"stat-num num"},Ry={class:"card stat-card"},Ly={class:"stat-num num"},Ky={class:"card stat-card"},Fy={class:"stat-num num"},Ny={class:"card stat-card"},Vy={class:"stat-num num"},By={class:"card section"},Uy={class:"heat"},qy=["title"],Hy={class:"two-col"},Wy={class:"card section"},zy={class:"bar-label"},Gy={class:"bar-track"},Yy={class:"muted num bar-num"},Jy={key:0,class:"muted"},Xy={class:"card section"},Qy={class:"bar-label"},Zy={class:"bar-track"},eg={class:"muted num bar-num"},tg={key:0,class:"muted"},ng={class:"card section"},rg={class:"bar-label loc-label"},sg={class:"bar-track"},og={class:"muted num bar-num"},ig={key:0,class:"muted"},ag=Vt({__name:"StatsView",setup(e){const t=V({attendDays:0,totalHours:"0",itemCount:0,streak:0}),n=V([]),s=V([]),o=V([]),a=V([]);async function u(){const y=xt(),m="2000-01-01",k=await Promise.all([jr(),mi(m,y),yi(m,y),Ks(!0)]),x=k[0],C=k[1],M=k[2],U=k[3],re=C.filter(J=>J.clock_in_at||J.kind==="makeup");let ae=0;for(const J of re){const xe=Ws(J,J.date,x,J.date===y);ae+=xe.workedMinutes??0}const O=new Set(M.map(J=>J.date));let S=0,X=y;for(O.has(X)||(X=Kn(y,-1));O.has(X);)S++,X=Kn(X,-1);t.value={attendDays:re.length,totalHours:(ae/60).toFixed(1),itemCount:M.length,streak:S};const fe=new Map;for(const J of re){const xe=J.location||"未记录";fe.set(xe,(fe.get(xe)||0)+1)}a.value=Array.from(fe.entries()).map(J=>({name:J[0],count:J[1],percent:Math.round(J[1]/(re.length||1)*100)})).sort((J,xe)=>xe.count-J.count);const ie=M.length||1;s.value=Hs.map(J=>{const xe=M.filter(Ve=>Ve.category===J.key).length;return{key:J.key,label:J.label,count:xe,percent:Math.round(xe/ie*100)}}).filter(J=>J.count>0).sort((J,xe)=>xe.count-J.count);const Z=new Map(U.map(J=>[J.id,J.name])),T=new Map;for(const J of M){const xe=J.project_id?Z.get(J.project_id)||"已删除项目":"无项目";T.set(xe,(T.get(xe)||0)+1)}o.value=Array.from(T.entries()).map(J=>({name:J[0],count:J[1],percent:Math.round(J[1]/ie*100)})).sort((J,xe)=>xe.count-J.count);const j=new Map;for(const J of M)j.set(J.date,(j.get(J.date)||0)+1);const de=Es(y),ke=[];for(let J=11;J>=0;J--){const xe=Kn(de,-7*J),Ve=[];for(let nt=0;nt<7;nt++){const qe=Kn(xe,nt);Ve.push({date:qe,count:j.get(qe)||0})}ke.push(Ve)}n.value=ke}dn(async()=>{await u()}),bt(zs,()=>{u()});function f(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)=>(F(),W("div",My,[c("div",Iy,[c("div",jy,[m[0]||(m[0]=c("div",{class:"muted"},"出勤天数",-1)),c("div",Dy,ne(t.value.attendDays),1)]),c("div",Ry,[m[1]||(m[1]=c("div",{class:"muted"},"累计工时(小时)",-1)),c("div",Ly,ne(t.value.totalHours),1)]),c("div",Ky,[m[2]||(m[2]=c("div",{class:"muted"},"记录条数",-1)),c("div",Fy,ne(t.value.itemCount),1)]),c("div",Ny,[m[3]||(m[3]=c("div",{class:"muted"},"连续记录(天)",-1)),c("div",Vy,ne(t.value.streak),1)])]),c("div",By,[m[4]||(m[4]=c("div",{class:"section-title"},"记录热力图(近 12 周)",-1)),c("div",Uy,[(F(!0),W(Re,null,ut(n.value,(k,x)=>(F(),W("div",{key:x,class:"heat-col"},[(F(!0),W(Re,null,ut(k,C=>(F(),W("span",{key:C.date,class:et(["heat-cell","lv"+f(C.count)]),title:h(C.date,C.count)},null,10,qy))),128))]))),128))]),m[5]||(m[5]=Up('
少多
',1))]),c("div",Hy,[c("div",Wy,[m[6]||(m[6]=c("div",{class:"section-title"},"分类分布",-1)),(F(!0),W(Re,null,ut(s.value,k=>(F(),W("div",{key:k.key,class:"bar-row"},[c("span",zy,ne(k.label),1),c("span",Gy,[c("span",{class:"bar-fill",style:or({width:k.percent+"%"})},null,4)]),c("span",Yy,ne(k.count)+" 条 · "+ne(k.percent)+"%",1)]))),128)),s.value.length?Se("",!0):(F(),W("div",Jy,"暂无数据"))]),c("div",Xy,[m[7]||(m[7]=c("div",{class:"section-title"},"项目投入",-1)),(F(!0),W(Re,null,ut(o.value,k=>(F(),W("div",{key:k.name,class:"bar-row"},[c("span",Qy,ne(k.name),1),c("span",Zy,[c("span",{class:"bar-fill",style:or({width:k.percent+"%"})},null,4)]),c("span",eg,ne(k.count)+" 条 · "+ne(k.percent)+"%",1)]))),128)),o.value.length?Se("",!0):(F(),W("div",tg,"暂无数据"))])]),c("div",ng,[m[8]||(m[8]=c("div",{class:"section-title"},"地点分布(按出勤天)",-1)),(F(!0),W(Re,null,ut(a.value,k=>(F(),W("div",{key:k.name,class:"bar-row"},[c("span",rg,ne(k.name),1),c("span",sg,[c("span",{class:"bar-fill",style:or({width:k.percent+"%"})},null,4)]),c("span",og,ne(k.count)+" 天 · "+ne(k.percent)+"%",1)]))),128)),a.value.length?Se("",!0):(F(),W("div",ig,"暂无数据"))])]))}}),lg=Gt(ag,[["__scopeId","data-v-73e5ba49"]]);async function ug(e,t,n){const s=xt(),o=await Promise.all([jr(),mi(e,t),yi(e,t),Ks(!0),Vv(e,t)]),a=o[0],u=o[1],f=o[2],h=o[3],y=o[4];let m=0,k=0,x=0;for(const T of u){(T.clock_in_at||T.kind==="makeup")&&m++,T.kind==="makeup"&&x++;const j=Ws(T,T.date,a,T.date===s);k+=j.workedMinutes??0}const C=new Map;for(const T of u){if(!(T.clock_in_at||T.kind==="makeup"))continue;const j=T.location||"未记录";C.set(j,(C.get(j)||0)+1)}const M=Array.from(C.entries()).map(T=>({name:T[0],count:T[1]})).sort((T,j)=>j.count-T.count),U=f.length||1,re=Hs.map(T=>{const j=f.filter(de=>de.category===T.key).length;return{key:T.key,label:T.label,count:j,percent:Math.round(j/U*100)}}).filter(T=>T.count>0).sort((T,j)=>j.count-T.count),ae=new Map(h.map(T=>[T.id,T.name])),O=new Map;for(const T of f){const j=T.project_id?ae.get(T.project_id)||"已删除项目":"无项目";O.set(j,(O.get(j)||0)+1)}const S=Array.from(O.entries()).map(T=>({name:T[0],count:T[1]})).sort((T,j)=>j.count-T.count),X=f.filter(T=>T.is_milestone===1).map(T=>({date:T.date,content:T.content})),fe=f.filter(T=>T.needs_followup===1).map(T=>({date:T.date,content:T.content,remark:T.remark||""})),ie=f.filter(T=>!!T.takeaway).map(T=>({date:T.date,text:T.takeaway})),Z=y.map(T=>({weekStart:T.week_start,highlights:T.highlights||"",challenges:T.challenges||"",plan_next:T.plan_next||""}));return{range:{start:e,end:t,label:n},attendDays:m,totalHours:(k/60).toFixed(1),makeupCount:x,leaveCount:u.filter(T=>T.kind==="leave").length,itemCount:f.length,categoryStats:re,projectStats:S,locationStats:M,milestones:X,followups:fe,takeaways:ie,weekNotes:Z}}function cg(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 dg="modulepreload",fg=function(e,t){return new URL(e,t).href},Ru={},md=function(t,n,s){let o=Promise.resolve();if(n&&n.length>0){const u=document.getElementsByTagName("link"),f=document.querySelector("meta[property=csp-nonce]"),h=(f==null?void 0:f.nonce)||(f==null?void 0:f.getAttribute("nonce"));o=Promise.allSettled(n.map(y=>{if(y=fg(y,s),y in Ru)return;Ru[y]=!0;const m=y.endsWith(".css"),k=m?'[rel="stylesheet"]':"";if(!!s)for(let M=u.length-1;M>=0;M--){const U=u[M];if(U.href===y&&(!m||U.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${y}"]${k}`))return;const C=document.createElement("link");if(C.rel=m?"stylesheet":dg,m||(C.as="script"),C.crossOrigin="",C.href=y,h&&C.setAttribute("nonce",h),document.head.appendChild(C),m)return new Promise((M,U)=>{C.addEventListener("load",M),C.addEventListener("error",()=>U(new Error(`Unable to preload CSS for ${y}`)))})}))}function a(u){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=u,window.dispatchEvent(f),!f.defaultPrevented)throw u}return o.then(u=>{for(const f of u||[])f.status==="rejected"&&a(f.reason);return t().catch(a)})};/*! Capacitor: https://capacitorjs.com/ - MIT License */const pg=e=>{const t=new Map;t.set("web",{name:"web"});const n=e.CapacitorPlatforms||{currentPlatform:{name:"web"},platforms:t},s=(a,u)=>{n.platforms.set(a,u)},o=a=>{n.platforms.has(a)&&(n.currentPlatform=n.platforms.get(a))};return n.addPlatform=s,n.setPlatform=o,n},hg=e=>e.CapacitorPlatforms=pg(e),yd=hg(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});yd.addPlatform;yd.setPlatform;var Qr;(function(e){e.Unimplemented="UNIMPLEMENTED",e.Unavailable="UNAVAILABLE"})(Qr||(Qr={}));class fa extends Error{constructor(t,n,s){super(t),this.message=t,this.code=n,this.data=s}}const vg=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"},mg=e=>{var t,n,s,o,a;const u=e.CapacitorCustomPlatform||null,f=e.Capacitor||{},h=f.Plugins=f.Plugins||{},y=e.CapacitorPlatforms,m=()=>u!==null?u.name:vg(e),k=((t=y==null?void 0:y.currentPlatform)===null||t===void 0?void 0:t.getPlatform)||m,x=()=>k()!=="web",C=((n=y==null?void 0:y.currentPlatform)===null||n===void 0?void 0:n.isNativePlatform)||x,M=Z=>{const T=X.get(Z);return!!(T!=null&&T.platforms.has(k())||ae(Z))},U=((s=y==null?void 0:y.currentPlatform)===null||s===void 0?void 0:s.isPluginAvailable)||M,re=Z=>{var T;return(T=f.PluginHeaders)===null||T===void 0?void 0:T.find(j=>j.name===Z)},ae=((o=y==null?void 0:y.currentPlatform)===null||o===void 0?void 0:o.getPluginHeader)||re,O=Z=>e.console.error(Z),S=(Z,T,j)=>Promise.reject(`${j} does not have an implementation of "${T}".`),X=new Map,fe=(Z,T={})=>{const j=X.get(Z);if(j)return console.warn(`Capacitor plugin "${Z}" already registered. Cannot register plugins twice.`),j.proxy;const de=k(),ke=ae(Z);let J;const xe=async()=>(!J&&de in T?J=typeof T[de]=="function"?J=await T[de]():J=T[de]:u!==null&&!J&&"web"in T&&(J=typeof T.web=="function"?J=await T.web():J=T.web),J),Ve=(Fe,je)=>{var te,N;if(ke){const ce=ke==null?void 0:ke.methods.find(Ke=>je===Ke.name);if(ce)return ce.rtype==="promise"?Ke=>f.nativePromise(Z,je.toString(),Ke):(Ke,ct)=>f.nativeCallback(Z,je.toString(),Ke,ct);if(Fe)return(te=Fe[je])===null||te===void 0?void 0:te.bind(Fe)}else{if(Fe)return(N=Fe[je])===null||N===void 0?void 0:N.bind(Fe);throw new fa(`"${Z}" plugin is not implemented on ${de}`,Qr.Unimplemented)}},nt=Fe=>{let je;const te=(...N)=>{const ce=xe().then(Ke=>{const ct=Ve(Ke,Fe);if(ct){const vt=ct(...N);return je=vt==null?void 0:vt.remove,vt}else throw new fa(`"${Z}.${Fe}()" is not implemented on ${de}`,Qr.Unimplemented)});return Fe==="addListener"&&(ce.remove=async()=>je()),ce};return te.toString=()=>`${Fe.toString()}() { [capacitor code] }`,Object.defineProperty(te,"name",{value:Fe,writable:!1,configurable:!1}),te},qe=nt("addListener"),He=nt("removeListener"),ye=(Fe,je)=>{const te=qe({eventName:Fe},je),N=async()=>{const Ke=await te;He({eventName:Fe,callbackId:Ke},je)},ce=new Promise(Ke=>te.then(()=>Ke({remove:N})));return ce.remove=async()=>{console.warn("Using addListener() without 'await' is deprecated."),await N()},ce},Oe=new Proxy({},{get(Fe,je){switch(je){case"$$typeof":return;case"toJSON":return()=>({});case"addListener":return ke?ye:qe;case"removeListener":return He;default:return nt(je)}}});return h[Z]=Oe,X.set(Z,{name:Z,proxy:Oe,platforms:new Set([...Object.keys(T),...ke?[de]:[]])}),Oe},ie=((a=y==null?void 0:y.currentPlatform)===null||a===void 0?void 0:a.registerPlugin)||fe;return f.convertFileSrc||(f.convertFileSrc=Z=>Z),f.getPlatform=k,f.handleError=O,f.isNativePlatform=C,f.isPluginAvailable=U,f.pluginMethodNoop=S,f.registerPlugin=ie,f.Exception=fa,f.DEBUG=!!f.DEBUG,f.isLoggingEnabled=!!f.isLoggingEnabled,f.platform=f.getPlatform(),f.isNative=f.isNativePlatform(),f},yg=e=>e.Capacitor=mg(e),Zr=yg(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),gd=Zr.registerPlugin;Zr.Plugins;class bd{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 u=async()=>this.removeListener(t,n);return Promise.resolve({remove:u})}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 Zr.Exception(t,Qr.Unimplemented)}unavailable(t="not available"){return new Zr.Exception(t,Qr.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 Lu=e=>encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),Ku=e=>e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent);class gg extends bd{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=Ku(o).trim(),a=Ku(a).trim(),n[o]=a}),n}async setCookie(t){try{const n=Lu(t.key),s=Lu(t.value),o=`; expires=${(t.expires||"").replace("expires=","")}`,a=(t.path||"/").replace("path=",""),u=t.url!=null&&t.url.length>0?`domain=${t.url}`:"";document.cookie=`${n}=${s||""}${o}; path=${a}; ${u};`}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)}}}gd("CapacitorCookies",{web:()=>new gg});const bg=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)}),wg=(e={})=>{const t=Object.keys(e);return Object.keys(e).map(o=>o.toLocaleLowerCase()).reduce((o,a,u)=>(o[a]=e[t[u]],o),{})},_g=(e,t=!0)=>e?Object.entries(e).reduce((s,o)=>{const[a,u]=o;let f,h;return Array.isArray(u)?(h="",u.forEach(y=>{f=t?encodeURIComponent(y):y,h+=`${a}=${f}&`}),h.slice(0,-1)):(f=t?encodeURIComponent(u):u,h=`${a}=${f}`),`${s}&${h}`},"").substr(1):null,kg=(e,t={})=>{const n=Object.assign({method:e.method||"GET",headers:e.headers},t),o=wg(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[u,f]of Object.entries(e.data||{}))a.set(u,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,h)=>{a.append(h,f)});else for(const f of Object.keys(e.data))a.append(f,e.data[f]);n.body=a;const u=new Headers(n.headers);u.delete("content-type"),n.headers=u}else(o.includes("application/json")||typeof e.data=="object")&&(n.body=JSON.stringify(e.data));return n};class xg extends bd{async request(t){const n=kg(t,t.webFetchExtra),s=_g(t.params,t.shouldEncodeUrlParams),o=s?`${t.url}?${s}`:t.url,a=await fetch(o,n),u=a.headers.get("content-type")||"";let{responseType:f="text"}=a.ok?t:{};u.includes("application/json")&&(f="json");let h,y;switch(f){case"arraybuffer":case"blob":y=await a.blob(),h=await bg(y);break;case"json":h=await a.json();break;case"document":case"text":default:h=await a.text()}const m={};return a.headers.forEach((k,x)=>{m[x]=k}),{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"}))}}gd("CapacitorHttp",{web:()=>new xg});async function al(e,t){const n=window;if(n.electronAPI&&n.electronAPI.saveFile){const u=await n.electronAPI.saveFile(e,t);return u&&u.saved?u.path:""}if(Zr.isNativePlatform()){const{Filesystem:u,Directory:f,Encoding:h}=await md(async()=>{const{Filesystem:y,Directory:m,Encoding:k}=await import("./index-fvhfb3wJ.js");return{Filesystem:y,Directory:m,Encoding:k}},[],import.meta.url);try{return(await u.writeFile({path:e,data:t,directory:f.Documents,encoding:h.UTF8,recursive:!0})).uri}catch{return(await u.writeFile({path:e,data:t,directory:f.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 Cg=Object.freeze(Object.defineProperty({__proto__:null,downloadText:al},Symbol.toStringTag,{value:"Module"}));async function ja(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 Sg(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",u={"Content-Type":"application/json"};s&&(u.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:u,body:h})}catch{throw new Error("无法访问 AI 接口:请检查地址是否正确、服务端是否允许浏览器跨域访问")}if(!y.ok){let x="接口返回 "+y.status;try{const C=await y.json();C&&C.error&&C.error.message&&(x+=":"+C.error.message)}catch{}throw new Error(x)}const m=await y.json(),k=m&&m.choices&&m.choices[0]&&m.choices[0].message&&m.choices[0].message.content;if(!k)throw new Error("接口未返回内容");return String(k)}const Eg={class:"report"},$g={class:"report-toolbar"},Ag={class:"seg"},Tg=["onClick"],Pg=["disabled"],Og=["disabled"],Mg={key:0,class:"ai-error"},Ig={class:"report-grid"},jg={class:"report-left"},Dg={class:"card section"},Rg={class:"section-title"},Lg={class:"muted note-saved"},Kg={class:"card section"},Fg={class:"report-right"},Ng={key:0,class:"card section"},Vg={class:"sum-row"},Bg={class:"num"},Ug={class:"sum-row"},qg={class:"num"},Hg={class:"sum-row"},Wg={class:"num"},zg={class:"sum-row"},Gg={class:"num"},Yg={class:"sum-row"},Jg={class:"num"},Xg={class:"muted"},Qg={class:"num"},Zg={key:0,class:"muted sum-empty"},eb={class:"muted"},tb={key:1,class:"muted sum-empty"},nb={class:"muted"},rb={key:2,class:"muted sum-empty"},sb={class:"muted"},ob={key:3,class:"muted sum-empty"},ib=Vt({__name:"ReportView",setup(e){const t=[{key:"week",label:"本周"},{key:"month",label:"本月"},{key:"all",label:"全部"},{key:"custom",label:"自定义"}],n=V("week"),s=V(Es(xt())),o=V(xt()),a=V(null),u=V(""),f=V(!1),h=V(!1),y=V(null),m=V(""),k=V(Es(xt())),x=V(""),C=V(""),M=V(""),U=V(!1);async function re(){const T=await il(k.value);x.value=(T==null?void 0:T.highlights)||"",C.value=(T==null?void 0:T.challenges)||"",M.value=(T==null?void 0:T.plan_next)||"",U.value=!1}async function ae(){await Nv(k.value,{highlights:x.value.trim()||null,challenges:C.value.trim()||null,plan_next:M.value.trim()||null}),U.value=!0,await S()}function O(T){const j=xt();if(T==="week"){const de=Es(j);return{start:de,end:Kn(de,6),label:"本周"}}if(T==="month"){const de=j.slice(0,7);return{start:de+"-01",end:j,label:de+" 本月"}}return T==="all"?{start:"2000-01-01",end:j,label:"全部实习期"}:{start:s.value,end:o.value,label:s.value+" ~ "+o.value}}async function S(){f.value=!0;const T=O(n.value),j=await ug(T.start,T.end,T.label);a.value=j,u.value=cg(j),f.value=!1}bt(n,S),bt([s,o],()=>{n.value==="custom"&&S()}),dn(async()=>{await re(),await S()});async function X(){const T=xt().replace(/-/g,""),j=await al("实习工作总结_"+T+".md",u.value);We(j?"总结已导出到:"+j:"总结已导出到系统下载目录")}async function fe(){await ja(u.value),We("总结已复制到剪贴板")}async function ie(){if(h.value)return;m.value="";const T=u.value.trim();if(!T){m.value="当前草稿为空,无法润色";return}h.value=!0;try{y.value=u.value,u.value=await Sg(T),We("AI 润色完成")}catch(j){y.value=null,m.value=j instanceof Error?j.message:"润色失败"}h.value=!1}function Z(){y.value!==null&&(u.value=y.value),y.value=null}return(T,j)=>(F(),W("div",Eg,[c("div",$g,[c("div",Ag,[(F(),W(Re,null,ut(t,de=>c("button",{key:de.key,class:et(["seg-btn",{active:n.value===de.key}]),onClick:ke=>n.value=de.key},ne(de.label),11,Tg)),64))]),n.value==="custom"?(F(),W(Re,{key:0},[Ee(c("input",{type:"date",class:"input w-date","onUpdate:modelValue":j[0]||(j[0]=de=>s.value=de)},null,512),[[De,s.value]]),j[6]||(j[6]=c("span",{class:"muted"},"至",-1)),Ee(c("input",{type:"date",class:"input w-date","onUpdate:modelValue":j[1]||(j[1]=de=>o.value=de)},null,512),[[De,o.value]])],64)):Se("",!0),j[10]||(j[10]=c("span",{class:"flex1"},null,-1)),c("button",{class:"btn btn-sm",disabled:h.value,onClick:ie},[Pe(lt,{name:"edit",size:14}),j[7]||(j[7]=nn("AI 润色 ",-1))],8,Pg),y.value!==null?(F(),W("button",{key:1,class:"btn btn-sm",onClick:Z},"还原润色前")):Se("",!0),c("button",{class:"btn btn-sm",disabled:f.value,onClick:S},[Pe(lt,{name:"edit",size:14}),j[8]||(j[8]=nn("重新生成 ",-1))],8,Og),c("button",{class:"btn btn-sm",onClick:fe},"复制"),c("button",{class:"btn btn-primary btn-sm",onClick:X},[Pe(lt,{name:"export",size:14}),j[9]||(j[9]=nn("导出 Markdown ",-1))])]),m.value?(F(),W("div",Mg,ne(m.value),1)):Se("",!0),c("div",Ig,[c("div",jg,[c("div",Dg,[c("div",Rg,"本周周记("+ne(k.value)+" 起)",1),j[11]||(j[11]=c("label",{class:"note-label muted"},"本周亮点",-1)),Ee(c("textarea",{class:"textarea","onUpdate:modelValue":j[2]||(j[2]=de=>x.value=de),placeholder:"本周最有价值的一件事",onBlur:ae},null,544),[[De,x.value]]),j[12]||(j[12]=c("label",{class:"note-label muted"},"踩的坑",-1)),Ee(c("textarea",{class:"textarea","onUpdate:modelValue":j[3]||(j[3]=de=>C.value=de),placeholder:"遇到的问题与教训",onBlur:ae},null,544),[[De,C.value]]),j[13]||(j[13]=c("label",{class:"note-label muted"},"下周计划",-1)),Ee(c("textarea",{class:"textarea","onUpdate:modelValue":j[4]||(j[4]=de=>M.value=de),placeholder:"下周准备做什么",onBlur:ae},null,544),[[De,M.value]]),c("div",Lg,ne(U.value?"已保存":"失焦自动保存"),1)]),c("div",Kg,[j[14]||(j[14]=c("div",{class:"section-title"},"总结草稿(可编辑)",-1)),Ee(c("textarea",{class:"textarea md-editor","onUpdate:modelValue":j[5]||(j[5]=de=>u.value=de),spellcheck:"false"},null,512),[[De,u.value]])])]),c("div",Fg,[a.value?(F(),W("div",Ng,[j[20]||(j[20]=c("div",{class:"section-title"},"数据摘要",-1)),c("div",Vg,[j[15]||(j[15]=c("span",{class:"muted"},"出勤",-1)),c("span",Bg,ne(a.value.attendDays)+" 天",1)]),c("div",Ug,[j[16]||(j[16]=c("span",{class:"muted"},"工时",-1)),c("span",qg,ne(a.value.totalHours)+" 小时",1)]),c("div",Hg,[j[17]||(j[17]=c("span",{class:"muted"},"补卡",-1)),c("span",Wg,ne(a.value.makeupCount)+" 次",1)]),c("div",zg,[j[18]||(j[18]=c("span",{class:"muted"},"请假",-1)),c("span",Gg,ne(a.value.leaveCount)+" 天",1)]),c("div",Yg,[j[19]||(j[19]=c("span",{class:"muted"},"记录",-1)),c("span",Jg,ne(a.value.itemCount)+" 条",1)]),j[21]||(j[21]=c("div",{class:"section-sub"},"分类分布",-1)),(F(!0),W(Re,null,ut(a.value.categoryStats,de=>(F(),W("div",{key:de.key,class:"sum-row"},[c("span",Xg,ne(de.label),1),c("span",Qg,ne(de.count)+" 条 · "+ne(de.percent)+"%",1)]))),128)),a.value.categoryStats.length?Se("",!0):(F(),W("div",Zg,"(无)")),j[22]||(j[22]=c("div",{class:"section-sub"},"主要成果",-1)),(F(!0),W(Re,null,ut(a.value.milestones,(de,ke)=>(F(),W("div",{key:"m"+ke,class:"sum-item"},[nn(ne(de.content),1),c("span",eb,"("+ne(de.date)+")",1)]))),128)),a.value.milestones.length?Se("",!0):(F(),W("div",tb,"(无)")),j[23]||(j[23]=c("div",{class:"section-sub"},"待跟进",-1)),(F(!0),W(Re,null,ut(a.value.followups,(de,ke)=>(F(),W("div",{key:"f"+ke,class:"sum-item"},[nn(ne(de.content),1),c("span",nb,"("+ne(de.date)+")",1)]))),128)),a.value.followups.length?Se("",!0):(F(),W("div",rb,"(无)")),j[24]||(j[24]=c("div",{class:"section-sub"},"学习与成长",-1)),(F(!0),W(Re,null,ut(a.value.takeaways,(de,ke)=>(F(),W("div",{key:"t"+ke,class:"sum-item"},[nn(ne(de.text),1),c("span",sb,"("+ne(de.date)+")",1)]))),128)),a.value.takeaways.length?Se("",!0):(F(),W("div",ob,"(无)"))])):Se("",!0)])])]))}}),ab=Gt(ib,[["__scopeId","data-v-43f9c59b"]]),lb=["aria-label"],ub={class:"dialog-head"},cb={class:"dialog-title"},db={class:"dialog-body"},fb={class:"form-grid"},pb={class:"field span2"},hb={class:"seg"},vb={class:"field"},mb={class:"field"},yb={class:"field"},gb=["value"],bb={key:0,class:"field"},wb={class:"seg"},_b={class:"field span2"},kb={key:0,class:"form-error"},xb={class:"dialog-btns"},Cb=Vt({__name:"TransactionDialog",props:{open:{type:Boolean},title:{},initial:{}},emits:["cancel","save"],setup(e,{emit:t}){const n=e,s=t,o=V("expense"),a=V("餐饮"),u=V(""),f=V(""),h=V(""),y=V(!1),m=V(!1),k=V(""),x=V(null);function C(ae){n.open&&ae.key==="Escape"&&s("cancel")}bt(()=>n.open,async ae=>{var O;ae?(o.value=n.initial.type==="income"?"income":"expense",a.value=n.initial.category,u.value=n.initial.amountYuan,f.value=n.initial.date,h.value=n.initial.note,y.value=n.initial.reimbursable===1,m.value=n.initial.reimbursed===1,k.value="",window.addEventListener("keydown",C),await ts(),(O=x.value)==null||O.focus()):window.removeEventListener("keydown",C)}),pr(()=>window.removeEventListener("keydown",C)),bt(o,ae=>{a.value=ae==="expense"?Wr[0]:Wo[0]});const M=it(()=>o.value==="expense"?Wr:Wo);function U(){return a.value&&M.value.includes(a.value)?a.value:M.value[0]}function re(){const ae=Number(u.value);if(!u.value.trim()||!isFinite(ae)||ae<=0){k.value="请填写大于 0 的金额";return}if(!f.value){k.value="请选择日期";return}const O=o.value==="expense"&&y.value?1:0;s("save",{type:o.value,category:U(),amount:Math.round(ae*100),date:f.value,note:h.value.trim(),reimbursable:O,reimbursed:O&&m.value?1:0})}return(ae,O)=>(F(),It(Us,{to:"body"},[Pe(ns,{name:"modal"},{default:fr(()=>[e.open?(F(),W("div",{key:0,class:"mask",onClick:O[11]||(O[11]=Mr(S=>s("cancel"),["self"]))},[c("div",{class:"dialog",role:"dialog","aria-label":e.title},[c("div",ub,[c("span",cb,ne(e.title),1),c("button",{class:"icon-btn",title:"关闭",onClick:O[0]||(O[0]=S=>s("cancel"))},[Pe(lt,{name:"close",size:16})])]),c("div",db,[c("div",fb,[c("div",pb,[O[12]||(O[12]=c("label",null,"类型",-1)),c("div",hb,[c("button",{class:et(["seg-btn",{active:o.value==="expense"}]),onClick:O[1]||(O[1]=S=>o.value="expense")},"支出",2),c("button",{class:et(["seg-btn",{active:o.value==="income"}]),onClick:O[2]||(O[2]=S=>o.value="income")},"收入",2)])]),c("div",vb,[O[13]||(O[13]=c("label",null,"金额(元,必填)",-1)),Ee(c("input",{ref_key:"amountInput",ref:x,class:et(["input",{invalid:k.value}]),"onUpdate:modelValue":O[3]||(O[3]=S=>u.value=S),type:"number",min:"0",step:"0.01",placeholder:"0.00"},null,2),[[De,u.value]])]),c("div",mb,[O[14]||(O[14]=c("label",null,"日期(必填)",-1)),Ee(c("input",{class:"input",type:"date","onUpdate:modelValue":O[4]||(O[4]=S=>f.value=S)},null,512),[[De,f.value]])]),c("div",yb,[O[15]||(O[15]=c("label",null,"分类",-1)),Ee(c("select",{class:"select","onUpdate:modelValue":O[5]||(O[5]=S=>a.value=S)},[(F(!0),W(Re,null,ut(M.value,S=>(F(),W("option",{key:S,value:S},ne(S),9,gb))),128))],512),[[Fn,a.value]])]),o.value==="expense"?(F(),W("div",bb,[O[16]||(O[16]=c("label",null,"报销状态",-1)),c("div",wb,[c("button",{class:et(["seg-btn",{active:!y.value}]),onClick:O[6]||(O[6]=S=>{y.value=!1,m.value=!1})},"无需报销",2),c("button",{class:et(["seg-btn",{active:y.value&&!m.value}]),onClick:O[7]||(O[7]=S=>{y.value=!0,m.value=!1})},"待报销",2),c("button",{class:et(["seg-btn",{active:y.value&&m.value}]),onClick:O[8]||(O[8]=S=>{y.value=!0,m.value=!0})},"已报销",2)])])):Se("",!0),c("div",_b,[O[17]||(O[17]=c("label",null,"备注",-1)),Ee(c("textarea",{class:"textarea","onUpdate:modelValue":O[9]||(O[9]=S=>h.value=S),placeholder:"选填"},null,512),[[De,h.value]])])]),k.value?(F(),W("div",kb,ne(k.value),1)):Se("",!0)]),c("div",xb,[c("button",{class:"btn btn-sm",onClick:O[10]||(O[10]=S=>s("cancel"))},"取消"),c("button",{class:"btn btn-primary btn-sm",onClick:re},"保存")])],8,lb)])):Se("",!0)]),_:1})]))}}),Sb=Gt(Cb,[["__scopeId","data-v-e3568c0d"]]),Eb={class:"ledger-page"},$b={class:"ledger-toolbar"},Ab={class:"month-title num"},Tb={class:"cards"},Pb={class:"card stat-card"},Ob={class:"stat-num num amt-income"},Mb={class:"card stat-card"},Ib={class:"stat-num num"},jb={class:"card stat-card"},Db={class:"card stat-card"},Rb={class:"stat-num num amt-warn"},Lb={class:"card sec"},Kb={class:"form-grid"},Fb={class:"field span2"},Nb={class:"seg"},Vb={class:"field"},Bb={class:"field"},Ub={class:"field"},qb=["value"],Hb={key:0,class:"field"},Wb={class:"field span2"},zb={key:0,class:"form-error"},Gb={class:"form-footer"},Yb=["disabled"],Jb=["disabled"],Xb={key:0,class:"card sec"},Qb={class:"bar-label"},Zb={class:"bar-track"},ew={class:"muted num bar-num"},tw={key:1,class:"card section"},nw={class:"form-error"},rw={class:"card table-card"},sw={class:"tx-table"},ow={class:"num"},iw={class:"tag"},aw={class:"td-note"},lw={key:0,class:"muted"},uw={key:1,class:"tx-done"},cw={key:2,class:"tx-pending"},dw={class:"ops"},fw=["onClick"],pw=["onClick"],hw=["onClick"],vw={key:0},mw={class:"muted vault-note num"},yw=Vt({__name:"LedgerView",setup(e){const t=V(xt()),n=V([]),s=V(!0),o=V("expense"),a=V(""),u=V(Wr[0]),f=V(xt()),h=V(""),y=V(!1),m=V(""),k=V(""),x=V(!1),C=V(!1),M=V(null),U=V({type:"expense",category:Wr[0],amountYuan:"",date:xt(),note:"",reimbursable:0,reimbursed:0}),re=V(null),ae=it(()=>t.value.slice(0,7)+"-01"),O=it(()=>{const te=Number(t.value.slice(0,4)),N=Number(t.value.slice(5,7))-1,ce=new Date(te,N+1,0).getDate();return t.value.slice(0,7)+"-"+(ce<10?"0"+ce:String(ce))}),S=it(()=>Number(t.value.slice(0,4))+" 年 "+Number(t.value.slice(5,7))+" 月");async function X(){s.value=!0;try{n.value=await Gv(ae.value,O.value),k.value=""}catch(te){k.value="账目加载失败:"+(te instanceof Error?te.stack||te.message:String(te)),We("账目加载失败")}s.value=!1}dn(X),bt(t,X),bt(o,te=>{u.value=te==="expense"?Wr[0]:Wo[0]});const fe=it(()=>n.value.slice().sort((te,N)=>te.date===N.date?N.id-te.id:te.date{let te=0,N=0,ce=0;for(const Ke of n.value)Ke.type==="income"?te+=Ke.amount:(N+=Ke.amount,Ke.reimbursable===1&&Ke.reimbursed!==1&&(ce+=Ke.amount));return{income:te,expense:N,pending:ce,balance:te-N}}),Z=V("all"),T=V("all"),j=it(()=>fe.value.filter(te=>!(Z.value!=="all"&&te.type!==Z.value||T.value==="pending"&&!(te.type==="expense"&&te.reimbursable===1&&te.reimbursed!==1)||T.value==="done"&&!(te.reimbursable===1&&te.reimbursed===1)))),de=it(()=>{const te=new Map;let N=0;for(const Ke of n.value)Ke.type==="expense"&&(te.set(Ke.category,(te.get(Ke.category)||0)+Ke.amount),N+=Ke.amount);const ce=N||1;return Array.from(te.entries()).map(Ke=>({name:Ke[0],amount:Ke[1],percent:Math.round(Ke[1]/ce*100)})).sort((Ke,ct)=>ct.amount-Ke.amount)});function ke(te){return(te/100).toFixed(2)}function J(te){return(te.type==="income"?"+":"-")+ke(te.amount)}function xe(){t.value=zo(t.value,-1)}function Ve(){t.value=zo(t.value,1)}function nt(){t.value=xt()}bt(a,()=>{m.value&&(m.value="")});async function qe(){const te=Number(a.value);if(!a.value.trim()||!isFinite(te)||te<=0){m.value="请填写大于 0 的金额";return}if(!f.value){m.value="请选择日期";return}if(!x.value){x.value=!0;try{await Yv({type:o.value,category:u.value,amount:Math.round(te*100),date:f.value,note:h.value.trim(),reimbursable:o.value==="expense"&&y.value?1:0,reimbursed:0})}catch(N){We("添加失败:"+(N instanceof Error?N.message:String(N))),x.value=!1;return}a.value="",h.value="",y.value=!1,m.value="",await X(),We("记账已添加"),x.value=!1}}function He(){a.value="",h.value="",y.value=!1,m.value=""}async function ye(te){await Qv(te.id),await X(),We("已标记为已报销")}function Oe(te){M.value=te.id,U.value={type:te.type,category:te.category,amountYuan:ke(te.amount),date:te.date,note:te.note||"",reimbursable:te.reimbursable,reimbursed:te.reimbursed},C.value=!0}async function Fe(te){const N=M.value;await Jv(N,te),C.value=!1,await X(),We("账目已更新")}async function je(){re.value&&re.value.id&&await Xv(re.value.id),re.value=null,await X(),We("账目已删除")}return(te,N)=>(F(),W("div",Eb,[c("div",$b,[c("button",{class:"icon-btn",onClick:xe},[Pe(lt,{name:"chevron-left",size:16})]),c("span",Ab,ne(S.value),1),c("button",{class:"icon-btn",onClick:Ve},[Pe(lt,{name:"chevron-right",size:16})]),c("button",{class:"btn btn-sm",onClick:nt},"回到本月"),N[13]||(N[13]=c("span",{class:"flex1"},null,-1)),Ee(c("select",{class:"select w-filter","onUpdate:modelValue":N[0]||(N[0]=ce=>Z.value=ce)},[...N[11]||(N[11]=[c("option",{value:"all"},"全部类型",-1),c("option",{value:"expense"},"仅支出",-1),c("option",{value:"income"},"仅收入",-1)])],512),[[Fn,Z.value]]),Ee(c("select",{class:"select w-filter","onUpdate:modelValue":N[1]||(N[1]=ce=>T.value=ce)},[...N[12]||(N[12]=[c("option",{value:"all"},"全部报销",-1),c("option",{value:"pending"},"待报销",-1),c("option",{value:"done"},"已报销",-1)])],512),[[Fn,T.value]])]),c("div",Tb,[c("div",Pb,[N[14]||(N[14]=c("div",{class:"muted"},"本月收入(元)",-1)),c("div",Ob,ne(ke(ie.value.income)),1)]),c("div",Mb,[N[15]||(N[15]=c("div",{class:"muted"},"本月支出(元)",-1)),c("div",Ib,ne(ke(ie.value.expense)),1)]),c("div",jb,[N[16]||(N[16]=c("div",{class:"muted"},"本月结余(元)",-1)),c("div",{class:et(["stat-num num",{"amt-income":ie.value.balance>=0,"amt-expense":ie.value.balance<0}])},ne(ke(ie.value.balance)),3)]),c("div",Db,[N[17]||(N[17]=c("div",{class:"muted"},"待报销(元)",-1)),c("div",Rb,ne(ke(ie.value.pending)),1)])]),c("div",Lb,[N[24]||(N[24]=c("div",{class:"sec-head"},[c("span",{class:"sec-title"},"新增一笔"),c("span",{class:"muted form-hint"},"金额必填,回车快速添加")],-1)),c("div",Kb,[c("div",Fb,[N[18]||(N[18]=c("label",null,"类型",-1)),c("div",Nb,[c("button",{class:et(["seg-btn",{active:o.value==="expense"}]),onClick:N[2]||(N[2]=ce=>o.value="expense")},"支出",2),c("button",{class:et(["seg-btn",{active:o.value==="income"}]),onClick:N[3]||(N[3]=ce=>o.value="income")},"收入",2)])]),c("div",Vb,[N[19]||(N[19]=c("label",null,"金额(元,必填)",-1)),Ee(c("input",{class:et(["input",{invalid:m.value}]),"onUpdate:modelValue":N[4]||(N[4]=ce=>a.value=ce),type:"number",min:"0",step:"0.01",placeholder:"0.00",onKeydown:jt(qe,["enter"])},null,34),[[De,a.value]])]),c("div",Bb,[N[20]||(N[20]=c("label",null,"日期",-1)),Ee(c("input",{class:"input",type:"date","onUpdate:modelValue":N[5]||(N[5]=ce=>f.value=ce)},null,512),[[De,f.value]])]),c("div",Ub,[N[21]||(N[21]=c("label",null,"分类",-1)),Ee(c("select",{class:"select","onUpdate:modelValue":N[6]||(N[6]=ce=>u.value=ce)},[(F(!0),W(Re,null,ut(o.value==="expense"?Qt(Wr):Qt(Wo),ce=>(F(),W("option",{key:ce,value:ce},ne(ce),9,qb))),128))],512),[[Fn,u.value]])]),o.value==="expense"?(F(),W("div",Hb,[N[22]||(N[22]=c("label",null,"报销",-1)),c("button",{class:et(["toggle-btn",{on:y.value}]),onClick:N[7]||(N[7]=ce=>y.value=!y.value)},ne(y.value?"需要报销":"无需报销"),3)])):Se("",!0),c("div",Wb,[N[23]||(N[23]=c("label",null,"备注",-1)),Ee(c("input",{class:"input","onUpdate:modelValue":N[8]||(N[8]=ce=>h.value=ce),placeholder:"选填,如:客户现场午餐",onKeydown:jt(qe,["enter"])},null,544),[[De,h.value]])])]),m.value?(F(),W("div",zb,ne(m.value),1)):Se("",!0),c("div",Gb,[c("button",{class:"btn btn-sm",disabled:!(a.value.trim()||h.value.trim()),onClick:He},"重置",8,Yb),c("button",{class:"btn btn-primary btn-sm",disabled:x.value,onClick:qe},"添加记录",8,Jb)])]),de.value.length?(F(),W("div",Xb,[N[25]||(N[25]=c("div",{class:"sec-title"},"本月支出分类",-1)),(F(!0),W(Re,null,ut(de.value,ce=>(F(),W("div",{key:ce.name,class:"bar-row"},[c("span",Qb,ne(ce.name),1),c("span",Zb,[c("span",{class:"bar-fill",style:or({width:ce.percent+"%"})},null,4)]),c("span",ew,ne(ke(ce.amount))+" 元 · "+ne(ce.percent)+"%",1)]))),128))])):Se("",!0),k.value?(F(),W("div",tw,[c("div",nw,ne(k.value),1),N[26]||(N[26]=c("div",{class:"muted loc-note"},"请将上方完整错误文字发送给开发者",-1))])):Se("",!0),c("div",rw,[c("table",sw,[N[28]||(N[28]=c("thead",null,[c("tr",null,[c("th",null,"日期"),c("th",null,"分类"),c("th",null,"金额(元)"),c("th",null,"备注"),c("th",null,"报销"),c("th",{class:"th-ops"},"操作")])],-1)),c("tbody",null,[(F(!0),W(Re,null,ut(j.value,ce=>(F(),W("tr",{key:ce.id},[c("td",ow,ne(ce.date),1),c("td",null,[c("span",iw,ne(ce.category),1)]),c("td",{class:et(["num",ce.type==="income"?"amt-income":"amt-expense"])},ne(J(ce)),3),c("td",aw,ne(ce.note||"--"),1),c("td",null,[ce.type!=="expense"||ce.reimbursable!==1?(F(),W("span",lw,"--")):ce.reimbursed===1?(F(),W("span",uw,"已报销")):(F(),W("span",cw,"待报销"))]),c("td",null,[c("div",dw,[ce.type==="expense"&&ce.reimbursable===1&&ce.reimbursed!==1?(F(),W("button",{key:0,class:"btn btn-xs",onClick:Ke=>ye(ce)},"标记已报销",8,fw)):Se("",!0),c("button",{class:"btn btn-xs",onClick:Ke=>Oe(ce)},"编辑",8,pw),c("button",{class:"btn btn-xs",onClick:Ke=>re.value=ce},"删除",8,hw)])])]))),128)),!j.value.length&&!s.value?(F(),W("tr",vw,[...N[27]||(N[27]=[c("td",{colspan:"6",class:"empty muted"},"本月暂无账目",-1)])])):Se("",!0)])])]),c("div",mw,"筛选结果 "+ne(j.value.length)+" 条 / 本月共 "+ne(n.value.length)+" 条",1),Pe(Sb,{open:C.value,title:(M.value,"编辑账目"),initial:U.value,onCancel:N[9]||(N[9]=ce=>C.value=!1),onSave:Fe},null,8,["open","title","initial"]),Pe(cr,{open:!!re.value,title:"删除确认",message:re.value?"将删除 "+re.value.date+" 的账目("+re.value.category+" "+ke(re.value.amount)+" 元)。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:N[10]||(N[10]=ce=>re.value=null),onConfirm:je},null,8,["open","message"])]))}}),gw=Gt(yw,[["__scopeId","data-v-2b678001"]]),bw={class:"memo-page"},ww={class:"card memo-list"},_w={class:"pane-head"},kw={class:"pane-title"},xw={class:"memo-scroll"},Cw=["onClick"],Sw={class:"memo-item-title"},Ew={class:"muted memo-item-sub"},$w={class:"muted num memo-item-time"},Aw={key:0,class:"muted empty"},Tw={class:"card memo-editor"},Pw={class:"editor-foot"},Ow={class:"muted foot-info"},Mw=["disabled"],Iw=["disabled"],jw={key:1,class:"empty muted editor-empty"},Dw=Vt({__name:"MemoView",setup(e){const t=V([]),n=V(null),s=V(!1),o=V(""),a=V(""),u=V(null),f=V(null);async function h(){if(t.value=await Bv(),n.value&&n.value.id){const ie=t.value.find(Z=>Z.id===n.value.id);ie&&(n.value=ie)}}dn(async()=>{await h(),t.value.length&&k(t.value[0]),window.addEventListener("keydown",y)}),pr(()=>window.removeEventListener("keydown",y)),bt(Ia,async ie=>{if(!ie)return;t.value.length||await h();const Z=t.value.find(T=>T.id===ie);Ia.value=null,Z&&x(Z)},{immediate:!0});function y(ie){(ie.ctrlKey||ie.metaKey)&&ie.key.toLowerCase()==="s"&&s.value&&m.value&&(ie.preventDefault(),re())}const m=it(()=>{if(!s.value)return!1;const ie=n.value?n.value.title:"",Z=n.value?n.value.content:"";return o.value!==ie||a.value!==Z});function k(ie){n.value=ie,s.value=!0,o.value=ie.title,a.value=ie.content}function x(ie){if(!(s.value&&n.value&&n.value.id===ie.id)){if(m.value){f.value={type:"select",memo:ie};return}k(ie)}}function C(){if(m.value){f.value={type:"new"};return}M()}function M(){n.value=null,s.value=!0,o.value="",a.value=""}function U(){n.value?k(n.value):M()}async function re(){if(!o.value.trim()&&!a.value.trim()){We("标题与内容不能都为空");return}if(n.value&&n.value.id)await qv(n.value.id,o.value,a.value),We("备忘已保存");else{const ie=await Uv(o.value,a.value);n.value=ie,o.value=ie.title,a.value=ie.content,We("备忘已创建")}await h()}function ae(){n.value&&n.value.id&&(u.value=n.value)}async function O(){u.value&&u.value.id&&(await Hv(u.value.id),We("备忘已删除")),u.value=null,await h(),M()}function S(){const ie=f.value;f.value=null,ie&&(ie.type==="select"?k(ie.memo):M())}function X(ie){return(ie.content||"").replace(/\s+/g," ").slice(0,30)}function fe(ie){return ie.replace("T"," ").slice(0,16)}return(ie,Z)=>(F(),W("div",bw,[c("aside",ww,[c("div",_w,[c("span",kw,"备忘录("+ne(t.value.length)+")",1),c("button",{class:"btn btn-primary btn-sm",onClick:C},"新建")]),c("div",xw,[(F(!0),W(Re,null,ut(t.value,T=>(F(),W("div",{key:T.id,class:et(["memo-item",{active:s.value&&n.value&&n.value.id===T.id}]),onClick:j=>x(T)},[c("div",Sw,ne(T.title||"无标题"),1),c("div",Ew,ne(X(T)||"空"),1),c("div",$w,ne(fe(T.updated_at)),1)],10,Cw))),128)),t.value.length?Se("",!0):(F(),W("div",Aw,"暂无备忘"))])]),c("section",Tw,[s.value?(F(),W(Re,{key:0},[Ee(c("input",{class:"input title-input","onUpdate:modelValue":Z[0]||(Z[0]=T=>o.value=T),placeholder:"标题"},null,512),[[De,o.value]]),Ee(c("textarea",{class:"textarea content-textarea","onUpdate:modelValue":Z[1]||(Z[1]=T=>a.value=T),placeholder:"内容"},null,512),[[De,a.value]]),c("div",Pw,[c("span",Ow,[m.value?(F(),W(Re,{key:0},[nn("有未保存修改")],64)):n.value&&n.value.id?(F(),W(Re,{key:1},[nn("更新于 "+ne(fe(n.value.updated_at)),1)],64)):(F(),W(Re,{key:2},[nn("新备忘")],64))]),Z[4]||(Z[4]=c("span",{class:"flex1"},null,-1)),n.value&&n.value.id?(F(),W("button",{key:0,class:"btn btn-sm",onClick:ae},"删除")):Se("",!0),c("button",{class:"btn btn-sm",disabled:!m.value,onClick:U},"放弃修改",8,Mw),c("button",{class:"btn btn-primary btn-sm",disabled:!m.value,onClick:re},"保存",8,Iw)])],64)):(F(),W("div",jw,"选择左侧备忘,或点击右上角新建"))]),Pe(cr,{open:!!u.value,title:"删除确认",message:u.value?"将删除备忘「"+(u.value.title||"无标题")+"」。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:Z[2]||(Z[2]=T=>u.value=null),onConfirm:O},null,8,["open","message"]),Pe(cr,{open:!!f.value,title:"未保存提示",message:"当前备忘有未保存的修改,继续操作将丢失这些修改。","confirm-text":"放弃修改并继续",onCancel:Z[3]||(Z[3]=T=>f.value=null),onConfirm:S},null,8,["open"])]))}}),Rw=Gt(Dw,[["__scopeId","data-v-74d60dba"]]),Lw=["aria-label"],Kw={class:"dialog-head"},Fw={class:"dialog-title"},Nw={class:"dialog-body"},Vw={class:"form-grid"},Bw={class:"field span2"},Uw={class:"field span2"},qw={class:"field span2"},Hw={class:"pwd-row"},Ww={class:"field span2"},zw={key:0,class:"form-error"},Gw={class:"dialog-btns"},Yw=Vt({__name:"CredentialDialog",props:{open:{type:Boolean},title:{},initial:{}},emits:["cancel","save"],setup(e,{emit:t}){const n=e,s=t,o=V(""),a=V(""),u=V(""),f=V(""),h=V(""),y=V(null);function m(C){n.open&&C.key==="Escape"&&s("cancel")}bt(()=>n.open,async C=>{var M;C?(o.value=n.initial.system,a.value=n.initial.account,u.value=n.initial.password,f.value=n.initial.remark,h.value="",window.addEventListener("keydown",m),await ts(),(M=y.value)==null||M.focus()):window.removeEventListener("keydown",m)}),pr(()=>window.removeEventListener("keydown",m));function k(){const C="ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz23456789",M="!@#$%^&*",U=crypto.getRandomValues(new Uint8Array(14));let re="";for(let ae=0;ae(F(),It(Us,{to:"body"},[Pe(ns,{name:"modal"},{default:fr(()=>[e.open?(F(),W("div",{key:0,class:"mask",onClick:M[6]||(M[6]=Mr(U=>s("cancel"),["self"]))},[c("div",{class:"dialog",role:"dialog","aria-label":e.title},[c("div",Kw,[c("span",Fw,ne(e.title),1),c("button",{class:"icon-btn",title:"关闭",onClick:M[0]||(M[0]=U=>s("cancel"))},[Pe(lt,{name:"close",size:16})])]),c("div",Nw,[c("div",Vw,[c("div",Bw,[M[7]||(M[7]=c("label",null,"系统名称(必填)",-1)),Ee(c("input",{ref_key:"systemInput",ref:y,class:"input","onUpdate:modelValue":M[1]||(M[1]=U=>o.value=U),placeholder:"如:企业邮箱 / OA / VPN"},null,512),[[De,o.value]])]),c("div",Uw,[M[8]||(M[8]=c("label",null,"账号(必填)",-1)),Ee(c("input",{class:"input","onUpdate:modelValue":M[2]||(M[2]=U=>a.value=U),placeholder:"用户名、工号或邮箱"},null,512),[[De,a.value]])]),c("div",qw,[M[9]||(M[9]=c("label",null,"密码(必填)",-1)),c("div",Hw,[Ee(c("input",{class:"input","onUpdate:modelValue":M[3]||(M[3]=U=>u.value=U),placeholder:"输入或点击生成"},null,512),[[De,u.value]]),c("button",{class:"btn btn-sm",onClick:k},"生成")])]),c("div",Ww,[M[10]||(M[10]=c("label",null,"备注",-1)),Ee(c("textarea",{class:"textarea","onUpdate:modelValue":M[4]||(M[4]=U=>f.value=U),placeholder:"用途、到期时间、负责人等(选填)"},null,512),[[De,f.value]])])]),h.value?(F(),W("div",zw,ne(h.value),1)):Se("",!0)]),c("div",Gw,[c("button",{class:"btn btn-sm",onClick:M[5]||(M[5]=U=>s("cancel"))},"取消"),c("button",{class:"btn btn-primary btn-sm",onClick:x},"保存")])],8,Lw)])):Se("",!0)]),_:1})]))}}),Jw=Gt(Yw,[["__scopeId","data-v-f383b0a6"]]),wd=15e4;function Yo(e){const t=new Uint8Array(e);let n="";for(let s=0;s{n.value&&(ei(),n.value=!1,y.value=[],k.value={},We("长时间未操作,密码库已自动锁定"))},F_)}function T(){n.value&&Z()}dn(async()=>{t.value=await kd(),window.addEventListener("click",T),window.addEventListener("keydown",T),n.value&&Z()}),pr(()=>{window.removeEventListener("click",T),window.removeEventListener("keydown",T),ie!==null&&window.clearTimeout(ie)});const j=it(()=>{const te=m.value.trim().toLowerCase();return te?y.value.filter(N=>(N.system+" "+N.account+" "+(N.remark||"")).toLowerCase().includes(te)):y.value});async function de(){if(!s.value){if(u.value="",!o.value){u.value="请输入主密码";return}if(o.value.length<6){u.value="主密码至少 6 位";return}if(o.value!==a.value){u.value="两次输入的主密码不一致";return}s.value=!0;try{await Qw(o.value),o.value="",a.value="",n.value=!0,Z(),await fe(),We("主密码已设置,密码库已解锁")}catch(te){u.value=te instanceof Error?te.message:"设置失败"}s.value=!1}}async function ke(){if(!s.value){if(h.value="",!f.value){h.value="请输入主密码";return}s.value=!0;try{await Zw(f.value),f.value="",n.value=!0,Z(),await fe()}catch(te){h.value=te instanceof Error?te.message:"解锁失败"}s.value=!1}}function J(){ei(),n.value=!1,y.value=[],k.value={},ie!==null&&window.clearTimeout(ie),We("密码库已锁定")}async function xe(te){const N=te.id;if(k.value[N]){k.value[N]=!1;return}try{te.passwordPlain=await pa(N),k.value[N]=!0}catch(ce){We(ce instanceof Error?ce.message:"解密失败")}}async function Ve(te){try{const N=await pa(te.id);await ja(N),We("密码已复制")}catch(N){We(N instanceof Error?N.message:"复制失败")}}async function nt(te){await ja(te.account),We("账号已复制")}function qe(){C.value=null,M.value={system:"",account:"",password:"",remark:""},x.value=!0}async function He(te){try{const N=await pa(te.id);C.value=te.id,M.value={system:te.system,account:te.account,password:N,remark:te.remark||""},x.value=!0}catch(N){We(N instanceof Error?N.message:"解密失败")}}async function ye(te){const N=C.value??void 0;await r_(te,N),x.value=!1,await fe(),We(N?"账号已更新":"账号已添加")}async function Oe(){U.value&&U.value.id&&(await s_(U.value.id),We("账号已删除")),U.value=null,await fe()}function Fe(){ae.value="",O.value="",S.value="",X.value="",re.value=!0}async function je(){X.value="";try{const te=await o_(ae.value,O.value);re.value=!1,ae.value="",O.value="",S.value="",We("主密码已修改,"+te+" 条账号密码已重新加密")}catch(te){X.value=te instanceof Error?te.message:"修改失败"}}return(te,N)=>(F(),W("div",a_,[t.value===null?(F(),W("div",l_,"加载中")):n.value?(F(),W(Re,{key:2},[c("div",v_,[c("div",m_,[Pe(lt,{name:"search",size:14,class:"search-icon"}),Ee(c("input",{class:"input","onUpdate:modelValue":N[3]||(N[3]=ce=>m.value=ce),placeholder:"搜索系统名称、账号或备注"},null,512),[[De,m.value]])]),N[16]||(N[16]=c("span",{class:"flex1"},null,-1)),c("button",{class:"btn btn-sm",onClick:Fe},"修改主密码"),c("button",{class:"btn btn-sm",onClick:J},"锁定"),c("button",{class:"btn btn-primary btn-sm",onClick:qe},"新增账号")]),c("div",y_,[c("table",g_,[N[18]||(N[18]=c("thead",null,[c("tr",null,[c("th",null,"系统名称"),c("th",null,"账号"),c("th",null,"密码"),c("th",null,"备注"),c("th",{class:"th-ops"},"操作")])],-1)),c("tbody",null,[(F(!0),W(Re,null,ut(j.value,ce=>(F(),W("tr",{key:ce.id},[c("td",b_,ne(ce.system),1),c("td",null,[c("span",{class:"copyable",title:"点击复制账号",onClick:Ke=>nt(ce)},ne(ce.account),9,w_)]),c("td",null,[c("div",__,[c("span",k_,ne(k.value[ce.id]?ce.passwordPlain:"........"),1),c("button",{class:"btn btn-xs",onClick:Ke=>xe(ce)},ne(k.value[ce.id]?"隐藏":"显示"),9,x_),c("button",{class:"btn btn-xs",onClick:Ke=>Ve(ce)},"复制",8,C_)])]),c("td",S_,ne(ce.remark||"--"),1),c("td",null,[c("div",E_,[c("button",{class:"btn btn-xs",onClick:Ke=>He(ce)},"编辑",8,$_),c("button",{class:"btn btn-xs",onClick:Ke=>U.value=ce},"删除",8,A_)])])]))),128)),j.value.length?Se("",!0):(F(),W("tr",T_,[...N[17]||(N[17]=[c("td",{colspan:"5",class:"empty muted"},"暂无账号,点击右上角新增",-1)])]))])])]),c("div",P_,"共 "+ne(y.value.length)+" 条账号记录 · 密码以 AES-256-GCM 加密存储于本机",1)],64)):(F(),W("div",u_,[c("div",c_,[Pe(lt,{name:"lock",size:26})]),t.value===!1?(F(),W(Re,{key:0},[N[12]||(N[12]=c("div",{class:"lock-title"},"设置主密码",-1)),N[13]||(N[13]=c("div",{class:"muted lock-tip"},"主密码用于加密保存在本机的账号密码,遗忘后无法找回,请务必牢记",-1)),Ee(c("input",{type:"password",class:"input","onUpdate:modelValue":N[0]||(N[0]=ce=>o.value=ce),placeholder:"设置主密码(至少 6 位)",onKeydown:jt(de,["enter"])},null,544),[[De,o.value]]),Ee(c("input",{type:"password",class:"input","onUpdate:modelValue":N[1]||(N[1]=ce=>a.value=ce),placeholder:"再次输入主密码",onKeydown:jt(de,["enter"])},null,544),[[De,a.value]]),u.value?(F(),W("div",d_,ne(u.value),1)):Se("",!0),c("button",{class:"btn btn-primary lock-btn",disabled:s.value,onClick:de},"完成设置并解锁",8,f_)],64)):(F(),W(Re,{key:1},[N[14]||(N[14]=c("div",{class:"lock-title"},"密码库已锁定",-1)),N[15]||(N[15]=c("div",{class:"muted lock-tip"},"输入主密码解锁后查看与复制密码",-1)),Ee(c("input",{type:"password",class:"input","onUpdate:modelValue":N[2]||(N[2]=ce=>f.value=ce),placeholder:"主密码",onKeydown:jt(ke,["enter"])},null,544),[[De,f.value]]),h.value?(F(),W("div",p_,ne(h.value),1)):Se("",!0),c("button",{class:"btn btn-primary lock-btn",disabled:s.value,onClick:ke},"解锁",8,h_)],64))])),Pe(Jw,{open:x.value,title:C.value?"编辑账号":"新增账号",initial:M.value,onCancel:N[4]||(N[4]=ce=>x.value=!1),onSave:ye},null,8,["open","title","initial"]),Pe(cr,{open:!!U.value,title:"删除确认",message:U.value?"将删除系统「"+U.value.system+"」的账号记录。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:N[5]||(N[5]=ce=>U.value=null),onConfirm:Oe},null,8,["open","message"]),(F(),It(Us,{to:"body"},[Pe(ns,{name:"modal"},{default:fr(()=>[re.value?(F(),W("div",{key:0,class:"mask",onClick:N[11]||(N[11]=Mr(ce=>re.value=!1,["self"]))},[c("div",O_,[c("div",M_,[N[19]||(N[19]=c("span",{class:"dialog-title"},"修改主密码",-1)),c("button",{class:"icon-btn",title:"关闭",onClick:N[6]||(N[6]=ce=>re.value=!1)},[Pe(lt,{name:"close",size:16})])]),c("div",I_,[c("div",j_,[N[20]||(N[20]=c("label",null,"旧主密码",-1)),Ee(c("input",{type:"password",class:"input","onUpdate:modelValue":N[7]||(N[7]=ce=>ae.value=ce)},null,512),[[De,ae.value]])]),c("div",D_,[N[21]||(N[21]=c("label",null,"新主密码(至少 6 位)",-1)),Ee(c("input",{type:"password",class:"input","onUpdate:modelValue":N[8]||(N[8]=ce=>O.value=ce)},null,512),[[De,O.value]])]),c("div",R_,[N[22]||(N[22]=c("label",null,"确认新主密码",-1)),Ee(c("input",{type:"password",class:"input","onUpdate:modelValue":N[9]||(N[9]=ce=>S.value=ce)},null,512),[[De,S.value]])]),X.value?(F(),W("div",L_,ne(X.value),1)):Se("",!0),N[23]||(N[23]=c("div",{class:"muted vp-tip"},"确认后所有账号密码将使用新主密码重新加密",-1))]),c("div",K_,[c("button",{class:"btn btn-sm",onClick:N[10]||(N[10]=ce=>re.value=!1)},"取消"),c("button",{class:"btn btn-primary btn-sm",onClick:je},"确认修改")])])])):Se("",!0)]),_:1})]))]))}}),V_=Gt(N_,[["__scopeId","data-v-6820bc9c"]]);function B_(e){return'"'+(e==null?"":String(e)).replace(/"/g,'""')+'"'}async function Fu(e,t){const s="\uFEFF"+t.map(f=>f.map(B_).join(",")).join(`\r -`);if(Zr.isNativePlatform()){const{downloadText:f}=await md(async()=>{const{downloadText:h}=await Promise.resolve().then(()=>Cg);return{downloadText:h}},void 0,import.meta.url);return f(e,s)}const o=new Blob([s],{type:"text/csv;charset=utf-8"}),a=URL.createObjectURL(o),u=document.createElement("a");return u.href=a,u.download=e,u.click(),window.setTimeout(()=>URL.revokeObjectURL(a),1e4),""}class U_ extends Ir{constructor(){super("intern_worklog_users"),this.version(1).stores({user:"id, &username"})}}const Or=new U_,bi="intern_worklog",ul="dsh_session_user";function Gs(){try{const e=localStorage.getItem(ul);if(!e)return null;const t=JSON.parse(e);if(t&&t.userId&&t.username)return t}catch{}return null}function Cd(e){localStorage.setItem(ul,JSON.stringify(e))}function Sd(){localStorage.removeItem(ul)}const cl="dsh_cloud_creds";function Ed(e,t){localStorage.setItem(cl,JSON.stringify({username:e,password:t}))}function wi(){try{const e=localStorage.getItem(cl);if(!e)return null;const t=JSON.parse(e);if(t&&t.username&&t.password)return t}catch{}return null}function $d(){localStorage.removeItem(cl)}let ti=null;function Fs(e){ti===e&&Q||(Q&&rl(),tv(new dd(bi+"_"+e)),ti=e)}async function q_(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 位");if(await Or.user.where("username").equals(s).first())throw new Error("用户名已存在");const a=ll(),u=await Xo(t,a),f="u_"+Date.now().toString(36)+"_"+Math.random().toString(36).slice(2,6);await Or.user.add({id:f,username:s,pwd_hash:u,pwd_salt:a,created_at:new Date().toISOString()}),Fs(f);let h=0;n&&await Ad()&&(h=await Y_(),await Or.user.update(f,{legacy_imported_at:new Date().toISOString()}));const y={userId:f,username:s};return Cd(y),Ed(y.username,t),h&&J_(h),y}async function H_(e,t){const n=e.trim(),s=await Or.user.where("username").equals(n).first();if(!s)throw new Error("用户不存在");if(await Xo(t,s.pwd_salt)!==s.pwd_hash)throw new Error("密码不正确");Fs(s.id);const a={userId:s.id,username:s.username};return Cd(a),Ed(a.username,t),a}async function W_(){ei(),rl(),ti=null,Sd(),$d()}async function z_(e,t){const n=Gs();if(!n)throw new Error("未登录");if(t.length<6)throw new Error("新密码至少 6 位");const s=await Or.user.get(n.userId);if(!s)throw new Error("用户不存在");if(await Xo(e,s.pwd_salt)!==s.pwd_hash)throw new Error("旧密码不正确");const a=ll(),u=await Xo(t,a);await Or.user.update(s.id,{pwd_hash:u,pwd_salt:a})}async function G_(){const e=Gs();if(!e)throw new Error("未登录");ei(),rl(),ti=null,await Ir.delete(bi+"_"+e.userId),await Or.user.delete(e.userId),Sd(),$d()}async function Ad(){return Ir.exists(bi)}async function Y_(){if(!Q)throw new Error("用户数据库未就绪");const e=new dd(bi),t=await Promise.all([e.project.toArray(),e.work_log.toArray(),e.log_item.toArray(),e.attendance.toArray(),e.weekly_note.toArray(),e.setting.toArray(),e.memo.toArray(),e.credential.toArray()]);await Q.transaction("rw",[Q.project,Q.work_log,Q.log_item,Q.attendance,Q.weekly_note,Q.setting,Q.memo,Q.credential],async()=>{await Promise.all([Q.project.clear(),Q.work_log.clear(),Q.log_item.clear(),Q.attendance.clear(),Q.weekly_note.clear(),Q.setting.clear(),Q.memo.clear(),Q.credential.clear()]),t[0].length&&await Q.project.bulkAdd(t[0]),t[1].length&&await Q.work_log.bulkAdd(t[1]),t[2].length&&await Q.log_item.bulkAdd(t[2]),t[3].length&&await Q.attendance.bulkAdd(t[3]),t[4].length&&await Q.weekly_note.bulkAdd(t[4]),t[5].length&&await Q.setting.bulkAdd(t[5]),t[6].length&&await Q.memo.bulkAdd(t[6]),t[7].length&&await Q.credential.bulkAdd(t[7])});const n=t[0].length+t[1].length+t[2].length+t[3].length+t[4].length+t[6].length+t[7].length;return e.close(),n}function J_(e){try{sessionStorage.setItem("dsh_migrate_toast",String(e))}catch{}}const Ns=["project","work_log","log_item","attendance","weekly_note","setting","memo","credential","transaction"],Da=new Set(["sync_cursor","sync_last_time","sync_token","last_project","last_category"]),X_={project:"name",work_log:"date",attendance:"date",weekly_note:"week_start",setting:"key"};function Q_(){return typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}function Nu(e){return JSON.stringify(e)}async function Z_(e){return Q.table(e).toArray()}function Ra(e,t){return e==="setting"?t.key:t.id}async function e1(){for(const e of Ns){const t=Q.table(e),n=await t.toArray();for(const s of n){if(e==="setting"&&Da.has(s.key))continue;const o={};s.uuid||(o.uuid=Q_()),s.updated_at||(o.updated_at=s.created_at||ht()),Object.keys(o).length&&await t.update(Ra(e,s),o)}}}async function t1(){return wi()!=null}async function n1(){return gt("sync_last_time","")}async function Td(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 r1(e,t){let n=await gt("sync_token","");return n||(n=await Td(e,t),await kt("sync_token",n),n)}let $s=!1,Io=!1,La=!1,Gr=null,wn=null,Ka="",Vu=!1,jo=null;async function Yr(){if($s){Io=!0;return}try{if(!await t1())return;await Md(await Pd())}catch{}}function s1(){if(Vu)return;Vu=!0,jo=ev(async()=>{const t={};for(const n of Ns)t[n]=await Q.table(n).count();return t}).subscribe({next:()=>{La||$s||(Gr&&globalThis.clearTimeout(Gr),Gr=globalThis.setTimeout(()=>{Yr()},3e3))},error:()=>{}})}function o1(){jo&&(jo.unsubscribe(),jo=null),wn&&(wn.close(),wn=null,Ka=""),Gr&&(globalThis.clearTimeout(Gr),Gr=null)}function i1(e,t){const n=e+"|"+t;if(!(wn&&Ka===n)){wn&&(wn.close(),wn=null);try{wn=new EventSource(e+"/api/events?token="+encodeURIComponent(t)),Ka=n,wn.onmessage=()=>{Yr()}}catch{wn=null}}}async function dl(){return await gt("sync_base_url","")||a1}const a1="https://daywk.linyux.cn";async function Pd(){const e=wi();if(!e)throw new Error("未登录,无法同步");return{baseUrl:await dl(),username:e.username,password:e.password}}async function Od(){const e=wi();if(!e)throw new Error("未登录");const t=await dl(),n={"Content-Type":"application/json"},s=JSON.stringify({username:e.username,password:e.password});let o=await fetch(t+"/api/auth/register",{method:"POST",headers:n,body:s});if(o.status===409){if(o=await fetch(t+"/api/auth/login",{method:"POST",headers:n,body:s}),!o.ok)throw new Error("云端已存在同名账号且密码不一致,请检查")}else if(!o.ok)throw new Error("云端绑定失败:"+o.status)}async function l1(){return Md(await Pd())}function Bu(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 Uu(){const e=await Q.work_log.toArray(),t=await Q.project.toArray();return{workLog:new Map(e.map(n=>[n.id,n])),project:new Map(t.map(n=>[n.id,n]))}}let Do=0;async function Md(e){if($s)return Io=!0,{pushed:0,pulled:0,removed:0,errors:0,at:""};$s=!0,La=!0,Do=0;try{const t=await u1(e);return Io&&(Io=!1,globalThis.setTimeout(()=>{Yr()},800)),t}finally{$s=!1,La=!1}}async function u1(e){const t=e.baseUrl.trim().replace(/\/+$/,"");if(!t)throw new Error("请先配置同步服务地址");await e1();const n=await Uu(),s=await Q.sync_mirror.toArray(),o=new Map;for(const S of s)o.set(S.table+"|"+S.uuid,S);const a={},u=[];let f=0;for(const S of Ns){let X=await Z_(S);S==="setting"&&(X=X.filter(ie=>!Da.has(ie.key)));const fe=new Map;for(const ie of X)fe.set(ie.uuid,ie);for(const[ie,Z]of fe){const T=Bu(S,Z,n),j=Nu(T),de=o.get(S+"|"+ie);(!de||de.hash!==j)&&(a[S]=a[S]||[],a[S].push(T),f++)}for(const[ie,Z]of o)ie.startsWith(S+"|")&&!fe.has(Z.uuid)&&u.push({table:S,uuid:Z.uuid,deleted_at:ht()});a[S]=a[S]||[]}const h=await Q.tombstone.toArray();for(const S of h)u.push({table:S.table,uuid:S.uuid,deleted_at:S.deleted_at});const y=await r1(t,e),m=S=>fetch(t+"/api/sync",{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+S},body:JSON.stringify({device:"client",tables:a,tombstones:u})});let k=await m(y);if(k.status===401){await kt("sync_token","");const S=await Td(t,e);await kt("sync_token",S),k=await m(S)}if(!k.ok)throw new Error("同步服务返回 "+k.status);const x=await k.json(),C=x.tables||{},M=x.tombstones||[],U=await d1(C,M),re=await Uu(),ae=[];for(const S of Ns){const X=await Q.table(S).toArray();for(const fe of X)S==="setting"&&Da.has(fe.key)||ae.push({table:S,uuid:fe.uuid,hash:Nu(Bu(S,fe,re))})}await Q.sync_mirror.clear(),ae.length&&await Q.sync_mirror.bulkAdd(ae.map(S=>({...S}))),i1(t,y);const O=ht();if(await kt("sync_last_time",O),(U.pulled>0||U.removed>0)&&nr(),h.length){const S=new Set(h.map(X=>X.id));await Q.tombstone.where("id").anyOf(Array.from(S)).delete()}return{pushed:f,pulled:U.pulled,removed:U.removed,errors:U.errors,at:O}}let ha=new Map,va=new Map,c1=0;async function d1(e,t){let n=0,s=0;for(const o of Ns){const a=Q.table(o),u=await a.toArray(),f=new Map;for(const x of u)f.set(x.uuid,x);const h=X_[o]||null,y=new Map;if(h)for(const x of u){const C=x[h];C!=null&&C!==""&&y.set(String(C),x)}const m=new Set(t.filter(x=>x.table===o).map(x=>x.uuid)),k=e[o]||[];for(const x of k)try{if(m.has(x.uuid))continue;const C=f.get(x.uuid);if(C){const M=String(C.updated_at||"");if(String(x.updated_at||"")>M){const re={...x};if(o==="setting"&&delete re.key,o==="log_item"){const ae=x.wuuid?ha.get(x.wuuid):null;if(!ae)continue;re.work_log_id=ae,delete re.wuuid,re.project_id=x.puuid?va.get(x.puuid)??null:C.project_id??null,delete re.puuid}await a.update(C.id,re),n++}}else{const M=h&&x[h]!=null&&x[h]!==""?String(x[h]):null,U=M?y.get(M):void 0;if(U&&U.uuid!==x.uuid){const re=String(U.updated_at||"");if(String(x.updated_at||"")>=re){o==="work_log"&&await Q.log_item.where("work_log_id").equals(U.id).modify({work_log_id:-1}),await a.delete(Ra(o,U)),await Q.tombstone.add({table:o,uuid:U.uuid,deleted_at:ht()});const O=await a.add({...x});o==="work_log"&&await Q.log_item.where("work_log_id").equals(-1).modify({work_log_id:O}),f.set(x.uuid,{...x,id:O}),h&&M&&y.set(M,{...x,id:O}),n++}else await Q.tombstone.add({table:o,uuid:x.uuid,deleted_at:ht()}),c1++}else{if(o==="log_item"){const ae=x.wuuid?ha.get(x.wuuid):null;if(!ae)continue;x.work_log_id=ae,delete x.wuuid,x.project_id=x.puuid?va.get(x.puuid)??null:null,delete x.puuid}const re=await a.add({...x});f.set(x.uuid,{...x,id:re}),h&&M&&y.set(M,{...x,id:re}),n++}}}catch(C){Do++,C instanceof Error?C.message:String(C)}for(const x of u)if(m.has(x.uuid))try{if(o==="work_log"){const M=(await a.toArray()).find(U=>U.date===x.date&&!m.has(U.uuid)&&U.uuid!==x.uuid);M&&x.id&&await Q.log_item.where("work_log_id").equals(x.id).modify({work_log_id:M.id})}await a.delete(Ra(o,x)),s++}catch{Do++}if(o==="work_log"){const x=await a.toArray();ha=new Map(x.map(C=>[C.uuid,C.id]))}if(o==="project"){const x=await a.toArray();va=new Map(x.map(C=>[C.uuid,C.id]))}}return{pulled:n,removed:s,errors:Do}}const f1={class:"settings"},p1={class:"card section"},h1={class:"muted acc-line"},v1={class:"ai-grid"},m1={class:"rule-item"},y1={class:"rule-item"},g1={class:"rule-item"},b1={key:0,class:"form-error"},w1={class:"rule-save"},_1={class:"card section"},k1={class:"rule-grid"},x1={class:"rule-item"},C1={class:"rule-item"},S1={class:"rule-item"},E1={class:"rule-item"},$1={class:"rule-item"},A1={class:"card section"},T1={class:"proj-add"},P1={key:0,class:"muted proj-tip"},O1=["onKeydown"],M1=["onClick"],I1=["onClick"],j1=["onClick"],D1={key:1,class:"muted"},R1={class:"card section"},L1={class:"card section"},K1={class:"muted acc-line"},F1={class:"rule-item"},N1={class:"rule-save"},V1=["disabled"],B1={key:0,class:"muted acc-line"},U1={key:1,class:"form-error"},q1={class:"card section"},H1={class:"ai-grid"},W1={class:"rule-item"},z1={class:"rule-item"},G1={class:"rule-item"},Y1={class:"card section"},J1={class:"backup-row"},X1={key:0,class:"import-error"},Q1=Vt({__name:"SettingsView",setup(e){var Ie;const t=V({work_start:"09:00",work_end:"18:00",grace_minutes:10,lunch_minutes:60,remind_weekly:"friday"}),n=V([]),s=V(""),o=V(""),a=V(""),u=V(""),f=V(""),h=V(""),y=V(null),m=V(""),k=V(null),x=V(null),C=V(""),M=V(((Ie=Gs())==null?void 0:Ie.username)||""),U=V(""),re=V(""),ae=V(""),O=V(""),S=V(!1),X="0.2.0",fe=V(""),ie=V(""),Z=V(""),T=V(""),j=V(!1),de=V("");async function ke(){var w;fe.value=await dl(),ie.value=((w=wi())==null?void 0:w.username)||"",de.value=await n1()}async function J(){await kt("sync_base_url",fe.value.trim()),We("同步地址已保存")}async function xe(){T.value="";try{await Od(),We("云端绑定已重建")}catch(w){T.value=w instanceof Error?w.message:"绑定失败"}}async function Ve(){if(!j.value){T.value="",j.value=!0;try{await J();const w=await l1();de.value=w.at,Z.value="推送 "+w.pushed+" 条 · 拉取 "+w.pulled+" 条 · 删除 "+w.removed+" 条",We("同步完成")}catch(w){T.value=w instanceof Error?w.message:"同步失败"}j.value=!1}}async function nt(){if(O.value="",re.value!==ae.value){O.value="两次输入的新密码不一致";return}try{await z_(U.value,re.value),U.value="",re.value="",ae.value="",We("登录密码已修改")}catch(w){O.value=w instanceof Error?w.message:"修改失败"}}async function qe(){await G_(),window.location.reload()}async function He(){t.value=await jr(),n.value=await Ks(!0),a.value=(await ol()).join(` -`),u.value=await gt("ai_base_url",""),f.value=await gt("ai_api_key",""),h.value=await gt("ai_model",""),await ke()}async function ye(){await kt("ai_base_url",u.value.trim()),await kt("ai_api_key",f.value.trim()),await kt("ai_model",h.value.trim()),We("AI 配置已保存")}async function Oe(){const w=xt(),g=await Promise.all([yi("2000-01-01",w),Ks(!0)]),P=g[0],le=g[1],se=new Map(le.map(oe=>[oe.id,oe.name])),ue=[["日期","分类","项目","内容","耗时(分钟)","成果","待跟进","收获","备注"]];for(const oe of P)ue.push([oe.date,sl(oe.category),oe.project_id&&se.get(oe.project_id)||"",oe.content,oe.minutes==null?"":oe.minutes,oe.is_milestone?"是":"",oe.needs_followup?"是":"",oe.takeaway||"",oe.remark||""]);const ge=await Fu("工作记录_"+w.replace(/-/g,"")+".csv",ue);We(ge?"CSV 已导出到:"+ge:"CSV 已导出到系统下载目录")}async function Fe(){const w=xt(),g=await Promise.all([jr(),mi("2000-01-01",w)]),P=g[0],le=g[1],se=["周日","周一","周二","周三","周四","周五","周六"],ue=[["日期","星期","状态","上班时间","下班时间","地点","类型","说明"]];for(const oe of le){const we=Ws(oe,oe.date,P,oe.date===w);ue.push([oe.date,se[rs(oe.date).getDay()],we.label,oe.clock_in_at?Vn(oe.clock_in_at):"",oe.clock_out_at?Vn(oe.clock_out_at):"",oe.location||"",oe.kind==="makeup"?"补卡":oe.kind==="leave"?"休假":"正常",oe.note||""])}const ge=await Fu("考勤记录_"+w.replace(/-/g,"")+".csv",ue);We(ge?"CSV 已导出到:"+ge:"CSV 已导出到系统下载目录")}dn(He);async function je(){await kt("work_start",t.value.work_start),await kt("work_end",t.value.work_end),await kt("grace_minutes",String(t.value.grace_minutes)),await kt("lunch_minutes",String(t.value.lunch_minutes)),await kt("remind_weekly",t.value.remind_weekly),We("打卡规则已保存")}async function te(){await pd(a.value.split(` -`)),We("常用地点已保存")}async function N(){const w=s.value.trim();if(w){try{await $v(w),o.value="",s.value=""}catch{o.value="项目名已存在"}await He()}}function ce(w){y.value=w.id,m.value=w.name}async function Ke(w){const g=m.value.trim();if(g)try{await Av(w.id,g),o.value=""}catch{o.value="项目名已存在"}y.value=null,await He()}async function ct(w){await Tv(w.id,w.archived!==1),await He()}async function vt(){try{const w=await Zv(),g=await al("实习日志备份_"+xt().replace(/-/g,"")+".json",w);We(g?"备份已导出到:"+g:"备份已导出到系统下载目录")}catch(w){We("导出失败:"+(w instanceof Error?w.message:String(w)))}}function Yt(w){const g=w.target,P=g.files&&g.files[0];if(C.value="",!P)return;const le=P.name;P.text().then(se=>{x.value={name:le,text:se}}),g.value=""}async function Jt(){if(x.value)try{await em(x.value.text),x.value=null,C.value="",await He(),We("数据导入完成")}catch(w){x.value=null,C.value=w instanceof Error?w.message:"导入失败"}}return(w,g)=>(F(),W("div",f1,[c("div",p1,[g[23]||(g[23]=c("div",{class:"section-title"},"账号与隐私",-1)),c("div",h1,"版本 v"+ne(Qt(X))+" · 当前用户:"+ne(M.value)+" · 每位用户独立数据库隔离存储于本机 · 登录密码仅保存 PBKDF2 哈希",1),c("div",v1,[c("div",m1,[g[20]||(g[20]=c("label",null,"旧登录密码",-1)),Ee(c("input",{type:"password",class:"input","onUpdate:modelValue":g[0]||(g[0]=P=>U.value=P)},null,512),[[De,U.value]])]),c("div",y1,[g[21]||(g[21]=c("label",null,"新登录密码(至少 6 位)",-1)),Ee(c("input",{type:"password",class:"input","onUpdate:modelValue":g[1]||(g[1]=P=>re.value=P)},null,512),[[De,re.value]])]),c("div",g1,[g[22]||(g[22]=c("label",null,"确认新登录密码",-1)),Ee(c("input",{type:"password",class:"input","onUpdate:modelValue":g[2]||(g[2]=P=>ae.value=P)},null,512),[[De,ae.value]])])]),O.value?(F(),W("div",b1,ne(O.value),1)):Se("",!0),c("div",w1,[c("button",{class:"btn btn-primary btn-sm",onClick:nt},"修改登录密码"),c("button",{class:"btn btn-sm btn-danger",onClick:g[3]||(g[3]=P=>S.value=!0)},"删除此用户及全部数据")])]),c("div",_1,[g[30]||(g[30]=c("div",{class:"section-title"},"打卡规则",-1)),c("div",k1,[c("div",x1,[g[24]||(g[24]=c("label",null,"上班时间",-1)),Ee(c("input",{type:"time",class:"input","onUpdate:modelValue":g[4]||(g[4]=P=>t.value.work_start=P)},null,512),[[De,t.value.work_start]])]),c("div",C1,[g[25]||(g[25]=c("label",null,"下班时间",-1)),Ee(c("input",{type:"time",class:"input","onUpdate:modelValue":g[5]||(g[5]=P=>t.value.work_end=P)},null,512),[[De,t.value.work_end]])]),c("div",S1,[g[26]||(g[26]=c("label",null,"迟到宽限(分钟)",-1)),Ee(c("input",{type:"number",class:"input",min:"0","onUpdate:modelValue":g[6]||(g[6]=P=>t.value.grace_minutes=P)},null,512),[[De,t.value.grace_minutes,void 0,{number:!0}]])]),c("div",E1,[g[27]||(g[27]=c("label",null,"午休扣除(分钟)",-1)),Ee(c("input",{type:"number",class:"input",min:"0","onUpdate:modelValue":g[7]||(g[7]=P=>t.value.lunch_minutes=P)},null,512),[[De,t.value.lunch_minutes,void 0,{number:!0}]])]),c("div",$1,[g[29]||(g[29]=c("label",null,"周记提醒",-1)),Ee(c("select",{class:"select","onUpdate:modelValue":g[8]||(g[8]=P=>t.value.remind_weekly=P)},[...g[28]||(g[28]=[c("option",{value:"friday"},"每周五提醒",-1),c("option",{value:"off"},"关闭",-1)])],512),[[Fn,t.value.remind_weekly]])])]),c("div",{class:"rule-save"},[c("button",{class:"btn btn-primary btn-sm",onClick:je},"保存规则")])]),c("div",A1,[g[31]||(g[31]=c("div",{class:"section-title"},"项目管理",-1)),c("div",T1,[Ee(c("input",{class:"input","onUpdate:modelValue":g[9]||(g[9]=P=>s.value=P),placeholder:"新项目名称",onKeydown:jt(N,["enter"])},null,544),[[De,s.value]]),c("button",{class:"btn btn-sm",onClick:N},"添加")]),o.value?(F(),W("div",P1,ne(o.value),1)):Se("",!0),(F(!0),W(Re,null,ut(n.value,P=>(F(),W("div",{key:P.id,class:"proj-row"},[y.value===P.id?(F(),W(Re,{key:0},[Ee(c("input",{class:"input","onUpdate:modelValue":g[10]||(g[10]=le=>m.value=le),onKeydown:jt(le=>Ke(P),["enter"])},null,40,O1),[[De,m.value]]),c("button",{class:"btn btn-sm",onClick:le=>Ke(P)},"保存",8,M1),c("button",{class:"btn btn-sm",onClick:g[11]||(g[11]=le=>y.value=null)},"取消")],64)):(F(),W(Re,{key:1},[c("span",{class:et(["proj-name",{archived:P.archived===1}])},ne(P.name),3),c("button",{class:"icon-btn",title:"重命名",onClick:le=>ce(P)},[Pe(lt,{name:"edit",size:14})],8,I1),c("button",{class:"btn btn-sm",onClick:le=>ct(P)},ne(P.archived===1?"恢复":"归档"),9,j1)],64))]))),128)),n.value.length?Se("",!0):(F(),W("div",D1,"暂无项目,先添加一个"))]),c("div",R1,[g[33]||(g[33]=c("div",{class:"section-title"},"常用地点",-1)),Ee(c("textarea",{class:"textarea","onUpdate:modelValue":g[12]||(g[12]=P=>a.value=P),placeholder:"每行一个地点,如:公司、客户现场、出差、居家办公"},null,512),[[De,a.value]]),c("div",{class:"rule-save"},[c("button",{class:"btn btn-primary btn-sm",onClick:te},"保存地点"),g[32]||(g[32]=c("span",{class:"muted loc-note"},"打卡时可直接输入新地点,保存后自动加入列表",-1))])]),c("div",L1,[g[35]||(g[35]=c("div",{class:"section-title"},"多端数据同步",-1)),c("div",K1,"云端账号:"+ne(ie.value||"未绑定")+" · 登录即自动绑定并同步(变更实时推送 + 每 5 分钟兜底);密码库以密文同步,主密码永不出本机",1),c("div",F1,[g[34]||(g[34]=c("label",null,"同步服务地址(默认即可)",-1)),Ee(c("input",{class:"input","onUpdate:modelValue":g[13]||(g[13]=P=>fe.value=P),placeholder:"https://daywk.linyux.cn"},null,512),[[De,fe.value]])]),c("div",N1,[c("button",{class:"btn btn-sm",onClick:J},"保存地址"),c("button",{class:"btn btn-primary btn-sm",disabled:j.value,onClick:Ve},ne(j.value?"同步中":"立即同步"),9,V1),c("button",{class:"btn btn-sm",onClick:xe},"重建云端绑定")]),Z.value?(F(),W("div",B1,"上次同步:"+ne(de.value||"--")+" · "+ne(Z.value),1)):Se("",!0),T.value?(F(),W("div",U1,ne(T.value),1)):Se("",!0)]),c("div",q1,[g[40]||(g[40]=c("div",{class:"section-title"},"AI 润色配置(可选)",-1)),c("div",H1,[c("div",W1,[g[36]||(g[36]=c("label",null,"接口地址(OpenAI 兼容,到 /v1 为止)",-1)),Ee(c("input",{class:"input","onUpdate:modelValue":g[14]||(g[14]=P=>u.value=P),placeholder:"https://api.example.com/v1"},null,512),[[De,u.value]])]),c("div",z1,[g[37]||(g[37]=c("label",null,"API Key",-1)),Ee(c("input",{class:"input","onUpdate:modelValue":g[15]||(g[15]=P=>f.value=P),placeholder:"sk-..."},null,512),[[De,f.value]])]),c("div",G1,[g[38]||(g[38]=c("label",null,"模型名称",-1)),Ee(c("input",{class:"input","onUpdate:modelValue":g[16]||(g[16]=P=>h.value=P),placeholder:"如:deepseek-chat"},null,512),[[De,h.value]])])]),c("div",{class:"rule-save"},[c("button",{class:"btn btn-primary btn-sm",onClick:ye},"保存 AI 配置"),g[39]||(g[39]=c("span",{class:"muted loc-note"},"配置仅保存在本机浏览器;总结页可用 AI 润色草稿,需服务端允许浏览器跨域",-1))])]),c("div",Y1,[g[41]||(g[41]=c("div",{class:"section-title"},"数据备份",-1)),c("div",J1,[c("button",{class:"btn btn-sm",onClick:vt},"导出 JSON 备份"),c("button",{class:"btn btn-sm",onClick:g[17]||(g[17]=P=>{var le;return(le=k.value)==null?void 0:le.click()})},"导入 JSON 备份"),c("button",{class:"btn btn-sm",onClick:Oe},"导出工作记录 CSV"),c("button",{class:"btn btn-sm",onClick:Fe},"导出考勤 CSV"),c("input",{ref_key:"fileInput",ref:k,type:"file",accept:"application/json,.json",style:{display:"none"},onChange:Yt},null,544)]),C.value?(F(),W("div",X1,ne(C.value),1)):Se("",!0),g[42]||(g[42]=c("div",{class:"muted backup-note"},"数据保存在浏览器 IndexedDB 中,建议定期导出 JSON 备份。",-1))]),Pe(cr,{open:!!x.value,title:"导入确认",message:x.value?"将从文件「"+x.value.name+"」导入备份。现有全部数据将被覆盖,且不可恢复,请先确认已导出当前备份。":"","confirm-text":"覆盖导入",danger:"",onCancel:g[18]||(g[18]=P=>x.value=null),onConfirm:Jt},null,8,["open","message"]),Pe(cr,{open:S.value,title:"删除用户确认",message:"将永久删除用户「"+M.value+"」及其全部数据:工作日志、考勤、备忘录、账号密码库都将被清除,且不可恢复。请确认。","confirm-text":"永久删除",danger:"",onCancel:g[19]||(g[19]=P=>S.value=!1),onConfirm:qe},null,8,["open","message"])]))}}),Z1=Gt(Q1,[["__scopeId","data-v-81598f02"]]),e0={class:"login-page"},t0={class:"card login-card"},n0={class:"login-brand"},r0={class:"brand-icon"},s0={class:"seg"},o0=["placeholder"],i0={key:1,class:"mig-row"},a0={key:2,class:"form-error"},l0=["disabled"],u0=Vt({__name:"LoginView",emits:["login"],setup(e,{emit:t}){const n=t,s=V("login"),o=V(""),a=V(""),u=V(""),f=V(!0),h=V(!1),y=V(""),m=V(!1);dn(async()=>{h.value=await Ad()});function k(C){s.value=C,y.value="",u.value=""}async function x(){if(!m.value){y.value="",m.value=!0;try{let C;if(s.value==="login")C=await H_(o.value,a.value);else{if(a.value.length<6){y.value="登录密码至少 6 位",m.value=!1;return}if(a.value!==u.value){y.value="两次输入的密码不一致",m.value=!1;return}C=await q_(o.value,a.value,f.value)}n("login",C)}catch(C){y.value=C instanceof Error?C.message:"操作失败"}m.value=!1}}return(C,M)=>(F(),W("div",e0,[c("div",t0,[c("div",n0,[c("div",r0,[Pe(lt,{name:"calendar",size:22})]),M[6]||(M[6]=c("div",{class:"login-title"},"实习工作日志",-1)),M[7]||(M[7]=c("div",{class:"muted login-sub"},"打卡 · 记录 · 总结 · 备忘录 · 密码库",-1)),M[8]||(M[8]=c("div",{class:"muted login-sub"},"每位用户独立数据库,数据彼此隔离并保存在本机",-1))]),c("div",s0,[c("button",{class:et(["seg-btn",{active:s.value==="login"}]),onClick:M[0]||(M[0]=U=>k("login"))},"登录",2),c("button",{class:et(["seg-btn",{active:s.value==="create"}]),onClick:M[1]||(M[1]=U=>k("create"))},"创建用户",2)]),Ee(c("input",{class:"input","onUpdate:modelValue":M[2]||(M[2]=U=>o.value=U),placeholder:"用户名(2 到 20 个字符)",onKeydown:jt(x,["enter"])},null,544),[[De,o.value]]),Ee(c("input",{type:"password",class:"input","onUpdate:modelValue":M[3]||(M[3]=U=>a.value=U),placeholder:s.value==="login"?"登录密码":"设置登录密码(至少 6 位)",onKeydown:jt(x,["enter"])},null,40,o0),[[De,a.value]]),s.value==="create"?Ee((F(),W("input",{key:0,type:"password",class:"input","onUpdate:modelValue":M[4]||(M[4]=U=>u.value=U),placeholder:"再次输入密码",onKeydown:jt(x,["enter"])},null,544)),[[De,u.value]]):Se("",!0),s.value==="create"&&h.value?(F(),W("label",i0,[Ee(c("input",{type:"checkbox","onUpdate:modelValue":M[5]||(M[5]=U=>f.value=U)},null,512),[[Dh,f.value]]),M[9]||(M[9]=c("span",null,"导入本机原有工作日志数据到此用户(原数据保留不删除)",-1))])):Se("",!0),y.value?(F(),W("div",a0,ne(y.value),1)):Se("",!0),c("button",{class:"btn btn-primary login-btn",disabled:m.value,onClick:x},ne(s.value==="login"?"登录":"创建并进入"),9,l0),M[10]||(M[10]=c("div",{class:"muted login-note"}," 登录后自动开启云端同步(密码会保存在本机用于云同步);系统只保存密码哈希,忘记密码将无法访问该用户数据 ",-1))])]))}}),c0=Gt(u0,[["__scopeId","data-v-d3d6c8cb"]]),d0={key:1,class:"app"},f0={class:"side"},p0=["data-tip","onClick"],h0={class:"main"},v0={class:"topbar"},m0={class:"title"},y0={class:"gsearch"},g0={key:0,class:"gs-panel"},b0={key:0,class:"gs-group muted"},w0=["onMousedown"],_0={class:"tag"},k0={class:"gs-text"},x0={class:"muted num gs-date"},C0={key:1,class:"gs-group muted"},S0=["onMousedown"],E0={class:"gs-text"},$0={class:"muted gs-sub"},A0={key:1,class:"gs-empty muted"},T0={class:"topbar-actions"},P0={class:"user-chip num"},O0=["disabled"],M0={class:"num"},I0={class:"content"},j0={class:"content-inner"},D0={class:"toast-wrap"},R0=Vt({__name:"App",setup(e){const t=nm(),n=V(Gs());async function s(ye){n.value=ye,Fs(ye.userId),location.hash="#/calendar",fe.value="calendar",await ke(),await He(),u();try{await Od(),await Yr()}catch{}showToast("欢迎,"+ye.username);const Oe=sessionStorage.getItem("dsh_migrate_toast");Oe&&(sessionStorage.removeItem("dsh_migrate_toast"),showToast("已迁移原有数据 "+Oe+" 条"))}async function o(){o1(),a!==null&&(window.clearInterval(a),a=null),await W_(),n.value=null,fe.value="calendar",location.hash="#/calendar",showToast("已退出登录")}let a=null;function u(){s1(),a!==null&&window.clearInterval(a),a=window.setInterval(()=>{Yr()},60*1e3),Yr()}const f=V(null),h=V(""),y=V(!1),m=V({logs:[],memos:[]});let k=null;const x=it(()=>!!(m.value.logs.length||m.value.memos.length));function C(){k&&window.clearTimeout(k);const ye=h.value;k=window.setTimeout(async()=>{const Oe=ye.trim();if(!Oe){m.value={logs:[],memos:[]};return}const Fe=await Promise.all([Wv(Oe,8),zv(Oe,4)]);m.value={logs:Fe[0],memos:Fe[1]}},200)}function M(){h.value="",m.value={logs:[],memos:[]},y.value=!1}function U(ye){Ma.value=ye.date,ie("calendar"),M()}function re(ye){Ia.value=ye.id,ie("memo"),M()}function ae(){window.setTimeout(()=>{y.value=!1},150)}function O(ye){var Oe;(ye.ctrlKey||ye.metaKey)&&ye.key.toLowerCase()==="k"&&(ye.preventDefault(),(Oe=f.value)==null||Oe.focus())}const S=[{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 ye=(location.hash||"").replace("#/","");return S.some(Oe=>Oe.key===ye)?ye:"calendar"}const fe=V(X());window.addEventListener("hashchange",()=>{fe.value=X()});function ie(ye){location.hash="#/"+ye}const Z=it(()=>S.find(ye=>ye.key===fe.value)||S[0]),T=V(xt()),j=V(void 0),de=V(!1);async function ke(){if(j.value=await mn(T.value),de.value=!1,new Date().getHours()<4){const Oe=await mn(Kn(T.value,-1));de.value=!!(Oe&&Oe.clock_in_at&&!Oe.clock_out_at)}}const J=it(()=>{const ye=j.value;return ye&&ye.clock_in_at&&!ye.clock_out_at?!0:de.value&&!(ye&&ye.clock_in_at)}),xe=it(()=>{const ye=j.value;return!!(ye&&ye.clock_in_at&&ye.clock_out_at)}),Ve=it(()=>{const ye=j.value;return J.value?"下班打卡":xe.value?"已打卡 "+Vn(ye==null?void 0:ye.clock_in_at)+" - "+Vn(ye==null?void 0:ye.clock_out_at):"上班打卡"});async function nt(){if(J.value)try{await Ov()}catch{}else await hd(T.value);await ke(),nr()}bt(zs,()=>{n.value&&ke()});const qe=V(!1);async function He(){if((await jr()).remind_weekly==="off"){qe.value=!1;return}const Oe=new Date().getDay();if(Oe===5||Oe===6||Oe===0){const Fe=await il(Es(T.value));qe.value=!Fe||!Fe.highlights&&!Fe.challenges&&!Fe.plan_next}else qe.value=!1}return dn(async()=>{window.addEventListener("keydown",O),n.value&&(Fs(n.value.userId),await ke(),await He(),u())}),(ye,Oe)=>{var Fe;return n.value?(F(),W("div",d0,[c("nav",f0,[(F(),W(Re,null,ut(S,je=>c("button",{key:je.key,class:et(["nav-btn",{active:fe.value===je.key}]),"data-tip":je.name,onClick:te=>ie(je.key)},[Pe(lt,{name:je.icon,size:18},null,8,["name"])],10,p0)),64))]),c("div",h0,[c("header",v0,[c("span",m0,ne(Z.value.name),1),c("div",y0,[Pe(lt,{name:"search",size:14,class:"gs-icon"}),Ee(c("input",{ref_key:"gsInput",ref:f,class:"input gs-input","onUpdate:modelValue":Oe[0]||(Oe[0]=je=>h.value=je),placeholder:"搜索工作记录与备忘录(Ctrl+K)",onInput:C,onFocus:Oe[1]||(Oe[1]=je=>y.value=!0),onBlur:ae,onKeydown:jt(M,["esc"])},null,544),[[De,h.value]]),y.value&&h.value.trim()?(F(),W("div",g0,[x.value?(F(),W(Re,{key:0},[m.value.logs.length?(F(),W("div",b0,"工作记录")):Se("",!0),(F(!0),W(Re,null,ut(m.value.logs,je=>(F(),W("div",{key:"l"+je.id,class:"gs-item",onMousedown:Mr(te=>U(je),["prevent"])},[c("span",_0,ne(Qt(sl)(je.category)),1),c("span",k0,ne(je.content),1),c("span",x0,ne(je.date),1)],40,w0))),128)),m.value.memos.length?(F(),W("div",C0,"备忘录")):Se("",!0),(F(!0),W(Re,null,ut(m.value.memos,je=>(F(),W("div",{key:"m"+je.id,class:"gs-item",onMousedown:Mr(te=>re(je),["prevent"])},[c("span",E0,ne(je.title||"无标题"),1),c("span",$0,ne(je.content),1)],40,S0))),128))],64)):(F(),W("div",A0,"无匹配结果"))])):Se("",!0)]),Oe[4]||(Oe[4]=c("span",{class:"flex1"},null,-1)),c("div",T0,[qe.value?(F(),W("button",{key:0,class:"week-tip",onClick:Oe[2]||(Oe[2]=je=>ie("report"))},[...Oe[3]||(Oe[3]=[c("span",{class:"dot",style:{background:"var(--warn)"}},null,-1),nn(" 填写本周周记 ",-1)])])):Se("",!0),c("span",P0,ne((Fe=n.value)==null?void 0:Fe.username),1),c("button",{class:"btn btn-sm",onClick:o},"退出"),c("button",{class:"btn btn-primary btn-sm",disabled:xe.value,onClick:nt},[Pe(lt,{name:xe.value?"check-circle":"clock",size:14},null,8,["name"]),c("span",M0,ne(Ve.value),1)],8,O0)])]),c("main",I0,[c("div",j0,[fe.value==="calendar"?(F(),It(Sy,{key:0})):fe.value==="today"?(F(),It(Oy,{key:1})):fe.value==="stats"?(F(),It(lg,{key:2})):fe.value==="report"?(F(),It(ab,{key:3})):fe.value==="ledger"?(F(),It(gw,{key:4})):fe.value==="memo"?(F(),It(Rw,{key:5})):fe.value==="vault"?(F(),It(V_,{key:6})):(F(),It(Z1,{key:7}))])])]),c("div",D0,[Pe(Eh,{name:"toast"},{default:fr(()=>[(F(!0),W(Re,null,ut(Qt(t),je=>(F(),W("div",{key:je.id,class:"toast"},ne(je.text),1))),128))]),_:1})])])):(F(),It(c0,{key:0,onLogin:s}))}}}),L0=Gt(R0,[["__scopeId","data-v-0d619789"]]);function fl(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{}}const qu=Gs();qu&&Fs(qu.userId);const Id=Bh(L0);Id.config.errorHandler=(e,t,n)=>{const s=e;fl("应用内部错误(点击空白处关闭,请将以下内容发送给开发者)",s&&(s.stack||s.message)||String(e)+` -触发位置: `+n)};window.addEventListener("unhandledrejection",e=>{const t=e.reason;fl("未处理的异步错误(点击空白处关闭)",t&&(t.stack||t.message)||String(e.reason))});window.addEventListener("error",e=>{e.message&&e.message!=="ResizeObserver loop limit exceeded"&&fl("运行错误(点击空白处关闭)",e.message)});Id.mount("#app");"serviceWorker"in navigator&&location.protocol.startsWith("http")&&window.addEventListener("load",()=>{navigator.serviceWorker.register("sw.js").catch(()=>{})});export{bd as W,md as _,kg as b,gd as r}; diff --git a/intern-log/dist/assets/web-C9gz15N3.js b/intern-log/dist/assets/web-B9VoRh8-.js similarity index 98% rename from intern-log/dist/assets/web-C9gz15N3.js rename to intern-log/dist/assets/web-B9VoRh8-.js index 893e6a7..86f03a1 100644 --- a/intern-log/dist/assets/web-C9gz15N3.js +++ b/intern-log/dist/assets/web-B9VoRh8-.js @@ -1 +1 @@ -import{W as P,b as x}from"./index-o1hiWX9Y.js";import{Encoding as E}from"./index-fvhfb3wJ.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-WHahwity.js";import{Encoding as E}from"./index-BzA9f9V8.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 0444b28..01e87ea 100644 --- a/intern-log/dist/index.html +++ b/intern-log/dist/index.html @@ -8,8 +8,8 @@ 实习工作日志 - - + +
diff --git a/intern-log/src/components/TransactionDialog.vue b/intern-log/src/components/TransactionDialog.vue index e434727..3fef721 100644 --- a/intern-log/src/components/TransactionDialog.vue +++ b/intern-log/src/components/TransactionDialog.vue @@ -57,8 +57,9 @@ function computedCategory() { } function save() { - const v = Number(fAmount.value) - if (!fAmount.value.trim() || !isFinite(v) || v <= 0) { + const amountText = String(fAmount.value ?? '').trim() + const v = Number(amountText) + if (!amountText || !isFinite(v) || v <= 0) { fError.value = '请填写大于 0 的金额' return } @@ -72,7 +73,7 @@ function save() { category: computedCategory(), amount: Math.round(v * 100), date: fDate.value, - note: fNote.value.trim(), + note: String(fNote.value ?? '').trim(), reimbursable, reimbursed: reimbursable && fReimbursed.value ? 1 : 0 }) diff --git a/intern-log/src/views/LedgerView.vue b/intern-log/src/views/LedgerView.vue index 796c03f..72b4205 100644 --- a/intern-log/src/views/LedgerView.vue +++ b/intern-log/src/views/LedgerView.vue @@ -120,8 +120,9 @@ watch(fAmount, () => { }) async function submit() { - const v = Number(fAmount.value) - if (!fAmount.value.trim() || !isFinite(v) || v <= 0) { + const amountText = String(fAmount.value ?? '').trim() + const v = Number(amountText) + if (!amountText || !isFinite(v) || v <= 0) { fError.value = '请填写大于 0 的金额' return } @@ -137,7 +138,7 @@ async function submit() { category: fCategory.value, amount: Math.round(v * 100), date: fDate.value, - note: fNote.value.trim(), + note: String(fNote.value ?? '').trim(), reimbursable: fType.value === 'expense' && fReimb.value ? 1 : 0, reimbursed: 0 }) @@ -154,6 +155,8 @@ async function submit() { showToast('记账已添加') submitting.value = false } +const formDirty = computed(() => String(fAmount.value ?? '').trim() !== '' || String(fNote.value ?? '').trim() !== '') + function resetForm() { fAmount.value = '' fNote.value = '' @@ -262,7 +265,7 @@ async function confirmDelete() {
{{ fError }}