@vitejs/devtools-vite 0.0.0-alpha.15 → 0.0.0-alpha.16
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/index.d.mts +11 -1
- package/dist/nitro.json +1 -1
- package/dist/public/200.html +1 -1
- package/dist/public/404.html +1 -1
- package/dist/public/_nuxt/{DMaeA1tb.js → 1wmGBmx3.js} +1 -1
- package/dist/public/_nuxt/{B7TCfKhI.js → B4sg2h3A.js} +1 -1
- package/dist/public/_nuxt/{BnFT81HV.js → BFpsRNSh.js} +1 -1
- package/dist/public/_nuxt/{BkUn9yPG.js → BIVRCSMb.js} +1 -1
- package/dist/public/_nuxt/{fQmYF_tr.js → BTOJgFG9.js} +1 -1
- package/dist/public/_nuxt/{Dd6GGSHe.js → BZ-bSyWq.js} +1 -1
- package/dist/public/_nuxt/{DlbkLyV4.js → BZK-pdMD.js} +1 -1
- package/dist/public/_nuxt/{CDULFaBv.js → BaiUA85t.js} +1 -1
- package/dist/public/_nuxt/{BjxvvmqH.js → Bdpt9CY1.js} +1 -1
- package/dist/public/_nuxt/{Dnw1sKCY.js → BkjxFYSI.js} +1 -1
- package/dist/public/_nuxt/{DDPo8H3W.js → Bwl74Dmc.js} +1 -1
- package/dist/public/_nuxt/{HV-uTnTx.js → C0EU2JTm.js} +1 -1
- package/dist/public/_nuxt/{DD_wBK9r.js → C69S_2QT.js} +1 -1
- package/dist/public/_nuxt/{CsYy4mNk.js → C92JN8-1.js} +1 -1
- package/dist/public/_nuxt/{BG9Ykbq7.js → CAUg2nFN.js} +1 -1
- package/dist/public/_nuxt/{jo347JsK.js → CFJX1-o6.js} +1 -1
- package/dist/public/_nuxt/{BJv7hFBm.js → CPaPq6PM.js} +1 -1
- package/dist/public/_nuxt/{Dp55yonU.js → CW2IEEV4.js} +1 -1
- package/dist/public/_nuxt/{BSbpramE.js → CYG9lvnx.js} +1 -1
- package/dist/public/_nuxt/{DhdUZbRv.js → CYdbuFTi.js} +1 -1
- package/dist/public/_nuxt/{idtszpPM.js → CuP828Ev.js} +1 -1
- package/dist/public/_nuxt/{DH-eUyNP.js → CurpbAUw.js} +1 -1
- package/dist/public/_nuxt/{CzgA83N_.js → CwH022lo.js} +1 -1
- package/dist/public/_nuxt/{C-xw4DlO.js → Cysfad9V.js} +3 -3
- package/dist/public/_nuxt/{COkVMxfk.js → D3IV73AC.js} +1 -1
- package/dist/public/_nuxt/{B3PiPV-x.js → DAYnNRKo.js} +1 -1
- package/dist/public/_nuxt/{DdbSxsRv.js → DCH6tnYG.js} +1 -1
- package/dist/public/_nuxt/{CZMM-nMb.js → DSJ0HTzo.js} +1 -1
- package/dist/public/_nuxt/{CVmdkwE8.js → DnfHXPIS.js} +1 -1
- package/dist/public/_nuxt/{V3kdlpoV.js → KahQcwFc.js} +1 -1
- package/dist/public/_nuxt/{DndCUz9L.js → NcoMSw9p.js} +1 -1
- package/dist/public/_nuxt/{ZcrIAmbb.js → W7DZ1OHe.js} +1 -1
- package/dist/public/_nuxt/builds/latest.json +1 -1
- package/dist/public/_nuxt/builds/meta/cd27d01e-b5bf-4470-b74c-544c8db5078a.json +1 -0
- package/dist/public/_nuxt/{BACoQHB-.js → cT-zQbp8.js} +1 -1
- package/dist/public/_nuxt/{entry.D-FSo8e5.css → entry.DKbtHB8Z.css} +1 -1
- package/dist/public/_nuxt/{hkb_fnPj.js → iqmTIKrs.js} +1 -1
- package/dist/public/_nuxt/{D2L83EJo.js → n0_Vc1O0.js} +1 -1
- package/dist/public/index.html +1 -1
- package/package.json +3 -3
- package/dist/public/_nuxt/builds/meta/54fd6322-de06-49fe-8b5e-e12e2c95d98d.json +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{G as e,Ht as t,Jt as n,Lt as r,Mt as i,Rt as a,Tt as o,Vt as s,W as c,c as l,ct as u,en as d,ft as f,g as p,in as m,it as h,kt as g,lt as _,mt as v,ot as y,p as b,pt as x,qt as S,rn as C,st as w,tn as T,ut as E,x as D,y as O,zt as k}from"./
|
|
1
|
+
import{G as e,Ht as t,Jt as n,Lt as r,Mt as i,Rt as a,Tt as o,Vt as s,W as c,c as l,ct as u,en as d,ft as f,g as p,in as m,it as h,kt as g,lt as _,mt as v,ot as y,p as b,pt as x,qt as S,rn as C,st as w,tn as T,ut as E,x as D,y as O,zt as k}from"./Cysfad9V.js";import{t as A}from"./CFJX1-o6.js";import{i as j}from"./DQtLZa7C.js";import"./BkjxFYSI.js";import{n as M}from"./DAYnNRKo.js";import{r as N,t as P}from"./BZK-pdMD.js";import{a as ee,c as te,i as F,n as I,o as L,r as R,t as z}from"./C0EU2JTm.js";import{t as B}from"./CW2IEEV4.js";import{t as V}from"./CPaPq6PM.js";import{t as H}from"./KahQcwFc.js";import{t as ne}from"./CEQkJ3Wx.js";import{t as re}from"./BFpsRNSh.js";var U={flex:`~ gap-1`},W={"overflow-hidden":``,"text-ellipsis":``,"break-all":``,"line-clamp-2":``},G=v({__name:`ListItem`,props:{asset:{}},setup(e){return(t,n)=>{let r=M,i=A;return o(),u(i,{to:{query:{asset:e.asset.filename}},"w-full":``,"font-mono":``,border:`~ rounded base`,px2:``,py1:``,"text-sm":``,hover:`bg-active`},{default:s(()=>[w(`div`,U,[x(r,{filename:e.asset.filename},null,8,[`filename`]),w(`span`,W,m(e.asset.filename),1)])]),_:1},8,[`to`])}}}),K=Object.assign(G,{__name:`AssetsListItem`}),q={p4:``},J={flex:``,pb2:``},Y=v({__name:`List`,props:{assets:{}},setup(e){return(t,n)=>{let r=K,i=V;return o(),E(`div`,q,[x(i,{items:e.assets,"key-prop":`filename`},{default:s(({item:e})=>[w(`div`,J,[x(r,{asset:e},null,8,[`asset`])])]),_:1},8,[`items`])])}}}),X=Object.assign(Y,{__name:`AssetsList`}),Z={flex:`~ gap-2`,p4:``},Q=v({__name:`Folder`,props:{assets:{},session:{}},setup(e){let t=e,n=y(()=>{let e=[];return t.assets.forEach(t=>{e.push({full:t.filename,path:t.filename})}),j(e,`Project`)});return(t,r)=>{let i=H;return o(),E(`div`,Z,[e.assets?.length?(o(),u(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`])):_(``,!0)])}}}),ie=Object.assign(Q,{__name:`AssetsFolder`}),ae={grid:`~ cols-[max-content_1fr] gap-2`,p4:``},oe={flex:`~ col gap-4`},se={key:0,grid:`~ cols-[250px_1fr] gap-1`},ce=[`onClick`],le={key:0,"text-primary":``},ue={key:1},de=[`onClick`],fe=[`title`],pe=v({__name:`Sunburst`,props:{graph:{},selected:{}},emits:[`select`],setup(e,{emit:n}){let a=e,s=n,c=r(`el`);return k(()=>c.value?.append(a.graph.el)),(n,r)=>{let a=I,l=N,u=i(`tooltip`);return o(),E(`div`,ae,[w(`div`,{ref_key:`el`,ref:c,"w-500px":``},null,512),w(`div`,oe,[x(a,{border:`b base`,py2:``,selected:e.selected,options:e.graph.options,onSelect:r[0]||=e=>s(`select`,e)},null,8,[`selected`,`options`]),e.selected?(o(),E(`div`,se,[(o(!0),E(h,null,g(e.selected.children,n=>(o(),E(h,{key:n.id},[w(`button`,{"ws-nowrap":``,"text-nowrap":``,"text-left":``,"overflow-hidden":``,"text-ellipsis":``,"text-sm":``,hover:`bg-active`,rounded:``,px2:``,onClick:e=>s(`select`,n)},[n.meta&&n.meta===e.selected?.meta?(o(),E(`span`,le,`(self)`)):(o(),E(`span`,ue,m(n.id),1))],8,ce),w(`button`,{relative:``,flex:`~ gap-1 items-center`,hover:`bg-active`,rounded:``,onClick:e=>s(`select`,n)},[w(`div`,{"h-5":``,rounded:``,shadow:``,border:`~ base`,style:C({background:d(L)(e.graph.options.getColor?.(n)||`#000`),width:`${n.size/e.selected.size*100}%`})},null,4),x(l,{"text-xs":``,bytes:n.size,total:e.selected.size,"percent-ratio":3},null,8,[`bytes`,`total`]),n.children.length>0?t((o(),E(`div`,{key:0,title:`${n.children.length} dependencies`,"text-xs":``,"op-fade":``},[f(` (`+m(n.children.length)+`) `,1)],8,fe)),[[u,`${n.children.length} dependencies`]]):_(``,!0)],8,de)],64))),128))])):_(``,!0)])])}}}),me=Object.assign(pe,{__name:`AssetsSunburst`}),he=v({__name:`Flamegraph`,props:{graph:{}},setup(e){let t=e,n=r(`el`);return k(()=>n.value?.append(t.graph.el)),(e,t)=>(o(),E(`div`,{ref_key:`el`,ref:n},null,512))}}),ge=Object.assign(he,{__name:`AssetsFlamegraph`}),_e={key:1,relative:``,"max-h-screen":``,"of-hidden":``},ve={absolute:``,"left-4":``,"top-4":``,"z-panel-nav":``},ye={flex:`~ gap-2 items-center`,p2:``,border:`t base`},be=[`onClick`],xe={"of-auto":``,"h-screen":``,flex:`~ col gap-2`,pt32:``},$={absolute:``,"bottom-4":``,"py-1":``,"px-2":``,"bg-glass":``,left:`1/2`,"translate-x":`-1/2`,border:`~ base rounded-full`,text:`center xs`},Se={op50:``},Ce={key:0,"bg-glass":``,border:`~ base rounded`,p2:``,"text-sm":``,flex:`~ col gap-2`},we={flex:`~ gap-1 items-center`},Te={flex:`~ gap-1 items-center`},Ee=v({__name:`assets`,props:{session:{}},setup(t){let r=t,i=S(b()),v=n({search:``}),C=e(),k=c(),A=[{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`}],j=O(),{state:M,isLoading:L}=l(async()=>await j.value[`vite:rolldown:get-assets-list`]?.({session:r.session.id}),null),V=p(()=>M.value,()=>new ne(M.value,{includeScore:!0,keys:[`filename`],ignoreLocation:!0,threshold:.4})),H=y(()=>v.value.search?V.value.search(v.value.search).map(e=>e.item):M.value);function U(e){P.value.assetViewType=e}let{tree:W,chartOptions:G,graph:K,nodeHover:q,nodeSelected:J,selectedNode:Y,selectNode:Z,buildGraph:Q}=z({data:H,nameKey:`filename`,sizeKey:`size`,rootText:`Project`,nodeType:`file`,graphOptions:{onClick(e){e&&(q.value=e),e.meta?.type===`file`&&(Y.value=e.meta,C.replace({query:{asset:e.meta.filename}}))},onHover(e){e&&!k.query.asset&&(q.value=e),e===null&&(q.value=void 0)},onLeave(){q.value=void 0},onSelect(e){J.value=e||W.value.root,Y.value=e?.meta}},onUpdate(){switch(P.value.assetViewType){case`sunburst`:K.value=new F(W.value.root,G.value);break;case`treemap`:K.value=new ee(W.value.root,{...G.value,selectedPaddingRatio:0});break;default:K.value=new R(W.value.root,G.value)}}});return a(()=>P.value.assetViewType,()=>{Q()}),(e,n)=>{let r=D,a=B,c=X,l=ie,p=I,y=me,b=ge,S=N,C=te;return d(L)?(o(),u(r,{key:0})):(o(),E(`div`,_e,[w(`div`,ve,[x(a,{modelValue:v.value,"onUpdate:modelValue":n[0]||=e=>v.value=e,rules:[]},{default:s(()=>[w(`div`,ye,[n[3]||=w(`span`,{op50:``,pl2:``,"text-sm":``},`View as`,-1),(o(),E(h,null,g(A,e=>w(`button`,{key:e.value,"btn-action":``,class:T(d(P).assetViewType===e.value?`bg-active`:`grayscale op50`),onClick:t=>U(e.value)},[w(`div`,{class:T(e.icon)},null,2),f(` `+m(e.label),1)],10,be)),64))])]),_:1},8,[`modelValue`])]),w(`div`,xe,[d(P).assetViewType===`list`?(o(),E(h,{key:0},[H.value?.length?(o(),u(c,{key:0,assets:H.value,session:t.session},null,8,[`assets`,`session`])):_(``,!0),w(`div`,$,[w(`span`,Se,m(H.value.length)+` of `+m(d(M)?.length||0),1)])],64)):d(P).assetViewType===`folder`?(o(),E(h,{key:1},[H.value?.length?(o(),u(l,{key:0,assets:H.value,session:t.session},null,8,[`assets`,`session`])):_(``,!0)],64)):d(P).assetViewType===`treemap`?(o(),E(h,{key:2},[d(K)?(o(),u(re,{key:0,graph:d(K),selected:d(J),onSelect:n[1]||=e=>d(Z)(e)},{default:s(({selected:e,options:t,onSelect:n})=>[x(p,{border:`b base`,py2:``,"min-h-10":``,selected:e,options:t,onSelect:n},null,8,[`selected`,`options`,`onSelect`])]),_:1},8,[`graph`,`selected`])):_(``,!0)],64)):d(P).assetViewType===`sunburst`?(o(),E(h,{key:3},[d(K)?(o(),u(y,{key:0,graph:d(K),selected:d(J),onSelect:n[2]||=e=>d(Z)(e)},null,8,[`graph`,`selected`])):_(``,!0)],64)):d(P).assetViewType===`flamegraph`?(o(),E(h,{key:4},[d(K)?(o(),u(b,{key:0,graph:d(K)},null,8,[`graph`])):_(``,!0)],64)):_(``,!0)]),x(C,{"hover-x":i.x,"hover-y":i.y},{default:s(()=>[d(q)?.meta?(o(),E(`div`,Ce,[w(`div`,we,m(d(q).text),1),w(`div`,Te,[x(S,{bytes:d(q).size,percent:!1},null,8,[`bytes`])])])):_(``,!0)]),_:1},8,[`hover-x`,`hover-y`])]))}}});export{Ee as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$ as e,B as t,Ct as n,G as r,H as i,I as a,J as o,Jt as s,K as c,L as l,Q as u,R as d,St as f,U as p,X as m,Xt as h,Y as g,Z as _,_t as v,jt as y,mt as b,ot as x,q as S,z as C}from"./
|
|
1
|
+
import{$ as e,B as t,Ct as n,G as r,H as i,I as a,J as o,Jt as s,K as c,L as l,Q as u,R as d,St as f,U as p,X as m,Xt as h,Y as g,Z as _,_t as v,jt as y,mt as b,ot as x,q as S,z as C}from"./Cysfad9V.js";var w=(...e)=>e.find(e=>e!==void 0);function T(e){let t=e.componentName||`NuxtLink`;function o(e){return typeof e==`string`&&e.startsWith(`#`)}function u(t,n,r){let i=r??e.trailingSlash;if(!t||i!==`append`&&i!==`remove`)return t;if(typeof t==`string`)return D(t,i);let a=`path`in t&&t.path!==void 0?t.path:n(t).path;return{...t,name:void 0,path:D(a,i)}}function T(t){let n=r(),a=S(),s=x(()=>!!t.target&&t.target!==`_self`),c=x(()=>{let e=t.to||t.href||``;return typeof e==`string`&&g(e,{acceptRelative:!0})}),l=y(`RouterLink`),d=l&&typeof l!=`string`?l.useLink:void 0,f=x(()=>{if(t.external)return!0;let e=t.to||t.href||``;return typeof e==`object`?!1:e===``||c.value}),h=x(()=>{let e=t.to||t.href||``;return f.value?e:u(e,n.resolve,t.trailingSlash)}),_=f.value?void 0:d?.({...t,to:h}),v=x(()=>{let r=t.trailingSlash??e.trailingSlash;if(!h.value||c.value||o(h.value))return h.value;if(f.value){let e=typeof h.value==`object`&&`path`in h.value?p(h.value):h.value;return D(typeof e==`object`?n.resolve(e).href:e,r)}return typeof h.value==`object`?n.resolve(h.value)?.href??null:D(m(a.app.baseURL,h.value),r)});return{to:h,hasTarget:s,isAbsoluteUrl:c,isExternal:f,href:v,isActive:_?.isActive??x(()=>h.value===n.currentRoute.value.path),isExactActive:_?.isExactActive??x(()=>h.value===n.currentRoute.value.path),route:_?.route??x(()=>n.resolve(h.value)),async navigate(e){await i(v.value,{replace:t.replace,external:f.value||s.value})}}}return b({name:t,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(t,{slots:i}){let u=r(),{to:m,href:g,navigate:b,isExternal:x,hasTarget:S,isAbsoluteUrl:E}=T(t),D=h(!1),k=s(null),j=e=>{k.value=t.custom?e?.$el?.nextElementSibling:e?.$el};function M(n){return!D.value&&(typeof t.prefetchOn==`string`?t.prefetchOn===n:t.prefetchOn?.[n]??e.prefetchOn?.[n])&&(t.prefetch??e.prefetch)!==!1&&t.noPrefetch!==!0&&t.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?p(m.value):u.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&&!S.value&&a(m.value,u).catch(()=>{})])}if(M(`visibility`)){let e=c(),t,r=null;n(()=>{let n=O();l(()=>{t=C(()=>{k?.value?.tagName&&(r=n.observe(k.value,async()=>{r?.(),r=null,await N(e)}))})})}),f(()=>{t&&d(t),r?.(),r=null})}return()=>{if(!x.value&&!S.value&&!o(m.value)){let n={ref:j,to:m.value,activeClass:t.activeClass||e.activeClass,exactActiveClass:t.exactActiveClass||e.exactActiveClass,replace:t.replace,ariaCurrentValue:t.ariaCurrentValue,custom:t.custom};return t.custom||(M(`interaction`)&&(n.onPointerenter=N.bind(null,void 0),n.onFocus=N.bind(null,void 0)),D.value&&(n.class=t.prefetchedClass||e.prefetchedClass),n.rel=t.rel||void 0),v(y(`RouterLink`),n,i.default)}let n=t.target||null,r=w(t.noRel?``:t.rel,e.externalRelAttribute,E.value||S.value?`noopener noreferrer`:``)||null;return t.custom?i.default?i.default({href:g.value,navigate:b,prefetch:N,get route(){if(!g.value)return;let e=new URL(g.value,window.location.href);return{path:e.pathname,fullPath:e.pathname,get query(){return _(e.search)},hash:e.hash,params:{},name:void 0,matched:[],redirectedFrom:void 0,meta:{},href:g.value}},rel:r,target:n,isExternal:x.value||S.value,isActive:!1,isExactActive:!1}):null:v(`a`,{ref:k,href:g.value||null,rel:r,target:n,onClick:e=>{if(!(x.value||S.value))return e.preventDefault(),t.replace?u.replace(g.value):u.push(g.value)}},i.default?.())}}})}var E=T(o);function D(t,n){let r=n===`append`?u:e;return g(t)&&!t.startsWith(`http`)?t:r(t,!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,2 +1,2 @@
|
|
|
1
|
-
import{At as e,Et as t,Gt as n,Ht as r,Mt as i,Nt as a,Ot as o,Pt as s,Tt as c,Ut as l,Vt as u,Yt as d,_t as f,bt as p,ct as m,en as h,gt as g,it as _,jt as v,kt as y,lt as b,mt as x,nn as S,pt as C,rn as w,tn as T,ut as E,xt as D}from"./
|
|
1
|
+
import{At as e,Et as t,Gt as n,Ht as r,Mt as i,Nt as a,Ot as o,Pt as s,Tt as c,Ut as l,Vt as u,Yt as d,_t as f,bt as p,ct as m,en as h,gt as g,it as _,jt as v,kt as y,lt as b,mt as x,nn as S,pt as C,rn as w,tn as T,ut as E,xt as D}from"./Cysfad9V.js";function ee(){var e=window.navigator.userAgent,t=e.indexOf(`MSIE `);if(t>0)return parseInt(e.substring(t+5,e.indexOf(`.`,t)),10);if(e.indexOf(`Trident/`)>0){var n=e.indexOf(`rv:`);return parseInt(e.substring(n+3,e.indexOf(`.`,n)),10)}var r=e.indexOf(`Edge/`);return r>0?parseInt(e.substring(r+5,e.indexOf(`.`,r)),10):-1}var O;function k(){k.init||(k.init=!0,O=ee()!==-1)}var A={name:`ResizeObserver`,props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:[`notify`],mounted(){k(),D(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});let e=document.createElement(`object`);this._resizeObject=e,e.setAttribute(`aria-hidden`,`true`),e.setAttribute(`tabindex`,-1),e.onload=this.addResizeHandlers,e.type=`text/html`,O&&this.$el.appendChild(e),e.data=`about:blank`,O||this.$el.appendChild(e)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit(`notify`,{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener(`resize`,this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!O&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener(`resize`,this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}},j=l(`data-v-b329ee4c`);o(`data-v-b329ee4c`);var te={class:`resize-observer`,tabindex:`-1`};t(),A.render=j((e,t,n,r,i,a)=>(c(),m(`div`,te))),A.__scopeId=`data-v-b329ee4c`,A.__file=`src/components/ResizeObserver.vue`;function M(e){"@babel/helpers - typeof";return M=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},M(e)}function ne(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function N(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function re(e,t,n){return t&&N(e.prototype,t),n&&N(e,n),e}function P(e){return ie(e)||ae(e)||oe(e)||se()}function ie(e){if(Array.isArray(e))return F(e)}function ae(e){if(typeof Symbol<`u`&&Symbol.iterator in Object(e))return Array.from(e)}function oe(e,t){if(e){if(typeof e==`string`)return F(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`)return Array.from(e);if(n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return F(e,t)}}function F(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function se(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ce(e){return typeof e==`function`?{callback:e}:e}function le(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r,i,a,o=function(o){if(a=[...arguments].slice(1),!(r&&o===i)){var s=n.leading;typeof s==`function`&&(s=s(o,i)),(!r||o!==i)&&s&&e.apply(void 0,[o].concat(P(a))),i=o,clearTimeout(r),r=setTimeout(function(){e.apply(void 0,[o].concat(P(a))),r=0},t)}};return o._clear=function(){clearTimeout(r),r=null},o}function I(e,t){if(e===t)return!0;if(M(e)===`object`){for(var n in e)if(!I(e[n],t[n]))return!1;return!0}return!1}var ue=function(){function e(t,n,r){ne(this,e),this.el=t,this.observer=null,this.frozen=!1,this.createObserver(n,r)}return re(e,[{key:`createObserver`,value:function(e,t){var n=this;if(this.observer&&this.destroyObserver(),!this.frozen){if(this.options=ce(e),this.callback=function(e,t){n.options.callback(e,t),e&&n.options.once&&(n.frozen=!0,n.destroyObserver())},this.callback&&this.options.throttle){var r=(this.options.throttleOptions||{}).leading;this.callback=le(this.callback,this.options.throttle,{leading:function(e){return r===`both`||r===`visible`&&e||r===`hidden`&&!e}})}this.oldResult=void 0,this.observer=new IntersectionObserver(function(e){var t=e[0];if(e.length>1){var r=e.find(function(e){return e.isIntersecting});r&&(t=r)}if(n.callback){var i=t.isIntersecting&&t.intersectionRatio>=n.threshold;if(i===n.oldResult)return;n.oldResult=i,n.callback(i,t)}},this.options.intersection),D(function(){n.observer&&n.observer.observe(n.el)})}}},{key:`destroyObserver`,value:function(){this.observer&&=(this.observer.disconnect(),null),this.callback&&this.callback._clear&&(this.callback._clear(),this.callback=null)}},{key:`threshold`,get:function(){return this.options.intersection&&typeof this.options.intersection.threshold==`number`?this.options.intersection.threshold:0}}]),e}();function L(e,t,n){var r=t.value;r&&(typeof IntersectionObserver>`u`?console.warn(`[vue-observe-visibility] IntersectionObserver API is not available in your browser. Please install this polyfill: https://github.com/w3c/IntersectionObserver/tree/master/polyfill`):e._vue_visibilityState=new ue(e,r,n))}function R(e,t,n){var r=t.value,i=t.oldValue;if(!I(r,i)){var a=e._vue_visibilityState;if(!r){z(e);return}a?a.createObserver(r,n):L(e,{value:r},n)}}function z(e){var t=e._vue_visibilityState;t&&(t.destroyObserver(),delete e._vue_visibilityState)}var B={beforeMount:L,updated:R,unmounted:z};function V(e){return{all:e||=new Map,on:function(t,n){var r=e.get(t);r&&r.push(n)||e.set(t,[n])},off:function(t,n){var r=e.get(t);r&&r.splice(r.indexOf(n)>>>0,1)},emit:function(t,n){(e.get(t)||[]).slice().map(function(e){e(n)}),(e.get(`*`)||[]).slice().map(function(e){e(t,n)})}}}var H={itemsLimit:1e3},de=/(auto|scroll)/;function U(e,t){return e.parentNode===null?t:U(e.parentNode,t.concat([e]))}var W=function(e,t){return getComputedStyle(e,null).getPropertyValue(t)},fe=function(e){return W(e,`overflow`)+W(e,`overflow-y`)+W(e,`overflow-x`)},pe=function(e){return de.test(fe(e))};function G(e){if(e instanceof HTMLElement||e instanceof SVGElement){for(var t=U(e.parentNode,[]),n=0;n<t.length;n+=1)if(pe(t[n]))return t[n];return document.scrollingElement||document.documentElement}}function K(e){"@babel/helpers - typeof";return K=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},K(e)}var q={items:{type:Array,required:!0},keyField:{type:String,default:`id`},direction:{type:String,default:`vertical`,validator:function(e){return[`vertical`,`horizontal`].includes(e)}},listTag:{type:String,default:`div`},itemTag:{type:String,default:`div`}};function J(){return this.items.length&&K(this.items[0])!==`object`}var Y=!1;if(typeof window<`u`){Y=!1;try{var X=Object.defineProperty({},`passive`,{get:function(){Y=!0}});window.addEventListener(`test`,null,X)}catch{}}var me=0,Z={name:`RecycleScroller`,components:{ResizeObserver:A},directives:{ObserveVisibility:B},props:{...q,itemSize:{type:Number,default:null},gridItems:{type:Number,default:void 0},itemSecondarySize:{type:Number,default:void 0},minItemSize:{type:[Number,String],default:null},sizeField:{type:String,default:`size`},typeField:{type:String,default:`type`},buffer:{type:Number,default:200},pageMode:{type:Boolean,default:!1},prerender:{type:Number,default:0},emitUpdate:{type:Boolean,default:!1},updateInterval:{type:Number,default:0},skipHover:{type:Boolean,default:!1},listTag:{type:String,default:`div`},itemTag:{type:String,default:`div`},listClass:{type:[String,Object,Array],default:``},itemClass:{type:[String,Object,Array],default:``}},emits:[`resize`,`visible`,`hidden`,`update`,`scroll-start`,`scroll-end`],data(){return{pool:[],totalSize:0,ready:!1,hoverKey:null}},computed:{sizes(){if(this.itemSize===null){let e={"-1":{accumulator:0}},t=this.items,n=this.sizeField,r=this.minItemSize,i=1e4,a=0,o;for(let s=0,c=t.length;s<c;s++)o=t[s][n]||r,o<i&&(i=o),a+=o,e[s]={accumulator:a,size:o};return this.$_computedMinItemSize=i,e}return[]},simpleArray:J,itemIndexByKey(){let{keyField:e,items:t}=this,n={};for(let r=0,i=t.length;r<i;r++)n[t[r][e]]=r;return n}},watch:{items(){this.updateVisibleItems(!0)},pageMode(){this.applyPageMode(),this.updateVisibleItems(!1)},sizes:{handler(){this.updateVisibleItems(!1)},deep:!0},gridItems(){this.updateVisibleItems(!0)},itemSecondarySize(){this.updateVisibleItems(!0)}},created(){this.$_startIndex=0,this.$_endIndex=0,this.$_views=new Map,this.$_unusedViews=new Map,this.$_scrollDirty=!1,this.$_lastUpdateScrollPosition=0,this.prerender&&(this.$_prerender=!0,this.updateVisibleItems(!1)),this.gridItems&&!this.itemSize&&console.error(`[vue-recycle-scroller] You must provide an itemSize when using gridItems`)},mounted(){this.applyPageMode(),this.$nextTick(()=>{this.$_prerender=!1,this.updateVisibleItems(!0),this.ready=!0})},activated(){let e=this.$_lastUpdateScrollPosition;typeof e==`number`&&this.$nextTick(()=>{this.scrollToPosition(e)})},beforeUnmount(){this.removeListeners()},methods:{addView(e,t,r,i,a){let o=d({item:r,position:0,nr:n({id:me++,index:t,used:!0,key:i,type:a})});return e.push(o),o},unuseView(e,t=!1){let n=this.$_unusedViews,r=e.nr.type,i=n.get(r);i||(i=[],n.set(r,i)),i.push(e),t||(e.nr.used=!1,e.position=-9999)},handleResize(){this.$emit(`resize`),this.ready&&this.updateVisibleItems(!1)},handleScroll(e){if(!this.$_scrollDirty){if(this.$_scrollDirty=!0,this.$_updateTimeout)return;let e=()=>requestAnimationFrame(()=>{this.$_scrollDirty=!1;let{continuous:e}=this.updateVisibleItems(!1,!0);e||(clearTimeout(this.$_refreshTimout),this.$_refreshTimout=setTimeout(this.handleScroll,this.updateInterval+100))});e(),this.updateInterval&&(this.$_updateTimeout=setTimeout(()=>{this.$_updateTimeout=0,this.$_scrollDirty&&e()},this.updateInterval))}},handleVisibilityChange(e,t){this.ready&&(e||t.boundingClientRect.width!==0||t.boundingClientRect.height!==0?(this.$emit(`visible`),requestAnimationFrame(()=>{this.updateVisibleItems(!1)})):this.$emit(`hidden`))},updateVisibleItems(e,t=!1){let n=this.itemSize,r=this.gridItems||1,i=this.itemSecondarySize||n,a=this.$_computedMinItemSize,o=this.typeField,s=this.simpleArray?null:this.keyField,c=this.items,l=c.length,u=this.sizes,d=this.$_views,f=this.$_unusedViews,p=this.pool,m=this.itemIndexByKey,h,g,_,v,y;if(!l)h=g=v=y=_=0;else if(this.$_prerender)h=v=0,g=y=Math.min(this.prerender,c.length),_=null;else{let e=this.getScroll();if(t){let t=e.start-this.$_lastUpdateScrollPosition;if(t<0&&(t=-t),n===null&&t<a||t<n)return{continuous:!0}}this.$_lastUpdateScrollPosition=e.start;let i=this.buffer;e.start-=i,e.end+=i;let o=0;if(this.$refs.before&&(o=this.$refs.before.scrollHeight,e.start-=o),this.$refs.after){let t=this.$refs.after.scrollHeight;e.end+=t}if(n===null){let t,n=0,r=l-1,i=~~(l/2),a;do a=i,t=u[i].accumulator,t<e.start?n=i:i<l-1&&u[i+1].accumulator>e.start&&(r=i),i=~~((n+r)/2);while(i!==a);for(i<0&&(i=0),h=i,_=u[l-1].accumulator,g=i;g<l&&u[g].accumulator<e.end;g++);for(g===-1?g=c.length-1:(g++,g>l&&(g=l)),v=h;v<l&&o+u[v].accumulator<e.start;v++);for(y=v;y<l&&o+u[y].accumulator<e.end;y++);}else{h=~~(e.start/n*r);let t=h%r;h-=t,g=Math.ceil(e.end/n*r),v=Math.max(0,Math.floor((e.start-o)/n*r)),y=Math.floor((e.end-o)/n*r),h<0&&(h=0),g>l&&(g=l),v<0&&(v=0),y>l&&(y=l),_=Math.ceil(l/r)*n}}g-h>H.itemsLimit&&this.itemsLimitError(),this.totalSize=_;let b,x=h<=this.$_endIndex&&g>=this.$_startIndex;if(x)for(let t=0,n=p.length;t<n;t++)b=p[t],b.nr.used&&(e&&(b.nr.index=m[b.item[s]]),(b.nr.index==null||b.nr.index<h||b.nr.index>=g)&&this.unuseView(b));let S=x?null:new Map,C,w,T;for(let e=h;e<g;e++){C=c[e];let t=s?C[s]:C;if(t==null)throw Error(`Key is ${t} on item (keyField is '${s}')`);if(b=d.get(t),!n&&!u[e].size){b&&this.unuseView(b);continue}w=C[o];let a=f.get(w),l=!1;if(!b)x?b=a&&a.length?a.pop():this.addView(p,e,C,t,w):(T=S.get(w)||0,(!a||T>=a.length)&&(b=this.addView(p,e,C,t,w),this.unuseView(b,!0),a=f.get(w)),b=a[T],S.set(w,T+1)),d.delete(b.nr.key),b.nr.used=!0,b.nr.index=e,b.nr.key=t,b.nr.type=w,d.set(t,b),l=!0;else if(!b.nr.used&&(b.nr.used=!0,l=!0,a)){let e=a.indexOf(b);e!==-1&&a.splice(e,1)}b.item=C,l&&(e===c.length-1&&this.$emit(`scroll-end`),e===0&&this.$emit(`scroll-start`)),n===null?(b.position=u[e-1].accumulator,b.offset=0):(b.position=Math.floor(e/r)*n,b.offset=e%r*i)}return this.$_startIndex=h,this.$_endIndex=g,this.emitUpdate&&this.$emit(`update`,h,g,v,y),clearTimeout(this.$_sortTimer),this.$_sortTimer=setTimeout(this.sortViews,this.updateInterval+300),{continuous:x}},getListenerTarget(){let e=G(this.$el);return window.document&&(e===window.document.documentElement||e===window.document.body)&&(e=window),e},getScroll(){let{$el:e,direction:t}=this,n=t===`vertical`,r;if(this.pageMode){let t=e.getBoundingClientRect(),i=n?t.height:t.width,a=-(n?t.top:t.left),o=n?window.innerHeight:window.innerWidth;a<0&&(o+=a,a=0),a+o>i&&(o=i-a),r={start:a,end:a+o}}else r=n?{start:e.scrollTop,end:e.scrollTop+e.clientHeight}:{start:e.scrollLeft,end:e.scrollLeft+e.clientWidth};return r},applyPageMode(){this.pageMode?this.addListeners():this.removeListeners()},addListeners(){this.listenerTarget=this.getListenerTarget(),this.listenerTarget.addEventListener(`scroll`,this.handleScroll,Y?{passive:!0}:!1),this.listenerTarget.addEventListener(`resize`,this.handleResize)},removeListeners(){this.listenerTarget&&=(this.listenerTarget.removeEventListener(`scroll`,this.handleScroll),this.listenerTarget.removeEventListener(`resize`,this.handleResize),null)},scrollToItem(e){let t,n=this.gridItems||1;t=this.itemSize===null?e>0?this.sizes[e-1].accumulator:0:Math.floor(e/n)*this.itemSize,this.scrollToPosition(t)},scrollToPosition(e){let t=this.direction===`vertical`?{scroll:`scrollTop`,start:`top`}:{scroll:`scrollLeft`,start:`left`},n,r,i;if(this.pageMode){let a=G(this.$el),o=a.tagName===`HTML`?0:a[t.scroll],s=a.getBoundingClientRect(),c=this.$el.getBoundingClientRect()[t.start]-s[t.start];n=a,r=t.scroll,i=e+o+c}else n=this.$el,r=t.scroll,i=e;n[r]=i},itemsLimitError(){throw setTimeout(()=>{console.log(`It seems the scroller element isn't scrolling, so it tries to render all the items at once.`,`Scroller:`,this.$el),console.log(`Make sure the scroller has a fixed height (or width) and 'overflow-y' (or 'overflow-x') set to 'auto' so it can scroll correctly and only render the items visible in the scroll viewport.`)}),Error(`Rendered items limit reached`)},sortViews(){this.pool.sort((e,t)=>e.nr.index-t.nr.index)}}},he={key:0,ref:`before`,class:`vue-recycle-scroller__slot`},ge={key:1,ref:`after`,class:`vue-recycle-scroller__slot`};function _e(t,n,o,l,d,f){let h=v(`ResizeObserver`),g=i(`observe-visibility`);return r((c(),E(`div`,{class:T([`vue-recycle-scroller`,{ready:d.ready,"page-mode":o.pageMode,[`direction-${t.direction}`]:!0}]),onScrollPassive:n[0]||=(...e)=>f.handleScroll&&f.handleScroll(...e)},[t.$slots.before?(c(),E(`div`,he,[e(t.$slots,`before`)],512)):b(`v-if`,!0),(c(),m(a(o.listTag),{ref:`wrapper`,style:w({[t.direction===`vertical`?`minHeight`:`minWidth`]:d.totalSize+`px`}),class:T([`vue-recycle-scroller__item-wrapper`,o.listClass])},{default:u(()=>[(c(!0),E(_,null,y(d.pool,n=>(c(),m(a(o.itemTag),p({key:n.nr.id,style:d.ready?{transform:`translate${t.direction===`vertical`?`Y`:`X`}(${n.position}px) translate${t.direction===`vertical`?`X`:`Y`}(${n.offset}px)`,width:o.gridItems?`${t.direction===`vertical`&&o.itemSecondarySize||o.itemSize}px`:void 0,height:o.gridItems?`${t.direction===`horizontal`&&o.itemSecondarySize||o.itemSize}px`:void 0}:null,class:[`vue-recycle-scroller__item-view`,[o.itemClass,{hover:!o.skipHover&&d.hoverKey===n.nr.key}]]},s(o.skipHover?{}:{mouseenter:()=>{d.hoverKey=n.nr.key},mouseleave:()=>{d.hoverKey=null}})),{default:u(()=>[e(t.$slots,`default`,{item:n.item,index:n.nr.index,active:n.nr.used})]),_:2},1040,[`style`,`class`]))),128)),e(t.$slots,`empty`)]),_:3},8,[`style`,`class`])),t.$slots.after?(c(),E(`div`,ge,[e(t.$slots,`after`)],512)):b(`v-if`,!0),C(h,{onNotify:f.handleResize},null,8,[`onNotify`])],34)),[[g,f.handleVisibilityChange]])}Z.render=_e,Z.__file=`src/components/RecycleScroller.vue`;var Q={name:`DynamicScroller`,components:{RecycleScroller:Z},provide(){return typeof ResizeObserver<`u`&&(this.$_resizeObserver=new ResizeObserver(e=>{requestAnimationFrame(()=>{if(Array.isArray(e)){for(let t of e)if(t.target&&t.target.$_vs_onResize){let e,n;if(t.borderBoxSize){let r=t.borderBoxSize[0];e=r.inlineSize,n=r.blockSize}else e=t.contentRect.width,n=t.contentRect.height;t.target.$_vs_onResize(t.target.$_vs_id,e,n)}}})})),{vscrollData:this.vscrollData,vscrollParent:this,vscrollResizeObserver:this.$_resizeObserver}},inheritAttrs:!1,props:{...q,minItemSize:{type:[Number,String],required:!0}},emits:[`resize`,`visible`],data(){return{vscrollData:{active:!0,sizes:{},keyField:this.keyField,simpleArray:!1}}},computed:{simpleArray:J,itemsWithSize(){let e=[],{items:t,keyField:n,simpleArray:r}=this,i=this.vscrollData.sizes,a=t.length;for(let o=0;o<a;o++){let a=t[o],s=r?o:a[n],c=i[s];c===void 0&&!this.$_undefinedMap[s]&&(c=0),e.push({item:a,id:s,size:c})}return e}},watch:{items(){this.forceUpdate()},simpleArray:{handler(e){this.vscrollData.simpleArray=e},immediate:!0},direction(e){this.forceUpdate(!0)},itemsWithSize(e,t){let n=this.$el.scrollTop,r=0,i=0,a=Math.min(e.length,t.length);for(let o=0;o<a&&!(r>=n);o++)r+=t[o].size||this.minItemSize,i+=e[o].size||this.minItemSize;let o=i-r;o!==0&&(this.$el.scrollTop+=o)}},beforeCreate(){this.$_updates=[],this.$_undefinedSizes=0,this.$_undefinedMap={},this.$_events=V()},activated(){this.vscrollData.active=!0},deactivated(){this.vscrollData.active=!1},unmounted(){this.$_events.all.clear()},methods:{onScrollerResize(){this.$refs.scroller&&this.forceUpdate(),this.$emit(`resize`)},onScrollerVisible(){this.$_events.emit(`vscroll:update`,{force:!1}),this.$emit(`visible`)},forceUpdate(e=!1){(e||this.simpleArray)&&(this.vscrollData.sizes={}),this.$_events.emit(`vscroll:update`,{force:!0})},scrollToItem(e){let t=this.$refs.scroller;t&&t.scrollToItem(e)},getItemSize(e,t=void 0){let n=this.simpleArray?t??this.items.indexOf(e):e[this.keyField];return this.vscrollData.sizes[n]||0},scrollToBottom(){if(this.$_scrollingToBottom)return;this.$_scrollingToBottom=!0;let e=this.$el;this.$nextTick(()=>{e.scrollTop=e.scrollHeight+5e3;let t=()=>{e.scrollTop=e.scrollHeight+5e3,requestAnimationFrame(()=>{e.scrollTop=e.scrollHeight+5e3,this.$_undefinedSizes===0?this.$_scrollingToBottom=!1:requestAnimationFrame(t)})};requestAnimationFrame(t)})}}};function ve(t,n,r,i,a,o){let s=v(`RecycleScroller`);return c(),m(s,p({ref:`scroller`,items:o.itemsWithSize,"min-item-size":r.minItemSize,direction:t.direction,"key-field":`id`,"list-tag":t.listTag,"item-tag":t.itemTag},t.$attrs,{onResize:o.onScrollerResize,onVisible:o.onScrollerVisible}),{default:u(({item:n,index:r,active:i})=>[e(t.$slots,`default`,S(g({item:n.item,index:r,active:i,itemWithSize:n})))]),before:u(()=>[e(t.$slots,`before`)]),after:u(()=>[e(t.$slots,`after`)]),empty:u(()=>[e(t.$slots,`empty`)]),_:3},16,[`items`,`min-item-size`,`direction`,`list-tag`,`item-tag`,`onResize`,`onVisible`])}Q.render=ve,Q.__file=`src/components/DynamicScroller.vue`;var $={name:`DynamicScrollerItem`,inject:[`vscrollData`,`vscrollParent`,`vscrollResizeObserver`],props:{item:{required:!0},watchData:{type:Boolean,default:!1},active:{type:Boolean,required:!0},index:{type:Number,default:void 0},sizeDependencies:{type:[Array,Object],default:null},emitResize:{type:Boolean,default:!1},tag:{type:String,default:`div`}},emits:[`resize`],computed:{id(){if(this.vscrollData.simpleArray)return this.index;if(this.vscrollData.keyField in this.item)return this.item[this.vscrollData.keyField];throw Error(`keyField '${this.vscrollData.keyField}' not found in your item. You should set a valid keyField prop on your Scroller`)},size(){return this.vscrollData.sizes[this.id]||0},finalActive(){return this.active&&this.vscrollData.active}},watch:{watchData:`updateWatchData`,id(e,t){if(this.$el.$_vs_id=this.id,this.size||this.onDataUpdate(),this.$_sizeObserved){let n=this.vscrollData.sizes[t],r=this.vscrollData.sizes[e];n!=null&&n!==r&&this.applySize(n)}},finalActive(e){this.size||(e?this.vscrollParent.$_undefinedMap[this.id]||(this.vscrollParent.$_undefinedSizes++,this.vscrollParent.$_undefinedMap[this.id]=!0):this.vscrollParent.$_undefinedMap[this.id]&&(this.vscrollParent.$_undefinedSizes--,this.vscrollParent.$_undefinedMap[this.id]=!1)),this.vscrollResizeObserver?e?this.observeSize():this.unobserveSize():e&&this.$_pendingVScrollUpdate===this.id&&this.updateSize()}},created(){if(!this.$isServer&&(this.$_forceNextVScrollUpdate=null,this.updateWatchData(),!this.vscrollResizeObserver)){for(let e in this.sizeDependencies)this.$watch(()=>this.sizeDependencies[e],this.onDataUpdate);this.vscrollParent.$_events.on(`vscroll:update`,this.onVscrollUpdate)}},mounted(){this.finalActive&&(this.updateSize(),this.observeSize())},beforeUnmount(){this.vscrollParent.$_events.off(`vscroll:update`,this.onVscrollUpdate),this.unobserveSize()},methods:{updateSize(){this.finalActive?this.$_pendingSizeUpdate!==this.id&&(this.$_pendingSizeUpdate=this.id,this.$_forceNextVScrollUpdate=null,this.$_pendingVScrollUpdate=null,this.computeSize(this.id)):this.$_forceNextVScrollUpdate=this.id},updateWatchData(){this.watchData&&!this.vscrollResizeObserver?this.$_watchData=this.$watch(`item`,()=>{this.onDataUpdate()},{deep:!0}):this.$_watchData&&=(this.$_watchData(),null)},onVscrollUpdate({force:e}){!this.finalActive&&e&&(this.$_pendingVScrollUpdate=this.id),(this.$_forceNextVScrollUpdate===this.id||e||!this.size)&&this.updateSize()},onDataUpdate(){this.updateSize()},computeSize(e){this.$nextTick(()=>{if(this.id===e){let e=this.$el.offsetWidth,t=this.$el.offsetHeight;this.applyWidthHeight(e,t)}this.$_pendingSizeUpdate=null})},applyWidthHeight(e,t){let n=~~(this.vscrollParent.direction===`vertical`?t:e);n&&this.size!==n&&this.applySize(n)},applySize(e){this.vscrollParent.$_undefinedMap[this.id]&&(this.vscrollParent.$_undefinedSizes--,this.vscrollParent.$_undefinedMap[this.id]=void 0),this.vscrollData.sizes[this.id]=e,this.emitResize&&this.$emit(`resize`,this.id)},observeSize(){this.vscrollResizeObserver&&(this.$_sizeObserved||=(this.vscrollResizeObserver.observe(this.$el),this.$el.$_vs_id=this.id,this.$el.$_vs_onResize=this.onResize,!0))},unobserveSize(){this.vscrollResizeObserver&&(this.$_sizeObserved&&=(this.vscrollResizeObserver.unobserve(this.$el),this.$el.$_vs_onResize=void 0,!1))},onResize(e,t,n){this.id===e&&this.applyWidthHeight(t,n)}},render(){return f(this.tag,this.$slots.default())}};$.__file=`src/components/DynamicScrollerItem.vue`;var ye=x({__name:`VirtualList`,props:{items:{},keyProp:{}},setup(t){return(n,r)=>(c(),m(h(Q),{items:t.items,"min-item-size":30,"key-field":t.keyProp,"page-mode":``},{default:u(({item:r,active:i,index:a})=>[C(h($),{item:r,active:i,"data-index":a},{default:u(()=>[e(n.$slots,`default`,p({key:r[t.keyProp]},{item:r,index:a,active:i}))]),_:2},1032,[`item`,`active`,`data-index`])]),_:3},8,[`items`,`key-field`]))}}),be=Object.assign(ye,{__name:`DataVirtualList`});export{be as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{At as e,Ht as t,Tt as n,en as r,h as i,in as a,it as o,kt as s,lt as c,mt as l,st as u,tn as d,tt as f,ut as p}from"./
|
|
1
|
+
import{At as e,Ht as t,Tt as n,en as r,h as i,in as a,it as o,kt as s,lt as c,mt as l,st as u,tn as d,tt as f,ut as p}from"./Cysfad9V.js";var m={flex:`col gap-2`,"max-w-90vw":``,"min-w-30vw":``,border:`~ base rounded-xl`,"bg-glass":``},h={key:0},g=[`title`],_=[`checked`,`onChange`],v={"text-sm":``},y=[`title`],b={key:0,op75:``,"i-ph-selection-slash-duotone":``},x={key:1,op75:``,"i-ph-selection-plus-duotone":``},S=l({__name:`SearchPanel`,props:{rules:{},modelValue:{default:()=>({search:``,selected:null})},selectedContainerClass:{default:``}},emits:[`update:modelValue`],setup(l,{emit:S}){let C=l,w=i(C,`modelValue`,S);function T(e){let{modelValue:t}=C;return t?.selected?t.selected.includes(e.name):!0}function E(e){let{rules:t}=C;w?.value?.selected||(w.value.selected=t.map(e=>e.name)),w.value.selected.includes(e.name)?w.value.selected=w.value.selected.filter(t=>t!==e.name):w.value.selected.push(e.name),w?.value?.selected.length===C.rules.length&&(w.value.selected=null)}function D(){w?.value?.selected?.length===C.rules.length?w.value.selected=null:w?.value?.selected==null?w.value.selected=[]:w.value.selected=C.rules.map(e=>e.name).filter(e=>!w.value.selected?.includes(e))}function O(){w?.value?.selected?.length===0?w.value.selected=null:w.value.selected=[]}return(i,S)=>(n(),p(`div`,m,[l.modelValue.search===!1?c(``,!0):(n(),p(`div`,h,[t(u(`input`,{"onUpdate:modelValue":S[0]||=e=>r(w).search=e,p2:``,px4:``,"w-full":``,style:{outline:`none`},placeholder:`Search`},null,512),[[f,r(w).search]])])),l.rules.length?(n(),p(`div`,{key:1,class:d(l.selectedContainerClass),flex:`~ gap-2 wrap`,p2:``,border:`t base`},[(n(!0),p(o,null,s(l.rules,e=>(n(),p(`label`,{key:e.name,border:`~ base rounded-md`,px2:``,py1:``,flex:`~ items-center gap-1`,"select-none":``,title:e.description,class:d(T(e)?`bg-active`:`grayscale op50`)},[u(`input`,{type:`checkbox`,mr1:``,checked:T(e),onChange:t=>E(e)},null,40,_),u(`div`,{class:d(e.icon),"icon-catppuccin":``},null,2),u(`div`,v,a(e.description||e.name),1)],10,g))),128)),u(`button`,{"rounded-md":``,p1:``,flex:`~ items-center gap-1`,"select-none":``,hover:`bg-active`,title:`Reverse Selection`,onClick:D},[...S[1]||=[u(`div`,{op75:``,"i-ph-selection-background-duotone":``},null,-1)]]),u(`button`,{"rounded-md":``,p1:``,flex:`~ items-center gap-1`,"select-none":``,hover:`bg-active`,title:r(w).selected?.length===0?`Select All`:`Unselect All`,onClick:O},[r(w).selected?.length===0?(n(),p(`div`,b)):(n(),p(`div`,x))],8,y)],2)):c(``,!0),e(i.$slots,`default`)]))}}),C=Object.assign(S,{__name:`DataSearchPanel`});export{C as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Ct as e,Jt as t,Tt as n,Vt as r,W as i,bt as a,ct as o,ft as s,in as c,it as l,kt as u,mt as d,ot as f,pt as p,st as m,tn as h,ut as g,x as _,y as v}from"./
|
|
1
|
+
import{Ct as e,Jt as t,Tt as n,Vt as r,W as i,bt as a,ct as o,ft as s,in as c,it as l,kt as u,mt as d,ot as f,pt as p,st as m,tn as h,ut as g,x as _,y as v}from"./Cysfad9V.js";import{t as y}from"./CFJX1-o6.js";import{t as b}from"./Bdpt9CY1.js";import{t as x}from"./DQtLZa7C.js";var S=d({__name:`ComparisonMetric`,props:{current:{},previous:{}},setup(e){let t=e,r=f(()=>t.previous===t.current),i=f(()=>Math.abs((t.current-t.previous)/t.previous*100).toFixed(r.value?0:2)),a=f(()=>r.value?``:t.current>t.previous?`+`:`-`),o=f(()=>r.value?`text-gray-500`:t.current>t.previous?`text-green-500`:`text-red-500`);return(e,t)=>(n(),g(`span`,{"text-4":``,"mt-1":``,"font-mono":``,class:h(o.value)},c(a.value)+c(i.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=d({__name:`MetricCard`,props:{name:{},description:{},icon:{},current:{},previous:{},format:{}},setup(e){let t=e,r=f(()=>t.format===`bytes`?x(t.current):t.current);return(t,i)=>{let a=C;return n(),g(l,null,[m(`div`,{"font-500":``,op50:``,"text-4":``,flex:`~ items-center gap-2`,title:e.description},[m(`div`,{class:h([e.icon,`text-xl`])},null,2),s(` `+c(e.name),1)],8,w),m(`div`,T,[e.format===`bytes`?(n(),g(`div`,E,[m(`span`,D,c(r.value[0]),1),m(`span`,O,c(r.value[1]),1)])):(n(),g(`div`,k,[m(`span`,A,c(r.value),1)])),p(a,{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=d({__name:`index`,setup(c){let d=t(!1),x=i().params,S=v(),C=t([]);e(async()=>{d.value=!0,C.value=await S.value[`vite:rolldown:get-session-compare-summary`]({sessions:x.sessions.split(`,`)}),d.value=!1});let w=f(()=>C.value.map((e,t)=>({...e,createdAt:new Date(e.meta?.timestamp??0),title:t===0?`Session A`:`Session B`}))),T=f(()=>{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(e,t)=>{let i=_,c=y,f=b,v=M;return d.value?(n(),o(i,{key:0})):(n(),g(`div`,N,[m(`div`,P,[p(c,{"btn-action":``,to:{path:`/`}},{default:r(()=>[...t[0]||=[m(`div`,{"i-ph-arrow-bend-up-left-duotone":``},null,-1),s(` Re-select Session `,-1)]]),_:1})]),m(`div`,F,[t[1]||=m(`div`,{py3:``,"indent-2":``},` Compare Overview `,-1),p(f,{sessions:w.value},null,8,[`sessions`]),m(`div`,I,[(n(!0),g(l,null,u(T.value,(e,t)=>(n(),g(`div`,{key:e.name,class:h(t<2?`col-span-2`:`col-span-1`),border:`~ base rounded`,p4:``,flex:`~ col`,gap2:``},[p(v,a({ref_for:!0},e),null,16)],2))),128))])])]))}}});export{L as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as e,Tt as t,V as n,Vt as r,ft as i,in as a,pt as o,st as s,ut as c}from"./
|
|
1
|
+
import{C as e,Tt as t,V as n,Vt as r,ft as i,in as a,pt as o,st as s,ut as c}from"./Cysfad9V.js";import{t as l}from"./CFJX1-o6.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=e({__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(e){let g=e;return n({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: }`}]}),(n,g)=>{let _=l;return t(),c(`div`,u,[s(`div`,d,[s(`h1`,{class:`font-semibold leading-none mb-4 sm:text-[110px] tabular-nums text-[80px]`,textContent:a(e.statusCode)},null,8,f),s(`h2`,{class:`font-semibold mb-2 sm:text-3xl text-2xl`,textContent:a(e.statusMessage)},null,8,p),s(`p`,{class:`mb-4 px-2 text-[#64748B] text-md`,textContent:a(e.description)},null,8,m),s(`div`,h,[o(_,{to:`/`,class:`font-medium hover:text-[#00DC82] text-sm underline underline-offset-3`},{default:r(()=>[i(a(e.backHome),1)]),_:1})])])])}}},[[`__scopeId`,`data-v-163e3310`]]);export{g as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Tt as e,Vt as t,W as n,c as r,ct as i,en as a,ft as o,in as s,it as c,kt as l,lt as u,mt as d,ot as f,pt as p,st as m,tn as h,ut as g,x as _,xt as v,y}from"./
|
|
1
|
+
import{Tt as e,Vt as t,W as n,c as r,ct as i,en as a,ft as o,in as s,it as c,kt as l,lt as u,mt as d,ot as f,pt as p,st as m,tn as h,ut as g,x as _,xt as v,y}from"./Cysfad9V.js";import{t as b}from"./CFJX1-o6.js";import"./DQtLZa7C.js";import"./BkjxFYSI.js";import"./DAYnNRKo.js";import{r as x}from"./B4sg2h3A.js";import{t as S}from"./BZK-pdMD.js";import{r as C,t as w}from"./cT-zQbp8.js";import"./iqmTIKrs.js";import{t as T}from"./C69S_2QT.js";import{t as E}from"./CPaPq6PM.js";import{t as D}from"./BIVRCSMb.js";var O={flex:``,pb2:``},k=d({__name:`FlatList`,props:{chunks:{},session:{}},setup(n){return(r,a)=>{let o=x,s=C,c=E;return e(),i(c,{items:n.chunks,"key-prop":`chunk_id`},{default:t(({item:n})=>[m(`div`,O,[p(s,{chunk:n,link:``,"w-full":``,"font-mono":``,border:`~ rounded base`,px2:``,py1:``,"text-sm":``,hover:`bg-active`,flex:`~ gap-4 items-center`},{"left-after":t(()=>[n.is_initial?(e(),i(o,{key:0,text:`initial`})):u(``,!0)]),_:2},1032,[`chunk`])])]),_:1},8,[`items`])}}}),A=Object.assign(k,{__name:`ChunksFlatList`}),j={op50:``,"font-mono":``,w12:``},M=[`title`],N={flex:`~ gap-1 items-center`},P=d({__name:`Graph`,props:{session:{},chunks:{}},setup(r){let c=r,l=f(()=>c.chunks),d=n();return T({modules:l,spacing:{width:450,height:55,linkOffset:15,margin:120,gap:150},generateGraph:e=>{let{isFirstCalculateGraph:t,scale:n,spacing:r,tree:i,hierarchy:o,collapsedNodes:s,container:c,modulesMap:u,nodes:d,links:f,nodesMap:p,linksMap:m,width:h,height:g,childToParentMap:_}=e;return()=>{h.value=window.innerWidth,g.value=window.innerHeight;let e=l.value.filter(e=>e.reason===`entry`),y=new Set,b=o({module:{id:`~root`}},n=>`${n.module?.id}`==`~root`?(e.forEach(e=>{y.add(e),t.value&&_.set(e.id,`~root`)}),e.map(e=>({module:e,expanded:!s.has(e.id),hasChildren:!1}))):s.has(`${n.module?.id}`)?[]:n.module.imports?.map(e=>{let r=u.value.get(`${e.chunk_id}`);if(!(!r||y.has(r)))return t.value&&_.set(r.id,n.module.id),y.add(r),{module:r,expanded:!s.has(r.id),hasChildren:!1}}).filter(e=>e!==void 0));t.value&&=!1,i().nodeSize([a(r.height),a(r.width)+a(r.gap)])(b);let x=b.descendants();for(let e of x)[e.x,e.y]=[e.y-a(r.width),e.x];let S=Math.min(...x.map(e=>e.x)),C=Math.min(...x.map(e=>e.y));if(S<a(r.margin))for(let e of x)e.x+=Math.abs(S)+a(r.margin);if(C<a(r.margin))for(let e of x)e.y+=Math.abs(C)+a(r.margin);d.value=x,p.clear();for(let e of x)p.set(`${e.data.module.id}`,e);let w=b.links().filter(e=>`${e.source.data.module.id}`!=`~root`).map(e=>({...e,id:`${e.source.data.module.id}|${e.target.data.module.id}`})),T=l.value.flatMap(e=>e.imports.filter(t=>!w.find(n=>n.id===`${e.chunk_id}|${t.chunk_id}`)).map(t=>({source:p.get(`${e.chunk_id}`),target:p.get(`${t.chunk_id}`),id:`${e.chunk_id}|${t.chunk_id}`}))),E=[...w,...T];m.clear();for(let e of E)m.set(e.id,e);f.value=E,v(()=>{h.value=c.value.scrollWidth/n.value+a(r.margin),g.value=c.value.scrollHeight/n.value+a(r.margin)})}}}),(n,c)=>{let f=x,h=b,g=D;return e(),i(g,{session:r.session,modules:l.value,"expand-controls":!1},{default:t(({node:n})=>[p(h,{class:`flex items-center`,to:{path:a(d).path,query:{chunk:n.data.module.chunk_id}}},{default:t(()=>[m(`span`,j,`#`+s(n.data.module.id),1),m(`div`,{flex:`~ gap-2 items-center`,title:`Chunk #${n.data.module.id}`},[m(`div`,null,s(n.data.module.name||`[unnamed]`),1),p(f,{text:n.data.module.reason},null,8,[`text`]),n.data.module.is_initial?(e(),i(f,{key:0,text:`initial`})):u(``,!0)],8,M),c[1]||=m(`div`,{"flex-auto":``},null,-1),m(`div`,N,[c[0]||=m(`div`,{"i-ph-package-duotone":``},null,-1),o(` `+s(n.data.module.modules.length),1)])]),_:2},1032,[`to`])]),_:1},8,[`session`,`modules`])}}}),F=Object.assign(P,{__name:`ChunksGraph`}),I={key:1,relative:``,"max-h-screen":``,"of-hidden":``},L={absolute:``,"left-4":``,"top-4":``,"z-panel-nav":``},R={flex:`~ gap-2 items-center`,p2:``,border:`~ base rounded-xl`,"bg-glass":``},z=[`onClick`],B={key:0,class:`px5 pt24 of-auto h-screen`,flex:`~ col gap-4`},V={key:1,class:`px5 pt24 of-auto h-screen`,flex:`~ col gap-4`},H=d({__name:`chunks`,props:{session:{}},setup(t){let n=t,d=[{label:`List`,value:`list`,icon:`i-ph-list-bullets-duotone`},{label:`Detailed List`,value:`detailed-list`,icon:`i-ph-list-magnifying-glass-duotone`},{label:`Graph`,value:`graph`,icon:`i-ph-graph-duotone`}],v=y(),{state:b,isLoading:x}=r(async()=>await v.value[`vite:rolldown:get-chunks-graph`]?.({session:n.session.id}),null),C=f(()=>b.value?.map(e=>({...e,id:`${e.chunk_id}`}))??[]);function T(e){S.value.chunkViewType=e}return(n,r)=>{let f=_,v=A,y=w,E=F;return a(x)?(e(),i(f,{key:0})):(e(),g(`div`,I,[m(`div`,L,[m(`div`,R,[r[0]||=m(`span`,{op50:``,pl2:``,"text-sm":``},`View as`,-1),(e(),g(c,null,l(d,e=>m(`button`,{key:e.value,"btn-action":``,class:h(a(S).chunkViewType===e.value?`bg-active`:`grayscale op50`),onClick:t=>T(e.value)},[m(`div`,{class:h(e.icon)},null,2),o(` `+s(e.label),1)],10,z)),64))])]),a(S).chunkViewType===`list`?(e(),g(`div`,B,[p(v,{session:t.session,chunks:C.value},null,8,[`session`,`chunks`])])):u(``,!0),a(S).chunkViewType===`detailed-list`?(e(),g(`div`,V,[(e(!0),g(c,null,l(a(b),n=>(e(),i(y,{key:n.id,border:`~ base rounded-lg`,p3:``,chunk:n,chunks:a(b),session:t.session},null,8,[`chunk`,`chunks`,`session`]))),128))])):a(S).chunkViewType===`graph`?(e(),i(E,{key:2,session:t.session,chunks:C.value},null,8,[`session`,`chunks`])):u(``,!0)]))}}});export{H as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as e,Tt as t,V as n,in as r,st as i,ut as a}from"./
|
|
1
|
+
import{C as e,Tt as t,V as n,in as r,st as i,ut as a}from"./Cysfad9V.js";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=e({__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(e){let d=e;return n({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: }`}]}),(n,d)=>(t(),a(`div`,o,[i(`div`,s,[i(`h1`,{class:`font-semibold leading-none mb-4 sm:text-[110px] tabular-nums text-[80px]`,textContent:r(e.statusCode)},null,8,c),i(`h2`,{class:`font-semibold mb-2 sm:text-3xl text-2xl`,textContent:r(e.statusMessage)},null,8,l),i(`p`,{class:`mb-4 px-2 text-[#64748B] text-md`,textContent:r(e.description)},null,8,u)])]))}},[[`__scopeId`,`data-v-f0602c85`]]);export{d as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Tt as e,Vt as t,en as n,it as r,lt as i,mt as a,ot as o,pt as s,st as c,ut as l}from"./
|
|
1
|
+
import{Tt as e,Vt as t,en as n,it as r,lt as i,mt as a,ot as o,pt as s,st as c,ut as l}from"./Cysfad9V.js";import{n as u}from"./DQtLZa7C.js";import{t as d}from"./D3IV73AC.js";import{r as f}from"./BZK-pdMD.js";var p={"text-xs":``,"font-mono":``,flex:`~ items-center gap-3`,ml2:``},m={flex:`~ gap-1 items-center`},h=a({__name:`BuildMetrics`,props:{metrics:{}},setup(a){let h=a,g=o(()=>{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);return{resolveIds:t,loads:n,transforms:r,total:t+n+r}}),_=o(()=>(h.metrics?.transforms)?.[0]?.source_code_size),v=o(()=>{let e=h.metrics?.transforms.filter(e=>e.transformed_code_size);return e?.[e.length-1]?.transformed_code_size});return(a,o)=>{let h=d,y=f;return e(),l(`div`,p,[s(h,{duration:g.value.resolveIds,flex:`~ gap-1 items-center`,title:`Resolve Id hooks cost: ${n(u)(g.value.resolveIds,!0)}`},{default:t(()=>[...o[0]||=[c(`span`,{"i-ph-magnifying-glass-duotone":``,"inline-block":``},null,-1)]]),_:1},8,[`duration`,`title`]),s(h,{duration:g.value.loads,flex:`~ gap-1 items-center`,title:`Load hooks cost: ${n(u)(g.value.loads,!0)}`},{default:t(()=>[...o[1]||=[c(`span`,{"i-ph-upload-simple-duotone":``,"inline-block":``},null,-1)]]),_:1},8,[`duration`,`title`]),s(h,{duration:g.value.transforms,flex:`~ gap-1 items-center`,title:`Transform hooks cost: ${n(u)(g.value.transforms,!0)}`},{default:t(()=>[...o[2]||=[c(`span`,{"i-ph-magic-wand-duotone":``,"inline-block":``},null,-1)]]),_:1},8,[`duration`,`title`]),o[6]||=c(`span`,{op40:``},`|`,-1),s(h,{duration:g.value.total,flex:`~ gap-1 items-center`,title:`Total build cost: ${n(u)(g.value.total,!0)}`},{default:t(()=>[...o[3]||=[c(`span`,{"i-ph-clock-duotone":``,"inline-block":``},null,-1)]]),_:1},8,[`duration`,`title`]),_.value&&v.value?(e(),l(r,{key:0},[o[5]||=c(`span`,{op40:``},`|`,-1),c(`div`,m,[s(y,{title:`Source code size`,bytes:_.value},null,8,[`bytes`]),o[4]||=c(`span`,{"i-ph-arrow-right-duotone":``,op50:``},null,-1),s(y,{title:`Transformed code size`,bytes:v.value},null,8,[`bytes`])])],64)):i(``,!0)])}}}),g=Object.assign(h,{__name:`ModulesBuildMetrics`});export{g as t};
|