@macrulez/devtoolz 0.4.3 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/README.md +14 -172
  2. package/dist/cli.js +13 -125
  3. package/dist/cli.js.map +1 -1
  4. package/dist/commands/ui/cli.js +1 -1
  5. package/dist/commands/ui/cli.js.map +1 -1
  6. package/dist/commands/ui/fs-routes.d.ts +0 -4
  7. package/dist/commands/ui/fs-routes.js +5 -78
  8. package/dist/commands/ui/fs-routes.js.map +1 -1
  9. package/dist/commands/ui/modules/cleanup.js +2 -2
  10. package/dist/commands/ui/modules/cleanup.js.map +1 -1
  11. package/dist/commands/ui/modules/index.js +1 -8
  12. package/dist/commands/ui/modules/index.js.map +1 -1
  13. package/dist/index.d.ts +0 -9
  14. package/dist/index.js +0 -5
  15. package/dist/index.js.map +1 -1
  16. package/dist/ui/assets/ChecksPage-FhzZT8lq.js +1 -0
  17. package/dist/ui/assets/ChecksPage-ZoPlxU6J.css +1 -0
  18. package/dist/ui/assets/CleanupPage-9PuXSO_G.css +1 -0
  19. package/dist/ui/assets/CleanupPage-LpbZ2AB-.js +4 -0
  20. package/dist/ui/assets/highlight-Ba7TPCSA.js +2 -0
  21. package/dist/ui/assets/highlight-fNCqOka7.css +1 -0
  22. package/dist/ui/assets/{index-Ch5kTxCO.css → index-BzfkjuG8.css} +1 -1
  23. package/dist/ui/assets/index-DTj3rBik.js +3 -0
  24. package/dist/ui/index.html +2 -2
  25. package/dist/utils/atomic-write.d.ts +1 -0
  26. package/dist/utils/atomic-write.js +15 -0
  27. package/dist/utils/atomic-write.js.map +1 -0
  28. package/dist/utils/backup-error.d.ts +2 -0
  29. package/dist/utils/backup-error.js +3 -0
  30. package/dist/utils/backup-error.js.map +1 -0
  31. package/dist/utils/backup.d.ts +19 -0
  32. package/dist/utils/backup.js +33 -0
  33. package/dist/utils/backup.js.map +1 -0
  34. package/dist/utils/restore.d.ts +28 -0
  35. package/dist/utils/restore.js +88 -0
  36. package/dist/utils/restore.js.map +1 -0
  37. package/package.json +1 -6
  38. package/dist/ui/assets/ChecksPage-Ia4QJkV3.js +0 -1
  39. package/dist/ui/assets/ChecksPage-VewKhd5A.css +0 -1
  40. package/dist/ui/assets/CleanupPage-DqqrgWSI.js +0 -4
  41. package/dist/ui/assets/CleanupPage-nxJE8S0P.css +0 -1
  42. package/dist/ui/assets/FolderBrowser-Cdzt7edI.js +0 -1
  43. package/dist/ui/assets/FolderBrowser-CkH9R4jg.css +0 -1
  44. package/dist/ui/assets/ImageBatchPage-9HgS9uVf.js +0 -4
  45. package/dist/ui/assets/ImageBatchPage-EhlvnXbP.css +0 -1
  46. package/dist/ui/assets/ImageHashPage-BT4S8t3Y.css +0 -1
  47. package/dist/ui/assets/ImageHashPage-C0ltmpOF.js +0 -1
  48. package/dist/ui/assets/SourcePicker-6fQmtLgo.css +0 -1
  49. package/dist/ui/assets/SourcePicker-xk00AG2e.js +0 -1
  50. package/dist/ui/assets/UiSegmented-BT3dOelo.css +0 -1
  51. package/dist/ui/assets/UiSegmented-CsTRUZoX.js +0 -1
  52. package/dist/ui/assets/highlight-DT7vvdYt.js +0 -2
  53. package/dist/ui/assets/index-D8H-zVzo.js +0 -11
  54. package/dist/ui/assets/useCopy-i_vlQfC-.js +0 -1
