From cf6cdcf9499fe44e36affa8600afdcda9db68fdf Mon Sep 17 00:00:00 2001 From: bboysoul Date: Fri, 11 Sep 2026 15:23:13 +0800 Subject: [PATCH] feat: brand dodo loading screen --- .../static/assets/{index-eDj38Y8E.js => index-B7Y8ezK4.js} | 2 +- backend/static/assets/index-HDotoAuF.css | 2 -- backend/static/assets/index-pPmuGCFV.css | 2 ++ backend/static/index.html | 4 ++-- frontend/src/App.vue | 2 +- frontend/src/style.css | 2 +- frontend/src/style.test.ts | 6 +++++- 7 files changed, 12 insertions(+), 8 deletions(-) rename backend/static/assets/{index-eDj38Y8E.js => index-B7Y8ezK4.js} (70%) delete mode 100644 backend/static/assets/index-HDotoAuF.css create mode 100644 backend/static/assets/index-pPmuGCFV.css diff --git a/backend/static/assets/index-eDj38Y8E.js b/backend/static/assets/index-B7Y8ezK4.js similarity index 70% rename from backend/static/assets/index-eDj38Y8E.js rename to backend/static/assets/index-B7Y8ezK4.js index 63852dc..7dc64fe 100644 --- a/backend/static/assets/index-eDj38Y8E.js +++ b/backend/static/assets/index-B7Y8ezK4.js @@ -1,4 +1,4 @@ (function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();function e(e){let t=Object.create(null);for(let n of e.split(`,`))t[n]=1;return e=>e in t}var t={},n=[],r=()=>{},i=()=>!1,a=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),o=e=>e.startsWith(`onUpdate:`),s=Object.assign,c=(e,t)=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)},l=Object.prototype.hasOwnProperty,u=(e,t)=>l.call(e,t),d=Array.isArray,f=e=>x(e)===`[object Map]`,p=e=>x(e)===`[object Set]`,m=e=>x(e)===`[object Date]`,h=e=>typeof e==`function`,g=e=>typeof e==`string`,_=e=>typeof e==`symbol`,v=e=>typeof e==`object`&&!!e,y=e=>(v(e)||h(e))&&h(e.then)&&h(e.catch),b=Object.prototype.toString,x=e=>b.call(e),S=e=>x(e).slice(8,-1),C=e=>x(e)===`[object Object]`,w=e=>g(e)&&e!==`NaN`&&e[0]!==`-`&&``+parseInt(e,10)===e,T=e(`,key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted`),E=e=>{let t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},D=/-\w/g,O=E(e=>e.replace(D,e=>e.slice(1).toUpperCase())),k=/\B([A-Z])/g,A=E(e=>e.replace(k,`-$1`).toLowerCase()),j=E(e=>e.charAt(0).toUpperCase()+e.slice(1)),ee=E(e=>e?`on${j(e)}`:``),M=(e,t)=>!Object.is(e,t),te=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},re=e=>{let t=parseFloat(e);return isNaN(t)?e:t},ie=e=>{let t=g(e)?Number(e):NaN;return isNaN(t)?e:t},N,ae=()=>N||=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{};function oe(e){if(d(e)){let t={};for(let n=0;n{if(e){let n=e.split(ce);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function F(e){let t=``;if(g(e))t=e;else if(d(e))for(let n=0;nme(e,t))}var ge=e=>!!(e&&e.__v_isRef===!0),L=e=>g(e)?e:e==null?``:d(e)||v(e)&&(e.toString===b||!h(e.toString))?ge(e)?L(e.value):JSON.stringify(e,_e,2):String(e),_e=(e,t)=>ge(t)?_e(e,t.value):f(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[t,n],r)=>(e[ve(t,r)+` =>`]=n,e),{})}:p(t)?{[`Set(${t.size})`]:[...t.values()].map(e=>ve(e))}:_(t)?ve(t):v(t)&&!d(t)&&!C(t)?String(t):t,ve=(e,t=``)=>_(e)?`Symbol(${e.description??t})`:e,ye,be=class{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!e&&ye&&(ye.active?(this.parent=ye,this.index=(ye.scopes||(ye.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes){let n=this.scopes.slice();for(e=0,t=n.length;e0&&--this._on===0){if(ye===this)ye=this.prevScope;else{let e=ye;for(;e;){if(e.prevScope===this){e.prevScope=this.prevScope;break}e=e.prevScope}}this.prevScope=void 0}}stop(e){if(this._active){this._active=!1;let t,n;for(t=0,n=this.effects.length;t0)return;if(Ee){let e=Ee;for(Ee=void 0;e;){let t=e.next;e.next=void 0,e.flags&=-9,e=t}}let e;for(;Te;){let t=Te;for(Te=void 0;t;){let n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(t){e||=t}t=n}}if(e)throw e}function Ae(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function je(e){let t,n=e.depsTail,r=n;for(;r;){let e=r.prevDep;r.version===-1?(r===n&&(n=e),Pe(r),Fe(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=e}e.deps=t,e.depsTail=n}function Me(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Ne(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Ne(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Ve)||(e.globalVersion=Ve,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Me(e))))return;e.flags|=2;let t=e.dep,n=R,r=Ie;R=e,Ie=!0;try{Ae(e);let n=e.fn(e._value);(t.version===0||M(n,e._value))&&(e.flags|=128,e._value=n,t.version++)}catch(e){throw t.version++,e}finally{R=n,Ie=r,je(e),e.flags&=-3}}function Pe(e,t=!1){let{dep:n,prevSub:r,nextSub:i}=e;if(r&&(r.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let e=n.computed.deps;e;e=e.nextDep)Pe(e,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Fe(e){let{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}var Ie=!0,Le=[];function Re(){Le.push(Ie),Ie=!1}function ze(){let e=Le.pop();Ie=e===void 0||e}function Be(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let e=R;R=void 0;try{t()}finally{R=e}}}var Ve=0,He=class{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},Ue=class{constructor(e){this.computed=e,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(e){if(!R||!Ie||R===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==R)t=this.activeLink=new He(R,this),R.deps?(t.prevDep=R.depsTail,R.depsTail.nextDep=t,R.depsTail=t):R.deps=R.depsTail=t,We(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){let e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=R.depsTail,t.nextDep=void 0,R.depsTail.nextDep=t,R.depsTail=t,R.deps===t&&(R.deps=e)}return t}trigger(e){this.version++,Ve++,this.notify(e)}notify(e){Oe();try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{ke()}}};function We(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let e=t.deps;e;e=e.nextDep)We(e)}let n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}var Ge=new WeakMap,Ke=Symbol(``),qe=Symbol(``),Je=Symbol(``);function Ye(e,t,n){if(Ie&&R){let t=Ge.get(e);t||Ge.set(e,t=new Map);let r=t.get(n);r||(t.set(n,r=new Ue),r.map=t,r.key=n),r.track()}}function Xe(e,t,n,r,i,a){let o=Ge.get(e);if(!o){Ve++;return}let s=e=>{e&&e.trigger()};if(Oe(),t===`clear`)o.forEach(s);else{let i=d(e),a=i&&w(n);if(i&&n===`length`){let e=Number(r);o.forEach((t,n)=>{(n===`length`||n===Je||!_(n)&&n>=e)&&s(t)})}else switch((n!==void 0||o.has(void 0))&&s(o.get(n)),a&&s(o.get(Je)),t){case`add`:i?a&&s(o.get(`length`)):(s(o.get(Ke)),f(e)&&s(o.get(qe)));break;case`delete`:i||(s(o.get(Ke)),f(e)&&s(o.get(qe)));break;case`set`:f(e)&&s(o.get(Ke))}}ke()}function Ze(e){let t=z(e);return t===e?t:(Ye(t,`iterate`,Je),It(e)?t:t.map(zt))}function Qe(e){return Ye(e=z(e),`iterate`,Je),e}function $e(e,t){return Ft(e)?Bt(Pt(e)?zt(t):t):zt(t)}var et={__proto__:null,[Symbol.iterator](){return tt(this,Symbol.iterator,e=>$e(this,e))},concat(...e){return Ze(this).concat(...e.map(e=>d(e)?Ze(e):e))},entries(){return tt(this,`entries`,e=>(e[1]=$e(this,e[1]),e))},every(e,t){return rt(this,`every`,e,t,void 0,arguments)},filter(e,t){return rt(this,`filter`,e,t,e=>e.map(e=>$e(this,e)),arguments)},find(e,t){return rt(this,`find`,e,t,e=>$e(this,e),arguments)},findIndex(e,t){return rt(this,`findIndex`,e,t,void 0,arguments)},findLast(e,t){return rt(this,`findLast`,e,t,e=>$e(this,e),arguments)},findLastIndex(e,t){return rt(this,`findLastIndex`,e,t,void 0,arguments)},forEach(e,t){return rt(this,`forEach`,e,t,void 0,arguments)},includes(...e){return at(this,`includes`,e)},indexOf(...e){return at(this,`indexOf`,e)},join(e){return Ze(this).join(e)},lastIndexOf(...e){return at(this,`lastIndexOf`,e)},map(e,t){return rt(this,`map`,e,t,void 0,arguments)},pop(){return ot(this,`pop`)},push(...e){return ot(this,`push`,e)},reduce(e,...t){return it(this,`reduce`,e,t)},reduceRight(e,...t){return it(this,`reduceRight`,e,t)},shift(){return ot(this,`shift`)},some(e,t){return rt(this,`some`,e,t,void 0,arguments)},splice(...e){return ot(this,`splice`,e)},toReversed(){return Ze(this).toReversed()},toSorted(e){return Ze(this).toSorted(e)},toSpliced(...e){return Ze(this).toSpliced(...e)},unshift(...e){return ot(this,`unshift`,e)},values(){return tt(this,`values`,e=>$e(this,e))}};function tt(e,t,n){let r=Qe(e),i=r[t]();return r!==e&&!It(e)&&(i._next=i.next,i.next=()=>{let e=i._next();return e.done||(e.value=n(e.value)),e}),i}var nt=Array.prototype;function rt(e,t,n,r,i,a){let o=Qe(e),s=o!==e&&!It(e),c=o[t];if(c!==nt[t]){let t=c.apply(e,a);return s?zt(t):t}let l=n;o!==e&&(s?l=function(t,r){return n.call(this,$e(e,t),r,e)}:n.length>2&&(l=function(t,r){return n.call(this,t,r,e)}));let u=c.call(o,l,r);return s&&i?i(u):u}function it(e,t,n,r){let i=Qe(e),a=i!==e&&!It(e),o=n,s=!1;i!==e&&(a?(s=r.length===0,o=function(t,r,i){return s&&(s=!1,t=$e(e,t)),n.call(this,t,$e(e,r),i,e)}):n.length>3&&(o=function(t,r,i){return n.call(this,t,r,i,e)}));let c=i[t](o,...r);return s?$e(e,c):c}function at(e,t,n){let r=z(e);Ye(r,`iterate`,Je);let i=r[t](...n);return(i===-1||i===!1)&&Lt(n[0])?(n[0]=z(n[0]),r[t](...n)):i}function ot(e,t,n=[]){Re(),Oe();let r=z(e)[t].apply(e,n);return ke(),ze(),r}var st=e(`__proto__,__v_isRef,__isVue`),ct=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!==`arguments`&&e!==`caller`).map(e=>Symbol[e]).filter(_));function lt(e){_(e)||(e=String(e));let t=z(this);return Ye(t,`has`,e),t.hasOwnProperty(e)}var ut=class{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if(t===`__v_skip`)return e.__v_skip;let r=this._isReadonly,i=this._isShallow;if(t===`__v_isReactive`)return!r;if(t===`__v_isReadonly`)return r;if(t===`__v_isShallow`)return i;if(t===`__v_raw`)return n===(r?i?Ot:Dt:i?Et:Tt).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;let a=d(e);if(!r){let e;if(a&&(e=et[t]))return e;if(t===`hasOwnProperty`)return lt}let o=Reflect.get(e,t,Vt(e)?e:n);if((_(t)?ct.has(t):st(t))||(r||Ye(e,`get`,t),i))return o;if(Vt(o)){let e=a&&w(t)?o:o.value;return r&&v(e)?Mt(e):e}return v(o)?r?Mt(o):At(o):o}},dt=class extends ut{constructor(e=!1){super(!1,e)}set(e,t,n,r){let i=e[t],a=d(e)&&w(t);if(!this._isShallow){let e=Ft(i);if(!It(n)&&!Ft(n)&&(i=z(i),n=z(n)),!a&&Vt(i)&&!Vt(n))return e||(i.value=n),!0}let o=a?Number(t)e,_t=e=>Reflect.getPrototypeOf(e);function vt(e,t,n){return function(...r){let i=this.__v_raw,a=z(i),o=f(a),c=e===`entries`||e===Symbol.iterator&&o,l=e===`keys`&&o,u=i[e](...r),d=n?gt:t?Bt:zt;return!t&&Ye(a,`iterate`,l?qe:Ke),s(Object.create(u),{next(){let{value:e,done:t}=u.next();return t?{value:e,done:t}:{value:c?[d(e[0]),d(e[1])]:d(e),done:t}}})}}function yt(e){return function(...t){return e===`delete`?!1:e===`clear`?void 0:this}}function bt(e,t){let n={get(n){let r=this.__v_raw,i=z(r),a=z(n);e||(M(n,a)&&Ye(i,`get`,n),Ye(i,`get`,a));let{has:o}=_t(i),s=t?gt:e?Bt:zt;if(o.call(i,n))return s(r.get(n));if(o.call(i,a))return s(r.get(a));r!==i&&r.get(n)},get size(){let t=this.__v_raw;return!e&&Ye(z(t),`iterate`,Ke),t.size},has(t){let n=this.__v_raw,r=z(n),i=z(t);return e||(M(t,i)&&Ye(r,`has`,t),Ye(r,`has`,i)),t===i?n.has(t):n.has(t)||n.has(i)},forEach(n,r){let i=this,a=i.__v_raw,o=z(a),s=t?gt:e?Bt:zt;return!e&&Ye(o,`iterate`,Ke),a.forEach((e,t)=>n.call(r,s(e),s(t),i))}};return s(n,e?{add:yt(`add`),set:yt(`set`),delete:yt(`delete`),clear:yt(`clear`)}:{add(e){let n=z(this),r=_t(n),i=z(e),a=!t&&!It(e)&&!Ft(e)?i:e;return r.has.call(n,a)||M(e,a)&&r.has.call(n,e)||M(i,a)&&r.has.call(n,i)||(n.add(a),Xe(n,`add`,a,a)),this},set(e,n){!t&&!It(n)&&!Ft(n)&&(n=z(n));let r=z(this),{has:i,get:a}=_t(r),o=i.call(r,e);o||=(e=z(e),i.call(r,e));let s=a.call(r,e);return r.set(e,n),o?M(n,s)&&Xe(r,`set`,e,n,s):Xe(r,`add`,e,n),this},delete(e){let t=z(this),{has:n,get:r}=_t(t),i=n.call(t,e);i||=(e=z(e),n.call(t,e));let a=r?r.call(t,e):void 0,o=t.delete(e);return i&&Xe(t,`delete`,e,void 0,a),o},clear(){let e=z(this),t=e.size!==0,n=e.clear();return t&&Xe(e,`clear`,void 0,void 0,void 0),n}}),[`keys`,`values`,`entries`,Symbol.iterator].forEach(r=>{n[r]=vt(r,e,t)}),n}function xt(e,t){let n=bt(e,t);return(t,r,i)=>r===`__v_isReactive`?!e:r===`__v_isReadonly`?e:r===`__v_raw`?t:Reflect.get(u(n,r)&&r in t?n:t,r,i)}var St={get:xt(!1,!1)},Ct={get:xt(!1,!0)},wt={get:xt(!0,!1)},Tt=new WeakMap,Et=new WeakMap,Dt=new WeakMap,Ot=new WeakMap;function kt(e){switch(e){case`Object`:case`Array`:return 1;case`Map`:case`Set`:case`WeakMap`:case`WeakSet`:return 2;default:return 0}}function At(e){return Ft(e)?e:Nt(e,!1,pt,St,Tt)}function jt(e){return Nt(e,!1,ht,Ct,Et)}function Mt(e){return Nt(e,!0,mt,wt,Dt)}function Nt(e,t,n,r,i){if(!v(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;let a=i.get(e);if(a)return a;let o=kt(S(e));if(o===0)return e;let s=new Proxy(e,o===2?r:n);return i.set(e,s),s}function Pt(e){return Ft(e)?Pt(e.__v_raw):!!(e&&e.__v_isReactive)}function Ft(e){return!!(e&&e.__v_isReadonly)}function It(e){return!!(e&&e.__v_isShallow)}function Lt(e){return e?!!e.__v_raw:!1}function z(e){let t=e&&e.__v_raw;return t?z(t):e}function Rt(e){return!u(e,`__v_skip`)&&Object.isExtensible(e)&&ne(e,`__v_skip`,!0),e}var zt=e=>v(e)?At(e):e,Bt=e=>v(e)?Mt(e):e;function Vt(e){return e?e.__v_isRef===!0:!1}function B(e){return Ht(e,!1)}function Ht(e,t){return Vt(e)?e:new Ut(e,t)}var Ut=class{constructor(e,t){this.dep=new Ue,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:z(e),this._value=t?e:zt(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,n=this.__v_isShallow||It(e)||Ft(e);e=n?e:z(e),M(e,t)&&(this._rawValue=e,this._value=n?e:zt(e),this.dep.trigger())}};function V(e){return Vt(e)?e.value:e}var Wt={get:(e,t,n)=>t===`__v_raw`?e:V(Reflect.get(e,t,n)),set:(e,t,n,r)=>{let i=e[t];return Vt(i)&&!Vt(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function Gt(e){return Pt(e)?e:new Proxy(e,Wt)}var Kt=class{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new Ue(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Ve-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&R!==this)return De(this,!0),!0}get value(){let e=this.dep.track();return Ne(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}};function qt(e,t,n=!1){let r,i;return h(e)?r=e:(r=e.get,i=e.set),new Kt(r,i,n)}var Jt={},Yt=new WeakMap,Xt=void 0;function Zt(e,t=!1,n=Xt){if(n){let t=Yt.get(n);t||Yt.set(n,t=[]),t.push(e)}}function Qt(e,n,i=t){let{immediate:a,deep:o,once:s,scheduler:l,augmentJob:u,call:f}=i,p=e=>o?e:It(e)||o===!1||o===0?$t(e,1):$t(e),m,g,_,v,y=!1,b=!1;if(Vt(e)?(g=()=>e.value,y=It(e)):Pt(e)?(g=()=>p(e),y=!0):d(e)?(b=!0,y=e.some(e=>Pt(e)||It(e)),g=()=>e.map(e=>{if(Vt(e))return e.value;if(Pt(e))return p(e);if(h(e))return f?f(e,2):e()})):g=h(e)?n?f?()=>f(e,2):e:()=>{if(_){Re();try{_()}finally{ze()}}let t=Xt;Xt=m;try{return f?f(e,3,[v]):e(v)}finally{Xt=t}}:r,n&&o){let e=g,t=o===!0?1/0:o;g=()=>$t(e(),t)}let x=xe(),S=()=>{m.stop(),x&&x.active&&c(x.effects,m)};if(s&&n){let e=n;n=(...t)=>{let n=e(...t);return S(),n}}let C=b?Array(e.length).fill(Jt):Jt,w=e=>{if(m.flags&1&&(m.dirty||e)){if(n){let t=m.run();if(e||o||y||(b?t.some((e,t)=>M(e,C[t])):M(t,C))){_&&_();let e=Xt;Xt=m;try{let e=[t,C===Jt?void 0:b&&C[0]===Jt?[]:C,v];C=t,f?f(n,3,e):n(...e)}finally{Xt=e}}}else m.run()}};return u&&u(w),m=new Ce(g),m.scheduler=l?()=>l(w,!1):w,v=e=>Zt(e,!1,m),_=m.onStop=()=>{let e=Yt.get(m);if(e){if(f)f(e,4);else for(let t of e)t();Yt.delete(m)}},n?a?w(!0):C=m.run():l?l(w.bind(null,!0),!0):m.run(),S.pause=m.pause.bind(m),S.resume=m.resume.bind(m),S.stop=S,S}function $t(e,t=1/0,n){if(t<=0||!v(e)||e.__v_skip||(n||=new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Vt(e))$t(e.value,t,n);else if(d(e))for(let r=0;r{$t(e,t,n)});else if(C(e)){for(let r in e)$t(e[r],t,n);for(let r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&$t(e[r],t,n)}return e}function H(e,t,n,r){try{return r?e(...r):e()}catch(e){en(e,t,n)}}function U(e,t,n,r){if(h(e)){let i=H(e,t,n,r);return i&&y(i)&&i.catch(e=>{en(e,t,n)}),i}if(d(e)){let i=[];for(let a=0;a>>1,i=nn[r],a=_n(i);a=_n(n)?nn.push(e):nn.splice(dn(t),0,e),e.flags|=1,pn()}}function pn(){ln||=cn.then(vn)}function mn(e){if(!d(e))on&&e.id===-1?on.splice(sn+1,0,e):e.flags&1||(an.push(e),e.flags|=1);else for(let t=0;t_n(e)-_n(t));if(an.length=0,on){for(let t=0;te.id==null?e.flags&2?-1:1/0:e.id;function vn(e){try{for(rn=0;rn{r._d&&ra(-1);let i=xn(t),a=$i.length,o;try{o=e(...n)}finally{for(let e=$i.length;e>a;e--)ta();xn(i),r._d&&ra(1)}return o};return r._n=!0,r._c=!0,r._d=!0,r}function W(e,n){if(yn===null)return e;let r=Ia(yn),i=e.dirs||=[];for(let e=0;e1)return n&&h(t)?t.call(r&&r.proxy):t}}var En=Symbol.for(`v-scx`),Dn=()=>Tn(En);function On(e,t,n){return kn(e,t,n)}function kn(e,n,i=t){let{immediate:a,deep:o,flush:c,once:l}=i,u=s({},i),d=n&&a||!n&&c!==`post`,f;if(ka){if(c===`sync`){let e=Dn();f=e.__watcherHandles||=[]}else if(!d){let e=()=>{};return e.stop=r,e.resume=r,e.pause=r,e}}let p=Sa;u.call=(e,t,n)=>U(e,p,t,n);let m=!1;c===`post`?u.scheduler=e=>{Li(e,p&&p.suspense)}:c!==`sync`&&(m=!0,u.scheduler=(e,t)=>{t?e():fn(e)}),u.augmentJob=e=>{n&&(e.flags|=4),m&&(e.flags|=2,p&&(e.id=p.uid,e.i=p))};let h=Qt(e,n,u);return ka&&(f?f.push(h):d&&h()),h}function An(e,t,n){let r=this.proxy,i=g(e)?e.includes(`.`)?jn(r,e):()=>r[e]:e.bind(r,r),a;h(t)?a=t:(a=t.handler,n=t);let o=Ea(this),s=kn(i,a.bind(r),n);return o(),s}function jn(e,t){let n=t.split(`.`);return()=>{let t=e;for(let e=0;ee.__isTeleport,Fn=e=>e&&(e.disabled||e.disabled===``),In=e=>e&&(e.defer||e.defer===``),Ln=e=>typeof SVGElement<`u`&&e instanceof SVGElement,Rn=e=>typeof MathMLElement==`function`&&e instanceof MathMLElement,zn=(e,t)=>{let n=e&&e.to;return g(n)?t?t(n):null:n},Bn={name:`Teleport`,__isTeleport:!0,process(e,t,n,r,i,a,o,s,c,l){let{mc:u,pc:d,pbc:f,o:{insert:p,querySelector:m,createText:h,createComment:g,parentNode:_}}=l,v=Fn(t.props),{dynamicChildren:y}=t,b=(e,t,n)=>{e.shapeFlag&16&&u(e.children,t,n,i,a,o,s,c)},x=(e=t)=>{let n=Fn(e.props),r=e.target=zn(e.props,m),a=Gn(r,e,h,p);r&&(o!==`svg`&&Ln(r)?o=`svg`:o!==`mathml`&&Rn(r)&&(o=`mathml`),i&&i.isCE&&(i.ce._teleportTargets||(i.ce._teleportTargets=new Set)).add(r),n||(b(e,r,a),Wn(e,!1)))},S=e=>{let t=()=>{if(Mn.get(e)===t){if(Mn.delete(e),Fn(e.props)){let t=_(e.el)||n;b(e,t,e.anchor),Wn(e,!0)}x(e)}};Mn.set(e,t),Li(t,a)};if(e==null){let e=t.el=h(``),i=t.anchor=h(``);if(p(e,n,r),p(i,n,r),In(t.props)||a&&a.pendingBranch){S(t);return}v&&(b(t,n,i),Wn(t,!0)),x()}else{t.el=e.el;let r=t.anchor=e.anchor,u=Mn.get(e);if(u){u.flags|=8,Mn.delete(e),S(t);return}t.targetStart=e.targetStart;let p=t.target=e.target,h=t.targetAnchor=e.targetAnchor,g=Fn(e.props),_=g?n:p,b=g?r:h;if(o===`svg`||Ln(p)?o=`svg`:(o===`mathml`||Rn(p))&&(o=`mathml`),y?(f(e.dynamicChildren,y,_,i,a,o,s),Ui(e,t,!0)):c||d(e,t,_,b,i,a,o,s,!1),v)g?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Vn(t,n,r,l,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){let e=zn(t.props,m);e&&(t.target=e,Vn(t,e,null,l,0))}else g&&Vn(t,p,h,l,1);Wn(t,v)}},remove(e,t,n,{um:r,o:{remove:i}},a){let{shapeFlag:o,children:s,anchor:c,targetStart:l,targetAnchor:u,target:d,props:f}=e,p=Fn(f),m=a||!p,h=Mn.get(e);if(h&&(h.flags|=8,Mn.delete(e)),d&&(i(l),i(u)),a&&i(c),!h&&(p||d)&&o&16)for(let e=0;e{e.isMounted=!0}),Tr(()=>{e.isUnmounting=!0}),e}var Yn=[Function,Array],Xn={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Yn,onEnter:Yn,onAfterEnter:Yn,onEnterCancelled:Yn,onBeforeLeave:Yn,onLeave:Yn,onAfterLeave:Yn,onLeaveCancelled:Yn,onBeforeAppear:Yn,onAppear:Yn,onAfterAppear:Yn,onAppearCancelled:Yn},Zn=e=>{let t=e.subTree;return t.component?Zn(t.component):t},Qn={name:`BaseTransition`,props:Xn,setup(e,{slots:t}){let n=Ca(),r=Jn();return()=>{let i=t.default&&or(t.default(),!0),a=i&&i.length?$n(i):n.subTree?Z():void 0;if(!a)return;let o=z(e),{mode:s}=o;if(r.isLeaving)return rr(a);let c=ir(a);if(!c)return rr(a);let l=nr(c,o,r,n,e=>l=e);c.type!==Zi&&ar(c,l);let u=n.subTree&&ir(n.subTree);if(u&&u.type!==Zi&&!sa(u,c)&&Zn(n).type!==Zi){let e=nr(u,o,r,n);if(ar(u,e),s===`out-in`&&c.type!==Zi)return r.isLeaving=!0,e.afterLeave=()=>{r.isLeaving=!1,n.job.flags&8||n.update(),delete e.afterLeave,u=void 0},rr(a);s===`in-out`&&c.type!==Zi?e.delayLeave=(e,t,n)=>{let i=tr(r,u);i[String(u.key)]=u,e[Kn]=()=>{t(),e[Kn]=void 0,delete l.delayedLeave,u=void 0},l.delayedLeave=()=>{n(),delete l.delayedLeave,u=void 0}}:u=void 0}else u&&=void 0;return a}}};function $n(e){let t=e[0];if(e.length>1){for(let n of e)if(n.type!==Zi){t=n;break}}return t}var er=Qn;function tr(e,t){let{leavingVNodes:n}=e,r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function nr(e,t,n,r,i){let{appear:a,mode:o,persisted:s=!1,onBeforeEnter:c,onEnter:l,onAfterEnter:u,onEnterCancelled:f,onBeforeLeave:p,onLeave:m,onAfterLeave:h,onLeaveCancelled:g,onBeforeAppear:_,onAppear:v,onAfterAppear:y,onAppearCancelled:b}=t,x=String(e.key),S=tr(n,e),C=(e,t)=>{e&&U(e,r,9,t)},w=(e,t)=>{let n=t[1];C(e,t),d(e)?e.every(e=>e.length<=1)&&n():e.length<=1&&n()},T={mode:o,persisted:s,beforeEnter(t){let r=c;if(!n.isMounted){if(a)r=_||c;else return}t[Kn]&&t[Kn](!0);let i=S[x];i&&sa(e,i)&&i.el[Kn]&&i.el[Kn](),C(r,[t])},enter(t){if(S[x]===e)return;let r=l,i=u,o=f;if(!n.isMounted){if(a)r=v||l,i=y||u,o=b||f;else return}let s=!1;t[qn]=e=>{s||(s=!0,C(e?o:i,[t]),T.delayedLeave&&T.delayedLeave(),t[qn]=void 0)};let c=t[qn].bind(null,!1);r?w(r,[t,c]):c()},leave(t,r){let i=String(e.key);if(t[qn]&&t[qn](!0),n.isUnmounting)return r();C(p,[t]);let a=!1;t[Kn]=n=>{a||(a=!0,r(),C(n?g:h,[t]),t[Kn]=void 0,S[i]===e&&delete S[i])};let o=t[Kn].bind(null,!1);S[i]=e,m?w(m,[t,o]):o()},clone(e){let a=nr(e,t,n,r,i);return i&&i(a),a}};return T}function rr(e){if(mr(e))return e=fa(e),e.children=null,e}function ir(e){if(!mr(e))return Pn(e.type)&&e.children?$n(e.children):e;if(e.component)return e.component.subTree;let{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&h(n.default))return n.default()}}function ar(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;let n=e.component.subTree;ar(Pn(n.type)&&ir(n)||n,t)}else e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function or(e,t=!1,n){let r=[],i=0;for(let a=0;a1)for(let e=0;edr(e,n&&(d(n)?n[t]:n),r,a,o));return}if(pr(a)&&!o){a.shapeFlag&512&&a.type.__asyncResolved&&a.component.subTree.component&&dr(e,n,r,a.component.subTree);return}let s=a.shapeFlag&4?Ia(a.component):a.el,l=o?null:s,{i:f,r:p}=e,m=n&&n.r,_=f.refs===t?f.refs={}:f.refs,v=f.setupState,y=z(v),b=v===t?i:e=>!lr(_,e)&&u(y,e),x=(e,t)=>!(t&&lr(_,t));if(m!=null&&m!==p){if(fr(n),g(m))_[m]=null,b(m)&&(v[m]=null);else if(Vt(m)){let e=n;x(m,e.k)&&(m.value=null),e.k&&(_[e.k]=null)}}if(h(p))H(p,f,12,[l,_]);else{let t=g(p),n=Vt(p);if(t||n){let i=()=>{if(e.f){let n=t?b(p)?v[p]:_[p]:x(p)||!e.k?p.value:_[e.k];if(o)d(n)&&c(n,s);else if(d(n))n.includes(s)||n.push(s);else if(t)_[p]=[s],b(p)&&(v[p]=_[p]);else{let t=[s];x(p,e.k)&&(p.value=t),e.k&&(_[e.k]=t)}}else t?(_[p]=l,b(p)&&(v[p]=l)):n&&(x(p,e.k)&&(p.value=l),e.k&&(_[e.k]=l))};if(l){let t=()=>{i(),ur.delete(e)};t.id=-1,ur.set(e,t),Li(t,r)}else fr(e),i()}}}function fr(e){let t=ur.get(e);t&&(t.flags|=8,ur.delete(e))}ae().requestIdleCallback,ae().cancelIdleCallback;var pr=e=>!!e.type.__asyncLoader,mr=e=>e.type.__isKeepAlive;function hr(e,t){_r(e,`a`,t)}function gr(e,t){_r(e,`da`,t)}function _r(e,t,n=Sa){let r=e.__wdc||=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()};if(yr(t,r,n),n){let e=n.parent;for(;e&&e.parent;)mr(e.parent.vnode)&&vr(r,t,n,e),e=e.parent}}function vr(e,t,n,r){let i=yr(t,e,r,!0);Er(()=>{c(r[t],i)},n)}function yr(e,t,n=Sa,r=!1){if(n){let i=n[e]||(n[e]=[]),a=t.__weh||=(...r)=>{Re();let i=Ea(n),a=U(t,n,e,r);return i(),ze(),a};return r?i.unshift(a):i.push(a),a}}var br=e=>(t,n=Sa)=>{(!ka||e===`sp`)&&yr(e,(...e)=>t(...e),n)},xr=br(`bm`),Sr=br(`m`),Cr=br(`bu`),wr=br(`u`),Tr=br(`bum`),Er=br(`um`),Dr=br(`sp`),Or=br(`rtg`),kr=br(`rtc`);function Ar(e,t=Sa){yr(`ec`,e,t)}var jr=`components`,Mr=Symbol.for(`v-ndc`);function Nr(e){return g(e)?Pr(jr,e,!1)||e:e||Mr}function Pr(e,t,n=!0,r=!1){let i=yn||Sa;if(i){let n=i.type;if(e===jr){let e=La(n,!1);if(e&&(e===t||e===O(t)||e===j(O(t))))return n}let a=Fr(i[e]||n[e],t)||Fr(i.appContext[e],t);return!a&&r?n:a}}function Fr(e,t){return e&&(e[t]||e[O(t)]||e[j(O(t))])}function Ir(e,t,n,r){let i,a=n&&n[r],o=d(e);if(o||g(e)){let n=o&&Pt(e),r=!1,s=!1;n&&(r=!It(e),s=Ft(e),e=Qe(e)),i=Array(e.length);for(let n=0,o=e.length;nt(e,n,void 0,a&&a[n]));else{let n=Object.keys(e);i=Array(n.length);for(let r=0,o=n.length;re?Oa(e)?Ia(e):Lr(e.parent):null,Rr=s(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=>Lr(e.parent),$root:e=>Lr(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>qr(e),$forceUpdate:e=>e.f||=()=>{fn(e.update)},$nextTick:e=>e.n||=un.bind(e.proxy),$watch:e=>An.bind(e)}),zr=(e,n)=>e!==t&&!e.__isScriptSetup&&u(e,n),Br={get({_:e},n){if(n===`__v_skip`)return!0;let{ctx:r,setupState:i,data:a,props:o,accessCache:s,type:c,appContext:l}=e;if(n[0]!==`$`){let e=s[n];if(e!==void 0)switch(e){case 1:return i[n];case 2:return a[n];case 4:return r[n];case 3:return o[n]}else if(zr(i,n))return s[n]=1,i[n];else if(a!==t&&u(a,n))return s[n]=2,a[n];else if(u(o,n))return s[n]=3,o[n];else if(r!==t&&u(r,n))return s[n]=4,r[n];else Hr&&(s[n]=0)}let d=Rr[n],f,p;if(d)return n===`$attrs`&&Ye(e.attrs,`get`,``),d(e);if((f=c.__cssModules)&&(f=f[n]))return f;if(r!==t&&u(r,n))return s[n]=4,r[n];if(p=l.config.globalProperties,u(p,n))return p[n]},set({_:e},n,r){let{data:i,setupState:a,ctx:o}=e;return zr(a,n)?(a[n]=r,!0):i!==t&&u(i,n)?(i[n]=r,!0):u(e.props,n)||n[0]===`$`&&n.slice(1)in e?!1:(o[n]=r,!0)},has({_:{data:e,setupState:n,accessCache:r,ctx:i,appContext:a,props:o,type:s}},c){let l;return!!(r[c]||e!==t&&c[0]!==`$`&&u(e,c)||zr(n,c)||u(o,c)||u(i,c)||u(Rr,c)||u(a.config.globalProperties,c)||(l=s.__cssModules)&&l[c])},defineProperty(e,t,n){return n.get==null?u(n,`value`)&&this.set(e,t,n.value,null):e._.accessCache[t]=0,Reflect.defineProperty(e,t,n)}};function Vr(e){return d(e)?e.reduce((e,t)=>(e[t]=null,e),{}):e}var Hr=!0;function Ur(e){let t=qr(e),n=e.proxy,i=e.ctx;Hr=!1,t.beforeCreate&&Gr(t.beforeCreate,e,`bc`);let{data:a,computed:o,methods:s,watch:c,provide:l,inject:u,created:f,beforeMount:p,mounted:m,beforeUpdate:g,updated:_,activated:y,deactivated:b,beforeDestroy:x,beforeUnmount:S,destroyed:C,unmounted:w,render:T,renderTracked:E,renderTriggered:D,errorCaptured:O,serverPrefetch:k,expose:A,inheritAttrs:j,components:ee,directives:M,filters:te}=t;if(u&&Wr(u,i,null),s)for(let e in s){let t=s[e];h(t)&&(i[e]=t.bind(n))}if(a){let t=a.call(n,n);v(t)&&(e.data=At(t))}if(Hr=!0,o)for(let e in o){let t=o[e],a=Q({get:h(t)?t.bind(n,n):h(t.get)?t.get.bind(n,n):r,set:!h(t)&&h(t.set)?t.set.bind(n):r});Object.defineProperty(i,e,{enumerable:!0,configurable:!0,get:()=>a.value,set:e=>a.value=e})}if(c)for(let e in c)Kr(c[e],i,n,e);if(l){let e=h(l)?l.call(n):l;Reflect.ownKeys(e).forEach(t=>{wn(t,e[t])})}f&&Gr(f,e,`c`);function ne(e,t){d(t)?t.forEach(t=>e(t.bind(n))):t&&e(t.bind(n))}if(ne(xr,p),ne(Sr,m),ne(Cr,g),ne(wr,_),ne(hr,y),ne(gr,b),ne(Ar,O),ne(kr,E),ne(Or,D),ne(Tr,S),ne(Er,w),ne(Dr,k),d(A)){if(A.length){let t=e.exposed||={};A.forEach(e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t,enumerable:!0})})}else e.exposed||={}}T&&e.render===r&&(e.render=T),j!=null&&(e.inheritAttrs=j),ee&&(e.components=ee),M&&(e.directives=M),k&&cr(e)}function Wr(e,t,n=r){d(e)&&(e=Qr(e));for(let n in e){let r=e[n],i;i=v(r)?`default`in r?Tn(r.from||n,r.default,!0):Tn(r.from||n):Tn(r),Vt(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e}):t[n]=i}}function Gr(e,t,n){U(d(e)?e.map(e=>e.bind(t.proxy)):e.bind(t.proxy),t,n)}function Kr(e,t,n,r){let i=r.includes(`.`)?jn(n,r):()=>n[r];if(g(e)){let n=t[e];h(n)&&On(i,n)}else if(h(e))On(i,e.bind(n));else if(v(e)){if(d(e))e.forEach(e=>Kr(e,t,n,r));else{let r=h(e.handler)?e.handler.bind(n):t[e.handler];h(r)&&On(i,r,e)}}}function qr(e){let t=e.type,{mixins:n,extends:r}=t,{mixins:i,optionsCache:a,config:{optionMergeStrategies:o}}=e.appContext,s=a.get(t),c;return s?c=s:!i.length&&!n&&!r?c=t:(c={},i.length&&i.forEach(e=>Jr(c,e,o,!0)),Jr(c,t,o)),v(t)&&a.set(t,c),c}function Jr(e,t,n,r=!1){let{mixins:i,extends:a}=t;a&&Jr(e,a,n,!0),i&&i.forEach(t=>Jr(e,t,n,!0));for(let i in t)if(!(r&&i===`expose`)){let r=Yr[i]||n&&n[i];e[i]=r?r(e[i],t[i]):t[i]}return e}var Yr={data:Xr,props:ti,emits:ti,methods:ei,computed:ei,beforeCreate:$r,created:$r,beforeMount:$r,mounted:$r,beforeUpdate:$r,updated:$r,beforeDestroy:$r,beforeUnmount:$r,destroyed:$r,unmounted:$r,activated:$r,deactivated:$r,errorCaptured:$r,serverPrefetch:$r,components:ei,directives:ei,watch:ni,provide:Xr,inject:Zr};function Xr(e,t){return t?e?function(){return s(h(e)?e.call(this,this):e,h(t)?t.call(this,this):t)}:t:e}function Zr(e,t){return ei(Qr(e),Qr(t))}function Qr(e){if(d(e)){let t={};for(let n=0;nt===`modelValue`||t===`model-value`?e.modelModifiers:e[`${t}Modifiers`]||e[`${O(t)}Modifiers`]||e[`${A(t)}Modifiers`];function ci(e,n,...r){if(e.isUnmounted)return;let i=e.vnode.props||t,a=r,o=n.startsWith(`update:`),s=o&&si(i,n.slice(7));s&&(s.trim&&(a=r.map(e=>g(e)?e.trim():e)),s.number&&(a=a.map(re)));let c,l=i[c=ee(n)]||i[c=ee(O(n))];!l&&o&&(l=i[c=ee(A(n))]),l&&U(l,e,6,a);let u=i[c+`Once`];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[c])return;e.emitted[c]=!0,U(u,e,6,a)}}var li=new WeakMap;function ui(e,t,n=!1){let r=n?li:t.emitsCache,i=r.get(e);if(i!==void 0)return i;let a=e.emits,o={},c=!1;if(!h(e)){let r=e=>{let n=ui(e,t,!0);n&&(c=!0,s(o,n))};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}return!a&&!c?(v(e)&&r.set(e,null),null):(d(a)?a.forEach(e=>o[e]=null):s(o,a),v(e)&&r.set(e,o),o)}function di(e,t){return!e||!a(t)?!1:(t=t.slice(2),t=t===`Once`?t:t.replace(/Once$/,``),u(e,t[0].toLowerCase()+t.slice(1))||u(e,A(t))||u(e,t))}function fi(e){let{type:t,vnode:n,proxy:r,withProxy:i,propsOptions:[a],slots:s,attrs:c,emit:l,render:u,renderCache:d,props:f,data:p,setupState:m,ctx:h,inheritAttrs:g}=e,_=xn(e),v,y;try{if(n.shapeFlag&4){let e=i||r,t=e;v=ma(u.call(t,e,d,f,m,p,h)),y=c}else{let e=t;v=ma(e.length>1?e(f,{attrs:c,slots:s,emit:l}):e(f,null)),y=t.props?c:pi(c)}}catch(t){$i.length=0,en(t,e,1),v=Y(Zi)}let b=v;if(y&&g!==!1){let e=Object.keys(y),{shapeFlag:t}=b;e.length&&t&7&&(a&&e.some(o)&&(y=mi(y,a)),b=fa(b,y,!1,!0))}return n.dirs&&(b=fa(b,null,!1,!0),b.dirs=b.dirs?b.dirs.concat(n.dirs):n.dirs),n.transition&&ar(Pn(b.type)&&ir(b)||b,n.transition),v=b,xn(_),v}var pi=e=>{let t;for(let n in e)(n===`class`||n===`style`||a(n))&&((t||={})[n]=e[n]);return t},mi=(e,t)=>{let n={};for(let r in e)(!o(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function hi(e,t,n){let{props:r,children:i,component:a}=e,{props:o,children:s,patchFlag:c}=t,l=a.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return r?gi(r,o,l):!!o;if(c&8){let e=t.dynamicProps;for(let t=0;tObject.create(yi),xi=e=>Object.getPrototypeOf(e)===yi;function Si(e,t,n,r=!1){let i={},a=bi();e.propsDefaults=Object.create(null),wi(e,t,i,a);for(let t in e.propsOptions[0])t in i||(i[t]=void 0);e.props=n?r?i:jt(i):e.type.props?i:a,e.attrs=a}function Ci(e,t,n,r){let{props:i,attrs:a,vnode:{patchFlag:o}}=e,s=z(i),[c]=e.propsOptions,l=!1;if((r||o>0)&&!(o&16)){if(o&8){let n=e.vnode.dynamicProps;for(let r=0;r{p=!0;let[t,n]=Di(e,r,!0);s(l,t),n&&f.push(...n)};!i&&r.mixins.length&&r.mixins.forEach(t),e.extends&&t(e.extends),e.mixins&&e.mixins.forEach(t)}if(!c&&!p)return v(e)&&a.set(e,n),n;if(d(c))for(let e=0;ee===`_`||e===`_ctx`||e===`$stable`,Ai=e=>d(e)?e.map(ma):[ma(e)],ji=(e,t,n)=>{if(t._n)return t;let r=Sn((...e)=>Ai(t(...e)),n);return r._c=!1,r},Mi=(e,t,n)=>{let r=e._ctx;for(let n in e){if(ki(n))continue;let i=e[n];if(h(i))t[n]=ji(n,i,r);else if(i!=null){let e=Ai(i);t[n]=()=>e}}},Ni=(e,t)=>{let n=Ai(t);e.slots.default=()=>n},Pi=(e,t,n)=>{for(let r in t)(n||!ki(r))&&(e[r]=t[r])},Fi=(e,t,n)=>{let r=e.slots=bi();if(e.vnode.shapeFlag&32){let e=t._;e?(Pi(r,t,n),n&&ne(r,`_`,e,!0)):Mi(t,r)}else t&&Ni(e,t)},Ii=(e,n,r)=>{let{vnode:i,slots:a}=e,o=!0,s=t;if(i.shapeFlag&32){let e=n._;e?r&&e===1?o=!1:Pi(a,n,r):(o=!n.$stable,Mi(n,a)),s=n}else n&&(Ni(e,n),s={default:1});if(o)for(let e in a)!ki(e)&&s[e]==null&&delete a[e]},Li=Yi;function Ri(e){return zi(e)}function zi(e,i){let a=ae();a.__VUE__=!0;let{insert:o,remove:s,patchProp:c,createElement:l,createText:u,createComment:d,setText:f,setElementText:p,parentNode:m,nextSibling:h,setScopeId:g=r,insertStaticContent:_}=e,v=(e,t,n,r=null,i=null,a=null,o=void 0,s=null,c=!!t.dynamicChildren)=>{if(e===t)return;e&&!sa(e,t)&&(r=I(e),P(e,i,a,!0),e=null),t.patchFlag===-2&&(c=!1,t.dynamicChildren=null);let{type:l,ref:u,shapeFlag:d}=t;switch(l){case Xi:y(e,t,n,r);break;case Zi:b(e,t,n,r);break;case Qi:e??x(t,n,r,o);break;case G:ee(e,t,n,r,i,a,o,s,c);break;default:d&1?w(e,t,n,r,i,a,o,s,c):d&6?M(e,t,n,r,i,a,o,s,c):(d&64||d&128)&&l.process(e,t,n,r,i,a,o,s,c,he)}u!=null&&i?dr(u,e&&e.ref,a,t||e,!t):u==null&&e&&e.ref!=null&&dr(e.ref,null,a,e,!0)},y=(e,t,n,r)=>{if(e==null)o(t.el=u(t.children),n,r);else{let n=t.el=e.el;t.children!==e.children&&f(n,t.children)}},b=(e,t,n,r)=>{e==null?o(t.el=d(t.children||``),n,r):t.el=e.el},x=(e,t,n,r)=>{[e.el,e.anchor]=_(e.children,t,n,r,e.el,e.anchor)},S=({el:e,anchor:t},n,r)=>{let i;for(;e&&e!==t;)i=h(e),o(e,n,r),e=i;o(t,n,r)},C=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=h(e),s(e),e=n;s(t)},w=(e,t,n,r,i,a,o,s,c)=>{if(t.type===`svg`?o=`svg`:t.type===`math`&&(o=`mathml`),e==null)E(t,n,r,i,a,o,s,c);else{let n=e.el&&e.el._isVueCE?e.el:null;try{n&&n._beginPatch(),k(e,t,i,a,o,s,c)}finally{n&&n._endPatch()}}},E=(e,t,n,r,i,a,s,u)=>{let d,f,{props:m,shapeFlag:h,transition:g,dirs:_}=e;if(d=e.el=l(e.type,a,m&&m.is,m),h&8?p(d,e.children):h&16&&O(e.children,d,null,r,i,Bi(e,a),s,u),_&&Cn(e,null,r,`created`),D(d,e,e.scopeId,s,r),m){for(let e in m)e!==`value`&&!T(e)&&c(d,e,null,m[e],a,r);`value`in m&&c(d,`value`,null,m.value,a),(f=m.onVnodeBeforeMount)&&va(f,r,e)}_&&Cn(e,null,r,`beforeMount`);let v=Hi(i,g);v&&g.beforeEnter(d),o(d,t,n),((f=m&&m.onVnodeMounted)||v||_)&&Li(()=>{try{f&&va(f,r,e),v&&g.enter(d),_&&Cn(e,null,r,`mounted`)}finally{}},i)},D=(e,t,n,r,i)=>{if(n&&g(e,n),r)for(let t=0;t{for(let l=c;l{let l=n.el=e.el,{patchFlag:u,dynamicChildren:d,dirs:f}=n;u|=e.patchFlag&16;let m=e.props||t,h=n.props||t,g;if(r&&Vi(r,!1),(g=h.onVnodeBeforeUpdate)&&va(g,r,n,e),f&&Cn(n,e,r,`beforeUpdate`),r&&Vi(r,!0),d&&(!e.dynamicChildren||e.dynamicChildren.length!==d.length)&&(u=0,s=!1,d=null),(m.innerHTML&&h.innerHTML==null||m.textContent&&h.textContent==null)&&p(l,``),d?A(e.dynamicChildren,d,l,r,i,Bi(n,a),o):s||oe(e,n,l,null,r,i,Bi(n,a),o,!1),u>0){if(u&16)j(l,m,h,r,a);else if(u&2&&m.class!==h.class&&c(l,`class`,null,h.class,a),u&4&&c(l,`style`,m.style,h.style,a),u&8){let e=n.dynamicProps;for(let t=0;t{g&&va(g,r,n,e),f&&Cn(n,e,r,`updated`)},i)},A=(e,t,n,r,i,a,o)=>{for(let s=0;s{if(n!==r){if(n!==t)for(let t in n)!T(t)&&!(t in r)&&c(e,t,n[t],null,a,i);for(let t in r){if(T(t))continue;let o=r[t],s=n[t];o!==s&&t!==`value`&&c(e,t,s,o,a,i)}`value`in r&&c(e,`value`,n.value,r.value,a)}},ee=(e,t,n,r,i,a,s,c,l)=>{let d=t.el=e?e.el:u(``),f=t.anchor=e?e.anchor:u(``),{patchFlag:p,dynamicChildren:m,slotScopeIds:h}=t;h&&(c=c?c.concat(h):h),e==null?(o(d,n,r),o(f,n,r),O(t.children||[],n,f,i,a,s,c,l)):p>0&&p&64&&m&&e.dynamicChildren&&e.dynamicChildren.length===m.length?(A(e.dynamicChildren,m,n,i,a,s,c),(t.key!=null||i&&t===i.subTree)&&Ui(e,t,!0)):oe(e,t,n,f,i,a,s,c,l)},M=(e,t,n,r,i,a,o,s,c)=>{t.slotScopeIds=s,e==null?t.shapeFlag&512?i.ctx.activate(t,n,r,o,c):ne(t,n,r,i,a,o,c):re(e,t,c)},ne=(e,t,n,r,i,a,o)=>{let s=e.component=xa(e,r,i);if(mr(e)&&(s.ctx.renderer=he),Aa(s,!1,o),s.asyncDep){if(i&&i.registerDep(s,ie,o),!e.el){let r=s.subTree=Y(Zi);b(null,r,t,n),e.placeholder=r.el}}else ie(s,e,t,n,i,a,o)},re=(e,t,n)=>{let r=t.component=e.component;if(hi(e,t,n)){if(r.asyncDep&&!r.asyncResolved){N(r,t,n);return}r.next=t,r.update()}else t.el=e.el,r.vnode=t},ie=(e,t,n,r,i,a,o)=>{let s=()=>{if(e.isMounted){let{next:t,bu:n,u:r,parent:s,vnode:c}=e;{let n=Gi(e);if(n){t&&(t.el=c.el,N(e,t,o)),n.asyncDep.then(()=>{Li(()=>{e.isUnmounted||l()},i)});return}}let u=t,d;Vi(e,!1),t?(t.el=c.el,N(e,t,o)):t=c,n&&te(n),(d=t.props&&t.props.onVnodeBeforeUpdate)&&va(d,s,t,c),Vi(e,!0);let f=fi(e),p=e.subTree;e.subTree=f,v(p,f,m(p.el),I(p),e,i,a),t.el=f.el,u===null&&vi(e,f.el),r&&Li(r,i),(d=t.props&&t.props.onVnodeUpdated)&&Li(()=>va(d,s,t,c),i)}else{let o,{el:s,props:c}=t,{bm:l,m:u,parent:d,root:f,type:p}=e,m=pr(t);if(Vi(e,!1),l&&te(l),!m&&(o=c&&c.onVnodeBeforeMount)&&va(o,d,t),Vi(e,!0),s&&L){let t=()=>{e.subTree=fi(e),L(s,e.subTree,e,i,null)};m&&p.__asyncHydrate?p.__asyncHydrate(s,e,t):t()}else{f.ce&&f.ce._hasShadowRoot()&&f.ce._injectChildStyle(p,e.parent?e.parent.type:void 0);let o=e.subTree=fi(e);v(null,o,n,r,e,i,a),t.el=o.el}if(u&&Li(u,i),!m&&(o=c&&c.onVnodeMounted)){let e=t;Li(()=>va(o,d,e),i)}(t.shapeFlag&256||d&&pr(d.vnode)&&d.vnode.shapeFlag&256)&&e.a&&Li(e.a,i),e.isMounted=!0,t=n=r=null}};e.scope.on();let c=e.effect=new Ce(s);e.scope.off();let l=e.update=c.run.bind(c),u=e.job=c.runIfDirty.bind(c);u.i=e,u.id=e.uid,c.scheduler=()=>fn(u),Vi(e,!0),l()},N=(e,t,n)=>{t.component=e;let r=e.vnode.props;e.vnode=t,e.next=null,Ci(e,t.props,r,n),Ii(e,t.children,n),Re(),hn(e),ze()},oe=(e,t,n,r,i,a,o,s,c=!1)=>{let l=e&&e.children,u=e?e.shapeFlag:0,d=t.children,{patchFlag:f,shapeFlag:m}=t;if(f>0){if(f&128){ce(l,d,n,r,i,a,o,s,c);return}if(f&256){se(l,d,n,r,i,a,o,s,c);return}}m&8?(u&16&&fe(l,i,a),d!==l&&p(n,d)):u&16?m&16?ce(l,d,n,r,i,a,o,s,c):fe(l,i,a,!0):(u&8&&p(n,``),m&16&&O(d,n,r,i,a,o,s,c))},se=(e,t,r,i,a,o,s,c,l)=>{e||=n,t||=n;let u=e.length,d=t.length,f=Math.min(u,d),p=0;for(;pd?fe(e,a,o,!0,!1,f):O(t,r,i,a,o,s,c,l,f)},ce=(e,t,r,i,a,o,s,c,l)=>{let u=0,d=t.length,f=e.length-1,p=d-1;for(;u<=f&&u<=p;){let n=e[u],i=t[u]=l?ha(t[u]):ma(t[u]);if(sa(n,i))v(n,i,r,null,a,o,s,c,l);else break;u++}for(;u<=f&&u<=p;){let n=e[f],i=t[p]=l?ha(t[p]):ma(t[p]);if(sa(n,i))v(n,i,r,null,a,o,s,c,l);else break;f--,p--}if(u>f){if(u<=p){let e=p+1,n=ep)for(;u<=f;)P(e[u],a,o,!0),u++;else{let m=u,h=u,g=new Map;for(u=h;u<=p;u++){let e=t[u]=l?ha(t[u]):ma(t[u]);e.key!=null&&g.set(e.key,u)}let _,y=0,b=p-h+1,x=!1,S=0,C=Array(b);for(u=0;u=b){P(n,a,o,!0);continue}let i;if(n.key!=null)i=g.get(n.key);else for(_=h;_<=p;_++)if(C[_-h]===0&&sa(n,t[_])){i=_;break}i===void 0?P(n,a,o,!0):(C[i-h]=u+1,i>=S?S=i:x=!0,v(n,t[i],r,null,a,o,s,c,l),y++)}let w=x?Wi(C):n;for(_=w.length-1,u=b-1;u>=0;u--){let e=h+u,n=t[e],f=t[e+1],p=e+1{let{el:a,type:c,transition:l,children:u,shapeFlag:d}=e;if(d&6){le(e.component.subTree,t,n,r);return}if(d&128){e.suspense.move(t,n,r);return}if(d&64){c.move(e,t,n,he);return}if(c===G){o(a,t,n);for(let e=0;el.enter(a),i));else{let{leave:r,delayLeave:i,afterLeave:c}=l,u=()=>{e.ctx.isUnmounted?s(a):o(a,t,n)},d=()=>{let e=a._isLeaving||!!a[Kn];a._isLeaving&&a[Kn](!0),l.persisted&&!e?u():r(a,()=>{u(),c&&c()})};i?i(a,u,d):d()}}else o(a,t,n)},P=(e,t,n,r=!1,i=!1)=>{let{type:a,props:o,ref:s,children:c,dynamicChildren:l,shapeFlag:u,patchFlag:d,dirs:f,cacheIndex:p,memo:m}=e;if(d===-2&&(i=!1),s!=null&&(Re(),dr(s,null,n,e,!0),ze()),p!=null&&(t.renderCache[p]=void 0),u&256){t.ctx.deactivate(e);return}let h=u&1&&f,g=!pr(e),_;if(g&&(_=o&&o.onVnodeBeforeUnmount)&&va(_,t,e),u&6)de(e.component,n,r);else{if(u&128){e.suspense.unmount(n,r);return}h&&Cn(e,null,t,`beforeUnmount`),u&64?e.type.remove(e,t,n,he,r):l&&!l.hasOnce&&(a!==G||d>0&&d&64)?fe(l,t,n,!1,!0):(a===G&&d&384||!i&&u&16)&&fe(c,t,n),r&&F(e)}let v=m!=null&&p==null;(g&&(_=o&&o.onVnodeUnmounted)||h||v)&&Li(()=>{_&&va(_,t,e),h&&Cn(e,null,t,`unmounted`),v&&(e.el=null)},n)},F=e=>{let{type:t,el:n,anchor:r,transition:i}=e;if(t===G){ue(n,r);return}if(t===Qi){C(e);return}let a=()=>{s(n),i&&!i.persisted&&i.afterLeave&&i.afterLeave()};if(e.shapeFlag&1&&i&&!i.persisted){let{leave:t,delayLeave:r}=i,o=()=>t(n,a);r?r(e.el,a,o):o()}else a()},ue=(e,t)=>{let n;for(;e!==t;)n=h(e),s(e),e=n;s(t)},de=(e,t,n)=>{let{bum:r,scope:i,job:a,subTree:o,um:s,m:c,a:l}=e;Ki(c),Ki(l),r&&te(r),i.stop(),a&&(a.flags|=8,P(o,e,t,n)),s&&Li(s,t),Li(()=>{e.isUnmounted=!0},t)},fe=(e,t,n,r=!1,i=!1,a=0)=>{for(let o=a;o{if(e.shapeFlag&6)return I(e.component.subTree);if(e.shapeFlag&128)return e.suspense.next();let t=h(e.anchor||e.el),n=t&&t[Nn];return n?h(n):t},pe=!1,me=(e,t,n)=>{let r;e==null?t._vnode&&(P(t._vnode,null,null,!0),r=t._vnode.component):v(t._vnode||null,e,t,null,null,null,n),t._vnode=e,pe||=(pe=!0,hn(r),gn(),!1)},he={p:v,um:P,m:le,r:F,mt:ne,mc:O,pc:oe,pbc:A,n:I,o:e},ge,L;return i&&([ge,L]=i(he)),{render:me,hydrate:ge,createApp:ai(me,ge)}}function Bi({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 Vi({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Hi(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Ui(e,t,n=!1){let r=e.children,i=t.children;if(d(r)&&d(i))for(let e=0;e>1,e[n[s]]0&&(t[r]=n[a-1]),n[a]=r)}}for(a=n.length,o=n[a-1];a-->0;)n[a]=o,o=t[o];return n}function Gi(e){let t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Gi(t)}function Ki(e){if(e)for(let t=0;te.__isSuspense;function Yi(e,t){t&&t.pendingBranch?d(e)?t.effects.push(...e):t.effects.push(e):mn(e)}var G=Symbol.for(`v-fgt`),Xi=Symbol.for(`v-txt`),Zi=Symbol.for(`v-cmt`),Qi=Symbol.for(`v-stc`),$i=[],ea=null;function K(e=!1){$i.push(ea=e?null:[])}function ta(){$i.pop(),ea=$i[$i.length-1]||null}var na=1;function ra(e,t=!1){na+=e,e<0&&ea&&t&&(ea.hasOnce=!0)}function ia(e){return e.dynamicChildren=na>0?ea||n:null,ta(),na>0&&ea&&ea.push(e),e}function q(e,t,n,r,i,a){return ia(J(e,t,n,r,i,a,!0))}function aa(e,t,n,r,i){return ia(Y(e,t,n,r,i,!0))}function oa(e){return e?e.__v_isVNode===!0:!1}function sa(e,t){return e.type===t.type&&e.key===t.key}var ca=({key:e})=>e??null,la=({ref:e,ref_key:t,ref_for:n})=>(typeof e==`number`&&(e=``+e),e==null?null:g(e)||Vt(e)||h(e)?{i:yn,r:e,k:t,f:!!n}:e);function J(e,t=null,n=null,r=0,i=null,a=e===G?0:1,o=!1,s=!1){let c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&ca(t),ref:t&&la(t),scopeId:bn,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:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:yn};return s?(ga(c,n),a&128&&e.normalize(c)):n&&(c.shapeFlag|=g(n)?8:16),na>0&&!o&&ea&&(c.patchFlag>0||a&6)&&c.patchFlag!==32&&ea.push(c),c}var Y=ua;function ua(e,t=null,n=null,r=0,i=null,a=!1){if((!e||e===Mr)&&(e=Zi),oa(e)){let r=fa(e,t,!0);return n&&ga(r,n),na>0&&!a&&ea&&(r.shapeFlag&6?ea[ea.indexOf(e)]=r:ea.push(r)),r.patchFlag=-2,r}if(Ra(e)&&(e=e.__vccOpts),t){t=da(t);let{class:e,style:n}=t;e&&!g(e)&&(t.class=F(e)),v(n)&&(Lt(n)&&!d(n)&&(n=s({},n)),t.style=oe(n))}let o=g(e)?1:Ji(e)?128:Pn(e)?64:v(e)?4:h(e)?2:0;return J(e,t,n,r,i,o,a,!0)}function da(e){return e?Lt(e)||xi(e)?s({},e):e:null}function fa(e,t,n=!1,r=!1){let{props:i,ref:a,patchFlag:o,children:s,transition:c}=e,l=t?_a(i||{},t):i,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&ca(l),ref:t&&t.ref?n&&a?d(a)?a.concat(la(t)):[a,la(t)]:la(t):a,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==G?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&fa(e.ssContent),ssFallback:e.ssFallback&&fa(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&r&&ar(u,c.clone(u)),u}function X(e=` `,t=0){return Y(Xi,null,e,t)}function pa(e,t){let n=Y(Qi,null,e);return n.staticCount=t,n}function Z(e=``,t=!1){return t?(K(),aa(Zi,null,e)):Y(Zi,null,e)}function ma(e){return e==null||typeof e==`boolean`?Y(Zi):d(e)?Y(G,null,e.slice()):oa(e)?ha(e):Y(Xi,null,String(e))}function ha(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:fa(e)}function ga(e,t){let n=0,{shapeFlag:r}=e;if(t==null)t=null;else if(d(t))n=16;else if(typeof t==`object`){if(r&65){let n=t.default;n&&(n._c&&(n._d=!1),ga(e,n()),n._c&&(n._d=!0));return}{n=32;let r=t._;!r&&!xi(t)?t._ctx=yn:r===3&&yn&&(yn.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}}else if(h(t)){if(r&65){ga(e,{default:t});return}t={default:t,_ctx:yn},n=32}else t=String(t),r&64?(n=16,t=[X(t)]):n=8;e.children=t,e.shapeFlag|=n}function _a(...e){let t={};for(let n=0;nSa||yn,wa,Ta;{let e=ae(),t=(t,n)=>{let r;return(r=e[t])||(r=e[t]=[]),r.push(n),e=>{r.length>1?r.forEach(t=>t(e)):r[0](e)}};wa=t(`__VUE_INSTANCE_SETTERS__`,e=>Sa=e),Ta=t(`__VUE_SSR_SETTERS__`,e=>ka=e)}var Ea=e=>{let t=Sa;return wa(e),e.scope.on(),()=>{e.scope.off(),wa(t)}},Da=()=>{Sa&&Sa.scope.off(),wa(null)};function Oa(e){return e.vnode.shapeFlag&4}var ka=!1;function Aa(e,t=!1,n=!1){t&&Ta(t);let{props:r,children:i}=e.vnode,a=Oa(e);Si(e,r,a,t),Fi(e,i,n||t);let o=a?ja(e,t):void 0;return t&&Ta(!1),o}function ja(e,t){let n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Br);let{setup:r}=n;if(r){Re();let n=e.setupContext=r.length>1?Fa(e):null,i=Ea(e),a=H(r,e,0,[e.props,n]),o=y(a);if(ze(),i(),(o||e.sp)&&!pr(e)&&cr(e),o){if(a.then(Da,Da),t)return a.then(n=>{Ta(!0);try{Ma(e,n,t)}finally{Ta(!1)}}).catch(t=>{en(t,e,0)});e.asyncDep=a}else Ma(e,a,t)}else Na(e,t)}function Ma(e,t,n){h(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:v(t)&&(e.setupState=Gt(t)),Na(e,n)}function Na(e,t,n){let i=e.type;e.render||=i.render||r;{let t=Ea(e);Re();try{Ur(e)}finally{ze(),t()}}}var Pa={get(e,t){return Ye(e,`get`,``),e[t]}};function Fa(e){return{attrs:new Proxy(e.attrs,Pa),slots:e.slots,emit:e.emit,expose:t=>{e.exposed=t||{}}}}function Ia(e){return e.exposed?e.exposeProxy||=new Proxy(Gt(Rt(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Rr)return Rr[n](e)},has(e,t){return t in e||t in Rr}}):e.proxy}function La(e,t=!0){return h(e)?e.displayName||e.name:e.name||t&&e.__name}function Ra(e){return h(e)&&`__vccOpts`in e}var Q=(e,t)=>qt(e,t,ka);function za(e,t,n){try{ra(-1);let r=arguments.length;return r===2?v(t)&&!d(t)?oa(t)?Y(e,null,[t]):Y(e,t):Y(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&oa(n)&&(n=[n]),Y(e,t,n))}finally{ra(1)}}var Ba=`3.5.42`,Va=void 0,Ha=typeof window<`u`&&window.trustedTypes;if(Ha)try{Va=Ha.createPolicy(`vue`,{createHTML:e=>e})}catch{}var Ua=Va?e=>Va.createHTML(e):e=>e,Wa=`http://www.w3.org/2000/svg`,Ga=`http://www.w3.org/1998/Math/MathML`,Ka=typeof document<`u`?document:null,qa=Ka&&Ka.createElement(`template`),Ja={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{let i=t===`svg`?Ka.createElementNS(Wa,e):t===`mathml`?Ka.createElementNS(Ga,e):n?Ka.createElement(e,{is:n}):Ka.createElement(e);return e===`select`&&r&&r.multiple!=null&&i.setAttribute(`multiple`,r.multiple),i},createText:e=>Ka.createTextNode(e),createComment:e=>Ka.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Ka.querySelector(e),setScopeId(e,t){e.setAttribute(t,``)},insertStaticContent(e,t,n,r,i,a){let o=n?n.previousSibling:t.lastChild;if(i&&(i===a||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),i!==a&&(i=i.nextSibling););else{qa.innerHTML=Ua(r===`svg`?`${e}`:r===`mathml`?`${e}`:e);let i=qa.content;if(r===`svg`||r===`mathml`){let e=i.firstChild;for(;e.firstChild;)i.appendChild(e.firstChild);i.removeChild(e)}t.insertBefore(i,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Ya=`transition`,Xa=`animation`,Za=Symbol(`_vtc`),Qa={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},$a=s({},Xn,Qa),eo=(e=>(e.displayName=`Transition`,e.props=$a,e))((e,{slots:t})=>za(er,ro(e),t)),to=(e,t=[])=>{d(e)?e.forEach(e=>e(...t)):e&&e(...t)},no=e=>e?d(e)?e.some(e=>e.length>1):e.length>1:!1;function ro(e){let t={};for(let n in e)n in Qa||(t[n]=e[n]);if(e.css===!1)return t;let{name:n=`v`,type:r,duration:i,enterFromClass:a=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:c=`${n}-enter-to`,appearFromClass:l=a,appearActiveClass:u=o,appearToClass:d=c,leaveFromClass:f=`${n}-leave-from`,leaveActiveClass:p=`${n}-leave-active`,leaveToClass:m=`${n}-leave-to`}=e,h=io(i),g=h&&h[0],_=h&&h[1],{onBeforeEnter:v,onEnter:y,onEnterCancelled:b,onLeave:x,onLeaveCancelled:S,onBeforeAppear:C=v,onAppear:w=y,onAppearCancelled:T=b}=t,E=(e,t,n,r)=>{e._enterCancelled=r,so(e,t?d:c),so(e,t?u:o),n&&n()},D=(e,t)=>{e._isLeaving=!1,so(e,f),so(e,m),so(e,p),t&&t()},O=e=>(t,n)=>{let i=e?w:y,o=()=>E(t,e,n);to(i,[t,o]),co(()=>{so(t,e?l:a),oo(t,e?d:c),no(i)||uo(t,r,g,o)})};return s(t,{onBeforeEnter(e){to(v,[e]),oo(e,a),oo(e,o)},onBeforeAppear(e){to(C,[e]),oo(e,l),oo(e,u)},onEnter:O(!1),onAppear:O(!0),onLeave(e,t){e._isLeaving=!0;let n=()=>D(e,t);oo(e,f),e._enterCancelled?(oo(e,p),ho(e)):(ho(e),oo(e,p)),co(()=>{e._isLeaving&&(so(e,f),oo(e,m),no(x)||uo(e,r,_,n))}),to(x,[e,n])},onEnterCancelled(e){E(e,!1,void 0,!0),to(b,[e])},onAppearCancelled(e){E(e,!0,void 0,!0),to(T,[e])},onLeaveCancelled(e){D(e),to(S,[e])}})}function io(e){if(e==null)return null;if(v(e))return[ao(e.enter),ao(e.leave)];{let t=ao(e);return[t,t]}}function ao(e){return ie(e)}function oo(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.add(t)),(e[Za]||(e[Za]=new Set)).add(t)}function so(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.remove(t));let n=e[Za];n&&(n.delete(t),n.size||(e[Za]=void 0))}function co(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}var lo=0;function uo(e,t,n,r){let i=e._endId=++lo,a=()=>{i===e._endId&&r()};if(n!=null)return setTimeout(a,n);let{type:o,timeout:s,propCount:c}=fo(e,t);if(!o)return r();let l=o+`end`,u=0,d=()=>{e.removeEventListener(l,f),a()},f=t=>{t.target===e&&++u>=c&&d()};setTimeout(()=>{u(n[e]||``).split(`, `),i=r(`${Ya}Delay`),a=r(`${Ya}Duration`),o=po(i,a),s=r(`${Xa}Delay`),c=r(`${Xa}Duration`),l=po(s,c),u=null,d=0,f=0;t===Ya?o>0&&(u=Ya,d=o,f=a.length):t===Xa?l>0&&(u=Xa,d=l,f=c.length):(d=Math.max(o,l),u=d>0?o>l?Ya:Xa:null,f=u?u===Ya?a.length:c.length:0);let p=u===Ya&&/\b(?:transform|all)(?:,|$)/.test(r(`${Ya}Property`).toString());return{type:u,timeout:d,propCount:f,hasTransform:p}}function po(e,t){for(;e.lengthmo(t)+mo(e[n])))}function mo(e){return e===`auto`?0:Number(e.slice(0,-1).replace(`,`,`.`))*1e3}function ho(e){return(e?e.ownerDocument:document).body.offsetHeight}function go(e,t,n){let r=e[Za];r&&(t=(t?[t,...r]:[...r]).join(` `)),t==null?e.removeAttribute(`class`):n?e.setAttribute(`class`,t):e.className=t}var _o=Symbol(`_vod`),vo=Symbol(`_vsh`),yo={name:`show`,beforeMount(e,{value:t},{transition:n}){e[_o]=e.style.display===`none`?``:e.style.display,n&&t?n.beforeEnter(e):bo(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),bo(e,!0),r.enter(e)):r.leave(e,()=>{bo(e,!1)}):bo(e,t))},beforeUnmount(e,{value:t}){bo(e,t)}};function bo(e,t){e.style.display=t?e[_o]:`none`,e[vo]=!t}var xo=Symbol(``),So=/(?:^|;)\s*display\s*:/;function Co(e,t,n){let r=e.style,i=g(n),a=!1;if(n&&!i){if(t){if(g(t))for(let e of t.split(`;`)){let t=e.slice(0,e.indexOf(`:`)).trim();n[t]??To(r,t,``)}else for(let e in t)n[e]??To(r,e,``)}for(let i in n){i===`display`&&(a=!0);let o=n[i];o==null?To(r,i,``):ko(e,i,!g(t)&&t?t[i]:void 0,o)||To(r,i,o)}}else if(i){if(t!==n){let e=r[xo];e&&(n+=`;`+e),r.cssText=n,a=So.test(n)}}else t&&e.removeAttribute(`style`);_o in e&&(e[_o]=a?r.display:``,e[vo]&&(r.display=`none`))}var wo=/\s*!important$/;function To(e,t,n){if(d(n))n.forEach(n=>To(e,t,n));else if(n??=``,t.startsWith(`--`))wo.test(n)?e.setProperty(t,n.replace(wo,``),`important`):e.setProperty(t,n);else{let r=Oo(e,t);wo.test(n)?e.setProperty(A(r),n.replace(wo,``),`important`):e[r]=n}}var Eo=[`Webkit`,`Moz`,`ms`],Do={};function Oo(e,t){let n=Do[t];if(n)return n;let r=O(t);if(r!==`filter`&&r in e)return Do[t]=r;r=j(r);for(let n=0;nBo||=(Vo.then(()=>Bo=0),Date.now());function Uo(e,t){let n=e=>{if(!e._vts)e._vts=Date.now();else if(e._vts<=n.attached)return;let r=n.value;if(d(r)){let n=e.stopImmediatePropagation;e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0};let i=r.slice(),a=[e];for(let n=0;ne.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Go=(e,t,n,r,i,s)=>{let c=i===`svg`;t===`class`?go(e,r,c):t===`style`?Co(e,n,r):a(t)?o(t)||Io(e,t,n,r,s):(t[0]===`.`?(t=t.slice(1),1):t[0]===`^`?(t=t.slice(1),0):Ko(e,t,r,c))?(Mo(e,t,r),!e.tagName.includes(`-`)&&(t===`value`||t===`checked`||t===`selected`)&&jo(e,t,r,c,s,t!==`value`)):e._isVueCE&&(qo(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!g(r)))?Mo(e,O(t),r,s,t):(t===`true-value`?e._trueValue=r:t===`false-value`&&(e._falseValue=r),jo(e,t,r,c))};function Ko(e,t,n,r){if(r)return!!(t===`innerHTML`||t===`textContent`||t in e&&Wo(t)&&h(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`){let t=e.tagName;if(t===`IMG`||t===`VIDEO`||t===`CANVAS`||t===`SOURCE`)return!1}return Wo(t)&&g(n)?!1:t in e}function qo(e,t){let n=e._def.props;if(!n)return!1;let r=O(t);return Array.isArray(n)?n.some(e=>O(e)===r):Object.keys(n).some(e=>O(e)===r)}var Jo=e=>{let t=e.props[`onUpdate:modelValue`]||!1;return d(t)?e=>te(t,e):t};function Yo(e){e.target.composing=!0}function Xo(e){let t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event(`input`)))}var Zo=Symbol(`_assign`),Qo=Symbol(`_initialValue`);function $o(e,t,n){return t&&(e=e.trim()),n&&(e=re(e)),e}var es={created(e,{modifiers:{lazy:t,trim:n,number:r}},i){e.parentNode&&(e.type===`text`?e[Qo]=e.defaultValue.replace(/[\r\n]/g,``):e.type===`textarea`&&(e[Qo]=e.defaultValue.replace(/\r\n?/g,` `))),e[Zo]=Jo(i);let a=r||i.props&&i.props.type===`number`;No(e,t?`change`:`input`,t=>{t.target.composing||e[Zo]($o(e.value,n,a))}),(n||a)&&No(e,`change`,()=>{e.value=$o(e.value,n,a)}),t||(No(e,`compositionstart`,Yo),No(e,`compositionend`,Xo),No(e,`change`,Xo))},mounted(e,{value:t,modifiers:{trim:n,number:r}}){let i=t??``,a=e[Qo];delete e[Qo],a!==void 0&&(e.type===`text`||e.type===`textarea`)&&e.value!==a?e[Zo]($o(e.value,n,r)):e.value=i},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:i,number:a}},o){if(e[Zo]=Jo(o),e.composing)return;let s=(a||e.type===`number`)&&!/^0\d/.test(e.value)?re(e.value):e.value,c=t??``;if(s===c)return;let l=e.getRootNode();(l instanceof Document||l instanceof ShadowRoot)&&l.activeElement===e&&e.type!==`range`&&(r&&t===n||i&&e.value.trim()===c)||(e.value=c)}},ts={deep:!0,created(e,t,n){e[Zo]=Jo(n),No(e,`change`,()=>{let t=e._modelValue,n=os(e),r=e.checked,i=e[Zo];if(d(t)){let e=he(t,n),a=e!==-1;if(r&&!a)i(t.concat(n));else if(!r&&a){let n=[...t];n.splice(e,1),i(n)}}else if(p(t)){let e=new Set(t);r?e.add(n):e.delete(n),i(e)}else i(ss(e,r))})},mounted:ns,beforeUpdate(e,t,n){e[Zo]=Jo(n),ns(e,t,n)}};function ns(e,{value:t,oldValue:n},r){e._modelValue=t;let i;if(d(t))i=he(t,r.props.value)>-1;else if(p(t))i=t.has(r.props.value);else{if(t===n)return;i=me(t,ss(e,!0))}e.checked!==i&&(e.checked=i)}var rs={deep:!0,created(e,{value:t,modifiers:{number:n}},r){e._modelValue=t,No(e,`change`,()=>{let t=Array.prototype.filter.call(e.options,e=>e.selected).map(e=>n?re(os(e)):os(e)),r=e.multiple,i=r?p(e._modelValue)?new Set(t):t:t[0],a=e._pendingValue=[r,r?d(i)?t.slice():t:i];try{e[Zo](i)}finally{un(()=>{e._pendingValue===a&&(e._pendingValue=void 0)})}}),e[Zo]=Jo(r)},mounted(e,{value:t}){as(e,t)},beforeUpdate(e,{value:t},n){e._modelValue=t,e[Zo]=Jo(n)},updated(e,{value:t}){let n=e._pendingValue;e._pendingValue=void 0,(!n||n[0]!==e.multiple||!is(t,n[1],n[0]))&&as(e,t)}};function is(e,t,n){if(!n||d(e))return me(e,t);if(p(e)){if(e.size!==t.length)return!1;for(let n of t)if(!e.has(n))return!1;return!0}return!1}function as(e,t){let n=e.multiple,r=d(t);if(!n||r||p(t)){for(let i=0,a=e.options.length;iString(e)===String(o)):he(t,o)>-1}else a.selected=t.has(o)}else if(me(os(a),t)){e.selectedIndex!==i&&(e.selectedIndex=i);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function os(e){return`_value`in e?e._value:e.value}function ss(e,t){let n=t?`_trueValue`:`_falseValue`;return n in e?e[n]:t}var cs=[`ctrl`,`shift`,`alt`,`meta`],ls={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)=>cs.some(n=>e[`${n}Key`]&&!t.includes(n))},$=(e,t)=>{if(!e)return e;let n=e._withMods||={},r=t.join(`.`);return n[r]||(n[r]=((n,...r)=>{for(let e=0;e{let n=e._withKeys||={},r=t.join(`.`);return n[r]||(n[r]=(n=>{if(!(`key`in n))return;let r=A(n.key);if(t.some(e=>e===r||us[e]===r))return e(n)}))},fs=s({patchProp:Go},Ja),ps;function ms(){return ps||=Ri(fs)}var hs=((...e)=>{let t=ms().createApp(...e),{mount:n}=t;return t.mount=e=>{let r=_s(e);if(!r)return;let i=t._component;!h(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent=``);let a=n(r,!1,gs(r));return r instanceof Element&&(r.removeAttribute(`v-cloak`),r.setAttribute(`data-v-app`,``)),a},t});function gs(e){if(e instanceof SVGElement)return`svg`;if(typeof MathMLElement==`function`&&e instanceof MathMLElement)return`mathml`}function _s(e){return g(e)?document.querySelector(e):e}var vs=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),ys={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`},bs=({size:e,strokeWidth:t=2,absoluteStrokeWidth:n,color:r,iconNode:i,name:a,class:o,...s},{slots:c})=>za(`svg`,{...ys,width:e||ys.width,height:e||ys.height,stroke:r||ys.stroke,"stroke-width":n?Number(t)*24/Number(e):t,class:[`lucide`,`lucide-${vs(a??`icon`)}`],...s},[...i.map(e=>za(...e)),...c.default?[c.default()]:[]]),xs=(e,t)=>(n,{slots:r})=>za(bs,{...n,iconNode:t,name:e},r),Ss=xs(`ActivityIcon`,[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]),Cs=xs(`ArchiveRestoreIcon`,[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h2`,key:`tvwodi`}],[`path`,{d:`M20 8v11a2 2 0 0 1-2 2h-2`,key:`1gkqxj`}],[`path`,{d:`m9 15 3-3 3 3`,key:`1pd0qc`}],[`path`,{d:`M12 12v9`,key:`192myk`}]]),ws=xs(`ArchiveIcon`,[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8`,key:`1s80jp`}],[`path`,{d:`M10 12h4`,key:`a56b0p`}]]),Ts=xs(`CalendarDaysIcon`,[[`path`,{d:`M8 2v4`,key:`1cmpym`}],[`path`,{d:`M16 2v4`,key:`4m81vk`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`4`,rx:`2`,key:`1hopcy`}],[`path`,{d:`M3 10h18`,key:`8toen8`}],[`path`,{d:`M8 14h.01`,key:`6423bh`}],[`path`,{d:`M12 14h.01`,key:`1etili`}],[`path`,{d:`M16 14h.01`,key:`1gbofw`}],[`path`,{d:`M8 18h.01`,key:`lrp35t`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}],[`path`,{d:`M16 18h.01`,key:`kzsmim`}]]),Es=xs(`CalendarHeartIcon`,[[`path`,{d:`M3 10h18V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h7`,key:`136lmk`}],[`path`,{d:`M8 2v4`,key:`1cmpym`}],[`path`,{d:`M16 2v4`,key:`4m81vk`}],[`path`,{d:`M21.29 14.7a2.43 2.43 0 0 0-2.65-.52c-.3.12-.57.3-.8.53l-.34.34-.35-.34a2.43 2.43 0 0 0-2.65-.53c-.3.12-.56.3-.79.53-.95.94-1 2.53.2 3.74L17.5 22l3.6-3.55c1.2-1.21 1.14-2.8.19-3.74Z`,key:`1t7hil`}]]),Ds=xs(`CheckIcon`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),Os=xs(`ChevronDownIcon`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),ks=xs(`ChevronLeftIcon`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),As=xs(`ChevronRightIcon`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),js=xs(`DownloadIcon`,[[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`polyline`,{points:`7 10 12 15 17 10`,key:`2ggqvy`}],[`line`,{x1:`12`,x2:`12`,y1:`15`,y2:`3`,key:`1vk2je`}]]),Ms=xs(`EllipsisIcon`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]]),Ns=xs(`FileJsonIcon`,[[`path`,{d:`M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z`,key:`1rqfz7`}],[`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`,key:`tnqrlb`}],[`path`,{d:`M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1`,key:`1oajmo`}],[`path`,{d:`M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1`,key:`mpwhp6`}]]),Ps=xs(`FolderIcon`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),Fs=xs(`GripVerticalIcon`,[[`circle`,{cx:`9`,cy:`12`,r:`1`,key:`1vctgf`}],[`circle`,{cx:`9`,cy:`5`,r:`1`,key:`hp0tcf`}],[`circle`,{cx:`9`,cy:`19`,r:`1`,key:`fkjjf6`}],[`circle`,{cx:`15`,cy:`12`,r:`1`,key:`1tmaij`}],[`circle`,{cx:`15`,cy:`5`,r:`1`,key:`19l28e`}],[`circle`,{cx:`15`,cy:`19`,r:`1`,key:`f4zoj3`}]]),Is=xs(`InboxIcon`,[[`polyline`,{points:`22 12 16 12 14 15 10 15 8 12 2 12`,key:`o97t9d`}],[`path`,{d:`M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z`,key:`oot6mr`}]]),Ls=xs(`ListChecksIcon`,[[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`path`,{d:`m3 7 2 2 4-4`,key:`1obspn`}],[`path`,{d:`M13 6h8`,key:`15sg57`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 18h8`,key:`oe0vm4`}]]),Rs=xs(`ListTodoIcon`,[[`rect`,{x:`3`,y:`5`,width:`6`,height:`6`,rx:`1`,key:`1defrl`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`path`,{d:`M13 6h8`,key:`15sg57`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 18h8`,key:`oe0vm4`}]]),zs=xs(`LogOutIcon`,[[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}],[`polyline`,{points:`16 17 21 12 16 7`,key:`1gabdz`}],[`line`,{x1:`21`,x2:`9`,y1:`12`,y2:`12`,key:`1uyos4`}]]),Bs=xs(`MenuIcon`,[[`line`,{x1:`4`,x2:`20`,y1:`12`,y2:`12`,key:`1e0a9i`}],[`line`,{x1:`4`,x2:`20`,y1:`6`,y2:`6`,key:`1owob3`}],[`line`,{x1:`4`,x2:`20`,y1:`18`,y2:`18`,key:`yk5zj1`}]]),Vs=xs(`PencilIcon`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]),Hs=xs(`PinIcon`,[[`path`,{d:`M12 17v5`,key:`bb1du9`}],[`path`,{d:`M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z`,key:`1nkz8b`}]]),Us=xs(`PlusIcon`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),Ws=xs(`RefreshCwIcon`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),Gs=xs(`Repeat2Icon`,[[`path`,{d:`m2 9 3-3 3 3`,key:`1ltn5i`}],[`path`,{d:`M13 18H7a2 2 0 0 1-2-2V6`,key:`1r6tfw`}],[`path`,{d:`m22 15-3 3-3-3`,key:`4rnwn2`}],[`path`,{d:`M11 6h6a2 2 0 0 1 2 2v10`,key:`2f72bc`}]]),Ks=xs(`SearchIcon`,[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`path`,{d:`m21 21-4.3-4.3`,key:`1qie3q`}]]),qs=xs(`SettingsIcon`,[[`path`,{d:`M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z`,key:`1qme2f`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),Js=xs(`Trash2Icon`,[[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6`,key:`4alrt4`}],[`path`,{d:`M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2`,key:`v07s0e`}],[`line`,{x1:`10`,x2:`10`,y1:`11`,y2:`17`,key:`1uufr5`}],[`line`,{x1:`14`,x2:`14`,y1:`11`,y2:`17`,key:`xtxkd`}]]),Ys=xs(`XIcon`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),Xs=e=>e.replace(/&/g,`&`).replace(//g,`>`).replace(/"/g,`"`).replace(/'/g,`'`),Zs=e=>{let t=Xs(e);return t=t.replace(/`([^`]+)`/g,`$1`),t=t.replace(/\*\*([^*]+)\*\*/g,`$1`),t=t.replace(/\*([^*]+)\*/g,`$1`),t=t.replace(/\[([^\]]+)\]\((https?:\/\/[^\s)]+)\)/g,`$1`),t};function Qs(e=``){let t=e.replace(/\r\n/g,` `).split(` -`),n=[],r=!1,i=()=>{r&&=(n.push(``),!1)};for(let e of t){let t=e.trimEnd();if(!t.trim()){i();continue}t.startsWith(`# `)?(i(),n.push(`

${Zs(t.slice(2))}

`)):t.startsWith(`## `)?(i(),n.push(`

${Zs(t.slice(3))}

`)):/^[-*] /.test(t)?(r||=(n.push(`
    `),!0),n.push(`
  • ${Zs(t.slice(2))}
  • `)):(i(),n.push(`

    ${Zs(t)}

    `))}return i(),n.join(``)}function $s(e,t){let n=t.trim().toLowerCase();return n?e.filter(e=>[e.title,e.description??``,e.list_name??``].join(` `).toLowerCase().includes(n)):e}function ec(e){let t=new Map;for(let n of e)n.parent_id&&t.set(n.parent_id,[...t.get(n.parent_id)??[],n]);return e.filter(e=>!e.parent_id).map(e=>({task:e,subtasks:t.get(e.id)??e.subtasks??[]}))}function tc(e,t){if(!!e.completed!=!!t.completed)return!1;if(!e.due_at&&!t.due_at)return!0;if(!e.due_at||!t.due_at)return!1;let n=Date.parse(e.due_at),r=Date.parse(t.due_at);return Number.isFinite(n)&&Number.isFinite(r)&&n===r}function nc(e,t,n,r){if(t===n)return e;let i=e.find(e=>e.id===t),a=e.find(e=>e.id===n);if(!i||!a||(i.parent_id??null)!==(a.parent_id??null))return e;let o=e.filter(e=>(e.parent_id??null)===(i.parent_id??null)),s=o.findIndex(e=>e.id===t),c=o.findIndex(e=>e.id===n),l=o.filter(e=>e.id!==t),u=l.findIndex(e=>e.id===n);if(l.splice(u+ +(r===`after`),0,i),s===c||l.every((e,t)=>e.id===o[t]?.id))return e;let d=l[Symbol.iterator]();return e.map(e=>(e.parent_id??null)===(i.parent_id??null)?d.next().value:e)}function rc(e){let t=Math.floor(Number(e.interval));if(!Number.isFinite(t)||t<1)throw Error(`重复间隔至少为 1`);if(e.frequency===`weekly`&&!e.weekdays?.length)throw Error(`至少选择一个重复日期`);if(e.frequency===`monthly`&&(!e.monthDays?.length||e.monthDays.some(e=>e<1||e>31)))throw Error(`请输入 1 到 31 的每月日期`);if(e.endMode===`count`&&(!e.count||e.count<1))throw Error(`重复次数至少为 1`);if(e.endMode===`date`&&!e.until)throw Error(`请选择结束日期`);let n=[`FREQ=${e.frequency.toUpperCase()}`];return t>1&&n.push(`INTERVAL=${t}`),e.frequency===`weekly`&&e.weekdays?.length&&n.push(`BYDAY=${e.weekdays.join(`,`)}`),e.frequency===`monthly`&&e.monthDays?.length&&n.push(`BYMONTHDAY=${e.monthDays.join(`,`)}`),e.endMode===`count`&&n.push(`COUNT=${Math.max(1,Math.floor(e.count??1))}`),e.endMode===`date`&&e.until&&n.push(`UNTIL=${e.until}T23:59:59`),n.join(`;`)}function ic(e=``){let t=Object.fromEntries(e.split(`;`).filter(Boolean).map(e=>e.split(`=`,2)));return{frequency:t.FREQ?.toLowerCase()||`daily`,interval:Math.max(1,Number(t.INTERVAL??1)),weekdays:t.BYDAY?.split(`,`).filter(Boolean)??[],monthDays:t.BYMONTHDAY?.split(`,`).map(Number).filter(Number.isFinite)??[],endMode:t.COUNT?`count`:t.UNTIL?`date`:`never`,count:t.COUNT?Number(t.COUNT):1,until:t.UNTIL?.slice(0,10)??``}}function ac(e,t){if(e===`none`)return{};if(e===`after_completion`){let e=String(t.afterCompletionDays).trim(),n=Number(e);if(!/^\d+$/.test(e)||!Number.isInteger(n)||n<1||n>3650)throw Error(`请输入 1 到 3650 的整数天数`);return{trigger_mode:`after_completion`,after_completion_days:n}}return{trigger_mode:`scheduled`,rrule:e===`custom`?rc(t.repeatConfig??{frequency:`daily`,interval:1,endMode:`never`}):`FREQ=${e.toUpperCase()}`}}function oc(e){if(!e)return{option:`none`,afterCompletionDays:1};if(e.trigger_mode===`after_completion`)return{option:`after_completion`,afterCompletionDays:e.after_completion_days??1};let t=ic(e.rrule??``);return{option:t.interval===1&&!t.weekdays?.length&&!t.monthDays?.length&&t.endMode===`never`?t.frequency:`custom`,afterCompletionDays:1}}function sc(e=new Date){return`${e.getFullYear()}-${`${e.getMonth()+1}`.padStart(2,`0`)}-${`${e.getDate()}`.padStart(2,`0`)}`}function cc(e){if(!e)return``;let t=new Date(e);return Number.isNaN(t.valueOf())?``:`${t.getFullYear()}-${`${t.getMonth()+1}`.padStart(2,`0`)}-${`${t.getDate()}`.padStart(2,`0`)}T${`${t.getHours()}`.padStart(2,`0`)}:${`${t.getMinutes()}`.padStart(2,`0`)}`}function lc(e){return e?new Date(e).toISOString():null}var uc=new Set([`tasks`,`today`,`upcoming`,`trash`,`habits`,`countdowns`,`settings`]);function dc(e,t){try{let n=JSON.parse(e.getItem(t)??`null`);if(n&&uc.has(n.view)&&typeof n.listId==`string`)return{view:n.view,listId:n.listId}}catch{}return{view:vc(),listId:``}}function fc(e,t,n,r){try{e.setItem(t,JSON.stringify({view:n,listId:r}))}catch{}}function pc(e,t,n){try{let n=e.getItem(t);if(n===`true`)return!0;if(n===`false`)return!1}catch{}return n}function mc(e,t,n){try{e.setItem(t,String(n))}catch{}}function hc(e){return`${e.getFullYear()}-${`${e.getMonth()+1}`.padStart(2,`0`)}-${`${e.getDate()}`.padStart(2,`0`)}`}function gc(e){return Array.isArray(e)?{items:e,nextCursor:null}:{items:e.items??[],nextCursor:e.next_cursor??null}}function _c(e){return e===`tasks`||e===`today`||e===`upcoming`}function vc(){return`today`}function yc(e,t,n=1){return e===`numeric`?Number(t??0)>=n:!!t}function bc(e,t){let n=(e.cells??[]).find(e=>e.day===t);return!(!n?.scheduled||n.paused)}function xc(e,t,n=1){let r=Number(t??0);return e===`numeric`?Math.min(r+1,n):r>0?0:1}function Sc(e,t){let n=Number(t??0);return e===`numeric`?Math.max(0,n-1):0}function Cc(e,t,n=1){return yc(e,t,n)?0:xc(e,t,n)}function wc(e,t,n){return e===`numeric`&&Number(t??0)>0&&Number(n)===0?`今日进度已重置`:e!==`numeric`&&Number(t??0)>0&&Number(n)===0?`已取消完成`:Number(n)>Number(t??0)?`已记录一次 🎉`:`已减少一次`}function Tc(e){return e>0?`还有 ${e} 天`:e===0?`就是今天`:`已经 ${Math.abs(e)} 天`}function Ec(e){return{countdown:`倒数日`,anniversary:`纪念日`,birthday:`生日`}[e]??`倒数日`}function Dc(e){return e===`lunar`?`农历`:`公历`}function Oc(e,t){return e>=64&&e>Math.abs(t)*1.5}function kc(e){return Math.max(0,Number(e)||0)+1}function Ac(e,t=1){return Math.max(0,(Number(e)||0)-Math.max(0,t))}async function jc(e,t,n){try{await e()}catch(e){return{mutated:!1,refreshed:!1,error:e}}return t(),{mutated:!0,refreshed:await n()}}function Mc(e,t,n,r,i=52,a=14,o=74){return{x:Math.min(Math.max(e,a),Math.max(a,n-i-a)),y:Math.min(Math.max(t,a),Math.max(a,r-i-o))}}function Nc(e,t,n=8){return Math.hypot(e,t)>=n}var Pc=null,Fc=null,Ic=null,Lc=0,Rc=new Map;function zc(e){let t=(Rc.get(e)??0)+1;return Rc.set(e,t),t}function Bc(e,t){return Rc.get(e)===t}async function Vc(e,t,n){let r=zc(e),i=!1;try{let a=await t();Bc(e,r)&&(n.success(a),i=!0)}catch(t){Bc(e,r)&&n.error(t)}finally{Bc(e,r)&&n.finally()}return i}function Hc(e,t,n){let r=0,i=0,a=null,o=o=>t(o,e())?(r+=1,a||=(async()=>{for(;i{a=null}),a):Promise.resolve();return{async run(n,a,s,c){let l=e(),u;try{u=await n()}catch(e){return s?.(e),!1}if(a(u),t(l,e())){let e=c?.(u);e instanceof Promise&&await e}return await o(l),t(l,e())&&ie());return t().catch(()=>void 0),Promise.all(n)}function Wc(e){return Pc?.week===e?Pc.habits:null}function Gc(e,t){Pc={week:e,habits:t}}function Kc(){Pc=null}async function qc(e){await e.restore(),e.commitRestore();try{return{restored:!0,refreshed:await e.refreshGrid()!==!1}}catch{return{restored:!0,refreshed:!1}}}function Jc(){return Fc?{items:Fc.items,archived:Fc.archived}:null}function Yc(e,t,n=Date.now()){Fc={items:e,archived:t,writtenAt:n}}function Xc(){Lc+=1,Fc=null,Ic=null}function Zc(){return Lc}function Qc(e){return e===Lc}function $c(e,t={}){let n=t.now??Date.now(),r=t.maxAge??3e4;if(!t.force&&Fc&&n-Fc.writtenAt(i===Lc&&Yc(e.items,e.archived,n),e)).finally(()=>{Ic===a&&(Ic=null)});return Ic=a,a}function el(e){let t=e.trim();return{value:t,error:t?``:`名称不能为空,请输入至少一个可见字符。`}}function tl(e){let t={};if(e.name.trim()||(t.name=`请输入习惯名称`),e.kind===`numeric`&&((!Number.isFinite(Number(e.target))||Number(e.target)<=0)&&(t.target=`目标值必须大于 0`),e.max_value!=null&&(!Number.isFinite(Number(e.max_value))||Number(e.max_value)<=0||Number(e.max_value)!Number.isInteger(e)||e<1||e>31)?t.month_days=`请输入 1 到 31 的日期`:new Set(n).size!==n.length&&(t.month_days=`日期不能重复`)}return e.schedule_type===`interval`&&(!Number.isInteger(Number(e.interval_days))||Number(e.interval_days)<1)&&(t.interval_days=`间隔天数至少为 1`),t}function nl(e,t){let n={};for(let r of Object.keys(t)){let i=e[r],a=t[r];JSON.stringify(i)!==JSON.stringify(a)&&(n[r]=a)}return n}function rl(e,t=!1){return t?{writable:!1,reason:`该习惯已归档`}:e?.paused?{writable:!1,reason:`今天已暂停`}:e?.scheduled?{writable:!0,reason:``}:{writable:!1,reason:`今天未安排`}}function il(e,t){return{loading:e===`loading`,error:e===`error`,empty:e===`success`&&t===0,list:e===`success`&&t>0}}function al(e,t={}){let n=sl(e,t);return n===`未知时间`?`归档时间未知`:`归档于 ${n}`}function ol(e){let t=e?.trim()??``,n=`未知设备`;/iPhone/i.test(t)?n=`iPhone`:/iPad/i.test(t)||/Macintosh/i.test(t)&&/Mobile/i.test(t)?n=`iPad`:/Android/i.test(t)&&/Mobile/i.test(t)?n=`Android 手机`:/Android/i.test(t)?n=`Android 平板`:/Windows/i.test(t)?n=`Windows`:/Macintosh|Mac OS X/i.test(t)?n=`Mac`:/Linux/i.test(t)&&(n=`Linux`);let r=`未知浏览器`;return/Edg(?:e|iOS|A)?\//i.test(t)?r=`Edge`:/Chrome\/|CriOS\//i.test(t)?r=`Chrome`:/Firefox\/|FxiOS\//i.test(t)?r=`Firefox`:/Safari\//i.test(t)&&/Version\//i.test(t)&&(r=`Safari`),`${n} · ${r}`}function sl(e,t={}){let n=e?.trim();if(!n)return`未知时间`;let r=/^(\d{4})-(\d{2})-(\d{2})T/.exec(n);if(r){let[,e,t,n]=r,i=new Date(Date.UTC(Number(e),Number(t)-1,Number(n)));if(i.getUTCFullYear()!==Number(e)||i.getUTCMonth()+1!==Number(t)||i.getUTCDate()!==Number(n))return`未知时间`}let i=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(?::\d{2}(?:\.\d{1,9})?)?$/i.test(n),a=new Date(i?`${n}Z`:n);if(Number.isNaN(a.getTime()))return`未知时间`;try{return new Intl.DateTimeFormat(`zh-CN`,{dateStyle:`short`,timeStyle:`short`,...t}).format(a)}catch{return`未知时间`}}var cl={create:`创建`,update:`更新`,complete:`完成`,delete:`删除`,archive:`归档`,restore:`恢复`,move:`移动`,import:`导入`},ll={task:`任务`,list:`清单`,folder:`文件夹`,countdown:`倒数日`,backup:`备份`};function ul(e){return e?cl[e.toLowerCase()]??`其他操作`:`其他操作`}function dl(e){return e?ll[e.toLowerCase()]??`内容`:`内容`}function fl(e){let t=e&&typeof e==`object`&&!Array.isArray(e)&&`detail`in e?e.detail:e,n=typeof t==`string`?t:``;for(let[e,t]of[[`暂停日不可记录正向进度`,`今天已暂停,不能记录进度。`],[`非计划日不可记录正向进度`,`今天未安排该习惯,不能记录进度。`],[`归档习惯不可修改`,`该习惯已归档,不能继续操作。`],[`请先归档再永久删除`,`请先归档该习惯,再永久删除。`]])if(n.includes(e))return t;if(Array.isArray(t)){let e=t.map(e=>e&&typeof e==`object`&&Array.isArray(e.loc)?e.loc.at(-1):``).find(Boolean),n={name:`名称不能为空,请输入至少一个可见字符。`,weekdays:`每周计划至少选择一天,且不能重复。`,month_days:`每月日期必须是 1–31,且不能重复。`,interval_days:`间隔天数至少为 1。`,target:`目标值必须大于 0。`,max_value:`最大值必须大于 0。`};if(typeof e==`string`&&n[e])return n[e]}return pl(t)}function pl(e){if(typeof e==`string`)return e;if(Array.isArray(e))return e.map(e=>{if(e&&typeof e==`object`){let t=e,n=Array.isArray(t.loc)?t.loc.filter(e=>e!==`body`).join(`.`):``,r=typeof t.msg==`string`?t.msg:JSON.stringify(t);return n?`${n}:${r}`:r}return String(e)}).filter(Boolean).join(`;`)||`请求参数有误`;if(e&&typeof e==`object`){let t=e;return`detail`in t?pl(t.detail):JSON.stringify(t)}return`请求失败`}function ml(e){if(e&&![`GET`,`HEAD`,`OPTIONS`].includes(e.toUpperCase())){let e=hl(`dodo_csrf`);if(e)return{"x-csrf-token":e}}return{}}function hl(e){if(typeof document>`u`)return``;let t=e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`),n=document.cookie.match(RegExp(`(?:^|; )${t}=([^;]*)`));return n?decodeURIComponent(n[1]):``}function gl({completing:e,showCompleted:t}){return e&&!t}function _l(e){return e?0:320}function vl(){return window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches??!1}function yl(e=vl()){let t=_l(e);return t?new Promise(e=>window.setTimeout(e,t)):Promise.resolve()}function bl(e,t,n=420){let r=new Map,i=new Map;return a=>{let o=r.get(a);o!==void 0&&window.clearTimeout(o);let s=i.get(a);s!==void 0&&window.cancelAnimationFrame(s),t(a);let c=window.requestAnimationFrame(()=>{i.delete(a),e(a),r.set(a,window.setTimeout(()=>{t(a),r.delete(a)},n))});i.set(a,c)}}function xl(e){return{pointerId:e.pointerId,clientX:e.clientX,clientY:e.clientY,captureTarget:e.currentTarget}}function Sl(e){try{e.captureTarget?.setPointerCapture(e.pointerId)}catch{}}function Cl(e,t,n){return Math.hypot(t.x-e.x,t.y-e.y)>n}function wl(e,t,n){let r=e.find(e=>e.id===t);if(!r||r.is_inbox)return null;let i=e.filter(e=>!e.is_inbox&&e.folder_id===r.folder_id),a=i[i.findIndex(e=>e.id===t)+(n===`up`?-1:1)];return a?{targetId:a.id,placement:n===`up`?`before`:`after`}:null}function Tl(e,t,n,r,i=`after`){let a=e.find(e=>e.id===t);if(!a||a.is_inbox)return{items:e,orderedIds:[]};let o=e.filter(e=>e.id!==t),s={...a,folder_id:n},c=o.filter(e=>!e.is_inbox&&e.folder_id===n),l=r?c.findIndex(e=>e.id===r):-1,u=l<0?c.length:l+ +(i===`after`);c.splice(u,0,s);let d=c[Symbol.iterator](),f=o.map(e=>e.is_inbox||e.folder_id!==n?e:d.next().value),p=[...d];return p.length&&f.push(...p),{items:f,orderedIds:c.map(e=>e.id)}}function El(e){return Math.min(72,Math.max(0,e))}function Dl(e){return e>=56}function Ol(...e){return e.every(e=>e<=0)}function kl(e,t){return!t.trim()&&e<=-36}function Al(e){return(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`k`}function jl(e,t,n){return t<2?null:n&&e===0?t-1:!n&&e===t-1?0:null}function Ml(e,t,n,r,i,a=6,o=8){let s=Math.min(Math.max(o,e.right-t),r-t-o),c=e.bottom+a,l=c+n<=i-o?c:e.top-n-a,u=Math.max(o,i-n-o);return{left:s,top:Math.min(Math.max(o,l),u)}}function Nl(e,t){return e?.isConnected?e:t}var Pl={key:0,class:`inline-error`},Fl={key:0,class:`view-intro`},Il={key:1,class:`habit-list today-habit-list`},Ll=[`data-habit-id`,`onPointerdown`,`onPointermove`,`onPointerup`,`onPointercancel`,`onTouchstartPassive`,`onTouchmovePassive`,`onTouchend`,`onTouchcancel`],Rl=[`disabled`,`aria-disabled`,`title`,`aria-label`,`aria-pressed`,`onClick`],zl={class:`task-check-mark`},Bl={class:`habit-main`},Vl={class:`habit-name`},Hl={key:0,class:`habit-state-note`},Ul={key:1,class:`habit-progress`},Wl=[`value`,`max`,`aria-label`],Gl={key:0,class:`empty-panel today-empty-panel`},Kl={class:`app-sheet__header`},ql={id:`habit-compose-title`},Jl=[`aria-label`],Yl={class:`app-sheet__body`},Xl={key:0,class:`inline-error`,role:`alert`,tabindex:`-1`},Zl=[`aria-invalid`],Ql={key:0,id:`habit-name-error`,class:`field-error`,role:`alert`},$l={class:`task-compose-row`},eu={key:0},tu=[`aria-invalid`],nu={key:0,id:`habit-target-error`,class:`field-error`,role:`alert`},ru={key:1},iu=[`aria-invalid`],au={key:0,id:`habit-max-error`,class:`field-error`,role:`alert`},ou={key:1,class:`habit-weekdays`,"aria-describedby":`habit-weekdays-error`},su=[`value`],cu={key:0,id:`habit-weekdays-error`,class:`field-error`,role:`alert`},lu={key:2},uu=[`aria-invalid`],du={key:0,id:`habit-month-days-error`,class:`field-error`,role:`alert`},fu={key:3},pu=[`aria-invalid`],mu={key:0,id:`habit-interval-error`,class:`field-error`,role:`alert`},hu={class:`app-sheet__footer`},gu={key:0,class:`field-error`,role:`status`},_u=[`disabled`],vu={key:2,class:`habit-list`},yu=[`data-habit-id`,`onPointerdown`,`onPointermove`,`onPointerup`,`onPointercancel`,`onTouchstartPassive`,`onTouchmovePassive`,`onTouchend`,`onTouchcancel`],bu=[`disabled`,`onPointerdown`,`onPointermove`,`onPointerup`],xu=[`disabled`,`aria-disabled`,`title`,`aria-label`,`aria-pressed`,`onClick`],Su={class:`task-check-mark`},Cu=[`aria-label`,`onClick`,`onKeydown`],wu={class:`habit-name`},Tu={key:0,class:`habit-state-note`},Eu={key:1,class:`habit-progress`},Du=[`value`,`max`,`aria-label`],Ou={class:`habit-week`,"aria-label":`最近一周打卡`},ku=[`title`,`aria-label`],Au={class:`habit-week-day`},ju={key:0,class:`empty-panel`},Mu={key:3,class:`habit-archive-section`},Nu=[`aria-expanded`],Pu={key:0,id:`archived-habits-panel`,class:`archived-habits`,"aria-live":`polite`},Fu={key:0,class:`habit-archive-status`},Iu={key:1,class:`habit-archive-status inline-error`,role:`alert`},Lu={key:2,class:`empty-panel`},Ru=[`onClick`],zu={class:`app-sheet__header`},Bu={id:`habit-detail-title`},Vu={class:`app-sheet__body`},Hu={class:`habit-detail-progress`},Uu={key:0,class:`app-sheet__footer`},Wu={key:1,class:`app-sheet__danger`},Gu={class:`settings-grid`},Ku={class:`tool-card`},qu={class:`file-button`},Ju={class:`tool-card password-card`},Yu={key:0,class:`inline-error`,role:`alert`},Xu=[`disabled`],Zu={class:`tool-card wide`},Qu={class:`session-copy`},$u={class:`session-title`},ed={class:`session-meta`},td={class:`session-device`},nd=[`datetime`],rd=[`aria-label`,`onClick`],id={key:0},ad={key:0,class:`tool-card wide`},od={class:`audit-copy`},sd=[`title`],cd=[`datetime`],ld=sr({__name:`MvpPanel`,props:{view:{},showCompleted:{type:Boolean}},emits:[`changed`,`notice`,`summary`],setup(e,{expose:t,emit:n}){let r=e,i=n,a=B([]),o=B([]),s=B(!1),c=B(`idle`),l=B(``),u=Q(()=>il(c.value,o.value.length)),d=B(null),f=B([]),p=B([]),m=B(!1),h=B(``),g=B(``),_=B(`boolean`),v=B(1),y=B(null),b=B(`daily`),x=B([]),S=B(``),C=B(1),w=B({}),T=B(``),E=B(!1),D=B(!1),O=B(null),k=B(null),A=B(null),j=B(!1),ee=B(null),M=null,te=B({x:window.innerWidth-43,y:window.innerHeight-104}),ne=Q(()=>({"--fab-origin-x":`${te.value.x}px`,"--fab-origin-y":`${te.value.y}px`})),re=B(null),ie=B(null),N=B(``),ae=B(``),se=B(``),ce=B(!1),le=B(``),P=B(hc(new Date)),ue=B(null),de=B(null),fe=B({}),I=B(null),pe=B(``),me=B(new Set),he=B(new Set);function ge(e,t){let n=new Set(he.value);t?n.add(e):n.delete(e),he.value=n}async function _e(e,t,n,r){!t&&yc(e.kind,n,e.target??1)&&(ve(e.id),r&&(await yl(),ge(e.id,!1)))}let ve=bl(e=>{me.value=new Set(me.value).add(e)},e=>{let t=new Set(me.value);t.delete(e),me.value=t}),ye=Q(()=>a.value.filter(e=>bc(e,P.value))),be=Q(()=>r.showCompleted?ye.value:ye.value.filter(e=>!Ee(e,P.value)||he.value.has(e.id))),xe=Q(()=>r.showCompleted?a.value:a.value.filter(e=>!Ee(e,P.value)||he.value.has(e.id)));On(Q(()=>({total:ye.value.length,completed:ye.value.filter(e=>Ee(e,P.value)).length})),e=>i(`summary`,e),{immediate:!0});let R;async function Se(e,t={}){let n={...t.headers||{}};t.body&&!(t.body instanceof FormData)&&(n[`Content-Type`]=`application/json`);let r=ml(t.method);r[`x-csrf-token`]&&(n[`x-csrf-token`]=r[`x-csrf-token`]);let i=await fetch(`/api/v1`+e,{credentials:`include`,...t,headers:n});if(!i.ok){let e=await i.json().catch(()=>({}));throw Error(fl(e.detail))}let a=i.headers.get(`content-type`)||``;return i.status===204?null:a.includes(`json`)?i.json():i.blob()}async function Ce(e){m.value=!0,h.value=``;try{await e()}catch(e){h.value=e instanceof Error?e.message:`请求失败`}finally{m.value=!1}}function we(e,t){return(e.cells??[]).find(e=>e.day===t)}function Te(e){return rl(we(e,P.value),!!e.archived_at)}function Ee(e,t){return yc(e.kind,we(e,t)?.value,e.target??1)}function De(e){return e instanceof Element&&!!e.closest(`button,input,select,textarea,a,label`)}function Oe(e,t){if(!m.value&&r.showCompleted){I.value={id:e.id,startY:t.clientY,offsetY:0},pe.value=e.id;try{t.currentTarget.setPointerCapture(t.pointerId)}catch{}}}function ke(e,t){let n=I.value;if(!n||n.id!==e.id)return;n.offsetY=t.clientY-n.startY;let r=t.currentTarget,i=document.elementsFromPoint(t.clientX,t.clientY).map(e=>e.closest(`[data-habit-id]`)).find(e=>e&&e!==r.closest(`[data-habit-id]`));i?.dataset.habitId&&(pe.value=i.dataset.habitId)}async function Ae(e,t){let n=I.value,r=pe.value;if(I.value=null,pe.value=``,!n||n.id!==e.id||!r||r===e.id)return;let o=t.clientY>=n.startY?`after`:`before`,s=a.value,c=nc(s,e.id,r,o);if(c!==s){a.value=c,Gc(hc(new Date),c);try{await Se(`/habits/reorder`,{method:`PUT`,body:JSON.stringify({habit_ids:c.map(e=>e.id)})}),i(`notice`,`顺序已保存`)}catch(e){a.value=s,Gc(hc(new Date),s),h.value=e instanceof Error?e.message:`请求失败`}}}function je(){I.value=null,pe.value=``}function Me(e,t){if(m.value||!Te(e).writable||De(t.target))return;let n=t.touches[0];n&&(ue.value={id:e.id,x:n.clientX,y:n.clientY},fe.value[e.id]=0)}function Ne(e,t){m.value||!Te(e).writable||De(t.target)||t.pointerType!==`touch`&&(de.value={id:e.id,x:t.clientX,y:t.clientY})}function Pe(e,t){let n=de.value;if(!n||n.id!==e.id)return;let r=t.clientX-n.x,i=t.clientY-n.y,a=Number(we(e,P.value)?.value??0);Math.abs(r)>Math.abs(i)&&(r>0&&a<(e.target??1)||r<0&&a>0)&&(fe.value[e.id]=Math.max(-92,Math.min(r,92)))}function Fe(e,t){let n=ue.value,r=t.touches[0];if(!n||n.id!==e.id||!r)return;let i=r.clientX-n.x,a=r.clientY-n.y,o=Number(we(e,P.value)?.value??0);Math.abs(i)>Math.abs(a)&&(i>0&&o<(e.target??1)||i<0&&o>0)&&(fe.value[e.id]=Math.max(-92,Math.min(i,92)))}function Ie(e){return e.kind===`numeric`?`${Number(we(e,P.value)?.value??0)} / ${e.target??1}`:``}function Le(e){return Math.max(Number(e.target??1),1)}function Re(e){return Math.min(Math.max(Number(we(e,P.value)?.value??0),0),Le(e))}function ze(e){let[t,n,r]=e.split(`-`).map(Number);return new Intl.DateTimeFormat(`zh-CN`,{weekday:`narrow`}).format(new Date(t,n-1,r))}function Be(e,t){return yc(e.kind,t.value,e.target??1)}function Ve(e,t){let n=t.scheduled?t.paused?`已暂停`:Be(e,t)?`已完成`:`未完成`:`未安排`;return`${t.day} ${ze(t.day)}:${n}`}function He(e,t){a.value=a.value.map(n=>n.id===e.id?{...n,cells:(n.cells??[]).map(e=>e.day===P.value?{...e,value:t}:e)}:n)}async function Ue(e,t){if(!Te(e).writable)return;let n=we(e,P.value)?.value,a=yc(e.kind,n,e.target??1),o=t>0?xc(e.kind,n,e.target??1):Sc(e.kind,n),s=n??0,c=!a&&yc(e.kind,o,e.target??1)&&gl({completing:!0,showCompleted:r.showCompleted});c||He(e,o);try{await Se(`/habits/${e.id}/logs/${P.value}`,{method:`PUT`,body:JSON.stringify({value:o})}),c&&(ge(e.id,!0),He(e,o)),await _e(e,a,o,c),i(`notice`,o>Number(s)?`已记录一次 🎉`:`已减少一次`)}catch(t){ge(e.id,!1),He(e,s),h.value=t instanceof Error?t.message:`请求失败`}}function We(){j.value=!0,window.setTimeout(()=>{j.value=!1},0)}async function Ge(e,t){let n=ue.value;if(ue.value=null,fe.value[e.id]=0,!n||n.id!==e.id||m.value)return;let r=t.changedTouches[0],i=r?r.clientX-n.x:0,a=r?r.clientY-n.y:0,o=Number(we(e,P.value)?.value??0),s=e.kind===`numeric`?i>0&&o<(e.target??1)||i<0&&o>0:Ee(e,P.value)?i<0:i>0;r&&s&&Oc(Math.abs(i),a)&&(We(),await Ue(e,i))}async function Ke(e,t){let n=de.value;if(!n||n.id!==e.id)return;de.value=null,fe.value[e.id]=0;let r=t.clientX-n.x,i=t.clientY-n.y,a=Number(we(e,P.value)?.value??0);(e.kind===`numeric`?r>0&&a<(e.target??1)||r<0&&a>0:Ee(e,P.value)?r<0:r>0)&&Oc(Math.abs(r),i)&&(We(),Ue(e,r))}function qe(e){de.value=null,e&&(fe.value[e.id]=0)}function Je(e){ue.value=null,e&&(fe.value[e.id]=0)}async function Ye(e){if(!Te(e).writable)return;let t=we(e,P.value)?.value,n=yc(e.kind,t,e.target??1),a=t??0,o=Cc(e.kind,t,e.target??1),s=!n&&yc(e.kind,o,e.target??1)&&gl({completing:!0,showCompleted:r.showCompleted});s&&ge(e.id,!0),He(e,o);try{await Se(`/habits/${e.id}/logs/${P.value}`,{method:`PUT`,body:JSON.stringify({value:o})}),await _e(e,n,o,s),i(`notice`,wc(e.kind,a,o))}catch(t){ge(e.id,!1),He(e,a),h.value=t instanceof Error?t.message:`请求失败`}}function Xe(){return{name:g.value,kind:_.value,target:_.value===`numeric`?Number(v.value):1,max_value:_.value===`numeric`?y.value:1,schedule_type:b.value,weekdays:b.value===`weekly`?x.value:null,month_days:b.value===`monthly`?S.value.split(/[,,\s]+/).filter(Boolean).map(Number):null,interval_days:b.value===`interval`?Number(C.value):null}}function Ze(){E.value&&(w.value=tl(Xe()))}let Qe=Q(()=>Object.keys(tl(Xe())).length>0),$e=Q(()=>O.value?`编辑习惯`:`添加习惯`);On([g,_,v,y,b,x,S,C],Ze,{deep:!0});async function et(){E.value=!0,T.value=``;let e=Xe();if(w.value=tl(e),Object.keys(w.value).length){un(()=>document.querySelector(`.habit-compose-sheet [aria-invalid="true"]`)?.focus());return}let t={...e,name:e.name.trim()};m.value=!0;try{if(O.value&&k.value){let e=nl(k.value,t);Object.keys(e).length&&await Se(`/habits/${O.value.id}`,{method:`PATCH`,body:JSON.stringify(e)}),i(`notice`,Object.keys(e).length?`习惯已更新`:`习惯未修改`)}else await Se(`/habits`,{method:`POST`,body:JSON.stringify(t)}),i(`notice`,`习惯已创建`);D.value=!1,O.value=null,k.value=null,await pt()}catch(e){T.value=e instanceof Error?e.message:`请求失败`}finally{m.value=!1}}function tt(){g.value=``,_.value=`boolean`,v.value=1,y.value=null,b.value=`daily`,x.value=[],S.value=``,C.value=1,w.value={},T.value=``,E.value=!1}function nt(e){e&&(te.value=e),O.value=null,k.value=null,tt(),D.value=!0,un(()=>re.value?.focus())}function rt(e){O.value=e,g.value=e.name,_.value=e.kind===`numeric`?`numeric`:`boolean`,v.value=e.target??1,y.value=e.max_value??null,b.value=e.schedule_type??`daily`,x.value=[...e.weekdays??[]],S.value=(e.month_days??[]).join(`, `),C.value=e.interval_days??1,w.value={},T.value=``,E.value=!1,k.value=Xe(),A.value=null,D.value=!0,un(()=>re.value?.focus())}function it(){D.value=!1,O.value=null,k.value=null}function at(e,t){j.value||(M=t??document.activeElement,A.value=e,un(()=>ee.value?.focus()))}function ot(){A.value=null,un(()=>{M?.isConnected?M.focus():d.value?.focus()})}t({openHabitComposer:nt,refreshHabits:pt});async function st(e){confirm(`归档习惯“${e.name}”?历史打卡记录会保留。`)&&await Ce(async()=>{await Se(`/habits/${e.id}`,{method:`DELETE`}),A.value=null,await pt(),r.view===`habits`&&s.value&&await ut(),i(`notice`,`习惯已归档`)})}async function ct(e){if(e.archived_at){h.value=``;try{let t=await qc({restore:()=>Se(`/habits/${e.id}/restore`,{method:`POST`}),commitRestore:()=>{o.value=o.value.filter(t=>t.id!==e.id),A.value=null,Kc()},refreshGrid:()=>pt()});i(`notice`,t.refreshed?`习惯已恢复`:`习惯已恢复,但列表刷新失败,请重试`),un(()=>d.value?.focus())}catch(e){h.value=e instanceof Error?e.message:`恢复失败`}}}async function lt(e){if(e.archived_at&&confirm(`永久删除习惯“${e.name}”?所有历史打卡记录也会被删除,且无法恢复。`)){h.value=``;try{await Se(`/habits/${e.id}/permanent`,{method:`DELETE`}),o.value=o.value.filter(t=>t.id!==e.id),A.value=null,i(`notice`,`习惯已永久删除`),un(()=>d.value?.focus())}catch(e){h.value=e instanceof Error?e.message:`永久删除失败`}}}async function ut(){if(r.view===`habits`&&c.value!==`loading`){c.value=`loading`,l.value=``;try{o.value=await Se(`/habits?archived=true`),c.value=`success`}catch(e){c.value=`error`,l.value=e instanceof Error?e.message:`归档习惯加载失败`}}}async function dt(){s.value=!s.value,s.value&&c.value!==`success`&&await ut()}function ft(){let e=hc(new Date);e!==P.value&&(P.value=e,r.view===`habits`&&pt())}async function pt(){let e=hc(new Date),t=Wc(e);t&&(a.value=t),t||(m.value=!0),h.value=``;try{let t=await Se(`/habits/grid?week=${e}`);return a.value=t.habits??[],Gc(e,a.value),!0}catch(e){return h.value=e instanceof Error?e.message:`请求失败`,!1}finally{t||(m.value=!1)}}async function mt(){await Ce(async()=>{let[e,t]=await Promise.all([Se(`/sessions`).catch(()=>[]),Se(`/audit-logs?limit=20`).catch(()=>[])]);f.value=gc(e).items,p.value=gc(t).items})}async function ht(e){await Ce(async()=>{await Se(`/sessions/${e}`,{method:`DELETE`}),await mt(),i(`notice`,`会话已撤销`)})}function gt(e,t){let n=URL.createObjectURL(e),r=document.createElement(`a`);r.href=n,r.download=t,r.click(),setTimeout(()=>URL.revokeObjectURL(n),1e3)}async function _t(){await Ce(async()=>{let e=await fetch(`/api/v1/export.csv`,{credentials:`include`});if(!e.ok)throw Error(`导出失败`);gt(await e.blob(),`dodo-export.csv`)})}async function vt(){ie.value&&confirm(`恢复为合并模式,将导入备份中的清单与任务。继续吗?`)&&await Ce(async()=>{if(ie.value.name.toLowerCase().endsWith(`.csv`)){let e=new FormData;e.append(`file`,ie.value),await Se(`/restore.csv?mode=merge`,{method:`POST`,body:e})}else await Se(`/restore?mode=merge`,{method:`POST`,body:await ie.value.text()});i(`changed`),i(`notice`,`数据已恢复`)})}async function yt(){if(le.value=``,ae.value!==se.value){le.value=`两次输入的新密码不一致`;return}if(ae.value.length<12){le.value=`新密码至少需要 12 位`;return}ce.value=!0;try{await Se(`/auth/change-password`,{method:`POST`,body:JSON.stringify({current_password:N.value,new_password:ae.value})}),N.value=``,ae.value=``,se.value=``,i(`notice`,`密码已修改,其他设备已退出登录`),await mt()}catch(e){le.value=e instanceof Error?e.message:`修改密码失败`}finally{ce.value=!1}}return Sr(()=>{r.view===`habits`||r.view===`today-habits`?(ft(),pt(),R=setInterval(ft,6e4)):mt()}),Tr(()=>{R&&clearInterval(R)}),(t,n)=>(K(),q(`section`,{class:F([`mvp-view`,{loading:m.value}])},[h.value?(K(),q(`p`,Pl,L(h.value),1)):Z(``,!0),e.view===`habits`||e.view===`today-habits`?(K(),q(G,{key:1},[e.view===`habits`?(K(),q(`header`,Fl,[...n[16]||=[J(`small`,null,`把想坚持的事,变成每天的日常`,-1)]])):Z(``,!0),e.view===`today-habits`&&(a.value.length||!m.value)?(K(),q(`div`,Il,[(K(!0),q(G,null,Ir(be.value,e=>(K(),q(`article`,{key:e.id,"data-habit-id":e.id,class:F([`habit-row today-habit-row swipeable`,{done:Ee(e,P.value),"just-completed":me.value.has(e.id),"completion-exiting":he.value.has(e.id),ready:Math.abs(fe.value[e.id]??0)>=64}]),style:oe({"--swipe-x":`${fe.value[e.id]??0}px`}),onPointerdown:t=>Ne(e,t),onPointermove:t=>Pe(e,t),onPointerup:t=>Ke(e,t),onPointercancel:t=>qe(e),onTouchstartPassive:t=>Me(e,t),onTouchmovePassive:t=>Fe(e,t),onTouchend:t=>Ge(e,t),onTouchcancel:t=>Je(e)},[J(`button`,{class:`task-check habit-check`,disabled:!Te(e).writable,"aria-disabled":!Te(e).writable,title:Te(e).reason,"aria-label":Te(e).reason||(Ee(e,P.value)?`减少${e.name}一次`:`完成${e.name}一次`),"aria-pressed":Ee(e,P.value),onClick:$(t=>Ye(e),[`stop`])},[J(`span`,zl,[Ee(e,P.value)?(K(),aa(V(Ds),{key:0})):Z(``,!0)])],8,Rl),J(`div`,Bl,[J(`span`,Vl,L(e.name),1),Te(e).reason?(K(),q(`small`,Hl,L(Te(e).reason),1)):Z(``,!0),Ie(e)?(K(),q(`small`,Ul,L(Ie(e)),1)):Z(``,!0),e.kind===`numeric`?(K(),q(`progress`,{key:2,class:`habit-progress-bar`,value:Re(e),max:Le(e),"aria-label":`${e.name}进度:${Ie(e)}`},null,8,Wl)):Z(``,!0)])],46,Ll))),128)),!be.value.length&&!m.value?(K(),q(`div`,Gl,[J(`span`,null,L(!e.showCompleted&&ye.value.length?`已完成的习惯已隐藏。`:`今天没有安排习惯,轻松一下吧。`),1),e.showCompleted||!ye.value.length?(K(),q(`button`,{key:0,class:`soft-button empty-action`,onClick:nt},[Y(V(Ds)),n[17]||=X(`添加习惯`,-1)])):Z(``,!0)])):Z(``,!0)])):Z(``,!0),Y(eo,{name:`task-compose`},{default:Sn(()=>[D.value?(K(),q(`div`,{key:0,class:`task-compose-mask app-sheet-mask`,onClick:$(it,[`self`])},[J(`form`,{class:`task-compose-sheet habit-compose-sheet app-sheet app-sheet--create`,style:oe(ne.value),role:`dialog`,"aria-modal":`true`,"aria-labelledby":`habit-compose-title`,onSubmit:$(et,[`prevent`]),onKeydown:ds(it,[`esc`])},[J(`header`,Kl,[J(`div`,null,[J(`small`,null,L(O.value?`EDIT HABIT`:`NEW HABIT`),1),J(`h2`,ql,L($e.value),1)]),J(`button`,{class:`icon`,type:`button`,"aria-label":`关闭${$e.value}`,onClick:it},[Y(V(Ys))],8,Jl)]),J(`div`,Yl,[T.value?(K(),q(`p`,Xl,L(T.value),1)):Z(``,!0),J(`label`,null,[n[18]||=X(`习惯名称`,-1),W(J(`input`,{ref_key:`habitNameInput`,ref:re,"onUpdate:modelValue":n[0]||=e=>g.value=e,placeholder:`例如:每天喝水 8 杯`,"aria-label":`新习惯名称`,"aria-invalid":!!w.value.name,"aria-describedby":`habit-name-error`},null,8,Zl),[[es,g.value]]),w.value.name?(K(),q(`small`,Ql,L(w.value.name),1)):Z(``,!0)]),J(`div`,$l,[J(`label`,null,[n[20]||=X(`记录方式`,-1),W(J(`select`,{"onUpdate:modelValue":n[1]||=e=>_.value=e,"aria-label":`习惯类型`},[...n[19]||=[J(`option`,{value:`boolean`},`完成 / 未完成`,-1),J(`option`,{value:`numeric`},`按数量记录`,-1)]],512),[[rs,_.value]])]),_.value===`numeric`?(K(),q(`label`,eu,[n[21]||=X(`目标值`,-1),W(J(`input`,{"onUpdate:modelValue":n[2]||=e=>v.value=e,type:`number`,min:`0`,step:`any`,"aria-label":`目标值`,"aria-invalid":!!w.value.target,"aria-describedby":`habit-target-error`},null,8,tu),[[es,v.value,void 0,{number:!0}]]),w.value.target?(K(),q(`small`,nu,L(w.value.target),1)):Z(``,!0)])):Z(``,!0),_.value===`numeric`?(K(),q(`label`,ru,[n[22]||=X(`最大值(可选)`,-1),W(J(`input`,{"onUpdate:modelValue":n[3]||=e=>y.value=e,type:`number`,min:`0`,step:`any`,"aria-label":`最大值`,"aria-invalid":!!w.value.max_value,"aria-describedby":`habit-max-error`},null,8,iu),[[es,y.value,void 0,{number:!0}]]),w.value.max_value?(K(),q(`small`,au,L(w.value.max_value),1)):Z(``,!0)])):Z(``,!0)]),J(`label`,null,[n[24]||=X(`计划类型`,-1),W(J(`select`,{"onUpdate:modelValue":n[4]||=e=>b.value=e,"aria-label":`计划类型`},[...n[23]||=[J(`option`,{value:`daily`},`每天`,-1),J(`option`,{value:`weekly`},`每周`,-1),J(`option`,{value:`monthly`},`每月`,-1),J(`option`,{value:`interval`},`间隔`,-1)]],512),[[rs,b.value]])]),b.value===`weekly`?(K(),q(`fieldset`,ou,[n[25]||=J(`legend`,null,`每周日期`,-1),(K(),q(G,null,Ir([`一`,`二`,`三`,`四`,`五`,`六`,`日`],(e,t)=>J(`label`,{key:t},[W(J(`input`,{"onUpdate:modelValue":n[5]||=e=>x.value=e,type:`checkbox`,value:t},null,8,su),[[ts,x.value]]),X(`周`+L(e),1)])),64)),w.value.weekdays?(K(),q(`small`,cu,L(w.value.weekdays),1)):Z(``,!0)])):Z(``,!0),b.value===`monthly`?(K(),q(`label`,lu,[n[26]||=X(`每月日期`,-1),W(J(`input`,{"onUpdate:modelValue":n[6]||=e=>S.value=e,inputmode:`numeric`,placeholder:`例如:1, 15, 31`,"aria-invalid":!!w.value.month_days,"aria-describedby":`habit-month-days-error`},null,8,uu),[[es,S.value]]),w.value.month_days?(K(),q(`small`,du,L(w.value.month_days),1)):Z(``,!0)])):Z(``,!0),b.value===`interval`?(K(),q(`label`,fu,[n[27]||=X(`间隔天数`,-1),W(J(`input`,{"onUpdate:modelValue":n[7]||=e=>C.value=e,type:`number`,min:`1`,step:`1`,"aria-invalid":!!w.value.interval_days,"aria-describedby":`habit-interval-error`},null,8,pu),[[es,C.value,void 0,{number:!0}]]),w.value.interval_days?(K(),q(`small`,mu,L(w.value.interval_days),1)):Z(``,!0)])):Z(``,!0)]),J(`footer`,hu,[Qe.value?(K(),q(`span`,gu,`请修正表单中的错误后再保存`)):Z(``,!0),J(`button`,{type:`button`,class:`secondary`,onClick:it},`取消`),J(`button`,{class:`primary-small`,disabled:m.value||Qe.value},L(m.value?`保存中…`:O.value?`保存修改`:`添加习惯`),9,_u)])],36)])):Z(``,!0)]),_:1}),e.view===`habits`?(K(),q(`div`,vu,[(K(!0),q(G,null,Ir(xe.value,t=>(K(),q(`article`,{key:t.id,"data-habit-id":t.id,class:F([`habit-row swipeable`,{done:Ee(t,P.value),"just-completed":me.value.has(t.id),"completion-exiting":he.value.has(t.id),ready:Math.abs(fe.value[t.id]??0)>=64,reordering:I.value?.id===t.id,"reorder-target":pe.value===t.id}]),style:oe({"--swipe-x":`${fe.value[t.id]??0}px`,"--reorder-y":`${I.value?.id===t.id?I.value.offsetY:0}px`}),onPointerdown:e=>Ne(t,e),onPointermove:e=>Pe(t,e),onPointerup:e=>Ke(t,e),onPointercancel:e=>qe(t),onTouchstartPassive:e=>Me(t,e),onTouchmovePassive:e=>Fe(t,e),onTouchend:e=>Ge(t,e),onTouchcancel:e=>Je(t)},[J(`button`,{class:`drag-handle habit-drag-handle`,disabled:!e.showCompleted,"aria-label":`上下拖动习惯排序`,title:`上下拖动排序`,onPointerdown:$(e=>Oe(t,e),[`stop`]),onPointermove:$(e=>ke(t,e),[`stop`]),onPointerup:$(e=>Ae(t,e),[`stop`]),onPointercancel:$(je,[`stop`])},[Y(V(Fs))],40,bu),J(`button`,{class:`task-check habit-check`,disabled:!Te(t).writable,"aria-disabled":!Te(t).writable,title:Te(t).reason,"aria-label":Te(t).reason||(Ee(t,P.value)?`减少${t.name}一次`:`完成${t.name}一次`),"aria-pressed":Ee(t,P.value),onClick:$(e=>Ye(t),[`stop`])},[J(`span`,Su,[Ee(t,P.value)?(K(),aa(V(Ds),{key:0})):Z(``,!0)])],8,xu),J(`div`,{class:`habit-main`,role:`button`,tabindex:`0`,"aria-label":`查看习惯详情:${t.name}`,onClick:e=>at(t,e.currentTarget),onKeydown:[ds($(e=>at(t,e.currentTarget),[`prevent`]),[`enter`]),ds($(e=>at(t,e.currentTarget),[`prevent`]),[`space`])]},[J(`span`,wu,L(t.name),1),Te(t).reason?(K(),q(`small`,Tu,L(Te(t).reason),1)):Z(``,!0),Ie(t)?(K(),q(`small`,Eu,L(Ie(t)),1)):Z(``,!0),t.kind===`numeric`?(K(),q(`progress`,{key:2,class:`habit-progress-bar`,value:Re(t),max:Le(t),"aria-label":`${t.name}进度:${Ie(t)}`},null,8,Du)):Z(``,!0),J(`div`,Ou,[(K(!0),q(G,null,Ir(t.cells,e=>(K(),q(`span`,{key:e.day,class:F([`habit-week-cell`,{done:Be(t,e),unscheduled:!e.scheduled||e.paused,today:e.day===P.value}]),title:Ve(t,e),"aria-label":Ve(t,e)},[J(`small`,Au,L(ze(e.day)),1),n[28]||=J(`i`,null,null,-1)],10,ku))),128))])],40,Cu)],46,yu))),128)),!xe.value.length&&!m.value?(K(),q(`div`,ju,L(!e.showCompleted&&a.value.length?`已完成的习惯已隐藏。`:`还没有习惯,从一件容易坚持的小事开始。`),1)):Z(``,!0)])):Z(``,!0),e.view===`habits`?(K(),q(`section`,Mu,[J(`button`,{ref_key:`habitArchiveToggle`,ref:d,class:`archived-toggle habit-archive-toggle`,type:`button`,"aria-expanded":s.value,"aria-controls":`archived-habits-panel`,onClick:dt},[Y(V(Cs)),J(`span`,null,L(c.value===`success`?`已归档(${o.value.length})`:`已归档`),1),Y(V(As),{class:F({expanded:s.value}),"aria-hidden":`true`},null,8,[`class`])],8,Nu),s.value?(K(),q(`div`,Pu,[c.value===`loading`?(K(),q(`p`,Fu,`正在加载归档习惯…`)):c.value===`error`?(K(),q(`div`,Iu,[J(`span`,null,L(l.value),1),J(`button`,{type:`button`,class:`soft-button`,onClick:ut},`重试`)])):u.value.empty?(K(),q(`p`,Lu,`暂无已归档习惯。`)):Z(``,!0),(K(!0),q(G,null,Ir(u.value.list?o.value:[],e=>(K(),q(`button`,{key:e.id,class:`archived-habit-row`,type:`button`,onClick:t=>at(e,t.currentTarget)},[J(`span`,null,[J(`b`,null,L(e.name),1),J(`small`,null,L(V(al)(e.archived_at)),1)]),Y(V(As),{"aria-hidden":`true`})],8,Ru))),128))])):Z(``,!0)])):Z(``,!0),Y(eo,{name:`countdown-detail`},{default:Sn(()=>[A.value?(K(),q(`div`,{key:0,class:`habit-detail-mask app-sheet-mask`,onClick:$(ot,[`self`])},[J(`article`,{ref_key:`habitDetailSheet`,ref:ee,class:`habit-detail-sheet app-sheet app-sheet--detail`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`habit-detail-title`,tabindex:`-1`,onKeydown:ds(ot,[`esc`])},[J(`header`,zu,[J(`div`,null,[n[29]||=J(`small`,null,`习惯详情`,-1),J(`h3`,Bu,L(A.value.name),1)]),J(`button`,{type:`button`,"aria-label":`关闭习惯详情`,onClick:ot},[Y(V(Ys))])]),J(`div`,Vu,[J(`div`,Hu,[n[30]||=J(`span`,null,`今日进度`,-1),J(`strong`,null,L(A.value.archived_at?`已归档`:Ie(A.value)||(Ee(A.value,P.value)?`已完成`:`未完成`)),1)])]),A.value.archived_at?Z(``,!0):(K(),q(`footer`,Uu,[J(`button`,{type:`button`,class:`soft-button`,onClick:n[8]||=e=>rt(A.value)},[Y(V(Vs)),n[31]||=X(`编辑习惯`,-1)]),J(`button`,{type:`button`,class:`soft-button`,onClick:n[9]||=e=>st(A.value)},[Y(V(Cs)),n[32]||=X(`归档习惯`,-1)])])),A.value.archived_at?(K(),q(`footer`,Wu,[J(`button`,{type:`button`,class:`soft-button habit-restore-button`,onClick:n[10]||=e=>ct(A.value)},[Y(V(Cs)),n[33]||=X(`恢复习惯`,-1)]),J(`button`,{type:`button`,class:`danger-text habit-delete-button`,onClick:n[11]||=e=>lt(A.value)},[Y(V(Js)),n[34]||=X(`永久删除`,-1)])])):Z(``,!0)],544)])):Z(``,!0)]),_:1})],64)):(K(),q(G,{key:2},[n[47]||=J(`header`,{class:`view-intro`},[J(`div`,null,[J(`small`,null,`备份、迁移与安全`)])],-1),J(`div`,Gu,[J(`article`,Ku,[Y(V(Ns)),n[37]||=J(`h2`,null,`数据导出与恢复`,-1),n[38]||=J(`p`,null,`导出完整 CSV 数据,或从 CSV / JSON 备份恢复。`,-1),J(`button`,{class:`soft-button`,onClick:_t},[Y(V(js)),n[35]||=X(`导出 CSV`,-1)]),J(`label`,qu,[Y(V(Cs)),n[36]||=X(`选择备份`,-1),J(`input`,{type:`file`,accept:`.csv,application/json`,onChange:n[12]||=e=>ie.value=e.target.files?.[0]||null},null,32)]),ie.value?(K(),q(`button`,{key:0,class:`danger-button`,onClick:vt},`确认恢复`)):Z(``,!0)]),J(`article`,Ju,[Y(V(Ss)),n[42]||=J(`h2`,null,`修改密码`,-1),n[43]||=J(`p`,null,`修改后当前设备保持登录,其他设备会自动退出。`,-1),J(`form`,{class:`password-form`,onSubmit:$(yt,[`prevent`])},[J(`label`,null,[n[39]||=X(`当前密码`,-1),W(J(`input`,{"onUpdate:modelValue":n[13]||=e=>N.value=e,type:`password`,autocomplete:`current-password`,required:``,"aria-label":`当前密码`},null,512),[[es,N.value]])]),J(`label`,null,[n[40]||=X(`新密码`,-1),W(J(`input`,{"onUpdate:modelValue":n[14]||=e=>ae.value=e,type:`password`,autocomplete:`new-password`,minlength:`12`,required:``,"aria-label":`新密码`,placeholder:`至少 12 位`},null,512),[[es,ae.value]])]),J(`label`,null,[n[41]||=X(`确认新密码`,-1),W(J(`input`,{"onUpdate:modelValue":n[15]||=e=>se.value=e,type:`password`,autocomplete:`new-password`,minlength:`12`,required:``,"aria-label":`确认新密码`},null,512),[[es,se.value]])]),le.value?(K(),q(`p`,Yu,L(le.value),1)):Z(``,!0),J(`button`,{class:`primary-small`,disabled:ce.value||!N.value||!ae.value||!se.value},L(ce.value?`正在修改…`:`修改密码`),9,Xu)],32)]),J(`article`,Zu,[Y(V(zs)),n[45]||=J(`h2`,null,`登录会话`,-1),(K(!0),q(G,null,Ir(f.value,e=>(K(),q(`div`,{key:e.id,class:`session-row`},[J(`span`,Qu,[J(`b`,$u,L(e.current?`当前设备`:`其他设备`),1),J(`small`,ed,[J(`span`,td,L(V(ol)(e.user_agent)),1),n[44]||=J(`span`,{"aria-hidden":`true`},` · `,-1),J(`time`,{datetime:e.last_seen_at??e.created_at},L(V(sl)(e.last_seen_at??e.created_at)),9,nd)])]),e.current?Z(``,!0):(K(),q(`button`,{key:0,class:`danger-text session-revoke`,"aria-label":`撤销 ${V(ol)(e.user_agent)} 的登录会话`,onClick:t=>ht(e.id)},`撤销`,8,rd))]))),128)),f.value.length?Z(``,!0):(K(),q(`p`,id,`没有可显示的会话。`))]),p.value.length?(K(),q(`article`,ad,[Y(V(Ss)),n[46]||=J(`h2`,null,`最近活动`,-1),(K(!0),q(G,null,Ir(p.value,(e,t)=>(K(),q(`div`,{key:e.id||t,class:`audit-row`},[J(`div`,od,[J(`span`,{class:`audit-action`,title:e.action??e.event??void 0},L(V(ul)(e.action??e.event))+L(V(ul)(e.action??e.event)===`其他操作`?``:V(dl)(e.entity_type)),9,sd),J(`time`,{datetime:e.created_at??e.timestamp},L(V(sl)(e.created_at??e.timestamp)),9,cd)])]))),128))])):Z(``,!0)])],64))],2))}}),ud=[`inert`,`aria-hidden`],dd={class:`countdown-hero`},fd={key:0,class:`inline-error`},pd={key:1,class:`countdown-layout`},md={class:`countdown-number`},hd={key:0},gd={class:`countdown-copy`},_d={key:1,class:`countdown-timeline`},vd={key:0},yd=[`onClick`],bd={class:`countdown-main`},xd={class:`countdown-badges`},Sd={class:`countdown-state`},Cd={key:2,class:`countdown-empty`},wd={key:4,class:`archived-countdowns`},Td=[`onClick`],Ed=[`onClick`],Dd={class:`app-sheet__header`},Od={id:`countdown-detail-title`},kd={class:`app-sheet__body`},Ad={class:`countdown-detail-days`},jd={key:0},Md={key:0},Nd={class:`app-sheet__footer`},Pd={class:`app-sheet__header`},Fd={id:`countdown-dialog-title`},Id={class:`app-sheet__body`},Ld={key:0},Rd=[`open`],zd={value:`solar`},Bd={value:`lunar`},Vd={key:0,class:`countdown-title-fields`},Hd=[`value`],Ud=[`value`],Wd={key:1},Gd={key:0},Kd=[`disabled`],qd={class:`app-sheet__footer`},Jd=[`disabled`],Yd=[`disabled`],Xd=sr({__name:`CountdownPanel`,emits:[`notice`],setup(e,{expose:t,emit:n}){let r=n,i=B([]),a=B([]),o=B(!1),s=B(!1),c=B(!1),l=B(null),u=B(null),d=B(``),f=B(null),p=B(!1),m=new Date().getFullYear(),h=()=>({title:``,event_date:hc(new Date),kind:`countdown`,repeat_rule:`none`,calendar_mode:`solar`,lunar_year:m,lunar_month:1,lunar_day:1,leap_month:!1,ignore_year:!1}),g=B(h()),_=B({x:window.innerWidth-43,y:window.innerHeight-104}),v=Q(()=>({"--fab-origin-x":`${_.value.x}px`,"--fab-origin-y":`${_.value.y}px`})),y=B(null),b=B(null),x=null;function S(){x=document.activeElement instanceof HTMLElement?document.activeElement:null,un(()=>y.value?.focus())}function C(){s.value=!1,p.value=!1,un(()=>x?.focus())}function w(e){if(e.key!==`Tab`)return;let t=e.currentTarget,n=Array.from(t.querySelectorAll(`button,input,select,textarea,[tabindex]:not([tabindex="-1"])`)).filter(e=>!e.hasAttribute(`disabled`));if(!n.length)return;let r=n[0],i=n[n.length-1];e.shiftKey&&document.activeElement===r?(e.preventDefault(),i.focus()):!e.shiftKey&&document.activeElement===i&&(e.preventDefault(),r.focus())}function T(e){return e.calendar_mode===`lunar`&&e.lunar_text?e.lunar_text:de(e.display_date)}function E(e){if(e.calendar_mode===`lunar`&&e.lunar_text){let t=e.ignore_year?` · 每年农历`:``;return`${de(e.display_date)}${t}`}return``}function D(e){return e.calendar_mode===`lunar`&&e.ignore_year?`每年`:e.repeat_rule===`none`?``:I(e.repeat_rule)}function O(e){return[Ec(e.kind),e.calendar_mode===`lunar`?`农历`:``,D(e)].filter(Boolean).slice(0,2)}function k(e){return[...e].sort((e,t)=>Number(t.pinned)-Number(e.pinned)||e.days-t.days||e.title.localeCompare(t.title,`zh-Hans-CN`))}let A=Q(()=>k(i.value.filter(e=>e.days>=0))),j=Q(()=>k(i.value).find(e=>e.pinned)??A.value[0]??k(i.value)[0]??null),ee=Q(()=>{if(!i.value.length)return`还没有记录重要日子`;let e=i.value.filter(e=>e.pinned).length;return e?`${i.value.length} 个重要日子 · ${e} 个置顶`:`${i.value.length} 个重要日子`}),M=Q(()=>{let e=i.value.filter(e=>e.id!==j.value?.id),t=k(e.filter(e=>e.days>=0&&e.days<=30)),n=k(e.filter(e=>e.days>30)),r=k(e.filter(e=>e.days<0));return[{key:`recent`,title:`最近`,items:t},{key:`later`,title:`稍后`,items:n},{key:`past`,title:``,items:r}].filter(e=>e.items.length)});async function te(e,t={}){let n={...t.headers||{}};t.body&&(n[`Content-Type`]=`application/json`),Object.assign(n,ml(t.method));let r=await fetch(`/api/v1`+e,{credentials:`include`,...t,headers:n});if(!r.ok){let e=await r.json().catch(()=>({}));throw Error(pl(e.detail??e))}return r.status===204?null:r.json()}async function ne(e){c.value=!0,d.value=``;try{await e()}catch(e){d.value=e instanceof Error?e.message:`请求失败`}finally{c.value=!1}}async function re(){let[e,t]=await Promise.all([te(`/countdowns`),te(`/countdowns?archived=true`)]);return{items:e,archived:t}}async function ie(e=!1){let t=Zc(),n=Jc();n&&(i.value=n.items,a.value=n.archived),n||(c.value=!0),d.value=``;try{let n=await $c(re,{force:e});if(!Qc(t))return;i.value=n.items,a.value=n.archived}catch(e){Qc(t)&&(d.value=e instanceof Error?e.message:`请求失败`)}finally{Qc(t)&&(c.value=!1)}}function N(e){f.value=null,l.value=e.id,u.value=e,p.value=!1,g.value={title:e.title,event_date:e.event_date,kind:e.kind,repeat_rule:e.repeat_rule,calendar_mode:e.calendar_mode,lunar_year:e.lunar_year||Number(e.event_date.slice(0,4)),lunar_month:Math.abs(e.lunar_month||1),lunar_day:e.lunar_day||1,leap_month:(e.lunar_month||0)<0,ignore_year:e.ignore_year},s.value=!0,S()}function ae(){(g.value.kind===`birthday`||g.value.kind===`anniversary`)&&(g.value.repeat_rule=`yearly`),g.value.kind===`countdown`&&(g.value.repeat_rule=`none`)}async function se(){c.value||g.value.title.trim()&&await ne(async()=>{let e={title:g.value.title.trim(),event_date:g.value.calendar_mode===`lunar`?`${g.value.lunar_year}-01-01`:g.value.event_date,kind:g.value.kind,repeat_rule:g.value.ignore_year?`yearly`:g.value.repeat_rule,calendar_mode:g.value.calendar_mode,ignore_year:g.value.ignore_year};l.value&&(e.expected_updated_at=u.value?.updated_at),g.value.calendar_mode===`lunar`&&(e.lunar_month=g.value.leap_month?-g.value.lunar_month:g.value.lunar_month,e.lunar_day=g.value.lunar_day),await te(l.value?`/countdowns/${l.value}`:`/countdowns`,{method:l.value?`PATCH`:`POST`,body:JSON.stringify(e)}),Xc(),C(),await ie(!0),r(`notice`,l.value?`倒数日已更新`:`倒数日已添加`)})}async function ce(e){await ne(async()=>{await te(`/countdowns/${e.id}/pin`,{method:`POST`}),Xc(),f.value=null,await ie(!0),r(`notice`,`已置顶`)})}async function le(e){await ne(async()=>{await te(`/countdowns/${e.id}`,{method:`DELETE`}),Xc(),f.value=null,await ie(!0),r(`notice`,`已归档`)})}async function P(e){await ne(async()=>{await te(`/countdowns/${e.id}/restore`,{method:`POST`}),Xc(),await ie(!0),r(`notice`,`已恢复`)})}async function ue(e){confirm(`永久删除“${e.title}”?这个操作不能撤销。`)&&await ne(async()=>{await te(`/countdowns/${e.id}/purge`,{method:`DELETE`}),Xc(),await ie(!0),r(`notice`,`已永久删除`)})}function de(e){let[t,n,r]=e.split(`-`);return`${t}年${Number(n)}月${Number(r)}日`}function fe(e){let[t,n,r]=e.split(`-`);return`${t}/${Number(n)}/${Number(r)}`}function I(e){return{none:`不重复`,weekly:`每周`,monthly:`每月`,yearly:`每年`}[e]}function pe(e){f.value=e,x=document.activeElement instanceof HTMLElement?document.activeElement:null,un(()=>b.value?.focus())}function me(){f.value=null,un(()=>x?.focus())}function he(e){if(e.key!==`Tab`)return;let t=e.currentTarget,n=Array.from(t.querySelectorAll(`button,[href],input,select,textarea,[tabindex]:not([tabindex="-1"])`)).filter(e=>!e.hasAttribute(`disabled`));if(!n.length)return;let r=n[0],i=n[n.length-1];e.shiftKey&&document.activeElement===r?(e.preventDefault(),i.focus()):!e.shiftKey&&document.activeElement===i&&(e.preventDefault(),r.focus())}function ge(){_e()}function _e(e){e&&(_.value=e),f.value=null,l.value=null,u.value=null,p.value=!1,g.value=h(),s.value=!0,S()}return t({openCountdownComposer:_e}),Sr(()=>{ie()}),Tr(()=>{x=null}),(e,t)=>(K(),q(`section`,{class:F([`countdown-view`,{loading:c.value}])},[J(`div`,{class:`countdown-content`,inert:s.value||!!f.value,"aria-hidden":s.value||f.value?`true`:void 0},[J(`header`,dd,[J(`small`,null,L(ee.value),1)]),d.value?(K(),q(`p`,fd,L(d.value),1)):Z(``,!0),i.value.length?(K(),q(`div`,pd,[j.value?(K(),q(`button`,{key:0,type:`button`,class:F([`countdown-focus`,`kind-${j.value.kind}`]),onClick:t[0]||=e=>pe(j.value)},[J(`small`,null,L(j.value.pinned?`置顶的重要日子`:`下一个重要日子`),1),J(`div`,md,[J(`strong`,null,L(j.value.days===0?`今天`:Math.abs(j.value.days)),1),j.value.days===0?Z(``,!0):(K(),q(`span`,hd,`天`))]),J(`h3`,null,L(j.value.title),1),J(`b`,gd,L(V(Tc)(j.value.days)),1),J(`p`,null,L(T(j.value)),1)],2)):Z(``,!0),M.value.length?(K(),q(`div`,_d,[(K(!0),q(G,null,Ir(M.value,e=>(K(),q(`section`,{key:e.key,class:`countdown-group`},[e.title?(K(),q(`h3`,vd,L(e.title),1)):Z(``,!0),(K(!0),q(G,null,Ir(e.items,e=>(K(),q(`button`,{key:e.id,type:`button`,class:F([`countdown-row`,[`kind-${e.kind}`,{pinned:e.pinned,today:e.days===0,past:e.days<0}]]),onClick:t=>pe(e)},[J(`span`,bd,[J(`b`,null,L(e.title),1),J(`small`,null,[X(L(T(e)),1),E(e)?(K(),q(G,{key:0},[X(` · `+L(E(e)),1)],64)):Z(``,!0)]),J(`span`,xd,[(K(!0),q(G,null,Ir(O(e),e=>(K(),q(`em`,{key:e},L(e),1))),128))])]),J(`span`,Sd,[J(`strong`,null,L(e.days===0?`今天`:Math.abs(e.days)),1),J(`small`,null,L(V(Tc)(e.days)),1)]),e.pinned?(K(),aa(V(Hs),{key:0,class:`pinned-icon`})):Z(``,!0)],10,yd))),128))]))),128))])):Z(``,!0)])):c.value?Z(``,!0):(K(),q(`div`,Cd,[Y(V(Es)),t[16]||=J(`b`,null,`还没有重要日子`,-1),t[17]||=J(`span`,null,`生日、纪念日,或一场期待已久的旅行`,-1),J(`button`,{type:`button`,class:`primary-small`,onClick:ge},`添加第一个重要日子`)])),a.value.length?(K(),q(`button`,{key:3,class:`archived-toggle`,onClick:t[1]||=e=>o.value=!o.value},[Y(V(Cs)),X(`已归档(`+L(a.value.length)+`)`,1)])):Z(``,!0),o.value?(K(),q(`div`,wd,[(K(!0),q(G,null,Ir(a.value,e=>(K(),q(`article`,{key:e.id},[J(`b`,null,L(e.title),1),J(`small`,null,[X(L(fe(e.display_date)),1),e.lunar_text?(K(),q(G,{key:0},[X(` · `+L(e.lunar_text),1)],64)):Z(``,!0),e.calendar_mode===`lunar`?(K(),q(G,{key:1},[X(` · 农历`)],64)):Z(``,!0)]),J(`button`,{onClick:t=>P(e)},[Y(V(Cs)),t[18]||=X(`恢复`,-1)],8,Td),J(`button`,{class:`danger-text`,onClick:t=>ue(e)},[Y(V(Js)),t[19]||=X(`永久删除`,-1)],8,Ed)]))),128))])):Z(``,!0)],8,ud),Y(eo,{name:`countdown-detail`},{default:Sn(()=>[f.value?(K(),q(`div`,{key:0,class:`countdown-detail-mask app-sheet-mask`,onClick:$(me,[`self`])},[J(`article`,{class:`countdown-detail-sheet app-sheet app-sheet--detail`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`countdown-detail-title`,onKeydown:[ds(me,[`esc`]),he]},[J(`header`,Dd,[J(`div`,null,[t[20]||=J(`small`,null,`重要日子详情`,-1),J(`h3`,Od,L(f.value.title),1)]),J(`button`,{ref_key:`detailCloseButton`,ref:b,type:`button`,"aria-label":`关闭详情`,onClick:me},[Y(V(Ys))],512)]),J(`div`,kd,[J(`div`,Ad,[J(`strong`,null,L(f.value.days===0?`今天`:Math.abs(f.value.days)),1),f.value.days===0?Z(``,!0):(K(),q(`span`,jd,`天`)),J(`b`,null,L(V(Tc)(f.value.days)),1)]),J(`dl`,null,[J(`div`,null,[t[21]||=J(`dt`,null,`日期`,-1),J(`dd`,null,L(T(f.value)),1)]),E(f.value)?(K(),q(`div`,Md,[t[22]||=J(`dt`,null,`换算`,-1),J(`dd`,null,L(E(f.value)),1)])):Z(``,!0),J(`div`,null,[t[23]||=J(`dt`,null,`类型`,-1),J(`dd`,null,L(V(Ec)(f.value.kind))+` · `+L(f.value.calendar_mode===`lunar`?`农历`:`公历`)+` · `+L(D(f.value)||`不重复`),1)])])]),J(`footer`,Nd,[f.value.pinned?Z(``,!0):(K(),q(`button`,{key:0,type:`button`,onClick:t[2]||=e=>ce(f.value)},[Y(V(Hs)),t[24]||=X(`置顶`,-1)])),J(`button`,{type:`button`,onClick:t[3]||=e=>N(f.value)},[Y(V(Vs)),t[25]||=X(`编辑`,-1)]),J(`button`,{type:`button`,class:`danger-text`,onClick:t[4]||=e=>le(f.value)},[Y(V(ws)),t[26]||=X(`归档`,-1)])])],32)])):Z(``,!0)]),_:1}),Y(eo,{name:`countdown-compose`},{default:Sn(()=>[s.value?(K(),q(`div`,{key:0,class:`countdown-modal-mask app-sheet-mask`,onClick:$(C,[`self`])},[J(`form`,{class:`countdown-modal app-sheet app-sheet--create`,style:oe(v.value),role:`dialog`,"aria-modal":`true`,"aria-labelledby":`countdown-dialog-title`,onSubmit:$(se,[`prevent`]),onKeydown:[ds(C,[`esc`]),w]},[J(`header`,Pd,[J(`div`,null,[J(`small`,null,L(l.value?`调整重要日子`:`快速记下重要日子`),1),J(`h3`,Fd,L(l.value?`编辑倒数日`:`新建倒数日`),1)]),J(`button`,{type:`button`,"aria-label":`关闭`,onClick:C},[Y(V(Ys))])]),J(`div`,Id,[J(`label`,null,[t[27]||=X(`名称`,-1),W(J(`input`,{ref_key:`titleInput`,ref:y,"onUpdate:modelValue":t[5]||=e=>g.value.title=e,maxlength:`200`,required:``,placeholder:`例如:去北海道旅行`,autofocus:``},null,512),[[es,g.value.title]])]),g.value.calendar_mode===`solar`?(K(),q(`label`,Ld,[t[28]||=X(`日期`,-1),W(J(`input`,{"onUpdate:modelValue":t[6]||=e=>g.value.event_date=e,type:`date`,required:``},null,512),[[es,g.value.event_date]])])):Z(``,!0),J(`label`,null,[t[30]||=X(`类型`,-1),W(J(`select`,{"onUpdate:modelValue":t[7]||=e=>g.value.kind=e,onChange:ae},[...t[29]||=[J(`option`,{value:`countdown`},`倒数日`,-1),J(`option`,{value:`anniversary`},`纪念日`,-1),J(`option`,{value:`birthday`},`生日`,-1)]],544),[[rs,g.value.kind]])]),J(`details`,{class:`countdown-advanced`,open:p.value,onToggle:t[15]||=e=>p.value=e.target.open},[J(`summary`,null,[t[31]||=J(`span`,null,`更多设置`,-1),Y(V(Os))]),J(`label`,null,[t[32]||=X(`历法`,-1),W(J(`select`,{"onUpdate:modelValue":t[8]||=e=>g.value.calendar_mode=e},[J(`option`,zd,L(V(Dc)(`solar`)),1),J(`option`,Bd,L(V(Dc)(`lunar`)),1)],512),[[rs,g.value.calendar_mode]])]),g.value.calendar_mode===`lunar`?(K(),q(`div`,Vd,[J(`label`,null,[t[33]||=X(`年份`,-1),W(J(`input`,{"onUpdate:modelValue":t[9]||=e=>g.value.lunar_year=e,type:`number`,min:`1900`,max:`2099`,required:``},null,512),[[es,g.value.lunar_year,void 0,{number:!0}]])]),J(`label`,null,[t[34]||=X(`月份`,-1),W(J(`select`,{"onUpdate:modelValue":t[10]||=e=>g.value.lunar_month=e},[(K(),q(G,null,Ir(12,e=>J(`option`,{key:e,value:e},L(e)+`月`,9,Hd)),64))],512),[[rs,g.value.lunar_month,void 0,{number:!0}]])]),J(`label`,null,[t[35]||=X(`日期`,-1),W(J(`select`,{"onUpdate:modelValue":t[11]||=e=>g.value.lunar_day=e},[(K(),q(G,null,Ir(30,e=>J(`option`,{key:e,value:e},L(e)+`日`,9,Ud)),64))],512),[[rs,g.value.lunar_day,void 0,{number:!0}]])])])):Z(``,!0),g.value.calendar_mode===`lunar`?(K(),q(`label`,Wd,[W(J(`input`,{"onUpdate:modelValue":t[12]||=e=>g.value.leap_month=e,type:`checkbox`},null,512),[[ts,g.value.leap_month]]),t[36]||=X(` 闰月(如果是闰月,勾选这里)`,-1)])):Z(``,!0),J(`label`,null,[W(J(`input`,{"onUpdate:modelValue":t[13]||=e=>g.value.ignore_year=e,type:`checkbox`},null,512),[[ts,g.value.ignore_year]]),t[37]||=X(` 忽略年份`,-1),g.value.calendar_mode===`lunar`?(K(),q(`span`,Gd,`,每年按农历计算`)):Z(``,!0)]),J(`label`,null,[t[39]||=X(`重复`,-1),W(J(`select`,{"onUpdate:modelValue":t[14]||=e=>g.value.repeat_rule=e,disabled:g.value.ignore_year},[...t[38]||=[J(`option`,{value:`none`},`不重复`,-1),J(`option`,{value:`weekly`},`每周`,-1),J(`option`,{value:`monthly`},`每月`,-1),J(`option`,{value:`yearly`},`每年`,-1)]],8,Kd),[[rs,g.value.repeat_rule]])])],40,Rd)]),J(`footer`,qd,[J(`button`,{type:`button`,class:`secondary`,disabled:c.value,onClick:C},`取消`,8,Jd),J(`button`,{class:`primary-small`,disabled:c.value},`保存`,8,Yd)])],36)])):Z(``,!0)]),_:1})],2))}}),Zd=[`aria-label`],Qd=sr({__name:`FloatingAddButton`,props:{label:{default:`添加`}},emits:[`activate`],setup(e,{emit:t}){let n=e,r=t,i=B(!1),a=B(null),o=B(null),s=!1,c=Q(()=>a.value?{left:`${a.value.x}px`,top:`${a.value.y}px`,right:`auto`,bottom:`auto`}:{});function l(e){let t=e.currentTarget,n=t.getBoundingClientRect();o.value={id:e.pointerId,startX:e.clientX,startY:e.clientY,originX:n.left,originY:n.top};try{t.setPointerCapture?.(e.pointerId)}catch{}}function u(e){let t=o.value;if(!t||t.id!==e.pointerId)return;let n=e.clientX-t.startX,r=e.clientY-t.startY;(i.value||Nc(n,r))&&(i.value=!0,a.value=Mc(t.originX+n,t.originY+r,window.innerWidth,window.innerHeight,56,14,84))}function d(e){let t=o.value;if(!t||t.id!==e.pointerId)return;let n=i.value||Nc(e.clientX-t.startX,e.clientY-t.startY);o.value=null,i.value=!1,n&&(s=!0,window.setTimeout(()=>{s=!1},180))}function f(e){if(s)return;let t=e.currentTarget.getBoundingClientRect();r(`activate`,{x:t.left+t.width/2,y:t.top+t.height/2})}return(e,t)=>(K(),q(`button`,{class:F([`unified-fab`,{dragging:i.value}]),style:oe(c.value),"aria-label":n.label,onPointerdown:l,onPointermove:u,onPointerup:d,onPointercancel:d,onClick:f},[Y(V(Us))],46,Zd))}}),$d=[`aria-checked`,`disabled`],ef=sr({__name:`CompletedFilterPill`,props:{modelValue:{type:Boolean},disabled:{type:Boolean,default:!1}},emits:[`update:modelValue`],setup(e,{emit:t}){let n=e,r=t;function i(){n.disabled||r(`update:modelValue`,!n.modelValue)}return(t,n)=>(K(),q(`button`,{type:`button`,class:`completed-filter-pill`,role:`switch`,"aria-checked":e.modelValue,"aria-label":`显示已完成`,disabled:e.disabled,onClick:i},[...n[0]||=[J(`span`,{class:`completed-filter-pill__label`},`显示已完成`,-1),J(`span`,{class:`completed-filter-pill__track`,"aria-hidden":`true`},[J(`span`,{class:`completed-filter-pill__thumb`})],-1)]],8,$d))}});function tf(e){let t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e);if(!t)return null;let n=Number(t[1]),r=Number(t[2])-1,i=Number(t[3]),a=new Date(n,r,i);return a.getFullYear()===n&&a.getMonth()===r&&a.getDate()===i?a:null}function nf(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,`0`)}-${String(e.getDate()).padStart(2,`0`)}`}function rf(e,t){let n=new Date(e.getFullYear(),e.getMonth(),e.getDate());return n.setDate(n.getDate()+t),n}function af(e,t){let n=e.getDate(),r=new Date(e.getFullYear(),e.getMonth()+t,1),i=new Date(r.getFullYear(),r.getMonth()+1,0).getDate();return r.setDate(Math.min(n,i)),r}function of(e,t){if(t===`ArrowLeft`)return rf(e,-1);if(t===`ArrowRight`)return rf(e,1);if(t===`ArrowUp`)return rf(e,-7);if(t===`ArrowDown`)return rf(e,7);if(t===`PageUp`)return af(e,-1);if(t===`PageDown`)return af(e,1);let n=(e.getDay()+6)%7;return t===`Home`?rf(e,-n):t===`End`?rf(e,6-n):new Date(e)}function sf(e,t,n){let r=new Date(e.getFullYear(),e.getMonth(),1),i=rf(r,-((r.getDay()+6)%7)),a=nf(t),o=n?nf(n):``;return Array.from({length:42},(t,n)=>{let r=rf(i,n),s=nf(r);return{date:r,value:s,inMonth:r.getMonth()===e.getMonth(),isToday:s===a,isSelected:s===o}})}function cf(e,t,n,r){let i=Math.min(Math.max(e.left,12),t-328-12),a=e.bottom+8,o=e.top-r-8,s=Math.max(12,n-r-12);return{left:i,top:a+r<=n-12?a:o>=12?o:Math.min(Math.max(e.bottom-e.height+8,12),s)}}var lf={class:`calendar-picker__header`},uf={id:`calendar-picker-title`},df={class:`calendar-picker__weekdays`,"aria-hidden":`true`},ff=[`data-date`,`aria-label`,`aria-selected`,`aria-current`,`tabindex`,`onFocus`,`onClick`],pf={class:`calendar-picker__footer`},mf=sr({__name:`CalendarPicker`,props:{open:{type:Boolean},modelValue:{},anchor:{}},emits:[`update:open`,`update:modelValue`],setup(e,{emit:t}){let n=e,r=t,i=B(null),a=B(``),o=B(new Date),s=B(new Date),c=B(!1),l=B({left:12,top:12}),u=[`一`,`二`,`三`,`四`,`五`,`六`,`日`],d=Q(()=>new Intl.DateTimeFormat(`zh-CN`,{year:`numeric`,month:`long`}).format(s.value)),f=Q(()=>sf(s.value,new Date,tf(a.value))),p=Q(()=>c.value?void 0:{left:`${l.value.left}px`,top:`${l.value.top}px`}),m=null;function h(){r(`update:open`,!1)}function g(e){a.value=e;let t=tf(e);o.value=t,s.value=new Date(t.getFullYear(),t.getMonth(),1)}function _(){r(`update:modelValue`,a.value),h()}function v(){g(nf(new Date))}function y(e){let t=new Date(s.value.getFullYear(),s.value.getMonth()+e,1),n=new Date(t.getFullYear(),t.getMonth()+1,0).getDate();b(new Date(t.getFullYear(),t.getMonth(),Math.min(o.value.getDate(),n)))}function b(e){o.value=e,s.value=new Date(e.getFullYear(),e.getMonth(),1),un(()=>i.value?.querySelector(`[data-date="${nf(e)}"]`)?.focus())}function x(e){[`ArrowLeft`,`ArrowRight`,`ArrowUp`,`ArrowDown`,`PageUp`,`PageDown`,`Home`,`End`].includes(e.key)?(e.preventDefault(),b(of(o.value,e.key))):(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),g(nf(o.value)))}function S(e){if(e.key===`Escape`){e.preventDefault(),h();return}if(e.key!==`Tab`||!i.value)return;let t=[...i.value.querySelectorAll(`button:not([disabled])`)];if(!t.length)return;let n=t[0],r=t[t.length-1];e.shiftKey&&document.activeElement===n?(e.preventDefault(),r.focus()):!e.shiftKey&&document.activeElement===r&&(e.preventDefault(),n.focus())}function C(e){!n.open||c.value||i.value?.contains(e.target)||n.anchor?.contains(e.target)||h()}function w(){c.value=window.matchMedia(`(max-width: 600px)`).matches,!c.value&&n.anchor&&i.value&&(l.value=cf(n.anchor.getBoundingClientRect(),window.innerWidth,window.innerHeight,i.value.getBoundingClientRect().height))}return On(()=>n.open,async e=>{if(e){m=document.activeElement;let e=tf(n.modelValue)||new Date;a.value=n.modelValue,o.value=e,s.value=new Date(e.getFullYear(),e.getMonth(),1),w(),document.addEventListener(`pointerdown`,C),window.addEventListener(`resize`,w),await un(),w(),i.value?.querySelector(`[data-date="${nf(e)}"]`)?.focus()}else document.removeEventListener(`pointerdown`,C),window.removeEventListener(`resize`,w),m?.focus()},{immediate:!0}),Tr(()=>{document.removeEventListener(`pointerdown`,C),window.removeEventListener(`resize`,w)}),(t,n)=>(K(),aa(Un,{to:`body`},[e.open?(K(),q(`div`,{key:0,class:F([`calendar-picker-layer`,{compact:c.value}]),onClick:n[3]||=$(e=>c.value&&h(),[`self`])},[J(`section`,{ref_key:`dialog`,ref:i,class:F([`calendar-picker`,{compact:c.value}]),style:oe(p.value),role:`dialog`,"aria-modal":`true`,"aria-labelledby":`calendar-picker-title`,onKeydown:S},[J(`header`,lf,[J(`button`,{type:`button`,"aria-label":`上个月`,onClick:n[0]||=e=>y(-1)},[Y(V(ks))]),J(`h3`,uf,L(d.value),1),J(`button`,{type:`button`,"aria-label":`下个月`,onClick:n[1]||=e=>y(1)},[Y(V(As))]),c.value?(K(),q(`button`,{key:0,class:`calendar-picker__close`,type:`button`,"aria-label":`关闭日期选择器`,onClick:h},[Y(V(Ys))])):Z(``,!0)]),J(`div`,df,[(K(),q(G,null,Ir(u,e=>J(`span`,{key:e},L(e),1)),64))]),J(`div`,{class:`calendar-picker__grid`,role:`grid`,"aria-label":`日期`,onKeydown:x},[(K(!0),q(G,null,Ir(f.value,e=>(K(),q(`button`,{key:e.value,type:`button`,role:`gridcell`,"data-date":e.value,class:F({outside:!e.inMonth,today:e.isToday,selected:e.isSelected}),"aria-label":e.value,"aria-selected":e.isSelected,"aria-current":e.isToday?`date`:void 0,tabindex:e.value===V(nf)(o.value)?0:-1,onFocus:t=>o.value=e.date,onClick:t=>g(e.value)},L(e.date.getDate()),43,ff))),128))],32),J(`footer`,pf,[J(`button`,{type:`button`,"data-action":`today`,onClick:v},`今天`),J(`button`,{type:`button`,"data-action":`clear`,onClick:n[2]||=e=>a.value=``},`清除`),n[4]||=J(`span`,null,null,-1),J(`button`,{type:`button`,"data-action":`cancel`,onClick:h},`取消`),J(`button`,{type:`button`,class:`calendar-picker__done`,"data-action":`done`,onClick:_},`完成`)])],38)],2)):Z(``,!0)]))}}),hf=864e5,gf=6e4,_f=36e5,vf=/^(\d{4})-(\d{2})-(\d{2})$/,yf=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,3}))?)?(Z|[+-]\d{2}:\d{2})?$/;function bf(e,t){return new Date(Date.UTC(e,t,0)).getUTCDate()}function xf(e){return e.month>=1&&e.month<=12&&e.day>=1&&e.day<=bf(e.year,e.month)&&e.hour>=0&&e.hour<=23&&e.minute>=0&&e.minute<=59&&e.second>=0&&e.second<=59}function Sf(e){return{year:Number(e[1]),month:Number(e[2]),day:Number(e[3]),hour:Number(e[4]??0),minute:Number(e[5]??0),second:Number(e[6]??0),millisecond:Number((e[7]??``).padEnd(3,`0`))}}function Cf(e,t){return e.getFullYear()===t.year&&e.getMonth()+1===t.month&&e.getDate()===t.day&&e.getHours()===t.hour&&e.getMinutes()===t.minute&&e.getSeconds()===t.second&&e.getMilliseconds()===t.millisecond}function wf(e,t){try{if(typeof e!=`string`||!e||e.trim()!==e)return null;let n=e.match(vf);if(n){let t=Sf(n);if(!xf(t))return null;let r=new Date(t.year,t.month-1,t.day);return!Number.isFinite(r.getTime())||!Cf(r,t)?null:{date:r,datetime:e}}let r=e.match(yf);if(!r)return null;let i=Sf(r);if(!xf(i))return null;let a=r[8];if(a&&a!==`Z`){let[e,t]=a.slice(1).split(`:`).map(Number);if(e>14||t>59||e===14&&t!==0)return null}let o=a?new Date(e):new Date(i.year,i.month-1,i.day,i.hour,i.minute,i.second,i.millisecond);if(!Number.isFinite(o.getTime())||!a&&!Cf(o,i))return null;if(!t){let e=new Date(o.getFullYear(),o.getMonth(),o.getDate());return{date:e,datetime:Tf(e)}}return{date:o,datetime:o.toISOString()}}catch{return null}}function Tf(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,`0`)}-${String(e.getDate()).padStart(2,`0`)}`}function Ef(e){return Date.UTC(e.getFullYear(),e.getMonth(),e.getDate())/hf}function Df(e,t){return Ef(e)-Ef(t)}function Of(e,t){let n=`${e.getMonth()+1}月${e.getDate()}日`;return e.getFullYear()===t?n:`${e.getFullYear()}年${n}`}function kf(e){return`${e.getFullYear()}年${e.getMonth()+1}月${e.getDate()}日`}function Af(e){return`${String(e.getHours()).padStart(2,`0`)}:${String(e.getMinutes()).padStart(2,`0`)}`}function jf(e){return e===0?`已完成(原定今天)`:e<0?`已完成(原定${Math.abs(e)}天前)`:`已完成(原定${e}天后)`}function Mf(e){if(e>0)return e<_f?`还有${Math.ceil(e/gf)}分钟`:e0?`还有${r}天`:`已过期${Math.abs(r)}天`,c=e.completed?e.dueHasTime?o:`已完成`:e.dueHasTime?Mf(t.date.getTime()-e.nowMs):r===0?`今天`:`${Math.abs(r)}天`,l=e.completed?`completed`:e.dueHasTime?t.date.getTime()Nf(t));return(t,r)=>n.value?(K(),q(`span`,{key:0,class:F([`task-due`,[`task-due--${n.value.state}`,{"task-due--timed":e.dueHasTime}]])},[J(`time`,{class:`task-due__text`,datetime:n.value.datetime,title:n.value.fullText,"aria-label":n.value.fullText},[e.dueHasTime?(K(),q(`span`,Ff,L(n.value.absoluteText),1)):Z(``,!0),e.dueHasTime?(K(),q(`span`,If,` · `)):Z(``,!0),J(`span`,Lf,L(n.value.relativeText),1)],8,Pf)],2)):Z(``,!0)}});function zf(e){let t=new Date(e),n=new Date(e);n.setSeconds(0,0),n.setMinutes(n.getMinutes()+1);let r=new Date(t.getFullYear(),t.getMonth(),t.getDate()+1).getTime();return Math.max(1,Math.min(n.getTime(),r)-e)}function Bf(){let e=B(Date.now()),t;function n(){t!==void 0&&(window.clearTimeout(t),t=void 0)}function r(){n(),!document.hidden&&(t=window.setTimeout(()=>{e.value=Date.now(),r()},zf(Date.now())))}function i(){e.value=Date.now(),r()}function a(){document.hidden?n():i()}return Sr(()=>{document.addEventListener(`visibilitychange`,a),window.addEventListener(`focus`,i),window.addEventListener(`pageshow`,i),r()}),Er(()=>{n(),document.removeEventListener(`visibilitychange`,a),window.removeEventListener(`focus`,i),window.removeEventListener(`pageshow`,i)}),e}var Vf={key:0,class:`center`},Hf={key:1,class:`auth-shell`},Uf={class:`auth-card`},Wf={key:0,role:`alert`},Gf={class:`brand-row`},Kf={class:`primary-nav`},qf={class:`sidebar-create-wrap`},Jf=[`aria-expanded`],Yf={key:0,class:`sidebar-popover sidebar-create-menu`},Xf={class:`folders`},Zf=[`data-folder-id`],Qf=[`title`,`aria-label`,`onClick`],$f={class:`row-actions`},ep=[`aria-expanded`,`onClick`],tp=[`data-list-id`,`onPointermove`,`onPointerup`],np=[`onPointerdown`,`onPointermove`,`onPointerup`],rp=[`title`,`aria-label`,`onClick`],ip={class:`row-actions`},ap=[`aria-expanded`,`onClick`],op=[`data-list-id`,`onPointermove`,`onPointerup`],sp=[`onPointerdown`,`onPointermove`,`onPointerup`],cp=[`title`,`aria-label`,`onClick`],lp={class:`row-actions`},up=[`aria-expanded`,`onClick`],dp={class:`archived-lists`},fp=[`aria-expanded`,`disabled`],pp={id:`archived-task-lists`,class:`archived-list-items`},mp=[`title`],hp={class:`archived-row-menu`},gp=[`aria-label`,`aria-expanded`,`onClick`],_p={class:`sidebar-management`,"aria-label":`管理`},vp=[`aria-label`],yp={class:`app-sheet__header`},bp={class:`app-sheet__body`},xp=[`disabled`],Sp=[`disabled`],Cp=[`aria-expanded`],wp={key:0,class:`list-move-menu`,role:`menu`,"aria-label":`选择目标文件夹`},Tp=[`disabled`,`onClick`],Ep={class:`topbar`},Dp=[`aria-label`,`aria-expanded`],Op={class:`topbar-title`},kp=[`title`],Ap={key:0,class:`topbar-actions`},jp=[`disabled`],Mp={class:`search-pull-hint`,"aria-hidden":`true`},Np={class:`search`},Pp={key:0,class:`today-board`,"aria-label":`今日进度`},Fp={class:`today-track-head`},Ip=[`aria-valuemax`,`aria-valuenow`],Lp={class:`today-track-head`},Rp=[`aria-valuemax`,`aria-valuenow`],zp={key:0,class:`overdue-section`},Bp={class:`section-heading overdue-heading`},Vp={class:`task-list overdue-list`},Hp=[`data-task-id`],Up=[`aria-label`,`onClick`],Wp=[`onClick`,`onKeydown`],Gp=[`title`],Kp={key:0,class:`meta`},qp={class:`meta-item`},Jp={key:0,class:`task-tail`},Yp=[`data-task-id`,`onPointerdown`,`onPointermove`,`onPointerup`,`onPointercancel`,`onTouchstartPassive`,`onTouchmovePassive`,`onTouchend`,`onTouchcancel`],Xp=[`aria-label`,`aria-pressed`,`onClick`],Zp=[`onClick`,`onKeydown`],Qp=[`title`],$p={key:0,class:`task-tail`},em={id:`today-tasks`,class:`section-heading today-section-anchor`},tm={key:2,class:`list-toolbar`},nm={key:0},rm={key:3,class:`pager`},im=[`disabled`],am=[`disabled`],om=[`data-task-id`,`onPointerdown`,`onPointermove`,`onPointerup`,`onPointercancel`,`onTouchstartPassive`,`onTouchmovePassive`,`onTouchend`,`onTouchcancel`],sm=[`disabled`,`onPointerdown`,`onPointermove`,`onPointerup`],cm=[`aria-label`,`aria-pressed`,`onClick`],lm=[`aria-expanded`,`onClick`,`onKeydown`],um=[`title`],dm={key:0,class:`meta`},fm={class:`meta-item`},pm={key:2,class:`task-tail`},mm={key:3,class:`task-actions`},hm=[`onClick`],gm=[`onClick`],_m={key:4,class:`task-actions`},vm=[`onClick`],ym=[`data-task-id`,`onPointerdown`,`onPointermove`,`onPointerup`,`onPointercancel`,`onTouchstartPassive`,`onTouchmovePassive`,`onTouchend`,`onTouchcancel`],bm=[`onPointerdown`,`onPointermove`,`onPointerup`],xm=[`aria-label`,`aria-pressed`,`onClick`],Sm=[`onClick`,`onKeydown`],Cm=[`title`],wm={key:2,class:`task-tail`},Tm={key:3,class:`task-actions`},Em=[`onClick`],Dm={key:0,class:`empty`},Om={key:4,id:`today-habits`,class:`today-section-anchor`},km={class:`section-heading`},Am={class:`detail-head`},jm={class:`detail-form`},Mm={class:`detail-title`},Nm=[`value`],Pm={class:`task-detail-due-row`},Fm=[`value`],Im=[`disabled`],Lm={key:0,class:`field-hint`},Rm={key:0,class:`after-completion-fields`},zm={key:1,class:`repeat-custom-fields`},Bm={key:0},Vm={class:`weekday-picker`},Hm=[`value`],Um={key:1},Wm={key:2},Gm={key:3},Km={key:2,role:`alert`,class:`field-error`},qm={class:`field markdown`},Jm={class:`field-label`},Ym=[`innerHTML`],Xm={class:`subtasks`},Zm={class:`field-label`},Qm=[`onClick`],$m={class:`check`},eh={key:0,class:`hint`},th=[`open`],nh={class:`more-settings-body`},rh={class:`detail-actions`},ih=[`disabled`],ah={class:`more-sheet-head app-sheet__header`},oh={class:`app-sheet__body`},sh={class:`bottom`,"aria-label":`主要导航`},ch=[`aria-current`],lh=[`aria-current`],uh=[`aria-current`],dh=[`aria-current`],fh={class:`app-sheet__header`},ph={id:`task-compose-title`},mh={class:`app-sheet__body`},hh=[`aria-invalid`],gh={key:0,id:`compose-title-error`,role:`alert`,class:`field-error`},_h={class:`task-compose-row`},vh=[`value`],yh={class:`task-compose-date-actions`,"aria-label":`截止时间`},bh={class:`task-compose-date-control`},xh=[`aria-expanded`],Sh={key:1,class:`task-compose-time-chip`},Ch=[`disabled`],wh={key:0,class:`field-hint`},Th={key:0,class:`after-completion-fields`},Eh={key:1,role:`alert`,class:`field-error`},Dh={key:2,class:`repeat-custom-fields`},Oh={key:0},kh={class:`weekday-picker`},Ah=[`value`],jh={key:1},Mh={key:2},Nh={key:3},Ph={class:`app-sheet__footer`},Fh=[`disabled`],Ih={key:0,class:`toast`,role:`status`},Lh={key:4,class:`error-toast`,role:`alert`},Rh={id:`purge-list-title`},zh={key:0,role:`alert`,class:`purge-list-error`},Bh={class:`modal-actions`},Vh=[`disabled`],Hh=[`disabled`],Uh={class:`modal-box`,role:`dialog`,"aria-modal":`true`},Wh={key:0},Gh=[`aria-invalid`],Kh={key:0,id:`modal-name-error`,role:`alert`,class:`field-error`},qh={class:`modal-actions`},Jh=`dodo.navigation`,Yh=`dodo.show-completed`,Xh=50;hs(sr({__name:`App`,setup(e){let t=B(null),n=B(!1),r=B(!1),i=B(``),a=B(``),o=B([]),s=B([]),c=B([]),l=B(!1),u=B(null),d=B(null),f=B(null),p=B({}),m=null,h=B(null),g=B(!1),_=B(``),v=B(null),y=B(null),b=null,x=B([]),S=B([]),C=B([]),w=dc(window.localStorage,Jh),T=B(w.listId),E=B(w.view),D=B(null),O=B(!1),k=B(null),A=B(!1),j=B(null),ee=B(void 0),M=B(``),te=B(`after`),ne,re,ie=``,N=B(``),ae=B(null),se=B(!1),ce=B(0),le=null,P=Q(()=>[`tasks`,`today`,`upcoming`,`trash`].includes(E.value)),ue=Q(()=>({"--search-pull":`${ce.value}px`,"--search-pull-opacity":String(Math.min(1,ce.value/56))})),de=B(``),fe=B(``),I=B(!1),pe=B(!1),me=Bf(),he=B(!1),ge=B(!1),_e=B(!1),ve=B(!1),ye=B(!1),be=B(!1),xe=B(pc(window.localStorage,Yh,!0)),R=B(1),Se=B(0),Ce=B(0),we=B(0),Te=B(0),Ee=B(0),De=B(0),Oe=Q(()=>Math.max(1,Math.ceil(Se.value/Xh))),ke=B(new Set),Ae=B(new Set),je=B(new Set),Me=B(new Set);function Ne(e,t){let n=new Set(Me.value);t?n.add(e):n.delete(e),Me.value=n}let Pe=bl(e=>{je.value=new Set(je.value).add(e)},e=>{let t=new Set(je.value);t.delete(e),je.value=t}),Fe=B(!1),Ie=B(null),Le=B(null),Re=B({}),ze=B(null),Be=B(``),Ve=B(!1),He=B(!1),Ue=B(``),We=B(``),Ge=B(``),Ke=B(``),qe=B(!1),Je=B(`12:00`),Ye=B(!1),Xe=B(null),Ze=B(null),Qe=B(0),$e=B(``),et=B(`none`),tt=B(`1`),nt=B(``),rt=B(`none`),it=B(`1`),at=B(``),ot=B(null),st=B(!1),ct=B(!1),lt=()=>({frequency:`daily`,interval:1,weekdays:[],monthDays:[],endMode:`never`,count:10,until:``}),ut=B(lt()),dt=B(lt()),ft=[{value:`MO`,label:`一`},{value:`TU`,label:`二`},{value:`WE`,label:`三`},{value:`TH`,label:`四`},{value:`FR`,label:`五`},{value:`SA`,label:`六`},{value:`SU`,label:`日`}],pt=0,mt=0,ht=B(null),gt=B(null),_t=B({x:window.innerWidth-43,y:window.innerHeight-104}),vt=``,yt=Q(()=>({"--fab-origin-x":`${_t.value.x}px`,"--fab-origin-y":`${_t.value.y}px`}));function bt(){let e=s.value.find(e=>e.is_inbox)?.id||T.value;Ue.value=``,We.value=``,Ge.value=E.value===`tasks`&&T.value?T.value:e,Ke.value=E.value===`today`?sc():``,qe.value=!1,Je.value=`12:00`,Qe.value=0,$e.value=``,et.value=`none`,tt.value=`1`,nt.value=``,ut.value=lt(),Ye.value=!1,He.value=!0,un(()=>document.querySelector(`.task-compose-input`)?.focus())}let xt=Q(()=>E.value===`today`?`添加今天任务`:`添加任务`),St=Q(()=>{if(!Ke.value)return`设置截止日期`;let[e,t,n]=Ke.value.split(`-`).map(Number),r=new Date(e,t-1,n);return Number.isNaN(r.getTime())?`设置截止日期`:new Intl.DateTimeFormat(`zh-CN`,{month:`short`,day:`numeric`,weekday:`short`}).format(r)});function Ct(){Ke.value=``,qe.value=!1,et.value=`none`}function wt(){qe.value=!0,un(()=>{let e=Ze.value;try{e?.showPicker?.()}catch{e?.focus()}})}function Tt(){Ye.value=!1,He.value=!1}function Et(e){_t.value=e,E.value===`habits`?ht.value?.openHabitComposer(e):E.value===`countdowns`?gt.value?.openCountdownComposer(e):[`tasks`,`today`,`upcoming`].includes(E.value)&&bt()}async function Dt(e,t,n,r,i){if(t!==`none`&&!e.due_at)throw Error(`请先设置截止时间`);if(t===`none`)return i&&await H(`/recurrences/${i.id}`,{method:`DELETE`}),null;let a=ac(t,{afterCompletionDays:r,repeatConfig:n});return i?await H(`/recurrences/${i.id}`,{method:`PATCH`,body:JSON.stringify(a)}):await H(`/recurrences`,{method:`POST`,body:JSON.stringify({task_id:e.id,...a})})}async function Ot(e){let t=++pt;st.value=!0,ot.value=null,rt.value=`none`,it.value=`1`,at.value=``;try{let n=await H(`/tasks/${e.id}/recurrence`);if(t!==pt||D.value?.id!==e.id)return;ot.value=n;let r=oc(n);rt.value=r.option,it.value=String(r.afterCompletionDays),dt.value=n?.rrule?ic(n.rrule):lt()}catch(e){t===pt&&en(e)}finally{t===pt&&(st.value=!1)}}async function kt(){let e=el(Ue.value);if(e.error){We.value=e.error;return}let t=e.value;if(Ue.value=t,We.value=``,Ge.value)try{let e=ac(et.value,{afterCompletionDays:tt.value,repeatConfig:ut.value}),n=Ke.value?`${Ke.value}T${qe.value?Je.value:`23:59`}`:``;if(et.value!==`none`&&!n)throw Error(`请先设置截止时间`);let r=await H(`/tasks`,{method:`POST`,body:JSON.stringify({title:t,list_id:Ge.value,due_at:lc(n),due_has_time:qe.value,priority:Qe.value,description:$e.value,...e})});_c(E.value)&&(x.value.push(r),Se.value=kc(Se.value)),E.value===`today`&&ln(),He.value=!1,U(`任务已添加`)}catch(e){nt.value=e instanceof Error?e.message:`添加失败`,en(e)}}function At(){window.matchMedia(`(max-width: 930px)`).matches?he.value=!he.value:ge.value=!ge.value}let jt=B(!1),Mt=B(``),Nt=B(``),Pt=B(``),Ft=B(``),It=B(`确定`),Lt=B(null);function z(e,t=``,n=``,r=`确定`){return new Promise(i=>{Mt.value=e,Nt.value=t,Pt.value=n,Ft.value=``,It.value=r,jt.value=!0,Lt.value=i})}function Rt(){jt.value=!1,Lt.value&&=(Lt.value(null),null)}function zt(){if(Nt.value){let e=el(Pt.value);if(e.error){Ft.value=e.error;return}Pt.value=e.value}jt.value=!1,Lt.value&&=(Lt.value(Pt.value),null)}let Bt=Q(()=>E.value===`trash`?`回收站`:E.value===`today`?`今天`:E.value===`upcoming`?`最近 7 天`:E.value===`habits`?`习惯`:E.value===`countdowns`?`倒数日`:E.value===`settings`?`设置与数据`:s.value.find(e=>e.id===T.value)?.name||`收集箱`),Vt=Q(()=>`${De.value} / ${Ee.value}`),Ht=(e,t)=>`${t>0?Math.min(100,Math.round(e/t*100)):0}%`,Ut=Q(()=>Ht(Te.value,we.value)),Wt=Q(()=>Ht(De.value,Ee.value));function Gt(e){document.getElementById(e)?.scrollIntoView({behavior:`smooth`,block:`start`})}function Kt(e){Ee.value=e.total,De.value=e.completed}let qt=Q(()=>E.value===`trash`?C.value:x.value),Jt=Q(()=>{let e=new Date,t=new Date(e);t.setDate(t.getDate()+7);let n=qt.value;return[`habits`,`settings`,`countdowns`].includes(E.value)?[]:(E.value===`today`&&(n=n.filter(t=>t.due_at&&new Date(t.due_at).toDateString()===e.toDateString())),E.value===`upcoming`&&(n=n.filter(n=>n.due_at&&new Date(n.due_at)>=e&&new Date(n.due_at)<=t)),N.value.trim()?$s(n,N.value):n)}),Yt=Q(()=>D.value?.subtasks??[]),Xt=Q(()=>ec(Jt.value)),Zt=Q(()=>Xt.value),Qt=Q(()=>ec(S.value)),$t;On(Ke,e=>{e||(qe.value=!1,et.value=`none`)}),On(N,()=>{$t&&window.clearTimeout($t),_c(E.value)&&(R.value=1,$t=window.setTimeout(()=>hn(),250))}),On(xe,e=>{mc(window.localStorage,Yh,e),_c(E.value)&&(R.value=1,hn())});async function H(e,t={}){let n=new Headers(t.headers||{});!n.has(`Content-Type`)&&t.body&&!(t.body instanceof FormData)&&n.set(`Content-Type`,`application/json`);let r=ml(t.method);r[`x-csrf-token`]&&n.set(`x-csrf-token`,r[`x-csrf-token`]);let i=await fetch(`/api/v1`+e,{credentials:`include`,headers:n,...t});if(!i.ok){let e=`请求失败`;try{e=pl((await i.json()).detail)}catch{}throw Error(e)}return i.status===204?null:i.json()}function U(e){fe.value=e,window.setTimeout(()=>{fe.value===e&&(fe.value=``)},2400)}function en(e){de.value=e instanceof Error?e.message:`请求失败`}async function tn(e){let t=Intl.DateTimeFormat().resolvedOptions().timeZone;t&&t!==e&&await H(`/me`,{method:`PATCH`,body:JSON.stringify({timezone:t})})}function nn(e){w.view===`tasks`&&w.listId?T.value=s.value.some(e=>e.id===w.listId)?w.listId:e:T.value=e}async function rn(){E.value===`trash`?await yn():_c(E.value)?(await hn(),(E.value===`tasks`||E.value===`upcoming`)&&Wn()):(x.value=[],Se.value=0)}async function an(){n.value=!1;try{let e=await H(`/setup/status`);if(t.value=e.initialized,e.initialized){let e=await H(`/bootstrap`);r.value=!0,o.value=e.folders??[],s.value=e.lists??[],Fe.value=!0,nn(e.inbox_id||s.value.find(e=>e.is_inbox)?.id||s.value[0]?.id||``),ke.value=new Set(o.value.map(e=>e.id)),await tn(e.user?.timezone),await sr(),mn(),await rn()}}catch{r.value=!1,t.value??=!0}finally{n.value=!0}}async function on(){de.value=``;try{await H(t.value?`/auth/login`:`/setup/initialize`,{method:`POST`,body:JSON.stringify({username:i.value,password:a.value})}),t.value=!0,r.value=!0;let e=await H(`/bootstrap`);o.value=e.folders??[],s.value=e.lists??[],Fe.value=!0,nn(e.inbox_id||s.value.find(e=>e.is_inbox)?.id||s.value[0]?.id||``),ke.value=new Set(o.value.map(e=>e.id)),await tn(e.user?.timezone),mn(),await rn()}catch(e){en(e)}}async function sn(e){let t=[],n=null;do{let r=e.includes(`?`)?`&`:`?`,i=await H(n?`${e}${r}cursor=${encodeURIComponent(n)}`:e);t.push(...i.items??i),n=i.next_cursor??null}while(n);return t}function cn(e){let t=new Date;return t.setDate(t.getDate()+e),t.setHours(0,0,0,0),t.toISOString()}async function ln(){let e=++mt;try{let t=async e=>{let t=new URLSearchParams({page:`1`,page_size:`1`});t.set(`due_from`,cn(0)),t.set(`due_to`,cn(1)),t.set(`completed`,String(e));let n=await H(`/tasks?${t}`);return Number(n.total??n.items?.length??0)},[n,r,i]=await Promise.all([t(!1),t(!0),(async()=>{let e=new URLSearchParams({page:`1`,page_size:`1`});e.set(`due_to`,cn(0)),e.set(`completed`,`false`);let t=await H(`/tasks?${e}`);return Number(t.total??t.items?.length??0)})()]);if(e!==mt||E.value!==`today`)return;Te.value=r,we.value=i+n+r}catch{}}async function dn(e=zc(`tasks`)){let t=new URLSearchParams;t.set(`due_to`,cn(0)),t.set(`completed`,`false`);let n=await sn(`/tasks?${t}`);Bc(`tasks`,e)&&(S.value=n)}async function fn(e=zc(`tasks`)){let t=new URLSearchParams({page:String(R.value),page_size:String(Xh)});N.value?t.set(`q`,N.value):E.value===`tasks`&&T.value&&t.set(`list_id`,T.value),E.value===`today`&&(t.set(`due_from`,cn(0)),t.set(`due_to`,cn(1))),E.value===`upcoming`&&(t.set(`due_from`,cn(0)),t.set(`due_to`,cn(8))),!xe.value&&E.value!==`trash`&&t.set(`completed`,`false`);let n=await H(`/tasks?${t}`);if(Bc(`tasks`,e)&&(x.value=n.items??[],Se.value=n.total??x.value.length,Ce.value=0,!xe.value&&!N.value&&E.value!==`trash`&&x.value.length===0)){let n=new URLSearchParams(t);n.set(`page`,`1`),n.set(`page_size`,`1`),n.set(`completed`,`true`);let r=await H(`/tasks?${n}`);if(!Bc(`tasks`,e))return;Ce.value=Number(r.total??r.items?.length??0)}}async function pn(e=!1){if(!e&&Fe.value)return;let[t,n]=await Promise.all([H(`/folders`),H(`/lists`)]);o.value=t,s.value=n,Fe.value=!0,s.value.some(e=>e.id===T.value)||(T.value=s.value.find(e=>e.is_inbox)?.id||s.value[0]?.id||``),ke.value=new Set(o.value.map(e=>e.id)),await sr()}async function mn(){try{await $c(async()=>{let[e,t]=await Promise.all([H(`/countdowns`),H(`/countdowns?archived=true`)]);return{items:e??[],archived:t??[]}})}catch{}}async function hn(){let e=zc(`tasks`);I.value=!0,de.value=``;try{if(Fe.value||await pn(),!Bc(`tasks`,e))return;E.value===`today`?await Uc([()=>fn(e),()=>dn(e)],ln):(await fn(e),Bc(`tasks`,e)&&(S.value=[])),Bc(`tasks`,e)&&R.value>Oe.value&&(R.value=Oe.value,await fn(e))}catch(t){Bc(`tasks`,e)&&en(t)}finally{Bc(`tasks`,e)&&(I.value=!1)}}async function gn(){Fe.value=!1,await hn()}async function _n(){if(!(pe.value||I.value)){pe.value=!0;try{E.value===`habits`?await ht.value?.refreshHabits():E.value===`today`?await Promise.all([gn(),ht.value?.refreshHabits()]):await gn()}finally{pe.value=!1}}}async function vn(){return H(`/trash?page=${R.value}&page_size=${Xh}`)}async function yn(){return I.value=!0,de.value=``,await Vc(`trash`,vn,{success:e=>{C.value=e.items??[],Se.value=e.total??C.value.length},error:en,finally:()=>{I.value=!1}})}async function bn(e,t){Tn.value+=1,E.value=e,N.value||(se.value=!1),ce.value=0,e!==`trash`&&zc(`trash`),_c(e)||(zc(`tasks`),I.value=!1,de.value=``),t&&(T.value=t),fc(window.localStorage,Jh,e,T.value),R.value=1,D.value=null,he.value=!1,_e.value=!1,ve.value=!1,He.value=!1,O.value=!1,k.value=null,e===`trash`?await yn():e===`today`?await xn():_c(e)?(await hn(),(e===`tasks`||e===`upcoming`)&&Wn()):x.value=[]}async function xn(){await hn()}function Cn(e,t,n=!0){let r=x.value.findIndex(t=>t.id===e.id);r>=0&&(x.value[r]={...x.value[r],...t});let i=S.value.findIndex(t=>t.id===e.id);i>=0&&(t.completed&&!Me.value.has(e.id)?S.value.splice(i,1):S.value[i]={...S.value[i],...t}),n&&D.value?.id===e.id&&(D.value={...D.value,...t})}async function wn(e,t,n=!0){let r=await H(`/tasks/${e.id}`,{method:`PATCH`,body:JSON.stringify({...t,version:e.version})});return Cn(e,r,n),r}let Tn=B(0),En=Hc(()=>({navigation:Tn.value,view:E.value,listId:T.value,page:R.value,query:N.value,showCompleted:xe.value}),(e,t)=>e.navigation===t.navigation&&e.view===t.view&&e.listId===t.listId&&e.page===t.page&&e.query===t.query&&e.showCompleted===t.showCompleted,hn);async function Dn(e){let t=!e.completed,n=gl({completing:t,showCompleted:xe.value});await En.run(()=>H(`/tasks/${e.id}`,{method:`PATCH`,body:JSON.stringify({completed:t,version:e.version})}),()=>U(t?`完成啦`:`已重新打开`),en,async r=>{n&&Ne(e.id,!0),Cn(e,r),t&&Pe(e.id),n&&(await yl(),Ne(e.id,!1))})}function kn(e){return e instanceof Element&&!!e.closest(`button,input,select,textarea,a,label`)}function An(e,t){if(!(E.value===`trash`||I.value||N.value||Oe.value>1)){ze.value={id:e.id,startY:t.clientY,offsetY:0},Be.value=e.id,Ve.value=!1;try{t.currentTarget.setPointerCapture(t.pointerId)}catch{}}}function jn(e){return x.value.find(t=>t.id===e)??x.value.flatMap(e=>e.subtasks??[]).find(t=>t.id===e)}function Mn(e,t){let n=ze.value;if(!n||n.id!==e.id)return;n.offsetY=t.clientY-n.startY;let r=t.currentTarget,i=document.elementsFromPoint(t.clientX,t.clientY).map(e=>e.closest(`[data-task-id]`)).find(e=>e&&e!==r.closest(`[data-task-id]`)),a=i?.dataset.taskId?jn(i.dataset.taskId):void 0;a&&a.list_id===e.list_id&&(a.parent_id??null)===(e.parent_id??null)&&tc(e,a)?(Be.value=a.id,Ve.value=!1):(Be.value=``,Ve.value=!!a)}async function Nn(e,t){let n=ze.value,r=Be.value,i=Ve.value;if(ze.value=null,Be.value=``,Ve.value=!1,i){U(`只能调整相同完成状态和截止时间档的任务顺序`);return}if(!n||n.id!==e.id||!r||r===e.id)return;let a=jn(r);if(!a||a.list_id!==e.list_id||(a.parent_id??null)!==(e.parent_id??null))return;if(!tc(e,a)){U(`只能调整相同完成状态和截止时间档的任务顺序`);return}let o=t.clientY>=n.startY?`after`:`before`,s=x.value,c=D.value,l;if(e.parent_id){let t=x.value.find(t=>t.id===e.parent_id);if(!t)return;let n=nc(t.subtasks??[],e.id,r,o);if(n===t.subtasks)return;x.value=x.value.map(e=>e.id===t.id?{...e,subtasks:n}:e),D.value?.id===t.id&&(D.value={...D.value,subtasks:n}),l=n.filter(t=>tc(e,t)).map(e=>e.id)}else{let t=nc(s,e.id,r,o);if(t===s)return;x.value=t,l=t.filter(t=>tc(e,t)).map(e=>e.id)}try{await H(`/tasks/reorder`,{method:`PUT`,body:JSON.stringify({task_ids:l})}),U(`顺序已保存`)}catch(e){x.value=s,D.value=c,en(e)}}function Pn(){ze.value=null,Be.value=``,Ve.value=!1}function Fn(e,t){if(E.value===`trash`||I.value||kn(t.target))return;let n=t.touches[0];n&&(Ie.value={id:e.id,x:n.clientX,y:n.clientY},Re.value[e.id]=0)}function In(e,t){E.value===`trash`||I.value||kn(t.target)||t.pointerType!==`touch`&&(Le.value={id:e.id,x:t.clientX,y:t.clientY})}function Ln(e,t){let n=Le.value;if(!n||n.id!==e.id)return;let r=t.clientX-n.x,i=t.clientY-n.y;Math.abs(r)>Math.abs(i)&&(!e.completed&&r>0||e.completed&&r<0)&&(Re.value[e.id]=Math.max(-92,Math.min(r,92)))}function Rn(e,t){let n=Le.value;if(!n||n.id!==e.id)return;Le.value=null;let r=t.clientX-n.x,i=t.clientY-n.y;Re.value[e.id]=0,(e.completed?r<0:r>0)&&Oc(Math.abs(r),i)&&(vt=e.id,window.setTimeout(()=>{vt===e.id&&(vt=``)},400),Dn(e))}function zn(e){Le.value=null,e&&(Re.value[e.id]=0)}function Bn(e,t){let n=Ie.value,r=t.touches[0];if(!n||n.id!==e.id||!r)return;let i=r.clientX-n.x,a=r.clientY-n.y;Math.abs(i)>Math.abs(a)&&(!e.completed&&i>0||e.completed&&i<0)&&(Re.value[e.id]=Math.max(-92,Math.min(i,92)))}async function Vn(e,t){let n=Ie.value;Ie.value=null;let r=Re.value[e.id]??0;if(Re.value[e.id]=0,!n||n.id!==e.id||E.value===`trash`||I.value)return;let i=t.changedTouches[0],a=i?i.clientX-n.x:0,o=i?i.clientY-n.y:0,s=e.completed?a<0:a>0;i&&s&&Oc(Math.abs(a),o)?(vt=e.id,window.setTimeout(()=>{vt===e.id&&(vt=``)},400),await Dn(e)):r&&(Re.value[e.id]=0)}function Hn(e){Ie.value=null,e&&(Re.value[e.id]=0)}function Wn(){Ae.value=new Set(x.value.filter(e=>e.subtasks?.length).map(e=>e.id))}function Gn(e){if(!e.subtasks?.length)return;let t=new Set(Ae.value);t.has(e.id)?t.delete(e.id):t.add(e.id),Ae.value=t}function Kn(e,t=!1){if(vt===e.id){vt=``;return}t&&Gn(e),nr(e)}async function qn(){if(E.value!==`today`)return;let e=zc(`tasks`);await Promise.all([fn(e),dn(e),ln()])}async function Jn(e){let t=D.value;if(!t||e?.expectedTaskId&&t.id!==e.expectedTaskId)return!1;let n=el(t.title);if(n.error)return de.value=n.error,!1;t.title=n.value;try{let n=lc(cc(t.due_at)),r=await wn(t,{title:t.title.trim(),description:t.description,priority:Number(t.priority),due_at:n,list_id:t.list_id},!1),i=e?.expectedSelectionToken===void 0||pt===e.expectedSelectionToken;return D.value?.id===t.id&&i&&(D.value={...D.value,...r}),await qn(),e?.showSuccess!==!1&&U(`已保存`),r}catch(e){return en(e),!1}}async function Yn(){if(ct.value||st.value)return;let e=D.value?.id;if(!e)return;ct.value=!0;let t=pt,n=D.value?.due_at?rt.value:`none`,r=structuredClone(dt.value),i=it.value,a=ot.value;at.value=``;try{let o=await Jn({showSuccess:!1,expectedTaskId:e,expectedSelectionToken:t});if(!o||pt!==t||D.value?.id!==e)return;let s=await Dt(o,n,r,i,o.due_at?a:null);if(pt!==t||D.value?.id!==e)return;ot.value=s,U(`已保存`)}catch(n){if(pt!==t||D.value?.id!==e)return;at.value=n instanceof Error?n.message:`保存失败`,en(n)}finally{ct.value=!1}}async function Xn(e){if(window.confirm(`把“${e.title}”移到回收站?`))try{await H(`/tasks/${e.id}`,{method:`DELETE`}),x.value=x.value.filter(t=>t.id!==e.id&&t.parent_id!==e.id),D.value=null,_e.value=!1,E.value===`today`&&ln(),U(`已移到回收站`)}catch(e){en(e)}}async function Zn(e,t,n){let r=await jc(t,()=>{C.value=C.value.filter(t=>t.id!==e.id),Se.value=Ac(Se.value),R.value>Oe.value&&(R.value=Oe.value)},yn);if(!r.mutated){en(r.error);return}r.refreshed?U(n):U(`${n},但列表刷新失败,请重试刷新`)}async function Qn(e){await Zn(e,()=>H(`/tasks/${e.id}/restore`,{method:`POST`}),`任务已恢复`)}async function $n(e){window.confirm(`永久删除“${e.title}”?这个操作不能撤销。`)&&await Zn(e,()=>H(`/trash/${e.id}`,{method:`DELETE`}),`任务已永久删除`)}async function er(){if(!D.value)return;let e=(await z(`添加子任务`,`子任务名称`,``,`添加`))?.trim();if(e)try{let t=await H(`/tasks`,{method:`POST`,body:JSON.stringify({title:e,list_id:D.value.list_id,parent_id:D.value.id})});D.value&&(D.value.subtasks=[...D.value.subtasks??[],t]),x.value.push(t),U(`子任务已添加`)}catch(e){en(e)}}function tr(){_e.value=!1,D.value=null}function nr(e){D.value={...e,subtasks:e.subtasks?[...e.subtasks]:[]},be.value=!1,ye.value=!1,_e.value=!0,Ot(e)}async function rr(){let e=(await z(`新建文件夹`,`文件夹名称`,``,`创建`))?.trim();if(e)try{o.value.push(await H(`/folders`,{method:`POST`,body:JSON.stringify({name:e})})),U(`文件夹已创建`)}catch(e){en(e)}}async function ir(e=null){let t=(await z(`新建清单`,`清单名称`,``,`创建`))?.trim();if(t)try{let n=await H(`/lists`,{method:`POST`,body:JSON.stringify({name:t,folder_id:e})});s.value.push(n),await bn(`tasks`,n.id),U(`清单已创建`)}catch(e){en(e)}}async function ar(e,t){let n=(await z(`重命名`,e===`lists`?`清单名称`:`文件夹名称`,t.name,`保存`))?.trim();if(n&&n!==t.name)try{let r=await H(`/${e}/${t.id}`,{method:`PATCH`,body:JSON.stringify({name:n})});Object.assign(t,r),U(`已重命名`)}catch(e){en(e)}}async function or(e,t){if(e===`lists`){if(await z(`归档清单「${t.name}」?`,``,``,`归档`)===null)return;try{let n=E.value===`tasks`&&T.value===t.id;await H(`/${e}/${t.id}`,{method:`DELETE`}),await sr(),await gn(),n&&(D.value=null,_e.value=!1,await bn(`tasks`,s.value.find(e=>e.is_inbox)?.id||``)),U(`清单已归档`)}catch(e){en(e)}return}if(await z(`删除文件夹「${t.name}」?`,``,``,`删除`)!==null)try{await H(`/${e}/${t.id}`,{method:`DELETE`}),await gn(),U(`已删除`)}catch(e){en(e)}}async function sr(){try{c.value=await H(`/lists?archived=true`)}catch{c.value=[]}}async function cr(e){u.value=null;try{await H(`/lists/${e.id}/restore`,{method:`POST`}),await sr(),await gn(),U(`清单已恢复`)}catch(e){en(e)}finally{ur()}}function lr(){c.value.length&&(l.value=!l.value,fr(!1))}function ur(){let e=Nl(m,d.value);m=null,un(()=>e?.focus())}function dr(){if(!u.value||!m||!window.matchMedia(`(min-width: 931px)`).matches)return;let e=m.getBoundingClientRect(),t=f.value?.getBoundingClientRect(),n=Ml(e,t?.width||164,t?.height||102,window.innerWidth,window.innerHeight);p.value={left:`${n.left}px`,top:`${n.top}px`}}function fr(e=!0){u.value&&(u.value=null,e?ur():m=null)}function pr(e,t){if(Dr(),u.value?.id===e.id){fr();return}m=t instanceof HTMLElement?t:null,u.value=e,p.value={},un(()=>{dr(),f.value?.querySelector(`[role="menuitem"]`)?.focus()})}function mr(){u.value&&window.matchMedia(`(min-width: 931px)`).matches&&dr()}function hr(e){if(!u.value||!window.matchMedia(`(min-width: 931px)`).matches)return;let t=e.target;t instanceof Element&&!t.closest(`.archived-row-menu,.archived-row-actions`)&&fr(!1)}function gr(e){e.key===`Escape`&&u.value&&fr()}function _r(e){b=m,h.value=e,_.value=``,u.value=null,m=null,un(()=>v.value?.focus())}function vr(){let e=b?.isConnected?b:d.value;b=null,un(()=>e?.focus())}function yr(){g.value||(h.value=null,_.value=``,vr())}function br(e){if(e.key===`Escape`&&!g.value&&yr(),e.key!==`Tab`||!y.value)return;let t=[...y.value.querySelectorAll(`button:not(:disabled)`)];if(!t.length)return;let n=jl(t.indexOf(document.activeElement),t.length,e.shiftKey);n!==null&&(e.preventDefault(),t[n].focus())}async function xr(){if(h.value&&!g.value){g.value=!0,_.value=``;try{let e=h.value.id;await H(`/lists/${h.value.id}/purge`,{method:`DELETE`}),c.value=c.value.filter(t=>t.id!==e),h.value=null,vr(),U(`清单已永久删除`)}catch(e){_.value=e instanceof Error?e.message:`永久删除失败`}finally{g.value=!1}}}function Cr(){O.value=!O.value,k.value=null}function wr(e,t){fr(!1),k.value=k.value?.item.id===t.id?null:{kind:e,item:t},O.value=!1}function Tr(e){O.value=!1,e===`folder`?rr():ir(null)}function Dr(){k.value=null,A.value=!1}function Or(e){let t=new Set(ke.value);t.has(e)?t.delete(e):t.add(e),ke.value=t}function kr(e,t){e.is_inbox||(Mr(),j.value={id:e.id,pointerId:t.pointerId,startX:t.clientX,startY:t.clientY,offsetY:0,lastX:t.clientX,lastY:t.clientY},ee.value=e.folder_id,M.value=e.id,Sl(t))}function Ar(e,t){let n=xl(t);if(t.pointerType!==`touch`){kr(e,n);return}Mr(),re={id:e.id,pointer:n},ne=window.setTimeout(()=>kr(e,n),450)}function jr(e,t){if(!j.value&&re?.id===e.id&&re.pointer.pointerId===t.pointerId){Cl({x:re.pointer.clientX,y:re.pointer.clientY},{x:t.clientX,y:t.clientY},5)&&Mr();return}Fr(e,t)}function Mr(){ne&&window.clearTimeout(ne),ne=void 0,re=void 0}function Pr(e){let t=j.value?.id,n=document.elementsFromPoint(e.clientX,e.clientY),r=n.map(e=>e.closest(`[data-list-id]`)).find(e=>e?.dataset.listId!==t);if(r?.dataset.listId){let t=s.value.find(e=>e.id===r.dataset.listId);if(t&&!t.is_inbox){ee.value=t.folder_id,M.value=t.id;let n=r.getBoundingClientRect();te.value=e.clientYe.closest(`[data-folder-id]`)).find(Boolean);if(i?.dataset.folderId){ee.value=i.dataset.folderId,M.value=``,ke.value=new Set(ke.value).add(i.dataset.folderId);return}n.some(e=>e.closest(`.list-root-drop`))&&(ee.value=null,M.value=``)}function Fr(e,t){let n=j.value;n&&n.id===e.id&&(n.offsetY=t.clientY-n.startY,n.lastX=t.clientX,n.lastY=t.clientY,Pr(t))}async function Lr(e,t,n,r=`after`){if(e.is_inbox)return;let i=s.value,a=Tl(i,e.id,t,n,r);if(a.items!==i){s.value=a.items,t&&(ke.value=new Set(ke.value).add(t));try{e.folder_id===t?await H(`/lists/reorder`,{method:`PUT`,body:JSON.stringify({folder_id:t,list_ids:a.orderedIds})}):await H(`/lists/${e.id}/move`,{method:`PUT`,body:JSON.stringify({folder_id:t,list_ids:a.orderedIds})}),U(t?`清单已移动`:`清单已移出文件夹`)}catch(e){s.value=i,en(e)}}}function Rr(e,t){Mr();let n=j.value;if(!n||n.id!==e.id)return;let r=Math.hypot(t.clientX-n.startX,t.clientY-n.startY)>5,i=ee.value??null,a=M.value&&M.value!==e.id?M.value:void 0,o=te.value;Br(),(r||i!==e.folder_id||a)&&(ie=e.id,window.setTimeout(()=>{ie===e.id&&(ie=``)},400),Lr(e,i,a,o))}function zr(e){if(ie===e.id){ie=``;return}bn(`tasks`,e.id)}function Br(){Mr(),j.value=null,ee.value=void 0,M.value=``}function Vr(){A.value=!A.value}function Hr(e){let t=k.value?.kind===`lists`?k.value.item:null;t&&(A.value=!1,Lr(t,e),Dr())}function Ur(e,t){return wl(s.value,e.id,t)!==null}function Wr(e,t){let n=wl(s.value,e.id,t);n&&(Lr(e,e.folder_id,n.targetId,n.placement),Dr())}function Gr(){R.value<=1||I.value||(--R.value,E.value===`trash`?yn():_c(E.value)&&hn())}function Kr(){R.value>=Oe.value||I.value||(R.value+=1,E.value===`trash`?yn():_c(E.value)&&hn())}function qr(){return window.matchMedia(`(max-width: 930px)`).matches}function Jr(){P.value&&(qr()&&(se.value=!0),ce.value=0,un(()=>ae.value?.focus()))}function Yr(e){if(!P.value||!qr()||e.target?.closest(`input, textarea, select, button, .task-row, .habit-row, .countdown-row`))return;let t=e.currentTarget,n=t.closest(`.shell`);Ol(t.scrollTop,n?.scrollTop??0,window.scrollY)&&e.touches.length===1&&(le=e.touches[0].clientY,ce.value=0)}function Xr(e){if(le===null||e.touches.length!==1)return;let t=e.touches[0].clientY-le;if(se.value){ce.value=Math.min(0,t),t<0&&!N.value.trim()&&e.preventDefault();return}ce.value=El(t),t>0&&e.preventDefault()}function Zr(e){if(le===null)return;let t=(e.changedTouches[0]?.clientY??le)-le;le=null,!se.value&&Dl(t)?Jr():se.value&&kl(t,N.value)&&(se.value=!1,ae.value?.blur()),ce.value=0}function Qr(){le=null,ce.value=0}function $r(e){Al(e)&&P.value&&(e.preventDefault(),Jr())}function ei(){N.value.trim()||(se.value=!1)}return Sr(()=>{document.addEventListener(`pointerdown`,hr),document.addEventListener(`keydown`,gr),document.addEventListener(`keydown`,$r),window.addEventListener(`resize`,mr),document.addEventListener(`scroll`,mr,!0),an()}),Er(()=>{document.removeEventListener(`pointerdown`,hr),document.removeEventListener(`keydown`,gr),document.removeEventListener(`keydown`,$r),window.removeEventListener(`resize`,mr),document.removeEventListener(`scroll`,mr,!0)}),(e,m)=>n.value?r.value?(K(),q(`div`,{key:2,class:F([`shell`,{"sidebar-collapsed":ge.value,"detail-open":!!D.value,"mobile-sidebar-open":he.value}])},[he.value||_e.value?(K(),q(`div`,{key:0,class:`scrim`,onClick:m[2]||=e=>{he.value=!1,_e.value=!1}})):Z(``,!0),J(`aside`,{class:F([`sidebar`,{open:he.value}]),onKeydown:m[21]||=ds(e=>{O.value=!1,fr(),Dr()},[`esc`])},[J(`div`,Gf,[m[84]||=J(`div`,{class:`brand small brand-lockup`},[J(`img`,{class:`brand-logo`,src:`/dodo-logo.svg`,alt:``}),J(`span`,{class:`brand-wordmark`},`dodo`)],-1),J(`button`,{class:`icon mobile-only`,"aria-label":`关闭菜单`,onClick:m[3]||=e=>he.value=!1},[Y(V(Ys))])]),J(`nav`,Kf,[J(`button`,{class:F({active:E.value===`today`}),onClick:m[4]||=e=>bn(`today`)},[Y(V(Rs)),m[85]||=X(`今天`,-1)],2),J(`button`,{class:F({active:E.value===`tasks`&&s.value.find(e=>e.id===T.value)?.is_inbox}),onClick:m[5]||=e=>bn(`tasks`,s.value.find(e=>e.is_inbox)?.id)},[Y(V(Is)),m[86]||=X(`收集箱`,-1)],2),J(`button`,{class:F({active:E.value===`upcoming`}),onClick:m[6]||=e=>bn(`upcoming`)},[Y(V(Ts)),m[87]||=X(`最近 7 天`,-1)],2),J(`button`,{class:F({active:E.value===`habits`}),onClick:m[7]||=e=>bn(`habits`)},[Y(V(Gs)),m[88]||=X(`习惯`,-1)],2),J(`button`,{class:F({active:E.value===`countdowns`}),onClick:m[8]||=e=>bn(`countdowns`)},[Y(V(Es)),m[89]||=X(`倒数日`,-1)],2)]),J(`div`,{class:F([`section-title list-root-drop`,{"list-drop-target":j.value&&ee.value===null&&!M.value}]),onPointermove:m[11]||=e=>j.value&&Pr(e)},[m[92]||=J(`span`,null,`我的清单`,-1),J(`span`,qf,[J(`button`,{class:`mini-icon list-create-trigger`,"aria-label":`新建清单或文件夹`,"aria-expanded":O.value,onClick:Cr},[Y(V(Us))],8,Jf),O.value?(K(),q(`span`,Yf,[J(`button`,{onClick:m[9]||=e=>Tr(`list`)},[Y(V(Rs)),m[90]||=X(`新建清单`,-1)]),J(`button`,{onClick:m[10]||=e=>Tr(`folder`)},[Y(V(Ps)),m[91]||=X(`新建文件夹`,-1)])])):Z(``,!0)])],34),J(`div`,Xf,[(K(!0),q(G,null,Ir(o.value,e=>(K(),q(`div`,{key:e.id,class:`folder-block`,"data-folder-id":e.id},[J(`div`,{class:F([`folder-row`,{"list-drop-target":j.value&&ee.value===e.id&&!M.value}]),onPointermove:m[12]||=e=>j.value&&Pr(e)},[J(`button`,{title:e.name,"aria-label":e.name,onClick:t=>Or(e.id)},[ke.value.has(e.id)?(K(),aa(V(Os),{key:0})):(K(),aa(V(As),{key:1})),Y(V(Ps)),J(`span`,null,L(e.name),1)],8,Qf),J(`span`,$f,[J(`button`,{"aria-label":`打开文件夹操作`,"aria-expanded":k.value?.item.id===e.id,onClick:t=>wr(`folders`,e)},[Y(V(Ms))],8,ep)])],34),(K(!0),q(G,null,Ir(s.value.filter(t=>t.folder_id===e.id&&!t.is_inbox),t=>W((K(),q(`div`,{key:t.id,"data-list-id":t.id,class:F([`list-row`,{active:E.value===`tasks`&&T.value===t.id,"list-dragging":j.value?.id===t.id,"list-reorder-target":M.value===t.id&&j.value?.id!==t.id}]),style:oe({"--list-drag-y":`${j.value?.id===t.id?j.value.offsetY:0}px`}),onPointermove:e=>Fr(t,e),onPointerup:e=>Rr(t,e),onPointercancel:Br},[J(`button`,{class:`list-drag-handle`,"aria-label":`拖动清单排序或移动到文件夹`,title:`长按拖动清单`,onPointerdown:$(e=>Ar(t,e),[`stop`]),onPointermove:$(e=>jr(t,e),[`stop`]),onPointerup:$(e=>Rr(t,e),[`stop`]),onPointercancel:$(Br,[`stop`])},[Y(V(Fs))],40,np),J(`button`,{class:`list-row-main draggable-list-row-main`,title:t.name,"aria-label":t.name,onClick:e=>zr(t)},[m[93]||=J(`i`,null,null,-1),J(`span`,null,L(t.name),1)],8,rp),J(`span`,ip,[J(`button`,{"aria-label":`打开清单操作`,"aria-expanded":k.value?.item.id===t.id,onClick:e=>wr(`lists`,t)},[Y(V(Ms))],8,ap)])],46,tp)),[[yo,ke.value.has(e.id)]])),128))],8,Zf))),128)),(K(!0),q(G,null,Ir(s.value.filter(e=>!e.folder_id&&!e.is_inbox),e=>(K(),q(`div`,{key:e.id,"data-list-id":e.id,class:F([`list-row`,{active:E.value===`tasks`&&T.value===e.id,"list-dragging":j.value?.id===e.id,"list-reorder-target":M.value===e.id&&j.value?.id!==e.id}]),style:oe({"--list-drag-y":`${j.value?.id===e.id?j.value.offsetY:0}px`}),onPointermove:t=>Fr(e,t),onPointerup:t=>Rr(e,t),onPointercancel:Br},[J(`button`,{class:`list-drag-handle`,"aria-label":`拖动清单排序或移动到文件夹`,title:`长按拖动清单`,onPointerdown:$(t=>Ar(e,t),[`stop`]),onPointermove:$(t=>jr(e,t),[`stop`]),onPointerup:$(t=>Rr(e,t),[`stop`]),onPointercancel:$(Br,[`stop`])},[Y(V(Fs))],40,sp),J(`button`,{class:`list-row-main draggable-list-row-main`,title:e.name,"aria-label":e.name,onClick:t=>zr(e)},[m[94]||=J(`i`,null,null,-1),J(`span`,null,L(e.name),1)],8,cp),J(`span`,lp,[J(`button`,{"aria-label":`打开清单操作`,"aria-expanded":k.value?.item.id===e.id,onClick:t=>wr(`lists`,e)},[Y(V(Ms))],8,up)])],46,op))),128)),J(`div`,dp,[J(`button`,{ref_key:`archivedListsToggle`,ref:d,class:F([`archived-lists-toggle`,{empty:c.value.length===0}]),"aria-expanded":c.value.length>0&&l.value,"aria-controls":`archived-task-lists`,disabled:c.value.length===0,onClick:lr},[Y(V(As),{class:F({expanded:l.value})},null,8,[`class`]),J(`span`,null,`已归档 `+L(c.value.length),1)],10,fp),W(J(`div`,pp,[(K(!0),q(G,null,Ir(c.value,e=>(K(),q(`div`,{key:e.id,class:`list-row archived-row`},[J(`span`,{class:`archived-row-label`,title:e.name},L(e.name),9,mp),J(`span`,hp,[J(`button`,{class:`archived-row-menu-trigger`,"aria-label":`${e.name}操作`,"aria-haspopup":`menu`,"aria-expanded":u.value?.id===e.id,onClick:t=>pr(e,t.currentTarget)},[Y(V(Ms))],8,gp)])]))),128))],512),[[yo,l.value]])])]),J(`nav`,_p,[J(`button`,{class:F({active:E.value===`trash`}),onClick:m[13]||=e=>bn(`trash`)},[Y(V(Js)),m[95]||=X(`回收站`,-1)],2),J(`button`,{class:F({active:E.value===`settings`}),onClick:m[14]||=e=>bn(`settings`)},[Y(V(qs)),m[96]||=X(`设置`,-1)],2)]),k.value?(K(),q(`div`,{key:0,class:`sidebar-action-mask app-sheet-mask`,onClick:$(Dr,[`self`])},[J(`section`,{class:`sidebar-action-sheet app-sheet app-sheet--actions`,role:`dialog`,"aria-modal":`true`,"aria-label":`${k.value.item.name}操作`},[J(`header`,yp,[J(`b`,null,L(k.value.item.name),1),J(`button`,{class:`icon`,"aria-label":`关闭清单操作`,onClick:Dr},[Y(V(Ys))])]),J(`div`,bp,[J(`button`,{onClick:m[15]||=e=>{ar(k.value.kind,k.value.item),Dr()}},[Y(V(Vs)),m[97]||=X(`重命名`,-1)]),k.value.kind===`folders`?(K(),q(`button`,{key:0,onClick:m[16]||=e=>{ir(k.value.item.id),Dr()}},[Y(V(Us)),m[98]||=X(`新建清单`,-1)])):Z(``,!0),k.value.kind===`lists`?(K(),q(G,{key:1},[J(`button`,{"aria-label":`上移清单`,disabled:!Ur(k.value.item,`up`),onClick:m[17]||=e=>Wr(k.value.item,`up`)},`上移`,8,xp),J(`button`,{"aria-label":`下移清单`,disabled:!Ur(k.value.item,`down`),onClick:m[18]||=e=>Wr(k.value.item,`down`)},`下移`,8,Sp),J(`button`,{"aria-label":`移动到文件夹`,"aria-haspopup":`menu`,"aria-expanded":A.value,onClick:Vr},[Y(V(Ps)),m[99]||=X(`移动到文件夹`,-1)],8,Cp),A.value?(K(),q(`div`,wp,[k.value.item.folder_id?(K(),q(`button`,{key:0,role:`menuitem`,onClick:m[19]||=e=>Hr(null)},`移出文件夹`)):Z(``,!0),(K(!0),q(G,null,Ir(o.value,e=>(K(),q(`button`,{key:e.id,role:`menuitem`,disabled:k.value.item.folder_id===e.id,onClick:t=>Hr(e.id)},L(e.name),9,Tp))),128))])):Z(``,!0)],64)):Z(``,!0),J(`button`,{class:`danger`,onClick:m[20]||=e=>{or(k.value.kind,k.value.item),Dr()}},[(K(),aa(Nr(k.value.kind===`folders`?V(Js):V(Cs)))),X(L(k.value.kind===`folders`?`删除文件夹`:`归档清单`),1)])])],8,vp)])):Z(``,!0)],34),J(`main`,{onTouchstart:Yr,onTouchmove:Xr,onTouchend:Zr,onTouchcancel:Qr},[J(`header`,Ep,[J(`button`,{class:`icon`,"aria-label":(ge.value?`展开`:`收起`)+`菜单`,"aria-expanded":ge.value?`false`:`true`,onClick:At},[Y(V(Bs))],8,Dp),J(`div`,Op,[J(`h1`,{title:Bt.value},L(Bt.value),9,kp)]),[`today`,`tasks`,`upcoming`,`habits`].includes(E.value)?(K(),q(`div`,Ap,[Y(ef,{modelValue:xe.value,"onUpdate:modelValue":m[22]||=e=>xe.value=e,class:`topbar-filter`},null,8,[`modelValue`]),J(`button`,{class:F([`icon topbar-refresh`,{spinning:pe.value}]),type:`button`,"aria-label":`刷新当前页面`,title:`刷新`,disabled:pe.value||I.value,onClick:_n},[Y(V(Ws))],10,jp)])):Z(``,!0),P.value?(K(),q(`div`,{key:1,class:F([`search-reveal`,{"mobile-search-open":se.value||!!N.value,"mobile-search-pulling":ce.value>0}]),style:oe(ue.value)},[J(`span`,Mp,L(ce.value>=56?`松开搜索`:`下拉搜索`),1),J(`label`,Np,[Y(V(Ks)),W(J(`input`,{ref_key:`searchInput`,ref:ae,"onUpdate:modelValue":m[23]||=e=>N.value=e,placeholder:`搜索任务…`,"aria-label":`搜索任务`,onBlur:ei},null,544),[[es,N.value]]),m[100]||=J(`kbd`,null,`⌘ K`,-1)])],6)):Z(``,!0)]),[`habits`,`settings`].includes(E.value)?(K(),aa(ld,{ref_key:`habitComposer`,ref:ht,key:E.value,view:E.value,"show-completed":xe.value,onChanged:gn,onNotice:U},null,8,[`view`,`show-completed`])):E.value===`countdowns`?(K(),aa(Xd,{key:1,ref_key:`countdownComposer`,ref:gt,onNotice:U},null,512)):(K(),q(G,{key:2},[E.value===`today`?(K(),q(`section`,Pp,[J(`button`,{class:`today-track today-task-track`,type:`button`,"aria-controls":`today-tasks`,onClick:m[24]||=e=>Gt(`today-tasks`)},[J(`span`,Fp,[J(`strong`,null,`任务 `+L(Te.value)+` / `+L(we.value),1)]),J(`span`,{class:`today-track-rail`,role:`progressbar`,"aria-label":`今日任务进度`,"aria-valuemin":`0`,"aria-valuemax":we.value,"aria-valuenow":Te.value},[J(`i`,{class:`today-track-fill`,style:oe({width:Ut.value})},null,4)],8,Ip)]),J(`button`,{class:`today-track today-habit-track`,type:`button`,"aria-controls":`today-habits`,onClick:m[25]||=e=>Gt(`today-habits`)},[J(`span`,Lp,[J(`strong`,null,`习惯 `+L(Vt.value),1)]),J(`span`,{class:`today-track-rail`,role:`progressbar`,"aria-label":`今日习惯进度`,"aria-valuemin":`0`,"aria-valuemax":Ee.value,"aria-valuenow":De.value},[J(`i`,{class:`today-track-fill`,style:oe({width:Wt.value})},null,4)],8,Rp)])])):Z(``,!0),E.value===`today`?(K(),q(G,{key:1},[Qt.value.length?(K(),q(`section`,zp,[J(`h3`,Bp,[Y(V(Ts)),m[101]||=X(`已过期 `,-1),J(`span`,null,L(Qt.value.length),1)]),J(`div`,Vp,[(K(!0),q(G,null,Ir(Qt.value,e=>(K(),q(G,{key:`overdue-${e.task.id}`},[J(`article`,{"data-task-id":e.task.id,class:F([`task-row overdue-task`,{"completion-exiting":Me.value.has(e.task.id)}])},[J(`button`,{class:`task-check`,"aria-label":`完成${e.task.title}`,"aria-pressed":!1,onClick:$(t=>Dn(e.task),[`stop`])},[J(`span`,{class:F([`task-check-mark`,`p${e.task.priority}`])},null,2)],8,Up),J(`div`,{class:`task-main`,role:`button`,tabindex:`0`,onClick:t=>nr(e.task),onKeydown:ds(t=>nr(e.task),[`enter`])},[J(`strong`,{title:e.task.title},L(e.task.title),9,Gp),e.subtasks.length?(K(),q(`span`,Kp,[J(`span`,qp,[Y(V(Ls)),X(L(e.subtasks.filter(e=>e.completed).length)+`/`+L(e.subtasks.length),1)])])):Z(``,!0)],40,Wp),e.task.due_at?(K(),q(`span`,Jp,[Y(Rf,{"due-at":e.task.due_at,"due-has-time":e.task.due_has_time,completed:e.task.completed,"now-ms":V(me)},null,8,[`due-at`,`due-has-time`,`completed`,`now-ms`])])):Z(``,!0)],10,Hp),(K(!0),q(G,null,Ir(e.subtasks,e=>(K(),q(`article`,{key:`overdue-subtask-${e.id}`,"data-task-id":e.id,class:F([`task-row subtask swipeable`,{done:e.completed,"just-completed":je.value.has(e.id),"completion-exiting":Me.value.has(e.id),ready:Math.abs(Re.value[e.id]??0)>=64,reordering:ze.value?.id===e.id,"reorder-target":Be.value===e.id}]),style:oe({"--swipe-x":`${Re.value[e.id]??0}px`,"--reorder-y":`${ze.value?.id===e.id?ze.value.offsetY:0}px`}),onPointerdown:t=>In(e,t),onPointermove:t=>Ln(e,t),onPointerup:t=>Rn(e,t),onPointercancel:t=>zn(e),onTouchstartPassive:t=>Fn(e,t),onTouchmovePassive:t=>Bn(e,t),onTouchend:t=>Vn(e,t),onTouchcancel:t=>Hn(e)},[J(`button`,{class:`task-check`,"aria-label":e.completed?`重新打开${e.title}`:`完成${e.title}`,"aria-pressed":e.completed,onClick:$(t=>Dn(e),[`stop`])},[J(`span`,{class:F([`task-check-mark`,`p${e.priority}`])},[e.completed?(K(),aa(V(Ds),{key:0})):Z(``,!0)],2)],8,Xp),J(`div`,{class:`task-main`,role:`button`,tabindex:`0`,onClick:t=>Kn(e),onKeydown:[ds(t=>Kn(e),[`enter`]),ds($(t=>Kn(e),[`prevent`]),[`space`])]},[J(`strong`,{title:e.title},L(e.title),9,Qp)],40,Zp),e.due_at?(K(),q(`span`,$p,[Y(Rf,{"due-at":e.due_at,"due-has-time":e.due_has_time,completed:e.completed,"now-ms":V(me)},null,8,[`due-at`,`due-has-time`,`completed`,`now-ms`])])):Z(``,!0)],46,Yp))),128))],64))),128))])])):Z(``,!0),J(`h3`,em,[Y(V(Rs)),m[102]||=X(`任务`,-1)])],64)):Z(``,!0),E.value===`today`?Z(``,!0):(K(),q(`div`,tm,[E.value===`trash`||Oe.value>1||Se.value>0?(K(),q(`span`,nm,L(Oe.value>1?`第 ${R.value} / ${Oe.value} 页 · `:``)+`共 `+L(Se.value)+` 项`,1)):Z(``,!0),N.value?(K(),q(`button`,{key:1,class:`link`,onClick:m[26]||=e=>N.value=``},`清除搜索`)):Z(``,!0)])),E.value!==`trash`&&Oe.value>1?(K(),q(`div`,rm,[J(`button`,{class:`secondary`,disabled:R.value<=1||I.value,onClick:Gr},`上一页`,8,im),J(`span`,null,L(R.value)+` / `+L(Oe.value),1),J(`button`,{class:`secondary`,disabled:R.value>=Oe.value||I.value,onClick:Kr},`下一页`,8,am)])):Z(``,!0),J(`section`,{class:F([`task-list`,{loading:I.value}])},[(K(!0),q(G,null,Ir(Zt.value,e=>(K(),q(G,{key:e.task.id},[J(`article`,{"data-task-id":e.task.id,class:F([`task-row swipeable`,{done:e.task.completed,"just-completed":je.value.has(e.task.id),"completion-exiting":Me.value.has(e.task.id),selected:D.value?.id===e.task.id,ready:Math.abs(Re.value[e.task.id]??0)>=64,reordering:ze.value?.id===e.task.id,"reorder-target":Be.value===e.task.id}]),style:oe({"--swipe-x":`${Re.value[e.task.id]??0}px`,"--reorder-y":`${ze.value?.id===e.task.id?ze.value.offsetY:0}px`}),onPointerdown:t=>In(e.task,t),onPointermove:t=>Ln(e.task,t),onPointerup:t=>Rn(e.task,t),onPointercancel:t=>zn(e.task),onTouchstartPassive:t=>Fn(e.task,t),onTouchmovePassive:t=>Bn(e.task,t),onTouchend:t=>Vn(e.task,t),onTouchcancel:t=>Hn(e.task)},[E.value===`trash`?Z(``,!0):(K(),q(`button`,{key:0,class:`drag-handle task-drag-handle`,disabled:!!N.value||Oe.value>1,"aria-label":`上下拖动任务排序`,title:`上下拖动排序`,onPointerdown:$(t=>An(e.task,t),[`stop`]),onPointermove:$(t=>Mn(e.task,t),[`stop`]),onPointerup:$(t=>Nn(e.task,t),[`stop`]),onPointercancel:$(Pn,[`stop`])},[Y(V(Fs))],40,sm)),E.value===`trash`?Z(``,!0):(K(),q(`button`,{key:1,class:`task-check`,"aria-label":e.task.completed?`重新打开${e.task.title}`:`完成${e.task.title}`,"aria-pressed":e.task.completed,onClick:$(t=>Dn(e.task),[`stop`])},[J(`span`,{class:F([`task-check-mark`,`p${e.task.priority}`])},[e.task.completed?(K(),aa(V(Ds),{key:0})):Z(``,!0)],2)],8,cm)),J(`div`,{class:`task-main`,role:`button`,tabindex:`0`,"aria-expanded":!Ae.value.has(e.task.id),onClick:t=>E.value===`trash`?void 0:Kn(e.task,!0),onKeydown:[ds(t=>E.value===`trash`?void 0:Kn(e.task,!0),[`enter`]),ds($(t=>E.value===`trash`?void 0:Kn(e.task,!0),[`prevent`]),[`space`])]},[J(`strong`,{title:e.task.title},L(e.task.title),9,um),e.subtasks.length?(K(),q(`span`,dm,[J(`span`,fm,[Y(V(Ls)),X(L(e.subtasks.filter(e=>e.completed).length)+`/`+L(e.subtasks.length),1)])])):Z(``,!0),e.task.priority?(K(),q(`span`,{key:1,class:F([`priority`,`p${e.task.priority}`])},L([``,`低`,`中`,`高`][e.task.priority]),3)):Z(``,!0)],40,lm),e.task.due_at?(K(),q(`span`,pm,[Y(Rf,{"due-at":e.task.due_at,"due-has-time":e.task.due_has_time,completed:e.task.completed,"now-ms":V(me)},null,8,[`due-at`,`due-has-time`,`completed`,`now-ms`])])):Z(``,!0),E.value===`trash`?(K(),q(`span`,mm,[J(`button`,{class:`restore`,onClick:$(t=>Qn(e.task),[`stop`])},[Y(V(Cs)),m[103]||=X(`恢复`,-1)],8,hm),J(`button`,{class:`icon danger ghost`,"aria-label":`永久删除`,onClick:$(t=>$n(e.task),[`stop`])},[Y(V(Ys))],8,gm)])):(K(),q(`span`,_m,[J(`button`,{class:`icon ghost task-detail-trigger`,"aria-label":`打开任务详情`,onClick:$(t=>nr(e.task),[`stop`])},[Y(V(Ms))],8,vm)]))],46,om),Ae.value.has(e.task.id)?Z(``,!0):(K(!0),q(G,{key:0},Ir(e.subtasks,e=>(K(),q(`article`,{key:e.id,"data-task-id":e.id,class:F([`task-row subtask swipeable`,{done:e.completed,"just-completed":je.value.has(e.id),"completion-exiting":Me.value.has(e.id),ready:Math.abs(Re.value[e.id]??0)>=64,reordering:ze.value?.id===e.id,"reorder-target":Be.value===e.id}]),style:oe({"--swipe-x":`${Re.value[e.id]??0}px`,"--reorder-y":`${ze.value?.id===e.id?ze.value.offsetY:0}px`}),onPointerdown:t=>In(e,t),onPointermove:t=>Ln(e,t),onPointerup:t=>Rn(e,t),onPointercancel:t=>zn(e),onTouchstartPassive:t=>Fn(e,t),onTouchmovePassive:t=>Bn(e,t),onTouchend:t=>Vn(e,t),onTouchcancel:t=>Hn(e)},[E.value===`trash`?Z(``,!0):(K(),q(`button`,{key:0,class:`drag-handle task-drag-handle`,"aria-label":`上下拖动子任务排序`,title:`上下拖动排序`,onPointerdown:$(t=>An(e,t),[`stop`]),onPointermove:$(t=>Mn(e,t),[`stop`]),onPointerup:$(t=>Nn(e,t),[`stop`]),onPointercancel:$(Pn,[`stop`])},[Y(V(Fs))],40,bm)),E.value===`trash`?Z(``,!0):(K(),q(`button`,{key:1,class:`task-check`,"aria-label":e.completed?`重新打开${e.title}`:`完成${e.title}`,"aria-pressed":e.completed,onClick:$(t=>Dn(e),[`stop`])},[J(`span`,{class:F([`task-check-mark`,`p${e.priority}`])},[e.completed?(K(),aa(V(Ds),{key:0})):Z(``,!0)],2)],8,xm)),J(`div`,{class:`task-main`,role:`button`,tabindex:`0`,onClick:t=>E.value===`trash`?void 0:Kn(e),onKeydown:[ds(t=>E.value===`trash`?void 0:Kn(e),[`enter`]),ds($(t=>E.value===`trash`?void 0:Kn(e),[`prevent`]),[`space`])]},[J(`strong`,{title:e.title},L(e.title),9,Cm)],40,Sm),e.due_at?(K(),q(`span`,wm,[Y(Rf,{"due-at":e.due_at,"due-has-time":e.due_has_time,completed:e.completed,"now-ms":V(me)},null,8,[`due-at`,`due-has-time`,`completed`,`now-ms`])])):Z(``,!0),E.value===`trash`?Z(``,!0):(K(),q(`span`,Tm,[J(`button`,{class:`icon ghost task-detail-trigger`,"aria-label":`打开任务详情`,onClick:$(t=>nr(e),[`stop`])},[Y(V(Ms))],8,Em)]))],46,ym))),128))],64))),128)),!Jt.value.length&&!I.value?(K(),q(`div`,Dm,[Y(V(Rs)),J(`b`,null,L(N.value?`没有匹配的任务`:Ce.value>0?`已完成任务已隐藏`:`这里还很安静`),1),J(`span`,null,L(N.value?`换个关键词试试`:Ce.value>0?`开启“显示已完成”即可查看。`:`写下第一件想完成的小事吧`),1),E.value===`today`&&!N.value&&Ce.value===0?(K(),q(`button`,{key:0,class:`soft-button empty-action`,onClick:bt},[Y(V(Us)),m[104]||=X(`添加今天任务`,-1)])):Z(``,!0)])):Z(``,!0)],2),E.value===`today`?(K(),q(`div`,Om,[J(`h3`,km,[Y(V(Gs)),m[105]||=X(`习惯`,-1)]),Y(ld,{ref_key:`habitComposer`,ref:ht,view:`today-habits`,"show-completed":xe.value,onChanged:gn,onNotice:U,onSummary:Kt},null,8,[`show-completed`])])):Z(``,!0)],64))],32),D.value?(K(),q(`aside`,{key:1,class:F([`detail`,{open:_e.value}])},[J(`div`,Am,[m[106]||=J(`span`,null,`任务详情`,-1),J(`button`,{class:`icon`,"aria-label":`关闭详情`,onClick:tr},[Y(V(Ys))])]),J(`div`,jm,[J(`div`,Mm,[J(`button`,{class:F([`check large`,`p${D.value.priority}`]),onClick:m[27]||=e=>Dn(D.value)},[D.value.completed?(K(),aa(V(Ds),{key:0})):Z(``,!0)],2),W(J(`textarea`,{"onUpdate:modelValue":m[28]||=e=>D.value.title=e,rows:`2`,"aria-label":`任务标题`},null,512),[[es,D.value.title]])]),J(`label`,null,[m[107]||=X(`清单`,-1),W(J(`select`,{"onUpdate:modelValue":m[29]||=e=>D.value.list_id=e,class:`task-detail-field-input`},[(K(!0),q(G,null,Ir(s.value,e=>(K(),q(`option`,{key:e.id,value:e.id},L(e.name),9,Nm))),128))],512),[[rs,D.value.list_id]])]),J(`label`,Pm,[m[108]||=X(`截止时间`,-1),J(`input`,{class:`task-detail-due-input task-detail-field-input`,value:V(cc)(D.value.due_at),type:`datetime-local`,onChange:m[30]||=e=>D.value.due_at=e.target.value},null,40,Fm)]),J(`label`,null,[m[110]||=X(`重复`,-1),W(J(`select`,{"onUpdate:modelValue":m[31]||=e=>rt.value=e,class:`task-detail-field-input`,disabled:!D.value.due_at},[...m[109]||=[pa(``,7)]],8,Im),[[rs,rt.value]]),D.value.due_at?Z(``,!0):(K(),q(`small`,Lm,`请先设置截止时间,才能开启重复`))]),rt.value===`after_completion`?(K(),q(`section`,Rm,[J(`div`,null,[m[111]||=X(`完成后 `,-1),W(J(`input`,{"onUpdate:modelValue":m[32]||=e=>it.value=e,type:`number`,min:`1`,max:`3650`,step:`1`,inputmode:`numeric`,"aria-label":`完成后重复天数`},null,512),[[es,it.value]]),m[112]||=X(` 天重复`,-1)]),m[113]||=J(`small`,null,`每次完成后,将截止时间顺延对应天数;首版永不结束`,-1)])):Z(``,!0),rt.value===`custom`?(K(),q(`section`,zm,[J(`div`,null,[m[115]||=J(`span`,null,`每隔`,-1),W(J(`input`,{"onUpdate:modelValue":m[33]||=e=>dt.value.interval=e,type:`number`,min:`1`},null,512),[[es,dt.value.interval,void 0,{number:!0}]]),W(J(`select`,{"onUpdate:modelValue":m[34]||=e=>dt.value.frequency=e},[...m[114]||=[J(`option`,{value:`daily`},`天`,-1),J(`option`,{value:`weekly`},`周`,-1),J(`option`,{value:`monthly`},`月`,-1),J(`option`,{value:`yearly`},`年`,-1)]],512),[[rs,dt.value.frequency]])]),dt.value.frequency===`weekly`?(K(),q(`label`,Bm,[m[116]||=X(`重复日期`,-1),J(`span`,Vm,[(K(),q(G,null,Ir(ft,e=>J(`label`,{key:e.value},[W(J(`input`,{"onUpdate:modelValue":m[35]||=e=>dt.value.weekdays=e,type:`checkbox`,value:e.value},null,8,Hm),[[ts,dt.value.weekdays]]),X(L(e.label),1)])),64))])])):Z(``,!0),dt.value.frequency===`monthly`?(K(),q(`label`,Um,[m[117]||=X(`每月日期`,-1),W(J(`input`,{"onUpdate:modelValue":m[36]||=e=>dt.value.monthDays=e,placeholder:`例如 1,15,31`,onChange:m[37]||=e=>dt.value.monthDays=String(e.target.value).split(`,`).map(Number).filter(Boolean)},null,544),[[es,dt.value.monthDays]])])):Z(``,!0),J(`label`,null,[m[119]||=X(`结束方式`,-1),W(J(`select`,{"onUpdate:modelValue":m[38]||=e=>dt.value.endMode=e},[...m[118]||=[J(`option`,{value:`never`},`永不结束`,-1),J(`option`,{value:`date`},`指定日期`,-1),J(`option`,{value:`count`},`重复次数`,-1)]],512),[[rs,dt.value.endMode]])]),dt.value.endMode===`date`?(K(),q(`label`,Wm,[m[120]||=X(`结束日期`,-1),W(J(`input`,{"onUpdate:modelValue":m[39]||=e=>dt.value.until=e,type:`date`},null,512),[[es,dt.value.until]])])):Z(``,!0),dt.value.endMode===`count`?(K(),q(`label`,Gm,[m[121]||=X(`重复次数`,-1),W(J(`input`,{"onUpdate:modelValue":m[40]||=e=>dt.value.count=e,type:`number`,min:`1`},null,512),[[es,dt.value.count,void 0,{number:!0}]])])):Z(``,!0)])):Z(``,!0),at.value?(K(),q(`small`,Km,L(at.value),1)):Z(``,!0),J(`div`,qm,[J(`div`,Jm,[m[122]||=J(`span`,null,`备注`,-1),J(`span`,null,[J(`button`,{class:F({active:!be.value}),onClick:m[41]||=e=>be.value=!1},`编辑`,2),J(`button`,{class:F({active:be.value}),onClick:m[42]||=e=>be.value=!0},`预览`,2)])]),be.value?(K(),q(`div`,{key:0,class:`markdown-preview`,innerHTML:V(Qs)(D.value.description)},null,8,Ym)):W((K(),q(`textarea`,{key:1,"onUpdate:modelValue":m[43]||=e=>D.value.description=e,rows:`9`,placeholder:`支持 Markdown…`},null,512)),[[es,D.value.description]])]),J(`div`,Xm,[J(`div`,Zm,[m[124]||=J(`span`,null,`子任务`,-1),J(`button`,{class:`link`,onClick:er},[Y(V(Us)),m[123]||=X(`添加`,-1)])]),(K(!0),q(G,null,Ir(Yt.value,e=>(K(),q(`button`,{key:e.id,class:`subtask-detail`,onClick:t=>Dn(e)},[J(`span`,$m,[e.completed?(K(),aa(V(Ds),{key:0})):Z(``,!0)]),J(`span`,{class:F({strike:e.completed})},L(e.title),3)],8,Qm))),128)),Yt.value.length?Z(``,!0):(K(),q(`span`,eh,`把这件事拆成更小的步骤`))]),J(`details`,{class:`more-settings`,open:ye.value,onToggle:m[45]||=e=>ye.value=e.target.open},[m[127]||=J(`summary`,null,`更多设置`,-1),J(`div`,nh,[J(`label`,null,[m[126]||=X(`优先级`,-1),W(J(`select`,{"onUpdate:modelValue":m[44]||=e=>D.value.priority=e},[...m[125]||=[J(`option`,{value:0},`无`,-1),J(`option`,{value:1},`低`,-1),J(`option`,{value:2},`中`,-1),J(`option`,{value:3},`高`,-1)]],512),[[rs,D.value.priority,void 0,{number:!0}]])])])],40,th),J(`div`,rh,[J(`button`,{class:`secondary`,disabled:ct.value||st.value,onClick:Yn},L(ct.value?`正在保存…`:st.value?`正在读取…`:`保存更改`),9,ih),J(`button`,{class:`danger-text`,onClick:m[46]||=e=>Xn(D.value)},[Y(V(Js)),m[128]||=X(`移到回收站`,-1)])])])],2)):Z(``,!0),ve.value?(K(),q(`div`,{key:2,class:`more-mask app-sheet-mask`,onClick:m[50]||=$(e=>{ve.value=!1,bn(`settings`)},[`self`])},[J(`section`,{id:`mobile-more-menu`,class:`more-sheet app-sheet app-sheet--actions`,role:`dialog`,"aria-modal":`true`,"aria-label":`更多导航`,onClick:m[49]||=$(()=>{},[`stop`])},[J(`div`,ah,[m[129]||=J(`b`,null,`更多`,-1),J(`button`,{class:`icon`,"aria-label":`关闭更多菜单`,onClick:m[47]||=e=>ve.value=!1},[Y(V(Ys))])]),J(`div`,oh,[J(`button`,{onClick:m[48]||=e=>bn(`settings`)},[Y(V(qs)),m[130]||=X(`设置与数据`,-1)])])])])):Z(``,!0),J(`nav`,sh,[J(`button`,{class:F({active:E.value===`today`}),"aria-current":E.value===`today`?`page`:void 0,onClick:m[51]||=e=>bn(`today`)},[Y(V(Rs)),m[131]||=J(`span`,null,`今天`,-1)],10,ch),J(`button`,{class:F({active:E.value===`habits`}),"aria-current":E.value===`habits`?`page`:void 0,onClick:m[52]||=e=>bn(`habits`)},[Y(V(Gs)),m[132]||=J(`span`,null,`习惯`,-1)],10,lh),J(`button`,{class:F({active:E.value===`countdowns`}),"aria-current":E.value===`countdowns`?`page`:void 0,onClick:m[53]||=e=>bn(`countdowns`)},[Y(V(Es)),m[133]||=J(`span`,null,`倒数日`,-1)],10,uh),J(`button`,{class:F({active:E.value===`settings`}),"aria-current":E.value===`settings`?`page`:void 0,onClick:m[54]||=e=>bn(`settings`)},[Y(V(qs)),m[134]||=J(`span`,null,`设置`,-1)],10,dh)]),[`tasks`,`today`,`upcoming`,`habits`,`countdowns`].includes(E.value)?(K(),aa(Qd,{key:3,label:E.value===`habits`?`添加习惯`:E.value===`countdowns`?`添加倒数日`:`添加任务`,onActivate:Et},null,8,[`label`])):Z(``,!0),Y(eo,{name:`task-compose`},{default:Sn(()=>[He.value?(K(),q(`div`,{key:0,class:`task-compose-mask app-sheet-mask`,onClick:$(Tt,[`self`])},[J(`form`,{class:`task-compose-sheet app-sheet app-sheet--create`,style:oe(yt.value),role:`dialog`,"aria-modal":`true`,"aria-labelledby":`task-compose-title`,onSubmit:$(kt,[`prevent`])},[J(`header`,fh,[J(`div`,null,[m[135]||=J(`small`,null,`NEW TASK`,-1),J(`h2`,ph,L(xt.value),1)]),J(`button`,{class:`icon`,type:`button`,"aria-label":`关闭添加任务`,onClick:Tt},[Y(V(Ys))])]),J(`div`,mh,[J(`label`,null,[m[136]||=X(`任务名称`,-1),W(J(`input`,{"onUpdate:modelValue":m[55]||=e=>Ue.value=e,class:`task-compose-input`,placeholder:`准备做点什么?`,autocomplete:`off`,"aria-invalid":!!We.value,"aria-describedby":`compose-title-error`,onInput:m[56]||=e=>We.value=``},null,40,hh),[[es,Ue.value]]),We.value?(K(),q(`small`,gh,L(We.value),1)):Z(``,!0)]),J(`div`,_h,[J(`label`,null,[m[137]||=X(`清单`,-1),W(J(`select`,{"onUpdate:modelValue":m[57]||=e=>Ge.value=e},[(K(!0),q(G,null,Ir(s.value,e=>(K(),q(`option`,{key:e.id,value:e.id},L(e.name),9,vh))),128))],512),[[rs,Ge.value]])]),J(`label`,null,[m[139]||=X(`优先级`,-1),W(J(`select`,{"onUpdate:modelValue":m[58]||=e=>Qe.value=e},[...m[138]||=[J(`option`,{value:0},`无`,-1),J(`option`,{value:1},`低`,-1),J(`option`,{value:2},`中`,-1),J(`option`,{value:3},`高`,-1)]],512),[[rs,Qe.value,void 0,{number:!0}]])])]),J(`div`,yh,[J(`div`,bh,[J(`button`,{ref_key:`composeDateButton`,ref:Xe,class:F([`task-compose-date-chip`,{selected:Ke.value}]),type:`button`,"aria-haspopup":`dialog`,"aria-expanded":Ye.value,onClick:m[59]||=e=>Ye.value=!0},[Y(V(Ts)),J(`span`,null,L(St.value),1)],10,xh),Y(mf,{open:Ye.value,"onUpdate:open":m[60]||=e=>Ye.value=e,modelValue:Ke.value,"onUpdate:modelValue":m[61]||=e=>Ke.value=e,anchor:Xe.value},null,8,[`open`,`modelValue`,`anchor`]),Ke.value?(K(),q(`button`,{key:0,class:`task-compose-date-clear`,type:`button`,"aria-label":`清除截止日期`,onClick:Ct},[Y(V(Ys))])):Z(``,!0)]),Ke.value&&!qe.value?(K(),q(`button`,{key:0,class:`task-compose-time-add`,type:`button`,onClick:wt},`添加时间`)):Ke.value?(K(),q(`label`,Sh,[m[140]||=J(`span`,null,`时间`,-1),W(J(`input`,{ref_key:`composeTimePicker`,ref:Ze,"onUpdate:modelValue":m[62]||=e=>Je.value=e,type:`time`,"aria-label":`选择截止时间`},null,512),[[es,Je.value]]),J(`button`,{class:`task-compose-time-remove`,type:`button`,"aria-label":`移除时间`,onClick:m[63]||=$(e=>qe.value=!1,[`prevent`])},[Y(V(Ys))])])):Z(``,!0)]),J(`label`,null,[m[142]||=X(`重复`,-1),W(J(`select`,{"onUpdate:modelValue":m[64]||=e=>et.value=e,disabled:!Ke.value},[...m[141]||=[J(`option`,{value:`none`},`不重复`,-1),J(`option`,{value:`daily`},`每天`,-1),J(`option`,{value:`weekly`},`每周`,-1),J(`option`,{value:`monthly`},`每月`,-1),J(`option`,{value:`yearly`},`每年`,-1),J(`option`,{value:`after_completion`},`完成后重复`,-1),J(`option`,{value:`custom`},`自定义…`,-1)]],8,Ch),[[rs,et.value]]),Ke.value?Z(``,!0):(K(),q(`small`,wh,`请先设置截止时间,才能开启重复`))]),et.value===`after_completion`?(K(),q(`section`,Th,[J(`div`,null,[m[143]||=X(`完成后 `,-1),W(J(`input`,{"onUpdate:modelValue":m[65]||=e=>tt.value=e,type:`number`,min:`1`,max:`3650`,step:`1`,inputmode:`numeric`,"aria-label":`完成后重复天数`},null,512),[[es,tt.value]]),m[144]||=X(` 天重复`,-1)]),m[145]||=J(`small`,null,`每次完成后,将截止时间顺延对应天数;首版永不结束`,-1)])):Z(``,!0),nt.value?(K(),q(`small`,Eh,L(nt.value),1)):Z(``,!0),et.value===`custom`?(K(),q(`section`,Dh,[J(`div`,null,[m[147]||=J(`span`,null,`每隔`,-1),W(J(`input`,{"onUpdate:modelValue":m[66]||=e=>ut.value.interval=e,type:`number`,min:`1`},null,512),[[es,ut.value.interval,void 0,{number:!0}]]),W(J(`select`,{"onUpdate:modelValue":m[67]||=e=>ut.value.frequency=e},[...m[146]||=[J(`option`,{value:`daily`},`天`,-1),J(`option`,{value:`weekly`},`周`,-1),J(`option`,{value:`monthly`},`月`,-1),J(`option`,{value:`yearly`},`年`,-1)]],512),[[rs,ut.value.frequency]])]),ut.value.frequency===`weekly`?(K(),q(`label`,Oh,[m[148]||=X(`重复日期`,-1),J(`span`,kh,[(K(),q(G,null,Ir(ft,e=>J(`label`,{key:e.value},[W(J(`input`,{"onUpdate:modelValue":m[68]||=e=>ut.value.weekdays=e,type:`checkbox`,value:e.value},null,8,Ah),[[ts,ut.value.weekdays]]),X(L(e.label),1)])),64))])])):Z(``,!0),ut.value.frequency===`monthly`?(K(),q(`label`,jh,[m[149]||=X(`每月日期`,-1),W(J(`input`,{"onUpdate:modelValue":m[69]||=e=>ut.value.monthDays[0]=e,type:`number`,min:`1`,max:`31`},null,512),[[es,ut.value.monthDays[0],void 0,{number:!0}]])])):Z(``,!0),J(`label`,null,[m[151]||=X(`结束方式`,-1),W(J(`select`,{"onUpdate:modelValue":m[70]||=e=>ut.value.endMode=e},[...m[150]||=[J(`option`,{value:`never`},`永不结束`,-1),J(`option`,{value:`date`},`指定日期`,-1),J(`option`,{value:`count`},`重复次数`,-1)]],512),[[rs,ut.value.endMode]])]),ut.value.endMode===`date`?(K(),q(`label`,Mh,[m[152]||=X(`结束日期`,-1),W(J(`input`,{"onUpdate:modelValue":m[71]||=e=>ut.value.until=e,type:`date`},null,512),[[es,ut.value.until]])])):Z(``,!0),ut.value.endMode===`count`?(K(),q(`label`,Nh,[m[153]||=X(`重复次数`,-1),W(J(`input`,{"onUpdate:modelValue":m[72]||=e=>ut.value.count=e,type:`number`,min:`1`},null,512),[[es,ut.value.count,void 0,{number:!0}]])])):Z(``,!0)])):Z(``,!0),J(`label`,null,[m[154]||=X(`备注`,-1),W(J(`textarea`,{"onUpdate:modelValue":m[73]||=e=>$e.value=e,rows:`3`,placeholder:`可选,支持 Markdown`},null,512),[[es,$e.value]])])]),J(`footer`,Ph,[J(`button`,{type:`button`,class:`secondary`,onClick:Tt},`取消`),J(`button`,{class:`primary-small`,disabled:!Ue.value.trim()||!Ge.value},`添加任务`,8,Fh)])],36)])):Z(``,!0)]),_:1}),Y(eo,{name:`toast`},{default:Sn(()=>[fe.value?(K(),q(`div`,Ih,L(fe.value),1)):Z(``,!0)]),_:1}),de.value?(K(),q(`div`,Lh,[X(L(de.value),1),J(`button`,{onClick:m[74]||=e=>de.value=``},[Y(V(Ys))])])):Z(``,!0),(K(),aa(Un,{to:`body`},[u.value?(K(),q(`span`,{key:0,class:`archived-action-mask`,onClick:m[77]||=$(e=>fr(),[`self`])},[J(`span`,{ref_key:`archivedMenu`,ref:f,class:`archived-row-actions`,style:oe(p.value),role:`menu`},[J(`button`,{role:`menuitem`,onClick:m[75]||=e=>cr(u.value)},[Y(V(Cs)),m[155]||=X(`恢复清单`,-1)]),J(`button`,{role:`menuitem`,class:`danger-text`,onClick:m[76]||=e=>_r(u.value)},[Y(V(Js)),m[156]||=X(`永久删除清单`,-1)])],4)])):Z(``,!0)])),h.value?(K(),q(`div`,{key:5,class:`modal-mask purge-list-mask`,onClick:$(yr,[`self`])},[J(`section`,{ref_key:`purgeListDialog`,ref:y,class:`modal-box purge-list-dialog`,role:`alertdialog`,"aria-modal":`true`,"aria-labelledby":`purge-list-title`,"aria-describedby":`purge-list-description`,onKeydown:br},[J(`h3`,Rh,`永久删除清单「`+L(h.value.name)+`」?`,1),m[157]||=J(`p`,{id:`purge-list-description`},`将永久删除其中的全部任务、子任务、重复规则、附件及实体文件。此操作无法撤销。`,-1),_.value?(K(),q(`p`,zh,L(_.value),1)):Z(``,!0),J(`div`,Bh,[J(`button`,{ref_key:`purgeCancelButton`,ref:v,class:`secondary`,disabled:g.value,onClick:yr},`取消`,8,Vh),J(`button`,{class:`danger-button`,disabled:g.value,onClick:xr},L(g.value?`正在删除…`:`永久删除`),9,Hh)])],544)])):Z(``,!0),jt.value?(K(),q(`div`,{key:6,class:`modal-mask`,onClick:$(Rt,[`self`])},[J(`div`,Uh,[J(`h3`,null,L(Mt.value),1),Nt.value?(K(),q(`label`,Wh,[X(L(Nt.value),1),W(J(`input`,{"onUpdate:modelValue":m[78]||=e=>Pt.value=e,class:`modal-input`,autofocus:``,"aria-invalid":!!Ft.value,"aria-describedby":`modal-name-error`,onInput:m[79]||=e=>Ft.value=``,onKeyup:ds(zt,[`enter`])},null,40,Gh),[[es,Pt.value]]),Ft.value?(K(),q(`small`,Kh,L(Ft.value),1)):Z(``,!0)])):Z(``,!0),J(`div`,qh,[J(`button`,{class:`secondary`,onClick:Rt},`取消`),J(`button`,{class:`primary-small`,onClick:zt},L(It.value),1)])])])):Z(``,!0)],2)):(K(),q(`div`,Hf,[J(`section`,Uf,[m[83]||=J(`div`,{class:`brand brand-lockup`},[J(`img`,{class:`brand-logo`,src:`/dodo-logo.svg`,alt:``}),J(`span`,{class:`brand-wordmark`},`dodo`)],-1),J(`p`,null,L(t.value?`欢迎回来,继续把生活理顺。`:`创建你的 dodo`),1),J(`label`,null,[m[81]||=X(`用户名`,-1),W(J(`input`,{"onUpdate:modelValue":m[0]||=e=>i.value=e,autocomplete:`username`,placeholder:`你的用户名`},null,512),[[es,i.value]])]),J(`label`,null,[m[82]||=X(`密码`,-1),W(J(`input`,{"onUpdate:modelValue":m[1]||=e=>a.value=e,type:`password`,autocomplete:`current-password`,placeholder:`至少 12 位`,onKeyup:ds(on,[`enter`])},null,544),[[es,a.value]])]),J(`button`,{class:`primary`,onClick:on},L(t.value?`登录`:`开始使用`),1),de.value?(K(),q(`small`,Wf,L(de.value),1)):Z(``,!0)])])):(K(),q(`div`,Vf,[...m[80]||=[J(`span`,{class:`loader`},null,-1),X(`正在打开 dodo…`,-1)]]))}})).mount(`#app`),`serviceWorker`in navigator&&(navigator.serviceWorker.getRegistrations().then(e=>{e.forEach(e=>e.unregister())}),caches.keys().then(e=>e.forEach(e=>caches.delete(e)))); \ No newline at end of file +`),n=[],r=!1,i=()=>{r&&=(n.push(`
`),!1)};for(let e of t){let t=e.trimEnd();if(!t.trim()){i();continue}t.startsWith(`# `)?(i(),n.push(`

${Zs(t.slice(2))}

`)):t.startsWith(`## `)?(i(),n.push(`

${Zs(t.slice(3))}

`)):/^[-*] /.test(t)?(r||=(n.push(`
    `),!0),n.push(`
  • ${Zs(t.slice(2))}
  • `)):(i(),n.push(`

    ${Zs(t)}

    `))}return i(),n.join(``)}function $s(e,t){let n=t.trim().toLowerCase();return n?e.filter(e=>[e.title,e.description??``,e.list_name??``].join(` `).toLowerCase().includes(n)):e}function ec(e){let t=new Map;for(let n of e)n.parent_id&&t.set(n.parent_id,[...t.get(n.parent_id)??[],n]);return e.filter(e=>!e.parent_id).map(e=>({task:e,subtasks:t.get(e.id)??e.subtasks??[]}))}function tc(e,t){if(!!e.completed!=!!t.completed)return!1;if(!e.due_at&&!t.due_at)return!0;if(!e.due_at||!t.due_at)return!1;let n=Date.parse(e.due_at),r=Date.parse(t.due_at);return Number.isFinite(n)&&Number.isFinite(r)&&n===r}function nc(e,t,n,r){if(t===n)return e;let i=e.find(e=>e.id===t),a=e.find(e=>e.id===n);if(!i||!a||(i.parent_id??null)!==(a.parent_id??null))return e;let o=e.filter(e=>(e.parent_id??null)===(i.parent_id??null)),s=o.findIndex(e=>e.id===t),c=o.findIndex(e=>e.id===n),l=o.filter(e=>e.id!==t),u=l.findIndex(e=>e.id===n);if(l.splice(u+ +(r===`after`),0,i),s===c||l.every((e,t)=>e.id===o[t]?.id))return e;let d=l[Symbol.iterator]();return e.map(e=>(e.parent_id??null)===(i.parent_id??null)?d.next().value:e)}function rc(e){let t=Math.floor(Number(e.interval));if(!Number.isFinite(t)||t<1)throw Error(`重复间隔至少为 1`);if(e.frequency===`weekly`&&!e.weekdays?.length)throw Error(`至少选择一个重复日期`);if(e.frequency===`monthly`&&(!e.monthDays?.length||e.monthDays.some(e=>e<1||e>31)))throw Error(`请输入 1 到 31 的每月日期`);if(e.endMode===`count`&&(!e.count||e.count<1))throw Error(`重复次数至少为 1`);if(e.endMode===`date`&&!e.until)throw Error(`请选择结束日期`);let n=[`FREQ=${e.frequency.toUpperCase()}`];return t>1&&n.push(`INTERVAL=${t}`),e.frequency===`weekly`&&e.weekdays?.length&&n.push(`BYDAY=${e.weekdays.join(`,`)}`),e.frequency===`monthly`&&e.monthDays?.length&&n.push(`BYMONTHDAY=${e.monthDays.join(`,`)}`),e.endMode===`count`&&n.push(`COUNT=${Math.max(1,Math.floor(e.count??1))}`),e.endMode===`date`&&e.until&&n.push(`UNTIL=${e.until}T23:59:59`),n.join(`;`)}function ic(e=``){let t=Object.fromEntries(e.split(`;`).filter(Boolean).map(e=>e.split(`=`,2)));return{frequency:t.FREQ?.toLowerCase()||`daily`,interval:Math.max(1,Number(t.INTERVAL??1)),weekdays:t.BYDAY?.split(`,`).filter(Boolean)??[],monthDays:t.BYMONTHDAY?.split(`,`).map(Number).filter(Number.isFinite)??[],endMode:t.COUNT?`count`:t.UNTIL?`date`:`never`,count:t.COUNT?Number(t.COUNT):1,until:t.UNTIL?.slice(0,10)??``}}function ac(e,t){if(e===`none`)return{};if(e===`after_completion`){let e=String(t.afterCompletionDays).trim(),n=Number(e);if(!/^\d+$/.test(e)||!Number.isInteger(n)||n<1||n>3650)throw Error(`请输入 1 到 3650 的整数天数`);return{trigger_mode:`after_completion`,after_completion_days:n}}return{trigger_mode:`scheduled`,rrule:e===`custom`?rc(t.repeatConfig??{frequency:`daily`,interval:1,endMode:`never`}):`FREQ=${e.toUpperCase()}`}}function oc(e){if(!e)return{option:`none`,afterCompletionDays:1};if(e.trigger_mode===`after_completion`)return{option:`after_completion`,afterCompletionDays:e.after_completion_days??1};let t=ic(e.rrule??``);return{option:t.interval===1&&!t.weekdays?.length&&!t.monthDays?.length&&t.endMode===`never`?t.frequency:`custom`,afterCompletionDays:1}}function sc(e=new Date){return`${e.getFullYear()}-${`${e.getMonth()+1}`.padStart(2,`0`)}-${`${e.getDate()}`.padStart(2,`0`)}`}function cc(e){if(!e)return``;let t=new Date(e);return Number.isNaN(t.valueOf())?``:`${t.getFullYear()}-${`${t.getMonth()+1}`.padStart(2,`0`)}-${`${t.getDate()}`.padStart(2,`0`)}T${`${t.getHours()}`.padStart(2,`0`)}:${`${t.getMinutes()}`.padStart(2,`0`)}`}function lc(e){return e?new Date(e).toISOString():null}var uc=new Set([`tasks`,`today`,`upcoming`,`trash`,`habits`,`countdowns`,`settings`]);function dc(e,t){try{let n=JSON.parse(e.getItem(t)??`null`);if(n&&uc.has(n.view)&&typeof n.listId==`string`)return{view:n.view,listId:n.listId}}catch{}return{view:vc(),listId:``}}function fc(e,t,n,r){try{e.setItem(t,JSON.stringify({view:n,listId:r}))}catch{}}function pc(e,t,n){try{let n=e.getItem(t);if(n===`true`)return!0;if(n===`false`)return!1}catch{}return n}function mc(e,t,n){try{e.setItem(t,String(n))}catch{}}function hc(e){return`${e.getFullYear()}-${`${e.getMonth()+1}`.padStart(2,`0`)}-${`${e.getDate()}`.padStart(2,`0`)}`}function gc(e){return Array.isArray(e)?{items:e,nextCursor:null}:{items:e.items??[],nextCursor:e.next_cursor??null}}function _c(e){return e===`tasks`||e===`today`||e===`upcoming`}function vc(){return`today`}function yc(e,t,n=1){return e===`numeric`?Number(t??0)>=n:!!t}function bc(e,t){let n=(e.cells??[]).find(e=>e.day===t);return!(!n?.scheduled||n.paused)}function xc(e,t,n=1){let r=Number(t??0);return e===`numeric`?Math.min(r+1,n):r>0?0:1}function Sc(e,t){let n=Number(t??0);return e===`numeric`?Math.max(0,n-1):0}function Cc(e,t,n=1){return yc(e,t,n)?0:xc(e,t,n)}function wc(e,t,n){return e===`numeric`&&Number(t??0)>0&&Number(n)===0?`今日进度已重置`:e!==`numeric`&&Number(t??0)>0&&Number(n)===0?`已取消完成`:Number(n)>Number(t??0)?`已记录一次 🎉`:`已减少一次`}function Tc(e){return e>0?`还有 ${e} 天`:e===0?`就是今天`:`已经 ${Math.abs(e)} 天`}function Ec(e){return{countdown:`倒数日`,anniversary:`纪念日`,birthday:`生日`}[e]??`倒数日`}function Dc(e){return e===`lunar`?`农历`:`公历`}function Oc(e,t){return e>=64&&e>Math.abs(t)*1.5}function kc(e){return Math.max(0,Number(e)||0)+1}function Ac(e,t=1){return Math.max(0,(Number(e)||0)-Math.max(0,t))}async function jc(e,t,n){try{await e()}catch(e){return{mutated:!1,refreshed:!1,error:e}}return t(),{mutated:!0,refreshed:await n()}}function Mc(e,t,n,r,i=52,a=14,o=74){return{x:Math.min(Math.max(e,a),Math.max(a,n-i-a)),y:Math.min(Math.max(t,a),Math.max(a,r-i-o))}}function Nc(e,t,n=8){return Math.hypot(e,t)>=n}var Pc=null,Fc=null,Ic=null,Lc=0,Rc=new Map;function zc(e){let t=(Rc.get(e)??0)+1;return Rc.set(e,t),t}function Bc(e,t){return Rc.get(e)===t}async function Vc(e,t,n){let r=zc(e),i=!1;try{let a=await t();Bc(e,r)&&(n.success(a),i=!0)}catch(t){Bc(e,r)&&n.error(t)}finally{Bc(e,r)&&n.finally()}return i}function Hc(e,t,n){let r=0,i=0,a=null,o=o=>t(o,e())?(r+=1,a||=(async()=>{for(;i{a=null}),a):Promise.resolve();return{async run(n,a,s,c){let l=e(),u;try{u=await n()}catch(e){return s?.(e),!1}if(a(u),t(l,e())){let e=c?.(u);e instanceof Promise&&await e}return await o(l),t(l,e())&&ie());return t().catch(()=>void 0),Promise.all(n)}function Wc(e){return Pc?.week===e?Pc.habits:null}function Gc(e,t){Pc={week:e,habits:t}}function Kc(){Pc=null}async function qc(e){await e.restore(),e.commitRestore();try{return{restored:!0,refreshed:await e.refreshGrid()!==!1}}catch{return{restored:!0,refreshed:!1}}}function Jc(){return Fc?{items:Fc.items,archived:Fc.archived}:null}function Yc(e,t,n=Date.now()){Fc={items:e,archived:t,writtenAt:n}}function Xc(){Lc+=1,Fc=null,Ic=null}function Zc(){return Lc}function Qc(e){return e===Lc}function $c(e,t={}){let n=t.now??Date.now(),r=t.maxAge??3e4;if(!t.force&&Fc&&n-Fc.writtenAt(i===Lc&&Yc(e.items,e.archived,n),e)).finally(()=>{Ic===a&&(Ic=null)});return Ic=a,a}function el(e){let t=e.trim();return{value:t,error:t?``:`名称不能为空,请输入至少一个可见字符。`}}function tl(e){let t={};if(e.name.trim()||(t.name=`请输入习惯名称`),e.kind===`numeric`&&((!Number.isFinite(Number(e.target))||Number(e.target)<=0)&&(t.target=`目标值必须大于 0`),e.max_value!=null&&(!Number.isFinite(Number(e.max_value))||Number(e.max_value)<=0||Number(e.max_value)!Number.isInteger(e)||e<1||e>31)?t.month_days=`请输入 1 到 31 的日期`:new Set(n).size!==n.length&&(t.month_days=`日期不能重复`)}return e.schedule_type===`interval`&&(!Number.isInteger(Number(e.interval_days))||Number(e.interval_days)<1)&&(t.interval_days=`间隔天数至少为 1`),t}function nl(e,t){let n={};for(let r of Object.keys(t)){let i=e[r],a=t[r];JSON.stringify(i)!==JSON.stringify(a)&&(n[r]=a)}return n}function rl(e,t=!1){return t?{writable:!1,reason:`该习惯已归档`}:e?.paused?{writable:!1,reason:`今天已暂停`}:e?.scheduled?{writable:!0,reason:``}:{writable:!1,reason:`今天未安排`}}function il(e,t){return{loading:e===`loading`,error:e===`error`,empty:e===`success`&&t===0,list:e===`success`&&t>0}}function al(e,t={}){let n=sl(e,t);return n===`未知时间`?`归档时间未知`:`归档于 ${n}`}function ol(e){let t=e?.trim()??``,n=`未知设备`;/iPhone/i.test(t)?n=`iPhone`:/iPad/i.test(t)||/Macintosh/i.test(t)&&/Mobile/i.test(t)?n=`iPad`:/Android/i.test(t)&&/Mobile/i.test(t)?n=`Android 手机`:/Android/i.test(t)?n=`Android 平板`:/Windows/i.test(t)?n=`Windows`:/Macintosh|Mac OS X/i.test(t)?n=`Mac`:/Linux/i.test(t)&&(n=`Linux`);let r=`未知浏览器`;return/Edg(?:e|iOS|A)?\//i.test(t)?r=`Edge`:/Chrome\/|CriOS\//i.test(t)?r=`Chrome`:/Firefox\/|FxiOS\//i.test(t)?r=`Firefox`:/Safari\//i.test(t)&&/Version\//i.test(t)&&(r=`Safari`),`${n} · ${r}`}function sl(e,t={}){let n=e?.trim();if(!n)return`未知时间`;let r=/^(\d{4})-(\d{2})-(\d{2})T/.exec(n);if(r){let[,e,t,n]=r,i=new Date(Date.UTC(Number(e),Number(t)-1,Number(n)));if(i.getUTCFullYear()!==Number(e)||i.getUTCMonth()+1!==Number(t)||i.getUTCDate()!==Number(n))return`未知时间`}let i=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(?::\d{2}(?:\.\d{1,9})?)?$/i.test(n),a=new Date(i?`${n}Z`:n);if(Number.isNaN(a.getTime()))return`未知时间`;try{return new Intl.DateTimeFormat(`zh-CN`,{dateStyle:`short`,timeStyle:`short`,...t}).format(a)}catch{return`未知时间`}}var cl={create:`创建`,update:`更新`,complete:`完成`,delete:`删除`,archive:`归档`,restore:`恢复`,move:`移动`,import:`导入`},ll={task:`任务`,list:`清单`,folder:`文件夹`,countdown:`倒数日`,backup:`备份`};function ul(e){return e?cl[e.toLowerCase()]??`其他操作`:`其他操作`}function dl(e){return e?ll[e.toLowerCase()]??`内容`:`内容`}function fl(e){let t=e&&typeof e==`object`&&!Array.isArray(e)&&`detail`in e?e.detail:e,n=typeof t==`string`?t:``;for(let[e,t]of[[`暂停日不可记录正向进度`,`今天已暂停,不能记录进度。`],[`非计划日不可记录正向进度`,`今天未安排该习惯,不能记录进度。`],[`归档习惯不可修改`,`该习惯已归档,不能继续操作。`],[`请先归档再永久删除`,`请先归档该习惯,再永久删除。`]])if(n.includes(e))return t;if(Array.isArray(t)){let e=t.map(e=>e&&typeof e==`object`&&Array.isArray(e.loc)?e.loc.at(-1):``).find(Boolean),n={name:`名称不能为空,请输入至少一个可见字符。`,weekdays:`每周计划至少选择一天,且不能重复。`,month_days:`每月日期必须是 1–31,且不能重复。`,interval_days:`间隔天数至少为 1。`,target:`目标值必须大于 0。`,max_value:`最大值必须大于 0。`};if(typeof e==`string`&&n[e])return n[e]}return pl(t)}function pl(e){if(typeof e==`string`)return e;if(Array.isArray(e))return e.map(e=>{if(e&&typeof e==`object`){let t=e,n=Array.isArray(t.loc)?t.loc.filter(e=>e!==`body`).join(`.`):``,r=typeof t.msg==`string`?t.msg:JSON.stringify(t);return n?`${n}:${r}`:r}return String(e)}).filter(Boolean).join(`;`)||`请求参数有误`;if(e&&typeof e==`object`){let t=e;return`detail`in t?pl(t.detail):JSON.stringify(t)}return`请求失败`}function ml(e){if(e&&![`GET`,`HEAD`,`OPTIONS`].includes(e.toUpperCase())){let e=hl(`dodo_csrf`);if(e)return{"x-csrf-token":e}}return{}}function hl(e){if(typeof document>`u`)return``;let t=e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`),n=document.cookie.match(RegExp(`(?:^|; )${t}=([^;]*)`));return n?decodeURIComponent(n[1]):``}function gl({completing:e,showCompleted:t}){return e&&!t}function _l(e){return e?0:320}function vl(){return window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches??!1}function yl(e=vl()){let t=_l(e);return t?new Promise(e=>window.setTimeout(e,t)):Promise.resolve()}function bl(e,t,n=420){let r=new Map,i=new Map;return a=>{let o=r.get(a);o!==void 0&&window.clearTimeout(o);let s=i.get(a);s!==void 0&&window.cancelAnimationFrame(s),t(a);let c=window.requestAnimationFrame(()=>{i.delete(a),e(a),r.set(a,window.setTimeout(()=>{t(a),r.delete(a)},n))});i.set(a,c)}}function xl(e){return{pointerId:e.pointerId,clientX:e.clientX,clientY:e.clientY,captureTarget:e.currentTarget}}function Sl(e){try{e.captureTarget?.setPointerCapture(e.pointerId)}catch{}}function Cl(e,t,n){return Math.hypot(t.x-e.x,t.y-e.y)>n}function wl(e,t,n){let r=e.find(e=>e.id===t);if(!r||r.is_inbox)return null;let i=e.filter(e=>!e.is_inbox&&e.folder_id===r.folder_id),a=i[i.findIndex(e=>e.id===t)+(n===`up`?-1:1)];return a?{targetId:a.id,placement:n===`up`?`before`:`after`}:null}function Tl(e,t,n,r,i=`after`){let a=e.find(e=>e.id===t);if(!a||a.is_inbox)return{items:e,orderedIds:[]};let o=e.filter(e=>e.id!==t),s={...a,folder_id:n},c=o.filter(e=>!e.is_inbox&&e.folder_id===n),l=r?c.findIndex(e=>e.id===r):-1,u=l<0?c.length:l+ +(i===`after`);c.splice(u,0,s);let d=c[Symbol.iterator](),f=o.map(e=>e.is_inbox||e.folder_id!==n?e:d.next().value),p=[...d];return p.length&&f.push(...p),{items:f,orderedIds:c.map(e=>e.id)}}function El(e){return Math.min(72,Math.max(0,e))}function Dl(e){return e>=56}function Ol(...e){return e.every(e=>e<=0)}function kl(e,t){return!t.trim()&&e<=-36}function Al(e){return(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`k`}function jl(e,t,n){return t<2?null:n&&e===0?t-1:!n&&e===t-1?0:null}function Ml(e,t,n,r,i,a=6,o=8){let s=Math.min(Math.max(o,e.right-t),r-t-o),c=e.bottom+a,l=c+n<=i-o?c:e.top-n-a,u=Math.max(o,i-n-o);return{left:s,top:Math.min(Math.max(o,l),u)}}function Nl(e,t){return e?.isConnected?e:t}var Pl={key:0,class:`inline-error`},Fl={key:0,class:`view-intro`},Il={key:1,class:`habit-list today-habit-list`},Ll=[`data-habit-id`,`onPointerdown`,`onPointermove`,`onPointerup`,`onPointercancel`,`onTouchstartPassive`,`onTouchmovePassive`,`onTouchend`,`onTouchcancel`],Rl=[`disabled`,`aria-disabled`,`title`,`aria-label`,`aria-pressed`,`onClick`],zl={class:`task-check-mark`},Bl={class:`habit-main`},Vl={class:`habit-name`},Hl={key:0,class:`habit-state-note`},Ul={key:1,class:`habit-progress`},Wl=[`value`,`max`,`aria-label`],Gl={key:0,class:`empty-panel today-empty-panel`},Kl={class:`app-sheet__header`},ql={id:`habit-compose-title`},Jl=[`aria-label`],Yl={class:`app-sheet__body`},Xl={key:0,class:`inline-error`,role:`alert`,tabindex:`-1`},Zl=[`aria-invalid`],Ql={key:0,id:`habit-name-error`,class:`field-error`,role:`alert`},$l={class:`task-compose-row`},eu={key:0},tu=[`aria-invalid`],nu={key:0,id:`habit-target-error`,class:`field-error`,role:`alert`},ru={key:1},iu=[`aria-invalid`],au={key:0,id:`habit-max-error`,class:`field-error`,role:`alert`},ou={key:1,class:`habit-weekdays`,"aria-describedby":`habit-weekdays-error`},su=[`value`],cu={key:0,id:`habit-weekdays-error`,class:`field-error`,role:`alert`},lu={key:2},uu=[`aria-invalid`],du={key:0,id:`habit-month-days-error`,class:`field-error`,role:`alert`},fu={key:3},pu=[`aria-invalid`],mu={key:0,id:`habit-interval-error`,class:`field-error`,role:`alert`},hu={class:`app-sheet__footer`},gu={key:0,class:`field-error`,role:`status`},_u=[`disabled`],vu={key:2,class:`habit-list`},yu=[`data-habit-id`,`onPointerdown`,`onPointermove`,`onPointerup`,`onPointercancel`,`onTouchstartPassive`,`onTouchmovePassive`,`onTouchend`,`onTouchcancel`],bu=[`disabled`,`onPointerdown`,`onPointermove`,`onPointerup`],xu=[`disabled`,`aria-disabled`,`title`,`aria-label`,`aria-pressed`,`onClick`],Su={class:`task-check-mark`},Cu=[`aria-label`,`onClick`,`onKeydown`],wu={class:`habit-name`},Tu={key:0,class:`habit-state-note`},Eu={key:1,class:`habit-progress`},Du=[`value`,`max`,`aria-label`],Ou={class:`habit-week`,"aria-label":`最近一周打卡`},ku=[`title`,`aria-label`],Au={class:`habit-week-day`},ju={key:0,class:`empty-panel`},Mu={key:3,class:`habit-archive-section`},Nu=[`aria-expanded`],Pu={key:0,id:`archived-habits-panel`,class:`archived-habits`,"aria-live":`polite`},Fu={key:0,class:`habit-archive-status`},Iu={key:1,class:`habit-archive-status inline-error`,role:`alert`},Lu={key:2,class:`empty-panel`},Ru=[`onClick`],zu={class:`app-sheet__header`},Bu={id:`habit-detail-title`},Vu={class:`app-sheet__body`},Hu={class:`habit-detail-progress`},Uu={key:0,class:`app-sheet__footer`},Wu={key:1,class:`app-sheet__danger`},Gu={class:`settings-grid`},Ku={class:`tool-card`},qu={class:`file-button`},Ju={class:`tool-card password-card`},Yu={key:0,class:`inline-error`,role:`alert`},Xu=[`disabled`],Zu={class:`tool-card wide`},Qu={class:`session-copy`},$u={class:`session-title`},ed={class:`session-meta`},td={class:`session-device`},nd=[`datetime`],rd=[`aria-label`,`onClick`],id={key:0},ad={key:0,class:`tool-card wide`},od={class:`audit-copy`},sd=[`title`],cd=[`datetime`],ld=sr({__name:`MvpPanel`,props:{view:{},showCompleted:{type:Boolean}},emits:[`changed`,`notice`,`summary`],setup(e,{expose:t,emit:n}){let r=e,i=n,a=B([]),o=B([]),s=B(!1),c=B(`idle`),l=B(``),u=Q(()=>il(c.value,o.value.length)),d=B(null),f=B([]),p=B([]),m=B(!1),h=B(``),g=B(``),_=B(`boolean`),v=B(1),y=B(null),b=B(`daily`),x=B([]),S=B(``),C=B(1),w=B({}),T=B(``),E=B(!1),D=B(!1),O=B(null),k=B(null),A=B(null),j=B(!1),ee=B(null),M=null,te=B({x:window.innerWidth-43,y:window.innerHeight-104}),ne=Q(()=>({"--fab-origin-x":`${te.value.x}px`,"--fab-origin-y":`${te.value.y}px`})),re=B(null),ie=B(null),N=B(``),ae=B(``),se=B(``),ce=B(!1),le=B(``),P=B(hc(new Date)),ue=B(null),de=B(null),fe=B({}),I=B(null),pe=B(``),me=B(new Set),he=B(new Set);function ge(e,t){let n=new Set(he.value);t?n.add(e):n.delete(e),he.value=n}async function _e(e,t,n,r){!t&&yc(e.kind,n,e.target??1)&&(ve(e.id),r&&(await yl(),ge(e.id,!1)))}let ve=bl(e=>{me.value=new Set(me.value).add(e)},e=>{let t=new Set(me.value);t.delete(e),me.value=t}),ye=Q(()=>a.value.filter(e=>bc(e,P.value))),be=Q(()=>r.showCompleted?ye.value:ye.value.filter(e=>!Ee(e,P.value)||he.value.has(e.id))),xe=Q(()=>r.showCompleted?a.value:a.value.filter(e=>!Ee(e,P.value)||he.value.has(e.id)));On(Q(()=>({total:ye.value.length,completed:ye.value.filter(e=>Ee(e,P.value)).length})),e=>i(`summary`,e),{immediate:!0});let R;async function Se(e,t={}){let n={...t.headers||{}};t.body&&!(t.body instanceof FormData)&&(n[`Content-Type`]=`application/json`);let r=ml(t.method);r[`x-csrf-token`]&&(n[`x-csrf-token`]=r[`x-csrf-token`]);let i=await fetch(`/api/v1`+e,{credentials:`include`,...t,headers:n});if(!i.ok){let e=await i.json().catch(()=>({}));throw Error(fl(e.detail))}let a=i.headers.get(`content-type`)||``;return i.status===204?null:a.includes(`json`)?i.json():i.blob()}async function Ce(e){m.value=!0,h.value=``;try{await e()}catch(e){h.value=e instanceof Error?e.message:`请求失败`}finally{m.value=!1}}function we(e,t){return(e.cells??[]).find(e=>e.day===t)}function Te(e){return rl(we(e,P.value),!!e.archived_at)}function Ee(e,t){return yc(e.kind,we(e,t)?.value,e.target??1)}function De(e){return e instanceof Element&&!!e.closest(`button,input,select,textarea,a,label`)}function Oe(e,t){if(!m.value&&r.showCompleted){I.value={id:e.id,startY:t.clientY,offsetY:0},pe.value=e.id;try{t.currentTarget.setPointerCapture(t.pointerId)}catch{}}}function ke(e,t){let n=I.value;if(!n||n.id!==e.id)return;n.offsetY=t.clientY-n.startY;let r=t.currentTarget,i=document.elementsFromPoint(t.clientX,t.clientY).map(e=>e.closest(`[data-habit-id]`)).find(e=>e&&e!==r.closest(`[data-habit-id]`));i?.dataset.habitId&&(pe.value=i.dataset.habitId)}async function Ae(e,t){let n=I.value,r=pe.value;if(I.value=null,pe.value=``,!n||n.id!==e.id||!r||r===e.id)return;let o=t.clientY>=n.startY?`after`:`before`,s=a.value,c=nc(s,e.id,r,o);if(c!==s){a.value=c,Gc(hc(new Date),c);try{await Se(`/habits/reorder`,{method:`PUT`,body:JSON.stringify({habit_ids:c.map(e=>e.id)})}),i(`notice`,`顺序已保存`)}catch(e){a.value=s,Gc(hc(new Date),s),h.value=e instanceof Error?e.message:`请求失败`}}}function je(){I.value=null,pe.value=``}function Me(e,t){if(m.value||!Te(e).writable||De(t.target))return;let n=t.touches[0];n&&(ue.value={id:e.id,x:n.clientX,y:n.clientY},fe.value[e.id]=0)}function Ne(e,t){m.value||!Te(e).writable||De(t.target)||t.pointerType!==`touch`&&(de.value={id:e.id,x:t.clientX,y:t.clientY})}function Pe(e,t){let n=de.value;if(!n||n.id!==e.id)return;let r=t.clientX-n.x,i=t.clientY-n.y,a=Number(we(e,P.value)?.value??0);Math.abs(r)>Math.abs(i)&&(r>0&&a<(e.target??1)||r<0&&a>0)&&(fe.value[e.id]=Math.max(-92,Math.min(r,92)))}function Fe(e,t){let n=ue.value,r=t.touches[0];if(!n||n.id!==e.id||!r)return;let i=r.clientX-n.x,a=r.clientY-n.y,o=Number(we(e,P.value)?.value??0);Math.abs(i)>Math.abs(a)&&(i>0&&o<(e.target??1)||i<0&&o>0)&&(fe.value[e.id]=Math.max(-92,Math.min(i,92)))}function Ie(e){return e.kind===`numeric`?`${Number(we(e,P.value)?.value??0)} / ${e.target??1}`:``}function Le(e){return Math.max(Number(e.target??1),1)}function Re(e){return Math.min(Math.max(Number(we(e,P.value)?.value??0),0),Le(e))}function ze(e){let[t,n,r]=e.split(`-`).map(Number);return new Intl.DateTimeFormat(`zh-CN`,{weekday:`narrow`}).format(new Date(t,n-1,r))}function Be(e,t){return yc(e.kind,t.value,e.target??1)}function Ve(e,t){let n=t.scheduled?t.paused?`已暂停`:Be(e,t)?`已完成`:`未完成`:`未安排`;return`${t.day} ${ze(t.day)}:${n}`}function He(e,t){a.value=a.value.map(n=>n.id===e.id?{...n,cells:(n.cells??[]).map(e=>e.day===P.value?{...e,value:t}:e)}:n)}async function Ue(e,t){if(!Te(e).writable)return;let n=we(e,P.value)?.value,a=yc(e.kind,n,e.target??1),o=t>0?xc(e.kind,n,e.target??1):Sc(e.kind,n),s=n??0,c=!a&&yc(e.kind,o,e.target??1)&&gl({completing:!0,showCompleted:r.showCompleted});c||He(e,o);try{await Se(`/habits/${e.id}/logs/${P.value}`,{method:`PUT`,body:JSON.stringify({value:o})}),c&&(ge(e.id,!0),He(e,o)),await _e(e,a,o,c),i(`notice`,o>Number(s)?`已记录一次 🎉`:`已减少一次`)}catch(t){ge(e.id,!1),He(e,s),h.value=t instanceof Error?t.message:`请求失败`}}function We(){j.value=!0,window.setTimeout(()=>{j.value=!1},0)}async function Ge(e,t){let n=ue.value;if(ue.value=null,fe.value[e.id]=0,!n||n.id!==e.id||m.value)return;let r=t.changedTouches[0],i=r?r.clientX-n.x:0,a=r?r.clientY-n.y:0,o=Number(we(e,P.value)?.value??0),s=e.kind===`numeric`?i>0&&o<(e.target??1)||i<0&&o>0:Ee(e,P.value)?i<0:i>0;r&&s&&Oc(Math.abs(i),a)&&(We(),await Ue(e,i))}async function Ke(e,t){let n=de.value;if(!n||n.id!==e.id)return;de.value=null,fe.value[e.id]=0;let r=t.clientX-n.x,i=t.clientY-n.y,a=Number(we(e,P.value)?.value??0);(e.kind===`numeric`?r>0&&a<(e.target??1)||r<0&&a>0:Ee(e,P.value)?r<0:r>0)&&Oc(Math.abs(r),i)&&(We(),Ue(e,r))}function qe(e){de.value=null,e&&(fe.value[e.id]=0)}function Je(e){ue.value=null,e&&(fe.value[e.id]=0)}async function Ye(e){if(!Te(e).writable)return;let t=we(e,P.value)?.value,n=yc(e.kind,t,e.target??1),a=t??0,o=Cc(e.kind,t,e.target??1),s=!n&&yc(e.kind,o,e.target??1)&&gl({completing:!0,showCompleted:r.showCompleted});s&&ge(e.id,!0),He(e,o);try{await Se(`/habits/${e.id}/logs/${P.value}`,{method:`PUT`,body:JSON.stringify({value:o})}),await _e(e,n,o,s),i(`notice`,wc(e.kind,a,o))}catch(t){ge(e.id,!1),He(e,a),h.value=t instanceof Error?t.message:`请求失败`}}function Xe(){return{name:g.value,kind:_.value,target:_.value===`numeric`?Number(v.value):1,max_value:_.value===`numeric`?y.value:1,schedule_type:b.value,weekdays:b.value===`weekly`?x.value:null,month_days:b.value===`monthly`?S.value.split(/[,,\s]+/).filter(Boolean).map(Number):null,interval_days:b.value===`interval`?Number(C.value):null}}function Ze(){E.value&&(w.value=tl(Xe()))}let Qe=Q(()=>Object.keys(tl(Xe())).length>0),$e=Q(()=>O.value?`编辑习惯`:`添加习惯`);On([g,_,v,y,b,x,S,C],Ze,{deep:!0});async function et(){E.value=!0,T.value=``;let e=Xe();if(w.value=tl(e),Object.keys(w.value).length){un(()=>document.querySelector(`.habit-compose-sheet [aria-invalid="true"]`)?.focus());return}let t={...e,name:e.name.trim()};m.value=!0;try{if(O.value&&k.value){let e=nl(k.value,t);Object.keys(e).length&&await Se(`/habits/${O.value.id}`,{method:`PATCH`,body:JSON.stringify(e)}),i(`notice`,Object.keys(e).length?`习惯已更新`:`习惯未修改`)}else await Se(`/habits`,{method:`POST`,body:JSON.stringify(t)}),i(`notice`,`习惯已创建`);D.value=!1,O.value=null,k.value=null,await pt()}catch(e){T.value=e instanceof Error?e.message:`请求失败`}finally{m.value=!1}}function tt(){g.value=``,_.value=`boolean`,v.value=1,y.value=null,b.value=`daily`,x.value=[],S.value=``,C.value=1,w.value={},T.value=``,E.value=!1}function nt(e){e&&(te.value=e),O.value=null,k.value=null,tt(),D.value=!0,un(()=>re.value?.focus())}function rt(e){O.value=e,g.value=e.name,_.value=e.kind===`numeric`?`numeric`:`boolean`,v.value=e.target??1,y.value=e.max_value??null,b.value=e.schedule_type??`daily`,x.value=[...e.weekdays??[]],S.value=(e.month_days??[]).join(`, `),C.value=e.interval_days??1,w.value={},T.value=``,E.value=!1,k.value=Xe(),A.value=null,D.value=!0,un(()=>re.value?.focus())}function it(){D.value=!1,O.value=null,k.value=null}function at(e,t){j.value||(M=t??document.activeElement,A.value=e,un(()=>ee.value?.focus()))}function ot(){A.value=null,un(()=>{M?.isConnected?M.focus():d.value?.focus()})}t({openHabitComposer:nt,refreshHabits:pt});async function st(e){confirm(`归档习惯“${e.name}”?历史打卡记录会保留。`)&&await Ce(async()=>{await Se(`/habits/${e.id}`,{method:`DELETE`}),A.value=null,await pt(),r.view===`habits`&&s.value&&await ut(),i(`notice`,`习惯已归档`)})}async function ct(e){if(e.archived_at){h.value=``;try{let t=await qc({restore:()=>Se(`/habits/${e.id}/restore`,{method:`POST`}),commitRestore:()=>{o.value=o.value.filter(t=>t.id!==e.id),A.value=null,Kc()},refreshGrid:()=>pt()});i(`notice`,t.refreshed?`习惯已恢复`:`习惯已恢复,但列表刷新失败,请重试`),un(()=>d.value?.focus())}catch(e){h.value=e instanceof Error?e.message:`恢复失败`}}}async function lt(e){if(e.archived_at&&confirm(`永久删除习惯“${e.name}”?所有历史打卡记录也会被删除,且无法恢复。`)){h.value=``;try{await Se(`/habits/${e.id}/permanent`,{method:`DELETE`}),o.value=o.value.filter(t=>t.id!==e.id),A.value=null,i(`notice`,`习惯已永久删除`),un(()=>d.value?.focus())}catch(e){h.value=e instanceof Error?e.message:`永久删除失败`}}}async function ut(){if(r.view===`habits`&&c.value!==`loading`){c.value=`loading`,l.value=``;try{o.value=await Se(`/habits?archived=true`),c.value=`success`}catch(e){c.value=`error`,l.value=e instanceof Error?e.message:`归档习惯加载失败`}}}async function dt(){s.value=!s.value,s.value&&c.value!==`success`&&await ut()}function ft(){let e=hc(new Date);e!==P.value&&(P.value=e,r.view===`habits`&&pt())}async function pt(){let e=hc(new Date),t=Wc(e);t&&(a.value=t),t||(m.value=!0),h.value=``;try{let t=await Se(`/habits/grid?week=${e}`);return a.value=t.habits??[],Gc(e,a.value),!0}catch(e){return h.value=e instanceof Error?e.message:`请求失败`,!1}finally{t||(m.value=!1)}}async function mt(){await Ce(async()=>{let[e,t]=await Promise.all([Se(`/sessions`).catch(()=>[]),Se(`/audit-logs?limit=20`).catch(()=>[])]);f.value=gc(e).items,p.value=gc(t).items})}async function ht(e){await Ce(async()=>{await Se(`/sessions/${e}`,{method:`DELETE`}),await mt(),i(`notice`,`会话已撤销`)})}function gt(e,t){let n=URL.createObjectURL(e),r=document.createElement(`a`);r.href=n,r.download=t,r.click(),setTimeout(()=>URL.revokeObjectURL(n),1e3)}async function _t(){await Ce(async()=>{let e=await fetch(`/api/v1/export.csv`,{credentials:`include`});if(!e.ok)throw Error(`导出失败`);gt(await e.blob(),`dodo-export.csv`)})}async function vt(){ie.value&&confirm(`恢复为合并模式,将导入备份中的清单与任务。继续吗?`)&&await Ce(async()=>{if(ie.value.name.toLowerCase().endsWith(`.csv`)){let e=new FormData;e.append(`file`,ie.value),await Se(`/restore.csv?mode=merge`,{method:`POST`,body:e})}else await Se(`/restore?mode=merge`,{method:`POST`,body:await ie.value.text()});i(`changed`),i(`notice`,`数据已恢复`)})}async function yt(){if(le.value=``,ae.value!==se.value){le.value=`两次输入的新密码不一致`;return}if(ae.value.length<12){le.value=`新密码至少需要 12 位`;return}ce.value=!0;try{await Se(`/auth/change-password`,{method:`POST`,body:JSON.stringify({current_password:N.value,new_password:ae.value})}),N.value=``,ae.value=``,se.value=``,i(`notice`,`密码已修改,其他设备已退出登录`),await mt()}catch(e){le.value=e instanceof Error?e.message:`修改密码失败`}finally{ce.value=!1}}return Sr(()=>{r.view===`habits`||r.view===`today-habits`?(ft(),pt(),R=setInterval(ft,6e4)):mt()}),Tr(()=>{R&&clearInterval(R)}),(t,n)=>(K(),q(`section`,{class:F([`mvp-view`,{loading:m.value}])},[h.value?(K(),q(`p`,Pl,L(h.value),1)):Z(``,!0),e.view===`habits`||e.view===`today-habits`?(K(),q(G,{key:1},[e.view===`habits`?(K(),q(`header`,Fl,[...n[16]||=[J(`small`,null,`把想坚持的事,变成每天的日常`,-1)]])):Z(``,!0),e.view===`today-habits`&&(a.value.length||!m.value)?(K(),q(`div`,Il,[(K(!0),q(G,null,Ir(be.value,e=>(K(),q(`article`,{key:e.id,"data-habit-id":e.id,class:F([`habit-row today-habit-row swipeable`,{done:Ee(e,P.value),"just-completed":me.value.has(e.id),"completion-exiting":he.value.has(e.id),ready:Math.abs(fe.value[e.id]??0)>=64}]),style:oe({"--swipe-x":`${fe.value[e.id]??0}px`}),onPointerdown:t=>Ne(e,t),onPointermove:t=>Pe(e,t),onPointerup:t=>Ke(e,t),onPointercancel:t=>qe(e),onTouchstartPassive:t=>Me(e,t),onTouchmovePassive:t=>Fe(e,t),onTouchend:t=>Ge(e,t),onTouchcancel:t=>Je(e)},[J(`button`,{class:`task-check habit-check`,disabled:!Te(e).writable,"aria-disabled":!Te(e).writable,title:Te(e).reason,"aria-label":Te(e).reason||(Ee(e,P.value)?`减少${e.name}一次`:`完成${e.name}一次`),"aria-pressed":Ee(e,P.value),onClick:$(t=>Ye(e),[`stop`])},[J(`span`,zl,[Ee(e,P.value)?(K(),aa(V(Ds),{key:0})):Z(``,!0)])],8,Rl),J(`div`,Bl,[J(`span`,Vl,L(e.name),1),Te(e).reason?(K(),q(`small`,Hl,L(Te(e).reason),1)):Z(``,!0),Ie(e)?(K(),q(`small`,Ul,L(Ie(e)),1)):Z(``,!0),e.kind===`numeric`?(K(),q(`progress`,{key:2,class:`habit-progress-bar`,value:Re(e),max:Le(e),"aria-label":`${e.name}进度:${Ie(e)}`},null,8,Wl)):Z(``,!0)])],46,Ll))),128)),!be.value.length&&!m.value?(K(),q(`div`,Gl,[J(`span`,null,L(!e.showCompleted&&ye.value.length?`已完成的习惯已隐藏。`:`今天没有安排习惯,轻松一下吧。`),1),e.showCompleted||!ye.value.length?(K(),q(`button`,{key:0,class:`soft-button empty-action`,onClick:nt},[Y(V(Ds)),n[17]||=X(`添加习惯`,-1)])):Z(``,!0)])):Z(``,!0)])):Z(``,!0),Y(eo,{name:`task-compose`},{default:Sn(()=>[D.value?(K(),q(`div`,{key:0,class:`task-compose-mask app-sheet-mask`,onClick:$(it,[`self`])},[J(`form`,{class:`task-compose-sheet habit-compose-sheet app-sheet app-sheet--create`,style:oe(ne.value),role:`dialog`,"aria-modal":`true`,"aria-labelledby":`habit-compose-title`,onSubmit:$(et,[`prevent`]),onKeydown:ds(it,[`esc`])},[J(`header`,Kl,[J(`div`,null,[J(`small`,null,L(O.value?`EDIT HABIT`:`NEW HABIT`),1),J(`h2`,ql,L($e.value),1)]),J(`button`,{class:`icon`,type:`button`,"aria-label":`关闭${$e.value}`,onClick:it},[Y(V(Ys))],8,Jl)]),J(`div`,Yl,[T.value?(K(),q(`p`,Xl,L(T.value),1)):Z(``,!0),J(`label`,null,[n[18]||=X(`习惯名称`,-1),W(J(`input`,{ref_key:`habitNameInput`,ref:re,"onUpdate:modelValue":n[0]||=e=>g.value=e,placeholder:`例如:每天喝水 8 杯`,"aria-label":`新习惯名称`,"aria-invalid":!!w.value.name,"aria-describedby":`habit-name-error`},null,8,Zl),[[es,g.value]]),w.value.name?(K(),q(`small`,Ql,L(w.value.name),1)):Z(``,!0)]),J(`div`,$l,[J(`label`,null,[n[20]||=X(`记录方式`,-1),W(J(`select`,{"onUpdate:modelValue":n[1]||=e=>_.value=e,"aria-label":`习惯类型`},[...n[19]||=[J(`option`,{value:`boolean`},`完成 / 未完成`,-1),J(`option`,{value:`numeric`},`按数量记录`,-1)]],512),[[rs,_.value]])]),_.value===`numeric`?(K(),q(`label`,eu,[n[21]||=X(`目标值`,-1),W(J(`input`,{"onUpdate:modelValue":n[2]||=e=>v.value=e,type:`number`,min:`0`,step:`any`,"aria-label":`目标值`,"aria-invalid":!!w.value.target,"aria-describedby":`habit-target-error`},null,8,tu),[[es,v.value,void 0,{number:!0}]]),w.value.target?(K(),q(`small`,nu,L(w.value.target),1)):Z(``,!0)])):Z(``,!0),_.value===`numeric`?(K(),q(`label`,ru,[n[22]||=X(`最大值(可选)`,-1),W(J(`input`,{"onUpdate:modelValue":n[3]||=e=>y.value=e,type:`number`,min:`0`,step:`any`,"aria-label":`最大值`,"aria-invalid":!!w.value.max_value,"aria-describedby":`habit-max-error`},null,8,iu),[[es,y.value,void 0,{number:!0}]]),w.value.max_value?(K(),q(`small`,au,L(w.value.max_value),1)):Z(``,!0)])):Z(``,!0)]),J(`label`,null,[n[24]||=X(`计划类型`,-1),W(J(`select`,{"onUpdate:modelValue":n[4]||=e=>b.value=e,"aria-label":`计划类型`},[...n[23]||=[J(`option`,{value:`daily`},`每天`,-1),J(`option`,{value:`weekly`},`每周`,-1),J(`option`,{value:`monthly`},`每月`,-1),J(`option`,{value:`interval`},`间隔`,-1)]],512),[[rs,b.value]])]),b.value===`weekly`?(K(),q(`fieldset`,ou,[n[25]||=J(`legend`,null,`每周日期`,-1),(K(),q(G,null,Ir([`一`,`二`,`三`,`四`,`五`,`六`,`日`],(e,t)=>J(`label`,{key:t},[W(J(`input`,{"onUpdate:modelValue":n[5]||=e=>x.value=e,type:`checkbox`,value:t},null,8,su),[[ts,x.value]]),X(`周`+L(e),1)])),64)),w.value.weekdays?(K(),q(`small`,cu,L(w.value.weekdays),1)):Z(``,!0)])):Z(``,!0),b.value===`monthly`?(K(),q(`label`,lu,[n[26]||=X(`每月日期`,-1),W(J(`input`,{"onUpdate:modelValue":n[6]||=e=>S.value=e,inputmode:`numeric`,placeholder:`例如:1, 15, 31`,"aria-invalid":!!w.value.month_days,"aria-describedby":`habit-month-days-error`},null,8,uu),[[es,S.value]]),w.value.month_days?(K(),q(`small`,du,L(w.value.month_days),1)):Z(``,!0)])):Z(``,!0),b.value===`interval`?(K(),q(`label`,fu,[n[27]||=X(`间隔天数`,-1),W(J(`input`,{"onUpdate:modelValue":n[7]||=e=>C.value=e,type:`number`,min:`1`,step:`1`,"aria-invalid":!!w.value.interval_days,"aria-describedby":`habit-interval-error`},null,8,pu),[[es,C.value,void 0,{number:!0}]]),w.value.interval_days?(K(),q(`small`,mu,L(w.value.interval_days),1)):Z(``,!0)])):Z(``,!0)]),J(`footer`,hu,[Qe.value?(K(),q(`span`,gu,`请修正表单中的错误后再保存`)):Z(``,!0),J(`button`,{type:`button`,class:`secondary`,onClick:it},`取消`),J(`button`,{class:`primary-small`,disabled:m.value||Qe.value},L(m.value?`保存中…`:O.value?`保存修改`:`添加习惯`),9,_u)])],36)])):Z(``,!0)]),_:1}),e.view===`habits`?(K(),q(`div`,vu,[(K(!0),q(G,null,Ir(xe.value,t=>(K(),q(`article`,{key:t.id,"data-habit-id":t.id,class:F([`habit-row swipeable`,{done:Ee(t,P.value),"just-completed":me.value.has(t.id),"completion-exiting":he.value.has(t.id),ready:Math.abs(fe.value[t.id]??0)>=64,reordering:I.value?.id===t.id,"reorder-target":pe.value===t.id}]),style:oe({"--swipe-x":`${fe.value[t.id]??0}px`,"--reorder-y":`${I.value?.id===t.id?I.value.offsetY:0}px`}),onPointerdown:e=>Ne(t,e),onPointermove:e=>Pe(t,e),onPointerup:e=>Ke(t,e),onPointercancel:e=>qe(t),onTouchstartPassive:e=>Me(t,e),onTouchmovePassive:e=>Fe(t,e),onTouchend:e=>Ge(t,e),onTouchcancel:e=>Je(t)},[J(`button`,{class:`drag-handle habit-drag-handle`,disabled:!e.showCompleted,"aria-label":`上下拖动习惯排序`,title:`上下拖动排序`,onPointerdown:$(e=>Oe(t,e),[`stop`]),onPointermove:$(e=>ke(t,e),[`stop`]),onPointerup:$(e=>Ae(t,e),[`stop`]),onPointercancel:$(je,[`stop`])},[Y(V(Fs))],40,bu),J(`button`,{class:`task-check habit-check`,disabled:!Te(t).writable,"aria-disabled":!Te(t).writable,title:Te(t).reason,"aria-label":Te(t).reason||(Ee(t,P.value)?`减少${t.name}一次`:`完成${t.name}一次`),"aria-pressed":Ee(t,P.value),onClick:$(e=>Ye(t),[`stop`])},[J(`span`,Su,[Ee(t,P.value)?(K(),aa(V(Ds),{key:0})):Z(``,!0)])],8,xu),J(`div`,{class:`habit-main`,role:`button`,tabindex:`0`,"aria-label":`查看习惯详情:${t.name}`,onClick:e=>at(t,e.currentTarget),onKeydown:[ds($(e=>at(t,e.currentTarget),[`prevent`]),[`enter`]),ds($(e=>at(t,e.currentTarget),[`prevent`]),[`space`])]},[J(`span`,wu,L(t.name),1),Te(t).reason?(K(),q(`small`,Tu,L(Te(t).reason),1)):Z(``,!0),Ie(t)?(K(),q(`small`,Eu,L(Ie(t)),1)):Z(``,!0),t.kind===`numeric`?(K(),q(`progress`,{key:2,class:`habit-progress-bar`,value:Re(t),max:Le(t),"aria-label":`${t.name}进度:${Ie(t)}`},null,8,Du)):Z(``,!0),J(`div`,Ou,[(K(!0),q(G,null,Ir(t.cells,e=>(K(),q(`span`,{key:e.day,class:F([`habit-week-cell`,{done:Be(t,e),unscheduled:!e.scheduled||e.paused,today:e.day===P.value}]),title:Ve(t,e),"aria-label":Ve(t,e)},[J(`small`,Au,L(ze(e.day)),1),n[28]||=J(`i`,null,null,-1)],10,ku))),128))])],40,Cu)],46,yu))),128)),!xe.value.length&&!m.value?(K(),q(`div`,ju,L(!e.showCompleted&&a.value.length?`已完成的习惯已隐藏。`:`还没有习惯,从一件容易坚持的小事开始。`),1)):Z(``,!0)])):Z(``,!0),e.view===`habits`?(K(),q(`section`,Mu,[J(`button`,{ref_key:`habitArchiveToggle`,ref:d,class:`archived-toggle habit-archive-toggle`,type:`button`,"aria-expanded":s.value,"aria-controls":`archived-habits-panel`,onClick:dt},[Y(V(Cs)),J(`span`,null,L(c.value===`success`?`已归档(${o.value.length})`:`已归档`),1),Y(V(As),{class:F({expanded:s.value}),"aria-hidden":`true`},null,8,[`class`])],8,Nu),s.value?(K(),q(`div`,Pu,[c.value===`loading`?(K(),q(`p`,Fu,`正在加载归档习惯…`)):c.value===`error`?(K(),q(`div`,Iu,[J(`span`,null,L(l.value),1),J(`button`,{type:`button`,class:`soft-button`,onClick:ut},`重试`)])):u.value.empty?(K(),q(`p`,Lu,`暂无已归档习惯。`)):Z(``,!0),(K(!0),q(G,null,Ir(u.value.list?o.value:[],e=>(K(),q(`button`,{key:e.id,class:`archived-habit-row`,type:`button`,onClick:t=>at(e,t.currentTarget)},[J(`span`,null,[J(`b`,null,L(e.name),1),J(`small`,null,L(V(al)(e.archived_at)),1)]),Y(V(As),{"aria-hidden":`true`})],8,Ru))),128))])):Z(``,!0)])):Z(``,!0),Y(eo,{name:`countdown-detail`},{default:Sn(()=>[A.value?(K(),q(`div`,{key:0,class:`habit-detail-mask app-sheet-mask`,onClick:$(ot,[`self`])},[J(`article`,{ref_key:`habitDetailSheet`,ref:ee,class:`habit-detail-sheet app-sheet app-sheet--detail`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`habit-detail-title`,tabindex:`-1`,onKeydown:ds(ot,[`esc`])},[J(`header`,zu,[J(`div`,null,[n[29]||=J(`small`,null,`习惯详情`,-1),J(`h3`,Bu,L(A.value.name),1)]),J(`button`,{type:`button`,"aria-label":`关闭习惯详情`,onClick:ot},[Y(V(Ys))])]),J(`div`,Vu,[J(`div`,Hu,[n[30]||=J(`span`,null,`今日进度`,-1),J(`strong`,null,L(A.value.archived_at?`已归档`:Ie(A.value)||(Ee(A.value,P.value)?`已完成`:`未完成`)),1)])]),A.value.archived_at?Z(``,!0):(K(),q(`footer`,Uu,[J(`button`,{type:`button`,class:`soft-button`,onClick:n[8]||=e=>rt(A.value)},[Y(V(Vs)),n[31]||=X(`编辑习惯`,-1)]),J(`button`,{type:`button`,class:`soft-button`,onClick:n[9]||=e=>st(A.value)},[Y(V(Cs)),n[32]||=X(`归档习惯`,-1)])])),A.value.archived_at?(K(),q(`footer`,Wu,[J(`button`,{type:`button`,class:`soft-button habit-restore-button`,onClick:n[10]||=e=>ct(A.value)},[Y(V(Cs)),n[33]||=X(`恢复习惯`,-1)]),J(`button`,{type:`button`,class:`danger-text habit-delete-button`,onClick:n[11]||=e=>lt(A.value)},[Y(V(Js)),n[34]||=X(`永久删除`,-1)])])):Z(``,!0)],544)])):Z(``,!0)]),_:1})],64)):(K(),q(G,{key:2},[n[47]||=J(`header`,{class:`view-intro`},[J(`div`,null,[J(`small`,null,`备份、迁移与安全`)])],-1),J(`div`,Gu,[J(`article`,Ku,[Y(V(Ns)),n[37]||=J(`h2`,null,`数据导出与恢复`,-1),n[38]||=J(`p`,null,`导出完整 CSV 数据,或从 CSV / JSON 备份恢复。`,-1),J(`button`,{class:`soft-button`,onClick:_t},[Y(V(js)),n[35]||=X(`导出 CSV`,-1)]),J(`label`,qu,[Y(V(Cs)),n[36]||=X(`选择备份`,-1),J(`input`,{type:`file`,accept:`.csv,application/json`,onChange:n[12]||=e=>ie.value=e.target.files?.[0]||null},null,32)]),ie.value?(K(),q(`button`,{key:0,class:`danger-button`,onClick:vt},`确认恢复`)):Z(``,!0)]),J(`article`,Ju,[Y(V(Ss)),n[42]||=J(`h2`,null,`修改密码`,-1),n[43]||=J(`p`,null,`修改后当前设备保持登录,其他设备会自动退出。`,-1),J(`form`,{class:`password-form`,onSubmit:$(yt,[`prevent`])},[J(`label`,null,[n[39]||=X(`当前密码`,-1),W(J(`input`,{"onUpdate:modelValue":n[13]||=e=>N.value=e,type:`password`,autocomplete:`current-password`,required:``,"aria-label":`当前密码`},null,512),[[es,N.value]])]),J(`label`,null,[n[40]||=X(`新密码`,-1),W(J(`input`,{"onUpdate:modelValue":n[14]||=e=>ae.value=e,type:`password`,autocomplete:`new-password`,minlength:`12`,required:``,"aria-label":`新密码`,placeholder:`至少 12 位`},null,512),[[es,ae.value]])]),J(`label`,null,[n[41]||=X(`确认新密码`,-1),W(J(`input`,{"onUpdate:modelValue":n[15]||=e=>se.value=e,type:`password`,autocomplete:`new-password`,minlength:`12`,required:``,"aria-label":`确认新密码`},null,512),[[es,se.value]])]),le.value?(K(),q(`p`,Yu,L(le.value),1)):Z(``,!0),J(`button`,{class:`primary-small`,disabled:ce.value||!N.value||!ae.value||!se.value},L(ce.value?`正在修改…`:`修改密码`),9,Xu)],32)]),J(`article`,Zu,[Y(V(zs)),n[45]||=J(`h2`,null,`登录会话`,-1),(K(!0),q(G,null,Ir(f.value,e=>(K(),q(`div`,{key:e.id,class:`session-row`},[J(`span`,Qu,[J(`b`,$u,L(e.current?`当前设备`:`其他设备`),1),J(`small`,ed,[J(`span`,td,L(V(ol)(e.user_agent)),1),n[44]||=J(`span`,{"aria-hidden":`true`},` · `,-1),J(`time`,{datetime:e.last_seen_at??e.created_at},L(V(sl)(e.last_seen_at??e.created_at)),9,nd)])]),e.current?Z(``,!0):(K(),q(`button`,{key:0,class:`danger-text session-revoke`,"aria-label":`撤销 ${V(ol)(e.user_agent)} 的登录会话`,onClick:t=>ht(e.id)},`撤销`,8,rd))]))),128)),f.value.length?Z(``,!0):(K(),q(`p`,id,`没有可显示的会话。`))]),p.value.length?(K(),q(`article`,ad,[Y(V(Ss)),n[46]||=J(`h2`,null,`最近活动`,-1),(K(!0),q(G,null,Ir(p.value,(e,t)=>(K(),q(`div`,{key:e.id||t,class:`audit-row`},[J(`div`,od,[J(`span`,{class:`audit-action`,title:e.action??e.event??void 0},L(V(ul)(e.action??e.event))+L(V(ul)(e.action??e.event)===`其他操作`?``:V(dl)(e.entity_type)),9,sd),J(`time`,{datetime:e.created_at??e.timestamp},L(V(sl)(e.created_at??e.timestamp)),9,cd)])]))),128))])):Z(``,!0)])],64))],2))}}),ud=[`inert`,`aria-hidden`],dd={class:`countdown-hero`},fd={key:0,class:`inline-error`},pd={key:1,class:`countdown-layout`},md={class:`countdown-number`},hd={key:0},gd={class:`countdown-copy`},_d={key:1,class:`countdown-timeline`},vd={key:0},yd=[`onClick`],bd={class:`countdown-main`},xd={class:`countdown-badges`},Sd={class:`countdown-state`},Cd={key:2,class:`countdown-empty`},wd={key:4,class:`archived-countdowns`},Td=[`onClick`],Ed=[`onClick`],Dd={class:`app-sheet__header`},Od={id:`countdown-detail-title`},kd={class:`app-sheet__body`},Ad={class:`countdown-detail-days`},jd={key:0},Md={key:0},Nd={class:`app-sheet__footer`},Pd={class:`app-sheet__header`},Fd={id:`countdown-dialog-title`},Id={class:`app-sheet__body`},Ld={key:0},Rd=[`open`],zd={value:`solar`},Bd={value:`lunar`},Vd={key:0,class:`countdown-title-fields`},Hd=[`value`],Ud=[`value`],Wd={key:1},Gd={key:0},Kd=[`disabled`],qd={class:`app-sheet__footer`},Jd=[`disabled`],Yd=[`disabled`],Xd=sr({__name:`CountdownPanel`,emits:[`notice`],setup(e,{expose:t,emit:n}){let r=n,i=B([]),a=B([]),o=B(!1),s=B(!1),c=B(!1),l=B(null),u=B(null),d=B(``),f=B(null),p=B(!1),m=new Date().getFullYear(),h=()=>({title:``,event_date:hc(new Date),kind:`countdown`,repeat_rule:`none`,calendar_mode:`solar`,lunar_year:m,lunar_month:1,lunar_day:1,leap_month:!1,ignore_year:!1}),g=B(h()),_=B({x:window.innerWidth-43,y:window.innerHeight-104}),v=Q(()=>({"--fab-origin-x":`${_.value.x}px`,"--fab-origin-y":`${_.value.y}px`})),y=B(null),b=B(null),x=null;function S(){x=document.activeElement instanceof HTMLElement?document.activeElement:null,un(()=>y.value?.focus())}function C(){s.value=!1,p.value=!1,un(()=>x?.focus())}function w(e){if(e.key!==`Tab`)return;let t=e.currentTarget,n=Array.from(t.querySelectorAll(`button,input,select,textarea,[tabindex]:not([tabindex="-1"])`)).filter(e=>!e.hasAttribute(`disabled`));if(!n.length)return;let r=n[0],i=n[n.length-1];e.shiftKey&&document.activeElement===r?(e.preventDefault(),i.focus()):!e.shiftKey&&document.activeElement===i&&(e.preventDefault(),r.focus())}function T(e){return e.calendar_mode===`lunar`&&e.lunar_text?e.lunar_text:de(e.display_date)}function E(e){if(e.calendar_mode===`lunar`&&e.lunar_text){let t=e.ignore_year?` · 每年农历`:``;return`${de(e.display_date)}${t}`}return``}function D(e){return e.calendar_mode===`lunar`&&e.ignore_year?`每年`:e.repeat_rule===`none`?``:I(e.repeat_rule)}function O(e){return[Ec(e.kind),e.calendar_mode===`lunar`?`农历`:``,D(e)].filter(Boolean).slice(0,2)}function k(e){return[...e].sort((e,t)=>Number(t.pinned)-Number(e.pinned)||e.days-t.days||e.title.localeCompare(t.title,`zh-Hans-CN`))}let A=Q(()=>k(i.value.filter(e=>e.days>=0))),j=Q(()=>k(i.value).find(e=>e.pinned)??A.value[0]??k(i.value)[0]??null),ee=Q(()=>{if(!i.value.length)return`还没有记录重要日子`;let e=i.value.filter(e=>e.pinned).length;return e?`${i.value.length} 个重要日子 · ${e} 个置顶`:`${i.value.length} 个重要日子`}),M=Q(()=>{let e=i.value.filter(e=>e.id!==j.value?.id),t=k(e.filter(e=>e.days>=0&&e.days<=30)),n=k(e.filter(e=>e.days>30)),r=k(e.filter(e=>e.days<0));return[{key:`recent`,title:`最近`,items:t},{key:`later`,title:`稍后`,items:n},{key:`past`,title:``,items:r}].filter(e=>e.items.length)});async function te(e,t={}){let n={...t.headers||{}};t.body&&(n[`Content-Type`]=`application/json`),Object.assign(n,ml(t.method));let r=await fetch(`/api/v1`+e,{credentials:`include`,...t,headers:n});if(!r.ok){let e=await r.json().catch(()=>({}));throw Error(pl(e.detail??e))}return r.status===204?null:r.json()}async function ne(e){c.value=!0,d.value=``;try{await e()}catch(e){d.value=e instanceof Error?e.message:`请求失败`}finally{c.value=!1}}async function re(){let[e,t]=await Promise.all([te(`/countdowns`),te(`/countdowns?archived=true`)]);return{items:e,archived:t}}async function ie(e=!1){let t=Zc(),n=Jc();n&&(i.value=n.items,a.value=n.archived),n||(c.value=!0),d.value=``;try{let n=await $c(re,{force:e});if(!Qc(t))return;i.value=n.items,a.value=n.archived}catch(e){Qc(t)&&(d.value=e instanceof Error?e.message:`请求失败`)}finally{Qc(t)&&(c.value=!1)}}function N(e){f.value=null,l.value=e.id,u.value=e,p.value=!1,g.value={title:e.title,event_date:e.event_date,kind:e.kind,repeat_rule:e.repeat_rule,calendar_mode:e.calendar_mode,lunar_year:e.lunar_year||Number(e.event_date.slice(0,4)),lunar_month:Math.abs(e.lunar_month||1),lunar_day:e.lunar_day||1,leap_month:(e.lunar_month||0)<0,ignore_year:e.ignore_year},s.value=!0,S()}function ae(){(g.value.kind===`birthday`||g.value.kind===`anniversary`)&&(g.value.repeat_rule=`yearly`),g.value.kind===`countdown`&&(g.value.repeat_rule=`none`)}async function se(){c.value||g.value.title.trim()&&await ne(async()=>{let e={title:g.value.title.trim(),event_date:g.value.calendar_mode===`lunar`?`${g.value.lunar_year}-01-01`:g.value.event_date,kind:g.value.kind,repeat_rule:g.value.ignore_year?`yearly`:g.value.repeat_rule,calendar_mode:g.value.calendar_mode,ignore_year:g.value.ignore_year};l.value&&(e.expected_updated_at=u.value?.updated_at),g.value.calendar_mode===`lunar`&&(e.lunar_month=g.value.leap_month?-g.value.lunar_month:g.value.lunar_month,e.lunar_day=g.value.lunar_day),await te(l.value?`/countdowns/${l.value}`:`/countdowns`,{method:l.value?`PATCH`:`POST`,body:JSON.stringify(e)}),Xc(),C(),await ie(!0),r(`notice`,l.value?`倒数日已更新`:`倒数日已添加`)})}async function ce(e){await ne(async()=>{await te(`/countdowns/${e.id}/pin`,{method:`POST`}),Xc(),f.value=null,await ie(!0),r(`notice`,`已置顶`)})}async function le(e){await ne(async()=>{await te(`/countdowns/${e.id}`,{method:`DELETE`}),Xc(),f.value=null,await ie(!0),r(`notice`,`已归档`)})}async function P(e){await ne(async()=>{await te(`/countdowns/${e.id}/restore`,{method:`POST`}),Xc(),await ie(!0),r(`notice`,`已恢复`)})}async function ue(e){confirm(`永久删除“${e.title}”?这个操作不能撤销。`)&&await ne(async()=>{await te(`/countdowns/${e.id}/purge`,{method:`DELETE`}),Xc(),await ie(!0),r(`notice`,`已永久删除`)})}function de(e){let[t,n,r]=e.split(`-`);return`${t}年${Number(n)}月${Number(r)}日`}function fe(e){let[t,n,r]=e.split(`-`);return`${t}/${Number(n)}/${Number(r)}`}function I(e){return{none:`不重复`,weekly:`每周`,monthly:`每月`,yearly:`每年`}[e]}function pe(e){f.value=e,x=document.activeElement instanceof HTMLElement?document.activeElement:null,un(()=>b.value?.focus())}function me(){f.value=null,un(()=>x?.focus())}function he(e){if(e.key!==`Tab`)return;let t=e.currentTarget,n=Array.from(t.querySelectorAll(`button,[href],input,select,textarea,[tabindex]:not([tabindex="-1"])`)).filter(e=>!e.hasAttribute(`disabled`));if(!n.length)return;let r=n[0],i=n[n.length-1];e.shiftKey&&document.activeElement===r?(e.preventDefault(),i.focus()):!e.shiftKey&&document.activeElement===i&&(e.preventDefault(),r.focus())}function ge(){_e()}function _e(e){e&&(_.value=e),f.value=null,l.value=null,u.value=null,p.value=!1,g.value=h(),s.value=!0,S()}return t({openCountdownComposer:_e}),Sr(()=>{ie()}),Tr(()=>{x=null}),(e,t)=>(K(),q(`section`,{class:F([`countdown-view`,{loading:c.value}])},[J(`div`,{class:`countdown-content`,inert:s.value||!!f.value,"aria-hidden":s.value||f.value?`true`:void 0},[J(`header`,dd,[J(`small`,null,L(ee.value),1)]),d.value?(K(),q(`p`,fd,L(d.value),1)):Z(``,!0),i.value.length?(K(),q(`div`,pd,[j.value?(K(),q(`button`,{key:0,type:`button`,class:F([`countdown-focus`,`kind-${j.value.kind}`]),onClick:t[0]||=e=>pe(j.value)},[J(`small`,null,L(j.value.pinned?`置顶的重要日子`:`下一个重要日子`),1),J(`div`,md,[J(`strong`,null,L(j.value.days===0?`今天`:Math.abs(j.value.days)),1),j.value.days===0?Z(``,!0):(K(),q(`span`,hd,`天`))]),J(`h3`,null,L(j.value.title),1),J(`b`,gd,L(V(Tc)(j.value.days)),1),J(`p`,null,L(T(j.value)),1)],2)):Z(``,!0),M.value.length?(K(),q(`div`,_d,[(K(!0),q(G,null,Ir(M.value,e=>(K(),q(`section`,{key:e.key,class:`countdown-group`},[e.title?(K(),q(`h3`,vd,L(e.title),1)):Z(``,!0),(K(!0),q(G,null,Ir(e.items,e=>(K(),q(`button`,{key:e.id,type:`button`,class:F([`countdown-row`,[`kind-${e.kind}`,{pinned:e.pinned,today:e.days===0,past:e.days<0}]]),onClick:t=>pe(e)},[J(`span`,bd,[J(`b`,null,L(e.title),1),J(`small`,null,[X(L(T(e)),1),E(e)?(K(),q(G,{key:0},[X(` · `+L(E(e)),1)],64)):Z(``,!0)]),J(`span`,xd,[(K(!0),q(G,null,Ir(O(e),e=>(K(),q(`em`,{key:e},L(e),1))),128))])]),J(`span`,Sd,[J(`strong`,null,L(e.days===0?`今天`:Math.abs(e.days)),1),J(`small`,null,L(V(Tc)(e.days)),1)]),e.pinned?(K(),aa(V(Hs),{key:0,class:`pinned-icon`})):Z(``,!0)],10,yd))),128))]))),128))])):Z(``,!0)])):c.value?Z(``,!0):(K(),q(`div`,Cd,[Y(V(Es)),t[16]||=J(`b`,null,`还没有重要日子`,-1),t[17]||=J(`span`,null,`生日、纪念日,或一场期待已久的旅行`,-1),J(`button`,{type:`button`,class:`primary-small`,onClick:ge},`添加第一个重要日子`)])),a.value.length?(K(),q(`button`,{key:3,class:`archived-toggle`,onClick:t[1]||=e=>o.value=!o.value},[Y(V(Cs)),X(`已归档(`+L(a.value.length)+`)`,1)])):Z(``,!0),o.value?(K(),q(`div`,wd,[(K(!0),q(G,null,Ir(a.value,e=>(K(),q(`article`,{key:e.id},[J(`b`,null,L(e.title),1),J(`small`,null,[X(L(fe(e.display_date)),1),e.lunar_text?(K(),q(G,{key:0},[X(` · `+L(e.lunar_text),1)],64)):Z(``,!0),e.calendar_mode===`lunar`?(K(),q(G,{key:1},[X(` · 农历`)],64)):Z(``,!0)]),J(`button`,{onClick:t=>P(e)},[Y(V(Cs)),t[18]||=X(`恢复`,-1)],8,Td),J(`button`,{class:`danger-text`,onClick:t=>ue(e)},[Y(V(Js)),t[19]||=X(`永久删除`,-1)],8,Ed)]))),128))])):Z(``,!0)],8,ud),Y(eo,{name:`countdown-detail`},{default:Sn(()=>[f.value?(K(),q(`div`,{key:0,class:`countdown-detail-mask app-sheet-mask`,onClick:$(me,[`self`])},[J(`article`,{class:`countdown-detail-sheet app-sheet app-sheet--detail`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`countdown-detail-title`,onKeydown:[ds(me,[`esc`]),he]},[J(`header`,Dd,[J(`div`,null,[t[20]||=J(`small`,null,`重要日子详情`,-1),J(`h3`,Od,L(f.value.title),1)]),J(`button`,{ref_key:`detailCloseButton`,ref:b,type:`button`,"aria-label":`关闭详情`,onClick:me},[Y(V(Ys))],512)]),J(`div`,kd,[J(`div`,Ad,[J(`strong`,null,L(f.value.days===0?`今天`:Math.abs(f.value.days)),1),f.value.days===0?Z(``,!0):(K(),q(`span`,jd,`天`)),J(`b`,null,L(V(Tc)(f.value.days)),1)]),J(`dl`,null,[J(`div`,null,[t[21]||=J(`dt`,null,`日期`,-1),J(`dd`,null,L(T(f.value)),1)]),E(f.value)?(K(),q(`div`,Md,[t[22]||=J(`dt`,null,`换算`,-1),J(`dd`,null,L(E(f.value)),1)])):Z(``,!0),J(`div`,null,[t[23]||=J(`dt`,null,`类型`,-1),J(`dd`,null,L(V(Ec)(f.value.kind))+` · `+L(f.value.calendar_mode===`lunar`?`农历`:`公历`)+` · `+L(D(f.value)||`不重复`),1)])])]),J(`footer`,Nd,[f.value.pinned?Z(``,!0):(K(),q(`button`,{key:0,type:`button`,onClick:t[2]||=e=>ce(f.value)},[Y(V(Hs)),t[24]||=X(`置顶`,-1)])),J(`button`,{type:`button`,onClick:t[3]||=e=>N(f.value)},[Y(V(Vs)),t[25]||=X(`编辑`,-1)]),J(`button`,{type:`button`,class:`danger-text`,onClick:t[4]||=e=>le(f.value)},[Y(V(ws)),t[26]||=X(`归档`,-1)])])],32)])):Z(``,!0)]),_:1}),Y(eo,{name:`countdown-compose`},{default:Sn(()=>[s.value?(K(),q(`div`,{key:0,class:`countdown-modal-mask app-sheet-mask`,onClick:$(C,[`self`])},[J(`form`,{class:`countdown-modal app-sheet app-sheet--create`,style:oe(v.value),role:`dialog`,"aria-modal":`true`,"aria-labelledby":`countdown-dialog-title`,onSubmit:$(se,[`prevent`]),onKeydown:[ds(C,[`esc`]),w]},[J(`header`,Pd,[J(`div`,null,[J(`small`,null,L(l.value?`调整重要日子`:`快速记下重要日子`),1),J(`h3`,Fd,L(l.value?`编辑倒数日`:`新建倒数日`),1)]),J(`button`,{type:`button`,"aria-label":`关闭`,onClick:C},[Y(V(Ys))])]),J(`div`,Id,[J(`label`,null,[t[27]||=X(`名称`,-1),W(J(`input`,{ref_key:`titleInput`,ref:y,"onUpdate:modelValue":t[5]||=e=>g.value.title=e,maxlength:`200`,required:``,placeholder:`例如:去北海道旅行`,autofocus:``},null,512),[[es,g.value.title]])]),g.value.calendar_mode===`solar`?(K(),q(`label`,Ld,[t[28]||=X(`日期`,-1),W(J(`input`,{"onUpdate:modelValue":t[6]||=e=>g.value.event_date=e,type:`date`,required:``},null,512),[[es,g.value.event_date]])])):Z(``,!0),J(`label`,null,[t[30]||=X(`类型`,-1),W(J(`select`,{"onUpdate:modelValue":t[7]||=e=>g.value.kind=e,onChange:ae},[...t[29]||=[J(`option`,{value:`countdown`},`倒数日`,-1),J(`option`,{value:`anniversary`},`纪念日`,-1),J(`option`,{value:`birthday`},`生日`,-1)]],544),[[rs,g.value.kind]])]),J(`details`,{class:`countdown-advanced`,open:p.value,onToggle:t[15]||=e=>p.value=e.target.open},[J(`summary`,null,[t[31]||=J(`span`,null,`更多设置`,-1),Y(V(Os))]),J(`label`,null,[t[32]||=X(`历法`,-1),W(J(`select`,{"onUpdate:modelValue":t[8]||=e=>g.value.calendar_mode=e},[J(`option`,zd,L(V(Dc)(`solar`)),1),J(`option`,Bd,L(V(Dc)(`lunar`)),1)],512),[[rs,g.value.calendar_mode]])]),g.value.calendar_mode===`lunar`?(K(),q(`div`,Vd,[J(`label`,null,[t[33]||=X(`年份`,-1),W(J(`input`,{"onUpdate:modelValue":t[9]||=e=>g.value.lunar_year=e,type:`number`,min:`1900`,max:`2099`,required:``},null,512),[[es,g.value.lunar_year,void 0,{number:!0}]])]),J(`label`,null,[t[34]||=X(`月份`,-1),W(J(`select`,{"onUpdate:modelValue":t[10]||=e=>g.value.lunar_month=e},[(K(),q(G,null,Ir(12,e=>J(`option`,{key:e,value:e},L(e)+`月`,9,Hd)),64))],512),[[rs,g.value.lunar_month,void 0,{number:!0}]])]),J(`label`,null,[t[35]||=X(`日期`,-1),W(J(`select`,{"onUpdate:modelValue":t[11]||=e=>g.value.lunar_day=e},[(K(),q(G,null,Ir(30,e=>J(`option`,{key:e,value:e},L(e)+`日`,9,Ud)),64))],512),[[rs,g.value.lunar_day,void 0,{number:!0}]])])])):Z(``,!0),g.value.calendar_mode===`lunar`?(K(),q(`label`,Wd,[W(J(`input`,{"onUpdate:modelValue":t[12]||=e=>g.value.leap_month=e,type:`checkbox`},null,512),[[ts,g.value.leap_month]]),t[36]||=X(` 闰月(如果是闰月,勾选这里)`,-1)])):Z(``,!0),J(`label`,null,[W(J(`input`,{"onUpdate:modelValue":t[13]||=e=>g.value.ignore_year=e,type:`checkbox`},null,512),[[ts,g.value.ignore_year]]),t[37]||=X(` 忽略年份`,-1),g.value.calendar_mode===`lunar`?(K(),q(`span`,Gd,`,每年按农历计算`)):Z(``,!0)]),J(`label`,null,[t[39]||=X(`重复`,-1),W(J(`select`,{"onUpdate:modelValue":t[14]||=e=>g.value.repeat_rule=e,disabled:g.value.ignore_year},[...t[38]||=[J(`option`,{value:`none`},`不重复`,-1),J(`option`,{value:`weekly`},`每周`,-1),J(`option`,{value:`monthly`},`每月`,-1),J(`option`,{value:`yearly`},`每年`,-1)]],8,Kd),[[rs,g.value.repeat_rule]])])],40,Rd)]),J(`footer`,qd,[J(`button`,{type:`button`,class:`secondary`,disabled:c.value,onClick:C},`取消`,8,Jd),J(`button`,{class:`primary-small`,disabled:c.value},`保存`,8,Yd)])],36)])):Z(``,!0)]),_:1})],2))}}),Zd=[`aria-label`],Qd=sr({__name:`FloatingAddButton`,props:{label:{default:`添加`}},emits:[`activate`],setup(e,{emit:t}){let n=e,r=t,i=B(!1),a=B(null),o=B(null),s=!1,c=Q(()=>a.value?{left:`${a.value.x}px`,top:`${a.value.y}px`,right:`auto`,bottom:`auto`}:{});function l(e){let t=e.currentTarget,n=t.getBoundingClientRect();o.value={id:e.pointerId,startX:e.clientX,startY:e.clientY,originX:n.left,originY:n.top};try{t.setPointerCapture?.(e.pointerId)}catch{}}function u(e){let t=o.value;if(!t||t.id!==e.pointerId)return;let n=e.clientX-t.startX,r=e.clientY-t.startY;(i.value||Nc(n,r))&&(i.value=!0,a.value=Mc(t.originX+n,t.originY+r,window.innerWidth,window.innerHeight,56,14,84))}function d(e){let t=o.value;if(!t||t.id!==e.pointerId)return;let n=i.value||Nc(e.clientX-t.startX,e.clientY-t.startY);o.value=null,i.value=!1,n&&(s=!0,window.setTimeout(()=>{s=!1},180))}function f(e){if(s)return;let t=e.currentTarget.getBoundingClientRect();r(`activate`,{x:t.left+t.width/2,y:t.top+t.height/2})}return(e,t)=>(K(),q(`button`,{class:F([`unified-fab`,{dragging:i.value}]),style:oe(c.value),"aria-label":n.label,onPointerdown:l,onPointermove:u,onPointerup:d,onPointercancel:d,onClick:f},[Y(V(Us))],46,Zd))}}),$d=[`aria-checked`,`disabled`],ef=sr({__name:`CompletedFilterPill`,props:{modelValue:{type:Boolean},disabled:{type:Boolean,default:!1}},emits:[`update:modelValue`],setup(e,{emit:t}){let n=e,r=t;function i(){n.disabled||r(`update:modelValue`,!n.modelValue)}return(t,n)=>(K(),q(`button`,{type:`button`,class:`completed-filter-pill`,role:`switch`,"aria-checked":e.modelValue,"aria-label":`显示已完成`,disabled:e.disabled,onClick:i},[...n[0]||=[J(`span`,{class:`completed-filter-pill__label`},`显示已完成`,-1),J(`span`,{class:`completed-filter-pill__track`,"aria-hidden":`true`},[J(`span`,{class:`completed-filter-pill__thumb`})],-1)]],8,$d))}});function tf(e){let t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e);if(!t)return null;let n=Number(t[1]),r=Number(t[2])-1,i=Number(t[3]),a=new Date(n,r,i);return a.getFullYear()===n&&a.getMonth()===r&&a.getDate()===i?a:null}function nf(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,`0`)}-${String(e.getDate()).padStart(2,`0`)}`}function rf(e,t){let n=new Date(e.getFullYear(),e.getMonth(),e.getDate());return n.setDate(n.getDate()+t),n}function af(e,t){let n=e.getDate(),r=new Date(e.getFullYear(),e.getMonth()+t,1),i=new Date(r.getFullYear(),r.getMonth()+1,0).getDate();return r.setDate(Math.min(n,i)),r}function of(e,t){if(t===`ArrowLeft`)return rf(e,-1);if(t===`ArrowRight`)return rf(e,1);if(t===`ArrowUp`)return rf(e,-7);if(t===`ArrowDown`)return rf(e,7);if(t===`PageUp`)return af(e,-1);if(t===`PageDown`)return af(e,1);let n=(e.getDay()+6)%7;return t===`Home`?rf(e,-n):t===`End`?rf(e,6-n):new Date(e)}function sf(e,t,n){let r=new Date(e.getFullYear(),e.getMonth(),1),i=rf(r,-((r.getDay()+6)%7)),a=nf(t),o=n?nf(n):``;return Array.from({length:42},(t,n)=>{let r=rf(i,n),s=nf(r);return{date:r,value:s,inMonth:r.getMonth()===e.getMonth(),isToday:s===a,isSelected:s===o}})}function cf(e,t,n,r){let i=Math.min(Math.max(e.left,12),t-328-12),a=e.bottom+8,o=e.top-r-8,s=Math.max(12,n-r-12);return{left:i,top:a+r<=n-12?a:o>=12?o:Math.min(Math.max(e.bottom-e.height+8,12),s)}}var lf={class:`calendar-picker__header`},uf={id:`calendar-picker-title`},df={class:`calendar-picker__weekdays`,"aria-hidden":`true`},ff=[`data-date`,`aria-label`,`aria-selected`,`aria-current`,`tabindex`,`onFocus`,`onClick`],pf={class:`calendar-picker__footer`},mf=sr({__name:`CalendarPicker`,props:{open:{type:Boolean},modelValue:{},anchor:{}},emits:[`update:open`,`update:modelValue`],setup(e,{emit:t}){let n=e,r=t,i=B(null),a=B(``),o=B(new Date),s=B(new Date),c=B(!1),l=B({left:12,top:12}),u=[`一`,`二`,`三`,`四`,`五`,`六`,`日`],d=Q(()=>new Intl.DateTimeFormat(`zh-CN`,{year:`numeric`,month:`long`}).format(s.value)),f=Q(()=>sf(s.value,new Date,tf(a.value))),p=Q(()=>c.value?void 0:{left:`${l.value.left}px`,top:`${l.value.top}px`}),m=null;function h(){r(`update:open`,!1)}function g(e){a.value=e;let t=tf(e);o.value=t,s.value=new Date(t.getFullYear(),t.getMonth(),1)}function _(){r(`update:modelValue`,a.value),h()}function v(){g(nf(new Date))}function y(e){let t=new Date(s.value.getFullYear(),s.value.getMonth()+e,1),n=new Date(t.getFullYear(),t.getMonth()+1,0).getDate();b(new Date(t.getFullYear(),t.getMonth(),Math.min(o.value.getDate(),n)))}function b(e){o.value=e,s.value=new Date(e.getFullYear(),e.getMonth(),1),un(()=>i.value?.querySelector(`[data-date="${nf(e)}"]`)?.focus())}function x(e){[`ArrowLeft`,`ArrowRight`,`ArrowUp`,`ArrowDown`,`PageUp`,`PageDown`,`Home`,`End`].includes(e.key)?(e.preventDefault(),b(of(o.value,e.key))):(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),g(nf(o.value)))}function S(e){if(e.key===`Escape`){e.preventDefault(),h();return}if(e.key!==`Tab`||!i.value)return;let t=[...i.value.querySelectorAll(`button:not([disabled])`)];if(!t.length)return;let n=t[0],r=t[t.length-1];e.shiftKey&&document.activeElement===n?(e.preventDefault(),r.focus()):!e.shiftKey&&document.activeElement===r&&(e.preventDefault(),n.focus())}function C(e){!n.open||c.value||i.value?.contains(e.target)||n.anchor?.contains(e.target)||h()}function w(){c.value=window.matchMedia(`(max-width: 600px)`).matches,!c.value&&n.anchor&&i.value&&(l.value=cf(n.anchor.getBoundingClientRect(),window.innerWidth,window.innerHeight,i.value.getBoundingClientRect().height))}return On(()=>n.open,async e=>{if(e){m=document.activeElement;let e=tf(n.modelValue)||new Date;a.value=n.modelValue,o.value=e,s.value=new Date(e.getFullYear(),e.getMonth(),1),w(),document.addEventListener(`pointerdown`,C),window.addEventListener(`resize`,w),await un(),w(),i.value?.querySelector(`[data-date="${nf(e)}"]`)?.focus()}else document.removeEventListener(`pointerdown`,C),window.removeEventListener(`resize`,w),m?.focus()},{immediate:!0}),Tr(()=>{document.removeEventListener(`pointerdown`,C),window.removeEventListener(`resize`,w)}),(t,n)=>(K(),aa(Un,{to:`body`},[e.open?(K(),q(`div`,{key:0,class:F([`calendar-picker-layer`,{compact:c.value}]),onClick:n[3]||=$(e=>c.value&&h(),[`self`])},[J(`section`,{ref_key:`dialog`,ref:i,class:F([`calendar-picker`,{compact:c.value}]),style:oe(p.value),role:`dialog`,"aria-modal":`true`,"aria-labelledby":`calendar-picker-title`,onKeydown:S},[J(`header`,lf,[J(`button`,{type:`button`,"aria-label":`上个月`,onClick:n[0]||=e=>y(-1)},[Y(V(ks))]),J(`h3`,uf,L(d.value),1),J(`button`,{type:`button`,"aria-label":`下个月`,onClick:n[1]||=e=>y(1)},[Y(V(As))]),c.value?(K(),q(`button`,{key:0,class:`calendar-picker__close`,type:`button`,"aria-label":`关闭日期选择器`,onClick:h},[Y(V(Ys))])):Z(``,!0)]),J(`div`,df,[(K(),q(G,null,Ir(u,e=>J(`span`,{key:e},L(e),1)),64))]),J(`div`,{class:`calendar-picker__grid`,role:`grid`,"aria-label":`日期`,onKeydown:x},[(K(!0),q(G,null,Ir(f.value,e=>(K(),q(`button`,{key:e.value,type:`button`,role:`gridcell`,"data-date":e.value,class:F({outside:!e.inMonth,today:e.isToday,selected:e.isSelected}),"aria-label":e.value,"aria-selected":e.isSelected,"aria-current":e.isToday?`date`:void 0,tabindex:e.value===V(nf)(o.value)?0:-1,onFocus:t=>o.value=e.date,onClick:t=>g(e.value)},L(e.date.getDate()),43,ff))),128))],32),J(`footer`,pf,[J(`button`,{type:`button`,"data-action":`today`,onClick:v},`今天`),J(`button`,{type:`button`,"data-action":`clear`,onClick:n[2]||=e=>a.value=``},`清除`),n[4]||=J(`span`,null,null,-1),J(`button`,{type:`button`,"data-action":`cancel`,onClick:h},`取消`),J(`button`,{type:`button`,class:`calendar-picker__done`,"data-action":`done`,onClick:_},`完成`)])],38)],2)):Z(``,!0)]))}}),hf=864e5,gf=6e4,_f=36e5,vf=/^(\d{4})-(\d{2})-(\d{2})$/,yf=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,3}))?)?(Z|[+-]\d{2}:\d{2})?$/;function bf(e,t){return new Date(Date.UTC(e,t,0)).getUTCDate()}function xf(e){return e.month>=1&&e.month<=12&&e.day>=1&&e.day<=bf(e.year,e.month)&&e.hour>=0&&e.hour<=23&&e.minute>=0&&e.minute<=59&&e.second>=0&&e.second<=59}function Sf(e){return{year:Number(e[1]),month:Number(e[2]),day:Number(e[3]),hour:Number(e[4]??0),minute:Number(e[5]??0),second:Number(e[6]??0),millisecond:Number((e[7]??``).padEnd(3,`0`))}}function Cf(e,t){return e.getFullYear()===t.year&&e.getMonth()+1===t.month&&e.getDate()===t.day&&e.getHours()===t.hour&&e.getMinutes()===t.minute&&e.getSeconds()===t.second&&e.getMilliseconds()===t.millisecond}function wf(e,t){try{if(typeof e!=`string`||!e||e.trim()!==e)return null;let n=e.match(vf);if(n){let t=Sf(n);if(!xf(t))return null;let r=new Date(t.year,t.month-1,t.day);return!Number.isFinite(r.getTime())||!Cf(r,t)?null:{date:r,datetime:e}}let r=e.match(yf);if(!r)return null;let i=Sf(r);if(!xf(i))return null;let a=r[8];if(a&&a!==`Z`){let[e,t]=a.slice(1).split(`:`).map(Number);if(e>14||t>59||e===14&&t!==0)return null}let o=a?new Date(e):new Date(i.year,i.month-1,i.day,i.hour,i.minute,i.second,i.millisecond);if(!Number.isFinite(o.getTime())||!a&&!Cf(o,i))return null;if(!t){let e=new Date(o.getFullYear(),o.getMonth(),o.getDate());return{date:e,datetime:Tf(e)}}return{date:o,datetime:o.toISOString()}}catch{return null}}function Tf(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,`0`)}-${String(e.getDate()).padStart(2,`0`)}`}function Ef(e){return Date.UTC(e.getFullYear(),e.getMonth(),e.getDate())/hf}function Df(e,t){return Ef(e)-Ef(t)}function Of(e,t){let n=`${e.getMonth()+1}月${e.getDate()}日`;return e.getFullYear()===t?n:`${e.getFullYear()}年${n}`}function kf(e){return`${e.getFullYear()}年${e.getMonth()+1}月${e.getDate()}日`}function Af(e){return`${String(e.getHours()).padStart(2,`0`)}:${String(e.getMinutes()).padStart(2,`0`)}`}function jf(e){return e===0?`已完成(原定今天)`:e<0?`已完成(原定${Math.abs(e)}天前)`:`已完成(原定${e}天后)`}function Mf(e){if(e>0)return e<_f?`还有${Math.ceil(e/gf)}分钟`:e0?`还有${r}天`:`已过期${Math.abs(r)}天`,c=e.completed?e.dueHasTime?o:`已完成`:e.dueHasTime?Mf(t.date.getTime()-e.nowMs):r===0?`今天`:`${Math.abs(r)}天`,l=e.completed?`completed`:e.dueHasTime?t.date.getTime()Nf(t));return(t,r)=>n.value?(K(),q(`span`,{key:0,class:F([`task-due`,[`task-due--${n.value.state}`,{"task-due--timed":e.dueHasTime}]])},[J(`time`,{class:`task-due__text`,datetime:n.value.datetime,title:n.value.fullText,"aria-label":n.value.fullText},[e.dueHasTime?(K(),q(`span`,Ff,L(n.value.absoluteText),1)):Z(``,!0),e.dueHasTime?(K(),q(`span`,If,` · `)):Z(``,!0),J(`span`,Lf,L(n.value.relativeText),1)],8,Pf)],2)):Z(``,!0)}});function zf(e){let t=new Date(e),n=new Date(e);n.setSeconds(0,0),n.setMinutes(n.getMinutes()+1);let r=new Date(t.getFullYear(),t.getMonth(),t.getDate()+1).getTime();return Math.max(1,Math.min(n.getTime(),r)-e)}function Bf(){let e=B(Date.now()),t;function n(){t!==void 0&&(window.clearTimeout(t),t=void 0)}function r(){n(),!document.hidden&&(t=window.setTimeout(()=>{e.value=Date.now(),r()},zf(Date.now())))}function i(){e.value=Date.now(),r()}function a(){document.hidden?n():i()}return Sr(()=>{document.addEventListener(`visibilitychange`,a),window.addEventListener(`focus`,i),window.addEventListener(`pageshow`,i),r()}),Er(()=>{n(),document.removeEventListener(`visibilitychange`,a),window.removeEventListener(`focus`,i),window.removeEventListener(`pageshow`,i)}),e}var Vf={key:0,class:`center loading-brand`},Hf={key:1,class:`auth-shell`},Uf={class:`auth-card`},Wf={key:0,role:`alert`},Gf={class:`brand-row`},Kf={class:`primary-nav`},qf={class:`sidebar-create-wrap`},Jf=[`aria-expanded`],Yf={key:0,class:`sidebar-popover sidebar-create-menu`},Xf={class:`folders`},Zf=[`data-folder-id`],Qf=[`title`,`aria-label`,`onClick`],$f={class:`row-actions`},ep=[`aria-expanded`,`onClick`],tp=[`data-list-id`,`onPointermove`,`onPointerup`],np=[`onPointerdown`,`onPointermove`,`onPointerup`],rp=[`title`,`aria-label`,`onClick`],ip={class:`row-actions`},ap=[`aria-expanded`,`onClick`],op=[`data-list-id`,`onPointermove`,`onPointerup`],sp=[`onPointerdown`,`onPointermove`,`onPointerup`],cp=[`title`,`aria-label`,`onClick`],lp={class:`row-actions`},up=[`aria-expanded`,`onClick`],dp={class:`archived-lists`},fp=[`aria-expanded`,`disabled`],pp={id:`archived-task-lists`,class:`archived-list-items`},mp=[`title`],hp={class:`archived-row-menu`},gp=[`aria-label`,`aria-expanded`,`onClick`],_p={class:`sidebar-management`,"aria-label":`管理`},vp=[`aria-label`],yp={class:`app-sheet__header`},bp={class:`app-sheet__body`},xp=[`disabled`],Sp=[`disabled`],Cp=[`aria-expanded`],wp={key:0,class:`list-move-menu`,role:`menu`,"aria-label":`选择目标文件夹`},Tp=[`disabled`,`onClick`],Ep={class:`topbar`},Dp=[`aria-label`,`aria-expanded`],Op={class:`topbar-title`},kp=[`title`],Ap={key:0,class:`topbar-actions`},jp=[`disabled`],Mp={class:`search-pull-hint`,"aria-hidden":`true`},Np={class:`search`},Pp={key:0,class:`today-board`,"aria-label":`今日进度`},Fp={class:`today-track-head`},Ip=[`aria-valuemax`,`aria-valuenow`],Lp={class:`today-track-head`},Rp=[`aria-valuemax`,`aria-valuenow`],zp={key:0,class:`overdue-section`},Bp={class:`section-heading overdue-heading`},Vp={class:`task-list overdue-list`},Hp=[`data-task-id`],Up=[`aria-label`,`onClick`],Wp=[`onClick`,`onKeydown`],Gp=[`title`],Kp={key:0,class:`meta`},qp={class:`meta-item`},Jp={key:0,class:`task-tail`},Yp=[`data-task-id`,`onPointerdown`,`onPointermove`,`onPointerup`,`onPointercancel`,`onTouchstartPassive`,`onTouchmovePassive`,`onTouchend`,`onTouchcancel`],Xp=[`aria-label`,`aria-pressed`,`onClick`],Zp=[`onClick`,`onKeydown`],Qp=[`title`],$p={key:0,class:`task-tail`},em={id:`today-tasks`,class:`section-heading today-section-anchor`},tm={key:2,class:`list-toolbar`},nm={key:0},rm={key:3,class:`pager`},im=[`disabled`],am=[`disabled`],om=[`data-task-id`,`onPointerdown`,`onPointermove`,`onPointerup`,`onPointercancel`,`onTouchstartPassive`,`onTouchmovePassive`,`onTouchend`,`onTouchcancel`],sm=[`disabled`,`onPointerdown`,`onPointermove`,`onPointerup`],cm=[`aria-label`,`aria-pressed`,`onClick`],lm=[`aria-expanded`,`onClick`,`onKeydown`],um=[`title`],dm={key:0,class:`meta`},fm={class:`meta-item`},pm={key:2,class:`task-tail`},mm={key:3,class:`task-actions`},hm=[`onClick`],gm=[`onClick`],_m={key:4,class:`task-actions`},vm=[`onClick`],ym=[`data-task-id`,`onPointerdown`,`onPointermove`,`onPointerup`,`onPointercancel`,`onTouchstartPassive`,`onTouchmovePassive`,`onTouchend`,`onTouchcancel`],bm=[`onPointerdown`,`onPointermove`,`onPointerup`],xm=[`aria-label`,`aria-pressed`,`onClick`],Sm=[`onClick`,`onKeydown`],Cm=[`title`],wm={key:2,class:`task-tail`},Tm={key:3,class:`task-actions`},Em=[`onClick`],Dm={key:0,class:`empty`},Om={key:4,id:`today-habits`,class:`today-section-anchor`},km={class:`section-heading`},Am={class:`detail-head`},jm={class:`detail-form`},Mm={class:`detail-title`},Nm=[`value`],Pm={class:`task-detail-due-row`},Fm=[`value`],Im=[`disabled`],Lm={key:0,class:`field-hint`},Rm={key:0,class:`after-completion-fields`},zm={key:1,class:`repeat-custom-fields`},Bm={key:0},Vm={class:`weekday-picker`},Hm=[`value`],Um={key:1},Wm={key:2},Gm={key:3},Km={key:2,role:`alert`,class:`field-error`},qm={class:`field markdown`},Jm={class:`field-label`},Ym=[`innerHTML`],Xm={class:`subtasks`},Zm={class:`field-label`},Qm=[`onClick`],$m={class:`check`},eh={key:0,class:`hint`},th=[`open`],nh={class:`more-settings-body`},rh={class:`detail-actions`},ih=[`disabled`],ah={class:`more-sheet-head app-sheet__header`},oh={class:`app-sheet__body`},sh={class:`bottom`,"aria-label":`主要导航`},ch=[`aria-current`],lh=[`aria-current`],uh=[`aria-current`],dh=[`aria-current`],fh={class:`app-sheet__header`},ph={id:`task-compose-title`},mh={class:`app-sheet__body`},hh=[`aria-invalid`],gh={key:0,id:`compose-title-error`,role:`alert`,class:`field-error`},_h={class:`task-compose-row`},vh=[`value`],yh={class:`task-compose-date-actions`,"aria-label":`截止时间`},bh={class:`task-compose-date-control`},xh=[`aria-expanded`],Sh={key:1,class:`task-compose-time-chip`},Ch=[`disabled`],wh={key:0,class:`field-hint`},Th={key:0,class:`after-completion-fields`},Eh={key:1,role:`alert`,class:`field-error`},Dh={key:2,class:`repeat-custom-fields`},Oh={key:0},kh={class:`weekday-picker`},Ah=[`value`],jh={key:1},Mh={key:2},Nh={key:3},Ph={class:`app-sheet__footer`},Fh=[`disabled`],Ih={key:0,class:`toast`,role:`status`},Lh={key:4,class:`error-toast`,role:`alert`},Rh={id:`purge-list-title`},zh={key:0,role:`alert`,class:`purge-list-error`},Bh={class:`modal-actions`},Vh=[`disabled`],Hh=[`disabled`],Uh={class:`modal-box`,role:`dialog`,"aria-modal":`true`},Wh={key:0},Gh=[`aria-invalid`],Kh={key:0,id:`modal-name-error`,role:`alert`,class:`field-error`},qh={class:`modal-actions`},Jh=`dodo.navigation`,Yh=`dodo.show-completed`,Xh=50;hs(sr({__name:`App`,setup(e){let t=B(null),n=B(!1),r=B(!1),i=B(``),a=B(``),o=B([]),s=B([]),c=B([]),l=B(!1),u=B(null),d=B(null),f=B(null),p=B({}),m=null,h=B(null),g=B(!1),_=B(``),v=B(null),y=B(null),b=null,x=B([]),S=B([]),C=B([]),w=dc(window.localStorage,Jh),T=B(w.listId),E=B(w.view),D=B(null),O=B(!1),k=B(null),A=B(!1),j=B(null),ee=B(void 0),M=B(``),te=B(`after`),ne,re,ie=``,N=B(``),ae=B(null),se=B(!1),ce=B(0),le=null,P=Q(()=>[`tasks`,`today`,`upcoming`,`trash`].includes(E.value)),ue=Q(()=>({"--search-pull":`${ce.value}px`,"--search-pull-opacity":String(Math.min(1,ce.value/56))})),de=B(``),fe=B(``),I=B(!1),pe=B(!1),me=Bf(),he=B(!1),ge=B(!1),_e=B(!1),ve=B(!1),ye=B(!1),be=B(!1),xe=B(pc(window.localStorage,Yh,!0)),R=B(1),Se=B(0),Ce=B(0),we=B(0),Te=B(0),Ee=B(0),De=B(0),Oe=Q(()=>Math.max(1,Math.ceil(Se.value/Xh))),ke=B(new Set),Ae=B(new Set),je=B(new Set),Me=B(new Set);function Ne(e,t){let n=new Set(Me.value);t?n.add(e):n.delete(e),Me.value=n}let Pe=bl(e=>{je.value=new Set(je.value).add(e)},e=>{let t=new Set(je.value);t.delete(e),je.value=t}),Fe=B(!1),Ie=B(null),Le=B(null),Re=B({}),ze=B(null),Be=B(``),Ve=B(!1),He=B(!1),Ue=B(``),We=B(``),Ge=B(``),Ke=B(``),qe=B(!1),Je=B(`12:00`),Ye=B(!1),Xe=B(null),Ze=B(null),Qe=B(0),$e=B(``),et=B(`none`),tt=B(`1`),nt=B(``),rt=B(`none`),it=B(`1`),at=B(``),ot=B(null),st=B(!1),ct=B(!1),lt=()=>({frequency:`daily`,interval:1,weekdays:[],monthDays:[],endMode:`never`,count:10,until:``}),ut=B(lt()),dt=B(lt()),ft=[{value:`MO`,label:`一`},{value:`TU`,label:`二`},{value:`WE`,label:`三`},{value:`TH`,label:`四`},{value:`FR`,label:`五`},{value:`SA`,label:`六`},{value:`SU`,label:`日`}],pt=0,mt=0,ht=B(null),gt=B(null),_t=B({x:window.innerWidth-43,y:window.innerHeight-104}),vt=``,yt=Q(()=>({"--fab-origin-x":`${_t.value.x}px`,"--fab-origin-y":`${_t.value.y}px`}));function bt(){let e=s.value.find(e=>e.is_inbox)?.id||T.value;Ue.value=``,We.value=``,Ge.value=E.value===`tasks`&&T.value?T.value:e,Ke.value=E.value===`today`?sc():``,qe.value=!1,Je.value=`12:00`,Qe.value=0,$e.value=``,et.value=`none`,tt.value=`1`,nt.value=``,ut.value=lt(),Ye.value=!1,He.value=!0,un(()=>document.querySelector(`.task-compose-input`)?.focus())}let xt=Q(()=>E.value===`today`?`添加今天任务`:`添加任务`),St=Q(()=>{if(!Ke.value)return`设置截止日期`;let[e,t,n]=Ke.value.split(`-`).map(Number),r=new Date(e,t-1,n);return Number.isNaN(r.getTime())?`设置截止日期`:new Intl.DateTimeFormat(`zh-CN`,{month:`short`,day:`numeric`,weekday:`short`}).format(r)});function Ct(){Ke.value=``,qe.value=!1,et.value=`none`}function wt(){qe.value=!0,un(()=>{let e=Ze.value;try{e?.showPicker?.()}catch{e?.focus()}})}function Tt(){Ye.value=!1,He.value=!1}function Et(e){_t.value=e,E.value===`habits`?ht.value?.openHabitComposer(e):E.value===`countdowns`?gt.value?.openCountdownComposer(e):[`tasks`,`today`,`upcoming`].includes(E.value)&&bt()}async function Dt(e,t,n,r,i){if(t!==`none`&&!e.due_at)throw Error(`请先设置截止时间`);if(t===`none`)return i&&await H(`/recurrences/${i.id}`,{method:`DELETE`}),null;let a=ac(t,{afterCompletionDays:r,repeatConfig:n});return i?await H(`/recurrences/${i.id}`,{method:`PATCH`,body:JSON.stringify(a)}):await H(`/recurrences`,{method:`POST`,body:JSON.stringify({task_id:e.id,...a})})}async function Ot(e){let t=++pt;st.value=!0,ot.value=null,rt.value=`none`,it.value=`1`,at.value=``;try{let n=await H(`/tasks/${e.id}/recurrence`);if(t!==pt||D.value?.id!==e.id)return;ot.value=n;let r=oc(n);rt.value=r.option,it.value=String(r.afterCompletionDays),dt.value=n?.rrule?ic(n.rrule):lt()}catch(e){t===pt&&en(e)}finally{t===pt&&(st.value=!1)}}async function kt(){let e=el(Ue.value);if(e.error){We.value=e.error;return}let t=e.value;if(Ue.value=t,We.value=``,Ge.value)try{let e=ac(et.value,{afterCompletionDays:tt.value,repeatConfig:ut.value}),n=Ke.value?`${Ke.value}T${qe.value?Je.value:`23:59`}`:``;if(et.value!==`none`&&!n)throw Error(`请先设置截止时间`);let r=await H(`/tasks`,{method:`POST`,body:JSON.stringify({title:t,list_id:Ge.value,due_at:lc(n),due_has_time:qe.value,priority:Qe.value,description:$e.value,...e})});_c(E.value)&&(x.value.push(r),Se.value=kc(Se.value)),E.value===`today`&&ln(),He.value=!1,U(`任务已添加`)}catch(e){nt.value=e instanceof Error?e.message:`添加失败`,en(e)}}function At(){window.matchMedia(`(max-width: 930px)`).matches?he.value=!he.value:ge.value=!ge.value}let jt=B(!1),Mt=B(``),Nt=B(``),Pt=B(``),Ft=B(``),It=B(`确定`),Lt=B(null);function z(e,t=``,n=``,r=`确定`){return new Promise(i=>{Mt.value=e,Nt.value=t,Pt.value=n,Ft.value=``,It.value=r,jt.value=!0,Lt.value=i})}function Rt(){jt.value=!1,Lt.value&&=(Lt.value(null),null)}function zt(){if(Nt.value){let e=el(Pt.value);if(e.error){Ft.value=e.error;return}Pt.value=e.value}jt.value=!1,Lt.value&&=(Lt.value(Pt.value),null)}let Bt=Q(()=>E.value===`trash`?`回收站`:E.value===`today`?`今天`:E.value===`upcoming`?`最近 7 天`:E.value===`habits`?`习惯`:E.value===`countdowns`?`倒数日`:E.value===`settings`?`设置与数据`:s.value.find(e=>e.id===T.value)?.name||`收集箱`),Vt=Q(()=>`${De.value} / ${Ee.value}`),Ht=(e,t)=>`${t>0?Math.min(100,Math.round(e/t*100)):0}%`,Ut=Q(()=>Ht(Te.value,we.value)),Wt=Q(()=>Ht(De.value,Ee.value));function Gt(e){document.getElementById(e)?.scrollIntoView({behavior:`smooth`,block:`start`})}function Kt(e){Ee.value=e.total,De.value=e.completed}let qt=Q(()=>E.value===`trash`?C.value:x.value),Jt=Q(()=>{let e=new Date,t=new Date(e);t.setDate(t.getDate()+7);let n=qt.value;return[`habits`,`settings`,`countdowns`].includes(E.value)?[]:(E.value===`today`&&(n=n.filter(t=>t.due_at&&new Date(t.due_at).toDateString()===e.toDateString())),E.value===`upcoming`&&(n=n.filter(n=>n.due_at&&new Date(n.due_at)>=e&&new Date(n.due_at)<=t)),N.value.trim()?$s(n,N.value):n)}),Yt=Q(()=>D.value?.subtasks??[]),Xt=Q(()=>ec(Jt.value)),Zt=Q(()=>Xt.value),Qt=Q(()=>ec(S.value)),$t;On(Ke,e=>{e||(qe.value=!1,et.value=`none`)}),On(N,()=>{$t&&window.clearTimeout($t),_c(E.value)&&(R.value=1,$t=window.setTimeout(()=>hn(),250))}),On(xe,e=>{mc(window.localStorage,Yh,e),_c(E.value)&&(R.value=1,hn())});async function H(e,t={}){let n=new Headers(t.headers||{});!n.has(`Content-Type`)&&t.body&&!(t.body instanceof FormData)&&n.set(`Content-Type`,`application/json`);let r=ml(t.method);r[`x-csrf-token`]&&n.set(`x-csrf-token`,r[`x-csrf-token`]);let i=await fetch(`/api/v1`+e,{credentials:`include`,headers:n,...t});if(!i.ok){let e=`请求失败`;try{e=pl((await i.json()).detail)}catch{}throw Error(e)}return i.status===204?null:i.json()}function U(e){fe.value=e,window.setTimeout(()=>{fe.value===e&&(fe.value=``)},2400)}function en(e){de.value=e instanceof Error?e.message:`请求失败`}async function tn(e){let t=Intl.DateTimeFormat().resolvedOptions().timeZone;t&&t!==e&&await H(`/me`,{method:`PATCH`,body:JSON.stringify({timezone:t})})}function nn(e){w.view===`tasks`&&w.listId?T.value=s.value.some(e=>e.id===w.listId)?w.listId:e:T.value=e}async function rn(){E.value===`trash`?await yn():_c(E.value)?(await hn(),(E.value===`tasks`||E.value===`upcoming`)&&Wn()):(x.value=[],Se.value=0)}async function an(){n.value=!1;try{let e=await H(`/setup/status`);if(t.value=e.initialized,e.initialized){let e=await H(`/bootstrap`);r.value=!0,o.value=e.folders??[],s.value=e.lists??[],Fe.value=!0,nn(e.inbox_id||s.value.find(e=>e.is_inbox)?.id||s.value[0]?.id||``),ke.value=new Set(o.value.map(e=>e.id)),await tn(e.user?.timezone),await sr(),mn(),await rn()}}catch{r.value=!1,t.value??=!0}finally{n.value=!0}}async function on(){de.value=``;try{await H(t.value?`/auth/login`:`/setup/initialize`,{method:`POST`,body:JSON.stringify({username:i.value,password:a.value})}),t.value=!0,r.value=!0;let e=await H(`/bootstrap`);o.value=e.folders??[],s.value=e.lists??[],Fe.value=!0,nn(e.inbox_id||s.value.find(e=>e.is_inbox)?.id||s.value[0]?.id||``),ke.value=new Set(o.value.map(e=>e.id)),await tn(e.user?.timezone),mn(),await rn()}catch(e){en(e)}}async function sn(e){let t=[],n=null;do{let r=e.includes(`?`)?`&`:`?`,i=await H(n?`${e}${r}cursor=${encodeURIComponent(n)}`:e);t.push(...i.items??i),n=i.next_cursor??null}while(n);return t}function cn(e){let t=new Date;return t.setDate(t.getDate()+e),t.setHours(0,0,0,0),t.toISOString()}async function ln(){let e=++mt;try{let t=async e=>{let t=new URLSearchParams({page:`1`,page_size:`1`});t.set(`due_from`,cn(0)),t.set(`due_to`,cn(1)),t.set(`completed`,String(e));let n=await H(`/tasks?${t}`);return Number(n.total??n.items?.length??0)},[n,r,i]=await Promise.all([t(!1),t(!0),(async()=>{let e=new URLSearchParams({page:`1`,page_size:`1`});e.set(`due_to`,cn(0)),e.set(`completed`,`false`);let t=await H(`/tasks?${e}`);return Number(t.total??t.items?.length??0)})()]);if(e!==mt||E.value!==`today`)return;Te.value=r,we.value=i+n+r}catch{}}async function dn(e=zc(`tasks`)){let t=new URLSearchParams;t.set(`due_to`,cn(0)),t.set(`completed`,`false`);let n=await sn(`/tasks?${t}`);Bc(`tasks`,e)&&(S.value=n)}async function fn(e=zc(`tasks`)){let t=new URLSearchParams({page:String(R.value),page_size:String(Xh)});N.value?t.set(`q`,N.value):E.value===`tasks`&&T.value&&t.set(`list_id`,T.value),E.value===`today`&&(t.set(`due_from`,cn(0)),t.set(`due_to`,cn(1))),E.value===`upcoming`&&(t.set(`due_from`,cn(0)),t.set(`due_to`,cn(8))),!xe.value&&E.value!==`trash`&&t.set(`completed`,`false`);let n=await H(`/tasks?${t}`);if(Bc(`tasks`,e)&&(x.value=n.items??[],Se.value=n.total??x.value.length,Ce.value=0,!xe.value&&!N.value&&E.value!==`trash`&&x.value.length===0)){let n=new URLSearchParams(t);n.set(`page`,`1`),n.set(`page_size`,`1`),n.set(`completed`,`true`);let r=await H(`/tasks?${n}`);if(!Bc(`tasks`,e))return;Ce.value=Number(r.total??r.items?.length??0)}}async function pn(e=!1){if(!e&&Fe.value)return;let[t,n]=await Promise.all([H(`/folders`),H(`/lists`)]);o.value=t,s.value=n,Fe.value=!0,s.value.some(e=>e.id===T.value)||(T.value=s.value.find(e=>e.is_inbox)?.id||s.value[0]?.id||``),ke.value=new Set(o.value.map(e=>e.id)),await sr()}async function mn(){try{await $c(async()=>{let[e,t]=await Promise.all([H(`/countdowns`),H(`/countdowns?archived=true`)]);return{items:e??[],archived:t??[]}})}catch{}}async function hn(){let e=zc(`tasks`);I.value=!0,de.value=``;try{if(Fe.value||await pn(),!Bc(`tasks`,e))return;E.value===`today`?await Uc([()=>fn(e),()=>dn(e)],ln):(await fn(e),Bc(`tasks`,e)&&(S.value=[])),Bc(`tasks`,e)&&R.value>Oe.value&&(R.value=Oe.value,await fn(e))}catch(t){Bc(`tasks`,e)&&en(t)}finally{Bc(`tasks`,e)&&(I.value=!1)}}async function gn(){Fe.value=!1,await hn()}async function _n(){if(!(pe.value||I.value)){pe.value=!0;try{E.value===`habits`?await ht.value?.refreshHabits():E.value===`today`?await Promise.all([gn(),ht.value?.refreshHabits()]):await gn()}finally{pe.value=!1}}}async function vn(){return H(`/trash?page=${R.value}&page_size=${Xh}`)}async function yn(){return I.value=!0,de.value=``,await Vc(`trash`,vn,{success:e=>{C.value=e.items??[],Se.value=e.total??C.value.length},error:en,finally:()=>{I.value=!1}})}async function bn(e,t){Tn.value+=1,E.value=e,N.value||(se.value=!1),ce.value=0,e!==`trash`&&zc(`trash`),_c(e)||(zc(`tasks`),I.value=!1,de.value=``),t&&(T.value=t),fc(window.localStorage,Jh,e,T.value),R.value=1,D.value=null,he.value=!1,_e.value=!1,ve.value=!1,He.value=!1,O.value=!1,k.value=null,e===`trash`?await yn():e===`today`?await xn():_c(e)?(await hn(),(e===`tasks`||e===`upcoming`)&&Wn()):x.value=[]}async function xn(){await hn()}function Cn(e,t,n=!0){let r=x.value.findIndex(t=>t.id===e.id);r>=0&&(x.value[r]={...x.value[r],...t});let i=S.value.findIndex(t=>t.id===e.id);i>=0&&(t.completed&&!Me.value.has(e.id)?S.value.splice(i,1):S.value[i]={...S.value[i],...t}),n&&D.value?.id===e.id&&(D.value={...D.value,...t})}async function wn(e,t,n=!0){let r=await H(`/tasks/${e.id}`,{method:`PATCH`,body:JSON.stringify({...t,version:e.version})});return Cn(e,r,n),r}let Tn=B(0),En=Hc(()=>({navigation:Tn.value,view:E.value,listId:T.value,page:R.value,query:N.value,showCompleted:xe.value}),(e,t)=>e.navigation===t.navigation&&e.view===t.view&&e.listId===t.listId&&e.page===t.page&&e.query===t.query&&e.showCompleted===t.showCompleted,hn);async function Dn(e){let t=!e.completed,n=gl({completing:t,showCompleted:xe.value});await En.run(()=>H(`/tasks/${e.id}`,{method:`PATCH`,body:JSON.stringify({completed:t,version:e.version})}),()=>U(t?`完成啦`:`已重新打开`),en,async r=>{n&&Ne(e.id,!0),Cn(e,r),t&&Pe(e.id),n&&(await yl(),Ne(e.id,!1))})}function kn(e){return e instanceof Element&&!!e.closest(`button,input,select,textarea,a,label`)}function An(e,t){if(!(E.value===`trash`||I.value||N.value||Oe.value>1)){ze.value={id:e.id,startY:t.clientY,offsetY:0},Be.value=e.id,Ve.value=!1;try{t.currentTarget.setPointerCapture(t.pointerId)}catch{}}}function jn(e){return x.value.find(t=>t.id===e)??x.value.flatMap(e=>e.subtasks??[]).find(t=>t.id===e)}function Mn(e,t){let n=ze.value;if(!n||n.id!==e.id)return;n.offsetY=t.clientY-n.startY;let r=t.currentTarget,i=document.elementsFromPoint(t.clientX,t.clientY).map(e=>e.closest(`[data-task-id]`)).find(e=>e&&e!==r.closest(`[data-task-id]`)),a=i?.dataset.taskId?jn(i.dataset.taskId):void 0;a&&a.list_id===e.list_id&&(a.parent_id??null)===(e.parent_id??null)&&tc(e,a)?(Be.value=a.id,Ve.value=!1):(Be.value=``,Ve.value=!!a)}async function Nn(e,t){let n=ze.value,r=Be.value,i=Ve.value;if(ze.value=null,Be.value=``,Ve.value=!1,i){U(`只能调整相同完成状态和截止时间档的任务顺序`);return}if(!n||n.id!==e.id||!r||r===e.id)return;let a=jn(r);if(!a||a.list_id!==e.list_id||(a.parent_id??null)!==(e.parent_id??null))return;if(!tc(e,a)){U(`只能调整相同完成状态和截止时间档的任务顺序`);return}let o=t.clientY>=n.startY?`after`:`before`,s=x.value,c=D.value,l;if(e.parent_id){let t=x.value.find(t=>t.id===e.parent_id);if(!t)return;let n=nc(t.subtasks??[],e.id,r,o);if(n===t.subtasks)return;x.value=x.value.map(e=>e.id===t.id?{...e,subtasks:n}:e),D.value?.id===t.id&&(D.value={...D.value,subtasks:n}),l=n.filter(t=>tc(e,t)).map(e=>e.id)}else{let t=nc(s,e.id,r,o);if(t===s)return;x.value=t,l=t.filter(t=>tc(e,t)).map(e=>e.id)}try{await H(`/tasks/reorder`,{method:`PUT`,body:JSON.stringify({task_ids:l})}),U(`顺序已保存`)}catch(e){x.value=s,D.value=c,en(e)}}function Pn(){ze.value=null,Be.value=``,Ve.value=!1}function Fn(e,t){if(E.value===`trash`||I.value||kn(t.target))return;let n=t.touches[0];n&&(Ie.value={id:e.id,x:n.clientX,y:n.clientY},Re.value[e.id]=0)}function In(e,t){E.value===`trash`||I.value||kn(t.target)||t.pointerType!==`touch`&&(Le.value={id:e.id,x:t.clientX,y:t.clientY})}function Ln(e,t){let n=Le.value;if(!n||n.id!==e.id)return;let r=t.clientX-n.x,i=t.clientY-n.y;Math.abs(r)>Math.abs(i)&&(!e.completed&&r>0||e.completed&&r<0)&&(Re.value[e.id]=Math.max(-92,Math.min(r,92)))}function Rn(e,t){let n=Le.value;if(!n||n.id!==e.id)return;Le.value=null;let r=t.clientX-n.x,i=t.clientY-n.y;Re.value[e.id]=0,(e.completed?r<0:r>0)&&Oc(Math.abs(r),i)&&(vt=e.id,window.setTimeout(()=>{vt===e.id&&(vt=``)},400),Dn(e))}function zn(e){Le.value=null,e&&(Re.value[e.id]=0)}function Bn(e,t){let n=Ie.value,r=t.touches[0];if(!n||n.id!==e.id||!r)return;let i=r.clientX-n.x,a=r.clientY-n.y;Math.abs(i)>Math.abs(a)&&(!e.completed&&i>0||e.completed&&i<0)&&(Re.value[e.id]=Math.max(-92,Math.min(i,92)))}async function Vn(e,t){let n=Ie.value;Ie.value=null;let r=Re.value[e.id]??0;if(Re.value[e.id]=0,!n||n.id!==e.id||E.value===`trash`||I.value)return;let i=t.changedTouches[0],a=i?i.clientX-n.x:0,o=i?i.clientY-n.y:0,s=e.completed?a<0:a>0;i&&s&&Oc(Math.abs(a),o)?(vt=e.id,window.setTimeout(()=>{vt===e.id&&(vt=``)},400),await Dn(e)):r&&(Re.value[e.id]=0)}function Hn(e){Ie.value=null,e&&(Re.value[e.id]=0)}function Wn(){Ae.value=new Set(x.value.filter(e=>e.subtasks?.length).map(e=>e.id))}function Gn(e){if(!e.subtasks?.length)return;let t=new Set(Ae.value);t.has(e.id)?t.delete(e.id):t.add(e.id),Ae.value=t}function Kn(e,t=!1){if(vt===e.id){vt=``;return}t&&Gn(e),nr(e)}async function qn(){if(E.value!==`today`)return;let e=zc(`tasks`);await Promise.all([fn(e),dn(e),ln()])}async function Jn(e){let t=D.value;if(!t||e?.expectedTaskId&&t.id!==e.expectedTaskId)return!1;let n=el(t.title);if(n.error)return de.value=n.error,!1;t.title=n.value;try{let n=lc(cc(t.due_at)),r=await wn(t,{title:t.title.trim(),description:t.description,priority:Number(t.priority),due_at:n,list_id:t.list_id},!1),i=e?.expectedSelectionToken===void 0||pt===e.expectedSelectionToken;return D.value?.id===t.id&&i&&(D.value={...D.value,...r}),await qn(),e?.showSuccess!==!1&&U(`已保存`),r}catch(e){return en(e),!1}}async function Yn(){if(ct.value||st.value)return;let e=D.value?.id;if(!e)return;ct.value=!0;let t=pt,n=D.value?.due_at?rt.value:`none`,r=structuredClone(dt.value),i=it.value,a=ot.value;at.value=``;try{let o=await Jn({showSuccess:!1,expectedTaskId:e,expectedSelectionToken:t});if(!o||pt!==t||D.value?.id!==e)return;let s=await Dt(o,n,r,i,o.due_at?a:null);if(pt!==t||D.value?.id!==e)return;ot.value=s,U(`已保存`)}catch(n){if(pt!==t||D.value?.id!==e)return;at.value=n instanceof Error?n.message:`保存失败`,en(n)}finally{ct.value=!1}}async function Xn(e){if(window.confirm(`把“${e.title}”移到回收站?`))try{await H(`/tasks/${e.id}`,{method:`DELETE`}),x.value=x.value.filter(t=>t.id!==e.id&&t.parent_id!==e.id),D.value=null,_e.value=!1,E.value===`today`&&ln(),U(`已移到回收站`)}catch(e){en(e)}}async function Zn(e,t,n){let r=await jc(t,()=>{C.value=C.value.filter(t=>t.id!==e.id),Se.value=Ac(Se.value),R.value>Oe.value&&(R.value=Oe.value)},yn);if(!r.mutated){en(r.error);return}r.refreshed?U(n):U(`${n},但列表刷新失败,请重试刷新`)}async function Qn(e){await Zn(e,()=>H(`/tasks/${e.id}/restore`,{method:`POST`}),`任务已恢复`)}async function $n(e){window.confirm(`永久删除“${e.title}”?这个操作不能撤销。`)&&await Zn(e,()=>H(`/trash/${e.id}`,{method:`DELETE`}),`任务已永久删除`)}async function er(){if(!D.value)return;let e=(await z(`添加子任务`,`子任务名称`,``,`添加`))?.trim();if(e)try{let t=await H(`/tasks`,{method:`POST`,body:JSON.stringify({title:e,list_id:D.value.list_id,parent_id:D.value.id})});D.value&&(D.value.subtasks=[...D.value.subtasks??[],t]),x.value.push(t),U(`子任务已添加`)}catch(e){en(e)}}function tr(){_e.value=!1,D.value=null}function nr(e){D.value={...e,subtasks:e.subtasks?[...e.subtasks]:[]},be.value=!1,ye.value=!1,_e.value=!0,Ot(e)}async function rr(){let e=(await z(`新建文件夹`,`文件夹名称`,``,`创建`))?.trim();if(e)try{o.value.push(await H(`/folders`,{method:`POST`,body:JSON.stringify({name:e})})),U(`文件夹已创建`)}catch(e){en(e)}}async function ir(e=null){let t=(await z(`新建清单`,`清单名称`,``,`创建`))?.trim();if(t)try{let n=await H(`/lists`,{method:`POST`,body:JSON.stringify({name:t,folder_id:e})});s.value.push(n),await bn(`tasks`,n.id),U(`清单已创建`)}catch(e){en(e)}}async function ar(e,t){let n=(await z(`重命名`,e===`lists`?`清单名称`:`文件夹名称`,t.name,`保存`))?.trim();if(n&&n!==t.name)try{let r=await H(`/${e}/${t.id}`,{method:`PATCH`,body:JSON.stringify({name:n})});Object.assign(t,r),U(`已重命名`)}catch(e){en(e)}}async function or(e,t){if(e===`lists`){if(await z(`归档清单「${t.name}」?`,``,``,`归档`)===null)return;try{let n=E.value===`tasks`&&T.value===t.id;await H(`/${e}/${t.id}`,{method:`DELETE`}),await sr(),await gn(),n&&(D.value=null,_e.value=!1,await bn(`tasks`,s.value.find(e=>e.is_inbox)?.id||``)),U(`清单已归档`)}catch(e){en(e)}return}if(await z(`删除文件夹「${t.name}」?`,``,``,`删除`)!==null)try{await H(`/${e}/${t.id}`,{method:`DELETE`}),await gn(),U(`已删除`)}catch(e){en(e)}}async function sr(){try{c.value=await H(`/lists?archived=true`)}catch{c.value=[]}}async function cr(e){u.value=null;try{await H(`/lists/${e.id}/restore`,{method:`POST`}),await sr(),await gn(),U(`清单已恢复`)}catch(e){en(e)}finally{ur()}}function lr(){c.value.length&&(l.value=!l.value,fr(!1))}function ur(){let e=Nl(m,d.value);m=null,un(()=>e?.focus())}function dr(){if(!u.value||!m||!window.matchMedia(`(min-width: 931px)`).matches)return;let e=m.getBoundingClientRect(),t=f.value?.getBoundingClientRect(),n=Ml(e,t?.width||164,t?.height||102,window.innerWidth,window.innerHeight);p.value={left:`${n.left}px`,top:`${n.top}px`}}function fr(e=!0){u.value&&(u.value=null,e?ur():m=null)}function pr(e,t){if(Dr(),u.value?.id===e.id){fr();return}m=t instanceof HTMLElement?t:null,u.value=e,p.value={},un(()=>{dr(),f.value?.querySelector(`[role="menuitem"]`)?.focus()})}function mr(){u.value&&window.matchMedia(`(min-width: 931px)`).matches&&dr()}function hr(e){if(!u.value||!window.matchMedia(`(min-width: 931px)`).matches)return;let t=e.target;t instanceof Element&&!t.closest(`.archived-row-menu,.archived-row-actions`)&&fr(!1)}function gr(e){e.key===`Escape`&&u.value&&fr()}function _r(e){b=m,h.value=e,_.value=``,u.value=null,m=null,un(()=>v.value?.focus())}function vr(){let e=b?.isConnected?b:d.value;b=null,un(()=>e?.focus())}function yr(){g.value||(h.value=null,_.value=``,vr())}function br(e){if(e.key===`Escape`&&!g.value&&yr(),e.key!==`Tab`||!y.value)return;let t=[...y.value.querySelectorAll(`button:not(:disabled)`)];if(!t.length)return;let n=jl(t.indexOf(document.activeElement),t.length,e.shiftKey);n!==null&&(e.preventDefault(),t[n].focus())}async function xr(){if(h.value&&!g.value){g.value=!0,_.value=``;try{let e=h.value.id;await H(`/lists/${h.value.id}/purge`,{method:`DELETE`}),c.value=c.value.filter(t=>t.id!==e),h.value=null,vr(),U(`清单已永久删除`)}catch(e){_.value=e instanceof Error?e.message:`永久删除失败`}finally{g.value=!1}}}function Cr(){O.value=!O.value,k.value=null}function wr(e,t){fr(!1),k.value=k.value?.item.id===t.id?null:{kind:e,item:t},O.value=!1}function Tr(e){O.value=!1,e===`folder`?rr():ir(null)}function Dr(){k.value=null,A.value=!1}function Or(e){let t=new Set(ke.value);t.has(e)?t.delete(e):t.add(e),ke.value=t}function kr(e,t){e.is_inbox||(Mr(),j.value={id:e.id,pointerId:t.pointerId,startX:t.clientX,startY:t.clientY,offsetY:0,lastX:t.clientX,lastY:t.clientY},ee.value=e.folder_id,M.value=e.id,Sl(t))}function Ar(e,t){let n=xl(t);if(t.pointerType!==`touch`){kr(e,n);return}Mr(),re={id:e.id,pointer:n},ne=window.setTimeout(()=>kr(e,n),450)}function jr(e,t){if(!j.value&&re?.id===e.id&&re.pointer.pointerId===t.pointerId){Cl({x:re.pointer.clientX,y:re.pointer.clientY},{x:t.clientX,y:t.clientY},5)&&Mr();return}Fr(e,t)}function Mr(){ne&&window.clearTimeout(ne),ne=void 0,re=void 0}function Pr(e){let t=j.value?.id,n=document.elementsFromPoint(e.clientX,e.clientY),r=n.map(e=>e.closest(`[data-list-id]`)).find(e=>e?.dataset.listId!==t);if(r?.dataset.listId){let t=s.value.find(e=>e.id===r.dataset.listId);if(t&&!t.is_inbox){ee.value=t.folder_id,M.value=t.id;let n=r.getBoundingClientRect();te.value=e.clientYe.closest(`[data-folder-id]`)).find(Boolean);if(i?.dataset.folderId){ee.value=i.dataset.folderId,M.value=``,ke.value=new Set(ke.value).add(i.dataset.folderId);return}n.some(e=>e.closest(`.list-root-drop`))&&(ee.value=null,M.value=``)}function Fr(e,t){let n=j.value;n&&n.id===e.id&&(n.offsetY=t.clientY-n.startY,n.lastX=t.clientX,n.lastY=t.clientY,Pr(t))}async function Lr(e,t,n,r=`after`){if(e.is_inbox)return;let i=s.value,a=Tl(i,e.id,t,n,r);if(a.items!==i){s.value=a.items,t&&(ke.value=new Set(ke.value).add(t));try{e.folder_id===t?await H(`/lists/reorder`,{method:`PUT`,body:JSON.stringify({folder_id:t,list_ids:a.orderedIds})}):await H(`/lists/${e.id}/move`,{method:`PUT`,body:JSON.stringify({folder_id:t,list_ids:a.orderedIds})}),U(t?`清单已移动`:`清单已移出文件夹`)}catch(e){s.value=i,en(e)}}}function Rr(e,t){Mr();let n=j.value;if(!n||n.id!==e.id)return;let r=Math.hypot(t.clientX-n.startX,t.clientY-n.startY)>5,i=ee.value??null,a=M.value&&M.value!==e.id?M.value:void 0,o=te.value;Br(),(r||i!==e.folder_id||a)&&(ie=e.id,window.setTimeout(()=>{ie===e.id&&(ie=``)},400),Lr(e,i,a,o))}function zr(e){if(ie===e.id){ie=``;return}bn(`tasks`,e.id)}function Br(){Mr(),j.value=null,ee.value=void 0,M.value=``}function Vr(){A.value=!A.value}function Hr(e){let t=k.value?.kind===`lists`?k.value.item:null;t&&(A.value=!1,Lr(t,e),Dr())}function Ur(e,t){return wl(s.value,e.id,t)!==null}function Wr(e,t){let n=wl(s.value,e.id,t);n&&(Lr(e,e.folder_id,n.targetId,n.placement),Dr())}function Gr(){R.value<=1||I.value||(--R.value,E.value===`trash`?yn():_c(E.value)&&hn())}function Kr(){R.value>=Oe.value||I.value||(R.value+=1,E.value===`trash`?yn():_c(E.value)&&hn())}function qr(){return window.matchMedia(`(max-width: 930px)`).matches}function Jr(){P.value&&(qr()&&(se.value=!0),ce.value=0,un(()=>ae.value?.focus()))}function Yr(e){if(!P.value||!qr()||e.target?.closest(`input, textarea, select, button, .task-row, .habit-row, .countdown-row`))return;let t=e.currentTarget,n=t.closest(`.shell`);Ol(t.scrollTop,n?.scrollTop??0,window.scrollY)&&e.touches.length===1&&(le=e.touches[0].clientY,ce.value=0)}function Xr(e){if(le===null||e.touches.length!==1)return;let t=e.touches[0].clientY-le;if(se.value){ce.value=Math.min(0,t),t<0&&!N.value.trim()&&e.preventDefault();return}ce.value=El(t),t>0&&e.preventDefault()}function Zr(e){if(le===null)return;let t=(e.changedTouches[0]?.clientY??le)-le;le=null,!se.value&&Dl(t)?Jr():se.value&&kl(t,N.value)&&(se.value=!1,ae.value?.blur()),ce.value=0}function Qr(){le=null,ce.value=0}function $r(e){Al(e)&&P.value&&(e.preventDefault(),Jr())}function ei(){N.value.trim()||(se.value=!1)}return Sr(()=>{document.addEventListener(`pointerdown`,hr),document.addEventListener(`keydown`,gr),document.addEventListener(`keydown`,$r),window.addEventListener(`resize`,mr),document.addEventListener(`scroll`,mr,!0),an()}),Er(()=>{document.removeEventListener(`pointerdown`,hr),document.removeEventListener(`keydown`,gr),document.removeEventListener(`keydown`,$r),window.removeEventListener(`resize`,mr),document.removeEventListener(`scroll`,mr,!0)}),(e,m)=>n.value?r.value?(K(),q(`div`,{key:2,class:F([`shell`,{"sidebar-collapsed":ge.value,"detail-open":!!D.value,"mobile-sidebar-open":he.value}])},[he.value||_e.value?(K(),q(`div`,{key:0,class:`scrim`,onClick:m[2]||=e=>{he.value=!1,_e.value=!1}})):Z(``,!0),J(`aside`,{class:F([`sidebar`,{open:he.value}]),onKeydown:m[21]||=ds(e=>{O.value=!1,fr(),Dr()},[`esc`])},[J(`div`,Gf,[m[84]||=J(`div`,{class:`brand small brand-lockup`},[J(`img`,{class:`brand-logo`,src:`/dodo-logo.svg`,alt:``}),J(`span`,{class:`brand-wordmark`},`dodo`)],-1),J(`button`,{class:`icon mobile-only`,"aria-label":`关闭菜单`,onClick:m[3]||=e=>he.value=!1},[Y(V(Ys))])]),J(`nav`,Kf,[J(`button`,{class:F({active:E.value===`today`}),onClick:m[4]||=e=>bn(`today`)},[Y(V(Rs)),m[85]||=X(`今天`,-1)],2),J(`button`,{class:F({active:E.value===`tasks`&&s.value.find(e=>e.id===T.value)?.is_inbox}),onClick:m[5]||=e=>bn(`tasks`,s.value.find(e=>e.is_inbox)?.id)},[Y(V(Is)),m[86]||=X(`收集箱`,-1)],2),J(`button`,{class:F({active:E.value===`upcoming`}),onClick:m[6]||=e=>bn(`upcoming`)},[Y(V(Ts)),m[87]||=X(`最近 7 天`,-1)],2),J(`button`,{class:F({active:E.value===`habits`}),onClick:m[7]||=e=>bn(`habits`)},[Y(V(Gs)),m[88]||=X(`习惯`,-1)],2),J(`button`,{class:F({active:E.value===`countdowns`}),onClick:m[8]||=e=>bn(`countdowns`)},[Y(V(Es)),m[89]||=X(`倒数日`,-1)],2)]),J(`div`,{class:F([`section-title list-root-drop`,{"list-drop-target":j.value&&ee.value===null&&!M.value}]),onPointermove:m[11]||=e=>j.value&&Pr(e)},[m[92]||=J(`span`,null,`我的清单`,-1),J(`span`,qf,[J(`button`,{class:`mini-icon list-create-trigger`,"aria-label":`新建清单或文件夹`,"aria-expanded":O.value,onClick:Cr},[Y(V(Us))],8,Jf),O.value?(K(),q(`span`,Yf,[J(`button`,{onClick:m[9]||=e=>Tr(`list`)},[Y(V(Rs)),m[90]||=X(`新建清单`,-1)]),J(`button`,{onClick:m[10]||=e=>Tr(`folder`)},[Y(V(Ps)),m[91]||=X(`新建文件夹`,-1)])])):Z(``,!0)])],34),J(`div`,Xf,[(K(!0),q(G,null,Ir(o.value,e=>(K(),q(`div`,{key:e.id,class:`folder-block`,"data-folder-id":e.id},[J(`div`,{class:F([`folder-row`,{"list-drop-target":j.value&&ee.value===e.id&&!M.value}]),onPointermove:m[12]||=e=>j.value&&Pr(e)},[J(`button`,{title:e.name,"aria-label":e.name,onClick:t=>Or(e.id)},[ke.value.has(e.id)?(K(),aa(V(Os),{key:0})):(K(),aa(V(As),{key:1})),Y(V(Ps)),J(`span`,null,L(e.name),1)],8,Qf),J(`span`,$f,[J(`button`,{"aria-label":`打开文件夹操作`,"aria-expanded":k.value?.item.id===e.id,onClick:t=>wr(`folders`,e)},[Y(V(Ms))],8,ep)])],34),(K(!0),q(G,null,Ir(s.value.filter(t=>t.folder_id===e.id&&!t.is_inbox),t=>W((K(),q(`div`,{key:t.id,"data-list-id":t.id,class:F([`list-row`,{active:E.value===`tasks`&&T.value===t.id,"list-dragging":j.value?.id===t.id,"list-reorder-target":M.value===t.id&&j.value?.id!==t.id}]),style:oe({"--list-drag-y":`${j.value?.id===t.id?j.value.offsetY:0}px`}),onPointermove:e=>Fr(t,e),onPointerup:e=>Rr(t,e),onPointercancel:Br},[J(`button`,{class:`list-drag-handle`,"aria-label":`拖动清单排序或移动到文件夹`,title:`长按拖动清单`,onPointerdown:$(e=>Ar(t,e),[`stop`]),onPointermove:$(e=>jr(t,e),[`stop`]),onPointerup:$(e=>Rr(t,e),[`stop`]),onPointercancel:$(Br,[`stop`])},[Y(V(Fs))],40,np),J(`button`,{class:`list-row-main draggable-list-row-main`,title:t.name,"aria-label":t.name,onClick:e=>zr(t)},[m[93]||=J(`i`,null,null,-1),J(`span`,null,L(t.name),1)],8,rp),J(`span`,ip,[J(`button`,{"aria-label":`打开清单操作`,"aria-expanded":k.value?.item.id===t.id,onClick:e=>wr(`lists`,t)},[Y(V(Ms))],8,ap)])],46,tp)),[[yo,ke.value.has(e.id)]])),128))],8,Zf))),128)),(K(!0),q(G,null,Ir(s.value.filter(e=>!e.folder_id&&!e.is_inbox),e=>(K(),q(`div`,{key:e.id,"data-list-id":e.id,class:F([`list-row`,{active:E.value===`tasks`&&T.value===e.id,"list-dragging":j.value?.id===e.id,"list-reorder-target":M.value===e.id&&j.value?.id!==e.id}]),style:oe({"--list-drag-y":`${j.value?.id===e.id?j.value.offsetY:0}px`}),onPointermove:t=>Fr(e,t),onPointerup:t=>Rr(e,t),onPointercancel:Br},[J(`button`,{class:`list-drag-handle`,"aria-label":`拖动清单排序或移动到文件夹`,title:`长按拖动清单`,onPointerdown:$(t=>Ar(e,t),[`stop`]),onPointermove:$(t=>jr(e,t),[`stop`]),onPointerup:$(t=>Rr(e,t),[`stop`]),onPointercancel:$(Br,[`stop`])},[Y(V(Fs))],40,sp),J(`button`,{class:`list-row-main draggable-list-row-main`,title:e.name,"aria-label":e.name,onClick:t=>zr(e)},[m[94]||=J(`i`,null,null,-1),J(`span`,null,L(e.name),1)],8,cp),J(`span`,lp,[J(`button`,{"aria-label":`打开清单操作`,"aria-expanded":k.value?.item.id===e.id,onClick:t=>wr(`lists`,e)},[Y(V(Ms))],8,up)])],46,op))),128)),J(`div`,dp,[J(`button`,{ref_key:`archivedListsToggle`,ref:d,class:F([`archived-lists-toggle`,{empty:c.value.length===0}]),"aria-expanded":c.value.length>0&&l.value,"aria-controls":`archived-task-lists`,disabled:c.value.length===0,onClick:lr},[Y(V(As),{class:F({expanded:l.value})},null,8,[`class`]),J(`span`,null,`已归档 `+L(c.value.length),1)],10,fp),W(J(`div`,pp,[(K(!0),q(G,null,Ir(c.value,e=>(K(),q(`div`,{key:e.id,class:`list-row archived-row`},[J(`span`,{class:`archived-row-label`,title:e.name},L(e.name),9,mp),J(`span`,hp,[J(`button`,{class:`archived-row-menu-trigger`,"aria-label":`${e.name}操作`,"aria-haspopup":`menu`,"aria-expanded":u.value?.id===e.id,onClick:t=>pr(e,t.currentTarget)},[Y(V(Ms))],8,gp)])]))),128))],512),[[yo,l.value]])])]),J(`nav`,_p,[J(`button`,{class:F({active:E.value===`trash`}),onClick:m[13]||=e=>bn(`trash`)},[Y(V(Js)),m[95]||=X(`回收站`,-1)],2),J(`button`,{class:F({active:E.value===`settings`}),onClick:m[14]||=e=>bn(`settings`)},[Y(V(qs)),m[96]||=X(`设置`,-1)],2)]),k.value?(K(),q(`div`,{key:0,class:`sidebar-action-mask app-sheet-mask`,onClick:$(Dr,[`self`])},[J(`section`,{class:`sidebar-action-sheet app-sheet app-sheet--actions`,role:`dialog`,"aria-modal":`true`,"aria-label":`${k.value.item.name}操作`},[J(`header`,yp,[J(`b`,null,L(k.value.item.name),1),J(`button`,{class:`icon`,"aria-label":`关闭清单操作`,onClick:Dr},[Y(V(Ys))])]),J(`div`,bp,[J(`button`,{onClick:m[15]||=e=>{ar(k.value.kind,k.value.item),Dr()}},[Y(V(Vs)),m[97]||=X(`重命名`,-1)]),k.value.kind===`folders`?(K(),q(`button`,{key:0,onClick:m[16]||=e=>{ir(k.value.item.id),Dr()}},[Y(V(Us)),m[98]||=X(`新建清单`,-1)])):Z(``,!0),k.value.kind===`lists`?(K(),q(G,{key:1},[J(`button`,{"aria-label":`上移清单`,disabled:!Ur(k.value.item,`up`),onClick:m[17]||=e=>Wr(k.value.item,`up`)},`上移`,8,xp),J(`button`,{"aria-label":`下移清单`,disabled:!Ur(k.value.item,`down`),onClick:m[18]||=e=>Wr(k.value.item,`down`)},`下移`,8,Sp),J(`button`,{"aria-label":`移动到文件夹`,"aria-haspopup":`menu`,"aria-expanded":A.value,onClick:Vr},[Y(V(Ps)),m[99]||=X(`移动到文件夹`,-1)],8,Cp),A.value?(K(),q(`div`,wp,[k.value.item.folder_id?(K(),q(`button`,{key:0,role:`menuitem`,onClick:m[19]||=e=>Hr(null)},`移出文件夹`)):Z(``,!0),(K(!0),q(G,null,Ir(o.value,e=>(K(),q(`button`,{key:e.id,role:`menuitem`,disabled:k.value.item.folder_id===e.id,onClick:t=>Hr(e.id)},L(e.name),9,Tp))),128))])):Z(``,!0)],64)):Z(``,!0),J(`button`,{class:`danger`,onClick:m[20]||=e=>{or(k.value.kind,k.value.item),Dr()}},[(K(),aa(Nr(k.value.kind===`folders`?V(Js):V(Cs)))),X(L(k.value.kind===`folders`?`删除文件夹`:`归档清单`),1)])])],8,vp)])):Z(``,!0)],34),J(`main`,{onTouchstart:Yr,onTouchmove:Xr,onTouchend:Zr,onTouchcancel:Qr},[J(`header`,Ep,[J(`button`,{class:`icon`,"aria-label":(ge.value?`展开`:`收起`)+`菜单`,"aria-expanded":ge.value?`false`:`true`,onClick:At},[Y(V(Bs))],8,Dp),J(`div`,Op,[J(`h1`,{title:Bt.value},L(Bt.value),9,kp)]),[`today`,`tasks`,`upcoming`,`habits`].includes(E.value)?(K(),q(`div`,Ap,[Y(ef,{modelValue:xe.value,"onUpdate:modelValue":m[22]||=e=>xe.value=e,class:`topbar-filter`},null,8,[`modelValue`]),J(`button`,{class:F([`icon topbar-refresh`,{spinning:pe.value}]),type:`button`,"aria-label":`刷新当前页面`,title:`刷新`,disabled:pe.value||I.value,onClick:_n},[Y(V(Ws))],10,jp)])):Z(``,!0),P.value?(K(),q(`div`,{key:1,class:F([`search-reveal`,{"mobile-search-open":se.value||!!N.value,"mobile-search-pulling":ce.value>0}]),style:oe(ue.value)},[J(`span`,Mp,L(ce.value>=56?`松开搜索`:`下拉搜索`),1),J(`label`,Np,[Y(V(Ks)),W(J(`input`,{ref_key:`searchInput`,ref:ae,"onUpdate:modelValue":m[23]||=e=>N.value=e,placeholder:`搜索任务…`,"aria-label":`搜索任务`,onBlur:ei},null,544),[[es,N.value]]),m[100]||=J(`kbd`,null,`⌘ K`,-1)])],6)):Z(``,!0)]),[`habits`,`settings`].includes(E.value)?(K(),aa(ld,{ref_key:`habitComposer`,ref:ht,key:E.value,view:E.value,"show-completed":xe.value,onChanged:gn,onNotice:U},null,8,[`view`,`show-completed`])):E.value===`countdowns`?(K(),aa(Xd,{key:1,ref_key:`countdownComposer`,ref:gt,onNotice:U},null,512)):(K(),q(G,{key:2},[E.value===`today`?(K(),q(`section`,Pp,[J(`button`,{class:`today-track today-task-track`,type:`button`,"aria-controls":`today-tasks`,onClick:m[24]||=e=>Gt(`today-tasks`)},[J(`span`,Fp,[J(`strong`,null,`任务 `+L(Te.value)+` / `+L(we.value),1)]),J(`span`,{class:`today-track-rail`,role:`progressbar`,"aria-label":`今日任务进度`,"aria-valuemin":`0`,"aria-valuemax":we.value,"aria-valuenow":Te.value},[J(`i`,{class:`today-track-fill`,style:oe({width:Ut.value})},null,4)],8,Ip)]),J(`button`,{class:`today-track today-habit-track`,type:`button`,"aria-controls":`today-habits`,onClick:m[25]||=e=>Gt(`today-habits`)},[J(`span`,Lp,[J(`strong`,null,`习惯 `+L(Vt.value),1)]),J(`span`,{class:`today-track-rail`,role:`progressbar`,"aria-label":`今日习惯进度`,"aria-valuemin":`0`,"aria-valuemax":Ee.value,"aria-valuenow":De.value},[J(`i`,{class:`today-track-fill`,style:oe({width:Wt.value})},null,4)],8,Rp)])])):Z(``,!0),E.value===`today`?(K(),q(G,{key:1},[Qt.value.length?(K(),q(`section`,zp,[J(`h3`,Bp,[Y(V(Ts)),m[101]||=X(`已过期 `,-1),J(`span`,null,L(Qt.value.length),1)]),J(`div`,Vp,[(K(!0),q(G,null,Ir(Qt.value,e=>(K(),q(G,{key:`overdue-${e.task.id}`},[J(`article`,{"data-task-id":e.task.id,class:F([`task-row overdue-task`,{"completion-exiting":Me.value.has(e.task.id)}])},[J(`button`,{class:`task-check`,"aria-label":`完成${e.task.title}`,"aria-pressed":!1,onClick:$(t=>Dn(e.task),[`stop`])},[J(`span`,{class:F([`task-check-mark`,`p${e.task.priority}`])},null,2)],8,Up),J(`div`,{class:`task-main`,role:`button`,tabindex:`0`,onClick:t=>nr(e.task),onKeydown:ds(t=>nr(e.task),[`enter`])},[J(`strong`,{title:e.task.title},L(e.task.title),9,Gp),e.subtasks.length?(K(),q(`span`,Kp,[J(`span`,qp,[Y(V(Ls)),X(L(e.subtasks.filter(e=>e.completed).length)+`/`+L(e.subtasks.length),1)])])):Z(``,!0)],40,Wp),e.task.due_at?(K(),q(`span`,Jp,[Y(Rf,{"due-at":e.task.due_at,"due-has-time":e.task.due_has_time,completed:e.task.completed,"now-ms":V(me)},null,8,[`due-at`,`due-has-time`,`completed`,`now-ms`])])):Z(``,!0)],10,Hp),(K(!0),q(G,null,Ir(e.subtasks,e=>(K(),q(`article`,{key:`overdue-subtask-${e.id}`,"data-task-id":e.id,class:F([`task-row subtask swipeable`,{done:e.completed,"just-completed":je.value.has(e.id),"completion-exiting":Me.value.has(e.id),ready:Math.abs(Re.value[e.id]??0)>=64,reordering:ze.value?.id===e.id,"reorder-target":Be.value===e.id}]),style:oe({"--swipe-x":`${Re.value[e.id]??0}px`,"--reorder-y":`${ze.value?.id===e.id?ze.value.offsetY:0}px`}),onPointerdown:t=>In(e,t),onPointermove:t=>Ln(e,t),onPointerup:t=>Rn(e,t),onPointercancel:t=>zn(e),onTouchstartPassive:t=>Fn(e,t),onTouchmovePassive:t=>Bn(e,t),onTouchend:t=>Vn(e,t),onTouchcancel:t=>Hn(e)},[J(`button`,{class:`task-check`,"aria-label":e.completed?`重新打开${e.title}`:`完成${e.title}`,"aria-pressed":e.completed,onClick:$(t=>Dn(e),[`stop`])},[J(`span`,{class:F([`task-check-mark`,`p${e.priority}`])},[e.completed?(K(),aa(V(Ds),{key:0})):Z(``,!0)],2)],8,Xp),J(`div`,{class:`task-main`,role:`button`,tabindex:`0`,onClick:t=>Kn(e),onKeydown:[ds(t=>Kn(e),[`enter`]),ds($(t=>Kn(e),[`prevent`]),[`space`])]},[J(`strong`,{title:e.title},L(e.title),9,Qp)],40,Zp),e.due_at?(K(),q(`span`,$p,[Y(Rf,{"due-at":e.due_at,"due-has-time":e.due_has_time,completed:e.completed,"now-ms":V(me)},null,8,[`due-at`,`due-has-time`,`completed`,`now-ms`])])):Z(``,!0)],46,Yp))),128))],64))),128))])])):Z(``,!0),J(`h3`,em,[Y(V(Rs)),m[102]||=X(`任务`,-1)])],64)):Z(``,!0),E.value===`today`?Z(``,!0):(K(),q(`div`,tm,[E.value===`trash`||Oe.value>1||Se.value>0?(K(),q(`span`,nm,L(Oe.value>1?`第 ${R.value} / ${Oe.value} 页 · `:``)+`共 `+L(Se.value)+` 项`,1)):Z(``,!0),N.value?(K(),q(`button`,{key:1,class:`link`,onClick:m[26]||=e=>N.value=``},`清除搜索`)):Z(``,!0)])),E.value!==`trash`&&Oe.value>1?(K(),q(`div`,rm,[J(`button`,{class:`secondary`,disabled:R.value<=1||I.value,onClick:Gr},`上一页`,8,im),J(`span`,null,L(R.value)+` / `+L(Oe.value),1),J(`button`,{class:`secondary`,disabled:R.value>=Oe.value||I.value,onClick:Kr},`下一页`,8,am)])):Z(``,!0),J(`section`,{class:F([`task-list`,{loading:I.value}])},[(K(!0),q(G,null,Ir(Zt.value,e=>(K(),q(G,{key:e.task.id},[J(`article`,{"data-task-id":e.task.id,class:F([`task-row swipeable`,{done:e.task.completed,"just-completed":je.value.has(e.task.id),"completion-exiting":Me.value.has(e.task.id),selected:D.value?.id===e.task.id,ready:Math.abs(Re.value[e.task.id]??0)>=64,reordering:ze.value?.id===e.task.id,"reorder-target":Be.value===e.task.id}]),style:oe({"--swipe-x":`${Re.value[e.task.id]??0}px`,"--reorder-y":`${ze.value?.id===e.task.id?ze.value.offsetY:0}px`}),onPointerdown:t=>In(e.task,t),onPointermove:t=>Ln(e.task,t),onPointerup:t=>Rn(e.task,t),onPointercancel:t=>zn(e.task),onTouchstartPassive:t=>Fn(e.task,t),onTouchmovePassive:t=>Bn(e.task,t),onTouchend:t=>Vn(e.task,t),onTouchcancel:t=>Hn(e.task)},[E.value===`trash`?Z(``,!0):(K(),q(`button`,{key:0,class:`drag-handle task-drag-handle`,disabled:!!N.value||Oe.value>1,"aria-label":`上下拖动任务排序`,title:`上下拖动排序`,onPointerdown:$(t=>An(e.task,t),[`stop`]),onPointermove:$(t=>Mn(e.task,t),[`stop`]),onPointerup:$(t=>Nn(e.task,t),[`stop`]),onPointercancel:$(Pn,[`stop`])},[Y(V(Fs))],40,sm)),E.value===`trash`?Z(``,!0):(K(),q(`button`,{key:1,class:`task-check`,"aria-label":e.task.completed?`重新打开${e.task.title}`:`完成${e.task.title}`,"aria-pressed":e.task.completed,onClick:$(t=>Dn(e.task),[`stop`])},[J(`span`,{class:F([`task-check-mark`,`p${e.task.priority}`])},[e.task.completed?(K(),aa(V(Ds),{key:0})):Z(``,!0)],2)],8,cm)),J(`div`,{class:`task-main`,role:`button`,tabindex:`0`,"aria-expanded":!Ae.value.has(e.task.id),onClick:t=>E.value===`trash`?void 0:Kn(e.task,!0),onKeydown:[ds(t=>E.value===`trash`?void 0:Kn(e.task,!0),[`enter`]),ds($(t=>E.value===`trash`?void 0:Kn(e.task,!0),[`prevent`]),[`space`])]},[J(`strong`,{title:e.task.title},L(e.task.title),9,um),e.subtasks.length?(K(),q(`span`,dm,[J(`span`,fm,[Y(V(Ls)),X(L(e.subtasks.filter(e=>e.completed).length)+`/`+L(e.subtasks.length),1)])])):Z(``,!0),e.task.priority?(K(),q(`span`,{key:1,class:F([`priority`,`p${e.task.priority}`])},L([``,`低`,`中`,`高`][e.task.priority]),3)):Z(``,!0)],40,lm),e.task.due_at?(K(),q(`span`,pm,[Y(Rf,{"due-at":e.task.due_at,"due-has-time":e.task.due_has_time,completed:e.task.completed,"now-ms":V(me)},null,8,[`due-at`,`due-has-time`,`completed`,`now-ms`])])):Z(``,!0),E.value===`trash`?(K(),q(`span`,mm,[J(`button`,{class:`restore`,onClick:$(t=>Qn(e.task),[`stop`])},[Y(V(Cs)),m[103]||=X(`恢复`,-1)],8,hm),J(`button`,{class:`icon danger ghost`,"aria-label":`永久删除`,onClick:$(t=>$n(e.task),[`stop`])},[Y(V(Ys))],8,gm)])):(K(),q(`span`,_m,[J(`button`,{class:`icon ghost task-detail-trigger`,"aria-label":`打开任务详情`,onClick:$(t=>nr(e.task),[`stop`])},[Y(V(Ms))],8,vm)]))],46,om),Ae.value.has(e.task.id)?Z(``,!0):(K(!0),q(G,{key:0},Ir(e.subtasks,e=>(K(),q(`article`,{key:e.id,"data-task-id":e.id,class:F([`task-row subtask swipeable`,{done:e.completed,"just-completed":je.value.has(e.id),"completion-exiting":Me.value.has(e.id),ready:Math.abs(Re.value[e.id]??0)>=64,reordering:ze.value?.id===e.id,"reorder-target":Be.value===e.id}]),style:oe({"--swipe-x":`${Re.value[e.id]??0}px`,"--reorder-y":`${ze.value?.id===e.id?ze.value.offsetY:0}px`}),onPointerdown:t=>In(e,t),onPointermove:t=>Ln(e,t),onPointerup:t=>Rn(e,t),onPointercancel:t=>zn(e),onTouchstartPassive:t=>Fn(e,t),onTouchmovePassive:t=>Bn(e,t),onTouchend:t=>Vn(e,t),onTouchcancel:t=>Hn(e)},[E.value===`trash`?Z(``,!0):(K(),q(`button`,{key:0,class:`drag-handle task-drag-handle`,"aria-label":`上下拖动子任务排序`,title:`上下拖动排序`,onPointerdown:$(t=>An(e,t),[`stop`]),onPointermove:$(t=>Mn(e,t),[`stop`]),onPointerup:$(t=>Nn(e,t),[`stop`]),onPointercancel:$(Pn,[`stop`])},[Y(V(Fs))],40,bm)),E.value===`trash`?Z(``,!0):(K(),q(`button`,{key:1,class:`task-check`,"aria-label":e.completed?`重新打开${e.title}`:`完成${e.title}`,"aria-pressed":e.completed,onClick:$(t=>Dn(e),[`stop`])},[J(`span`,{class:F([`task-check-mark`,`p${e.priority}`])},[e.completed?(K(),aa(V(Ds),{key:0})):Z(``,!0)],2)],8,xm)),J(`div`,{class:`task-main`,role:`button`,tabindex:`0`,onClick:t=>E.value===`trash`?void 0:Kn(e),onKeydown:[ds(t=>E.value===`trash`?void 0:Kn(e),[`enter`]),ds($(t=>E.value===`trash`?void 0:Kn(e),[`prevent`]),[`space`])]},[J(`strong`,{title:e.title},L(e.title),9,Cm)],40,Sm),e.due_at?(K(),q(`span`,wm,[Y(Rf,{"due-at":e.due_at,"due-has-time":e.due_has_time,completed:e.completed,"now-ms":V(me)},null,8,[`due-at`,`due-has-time`,`completed`,`now-ms`])])):Z(``,!0),E.value===`trash`?Z(``,!0):(K(),q(`span`,Tm,[J(`button`,{class:`icon ghost task-detail-trigger`,"aria-label":`打开任务详情`,onClick:$(t=>nr(e),[`stop`])},[Y(V(Ms))],8,Em)]))],46,ym))),128))],64))),128)),!Jt.value.length&&!I.value?(K(),q(`div`,Dm,[Y(V(Rs)),J(`b`,null,L(N.value?`没有匹配的任务`:Ce.value>0?`已完成任务已隐藏`:`这里还很安静`),1),J(`span`,null,L(N.value?`换个关键词试试`:Ce.value>0?`开启“显示已完成”即可查看。`:`写下第一件想完成的小事吧`),1),E.value===`today`&&!N.value&&Ce.value===0?(K(),q(`button`,{key:0,class:`soft-button empty-action`,onClick:bt},[Y(V(Us)),m[104]||=X(`添加今天任务`,-1)])):Z(``,!0)])):Z(``,!0)],2),E.value===`today`?(K(),q(`div`,Om,[J(`h3`,km,[Y(V(Gs)),m[105]||=X(`习惯`,-1)]),Y(ld,{ref_key:`habitComposer`,ref:ht,view:`today-habits`,"show-completed":xe.value,onChanged:gn,onNotice:U,onSummary:Kt},null,8,[`show-completed`])])):Z(``,!0)],64))],32),D.value?(K(),q(`aside`,{key:1,class:F([`detail`,{open:_e.value}])},[J(`div`,Am,[m[106]||=J(`span`,null,`任务详情`,-1),J(`button`,{class:`icon`,"aria-label":`关闭详情`,onClick:tr},[Y(V(Ys))])]),J(`div`,jm,[J(`div`,Mm,[J(`button`,{class:F([`check large`,`p${D.value.priority}`]),onClick:m[27]||=e=>Dn(D.value)},[D.value.completed?(K(),aa(V(Ds),{key:0})):Z(``,!0)],2),W(J(`textarea`,{"onUpdate:modelValue":m[28]||=e=>D.value.title=e,rows:`2`,"aria-label":`任务标题`},null,512),[[es,D.value.title]])]),J(`label`,null,[m[107]||=X(`清单`,-1),W(J(`select`,{"onUpdate:modelValue":m[29]||=e=>D.value.list_id=e,class:`task-detail-field-input`},[(K(!0),q(G,null,Ir(s.value,e=>(K(),q(`option`,{key:e.id,value:e.id},L(e.name),9,Nm))),128))],512),[[rs,D.value.list_id]])]),J(`label`,Pm,[m[108]||=X(`截止时间`,-1),J(`input`,{class:`task-detail-due-input task-detail-field-input`,value:V(cc)(D.value.due_at),type:`datetime-local`,onChange:m[30]||=e=>D.value.due_at=e.target.value},null,40,Fm)]),J(`label`,null,[m[110]||=X(`重复`,-1),W(J(`select`,{"onUpdate:modelValue":m[31]||=e=>rt.value=e,class:`task-detail-field-input`,disabled:!D.value.due_at},[...m[109]||=[pa(``,7)]],8,Im),[[rs,rt.value]]),D.value.due_at?Z(``,!0):(K(),q(`small`,Lm,`请先设置截止时间,才能开启重复`))]),rt.value===`after_completion`?(K(),q(`section`,Rm,[J(`div`,null,[m[111]||=X(`完成后 `,-1),W(J(`input`,{"onUpdate:modelValue":m[32]||=e=>it.value=e,type:`number`,min:`1`,max:`3650`,step:`1`,inputmode:`numeric`,"aria-label":`完成后重复天数`},null,512),[[es,it.value]]),m[112]||=X(` 天重复`,-1)]),m[113]||=J(`small`,null,`每次完成后,将截止时间顺延对应天数;首版永不结束`,-1)])):Z(``,!0),rt.value===`custom`?(K(),q(`section`,zm,[J(`div`,null,[m[115]||=J(`span`,null,`每隔`,-1),W(J(`input`,{"onUpdate:modelValue":m[33]||=e=>dt.value.interval=e,type:`number`,min:`1`},null,512),[[es,dt.value.interval,void 0,{number:!0}]]),W(J(`select`,{"onUpdate:modelValue":m[34]||=e=>dt.value.frequency=e},[...m[114]||=[J(`option`,{value:`daily`},`天`,-1),J(`option`,{value:`weekly`},`周`,-1),J(`option`,{value:`monthly`},`月`,-1),J(`option`,{value:`yearly`},`年`,-1)]],512),[[rs,dt.value.frequency]])]),dt.value.frequency===`weekly`?(K(),q(`label`,Bm,[m[116]||=X(`重复日期`,-1),J(`span`,Vm,[(K(),q(G,null,Ir(ft,e=>J(`label`,{key:e.value},[W(J(`input`,{"onUpdate:modelValue":m[35]||=e=>dt.value.weekdays=e,type:`checkbox`,value:e.value},null,8,Hm),[[ts,dt.value.weekdays]]),X(L(e.label),1)])),64))])])):Z(``,!0),dt.value.frequency===`monthly`?(K(),q(`label`,Um,[m[117]||=X(`每月日期`,-1),W(J(`input`,{"onUpdate:modelValue":m[36]||=e=>dt.value.monthDays=e,placeholder:`例如 1,15,31`,onChange:m[37]||=e=>dt.value.monthDays=String(e.target.value).split(`,`).map(Number).filter(Boolean)},null,544),[[es,dt.value.monthDays]])])):Z(``,!0),J(`label`,null,[m[119]||=X(`结束方式`,-1),W(J(`select`,{"onUpdate:modelValue":m[38]||=e=>dt.value.endMode=e},[...m[118]||=[J(`option`,{value:`never`},`永不结束`,-1),J(`option`,{value:`date`},`指定日期`,-1),J(`option`,{value:`count`},`重复次数`,-1)]],512),[[rs,dt.value.endMode]])]),dt.value.endMode===`date`?(K(),q(`label`,Wm,[m[120]||=X(`结束日期`,-1),W(J(`input`,{"onUpdate:modelValue":m[39]||=e=>dt.value.until=e,type:`date`},null,512),[[es,dt.value.until]])])):Z(``,!0),dt.value.endMode===`count`?(K(),q(`label`,Gm,[m[121]||=X(`重复次数`,-1),W(J(`input`,{"onUpdate:modelValue":m[40]||=e=>dt.value.count=e,type:`number`,min:`1`},null,512),[[es,dt.value.count,void 0,{number:!0}]])])):Z(``,!0)])):Z(``,!0),at.value?(K(),q(`small`,Km,L(at.value),1)):Z(``,!0),J(`div`,qm,[J(`div`,Jm,[m[122]||=J(`span`,null,`备注`,-1),J(`span`,null,[J(`button`,{class:F({active:!be.value}),onClick:m[41]||=e=>be.value=!1},`编辑`,2),J(`button`,{class:F({active:be.value}),onClick:m[42]||=e=>be.value=!0},`预览`,2)])]),be.value?(K(),q(`div`,{key:0,class:`markdown-preview`,innerHTML:V(Qs)(D.value.description)},null,8,Ym)):W((K(),q(`textarea`,{key:1,"onUpdate:modelValue":m[43]||=e=>D.value.description=e,rows:`9`,placeholder:`支持 Markdown…`},null,512)),[[es,D.value.description]])]),J(`div`,Xm,[J(`div`,Zm,[m[124]||=J(`span`,null,`子任务`,-1),J(`button`,{class:`link`,onClick:er},[Y(V(Us)),m[123]||=X(`添加`,-1)])]),(K(!0),q(G,null,Ir(Yt.value,e=>(K(),q(`button`,{key:e.id,class:`subtask-detail`,onClick:t=>Dn(e)},[J(`span`,$m,[e.completed?(K(),aa(V(Ds),{key:0})):Z(``,!0)]),J(`span`,{class:F({strike:e.completed})},L(e.title),3)],8,Qm))),128)),Yt.value.length?Z(``,!0):(K(),q(`span`,eh,`把这件事拆成更小的步骤`))]),J(`details`,{class:`more-settings`,open:ye.value,onToggle:m[45]||=e=>ye.value=e.target.open},[m[127]||=J(`summary`,null,`更多设置`,-1),J(`div`,nh,[J(`label`,null,[m[126]||=X(`优先级`,-1),W(J(`select`,{"onUpdate:modelValue":m[44]||=e=>D.value.priority=e},[...m[125]||=[J(`option`,{value:0},`无`,-1),J(`option`,{value:1},`低`,-1),J(`option`,{value:2},`中`,-1),J(`option`,{value:3},`高`,-1)]],512),[[rs,D.value.priority,void 0,{number:!0}]])])])],40,th),J(`div`,rh,[J(`button`,{class:`secondary`,disabled:ct.value||st.value,onClick:Yn},L(ct.value?`正在保存…`:st.value?`正在读取…`:`保存更改`),9,ih),J(`button`,{class:`danger-text`,onClick:m[46]||=e=>Xn(D.value)},[Y(V(Js)),m[128]||=X(`移到回收站`,-1)])])])],2)):Z(``,!0),ve.value?(K(),q(`div`,{key:2,class:`more-mask app-sheet-mask`,onClick:m[50]||=$(e=>{ve.value=!1,bn(`settings`)},[`self`])},[J(`section`,{id:`mobile-more-menu`,class:`more-sheet app-sheet app-sheet--actions`,role:`dialog`,"aria-modal":`true`,"aria-label":`更多导航`,onClick:m[49]||=$(()=>{},[`stop`])},[J(`div`,ah,[m[129]||=J(`b`,null,`更多`,-1),J(`button`,{class:`icon`,"aria-label":`关闭更多菜单`,onClick:m[47]||=e=>ve.value=!1},[Y(V(Ys))])]),J(`div`,oh,[J(`button`,{onClick:m[48]||=e=>bn(`settings`)},[Y(V(qs)),m[130]||=X(`设置与数据`,-1)])])])])):Z(``,!0),J(`nav`,sh,[J(`button`,{class:F({active:E.value===`today`}),"aria-current":E.value===`today`?`page`:void 0,onClick:m[51]||=e=>bn(`today`)},[Y(V(Rs)),m[131]||=J(`span`,null,`今天`,-1)],10,ch),J(`button`,{class:F({active:E.value===`habits`}),"aria-current":E.value===`habits`?`page`:void 0,onClick:m[52]||=e=>bn(`habits`)},[Y(V(Gs)),m[132]||=J(`span`,null,`习惯`,-1)],10,lh),J(`button`,{class:F({active:E.value===`countdowns`}),"aria-current":E.value===`countdowns`?`page`:void 0,onClick:m[53]||=e=>bn(`countdowns`)},[Y(V(Es)),m[133]||=J(`span`,null,`倒数日`,-1)],10,uh),J(`button`,{class:F({active:E.value===`settings`}),"aria-current":E.value===`settings`?`page`:void 0,onClick:m[54]||=e=>bn(`settings`)},[Y(V(qs)),m[134]||=J(`span`,null,`设置`,-1)],10,dh)]),[`tasks`,`today`,`upcoming`,`habits`,`countdowns`].includes(E.value)?(K(),aa(Qd,{key:3,label:E.value===`habits`?`添加习惯`:E.value===`countdowns`?`添加倒数日`:`添加任务`,onActivate:Et},null,8,[`label`])):Z(``,!0),Y(eo,{name:`task-compose`},{default:Sn(()=>[He.value?(K(),q(`div`,{key:0,class:`task-compose-mask app-sheet-mask`,onClick:$(Tt,[`self`])},[J(`form`,{class:`task-compose-sheet app-sheet app-sheet--create`,style:oe(yt.value),role:`dialog`,"aria-modal":`true`,"aria-labelledby":`task-compose-title`,onSubmit:$(kt,[`prevent`])},[J(`header`,fh,[J(`div`,null,[m[135]||=J(`small`,null,`NEW TASK`,-1),J(`h2`,ph,L(xt.value),1)]),J(`button`,{class:`icon`,type:`button`,"aria-label":`关闭添加任务`,onClick:Tt},[Y(V(Ys))])]),J(`div`,mh,[J(`label`,null,[m[136]||=X(`任务名称`,-1),W(J(`input`,{"onUpdate:modelValue":m[55]||=e=>Ue.value=e,class:`task-compose-input`,placeholder:`准备做点什么?`,autocomplete:`off`,"aria-invalid":!!We.value,"aria-describedby":`compose-title-error`,onInput:m[56]||=e=>We.value=``},null,40,hh),[[es,Ue.value]]),We.value?(K(),q(`small`,gh,L(We.value),1)):Z(``,!0)]),J(`div`,_h,[J(`label`,null,[m[137]||=X(`清单`,-1),W(J(`select`,{"onUpdate:modelValue":m[57]||=e=>Ge.value=e},[(K(!0),q(G,null,Ir(s.value,e=>(K(),q(`option`,{key:e.id,value:e.id},L(e.name),9,vh))),128))],512),[[rs,Ge.value]])]),J(`label`,null,[m[139]||=X(`优先级`,-1),W(J(`select`,{"onUpdate:modelValue":m[58]||=e=>Qe.value=e},[...m[138]||=[J(`option`,{value:0},`无`,-1),J(`option`,{value:1},`低`,-1),J(`option`,{value:2},`中`,-1),J(`option`,{value:3},`高`,-1)]],512),[[rs,Qe.value,void 0,{number:!0}]])])]),J(`div`,yh,[J(`div`,bh,[J(`button`,{ref_key:`composeDateButton`,ref:Xe,class:F([`task-compose-date-chip`,{selected:Ke.value}]),type:`button`,"aria-haspopup":`dialog`,"aria-expanded":Ye.value,onClick:m[59]||=e=>Ye.value=!0},[Y(V(Ts)),J(`span`,null,L(St.value),1)],10,xh),Y(mf,{open:Ye.value,"onUpdate:open":m[60]||=e=>Ye.value=e,modelValue:Ke.value,"onUpdate:modelValue":m[61]||=e=>Ke.value=e,anchor:Xe.value},null,8,[`open`,`modelValue`,`anchor`]),Ke.value?(K(),q(`button`,{key:0,class:`task-compose-date-clear`,type:`button`,"aria-label":`清除截止日期`,onClick:Ct},[Y(V(Ys))])):Z(``,!0)]),Ke.value&&!qe.value?(K(),q(`button`,{key:0,class:`task-compose-time-add`,type:`button`,onClick:wt},`添加时间`)):Ke.value?(K(),q(`label`,Sh,[m[140]||=J(`span`,null,`时间`,-1),W(J(`input`,{ref_key:`composeTimePicker`,ref:Ze,"onUpdate:modelValue":m[62]||=e=>Je.value=e,type:`time`,"aria-label":`选择截止时间`},null,512),[[es,Je.value]]),J(`button`,{class:`task-compose-time-remove`,type:`button`,"aria-label":`移除时间`,onClick:m[63]||=$(e=>qe.value=!1,[`prevent`])},[Y(V(Ys))])])):Z(``,!0)]),J(`label`,null,[m[142]||=X(`重复`,-1),W(J(`select`,{"onUpdate:modelValue":m[64]||=e=>et.value=e,disabled:!Ke.value},[...m[141]||=[J(`option`,{value:`none`},`不重复`,-1),J(`option`,{value:`daily`},`每天`,-1),J(`option`,{value:`weekly`},`每周`,-1),J(`option`,{value:`monthly`},`每月`,-1),J(`option`,{value:`yearly`},`每年`,-1),J(`option`,{value:`after_completion`},`完成后重复`,-1),J(`option`,{value:`custom`},`自定义…`,-1)]],8,Ch),[[rs,et.value]]),Ke.value?Z(``,!0):(K(),q(`small`,wh,`请先设置截止时间,才能开启重复`))]),et.value===`after_completion`?(K(),q(`section`,Th,[J(`div`,null,[m[143]||=X(`完成后 `,-1),W(J(`input`,{"onUpdate:modelValue":m[65]||=e=>tt.value=e,type:`number`,min:`1`,max:`3650`,step:`1`,inputmode:`numeric`,"aria-label":`完成后重复天数`},null,512),[[es,tt.value]]),m[144]||=X(` 天重复`,-1)]),m[145]||=J(`small`,null,`每次完成后,将截止时间顺延对应天数;首版永不结束`,-1)])):Z(``,!0),nt.value?(K(),q(`small`,Eh,L(nt.value),1)):Z(``,!0),et.value===`custom`?(K(),q(`section`,Dh,[J(`div`,null,[m[147]||=J(`span`,null,`每隔`,-1),W(J(`input`,{"onUpdate:modelValue":m[66]||=e=>ut.value.interval=e,type:`number`,min:`1`},null,512),[[es,ut.value.interval,void 0,{number:!0}]]),W(J(`select`,{"onUpdate:modelValue":m[67]||=e=>ut.value.frequency=e},[...m[146]||=[J(`option`,{value:`daily`},`天`,-1),J(`option`,{value:`weekly`},`周`,-1),J(`option`,{value:`monthly`},`月`,-1),J(`option`,{value:`yearly`},`年`,-1)]],512),[[rs,ut.value.frequency]])]),ut.value.frequency===`weekly`?(K(),q(`label`,Oh,[m[148]||=X(`重复日期`,-1),J(`span`,kh,[(K(),q(G,null,Ir(ft,e=>J(`label`,{key:e.value},[W(J(`input`,{"onUpdate:modelValue":m[68]||=e=>ut.value.weekdays=e,type:`checkbox`,value:e.value},null,8,Ah),[[ts,ut.value.weekdays]]),X(L(e.label),1)])),64))])])):Z(``,!0),ut.value.frequency===`monthly`?(K(),q(`label`,jh,[m[149]||=X(`每月日期`,-1),W(J(`input`,{"onUpdate:modelValue":m[69]||=e=>ut.value.monthDays[0]=e,type:`number`,min:`1`,max:`31`},null,512),[[es,ut.value.monthDays[0],void 0,{number:!0}]])])):Z(``,!0),J(`label`,null,[m[151]||=X(`结束方式`,-1),W(J(`select`,{"onUpdate:modelValue":m[70]||=e=>ut.value.endMode=e},[...m[150]||=[J(`option`,{value:`never`},`永不结束`,-1),J(`option`,{value:`date`},`指定日期`,-1),J(`option`,{value:`count`},`重复次数`,-1)]],512),[[rs,ut.value.endMode]])]),ut.value.endMode===`date`?(K(),q(`label`,Mh,[m[152]||=X(`结束日期`,-1),W(J(`input`,{"onUpdate:modelValue":m[71]||=e=>ut.value.until=e,type:`date`},null,512),[[es,ut.value.until]])])):Z(``,!0),ut.value.endMode===`count`?(K(),q(`label`,Nh,[m[153]||=X(`重复次数`,-1),W(J(`input`,{"onUpdate:modelValue":m[72]||=e=>ut.value.count=e,type:`number`,min:`1`},null,512),[[es,ut.value.count,void 0,{number:!0}]])])):Z(``,!0)])):Z(``,!0),J(`label`,null,[m[154]||=X(`备注`,-1),W(J(`textarea`,{"onUpdate:modelValue":m[73]||=e=>$e.value=e,rows:`3`,placeholder:`可选,支持 Markdown`},null,512),[[es,$e.value]])])]),J(`footer`,Ph,[J(`button`,{type:`button`,class:`secondary`,onClick:Tt},`取消`),J(`button`,{class:`primary-small`,disabled:!Ue.value.trim()||!Ge.value},`添加任务`,8,Fh)])],36)])):Z(``,!0)]),_:1}),Y(eo,{name:`toast`},{default:Sn(()=>[fe.value?(K(),q(`div`,Ih,L(fe.value),1)):Z(``,!0)]),_:1}),de.value?(K(),q(`div`,Lh,[X(L(de.value),1),J(`button`,{onClick:m[74]||=e=>de.value=``},[Y(V(Ys))])])):Z(``,!0),(K(),aa(Un,{to:`body`},[u.value?(K(),q(`span`,{key:0,class:`archived-action-mask`,onClick:m[77]||=$(e=>fr(),[`self`])},[J(`span`,{ref_key:`archivedMenu`,ref:f,class:`archived-row-actions`,style:oe(p.value),role:`menu`},[J(`button`,{role:`menuitem`,onClick:m[75]||=e=>cr(u.value)},[Y(V(Cs)),m[155]||=X(`恢复清单`,-1)]),J(`button`,{role:`menuitem`,class:`danger-text`,onClick:m[76]||=e=>_r(u.value)},[Y(V(Js)),m[156]||=X(`永久删除清单`,-1)])],4)])):Z(``,!0)])),h.value?(K(),q(`div`,{key:5,class:`modal-mask purge-list-mask`,onClick:$(yr,[`self`])},[J(`section`,{ref_key:`purgeListDialog`,ref:y,class:`modal-box purge-list-dialog`,role:`alertdialog`,"aria-modal":`true`,"aria-labelledby":`purge-list-title`,"aria-describedby":`purge-list-description`,onKeydown:br},[J(`h3`,Rh,`永久删除清单「`+L(h.value.name)+`」?`,1),m[157]||=J(`p`,{id:`purge-list-description`},`将永久删除其中的全部任务、子任务、重复规则、附件及实体文件。此操作无法撤销。`,-1),_.value?(K(),q(`p`,zh,L(_.value),1)):Z(``,!0),J(`div`,Bh,[J(`button`,{ref_key:`purgeCancelButton`,ref:v,class:`secondary`,disabled:g.value,onClick:yr},`取消`,8,Vh),J(`button`,{class:`danger-button`,disabled:g.value,onClick:xr},L(g.value?`正在删除…`:`永久删除`),9,Hh)])],544)])):Z(``,!0),jt.value?(K(),q(`div`,{key:6,class:`modal-mask`,onClick:$(Rt,[`self`])},[J(`div`,Uh,[J(`h3`,null,L(Mt.value),1),Nt.value?(K(),q(`label`,Wh,[X(L(Nt.value),1),W(J(`input`,{"onUpdate:modelValue":m[78]||=e=>Pt.value=e,class:`modal-input`,autofocus:``,"aria-invalid":!!Ft.value,"aria-describedby":`modal-name-error`,onInput:m[79]||=e=>Ft.value=``,onKeyup:ds(zt,[`enter`])},null,40,Gh),[[es,Pt.value]]),Ft.value?(K(),q(`small`,Kh,L(Ft.value),1)):Z(``,!0)])):Z(``,!0),J(`div`,qh,[J(`button`,{class:`secondary`,onClick:Rt},`取消`),J(`button`,{class:`primary-small`,onClick:zt},L(It.value),1)])])])):Z(``,!0)],2)):(K(),q(`div`,Hf,[J(`section`,Uf,[m[83]||=J(`div`,{class:`brand brand-lockup`},[J(`img`,{class:`brand-logo`,src:`/dodo-logo.svg`,alt:``}),J(`span`,{class:`brand-wordmark`},`dodo`)],-1),J(`p`,null,L(t.value?`欢迎回来,继续把生活理顺。`:`创建你的 dodo`),1),J(`label`,null,[m[81]||=X(`用户名`,-1),W(J(`input`,{"onUpdate:modelValue":m[0]||=e=>i.value=e,autocomplete:`username`,placeholder:`你的用户名`},null,512),[[es,i.value]])]),J(`label`,null,[m[82]||=X(`密码`,-1),W(J(`input`,{"onUpdate:modelValue":m[1]||=e=>a.value=e,type:`password`,autocomplete:`current-password`,placeholder:`至少 12 位`,onKeyup:ds(on,[`enter`])},null,544),[[es,a.value]])]),J(`button`,{class:`primary`,onClick:on},L(t.value?`登录`:`开始使用`),1),de.value?(K(),q(`small`,Wf,L(de.value),1)):Z(``,!0)])])):(K(),q(`div`,Vf,[...m[80]||=[J(`img`,{class:`loading-logo`,src:`/dodo-logo.svg`,alt:``},null,-1),J(`span`,{class:`loader`},null,-1),J(`span`,null,`正在打开 dodo…`,-1)]]))}})).mount(`#app`),`serviceWorker`in navigator&&(navigator.serviceWorker.getRegistrations().then(e=>{e.forEach(e=>e.unregister())}),caches.keys().then(e=>e.forEach(e=>caches.delete(e)))); \ No newline at end of file diff --git a/backend/static/assets/index-HDotoAuF.css b/backend/static/assets/index-HDotoAuF.css deleted file mode 100644 index fe2a14d..0000000 --- a/backend/static/assets/index-HDotoAuF.css +++ /dev/null @@ -1,2 +0,0 @@ -/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */ -@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial}}}@layer theme{:root,:host{--font-sans:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.collapse{visibility:collapse}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.resize{resize:both}.rounded{border-radius:.25rem}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}}:root{color:#2d2924;--accent:#f15a29;--accent-soft:#fbe6dc;--paper:#fffdf8;--sidebar:#f6f0e4;--line:#e7ddcc;--muted:#8b8275;--danger:#bd3827;--shadow:0 12px 36px #4e3a221a;--sheet-radius:20px;--sheet-scrim:#2d261f66;background:#f8f3e8;font-family:-apple-system,BlinkMacSystemFont,Avenir Next,PingFang SC,Hiragino Sans GB,Segoe UI,sans-serif}*{box-sizing:border-box}html{-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%}body{background:#f8f3e8;margin:0}button,input,textarea,select{font:inherit;color:inherit}@media (width<=800px){input,textarea,select{font-size:16px}}button{cursor:pointer}svg{stroke-width:1.8px;width:18px;height:18px}.center,.auth-shell{place-items:center;min-height:100vh;display:grid}.center{color:var(--muted);align-content:center;gap:12px}.loader{border:2px solid var(--line);border-top-color:var(--accent);border-radius:50%;width:24px;height:24px;animation:.8s linear infinite spin}@keyframes spin{to{transform:rotate(360deg)}}.auth-card{background:var(--paper);border:1px solid var(--line);width:min(390px,90vw);box-shadow:var(--shadow);border-radius:14px;gap:16px;padding:38px;display:grid}.brand{letter-spacing:-3px;align-items:center;gap:11px;font-size:40px;font-weight:850;display:inline-flex}.brand-wordmark{color:var(--text-primary)}.brand-logo{flex:none;width:42px;height:42px;display:block}.brand.small{gap:9px;font-size:29px}.brand.small .brand-logo{width:32px;height:32px}.auth-card p{color:var(--muted);margin:0 0 8px}.auth-card label,.detail-form>label{color:#756d61;gap:7px;font-size:12px;font-weight:650;display:grid}.auth-card input,.detail-form input,.detail-form select{border:1px solid var(--line);background:#fff;border-radius:9px;outline:none;width:100%;padding:11px}.auth-card input:focus,.detail-form input:focus,.detail-form select:focus,.detail-form textarea:focus{border-color:var(--accent);box-shadow:0 0 0 3px #f15a291a}.primary{background:var(--accent);color:#fff;border:0;border-radius:9px;padding:12px;font-weight:700;box-shadow:0 5px 12px #f15a2933}.auth-card small{color:var(--danger)}.shell{background:var(--paper);grid-template-columns:238px minmax(430px,1fr) 0;height:100vh;transition:grid-template-columns .22s;display:grid;overflow:hidden}.shell.detail-open{grid-template-columns:238px minmax(430px,1fr) 350px}.shell.sidebar-collapsed{grid-template-columns:0 minmax(430px,1fr) 0}.shell.sidebar-collapsed.detail-open{grid-template-columns:0 minmax(430px,1fr) 350px}.shell.sidebar-collapsed .sidebar{border-right:0;width:0;min-width:0;padding:0;overflow:hidden}.sidebar{border-right:1px solid var(--line);background:var(--sidebar);flex-direction:column;min-height:0;display:flex;overflow:hidden}.brand-row{justify-content:space-between;align-items:center;height:64px;padding:0 20px;display:flex}.primary-nav{gap:3px;padding:4px 12px 12px;display:grid}.primary-nav button,.sidebar-management button{color:#665e52;text-align:left;background:0 0;border:0;border-radius:10px;align-items:center;gap:10px;padding:10px 12px;display:flex;position:relative}.primary-nav button:hover,.sidebar-management button:hover,.list-row:hover,.folder-row>button:hover{background:#ffffff85}.primary-nav button.active,.list-row.active,.sidebar-management button.active{color:#b7421e;background:#faeae2;font-weight:650}.primary-nav button.active:before,.list-row.active:before,.sidebar-management button.active:before{content:"";background:var(--accent);border-radius:999px;width:3px;height:18px;position:absolute;top:50%;left:2px;transform:translateY(-50%)}.section-title{color:#958b7d;text-transform:uppercase;letter-spacing:.08em;justify-content:space-between;align-items:center;padding:17px 17px 7px 22px;font-size:11px;font-weight:750;display:flex}.section-title>span:last-child{display:flex}.mini-icon,.row-actions button{color:#8e8477;background:0 0;border:0;min-width:44px;min-height:44px;padding:4px}.mini-icon svg,.row-actions svg{width:14px;height:14px}.folders{-webkit-overflow-scrolling:touch;scrollbar-width:none;flex:1;min-height:0;padding:0 10px;overflow:hidden auto}.folders::-webkit-scrollbar{display:none}.folder-row,.list-row{border-radius:8px;align-items:center;display:flex;position:relative}.folder-row>button,.list-row-main{color:#6d6559;text-align:left;background:0 0;border:0;flex:1;align-items:center;gap:7px;min-width:0;padding:8px;display:flex}.folder-row>button>span,.list-row-main>span{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.folder-row>button svg{width:14px}.row-actions{opacity:0;pointer-events:none;transition:opacity .15s;display:flex;position:absolute;right:0}.folder-row:hover .row-actions,.folder-row:focus-within .row-actions,.list-row:hover .row-actions,.list-row:focus-within .row-actions{opacity:1;pointer-events:auto}.list-row-main{color:#665f55;width:100%;min-height:44px;padding:8px 7px 8px 31px}.draggable-list-row-main{padding-left:0}.list-row.active .list-row-main{color:inherit}.list-row i{background:#d89b62;border-radius:3px;flex:0 0 8px;width:8px;height:8px}.sidebar-create-wrap{position:relative}.sidebar-popover{z-index:12;border:1px solid var(--line);text-transform:none;letter-spacing:0;background:#fffdf8;border-radius:12px;min-width:148px;padding:6px;display:grid;position:absolute;box-shadow:0 12px 28px #4e3a2224}.sidebar-create-menu{top:40px;right:0}.sidebar-popover button{color:#665e52;text-align:left;white-space:nowrap;background:0 0;border:0;border-radius:8px;align-items:center;gap:8px;min-height:38px;padding:7px 10px;font-size:12px;display:flex}.sidebar-popover button:hover{background:#fbf0e8}.sidebar-popover svg{width:15px;height:15px}.sidebar-action-mask{z-index:70;align-items:flex-end;display:flex;position:fixed;inset:0}.sidebar-action-sheet{border:1px solid var(--line);border-radius:14px;width:214px;margin:12px;box-shadow:0 12px 28px #4e3a2224}.sidebar-action-sheet .app-sheet__body button{text-align:left;background:0 0;border:0;align-items:center;gap:10px;min-height:48px;padding:11px 18px;display:flex}.sidebar-action-sheet .app-sheet__body button+button{border-top:1px solid var(--line)}.sidebar-action-sheet .app-sheet__body button.danger{color:var(--danger)}.sidebar-management{margin:8px 12px max(12px,env(safe-area-inset-bottom));border-top:1px solid #dacfbed1;gap:2px;padding-top:8px;display:grid}.mobile-only,.bottom,.scrim{display:none}main{background:var(--surface-base);min-width:0;padding:27px 34px 50px;overflow:auto;container-type:inline-size}@media (width>=931px){main{scrollbar-width:none}main::-webkit-scrollbar{display:none}}.topbar{grid-template-columns:44px minmax(0,1fr) auto;grid-template-areas:"menu title filter""search search search";align-items:center;gap:12px 14px;margin-bottom:18px;display:grid}.topbar>.icon{grid-area:menu}.topbar-title{grid-area:title;width:100%;min-width:0}.topbar p{color:var(--muted);margin:0;font-size:12px}.topbar h1{text-overflow:ellipsis;white-space:nowrap;letter-spacing:-.03em;margin:0;font-size:27px;overflow:hidden}.search-reveal{grid-area:search;width:100%;min-width:0}.search-pull-hint{display:none}.topbar .search{width:100%;margin:0}.topbar-actions{grid-area:filter;justify-self:end;align-items:center;gap:8px;display:flex}.topbar-filter{flex:none;justify-self:end}.topbar-refresh{width:44px;min-width:44px;height:44px;color:var(--text-secondary);border-radius:50%}.topbar-refresh:hover:not(:disabled){background:var(--surface-raised);color:var(--text-primary)}.topbar-refresh:disabled{opacity:.5;cursor:not-allowed}.topbar-refresh.spinning svg{animation:.7s linear infinite topbar-refresh-spin}@keyframes topbar-refresh-spin{to{transform:rotate(360deg)}}.completed-filter-pill{border:1px solid var(--border-cream);background:var(--surface-raised);min-width:132px;height:36px;box-shadow:var(--highlight-inner);color:#675f54;white-space:nowrap;border-radius:999px;justify-content:space-between;align-items:center;gap:8px;padding:0 8px 0 12px;font-size:12px;font-weight:650;display:inline-flex}.completed-filter-pill:hover:not(:disabled){background:#fff7eb;border-color:#d8c6ae}.completed-filter-pill:active:not(:disabled){transform:scale(.985)}.completed-filter-pill:focus-visible{outline:3px solid var(--focus-ring);outline-offset:2px}.completed-filter-pill:disabled{opacity:.55;cursor:not-allowed}.completed-filter-pill__track{background:#d8cbb9;border-radius:999px;flex:none;width:32px;height:18px;padding:2px;transition:background .15s}.completed-filter-pill__thumb{background:#fffdf8;border-radius:50%;width:14px;height:14px;transition:transform .15s;display:block;transform:translate(0)}.completed-filter-pill[aria-checked=true] .completed-filter-pill__track{background:var(--accent)}.completed-filter-pill[aria-checked=true] .completed-filter-pill__thumb{transform:translate(14px)}.today-board{background:#fff;border:1px solid #e7ddccdb;border-radius:14px;grid-template-columns:repeat(2,minmax(0,1fr));gap:1px;margin:18px 0 8px;padding:6px;display:grid;box-shadow:0 3px 14px #513d260a}.today-track{text-align:left;background:0 0;border:0;border-radius:9px;gap:8px;min-width:0;padding:9px 11px;transition:background .15s;display:grid}.today-track+.today-track{border-left:1px solid var(--line);border-radius:0 9px 9px 0}.today-track:hover{background:#fff9f2}.today-track:focus-visible{outline-offset:1px;outline:2px solid #f15a294d}.today-track-head{justify-content:space-between;align-items:baseline;gap:10px;display:flex}.today-track-head strong{color:#403a32;font-size:14px;line-height:1.2}.today-track-rail{background:#eee7dc;border-radius:999px;height:5px;display:block;overflow:hidden}.today-track-fill{border-radius:inherit;background:#71856b;width:0;height:100%;transition:width .35s;display:block}.today-habit-track .today-track-fill{background:var(--accent)}.today-section-anchor{scroll-margin-top:16px}.search{border:1px solid var(--line);width:100%;color:var(--muted);background:#faf7f0;border-radius:9px;align-items:center;gap:8px;padding:8px 10px;display:flex}.search input{background:0 0;border:0;outline:0;width:100%;min-width:0}.search kbd{white-space:nowrap;border:1px solid var(--line);border-radius:4px;padding:2px 4px;font-size:10px}.list-toolbar{height:42px;color:var(--muted);align-items:center;gap:14px;font-size:12px;display:flex}.link{color:var(--accent);background:0 0;border:0;align-items:center;gap:3px;padding:3px;display:inline-flex}.link svg{width:14px}.task-list{transition:opacity .2s}.task-list.loading{opacity:.45}.task-row{--swipe-x:0px;border-left:0;border-bottom:1px solid var(--line);isolation:isolate;align-items:center;gap:10px;min-height:53px;padding:4px 8px;transition:background .15s,transform .18s;display:flex;position:relative;overflow:hidden}.task-row.swipeable{touch-action:pan-y;transform:translate(var(--swipe-x),var(--reorder-y,0px))}.task-row.swipeable:not([style*="0px"]){transition:none}.task-row:hover,.task-row.selected{background:#faf0e5bf}.task-row:hover:not(.reordering){transform:translate(calc(var(--swipe-x) + 2px),var(--reorder-y,0px))}.check{background:#fff;border:1.6px solid #c6baa8;border-radius:5px;flex:0 0 19px;place-items:center;width:19px;height:19px;padding:0;display:grid}.check svg{width:13px}.task-check{background:0 0;border:0;border-radius:9px;flex:0 0 44px;place-items:center;width:44px;height:44px;padding:0;display:grid}.task-check-mark{background:#fff;border:1.6px solid #c6baa8;border-radius:50%;place-items:center;width:19px;height:19px;transition:background .15s,border-color .15s,color .15s,transform .15s;display:grid}.task-check-mark svg{width:13px}.task-check:hover .task-check-mark{border-color:#9d8f7b;transform:scale(1.06)}.task-check:focus-visible{outline-offset:1px;outline:2px solid #f15a2952}.task-check[aria-pressed=true] .task-check-mark{color:#fff;background:#71856b;border-color:#71856b}.task-check-mark.p1{border-color:#4b93d1}.task-check-mark.p2{border-color:#d79b25}.task-check-mark.p3{border-color:#dc4b30}.check.p1{border-color:#4b93d1}.check.p2{border-color:#d79b25}.check.p3{border-color:#dc4b30}.done .check{color:#fff;background:#afa595}.task-main{text-align:left;background:0 0;border:0;flex:1;min-width:0;padding:8px 0}.task-main strong{white-space:nowrap;text-overflow:ellipsis;font-size:14px;font-weight:590;display:block;overflow:hidden}.done .task-main strong{color:#9b9388;text-decoration:line-through}.meta{color:#9b9286;align-items:center;gap:9px;margin-top:3px;font-size:11px;display:inline-flex}.meta-item{align-items:center;gap:3px;display:flex}.meta svg{width:12px}.priority{border-radius:5px;margin:3px 0 0 7px;padding:3px 6px;font-size:10px;font-weight:750;display:inline-flex}.priority.p1{color:#3f80ba;background:#e5f2fc}.priority.p2{color:#a56b05;background:#fff1cb}.priority.p3{color:#bd3827;background:#fde2dc}.icon,.ghost{background:0 0;border:0;border-radius:6px;place-items:center;min-width:44px;min-height:44px;padding:5px;display:grid}.mobile-only{display:none}.ghost{opacity:0;color:#9d9387}.task-row:hover .ghost{opacity:1}.ghost:hover{color:var(--danger);background:#fce7e2}.task-detail-trigger:hover{color:var(--text-primary);background:#fff7eb}.restore{border:1px solid var(--line);background:#fff;border-radius:7px;align-items:center;gap:5px;min-height:44px;padding:6px 8px;font-size:12px;display:flex}.restore svg{width:14px}.subtask{color:#6d655b;min-height:42px;padding-left:53px}.subtask>svg{color:#bbb0a2;width:13px}.empty{color:#aaa094;text-align:center;align-content:center;place-items:center;gap:8px;min-height:300px;display:grid}.empty>svg{color:#d8cabb;width:38px;height:38px}.empty b{color:#6f675c}.empty span{font-size:13px}.drag-handle{color:#b3a795;cursor:grab;touch-action:none;background:0 0;border:0;border-radius:8px;flex:0 0 44px;place-items:center;width:44px;min-width:44px;height:44px;display:grid}.drag-handle:active{cursor:grabbing}.drag-handle:disabled{opacity:.3;cursor:not-allowed}.drag-handle svg{width:17px;height:17px}.reordering{opacity:.78;z-index:4;pointer-events:none;transition:none!important;box-shadow:0 12px 28px #4e3a222e!important}.reorder-target{box-shadow:inset 0 2px 0 var(--accent)}.list-drag-handle{color:#ad9f8c;cursor:grab;touch-action:none;background:0 0;border:0;border-radius:8px;place-items:center;width:44px;min-width:44px;height:44px;display:grid}.list-drag-handle svg{width:15px;height:15px}.list-row{touch-action:pan-y}.list-row.list-dragging{z-index:8;opacity:.8;transform:translateY(var(--list-drag-y));pointer-events:none;background:#fffaf4;transition:none;position:relative;box-shadow:0 10px 24px #4e3a2233}.folder-row.list-drop-target{background:var(--accent-soft);box-shadow:inset 3px 0 0 var(--accent)}.list-root-drop.list-drop-target{background:var(--accent-soft);color:#b7421e;border-radius:9px}.list-row.list-reorder-target{box-shadow:inset 0 2px 0 var(--accent)}.list-move-menu{gap:4px;padding:6px 0 6px 28px;display:grid}.list-move-menu button{min-height:42px}.list-move-menu button:disabled,.sidebar-action-sheet .app-sheet__body button:disabled{opacity:.45;cursor:default}.archived-lists{margin-top:4px;position:relative}.archived-lists-toggle{color:#81786c;text-align:left;background:0 0;border:0;border-radius:9px;align-items:center;gap:8px;width:100%;min-height:44px;padding:0 12px;font-size:12px;font-weight:650;display:flex}.archived-lists-toggle:hover:not(:disabled){background:#ffffff85}.archived-lists-toggle:focus-visible,.archived-row-menu-trigger:focus-visible,.archived-row-actions button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.archived-lists-toggle:disabled{cursor:default;color:#aaa196}.archived-lists-toggle svg{width:15px;height:15px;transition:transform .16s}.archived-lists-toggle svg.expanded{transform:rotate(90deg)}.archived-list-items{transition:opacity .16s;display:grid}.archived-row{color:#746c61;grid-template-columns:minmax(0,1fr) 44px;align-items:center;min-height:44px;padding-left:35px;display:grid}.archived-row-label{text-overflow:ellipsis;white-space:nowrap;min-width:0;font-size:12px;overflow:hidden}.archived-row-menu{place-items:center;display:grid}.archived-row-menu-trigger{color:#8e8477;background:0 0;border:0;border-radius:9px;place-items:center;width:44px;height:44px;display:grid}.archived-row-menu-trigger svg{width:15px;height:15px}.archived-action-mask{display:contents}.archived-row-actions{z-index:70;border:1px solid var(--line);width:164px;box-shadow:var(--shadow);background:#fffdf8;border-radius:12px;gap:2px;padding:6px;display:grid;position:fixed}.archived-row-actions button{text-align:left;background:0 0;border:0;border-radius:8px;align-items:center;gap:9px;min-height:44px;padding:8px 10px;font-size:12px;display:flex}.archived-row-actions button:hover{background:#f8f1e8}.archived-row-actions svg{width:15px;height:15px}@media (width<=930px){.archived-action-mask{z-index:60;background:#2d261f4d;display:block;position:fixed;inset:0}.archived-row-actions{z-index:61;width:100%;padding:12px 16px calc(16px + env(safe-area-inset-bottom));border-radius:22px 22px 0 0;position:fixed;inset:auto 0 0}.archived-row-actions button{font-size:14px}}@media (prefers-reduced-motion:reduce){.archived-lists-toggle svg,.archived-list-items{transition:none}}.detail{border-left:1px solid var(--line);background:#faf7f0;min-width:0;overflow:auto}.detail-head{border-bottom:1px solid var(--line);color:#80766a;text-transform:uppercase;letter-spacing:.08em;justify-content:space-between;align-items:center;height:57px;padding:0 21px;font-size:12px;font-weight:700;display:flex}.paper{border:1px solid var(--line);text-align:center;color:#8f8578;background:#fff;border-radius:11px;align-content:center;place-items:center;min-height:180px;margin:22px;padding:28px 20px;display:grid;box-shadow:0 4px 18px #4c39220d}.paper svg{color:#ceb8a4;width:32px;height:32px;margin-bottom:12px}.paper b{color:#625b50}.paper p{font-size:13px;line-height:1.6}.detail-form{grid-template-columns:minmax(0,1fr);gap:12px;min-width:0;padding:19px;display:grid}.detail-form>*{min-width:0}.detail-title{align-items:flex-start;gap:10px;display:flex}.check.large{flex-basis:22px;width:22px;height:22px;margin-top:8px}.detail-title textarea{resize:none;background:0 0;border:0;outline:none;flex:1;font-size:19px;font-weight:700;line-height:1.4}.detail-form>label{grid-template-columns:80px 1fr;align-items:center}.detail-form>label input,.detail-form>label select{padding:8px}.task-detail-field-input{justify-self:end;max-width:100%;width:190px!important}.task-detail-due-input{padding-inline:9px!important}.field{gap:7px;display:grid}.field-label{color:#756d61;justify-content:space-between;align-items:center;font-size:12px;font-weight:700;display:flex}.hint{color:#a49a8d;font-size:12px}.markdown .field-label>span:last-child{background:#eee7dc;border-radius:6px;padding:2px;display:flex}.markdown .field-label button{background:0 0;border:0;border-radius:5px;padding:4px 8px;font-size:11px}.markdown .field-label button.active{color:var(--accent);background:#fff}.markdown textarea{border:1px solid var(--line);resize:vertical;background:#fff;border-radius:9px;outline:none;padding:11px;font:13px/1.6 ui-monospace,SFMono-Regular,Menlo,monospace}.markdown-preview{border:1px solid var(--line);overflow-wrap:anywhere;background:#fff;border-radius:9px;min-height:160px;padding:10px 12px;font-size:13px;line-height:1.65}.markdown-preview h1{font-size:20px}.markdown-preview h2{font-size:16px}.markdown-preview p{margin:8px 0}.markdown-preview code{background:#f2ece2;border-radius:4px;padding:2px 4px}.markdown-preview a{color:var(--accent)}.subtasks{gap:5px;display:grid}.subtask-detail{overflow-wrap:anywhere;word-break:break-word;white-space:normal;text-align:left;background:#fff;border:0;border-radius:7px;align-items:center;gap:8px;width:100%;min-width:0;max-width:100%;padding:8px;display:flex}.subtask-detail .check{pointer-events:none}.strike{color:var(--muted);text-decoration:line-through}.detail-actions{border-top:1px solid var(--line);justify-content:space-between;align-items:center;padding-top:10px;display:flex}.secondary{border:1px solid var(--line);background:#fff;border-radius:8px;padding:8px 11px;font-weight:650}.danger-text{color:var(--danger);background:0 0;border:0;align-items:center;gap:5px;font-size:12px;display:flex}.danger-text svg{width:14px}.field-hint{color:var(--muted);font-size:11px;font-weight:400}.after-completion-fields{border:1px solid var(--line);color:#675f54;background:#fffaf4;border-radius:10px;gap:5px;padding:10px 12px;font-size:12px;display:grid}.after-completion-fields>div{align-items:center;gap:7px;min-height:44px;display:flex}.after-completion-fields input{border:1px solid var(--line);background:#fff;border-radius:8px;width:76px;min-height:44px;padding:0 10px}.after-completion-fields small{color:var(--muted);line-height:1.5}.repeat-save{width:100%;min-height:44px}.repeat-custom-fields{border:1px solid var(--line);background:#fffaf4;border-radius:11px;gap:10px;padding:12px;display:grid}.repeat-custom-fields>div,.repeat-custom-fields>label{color:#675f54;align-items:center;gap:8px;font-size:12px;display:flex}.repeat-custom-fields input[type=number]{width:72px}.repeat-custom-fields input,.repeat-custom-fields select{border:1px solid var(--line);background:#fff;border-radius:8px;min-height:40px;padding:7px 9px}.weekday-picker{flex-wrap:wrap;gap:4px;display:flex}.weekday-picker label{border:1px solid var(--line);background:#fff;border-radius:50%;place-items:center;width:34px;height:34px;display:grid}.weekday-picker input{opacity:0;pointer-events:none;position:absolute}.weekday-picker label:has(input:checked){background:var(--accent);border-color:var(--accent);color:#fff}.toast,.error-toast{z-index:50;color:#fff;box-shadow:var(--shadow);background:#322d28;border-radius:9px;padding:10px 15px;font-size:13px;position:fixed;bottom:24px;left:50%;transform:translate(-50%)}.error-toast{background:var(--danger);align-items:center;gap:10px;display:flex}.error-toast button{color:#fff;background:0 0;border:0;padding:0}.toast-enter-active,.toast-leave-active{transition:all .2s}.toast-enter-from,.toast-leave-to{opacity:0;transform:translate(-50%,8px)}@media (width<=1050px) and (width>=931px){.shell.detail-open{grid-template-columns:220px minmax(400px,1fr) minmax(280px,30vw)}.shell.sidebar-collapsed.detail-open{grid-template-columns:0 minmax(400px,1fr) minmax(280px,30vw)}main{padding-inline:24px}}@media (width<=930px){.shell{height:100dvh;display:block;overflow:auto}.shell.mobile-sidebar-open{overflow:hidden}.shell.mobile-sidebar-open main{touch-action:none;overflow:hidden}.sidebar{z-index:50;box-shadow:var(--shadow);overscroll-behavior:contain;width:min(300px,86vw);transition:transform .22s;display:flex;position:fixed;top:0;bottom:0;left:0;transform:translate(-105%)}.sidebar.open{transform:none}.detail{z-index:40;border:1px solid var(--line);width:100%;max-height:min(88dvh,760px);padding-bottom:max(16px,env(safe-area-inset-bottom));background:#fffdf8;border-bottom:0;border-radius:22px 22px 0 0;transition:transform .22s;display:block;position:fixed;inset:auto 0 0;overflow:auto;transform:translateY(105%);box-shadow:0 -14px 38px #38281833}.detail.open{transform:none}.detail-head{z-index:2;border-bottom:1px solid var(--line);background:#fffdf8;height:62px;padding:0 18px;position:sticky;top:0}.detail-head .icon{background:var(--accent-soft);width:42px;height:42px;color:var(--accent);border-radius:50%;display:grid}.detail-form{padding:18px}.detail-title textarea{font-size:21px}.more-mask{z-index:45;background:#2d261f52;align-items:flex-end;display:flex;position:fixed;inset:0}.more-sheet{width:100%;padding:14px 16px max(22px,env(safe-area-inset-bottom));background:#fffdf8;border-radius:22px 22px 0 0;gap:6px;display:grid}.more-sheet-head{justify-content:space-between;align-items:center;padding:2px 4px 8px;display:flex}.more-sheet>button{text-align:left;background:#fff;border:0;border-radius:12px;align-items:center;gap:12px;padding:13px;display:flex}.scrim{z-index:35;background:#2d261f52;display:block;position:fixed;inset:0}.mobile-only{display:grid}main{min-height:100dvh;padding:20px 17px 112px}.topbar{grid-template-rows:auto auto;row-gap:0}.topbar h1{font-size:24px}.search-reveal{opacity:0;visibility:hidden;pointer-events:none;max-height:0;transition:max-height .2s,opacity .16s,transform .2s;overflow:hidden;transform:translateY(-8px)}.search-reveal.mobile-search-open{opacity:1;visibility:visible;pointer-events:auto;max-height:52px;overflow:visible;transform:none}.search-reveal.mobile-search-pulling{max-height:var(--search-pull);opacity:var(--search-pull-opacity);visibility:visible;transform:translateY(calc(var(--search-pull) - 56px))}.search-pull-hint{text-align:center;height:16px;color:var(--muted);opacity:0;pointer-events:none;margin-top:-16px;font-size:11px;line-height:16px;display:block}.search-reveal.mobile-search-pulling .search-pull-hint{opacity:1}.completed-filter-pill{min-width:138px;height:44px}.completed-filter-pill__track{width:36px;height:22px}.completed-filter-pill__thumb{width:18px;height:18px}.today-board{gap:1px;margin:14px 0 4px;padding:5px}.today-track{gap:7px;min-height:58px;padding:8px 9px}.today-track-head{flex-direction:column;align-items:flex-start;gap:2px}.today-track-head strong{font-size:13px}.search{width:100%;margin:0;padding:8px}.search input{width:100%}.search kbd{display:none}.list-toolbar{height:auto;min-height:36px}.section-heading{margin:12px 0 8px}.empty{min-height:190px}.today-empty-panel{min-height:104px}.row-actions{opacity:1;pointer-events:auto;position:static}.row-actions button{min-height:34px;padding:7px}.list-row{padding:6px 4px}.archived-row{color:#8a6d3b;background:#fbf3e2;border:1px dashed #e0cfae;border-radius:8px;padding:9px 7px}.archived-row .list-row-main{padding-left:14px}.archived-row .list-row-main>svg{color:#c9a45c}.bottom{z-index:15;border-top:1px solid var(--line);padding:8px 5px max(8px,env(safe-area-inset-bottom));background:#fffdf8f5;justify-content:space-around;display:flex;position:fixed;bottom:0;left:0;right:0;box-shadow:0 -5px 18px #4f3b220f}.bottom button{color:#81786d;background:0 0;border:0;place-items:center;gap:2px;min-width:60px;min-height:44px;font-size:10px;display:grid}.bottom button.active{color:var(--accent);font-weight:700}.bottom svg{width:20px}.toast,.error-toast{bottom:142px}.task-row{padding-inline:2px}.subtask{padding-left:35px}.ghost{opacity:.45}}.mvp-view{gap:16px;padding-bottom:36px;display:grid}.view-intro{border-bottom:1px dashed var(--line);padding-bottom:12px;display:block}.view-intro h2{margin:2px 0 0;font-size:22px}.view-intro small,.view-intro>span{color:var(--muted);font-size:12px}.tool-card,.empty-panel{border:1px solid var(--line);background:#fff;border-radius:12px;padding:16px;box-shadow:0 3px 14px #513d260d}.soft-button,.primary-small,.danger-button,.file-button{border:1px solid var(--line);background:#fff;border-radius:8px;justify-content:center;align-items:center;gap:6px;min-height:44px;padding:8px 11px;font-size:12px;display:inline-flex}.soft-button svg,.file-button svg{width:15px}.primary-small{background:var(--accent);border-color:var(--accent);color:#fff}.danger-button{color:var(--danger);border-color:#e5b7ad}.habit-list{gap:10px;display:grid}.tool-card h3{margin:0 0 4px}.habit-row{--swipe-x:0px;isolation:isolate;background:#fff;border:0;border-radius:14px;align-items:center;gap:8px;padding:5px 5px 5px 12px;transition:box-shadow .15s,transform .18s;display:flex;position:relative;overflow:hidden;box-shadow:0 0 0 1px #e7ddccb8,0 3px 14px #513d260d}.habit-row.done{background:#fffaf5}.habit-row.swipeable{touch-action:pan-y;transform:translate(var(--swipe-x),var(--reorder-y,0px))}.habit-row.swipeable:not([style*="0px"]){transition:none}.habit-main{text-align:left;background:0 0;border:0;border-radius:10px;flex:1;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:7px 10px;min-width:0;padding:11px 4px;display:grid}.habit-name{color:#3c372f;text-overflow:ellipsis;white-space:nowrap;font-size:15px;font-weight:700;overflow:hidden}.habit-progress{color:#4d463d;white-space:nowrap;font-variant-numeric:tabular-nums;flex:none;margin-left:auto;font-size:16px;font-weight:760;line-height:1}.habit-progress-bar{appearance:none;background:#eee6db;border:0;border-radius:999px;grid-column:1/-1;width:100%;height:5px;overflow:hidden}.habit-progress-bar::-webkit-progress-bar{background:#eee6db;border-radius:999px}.habit-progress-bar::-webkit-progress-value{background:var(--success);border-radius:999px;transition:width .2s}.habit-progress-bar::-moz-progress-bar{background:var(--success);border-radius:999px}.habit-week{grid-column:1/-1;grid-template-columns:repeat(7,minmax(24px,1fr));gap:6px;padding-top:3px;display:grid}.habit-week-cell{color:#a1978a;justify-items:center;gap:4px;display:grid}.habit-week-day{color:inherit;font-size:10px;line-height:1}.habit-week-cell i{background:#fff;border:1px solid #d8cdbd;border-radius:50%;width:9px;height:9px;display:block}.habit-week-cell.done{color:#71856b}.habit-week-cell.done i{background:#71856b;border-color:#71856b}.habit-week-cell.unscheduled{opacity:.35}.habit-week-cell.today{color:var(--accent);font-weight:750}.habit-week-cell.today i{box-shadow:0 0 0 2px #fbe6dc}.habit-row.done .habit-name{color:#756c61;-webkit-text-decoration:line-through #d8c8bb;text-decoration:line-through #d8c8bb;text-decoration-thickness:1px}.habit-row .icon.ghost{color:#b3a795;margin-left:4px}.habit-row .icon.ghost:hover{color:var(--danger)}.numeric-habit>span:first-child{gap:3px;display:grid}.numeric-habit small{color:var(--muted);font-size:11px}.numeric-action{align-items:center;gap:6px;display:flex}.numeric-action input{border:1px solid var(--line);background:#fff;border-radius:8px;width:74px;padding:7px}.numeric-action .soft-button{min-height:44px;padding:9px 12px}.habit-row>.icon.ghost{flex:0 0 44px;width:44px;height:44px}.habit-check{margin-left:-4px}.habit-row.done .habit-check .task-check-mark{color:#fff;background:#71856b;border-color:#71856b}.habit-detail-mask{z-index:85;background:#2d261f5c;place-items:end center;padding:20px;display:grid;position:fixed;inset:0}.habit-detail-sheet{border:1px solid var(--line);background:#fffdf8;border-radius:20px;gap:16px;width:min(500px,100%);padding:18px;display:grid;box-shadow:0 12px 36px #3828182e}.habit-detail-sheet header{justify-content:space-between;align-items:center;gap:10px;display:flex}.habit-detail-sheet header small{color:var(--muted);font-size:11px}.habit-detail-sheet header h3{margin:2px 0 0;font-size:19px}.habit-detail-sheet header button{background:0 0;border:0;place-items:center;width:44px;height:44px;display:grid}.habit-detail-progress{border-block:1px solid var(--line);color:var(--muted);justify-content:space-between;align-items:center;padding:14px 0;font-size:12px;display:flex}.habit-detail-progress strong{color:#3c372f;font-size:14px}.habit-detail-sheet footer{flex-wrap:wrap;justify-content:flex-end;gap:10px;display:flex}.habit-detail-sheet .habit-delete-button{font-weight:750}.empty-panel{text-align:center;color:var(--muted);place-items:center;gap:10px;display:grid}.today-empty-panel{min-height:130px}.empty-action{color:#655d52;margin-top:4px}.empty-action svg{width:15px;height:15px}.field-error{color:var(--danger);overflow-wrap:anywhere;font-size:12px;line-height:1.45;display:block}.habit-state-note{color:var(--muted);font-size:11px}.habit-weekdays{border:0;flex-wrap:wrap;gap:8px;min-width:0;padding:0;display:flex}.habit-weekdays legend{width:100%;font-size:12px;font-weight:650}.habit-weekdays label{align-items:center;gap:4px;min-height:44px;display:flex}.habit-compose-sheet input,.habit-compose-sheet select{max-width:100%}.task-check:disabled{cursor:not-allowed;opacity:.55}.settings-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;display:grid}.tool-card{flex-direction:column;align-items:flex-start;gap:10px;display:flex}.tool-card>h2{margin:0;font-size:1.17em}.tool-card>svg{color:var(--accent);width:25px;height:25px}.tool-card p{color:var(--muted);margin:0;font-size:13px}.tool-card.wide{grid-column:1/-1}.password-form{gap:10px;width:100%;display:grid}.password-form label{color:#675f54;gap:6px;font-size:12px;font-weight:650;display:grid}.password-form input{border:1px solid var(--line);background:#fff;border-radius:10px;outline:none;width:100%;padding:11px 12px}.password-form input:focus{border-color:var(--accent);box-shadow:0 0 0 3px #f15a291a}.password-form button{justify-self:start}.file-button input{display:none}.tool-card pre{background:#f8f3e8;border-radius:8px;width:100%;max-height:180px;padding:10px;font-size:10px;overflow:auto}.session-row,.audit-row{border-top:1px solid var(--line);justify-content:space-between;align-items:center;gap:10px;width:100%;padding:9px 0;display:flex}.session-copy{flex:1;min-width:0;display:grid}.session-title{line-height:1.4}.session-meta{flex-wrap:wrap;align-items:center;min-width:0;line-height:1.45;display:flex}.session-device{overflow-wrap:anywhere;min-width:0}.session-revoke{flex:none;justify-content:center;min-width:44px;min-height:44px}.audit-copy{gap:2px;min-width:0;display:grid}.audit-action{-webkit-line-clamp:2;overflow-wrap:anywhere;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.session-row small,.audit-row time{color:var(--muted);font-size:11px}.inline-error{color:var(--danger);background:#fff0ed;border-radius:8px;padding:9px}.settings.active{background:var(--accent-soft);color:#b7421e;font-weight:700}@media (width<=930px){.task-row,.habit-row,.countdown-row{border:1px solid var(--line);min-height:62px;box-shadow:none;background:#fff;border-radius:13px}.task-list,.habit-list,.countdown-timeline{gap:8px;display:grid}.task-row{padding:4px 7px}.task-row:hover,.task-row.selected{background:#fffaf5}.habit-row{padding:4px 7px}.countdown-row,.countdown-row:first-of-type{border:1px solid var(--line)}.countdown-row{grid-template-columns:minmax(0,1fr) 72px;gap:8px;padding:8px 9px}.task-main strong,.habit-name,.countdown-main>b{font-size:14px;font-weight:650}.meta,.countdown-main>small,.countdown-state small{color:var(--muted);font-size:11px}.habit-progress{font-size:16px}.task-check{flex-basis:44px;width:44px}.countdown-icon{border-radius:10px;width:36px;height:36px}.countdown-state strong{font-size:24px}.countdown-group{gap:8px}.countdown-group>h3{padding-left:3px}.habit-detail-mask{padding:0}.habit-detail-sheet{width:100%;padding:18px 16px calc(18px + env(safe-area-inset-bottom));border-radius:22px 22px 0 0}}@media (width<=800px){.settings-grid{grid-template-columns:1fr}.tool-card.wide{grid-column:auto}.habit-main{padding:10px 2px}.numeric-action input{width:62px}}@media (width<=390px){.task-compose-sheet{width:100%;max-width:100%;overflow-x:hidden}.task-compose-sheet .app-sheet__header>button{min-width:44px;min-height:44px}.task-compose-sheet input,.task-compose-sheet select,.task-compose-sheet button{min-height:44px}.task-compose-date-clear,.task-compose-time-remove{min-width:44px;min-height:44px}.task-compose-sheet .app-sheet__footer>button{min-height:44px}.habit-detail-sheet,.habit-compose-sheet{width:100%;max-width:100%}.habit-detail-sheet .app-sheet__header>button,.habit-compose-sheet .app-sheet__header>button{min-width:44px;min-height:44px}.habit-detail-sheet .app-sheet__footer>button,.habit-detail-sheet .app-sheet__danger>button,.habit-compose-sheet .app-sheet__footer>button{min-height:44px}}.unified-fab{z-index:60;background:var(--accent);color:#fff;touch-action:none;-webkit-user-select:none;user-select:none;border:0;border-radius:50%;place-items:center;width:56px;height:56px;transition:transform .16s,box-shadow .16s;display:grid;position:fixed;bottom:22px;right:20px;box-shadow:0 8px 20px #f15a2947}.unified-fab svg{width:25px;height:25px}.unified-fab:hover{transform:translateY(-2px);box-shadow:0 10px 24px #f15a2952}.unified-fab:active{transform:scale(.96)}.unified-fab.dragging{transform:scale(1.06);box-shadow:0 12px 28px #f15a295c}.app-sheet-mask.app-sheet-mask{background:var(--sheet-scrim);overscroll-behavior:contain}.app-sheet{background:var(--paper);min-height:0;overflow:hidden}.app-sheet__header{z-index:3;background:var(--paper);border-bottom:1px solid var(--line);flex:0 0 64px;min-height:64px;padding:0 18px;position:sticky;top:0}.app-sheet__header>div{min-width:0}.app-sheet__header h2,.app-sheet__header h3{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.app-sheet__header>button{background:0 0;border:0;border-radius:10px;flex:0 0 44px;place-items:center;width:44px;height:44px;display:grid}.app-sheet__body{overscroll-behavior:contain;-webkit-overflow-scrolling:touch;gap:14px;min-height:0;padding:16px 18px;display:grid;overflow-y:auto}.app-sheet__footer{z-index:3;background:var(--paper);border-top:1px solid var(--line);padding:12px 18px;padding-bottom:calc(16px + env(safe-area-inset-bottom));justify-content:flex-end;gap:8px;margin:0;display:flex;position:sticky;bottom:0}.app-sheet__danger{padding:12px 18px;padding-bottom:calc(16px + env(safe-area-inset-bottom));background:#fff8f6;border-top:1px solid #f1d4cd;justify-content:flex-end;display:flex}.app-sheet--actions .app-sheet__body{padding:8px 16px calc(16px + env(safe-area-inset-bottom));gap:6px}.app-sheet--actions .app-sheet__body>button{text-align:left;background:#fff;border:0;border-radius:12px;align-items:center;gap:12px;width:100%;min-height:50px;padding:13px;display:flex}@media (width<=930px){.app-sheet{width:100%;max-height:min(88dvh,760px);border-radius:var(--sheet-radius) var(--sheet-radius) 0 0!important;flex-direction:column!important;padding:0!important;display:flex!important;overflow:hidden!important}.app-sheet--detail,.app-sheet--create{max-width:none!important}.app-sheet-mask{place-items:flex-end center!important;padding:0!important}.app-sheet__header{width:100%;justify-content:space-between!important;align-items:center!important;display:flex!important}.app-sheet__body{flex:auto;width:100%}.app-sheet__body label{gap:6px;display:grid}.app-sheet__footer{flex:none;width:100%}.app-sheet__footer .primary-small{min-width:124px}.app-sheet__danger{flex:none;width:100%}.app-sheet__danger .danger-text{justify-content:center;width:100%;min-height:48px}}.calendar-picker-layer{z-index:90;pointer-events:none;position:fixed;inset:0}.calendar-picker{pointer-events:auto;width:328px;color:var(--text);background:#fffdf8;border:1px solid #ded6ca;border-radius:18px;gap:10px;padding:14px;display:grid;position:fixed;box-shadow:0 18px 46px #38281833}.calendar-picker__header{grid-template-columns:40px 1fr 40px;align-items:center;gap:4px;display:grid}.calendar-picker__header h3{text-align:center;margin:0;font-size:16px}.calendar-picker__header button,.calendar-picker__grid button{background:0 0;border:0;place-items:center;display:grid}.calendar-picker__header button{border-radius:10px;width:40px;height:40px}.calendar-picker__header svg{width:18px}.calendar-picker__close{display:none!important}.calendar-picker__weekdays,.calendar-picker__grid{grid-template-columns:repeat(7,1fr);gap:3px;display:grid}.calendar-picker__weekdays span{text-align:center;color:var(--muted);padding:3px 0;font-size:11px}.calendar-picker__grid button{color:#4f483f;border-radius:10px;height:34px;font-size:13px}.calendar-picker__grid button:hover,.calendar-picker__grid button:focus-visible{background:#f6ede2;outline:2px solid #0000}.calendar-picker__grid button.outside{color:#b9b0a5}.calendar-picker__grid button.today{box-shadow:inset 0 0 0 1px var(--accent);color:#b7421e}.calendar-picker__grid button.selected{background:var(--accent);color:#fff}.calendar-picker__grid button.selected.today{box-shadow:inset 0 0 0 1px #fff}.calendar-picker__footer{border-top:1px solid #e8e0d5;grid-template-columns:auto auto 1fr auto auto;align-items:center;gap:4px;padding-top:10px;display:grid}.calendar-picker__footer button{color:#6d6459;background:0 0;border:0;border-radius:9px;min-height:36px;padding:0 9px;font-weight:650}.calendar-picker__footer button:hover{background:#f6ede2}.calendar-picker__footer .calendar-picker__done{background:var(--accent);color:#fff}.calendar-picker__footer .calendar-picker__done:hover{background:#df4e22}@media (width<=600px){.calendar-picker-layer{pointer-events:auto;background:#2d261f4d;align-items:flex-end;display:flex}.calendar-picker{width:100%;height:min(520px,72dvh);padding:18px 18px calc(16px + env(safe-area-inset-bottom));border-width:1px 0 0;border-radius:24px 24px 0 0;grid-template-rows:auto auto 1fr auto;position:relative!important;top:auto!important;left:auto!important}.calendar-picker__header{grid-template-columns:44px 1fr 44px 44px}.calendar-picker__close{display:grid!important}.calendar-picker__grid{align-content:stretch}.calendar-picker__grid button{height:auto;min-height:42px}.calendar-picker__footer button{min-height:44px}}.task-compose-mask{z-index:70;background:#2d261f57;align-items:flex-end;padding:0;display:flex;position:fixed;inset:0}.task-compose-sheet{width:100%;max-height:min(88dvh,720px);padding:18px 18px calc(20px + env(safe-area-inset-bottom));transform-origin:var(--fab-origin-x,calc(100% - 44px)) var(--fab-origin-y,100%);background:#fffdf8;border-radius:24px 24px 0 0;gap:14px;display:grid;overflow:auto;box-shadow:0 -16px 42px #38281833}.task-compose-sheet header{justify-content:space-between;align-items:center;display:flex}.task-compose-sheet header small{color:var(--accent);letter-spacing:.12em;font-size:10px;font-weight:800}.task-compose-sheet h2{margin:2px 0 0;font-size:22px}.task-compose-sheet label{color:#675f54;gap:6px;font-size:12px;font-weight:650;display:grid}.task-compose-sheet input,.task-compose-sheet select,.task-compose-sheet textarea{border:1px solid var(--line);resize:vertical;background:#fff;border-radius:11px;outline:none;width:100%;padding:12px}.task-compose-sheet input:focus,.task-compose-sheet select:focus,.task-compose-sheet textarea:focus{border-color:var(--accent);box-shadow:0 0 0 3px #f15a291a}.task-compose-row{grid-template-columns:minmax(0,1fr) 105px;gap:10px;display:grid}.task-compose-date-actions{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.task-compose-date-control{align-items:center;min-width:0;display:flex;position:relative}.task-compose-date-chip{border:1px solid var(--line);cursor:pointer;background:#fffaf3;border-radius:999px;align-items:center;width:auto;min-height:44px;padding:0 12px;position:relative;overflow:hidden;color:#776e62!important;flex-direction:row!important;grid-template-columns:none!important;gap:7px!important;font-size:13px!important;font-weight:700!important;display:inline-flex!important}.task-compose-date-chip.selected{background:var(--accent-soft);border-color:#f3b18f;color:#b7421e!important}.task-compose-date-chip svg{flex:none;width:16px;height:16px}.task-compose-date-clear{width:34px;height:34px;color:var(--muted);background:0 0;border:0;border-radius:50%;place-items:center;margin-left:2px;display:grid}.task-compose-date-clear:hover{color:var(--text);background:#f5eee5}.task-compose-date-clear svg{width:15px;height:15px}.task-compose-time-add{min-width:0;height:40px;color:var(--accent);background:0 0;border:1px dashed #e5b89d;border-radius:999px;padding:0 13px;font-weight:700}.task-compose-time-add:hover{border-color:var(--accent);background:#fff4e8}.task-compose-time-chip{align-items:center;width:auto;color:var(--muted)!important;flex-direction:row!important;grid-template-columns:none!important;gap:5px!important;font-size:12px!important;display:inline-flex!important}.task-compose-time-chip input{min-width:0;border-radius:999px!important;width:102px!important;padding:9px 8px!important}.task-compose-time-remove{width:34px;height:34px;color:var(--muted);background:0 0;border:0;border-radius:50%;flex:0 0 34px;place-items:center;display:grid}.task-compose-time-remove:hover{color:var(--text);background:#f5eee5}.task-compose-time-remove svg{width:15px;height:15px}.task-compose-sheet footer{justify-content:flex-end;gap:9px;padding-top:4px;display:flex}.task-compose-sheet button:disabled{opacity:.45}.task-compose-enter-active,.task-compose-leave-active{transition:background .22s}.task-compose-enter-active .task-compose-sheet,.task-compose-leave-active .task-compose-sheet{transition:transform .28s cubic-bezier(.2,.9,.25,1.08),opacity .2s}.task-compose-enter-from,.task-compose-leave-to{background:#2d261f00}.task-compose-enter-from .task-compose-sheet,.task-compose-leave-to .task-compose-sheet{opacity:0;transform:translateY(36px)scale(.86)}.countdown-compose-enter-active,.countdown-compose-leave-active{transition:background .24s}.countdown-compose-enter-active .countdown-modal,.countdown-compose-leave-active .countdown-modal{transform-origin:var(--fab-origin-x,calc(100% - 43px)) var(--fab-origin-y,calc(100% - 104px));transition:transform .34s cubic-bezier(.18,.9,.28,1.16),opacity .22s,filter .22s}.countdown-compose-enter-from,.countdown-compose-leave-to{background:#2d261f00}.countdown-compose-enter-from .countdown-modal,.countdown-compose-leave-to .countdown-modal{opacity:0;filter:blur(5px);transform:translate(20px,28px)scale(.18)rotate(8deg)}@media (width<=930px){.unified-fab{bottom:calc(82px + env(safe-area-inset-bottom))}}@media (prefers-reduced-motion:reduce){*,:before,:after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important}}.overdue-section{margin-top:18px}.overdue-heading{color:var(--danger);margin-bottom:6px}.overdue-heading span{min-width:22px;height:22px;color:var(--danger);background:#fde2dc;border-radius:999px;place-items:center;padding:0 7px;font-size:11px;display:inline-grid}.overdue-list{margin-bottom:18px}.task-tail{text-align:right;white-space:nowrap;flex:0 auto;justify-content:flex-end;min-width:0;max-width:42%;display:flex}.task-actions{flex:none;align-items:center;display:flex}.task-row>.drag-handle,.task-row>.task-check,.task-actions>*{flex-shrink:0}.task-due{justify-content:flex-end;align-items:center;min-width:0;display:inline-flex}.task-due__text{text-overflow:ellipsis;white-space:nowrap;text-align:right;min-width:0;overflow:hidden}.task-due--overdue{color:var(--danger)}.task-due--neutral,.task-due--completed{color:var(--muted)}.task-due--completed{opacity:.8}.pager{justify-content:flex-end;align-items:center;gap:10px;margin:0 0 14px;display:flex}.pager button:disabled{opacity:.4;cursor:not-allowed}.pager span{color:var(--muted);font-size:13px}.section-heading{color:#514a40;align-items:center;gap:7px;margin:16px 0 10px;font-size:16px;line-height:1.35;display:flex}.section-heading svg{width:17px;height:17px;color:var(--accent)}.sr-only{clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important;width:1px!important;height:1px!important;margin:-1px!important;padding:0!important;position:absolute!important;overflow:hidden!important}.more-settings{border:1px solid var(--line);background:#fff;border-radius:10px}.more-settings summary{cursor:pointer;color:#756d61;padding:11px 13px;font-size:12px;font-weight:700}.more-settings-body{gap:12px;padding:0 13px 13px;display:grid}.more-settings-body>label{color:#756d61;grid-template-columns:80px 1fr;align-items:center;gap:7px;font-size:12px;font-weight:650;display:grid}.modal-mask{z-index:80;background:#2d261f66;place-items:center;padding:24px;display:grid;position:fixed;inset:0}.modal-box{border:1px solid var(--line);width:min(360px,92vw);box-shadow:var(--shadow);background:#fffdf8;border-radius:14px;gap:14px;padding:22px;display:grid}.modal-box h3{margin:0;font-size:17px}.modal-box label{color:#756d61;gap:7px;font-size:12px;font-weight:650;display:grid}.modal-input{border:1px solid var(--line);background:#fff;border-radius:9px;outline:none;width:100%;padding:11px;font-size:16px}.modal-actions{justify-content:flex-end;gap:8px;display:flex}.purge-list-dialog{width:min(430px,92vw)}.purge-list-dialog p{color:var(--muted);margin:0;line-height:1.65}.purge-list-dialog button{min-width:88px;min-height:44px}.purge-list-dialog button:disabled{cursor:not-allowed;opacity:.62}.purge-list-error{border-radius:10px;padding:10px 12px;font-weight:650;color:var(--danger)!important;background:#fde7e2!important}.countdown-view{gap:16px;padding-bottom:36px;display:grid}.countdown-content{gap:16px;display:grid}.countdown-hero{border-bottom:1px solid var(--line);justify-content:space-between;align-items:end;padding-bottom:10px;display:flex}.countdown-hero small{color:var(--muted);font-size:12px;display:block}.countdown-layout{align-items:start;gap:22px;display:grid}.countdown-timeline{gap:20px;width:100%;max-width:820px;margin:0 auto;display:grid}.countdown-group{gap:2px;display:grid}.countdown-group>h3{color:#8a8175;letter-spacing:.08em;margin:0 0 7px;padding-left:12px;font-size:11px;font-weight:750}.countdown-row{--countdown-tone:#d9a17c;border:0;border-bottom:1px solid var(--line);text-align:left;width:100%;min-height:66px;color:inherit;background:0 0;border-radius:0;grid-template-columns:minmax(0,1fr) 86px;align-items:center;gap:14px;padding:9px 10px 9px 17px;transition:background .15s,transform .15s;display:grid;position:relative}.countdown-row:before{content:"";background:var(--countdown-tone);border-radius:50%;width:4px;height:4px;position:absolute;top:50%;left:3px;transform:translateY(-50%)}.countdown-row:hover{background:#fffaf3}.countdown-row:active{transform:scale(.995)}.countdown-row.kind-anniversary{--countdown-tone:#b69b7d}.countdown-row.kind-birthday{--countdown-tone:#9cab8d}.countdown-row.today{--countdown-tone:#71856b}.countdown-row.past{--countdown-tone:#aaa094;opacity:.66}.countdown-row .pinned-icon{position:absolute;top:5px;right:4px}.countdown-icon{background:#fff2e8;border-radius:12px;place-items:center;width:38px;height:38px;font-size:19px;display:grid}.countdown-main{gap:4px;min-width:0;display:grid}.countdown-main>b{text-overflow:ellipsis;white-space:nowrap;color:#3f3932;font-size:15px;overflow:hidden}.countdown-main>small{text-overflow:ellipsis;white-space:nowrap;color:var(--muted);font-size:11px;overflow:hidden}.countdown-badges{gap:5px;display:flex}.countdown-badges em{color:#8a7f72;font-size:10px;font-style:normal}.countdown-badges em+em:before{content:"·";color:#c1b7aa;margin-right:5px}.countdown-state{justify-items:end;gap:3px;display:grid}.countdown-state strong{font-variant-numeric:tabular-nums;color:#62594e;font-size:26px;line-height:1}.countdown-state small{color:var(--muted);font-size:10px}.countdown-row.today .countdown-state strong,.countdown-row.today .countdown-state small{color:#71856b}.countdown-row.past .countdown-state strong{color:#887d70}.countdown-focus{--countdown-tone:#d9a17c;border:1px solid var(--countdown-tone);place-content:center;justify-items:center;gap:7px;width:min(720px,100%);min-height:255px;margin:0 auto;display:grid}@supports (color:color-mix(in lab, red, red)){.countdown-focus{border:1px solid color-mix(in srgb,var(--countdown-tone) 34%,var(--line))}}.countdown-focus{background:var(--countdown-tone);border-radius:16px}@supports (color:color-mix(in lab, red, red)){.countdown-focus{background:color-mix(in srgb,var(--countdown-tone) 7%,#fffdf8)}}.countdown-focus{text-align:center;color:inherit;box-shadow:none;padding:28px 24px;transition:border-color .15s,background .15s}.countdown-focus:hover{border-color:var(--countdown-tone)}@supports (color:color-mix(in lab, red, red)){.countdown-focus:hover{border-color:color-mix(in srgb,var(--countdown-tone) 54%,var(--line))}}.countdown-focus:hover{background:var(--countdown-tone)}@supports (color:color-mix(in lab, red, red)){.countdown-focus:hover{background:color-mix(in srgb,var(--countdown-tone) 10%,#fffdf8)}}.countdown-focus.kind-anniversary{--countdown-tone:#b69b7d}.countdown-focus.kind-birthday{--countdown-tone:#9cab8d}.countdown-focus>small{color:#8b8276;letter-spacing:.1em;font-size:10px;font-weight:750}.countdown-focus h3{margin:7px 0 0;font-size:20px;font-weight:680}.countdown-focus p{color:var(--muted);margin:1px 0 0;font-size:11px}.countdown-number{align-items:end;gap:6px;margin:4px 0 3px;display:flex}.countdown-number strong{font-variant-numeric:tabular-nums;letter-spacing:-.05em;color:#3f3932;font-size:76px;font-weight:720;line-height:.9}.countdown-number span{color:#7a7165;padding-bottom:6px;font-size:13px}.countdown-copy{color:#71685e;font-size:12px;font-weight:650}.countdown-empty{border:1px dashed var(--line);color:#766d60;text-align:center;background:#fffdf8;border-radius:16px;place-content:center;justify-items:center;gap:9px;min-height:260px;padding:26px;display:grid}.countdown-empty svg{color:var(--accent);width:30px;height:30px}.countdown-empty span{font-size:12px}.countdown-empty button{margin-top:5px}.archived-toggle,.archived-countdowns button{border:1px solid var(--line);background:#fff;border-radius:10px;align-items:center;gap:5px;padding:8px 11px;font-size:12px;display:inline-flex}.archived-toggle{justify-self:start}.archived-countdowns{gap:10px;display:grid}.archived-countdowns article{border:1px solid var(--line);background:#fff;border-radius:14px;align-items:center;gap:10px;padding:12px 14px;display:flex}.archived-countdowns article b{flex:1}.archived-countdowns article small{color:var(--muted)}.countdown-detail-mask,.countdown-modal-mask{background:#2d261f5c;padding:20px;display:grid;position:fixed;inset:0}.countdown-detail-mask{z-index:85;place-items:end center}.countdown-detail-sheet{border:1px solid var(--line);background:#fffdf8;border-radius:20px;gap:16px;width:min(500px,100%);padding:18px;display:grid;box-shadow:0 12px 36px #3828182e}.countdown-detail-sheet header{grid-template-columns:42px 1fr 44px;align-items:center;gap:10px;display:grid}.countdown-detail-sheet header small{color:var(--muted);font-size:11px}.countdown-detail-sheet header h3{margin:2px 0 0;font-size:19px}.countdown-detail-sheet header button,.countdown-modal header button{color:#766d60;background:0 0;border:0;border-radius:8px;place-items:center;width:44px;min-width:44px;height:44px;min-height:44px;display:grid}.countdown-detail-days{align-items:baseline;gap:6px;padding:8px 0;display:flex}.countdown-detail-days strong{font-variant-numeric:tabular-nums;font-size:46px;line-height:1}.countdown-detail-days span{color:var(--muted)}.countdown-detail-days b{color:var(--accent);margin-left:auto;font-size:13px}.countdown-detail-sheet dl{background:var(--line);gap:1px;margin:0;display:grid}.countdown-detail-sheet dl div{background:#fffdf8;grid-template-columns:62px 1fr;gap:10px;padding:10px 0;display:grid}.countdown-detail-sheet dt{color:var(--muted);font-size:12px}.countdown-detail-sheet dd{margin:0;font-size:13px}.countdown-detail-sheet footer{justify-content:flex-end;gap:8px;display:flex}.countdown-detail-sheet footer button{border:1px solid var(--line);background:#fff;border-radius:10px;align-items:center;gap:6px;min-height:44px;padding:9px 13px;display:inline-flex}.countdown-modal-mask{z-index:90;place-items:center}.countdown-modal{border:1px solid var(--line);width:min(420px,96vw);box-shadow:var(--shadow);background:#fffdf8;border-radius:18px;gap:12px;padding:18px;display:grid}.countdown-modal header{justify-content:space-between;align-items:start;display:flex}.countdown-modal header small{color:var(--muted)}.countdown-modal header h3{margin:2px 0 0}.countdown-modal label{color:#675f54;gap:6px;font-size:12px;font-weight:650;display:grid}.countdown-modal input,.countdown-modal select{border:1px solid var(--line);background:#fff;border-radius:10px;outline:none;padding:11px 12px}.countdown-modal input:focus,.countdown-modal select:focus{border-color:var(--accent);box-shadow:0 0 0 3px #f15a291a}.countdown-title-fields{grid-template-columns:72px 1fr;gap:8px;display:grid}.countdown-modal footer{justify-content:flex-end;gap:8px;padding-top:6px;display:flex}.countdown-advanced{border:1px solid var(--line);background:#fffaf4;border-radius:11px}.countdown-advanced summary{cursor:pointer;color:#756d61;justify-content:space-between;align-items:center;min-height:44px;padding:0 12px;font-size:12px;font-weight:700;list-style:none;display:flex}.countdown-advanced summary::-webkit-details-marker{display:none}.countdown-advanced summary svg{width:16px;height:16px;transition:transform .16s}.countdown-advanced[open] summary svg{transform:rotate(180deg)}.countdown-advanced>label,.countdown-advanced>.countdown-title-fields{margin:0 12px 12px}.countdown-detail-enter-active,.countdown-detail-leave-active{transition:background .2s}.countdown-detail-enter-active .countdown-detail-sheet,.countdown-detail-leave-active .countdown-detail-sheet{transition:transform .24s,opacity .2s}.countdown-detail-enter-from .countdown-detail-sheet,.countdown-detail-leave-to .countdown-detail-sheet{opacity:.6;transform:translateY(100%)}@media (width<=930px){.countdown-layout{grid-template-columns:1fr;gap:16px}.countdown-focus{min-height:205px;padding:22px 16px;display:grid}.countdown-number strong{font-size:64px}.countdown-timeline{gap:16px}}@media (width<=800px){.countdown-hero{align-items:center}.countdown-hero h2{font-size:19px}.countdown-row{grid-template-columns:minmax(0,1fr) 72px;gap:9px;padding:9px 4px}.countdown-state strong{font-size:25px}.countdown-detail-mask,.countdown-modal-mask{place-items:end;padding:0}.countdown-detail-sheet,.countdown-modal{width:100%;padding:18px 16px calc(18px + env(safe-area-inset-bottom));border-radius:22px 22px 0 0;max-height:min(88dvh,760px);overflow:auto}.countdown-view{position:relative}}@media (width<=930px){.task-tail{flex:0 auto;align-self:stretch;align-items:center;max-width:132px;overflow:hidden}.task-tail:has(.task-due--timed){flex:0 76px;max-width:76px}.task-row:has(>.task-tail .task-due--timed){height:66px;max-height:68px}.task-row:has(>.task-tail .task-due--timed) .task-main{padding:4px 0}.task-due{max-width:100%;overflow:hidden}.task-due--timed .task-due__text{text-overflow:ellipsis;white-space:normal;justify-items:end;max-width:100%;line-height:1.2;display:grid;overflow:hidden}.task-due--timed .task-due__absolute,.task-due--timed .task-due__relative{text-overflow:ellipsis;white-space:nowrap;max-width:100%;overflow:hidden}.task-due--timed .task-due__separator{display:none}.countdown-row,.countdown-row:first-of-type{border:0;border-bottom:1px solid var(--line);min-height:62px;box-shadow:none;background:0 0;border-radius:0;grid-template-columns:minmax(0,1fr) 72px;gap:8px;padding:8px 9px 8px 17px}.countdown-row:first-of-type{border-top:1px solid var(--line)}.countdown-row.pinned,.countdown-row.today{background:0 0}.countdown-state strong{font-size:24px}}.task-row.just-completed,.habit-row.just-completed{animation:.34s cubic-bezier(.2,.85,.3,1) completion-row-settle}.task-row.just-completed .task-check-mark,.habit-row.just-completed .task-check-mark{animation:.38s cubic-bezier(.2,1.4,.35,1) completion-check-pop}.task-row.completion-exiting,.habit-row.completion-exiting{pointer-events:none;animation:.32s cubic-bezier(.4,0,.8,.2) forwards completion-slide-out;overflow:hidden}@keyframes completion-slide-out{0%{opacity:1;transform:translate(var(--swipe-x),var(--reorder-y,0px));max-height:180px}68%{opacity:0;transform:translate(calc(100% + 24px),var(--reorder-y,0px));max-height:180px}to{opacity:0;transform:translate(calc(100% + 24px),var(--reorder-y,0px));border-width:0;min-height:0;max-height:0;padding-top:0;padding-bottom:0}}@keyframes completion-row-settle{0%{transform:translate(var(--swipe-x),var(--reorder-y,0px)) scale(1);background:#71856b29}45%{transform:translate(var(--swipe-x),var(--reorder-y,0px)) scale(.992);background:#71856b1a}to{transform:translate(var(--swipe-x),var(--reorder-y,0px)) scale(1)}}@keyframes completion-check-pop{0%{transform:scale(.72);box-shadow:0 0 #71856b47}58%{transform:scale(1.18);box-shadow:0 0 0 7px #71856b00}to{box-shadow:none;transform:scale(1)}}@media (prefers-reduced-motion:reduce){.task-row.just-completed,.habit-row.just-completed,.task-row.just-completed .task-check-mark,.habit-row.just-completed .task-check-mark,.task-row.completion-exiting,.habit-row.completion-exiting{animation:none}}:root{--surface-canvas:#f3ecdf;--surface-base:#fdfaf3;--surface-raised:#fffdf8;--text-primary:#302a24;--text-secondary:#655b50;--border-cream:#e4d5c0;--highlight-inner:inset 0 1px 0 #fff;--shadow-soft:0 4px 14px #58432a14;--shadow-raised:0 12px 30px #58432a1f;--focus-ring:#b4421e57;--success:#687e61;--scrim:#2d261f61;--radius-control:11px;--radius-card:14px;--radius-list:15px;--radius-panel:20px;--paper:var(--surface-raised);--sidebar:var(--surface-canvas);--line:var(--border-cream);--muted:var(--text-secondary);--shadow:var(--shadow-raised);--sheet-radius:20px;--sheet-scrim:var(--scrim)}body{color:var(--text-primary);background:var(--surface-canvas);font-variant-numeric:tabular-nums}.auth-shell{background:var(--surface-canvas)}.shell{background:var(--surface-base)}.sidebar{background:var(--surface-canvas);border-color:var(--border-cream);box-shadow:inset -1px 0 #fff}main{background:var(--surface-base)}.detail,.bottom{background:var(--surface-raised);border-color:var(--border-cream)}.detail{box-shadow:inset 1px 0 #fff}.detail-head,.app-sheet__header,.app-sheet__footer{background:var(--surface-raised)}.auth-card,.today-board,.tool-card,.empty-panel,.paper,.countdown-focus,.countdown-empty,.archived-countdowns article{background:var(--surface-raised);border:1px solid var(--border-cream);border-radius:var(--radius-card);box-shadow:var(--highlight-inner),var(--shadow-soft)}.app-sheet,.modal-box,.calendar-picker,.sidebar-popover,.archived-row-actions{background:var(--surface-raised);border:1px solid var(--border-cream);border-radius:var(--radius-panel);box-shadow:var(--highlight-inner),var(--shadow-raised)}.habit-detail-sheet,.countdown-detail-sheet,.task-compose-sheet,.more-sheet,.countdown-modal{background:var(--surface-raised);border-color:var(--border-cream);border-radius:var(--radius-panel);box-shadow:var(--highlight-inner),var(--shadow-raised)}.primary,.soft-button,.primary-small,.danger-button,.file-button,.secondary,.restore,.archived-toggle,.archived-countdowns button{border-radius:var(--radius-control)}.soft-button,.danger-button,.file-button,.secondary,.restore,.archived-toggle,.archived-countdowns button{background:var(--surface-raised);border-color:var(--border-cream);box-shadow:var(--highlight-inner)}.primary,.primary-small,.unified-fab{background:var(--accent);color:#fff}.danger-button{color:var(--danger);background:#fff8f5;border-color:#dba99d}.inline-error,.purge-list-error{color:var(--danger);background:#fff0ec}.task-check[aria-pressed=true] .task-check-mark,.habit-row.done .habit-check .task-check-mark{background:var(--success);border-color:var(--success)}.habit-archive-section{gap:0;display:grid}.habit-archive-toggle{text-align:left;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;width:100%;min-height:44px;display:grid}.habit-archive-toggle>span{min-width:0}.habit-archive-toggle>svg:last-child{transition:transform .16s}.habit-archive-toggle>svg.expanded{transform:rotate(90deg)}.archived-habits{background:var(--surface-raised);border:1px solid var(--border-cream);border-radius:var(--radius-card);gap:0;width:100%;display:grid;overflow:hidden}.archived-habit-row{appearance:none;width:100%;min-height:44px;color:inherit;text-align:left;background:var(--surface-raised);border:0;border-bottom:1px solid var(--border-cream);font:inherit;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;padding:10px 12px;display:grid}.archived-habit-row:last-child{border-bottom:0}.archived-habit-row>span{gap:3px;min-width:0;display:grid}.archived-habit-row b,.archived-habit-row small{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.archived-habit-row small{color:var(--muted);font-size:11px}.archived-habit-row>svg{flex:none}.habit-archive-status{justify-content:space-between;align-items:center;gap:12px;min-height:44px;margin:0;padding:12px;display:flex}.app-sheet__danger{gap:8px;display:flex}.app-sheet__danger>button{min-height:44px}.habit-restore-button,.habit-delete-button{flex:1}@media (width<=930px){.habit-archive-section{gap:0;width:100%}.habit-archive-toggle{appearance:none;background:var(--surface-raised);border:1px solid var(--border-cream);width:100%;min-height:44px;box-shadow:none}.archived-habits{gap:0;width:100%;display:grid}.archived-habit-row{appearance:none;background:var(--surface-raised);border-bottom:1px solid var(--border-cream);grid-template-columns:minmax(0,1fr) auto;width:100%;min-height:44px}.habit-detail-sheet.app-sheet--detail{width:100%;border-radius:var(--sheet-radius) var(--sheet-radius) 0 0!important}}input,select,textarea,.search{background:var(--surface-raised);border-color:var(--border-cream);border-radius:var(--radius-control);box-shadow:var(--highlight-inner)}.search input,.detail-title textarea{box-shadow:none;background:0 0}.sidebar-popover button,.sidebar-action-sheet .app-sheet__body button,.app-sheet--actions .app-sheet__body>button,.more-sheet>button{background:var(--surface-raised)}.task-list,.habit-list,.countdown-timeline{background:var(--surface-raised);border:1px solid var(--border-cream);border-radius:var(--radius-list);box-shadow:var(--highlight-inner);gap:0;overflow:hidden}.task-row,.habit-row,.countdown-row{background:var(--surface-raised);box-shadow:none;border:0;border-radius:0}.task-row+.task-row,.habit-row+.habit-row,.countdown-row+.countdown-row{border-top:1px solid var(--border-cream)}.task-row:hover,.task-row.selected,.habit-row:hover,.countdown-row:hover{background:#fff7eb}.task-row.done,.habit-row.done{background:#fbf5eb}.subtask{background:#fcf7ee}.overdue-task{background:#fff5f1}.countdown-row:first-of-type{border-top:0}.countdown-row:before{left:7px}.countdown-group{gap:0}.countdown-group+.countdown-group{margin-top:18px}.overdue-list{border-color:#ecc8bd}.empty,.center{color:var(--muted)}.loader{background:var(--surface-raised)}.toast{color:#fff;border-radius:var(--radius-control);box-shadow:var(--shadow-raised);background:#3b342c;border:1px solid #574d42}.error-toast{background:var(--danger);color:#fff;border-radius:var(--radius-control);box-shadow:var(--shadow-raised);border:1px solid #9f2f22}.modal-mask,.task-compose-mask,.habit-detail-mask,.countdown-detail-mask,.countdown-modal-mask,.app-sheet-mask.app-sheet-mask,.scrim,.more-mask{background:var(--scrim);filter:none}:focus-visible,.task-check:focus-visible,.today-track:focus-visible,.archived-lists-toggle:focus-visible,.archived-row-menu-trigger:focus-visible,.archived-row-actions button:focus-visible{outline:3px solid var(--focus-ring);outline-offset:2px}@media (width<=930px){.bottom{left:12px;right:12px;bottom:max(10px,env(safe-area-inset-bottom));background:var(--surface-raised);border:1px solid var(--border-cream);box-shadow:var(--highlight-inner),var(--shadow-raised);border-radius:20px;padding:7px 5px}.bottom button{border-radius:11px;min-height:44px}.bottom button.active{background:#fbe6dc}.sidebar{border-radius:0 var(--radius-panel) var(--radius-panel) 0}.detail,.app-sheet,.task-compose-sheet,.habit-detail-sheet,.countdown-detail-sheet,.more-sheet{border-radius:var(--sheet-radius) var(--sheet-radius) 0 0!important}.task-list,.habit-list,.countdown-timeline{gap:0;display:grid}.task-row,.habit-row,.countdown-row{background:var(--surface-raised);min-height:62px;box-shadow:none;border:0;border-radius:0}.task-row+.task-row,.habit-row+.habit-row,.countdown-row+.countdown-row{border-top:1px solid var(--border-cream)}.countdown-row:first-of-type{border-top:0}.unified-fab{bottom:calc(88px + env(safe-area-inset-bottom))}}@media (prefers-reduced-motion:reduce){*,:before,:after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important}.completed-filter-pill,.completed-filter-pill__track,.completed-filter-pill__thumb{transition:none!important}.topbar-refresh.spinning svg{animation:none!important}.completed-filter-pill:active:not(:disabled){transform:none}.task-row.just-completed,.habit-row.just-completed,.task-row.just-completed .task-check-mark,.habit-row.just-completed .task-check-mark{animation:none}}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false} diff --git a/backend/static/assets/index-pPmuGCFV.css b/backend/static/assets/index-pPmuGCFV.css new file mode 100644 index 0000000..eb897d5 --- /dev/null +++ b/backend/static/assets/index-pPmuGCFV.css @@ -0,0 +1,2 @@ +/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */ +@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial}}}@layer theme{:root,:host{--font-sans:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.collapse{visibility:collapse}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.resize{resize:both}.rounded{border-radius:.25rem}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}}:root{color:#2d2924;--accent:#f15a29;--accent-soft:#fbe6dc;--paper:#fffdf8;--sidebar:#f6f0e4;--line:#e7ddcc;--muted:#8b8275;--danger:#bd3827;--shadow:0 12px 36px #4e3a221a;--sheet-radius:20px;--sheet-scrim:#2d261f66;background:#f8f3e8;font-family:-apple-system,BlinkMacSystemFont,Avenir Next,PingFang SC,Hiragino Sans GB,Segoe UI,sans-serif}*{box-sizing:border-box}html{-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%}body{background:#f8f3e8;margin:0}button,input,textarea,select{font:inherit;color:inherit}@media (width<=800px){input,textarea,select{font-size:16px}}button{cursor:pointer}svg{stroke-width:1.8px;width:18px;height:18px}.center,.auth-shell{place-items:center;min-height:100vh;display:grid}.center{color:var(--muted);align-content:center;gap:12px}.loading-brand{grid-template-columns:auto;justify-items:center;gap:13px}.loading-logo{width:40px;height:40px;margin-bottom:3px;display:block}.loading-brand>span:last-child{font-size:13px}.loader{border:2px solid var(--line);border-top-color:var(--accent);border-radius:50%;width:24px;height:24px;animation:.8s linear infinite spin}@keyframes spin{to{transform:rotate(360deg)}}.auth-card{background:var(--paper);border:1px solid var(--line);width:min(390px,90vw);box-shadow:var(--shadow);border-radius:14px;gap:16px;padding:38px;display:grid}.brand{letter-spacing:-3px;align-items:center;gap:11px;font-size:40px;font-weight:850;display:inline-flex}.brand-wordmark{color:var(--text-primary)}.brand-logo{flex:none;width:42px;height:42px;display:block}.brand.small{gap:9px;font-size:29px}.brand.small .brand-logo{width:32px;height:32px}.auth-card p{color:var(--muted);margin:0 0 8px}.auth-card label,.detail-form>label{color:#756d61;gap:7px;font-size:12px;font-weight:650;display:grid}.auth-card input,.detail-form input,.detail-form select{border:1px solid var(--line);background:#fff;border-radius:9px;outline:none;width:100%;padding:11px}.auth-card input:focus,.detail-form input:focus,.detail-form select:focus,.detail-form textarea:focus{border-color:var(--accent);box-shadow:0 0 0 3px #f15a291a}.primary{background:var(--accent);color:#fff;border:0;border-radius:9px;padding:12px;font-weight:700;box-shadow:0 5px 12px #f15a2933}.auth-card small{color:var(--danger)}.shell{background:var(--paper);grid-template-columns:238px minmax(430px,1fr) 0;height:100vh;transition:grid-template-columns .22s;display:grid;overflow:hidden}.shell.detail-open{grid-template-columns:238px minmax(430px,1fr) 350px}.shell.sidebar-collapsed{grid-template-columns:0 minmax(430px,1fr) 0}.shell.sidebar-collapsed.detail-open{grid-template-columns:0 minmax(430px,1fr) 350px}.shell.sidebar-collapsed .sidebar{border-right:0;width:0;min-width:0;padding:0;overflow:hidden}.sidebar{border-right:1px solid var(--line);background:var(--sidebar);flex-direction:column;min-height:0;display:flex;overflow:hidden}.brand-row{justify-content:space-between;align-items:center;height:64px;padding:0 20px;display:flex}.primary-nav{gap:3px;padding:4px 12px 12px;display:grid}.primary-nav button,.sidebar-management button{color:#665e52;text-align:left;background:0 0;border:0;border-radius:10px;align-items:center;gap:10px;padding:10px 12px;display:flex;position:relative}.primary-nav button:hover,.sidebar-management button:hover,.list-row:hover,.folder-row>button:hover{background:#ffffff85}.primary-nav button.active,.list-row.active,.sidebar-management button.active{color:#b7421e;background:#faeae2;font-weight:650}.primary-nav button.active:before,.list-row.active:before,.sidebar-management button.active:before{content:"";background:var(--accent);border-radius:999px;width:3px;height:18px;position:absolute;top:50%;left:2px;transform:translateY(-50%)}.section-title{color:#958b7d;text-transform:uppercase;letter-spacing:.08em;justify-content:space-between;align-items:center;padding:17px 17px 7px 22px;font-size:11px;font-weight:750;display:flex}.section-title>span:last-child{display:flex}.mini-icon,.row-actions button{color:#8e8477;background:0 0;border:0;min-width:44px;min-height:44px;padding:4px}.mini-icon svg,.row-actions svg{width:14px;height:14px}.folders{-webkit-overflow-scrolling:touch;scrollbar-width:none;flex:1;min-height:0;padding:0 10px;overflow:hidden auto}.folders::-webkit-scrollbar{display:none}.folder-row,.list-row{border-radius:8px;align-items:center;display:flex;position:relative}.folder-row>button,.list-row-main{color:#6d6559;text-align:left;background:0 0;border:0;flex:1;align-items:center;gap:7px;min-width:0;padding:8px;display:flex}.folder-row>button>span,.list-row-main>span{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.folder-row>button svg{width:14px}.row-actions{opacity:0;pointer-events:none;transition:opacity .15s;display:flex;position:absolute;right:0}.folder-row:hover .row-actions,.folder-row:focus-within .row-actions,.list-row:hover .row-actions,.list-row:focus-within .row-actions{opacity:1;pointer-events:auto}.list-row-main{color:#665f55;width:100%;min-height:44px;padding:8px 7px 8px 31px}.draggable-list-row-main{padding-left:0}.list-row.active .list-row-main{color:inherit}.list-row i{background:#d89b62;border-radius:3px;flex:0 0 8px;width:8px;height:8px}.sidebar-create-wrap{position:relative}.sidebar-popover{z-index:12;border:1px solid var(--line);text-transform:none;letter-spacing:0;background:#fffdf8;border-radius:12px;min-width:148px;padding:6px;display:grid;position:absolute;box-shadow:0 12px 28px #4e3a2224}.sidebar-create-menu{top:40px;right:0}.sidebar-popover button{color:#665e52;text-align:left;white-space:nowrap;background:0 0;border:0;border-radius:8px;align-items:center;gap:8px;min-height:38px;padding:7px 10px;font-size:12px;display:flex}.sidebar-popover button:hover{background:#fbf0e8}.sidebar-popover svg{width:15px;height:15px}.sidebar-action-mask{z-index:70;align-items:flex-end;display:flex;position:fixed;inset:0}.sidebar-action-sheet{border:1px solid var(--line);border-radius:14px;width:214px;margin:12px;box-shadow:0 12px 28px #4e3a2224}.sidebar-action-sheet .app-sheet__body button{text-align:left;background:0 0;border:0;align-items:center;gap:10px;min-height:48px;padding:11px 18px;display:flex}.sidebar-action-sheet .app-sheet__body button+button{border-top:1px solid var(--line)}.sidebar-action-sheet .app-sheet__body button.danger{color:var(--danger)}.sidebar-management{margin:8px 12px max(12px,env(safe-area-inset-bottom));border-top:1px solid #dacfbed1;gap:2px;padding-top:8px;display:grid}.mobile-only,.bottom,.scrim{display:none}main{background:var(--surface-base);min-width:0;padding:27px 34px 50px;overflow:auto;container-type:inline-size}@media (width>=931px){main{scrollbar-width:none}main::-webkit-scrollbar{display:none}}.topbar{grid-template-columns:44px minmax(0,1fr) auto;grid-template-areas:"menu title filter""search search search";align-items:center;gap:12px 14px;margin-bottom:18px;display:grid}.topbar>.icon{grid-area:menu}.topbar-title{grid-area:title;width:100%;min-width:0}.topbar p{color:var(--muted);margin:0;font-size:12px}.topbar h1{text-overflow:ellipsis;white-space:nowrap;letter-spacing:-.03em;margin:0;font-size:27px;overflow:hidden}.search-reveal{grid-area:search;width:100%;min-width:0}.search-pull-hint{display:none}.topbar .search{width:100%;margin:0}.topbar-actions{grid-area:filter;justify-self:end;align-items:center;gap:8px;display:flex}.topbar-filter{flex:none;justify-self:end}.topbar-refresh{width:44px;min-width:44px;height:44px;color:var(--text-secondary);border-radius:50%}.topbar-refresh:hover:not(:disabled){background:var(--surface-raised);color:var(--text-primary)}.topbar-refresh:disabled{opacity:.5;cursor:not-allowed}.topbar-refresh.spinning svg{animation:.7s linear infinite topbar-refresh-spin}@keyframes topbar-refresh-spin{to{transform:rotate(360deg)}}.completed-filter-pill{border:1px solid var(--border-cream);background:var(--surface-raised);min-width:132px;height:36px;box-shadow:var(--highlight-inner);color:#675f54;white-space:nowrap;border-radius:999px;justify-content:space-between;align-items:center;gap:8px;padding:0 8px 0 12px;font-size:12px;font-weight:650;display:inline-flex}.completed-filter-pill:hover:not(:disabled){background:#fff7eb;border-color:#d8c6ae}.completed-filter-pill:active:not(:disabled){transform:scale(.985)}.completed-filter-pill:focus-visible{outline:3px solid var(--focus-ring);outline-offset:2px}.completed-filter-pill:disabled{opacity:.55;cursor:not-allowed}.completed-filter-pill__track{background:#d8cbb9;border-radius:999px;flex:none;width:32px;height:18px;padding:2px;transition:background .15s}.completed-filter-pill__thumb{background:#fffdf8;border-radius:50%;width:14px;height:14px;transition:transform .15s;display:block;transform:translate(0)}.completed-filter-pill[aria-checked=true] .completed-filter-pill__track{background:var(--accent)}.completed-filter-pill[aria-checked=true] .completed-filter-pill__thumb{transform:translate(14px)}.today-board{background:#fff;border:1px solid #e7ddccdb;border-radius:14px;grid-template-columns:repeat(2,minmax(0,1fr));gap:1px;margin:18px 0 8px;padding:6px;display:grid;box-shadow:0 3px 14px #513d260a}.today-track{text-align:left;background:0 0;border:0;border-radius:9px;gap:8px;min-width:0;padding:9px 11px;transition:background .15s;display:grid}.today-track+.today-track{border-left:1px solid var(--line);border-radius:0 9px 9px 0}.today-track:hover{background:#fff9f2}.today-track:focus-visible{outline-offset:1px;outline:2px solid #f15a294d}.today-track-head{justify-content:space-between;align-items:baseline;gap:10px;display:flex}.today-track-head strong{color:#403a32;font-size:14px;line-height:1.2}.today-track-rail{background:#eee7dc;border-radius:999px;height:5px;display:block;overflow:hidden}.today-track-fill{border-radius:inherit;background:#71856b;width:0;height:100%;transition:width .35s;display:block}.today-habit-track .today-track-fill{background:var(--accent)}.today-section-anchor{scroll-margin-top:16px}.search{border:1px solid var(--line);width:100%;color:var(--muted);background:#faf7f0;border-radius:9px;align-items:center;gap:8px;padding:8px 10px;display:flex}.search input{background:0 0;border:0;outline:0;width:100%;min-width:0}.search kbd{white-space:nowrap;border:1px solid var(--line);border-radius:4px;padding:2px 4px;font-size:10px}.list-toolbar{height:42px;color:var(--muted);align-items:center;gap:14px;font-size:12px;display:flex}.link{color:var(--accent);background:0 0;border:0;align-items:center;gap:3px;padding:3px;display:inline-flex}.link svg{width:14px}.task-list{transition:opacity .2s}.task-list.loading{opacity:.45}.task-row{--swipe-x:0px;border-left:0;border-bottom:1px solid var(--line);isolation:isolate;align-items:center;gap:10px;min-height:53px;padding:4px 8px;transition:background .15s,transform .18s;display:flex;position:relative;overflow:hidden}.task-row.swipeable{touch-action:pan-y;transform:translate(var(--swipe-x),var(--reorder-y,0px))}.task-row.swipeable:not([style*="0px"]){transition:none}.task-row:hover,.task-row.selected{background:#faf0e5bf}.task-row:hover:not(.reordering){transform:translate(calc(var(--swipe-x) + 2px),var(--reorder-y,0px))}.check{background:#fff;border:1.6px solid #c6baa8;border-radius:5px;flex:0 0 19px;place-items:center;width:19px;height:19px;padding:0;display:grid}.check svg{width:13px}.task-check{background:0 0;border:0;border-radius:9px;flex:0 0 44px;place-items:center;width:44px;height:44px;padding:0;display:grid}.task-check-mark{background:#fff;border:1.6px solid #c6baa8;border-radius:50%;place-items:center;width:19px;height:19px;transition:background .15s,border-color .15s,color .15s,transform .15s;display:grid}.task-check-mark svg{width:13px}.task-check:hover .task-check-mark{border-color:#9d8f7b;transform:scale(1.06)}.task-check:focus-visible{outline-offset:1px;outline:2px solid #f15a2952}.task-check[aria-pressed=true] .task-check-mark{color:#fff;background:#71856b;border-color:#71856b}.task-check-mark.p1{border-color:#4b93d1}.task-check-mark.p2{border-color:#d79b25}.task-check-mark.p3{border-color:#dc4b30}.check.p1{border-color:#4b93d1}.check.p2{border-color:#d79b25}.check.p3{border-color:#dc4b30}.done .check{color:#fff;background:#afa595}.task-main{text-align:left;background:0 0;border:0;flex:1;min-width:0;padding:8px 0}.task-main strong{white-space:nowrap;text-overflow:ellipsis;font-size:14px;font-weight:590;display:block;overflow:hidden}.done .task-main strong{color:#9b9388;text-decoration:line-through}.meta{color:#9b9286;align-items:center;gap:9px;margin-top:3px;font-size:11px;display:inline-flex}.meta-item{align-items:center;gap:3px;display:flex}.meta svg{width:12px}.priority{border-radius:5px;margin:3px 0 0 7px;padding:3px 6px;font-size:10px;font-weight:750;display:inline-flex}.priority.p1{color:#3f80ba;background:#e5f2fc}.priority.p2{color:#a56b05;background:#fff1cb}.priority.p3{color:#bd3827;background:#fde2dc}.icon,.ghost{background:0 0;border:0;border-radius:6px;place-items:center;min-width:44px;min-height:44px;padding:5px;display:grid}.mobile-only{display:none}.ghost{opacity:0;color:#9d9387}.task-row:hover .ghost{opacity:1}.ghost:hover{color:var(--danger);background:#fce7e2}.task-detail-trigger:hover{color:var(--text-primary);background:#fff7eb}.restore{border:1px solid var(--line);background:#fff;border-radius:7px;align-items:center;gap:5px;min-height:44px;padding:6px 8px;font-size:12px;display:flex}.restore svg{width:14px}.subtask{color:#6d655b;min-height:42px;padding-left:53px}.subtask>svg{color:#bbb0a2;width:13px}.empty{color:#aaa094;text-align:center;align-content:center;place-items:center;gap:8px;min-height:300px;display:grid}.empty>svg{color:#d8cabb;width:38px;height:38px}.empty b{color:#6f675c}.empty span{font-size:13px}.drag-handle{color:#b3a795;cursor:grab;touch-action:none;background:0 0;border:0;border-radius:8px;flex:0 0 44px;place-items:center;width:44px;min-width:44px;height:44px;display:grid}.drag-handle:active{cursor:grabbing}.drag-handle:disabled{opacity:.3;cursor:not-allowed}.drag-handle svg{width:17px;height:17px}.reordering{opacity:.78;z-index:4;pointer-events:none;transition:none!important;box-shadow:0 12px 28px #4e3a222e!important}.reorder-target{box-shadow:inset 0 2px 0 var(--accent)}.list-drag-handle{color:#ad9f8c;cursor:grab;touch-action:none;background:0 0;border:0;border-radius:8px;place-items:center;width:44px;min-width:44px;height:44px;display:grid}.list-drag-handle svg{width:15px;height:15px}.list-row{touch-action:pan-y}.list-row.list-dragging{z-index:8;opacity:.8;transform:translateY(var(--list-drag-y));pointer-events:none;background:#fffaf4;transition:none;position:relative;box-shadow:0 10px 24px #4e3a2233}.folder-row.list-drop-target{background:var(--accent-soft);box-shadow:inset 3px 0 0 var(--accent)}.list-root-drop.list-drop-target{background:var(--accent-soft);color:#b7421e;border-radius:9px}.list-row.list-reorder-target{box-shadow:inset 0 2px 0 var(--accent)}.list-move-menu{gap:4px;padding:6px 0 6px 28px;display:grid}.list-move-menu button{min-height:42px}.list-move-menu button:disabled,.sidebar-action-sheet .app-sheet__body button:disabled{opacity:.45;cursor:default}.archived-lists{margin-top:4px;position:relative}.archived-lists-toggle{color:#81786c;text-align:left;background:0 0;border:0;border-radius:9px;align-items:center;gap:8px;width:100%;min-height:44px;padding:0 12px;font-size:12px;font-weight:650;display:flex}.archived-lists-toggle:hover:not(:disabled){background:#ffffff85}.archived-lists-toggle:focus-visible,.archived-row-menu-trigger:focus-visible,.archived-row-actions button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.archived-lists-toggle:disabled{cursor:default;color:#aaa196}.archived-lists-toggle svg{width:15px;height:15px;transition:transform .16s}.archived-lists-toggle svg.expanded{transform:rotate(90deg)}.archived-list-items{transition:opacity .16s;display:grid}.archived-row{color:#746c61;grid-template-columns:minmax(0,1fr) 44px;align-items:center;min-height:44px;padding-left:35px;display:grid}.archived-row-label{text-overflow:ellipsis;white-space:nowrap;min-width:0;font-size:12px;overflow:hidden}.archived-row-menu{place-items:center;display:grid}.archived-row-menu-trigger{color:#8e8477;background:0 0;border:0;border-radius:9px;place-items:center;width:44px;height:44px;display:grid}.archived-row-menu-trigger svg{width:15px;height:15px}.archived-action-mask{display:contents}.archived-row-actions{z-index:70;border:1px solid var(--line);width:164px;box-shadow:var(--shadow);background:#fffdf8;border-radius:12px;gap:2px;padding:6px;display:grid;position:fixed}.archived-row-actions button{text-align:left;background:0 0;border:0;border-radius:8px;align-items:center;gap:9px;min-height:44px;padding:8px 10px;font-size:12px;display:flex}.archived-row-actions button:hover{background:#f8f1e8}.archived-row-actions svg{width:15px;height:15px}@media (width<=930px){.archived-action-mask{z-index:60;background:#2d261f4d;display:block;position:fixed;inset:0}.archived-row-actions{z-index:61;width:100%;padding:12px 16px calc(16px + env(safe-area-inset-bottom));border-radius:22px 22px 0 0;position:fixed;inset:auto 0 0}.archived-row-actions button{font-size:14px}}@media (prefers-reduced-motion:reduce){.archived-lists-toggle svg,.archived-list-items{transition:none}}.detail{border-left:1px solid var(--line);background:#faf7f0;min-width:0;overflow:auto}.detail-head{border-bottom:1px solid var(--line);color:#80766a;text-transform:uppercase;letter-spacing:.08em;justify-content:space-between;align-items:center;height:57px;padding:0 21px;font-size:12px;font-weight:700;display:flex}.paper{border:1px solid var(--line);text-align:center;color:#8f8578;background:#fff;border-radius:11px;align-content:center;place-items:center;min-height:180px;margin:22px;padding:28px 20px;display:grid;box-shadow:0 4px 18px #4c39220d}.paper svg{color:#ceb8a4;width:32px;height:32px;margin-bottom:12px}.paper b{color:#625b50}.paper p{font-size:13px;line-height:1.6}.detail-form{grid-template-columns:minmax(0,1fr);gap:12px;min-width:0;padding:19px;display:grid}.detail-form>*{min-width:0}.detail-title{align-items:flex-start;gap:10px;display:flex}.check.large{flex-basis:22px;width:22px;height:22px;margin-top:8px}.detail-title textarea{resize:none;background:0 0;border:0;outline:none;flex:1;font-size:19px;font-weight:700;line-height:1.4}.detail-form>label{grid-template-columns:80px 1fr;align-items:center}.detail-form>label input,.detail-form>label select{padding:8px}.task-detail-field-input{justify-self:end;max-width:100%;width:190px!important}.task-detail-due-input{padding-inline:9px!important}.field{gap:7px;display:grid}.field-label{color:#756d61;justify-content:space-between;align-items:center;font-size:12px;font-weight:700;display:flex}.hint{color:#a49a8d;font-size:12px}.markdown .field-label>span:last-child{background:#eee7dc;border-radius:6px;padding:2px;display:flex}.markdown .field-label button{background:0 0;border:0;border-radius:5px;padding:4px 8px;font-size:11px}.markdown .field-label button.active{color:var(--accent);background:#fff}.markdown textarea{border:1px solid var(--line);resize:vertical;background:#fff;border-radius:9px;outline:none;padding:11px;font:13px/1.6 ui-monospace,SFMono-Regular,Menlo,monospace}.markdown-preview{border:1px solid var(--line);overflow-wrap:anywhere;background:#fff;border-radius:9px;min-height:160px;padding:10px 12px;font-size:13px;line-height:1.65}.markdown-preview h1{font-size:20px}.markdown-preview h2{font-size:16px}.markdown-preview p{margin:8px 0}.markdown-preview code{background:#f2ece2;border-radius:4px;padding:2px 4px}.markdown-preview a{color:var(--accent)}.subtasks{gap:5px;display:grid}.subtask-detail{overflow-wrap:anywhere;word-break:break-word;white-space:normal;text-align:left;background:#fff;border:0;border-radius:7px;align-items:center;gap:8px;width:100%;min-width:0;max-width:100%;padding:8px;display:flex}.subtask-detail .check{pointer-events:none}.strike{color:var(--muted);text-decoration:line-through}.detail-actions{border-top:1px solid var(--line);justify-content:space-between;align-items:center;padding-top:10px;display:flex}.secondary{border:1px solid var(--line);background:#fff;border-radius:8px;padding:8px 11px;font-weight:650}.danger-text{color:var(--danger);background:0 0;border:0;align-items:center;gap:5px;font-size:12px;display:flex}.danger-text svg{width:14px}.field-hint{color:var(--muted);font-size:11px;font-weight:400}.after-completion-fields{border:1px solid var(--line);color:#675f54;background:#fffaf4;border-radius:10px;gap:5px;padding:10px 12px;font-size:12px;display:grid}.after-completion-fields>div{align-items:center;gap:7px;min-height:44px;display:flex}.after-completion-fields input{border:1px solid var(--line);background:#fff;border-radius:8px;width:76px;min-height:44px;padding:0 10px}.after-completion-fields small{color:var(--muted);line-height:1.5}.repeat-save{width:100%;min-height:44px}.repeat-custom-fields{border:1px solid var(--line);background:#fffaf4;border-radius:11px;gap:10px;padding:12px;display:grid}.repeat-custom-fields>div,.repeat-custom-fields>label{color:#675f54;align-items:center;gap:8px;font-size:12px;display:flex}.repeat-custom-fields input[type=number]{width:72px}.repeat-custom-fields input,.repeat-custom-fields select{border:1px solid var(--line);background:#fff;border-radius:8px;min-height:40px;padding:7px 9px}.weekday-picker{flex-wrap:wrap;gap:4px;display:flex}.weekday-picker label{border:1px solid var(--line);background:#fff;border-radius:50%;place-items:center;width:34px;height:34px;display:grid}.weekday-picker input{opacity:0;pointer-events:none;position:absolute}.weekday-picker label:has(input:checked){background:var(--accent);border-color:var(--accent);color:#fff}.toast,.error-toast{z-index:50;color:#fff;box-shadow:var(--shadow);background:#322d28;border-radius:9px;padding:10px 15px;font-size:13px;position:fixed;bottom:24px;left:50%;transform:translate(-50%)}.error-toast{background:var(--danger);align-items:center;gap:10px;display:flex}.error-toast button{color:#fff;background:0 0;border:0;padding:0}.toast-enter-active,.toast-leave-active{transition:all .2s}.toast-enter-from,.toast-leave-to{opacity:0;transform:translate(-50%,8px)}@media (width<=1050px) and (width>=931px){.shell.detail-open{grid-template-columns:220px minmax(400px,1fr) minmax(280px,30vw)}.shell.sidebar-collapsed.detail-open{grid-template-columns:0 minmax(400px,1fr) minmax(280px,30vw)}main{padding-inline:24px}}@media (width<=930px){.shell{height:100dvh;display:block;overflow:auto}.shell.mobile-sidebar-open{overflow:hidden}.shell.mobile-sidebar-open main{touch-action:none;overflow:hidden}.sidebar{z-index:50;box-shadow:var(--shadow);overscroll-behavior:contain;width:min(300px,86vw);transition:transform .22s;display:flex;position:fixed;top:0;bottom:0;left:0;transform:translate(-105%)}.sidebar.open{transform:none}.detail{z-index:40;border:1px solid var(--line);width:100%;max-height:min(88dvh,760px);padding-bottom:max(16px,env(safe-area-inset-bottom));background:#fffdf8;border-bottom:0;border-radius:22px 22px 0 0;transition:transform .22s;display:block;position:fixed;inset:auto 0 0;overflow:auto;transform:translateY(105%);box-shadow:0 -14px 38px #38281833}.detail.open{transform:none}.detail-head{z-index:2;border-bottom:1px solid var(--line);background:#fffdf8;height:62px;padding:0 18px;position:sticky;top:0}.detail-head .icon{background:var(--accent-soft);width:42px;height:42px;color:var(--accent);border-radius:50%;display:grid}.detail-form{padding:18px}.detail-title textarea{font-size:21px}.more-mask{z-index:45;background:#2d261f52;align-items:flex-end;display:flex;position:fixed;inset:0}.more-sheet{width:100%;padding:14px 16px max(22px,env(safe-area-inset-bottom));background:#fffdf8;border-radius:22px 22px 0 0;gap:6px;display:grid}.more-sheet-head{justify-content:space-between;align-items:center;padding:2px 4px 8px;display:flex}.more-sheet>button{text-align:left;background:#fff;border:0;border-radius:12px;align-items:center;gap:12px;padding:13px;display:flex}.scrim{z-index:35;background:#2d261f52;display:block;position:fixed;inset:0}.mobile-only{display:grid}main{min-height:100dvh;padding:20px 17px 112px}.topbar{grid-template-rows:auto auto;row-gap:0}.topbar h1{font-size:24px}.search-reveal{opacity:0;visibility:hidden;pointer-events:none;max-height:0;transition:max-height .2s,opacity .16s,transform .2s;overflow:hidden;transform:translateY(-8px)}.search-reveal.mobile-search-open{opacity:1;visibility:visible;pointer-events:auto;max-height:52px;overflow:visible;transform:none}.search-reveal.mobile-search-pulling{max-height:var(--search-pull);opacity:var(--search-pull-opacity);visibility:visible;transform:translateY(calc(var(--search-pull) - 56px))}.search-pull-hint{text-align:center;height:16px;color:var(--muted);opacity:0;pointer-events:none;margin-top:-16px;font-size:11px;line-height:16px;display:block}.search-reveal.mobile-search-pulling .search-pull-hint{opacity:1}.completed-filter-pill{min-width:138px;height:44px}.completed-filter-pill__track{width:36px;height:22px}.completed-filter-pill__thumb{width:18px;height:18px}.today-board{gap:1px;margin:14px 0 4px;padding:5px}.today-track{gap:7px;min-height:58px;padding:8px 9px}.today-track-head{flex-direction:column;align-items:flex-start;gap:2px}.today-track-head strong{font-size:13px}.search{width:100%;margin:0;padding:8px}.search input{width:100%}.search kbd{display:none}.list-toolbar{height:auto;min-height:36px}.section-heading{margin:12px 0 8px}.empty{min-height:190px}.today-empty-panel{min-height:104px}.row-actions{opacity:1;pointer-events:auto;position:static}.row-actions button{min-height:34px;padding:7px}.list-row{padding:6px 4px}.archived-row{color:#8a6d3b;background:#fbf3e2;border:1px dashed #e0cfae;border-radius:8px;padding:9px 7px}.archived-row .list-row-main{padding-left:14px}.archived-row .list-row-main>svg{color:#c9a45c}.bottom{z-index:15;border-top:1px solid var(--line);padding:8px 5px max(8px,env(safe-area-inset-bottom));background:#fffdf8f5;justify-content:space-around;display:flex;position:fixed;bottom:0;left:0;right:0;box-shadow:0 -5px 18px #4f3b220f}.bottom button{color:#81786d;background:0 0;border:0;place-items:center;gap:2px;min-width:60px;min-height:44px;font-size:10px;display:grid}.bottom button.active{color:var(--accent);font-weight:700}.bottom svg{width:20px}.toast,.error-toast{bottom:142px}.task-row{padding-inline:2px}.subtask{padding-left:35px}.ghost{opacity:.45}}.mvp-view{gap:16px;padding-bottom:36px;display:grid}.view-intro{border-bottom:1px dashed var(--line);padding-bottom:12px;display:block}.view-intro h2{margin:2px 0 0;font-size:22px}.view-intro small,.view-intro>span{color:var(--muted);font-size:12px}.tool-card,.empty-panel{border:1px solid var(--line);background:#fff;border-radius:12px;padding:16px;box-shadow:0 3px 14px #513d260d}.soft-button,.primary-small,.danger-button,.file-button{border:1px solid var(--line);background:#fff;border-radius:8px;justify-content:center;align-items:center;gap:6px;min-height:44px;padding:8px 11px;font-size:12px;display:inline-flex}.soft-button svg,.file-button svg{width:15px}.primary-small{background:var(--accent);border-color:var(--accent);color:#fff}.danger-button{color:var(--danger);border-color:#e5b7ad}.habit-list{gap:10px;display:grid}.tool-card h3{margin:0 0 4px}.habit-row{--swipe-x:0px;isolation:isolate;background:#fff;border:0;border-radius:14px;align-items:center;gap:8px;padding:5px 5px 5px 12px;transition:box-shadow .15s,transform .18s;display:flex;position:relative;overflow:hidden;box-shadow:0 0 0 1px #e7ddccb8,0 3px 14px #513d260d}.habit-row.done{background:#fffaf5}.habit-row.swipeable{touch-action:pan-y;transform:translate(var(--swipe-x),var(--reorder-y,0px))}.habit-row.swipeable:not([style*="0px"]){transition:none}.habit-main{text-align:left;background:0 0;border:0;border-radius:10px;flex:1;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:7px 10px;min-width:0;padding:11px 4px;display:grid}.habit-name{color:#3c372f;text-overflow:ellipsis;white-space:nowrap;font-size:15px;font-weight:700;overflow:hidden}.habit-progress{color:#4d463d;white-space:nowrap;font-variant-numeric:tabular-nums;flex:none;margin-left:auto;font-size:16px;font-weight:760;line-height:1}.habit-progress-bar{appearance:none;background:#eee6db;border:0;border-radius:999px;grid-column:1/-1;width:100%;height:5px;overflow:hidden}.habit-progress-bar::-webkit-progress-bar{background:#eee6db;border-radius:999px}.habit-progress-bar::-webkit-progress-value{background:var(--success);border-radius:999px;transition:width .2s}.habit-progress-bar::-moz-progress-bar{background:var(--success);border-radius:999px}.habit-week{grid-column:1/-1;grid-template-columns:repeat(7,minmax(24px,1fr));gap:6px;padding-top:3px;display:grid}.habit-week-cell{color:#a1978a;justify-items:center;gap:4px;display:grid}.habit-week-day{color:inherit;font-size:10px;line-height:1}.habit-week-cell i{background:#fff;border:1px solid #d8cdbd;border-radius:50%;width:9px;height:9px;display:block}.habit-week-cell.done{color:#71856b}.habit-week-cell.done i{background:#71856b;border-color:#71856b}.habit-week-cell.unscheduled{opacity:.35}.habit-week-cell.today{color:var(--accent);font-weight:750}.habit-week-cell.today i{box-shadow:0 0 0 2px #fbe6dc}.habit-row.done .habit-name{color:#756c61;-webkit-text-decoration:line-through #d8c8bb;text-decoration:line-through #d8c8bb;text-decoration-thickness:1px}.habit-row .icon.ghost{color:#b3a795;margin-left:4px}.habit-row .icon.ghost:hover{color:var(--danger)}.numeric-habit>span:first-child{gap:3px;display:grid}.numeric-habit small{color:var(--muted);font-size:11px}.numeric-action{align-items:center;gap:6px;display:flex}.numeric-action input{border:1px solid var(--line);background:#fff;border-radius:8px;width:74px;padding:7px}.numeric-action .soft-button{min-height:44px;padding:9px 12px}.habit-row>.icon.ghost{flex:0 0 44px;width:44px;height:44px}.habit-check{margin-left:-4px}.habit-row.done .habit-check .task-check-mark{color:#fff;background:#71856b;border-color:#71856b}.habit-detail-mask{z-index:85;background:#2d261f5c;place-items:end center;padding:20px;display:grid;position:fixed;inset:0}.habit-detail-sheet{border:1px solid var(--line);background:#fffdf8;border-radius:20px;gap:16px;width:min(500px,100%);padding:18px;display:grid;box-shadow:0 12px 36px #3828182e}.habit-detail-sheet header{justify-content:space-between;align-items:center;gap:10px;display:flex}.habit-detail-sheet header small{color:var(--muted);font-size:11px}.habit-detail-sheet header h3{margin:2px 0 0;font-size:19px}.habit-detail-sheet header button{background:0 0;border:0;place-items:center;width:44px;height:44px;display:grid}.habit-detail-progress{border-block:1px solid var(--line);color:var(--muted);justify-content:space-between;align-items:center;padding:14px 0;font-size:12px;display:flex}.habit-detail-progress strong{color:#3c372f;font-size:14px}.habit-detail-sheet footer{flex-wrap:wrap;justify-content:flex-end;gap:10px;display:flex}.habit-detail-sheet .habit-delete-button{font-weight:750}.empty-panel{text-align:center;color:var(--muted);place-items:center;gap:10px;display:grid}.today-empty-panel{min-height:130px}.empty-action{color:#655d52;margin-top:4px}.empty-action svg{width:15px;height:15px}.field-error{color:var(--danger);overflow-wrap:anywhere;font-size:12px;line-height:1.45;display:block}.habit-state-note{color:var(--muted);font-size:11px}.habit-weekdays{border:0;flex-wrap:wrap;gap:8px;min-width:0;padding:0;display:flex}.habit-weekdays legend{width:100%;font-size:12px;font-weight:650}.habit-weekdays label{align-items:center;gap:4px;min-height:44px;display:flex}.habit-compose-sheet input,.habit-compose-sheet select{max-width:100%}.task-check:disabled{cursor:not-allowed;opacity:.55}.settings-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;display:grid}.tool-card{flex-direction:column;align-items:flex-start;gap:10px;display:flex}.tool-card>h2{margin:0;font-size:1.17em}.tool-card>svg{color:var(--accent);width:25px;height:25px}.tool-card p{color:var(--muted);margin:0;font-size:13px}.tool-card.wide{grid-column:1/-1}.password-form{gap:10px;width:100%;display:grid}.password-form label{color:#675f54;gap:6px;font-size:12px;font-weight:650;display:grid}.password-form input{border:1px solid var(--line);background:#fff;border-radius:10px;outline:none;width:100%;padding:11px 12px}.password-form input:focus{border-color:var(--accent);box-shadow:0 0 0 3px #f15a291a}.password-form button{justify-self:start}.file-button input{display:none}.tool-card pre{background:#f8f3e8;border-radius:8px;width:100%;max-height:180px;padding:10px;font-size:10px;overflow:auto}.session-row,.audit-row{border-top:1px solid var(--line);justify-content:space-between;align-items:center;gap:10px;width:100%;padding:9px 0;display:flex}.session-copy{flex:1;min-width:0;display:grid}.session-title{line-height:1.4}.session-meta{flex-wrap:wrap;align-items:center;min-width:0;line-height:1.45;display:flex}.session-device{overflow-wrap:anywhere;min-width:0}.session-revoke{flex:none;justify-content:center;min-width:44px;min-height:44px}.audit-copy{gap:2px;min-width:0;display:grid}.audit-action{-webkit-line-clamp:2;overflow-wrap:anywhere;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.session-row small,.audit-row time{color:var(--muted);font-size:11px}.inline-error{color:var(--danger);background:#fff0ed;border-radius:8px;padding:9px}.settings.active{background:var(--accent-soft);color:#b7421e;font-weight:700}@media (width<=930px){.task-row,.habit-row,.countdown-row{border:1px solid var(--line);min-height:62px;box-shadow:none;background:#fff;border-radius:13px}.task-list,.habit-list,.countdown-timeline{gap:8px;display:grid}.task-row{padding:4px 7px}.task-row:hover,.task-row.selected{background:#fffaf5}.habit-row{padding:4px 7px}.countdown-row,.countdown-row:first-of-type{border:1px solid var(--line)}.countdown-row{grid-template-columns:minmax(0,1fr) 72px;gap:8px;padding:8px 9px}.task-main strong,.habit-name,.countdown-main>b{font-size:14px;font-weight:650}.meta,.countdown-main>small,.countdown-state small{color:var(--muted);font-size:11px}.habit-progress{font-size:16px}.task-check{flex-basis:44px;width:44px}.countdown-icon{border-radius:10px;width:36px;height:36px}.countdown-state strong{font-size:24px}.countdown-group{gap:8px}.countdown-group>h3{padding-left:3px}.habit-detail-mask{padding:0}.habit-detail-sheet{width:100%;padding:18px 16px calc(18px + env(safe-area-inset-bottom));border-radius:22px 22px 0 0}}@media (width<=800px){.settings-grid{grid-template-columns:1fr}.tool-card.wide{grid-column:auto}.habit-main{padding:10px 2px}.numeric-action input{width:62px}}@media (width<=390px){.task-compose-sheet{width:100%;max-width:100%;overflow-x:hidden}.task-compose-sheet .app-sheet__header>button{min-width:44px;min-height:44px}.task-compose-sheet input,.task-compose-sheet select,.task-compose-sheet button{min-height:44px}.task-compose-date-clear,.task-compose-time-remove{min-width:44px;min-height:44px}.task-compose-sheet .app-sheet__footer>button{min-height:44px}.habit-detail-sheet,.habit-compose-sheet{width:100%;max-width:100%}.habit-detail-sheet .app-sheet__header>button,.habit-compose-sheet .app-sheet__header>button{min-width:44px;min-height:44px}.habit-detail-sheet .app-sheet__footer>button,.habit-detail-sheet .app-sheet__danger>button,.habit-compose-sheet .app-sheet__footer>button{min-height:44px}}.unified-fab{z-index:60;background:var(--accent);color:#fff;touch-action:none;-webkit-user-select:none;user-select:none;border:0;border-radius:50%;place-items:center;width:56px;height:56px;transition:transform .16s,box-shadow .16s;display:grid;position:fixed;bottom:22px;right:20px;box-shadow:0 8px 20px #f15a2947}.unified-fab svg{width:25px;height:25px}.unified-fab:hover{transform:translateY(-2px);box-shadow:0 10px 24px #f15a2952}.unified-fab:active{transform:scale(.96)}.unified-fab.dragging{transform:scale(1.06);box-shadow:0 12px 28px #f15a295c}.app-sheet-mask.app-sheet-mask{background:var(--sheet-scrim);overscroll-behavior:contain}.app-sheet{background:var(--paper);min-height:0;overflow:hidden}.app-sheet__header{z-index:3;background:var(--paper);border-bottom:1px solid var(--line);flex:0 0 64px;min-height:64px;padding:0 18px;position:sticky;top:0}.app-sheet__header>div{min-width:0}.app-sheet__header h2,.app-sheet__header h3{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.app-sheet__header>button{background:0 0;border:0;border-radius:10px;flex:0 0 44px;place-items:center;width:44px;height:44px;display:grid}.app-sheet__body{overscroll-behavior:contain;-webkit-overflow-scrolling:touch;gap:14px;min-height:0;padding:16px 18px;display:grid;overflow-y:auto}.app-sheet__footer{z-index:3;background:var(--paper);border-top:1px solid var(--line);padding:12px 18px;padding-bottom:calc(16px + env(safe-area-inset-bottom));justify-content:flex-end;gap:8px;margin:0;display:flex;position:sticky;bottom:0}.app-sheet__danger{padding:12px 18px;padding-bottom:calc(16px + env(safe-area-inset-bottom));background:#fff8f6;border-top:1px solid #f1d4cd;justify-content:flex-end;display:flex}.app-sheet--actions .app-sheet__body{padding:8px 16px calc(16px + env(safe-area-inset-bottom));gap:6px}.app-sheet--actions .app-sheet__body>button{text-align:left;background:#fff;border:0;border-radius:12px;align-items:center;gap:12px;width:100%;min-height:50px;padding:13px;display:flex}@media (width<=930px){.app-sheet{width:100%;max-height:min(88dvh,760px);border-radius:var(--sheet-radius) var(--sheet-radius) 0 0!important;flex-direction:column!important;padding:0!important;display:flex!important;overflow:hidden!important}.app-sheet--detail,.app-sheet--create{max-width:none!important}.app-sheet-mask{place-items:flex-end center!important;padding:0!important}.app-sheet__header{width:100%;justify-content:space-between!important;align-items:center!important;display:flex!important}.app-sheet__body{flex:auto;width:100%}.app-sheet__body label{gap:6px;display:grid}.app-sheet__footer{flex:none;width:100%}.app-sheet__footer .primary-small{min-width:124px}.app-sheet__danger{flex:none;width:100%}.app-sheet__danger .danger-text{justify-content:center;width:100%;min-height:48px}}.calendar-picker-layer{z-index:90;pointer-events:none;position:fixed;inset:0}.calendar-picker{pointer-events:auto;width:328px;color:var(--text);background:#fffdf8;border:1px solid #ded6ca;border-radius:18px;gap:10px;padding:14px;display:grid;position:fixed;box-shadow:0 18px 46px #38281833}.calendar-picker__header{grid-template-columns:40px 1fr 40px;align-items:center;gap:4px;display:grid}.calendar-picker__header h3{text-align:center;margin:0;font-size:16px}.calendar-picker__header button,.calendar-picker__grid button{background:0 0;border:0;place-items:center;display:grid}.calendar-picker__header button{border-radius:10px;width:40px;height:40px}.calendar-picker__header svg{width:18px}.calendar-picker__close{display:none!important}.calendar-picker__weekdays,.calendar-picker__grid{grid-template-columns:repeat(7,1fr);gap:3px;display:grid}.calendar-picker__weekdays span{text-align:center;color:var(--muted);padding:3px 0;font-size:11px}.calendar-picker__grid button{color:#4f483f;border-radius:10px;height:34px;font-size:13px}.calendar-picker__grid button:hover,.calendar-picker__grid button:focus-visible{background:#f6ede2;outline:2px solid #0000}.calendar-picker__grid button.outside{color:#b9b0a5}.calendar-picker__grid button.today{box-shadow:inset 0 0 0 1px var(--accent);color:#b7421e}.calendar-picker__grid button.selected{background:var(--accent);color:#fff}.calendar-picker__grid button.selected.today{box-shadow:inset 0 0 0 1px #fff}.calendar-picker__footer{border-top:1px solid #e8e0d5;grid-template-columns:auto auto 1fr auto auto;align-items:center;gap:4px;padding-top:10px;display:grid}.calendar-picker__footer button{color:#6d6459;background:0 0;border:0;border-radius:9px;min-height:36px;padding:0 9px;font-weight:650}.calendar-picker__footer button:hover{background:#f6ede2}.calendar-picker__footer .calendar-picker__done{background:var(--accent);color:#fff}.calendar-picker__footer .calendar-picker__done:hover{background:#df4e22}@media (width<=600px){.calendar-picker-layer{pointer-events:auto;background:#2d261f4d;align-items:flex-end;display:flex}.calendar-picker{width:100%;height:min(520px,72dvh);padding:18px 18px calc(16px + env(safe-area-inset-bottom));border-width:1px 0 0;border-radius:24px 24px 0 0;grid-template-rows:auto auto 1fr auto;position:relative!important;top:auto!important;left:auto!important}.calendar-picker__header{grid-template-columns:44px 1fr 44px 44px}.calendar-picker__close{display:grid!important}.calendar-picker__grid{align-content:stretch}.calendar-picker__grid button{height:auto;min-height:42px}.calendar-picker__footer button{min-height:44px}}.task-compose-mask{z-index:70;background:#2d261f57;align-items:flex-end;padding:0;display:flex;position:fixed;inset:0}.task-compose-sheet{width:100%;max-height:min(88dvh,720px);padding:18px 18px calc(20px + env(safe-area-inset-bottom));transform-origin:var(--fab-origin-x,calc(100% - 44px)) var(--fab-origin-y,100%);background:#fffdf8;border-radius:24px 24px 0 0;gap:14px;display:grid;overflow:auto;box-shadow:0 -16px 42px #38281833}.task-compose-sheet header{justify-content:space-between;align-items:center;display:flex}.task-compose-sheet header small{color:var(--accent);letter-spacing:.12em;font-size:10px;font-weight:800}.task-compose-sheet h2{margin:2px 0 0;font-size:22px}.task-compose-sheet label{color:#675f54;gap:6px;font-size:12px;font-weight:650;display:grid}.task-compose-sheet input,.task-compose-sheet select,.task-compose-sheet textarea{border:1px solid var(--line);resize:vertical;background:#fff;border-radius:11px;outline:none;width:100%;padding:12px}.task-compose-sheet input:focus,.task-compose-sheet select:focus,.task-compose-sheet textarea:focus{border-color:var(--accent);box-shadow:0 0 0 3px #f15a291a}.task-compose-row{grid-template-columns:minmax(0,1fr) 105px;gap:10px;display:grid}.task-compose-date-actions{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.task-compose-date-control{align-items:center;min-width:0;display:flex;position:relative}.task-compose-date-chip{border:1px solid var(--line);cursor:pointer;background:#fffaf3;border-radius:999px;align-items:center;width:auto;min-height:44px;padding:0 12px;position:relative;overflow:hidden;color:#776e62!important;flex-direction:row!important;grid-template-columns:none!important;gap:7px!important;font-size:13px!important;font-weight:700!important;display:inline-flex!important}.task-compose-date-chip.selected{background:var(--accent-soft);border-color:#f3b18f;color:#b7421e!important}.task-compose-date-chip svg{flex:none;width:16px;height:16px}.task-compose-date-clear{width:34px;height:34px;color:var(--muted);background:0 0;border:0;border-radius:50%;place-items:center;margin-left:2px;display:grid}.task-compose-date-clear:hover{color:var(--text);background:#f5eee5}.task-compose-date-clear svg{width:15px;height:15px}.task-compose-time-add{min-width:0;height:40px;color:var(--accent);background:0 0;border:1px dashed #e5b89d;border-radius:999px;padding:0 13px;font-weight:700}.task-compose-time-add:hover{border-color:var(--accent);background:#fff4e8}.task-compose-time-chip{align-items:center;width:auto;color:var(--muted)!important;flex-direction:row!important;grid-template-columns:none!important;gap:5px!important;font-size:12px!important;display:inline-flex!important}.task-compose-time-chip input{min-width:0;border-radius:999px!important;width:102px!important;padding:9px 8px!important}.task-compose-time-remove{width:34px;height:34px;color:var(--muted);background:0 0;border:0;border-radius:50%;flex:0 0 34px;place-items:center;display:grid}.task-compose-time-remove:hover{color:var(--text);background:#f5eee5}.task-compose-time-remove svg{width:15px;height:15px}.task-compose-sheet footer{justify-content:flex-end;gap:9px;padding-top:4px;display:flex}.task-compose-sheet button:disabled{opacity:.45}.task-compose-enter-active,.task-compose-leave-active{transition:background .22s}.task-compose-enter-active .task-compose-sheet,.task-compose-leave-active .task-compose-sheet{transition:transform .28s cubic-bezier(.2,.9,.25,1.08),opacity .2s}.task-compose-enter-from,.task-compose-leave-to{background:#2d261f00}.task-compose-enter-from .task-compose-sheet,.task-compose-leave-to .task-compose-sheet{opacity:0;transform:translateY(36px)scale(.86)}.countdown-compose-enter-active,.countdown-compose-leave-active{transition:background .24s}.countdown-compose-enter-active .countdown-modal,.countdown-compose-leave-active .countdown-modal{transform-origin:var(--fab-origin-x,calc(100% - 43px)) var(--fab-origin-y,calc(100% - 104px));transition:transform .34s cubic-bezier(.18,.9,.28,1.16),opacity .22s,filter .22s}.countdown-compose-enter-from,.countdown-compose-leave-to{background:#2d261f00}.countdown-compose-enter-from .countdown-modal,.countdown-compose-leave-to .countdown-modal{opacity:0;filter:blur(5px);transform:translate(20px,28px)scale(.18)rotate(8deg)}@media (width<=930px){.unified-fab{bottom:calc(82px + env(safe-area-inset-bottom))}}@media (prefers-reduced-motion:reduce){*,:before,:after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important}}.overdue-section{margin-top:18px}.overdue-heading{color:var(--danger);margin-bottom:6px}.overdue-heading span{min-width:22px;height:22px;color:var(--danger);background:#fde2dc;border-radius:999px;place-items:center;padding:0 7px;font-size:11px;display:inline-grid}.overdue-list{margin-bottom:18px}.task-tail{text-align:right;white-space:nowrap;flex:0 auto;justify-content:flex-end;min-width:0;max-width:42%;display:flex}.task-actions{flex:none;align-items:center;display:flex}.task-row>.drag-handle,.task-row>.task-check,.task-actions>*{flex-shrink:0}.task-due{justify-content:flex-end;align-items:center;min-width:0;display:inline-flex}.task-due__text{text-overflow:ellipsis;white-space:nowrap;text-align:right;min-width:0;overflow:hidden}.task-due--overdue{color:var(--danger)}.task-due--neutral,.task-due--completed{color:var(--muted)}.task-due--completed{opacity:.8}.pager{justify-content:flex-end;align-items:center;gap:10px;margin:0 0 14px;display:flex}.pager button:disabled{opacity:.4;cursor:not-allowed}.pager span{color:var(--muted);font-size:13px}.section-heading{color:#514a40;align-items:center;gap:7px;margin:16px 0 10px;font-size:16px;line-height:1.35;display:flex}.section-heading svg{width:17px;height:17px;color:var(--accent)}.sr-only{clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important;width:1px!important;height:1px!important;margin:-1px!important;padding:0!important;position:absolute!important;overflow:hidden!important}.more-settings{border:1px solid var(--line);background:#fff;border-radius:10px}.more-settings summary{cursor:pointer;color:#756d61;padding:11px 13px;font-size:12px;font-weight:700}.more-settings-body{gap:12px;padding:0 13px 13px;display:grid}.more-settings-body>label{color:#756d61;grid-template-columns:80px 1fr;align-items:center;gap:7px;font-size:12px;font-weight:650;display:grid}.modal-mask{z-index:80;background:#2d261f66;place-items:center;padding:24px;display:grid;position:fixed;inset:0}.modal-box{border:1px solid var(--line);width:min(360px,92vw);box-shadow:var(--shadow);background:#fffdf8;border-radius:14px;gap:14px;padding:22px;display:grid}.modal-box h3{margin:0;font-size:17px}.modal-box label{color:#756d61;gap:7px;font-size:12px;font-weight:650;display:grid}.modal-input{border:1px solid var(--line);background:#fff;border-radius:9px;outline:none;width:100%;padding:11px;font-size:16px}.modal-actions{justify-content:flex-end;gap:8px;display:flex}.purge-list-dialog{width:min(430px,92vw)}.purge-list-dialog p{color:var(--muted);margin:0;line-height:1.65}.purge-list-dialog button{min-width:88px;min-height:44px}.purge-list-dialog button:disabled{cursor:not-allowed;opacity:.62}.purge-list-error{border-radius:10px;padding:10px 12px;font-weight:650;color:var(--danger)!important;background:#fde7e2!important}.countdown-view{gap:16px;padding-bottom:36px;display:grid}.countdown-content{gap:16px;display:grid}.countdown-hero{border-bottom:1px solid var(--line);justify-content:space-between;align-items:end;padding-bottom:10px;display:flex}.countdown-hero small{color:var(--muted);font-size:12px;display:block}.countdown-layout{align-items:start;gap:22px;display:grid}.countdown-timeline{gap:20px;width:100%;max-width:820px;margin:0 auto;display:grid}.countdown-group{gap:2px;display:grid}.countdown-group>h3{color:#8a8175;letter-spacing:.08em;margin:0 0 7px;padding-left:12px;font-size:11px;font-weight:750}.countdown-row{--countdown-tone:#d9a17c;border:0;border-bottom:1px solid var(--line);text-align:left;width:100%;min-height:66px;color:inherit;background:0 0;border-radius:0;grid-template-columns:minmax(0,1fr) 86px;align-items:center;gap:14px;padding:9px 10px 9px 17px;transition:background .15s,transform .15s;display:grid;position:relative}.countdown-row:before{content:"";background:var(--countdown-tone);border-radius:50%;width:4px;height:4px;position:absolute;top:50%;left:3px;transform:translateY(-50%)}.countdown-row:hover{background:#fffaf3}.countdown-row:active{transform:scale(.995)}.countdown-row.kind-anniversary{--countdown-tone:#b69b7d}.countdown-row.kind-birthday{--countdown-tone:#9cab8d}.countdown-row.today{--countdown-tone:#71856b}.countdown-row.past{--countdown-tone:#aaa094;opacity:.66}.countdown-row .pinned-icon{position:absolute;top:5px;right:4px}.countdown-icon{background:#fff2e8;border-radius:12px;place-items:center;width:38px;height:38px;font-size:19px;display:grid}.countdown-main{gap:4px;min-width:0;display:grid}.countdown-main>b{text-overflow:ellipsis;white-space:nowrap;color:#3f3932;font-size:15px;overflow:hidden}.countdown-main>small{text-overflow:ellipsis;white-space:nowrap;color:var(--muted);font-size:11px;overflow:hidden}.countdown-badges{gap:5px;display:flex}.countdown-badges em{color:#8a7f72;font-size:10px;font-style:normal}.countdown-badges em+em:before{content:"·";color:#c1b7aa;margin-right:5px}.countdown-state{justify-items:end;gap:3px;display:grid}.countdown-state strong{font-variant-numeric:tabular-nums;color:#62594e;font-size:26px;line-height:1}.countdown-state small{color:var(--muted);font-size:10px}.countdown-row.today .countdown-state strong,.countdown-row.today .countdown-state small{color:#71856b}.countdown-row.past .countdown-state strong{color:#887d70}.countdown-focus{--countdown-tone:#d9a17c;border:1px solid var(--countdown-tone);place-content:center;justify-items:center;gap:7px;width:min(720px,100%);min-height:255px;margin:0 auto;display:grid}@supports (color:color-mix(in lab, red, red)){.countdown-focus{border:1px solid color-mix(in srgb,var(--countdown-tone) 34%,var(--line))}}.countdown-focus{background:var(--countdown-tone);border-radius:16px}@supports (color:color-mix(in lab, red, red)){.countdown-focus{background:color-mix(in srgb,var(--countdown-tone) 7%,#fffdf8)}}.countdown-focus{text-align:center;color:inherit;box-shadow:none;padding:28px 24px;transition:border-color .15s,background .15s}.countdown-focus:hover{border-color:var(--countdown-tone)}@supports (color:color-mix(in lab, red, red)){.countdown-focus:hover{border-color:color-mix(in srgb,var(--countdown-tone) 54%,var(--line))}}.countdown-focus:hover{background:var(--countdown-tone)}@supports (color:color-mix(in lab, red, red)){.countdown-focus:hover{background:color-mix(in srgb,var(--countdown-tone) 10%,#fffdf8)}}.countdown-focus.kind-anniversary{--countdown-tone:#b69b7d}.countdown-focus.kind-birthday{--countdown-tone:#9cab8d}.countdown-focus>small{color:#8b8276;letter-spacing:.1em;font-size:10px;font-weight:750}.countdown-focus h3{margin:7px 0 0;font-size:20px;font-weight:680}.countdown-focus p{color:var(--muted);margin:1px 0 0;font-size:11px}.countdown-number{align-items:end;gap:6px;margin:4px 0 3px;display:flex}.countdown-number strong{font-variant-numeric:tabular-nums;letter-spacing:-.05em;color:#3f3932;font-size:76px;font-weight:720;line-height:.9}.countdown-number span{color:#7a7165;padding-bottom:6px;font-size:13px}.countdown-copy{color:#71685e;font-size:12px;font-weight:650}.countdown-empty{border:1px dashed var(--line);color:#766d60;text-align:center;background:#fffdf8;border-radius:16px;place-content:center;justify-items:center;gap:9px;min-height:260px;padding:26px;display:grid}.countdown-empty svg{color:var(--accent);width:30px;height:30px}.countdown-empty span{font-size:12px}.countdown-empty button{margin-top:5px}.archived-toggle,.archived-countdowns button{border:1px solid var(--line);background:#fff;border-radius:10px;align-items:center;gap:5px;padding:8px 11px;font-size:12px;display:inline-flex}.archived-toggle{justify-self:start}.archived-countdowns{gap:10px;display:grid}.archived-countdowns article{border:1px solid var(--line);background:#fff;border-radius:14px;align-items:center;gap:10px;padding:12px 14px;display:flex}.archived-countdowns article b{flex:1}.archived-countdowns article small{color:var(--muted)}.countdown-detail-mask,.countdown-modal-mask{background:#2d261f5c;padding:20px;display:grid;position:fixed;inset:0}.countdown-detail-mask{z-index:85;place-items:end center}.countdown-detail-sheet{border:1px solid var(--line);background:#fffdf8;border-radius:20px;gap:16px;width:min(500px,100%);padding:18px;display:grid;box-shadow:0 12px 36px #3828182e}.countdown-detail-sheet header{grid-template-columns:42px 1fr 44px;align-items:center;gap:10px;display:grid}.countdown-detail-sheet header small{color:var(--muted);font-size:11px}.countdown-detail-sheet header h3{margin:2px 0 0;font-size:19px}.countdown-detail-sheet header button,.countdown-modal header button{color:#766d60;background:0 0;border:0;border-radius:8px;place-items:center;width:44px;min-width:44px;height:44px;min-height:44px;display:grid}.countdown-detail-days{align-items:baseline;gap:6px;padding:8px 0;display:flex}.countdown-detail-days strong{font-variant-numeric:tabular-nums;font-size:46px;line-height:1}.countdown-detail-days span{color:var(--muted)}.countdown-detail-days b{color:var(--accent);margin-left:auto;font-size:13px}.countdown-detail-sheet dl{background:var(--line);gap:1px;margin:0;display:grid}.countdown-detail-sheet dl div{background:#fffdf8;grid-template-columns:62px 1fr;gap:10px;padding:10px 0;display:grid}.countdown-detail-sheet dt{color:var(--muted);font-size:12px}.countdown-detail-sheet dd{margin:0;font-size:13px}.countdown-detail-sheet footer{justify-content:flex-end;gap:8px;display:flex}.countdown-detail-sheet footer button{border:1px solid var(--line);background:#fff;border-radius:10px;align-items:center;gap:6px;min-height:44px;padding:9px 13px;display:inline-flex}.countdown-modal-mask{z-index:90;place-items:center}.countdown-modal{border:1px solid var(--line);width:min(420px,96vw);box-shadow:var(--shadow);background:#fffdf8;border-radius:18px;gap:12px;padding:18px;display:grid}.countdown-modal header{justify-content:space-between;align-items:start;display:flex}.countdown-modal header small{color:var(--muted)}.countdown-modal header h3{margin:2px 0 0}.countdown-modal label{color:#675f54;gap:6px;font-size:12px;font-weight:650;display:grid}.countdown-modal input,.countdown-modal select{border:1px solid var(--line);background:#fff;border-radius:10px;outline:none;padding:11px 12px}.countdown-modal input:focus,.countdown-modal select:focus{border-color:var(--accent);box-shadow:0 0 0 3px #f15a291a}.countdown-title-fields{grid-template-columns:72px 1fr;gap:8px;display:grid}.countdown-modal footer{justify-content:flex-end;gap:8px;padding-top:6px;display:flex}.countdown-advanced{border:1px solid var(--line);background:#fffaf4;border-radius:11px}.countdown-advanced summary{cursor:pointer;color:#756d61;justify-content:space-between;align-items:center;min-height:44px;padding:0 12px;font-size:12px;font-weight:700;list-style:none;display:flex}.countdown-advanced summary::-webkit-details-marker{display:none}.countdown-advanced summary svg{width:16px;height:16px;transition:transform .16s}.countdown-advanced[open] summary svg{transform:rotate(180deg)}.countdown-advanced>label,.countdown-advanced>.countdown-title-fields{margin:0 12px 12px}.countdown-detail-enter-active,.countdown-detail-leave-active{transition:background .2s}.countdown-detail-enter-active .countdown-detail-sheet,.countdown-detail-leave-active .countdown-detail-sheet{transition:transform .24s,opacity .2s}.countdown-detail-enter-from .countdown-detail-sheet,.countdown-detail-leave-to .countdown-detail-sheet{opacity:.6;transform:translateY(100%)}@media (width<=930px){.countdown-layout{grid-template-columns:1fr;gap:16px}.countdown-focus{min-height:205px;padding:22px 16px;display:grid}.countdown-number strong{font-size:64px}.countdown-timeline{gap:16px}}@media (width<=800px){.countdown-hero{align-items:center}.countdown-hero h2{font-size:19px}.countdown-row{grid-template-columns:minmax(0,1fr) 72px;gap:9px;padding:9px 4px}.countdown-state strong{font-size:25px}.countdown-detail-mask,.countdown-modal-mask{place-items:end;padding:0}.countdown-detail-sheet,.countdown-modal{width:100%;padding:18px 16px calc(18px + env(safe-area-inset-bottom));border-radius:22px 22px 0 0;max-height:min(88dvh,760px);overflow:auto}.countdown-view{position:relative}}@media (width<=930px){.task-tail{flex:0 auto;align-self:stretch;align-items:center;max-width:132px;overflow:hidden}.task-tail:has(.task-due--timed){flex:0 76px;max-width:76px}.task-row:has(>.task-tail .task-due--timed){height:66px;max-height:68px}.task-row:has(>.task-tail .task-due--timed) .task-main{padding:4px 0}.task-due{max-width:100%;overflow:hidden}.task-due--timed .task-due__text{text-overflow:ellipsis;white-space:normal;justify-items:end;max-width:100%;line-height:1.2;display:grid;overflow:hidden}.task-due--timed .task-due__absolute,.task-due--timed .task-due__relative{text-overflow:ellipsis;white-space:nowrap;max-width:100%;overflow:hidden}.task-due--timed .task-due__separator{display:none}.countdown-row,.countdown-row:first-of-type{border:0;border-bottom:1px solid var(--line);min-height:62px;box-shadow:none;background:0 0;border-radius:0;grid-template-columns:minmax(0,1fr) 72px;gap:8px;padding:8px 9px 8px 17px}.countdown-row:first-of-type{border-top:1px solid var(--line)}.countdown-row.pinned,.countdown-row.today{background:0 0}.countdown-state strong{font-size:24px}}.task-row.just-completed,.habit-row.just-completed{animation:.34s cubic-bezier(.2,.85,.3,1) completion-row-settle}.task-row.just-completed .task-check-mark,.habit-row.just-completed .task-check-mark{animation:.38s cubic-bezier(.2,1.4,.35,1) completion-check-pop}.task-row.completion-exiting,.habit-row.completion-exiting{pointer-events:none;animation:.32s cubic-bezier(.4,0,.8,.2) forwards completion-slide-out;overflow:hidden}@keyframes completion-slide-out{0%{opacity:1;transform:translate(var(--swipe-x),var(--reorder-y,0px));max-height:180px}68%{opacity:0;transform:translate(calc(100% + 24px),var(--reorder-y,0px));max-height:180px}to{opacity:0;transform:translate(calc(100% + 24px),var(--reorder-y,0px));border-width:0;min-height:0;max-height:0;padding-top:0;padding-bottom:0}}@keyframes completion-row-settle{0%{transform:translate(var(--swipe-x),var(--reorder-y,0px)) scale(1);background:#71856b29}45%{transform:translate(var(--swipe-x),var(--reorder-y,0px)) scale(.992);background:#71856b1a}to{transform:translate(var(--swipe-x),var(--reorder-y,0px)) scale(1)}}@keyframes completion-check-pop{0%{transform:scale(.72);box-shadow:0 0 #71856b47}58%{transform:scale(1.18);box-shadow:0 0 0 7px #71856b00}to{box-shadow:none;transform:scale(1)}}@media (prefers-reduced-motion:reduce){.task-row.just-completed,.habit-row.just-completed,.task-row.just-completed .task-check-mark,.habit-row.just-completed .task-check-mark,.task-row.completion-exiting,.habit-row.completion-exiting{animation:none}}:root{--surface-canvas:#f3ecdf;--surface-base:#fdfaf3;--surface-raised:#fffdf8;--text-primary:#302a24;--text-secondary:#655b50;--border-cream:#e4d5c0;--highlight-inner:inset 0 1px 0 #fff;--shadow-soft:0 4px 14px #58432a14;--shadow-raised:0 12px 30px #58432a1f;--focus-ring:#b4421e57;--success:#687e61;--scrim:#2d261f61;--radius-control:11px;--radius-card:14px;--radius-list:15px;--radius-panel:20px;--paper:var(--surface-raised);--sidebar:var(--surface-canvas);--line:var(--border-cream);--muted:var(--text-secondary);--shadow:var(--shadow-raised);--sheet-radius:20px;--sheet-scrim:var(--scrim)}body{color:var(--text-primary);background:var(--surface-canvas);font-variant-numeric:tabular-nums}.auth-shell{background:var(--surface-canvas)}.shell{background:var(--surface-base)}.sidebar{background:var(--surface-canvas);border-color:var(--border-cream);box-shadow:inset -1px 0 #fff}main{background:var(--surface-base)}.detail,.bottom{background:var(--surface-raised);border-color:var(--border-cream)}.detail{box-shadow:inset 1px 0 #fff}.detail-head,.app-sheet__header,.app-sheet__footer{background:var(--surface-raised)}.auth-card,.today-board,.tool-card,.empty-panel,.paper,.countdown-focus,.countdown-empty,.archived-countdowns article{background:var(--surface-raised);border:1px solid var(--border-cream);border-radius:var(--radius-card);box-shadow:var(--highlight-inner),var(--shadow-soft)}.app-sheet,.modal-box,.calendar-picker,.sidebar-popover,.archived-row-actions{background:var(--surface-raised);border:1px solid var(--border-cream);border-radius:var(--radius-panel);box-shadow:var(--highlight-inner),var(--shadow-raised)}.habit-detail-sheet,.countdown-detail-sheet,.task-compose-sheet,.more-sheet,.countdown-modal{background:var(--surface-raised);border-color:var(--border-cream);border-radius:var(--radius-panel);box-shadow:var(--highlight-inner),var(--shadow-raised)}.primary,.soft-button,.primary-small,.danger-button,.file-button,.secondary,.restore,.archived-toggle,.archived-countdowns button{border-radius:var(--radius-control)}.soft-button,.danger-button,.file-button,.secondary,.restore,.archived-toggle,.archived-countdowns button{background:var(--surface-raised);border-color:var(--border-cream);box-shadow:var(--highlight-inner)}.primary,.primary-small,.unified-fab{background:var(--accent);color:#fff}.danger-button{color:var(--danger);background:#fff8f5;border-color:#dba99d}.inline-error,.purge-list-error{color:var(--danger);background:#fff0ec}.task-check[aria-pressed=true] .task-check-mark,.habit-row.done .habit-check .task-check-mark{background:var(--success);border-color:var(--success)}.habit-archive-section{gap:0;display:grid}.habit-archive-toggle{text-align:left;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;width:100%;min-height:44px;display:grid}.habit-archive-toggle>span{min-width:0}.habit-archive-toggle>svg:last-child{transition:transform .16s}.habit-archive-toggle>svg.expanded{transform:rotate(90deg)}.archived-habits{background:var(--surface-raised);border:1px solid var(--border-cream);border-radius:var(--radius-card);gap:0;width:100%;display:grid;overflow:hidden}.archived-habit-row{appearance:none;width:100%;min-height:44px;color:inherit;text-align:left;background:var(--surface-raised);border:0;border-bottom:1px solid var(--border-cream);font:inherit;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;padding:10px 12px;display:grid}.archived-habit-row:last-child{border-bottom:0}.archived-habit-row>span{gap:3px;min-width:0;display:grid}.archived-habit-row b,.archived-habit-row small{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.archived-habit-row small{color:var(--muted);font-size:11px}.archived-habit-row>svg{flex:none}.habit-archive-status{justify-content:space-between;align-items:center;gap:12px;min-height:44px;margin:0;padding:12px;display:flex}.app-sheet__danger{gap:8px;display:flex}.app-sheet__danger>button{min-height:44px}.habit-restore-button,.habit-delete-button{flex:1}@media (width<=930px){.habit-archive-section{gap:0;width:100%}.habit-archive-toggle{appearance:none;background:var(--surface-raised);border:1px solid var(--border-cream);width:100%;min-height:44px;box-shadow:none}.archived-habits{gap:0;width:100%;display:grid}.archived-habit-row{appearance:none;background:var(--surface-raised);border-bottom:1px solid var(--border-cream);grid-template-columns:minmax(0,1fr) auto;width:100%;min-height:44px}.habit-detail-sheet.app-sheet--detail{width:100%;border-radius:var(--sheet-radius) var(--sheet-radius) 0 0!important}}input,select,textarea,.search{background:var(--surface-raised);border-color:var(--border-cream);border-radius:var(--radius-control);box-shadow:var(--highlight-inner)}.search input,.detail-title textarea{box-shadow:none;background:0 0}.sidebar-popover button,.sidebar-action-sheet .app-sheet__body button,.app-sheet--actions .app-sheet__body>button,.more-sheet>button{background:var(--surface-raised)}.task-list,.habit-list,.countdown-timeline{background:var(--surface-raised);border:1px solid var(--border-cream);border-radius:var(--radius-list);box-shadow:var(--highlight-inner);gap:0;overflow:hidden}.task-row,.habit-row,.countdown-row{background:var(--surface-raised);box-shadow:none;border:0;border-radius:0}.task-row+.task-row,.habit-row+.habit-row,.countdown-row+.countdown-row{border-top:1px solid var(--border-cream)}.task-row:hover,.task-row.selected,.habit-row:hover,.countdown-row:hover{background:#fff7eb}.task-row.done,.habit-row.done{background:#fbf5eb}.subtask{background:#fcf7ee}.overdue-task{background:#fff5f1}.countdown-row:first-of-type{border-top:0}.countdown-row:before{left:7px}.countdown-group{gap:0}.countdown-group+.countdown-group{margin-top:18px}.overdue-list{border-color:#ecc8bd}.empty,.center{color:var(--muted)}.loader{background:var(--surface-raised)}.toast{color:#fff;border-radius:var(--radius-control);box-shadow:var(--shadow-raised);background:#3b342c;border:1px solid #574d42}.error-toast{background:var(--danger);color:#fff;border-radius:var(--radius-control);box-shadow:var(--shadow-raised);border:1px solid #9f2f22}.modal-mask,.task-compose-mask,.habit-detail-mask,.countdown-detail-mask,.countdown-modal-mask,.app-sheet-mask.app-sheet-mask,.scrim,.more-mask{background:var(--scrim);filter:none}:focus-visible,.task-check:focus-visible,.today-track:focus-visible,.archived-lists-toggle:focus-visible,.archived-row-menu-trigger:focus-visible,.archived-row-actions button:focus-visible{outline:3px solid var(--focus-ring);outline-offset:2px}@media (width<=930px){.bottom{left:12px;right:12px;bottom:max(10px,env(safe-area-inset-bottom));background:var(--surface-raised);border:1px solid var(--border-cream);box-shadow:var(--highlight-inner),var(--shadow-raised);border-radius:20px;padding:7px 5px}.bottom button{border-radius:11px;min-height:44px}.bottom button.active{background:#fbe6dc}.sidebar{border-radius:0 var(--radius-panel) var(--radius-panel) 0}.detail,.app-sheet,.task-compose-sheet,.habit-detail-sheet,.countdown-detail-sheet,.more-sheet{border-radius:var(--sheet-radius) var(--sheet-radius) 0 0!important}.task-list,.habit-list,.countdown-timeline{gap:0;display:grid}.task-row,.habit-row,.countdown-row{background:var(--surface-raised);min-height:62px;box-shadow:none;border:0;border-radius:0}.task-row+.task-row,.habit-row+.habit-row,.countdown-row+.countdown-row{border-top:1px solid var(--border-cream)}.countdown-row:first-of-type{border-top:0}.unified-fab{bottom:calc(88px + env(safe-area-inset-bottom))}}@media (prefers-reduced-motion:reduce){*,:before,:after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important}.completed-filter-pill,.completed-filter-pill__track,.completed-filter-pill__thumb{transition:none!important}.topbar-refresh.spinning svg{animation:none!important}.completed-filter-pill:active:not(:disabled){transform:none}.task-row.just-completed,.habit-row.just-completed,.task-row.just-completed .task-check-mark,.habit-row.just-completed .task-check-mark{animation:none}}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false} diff --git a/backend/static/index.html b/backend/static/index.html index 84411a0..5695b3e 100644 --- a/backend/static/index.html +++ b/backend/static/index.html @@ -1,3 +1,3 @@ -dodo - +dodo +
    \ No newline at end of file diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 2190576..2572407 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -1300,7 +1300,7 @@ onUnmounted(() => {