feat: batch video upscaling with folder upload, directory save, and result comparison (#1051)

* feat: support batch video upscaling with folder upload and directory save

- Add multi-file selection and entire folder upload (webkitdirectory)
- Support drag & drop of both files and folders via FileSystemEntry API
- Add save directory picker using File System Access API (showDirectoryPicker)
- Process videos sequentially with per-file progress and status tracking
- Add right-side result list with click-to-compare functionality
- Add per-video duration and total batch duration display
- Add retry button for failed items with error detail display
- Remove auto-play on comparison viewer load
- Fix worker error handling: handle "error" command to reject stale promises
- Fix event listener accumulation in video comparison (AbortController)
- Fix XSS risk by escaping HTML in all innerHTML injections
- Fix URL revocation timing in download to prevent large file truncation
- Extract writeToSaveDirectory and truncateName helpers to reduce duplication
- Add Usage Guide panel explaining single/multiple/folder upload options

Files changed:
  docs/upscaler/index.html  (+1110/-181)
  docs/upscaler/upscaler.js (+110)

* fix: prevent auto-play and resource consumption during upscaling

- Set preload="metadata" on preview and comparison video elements
- Explicitly pause preview video after setting src in showVideoPreview
- Remove preview video seek sync from batch processing progress callbacks
  (was causing continuous decode during upscaling, wasting GPU resources)
- Remove preview video seek sync from retry progress callback
- All videos now require manual play; no background resource usage

* fix: improve upscaled video quality with higher bitrate and codec support

- Raise base bitrate from 2.5 Mbps (25e5) to 8 Mbps (8e6) for standard and
  firefox processors, preventing quality loss when source videos have high
  bitrates (e.g. 720p @ 16.7 Mbps was producing 1440p @ 10 Mbps, smaller
  than the original file)
- Double the bitrate for mediabunny processor (X.n1 * 2) to account for the
  4x pixel increase from 2x upscaling
- Add H.264 Level 5.1 (avc1.640033) and Level 5.2 (avc1.640034) codecs to
  the fallback lists, since Level 4.0 (avc1.640028, ~24.6 Mbps) cannot
  support the higher bitrates for 1440p+ outputs
- Add latencyMode: "quality" to VideoEncoder configs for both standard and
  firefox processors, prioritizing encoding quality over latency (suitable
  for offline processing)

* feat: add video data comparison panel for original vs upscaled metrics

- Add a comparison data table below the file info bar showing 6 metrics:
  Resolution, File Size, Duration, Est. Bitrate, Pixels, Process Time
- Display per-metric change percentage with color-coded indicators:
  green (↑) for improvements, red (↓) for regressions, gray for neutral
- Estimated bitrate calculated from file size × 8 / video duration
- Table renders after both original and upscaled video metadata loads
- Auto-hide panel on reset

* fix: make video data comparison panel full-width and responsive

- Move comparison data table from inside the left column to the full-width
  area below the left/right layout, so it is no longer constrained by the
  comparison viewer column width
- Remove table-fixed colgroup and overflow-x-auto that caused horizontal
  scrolling on smaller screens
- Table now uses w-full auto-layout, displaying all 4 columns (Metric,
  Original, Upscaled, Change) without requiring horizontal scrolling

---------

Co-authored-by: rionzhao <rionzhao@tencent.com>
This commit is contained in:
糖猫猫andrionzhao authored and GitHub committed 2026-09-10 17:19:38 +08:00
commit 0896841d23
538 files changed
+379715

No files matched your search

@@ -0,0 +1,22 @@
/**
* @vue/shared v3.5.13
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**//*! #__NO_SIDE_EFFECTS__ */function Yo(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const Xo={},Jo=()=>{},zo=Object.assign,Qo=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Zo=Object.prototype.hasOwnProperty,Mn=(e,t)=>Zo.call(e,t),tt=Array.isArray,Vt=e=>Dn(e)==="[object Map]",el=e=>Dn(e)==="[object Set]",Gt=e=>typeof e=="function",tl=e=>typeof e=="string",sn=e=>typeof e=="symbol",Lt=e=>e!==null&&typeof e=="object",nl=Object.prototype.toString,Dn=e=>nl.call(e),sl=e=>Dn(e).slice(8,-1),rl=e=>Dn(e)==="[object Object]",Bs=e=>tl(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,nt=(e,t)=>!Object.is(e,t),il=(e,t,n,s=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})};/**
* @vue/reactivity v3.5.13
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let we;class ol{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=we,!t&&we&&(this.index=(we.scopes||(we.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].pause();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].resume();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].resume()}}run(t){if(this._active){const n=we;try{return we=this,t()}finally{we=n}}}on(){we=this}off(){we=this.parent}stop(t){if(this._active){this._active=!1;let n,s;for(n=0,s=this.effects.length;n<s;n++)this.effects[n].stop();for(this.effects.length=0,n=0,s=this.cleanups.length;n<s;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,s=this.scopes.length;n<s;n++)this.scopes[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const r=this.parent.scopes.pop();r&&r!==this&&(this.parent.scopes[this.index]=r,r.index=this.index)}this.parent=void 0}}}function ai(){return we}function ll(e,t=!1){we&&we.cleanups.push(e)}let ee;const is=new WeakSet;class fi{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,we&&we.active&&we.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,is.has(this)&&(is.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||di(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,hr(this),hi(this);const t=ee,n=$e;ee=this,$e=!0;try{return this.fn()}finally{pi(this),ee=t,$e=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Gs(t);this.deps=this.depsTail=void 0,hr(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?is.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Os(this)&&this.run()}get dirty(){return Os(this)}}let ui=0,kt,Ut;function di(e,t=!1){if(e.flags|=8,t){e.next=Ut,Ut=e;return}e.next=kt,kt=e}function Ks(){ui++}function qs(){if(--ui>0)return;if(Ut){let t=Ut;for(Ut=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;kt;){let t=kt;for(kt=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){e||(e=s)}t=n}}if(e)throw e}function hi(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function pi(e){let t,n=e.depsTail,s=n;for(;s;){const r=s.prevDep;s.version===-1?(s===n&&(n=r),Gs(s),cl(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=r}e.deps=t,e.depsTail=n}function Os(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(gi(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function gi(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Yt))return;e.globalVersion=Yt;const t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&e.deps&&!Os(e)){e.flags&=-3;return}const n=ee,s=$e;ee=e,$e=!0;try{hi(e);const r=e.fn(e._value);(t.version===0||nt(r,e._value))&&(e._value=r,t.version++)}catch(r){throw t.version++,r}finally{ee=n,$e=s,pi(e),e.flags&=-3}}function Gs(e,t=!1){const{dep:n,prevSub:s,nextSub:r}=e;if(s&&(s.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=s,e.nextSub=void 0),n.subs===e&&(n.subs=s,!s&&n.computed)){n.computed.flags&=-5;for(let i=n.computed.deps;i;i=i.nextDep)Gs(i,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function cl(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let $e=!0;const mi=[];function rt(){mi.push($e),$e=!1}function it(){const e=mi.pop();$e=e===void 0?!0:e}function hr(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=ee;ee=void 0;try{t()}finally{ee=n}}}let Yt=0;class al{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Vn{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(t){if(!ee||!$e||ee===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==ee)n=this.activeLink=new al(ee,this),ee.deps?(n.prevDep=ee.depsTail,ee.depsTail.nextDep=n,ee.depsTail=n):ee.deps=ee.depsTail=n,yi(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const s=n.nextDep;s.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=s),n.prevDep=ee.depsTail,n.nextDep=void 0,ee.depsTail.nextDep=n,ee.depsTail=n,ee.deps===n&&(ee.deps=s)}return n}trigger(t){this.version++,Yt++,this.notify(t)}notify(t){Ks();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{qs()}}}function yi(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)yi(s)}const n=e.dep.subs;n!==Line truncated
* @vue/shared v3.5.13
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**//*! #__NO_SIDE_EFFECTS__ */function Ci(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const ne={},Ot=[],Ge=()=>{},Vl=()=>!1,rn=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Qs=e=>e.startsWith("onUpdate:"),he=Object.assign,Ai=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},kl=Object.prototype.hasOwnProperty,te=(e,t)=>kl.call(e,t),Y=Array.isArray,Ul=e=>Zs(e)==="[object Map]",Wl=e=>Zs(e)==="[object Set]",G=e=>typeof e=="function",ie=e=>typeof e=="string",Wn=e=>typeof e=="symbol",ce=e=>e!==null&&typeof e=="object",Oi=e=>(ce(e)||G(e))&&G(e.then)&&G(e.catch),Ri=Object.prototype.toString,Zs=e=>Ri.call(e),Bl=e=>Zs(e)==="[object Object]",Rt=Ci(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Bn=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Kl=/-(\w)/g,Ne=Bn(e=>e.replace(Kl,(t,n)=>n?n.toUpperCase():"")),ql=/\B([A-Z])/g,ot=Bn(e=>e.replace(ql,"-$1").toLowerCase()),Kn=Bn(e=>e.charAt(0).toUpperCase()+e.slice(1)),xn=Bn(e=>e?`on${Kn(e)}`:""),En=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},Gl=(e,t,n,s=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},Ls=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Yl=e=>{const t=ie(e)?Number(e):NaN;return isNaN(t)?e:t};let gr;const qn=()=>gr||(gr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function er(e){if(Y(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],r=ie(s)?Ql(s):er(s);if(r)for(const i in r)t[i]=r[i]}return t}else if(ie(e)||ce(e))return e}const Xl=/;(?![^(]*\))/g,Jl=/:([^]+)/,zl=/\/\*[^]*?\*\//g;function Ql(e){const t={};return e.replace(zl,"").split(Xl).forEach(n=>{if(n){const s=n.split(Jl);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function tr(e){let t="";if(ie(e))t=e;else if(Y(e))for(let n=0;n<e.length;n++){const s=tr(e[n]);s&&(t+=s+" ")}else if(ce(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const Zl="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",ec=Ci(Zl);function Mi(e){return!!e||e===""}const Pi=e=>!!(e&&e.__v_isRef===!0),tc=e=>ie(e)?e:e==null?"":Y(e)||ce(e)&&(e.toString===Ri||!G(e.toString))?Pi(e)?tc(e.value):JSON.stringify(e,Li,2):String(e),Li=(e,t)=>Pi(t)?Li(e,t.value):Ul(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,r],i)=>(n[cs(s,i)+" =>"]=r,n),{})}:Wl(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>cs(n))}:Wn(t)?cs(t):ce(t)&&!Y(t)&&!Bl(t)?String(t):t,cs=(e,t="")=>{var n;return Wn(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/**
* @vue/runtime-core v3.5.13
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/function on(e,t,n,s){try{return s?e(...s):e()}catch(r){Gn(r,t,n)}}function je(e,t,n,s){if(G(e)){const r=on(e,t,n,s);return r&&Oi(r)&&r.catch(i=>{Gn(i,t,n)}),r}if(Y(e)){const r=[];for(let i=0;i<e.length;i++)r.push(je(e[i],t,n,s));return r}}function Gn(e,t,n,s=!0){const r=t?t.vnode:null,{errorHandler:i,throwUnhandledErrorInProduction:o}=t&&t.appContext.config||ne;if(t){let l=t.parent;const c=t.proxy,f=`https://vuejs.org/error-reference/#runtime-${n}`;for(;l;){const a=l.ec;if(a){for(let d=0;d<a.length;d++)if(a[d](e,c,f)===!1)return}l=l.parent}if(i){rt(),on(i,null,10,[e,c,f]),it();return}}nc(e,n,r,s,o)}function nc(e,t,n,s=!0,r=!1){if(r)throw e;console.error(e)}const Se=[];let Ve=-1;const Mt=[];let Qe=null,Ct=0;const Ii=Promise.resolve();let In=null;function Yn(e){const t=In||Ii;return e?t.then(this?e.bind(this):e):t}function sc(e){let t=Ve+1,n=Se.length;for(;t<n;){const s=t+n>>>1,r=Se[s],i=Jt(r);i<e||i===e&&r.flags&2?t=s+1:n=s}return t}function nr(e){if(!(e.flags&1)){const t=Jt(e),n=Se[Se.length-1];!n||!(e.flags&2)&&t>=Jt(n)?Se.push(e):Se.splice(sc(t),0,e),e.flags|=1,Ni()}}function Ni(){In||(In=Ii.then(Fi))}function rc(e){Y(e)?Mt.push(...e):Qe&&e.id===-1?Qe.splice(Ct+1,0,e):e.flags&1||(Mt.push(e),e.flags|=1),Ni()}function mr(e,t,n=Ve+1){for(;n<Se.length;n++){const s=Se[n];if(s&&s.flags&2){if(e&&s.id!==e.uid)continue;Se.splice(n,1),n--,s.flags&4&&(s.flags&=-2),s(),s.flags&4||(s.flags&=-2)}}}function Nn(e){if(Mt.length){const t=[...new Set(Mt)].sort((n,s)=>Jt(n)-Jt(s));if(Mt.length=0,Qe){Qe.push(...t);return}for(Qe=t,Ct=0;Ct<Qe.length;Ct++){const n=Qe[Ct];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}Qe=null,Ct=0}}const Jt=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Fi(e){try{for(Ve=0;Ve<Se.length;Ve++){const t=Se[Ve];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),on(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Ve<Se.length;Ve++){const t=Se[Ve];t&&(t.flags&=-2)}Ve=-1,Se.length=0,Nn(),In=null,(Se.length||Mt.length)&&Fi()}}let ae=null,$i=null;function Fn(e){const t=ae;return ae=e,$i=e&&e.type.__scopeId||null,t}function ic(e,t=ae,n){if(!t||e._n)return e;const s=(...r)=>{s._d&&Pr(-1);const i=Fn(t);let o;try{o=e(...r)}finally{Fn(i),s._d&&Pr(1)}return o};return s._n=!0,s._c=!0,s._d=!0,s}function qf(e,t){if(ae===null)return e;const n=es(ae),s=e.dirs||(e.dirs=[]);for(let r=0;r<t.length;r++){let[i,o,l,c=ne]=t[r];i&&(G(i)&&(i={mounted:i,updated:i}),i.deep&&qe(o),s.push({dir:i,instance:n,value:o,oldValue:void 0,arg:l,modifiers:c}))}return e}function ke(e,t,n,s){const r=e.dirs,i=t&&t.dirs;for(let o=0;o<r.length;o++){const l=r[o];i&&(l.oldValue=i[o].value);let c=l.dir[s];c&&(rt(),je(c,n,8,[e.el,l,e,t]),it())}}const ji=Symbol("_vte"),Hi=e=>e.__isTeleport,Wt=e=>e&&(e.disabled||e.disabled===""),yr=e=>e&&(e.defer||e.defer===""),vr=e=>typeof SVGElement<"u"&&e instanceof SVGElement,br=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Is=(e,t)=>{const n=e&&e.to;return ie(n)?t?t(n):null:n},Di={name:"Teleport",__isTeleport:!0,process(e,t,n,s,r,i,o,l,c,f){const{mc:a,pc:d,pbc:m,o:{insert:v,querySelector:x,createText:T,createComment:B}}=f,F=Wt(t.props);let{shapeFlag:U,children:p,dynamicChildren:g}=t;if(e==null){const M=t.el=T(""),j=t.anchor=T("");v(M,n,s),v(j,n,s);const O=(w,R)=>{U&16&&(r&&r.isCE&&(r.ce._teleportTarget=w),a(p,w,R,r,i,o,l,c))},H=()=>{const w=t.target=Is(t.props,x),R=Vi(w,t,T,v);w&&(o!=="svg"&&vr(w)?o="svg":o!=="mathml"&&br(w)&&(o="mathml"),F||(O(w,R),Cn(t,!1)))};F&&(O(n,j),Cn(t,!0)),yr(t.props)?_e(()=>{H(),t.el.__isMounted=!0},i):H()}else{if(yr(t.props)&&!e.el.__isMounted){_e(()=>{Di.process(e,t,n,s,r,i,o,l,c,f),delete e.el.__isMounted},i);return}t.el=e.el,t.targetStart=e.targetStart;const M=t.anchor=e.anchor,j=t.target=e.target,O=t.targetAnchor=e.targetAnchor,H=Wt(e.props),w=H?n:j,R=H?M:O;if(o==="svg"||vr(j)?o="svg":(o==="mathml"||br(j))&&(o="mathml"),g?(m(e.dynamicChildren,g,w,r,i,o,l),rr(e,t,!0)):c||d(e,t,w,R,r,i,o,l,!1),F)H?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):pn(t,n,M,f,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const A=t.target=Is(t.props,x);A&&pn(t,A,null,f,0)}else H&&pn(t,j,O,f,1);Cn(t,F)}},remove(e,t,n,{um:s,o:{remove:r}},i){const{shapeFlag:o,children:l,anchor:c,targetStart:f,targetAnchor:a,target:d,props:m}=e;if(d&&(r(f),r(a)),i&&r(c),o&16){const v=i||!Wt(m);for(let x=0;x<l.length;x++){const T=l[x];s(T,t,n,v,!!T.dynamicChildren)}}},move:pn,hydrate:oc};function pn(e,t,n,{o:{insert:s},m:r},i=2){i===0&&s(e.targetAnchor,t,n);const{el:o,anchor:l,shapeFlag:c,children:f,props:a}=e,d=i===2;if(d&&s(o,t,n),(!d||Wt(a))&&c&16)for(let m=0;m<f.length;m++)r(f[m],t,n,2);d&&s(l,t,n)}function oc(e,t,n,s,r,i,{o:{nextSibling:o,parentNode:l,querySelector:c,insert:f,createText:a}},d){const m=t.target=Is(t.props,c);if(m){const v=Wt(t.props),x=m._lpa||m.firstChild;if(t.shapeFlag&16)if(v)t.anchor=d(o(e),t,l(e),n,s,r,i),t.targetStart=x,t.targetAnchor=x&&o(x);else{t.anchor=o(e);let T=x;for(;T;){if(T&&T.nodeType===8){if(T.data==="teleport start anchor")t.targetSt Line truncated
`&&(p.tagName==="PRE"||p.tagName==="TEXTAREA")&&(D=D.slice(1)),p.textContent!==D&&(vn(p,0)||Et(),p.textContent=g.children)}if(R){if(se||!H||A&48){const D=p.tagName.includes("-");for(const le in R)(se&&(le.endsWith("value")||le==="indeterminate")||rn(le)&&!Rt(le)||le[0]==="."||D)&&s(p,le,null,R[le],void 0,M)}else if(R.onClick)s(p,"onClick",null,R.onClick,void 0,M);else if(A&4&&pt(R.style))for(const D in R.style)R.style[D]}let q;(q=R&&R.onVnodeBeforeMount)&&Re(q,M,g),N&&ke(g,null,M,"beforeMount"),((q=R&&R.onVnodeMounted)||N||V)&&wo(()=>{q&&Re(q,M,g),V&&X.enter(p),N&&ke(g,null,M,"mounted")},j)}return p.nextSibling},v=(p,g,M,j,O,H,w)=>{w=w||!!g.dynamicChildren;const R=g.children,A=R.length;for(let b=0;b<A;b++){const N=w?R[b]:R[b]=Me(R[b]),X=N.type===bt;p?(X&&!w&&b+1<A&&Me(R[b+1]).type===bt&&(c(r(p.data.slice(N.children.length)),M,i(p)),p.data=N.children),p=d(p,N,j,O,H,w)):X&&!N.children?c(N.el=r(""),M):(vn(M,1)||Et(),n(null,N,M,null,j,O,mn(M),H))}return p},x=(p,g,M,j,O,H)=>{const{slotScopeIds:w}=g;w&&(O=O?O.concat(w):w);const R=o(p),A=v(i(p),g,R,M,j,O,H);return A&&yn(A)&&A.data==="]"?i(g.anchor=A):(Et(),c(g.anchor=f("]"),R,A),A)},T=(p,g,M,j,O,H)=>{if(vn(p.parentElement,1)||Et(),g.el=null,H){const A=B(p);for(;;){const b=i(p);if(b&&b!==A)l(b);else break}}const w=i(p),R=o(p);return l(p),n(null,g,R,w,M,j,mn(R),O),M&&(M.vnode.el=g.el,bo(M,g.el)),w},B=(p,g="[",M="]")=>{let j=0;for(;p;)if(p=i(p),p&&yn(p)&&(p.data===g&&j++,p.data===M)){if(j===0)return i(p);j--}return p},F=(p,g,M)=>{const j=g.parentNode;j&&j.replaceChild(p,g);let O=M;for(;O;)O.vnode.el===g&&(O.vnode.el=O.subTree.el=p),O=O.parent},U=p=>p.nodeType===1&&p.tagName==="TEMPLATE";return[a,d]}const Sr="data-allow-mismatch",hc={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function vn(e,t){if(t===0||t===1)for(;e&&!e.hasAttribute(Sr);)e=e.parentElement;const n=e&&e.getAttribute(Sr);if(n==null)return!1;if(n==="")return!0;{const s=n.split(",");return t===0&&s.includes("children")?!0:n.split(",").includes(hc[t])}}qn().requestIdleCallback;qn().cancelIdleCallback;const mt=e=>!!e.type.__asyncLoader,Xn=e=>e.type.__isKeepAlive;function pc(e,t){Yi(e,"a",t)}function gc(e,t){Yi(e,"da",t)}function Yi(e,t,n=ue){const s=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(Jn(t,s,n),n){let r=n.parent;for(;r&&r.parent;)Xn(r.parent.vnode)&&mc(s,t,n,r),r=r.parent}}function mc(e,t,n,s){const r=Jn(t,e,s,!0);zn(()=>{Ai(s[t],r)},n)}function Jn(e,t,n=ue,s=!1){if(n){const r=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...o)=>{rt();const l=cn(n),c=je(t,n,e,o);return l(),it(),c});return s?r.unshift(i):r.push(i),i}}const Je=e=>(t,n=ue)=>{(!tn||e==="sp")&&Jn(e,(...s)=>t(...s),n)},yc=Je("bm"),It=Je("m"),vc=Je("bu"),bc=Je("u"),Xi=Je("bum"),zn=Je("um"),_c=Je("sp"),wc=Je("rtg"),Sc=Je("rtc");function Tc(e,t=ue){Jn("ec",e,t)}const Ji="components";function Yf(e,t){return Qi(Ji,e,!0,t)||e}const zi=Symbol.for("v-ndc");function Xf(e){return ie(e)?Qi(Ji,e,!1)||e:e||zi}function Qi(e,t,n=!0,s=!1){const r=ae||ue;if(r){const i=r.type;{const l=la(i,!1);if(l&&(l===t||l===Ne(t)||l===Kn(Ne(t))))return i}const o=Tr(r[e]||i[e],t)||Tr(r.appContext[e],t);return!o&&s?i:o}}function Tr(e,t){return e&&(e[t]||e[Ne(t)]||e[Kn(Ne(t))])}function Jf(e,t,n,s){let r;const i=n,o=Y(e);if(o||ie(e)){const l=o&&pt(e);let c=!1;l&&(c=!Pe(e),e=kn(e)),r=new Array(e.length);for(let f=0,a=e.length;f<a;f++)r[f]=t(c?ye(e[f]):e[f],f,void 0,i)}else if(typeof e=="number"){r=new Array(e);for(let l=0;l<e;l++)r[l]=t(l+1,l,void 0,i)}else if(ce(e))if(e[Symbol.iterator])r=Array.from(e,(l,c)=>t(l,c,void 0,i));else{const l=Object.keys(e);r=new Array(l.length);for(let c=0,f=l.length;c<f;c++){const a=l[c];r[c]=t(e[a],a,c,i)}}else r=[];return r}function zf(e,t,n={},s,r){if(ae.ce||ae.parent&&mt(ae.parent)&&ae.parent.ce)return t!=="default"&&(n.name=t),Ds(),Vs(Te,null,[de("slot",n,s&&s())],64);let i=e[t];i&&i._c&&(i._d=!1),Ds();const o=i&&Zi(i(n)),l=n.key||o&&o.key,c=Vs(Te,{key:(l&&!Wn(l)?l:`_${t}`)+(!o&&s?"_fb":"")},o||(s?s():[]),o&&e._===1?64:-2);return!r&&c.scopeId&&(c.slotScopeIds=[c.scopeId+"-s"]),i&&i._c&&(i._d=!0),c}function Zi(e){return e.some(t=>en(t)?!(t.type===ve||t.type===Te&&!Zi(t.children)):!0)?e:null}function Qf(e,t){const n={};for(const s in e)n[/[A-Z]/.test(s)?`on:${s}`:xn(s)]=e[s];return n}const Fs=e=>e?Co(e)?es(e):Fs(e.parent):null,Bt=he(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=>to(e),$forceUpdate:e=>e.f||(e.f=()=>{nr(e.update)}),$nextTick:e=>e.n||(e.n=Yn.bind(e.proxy)),$watch:e=>Kc.bind(e)}),fs=(e,t)=>e!==ne&&!e.__isScriptSetup&&te(e,t),xc={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:r,props:i,accessCache:o,type:l,appContext:c}=e;let f;if(t[0]!=="$"){const v=o[t];if(v!==void 0)switch(v){case 1:return s[t];case 2:return r[t];case 4:return n[t];case 3:return i[t]}else{if(fs(s,t))return o[t]=1,s Line truncated
* @vue/runtime-dom v3.5.13
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let Ws;const Nr=typeof window<"u"&&window.trustedTypes;if(Nr)try{Ws=Nr.createPolicy("vue",{createHTML:e=>e})}catch{}const Ro=Ws?e=>Ws.createHTML(e):e=>e,fa="http://www.w3.org/2000/svg",ua="http://www.w3.org/1998/Math/MathML",Be=typeof document<"u"?document:null,Fr=Be&&Be.createElement("template"),da={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const r=t==="svg"?Be.createElementNS(fa,e):t==="mathml"?Be.createElementNS(ua,e):n?Be.createElement(e,{is:n}):Be.createElement(e);return e==="select"&&s&&s.multiple!=null&&r.setAttribute("multiple",s.multiple),r},createText:e=>Be.createTextNode(e),createComment:e=>Be.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Be.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,r,i){const o=n?n.previousSibling:t.lastChild;if(r&&(r===i||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===i||!(r=r.nextSibling)););else{Fr.innerHTML=Ro(s==="svg"?`<svg>${e}</svg>`:s==="mathml"?`<math>${e}</math>`:e);const l=Fr.content;if(s==="svg"||s==="mathml"){const c=l.firstChild;for(;c.firstChild;)l.appendChild(c.firstChild);l.removeChild(c)}t.insertBefore(l,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},ze="transition",jt="animation",nn=Symbol("_vtc"),Mo={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},ha=he({},ki,Mo),pa=e=>(e.displayName="Transition",e.props=ha,e),ru=pa((e,{slots:t})=>Us(ac,ga(e),t)),at=(e,t=[])=>{Y(e)?e.forEach(n=>n(...t)):e&&e(...t)},$r=e=>e?Y(e)?e.some(t=>t.length>1):e.length>1:!1;function ga(e){const t={};for(const b in e)b in Mo||(t[b]=e[b]);if(e.css===!1)return t;const{name:n="v",type:s,duration:r,enterFromClass:i=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:c=i,appearActiveClass:f=o,appearToClass:a=l,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:m=`${n}-leave-active`,leaveToClass:v=`${n}-leave-to`}=e,x=ma(r),T=x&&x[0],B=x&&x[1],{onBeforeEnter:F,onEnter:U,onEnterCancelled:p,onLeave:g,onLeaveCancelled:M,onBeforeAppear:j=F,onAppear:O=U,onAppearCancelled:H=p}=t,w=(b,N,X,se)=>{b._enterCancelled=se,ft(b,N?a:l),ft(b,N?f:o),X&&X()},R=(b,N)=>{b._isLeaving=!1,ft(b,d),ft(b,v),ft(b,m),N&&N()},A=b=>(N,X)=>{const se=b?O:U,V=()=>w(N,b,X);at(se,[N,V]),jr(()=>{ft(N,b?c:i),We(N,b?a:l),$r(se)||Hr(N,s,T,V)})};return he(t,{onBeforeEnter(b){at(F,[b]),We(b,i),We(b,o)},onBeforeAppear(b){at(j,[b]),We(b,c),We(b,f)},onEnter:A(!1),onAppear:A(!0),onLeave(b,N){b._isLeaving=!0;const X=()=>R(b,N);We(b,d),b._enterCancelled?(We(b,m),kr()):(kr(),We(b,m)),jr(()=>{b._isLeaving&&(ft(b,d),We(b,v),$r(g)||Hr(b,s,B,X))}),at(g,[b,X])},onEnterCancelled(b){w(b,!1,void 0,!0),at(p,[b])},onAppearCancelled(b){w(b,!0,void 0,!0),at(H,[b])},onLeaveCancelled(b){R(b),at(M,[b])}})}function ma(e){if(e==null)return null;if(ce(e))return[hs(e.enter),hs(e.leave)];{const t=hs(e);return[t,t]}}function hs(e){return Yl(e)}function We(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[nn]||(e[nn]=new Set)).add(t)}function ft(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const n=e[nn];n&&(n.delete(t),n.size||(e[nn]=void 0))}function jr(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let ya=0;function Hr(e,t,n,s){const r=e._endId=++ya,i=()=>{r===e._endId&&s()};if(n!=null)return setTimeout(i,n);const{type:o,timeout:l,propCount:c}=va(e,t);if(!o)return s();const f=o+"end";let a=0;const d=()=>{e.removeEventListener(f,m),i()},m=v=>{v.target===e&&++a>=c&&d()};setTimeout(()=>{a<c&&d()},l+1),e.addEventListener(f,m)}function va(e,t){const n=window.getComputedStyle(e),s=x=>(n[x]||"").split(", "),r=s(`${ze}Delay`),i=s(`${ze}Duration`),o=Dr(r,i),l=s(`${jt}Delay`),c=s(`${jt}Duration`),f=Dr(l,c);let a=null,d=0,m=0;t===ze?o>0&&(a=ze,d=o,m=i.length):t===jt?f>0&&(a=jt,d=f,m=c.length):(d=Math.max(o,f),a=d>0?o>f?ze:jt:null,m=a?a===ze?i.length:c.length:0);const v=a===ze&&/\b(transform|all)(,|$)/.test(s(`${ze}Property`).toString());return{type:a,timeout:d,propCount:m,hasTransform:v}}function Dr(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,s)=>Vr(n)+Vr(e[s])))}function Vr(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function kr(){return document.body.offsetHeight}function ba(e,t,n){const s=e[nn];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Hn=Symbol("_vod"),Po=Symbol("_vsh"),iu={beforeMount(e,{value:t},{transition:n}){e[Hn]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):Ht(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updat Line truncated
+1
View File
@@ -0,0 +1 @@
import{d as k,c as h,r as p,n as A,o as i,a as ee,t as C,b as P,w as f,T as we,e as g,_ as V,u as Re,i as it,f as lt,g as he,h as S,j as d,k as c,l as te,m as Pe,p as T,q as J,s as fe,v as Q,x as Me,y as Ne,z as ct,A as ut,F as H,B as z,C as Z,D as We,E as ve,G as y,H as W,I as Ke,J as me,K as Y,L as _e,M as dt,N as Je,O as pt,P as Ie,Q as xe,R as ge,S as ht,U as ft,V as vt,W as Fe,X as mt,Y as Xe,Z as _t,$ as gt,a0 as Ye,a1 as Qe,a2 as kt,a3 as bt,a4 as $t,a5 as yt}from"./framework.xxfEszSJ.js";const Pt=k({__name:"VPBadge",props:{text:{},type:{default:"tip"}},setup(n){return(e,t)=>(i(),h("span",{class:A(["VPBadge",e.type])},[p(e.$slots,"default",{},()=>[ee(C(e.text),1)])],2))}}),Lt={key:0,class:"VPBackdrop"},Vt=k({__name:"VPBackdrop",props:{show:{type:Boolean}},setup(n){return(e,t)=>(i(),P(we,{name:"fade"},{default:f(()=>[e.show?(i(),h("div",Lt)):g("",!0)]),_:1}))}}),St=V(Vt,[["__scopeId","data-v-b2600058"]]),M=Re;function Tt(n,e){let t,s=!1;return()=>{t&&clearTimeout(t),s?t=setTimeout(n,e):(n(),(s=!0)&&setTimeout(()=>s=!1,e))}}function Le(n){return n.startsWith("/")?n:`/${n}`}function Ce(n){const{pathname:e,search:t,hash:s,protocol:o}=new URL(n,"http://a.com");if(it(n)||n.startsWith("#")||!o.startsWith("http")||!lt(e))return n;const{site:a}=M(),r=e.endsWith("/")||e.endsWith(".html")?n:n.replace(/(?:(^\.+)\/)?.*$/,`$1${e.replace(/(\.md)?$/,a.value.cleanUrls?"":".html")}${t}${s}`);return he(r)}function ae({correspondingLink:n=!1}={}){const{site:e,localeIndex:t,page:s,theme:o,hash:a}=M(),r=S(()=>{var u,v;return{label:(u=e.value.locales[t.value])==null?void 0:u.label,link:((v=e.value.locales[t.value])==null?void 0:v.link)||(t.value==="root"?"/":`/${t.value}/`)}});return{localeLinks:S(()=>Object.entries(e.value.locales).flatMap(([u,v])=>r.value.label===v.label?[]:{text:v.label,link:wt(v.link||(u==="root"?"/":`/${u}/`),o.value.i18nRouting!==!1&&n,s.value.relativePath.slice(r.value.link.length-1),!e.value.cleanUrls)+a.value})),currentLang:r}}function wt(n,e,t,s){return e?n.replace(/\/$/,"")+Le(t.replace(/(^|\/)index\.md$/,"$1").replace(/\.md$/,s?".html":"")):n}const Mt={class:"NotFound"},Nt={class:"code"},It={class:"title"},Ct={class:"quote"},At={class:"action"},Ht=["href","aria-label"],Bt=k({__name:"NotFound",setup(n){const{theme:e}=M(),{currentLang:t}=ae();return(s,o)=>{var a,r,l,u,v;return i(),h("div",Mt,[d("p",Nt,C(((a=c(e).notFound)==null?void 0:a.code)??"404"),1),d("h1",It,C(((r=c(e).notFound)==null?void 0:r.title)??"PAGE NOT FOUND"),1),o[0]||(o[0]=d("div",{class:"divider"},null,-1)),d("blockquote",Ct,C(((l=c(e).notFound)==null?void 0:l.quote)??"But if you don't change your direction, and if you keep looking, you may end up where you are heading."),1),d("div",At,[d("a",{class:"link",href:c(he)(c(t).link),"aria-label":((u=c(e).notFound)==null?void 0:u.linkLabel)??"go to home"},C(((v=c(e).notFound)==null?void 0:v.linkText)??"Take me home"),9,Ht)])])}}}),Et=V(Bt,[["__scopeId","data-v-93fd8736"]]);function Ze(n,e){if(Array.isArray(n))return le(n);if(n==null)return[];e=Le(e);const t=Object.keys(n).sort((o,a)=>a.split("/").length-o.split("/").length).find(o=>e.startsWith(Le(o))),s=t?n[t]:[];return Array.isArray(s)?le(s):le(s.items,s.base)}function Ot(n){const e=[];let t=0;for(const s in n){const o=n[s];if(o.items){t=e.push(o);continue}e[t]||e.push({items:[]}),e[t].items.push(o)}return e}function Dt(n){const e=[];function t(s){for(const o of s)o.text&&o.link&&e.push({text:o.text,link:o.link,docFooterText:o.docFooterText}),o.items&&t(o.items)}return t(n),e}function Ve(n,e){return Array.isArray(e)?e.some(t=>Ve(n,t)):te(n,e.link)?!0:e.items?Ve(n,e.items):!1}function le(n,e){return[...n].map(t=>{const s={...t},o=s.base||e;return o&&s.link&&(s.link=o+s.link),s.items&&(s.items=le(s.items,o)),s})}function x(){const{frontmatter:n,page:e,theme:t}=M(),s=Pe("(min-width: 960px)"),o=T(!1),a=S(()=>{const N=t.value.sidebar,w=e.value.relativePath;return N?Ze(N,w):[]}),r=T(a.value);J(a,(N,w)=>{JSON.stringify(N)!==JSON.stringify(w)&&(r.value=a.value)});const l=S(()=>n.value.sidebar!==!1&&r.value.length>0&&n.value.layout!=="home"),u=S(()=>v?n.value.aside==null?t.value.aside==="left":n.value.aside==="left":!1),v=S(()=>n.value.layout==="home"?!1:n.value.aside!=null?!!n.value.aside:t.value.aside!==!1),_=S(()=>l.value&&s.value),m=S(()=>l.value?Ot(r.value):[]);function L(){o.value=!0}function b(){o.value=!1}function $(){o.value?b():L()}return{isOpen:o,sidebar:r,sidebarGroups:m,hasSidebar:l,hasAside:v,leftAside:u,isSidebarEnabled:_,open:L,close:b,toggle:$}}function Ft(n,e){let t;fe(()=>{t=n.value?document.activeElement:void 0}),Q(()=>{window.addEventListener("keyup",s)}),Me(()=>{window.removeEventListener("keyup",s)});function s(o){o.key==="Escape"&&n.value&&(e(),t==null||t.focus())}}function zt(n){const{page:e,hash:t}=M(),s=T(!1),o=S(()=>n.value.collapsed!=null),a=S(()=>!!n.value.link),r=T(!1),l=()=>{r.value=te(e.value.relativePath,n.value.link)};J([e,n,t],l),Q(l);const u=S(()=>r.value?!0:n.value.items?Ve(e.value.relativePath,n.value.iLine truncated
File diff suppressed because it is too large. Load diff