Files
daywork/intern-log/dist/assets/index-B3Rf3B1G.js
T

25 lines
301 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))s(o);new MutationObserver(o=>{for(const a of o)if(a.type==="childList")for(const c of a.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&s(c)}).observe(document,{childList:!0,subtree:!0});function n(o){const a={};return o.integrity&&(a.integrity=o.integrity),o.referrerPolicy&&(a.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?a.credentials="include":o.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function s(o){if(o.ep)return;o.ep=!0;const a=n(o);fetch(o.href,a)}})();/**
* @vue/shared v3.5.44
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/function Ia(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const ct={},Ar=[],En=()=>{},Ru=()=>!1,Jo=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Xo=e=>e.startsWith("onUpdate:"),Et=Object.assign,ja=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Xf=Object.prototype.hasOwnProperty,ot=(e,t)=>Xf.call(e,t),Le=Array.isArray,rr=e=>Fs(e)==="[object Map]",Bn=e=>Fs(e)==="[object Set]",Fl=e=>Fs(e)==="[object Date]",ze=e=>typeof e=="function",bt=e=>typeof e=="string",$n=e=>typeof e=="symbol",at=e=>e!==null&&typeof e=="object",Lu=e=>(at(e)||ze(e))&&ze(e.then)&&ze(e.catch),Ku=Object.prototype.toString,Fs=e=>Ku.call(e),Qf=e=>Fs(e).slice(8,-1),Fu=e=>Fs(e)==="[object Object]",Da=e=>bt(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,bs=Ia(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Qo=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Zf=/-\w/g,hn=Qo(e=>e.replace(Zf,t=>t.slice(1).toUpperCase())),ed=/\B([A-Z])/g,cr=Qo(e=>e.replace(ed,"-$1").toLowerCase()),Nu=Qo(e=>e.charAt(0).toUpperCase()+e.slice(1)),zi=Qo(e=>e?`on${Nu(e)}`:""),Cn=(e,t)=>!Object.is(e,t),So=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},Vu=(e,t,n,s=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},Zo=e=>{const t=parseFloat(e);return isNaN(t)?e:t},td=e=>{const t=bt(e)?Number(e):NaN;return isNaN(t)?e:t};let Nl;const ei=()=>Nl||(Nl=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function sr(e){if(Le(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],o=bt(s)?od(s):sr(s);if(o)for(const a in o)t[a]=o[a]}return t}else if(bt(e)||at(e))return e}const nd=/;(?![^(]*\))/g,rd=/:([^]+)/,sd=/"(?:[^"\\]|\\[^])*"|'(?:[^'\\]|\\[^])*'|\\[^]|\/\*[^]*?\*\//g;function od(e){const t={};return e.replace(sd,n=>n.startsWith("/*")?"":n).split(nd).forEach(n=>{if(n){const s=n.split(rd);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function et(e){let t="";if(bt(e))t=e;else if(Le(e))for(let n=0;n<e.length;n++){const s=et(e[n]);s&&(t+=s+" ")}else if(at(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const id="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly",ad=Ia(id);function Bu(e){return!!e||e===""}function ld(e,t,n){if(e.length!==t.length)return!1;let s=!0;for(let o=0;s&&o<e.length;o++)s=Un(e[o],t[o],n);return s}function Vl(e,t,n){if(e.size!==t.size)return!1;const s=Array.from(t),o=new Uint8Array(s.length);for(const a of e){let c=-1;for(let d=0;d<s.length;d++)if(!o[d]&&Un(a,s[d],n)){c=d;break}if(c<0)return!1;o[c]=1}return!0}function ud(e,t,n){let s=rr(e),o=rr(t);if(s||o||(s=Bn(e),o=Bn(t),s||o))return s&&o?Vl(e,t,n):!1;const a=Object.keys(e).length,c=Object.keys(t).length;if(a!==c)return!1;for(const d in e){const h=e.hasOwnProperty(d),y=t.hasOwnProperty(d);if(h&&!y||!h&&y||!Un(e[d],t[d],n))return!1}return String(e)===String(t)}function Bl(e,t,n,s){n||(n=[new Map,new Map]);const[o,a]=n;if(o.has(e)||a.has(t))return o.get(e)===t&&a.get(t)===e;o.set(e,t),a.set(t,e);const c=s(e,t,n);return o.delete(e),a.delete(t),c}function Un(e,t,n){if(e===t)return!0;let s=Fl(e),o=Fl(t);return s||o?s&&o?e.getTime()===t.getTime():!1:(s=$n(e),o=$n(t),s||o?e===t:(s=Le(e),o=Le(t),s||o?s&&o?Bl(e,t,n,ld):!1:(s=at(e),o=at(t),s||o?!s||!o?!1:Bl(e,t,n,ud):String(e)===String(t))))}function Ra(e,t){return e.findIndex(n=>Un(n,t))}const Uu=e=>!!(e&&e.__v_isRef===!0),re=e=>bt(e)?e:e==null?"":Le(e)||at(e)&&(e.toString===Ku||!ze(e.toString))?Uu(e)?re(e.value):JSON.stringify(e,qu,2):String(e),qu=(e,t)=>Uu(t)?qu(e,t.value):rr(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,o],a)=>(n[Gi(s,a)+" =>"]=o,n),{})}:Bn(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Gi(n))}:$n(t)?Gi(t):at(t)&&!Le(t)&&!Fu(t)?String(t):t,Gi=(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 cd{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;t<n;t++)s[t].pause()}for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes){const o=this.scopes.slice();for(t=0,n=o.length;t<n;t++)o[t].resume()}const s=this.effects.slice();for(t=0,n=s.length;t<n;t++)s[t].resume()}}run(t){if(this._active){const n=Mt;try{return Mt=this,t()}finally{Mt=n}}}on(){++this._on===1&&(this.prevScope=Mt,Mt=this)}off(){if(this._on>0&&--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;n<s;n++)this.effects[n].stop();for(this.effects.length=0,n=0,s=this.cleanups.length;n<s;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){const o=this.scopes.slice();for(n=0,s=o.length;n<s;n++)o[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const o=this.parent.scopes.pop();o&&o!==this&&(this.parent.scopes[this.index]=o,o.index=this.index)}this.parent=void 0}}}function fd(){return Mt}let dt;const Yi=new WeakSet;class Hu{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Mt&&(Mt.active?Mt.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Yi.has(this)&&(Yi.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||zu(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Ul(this),Gu(this);const t=dt,n=vn;dt=this,vn=!0;try{return this.fn()}finally{Yu(this),dt=t,vn=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Fa(t);this.deps=this.depsTail=void 0,Ul(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Yi.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){ua(this)&&this.run()}get dirty(){return ua(this)}}let Wu=0,ws,_s;function zu(e,t=!1){if(e.flags|=8,t){e.next=_s,_s=e;return}e.next=ws,ws=e}function La(){Wu++}function Ka(){if(--Wu>0)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 Gu(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Yu(e){let t,n=e.depsTail,s=n;for(;s;){const o=s.prevDep;s.version===-1?(s===n&&(n=o),Fa(s),dd(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=o}e.deps=t,e.depsTail=n}function ua(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Ju(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Ju(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||!ua(e))))return;e.flags|=2;const t=e.dep,n=dt,s=vn;dt=e,vn=!0;try{Gu(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{dt=n,vn=s,Yu(e),e.flags&=-3}}function Fa(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)Fa(a,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function dd(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 Xu=[];function An(){Xu.push(vn),vn=!1}function Pn(){const e=Xu.pop();vn=e===void 0?!0:e}function Ul(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=dt;dt=void 0;try{t()}finally{dt=n}}}let As=0;class pd{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 Na{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(!dt||!vn||dt===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==dt)n=this.activeLink=new pd(dt,this),dt.deps?(n.prevDep=dt.depsTail,dt.depsTail.nextDep=n,dt.depsTail=n):dt.deps=dt.depsTail=n,Qu(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=dt.depsTail,n.nextDep=void 0,dt.depsTail.nextDep=n,dt.depsTail=n,dt.deps===n&&(dt.deps=s)}return n}trigger(t){this.version++,As++,this.notify(t)}notify(t){La();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Ka()}}}function Qu(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)Qu(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const ca=new WeakMap,Pr=Symbol(""),fa=Symbol(""),Ps=Symbol("");function Kt(e,t,n){if(vn&&dt){let s=ca.get(e);s||ca.set(e,s=new Map);let o=s.get(n);o||(s.set(n,o=new Na),o.map=s,o.key=n),o.track()}}function Rn(e,t,n,s,o,a){const c=ca.get(e);if(!c){As++;return}const d=h=>{h&&h.trigger()};if(La(),t==="clear")c.forEach(d);else{const h=Le(e),y=h&&Da(n);if(h&&n==="length"){const m=Number(s);c.forEach((k,D)=>{(D==="length"||D===Ps||!$n(D)&&D>=m)&&d(k)})}else switch((n!==void 0||c.has(void 0))&&d(c.get(n)),y&&d(c.get(Ps)),t){case"add":h?y&&d(c.get("length")):(d(c.get(Pr)),rr(e)&&d(c.get(fa)));break;case"delete":h||(d(c.get(Pr)),rr(e)&&d(c.get(fa)));break;case"set":rr(e)&&d(c.get(Pr));break}}Ka()}function qr(e){const t=rt(e);return t===e||(Kt(t,"iterate",Ps),ln(e))?t:Tn(e)?or(e)?t.map(n=>ir(un(n))):t.map(ir):t.map(un)}function ti(e){return Kt(e=rt(e),"iterate",Ps),e}function _n(e,t){return Tn(e)?ir(or(e)?un(t):t):un(t)}const hd={__proto__:null,[Symbol.iterator](){return Ji(this,Symbol.iterator,e=>_n(this,e))},concat(...e){return qr(this).concat(...e.map(t=>Le(t)?qr(t):t))},entries(){return Ji(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 Xi(this,"includes",e)},indexOf(...e){return Xi(this,"indexOf",e)},join(e){return qr(this).join(e)},lastIndexOf(...e){return Xi(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 Hl(this,"reduce",e,t)},reduceRight(e,...t){return Hl(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 Ji(this,"values",e=>_n(this,e))}};function Ji(e,t,n){const s=ti(e),o=s[t],a=o.call(s);if(s!==e&&!ln(e)){if(a[Symbol.toStringTag]==="Array Iterator"){const c=Object.create(Object.getPrototypeOf(a));return c.next=()=>ql(a.next(),n),o!==Zu[t]&&Object.defineProperties(c,{return:{get(){const d=a.return;return typeof d=="function"?d.bind(a):d}},throw:{get(){const d=a.throw;return typeof d=="function"?d.bind(a):d}}}),c}a._next=a.next,a.next=()=>ql(a._next(),n)}return a}function ql(e,t){return e.done||(e.value=t(e.value)),e}const Zu=Array.prototype;function In(e,t,n,s,o,a){const c=ti(e),d=c!==e&&!ln(e),h=c[t];if(h!==Zu[t]){const k=h.apply(e,a);return d?un(k):k}let y=n;c!==e&&(d?y=function(k,D){return n.call(this,_n(e,k),D,e)}:n.length>2&&(y=function(k,D){return n.call(this,k,D,e)}));const m=h.call(c,y,s);return d&&o?o(m):m}function Hl(e,t,n,s){const o=ti(e),a=o!==e&&!ln(e);let c=n,d=!1;o!==e&&(a?(d=s.length===0,c=function(y,m,k){return d&&(d=!1,y=_n(e,y)),n.call(this,y,_n(e,m),k,e)}):n.length>3&&(c=function(y,m,k){return n.call(this,y,m,k,e)}));const h=o[t](c,...s);return d?_n(e,h):h}function Xi(e,t,n){const s=rt(e);Kt(s,"iterate",Ps);const o=s[t](...n);return(o===-1||o===!1)&&qa(n[0])?(n[0]=rt(n[0]),s[t](...n)):o}function ps(e,t,n=[]){An(),La();const s=rt(e)[t].apply(e,n);return Ka(),Pn(),s}const vd=Ia("__proto__,__v_isRef,__isVue"),ec=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter($n));function md(e){$n(e)||(e=String(e));const t=rt(this);return Kt(t,"has",e),t.hasOwnProperty(e)}class tc{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?Ed:oc:a?sc:rc).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const c=Le(t);if(!o){let h;if(c&&(h=hd[n]))return h;if(n==="hasOwnProperty")return md}const d=Reflect.get(t,n,Nt(t)?t:s);if(($n(n)?ec.has(n):vd(n))||(o||Kt(t,"get",n),a))return d;if(Nt(d)){const h=c&&Da(n)?d:d.value;return o&&at(h)?pa(h):h}return at(d)?o?pa(d):Ba(d):d}}class nc extends tc{constructor(t=!1){super(!1,t)}set(t,n,s,o){let a=t[n];const c=Le(t)&&Da(n);if(!this._isShallow){const y=Tn(a);if(!ln(s)&&!Tn(s)&&(a=rt(a),s=rt(s)),!c&&Nt(a)&&!Nt(s))return y||(a.value=s),!0}const d=c?Number(n)<t.length:ot(t,n),h=Reflect.set(t,n,s,Nt(t)?t:o);return t===rt(o)&&h&&(d?Cn(s,a)&&Rn(t,"set",n,s):Rn(t,"add",n,s)),h}deleteProperty(t,n){const s=ot(t,n);t[n];const o=Reflect.deleteProperty(t,n);return o&&s&&Rn(t,"delete",n,void 0),o}has(t,n){const s=Reflect.has(t,n);return(!$n(n)||!ec.has(n))&&Kt(t,"has",n),s}ownKeys(t){return Kt(t,"iterate",Le(t)?"length":Pr),Reflect.ownKeys(t)}}class yd extends tc{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const gd=new nc,bd=new yd,wd=new nc(!0);const da=e=>e,go=e=>Reflect.getPrototypeOf(e);function _d(e,t,n){return function(...s){const o=this.__v_raw,a=rt(o),c=rr(a),d=e==="entries"||e===Symbol.iterator&&c,h=e==="keys"&&c,y=o[e](...s),m=n?da:t?ir:un;return!t&&Kt(a,"iterate",h?fa:Pr),Et(Object.create(y),{next(){const{value:k,done:D}=y.next();return D?{value:k,done:D}:{value:d?[m(k[0]),m(k[1])]:m(k),done:D}}})}}function bo(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function kd(e,t){const n={get(o){const a=this.__v_raw,c=rt(a),d=rt(o);e||(Cn(o,d)&&Kt(c,"get",o),Kt(c,"get",d));const{has:h}=go(c),y=t?da:e?ir:un;if(h.call(c,o))return y(a.get(o));if(h.call(c,d))return y(a.get(d));a!==c&&a.get(o)},get size(){const o=this.__v_raw;return!e&&Kt(rt(o),"iterate",Pr),o.size},has(o){const a=this.__v_raw,c=rt(a),d=rt(o);return e||(Cn(o,d)&&Kt(c,"has",o),Kt(c,"has",d)),o===d?a.has(o):a.has(o)||a.has(d)},forEach(o,a){const c=this,d=c.__v_raw,h=rt(d),y=t?da:e?ir:un;return!e&&Kt(h,"iterate",Pr),d.forEach((m,k)=>o.call(a,y(m),y(k),c))}};return Et(n,e?{add:bo("add"),set:bo("set"),delete:bo("delete"),clear:bo("clear")}:{add(o){const a=rt(this),c=go(a),d=rt(o),h=!t&&!ln(o)&&!Tn(o)?d:o;return c.has.call(a,h)||Cn(o,h)&&c.has.call(a,o)||Cn(d,h)&&c.has.call(a,d)||(a.add(h),Rn(a,"add",h,h)),this},set(o,a){!t&&!ln(a)&&!Tn(a)&&(a=rt(a));const c=rt(this),{has:d,get:h}=go(c);let y=d.call(c,o);y||(o=rt(o),y=d.call(c,o));const m=h.call(c,o);return c.set(o,a),y?Cn(a,m)&&Rn(c,"set",o,a):Rn(c,"add",o,a),this},delete(o){const a=rt(this),{has:c,get:d}=go(a);let h=c.call(a,o);h||(o=rt(o),h=c.call(a,o)),d&&d.call(a,o);const y=a.delete(o);return h&&Rn(a,"delete",o,void 0),y},clear(){const o=rt(this),a=o.size!==0,c=o.clear();return a&&Rn(o,"clear",void 0,void 0),c}}),["keys","values","entries",Symbol.iterator].forEach(o=>{n[o]=_d(o,e,t)}),n}function Va(e,t){const n=kd(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 xd={get:Va(!1,!1)},Cd={get:Va(!1,!0)},Sd={get:Va(!0,!1)};const rc=new WeakMap,sc=new WeakMap,oc=new WeakMap,Ed=new WeakMap;function $d(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Ba(e){return Tn(e)?e:Ua(e,!1,gd,xd,rc)}function Ad(e){return Ua(e,!1,wd,Cd,sc)}function pa(e){return Ua(e,!0,bd,Sd,oc)}function Ua(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 c=$d(Qf(e));if(c===0)return e;const d=new Proxy(e,c===2?s:n);return o.set(e,d),d}function or(e){return Tn(e)?or(e.__v_raw):!!(e&&e.__v_isReactive)}function Tn(e){return!!(e&&e.__v_isReadonly)}function ln(e){return!!(e&&e.__v_isShallow)}function qa(e){return e?!!e.__v_raw:!1}function rt(e){const t=e&&e.__v_raw;return t?rt(t):e}function Pd(e){return!ot(e,"__v_skip")&&Object.isExtensible(e)&&Vu(e,"__v_skip",!0),e}const un=e=>at(e)?Ba(e):e,ir=e=>at(e)?pa(e):e;function Nt(e){return e?e.__v_isRef===!0:!1}function N(e){return Td(e,!1)}function Td(e,t){return Nt(e)?e:new Od(e,t)}class Od{constructor(t,n){this.dep=new Na,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:rt(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)||Tn(t);t=s?t:rt(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 Md={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 ic(e){return or(e)?e:new Proxy(e,Md)}class Id{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Na(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)&&dt!==this)return zu(this,!0),!0}get value(){const t=this.dep.track();return Ju(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function jd(e,t,n=!1){let s,o;return ze(e)?s=e:(s=e.get,o=e.set),new Id(s,o,n)}const wo={},Oo=new WeakMap;let Cr;function Dd(e,t=!1,n=Cr){if(n){let s=Oo.get(n);s||Oo.set(n,s=[]),s.push(e)}}function Rd(e,t,n=ct){const{immediate:s,deep:o,once:a,scheduler:c,augmentJob:d,call:h}=n,y=Q=>o?Q:ln(Q)||o===!1||o===0?Ln(Q,1):Ln(Q);let m,k,D,O,K=!1,W=!1;if(Nt(e)?(k=()=>e.value,K=ln(e)):or(e)?(k=()=>y(e),K=!0):Le(e)?(W=!0,K=e.some(Q=>or(Q)||ln(Q)),k=()=>e.map(Q=>{if(Nt(Q))return Q.value;if(or(Q))return y(Q);if(ze(Q))return h?h(Q,2):Q()})):ze(e)?t?k=h?()=>h(e,2):e:k=()=>{if(D){An();try{D()}finally{Pn()}}const Q=Cr;Cr=m;try{return h?h(e,3,[O]):e(O)}finally{Cr=Q}}:k=En,t&&o){const Q=k,le=o===!0?1/0:o;k=()=>Ln(Q(),le)}const de=fd(),Z=()=>{m.stop(),de&&de.active&&ja(de.effects,m)};if(a&&t){const Q=t;t=(...le)=>{try{return Q(...le)}finally{Z()}}}let E=W?new Array(e.length).fill(wo):wo;const L=Q=>{if(!(!(m.flags&1)||!m.dirty&&!Q))if(t){const le=m.run();if(Q||o||K||(W?le.some((ce,ee)=>Cn(ce,E[ee])):Cn(le,E))){const ce=Cr;An();try{D&&D(),Cr=m;const ee=[le,E===wo?void 0:W&&E[0]===wo?[]:E,O];E=le,h?h(t,3,ee):t(...ee)}finally{Cr=ce,Pn()}}}else m.run()};return d&&d(L),m=new Hu(k),m.scheduler=c?()=>c(L,!1):L,O=Q=>Dd(Q,!1,m),D=m.onStop=()=>{const Q=Oo.get(m);if(Q){if(h)h(Q,4);else for(const le of Q)le();Oo.delete(m)}},t?s?L(!0):E=m.run():c?c(L.bind(null,!0),!0):m.run(),Z.pause=m.pause.bind(m),Z.resume=m.resume.bind(m),Z.stop=Z,Z}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<e.length;s++)Ln(e[s],t,n);else if(Bn(e)||rr(e))e.forEach(s=>{Ln(s,t,n)});else if(Fu(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 Ns(e,t,n,s){try{return s?e(...s):e()}catch(o){ni(o,t,n)}}function cn(e,t,n,s){if(ze(e)){const o=Ns(e,t,n,s);return o&&Lu(o)&&o.catch(a=>{ni(a,t,n)}),o}if(Le(e)){const o=[];for(let a=0;a<e.length;a++)o.push(cn(e[a],t,n,s));return o}}function ni(e,t,n,s=!0){const o=t?t.vnode:null,{errorHandler:a,throwUnhandledErrorInProduction:c}=t&&t.appContext.config||ct;if(t){let d=t.parent;const h=t.proxy,y=`https://vuejs.org/error-reference/#runtime-${n}`;for(;d;){const m=d.ec;if(m){for(let k=0;k<m.length;k++)if(m[k](e,h,y)===!1)return}d=d.parent}if(a){An(),Ns(a,null,10,[e,h,y]),Pn();return}}Ld(e,n,o,s,c)}function Ld(e,t,n,s=!0,o=!1){if(o)throw e;console.error(e)}const Wt=[];let pn=-1;const kn=[];let tr=null,Hr=0;const ac=Promise.resolve();let Mo=null;function ts(e){const t=Mo||ac;return e?t.then(this?e.bind(this):e):t}function Kd(e){let t=pn+1,n=Wt.length;for(;t<n;){const s=t+n>>>1,o=Wt[s],a=Ts(o);a<e||a===e&&o.flags&2?t=s+1:n=s}return t}function Ha(e){if(!(e.flags&1)){const t=Ts(e),n=Wt[Wt.length-1];!n||!(e.flags&2)&&t>=Ts(n)?Wt.push(e):Wt.splice(Kd(t),0,e),e.flags|=1,lc()}}function lc(){Mo||(Mo=ac.then(fc))}function Fd(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<e.length;t++)kn.push(e[t]);lc()}function uc(e,t,n,s=pn+1){for(;s<Wt.length;s++){const o=Wt[s];if(o&&o.flags&2){if(e&&o.id!==e.uid||t!==void 0&&!(o.id>=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 cc(e,t,n=0){if(kn.length){let s=kn,o=0;if(t){s=[];for(let c=0;c<kn.length;c++){const d=kn[c];(d.i!==void 0?!d.i||d.i.uid<n:t.has(d))?kn[o++]=d:s.push(d)}}const a=[...new Set(s)].sort((c,d)=>Ts(c)-Ts(d));if(kn.length=o,tr){for(let c=0;c<a.length;c++)tr.push(a[c]);return}for(tr=a,Hr=0;Hr<tr.length;Hr++){const c=tr[Hr];c.flags&4&&(c.flags&=-2),c.flags&8||c(),c.flags&=-2}tr=null,Hr=0}}let Qi=!1;function Nd(e,t){if(Qi){e();return}const n=t===void 0?void 0:new Set(kn);e(),Qi=!0;try{uc(void 0,t),cc(void 0,n,t)}finally{Qi=!1}}const Ts=e=>e.id==null?e.flags&2?-1:1/0:e.id;function fc(e){try{for(pn=0;pn<Wt.length;pn++){const t=Wt[pn];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),Ns(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;pn<Wt.length;pn++){const t=Wt[pn];t&&(t.flags&=-2)}pn=-1,Wt.length=0,cc(),Mo=null,(Wt.length||kn.length)&&fc()}}let an=null,dc=null;function Io(e){const t=an;return an=e,dc=e&&e.type.__scopeId||null,t}function fr(e,t=an,n){if(!t||e._n)return e;const s=(...o)=>{s._d&&Lo(-1);const a=Io(t),c=Tr.length;let d;try{d=e(...o)}finally{for(let h=Tr.length;h>c;h--)Nc();Io(a),s._d&&Lo(1)}return d};return s._n=!0,s._c=!0,s._d=!0,s}function $e(e,t){if(an===null)return e;const n=li(an),s=e.dirs||(e.dirs=[]);for(let o=0;o<t.length;o++){let[a,c,d,h=ct]=t[o];a&&(ze(a)&&(a={mounted:a,updated:a}),a.deep&&Ln(c),s.push({dir:a,instance:n,value:c,oldValue:void 0,arg:d,modifiers:h}))}return e}function _r(e,t,n,s){const o=e.dirs,a=t&&t.dirs;for(let c=0;c<o.length;c++){const d=o[c];a&&(d.oldValue=a[c].value);let h=d.dir[s];h&&(An(),cn(h,n,8,[e.el,d,e,t]),Pn())}}function Vd(e,t){if(zt){let n=zt.provides;const s=zt.parent&&zt.parent.provides;s===n&&(n=zt.provides=Object.create(s)),n[e]=t}}function Eo(e,t,n=!1){const s=Ja();if(s||zr){let o=zr?zr._context.provides:s?s.parent==null||s.ce?s.vnode.appContext&&s.vnode.appContext.provides:s.parent.provides:void 0;if(o&&e in o)return o[e];if(arguments.length>1)return n&&ze(t)?t.call(s&&s.proxy):t}}const Bd=Symbol.for("v-scx"),Ud=()=>Eo(Bd);function gt(e,t,n){return pc(e,t,n)}function pc(e,t,n=ct){const{immediate:s,deep:o,flush:a,once:c}=n,d=Et({},n),h=t&&s||!t&&a!=="post";let y;if(Rs){if(a==="sync"){const O=Ud();y=O.__watcherHandles||(O.__watcherHandles=[])}else if(!h){const O=()=>{};return O.stop=En,O.resume=En,O.pause=En,O}}const m=zt;d.call=(O,K,W)=>cn(O,m,K,W);let k=!1;a==="post"?d.scheduler=O=>{O.i=m,Ht(O,m&&m.suspense)}:a!=="sync"&&(k=!0,d.scheduler=(O,K)=>{K?O():Ha(O)}),d.augmentJob=O=>{t&&(O.flags|=4),k&&(O.flags|=2,m&&(O.id=m.uid,O.i=m))};const D=Rd(e,t,d);return Rs&&(y?y.push(D):h&&D()),D}function qd(e,t,n){const s=this.proxy,o=bt(e)?e.includes(".")?hc(s,e):()=>s[e]:e.bind(s,s);let a;ze(t)?a=t:(a=t.handler,n=t);const c=Bs(this),d=pc(o,a.bind(s),n);return c(),d}function hc(e,t){const n=t.split(".");return()=>{let s=e;for(let o=0;o<n.length&&s;o++)s=s[n[o]];return s}}const Zn=new WeakMap,vc=Symbol("_vte"),ri=e=>e.__isTeleport,Er=e=>e&&(e.disabled||e.disabled===""),Hd=e=>e&&(e.defer||e.defer===""),Wl=e=>typeof SVGElement<"u"&&e instanceof SVGElement,zl=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,ha=(e,t)=>{const n=e&&e.to;return bt(n)?t?t(n):null:n},Wd={name:"Teleport",__isTeleport:!0,process(e,t,n,s,o,a,c,d,h,y){const{mc:m,pc:k,pbc:D,o:{insert:O,querySelector:K,createText:W,createComment:de,parentNode:Z}}=y,E=Er(t.props);let{dynamicChildren:L}=t;const Q=(ee,A,x)=>{ee.shapeFlag&16&&m(ee.children,A,x,o,a,c,d,h)},le=(ee=t)=>{const A=Er(ee.props),x=ee.target=ha(ee.props,K),ie=va(x,ee,W,O);x&&(c!=="svg"&&Wl(x)?c="svg":c!=="mathml"&&zl(x)&&(c="mathml"),o&&o.isCE&&(o.ce._teleportTargets||(o.ce._teleportTargets=new Set)).add(x),A||(Q(ee,x,ie),ms(ee,!1)))},ce=ee=>{const A=()=>{if(Zn.get(ee)===A){if(Zn.delete(ee),Er(ee.props)){const x=Z(ee.el)||n;Q(ee,x,ee.anchor),ms(ee,!0)}le(ee)}};Zn.set(ee,A),Ht(A,a)};if(e==null){const ee=t.el=W(""),A=t.anchor=W("");if(O(ee,n,s),O(A,n,s),Hd(t.props)||a&&a.pendingBranch){ce(t);return}E&&(Q(t,n,A),ms(t,!0)),le()}else{t.el=e.el;const ee=t.anchor=e.anchor,A=Zn.get(e);if(A){A.flags|=8,Zn.delete(e),ce(t);return}t.targetStart=e.targetStart;const x=t.target=e.target,ie=t.targetAnchor=e.targetAnchor,xe=Er(e.props),J=xe?n:x,Ce=xe?ee:ie;if(c==="svg"||Wl(x)?c="svg":(c==="mathml"||zl(x))&&(c="mathml"),L?(D(e.dynamicChildren,L,J,o,a,c,d),Ya(e,t,!0)):h||k(e,t,J,Ce,o,a,c,d,!1),E)xe?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):_o(t,n,ee,y,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const Ke=ha(t.props,K);Ke&&(t.target=Ke,_o(t,Ke,null,y,0))}else xe&&_o(t,x,ie,y,1);ms(t,E)}},remove(e,t,n,{um:s,o:{remove:o}},a){const{shapeFlag:c,children:d,anchor:h,targetStart:y,targetAnchor:m,target:k,props:D}=e,O=Er(D),K=a||!O,W=Zn.get(e);if(W&&(W.flags|=8,Zn.delete(e)),k&&(o(y),o(m)),a&&o(h),!W&&(O||k)&&c&16)for(let de=0;de<d.length;de++){const Z=d[de];s(Z,t,n,K,!!Z.dynamicChildren)}},move:_o,hydrate:zd};function _o(e,t,n,{o:{insert:s},m:o},a=2){a===0&&(e.targetStart&&s(e.targetStart,t,n),s(e.targetAnchor,t,n),n=e.targetAnchor);const{el:c,anchor:d,shapeFlag:h,children:y,props:m}=e,k=a===2;if(k&&s(c,t,n),!Zn.has(e)&&(!k||Er(m))&&h&16)for(let D=0;D<y.length;D++)o(y[D],t,n,2);k&&s(d,t,n)}function zd(e,t,n,s,o,a,{o:{nextSibling:c,parentNode:d,querySelector:h,insert:y,createText:m}},k){function D(de,Z){let E=Z;for(;E;){if(E&&E.nodeType===8){if(E.data==="teleport start anchor")t.targetStart=E;else if(E.data==="teleport anchor"){t.targetAnchor=E,de._lpa=t.targetAnchor&&c(t.targetAnchor);break}}E=c(E)}}function O(de,Z){Z.anchor=k(c(de),Z,d(de),n,s,o,a)}const K=t.target=ha(t.props,h),W=Er(t.props);if(K){const de=K._lpa||K.firstChild;t.shapeFlag&16&&(W?(O(e,t),D(K,de),t.targetAnchor||va(K,t,m,y,d(e)===K?e:null)):(t.anchor=c(e),D(K,de),t.targetAnchor||va(K,t,m,y),k(de&&c(de),t,K,n,s,o,a))),ms(t,W)}else W&&t.shapeFlag&16&&(O(e,t),t.targetStart=e,t.targetAnchor=c(e));return t.anchor&&c(t.anchor)}const Vs=Wd;function ms(e,t){const n=e.ctx;if(n&&n.ut){let s,o;for(t?(s=e.el,o=e.anchor):(s=e.targetStart,o=e.targetAnchor);s&&s!==o;)s.nodeType===1&&s.setAttribute("data-v-owner",n.uid),s=s.nextSibling;n.ut()}}function va(e,t,n,s,o=null){const a=t.targetStart=n(""),c=t.targetAnchor=n("");return a[vc]=c,e&&(s(a,e,o),s(c,e,o)),c}const on=Symbol("_leaveCb"),hs=Symbol("_enterCb");function mc(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return fn(()=>{e.isMounted=!0}),xc(()=>{e.isUnmounting=!0}),e}const sn=[Function,Array],yc={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},Gd={name:"BaseTransition",props:yc,setup(e,{slots:t}){const n=Ja(),s=mc();return()=>{const o=t.default&&Wa(t.default(),!0),a=o&&o.length?gc(o):n.subTree?Ee():void 0;if(!a)return;const c=rt(e),{mode:d}=c;if(s.isLeaving)return Zi(a);const h=jo(a);if(!h)return Zi(a);let y=Os(h,c,s,n,k=>y=k);h.type!==Ft&&ar(h,y);let m=n.subTree&&jo(n.subTree);if(m&&m.type!==Ft&&!$r(m,h)&&Ms(n.subTree)){let k=Os(m,c,s,n);if(ar(m,k),d==="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},Zi(a);d==="in-out"&&h.type!==Ft?k.delayLeave=(D,O,K)=>{const W=bc(s,m);W[String(m.key)]=m,D[on]=()=>{O(),D[on]=void 0,delete y.delayedLeave,m=void 0},y.delayedLeave=()=>{K(),delete y.delayedLeave,m=void 0}}:m=void 0}else m&&(m=void 0);return a}}};function gc(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==Ft){t=n;break}}return t}const Yd=Gd;function bc(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:c,persisted:d=!1,onBeforeEnter:h,onEnter:y,onAfterEnter:m,onEnterCancelled:k,onBeforeLeave:D,onLeave:O,onAfterLeave:K,onLeaveCancelled:W,onBeforeAppear:de,onAppear:Z,onAfterAppear:E,onAppearCancelled:L}=t,Q=String(e.key),le=bc(n,e),ce=(x,ie)=>{x&&cn(x,s,9,ie)},ee=(x,ie)=>{const xe=ie[1];ce(x,ie),Le(x)?x.every(J=>J.length<=1)&&xe():x.length<=1&&xe()},A={mode:c,persisted:d,beforeEnter(x){let ie=h;if(!n.isMounted)if(a)ie=de||h;else return;x[on]&&x[on](!0);const xe=le[Q];if(xe&&$r(e,xe)){let J=xe.el[on];if(!J){const Ce=Ms(xe);J=Ce&&Ce.el[on]}J&&J()}ce(ie,[x])},enter(x){if(le[Q]===e)return;let ie=y,xe=m,J=k;if(!n.isMounted)if(a)ie=Z||y,xe=E||m,J=L||k;else return;let Ce=!1;x[hs]=Xe=>{Ce||(Ce=!0,Xe?ce(J,[x]):ce(xe,[x]),A.delayedLeave&&A.delayedLeave(),x[hs]=void 0)};const Ke=x[hs].bind(null,!1);ie?ee(ie,[x,Ke]):Ke()},leave(x,ie){const xe=String(e.key);if(x[hs]&&x[hs](!0),n.isUnmounting)return ie();ce(D,[x]);let J=!1;x[on]=Ke=>{J||(J=!0,ie(),Ke?ce(W,[x]):ce(K,[x]),x[on]=void 0,le[xe]===e&&delete le[xe])};const Ce=x[on].bind(null,!1);le[xe]=e,O?ee(O,[x,Ce]):Ce()},clone(x){const ie=Os(x,t,n,s,o);return o&&o(ie),ie}};return A}function Zi(e){if(si(e))return e=lr(e),e.children=null,e}function jo(e){if(!si(e))return ri(e.type)&&e.children?gc(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&ze(n.default))return n.default()}}function ar(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;const n=e.component.subTree;ar(ri(n.type)&&jo(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=Ac(e.children,!1);n&&ar(n,t)}}function Wa(e,t=!1,n){let s=[],o=0;for(let a=0;a<e.length;a++){let c=e[a];const d=n==null?c.key:String(n)+String(c.key!=null?c.key:a);c.type===Re?(c.patchFlag&128&&o++,s=s.concat(Wa(c.children,t,d))):(t||c.type!==Ft)&&s.push(d!=null?lr(c,{key:d}):c)}if(o>1)for(let a=0;a<s.length;a++)s[a].patchFlag=-2;return s}function Ms(e){if(e.component)return Ms(e.component.subTree);if(e.type===Re){const t=Le(e.children)&&Ac(e.children,!1);return t?Ms(t):void 0}if(e.type!==Ft)return e}function Vt(e,t){return ze(e)?Et({name:e.name},t,{setup:e}):e}function wc(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Gl(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const Do=new WeakMap;function ks(e,t,n,s,o=!1){if(Le(e)){e.forEach((W,de)=>ks(W,t&&(Le(t)?t[de]: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?li(s.component):s.el,c=o?null:a,{i:d,r:h}=e,y=t&&t.r,m=d.refs===ct?d.refs={}:d.refs,k=d.setupState,D=rt(k),O=k===ct?Ru:W=>Gl(m,W)?!1:ot(D,W),K=(W,de)=>!(de&&Gl(m,de));if(y!=null&&y!==h){if(Yl(t),bt(y))m[y]=null,O(y)&&(k[y]=null);else if(Nt(y)){const W=t;K(y,W.k)&&(y.value=null),W.k&&(m[W.k]=null)}}if(ze(h))Ns(h,d,12,[c,m]);else{const W=bt(h),de=Nt(h);if(W||de){const Z=()=>{if(e.f){const E=W?O(h)?k[h]:m[h]:K()||!e.k?h.value:m[e.k];if(o)Le(E)&&ja(E,a);else if(Le(E))E.includes(a)||E.push(a);else if(W)m[h]=[a],O(h)&&(k[h]=m[h]);else{const L=[a];K(h,e.k)&&(h.value=L),e.k&&(m[e.k]=L)}}else W?(m[h]=c,O(h)&&(k[h]=c)):de&&(K(h,e.k)&&(h.value=c),e.k&&(m[e.k]=c))};if(c){const E=()=>{Z(),Do.delete(e)};E.id=-1,Do.set(e,E),Ht(E,n)}else Yl(e),Z()}}}function Yl(e){const t=Do.get(e);t&&(t.flags|=8,Do.delete(e))}ei().requestIdleCallback;ei().cancelIdleCallback;const xs=e=>!!e.type.__asyncLoader,si=e=>e.type.__isKeepAlive;function Jd(e,t){_c(e,"a",t)}function Xd(e,t){_c(e,"da",t)}function _c(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(oi(t,s,n),n){let o=n.parent;for(;o&&o.parent;)si(o.parent.vnode)&&Qd(s,t,n,o),o=o.parent}}function Qd(e,t,n,s){const o=oi(t,e,s,!0);dr(()=>{ja(s[t],o)},n)}function oi(e,t,n=zt,s=!1){if(n){const o=n[e]||(n[e]=[]),a=t.__weh||(t.__weh=(...c)=>{An();const d=Bs(n),h=cn(t,n,e,c);return d(),Pn(),h});return s?o.unshift(a):o.push(a),a}}const qn=e=>(t,n=zt)=>{(!Rs||e==="sp")&&oi(e,(...s)=>t(...s),n)},Zd=qn("bm"),fn=qn("m"),ep=qn("bu"),kc=qn("u"),xc=qn("bum"),dr=qn("um"),tp=qn("sp"),np=qn("rtg"),rp=qn("rtc");function sp(e,t=zt){oi("ec",e,t)}const op=Symbol.for("v-ndc");function ut(e,t,n,s){let o;const a=n,c=Le(e);if(c||bt(e)){const d=c&&or(e);let h=!1,y=!1;d&&(h=!ln(e),y=Tn(e),e=ti(e)),o=new Array(e.length);for(let m=0,k=e.length;m<k;m++)o[m]=t(h?y?ir(un(e[m])):un(e[m]):e[m],m,void 0,a)}else if(typeof e=="number")if(!Number.isInteger(e)||e<0)o=[];else{o=new Array(e);for(let d=0;d<e;d++)o[d]=t(d+1,d,void 0,a)}else if(at(e))if(e[Symbol.iterator])o=Array.from(e,(d,h)=>t(d,h,void 0,a));else{const d=Object.keys(e);o=new Array(d.length);for(let h=0,y=d.length;h<y;h++){const m=d[h];o[h]=t(e[m],m,h,a)}}else o=[];return o}const ma=e=>e?qc(e)?li(e):ma(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=>ma(e.parent),$root:e=>ma(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Sc(e),$forceUpdate:e=>e.f||(e.f=()=>{Ha(e.update)}),$nextTick:e=>e.n||(e.n=ts.bind(e.proxy)),$watch:e=>qd.bind(e)}),ea=(e,t)=>e!==ct&&!e.__isScriptSetup&&ot(e,t),ip={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:o,props:a,accessCache:c,type:d,appContext:h}=e;if(t[0]!=="$"){const D=c[t];if(D!==void 0)switch(D){case 1:return s[t];case 2:return o[t];case 4:return n[t];case 3:return a[t]}else{if(ea(s,t))return c[t]=1,s[t];if(o!==ct&&ot(o,t))return c[t]=2,o[t];if(ot(a,t))return c[t]=3,a[t];if(n!==ct&&ot(n,t))return c[t]=4,n[t];ya&&(c[t]=0)}}const y=Cs[t];let m,k;if(y)return t==="$attrs"&&Kt(e.attrs,"get",""),y(e);if((m=d.__cssModules)&&(m=m[t]))return m;if(n!==ct&&ot(n,t))return c[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 ea(o,t)?(o[t]=n,!0):s!==ct&&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:c}},d){let h;return!!(n[d]||e!==ct&&d[0]!=="$"&&ot(e,d)||ea(t,d)||ot(a,d)||ot(s,d)||ot(Cs,d)||ot(o.config.globalProperties,d)||(h=c.__cssModules)&&h[d])},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 Jl(e){return Le(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let ya=!0;function ap(e){const t=Sc(e),n=e.proxy,s=e.ctx;ya=!1,t.beforeCreate&&Xl(t.beforeCreate,e,"bc");const{data:o,computed:a,methods:c,watch:d,provide:h,inject:y,created:m,beforeMount:k,mounted:D,beforeUpdate:O,updated:K,activated:W,deactivated:de,beforeDestroy:Z,beforeUnmount:E,destroyed:L,unmounted:Q,render:le,renderTracked:ce,renderTriggered:ee,errorCaptured:A,serverPrefetch:x,expose:ie,inheritAttrs:xe,components:J,directives:Ce,filters:Ke}=t;if(y&&lp(y,s,null),c)for(const Ue in c){const ge=c[Ue];ze(ge)&&(s[Ue]=ge.bind(n))}if(o){const Ue=o.call(n,n);at(Ue)&&(e.data=Ba(Ue))}if(ya=!0,a)for(const Ue in a){const ge=a[Ue],Me=ze(ge)?ge.bind(n,n):ze(ge.get)?ge.get.bind(n,n):En,Fe=!ze(ge)&&ze(ge.set)?ge.set.bind(n):En,fe=it({get:Me,set:Fe});Object.defineProperty(s,Ue,{enumerable:!0,configurable:!0,get:()=>fe.value,set:G=>fe.value=G})}if(d)for(const Ue in d)Cc(d[Ue],s,n,Ue);if(h){const Ue=ze(h)?h.call(n):h;Reflect.ownKeys(Ue).forEach(ge=>{Vd(ge,Ue[ge])})}m&&Xl(m,e,"c");function He(Ue,ge){Le(ge)?ge.forEach(Me=>Ue(Me.bind(n))):ge&&Ue(ge.bind(n))}if(He(Zd,k),He(fn,D),He(ep,O),He(kc,K),He(Jd,W),He(Xd,de),He(sp,A),He(rp,ce),He(np,ee),He(xc,E),He(dr,Q),He(tp,x),Le(ie))if(ie.length){const Ue=e.exposed||(e.exposed={});ie.forEach(ge=>{Object.defineProperty(Ue,ge,{get:()=>n[ge],set:Me=>n[ge]=Me,enumerable:!0})})}else e.exposed||(e.exposed={});le&&e.render===En&&(e.render=le),xe!=null&&(e.inheritAttrs=xe),J&&(e.components=J),Ce&&(e.directives=Ce),x&&wc(e)}function lp(e,t,n=En){Le(e)&&(e=ga(e));for(const s in e){const o=e[s];let a;at(o)?"default"in o?a=Eo(o.from||s,o.default,!0):a=Eo(o.from||s):a=Eo(o),Nt(a)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>a.value,set:c=>a.value=c}):t[s]=a}}function Xl(e,t,n){cn(Le(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function Cc(e,t,n,s){let o=s.includes(".")?hc(n,s):()=>n[s];if(bt(e)){const a=t[e];ze(a)&&gt(o,a)}else if(ze(e))gt(o,e.bind(n));else if(at(e))if(Le(e))e.forEach(a=>Cc(a,t,n,s));else{const a=ze(e.handler)?e.handler.bind(n):t[e.handler];ze(a)&&gt(o,a,e)}}function Sc(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:o,optionsCache:a,config:{optionMergeStrategies:c}}=e.appContext,d=a.get(t);let h;return d?h=d:!o.length&&!n&&!s?h=t:(h={},o.length&&o.forEach(y=>Ro(h,y,c,!0)),Ro(h,t,c)),at(t)&&a.set(t,h),h}function Ro(e,t,n,s=!1){const{mixins:o,extends:a}=t;a&&Ro(e,a,n,!0),o&&o.forEach(c=>Ro(e,c,n,!0));for(const c in t)if(!(s&&c==="expose")){const d=up[c]||n&&n[c];e[c]=d?d(e[c],t[c]):t[c]}return e}const up={data:Ql,props:Zl,emits:Zl,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:fp,provide:Ql,inject:cp};function Ql(e,t){return t?e?function(){return Et(ze(e)?e.call(this,this):e,ze(t)?t.call(this,this):t)}:t:e}function cp(e,t){return ys(ga(e),ga(t))}function ga(e){if(Le(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function qt(e,t){return e?[...new Set([].concat(e,t))]:t}function ys(e,t){return e?Et(Object.create(null),e,t):t}function Zl(e,t){return e?Le(e)&&Le(t)?[...new Set([...e,...t])]:Et(Object.create(null),Jl(e),Jl(t??{})):t}function fp(e,t){if(!e)return t;if(!t)return e;const n=Et(Object.create(null),e);for(const s in t)n[s]=qt(e[s],t[s]);return n}function Ec(){return{app:null,config:{isNativeTag:Ru,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let dp=0;function pp(e,t){return function(s,o=null){ze(s)||(s=Et({},s)),o!=null&&!at(o)&&(o=null);const a=Ec(),c=new WeakSet,d=[];let h=!1;const y=a.app={_uid:dp++,_component:s,_props:o,_container:null,_context:a,_instance:null,version:Hp,get config(){return a.config},set config(m){},use(m,...k){return c.has(m)||(m&&ze(m.install)?(c.add(m),m.install(y,...k)):ze(m)&&(c.add(m),m(y,...k))),y},mixin(m){return a.mixins.includes(m)||a.mixins.push(m),y},component(m,k){return k?(a.components[m]=k,y):a.components[m]},directive(m,k){return k?(a.directives[m]=k,y):a.directives[m]},mount(m,k,D){if(!h){const O=y._ceVNode||Oe(s,o);return O.appContext=a,D===!0?D="svg":D===!1&&(D=void 0),e(O,m,D),h=!0,y._container=m,m.__vue_app__=y,li(O.component)}},onUnmount(m){d.push(m)},unmount(){h&&(cn(d,y._instance,16),e(null,y._container),delete y._container.__vue_app__)},provide(m,k){return a.provides[m]=k,y},runWithContext(m){const k=zr;zr=y;try{return m()}finally{zr=k}}};return y}}let zr=null;const hp=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${hn(t)}Modifiers`]||e[`${cr(t)}Modifiers`];function vp(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||ct;let o=n;const a=t.startsWith("update:"),c=a&&hp(s,t.slice(7));c&&(c.trim&&(o=n.map(m=>bt(m)?m.trim():m)),c.number&&(o=o.map(Zo)));let d,h=s[d=zi(t)]||s[d=zi(hn(t))];!h&&a&&(h=s[d=zi(cr(t))]),h&&cn(h,e,6,o);const y=s[d+"Once"];if(y){if(!e.emitted)e.emitted={};else if(e.emitted[d])return;e.emitted[d]=!0,cn(y,e,6,o)}}const mp=new WeakMap;function $c(e,t,n=!1){const s=n?mp:t.emitsCache,o=s.get(e);if(o!==void 0)return o;const a=e.emits;let c={},d=!1;if(!ze(e)){const h=y=>{const m=$c(y,t,!0);m&&(d=!0,Et(c,m))};!n&&t.mixins.length&&t.mixins.forEach(h),e.extends&&h(e.extends),e.mixins&&e.mixins.forEach(h)}return!a&&!d?(at(e)&&s.set(e,null),null):(Le(a)?a.forEach(h=>c[h]=null):Et(c,a),at(e)&&s.set(e,c),c)}function ii(e,t){return!e||!Jo(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),ot(e,t[0].toLowerCase()+t.slice(1))||ot(e,cr(t))||ot(e,t))}function eu(e){const{type:t,vnode:n,proxy:s,withProxy:o,propsOptions:[a],slots:c,attrs:d,emit:h,render:y,renderCache:m,props:k,data:D,setupState:O,ctx:K,inheritAttrs:W}=e,de=Io(e);let Z,E;try{if(n.shapeFlag&4){const Q=o||s,le=Q;Z=xn(y.call(le,Q,m,k,O,D,K)),E=d}else{const Q=t;Z=xn(Q.length>1?Q(k,{attrs:d,slots:c,emit:h}):Q(k,null)),E=t.props?d:yp(d)}}catch(Q){Tr.length=0,ni(Q,e,1),Z=Oe(Ft)}let L=Z;if(E&&W!==!1){const Q=Object.keys(E),{shapeFlag:le}=L;Q.length&&le&7&&(a&&Q.some(Xo)&&(E=gp(E,a)),L=lr(L,E,!1,!0))}if(n.dirs&&(L=lr(L,null,!1,!0),L.dirs=L.dirs?L.dirs.concat(n.dirs):n.dirs),n.transition){const Q=ri(L.type)&&jo(L)||L;ar(Q,n.transition)}return Z=L,Io(de),Z}function Ac(e,t=!0){let n;for(let s=0;s<e.length;s++){const o=e[s];if(js(o)){if(o.type!==Ft||o.children==="v-if"){if(n)return;n=o}}else return}return n}const yp=e=>{let t;for(const n in e)(n==="class"||n==="style"||Jo(n))&&((t||(t={}))[n]=e[n]);return t},gp=(e,t)=>{const n={};for(const s in e)(!Xo(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function bp(e,t,n){const{props:s,children:o,component:a}=e,{props:c,children:d,patchFlag:h}=t,y=a.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&h>=0){if(h&1024)return!0;if(h&16)return s?tu(s,c,y):!!c;if(h&8){const m=t.dynamicProps;for(let k=0;k<m.length;k++){const D=m[k];if(Pc(c,s,D)&&!ii(y,D))return!0}}}else return(o||d)&&(!d||!d.$stable)?!0:s===c?!1:s?c?tu(s,c,y):!0:!!c;return!1}function tu(e,t,n){const s=Object.keys(t);if(s.length!==Object.keys(e).length)return!0;for(let o=0;o<s.length;o++){const a=s[o];if(!ot(e,a)||Pc(t,e,a)&&!ii(n,a))return!0}return!1}function Pc(e,t,n){const s=e[n],o=t[n];return n==="style"&&at(s)&&at(o)?!Un(s,o):s!==o}function wp({vnode:e,parent:t,suspense:n},s){for(;t;){const o=t.subTree;if(o.suspense&&o.suspense.activeBranch===e&&(o.suspense.vnode.el=o.el=s,e=o),o===e)(e=t.vnode).el=s,t=t.parent;else break}n&&n.activeBranch===e&&(n.vnode.el=s)}const Tc={},Oc=()=>Object.create(Tc),Mc=e=>Object.getPrototypeOf(e)===Tc;function _p(e,t,n,s=!1){const o={},a=Oc();e.propsDefaults=Object.create(null),Ic(e,t,o,a);for(const c in e.propsOptions[0])c in o||(o[c]=void 0);n?e.props=s?o:Ad(o):e.type.props?e.props=o:e.props=a,e.attrs=a}function kp(e,t,n,s){const{props:o,attrs:a,vnode:{patchFlag:c}}=e,d=rt(o),[h]=e.propsOptions;let y=!1;if((s||c>0)&&!(c&16)){if(c&8){const m=e.vnode.dynamicProps;for(let k=0;k<m.length;k++){let D=m[k];if(ii(e.emitsOptions,D))continue;const O=t[D];if(h)if(ot(a,D))O!==a[D]&&(a[D]=O,y=!0);else{const K=hn(D);o[K]=ba(h,d,K,O,e,!1)}else O!==a[D]&&(a[D]=O,y=!0)}}}else{Ic(e,t,o,a)&&(y=!0);let m;for(const k in d)(!t||!ot(t,k)&&((m=cr(k))===k||!ot(t,m)))&&(h?n&&(n[k]!==void 0||n[m]!==void 0)&&(o[k]=ba(h,d,k,void 0,e,!0)):delete o[k]);if(a!==d)for(const k in a)(!t||!ot(t,k))&&(delete a[k],y=!0)}y&&Rn(e.attrs,"set","")}function Ic(e,t,n,s){const[o,a]=e.propsOptions;let c=!1,d;if(t)for(let h in t){if(bs(h))continue;const y=t[h];let m;o&&ot(o,m=hn(h))?!a||!a.includes(m)?n[m]=y:(d||(d={}))[m]=y:ii(e.emitsOptions,h)||(!(h in s)||y!==s[h])&&(s[h]=y,c=!0)}if(a){const h=rt(n),y=d||ct;for(let m=0;m<a.length;m++){const k=a[m];n[k]=ba(o,h,k,y[k],e,!ot(y,k))}}return c}function ba(e,t,n,s,o,a){const c=e[n];if(c!=null){const d=ot(c,"default");if(d&&s===void 0){const h=c.default;if(c.type!==Function&&!c.skipFactory&&ze(h)){const{propsDefaults:y}=o;if(n in y)s=y[n];else{const m=Bs(o);s=y[n]=h.call(null,t),m()}}else s=h;o.ce&&o.ce._setProp(n,s)}c[0]&&(a&&!d?s=!1:c[1]&&(s===""||s===cr(n))&&(s=!0))}return s}const xp=new WeakMap;function jc(e,t,n=!1){const s=n?xp:t.propsCache,o=s.get(e);if(o)return o;const a=e.props,c={},d=[];let h=!1;if(!ze(e)){const m=k=>{h=!0;const[D,O]=jc(k,t,!0);Et(c,D),O&&d.push(...O)};!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;m<a.length;m++){const k=hn(a[m]);nu(k)&&(c[k]=ct)}else if(a)for(const m in a){const k=hn(m);if(nu(k)){const D=a[m],O=c[k]=Le(D)||ze(D)?{type:D}:Et({},D),K=O.type;let W=!1,de=!0;if(Le(K))for(let Z=0;Z<K.length;++Z){const E=K[Z],L=ze(E)&&E.name;if(L==="Boolean"){W=!0;break}else L==="String"&&(de=!1)}else W=ze(K)&&K.name==="Boolean";O[0]=W,O[1]=de,(W||ot(O,"default"))&&d.push(k)}}const y=[c,d];return at(e)&&s.set(e,y),y}function nu(e){return e[0]!=="$"&&!bs(e)}const za=e=>e==="_"||e==="_ctx"||e==="$stable",Ga=e=>Le(e)?e.map(xn):[xn(e)],Cp=(e,t,n)=>{if(t._n)return t;const s=fr((...o)=>Ga(t(...o)),n);return s._c=!1,s},Dc=(e,t,n)=>{const s=e._ctx;for(const o in e){if(za(o))continue;const a=e[o];if(ze(a))t[o]=Cp(o,a,s);else if(a!=null){const c=Ga(a);t[o]=()=>c}}},Rc=(e,t)=>{const n=Ga(t);e.slots.default=()=>n},Lc=(e,t,n)=>{for(const s in t)(n||!za(s))&&(e[s]=t[s])},Sp=(e,t,n)=>{const s=e.slots=Oc();if(e.vnode.shapeFlag&32){const o=t._;o?(Lc(s,t,n),n&&Vu(s,"_",o,!0)):Dc(t,s)}else t&&Rc(e,t)},Ep=(e,t,n)=>{const{vnode:s,slots:o}=e;let a=!0,c=ct;if(s.shapeFlag&32){const d=t._;d?n&&d===1?a=!1:Lc(o,t,n):(a=!t.$stable,Dc(t,o)),c=t}else t&&(Rc(e,t),c={default:1});if(a)for(const d in o)!za(d)&&c[d]==null&&delete o[d]},Ht=Op;function $p(e){return Ap(e)}function Ap(e,t){const n=ei();n.__VUE__=!0;const{insert:s,remove:o,patchProp:a,createElement:c,createText:d,createComment:h,setText:y,setElementText:m,parentNode:k,nextSibling:D,setScopeId:O=En,insertStaticContent:K}=e,W=(w,g,P,ae=null,se=null,ue=null,ye=void 0,oe=null,we=!!g.dynamicChildren)=>{if(w===g)return;w&&!$r(w,g)&&(ae=ht(w),G(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:H,ref:U,shapeFlag:Y}=g;switch(H){case ai:de(w,g,P,ae);break;case Ft:Z(w,g,P,ae);break;case $o:w==null&&E(g,P,ae,ye);break;case Re:J(w,g,P,ae,se,ue,ye,oe,we);break;default:Y&1?le(w,g,P,ae,se,ue,ye,oe,we):Y&6?Ce(w,g,P,ae,se,ue,ye,oe,we):(Y&64||Y&128)&&H.process(w,g,P,ae,se,ue,ye,oe,we,Jt)}U!=null&&se?ks(U,w&&w.ref,ue,g||w,!g):U==null&&w&&w.ref!=null&&ks(w.ref,null,ue,w,!0)},de=(w,g,P,ae)=>{if(w==null)s(g.el=d(g.children),P,ae);else{const se=g.el=w.el;g.children!==w.children&&y(se,g.children)}},Z=(w,g,P,ae)=>{w==null?s(g.el=h(g.children||""),P,ae):g.el=w.el},E=(w,g,P,ae)=>{[w.el,w.anchor]=K(w.children,g,P,ae,w.el,w.anchor)},L=({el:w,anchor:g},P,ae)=>{let se;for(;w&&w!==g;)se=D(w),s(w,P,ae),w=se;s(g,P,ae)},Q=({el:w,anchor:g})=>{let P;for(;w&&w!==g;)P=D(w),o(w),w=P;o(g)},le=(w,g,P,ae,se,ue,ye,oe,we)=>{if(g.type==="svg"?ye="svg":g.type==="math"&&(ye="mathml"),w==null)ce(g,P,ae,se,ue,ye,oe,we);else{const H=w.el&&w.el._isVueCE?w.el:null;try{H&&H._beginPatch(),x(w,g,se,ue,ye,oe,we)}finally{H&&H._endPatch()}}},ce=(w,g,P,ae,se,ue,ye,oe)=>{let we,H;const{props:U,shapeFlag:Y,transition:Ae,dirs:Ne}=w;if(we=w.el=c(w.type,ue,U&&U.is,U),Y&8?m(we,w.children):Y&16&&A(w.children,we,null,ae,se,ta(w,ue),ye,oe),Ne&&_r(w,null,ae,"created"),ee(we,w,w.scopeId,ye,ae),U){for(const Ye in U)Ye!=="value"&&!bs(Ye)&&a(we,Ye,null,U[Ye],ue,ae);"value"in U&&a(we,"value",null,U.value,ue),(H=U.onVnodeBeforeMount)&&gn(H,ae,w)}Ne&&_r(w,null,ae,"beforeMount");const Je=Pp(se,Ae);Je&&Ae.beforeEnter(we),s(we,g,P),((H=U&&U.onVnodeMounted)||Je||Ne)&&Ht(()=>{try{H&&gn(H,ae,w),Je&&Ae.enter(we),Ne&&_r(w,null,ae,"mounted")}finally{}},se)},ee=(w,g,P,ae,se)=>{if(P&&O(w,P),ae)for(let ue=0;ue<ae.length;ue++)O(w,ae[ue]);if(se){let ue=se.subTree;if(g===ue||Fc(ue.type)&&(ue.ssContent===g||ue.ssFallback===g)){const ye=se.vnode;ee(w,ye,ye.scopeId,ye.slotScopeIds,se.parent)}}},A=(w,g,P,ae,se,ue,ye,oe,we=0)=>{for(let H=we;H<w.length;H++){const U=w[H]=oe?Dn(w[H]):xn(w[H]);W(null,U,g,P,ae,se,ue,ye,oe)}},x=(w,g,P,ae,se,ue,ye)=>{const oe=g.el=w.el;let{patchFlag:we,dynamicChildren:H,dirs:U}=g;we|=w.patchFlag&16;const Y=w.props||ct,Ae=g.props||ct;let Ne;if(P&&kr(P,!1),(Ne=Ae.onVnodeBeforeUpdate)&&gn(Ne,P,g,w),U&&_r(g,w,P,"beforeUpdate"),P&&kr(P,!0),H&&(!w.dynamicChildren||w.dynamicChildren.length!==H.length)&&(we=0,ye=!1,H=null),(Y.innerHTML&&Ae.innerHTML==null||Y.textContent&&Ae.textContent==null)&&m(oe,""),H?ie(w.dynamicChildren,H,oe,P,ae,ta(g,se),ue):ye||ge(w,g,oe,null,P,ae,ta(g,se),ue,!1),we>0){if(we&16)xe(oe,Y,Ae,P,se);else if(we&2&&Y.class!==Ae.class&&a(oe,"class",null,Ae.class,se),we&4&&a(oe,"style",Y.style,Ae.style,se),we&8){const Je=g.dynamicProps;for(let Ye=0;Ye<Je.length;Ye++){const Qe=Je[Ye],vt=Y[Qe],_t=Ae[Qe];(_t!==vt||Qe==="value")&&a(oe,Qe,vt,_t,se,P)}}we&1&&w.children!==g.children&&m(oe,g.children)}else!ye&&H==null&&xe(oe,Y,Ae,P,se);((Ne=Ae.onVnodeUpdated)||U)&&Ht(()=>{Ne&&gn(Ne,P,g,w),U&&_r(g,w,P,"updated")},ae)},ie=(w,g,P,ae,se,ue,ye)=>{for(let oe=0;oe<g.length;oe++){const we=w[oe],H=g[oe],U=we.el||wa(we),Y=U&&(we.type===Re||!$r(we,H)||we.shapeFlag&198)?k(U):P;W(we,H,Y,null,ae,se,ue,ye,!0)}},xe=(w,g,P,ae,se)=>{if(g!==P){if(g!==ct)for(const ue in g)!bs(ue)&&!(ue in P)&&a(w,ue,g[ue],null,se,ae);for(const ue in P){if(bs(ue))continue;const ye=P[ue],oe=g[ue];ye!==oe&&ue!=="value"&&a(w,ue,oe,ye,se,ae)}"value"in P&&a(w,"value",g.value,P.value,se)}},J=(w,g,P,ae,se,ue,ye,oe,we)=>{const H=g.el=w?w.el:d(""),U=g.anchor=w?w.anchor:d("");let{patchFlag:Y,dynamicChildren:Ae,slotScopeIds:Ne}=g;Ne&&(oe=oe?oe.concat(Ne):Ne),w==null?(s(H,P,ae),s(U,P,ae),A(g.children||[],P,U,se,ue,ye,oe,we)):Y>0&&Y&64&&Ae&&w.dynamicChildren&&w.dynamicChildren.length===Ae.length?(ie(w.dynamicChildren,Ae,P,se,ue,ye,oe),(g.key!=null||se&&g===se.subTree)&&Ya(w,g,!0)):ge(w,g,P,U,se,ue,ye,oe,we)},Ce=(w,g,P,ae,se,ue,ye,oe,we)=>{g.slotScopeIds=oe,w==null?g.shapeFlag&512?se.ctx.activate(g,P,ae,ye,we):Ke(g,P,ae,se,ue,ye,we):Xe(w,g,we)},Ke=(w,g,P,ae,se,ue,ye)=>{const oe=w.component=Kp(w,ae,se);if(si(w)&&(oe.ctx.renderer=Jt),Fp(oe,!1,ye),oe.asyncDep){if(se&&se.registerDep(oe,He,ye,ue),!w.el){const we=oe.subTree=Oe(Ft);Z(null,we,g,P),w.placeholder=we.el}}else He(oe,w,g,P,se,ue,ye)},Xe=(w,g,P)=>{const ae=g.component=w.component;if(bp(w,g,P))if(ae.asyncDep&&!ae.asyncResolved){g.el=w.el,g.placeholder=w.placeholder,Ue(ae,g,P);return}else ae.next=g,ae.update();else g.el=w.el,g.placeholder=w.placeholder,ae.vnode=g},He=(w,g,P,ae,se,ue,ye)=>{const oe=()=>{if(w.isMounted){let{next:Y,bu:Ae,u:Ne,parent:Je,vnode:Ye}=w;{const Bt=Kc(w);if(Bt){Y&&(Y.el=Ye.el,Ue(w,Y,ye)),Bt.asyncDep.then(()=>{Ht(()=>{w.isUnmounted||H()},se)});return}}let Qe=Y,vt;kr(w,!1),Y?(Y.el=Ye.el,Ue(w,Y,ye)):Y=Ye,Ae&&So(Ae),(vt=Y.props&&Y.props.onVnodeBeforeUpdate)&&gn(vt,Je,Y,Ye),kr(w,!0);const _t=eu(w),Xt=w.subTree;w.subTree=_t,W(Xt,_t,k(Xt.el),ht(Xt),w,se,ue),Y.el=_t.el,Qe===null&&wp(w,_t.el),Ne&&Ht(Ne,se),(vt=Y.props&&Y.props.onVnodeUpdated)&&Ht(()=>gn(vt,Je,Y,Ye),se)}else{let Y;const{el:Ae,props:Ne}=g,{bm:Je,m:Ye,parent:Qe,root:vt,type:_t}=w,Xt=xs(g);kr(w,!1),Je&&So(Je),!Xt&&(Y=Ne&&Ne.onVnodeBeforeMount)&&gn(Y,Qe,g),kr(w,!0);{vt.ce&&vt.ce._hasShadowRoot()&&vt.ce._injectChildStyle(_t,w.parent?w.parent.type:void 0);const Bt=w.subTree=eu(w);W(null,Bt,P,ae,w,se,ue),g.el=Bt.el}if(Ye&&Ht(Ye,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=ae=null}};w.scope.on();const we=w.effect=new Hu(oe);w.scope.off();const H=w.update=we.run.bind(we),U=w.job=we.runIfDirty.bind(we);U.i=w,U.id=w.uid,we.scheduler=()=>Ha(U),kr(w,!0),H()},Ue=(w,g,P)=>{g.component=w;const ae=w.vnode.props;w.vnode=g,w.next=null,kp(w,g.props,ae,P),Ep(w,g.children,P),An(),uc(w),Pn()},ge=(w,g,P,ae,se,ue,ye,oe,we=!1)=>{const H=w&&w.children,U=w?w.shapeFlag:0,Y=g.children,{patchFlag:Ae,shapeFlag:Ne}=g;if(Ae>0){if(Ae&128){Fe(H,Y,P,ae,se,ue,ye,oe,we);return}else if(Ae&256){Me(H,Y,P,ae,se,ue,ye,oe,we);return}}Ne&8?(U&16&&pt(H,se,ue),Y!==H&&m(P,Y)):U&16?Ne&16?Fe(H,Y,P,ae,se,ue,ye,oe,we):pt(H,se,ue,!0):(U&8&&m(P,""),Ne&16&&A(Y,P,ae,se,ue,ye,oe,we))},Me=(w,g,P,ae,se,ue,ye,oe,we)=>{w=w||Ar,g=g||Ar;const H=w.length,U=g.length,Y=Math.min(H,U);let Ae;for(Ae=0;Ae<Y;Ae++){const Ne=g[Ae]=we?Dn(g[Ae]):xn(g[Ae]);W(w[Ae],Ne,P,null,se,ue,ye,oe,we)}H>U?pt(w,se,ue,!0,!1,Y):A(g,P,ae,se,ue,ye,oe,we,Y)},Fe=(w,g,P,ae,se,ue,ye,oe,we)=>{let H=0;const U=g.length;let Y=w.length-1,Ae=U-1;for(;H<=Y&&H<=Ae;){const Ne=w[H],Je=g[H]=we?Dn(g[H]):xn(g[H]);if($r(Ne,Je))W(Ne,Je,P,null,se,ue,ye,oe,we);else break;H++}for(;H<=Y&&H<=Ae;){const Ne=w[Y],Je=g[Ae]=we?Dn(g[Ae]):xn(g[Ae]);if($r(Ne,Je))W(Ne,Je,P,null,se,ue,ye,oe,we);else break;Y--,Ae--}if(H>Y){if(H<=Ae){const Ne=Ae+1,Je=Ne<U?g[Ne].el:ae;for(;H<=Ae;)W(null,g[H]=we?Dn(g[H]):xn(g[H]),P,Je,se,ue,ye,oe,we),H++}}else if(H>Ae)for(;H<=Y;)G(w[H],se,ue,!0),H++;else{const Ne=H,Je=H,Ye=new Map;for(H=Je;H<=Ae;H++){const Ot=g[H]=we?Dn(g[H]):xn(g[H]);Ot.key!=null&&Ye.set(Ot.key,H)}let Qe,vt=0;const _t=Ae-Je+1;let Xt=!1,Bt=0;const Zt=new Array(_t);for(H=0;H<_t;H++)Zt[H]=0;for(H=Ne;H<=Y;H++){const Ot=w[H];if(vt>=_t){G(Ot,se,ue,!0);continue}let $t;if(Ot.key!=null)$t=Ye.get(Ot.key);else for(Qe=Je;Qe<=Ae;Qe++)if(Zt[Qe-Je]===0&&$r(Ot,g[Qe])){$t=Qe;break}$t===void 0?G(Ot,se,ue,!0):(Zt[$t-Je]=H+1,$t>=Bt?Bt=$t:Xt=!0,W(Ot,g[$t],P,null,se,ue,ye,oe,we),vt++)}const pr=Xt?Tp(Zt):Ar;for(Qe=pr.length-1,H=_t-1;H>=0;H--){const Ot=Je+H,$t=g[Ot],Ie=g[Ot+1],Hn=Ot+1<U?Ie.el||wa(Ie):ae;Zt[H]===0?W(null,$t,P,Hn,se,ue,ye,oe,we):Xt&&(Qe<0||H!==pr[Qe]?fe($t,P,Hn,2):Qe--)}}},fe=(w,g,P,ae,se=null)=>{const{el:ue,type:ye,transition:oe,children:we,shapeFlag:H}=w;if(H&6){fe(w.component.subTree,g,P,ae);return}if(H&128){w.suspense.move(g,P,ae);return}if(H&64){ye.move(w,g,P,Jt);return}if(ye===Re){s(ue,g,P);for(let Y=0;Y<we.length;Y++)fe(we[Y],g,P,ae);s(w.anchor,g,P);return}if(ye===$o){L(w,g,P);return}if(ae!==2&&H&1&&oe)if(ae===0)oe.persisted&&!ue[on]?s(ue,g,P):(oe.beforeEnter(ue),s(ue,g,P),Ht(()=>oe.enter(ue),se));else{const{leave:Y,delayLeave:Ae,afterLeave:Ne}=oe,Je=()=>{w.ctx.isUnmounted?o(ue):s(ue,g,P)},Ye=()=>{const Qe=ue._isLeaving||!!ue[on];ue._isLeaving&&ue[on](!0),oe.persisted&&!Qe?Je():Y(ue,()=>{Je(),Ne&&Ne()})};Ae?Ae(ue,Je,Ye):Ye()}else s(ue,g,P)},G=(w,g,P,ae=!1,se=!1)=>{const{type:ue,props:ye,ref:oe,children:we,dynamicChildren:H,shapeFlag:U,patchFlag:Y,dirs:Ae,cacheIndex:Ne,memo:Je}=w;if((Y===-2||H&&H.hasOnce)&&(se=!1),oe!=null&&(An(),ks(oe,null,P,w,!0),Pn()),Ne!=null&&(!w.ctx||w.ctx===g)&&(g.renderCache[Ne]=void 0),U&256){g.ctx.deactivate(w);return}const Ye=U&1&&Ae,Qe=!xs(w);let vt;if(Qe&&(vt=ye&&ye.onVnodeBeforeUnmount)&&gn(vt,g,w),U&6)st(w.component,P,ae);else{if(U&128){w.suspense.unmount(P,ae);return}Ye&&_r(w,null,g,"beforeUnmount"),U&64?w.type.remove(w,g,P,Jt,ae):H&&!H.hasOnce&&(ue!==Re||Y>0&&Y&64)?pt(H,g,P,!1,!0):(ue===Re&&Y&384||!se&&U&16)&&pt(we,g,P),ae&&X(w)}const _t=Je!=null&&Ne==null;(Qe&&(vt=ye&&ye.onVnodeUnmounted)||Ye||_t)&&Ht(()=>{vt&&gn(vt,g,w),Ye&&_r(w,null,g,"unmounted"),_t&&(w.el=null)},P)},X=w=>{const{type:g,el:P,anchor:ae,transition:se}=w,ue=g===Re;if(ue&&!se){ke(P,ae);return}if(g===$o){Q(w),se&&!se.persisted&&se.afterLeave&&se.afterLeave();return}const ye=ue?Ms(w):w,oe=()=>{ue?k(P)&&ke(P,ae):o(P),se&&!se.persisted&&se.afterLeave&&se.afterLeave()};if(ye&&ye.shapeFlag&1&&se&&!se.persisted){const{leave:we,delayLeave:H}=se,U=ye.el,Y=()=>we(U,oe);H?H(U,oe,Y):Y()}else oe()},ke=(w,g)=>{let P;for(;w!==g;)P=D(w),o(w),w=P;o(g)},st=(w,g,P)=>{const{bum:ae,scope:se,job:ue,subTree:ye,um:oe,m:we,a:H}=w;ru(we),ru(H),ae&&So(ae),se.stop(),ue?(ue.flags|=8,G(ye,w,g,P)):w.vnode.el&&ye&&(ye.transition=w.vnode.transition,G(ye,w,g,P)),oe&&Ht(oe,g),Ht(()=>{w.isUnmounted=!0},g)},pt=(w,g,P,ae=!1,se=!1,ue=0)=>{for(let ye=ue;ye<w.length;ye++)G(w[ye],g,P,ae,se)},ht=w=>{if(w.shapeFlag&6)return ht(w.component.subTree);if(w.shapeFlag&128)return w.suspense.next();const g=D(w.anchor||w.el),P=g&&g[vc];return P?D(P):g},Yt=(w,g,P)=>{const ae=w&&g._vnode?void 0:w&&w.component?w.component.uid:Lp();Nd(()=>{w==null?g._vnode&&G(g._vnode,null,null,!0):W(g._vnode||null,w,g,null,null,null,P),g._vnode=w},ae)},Jt={p:W,um:G,m:fe,r:X,mt:Ke,mc:A,pc:ge,pbc:ie,n:ht,o:e};return{render:Yt,hydrate:void 0,createApp:pp(Yt)}}function ta({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 kr({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Pp(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Ya(e,t,n=!1){const s=e.children,o=t.children;if(Le(s)&&Le(o))for(let a=0;a<s.length;a++){const c=s[a];let d=o[a];d.shapeFlag&1&&!d.dynamicChildren&&((d.patchFlag<=0||d.patchFlag===32)&&(d=o[a]=Dn(o[a]),d.el=c.el),!n&&d.patchFlag!==-2&&Ya(c,d)),d.type===ai&&(d.patchFlag===-1&&(d=o[a]=Dn(d)),d.el=c.el),d.type===Ft&&!d.el&&(d.el=c.el)}}function Tp(e){const t=e.slice(),n=[0];let s,o,a,c,d;const h=e.length;for(s=0;s<h;s++){const y=e[s];if(y!==0){if(o=n[n.length-1],e[o]<y){t[s]=o,n.push(s);continue}for(a=0,c=n.length-1;a<c;)d=a+c>>1,e[n[d]]<y?a=d+1:c=d;y<e[n[a]]&&(a>0&&(t[s]=n[a-1]),n[a]=s)}}for(a=n.length,c=n[a-1];a-- >0;)n[a]=c,c=t[c];return n}function Kc(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Kc(t)}function ru(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function wa(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?wa(t.subTree):null}const Fc=e=>e.__isSuspense;function Op(e,t){t&&t.pendingBranch?Le(e)?t.effects.push(...e):t.effects.push(e):Fd(e)}const Re=Symbol.for("v-fgt"),ai=Symbol.for("v-txt"),Ft=Symbol.for("v-cmt"),$o=Symbol.for("v-stc"),Tr=[];let rn=null;function F(e=!1){Tr.push(rn=e?null:[])}function Nc(){Tr.pop(),rn=Tr[Tr.length-1]||null}let Is=1;function Lo(e,t=!1){Is+=e,e<0&&rn&&t&&(rn.hasOnce=!0)}function Vc(e){return e.dynamicChildren=Is>0?rn||Ar:null,Nc(),Is>0&&rn&&rn.push(e),e}function q(e,t,n,s,o,a){return Vc(u(e,t,n,s,o,a,!0))}function It(e,t,n,s,o){return Vc(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 Bc=({key:e})=>e??null,Ao=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?bt(e)||Nt(e)||ze(e)?{i:an,r:e,k:t,f:!!n}:e:null);function u(e,t=null,n=null,s=0,o=null,a=e===Re?0:1,c=!1,d=!1){const h={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Bc(t),ref:t&&Ao(t),scopeId:dc,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 d?(Ko(h,n),a&128&&e.normalize(h)):n&&(h.shapeFlag|=bt(n)?8:16),Is>0&&!c&&rn&&(h.patchFlag>0||a&6)&&h.patchFlag!==32&&rn.push(h),h}const Oe=Mp;function Mp(e,t=null,n=null,s=0,o=null,a=!1){if((!e||e===op)&&(e=Ft),js(e)){const d=lr(e,t,!0);return n&&Ko(d,n),Is>0&&!a&&rn&&(d.shapeFlag&6?rn[rn.indexOf(e)]=d:rn.push(d)),d.patchFlag=-2,d}if(Up(e)&&(e=e.__vccOpts),t){t=Ip(t);let{class:d,style:h}=t;d&&!bt(d)&&(t.class=et(d)),at(h)&&(qa(h)&&!Le(h)&&(h=Et({},h)),t.style=sr(h))}const c=bt(e)?1:Fc(e)?128:ri(e)?64:at(e)?4:ze(e)?2:0;return u(e,t,n,s,o,c,a,!0)}function Ip(e){return e?qa(e)||Mc(e)?Et({},e):e:null}function lr(e,t,n=!1,s=!1){const{props:o,ref:a,patchFlag:c,children:d,transition:h}=e,y=t?Dp(o||{},t):o,m={__v_isVNode:!0,__v_skip:!0,type:e.type,props:y,key:y&&Bc(y),ref:t&&t.ref?n&&a?Le(a)?a.concat(Ao(t)):[a,Ao(t)]:Ao(t):a,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:d,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Re?c===-1?16:c|16:c,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:h,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&lr(e.ssContent),ssFallback:e.ssFallback&&lr(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce,cacheIndex:e.cacheIndex};return h&&s&&ar(m,h.clone(m)),m}function nn(e=" ",t=0){return Oe(ai,null,e,t)}function jp(e,t){const n=Oe($o,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):Le(e)?Oe(Re,null,e.slice()):js(e)?Dn(e):Oe(ai,null,String(e))}function Dn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:lr(e)}function Ko(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),Ko(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!Mc(t)?t._ctx=an:o===3&&an&&(an.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(ze(t)){if(s&65){Ko(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 Dp(...e){const t={};for(let n=0;n<e.length;n++){const s=e[n];for(const o in s)if(o==="class")t.class!==s.class&&(t.class=et([t.class,s.class]));else if(o==="style")t.style=sr([t.style,s.style]);else if(Jo(o)){const a=t[o],c=s[o];c&&a!==c&&!(Le(a)&&a.includes(c))?t[o]=a?[].concat(a,c):c:c==null&&a==null&&!Xo(o)&&(t[o]=c)}else o!==""&&(t[o]=s[o])}return t}function gn(e,t,n,s=null){cn(e,t,7,[n,s])}const Rp=Ec();let Uc=0;function Lp(){return Uc}function Kp(e,t,n){const s=e.type,o=(t?t.appContext:e.appContext)||Rp,a={uid:Uc++,vnode:e,type:s,parent:t,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new cd(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(o.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:jc(s,o),emitsOptions:$c(s,o),emit:null,emitted:null,propsDefaults:ct,inheritAttrs:s.inheritAttrs,ctx:ct,data:ct,props:ct,attrs:ct,slots:ct,refs:ct,setupState:ct,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return a.ctx={_:a},a.root=t?t.root:a,a.emit=vp.bind(null,a),e.ce&&e.ce(a),a}let zt=null;const Ja=()=>zt||an;let Fo,Ds;{const e=ei(),t=(n,s)=>{let o;return(o=e[n])||(o=e[n]=[]),o.push(s),a=>{o.length>1?o.forEach(c=>c(a)):o[0](a)}};Fo=t("__VUE_INSTANCE_SETTERS__",n=>zt=n),Ds=t("__VUE_SSR_SETTERS__",n=>Rs=n)}const Bs=e=>{const t=zt;return Fo(e),e.scope.on(),()=>{e.scope.off(),Fo(t)}},su=()=>{zt&&zt.scope.off(),Fo(null)};function qc(e){return e.vnode.shapeFlag&4}let Rs=!1;function Fp(e,t=!1,n=!1){t&&Ds(t);const{props:s,children:o}=e.vnode,a=qc(e);_p(e,s,a,t),Sp(e,o,n||t);const c=a?Np(e,t):void 0;return t&&Ds(!1),c}function Np(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,ip);const{setup:s}=n;if(s){An();const o=e.setupContext=s.length>1?Bp(e):null,a=Bs(e),c=Ns(s,e,0,[e.props,o]),d=Lu(c);if(Pn(),a(),(d||e.sp)&&!xs(e)&&wc(e),d){if(c.then(su,su),t)return c.then(h=>{Ds(!0);try{ou(e,h,t)}finally{Ds(!1)}}).catch(h=>{ni(h,e,0)});e.asyncDep=c}else ou(e,c)}else Hc(e)}function ou(e,t,n){ze(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:at(t)&&(e.setupState=ic(t)),Hc(e)}function Hc(e,t,n){const s=e.type;e.render||(e.render=s.render||En);{const o=Bs(e);An();try{ap(e)}finally{Pn(),o()}}}const Vp={get(e,t){return Kt(e,"get",""),e[t]}};function Bp(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Vp),slots:e.slots,emit:e.emit,expose:t}}function li(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(ic(Pd(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 Up(e){return ze(e)&&"__vccOpts"in e}const it=(e,t)=>jd(e,t,Rs);function qp(e,t,n){try{Lo(-1);const s=arguments.length;return s===2?at(t)&&!Le(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{Lo(1)}}const Hp="3.5.44";/**
* @vue/runtime-dom v3.5.44
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let _a;const iu=typeof window<"u"&&window.trustedTypes;if(iu)try{_a=iu.createPolicy("vue",{createHTML:e=>e})}catch{}const Wc=_a?e=>_a.createHTML(e):e=>e,Wp="http://www.w3.org/2000/svg",zp="http://www.w3.org/1998/Math/MathML",jn=typeof document<"u"?document:null,au=jn&&jn.createElement("template"),Gp={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(Wp,e):t==="mathml"?jn.createElementNS(zp,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 c=n?n.previousSibling:t.lastChild;if(o&&(o===a||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),!(o===a||!(o=o.nextSibling)););else{au.innerHTML=Wc(s==="svg"?`<svg>${e}</svg>`:s==="mathml"?`<math>${e}</math>`:e);const d=au.content;if(s==="svg"||s==="mathml"){const h=d.firstChild;for(;h.firstChild;)d.appendChild(h.firstChild);d.removeChild(h)}t.insertBefore(d,n)}return[c?c.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Qn="transition",vs="animation",Jr=Symbol("_vtc"),zc={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},Gc=Et({},yc,zc),Yp=e=>(e.displayName="Transition",e.props=Gc,e),ns=Yp((e,{slots:t})=>qp(Yd,Yc(e),t)),xr=(e,t=[])=>{Le(e)?e.forEach(n=>n(...t)):e&&e(...t)},lu=e=>e?Le(e)?e.some(t=>t.length>1):e.length>1:!1;function Yc(e){const t={};for(const J in e)J in zc||(t[J]=e[J]);if(e.css===!1)return t;const{name:n="v",type:s,duration:o,enterFromClass:a=`${n}-enter-from`,enterActiveClass:c=`${n}-enter-active`,enterToClass:d=`${n}-enter-to`,appearFromClass:h=a,appearActiveClass:y=c,appearToClass:m=d,leaveFromClass:k=`${n}-leave-from`,leaveActiveClass:D=`${n}-leave-active`,leaveToClass:O=`${n}-leave-to`}=e,K=Jp(o),W=K&&K[0],de=K&&K[1],{onBeforeEnter:Z,onEnter:E,onEnterCancelled:L,onLeave:Q,onLeaveCancelled:le,onBeforeAppear:ce=Z,onAppear:ee=E,onAppearCancelled:A=L}=t,x=(J,Ce,Ke,Xe)=>{J._enterCancelled=Xe,er(J,Ce?m:d),er(J,Ce?y:c),Ke&&Ke()},ie=(J,Ce)=>{J._isLeaving=!1,er(J,k),er(J,O),er(J,D),Ce&&Ce()},xe=J=>(Ce,Ke)=>{const Xe=J?ee:E,He=()=>x(Ce,J,Ke);xr(Xe,[Ce,He]),uu(()=>{er(Ce,J?h:a),bn(Ce,J?m:d),lu(Xe)||cu(Ce,s,W,He)})};return Et(t,{onBeforeEnter(J){xr(Z,[J]),bn(J,a),bn(J,c)},onBeforeAppear(J){xr(ce,[J]),bn(J,h),bn(J,y)},onEnter:xe(!1),onAppear:xe(!0),onLeave(J,Ce){J._isLeaving=!0;const Ke=()=>ie(J,Ce);bn(J,k),J._enterCancelled?(bn(J,D),ka(J)):(ka(J),bn(J,D)),uu(()=>{J._isLeaving&&(er(J,k),bn(J,O),lu(Q)||cu(J,s,de,Ke))}),xr(Q,[J,Ke])},onEnterCancelled(J){x(J,!1,void 0,!0),xr(L,[J])},onAppearCancelled(J){x(J,!0,void 0,!0),xr(A,[J])},onLeaveCancelled(J){ie(J),xr(le,[J])}})}function Jp(e){if(e==null)return null;if(at(e))return[na(e.enter),na(e.leave)];{const t=na(e);return[t,t]}}function na(e){return td(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 uu(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Xp=0;function cu(e,t,n,s){const o=e._endId=++Xp,a=()=>{o===e._endId&&s()};if(n!=null)return setTimeout(a,n);const{type:c,timeout:d,propCount:h}=Jc(e,t);if(!c)return s();const y=c+"end";let m=0;const k=()=>{e.removeEventListener(y,D),a()},D=O=>{O.target===e&&++m>=h&&k()};setTimeout(()=>{m<h&&k()},d+1),e.addEventListener(y,D)}function Jc(e,t){const n=window.getComputedStyle(e),s=K=>(n[K]||"").split(", "),o=s(`${Qn}Delay`),a=s(`${Qn}Duration`),c=fu(o,a),d=s(`${vs}Delay`),h=s(`${vs}Duration`),y=fu(d,h);let m=null,k=0,D=0;t===Qn?c>0&&(m=Qn,k=c,D=a.length):t===vs?y>0&&(m=vs,k=y,D=h.length):(k=Math.max(c,y),m=k>0?c>y?Qn:vs:null,D=m?m===Qn?a.length:h.length:0);const O=m===Qn&&/\b(?:transform|all)(?:,|$)/.test(s(`${Qn}Property`).toString());return{type:m,timeout:k,propCount:D,hasTransform:O}}function fu(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,s)=>du(n)+du(e[s])))}function du(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function ka(e){return(e?e.ownerDocument:document).body.offsetHeight}function Qp(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 pu=Symbol("_vod"),Xc=Symbol("_vsh"),Zp=Symbol(""),eh=/(?:^|;)\s*display\s*:/;function th(e,t,n){const s=e.style,o=bt(n);let a=!1;if(n&&!o){if(t)if(bt(t))for(const c of t.split(";")){const d=c.slice(0,c.indexOf(":")).trim();n[d]==null&&gs(s,d,"")}else for(const c in t)n[c]==null&&gs(s,c,"");for(const c in n){c==="display"&&(a=!0);const d=n[c];d!=null?rh(e,c,!bt(t)&&t?t[c]:void 0,d)||gs(s,c,d):gs(s,c,"")}}else if(o){if(t!==n){const c=s[Zp];c&&(n+=";"+c),s.cssText=n,a=eh.test(n)}}else t&&e.removeAttribute("style");pu in e&&((!o||t!==n)&&(e[pu]=a?s.display:""),e[Xc]&&(s.display="none"))}const ko=/\s*!important$/;function gs(e,t,n){if(Le(n))n.forEach(s=>gs(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))ko.test(n)?e.setProperty(t,n.replace(ko,""),"important"):e.setProperty(t,n);else{const s=nh(e,t);ko.test(n)?e.setProperty(cr(s),n.replace(ko,""),"important"):e[s]=n}}const hu=["Webkit","Moz","ms"],ra={};function nh(e,t){const n=ra[t];if(n)return n;let s=hn(t);if(s!=="filter"&&s in e)return ra[t]=s;s=Nu(s);for(let o=0;o<hu.length;o++){const a=hu[o]+s;if(a in e)return ra[t]=a}return t}function rh(e,t,n,s){return e.tagName==="TEXTAREA"&&(t==="width"||t==="height")&&bt(s)&&n===s}const vu="http://www.w3.org/1999/xlink";function mu(e,t,n,s,o,a=ad(t)){s&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(vu,t.slice(6,t.length)):e.setAttributeNS(vu,t,n):n==null||a&&!Bu(n)?e.removeAttribute(t):e.setAttribute(t,a?"":$n(n)?String(n):n)}function yu(e,t,n,s,o){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?Wc(n):n);return}const a=e.tagName;if(t==="value"&&a!=="PROGRESS"&&!a.includes("-")){const d=a==="OPTION"?e.getAttribute("value")||"":e.value,h=n==null?e.type==="checkbox"?"on":"":String(n);(d!==h||!("_value"in e))&&(e.value=h),n==null&&e.removeAttribute(t),e._value=n;return}let c=!1;if(n===""||n==null){const d=typeof e[t];d==="boolean"?n=Bu(n):n==null&&d==="string"?(n="",c=!0):d==="number"&&(n=0,c=!0)}try{e[t]=n}catch{}c&&e.removeAttribute(o||t)}function nr(e,t,n,s){e.addEventListener(t,n,s)}function sh(e,t,n,s){e.removeEventListener(t,n,s)}const gu=Symbol("_vei");function oh(e,t,n,s,o=null){const a=e[gu]||(e[gu]={}),c=a[t];if(s&&c)c.value=s;else{const[d,h]=lh(t);if(s){const y=a[t]=fh(s,o);nr(e,d,y,h)}else c&&(sh(e,d,c,h),a[t]=void 0)}}const ih=/(Once|Passive|Capture)$/,ah=/^on:?(?:Once|Passive|Capture)$/;function lh(e){let t,n;for(;(n=e.match(ih))&&!ah.test(e);)t||(t={}),e=e.slice(0,e.length-n[1].length),t[n[1].toLowerCase()]=!0;return[e[2]===":"?e.slice(3):cr(e.slice(2)),t]}let sa=0;const uh=Promise.resolve(),ch=()=>sa||(uh.then(()=>sa=0),sa=Date.now());function fh(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 c=o.slice(),d=[s];for(let h=0;h<c.length&&!s._stopped;h++){const y=c[h];y&&cn(y,t,5,d)}}else cn(o,t,5,[s])};return n.value=e,n.attached=ch(),n}const bu=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,dh=(e,t,n,s,o,a)=>{const c=o==="svg";t==="class"?Qp(e,s,c):t==="style"?th(e,n,s):Jo(t)?Xo(t)||oh(e,t,n,s,a):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):ph(e,t,s,c))?(yu(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&mu(e,t,s,c,a,t!=="value")):e._isVueCE&&(hh(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!bt(s)))?yu(e,hn(t),s,a,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),mu(e,t,s,c))};function ph(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&bu(t)&&ze(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const o=e.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return bu(t)&&bt(n)?!1:t in e}function hh(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 Qc=new WeakMap,Zc=new WeakMap,No=Symbol("_moveCb"),wu=Symbol("_enterCb"),xa=new WeakMap,vh=e=>(delete e.props.mode,e),mh=vh({name:"TransitionGroup",props:Et({},Gc,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=Ja(),s=mc();let o,a,c,d;const h=()=>(d===void 0&&(d=o.length>0&&Ch(o[0].el,n.vnode.el,_u(e))),d);return kc(()=>{if(xa.delete(n),!h()){o=[],c=void 0;return}const y=_u(e);o.forEach(gh);const m=c&&xh(c,n.vnode.el);c=void 0,o.forEach(D=>bh(D,m));const k=o.filter(wh);ka(n.vnode.el),k.forEach(D=>{const O=D.el,K=O.style;bn(O,y),K.transform=K.webkitTransform=K.transitionDuration="";const W=O[No]=de=>{de&&de.target!==O||(!de||de.propertyName.endsWith("transform"))&&(O.removeEventListener("transitionend",W),O[No]=null,er(O,y))};O.addEventListener("transitionend",W)}),o=[]}),()=>{const y=rt(e),m=Yc(y);let k=y.tag||Re;if(o=[],d=void 0,a)for(let D=0;D<a.length;D++){const O=a[D];O.el&&O.el instanceof Element&&!O.el[Xc]&&(o.push(O),ar(O,Os(O,m,s,n)),Qc.set(O,ui(O.el)))}a=t.default?Wa(t.default()):[];for(let D=0;D<a.length;D++){const O=a[D];O.key!=null&&ar(O,Os(O,m,s,n))}return o.length&&(c=_h(n),xa.set(n,h)),Oe(k,null,a)}}}),yh=mh;function gh(e){const t=e.el;t[No]&&t[No](),t[wu]&&t[wu]()}function _u(e){return e.moveClass||`${e.name||"v"}-move`}function bh(e,t){Zc.set(e,ui(e.el,t))}function wh(e){const t=Qc.get(e),n=Zc.get(e),s=t.left-n.left,o=t.top-n.top;if(s||o){const a=e.el,c=a.style,d=a.getBoundingClientRect();let h=1,y=1;return a.offsetWidth&&(h=d.width/a.offsetWidth),a.offsetHeight&&(y=d.height/a.offsetHeight),(!Number.isFinite(h)||h===0)&&(h=1),(!Number.isFinite(y)||y===0)&&(y=1),Math.abs(h-1)<.01&&(h=1),Math.abs(y-1)<.01&&(y=1),c.transform=c.webkitTransform=`translate(${s/h}px,${o/y}px)`,c.transitionDuration="0s",e}}function ui(e,t){const n=e.getBoundingClientRect();return{left:n.left-(t?t.left:0),top:n.top-(t?t.top:0)}}function _h(e){let t;for(let n=e.parent;n;n=n.parent){const s=xa.get(n);if(s){const o=kh(n.vnode.el,e.vnode.el);o&&(t||(t=[])).push(Et(ui(o),{item:o,willMove:s}))}}return t}function kh(e,t){const n=e.nodeType===1?e:e.parentNode;for(;t&&t.parentNode!==n;)t=t.parentNode;if(t&&t.nodeType===1)return t}function xh(e,t){const n=e.find(s=>s.willMove()&&s.item.contains(t));return n&&ui(n.item,n)}function Ch(e,t,n){const s=e.cloneNode(),o=e[Jr];o&&o.forEach(d=>{d.split(/\s+/).forEach(h=>h&&s.classList.remove(h))}),n.split(/\s+/).forEach(d=>d&&s.classList.add(d)),s.style.display="none";const a=t.nodeType===1?t:t.parentNode;a.appendChild(s);const{hasTransform:c}=Jc(s);return a.removeChild(s),c}const Xr=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Le(t)?n=>So(t,n):t};function Sh(e){e.target.composing=!0}function ku(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Sn=Symbol("_assign"),xo=Symbol("_initialValue");function oa(e,t,n){return t&&(e=e.trim()),n&&(e=Zo(e)),e}const De={created(e,{modifiers:{lazy:t,trim:n,number:s}},o){e.parentNode&&(e.type==="text"?e[xo]=e.defaultValue.replace(/[\r\n]/g,""):e.type==="textarea"&&(e[xo]=e.defaultValue.replace(/\r\n?/g,`
`))),e[Sn]=Xr(o);const a=s||o.props&&o.props.type==="number";nr(e,t?"change":"input",c=>{c.target.composing||e[Sn](oa(e.value,n,a))}),(n||a)&&nr(e,"change",()=>{e.value=oa(e.value,n,a)}),t||(nr(e,"compositionstart",Sh),nr(e,"compositionend",ku),nr(e,"change",ku))},mounted(e,{value:t,modifiers:{trim:n,number:s}}){const o=t??"",a=e[xo];delete e[xo],a!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==a?e[Sn](oa(e.value,n,s)):e.value=o},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:o,number:a}},c){if(e[Sn]=Xr(c),e.composing)return;const d=(a||e.type==="number")&&!/^0\d/.test(e.value)?Zo(e.value):e.value,h=t??"";if(d===h)return;const y=e.getRootNode();(y instanceof Document||y instanceof ShadowRoot)&&y.activeElement===e&&e.type!=="range"&&(s&&t===n||o&&e.value.trim()===h)||(e.value=h)}},Eh={deep:!0,created(e,t,n){e[Sn]=Xr(n),nr(e,"change",()=>{const s=e._modelValue,o=Ls(e),a=e.checked,c=e[Sn];if(Le(s)){const d=Ra(s,o),h=d!==-1;if(a&&!h)c(s.concat(o));else if(!a&&h){const y=[...s];y.splice(d,1),c(y)}}else if(Bn(s)){const d=new Set(s);a?d.add(o):d.delete(o),c(d)}else c(ef(e,a))})},mounted:xu,beforeUpdate(e,t,n){e[Sn]=Xr(n),xu(e,t,n)}};function xu(e,{value:t,oldValue:n},s){e._modelValue=t;let o;if(Le(t))o=Ra(t,s.props.value)>-1;else if(Bn(t))o=t.has(s.props.value);else{if(t===n)return;o=Un(t,ef(e,!0))}e.checked!==o&&(e.checked=o)}const Fn={deep:!0,created(e,{value:t,modifiers:{number:n}},s){e._modelValue=t,nr(e,"change",()=>{const o=Array.prototype.filter.call(e.options,h=>h.selected).map(h=>n?Zo(Ls(h)):Ls(h)),a=e.multiple,c=a?Bn(e._modelValue)?new Set(o):o:o[0],d=e._pendingValue=[a,a?Le(c)?o.slice():o:c];try{e[Sn](c)}finally{ts(()=>{e._pendingValue===d&&(e._pendingValue=void 0)})}}),e[Sn]=Xr(s)},mounted(e,{value:t}){Cu(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||!$h(t,n[1],n[0]))&&Cu(e,t)}};function $h(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 Cu(e,t){const n=e.multiple,s=Le(t);if(!(n&&!s&&!Bn(t))){for(let o=0,a=e.options.length;o<a;o++){const c=e.options[o],d=Ls(c);if(n)if(s){const h=typeof d;h==="string"||h==="number"?c.selected=t.some(y=>String(y)===String(d)):c.selected=Ra(t,d)>-1}else c.selected=t.has(d);else if(Un(Ls(c),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 ef(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const Ah=["ctrl","shift","alt","meta"],Ph={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)=>Ah.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 c=0;c<t.length;c++){const d=Ph[t[c]];if(d&&d(o,t))return}return e(o,...a)})},Th={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},jt=(e,t)=>{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=o=>{if(!("key"in o))return;const a=cr(o.key);if(t.some(c=>c===a||Th[c]===a))return e(o)})},Oh=Et({patchProp:dh},Gp);let Su;function Mh(){return Su||(Su=$p(Oh))}const Ih=(...e)=>{const t=Mh().createApp(...e),{mount:n}=t;return t.mount=s=>{const o=Dh(s);if(!o)return;const a=t._component;!ze(a)&&!a.render&&!a.template&&(a.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const c=n(o,!1,jh(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),c},t};function jh(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Dh(e){return bt(e)?document.querySelector(e):e}function At(e){return'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">'+e+"</svg>"}const Rh={calendar:At('<rect x="4" y="5.5" width="16" height="14" rx="2"/><path d="M8.5 3.5v3.5M15.5 3.5v3.5M4 10.5h16"/>'),clock:At('<circle cx="12" cy="12" r="8.25"/><path d="M12 7.75V12l2.75 1.75"/>'),"check-circle":At('<circle cx="12" cy="12" r="8.25"/><path d="M8.5 12.4l2.4 2.4 4.6-5.2"/>'),edit:At('<path d="M4.5 19.5v-3.2L16 4.8a1.9 1.9 0 0 1 2.7 2.7L7.2 19l-2.7.5z"/>'),tag:At('<path d="M4.5 5.5a1 1 0 0 1 1-1h5.6l8.4 8.4-6.6 6.6-8.4-8.4V5.5z"/><circle cx="8.8" cy="8.8" r="1.1"/>'),star:At('<path d="M12 4l2.5 5.1 5.6.8-4 3.9.9 5.6-5-2.7-5 2.7.9-5.6-4-3.9 5.6-.8L12 4z"/>'),close:At('<path d="M6.5 6.5l11 11M17.5 6.5l-11 11"/>'),flag:At('<path d="M6.5 21V4"/><path d="M6.5 4.5h10.8l-2.6 3.7 2.6 3.7H6.5"/>'),chart:At('<path d="M4.5 19.5h15"/><path d="M7.5 19.5V12M12 19.5V6.5M16.5 19.5V9.5"/>'),export:At('<path d="M12 4.5V14M8.25 10.25L12 14l3.75-3.75"/><path d="M5 19.5h14"/>'),"chevron-left":At('<path d="M14.5 6l-6 6 6 6"/>'),"chevron-right":At('<path d="M9.5 6l6 6-6 6"/>'),"chevron-down":At('<path d="M6 9.5l6 6 6-6"/>'),plus:At('<path d="M12 5.5v13M5.5 12h13"/>'),search:At('<circle cx="11" cy="11" r="6.5"/><path d="M15.8 15.8L20 20"/>'),settings:At('<circle cx="12" cy="12" r="3"/><path d="M12 4.5v2.2M12 17.3v2.2M4.5 12h2.2M17.3 12h2.2M6.8 6.8l1.6 1.6M15.6 15.6l1.6 1.6M17.2 6.8l-1.6 1.6M8.4 15.6l-1.6 1.6"/>'),memo:At('<path d="M6.5 3.5h7.5L18.5 8v11a1 1 0 0 1-1 1h-11a1 1 0 0 1-1-1v-15a1 1 0 0 1 1-1z"/><path d="M14 3.5V8h4.5M9.5 12h5M9.5 15.5h5"/>'),lock:At('<rect x="5.5" y="10.5" width="13" height="9.5" rx="1.5"/><path d="M8.5 10.5V8a3.5 3.5 0 0 1 7 0v2.5"/>'),wallet:At('<rect x="3.5" y="6" width="17" height="12.5" rx="2"/><path d="M3.5 10h17"/><circle cx="16.4" cy="14.2" r="1.1"/>')},Lh=["innerHTML"],lt=Vt({__name:"Icon",props:{name:{},size:{default:16}},setup(e){const t=e,n=it(()=>Rh[t.name]||"");return(s,o)=>(F(),q("span",{class:"icon",style:sr({width:e.size+"px",height:e.size+"px"}),innerHTML:n.value},null,12,Lh))}}),Kh=["aria-label"],Fh={class:"dialog-title"},Nh={class:"dialog-msg"},Vh={class:"dialog-btns"},Bh=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 gt(()=>n.open,a=>{a?window.addEventListener("keydown",o):window.removeEventListener("keydown",o)}),dr(()=>window.removeEventListener("keydown",o)),(a,c)=>(F(),It(Vs,{to:"body"},[Oe(ns,{name:"modal"},{default:fr(()=>[e.open?(F(),q("div",{key:0,class:"mask",onClick:c[2]||(c[2]=Mr(d=>s("cancel"),["self"]))},[u("div",{class:"dialog",role:"dialog","aria-label":e.title},[u("div",Fh,re(e.title),1),u("div",Nh,re(e.message),1),u("div",Vh,[u("button",{class:"btn btn-sm",onClick:c[0]||(c[0]=d=>s("cancel"))},re(e.cancelText),1),u("button",{class:et(["btn btn-sm",e.danger?"btn-danger-solid":"btn-primary"]),onClick:c[1]||(c[1]=d=>s("confirm"))},re(e.confirmText),3)])],8,Kh)])):Ee("",!0)]),_:1})]))}}),Gt=(e,t)=>{const n=e.__vccOpts||e;for(const[s,o]of t)n[s]=o;return n},ur=Gt(Bh,[["__scopeId","data-v-f27041d4"]]);var Eu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Uh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var tf={exports:{}};(function(e,t){((n,s)=>{e.exports=s()})(Eu,function(){var n=function(r,i){return(n=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(l,f){l.__proto__=f}:function(l,f){for(var p in f)Object.prototype.hasOwnProperty.call(f,p)&&(l[p]=f[p])}))(r,i)},s=function(){return(s=Object.assign||function(r){for(var i,l=1,f=arguments.length;l<f;l++)for(var p in i=arguments[l])Object.prototype.hasOwnProperty.call(i,p)&&(r[p]=i[p]);return r}).apply(this,arguments)};function o(r,i,l){for(var f,p=0,v=i.length;p<v;p++)!f&&p in i||((f=f||Array.prototype.slice.call(i,0,p))[p]=i[p]);return r.concat(f||Array.prototype.slice.call(i))}var a=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:Eu,c=Object.keys,d=Array.isArray;function h(r,i){return typeof i=="object"&&c(i).forEach(function(l){r[l]=i[l]}),r}typeof Promise>"u"||a.Promise||(a.Promise=Promise);var y=Object.getPrototypeOf,m={}.hasOwnProperty;function k(r,i){return m.call(r,i)}function D(r,i){typeof i=="function"&&(i=i(y(r))),(typeof Reflect>"u"?c:Reflect.ownKeys)(i).forEach(function(l){K(r,l,i[l])})}var O=Object.defineProperty;function K(r,i,l,f){O(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},f))}function W(r){return{from:function(i){return r.prototype=Object.create(i.prototype),K(r.prototype,"constructor",r),{extend:D.bind(null,r.prototype)}}}}var de=Object.getOwnPropertyDescriptor,Z=[].slice;function E(r,i,l){return Z.call(r,i,l)}function L(r,i){return i(r)}function Q(r){if(!r)throw new Error("Assertion Failed")}function le(r){a.setImmediate?setImmediate(r):setTimeout(r,0)}function ce(r,i){if(typeof i=="string"&&k(r,i))return r[i];if(!i)return r;if(typeof i!="string"){for(var l=[],f=0,p=i.length;f<p;++f){var v=ce(r,i[f]);l.push(v)}return l}var b,_=i.indexOf(".");return _===-1||(b=r[i.substr(0,_)])==null?void 0:ce(b,i.substr(_+1))}function ee(r,i,l){if(r&&i!==void 0&&!("isFrozen"in Object&&Object.isFrozen(r)))if(typeof i!="string"&&"length"in i){Q(typeof l!="string"&&"length"in l);for(var f=0,p=i.length;f<p;++f)ee(r,i[f],l[f])}else{var v=i.indexOf(".");if(v!==-1){var b=i.substr(0,v),v=i.substr(v+1);if(v==="")l===void 0?d(r)&&!isNaN(parseInt(b))?r.splice(b,1):delete r[b]:r[b]=l;else{var _=r[b];if(!_||!k(r,b)){if(l===void 0)return;_=r[b]={}}ee(_,v,l)}}else l===void 0?d(r)&&!isNaN(parseInt(i))?r.splice(i,1):delete r[i]:r[i]=l}}function A(r){var i,l={};for(i in r)k(r,i)&&(l[i]=r[i]);return l}var x=[].concat;function ie(r){return x.apply([],r)}var G="BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(ie([8,16,32,64].map(function(r){return["Int","Uint","Float"].map(function(i){return i+r+"Array"})}))).filter(function(r){return a[r]}),xe=new Set(G.map(function(r){return a[r]})),J=null;function Ce(r){return J=new WeakMap,r=function i(l){if(!l||typeof l!="object")return l;var f=J.get(l);if(f)return f;if(d(l)){f=[],J.set(l,f);for(var p=0,v=l.length;p<v;++p)f.push(i(l[p]))}else if(xe.has(l.constructor))f=l;else{var b,_=y(l);for(b in f=_===Object.prototype?{}:Object.create(_),J.set(l,f),l)k(l,b)&&(f[b]=i(l[b]))}return f}(r),J=null,r}var Ke={}.toString;function Xe(r){return Ke.call(r).slice(8,-1)}var He=typeof Symbol<"u"?Symbol.iterator:"@@iterator",Ue=typeof He=="symbol"?function(r){var i;return r!=null&&(i=r[He])&&i.apply(r)}:function(){return null};function ge(r,i){i=r.indexOf(i),0<=i&&r.splice(i,1)}var Me={};function Fe(r){var i,l,f,p;if(arguments.length===1){if(d(r))return r.slice();if(this===Me&&typeof r=="string")return[r];if(p=Ue(r))for(l=[];!(f=p.next()).done;)l.push(f.value);else{if(r==null)return[r];if(typeof(i=r.length)!="number")return[r];for(l=new Array(i);i--;)l[i]=r[i]}}else for(i=arguments.length,l=new Array(i);i--;)l[i]=arguments[i];return l}var fe=typeof Symbol<"u"?function(r){return r[Symbol.toStringTag]==="AsyncFunction"}:function(){return!1},G=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],Ye=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(G),X={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function ke(r,i){this.name=r,this.message=i}function st(r,i){return r+". Errors: "+Object.keys(i).map(function(l){return i[l].toString()}).filter(function(l,f,p){return p.indexOf(l)===f}).join(`
`)}function pt(r,i,l,f){this.failures=i,this.failedKeys=f,this.successCount=l,this.message=st(r,i)}function ht(r,i){this.name="BulkError",this.failures=Object.keys(i).map(function(l){return i[l]}),this.failuresByPos=i,this.message=st(r,this.failures)}W(ke).from(Error).extend({toString:function(){return this.name+": "+this.message}}),W(pt).from(ke),W(ht).from(ke);var Yt=Ye.reduce(function(r,i){return r[i]=i+"Error",r},{}),Jt=ke,je=Ye.reduce(function(r,i){var l=i+"Error";function f(p,v){this.name=l,p?typeof p=="string"?(this.message="".concat(p).concat(v?`
`+v:""),this.inner=v||null):typeof p=="object"&&(this.message="".concat(p.name," ").concat(p.message),this.inner=p):(this.message=X[i]||l,this.inner=null)}return W(f).from(Jt),r[i]=f,r},{}),w=(je.Syntax=SyntaxError,je.Type=TypeError,je.Range=RangeError,G.reduce(function(r,i){return r[i+"Error"]=je[i],r},{}));G=Ye.reduce(function(r,i){return["Syntax","Type","Range"].indexOf(i)===-1&&(r[i+"Error"]=je[i]),r},{});function g(){}function P(r){return r}function ae(r,i){return r==null||r===P?i:function(l){return i(r(l))}}function se(r,i){return function(){r.apply(this,arguments),i.apply(this,arguments)}}function ue(r,i){return r===g?i:function(){var l=r.apply(this,arguments),f=(l!==void 0&&(arguments[0]=l),this.onsuccess),p=this.onerror,v=(this.onsuccess=null,this.onerror=null,i.apply(this,arguments));return f&&(this.onsuccess=this.onsuccess?se(f,this.onsuccess):f),p&&(this.onerror=this.onerror?se(p,this.onerror):p),v!==void 0?v:l}}function ye(r,i){return r===g?i:function(){r.apply(this,arguments);var l=this.onsuccess,f=this.onerror;this.onsuccess=this.onerror=null,i.apply(this,arguments),l&&(this.onsuccess=this.onsuccess?se(l,this.onsuccess):l),f&&(this.onerror=this.onerror?se(f,this.onerror):f)}}function oe(r,i){return r===g?i:function(){var l=r.apply(this,arguments),f=(h(arguments[0],l),this.onsuccess),p=this.onerror,v=(this.onsuccess=null,this.onerror=null,i.apply(this,arguments));return f&&(this.onsuccess=this.onsuccess?se(f,this.onsuccess):f),p&&(this.onerror=this.onerror?se(p,this.onerror):p),l===void 0?v===void 0?void 0:v:h(l,v)}}function we(r,i){return r===g?i:function(){return i.apply(this,arguments)!==!1&&r.apply(this,arguments)}}function H(r,i){return r===g?i:function(){var l=r.apply(this,arguments);if(l&&typeof l.then=="function"){for(var f=this,p=arguments.length,v=new Array(p);p--;)v[p]=arguments[p];return l.then(function(){return i.apply(f,v)})}return i.apply(this,arguments)}}G.ModifyError=pt,G.DexieError=ke,G.BulkError=ht;var U=typeof location<"u"&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function Y(r){U=r}var Ae={},Ne=100,Je=typeof Promise>"u"?[]:(Ye=Promise.resolve(),typeof crypto<"u"&&crypto.subtle?[Je=crypto.subtle.digest("SHA-512",new Uint8Array([0])),y(Je),Ye]:[Ye,y(Ye),Ye]),Ye=Je[0],Br=Je[1],Br=Br&&Br.then,Qe=Ye&&Ye.constructor,vt=!!Je[2],_t=function(r,i){Hn.push([r,i]),Bt&&(queueMicrotask($f),Bt=!1)},Xt=!0,Bt=!0,Zt=[],pr=[],Ot=P,$t={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:g,pgp:!1,env:{},finalize:g},Ie=$t,Hn=[],hr=0,Ws=[];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&&yi(this,this._value)}else this._state=null,this._value=null,++i.ref,function l(f,p){try{p(function(v){if(f._state===null){if(v===f)throw new TypeError("A promise cannot be resolved with itself.");var b=f._lib&&Rr();v&&typeof v.then=="function"?l(f,function(_,S){v instanceof Se?v._then(_,S):v.then(_,S)}):(f._state=!0,f._value=v,al(f)),b&&Lr()}},yi.bind(null,f))}catch(v){yi(f,v)}}(this,r)}var mi={get:function(){var r=Ie,i=Js;function l(f,p){var v=this,b=!r.global&&(r!==Ie||i!==Js),_=b&&!zn(),S=new Se(function(V,T){gi(v,new il(ul(f,r,b,_),ul(p,r,b,_),V,T,r))});return this._consoleTask&&(S._consoleTask=this._consoleTask),S}return l.prototype=Ae,l},set:function(r){K(this,"then",r&&r.prototype===Ae?mi:{get:function(){return r},set:mi.set})}};function il(r,i,l,f,p){this.onFulfilled=typeof r=="function"?r:null,this.onRejected=typeof i=="function"?i:null,this.resolve=l,this.reject=f,this.psd=p}function yi(r,i){var l,f;pr.push(i),r._state===null&&(l=r._lib&&Rr(),i=Ot(i),r._state=!1,r._value=i,f=r,Zt.some(function(p){return p._value===f._value})||Zt.push(f),al(r),l)&&Lr()}function al(r){var i=r._listeners;r._listeners=[];for(var l=0,f=i.length;l<f;++l)gi(r,i[l]);var p=r._PSD;--p.ref||p.finalize(),hr===0&&(++hr,_t(function(){--hr==0&&bi()},[]))}function gi(r,i){if(r._state===null)r._listeners.push(i);else{var l=r._state?i.onFulfilled:i.onRejected;if(l===null)return(r._state?i.resolve:i.reject)(r._value);++i.psd.ref,++hr,_t(Ef,[l,r,i])}}function Ef(r,i,l){try{var f,p=i._value;!i._state&&pr.length&&(pr=[]),f=U&&i._consoleTask?i._consoleTask.run(function(){return r(p)}):r(p),i._state||pr.indexOf(p)!==-1||(v=>{for(var b=Zt.length;b;)if(Zt[--b]._value===v._value)return Zt.splice(b,1)})(i),l.resolve(f)}catch(v){l.reject(v)}finally{--hr==0&&bi(),--l.psd.ref||l.psd.finalize()}}function $f(){vr($t,function(){Rr()&&Lr()})}function Rr(){var r=Xt;return Bt=Xt=!1,r}function Lr(){var r,i,l;do for(;0<Hn.length;)for(r=Hn,Hn=[],l=r.length,i=0;i<l;++i){var f=r[i];f[0].apply(null,f[1])}while(0<Hn.length);Bt=Xt=!0}function bi(){for(var r=Zt,i=(Zt=[],r.forEach(function(f){f._PSD.onunhandled.call(null,f._value,f)}),Ws.slice(0)),l=i.length;l;)i[--l]()}function zs(r){return new Se(Ae,!1,r)}function mt(r,i){var l=Ie;return function(){var f=Rr(),p=Ie;try{return Gn(l,!0),r.apply(this,arguments)}catch(v){i&&i(v)}finally{Gn(p,!1),f&&Lr()}}}D(Se.prototype,{then:mi,_then:function(r,i){gi(this,new il(null,null,r,i,Ie))},catch:function(r){var i,l;return arguments.length===1?this.then(null,r):(i=r,l=arguments[1],typeof i=="function"?this.then(null,function(f){return(f instanceof i?l:zs)(f)}):this.then(null,function(f){return(f&&f.name===i?l:zs)(f)}))},finally:function(r){return this.then(function(i){return Se.resolve(r()).then(function(){return i})},function(i){return Se.resolve(r()).then(function(){return zs(i)})})},timeout:function(r,i){var l=this;return r<1/0?new Se(function(f,p){var v=setTimeout(function(){return p(new je.Timeout(i))},r);l.then(f,p).finally(clearTimeout.bind(null,v))}):this}}),typeof Symbol<"u"&&Symbol.toStringTag&&K(Se.prototype,Symbol.toStringTag,"Dexie.Promise"),$t.env=ll(),D(Se,{all:function(){var r=Fe.apply(null,arguments).map(Xs);return new Se(function(i,l){r.length===0&&i([]);var f=r.length;r.forEach(function(p,v){return Se.resolve(p).then(function(b){r[v]=b,--f||i(r)},l)})})},resolve:function(r){return r instanceof Se?r:r&&typeof r.then=="function"?new Se(function(i,l){r.then(i,l)}):new Se(Ae,!0,r)},reject:zs,race:function(){var r=Fe.apply(null,arguments).map(Xs);return new Se(function(i,l){r.map(function(f){return Se.resolve(f).then(i,l)})})},PSD:{get:function(){return Ie},set:function(r){return Ie=r}},totalEchoes:{get:function(){return Js}},newPSD:Wn,usePSD:vr,scheduler:{get:function(){return _t},set:function(r){_t=r}},rejectionMapper:{get:function(){return Ot},set:function(r){Ot=r}},follow:function(r,i){return new Se(function(l,f){return Wn(function(p,v){var b=Ie;b.unhandleds=[],b.onunhandled=v,b.finalize=se(function(){var _,S=this;_=function(){S.unhandleds.length===0?p():v(S.unhandleds[0])},Ws.push(function V(){_(),Ws.splice(Ws.indexOf(V),1)}),++hr,_t(function(){--hr==0&&bi()},[])},b.finalize),r()},i,l,f)})}}),Qe&&(Qe.allSettled&&K(Se,"allSettled",function(){var r=Fe.apply(null,arguments).map(Xs);return new Se(function(i){r.length===0&&i([]);var l=r.length,f=new Array(l);r.forEach(function(p,v){return Se.resolve(p).then(function(b){return f[v]={status:"fulfilled",value:b}},function(b){return f[v]={status:"rejected",reason:b}}).then(function(){return--l||i(f)})})})}),Qe.any&&typeof AggregateError<"u"&&K(Se,"any",function(){var r=Fe.apply(null,arguments).map(Xs);return new Se(function(i,l){r.length===0&&l(new AggregateError([]));var f=r.length,p=new Array(f);r.forEach(function(v,b){return Se.resolve(v).then(function(_){return i(_)},function(_){p[b]=_,--f||l(new AggregateError(p))})})})}),Qe.withResolvers)&&(Se.withResolvers=Qe.withResolvers);var Pt={awaits:0,echoes:0,id:0},Af=0,Gs=[],Ys=0,Js=0,Pf=0;function Wn(r,b,l,f){var p=Ie,v=Object.create(p),b=(v.parent=p,v.ref=0,v.global=!1,v.id=++Pf,$t.env,v.env=vt?{Promise:Se,PromiseProp:{value:Se,configurable:!0,writable:!0},all:Se.all,race:Se.race,allSettled:Se.allSettled,any:Se.any,resolve:Se.resolve,reject:Se.reject}:{},b&&h(v,b),++p.ref,v.finalize=function(){--this.parent.ref||this.parent.finalize()},vr(v,r,l,f));return v.ref===0&&v.finalize(),b}function Kr(){return Pt.id||(Pt.id=++Af),++Pt.awaits,Pt.echoes+=Ne,Pt.id}function zn(){return!!Pt.awaits&&(--Pt.awaits==0&&(Pt.id=0),Pt.echoes=Pt.awaits*Ne,!0)}function Xs(r){return Pt.echoes&&r&&r.constructor===Qe?(Kr(),r.then(function(i){return zn(),i},function(i){return zn(),Ct(i)})):r}function Tf(){var r=Gs[Gs.length-1];Gs.pop(),Gn(r,!1)}function Gn(r,i){var l,f,p=Ie;(i?!Pt.echoes||Ys++&&r===Ie:!Ys||--Ys&&r===Ie)||queueMicrotask(i?(function(v){++Js,Pt.echoes&&--Pt.echoes!=0||(Pt.echoes=Pt.awaits=Pt.id=0),Gs.push(Ie),Gn(v,!0)}).bind(null,r):Tf),r!==Ie&&(Ie=r,p===$t&&($t.env=ll()),vt)&&(l=$t.env.Promise,f=r.env,p.global||r.global)&&(Object.defineProperty(a,"Promise",f.PromiseProp),l.all=f.all,l.race=f.race,l.resolve=f.resolve,l.reject=f.reject,f.allSettled&&(l.allSettled=f.allSettled),f.any)&&(l.any=f.any)}function ll(){var r=a.Promise;return vt?{Promise:r,PromiseProp:Object.getOwnPropertyDescriptor(a,"Promise"),all:r.all,race:r.race,allSettled:r.allSettled,any:r.any,resolve:r.resolve,reject:r.reject}:{}}function vr(r,i,l,f,p){var v=Ie;try{return Gn(r,!0),i(l,f,p)}finally{Gn(v,!1)}}function ul(r,i,l,f){return typeof r!="function"?r:function(){var p=Ie;l&&Kr(),Gn(i,!0);try{return r.apply(this,arguments)}finally{Gn(p,!1),f&&queueMicrotask(zn)}}}function wi(r){Promise===Qe&&Pt.echoes===0?Ys===0?r():enqueueNativeMicroTask(r):setTimeout(r,0)}(""+Br).indexOf("[native code]")===-1&&(Kr=zn=g);var Ct=Se.reject,mr="￿",On="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",cl="String expected.",Qs="__dbnames",_i="readonly",ki="readwrite";function yr(r,i){return r?i?function(){return r.apply(this,arguments)&&i.apply(this,arguments)}:r:i}var fl={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function Zs(r){return typeof r!="string"||/\./.test(r)?function(i){return i}:function(i){return i[r]===void 0&&r in i&&delete(i=Ce(i))[r],i}}function dl(){throw je.Type("Entity instances must never be new:ed. Instances are generated by the framework bypassing the constructor.")}function tt(r,i){try{var l=pl(r),f=pl(i);if(l!==f)return l==="Array"?1:f==="Array"?-1:l==="binary"?1:f==="binary"?-1:l==="string"?1:f==="string"?-1:l==="Date"?1:f!=="Date"?NaN:-1;switch(l){case"number":case"Date":case"string":return i<r?1:r<i?-1:0;case"binary":for(var p=hl(r),v=hl(i),b=p.length,_=v.length,S=b<_?b:_,V=0;V<S;++V)if(p[V]!==v[V])return p[V]<v[V]?-1:1;return b===_?0:b<_?-1:1;case"Array":for(var T=r,C=i,$=T.length,R=C.length,I=$<R?$:R,M=0;M<I;++M){var j=tt(T[M],C[M]);if(j!==0)return j}return $===R?0:$<R?-1:1}}catch{}return NaN}function pl(r){var i=typeof r;return i=="object"&&(ArrayBuffer.isView(r)||(i=Xe(r))==="ArrayBuffer")?"binary":i}function hl(r){return r instanceof Uint8Array?r:ArrayBuffer.isView(r)?new Uint8Array(r.buffer,r.byteOffset,r.byteLength):new Uint8Array(r)}function eo(r,i,l){var f=r.schema.yProps;return f?(i&&0<l.numFailures&&(i=i.filter(function(p,v){return!l.failures[v]})),Promise.all(f.map(function(p){return p=p.updatesTable,i?r.db.table(p).where("k").anyOf(i).delete():r.db.table(p).clear()})).then(function(){return l})):l}vl.prototype.execute=function(r){var i=this["@@propmod"];if(i.add!==void 0){var l=i.add;if(d(l))return o(o([],d(r)?r:[],!0),l).sort();if(typeof l=="number")return(Number(r)||0)+l;if(typeof l=="bigint")try{return BigInt(r)+l}catch{return BigInt(0)+l}throw new TypeError("Invalid term ".concat(l))}if(i.remove!==void 0){var f=i.remove;if(d(f))return d(r)?r.filter(function(p){return!f.includes(p)}).sort():[];if(typeof f=="number")return Number(r)-f;if(typeof f=="bigint")try{return BigInt(r)-f}catch{return BigInt(0)-f}throw new TypeError("Invalid subtrahend ".concat(f))}return l=(l=i.replacePrefix)==null?void 0:l[0],l&&typeof r=="string"&&r.startsWith(l)?i.replacePrefix[1]+r.substring(l.length):r};var ss=vl;function vl(r){this["@@propmod"]=r}function ml(r,i){for(var l=c(i),f=l.length,p=!1,v=0;v<f;++v){var b=l[v],_=i[b],S=ce(r,b);_ instanceof ss?(ee(r,b,_.execute(S)),p=!0):S!==_&&(ee(r,b,_),p=!0)}return p}ft.prototype._trans=function(r,i,l){var f=this._tx||Ie.trans,p=this.name,v=U&&typeof console<"u"&&console.createTask&&console.createTask("Dexie: ".concat(r==="readonly"?"read":"write"," ").concat(this.name));function b(V,T,C){if(C.schema[p])return i(C.idbtrans,C);throw new je.NotFound("Table "+p+" not part of transaction")}var _=Rr();try{var S=f&&f.db._novip===this.db._novip?f===Ie.trans?f._promise(r,b,l):Wn(function(){return f._promise(r,b,l)},{trans:f,transless:Ie.transless||Ie}):function V(T,C,$,R){if(T.idbdb&&(T._state.openComplete||Ie.letThrough||T._vip)){var I=T._createTransaction(C,$,T._dbSchema);try{I.create(),T._state.PR1398_maxLoop=3}catch(M){return M.name===Yt.InvalidState&&T.isOpen()&&0<--T._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),T.close({disableAutoOpen:!1}),T.open().then(function(){return V(T,C,$,R)})):Ct(M)}return I._promise(C,function(M,j){return Wn(function(){return Ie.trans=I,R(M,j,I)})}).then(function(M){if(C==="readwrite")try{I.idbtrans.commit()}catch{}return C==="readonly"?M:I._completion.then(function(){return M})})}if(T._state.openComplete)return Ct(new je.DatabaseClosed(T._state.dbOpenError));if(!T._state.isBeingOpened){if(!T._state.autoOpen)return Ct(new je.DatabaseClosed);T.open().catch(g)}return T._state.dbReadyPromise.then(function(){return V(T,C,$,R)})}(this.db,r,[this.name],b);return v&&(S._consoleTask=v,S=S.catch(function(V){return console.trace(V),Ct(V)})),S}finally{_&&Lr()}},ft.prototype.get=function(r,i){var l=this;return r&&r.constructor===Object?this.where(r).first(i):r==null?Ct(new je.Type("Invalid argument to Table.get()")):this._trans("readonly",function(f){return l.core.get({trans:f,key:r}).then(function(p){return l.hook.reading.fire(p)})}).then(i)},ft.prototype.where=function(r){if(typeof r=="string")return new this.db.WhereClause(this,r);if(d(r))return new this.db.WhereClause(this,"[".concat(r.join("+"),"]"));var i=c(r);if(i.length===1)return this.where(i[0]).equals(r[i[0]]);var l=this.schema.indexes.concat(this.schema.primKey).filter(function(_){if(_.compound&&i.every(function(V){return 0<=_.keyPath.indexOf(V)})){for(var S=0;S<i.length;++S)if(i.indexOf(_.keyPath[S])===-1)return!1;return!0}return!1}).sort(function(_,S){return _.keyPath.length-S.keyPath.length})[0];if(l&&this.db._maxKey!==mr)return b=l.keyPath.slice(0,i.length),this.where(b).equals(b.map(function(_){return r[_]}));!l&&U&&console.warn("The query ".concat(JSON.stringify(r)," on ").concat(this.name," would benefit from a ")+"compound index [".concat(i.join("+"),"]"));var f=this.schema.idxByName;function p(_,S){return tt(_,S)===0}var b=i.reduce(function(T,S){var V=T[0],T=T[1],C=f[S],$=r[S];return[V||C,V||!C?yr(T,C&&C.multi?function(R){return R=ce(R,S),d(R)&&R.some(function(I){return p($,I)})}:function(R){return p($,ce(R,S))}):T]},[null,null]),v=b[0],b=b[1];return v?this.where(v.name).equals(r[v.keyPath]).filter(b):l?this.filter(b):this.where(i).equals("")},ft.prototype.filter=function(r){return this.toCollection().and(r)},ft.prototype.count=function(r){return this.toCollection().count(r)},ft.prototype.offset=function(r){return this.toCollection().offset(r)},ft.prototype.limit=function(r){return this.toCollection().limit(r)},ft.prototype.each=function(r){return this.toCollection().each(r)},ft.prototype.toArray=function(r){return this.toCollection().toArray(r)},ft.prototype.toCollection=function(){return new this.db.Collection(new this.db.WhereClause(this))},ft.prototype.orderBy=function(r){return new this.db.Collection(new this.db.WhereClause(this,d(r)?"[".concat(r.join("+"),"]"):r))},ft.prototype.reverse=function(){return this.toCollection().reverse()},ft.prototype.mapToClass=function(r){for(var i=this.db,l=this.name,f=((this.schema.mappedClass=r).prototype instanceof dl&&(r=(b=>{var _=T,S=b;if(typeof S!="function"&&S!==null)throw new TypeError("Class extends value "+String(S)+" is not a constructor or null");function V(){this.constructor=_}function T(){return b!==null&&b.apply(this,arguments)||this}return n(_,S),_.prototype=S===null?Object.create(S):(V.prototype=S.prototype,new V),Object.defineProperty(T.prototype,"db",{get:function(){return i},enumerable:!1,configurable:!0}),T.prototype.table=function(){return l},T})(r)),new Set),p=r.prototype;p;p=y(p))Object.getOwnPropertyNames(p).forEach(function(b){return f.add(b)});function v(b){if(!b)return b;var _,S=Object.create(r.prototype);for(_ in b)if(!f.has(_))try{S[_]=b[_]}catch{}return S}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,f=this.schema.primKey,p=f.auto,v=f.keyPath,b=r;return v&&p&&(b=Zs(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 _})},ft.prototype.upsert=function(r,i){var l=this,f=this.schema.primKey.keyPath;return this._trans("readwrite",function(p){return l.core.get({trans:p,key:r}).then(function(v){var b=v??{};return ml(b,i),f&&ee(b,f,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})})})},ft.prototype.update=function(r,i){return typeof r!="object"||d(r)?this.where(":id").equals(r).modify(i):(r=ce(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)},ft.prototype.put=function(r,i){var l=this,f=this.schema.primKey,p=f.auto,v=f.keyPath,b=r;return v&&p&&(b=Zs(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 _})},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(f){return eo(i,[r],f)}).then(function(f){return f.numFailures?Se.reject(f.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:fl}).then(function(l){return eo(r,null,l)})}).then(function(i){return i.numFailures?Se.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(f){return f.map(function(p){return i.hook.reading.fire(p)})})})},ft.prototype.bulkAdd=function(r,i,l){var f=this,p=Array.isArray(i)?i:void 0,v=(l=l||(p?void 0:i))?l.allKeys:void 0;return this._trans("readwrite",function(b){var _=f.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 S=r.length,V=_&&V?r.map(Zs(_)):r;return f.core.mutate({trans:b,type:"add",keys:p,values:V,wantResults:v}).then(function(T){var C=T.numFailures,$=T.failures;if(C===0)return v?T.results:T.lastResult;throw new ht("".concat(f.name,".bulkAdd(): ").concat(C," of ").concat(S," operations failed"),$)})})},ft.prototype.bulkPut=function(r,i,l){var f=this,p=Array.isArray(i)?i:void 0,v=(l=l||(p?void 0:i))?l.allKeys:void 0;return this._trans("readwrite",function(b){var _=f.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 S=r.length,V=_&&V?r.map(Zs(_)):r;return f.core.mutate({trans:b,type:"put",keys:p,values:V,wantResults:v}).then(function(T){var C=T.numFailures,$=T.failures;if(C===0)return v?T.results:T.lastResult;throw new ht("".concat(f.name,".bulkPut(): ").concat(C," of ").concat(S," operations failed"),$)})})},ft.prototype.bulkUpdate=function(r){var i=this,l=this.core,f=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:f,cache:"clone"}).then(function(_){var S=[],V=[],T=(r.forEach(function(C,$){var R=C.key,I=C.changes,M=_[$];if(M){for(var j=0,z=Object.keys(I);j<z.length;j++){var B=z[j],te=I[B];if(B===i.schema.primKey.keyPath){if(tt(te,R)!==0)throw new je.Constraint("Cannot update primary key in bulkUpdate()")}else ee(M,B,te)}v.push($),S.push(R),V.push(M)}}),S.length);return l.mutate({trans:b,type:"put",keys:S,values:V,updates:{keys:f,changeSpecs:p}}).then(function(C){var $=C.numFailures,R=C.failures;if($===0)return T;for(var I=0,M=Object.keys(R);I<M.length;I++){var j,z=M[I],B=v[Number(z)];B!=null&&(j=R[z],delete R[z],R[B]=j)}throw new ht("".concat(i.name,".bulkUpdate(): ").concat($," of ").concat(T," operations failed"),R)})})})},ft.prototype.bulkDelete=function(r){var i=this,l=r.length;return this._trans("readwrite",function(f){return i.core.mutate({trans:f,type:"delete",keys:r}).then(function(p){return eo(i,r,p)})}).then(function(f){var p=f.numFailures,v=f.failures;if(p===0)return f.lastResult;throw new ht("".concat(i.name,".bulkDelete(): ").concat(p," of ").concat(l," operations failed"),v)})};var yl=ft;function ft(){}function os(r){function i(b,_){if(_){for(var S=arguments.length,V=new Array(S-1);--S;)V[S-1]=arguments[S];return l[b].subscribe.apply(null,V),r}if(typeof b=="string")return l[b]}var l={};i.addEventType=v;for(var f=1,p=arguments.length;f<p;++f)v(arguments[f]);return i;function v(b,_,S){var V,T;if(typeof b!="object")return _=_||we,T={subscribers:[],fire:S=S||g,subscribe:function(C){T.subscribers.indexOf(C)===-1&&(T.subscribers.push(C),T.fire=_(T.fire,C))},unsubscribe:function(C){T.subscribers=T.subscribers.filter(function($){return $!==C}),T.fire=T.subscribers.reduce(_,S)}},l[b]=i[b]=T;c(V=b).forEach(function(C){var $=V[C];if(d($))v(C,V[C][0],V[C][1]);else{if($!=="asap")throw new je.InvalidArgument("Invalid event config");var R=v(C,P,function(){for(var I=arguments.length,M=new Array(I);I--;)M[I]=arguments[I];R.subscribers.forEach(function(j){le(function(){j.apply(null,M)})})})}})}}function is(r,i){return W(i).from({prototype:r}),i}function Fr(r,i){return!(r.filter||r.algorithm||r.or)&&(i?r.justLimit:!r.replayFilter)}function xi(r,i){r.filter=yr(r.filter,i)}function Ci(r,i,l){var f=r.replayFilter;r.replayFilter=f?function(){return yr(f(),i())}:i,r.justLimit=l&&!f}function to(r,i){if(r.isPrimKey)return i.primaryKey;var l=i.getIndexByKeyPath(r.index);if(l)return l;throw new je.Schema("KeyPath "+r.index+" on object store "+i.name+" is not indexed")}function gl(r,i,l){var f=to(r,i.schema);return i.openCursor({trans:l,values:!r.keysOnly,reverse:r.dir==="prev",unique:!!r.unique,query:{index:f,range:r.range}})}function no(r,i,l,f){var p,v,b=r.replayFilter?yr(r.filter,r.replayFilter()):r.filter;return r.or?(p={},v=function(_,S,V){var T,C;b&&!b(S,V,function($){return S.stop($)},function($){return S.fail($)})||((C=""+(T=S.primaryKey))=="[object ArrayBuffer]"&&(C=""+new Uint8Array(T)),k(p,C))||(p[C]=!0,i(_,S,V))},Promise.all([r.or._iterate(v,l),bl(gl(r,f,l),r.algorithm,v,!r.keysOnly&&r.valueMapper)])):bl(gl(r,f,l),yr(r.algorithm,b),i,!r.keysOnly&&r.valueMapper)}function bl(r,i,l,f){var p=mt(f?function(v,b,_){return l(f(v),b,_)}:l);return r.then(function(v){if(v)return v.start(function(){var b=function(){return v.continue()};i&&!i(v,function(_){return b=_},function(_){v.stop(_),b=g},function(_){v.fail(_),b=g})||p(v.value,v,function(_){return b=_}),b()})})}nt.prototype._read=function(r,i){var l=this._ctx;return l.error?l.table._trans(null,Ct.bind(null,l.error)):l.table._trans("readonly",r).then(i)},nt.prototype._write=function(r){var i=this._ctx;return i.error?i.table._trans(null,Ct.bind(null,i.error)):i.table._trans("readwrite",r,"locked")},nt.prototype._addAlgorithm=function(r){var i=this._ctx;i.algorithm=yr(i.algorithm,r)},nt.prototype._iterate=function(r,i){return no(this._ctx,r,i,this._ctx.table.core)},nt.prototype.clone=function(r){var i=Object.create(this.constructor.prototype),l=Object.create(this._ctx);return r&&h(l,r),i._ctx=l,i},nt.prototype.raw=function(){return this._ctx.valueMapper=null,this},nt.prototype.each=function(r){var i=this._ctx;return this._read(function(l){return no(i,r,l,i.table.core)})},nt.prototype.count=function(r){var i=this;return this._read(function(l){var f,p=i._ctx,v=p.table.core;return Fr(p,!0)?v.count({trans:l,query:{index:to(p,v.schema),range:p.range}}).then(function(b){return Math.min(b,p.limit)}):(f=0,no(p,function(){return++f,!1},l,v).then(function(){return f}))}).then(r)},nt.prototype.sortBy=function(r,i){var l=r.split(".").reverse(),f=l[0],p=l.length-1;function v(S,V){return V?v(S[l[V]],V-1):S[f]}var b=this._ctx.dir==="next"?1:-1;function _(S,V){return tt(v(S,p),v(V,p))*b}return this.toArray(function(S){return S.slice().sort(_)}).then(i)},nt.prototype.toArray=function(r){var i=this;return this._read(function(l){var f,p,v,b=i._ctx;return Fr(b,!0)&&0<b.limit?(f=b.valueMapper,p=to(b,b.table.core.schema),b.table.core.query({trans:l,limit:b.limit,values:!0,direction:b.dir==="prev"?"prev":void 0,query:{index:p,range:b.range}}).then(function(_){return _=_.result,f?_.map(f):_})):(v=[],no(b,function(_){return v.push(_)},l,b.table.core).then(function(){return v}))},r)},nt.prototype.offset=function(r){var i=this._ctx;return r<=0||(i.offset+=r,Fr(i)?Ci(i,function(){var l=r;return function(f,p){return l===0||(l===1?--l:p(function(){f.advance(l),l=0}),!1)}}):Ci(i,function(){var l=r;return function(){return--l<0}})),this},nt.prototype.limit=function(r){return this._ctx.limit=Math.min(this._ctx.limit,r),Ci(this._ctx,function(){var i=r;return function(l,f,p){return--i<=0&&f(p),0<=i}},!0),this},nt.prototype.until=function(r,i){return xi(this._ctx,function(l,f,p){return!r(l.value)||(f(p),i)}),this},nt.prototype.first=function(r){return this.limit(1).toArray(function(i){return i[0]}).then(r)},nt.prototype.last=function(r){return this.reverse().first(r)},nt.prototype.filter=function(r){var i;return xi(this._ctx,function(l){return r(l.value)}),(i=this._ctx).isMatch=yr(i.isMatch,r),this},nt.prototype.and=function(r){return this.filter(r)},nt.prototype.or=function(r){return new this.db.WhereClause(this._ctx.table,r,this)},nt.prototype.reverse=function(){return this._ctx.dir=this._ctx.dir==="prev"?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this},nt.prototype.desc=function(){return this.reverse()},nt.prototype.eachKey=function(r){var i=this._ctx;return i.keysOnly=!i.isMatch,this.each(function(l,f){r(f.key,f)})},nt.prototype.eachUniqueKey=function(r){return this._ctx.unique="unique",this.eachKey(r)},nt.prototype.eachPrimaryKey=function(r){var i=this._ctx;return i.keysOnly=!i.isMatch,this.each(function(l,f){r(f.primaryKey,f)})},nt.prototype.keys=function(r){var i=this._ctx,l=(i.keysOnly=!i.isMatch,[]);return this.each(function(f,p){l.push(p.key)}).then(function(){return l}).then(r)},nt.prototype.primaryKeys=function(r){var i=this._ctx;if(Fr(i,!0)&&0<i.limit)return this._read(function(f){var p=to(i,i.table.core.schema);return i.table.core.query({trans:f,values:!1,limit:i.limit,direction:i.dir==="prev"?"prev":void 0,query:{index:p,range:i.range}})}).then(function(f){return f.result}).then(r);i.keysOnly=!i.isMatch;var l=[];return this.each(function(f,p){l.push(p.primaryKey)}).then(function(){return l}).then(r)},nt.prototype.uniqueKeys=function(r){return this._ctx.unique="unique",this.keys(r)},nt.prototype.firstKey=function(r){return this.limit(1).keys(function(i){return i[0]}).then(r)},nt.prototype.lastKey=function(r){return this.reverse().firstKey(r)},nt.prototype.distinct=function(){var r,i=this._ctx,i=i.index&&i.table.schema.idxByName[i.index];return i&&i.multi&&(r={},xi(this._ctx,function(f){var f=f.primaryKey.toString(),p=k(r,f);return r[f]=!0,!p})),this},nt.prototype.modify=function(r){var i=this,l=this._ctx;return this._write(function(f){function p(M,j){var z=j.failures;$+=M-j.numFailures;for(var B=0,te=c(z);B<te.length;B++){var pe=te[B];C.push(z[pe])}}var v=typeof r=="function"?r:function(M){return ml(M,r)},b=l.table.core,T=b.schema.primaryKey,_=T.outbound,S=T.extractKey,V=200,T=i.db._options.modifyChunkSize,C=(T&&(V=typeof T=="object"?T[b.name]||T["*"]||200:T),[]),$=0,R=[],I=r===wl;return i.clone().primaryKeys().then(function(M){function j(B){var te=Math.min(V,M.length-B),pe=M.slice(B,B+te);return(I?Promise.resolve([]):b.getMany({trans:f,keys:pe,cache:"immutable"})).then(function(ve){var _e=[],me=[],Pe=_?[]:null,be=I?pe:[];if(!I)for(var Te=0;Te<te;++Te){var he=ve[Te],Ve={value:Ce(he),primKey:M[B+Te]};v.call(Ve,Ve.value,Ve)!==!1&&(Ve.value==null?be.push(M[B+Te]):_||tt(S(he),S(Ve.value))===0?(me.push(Ve.value),_&&Pe.push(M[B+Te])):(be.push(M[B+Te]),_e.push(Ve.value)))}return Promise.resolve(0<_e.length&&b.mutate({trans:f,type:"add",values:_e}).then(function(Be){for(var Ge in Be.failures)be.splice(parseInt(Ge),1);p(_e.length,Be)})).then(function(){return(0<me.length||z&&typeof r=="object")&&b.mutate({trans:f,type:"put",keys:Pe,values:me,criteria:z,changeSpec:typeof r!="function"&&r,isAdditionalChunk:0<B}).then(function(Be){return p(me.length,Be)})}).then(function(){return(0<be.length||z&&I)&&b.mutate({trans:f,type:"delete",keys:be,criteria:z,isAdditionalChunk:0<B}).then(function(Be){return eo(l.table,be,Be)}).then(function(Be){return p(be.length,Be)})}).then(function(){return M.length>B+te&&j(B+V)})})}var z=Fr(l)&&l.limit===1/0&&(typeof r!="function"||I)&&{index:l.index,range:l.range};return j(0).then(function(){if(0<C.length)throw new pt("Error modifying one or more objects",C,$,R);return M.length})})})},nt.prototype.delete=function(){var r=this._ctx,i=r.range;return!Fr(r)||r.table.schema.yProps||!r.isPrimKey&&i.type!==3?this.modify(wl):this._write(function(l){var f=r.table.core.schema.primaryKey,p=i;return r.table.core.count({trans:l,query:{index:f,range:p}}).then(function(v){return r.table.core.mutate({trans:l,type:"deleteRange",range:p}).then(function(S){var _=S.failures,S=S.numFailures;if(S)throw new pt("Could not delete some values",Object.keys(_).map(function(V){return _[V]}),v-S);return v-S})})})};var Of=nt;function nt(){}var wl=function(r,i){return i.value=null};function Mf(r,i){return r<i?-1:r===i?0:1}function If(r,i){return i<r?-1:r===i?0:1}function en(r,i,l){return r=r instanceof kl?new r.Collection(r):r,r._ctx.error=new(l||TypeError)(i),r}function Nr(r){return new r.Collection(r,function(){return _l("")}).limit(0)}function ro(R,i,l,f){var p,v,b,_,S,V,T,C=l.length;if(!l.every(function(M){return typeof M=="string"}))return en(R,cl);function $(M){p=M==="next"?function(z){return z.toUpperCase()}:function(z){return z.toLowerCase()},v=M==="next"?function(z){return z.toLowerCase()}:function(z){return z.toUpperCase()},b=M==="next"?Mf:If;var j=l.map(function(z){return{lower:v(z),upper:p(z)}}).sort(function(z,B){return b(z.lower,B.lower)});_=j.map(function(z){return z.upper}),S=j.map(function(z){return z.lower}),T=(V=M)==="next"?"":f}$("next");var R=new R.Collection(R,function(){return Yn(_[0],S[C-1]+f)}),I=(R._ondirectionchange=function(M){$(M)},0);return R._addAlgorithm(function(M,j,z){var B=M.key;if(typeof B=="string"){var te=v(B);if(i(te,S,I))return!0;for(var pe=null,ve=I;ve<C;++ve){var _e=((me,Pe,be,Te,he,Ve)=>{for(var Be=Math.min(me.length,Te.length),Ge=-1,Ze=0;Ze<Be;++Ze){var tn=Pe[Ze];if(tn!==Te[Ze])return he(me[Ze],be[Ze])<0?me.substr(0,Ze)+be[Ze]+be.substr(Ze+1):he(me[Ze],Te[Ze])<0?me.substr(0,Ze)+Te[Ze]+be.substr(Ze+1):0<=Ge?me.substr(0,Ge)+Pe[Ge]+be.substr(Ge+1):null;he(me[Ze],tn)<0&&(Ge=Ze)}return Be<Te.length&&Ve==="next"?me+be.substr(me.length):Be<me.length&&Ve==="prev"?me.substr(0,be.length):Ge<0?null:me.substr(0,Ge)+Te[Ge]+be.substr(Ge+1)})(B,te,_[ve],S[ve],b,V);_e===null&&pe===null?I=ve+1:(pe===null||0<b(pe,_e))&&(pe=_e)}j(pe!==null?function(){M.continue(pe+T)}:z)}return!1}),R}function Yn(r,i,l,f){return{type:2,lower:r,upper:i,lowerOpen:l,upperOpen:f}}function _l(r){return{type:1,lower:r,upper:r}}Object.defineProperty(Tt.prototype,"Collection",{get:function(){return this._ctx.table.db.Collection},enumerable:!1,configurable:!0}),Tt.prototype.between=function(r,i,l,f){l=l!==!1,f=f===!0;try{return 0<this._cmp(r,i)||this._cmp(r,i)===0&&(l||f)&&(!l||!f)?Nr(this):new this.Collection(this,function(){return Yn(r,i,!l,!f)})}catch{return en(this,On)}},Tt.prototype.equals=function(r){return r==null?en(this,On):new this.Collection(this,function(){return _l(r)})},Tt.prototype.above=function(r){return r==null?en(this,On):new this.Collection(this,function(){return Yn(r,void 0,!0)})},Tt.prototype.aboveOrEqual=function(r){return r==null?en(this,On):new this.Collection(this,function(){return Yn(r,void 0,!1)})},Tt.prototype.below=function(r){return r==null?en(this,On):new this.Collection(this,function(){return Yn(void 0,r,!1,!0)})},Tt.prototype.belowOrEqual=function(r){return r==null?en(this,On):new this.Collection(this,function(){return Yn(void 0,r)})},Tt.prototype.startsWith=function(r){return typeof r!="string"?en(this,cl):this.between(r,r+mr,!0,!0)},Tt.prototype.startsWithIgnoreCase=function(r){return r===""?this.startsWith(r):ro(this,function(i,l){return i.indexOf(l[0])===0},[r],mr)},Tt.prototype.equalsIgnoreCase=function(r){return ro(this,function(i,l){return i===l[0]},[r],"")},Tt.prototype.anyOfIgnoreCase=function(){var r=Fe.apply(Me,arguments);return r.length===0?Nr(this):ro(this,function(i,l){return l.indexOf(i)!==-1},r,"")},Tt.prototype.startsWithAnyOfIgnoreCase=function(){var r=Fe.apply(Me,arguments);return r.length===0?Nr(this):ro(this,function(i,l){return l.some(function(f){return i.indexOf(f)===0})},r,mr)},Tt.prototype.anyOf=function(){var r,i,l=this,f=Fe.apply(Me,arguments),p=this._cmp;try{f.sort(p)}catch{return en(this,On)}return f.length===0?Nr(this):((r=new this.Collection(this,function(){return Yn(f[0],f[f.length-1])}))._ondirectionchange=function(v){p=v==="next"?l._ascending:l._descending,f.sort(p)},i=0,r._addAlgorithm(function(v,b,_){for(var S=v.key;0<p(S,f[i]);)if(++i===f.length)return b(_),!1;return p(S,f[i])===0||(b(function(){v.continue(f[i])}),!1)}),r)},Tt.prototype.notEqual=function(r){return this.inAnyRange([[-1/0,r],[r,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})},Tt.prototype.noneOf=function(){var r=Fe.apply(Me,arguments);if(r.length===0)return new this.Collection(this);try{r.sort(this._ascending)}catch{return en(this,On)}var i=r.reduce(function(l,f){return l?l.concat([[l[l.length-1][1],f]]):[[-1/0,f]]},null);return i.push([r[r.length-1],this.db._maxKey]),this.inAnyRange(i,{includeLowers:!1,includeUppers:!1})},Tt.prototype.inAnyRange=function(r,z){var l=this,f=this._cmp,p=this._ascending,v=this._descending,b=this._min,_=this._max;if(r.length===0)return Nr(this);if(!r.every(function(B){return B[0]!==void 0&&B[1]!==void 0&&p(B[0],B[1])<=0}))return en(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",je.InvalidArgument);var S=!z||z.includeLowers!==!1,V=z&&z.includeUppers===!0,T,C=p;function $(B,te){return C(B[0],te[0])}try{(T=r.reduce(function(B,te){for(var pe=0,ve=B.length;pe<ve;++pe){var _e=B[pe];if(f(te[0],_e[1])<0&&0<f(te[1],_e[0])){_e[0]=b(_e[0],te[0]),_e[1]=_(_e[1],te[1]);break}}return pe===ve&&B.push(te),B},[])).sort($)}catch{return en(this,On)}var R=0,I=V?function(B){return 0<p(B,T[R][1])}:function(B){return 0<=p(B,T[R][1])},M=S?function(B){return 0<v(B,T[R][0])}:function(B){return 0<=v(B,T[R][0])},j=I,z=new this.Collection(this,function(){return Yn(T[0][0],T[T.length-1][1],!S,!V)});return z._ondirectionchange=function(B){C=B==="next"?(j=I,p):(j=M,v),T.sort($)},z._addAlgorithm(function(B,te,pe){for(var ve,_e=B.key;j(_e);)if(++R===T.length)return te(pe),!1;return!I(ve=_e)&&!M(ve)||(l._cmp(_e,T[R][1])===0||l._cmp(_e,T[R][0])===0||te(function(){C===p?B.continue(T[R][0]):B.continue(T[R][1])}),!1)}),z},Tt.prototype.startsWithAnyOf=function(){var r=Fe.apply(Me,arguments);return r.every(function(i){return typeof i=="string"})?r.length===0?Nr(this):this.inAnyRange(r.map(function(i){return[i,i+mr]})):en(this,"startsWithAnyOf() only works with strings")};var kl=Tt;function Tt(){}function dn(r){return mt(function(i){return as(i),r(i.target.error),!1})}function as(r){r.stopPropagation&&r.stopPropagation(),r.preventDefault&&r.preventDefault()}var so="storagemutated",Si="x-storagemutated-1",Jn=os(null,so),jf=(yn.prototype._lock=function(){return Q(!Ie.global),++this._reculock,this._reculock!==1||Ie.global||(Ie.lockOwnerFor=this),this},yn.prototype._unlock=function(){if(Q(!Ie.global),--this._reculock==0)for(Ie.global||(Ie.lockOwnerFor=null);0<this._blockedFuncs.length&&!this._locked();){var r=this._blockedFuncs.shift();try{vr(r[1],r[0])}catch{}}return this},yn.prototype._locked=function(){return this._reculock&&Ie.lockOwnerFor!==this},yn.prototype.create=function(r){var i=this;if(this.mode){var l=this.db.idbdb,f=this.db._state.dbOpenError;if(Q(!this.idbtrans),!r&&!l)switch(f&&f.name){case"DatabaseClosedError":throw new je.DatabaseClosed(f);case"MissingAPIError":throw new je.MissingAPI(f.message,f);default:throw new je.OpenFailed(f)}if(!this.active)throw new je.TransactionInactive;Q(this._completion._state===null),(r=this.idbtrans=r||(this.db.core||l).transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability})).onerror=mt(function(p){as(p),i._reject(r.error)}),r.onabort=mt(function(p){as(p),i.active&&i._reject(new je.Abort(r.error)),i.active=!1,i.on("abort").fire(p)}),r.oncomplete=mt(function(){i.active=!1,i._resolve(),"mutatedParts"in r&&Jn.storagemutated.fire(r.mutatedParts)})}return this},yn.prototype._promise=function(r,i,l){var f,p=this;return r==="readwrite"&&this.mode!=="readwrite"?Ct(new je.ReadOnly("Transaction is readonly")):this.active?this._locked()?new Se(function(v,b){p._blockedFuncs.push([function(){p._promise(r,i,l).then(v,b)},Ie])}):l?Wn(function(){var v=new Se(function(b,_){p._lock();var S=i(b,_,p);S&&S.then&&S.then(b,_)});return v.finally(function(){return p._unlock()}),v._lib=!0,v}):((f=new Se(function(v,b){var _=i(v,b,p);_&&_.then&&_.then(v,b)}))._lib=!0,f):Ct(new je.TransactionInactive)},yn.prototype._root=function(){return this.parent?this.parent._root():this},yn.prototype.waitFor=function(r){var i,l=this._root(),f=Se.resolve(r),p=(l._waitingFor?l._waitingFor=l._waitingFor.then(function(){return f}):(l._waitingFor=f,l._waitingQueue=[],i=l.idbtrans.objectStore(l.storeNames[0]),function v(){for(++l._spinCount;l._waitingQueue.length;)l._waitingQueue.shift()();l._waitingFor&&(i.get(-1/0).onsuccess=v)}()),l._waitingFor);return new Se(function(v,b){f.then(function(_){return l._waitingQueue.push(mt(v.bind(null,_)))},function(_){return l._waitingQueue.push(mt(b.bind(null,_)))}).finally(function(){l._waitingFor===p&&(l._waitingFor=null)})})},yn.prototype.abort=function(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new je.Abort))},yn.prototype.table=function(r){var i=this._memoizedTables||(this._memoizedTables={});if(k(i,r))return i[r];var l=this.schema[r];if(l)return(l=new this.db.Table(r,l,this)).core=this.db.core.table(r),i[r]=l;throw new je.NotFound("Table "+r+" not part of transaction")},yn);function yn(){}function Ei(r,i,l,f,p,v,b,_){return{name:r,keyPath:i,unique:l,multi:f,auto:p,compound:v,src:(l&&!b?"&":"")+(f?"*":"")+(p?"++":"")+xl(i),type:_}}function xl(r){return typeof r=="string"?r:r?"["+[].join.call(r,"+")+"]":""}function $i(r,i,l){return{name:r,primKey:i,indexes:l,mappedClass:null,idxByName:(f=function(p){return[p.name,p]},l.reduce(function(p,v,b){return v=f(v,b),v&&(p[v[0]]=v[1]),p},{}))};var f}var ls=function(r){try{return r.only([[]]),ls=function(){return[[]]},[[]]}catch{return ls=function(){return mr},mr}};function Ai(r){return r==null?function(){}:typeof r=="string"?(i=r).split(".").length===1?function(l){return l[i]}:function(l){return ce(l,i)}:function(l){return ce(l,r)};var i}function Cl(r){return[].slice.call(r)}var Df=0;function us(r){return r==null?":id":typeof r=="string"?r:"[".concat(r.join("+"),"]")}function Rf(r,i,b){function f(j){if(j.type===3)return null;if(j.type===4)throw new Error("Cannot convert never type to IDBKeyRange");var R=j.lower,I=j.upper,M=j.lowerOpen,j=j.upperOpen;return R===void 0?I===void 0?null:i.upperBound(I,!!j):I===void 0?i.lowerBound(R,!!M):i.bound(R,I,!!M,!!j)}function p($){var R,I,M=$.name;return{name:M,schema:$,mutate:function(j){var z=j.trans,B=j.type,te=j.keys,pe=j.values,ve=j.range;return new Promise(function(_e,me){_e=mt(_e);var Pe=z.objectStore(M),be=Pe.keyPath==null,Te=B==="put"||B==="add";if(!Te&&B!=="delete"&&B!=="deleteRange")throw new Error("Invalid operation type: "+B);var he,Ve=(te||pe||{length:1}).length;if(te&&pe&&te.length!==pe.length)throw new Error("Given keys array must have same length as given values array.");if(Ve===0)return _e({numFailures:0,failures:{},results:[],lastResult:void 0});function Be(Ut){++tn,as(Ut)}var Ge=[],Ze=[],tn=0;if(B==="deleteRange"){if(ve.type===4)return _e({numFailures:tn,failures:Ze,results:[],lastResult:void 0});ve.type===3?Ge.push(he=Pe.clear()):Ge.push(he=Pe.delete(f(ve)))}else{var be=Te?be?[pe,te]:[pe,null]:[te,null],We=be[0],Rt=be[1];if(Te)for(var Lt=0;Lt<Ve;++Lt)Ge.push(he=Rt&&Rt[Lt]!==void 0?Pe[B](We[Lt],Rt[Lt]):Pe[B](We[Lt])),he.onerror=Be;else for(Lt=0;Lt<Ve;++Lt)Ge.push(he=Pe[B](We[Lt])),he.onerror=Be}function yo(Ut){Ut=Ut.target.result,Ge.forEach(function(wr,Wi){return wr.error!=null&&(Ze[Wi]=wr.error)}),_e({numFailures:tn,failures:Ze,results:B==="delete"?te:Ge.map(function(wr){return wr.result}),lastResult:Ut})}he.onerror=function(Ut){Be(Ut),yo(Ut)},he.onsuccess=yo})},getMany:function(j){var z=j.trans,B=j.keys;return new Promise(function(te,pe){te=mt(te);for(var ve,_e=z.objectStore(M),me=B.length,Pe=new Array(me),be=0,Te=0,he=function(Ge){Ge=Ge.target,Pe[Ge._pos]=Ge.result,++Te===be&&te(Pe)},Ve=dn(pe),Be=0;Be<me;++Be)B[Be]!=null&&((ve=_e.get(B[Be]))._pos=Be,ve.onsuccess=he,ve.onerror=Ve,++be);be===0&&te(Pe)})},get:function(j){var z=j.trans,B=j.key;return new Promise(function(te,pe){te=mt(te);var ve=z.objectStore(M).get(B);ve.onsuccess=function(_e){return te(_e.target.result)},ve.onerror=dn(pe)})},query:(R=S,I=V,function(j){return new Promise(function(z,B){z=mt(z);var te,pe,ve,_e,Ve=j.trans,me=j.values,Pe=j.limit,he=j.query,be=(be=j.direction)!=null?be:"next",Te=Pe===1/0?void 0:Pe,Be=he.index,he=he.range,Ve=Ve.objectStore(M),Ve=Be.isPrimaryKey?Ve:Ve.index(Be.name),Be=f(he);if(Pe===0)return z({result:[]});I?(he={query:Be,count:Te,direction:be},(te=me?Ve.getAll(he):Ve.getAllKeys(he)).onsuccess=function(Ge){return z({result:Ge.target.result})},te.onerror=dn(B)):R&&be==="next"?((te=me?Ve.getAll(Be,Te):Ve.getAllKeys(Be,Te)).onsuccess=function(Ge){return z({result:Ge.target.result})},te.onerror=dn(B)):(pe=0,ve=!me&&"openKeyCursor"in Ve?Ve.openKeyCursor(Be,be):Ve.openCursor(Be,be),_e=[],ve.onsuccess=function(){var Ge=ve.result;return!Ge||(_e.push(me?Ge.value:Ge.primaryKey),++pe===Pe)?z({result:_e}):void Ge.continue()},ve.onerror=dn(B))})}),openCursor:function(j){var z=j.trans,B=j.values,te=j.query,pe=j.reverse,ve=j.unique;return new Promise(function(_e,me){_e=mt(_e);var Te=te.index,Pe=te.range,be=z.objectStore(M),be=Te.isPrimaryKey?be:be.index(Te.name),Te=pe?ve?"prevunique":"prev":ve?"nextunique":"next",he=!B&&"openKeyCursor"in be?be.openKeyCursor(f(Pe),Te):be.openCursor(f(Pe),Te);he.onerror=dn(me),he.onsuccess=mt(function(Ve){var Be,Ge,Ze,tn,We=he.result;We?(We.___id=++Df,We.done=!1,Be=We.continue.bind(We),Ge=(Ge=We.continuePrimaryKey)&&Ge.bind(We),Ze=We.advance.bind(We),tn=function(){throw new Error("Cursor not stopped")},We.trans=z,We.stop=We.continue=We.continuePrimaryKey=We.advance=function(){throw new Error("Cursor not started")},We.fail=mt(me),We.next=function(){var Rt=this,Lt=1;return this.start(function(){return Lt--?Rt.continue():Rt.stop()}).then(function(){return Rt})},We.start=function(Rt){function Lt(){if(he.result)try{Rt()}catch(Ut){We.fail(Ut)}else We.done=!0,We.start=function(){throw new Error("Cursor behind last entry")},We.stop()}var yo=new Promise(function(Ut,wr){Ut=mt(Ut),he.onerror=dn(wr),We.fail=wr,We.stop=function(Wi){We.stop=We.continue=We.continuePrimaryKey=We.advance=tn,Ut(Wi)}});return he.onsuccess=mt(function(Ut){he.onsuccess=Lt,Lt()}),We.continue=Be,We.continuePrimaryKey=Ge,We.advance=Ze,Lt(),yo},_e(We)):_e(null)},me)})},count:function(j){var z=j.query,B=j.trans,te=z.index,pe=z.range;return new Promise(function(ve,_e){var me=B.objectStore(M),me=te.isPrimaryKey?me:me.index(te.name),Pe=f(pe),Pe=Pe?me.count(Pe):me.count();Pe.onsuccess=mt(function(be){return ve(be.target.result)}),Pe.onerror=dn(_e)})}}}v=b,_=Cl((b=r).objectStoreNames),T=0<_.length?v.objectStore(_[0]):{};var v,b={schema:{name:b.name,tables:_.map(function($){return v.objectStore($)}).map(function($){var R=$.keyPath,I=$.autoIncrement,j=d(R),M={},j={name:$.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:R==null,compound:j,keyPath:R,autoIncrement:I,unique:!0,extractKey:Ai(R)},indexes:Cl($.indexNames).map(function(z){return $.index(z)}).map(function(pe){var ve=pe.name,B=pe.unique,te=pe.multiEntry,pe=pe.keyPath,ve={name:ve,compound:d(pe),keyPath:pe,unique:B,multiEntry:te,extractKey:Ai(pe)};return M[us(pe)]=ve}),getIndexByKeyPath:function(z){return M[us(z)]}};return M[":id"]=j.primaryKey,R!=null&&(M[us(R)]=j.primaryKey),j})},hasGetAll:0<_.length&&"getAll"in T&&!(typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604),hasIdb3Features:"getAllRecords"in T},_=b.schema,S=b.hasGetAll,V=b.hasIdb3Features,T=_.tables.map(p),C={};return T.forEach(function($){return C[$.name]=$}),{stack:"dbcore",transaction:r.transaction.bind(r),table:function($){if(C[$])return C[$];throw new Error("Table '".concat($,"' not found"))},MIN_KEY:-1/0,MAX_KEY:ls(i),schema:_}}function Lf(r,i,l,f){return l=l.IDBKeyRange,i=Rf(i,l,f),{dbcore:r.dbcore.reduce(function(p,v){return v=v.create,s(s({},p),v(p))},i)}}function oo(r,i){var l=i.db,l=Lf(r._middlewares,l,r._deps,i);r.core=l.dbcore,r.tables.forEach(function(f){var p=f.name;r.core.schema.tables.some(function(v){return v.name===p})&&(f.core=r.core.table(p),r[p]instanceof r.Table)&&(r[p].core=f.core)})}function io(r,i,l,f){l.forEach(function(p){var v=f[p];i.forEach(function(b){var _=function S(V,T){return de(V,T)||(V=y(V))&&S(V,T)}(b,p);(!_||"value"in _&&_.value===void 0)&&(b===r.Transaction.prototype||b instanceof r.Transaction?K(b,p,{get:function(){return this.table(p)},set:function(S){O(this,p,{value:S,writable:!0,configurable:!0,enumerable:!0})}}):b[p]=new r.Table(p,v))})})}function Pi(r,i){i.forEach(function(l){for(var f in l)l[f]instanceof r.Table&&delete l[f]})}function Kf(r,i){return r._cfg.version-i._cfg.version}function Ff(r,i,l,f){var p=r._dbSchema,v=(l.objectStoreNames.contains("$meta")&&!p.$meta&&(p.$meta=$i("$meta",El("")[0],[]),r._storeNames.push("$meta")),r._createTransaction("readwrite",r._storeNames,p)),b=(v.create(l),v._completion.catch(f),v._reject.bind(v)),_=Ie.transless||Ie;Wn(function(){if(Ie.trans=v,Ie.transless=_,i!==0)return oo(r,l),V=i,((S=v).storeNames.includes("$meta")?S.table("$meta").get("version").then(function(T){return T??V}):Se.resolve(V)).then(function(j){var C=r,$=j,R=v,I=l,M=[],j=C._versions,z=C._dbSchema=lo(0,C.idbdb,I);return(j=j.filter(function(B){return B._cfg.version>=$})).length===0?Se.resolve():(j.forEach(function(B){M.push(function(){var te,pe,ve,_e=z,me=B._cfg.dbschema,Pe=(uo(C,_e,I),uo(C,me,I),z=C._dbSchema=me,Ti(_e,me)),be=(Pe.add.forEach(function(Te){Oi(I,Te[0],Te[1].primKey,Te[1].indexes)}),Pe.change.forEach(function(Te){if(Te.recreate)throw new je.Upgrade("Not yet support for changing primary key");var he=I.objectStore(Te.name);Te.add.forEach(function(Ve){return ao(he,Ve)}),Te.change.forEach(function(Ve){he.deleteIndex(Ve.name),ao(he,Ve)}),Te.del.forEach(function(Ve){return he.deleteIndex(Ve)})}),B._cfg.contentUpgrade);if(be&&B._cfg.version>$)return oo(C,I),R._memoizedTables={},te=A(me),Pe.del.forEach(function(Te){te[Te]=_e[Te]}),Pi(C,[C.Transaction.prototype]),io(C,[C.Transaction.prototype],c(te),te),R.schema=te,(pe=fe(be))&&Kr(),me=Se.follow(function(){var Te;(ve=be(R))&&pe&&(Te=zn.bind(null,null),ve.then(Te,Te))}),ve&&typeof ve.then=="function"?Se.resolve(ve):me.then(function(){return ve})}),M.push(function(te){var pe,ve,_e=B._cfg.dbschema;pe=_e,ve=te,[].slice.call(ve.db.objectStoreNames).forEach(function(me){return pe[me]==null&&ve.db.deleteObjectStore(me)}),Pi(C,[C.Transaction.prototype]),io(C,[C.Transaction.prototype],C._storeNames,C._dbSchema),R.schema=C._dbSchema}),M.push(function(te){C.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(C.idbdb.version/10)===B._cfg.version?(C.idbdb.deleteObjectStore("$meta"),delete C._dbSchema.$meta,C._storeNames=C._storeNames.filter(function(pe){return pe!=="$meta"})):te.objectStore("$meta").put(B._cfg.version,"version"))})}),function B(){return M.length?Se.resolve(M.shift()(R.idbtrans)).then(B):Se.resolve()}().then(function(){Sl(z,I)}))}).catch(b);var S,V;c(p).forEach(function(T){Oi(l,T,p[T].primKey,p[T].indexes)}),oo(r,l),Se.follow(function(){return r.on.populate.fire(v)}).catch(b)})}function Nf(r,i){Sl(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=lo(0,r.idbdb,i);uo(r,r._dbSchema,i);for(var f=0,p=Ti(l,r._dbSchema).change;f<p.length;f++){var v=(b=>{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(S){U&&console.debug("Dexie upgrade patch: Creating missing index ".concat(b.name,".").concat(S.src)),ao(_,S)})})(p[f]);if(typeof v=="object")return v.value}}function Ti(r,i){var l,f={del:[],add:[],change:[]};for(l in r)i[l]||f.del.push(l);for(l in i){var p=r[l],v=i[l];if(p){var 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,f.change.push(b);else{var _=p.idxByName,S=v.idxByName,V=void 0;for(V in _)S[V]||b.del.push(V);for(V in S){var T=_[V],C=S[V];T?T.src!==C.src&&b.change.push(C):b.add.push(C)}(0<b.del.length||0<b.add.length||0<b.change.length)&&f.change.push(b)}}else f.add.push([l,v])}return f}function Oi(r,i,l,f){var p=r.db.createObjectStore(i,l.keyPath?{keyPath:l.keyPath,autoIncrement:l.auto}:{autoIncrement:l.auto});f.forEach(function(v){return ao(p,v)})}function Sl(r,i){c(r).forEach(function(l){i.db.objectStoreNames.contains(l)||(U&&console.debug("Dexie: Creating missing table",l),Oi(i,l,r[l].primKey,r[l].indexes))})}function ao(r,i){r.createIndex(i.name,i.keyPath,{unique:i.unique,multiEntry:i.multi})}function lo(r,i,l){var f={};return E(i.objectStoreNames,0).forEach(function(p){for(var v=l.objectStore(p),b=Ei(xl(V=v.keyPath),V||"",!0,!1,!!v.autoIncrement,V&&typeof V!="string",!0),_=[],S=0;S<v.indexNames.length;++S){var T=v.index(v.indexNames[S]),V=T.keyPath,T=Ei(T.name,V,!!T.unique,!!T.multiEntry,!1,V&&typeof V!="string",!1);_.push(T)}f[p]=$i(p,b,_)}),f}function uo(r,i,l){for(var f=l.db.objectStoreNames,p=0;p<f.length;++p){var v=f[p],b=l.objectStore(v);r._hasGetAll="getAll"in b;for(var _=0;_<b.indexNames.length;++_){var S,V=b.indexNames[_],T=b.index(V).keyPath,T=typeof T=="string"?T:"["+E(T).join("+")+"]";i[v]&&(S=i[v].idxByName[T])&&(S.name=V,delete i[v].idxByName[T],i[v].idxByName[V]=S)}}typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&a.WorkerGlobalScope&&a instanceof a.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(r._hasGetAll=!1)}function El(r){return r.split(",").map(function(i,l){var p=i.split(":"),f=(f=p[1])==null?void 0:f.trim(),p=(i=p[0].trim()).replace(/([&*]|\+\+)/g,""),v=/^\[/.test(p)?p.match(/^\[(.*)\]$/)[1].split("+"):p;return Ei(p,v||null,/\&/.test(i),/\*/.test(i),/\+\+/.test(i),d(v),l===0,f)})}Vr.prototype._createTableSchema=$i,Vr.prototype._parseIndexSyntax=El,Vr.prototype._parseStoresSpec=function(r,i){var l=this;c(r).forEach(function(f){if(r[f]!==null){var p=l._parseIndexSyntax(r[f]),v=p.shift();if(!v)throw new je.Schema("Invalid schema for table "+f+": "+r[f]);if(v.unique=!0,v.multi)throw new je.Schema("Primary key cannot be multiEntry*");p.forEach(function(b){if(b.auto)throw new je.Schema("Only primary key can be marked as autoIncrement (++)");if(!b.keyPath)throw new je.Schema("Index must have a name and cannot be an empty string")}),v=l._createTableSchema(f,v,p),i[f]=v}})},Vr.prototype.stores=function(l){var i=this.db,l=(this._cfg.storesSource=this._cfg.storesSource?h(this._cfg.storesSource,l):l,i._versions),f={},p={};return l.forEach(function(v){h(f,v._cfg.storesSource),p=v._cfg.dbschema={},v._parseStoresSpec(f,p)}),i._dbSchema=p,Pi(i,[i._allTables,i,i.Transaction.prototype]),io(i,[i._allTables,i,i.Transaction.prototype,this._cfg.tables],c(p),p),i._storeNames=c(p),this},Vr.prototype.upgrade=function(r){return this._cfg.contentUpgrade=H(this._cfg.contentUpgrade||g,r),this};var Vf=Vr;function Vr(){}var cs=(()=>{var r,i,l;return typeof FinalizationRegistry<"u"&&typeof WeakRef<"u"?(r=new Set,i=new FinalizationRegistry(function(f){r.delete(f)}),{toArray:function(){return Array.from(r).map(function(f){return f.deref()}).filter(function(f){return f!==void 0})},add:function(f){var p=new WeakRef(f._novip);r.add(p),i.register(f._novip,p,p),r.size>f._options.maxConnections&&(p=r.values().next().value,r.delete(p),i.unregister(p))},remove:function(f){if(f)for(var p=r.values(),v=p.next();!v.done;){var b=v.value;if(b.deref()===f._novip)return r.delete(b),void i.unregister(b);v=p.next()}}}):(l=[],{toArray:function(){return l},add:function(f){l.push(f._novip)},remove:function(f){f&&(f=l.indexOf(f._novip))!==-1&&l.splice(f,1)}})})();function Mi(r,i){var l=r._dbNamesDB;return l||(l=r._dbNamesDB=new Mn(Qs,{addons:[],indexedDB:r,IDBKeyRange:i})).version(1).stores({dbnames:"name"}),l.table("dbnames")}function Ii(r){return r&&typeof r.databases=="function"}function ji(r){return Wn(function(){return Ie.letThrough=!0,r()})}function Di(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:1<arguments.length?i:r}:{d:0})};function fs(r,i,l){var f=tt(i,l);if(!isNaN(f)){if(0<f)throw RangeError();if(Di(r))return h(r,{from:i,to:l,d:1});var f=r.l,p=r.r;if(tt(l,r.from)<0)return f?fs(f,i,l):r.l={from:i,to:l,d:1,l:null,r:null},Al(r);if(0<tt(i,r.to))return p?fs(p,i,l):r.r={from:i,to:l,d:1,l:null,r:null},Al(r);tt(i,r.from)<0&&(r.from=i,r.l=null,r.d=p?p.d+1:1),0<tt(l,r.to)&&(r.to=l,r.r=null,r.d=r.l?r.l.d+1:1),i=!r.r,f&&!r.l&&ds(r,f),p&&i&&ds(r,p)}}function ds(r,i){Di(i)||function l(f,p){var v=p.from,b=p.l,_=p.r;fs(f,v,p.to),b&&l(f,b),_&&l(f,_)}(r,i)}function $l(r,i){var l=co(i),f=l.next();if(!f.done)for(var p=f.value,v=co(r),b=v.next(p.from),_=b.value;!f.done&&!b.done;){if(tt(_.from,p.to)<=0&&0<=tt(_.to,p.from))return!0;tt(p.from,_.from)<0?p=(f=l.next(_.from)).value:_=(b=v.next(p.from)).value}return!1}function co(r){var i=Di(r)?null:{s:0,n:r};return{next:function(l){for(var f=0<arguments.length;i;)switch(i.s){case 0:if(i.s=1,f)for(;i.n.l&&tt(l,i.n.from)<0;)i={up:i,n:i.n.l,s:1};else for(;i.n.l;)i={up:i,n:i.n.l,s:1};case 1:if(i.s=2,!f||tt(l,i.n.to)<=0)return{value:i.n,done:!1};case 2:if(i.n.r){i.s=3,i={up:i,n:i.n.r,s:0};continue}case 3:i=i.up}return{done:!0}}}}function Al(r){var i,l,f,p=(((p=r.r)==null?void 0:p.d)||0)-(((p=r.l)==null?void 0:p.d)||0),p=1<p?"r":p<-1?"l":"";p&&(i=p=="r"?"l":"r",l=s({},r),f=r[p],r.from=f.from,r.to=f.to,r[p]=f[p],l[p]=f[i],(r[i]=l).d=Pl(l)),r.d=Pl(r)}function Pl(l){var i=l.r,l=l.l;return(i?l?Math.max(i.d,l.d):i.d:l?l.d:0)+1}function fo(r,i){return c(i).forEach(function(l){r[l]?ds(r[l],i[l]):r[l]=function f(p){var v,b,_={};for(v in p)k(p,v)&&(b=p[v],_[v]=!b||typeof b!="object"||xe.has(b.constructor)?b:f(b));return _}(i[l])}),r}function Ri(r,i){return r.all||i.all||Object.keys(r).some(function(l){return i[l]&&$l(i[l],r[l])})}D(Dt.prototype,((Ye={add:function(r){return ds(this,r),this},addKey:function(r){return fs(this,r,r),this},addKeys:function(r){var i=this;return r.forEach(function(l){return fs(i,l,l)}),this},hasKey:function(r){var i=co(this).next(r).value;return i&&tt(i.from,r)<=0&&0<=tt(i.to,r)}})[He]=function(){return co(this)},Ye));var gr={},Li={},Ki=!1;function po(r){fo(Li,r),Ki||(Ki=!0,setTimeout(function(){Ki=!1,Fi(Li,!(Li={}))},0))}function Fi(r,i){i===void 0&&(i=!1);var l=new Set;if(r.all)for(var f=0,p=Object.values(gr);f<p.length;f++)Tl(_=p[f],r,l,i);else for(var v in r){var b,_,v=/^idb\:\/\/(.*)\/(.*)\//.exec(v);v&&(b=v[1],v=v[2],_=gr["idb://".concat(b,"/").concat(v)])&&Tl(_,r,l,i)}l.forEach(function(S){return S()})}function Tl(r,i,l,f){for(var p=[],v=0,b=Object.entries(r.queries.query);v<b.length;v++){for(var _=b[v],S=_[0],V=[],T=0,C=_[1];T<C.length;T++){var $=C[T];Ri(i,$.obsSet)?$.subscribers.forEach(function(j){return l.add(j)}):f&&V.push($)}f&&p.push([S,V])}if(f)for(var R=0,I=p;R<I.length;R++){var M=I[R],S=M[0],V=M[1];r.queries.query[S]=V}}function Bf(r){var i=r._state,l=r._deps.indexedDB;if(i.isBeingOpened||r.idbdb)return i.dbReadyPromise.then(function(){return i.dbOpenError?Ct(i.dbOpenError):r});i.isBeingOpened=!0,i.dbOpenError=null,i.openComplete=!1;var f=i.openCanceller,p=Math.round(10*r.verno),v=!1;function b(){if(i.openCanceller!==f)throw new je.DatabaseClosed("db.open() was cancelled")}function _(){return new Se(function($,R){if(b(),!l)throw new je.MissingAPI;var I=r.name,M=i.autoSchema||!p?l.open(I):l.open(I,p);if(!M)throw new je.MissingAPI;M.onerror=dn(R),M.onblocked=mt(r._fireOnBlocked),M.onupgradeneeded=mt(function(j){var z;T=M.transaction,i.autoSchema&&!r._options.allowEmptyDB?(M.onerror=as,T.abort(),M.result.close(),(z=l.deleteDatabase(I)).onsuccess=z.onerror=mt(function(){R(new je.NoSuchDatabase("Database ".concat(I," doesnt exist")))})):(T.onerror=dn(R),z=j.oldVersion>Math.pow(2,62)?0:j.oldVersion,C=z<1,r.idbdb=M.result,v&&Nf(r,T),Ff(r,z/10,T,R))},R),M.onsuccess=mt(function(){T=null;var j,z,B,te,pe,ve,_e=r.idbdb=M.result,me=E(_e.objectStoreNames);if(0<me.length)try{var Pe=_e.transaction((pe=me).length===1?pe[0]:pe,"readonly");if(i.autoSchema)ve=_e,te=Pe,(B=r).verno=ve.version/10,te=B._dbSchema=lo(0,ve,te),B._storeNames=E(ve.objectStoreNames,0),io(B,[B._allTables],c(te),te);else if(uo(r,r._dbSchema,Pe),z=Pe,((z=Ti(lo(0,(j=r).idbdb,z),j._dbSchema)).add.length||z.change.some(function(be){return be.add.length||be.change.length}))&&!v)return console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Dexie will add missing parts and increment native version number to workaround this."),_e.close(),p=_e.version+1,v=!0,$(_());oo(r,Pe)}catch{}cs.add(r),_e.onversionchange=mt(function(be){i.vcFired=!0,r.on("versionchange").fire(be)}),_e.onclose=mt(function(){r.close({disableAutoOpen:!1})}),C&&(me=r._deps,pe=I,Ii(ve=me.indexedDB)||pe===Qs||Mi(ve,me.IDBKeyRange).put({name:pe}).catch(g)),$()},R)}).catch(function($){switch($==null?void 0:$.name){case"UnknownError":if(0<i.PR1398_maxLoop)return i.PR1398_maxLoop--,console.warn("Dexie: Workaround for Chrome UnknownError on open()"),_();break;case"VersionError":if(0<p)return p=0,_()}return Se.reject($)})}var S,V=i.dbReadyResolve,T=null,C=!1;return Se.race([f,(typeof navigator>"u"?Se.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function($){function R(){return indexedDB.databases().finally($)}S=setInterval(R,100),R()}).finally(function(){return clearInterval(S)}):Promise.resolve()).then(_)]).then(function(){return b(),i.onReadyBeingFired=[],Se.resolve(ji(function(){return r.on.ready.fire(r.vip)})).then(function $(){var R;if(0<i.onReadyBeingFired.length)return R=i.onReadyBeingFired.reduce(H,g),i.onReadyBeingFired=[],Se.resolve(ji(function(){return R(r.vip)})).then($)})}).finally(function(){i.openCanceller===f&&(i.onReadyBeingFired=null,i.isBeingOpened=!1)}).catch(function($){i.dbOpenError=$;try{T&&T.abort()}catch{}return f===i.openCanceller&&r._close(),Ct($)}).finally(function(){i.openComplete=!0,V()}).then(function(){var $;return C&&($={},r.tables.forEach(function(R){R.schema.indexes.forEach(function(I){I.name&&($["idb://".concat(r.name,"/").concat(R.name,"/").concat(I.name)]=new Dt(-1/0,[[[]]]))}),$["idb://".concat(r.name,"/").concat(R.name,"/")]=$["idb://".concat(r.name,"/").concat(R.name,"/:dels")]=new Dt(-1/0,[[[]]])}),Jn(so).fire($),Fi($,!0)),r})}function Ni(r){function i(v){return r.next(v)}var l=p(i),f=p(function(v){return r.throw(v)});function p(v){return function(_){var _=v(_),S=_.value;return _.done?S:S&&typeof S.then=="function"?S.then(l,f):d(S)?Promise.all(S).then(l,f):l(S)}}return p(i)()}function ho(r,i,l){for(var f=d(r)?r.slice():[r],p=0;p<l;++p)f.push(i);return f}var Uf={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(r){return s(s({},r),{table:function(f){var l=r.table(f),f=l.schema,p=Object.create(null),v=[];function b($,R,I){var B=us($),M=p[B]=p[B]||[],j=$==null?0:typeof $=="string"?1:$.length,z=0<R,B=s(s({},I),{name:z?"".concat(B,"(virtual-from:").concat(I.name,")"):I.name,lowLevelIndex:I,isVirtual:z,keyTail:R,keyLength:j,extractKey:Ai($),unique:!z&&I.unique});return M.push(B),B.isPrimaryKey||v.push(B),1<j&&b(j===2?$[0]:$.slice(0,j-1),R+1,I),M.sort(function(te,pe){return te.keyTail-pe.keyTail}),B}var _=b(f.primaryKey.keyPath,0,f.primaryKey);p[":id"]=[_];for(var S=0,V=f.indexes;S<V.length;S++){var T=V[S];b(T.keyPath,0,T)}function C($){var R,I=$.query.index;return I.isVirtual?s(s({},$),{query:{index:I.lowLevelIndex,range:(R=$.query.range,I=I.keyTail,{type:R.type===1?2:R.type,lower:ho(R.lower,R.lowerOpen?r.MAX_KEY:r.MIN_KEY,I),lowerOpen:!0,upper:ho(R.upper,R.upperOpen?r.MIN_KEY:r.MAX_KEY,I),upperOpen:!0})}}):$}return s(s({},l),{schema:s(s({},f),{primaryKey:_,indexes:v,getIndexByKeyPath:function($){return($=p[us($)])&&$[0]}}),count:function($){return l.count(C($))},query:function($){return l.query(C($))},openCursor:function($){var R=$.query.index,I=R.keyTail,M=R.keyLength;return R.isVirtual?l.openCursor(C($)).then(function(z){return z&&j(z)}):l.openCursor($);function j(z){return Object.create(z,{continue:{value:function(B){B!=null?z.continue(ho(B,$.reverse?r.MAX_KEY:r.MIN_KEY,I)):$.unique?z.continue(z.key.slice(0,M).concat($.reverse?r.MIN_KEY:r.MAX_KEY,I)):z.continue()}},continuePrimaryKey:{value:function(B,te){z.continuePrimaryKey(ho(B,r.MAX_KEY,I),te)}},primaryKey:{get:function(){return z.primaryKey}},key:{get:function(){var B=z.key;return M===1?B[0]:B.slice(0,M)}},value:{get:function(){return z.value}}})}}})}})}};function Vi(r,i,l,f){return l=l||{},f=f||"",c(r).forEach(function(p){var v,b,_;k(i,p)?(v=r[p],b=i[p],typeof v=="object"&&typeof b=="object"&&v&&b?(_=Xe(v))!==Xe(b)?l[f+p]=i[p]:_==="Object"?Vi(v,b,l,f+p+"."):v!==b&&(l[f+p]=i[p]):v!==b&&(l[f+p]=i[p])):l[f+p]=void 0}),c(i).forEach(function(p){k(r,p)||(l[f+p]=i[p])}),l}function Bi(r,i){return i.type==="delete"?i.keys:i.keys||i.values.map(r.extractKey)}var qf={stack:"dbcore",name:"HooksMiddleware",level:2,create:function(r){return s(s({},r),{table:function(i){var l=r.table(i),f=l.schema.primaryKey;return s(s({},l),{mutate:function(p){var v=Ie.trans,b=v.table(i).hook,_=b.deleting,S=b.creating,V=b.updating;switch(p.type){case"add":if(S.fire===g)break;return v._promise("readwrite",function(){return T(p)},!0);case"put":if(S.fire===g&&V.fire===g)break;return v._promise("readwrite",function(){return T(p)},!0);case"delete":if(_.fire===g)break;return v._promise("readwrite",function(){return T(p)},!0);case"deleteRange":if(_.fire===g)break;return v._promise("readwrite",function(){return function C($,R,I){return l.query({trans:$,values:!1,query:{index:f,range:R},limit:I}).then(function(M){var j=M.result;return T({type:"delete",keys:j,trans:$}).then(function(z){return 0<z.numFailures?Promise.reject(z.failures[0]):j.length<I?{failures:[],numFailures:0,lastResult:void 0}:C($,s(s({},R),{lower:j[j.length-1],lowerOpen:!0}),I)})})}(p.trans,p.range,1e4)},!0)}return l.mutate(p);function T(C){var $,R,I,M=Ie.trans,j=C.keys||Bi(f,C);if(j)return(C=C.type==="add"||C.type==="put"?s(s({},C),{keys:j}):s({},C)).type!=="delete"&&(C.values=o([],C.values)),C.keys&&(C.keys=o([],C.keys)),$=l,I=j,((R=C).type==="add"?Promise.resolve([]):$.getMany({trans:R.trans,keys:I,cache:"immutable"})).then(function(z){var B=j.map(function(te,pe){var ve,_e,me,Pe=z[pe],be={onerror:null,onsuccess:null};return C.type==="delete"?_.fire.call(be,te,Pe,M):C.type==="add"||Pe===void 0?(ve=S.fire.call(be,te,C.values[pe],M),te==null&&ve!=null&&(C.keys[pe]=te=ve,f.outbound||ee(C.values[pe],f.keyPath,te))):(ve=Vi(Pe,C.values[pe]),(_e=V.fire.call(be,ve,te,Pe,M))&&(me=C.values[pe],Object.keys(_e).forEach(function(Te){k(me,Te)?me[Te]=_e[Te]:ee(me,Te,_e[Te])}))),be});return l.mutate(C).then(function(te){for(var pe=te.failures,ve=te.results,_e=te.numFailures,te=te.lastResult,me=0;me<j.length;++me){var Pe=(ve||j)[me],be=B[me];Pe==null?be.onerror&&be.onerror(pe[me]):be.onsuccess&&be.onsuccess(C.type==="put"&&z[me]?C.values[me]:Pe)}return{failures:pe,results:ve,numFailures:_e,lastResult:te}}).catch(function(te){return B.forEach(function(pe){return pe.onerror&&pe.onerror(te)}),Promise.reject(te)})});throw new Error("Keys missing")}}})}})}};function Ol(r,i,l){try{if(!i||i.keys.length<r.length)return null;for(var f=[],p=0,v=0;p<i.keys.length&&v<r.length;++p)tt(i.keys[p],r[v])===0&&(f.push(l?Ce(i.values[p]):i.values[p]),++v);return f.length===r.length?f:null}catch{return null}}var Hf={stack:"dbcore",level:-1,create:function(r){return{table:function(i){var l=r.table(i);return s(s({},l),{getMany:function(f){var p;return f.cache?(p=Ol(f.keys,f.trans._cache,f.cache==="clone"))?Se.resolve(p):l.getMany(f).then(function(v){return f.trans._cache={keys:f.keys,values:f.cache==="clone"?Ce(v):v},v}):l.getMany(f)},mutate:function(f){return f.type!=="add"&&(f.trans._cache=null),l.mutate(f)}})}}}};function Ml(r,i){return r.trans.mode==="readonly"&&!!r.subscr&&!r.trans.explicit&&r.trans.db._options.cache!=="disabled"&&!i.schema.primaryKey.outbound}function Il(r,i){switch(r){case"query":return i.values&&!i.unique;case"get":case"getMany":case"count":case"openCursor":return!1}}var Wf={stack:"dbcore",level:0,name:"Observability",create:function(r){var i=r.schema.name,l=new Dt(r.MIN_KEY,r.MAX_KEY);return s(s({},r),{transaction:function(f,p,v){if(Ie.subscr&&p!=="readonly")throw new je.ReadOnly("Readwrite transaction in liveQuery context. Querier source: ".concat(Ie.querier));return r.transaction(f,p,v)},table:function(f){function p(j){var M,j=j.query;return[M=j.index,new Dt((M=(j=j.range).lower)!=null?M:r.MIN_KEY,(M=j.upper)!=null?M:r.MAX_KEY)]}var v=r.table(f),b=v.schema,_=b.primaryKey,S=b.indexes,V=_.extractKey,T=_.outbound,C=_.autoIncrement&&S.filter(function(I){return I.compound&&I.keyPath.includes(_.keyPath)}),$=s(s({},v),{mutate:function(I){function M(he){return he="idb://".concat(i,"/").concat(f,"/").concat(he),pe[he]||(pe[he]=new Dt)}var j,z,B,te=I.trans,pe=I.mutatedParts||(I.mutatedParts={}),ve=M(""),_e=M(":dels"),me=I.type,be=I.type==="deleteRange"?[I.range]:I.type==="delete"?[I.keys]:I.values.length<50?[Bi(_,I).filter(function(he){return he}),I.values]:[],Pe=be[0],be=be[1],Te=I.trans._cache;return d(Pe)?(ve.addKeys(Pe),(me=me==="delete"||Pe.length===be.length?Ol(Pe,Te):null)||_e.addKeys(Pe),(me||be)&&(j=M,z=me,B=be,b.indexes.forEach(function(he){var Ve=j(he.name||"");function Be(Ze){return Ze!=null?he.extractKey(Ze):null}function Ge(Ze){he.multiEntry&&d(Ze)?Ze.forEach(function(tn){return Ve.addKey(tn)}):Ve.addKey(Ze)}(z||B).forEach(function(Ze,Rt){var We=z&&Be(z[Rt]),Rt=B&&Be(B[Rt]);tt(We,Rt)!==0&&(We!=null&&Ge(We),Rt!=null)&&Ge(Rt)})}))):Pe?(be={from:(Te=Pe.lower)!=null?Te:r.MIN_KEY,to:(me=Pe.upper)!=null?me:r.MAX_KEY},_e.add(be),ve.add(be)):(ve.add(l),_e.add(l),b.indexes.forEach(function(he){return M(he.name).add(l)})),v.mutate(I).then(function(he){return!Pe||I.type!=="add"&&I.type!=="put"||(ve.addKeys(he.results),C&&C.forEach(function(Ve){for(var Be=I.values.map(function(We){return Ve.extractKey(We)}),Ge=Ve.keyPath.findIndex(function(We){return We===_.keyPath}),Ze=0,tn=he.results.length;Ze<tn;++Ze)Be[Ze][Ge]=he.results[Ze];M(Ve.name).addKeys(Be)})),te.mutatedParts=fo(te.mutatedParts||{},pe),he})}}),R={get:function(I){return[_,new Dt(I.key)]},getMany:function(I){return[_,new Dt().addKeys(I.keys)]},count:p,query:p,openCursor:p};return c(R).forEach(function(I){$[I]=function(M){var j=Ie.subscr,z=!!j,B=Ml(Ie,v)&&Il(I,M)?M.obsSet={}:j;if(z){var te,j=function(be){return be="idb://".concat(i,"/").concat(f,"/").concat(be),B[be]||(B[be]=new Dt)},pe=j(""),ve=j(":dels"),z=R[I](M),_e=z[0],z=z[1];if((I==="query"&&_e.isPrimaryKey&&!M.values?ve:j(_e.name||"")).add(z),!_e.isPrimaryKey){if(I!=="count")return te=I==="query"&&T&&M.values&&v.query(s(s({},M),{values:!1})),v[I].apply(this,arguments).then(function(be){if(I==="query"){if(T&&M.values)return te.then(function(Be){return Be=Be.result,pe.addKeys(Be),be});var Te=M.values?be.result.map(V):be.result;(M.values?pe:ve).addKeys(Te)}else{var he,Ve;if(I==="openCursor")return Ve=M.values,(he=be)&&Object.create(he,{key:{get:function(){return ve.addKey(he.primaryKey),he.key}},primaryKey:{get:function(){var Be=he.primaryKey;return ve.addKey(Be),Be}},value:{get:function(){return Ve&&pe.addKey(he.primaryKey),he.value}}})}return be});ve.add(l)}}return v[I].apply(this,arguments)}}),$}})}};function jl(r,i,l){var f;return l.numFailures===0?i:i.type==="deleteRange"||(f=i.keys?i.keys.length:"values"in i&&i.values?i.values.length:1,l.numFailures===f)?null:(f=s({},i),d(f.keys)&&(f.keys=f.keys.filter(function(p,v){return!(v in l.failures)})),"values"in f&&d(f.values)&&(f.values=f.values.filter(function(p,v){return!(v in l.failures)})),f)}function Ui(r,i){return l=r,((f=i).lower===void 0||(f.lowerOpen?0<tt(l,f.lower):0<=tt(l,f.lower)))&&(l=r,(f=i).upper===void 0||(f.upperOpen?tt(l,f.upper)<0:tt(l,f.upper)<=0));var l,f}function Dl(r,i,l,f,p,v){var b,_,S,V,T,C,$;return!l||l.length===0||(b=i.query.index,_=b.multiEntry,S=i.query.range,V=f.schema.primaryKey.extractKey,T=b.extractKey,C=(b.lowLevelIndex||b).extractKey,(f=l.reduce(function(R,I){var M=R,j=[];if(I.type==="add"||I.type==="put")for(var z=new Dt,B=I.values.length-1;0<=B;--B){var te,pe=I.values[B],ve=V(pe);!z.hasKey(ve)&&(te=T(pe),_&&d(te)?te.some(function(Te){return Ui(Te,S)}):Ui(te,S))&&(z.addKey(ve),j.push(pe))}switch(I.type){case"add":var _e=new Dt().addKeys(i.values?R.map(function(he){return V(he)}):R),M=R.concat(i.values?j.filter(function(he){return he=V(he),!_e.hasKey(he)&&(_e.addKey(he),!0)}):j.map(function(he){return V(he)}).filter(function(he){return!_e.hasKey(he)&&(_e.addKey(he),!0)}));break;case"put":var me=new Dt().addKeys(I.values.map(function(he){return V(he)}));M=R.filter(function(he){return!me.hasKey(i.values?V(he):he)}).concat(i.values?j:j.map(function(he){return V(he)}));break;case"delete":var Pe=new Dt().addKeys(I.keys);M=R.filter(function(he){return!Pe.hasKey(i.values?V(he):he)});break;case"deleteRange":var be=I.range;M=R.filter(function(he){return!Ui(V(he),be)})}return M},r))===r)?r:($=function(R,I){return tt(C(R),C(I))||tt(V(R),V(I))},f.sort(i.direction==="prev"||i.direction==="prevunique"?function(R,I){return $(I,R)}:$),i.limit&&i.limit<1/0&&(f.length>i.limit?f.length=i.limit:r.length===i.limit&&f.length<i.limit&&(p.dirty=!0)),v?Object.freeze(f):f)}function Rl(r,i){return tt(r.lower,i.lower)===0&&tt(r.upper,i.upper)===0&&!!r.lowerOpen==!!i.lowerOpen&&!!r.upperOpen==!!i.upperOpen}function zf(r,i){return((l,f,p,v)=>{if(l===void 0)return f!==void 0?-1:0;if(f===void 0)return 1;if((l=tt(l,f))===0){if(p&&v)return 0;if(p)return 1;if(v)return-1}return l})(r.lower,i.lower,r.lowerOpen,i.lowerOpen)<=0&&0<=((l,f,p,v)=>{if(l===void 0)return f!==void 0?1:0;if(f===void 0)return-1;if((l=tt(l,f))===0){if(p&&v)return 0;if(p)return-1;if(v)return 1}return l})(r.upper,i.upper,r.upperOpen,i.upperOpen)}function Gf(r,i,l,f){r.subscribers.add(l),f.addEventListener("abort",function(){var p,v;r.subscribers.delete(l),r.subscribers.size===0&&(p=r,v=i,setTimeout(function(){p.subscribers.size===0&&ge(v,p)},3e3))})}var Yf={stack:"dbcore",level:0,name:"Cache",create:function(r){var i=r.schema.name;return s(s({},r),{transaction:function(l,f,p){var v,b,_=r.transaction(l,f,p);return f==="readwrite"&&(p=(v=new AbortController).signal,_.addEventListener("abort",(b=function(S){return function(){if(v.abort(),f==="readwrite"){for(var V=new Set,T=0,C=l;T<C.length;T++){var $=C[T],R=gr["idb://".concat(i,"/").concat($)];if(R){var I=r.table($),M=R.optimisticOps.filter(function(he){return he.trans===_});if(_._explicit&&S&&_.mutatedParts)for(var j=0,z=Object.values(R.queries.query);j<z.length;j++)for(var B=0,te=(_e=z[j]).slice();B<te.length;B++)Ri((me=te[B]).obsSet,_.mutatedParts)&&(ge(_e,me),me.subscribers.forEach(function(he){return V.add(he)}));else if(0<M.length){R.optimisticOps=R.optimisticOps.filter(function(he){return he.trans!==_});for(var pe=0,ve=Object.values(R.queries.query);pe<ve.length;pe++)for(var _e,me,Pe,be=0,Te=(_e=ve[pe]).slice();be<Te.length;be++)(me=Te[be]).res!=null&&_.mutatedParts&&(S&&!me.dirty?(Pe=Object.isFrozen(me.res),Pe=Dl(me.res,me.req,M,I,me,Pe),me.dirty?(ge(_e,me),me.subscribers.forEach(function(he){return V.add(he)})):Pe!==me.res&&(me.res=Pe,me.promise=Se.resolve({result:Pe}))):(me.dirty&&ge(_e,me),me.subscribers.forEach(function(he){return V.add(he)})))}}}V.forEach(function(he){return he()})}}})(!1),{signal:p}),_.addEventListener("error",b(!1),{signal:p}),_.addEventListener("complete",b(!0),{signal:p})),_},table:function(l){var f=r.table(l),p=f.schema.primaryKey;return s(s({},f),{mutate:function(v){var b,_=Ie.trans;return!p.outbound&&_.db._options.cache!=="disabled"&&!_.explicit&&_.idbtrans.mode==="readwrite"&&(b=gr["idb://".concat(i,"/").concat(l)])?(_=f.mutate(v),v.type!=="add"&&v.type!=="put"||!(50<=v.values.length||Bi(p,v).some(function(S){return S==null}))?(b.optimisticOps.push(v),v.mutatedParts&&po(v.mutatedParts),_.then(function(S){0<S.numFailures&&(ge(b.optimisticOps,v),(S=jl(0,v,S))&&b.optimisticOps.push(S),v.mutatedParts)&&po(v.mutatedParts)}),_.catch(function(){ge(b.optimisticOps,v),v.mutatedParts&&po(v.mutatedParts)})):_.then(function(S){var V=jl(0,s(s({},v),{values:v.values.map(function(T,C){var $;return S.failures[C]?T:(ee($=($=p.keyPath)!=null&&$.includes(".")?Ce(T):s({},T),p.keyPath,S.results[C]),$)})}),S);b.optimisticOps.push(V),queueMicrotask(function(){return v.mutatedParts&&po(v.mutatedParts)})}),_):f.mutate(v)},query:function(v){var b,_,S,V,T,C,$;return Ml(Ie,f)&&Il("query",v)?(b=((S=Ie.trans)==null?void 0:S.db._options.cache)==="immutable",_=(S=Ie).requery,S=S.signal,C=((R,I,M,j)=>{var z=gr["idb://".concat(R,"/").concat(I)];if(!z)return[];if(!(R=z.queries[M]))return[null,!1,z,null];var B=R[(j.query?j.query.index.name:null)||""];if(!B)return[null,!1,z,null];switch(M){case"query":var te=(pe=j.direction)!=null?pe:"next",pe=B.find(function(ve){var _e;return ve.req.limit===j.limit&&ve.req.values===j.values&&((_e=ve.req.direction)!=null?_e:"next")===te&&Rl(ve.req.query.range,j.query.range)});return pe?[pe,!0,z,B]:[B.find(function(ve){var _e;return("limit"in ve.req?ve.req.limit:1/0)>=j.limit&&((_e=ve.req.direction)!=null?_e:"next")===te&&(!j.values||ve.req.values)&&zf(ve.req.query.range,j.query.range)}),!1,z,B];case"count":return pe=B.find(function(ve){return Rl(ve.req.query.range,j.query.range)}),[pe,!!pe,z,B]}})(i,l,"query",v),$=C[0],V=C[2],T=C[3],$&&C[1]?$.obsSet=v.obsSet:(C=f.query(v).then(function(R){var I=R.result;if($&&($.res=I),b){for(var M=0,j=I.length;M<j;++M)Object.freeze(I[M]);Object.freeze(I)}return R}).catch(function(R){return T&&$&&ge(T,$),Promise.reject(R)}),$={obsSet:v.obsSet,promise:C,subscribers:new Set,type:"query",req:v,dirty:!1},T?T.push($):(T=[$],(V=V||(gr["idb://".concat(i,"/").concat(l)]={queries:{query:{},count:{}},objs:new Map,optimisticOps:[],unsignaledParts:{}})).queries.query[v.query.index.name||""]=T)),Gf($,T,_,S),$.promise.then(function(R){return R=Dl(R.result,v,V==null?void 0:V.optimisticOps,f,$,b),{result:b?R:Ce(R)}})):f.query(v)}})}})}};function vo(r,i){return new Proxy(r,{get:function(l,f,p){return f==="db"?i:Reflect.get(l,f,p)}})}St.prototype.version=function(r){if(isNaN(r)||r<.1)throw new je.Type("Given version is not a positive number");if(r=Math.round(10*r)/10,this.idbdb||this._state.isBeingOpened)throw new je.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,r);var i=this._versions,l=i.filter(function(f){return f._cfg.version===r})[0];return l||(l=new this.Version(r),i.push(l),i.sort(Kf),l.stores({}),this._state.autoSchema=!1),l},St.prototype._whenReady=function(r){var i=this;return this.idbdb&&(this._state.openComplete||Ie.letThrough||this._vip)?r():new Se(function(l,f){if(i._state.openComplete)return f(new je.DatabaseClosed(i._state.dbOpenError));if(!i._state.isBeingOpened){if(!i._state.autoOpen)return void f(new je.DatabaseClosed);i.open().catch(g)}i._state.dbReadyPromise.then(l,f)}).then(r)},St.prototype.use=function(p){var i=p.stack,l=p.create,f=p.level,p=p.name,v=(p&&this.unuse({stack:i,name:p}),this._middlewares[i]||(this._middlewares[i]=[]));return v.push({stack:i,create:l,level:f??10,name:p}),v.sort(function(b,_){return b.level-_.level}),this},St.prototype.unuse=function(r){var i=r.stack,l=r.name,f=r.create;return i&&this._middlewares[i]&&(this._middlewares[i]=this._middlewares[i].filter(function(p){return f?p.create!==f:!!l&&p.name!==l})),this},St.prototype.open=function(){var r=this;return vr($t,function(){return Bf(r)})},St.prototype._close=function(){this.on.close.fire(new CustomEvent("close"));var r=this._state;if(cs.remove(this),this.idbdb){try{this.idbdb.close()}catch{}this.idbdb=null}r.isBeingOpened||(r.dbReadyPromise=new Se(function(i){r.dbReadyResolve=i}),r.openCanceller=new Se(function(i,l){r.cancelOpen=l}))},St.prototype.close=function(i){var i=(i===void 0?{disableAutoOpen:!0}:i).disableAutoOpen,l=this._state;i?(l.isBeingOpened&&l.cancelOpen(new je.DatabaseClosed),this._close(),l.autoOpen=!1,l.dbOpenError=new je.DatabaseClosed):(this._close(),l.autoOpen=this._options.autoOpen||l.isBeingOpened,l.openComplete=!1,l.dbOpenError=null)},St.prototype.delete=function(r){var i=this,l=(r===void 0&&(r={disableAutoOpen:!0}),0<arguments.length&&typeof arguments[0]!="object"),f=this._state;return new Se(function(p,v){function b(){i.close(r);var _=i._deps.indexedDB.deleteDatabase(i.name);_.onsuccess=mt(function(){var S,V,T;S=i._deps,V=i.name,Ii(T=S.indexedDB)||V===Qs||Mi(T,S.IDBKeyRange).delete(V).catch(g),p()}),_.onerror=dn(v),_.onblocked=i._fireOnBlocked}if(l)throw new je.InvalidArgument("Invalid closeOptions argument to db.delete()");f.isBeingOpened?f.dbReadyPromise.then(b):b()})},St.prototype.backendDB=function(){return this.idbdb},St.prototype.isOpen=function(){return this.idbdb!==null},St.prototype.hasBeenClosed=function(){var r=this._state.dbOpenError;return r&&r.name==="DatabaseClosed"},St.prototype.hasFailed=function(){return this._state.dbOpenError!==null},St.prototype.dynamicallyOpened=function(){return this._state.autoSchema},Object.defineProperty(St.prototype,"tables",{get:function(){var r=this;return c(this._allTables).map(function(i){return r._allTables[i]})},enumerable:!1,configurable:!0}),St.prototype.transaction=function(){var r=(function(i,l,f){var p=arguments.length;if(p<2)throw new je.InvalidArgument("Too few arguments");for(var v=new Array(p-1);--p;)v[p-1]=arguments[p];return f=v.pop(),[i,ie(v),f]}).apply(this,arguments);return this._transaction.apply(this,r)},St.prototype._transaction=function(r,i,l){var f,p,v=this,b=Ie.trans,_=(b&&b.db===this&&r.indexOf("!")===-1||(b=null),r.indexOf("?")!==-1);r=r.replace("!","").replace("?","");try{if(p=i.map(function(V){if(V=V instanceof v.Table?V.name:V,typeof V!="string")throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return V}),r=="r"||r===_i)f=_i;else{if(r!="rw"&&r!=ki)throw new je.InvalidArgument("Invalid transaction mode: "+r);f=ki}if(b){if(b.mode===_i&&f===ki){if(!_)throw new je.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");b=null}b&&p.forEach(function(V){if(b&&b.storeNames.indexOf(V)===-1){if(!_)throw new je.SubTransaction("Table "+V+" not included in parent transaction.");b=null}}),_&&b&&!b.active&&(b=null)}}catch(V){return b?b._promise(null,function(T,C){C(V)}):Ct(V)}var S=(function V(T,C,$,R,I){return Se.resolve().then(function(){var B=Ie.transless||Ie,M=T._createTransaction(C,$,T._dbSchema,R),B=(M.explicit=!0,{trans:M,transless:B});if(R)M.idbtrans=R.idbtrans;else try{M.create(),M.idbtrans._explicit=!0,T._state.PR1398_maxLoop=3}catch(te){return te.name===Yt.InvalidState&&T.isOpen()&&0<--T._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),T.close({disableAutoOpen:!1}),T.open().then(function(){return V(T,C,$,null,I)})):Ct(te)}var j,z=fe(I),B=(z&&Kr(),Se.follow(function(){var te;(j=I.call(M,M))&&(z?(te=zn.bind(null,null),j.then(te,te)):typeof j.next=="function"&&typeof j.throw=="function"&&(j=Ni(j)))},B));return(j&&typeof j.then=="function"?Se.resolve(j).then(function(te){return M.active?te:Ct(new je.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))}):B.then(function(){return j})).then(function(te){return R&&M._resolve(),M._completion.then(function(){return te})}).catch(function(te){return M._reject(te),Ct(te)})})}).bind(null,this,f,p,b,l);return b?b._promise(f,S,"lock"):Ie.trans?vr(Ie.transless,function(){return v._whenReady(S)}):this._whenReady(S)},St.prototype.table=function(r){if(k(this._allTables,r))return this._allTables[r];throw new je.InvalidTable("Table ".concat(r," does not exist"))};var Mn=St;function St(r,i){var l,f,p,v,b,_=this,S=(this._middlewares={},this.verno=0,St.dependencies),S=(this._options=i=s({addons:St.addons,autoOpen:!0,indexedDB:S.indexedDB,IDBKeyRange:S.IDBKeyRange,cache:"cloned",maxConnections:1e3},i),this._deps={indexedDB:i.indexedDB,IDBKeyRange:i.IDBKeyRange},i.addons),V=(this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this,{dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:g,dbReadyPromise:null,cancelOpen:g,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3,autoOpen:i.autoOpen}),T=(V.dbReadyPromise=new Se(function(C){V.dbReadyResolve=C}),V.openCanceller=new Se(function(C,$){V.cancelOpen=$}),this._state=V,this.name=r,this.on=os(this,"populate","blocked","versionchange","close",{ready:[H,g]}),this.once=function(C,$){var R=function(){for(var I=[],M=0;M<arguments.length;M++)I[M]=arguments[M];_.on(C).unsubscribe(R),$.apply(_,I)};return _.on(C,R)},this.on.ready.subscribe=L(this.on.ready.subscribe,function(C){return function($,R){St.vip(function(){var I,M=_._state;M.openComplete?(M.dbOpenError||Se.resolve().then($),R&&C($)):M.onReadyBeingFired?(M.onReadyBeingFired.push($),R&&C($)):(C($),I=_,R||C(function j(){I.on.ready.unsubscribe($),I.on.ready.unsubscribe(j)}))})}}),this.Collection=(l=this,is(Of.prototype,function(j,M){this.db=l;var R=fl,I=null;if(M)try{R=M()}catch(B){I=B}var M=j._ctx,j=M.table,z=j.hook.reading.fire;this._ctx={table:j,index:M.index,isPrimKey:!M.index||j.schema.primKey.keyPath&&M.index===j.schema.primKey.name,range:R,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:I,or:M.or,valueMapper:z!==P?z:null}})),this.Table=(f=this,is(yl.prototype,function(C,$,R){this.db=f,this._tx=R,this.name=C,this.schema=$,this.hook=f._allTables[C]?f._allTables[C].hook:os(null,{creating:[ue,g],reading:[ae,P],updating:[oe,g],deleting:[ye,g]})})),this.Transaction=(p=this,is(jf.prototype,function(C,$,R,I,M){var j=this;C!=="readonly"&&$.forEach(function(z){z=(z=R[z])==null?void 0:z.yProps,z&&($=$.concat(z.map(function(B){return B.updatesTable})))}),this.db=p,this.mode=C,this.storeNames=$,this.schema=R,this.chromeTransactionDurability=I,this.idbtrans=null,this.on=os(this,"complete","error","abort"),this.parent=M||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new Se(function(z,B){j._resolve=z,j._reject=B}),this._completion.then(function(){j.active=!1,j.on.complete.fire()},function(z){var B=j.active;return j.active=!1,j.on.error.fire(z),j.parent?j.parent._reject(z):B&&j.idbtrans&&j.idbtrans.abort(),Ct(z)})})),this.Version=(v=this,is(Vf.prototype,function(C){this.db=v,this._cfg={version:C,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})),this.WhereClause=(b=this,is(kl.prototype,function(C,$,R){if(this.db=b,this._ctx={table:C,index:$===":id"?null:$,or:R},this._cmp=this._ascending=tt,this._descending=function(I,M){return tt(M,I)},this._max=function(I,M){return 0<tt(I,M)?I:M},this._min=function(I,M){return tt(I,M)<0?I:M},this._IDBKeyRange=b._deps.IDBKeyRange,!this._IDBKeyRange)throw new je.MissingAPI})),this.on("versionchange",function(C){0<C.newVersion?console.warn("Another connection wants to upgrade database '".concat(_.name,"'. Closing db now to resume the upgrade.")):console.warn("Another connection wants to delete database '".concat(_.name,"'. Closing db now to resume the delete request.")),_.close({disableAutoOpen:!1})}),this.on("blocked",function(C){!C.newVersion||C.newVersion<C.oldVersion?console.warn("Dexie.delete('".concat(_.name,"') was blocked")):console.warn("Upgrade '".concat(_.name,"' blocked by other connection holding version ").concat(C.oldVersion/10))}),this._maxKey=ls(i.IDBKeyRange),this._createTransaction=function(C,$,R,I){return new _.Transaction(C,$,R,_._options.chromeTransactionDurability,I)},this._fireOnBlocked=function(C){_.on("blocked").fire(C),cs.toArray().filter(function($){return $.name===_.name&&$!==_&&!$._state.vcFired}).map(function($){return $.on("versionchange").fire(C)})},this.use(Hf),this.use(Yf),this.use(Wf),this.use(Uf),this.use(qf),new Proxy(this,{get:function(C,$,R){var I;return $==="_vip"||($==="table"?function(M){return vo(_.table(M),T)}:(I=Reflect.get(C,$,R))instanceof yl?vo(I,T):$==="tables"?I.map(function(M){return vo(M,T)}):$==="_createTransaction"?function(){return vo(I.apply(this,arguments),T)}:I)}}));this.vip=T,S.forEach(function(C){return C(_)})}var mo,Br=typeof Symbol<"u"&&"observable"in Symbol?Symbol.observable:"@@observable",Jf=(qi.prototype.subscribe=function(r,i,l){return this._subscribe(r&&typeof r!="function"?r:{next:r,error:i,complete:l})},qi.prototype[Br]=function(){return this},qi);function qi(r){this._subscribe=r}try{mo={indexedDB:a.indexedDB||a.mozIndexedDB||a.webkitIndexedDB||a.msIndexedDB,IDBKeyRange:a.IDBKeyRange||a.webkitIDBKeyRange}}catch{mo={indexedDB:null,IDBKeyRange:null}}function Ll(r){var i,l=!1,f=new Jf(function(p){var v=fe(r),b,_=!1,S={},V={},T={get closed(){return _},unsubscribe:function(){_||(_=!0,b&&b.abort(),C&&Jn.storagemutated.unsubscribe(I))}},C=(p.start&&p.start(T),!1),$=function(){return wi(M)};function R(){return Ri(V,S)}var I=function(j){fo(S,j),R()&&$()},M=function(){var j,z,B;!_&&mo.indexedDB&&(S={},j={},b&&b.abort(),b=new AbortController,B=(te=>{var pe=Rr();try{v&&Kr();var ve=Wn(r,te);return ve=v?ve.finally(zn):ve}finally{pe&&Lr()}})(z={subscr:j,signal:b.signal,requery:$,querier:r,trans:null}),C||(Jn.storagemutated.subscribe(I),C=!0),Promise.resolve(B).then(function(te){l=!0,i=te,_||z.signal.aborted||(R()||(V=j,R())?$():(S={},wi(function(){return!_&&p.next&&p.next(te)})))},function(te){l=!1,["DatabaseClosedError","AbortError"].includes(te==null?void 0:te.name)||_||wi(function(){_||p.error&&p.error(te)})}))};return setTimeout($,0),T});return f.hasValue=function(){return l},f.getValue=function(){return i},f}var br=Mn;function Hi(r){var i=Xn;try{Xn=!0,Jn.storagemutated.fire(r),Fi(r,!0)}finally{Xn=i}}D(br,s(s({},G),{delete:function(r){return new br(r,{addons:[]}).delete()},exists:function(r){return new br(r,{addons:[]}).open().then(function(i){return i.close(),!0}).catch("NoSuchDatabaseError",function(){return!1})},getDatabaseNames:function(r){try{return i=br.dependencies,l=i.indexedDB,i=i.IDBKeyRange,(Ii(l)?Promise.resolve(l.databases()).then(function(f){return f.map(function(p){return p.name}).filter(function(p){return p!==Qs})}):Mi(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?vr(Ie.transless||$t,r):r()},vip:ji,async:function(r){return function(){try{var i=Ni(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 f=Ni(r.apply(l,i||[]));return f&&typeof f.then=="function"?f:Se.resolve(f)}catch(p){return Ct(p)}},currentTransaction:{get:function(){return Ie.trans||null}},waitFor:function(r,i){return r=Se.resolve(typeof r=="function"?br.ignoreTransaction(r):r).timeout(i||6e4),Ie.trans?Ie.trans.waitFor(r):r},Promise:Se,debug:{get:function(){return U},set:function(r){Y(r)}},derive:W,extend:h,props:D,override:L,Events:os,on:Jn,liveQuery:Ll,extendObservabilitySet:fo,getByKeyPath:ce,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:A,deepClone:Ce,getObjectDiff:Vi,cmp:tt,asap:le,minKey:-1/0,addons:[],connections:{get:cs.toArray},errnames:Yt,dependencies:mo,cache:gr,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)})})),br.maxKey=ls(br.dependencies.IDBKeyRange),typeof dispatchEvent<"u"&&typeof addEventListener<"u"&&(Jn(so,function(r){Xn||(r=new CustomEvent(Si,{detail:r}),Xn=!0,dispatchEvent(r),Xn=!1)}),addEventListener(Si,function(r){r=r.detail,Xn||Hi(r)}));var Ur,Xn=!1,Kl=function(){};return typeof BroadcastChannel<"u"&&((Kl=function(){(Ur=new BroadcastChannel(Si)).onmessage=function(r){return r.data&&Hi(r.data)}})(),typeof Ur.unref=="function"&&Ur.unref(),Jn(so,function(r){Xn||Ur.postMessage(r)})),typeof addEventListener<"u"&&(addEventListener("pagehide",function(r){if(!Mn.disableBfCache&&r.persisted){U&&console.debug("Dexie: handling persisted pagehide"),Ur!=null&&Ur.close();for(var i=0,l=cs.toArray();i<l.length;i++)l[i].close({disableAutoOpen:!1})}}),addEventListener("pageshow",function(r){!Mn.disableBfCache&&r.persisted&&(U&&console.debug("Dexie: handling persisted pageshow"),Kl(),Hi({all:new Dt(-1/0,[[]])}))})),Se.rejectionMapper=function(r,i){return!r||r instanceof ke||r instanceof TypeError||r instanceof SyntaxError||!r.name||!w[r.name]?r:(i=new w[r.name](i||r.message,r),"stack"in r&&K(i,"stack",{get:function(){return this.inner.stack}}),i)},Y(U),s(Mn,Object.freeze({__proto__:null,DEFAULT_MAX_CONNECTIONS:1e3,Dexie:Mn,Entity:dl,PropModification:ss,RangeSet:Dt,add:function(r){return new ss({add:r})},cmp:tt,default:Mn,liveQuery:Ll,mergeRanges:ds,rangesOverlap:$l,remove:function(r){return new ss({remove:r})},replacePrefix:function(r,i){return new ss({replacePrefix:[r,i]})}}),{default:Mn}),Mn})})(tf);var qh=tf.exports;const Ca=Uh(qh),$u=Symbol.for("Dexie"),Ir=globalThis[$u]||(globalThis[$u]=Ca);if(Ca.semVer!==Ir.semVer)throw new Error(`Two different versions of Dexie loaded in the same app: ${Ca.semVer} and ${Ir.semVer}`);const{liveQuery:k0,mergeRanges:x0,rangesOverlap:C0,RangeSet:S0,cmp:E0,Entity:$0,PropModification:A0,replacePrefix:P0,add:T0,remove:O0,DexieYProvider:M0}=Ir;class nf extends Ir{constructor(t="intern_worklog"){super(t),this.version(1).stores({project:"++id, &name, archived",work_log:"++id, &date",log_item:"++id, work_log_id, project_id, category",attendance:"++id, &date",weekly_note:"++id, &week_start",setting:"key"}),this.version(2).stores({memo:"++id, updated_at",credential:"++id, system, updated_at"}),this.version(3).stores({transaction:"++id, date, type, category"}),this.version(4).stores({sync_mirror:"++id, table, uuid",tombstone:"++id, table, uuid, deleted_at"})}}let ne;function Hh(e){ne=e}function rf(){ne&&ne.close(),ne=void 0}const Wh=4,Wr=["餐饮","交通","住房","通讯","学习","娱乐","其他"],Vo=["工资","报销","其他"],Au=["公司","客户现场","出差","居家办公"],Us=[{key:"dev",label:"开发"},{key:"bugfix",label:"BUG修复"},{key:"test",label:"测试"},{key:"learning",label:"学习成长"},{key:"meeting",label:"会议沟通"},{key:"doc",label:"文档输出"},{key:"other",label:"其他"}];function Xa(e){const t=Us.find(n=>n.key===e);return t?t.label:"其他"}const zh={class:"dialog",role:"dialog","aria-label":"编辑工作记录"},Gh={class:"dialog-head"},Yh={key:0,class:"muted dialog-sub"},Jh={class:"dialog-body"},Xh={class:"form-grid"},Qh={class:"field span2"},Zh={key:0,class:"form-error"},ev={class:"field"},tv=["value"],nv={class:"field"},rv=["value"],sv={class:"field"},ov={class:"field"},iv={class:"field span2"},av={class:"field"},lv={class:"field"},uv={class:"dialog-btns"},cv=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),c=N("dev"),d=N(null),h=N(""),y=N(""),m=N(0),k=N(0),D=N(""),O=N(null),K=it(()=>{var L;const Z=n.projects.filter(Q=>Q.archived!==1),E=(L=n.item)==null?void 0:L.project_id;if(E&&!Z.some(Q=>Q.id===E)){const Q=n.projects.find(ce=>ce.id===E),le=Z.slice();return Q&&le.unshift({...Q,name:Q.name+"(已归档)"}),le}return Z});function W(Z){n.open&&Z.key==="Escape"&&s("cancel")}gt(()=>n.open,async Z=>{var E;if(Z){const L=n.item;o.value=(L==null?void 0:L.content)??"",a.value=(L==null?void 0:L.project_id)??null,c.value=(L==null?void 0:L.category)??"dev",d.value=(L==null?void 0:L.minutes)??null,h.value=(L==null?void 0:L.takeaway)??"",y.value=(L==null?void 0:L.remark)??"",m.value=(L==null?void 0:L.is_milestone)??0,k.value=(L==null?void 0:L.needs_followup)??0,D.value="",window.addEventListener("keydown",W),await ts(),(E=O.value)==null||E.focus()}else window.removeEventListener("keydown",W)}),dr(()=>window.removeEventListener("keydown",W)),gt(o,()=>{D.value&&(D.value="")});function de(){const Z=o.value.trim();if(!Z){D.value="请填写工作内容";return}if(!n.item||!n.item.id){s("cancel");return}s("save",{id:n.item.id,content:Z,project_id:a.value,category:c.value,minutes:d.value&&d.value>0?d.value:null,takeaway:h.value.trim()||null,remark:y.value.trim()||null,is_milestone:m.value?1:0,needs_followup:k.value?1:0})}return(Z,E)=>(F(),It(Vs,{to:"body"},[Oe(ns,{name:"modal"},{default:fr(()=>[e.open?(F(),q("div",{key:0,class:"mask",onClick:E[10]||(E[10]=Mr(L=>s("cancel"),["self"]))},[u("div",zh,[u("div",Gh,[u("div",null,[E[11]||(E[11]=u("div",{class:"dialog-title"},"编辑工作记录",-1)),e.date?(F(),q("div",Yh,re(e.date),1)):Ee("",!0)]),u("button",{class:"icon-btn",title:"关闭",onClick:E[0]||(E[0]=L=>s("cancel"))},[Oe(lt,{name:"close",size:16})])]),u("div",Jh,[u("div",Xh,[u("div",Qh,[E[12]||(E[12]=u("label",null,"工作内容(必填)",-1)),$e(u("input",{ref_key:"contentInput",ref:O,class:et(["input",{invalid:D.value}]),"onUpdate:modelValue":E[1]||(E[1]=L=>o.value=L),onKeydown:jt(de,["enter"])},null,34),[[De,o.value]]),D.value?(F(),q("div",Zh,re(D.value),1)):Ee("",!0)]),u("div",ev,[E[14]||(E[14]=u("label",null,"所属项目",-1)),$e(u("select",{class:"select","onUpdate:modelValue":E[2]||(E[2]=L=>a.value=L)},[E[13]||(E[13]=u("option",{value:null},"无项目",-1)),(F(!0),q(Re,null,ut(K.value,L=>(F(),q("option",{key:L.id,value:L.id},re(L.name),9,tv))),128))],512),[[Fn,a.value]])]),u("div",nv,[E[15]||(E[15]=u("label",null,"工作分类",-1)),$e(u("select",{class:"select","onUpdate:modelValue":E[3]||(E[3]=L=>c.value=L)},[(F(!0),q(Re,null,ut(Qt(Us),L=>(F(),q("option",{key:L.key,value:L.key},re(L.label),9,rv))),128))],512),[[Fn,c.value]])]),u("div",sv,[E[16]||(E[16]=u("label",null,"耗时(分钟)",-1)),$e(u("input",{class:"input",type:"number",min:"0","onUpdate:modelValue":E[4]||(E[4]=L=>d.value=L),placeholder:"选填"},null,512),[[De,d.value,void 0,{number:!0}]])]),u("div",ov,[E[17]||(E[17]=u("label",null,"主要收获",-1)),$e(u("input",{class:"input","onUpdate:modelValue":E[5]||(E[5]=L=>h.value=L),placeholder:"一句话:学到了什么"},null,512),[[De,h.value]])]),u("div",iv,[E[18]||(E[18]=u("label",null,"备注",-1)),$e(u("textarea",{class:"textarea","onUpdate:modelValue":E[6]||(E[6]=L=>y.value=L),placeholder:"背景、链接、未决事项(选填)"},null,512),[[De,y.value]])]),u("div",av,[E[19]||(E[19]=u("label",null,"成果标记",-1)),u("button",{class:et(["toggle-btn",{on:m.value===1}]),onClick:E[7]||(E[7]=L=>m.value=m.value===1?0:1)},re(m.value===1?"已标记为成果":"未标记"),3)]),u("div",lv,[E[20]||(E[20]=u("label",null,"待跟进",-1)),u("button",{class:et(["toggle-btn",{onwarn:k.value===1}]),onClick:E[8]||(E[8]=L=>k.value=k.value===1?0:1)},re(k.value===1?"需要跟进":"无需跟进"),3)])])]),u("div",uv,[u("button",{class:"btn btn-sm",onClick:E[9]||(E[9]=L=>s("cancel"))},"取消"),u("button",{class:"btn btn-primary btn-sm",onClick:de},"保存修改")])])])):Ee("",!0)]),_:1})]))}}),fv=Gt(cv,[["__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 wt(){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 Bo(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 dv(e){const t=rs(e).getDay();return t===0||t===6}function pv(e,t){return Math.round((new Date(t).getTime()-new Date(e).getTime())/6e4)}function sf(e){const t=rs(e),n=["周日","周一","周二","周三","周四","周五","周六"];return t.getFullYear()+" 年 "+(t.getMonth()+1)+" 月 "+t.getDate()+" 日 "+n[t.getDay()]}async function yt(e,t){const n=await ne.setting.get(e);return n?n.value:t}async function kt(e,t){await ne.setting.put({key:e,value:t})}async function jr(){const e=await Promise.all([yt("work_start","09:00"),yt("work_end","18:00"),yt("grace_minutes","10"),yt("lunch_minutes","60"),yt("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 hv(){const e=await yt("last_project",""),t=await yt("last_category","dev");return{project_id:e?Number(e):null,category:t||"dev"}}async function vv(){return yt("last_location","")}async function mv(e,t){const n=t.trim();await kt("last_location",n),n&&await Uo(n);const s=await mn(e);s&&s.id?await ne.attendance.update(s.id,{location:n||null}):n&&await ne.attendance.add({date:e,clock_in_at:null,clock_out_at:null,kind:"normal",note:null,location:n,created_at:wt()})}async function Qa(){const e=await yt("location_presets","");if(!e)return Au.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 Au.slice()}async function of(e){const t=Array.from(new Set(e.map(n=>n.trim()).filter(Boolean)));await kt("location_presets",JSON.stringify(t))}async function Uo(e){const t=e.trim();if(!t)return;const n=await Qa();n.includes(t)||await of([...n,t])}async function Ks(e=!1){const t=await ne.project.orderBy("name").toArray();return e?t:t.filter(n=>n.archived!==1)}async function yv(e){await ne.project.add({name:e.trim(),archived:0,created_at:wt()})}async function gv(e,t){await ne.project.update(e,{name:t.trim()})}async function bv(e,t){await ne.project.update(e,{archived:t?1:0})}async function mn(e){return ne.attendance.where("date").equals(e).first()}async function af(e,t){const n=((t===void 0?await yt("last_location",""):t)||"").trim(),s=await mn(e);if(s&&s.id){if(!s.clock_in_at){const o={clock_in_at:wt()};n&&(o.location=n),await ne.attendance.update(s.id,o)}n&&(await kt("last_location",n),await Uo(n));return}await ne.attendance.add({date:e,clock_in_at:wt(),clock_out_at:null,kind:"normal",note:null,location:n||null,created_at:wt()}),n&&(await kt("last_location",n),await Uo(n))}async function wv(e){const t=await mn(e);t&&t.id&&t.clock_in_at&&!t.clock_out_at&&await ne.attendance.update(t.id,{clock_out_at:wt()})}async function _v(){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 ne.attendance.update(s.id,{clock_out_at:wt()}),s.date}const n=await mn(t);if(n&&n.id&&n.clock_in_at&&!n.clock_out_at)return await ne.attendance.update(n.id,{clock_out_at:wt()}),n.date;throw new Error("没有进行中的打卡")}async function kv(e,t,n,s,o){(o||"").trim()&&await Uo(o);const a=await mn(e),c={date:e,clock_in_at:t,clock_out_at:n,kind:"makeup",note:s||null,location:(o||"").trim()||null,created_at:wt()};a&&a.id?await ne.attendance.update(a.id,c):await ne.attendance.add(c)}async function xv(e,t,n){const s=(n||"").trim();if(!s)return;const o=await mn(e);o&&o.id&&await ne.attendance.update(o.id,{[t]:e+"T"+s+":00"})}async function ci(e,t){return ne.attendance.where("date").between(e,t,!0,!0).toArray()}async function Cv(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:wt()};n&&n.id?await ne.attendance.update(n.id,s):await ne.attendance.add({...s,note:null,location:null})}else n&&n.id&&await ne.attendance.update(n.id,{kind:"normal"})}async function Sv(e){const t=await ne.work_log.where("date").equals(e).first();return t||{id:await ne.work_log.add({date:e,created_at:wt()}),date:e,created_at:wt()}}async function Ev(e){return ne.work_log.where("date").equals(e).first()}async function $v(e){const t=await Ev(e);return!t||!t.id?[]:(await ne.log_item.where("work_log_id").equals(t.id).toArray()).sort((s,o)=>o.id-s.id)}async function Av(e,t){const n=await Sv(e);await ne.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:wt()}),await kt("last_project",t.project_id?String(t.project_id):""),await kt("last_category",t.category)}async function ia(e,t){await ne.log_item.update(e,t)}async function Pv(e){await ne.log_item.delete(e)}async function fi(e,t){const n=await ne.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 ne.log_item.where("work_log_id").anyOf(n.map(a=>a.id)).toArray()).map(a=>({...a,date:s.get(a.work_log_id)||""})).sort((a,c)=>a.date===c.date?a.id-c.id:a.date<c.date?-1:1)}async function Za(e){return ne.weekly_note.where("week_start").equals(e).first()}async function Tv(e,t){const n=await Za(e);n&&n.id?await ne.weekly_note.update(n.id,t):await ne.weekly_note.add({week_start:e,highlights:t.highlights??null,challenges:t.challenges??null,plan_next:t.plan_next??null,created_at:wt()})}async function Ov(e,t){return ne.weekly_note.where("week_start").between(e,t,!0,!0).toArray()}async function Mv(){return(await ne.memo.toArray()).sort((t,n)=>t.updated_at<n.updated_at?1:-1)}async function Iv(e,t){const n=wt();return{id:await ne.memo.add({title:e.trim(),content:t,created_at:n,updated_at:n}),title:e.trim(),content:t,created_at:n,updated_at:n}}async function jv(e,t,n){await ne.memo.update(e,{title:t.trim(),content:n,updated_at:wt()})}async function Dv(e){await ne.memo.delete(e)}async function Rv(e,t=8){const n=e.trim().toLowerCase();if(!n)return[];const s=await ne.work_log.toArray(),o=new Map(s.map(c=>[c.id,c.date]));return(await ne.log_item.toArray()).filter(c=>((c.content||"")+" "+(c.takeaway||"")+" "+(c.remark||"")).toLowerCase().includes(n)).sort((c,d)=>d.id-c.id).slice(0,t).map(c=>({...c,date:o.get(c.work_log_id)||""}))}async function Lv(e,t=4){const n=e.trim().toLowerCase();return n?(await ne.memo.toArray()).filter(o=>((o.title||"")+" "+(o.content||"")).toLowerCase().includes(n)).sort((o,a)=>o.updated_at<a.updated_at?1:-1).slice(0,t):[]}async function Kv(e,t){return ne.table("transaction").where("date").between(e,t,!0,!0).toArray()}async function Fv(e){await ne.table("transaction").add({...e,created_at:wt()})}async function Nv(e,t){await ne.table("transaction").update(e,{...t})}async function Vv(e){await ne.table("transaction").delete(e)}async function Bv(e,t){await ne.table("transaction").update(e,{reimbursed:1})}async function Uv(){const e=await Promise.all([ne.project.toArray(),ne.work_log.toArray(),ne.log_item.toArray(),ne.attendance.toArray(),ne.weekly_note.toArray(),ne.setting.toArray(),ne.memo.toArray(),ne.credential.toArray(),ne.table("transaction").toArray()]);return JSON.stringify({schema_version:Wh,exported_at:wt(),data:{project:e[0],work_log:e[1],log_item:e[2],attendance:e[3],weekly_note:e[4],setting:e[5],memo:e[6],credential:e[7],transaction:e[8]}},null,2)}async function qv(e){let t=null;try{t=JSON.parse(e)}catch{throw new Error("不是有效的 JSON 文件")}if(!t||t.schema_version!==1&&t.schema_version!==2&&t.schema_version!==3||!t.data)throw new Error("文件格式或 schema 版本不匹配");const n=t.data;await ne.transaction("rw",[ne.project,ne.work_log,ne.log_item,ne.attendance,ne.weekly_note,ne.setting,ne.memo,ne.credential,ne.table("transaction")],async()=>{await Promise.all([ne.project.clear(),ne.work_log.clear(),ne.log_item.clear(),ne.attendance.clear(),ne.weekly_note.clear(),ne.setting.clear(),ne.memo.clear(),ne.credential.clear(),ne.table("transaction").clear()]),n.project&&n.project.length&&await ne.project.bulkAdd(n.project),n.work_log&&n.work_log.length&&await ne.work_log.bulkAdd(n.work_log),n.log_item&&n.log_item.length&&await ne.log_item.bulkAdd(n.log_item),n.attendance&&n.attendance.length&&await ne.attendance.bulkAdd(n.attendance),n.weekly_note&&n.weekly_note.length&&await ne.weekly_note.bulkAdd(n.weekly_note),n.setting&&n.setting.length&&await ne.setting.bulkAdd(n.setting),n.memo&&n.memo.length&&await ne.memo.bulkAdd(n.memo),n.credential&&n.credential.length&&await ne.credential.bulkAdd(n.credential),n.transaction&&n.transaction.length&&await ne.table("transaction").bulkAdd(n.transaction)})}function Co(e){const t=e.split(":");return Number(t[0])*60+Number(t[1])}function qs(e,t,n,s){if(e&&e.kind==="leave")return{status:"leave",label:"请假",makeup:!1,workedMinutes:null};if(dv(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=Co(Vn(e.clock_in_at)),c=Co(Vn(e.clock_out_at)),d=Co(n.work_start),h=Co(n.work_end);let y="normal";!o&&a>d+n.grace_minutes?y="late":!o&&c<h&&(y="early");const m=pv(e.clock_in_at,e.clock_out_at),k=Math.max(0,m-n.lunch_minutes);return{status:y,label:o?"补卡":y==="late"?"迟到":y==="early"?"早退":"正常",makeup:o,workedMinutes:k}}const Po=N([]);let Hv=0;function qe(e){const t=++Hv;Po.value.push({id:t,text:e}),setTimeout(()=>{Po.value=Po.value.filter(n=>n.id!==t)},2e3)}function Wv(){return Po}const Sa=N(null),Ea=N(null),Hs=N(0);function Sr(){Hs.value++}const zv={class:"day-panel"},Gv={class:"dp-head"},Yv={class:"dp-date"},Jv={class:"card sec"},Xv={class:"att-grid"},Qv={class:"att-cell"},Zv={key:0,class:"edit-row"},em={key:1,class:"att-val"},tm={class:"att-cell"},nm={key:0,class:"edit-row"},rm={key:1,class:"att-val"},sm={class:"att-cell"},om=["list"],im=["id"],am=["value"],lm={class:"att-cell"},um={class:"att-val status-val"},cm={key:0,class:"tag"},fm={key:1,class:"muted"},dm={key:0,class:"att-note muted"},pm={class:"att-actions"},hm=["disabled"],vm=["disabled"],mm=["disabled"],ym=["disabled"],gm={key:0,class:"card sec makeup"},bm={class:"form-grid"},wm={class:"field"},_m={class:"field"},km={class:"field span2"},xm=["list"],Cm={class:"field span2"},Sm={key:0,class:"form-error"},Em={class:"form-footer"},$m={class:"card sec"},Am={class:"form-grid"},Pm={class:"field span2"},Tm={key:0,class:"form-error"},Om={class:"field"},Mm=["value"],Im={class:"field"},jm=["value"],Dm={class:"field"},Rm={class:"field"},Lm={class:"field span2"},Km={class:"form-footer"},Fm=["disabled"],Nm=["disabled"],Vm={class:"list-sec"},Bm={class:"sec-title"},Um={key:0,class:"empty muted"},qm={class:"item-main"},Hm={class:"tag"},Wm=["onClick"],zm={key:0,class:"muted item-meta"},Gm={key:1,class:"muted num item-meta"},Ym=["onClick"],Jm=["onClick"],Xm=["onClick"],Qm=["onClick"],Zm={key:0,class:"item-sub"},ey={key:0,class:"muted2"},ty={key:1,class:"muted"},ny={key:1,class:"dp-foot muted num"},ry=Vt({__name:"DayPanel",props:{date:{}},setup(e){const t=e,n=N(!0),s=N(null),o=N(void 0),a=N([]),c=N([]),d=N(""),h=N([]),y=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 $v(t.date),c.value=await Ks(!0),h.value=await Qa(),d.value=o.value&&o.value.location||await vv(),n.value=!1}fn(k),gt(()=>t.date,k),gt(Hs,()=>{k()});const D=it(()=>c.value.filter(H=>H.archived!==1));function O(H){if(!H)return"";const U=c.value.find(Y=>Y.id===H);return U?U.name:"已删除项目"}const K=it(()=>s.value?qs(o.value,t.date,s.value,m.value):null),W=it(()=>a.value.reduce((H,U)=>H+(U.minutes||0),0)),de=N(!1);async function Z(){de.value||(de.value=!0,await af(t.date,d.value),await k(),Sr(),qe("上班打卡成功"),de.value=!1)}async function E(){de.value||(de.value=!0,await wv(t.date),await k(),Sr(),qe("下班打卡成功"),de.value=!1)}async function L(){await mv(t.date,d.value),Sr(),qe("地点已更新")}const Q=N(!1),le=it(()=>{var H;return((H=o.value)==null?void 0:H.kind)==="leave"});function ce(){if(o.value&&o.value.clock_in_at){Q.value=!0;return}ee(!0)}async function ee(H){Q.value=!1,await Cv(t.date,H),await k(),Sr(),qe(H?"已标记为休假":"已取消休假")}const A=N(null),x=N(""),ie=N(null);gt(A,async H=>{var U;H&&(await ts(),(U=ie.value)==null||U.focus())});function xe(H){var Y,Ae;const U=H==="in"?(Y=o.value)==null?void 0:Y.clock_in_at:(Ae=o.value)==null?void 0:Ae.clock_out_at;A.value=H,x.value=U?Vn(U):H==="in"?"09:00":"18:00"}function J(){A.value=null}async function Ce(){const H=A.value;H&&(A.value=null,x.value&&(await xv(t.date,H==="in"?"clock_in_at":"clock_out_at",x.value),await k(),Sr(),qe("打卡时间已修改")))}const Ke=N(!1),Xe=N("09:00"),He=N("18:00"),Ue=N(""),ge=N(""),Me=N("");function Fe(){ge.value=d.value,Me.value="",Ke.value=!Ke.value}async function fe(){if(!Xe.value||!He.value){Me.value="请填写上班与下班时间";return}await kv(t.date,t.date+"T"+Xe.value+":00",t.date+"T"+He.value+":00",Ue.value.trim(),ge.value),Ke.value=!1,Ue.value="",Me.value="",await k(),Sr(),qe("补卡已保存")}const G=N(""),X=N("");gt(G,()=>{X.value&&(X.value="")});const ke=N(null),st=N("dev"),pt=N(null),ht=N(""),Yt=N(""),Jt=N(!1),je=it(()=>!!(G.value.trim()||pt.value||ht.value.trim()||Yt.value.trim()));fn(async()=>{const H=await hv();ke.value=H.project_id,st.value=H.category});function w(){G.value="",pt.value=null,ht.value="",Yt.value="",X.value=""}async function g(){const H=G.value.trim();if(!H){X.value="请填写工作内容";return}Jt.value||(Jt.value=!0,await Av(t.date,{content:H,project_id:ke.value,category:st.value,minutes:pt.value&&pt.value>0?pt.value:null,takeaway:ht.value.trim()||null,remark:Yt.value.trim()||null}),w(),await k(),qe("记录已添加"),Jt.value=!1)}const P=N(null);function ae(H){P.value=H}async function se(H){const U=H.id,Y={content:H.content,project_id:H.project_id,category:H.category,minutes:H.minutes,takeaway:H.takeaway,remark:H.remark,is_milestone:H.is_milestone,needs_followup:H.needs_followup};await ia(U,Y),P.value=null,await k(),qe("修改已保存")}async function ue(H){await ia(H.id,{is_milestone:H.is_milestone?0:1}),await k()}async function ye(H){await ia(H.id,{needs_followup:H.needs_followup?0:1}),await k()}const oe=N(null);async function we(){oe.value&&oe.value.id&&await Pv(oe.value.id),oe.value=null,await k(),qe("记录已删除")}return(H,U)=>(F(),q("div",zv,[u("div",Gv,[u("div",Yv,re(Qt(sf)(e.date)),1)]),u("div",Jv,[U[25]||(U[25]=u("div",{class:"sec-title"},"出勤信息",-1)),u("div",Xv,[u("div",Qv,[U[21]||(U[21]=u("label",null,"上班时间",-1)),A.value==="in"?(F(),q("div",Zv,[$e(u("input",{ref_key:"timeInput",ref:ie,type:"time",class:"input time-input","onUpdate:modelValue":U[0]||(U[0]=Y=>x.value=Y),onKeydown:[jt(Ce,["enter"]),jt(J,["esc"])]},null,544),[[De,x.value]]),u("button",{class:"btn btn-primary btn-sm",onClick:Ce},"确认"),u("button",{class:"btn btn-sm",onClick:J},"取消")])):(F(),q("div",em,[u("span",{class:et(["num",{"val-empty":!(o.value&&o.value.clock_in_at)}])},re(o.value&&o.value.clock_in_at?Qt(Vn)(o.value.clock_in_at):"未打卡"),3),o.value&&o.value.id?(F(),q("button",{key:0,class:"icon-btn",title:"修改上班时间",onClick:U[1]||(U[1]=Y=>xe("in"))},[Oe(lt,{name:"edit",size:13})])):Ee("",!0)]))]),u("div",tm,[U[22]||(U[22]=u("label",null,"下班时间",-1)),A.value==="out"?(F(),q("div",nm,[$e(u("input",{ref_key:"timeInput",ref:ie,type:"time",class:"input time-input","onUpdate:modelValue":U[2]||(U[2]=Y=>x.value=Y),onKeydown:[jt(Ce,["enter"]),jt(J,["esc"])]},null,544),[[De,x.value]]),u("button",{class:"btn btn-primary btn-sm",onClick:Ce},"确认"),u("button",{class:"btn btn-sm",onClick:J},"取消")])):(F(),q("div",rm,[u("span",{class:et(["num",{"val-empty":!(o.value&&o.value.clock_out_at)}])},re(o.value&&o.value.clock_out_at?Qt(Vn)(o.value.clock_out_at):"未打卡"),3),o.value&&o.value.id?(F(),q("button",{key:0,class:"icon-btn",title:"修改下班时间",onClick:U[3]||(U[3]=Y=>xe("out"))},[Oe(lt,{name:"edit",size:13})])):Ee("",!0)]))]),u("div",sm,[U[23]||(U[23]=u("label",null,"上班地点",-1)),$e(u("input",{class:"input","onUpdate:modelValue":U[4]||(U[4]=Y=>d.value=Y),list:y.value,placeholder:"可直接输入",title:"上班地点,可自由输入",onChange:L},null,40,om),[[De,d.value]]),u("datalist",{id:y.value},[(F(!0),q(Re,null,ut(h.value,Y=>(F(),q("option",{key:Y,value:Y},null,8,am))),128))],8,im)]),u("div",lm,[U[24]||(U[24]=u("label",null,"考勤状态",-1)),u("div",um,[K.value?(F(),q(Re,{key:0},[u("span",{class:et(["dot",K.value.status])},null,2),u("span",null,re(K.value.label),1),o.value&&o.value.kind==="makeup"?(F(),q("span",cm,"补卡")):Ee("",!0)],64)):(F(),q("span",fm,"--"))])])]),o.value&&o.value.note?(F(),q("div",dm,"补卡说明:"+re(o.value.note),1)):Ee("",!0),u("div",pm,[m.value&&(!o.value||!o.value.clock_in_at)?(F(),q("button",{key:0,class:"btn btn-primary btn-sm",disabled:de.value,onClick:Z},"上班打卡",8,hm)):m.value&&o.value&&o.value.clock_in_at&&!o.value.clock_out_at?(F(),q("button",{key:1,class:"btn btn-primary btn-sm",disabled:de.value,onClick:E},"下班打卡",8,vm)):Ee("",!0),!m.value&&(!o.value||!o.value.clock_in_at)?(F(),q("button",{key:2,class:"btn btn-sm",onClick:Fe},"补卡")):Ee("",!0),le.value?(F(),q("button",{key:4,class:"btn btn-sm",disabled:de.value,onClick:U[5]||(U[5]=Y=>ee(!1))},"取消休假",8,ym)):(F(),q("button",{key:3,class:"btn btn-sm",disabled:de.value,onClick:ce},"标记休假",8,mm))])]),Ke.value?(F(),q("div",gm,[U[30]||(U[30]=u("div",{class:"sec-title"},"补卡登记",-1)),u("div",bm,[u("div",wm,[U[26]||(U[26]=u("label",null,"上班时间",-1)),$e(u("input",{type:"time",class:"input","onUpdate:modelValue":U[6]||(U[6]=Y=>Xe.value=Y)},null,512),[[De,Xe.value]])]),u("div",_m,[U[27]||(U[27]=u("label",null,"下班时间",-1)),$e(u("input",{type:"time",class:"input","onUpdate:modelValue":U[7]||(U[7]=Y=>He.value=Y)},null,512),[[De,He.value]])]),u("div",km,[U[28]||(U[28]=u("label",null,"上班地点",-1)),$e(u("input",{class:"input",list:y.value,"onUpdate:modelValue":U[8]||(U[8]=Y=>ge.value=Y),placeholder:"可直接输入"},null,8,xm),[[De,ge.value]])]),u("div",Cm,[U[29]||(U[29]=u("label",null,"补卡原因",-1)),$e(u("input",{class:"input","onUpdate:modelValue":U[9]||(U[9]=Y=>Ue.value=Y),placeholder:"如:外出拜访客户忘记打卡"},null,512),[[De,Ue.value]])])]),Me.value?(F(),q("div",Sm,re(Me.value),1)):Ee("",!0),u("div",Em,[u("button",{class:"btn btn-sm",onClick:U[10]||(U[10]=Y=>Ke.value=!1)},"取消"),u("button",{class:"btn btn-primary btn-sm",onClick:fe},"保存补卡")])])):Ee("",!0),u("div",$m,[U[38]||(U[38]=u("div",{class:"sec-head"},[u("span",{class:"sec-title"},"新增工作记录"),u("span",{class:"muted form-hint"},"内容必填,其余选填")],-1)),u("div",Am,[u("div",Pm,[U[31]||(U[31]=u("label",null,"工作内容(必填)",-1)),$e(u("input",{class:et(["input",{invalid:X.value}]),"onUpdate:modelValue":U[11]||(U[11]=Y=>G.value=Y),placeholder:"做了什么,一句话一条",onKeydown:jt(g,["enter"])},null,34),[[De,G.value]]),X.value?(F(),q("div",Tm,re(X.value),1)):Ee("",!0)]),u("div",Om,[U[33]||(U[33]=u("label",null,"所属项目",-1)),$e(u("select",{class:"select","onUpdate:modelValue":U[12]||(U[12]=Y=>ke.value=Y)},[U[32]||(U[32]=u("option",{value:null},"无项目",-1)),(F(!0),q(Re,null,ut(D.value,Y=>(F(),q("option",{key:Y.id,value:Y.id},re(Y.name),9,Mm))),128))],512),[[Fn,ke.value]])]),u("div",Im,[U[34]||(U[34]=u("label",null,"工作分类",-1)),$e(u("select",{class:"select","onUpdate:modelValue":U[13]||(U[13]=Y=>st.value=Y)},[(F(!0),q(Re,null,ut(Qt(Us),Y=>(F(),q("option",{key:Y.key,value:Y.key},re(Y.label),9,jm))),128))],512),[[Fn,st.value]])]),u("div",Dm,[U[35]||(U[35]=u("label",null,"耗时(分钟)",-1)),$e(u("input",{class:"input",type:"number",min:"0","onUpdate:modelValue":U[14]||(U[14]=Y=>pt.value=Y),placeholder:"选填"},null,512),[[De,pt.value,void 0,{number:!0}]])]),u("div",Rm,[U[36]||(U[36]=u("label",null,"主要收获",-1)),$e(u("input",{class:"input","onUpdate:modelValue":U[15]||(U[15]=Y=>ht.value=Y),placeholder:"一句话:学到了什么"},null,512),[[De,ht.value]])]),u("div",Lm,[U[37]||(U[37]=u("label",null,"备注",-1)),$e(u("textarea",{class:"textarea","onUpdate:modelValue":U[16]||(U[16]=Y=>Yt.value=Y),placeholder:"背景、链接、未决事项(选填)"},null,512),[[De,Yt.value]])])]),u("div",Km,[u("button",{class:"btn btn-sm",disabled:!je.value,onClick:w},"重置",8,Fm),u("button",{class:"btn btn-primary btn-sm",disabled:Jt.value,onClick:g},"添加记录",8,Nm)])]),u("div",Vm,[u("div",Bm,"工作记录("+re(a.value.length)+")",1),!a.value.length&&!n.value?(F(),q("div",Um,"暂无记录")):Ee("",!0),(F(!0),q(Re,null,ut(a.value,Y=>(F(),q("div",{key:Y.id,class:"item"},[u("div",qm,[u("span",Hm,re(Qt(Xa)(Y.category)),1),u("span",{class:"item-content",title:"点击编辑",onClick:Ae=>ae(Y)},re(Y.content),9,Wm),Y.project_id?(F(),q("span",zm,re(O(Y.project_id)),1)):Ee("",!0),Y.minutes?(F(),q("span",Gm,re(Y.minutes)+" 分钟",1)):Ee("",!0),U[39]||(U[39]=u("span",{class:"flex1"},null,-1)),u("button",{class:"icon-btn",title:"编辑完整信息",onClick:Ae=>ae(Y)},[Oe(lt,{name:"edit",size:14})],8,Ym),u("button",{class:et(["icon-btn",{active:Y.is_milestone===1}]),title:"成果标记",onClick:Ae=>ue(Y)},[Oe(lt,{name:"star",size:14})],10,Jm),u("button",{class:et(["icon-btn",{"active-warn":Y.needs_followup===1}]),title:"待跟进",onClick:Ae=>ye(Y)},[Oe(lt,{name:"flag",size:14})],10,Xm),u("button",{class:"icon-btn",title:"删除",onClick:Ae=>oe.value=Y},[Oe(lt,{name:"close",size:14})],8,Qm)]),Y.takeaway||Y.remark?(F(),q("div",Zm,[Y.takeaway?(F(),q("div",ey,"收获:"+re(Y.takeaway),1)):Ee("",!0),Y.remark?(F(),q("div",ty,"备注:"+re(Y.remark),1)):Ee("",!0)])):Ee("",!0)]))),128)),a.value.length?(F(),q("div",ny,[nn(" 共 "+re(a.value.length)+" 条事项 ",1),W.value?(F(),q(Re,{key:0},[nn(" · "+re((W.value/60).toFixed(1))+" 小时",1)],64)):Ee("",!0)])):Ee("",!0)]),Oe(ur,{open:!!oe.value,title:"删除确认",message:oe.value?"将删除工作记录「"+oe.value.content+"」。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:U[17]||(U[17]=Y=>oe.value=null),onConfirm:we},null,8,["open","message"]),Oe(ur,{open:Q.value,title:"标记休假确认",message:"该日已有打卡记录,标记休假将清空上下班时间。是否继续?","confirm-text":"标记休假",danger:"",onCancel:U[18]||(U[18]=Y=>Q.value=!1),onConfirm:U[19]||(U[19]=Y=>ee(!0))},null,8,["open"]),Oe(fv,{open:!!P.value,item:P.value,projects:c.value,date:e.date,onCancel:U[20]||(U[20]=Y=>P.value=null),onSave:se},null,8,["open","item","projects","date"])]))}}),lf=Gt(ry,[["__scopeId","data-v-2e90c9d8"]]),sy={class:"cal-page"},oy={class:"cal-toolbar"},iy={class:"cal-title num"},ay={class:"cal-head"},ly={class:"cal-grid"},uy=["title","onClick"],cy={class:"cal-marks"},fy={key:0,class:"drawer"},dy={class:"drawer-head"},py={class:"drawer-body"},hy=Vt({__name:"CalendarView",setup(e){const t=N(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=["一","二","三","四","五","六","日"],c=it(()=>{const Q=(new Date(n.value,s.value,1).getDay()+6)%7,le=new Date(n.value,s.value+1,0).getDate(),ce=[];for(let ee=0;ee<Q;ee++)ce.push({date:"",inMonth:!1,weekend:!1});for(let ee=1;ee<=le;ee++){const A=new Date(n.value,s.value,ee),x=A.getDay();ce.push({date:Nn(A),inMonth:!0,weekend:x===0||x===6})}return ce}),d=N(new Map),h=xt();async function y(){var ie;const L=Nn(new Date(n.value,s.value,1)),Q=Nn(new Date(n.value,s.value+1,0)),le=await Promise.all([jr(),ci(L,Q),fi(L,Q)]),ce=le[0],ee=new Map(le[1].map(xe=>[xe.date,xe])),A=le[2],x=new Map;for(const xe of c.value){if(!xe.inMonth)continue;const J=qs(ee.get(xe.date),xe.date,ce,xe.date===h),Ce=A.filter(Ke=>Ke.date===xe.date);x.set(xe.date,{status:J.status,label:J.label,location:((ie=ee.get(xe.date))==null?void 0:ie.location)||"",hasLog:Ce.length>0,hasMilestone:Ce.some(Ke=>Ke.is_milestone===1)})}d.value=x}gt([n,s],y,{immediate:!0}),gt(Hs,()=>{y()});function m(L){var Q;return((Q=d.value.get(L))==null?void 0:Q.status)??""}function k(L){const Q=d.value.get(L);return Q?L+" · "+Q.label+(Q.location?" · "+Q.location:""):L}function D(L){var Q;return!!((Q=d.value.get(L))!=null&&Q.hasLog)}function O(L){var Q;return!!((Q=d.value.get(L))!=null&&Q.hasMilestone)}function K(){t.value=Bo(t.value,-1)}function W(){t.value=Bo(t.value,1)}function de(){t.value=xt()}const Z=N(null);function E(L,Q){Q&&(Z.value=L)}return gt(Sa,L=>{L&&(t.value=L,Z.value=L,Sa.value=null)},{immediate:!0}),(L,Q)=>(F(),q("div",sy,[u("div",oy,[u("button",{class:"icon-btn",onClick:K},[Oe(lt,{name:"chevron-left",size:16})]),u("span",iy,re(o.value),1),u("button",{class:"icon-btn",onClick:W},[Oe(lt,{name:"chevron-right",size:16})]),u("button",{class:"btn btn-sm",onClick:de},"回到今天")]),u("div",ay,[(F(),q(Re,null,ut(a,le=>u("span",{key:le,class:"cal-week muted"},re(le),1)),64))]),u("div",ly,[(F(!0),q(Re,null,ut(c.value,(le,ce)=>(F(),q("button",{key:ce,class:et(["cal-cell",{blank:!le.inMonth,weekend:le.weekend,selected:Z.value===le.date}]),title:le.inMonth?k(le.date):void 0,onClick:ee=>E(le.date,le.inMonth)},[le.inMonth?(F(),q(Re,{key:0},[u("span",{class:et(["daynum num",{today:le.date===Qt(h)}])},re(Number(le.date.slice(8,10))),3),u("span",cy,[m(le.date)?(F(),q("span",{key:0,class:et(["dot",m(le.date)])},null,2)):Ee("",!0),D(le.date)?(F(),It(lt,{key:1,name:"check-circle",size:12,class:"mark-log"})):Ee("",!0),O(le.date)?(F(),It(lt,{key:2,name:"star",size:12,class:"mark-star"})):Ee("",!0)])],64)):Ee("",!0)],10,uy))),128))]),Oe(ns,{name:"drawer"},{default:fr(()=>[Z.value?(F(),q("aside",fy,[u("div",dy,[Q[1]||(Q[1]=u("span",{class:"drawer-title"},"当日详情",-1)),u("button",{class:"icon-btn",onClick:Q[0]||(Q[0]=le=>Z.value=null)},[Oe(lt,{name:"close",size:16})])]),u("div",py,[Oe(lf,{date:Z.value},null,8,["date"])])])):Ee("",!0)]),_:1})]))}}),vy=Gt(hy,[["__scopeId","data-v-6a6322fa"]]),my={class:"detail-page"},yy={class:"detail-toolbar"},gy=["value"],by=["disabled"],wy=Vt({__name:"TodayView",setup(e){const t=N(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 c(d){const h=d.target.value;h&&(t.value=h)}return(d,h)=>(F(),q("div",my,[u("div",yy,[u("button",{class:"icon-btn",title:"前一天",onClick:s},[Oe(lt,{name:"chevron-left",size:16})]),u("span",{class:et(["date-title num",{"is-today":n.value}])},re(Qt(sf)(t.value)),3),u("button",{class:"icon-btn",title:"后一天",onClick:o},[Oe(lt,{name:"chevron-right",size:16})]),u("input",{type:"date",class:"input w-date",value:t.value,onChange:c},null,40,gy),u("button",{class:"btn btn-sm",disabled:n.value,onClick:a},"回到今天",8,by)]),Oe(lf,{date:t.value},null,8,["date"])]))}}),_y=Gt(wy,[["__scopeId","data-v-ac366cf6"]]),ky={class:"stats"},xy={class:"cards"},Cy={class:"card stat-card"},Sy={class:"stat-num num"},Ey={class:"card stat-card"},$y={class:"stat-num num"},Ay={class:"card stat-card"},Py={class:"stat-num num"},Ty={class:"card stat-card"},Oy={class:"stat-num num"},My={class:"card section"},Iy={class:"heat"},jy=["title"],Dy={class:"two-col"},Ry={class:"card section"},Ly={class:"bar-label"},Ky={class:"bar-track"},Fy={class:"muted num bar-num"},Ny={key:0,class:"muted"},Vy={class:"card section"},By={class:"bar-label"},Uy={class:"bar-track"},qy={class:"muted num bar-num"},Hy={key:0,class:"muted"},Wy={class:"card section"},zy={class:"bar-label loc-label"},Gy={class:"bar-track"},Yy={class:"muted num bar-num"},Jy={key:0,class:"muted"},Xy=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 c(){const y=xt(),m="2000-01-01",k=await Promise.all([jr(),ci(m,y),fi(m,y),Ks(!0)]),D=k[0],O=k[1],K=k[2],W=k[3],de=O.filter(J=>J.clock_in_at||J.kind==="makeup");let Z=0;for(const J of de){const Ce=qs(J,J.date,D,J.date===y);Z+=Ce.workedMinutes??0}const E=new Set(K.map(J=>J.date));let L=0,Q=y;for(E.has(Q)||(Q=Kn(y,-1));E.has(Q);)L++,Q=Kn(Q,-1);t.value={attendDays:de.length,totalHours:(Z/60).toFixed(1),itemCount:K.length,streak:L};const le=new Map;for(const J of de){const Ce=J.location||"未记录";le.set(Ce,(le.get(Ce)||0)+1)}a.value=Array.from(le.entries()).map(J=>({name:J[0],count:J[1],percent:Math.round(J[1]/(de.length||1)*100)})).sort((J,Ce)=>Ce.count-J.count);const ce=K.length||1;s.value=Us.map(J=>{const Ce=K.filter(Ke=>Ke.category===J.key).length;return{key:J.key,label:J.label,count:Ce,percent:Math.round(Ce/ce*100)}}).filter(J=>J.count>0).sort((J,Ce)=>Ce.count-J.count);const ee=new Map(W.map(J=>[J.id,J.name])),A=new Map;for(const J of K){const Ce=J.project_id?ee.get(J.project_id)||"已删除项目":"无项目";A.set(Ce,(A.get(Ce)||0)+1)}o.value=Array.from(A.entries()).map(J=>({name:J[0],count:J[1],percent:Math.round(J[1]/ce*100)})).sort((J,Ce)=>Ce.count-J.count);const x=new Map;for(const J of K)x.set(J.date,(x.get(J.date)||0)+1);const ie=Es(y),xe=[];for(let J=11;J>=0;J--){const Ce=Kn(ie,-7*J),Ke=[];for(let Xe=0;Xe<7;Xe++){const He=Kn(Ce,Xe);Ke.push({date:He,count:x.get(He)||0})}xe.push(Ke)}n.value=xe}fn(async()=>{await c()}),gt(Hs,()=>{c()});function d(y){return y===0?0:y===1?1:y<=3?2:y<=5?3:4}function h(y,m){return y+" · "+(m?m+" 条":"无记录")}return(y,m)=>(F(),q("div",ky,[u("div",xy,[u("div",Cy,[m[0]||(m[0]=u("div",{class:"muted"},"出勤天数",-1)),u("div",Sy,re(t.value.attendDays),1)]),u("div",Ey,[m[1]||(m[1]=u("div",{class:"muted"},"累计工时(小时)",-1)),u("div",$y,re(t.value.totalHours),1)]),u("div",Ay,[m[2]||(m[2]=u("div",{class:"muted"},"记录条数",-1)),u("div",Py,re(t.value.itemCount),1)]),u("div",Ty,[m[3]||(m[3]=u("div",{class:"muted"},"连续记录(天)",-1)),u("div",Oy,re(t.value.streak),1)])]),u("div",My,[m[4]||(m[4]=u("div",{class:"section-title"},"记录热力图(近 12 周)",-1)),u("div",Iy,[(F(!0),q(Re,null,ut(n.value,(k,D)=>(F(),q("div",{key:D,class:"heat-col"},[(F(!0),q(Re,null,ut(k,O=>(F(),q("span",{key:O.date,class:et(["heat-cell","lv"+d(O.count)]),title:h(O.date,O.count)},null,10,jy))),128))]))),128))]),m[5]||(m[5]=jp('<div class="heat-legend muted" data-v-73e5ba49><span data-v-73e5ba49>少</span><span class="heat-cell lv0" data-v-73e5ba49></span><span class="heat-cell lv1" data-v-73e5ba49></span><span class="heat-cell lv2" data-v-73e5ba49></span><span class="heat-cell lv3" data-v-73e5ba49></span><span class="heat-cell lv4" data-v-73e5ba49></span><span data-v-73e5ba49>多</span></div>',1))]),u("div",Dy,[u("div",Ry,[m[6]||(m[6]=u("div",{class:"section-title"},"分类分布",-1)),(F(!0),q(Re,null,ut(s.value,k=>(F(),q("div",{key:k.key,class:"bar-row"},[u("span",Ly,re(k.label),1),u("span",Ky,[u("span",{class:"bar-fill",style:sr({width:k.percent+"%"})},null,4)]),u("span",Fy,re(k.count)+" 条 · "+re(k.percent)+"%",1)]))),128)),s.value.length?Ee("",!0):(F(),q("div",Ny,"暂无数据"))]),u("div",Vy,[m[7]||(m[7]=u("div",{class:"section-title"},"项目投入",-1)),(F(!0),q(Re,null,ut(o.value,k=>(F(),q("div",{key:k.name,class:"bar-row"},[u("span",By,re(k.name),1),u("span",Uy,[u("span",{class:"bar-fill",style:sr({width:k.percent+"%"})},null,4)]),u("span",qy,re(k.count)+" 条 · "+re(k.percent)+"%",1)]))),128)),o.value.length?Ee("",!0):(F(),q("div",Hy,"暂无数据"))])]),u("div",Wy,[m[8]||(m[8]=u("div",{class:"section-title"},"地点分布(按出勤天)",-1)),(F(!0),q(Re,null,ut(a.value,k=>(F(),q("div",{key:k.name,class:"bar-row"},[u("span",zy,re(k.name),1),u("span",Gy,[u("span",{class:"bar-fill",style:sr({width:k.percent+"%"})},null,4)]),u("span",Yy,re(k.count)+" 天 · "+re(k.percent)+"%",1)]))),128)),a.value.length?Ee("",!0):(F(),q("div",Jy,"暂无数据"))])]))}}),Qy=Gt(Xy,[["__scopeId","data-v-73e5ba49"]]);async function Zy(e,t,n){const s=xt(),o=await Promise.all([jr(),ci(e,t),fi(e,t),Ks(!0),Ov(e,t)]),a=o[0],c=o[1],d=o[2],h=o[3],y=o[4];let m=0,k=0,D=0;for(const A of c){(A.clock_in_at||A.kind==="makeup")&&m++,A.kind==="makeup"&&D++;const x=qs(A,A.date,a,A.date===s);k+=x.workedMinutes??0}const O=new Map;for(const A of c){if(!(A.clock_in_at||A.kind==="makeup"))continue;const x=A.location||"未记录";O.set(x,(O.get(x)||0)+1)}const K=Array.from(O.entries()).map(A=>({name:A[0],count:A[1]})).sort((A,x)=>x.count-A.count),W=d.length||1,de=Us.map(A=>{const x=d.filter(ie=>ie.category===A.key).length;return{key:A.key,label:A.label,count:x,percent:Math.round(x/W*100)}}).filter(A=>A.count>0).sort((A,x)=>x.count-A.count),Z=new Map(h.map(A=>[A.id,A.name])),E=new Map;for(const A of d){const x=A.project_id?Z.get(A.project_id)||"已删除项目":"无项目";E.set(x,(E.get(x)||0)+1)}const L=Array.from(E.entries()).map(A=>({name:A[0],count:A[1]})).sort((A,x)=>x.count-A.count),Q=d.filter(A=>A.is_milestone===1).map(A=>({date:A.date,content:A.content})),le=d.filter(A=>A.needs_followup===1).map(A=>({date:A.date,content:A.content,remark:A.remark||""})),ce=d.filter(A=>!!A.takeaway).map(A=>({date:A.date,text:A.takeaway})),ee=y.map(A=>({weekStart:A.week_start,highlights:A.highlights||"",challenges:A.challenges||"",plan_next:A.plan_next||""}));return{range:{start:e,end:t,label:n},attendDays:m,totalHours:(k/60).toFixed(1),makeupCount:D,leaveCount:c.filter(A=>A.kind==="leave").length,itemCount:d.length,categoryStats:de,projectStats:L,locationStats:K,milestones:Q,followups:le,takeaways:ce,weekNotes:ee}}function eg(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 tg="modulepreload",ng=function(e,t){return new URL(e,t).href},Pu={},uf=function(t,n,s){let o=Promise.resolve();if(n&&n.length>0){const c=document.getElementsByTagName("link"),d=document.querySelector("meta[property=csp-nonce]"),h=(d==null?void 0:d.nonce)||(d==null?void 0:d.getAttribute("nonce"));o=Promise.allSettled(n.map(y=>{if(y=ng(y,s),y in Pu)return;Pu[y]=!0;const m=y.endsWith(".css"),k=m?'[rel="stylesheet"]':"";if(!!s)for(let K=c.length-1;K>=0;K--){const W=c[K];if(W.href===y&&(!m||W.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${y}"]${k}`))return;const O=document.createElement("link");if(O.rel=m?"stylesheet":tg,m||(O.as="script"),O.crossOrigin="",O.href=y,h&&O.setAttribute("nonce",h),document.head.appendChild(O),m)return new Promise((K,W)=>{O.addEventListener("load",K),O.addEventListener("error",()=>W(new Error(`Unable to preload CSS for ${y}`)))})}))}function a(c){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=c,window.dispatchEvent(d),!d.defaultPrevented)throw c}return o.then(c=>{for(const d of c||[])d.status==="rejected"&&a(d.reason);return t().catch(a)})};/*! Capacitor: https://capacitorjs.com/ - MIT License */const rg=e=>{const t=new Map;t.set("web",{name:"web"});const n=e.CapacitorPlatforms||{currentPlatform:{name:"web"},platforms:t},s=(a,c)=>{n.platforms.set(a,c)},o=a=>{n.platforms.has(a)&&(n.currentPlatform=n.platforms.get(a))};return n.addPlatform=s,n.setPlatform=o,n},sg=e=>e.CapacitorPlatforms=rg(e),cf=sg(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});cf.addPlatform;cf.setPlatform;var Qr;(function(e){e.Unimplemented="UNIMPLEMENTED",e.Unavailable="UNAVAILABLE"})(Qr||(Qr={}));class aa extends Error{constructor(t,n,s){super(t),this.message=t,this.code=n,this.data=s}}const og=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"},ig=e=>{var t,n,s,o,a;const c=e.CapacitorCustomPlatform||null,d=e.Capacitor||{},h=d.Plugins=d.Plugins||{},y=e.CapacitorPlatforms,m=()=>c!==null?c.name:og(e),k=((t=y==null?void 0:y.currentPlatform)===null||t===void 0?void 0:t.getPlatform)||m,D=()=>k()!=="web",O=((n=y==null?void 0:y.currentPlatform)===null||n===void 0?void 0:n.isNativePlatform)||D,K=ee=>{const A=Q.get(ee);return!!(A!=null&&A.platforms.has(k())||Z(ee))},W=((s=y==null?void 0:y.currentPlatform)===null||s===void 0?void 0:s.isPluginAvailable)||K,de=ee=>{var A;return(A=d.PluginHeaders)===null||A===void 0?void 0:A.find(x=>x.name===ee)},Z=((o=y==null?void 0:y.currentPlatform)===null||o===void 0?void 0:o.getPluginHeader)||de,E=ee=>e.console.error(ee),L=(ee,A,x)=>Promise.reject(`${x} does not have an implementation of "${A}".`),Q=new Map,le=(ee,A={})=>{const x=Q.get(ee);if(x)return console.warn(`Capacitor plugin "${ee}" already registered. Cannot register plugins twice.`),x.proxy;const ie=k(),xe=Z(ee);let J;const Ce=async()=>(!J&&ie in A?J=typeof A[ie]=="function"?J=await A[ie]():J=A[ie]:c!==null&&!J&&"web"in A&&(J=typeof A.web=="function"?J=await A.web():J=A.web),J),Ke=(Fe,fe)=>{var G,X;if(xe){const ke=xe==null?void 0:xe.methods.find(st=>fe===st.name);if(ke)return ke.rtype==="promise"?st=>d.nativePromise(ee,fe.toString(),st):(st,pt)=>d.nativeCallback(ee,fe.toString(),st,pt);if(Fe)return(G=Fe[fe])===null||G===void 0?void 0:G.bind(Fe)}else{if(Fe)return(X=Fe[fe])===null||X===void 0?void 0:X.bind(Fe);throw new aa(`"${ee}" plugin is not implemented on ${ie}`,Qr.Unimplemented)}},Xe=Fe=>{let fe;const G=(...X)=>{const ke=Ce().then(st=>{const pt=Ke(st,Fe);if(pt){const ht=pt(...X);return fe=ht==null?void 0:ht.remove,ht}else throw new aa(`"${ee}.${Fe}()" is not implemented on ${ie}`,Qr.Unimplemented)});return Fe==="addListener"&&(ke.remove=async()=>fe()),ke};return G.toString=()=>`${Fe.toString()}() { [capacitor code] }`,Object.defineProperty(G,"name",{value:Fe,writable:!1,configurable:!1}),G},He=Xe("addListener"),Ue=Xe("removeListener"),ge=(Fe,fe)=>{const G=He({eventName:Fe},fe),X=async()=>{const st=await G;Ue({eventName:Fe,callbackId:st},fe)},ke=new Promise(st=>G.then(()=>st({remove:X})));return ke.remove=async()=>{console.warn("Using addListener() without 'await' is deprecated."),await X()},ke},Me=new Proxy({},{get(Fe,fe){switch(fe){case"$$typeof":return;case"toJSON":return()=>({});case"addListener":return xe?ge:He;case"removeListener":return Ue;default:return Xe(fe)}}});return h[ee]=Me,Q.set(ee,{name:ee,proxy:Me,platforms:new Set([...Object.keys(A),...xe?[ie]:[]])}),Me},ce=((a=y==null?void 0:y.currentPlatform)===null||a===void 0?void 0:a.registerPlugin)||le;return d.convertFileSrc||(d.convertFileSrc=ee=>ee),d.getPlatform=k,d.handleError=E,d.isNativePlatform=O,d.isPluginAvailable=W,d.pluginMethodNoop=L,d.registerPlugin=ce,d.Exception=aa,d.DEBUG=!!d.DEBUG,d.isLoggingEnabled=!!d.isLoggingEnabled,d.platform=d.getPlatform(),d.isNative=d.isNativePlatform(),d},ag=e=>e.Capacitor=ig(e),Zr=ag(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),ff=Zr.registerPlugin;Zr.Plugins;class df{constructor(t){this.listeners={},this.retainedEventArguments={},this.windowListeners={},t&&(console.warn(`Capacitor WebPlugin "${t.name}" config object was deprecated in v3 and will be removed in v4.`),this.config=t)}addListener(t,n){let s=!1;this.listeners[t]||(this.listeners[t]=[],s=!0),this.listeners[t].push(n);const a=this.windowListeners[t];a&&!a.registered&&this.addWindowListener(a),s&&this.sendRetainedArgumentsForEvent(t);const c=async()=>this.removeListener(t,n);return Promise.resolve({remove:c})}async removeAllListeners(){this.listeners={};for(const t in this.windowListeners)this.removeWindowListener(this.windowListeners[t]);this.windowListeners={}}notifyListeners(t,n,s){const o=this.listeners[t];if(!o){if(s){let a=this.retainedEventArguments[t];a||(a=[]),a.push(n),this.retainedEventArguments[t]=a}return}o.forEach(a=>a(n))}hasListeners(t){return!!this.listeners[t].length}registerWindowListener(t,n){this.windowListeners[n]={registered:!1,windowEventName:t,pluginEventName:n,handler:s=>{this.notifyListeners(n,s)}}}unimplemented(t="not implemented"){return new 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 Tu=e=>encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),Ou=e=>e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent);class lg extends df{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=Ou(o).trim(),a=Ou(a).trim(),n[o]=a}),n}async setCookie(t){try{const n=Tu(t.key),s=Tu(t.value),o=`; expires=${(t.expires||"").replace("expires=","")}`,a=(t.path||"/").replace("path=",""),c=t.url!=null&&t.url.length>0?`domain=${t.url}`:"";document.cookie=`${n}=${s||""}${o}; path=${a}; ${c};`}catch(n){return Promise.reject(n)}}async deleteCookie(t){try{document.cookie=`${t.key}=; Max-Age=0`}catch(n){return Promise.reject(n)}}async clearCookies(){try{const t=document.cookie.split(";")||[];for(const n of t)document.cookie=n.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}catch(t){return Promise.reject(t)}}async clearAllCookies(){try{await this.clearCookies()}catch(t){return Promise.reject(t)}}}ff("CapacitorCookies",{web:()=>new lg});const ug=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)}),cg=(e={})=>{const t=Object.keys(e);return Object.keys(e).map(o=>o.toLocaleLowerCase()).reduce((o,a,c)=>(o[a]=e[t[c]],o),{})},fg=(e,t=!0)=>e?Object.entries(e).reduce((s,o)=>{const[a,c]=o;let d,h;return Array.isArray(c)?(h="",c.forEach(y=>{d=t?encodeURIComponent(y):y,h+=`${a}=${d}&`}),h.slice(0,-1)):(d=t?encodeURIComponent(c):c,h=`${a}=${d}`),`${s}&${h}`},"").substr(1):null,dg=(e,t={})=>{const n=Object.assign({method:e.method||"GET",headers:e.headers},t),o=cg(e.headers)["content-type"]||"";if(typeof e.data=="string")n.body=e.data;else if(o.includes("application/x-www-form-urlencoded")){const a=new URLSearchParams;for(const[c,d]of Object.entries(e.data||{}))a.set(c,d);n.body=a.toString()}else if(o.includes("multipart/form-data")||e.data instanceof FormData){const a=new FormData;if(e.data instanceof FormData)e.data.forEach((d,h)=>{a.append(h,d)});else for(const d of Object.keys(e.data))a.append(d,e.data[d]);n.body=a;const c=new Headers(n.headers);c.delete("content-type"),n.headers=c}else(o.includes("application/json")||typeof e.data=="object")&&(n.body=JSON.stringify(e.data));return n};class pg extends df{async request(t){const n=dg(t,t.webFetchExtra),s=fg(t.params,t.shouldEncodeUrlParams),o=s?`${t.url}?${s}`:t.url,a=await fetch(o,n),c=a.headers.get("content-type")||"";let{responseType:d="text"}=a.ok?t:{};c.includes("application/json")&&(d="json");let h,y;switch(d){case"arraybuffer":case"blob":y=await a.blob(),h=await ug(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,D)=>{m[D]=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"}))}}ff("CapacitorHttp",{web:()=>new pg});async function el(e,t){const n=window;if(n.electronAPI&&n.electronAPI.saveFile){const c=await n.electronAPI.saveFile(e,t);return c&&c.saved?c.path:""}if(Zr.isNativePlatform()){const{Filesystem:c,Directory:d,Encoding:h}=await uf(async()=>{const{Filesystem:y,Directory:m,Encoding:k}=await import("./index-Cym4sQrs.js");return{Filesystem:y,Directory:m,Encoding:k}},[],import.meta.url);try{return(await c.writeFile({path:e,data:t,directory:d.Documents,encoding:h.UTF8,recursive:!0})).uri}catch{return(await c.writeFile({path:e,data:t,directory:d.Cache,encoding:h.UTF8,recursive:!0})).uri}}const s=new Blob([t],{type:"text/plain;charset=utf-8"}),o=URL.createObjectURL(s),a=document.createElement("a");return a.href=o,a.download=e,a.click(),window.setTimeout(()=>URL.revokeObjectURL(o),1e4),""}const hg=Object.freeze(Object.defineProperty({__proto__:null,downloadText:el},Symbol.toStringTag,{value:"Module"}));async function $a(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 vg(e){const t=await Promise.all([yt("ai_base_url",""),yt("ai_api_key",""),yt("ai_model","")]),n=t[0].trim().replace(/\/+$/,""),s=t[1].trim(),o=t[2].trim();if(!n||!o)throw new Error("请先在设置页配置 AI 接口地址与模型名称");const a=n+"/chat/completions",c={"Content-Type":"application/json"};s&&(c.Authorization="Bearer "+s);const h=JSON.stringify({model:o,messages:[{role:"system",content:"你是一名严谨的中文助理。请将用户提供的工作总结 Markdown 草稿润色为通顺、专业、简洁的工作总结。要求:保留原有章节结构与全部事实数据(数字、日期、条目),不得虚构或遗漏内容,只输出 Markdown 正文。"},{role:"user",content:e}],temperature:.3});let y;try{y=await fetch(a,{method:"POST",headers:c,body:h})}catch{throw new Error("无法访问 AI 接口:请检查地址是否正确、服务端是否允许浏览器跨域访问")}if(!y.ok){let D="接口返回 "+y.status;try{const O=await y.json();O&&O.error&&O.error.message&&(D+=":"+O.error.message)}catch{}throw new Error(D)}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 mg={class:"report"},yg={class:"report-toolbar"},gg={class:"seg"},bg=["onClick"],wg=["disabled"],_g=["disabled"],kg={key:0,class:"ai-error"},xg={class:"report-grid"},Cg={class:"report-left"},Sg={class:"card section"},Eg={class:"section-title"},$g={class:"muted note-saved"},Ag={class:"card section"},Pg={class:"report-right"},Tg={key:0,class:"card section"},Og={class:"sum-row"},Mg={class:"num"},Ig={class:"sum-row"},jg={class:"num"},Dg={class:"sum-row"},Rg={class:"num"},Lg={class:"sum-row"},Kg={class:"num"},Fg={class:"sum-row"},Ng={class:"num"},Vg={class:"muted"},Bg={class:"num"},Ug={key:0,class:"muted sum-empty"},qg={class:"muted"},Hg={key:1,class:"muted sum-empty"},Wg={class:"muted"},zg={key:2,class:"muted sum-empty"},Gg={class:"muted"},Yg={key:3,class:"muted sum-empty"},Jg=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),c=N(""),d=N(!1),h=N(!1),y=N(null),m=N(""),k=N(Es(xt())),D=N(""),O=N(""),K=N(""),W=N(!1);async function de(){const A=await Za(k.value);D.value=(A==null?void 0:A.highlights)||"",O.value=(A==null?void 0:A.challenges)||"",K.value=(A==null?void 0:A.plan_next)||"",W.value=!1}async function Z(){await Tv(k.value,{highlights:D.value.trim()||null,challenges:O.value.trim()||null,plan_next:K.value.trim()||null}),W.value=!0,await L()}function E(A){const x=xt();if(A==="week"){const ie=Es(x);return{start:ie,end:Kn(ie,6),label:"本周"}}if(A==="month"){const ie=x.slice(0,7);return{start:ie+"-01",end:x,label:ie+" 本月"}}return A==="all"?{start:"2000-01-01",end:x,label:"全部实习期"}:{start:s.value,end:o.value,label:s.value+" ~ "+o.value}}async function L(){d.value=!0;const A=E(n.value),x=await Zy(A.start,A.end,A.label);a.value=x,c.value=eg(x),d.value=!1}gt(n,L),gt([s,o],()=>{n.value==="custom"&&L()}),fn(async()=>{await de(),await L()});async function Q(){const A=xt().replace(/-/g,""),x=await el("实习工作总结_"+A+".md",c.value);qe(x?"总结已导出到:"+x:"总结已导出到系统下载目录")}async function le(){await $a(c.value),qe("总结已复制到剪贴板")}async function ce(){if(h.value)return;m.value="";const A=c.value.trim();if(!A){m.value="当前草稿为空,无法润色";return}h.value=!0;try{y.value=c.value,c.value=await vg(A),qe("AI 润色完成")}catch(x){y.value=null,m.value=x instanceof Error?x.message:"润色失败"}h.value=!1}function ee(){y.value!==null&&(c.value=y.value),y.value=null}return(A,x)=>(F(),q("div",mg,[u("div",yg,[u("div",gg,[(F(),q(Re,null,ut(t,ie=>u("button",{key:ie.key,class:et(["seg-btn",{active:n.value===ie.key}]),onClick:xe=>n.value=ie.key},re(ie.label),11,bg)),64))]),n.value==="custom"?(F(),q(Re,{key:0},[$e(u("input",{type:"date",class:"input w-date","onUpdate:modelValue":x[0]||(x[0]=ie=>s.value=ie)},null,512),[[De,s.value]]),x[6]||(x[6]=u("span",{class:"muted"},"至",-1)),$e(u("input",{type:"date",class:"input w-date","onUpdate:modelValue":x[1]||(x[1]=ie=>o.value=ie)},null,512),[[De,o.value]])],64)):Ee("",!0),x[10]||(x[10]=u("span",{class:"flex1"},null,-1)),u("button",{class:"btn btn-sm",disabled:h.value,onClick:ce},[Oe(lt,{name:"edit",size:14}),x[7]||(x[7]=nn("AI 润色 ",-1))],8,wg),y.value!==null?(F(),q("button",{key:1,class:"btn btn-sm",onClick:ee},"还原润色前")):Ee("",!0),u("button",{class:"btn btn-sm",disabled:d.value,onClick:L},[Oe(lt,{name:"edit",size:14}),x[8]||(x[8]=nn("重新生成 ",-1))],8,_g),u("button",{class:"btn btn-sm",onClick:le},"复制"),u("button",{class:"btn btn-primary btn-sm",onClick:Q},[Oe(lt,{name:"export",size:14}),x[9]||(x[9]=nn("导出 Markdown ",-1))])]),m.value?(F(),q("div",kg,re(m.value),1)):Ee("",!0),u("div",xg,[u("div",Cg,[u("div",Sg,[u("div",Eg,"本周周记("+re(k.value)+" 起)",1),x[11]||(x[11]=u("label",{class:"note-label muted"},"本周亮点",-1)),$e(u("textarea",{class:"textarea","onUpdate:modelValue":x[2]||(x[2]=ie=>D.value=ie),placeholder:"本周最有价值的一件事",onBlur:Z},null,544),[[De,D.value]]),x[12]||(x[12]=u("label",{class:"note-label muted"},"踩的坑",-1)),$e(u("textarea",{class:"textarea","onUpdate:modelValue":x[3]||(x[3]=ie=>O.value=ie),placeholder:"遇到的问题与教训",onBlur:Z},null,544),[[De,O.value]]),x[13]||(x[13]=u("label",{class:"note-label muted"},"下周计划",-1)),$e(u("textarea",{class:"textarea","onUpdate:modelValue":x[4]||(x[4]=ie=>K.value=ie),placeholder:"下周准备做什么",onBlur:Z},null,544),[[De,K.value]]),u("div",$g,re(W.value?"已保存":"失焦自动保存"),1)]),u("div",Ag,[x[14]||(x[14]=u("div",{class:"section-title"},"总结草稿(可编辑)",-1)),$e(u("textarea",{class:"textarea md-editor","onUpdate:modelValue":x[5]||(x[5]=ie=>c.value=ie),spellcheck:"false"},null,512),[[De,c.value]])])]),u("div",Pg,[a.value?(F(),q("div",Tg,[x[20]||(x[20]=u("div",{class:"section-title"},"数据摘要",-1)),u("div",Og,[x[15]||(x[15]=u("span",{class:"muted"},"出勤",-1)),u("span",Mg,re(a.value.attendDays)+" 天",1)]),u("div",Ig,[x[16]||(x[16]=u("span",{class:"muted"},"工时",-1)),u("span",jg,re(a.value.totalHours)+" 小时",1)]),u("div",Dg,[x[17]||(x[17]=u("span",{class:"muted"},"补卡",-1)),u("span",Rg,re(a.value.makeupCount)+" 次",1)]),u("div",Lg,[x[18]||(x[18]=u("span",{class:"muted"},"请假",-1)),u("span",Kg,re(a.value.leaveCount)+" 天",1)]),u("div",Fg,[x[19]||(x[19]=u("span",{class:"muted"},"记录",-1)),u("span",Ng,re(a.value.itemCount)+" 条",1)]),x[21]||(x[21]=u("div",{class:"section-sub"},"分类分布",-1)),(F(!0),q(Re,null,ut(a.value.categoryStats,ie=>(F(),q("div",{key:ie.key,class:"sum-row"},[u("span",Vg,re(ie.label),1),u("span",Bg,re(ie.count)+" 条 · "+re(ie.percent)+"%",1)]))),128)),a.value.categoryStats.length?Ee("",!0):(F(),q("div",Ug,"(无)")),x[22]||(x[22]=u("div",{class:"section-sub"},"主要成果",-1)),(F(!0),q(Re,null,ut(a.value.milestones,(ie,xe)=>(F(),q("div",{key:"m"+xe,class:"sum-item"},[nn(re(ie.content),1),u("span",qg,"("+re(ie.date)+")",1)]))),128)),a.value.milestones.length?Ee("",!0):(F(),q("div",Hg,"(无)")),x[23]||(x[23]=u("div",{class:"section-sub"},"待跟进",-1)),(F(!0),q(Re,null,ut(a.value.followups,(ie,xe)=>(F(),q("div",{key:"f"+xe,class:"sum-item"},[nn(re(ie.content),1),u("span",Wg,"("+re(ie.date)+")",1)]))),128)),a.value.followups.length?Ee("",!0):(F(),q("div",zg,"(无)")),x[24]||(x[24]=u("div",{class:"section-sub"},"学习与成长",-1)),(F(!0),q(Re,null,ut(a.value.takeaways,(ie,xe)=>(F(),q("div",{key:"t"+xe,class:"sum-item"},[nn(re(ie.text),1),u("span",Gg,"("+re(ie.date)+")",1)]))),128)),a.value.takeaways.length?Ee("",!0):(F(),q("div",Yg,"(无)"))])):Ee("",!0)])])]))}}),Xg=Gt(Jg,[["__scopeId","data-v-43f9c59b"]]),Qg=["aria-label"],Zg={class:"dialog-head"},eb={class:"dialog-title"},tb={class:"dialog-body"},nb={class:"form-grid"},rb={class:"field span2"},sb={class:"seg"},ob={class:"field"},ib={class:"field"},ab={class:"field"},lb=["value"],ub={key:0,class:"field"},cb={class:"seg"},fb={class:"field span2"},db={key:0,class:"form-error"},pb={class:"dialog-btns"},hb=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("餐饮"),c=N(""),d=N(""),h=N(""),y=N(!1),m=N(!1),k=N(""),D=N(null);function O(Z){n.open&&Z.key==="Escape"&&s("cancel")}gt(()=>n.open,async Z=>{var E;Z?(o.value=n.initial.type==="income"?"income":"expense",a.value=n.initial.category,c.value=n.initial.amountYuan,d.value=n.initial.date,h.value=n.initial.note,y.value=n.initial.reimbursable===1,m.value=n.initial.reimbursed===1,k.value="",window.addEventListener("keydown",O),await ts(),(E=D.value)==null||E.focus()):window.removeEventListener("keydown",O)}),dr(()=>window.removeEventListener("keydown",O)),gt(o,Z=>{a.value=Z==="expense"?Wr[0]:Vo[0]});const K=it(()=>o.value==="expense"?Wr:Vo);function W(){return a.value&&K.value.includes(a.value)?a.value:K.value[0]}function de(){const Z=Number(c.value);if(!c.value.trim()||!isFinite(Z)||Z<=0){k.value="请填写大于 0 的金额";return}if(!d.value){k.value="请选择日期";return}const E=o.value==="expense"&&y.value?1:0;s("save",{type:o.value,category:W(),amount:Math.round(Z*100),date:d.value,note:h.value.trim(),reimbursable:E,reimbursed:E&&m.value?1:0})}return(Z,E)=>(F(),It(Vs,{to:"body"},[Oe(ns,{name:"modal"},{default:fr(()=>[e.open?(F(),q("div",{key:0,class:"mask",onClick:E[11]||(E[11]=Mr(L=>s("cancel"),["self"]))},[u("div",{class:"dialog",role:"dialog","aria-label":e.title},[u("div",Zg,[u("span",eb,re(e.title),1),u("button",{class:"icon-btn",title:"关闭",onClick:E[0]||(E[0]=L=>s("cancel"))},[Oe(lt,{name:"close",size:16})])]),u("div",tb,[u("div",nb,[u("div",rb,[E[12]||(E[12]=u("label",null,"类型",-1)),u("div",sb,[u("button",{class:et(["seg-btn",{active:o.value==="expense"}]),onClick:E[1]||(E[1]=L=>o.value="expense")},"支出",2),u("button",{class:et(["seg-btn",{active:o.value==="income"}]),onClick:E[2]||(E[2]=L=>o.value="income")},"收入",2)])]),u("div",ob,[E[13]||(E[13]=u("label",null,"金额(元,必填)",-1)),$e(u("input",{ref_key:"amountInput",ref:D,class:et(["input",{invalid:k.value}]),"onUpdate:modelValue":E[3]||(E[3]=L=>c.value=L),type:"number",min:"0",step:"0.01",placeholder:"0.00"},null,2),[[De,c.value]])]),u("div",ib,[E[14]||(E[14]=u("label",null,"日期(必填)",-1)),$e(u("input",{class:"input",type:"date","onUpdate:modelValue":E[4]||(E[4]=L=>d.value=L)},null,512),[[De,d.value]])]),u("div",ab,[E[15]||(E[15]=u("label",null,"分类",-1)),$e(u("select",{class:"select","onUpdate:modelValue":E[5]||(E[5]=L=>a.value=L)},[(F(!0),q(Re,null,ut(K.value,L=>(F(),q("option",{key:L,value:L},re(L),9,lb))),128))],512),[[Fn,a.value]])]),o.value==="expense"?(F(),q("div",ub,[E[16]||(E[16]=u("label",null,"报销状态",-1)),u("div",cb,[u("button",{class:et(["seg-btn",{active:!y.value}]),onClick:E[6]||(E[6]=L=>{y.value=!1,m.value=!1})},"无需报销",2),u("button",{class:et(["seg-btn",{active:y.value&&!m.value}]),onClick:E[7]||(E[7]=L=>{y.value=!0,m.value=!1})},"待报销",2),u("button",{class:et(["seg-btn",{active:y.value&&m.value}]),onClick:E[8]||(E[8]=L=>{y.value=!0,m.value=!0})},"已报销",2)])])):Ee("",!0),u("div",fb,[E[17]||(E[17]=u("label",null,"备注",-1)),$e(u("textarea",{class:"textarea","onUpdate:modelValue":E[9]||(E[9]=L=>h.value=L),placeholder:"选填"},null,512),[[De,h.value]])])]),k.value?(F(),q("div",db,re(k.value),1)):Ee("",!0)]),u("div",pb,[u("button",{class:"btn btn-sm",onClick:E[10]||(E[10]=L=>s("cancel"))},"取消"),u("button",{class:"btn btn-primary btn-sm",onClick:de},"保存")])],8,Qg)])):Ee("",!0)]),_:1})]))}}),vb=Gt(hb,[["__scopeId","data-v-e3568c0d"]]),mb={class:"ledger-page"},yb={class:"ledger-toolbar"},gb={class:"month-title num"},bb={class:"cards"},wb={class:"card stat-card"},_b={class:"stat-num num amt-income"},kb={class:"card stat-card"},xb={class:"stat-num num"},Cb={class:"card stat-card"},Sb={class:"card stat-card"},Eb={class:"stat-num num amt-warn"},$b={class:"card sec"},Ab={class:"form-grid"},Pb={class:"field span2"},Tb={class:"seg"},Ob={class:"field"},Mb={class:"field"},Ib={class:"field"},jb=["value"],Db={key:0,class:"field"},Rb={class:"field span2"},Lb={key:0,class:"form-error"},Kb={class:"form-footer"},Fb=["disabled"],Nb=["disabled"],Vb={key:0,class:"card sec"},Bb={class:"bar-label"},Ub={class:"bar-track"},qb={class:"muted num bar-num"},Hb={class:"card table-card"},Wb={class:"tx-table"},zb={class:"num"},Gb={class:"tag"},Yb={class:"td-note"},Jb={key:0,class:"muted"},Xb={key:1,class:"tx-done"},Qb={key:2,class:"tx-pending"},Zb={class:"ops"},ew=["onClick"],tw=["onClick"],nw=["onClick"],rw={key:0},sw={class:"muted vault-note num"},ow=Vt({__name:"LedgerView",setup(e){const t=N(xt()),n=N([]),s=N(!0),o=N("expense"),a=N(""),c=N(Wr[0]),d=N(xt()),h=N(""),y=N(!1),m=N(""),k=N(!1),D=N(!1),O=N(null),K=N({type:"expense",category:Wr[0],amountYuan:"",date:xt(),note:"",reimbursable:0,reimbursed:0}),W=N(null),de=it(()=>t.value.slice(0,7)+"-01"),Z=it(()=>{const fe=Number(t.value.slice(0,4)),G=Number(t.value.slice(5,7))-1,X=new Date(fe,G+1,0).getDate();return t.value.slice(0,7)+"-"+(X<10?"0"+X:String(X))}),E=it(()=>Number(t.value.slice(0,4))+" 年 "+Number(t.value.slice(5,7))+" 月");async function L(){s.value=!0;try{n.value=await Kv(de.value,Z.value)}catch(fe){qe("账目加载失败:"+(fe instanceof Error?fe.message:String(fe)))}s.value=!1}fn(L),gt(t,L),gt(o,fe=>{c.value=fe==="expense"?Wr[0]:Vo[0]});const Q=it(()=>n.value.slice().sort((fe,G)=>fe.date===G.date?G.id-fe.id:fe.date<G.date?1:-1)),le=it(()=>{let fe=0,G=0,X=0;for(const ke of n.value)ke.type==="income"?fe+=ke.amount:(G+=ke.amount,ke.reimbursable===1&&ke.reimbursed!==1&&(X+=ke.amount));return{income:fe,expense:G,pending:X,balance:fe-G}}),ce=N("all"),ee=N("all"),A=it(()=>Q.value.filter(fe=>!(ce.value!=="all"&&fe.type!==ce.value||ee.value==="pending"&&!(fe.type==="expense"&&fe.reimbursable===1&&fe.reimbursed!==1)||ee.value==="done"&&!(fe.reimbursable===1&&fe.reimbursed===1)))),x=it(()=>{const fe=new Map;let G=0;for(const ke of n.value)ke.type==="expense"&&(fe.set(ke.category,(fe.get(ke.category)||0)+ke.amount),G+=ke.amount);const X=G||1;return Array.from(fe.entries()).map(ke=>({name:ke[0],amount:ke[1],percent:Math.round(ke[1]/X*100)})).sort((ke,st)=>st.amount-ke.amount)});function ie(fe){return(fe/100).toFixed(2)}function xe(fe){return(fe.type==="income"?"+":"-")+ie(fe.amount)}function J(){t.value=Bo(t.value,-1)}function Ce(){t.value=Bo(t.value,1)}function Ke(){t.value=xt()}gt(a,()=>{m.value&&(m.value="")});async function Xe(){const fe=Number(a.value);if(!a.value.trim()||!isFinite(fe)||fe<=0){m.value="请填写大于 0 的金额";return}if(!d.value){m.value="请选择日期";return}if(!k.value){k.value=!0;try{await Fv({type:o.value,category:c.value,amount:Math.round(fe*100),date:d.value,note:h.value.trim(),reimbursable:o.value==="expense"&&y.value?1:0,reimbursed:0})}catch(G){qe("添加失败:"+(G instanceof Error?G.message:String(G))),k.value=!1;return}a.value="",h.value="",y.value=!1,m.value="",await L(),qe("记账已添加"),k.value=!1}}function He(){a.value="",h.value="",y.value=!1,m.value=""}async function Ue(fe){await Bv(fe.id),await L(),qe("已标记为已报销")}function ge(fe){O.value=fe.id,K.value={type:fe.type,category:fe.category,amountYuan:ie(fe.amount),date:fe.date,note:fe.note||"",reimbursable:fe.reimbursable,reimbursed:fe.reimbursed},D.value=!0}async function Me(fe){const G=O.value;await Nv(G,fe),D.value=!1,await L(),qe("账目已更新")}async function Fe(){W.value&&W.value.id&&await Vv(W.value.id),W.value=null,await L(),qe("账目已删除")}return(fe,G)=>(F(),q("div",mb,[u("div",yb,[u("button",{class:"icon-btn",onClick:J},[Oe(lt,{name:"chevron-left",size:16})]),u("span",gb,re(E.value),1),u("button",{class:"icon-btn",onClick:Ce},[Oe(lt,{name:"chevron-right",size:16})]),u("button",{class:"btn btn-sm",onClick:Ke},"回到本月"),G[13]||(G[13]=u("span",{class:"flex1"},null,-1)),$e(u("select",{class:"select w-filter","onUpdate:modelValue":G[0]||(G[0]=X=>ce.value=X)},[...G[11]||(G[11]=[u("option",{value:"all"},"全部类型",-1),u("option",{value:"expense"},"仅支出",-1),u("option",{value:"income"},"仅收入",-1)])],512),[[Fn,ce.value]]),$e(u("select",{class:"select w-filter","onUpdate:modelValue":G[1]||(G[1]=X=>ee.value=X)},[...G[12]||(G[12]=[u("option",{value:"all"},"全部报销",-1),u("option",{value:"pending"},"待报销",-1),u("option",{value:"done"},"已报销",-1)])],512),[[Fn,ee.value]])]),u("div",bb,[u("div",wb,[G[14]||(G[14]=u("div",{class:"muted"},"本月收入(元)",-1)),u("div",_b,re(ie(le.value.income)),1)]),u("div",kb,[G[15]||(G[15]=u("div",{class:"muted"},"本月支出(元)",-1)),u("div",xb,re(ie(le.value.expense)),1)]),u("div",Cb,[G[16]||(G[16]=u("div",{class:"muted"},"本月结余(元)",-1)),u("div",{class:et(["stat-num num",{"amt-income":le.value.balance>=0,"amt-expense":le.value.balance<0}])},re(ie(le.value.balance)),3)]),u("div",Sb,[G[17]||(G[17]=u("div",{class:"muted"},"待报销(元)",-1)),u("div",Eb,re(ie(le.value.pending)),1)])]),u("div",$b,[G[24]||(G[24]=u("div",{class:"sec-head"},[u("span",{class:"sec-title"},"新增一笔"),u("span",{class:"muted form-hint"},"金额必填,回车快速添加")],-1)),u("div",Ab,[u("div",Pb,[G[18]||(G[18]=u("label",null,"类型",-1)),u("div",Tb,[u("button",{class:et(["seg-btn",{active:o.value==="expense"}]),onClick:G[2]||(G[2]=X=>o.value="expense")},"支出",2),u("button",{class:et(["seg-btn",{active:o.value==="income"}]),onClick:G[3]||(G[3]=X=>o.value="income")},"收入",2)])]),u("div",Ob,[G[19]||(G[19]=u("label",null,"金额(元,必填)",-1)),$e(u("input",{class:et(["input",{invalid:m.value}]),"onUpdate:modelValue":G[4]||(G[4]=X=>a.value=X),type:"number",min:"0",step:"0.01",placeholder:"0.00",onKeydown:jt(Xe,["enter"])},null,34),[[De,a.value]])]),u("div",Mb,[G[20]||(G[20]=u("label",null,"日期",-1)),$e(u("input",{class:"input",type:"date","onUpdate:modelValue":G[5]||(G[5]=X=>d.value=X)},null,512),[[De,d.value]])]),u("div",Ib,[G[21]||(G[21]=u("label",null,"分类",-1)),$e(u("select",{class:"select","onUpdate:modelValue":G[6]||(G[6]=X=>c.value=X)},[(F(!0),q(Re,null,ut(o.value==="expense"?Qt(Wr):Qt(Vo),X=>(F(),q("option",{key:X,value:X},re(X),9,jb))),128))],512),[[Fn,c.value]])]),o.value==="expense"?(F(),q("div",Db,[G[22]||(G[22]=u("label",null,"报销",-1)),u("button",{class:et(["toggle-btn",{on:y.value}]),onClick:G[7]||(G[7]=X=>y.value=!y.value)},re(y.value?"需要报销":"无需报销"),3)])):Ee("",!0),u("div",Rb,[G[23]||(G[23]=u("label",null,"备注",-1)),$e(u("input",{class:"input","onUpdate:modelValue":G[8]||(G[8]=X=>h.value=X),placeholder:"选填,如:客户现场午餐",onKeydown:jt(Xe,["enter"])},null,544),[[De,h.value]])])]),m.value?(F(),q("div",Lb,re(m.value),1)):Ee("",!0),u("div",Kb,[u("button",{class:"btn btn-sm",disabled:!(a.value.trim()||h.value.trim()),onClick:He},"重置",8,Fb),u("button",{class:"btn btn-primary btn-sm",disabled:k.value,onClick:Xe},"添加记录",8,Nb)])]),x.value.length?(F(),q("div",Vb,[G[25]||(G[25]=u("div",{class:"sec-title"},"本月支出分类",-1)),(F(!0),q(Re,null,ut(x.value,X=>(F(),q("div",{key:X.name,class:"bar-row"},[u("span",Bb,re(X.name),1),u("span",Ub,[u("span",{class:"bar-fill",style:sr({width:X.percent+"%"})},null,4)]),u("span",qb,re(ie(X.amount))+" 元 · "+re(X.percent)+"%",1)]))),128))])):Ee("",!0),u("div",Hb,[u("table",Wb,[G[27]||(G[27]=u("thead",null,[u("tr",null,[u("th",null,"日期"),u("th",null,"分类"),u("th",null,"金额(元)"),u("th",null,"备注"),u("th",null,"报销"),u("th",{class:"th-ops"},"操作")])],-1)),u("tbody",null,[(F(!0),q(Re,null,ut(A.value,X=>(F(),q("tr",{key:X.id},[u("td",zb,re(X.date),1),u("td",null,[u("span",Gb,re(X.category),1)]),u("td",{class:et(["num",X.type==="income"?"amt-income":"amt-expense"])},re(xe(X)),3),u("td",Yb,re(X.note||"--"),1),u("td",null,[X.type!=="expense"||X.reimbursable!==1?(F(),q("span",Jb,"--")):X.reimbursed===1?(F(),q("span",Xb,"已报销")):(F(),q("span",Qb,"待报销"))]),u("td",null,[u("div",Zb,[X.type==="expense"&&X.reimbursable===1&&X.reimbursed!==1?(F(),q("button",{key:0,class:"btn btn-xs",onClick:ke=>Ue(X)},"标记已报销",8,ew)):Ee("",!0),u("button",{class:"btn btn-xs",onClick:ke=>ge(X)},"编辑",8,tw),u("button",{class:"btn btn-xs",onClick:ke=>W.value=X},"删除",8,nw)])])]))),128)),!A.value.length&&!s.value?(F(),q("tr",rw,[...G[26]||(G[26]=[u("td",{colspan:"6",class:"empty muted"},"本月暂无账目",-1)])])):Ee("",!0)])])]),u("div",sw,"筛选结果 "+re(A.value.length)+" 条 / 本月共 "+re(n.value.length)+" 条",1),Oe(vb,{open:D.value,title:(O.value,"编辑账目"),initial:K.value,onCancel:G[9]||(G[9]=X=>D.value=!1),onSave:Me},null,8,["open","title","initial"]),Oe(ur,{open:!!W.value,title:"删除确认",message:W.value?"将删除 "+W.value.date+" 的账目("+W.value.category+" "+ie(W.value.amount)+" 元)。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:G[10]||(G[10]=X=>W.value=null),onConfirm:Fe},null,8,["open","message"])]))}}),iw=Gt(ow,[["__scopeId","data-v-848ec3d4"]]),aw={class:"memo-page"},lw={class:"card memo-list"},uw={class:"pane-head"},cw={class:"pane-title"},fw={class:"memo-scroll"},dw=["onClick"],pw={class:"memo-item-title"},hw={class:"muted memo-item-sub"},vw={class:"muted num memo-item-time"},mw={key:0,class:"muted empty"},yw={class:"card memo-editor"},gw={class:"editor-foot"},bw={class:"muted foot-info"},ww=["disabled"],_w=["disabled"],kw={key:1,class:"empty muted editor-empty"},xw=Vt({__name:"MemoView",setup(e){const t=N([]),n=N(null),s=N(!1),o=N(""),a=N(""),c=N(null),d=N(null);async function h(){if(t.value=await Mv(),n.value&&n.value.id){const ce=t.value.find(ee=>ee.id===n.value.id);ce&&(n.value=ce)}}fn(async()=>{await h(),t.value.length&&k(t.value[0]),window.addEventListener("keydown",y)}),dr(()=>window.removeEventListener("keydown",y)),gt(Ea,async ce=>{if(!ce)return;t.value.length||await h();const ee=t.value.find(A=>A.id===ce);Ea.value=null,ee&&D(ee)},{immediate:!0});function y(ce){(ce.ctrlKey||ce.metaKey)&&ce.key.toLowerCase()==="s"&&s.value&&m.value&&(ce.preventDefault(),de())}const m=it(()=>{if(!s.value)return!1;const ce=n.value?n.value.title:"",ee=n.value?n.value.content:"";return o.value!==ce||a.value!==ee});function k(ce){n.value=ce,s.value=!0,o.value=ce.title,a.value=ce.content}function D(ce){if(!(s.value&&n.value&&n.value.id===ce.id)){if(m.value){d.value={type:"select",memo:ce};return}k(ce)}}function O(){if(m.value){d.value={type:"new"};return}K()}function K(){n.value=null,s.value=!0,o.value="",a.value=""}function W(){n.value?k(n.value):K()}async function de(){if(!o.value.trim()&&!a.value.trim()){qe("标题与内容不能都为空");return}if(n.value&&n.value.id)await jv(n.value.id,o.value,a.value),qe("备忘已保存");else{const ce=await Iv(o.value,a.value);n.value=ce,o.value=ce.title,a.value=ce.content,qe("备忘已创建")}await h()}function Z(){n.value&&n.value.id&&(c.value=n.value)}async function E(){c.value&&c.value.id&&(await Dv(c.value.id),qe("备忘已删除")),c.value=null,await h(),K()}function L(){const ce=d.value;d.value=null,ce&&(ce.type==="select"?k(ce.memo):K())}function Q(ce){return(ce.content||"").replace(/\s+/g," ").slice(0,30)}function le(ce){return ce.replace("T"," ").slice(0,16)}return(ce,ee)=>(F(),q("div",aw,[u("aside",lw,[u("div",uw,[u("span",cw,"备忘录("+re(t.value.length)+")",1),u("button",{class:"btn btn-primary btn-sm",onClick:O},"新建")]),u("div",fw,[(F(!0),q(Re,null,ut(t.value,A=>(F(),q("div",{key:A.id,class:et(["memo-item",{active:s.value&&n.value&&n.value.id===A.id}]),onClick:x=>D(A)},[u("div",pw,re(A.title||"无标题"),1),u("div",hw,re(Q(A)||"空"),1),u("div",vw,re(le(A.updated_at)),1)],10,dw))),128)),t.value.length?Ee("",!0):(F(),q("div",mw,"暂无备忘"))])]),u("section",yw,[s.value?(F(),q(Re,{key:0},[$e(u("input",{class:"input title-input","onUpdate:modelValue":ee[0]||(ee[0]=A=>o.value=A),placeholder:"标题"},null,512),[[De,o.value]]),$e(u("textarea",{class:"textarea content-textarea","onUpdate:modelValue":ee[1]||(ee[1]=A=>a.value=A),placeholder:"内容"},null,512),[[De,a.value]]),u("div",gw,[u("span",bw,[m.value?(F(),q(Re,{key:0},[nn("有未保存修改")],64)):n.value&&n.value.id?(F(),q(Re,{key:1},[nn("更新于 "+re(le(n.value.updated_at)),1)],64)):(F(),q(Re,{key:2},[nn("新备忘")],64))]),ee[4]||(ee[4]=u("span",{class:"flex1"},null,-1)),n.value&&n.value.id?(F(),q("button",{key:0,class:"btn btn-sm",onClick:Z},"删除")):Ee("",!0),u("button",{class:"btn btn-sm",disabled:!m.value,onClick:W},"放弃修改",8,ww),u("button",{class:"btn btn-primary btn-sm",disabled:!m.value,onClick:de},"保存",8,_w)])],64)):(F(),q("div",kw,"选择左侧备忘,或点击右上角新建"))]),Oe(ur,{open:!!c.value,title:"删除确认",message:c.value?"将删除备忘「"+(c.value.title||"无标题")+"」。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:ee[2]||(ee[2]=A=>c.value=null),onConfirm:E},null,8,["open","message"]),Oe(ur,{open:!!d.value,title:"未保存提示",message:"当前备忘有未保存的修改,继续操作将丢失这些修改。","confirm-text":"放弃修改并继续",onCancel:ee[3]||(ee[3]=A=>d.value=null),onConfirm:L},null,8,["open"])]))}}),Cw=Gt(xw,[["__scopeId","data-v-74d60dba"]]),Sw=["aria-label"],Ew={class:"dialog-head"},$w={class:"dialog-title"},Aw={class:"dialog-body"},Pw={class:"form-grid"},Tw={class:"field span2"},Ow={class:"field span2"},Mw={class:"field span2"},Iw={class:"pwd-row"},jw={class:"field span2"},Dw={key:0,class:"form-error"},Rw={class:"dialog-btns"},Lw=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(""),c=N(""),d=N(""),h=N(""),y=N(null);function m(O){n.open&&O.key==="Escape"&&s("cancel")}gt(()=>n.open,async O=>{var K;O?(o.value=n.initial.system,a.value=n.initial.account,c.value=n.initial.password,d.value=n.initial.remark,h.value="",window.addEventListener("keydown",m),await ts(),(K=y.value)==null||K.focus()):window.removeEventListener("keydown",m)}),dr(()=>window.removeEventListener("keydown",m));function k(){const O="ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz23456789",K="!@#$%^&*",W=crypto.getRandomValues(new Uint8Array(14));let de="";for(let Z=0;Z<W.length;Z++)de+=O[W[Z]%O.length];de+=K[crypto.getRandomValues(new Uint8Array(1))[0]%K.length],c.value=de,h.value=""}function D(){if(!o.value.trim()||!a.value.trim()||!c.value){h.value="系统名称、账号、密码为必填项";return}s("save",{system:o.value.trim(),account:a.value.trim(),password:c.value,remark:d.value.trim()})}return(O,K)=>(F(),It(Vs,{to:"body"},[Oe(ns,{name:"modal"},{default:fr(()=>[e.open?(F(),q("div",{key:0,class:"mask",onClick:K[6]||(K[6]=Mr(W=>s("cancel"),["self"]))},[u("div",{class:"dialog",role:"dialog","aria-label":e.title},[u("div",Ew,[u("span",$w,re(e.title),1),u("button",{class:"icon-btn",title:"关闭",onClick:K[0]||(K[0]=W=>s("cancel"))},[Oe(lt,{name:"close",size:16})])]),u("div",Aw,[u("div",Pw,[u("div",Tw,[K[7]||(K[7]=u("label",null,"系统名称(必填)",-1)),$e(u("input",{ref_key:"systemInput",ref:y,class:"input","onUpdate:modelValue":K[1]||(K[1]=W=>o.value=W),placeholder:"如:企业邮箱 / OA / VPN"},null,512),[[De,o.value]])]),u("div",Ow,[K[8]||(K[8]=u("label",null,"账号(必填)",-1)),$e(u("input",{class:"input","onUpdate:modelValue":K[2]||(K[2]=W=>a.value=W),placeholder:"用户名、工号或邮箱"},null,512),[[De,a.value]])]),u("div",Mw,[K[9]||(K[9]=u("label",null,"密码(必填)",-1)),u("div",Iw,[$e(u("input",{class:"input","onUpdate:modelValue":K[3]||(K[3]=W=>c.value=W),placeholder:"输入或点击生成"},null,512),[[De,c.value]]),u("button",{class:"btn btn-sm",onClick:k},"生成")])]),u("div",jw,[K[10]||(K[10]=u("label",null,"备注",-1)),$e(u("textarea",{class:"textarea","onUpdate:modelValue":K[4]||(K[4]=W=>d.value=W),placeholder:"用途、到期时间、负责人等(选填)"},null,512),[[De,d.value]])])]),h.value?(F(),q("div",Dw,re(h.value),1)):Ee("",!0)]),u("div",Rw,[u("button",{class:"btn btn-sm",onClick:K[5]||(K[5]=W=>s("cancel"))},"取消"),u("button",{class:"btn btn-primary btn-sm",onClick:D},"保存")])],8,Sw)])):Ee("",!0)]),_:1})]))}}),Kw=Gt(Lw,[["__scopeId","data-v-f383b0a6"]]),pf=15e4;function qo(e){const t=new Uint8Array(e);let n="";for(let s=0;s<t.length;s++)n+=String.fromCharCode(t[s]);return btoa(n)}function Ho(e){const t=atob(e),n=new Uint8Array(t.length);for(let s=0;s<t.length;s++)n[s]=t.charCodeAt(s);return n}function tl(){return qo(crypto.getRandomValues(new Uint8Array(16)).buffer)}async function Wo(e,t){const n=new TextEncoder,s=await crypto.subtle.importKey("raw",n.encode(e),"PBKDF2",!1,["deriveBits"]),o=await crypto.subtle.deriveBits({name:"PBKDF2",salt:Ho(t),iterations:pf,hash:"SHA-256"},s,256);return qo(o)}async function zo(e,t){const n=new TextEncoder,s=await crypto.subtle.importKey("raw",n.encode(e),"PBKDF2",!1,["deriveKey"]);return crypto.subtle.deriveKey({name:"PBKDF2",salt:Ho(t),iterations:pf,hash:"SHA-256"},s,{name:"AES-GCM",length:256},!1,["encrypt","decrypt"])}async function Go(e,t){const n=crypto.getRandomValues(new Uint8Array(12)),s=await crypto.subtle.encrypt({name:"AES-GCM",iv:n},e,new TextEncoder().encode(t));return qo(n.buffer)+":"+qo(s)}async function di(e,t){const n=t.split(":");if(n.length!==2)throw new Error("密文格式错误");const s=await crypto.subtle.decrypt({name:"AES-GCM",iv:Ho(n[0])},e,Ho(n[1]));return new TextDecoder().decode(s)}const hf="intern-log-vault-verify",es="enc:v1:";let Dr=null;function Fw(){return Dr!==null}function Yo(){Dr=null}async function vf(){return await yt("pwd_salt","")!==""}async function Nw(e){if(e.length<6)throw new Error("主密码至少 6 位");if(await vf())throw new Error("主密码已设置");const t=tl(),n=await zo(e,t),s=await Go(n,hf);await kt("pwd_salt",t),await kt("pwd_verifier",s),Dr=n}async function Vw(e){const t=await yt("pwd_salt","");if(!t)throw new Error("主密码尚未设置");const n=await zo(e,t),s=await yt("pwd_verifier","");try{await di(n,s)}catch{throw new Error("主密码不正确")}Dr=n}async function mf(){if(!Dr)throw new Error("密码库未解锁");return Dr}async function Bw(e){const t=await mf();return es+await Go(t,e)}async function Uw(e){if(!e)return"";if(!e.startsWith(es))return e;const t=await mf();return di(t,e.slice(es.length))}async function qw(){return ne.credential.orderBy("system").toArray()}async function Hw(e,t){const n=await Bw(e.password),s={system:e.system.trim(),account:e.account.trim(),password:n,remark:e.remark.trim()};t?await ne.credential.update(t,{...s,updated_at:wt()}):await ne.credential.add({...s,created_at:wt(),updated_at:wt()})}async function Ww(e){await ne.credential.delete(e)}async function la(e){const t=await ne.credential.get(e);if(!t)throw new Error("记录不存在");return Uw(t.password)}async function zw(e,t){if(!e)throw new Error("请输入旧主密码");if(t.length<6)throw new Error("新主密码至少 6 位");if(t===e)throw new Error("新主密码不能与旧主密码相同");const n=await yt("pwd_salt","");if(!n)throw new Error("密码库尚未初始化");const s=await zo(e,n),o=await yt("pwd_verifier","");try{await di(s,o)}catch{throw new Error("旧主密码不正确")}const a=await zo(t,n),c=await ne.credential.toArray();let d=0;for(const h of c){if(h.id==null)continue;const y=await Gw(h.password,s),m=es+await Go(a,y);await ne.credential.update(h.id,{password:m}),d++}return await kt("pwd_verifier",await Go(a,hf)),Dr=a,d}async function Gw(e,t){return e?e.startsWith(es)?di(t,e.slice(es.length)):e:""}const Yw={class:"vault-page"},Jw={key:0,class:"empty muted"},Xw={key:1,class:"card lock-card"},Qw={class:"lock-badge"},Zw={key:0,class:"form-error"},e_=["disabled"],t_={key:0,class:"form-error"},n_=["disabled"],r_={class:"vault-toolbar"},s_={class:"search-wrap"},o_={class:"card table-card"},i_={class:"cred-table"},a_={class:"td-system"},l_=["onClick"],u_={class:"pwd-cell"},c_={class:"num pwd-text"},f_=["onClick"],d_=["onClick"],p_={class:"td-remark"},h_={class:"ops"},v_=["onClick"],m_=["onClick"],y_={key:0},g_={class:"muted vault-note num"},b_={class:"dialog pwd-dialog"},w_={class:"dialog-head"},__={class:"dialog-body"},k_={class:"vp-field"},x_={class:"vp-field"},C_={class:"vp-field"},S_={key:0,class:"form-error"},E_={class:"dialog-btns"},$_=5*60*1e3,A_=Vt({__name:"VaultView",setup(e){const t=N(null),n=N(Fw()),s=N(!1),o=N(""),a=N(""),c=N(""),d=N(""),h=N(""),y=N([]),m=N(""),k=N({}),D=N(!1),O=N(null),K=N({system:"",account:"",password:"",remark:""}),W=N(null),de=N(!1),Z=N(""),E=N(""),L=N(""),Q=N("");async function le(){y.value=await qw(),k.value={}}let ce=null;function ee(){ce!==null&&window.clearTimeout(ce),ce=window.setTimeout(()=>{n.value&&(Yo(),n.value=!1,y.value=[],k.value={},qe("长时间未操作,密码库已自动锁定"))},$_)}function A(){n.value&&ee()}fn(async()=>{t.value=await vf(),window.addEventListener("click",A),window.addEventListener("keydown",A),n.value&&ee()}),dr(()=>{window.removeEventListener("click",A),window.removeEventListener("keydown",A),ce!==null&&window.clearTimeout(ce)});const x=it(()=>{const G=m.value.trim().toLowerCase();return G?y.value.filter(X=>(X.system+" "+X.account+" "+(X.remark||"")).toLowerCase().includes(G)):y.value});async function ie(){if(!s.value){if(c.value="",!o.value){c.value="请输入主密码";return}if(o.value.length<6){c.value="主密码至少 6 位";return}if(o.value!==a.value){c.value="两次输入的主密码不一致";return}s.value=!0;try{await Nw(o.value),o.value="",a.value="",n.value=!0,ee(),await le(),qe("主密码已设置,密码库已解锁")}catch(G){c.value=G instanceof Error?G.message:"设置失败"}s.value=!1}}async function xe(){if(!s.value){if(h.value="",!d.value){h.value="请输入主密码";return}s.value=!0;try{await Vw(d.value),d.value="",n.value=!0,ee(),await le()}catch(G){h.value=G instanceof Error?G.message:"解锁失败"}s.value=!1}}function J(){Yo(),n.value=!1,y.value=[],k.value={},ce!==null&&window.clearTimeout(ce),qe("密码库已锁定")}async function Ce(G){const X=G.id;if(k.value[X]){k.value[X]=!1;return}try{G.passwordPlain=await la(X),k.value[X]=!0}catch(ke){qe(ke instanceof Error?ke.message:"解密失败")}}async function Ke(G){try{const X=await la(G.id);await $a(X),qe("密码已复制")}catch(X){qe(X instanceof Error?X.message:"复制失败")}}async function Xe(G){await $a(G.account),qe("账号已复制")}function He(){O.value=null,K.value={system:"",account:"",password:"",remark:""},D.value=!0}async function Ue(G){try{const X=await la(G.id);O.value=G.id,K.value={system:G.system,account:G.account,password:X,remark:G.remark||""},D.value=!0}catch(X){qe(X instanceof Error?X.message:"解密失败")}}async function ge(G){const X=O.value??void 0;await Hw(G,X),D.value=!1,await le(),qe(X?"账号已更新":"账号已添加")}async function Me(){W.value&&W.value.id&&(await Ww(W.value.id),qe("账号已删除")),W.value=null,await le()}function Fe(){Z.value="",E.value="",L.value="",Q.value="",de.value=!0}async function fe(){Q.value="";try{const G=await zw(Z.value,E.value);de.value=!1,Z.value="",E.value="",L.value="",qe("主密码已修改,"+G+" 条账号密码已重新加密")}catch(G){Q.value=G instanceof Error?G.message:"修改失败"}}return(G,X)=>(F(),q("div",Yw,[t.value===null?(F(),q("div",Jw,"加载中")):n.value?(F(),q(Re,{key:2},[u("div",r_,[u("div",s_,[Oe(lt,{name:"search",size:14,class:"search-icon"}),$e(u("input",{class:"input","onUpdate:modelValue":X[3]||(X[3]=ke=>m.value=ke),placeholder:"搜索系统名称、账号或备注"},null,512),[[De,m.value]])]),X[16]||(X[16]=u("span",{class:"flex1"},null,-1)),u("button",{class:"btn btn-sm",onClick:Fe},"修改主密码"),u("button",{class:"btn btn-sm",onClick:J},"锁定"),u("button",{class:"btn btn-primary btn-sm",onClick:He},"新增账号")]),u("div",o_,[u("table",i_,[X[18]||(X[18]=u("thead",null,[u("tr",null,[u("th",null,"系统名称"),u("th",null,"账号"),u("th",null,"密码"),u("th",null,"备注"),u("th",{class:"th-ops"},"操作")])],-1)),u("tbody",null,[(F(!0),q(Re,null,ut(x.value,ke=>(F(),q("tr",{key:ke.id},[u("td",a_,re(ke.system),1),u("td",null,[u("span",{class:"copyable",title:"点击复制账号",onClick:st=>Xe(ke)},re(ke.account),9,l_)]),u("td",null,[u("div",u_,[u("span",c_,re(k.value[ke.id]?ke.passwordPlain:"........"),1),u("button",{class:"btn btn-xs",onClick:st=>Ce(ke)},re(k.value[ke.id]?"隐藏":"显示"),9,f_),u("button",{class:"btn btn-xs",onClick:st=>Ke(ke)},"复制",8,d_)])]),u("td",p_,re(ke.remark||"--"),1),u("td",null,[u("div",h_,[u("button",{class:"btn btn-xs",onClick:st=>Ue(ke)},"编辑",8,v_),u("button",{class:"btn btn-xs",onClick:st=>W.value=ke},"删除",8,m_)])])]))),128)),x.value.length?Ee("",!0):(F(),q("tr",y_,[...X[17]||(X[17]=[u("td",{colspan:"5",class:"empty muted"},"暂无账号,点击右上角新增",-1)])]))])])]),u("div",g_,"共 "+re(y.value.length)+" 条账号记录 · 密码以 AES-256-GCM 加密存储于本机",1)],64)):(F(),q("div",Xw,[u("div",Qw,[Oe(lt,{name:"lock",size:26})]),t.value===!1?(F(),q(Re,{key:0},[X[12]||(X[12]=u("div",{class:"lock-title"},"设置主密码",-1)),X[13]||(X[13]=u("div",{class:"muted lock-tip"},"主密码用于加密保存在本机的账号密码,遗忘后无法找回,请务必牢记",-1)),$e(u("input",{type:"password",class:"input","onUpdate:modelValue":X[0]||(X[0]=ke=>o.value=ke),placeholder:"设置主密码(至少 6 位)",onKeydown:jt(ie,["enter"])},null,544),[[De,o.value]]),$e(u("input",{type:"password",class:"input","onUpdate:modelValue":X[1]||(X[1]=ke=>a.value=ke),placeholder:"再次输入主密码",onKeydown:jt(ie,["enter"])},null,544),[[De,a.value]]),c.value?(F(),q("div",Zw,re(c.value),1)):Ee("",!0),u("button",{class:"btn btn-primary lock-btn",disabled:s.value,onClick:ie},"完成设置并解锁",8,e_)],64)):(F(),q(Re,{key:1},[X[14]||(X[14]=u("div",{class:"lock-title"},"密码库已锁定",-1)),X[15]||(X[15]=u("div",{class:"muted lock-tip"},"输入主密码解锁后查看与复制密码",-1)),$e(u("input",{type:"password",class:"input","onUpdate:modelValue":X[2]||(X[2]=ke=>d.value=ke),placeholder:"主密码",onKeydown:jt(xe,["enter"])},null,544),[[De,d.value]]),h.value?(F(),q("div",t_,re(h.value),1)):Ee("",!0),u("button",{class:"btn btn-primary lock-btn",disabled:s.value,onClick:xe},"解锁",8,n_)],64))])),Oe(Kw,{open:D.value,title:O.value?"编辑账号":"新增账号",initial:K.value,onCancel:X[4]||(X[4]=ke=>D.value=!1),onSave:ge},null,8,["open","title","initial"]),Oe(ur,{open:!!W.value,title:"删除确认",message:W.value?"将删除系统「"+W.value.system+"」的账号记录。删除后不可恢复。":"","confirm-text":"删除",danger:"",onCancel:X[5]||(X[5]=ke=>W.value=null),onConfirm:Me},null,8,["open","message"]),(F(),It(Vs,{to:"body"},[Oe(ns,{name:"modal"},{default:fr(()=>[de.value?(F(),q("div",{key:0,class:"mask",onClick:X[11]||(X[11]=Mr(ke=>de.value=!1,["self"]))},[u("div",b_,[u("div",w_,[X[19]||(X[19]=u("span",{class:"dialog-title"},"修改主密码",-1)),u("button",{class:"icon-btn",title:"关闭",onClick:X[6]||(X[6]=ke=>de.value=!1)},[Oe(lt,{name:"close",size:16})])]),u("div",__,[u("div",k_,[X[20]||(X[20]=u("label",null,"旧主密码",-1)),$e(u("input",{type:"password",class:"input","onUpdate:modelValue":X[7]||(X[7]=ke=>Z.value=ke)},null,512),[[De,Z.value]])]),u("div",x_,[X[21]||(X[21]=u("label",null,"新主密码(至少 6 位)",-1)),$e(u("input",{type:"password",class:"input","onUpdate:modelValue":X[8]||(X[8]=ke=>E.value=ke)},null,512),[[De,E.value]])]),u("div",C_,[X[22]||(X[22]=u("label",null,"确认新主密码",-1)),$e(u("input",{type:"password",class:"input","onUpdate:modelValue":X[9]||(X[9]=ke=>L.value=ke)},null,512),[[De,L.value]])]),Q.value?(F(),q("div",S_,re(Q.value),1)):Ee("",!0),X[23]||(X[23]=u("div",{class:"muted vp-tip"},"确认后所有账号密码将使用新主密码重新加密",-1))]),u("div",E_,[u("button",{class:"btn btn-sm",onClick:X[10]||(X[10]=ke=>de.value=!1)},"取消"),u("button",{class:"btn btn-primary btn-sm",onClick:fe},"确认修改")])])])):Ee("",!0)]),_:1})]))]))}}),P_=Gt(A_,[["__scopeId","data-v-6820bc9c"]]);function T_(e){return'"'+(e==null?"":String(e)).replace(/"/g,'""')+'"'}async function Mu(e,t){const s="\uFEFF"+t.map(d=>d.map(T_).join(",")).join(`\r
`);if(Zr.isNativePlatform()){const{downloadText:d}=await uf(async()=>{const{downloadText:h}=await Promise.resolve().then(()=>hg);return{downloadText:h}},void 0,import.meta.url);return d(e,s)}const o=new Blob([s],{type:"text/csv;charset=utf-8"}),a=URL.createObjectURL(o),c=document.createElement("a");return c.href=a,c.download=e,c.click(),window.setTimeout(()=>URL.revokeObjectURL(a),1e4),""}class O_ extends Ir{constructor(){super("intern_worklog_users"),this.version(1).stores({user:"id, &username"})}}const Or=new O_,pi="intern_worklog",nl="dsh_session_user";function hi(){try{const e=localStorage.getItem(nl);if(!e)return null;const t=JSON.parse(e);if(t&&t.userId&&t.username)return t}catch{}return null}function yf(e){localStorage.setItem(nl,JSON.stringify(e))}function gf(){localStorage.removeItem(nl)}const rl="dsh_cloud_creds";function bf(e,t){localStorage.setItem(rl,JSON.stringify({username:e,password:t}))}function vi(){try{const e=localStorage.getItem(rl);if(!e)return null;const t=JSON.parse(e);if(t&&t.username&&t.password)return t}catch{}return null}function wf(){localStorage.removeItem(rl)}function sl(e){Hh(new nf(pi+"_"+e))}async function M_(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=tl(),c=await Wo(t,a),d="u_"+Date.now().toString(36)+"_"+Math.random().toString(36).slice(2,6);await Or.user.add({id:d,username:s,pwd_hash:c,pwd_salt:a,created_at:new Date().toISOString()}),sl(d);let h=0;n&&await _f()&&(h=await L_(),await Or.user.update(d,{legacy_imported_at:new Date().toISOString()}));const y={userId:d,username:s};return yf(y),bf(y.username,t),h&&K_(h),y}async function I_(e,t){const n=e.trim(),s=await Or.user.where("username").equals(n).first();if(!s)throw new Error("用户不存在");if(await Wo(t,s.pwd_salt)!==s.pwd_hash)throw new Error("密码不正确");sl(s.id);const a={userId:s.id,username:s.username};return yf(a),bf(a.username,t),a}async function j_(){Yo(),rf(),gf(),wf()}async function D_(e,t){const n=hi();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 Wo(e,s.pwd_salt)!==s.pwd_hash)throw new Error("旧密码不正确");const a=tl(),c=await Wo(t,a);await Or.user.update(s.id,{pwd_hash:c,pwd_salt:a})}async function R_(){const e=hi();if(!e)throw new Error("未登录");Yo(),rf(),await Ir.delete(pi+"_"+e.userId),await Or.user.delete(e.userId),gf(),wf()}async function _f(){return Ir.exists(pi)}async function L_(){if(!ne)throw new Error("用户数据库未就绪");const e=new nf(pi),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 ne.transaction("rw",[ne.project,ne.work_log,ne.log_item,ne.attendance,ne.weekly_note,ne.setting,ne.memo,ne.credential],async()=>{await Promise.all([ne.project.clear(),ne.work_log.clear(),ne.log_item.clear(),ne.attendance.clear(),ne.weekly_note.clear(),ne.setting.clear(),ne.memo.clear(),ne.credential.clear()]),t[0].length&&await ne.project.bulkAdd(t[0]),t[1].length&&await ne.work_log.bulkAdd(t[1]),t[2].length&&await ne.log_item.bulkAdd(t[2]),t[3].length&&await ne.attendance.bulkAdd(t[3]),t[4].length&&await ne.weekly_note.bulkAdd(t[4]),t[5].length&&await ne.setting.bulkAdd(t[5]),t[6].length&&await ne.memo.bulkAdd(t[6]),t[7].length&&await ne.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 K_(e){try{sessionStorage.setItem("dsh_migrate_toast",String(e))}catch{}}const F_="https://daywk.linyux.cn",Aa=["project","work_log","log_item","attendance","weekly_note","setting","memo","credential","transaction"],Pa=new Set(["sync_cursor","sync_last_time","sync_token","last_project","last_category"]);function N_(){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 Iu(e){const t={...e};return delete t.id,t}function ju(e){return JSON.stringify(e)}async function V_(e){return ne.table(e).toArray()}function Ta(e,t){return e==="setting"?t.key:t.id}async function B_(){for(const e of Aa){const t=ne.table(e),n=await t.toArray();for(const s of n){if(e==="setting"&&Pa.has(s.key))continue;const o={};s.uuid||(o.uuid=N_()),s.updated_at||(o.updated_at=s.created_at||wt()),Object.keys(o).length&&await t.update(Ta(e,s),o)}}}async function ol(){return await yt("sync_base_url","")||F_}async function kf(){const e=vi();if(!e)throw new Error("未登录,无法同步");return{baseUrl:await ol(),username:e.username,password:e.password}}async function U_(){return Sf(await kf())}async function xf(){const e=vi();if(!e)throw new Error("未登录");const t=await ol(),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 q_(){return vi()!=null}async function H_(){return yt("sync_last_time","")}async function Cf(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 W_(e,t){let n=await yt("sync_token","");return n||(n=await Cf(e,t),await kt("sync_token",n),n)}let $s=!1,To=!1,Oa=!1,Gr=null,wn=null,Ma="",Du=!1;async function Yr(){if($s){To=!0;return}try{if(!await q_())return;await Sf(await kf())}catch{}}function z_(){Du||(Du=!0,ne.on("changes",()=>{Oa||$s||(Gr&&window.clearTimeout(Gr),Gr=window.setTimeout(()=>{Yr()},3e3))}))}function G_(){wn&&(wn.close(),wn=null,Ma=""),Gr&&(window.clearTimeout(Gr),Gr=null)}function Y_(e,t){const n=e+"|"+t;if(!(wn&&Ma===n)){wn&&(wn.close(),wn=null);try{wn=new EventSource(e+"/api/events?token="+encodeURIComponent(t)),Ma=n,wn.onmessage=()=>{Yr()}}catch{wn=null}}}async function Sf(e){if($s)return To=!0,{pushed:0,pulled:0,removed:0,at:""};$s=!0,Oa=!0;try{const t=await J_(e);return To&&(To=!1,window.setTimeout(()=>{Yr()},800)),t}finally{$s=!1,Oa=!1}}async function J_(e){const t=e.baseUrl.trim().replace(/\/+$/,"");if(!t)throw new Error("请先配置同步服务地址");await B_();const n=await ne.sync_mirror.toArray(),s=new Map;for(const Z of n)s.set(Z.table+"|"+Z.uuid,Z);const o={},a=[];let c=0;for(const Z of Aa){let E=await V_(Z);Z==="setting"&&(E=E.filter(Q=>!Pa.has(Q.key)));const L=new Map;for(const Q of E)L.set(Q.uuid,Q);for(const[Q,le]of L){const ce=Iu(le),ee=ju(ce),A=s.get(Z+"|"+Q);(!A||A.hash!==ee)&&(o[Z]=o[Z]||[],o[Z].push(ce),c++)}for(const[Q,le]of s)Q.startsWith(Z+"|")&&!L.has(le.uuid)&&a.push({table:Z,uuid:le.uuid,deleted_at:wt()});o[Z]=o[Z]||[]}const d=await W_(t,e),h=Z=>fetch(t+"/api/sync",{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+Z},body:JSON.stringify({device:"client",tables:o,tombstones:a})});let y=await h(d);if(y.status===401){await kt("sync_token","");const Z=await Cf(t,e);await kt("sync_token",Z),y=await h(Z)}if(!y.ok)throw new Error("同步服务返回 "+y.status);const m=await y.json(),k=m.tables||{},D=m.tombstones||[];let O=0,K=0;const W=[];for(const Z of Aa){const E=ne.table(Z),L=await E.toArray(),Q=new Map;for(const x of L)Q.set(x.uuid,x);const le=k[Z]||[],ce=new Map;for(const x of le)ce.set(x.uuid,x);const ee=new Set(D.filter(x=>x.table===Z).map(x=>x.uuid));for(const[x,ie]of Q)ee.has(x)&&(await E.delete(Ta(Z,ie)),K++);for(const[x,ie]of le){if(ee.has(x))continue;const xe=Q.get(x);if(!xe)await E.add({...ie}),O++;else{const J=String(xe.updated_at||"");if(String(ie.updated_at||"")>J){const Ke={...ie};Z==="setting"&&delete Ke.key,await E.update(Ta(Z,xe),Ke),O++}}}const A=await E.toArray();for(const x of A)Z==="setting"&&Pa.has(x.key)||W.push({table:Z,uuid:x.uuid,hash:ju(Iu(x))})}await ne.sync_mirror.clear(),W.length&&await ne.sync_mirror.bulkAdd(W.map(Z=>({...Z}))),Y_(t,d);const de=wt();return await kt("sync_last_time",de),{pushed:c,pulled:O,removed:K,at:de}}const X_={class:"settings"},Q_={class:"card section"},Z_={class:"muted acc-line"},e1={class:"ai-grid"},t1={class:"rule-item"},n1={class:"rule-item"},r1={class:"rule-item"},s1={key:0,class:"form-error"},o1={class:"rule-save"},i1={class:"card section"},a1={class:"rule-grid"},l1={class:"rule-item"},u1={class:"rule-item"},c1={class:"rule-item"},f1={class:"rule-item"},d1={class:"rule-item"},p1={class:"card section"},h1={class:"proj-add"},v1={key:0,class:"muted proj-tip"},m1=["onKeydown"],y1=["onClick"],g1=["onClick"],b1=["onClick"],w1={key:1,class:"muted"},_1={class:"card section"},k1={class:"card section"},x1={class:"muted acc-line"},C1={class:"rule-item"},S1={class:"rule-save"},E1=["disabled"],$1={key:0,class:"muted acc-line"},A1={key:1,class:"form-error"},P1={class:"card section"},T1={class:"ai-grid"},O1={class:"rule-item"},M1={class:"rule-item"},I1={class:"rule-item"},j1={class:"card section"},D1={class:"backup-row"},R1={key:0,class:"import-error"},L1=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(""),c=N(""),d=N(""),h=N(""),y=N(null),m=N(""),k=N(null),D=N(null),O=N(""),K=N(((je=hi())==null?void 0:je.username)||""),W=N(""),de=N(""),Z=N(""),E=N(""),L=N(!1),Q="0.2.0",le=N(""),ce=N(""),ee=N(""),A=N(""),x=N(!1),ie=N("");async function xe(){var w;le.value=await ol(),ce.value=((w=vi())==null?void 0:w.username)||"",ie.value=await H_()}async function J(){await kt("sync_base_url",le.value.trim()),qe("同步地址已保存")}async function Ce(){A.value="";try{await xf(),qe("云端绑定已重建")}catch(w){A.value=w instanceof Error?w.message:"绑定失败"}}async function Ke(){if(!x.value){A.value="",x.value=!0;try{await J();const w=await U_();ie.value=w.at,ee.value="推送 "+w.pushed+" 条 · 拉取 "+w.pulled+" 条 · 删除 "+w.removed+" 条",qe("同步完成")}catch(w){A.value=w instanceof Error?w.message:"同步失败"}x.value=!1}}async function Xe(){if(E.value="",de.value!==Z.value){E.value="两次输入的新密码不一致";return}try{await D_(W.value,de.value),W.value="",de.value="",Z.value="",qe("登录密码已修改")}catch(w){E.value=w instanceof Error?w.message:"修改失败"}}async function He(){await R_(),window.location.reload()}async function Ue(){t.value=await jr(),n.value=await Ks(!0),a.value=(await Qa()).join(`
`),c.value=await yt("ai_base_url",""),d.value=await yt("ai_api_key",""),h.value=await yt("ai_model",""),await xe()}async function ge(){await kt("ai_base_url",c.value.trim()),await kt("ai_api_key",d.value.trim()),await kt("ai_model",h.value.trim()),qe("AI 配置已保存")}async function Me(){const w=xt(),g=await Promise.all([fi("2000-01-01",w),Ks(!0)]),P=g[0],ae=g[1],se=new Map(ae.map(oe=>[oe.id,oe.name])),ue=[["日期","分类","项目","内容","耗时(分钟)","成果","待跟进","收获","备注"]];for(const oe of P)ue.push([oe.date,Xa(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 Mu("工作记录_"+w.replace(/-/g,"")+".csv",ue);qe(ye?"CSV 已导出到:"+ye:"CSV 已导出到系统下载目录")}async function Fe(){const w=xt(),g=await Promise.all([jr(),ci("2000-01-01",w)]),P=g[0],ae=g[1],se=["周日","周一","周二","周三","周四","周五","周六"],ue=[["日期","星期","状态","上班时间","下班时间","地点","类型","说明"]];for(const oe of ae){const we=qs(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 ye=await Mu("考勤记录_"+w.replace(/-/g,"")+".csv",ue);qe(ye?"CSV 已导出到:"+ye:"CSV 已导出到系统下载目录")}fn(Ue);async function fe(){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),qe("打卡规则已保存")}async function G(){await of(a.value.split(`
`)),qe("常用地点已保存")}async function X(){const w=s.value.trim();if(w){try{await yv(w),o.value="",s.value=""}catch{o.value="项目名已存在"}await Ue()}}function ke(w){y.value=w.id,m.value=w.name}async function st(w){const g=m.value.trim();if(g)try{await gv(w.id,g),o.value=""}catch{o.value="项目名已存在"}y.value=null,await Ue()}async function pt(w){await bv(w.id,w.archived!==1),await Ue()}async function ht(){try{const w=await Uv(),g=await el("实习日志备份_"+xt().replace(/-/g,"")+".json",w);qe(g?"备份已导出到:"+g:"备份已导出到系统下载目录")}catch(w){qe("导出失败:"+(w instanceof Error?w.message:String(w)))}}function Yt(w){const g=w.target,P=g.files&&g.files[0];if(O.value="",!P)return;const ae=P.name;P.text().then(se=>{D.value={name:ae,text:se}}),g.value=""}async function Jt(){if(D.value)try{await qv(D.value.text),D.value=null,O.value="",await Ue(),qe("数据导入完成")}catch(w){D.value=null,O.value=w instanceof Error?w.message:"导入失败"}}return(w,g)=>(F(),q("div",X_,[u("div",Q_,[g[23]||(g[23]=u("div",{class:"section-title"},"账号与隐私",-1)),u("div",Z_,"版本 v"+re(Qt(Q))+" · 当前用户:"+re(K.value)+" · 每位用户独立数据库隔离存储于本机 · 登录密码仅保存 PBKDF2 哈希",1),u("div",e1,[u("div",t1,[g[20]||(g[20]=u("label",null,"旧登录密码",-1)),$e(u("input",{type:"password",class:"input","onUpdate:modelValue":g[0]||(g[0]=P=>W.value=P)},null,512),[[De,W.value]])]),u("div",n1,[g[21]||(g[21]=u("label",null,"新登录密码(至少 6 位)",-1)),$e(u("input",{type:"password",class:"input","onUpdate:modelValue":g[1]||(g[1]=P=>de.value=P)},null,512),[[De,de.value]])]),u("div",r1,[g[22]||(g[22]=u("label",null,"确认新登录密码",-1)),$e(u("input",{type:"password",class:"input","onUpdate:modelValue":g[2]||(g[2]=P=>Z.value=P)},null,512),[[De,Z.value]])])]),E.value?(F(),q("div",s1,re(E.value),1)):Ee("",!0),u("div",o1,[u("button",{class:"btn btn-primary btn-sm",onClick:Xe},"修改登录密码"),u("button",{class:"btn btn-sm btn-danger",onClick:g[3]||(g[3]=P=>L.value=!0)},"删除此用户及全部数据")])]),u("div",i1,[g[30]||(g[30]=u("div",{class:"section-title"},"打卡规则",-1)),u("div",a1,[u("div",l1,[g[24]||(g[24]=u("label",null,"上班时间",-1)),$e(u("input",{type:"time",class:"input","onUpdate:modelValue":g[4]||(g[4]=P=>t.value.work_start=P)},null,512),[[De,t.value.work_start]])]),u("div",u1,[g[25]||(g[25]=u("label",null,"下班时间",-1)),$e(u("input",{type:"time",class:"input","onUpdate:modelValue":g[5]||(g[5]=P=>t.value.work_end=P)},null,512),[[De,t.value.work_end]])]),u("div",c1,[g[26]||(g[26]=u("label",null,"迟到宽限(分钟)",-1)),$e(u("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}]])]),u("div",f1,[g[27]||(g[27]=u("label",null,"午休扣除(分钟)",-1)),$e(u("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}]])]),u("div",d1,[g[29]||(g[29]=u("label",null,"周记提醒",-1)),$e(u("select",{class:"select","onUpdate:modelValue":g[8]||(g[8]=P=>t.value.remind_weekly=P)},[...g[28]||(g[28]=[u("option",{value:"friday"},"每周五提醒",-1),u("option",{value:"off"},"关闭",-1)])],512),[[Fn,t.value.remind_weekly]])])]),u("div",{class:"rule-save"},[u("button",{class:"btn btn-primary btn-sm",onClick:fe},"保存规则")])]),u("div",p1,[g[31]||(g[31]=u("div",{class:"section-title"},"项目管理",-1)),u("div",h1,[$e(u("input",{class:"input","onUpdate:modelValue":g[9]||(g[9]=P=>s.value=P),placeholder:"新项目名称",onKeydown:jt(X,["enter"])},null,544),[[De,s.value]]),u("button",{class:"btn btn-sm",onClick:X},"添加")]),o.value?(F(),q("div",v1,re(o.value),1)):Ee("",!0),(F(!0),q(Re,null,ut(n.value,P=>(F(),q("div",{key:P.id,class:"proj-row"},[y.value===P.id?(F(),q(Re,{key:0},[$e(u("input",{class:"input","onUpdate:modelValue":g[10]||(g[10]=ae=>m.value=ae),onKeydown:jt(ae=>st(P),["enter"])},null,40,m1),[[De,m.value]]),u("button",{class:"btn btn-sm",onClick:ae=>st(P)},"保存",8,y1),u("button",{class:"btn btn-sm",onClick:g[11]||(g[11]=ae=>y.value=null)},"取消")],64)):(F(),q(Re,{key:1},[u("span",{class:et(["proj-name",{archived:P.archived===1}])},re(P.name),3),u("button",{class:"icon-btn",title:"重命名",onClick:ae=>ke(P)},[Oe(lt,{name:"edit",size:14})],8,g1),u("button",{class:"btn btn-sm",onClick:ae=>pt(P)},re(P.archived===1?"恢复":"归档"),9,b1)],64))]))),128)),n.value.length?Ee("",!0):(F(),q("div",w1,"暂无项目,先添加一个"))]),u("div",_1,[g[33]||(g[33]=u("div",{class:"section-title"},"常用地点",-1)),$e(u("textarea",{class:"textarea","onUpdate:modelValue":g[12]||(g[12]=P=>a.value=P),placeholder:"每行一个地点,如:公司、客户现场、出差、居家办公"},null,512),[[De,a.value]]),u("div",{class:"rule-save"},[u("button",{class:"btn btn-primary btn-sm",onClick:G},"保存地点"),g[32]||(g[32]=u("span",{class:"muted loc-note"},"打卡时可直接输入新地点,保存后自动加入列表",-1))])]),u("div",k1,[g[35]||(g[35]=u("div",{class:"section-title"},"多端数据同步",-1)),u("div",x1,"云端账号:"+re(ce.value||"未绑定")+" · 登录即自动绑定并同步(变更实时推送 + 每 5 分钟兜底);密码库以密文同步,主密码永不出本机",1),u("div",C1,[g[34]||(g[34]=u("label",null,"同步服务地址(默认即可)",-1)),$e(u("input",{class:"input","onUpdate:modelValue":g[13]||(g[13]=P=>le.value=P),placeholder:"https://daywk.linyux.cn"},null,512),[[De,le.value]])]),u("div",S1,[u("button",{class:"btn btn-sm",onClick:J},"保存地址"),u("button",{class:"btn btn-primary btn-sm",disabled:x.value,onClick:Ke},re(x.value?"同步中":"立即同步"),9,E1),u("button",{class:"btn btn-sm",onClick:Ce},"重建云端绑定")]),ee.value?(F(),q("div",$1,"上次同步:"+re(ie.value||"--")+" · "+re(ee.value),1)):Ee("",!0),A.value?(F(),q("div",A1,re(A.value),1)):Ee("",!0)]),u("div",P1,[g[40]||(g[40]=u("div",{class:"section-title"},"AI 润色配置(可选)",-1)),u("div",T1,[u("div",O1,[g[36]||(g[36]=u("label",null,"接口地址(OpenAI 兼容,到 /v1 为止)",-1)),$e(u("input",{class:"input","onUpdate:modelValue":g[14]||(g[14]=P=>c.value=P),placeholder:"https://api.example.com/v1"},null,512),[[De,c.value]])]),u("div",M1,[g[37]||(g[37]=u("label",null,"API Key",-1)),$e(u("input",{class:"input","onUpdate:modelValue":g[15]||(g[15]=P=>d.value=P),placeholder:"sk-..."},null,512),[[De,d.value]])]),u("div",I1,[g[38]||(g[38]=u("label",null,"模型名称",-1)),$e(u("input",{class:"input","onUpdate:modelValue":g[16]||(g[16]=P=>h.value=P),placeholder:"如:deepseek-chat"},null,512),[[De,h.value]])])]),u("div",{class:"rule-save"},[u("button",{class:"btn btn-primary btn-sm",onClick:ge},"保存 AI 配置"),g[39]||(g[39]=u("span",{class:"muted loc-note"},"配置仅保存在本机浏览器;总结页可用 AI 润色草稿,需服务端允许浏览器跨域",-1))])]),u("div",j1,[g[41]||(g[41]=u("div",{class:"section-title"},"数据备份",-1)),u("div",D1,[u("button",{class:"btn btn-sm",onClick:ht},"导出 JSON 备份"),u("button",{class:"btn btn-sm",onClick:g[17]||(g[17]=P=>{var ae;return(ae=k.value)==null?void 0:ae.click()})},"导入 JSON 备份"),u("button",{class:"btn btn-sm",onClick:Me},"导出工作记录 CSV"),u("button",{class:"btn btn-sm",onClick:Fe},"导出考勤 CSV"),u("input",{ref_key:"fileInput",ref:k,type:"file",accept:"application/json,.json",style:{display:"none"},onChange:Yt},null,544)]),O.value?(F(),q("div",R1,re(O.value),1)):Ee("",!0),g[42]||(g[42]=u("div",{class:"muted backup-note"},"数据保存在浏览器 IndexedDB 中,建议定期导出 JSON 备份。",-1))]),Oe(ur,{open:!!D.value,title:"导入确认",message:D.value?"将从文件「"+D.value.name+"」导入备份。现有全部数据将被覆盖,且不可恢复,请先确认已导出当前备份。":"","confirm-text":"覆盖导入",danger:"",onCancel:g[18]||(g[18]=P=>D.value=null),onConfirm:Jt},null,8,["open","message"]),Oe(ur,{open:L.value,title:"删除用户确认",message:"将永久删除用户「"+K.value+"」及其全部数据:工作日志、考勤、备忘录、账号密码库都将被清除,且不可恢复。请确认。","confirm-text":"永久删除",danger:"",onCancel:g[19]||(g[19]=P=>L.value=!1),onConfirm:He},null,8,["open","message"])]))}}),K1=Gt(L1,[["__scopeId","data-v-81598f02"]]),F1={class:"login-page"},N1={class:"card login-card"},V1={class:"login-brand"},B1={class:"brand-icon"},U1={class:"seg"},q1=["placeholder"],H1={key:1,class:"mig-row"},W1={key:2,class:"form-error"},z1=["disabled"],G1=Vt({__name:"LoginView",emits:["login"],setup(e,{emit:t}){const n=t,s=N("login"),o=N(""),a=N(""),c=N(""),d=N(!0),h=N(!1),y=N(""),m=N(!1);fn(async()=>{h.value=await _f()});function k(O){s.value=O,y.value="",c.value=""}async function D(){if(!m.value){y.value="",m.value=!0;try{let O;if(s.value==="login")O=await I_(o.value,a.value);else{if(a.value.length<6){y.value="登录密码至少 6 位",m.value=!1;return}if(a.value!==c.value){y.value="两次输入的密码不一致",m.value=!1;return}O=await M_(o.value,a.value,d.value)}n("login",O)}catch(O){y.value=O instanceof Error?O.message:"操作失败"}m.value=!1}}return(O,K)=>(F(),q("div",F1,[u("div",N1,[u("div",V1,[u("div",B1,[Oe(lt,{name:"calendar",size:22})]),K[6]||(K[6]=u("div",{class:"login-title"},"实习工作日志",-1)),K[7]||(K[7]=u("div",{class:"muted login-sub"},"打卡 · 记录 · 总结 · 备忘录 · 密码库",-1)),K[8]||(K[8]=u("div",{class:"muted login-sub"},"每位用户独立数据库,数据彼此隔离并保存在本机",-1))]),u("div",U1,[u("button",{class:et(["seg-btn",{active:s.value==="login"}]),onClick:K[0]||(K[0]=W=>k("login"))},"登录",2),u("button",{class:et(["seg-btn",{active:s.value==="create"}]),onClick:K[1]||(K[1]=W=>k("create"))},"创建用户",2)]),$e(u("input",{class:"input","onUpdate:modelValue":K[2]||(K[2]=W=>o.value=W),placeholder:"用户名(2 到 20 个字符)",onKeydown:jt(D,["enter"])},null,544),[[De,o.value]]),$e(u("input",{type:"password",class:"input","onUpdate:modelValue":K[3]||(K[3]=W=>a.value=W),placeholder:s.value==="login"?"登录密码":"设置登录密码(至少 6 位)",onKeydown:jt(D,["enter"])},null,40,q1),[[De,a.value]]),s.value==="create"?$e((F(),q("input",{key:0,type:"password",class:"input","onUpdate:modelValue":K[4]||(K[4]=W=>c.value=W),placeholder:"再次输入密码",onKeydown:jt(D,["enter"])},null,544)),[[De,c.value]]):Ee("",!0),s.value==="create"&&h.value?(F(),q("label",H1,[$e(u("input",{type:"checkbox","onUpdate:modelValue":K[5]||(K[5]=W=>d.value=W)},null,512),[[Eh,d.value]]),K[9]||(K[9]=u("span",null,"导入本机原有工作日志数据到此用户(原数据保留不删除)",-1))])):Ee("",!0),y.value?(F(),q("div",W1,re(y.value),1)):Ee("",!0),u("button",{class:"btn btn-primary login-btn",disabled:m.value,onClick:D},re(s.value==="login"?"登录":"创建并进入"),9,z1),K[10]||(K[10]=u("div",{class:"muted login-note"}," 登录后自动开启云端同步(密码会保存在本机用于云同步);系统只保存密码哈希,忘记密码将无法访问该用户数据 ",-1))])]))}}),Y1=Gt(G1,[["__scopeId","data-v-d3d6c8cb"]]),J1={key:1,class:"app"},X1={class:"side"},Q1=["data-tip","onClick"],Z1={class:"main"},e0={class:"topbar"},t0={class:"title"},n0={class:"gsearch"},r0={key:0,class:"gs-panel"},s0={key:0,class:"gs-group muted"},o0=["onMousedown"],i0={class:"tag"},a0={class:"gs-text"},l0={class:"muted num gs-date"},u0={key:1,class:"gs-group muted"},c0=["onMousedown"],f0={class:"gs-text"},d0={class:"muted gs-sub"},p0={key:1,class:"gs-empty muted"},h0={class:"user-chip num"},v0=["disabled"],m0={class:"num"},y0={class:"content"},g0={class:"content-inner"},b0={class:"toast-wrap"},w0=Vt({__name:"App",setup(e){const t=Wv(),n=N(hi());async function s(ge){n.value=ge,location.hash="#/calendar",le.value="calendar",await xe(),await Ue(),c();try{await xf(),await Yr()}catch{}showToast("欢迎,"+ge.username);const Me=sessionStorage.getItem("dsh_migrate_toast");Me&&(sessionStorage.removeItem("dsh_migrate_toast"),showToast("已迁移原有数据 "+Me+" 条"))}async function o(){G_(),a!==null&&(window.clearInterval(a),a=null),await j_(),n.value=null,le.value="calendar",location.hash="#/calendar",showToast("已退出登录")}let a=null;function c(){z_(),a!==null&&window.clearInterval(a),a=window.setInterval(()=>{Yr()},60*1e3),Yr()}const d=N(null),h=N(""),y=N(!1),m=N({logs:[],memos:[]});let k=null;const D=it(()=>!!(m.value.logs.length||m.value.memos.length));function O(){k&&window.clearTimeout(k);const ge=h.value;k=window.setTimeout(async()=>{const Me=ge.trim();if(!Me){m.value={logs:[],memos:[]};return}const Fe=await Promise.all([Rv(Me,8),Lv(Me,4)]);m.value={logs:Fe[0],memos:Fe[1]}},200)}function K(){h.value="",m.value={logs:[],memos:[]},y.value=!1}function W(ge){Sa.value=ge.date,ce("calendar"),K()}function de(ge){Ea.value=ge.id,ce("memo"),K()}function Z(){window.setTimeout(()=>{y.value=!1},150)}function E(ge){var Me;(ge.ctrlKey||ge.metaKey)&&ge.key.toLowerCase()==="k"&&(ge.preventDefault(),(Me=d.value)==null||Me.focus())}const L=[{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 Q(){const ge=(location.hash||"").replace("#/","");return L.some(Me=>Me.key===ge)?ge:"calendar"}const le=N(Q());window.addEventListener("hashchange",()=>{le.value=Q()});function ce(ge){location.hash="#/"+ge}const ee=it(()=>L.find(ge=>ge.key===le.value)||L[0]),A=N(xt()),x=N(void 0),ie=N(!1);async function xe(){if(x.value=await mn(A.value),ie.value=!1,new Date().getHours()<4){const Me=await mn(Kn(A.value,-1));ie.value=!!(Me&&Me.clock_in_at&&!Me.clock_out_at)}}const J=it(()=>{const ge=x.value;return ge&&ge.clock_in_at&&!ge.clock_out_at?!0:ie.value&&!(ge&&ge.clock_in_at)}),Ce=it(()=>{const ge=x.value;return!!(ge&&ge.clock_in_at&&ge.clock_out_at)}),Ke=it(()=>{const ge=x.value;return J.value?"下班打卡":Ce.value?"已打卡 "+Vn(ge==null?void 0:ge.clock_in_at)+" - "+Vn(ge==null?void 0:ge.clock_out_at):"上班打卡"});async function Xe(){if(J.value)try{await _v()}catch{}else await af(A.value);await xe(),Sr()}gt(Hs,()=>{n.value&&xe()});const He=N(!1);async function Ue(){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 Za(Es(A.value));He.value=!Fe||!Fe.highlights&&!Fe.challenges&&!Fe.plan_next}else He.value=!1}return fn(async()=>{window.addEventListener("keydown",E),n.value&&(sl(n.value.userId),await xe(),await Ue(),c())}),(ge,Me)=>{var Fe;return n.value?(F(),q("div",J1,[u("nav",X1,[(F(),q(Re,null,ut(L,fe=>u("button",{key:fe.key,class:et(["nav-btn",{active:le.value===fe.key}]),"data-tip":fe.name,onClick:G=>ce(fe.key)},[Oe(lt,{name:fe.icon,size:18},null,8,["name"])],10,Q1)),64))]),u("div",Z1,[u("header",e0,[u("span",t0,re(ee.value.name),1),u("div",n0,[Oe(lt,{name:"search",size:14,class:"gs-icon"}),$e(u("input",{ref_key:"gsInput",ref:d,class:"input gs-input","onUpdate:modelValue":Me[0]||(Me[0]=fe=>h.value=fe),placeholder:"搜索工作记录与备忘录(Ctrl+K)",onInput:O,onFocus:Me[1]||(Me[1]=fe=>y.value=!0),onBlur:Z,onKeydown:jt(K,["esc"])},null,544),[[De,h.value]]),y.value&&h.value.trim()?(F(),q("div",r0,[D.value?(F(),q(Re,{key:0},[m.value.logs.length?(F(),q("div",s0,"工作记录")):Ee("",!0),(F(!0),q(Re,null,ut(m.value.logs,fe=>(F(),q("div",{key:"l"+fe.id,class:"gs-item",onMousedown:Mr(G=>W(fe),["prevent"])},[u("span",i0,re(Qt(Xa)(fe.category)),1),u("span",a0,re(fe.content),1),u("span",l0,re(fe.date),1)],40,o0))),128)),m.value.memos.length?(F(),q("div",u0,"备忘录")):Ee("",!0),(F(!0),q(Re,null,ut(m.value.memos,fe=>(F(),q("div",{key:"m"+fe.id,class:"gs-item",onMousedown:Mr(G=>de(fe),["prevent"])},[u("span",f0,re(fe.title||"无标题"),1),u("span",d0,re(fe.content),1)],40,c0))),128))],64)):(F(),q("div",p0,"无匹配结果"))])):Ee("",!0)]),Me[4]||(Me[4]=u("span",{class:"flex1"},null,-1)),He.value?(F(),q("button",{key:0,class:"week-tip",onClick:Me[2]||(Me[2]=fe=>ce("report"))},[...Me[3]||(Me[3]=[u("span",{class:"dot",style:{background:"var(--warn)"}},null,-1),nn(" 填写本周周记 ",-1)])])):Ee("",!0),u("span",h0,re((Fe=n.value)==null?void 0:Fe.username),1),u("button",{class:"btn btn-sm",onClick:o},"退出"),u("button",{class:"btn btn-primary btn-sm",disabled:Ce.value,onClick:Xe},[Oe(lt,{name:Ce.value?"check-circle":"clock",size:14},null,8,["name"]),u("span",m0,re(Ke.value),1)],8,v0)]),u("main",y0,[u("div",g0,[le.value==="calendar"?(F(),It(vy,{key:0})):le.value==="today"?(F(),It(_y,{key:1})):le.value==="stats"?(F(),It(Qy,{key:2})):le.value==="report"?(F(),It(Xg,{key:3})):le.value==="ledger"?(F(),It(iw,{key:4})):le.value==="memo"?(F(),It(Cw,{key:5})):le.value==="vault"?(F(),It(P_,{key:6})):(F(),It(K1,{key:7}))])])]),u("div",b0,[Oe(yh,{name:"toast"},{default:fr(()=>[(F(!0),q(Re,null,ut(Qt(t),fe=>(F(),q("div",{key:fe.id,class:"toast"},re(fe.text),1))),128))]),_:1})])])):(F(),It(Y1,{key:0,onLogin:s}))}}}),_0=Gt(w0,[["__scopeId","data-v-219a8436"]]);Ih(_0).mount("#app");"serviceWorker"in navigator&&location.protocol.startsWith("http")&&window.addEventListener("load",()=>{navigator.serviceWorker.register("sw.js").catch(()=>{})});export{df as W,uf as _,dg as b,ff as r};