t(o,f,void 0,i));else{const o=Object.keys(e);r=new Array(o.length);for(let f=0,p=o.length;fe?Wr(e)?gs(e):Fs(e.parent):null,At=ne(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=>Fs(e.parent),$root:e=>Fs(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Tr(e),$forceUpdate:e=>e.f||(e.f=()=>{Xs(e.update)}),$nextTick:e=>e.n||(e.n=$i.bind(e.proxy)),$watch:e=>Sl.bind(e)}),ws=(e,t)=>e!==K&&!e.__isScriptSetup&&V(e,t),sl={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:s,setupState:n,data:r,props:i,accessCache:l,type:o,appContext:f}=e;let p;if(t[0]!=="$"){const C=l[t];if(C!==void 0)switch(C){case 1:return n[t];case 2:return r[t];case 4:return s[t];case 3:return i[t]}else{if(ws(n,t))return l[t]=1,n[t];if(r!==K&&V(r,t))return l[t]=2,r[t];if((p=e.propsOptions[0])&&V(p,t))return l[t]=3,i[t];if(s!==K&&V(s,t))return l[t]=4,s[t];Ds&&(l[t]=0)}}const a=At[t];let m,E;if(a)return t==="$attrs"&&te(e.attrs,"get",""),a(e);if((m=o.__cssModules)&&(m=m[t]))return m;if(s!==K&&V(s,t))return l[t]=4,s[t];if(E=f.config.globalProperties,V(E,t))return E[t]},set({_:e},t,s){const{data:n,setupState:r,ctx:i}=e;return ws(r,t)?(r[t]=s,!0):n!==K&&V(n,t)?(n[t]=s,!0):V(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=s,!0)},has({_:{data:e,setupState:t,accessCache:s,ctx:n,appContext:r,propsOptions:i,type:l}},o){let f,p;return!!(s[o]||e!==K&&o[0]!=="$"&&V(e,o)||ws(t,o)||(f=i[0])&&V(f,o)||V(n,o)||V(At,o)||V(r.config.globalProperties,o)||(p=l.__cssModules)&&p[o])},defineProperty(e,t,s){return s.get!=null?e._.accessCache[t]=0:V(s,"value")&&this.set(e,t,s.value,null),Reflect.defineProperty(e,t,s)}};function pn(e){return R(e)?e.reduce((t,s)=>(t[s]=null,t),{}):e}let Ds=!0;function nl(e){const t=Tr(e),s=e.proxy,n=e.ctx;Ds=!1,t.beforeCreate&&gn(t.beforeCreate,e,"bc");const{data:r,computed:i,methods:l,watch:o,provide:f,inject:p,created:a,beforeMount:m,mounted:E,beforeUpdate:C,updated:N,activated:L,deactivated:Z,beforeDestroy:H,beforeUnmount:B,destroyed:k,unmounted:P,render:z,renderTracked:Se,renderTriggered:ge,errorCaptured:X,serverPrefetch:Ke,expose:me,inheritAttrs:Xe,components:Ee,directives:it,filters:mt}=t;if(p&&rl(p,n,null),l)for(const O in l){const d=l[O];F(d)&&(n[O]=d.bind(s))}if(r){const O=r.call(s,s);J(O)&&(e.data=us(O))}if(Ds=!0,i)for(const O in i){const d=i[O],D=F(d)?d.bind(s,s):F(d.get)?d.get.bind(s,s):Fe,ue=!F(d)&&F(d.set)?d.set.bind(s):Fe,Ze=Yt({get:D,set:ue});Object.defineProperty(n,O,{enumerable:!0,configurable:!0,get:()=>Ze.value,set:Te=>Ze.value=Te})}if(o)for(const O in o)Er(o[O],n,s,O);if(f){const O=F(f)?f.call(s):f;Reflect.ownKeys(O).forEach(d=>{ul(d,O[d])})}a&&gn(a,e,"c");function Q(O,d){R(d)?d.forEach(D=>O(D.bind(s))):d&&O(d.bind(s))}if(Q(Gi,m),Q(xr,E),Q(zi,C),Q(Yi,N),Q(qi,L),Q(ki,Z),Q(el,X),Q(Qi,Se),Q(Zi,ge),Q(wr,B),Q(Sr,P),Q(Xi,Ke),R(me))if(me.length){const O=e.exposed||(e.exposed={});me.forEach(d=>{Object.defineProperty(O,d,{get:()=>s[d],set:D=>s[d]=D,enumerable:!0})})}else e.exposed||(e.exposed={});z&&e.render===Fe&&(e.render=z),Xe!=null&&(e.inheritAttrs=Xe),Ee&&(e.components=Ee),it&&(e.directives=it),Ke&&br(e)}function rl(e,t,s=Fe){R(e)&&(e=Ns(e));for(const n in e){const r=e[n];let i;J(r)?"default"in r?i=Jt(r.from||n,r.default,!0):i=Jt(r.from||n):i=Jt(r),se(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:l=>i.value=l}):t[n]=i}}function gn(e,t,s){Ne(R(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,s)}function Er(e,t,s,n){let r=n.includes(".")?Hr(s,n):()=>s[n];if(Y(e)){const i=t[e];F(i)&&Es(r,i)}else if(F(e))Es(r,e.bind(s));else if(J(e))if(R(e))e.forEach(i=>Er(i,t,s,n));else{const i=F(e.handler)?e.handler.bind(s):t[e.handler];F(i)&&Es(r,i,e)}}function Tr(e){const t=e.type,{mixins:s,extends:n}=t,{mixins:r,optionsCache:i,config:{optionMergeStrategies:l}}=e.appContext,o=i.get(t);let f;return o?f=o:!r.length&&!s&&!n?f=t:(f={},r.length&&r.forEach(p=>ns(f,p,l,!0)),ns(f,t,l)),J(t)&&i.set(t,f),f}function ns(e,t,s,n=!1){const{mixins:r,extends:i}=t;i&&ns(e,i,s,!0),r&&r.forEach(l=>ns(e,l,s,!0));for(const l in t)if(!(n&&l==="expose")){const o=il[l]||s&&s[l];e[l]=o?o(e[l],t[l]):t[l]}return e}const il={data:mn,props:vn,emits:vn,methods:wt,computed:wt,beforeCreate:re,created:re,beforeMount:re,mounted:re,beforeUpdate:re,updated:re,beforeDestroy:re,beforeUnmount:re,destroyed:re,unmounted:re,activated:re,deactivated:re,errorCaptured:re,serverPrefetch:re,components:wt,directives:wt,watch:ol,provide:mn,inject:ll};function mn(e,t){return t?e?function(){return ne(F(e)?e.call(this,this):e,F(t)?t.call(this,this):t)}:t:e}function ll(e,t){return wt(Ns(e),Ns(t))}function Ns(e){if(R(e)){const t={};for(let s=0;s1)return s&&F(t)?t.call(n&&n.proxy):t}}const Or={},Ar=()=>Object.create(Or),Pr=e=>Object.getPrototypeOf(e)===Or;function al(e,t,s,n=!1){const r={},i=Ar();e.propsDefaults=Object.create(null),Ir(e,t,r,i);for(const l in e.propsOptions[0])l in r||(r[l]=void 0);s?e.props=n?r:Oi(r):e.type.props?e.props=r:e.props=i,e.attrs=i}function dl(e,t,s,n){const{props:r,attrs:i,vnode:{patchFlag:l}}=e,o=j(r),[f]=e.propsOptions;let p=!1;if((n||l>0)&&!(l&16)){if(l&8){const a=e.vnode.dynamicProps;for(let m=0;m{f=!0;const[E,C]=Mr(m,t,!0);ne(l,E),C&&o.push(...C)};!s&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}if(!i&&!f)return J(e)&&n.set(e,ut),ut;if(R(i))for(let a=0;ae==="_"||e==="_ctx"||e==="$stable",en=e=>R(e)?e.map(Re):[Re(e)],pl=(e,t,s)=>{if(t._n)return t;const n=Vi((...r)=>en(t(...r)),s);return n._c=!1,n},Rr=(e,t,s)=>{const n=e._ctx;for(const r in e){if(Qs(r))continue;const i=e[r];if(F(i))t[r]=pl(r,i,n);else if(i!=null){const l=en(i);t[r]=()=>l}}},Fr=(e,t)=>{const s=en(t);e.slots.default=()=>s},Dr=(e,t,s)=>{for(const n in t)(s||!Qs(n))&&(e[n]=t[n])},gl=(e,t,s)=>{const n=e.slots=Ar();if(e.vnode.shapeFlag&32){const r=t._;r?(Dr(n,t,s),s&&kn(n,"_",r,!0)):Rr(t,n)}else t&&Fr(e,t)},ml=(e,t,s)=>{const{vnode:n,slots:r}=e;let i=!0,l=K;if(n.shapeFlag&32){const o=t._;o?s&&o===1?i=!1:Dr(r,t,s):(i=!t.$stable,Rr(t,r)),l=t}else t&&(Fr(e,t),l={default:1});if(i)for(const o in r)!Qs(o)&&l[o]==null&&delete r[o]},de=Ml;function vl(e){return bl(e)}function bl(e,t){const s=cs();s.__VUE__=!0;const{insert:n,remove:r,patchProp:i,createElement:l,createText:o,createComment:f,setText:p,setElementText:a,parentNode:m,nextSibling:E,setScopeId:C=Fe,insertStaticContent:N}=e,L=(c,u,h,_=null,v=null,b=null,S=void 0,w=null,x=!!u.dynamicChildren)=>{if(c===u)return;c&&!xt(c,u)&&(_=Ht(c),Te(c,v,b,!0),c=null),u.patchFlag===-2&&(x=!1,u.dynamicChildren=null);const{type:y,ref:I,shapeFlag:T}=u;switch(y){case ps:Z(c,u,h,_);break;case ze:H(c,u,h,_);break;case Gt:c==null&&B(u,h,_,S);break;case he:Ee(c,u,h,_,v,b,S,w,x);break;default:T&1?z(c,u,h,_,v,b,S,w,x):T&6?it(c,u,h,_,v,b,S,w,x):(T&64||T&128)&&y.process(c,u,h,_,v,b,S,w,x,bt)}I!=null&&v?Ct(I,c&&c.ref,b,u||c,!u):I==null&&c&&c.ref!=null&&Ct(c.ref,null,b,c,!0)},Z=(c,u,h,_)=>{if(c==null)n(u.el=o(u.children),h,_);else{const v=u.el=c.el;u.children!==c.children&&p(v,u.children)}},H=(c,u,h,_)=>{c==null?n(u.el=f(u.children||""),h,_):u.el=c.el},B=(c,u,h,_)=>{[c.el,c.anchor]=N(c.children,u,h,_,c.el,c.anchor)},k=({el:c,anchor:u},h,_)=>{let v;for(;c&&c!==u;)v=E(c),n(c,h,_),c=v;n(u,h,_)},P=({el:c,anchor:u})=>{let h;for(;c&&c!==u;)h=E(c),r(c),c=h;r(u)},z=(c,u,h,_,v,b,S,w,x)=>{u.type==="svg"?S="svg":u.type==="math"&&(S="mathml"),c==null?Se(u,h,_,v,b,S,w,x):Ke(c,u,v,b,S,w,x)},Se=(c,u,h,_,v,b,S,w)=>{let x,y;const{props:I,shapeFlag:T,transition:A,dirs:M}=c;if(x=c.el=l(c.type,b,I&&I.is,I),T&8?a(x,c.children):T&16&&X(c.children,x,null,_,v,Ss(c,b),S,w),M&&Qe(c,null,_,"created"),ge(x,c,c.scopeId,S,_),I){for(const W in I)W!=="value"&&!St(W)&&i(x,W,null,I[W],b,_);"value"in I&&i(x,"value",null,I.value,b),(y=I.onVnodeBeforeMount)&&Pe(y,_,c)}M&&Qe(c,null,_,"beforeMount");const $=_l(v,A);$&&A.beforeEnter(x),n(x,u,h),((y=I&&I.onVnodeMounted)||$||M)&&de(()=>{y&&Pe(y,_,c),$&&A.enter(x),M&&Qe(c,null,_,"mounted")},v)},ge=(c,u,h,_,v)=>{if(h&&C(c,h),_)for(let b=0;b<_.length;b++)C(c,_[b]);if(v){let b=v.subTree;if(u===b||Vr(b.type)&&(b.ssContent===u||b.ssFallback===u)){const S=v.vnode;ge(c,S,S.scopeId,S.slotScopeIds,v.parent)}}},X=(c,u,h,_,v,b,S,w,x=0)=>{for(let y=x;y{const w=u.el=c.el;let{patchFlag:x,dynamicChildren:y,dirs:I}=u;x|=c.patchFlag&16;const T=c.props||K,A=u.props||K;let M;if(h&&et(h,!1),(M=A.onVnodeBeforeUpdate)&&Pe(M,h,u,c),I&&Qe(u,c,h,"beforeUpdate"),h&&et(h,!0),(T.innerHTML&&A.innerHTML==null||T.textContent&&A.textContent==null)&&a(w,""),y?me(c.dynamicChildren,y,w,h,_,Ss(u,v),b):S||d(c,u,w,null,h,_,Ss(u,v),b,!1),x>0){if(x&16)Xe(w,T,A,h,v);else if(x&2&&T.class!==A.class&&i(w,"class",null,A.class,v),x&4&&i(w,"style",T.style,A.style,v),x&8){const $=u.dynamicProps;for(let W=0;W<$.length;W++){const U=$[W],oe=T[U],ce=A[U];(ce!==oe||U==="value")&&i(w,U,oe,ce,v,h)}}x&1&&c.children!==u.children&&a(w,u.children)}else!S&&y==null&&Xe(w,T,A,h,v);((M=A.onVnodeUpdated)||I)&&de(()=>{M&&Pe(M,h,u,c),I&&Qe(u,c,h,"updated")},_)},me=(c,u,h,_,v,b,S)=>{for(let w=0;w{if(u!==h){if(u!==K)for(const b in u)!St(b)&&!(b in h)&&i(c,b,u[b],null,v,_);for(const b in h){if(St(b))continue;const S=h[b],w=u[b];S!==w&&b!=="value"&&i(c,b,w,S,v,_)}"value"in h&&i(c,"value",u.value,h.value,v)}},Ee=(c,u,h,_,v,b,S,w,x)=>{const y=u.el=c?c.el:o(""),I=u.anchor=c?c.anchor:o("");let{patchFlag:T,dynamicChildren:A,slotScopeIds:M}=u;M&&(w=w?w.concat(M):M),c==null?(n(y,h,_),n(I,h,_),X(u.children||[],h,I,v,b,S,w,x)):T>0&&T&64&&A&&c.dynamicChildren?(me(c.dynamicChildren,A,h,v,b,S,w),(u.key!=null||v&&u===v.subTree)&&Nr(c,u,!0)):d(c,u,h,I,v,b,S,w,x)},it=(c,u,h,_,v,b,S,w,x)=>{u.slotScopeIds=w,c==null?u.shapeFlag&512?v.ctx.activate(u,h,_,S,x):mt(u,h,_,v,b,S,x):$t(c,u,x)},mt=(c,u,h,_,v,b,S)=>{const w=c.component=Vl(c,_,v);if(_r(c)&&(w.ctx.renderer=bt),Bl(w,!1,S),w.asyncDep){if(v&&v.registerDep(w,Q,S),!c.el){const x=w.subTree=De(ze);H(null,x,u,h),c.placeholder=x.el}}else Q(w,c,u,h,v,b,S)},$t=(c,u,h)=>{const _=u.component=c.component;if(Pl(c,u,h))if(_.asyncDep&&!_.asyncResolved){O(_,u,h);return}else _.next=u,_.update();else u.el=c.el,_.vnode=u},Q=(c,u,h,_,v,b,S)=>{const w=()=>{if(c.isMounted){let{next:T,bu:A,u:M,parent:$,vnode:W}=c;{const Oe=Lr(c);if(Oe){T&&(T.el=W.el,O(c,T,S)),Oe.asyncDep.then(()=>{c.isUnmounted||w()});return}}let U=T,oe;et(c,!1),T?(T.el=W.el,O(c,T,S)):T=W,A&&kt(A),(oe=T.props&&T.props.onVnodeBeforeUpdate)&&Pe(oe,$,T,W),et(c,!0);const ce=yn(c),Ce=c.subTree;c.subTree=ce,L(Ce,ce,m(Ce.el),Ht(Ce),c,v,b),T.el=ce.el,U===null&&Il(c,ce.el),M&&de(M,v),(oe=T.props&&T.props.onVnodeUpdated)&&de(()=>Pe(oe,$,T,W),v)}else{let T;const{el:A,props:M}=u,{bm:$,m:W,parent:U,root:oe,type:ce}=c,Ce=Ot(u);et(c,!1),$&&kt($),!Ce&&(T=M&&M.onVnodeBeforeMount)&&Pe(T,U,u),et(c,!0);{oe.ce&&oe.ce._def.shadowRoot!==!1&&oe.ce._injectChildStyle(ce);const Oe=c.subTree=yn(c);L(null,Oe,h,_,c,v,b),u.el=Oe.el}if(W&&de(W,v),!Ce&&(T=M&&M.onVnodeMounted)){const Oe=u;de(()=>Pe(T,U,Oe),v)}(u.shapeFlag&256||U&&Ot(U.vnode)&&U.vnode.shapeFlag&256)&&c.a&&de(c.a,v),c.isMounted=!0,u=h=_=null}};c.scope.on();const x=c.effect=new Yn(w);c.scope.off();const y=c.update=x.run.bind(x),I=c.job=x.runIfDirty.bind(x);I.i=c,I.id=c.uid,x.scheduler=()=>Xs(I),et(c,!0),y()},O=(c,u,h)=>{u.component=c;const _=c.vnode.props;c.vnode=u,c.next=null,dl(c,u.props,_,h),ml(c,u.children,h),Ve(),an(c),Ue()},d=(c,u,h,_,v,b,S,w,x=!1)=>{const y=c&&c.children,I=c?c.shapeFlag:0,T=u.children,{patchFlag:A,shapeFlag:M}=u;if(A>0){if(A&128){ue(y,T,h,_,v,b,S,w,x);return}else if(A&256){D(y,T,h,_,v,b,S,w,x);return}}M&8?(I&16&&vt(y,v,b),T!==y&&a(h,T)):I&16?M&16?ue(y,T,h,_,v,b,S,w,x):vt(y,v,b,!0):(I&8&&a(h,""),M&16&&X(T,h,_,v,b,S,w,x))},D=(c,u,h,_,v,b,S,w,x)=>{c=c||ut,u=u||ut;const y=c.length,I=u.length,T=Math.min(y,I);let A;for(A=0;AI?vt(c,v,b,!0,!1,T):X(u,h,_,v,b,S,w,x,T)},ue=(c,u,h,_,v,b,S,w,x)=>{let y=0;const I=u.length;let T=c.length-1,A=I-1;for(;y<=T&&y<=A;){const M=c[y],$=u[y]=x?qe(u[y]):Re(u[y]);if(xt(M,$))L(M,$,h,null,v,b,S,w,x);else break;y++}for(;y<=T&&y<=A;){const M=c[T],$=u[A]=x?qe(u[A]):Re(u[A]);if(xt(M,$))L(M,$,h,null,v,b,S,w,x);else break;T--,A--}if(y>T){if(y<=A){const M=A+1,$=MA)for(;y<=T;)Te(c[y],v,b,!0),y++;else{const M=y,$=y,W=new Map;for(y=$;y<=A;y++){const ae=u[y]=x?qe(u[y]):Re(u[y]);ae.key!=null&&W.set(ae.key,y)}let U,oe=0;const ce=A-$+1;let Ce=!1,Oe=0;const _t=new Array(ce);for(y=0;y=ce){Te(ae,v,b,!0);continue}let Ae;if(ae.key!=null)Ae=W.get(ae.key);else for(U=$;U<=A;U++)if(_t[U-$]===0&&xt(ae,u[U])){Ae=U;break}Ae===void 0?Te(ae,v,b,!0):(_t[Ae-$]=y+1,Ae>=Oe?Oe=Ae:Ce=!0,L(ae,u[Ae],h,null,v,b,S,w,x),oe++)}const rn=Ce?yl(_t):ut;for(U=rn.length-1,y=ce-1;y>=0;y--){const ae=$+y,Ae=u[ae],ln=u[ae+1],on=ae+1{const{el:b,type:S,transition:w,children:x,shapeFlag:y}=c;if(y&6){Ze(c.component.subTree,u,h,_);return}if(y&128){c.suspense.move(u,h,_);return}if(y&64){S.move(c,u,h,bt);return}if(S===he){n(b,u,h);for(let T=0;Tw.enter(b),v);else{const{leave:T,delayLeave:A,afterLeave:M}=w,$=()=>{c.ctx.isUnmounted?r(b):n(b,u,h)},W=()=>{b._isLeaving&&b[Ki](!0),T(b,()=>{$(),M&&M()})};A?A(b,$,W):W()}else n(b,u,h)},Te=(c,u,h,_=!1,v=!1)=>{const{type:b,props:S,ref:w,children:x,dynamicChildren:y,shapeFlag:I,patchFlag:T,dirs:A,cacheIndex:M}=c;if(T===-2&&(v=!1),w!=null&&(Ve(),Ct(w,null,h,c,!0),Ue()),M!=null&&(u.renderCache[M]=void 0),I&256){u.ctx.deactivate(c);return}const $=I&1&&A,W=!Ot(c);let U;if(W&&(U=S&&S.onVnodeBeforeUnmount)&&Pe(U,u,c),I&6)Gr(c.component,h,_);else{if(I&128){c.suspense.unmount(h,_);return}$&&Qe(c,null,u,"beforeUnmount"),I&64?c.type.remove(c,u,h,bt,_):y&&!y.hasOnce&&(b!==he||T>0&&T&64)?vt(y,u,h,!1,!0):(b===he&&T&384||!v&&I&16)&&vt(x,u,h),_&&sn(c)}(W&&(U=S&&S.onVnodeUnmounted)||$)&&de(()=>{U&&Pe(U,u,c),$&&Qe(c,null,u,"unmounted")},h)},sn=c=>{const{type:u,el:h,anchor:_,transition:v}=c;if(u===he){Jr(h,_);return}if(u===Gt){P(c);return}const b=()=>{r(h),v&&!v.persisted&&v.afterLeave&&v.afterLeave()};if(c.shapeFlag&1&&v&&!v.persisted){const{leave:S,delayLeave:w}=v,x=()=>S(h,b);w?w(c.el,b,x):x()}else b()},Jr=(c,u)=>{let h;for(;c!==u;)h=E(c),r(c),c=h;r(u)},Gr=(c,u,h)=>{const{bum:_,scope:v,job:b,subTree:S,um:w,m:x,a:y}=c;_n(x),_n(y),_&&kt(_),v.stop(),b&&(b.flags|=8,Te(S,c,u,h)),w&&de(w,u),de(()=>{c.isUnmounted=!0},u)},vt=(c,u,h,_=!1,v=!1,b=0)=>{for(let S=b;S{if(c.shapeFlag&6)return Ht(c.component.subTree);if(c.shapeFlag&128)return c.suspense.next();const u=E(c.anchor||c.el),h=u&&u[Ui];return h?E(h):u};let ms=!1;const nn=(c,u,h)=>{c==null?u._vnode&&Te(u._vnode,null,null,!0):L(u._vnode||null,c,u,null,null,null,h),u._vnode=c,ms||(ms=!0,an(),gr(),ms=!1)},bt={p:L,um:Te,m:Ze,r:sn,mt,mc:X,pc:d,pbc:me,n:Ht,o:e};return{render:nn,hydrate:void 0,createApp:fl(nn)}}function Ss({type:e,props:t},s){return s==="svg"&&e==="foreignObject"||s==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:s}function et({effect:e,job:t},s){s?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function _l(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Nr(e,t,s=!1){const n=e.children,r=t.children;if(R(n)&&R(r))for(let i=0;i>1,e[s[o]]0&&(t[n]=s[i-1]),s[i]=n)}}for(i=s.length,l=s[i-1];i-- >0;)s[i]=l,l=t[l];return s}function Lr(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Lr(t)}function _n(e){if(e)for(let t=0;tJt(xl);function Es(e,t,s){return $r(e,t,s)}function $r(e,t,s=K){const{immediate:n,deep:r,flush:i,once:l}=s,o=ne({},s),f=t&&n||!t&&i!=="post";let p;if(Dt){if(i==="sync"){const C=wl();p=C.__watcherHandles||(C.__watcherHandles=[])}else if(!f){const C=()=>{};return C.stop=Fe,C.resume=Fe,C.pause=Fe,C}}const a=le;o.call=(C,N,L)=>Ne(C,a,N,L);let m=!1;i==="post"?o.scheduler=C=>{de(C,a&&a.suspense)}:i!=="sync"&&(m=!0,o.scheduler=(C,N)=>{N?C():Xs(C)}),o.augmentJob=C=>{t&&(C.flags|=4),m&&(C.flags|=2,a&&(C.id=a.uid,C.i=a))};const E=Ni(e,t,o);return Dt&&(p?p.push(E):f&&E()),E}function Sl(e,t,s){const n=this.proxy,r=Y(e)?e.includes(".")?Hr(n,e):()=>n[e]:e.bind(n,n);let i;F(t)?i=t:(i=t.handler,s=t);const l=Lt(this),o=$r(r,i.bind(n),s);return l(),o}function Hr(e,t){const s=t.split(".");return()=>{let n=e;for(let r=0;rt==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Je(t)}Modifiers`]||e[`${rt(t)}Modifiers`];function Tl(e,t,...s){if(e.isUnmounted)return;const n=e.vnode.props||K;let r=s;const i=t.startsWith("update:"),l=i&&El(n,t.slice(7));l&&(l.trim&&(r=s.map(a=>Y(a)?a.trim():a)),l.number&&(r=s.map(As)));let o,f=n[o=vs(t)]||n[o=vs(Je(t))];!f&&i&&(f=n[o=vs(rt(t))]),f&&Ne(f,e,6,r);const p=n[o+"Once"];if(p){if(!e.emitted)e.emitted={};else if(e.emitted[o])return;e.emitted[o]=!0,Ne(p,e,6,r)}}const Cl=new WeakMap;function jr(e,t,s=!1){const n=s?Cl:t.emitsCache,r=n.get(e);if(r!==void 0)return r;const i=e.emits;let l={},o=!1;if(!F(e)){const f=p=>{const a=jr(p,t,!0);a&&(o=!0,ne(l,a))};!s&&t.mixins.length&&t.mixins.forEach(f),e.extends&&f(e.extends),e.mixins&&e.mixins.forEach(f)}return!i&&!o?(J(e)&&n.set(e,null),null):(R(i)?i.forEach(f=>l[f]=null):ne(l,i),J(e)&&n.set(e,l),l)}function hs(e,t){return!e||!is(t)?!1:(t=t.slice(2).replace(/Once$/,""),V(e,t[0].toLowerCase()+t.slice(1))||V(e,rt(t))||V(e,t))}function yn(e){const{type:t,vnode:s,proxy:n,withProxy:r,propsOptions:[i],slots:l,attrs:o,emit:f,render:p,renderCache:a,props:m,data:E,setupState:C,ctx:N,inheritAttrs:L}=e,Z=ts(e);let H,B;try{if(s.shapeFlag&4){const P=r||n,z=P;H=Re(p.call(z,P,a,m,C,E,N)),B=o}else{const P=t;H=Re(P.length>1?P(m,{attrs:o,slots:l,emit:f}):P(m,null)),B=t.props?o:Ol(o)}}catch(P){Pt.length=0,as(P,e,1),H=De(ze)}let k=H;if(B&&L!==!1){const P=Object.keys(B),{shapeFlag:z}=k;P.length&&z&7&&(i&&P.some(Vs)&&(B=Al(B,i)),k=gt(k,B,!1,!0))}return s.dirs&&(k=gt(k,null,!1,!0),k.dirs=k.dirs?k.dirs.concat(s.dirs):s.dirs),s.transition&&Zs(k,s.transition),H=k,ts(Z),H}const Ol=e=>{let t;for(const s in e)(s==="class"||s==="style"||is(s))&&((t||(t={}))[s]=e[s]);return t},Al=(e,t)=>{const s={};for(const n in e)(!Vs(n)||!(n.slice(9)in t))&&(s[n]=e[n]);return s};function Pl(e,t,s){const{props:n,children:r,component:i}=e,{props:l,children:o,patchFlag:f}=t,p=i.emitsOptions;if(t.dirs||t.transition)return!0;if(s&&f>=0){if(f&1024)return!0;if(f&16)return n?xn(n,l,p):!!l;if(f&8){const a=t.dynamicProps;for(let m=0;me.__isSuspense;function Ml(e,t){t&&t.pendingBranch?R(e)?t.effects.push(...e):t.effects.push(e):ji(e)}const he=Symbol.for("v-fgt"),ps=Symbol.for("v-txt"),ze=Symbol.for("v-cmt"),Gt=Symbol.for("v-stc"),Pt=[];let pe=null;function be(e=!1){Pt.push(pe=e?null:[])}function Rl(){Pt.pop(),pe=Pt[Pt.length-1]||null}let Ft=1;function wn(e,t=!1){Ft+=e,e<0&&pe&&t&&(pe.hasOnce=!0)}function Ur(e){return e.dynamicChildren=Ft>0?pe||ut:null,Rl(),Ft>0&&pe&&pe.push(e),e}function xe(e,t,s,n,r,i){return Ur(g(e,t,s,n,r,i,!0))}function Fl(e,t,s,n,r){return Ur(De(e,t,s,n,r,!0))}function Br(e){return e?e.__v_isVNode===!0:!1}function xt(e,t){return e.type===t.type&&e.key===t.key}const Kr=({key:e})=>e??null,zt=({ref:e,ref_key:t,ref_for:s})=>(typeof e=="number"&&(e=""+e),e!=null?Y(e)||se(e)||F(e)?{i:_e,r:e,k:t,f:!!s}:e:null);function g(e,t=null,s=null,n=0,r=null,i=e===he?0:1,l=!1,o=!1){const f={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Kr(t),ref:t&&zt(t),scopeId:vr,slotScopeIds:null,children:s,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:n,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:_e};return o?(tn(f,s),i&128&&e.normalize(f)):s&&(f.shapeFlag|=Y(s)?8:16),Ft>0&&!l&&pe&&(f.patchFlag>0||i&6)&&f.patchFlag!==32&&pe.push(f),f}const De=Dl;function Dl(e,t=null,s=null,n=0,r=null,i=!1){if((!e||e===tl)&&(e=ze),Br(e)){const o=gt(e,t,!0);return s&&tn(o,s),Ft>0&&!i&&pe&&(o.shapeFlag&6?pe[pe.indexOf(e)]=o:pe.push(o)),o.patchFlag=-2,o}if(kl(e)&&(e=e.__vccOpts),t){t=Nl(t);let{class:o,style:f}=t;o&&!Y(o)&&(t.class=st(o)),J(f)&&(Ys(f)&&!R(f)&&(f=ne({},f)),t.style=Ks(f))}const l=Y(e)?1:Vr(e)?128:Bi(e)?64:J(e)?4:F(e)?2:0;return g(e,t,s,n,r,l,i,!0)}function Nl(e){return e?Ys(e)||Pr(e)?ne({},e):e:null}function gt(e,t,s=!1,n=!1){const{props:r,ref:i,patchFlag:l,children:o,transition:f}=e,p=t?$l(r||{},t):r,a={__v_isVNode:!0,__v_skip:!0,type:e.type,props:p,key:p&&Kr(p),ref:t&&t.ref?s&&i?R(i)?i.concat(zt(t)):[i,zt(t)]:zt(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:o,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==he?l===-1?16:l|16:l,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:f,component:e.component,suspense:e.suspense,ssContent:e.ssContent&>(e.ssContent),ssFallback:e.ssFallback&>(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return f&&n&&Zs(a,f.clone(a)),a}function Ie(e=" ",t=0){return De(ps,null,e,t)}function Ll(e,t){const s=De(Gt,null,e);return s.staticCount=t,s}function Wt(e="",t=!1){return t?(be(),Fl(ze,null,e)):De(ze,null,e)}function Re(e){return e==null||typeof e=="boolean"?De(ze):R(e)?De(he,null,e.slice()):Br(e)?qe(e):De(ps,null,String(e))}function qe(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:gt(e)}function tn(e,t){let s=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(R(t))s=16;else if(typeof t=="object")if(n&65){const r=t.default;r&&(r._c&&(r._d=!1),tn(e,r()),r._c&&(r._d=!0));return}else{s=32;const r=t._;!r&&!Pr(t)?t._ctx=_e:r===3&&_e&&(_e.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else F(t)?(t={default:t,_ctx:_e},s=32):(t=String(t),n&64?(s=16,t=[Ie(t)]):s=8);e.children=t,e.shapeFlag|=s}function $l(...e){const t={};for(let s=0;sle||_e;let rs,$s;{const e=cs(),t=(s,n)=>{let r;return(r=e[s])||(r=e[s]=[]),r.push(n),i=>{r.length>1?r.forEach(l=>l(i)):r[0](i)}};rs=t("__VUE_INSTANCE_SETTERS__",s=>le=s),$s=t("__VUE_SSR_SETTERS__",s=>Dt=s)}const Lt=e=>{const t=le;return rs(e),e.scope.on(),()=>{e.scope.off(),rs(t)}},Sn=()=>{le&&le.scope.off(),rs(null)};function Wr(e){return e.vnode.shapeFlag&4}let Dt=!1;function Bl(e,t=!1,s=!1){t&&$s(t);const{props:n,children:r}=e.vnode,i=Wr(e);al(e,n,i,t),gl(e,r,s||t);const l=i?Kl(e,t):void 0;return t&&$s(!1),l}function Kl(e,t){const s=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,sl);const{setup:n}=s;if(n){Ve();const r=e.setupContext=n.length>1?ql(e):null,i=Lt(e),l=Nt(n,e,0,[e.props,r]),o=Bn(l);if(Ue(),i(),(o||e.sp)&&!Ot(e)&&br(e),o){if(l.then(Sn,Sn),t)return l.then(f=>{En(e,f)}).catch(f=>{as(f,e,0)});e.asyncDep=l}else En(e,l)}else qr(e)}function En(e,t,s){F(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:J(t)&&(e.setupState=dr(t)),qr(e)}function qr(e,t,s){const n=e.type;e.render||(e.render=n.render||Fe);{const r=Lt(e);Ve();try{nl(e)}finally{Ue(),r()}}}const Wl={get(e,t){return te(e,"get",""),e[t]}};function ql(e){const t=s=>{e.exposed=s||{}};return{attrs:new Proxy(e.attrs,Wl),slots:e.slots,emit:e.emit,expose:t}}function gs(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(dr(Ai(e.exposed)),{get(t,s){if(s in t)return t[s];if(s in At)return At[s](e)},has(t,s){return s in t||s in At}})):e.proxy}function kl(e){return F(e)&&"__vccOpts"in e}const Yt=(e,t)=>Fi(e,t,Dt),Jl="3.5.21";/**
+* @vue/runtime-dom v3.5.21
+* (c) 2018-present Yuxi (Evan) You and Vue contributors
+* @license MIT
+**/let Hs;const Tn=typeof window<"u"&&window.trustedTypes;if(Tn)try{Hs=Tn.createPolicy("vue",{createHTML:e=>e})}catch{}const kr=Hs?e=>Hs.createHTML(e):e=>e,Gl="http://www.w3.org/2000/svg",zl="http://www.w3.org/1998/Math/MathML",$e=typeof document<"u"?document:null,Cn=$e&&$e.createElement("template"),Yl={insert:(e,t,s)=>{t.insertBefore(e,s||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,s,n)=>{const r=t==="svg"?$e.createElementNS(Gl,e):t==="mathml"?$e.createElementNS(zl,e):s?$e.createElement(e,{is:s}):$e.createElement(e);return e==="select"&&n&&n.multiple!=null&&r.setAttribute("multiple",n.multiple),r},createText:e=>$e.createTextNode(e),createComment:e=>$e.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>$e.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,s,n,r,i){const l=s?s.previousSibling:t.lastChild;if(r&&(r===i||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),s),!(r===i||!(r=r.nextSibling)););else{Cn.innerHTML=kr(n==="svg"?``:n==="mathml"?``:e);const o=Cn.content;if(n==="svg"||n==="mathml"){const f=o.firstChild;for(;f.firstChild;)o.appendChild(f.firstChild);o.removeChild(f)}t.insertBefore(o,s)}return[l?l.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}},Xl=Symbol("_vtc");function Zl(e,t,s){const n=e[Xl];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}const On=Symbol("_vod"),Ql=Symbol("_vsh"),eo=Symbol(""),to=/(?:^|;)\s*display\s*:/;function so(e,t,s){const n=e.style,r=Y(s);let i=!1;if(s&&!r){if(t)if(Y(t))for(const l of t.split(";")){const o=l.slice(0,l.indexOf(":")).trim();s[o]==null&&Xt(n,o,"")}else for(const l in t)s[l]==null&&Xt(n,l,"");for(const l in s)l==="display"&&(i=!0),Xt(n,l,s[l])}else if(r){if(t!==s){const l=n[eo];l&&(s+=";"+l),n.cssText=s,i=to.test(s)}}else t&&e.removeAttribute("style");On in e&&(e[On]=i?n.display:"",e[Ql]&&(n.display="none"))}const An=/\s*!important$/;function Xt(e,t,s){if(R(s))s.forEach(n=>Xt(e,t,n));else if(s==null&&(s=""),t.startsWith("--"))e.setProperty(t,s);else{const n=no(e,t);An.test(s)?e.setProperty(rt(n),s.replace(An,""),"important"):e[n]=s}}const Pn=["Webkit","Moz","ms"],Ts={};function no(e,t){const s=Ts[t];if(s)return s;let n=Je(t);if(n!=="filter"&&n in e)return Ts[t]=n;n=qn(n);for(let r=0;rCs||(oo.then(()=>Cs=0),Cs=Date.now());function fo(e,t){const s=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=s.attached)return;Ne(uo(n,s.value),t,5,[n])};return s.value=e,s.attached=co(),s}function uo(e,t){if(R(t)){const s=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{s.call(e),e._stopped=!0},t.map(n=>r=>!r._stopped&&n&&n(r))}else return t}const Nn=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,ao=(e,t,s,n,r,i)=>{const l=r==="svg";t==="class"?Zl(e,n,l):t==="style"?so(e,s,n):is(t)?Vs(t)||io(e,t,s,n,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):ho(e,t,n,l))?(Rn(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Mn(e,t,n,l,i,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!Y(n))?Rn(e,Je(t),n,i,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),Mn(e,t,n,l))};function ho(e,t,s,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&Nn(t)&&F(s));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return Nn(t)&&Y(s)?!1:t in e}const Ln=e=>{const t=e.props["onUpdate:modelValue"]||!1;return R(t)?s=>kt(t,s):t};function po(e){e.target.composing=!0}function $n(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Os=Symbol("_assign"),qt={created(e,{modifiers:{lazy:t,trim:s,number:n}},r){e[Os]=Ln(r);const i=n||r.props&&r.props.type==="number";ft(e,t?"change":"input",l=>{if(l.target.composing)return;let o=e.value;s&&(o=o.trim()),i&&(o=As(o)),e[Os](o)}),s&&ft(e,"change",()=>{e.value=e.value.trim()}),t||(ft(e,"compositionstart",po),ft(e,"compositionend",$n),ft(e,"change",$n))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:s,modifiers:{lazy:n,trim:r,number:i}},l){if(e[Os]=Ln(l),e.composing)return;const o=(i||e.type==="number")&&!/^0\d/.test(e.value)?As(e.value):e.value,f=t??"";o!==f&&(document.activeElement===e&&e.type!=="range"&&(n&&t===s||r&&e.value.trim()===f)||(e.value=f))}},go=["ctrl","shift","alt","meta"],mo={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)=>go.some(s=>e[`${s}Key`]&&!t.includes(s))},Hn=(e,t)=>{const s=e._withMods||(e._withMods={}),n=t.join(".");return s[n]||(s[n]=(r,...i)=>{for(let l=0;l{const t=bo().createApp(...e),{mount:s}=t;return t.mount=n=>{const r=xo(n);if(!r)return;const i=t._component;!F(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const l=s(r,!1,yo(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),l},t};function yo(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function xo(e){return Y(e)?document.querySelector(e):e}async function ot(e){try{return await e.json()}catch{return null}}class wo{constructor(){jt(this,"access","");jt(this,"refresh","");jt(this,"deviceId","")}get signedIn(){return!!this.access}async raw(t,s={},n=!0){const r=new Headers(s.headers);return s.body&&!r.has("Content-Type")&&r.set("Content-Type","application/json"),n&&this.access&&r.set("Authorization",`Bearer ${this.access}`),fetch(t,{...s,headers:r,cache:"no-store",credentials:"same-origin"})}async rotate(){if(!this.refresh)return!1;const t=await this.raw("/sync/v1/auth/refresh",{method:"POST",body:JSON.stringify({refresh_token:this.refresh})},!1);if(!t.ok)return!1;const s=await ot(t);return s?(this.accept(s),!0):!1}async request(t,s={},n=!0){var l;let r=await this.raw(t,s);if(r.status===401&&n&&await this.rotate()&&(r=await this.raw(t,s)),!r.ok){const o=await ot(r);throw r.status===401&&this.clear(),new Error(((l=o==null?void 0:o.error)==null?void 0:l.code)??`HTTP_${r.status}`)}if(r.status===204)return;const i=await ot(r);if(i===null)throw new Error("INVALID_RESPONSE");return i}accept(t){this.access=t.access_token,this.refresh=t.refresh_token,this.deviceId=t.device_id}async status(){const[t,s,n]=await Promise.allSettled([this.raw("/health",{},!1),this.raw("/ready",{},!1),this.raw("/sync/v1/handshake?protocol=1",{},!1)]);let r=1,i=100*1024*1024;if(n.status==="fulfilled"&&n.value.ok){const l=await ot(n.value);r=(l==null?void 0:l.protocol)??r,i=(l==null?void 0:l.max_object_size)??i}return{health:t.status==="fulfilled"&&t.value.ok,ready:s.status==="fulfilled"&&s.value.ok,protocol:r,maxObjectSize:i}}async login(t,s,n){var l;const r=await this.raw("/sync/v1/auth/sessions",{method:"POST",body:JSON.stringify({username:t,password:s,device_name:n})},!1);if(!r.ok){const o=await ot(r);throw new Error(((l=o==null?void 0:o.error)==null?void 0:l.code)??`HTTP_${r.status}`)}const i=await ot(r);if(!i)throw new Error("INVALID_RESPONSE");this.accept(i)}vaults(){return this.request("/sync/v1/vaults")}devices(){return this.request("/sync/v1/devices")}createVault(t){return this.request("/sync/v1/vaults",{method:"POST",body:JSON.stringify({name:t})})}revokeDevice(t){return this.request(`/sync/v1/devices/${encodeURIComponent(t)}`,{method:"DELETE"})}async logout(){try{this.access&&await this.request("/sync/v1/auth/sessions",{method:"DELETE"},!1)}finally{this.clear()}}clear(){this.access="",this.refresh="",this.deviceId=""}}const So={class:"topbar"},Eo={class:"service-strip","aria-label":"服务状态"},To=["disabled"],Co={key:0,class:"hero"},Oo={class:"hero-copy"},Ao={class:"protocol-grid","aria-label":"协议能力"},Po={class:"login-card","aria-labelledby":"login-title"},Io=["disabled"],Mo={key:1,class:"console-view"},Ro={class:"console-heading"},Fo=["disabled"],Do={class:"metric-grid"},No={class:"content-grid"},Lo={class:"surface"},$o={class:"surface-heading"},Ho=["disabled"],jo=["disabled"],Vo={class:"vault-list"},Uo={key:0,class:"empty-state"},Bo={class:"item-copy"},Ko=["value"],Wo={class:"item-side"},qo={class:"surface"},ko={class:"device-list"},Jo={class:"device-symbol"},Go={class:"item-copy"},zo=["disabled","onClick"],Yo=Wi({__name:"App",setup(e){const t=new wo,s=us({health:!1,ready:!1,protocol:1,maxObjectSize:100*1024*1024}),n=ve(!0),r=ve(!1),i=ve(!1),l=ve(""),o=ve(""),f=ve("OpenNexus Web Console"),p=ve(""),a=ve(""),m=ve([]),E=ve([]),C=ve(""),N=ve(!1);let L,Z;const H=Yt(()=>m.value.reduce((O,d)=>O+Number(d.used||0),0)),B=Yt(()=>m.value.reduce((O,d)=>O+Number(d.quota||0),0)),k=Yt(()=>E.value.filter(O=>!O.revoked).length);function P(O){const d=["B","KiB","MiB","GiB","TiB"];let D=Number(O)||0,ue=0;for(;D>=1024&&ue=10||ue===0?D.toFixed(0):D.toFixed(1)} ${d[ue]}`}function z(O){return`${O.slice(0,12)}…`}function Se(O){return Math.min(100,O.quota?O.used/O.quota*100:0)}function ge(O,d){return O.trim().slice(0,1).toUpperCase()||d}function X(O,d=!1){C.value=O,N.value=d,window.clearTimeout(L),L=window.setTimeout(()=>{C.value=""},4800)}async function Ke(){n.value=!0;try{Object.assign(s,await t.status())}finally{n.value=!1}}async function me(){const[O,d]=await Promise.all([t.vaults(),t.devices()]);m.value=O.items,E.value=d.items}async function Xe(){if(!i.value){i.value=!0;try{await me(),X("账户数据已刷新")}catch(O){t.signedIn||Ee(),X(O instanceof Error?O.message:"REFRESH_FAILED",!0)}finally{i.value=!1}}}function Ee(){t.clear(),r.value=!1,o.value="",m.value=[],E.value=[]}async function it(){if(i.value)return;i.value=!0;const O=o.value,d=l.value.trim(),D=f.value.trim();o.value="";try{await t.login(d,O,D),p.value=`${d} · ${D}`,r.value=!0,await me(),X("设备会话已建立")}catch(ue){Ee(),X(ue instanceof Error?ue.message:"LOGIN_FAILED",!0)}finally{i.value=!1}}async function mt(){const O=a.value.trim();if(!(!O||i.value)){i.value=!0;try{await t.createVault(O),a.value="",await me(),X(`已创建 Vault:${O}`)}catch(d){X(d instanceof Error?d.message:"CREATE_VAULT_FAILED",!0)}finally{i.value=!1}}}async function $t(O){if(window.confirm(`撤销设备“${O.name}”?该设备的下一次请求会被拒绝。`)){i.value=!0;try{await t.revokeDevice(O.id),O.id===t.deviceId?(Ee(),X("当前设备已撤销")):(await me(),X(`已撤销设备:${O.name}`))}catch(d){X(d instanceof Error?d.message:"REVOKE_FAILED",!0)}finally{i.value=!1}}}async function Q(){if(!i.value){i.value=!0;try{await t.logout()}finally{Ee(),i.value=!1,X("会话已退出")}}}return xr(()=>{Ke(),Z=window.setInterval(()=>{Ke()},15e3)}),wr(()=>{window.clearInterval(Z),window.clearTimeout(L),Ee()}),(O,d)=>(be(),xe(he,null,[d[36]||(d[36]=g("div",{class:"ambient ambient-one","aria-hidden":"true"},null,-1)),d[37]||(d[37]=g("div",{class:"ambient ambient-two","aria-hidden":"true"},null,-1)),g("header",So,[d[9]||(d[9]=g("a",{class:"brand",href:"/console","aria-label":"OpenNexus Sync Console"},[g("span",{class:"brand-mark","aria-hidden":"true"},[g("i"),g("i"),g("i")]),g("span",null,[g("strong",null,"OpenNexus"),g("small",null,"Sync Console")])],-1)),g("div",Eo,[g("span",{class:st(["status-chip",{ok:s.health,bad:!n.value&&!s.health}])},[d[4]||(d[4]=g("i",null,null,-1)),d[5]||(d[5]=g("b",null,"服务",-1)),g("em",null,G(n.value?"检测中":s.health?"在线":"离线"),1)],2),g("span",{class:st(["status-chip",{ok:s.ready,bad:!n.value&&!s.ready}])},[d[6]||(d[6]=g("i",null,null,-1)),d[7]||(d[7]=g("b",null,"依赖",-1)),g("em",null,G(n.value?"检测中":s.ready?"就绪":"不可用"),1)],2),g("button",{class:"icon-button",type:"button",disabled:n.value,"aria-label":"刷新服务状态",title:"刷新服务状态",onClick:Ke},[...d[8]||(d[8]=[g("svg",{viewBox:"0 0 24 24","aria-hidden":"true"},[g("path",{d:"M20 11a8 8 0 1 0-2.3 5.7M20 4v7h-7"})],-1)])],8,To)])]),g("main",null,[r.value?(be(),xe("section",Mo,[g("div",Ro,[g("div",null,[d[22]||(d[22]=g("div",{class:"eyebrow"},[g("span"),Ie(" Connected workspace")],-1)),d[23]||(d[23]=g("h1",null,"同步空间",-1)),g("p",null,G(p.value),1)]),g("button",{class:"secondary-button",type:"button",disabled:i.value,onClick:Q},"退出登录",8,Fo)]),g("div",Do,[g("article",null,[d[24]||(d[24]=g("span",null,"远端 Vault",-1)),g("strong",null,G(m.value.length),1),d[25]||(d[25]=g("small",null,"当前账户可访问",-1))]),g("article",null,[d[26]||(d[26]=g("span",null,"已使用空间",-1)),g("strong",null,G(P(H.value)),1),g("small",null,"总配额 "+G(P(B.value)),1)]),g("article",null,[d[27]||(d[27]=g("span",null,"设备",-1)),g("strong",null,G(E.value.length),1),g("small",null,G(k.value)+" 台可访问",1)]),g("article",null,[d[28]||(d[28]=g("span",null,"协议",-1)),g("strong",null,"v"+G(s.protocol),1),d[29]||(d[29]=g("small",null,"历史长期保留",-1))])]),g("div",No,[g("section",Lo,[g("div",$o,[d[31]||(d[31]=g("div",null,[g("p",null,"Vaults"),g("h2",null,"远端知识库")],-1)),g("button",{class:"icon-button",type:"button",disabled:i.value,"aria-label":"刷新账户数据",title:"刷新账户数据",onClick:Xe},[...d[30]||(d[30]=[g("svg",{viewBox:"0 0 24 24","aria-hidden":"true"},[g("path",{d:"M20 11a8 8 0 1 0-2.3 5.7M20 4v7h-7"})],-1)])],8,Ho)]),g("form",{class:"create-form",onSubmit:Hn(mt,["prevent"])},[d[32]||(d[32]=g("label",null,"创建新 Vault",-1)),g("div",null,[Kt(g("input",{"onUpdate:modelValue":d[3]||(d[3]=D=>a.value=D),maxlength:"120",required:"",placeholder:"例如:产品知识库"},null,512),[[qt,a.value]]),g("button",{type:"submit",disabled:i.value||!a.value.trim()},"创建",8,jo)])],32),g("div",Vo,[m.value.length?Wt("",!0):(be(),xe("div",Uo,"还没有远端 Vault")),(be(!0),xe(he,null,hn(m.value,D=>(be(),xe("article",{key:D.id,class:"vault-item"},[d[33]||(d[33]=g("div",{class:"vault-symbol"},"N",-1)),g("div",Bo,[g("strong",null,G(D.name),1),g("small",null,G(z(D.id))+" · revision "+G(D.sequence),1),g("progress",{value:Se(D),max:"100"},null,8,Ko)]),g("div",Wo,[g("strong",null,G(P(D.used)),1),g("small",null,"of "+G(P(D.quota)),1)])]))),128))])]),g("section",qo,[d[34]||(d[34]=g("div",{class:"surface-heading"},[g("div",null,[g("p",null,"Devices"),g("h2",null,"设备会话")]),g("span",{class:"secure-badge"},"逐次鉴权")],-1)),d[35]||(d[35]=g("p",{class:"surface-intro"},"撤销会让该设备的下一次请求立即失败。Vault 内容和本地文件不会因此删除。",-1)),g("div",ko,[(be(!0),xe(he,null,hn(E.value,D=>(be(),xe("article",{key:D.id,class:st(["device-item",{revoked:D.revoked}])},[g("div",Jo,G(ge(D.name,"D")),1),g("div",Go,[g("strong",null,G(D.name),1),g("small",null,[Ie(G(D.revoked?"已撤销":"可访问"),1),D.id===ar(t).deviceId?(be(),xe(he,{key:0},[Ie(" · 当前设备")],64)):Wt("",!0)])]),D.revoked?Wt("",!0):(be(),xe("button",{key:0,class:"danger-button",type:"button",disabled:i.value,onClick:ue=>$t(D)},"撤销",8,zo))],2))),128))])])])])):(be(),xe("section",Co,[g("div",Oo,[d[13]||(d[13]=g("div",{class:"eyebrow"},[g("span"),Ie(" Self-hosted workspace sync")],-1)),d[14]||(d[14]=g("h1",null,[Ie("让知识在设备之间"),g("br"),g("em",null,"安静地抵达。")],-1)),d[15]||(d[15]=g("p",null,"OpenNexus Sync 为每个 Vault 保留完整修订历史、附件完整性校验和设备级撤销。此控制台只连接当前服务器,不在浏览器持久保存密码或令牌。",-1)),g("div",Ao,[g("article",null,[g("strong",null,"v"+G(s.protocol),1),d[10]||(d[10]=g("span",null,"同步协议",-1))]),g("article",null,[g("strong",null,G(P(s.maxObjectSize)),1),d[11]||(d[11]=g("span",null,"单对象上限",-1))]),d[12]||(d[12]=g("article",null,[g("strong",null,"SHA-256"),g("span",null,"内容完整性")],-1))])]),g("section",Po,[d[20]||(d[20]=Ll('',2)),g("form",{onSubmit:Hn(it,["prevent"])},[g("label",null,[d[16]||(d[16]=Ie("账户",-1)),Kt(g("input",{"onUpdate:modelValue":d[0]||(d[0]=D=>l.value=D),autocomplete:"username",maxlength:"80",required:"",placeholder:"输入 Sync 账户"},null,512),[[qt,l.value]])]),g("label",null,[d[17]||(d[17]=Ie("密码",-1)),Kt(g("input",{"onUpdate:modelValue":d[1]||(d[1]=D=>o.value=D),type:"password",autocomplete:"current-password",minlength:"12",maxlength:"256",required:"",placeholder:"至少 12 个字符"},null,512),[[qt,o.value]])]),g("label",null,[d[18]||(d[18]=Ie("设备名称",-1)),Kt(g("input",{"onUpdate:modelValue":d[2]||(d[2]=D=>f.value=D),autocomplete:"off",maxlength:"120",required:""},null,512),[[qt,f.value]])]),g("button",{class:"primary-button",type:"submit",disabled:i.value||!o.value},[g("span",null,G(i.value?"正在建立会话…":"建立安全会话"),1),d[19]||(d[19]=g("svg",{viewBox:"0 0 24 24","aria-hidden":"true"},[g("path",{d:"m9 18 6-6-6-6"})],-1))],8,Io)],32),d[21]||(d[21]=g("p",{class:"privacy-note"},[g("span",null,"●"),Ie("密码在发出请求前即从输入框清除;会话令牌只保存在当前页面内存。")],-1))])]))]),d[38]||(d[38]=g("footer",null,[g("span",null,"OpenNexus Sync v1"),g("span",null,"Transport encryption · Device revocation · Immutable history")],-1)),C.value?(be(),xe("div",{key:0,class:st(["toast",{error:N.value}]),role:"status","aria-live":"polite"},G(C.value),3)):Wt("",!0)],64))}});_o(Yo).mount("#app");
diff --git a/server sync/sync_server/static/index.html b/server sync/sync_server/static/index.html
new file mode 100644
index 0000000..9e737fc
--- /dev/null
+++ b/server sync/sync_server/static/index.html
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+ OpenNexus Sync Console
+
+
+
+
+
+
+
diff --git a/server sync/tests/test_console.py b/server sync/tests/test_console.py
new file mode 100644
index 0000000..8f8a66c
--- /dev/null
+++ b/server sync/tests/test_console.py
@@ -0,0 +1,63 @@
+"""Same-origin Vue console delivery and its public account workflow."""
+
+import re
+
+from fastapi.testclient import TestClient
+
+from sync_server.app import create_app
+from sync_server.database import Database
+from sync_server.storage import DiskObjects
+
+
+def test_vue_console_is_hardened_and_uses_the_public_sync_api(tmp_path):
+ database = Database("sqlite:///" + str(tmp_path / "sync.db"))
+ app = create_app(
+ database,
+ DiskObjects(tmp_path / "objects"),
+ tmp_path / "staging",
+ )
+ database.add_user("demo", "controlled-demo-password")
+ with TestClient(app) as client:
+ root = client.get("/")
+ console = client.get("/console/")
+ assert root.status_code == console.status_code == 200
+ assert "OpenNexus Sync Console" in console.text
+ assert "