@vitejs/devtools-vite 0.0.0-alpha.1 → 0.0.0-alpha.11
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.
- package/dist/{dirs-Z7VQHyIZ.js → dirs-K_XnRVOr.js} +1 -1
- package/dist/dirs.js +1 -1
- package/dist/index.d.ts +67 -28
- package/dist/index.js +137 -81
- package/dist/nitro.json +2 -2
- package/dist/public/200.html +1 -1
- package/dist/public/404.html +1 -1
- package/dist/public/_nuxt/17ealR8P.js +1 -0
- package/dist/public/_nuxt/2OALqkc2.js +1 -0
- package/dist/public/_nuxt/AuXMpmu_.js +1 -0
- package/dist/public/_nuxt/B-LCQpq9.js +2 -0
- package/dist/public/_nuxt/B-MkobAt.js +1 -0
- package/dist/public/_nuxt/BEtueeHN.js +1 -0
- package/dist/public/_nuxt/BFwdTbGt.js +1 -0
- package/dist/public/_nuxt/BQPGP7j8.js +1 -0
- package/dist/public/_nuxt/B_mZ82Ef.js +1 -0
- package/dist/public/_nuxt/Bs1eUuZt.js +1 -0
- package/dist/public/_nuxt/C2Zn9dj_.js +1 -0
- package/dist/public/_nuxt/CBa98m2O.js +33 -0
- package/dist/public/_nuxt/CIZ7KSXz.js +1 -0
- package/dist/public/_nuxt/CRsFizRX.js +1 -0
- package/dist/public/_nuxt/CbzAqNxs.js +1 -0
- package/dist/public/_nuxt/ChaI2u-J.js +1 -0
- package/dist/public/_nuxt/CmZYssbg.js +1 -0
- package/dist/public/_nuxt/Cnct9GAr.js +1 -0
- package/dist/public/_nuxt/Cq2KqeQT.js +1 -0
- package/dist/public/_nuxt/Cql2HFZJ.js +1 -0
- package/dist/public/_nuxt/D-ZnEyqr.js +1 -0
- package/dist/public/_nuxt/D2Zr4_9a.js +1 -0
- package/dist/public/_nuxt/{BQ-NBLhA.js → DL1ysgP5.js} +1 -1
- package/dist/public/_nuxt/DQtLZa7C.js +1 -0
- package/dist/public/_nuxt/DcamI1aQ.js +1 -0
- package/dist/public/_nuxt/DqBpHZ7Y.js +11 -0
- package/dist/public/_nuxt/HzvsUJ0F.js +1 -0
- package/dist/public/_nuxt/Jdu9jmuG.js +1 -0
- package/dist/public/_nuxt/{IrMnfQaU.js → LMGHh3hZ.js} +1 -1
- package/dist/public/_nuxt/{BdGMcGSQ.js → SO3ppn9m.js} +1 -1
- package/dist/public/_nuxt/X7aOo9pb.js +1 -0
- package/dist/public/_nuxt/_hSlj5r4.js +1 -0
- package/dist/public/_nuxt/builds/latest.json +1 -1
- package/dist/public/_nuxt/builds/meta/1a94e2d7-5f0c-42d1-b6c2-f70865b42be5.json +1 -0
- package/dist/public/_nuxt/diff.worker-DCsgdfuV.js +10 -0
- package/dist/public/_nuxt/entry.BkLl46Cr.css +1 -0
- package/dist/public/_nuxt/error-404.CCdr3eE4.css +1 -0
- package/dist/public/_nuxt/error-500.D-vBsHK_.css +1 -0
- package/dist/public/_nuxt/lxg2Cb0s.js +1 -0
- package/dist/public/_nuxt/mIZU4Om9.js +1 -0
- package/dist/public/_nuxt/qkzn-X0p.js +1 -0
- package/dist/public/_nuxt/vzoJapJG.js +1 -0
- package/dist/public/index.html +1 -1
- package/package.json +16 -16
- package/dist/public/_nuxt/B1Vd6rqS.js +0 -1
- package/dist/public/_nuxt/B2YLpys2.js +0 -1
- package/dist/public/_nuxt/B2fBtupD.js +0 -1
- package/dist/public/_nuxt/BBRXmiYk.js +0 -1
- package/dist/public/_nuxt/BL9XEsp7.js +0 -1
- package/dist/public/_nuxt/BO9hKuA-.js +0 -1
- package/dist/public/_nuxt/BcAccMwu.js +0 -1
- package/dist/public/_nuxt/BdSZoQls.js +0 -1
- package/dist/public/_nuxt/BjbaCuBE.js +0 -1
- package/dist/public/_nuxt/Bjr51Ks8.js +0 -1
- package/dist/public/_nuxt/BvuqupwD.js +0 -1
- package/dist/public/_nuxt/C2X_oPur.js +0 -1
- package/dist/public/_nuxt/C5J04JCq.js +0 -1
- package/dist/public/_nuxt/CQNn9qP2.js +0 -1
- package/dist/public/_nuxt/CS0-317H.js +0 -1
- package/dist/public/_nuxt/CciM0jEL.js +0 -1
- package/dist/public/_nuxt/CcwEApAr.js +0 -1
- package/dist/public/_nuxt/Ci9NHG69.js +0 -1
- package/dist/public/_nuxt/D1yk44lc.js +0 -1
- package/dist/public/_nuxt/DKn-LAPX.js +0 -11
- package/dist/public/_nuxt/DS2MKblJ.js +0 -1
- package/dist/public/_nuxt/DSjlpmm-.js +0 -1
- package/dist/public/_nuxt/DZeYNBxL.js +0 -1
- package/dist/public/_nuxt/D_Sk_I-u.js +0 -1
- package/dist/public/_nuxt/Dl8iHwQo.js +0 -2
- package/dist/public/_nuxt/Z5tyTJaP.js +0 -1
- package/dist/public/_nuxt/builds/meta/6f75d3aa-4cfc-4ed3-af3a-9078b8defb8f.json +0 -1
- package/dist/public/_nuxt/cRQbgMUp.js +0 -1
- package/dist/public/_nuxt/diff.worker-BXxwMoGc.js +0 -10
- package/dist/public/_nuxt/entry.Dufqy7qJ.css +0 -1
- package/dist/public/_nuxt/error-404.yUUAZDjV.css +0 -1
- package/dist/public/_nuxt/error-500.BHZzZRS-.css +0 -1
- package/dist/public/_nuxt/pXptjyzi.js +0 -1
- package/dist/public/_nuxt/rwBDQBzn.js +0 -1
- package/dist/public/_nuxt/tS5wJZMm.js +0 -1
- package/dist/public/_nuxt/yfNgynAH.js +0 -33
- package/dist/public/_nuxt/z9pSC1xM.js +0 -1
- /package/dist/public/_nuxt/{l47FwQA-.js → D03ETnho.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e){return Array.isArray?Array.isArray(e):d(e)===`[object Array]`}var t=1/0;function n(e){if(typeof e==`string`)return e;let n=e+``;return n==`0`&&1/e==-t?`-0`:n}function r(e){return e==null?``:n(e)}function i(e){return typeof e==`string`}function a(e){return typeof e==`number`}function o(e){return e===!0||e===!1||c(e)&&d(e)==`[object Boolean]`}function s(e){return typeof e==`object`}function c(e){return s(e)&&e!==null}function l(e){return e!=null}function u(e){return!e.trim().length}function d(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var f=`Incorrect 'index' type`,p=e=>`Invalid value for key ${e}`,m=e=>`Pattern length exceeds max of ${e}.`,h=e=>`Missing ${e} property in key`,g=e=>`Property 'weight' in key '${e}' must be a positive integer`,_=Object.prototype.hasOwnProperty,v=class{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(e=>{let n=y(e);this._keys.push(n),this._keyMap[n.id]=n,t+=n.weight}),this._keys.forEach(e=>{e.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}};function y(t){let n=null,r=null,a=null,o=1,s=null;if(i(t)||e(t))a=t,n=b(t),r=x(t);else{if(!_.call(t,`name`))throw Error(h(`name`));let e=t.name;if(a=e,_.call(t,`weight`)&&(o=t.weight,o<=0))throw Error(g(e));n=b(e),r=x(e),s=t.getFn}return{path:n,id:r,weight:o,src:a,getFn:s}}function b(t){return e(t)?t:t.split(`.`)}function x(t){return e(t)?t.join(`.`):t}function S(t,n){let s=[],c=!1,u=(t,n,d)=>{if(l(t))if(!n[d])s.push(t);else{let f=t[n[d]];if(!l(f))return;if(d===n.length-1&&(i(f)||a(f)||o(f)))s.push(r(f));else if(e(f)){c=!0;for(let e=0,t=f.length;e<t;e+=1)u(f[e],n,d+1)}else n.length&&u(f,n,d+1)}};return u(t,i(n)?n.split(`.`):n,0),c?s:s[0]}var C={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},w={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1},ee={location:0,threshold:.6,distance:100},te={useExtendedSearch:!1,getFn:S,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},T={...w,...C,...ee,...te},E=/[^ ]+/g;function ne(e=1,t=3){let n=new Map,r=10**t;return{get(t){let i=t.match(E).length;if(n.has(i))return n.get(i);let a=1/i**(.5*e),o=parseFloat(Math.round(a*r)/r);return n.set(i,o),o},clear(){n.clear()}}}var D=class{constructor({getFn:e=T.getFn,fieldNormWeight:t=T.fieldNormWeight}={}){this.norm=ne(t,3),this.getFn=e,this.isCreated=!1,this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((e,t)=>{this._keysMap[e.id]=t})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,i(this.docs[0])?this.docs.forEach((e,t)=>{this._addString(e,t)}):this.docs.forEach((e,t)=>{this._addObject(e,t)}),this.norm.clear())}add(e){let t=this.size();i(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,n=this.size();t<n;t+=1)--this.records[t].i}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_addString(e,t){if(!l(e)||u(e))return;let n={v:e,i:t,n:this.norm.get(e)};this.records.push(n)}_addObject(t,n){let r={i:n,$:{}};this.keys.forEach((n,a)=>{let o=n.getFn?n.getFn(t):this.getFn(t,n.path);if(l(o)){if(e(o)){let t=[],n=[{nestedArrIndex:-1,value:o}];for(;n.length;){let{nestedArrIndex:r,value:a}=n.pop();if(l(a))if(i(a)&&!u(a)){let e={v:a,i:r,n:this.norm.get(a)};t.push(e)}else e(a)&&a.forEach((e,t)=>{n.push({nestedArrIndex:t,value:e})})}r.$[a]=t}else if(i(o)&&!u(o)){let e={v:o,n:this.norm.get(o)};r.$[a]=e}}}),this.records.push(r)}toJSON(){return{keys:this.keys,records:this.records}}};function O(e,t,{getFn:n=T.getFn,fieldNormWeight:r=T.fieldNormWeight}={}){let i=new D({getFn:n,fieldNormWeight:r});return i.setKeys(e.map(y)),i.setSources(t),i.create(),i}function re(e,{getFn:t=T.getFn,fieldNormWeight:n=T.fieldNormWeight}={}){let{keys:r,records:i}=e,a=new D({getFn:t,fieldNormWeight:n});return a.setKeys(r),a.setIndexRecords(i),a}function k(e,{errors:t=0,currentLocation:n=0,expectedLocation:r=0,distance:i=T.distance,ignoreLocation:a=T.ignoreLocation}={}){let o=t/e.length;if(a)return o;let s=Math.abs(r-n);return i?o+s/i:s?1:o}function A(e=[],t=T.minMatchCharLength){let n=[],r=-1,i=-1,a=0;for(let o=e.length;a<o;a+=1){let o=e[a];o&&r===-1?r=a:!o&&r!==-1&&(i=a-1,i-r+1>=t&&n.push([r,i]),r=-1)}return e[a-1]&&a-r>=t&&n.push([r,a-1]),n}var j=32;function M(e,t,n,{location:r=T.location,distance:i=T.distance,threshold:a=T.threshold,findAllMatches:o=T.findAllMatches,minMatchCharLength:s=T.minMatchCharLength,includeMatches:c=T.includeMatches,ignoreLocation:l=T.ignoreLocation}={}){if(t.length>j)throw Error(m(j));let u=t.length,d=e.length,f=Math.max(0,Math.min(r,d)),p=a,h=f,g=s>1||c,_=g?Array(d):[],v;for(;(v=e.indexOf(t,h))>-1;){let e=k(t,{currentLocation:v,expectedLocation:f,distance:i,ignoreLocation:l});if(p=Math.min(e,p),h=v+u,g){let e=0;for(;e<u;)_[v+e]=1,e+=1}}h=-1;let y=[],b=1,x=u+d,S=1<<u-1;for(let r=0;r<u;r+=1){let a=0,s=x;for(;a<s;)k(t,{errors:r,currentLocation:f+s,expectedLocation:f,distance:i,ignoreLocation:l})<=p?a=s:x=s,s=Math.floor((x-a)/2+a);x=s;let c=Math.max(1,f-s+1),m=o?d:Math.min(f+s,d)+u,v=Array(m+2);v[m+1]=(1<<r)-1;for(let a=m;a>=c;--a){let o=a-1,s=n[e.charAt(o)];if(g&&(_[o]=+!!s),v[a]=(v[a+1]<<1|1)&s,r&&(v[a]|=(y[a+1]|y[a])<<1|1|y[a+1]),v[a]&S&&(b=k(t,{errors:r,currentLocation:o,expectedLocation:f,distance:i,ignoreLocation:l}),b<=p)){if(p=b,h=o,h<=f)break;c=Math.max(1,2*f-h)}}if(k(t,{errors:r+1,currentLocation:f,expectedLocation:f,distance:i,ignoreLocation:l})>p)break;y=v}let C={isMatch:h>=0,score:Math.max(.001,b)};if(g){let e=A(_,s);e.length?c&&(C.indices=e):C.isMatch=!1}return C}function ie(e){let t={};for(let n=0,r=e.length;n<r;n+=1){let i=e.charAt(n);t[i]=(t[i]||0)|1<<r-n-1}return t}var N=String.prototype.normalize?(e=>e.normalize(`NFD`).replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,``)):(e=>e),P=class{constructor(e,{location:t=T.location,threshold:n=T.threshold,distance:r=T.distance,includeMatches:i=T.includeMatches,findAllMatches:a=T.findAllMatches,minMatchCharLength:o=T.minMatchCharLength,isCaseSensitive:s=T.isCaseSensitive,ignoreDiacritics:c=T.ignoreDiacritics,ignoreLocation:l=T.ignoreLocation}={}){if(this.options={location:t,threshold:n,distance:r,includeMatches:i,findAllMatches:a,minMatchCharLength:o,isCaseSensitive:s,ignoreDiacritics:c,ignoreLocation:l},e=s?e:e.toLowerCase(),e=c?N(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;let u=(e,t)=>{this.chunks.push({pattern:e,alphabet:ie(e),startIndex:t})},d=this.pattern.length;if(d>j){let e=0,t=d%j,n=d-t;for(;e<n;)u(this.pattern.substr(e,j),e),e+=j;if(t){let e=d-j;u(this.pattern.substr(e),e)}}else u(this.pattern,0)}searchIn(e){let{isCaseSensitive:t,ignoreDiacritics:n,includeMatches:r}=this.options;if(e=t?e:e.toLowerCase(),e=n?N(e):e,this.pattern===e){let t={isMatch:!0,score:0};return r&&(t.indices=[[0,e.length-1]]),t}let{location:i,distance:a,threshold:o,findAllMatches:s,minMatchCharLength:c,ignoreLocation:l}=this.options,u=[],d=0,f=!1;this.chunks.forEach(({pattern:t,alphabet:n,startIndex:p})=>{let{isMatch:m,score:h,indices:g}=M(e,t,n,{location:i+p,distance:a,threshold:o,findAllMatches:s,minMatchCharLength:c,includeMatches:r,ignoreLocation:l});m&&(f=!0),d+=h,m&&g&&(u=[...u,...g])});let p={isMatch:f,score:f?d/this.chunks.length:1};return f&&r&&(p.indices=u),p}},F=class{constructor(e){this.pattern=e}static isMultiMatch(e){return I(e,this.multiRegex)}static isSingleMatch(e){return I(e,this.singleRegex)}search(){}};function I(e,t){let n=e.match(t);return n?n[1]:null}var ae=class extends F{constructor(e){super(e)}static get type(){return`exact`}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){let t=e===this.pattern;return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}},oe=class extends F{constructor(e){super(e)}static get type(){return`inverse-exact`}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){let t=e.indexOf(this.pattern)===-1;return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},se=class extends F{constructor(e){super(e)}static get type(){return`prefix-exact`}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){let t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}},ce=class extends F{constructor(e){super(e)}static get type(){return`inverse-prefix-exact`}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){let t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},L=class extends F{constructor(e){super(e)}static get type(){return`suffix-exact`}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){let t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}}},R=class extends F{constructor(e){super(e)}static get type(){return`inverse-suffix-exact`}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){let t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},z=class extends F{constructor(e,{location:t=T.location,threshold:n=T.threshold,distance:r=T.distance,includeMatches:i=T.includeMatches,findAllMatches:a=T.findAllMatches,minMatchCharLength:o=T.minMatchCharLength,isCaseSensitive:s=T.isCaseSensitive,ignoreDiacritics:c=T.ignoreDiacritics,ignoreLocation:l=T.ignoreLocation}={}){super(e),this._bitapSearch=new P(e,{location:t,threshold:n,distance:r,includeMatches:i,findAllMatches:a,minMatchCharLength:o,isCaseSensitive:s,ignoreDiacritics:c,ignoreLocation:l})}static get type(){return`fuzzy`}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}},B=class extends F{constructor(e){super(e)}static get type(){return`include`}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t=0,n,r=[],i=this.pattern.length;for(;(n=e.indexOf(this.pattern,t))>-1;)t=n+i,r.push([n,t-1]);let a=!!r.length;return{isMatch:a,score:a?0:1,indices:r}}},V=[ae,B,se,ce,R,L,oe,z],H=V.length,U=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,W=`|`;function le(e,t={}){return e.split(W).map(e=>{let n=e.trim().split(U).filter(e=>e&&!!e.trim()),r=[];for(let e=0,i=n.length;e<i;e+=1){let i=n[e],a=!1,o=-1;for(;!a&&++o<H;){let e=V[o],n=e.isMultiMatch(i);n&&(r.push(new e(n,t)),a=!0)}if(!a)for(o=-1;++o<H;){let e=V[o],n=e.isSingleMatch(i);if(n){r.push(new e(n,t));break}}}return r})}var ue=new Set([z.type,B.type]),de=class{constructor(e,{isCaseSensitive:t=T.isCaseSensitive,ignoreDiacritics:n=T.ignoreDiacritics,includeMatches:r=T.includeMatches,minMatchCharLength:i=T.minMatchCharLength,ignoreLocation:a=T.ignoreLocation,findAllMatches:o=T.findAllMatches,location:s=T.location,threshold:c=T.threshold,distance:l=T.distance}={}){this.query=null,this.options={isCaseSensitive:t,ignoreDiacritics:n,includeMatches:r,minMatchCharLength:i,findAllMatches:o,ignoreLocation:a,location:s,threshold:c,distance:l},e=t?e:e.toLowerCase(),e=n?N(e):e,this.pattern=e,this.query=le(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){let t=this.query;if(!t)return{isMatch:!1,score:1};let{includeMatches:n,isCaseSensitive:r,ignoreDiacritics:i}=this.options;e=r?e:e.toLowerCase(),e=i?N(e):e;let a=0,o=[],s=0;for(let r=0,i=t.length;r<i;r+=1){let i=t[r];o.length=0,a=0;for(let t=0,r=i.length;t<r;t+=1){let r=i[t],{isMatch:c,indices:l,score:u}=r.search(e);if(c){if(a+=1,s+=u,n){let e=r.constructor.type;ue.has(e)?o=[...o,...l]:o.push(l)}}else{s=0,a=0,o.length=0;break}}if(a){let e={isMatch:!0,score:s/a};return n&&(e.indices=o),e}}return{isMatch:!1,score:1}}},G=[];function fe(...e){G.push(...e)}function K(e,t){for(let n=0,r=G.length;n<r;n+=1){let r=G[n];if(r.condition(e,t))return new r(e,t)}return new P(e,t)}var q={AND:`$and`,OR:`$or`},J={PATH:`$path`,PATTERN:`$val`},Y=e=>!!(e[q.AND]||e[q.OR]),pe=e=>!!e[J.PATH],me=t=>!e(t)&&s(t)&&!Y(t),X=e=>({[q.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function Z(t,n,{auto:r=!0}={}){let a=t=>{let o=Object.keys(t),s=pe(t);if(!s&&o.length>1&&!Y(t))return a(X(t));if(me(t)){let e=s?t[J.PATH]:o[0],a=s?t[J.PATTERN]:t[e];if(!i(a))throw Error(p(e));let c={keyId:x(e),pattern:a};return r&&(c.searcher=K(a,n)),c}let c={children:[],operator:o[0]};return o.forEach(n=>{let r=t[n];e(r)&&r.forEach(e=>{c.children.push(a(e))})}),c};return Y(t)||(t=X(t)),a(t)}function Q(e,{ignoreFieldNorm:t=T.ignoreFieldNorm}){e.forEach(e=>{let n=1;e.matches.forEach(({key:e,norm:r,score:i})=>{let a=e?e.weight:null;n*=(i===0&&a?2**-52:i)**+((a||1)*(t?1:r))}),e.score=n})}function he(e,t){let n=e.matches;t.matches=[],l(n)&&n.forEach(e=>{if(!l(e.indices)||!e.indices.length)return;let{indices:n,value:r}=e,i={indices:n,value:r};e.key&&(i.key=e.key.src),e.idx>-1&&(i.refIndex=e.idx),t.matches.push(i)})}function ge(e,t){t.score=e.score}function _e(e,t,{includeMatches:n=T.includeMatches,includeScore:r=T.includeScore}={}){let i=[];return n&&i.push(he),r&&i.push(ge),e.map(e=>{let{idx:n}=e,r={item:t[n],refIndex:n};return i.length&&i.forEach(t=>{t(e,r)}),r})}var $=class{constructor(e,t={},n){this.options={...T,...t},this.options.useExtendedSearch,this._keyStore=new v(this.options.keys),this.setCollection(e,n)}setCollection(e,t){if(this._docs=e,t&&!(t instanceof D))throw Error(f);this._myIndex=t||O(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){l(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){let t=[];for(let n=0,r=this._docs.length;n<r;n+=1){let i=this._docs[n];e(i,n)&&(this.removeAt(n),--n,--r,t.push(i))}return t}removeAt(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}getIndex(){return this._myIndex}search(e,{limit:t=-1}={}){let{includeMatches:n,includeScore:r,shouldSort:o,sortFn:s,ignoreFieldNorm:c}=this.options,l=i(e)?i(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return Q(l,{ignoreFieldNorm:c}),o&&l.sort(s),a(t)&&t>-1&&(l=l.slice(0,t)),_e(l,this._docs,{includeMatches:n,includeScore:r})}_searchStringList(e){let t=K(e,this.options),{records:n}=this._myIndex,r=[];return n.forEach(({v:e,i:n,n:i})=>{if(!l(e))return;let{isMatch:a,score:o,indices:s}=t.searchIn(e);a&&r.push({item:e,idx:n,matches:[{score:o,value:e,norm:i,indices:s}]})}),r}_searchLogical(e){let t=Z(e,this.options),n=(e,t,r)=>{if(!e.children){let{keyId:n,searcher:i}=e,a=this._findMatches({key:this._keyStore.get(n),value:this._myIndex.getValueForItemAtKeyId(t,n),searcher:i});return a&&a.length?[{idx:r,item:t,matches:a}]:[]}let i=[];for(let a=0,o=e.children.length;a<o;a+=1){let o=e.children[a],s=n(o,t,r);if(s.length)i.push(...s);else if(e.operator===q.AND)return[]}return i},r=this._myIndex.records,i={},a=[];return r.forEach(({$:e,i:r})=>{if(l(e)){let o=n(t,e,r);o.length&&(i[r]||(i[r]={idx:r,item:e,matches:[]},a.push(i[r])),o.forEach(({matches:e})=>{i[r].matches.push(...e)}))}}),a}_searchObjectList(e){let t=K(e,this.options),{keys:n,records:r}=this._myIndex,i=[];return r.forEach(({$:e,i:r})=>{if(!l(e))return;let a=[];n.forEach((n,r)=>{a.push(...this._findMatches({key:n,value:e[r],searcher:t}))}),a.length&&i.push({idx:r,item:e,matches:a})}),i}_findMatches({key:t,value:n,searcher:r}){if(!l(n))return[];let i=[];if(e(n))n.forEach(({v:e,i:n,n:a})=>{if(!l(e))return;let{isMatch:o,score:s,indices:c}=r.searchIn(e);o&&i.push({score:s,key:t,value:e,idx:n,norm:a,indices:c})});else{let{v:e,n:a}=n,{isMatch:o,score:s,indices:c}=r.searchIn(e);o&&i.push({score:s,key:t,value:e,norm:a,indices:c})}return i}};$.version=`7.1.0`,$.createIndex=O,$.parseIndex=re,$.config=T,$.parseQuery=Z,fe(de);export{$ as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_t as e,mt as t}from"#entry";import{r as n}from"./B_mZ82Ef.js";import{n as r}from"./DnpfwSMy.js";var i=t({name:`HighlightedPackageName`,props:{name:{type:String,required:!0}},setup(t){return()=>{let i=t.name;if(!r(i))return e(`span`,{class:`text-gray-500`},i);let a=n(i);if(i.startsWith(`@`)){let[t,n]=i.split(`/`);return[e(`span`,{style:`color: ${a}`},t),e(`span`,{style:`color: ${a}`,class:`op50`},`/`),e(`span`,{style:`color: ${a}`},n)]}return e(`span`,{style:`color: ${a}`},i)}}});export{i as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{G as e,Jt as t,Tt as n,Vt as r,W as i,_ as a,en as o,g as s,in as c,mt as l,ot as u,pt as d,st as f,ut as p}from"#entry";import{t as m}from"./Jdu9jmuG.js";import{i as h,l as g,o as _}from"./B_mZ82Ef.js";import{t as v}from"./CIZ7KSXz.js";import{n as y,t as b}from"./B-LCQpq9.js";import{t as x}from"./lxg2Cb0s.js";import{n as S,t as C}from"./D03ETnho.js";var w={flex:`~ col gap-2`,p4:``},T={flex:``,pb2:``},E={"w-8":``,"text-right":``,"text-xs":``,op50:``},D={"overflow-hidden":``,"text-ellipsis":``,"break-all":``,"line-clamp-2":``},O=l({__name:`FlatList`,props:{plugins:{}},setup(e){let t=i();return(i,a)=>{let s=v,l=m,u=b;return n(),p(`div`,w,[d(u,{items:e.plugins,"key-prop":`plugin_id`},{default:r(({item:e})=>[f(`div`,T,[d(l,{to:{path:o(t).path,query:{plugin:e.plugin_id}},"font-mono":``,border:`~ rounded base`,"w-full":``,px2:``,py1:``,"text-sm":``,hover:`bg-active`,flex:`~ gap-4 items-center`},{default:r(()=>[f(`div`,E,` #`+c(e.plugin_id),1),f(`span`,D,[d(s,{name:e.name},null,8,[`name`])])]),_:2},1032,[`to`])])]),_:1},8,[`items`])])}}}),k=Object.assign(O,{__name:`PluginsFlatList`}),A={relative:``,"max-h-screen":``,"of-hidden":``},j={absolute:``,"left-4":``,"top-4":``,"z-panel-nav":``},M={"of-auto":``,"h-screen":``,flex:`~ col gap-2`,pt32:``},N={absolute:``,"bottom-4":``,"py-1":``,"px-2":``,"bg-glass":``,left:`1/2`,"translate-x":`-1/2`,border:`~ base rounded-full`,text:`center xs`},P={op50:``},F=l({__name:`plugins`,props:{session:{}},setup(r){let o=r,l=i(),m=e(),v=t({search:l.query.search||``,selected:l.query.plugin_types?S(l.query.plugin_types):null}),b=u(()=>[..._.filter(e=>o.session?.meta?.plugins?.some(t=>e.match.test(t.name))),h]),w=u(()=>{let e=o.session?.meta?.plugins;return v.value.selected&&(e=e.filter(e=>{let t=g(e.name);return v.value.selected.includes(t.name)})),e}),T=s(()=>w.value,()=>new x(w.value,{includeScore:!0,keys:[`name`],ignoreLocation:!0,threshold:.4})),E=u(()=>v.value.search?T.value.search(v.value.search).map(e=>e.item):w.value);return a(v.value,e=>{let t={...l.query,search:e.search||void 0,plugin_types:e.selected||void 0};m.replace({query:C(t)})},{debounce:500}),(e,t)=>{let i=y,a=k;return n(),p(`div`,A,[f(`div`,j,[d(i,{modelValue:v.value,"onUpdate:modelValue":t[0]||=e=>v.value=e,rules:b.value},null,8,[`modelValue`,`rules`])]),f(`div`,M,[d(a,{plugins:E.value??[]},null,8,[`plugins`]),f(`div`,N,[f(`span`,P,c(E.value.length)+` of `+c(r.session?.meta?.plugins?.length||0),1)])])])}}});export{F as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{G as e,Jt as t,Rt as n,Tt as r,Vt as i,W as a,c as o,ct as s,en as c,ft as l,g as u,in as d,it as f,jt as p,kt as m,l as h,lt as g,mt as _,ot as v,p as y,pt as b,qt as x,st as S,tn as C,ut as w,w as T,x as ee,y as te}from"#entry";import{t as E}from"./Jdu9jmuG.js";import"./DQtLZa7C.js";import"./B_mZ82Ef.js";import"./2OALqkc2.js";import{r as D,t as O}from"./DL1ysgP5.js";import"./DnpfwSMy.js";import{r as k,t as A}from"./Cql2HFZJ.js";import{a as j,c as M,n as N,t as ne}from"./BFwdTbGt.js";import{n as re,t as P}from"./B-LCQpq9.js";import{t as F}from"./mIZU4Om9.js";import{t as ie}from"./lxg2Cb0s.js";import{t as I}from"./Cq2KqeQT.js";var L={flex:`~ row gap-1`,"of-hidden":``},R={flex:`~ row gap-1`,"ws-nowrap":``},z={p2:``,flex:`~ col gap-1`},B=_({__name:`Importers`,props:{package:{},session:{},showVersion:{type:Boolean}},setup(e){let t=e,n=v(()=>{let e=new Map;return t.package.files.filter(e=>!!e.importers).flatMap(e=>e.importers).filter(e=>!e.path.startsWith(t.package?.dir??``)).forEach(t=>{e.set(t.path,t)}),Array.from(e.values())});return(t,a)=>{let o=O,c=D,l=p(`VMenu`);return r(),w(`div`,L,[S(`div`,R,[b(o,{id:n.value[0].path,session:e.session,link:``},null,8,[`id`,`session`]),n.value[0].version&&e.showVersion?(r(),s(c,{key:0,text:n.value[0].version,as:`span`},null,8,[`text`])):g(``,!0)]),n.value.length>1?(r(),s(l,{key:0,delay:{show:200,hide:0},"flex-none":``},{popper:i(()=>[S(`div`,z,[(r(!0),w(f,null,m(n.value,t=>(r(),w(`div`,{key:t.path,flex:`~ row gap-1 items-center nowrap`,"w-max":``},[b(o,{id:t.path,session:e.session,"ws-nowrap":``,"flex-1":``,"disable-tooltip":``,link:``},null,8,[`id`,`session`]),t.version&&e.showVersion?(r(),s(c,{key:0,text:`v${t.version}`,as:`span`},null,8,[`text`])):g(``,!0)]))),128))])]),default:i(()=>[b(c,{text:`+${n.value.length}`,color:100,class:`text-xs rounded px1`},null,8,[`text`])]),_:1})):g(``,!0)])}}}),V=Object.assign(B,{__name:`PackagesImporters`}),H={role:`table`,"min-w-max":``,border:`~ base rounded-xl`},U={role:`row`,class:`border-b border-base`,flex:`~ row`},W=[`title`],G={key:0,"font-mono":``},K={key:0,title:`Package version`,role:`columnheader`,"rounded-tr-2":``,"flex-none":``,"min-w40":``,"ws-nowrap":``,"text-left":``,"py1.5":``,px2:``,"font-600":``},q={flex:`~ row gap1 items-center justify-end`,"w-full":``,relative:``,pr2:``},J={key:0,role:`cell`,"font-mono":``,"flex-none":``,"min-w80":``,"py1.5":``,px2:``,"ws-nowrap":``,"text-sm":``},Y={role:`cell`,flex:`~ items-center justify-end`,"flex-none":``,"font-mono":``,"py1.5":``,px2:``,"text-sm":``,"min-w40":``,op80:``},X={p2:``,flex:`~ col gap-1`},Z={w24:``,"inline-flex":``},ae={role:`cell`,flex:`~ items-center`,"flex-1":``,"font-mono":``,"py1.5":``,pl20:``,pr2:``,"text-sm":``,op80:``},oe={key:1},se=_({__name:`Table`,props:{packages:{},session:{},disableSizeSort:{type:Boolean,default:!1},groupView:{type:Boolean,default:!1}},setup(e){let t=a(),{state:n,next:o}=h([``,`desc`,`asc`],{initialValue:A.value.packageSizeSortType});function u(){o(),A.value.packageSizeSortType=n.value}return(a,o)=>{let p=F,h=k,_=O,v=V,y=E,x=P;return r(),w(`div`,H,[S(`div`,U,[S(`div`,{title:e.groupView?`Package`:`Bundled packages`,role:`columnheader`,"rounded-tl-2":``,"flex-none":``,"ws-nowrap":``,"py1.5":``,px2:``,"font-600":``,class:C([e.groupView?`min-w40`:`min-w80`])},[e.groupView?(r(),w(`div`,G,[b(p,{name:e.packages?.[0]?.name},null,8,[`name`])])):(r(),w(f,{key:1},[l(` Package `)],64))],10,W),e.groupView?g(``,!0):(r(),w(`div`,K,` Version `)),S(`div`,{title:`Transformed code size`,role:`columnheader`,"rounded-tr-2":``,"flex-none":``,"ws-nowrap":``,"py1.5":``,"font-600":``,"min-w40":``,class:C([e.groupView?`px2`:`pl2`])},[S(`button`,q,[o[0]||=l(` Size `,-1),e.disableSizeSort?g(``,!0):(r(),w(`span`,{key:0,"w-6":``,"h-6":``,"rounded-full":``,"cursor-pointer":``,hover:`bg-active`,flex:`~ items-center justify-center`,onClick:u},[S(`i`,{"text-xs":``,class:C([c(n)===`asc`?`i-ph-arrow-up-duotone`:`i-ph-arrow-down-duotone`,c(n)?`op100 text-primary`:`op50`])},null,2)]))])],2),o[1]||=S(`div`,{title:`Importers`,role:`columnheader`,"rounded-tr-2":``,"flex-none":``,"ws-nowrap":``,"py1.5":``,pl20:``,pr2:``,"font-600":``,"min-w50":``},` Importers `,-1)]),e.packages.length?(r(),s(x,{key:0,role:`rowgroup`,items:e.packages,"key-prop":`dir`},{default:i(({item:n,index:a})=>[b(y,{role:`row`,flex:`~ row`,class:C([`border-base border-b-1 border-dashed`,[a===e.packages.length-1?`border-b-0`:``]]),to:{path:c(t).path,query:{package:`${n.name}@${n.version}`}}},{default:i(()=>[e.groupView?g(``,!0):(r(),w(`div`,J,[b(p,{name:n.name},null,8,[`name`])])),S(`div`,{role:`cell`,flex:`~ items-center`,"text-left":``,"flex-none":``,"font-mono":``,"py1.5":``,px2:``,"text-sm":``,"min-w40":``,op80:``,class:C({"text-primary":n.duplicated})},d(n.version),3),S(`div`,Y,[b(c(T),{delay:{show:200,hide:0}},{popper:i(()=>[S(`div`,X,[(r(!0),w(f,null,m(n.files.filter(e=>!!e.transformedCodeSize),t=>(r(),w(`div`,{key:t.path,flex:`~ row gap-1 items-center nowrap`,"w-max":``},[S(`span`,Z,[b(h,{bytes:t.transformedCodeSize},null,8,[`bytes`])]),b(_,{id:t.path,session:e.session,"ws-nowrap":``,"flex-1":``,"disable-tooltip":``,link:``,cwd:n.dir},null,8,[`id`,`session`,`cwd`])]))),128))])]),default:i(()=>[b(h,{bytes:n.transformedCodeSize},null,8,[`bytes`])]),_:2},1024)]),S(`div`,ae,[b(v,{package:n,session:e.session,"show-version":e.groupView},null,8,[`package`,`session`,`show-version`])])]),_:2},1032,[`class`,`to`])]),_:1},8,[`items`])):(r(),w(`div`,oe,[...o[2]||=[S(`div`,{p4:``},[S(`div`,{"w-full":``,"h-48":``,flex:`~ items-center justify-center`,op50:``,italic:``},[S(`p`,null,` No data `)])],-1)]]))])}}}),Q=Object.assign(se,{__name:`PackagesTable`}),ce={key:1,p4:``},le=_({__name:`Duplicated`,props:{packages:{},session:{}},setup(e){let t=e,n=v(()=>t.packages.filter(e=>e.duplicated)),i=v(()=>n.value.reduce((e,t)=>(e[t.name]=[...e[t.name]||[],t],e),{}));return(t,a)=>{let o=Q;return n.value.length?(r(!0),w(f,{key:0},m(i.value,(t,n)=>(r(),w(`div`,{key:n},[b(o,{packages:t,session:e.session,"group-view":``,"disable-size-sort":``},null,8,[`packages`,`session`])]))),128)):(r(),w(`div`,ce,[...a[0]||=[S(`div`,{"w-full":``,"h-48":``,flex:`~ items-center justify-center`,op50:``,italic:``},` No duplicate packages `,-1)]]))}}}),ue=Object.assign(le,{__name:`PackagesDuplicated`}),de={key:1,relative:``,"max-h-screen":``,"of-hidden":``},fe={absolute:``,"left-4":``,"top-4":``,"z-panel-nav":``},pe={flex:`~ gap-2 items-center`,p2:``,border:`t base`},$=[`onClick`],me={"of-auto":``,"h-screen":``,flex:`~ col gap-2`,pt44:``,px4:``,pb4:``},he={absolute:``,"bottom-4":``,"py-1":``,"px-2":``,"bg-glass":``,left:`1/2`,"translate-x":`-1/2`,border:`~ base rounded-full`,text:`center xs`},ge={op50:``},_e={key:1,"w-full":``,"h-48":``,flex:`~ items-center justify-center`,op50:``,italic:``},ve={key:0,"bg-glass":``,border:`~ base rounded`,p2:``,"text-sm":``,flex:`~ col gap-2`},ye={flex:`~ gap-1 items-center`},be={flex:`~ gap-1 items-center`},xe=_({__name:`packages`,props:{session:{}},setup(p){let h=p,_=x(y()),T=a(),E=e(),D=[{match:/.*/,name:`direct`,description:`Direct Dependencies`,icon:`i-octicon:package-dependencies-24 light:filter-invert-30!`},{match:/.*/,name:`transitive`,description:`Transitive Dependencies`,icon:`i-octicon:package-24 light:filter-invert-30!`}],O=te(),P=t({search:``,selected:[`direct`,`transitive`]}),{state:F,isLoading:L}=o(async()=>await O.value[`vite:rolldown:get-packages`]?.({session:h.session.id}),null),R=u(()=>F.value,()=>new ie(F.value,{includeScore:!0,keys:[`name`],ignoreLocation:!0,threshold:.4})),z=v(()=>F.value?Object.values(F.value.reduce((e,t)=>(e[t.name]=(e[t.name]||0)+1,e),{})).filter(e=>e>1).length:0),B=v(()=>[{label:`Table`,value:`table`,icon:`i-ph-table-duotone`},{label:`Treemap`,value:`treemap`,icon:`i-ph-checkerboard-duotone`},{label:`Duplicate Packages${z.value>0?` (${z.value})`:``}`,value:`duplicate-packages`,icon:`i-ph-package-duotone`}]),V=v(()=>P.value.search?R.value.search(P.value.search).map(e=>e.item):[...F.value||[]]),H=v(()=>{let e=A.value.packageSizeSortType,t=[...V.value].sort((e,t)=>(e.name||``).localeCompare(t.name||``));return(e?t.sort((t,n)=>e===`asc`?t.transformedCodeSize-n.transformedCodeSize:n.transformedCodeSize-t.transformedCodeSize):t).filter(e=>!P.value.selected||P.value.selected.some(t=>t.match(e.type)))});function U(e){A.value.packageViewType=e}let{tree:W,chartOptions:G,graph:K,nodeHover:q,nodeSelected:J,selectedNode:Y,selectNode:X,buildGraph:Z}=ne({data:H,nameKey:`name`,sizeKey:`transformedCodeSize`,rootText:`Packages`,nodeType:`package`,graphOptions:{onHover(e){e&&!T.query.package&&(q.value=e),e===null&&(q.value=void 0)},onClick(e){e.meta?.type===`package`&&E.replace({query:{...T.query,package:`${e.meta?.name}@${e.meta?.version}`}})},onLeave(){q.value=void 0},onSelect(e){J.value=e||W.value.root,Y.value=e?.meta}},onUpdate(){A.value.packageViewType===`treemap`&&(K.value=new j(W.value.root,{...G.value,selectedPaddingRatio:0}))}});return n(()=>A.value.packageViewType,()=>{Z()}),(e,t)=>{let n=ee,a=re,o=Q,u=N,h=ue,v=k,y=M;return c(L)?(r(),s(n,{key:0})):(r(),w(`div`,de,[S(`div`,fe,[b(a,{modelValue:P.value,"onUpdate:modelValue":t[0]||=e=>P.value=e,rules:D},{default:i(()=>[S(`div`,pe,[t[2]||=S(`span`,{op50:``,pl2:``,"text-sm":``},`View as`,-1),(r(!0),w(f,null,m(B.value,e=>(r(),w(`button`,{key:e.value,"btn-action":``,class:C(c(A).packageViewType===e.value?`bg-active`:`grayscale op50`),onClick:t=>U(e.value)},[S(`div`,{class:C(e.icon)},null,2),l(` `+d(e.label),1)],10,$))),128))])]),_:1},8,[`modelValue`])]),S(`div`,me,[c(A).packageViewType===`table`?(r(),w(f,{key:0},[b(o,{packages:H.value,session:p.session},null,8,[`packages`,`session`]),S(`div`,he,[S(`span`,ge,d(V.value.length)+` of `+d(c(F)?.length||0),1)])],64)):c(A).packageViewType===`treemap`?(r(),w(f,{key:1},[c(K)&&H.value.length?(r(),s(I,{key:0,graph:c(K),selected:c(J),onSelect:t[1]||=e=>c(X)(e)},{default:i(({selected:e,options:t,onSelect:n})=>[b(u,{border:`b base`,py2:``,"min-h-10":``,selected:e,options:t,onSelect:n},null,8,[`selected`,`options`,`onSelect`])]),_:1},8,[`graph`,`selected`])):(r(),w(`span`,_e,` No Data `))],64)):c(A).packageViewType===`duplicate-packages`?(r(),s(h,{key:2,packages:H.value,session:p.session},null,8,[`packages`,`session`])):g(``,!0)]),b(y,{"hover-x":_.x,"hover-y":_.y},{default:i(()=>[c(q)?.meta?(r(),w(`div`,ve,[S(`div`,ye,d(c(q).text),1),S(`div`,be,[b(v,{bytes:c(q).size,percent:!1},null,8,[`bytes`])])])):g(``,!0)]),_:1},8,[`hover-x`,`hover-y`])]))}}});export{xe as default};
|
package/dist/public/index.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html lang="en" class="bg-dots"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><script type="importmap">{"imports":{"#entry":"/
|
|
1
|
+
<!DOCTYPE html><html lang="en" class="bg-dots"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><script type="importmap">{"imports":{"#entry":"/.devtools-vite/_nuxt/DqBpHZ7Y.js"}}</script><title>Vite DevTools</title><link rel="stylesheet" href="/.devtools-vite/_nuxt/entry.BkLl46Cr.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/.devtools-vite/_nuxt/DqBpHZ7Y.js"><link rel="prefetch" as="style" crossorigin href="/.devtools-vite/_nuxt/error-404.CCdr3eE4.css"><link rel="prefetch" as="script" crossorigin href="/.devtools-vite/_nuxt/D-ZnEyqr.js"><link rel="prefetch" as="script" crossorigin href="/.devtools-vite/_nuxt/Jdu9jmuG.js"><link rel="prefetch" as="style" crossorigin href="/.devtools-vite/_nuxt/error-500.D-vBsHK_.css"><link rel="prefetch" as="script" crossorigin href="/.devtools-vite/_nuxt/AuXMpmu_.js"><meta name="description" content="DevTools for Vite"><meta property="og:title" content="Vite DevTools"><meta property="og:description" content="DevTools for Vite"><link rel="icon" type="image/svg+xml" href="/favicon.svg"><script type="module" src="/.devtools-vite/_nuxt/DqBpHZ7Y.js" crossorigin></script><script id="unhead:payload" type="application/json">{"title":"Vite DevTools"}</script></head><body><div id="__nuxt"></div><div id="teleports"></div><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1762332433245,false]</script><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/.devtools-vite/",buildId:"1a94e2d7-5f0c-42d1-b6c2-f70865b42be5",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body></html>
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitejs/devtools-vite",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.0-alpha.
|
|
4
|
+
"version": "0.0.0-alpha.11",
|
|
5
5
|
"description": "DevTools for Vite (work in progress)",
|
|
6
6
|
"author": "VoidZero Inc.",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"homepage": "https://github.com/vitejs/devtools#readme",
|
|
9
9
|
"repository": {
|
|
10
|
-
"directory": "
|
|
10
|
+
"directory": "/vite",
|
|
11
11
|
"type": "git",
|
|
12
12
|
"url": "git+https://github.com/vitejs/devtools.git"
|
|
13
13
|
},
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
],
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@floating-ui/dom": "^1.7.4",
|
|
33
|
-
"@pnpm/read-project-manifest": "^1001.1.
|
|
34
|
-
"@rolldown/debug": "^1.0.0-beta.
|
|
33
|
+
"@pnpm/read-project-manifest": "^1001.1.4",
|
|
34
|
+
"@rolldown/debug": "^1.0.0-beta.45",
|
|
35
35
|
"ansis": "^4.2.0",
|
|
36
36
|
"birpc": "^2.6.1",
|
|
37
37
|
"cac": "^6.7.14",
|
|
@@ -42,9 +42,9 @@
|
|
|
42
42
|
"mlly": "^1.8.0",
|
|
43
43
|
"mrmime": "^2.0.1",
|
|
44
44
|
"ohash": "^2.0.11",
|
|
45
|
-
"p-limit": "^7.
|
|
45
|
+
"p-limit": "^7.2.0",
|
|
46
46
|
"pathe": "^2.0.3",
|
|
47
|
-
"publint": "^0.3.
|
|
47
|
+
"publint": "^0.3.15",
|
|
48
48
|
"sirv": "^3.0.2",
|
|
49
49
|
"split2": "^4.2.0",
|
|
50
50
|
"structured-clone-es": "^1.0.0",
|
|
@@ -53,18 +53,18 @@
|
|
|
53
53
|
"unstorage": "^1.17.1",
|
|
54
54
|
"vue-virtual-scroller": "^2.0.0-beta.8",
|
|
55
55
|
"ws": "^8.18.3",
|
|
56
|
-
"@vitejs/devtools-kit": "0.0.0-alpha.
|
|
57
|
-
"@vitejs/devtools-rpc": "0.0.0-alpha.
|
|
56
|
+
"@vitejs/devtools-kit": "0.0.0-alpha.11",
|
|
57
|
+
"@vitejs/devtools-rpc": "0.0.0-alpha.11"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
|
-
"@types/codemirror": "^5.60.
|
|
60
|
+
"@types/codemirror": "^5.60.17",
|
|
61
61
|
"@types/diff": "^8.0.0",
|
|
62
62
|
"@types/split2": "^4.2.3",
|
|
63
63
|
"@types/stream-json": "^1.7.8",
|
|
64
|
-
"@unocss/nuxt": "^66.5.
|
|
65
|
-
"@vueuse/components": "^
|
|
66
|
-
"@vueuse/nuxt": "^
|
|
67
|
-
"@vueuse/router": "^
|
|
64
|
+
"@unocss/nuxt": "^66.5.4",
|
|
65
|
+
"@vueuse/components": "^14.0.0",
|
|
66
|
+
"@vueuse/nuxt": "^14.0.0",
|
|
67
|
+
"@vueuse/router": "^14.0.0",
|
|
68
68
|
"codemirror": "^5.65.20",
|
|
69
69
|
"codemirror-theme-vars": "^0.1.2",
|
|
70
70
|
"comlink": "^4.4.2",
|
|
@@ -74,15 +74,15 @@
|
|
|
74
74
|
"floating-vue": "^5.2.2",
|
|
75
75
|
"fuse.js": "^7.1.0",
|
|
76
76
|
"idb-keyval": "^6.2.2",
|
|
77
|
-
"nanovis": "^0.
|
|
77
|
+
"nanovis": "^1.0.0",
|
|
78
78
|
"splitpanes": "^4.0.4",
|
|
79
79
|
"stream-json": "^1.9.1",
|
|
80
80
|
"theme-vitesse": "^1.0.0",
|
|
81
|
-
"tsdown": "^0.15.
|
|
81
|
+
"tsdown": "^0.15.12",
|
|
82
82
|
"vite-hot-client": "^2.1.0"
|
|
83
83
|
},
|
|
84
84
|
"scripts": {
|
|
85
|
-
"build": "ROLLDOWN_OPTIONS_VALIDATION=loose nuxi build src && tsdown",
|
|
85
|
+
"build": "pnpm dev:prepare && ROLLDOWN_OPTIONS_VALIDATION=loose nuxi build src && tsdown",
|
|
86
86
|
"build:debug": "NUXT_DEBUG_BUILD=true pnpm run build",
|
|
87
87
|
"dev": "ROLLDOWN_OPTIONS_VALIDATION=loose nuxi dev src",
|
|
88
88
|
"dev:prepare": "nuxi prepare src"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Ft as e,bt as t,ft as n,gt as r,ht as i,jt as a,mt as o,on as s,pt as c,qt as l,sn as u,un as d,ut as f,vt as p,yt as m}from"#entry";import{t as h}from"./Bjr51Ks8.js";import"./Ci9NHG69.js";import"./CQNn9qP2.js";import"./BO9hKuA-.js";import{r as g,t as _}from"./BQ-NBLhA.js";import{t as v}from"./BvuqupwD.js";import{t as y}from"./DZeYNBxL.js";import{t as b}from"./cRQbgMUp.js";var x={flex:`~ col gap-2`,p6:``},S={flex:`~ gap-2`},C={border:`~ base rounded`,p4:``,grid:`~ cols-[max-content_160px_2fr] gap-2 items-center`},w={"font-mono":``},T=[`datetime`],E={key:4},D={border:`~ base rounded`,p4:``,grid:`~ cols-[max-content_1fr] gap-2 items-center`},O={flex:`~ gap-2`},k=t({__name:`index`,props:{session:{}},setup(t){let k=t,A=n(()=>[{title:`Build ID`,value:k.session.id,icon:`i-ph-hash-duotone`},{title:`Created At`,value:new Date(k.session.meta.timestamp),icon:`i-ph-clock-duotone`},{title:`Build Duration`,value:k.session.buildDuration,icon:`i-ph-timer-duotone`,type:`duration`},{title:`Directory`,value:k.session.meta.cwd,icon:`i-ph-folder-duotone`},{title:`Total Modules`,value:k.session.modulesList.length,icon:`i-ph-files-duotone`},{title:`Plugins`,value:k.session.meta.plugins.length,icon:`i-ph-plugs-duotone`},{title:`Platform`,value:k.session.meta.platform,icon:`i-ph-cpu-duotone`,type:`badge`},{title:`Format`,value:k.session.meta.format,icon:`i-ph-file-duotone`,type:`badge`}]);return(n,j)=>{let M=h,N=g,P=y,F=b,I=_;return a(),r(`div`,x,[c(`div`,S,[m(M,{"btn-action":``,to:{path:`/`}},{default:l(()=>[...j[0]||=[c(`div`,{"i-ph-arrow-bend-up-left-duotone":``},null,-1),p(` Re-select Session `,-1)]]),_:1})]),j[1]||=c(`div`,{op50:``,"mt-10":``},` Meta Info `,-1),c(`div`,C,[(a(!0),r(f,null,e(A.value,e=>(a(),r(f,{key:e.title},[c(`div`,{class:u(e.icon)},null,2),c(`div`,null,d(e.title),1),c(`div`,w,[e.value instanceof Date?(a(),r(`time`,{key:0,datetime:e.value.toISOString()},d(e.value.toLocaleString()),9,T)):e.type===`badge`?(a(),o(N,{key:1,text:String(e.value),py1:``},null,8,[`text`])):e.type===`duration`?(a(),o(P,{key:2,duration:+e.value},null,8,[`duration`])):typeof e.value==`number`?(a(),o(F,{key:3,number:e.value,py1:``,"rounded-full":``,"inline-block":``,"text-sm":``},null,8,[`number`])):(a(),r(`span`,E,d(e.value),1))])],64))),128))]),j[2]||=c(`div`,{op50:``,"mt-4":``},` Build Entries `,-1),c(`div`,D,[(a(!0),r(f,null,e(k.session.meta.inputs,e=>(a(),r(f,{key:e},[m(N,{text:e.name||``},null,8,[`text`]),m(I,{id:e.filename||``,session:t.session,link:!0},null,8,[`id`,`session`])],64))),128))]),j[3]||=c(`div`,{op50:``,"mt-4":``},` Views `,-1),c(`div`,O,[(a(!0),r(f,null,e(s(v),e=>(a(),r(f,{key:e.to},[e.category===`session`?(a(),o(M,{key:0,"btn-action":``,to:{path:e.to},flex:`~ col`,"min-w-40":``,p4:``},{default:l(()=>[c(`div`,{class:u(e.icon),"text-2xl":``},null,2),p(` `+d(e.title),1)]),_:2},1032,[`to`])):i(``,!0)],64))),128))])])}}});export{k as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Ft as e,Kt as t,O as n,T as r,bt as i,en as a,ft as o,gt as s,ht as c,jt as l,mt as u,on as d,pt as f,qt as p,sn as m,un as h,ut as g,vt as _,yt as v,zt as y}from"#entry";import{t as b}from"./Bjr51Ks8.js";import{t as x}from"./DSjlpmm-.js";import"./CQNn9qP2.js";import"./BO9hKuA-.js";import{r as S,t as C}from"./BQ-NBLhA.js";import{t as w}from"./tS5wJZMm.js";import"./DnpfwSMy.js";import{t as T}from"./BdGMcGSQ.js";var E={flex:`~ col gap-2`},D={flex:`~ gap-1 items-center`,"font-mono":``,op50:``,"text-sm":``},O={"font-mono":``,"font-sm":``},k={key:0,flex:`~ gap-1 items-center`},A={key:0,op50:``,"text-xs":``,border:`~ base rounded-md`,px1:``,"font-mono":``},j=i({__name:`SessionSelector`,props:{sessionMode:{},sessions:{},selectedSessionIds:{},selectedSessions:{}},emits:[`select`],setup(t,{emit:n}){let r=t,i=n;function a(e){return T(e.meta.inputs[0]?.filename??``,e.meta.cwd).path}let x=o(()=>{let e=r.selectedSessions?.[0];return e?a(e):``});function j(e){return x.value&&x.value!==a(e)}function M(e){r.sessionMode===`compare`&&!j(e)&&i(`select`,e)}return(n,r)=>{let i=C,a=S,o=w;return l(),s(`div`,E,[(l(!0),s(g,null,e(t.sessions,e=>(l(),s(`div`,{key:e.id,flex:`~ row gap-2`,relative:``},[(l(),u(y(t.sessionMode===`list`?d(b):`div`),{to:`/session/${e.id}`,border:`~ rounded-md`,class:m(t.sessionMode===`list`?[`hover:bg-active`,`border-base`]:[t.selectedSessionIds.includes(e.id)?`border-active`:`border-base`,j(e)||t.selectedSessions.length===2&&!t.selectedSessionIds.includes(e.id)?`op50`:`hover:bg-active`]),flex:`~ col gap-1`,px4:``,py3:``,onClick:t=>M(e)},{default:p(()=>[f(`div`,D,[r[0]||=f(`div`,{"i-ph-hash-duotone":``},null,-1),_(` `+h(e.id),1)]),f(`div`,O,h(e.meta.cwd),1),e.meta.inputs[0]?(l(),s(`div`,k,[v(i,{id:e.meta.inputs[0].filename,cwd:e.meta.cwd},null,8,[`id`,`cwd`]),v(a,{text:e.meta.inputs[0].name||`entry`},null,8,[`text`]),e.meta.inputs.length>1?(l(),s(`span`,A,` +`+h(e.meta.inputs.length-1),1)):c(``,!0)])):c(``,!0),v(o,{timestamp:e.timestamp,pt2:``,"text-sm":``,op50:``},null,8,[`timestamp`])]),_:2},1032,[`to`,`class`,`onClick`]))]))),128))])}}}),M=Object.assign(j,{__name:`PanelSessionSelector`}),N={p4:``,flex:`~ col gap-4`,"items-center":``,"justify-center":``,relative:``},P={op50:``},F={relative:``,flex:`~ col gap3 items-center`},I={fixed:``,"top-5":``,"right-5":``,flex:`~ col gap2`},L={flex:`~ row justify-around`,w20:``,h8:``,border:`~ base rounded-8`,"of-hidden":``},R=[`title`,`onClick`],z={key:0,fixed:``,"bottom-5":``,"right-5":``,border:`~ base rounded-2`,w100:``,"max-lg:w85":``,"bg-glass":``,"z-panel-content":``},B={flex:`~ justify-center`,p2:``},V={key:1,op80:``,"text-sm":``},H=i({__name:`index`,async setup(i){let y,S,C=a(`list`),w=[{label:`Session List`,icon:`i-carbon-list`,value:`list`},{label:`Session Compare`,icon:`i-carbon-compare`,value:`compare`}],T=a([]),E=o(()=>T.value.map(e=>e.id).sort()),D=o(()=>[...T.value].sort((e,t)=>e.timestamp-t.timestamp).map((e,t)=>({...e,createdAt:new Date(e.timestamp),title:t===0?`Session A`:`Session B`}))),O=r(),k=([y,S]=t(()=>O.value[`vite:rolldown:list-sessions`]()),y=await y,S(),y);function A(e){E.value.includes(e.id)?T.value=T.value.filter(t=>t.id!==e.id):T.value=[...T.value,e]}return(t,r)=>{let i=n,a=M,o=x,y=b;return l(),s(`div`,N,[v(i),f(`p`,P,h(C.value===`list`?`Select a build session to get started:`:`Select 2 build sessions to compare:`),1),f(`div`,F,[v(a,{"session-mode":C.value,sessions:d(k),"selected-session-ids":E.value,"selected-sessions":T.value,onSelect:A},null,8,[`session-mode`,`sessions`,`selected-session-ids`,`selected-sessions`])]),f(`div`,I,[f(`div`,L,[(l(),s(g,null,e(w,e=>f(`button`,{key:e.value,title:e.label,"flex-1":``,op50:``,flex:`~ items-center justify-center`,class:m({"bg-active text-base op100!":C.value===e.value}),hover:`bg-active text-base op100!`,onClick:t=>C.value=e.value},[f(`span`,{class:m([e.icon,`text-sm`])},null,2)],10,R)),64))])]),T.value.length>0&&C.value===`compare`?(l(),s(`div`,z,[v(o,{sessions:D.value,class:`flex-col gap0 [&>div]:border-none! [&>first-child]:border-b!`},null,8,[`sessions`]),f(`div`,B,[T.value.length===2?(l(),u(y,{key:0,tag:`button`,to:`/compare/${E.value.join(`,`)}`,"btn-action":``,"rounded-8":``,"text-3":``,flex:`~ justify-center`,w30:``,h8:``},{default:p(()=>[...r[0]||=[_(` Compare `,-1)]]),_:1},8,[`to`])):(l(),s(`div`,V,` Select one more session to compare. `))])])):c(``,!0)])}}});export{H as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{It as e,bt as t,ft as n,gt as r,ht as i,jt as a,pt as o,sn as s,un as c,vt as l}from"#entry";import{t as u}from"./Ci9NHG69.js";var d={"text-xs":``,op75:``,"ml-0.4":``},f={key:0,"text-xs":``,ml1:``,"op-fade":``,border:`l base`,pl1:``},p=1024,m=t({__name:`FileSizeBadge`,props:{bytes:{},colorize:{type:Boolean,default:!0},digits:{default:2},percent:{type:Boolean,default:!0},total:{},icon:{},percentRatio:{default:.5}},setup(t){let m=t,h=p**2,g=[[80*p,`color-scale-neutral`],[500*p,`color-scale-low`],[1*h,`color-scale-medium`],[10*h,`color-scale-high`],[20*h,`color-scale-critical`]],_=n(()=>{if(!m.colorize)return g[0];let e=m.bytes||0;for(let[t,n]of g)if(e<t)return n;return g[g.length-1]?.[1]}),v=n(()=>m.total?(m.bytes||0)*100/m.total:0),y=n(()=>u(m.bytes||0,m.digits));return(n,u)=>t.bytes?(a(),r(`div`,{key:0,class:s([_.value,`px-0.4em py-0.2em font-mono line-height-none bg-gray:5 dark:bg-gray:4 flex items-center`])},[t.icon?(a(),r(`div`,{key:0,class:s([t.icon,`mr-1`])},null,2)):i(``,!0),l(` `+c(y.value[0]),1),o(`span`,d,c(y.value[1]),1),e(n.$slots,`after`,{},()=>[t.percent&&v.value>t.percentRatio?(a(),r(`span`,f,c(+v.value.toFixed(1))+`%`,1)):i(``,!0)])],2)):i(``,!0)}}),h=Object.assign(m,{__name:`DisplayFileSizeBadge`});export{h as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Ct as e,bt as t,jt as n,mt as r,zt as i}from"#entry";import{r as a}from"./CQNn9qP2.js";var o=t({__name:`PluginName`,props:{name:{},compact:{type:Boolean},colored:{type:Boolean},hide:{type:Boolean}},setup(t){let o=t,s=[`__load__`,`vite-plugin-`,`vite-`,`rollup-plugin-`,`rollup-`,`unplugin-`],c=[...s,`vite:`];function l(){let t=o.compact?c:s;for(let n of t)if(o.name.startsWith(n))return o.compact?e(`span`,o.name.slice(n.length)):e(`span`,[e(`span`,{class:`op50`},n),e(`span`,o.name.slice(n.length))]);let n=o.name.split(`:`);return n.length>1?e(`span`,[e(`span`,{style:{color:a(n[0])}},`${n[0]}:`),e(`span`,n.slice(1).join(`:`))]):e(`span`,o.name)}return(e,t)=>(n(),r(i(l)))}}),s=Object.assign(o,{__name:`DisplayPluginName`});export{s as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{gt as e,jt as t,k as n,pt as r,q as i,un as a}from"#entry";var o={class:`antialiased bg-white dark:bg-[#020420] dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-[#020420] tracking-wide`},s={class:`max-w-520px text-center`},c=[`textContent`],l=[`textContent`],u=[`textContent`],d={__name:`error-500`,props:{appName:{type:String,default:`Nuxt`},statusCode:{type:Number,default:500},statusMessage:{type:String,default:`Internal server error`},description:{type:String,default:`This page is temporarily unavailable.`},refresh:{type:String,default:`Refresh this page`}},setup(n){let d=n;return i({title:`${d.statusCode} - ${d.statusMessage} | ${d.appName}`,script:[{innerHTML:`!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))r(e);new MutationObserver(e=>{for(const o of e)if("childList"===o.type)for(const e of o.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&r(e)}).observe(document,{childList:!0,subtree:!0})}function r(e){if(e.ep)return;e.ep=!0;const r=function(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?r.credentials="include":"anonymous"===e.crossOrigin?r.credentials="omit":r.credentials="same-origin",r}(e);fetch(e.href,r)}}();`}],style:[{innerHTML:`*,:after,:before{border-color:var(--un-default-border-color,#e5e7eb);border-style:solid;border-width:0;box-sizing:border-box}:after,:before{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}h1,h2{font-size:inherit;font-weight:inherit}h1,h2,p{margin:0}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }`}]}),(i,d)=>(t(),e(`div`,o,[r(`div`,s,[r(`h1`,{class:`font-semibold leading-none mb-4 sm:text-[110px] tabular-nums text-[80px]`,textContent:a(n.statusCode)},null,8,c),r(`h2`,{class:`font-semibold mb-2 sm:text-3xl text-2xl`,textContent:a(n.statusMessage)},null,8,l),r(`p`,{class:`mb-4 px-2 text-[#64748B] text-md`,textContent:a(n.description)},null,8,u)])]))}},f=n(d,[[`__scopeId`,`data-v-289a8b59`]]);export{f as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Ct as e,bt as t,ft as n,gt as r,jt as i,sn as a}from"#entry";import{r as o,s}from"./CQNn9qP2.js";var c=[`title`],l=t({__name:`FileIcon`,props:{filename:{}},setup(e){let t=e,o=n(()=>s(t.filename));return(e,t)=>(i(),r(`div`,{"flex-none":``,"icon-catppuccin":``,title:o.value.description||o.value.name,class:a([o.value.icon])},null,10,c))}}),u=Object.assign(l,{__name:`DisplayFileIcon`}),d=t({name:`HighlightedPath`,props:{path:{type:String,required:!0},minimal:{type:Boolean,default:!1}},setup(t){return()=>{let n=t.path.split(/([?/&:=])/g),r=`path`,i=n.map(()=>[]),a=n.map(()=>[]),s=n.map(t=>e(`span`,{class:``},t)),c=new Set;return n.forEach((e,l)=>{if(e===`?`&&(r=`query`),r===`path`){if(e.match(/^\.+$/)||e===`/`?i[l]?.push(`op50`):(e===`node_modules`||e===`dist`||e===`lib`||e.match(/^\.\w/))&&i[l]?.push(`op60`),e===`node_modules`&&t.minimal)for(let e=0;e<l+2;e++)c.add(e);if(e===`.pnpm`&&(s[l]&&(s[l].children=`~`,i[l]?.push(`op25!`),i[l-1]?.push(`op25!`)),c.add(l+1),c.add(l+2),i[l+3]?.push(`op25!`),s[l+4]?.children===`node_modules`&&(c.add(l+3),c.add(l+4),i[l+5]?.push(`op25!`))),e===`:`&&(s[l-1]&&a[l-1]?.push(`color: ${o(n[l-1])}`),i[l]?.push(`op50`)),n[l-2]===`node_modules`&&!e.startsWith(`.`)){let t=`color: ${o(n[l])}`;a[l]?.push(t),e.startsWith(`@`)&&(a[l+1]?.push(t),a[l+2]?.push(t))}}r===`query`&&(e===`?`?i[l]?.push(`text-red-500 dark:text-red-400`):e===`&`&&i[l]?.push(`text-orange-500 dark:text-orange-400`),e===`=`?i[l]?.push(`text-orange-900 dark:text-orange-200 op50`):n[l+1]===`=`?i[l]?.push(`text-amber-900 dark:text-amber-200`):i[l]?.push(`text-orange-900 dark:text-orange-200`))}),s.forEach((e,t)=>{e.props&&(e.props.class=i[t]?.join(` `)??``,e.props.style=a[t]?.join(`;`)??``)}),Array.from(c).sort((e,t)=>t-e).forEach(e=>{s.splice(e,1)}),s}}});export{u as n,d as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Ft as e,Tt as t,Vt as n,X as r,bt as i,gt as a,ht as o,jt as s,ln as c,mt as l,on as u,pt as d,qt as f,sn as p,ut as m,yt as h,zt as g}from"#entry";import{t as _}from"./Bjr51Ks8.js";import{n as v,t as y}from"./BO9hKuA-.js";var b=[`open`],x={"font-mono":``},S={"font-mono":``},C=i({__name:`TreeNode`,props:t({node:{},icon:{default:`i-catppuccin:folder icon-catppuccin`},iconOpen:{default:`i-catppuccin:folder-open icon-catppuccin`},link:{type:[String,Boolean]},linkQueryKey:{default:`module`},padding:{default:0},open:{type:Boolean}},{open:{type:Boolean,required:!1,default:!0},openModifiers:{}}),emits:t([`select`],[`update:open`]),setup(t,{emit:i}){let C=t,T=i,E=n(t,`open`),D=r(),O=window.location;function k(e){C.link||T(`select`,e)}return(n,r)=>{let i=y,C=w,T=v;return s(),a(`details`,{open:E.value,onToggle:r[0]||=e=>E.value=e.target?.open},[d(`summary`,{"cursor-default":``,"select-none":``,"text-sm":``,truncate:``,style:c({paddingLeft:`${t.padding+.5}rem`}),flex:`~ gap-1`,px2:``,py1:``,rounded:``,hover:`bg-active `},[d(`div`,{class:p([`i-ph:caret-right-duotone transition op50`,E.value?`rotate-90`:``])},null,2),d(`div`,{class:p(E.value&&t.iconOpen||t.icon),"inline-block":``,"vertical-text-bottom":``},null,2),d(`div`,x,[h(i,{path:t.node.name||``},null,8,[`path`])])],4),E.value?(s(),a(m,{key:0},[(s(!0),a(m,null,e(Object.entries(t.node.children),e=>(s(),l(C,{key:e[0],node:e[1],link:t.link,padding:t.padding+1,"link-query-key":t.linkQueryKey,onSelect:k},null,8,[`node`,`link`,`padding`,`link-query-key`]))),128)),(s(!0),a(m,null,e(t.node.items,e=>(s(),l(g(t.link?u(_):`div`),{key:e.full,to:t.link?typeof t.link==`string`?t.link:{path:u(D).path,query:{...u(D).query,[t.linkQueryKey]:e.full},hash:u(O).hash}:void 0,"text-sm":``,"ws-nowrap":``,flex:`~ gap-1`,px2:``,py1:``,rounded:``,hover:`bg-active`,style:c({paddingLeft:`${t.padding+2.7}rem`}),onClick:t=>k(e)},{default:f(()=>[h(T,{filename:e.full},null,8,[`filename`]),d(`div`,S,[h(i,{path:e.path.split(`/`).pop()||``},null,8,[`path`])])]),_:2},1032,[`to`,`style`,`onClick`]))),128))],64)):o(``,!0)],40,b)}}}),w=Object.assign(C,{__name:`DisplayTreeNode`});export{w as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{D as e,Et as t,Ft as n,T as r,X as i,bt as a,en as o,ft as s,gt as c,jt as l,kt as u,mt as d,pt as f,qt as p,sn as m,un as h,ut as g,vt as _,yt as v}from"#entry";import{t as y}from"./Bjr51Ks8.js";import{t as b}from"./DSjlpmm-.js";import{t as x}from"./Ci9NHG69.js";var S=a({__name:`ComparisonMetric`,props:{current:{},previous:{}},setup(e){let t=e,n=s(()=>t.previous===t.current),r=s(()=>Math.abs((t.current-t.previous)/t.previous*100).toFixed(n.value?0:2)),i=s(()=>n.value?``:t.current>t.previous?`+`:`-`),a=s(()=>n.value?`text-gray-500`:t.current>t.previous?`text-green-500`:`text-red-500`);return(e,t)=>(l(),c(`span`,{"text-4":``,"mt-1":``,"font-mono":``,class:m(a.value)},h(i.value)+h(r.value)+`% `,3))}}),C=Object.assign(S,{__name:`DisplayComparisonMetric`}),w=[`title`],T={flex:`~ gap-2`,"items-center":``},E={key:0},D={"font-semibold":``,"text-5":``,"font-mono":``},O={"font-semibold":``,"text-4":``,"font-mono":``},k={key:1},A={"font-semibold":``,"text-5":``,"font-mono":``},j=a({__name:`MetricCard`,props:{name:{},description:{},icon:{},current:{},previous:{},format:{}},setup(e){let t=e,n=s(()=>t.format===`bytes`?x(t.current):t.current);return(t,r)=>{let i=C;return l(),c(g,null,[f(`div`,{"font-500":``,op50:``,"text-4":``,flex:`~ items-center gap-2`,title:e.description},[f(`div`,{class:m([e.icon,`text-xl`])},null,2),_(` `+h(e.name),1)],8,w),f(`div`,T,[e.format===`bytes`?(l(),c(`div`,E,[f(`span`,D,h(n.value[0]),1),f(`span`,O,h(n.value[1]),1)])):(l(),c(`div`,k,[f(`span`,A,h(n.value),1)])),v(i,{current:e.current,previous:e.previous},null,8,[`current`,`previous`])])],64)}}}),M=Object.assign(j,{__name:`CompareMetricCard`}),N={key:1,"h-screen":``,"w-screen":``,"max-w-screen":``,"max-h-screen":``,"of-hidden":``,p6:``,flex:`~ col gap-2`},P={flex:`~ gap-2`},F={flex:`~ col`,border:`~ base rounded-lg`,p3:``,mt10:``},I={grid:`~ cols-4 gap5`,"w-full":``,pt3:``},L=a({__name:`index`,setup(a){let h=o(!1),x=i().params,S=r(),C=o([]);u(async()=>{h.value=!0,C.value=await S.value[`vite:rolldown:get-session-compare-summary`]({sessions:x.sessions.split(`,`)}),h.value=!1});let w=s(()=>C.value.map((e,t)=>({...e,createdAt:new Date(e.meta?.timestamp??0),title:t===0?`Session A`:`Session B`}))),T=s(()=>{let[e,t]=w.value;return[{name:`Bundle Size`,description:`Total file size of the assets`,icon:`i-ph-package-duotone`,current:t?.bundle_size??0,previous:e?.bundle_size??0,format:`bytes`},{name:`Initial JS`,description:`Total file size of the initial JS chunks`,icon:`i-ph:file-js-duotone`,current:t?.initial_js??0,previous:e?.initial_js??0,format:`bytes`},{name:`Modules`,description:`Total number of modules`,icon:`i-ph-graph-duotone`,current:t?.modules??0,previous:e?.modules??0},{name:`Plugins`,description:`Total number of plugins`,icon:`i-ph-plugs-duotone`,current:t?.meta?.plugins.length??0,previous:e?.meta?.plugins.length??0},{name:`Chunks`,description:`Total number of chunks`,icon:`i-ph-shapes-duotone`,current:t?.chunks??0,previous:e?.chunks??0},{name:`Assets`,description:`Total number of assets`,icon:`i-ph-package-duotone`,current:t?.assets??0,previous:e?.assets??0}]});return(r,i)=>{let a=e,o=y,s=b,u=M;return h.value?(l(),d(a,{key:0})):(l(),c(`div`,N,[f(`div`,P,[v(o,{"btn-action":``,to:{path:`/`}},{default:p(()=>[...i[0]||=[f(`div`,{"i-ph-arrow-bend-up-left-duotone":``},null,-1),_(` Re-select Session `,-1)]]),_:1})]),f(`div`,F,[i[1]||=f(`div`,{py3:``,"indent-2":``},` Compare Overview `,-1),v(s,{sessions:w.value},null,8,[`sessions`]),f(`div`,I,[(l(!0),c(g,null,n(T.value,(e,n)=>(l(),c(`div`,{key:e.name,class:m(n<2?`col-span-2`:`col-span-1`),border:`~ base rounded`,p4:``,flex:`~ col`,gap2:``},[v(u,t({ref_for:!0},e),null,16)],2))),128))])])]))}}});export{L as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Et as e,Ft as t,It as n,Jt as r,Rt as i,Wt as a,bt as o,cn as s,en as c,gt as l,ht as u,jt as d,kt as f,ln as p,lt as m,mt as h,on as g,ot as _,pt as v,qt as y,sn as b,un as x,ut as S,yt as C}from"#entry";import{a as w,i as T,n as E,o as ee,r as D,s as O}from"./IrMnfQaU.js";var k=o({inheritAttrs:!1,__name:`TimeoutView`,props:{content:{},hideInterval:{default:1500}},setup(t){let n=c(!1),r=null;return a(()=>t.content,()=>{r&&clearTimeout(r),n.value=!0,r=setTimeout(()=>{n.value=!1},t.hideInterval)}),(r,i)=>(d(),h(_,{"enter-active-class":`transition-opacity duration-200 ease-in`,"leave-active-class":`transition-opacity duration-500 ease-out`,"enter-from-class":`opacity-0`,"leave-to-class":`opacity-0`},{default:y(()=>[n.value?(d(),l(`div`,s(e({key:0},r.$attrs)),x(t.content),17)):u(``,!0)]),_:1}))}}),A=Object.assign(k,{__name:`DisplayTimeoutView`}),j=[`width`,`height`],M=[`d`],N={class:`w-4`},P=[`disabled`,`title`,`onClick`],F={fixed:``,"right-6":``,"bottom-6":``,"z-panel-nav":``,flex:`~ col gap-2 items-center`},I={"w-10":``,flex:`~ items-center justify-center`},L={"bg-glass":``,"rounded-full":``,border:``,"border-base":``,shadow:``,flex:`~ col gap-1 p1`},R=[`disabled`],z=[`disabled`],B=[`disabled`],V=[`disabled`],H=o({__name:`ModuleGraph`,props:{modules:{},session:{}},setup(e){let o=e,{isFirstCalculateGraph:s,childToParentMap:c,collapsedNodes:h,calculateGraph:_,container:y,width:x,height:k,scale:H,nodes:U,links:W,spacing:G,nodesRefMap:K}=ee(),{isGrabbing:q,init:J}=T(),{zoomIn:Y,zoomOut:X,ZOOM_MIN:Z,ZOOM_MAX:Q}=w(),{isGraphNodeToggling:$,toggleNode:te,expandAll:ne,collapseAll:re}=O({modules:o.modules});return f(()=>{J(),a(()=>o.modules,()=>{s.value=!0,h.clear(),c.clear(),_()},{immediate:!0})}),(e,a)=>{let o=A,s=i(`tooltip`);return d(),l(`div`,{ref_key:`container`,ref:y,"w-full":``,"h-screen":``,"of-scroll":``,relative:``,"select-none":``,class:b(g(q)?`cursor-grabbing`:``)},[v(`div`,{style:p({width:`${g(x)*g(H)}px`,height:`${g(k)*g(H)}px`})},[v(`div`,{flex:`~ items-center justify-center`,style:p({transform:`scale(${g(H)})`,transformOrigin:`0 0`})},[v(`div`,{absolute:``,"left-0":``,"top-0":``,style:p({width:`${g(x)}px`,height:`${g(k)}px`}),class:`bg-dots`},null,4),(d(),l(`svg`,{"pointer-events-none":``,absolute:``,"left-0":``,"top-0":``,"z-graph-link":``,width:g(x),height:g(k)},[v(`g`,null,[(d(!0),l(S,null,t(g(W),t=>n(e.$slots,`link`,{key:t.id,link:t,d:g(E)(t,g(G)),linkClass:g(D)(t)},()=>[(d(),l(`path`,{key:t.id,d:g(E)(t,g(G)),class:b(g(D)(t)),fill:`none`},null,10,M))])),128))])],8,j)),(d(!0),l(S,null,t(g(U),t=>(d(),l(S,{key:t.data.module.id},[t.data.module.id===`~root`?u(``,!0):(d(),l(`div`,{key:0,absolute:``,class:`group z-graph-node flex gap-1 items-center`,style:p({left:`${t.x}px`,top:`${t.y}px`,transform:`translate(-50%, -50%)`})},[v(`div`,{flex:`~ items-center gap-1`,"bg-glass":``,border:`~ base rounded`,class:`group-hover:bg-active block px2 p1`,style:p({minWidth:`${g(g(G).width)}px`,maxWidth:`${g(g(G).width)}px`,maxHeight:`${g(g(G).height)}px`,overflow:`hidden`,transition:`all 0.3s ease`})},[n(e.$slots,`default`,{node:t,nodesRefMap:g(K)})],4),v(`div`,N,[t.data.hasChildren?(d(),l(`button`,{key:0,"w-4":``,"h-4":``,"rounded-full":``,flex:`items-center justify-center`,"text-xs":``,border:`~ active`,class:b([`flex cursor-pointer z-graph-node-active bg-base`,{"cursor-not-allowed":g($),"hover:bg-active":!g($)}]),disabled:g($),title:t.data.expanded?`Collapse`:`Expand`,onClick:m(e=>g(te)(t.data.module.id),[`stop`])},[v(`div`,{class:b([`text-primary h-4`,[t.data.expanded?`i-ph-minus`:`i-ph-plus`]]),transition:`transform duration-200`},null,2)],10,P)):u(``,!0)])],4))],64))),128))],4)],4),v(`div`,F,[v(`div`,I,[C(o,{content:`${Math.round(g(H)*100)}%`,class:`text-sm`},null,8,[`content`])]),v(`div`,L,[r((d(),l(`button`,{"w-10":``,"h-10":``,"rounded-full":``,"hover:bg-active":``,"op-fade":``,"hover:op100":``,flex:`~ items-center justify-center`,disabled:g($),class:b({"op50 cursor-not-allowed":g($),"hover:bg-active":!g($)}),title:`Expand All`,onClick:a[0]||=e=>g(ne)()},[...a[4]||=[v(`div`,{class:`i-carbon:expand-categories`},null,-1)]],10,R)),[[s,`Expand All`,void 0,{left:!0}]]),r((d(),l(`button`,{"w-10":``,"h-10":``,"rounded-full":``,"hover:bg-active":``,"op-fade":``,"hover:op100":``,flex:`~ items-center justify-center`,disabled:g($),class:b({"op50 cursor-not-allowed":g($),"hover:bg-active":!g($)}),title:`Collapse All`,onClick:a[1]||=e=>g(re)()},[...a[5]||=[v(`div`,{class:`i-carbon:collapse-categories`},null,-1)]],10,z)),[[s,`Collapse All`,void 0,{left:!0}]]),a[8]||=v(`div`,{border:`t base`,my1:``},null,-1),r((d(),l(`button`,{disabled:g(H)>=g(Q),"w-10":``,"h-10":``,"rounded-full":``,"hover:bg-active":``,"op-fade":``,"hover:op100":``,"disabled:op20":``,"disabled:bg-none":``,"disabled:cursor-not-allowed":``,flex:`~ items-center justify-center`,title:`Zoom In (Ctrl + =)`,onClick:a[2]||=e=>g(Y)()},[...a[6]||=[v(`div`,{"i-ph-magnifying-glass-plus-duotone":``},null,-1)]],8,B)),[[s,`Zoom In (Ctrl + =)`,void 0,{left:!0}]]),r((d(),l(`button`,{disabled:g(H)<=g(Z),"w-10":``,"h-10":``,"rounded-full":``,"hover:bg-active":``,"op-fade":``,"hover:op100":``,"disabled:op20":``,"disabled:bg-none":``,"disabled:cursor-not-allowed":``,flex:`~ items-center justify-center`,title:`Zoom Out (Ctrl + -)`,onClick:a[3]||=e=>g(X)()},[...a[7]||=[v(`div`,{"i-ph-magnifying-glass-minus-duotone":``},null,-1)]],8,V)),[[s,`Zoom Out (Ctrl + -)`,void 0,{left:!0}]])])])],2)}}}),U=Object.assign(H,{__name:`DisplayModuleGraph`});export{U as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{$ as e,Ct as t,G as n,H as r,J as i,K as a,Lt as o,Ot as s,Q as c,U as l,W as u,Y as d,Z as f,at as p,bt as m,en as h,et as g,ft as _,it as v,kt as y,nn as b,nt as x,rt as S,tt as C}from"#entry";var w=(...e)=>e.find(e=>e!==void 0);function T(a){let p=a.componentName||`NuxtLink`;function g(e){return typeof e==`string`&&e.startsWith(`#`)}function v(e,t,n){let r=n??a.trailingSlash;if(!e||r!==`append`&&r!==`remove`)return e;if(typeof e==`string`)return D(e,r);let i=`path`in e&&e.path!==void 0?e.path:t(e).path;return{...e,name:void 0,path:D(i,r)}}function T(t){let n=f(),r=e(),s=_(()=>!!t.target&&t.target!==`_self`),c=_(()=>{let e=t.to||t.href||``;return typeof e==`string`&&C(e,{acceptRelative:!0})}),l=o(`RouterLink`),u=l&&typeof l!=`string`?l.useLink:void 0,p=_(()=>{if(t.external)return!0;let e=t.to||t.href||``;return typeof e==`object`?!1:e===``||c.value}),m=_(()=>{let e=t.to||t.href||``;return p.value?e:v(e,n.resolve,t.trailingSlash)}),h=p.value?void 0:u?.({...t,to:m}),y=_(()=>{let e=t.trailingSlash??a.trailingSlash;if(!m.value||c.value||g(m.value))return m.value;if(p.value){let t=typeof m.value==`object`&&`path`in m.value?d(m.value):m.value,r=typeof t==`object`?n.resolve(t).href:t;return D(r,e)}return typeof m.value==`object`?n.resolve(m.value)?.href??null:D(x(r.app.baseURL,m.value),e)});return{to:m,hasTarget:s,isAbsoluteUrl:c,isExternal:p,href:y,isActive:h?.isActive??_(()=>m.value===n.currentRoute.value.path),isExactActive:h?.isExactActive??_(()=>m.value===n.currentRoute.value.path),route:h?.route??_(()=>n.resolve(m.value)),async navigate(e){await i(y.value,{replace:t.replace,external:p.value||s.value})}}}return m({name:p,props:{to:{type:[String,Object],default:void 0,required:!1},href:{type:[String,Object],default:void 0,required:!1},target:{type:String,default:void 0,required:!1},rel:{type:String,default:void 0,required:!1},noRel:{type:Boolean,default:void 0,required:!1},prefetch:{type:Boolean,default:void 0,required:!1},prefetchOn:{type:[String,Object],default:void 0,required:!1},noPrefetch:{type:Boolean,default:void 0,required:!1},activeClass:{type:String,default:void 0,required:!1},exactActiveClass:{type:String,default:void 0,required:!1},prefetchedClass:{type:String,default:void 0,required:!1},replace:{type:Boolean,default:void 0,required:!1},ariaCurrentValue:{type:String,default:void 0,required:!1},external:{type:Boolean,default:void 0,required:!1},custom:{type:Boolean,default:void 0,required:!1},trailingSlash:{type:String,default:void 0,required:!1}},useLink:T,setup(e,{slots:i}){let p=f(),{to:m,href:_,navigate:v,isExternal:x,hasTarget:C,isAbsoluteUrl:E}=T(e),D=b(!1),k=h(null),j=t=>{k.value=e.custom?t?.$el?.nextElementSibling:t?.$el};function M(t){return!D.value&&(typeof e.prefetchOn==`string`?e.prefetchOn===t:e.prefetchOn?.[t]??a.prefetchOn?.[t])&&(e.prefetch??a.prefetch)!==!1&&e.noPrefetch!==!0&&e.target!==`_blank`&&!A()}async function N(e=c()){if(D.value)return;D.value=!0;let t=typeof m.value==`string`?m.value:x.value?d(m.value):p.resolve(m.value).fullPath,n=x.value?new URL(t,window.location.href).href:t;await Promise.all([e.hooks.callHook(`link:prefetch`,n).catch(()=>{}),!x.value&&!C.value&&r(m.value,p).catch(()=>{})])}if(M(`visibility`)){let e=c(),t,r=null;y(()=>{let i=O();l(()=>{t=n(()=>{k?.value?.tagName&&(r=i.observe(k.value,async()=>{r?.(),r=null,await N(e)}))})})}),s(()=>{t&&u(t),r?.(),r=null})}return()=>{if(!x.value&&!C.value&&!g(m.value)){let n={ref:j,to:m.value,activeClass:e.activeClass||a.activeClass,exactActiveClass:e.exactActiveClass||a.exactActiveClass,replace:e.replace,ariaCurrentValue:e.ariaCurrentValue,custom:e.custom};return e.custom||(M(`interaction`)&&(n.onPointerenter=N.bind(null,void 0),n.onFocus=N.bind(null,void 0)),D.value&&(n.class=e.prefetchedClass||a.prefetchedClass),n.rel=e.rel||void 0),t(o(`RouterLink`),n,i.default)}let n=e.target||null,r=w(e.noRel?``:e.rel,a.externalRelAttribute,E.value||C.value?`noopener noreferrer`:``)||null;return e.custom?i.default?i.default({href:_.value,navigate:v,prefetch:N,get route(){if(!_.value)return;let e=new URL(_.value,window.location.href);return{path:e.pathname,fullPath:e.pathname,get query(){return S(e.search)},hash:e.hash,params:{},name:void 0,matched:[],redirectedFrom:void 0,meta:{},href:_.value}},rel:r,target:n,isExternal:x.value||C.value,isActive:!1,isExactActive:!1}):null:t(`a`,{ref:k,href:_.value||null,rel:r,target:n,onClick:t=>{if(!(x.value||C.value))return t.preventDefault(),e.replace?p.replace(_.value):p.push(_.value)}},i.default?.())}}})}var E=T(g);function D(e,t){let n=t===`append`?v:p;return C(e)&&!e.startsWith(`http`)?e:n(e,!0)}function O(){let e=c();if(e._observer)return e._observer;let t=null,n=new Map;return e._observer={observe:(e,r)=>(t||=new IntersectionObserver(e=>{for(let t of e){let e=n.get(t.target);(t.isIntersecting||t.intersectionRatio>0)&&e&&e()}}),n.set(e,r),t.observe(e),()=>{n.delete(e),t?.unobserve(e),n.size===0&&(t?.disconnect(),t=null)})}}var k=/2g/;function A(){let e=navigator.connection;return!!(e&&(e.saveData||k.test(e.effectiveType)))}export{E as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{$t as e,Qt as t,Wt as n,ft as r,rn as i}from"#entry";var a=0,o=e(new Map);const s=r(()=>Array.from(o.values()).flat());function c(e){let r=i(e),s=()=>{};function c(e){s();let t=a++;return o.set(t,e),s=()=>{o.delete(t)},t}return n(r,e=>{c(e)},{immediate:!0}),t(()=>{s()}),()=>{s()}}export{c as n,s as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{gt as e,jt as t,k as n,pt as r,q as i,qt as a,un as o,vt as s,yt as c}from"#entry";import{t as l}from"./Bjr51Ks8.js";var u={class:`antialiased bg-white dark:bg-[#020420] dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-[#020420] tracking-wide`},d={class:`max-w-520px text-center`},f=[`textContent`],p=[`textContent`],m=[`textContent`],h={class:`flex items-center justify-center w-full`},g={__name:`error-404`,props:{appName:{type:String,default:`Nuxt`},statusCode:{type:Number,default:404},statusMessage:{type:String,default:`Page not found`},description:{type:String,default:`Sorry, the page you are looking for could not be found.`},backHome:{type:String,default:`Go back home`}},setup(n){let g=n;return i({title:`${g.statusCode} - ${g.statusMessage} | ${g.appName}`,script:[{innerHTML:`!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))r(e);new MutationObserver(e=>{for(const o of e)if("childList"===o.type)for(const e of o.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&r(e)}).observe(document,{childList:!0,subtree:!0})}function r(e){if(e.ep)return;e.ep=!0;const r=function(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?r.credentials="include":"anonymous"===e.crossOrigin?r.credentials="omit":r.credentials="same-origin",r}(e);fetch(e.href,r)}}();`}],style:[{innerHTML:`*,:after,:before{border-color:var(--un-default-border-color,#e5e7eb);border-style:solid;border-width:0;box-sizing:border-box}:after,:before{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}h1,h2{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}h1,h2,p{margin:0}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }`}]}),(i,g)=>{let _=l;return t(),e(`div`,u,[r(`div`,d,[r(`h1`,{class:`font-semibold leading-none mb-4 sm:text-[110px] tabular-nums text-[80px]`,textContent:o(n.statusCode)},null,8,f),r(`h2`,{class:`font-semibold mb-2 sm:text-3xl text-2xl`,textContent:o(n.statusMessage)},null,8,p),r(`p`,{class:`mb-4 px-2 text-[#64748B] text-md`,textContent:o(n.description)},null,8,m),r(`div`,h,[c(_,{to:`/`,class:`font-medium hover:text-[#00DC82] text-sm underline underline-offset-3`},{default:a(()=>[s(o(n.backHome),1)]),_:1})])])])}}},_=n(g,[[`__scopeId`,`data-v-a8693205`]]);export{_ as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{D as e,Dt as t,Ft as n,T as r,X as i,bt as a,ft as o,gt as s,ht as c,jt as l,mt as u,on as d,pt as f,qt as p,s as m,sn as h,un as g,ut as _,vt as v,yt as y}from"#entry";import{t as b}from"./Bjr51Ks8.js";import"./CQNn9qP2.js";import"./BO9hKuA-.js";import{r as x}from"./BQ-NBLhA.js";import{t as S}from"./pXptjyzi.js";import{t as C}from"./D_Sk_I-u.js";import{t as w}from"./IrMnfQaU.js";import{t as T}from"./BjbaCuBE.js";var E={op50:``,"font-mono":``,w12:``},D=[`title`],O={flex:`~ gap-1 items-center`},k=a({__name:`Graph`,props:{session:{},chunks:{}},setup(e){let n=e,r=o(()=>n.chunks),a=i();return w({modules:r,spacing:{width:320,height:55,linkOffset:15,margin:120,gap:80},generateGraph:e=>{let{isFirstCalculateGraph:n,scale:i,spacing:a,tree:o,hierarchy:s,collapsedNodes:c,container:l,modulesMap:u,nodes:f,links:p,nodesMap:m,linksMap:h,width:g,height:_,childToParentMap:v}=e;return()=>{g.value=window.innerWidth,_.value=window.innerHeight;let e=s({module:{id:`~root`}},e=>`${e.module?.id}`==`~root`?(r.value.forEach(e=>{n.value&&v.set(e.id,`~root`)}),r.value.map(e=>({module:e,expanded:!c.has(e.id),hasChildren:!1}))):c.has(`${e.module?.id}`)||e.end?[]:e.module.imports.map(t=>{let r=u.value.get(`${t.chunk_id}`);if(r)return n.value&&v.set(r.id,e.module.id),{module:r,import:t,expanded:!c.has(r.id),hasChildren:!1,end:!0}}).filter(e=>e!==void 0));n.value&&=!1,o().nodeSize([d(a.height),d(a.width)+d(a.gap)])(e);let y=e.descendants();for(let e of y)[e.x,e.y]=[e.y-d(a.width),e.x],e.data.module.imports&&(e.data.hasChildren=e.data.module.imports.length>0&&!e.data.end);let b=Math.min(...y.map(e=>e.x)),x=Math.min(...y.map(e=>e.y));if(b<d(a.margin))for(let e of y)e.x+=Math.abs(b)+d(a.margin);if(x<d(a.margin))for(let e of y)e.y+=Math.abs(x)+d(a.margin);f.value=y,m.clear();for(let e of y)m.set(`${e.data.module.id}`,e);let S=e.links().filter(e=>`${e.source.data.module.id}`!=`~root`).map(e=>({...e,import:e.source.data.import,id:`${e.source.data.module.id}|${e.target.data.module.id}`}));h.clear();for(let e of S)h.set(e.id,e);p.value=S,t(()=>{g.value=l.value.scrollWidth/i.value+d(a.margin),_.value=l.value.scrollHeight/i.value+d(a.margin)})}}}),(t,n)=>{let i=x,o=b,s=T;return l(),u(s,{session:e.session,modules:r.value},{default:p(({node:e})=>[y(o,{class:`flex items-center`,to:{path:d(a).path,query:{chunk:e.data.module.chunk_id}}},{default:p(()=>[f(`span`,E,`#`+g(e.data.module.id),1),f(`div`,{flex:`~ gap-2 items-center`,title:`Chunk #${e.data.module.id}`},[n[0]||=f(`div`,{"i-ph-shapes-duotone":``},null,-1),f(`div`,null,g(e.data.module.name||`[unnamed]`),1),y(i,{text:e.data.module.reason},null,8,[`text`])],8,D),n[2]||=f(`div`,{"flex-auto":``},null,-1),f(`div`,O,[n[1]||=f(`div`,{"i-ph-package-duotone":``},null,-1),v(` `+g(e.data.module.modules.length),1)])]),_:2},1032,[`to`])]),_:1},8,[`session`,`modules`])}}}),A=Object.assign(k,{__name:`ChunksGraph`}),j={key:1,relative:``,"max-h-screen":``,"of-hidden":``},M={absolute:``,"left-4":``,"top-4":``,"z-panel-nav":``},N={flex:`~ gap-2 items-center`,p2:``,border:`~ base rounded-xl`,"bg-glass":``},P=[`onClick`],F={key:0,class:`px5 pt24 of-auto h-screen`,flex:`~ col gap-4`},I=a({__name:`chunks`,props:{session:{}},setup(t){let i=t,a=[{label:`List`,value:`list`,icon:`i-carbon-list`},{label:`Graph`,value:`graph`,icon:`i-ph-graph-duotone`}],p=r(),{state:y,isLoading:b}=m(async()=>await p.value[`vite:rolldown:get-chunks-graph`]?.({session:i.session.id}),null),x=o(()=>y.value?.map(e=>({...e,id:`${e.chunk_id}`}))??[]);function w(e){C.value.chunkViewType=e}return(r,i)=>{let o=e,p=S,m=A;return d(b)?(l(),u(o,{key:0})):(l(),s(`div`,j,[f(`div`,M,[f(`div`,N,[i[0]||=f(`span`,{op50:``,pl2:``,"text-sm":``},`View as`,-1),(l(),s(_,null,n(a,e=>f(`button`,{key:e.value,"btn-action":``,class:h(d(C).chunkViewType===e.value?`bg-active`:`grayscale op50`),onClick:t=>w(e.value)},[f(`div`,{class:h(e.icon)},null,2),v(` `+g(e.label),1)],10,P)),64))])]),d(C).chunkViewType===`list`?(l(),s(`div`,F,[(l(!0),s(_,null,n(d(y),e=>(l(),u(p,{key:e.id,border:`~ base rounded-lg`,p3:``,chunk:e,session:t.session},null,8,[`chunk`,`session`]))),128))])):d(C).chunkViewType===`graph`?(l(),u(m,{key:1,session:t.session,chunks:x.value},null,8,[`session`,`chunks`])):c(``,!0)]))}}});export{I as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"#entry";var t;(class{static{t=Symbol.toStringTag}constructor(){this[t]=`MaybeWeakMap`,this._map=new Map,this._weakMap=new WeakMap}delete(e){return this._weakMap.has(e)?this._weakMap.delete(e):this._map.delete(e)}has(e){return this._weakMap.has(e)?!0:this._map.has(e)}set(e,t){return this._weakMap.has(e)?this._weakMap.set(e,t):this._map.set(e,t),this}get(e){return this._weakMap.has(e)?this._weakMap.get(e):this._map.get(e)}clear(){this._map.clear()}});var n=class{constructor(e){this.length=e,this._mapTree=new Map}_getLastMap(e){let t=this._mapTree;for(let n of e.slice(0,-1))t.has(n)||t.set(n,new Map),t=t.get(n);return t}set(e,t){if(e.length!==this.length)throw Error(`Expect tuple of length ${this.length}, got ${e.length}`);return this._getLastMap(e).set(e[e.length-1],t),this}get(e){return this._getLastMap(e).get(e[e.length-1])}clear(){this._mapTree.clear()}delete(e){return this._getLastMap(e).delete(e[e.length-1])}get size(){return this._mapTree.size}*_traverseMap(){function*e(t,n,r){if(r===0)yield{keys:n,map:t};else for(let[i,a]of t.entries())yield*e(a,[...n,i],r-1)}yield*e(this._mapTree,[],this.length)}},r=class{constructor(){this._lengthMap=new Map}get(e){let t=e.length;return this._lengthMap.get(t)?.get(e)}set(e,t){let r=e.length,i=this._lengthMap.get(r);return i||(i=new n(r),this._lengthMap.set(r,i)),i.set(e,t),this}delete(e){let t=e.length;return this._lengthMap.get(t)?.delete(e)??!1}clear(){this._lengthMap.clear()}};function i(e){let t=new r,n=function(...n){let r=t.get(n);return r||(r=e(...n),t.set(n,r),r)};return n.cache=t,n}const a=[{match:/[\\/]node_modules[\\/]/i,name:`node_modules`,description:`Node Modules`,icon:`i-catppuccin-npm`},{match:/virtual:|^\0/,name:`virtual`,description:`Virtual`,icon:`i-catppuccin-symlink`},{match:/^@?[\w-]+\/?/,name:`package`,description:`Package`,icon:`i-catppuccin-java-class-abstract`},{match:/\.vue$/i,name:`vue`,description:`Vue`,icon:`i-catppuccin-vue`},{match:/\.[cm]?[tj]sx$/i,name:`jsx`,description:`JavaScript React`,icon:`i-catppuccin-javascript-react`},{match:/\.[cm]?ts$/i,name:`ts`,description:`TypeScript`,icon:`i-catppuccin-typescript`},{match:/\.[cm]?js$/i,name:`js`,description:`JavaScript`,icon:`i-catppuccin-javascript`},{match:/\.svelte$/i,name:`svelte`,description:`Svelte`,icon:`i-catppuccin-svelte`},{match:/\.mdx$/i,name:`mdx`,description:`MDX`,icon:`i-catppuccin-mdx`},{match:/\.md$/i,name:`md`,description:`Markdown`,icon:`i-catppuccin-markdown`},{match:/\.astro$/i,name:`astro`,description:`Astro`,icon:`i-catppuccin-astro`},{match:/\.angular$/i,name:`angular`,description:`Angular`,icon:`i-catppuccin-angular`},{match:/\.html?$/i,name:`html`,description:`HTML`,icon:`i-catppuccin-html`},{match:/\.(css|scss|less|postcss)$/i,name:`css`,description:`CSS`,icon:`i-catppuccin-css`},{match:/\.json[c5]?$/i,name:`json`,description:`JSON`,icon:`i-catppuccin-json`},{match:/\.(yaml|yml)$/i,name:`yaml`,description:`YAML`,icon:`i-catppuccin-yaml`},{match:/\.toml$/i,name:`toml`,description:`TOML`,icon:`i-catppuccin-toml`},{match:/\.svg$/i,name:`svg`,description:`SVG`,icon:`i-catppuccin-svg`}],o=[{match:/^(replace|define|alias)$/,name:`rollup`,description:`Rollup`,icon:`i-catppuccin-rollup`},{match:/^vite:/i,name:`vite`,description:`Vite`,icon:`i-catppuccin-vite`},{match:/^unocss:/i,name:`unocss`,description:`Unocss`,icon:`i-catppuccin-unocss`},{match:/^nuxt:/i,name:`nuxt`,description:`Nuxt`,icon:`i-catppuccin-nuxt`},{match:/^builtin:/i,name:`builtin`,description:`Builtin`,icon:`i-catppuccin-folder-prisma`}],s={name:`file`,match:/.*/,description:`File`,icon:`i-catppuccin-file`},c={name:`plugin`,match:/.*/,description:`User Plugins`,icon:`i-catppuccin-folder-plugins`};function l(e){return a.find(t=>t.name===e)??s}const u=i(e=>{e=e.replace(/(\?|&)v=[^&]*/,`$1`).replace(/\?$/,``);for(let t of a)if(t.match.test(e))return t;return s}),d=i(e=>{for(let t of o)if(t.match.test(e))return t;return c});function f(e,t=1){let n=0;for(let t=0;t<e.length;t++)n=e.charCodeAt(t)+((n<<5)-n);let r=n%360;return p(r,t)}function p(t,n=1){let r=e.value?50:65,i=e.value?60:40;return`hsla(${t}, ${r}%, ${i}%, ${n})`}const m={error:0,client:60,bailout:-1,ssr:270,vite:250,vite1:240,vite2:120,virtual:160,nuxt:140};function h(e,t=1){if(e=e.replace(/[^a-z]+/gi,``).toLowerCase(),e in m){let n=m[e];if(typeof n==`number`)return p(n,t);{if(t===1)return n;let e=Math.floor(t*255).toString(16).padStart(2,`0`);return n+e}}return f(e,t)}export{a,l as c,c as i,d as l,p as n,o,h as r,u as s,f as t,i as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{B as e,F as t,I as n,It as r,L as i,N as a,P as o,R as s,Ut as c,V as l,Wt as u,bt as d,dt as f,en as p,in as m,jt as h,ln as g,mt as _,pt as v,z as y}from"#entry";function b(){return typeof window<`u`}function x(e){return ee(e)?(e.nodeName||``).toLowerCase():`#document`}function S(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function C(e){return((ee(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function ee(e){return b()?e instanceof Node||e instanceof S(e).Node:!1}function w(e){return b()?e instanceof Element||e instanceof S(e).Element:!1}function T(e){return b()?e instanceof HTMLElement||e instanceof S(e).HTMLElement:!1}function te(e){return!b()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof S(e).ShadowRoot}var ne=new Set([`inline`,`contents`]);function E(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=A(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!ne.has(i)}var re=new Set([`table`,`td`,`th`]);function ie(e){return re.has(x(e))}var ae=[`:popover-open`,`:modal`];function D(e){return ae.some(t=>{try{return e.matches(t)}catch{return!1}})}var oe=[`transform`,`translate`,`scale`,`rotate`,`perspective`],se=[`transform`,`translate`,`scale`,`rotate`,`perspective`,`filter`],ce=[`paint`,`layout`,`strict`,`content`];function O(e){let t=ue(),n=w(e)?A(e):e;return oe.some(e=>n[e]?n[e]!==`none`:!1)||(n.containerType?n.containerType!==`normal`:!1)||!t&&(n.backdropFilter?n.backdropFilter!==`none`:!1)||!t&&(n.filter?n.filter!==`none`:!1)||se.some(e=>(n.willChange||``).includes(e))||ce.some(e=>(n.contain||``).includes(e))}function le(e){let t=M(e);for(;T(t)&&!k(t);){if(O(t))return t;if(D(t))return null;t=M(t)}return null}function ue(){return typeof CSS>`u`||!CSS.supports?!1:CSS.supports(`-webkit-backdrop-filter`,`none`)}var de=new Set([`html`,`body`,`#document`]);function k(e){return de.has(x(e))}function A(e){return S(e).getComputedStyle(e)}function j(e){return w(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function M(e){if(x(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||te(e)&&e.host||C(e);return te(t)?t.host:t}function fe(e){let t=M(e);return k(t)?e.ownerDocument?e.ownerDocument.body:e.body:T(t)&&E(t)?t:fe(t)}function N(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=fe(e),i=r===e.ownerDocument?.body,a=S(r);if(i){let e=P(a);return t.concat(a,a.visualViewport||[],E(r)?r:[],e&&n?N(e):[])}return t.concat(r,N(r,[],n))}function P(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function pe(e){let t=A(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=T(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=l(n)!==a||l(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function me(e){return w(e)?e:e.contextElement}function F(e){let t=me(e);if(!T(t))return i(1);let n=t.getBoundingClientRect(),{width:r,height:a,$:o}=pe(t),s=(o?l(n.width):n.width)/r,c=(o?l(n.height):n.height)/a;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}var he=i(0);function ge(e){let t=S(e);return!ue()||!t.visualViewport?he:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function _e(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==S(e)?!1:t}function I(t,n,r,a){n===void 0&&(n=!1),r===void 0&&(r=!1);let o=t.getBoundingClientRect(),s=me(t),c=i(1);n&&(a?w(a)&&(c=F(a)):c=F(t));let l=_e(s,r,a)?ge(s):i(0),u=(o.left+l.x)/c.x,d=(o.top+l.y)/c.y,f=o.width/c.x,p=o.height/c.y;if(s){let e=S(s),t=a&&w(a)?S(a):a,n=e,r=P(n);for(;r&&a&&t!==n;){let e=F(r),t=r.getBoundingClientRect(),i=A(r),a=t.left+(r.clientLeft+parseFloat(i.paddingLeft))*e.x,o=t.top+(r.clientTop+parseFloat(i.paddingTop))*e.y;u*=e.x,d*=e.y,f*=e.x,p*=e.y,u+=a,d+=o,n=S(r),r=P(n)}}return e({width:f,height:p,x:u,y:d})}function L(e,t){let n=j(e).scrollLeft;return t?t.left+n:I(C(e)).left+n}function ve(e,t){let n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-L(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function ye(e){let{elements:t,rect:n,offsetParent:r,strategy:a}=e,o=a===`fixed`,s=C(r),c=t?D(t.floating):!1;if(r===s||c&&o)return n;let l={scrollLeft:0,scrollTop:0},u=i(1),d=i(0),f=T(r);if((f||!f&&!o)&&((x(r)!==`body`||E(s))&&(l=j(r)),T(r))){let e=I(r);u=F(r),d.x=e.x+r.clientLeft,d.y=e.y+r.clientTop}let p=s&&!f&&!o?ve(s,l):i(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+d.x+p.x,y:n.y*u.y-l.scrollTop*u.y+d.y+p.y}}function be(e){return Array.from(e.getClientRects())}function xe(e){let t=C(e),n=j(e),r=e.ownerDocument.body,i=s(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=s(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+L(e),c=-n.scrollTop;return A(r).direction===`rtl`&&(o+=s(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:c}}var Se=25;function Ce(e,t){let n=S(e),r=C(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=ue();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=L(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=Se&&(a-=o)}else l<=Se&&(a+=l);return{width:a,height:o,x:s,y:c}}var we=new Set([`absolute`,`fixed`]);function Te(e,t){let n=I(e,!0,t===`fixed`),r=n.top+e.clientTop,a=n.left+e.clientLeft,o=T(e)?F(e):i(1),s=e.clientWidth*o.x,c=e.clientHeight*o.y,l=a*o.x,u=r*o.y;return{width:s,height:c,x:l,y:u}}function Ee(t,n,r){let i;if(n===`viewport`)i=Ce(t,r);else if(n===`document`)i=xe(C(t));else if(w(n))i=Te(n,r);else{let e=ge(t);i={x:n.x-e.x,y:n.y-e.y,width:n.width,height:n.height}}return e(i)}function De(e,t){let n=M(e);return n===t||!w(n)||k(n)?!1:A(n).position===`fixed`||De(n,t)}function Oe(e,t){let n=t.get(e);if(n)return n;let r=N(e,[],!1).filter(e=>w(e)&&x(e)!==`body`),i=null,a=A(e).position===`fixed`,o=a?M(e):e;for(;w(o)&&!k(o);){let t=A(o),n=O(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&we.has(i.position)||E(o)&&!n&&De(e,o))?r=r.filter(e=>e!==o):i=t,o=M(o)}return t.set(e,r),r}function ke(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?D(t)?[]:Oe(t,this._c):[].concat(n),r],o=a[0],c=a.reduce((e,n)=>{let r=Ee(t,n,i);return e.top=s(r.top,e.top),e.right=y(r.right,e.right),e.bottom=y(r.bottom,e.bottom),e.left=s(r.left,e.left),e},Ee(t,o,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Ae(e){let{width:t,height:n}=pe(e);return{width:t,height:n}}function je(e,t,n){let r=T(t),a=C(t),o=n===`fixed`,s=I(e,!0,o,t),c={scrollLeft:0,scrollTop:0},l=i(0);function u(){l.x=L(a)}if(r||!r&&!o)if((x(t)!==`body`||E(a))&&(c=j(t)),r){let e=I(t,!0,o,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else a&&u();o&&!r&&a&&u();let d=a&&!r&&!o?ve(a,c):i(0),f=s.left+c.scrollLeft-l.x-d.x,p=s.top+c.scrollTop-l.y-d.y;return{x:f,y:p,width:s.width,height:s.height}}function R(e){return A(e).position===`static`}function Me(e,t){if(!T(e)||A(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return C(e)===n&&(n=n.ownerDocument.body),n}function Ne(e,t){let n=S(e);if(D(e))return n;if(!T(e)){let t=M(e);for(;t&&!k(t);){if(w(t)&&!R(t))return t;t=M(t)}return n}let r=Me(e,t);for(;r&&ie(r)&&R(r);)r=Me(r,t);return r&&k(r)&&R(r)&&!O(r)?n:r||le(e)||n}var Pe=async function(e){let t=this.getOffsetParent||Ne,n=this.getDimensions,r=await n(e.floating);return{reference:je(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Fe(e){return A(e).direction===`rtl`}var Ie={convertOffsetParentRelativeRectToViewportRelativeRect:ye,getDocumentElement:C,getClippingRect:ke,getOffsetParent:Ne,getElementRects:Pe,getClientRects:be,getDimensions:Ae,getScale:F,isElement:w,isRTL:Fe},Le=t,Re=n,ze=o,Be=(e,t,n)=>{let r=new Map,i={platform:Ie,...n},o={...i.platform,_c:r};return a(e,t,{...i,platform:o})},Ve=d({__name:`GraphHoverView`,props:{hoverX:{},hoverY:{}},setup(e){let{hoverX:t,hoverY:n}=m(e),i=c(`hoverElement`),a=p(0),o=p(0);return u([t,n],([e,t])=>{Be({getBoundingClientRect(){return{width:0,height:0,x:e,y:t,left:e,right:e,top:t,bottom:t}}},i.value,{placement:`right-start`,middleware:[ze(),Re(),Le({mainAxis:8,alignmentAxis:8})]}).then(({x:e,y:t})=>{a.value=e,o.value=t})}),(e,t)=>(h(),_(f,{to:`body`},[v(`div`,{ref_key:`hoverElement`,ref:i,fixed:``,"z-panel-content":``,style:g({left:`${a.value}px`,top:`${o.value}px`})},[r(e.$slots,`default`)],4)]))}}),He=Object.assign(Ve,{__name:`DisplayGraphHoverView`});function Ue(e,t=1,n=1){let r=(.6+.4*Math.max(0,Math.cos(e)))*t,i=(.5+.2*Math.max(0,Math.cos(e+Math.PI*2/3)))*n;return`hsl(${e*180/Math.PI}deg, ${Math.round(100*r)}%, ${Math.round(100*i)}%)`}var We,Ge,Ke,z,B,V=1,H;function U(e,t,n,r,i){if(!Array.isArray(e))return e;let a=window.devicePixelRatio||1;if(We!==t||Ge!==a||Ke!==i){let n=Math.round(64*a)/64;V=i,V=Math.log2(V),V-=Math.floor(V);let r=V,o=Math.min(1,8*r);V=2**V;let s=8*Math.SQRT2/V;We=t,Ge=a,Ke=i,z||=document.createElement(`canvas`),B||=z.getContext(`2d`),z.width=z.height=Math.round(64*n),B.scale(n,n),B.fillStyle=e[0],B.fillRect(0,0,64,64),B.globalAlpha=.25,B.fillStyle=e[1],B.fillRect(0,0,64,64),B.globalAlpha=.67,B.strokeStyle=e[1],B.beginPath();for(let e=0;e<=64;e+=16)B.moveTo(e-32,e+32),B.lineTo(e+32,e-32);if(B.lineWidth=s*(1-(o-r)/2),B.stroke(),o+r>0){B.beginPath();for(let e=8;e<64;e+=16)B.moveTo(e-32,e+32),B.lineTo(e+32,e-32);B.lineWidth=s*(o+r)/2,B.stroke()}H=t.createPattern(z,`repeat`),V/=n}return n/=64*V*a,n-=Math.floor(n),n*=64*V*a,H.setTransform(new DOMMatrix([V,0,0,V,n,r])),H}function qe(e){return Array.isArray(e)?`url('data:image/svg+xml,<svg width="26" height="26" xmlns="http://www.w3.org/2000/svg"><rect width="26" height="26" fill="${e[0]}"/><rect width="26" height="26" fill="${e[1]}" fill-opacity="25%"/><path d="M22.5 -3.5L-3.5 22.5M35.5 9.5L9.5 35.5" stroke="${e[1]}" stroke-opacity="67%" stroke-width="9.19239"/></svg>')`:e}function Je(e){return t=>t.id&&e[t.id]||t.color}function Ye(e,t=1,n=1){let r={};return Xe(r,e,0,Math.PI*2,t,n),Je(r)}function Xe(e,t,n,r,i=1,a=1){let o=t.size;e[t.id]=Ue(n+r/2,i,a);for(let s of t.children){let t=s.size/o*r;Xe(e,s,n,t,i,a),n+=t}}var Ze=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function Qe(e=16,t=Ze){let n=``,r=e,i=t.length;for(;r--;)n+=t[Math.random()*i|0];return n}function $e(e,t,n=(e,t)=>t.size-e.size){if(e.__nanovis)return e;let r={...e};return r.id||=Qe(),r.parent||=t,r.children||=[],r.sizeSelf==null&&r.size!=null&&r.children.length===0?r.sizeSelf=r.size:r.sizeSelf||=0,r.children=(r.children||[]).map(e=>$e(e,r,n)),r.size||=r.children.reduce((e,t)=>e+t.size,0)+r.sizeSelf,n&&r.children.sort(n),Object.defineProperty(r,`__nanovis`,{enumerable:!1,value:!0}),r}function et(e){return e.children.length===0?1:Math.max(...e.children.map(e=>et(e)))+1}var tt=/\bFirefox\//.test(navigator.userAgent),W;function nt(e){return W?W.format(e):`${e}`}function G(){return(window.performance||Date).now()}function K(e){let t=e.toFixed(1).split(`.`,2);return`${nt(+t[0])}.${t[1]}`}function rt(e){return e===1?`1 byte`:e<1024?`${nt(e)} bytes`:e<1024*1024?`${K(e/1024)} kb`:e<1024*1024*1024?`${K(e/(1024*1024))} mb`:`${K(e/(1024*1024*1024))} gb`}function it(e,t,n,r,i,a){if(tt){let o=e.lineWidth,s=o/2;e.fillStyle=t,e.fillRect(n-s,r-s,i+o,o),e.fillRect(n-s,r+s,o,a-o),e.fillRect(n-s,r+a-s,i+o,o),e.fillRect(n+i-s,r+s,o,a-o);return}e.strokeStyle=t,e.strokeRect(n,r,i,a)}function at(e){return window.addEventListener(`wheel`,e,{passive:!1}),()=>window.removeEventListener(`wheel`,e)}function ot(e){return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)}try{W=new Intl.NumberFormat}catch{}var st=()=>({emit(e,...t){for(let n=this.events[e]||[],r=0,i=n.length;r<i;r++)n[r](...t)},events:{},on(e,t){return(this.events[e]||=[]).push(t),()=>{this.events[e]=this.events[e]?.filter(e=>t!==e)}}}),q={getText:e=>e.text,getSubtext:e=>e.subtext,animate:!0,animateDuration:350},ct={fallback:`#CCC`,stroke:`#0008`,text:`#222`,hover:`#fff5`,shadow:`#0008`,fg:`#fff`,bg:`#222`},lt=46,J=`14px sans-serif`,ut=`bold ${J}`,dt=class{el;canvas;c;width=0;height=0;ratio=1;root;maxDepth;events;options;palette;disposables;getColor;getText;getSubtext;_animationFrame=null;constructor(e,t){this.options={...q,...t};let{getColor:n=Ye(e),getText:r=()=>void 0,getSubtext:i=()=>void 0}=this.options;this.palette={...ct,...t.palette},this.el=document.createElement(`div`),this.canvas=document.createElement(`canvas`),this.c=this.canvas.getContext(`2d`),this.root=e,this.maxDepth=et(e),this.disposables=[],this.events=st(),this.getColor=n,this.getText=r,this.getSubtext=i,this.setFont(J),t.onClick&&this.events.on(`click`,t.onClick),t.onHover&&this.events.on(`hover`,t.onHover),t.onLeave&&this.events.on(`leave`,t.onLeave),t.onSelect&&this.events.on(`select`,t.onSelect),this.el.addEventListener(`mouseleave`,()=>{this.events.emit(`leave`)})}invalidate(){this._animationFrame===null&&(this._animationFrame=requestAnimationFrame(()=>{this._animationFrame=null,this.tick()}))}tick(){this.draw()}draw(){}resize(){this.ratio=window.devicePixelRatio||1,this.canvas.style.width=`${this.width}px`,this.canvas.style.height=`${this.height}px`,this.canvas.width=Math.round(this.width*this.ratio),this.canvas.height=Math.round(this.height*this.ratio),this.c.scale(this.ratio,this.ratio),this.draw()}select(e,t){this.events.emit(`select`,e)}dispose(){this.disposables.forEach(e=>e()),this.disposables.length=0,this.el.remove()}[Symbol.dispose](){this.dispose()}_font=`14px sans-serif`;_fontWidthCache=new Map;ellipsisWidth=0;getFontCache(){return this._fontWidthCache.has(this._font)||this._fontWidthCache.set(this._font,{}),this._fontWidthCache.get(this._font)}setFont(e){this._font=e,this.c.font=e,this.c.textBaseline=`middle`,this.ellipsisWidth=3*this.charCodeWidth(lt)}charCodeWidth(e){let t=this.getFontCache(),n=t[e];return n===void 0&&(n=this.c.measureText(String.fromCharCode(e)).width,t[e]=n),n}textOverflowEllipsis(e,t){if(t<this.ellipsisWidth)return[``,0];let n=0,r=e.length,i=0;for(;i<r;){let r=this.charCodeWidth(e.charCodeAt(i));if(t<n+this.ellipsisWidth+r)return[`${e.slice(0,i)}...`,n+this.ellipsisWidth];n+=r,i++}return[e,n]}},Y=24,ft=5,pt=.01,mt=1e3,ht=class extends dt{mainEl=document.createElement(`div`);totalBytes;viewportMin;viewportMax;zoomedOutMin=0;zoomedOutWidth=0;prevWheelTime=0;prevWheelWasZoom=!1;stripeScaleAdjust=1;hoveredNode=null;selectedNode=null;nodeStartBytes=new Map;animationFromMin=0;animationFromMax=0;animationToMin=0;animationToMax=0;animationStart=0;constructor(e,t={}){super(e,t),this.totalBytes=e.size,this.viewportMin=this.animationFromMin=this.animationToMin=0,this.viewportMax=this.animationFromMax=this.animationToMax=this.totalBytes,Object.assign(this.mainEl.style,{position:`relative`}),Object.assign(this.canvas.style,{position:`absolute`,left:`0`,top:`0`});let n=!1;this.canvas.onmousedown=e=>{if(n=!1,e.button!==2){let t=e.pageX,r=e=>{let r=e.pageX-t;!n&&Math.abs(r)<3||(n=!0,this.modifyViewport(-r,0,null),t=e.pageX)},i=()=>{document.removeEventListener(`mousemove`,r),document.removeEventListener(`mouseup`,i)};e.preventDefault(),document.addEventListener(`mousemove`,r),document.addEventListener(`mouseup`,i)}},this.canvas.onmousemove=e=>{this.updateHover(e)},this.canvas.onmouseout=()=>{this.changeHoveredNode(null)},this.canvas.onclick=e=>{if(n)return;let t=this.hitTestNode(e);this.changeHoveredNode(t),this.changeSelectedNode(t),t&&this.events.emit(`click`,t,e)},this.disposables.push(at(e=>{let t=e.deltaX,n=e.deltaY,r=G(),i=r-this.prevWheelTime<50?this.prevWheelWasZoom:e.ctrlKey||e.metaKey;this.prevWheelTime=r,this.prevWheelWasZoom=i,(i||Math.abs(t)>=Math.abs(n))&&e.preventDefault(),this.modifyViewport(t,n,i?e.pageX:null),this.updateHover(e)})),this.resize(),Promise.resolve().then(()=>this.resize()),this.disposables.push(ot(()=>this.resize())),this.mainEl.append(this.canvas),this.el.append(this.mainEl)}tick(){let e=(G()-this.animationStart)/(this.options.animateDuration??q.animateDuration);e<0||e>1?(e=1,this.viewportMin=this.animationToMin,this.viewportMax=this.animationToMax):(e<.5?e*=4*e*e:(e=1-e,e*=4*e*e,e=1-e),this.viewportMin=this.animationFromMin+(this.animationToMin-this.animationFromMin)*e,this.viewportMax=this.animationFromMax+(this.animationToMax-this.animationFromMax)*e,this.invalidate()),this.draw()}draw(){this.c.clearRect(0,0,this.width,this.height),this.drawNode(this.root,0,0,-1/0,1)}changeSelectedNode(e,t=this.options.animate??q.animate){if(this.selectedNode!==e&&(this.selectedNode=e,this.events.emit(`select`,e),e&&this.nodeStartBytes.has(e.id))){let n=this.nodeStartBytes.get(e.id),r=n+e.size;n=Math.max(0,n-e.size*pt),r=Math.min(this.totalBytes,r+e.size*pt),this.setViewport(n,r,t)}}select(e,t=this.options.animate??q.animate){this.changeSelectedNode(e,t)}resize(){this.width=this.el.clientWidth,this.height=this.maxDepth*Y+1,this.zoomedOutMin=this.width-mt>>1,this.zoomedOutWidth=this.zoomedOutMin+mt,this.zoomedOutMin<0&&(this.zoomedOutMin=0),this.zoomedOutWidth>this.width&&(this.zoomedOutWidth=this.width),this.zoomedOutWidth-=this.zoomedOutMin,this.stripeScaleAdjust=this.totalBytes/this.zoomedOutWidth,this.mainEl.style.height=`${this.height}px`,super.resize()}drawNode(e,t,n,r,i){this.nodeStartBytes.set(e.id,n);let a=this.zoomedOutWidth/(this.viewportMax-this.viewportMin),o=this.zoomedOutMin+(n-this.viewportMin)*a,s=e.size*a,c=o+s;if(c<r+1.5)return r;if(o+s<0||o>this.width)return c;let l=s<2?2:s,u=(o>0?o:0)+ft,d=t+Y/2,f=this.getText(e)||``,p=this.getSubtext(e)||``,m,h=0,g=s+o-u,_=U(this.getColor(e)||this.palette.fallback,this.c,this.zoomedOutMin-this.viewportMin*a,Y,a*this.stripeScaleAdjust),v=this.palette.text,y=-1/0;i&1?(v=this.palette.fg,this.setFont(ut)):(this.c.fillStyle=_,this.c.fillRect(o,t,l,Y),(i&2||this.hoveredNode&&e.id===this.hoveredNode.id)&&(this.c.fillStyle=this.palette.hover,this.c.fillRect(o,t,l,Y),i|=2)),this.ellipsisWidth<g&&(m=this.c.measureText(f).width,m<=g?h+=m:(f=this.textOverflowEllipsis(f,g)[0],h=g),this.c.fillStyle=v,this.c.fillText(f,u,d)),i&1&&this.setFont(J),h+this.ellipsisWidth<g&&(p&&f&&(p=` - ${p}`),m=this.c.measureText(p).width,h+m>g&&(p=this.textOverflowEllipsis(p,g-h)[0]),this.c.globalAlpha=.5,this.c.fillText(p,u+h,d),this.c.globalAlpha=1);for(let r of e.children)y=this.drawNode(r,t+Y,n,y,i&-2),n+=r.size;return i&1||it(this.c,this.palette.stroke,o+.5,t+.5,l,Y),c}changeHoveredNode(e){this.hoveredNode!==e&&(this.hoveredNode=e,this.canvas.style.cursor=e&&!e.children.length?`pointer`:`auto`,this.invalidate())}hitTestNode(e){let t=this.canvas.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top,i=this.viewportMin+(this.viewportMax-this.viewportMin)/this.zoomedOutWidth*(n-this.zoomedOutMin),a=(e,t,n)=>{if(i>=n&&i<n+e.size){if(r>=t&&r<t+Y&&e.id)return e;if(r>=t+Y)for(let r of e.children){let e=a(r,t+Y,n);if(e)return e;n+=r.size}}return null};return a(this.root,0,0)}modifyViewport(e,t,n){let r=this.viewportMin,i=this.viewportMax,a=0;if(n!==null){let e=r+(i-r)/this.zoomedOutWidth*(n-this.zoomedOutMin),a=1.01**t;r=e+(r-e)*a,i=e+(i-e)*a}else a=e*(i-r)/this.zoomedOutWidth;r+a<0?a=-r:i+a>this.totalBytes&&(a=this.totalBytes-i),r+=a,i+=a,r<0&&(r=0),i>this.totalBytes&&(i=this.totalBytes),this.setViewport(r,i,!1)}setViewport(e,t,n){this.animationFromMin=this.viewportMin,this.animationFromMax=this.viewportMax,this.animationToMin=e,this.animationToMax=t,n?this.animationStart=G():this.animationStart=0,this.invalidate()}updateHover(e){let t=this.hitTestNode(e);this.changeHoveredNode(t),this.events.emit(`hover`,t,e)}};function gt(e,t){for(;t;){if(t===e)return!0;t=t.parent}return!1}function _t(e,t,n){if(e===t)return;let r=t.parent,i=r.size||1,a=0;_t(e,r,n);for(let e of r.children){if(e===t){n.startAngle_+=n.sweepAngle_*a/i,n.sweepAngle_=e.size/i*n.sweepAngle_;break}a+=e.size}n.depth_+=1}var vt={};function yt(e){return vt[e]||(vt[e]=400*Math.log(1+Math.log(1+e/8))),vt[e]}var X=-Math.PI/2,bt=class extends dt{currentNode;hoveredNode;centerX=0;centerY=0;animationStart=0;radiusScale=1;sourceDepth=0;sourceStartAngle=X;sourceSweepAngle=Math.PI*2;targetNode;targetDepth=this.sourceDepth;targetStartAngle=this.sourceStartAngle;targetSweepAngle=this.sourceSweepAngle;animatedNode;animatedDepth=this.sourceDepth;animatedStartAngle=this.sourceStartAngle;animatedSweepAngle=this.sourceSweepAngle;previousHoveredNode;historyStack=[];constructor(e,t={}){for(;e.children.length===1;)e=e.children[0];super(e,t),this.currentNode=e,this.targetNode=this.currentNode,this.animatedNode=this.currentNode,this.canvas.onmousemove=e=>{this.handleMouseMove(e)},this.canvas.onmouseout=e=>{this.changeHoveredNode(void 0),this.events.emit(`hover`,null,e)},this.canvas.onclick=e=>{let t=this.hitTestNode(e);if(!t)return;this.events.emit(`click`,t,e);let n=[];t===this.animatedNode.parent?this.historyStack.length>0&&(t=this.historyStack.pop(),n=this.historyStack.slice()):n=this.historyStack.concat(this.currentNode),this.events.emit(`click`,t,e),t.children.length>0?(this.select(t),this.historyStack=n):e.preventDefault()},this.el.append(this.canvas),this.resize(),Promise.resolve().then(()=>this.resize()),this.disposables.push(ot(()=>this.resize())),this.disposables.push(at(e=>this.handleMouseMove(e)))}select(e,t){(this.currentNode!==e||this.root)&&(this.currentNode=e||this.root,this.updateSunburst(t),this.events.emit(`select`,e))}resize(){this.width=this.el.clientWidth,this.height=this.width,this.centerX=this.width>>1,this.centerY=this.height>>1;let e=2*Math.ceil(yt(this.maxDepth));this.radiusScale=this.width/e,super.resize()}draw(){this.c.clearRect(0,0,this.width,this.height),this.drawNode(this.animatedNode,this.animatedDepth,this.computeRadius(this.animatedDepth),this.animatedStartAngle,this.animatedSweepAngle,3,-1/0),this.c.strokeStyle=this.palette.stroke,this.c.beginPath(),this.drawNode(this.animatedNode,this.animatedDepth,this.computeRadius(this.animatedDepth),this.animatedStartAngle,this.animatedSweepAngle,1,-1/0),this.c.stroke(),this.animatedDepth===0&&(this.c.fillStyle=this.palette.stroke,this.setFont(ut),this.c.textAlign=`center`,this.c.fillText(rt(this.targetNode.size),this.centerX,this.centerY))}drawNode(e,t,n,r,i,a,o){let s=this.computeRadius(t+1);if(s>this.centerY)return o;e===this.hoveredNode&&(a|=8);let c=(n+s)/2,l=r+i;if(l-o<1.5/c)return o;let u=2/c;if(i>u&&(u=i),a&2)this.c.fillStyle=U(this.getColor(e)||this.palette.fallback,this.c,this.centerX,this.centerY,1),this.c.beginPath(),this.c.arc(this.centerX,this.centerY,n,r,r+u,!1),this.c.arc(this.centerX,this.centerY,s,r+u,r,!0),this.c.fill(),this.hoveredNode&&(a&8||e.parent===this.hoveredNode)&&(this.c.fillStyle=this.palette.hover,this.c.fill());else{let e=u===Math.PI*2,t=a&4||e?s:n;a&1&&n>0&&this.c.arc(this.centerX,this.centerY,n,r+u,r,!0),this.c.moveTo(this.centerX+t*Math.cos(r),this.centerY+t*Math.sin(r)),this.c.arc(this.centerX,this.centerY,s,r,r+u,!1),e||this.c.lineTo(this.centerX+n*Math.cos(r+u),this.centerY+n*Math.sin(r+u))}let d=e.size,f=a&10,p=0,m=-1/0;for(let n of e.children)m=this.drawNode(n,t+1,s,r+i*p/d,n.size/d*i,f,m),p+=n.size,f|=4;return l}changeHoveredNode(e,t){this.hoveredNode!==e&&(this.hoveredNode=e,this.updateSunburst(t))}hitTestNode(e){let t=this.canvas.getBoundingClientRect(),n=e.clientX-t.left-this.centerX,r=e.clientY-t.top-this.centerY,i=Math.sqrt(n*n+r*r),a=Math.atan2(r,n),o=(e,t,n,r,s)=>{let c=this.computeRadius(t+1);if(c>this.centerY)return;if(i>=n&&i<c){let t=a-r;if(t/=Math.PI*2,t-=Math.floor(t),t*=Math.PI*2,t<s)return e===this.animatedNode?e.parent:e}let l=e.size,u=0;for(let n of e.children){let e=o(n,t+1,c,r+s*u/l,n.size/l*s);if(e)return e;u+=n.size}};return o(this.animatedNode,this.animatedDepth,this.computeRadius(this.animatedDepth),this.animatedStartAngle,this.animatedSweepAngle)}tick(){let e=(G()-this.animationStart)/(this.options.animateDuration??q.animateDuration);e<0||e>1?(e=1,this.animatedNode=this.targetNode,this.targetDepth=0,this.targetStartAngle=X,this.targetSweepAngle=Math.PI*2):(e<.5?e*=4*e*e:(e=1-e,e*=4*e*e,e=1-e),this.invalidate()),this.animatedDepth=this.sourceDepth+(this.targetDepth-this.sourceDepth)*e,this.animatedStartAngle=this.sourceStartAngle+(this.targetStartAngle-this.sourceStartAngle)*e,this.animatedSweepAngle=this.sourceSweepAngle+(this.targetSweepAngle-this.sourceSweepAngle)*e,this.draw()}handleMouseMove(e){let t=this.hitTestNode(e);this.changeHoveredNode(t),t&&t!==this.animatedNode.parent?(this.events.emit(`hover`,t,e),this.canvas.style.cursor=`pointer`):this.events.emit(`hover`,null,e)}computeRadius(e){return yt(e)*this.radiusScale}updateSunburst(e=this.options.animate??!0){if(this.previousHoveredNode!==this.hoveredNode&&(this.previousHoveredNode=this.hoveredNode,this.hoveredNode||(this.canvas.style.cursor=`auto`,this.events.emit(`hover`,null)),this.invalidate()),this.targetNode!==this.currentNode){if(this.historyStack.length=0,this.invalidate(),e&&(this.animationStart=G()),gt(this.animatedNode,this.currentNode)){let e={depth_:this.animatedDepth,startAngle_:this.animatedStartAngle,sweepAngle_:this.animatedSweepAngle};_t(this.animatedNode,this.currentNode,e),this.animatedDepth=e.depth_,this.animatedStartAngle=e.startAngle_,this.animatedSweepAngle=e.sweepAngle_,this.targetDepth=0,this.targetStartAngle=X,this.targetSweepAngle=Math.PI*2,this.animatedNode=this.currentNode}else if(gt(this.currentNode,this.animatedNode)){let e={depth_:0,startAngle_:X,sweepAngle_:Math.PI*2};_t(this.currentNode,this.animatedNode,e),this.targetDepth=e.depth_,this.targetStartAngle=e.startAngle_,this.targetSweepAngle=e.sweepAngle_}else this.animationStart=-1/0,this.animatedNode=this.currentNode;this.sourceDepth=this.animatedDepth,this.sourceStartAngle=this.animatedStartAngle,this.sourceSweepAngle=this.animatedSweepAngle,this.targetNode=this.currentNode,this.events.emit(`select`,this.currentNode)}}},Z=4,Q=20,xt=2*Z,$=Q+Z;function St(e,t,n,r,i){let a=[],o=(t,n,r,i,a)=>{let o=e[t].size*a,s=e[n].size*a;return Math.max(r*r*o/(i*i),i*i/(r*r*s))};return((t,n,r,i,s)=>{for(;t<e.length;){let c=0;for(let n=t;n<e.length;n++)c+=e[n].size;let l=Math.min(i,s),u=i*s/c,d=t,f=0,p=0;for(;d<e.length;){let n=e[d].size*u,r=o(t,d,l,f+n,u);if(d>t&&p<r)break;f+=n,p=r,d++}let m=Math.round(f/l),h=0;for(let o=t;o<d;o++){let t=e[o],c=t.size*u,d=Math.round(l*h/f),p=Math.round(l*(h+c)/f),[g,_,v,y]=i>=s?[n,r+d,m,p-d]:[n+d,r,p-d,m];a.push({node:t,box:[g,_,v,y],children:v>xt&&y>$?St(t.children,g+Z,_+Q,v-xt,y-$):[]}),h+=c}t=d,i>=s?(n+=m,i-=m):(r+=m,s-=m)}})(0,t,n,r,i),a}var Ct=class extends dt{hoveredNode=null;currentNode=null;bgOriginX=0;bgOriginY=0;layers={base:null};baseLayoutCache;currentOriginX=0;currentOriginY=0;animationStart=0;animationBlend=1;animationSource=null;animationTarget=null;constructor(e,t={}){super(e,t),this.canvas.addEventListener(`mousemove`,e=>{this.updateHover(e)}),this.canvas.addEventListener(`mouseout`,e=>{this.changeHoveredNode(null),this.events.emit(`hover`,null,e)}),this.el.addEventListener(`click`,e=>{let t=this.hitTestNode(e);if(t){let n=t.node;this.events.emit(`click`,n,e),n.children.length?t===this.layers.current?this.updateHover(e):(this.changeCurrentLayout(t),this.changeHoveredNode(null)):this.updateHover(e)}else this.currentNode&&(this.changeCurrentLayout(null),this.updateHover(e))}),this.el.append(this.canvas),this.resize(),Promise.resolve().then(()=>this.resize()),this.disposables.push(at(e=>this.updateHover(e))),this.disposables.push(ot(()=>this.resize()))}select(e,t){let n=null;e===this.root&&(e=null),n=e?this.searchFor([this.layers.current,this.layers.base],e):null,this.changeCurrentLayout(n,t)}drawBaseLayout(){!this.width||!this.height||(this.c.clearRect(0,0,this.width,this.height),this.bgOriginX=this.bgOriginY=0,this.baseLayoutCache?this.c.putImageData(this.baseLayoutCache,0,0):(this.drawLayout(this.layers.base,0,[]),this.baseLayoutCache=this.c.getImageData(0,0,this.width*this.ratio,this.height*this.ratio)))}draw(){this.drawBaseLayout(),this.layers.current||this.drawHoverHighlight(this.layers.base);let e=this.layers.current?this.animationSource?this.animationTarget?1:1-this.animationBlend:this.animationBlend:0;if(this.layers.current){let[t,n,r,i]=this.layers.base.box;this.c.globalAlpha=.6*(!this.layers.current||!this.animationSource?1:e),this.c.fillStyle=this.palette.bg,this.c.fillRect(t,n,r,i),this.c.globalAlpha=1}if(this.layers.previous&&this.drawLayout(this.layers.previous,1,[this.layers.current]),this.layers.current){let[t,n,r,i]=this.layers.current.box,a=this.c.getTransform(),o=Math.sqrt(a.a*a.d);this.c.save(),this.c.shadowColor=this.palette.shadow,this.c.shadowBlur=o*(30*e),this.c.shadowOffsetX=o*(2*this.width),this.c.shadowOffsetY=o*(2*this.height+15*e),this.c.fillRect(t-2*this.width,n-2*this.height,r,i),this.c.restore(),this.bgOriginX=this.currentOriginX,this.bgOriginY=this.currentOriginY,this.drawLayout(this.layers.current,0,[]),this.drawHoverHighlight(this.layers.current)}}tick(){let e=this.animationBlend,t=this.currentNode;this.animationBlend=(G()-this.animationStart)/(this.options.animateDuration??q.animateDuration),this.animationBlend<0||this.animationBlend>1?(this.currentNode=this.animationTarget,this.layers.previous=void 0,this.animationBlend=1):(this.animationBlend=1-this.animationBlend,this.animationBlend*=this.animationBlend*this.animationBlend,this.animationBlend=1-this.animationBlend,this.invalidate()),(this.animationBlend!==e||this.currentNode!==t)&&this.updateCurrentLayout(),this.draw()}resize(){this.baseLayoutCache=void 0;let e=this.width,t=this.height;this.width=Math.min(this.el.clientWidth,1600),this.height=Math.max(Math.round(this.width/2),innerHeight-200),(this.width!==e||this.height!==t||!this.layers.base)&&(this.layers.base=St([this.root],0,0,this.width-1,this.height-1)[0],this.updateCurrentLayout()),super.resize()}*iterateNodeToDraw(e,t,n){let r=e.node,[i,a,o,s]=e.box,c=(r===this.hoveredNode?1:0)|(e===this.animationTarget?2:0);if(t===1)for(let e of n){if(!e)continue;let[n,r,c,l]=e.box;if(i>=n&&a>=r&&i+o<=n+c&&a+s<=r+l){t=2;break}}for(let r of e.children)c|=yield*this.iterateNodeToDraw(r,t,n);return t!==2&&(yield e),c}drawHoverHighlight(e){let t=this.iterateNodeToDraw(e,0,[]),n=this.c.globalCompositeOperation;for(;;){let e=t.next();if(e.done){this.c.globalCompositeOperation=n;return}let r=e.value.node;if(this.hoveredNode===r){this.c.globalCompositeOperation=`overlay`;let[t,n,r,i]=e.value.box;this.c.fillStyle=this.palette.hover,this.c.fillRect(t,n,r,i)}}}drawNodeBackground(e,t,n){let r=this.iterateNodeToDraw(e,t,n);for(;;){let e=r.next();if(e.done)return e.value;let[t,n,i,a]=e.value.box;this.c.fillStyle=U(this.getColor(e.value.node)||this.palette.fallback,this.c,this.bgOriginX,this.bgOriginY,1),e.value.children.length?(this.c.fillRect(t,n,i,Q),this.c.fillRect(t,n+a-Z,i,Z),this.c.fillRect(t,n+Q,Z,a-$),this.c.fillRect(t+i-Z,n+Q,Z,a-$)):this.c.fillRect(t,n,i,a)}}drawLayout(e,t,n){this.drawNodeBackground(e,t,n),this.drawNodeForeground(e,t,n)}drawNodeForeground(e,t,n){let r=this.iterateNodeToDraw(e,t,n);for(;;){let e=r.next();if(e.done)return;let t=e.value.node,[n,i,a,o]=e.value.box;if(it(this.c,this.palette.stroke,n+.5,i+.5,a,o),o>=Q){this.c.fillStyle=this.palette.text;let e=a-xt,r=i+Math.round($/2),[s,c]=this.textOverflowEllipsis(this.getText(t)||``,e),l=n+Math.round((a-c)/2),u=this.getText(t),d=this.getSubtext(t);if(s===u&&t.children.length){let t=d||``;t&&u&&(t=` - ${t}`);let[i,o]=this.textOverflowEllipsis(t,e-c);l=n+Math.round((a-c-o)/2),this.c.globalAlpha=.5,this.c.fillText(i,l+c,r),this.c.globalAlpha=1}if(this.c.fillText(s,l,r),o>$+16&&!t.children.length){let[t,r]=this.textOverflowEllipsis(d||``,e);this.c.globalAlpha=.5;let s=u?Q:Q/2+Z;this.c.fillText(t,n+Math.round((a-r)/2),i+s+Math.round(o-$)/2),this.c.globalAlpha=1}}}}updateCurrentLayout(){let e=this.options.selectedPaddingRatio??.2;if(this.currentNode){let[t,n,r,i]=this.currentNode.box,a=t+r,o=n+i,s=Math.round(this.width*e/2),c=Math.round(this.height*e/2),l=this.width-s-1,u=this.height-c-1,d=this.animationTarget?this.animationBlend:1-this.animationBlend,f=Math.round(t+(s-t)*d),p=Math.round(n+(c-n)*d),m=Math.round(a+(l-a)*d),h=Math.round(o+(u-o)*d),g=e=>e-Math.floor(e/64-.5)*64;this.layers.current=St([this.currentNode.node],f,p,m-f,h-p)[0],this.currentOriginX=g(-(t+a)/2)*(1-d)+(f+m)/2,this.currentOriginY=g(-(n+o)/2)*(1-d)+(p+h)/2}else this.layers.current=void 0,this.currentOriginX=0,this.currentOriginY=0}hitTestNode(e){let t=this.canvas.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top,i=(e,t)=>{for(let a of e){let[e,o,s,c]=a.box;if(n>=e&&r>=o&&n<e+s&&r<o+c)return i(a.children,!1)||(t?null:a)}return null};return this.layers.current?i([this.layers.current],!1):i([this.layers.base],!0)}updateHover(e){let t=this.hitTestNode(e);this.changeHoveredNode(t&&t.node),this.events.emit(`hover`,t?.node||null,e)}changeHoveredNode(e){this.hoveredNode!==e&&(this.hoveredNode=e,this.canvas.style.cursor=e&&!e.children.length?`pointer`:`auto`,this.invalidate())}searchFor(e,t){for(let n of e){if(!n)continue;let e=n.node===t?n:this.searchFor(n.children,t);if(e)return e}return null}changeCurrentLayout(e,t=this.options.animate){this.animationTarget!==e&&(this.events.emit(`select`,e?.node||null),this.layers.previous=e?this.layers.current:void 0,t&&(this.animationBlend=0,this.animationStart=G(),this.animationSource=this.currentNode),this.animationTarget=e,this.currentNode=e||this.searchFor([this.layers.base],this.currentNode.node),this.updateCurrentLayout(),this.invalidate())}};export{Ye as a,qe as i,bt as n,$e as o,Ct as r,He as s,ht as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{bt as e,ft as t,gt as n,ht as r,jt as i,on as a,pt as o,qt as s,ut as c,yt as l}from"#entry";import{n as u}from"./Ci9NHG69.js";import{t as d}from"./DZeYNBxL.js";import{t as f}from"./B2fBtupD.js";var p={"text-xs":``,"font-mono":``,flex:`~ items-center gap-3`,ml2:``},m={flex:`~ gap-1 items-center`},h=e({__name:`BuildMetrics`,props:{metrics:{}},setup(e){let h=e,g=t(()=>{let e=h.metrics,t=e?.resolve_ids.reduce((e,t)=>(e+=t.duration,e),0),n=e?.loads?.reduce((e,t)=>(e+=t.duration,e),0),r=e?.transforms.reduce((e,t)=>(e+=t.duration,e),0),i=t+n+r;return{resolveIds:t,loads:n,transforms:r,total:i}}),_=t(()=>(h.metrics?.transforms)?.[0]?.source_code_size),v=t(()=>{let e=h.metrics?.transforms.filter(e=>e.transformed_code_size);return e?.[e.length-1]?.transformed_code_size});return(e,t)=>{let h=d,y=f;return i(),n(`div`,p,[l(h,{duration:g.value.resolveIds,flex:`~ gap-1 items-center`,title:`Resolve Id hooks cost: ${a(u)(g.value.resolveIds,!0)}`},{default:s(()=>[...t[0]||=[o(`span`,{"i-ph-magnifying-glass-duotone":``,"inline-block":``},null,-1)]]),_:1},8,[`duration`,`title`]),l(h,{duration:g.value.loads,flex:`~ gap-1 items-center`,title:`Load hooks cost: ${a(u)(g.value.loads,!0)}`},{default:s(()=>[...t[1]||=[o(`span`,{"i-ph-upload-simple-duotone":``,"inline-block":``},null,-1)]]),_:1},8,[`duration`,`title`]),l(h,{duration:g.value.transforms,flex:`~ gap-1 items-center`,title:`Transform hooks cost: ${a(u)(g.value.transforms,!0)}`},{default:s(()=>[...t[2]||=[o(`span`,{"i-ph-magic-wand-duotone":``,"inline-block":``},null,-1)]]),_:1},8,[`duration`,`title`]),t[6]||=o(`span`,{op40:``},`|`,-1),l(h,{duration:g.value.total,flex:`~ gap-1 items-center`,title:`Total build cost: ${a(u)(g.value.total,!0)}`},{default:s(()=>[...t[3]||=[o(`span`,{"i-ph-clock-duotone":``,"inline-block":``},null,-1)]]),_:1},8,[`duration`,`title`]),_.value&&v.value?(i(),n(c,{key:0},[t[5]||=o(`span`,{op40:``},`|`,-1),o(`div`,m,[l(y,{title:`Source code size`,bytes:_.value},null,8,[`bytes`]),t[4]||=o(`span`,{"i-carbon-arrow-right":``,op50:``},null,-1),l(y,{title:`Transformed code size`,bytes:v.value},null,8,[`bytes`])])],64)):r(``,!0)])}}}),g=Object.assign(h,{__name:`ModulesBuildMetrics`});export{g as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{C as e,X as t,Z as n,bt as r,en as i,ft as a,gt as o,jt as s,m as c,on as l,pt as u,qt as d,un as f,yt as p}from"#entry";import{t as m}from"./Bjr51Ks8.js";import{i as h,l as g,o as _}from"./CQNn9qP2.js";import{t as v}from"./BBRXmiYk.js";import{n as y,t as b}from"./Dl8iHwQo.js";import{t as x}from"./Z5tyTJaP.js";import{n as S,t as C}from"./l47FwQA-.js";var w={flex:`~ col gap-2`,p4:``},T={flex:``,pb2:``},E={"w-8":``,"text-right":``,"text-xs":``,op50:``},D={"overflow-hidden":``,"text-ellipsis":``,"break-all":``,"line-clamp-2":``},O=r({__name:`FlatList`,props:{plugins:{}},setup(e){let n=t();return(t,r)=>{let i=v,a=m,c=b;return s(),o(`div`,w,[p(c,{items:e.plugins,"key-prop":`plugin_id`},{default:d(({item:e})=>[u(`div`,T,[p(a,{to:{path:l(n).path,query:{plugin:e.plugin_id}},"font-mono":``,border:`~ rounded base`,"w-full":``,px2:``,py1:``,"text-sm":``,hover:`bg-active`,flex:`~ gap-4 items-center`},{default:d(()=>[u(`div`,E,` #`+f(e.plugin_id),1),u(`span`,D,[p(i,{name:e.name},null,8,[`name`])])]),_:2},1032,[`to`])])]),_:1},8,[`items`])])}}}),k=Object.assign(O,{__name:`PluginsFlatList`}),A={relative:``,"max-h-screen":``,"of-hidden":``},j={absolute:``,"left-4":``,"top-4":``,"z-panel-nav":``},M={"of-auto":``,"h-screen":``,flex:`~ col gap-2`,pt32:``},N={absolute:``,"bottom-4":``,"py-1":``,"px-2":``,"bg-glass":``,left:`1/2`,"translate-x":`-1/2`,border:`~ base rounded-full`,text:`center xs`},P={op50:``},F=r({__name:`plugins`,props:{session:{}},setup(r){let l=r,d=t(),m=n(),v=i({search:d.query.search||``,selected:d.query.plugin_types?S(d.query.plugin_types):null}),b=a(()=>[..._.filter(e=>l.session?.meta?.plugins?.some(t=>e.match.test(t.name))),h]),w=a(()=>{let e=l.session?.meta?.plugins;return v.value.selected&&(e=e.filter(e=>{let t=g(e.name);return v.value.selected.includes(t.name)})),e}),T=c(()=>w.value,()=>new x(w.value,{includeScore:!0,keys:[`name`],ignoreLocation:!0,threshold:.4})),E=a(()=>v.value.search?T.value.search(v.value.search).map(e=>e.item):w.value);return e(v.value,e=>{let t={...d.query,search:e.search||void 0,plugin_types:e.selected||void 0};m.replace({query:C(t)})},{debounce:500}),(e,t)=>{let n=y,i=k;return s(),o(`div`,A,[u(`div`,j,[p(n,{modelValue:v.value,"onUpdate:modelValue":t[0]||=e=>v.value=e,rules:b.value},null,8,[`modelValue`,`rules`])]),u(`div`,M,[p(i,{plugins:E.value??[]},null,8,[`plugins`]),u(`div`,N,[u(`span`,P,f(E.value.length)+` of `+f(r.session?.meta?.plugins?.length||0),1)])])])}}});export{F as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function e(e,t=2){let n=[`Bytes`,`KB`,`MB`,`GB`,`TB`],r=Math.floor(Math.log(e)/Math.log(1024));return r===0?[e,`B`]:[(+(e/1024**r).toFixed(t)).toLocaleString(),n[r]]}function t(e,t){let n={name:t,children:{},items:[]};function r(e,t,i=n){if(!e)return;if(t.length<=1){i.items.push(e);return}let a=t.shift();i.children[a]||(i.children[a]={name:a,children:{},items:[]}),r(e,t,i.children[a])}e.forEach(e=>{let t=e.path.split(/\//g).filter(Boolean);r(e,t)});function i(e){if(!e)return;let t=Object.values(e.children);if(t.length===1&&!e.items.length){let n=t[0];e.name=e.name?`${e.name}/${n.name}`:n.name,e.items=n.items,e.children=n.children,i(e)}else t.forEach(i)}return Object.values(n.children).forEach(i),n}function n(e){return new Date(e).toLocaleString(void 0,{hour12:!1,year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`,fractionalSecondDigits:3})}function r(e,t){let n=[];return n=e==null?[``,`-`]:e<1?[`<1`,`ms`]:e<1e3?[e.toFixed(0),`ms`]:e<1e3*60?[(e/1e3).toFixed(1),`s`]:[(e/1e3/60).toFixed(1),`min`],t?n.join(` `):n}export{t as i,r as n,n as r,e as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{$t as e,At as t,D as n,Dt as r,Ft as i,Gt as a,Jt as o,Rt as s,T as c,Ut as l,Wt as u,X as d,Z as f,bt as p,en as m,f as h,ft as g,gt as _,ht as v,jt as y,ln as b,m as ee,mt as x,nn as S,on as C,pt as w,qt as T,s as te,sn as E,t as D,un as O,ut as k,vt as A,yt as j}from"#entry";import{t as M}from"./Bjr51Ks8.js";import{i as N,t as P}from"./Ci9NHG69.js";import"./CQNn9qP2.js";import{n as F}from"./BO9hKuA-.js";import{t as I}from"./B2fBtupD.js";import{t as L}from"./D_Sk_I-u.js";import{a as ne,i as R,n as re,r as ie,s as ae,t as z}from"./CS0-317H.js";import{n as B,t as V}from"./Dl8iHwQo.js";import{t as H}from"./BcAccMwu.js";import{t as oe}from"./Z5tyTJaP.js";var U={flex:`~ gap-1`},W={"overflow-hidden":``,"text-ellipsis":``,"break-all":``,"line-clamp-2":``},G=p({__name:`ListItem`,props:{asset:{}},setup(e){return(t,n)=>{let r=F,i=M;return y(),x(i,{to:{query:{asset:e.asset.filename}},"w-full":``,"font-mono":``,border:`~ rounded base`,px2:``,py1:``,"text-sm":``,hover:`bg-active`},{default:T(()=>[w(`div`,U,[j(r,{filename:e.asset.filename},null,8,[`filename`]),w(`span`,W,O(e.asset.filename),1)])]),_:1},8,[`to`])}}}),K=Object.assign(G,{__name:`AssetsListItem`}),q={p4:``},J={flex:``,pb2:``},Y=p({__name:`List`,props:{assets:{}},setup(e){return(t,n)=>{let r=K,i=V;return y(),_(`div`,q,[j(i,{items:e.assets,"key-prop":`filename`},{default:T(({item:e})=>[w(`div`,J,[j(r,{asset:e},null,8,[`asset`])])]),_:1},8,[`items`])])}}}),se=Object.assign(Y,{__name:`AssetsList`}),X={flex:`~ gap-2`,p4:``},Z=p({__name:`Folder`,props:{assets:{},session:{}},setup(e){let t=e,n=g(()=>{let e=[];return t.assets.forEach(t=>{e.push({full:t.filename,path:t.filename})}),N(e,`Project`)});return(t,r)=>{let i=H;return y(),_(`div`,X,[e.assets?.length?(y(),x(i,{key:0,"flex-1":``,node:n.value,icon:`i-catppuccin:folder-dist catppuccin`,"icon-open":`i-catppuccin:folder-dist-open catppuccin`,link:!0,"link-query-key":`asset`},null,8,[`node`])):v(``,!0)])}}}),ce=Object.assign(Z,{__name:`AssetsFolder`}),le={flex:`~ gap-1 items-center wrap`},ue={key:0,"i-ph-arrow-right-bold":``,"text-sm":``,"op-fade":``},de=[`onClick`],fe=p({__name:`AssetNavBreadcrumb`,props:{selected:{},options:{}},emits:[`select`],setup(e,{emit:t}){let n=e,r=t,a=g(()=>{let e=[],t=n.selected;for(;t;)e.unshift(t),t=t.parent;return e});return(e,t)=>(y(),_(`div`,le,[(y(!0),_(k,null,i(a.value,(e,t)=>(y(),_(k,{key:e.id},[t>0?(y(),_(`div`,ue)):v(``,!0),w(`button`,{hover:`bg-active`,rounded:``,px1:``,onClick:t=>r(`select`,e)},[w(`span`,null,O(e.text||e.id),1)],8,de)],64))),128))]))}}),Q=Object.assign(fe,{__name:`ChartAssetNavBreadcrumb`}),pe={class:`px4`,flex:`~ col gap2`},me=p({__name:`Treemap`,props:{graph:{},selected:{}},emits:[`select`],setup(e,{emit:t}){let n=e,r=t,i=l(`el`);return a(()=>i.value?.append(n.graph.el)),(t,n)=>{let a=Q;return y(),_(`div`,pe,[j(a,{border:`b base`,py2:``,"min-h-10":``,selected:e.selected,options:e.graph.options,onSelect:n[0]||=e=>r(`select`,e)},null,8,[`selected`,`options`]),w(`div`,{ref_key:`el`,ref:i},null,512)])}}}),he=Object.assign(me,{__name:`AssetsTreemap`}),ge={grid:`~ cols-[max-content_1fr] gap-2`,p4:``},_e={flex:`~ col gap-4`},ve={key:0,grid:`~ cols-[250px_1fr] gap-1`},ye=[`onClick`],be={key:0,"text-primary":``},xe={key:1},Se=[`onClick`],Ce=[`title`],we=p({__name:`Sunburst`,props:{graph:{},selected:{}},emits:[`select`],setup(e,{emit:t}){let n=e,r=t,c=l(`el`);return a(()=>c.value?.append(n.graph.el)),(t,n)=>{let a=Q,l=I,u=s(`tooltip`);return y(),_(`div`,ge,[w(`div`,{ref_key:`el`,ref:c,"w-500px":``},null,512),w(`div`,_e,[j(a,{border:`b base`,py2:``,selected:e.selected,options:e.graph.options,onSelect:n[0]||=e=>r(`select`,e)},null,8,[`selected`,`options`]),e.selected?(y(),_(`div`,ve,[(y(!0),_(k,null,i(e.selected.children,t=>(y(),_(k,{key:t.id},[w(`button`,{"ws-nowrap":``,"text-nowrap":``,"text-left":``,"overflow-hidden":``,"text-ellipsis":``,"text-sm":``,hover:`bg-active`,rounded:``,px2:``,onClick:e=>r(`select`,t)},[t.meta&&t.meta===e.selected?.meta?(y(),_(`span`,be,`(self)`)):(y(),_(`span`,xe,O(t.id),1))],8,ye),w(`button`,{relative:``,flex:`~ gap-1 items-center`,hover:`bg-active`,rounded:``,onClick:e=>r(`select`,t)},[w(`div`,{"h-5":``,rounded:``,shadow:``,border:`~ base`,style:b({background:C(R)(e.graph.options.getColor?.(t)||`#000`),width:`${t.size/e.selected.size*100}%`})},null,4),j(l,{"text-xs":``,bytes:t.size,total:e.selected.size,"percent-ratio":3},null,8,[`bytes`,`total`]),t.children.length>0?o((y(),_(`div`,{key:0,title:`${t.children.length} dependencies`,"text-xs":``,"op-fade":``},[A(` (`+O(t.children.length)+`) `,1)],8,Ce)),[[u,`${t.children.length} dependencies`]]):v(``,!0)],8,Se)],64))),128))])):v(``,!0)])])}}}),Te=Object.assign(we,{__name:`AssetsSunburst`}),Ee=p({__name:`Flamegraph`,props:{graph:{}},setup(e){let t=e,n=l(`el`);return a(()=>n.value?.append(t.graph.el)),(e,t)=>(y(),_(`div`,{ref_key:`el`,ref:n},null,512))}}),$=Object.assign(Ee,{__name:`AssetsFlamegraph`}),De={key:1,relative:``,"max-h-screen":``,"of-hidden":``},Oe={absolute:``,"left-4":``,"top-4":``,"z-panel-nav":``},ke={flex:`~ gap-2 items-center`,p2:``,border:`t base`},Ae=[`onClick`],je={"of-auto":``,"h-screen":``,flex:`~ col gap-2`,pt32:``},Me={absolute:``,"bottom-4":``,"py-1":``,"px-2":``,"bg-glass":``,left:`1/2`,"translate-x":`-1/2`,border:`~ base rounded-full`,text:`center xs`},Ne={op50:``},Pe={key:0,"bg-glass":``,border:`~ base rounded`,p2:``,"text-sm":``,flex:`~ col gap-2`},Fe={flex:`~ gap-1 items-center`},Ie={flex:`~ gap-1 items-center`},Le=p({__name:`assets`,props:{session:{}},setup(a){let o=a,s=e(h()),l=S(void 0),p=S(void 0),b=S(void 0),M=m(void 0),N=m({search:``}),F=f(),R=d(),V=[{label:`List`,value:`list`,icon:`i-ph-list-duotone`},{label:`Folder`,value:`folder`,icon:`i-ph-folder-duotone`},{label:`Treemap`,value:`treemap`,icon:`i-ph-checkerboard-duotone`},{label:`Sunburst`,value:`sunburst`,icon:`i-ph-chart-donut-duotone`},{label:`Flamegraph`,value:`flamegraph`,icon:`i-ph-chart-bar-horizontal-duotone`}],H=c(),{state:U,isLoading:W}=te(async()=>await H.value[`vite:rolldown:get-assets-list`]?.({session:o.session.id}),null),G=ee(()=>U.value,()=>new oe(U.value,{includeScore:!0,keys:[`filename`],ignoreLocation:!0,threshold:.4})),K=g(()=>N.value.search?G.value.search(N.value.search).map(e=>e.item):U.value);function q(e){L.value.assetViewType=e}let J=g(()=>{let e=K.value,t=new Map,n=0,r={id:`~root`,text:`Project`,size:0,sizeSelf:0,children:[]};if(!e?.length)return{map:t,root:r,maxDepth:n};let i=[];i.unshift(()=>{r.size+=r.children.reduce((e,t)=>e+t.size,0),r.subtext=P(r.size).join(` `),r.children.sort((e,t)=>t.size-e.size||e.id.localeCompare(t.id))});function a(e,r,a,o,s){if(t.has(r))return t.get(r);s>n&&(n=s);let c={id:r,text:a,size:0,sizeSelf:0,children:[],meta:{chunk_id:0,content:``,filename:``,size:0,path:a,type:`folder`},parent:o};return t.set(r,c),o.children.push(c),i.unshift(()=>{let t=c.sizeSelf;c.size+=c.children.reduce((e,t)=>e+t.size,0),c.subtext=P(c.size).join(` `),c.children.length&&t/c.size>.1&&c.children.push({id:`${c.id}-self`,text:``,size:t,sizeSelf:t,subtext:P(t).join(` `),children:[],meta:{...e,path:``,type:`file`},parent:c}),c.children.sort((e,t)=>t.size-e.size||e.id.localeCompare(t.id))}),c}function o(e){let n=e.filename.split(`/`).filter(Boolean),i=r,o=``,s=0;n.forEach((r,c)=>{if(o+=(o?`/`:``)+r,s++,c===n.length-1){let n={id:e.filename,text:r,size:e.size,sizeSelf:e.size,subtext:P(e.size).join(` `),children:[],meta:{...e,path:r,type:`file`}};i.children.push(n),t.set(e.filename,n)}else i=a(e,o,r,i,s)})}return e.forEach(o),i.forEach(e=>e()),{map:t,root:r,maxDepth:n}}),Y,X=g(()=>({onClick(e){e&&(p.value=e),e.meta?.type===`file`&&(M.value=e.meta,F.replace({query:{asset:e.meta.filename}}))},onHover(e){e&&!R.query.asset&&(p.value=e),e===null&&(p.value=void 0)},onLeave(){p.value=void 0},onSelect(e){b.value=e||J.value.root,M.value=e?.meta},animate:L.value.chartAnimation,palette:{stroke:D.value?`#222`:`#555`,fg:D.value?`#fff`:`#000`,bg:D.value?`#111`:`#fff`},getColor:ne(J.value.root,D.value?.8:.9,D.value?1:1.1),getSubtext:e=>e.subtext}));function Z(e,t){M.value=e?.meta,e?.children.length||(e=e?.parent||null),l.value?.select(e,t)}return u(()=>[L.value.assetViewType,J.value,X.value],()=>{switch(Y?.(),b.value=J.value.root,L.value.assetViewType){case`sunburst`:l.value=new re(J.value.root,X.value);break;case`treemap`:l.value=new ie(J.value.root,{...X.value,selectedPaddingRatio:0});break;default:l.value=new z(J.value.root,X.value)}r(()=>{let e=M.value&&J.value.map.get(M.value.filename)||null;e&&Z(e,!1)}),Y=()=>{l.value?.dispose(),l.value=void 0}},{deep:!0,immediate:!0}),t(()=>{Y?.()}),(e,t)=>{let r=n,o=B,c=se,u=ce,d=he,f=Te,m=$,h=I,g=ae;return C(W)?(y(),x(r,{key:0})):(y(),_(`div`,De,[w(`div`,Oe,[j(o,{modelValue:N.value,"onUpdate:modelValue":t[0]||=e=>N.value=e,rules:[]},{default:T(()=>[w(`div`,ke,[t[3]||=w(`span`,{op50:``,pl2:``,"text-sm":``},`View as`,-1),(y(),_(k,null,i(V,e=>w(`button`,{key:e.value,"btn-action":``,class:E(C(L).assetViewType===e.value?`bg-active`:`grayscale op50`),onClick:t=>q(e.value)},[w(`div`,{class:E(e.icon)},null,2),A(` `+O(e.label),1)],10,Ae)),64))])]),_:1},8,[`modelValue`])]),w(`div`,je,[C(L).assetViewType===`list`?(y(),_(k,{key:0},[K.value?.length?(y(),x(c,{key:0,assets:K.value,session:a.session},null,8,[`assets`,`session`])):v(``,!0),w(`div`,Me,[w(`span`,Ne,O(K.value.length)+` of `+O(C(U)?.length||0),1)])],64)):C(L).assetViewType===`folder`?(y(),_(k,{key:1},[K.value?.length?(y(),x(u,{key:0,assets:K.value,session:a.session},null,8,[`assets`,`session`])):v(``,!0)],64)):C(L).assetViewType===`treemap`?(y(),_(k,{key:2},[l.value?(y(),x(d,{key:0,graph:l.value,selected:b.value,onSelect:t[1]||=e=>Z(e)},null,8,[`graph`,`selected`])):v(``,!0)],64)):C(L).assetViewType===`sunburst`?(y(),_(k,{key:3},[l.value?(y(),x(f,{key:0,graph:l.value,selected:b.value,onSelect:t[2]||=e=>Z(e)},null,8,[`graph`,`selected`])):v(``,!0)],64)):C(L).assetViewType===`flamegraph`?(y(),_(k,{key:4},[l.value?(y(),x(m,{key:0,graph:l.value},null,8,[`graph`])):v(``,!0)],64)):v(``,!0)]),j(g,{"hover-x":s.x,"hover-y":s.y},{default:T(()=>[p.value?.meta?(y(),_(`div`,Pe,[w(`div`,Fe,O(p.value.text),1),w(`div`,Ie,[j(h,{bytes:p.value.size,percent:!1},null,8,[`bytes`])])])):v(``,!0)]),_:1},8,[`hover-x`,`hover-y`])]))}}});export{Le as default};
|