@@ -0,0 +1,3 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ChecksPage-FhzZT8lq.js","assets/highlight-Ba7TPCSA.js","assets/highlight-fNCqOka7.css","assets/ChecksPage-ZoPlxU6J.css","assets/CleanupPage-LpbZ2AB-.js","assets/CleanupPage-9PuXSO_G.css"])))=>i.map(i=>d[i]);
2
+ (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))s(r);new MutationObserver(r=>{for(const i of r)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&s(o)}).observe(document,{childList:!0,subtree:!0});function n(r){const i={};return r.integrity&&(i.integrity=r.integrity),r.referrerPolicy&&(i.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?i.credentials="include":r.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function s(r){if(r.ep)return;r.ep=!0;const i=n(r);fetch(r.href,i)}})();function Yn(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const H={},nt=[],Re=()=>{},cr=()=>!1,an=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),dn=e=>e.startsWith("onUpdate:"),Y=Object.assign,Xn=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},bi=Object.prototype.hasOwnProperty,K=(e,t)=>bi.call(e,t),P=Array.isArray,qe=e=>Nt(e)==="[object Map]",at=e=>Nt(e)==="[object Set]",Cs=e=>Nt(e)==="[object Date]",I=e=>typeof e=="function",J=e=>typeof e=="string",ve=e=>typeof e=="symbol",W=e=>e!==null&&typeof e=="object",fr=e=>(W(e)||I(e))&&I(e.then)&&I(e.catch),ur=Object.prototype.toString,Nt=e=>ur.call(e),xi=e=>Nt(e).slice(8,-1),ar=e=>Nt(e)==="[object Object]",Zn=e=>J(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Ct=Yn(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),hn=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},wi=/-\w/g,se=hn(e=>e.replace(wi,t=>t.slice(1).toUpperCase())),Si=/\B([A-Z])/g,Ue=hn(e=>e.replace(Si,"-$1").toLowerCase()),pn=hn(e=>e.charAt(0).toUpperCase()+e.slice(1)),On=hn(e=>e?`on${pn(e)}`:""),Q=(e,t)=>!Object.is(e,t),Gt=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},dr=(e,t,n,s=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},Qn=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let Es;const gn=()=>Es||(Es=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function es(e){if(P(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],r=J(s)?Oi(s):es(s);if(r)for(const i in r)t[i]=r[i]}return t}else if(J(e)||W(e))return e}const Ci=/;(?![^(]*\))/g,Ei=/:([^]+)/,Ti=/"(?:[^"\\]|\\[^])*"|'(?:[^'\\]|\\[^])*'|\\[^]|\/\*[^]*?\*\//g;function Oi(e){const t={};return e.replace(Ti,n=>n.startsWith("/*")?"":n).split(Ci).forEach(n=>{if(n){const s=n.split(Ei);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function mn(e){let t="";if(J(e))t=e;else if(P(e))for(let n=0;n<e.length;n++){const s=mn(e[n]);s&&(t+=s+" ")}else if(W(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const Mi="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Ai=Yn(Mi);function hr(e){return!!e||e===""}function Pi(e,t,n){if(e.length!==t.length)return!1;let s=!0;for(let r=0;s&&r<e.length;r++)s=pt(e[r],t[r],n);return s}function Ts(e,t,n){if(e.size!==t.size)return!1;const s=Array.from(t),r=new Uint8Array(s.length);for(const i of e){let o=-1;for(let l=0;l<s.length;l++)if(!r[l]&&pt(i,s[l],n)){o=l;break}if(o<0)return!1;r[o]=1}return!0}function Ri(e,t,n){let s=qe(e),r=qe(t);if(s||r||(s=at(e),r=at(t),s||r))return s&&r?Ts(e,t,n):!1;const i=Object.keys(e).length,o=Object.keys(t).length;if(i!==o)return!1;for(const l in e){const f=e.hasOwnProperty(l),d=t.hasOwnProperty(l);if(f&&!d||!f&&d||!pt(e[l],t[l],n))return!1}return String(e)===String(t)}function Os(e,t,n,s){n||(n=[new Map,new Map]);const[r,i]=n;if(r.has(e)||i.has(t))return r.get(e)===t&&i.get(t)===e;r.set(e,t),i.set(t,e);const o=s(e,t,n);return r.delete(e),i.delete(t),o}function pt(e,t,n){if(e===t)return!0;let s=Cs(e),r=Cs(t);return s||r?s&&r?e.getTime()===t.getTime():!1:(s=ve(e),r=ve(t),s||r?e===t:(s=P(e),r=P(t),s||r?s&&r?Os(e,t,n,Pi):!1:(s=W(e),r=W(t),s||r?!s||!r?!1:Os(e,t,n,Ri):String(e)===String(t))))}function pr(e,t){return e.findIndex(n=>pt(n,t))}const gr=e=>!!(e&&e.__v_isRef===!0),Yt=e=>J(e)?e:e==null?"":P(e)||W(e)&&(e.toString===ur||!I(e.toString))?gr(e)?Yt(e.value):JSON.stringify(e,mr,2):String(e),mr=(e,t)=>gr(t)?mr(e,t.value):qe(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,r],i)=>(n[Mn(s,i)+" =>"]=r,n),{})}:at(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Mn(n))}:ve(t)?Mn(t):W(t)&&!P(t)&&!ar(t)?String(t):t,Mn=(e,t="")=>{var n;return ve(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};let Z;class Ii{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&Z&&(Z.active?(this.parent=Z,this.index=(Z.scopes||(Z.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes){const s=this.scopes.slice();for(t=0,n=s.length;t<n;t++)s[t].pause()}for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes){const r=this.scopes.slice();for(t=0,n=r.length;t<n;t++)r[t].resume()}const s=this.effects.slice();for(t=0,n=s.length;t<n;t++)s[t].resume()}}run(t){if(this._active){const n=Z;try{return Z=this,t()}finally{Z=n}}}on(){++this._on===1&&(this.prevScope=Z,Z=this)}off(){if(this._on>0&&--this._on===0){if(Z===this)Z=this.prevScope;else{let t=Z;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let n,s;for(n=0,s=this.effects.length;n<s;n++)this.effects[n].stop();for(this.effects.length=0,n=0,s=this.cleanups.length;n<s;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){const r=this.scopes.slice();for(n=0,s=r.length;n<s;n++)r[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 Fi(){return Z}let q;const An=new WeakSet;class _r{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,Z&&(Z.active?Z.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,An.has(this)&&(An.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||vr(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Ms(this),br(this);const t=q,n=ye;q=this,ye=!0;try{return this.fn()}finally{xr(this),q=t,ye=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)ss(t);this.deps=this.depsTail=void 0,Ms(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?An.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){$n(this)&&this.run()}get dirty(){return $n(this)}}let yr=0,Et,Tt;function vr(e,t=!1){if(e.flags|=8,t){e.next=Tt,Tt=e;return}e.next=Et,Et=e}function ts(){yr++}function ns(){if(--yr>0)return;if(Tt){let t=Tt;for(Tt=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;Et;){let t=Et;for(Et=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 br(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function xr(e){let t,n=e.depsTail,s=n;for(;s;){const r=s.prevDep;s.version===-1?(s===n&&(n=r),ss(s),Ni(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=r}e.deps=t,e.depsTail=n}function $n(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(wr(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function wr(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===At)||(e.globalVersion=At,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!$n(e))))return;e.flags|=2;const t=e.dep,n=q,s=ye;q=e,ye=!0;try{br(e);const r=e.fn(e._value);(t.version===0||Q(r,e._value))&&(e.flags|=128,e._value=r,t.version++)}catch(r){throw t.version++,r}finally{q=n,ye=s,xr(e),e.flags&=-3}}function ss(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)ss(i,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Ni(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let ye=!0;const Sr=[];function $e(){Sr.push(ye),ye=!1}function Ke(){const e=Sr.pop();ye=e===void 0?!0:e}function Ms(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=q;q=void 0;try{t()}finally{q=n}}}let At=0;class Di{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 _n{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!q||!ye||q===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==q)n=this.activeLink=new Di(q,this),q.deps?(n.prevDep=q.depsTail,q.depsTail.nextDep=n,q.depsTail=n):q.deps=q.depsTail=n,Cr(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=q.depsTail,n.nextDep=void 0,q.depsTail.nextDep=n,q.depsTail=n,q.deps===n&&(q.deps=s)}return n}trigger(t){this.version++,At++,this.notify(t)}notify(t){ts();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{ns()}}}function Cr(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)Cr(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Kn=new WeakMap,rt=Symbol(""),Un=Symbol(""),Pt=Symbol("");function ne(e,t,n){if(ye&&q){let s=Kn.get(e);s||Kn.set(e,s=new Map);let r=s.get(n);r||(s.set(n,r=new _n),r.map=s,r.key=n),r.track()}}function Le(e,t,n,s,r,i){const o=Kn.get(e);if(!o){At++;return}const l=f=>{f&&f.trigger()};if(ts(),t==="clear")o.forEach(l);else{const f=P(e),d=f&&Zn(n);if(f&&n==="length"){const u=Number(s);o.forEach((p,v)=>{(v==="length"||v===Pt||!ve(v)&&v>=u)&&l(p)})}else switch((n!==void 0||o.has(void 0))&&l(o.get(n)),d&&l(o.get(Pt)),t){case"add":f?d&&l(o.get("length")):(l(o.get(rt)),qe(e)&&l(o.get(Un)));break;case"delete":f||(l(o.get(rt)),qe(e)&&l(o.get(Un)));break;case"set":qe(e)&&l(o.get(rt));break}}ns()}function it(e){const t=$(e);return t===e||(ne(t,"iterate",Pt),ge(e))?t:Ie(e)?ze(e)?t.map(n=>Je(me(n))):t.map(Je):t.map(me)}function yn(e){return ne(e=$(e),"iterate",Pt),e}function Ae(e,t){return Ie(e)?Je(ze(e)?me(t):t):me(t)}const Vi={__proto__:null,[Symbol.iterator](){return Pn(this,Symbol.iterator,e=>Ae(this,e))},concat(...e){return it(this).concat(...e.map(t=>P(t)?it(t):t))},entries(){return Pn(this,"entries",e=>(e[1]=Ae(this,e[1]),e))},every(e,t){return Ne(this,"every",e,t,void 0,arguments)},filter(e,t){return Ne(this,"filter",e,t,n=>n.map(s=>Ae(this,s)),arguments)},find(e,t){return Ne(this,"find",e,t,n=>Ae(this,n),arguments)},findIndex(e,t){return Ne(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Ne(this,"findLast",e,t,n=>Ae(this,n),arguments)},findLastIndex(e,t){return Ne(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Ne(this,"forEach",e,t,void 0,arguments)},includes(...e){return Rn(this,"includes",e)},indexOf(...e){return Rn(this,"indexOf",e)},join(e){return it(this).join(e)},lastIndexOf(...e){return Rn(this,"lastIndexOf",e)},map(e,t){return Ne(this,"map",e,t,void 0,arguments)},pop(){return vt(this,"pop")},push(...e){return vt(this,"push",e)},reduce(e,...t){return As(this,"reduce",e,t)},reduceRight(e,...t){return As(this,"reduceRight",e,t)},shift(){return vt(this,"shift")},some(e,t){return Ne(this,"some",e,t,void 0,arguments)},splice(...e){return vt(this,"splice",e)},toReversed(){return it(this).toReversed()},toSorted(e){return it(this).toSorted(e)},toSpliced(...e){return it(this).toSpliced(...e)},unshift(...e){return vt(this,"unshift",e)},values(){return Pn(this,"values",e=>Ae(this,e))}};function Pn(e,t,n){const s=yn(e),r=s[t]();return s!==e&&!ge(e)&&(r._next=r.next,r.next=()=>{const i=r._next();return i.done||(i.value=n(i.value)),i}),r}const Li=Array.prototype;function Ne(e,t,n,s,r,i){const o=yn(e),l=o!==e&&!ge(e),f=o[t];if(f!==Li[t]){const p=f.apply(e,i);return l?me(p):p}let d=n;o!==e&&(l?d=function(p,v){return n.call(this,Ae(e,p),v,e)}:n.length>2&&(d=function(p,v){return n.call(this,p,v,e)}));const u=f.call(o,d,s);return l&&r?r(u):u}function As(e,t,n,s){const r=yn(e),i=r!==e&&!ge(e);let o=n,l=!1;r!==e&&(i?(l=s.length===0,o=function(d,u,p){return l&&(l=!1,d=Ae(e,d)),n.call(this,d,Ae(e,u),p,e)}):n.length>3&&(o=function(d,u,p){return n.call(this,d,u,p,e)}));const f=r[t](o,...s);return l?Ae(e,f):f}function Rn(e,t,n){const s=$(e);ne(s,"iterate",Pt);const r=s[t](...n);return(r===-1||r===!1)&&ls(n[0])?(n[0]=$(n[0]),s[t](...n)):r}function vt(e,t,n=[]){$e(),ts();const s=$(e)[t].apply(e,n);return ns(),Ke(),s}const Hi=Yn("__proto__,__v_isRef,__isVue"),Er=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(ve));function ji(e){ve(e)||(e=String(e));const t=$(this);return ne(t,"has",e),t.hasOwnProperty(e)}class Tr{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){if(n==="__v_skip")return t.__v_skip;const r=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return i;if(n==="__v_raw")return s===(r?i?Gi:Pr:i?Ar:Mr).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const o=P(t);if(!r){let f;if(o&&(f=Vi[n]))return f;if(n==="hasOwnProperty")return ji}const l=Reflect.get(t,n,re(t)?t:s);if((ve(n)?Er.has(n):Hi(n))||(r||ne(t,"get",n),i))return l;if(re(l)){const f=o&&Zn(n)?l:l.value;return r&&W(f)?Bn(f):f}return W(l)?r?Bn(l):is(l):l}}class Or extends Tr{constructor(t=!1){super(!1,t)}set(t,n,s,r){let i=t[n];const o=P(t)&&Zn(n);if(!this._isShallow){const d=Ie(i);if(!ge(s)&&!Ie(s)&&(i=$(i),s=$(s)),!o&&re(i)&&!re(s))return d||(i.value=s),!0}const l=o?Number(n)<t.length:K(t,n),f=Reflect.set(t,n,s,re(t)?t:r);return t===$(r)&&f&&(l?Q(s,i)&&Le(t,"set",n,s):Le(t,"add",n,s)),f}deleteProperty(t,n){const s=K(t,n);t[n];const r=Reflect.deleteProperty(t,n);return r&&s&&Le(t,"delete",n,void 0),r}has(t,n){const s=Reflect.has(t,n);return(!ve(n)||!Er.has(n))&&ne(t,"has",n),s}ownKeys(t){return ne(t,"iterate",P(t)?"length":rt),Reflect.ownKeys(t)}}class $i extends Tr{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const Ki=new Or,Ui=new $i,Wi=new Or(!0);const Wn=e=>e,Wt=e=>Reflect.getPrototypeOf(e);function Bi(e,t,n){return function(...s){const r=this.__v_raw,i=$(r),o=qe(i),l=e==="entries"||e===Symbol.iterator&&o,f=e==="keys"&&o,d=r[e](...s),u=n?Wn:t?Je:me;return!t&&ne(i,"iterate",f?Un:rt),Y(Object.create(d),{next(){const{value:p,done:v}=d.next();return v?{value:p,done:v}:{value:l?[u(p[0]),u(p[1])]:u(p),done:v}}})}}function Bt(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function ki(e,t){const n={get(r){const i=this.__v_raw,o=$(i),l=$(r);e||(Q(r,l)&&ne(o,"get",r),ne(o,"get",l));const{has:f}=Wt(o),d=t?Wn:e?Je:me;if(f.call(o,r))return d(i.get(r));if(f.call(o,l))return d(i.get(l));i!==o&&i.get(r)},get size(){const r=this.__v_raw;return!e&&ne($(r),"iterate",rt),r.size},has(r){const i=this.__v_raw,o=$(i),l=$(r);return e||(Q(r,l)&&ne(o,"has",r),ne(o,"has",l)),r===l?i.has(r):i.has(r)||i.has(l)},forEach(r,i){const o=this,l=o.__v_raw,f=$(l),d=t?Wn:e?Je:me;return!e&&ne(f,"iterate",rt),l.forEach((u,p)=>r.call(i,d(u),d(p),o))}};return Y(n,e?{add:Bt("add"),set:Bt("set"),delete:Bt("delete"),clear:Bt("clear")}:{add(r){const i=$(this),o=Wt(i),l=$(r),f=!t&&!ge(r)&&!Ie(r)?l:r;return o.has.call(i,f)||Q(r,f)&&o.has.call(i,r)||Q(l,f)&&o.has.call(i,l)||(i.add(f),Le(i,"add",f,f)),this},set(r,i){!t&&!ge(i)&&!Ie(i)&&(i=$(i));const o=$(this),{has:l,get:f}=Wt(o);let d=l.call(o,r);d||(r=$(r),d=l.call(o,r));const u=f.call(o,r);return o.set(r,i),d?Q(i,u)&&Le(o,"set",r,i):Le(o,"add",r,i),this},delete(r){const i=$(this),{has:o,get:l}=Wt(i);let f=o.call(i,r);f||(r=$(r),f=o.call(i,r)),l&&l.call(i,r);const d=i.delete(r);return f&&Le(i,"delete",r,void 0),d},clear(){const r=$(this),i=r.size!==0,o=r.clear();return i&&Le(r,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=Bi(r,e,t)}),n}function rs(e,t){const n=ki(e,t);return(s,r,i)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?s:Reflect.get(K(n,r)&&r in s?n:s,r,i)}const qi={get:rs(!1,!1)},zi={get:rs(!1,!0)},Ji={get:rs(!0,!1)};const Mr=new WeakMap,Ar=new WeakMap,Pr=new WeakMap,Gi=new WeakMap;function Yi(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function is(e){return Ie(e)?e:os(e,!1,Ki,qi,Mr)}function Xi(e){return os(e,!1,Wi,zi,Ar)}function Bn(e){return os(e,!0,Ui,Ji,Pr)}function os(e,t,n,s,r){if(!W(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const i=r.get(e);if(i)return i;const o=Yi(xi(e));if(o===0)return e;const l=new Proxy(e,o===2?s:n);return r.set(e,l),l}function ze(e){return Ie(e)?ze(e.__v_raw):!!(e&&e.__v_isReactive)}function Ie(e){return!!(e&&e.__v_isReadonly)}function ge(e){return!!(e&&e.__v_isShallow)}function ls(e){return e?!!e.__v_raw:!1}function $(e){const t=e&&e.__v_raw;return t?$(t):e}function Zi(e){return!K(e,"__v_skip")&&Object.isExtensible(e)&&dr(e,"__v_skip",!0),e}const me=e=>W(e)?is(e):e,Je=e=>W(e)?Bn(e):e;function re(e){return e?e.__v_isRef===!0:!1}function lt(e){return Qi(e,!1)}function Qi(e,t){return re(e)?e:new eo(e,t)}class eo{constructor(t,n){this.dep=new _n,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:$(t),this._value=n?t:me(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||ge(t)||Ie(t);t=s?t:$(t),Q(t,n)&&(this._rawValue=t,this._value=s?t:me(t),this.dep.trigger())}}function Rr(e){return re(e)?e.value:e}const to={get:(e,t,n)=>t==="__v_raw"?e:Rr(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const r=e[t];return re(r)&&!re(n)?(r.value=n,!0):Reflect.set(e,t,n,s)}};function Ir(e){return ze(e)?e:new Proxy(e,to)}class no{constructor(t){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new _n,{get:s,set:r}=t(n.track.bind(n),n.trigger.bind(n));this._get=s,this._set=r}get value(){return this._value=this._get()}set value(t){this._set(t)}}function so(e){return new no(e)}class ro{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new _n(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=At-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&q!==this)return vr(this,!0),!0}get value(){const t=this.dep.track();return wr(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function io(e,t,n=!1){let s,r;return I(e)?s=e:(s=e.get,r=e.set),new ro(s,r,n)}const kt={},en=new WeakMap;let et;function oo(e,t=!1,n=et){if(n){let s=en.get(n);s||en.set(n,s=[]),s.push(e)}}function lo(e,t,n=H){const{immediate:s,deep:r,once:i,scheduler:o,augmentJob:l,call:f}=n,d=O=>r?O:ge(O)||r===!1||r===0?He(O,1):He(O);let u,p,v,C,T=!1,w=!1;if(re(e)?(p=()=>e.value,T=ge(e)):ze(e)?(p=()=>d(e),T=!0):P(e)?(w=!0,T=e.some(O=>ze(O)||ge(O)),p=()=>e.map(O=>{if(re(O))return O.value;if(ze(O))return d(O);if(I(O))return f?f(O,2):O()})):I(e)?t?p=f?()=>f(e,2):e:p=()=>{if(v){$e();try{v()}finally{Ke()}}const O=et;et=u;try{return f?f(e,3,[C]):e(C)}finally{et=O}}:p=Re,t&&r){const O=p,D=r===!0?1/0:r;p=()=>He(O(),D)}const j=Fi(),V=()=>{u.stop(),j&&j.active&&Xn(j.effects,u)};if(i&&t){const O=t;t=(...D)=>{const pe=O(...D);return V(),pe}}let F=w?new Array(e.length).fill(kt):kt;const N=O=>{if(!(!(u.flags&1)||!u.dirty&&!O))if(t){const D=u.run();if(O||r||T||(w?D.some((pe,xe)=>Q(pe,F[xe])):Q(D,F))){v&&v();const pe=et;et=u;try{const xe=[D,F===kt?void 0:w&&F[0]===kt?[]:F,C];F=D,f?f(t,3,xe):t(...xe)}finally{et=pe}}}else u.run()};return l&&l(N),u=new _r(p),u.scheduler=o?()=>o(N,!1):N,C=O=>oo(O,!1,u),v=u.onStop=()=>{const O=en.get(u);if(O){if(f)f(O,4);else for(const D of O)D();en.delete(u)}},t?s?N(!0):F=u.run():o?o(N.bind(null,!0),!0):u.run(),V.pause=u.pause.bind(u),V.resume=u.resume.bind(u),V.stop=V,V}function He(e,t=1/0,n){if(t<=0||!W(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,re(e))He(e.value,t,n);else if(P(e))for(let s=0;s<e.length;s++)He(e[s],t,n);else if(at(e)||qe(e))e.forEach(s=>{He(s,t,n)});else if(ar(e)){for(const s in e)He(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&He(e[s],t,n)}return e}function Dt(e,t,n,s){try{return s?e(...s):e()}catch(r){Vt(r,t,n)}}function be(e,t,n,s){if(I(e)){const r=Dt(e,t,n,s);return r&&fr(r)&&r.catch(i=>{Vt(i,t,n)}),r}if(P(e)){const r=[];for(let i=0;i<e.length;i++)r.push(be(e[i],t,n,s));return r}}function Vt(e,t,n,s=!0){const r=t?t.vnode:null,{errorHandler:i,throwUnhandledErrorInProduction:o}=t&&t.appContext.config||H;if(t){let l=t.parent;const f=t.proxy,d=`https://vuejs.org/error-reference/#runtime-${n}`;for(;l;){const u=l.ec;if(u){for(let p=0;p<u.length;p++)if(u[p](e,f,d)===!1)return}l=l.parent}if(i){$e(),Dt(i,null,10,[e,f,d]),Ke();return}}co(e,n,r,s,o)}function co(e,t,n,s=!0,r=!1){if(r)throw e;console.error(e)}const ce=[];let Te=-1;const ct=[];let ke=null,ot=0;const Fr=Promise.resolve();let tn=null;function fo(e){const t=tn||Fr;return e?t.then(this?e.bind(this):e):t}function uo(e){let t=Te+1,n=ce.length;for(;t<n;){const s=t+n>>>1,r=ce[s],i=Rt(r);i<e||i===e&&r.flags&2?t=s+1:n=s}return t}function cs(e){if(!(e.flags&1)){const t=Rt(e),n=ce[ce.length-1];!n||!(e.flags&2)&&t>=Rt(n)?ce.push(e):ce.splice(uo(t),0,e),e.flags|=1,Nr()}}function Nr(){tn||(tn=Fr.then(Vr))}function ao(e){if(!P(e))ke&&e.id===-1?ke.splice(ot+1,0,e):e.flags&1||(ct.push(e),e.flags|=1);else for(let t=0;t<e.length;t++)ct.push(e[t]);Nr()}function Ps(e,t,n=Te+1){for(;n<ce.length;n++){const s=ce[n];if(s&&s.flags&2){if(e&&s.id!==e.uid)continue;ce.splice(n,1),n--,s.flags&4&&(s.flags&=-2),s(),s.flags&4||(s.flags&=-2)}}}function Dr(e){if(ct.length){const t=[...new Set(ct)].sort((n,s)=>Rt(n)-Rt(s));if(ct.length=0,ke){for(let n=0;n<t.length;n++)ke.push(t[n]);return}for(ke=t,ot=0;ot<ke.length;ot++){const n=ke[ot];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}ke=null,ot=0}}const Rt=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Vr(e){try{for(Te=0;Te<ce.length;Te++){const t=ce[Te];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),Dt(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Te<ce.length;Te++){const t=ce[Te];t&&(t.flags&=-2)}Te=-1,ce.length=0,Dr(),tn=null,(ce.length||ct.length)&&Vr()}}let te=null,Lr=null;function nn(e){const t=te;return te=e,Lr=e&&e.type.__scopeId||null,t}function ho(e,t=te,n){if(!t||e._n)return e;const s=(...r)=>{s._d&&Ws(-1);const i=nn(t),o=je.length;let l;try{l=e(...r)}finally{for(let f=je.length;f>o;f--)ms();nn(i),s._d&&Ws(1)}return l};return s._n=!0,s._c=!0,s._d=!0,s}function Sc(e,t){if(te===null)return e;const n=Cn(te),s=e.dirs||(e.dirs=[]);for(let r=0;r<t.length;r++){let[i,o,l,f=H]=t[r];i&&(I(i)&&(i={mounted:i,updated:i}),i.deep&&He(o),s.push({dir:i,instance:n,value:o,oldValue:void 0,arg:l,modifiers:f}))}return e}function Ze(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 f=l.dir[s];f&&($e(),be(f,n,8,[e.el,l,e,t]),Ke())}}function po(e,t){if(ee){let n=ee.provides;const s=ee.parent&&ee.parent.provides;s===n&&(n=ee.provides=Object.create(s)),n[e]=t}}function Xt(e,t,n=!1){const s=di();if(s||ut){let r=ut?ut._context.provides:s?s.parent==null||s.ce?s.vnode.appContext&&s.vnode.appContext.provides:s.parent.provides:void 0;if(r&&e in r)return r[e];if(arguments.length>1)return n&&I(t)?t.call(s&&s.proxy):t}}const go=Symbol.for("v-scx"),mo=()=>Xt(go);function _o(e,t){return fs(e,null,{flush:"sync"})}function In(e,t,n){return fs(e,t,n)}function fs(e,t,n=H){const{immediate:s,deep:r,flush:i,once:o}=n,l=Y({},n),f=t&&s||!t&&i!=="post";let d;if(ht){if(i==="sync"){const C=mo();d=C.__watcherHandles||(C.__watcherHandles=[])}else if(!f){const C=()=>{};return C.stop=Re,C.resume=Re,C.pause=Re,C}}const u=ee;l.call=(C,T,w)=>be(C,u,T,w);let p=!1;i==="post"?l.scheduler=C=>{fe(C,u&&u.suspense)}:i!=="sync"&&(p=!0,l.scheduler=(C,T)=>{T?C():cs(C)}),l.augmentJob=C=>{t&&(C.flags|=4),p&&(C.flags|=2,u&&(C.id=u.uid,C.i=u))};const v=lo(e,t,l);return ht&&(d?d.push(v):f&&v()),v}function yo(e,t,n){const s=this.proxy,r=J(e)?e.includes(".")?Hr(s,e):()=>s[e]:e.bind(s,s);let i;I(t)?i=t:(i=t.handler,n=t);const o=Lt(this),l=fs(r,i.bind(s),n);return o(),l}function Hr(e,t){const n=t.split(".");return()=>{let s=e;for(let r=0;r<n.length&&s;r++)s=s[n[r]];return s}}const vo=Symbol("_vte"),vn=e=>e.__isTeleport,Fn=Symbol("_leaveCb");function bo(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==Fe){t=n;break}}return t}function jr(e){if(!bn(e))return vn(e.type)&&e.children?bo(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&I(n.default))return n.default()}}function us(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;const n=e.component.subTree;us(vn(n.type)&&jr(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 as(e,t){return I(e)?Y({name:e.name},t,{setup:e}):e}function ds(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Rs(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const sn=new WeakMap;function Ot(e,t,n,s,r=!1){if(P(e)){e.forEach((w,j)=>Ot(w,t&&(P(t)?t[j]:t),n,s,r));return}if(ft(s)&&!r){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&Ot(e,t,n,s.component.subTree);return}const i=s.shapeFlag&4?Cn(s.component):s.el,o=r?null:i,{i:l,r:f}=e,d=t&&t.r,u=l.refs===H?l.refs={}:l.refs,p=l.setupState,v=$(p),C=p===H?cr:w=>Rs(u,w)?!1:K(v,w),T=(w,j)=>!(j&&Rs(u,j));if(d!=null&&d!==f){if(Is(t),J(d))u[d]=null,C(d)&&(p[d]=null);else if(re(d)){const w=t;T(d,w.k)&&(d.value=null),w.k&&(u[w.k]=null)}}if(I(f))Dt(f,l,12,[o,u]);else{const w=J(f),j=re(f);if(w||j){const V=()=>{if(e.f){const F=w?C(f)?p[f]:u[f]:T()||!e.k?f.value:u[e.k];if(r)P(F)&&Xn(F,i);else if(P(F))F.includes(i)||F.push(i);else if(w)u[f]=[i],C(f)&&(p[f]=u[f]);else{const N=[i];T(f,e.k)&&(f.value=N),e.k&&(u[e.k]=N)}}else w?(u[f]=o,C(f)&&(p[f]=o)):j&&(T(f,e.k)&&(f.value=o),e.k&&(u[e.k]=o))};if(o){const F=()=>{V(),sn.delete(e)};F.id=-1,sn.set(e,F),fe(F,n)}else Is(e),V()}}}function Is(e){const t=sn.get(e);t&&(t.flags|=8,sn.delete(e))}const Fs=e=>e.nodeType===8;gn().requestIdleCallback;gn().cancelIdleCallback;function xo(e,t){if(Fs(e)&&e.data==="["){let n=1,s=e.nextSibling;for(;s;){if(s.nodeType===1){if(t(s)===!1)break}else if(Fs(s))if(s.data==="]"){if(--n===0)break}else s.data==="["&&n++;s=s.nextSibling}}else t(e)}const ft=e=>!!e.type.__asyncLoader;function Ns(e){I(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:s,delay:r=200,hydrate:i,timeout:o,suspensible:l=!0,onError:f}=e;let d=null,u,p=0;const v=()=>(p++,d=null,C()),C=()=>{let T;return d||(T=d=t().catch(w=>{if(w=w instanceof Error?w:new Error(String(w)),f)return new Promise((j,V)=>{f(w,()=>j(v()),()=>V(w),p+1)});throw w}).then(w=>T!==d&&d?d:(w&&(w.__esModule||w[Symbol.toStringTag]==="Module")&&(w=w.default),u=w,w)))};return as({name:"AsyncComponentWrapper",__asyncLoader:C,__asyncHydrate(T,w,j){const V=T.isConnected;let F=!1;(w.bu||(w.bu=[])).push(()=>F=!0);const N=()=>{F||!T.parentNode||V&&!T.isConnected||j()},O=i?()=>{const D=i(N,pe=>xo(T,pe));D&&(w.bum||(w.bum=[])).push(D)}:N;u?O():C().then(()=>!w.isUnmounted&&O())},get __asyncResolved(){return u},setup(){const T=ee;if(ds(T),u)return()=>qt(u,T);const w=D=>{d=null,Vt(D,T,13,!s)};if(l&&T.suspense||ht)return C().then(D=>()=>qt(D,T)).catch(D=>(w(D),()=>s?ie(s,{error:D}):null));const j=lt(!1),V=lt(),F=lt(!!r);let N,O;return hs(()=>{N!=null&&clearTimeout(N),O!=null&&clearTimeout(O)}),r&&(O=setTimeout(()=>{T.isUnmounted||(F.value=!1)},r)),o!=null&&(N=setTimeout(()=>{if(!T.isUnmounted&&!j.value&&!V.value){const D=new Error(`Async component timed out after ${o}ms.`);w(D),V.value=D}},o)),C().then(()=>{T.isUnmounted||(j.value=!0,T.parent&&bn(T.parent.vnode)&&T.parent.update())}).catch(D=>{if(T.isUnmounted){d=null;return}w(D),V.value=D}),()=>{if(j.value&&u)return qt(u,T);if(V.value&&s)return ie(s,{error:V.value});if(n&&!F.value)return qt(n,T)}}})}function qt(e,t){const{ref:n,props:s,children:r,ce:i}=t.vnode,o=ie(e,s,r);return o.ref=n,o.ce=i,delete t.vnode.ce,o}const bn=e=>e.type.__isKeepAlive;function wo(e,t){$r(e,"a",t)}function So(e,t){$r(e,"da",t)}function $r(e,t,n=ee){const s=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(xn(t,s,n),n){let r=n.parent;for(;r&&r.parent;)bn(r.parent.vnode)&&Co(s,t,n,r),r=r.parent}}function Co(e,t,n,s){const r=xn(t,e,s,!0);hs(()=>{Xn(s[t],r)},n)}function xn(e,t,n=ee,s=!1){if(n){const r=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...o)=>{$e();const l=Lt(n),f=be(t,n,e,o);return l(),Ke(),f});return s?r.unshift(i):r.push(i),i}}const We=e=>(t,n=ee)=>{(!ht||e==="sp")&&xn(e,(...s)=>t(...s),n)},Eo=We("bm"),Kr=We("m"),To=We("bu"),Oo=We("u"),Ur=We("bum"),hs=We("um"),Mo=We("sp"),Ao=We("rtg"),Po=We("rtc");function Ro(e,t=ee){xn("ec",e,t)}const Io="components",Wr=Symbol.for("v-ndc");function Fo(e){return J(e)?No(Io,e,!1)||e:e||Wr}function No(e,t,n=!0,s=!1){const r=te||ee;if(r){const i=r.type;{const l=_l(i,!1);if(l&&(l===t||l===se(t)||l===pn(se(t))))return i}const o=Ds(r[e]||i[e],t)||Ds(r.appContext[e],t);return!o&&s?i:o}}function Ds(e,t){return e&&(e[t]||e[se(t)]||e[pn(se(t))])}function Br(e,t,n,s){let r;const i=n,o=P(e);if(o||J(e)){const l=o&&ze(e);let f=!1,d=!1;l&&(f=!ge(e),d=Ie(e),e=yn(e)),r=new Array(e.length);for(let u=0,p=e.length;u<p;u++)r[u]=t(f?d?Je(me(e[u])):me(e[u]):e[u],u,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(W(e))if(e[Symbol.iterator])r=Array.from(e,(l,f)=>t(l,f,void 0,i));else{const l=Object.keys(e);r=new Array(l.length);for(let f=0,d=l.length;f<d;f++){const u=l[f];r[f]=t(e[u],u,f,i)}}else r=[];return r}function Cc(e,t,n,s,r,i){if(n==null&&(n={}),te.ce||te.parent&&ft(te.parent)&&te.parent.ce){const d=n,u=Object.keys(d).length>0;return t!=="default"&&(d.name=t),ue(),ln(ae,null,[ie("slot",d,s)],u?-2:64)}let o=e[t];o&&o._c&&(o._d=!1);const l=je.length;ue();let f;try{const d=o&&kr(o(n)),u=n.key||i||d&&d.key;f=ln(ae,{key:(u&&!ve(u)?u:`_${t}`)+(!d&&s?"_fb":"")},d||(s?s():[]),d&&e._===1?64:-2)}catch(d){for(let u=je.length;u>l;u--)ms();throw d}finally{o&&o._c&&(o._d=!0)}return f}function kr(e){return e.some(t=>_s(t)?!(t.type===Fe||t.type===ae&&!kr(t.children)):!0)?e:null}const kn=e=>e?hi(e)?Cn(e):kn(e.parent):null,Mt=Y(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=>kn(e.parent),$root:e=>kn(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>zr(e),$forceUpdate:e=>e.f||(e.f=()=>{cs(e.update)}),$nextTick:e=>e.n||(e.n=fo.bind(e.proxy)),$watch:e=>yo.bind(e)}),Nn=(e,t)=>e!==H&&!e.__isScriptSetup&&K(e,t),Do={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:r,props:i,accessCache:o,type:l,appContext:f}=e;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(Nn(s,t))return o[t]=1,s[t];if(r!==H&&K(r,t))return o[t]=2,r[t];if(K(i,t))return o[t]=3,i[t];if(n!==H&&K(n,t))return o[t]=4,n[t];qn&&(o[t]=0)}}const d=Mt[t];let u,p;if(d)return t==="$attrs"&&ne(e.attrs,"get",""),d(e);if((u=l.__cssModules)&&(u=u[t]))return u;if(n!==H&&K(n,t))return o[t]=4,n[t];if(p=f.config.globalProperties,K(p,t))return p[t]},set({_:e},t,n){const{data:s,setupState:r,ctx:i}=e;return Nn(r,t)?(r[t]=n,!0):s!==H&&K(s,t)?(s[t]=n,!0):K(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:r,props:i,type:o}},l){let f;return!!(n[l]||e!==H&&l[0]!=="$"&&K(e,l)||Nn(t,l)||K(i,l)||K(s,l)||K(Mt,l)||K(r.config.globalProperties,l)||(f=o.__cssModules)&&f[l])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:K(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function rn(e){return P(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function Ec(e,t){return!e||!t?e||t:P(e)&&P(t)?e.concat(t):Y({},rn(e),rn(t))}let qn=!0;function Vo(e){const t=zr(e),n=e.proxy,s=e.ctx;qn=!1,t.beforeCreate&&Vs(t.beforeCreate,e,"bc");const{data:r,computed:i,methods:o,watch:l,provide:f,inject:d,created:u,beforeMount:p,mounted:v,beforeUpdate:C,updated:T,activated:w,deactivated:j,beforeDestroy:V,beforeUnmount:F,destroyed:N,unmounted:O,render:D,renderTracked:pe,renderTriggered:xe,errorCaptured:Be,serverPrefetch:Ht,expose:Ge,inheritAttrs:gt,components:jt,directives:$t,filters:En}=t;if(d&&Lo(d,s,null),o)for(const z in o){const k=o[z];I(k)&&(s[z]=k.bind(n))}if(r){const z=r.call(n,n);W(z)&&(e.data=is(z))}if(qn=!0,i)for(const z in i){const k=i[z],Ye=I(k)?k.bind(n,n):I(k.get)?k.get.bind(n,n):Re,Kt=!I(k)&&I(k.set)?k.set.bind(n):Re,Xe=wt({get:Ye,set:Kt});Object.defineProperty(s,z,{enumerable:!0,configurable:!0,get:()=>Xe.value,set:_e=>Xe.value=_e})}if(l)for(const z in l)qr(l[z],s,n,z);if(f){const z=I(f)?f.call(n):f;Reflect.ownKeys(z).forEach(k=>{po(k,z[k])})}u&&Vs(u,e,"c");function oe(z,k){P(k)?k.forEach(Ye=>z(Ye.bind(n))):k&&z(k.bind(n))}if(oe(Eo,p),oe(Kr,v),oe(To,C),oe(Oo,T),oe(wo,w),oe(So,j),oe(Ro,Be),oe(Po,pe),oe(Ao,xe),oe(Ur,F),oe(hs,O),oe(Mo,Ht),P(Ge))if(Ge.length){const z=e.exposed||(e.exposed={});Ge.forEach(k=>{Object.defineProperty(z,k,{get:()=>n[k],set:Ye=>n[k]=Ye,enumerable:!0})})}else e.exposed||(e.exposed={});D&&e.render===Re&&(e.render=D),gt!=null&&(e.inheritAttrs=gt),jt&&(e.components=jt),$t&&(e.directives=$t),Ht&&ds(e)}function Lo(e,t,n=Re){P(e)&&(e=zn(e));for(const s in e){const r=e[s];let i;W(r)?"default"in r?i=Xt(r.from||s,r.default,!0):i=Xt(r.from||s):i=Xt(r),re(i)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>i.value,set:o=>i.value=o}):t[s]=i}}function Vs(e,t,n){be(P(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function qr(e,t,n,s){let r=s.includes(".")?Hr(n,s):()=>n[s];if(J(e)){const i=t[e];I(i)&&In(r,i)}else if(I(e))In(r,e.bind(n));else if(W(e))if(P(e))e.forEach(i=>qr(i,t,n,s));else{const i=I(e.handler)?e.handler.bind(n):t[e.handler];I(i)&&In(r,i,e)}}function zr(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:r,optionsCache:i,config:{optionMergeStrategies:o}}=e.appContext,l=i.get(t);let f;return l?f=l:!r.length&&!n&&!s?f=t:(f={},r.length&&r.forEach(d=>on(f,d,o,!0)),on(f,t,o)),W(t)&&i.set(t,f),f}function on(e,t,n,s=!1){const{mixins:r,extends:i}=t;i&&on(e,i,n,!0),r&&r.forEach(o=>on(e,o,n,!0));for(const o in t)if(!(s&&o==="expose")){const l=Ho[o]||n&&n[o];e[o]=l?l(e[o],t[o]):t[o]}return e}const Ho={data:Ls,props:Hs,emits:Hs,methods:xt,computed:xt,beforeCreate:le,created:le,beforeMount:le,mounted:le,beforeUpdate:le,updated:le,beforeDestroy:le,beforeUnmount:le,destroyed:le,unmounted:le,activated:le,deactivated:le,errorCaptured:le,serverPrefetch:le,components:xt,directives:xt,watch:$o,provide:Ls,inject:jo};function Ls(e,t){return t?e?function(){return Y(I(e)?e.call(this,this):e,I(t)?t.call(this,this):t)}:t:e}function jo(e,t){return xt(zn(e),zn(t))}function zn(e){if(P(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function le(e,t){return e?[...new Set([].concat(e,t))]:t}function xt(e,t){return e?Y(Object.create(null),e,t):t}function Hs(e,t){return e?P(e)&&P(t)?[...new Set([...e,...t])]:Y(Object.create(null),rn(e),rn(t??{})):t}function $o(e,t){if(!e)return t;if(!t)return e;const n=Y(Object.create(null),e);for(const s in t)n[s]=le(e[s],t[s]);return n}function Jr(){return{app:null,config:{isNativeTag:cr,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Ko=0;function Uo(e,t){return function(s,r=null){I(s)||(s=Y({},s)),r!=null&&!W(r)&&(r=null);const i=Jr(),o=new WeakSet,l=[];let f=!1;const d=i.app={_uid:Ko++,_component:s,_props:r,_container:null,_context:i,_instance:null,version:vl,get config(){return i.config},set config(u){},use(u,...p){return o.has(u)||(u&&I(u.install)?(o.add(u),u.install(d,...p)):I(u)&&(o.add(u),u(d,...p))),d},mixin(u){return i.mixins.includes(u)||i.mixins.push(u),d},component(u,p){return p?(i.components[u]=p,d):i.components[u]},directive(u,p){return p?(i.directives[u]=p,d):i.directives[u]},mount(u,p,v){if(!f){const C=d._ceVNode||ie(s,r);return C.appContext=i,v===!0?v="svg":v===!1&&(v=void 0),e(C,u,v),f=!0,d._container=u,u.__vue_app__=d,Cn(C.component)}},onUnmount(u){l.push(u)},unmount(){f&&(be(l,d._instance,16),e(null,d._container),delete d._container.__vue_app__)},provide(u,p){return i.provides[u]=p,d},runWithContext(u){const p=ut;ut=d;try{return u()}finally{ut=p}}};return d}}let ut=null;function Tc(e,t,n=H){const s=di(),r=se(t),i=Ue(t),o=Gr(e,r),l=so((f,d)=>{let u,p=H,v;return _o(()=>{const C=e[r];Q(u,C)&&(u=C,d())}),{get(){return f(),n.get?n.get(u):u},set(C){const T=n.set?n.set(C):C;if(!Q(T,u)&&!(p!==H&&Q(C,p)))return;const w=s.vnode.props,j=!!(w&&(t in w||r in w||i in w)&&(`onUpdate:${t}`in w||`onUpdate:${r}`in w||`onUpdate:${i}`in w));j||(u=C,d()),s.emit(`update:${t}`,T),Q(C,p)&&(Q(C,T)&&!Q(T,v)||j&&p!==H&&!Q(T,u))&&d(),p=C,v=T}}});return l[Symbol.iterator]=()=>{let f=0;return{next(){return f<2?{value:f++?o||H:l,done:!1}:{done:!0}}}},l}const Gr=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${se(t)}Modifiers`]||e[`${Ue(t)}Modifiers`];function Wo(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||H;let r=n;const i=t.startsWith("update:"),o=i&&Gr(s,t.slice(7));o&&(o.trim&&(r=n.map(u=>J(u)?u.trim():u)),o.number&&(r=r.map(Qn)));let l,f=s[l=On(t)]||s[l=On(se(t))];!f&&i&&(f=s[l=On(Ue(t))]),f&&be(f,e,6,r);const d=s[l+"Once"];if(d){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,be(d,e,6,r)}}const Bo=new WeakMap;function Yr(e,t,n=!1){const s=n?Bo:t.emitsCache,r=s.get(e);if(r!==void 0)return r;const i=e.emits;let o={},l=!1;if(!I(e)){const f=d=>{const u=Yr(d,t,!0);u&&(l=!0,Y(o,u))};!n&&t.mixins.length&&t.mixins.forEach(f),e.extends&&f(e.extends),e.mixins&&e.mixins.forEach(f)}return!i&&!l?(W(e)&&s.set(e,null),null):(P(i)?i.forEach(f=>o[f]=null):Y(o,i),W(e)&&s.set(e,o),o)}function wn(e,t){return!e||!an(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),K(e,t[0].toLowerCase()+t.slice(1))||K(e,Ue(t))||K(e,t))}function js(e){const{type:t,vnode:n,proxy:s,withProxy:r,propsOptions:[i],slots:o,attrs:l,emit:f,render:d,renderCache:u,props:p,data:v,setupState:C,ctx:T,inheritAttrs:w}=e,j=nn(e);let V,F;try{if(n.shapeFlag&4){const O=r||s,D=O;V=Pe(d.call(D,O,u,p,C,v,T)),F=l}else{const O=t;V=Pe(O.length>1?O(p,{attrs:l,slots:o,emit:f}):O(p,null)),F=t.props?l:ko(l)}}catch(O){je.length=0,Vt(O,e,1),V=ie(Fe)}let N=V;if(F&&w!==!1){const O=Object.keys(F),{shapeFlag:D}=N;O.length&&D&7&&(i&&O.some(dn)&&(F=qo(F,i)),N=dt(N,F,!1,!0))}if(n.dirs&&(N=dt(N,null,!1,!0),N.dirs=N.dirs?N.dirs.concat(n.dirs):n.dirs),n.transition){const O=vn(N.type)&&jr(N)||N;us(O,n.transition)}return V=N,nn(j),V}const ko=e=>{let t;for(const n in e)(n==="class"||n==="style"||an(n))&&((t||(t={}))[n]=e[n]);return t},qo=(e,t)=>{const n={};for(const s in e)(!dn(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function zo(e,t,n){const{props:s,children:r,component:i}=e,{props:o,children:l,patchFlag:f}=t,d=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&f>=0){if(f&1024)return!0;if(f&16)return s?$s(s,o,d):!!o;if(f&8){const u=t.dynamicProps;for(let p=0;p<u.length;p++){const v=u[p];if(Xr(o,s,v)&&!wn(d,v))return!0}}}else return(r||l)&&(!l||!l.$stable)?!0:s===o?!1:s?o?$s(s,o,d):!0:!!o;return!1}function $s(e,t,n){const s=Object.keys(t);if(s.length!==Object.keys(e).length)return!0;for(let r=0;r<s.length;r++){const i=s[r];if(Xr(t,e,i)&&!wn(n,i))return!0}return!1}function Xr(e,t,n){const s=e[n],r=t[n];return n==="style"&&W(s)&&W(r)?!pt(s,r):s!==r}function Jo({vnode:e,parent:t,suspense:n},s){for(;t;){const r=t.subTree;if(r.suspense&&r.suspense.activeBranch===e&&(r.suspense.vnode.el=r.el=s,e=r),r===e)(e=t.vnode).el=s,t=t.parent;else break}n&&n.activeBranch===e&&(n.vnode.el=s)}const Zr={},Qr=()=>Object.create(Zr),ei=e=>Object.getPrototypeOf(e)===Zr;function Go(e,t,n,s=!1){const r={},i=Qr();e.propsDefaults=Object.create(null),ti(e,t,r,i);for(const o in e.propsOptions[0])o in r||(r[o]=void 0);n?e.props=s?r:Xi(r):e.type.props?e.props=r:e.props=i,e.attrs=i}function Yo(e,t,n,s){const{props:r,attrs:i,vnode:{patchFlag:o}}=e,l=$(r),[f]=e.propsOptions;let d=!1;if((s||o>0)&&!(o&16)){if(o&8){const u=e.vnode.dynamicProps;for(let p=0;p<u.length;p++){let v=u[p];if(wn(e.emitsOptions,v))continue;const C=t[v];if(f)if(K(i,v))C!==i[v]&&(i[v]=C,d=!0);else{const T=se(v);r[T]=Jn(f,l,T,C,e,!1)}else C!==i[v]&&(i[v]=C,d=!0)}}}else{ti(e,t,r,i)&&(d=!0);let u;for(const p in l)(!t||!K(t,p)&&((u=Ue(p))===p||!K(t,u)))&&(f?n&&(n[p]!==void 0||n[u]!==void 0)&&(r[p]=Jn(f,l,p,void 0,e,!0)):delete r[p]);if(i!==l)for(const p in i)(!t||!K(t,p))&&(delete i[p],d=!0)}d&&Le(e.attrs,"set","")}function ti(e,t,n,s){const[r,i]=e.propsOptions;let o=!1,l;if(t)for(let f in t){if(Ct(f))continue;const d=t[f];let u;r&&K(r,u=se(f))?!i||!i.includes(u)?n[u]=d:(l||(l={}))[u]=d:wn(e.emitsOptions,f)||(!(f in s)||d!==s[f])&&(s[f]=d,o=!0)}if(i){const f=$(n),d=l||H;for(let u=0;u<i.length;u++){const p=i[u];n[p]=Jn(r,f,p,d[p],e,!K(d,p))}}return o}function Jn(e,t,n,s,r,i){const o=e[n];if(o!=null){const l=K(o,"default");if(l&&s===void 0){const f=o.default;if(o.type!==Function&&!o.skipFactory&&I(f)){const{propsDefaults:d}=r;if(n in d)s=d[n];else{const u=Lt(r);s=d[n]=f.call(null,t),u()}}else s=f;r.ce&&r.ce._setProp(n,s)}o[0]&&(i&&!l?s=!1:o[1]&&(s===""||s===Ue(n))&&(s=!0))}return s}const Xo=new WeakMap;function ni(e,t,n=!1){const s=n?Xo:t.propsCache,r=s.get(e);if(r)return r;const i=e.props,o={},l=[];let f=!1;if(!I(e)){const u=p=>{f=!0;const[v,C]=ni(p,t,!0);Y(o,v),C&&l.push(...C)};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!i&&!f)return W(e)&&s.set(e,nt),nt;if(P(i))for(let u=0;u<i.length;u++){const p=se(i[u]);Ks(p)&&(o[p]=H)}else if(i)for(const u in i){const p=se(u);if(Ks(p)){const v=i[u],C=o[p]=P(v)||I(v)?{type:v}:Y({},v),T=C.type;let w=!1,j=!0;if(P(T))for(let V=0;V<T.length;++V){const F=T[V],N=I(F)&&F.name;if(N==="Boolean"){w=!0;break}else N==="String"&&(j=!1)}else w=I(T)&&T.name==="Boolean";C[0]=w,C[1]=j,(w||K(C,"default"))&&l.push(p)}}const d=[o,l];return W(e)&&s.set(e,d),d}function Ks(e){return e[0]!=="$"&&!Ct(e)}const ps=e=>e==="_"||e==="_ctx"||e==="$stable",gs=e=>P(e)?e.map(Pe):[Pe(e)],Zo=(e,t,n)=>{if(t._n)return t;const s=ho((...r)=>gs(t(...r)),n);return s._c=!1,s},si=(e,t,n)=>{const s=e._ctx;for(const r in e){if(ps(r))continue;const i=e[r];if(I(i))t[r]=Zo(r,i,s);else if(i!=null){const o=gs(i);t[r]=()=>o}}},ri=(e,t)=>{const n=gs(t);e.slots.default=()=>n},ii=(e,t,n)=>{for(const s in t)(n||!ps(s))&&(e[s]=t[s])},Qo=(e,t,n)=>{const s=e.slots=Qr();if(e.vnode.shapeFlag&32){const r=t._;r?(ii(s,t,n),n&&dr(s,"_",r,!0)):si(t,s)}else t&&ri(e,t)},el=(e,t,n)=>{const{vnode:s,slots:r}=e;let i=!0,o=H;if(s.shapeFlag&32){const l=t._;l?n&&l===1?i=!1:ii(r,t,n):(i=!t.$stable,si(t,r)),o=t}else t&&(ri(e,t),o={default:1});if(i)for(const l in r)!ps(l)&&o[l]==null&&delete r[l]},fe=il;function tl(e){return nl(e)}function nl(e,t){const n=gn();n.__VUE__=!0;const{insert:s,remove:r,patchProp:i,createElement:o,createText:l,createComment:f,setText:d,setElementText:u,parentNode:p,nextSibling:v,setScopeId:C=Re,insertStaticContent:T}=e,w=(c,a,h,y=null,g=null,_=null,S=void 0,x=null,b=!!a.dynamicChildren)=>{if(c===a)return;c&&!bt(c,a)&&(y=Ut(c),_e(c,g,_,!0),c=null),a.patchFlag===-2&&(b=!1,a.dynamicChildren=null),a.dynamicChildren&&c&&c.dynamicChildren&&c.dynamicChildren.hasOnce&&(a.dynamicChildren===nt&&(a.dynamicChildren=[]),a.dynamicChildren.hasOnce=!0);const{type:m,ref:A,shapeFlag:E}=a;switch(m){case Sn:j(c,a,h,y);break;case Fe:V(c,a,h,y);break;case Zt:c==null&&F(a,h,y,S);break;case ae:jt(c,a,h,y,g,_,S,x,b);break;default:E&1?D(c,a,h,y,g,_,S,x,b):E&6?$t(c,a,h,y,g,_,S,x,b):(E&64||E&128)&&m.process(c,a,h,y,g,_,S,x,b,_t)}A!=null&&g?Ot(A,c&&c.ref,_,a||c,!a):A==null&&c&&c.ref!=null&&Ot(c.ref,null,_,c,!0)},j=(c,a,h,y)=>{if(c==null)s(a.el=l(a.children),h,y);else{const g=a.el=c.el;a.children!==c.children&&d(g,a.children)}},V=(c,a,h,y)=>{c==null?s(a.el=f(a.children||""),h,y):a.el=c.el},F=(c,a,h,y)=>{[c.el,c.anchor]=T(c.children,a,h,y,c.el,c.anchor)},N=({el:c,anchor:a},h,y)=>{let g;for(;c&&c!==a;)g=v(c),s(c,h,y),c=g;s(a,h,y)},O=({el:c,anchor:a})=>{let h;for(;c&&c!==a;)h=v(c),r(c),c=h;r(a)},D=(c,a,h,y,g,_,S,x,b)=>{if(a.type==="svg"?S="svg":a.type==="math"&&(S="mathml"),c==null)pe(a,h,y,g,_,S,x,b);else{const m=c.el&&c.el._isVueCE?c.el:null;try{m&&m._beginPatch(),Ht(c,a,g,_,S,x,b)}finally{m&&m._endPatch()}}},pe=(c,a,h,y,g,_,S,x)=>{let b,m;const{props:A,shapeFlag:E,transition:M,dirs:R}=c;if(b=c.el=o(c.type,_,A&&A.is,A),E&8?u(b,c.children):E&16&&Be(c.children,b,null,y,g,Dn(c,_),S,x),R&&Ze(c,null,y,"created"),xe(b,c,c.scopeId,S,y),A){for(const B in A)B!=="value"&&!Ct(B)&&i(b,B,null,A[B],_,y);"value"in A&&i(b,"value",null,A.value,_),(m=A.onVnodeBeforeMount)&&Ee(m,y,c)}R&&Ze(c,null,y,"beforeMount");const L=sl(g,M);L&&M.beforeEnter(b),s(b,a,h),((m=A&&A.onVnodeMounted)||L||R)&&fe(()=>{m&&Ee(m,y,c),L&&M.enter(b),R&&Ze(c,null,y,"mounted")},g)},xe=(c,a,h,y,g)=>{if(h&&C(c,h),y)for(let _=0;_<y.length;_++)C(c,y[_]);if(g){let _=g.subTree;if(a===_||fi(_.type)&&(_.ssContent===a||_.ssFallback===a)){const S=g.vnode;xe(c,S,S.scopeId,S.slotScopeIds,g.parent)}}},Be=(c,a,h,y,g,_,S,x,b=0)=>{for(let m=b;m<c.length;m++){const A=c[m]=x?Ve(c[m]):Pe(c[m]);w(null,A,a,h,y,g,_,S,x)}},Ht=(c,a,h,y,g,_,S)=>{const x=a.el=c.el;let{patchFlag:b,dynamicChildren:m,dirs:A}=a;b|=c.patchFlag&16;const E=c.props||H,M=a.props||H;let R;if(h&&Qe(h,!1),(R=M.onVnodeBeforeUpdate)&&Ee(R,h,a,c),A&&Ze(a,c,h,"beforeUpdate"),h&&Qe(h,!0),m&&(!c.dynamicChildren||c.dynamicChildren.length!==m.length)&&(b=0,S=!1,m=null),(E.innerHTML&&M.innerHTML==null||E.textContent&&M.textContent==null)&&u(x,""),m?Ge(c.dynamicChildren,m,x,h,y,Dn(a,g),_):S||k(c,a,x,null,h,y,Dn(a,g),_,!1),b>0){if(b&16)gt(x,E,M,h,g);else if(b&2&&E.class!==M.class&&i(x,"class",null,M.class,g),b&4&&i(x,"style",E.style,M.style,g),b&8){const L=a.dynamicProps;for(let B=0;B<L.length;B++){const U=L[B],G=E[U],X=M[U];(X!==G||U==="value")&&i(x,U,G,X,g,h)}}b&1&&c.children!==a.children&&u(x,a.children)}else!S&&m==null&&gt(x,E,M,h,g);((R=M.onVnodeUpdated)||A)&&fe(()=>{R&&Ee(R,h,a,c),A&&Ze(a,c,h,"updated")},y)},Ge=(c,a,h,y,g,_,S)=>{for(let x=0;x<a.length;x++){const b=c[x],m=a[x],A=b.el&&(b.type===ae||!bt(b,m)||b.shapeFlag&198)?p(b.el):h;w(b,m,A,null,y,g,_,S,!0)}},gt=(c,a,h,y,g)=>{if(a!==h){if(a!==H)for(const _ in a)!Ct(_)&&!(_ in h)&&i(c,_,a[_],null,g,y);for(const _ in h){if(Ct(_))continue;const S=h[_],x=a[_];S!==x&&_!=="value"&&i(c,_,x,S,g,y)}"value"in h&&i(c,"value",a.value,h.value,g)}},jt=(c,a,h,y,g,_,S,x,b)=>{const m=a.el=c?c.el:l(""),A=a.anchor=c?c.anchor:l("");let{patchFlag:E,dynamicChildren:M,slotScopeIds:R}=a;R&&(x=x?x.concat(R):R),c==null?(s(m,h,y),s(A,h,y),Be(a.children||[],h,A,g,_,S,x,b)):E>0&&E&64&&M&&c.dynamicChildren&&c.dynamicChildren.length===M.length?(Ge(c.dynamicChildren,M,h,g,_,S,x),(a.key!=null||g&&a===g.subTree)&&oi(c,a,!0)):k(c,a,h,A,g,_,S,x,b)},$t=(c,a,h,y,g,_,S,x,b)=>{a.slotScopeIds=x,c==null?a.shapeFlag&512?g.ctx.activate(a,h,y,S,b):En(a,h,y,g,_,S,b):ys(c,a,b)},En=(c,a,h,y,g,_,S)=>{const x=c.component=dl(c,y,g);if(bn(c)&&(x.ctx.renderer=_t),hl(x,!1,S),x.asyncDep){if(g&&g.registerDep(x,oe,S),!c.el){const b=x.subTree=ie(Fe);V(null,b,a,h),c.placeholder=b.el}}else oe(x,c,a,h,g,_,S)},ys=(c,a,h)=>{const y=a.component=c.component;if(zo(c,a,h))if(y.asyncDep&&!y.asyncResolved){a.el=c.el,z(y,a,h);return}else y.next=a,y.update();else a.el=c.el,y.vnode=a},oe=(c,a,h,y,g,_,S)=>{const x=()=>{if(c.isMounted){let{next:E,bu:M,u:R,parent:L,vnode:B}=c;{const Se=li(c);if(Se){E&&(E.el=B.el,z(c,E,S)),Se.asyncDep.then(()=>{fe(()=>{c.isUnmounted||m()},g)});return}}let U=E,G;Qe(c,!1),E?(E.el=B.el,z(c,E,S)):E=B,M&&Gt(M),(G=E.props&&E.props.onVnodeBeforeUpdate)&&Ee(G,L,E,B),Qe(c,!0);const X=js(c),we=c.subTree;c.subTree=X,w(we,X,p(we.el),Ut(we),c,g,_),E.el=X.el,U===null&&Jo(c,X.el),R&&fe(R,g),(G=E.props&&E.props.onVnodeUpdated)&&fe(()=>Ee(G,L,E,B),g)}else{let E;const{el:M,props:R}=a,{bm:L,m:B,parent:U,root:G,type:X}=c,we=ft(a);Qe(c,!1),L&&Gt(L),!we&&(E=R&&R.onVnodeBeforeMount)&&Ee(E,U,a),Qe(c,!0);{G.ce&&G.ce._hasShadowRoot()&&G.ce._injectChildStyle(X,c.parent?c.parent.type:void 0);const Se=c.subTree=js(c);w(null,Se,h,y,c,g,_),a.el=Se.el}if(B&&fe(B,g),!we&&(E=R&&R.onVnodeMounted)){const Se=a;fe(()=>Ee(E,U,Se),g)}(a.shapeFlag&256||U&&ft(U.vnode)&&U.vnode.shapeFlag&256)&&c.a&&fe(c.a,g),c.isMounted=!0,a=h=y=null}};c.scope.on();const b=c.effect=new _r(x);c.scope.off();const m=c.update=b.run.bind(b),A=c.job=b.runIfDirty.bind(b);A.i=c,A.id=c.uid,b.scheduler=()=>cs(A),Qe(c,!0),m()},z=(c,a,h)=>{a.component=c;const y=c.vnode.props;c.vnode=a,c.next=null,Yo(c,a.props,y,h),el(c,a.children,h),$e(),Ps(c),Ke()},k=(c,a,h,y,g,_,S,x,b=!1)=>{const m=c&&c.children,A=c?c.shapeFlag:0,E=a.children,{patchFlag:M,shapeFlag:R}=a;if(M>0){if(M&128){Kt(m,E,h,y,g,_,S,x,b);return}else if(M&256){Ye(m,E,h,y,g,_,S,x,b);return}}R&8?(A&16&&mt(m,g,_),E!==m&&u(h,E)):A&16?R&16?Kt(m,E,h,y,g,_,S,x,b):mt(m,g,_,!0):(A&8&&u(h,""),R&16&&Be(E,h,y,g,_,S,x,b))},Ye=(c,a,h,y,g,_,S,x,b)=>{c=c||nt,a=a||nt;const m=c.length,A=a.length,E=Math.min(m,A);let M;for(M=0;M<E;M++){const R=a[M]=b?Ve(a[M]):Pe(a[M]);w(c[M],R,h,null,g,_,S,x,b)}m>A?mt(c,g,_,!0,!1,E):Be(a,h,y,g,_,S,x,b,E)},Kt=(c,a,h,y,g,_,S,x,b)=>{let m=0;const A=a.length;let E=c.length-1,M=A-1;for(;m<=E&&m<=M;){const R=c[m],L=a[m]=b?Ve(a[m]):Pe(a[m]);if(bt(R,L))w(R,L,h,null,g,_,S,x,b);else break;m++}for(;m<=E&&m<=M;){const R=c[E],L=a[M]=b?Ve(a[M]):Pe(a[M]);if(bt(R,L))w(R,L,h,null,g,_,S,x,b);else break;E--,M--}if(m>E){if(m<=M){const R=M+1,L=R<A?a[R].el:y;for(;m<=M;)w(null,a[m]=b?Ve(a[m]):Pe(a[m]),h,L,g,_,S,x,b),m++}}else if(m>M)for(;m<=E;)_e(c[m],g,_,!0),m++;else{const R=m,L=m,B=new Map;for(m=L;m<=M;m++){const de=a[m]=b?Ve(a[m]):Pe(a[m]);de.key!=null&&B.set(de.key,m)}let U,G=0;const X=M-L+1;let we=!1,Se=0;const yt=new Array(X);for(m=0;m<X;m++)yt[m]=0;for(m=R;m<=E;m++){const de=c[m];if(G>=X){_e(de,g,_,!0);continue}let Ce;if(de.key!=null)Ce=B.get(de.key);else for(U=L;U<=M;U++)if(yt[U-L]===0&&bt(de,a[U])){Ce=U;break}Ce===void 0?_e(de,g,_,!0):(yt[Ce-L]=m+1,Ce>=Se?Se=Ce:we=!0,w(de,a[Ce],h,null,g,_,S,x,b),G++)}const xs=we?rl(yt):nt;for(U=xs.length-1,m=X-1;m>=0;m--){const de=L+m,Ce=a[de],ws=a[de+1],Ss=de+1<A?ws.el||ci(ws):y;yt[m]===0?w(null,Ce,h,Ss,g,_,S,x,b):we&&(U<0||m!==xs[U]?Xe(Ce,h,Ss,2):U--)}}},Xe=(c,a,h,y,g=null)=>{const{el:_,type:S,transition:x,children:b,shapeFlag:m}=c;if(m&6){Xe(c.component.subTree,a,h,y);return}if(m&128){c.suspense.move(a,h,y);return}if(m&64){S.move(c,a,h,_t);return}if(S===ae){s(_,a,h);for(let E=0;E<b.length;E++)Xe(b[E],a,h,y);s(c.anchor,a,h);return}if(S===Zt){N(c,a,h);return}if(y!==2&&m&1&&x)if(y===0)x.persisted&&!_[Fn]?s(_,a,h):(x.beforeEnter(_),s(_,a,h),fe(()=>x.enter(_),g));else{const{leave:E,delayLeave:M,afterLeave:R}=x,L=()=>{c.ctx.isUnmounted?r(_):s(_,a,h)},B=()=>{const U=_._isLeaving||!!_[Fn];_._isLeaving&&_[Fn](!0),x.persisted&&!U?L():E(_,()=>{L(),R&&R()})};M?M(_,L,B):B()}else s(_,a,h)},_e=(c,a,h,y=!1,g=!1)=>{const{type:_,props:S,ref:x,children:b,dynamicChildren:m,shapeFlag:A,patchFlag:E,dirs:M,cacheIndex:R,memo:L}=c;if((E===-2||m&&m.hasOnce)&&(g=!1),x!=null&&($e(),Ot(x,null,h,c,!0),Ke()),R!=null&&(!c.ctx||c.ctx===a)&&(a.renderCache[R]=void 0),A&256){a.ctx.deactivate(c);return}const B=A&1&&M,U=!ft(c);let G;if(U&&(G=S&&S.onVnodeBeforeUnmount)&&Ee(G,a,c),A&6)vi(c.component,h,y);else{if(A&128){c.suspense.unmount(h,y);return}B&&Ze(c,null,a,"beforeUnmount"),A&64?c.type.remove(c,a,h,_t,y):m&&!m.hasOnce&&(_!==ae||E>0&&E&64)?mt(m,a,h,!1,!0):(_===ae&&E&384||!g&&A&16)&&mt(b,a,h),y&&vs(c)}const X=L!=null&&R==null;(U&&(G=S&&S.onVnodeUnmounted)||B||X)&&fe(()=>{G&&Ee(G,a,c),B&&Ze(c,null,a,"unmounted"),X&&(c.el=null)},h)},vs=c=>{const{type:a,el:h,anchor:y,transition:g}=c;if(a===ae){yi(h,y);return}if(a===Zt){O(c),g&&!g.persisted&&g.afterLeave&&g.afterLeave();return}const _=()=>{r(h),g&&!g.persisted&&g.afterLeave&&g.afterLeave()};if(c.shapeFlag&1&&g&&!g.persisted){const{leave:S,delayLeave:x}=g,b=()=>S(h,_);x?x(c.el,_,b):b()}else _()},yi=(c,a)=>{let h;for(;c!==a;)h=v(c),r(c),c=h;r(a)},vi=(c,a,h)=>{const{bum:y,scope:g,job:_,subTree:S,um:x,m:b,a:m}=c;Us(b),Us(m),y&&Gt(y),g.stop(),_?(_.flags|=8,_e(S,c,a,h)):c.vnode.el&&S&&(S.transition=c.vnode.transition,_e(S,c,a,h)),x&&fe(x,a),fe(()=>{c.isUnmounted=!0},a)},mt=(c,a,h,y=!1,g=!1,_=0)=>{for(let S=_;S<c.length;S++)_e(c[S],a,h,y,g)},Ut=c=>{if(c.shapeFlag&6)return Ut(c.component.subTree);if(c.shapeFlag&128)return c.suspense.next();const a=v(c.anchor||c.el),h=a&&a[vo];return h?v(h):a};let Tn=!1;const bs=(c,a,h)=>{let y;c==null?a._vnode&&(_e(a._vnode,null,null,!0),y=a._vnode.component):w(a._vnode||null,c,a,null,null,null,h),a._vnode=c,Tn||(Tn=!0,Ps(y),Dr(),Tn=!1)},_t={p:w,um:_e,m:Xe,r:vs,mt:En,mc:Be,pc:k,pbc:Ge,n:Ut,o:e};return{render:bs,hydrate:void 0,createApp:Uo(bs)}}function Dn({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 Qe({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function sl(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function oi(e,t,n=!1){const s=e.children,r=t.children;if(P(s)&&P(r))for(let i=0;i<s.length;i++){const o=s[i];let l=r[i];l.shapeFlag&1&&!l.dynamicChildren&&((l.patchFlag<=0||l.patchFlag===32)&&(l=r[i]=Ve(r[i]),l.el=o.el),!n&&l.patchFlag!==-2&&oi(o,l)),l.type===Sn&&(l.patchFlag===-1&&(l=r[i]=Ve(l)),l.el=o.el),l.type===Fe&&!l.el&&(l.el=o.el)}}function rl(e){const t=e.slice(),n=[0];let s,r,i,o,l;const f=e.length;for(s=0;s<f;s++){const d=e[s];if(d!==0){if(r=n[n.length-1],e[r]<d){t[s]=r,n.push(s);continue}for(i=0,o=n.length-1;i<o;)l=i+o>>1,e[n[l]]<d?i=l+1:o=l;d<e[n[i]]&&(i>0&&(t[s]=n[i-1]),n[i]=s)}}for(i=n.length,o=n[i-1];i-- >0;)n[i]=o,o=t[o];return n}function li(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:li(t)}function Us(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function ci(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?ci(t.subTree):null}const fi=e=>e.__isSuspense;function il(e,t){t&&t.pendingBranch?P(e)?t.effects.push(...e):t.effects.push(e):ao(e)}const ae=Symbol.for("v-fgt"),Sn=Symbol.for("v-txt"),Fe=Symbol.for("v-cmt"),Zt=Symbol.for("v-stc"),je=[];let he=null;function ue(e=!1){je.push(he=e?null:[])}function ms(){je.pop(),he=je[je.length-1]||null}let It=1;function Ws(e,t=!1){It+=e,e<0&&he&&t&&(he.hasOnce=!0)}function ui(e){return e.dynamicChildren=It>0?he||nt:null,ms(),It>0&&he&&he.push(e),e}function Me(e,t,n,s,r,i){return ui(Oe(e,t,n,s,r,i,!0))}function ln(e,t,n,s,r){return ui(ie(e,t,n,s,r,!0))}function _s(e){return e?e.__v_isVNode===!0:!1}function bt(e,t){return e.type===t.type&&e.key===t.key}const ai=({key:e})=>e??null,Qt=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?J(e)||re(e)||I(e)?{i:te,r:e,k:t,f:!!n}:e:null);function Oe(e,t=null,n=null,s=0,r=null,i=e===ae?0:1,o=!1,l=!1){const f={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&ai(t),ref:t&&Qt(t),scopeId:Lr,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:i,patchFlag:s,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:te};return l?(cn(f,n),i&128&&e.normalize(f)):n&&(f.shapeFlag|=J(n)?8:16),It>0&&!o&&he&&(f.patchFlag>0||i&6)&&f.patchFlag!==32&&he.push(f),f}const ie=ol;function ol(e,t=null,n=null,s=0,r=null,i=!1){if((!e||e===Wr)&&(e=Fe),_s(e)){const l=dt(e,t,!0);return n&&cn(l,n),It>0&&!i&&he&&(l.shapeFlag&6?he[he.indexOf(e)]=l:he.push(l)),l.patchFlag=-2,l}if(yl(e)&&(e=e.__vccOpts),t){t=ll(t);let{class:l,style:f}=t;l&&!J(l)&&(t.class=mn(l)),W(f)&&(ls(f)&&!P(f)&&(f=Y({},f)),t.style=es(f))}const o=J(e)?1:fi(e)?128:vn(e)?64:W(e)?4:I(e)?2:0;return Oe(e,t,n,s,r,o,i,!0)}function ll(e){return e?ls(e)||ei(e)?Y({},e):e:null}function dt(e,t,n=!1,s=!1){const{props:r,ref:i,patchFlag:o,children:l,transition:f}=e,d=t?fl(r||{},t):r,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:d,key:d&&ai(d),ref:t&&t.ref?n&&i?P(i)?i.concat(Qt(t)):[i,Qt(t)]:Qt(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==ae?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:f,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&dt(e.ssContent),ssFallback:e.ssFallback&&dt(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce,cacheIndex:e.cacheIndex};return f&&s&&us(u,f.clone(u)),u}function cl(e=" ",t=0){return ie(Sn,null,e,t)}function Oc(e,t){const n=ie(Zt,null,e);return n.staticCount=t,n}function Vn(e="",t=!1){return t?(ue(),ln(Fe,null,e)):ie(Fe,null,e)}function Pe(e){return e==null||typeof e=="boolean"?ie(Fe):P(e)?ie(ae,null,e.slice()):_s(e)?Ve(e):ie(Sn,null,String(e))}function Ve(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:dt(e)}function cn(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(P(t))n=16;else if(typeof t=="object")if(s&65){const r=t.default;r&&(r._c&&(r._d=!1),cn(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!ei(t)?t._ctx=te:r===3&&te&&(te.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(I(t)){if(s&65){cn(e,{default:t});return}t={default:t,_ctx:te},n=32}else t=String(t),s&64?(n=16,t=[cl(t)]):n=8;e.children=t,e.shapeFlag|=n}function fl(...e){const t={};for(let n=0;n<e.length;n++){const s=e[n];for(const r in s)if(r==="class")t.class!==s.class&&(t.class=mn([t.class,s.class]));else if(r==="style")t.style=es([t.style,s.style]);else if(an(r)){const i=t[r],o=s[r];o&&i!==o&&!(P(i)&&i.includes(o))?t[r]=i?[].concat(i,o):o:o==null&&i==null&&!dn(r)&&(t[r]=o)}else r!==""&&(t[r]=s[r])}return t}function Ee(e,t,n,s=null){be(e,t,7,[n,s])}const ul=Jr();let al=0;function dl(e,t,n){const s=e.type,r=(t?t.appContext:e.appContext)||ul,i={uid:al++,vnode:e,type:s,parent:t,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Ii(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(r.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:ni(s,r),emitsOptions:Yr(s,r),emit:null,emitted:null,propsDefaults:H,inheritAttrs:s.inheritAttrs,ctx:H,data:H,props:H,attrs:H,slots:H,refs:H,setupState:H,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return i.ctx={_:i},i.root=t?t.root:i,i.emit=Wo.bind(null,i),e.ce&&e.ce(i),i}let ee=null;const di=()=>ee||te;let fn,Ft;{const e=gn(),t=(n,s)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(s),i=>{r.length>1?r.forEach(o=>o(i)):r[0](i)}};fn=t("__VUE_INSTANCE_SETTERS__",n=>ee=n),Ft=t("__VUE_SSR_SETTERS__",n=>ht=n)}const Lt=e=>{const t=ee;return fn(e),e.scope.on(),()=>{e.scope.off(),fn(t)}},Bs=()=>{ee&&ee.scope.off(),fn(null)};function hi(e){return e.vnode.shapeFlag&4}let ht=!1;function hl(e,t=!1,n=!1){t&&Ft(t);const{props:s,children:r}=e.vnode,i=hi(e);Go(e,s,i,t),Qo(e,r,n||t);const o=i?pl(e,t):void 0;return t&&Ft(!1),o}function pl(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Do);const{setup:s}=n;if(s){$e();const r=e.setupContext=s.length>1?ml(e):null,i=Lt(e),o=Dt(s,e,0,[e.props,r]),l=fr(o);if(Ke(),i(),(l||e.sp)&&!ft(e)&&ds(e),l){if(o.then(Bs,Bs),t)return o.then(f=>{Ft(!0);try{ks(e,f,t)}finally{Ft(!1)}}).catch(f=>{Vt(f,e,0)});e.asyncDep=o}else ks(e,o)}else pi(e)}function ks(e,t,n){I(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:W(t)&&(e.setupState=Ir(t)),pi(e)}function pi(e,t,n){const s=e.type;e.render||(e.render=s.render||Re);{const r=Lt(e);$e();try{Vo(e)}finally{Ke(),r()}}}const gl={get(e,t){return ne(e,"get",""),e[t]}};function ml(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,gl),slots:e.slots,emit:e.emit,expose:t}}function Cn(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Ir(Zi(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Mt)return Mt[n](e)},has(t,n){return n in t||n in Mt}})):e.proxy}function _l(e,t=!0){return I(e)?e.displayName||e.name:e.name||t&&e.__name}function yl(e){return I(e)&&"__vccOpts"in e}const wt=(e,t)=>io(e,t,ht),vl="3.5.43";let Gn;const qs=typeof window<"u"&&window.trustedTypes;if(qs)try{Gn=qs.createPolicy("vue",{createHTML:e=>e})}catch{}const gi=Gn?e=>Gn.createHTML(e):e=>e,bl="http://www.w3.org/2000/svg",xl="http://www.w3.org/1998/Math/MathML",De=typeof document<"u"?document:null,zs=De&&De.createElement("template"),wl={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"?De.createElementNS(bl,e):t==="mathml"?De.createElementNS(xl,e):n?De.createElement(e,{is:n}):De.createElement(e);return e==="select"&&s&&s.multiple!=null&&r.setAttribute("multiple",s.multiple),r},createText:e=>De.createTextNode(e),createComment:e=>De.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>De.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{zs.innerHTML=gi(s==="svg"?`<svg>${e}</svg>`:s==="mathml"?`<math>${e}</math>`:e);const l=zs.content;if(s==="svg"||s==="mathml"){const f=l.firstChild;for(;f.firstChild;)l.appendChild(f.firstChild);l.removeChild(f)}t.insertBefore(l,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Sl=Symbol("_vtc");function Cl(e,t,n){const s=e[Sl];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Js=Symbol("_vod"),El=Symbol("_vsh"),Tl=Symbol(""),Ol=/(?:^|;)\s*display\s*:/;function Ml(e,t,n){const s=e.style,r=J(n);let i=!1;if(n&&!r){if(t)if(J(t))for(const o of t.split(";")){const l=o.slice(0,o.indexOf(":")).trim();n[l]==null&&St(s,l,"")}else for(const o in t)n[o]==null&&St(s,o,"");for(const o in n){o==="display"&&(i=!0);const l=n[o];l!=null?Pl(e,o,!J(t)&&t?t[o]:void 0,l)||St(s,o,l):St(s,o,"")}}else if(r){if(t!==n){const o=s[Tl];o&&(n+=";"+o),s.cssText=n,i=Ol.test(n)}}else t&&e.removeAttribute("style");Js in e&&(e[Js]=i?s.display:"",e[El]&&(s.display="none"))}const zt=/\s*!important$/;function St(e,t,n){if(P(n))n.forEach(s=>St(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))zt.test(n)?e.setProperty(t,n.replace(zt,""),"important"):e.setProperty(t,n);else{const s=Al(e,t);zt.test(n)?e.setProperty(Ue(s),n.replace(zt,""),"important"):e[s]=n}}const Gs=["Webkit","Moz","ms"],Ln={};function Al(e,t){const n=Ln[t];if(n)return n;let s=se(t);if(s!=="filter"&&s in e)return Ln[t]=s;s=pn(s);for(let r=0;r<Gs.length;r++){const i=Gs[r]+s;if(i in e)return Ln[t]=i}return t}function Pl(e,t,n,s){return e.tagName==="TEXTAREA"&&(t==="width"||t==="height")&&J(s)&&n===s}const Ys="http://www.w3.org/1999/xlink";function Xs(e,t,n,s,r,i=Ai(t)){s&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(Ys,t.slice(6,t.length)):e.setAttributeNS(Ys,t,n):n==null||i&&!hr(n)?e.removeAttribute(t):e.setAttribute(t,i?"":ve(n)?String(n):n)}function Zs(e,t,n,s,r){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?gi(n):n);return}const i=e.tagName;if(t==="value"&&i!=="PROGRESS"&&!i.includes("-")){const l=i==="OPTION"?e.getAttribute("value")||"":e.value,f=n==null?e.type==="checkbox"?"on":"":String(n);(l!==f||!("_value"in e))&&(e.value=f),n==null&&e.removeAttribute(t),e._value=n;return}let o=!1;if(n===""||n==null){const l=typeof e[t];l==="boolean"?n=hr(n):n==null&&l==="string"?(n="",o=!0):l==="number"&&(n=0,o=!0)}try{e[t]=n}catch{}o&&e.removeAttribute(r||t)}function tt(e,t,n,s){e.addEventListener(t,n,s)}function Rl(e,t,n,s){e.removeEventListener(t,n,s)}const Qs=Symbol("_vei");function Il(e,t,n,s,r=null){const i=e[Qs]||(e[Qs]={}),o=i[t];if(s&&o)o.value=s;else{const[l,f]=Dl(t);if(s){const d=i[t]=Hl(s,r);tt(e,l,d,f)}else o&&(Rl(e,l,o,f),i[t]=void 0)}}const Fl=/(Once|Passive|Capture)$/,Nl=/^on:?(?:Once|Passive|Capture)$/;function Dl(e){let t,n;for(;(n=e.match(Fl))&&!Nl.test(e);)t||(t={}),e=e.slice(0,e.length-n[1].length),t[n[1].toLowerCase()]=!0;return[e[2]===":"?e.slice(3):Ue(e.slice(2)),t]}let Hn=0;const Vl=Promise.resolve(),Ll=()=>Hn||(Vl.then(()=>Hn=0),Hn=Date.now());function Hl(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;const r=n.value;if(P(r)){const i=s.stopImmediatePropagation;s.stopImmediatePropagation=()=>{i.call(s),s._stopped=!0};const o=r.slice(),l=[s];for(let f=0;f<o.length&&!s._stopped;f++){const d=o[f];d&&be(d,t,5,l)}}else be(r,t,5,[s])};return n.value=e,n.attached=Ll(),n}const er=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,jl=(e,t,n,s,r,i)=>{const o=r==="svg";t==="class"?Cl(e,s,o):t==="style"?Ml(e,n,s):an(t)?dn(t)||Il(e,t,n,s,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):$l(e,t,s,o))?(Zs(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Xs(e,t,s,o,i,t!=="value")):e._isVueCE&&(Kl(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!J(s)))?Zs(e,se(t),s,i,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),Xs(e,t,s,o))};function $l(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&er(t)&&I(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return er(t)&&J(n)?!1:t in e}function Kl(e,t){const n=e._def.props;if(!n)return!1;const s=se(t);return Array.isArray(n)?n.some(r=>se(r)===s):Object.keys(n).some(r=>se(r)===s)}const un=e=>{const t=e.props["onUpdate:modelValue"]||!1;return P(t)?n=>Gt(t,n):t};function Ul(e){e.target.composing=!0}function tr(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const st=Symbol("_assign"),Jt=Symbol("_initialValue");function jn(e,t,n){return t&&(e=e.trim()),n&&(e=Qn(e)),e}const Mc={created(e,{modifiers:{lazy:t,trim:n,number:s}},r){e.parentNode&&(e.type==="text"?e[Jt]=e.defaultValue.replace(/[\r\n]/g,""):e.type==="textarea"&&(e[Jt]=e.defaultValue.replace(/\r\n?/g,`
3
+ `))),e[st]=un(r);const i=s||r.props&&r.props.type==="number";tt(e,t?"change":"input",o=>{o.target.composing||e[st](jn(e.value,n,i))}),(n||i)&&tt(e,"change",()=>{e.value=jn(e.value,n,i)}),t||(tt(e,"compositionstart",Ul),tt(e,"compositionend",tr),tt(e,"change",tr))},mounted(e,{value:t,modifiers:{trim:n,number:s}}){const r=t??"",i=e[Jt];delete e[Jt],i!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==i?e[st](jn(e.value,n,s)):e.value=r},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:r,number:i}},o){if(e[st]=un(o),e.composing)return;const l=(i||e.type==="number")&&!/^0\d/.test(e.value)?Qn(e.value):e.value,f=t??"";if(l===f)return;const d=e.getRootNode();(d instanceof Document||d instanceof ShadowRoot)&&d.activeElement===e&&e.type!=="range"&&(s&&t===n||r&&e.value.trim()===f)||(e.value=f)}},Ac={deep:!0,created(e,t,n){e[st]=un(n),tt(e,"change",()=>{const s=e._modelValue,r=Wl(e),i=e.checked,o=e[st];if(P(s)){const l=pr(s,r),f=l!==-1;if(i&&!f)o(s.concat(r));else if(!i&&f){const d=[...s];d.splice(l,1),o(d)}}else if(at(s)){const l=new Set(s);i?l.add(r):l.delete(r),o(l)}else o(mi(e,i))})},mounted:nr,beforeUpdate(e,t,n){e[st]=un(n),nr(e,t,n)}};function nr(e,{value:t,oldValue:n},s){e._modelValue=t;let r;if(P(t))r=pr(t,s.props.value)>-1;else if(at(t))r=t.has(s.props.value);else{if(t===n)return;r=pt(t,mi(e,!0))}e.checked!==r&&(e.checked=r)}function Wl(e){return"_value"in e?e._value:e.value}function mi(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const Bl=["ctrl","shift","alt","meta"],kl={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)=>Bl.some(n=>e[`${n}Key`]&&!t.includes(n))},Pc=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=((r,...i)=>{for(let o=0;o<t.length;o++){const l=kl[t[o]];if(l&&l(r,t))return}return e(r,...i)}))},ql={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Rc=(e,t)=>{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=(r=>{if(!("key"in r))return;const i=Ue(r.key);if(t.some(o=>o===i||ql[o]===i))return e(r)}))},zl=Y({patchProp:jl},wl);let sr;function Jl(){return sr||(sr=tl(zl))}const Gl=((...e)=>{const t=Jl().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=Xl(s);if(!r)return;const i=t._component;!I(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const o=n(r,!1,Yl(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),o},t});function Yl(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Xl(e){return J(e)?document.querySelector(e):e}class Zl extends Error{status;body;constructor(t,n,s={}){super(n),this.status=t,this.body=s}}async function rr(e,t,n){const s=await fetch(t,{method:e,headers:n===void 0?{}:{"Content-Type":"application/json"},...n===void 0?{}:{body:JSON.stringify(n)}}),r=await s.text();let i={};try{i=r===""?{}:JSON.parse(r)}catch{i={error:r}}if(!s.ok){const o=typeof i.error=="string"?i.error:`The request failed (${s.status})`;throw new Zl(s.status,o,i)}return i}const Ql={get:e=>rr("GET",e),post:(e,t)=>rr("POST",e,t)};function Ic(e,t){const n=new EventSource(`/api/jobs/${encodeURIComponent(e)}/events`);let s=!1;const r=()=>{s=!0,n.close()};return n.addEventListener("progress",i=>{t.onProgress?.(JSON.parse(i.data))}),n.addEventListener("done",i=>{r(),t.onDone(JSON.parse(i.data))}),n.addEventListener("failed",i=>{r(),t.onFailed(JSON.parse(i.data).message)}),n.onerror=()=>{s||(r(),t.onFailed("The connection to devtoolz ui was lost."))},r}const ec=["width","height"],tc=["d"],ir=as({__name:"Icon",props:{name:{},size:{}},setup(e){const t=e,n={image:["M4 5a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2z","M8.5 10a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3z","m20 15-4.5-4.5L6 20"],layers:["m12 3 9 5-9 5-9-5z","m3 13 9 5 9-5","m3 17.5 9 5 9-5"],folder:["M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"],up:["m12 19V5","m5 12 7-7 7 7"],trash:["M4 7h16","M9 7V4h6v3","M6 7l1 13h10l1-13","M10 11v6","M14 11v6"],search:["M11 18a7 7 0 1 0 0-14 7 7 0 0 0 0 14z","m20 20-4-4"],down:["m12 5v14","m5 12 7 7 7-7"],left:["m15 5-7 7 7 7"],right:["m9 5 7 7-7 7"],plus:["M12 5v14","M5 12h14"],close:["M6 6l12 12","M18 6 6 18"],copy:["M9 9h10v10H9z","M5 15V5h10"],save:["M5 4h11l3 3v13H5z","M8 4v5h7V4","M8 20v-6h8v6"],download:["M12 4v11","m7 11 5 5 5-5","M5 20h14"],play:["m7 4 13 8-13 8z"],check:["m5 12 5 5 9-10"],home:["m3 11 9-8 9 8","M5 10v10h14V10"],external:["M14 4h6v6","M20 4 11 13","M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5"]};return(s,r)=>(ue(),Me("svg",{width:t.size??18,height:t.size??18,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[(ue(!0),Me(ae,null,Br(n[t.name]??[],i=>(ue(),Me("path",{key:i,d:i},null,8,tc))),128))],8,ec))}}),nc="modulepreload",sc=function(e){return"/"+e},or={},lr=function(t,n,s){let r=Promise.resolve();if(n&&n.length>0){let f=function(d){return Promise.all(d.map(u=>Promise.resolve(u).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),l=o?.nonce||o?.getAttribute("nonce");r=f(n.map(d=>{if(d=sc(d),d in or)return;or[d]=!0;const u=d.endsWith(".css"),p=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${d}"]${p}`))return;const v=document.createElement("link");if(v.rel=u?"stylesheet":nc,u||(v.as="script"),v.crossOrigin="",v.href=d,l&&v.setAttribute("nonce",l),document.head.appendChild(v),u)return new Promise((C,T)=>{v.addEventListener("load",C),v.addEventListener("error",()=>T(new Error(`Unable to preload CSS for ${d}`)))})}))}function i(o){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=o,window.dispatchEvent(l),!l.defaultPrevented)throw o}return r.then(o=>{for(const l of o||[])l.status==="rejected"&&i(l.reason);return t().catch(i)})},_i={checks:{icon:"search",component:Ns(()=>lr(()=>import("./ChecksPage-FhzZT8lq.js"),__vite__mapDeps([0,1,2,3])))},cleanup:{icon:"trash",component:Ns(()=>lr(()=>import("./CleanupPage-LpbZ2AB-.js"),__vite__mapDeps([4,1,2,5])))}},rc={};function ic(e){return _i[e]?.icon??rc[e]??"layers"}const oc={class:"shell"},lc={class:"sidebar"},cc={class:"brand"},fc={class:"brand__mark"},uc={class:"menu","aria-label":"Modules"},ac=["disabled","aria-current","onClick"],dc={class:"menu__title"},hc={key:0,class:"menu__badge"},pc={class:"sidebar__foot"},gc={key:0},mc={class:"main"},_c={key:0,class:"notice notice--error page-pad"},yc={key:2,class:"muted page-pad"},vc=as({__name:"App",setup(e){const t=lt(),n=lt(""),s=lt(window.location.hash),r=wt(()=>t.value?.modules??[]),i=wt(()=>{const u=s.value.replace(/^#\/?/,""),p=r.value.find(v=>v.id===u);return p?p.id:r.value.find(v=>v.status==="available")?.id??""}),o=wt(()=>r.value.find(u=>u.id===i.value)),l=wt(()=>_i[i.value]);function f(){s.value=window.location.hash}function d(u){u.status==="available"&&(window.location.hash=`#/${u.id}`)}return Kr(async()=>{window.addEventListener("hashchange",f);try{t.value=await Ql.get("/api/status")}catch(u){n.value=u instanceof Error?u.message:String(u)}}),Ur(()=>window.removeEventListener("hashchange",f)),(u,p)=>(ue(),Me("div",oc,[Oe("aside",lc,[Oe("div",cc,[Oe("span",fc,[ie(ir,{name:"layers",size:16})]),p[0]||(p[0]=Oe("span",{class:"brand__name"},"devtoolz",-1))]),Oe("nav",uc,[(ue(!0),Me(ae,null,Br(r.value,v=>(ue(),Me("button",{key:v.id,class:mn(["menu__item",{"menu__item--active":v.id===i.value,"menu__item--planned":v.status!=="available"}]),disabled:v.status!=="available","aria-current":v.id===i.value?"page":void 0,onClick:C=>d(v)},[ie(ir,{name:Rr(ic)(v.id)},null,8,["name"]),Oe("span",dc,Yt(v.title),1),v.status!=="available"?(ue(),Me("span",hc,"soon")):Vn("",!0)],10,ac))),128))]),Oe("div",pc,[t.value?(ue(),Me("span",gc,"v"+Yt(t.value.version),1)):Vn("",!0)])]),Oe("main",mc,[n.value?(ue(),Me("div",_c,Yt(n.value),1)):o.value&&l.value?(ue(),ln(Fo(l.value.component),{key:o.value.id,module:o.value,status:t.value},null,8,["module","status"])):t.value?(ue(),Me("div",yc,"Pick a module on the left.")):Vn("",!0)])]))}}),bc=(e,t)=>{const n=e.__vccOpts||e;for(const[s,r]of t)n[s]=r;return n},xc=bc(vc,[["__scopeId","data-v-c69720fd"]]);Gl(xc).mount("#app");export{fo as A,Tc as B,Ec as C,lr as D,Rc as E,ae as F,Oc as G,Rr as H,bc as _,ue as a,Br as b,Me as c,as as d,Oe as e,es as f,cl as g,Vn as h,Ql as i,Ur as j,ie as k,ir as l,Sc as m,mn as n,Kr as o,ln as p,wt as q,lt as r,Ic as s,Yt as t,Pc as u,Mc as v,In as w,Cc as x,ho as y,Ac as z};
@@ -8,8 +8,8 @@
8
8
  rel="icon"
9
9
  href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect width='32' height='32' rx='8' fill='%23496cff'/%3E%3Cpath d='M9 11l-4 5 4 5M23 11l4 5-4 5M18 8l-4 16' stroke='white' stroke-width='2.4' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"
10
10
  />
11
- <script type="module" crossorigin src="/assets/index-D8H-zVzo.js"></script>
12
- <link rel="stylesheet" crossorigin href="/assets/index-Ch5kTxCO.css">
11
+ <script type="module" crossorigin src="/assets/index-DTj3rBik.js"></script>
12
+ <link rel="stylesheet" crossorigin href="/assets/index-BzfkjuG8.css">
13
13
  </head>
14
14
  <body>
15
15
  <div id="app"></div>
@@ -0,0 +1 @@
1
+ export declare function writeAtomic(path: string, data: Buffer): void;
@@ -0,0 +1,15 @@
1
+ import { mkdirSync, renameSync, rmSync, writeFileSync } from 'node:fs';
2
+ import { dirname } from 'node:path';
3
+ export function writeAtomic(path, data) {
4
+ mkdirSync(dirname(path), { recursive: true });
5
+ const temporary = `${path}.${process.pid}.${Date.now()}.tmp`;
6
+ try {
7
+ writeFileSync(temporary, data);
8
+ renameSync(temporary, path);
9
+ }
10
+ catch (error) {
11
+ rmSync(temporary, { force: true });
12
+ throw error;
13
+ }
14
+ }
15
+ //# sourceMappingURL=atomic-write.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"atomic-write.js","sourceRoot":"","sources":["../../src/utils/atomic-write.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AACtE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAEnC,MAAM,UAAU,WAAW,CAAC,IAAY,EAAE,IAAY;IACpD,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;IAC7C,MAAM,SAAS,GAAG,GAAG,IAAI,IAAI,OAAO,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG,EAAE,MAAM,CAAA;IAC5D,IAAI,CAAC;QACH,aAAa,CAAC,SAAS,EAAE,IAAI,CAAC,CAAA;QAC9B,UAAU,CAAC,SAAS,EAAE,IAAI,CAAC,CAAA;IAC7B,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,CAAC,SAAS,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAA;QAClC,MAAM,KAAK,CAAA;IACb,CAAC;AACH,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare class BackupUsageError extends Error {
2
+ }
@@ -0,0 +1,3 @@
1
+ export class BackupUsageError extends Error {
2
+ }
3
+ //# sourceMappingURL=backup-error.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"backup-error.js","sourceRoot":"","sources":["../../src/utils/backup-error.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,gBAAiB,SAAQ,KAAK;CAAG"}
@@ -0,0 +1,19 @@
1
+ export declare const JOURNAL_FILE = "journal.json";
2
+ export interface JournalEntry {
3
+ path: string;
4
+ backup: string;
5
+ bytesBefore: number;
6
+ bytesAfter: number;
7
+ hashBefore: string;
8
+ hashAfter: string;
9
+ }
10
+ export interface Journal {
11
+ version: 1;
12
+ createdAt: string;
13
+ cwd: string;
14
+ entries: JournalEntry[];
15
+ }
16
+ export declare function copyIntoBackup(source: string, backup: string): void;
17
+ export declare function newJournal(cwd: string, now: Date): Journal;
18
+ export declare function saveJournal(backupDir: string, journal: Journal): void;
19
+ export declare function loadJournal(backupDir: string): Journal;
@@ -0,0 +1,33 @@
1
+ import { copyFileSync, existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
2
+ import { dirname, join } from 'node:path';
3
+ import { BackupUsageError } from './backup-error.js';
4
+ export const JOURNAL_FILE = 'journal.json';
5
+ export function copyIntoBackup(source, backup) {
6
+ mkdirSync(dirname(backup), { recursive: true });
7
+ copyFileSync(source, backup);
8
+ }
9
+ export function newJournal(cwd, now) {
10
+ return { version: 1, createdAt: now.toISOString(), cwd, entries: [] };
11
+ }
12
+ export function saveJournal(backupDir, journal) {
13
+ mkdirSync(backupDir, { recursive: true });
14
+ writeFileSync(join(backupDir, JOURNAL_FILE), `${JSON.stringify(journal, null, 2)}\n`);
15
+ }
16
+ export function loadJournal(backupDir) {
17
+ const path = join(backupDir, JOURNAL_FILE);
18
+ if (!existsSync(path)) {
19
+ throw new BackupUsageError(`${backupDir} has no ${JOURNAL_FILE} — pass the dated backup folder`);
20
+ }
21
+ let parsed;
22
+ try {
23
+ parsed = JSON.parse(readFileSync(path, 'utf8'));
24
+ }
25
+ catch (error) {
26
+ throw new BackupUsageError(`${path}: not valid JSON — ${error instanceof Error ? error.message : String(error)}`);
27
+ }
28
+ if (parsed.version !== 1 || !Array.isArray(parsed.entries)) {
29
+ throw new BackupUsageError(`${path}: not a backup journal`);
30
+ }
31
+ return parsed;
32
+ }
33
+ //# sourceMappingURL=backup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"backup.js","sourceRoot":"","sources":["../../src/utils/backup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAC1F,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAEpD,MAAM,CAAC,MAAM,YAAY,GAAG,cAAc,CAAA;AAkB1C,MAAM,UAAU,cAAc,CAAC,MAAc,EAAE,MAAc;IAC3D,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;IAC/C,YAAY,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AAC9B,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,GAAW,EAAE,GAAS;IAC/C,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,EAAE,GAAG,CAAC,WAAW,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,EAAE,CAAA;AACvE,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,SAAiB,EAAE,OAAgB;IAC7D,SAAS,CAAC,SAAS,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAA;IACzC,aAAa,CAAC,IAAI,CAAC,SAAS,EAAE,YAAY,CAAC,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAA;AACvF,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,SAAiB;IAC3C,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,EAAE,YAAY,CAAC,CAAA;IAC1C,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;QACtB,MAAM,IAAI,gBAAgB,CAAC,GAAG,SAAS,WAAW,YAAY,iCAAiC,CAAC,CAAA;IAClG,CAAC;IACD,IAAI,MAAe,CAAA;IACnB,IAAI,CAAC;QACH,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAY,CAAA;IAC5D,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,IAAI,gBAAgB,CACxB,GAAG,IAAI,sBAAsB,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CACtF,CAAA;IACH,CAAC;IACD,IAAI,MAAM,CAAC,OAAO,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC;QAC3D,MAAM,IAAI,gBAAgB,CAAC,GAAG,IAAI,wBAAwB,CAAC,CAAA;IAC7D,CAAC;IACD,OAAO,MAAM,CAAA;AACf,CAAC"}
@@ -0,0 +1,28 @@
1
+ import type { VibesOptions } from '../format/vibes.js';
2
+ import { type TerminalIO } from './tty.js';
3
+ export type RestoreStatus = 'restored' | 'would-restore' | 'modified' | 'missing-backup' | 'damaged-backup' | 'error';
4
+ export interface RestoreOptions {
5
+ dir: string;
6
+ cwd: string;
7
+ dryRun?: boolean;
8
+ force?: boolean;
9
+ assumeYes?: boolean;
10
+ interactive?: boolean;
11
+ io?: TerminalIO;
12
+ style?: VibesOptions;
13
+ }
14
+ export interface RestoreEntryResult {
15
+ path: string;
16
+ status: RestoreStatus;
17
+ bytes?: number;
18
+ message?: string;
19
+ }
20
+ export interface RestoreReport {
21
+ dir: string;
22
+ dryRun: boolean;
23
+ results: RestoreEntryResult[];
24
+ counts: Record<RestoreStatus, number>;
25
+ cancelled: boolean;
26
+ exitCode: number;
27
+ }
28
+ export declare function runRestore(options: RestoreOptions): Promise<RestoreReport>;
@@ -0,0 +1,88 @@
1
+ import { createHash } from 'node:crypto';
2
+ import { existsSync, readFileSync } from 'node:fs';
3
+ import { resolve } from 'node:path';
4
+ import { createStyle } from '../format/style.js';
5
+ import { writeAtomic } from './atomic-write.js';
6
+ import { loadJournal } from './backup.js';
7
+ import { BackupUsageError } from './backup-error.js';
8
+ import { defaultTerminal, isInteractive, promptChoice } from './tty.js';
9
+ const sha1 = (data) => createHash('sha1').update(data).digest('hex');
10
+ export async function runRestore(options) {
11
+ const dir = resolve(options.cwd, options.dir);
12
+ const journal = loadJournal(dir);
13
+ const io = options.io ?? defaultTerminal();
14
+ const interactive = options.interactive ?? isInteractive(io);
15
+ const report = {
16
+ dir,
17
+ dryRun: Boolean(options.dryRun),
18
+ results: [],
19
+ counts: {
20
+ restored: 0,
21
+ 'would-restore': 0,
22
+ modified: 0,
23
+ 'missing-backup': 0,
24
+ 'damaged-backup': 0,
25
+ error: 0,
26
+ },
27
+ cancelled: false,
28
+ exitCode: 0,
29
+ };
30
+ if (!options.dryRun && !options.assumeYes) {
31
+ if (!interactive) {
32
+ throw new BackupUsageError('restore overwrites the current files with the saved originals — confirm it first (or preview with a dry run)');
33
+ }
34
+ const style = createStyle(options.style ?? {});
35
+ const answer = await promptChoice(io, `${style.warn('Restore')} ${style.value(`${journal.entries.length} files`)} from ${style.path(dir)}?`, [
36
+ { key: 'y', label: 'restore' },
37
+ { key: 'n', label: 'cancel' },
38
+ ], style, 'n');
39
+ if (answer !== 'y') {
40
+ report.cancelled = true;
41
+ report.exitCode = 1;
42
+ return report;
43
+ }
44
+ }
45
+ for (const entry of journal.entries) {
46
+ const result = {
47
+ path: entry.path,
48
+ status: 'restored',
49
+ bytes: entry.bytesBefore,
50
+ };
51
+ try {
52
+ if (!existsSync(entry.backup)) {
53
+ result.status = 'missing-backup';
54
+ }
55
+ else {
56
+ const saved = readFileSync(entry.backup);
57
+ if (sha1(saved) !== entry.hashBefore) {
58
+ result.status = 'damaged-backup';
59
+ }
60
+ else {
61
+ const current = existsSync(entry.path) ? sha1(readFileSync(entry.path)) : null;
62
+ if (current !== null && current !== entry.hashAfter && !options.force) {
63
+ result.status = 'modified';
64
+ }
65
+ else if (options.dryRun) {
66
+ result.status = 'would-restore';
67
+ }
68
+ else {
69
+ writeAtomic(entry.path, saved);
70
+ }
71
+ }
72
+ }
73
+ }
74
+ catch (error) {
75
+ result.status = 'error';
76
+ result.message = error instanceof Error ? error.message : String(error);
77
+ }
78
+ report.counts[result.status] += 1;
79
+ report.results.push(result);
80
+ }
81
+ const failed = report.counts.modified +
82
+ report.counts['missing-backup'] +
83
+ report.counts['damaged-backup'] +
84
+ report.counts.error;
85
+ report.exitCode = failed > 0 ? 1 : 0;
86
+ return report;
87
+ }
88
+ //# sourceMappingURL=restore.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"restore.js","sourceRoot":"","sources":["../../src/utils/restore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAEhD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AACpD,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,YAAY,EAAmB,MAAM,UAAU,CAAA;AAgCxF,MAAM,IAAI,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;AAE5E,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,OAAuB;IACtD,MAAM,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC,CAAA;IAC7C,MAAM,OAAO,GAAG,WAAW,CAAC,GAAG,CAAC,CAAA;IAChC,MAAM,EAAE,GAAG,OAAO,CAAC,EAAE,IAAI,eAAe,EAAE,CAAA;IAC1C,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,IAAI,aAAa,CAAC,EAAE,CAAC,CAAA;IAC5D,MAAM,MAAM,GAAkB;QAC5B,GAAG;QACH,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC;QAC/B,OAAO,EAAE,EAAE;QACX,MAAM,EAAE;YACN,QAAQ,EAAE,CAAC;YACX,eAAe,EAAE,CAAC;YAClB,QAAQ,EAAE,CAAC;YACX,gBAAgB,EAAE,CAAC;YACnB,gBAAgB,EAAE,CAAC;YACnB,KAAK,EAAE,CAAC;SACT;QACD,SAAS,EAAE,KAAK;QAChB,QAAQ,EAAE,CAAC;KACZ,CAAA;IAED,IAAI,CAAC,OAAO,CAAC,MAAM,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC;QAC1C,IAAI,CAAC,WAAW,EAAE,CAAC;YACjB,MAAM,IAAI,gBAAgB,CACxB,8GAA8G,CAC/G,CAAA;QACH,CAAC;QACD,MAAM,KAAK,GAAG,WAAW,CAAC,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC,CAAA;QAC9C,MAAM,MAAM,GAAG,MAAM,YAAY,CAC/B,EAAE,EACF,GAAG,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,QAAQ,CAAC,SAAS,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,EACrG;YACE,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE;YAC9B,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,QAAQ,EAAE;SAC9B,EACD,KAAK,EACL,GAAG,CACJ,CAAA;QACD,IAAI,MAAM,KAAK,GAAG,EAAE,CAAC;YACnB,MAAM,CAAC,SAAS,GAAG,IAAI,CAAA;YACvB,MAAM,CAAC,QAAQ,GAAG,CAAC,CAAA;YACnB,OAAO,MAAM,CAAA;QACf,CAAC;IACH,CAAC;IAED,KAAK,MAAM,KAAK,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;QACpC,MAAM,MAAM,GAAuB;YACjC,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB,MAAM,EAAE,UAAU;YAClB,KAAK,EAAE,KAAK,CAAC,WAAW;SACzB,CAAA;QACD,IAAI,CAAC;YACH,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC;gBAC9B,MAAM,CAAC,MAAM,GAAG,gBAAgB,CAAA;YAClC,CAAC;iBAAM,CAAC;gBACN,MAAM,KAAK,GAAG,YAAY,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;gBACxC,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,KAAK,CAAC,UAAU,EAAE,CAAC;oBACrC,MAAM,CAAC,MAAM,GAAG,gBAAgB,CAAA;gBAClC,CAAC;qBAAM,CAAC;oBACN,MAAM,OAAO,GAAG,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAA;oBAC9E,IAAI,OAAO,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,CAAC,SAAS,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;wBACtE,MAAM,CAAC,MAAM,GAAG,UAAU,CAAA;oBAC5B,CAAC;yBAAM,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;wBAC1B,MAAM,CAAC,MAAM,GAAG,eAAe,CAAA;oBACjC,CAAC;yBAAM,CAAC;wBACN,WAAW,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;oBAChC,CAAC;gBACH,CAAC;YACH,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,CAAC,MAAM,GAAG,OAAO,CAAA;YACvB,MAAM,CAAC,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;QACzE,CAAC;QACD,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;QACjC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IAC7B,CAAC;IAED,MAAM,MAAM,GACV,MAAM,CAAC,MAAM,CAAC,QAAQ;QACtB,MAAM,CAAC,MAAM,CAAC,gBAAgB,CAAC;QAC/B,MAAM,CAAC,MAAM,CAAC,gBAAgB,CAAC;QAC/B,MAAM,CAAC,MAAM,CAAC,KAAK,CAAA;IACrB,MAAM,CAAC,QAAQ,GAAG,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;IACpC,OAAO,MAAM,CAAA;AACf,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@macrulez/devtoolz",
3
- "version": "0.4.3",
3
+ "version": "0.5.0",
4
4
  "description": "A small toolbox of CLI commands that automate routine dev chores — strip comments/console.log, find dead exports, catch case-sensitivity import bugs before Linux CI does",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -42,17 +42,13 @@
42
42
  "format:fix": "prettier --write ."
43
43
  },
44
44
  "dependencies": {
45
- "blurhash": "^2.0.5",
46
45
  "commander": "^13.1.0",
47
46
  "diff": "^7.0.0",
48
- "hazehash": "^0.1.1",
49
47
  "ignore": "^6.0.2",
50
- "thumbhash": "^0.1.1",
51
48
  "typescript": "^5.7.3"
52
49
  },
53
50
  "devDependencies": {
54
51
  "@eslint/js": "^9.20.0",
55
- "@macrulez/masonry-kit-vue": "^0.1.4",
56
52
  "@types/d3-force": "^3.0.10",
57
53
  "@types/diff": "^6.0.0",
58
54
  "@types/node": "^20.14.0",
@@ -63,7 +59,6 @@
63
59
  "globals": "^17.13.0",
64
60
  "prettier": "^3.9.8",
65
61
  "sass": "^1.105.1",
66
- "sharp": "^0.35.5",
67
62
  "shiki": "^4.5.0",
68
63
  "tsx": "^4.19.2",
69
64
  "typescript-eslint": "^8.23.0",
@@ -1 +0,0 @@
1
- import{d as re,x as E,I as Ae,r as P,a as se,o as _,c as y,h,t as w,j as R,F as L,l as O,i as $,k as Xe,v as nt,s as pe,b as Q,n as Y,w as be,C as we,q as Ne,B as Le,O as ot,P as it,p as ne,e as We,g as xe,E as Te,y as De,z as rt}from"./index-D8H-zVzo.js";import{U as st,F as lt}from"./FolderBrowser-Cdzt7edI.js";import{U as at}from"./UiSegmented-CsTRUZoX.js";import{u as ct}from"./useCopy-i_vlQfC-.js";import{p as Ue,h as ut}from"./highlight-DT7vvdYt.js";const dt=re({__name:"ChecksOverview",props:{checks:{type:Array,required:!0},outcomes:{type:Object,required:!0},running:{type:Boolean,required:!0},progress:{type:Object,required:!0},tookMs:{type:null,required:!0}},emits:["run-all","open"],setup(n,{expose:t,emit:i}){t();const e=n,s=i,l=P(!1),o=[{id:"code",title:"Code"},{id:"dependencies",title:"Dependencies"},{id:"docs",title:"Documentation"}],r=E(()=>e.checks.filter(d=>d.slow).map(d=>d.title)),c=E(()=>o.map(d=>({...d,items:e.checks.filter(x=>x.group===d.id)})).filter(d=>d.items.length>0)),a=E(()=>e.progress.total>0?Math.round(e.progress.done/e.progress.total*100):0),p=E(()=>e.checks.filter(d=>e.outcomes[d.id])),m=E(()=>p.value.filter(d=>{const x=e.outcomes[d.id];return x&&x.findings.length===0&&!x.error}).length),g=E(()=>{const d={error:0,warning:0,info:0};for(const x of p.value)for(const M of e.outcomes[x.id]?.findings??[])d[M.severity]+=1;return d}),v=E(()=>g.value.error+g.value.warning+g.value.info);function C(d){const x={error:0,warning:0,info:0};for(const M of e.outcomes[d]?.findings??[])x[M.severity]+=1;return x}function f(d){const x=e.outcomes[d];return x?x.error?"broken":x.findings.length===0?"clean":"found":"idle"}const u={props:e,emit:s,includeSlow:l,GROUPS:o,slowNames:r,grouped:c,percent:a,ran:p,clean:m,totals:g,total:v,breakdown:C,state:f,Icon:Ae};return Object.defineProperty(u,"__isScriptSetup",{enumerable:!1,value:!0}),u}}),ft={class:"overview"},ht={class:"card block"},vt={class:"head"},_t={key:0,class:"muted"},gt={key:1,class:"muted"},yt=["disabled"],mt={key:0,class:"check"},pt=["disabled"],wt={key:1,class:"progress-wrap",role:"status"},xt={class:"progress"},kt={class:"muted small"},bt={key:2,class:"chips"},Ct={key:0,class:"sev sev--error"},Mt={key:1,class:"sev sev--warning"},Nt={key:2,class:"sev"},St={key:3,class:"sev sev--ok"},Ot={class:"group__title"},jt={class:"cards"},It=["onClick"],zt={class:"tile__top"},Pt={class:"tile__state"},At={class:"tile__text muted"},Ft={key:0,class:"tile__sev"},Et={key:0,class:"sev sev--error"},Lt={key:1,class:"sev sev--warning"},Tt={key:2,class:"sev"},Dt={key:1,class:"tile__slow muted"};function Ut(n,t,i,e,s,l){return _(),y("div",ft,[h("section",ht,[h("div",vt,[h("div",null,[t[3]||(t[3]=h("h2",null,"Project health",-1)),e.ran.length?(_(),y("p",_t,[h("strong",null,w(e.clean)+" of "+w(e.ran.length),1),t[2]||(t[2]=R(" checks are clean · ",-1)),h("strong",null,w(e.total),1),R(" finding"+w(e.total===1?"":"s")+" ",1),i.tookMs!==void 0?(_(),y(L,{key:0},[R(" · "+w((i.tookMs/1e3).toFixed(1))+" s",1)],64)):O("v-if",!0)])):(_(),y("p",gt,"Run every check at once to see where the project stands."))]),h("button",{class:"btn btn--primary",disabled:i.running,onClick:t[0]||(t[0]=o=>e.emit("run-all",e.includeSlow))},[$(e.Icon,{name:"play",size:15}),R(" "+w(i.running?"Checking…":e.ran.length?"Run all again":"Run all checks"),1)],8,yt)]),e.slowNames.length?(_(),y("label",mt,[Xe(h("input",{"onUpdate:modelValue":t[1]||(t[1]=o=>e.includeSlow=o),type:"checkbox",disabled:i.running},null,8,pt),[[nt,e.includeSlow]]),h("span",null,[R(" Include the slow check ("+w(e.slowNames.join(", "))+") ",1),t[4]||(t[4]=h("small",{class:"muted"}," — it type-checks the whole project",-1))])])):O("v-if",!0),i.running?(_(),y("div",wt,[h("div",xt,[h("div",{class:"progress__bar",style:pe({width:`${e.percent}%`})},null,4)]),h("span",kt,[R(w(i.progress.done)+" of "+w(i.progress.total)+" ",1),i.progress.current?(_(),y(L,{key:0},[R(" · "+w(i.progress.current),1)],64)):O("v-if",!0)])])):O("v-if",!0),e.ran.length?(_(),y("div",bt,[e.totals.error?(_(),y("span",Ct,w(e.totals.error)+" error"+w(e.totals.error===1?"":"s"),1)):O("v-if",!0),e.totals.warning?(_(),y("span",Mt,w(e.totals.warning)+" warning"+w(e.totals.warning===1?"":"s"),1)):O("v-if",!0),e.totals.info?(_(),y("span",Nt,w(e.totals.info)+" note"+w(e.totals.info===1?"":"s"),1)):O("v-if",!0),e.total===0?(_(),y("span",St,"Everything is clean")):O("v-if",!0)])):O("v-if",!0)]),(_(!0),y(L,null,Q(e.grouped,o=>(_(),y("section",{key:o.id,class:"group"},[h("h3",Ot,w(o.title),1),h("div",jt,[(_(!0),y(L,null,Q(o.items,r=>(_(),y("button",{key:r.id,class:Y(["tile",`tile--${e.state(r.id)}`]),onClick:c=>e.emit("open",r.id)},[h("span",zt,[h("strong",null,w(r.title),1),h("span",Pt,[e.state(r.id)==="idle"?(_(),y(L,{key:0},[R("not run")],64)):e.state(r.id)==="clean"?(_(),y(L,{key:1},[R("✓ clean")],64)):e.state(r.id)==="broken"?(_(),y(L,{key:2},[R("couldn’t run")],64)):(_(),y(L,{key:3},[R(w(i.outcomes[r.id]?.findings.length),1)],64))])]),h("span",At,w(i.outcomes[r.id]?.summary??r.description),1),e.state(r.id)==="found"?(_(),y("span",Ft,[e.breakdown(r.id).error?(_(),y("span",Et,w(e.breakdown(r.id).error)+" error",1)):O("v-if",!0),e.breakdown(r.id).warning?(_(),y("span",Lt,w(e.breakdown(r.id).warning)+" warning",1)):O("v-if",!0),e.breakdown(r.id).info?(_(),y("span",Tt,w(e.breakdown(r.id).info)+" note",1)):O("v-if",!0)])):O("v-if",!0),r.slow&&e.state(r.id)==="idle"?(_(),y("span",Dt,"slow")):O("v-if",!0)],10,It))),128))])]))),128))])}const Rt=se(dt,[["render",Ut],["__scopeId","data-v-21773826"],["__file","C:/work/NPM/devtoolz/ui/src/modules/checks/ChecksOverview.vue"]]);function Vt(n,t){var i,e=1;n==null&&(n=0),t==null&&(t=0);function s(){var l,o=i.length,r,c=0,a=0;for(l=0;l<o;++l)r=i[l],c+=r.x,a+=r.y;for(c=(c/o-n)*e,a=(a/o-t)*e,l=0;l<o;++l)r=i[l],r.x-=c,r.y-=a}return s.initialize=function(l){i=l},s.x=function(l){return arguments.length?(n=+l,s):n},s.y=function(l){return arguments.length?(t=+l,s):t},s.strength=function(l){return arguments.length?(e=+l,s):e},s}function Bt(n){const t=+this._x.call(null,n),i=+this._y.call(null,n);return Ke(this.cover(t,i),t,i,n)}function Ke(n,t,i,e){if(isNaN(t)||isNaN(i))return n;var s,l=n._root,o={data:e},r=n._x0,c=n._y0,a=n._x1,p=n._y1,m,g,v,C,f,u,d,x;if(!l)return n._root=o,n;for(;l.length;)if((f=t>=(m=(r+a)/2))?r=m:a=m,(u=i>=(g=(c+p)/2))?c=g:p=g,s=l,!(l=l[d=u<<1|f]))return s[d]=o,n;if(v=+n._x.call(null,l.data),C=+n._y.call(null,l.data),t===v&&i===C)return o.next=l,s?s[d]=o:n._root=o,n;do s=s?s[d]=new Array(4):n._root=new Array(4),(f=t>=(m=(r+a)/2))?r=m:a=m,(u=i>=(g=(c+p)/2))?c=g:p=g;while((d=u<<1|f)===(x=(C>=g)<<1|v>=m));return s[x]=l,s[d]=o,n}function qt(n){var t,i,e=n.length,s,l,o=new Array(e),r=new Array(e),c=1/0,a=1/0,p=-1/0,m=-1/0;for(i=0;i<e;++i)isNaN(s=+this._x.call(null,t=n[i]))||isNaN(l=+this._y.call(null,t))||(o[i]=s,r[i]=l,s<c&&(c=s),s>p&&(p=s),l<a&&(a=l),l>m&&(m=l));if(c>p||a>m)return this;for(this.cover(c,a).cover(p,m),i=0;i<e;++i)Ke(this,o[i],r[i],n[i]);return this}function Gt(n,t){if(isNaN(n=+n)||isNaN(t=+t))return this;var i=this._x0,e=this._y0,s=this._x1,l=this._y1;if(isNaN(i))s=(i=Math.floor(n))+1,l=(e=Math.floor(t))+1;else{for(var o=s-i||1,r=this._root,c,a;i>n||n>=s||e>t||t>=l;)switch(a=(t<e)<<1|n<i,c=new Array(4),c[a]=r,r=c,o*=2,a){case 0:s=i+o,l=e+o;break;case 1:i=s-o,l=e+o;break;case 2:s=i+o,e=l-o;break;case 3:i=s-o,e=l-o;break}this._root&&this._root.length&&(this._root=r)}return this._x0=i,this._y0=e,this._x1=s,this._y1=l,this}function Yt(){var n=[];return this.visit(function(t){if(!t.length)do n.push(t.data);while(t=t.next)}),n}function Ht(n){return arguments.length?this.cover(+n[0][0],+n[0][1]).cover(+n[1][0],+n[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function H(n,t,i,e,s){this.node=n,this.x0=t,this.y0=i,this.x1=e,this.y1=s}function Xt(n,t,i){var e,s=this._x0,l=this._y0,o,r,c,a,p=this._x1,m=this._y1,g=[],v=this._root,C,f;for(v&&g.push(new H(v,s,l,p,m)),i==null?i=1/0:(s=n-i,l=t-i,p=n+i,m=t+i,i*=i);C=g.pop();)if(!(!(v=C.node)||(o=C.x0)>p||(r=C.y0)>m||(c=C.x1)<s||(a=C.y1)<l))if(v.length){var u=(o+c)/2,d=(r+a)/2;g.push(new H(v[3],u,d,c,a),new H(v[2],o,d,u,a),new H(v[1],u,r,c,d),new H(v[0],o,r,u,d)),(f=(t>=d)<<1|n>=u)&&(C=g[g.length-1],g[g.length-1]=g[g.length-1-f],g[g.length-1-f]=C)}else{var x=n-+this._x.call(null,v.data),M=t-+this._y.call(null,v.data),k=x*x+M*M;if(k<i){var I=Math.sqrt(i=k);s=n-I,l=t-I,p=n+I,m=t+I,e=v.data}}return e}function Wt(n){if(isNaN(p=+this._x.call(null,n))||isNaN(m=+this._y.call(null,n)))return this;var t,i=this._root,e,s,l,o=this._x0,r=this._y0,c=this._x1,a=this._y1,p,m,g,v,C,f,u,d;if(!i)return this;if(i.length)for(;;){if((C=p>=(g=(o+c)/2))?o=g:c=g,(f=m>=(v=(r+a)/2))?r=v:a=v,t=i,!(i=i[u=f<<1|C]))return this;if(!i.length)break;(t[u+1&3]||t[u+2&3]||t[u+3&3])&&(e=t,d=u)}for(;i.data!==n;)if(s=i,!(i=i.next))return this;return(l=i.next)&&delete i.next,s?(l?s.next=l:delete s.next,this):t?(l?t[u]=l:delete t[u],(i=t[0]||t[1]||t[2]||t[3])&&i===(t[3]||t[2]||t[1]||t[0])&&!i.length&&(e?e[d]=i:this._root=i),this):(this._root=l,this)}function Kt(n){for(var t=0,i=n.length;t<i;++t)this.remove(n[t]);return this}function Qt(){return this._root}function Jt(){var n=0;return this.visit(function(t){if(!t.length)do++n;while(t=t.next)}),n}function Zt(n){var t=[],i,e=this._root,s,l,o,r,c;for(e&&t.push(new H(e,this._x0,this._y0,this._x1,this._y1));i=t.pop();)if(!n(e=i.node,l=i.x0,o=i.y0,r=i.x1,c=i.y1)&&e.length){var a=(l+r)/2,p=(o+c)/2;(s=e[3])&&t.push(new H(s,a,p,r,c)),(s=e[2])&&t.push(new H(s,l,p,a,c)),(s=e[1])&&t.push(new H(s,a,o,r,p)),(s=e[0])&&t.push(new H(s,l,o,a,p))}return this}function $t(n){var t=[],i=[],e;for(this._root&&t.push(new H(this._root,this._x0,this._y0,this._x1,this._y1));e=t.pop();){var s=e.node;if(s.length){var l,o=e.x0,r=e.y0,c=e.x1,a=e.y1,p=(o+c)/2,m=(r+a)/2;(l=s[0])&&t.push(new H(l,o,r,p,m)),(l=s[1])&&t.push(new H(l,p,r,c,m)),(l=s[2])&&t.push(new H(l,o,m,p,a)),(l=s[3])&&t.push(new H(l,p,m,c,a))}i.push(e)}for(;e=i.pop();)n(e.node,e.x0,e.y0,e.x1,e.y1);return this}function en(n){return n[0]}function tn(n){return arguments.length?(this._x=n,this):this._x}function nn(n){return n[1]}function on(n){return arguments.length?(this._y=n,this):this._y}function Fe(n,t,i){var e=new Ee(t??en,i??nn,NaN,NaN,NaN,NaN);return n==null?e:e.addAll(n)}function Ee(n,t,i,e,s,l){this._x=n,this._y=t,this._x0=i,this._y0=e,this._x1=s,this._y1=l,this._root=void 0}function Re(n){for(var t={data:n.data},i=t;n=n.next;)i=i.next={data:n.data};return t}var W=Fe.prototype=Ee.prototype;W.copy=function(){var n=new Ee(this._x,this._y,this._x0,this._y0,this._x1,this._y1),t=this._root,i,e;if(!t)return n;if(!t.length)return n._root=Re(t),n;for(i=[{source:t,target:n._root=new Array(4)}];t=i.pop();)for(var s=0;s<4;++s)(e=t.source[s])&&(e.length?i.push({source:e,target:t.target[s]=new Array(4)}):t.target[s]=Re(e));return n};W.add=Bt;W.addAll=qt;W.cover=Gt;W.data=Yt;W.extent=Ht;W.find=Xt;W.remove=Wt;W.removeAll=Kt;W.root=Qt;W.size=Jt;W.visit=Zt;W.visitAfter=$t;W.x=tn;W.y=on;function X(n){return function(){return n}}function oe(n){return(n()-.5)*1e-6}function rn(n){return n.x+n.vx}function sn(n){return n.y+n.vy}function ln(n){var t,i,e,s=1,l=1;typeof n!="function"&&(n=X(n==null?1:+n));function o(){for(var a,p=t.length,m,g,v,C,f,u,d=0;d<l;++d)for(m=Fe(t,rn,sn).visitAfter(r),a=0;a<p;++a)g=t[a],f=i[g.index],u=f*f,v=g.x+g.vx,C=g.y+g.vy,m.visit(x);function x(M,k,I,V,q){var T=M.data,b=M.r,S=f+b;if(T){if(T.index>g.index){var z=v-T.x-T.vx,D=C-T.y-T.vy,U=z*z+D*D;U<S*S&&(z===0&&(z=oe(e),U+=z*z),D===0&&(D=oe(e),U+=D*D),U=(S-(U=Math.sqrt(U)))/U*s,g.vx+=(z*=U)*(S=(b*=b)/(u+b)),g.vy+=(D*=U)*S,T.vx-=z*(S=1-S),T.vy-=D*S)}return}return k>v+S||V<v-S||I>C+S||q<C-S}}function r(a){if(a.data)return a.r=i[a.data.index];for(var p=a.r=0;p<4;++p)a[p]&&a[p].r>a.r&&(a.r=a[p].r)}function c(){if(t){var a,p=t.length,m;for(i=new Array(p),a=0;a<p;++a)m=t[a],i[m.index]=+n(m,a,t)}}return o.initialize=function(a,p){t=a,e=p,c()},o.iterations=function(a){return arguments.length?(l=+a,o):l},o.strength=function(a){return arguments.length?(s=+a,o):s},o.radius=function(a){return arguments.length?(n=typeof a=="function"?a:X(+a),c(),o):n},o}function an(n){return n.index}function Ve(n,t){var i=n.get(t);if(!i)throw new Error("node not found: "+t);return i}function cn(n){var t=an,i=m,e,s=X(30),l,o,r,c,a,p=1;n==null&&(n=[]);function m(u){return 1/Math.min(r[u.source.index],r[u.target.index])}function g(u){for(var d=0,x=n.length;d<p;++d)for(var M=0,k,I,V,q,T,b,S;M<x;++M)k=n[M],I=k.source,V=k.target,q=V.x+V.vx-I.x-I.vx||oe(a),T=V.y+V.vy-I.y-I.vy||oe(a),b=Math.sqrt(q*q+T*T),b=(b-l[M])/b*u*e[M],q*=b,T*=b,V.vx-=q*(S=c[M]),V.vy-=T*S,I.vx+=q*(S=1-S),I.vy+=T*S}function v(){if(o){var u,d=o.length,x=n.length,M=new Map(o.map((I,V)=>[t(I,V,o),I])),k;for(u=0,r=new Array(d);u<x;++u)k=n[u],k.index=u,typeof k.source!="object"&&(k.source=Ve(M,k.source)),typeof k.target!="object"&&(k.target=Ve(M,k.target)),r[k.source.index]=(r[k.source.index]||0)+1,r[k.target.index]=(r[k.target.index]||0)+1;for(u=0,c=new Array(x);u<x;++u)k=n[u],c[u]=r[k.source.index]/(r[k.source.index]+r[k.target.index]);e=new Array(x),C(),l=new Array(x),f()}}function C(){if(o)for(var u=0,d=n.length;u<d;++u)e[u]=+i(n[u],u,n)}function f(){if(o)for(var u=0,d=n.length;u<d;++u)l[u]=+s(n[u],u,n)}return g.initialize=function(u,d){o=u,a=d,v()},g.links=function(u){return arguments.length?(n=u,v(),g):n},g.id=function(u){return arguments.length?(t=u,g):t},g.iterations=function(u){return arguments.length?(p=+u,g):p},g.strength=function(u){return arguments.length?(i=typeof u=="function"?u:X(+u),C(),g):i},g.distance=function(u){return arguments.length?(s=typeof u=="function"?u:X(+u),f(),g):s},g}var un={value:()=>{}};function Qe(){for(var n=0,t=arguments.length,i={},e;n<t;++n){if(!(e=arguments[n]+"")||e in i||/[\s.]/.test(e))throw new Error("illegal type: "+e);i[e]=[]}return new ke(i)}function ke(n){this._=n}function dn(n,t){return n.trim().split(/^|\s+/).map(function(i){var e="",s=i.indexOf(".");if(s>=0&&(e=i.slice(s+1),i=i.slice(0,s)),i&&!t.hasOwnProperty(i))throw new Error("unknown type: "+i);return{type:i,name:e}})}ke.prototype=Qe.prototype={constructor:ke,on:function(n,t){var i=this._,e=dn(n+"",i),s,l=-1,o=e.length;if(arguments.length<2){for(;++l<o;)if((s=(n=e[l]).type)&&(s=fn(i[s],n.name)))return s;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++l<o;)if(s=(n=e[l]).type)i[s]=Be(i[s],n.name,t);else if(t==null)for(s in i)i[s]=Be(i[s],n.name,null);return this},copy:function(){var n={},t=this._;for(var i in t)n[i]=t[i].slice();return new ke(n)},call:function(n,t){if((s=arguments.length-2)>0)for(var i=new Array(s),e=0,s,l;e<s;++e)i[e]=arguments[e+2];if(!this._.hasOwnProperty(n))throw new Error("unknown type: "+n);for(l=this._[n],e=0,s=l.length;e<s;++e)l[e].value.apply(t,i)},apply:function(n,t,i){if(!this._.hasOwnProperty(n))throw new Error("unknown type: "+n);for(var e=this._[n],s=0,l=e.length;s<l;++s)e[s].value.apply(t,i)}};function fn(n,t){for(var i=0,e=n.length,s;i<e;++i)if((s=n[i]).name===t)return s.value}function Be(n,t,i){for(var e=0,s=n.length;e<s;++e)if(n[e].name===t){n[e]=un,n=n.slice(0,e).concat(n.slice(e+1));break}return i!=null&&n.push({name:t,value:i}),n}var le=0,ue=0,ae=0,Je=1e3,Ce,de,Me=0,ie=0,Se=0,fe=typeof performance=="object"&&performance.now?performance:Date,Ze=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(n){setTimeout(n,17)};function $e(){return ie||(Ze(hn),ie=fe.now()+Se)}function hn(){ie=0}function ze(){this._call=this._time=this._next=null}ze.prototype=et.prototype={constructor:ze,restart:function(n,t,i){if(typeof n!="function")throw new TypeError("callback is not a function");i=(i==null?$e():+i)+(t==null?0:+t),!this._next&&de!==this&&(de?de._next=this:Ce=this,de=this),this._call=n,this._time=i,Pe()},stop:function(){this._call&&(this._call=null,this._time=1/0,Pe())}};function et(n,t,i){var e=new ze;return e.restart(n,t,i),e}function vn(){$e(),++le;for(var n=Ce,t;n;)(t=ie-n._time)>=0&&n._call.call(void 0,t),n=n._next;--le}function qe(){ie=(Me=fe.now())+Se,le=ue=0;try{vn()}finally{le=0,gn(),ie=0}}function _n(){var n=fe.now(),t=n-Me;t>Je&&(Se-=t,Me=n)}function gn(){for(var n,t=Ce,i,e=1/0;t;)t._call?(e>t._time&&(e=t._time),n=t,t=t._next):(i=t._next,t._next=null,t=n?n._next=i:Ce=i);de=n,Pe(e)}function Pe(n){if(!le){ue&&(ue=clearTimeout(ue));var t=n-ie;t>24?(n<1/0&&(ue=setTimeout(qe,n-fe.now()-Se)),ae&&(ae=clearInterval(ae))):(ae||(Me=fe.now(),ae=setInterval(_n,Je)),le=1,Ze(qe))}}const yn=1664525,mn=1013904223,Ge=4294967296;function pn(){let n=1;return()=>(n=(yn*n+mn)%Ge)/Ge}function wn(n){return n.x}function xn(n){return n.y}var kn=10,bn=Math.PI*(3-Math.sqrt(5));function Cn(n){var t,i=1,e=.001,s=1-Math.pow(e,1/300),l=0,o=.6,r=new Map,c=et(m),a=Qe("tick","end"),p=pn();n==null&&(n=[]);function m(){g(),a.call("tick",t),i<e&&(c.stop(),a.call("end",t))}function g(f){var u,d=n.length,x;f===void 0&&(f=1);for(var M=0;M<f;++M)for(i+=(l-i)*s,r.forEach(function(k){k(i)}),u=0;u<d;++u)x=n[u],x.fx==null?x.x+=x.vx*=o:(x.x=x.fx,x.vx=0),x.fy==null?x.y+=x.vy*=o:(x.y=x.fy,x.vy=0);return t}function v(){for(var f=0,u=n.length,d;f<u;++f){if(d=n[f],d.index=f,d.fx!=null&&(d.x=d.fx),d.fy!=null&&(d.y=d.fy),isNaN(d.x)||isNaN(d.y)){var x=kn*Math.sqrt(.5+f),M=f*bn;d.x=x*Math.cos(M),d.y=x*Math.sin(M)}(isNaN(d.vx)||isNaN(d.vy))&&(d.vx=d.vy=0)}}function C(f){return f.initialize&&f.initialize(n,p),f}return v(),t={tick:g,restart:function(){return c.restart(m),t},stop:function(){return c.stop(),t},nodes:function(f){return arguments.length?(n=f,v(),r.forEach(C),t):n},alpha:function(f){return arguments.length?(i=+f,t):i},alphaMin:function(f){return arguments.length?(e=+f,t):e},alphaDecay:function(f){return arguments.length?(s=+f,t):+s},alphaTarget:function(f){return arguments.length?(l=+f,t):l},velocityDecay:function(f){return arguments.length?(o=1-f,t):1-o},randomSource:function(f){return arguments.length?(p=f,r.forEach(C),t):p},force:function(f,u){return arguments.length>1?(u==null?r.delete(f):r.set(f,C(u)),t):r.get(f)},find:function(f,u,d){var x=0,M=n.length,k,I,V,q,T;for(d==null?d=1/0:d*=d,x=0;x<M;++x)q=n[x],k=f-q.x,I=u-q.y,V=k*k+I*I,V<d&&(T=q,d=V);return T},on:function(f,u){return arguments.length>1?(a.on(f,u),t):a.on(f)}}}function Mn(){var n,t,i,e,s=X(-30),l,o=1,r=1/0,c=.81;function a(v){var C,f=n.length,u=Fe(n,wn,xn).visitAfter(m);for(e=v,C=0;C<f;++C)t=n[C],u.visit(g)}function p(){if(n){var v,C=n.length,f;for(l=new Array(C),v=0;v<C;++v)f=n[v],l[f.index]=+s(f,v,n)}}function m(v){var C=0,f,u,d=0,x,M,k;if(v.length){for(x=M=k=0;k<4;++k)(f=v[k])&&(u=Math.abs(f.value))&&(C+=f.value,d+=u,x+=u*f.x,M+=u*f.y);v.x=x/d,v.y=M/d}else{f=v,f.x=f.data.x,f.y=f.data.y;do C+=l[f.data.index];while(f=f.next)}v.value=C}function g(v,C,f,u){if(!v.value)return!0;var d=v.x-t.x,x=v.y-t.y,M=u-C,k=d*d+x*x;if(M*M/c<k)return k<r&&(d===0&&(d=oe(i),k+=d*d),x===0&&(x=oe(i),k+=x*x),k<o&&(k=Math.sqrt(o*k)),t.vx+=d*v.value*e/k,t.vy+=x*v.value*e/k),!0;if(v.length||k>=r)return;(v.data!==t||v.next)&&(d===0&&(d=oe(i),k+=d*d),x===0&&(x=oe(i),k+=x*x),k<o&&(k=Math.sqrt(o*k)));do v.data!==t&&(M=l[v.data.index]*e/k,t.vx+=d*M,t.vy+=x*M);while(v=v.next)}return a.initialize=function(v,C){n=v,i=C,p()},a.strength=function(v){return arguments.length?(s=typeof v=="function"?v:X(+v),p(),a):s},a.distanceMin=function(v){return arguments.length?(o=v*v,a):Math.sqrt(o)},a.distanceMax=function(v){return arguments.length?(r=v*v,a):Math.sqrt(r)},a.theta=function(v){return arguments.length?(c=v*v,a):Math.sqrt(c)},a}function Nn(n){var t=X(.1),i,e,s;typeof n!="function"&&(n=X(n==null?0:+n));function l(r){for(var c=0,a=i.length,p;c<a;++c)p=i[c],p.vx+=(s[c]-p.x)*e[c]*r}function o(){if(i){var r,c=i.length;for(e=new Array(c),s=new Array(c),r=0;r<c;++r)e[r]=isNaN(s[r]=+n(i[r],r,i))?0:+t(i[r],r,i)}}return l.initialize=function(r){i=r,o()},l.strength=function(r){return arguments.length?(t=typeof r=="function"?r:X(+r),o(),l):t},l.x=function(r){return arguments.length?(n=typeof r=="function"?r:X(+r),o(),l):n},l}function Sn(n){var t=X(.1),i,e,s;typeof n!="function"&&(n=X(n==null?0:+n));function l(r){for(var c=0,a=i.length,p;c<a;++c)p=i[c],p.vy+=(s[c]-p.y)*e[c]*r}function o(){if(i){var r,c=i.length;for(e=new Array(c),s=new Array(c),r=0;r<c;++r)e[r]=isNaN(s[r]=+n(i[r],r,i))?0:+t(i[r],r,i)}}return l.initialize=function(r){i=r,o()},l.strength=function(r){return arguments.length?(t=typeof r=="function"?r:X(+r),o(),l):t},l.y=function(r){return arguments.length?(n=typeof r=="function"?r:X(+r),o(),l):n},l}const ve=900,_e=560,ce=9,On=re({__name:"CycleGraph",props:{cycles:{type:Array,required:!0},selected:{type:[Number,null],required:!0}},emits:["select-cycle","open-file"],setup(n,{expose:t,emit:i}){t();const e=n,s=i,l=P(null),o=P({x:0,y:0,w:ve,h:_e}),r=P({x:0,y:0,w:ve,h:_e}),c=P(null),a=P();function p(b){return b.split("/").pop()??b}function m(b){const S=b.split("/");return S.pop(),S.join("/")}const g=E(()=>{const b=new Map,S=new Map;for(const A of e.cycles)A.files.forEach((B,K)=>{const Z=b.get(B)??{id:B,label:p(B),dir:m(B),cycles:new Set};Z.cycles.add(A.id),b.set(B,Z);const ee=A.files[(K+1)%A.files.length],G=`${B}>${ee}`,te=S.get(G)??{key:G,from:B,to:ee,cycles:new Set,typeOnly:!0};te.cycles.add(A.id),A.typeOnly||(te.typeOnly=!1),S.set(G,te)});const z=[...b.values()];z.forEach((A,B)=>{const K=B/Math.max(z.length,1)*Math.PI*2;A.x=Math.cos(K)*160,A.y=Math.sin(K)*160});const D=[...S.values()].map(A=>({source:A.from,target:A.to})),U=Cn(z).force("link",cn(D).id(A=>A.id).distance(120)).force("charge",Mn().strength(-300)).force("x",Nn(0).strength(.09)).force("y",Sn(0).strength(.09)).force("center",Vt(0,0)).force("collide",ln(46)).stop(),J=Math.min(400,120+z.length*4);for(let A=0;A<J;A++)U.tick();return{nodes:z,edges:[...S.values()]}}),v=E(()=>new Map(g.value.nodes.map(b=>[b.id,{x:b.x??0,y:b.y??0}])));function C(){const b=[...v.value.values()];if(b.length===0)return;const S=90,z=Math.min(...b.map(G=>G.x))-S,D=Math.max(...b.map(G=>G.x))+S,U=Math.min(...b.map(G=>G.y))-S,J=Math.max(...b.map(G=>G.y))+S;let A=D-z,B=J-U;const K=a.value?.getBoundingClientRect(),Z=K&&K.height>0?K.width/K.height:ve/_e;A/B<Z?A=B*Z:B=A/Z;const ee={x:(z+D)/2-A/2,y:(U+J)/2-B/2,w:A,h:B};r.value=ee,o.value={...ee}}be(g,()=>we(C)),Ne(C);const f=E(()=>e.cycles.find(b=>b.id===e.selected));function u(b){return f.value?b.cycles.has(f.value.id):l.value?b.id===l.value||g.value.edges.some(S=>S.from===l.value&&S.to===b.id||S.to===l.value&&S.from===b.id):!0}function d(b){return f.value?b.cycles.has(f.value.id):l.value?b.from===l.value||b.to===l.value:!0}function x(b){const S=v.value.get(b.from),z=v.value.get(b.to);if(!S||!z)return"";const D=z.x-S.x,U=z.y-S.y,J=Math.hypot(D,U)||1,A=D/J,B=U/J,K=S.x+A*(ce+2),Z=S.y+B*(ce+2),ee=z.x-A*(ce+7),G=z.y-B*(ce+7),te=Math.min(26,J*.18),Oe=(K+ee)/2-B*te,he=(Z+G)/2+A*te;return`M ${K} ${Z} Q ${Oe} ${he} ${ee} ${G}`}function M(b){b.preventDefault();const S=a.value?.getBoundingClientRect();if(!S)return;const z=b.deltaY>0?1.15:1/1.15,D=Math.min(Math.max(o.value.w*z,r.value.w/8),r.value.w*4),U=D/(o.value.w/o.value.h),J=(b.clientX-S.left)/S.width,A=(b.clientY-S.top)/S.height;o.value={x:o.value.x+(o.value.w-D)*J,y:o.value.y+(o.value.h-U)*A,w:D,h:U}}function k(b){b.target.closest(".node")||(c.value={x:b.clientX,y:b.clientY},b.currentTarget.setPointerCapture(b.pointerId))}function I(b){const S=c.value,z=a.value?.getBoundingClientRect();!S||!z||(o.value={...o.value,x:o.value.x-(b.clientX-S.x)/z.width*o.value.w,y:o.value.y-(b.clientY-S.y)/z.height*o.value.h},c.value={x:b.clientX,y:b.clientY})}function V(){c.value=null}function q(b){return b.cycles.size>1?"node--hub":"node--single"}const T={props:e,emit:s,WIDTH:ve,HEIGHT:_e,RADIUS:ce,hovered:l,view:o,home:r,dragging:c,svg:a,baseName:p,dirName:m,graph:g,positions:v,fit:C,activeCycle:f,nodeOn:u,edgeOn:d,edgePath:x,zoom:M,down:k,move:I,up:V,nodeClass:q};return Object.defineProperty(T,"__isScriptSetup",{enumerable:!1,value:!0}),T}}),jn={class:"graph"},In=["viewBox"],zn=["d","marker-end"],Pn=["transform","aria-label","onMouseenter","onFocus","onClick","onKeydown"],An={class:"node__label",y:"-16","text-anchor":"middle"},Fn={key:0,class:"node__dir",y:"26","text-anchor":"middle"},En={class:"graph__bar"};function Ln(n,t,i,e,s,l){return _(),y("div",jn,[(_(),y("svg",{ref:"svg",class:Y(["graph__svg",{"graph__svg--drag":e.dragging}]),viewBox:`${e.view.x} ${e.view.y} ${e.view.w} ${e.view.h}`,role:"img","aria-label":"Graph of the import cycles",onWheel:e.zoom,onPointerdown:e.down,onPointermove:e.move,onPointerup:e.up,onClick:t[2]||(t[2]=Le(o=>e.emit("select-cycle",null),["self"]))},[t[4]||(t[4]=h("defs",null,[h("marker",{id:"arrow",viewBox:"0 0 10 10",refX:"8",refY:"5",markerWidth:"7",markerHeight:"7",orient:"auto-start-reverse"},[h("path",{d:"M 0 0 L 10 5 L 0 10 z",class:"arrow"})]),h("marker",{id:"arrow-on",viewBox:"0 0 10 10",refX:"8",refY:"5",markerWidth:"7",markerHeight:"7",orient:"auto-start-reverse"},[h("path",{d:"M 0 0 L 10 5 L 0 10 z",class:"arrow arrow--on"})])],-1)),(_(!0),y(L,null,Q(e.graph.edges,o=>(_(),y("path",{key:o.key,class:Y(["edge",{"edge--dim":!e.edgeOn(o),"edge--on":!!e.activeCycle&&e.edgeOn(o),"edge--type":o.typeOnly,"edge--strong":o.cycles.size>1}]),d:e.edgePath(o),"marker-end":e.activeCycle&&e.edgeOn(o)?"url(#arrow-on)":"url(#arrow)"},null,10,zn))),128)),(_(!0),y(L,null,Q(e.graph.nodes,o=>(_(),y("g",{key:o.id,class:Y(["node",[e.nodeClass(o),{"node--dim":!e.nodeOn(o)}]]),transform:`translate(${o.x??0}, ${o.y??0})`,tabindex:"0",role:"button","aria-label":`${o.id}, in ${o.cycles.size} cycle${o.cycles.size===1?"":"s"}`,onMouseenter:r=>e.hovered=o.id,onMouseleave:t[0]||(t[0]=r=>e.hovered=null),onFocus:r=>e.hovered=o.id,onBlur:t[1]||(t[1]=r=>e.hovered=null),onClick:Le(r=>e.emit("open-file",o.id),["stop"]),onKeydown:ot(r=>e.emit("open-file",o.id),["enter"])},[h("title",null,w(o.id)+" — in "+w(o.cycles.size)+" cycle"+w(o.cycles.size===1?"":"s"),1),h("circle",{r:e.RADIUS,class:"node__dot"}),h("text",An,w(o.label),1),o.dir?(_(),y("text",Fn,w(o.dir),1)):O("v-if",!0)],42,Pn))),128))],42,In)),h("div",En,[t[5]||(t[5]=it('<span class="legend" data-v-613d80bb><i class="legend__dot legend__dot--single" data-v-613d80bb></i> in one cycle</span><span class="legend" data-v-613d80bb><i class="legend__dot legend__dot--hub" data-v-613d80bb></i> in several cycles</span><span class="legend" data-v-613d80bb><i class="legend__line legend__line--type" data-v-613d80bb></i> type-only import</span><span class="spacer" data-v-613d80bb></span>',4)),h("button",{class:"btn btn--small",onClick:t[3]||(t[3]=o=>e.view={...e.home})},"Fit to screen")]),t[6]||(t[6]=h("p",{class:"muted small"}," Scroll to zoom, drag to move. Click a file to open it, or pick a cycle in the list to light it up. ",-1))])}const Tn=se(On,[["render",Ln],["__scopeId","data-v-613d80bb"],["__file","C:/work/NPM/devtoolz/ui/src/modules/checks/CycleGraph.vue"]]),Ye=40,Dn=re({__name:"FindingsList",props:{findings:{type:Array,required:!0}},emits:["open"],setup(n,{expose:t,emit:i}){t();const e=n,s=i,l=P(Ye),o=P(new Set),r=E(()=>{const m=new Map;for(const g of e.findings){const v=g.file??"Project",C=m.get(v);C?C.push(g):m.set(v,[g])}return[...m.entries()].map(([g,v])=>({file:g,items:[...v].sort((C,f)=>(C.line??0)-(f.line??0))})).sort((g,v)=>g.file.localeCompare(v.file))});function c(m){const g=new Set(o.value);g.has(m)?g.delete(m):g.add(m),o.value=g}function a(m){return m.line?m.column?`${m.line}:${m.column}`:String(m.line):""}const p={props:e,emit:s,PAGE:Ye,shownGroups:l,collapsed:o,groups:r,toggle:c,place:a};return Object.defineProperty(p,"__isScriptSetup",{enumerable:!1,value:!0}),p}}),Un={class:"groups"},Rn=["aria-expanded","onClick"],Vn={class:"group__file"},Bn={class:"group__count"},qn={key:0,class:"items"},Gn=["onClick"],Yn={class:"item__place"},Hn=["title"],Xn={class:"item__text"},Wn={class:"item__message"},Kn={key:0,class:"item__hint muted"},Qn={class:"item__code"},Jn={key:0,class:"more"};function Zn(n,t,i,e,s,l){return _(),y("div",Un,[(_(!0),y(L,null,Q(e.groups.slice(0,e.shownGroups),o=>(_(),y("section",{key:o.file,class:"group"},[h("button",{class:"group__head","aria-expanded":!e.collapsed.has(o.file),onClick:r=>e.toggle(o.file)},[h("span",{class:Y(["group__caret",{"group__caret--open":!e.collapsed.has(o.file)}])},"▸",2),h("code",Vn,w(o.file),1),h("span",Bn,w(o.items.length),1)],8,Rn),e.collapsed.has(o.file)?O("v-if",!0):(_(),y("ul",qn,[(_(!0),y(L,null,Q(o.items,(r,c)=>(_(),y("li",{key:c,class:"item"},[h("button",{class:"item__main",onClick:a=>e.emit("open",r)},[h("span",Yn,w(e.place(r)),1),h("span",{class:Y(["dot",`dot--${r.severity}`]),title:r.severity},null,10,Hn),h("span",Xn,[h("span",Wn,w(r.message),1),r.hint?(_(),y("span",Kn,w(r.hint),1)):O("v-if",!0)]),h("span",Qn,w(r.code),1)],8,Gn)]))),128))]))]))),128)),e.shownGroups<e.groups.length?(_(),y("div",Jn,[h("button",{class:"btn",onClick:t[0]||(t[0]=o=>e.shownGroups+=e.PAGE)}," Show more files ("+w(e.groups.length-e.shownGroups)+" left) ",1),h("button",{class:"btn",onClick:t[1]||(t[1]=o=>e.shownGroups=e.groups.length)},"Show all")])):O("v-if",!0)])}const tt=se(Dn,[["render",Zn],["__scopeId","data-v-917e27d1"],["__file","C:/work/NPM/devtoolz/ui/src/modules/checks/FindingsList.vue"]]),$n=re({__name:"CyclesView",props:{findings:{type:Array,required:!0}},emits:["open-file","open"],setup(n,{expose:t,emit:i}){t();const e=n,s=i,l=P("graph"),o=P(null),r=E(()=>e.findings.filter(m=>m.files&&m.files.length>0).map((m,g)=>({id:g,files:m.files,typeOnly:m.code==="type-only"})));function c(m){o.value=o.value===m?null:m}function a(m){return[...m.files.map(g=>g.split("/").pop()??g),m.files[0]?.split("/").pop()].join(" → ")}const p={props:e,emit:s,mode:l,selected:o,cycles:r,pick:c,chain:a,UiSegmented:at,CycleGraph:Tn,FindingsList:tt};return Object.defineProperty(p,"__isScriptSetup",{enumerable:!1,value:!0}),p}}),eo={class:"cycles"},to={key:0,class:"split"},no={class:"side","aria-label":"Cycles"},oo={class:"side__title"},io={class:"side__list"},ro=["onClick"],so={class:"cycle__head"},lo={class:"muted"},ao={key:0,class:"cycle__tag"},co={class:"cycle__chain"};function uo(n,t,i,e,s,l){return _(),y("div",eo,[$(e.UiSegmented,{modelValue:e.mode,"onUpdate:modelValue":t[0]||(t[0]=o=>e.mode=o),label:"View",options:[{value:"graph",label:"Graph"},{value:"list",label:"List"}]},null,8,["modelValue"]),e.mode==="graph"?(_(),y("div",to,[$(e.CycleGraph,{cycles:e.cycles,selected:e.selected,onSelectCycle:t[1]||(t[1]=o=>e.selected=o),onOpenFile:t[2]||(t[2]=o=>e.emit("open-file",o))},null,8,["cycles","selected"]),h("aside",no,[h("h3",oo,w(e.cycles.length)+" cycle"+w(e.cycles.length===1?"":"s"),1),h("ul",io,[(_(!0),y(L,null,Q(e.cycles,o=>(_(),y("li",{key:o.id},[h("button",{class:Y(["cycle",{"cycle--on":e.selected===o.id}]),onClick:r=>e.pick(o.id)},[h("span",so,[h("strong",null,"Cycle "+w(o.id+1),1),h("span",lo,w(o.files.length)+" files",1),o.typeOnly?(_(),y("span",ao,"types only")):O("v-if",!0)]),h("span",co,w(e.chain(o)),1)],10,ro)]))),128))])])])):(_(),ne(e.FindingsList,{key:1,findings:i.findings,onOpen:t[3]||(t[3]=o=>e.emit("open",o))},null,8,["findings"]))])}const fo=se($n,[["render",uo],["__scopeId","data-v-dbccb5a2"],["__file","C:/work/NPM/devtoolz/ui/src/modules/checks/CyclesView.vue"]]),ge=400,He=1500,ho=re({__name:"UiCode",props:{text:{type:String,required:!0},lang:{type:String,required:!0},focusLine:{type:null,required:!1},focusColumn:{type:null,required:!1}},setup(n,{expose:t}){t();const i=n,e=P(Ue(i.text)),s=P(!1),l=P(),o=E(()=>e.value.length),r=E(()=>!s.value&&o.value>He),c=E(()=>{if(!r.value)return 0;const f=i.focusLine??1;return Math.max(0,Math.min(f-1-ge/2,o.value-ge))}),a=E(()=>r.value?Math.min(o.value,c.value+ge):o.value),p=E(()=>e.value.slice(c.value,a.value)),m=E(()=>String(o.value).length);async function g(){e.value=Ue(i.text),e.value=await ut(i.text,i.lang),await we(),v()}function v(){const f=l.value?.querySelector('[data-focus="true"]');if(f instanceof HTMLElement&&l.value){const u=l.value;u.scrollTop=f.offsetTop-u.clientHeight/2+f.clientHeight/2}}be(()=>[i.text,i.lang],g),be(()=>[i.focusLine,i.focusColumn],async()=>{await we(),v()}),Ne(g);const C={props:i,WINDOW:ge,FULL_LIMIT:He,lines:e,full:s,scroller:l,total:o,windowed:r,start:c,end:a,visible:p,gutter:m,render:g,reveal:v,nextTick:we};return Object.defineProperty(C,"__isScriptSetup",{enumerable:!1,value:!0}),C}}),vo={ref:"scroller",class:"code",tabindex:"0",role:"region","aria-label":"Source code"},_o={key:0,class:"code__note"},go=["data-focus"],yo={class:"line__text"},mo={key:0};function po(n,t,i,e,s,l){return _(),y("div",vo,[e.windowed?(_(),y("p",_o,[R(" Showing lines "+w(e.start+1)+"–"+w(e.end)+" of "+w(e.total)+". ",1),h("button",{class:"code__link",onClick:t[0]||(t[0]=o=>(e.full=!0,e.nextTick().then(e.reveal)))}," Show the whole file ")])):O("v-if",!0),(_(!0),y(L,null,Q(e.visible,(o,r)=>(_(),y("div",{key:e.start+r,class:Y(["line",{"line--focus":e.start+r+1===i.focusLine}]),"data-focus":e.start+r+1===i.focusLine},[h("span",{class:"line__no",style:pe({width:`${e.gutter+1}ch`})},w(e.start+r+1),5),h("span",yo,[(_(!0),y(L,null,Q(o,(c,a)=>(_(),y("span",{key:a,class:Y(["tok",{"tok--bold":c.bold,"tok--italic":c.italic}]),style:pe({"--light":c.light||"var(--text)","--dark":c.dark||"var(--text)"})},w(c.text),7))),128)),!o.length||o.length===1&&o[0]?.text===""?(_(),y("span",mo," ")):O("v-if",!0)]),e.start+r+1===i.focusLine&&i.focusColumn?(_(),y("span",{key:0,class:"line__marker",style:pe({left:`calc(${e.gutter+1}ch + ${Math.max(0,i.focusColumn-1)}ch + 12px)`})},null,4)):O("v-if",!0)],10,go))),128))],512)}const wo=se(ho,[["render",po],["__scopeId","data-v-e79e57a2"],["__file","C:/work/NPM/devtoolz/ui/src/ui-components/UiCode.vue"]]),xo=re({__name:"SourceModal",props:{project:{type:String,required:!0},findings:{type:Array,required:!0},index:{type:Number,required:!0}},emits:["close","update:index"],setup(n,{expose:t,emit:i}){t();const e=n,s=i,{copied:l,copy:o}=ct(),r=P(),c=P(""),a=P(!1),p=new Map,m=E(()=>e.findings[e.index]),g=E(()=>e.index>0),v=E(()=>e.index<e.findings.length-1),C=E(()=>{if(!r.value)return"";const M=[r.value.abs.replace(/\\/g,"/")];return m.value.line&&M.push(String(m.value.line)),m.value.line&&m.value.column&&M.push(String(m.value.column)),`vscode://file/${M.join(":")}`});async function f(){const M=m.value.file;if(c.value="",!M){r.value=void 0;return}const k=p.get(M);if(k){r.value=k;return}a.value=!0;try{const I=await xe.get(`/api/source?project=${encodeURIComponent(e.project)}&path=${encodeURIComponent(M)}`);p.set(M,I),r.value=I}catch(I){r.value=void 0,c.value=I instanceof Error?I.message:String(I)}finally{a.value=!1}}function u(M){const k=e.index+M;k>=0&&k<e.findings.length&&s("update:index",k)}function d(M){M.target instanceof HTMLInputElement||(M.key==="ArrowLeft"&&u(-1),M.key==="ArrowRight"&&u(1))}be(()=>e.index,f,{immediate:!0}),Ne(()=>window.addEventListener("keydown",d)),We(()=>window.removeEventListener("keydown",d));const x={props:e,emit:s,copied:l,copy:o,source:r,failure:c,loading:a,cache:p,finding:m,hasPrev:g,hasNext:v,editorLink:C,load:f,go:u,onKey:d,Icon:Ae,UiCode:wo,UiModal:st};return Object.defineProperty(x,"__isScriptSetup",{enumerable:!1,value:!0}),x}}),ko={class:"muted counter"},bo=["disabled"],Co=["disabled"],Mo={class:"body"},No={class:"finding"},So={key:0,class:"muted"},Oo={key:0,class:"notice notice--error"},jo={key:1,class:"muted"},Io={key:2,class:"muted"},zo={class:"bar"},Po={class:"path"},Ao=["href"];function Fo(n,t,i,e,s,l){return _(),ne(e.UiModal,{title:e.finding.file??"Project",width:"1100px",onClose:t[3]||(t[3]=o=>e.emit("close"))},{actions:Te(()=>[h("span",ko,w(i.index+1)+" / "+w(i.findings.length),1),h("button",{class:"btn btn--small",disabled:!e.hasPrev,"aria-label":"Previous finding",onClick:t[0]||(t[0]=o=>e.go(-1))},[$(e.Icon,{name:"left",size:15})],8,bo),h("button",{class:"btn btn--small",disabled:!e.hasNext,"aria-label":"Next finding",onClick:t[1]||(t[1]=o=>e.go(1))},[$(e.Icon,{name:"right",size:15})],8,Co)]),default:Te(()=>[h("div",Mo,[h("div",No,[h("span",{class:Y(["badge",`badge--${e.finding.severity}`])},w(e.finding.code),3),h("strong",null,w(e.finding.message),1),e.finding.hint?(_(),y("p",So,w(e.finding.hint),1)):O("v-if",!0)]),e.failure?(_(),y("p",Oo,w(e.failure),1)):e.loading?(_(),y("p",jo,"Loading…")):e.finding.file?e.source?(_(),y(L,{key:3},[h("div",zo,[h("code",Po,[R(w(e.source.path),1),e.finding.line?(_(),y(L,{key:0},[R(":"+w(e.finding.line),1)],64)):O("v-if",!0)]),h("button",{class:"btn btn--small",onClick:t[2]||(t[2]=o=>e.copy("path",e.source.abs))},[$(e.Icon,{name:e.copied==="path"?"check":"copy",size:14},null,8,["name"]),R(" "+w(e.copied==="path"?"Copied":"Copy path"),1)]),h("a",{class:"btn btn--small",href:e.editorLink},[$(e.Icon,{name:"external",size:14}),t[4]||(t[4]=R(" Open in VS Code ",-1))],8,Ao)]),$(e.UiCode,{class:"viewer",text:e.source.text,lang:e.source.lang,"focus-line":e.finding.line,"focus-column":e.finding.column},null,8,["text","lang","focus-line","focus-column"])],64)):O("v-if",!0):(_(),y("p",Io,"This finding is not tied to a source file."))])]),_:1},8,["title"])}const Eo=se(xo,[["render",Fo],["__scopeId","data-v-88d2cb60"],["__file","C:/work/NPM/devtoolz/ui/src/modules/checks/SourceModal.vue"]]);function ye(n){return Object.fromEntries(n.options.map(t=>[t.key,t.default]))}const je="devtoolz-ui.checks-project",Ie="devtoolz-ui.checks-selected",me="overview",Lo=re({__name:"ChecksPage",props:{module:{type:Object,required:!0},status:{type:null,required:!0}},setup(n,{expose:t}){t();const i=n,e=P([]),s=P(""),l=P(""),o=P({}),r=P({}),c=P(""),a=P(""),p=P(!1),m=P(""),g=P(""),v=P(null),C=P(null),f=P(!1),u=P(!1),d=P({done:0,total:0,current:""}),x=P();let M;const k=E(()=>s.value===me),I=E(()=>e.value.find(N=>N.id===s.value)),V=E(()=>r.value[s.value]),q=E(()=>{const N=V.value?.findings??[],j=m.value.trim().toLowerCase();return N.filter(F=>(g.value===""||F.code===g.value)&&(j===""||`${F.file??""} ${F.message} ${F.code}`.toLowerCase().includes(j)))}),T=E(()=>{const N=new Map;for(const j of V.value?.findings??[]){const F=N.get(j.code);F?F.count+=1:N.set(j.code,{count:1,severity:j.severity})}return[...N.entries()].map(([j,F])=>({code:j,...F}))}),b=E(()=>[{id:"code",title:"Code",items:e.value.filter(N=>N.group==="code")},{id:"dependencies",title:"Dependencies",items:e.value.filter(N=>N.group==="dependencies")},{id:"docs",title:"Documentation",items:e.value.filter(N=>N.group==="docs")}]);function S(N,j){try{localStorage.setItem(N,j)}catch{return}}function z(N){try{return localStorage.getItem(N)??""}catch{return""}}function D(N){s.value=N,m.value="",g.value="",v.value=null,S(Ie,N)}function U(N){p.value=!1;const j=N[0];!j||j===l.value||(l.value=j,r.value={},x.value=void 0,S(je,j))}function J(N){return r.value[N]?.findings.length}async function A(N){if(!(u.value||c.value)){M?.(),u.value=!0,a.value="",d.value={done:0,total:0,current:""};try{const{jobId:j}=await xe.post("/api/checks/all/run",{project:l.value,includeSlow:N});M=De(j,{onProgress:F=>{d.value=F},onDone:F=>{r.value={...r.value,...F.outcomes},x.value=F.tookMs,u.value=!1},onFailed:F=>{a.value=F,u.value=!1}})}catch(j){a.value=j instanceof Error?j.message:String(j),u.value=!1}}}async function B(){const N=I.value;if(!(!N||c.value)){M?.(),c.value=N.id,a.value="";try{const{jobId:j}=await xe.post(`/api/checks/${N.id}/run`,{project:l.value,options:o.value[N.id]??ye(N)});M=De(j,{onDone:F=>{r.value={...r.value,[N.id]:F},c.value="",m.value="",g.value=""},onFailed:F=>{a.value=F,c.value=""}})}catch(j){a.value=j instanceof Error?j.message:String(j),c.value=""}}}function K(N,j){const F=I.value;F&&(o.value={...o.value,[F.id]:{...o.value[F.id]??ye(F),[N]:j}})}function Z(N,j){const F=I.value;F&&(o.value={...o.value,[F.id]:{...o.value[F.id]??ye(F),[N]:j}})}function ee(N){const j=I.value;return j?(o.value[j.id]??ye(j))[N]??"":""}function G(N){C.value=[{file:N,severity:"info",code:"file",message:N}]}function te(N){N.file&&G(N.file)}function Oe(N){const j=q.value.indexOf(N);v.value=j>=0?j:0}Ne(async()=>{l.value=z(je)||i.status?.cwd||"";try{e.value=await xe.get("/api/checks");const N=z(Ie);s.value=N===me||e.value.some(j=>j.id===N)?N:me}catch(N){a.value=N instanceof Error?N.message:String(N)}}),We(()=>M?.());const he={props:i,PROJECT_KEY:je,CHECK_KEY:Ie,OVERVIEW:me,checks:e,selectedId:s,project:l,options:o,outcomes:r,running:c,failure:a,browsing:p,query:m,codeFilter:g,viewing:v,peek:C,optionsOpen:f,runningAll:u,allProgress:d,overviewMs:x,get stop(){return M},set stop(N){M=N},isOverview:k,selected:I,outcome:V,filtered:q,codes:T,groups:b,remember:S,recall:z,select:D,setProject:U,countOf:J,runAll:A,run:B,setFlag:K,setText:Z,valueOf:ee,openFile:G,openCycle:te,open:Oe,FolderBrowser:lt,Icon:Ae,ChecksOverview:Rt,CyclesView:fo,FindingsList:tt,SourceModal:Eo};return Object.defineProperty(he,"__isScriptSetup",{enumerable:!1,value:!0}),he}}),To={class:"page"},Do={class:"page__head"},Uo={class:"muted"},Ro={class:"project"},Vo=["title"],Bo={key:0,class:"notice notice--error"},qo={key:1,class:"layout"},Go={class:"menu","aria-label":"Checks"},Yo=["aria-current"],Ho={key:0,class:"menu__title"},Xo=["aria-current","onClick"],Wo={class:"menu__name"},Ko={class:"main"},Qo={key:0,class:"notice notice--error"},Jo={class:"card block"},Zo={class:"head"},$o={class:"muted"},ei=["disabled"],ti={key:0,class:"options"},ni={key:0,class:"check"},oi=["checked","onChange"],ii={class:"muted"},ri={key:1,class:"field"},si={class:"muted"},li=["value","onInput"],ai={key:0,class:"notice notice--error"},ci={key:1,class:"card block",role:"status"},ui={key:2,class:"card block"},di={class:"head"},fi={class:"muted small"},hi={key:0,class:"notice notice--error"},vi={key:1,class:"clean"},_i={class:"filters"},gi={class:"chips"},yi=["onClick"],mi={key:0,class:"muted"},pi={key:3,class:"card block empty"};function wi(n,t,i,e,s,l){return _(),y("div",To,[h("header",Do,[h("h1",null,w(i.module.title),1),h("p",Uo,w(i.module.description),1),h("p",Ro,[$(e.Icon,{name:"folder",size:15}),t[9]||(t[9]=h("span",{class:"muted"},"Project",-1)),h("code",{title:e.project},w(e.project),9,Vo),h("button",{class:"btn btn--small",onClick:t[0]||(t[0]=o=>e.browsing=!0)},"Change…")])]),e.failure&&!e.selected?(_(),y("p",Bo,w(e.failure),1)):O("v-if",!0),e.checks.length?(_(),y("div",qo,[h("nav",Go,[h("button",{class:Y(["menu__item",{"menu__item--on":e.isOverview}]),"aria-current":e.isOverview?"page":void 0,onClick:t[1]||(t[1]=o=>e.select(e.OVERVIEW))},[...t[10]||(t[10]=[h("span",{class:"menu__name"},"Overview",-1)])],10,Yo),(_(!0),y(L,null,Q(e.groups,o=>(_(),y(L,{key:o.id},[o.items.length?(_(),y("h3",Ho,w(o.title),1)):O("v-if",!0),(_(!0),y(L,null,Q(o.items,r=>(_(),y("button",{key:r.id,class:Y(["menu__item",{"menu__item--on":r.id===e.selectedId}]),"aria-current":r.id===e.selectedId?"page":void 0,onClick:c=>e.select(r.id)},[h("span",Wo,w(r.title),1),e.countOf(r.id)!==void 0?(_(),y("span",{key:0,class:Y(["menu__count",{"menu__count--clean":e.countOf(r.id)===0}])},w(e.countOf(r.id)===0?"✓":e.countOf(r.id)),3)):O("v-if",!0)],10,Xo))),128))],64))),128))]),h("main",Ko,[e.failure&&e.isOverview?(_(),y("p",Qo,w(e.failure),1)):O("v-if",!0),e.isOverview?(_(),ne(e.ChecksOverview,{key:1,checks:e.checks,outcomes:e.outcomes,running:e.runningAll,progress:e.allProgress,"took-ms":e.overviewMs,onRunAll:e.runAll,onOpen:e.select},null,8,["checks","outcomes","running","progress","took-ms"])):e.selected?(_(),y(L,{key:2},[h("section",Jo,[h("div",Zo,[h("div",null,[h("h2",null,w(e.selected.title),1),h("p",$o,w(e.selected.description),1)]),h("button",{class:"btn btn--primary",disabled:e.running!==""||e.project==="",onClick:e.run},[$(e.Icon,{name:"play",size:15}),R(" "+w(e.running===e.selected.id?"Checking…":e.outcome?"Run again":"Run check"),1)],8,ei)]),h("button",{class:"link",onClick:t[2]||(t[2]=o=>e.optionsOpen=!e.optionsOpen)},w(e.optionsOpen?"Hide":"Show")+" options ",1),e.optionsOpen?(_(),y("div",ti,[(_(!0),y(L,null,Q(e.selected.options,o=>(_(),y(L,{key:o.key},[o.type==="boolean"?(_(),y("label",ni,[h("input",{type:"checkbox",checked:e.valueOf(o.key)===!0,onChange:r=>e.setFlag(o.key,r.target.checked)},null,40,oi),h("span",null,[R(w(o.label)+" ",1),h("small",ii," — "+w(o.help),1)])])):(_(),y("label",ri,[h("span",null,[R(w(o.label)+" ",1),h("small",si,"— "+w(o.help),1)]),h("textarea",{class:"textarea",rows:"3",spellcheck:"false",value:String(e.valueOf(o.key)),onInput:r=>e.setText(o.key,r.target.value)},null,40,li)]))],64))),128))])):O("v-if",!0)]),e.failure?(_(),y("p",ai,w(e.failure),1)):O("v-if",!0),e.running===e.selected.id?(_(),y("section",ci,[...t[11]||(t[11]=[h("p",{class:"muted"},"Scanning the project…",-1)])])):e.outcome?(_(),y("section",ui,[h("div",di,[h("div",null,[h("h2",null,w(e.outcome.summary),1),h("p",fi,[R(w((e.outcome.tookMs/1e3).toFixed(1))+" s ",1),e.outcome.filesScanned!==void 0?(_(),y(L,{key:0},[R(" · "+w(e.outcome.filesScanned)+" files scanned",1)],64)):O("v-if",!0)])])]),(_(!0),y(L,null,Q(e.outcome.notes??[],o=>(_(),y("p",{key:o,class:"notice notice--warn"},w(o),1))),128)),e.outcome.error?(_(),y("p",hi,w(e.outcome.error),1)):O("v-if",!0),e.outcome.findings.length===0&&!e.outcome.error?(_(),y("p",vi,[$(e.Icon,{name:"check",size:18}),t[12]||(t[12]=R(" Nothing to report. This check is clean. ",-1))])):O("v-if",!0),e.selected.id==="circular-imports"&&e.outcome.findings.length?(_(),ne(e.CyclesView,{key:2,findings:e.outcome.findings,onOpenFile:e.openFile,onOpen:e.openCycle},null,8,["findings"])):e.outcome.findings.length?(_(),y(L,{key:3},[h("div",_i,[Xe(h("input",{"onUpdate:modelValue":t[3]||(t[3]=o=>e.query=o),class:"input search",placeholder:"Filter by file or text","aria-label":"Filter findings"},null,512),[[rt,e.query]]),h("div",gi,[h("button",{class:Y(["chip",{"chip--on":e.codeFilter===""}]),onClick:t[4]||(t[4]=o=>e.codeFilter="")}," all "+w(e.outcome.findings.length),3),(_(!0),y(L,null,Q(e.codes,o=>(_(),y("button",{key:o.code,class:Y(["chip",[`chip--${o.severity}`,{"chip--on":e.codeFilter===o.code}]]),onClick:r=>e.codeFilter=e.codeFilter===o.code?"":o.code},w(o.code)+" "+w(o.count),11,yi))),128))])]),e.filtered.length===0?(_(),y("p",mi,"No findings match the filter.")):(_(),ne(e.FindingsList,{key:1,findings:e.filtered,onOpen:e.open},null,8,["findings"]))],64)):O("v-if",!0)])):e.running?O("v-if",!0):(_(),y("section",pi,[...t[13]||(t[13]=[h("p",{class:"muted"},"Press “Run check” to scan the project.",-1)])]))],64)):O("v-if",!0)])])):O("v-if",!0),e.peek?(_(),ne(e.SourceModal,{key:2,index:0,project:e.project,findings:e.peek,onClose:t[5]||(t[5]=o=>e.peek=null)},null,8,["project","findings"])):O("v-if",!0),e.viewing!==null&&e.filtered.length?(_(),ne(e.SourceModal,{key:3,index:e.viewing,"onUpdate:index":t[6]||(t[6]=o=>e.viewing=o),project:e.project,findings:e.filtered,onClose:t[7]||(t[7]=o=>e.viewing=null)},null,8,["index","project","findings"])):O("v-if",!0),e.browsing?(_(),ne(e.FolderBrowser,{key:4,start:e.project||i.status?.cwd||"",mode:"folder",title:"Choose the project folder",onClose:t[8]||(t[8]=o=>e.browsing=!1),onConfirm:e.setProject},null,8,["start"])):O("v-if",!0)])}const Ni=se(Lo,[["render",wi],["__scopeId","data-v-2621f21d"],["__file","C:/work/NPM/devtoolz/ui/src/modules/checks/ChecksPage.vue"]]);export{Ni as default};