mirror of
https://github.com/samvallad33/vestige.git
synced 2026-05-31 19:45:14 +02:00
4 lines
20 KiB
JavaScript
4 lines
20 KiB
JavaScript
|
|
import"../chunks/Bzak7iHL.js";import{o as Ut}from"../chunks/CNjeV5xa.js";import{p as Mt,e as r,d as a,r as e,t as S,g as t,u as H,a as Et,s as rt,h as $,f as Rt,c as Vt}from"../chunks/CvjSAYrz.js";import{d as Ht,s as o,a as at,e as Ft}from"../chunks/FzvEaXMa.js";import{i as Y}from"../chunks/ciN1mm2W.js";import{e as V,i as Yt}from"../chunks/DTnG8poT.js";import{a as m,c as Jt,f as h}from"../chunks/BsvCUYx-.js";import{s as yt}from"../chunks/CNfQDikv.js";import{s as bt}from"../chunks/DPl3NjBv.js";import{s as wt}from"../chunks/Bhad70Ss.js";function Xt(y,x,A=3){const g={};for(const v of y){g[v]={};for(const u of y)g[v][u]={count:0,topNames:[]}}for(const v of x){const u=v.origin_project;if(g[u])for(const L of v.transferred_to)g[u][L]&&(g[u][L].count+=1,g[u][L].topNames.push(v.name))}const d=Math.max(0,A);for(const v of y)for(const u of y)g[v][u].topNames=g[v][u].topNames.slice(0,d);return g}function te(y,x){let A=0;for(const g of y){const d=x[g];if(d)for(const v of y){const u=d[v];u&&u.count>A&&(A=u.count)}}return A}function ee(y,x){var g;const A=[];for(const d of y)for(const v of y){const u=(g=x[d])==null?void 0:g[v];u&&u.count>0&&A.push({from:d,to:v,count:u.count,topNames:u.topNames})}return A.sort((d,v)=>v.count-d.count)}function re(y){return y?y.length>12?y.slice(0,11)+"…":y:""}var ae=h('<th class="h-20 min-w-16 max-w-20 align-bottom"><div class="mx-auto flex h-20 w-6 items-end justify-center" style="writing-mode: vertical-rl; transform: rotate(180deg);"><span class="text-[11px] text-dim font-medium tracking-wide"> </span></div></th>'),ne=h('<td class="p-0"><button type="button" class="group relative h-10 w-full min-w-12 rounded-md border transition-all duration-200 hover:scale-110 hover:z-10 focus:outline-none focus:ring-2 focus:ring-synapse-glow"><span> </span></button></td>'),se=h('<tr><td class="w-24 pr-2 text-right text-[11px] text-dim"> </td><!></tr>'),oe=h('<div class="truncate text-text"> </div>'),ie=h('<div class="space-y-1 border-t border-synapse/10 pt-2"><div class="text-[10px] uppercase tracking-wider text-muted">Top patterns</div> <!></div>'),ce=h('<div class="text-muted">No transfers recorded</div>'),le=h('<div class="glass-panel pointer-events-none fixed z-50 max-w-xs rounded-lg p-3 text-xs shadow-2xl"><div class="mb-1 flex items-center gap-2"><span class="font-mono text-dim"> </span> <span class="text-synapse-glow">→</span> <span class="font-mono text-bright"> </span></div> <div class="mb-2 text-lg font-semibold text-bright"> <span class="text-xs font-normal text-dim"> </span></div> <!></div>'),de=h('<div class="rounded-lg bg-white/[0.02] p-4 text-center text-xs text-muted">No cross-project transfers recorded yet.</div>'),ve=h('<div class="truncate text-[11px] text-muted"> </div>'),ue=h('<button type="button"><div class="flex min-w-0 flex-col items-start gap-0.5"><div class="flex items-center gap-1.5 text-xs"><span class="font-mono text-dim"> </span> <span class="text-synapse-glow">→</span> <span class="font-mono text-bright"> </span></div> <!></div> <span class="ml-3 flex-shrink-0 rounded-full bg-synapse/15 px-2 py-0.5 text-xs font-semibold text-synapse-glow"> </span></button>'),fe=h('<div class="glass-panel relative rounded-2xl p-5"><div class="hidden md:block"><div class="mb-3 flex items-center justify-between"><div class="text-xs text-dim">Rows = origin project · Columns = destination project</div> <div class="flex items-center gap-2"><span class="text-[10px] text-muted">0</span> <div class="h-2 w-32 rounded-full" style="background: linear-gradient(to right, rgba(255,255,255,0.05), rgba(99,102,241,0.5), rgba(168,85,247,0.85));"></div> <span class="text-[10px] text-muted"> </span></div></div> <div class="overflow-x-auto"><table class="w-full border-separate" style="border-spacing: 4px;"><thead><tr><th class="w-24"></th><!></tr></thead><tbody></tbody></table></div> <!></div> <div class="space-y-2 md:hidden"><div class="mb-2 text-xs text-dim"> </div> <!></div></div>');function pe(y,x){Mt(x,!0);const A=H(()=>Xt(x.projects,x.patterns)),g=H(()=>te(x.projects,t(A))||1);let d=rt(null);function v(s){if(s=
|
||
|
|
${t(w).transferred_to.length===1?"project":"projects"}`),o(Bt,t(w).transfer_count),o(Qt,`${qt??""}%`)},[()=>gt(t(w).last_used),()=>(t(w).confidence*100).toFixed(0)]),m(D,ut)}),e(R),m(O,R)};Y(N,O=>{t(Q).length===0?O(P):O(W,!1)})}e(p),e(_);var F=a(_,2),z=r(F),M=r(z),U=r(M,!0);e(M);var E=a(M),Z=a(E),T=r(Z,!0);e(Z);var G=a(Z),K=a(G),dt=r(K,!0);e(K);var vt=a(K);e(z);var mt=a(z,2),Lt=r(mt,!0);e(mt),e(F),S(()=>{o(b,`${t(Q).length??""}
|
||
|
|
${t(Q).length===1?"pattern":"patterns"}`),o(U,t(st)),o(E,` pattern${t(st)===1?"":"s"} across `),o(T,t(X)),o(G,` project${t(X)===1?"":"s"}, `),o(dt,t(J)),o(vt,` total transfer${t(J)===1?"":"s"}`),o(Lt,t(d)==="All"?"All categories":t(d))}),m(i,c)};Y(Tt,i=>{t(L)?i(Ct):t(u)?i(_t,1):i(lt,!1)})}e(q),S(()=>bt(ct,1,`rounded-lg px-3 py-1.5 text-xs font-medium transition ${t(d)==="All"?"bg-synapse/25 text-synapse-glow":"text-dim hover:bg-white/[0.04] hover:text-text"}`)),at("click",ct,()=>ot("All")),m(y,q),Et()}Ht(["click"]);export{Fe as component};
|