studiograph 1.3.5 → 1.3.6
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/server/routes/sync-api.js +5 -1
- package/dist/server/routes/sync-api.js.map +1 -1
- package/dist/web/_app/immutable/chunks/{DMQKkbyp.js → BJ9jl0Ch.js} +1 -1
- package/dist/web/_app/immutable/chunks/{mLOCL_1Z.js → CIrQ5Q_s.js} +1 -1
- package/dist/web/_app/immutable/chunks/{DvPliCZE.js → D5ZViFW2.js} +1 -1
- package/dist/web/_app/immutable/chunks/{CR70O-Zc.js → DsbgM2i-.js} +1 -1
- package/dist/web/_app/immutable/chunks/{ChURX7q7.js → TSZNijCE.js} +1 -1
- package/dist/web/_app/immutable/chunks/{BNwaTAEi.js → tXD97DTQ.js} +1 -1
- package/dist/web/_app/immutable/entry/{app.BcjicA1n.js → app.CdnNX5l6.js} +2 -2
- package/dist/web/_app/immutable/entry/start.iFC6OsOv.js +1 -0
- package/dist/web/_app/immutable/nodes/{0.p2-jprGE.js → 0.tPvCEa21.js} +1 -1
- package/dist/web/_app/immutable/nodes/{1.DU93aLWG.js → 1.H1oiaH1s.js} +1 -1
- package/dist/web/_app/immutable/nodes/{2.cvPHG4LO.js → 2.CSeZ_u8Q.js} +1 -1
- package/dist/web/_app/immutable/nodes/{3.CTUfmgsr.js → 3.BOsBh9Hj.js} +3 -3
- package/dist/web/_app/immutable/nodes/{4.yO3SDYpr.js → 4.C-vpcKRQ.js} +1 -1
- package/dist/web/_app/immutable/nodes/{5.BQ_D1Eea.js → 5.DFtxzpCw.js} +1 -1
- package/dist/web/_app/immutable/nodes/{6.ljQTLrU2.js → 6.4MBbXASN.js} +1 -1
- package/dist/web/_app/immutable/nodes/{7.C_LqUu_m.js → 7.4lLsPgUC.js} +1 -1
- package/dist/web/_app/immutable/nodes/{8.BA0tZS13.js → 8.DchLEkW3.js} +1 -1
- package/dist/web/_app/version.json +1 -1
- package/dist/web/index.html +6 -6
- package/package.json +1 -1
- package/dist/web/_app/immutable/entry/start.Bwjb_6uL.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{f as dt,s as J,w as ut}from"../chunks/DP09rP34.js";import{a as k,s as Z,f as M,c as ft}from"../chunks/Cs_ROD7H.js";import{y as $,j as tt,R as mt,B as H,D as T,m as v,G as I,I as j,A as et,L as Q,K as S,f as ht,T as vt}from"../chunks/BeBar3OL.js";import{b as X,i as O}from"../chunks/xBRYfpah.js";import{A as yt}from"../chunks/
|
|
1
|
+
import{f as dt,s as J,w as ut}from"../chunks/DP09rP34.js";import{a as k,s as Z,f as M,c as ft}from"../chunks/Cs_ROD7H.js";import{y as $,j as tt,R as mt,B as H,D as T,m as v,G as I,I as j,A as et,L as Q,K as S,f as ht,T as vt}from"../chunks/BeBar3OL.js";import{b as X,i as O}from"../chunks/xBRYfpah.js";import{A as yt}from"../chunks/D5ZViFW2.js";import{g as pt}from"../chunks/tXD97DTQ.js";import{n as Y}from"../chunks/BJ9jl0Ch.js";const bt=async({params:g})=>{const{repo:o,type:l,id:c}=g,f=await dt(o,l,c);return{repo:o,type:l,id:c,entity:f}},Ht=Object.freeze(Object.defineProperty({__proto__:null,load:bt},Symbol.toStringTag,{value:"Module"}));var gt=M('<div class="loading-indicator svelte-1fltv0h">Loading editor...</div>'),wt=M('<div class="error-indicator svelte-1fltv0h"> </div>'),_t=M('<div><div class="header-mount svelte-1fltv0h"></div> <!> <!> <div></div></div>');function At(g,o){$(o,!0);let l,c,f=Q(!0),m=Q(null),p=[],b=[],w=[],d={},y=[],h=null,_=null,A=0;function B(){const e=window.StudioChrome,i=document.querySelector(".sg-chrome-overflow-menu");if(i&&(i.innerHTML=""),e&&(e.clearViewAction(),e.clearSaveHandlers()),_&&(_.el.removeEventListener("click",_.handler,!0),_=null),e){e.unmountHeader();for(const{event:r,fn:s}of w)e.off(r,s)}w=[];for(const r of p)r.remove();p=[];for(const r of b)r.remove();b=[],h&&(h.remove(),h=null);for(const[r,s]of Object.entries(d))s===void 0?document.body.removeAttribute(r):document.body.setAttribute(r,s);d={};for(const r of y)document.body.classList.remove(r);y=[],c&&(c.innerHTML="")}async function F(){const e=++A;S(f,!0),S(m,null),B();try{const i=`${o.appMountPath}/edit/${encodeURIComponent(o.repo)}/${encodeURIComponent(o.entityId)}`,r=await fetch(i);if(!r.ok)throw new Error(`Failed to load editor: ${r.status}`);if(e!==A)return;const s=await r.text(),P=new DOMParser().parseFromString(s,"text/html"),at=P.querySelectorAll('link[rel="stylesheet"]');for(const t of at){if(t.href.includes("chrome.css"))continue;let n=t.getAttribute("href")||"";n&&!n.startsWith("http")&&!n.startsWith("/")&&(n=`${o.appMountPath}/${n}`);const a=document.createElement("link");a.rel="stylesheet",a.href=n,document.head.appendChild(a),p.push(a)}const it=P.querySelectorAll("head style");for(const t of it){const n=document.createElement("style");n.textContent=t.textContent,document.head.appendChild(n),p.push(n)}h=document.createElement("style"),h.textContent=`
|
|
2
2
|
body.sg-chrome-active { height: auto !important; }
|
|
3
3
|
body.sg-chrome-active > :not(.sg-chrome-header):not(.sg-chrome-footer) { overflow: visible !important; }
|
|
4
4
|
`,document.head.appendChild(h);const L=P.body;for(const t of Array.from(L.attributes))t.name.startsWith("data-")&&(d[t.name]=document.body.getAttribute(t.name)??void 0,document.body.setAttribute(t.name,t.value));const st=Array.from(L.classList);for(const t of st)t!=="sg-chrome-active"&&(document.body.classList.contains(t)||(document.body.classList.add(t),y.push(t)));const ct=L.querySelectorAll("script"),z=[],K=[];for(const t of ct){if(t.src){const n=t.getAttribute("src")||"";if(n.includes("chrome.js"))continue;let a=n;a&&!a.startsWith("http")&&!a.startsWith("/")&&(a=`${o.appMountPath}/${a}`),z.push(a)}else t.textContent&&K.push(t.textContent);t.remove()}c.innerHTML=L.innerHTML;const u=window.StudioChrome;if(u){u.updateBreadcrumb(o.repo,o.entityId),u.mountHeader(l);const t=document.body.dataset.sgViewUrl,n=document.body.dataset.sgViewLabel;t?u.setViewAction(t,n):u.clearViewAction();const a=l.querySelector(".sg-chrome-back");if(a){const G=N=>{N.preventDefault(),N.stopPropagation(),pt(`/${o.repo}/${o.entityType}/${o.entityId}`)};a.addEventListener("click",G,!0),_={el:a,handler:G}}}let E=null;u&&(E=u.on,u.on=function(t,n){w.push({event:t,fn:n}),E.call(this,t,n)});const lt=`?_v=${Date.now()}`;for(const t of z){if(e!==A)return;await ot(t+lt)}for(const t of K){if(e!==A)return;const n=document.createElement("script");n.textContent=t,document.body.appendChild(n),b.push(n)}u&&E&&(u.on=E),S(f,!1)}catch(i){if(e!==A)return;S(m,i.message||"Failed to load editor",!0),S(f,!1)}}function ot(e){return new Promise((i,r)=>{const s=document.createElement("script");s.src=e,s.onload=()=>i(),s.onerror=()=>r(new Error(`Failed to load script: ${e}`)),document.body.appendChild(s),b.push(s)})}let x="";tt(()=>{const e=`${o.appMountPath}|${o.repo}|${o.entityId}`;x&&x!==e&&c&&F(),x=e}),mt(()=>(F(),B));var C=_t();let q;var V=H(C);X(V,e=>l=e,()=>l);var W=T(V,2);{var nt=e=>{var i=gt();k(e,i)};O(W,e=>{v(f)&&e(nt)})}var D=T(W,2);{var rt=e=>{var i=wt(),r=H(i,!0);I(i),j(()=>Z(r,v(m))),k(e,i)};O(D,e=>{v(m)&&e(rt)})}var U=T(D,2);let R;X(U,e=>c=e,()=>c),I(C),j(()=>{q=J(C,1,"editor-frame svelte-1fltv0h",null,q,{loading:v(f)}),R=J(U,1,"editor-container svelte-1fltv0h",null,R,{hidden:v(f)||!!v(m)})}),k(g,C),et()}var St=M('<div class="no-editor svelte-bzivfp"> </div>');function It(g,o){$(o,!0);const l=vt(()=>ut.getAppForEntityType(o.data.type));tt(()=>{Y.select(o.data.repo,o.data.type,o.data.id),Y.showEntity()}),yt(g,{showSidebar:!1,children:(c,f)=>{var m=ft(),p=ht(m);{var b=d=>{At(d,{get appMountPath(){return v(l).mountPath},get repo(){return o.data.repo},get entityId(){return o.data.id},get entityType(){return o.data.type}})},w=d=>{var y=St(),h=H(y);I(y),j(()=>Z(h,`No app editor available for entity type "${o.data.type??""}"`)),k(d,y)};O(p,d=>{v(l)?d(b):d(w,!1)})}k(c,m)},$$slots:{default:!0}}),et()}export{It as component,Ht as universal};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../chunks/BB_5th5W.js","../chunks/PPVm8Dsz.js","../chunks/CqkleIqs.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{j as Ie,g as Mt,a as gt,f as Tt,s as Rt,e as te,c as ae}from"../chunks/Cs_ROD7H.js";import{y as se,z as Ce,j as Nt,m as p,T as et,R as De,bo as He,I as At,A as le,B as ut,D as dt,G as it,K as ot,L as pt,f as ce,bp as Ve}from"../chunks/BeBar3OL.js";import{p as Gt,b as Ne,l as Ae,s as ze,i as ee}from"../chunks/xBRYfpah.js";import{n as _t,I as Pe,s as Se,A as Ke}from"../chunks/DvPliCZE.js";import{V as Qe,c as Je,C as Ze}from"../chunks/CR70O-Zc.js";import{_ as qe}from"../chunks/PPVm8Dsz.js";import{e as ne,i as ie,n as qt}from"../chunks/DMQKkbyp.js";import{s as tn,i as zt,w as jt}from"../chunks/DP09rP34.js";import{g as en}from"../chunks/BNwaTAEi.js";import{B as nn}from"../chunks/BuOTIbJu.js";import"../chunks/CQCkXCml.js";function rn(t){const e=+this._x.call(null,t),n=+this._y.call(null,t);return ke(this.cover(e,n),e,n,t)}function ke(t,e,n,i){if(isNaN(e)||isNaN(n))return t;var r,s=t._root,c={data:i},o=t._x0,h=t._y0,a=t._x1,d=t._y1,C,m,f,y,u,l,g,w;if(!s)return t._root=c,t;for(;s.length;)if((u=e>=(C=(o+a)/2))?o=C:a=C,(l=n>=(m=(h+d)/2))?h=m:d=m,r=s,!(s=s[g=l<<1|u]))return r[g]=c,t;if(f=+t._x.call(null,s.data),y=+t._y.call(null,s.data),e===f&&n===y)return c.next=s,r?r[g]=c:t._root=c,t;do r=r?r[g]=new Array(4):t._root=new Array(4),(u=e>=(C=(o+a)/2))?o=C:a=C,(l=n>=(m=(h+d)/2))?h=m:d=m;while((g=l<<1|u)===(w=(y>=m)<<1|f>=C));return r[w]=s,r[g]=c,t}function on(t){var e,n,i=t.length,r,s,c=new Array(i),o=new Array(i),h=1/0,a=1/0,d=-1/0,C=-1/0;for(n=0;n<i;++n)isNaN(r=+this._x.call(null,e=t[n]))||isNaN(s=+this._y.call(null,e))||(c[n]=r,o[n]=s,r<h&&(h=r),r>d&&(d=r),s<a&&(a=s),s>C&&(C=s));if(h>d||a>C)return this;for(this.cover(h,a).cover(d,C),n=0;n<i;++n)ke(this,c[n],o[n],t[n]);return this}function an(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,i=this._y0,r=this._x1,s=this._y1;if(isNaN(n))r=(n=Math.floor(t))+1,s=(i=Math.floor(e))+1;else{for(var c=r-n||1,o=this._root,h,a;n>t||t>=r||i>e||e>=s;)switch(a=(e<i)<<1|t<n,h=new Array(4),h[a]=o,o=h,c*=2,a){case 0:r=n+c,s=i+c;break;case 1:n=r-c,s=i+c;break;case 2:r=n+c,i=s-c;break;case 3:n=r-c,i=s-c;break}this._root&&this._root.length&&(this._root=o)}return this._x0=n,this._y0=i,this._x1=r,this._y1=s,this}function sn(){var t=[];return this.visit(function(e){if(!e.length)do t.push(e.data);while(e=e.next)}),t}function ln(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function at(t,e,n,i,r){this.node=t,this.x0=e,this.y0=n,this.x1=i,this.y1=r}function cn(t,e,n){var i,r=this._x0,s=this._y0,c,o,h,a,d=this._x1,C=this._y1,m=[],f=this._root,y,u;for(f&&m.push(new at(f,r,s,d,C)),n==null?n=1/0:(r=t-n,s=e-n,d=t+n,C=e+n,n*=n);y=m.pop();)if(!(!(f=y.node)||(c=y.x0)>d||(o=y.y0)>C||(h=y.x1)<r||(a=y.y1)<s))if(f.length){var l=(c+h)/2,g=(o+a)/2;m.push(new at(f[3],l,g,h,a),new at(f[2],c,g,l,a),new at(f[1],l,o,h,g),new at(f[0],c,o,l,g)),(u=(e>=g)<<1|t>=l)&&(y=m[m.length-1],m[m.length-1]=m[m.length-1-u],m[m.length-1-u]=y)}else{var w=t-+this._x.call(null,f.data),N=e-+this._y.call(null,f.data),x=w*w+N*N;if(x<n){var z=Math.sqrt(n=x);r=t-z,s=e-z,d=t+z,C=e+z,i=f.data}}return i}function fn(t){if(isNaN(d=+this._x.call(null,t))||isNaN(C=+this._y.call(null,t)))return this;var e,n=this._root,i,r,s,c=this._x0,o=this._y0,h=this._x1,a=this._y1,d,C,m,f,y,u,l,g;if(!n)return this;if(n.length)for(;;){if((y=d>=(m=(c+h)/2))?c=m:h=m,(u=C>=(f=(o+a)/2))?o=f:a=f,e=n,!(n=n[l=u<<1|y]))return this;if(!n.length)break;(e[l+1&3]||e[l+2&3]||e[l+3&3])&&(i=e,g=l)}for(;n.data!==t;)if(r=n,!(n=n.next))return this;return(s=n.next)&&delete n.next,r?(s?r.next=s:delete r.next,this):e?(s?e[l]=s:delete e[l],(n=e[0]||e[1]||e[2]||e[3])&&n===(e[3]||e[2]||e[1]||e[0])&&!n.length&&(i?i[g]=n:this._root=n),this):(this._root=s,this)}function un(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this}function hn(){return this._root}function dn(){var t=0;return this.visit(function(e){if(!e.length)do++t;while(e=e.next)}),t}function gn(t){var e=[],n,i=this._root,r,s,c,o,h;for(i&&e.push(new at(i,this._x0,this._y0,this._x1,this._y1));n=e.pop();)if(!t(i=n.node,s=n.x0,c=n.y0,o=n.x1,h=n.y1)&&i.length){var a=(s+o)/2,d=(c+h)/2;(r=i[3])&&e.push(new at(r,a,d,o,h)),(r=i[2])&&e.push(new at(r,s,d,a,h)),(r=i[1])&&e.push(new at(r,a,c,o,d)),(r=i[0])&&e.push(new at(r,s,c,a,d))}return this}function vn(t){var e=[],n=[],i;for(this._root&&e.push(new at(this._root,this._x0,this._y0,this._x1,this._y1));i=e.pop();){var r=i.node;if(r.length){var s,c=i.x0,o=i.y0,h=i.x1,a=i.y1,d=(c+h)/2,C=(o+a)/2;(s=r[0])&&e.push(new at(s,c,o,d,C)),(s=r[1])&&e.push(new at(s,d,o,h,C)),(s=r[2])&&e.push(new at(s,c,C,d,a)),(s=r[3])&&e.push(new at(s,d,C,h,a))}n.push(i)}for(;i=n.pop();)t(i.node,i.x0,i.y0,i.x1,i.y1);return this}function pn(t){return t[0]}function yn(t){return arguments.length?(this._x=t,this):this._x}function mn(t){return t[1]}function xn(t){return arguments.length?(this._y=t,this):this._y}function fe(t,e,n){var i=new ue(e??pn,n??mn,NaN,NaN,NaN,NaN);return t==null?i:i.addAll(t)}function ue(t,e,n,i,r,s){this._x=t,this._y=e,this._x0=n,this._y0=i,this._x1=r,this._y1=s,this._root=void 0}function ge(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var lt=fe.prototype=ue.prototype;lt.copy=function(){var t=new ue(this._x,this._y,this._x0,this._y0,this._x1,this._y1),e=this._root,n,i;if(!e)return t;if(!e.length)return t._root=ge(e),t;for(n=[{source:e,target:t._root=new Array(4)}];e=n.pop();)for(var r=0;r<4;++r)(i=e.source[r])&&(i.length?n.push({source:i,target:e.target[r]=new Array(4)}):e.target[r]=ge(i));return t};lt.add=rn;lt.addAll=on;lt.cover=an;lt.data=sn;lt.extent=ln;lt.find=cn;lt.remove=fn;lt.removeAll=un;lt.root=hn;lt.size=dn;lt.visit=gn;lt.visitAfter=vn;lt.x=yn;lt.y=xn;function st(t){return function(){return t}}function yt(t){return(t()-.5)*1e-6}function wn(t){return t.x+t.vx}function _n(t){return t.y+t.vy}function ve(t){var e,n,i,r=1,s=1;typeof t!="function"&&(t=st(t==null?1:+t));function c(){for(var a,d=e.length,C,m,f,y,u,l,g=0;g<s;++g)for(C=fe(e,wn,_n).visitAfter(o),a=0;a<d;++a)m=e[a],u=n[m.index],l=u*u,f=m.x+m.vx,y=m.y+m.vy,C.visit(w);function w(N,x,z,P,$){var O=N.data,Z=N.r,W=u+Z;if(O){if(O.index>m.index){var ct=f-O.x-O.vx,Q=y-O.y-O.vy,rt=ct*ct+Q*Q;rt<W*W&&(ct===0&&(ct=yt(i),rt+=ct*ct),Q===0&&(Q=yt(i),rt+=Q*Q),rt=(W-(rt=Math.sqrt(rt)))/rt*r,m.vx+=(ct*=rt)*(W=(Z*=Z)/(l+Z)),m.vy+=(Q*=rt)*W,O.vx-=ct*(W=1-W),O.vy-=Q*W)}return}return x>f+W||P<f-W||z>y+W||$<y-W}}function o(a){if(a.data)return a.r=n[a.data.index];for(var d=a.r=0;d<4;++d)a[d]&&a[d].r>a.r&&(a.r=a[d].r)}function h(){if(e){var a,d=e.length,C;for(n=new Array(d),a=0;a<d;++a)C=e[a],n[C.index]=+t(C,a,e)}}return c.initialize=function(a,d){e=a,i=d,h()},c.iterations=function(a){return arguments.length?(s=+a,c):s},c.strength=function(a){return arguments.length?(r=+a,c):r},c.radius=function(a){return arguments.length?(t=typeof a=="function"?a:st(+a),h(),c):t},c}function Mn(t){return t.index}function pe(t,e){var n=t.get(e);if(!n)throw new Error("node not found: "+e);return n}function ye(t){var e=Mn,n=C,i,r=st(30),s,c,o,h,a,d=1;t==null&&(t=[]);function C(l){return 1/Math.min(o[l.source.index],o[l.target.index])}function m(l){for(var g=0,w=t.length;g<d;++g)for(var N=0,x,z,P,$,O,Z,W;N<w;++N)x=t[N],z=x.source,P=x.target,$=P.x+P.vx-z.x-z.vx||yt(a),O=P.y+P.vy-z.y-z.vy||yt(a),Z=Math.sqrt($*$+O*O),Z=(Z-s[N])/Z*l*i[N],$*=Z,O*=Z,P.vx-=$*(W=h[N]),P.vy-=O*W,z.vx+=$*(W=1-W),z.vy+=O*W}function f(){if(c){var l,g=c.length,w=t.length,N=new Map(c.map((z,P)=>[e(z,P,c),z])),x;for(l=0,o=new Array(g);l<w;++l)x=t[l],x.index=l,typeof x.source!="object"&&(x.source=pe(N,x.source)),typeof x.target!="object"&&(x.target=pe(N,x.target)),o[x.source.index]=(o[x.source.index]||0)+1,o[x.target.index]=(o[x.target.index]||0)+1;for(l=0,h=new Array(w);l<w;++l)x=t[l],h[l]=o[x.source.index]/(o[x.source.index]+o[x.target.index]);i=new Array(w),y(),s=new Array(w),u()}}function y(){if(c)for(var l=0,g=t.length;l<g;++l)i[l]=+n(t[l],l,t)}function u(){if(c)for(var l=0,g=t.length;l<g;++l)s[l]=+r(t[l],l,t)}return m.initialize=function(l,g){c=l,a=g,f()},m.links=function(l){return arguments.length?(t=l,f(),m):t},m.id=function(l){return arguments.length?(e=l,m):e},m.iterations=function(l){return arguments.length?(d=+l,m):d},m.strength=function(l){return arguments.length?(n=typeof l=="function"?l:st(+l),y(),m):n},m.distance=function(l){return arguments.length?(r=typeof l=="function"?l:st(+l),u(),m):r},m}var bn={value:()=>{}};function Ee(){for(var t=0,e=arguments.length,n={},i;t<e;++t){if(!(i=arguments[t]+"")||i in n||/[\s.]/.test(i))throw new Error("illegal type: "+i);n[i]=[]}return new Yt(n)}function Yt(t){this._=t}function Tn(t,e){return t.trim().split(/^|\s+/).map(function(n){var i="",r=n.indexOf(".");if(r>=0&&(i=n.slice(r+1),n=n.slice(0,r)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}Yt.prototype=Ee.prototype={constructor:Yt,on:function(t,e){var n=this._,i=Tn(t+"",n),r,s=-1,c=i.length;if(arguments.length<2){for(;++s<c;)if((r=(t=i[s]).type)&&(r=In(n[r],t.name)))return r;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++s<c;)if(r=(t=i[s]).type)n[r]=me(n[r],t.name,e);else if(e==null)for(r in n)n[r]=me(n[r],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Yt(t)},call:function(t,e){if((r=arguments.length-2)>0)for(var n=new Array(r),i=0,r,s;i<r;++i)n[i]=arguments[i+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(s=this._[t],i=0,r=s.length;i<r;++i)s[i].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],r=0,s=i.length;r<s;++r)i[r].value.apply(e,n)}};function In(t,e){for(var n=0,i=t.length,r;n<i;++n)if((r=t[n]).name===e)return r.value}function me(t,e,n){for(var i=0,r=t.length;i<r;++i)if(t[i].name===e){t[i]=bn,t=t.slice(0,i).concat(t.slice(i+1));break}return n!=null&&t.push({name:e,value:n}),t}var Pt=0,kt=0,St=0,Re=1e3,Wt,Et,$t=0,bt=0,Ut=0,Lt=typeof performance=="object"&&performance.now?performance:Date,Le=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Xe(){return bt||(Le(Cn),bt=Lt.now()+Ut)}function Cn(){bt=0}function re(){this._call=this._time=this._next=null}re.prototype=Fe.prototype={constructor:re,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?Xe():+n)+(e==null?0:+e),!this._next&&Et!==this&&(Et?Et._next=this:Wt=this,Et=this),this._call=t,this._time=n,oe()},stop:function(){this._call&&(this._call=null,this._time=1/0,oe())}};function Fe(t,e,n){var i=new re;return i.restart(t,e,n),i}function Dn(){Xe(),++Pt;for(var t=Wt,e;t;)(e=bt-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Pt}function xe(){bt=($t=Lt.now())+Ut,Pt=kt=0;try{Dn()}finally{Pt=0,An(),bt=0}}function Nn(){var t=Lt.now(),e=t-$t;e>Re&&(Ut-=e,$t=t)}function An(){for(var t,e=Wt,n,i=1/0;e;)e._call?(i>e._time&&(i=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:Wt=n);Et=t,oe(i)}function oe(t){if(!Pt){kt&&(kt=clearTimeout(kt));var e=t-bt;e>24?(t<1/0&&(kt=setTimeout(xe,t-Lt.now()-Ut)),St&&(St=clearInterval(St))):(St||($t=Lt.now(),St=setInterval(Nn,Re)),Pt=1,Le(xe))}}const zn=1664525,Pn=1013904223,we=4294967296;function Sn(){let t=1;return()=>(t=(zn*t+Pn)%we)/we}function kn(t){return t.x}function En(t){return t.y}var Rn=10,Ln=Math.PI*(3-Math.sqrt(5));function _e(t){var e,n=1,i=.001,r=1-Math.pow(i,1/300),s=0,c=.6,o=new Map,h=Fe(C),a=Ee("tick","end"),d=Sn();t==null&&(t=[]);function C(){m(),a.call("tick",e),n<i&&(h.stop(),a.call("end",e))}function m(u){var l,g=t.length,w;u===void 0&&(u=1);for(var N=0;N<u;++N)for(n+=(s-n)*r,o.forEach(function(x){x(n)}),l=0;l<g;++l)w=t[l],w.fx==null?w.x+=w.vx*=c:(w.x=w.fx,w.vx=0),w.fy==null?w.y+=w.vy*=c:(w.y=w.fy,w.vy=0);return e}function f(){for(var u=0,l=t.length,g;u<l;++u){if(g=t[u],g.index=u,g.fx!=null&&(g.x=g.fx),g.fy!=null&&(g.y=g.fy),isNaN(g.x)||isNaN(g.y)){var w=Rn*Math.sqrt(.5+u),N=u*Ln;g.x=w*Math.cos(N),g.y=w*Math.sin(N)}(isNaN(g.vx)||isNaN(g.vy))&&(g.vx=g.vy=0)}}function y(u){return u.initialize&&u.initialize(t,d),u}return f(),e={tick:m,restart:function(){return h.restart(C),e},stop:function(){return h.stop(),e},nodes:function(u){return arguments.length?(t=u,f(),o.forEach(y),e):t},alpha:function(u){return arguments.length?(n=+u,e):n},alphaMin:function(u){return arguments.length?(i=+u,e):i},alphaDecay:function(u){return arguments.length?(r=+u,e):+r},alphaTarget:function(u){return arguments.length?(s=+u,e):s},velocityDecay:function(u){return arguments.length?(c=1-u,e):1-c},randomSource:function(u){return arguments.length?(d=u,o.forEach(y),e):d},force:function(u,l){return arguments.length>1?(l==null?o.delete(u):o.set(u,y(l)),e):o.get(u)},find:function(u,l,g){var w=0,N=t.length,x,z,P,$,O;for(g==null?g=1/0:g*=g,w=0;w<N;++w)$=t[w],x=u-$.x,z=l-$.y,P=x*x+z*z,P<g&&(O=$,g=P);return O},on:function(u,l){return arguments.length>1?(a.on(u,l),e):a.on(u)}}}function Me(){var t,e,n,i,r=st(-30),s,c=1,o=1/0,h=.81;function a(f){var y,u=t.length,l=fe(t,kn,En).visitAfter(C);for(i=f,y=0;y<u;++y)e=t[y],l.visit(m)}function d(){if(t){var f,y=t.length,u;for(s=new Array(y),f=0;f<y;++f)u=t[f],s[u.index]=+r(u,f,t)}}function C(f){var y=0,u,l,g=0,w,N,x;if(f.length){for(w=N=x=0;x<4;++x)(u=f[x])&&(l=Math.abs(u.value))&&(y+=u.value,g+=l,w+=l*u.x,N+=l*u.y);f.x=w/g,f.y=N/g}else{u=f,u.x=u.data.x,u.y=u.data.y;do y+=s[u.data.index];while(u=u.next)}f.value=y}function m(f,y,u,l){if(!f.value)return!0;var g=f.x-e.x,w=f.y-e.y,N=l-y,x=g*g+w*w;if(N*N/h<x)return x<o&&(g===0&&(g=yt(n),x+=g*g),w===0&&(w=yt(n),x+=w*w),x<c&&(x=Math.sqrt(c*x)),e.vx+=g*f.value*i/x,e.vy+=w*f.value*i/x),!0;if(f.length||x>=o)return;(f.data!==e||f.next)&&(g===0&&(g=yt(n),x+=g*g),w===0&&(w=yt(n),x+=w*w),x<c&&(x=Math.sqrt(c*x)));do f.data!==e&&(N=s[f.data.index]*i/x,e.vx+=g*N,e.vy+=w*N);while(f=f.next)}return a.initialize=function(f,y){t=f,n=y,d()},a.strength=function(f){return arguments.length?(r=typeof f=="function"?f:st(+f),d(),a):r},a.distanceMin=function(f){return arguments.length?(c=f*f,a):Math.sqrt(c)},a.distanceMax=function(f){return arguments.length?(o=f*f,a):Math.sqrt(o)},a.theta=function(f){return arguments.length?(h=f*f,a):Math.sqrt(h)},a}function be(t){var e=st(.1),n,i,r;typeof t!="function"&&(t=st(t==null?0:+t));function s(o){for(var h=0,a=n.length,d;h<a;++h)d=n[h],d.vx+=(r[h]-d.x)*i[h]*o}function c(){if(n){var o,h=n.length;for(i=new Array(h),r=new Array(h),o=0;o<h;++o)i[o]=isNaN(r[o]=+t(n[o],o,n))?0:+e(n[o],o,n)}}return s.initialize=function(o){n=o,c()},s.strength=function(o){return arguments.length?(e=typeof o=="function"?o:st(+o),c(),s):e},s.x=function(o){return arguments.length?(t=typeof o=="function"?o:st(+o),c(),s):t},s}function Te(t){var e=st(.1),n,i,r;typeof t!="function"&&(t=st(t==null?0:+t));function s(o){for(var h=0,a=n.length,d;h<a;++h)d=n[h],d.vy+=(r[h]-d.y)*i[h]*o}function c(){if(n){var o,h=n.length;for(i=new Array(h),r=new Array(h),o=0;o<h;++o)i[o]=isNaN(r[o]=+t(n[o],o,n))?0:+e(n[o],o,n)}}return s.initialize=function(o){n=o,c()},s.strength=function(o){return arguments.length?(e=typeof o=="function"?o:st(+o),c(),s):e},s.y=function(o){return arguments.length?(t=typeof o=="function"?o:st(+o),c(),s):t},s}var Xn=Tt('<div><span class="legend-dot svelte-1i33fky"></span> <span class="legend-label svelte-1i33fky"> </span> <span class="legend-count svelte-1i33fky"> </span></div>'),Fn=Tt('<div class="graph-view svelte-1i33fky"><div class="canvas-wrap svelte-1i33fky"><div class="legend-panel svelte-1i33fky"></div></div></div>');function Bn(t,e){se(e,!0);let n=Gt(e,"selectedEntityId",3,null),i=Gt(e,"filteredIds",3,null),r=Gt(e,"sidebarHoveredId",3,null),s=Gt(e,"highlightedIds",3,null);function c(v){return e.nameMap?.get(v)??v.replace(/-/g," ").replace(/\b\w/g,_=>_.toUpperCase())}const o=Ce("theme"),h=et(()=>o.current==="light"?{default:14211288,dim:15263976,conn:12632256,labelText:1710623}:{default:2763306,dim:1315860,conn:4210752,labelText:15592943}),a=et(()=>o.current==="light"?16316666:592139),d=.75;Nt(()=>{o.current,K&&(K.style.fill=p(h).labelText);const v=p(Ot);for(const _ of y)_t(_.type)===Ct&&(_.color=v);tt()}),Nt(()=>{i(),tt()}),Nt(()=>{s(),tt()}),Nt(()=>{n(),tt()});let C=!1;Nt(()=>{const v=e.graphData;if(!q||!D||!R)return;if(!C){C=!0;return}const _=new Map;for(const T of v.edges)_.set(T.source,(_.get(T.source)??0)+1),_.set(T.target,(_.get(T.target)??0)+1);const M=new Map;for(const T of y)M.set(T.id,{x:T.x,y:T.y});const G=3600*v.nodes.length,j=Math.sqrt(G),B=v.nodes.map(T=>{const Y=_.get(T.id)??0,ht=M.get(T.id);return{id:T.id,type:T.type,repo:T.repo,color:_t(T.type)===Ct?p(Ot):_t(T.type),weight:Y,x:ht?.x??(Math.random()-.5)*j,y:ht?.y??(Math.random()-.5)*j,vx:0,vy:0,r:It(Y)}}),V=new Map;for(const T of B)V.set(T.id,T);const nt=new Set(L.keys()),ft=new Set(v.nodes.map(T=>T.id));for(const T of nt)if(!ft.has(T)){const Y=L.get(T);Y&&(R.removeChild(Y),Y.destroy()),L.delete(T)}let F=null;if(L.size>0&&(F=L.values().next().value?.texture),!F){const T=document.createElement("canvas");T.width=100,T.height=100;const Y=T.getContext("2d");Y.beginPath(),Y.arc(50,50,48,0,Math.PI*2),Y.fillStyle="#ffffff",Y.fill(),F=q.Texture.from(T)}for(const T of B){let Y=L.get(T.id);Y||(Y=new q.Sprite(F),Y.anchor.set(.5),R.addChild(Y),L.set(T.id,Y)),Y.tint=Ft(T.color)}y=B,f?.stop();const vt=v.edges.map(T=>({source:T.source,target:T.target})),X=ye(vt).id(T=>T.id).distance(250);f=_e(y).force("link",X).force("charge",Me().strength(-1e3).distanceMin(30)).force("x",be(0).strength(.1)).force("y",Te(0).strength(.1)).force("collide",ve().radius(60).strength(.5)).velocityDecay(.4).alpha(.3).on("tick",()=>{rt||Vt(),tt()}),u=X.links(),z=null,Xt(),tt()}),Nt(()=>{const v=r();if(v){const _=y.find(M=>M.id===v)??null;z=_,Xt(),b=_?1:0}else P||(b=0);tt()});let m,f=null,y=[],u=[],l=!1,g=0,w=0,N=0,x=1,z=null,P=null,$=pt(!1),O=0,Z=0,W=0,ct=0,Q=new Set,rt=!1,mt=pt(null),I=0,b=0;const E=4;let D=null,S=null,U=null,R=null,L=new Map,H=null,K=null,q=null;function It(v){return Math.max(3,Math.min(Math.sqrt(v+1)+2,10))}function Ht(v,_){const M=m.getBoundingClientRect();return{x:(v-M.left-w)/x,y:(_-M.top-N)/x}}function he(v,_){for(let M=y.length-1;M>=0;M--){const k=y[M],G=v-k.x,j=_-k.y,B=(k.r*1.5+4)/x;if(G*G+j*j<=B*B)return k}return null}function Xt(){const v=z??null;if(Q.clear(),!!v){Q.add(v.id);for(const _ of u)_.source.id===v.id&&Q.add(_.target.id),_.target.id===v.id&&Q.add(_.source.id);if(R){const _=L.get(v.id);_&&R.setChildIndex(_,R.children.length-1)}}}function Vt(){if(y.length===0||!m)return;let v=1/0,_=-1/0,M=1/0,k=-1/0,G=0;for(const F of y)F.x<v&&(v=F.x),F.x>_&&(_=F.x),F.y<M&&(M=F.y),F.y>k&&(k=F.y),F.r>G&&(G=F.r);const j=m.clientWidth,B=m.clientHeight,V=_-v,nt=k-M;if(V===0||nt===0)return;const ft=(60+G)*2;x=Math.min((j-ft)/V,(B-ft)/nt,3),w=j/2-(v+_)/2*x,N=B/2-(M+k)/2*x,tt()}function tt(){l=!0,g=0}function Ft(v){return parseInt(v.replace("#",""),16)}function xt(v,_,M){const k=(v>>16&255)+M*((_>>16&255)-(v>>16&255)),G=(v>>8&255)+M*((_>>8&255)-(v>>8&255)),j=(v&255)+M*((_&255)-(v&255));return Math.round(k)<<16|Math.round(G)<<8|Math.round(j)}function Be(){if(!q||!S||!U)return;S.clear(),U.clear();const _=z!==null,M=I,k=p(mt),G=s(),j=i(),B=p(h).default,V=p(h).dim,nt=p(h).conn;for(let ft=0;ft<u.length;ft++){const F=u[ft],vt=F.source.x*x+w,X=F.source.y*x+N,T=F.target.x*x+w,Y=F.target.y*x+N,ht=_&&M>.01&&Q.has(F.source.id)&&Q.has(F.target.id);let A=B;_&&M>.01?A=ht?xt(B,nt,M):xt(B,V,M):(k!==null||G!==null||j!==null)&&(A=V);const J=ht?U:S,Dt=ht?1:.2;J.setStrokeStyle({width:1,color:A,alpha:Dt}),J.moveTo(vt,X),J.lineTo(T,Y),J.stroke()}}function Oe(){if(!q)return;const v=z,_=v!==null,M=I,k=p(mt),G=s(),j=i(),B=!v&&n()?y.find(X=>X.id===n())??null:null,V=new Set;if(B){V.add(B.id);for(const X of u)X.source.id===B.id&&V.add(X.target.id),X.target.id===B.id&&V.add(X.source.id)}for(const X of y){const T=L.get(X.id);if(!T)continue;const Y=X.x*x+w,ht=X.y*x+N;T.position.set(Y,ht),T.scale.set(X.r/50),T.alpha=1;const A=Ft(X.color);if(B&&!v){const J=V.has(X.id);T.tint=J?A:xt(A,p(a),d)}else{const J=X===v,Dt=_&&Q.has(X.id),$e=k!==null&&(k==="other"?_t(X.type)===Ct:X.type===k);if(J&&M>.01)T.tint=A,T.scale.set(X.r*(1+M*.4)/50);else if(Dt)T.tint=A;else if(k!==null)T.tint=$e?A:xt(A,p(a),d);else if(G!==null){const Zt=G.has(X.id)?M*d:d;T.tint=xt(A,p(a),Zt)}else if(j!==null){const Zt=j.has(X.id)?M*d:d;T.tint=xt(A,p(a),Zt)}else T.tint=xt(A,p(a),M*d)}}const nt=v??B,ft=v?M>.01:!!B;if(nt&&ft&&H){H.visible=!0;const X=nt.x*x+w,T=nt.y*x+N;H.position.set(X,T),H.scale.set(nt.r*5/64),H.alpha=v?M*.25:.25,H.tint=Ft(nt.color)}else H&&(H.visible=!1);const F=v??B,vt=v?M>.01:!!B;if(F&&vt&&K){const X=F.x*x+w,T=F.y*x+N;K.text=c(F.id),K.style.fontSize=12,K.position.set(X,T+F.r+8),K.alpha=v?M:1,K.visible=!0}else K&&(K.visible=!1)}let Bt=!1;function Ge(v){if(v.button!==0)return;Bt=!1;const _=Ht(v.clientX,v.clientY),M=he(_.x,_.y);M?(P=M,rt=!0,M.fx=M.x,M.fy=M.y,f?.alphaTarget(.3).restart(),tt()):(ot($,!0),O=v.clientX,Z=v.clientY,W=w,ct=N),m.setPointerCapture(v.pointerId),window.addEventListener("pointerup",Kt,{once:!0})}function je(v){if(P){Bt=!0;const _=Ht(v.clientX,v.clientY);P.fx=_.x,P.fy=_.y,tt()}else if(p($))Bt=!0,w=W+(v.clientX-O),N=ct+(v.clientY-Z),tt();else{const _=Ht(v.clientX,v.clientY),M=he(_.x,_.y);M?M!==z?(z&&(I=.15),z=M,Xt(),b=1,m.style.cursor="pointer",tt()):b!==1&&(b=1,m.style.cursor="pointer",tt()):b!==0&&(b=0,m.style.cursor="grab",tt())}}function Kt(v){if(!P&&!p($))return;window.removeEventListener("pointerup",Kt);const _=Bt;if(P){const M=P;P.fx=null,P.fy=null,f?.alphaTarget(0),P=null,b=0,tt(),_||en(`/${M.repo}/${M.type}/${M.id}`)}else p($)&&ot($,!1);try{m.releasePointerCapture(v.pointerId)}catch{}}const Ct="#5c5c66",Ye="#b0b0b8",Ot=et(()=>o.current==="light"?Ye:Ct),We=et(()=>{const v=new Map;for(const k of e.graphData.nodes)v.set(k.type,(v.get(k.type)??0)+1);const _=[];let M=0;for(const[k,G]of v){const j=_t(k);j===Ct?M+=G:_.push({name:k,color:j,count:G})}return _.sort((k,G)=>G.count-k.count),M>0&&_.push({name:"other",color:p(Ot),count:M}),_});De(async()=>{q=await qe(()=>import("../chunks/BB_5th5W.js"),__vite__mapDeps([0,1,2]),import.meta.url),D=new q.Application,await D.init({antialias:!0,resolution:window.devicePixelRatio||1,autoDensity:!0,backgroundAlpha:0,resizeTo:m}),m.insertBefore(D.canvas,m.firstChild),D.canvas.style.position="absolute",D.canvas.style.inset="0",S=new q.Graphics,D.stage.addChild(S),U=new q.Graphics,D.stage.addChild(U),R=new q.Container,D.stage.addChild(R);const v=document.createElement("canvas");v.width=128,v.height=128;const _=v.getContext("2d"),M=_.createRadialGradient(64,64,0,64,64,64);M.addColorStop(0,"rgba(255,255,255,0.5)"),M.addColorStop(1,"rgba(255,255,255,0)"),_.fillStyle=M,_.fillRect(0,0,128,128);const k=q.Texture.from(v);H=new q.Sprite(k),H.anchor.set(.5),H.visible=!1,D.stage.addChild(H);const G=document.createElement("canvas");G.width=100,G.height=100;const j=G.getContext("2d");j.beginPath(),j.arc(50,50,48,0,Math.PI*2),j.fillStyle="#ffffff",j.fill();const B=q.Texture.from(G),V=new Map;for(const A of e.graphData.edges)V.set(A.source,(V.get(A.source)??0)+1),V.set(A.target,(V.get(A.target)??0)+1);const nt=new Map,F=3600*e.graphData.nodes.length,vt=Math.sqrt(F);y=e.graphData.nodes.map(A=>{const J=V.get(A.id)??0,Dt={id:A.id,type:A.type,repo:A.repo,color:_t(A.type)===Ct?p(Ot):_t(A.type),weight:J,x:(Math.random()-.5)*vt,y:(Math.random()-.5)*vt,vx:0,vy:0,r:It(J)};return nt.set(A.id,Dt),Dt});for(const A of y){const J=new q.Sprite(B);J.anchor.set(.5),J.tint=Ft(A.color),R.addChild(J),L.set(A.id,J)}K=new q.Text({text:"",style:{fontFamily:"Inter, system-ui, sans-serif",fontWeight:"500",fontSize:12,fill:p(h).labelText,align:"center"}}),K.anchor.set(.5,0),K.visible=!1,D.stage.addChild(K);const X=e.graphData.edges.map(A=>({source:A.source,target:A.target})),T=ye(X).id(A=>A.id).distance(250);f=_e(y).force("link",T).force("charge",Me().strength(-1e3).distanceMin(30)).force("x",be(0).strength(.1)).force("y",Te(0).strength(.1)).force("collide",ve().radius(60).strength(.5)).velocityDecay(.4).alpha(1).on("tick",()=>{rt||Vt(),tt()}),u=T.links();let Y=0;D.ticker.add(()=>{const A=performance.now(),J=Y?Math.min((A-Y)/1e3,.05):.016;Y=A,I<b?(I=Math.min(b,I+E*J),l=!0):I>b&&(I=Math.max(b,I-E*J),l=!0),I===0&&b===0&&z&&!P&&(z=null,Xt(),l=!0),(l||g<120)&&(Be(),Oe(),l=!1,g++)});const ht=new ResizeObserver(()=>{D.renderer.resize(m.clientWidth,m.clientHeight),Vt()});return ht.observe(m),()=>{ht.disconnect()}}),He(()=>{f?.stop(),D&&(D.destroy(!0,{children:!0}),D=null)});var Qt=Fn(),wt=ut(Qt);let de;var Jt=ut(wt);ne(Jt,21,()=>p(We),ie,(v,_)=>{var M=Xn();let k;var G=ut(M);let j;var B=dt(G,2),V=ut(B,!0);it(B);var nt=dt(B,2),ft=ut(nt,!0);it(nt),it(M),At(()=>{k=tn(M,1,"legend-item svelte-1i33fky",null,k,{"legend-item-active":p(mt)===p(_).name}),j=zt(G,"",j,{background:p(_).color}),Rt(V,p(_).name),Rt(ft,p(_).count)}),te("mouseenter",M,()=>{ot(mt,p(_).name,!0),tt()}),te("mouseleave",M,()=>{ot(mt,null),tt()}),gt(v,M)}),it(Jt),it(wt),Ne(wt,v=>m=v,()=>m),it(Qt),At(()=>de=zt(wt,"",de,{cursor:p($)?"grabbing":"grab"})),Mt("pointerdown",wt,Ge),Mt("pointermove",wt,je),Mt("pointerup",wt,Kt),Mt("pointerdown",Jt,v=>v.stopPropagation()),gt(t,Qt),le()}Ie(["pointerdown","pointermove","pointerup"]);function On(t,e){const n=Ae(e,["children","$$slots","$$events","$$legacy"]);const i=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z"}]];Pe(t,ze({name:"play"},()=>n,{get iconNode(){return i},children:(r,s)=>{var c=ae(),o=ce(c);Se(o,e,"default",{}),gt(r,c)},$$slots:{default:!0}}))}function Gn(t,e){const n=Ae(e,["children","$$slots","$$events","$$legacy"]);const i=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1"}]];Pe(t,ze({name:"pause"},()=>n,{get iconNode(){return i},children:(r,s)=>{var c=ae(),o=ce(c);Se(o,e,"default",{}),gt(r,c)},$$slots:{default:!0}}))}var jn=Tt('<div class="density-bar svelte-lzvab"></div>'),Yn=Tt('<span class="date-label svelte-lzvab"> </span>'),Wn=Tt('<div class="timeline-tooltip svelte-lzvab"><div class="tooltip-date svelte-lzvab"> </div> <div class="tooltip-count svelte-lzvab"> </div></div>'),$n=Tt('<div class="timeline-bar svelte-lzvab"><!> <div class="timeline-track svelte-lzvab"><div class="track-line svelte-lzvab"></div> <div class="density-bars svelte-lzvab"></div> <div class="playhead svelte-lzvab"></div> <div class="date-labels svelte-lzvab"></div> <!></div></div>');function Un(t,e){se(e,!0);let n=pt(null),i=pt(0),r=pt(!1),s=pt(!1),c=pt(null),o=null;const h=et(()=>{let I=1/0,b=-1/0;for(const E of e.entities){const D=E.createdAt?new Date(E.createdAt).getTime():0;D>0&&D<I&&(I=D),D>b&&(b=D)}return I===1/0&&(I=Date.now()),b===-1/0&&(b=Date.now()),{min:I,max:b}}),a=et(()=>{let{min:I,max:b}=p(h);return b-I<864e5&&(I-=864e5*15,b+=864e5*15),{min:new Date(I),max:new Date(b)}}),d=et(()=>{const b=p(a).min.getTime(),E=p(a).max.getTime(),D=new Map;for(const S of e.entities){const U=S.createdAt?new Date(S.createdAt).getTime():0;if(U<=0)continue;const R=Math.floor((U-b)/864e5),L=b+R*864e5,H=D.get(L)??[];H.push(S),D.set(L,H)}return{map:D,minTime:b,maxTime:E,dayMs:864e5}}),C=et(()=>{let I=0;for(const b of p(d).map.values())b.length>I&&(I=b.length);return Math.max(1,I)}),m=et(()=>{const{minTime:I,maxTime:b}=p(d),E=b-I,D=[],S=Math.max(4,Math.min(8,Math.floor(p(i)/100))),U=E/S;for(let R=0;R<=S;R++){const L=I+R*U,K=new Date(L).toLocaleDateString("en-US",{month:"short",day:"numeric"});D.push({label:K,x:R/S})}return D}),f=et(()=>{const{minTime:I,maxTime:b}=p(d),E=b-I;if(E<=0)return .5;const D=e.currentDate?e.currentDate.getTime():p(h).max,S=Math.max(p(h).min,Math.min(p(h).max,D));return Math.max(0,Math.min(1,(S-I)/E))});function y(I){if(!p(n))return new Date;const b=p(n).getBoundingClientRect(),E=40,S=b.width-E-12,U=Math.max(0,Math.min(1,(I-b.left-E)/S)),{minTime:R,maxTime:L}=p(d),H=R+U*(L-R);return new Date(Math.max(p(h).min,Math.min(p(h).max,H)))}function u(I){ot(r,!0),z();const b=y(I.clientX);e.onDateChange(b),I.target.setPointerCapture(I.pointerId)}function l(I){if(p(r)&&e.onDateChange(y(I.clientX)),!p(n))return;const b=p(n).getBoundingClientRect(),E=40,S=b.width-E-12,U=(I.clientX-b.left-E)/S;if(U<0||U>1){ot(c,null);return}const{minTime:R,dayMs:L,map:H}=p(d),K=R+U*(p(d).maxTime-R),q=R+Math.floor((K-R)/L)*L,It=H.get(q);It&&It.length>0?ot(c,{date:new Date(q),count:It.length,x:I.clientX-b.left},!0):ot(c,null)}function g(){ot(r,!1)}function w(){ot(c,null)}function N(){p(s)?z():x()}function x(){ot(s,!0);const{min:I,max:b}=p(h),D=(b-I)/200;let S=e.currentDate?.getTime()??I;S>=b&&(S=I),o=setInterval(()=>{if(S+=D,S>=b){e.onDateChange(null),z();return}e.onDateChange(new Date(S))},50)}function z(){ot(s,!1),o&&(clearInterval(o),o=null)}De(()=>{if(p(n)){const I=new ResizeObserver(b=>{ot(i,b[0]?.contentRect.width??0,!0)});return I.observe(p(n)),()=>I.disconnect()}});var P=$n(),$=ut(P);{let I=et(()=>p(s)?"Pause":"Play");nn($,{variant:"ghost",size:"icon",class:"play-btn",onclick:N,get title(){return p(I)},children:(b,E)=>{var D=ae(),S=ce(D);{var U=L=>{Gn(L,{size:14})},R=L=>{On(L,{size:14})};ee(S,L=>{p(s)?L(U):L(R,!1)})}gt(b,D)},$$slots:{default:!0}})}var O=dt($,2),Z=dt(ut(O),2);ne(Z,21,()=>Array.from(p(d).map.entries()),ie,(I,b)=>{var E=et(()=>Ve(p(b),2));let D=()=>p(E)[0],S=()=>p(E)[1];const U=et(()=>(D()-p(d).minTime)/(p(d).maxTime-p(d).minTime)),R=et(()=>S().length/p(C)),L=et(()=>.05+.95*p(R)*p(R));var H=jn();let K;At(()=>K=zt(H,"",K,{left:`${p(U)*100}%`,opacity:p(L)})),gt(I,H)}),it(Z);var W=dt(Z,2);let ct;var Q=dt(W,2);ne(Q,21,()=>p(m),ie,(I,b)=>{var E=Yn();let D;var S=ut(E,!0);it(E),At(()=>{D=zt(E,"",D,{left:`${p(b).x*100}%`}),Rt(S,p(b).label)}),gt(I,E)}),it(Q);var rt=dt(Q,2);{var mt=I=>{var b=Wn();let E;var D=ut(b),S=ut(D,!0);it(D);var U=dt(D,2),R=ut(U);it(U),it(b),At(L=>{E=zt(b,"",E,{left:`${p(c).x??""}px`}),Rt(S,L),Rt(R,`${p(c).count??""} ${p(c).count===1?"entity":"entities"}`)},[()=>p(c).date.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})]),gt(I,b)};ee(rt,I=>{p(c)&&!p(r)&&I(mt)})}it(O),it(P),Ne(P,I=>ot(n,I),()=>p(n)),At(()=>ct=zt(W,"",ct,{left:`${p(f)*100}%`})),Mt("pointerdown",O,u),Mt("pointermove",O,l),Mt("pointerup",O,g),te("pointerleave",O,w),gt(t,P),le()}Ie(["pointerdown","pointermove","pointerup"]);var Hn=Tt('<div class="content-row svelte-315y67"><div class="graph-area svelte-315y67"><!> <!> <!></div> <!></div>');function oi(t,e){se(e,!0);const n=Ce("chat");qt.showGraph();let i=pt(null);const r=et(()=>{const o=new Map;for(const h of jt.repos)for(const a of h.entities)o.set(a.id,a.title);return o}),s=et(()=>{const o=[];for(const h of jt.repos)for(const a of h.entities)a.id.toLowerCase().startsWith("readme")||o.push(a);return o}),c=et(()=>{const o=[],h=[],a=new Set,d=new Set,C=p(i)?.getTime()??1/0;for(const f of jt.repos)for(const y of f.entities){if(y.id.toLowerCase().startsWith("readme")||a.has(y.id)||(y.createdAt?new Date(y.createdAt).getTime():0)>C)continue;a.add(y.id),o.push({id:y.id,type:y.entityType,repo:f.name});const l=y.wikilinks??[];for(const g of l){const w=y.id<g?`${y.id}|${g}`:`${g}|${y.id}`;!d.has(w)&&y.id!==g&&(d.add(w),h.push({source:y.id,target:g}))}}const m=h.filter(f=>a.has(f.source)&&a.has(f.target));return{nodes:o,edges:m}});Ke(t,{children:(o,h)=>{var a=Hn(),d=ut(a),C=ut(d);Qe(C,{activeView:"graph"});var m=dt(C,2);Bn(m,{get graphData(){return p(c)},get selectedEntityId(){return qt.selectedId},get nameMap(){return p(r)},get filteredIds(){return jt.filteredIds},get sidebarHoveredId(){return qt.hoveredEntityId},get highlightedIds(){return Je.highlightedIds}});var f=dt(m,2);Un(f,{get entities(){return p(s)},get currentDate(){return p(i)},onDateChange:l=>{ot(i,l,!0)}}),it(d);var y=dt(d,2);{var u=l=>{Ze(l,{})};ee(y,l=>{n.open&&l(u)})}it(a),gt(o,a)},$$slots:{default:!0}}),le()}export{oi as component};
|
|
2
|
+
import{j as Ie,g as Mt,a as gt,f as Tt,s as Rt,e as te,c as ae}from"../chunks/Cs_ROD7H.js";import{y as se,z as Ce,j as Nt,m as p,T as et,R as De,bo as He,I as At,A as le,B as ut,D as dt,G as it,K as ot,L as pt,f as ce,bp as Ve}from"../chunks/BeBar3OL.js";import{p as Gt,b as Ne,l as Ae,s as ze,i as ee}from"../chunks/xBRYfpah.js";import{n as _t,I as Pe,s as Se,A as Ke}from"../chunks/D5ZViFW2.js";import{V as Qe,c as Je,C as Ze}from"../chunks/DsbgM2i-.js";import{_ as qe}from"../chunks/PPVm8Dsz.js";import{e as ne,i as ie,n as qt}from"../chunks/BJ9jl0Ch.js";import{s as tn,i as zt,w as jt}from"../chunks/DP09rP34.js";import{g as en}from"../chunks/tXD97DTQ.js";import{B as nn}from"../chunks/BuOTIbJu.js";import"../chunks/CQCkXCml.js";function rn(t){const e=+this._x.call(null,t),n=+this._y.call(null,t);return ke(this.cover(e,n),e,n,t)}function ke(t,e,n,i){if(isNaN(e)||isNaN(n))return t;var r,s=t._root,c={data:i},o=t._x0,h=t._y0,a=t._x1,d=t._y1,C,m,f,y,u,l,g,w;if(!s)return t._root=c,t;for(;s.length;)if((u=e>=(C=(o+a)/2))?o=C:a=C,(l=n>=(m=(h+d)/2))?h=m:d=m,r=s,!(s=s[g=l<<1|u]))return r[g]=c,t;if(f=+t._x.call(null,s.data),y=+t._y.call(null,s.data),e===f&&n===y)return c.next=s,r?r[g]=c:t._root=c,t;do r=r?r[g]=new Array(4):t._root=new Array(4),(u=e>=(C=(o+a)/2))?o=C:a=C,(l=n>=(m=(h+d)/2))?h=m:d=m;while((g=l<<1|u)===(w=(y>=m)<<1|f>=C));return r[w]=s,r[g]=c,t}function on(t){var e,n,i=t.length,r,s,c=new Array(i),o=new Array(i),h=1/0,a=1/0,d=-1/0,C=-1/0;for(n=0;n<i;++n)isNaN(r=+this._x.call(null,e=t[n]))||isNaN(s=+this._y.call(null,e))||(c[n]=r,o[n]=s,r<h&&(h=r),r>d&&(d=r),s<a&&(a=s),s>C&&(C=s));if(h>d||a>C)return this;for(this.cover(h,a).cover(d,C),n=0;n<i;++n)ke(this,c[n],o[n],t[n]);return this}function an(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,i=this._y0,r=this._x1,s=this._y1;if(isNaN(n))r=(n=Math.floor(t))+1,s=(i=Math.floor(e))+1;else{for(var c=r-n||1,o=this._root,h,a;n>t||t>=r||i>e||e>=s;)switch(a=(e<i)<<1|t<n,h=new Array(4),h[a]=o,o=h,c*=2,a){case 0:r=n+c,s=i+c;break;case 1:n=r-c,s=i+c;break;case 2:r=n+c,i=s-c;break;case 3:n=r-c,i=s-c;break}this._root&&this._root.length&&(this._root=o)}return this._x0=n,this._y0=i,this._x1=r,this._y1=s,this}function sn(){var t=[];return this.visit(function(e){if(!e.length)do t.push(e.data);while(e=e.next)}),t}function ln(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function at(t,e,n,i,r){this.node=t,this.x0=e,this.y0=n,this.x1=i,this.y1=r}function cn(t,e,n){var i,r=this._x0,s=this._y0,c,o,h,a,d=this._x1,C=this._y1,m=[],f=this._root,y,u;for(f&&m.push(new at(f,r,s,d,C)),n==null?n=1/0:(r=t-n,s=e-n,d=t+n,C=e+n,n*=n);y=m.pop();)if(!(!(f=y.node)||(c=y.x0)>d||(o=y.y0)>C||(h=y.x1)<r||(a=y.y1)<s))if(f.length){var l=(c+h)/2,g=(o+a)/2;m.push(new at(f[3],l,g,h,a),new at(f[2],c,g,l,a),new at(f[1],l,o,h,g),new at(f[0],c,o,l,g)),(u=(e>=g)<<1|t>=l)&&(y=m[m.length-1],m[m.length-1]=m[m.length-1-u],m[m.length-1-u]=y)}else{var w=t-+this._x.call(null,f.data),N=e-+this._y.call(null,f.data),x=w*w+N*N;if(x<n){var z=Math.sqrt(n=x);r=t-z,s=e-z,d=t+z,C=e+z,i=f.data}}return i}function fn(t){if(isNaN(d=+this._x.call(null,t))||isNaN(C=+this._y.call(null,t)))return this;var e,n=this._root,i,r,s,c=this._x0,o=this._y0,h=this._x1,a=this._y1,d,C,m,f,y,u,l,g;if(!n)return this;if(n.length)for(;;){if((y=d>=(m=(c+h)/2))?c=m:h=m,(u=C>=(f=(o+a)/2))?o=f:a=f,e=n,!(n=n[l=u<<1|y]))return this;if(!n.length)break;(e[l+1&3]||e[l+2&3]||e[l+3&3])&&(i=e,g=l)}for(;n.data!==t;)if(r=n,!(n=n.next))return this;return(s=n.next)&&delete n.next,r?(s?r.next=s:delete r.next,this):e?(s?e[l]=s:delete e[l],(n=e[0]||e[1]||e[2]||e[3])&&n===(e[3]||e[2]||e[1]||e[0])&&!n.length&&(i?i[g]=n:this._root=n),this):(this._root=s,this)}function un(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this}function hn(){return this._root}function dn(){var t=0;return this.visit(function(e){if(!e.length)do++t;while(e=e.next)}),t}function gn(t){var e=[],n,i=this._root,r,s,c,o,h;for(i&&e.push(new at(i,this._x0,this._y0,this._x1,this._y1));n=e.pop();)if(!t(i=n.node,s=n.x0,c=n.y0,o=n.x1,h=n.y1)&&i.length){var a=(s+o)/2,d=(c+h)/2;(r=i[3])&&e.push(new at(r,a,d,o,h)),(r=i[2])&&e.push(new at(r,s,d,a,h)),(r=i[1])&&e.push(new at(r,a,c,o,d)),(r=i[0])&&e.push(new at(r,s,c,a,d))}return this}function vn(t){var e=[],n=[],i;for(this._root&&e.push(new at(this._root,this._x0,this._y0,this._x1,this._y1));i=e.pop();){var r=i.node;if(r.length){var s,c=i.x0,o=i.y0,h=i.x1,a=i.y1,d=(c+h)/2,C=(o+a)/2;(s=r[0])&&e.push(new at(s,c,o,d,C)),(s=r[1])&&e.push(new at(s,d,o,h,C)),(s=r[2])&&e.push(new at(s,c,C,d,a)),(s=r[3])&&e.push(new at(s,d,C,h,a))}n.push(i)}for(;i=n.pop();)t(i.node,i.x0,i.y0,i.x1,i.y1);return this}function pn(t){return t[0]}function yn(t){return arguments.length?(this._x=t,this):this._x}function mn(t){return t[1]}function xn(t){return arguments.length?(this._y=t,this):this._y}function fe(t,e,n){var i=new ue(e??pn,n??mn,NaN,NaN,NaN,NaN);return t==null?i:i.addAll(t)}function ue(t,e,n,i,r,s){this._x=t,this._y=e,this._x0=n,this._y0=i,this._x1=r,this._y1=s,this._root=void 0}function ge(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var lt=fe.prototype=ue.prototype;lt.copy=function(){var t=new ue(this._x,this._y,this._x0,this._y0,this._x1,this._y1),e=this._root,n,i;if(!e)return t;if(!e.length)return t._root=ge(e),t;for(n=[{source:e,target:t._root=new Array(4)}];e=n.pop();)for(var r=0;r<4;++r)(i=e.source[r])&&(i.length?n.push({source:i,target:e.target[r]=new Array(4)}):e.target[r]=ge(i));return t};lt.add=rn;lt.addAll=on;lt.cover=an;lt.data=sn;lt.extent=ln;lt.find=cn;lt.remove=fn;lt.removeAll=un;lt.root=hn;lt.size=dn;lt.visit=gn;lt.visitAfter=vn;lt.x=yn;lt.y=xn;function st(t){return function(){return t}}function yt(t){return(t()-.5)*1e-6}function wn(t){return t.x+t.vx}function _n(t){return t.y+t.vy}function ve(t){var e,n,i,r=1,s=1;typeof t!="function"&&(t=st(t==null?1:+t));function c(){for(var a,d=e.length,C,m,f,y,u,l,g=0;g<s;++g)for(C=fe(e,wn,_n).visitAfter(o),a=0;a<d;++a)m=e[a],u=n[m.index],l=u*u,f=m.x+m.vx,y=m.y+m.vy,C.visit(w);function w(N,x,z,P,$){var O=N.data,Z=N.r,W=u+Z;if(O){if(O.index>m.index){var ct=f-O.x-O.vx,Q=y-O.y-O.vy,rt=ct*ct+Q*Q;rt<W*W&&(ct===0&&(ct=yt(i),rt+=ct*ct),Q===0&&(Q=yt(i),rt+=Q*Q),rt=(W-(rt=Math.sqrt(rt)))/rt*r,m.vx+=(ct*=rt)*(W=(Z*=Z)/(l+Z)),m.vy+=(Q*=rt)*W,O.vx-=ct*(W=1-W),O.vy-=Q*W)}return}return x>f+W||P<f-W||z>y+W||$<y-W}}function o(a){if(a.data)return a.r=n[a.data.index];for(var d=a.r=0;d<4;++d)a[d]&&a[d].r>a.r&&(a.r=a[d].r)}function h(){if(e){var a,d=e.length,C;for(n=new Array(d),a=0;a<d;++a)C=e[a],n[C.index]=+t(C,a,e)}}return c.initialize=function(a,d){e=a,i=d,h()},c.iterations=function(a){return arguments.length?(s=+a,c):s},c.strength=function(a){return arguments.length?(r=+a,c):r},c.radius=function(a){return arguments.length?(t=typeof a=="function"?a:st(+a),h(),c):t},c}function Mn(t){return t.index}function pe(t,e){var n=t.get(e);if(!n)throw new Error("node not found: "+e);return n}function ye(t){var e=Mn,n=C,i,r=st(30),s,c,o,h,a,d=1;t==null&&(t=[]);function C(l){return 1/Math.min(o[l.source.index],o[l.target.index])}function m(l){for(var g=0,w=t.length;g<d;++g)for(var N=0,x,z,P,$,O,Z,W;N<w;++N)x=t[N],z=x.source,P=x.target,$=P.x+P.vx-z.x-z.vx||yt(a),O=P.y+P.vy-z.y-z.vy||yt(a),Z=Math.sqrt($*$+O*O),Z=(Z-s[N])/Z*l*i[N],$*=Z,O*=Z,P.vx-=$*(W=h[N]),P.vy-=O*W,z.vx+=$*(W=1-W),z.vy+=O*W}function f(){if(c){var l,g=c.length,w=t.length,N=new Map(c.map((z,P)=>[e(z,P,c),z])),x;for(l=0,o=new Array(g);l<w;++l)x=t[l],x.index=l,typeof x.source!="object"&&(x.source=pe(N,x.source)),typeof x.target!="object"&&(x.target=pe(N,x.target)),o[x.source.index]=(o[x.source.index]||0)+1,o[x.target.index]=(o[x.target.index]||0)+1;for(l=0,h=new Array(w);l<w;++l)x=t[l],h[l]=o[x.source.index]/(o[x.source.index]+o[x.target.index]);i=new Array(w),y(),s=new Array(w),u()}}function y(){if(c)for(var l=0,g=t.length;l<g;++l)i[l]=+n(t[l],l,t)}function u(){if(c)for(var l=0,g=t.length;l<g;++l)s[l]=+r(t[l],l,t)}return m.initialize=function(l,g){c=l,a=g,f()},m.links=function(l){return arguments.length?(t=l,f(),m):t},m.id=function(l){return arguments.length?(e=l,m):e},m.iterations=function(l){return arguments.length?(d=+l,m):d},m.strength=function(l){return arguments.length?(n=typeof l=="function"?l:st(+l),y(),m):n},m.distance=function(l){return arguments.length?(r=typeof l=="function"?l:st(+l),u(),m):r},m}var bn={value:()=>{}};function Ee(){for(var t=0,e=arguments.length,n={},i;t<e;++t){if(!(i=arguments[t]+"")||i in n||/[\s.]/.test(i))throw new Error("illegal type: "+i);n[i]=[]}return new Yt(n)}function Yt(t){this._=t}function Tn(t,e){return t.trim().split(/^|\s+/).map(function(n){var i="",r=n.indexOf(".");if(r>=0&&(i=n.slice(r+1),n=n.slice(0,r)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}Yt.prototype=Ee.prototype={constructor:Yt,on:function(t,e){var n=this._,i=Tn(t+"",n),r,s=-1,c=i.length;if(arguments.length<2){for(;++s<c;)if((r=(t=i[s]).type)&&(r=In(n[r],t.name)))return r;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++s<c;)if(r=(t=i[s]).type)n[r]=me(n[r],t.name,e);else if(e==null)for(r in n)n[r]=me(n[r],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Yt(t)},call:function(t,e){if((r=arguments.length-2)>0)for(var n=new Array(r),i=0,r,s;i<r;++i)n[i]=arguments[i+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(s=this._[t],i=0,r=s.length;i<r;++i)s[i].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],r=0,s=i.length;r<s;++r)i[r].value.apply(e,n)}};function In(t,e){for(var n=0,i=t.length,r;n<i;++n)if((r=t[n]).name===e)return r.value}function me(t,e,n){for(var i=0,r=t.length;i<r;++i)if(t[i].name===e){t[i]=bn,t=t.slice(0,i).concat(t.slice(i+1));break}return n!=null&&t.push({name:e,value:n}),t}var Pt=0,kt=0,St=0,Re=1e3,Wt,Et,$t=0,bt=0,Ut=0,Lt=typeof performance=="object"&&performance.now?performance:Date,Le=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Xe(){return bt||(Le(Cn),bt=Lt.now()+Ut)}function Cn(){bt=0}function re(){this._call=this._time=this._next=null}re.prototype=Fe.prototype={constructor:re,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?Xe():+n)+(e==null?0:+e),!this._next&&Et!==this&&(Et?Et._next=this:Wt=this,Et=this),this._call=t,this._time=n,oe()},stop:function(){this._call&&(this._call=null,this._time=1/0,oe())}};function Fe(t,e,n){var i=new re;return i.restart(t,e,n),i}function Dn(){Xe(),++Pt;for(var t=Wt,e;t;)(e=bt-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Pt}function xe(){bt=($t=Lt.now())+Ut,Pt=kt=0;try{Dn()}finally{Pt=0,An(),bt=0}}function Nn(){var t=Lt.now(),e=t-$t;e>Re&&(Ut-=e,$t=t)}function An(){for(var t,e=Wt,n,i=1/0;e;)e._call?(i>e._time&&(i=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:Wt=n);Et=t,oe(i)}function oe(t){if(!Pt){kt&&(kt=clearTimeout(kt));var e=t-bt;e>24?(t<1/0&&(kt=setTimeout(xe,t-Lt.now()-Ut)),St&&(St=clearInterval(St))):(St||($t=Lt.now(),St=setInterval(Nn,Re)),Pt=1,Le(xe))}}const zn=1664525,Pn=1013904223,we=4294967296;function Sn(){let t=1;return()=>(t=(zn*t+Pn)%we)/we}function kn(t){return t.x}function En(t){return t.y}var Rn=10,Ln=Math.PI*(3-Math.sqrt(5));function _e(t){var e,n=1,i=.001,r=1-Math.pow(i,1/300),s=0,c=.6,o=new Map,h=Fe(C),a=Ee("tick","end"),d=Sn();t==null&&(t=[]);function C(){m(),a.call("tick",e),n<i&&(h.stop(),a.call("end",e))}function m(u){var l,g=t.length,w;u===void 0&&(u=1);for(var N=0;N<u;++N)for(n+=(s-n)*r,o.forEach(function(x){x(n)}),l=0;l<g;++l)w=t[l],w.fx==null?w.x+=w.vx*=c:(w.x=w.fx,w.vx=0),w.fy==null?w.y+=w.vy*=c:(w.y=w.fy,w.vy=0);return e}function f(){for(var u=0,l=t.length,g;u<l;++u){if(g=t[u],g.index=u,g.fx!=null&&(g.x=g.fx),g.fy!=null&&(g.y=g.fy),isNaN(g.x)||isNaN(g.y)){var w=Rn*Math.sqrt(.5+u),N=u*Ln;g.x=w*Math.cos(N),g.y=w*Math.sin(N)}(isNaN(g.vx)||isNaN(g.vy))&&(g.vx=g.vy=0)}}function y(u){return u.initialize&&u.initialize(t,d),u}return f(),e={tick:m,restart:function(){return h.restart(C),e},stop:function(){return h.stop(),e},nodes:function(u){return arguments.length?(t=u,f(),o.forEach(y),e):t},alpha:function(u){return arguments.length?(n=+u,e):n},alphaMin:function(u){return arguments.length?(i=+u,e):i},alphaDecay:function(u){return arguments.length?(r=+u,e):+r},alphaTarget:function(u){return arguments.length?(s=+u,e):s},velocityDecay:function(u){return arguments.length?(c=1-u,e):1-c},randomSource:function(u){return arguments.length?(d=u,o.forEach(y),e):d},force:function(u,l){return arguments.length>1?(l==null?o.delete(u):o.set(u,y(l)),e):o.get(u)},find:function(u,l,g){var w=0,N=t.length,x,z,P,$,O;for(g==null?g=1/0:g*=g,w=0;w<N;++w)$=t[w],x=u-$.x,z=l-$.y,P=x*x+z*z,P<g&&(O=$,g=P);return O},on:function(u,l){return arguments.length>1?(a.on(u,l),e):a.on(u)}}}function Me(){var t,e,n,i,r=st(-30),s,c=1,o=1/0,h=.81;function a(f){var y,u=t.length,l=fe(t,kn,En).visitAfter(C);for(i=f,y=0;y<u;++y)e=t[y],l.visit(m)}function d(){if(t){var f,y=t.length,u;for(s=new Array(y),f=0;f<y;++f)u=t[f],s[u.index]=+r(u,f,t)}}function C(f){var y=0,u,l,g=0,w,N,x;if(f.length){for(w=N=x=0;x<4;++x)(u=f[x])&&(l=Math.abs(u.value))&&(y+=u.value,g+=l,w+=l*u.x,N+=l*u.y);f.x=w/g,f.y=N/g}else{u=f,u.x=u.data.x,u.y=u.data.y;do y+=s[u.data.index];while(u=u.next)}f.value=y}function m(f,y,u,l){if(!f.value)return!0;var g=f.x-e.x,w=f.y-e.y,N=l-y,x=g*g+w*w;if(N*N/h<x)return x<o&&(g===0&&(g=yt(n),x+=g*g),w===0&&(w=yt(n),x+=w*w),x<c&&(x=Math.sqrt(c*x)),e.vx+=g*f.value*i/x,e.vy+=w*f.value*i/x),!0;if(f.length||x>=o)return;(f.data!==e||f.next)&&(g===0&&(g=yt(n),x+=g*g),w===0&&(w=yt(n),x+=w*w),x<c&&(x=Math.sqrt(c*x)));do f.data!==e&&(N=s[f.data.index]*i/x,e.vx+=g*N,e.vy+=w*N);while(f=f.next)}return a.initialize=function(f,y){t=f,n=y,d()},a.strength=function(f){return arguments.length?(r=typeof f=="function"?f:st(+f),d(),a):r},a.distanceMin=function(f){return arguments.length?(c=f*f,a):Math.sqrt(c)},a.distanceMax=function(f){return arguments.length?(o=f*f,a):Math.sqrt(o)},a.theta=function(f){return arguments.length?(h=f*f,a):Math.sqrt(h)},a}function be(t){var e=st(.1),n,i,r;typeof t!="function"&&(t=st(t==null?0:+t));function s(o){for(var h=0,a=n.length,d;h<a;++h)d=n[h],d.vx+=(r[h]-d.x)*i[h]*o}function c(){if(n){var o,h=n.length;for(i=new Array(h),r=new Array(h),o=0;o<h;++o)i[o]=isNaN(r[o]=+t(n[o],o,n))?0:+e(n[o],o,n)}}return s.initialize=function(o){n=o,c()},s.strength=function(o){return arguments.length?(e=typeof o=="function"?o:st(+o),c(),s):e},s.x=function(o){return arguments.length?(t=typeof o=="function"?o:st(+o),c(),s):t},s}function Te(t){var e=st(.1),n,i,r;typeof t!="function"&&(t=st(t==null?0:+t));function s(o){for(var h=0,a=n.length,d;h<a;++h)d=n[h],d.vy+=(r[h]-d.y)*i[h]*o}function c(){if(n){var o,h=n.length;for(i=new Array(h),r=new Array(h),o=0;o<h;++o)i[o]=isNaN(r[o]=+t(n[o],o,n))?0:+e(n[o],o,n)}}return s.initialize=function(o){n=o,c()},s.strength=function(o){return arguments.length?(e=typeof o=="function"?o:st(+o),c(),s):e},s.y=function(o){return arguments.length?(t=typeof o=="function"?o:st(+o),c(),s):t},s}var Xn=Tt('<div><span class="legend-dot svelte-1i33fky"></span> <span class="legend-label svelte-1i33fky"> </span> <span class="legend-count svelte-1i33fky"> </span></div>'),Fn=Tt('<div class="graph-view svelte-1i33fky"><div class="canvas-wrap svelte-1i33fky"><div class="legend-panel svelte-1i33fky"></div></div></div>');function Bn(t,e){se(e,!0);let n=Gt(e,"selectedEntityId",3,null),i=Gt(e,"filteredIds",3,null),r=Gt(e,"sidebarHoveredId",3,null),s=Gt(e,"highlightedIds",3,null);function c(v){return e.nameMap?.get(v)??v.replace(/-/g," ").replace(/\b\w/g,_=>_.toUpperCase())}const o=Ce("theme"),h=et(()=>o.current==="light"?{default:14211288,dim:15263976,conn:12632256,labelText:1710623}:{default:2763306,dim:1315860,conn:4210752,labelText:15592943}),a=et(()=>o.current==="light"?16316666:592139),d=.75;Nt(()=>{o.current,K&&(K.style.fill=p(h).labelText);const v=p(Ot);for(const _ of y)_t(_.type)===Ct&&(_.color=v);tt()}),Nt(()=>{i(),tt()}),Nt(()=>{s(),tt()}),Nt(()=>{n(),tt()});let C=!1;Nt(()=>{const v=e.graphData;if(!q||!D||!R)return;if(!C){C=!0;return}const _=new Map;for(const T of v.edges)_.set(T.source,(_.get(T.source)??0)+1),_.set(T.target,(_.get(T.target)??0)+1);const M=new Map;for(const T of y)M.set(T.id,{x:T.x,y:T.y});const G=3600*v.nodes.length,j=Math.sqrt(G),B=v.nodes.map(T=>{const Y=_.get(T.id)??0,ht=M.get(T.id);return{id:T.id,type:T.type,repo:T.repo,color:_t(T.type)===Ct?p(Ot):_t(T.type),weight:Y,x:ht?.x??(Math.random()-.5)*j,y:ht?.y??(Math.random()-.5)*j,vx:0,vy:0,r:It(Y)}}),V=new Map;for(const T of B)V.set(T.id,T);const nt=new Set(L.keys()),ft=new Set(v.nodes.map(T=>T.id));for(const T of nt)if(!ft.has(T)){const Y=L.get(T);Y&&(R.removeChild(Y),Y.destroy()),L.delete(T)}let F=null;if(L.size>0&&(F=L.values().next().value?.texture),!F){const T=document.createElement("canvas");T.width=100,T.height=100;const Y=T.getContext("2d");Y.beginPath(),Y.arc(50,50,48,0,Math.PI*2),Y.fillStyle="#ffffff",Y.fill(),F=q.Texture.from(T)}for(const T of B){let Y=L.get(T.id);Y||(Y=new q.Sprite(F),Y.anchor.set(.5),R.addChild(Y),L.set(T.id,Y)),Y.tint=Ft(T.color)}y=B,f?.stop();const vt=v.edges.map(T=>({source:T.source,target:T.target})),X=ye(vt).id(T=>T.id).distance(250);f=_e(y).force("link",X).force("charge",Me().strength(-1e3).distanceMin(30)).force("x",be(0).strength(.1)).force("y",Te(0).strength(.1)).force("collide",ve().radius(60).strength(.5)).velocityDecay(.4).alpha(.3).on("tick",()=>{rt||Vt(),tt()}),u=X.links(),z=null,Xt(),tt()}),Nt(()=>{const v=r();if(v){const _=y.find(M=>M.id===v)??null;z=_,Xt(),b=_?1:0}else P||(b=0);tt()});let m,f=null,y=[],u=[],l=!1,g=0,w=0,N=0,x=1,z=null,P=null,$=pt(!1),O=0,Z=0,W=0,ct=0,Q=new Set,rt=!1,mt=pt(null),I=0,b=0;const E=4;let D=null,S=null,U=null,R=null,L=new Map,H=null,K=null,q=null;function It(v){return Math.max(3,Math.min(Math.sqrt(v+1)+2,10))}function Ht(v,_){const M=m.getBoundingClientRect();return{x:(v-M.left-w)/x,y:(_-M.top-N)/x}}function he(v,_){for(let M=y.length-1;M>=0;M--){const k=y[M],G=v-k.x,j=_-k.y,B=(k.r*1.5+4)/x;if(G*G+j*j<=B*B)return k}return null}function Xt(){const v=z??null;if(Q.clear(),!!v){Q.add(v.id);for(const _ of u)_.source.id===v.id&&Q.add(_.target.id),_.target.id===v.id&&Q.add(_.source.id);if(R){const _=L.get(v.id);_&&R.setChildIndex(_,R.children.length-1)}}}function Vt(){if(y.length===0||!m)return;let v=1/0,_=-1/0,M=1/0,k=-1/0,G=0;for(const F of y)F.x<v&&(v=F.x),F.x>_&&(_=F.x),F.y<M&&(M=F.y),F.y>k&&(k=F.y),F.r>G&&(G=F.r);const j=m.clientWidth,B=m.clientHeight,V=_-v,nt=k-M;if(V===0||nt===0)return;const ft=(60+G)*2;x=Math.min((j-ft)/V,(B-ft)/nt,3),w=j/2-(v+_)/2*x,N=B/2-(M+k)/2*x,tt()}function tt(){l=!0,g=0}function Ft(v){return parseInt(v.replace("#",""),16)}function xt(v,_,M){const k=(v>>16&255)+M*((_>>16&255)-(v>>16&255)),G=(v>>8&255)+M*((_>>8&255)-(v>>8&255)),j=(v&255)+M*((_&255)-(v&255));return Math.round(k)<<16|Math.round(G)<<8|Math.round(j)}function Be(){if(!q||!S||!U)return;S.clear(),U.clear();const _=z!==null,M=I,k=p(mt),G=s(),j=i(),B=p(h).default,V=p(h).dim,nt=p(h).conn;for(let ft=0;ft<u.length;ft++){const F=u[ft],vt=F.source.x*x+w,X=F.source.y*x+N,T=F.target.x*x+w,Y=F.target.y*x+N,ht=_&&M>.01&&Q.has(F.source.id)&&Q.has(F.target.id);let A=B;_&&M>.01?A=ht?xt(B,nt,M):xt(B,V,M):(k!==null||G!==null||j!==null)&&(A=V);const J=ht?U:S,Dt=ht?1:.2;J.setStrokeStyle({width:1,color:A,alpha:Dt}),J.moveTo(vt,X),J.lineTo(T,Y),J.stroke()}}function Oe(){if(!q)return;const v=z,_=v!==null,M=I,k=p(mt),G=s(),j=i(),B=!v&&n()?y.find(X=>X.id===n())??null:null,V=new Set;if(B){V.add(B.id);for(const X of u)X.source.id===B.id&&V.add(X.target.id),X.target.id===B.id&&V.add(X.source.id)}for(const X of y){const T=L.get(X.id);if(!T)continue;const Y=X.x*x+w,ht=X.y*x+N;T.position.set(Y,ht),T.scale.set(X.r/50),T.alpha=1;const A=Ft(X.color);if(B&&!v){const J=V.has(X.id);T.tint=J?A:xt(A,p(a),d)}else{const J=X===v,Dt=_&&Q.has(X.id),$e=k!==null&&(k==="other"?_t(X.type)===Ct:X.type===k);if(J&&M>.01)T.tint=A,T.scale.set(X.r*(1+M*.4)/50);else if(Dt)T.tint=A;else if(k!==null)T.tint=$e?A:xt(A,p(a),d);else if(G!==null){const Zt=G.has(X.id)?M*d:d;T.tint=xt(A,p(a),Zt)}else if(j!==null){const Zt=j.has(X.id)?M*d:d;T.tint=xt(A,p(a),Zt)}else T.tint=xt(A,p(a),M*d)}}const nt=v??B,ft=v?M>.01:!!B;if(nt&&ft&&H){H.visible=!0;const X=nt.x*x+w,T=nt.y*x+N;H.position.set(X,T),H.scale.set(nt.r*5/64),H.alpha=v?M*.25:.25,H.tint=Ft(nt.color)}else H&&(H.visible=!1);const F=v??B,vt=v?M>.01:!!B;if(F&&vt&&K){const X=F.x*x+w,T=F.y*x+N;K.text=c(F.id),K.style.fontSize=12,K.position.set(X,T+F.r+8),K.alpha=v?M:1,K.visible=!0}else K&&(K.visible=!1)}let Bt=!1;function Ge(v){if(v.button!==0)return;Bt=!1;const _=Ht(v.clientX,v.clientY),M=he(_.x,_.y);M?(P=M,rt=!0,M.fx=M.x,M.fy=M.y,f?.alphaTarget(.3).restart(),tt()):(ot($,!0),O=v.clientX,Z=v.clientY,W=w,ct=N),m.setPointerCapture(v.pointerId),window.addEventListener("pointerup",Kt,{once:!0})}function je(v){if(P){Bt=!0;const _=Ht(v.clientX,v.clientY);P.fx=_.x,P.fy=_.y,tt()}else if(p($))Bt=!0,w=W+(v.clientX-O),N=ct+(v.clientY-Z),tt();else{const _=Ht(v.clientX,v.clientY),M=he(_.x,_.y);M?M!==z?(z&&(I=.15),z=M,Xt(),b=1,m.style.cursor="pointer",tt()):b!==1&&(b=1,m.style.cursor="pointer",tt()):b!==0&&(b=0,m.style.cursor="grab",tt())}}function Kt(v){if(!P&&!p($))return;window.removeEventListener("pointerup",Kt);const _=Bt;if(P){const M=P;P.fx=null,P.fy=null,f?.alphaTarget(0),P=null,b=0,tt(),_||en(`/${M.repo}/${M.type}/${M.id}`)}else p($)&&ot($,!1);try{m.releasePointerCapture(v.pointerId)}catch{}}const Ct="#5c5c66",Ye="#b0b0b8",Ot=et(()=>o.current==="light"?Ye:Ct),We=et(()=>{const v=new Map;for(const k of e.graphData.nodes)v.set(k.type,(v.get(k.type)??0)+1);const _=[];let M=0;for(const[k,G]of v){const j=_t(k);j===Ct?M+=G:_.push({name:k,color:j,count:G})}return _.sort((k,G)=>G.count-k.count),M>0&&_.push({name:"other",color:p(Ot),count:M}),_});De(async()=>{q=await qe(()=>import("../chunks/BB_5th5W.js"),__vite__mapDeps([0,1,2]),import.meta.url),D=new q.Application,await D.init({antialias:!0,resolution:window.devicePixelRatio||1,autoDensity:!0,backgroundAlpha:0,resizeTo:m}),m.insertBefore(D.canvas,m.firstChild),D.canvas.style.position="absolute",D.canvas.style.inset="0",S=new q.Graphics,D.stage.addChild(S),U=new q.Graphics,D.stage.addChild(U),R=new q.Container,D.stage.addChild(R);const v=document.createElement("canvas");v.width=128,v.height=128;const _=v.getContext("2d"),M=_.createRadialGradient(64,64,0,64,64,64);M.addColorStop(0,"rgba(255,255,255,0.5)"),M.addColorStop(1,"rgba(255,255,255,0)"),_.fillStyle=M,_.fillRect(0,0,128,128);const k=q.Texture.from(v);H=new q.Sprite(k),H.anchor.set(.5),H.visible=!1,D.stage.addChild(H);const G=document.createElement("canvas");G.width=100,G.height=100;const j=G.getContext("2d");j.beginPath(),j.arc(50,50,48,0,Math.PI*2),j.fillStyle="#ffffff",j.fill();const B=q.Texture.from(G),V=new Map;for(const A of e.graphData.edges)V.set(A.source,(V.get(A.source)??0)+1),V.set(A.target,(V.get(A.target)??0)+1);const nt=new Map,F=3600*e.graphData.nodes.length,vt=Math.sqrt(F);y=e.graphData.nodes.map(A=>{const J=V.get(A.id)??0,Dt={id:A.id,type:A.type,repo:A.repo,color:_t(A.type)===Ct?p(Ot):_t(A.type),weight:J,x:(Math.random()-.5)*vt,y:(Math.random()-.5)*vt,vx:0,vy:0,r:It(J)};return nt.set(A.id,Dt),Dt});for(const A of y){const J=new q.Sprite(B);J.anchor.set(.5),J.tint=Ft(A.color),R.addChild(J),L.set(A.id,J)}K=new q.Text({text:"",style:{fontFamily:"Inter, system-ui, sans-serif",fontWeight:"500",fontSize:12,fill:p(h).labelText,align:"center"}}),K.anchor.set(.5,0),K.visible=!1,D.stage.addChild(K);const X=e.graphData.edges.map(A=>({source:A.source,target:A.target})),T=ye(X).id(A=>A.id).distance(250);f=_e(y).force("link",T).force("charge",Me().strength(-1e3).distanceMin(30)).force("x",be(0).strength(.1)).force("y",Te(0).strength(.1)).force("collide",ve().radius(60).strength(.5)).velocityDecay(.4).alpha(1).on("tick",()=>{rt||Vt(),tt()}),u=T.links();let Y=0;D.ticker.add(()=>{const A=performance.now(),J=Y?Math.min((A-Y)/1e3,.05):.016;Y=A,I<b?(I=Math.min(b,I+E*J),l=!0):I>b&&(I=Math.max(b,I-E*J),l=!0),I===0&&b===0&&z&&!P&&(z=null,Xt(),l=!0),(l||g<120)&&(Be(),Oe(),l=!1,g++)});const ht=new ResizeObserver(()=>{D.renderer.resize(m.clientWidth,m.clientHeight),Vt()});return ht.observe(m),()=>{ht.disconnect()}}),He(()=>{f?.stop(),D&&(D.destroy(!0,{children:!0}),D=null)});var Qt=Fn(),wt=ut(Qt);let de;var Jt=ut(wt);ne(Jt,21,()=>p(We),ie,(v,_)=>{var M=Xn();let k;var G=ut(M);let j;var B=dt(G,2),V=ut(B,!0);it(B);var nt=dt(B,2),ft=ut(nt,!0);it(nt),it(M),At(()=>{k=tn(M,1,"legend-item svelte-1i33fky",null,k,{"legend-item-active":p(mt)===p(_).name}),j=zt(G,"",j,{background:p(_).color}),Rt(V,p(_).name),Rt(ft,p(_).count)}),te("mouseenter",M,()=>{ot(mt,p(_).name,!0),tt()}),te("mouseleave",M,()=>{ot(mt,null),tt()}),gt(v,M)}),it(Jt),it(wt),Ne(wt,v=>m=v,()=>m),it(Qt),At(()=>de=zt(wt,"",de,{cursor:p($)?"grabbing":"grab"})),Mt("pointerdown",wt,Ge),Mt("pointermove",wt,je),Mt("pointerup",wt,Kt),Mt("pointerdown",Jt,v=>v.stopPropagation()),gt(t,Qt),le()}Ie(["pointerdown","pointermove","pointerup"]);function On(t,e){const n=Ae(e,["children","$$slots","$$events","$$legacy"]);const i=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z"}]];Pe(t,ze({name:"play"},()=>n,{get iconNode(){return i},children:(r,s)=>{var c=ae(),o=ce(c);Se(o,e,"default",{}),gt(r,c)},$$slots:{default:!0}}))}function Gn(t,e){const n=Ae(e,["children","$$slots","$$events","$$legacy"]);const i=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1"}]];Pe(t,ze({name:"pause"},()=>n,{get iconNode(){return i},children:(r,s)=>{var c=ae(),o=ce(c);Se(o,e,"default",{}),gt(r,c)},$$slots:{default:!0}}))}var jn=Tt('<div class="density-bar svelte-lzvab"></div>'),Yn=Tt('<span class="date-label svelte-lzvab"> </span>'),Wn=Tt('<div class="timeline-tooltip svelte-lzvab"><div class="tooltip-date svelte-lzvab"> </div> <div class="tooltip-count svelte-lzvab"> </div></div>'),$n=Tt('<div class="timeline-bar svelte-lzvab"><!> <div class="timeline-track svelte-lzvab"><div class="track-line svelte-lzvab"></div> <div class="density-bars svelte-lzvab"></div> <div class="playhead svelte-lzvab"></div> <div class="date-labels svelte-lzvab"></div> <!></div></div>');function Un(t,e){se(e,!0);let n=pt(null),i=pt(0),r=pt(!1),s=pt(!1),c=pt(null),o=null;const h=et(()=>{let I=1/0,b=-1/0;for(const E of e.entities){const D=E.createdAt?new Date(E.createdAt).getTime():0;D>0&&D<I&&(I=D),D>b&&(b=D)}return I===1/0&&(I=Date.now()),b===-1/0&&(b=Date.now()),{min:I,max:b}}),a=et(()=>{let{min:I,max:b}=p(h);return b-I<864e5&&(I-=864e5*15,b+=864e5*15),{min:new Date(I),max:new Date(b)}}),d=et(()=>{const b=p(a).min.getTime(),E=p(a).max.getTime(),D=new Map;for(const S of e.entities){const U=S.createdAt?new Date(S.createdAt).getTime():0;if(U<=0)continue;const R=Math.floor((U-b)/864e5),L=b+R*864e5,H=D.get(L)??[];H.push(S),D.set(L,H)}return{map:D,minTime:b,maxTime:E,dayMs:864e5}}),C=et(()=>{let I=0;for(const b of p(d).map.values())b.length>I&&(I=b.length);return Math.max(1,I)}),m=et(()=>{const{minTime:I,maxTime:b}=p(d),E=b-I,D=[],S=Math.max(4,Math.min(8,Math.floor(p(i)/100))),U=E/S;for(let R=0;R<=S;R++){const L=I+R*U,K=new Date(L).toLocaleDateString("en-US",{month:"short",day:"numeric"});D.push({label:K,x:R/S})}return D}),f=et(()=>{const{minTime:I,maxTime:b}=p(d),E=b-I;if(E<=0)return .5;const D=e.currentDate?e.currentDate.getTime():p(h).max,S=Math.max(p(h).min,Math.min(p(h).max,D));return Math.max(0,Math.min(1,(S-I)/E))});function y(I){if(!p(n))return new Date;const b=p(n).getBoundingClientRect(),E=40,S=b.width-E-12,U=Math.max(0,Math.min(1,(I-b.left-E)/S)),{minTime:R,maxTime:L}=p(d),H=R+U*(L-R);return new Date(Math.max(p(h).min,Math.min(p(h).max,H)))}function u(I){ot(r,!0),z();const b=y(I.clientX);e.onDateChange(b),I.target.setPointerCapture(I.pointerId)}function l(I){if(p(r)&&e.onDateChange(y(I.clientX)),!p(n))return;const b=p(n).getBoundingClientRect(),E=40,S=b.width-E-12,U=(I.clientX-b.left-E)/S;if(U<0||U>1){ot(c,null);return}const{minTime:R,dayMs:L,map:H}=p(d),K=R+U*(p(d).maxTime-R),q=R+Math.floor((K-R)/L)*L,It=H.get(q);It&&It.length>0?ot(c,{date:new Date(q),count:It.length,x:I.clientX-b.left},!0):ot(c,null)}function g(){ot(r,!1)}function w(){ot(c,null)}function N(){p(s)?z():x()}function x(){ot(s,!0);const{min:I,max:b}=p(h),D=(b-I)/200;let S=e.currentDate?.getTime()??I;S>=b&&(S=I),o=setInterval(()=>{if(S+=D,S>=b){e.onDateChange(null),z();return}e.onDateChange(new Date(S))},50)}function z(){ot(s,!1),o&&(clearInterval(o),o=null)}De(()=>{if(p(n)){const I=new ResizeObserver(b=>{ot(i,b[0]?.contentRect.width??0,!0)});return I.observe(p(n)),()=>I.disconnect()}});var P=$n(),$=ut(P);{let I=et(()=>p(s)?"Pause":"Play");nn($,{variant:"ghost",size:"icon",class:"play-btn",onclick:N,get title(){return p(I)},children:(b,E)=>{var D=ae(),S=ce(D);{var U=L=>{Gn(L,{size:14})},R=L=>{On(L,{size:14})};ee(S,L=>{p(s)?L(U):L(R,!1)})}gt(b,D)},$$slots:{default:!0}})}var O=dt($,2),Z=dt(ut(O),2);ne(Z,21,()=>Array.from(p(d).map.entries()),ie,(I,b)=>{var E=et(()=>Ve(p(b),2));let D=()=>p(E)[0],S=()=>p(E)[1];const U=et(()=>(D()-p(d).minTime)/(p(d).maxTime-p(d).minTime)),R=et(()=>S().length/p(C)),L=et(()=>.05+.95*p(R)*p(R));var H=jn();let K;At(()=>K=zt(H,"",K,{left:`${p(U)*100}%`,opacity:p(L)})),gt(I,H)}),it(Z);var W=dt(Z,2);let ct;var Q=dt(W,2);ne(Q,21,()=>p(m),ie,(I,b)=>{var E=Yn();let D;var S=ut(E,!0);it(E),At(()=>{D=zt(E,"",D,{left:`${p(b).x*100}%`}),Rt(S,p(b).label)}),gt(I,E)}),it(Q);var rt=dt(Q,2);{var mt=I=>{var b=Wn();let E;var D=ut(b),S=ut(D,!0);it(D);var U=dt(D,2),R=ut(U);it(U),it(b),At(L=>{E=zt(b,"",E,{left:`${p(c).x??""}px`}),Rt(S,L),Rt(R,`${p(c).count??""} ${p(c).count===1?"entity":"entities"}`)},[()=>p(c).date.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})]),gt(I,b)};ee(rt,I=>{p(c)&&!p(r)&&I(mt)})}it(O),it(P),Ne(P,I=>ot(n,I),()=>p(n)),At(()=>ct=zt(W,"",ct,{left:`${p(f)*100}%`})),Mt("pointerdown",O,u),Mt("pointermove",O,l),Mt("pointerup",O,g),te("pointerleave",O,w),gt(t,P),le()}Ie(["pointerdown","pointermove","pointerup"]);var Hn=Tt('<div class="content-row svelte-315y67"><div class="graph-area svelte-315y67"><!> <!> <!></div> <!></div>');function oi(t,e){se(e,!0);const n=Ce("chat");qt.showGraph();let i=pt(null);const r=et(()=>{const o=new Map;for(const h of jt.repos)for(const a of h.entities)o.set(a.id,a.title);return o}),s=et(()=>{const o=[];for(const h of jt.repos)for(const a of h.entities)a.id.toLowerCase().startsWith("readme")||o.push(a);return o}),c=et(()=>{const o=[],h=[],a=new Set,d=new Set,C=p(i)?.getTime()??1/0;for(const f of jt.repos)for(const y of f.entities){if(y.id.toLowerCase().startsWith("readme")||a.has(y.id)||(y.createdAt?new Date(y.createdAt).getTime():0)>C)continue;a.add(y.id),o.push({id:y.id,type:y.entityType,repo:f.name});const l=y.wikilinks??[];for(const g of l){const w=y.id<g?`${y.id}|${g}`:`${g}|${y.id}`;!d.has(w)&&y.id!==g&&(d.add(w),h.push({source:y.id,target:g}))}}const m=h.filter(f=>a.has(f.source)&&a.has(f.target));return{nodes:o,edges:m}});Ke(t,{children:(o,h)=>{var a=Hn(),d=ut(a),C=ut(d);Qe(C,{activeView:"graph"});var m=dt(C,2);Bn(m,{get graphData(){return p(c)},get selectedEntityId(){return qt.selectedId},get nameMap(){return p(r)},get filteredIds(){return jt.filteredIds},get sidebarHoveredId(){return qt.hoveredEntityId},get highlightedIds(){return Je.highlightedIds}});var f=dt(m,2);Un(f,{get entities(){return p(s)},get currentDate(){return p(i)},onDateChange:l=>{ot(i,l,!0)}}),it(d);var y=dt(d,2);{var u=l=>{Ze(l,{})};ee(y,l=>{n.open&&l(u)})}it(a),gt(o,a)},$$slots:{default:!0}}),le()}export{oi as component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as K,a as x,f as q,t as L,s as y}from"../chunks/Cs_ROD7H.js";import{y as T,I as $,A as j,J as C,K as l,D as r,L as u,B as a,$ as H,G as t,m as i,F as M}from"../chunks/BeBar3OL.js";import{i as N}from"../chunks/xBRYfpah.js";import{h as O}from"../chunks/O0fx2ss6.js";import{g as Q}from"../chunks/
|
|
1
|
+
import{e as K,a as x,f as q,t as L,s as y}from"../chunks/Cs_ROD7H.js";import{y as T,I as $,A as j,J as C,K as l,D as r,L as u,B as a,$ as H,G as t,m as i,F as M}from"../chunks/BeBar3OL.js";import{i as N}from"../chunks/xBRYfpah.js";import{h as O}from"../chunks/O0fx2ss6.js";import{g as Q}from"../chunks/tXD97DTQ.js";import{a as R,w}from"../chunks/DP09rP34.js";import{I as S,B as U}from"../chunks/BuOTIbJu.js";var V=q('<p class="error-msg svelte-1x05zx6"> </p>'),W=q('<div class="login-page svelte-1x05zx6"><div class="login-card svelte-1x05zx6"><div class="logo svelte-1x05zx6"><div class="logo-icon svelte-1x05zx6">S</div> <span class="logo-text svelte-1x05zx6"> </span></div> <form class="svelte-1x05zx6"><label class="field svelte-1x05zx6"><span class="field-label svelte-1x05zx6">Email</span> <!></label> <label class="field svelte-1x05zx6"><span class="field-label svelte-1x05zx6">Password</span> <!></label> <!> <!></form></div></div>');function re(I,B){T(B,!0);let g=u(""),b=u(""),n=u(""),v=u(!1);async function P(e){e.preventDefault();const s=e.currentTarget,o=s.querySelector('input[type="email"]').value,G=s.querySelector('input[type="password"]').value;l(n,""),l(v,!0);try{await R.login(o,G),Q("/")}catch(J){l(n,J.message||"Invalid credentials",!0)}finally{l(v,!1)}}var p=W();O("1x05zx6",e=>{C(()=>{H.title=`Sign in — ${(w.name||"Studiograph")??""}`})});var _=a(p),d=a(_),h=r(a(d),2),k=a(h,!0);t(h),t(d);var m=r(d,2),c=a(m),D=r(a(c),2);S(D,{type:"email",required:!0,autocomplete:"email",autofocus:!0,class:"field-input",get value(){return i(g)},set value(e){l(g,e,!0)}}),t(c);var f=r(c,2),E=r(a(f),2);S(E,{type:"password",required:!0,autocomplete:"current-password",class:"field-input",get value(){return i(b)},set value(e){l(b,e,!0)}}),t(f);var z=r(f,2);{var A=e=>{var s=V(),o=a(s,!0);t(s),$(()=>y(o,i(n))),x(e,s)};N(z,e=>{i(n)&&e(A)})}var F=r(z,2);U(F,{variant:"accent",type:"submit",class:"submit-btn",get disabled(){return i(v)},children:(e,s)=>{M();var o=L("Sign in");x(e,o)},$$slots:{default:!0}}),t(m),t(_),t(p),$(()=>y(k,w.name||"Studiograph")),K("submit",m,P),x(I,p),j()}export{re as component};
|