studiograph 1.3.3-next.6 → 1.3.3
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/cli/index.js +0 -3
- package/dist/cli/index.js.map +1 -1
- package/dist/core/workspace.js +1 -1
- package/dist/core/workspace.js.map +1 -1
- package/dist/server/chrome/chrome.js +212 -12
- package/dist/server/index.js +42 -54
- package/dist/server/index.js.map +1 -1
- package/dist/server/routes/graph-api.js +2 -0
- package/dist/server/routes/graph-api.js.map +1 -1
- package/dist/services/auth-service.d.ts +0 -37
- package/dist/services/auth-service.js +6 -132
- package/dist/services/auth-service.js.map +1 -1
- package/dist/web/_app/immutable/assets/{0.D0mpnn_z.css → 0.CDbX4Cwz.css} +1 -1
- package/dist/web/_app/immutable/assets/AppShell.D0rmbdqF.css +1 -0
- package/dist/web/_app/immutable/chunks/479TgXB4.js +1 -0
- package/dist/web/_app/immutable/chunks/{mqys3rB_.js → BFb0g4TQ.js} +19 -19
- package/dist/web/_app/immutable/chunks/Bopa-Ask.js +1 -0
- package/dist/web/_app/immutable/chunks/COwytaCP.js +1 -0
- package/dist/web/_app/immutable/chunks/{D3JV20PL.js → DEJSHbC3.js} +1 -1
- package/dist/web/_app/immutable/chunks/DNywhIex.js +23 -0
- package/dist/web/_app/immutable/chunks/{k7cHqfZG.js → DTUXhwEY.js} +1 -1
- package/dist/web/_app/immutable/chunks/{DiYW7nWb.js → DThXpa0U.js} +3 -3
- package/dist/web/_app/immutable/chunks/Dml-u95b.js +2 -0
- package/dist/web/_app/immutable/chunks/DvKVaE7M.js +1 -0
- package/dist/web/_app/immutable/chunks/MbiSz-iW.js +2 -0
- package/dist/web/_app/immutable/chunks/bSAC733J.js +1 -0
- package/dist/web/_app/immutable/entry/app.BvodXQQ0.js +2 -0
- package/dist/web/_app/immutable/entry/start.Bkui3Kyw.js +1 -0
- package/dist/web/_app/immutable/nodes/0.DfbCOBhn.js +2 -0
- package/dist/web/_app/immutable/nodes/1.vtxUGpe6.js +1 -0
- package/dist/web/_app/immutable/nodes/2.Cq29oW4h.js +1 -0
- package/dist/web/_app/immutable/nodes/3.SquslPZy.js +1 -0
- package/dist/web/_app/immutable/nodes/4.COV8FR8b.js +16 -0
- package/dist/web/_app/immutable/nodes/5.BBpmYkAu.js +4 -0
- package/dist/web/_app/immutable/nodes/6.BBbh6z9I.js +2 -0
- package/dist/web/_app/version.json +1 -1
- package/dist/web/index.html +12 -14
- package/package.json +1 -7
- package/dist/web/_app/immutable/assets/7.Cn2DG-J6.css +0 -1
- package/dist/web/_app/immutable/assets/8.DNePkG2G.css +0 -1
- package/dist/web/_app/immutable/assets/9.Sm6jB3a0.css +0 -1
- package/dist/web/_app/immutable/assets/AppShell.Dwgi1sJ2.css +0 -1
- package/dist/web/_app/immutable/assets/ConfirmDialog.nyU0oHj9.css +0 -1
- package/dist/web/_app/immutable/chunks/5Q3D38Jx.js +0 -1
- package/dist/web/_app/immutable/chunks/B53wS7kY.js +0 -1
- package/dist/web/_app/immutable/chunks/B6Qvlz8_.js +0 -2
- package/dist/web/_app/immutable/chunks/B8lPlWi9.js +0 -23
- package/dist/web/_app/immutable/chunks/BNNl3u5G.js +0 -1
- package/dist/web/_app/immutable/chunks/BPrnZEtq.js +0 -2
- package/dist/web/_app/immutable/chunks/Bevw5Env.js +0 -1
- package/dist/web/_app/immutable/chunks/C8GaZaTC.js +0 -1
- package/dist/web/_app/immutable/chunks/C9c9fKQ7.js +0 -1
- package/dist/web/_app/immutable/chunks/D4CY2rxN.js +0 -1
- package/dist/web/_app/immutable/chunks/DRrowDpW.js +0 -1
- package/dist/web/_app/immutable/chunks/DU_X_lSK.js +0 -1
- package/dist/web/_app/immutable/chunks/Db_-W430.js +0 -1
- package/dist/web/_app/immutable/chunks/De3BU01A.js +0 -1
- package/dist/web/_app/immutable/chunks/DhDqSWbJ.js +0 -1
- package/dist/web/_app/immutable/entry/app.Vz-ml7_v.js +0 -2
- package/dist/web/_app/immutable/entry/start.CWG1-PXE.js +0 -1
- package/dist/web/_app/immutable/nodes/0.CwYtDM-2.js +0 -2
- package/dist/web/_app/immutable/nodes/1._RYH6T6O.js +0 -1
- package/dist/web/_app/immutable/nodes/2.Cp9U5Fmz.js +0 -1
- package/dist/web/_app/immutable/nodes/3.kN5zb7nM.js +0 -1
- package/dist/web/_app/immutable/nodes/4.C4Os8Icx.js +0 -16
- package/dist/web/_app/immutable/nodes/5.w_7HfI6i.js +0 -4
- package/dist/web/_app/immutable/nodes/6.Cm7_m4M0.js +0 -2
- package/dist/web/_app/immutable/nodes/7.DyExi_V2.js +0 -1
- package/dist/web/_app/immutable/nodes/8.D6HHflqh.js +0 -1
- package/dist/web/_app/immutable/nodes/9.CnLcLqTc.js +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{b as wt,E as mt,aW as it,g as V,j as at,au as st,h as F,aX as Et,aY as At,aZ as St,aN as Tt,a_ as _t,a$ as It,b0 as $t,F as a,b1 as Rt,b2 as W,d as q,b3 as Lt,b4 as Ot,a2 as Ut,b5 as kt,b6 as Pt,b7 as Ft,P as E,Q as j,T as p,Y as ut,W as Nt}from"./DEJSHbC3.js";import{B as jt}from"./Bopa-Ask.js";import{k as Mt,j as Gt,g as Jt,l as Wt,n as Bt,m as Ht}from"./bSAC733J.js";function Te(t,r,...e){var n=new jt(t);wt(()=>{const i=r()??null;n.ensure(i,i&&(f=>i(f,...e)))},mt)}function Yt(t,r){var e=void 0,n;it(()=>{e!==(e=r())&&(n&&(V(n),n=null),e&&(n=at(()=>{st(()=>e(t))})))})}function lt(t){var r,e,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(r=0;r<i;r++)t[r]&&(e=lt(t[r]))&&(n&&(n+=" "),n+=e)}else for(e in t)t[e]&&(n&&(n+=" "),n+=e);return n}function Dt(){for(var t,r,e=0,n="",i=arguments.length;e<i;e++)(t=arguments[e])&&(r=lt(t))&&(n&&(n+=" "),n+=r);return n}function Kt(t){return typeof t=="object"?Dt(t):t??""}const z=[...`
|
|
2
|
+
\r\f \v\uFEFF`];function Qt(t,r,e){var n=t==null?"":""+t;if(r&&(n=n?n+" "+r:r),e){for(var i of Object.keys(e))if(e[i])n=n?n+" "+i:i;else if(n.length)for(var f=i.length,d=0;(d=n.indexOf(i,d))>=0;){var y=d+f;(d===0||z.includes(n[d-1]))&&(y===n.length||z.includes(n[y]))?n=(d===0?"":n.substring(0,d))+n.substring(y+1):d=y}}return n===""?null:n}function x(t,r=!1){var e=r?" !important;":";",n="";for(var i of Object.keys(t)){var f=t[i];f!=null&&f!==""&&(n+=" "+i+": "+f+e)}return n}function K(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function Vt(t,r){if(r){var e="",n,i;if(Array.isArray(r)?(n=r[0],i=r[1]):n=r,t){t=String(t).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var f=!1,d=0,y=!1,v=[];n&&v.push(...Object.keys(n).map(K)),i&&v.push(...Object.keys(i).map(K));var b=0,A=-1;const U=t.length;for(var C=0;C<U;C++){var l=t[C];if(y?l==="/"&&t[C-1]==="*"&&(y=!1):f?f===l&&(f=!1):l==="/"&&t[C+1]==="*"?y=!0:l==='"'||l==="'"?f=l:l==="("?d++:l===")"&&d--,!y&&f===!1&&d===0){if(l===":"&&A===-1)A=C;else if(l===";"||C===U-1){if(A!==-1){var O=K(t.substring(b,A).trim());if(!v.includes(O)){l!==";"&&C++;var _=t.substring(b,C).trim();e+=" "+_+";"}}b=C+1,A=-1}}}}return n&&(e+=x(n)),i&&(e+=x(i,!0)),e=e.trim(),e===""?null:e}return t==null?null:String(t)}function Xt(t,r,e,n,i,f){var d=t.__className;if(F||d!==e||d===void 0){var y=Qt(e,n,f);(!F||y!==t.getAttribute("class"))&&(y==null?t.removeAttribute("class"):r?t.className=y:t.setAttribute("class",y)),t.__className=e}else if(f&&i!==f)for(var v in f){var b=!!f[v];(i==null||b!==!!i[v])&&t.classList.toggle(v,b)}return f}function Q(t,r={},e,n){for(var i in e){var f=e[i];r[i]!==f&&(e[i]==null?t.style.removeProperty(i):t.style.setProperty(i,f,n))}}function Zt(t,r,e,n){var i=t.__style;if(F||i!==r){var f=Vt(r,n);(!F||f!==t.getAttribute("style"))&&(f==null?t.removeAttribute("style"):t.style.cssText=f),t.__style=r}else n&&(Array.isArray(n)?(Q(t,e?.[0],n[0]),Q(t,e?.[1],n[1],"important")):Q(t,e,n));return n}function X(t,r,e=!1){if(t.multiple){if(r==null)return;if(!Et(r))return At();for(var n of t.options)n.selected=r.includes(tt(n));return}for(n of t.options){var i=tt(n);if(St(i,r)){n.selected=!0;return}}(!e||r!==void 0)&&(t.selectedIndex=-1)}function qt(t){var r=new MutationObserver(()=>{X(t,t.__value)});r.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Tt(()=>{r.disconnect()})}function tt(t){return"__value"in t?t.__value:t.value}const G=Symbol("class"),J=Symbol("style"),ft=Symbol("is custom element"),ct=Symbol("is html"),zt=W?"link":"LINK",xt=W?"input":"INPUT",te=W?"option":"OPTION",ee=W?"select":"SELECT",re=W?"progress":"PROGRESS";function ne(t){if(F){var r=!1,e=()=>{if(!r){if(r=!0,t.hasAttribute("value")){var n=t.value;H(t,"value",null),t.value=n}if(t.hasAttribute("checked")){var i=t.checked;H(t,"checked",null),t.checked=i}}};t.__on_r=e,Ut(e),kt()}}function _e(t,r){var e=Z(t);e.value===(e.value=r??void 0)||t.value===r&&(r!==0||t.nodeName!==re)||(t.value=r??"")}function oe(t,r){r?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function H(t,r,e,n){var i=Z(t);F&&(i[r]=t.getAttribute(r),r==="src"||r==="srcset"||r==="href"&&t.nodeName===zt)||i[r]!==(i[r]=e)&&(r==="loading"&&(t[Pt]=e),e==null?t.removeAttribute(r):typeof e!="string"&&dt(t).includes(r)?t[r]=e:t.setAttribute(r,e))}function ie(t,r,e,n,i=!1,f=!1){if(F&&i&&t.nodeName===xt){var d=t,y=d.type==="checkbox"?"defaultChecked":"defaultValue";y in e||ne(d)}var v=Z(t),b=v[ft],A=!v[ct];let C=F&&b;C&&q(!1);var l=r||{},O=t.nodeName===te;for(var _ in r)_ in e||(e[_]=null);e.class?e.class=Kt(e.class):e[G]&&(e.class=null),e[J]&&(e.style??=null);var U=dt(t);for(const h in e){let g=e[h];if(O&&h==="value"&&g==null){t.value=t.__value="",l[h]=g;continue}if(h==="class"){var k=t.namespaceURI==="http://www.w3.org/1999/xhtml";Xt(t,k,g,n,r?.[G],e[G]),l[h]=g,l[G]=e[G];continue}if(h==="style"){Zt(t,g,r?.[J],e[J]),l[h]=g,l[J]=e[J];continue}var I=l[h];if(!(g===I&&!(g===void 0&&t.hasAttribute(h)))){l[h]=g;var M=h[0]+h[1];if(M!=="$$")if(M==="on"){const L={},P="$$"+h;let R=h.slice(2);var S=Ht(R);if(Mt(R)&&(R=R.slice(0,-7),L.capture=!0),!S&&I){if(g!=null)continue;t.removeEventListener(R,l[P],L),l[P]=null}if(S)Gt(R,t,g),Jt([R]);else if(g!=null){let Y=function(D){l[h].call(this,D)};l[P]=Wt(R,t,Y,L)}}else if(h==="style")H(t,h,g);else if(h==="autofocus")Lt(t,!!g);else if(!b&&(h==="__value"||h==="value"&&g!=null))t.value=t.__value=g;else if(h==="selected"&&O)oe(t,g);else{var m=h;A||(m=Bt(m));var B=m==="defaultValue"||m==="defaultChecked";if(g==null&&!b&&!B)if(v[h]=null,m==="value"||m==="checked"){let L=t;const P=r===void 0;if(m==="value"){let R=L.defaultValue;L.removeAttribute(m),L.defaultValue=R,L.value=L.__value=P?R:null}else{let R=L.defaultChecked;L.removeAttribute(m),L.defaultChecked=R,L.checked=P?R:!1}}else t.removeAttribute(h);else B||U.includes(m)&&(b||typeof g!="string")?(t[m]=g,m in v&&(v[m]=Ot)):typeof g!="function"&&H(t,m,g)}}}return C&&q(!0),l}function Ie(t,r,e=[],n=[],i=[],f,d=!1,y=!1){$t(i,e,n,v=>{var b=void 0,A={},C=t.nodeName===ee,l=!1;if(it(()=>{var _=r(...v.map(a)),U=ie(t,b,_,f,d,y);l&&C&&"value"in _&&X(t,_.value);for(let I of Object.getOwnPropertySymbols(A))_[I]||V(A[I]);for(let I of Object.getOwnPropertySymbols(_)){var k=_[I];I.description===Rt&&(!b||k!==b[I])&&(A[I]&&V(A[I]),A[I]=at(()=>Yt(t,()=>k))),U[I]=k}b=U}),C){var O=t;st(()=>{X(O,b.value,!0),qt(O)})}l=!0})}function Z(t){return t.__attributes??={[ft]:t.nodeName.includes("-"),[ct]:t.namespaceURI===_t}}var et=new Map;function dt(t){var r=t.getAttribute("is")||t.nodeName,e=et.get(r);if(e)return e;et.set(r,e=[]);for(var n,i=t,f=Element.prototype;f!==i;){n=Ft(i);for(var d in n)n[d].set&&e.push(d);i=It(i)}return e}const ae="";class se extends Error{constructor(r,e){super(e),this.status=r,this.name="ApiError"}}async function T(t,r){const e={...r?.headers};r?.body&&(e["Content-Type"]=e["Content-Type"]??"application/json");const n=await fetch(`${ae}${t}`,{...r,headers:e});if(!n.ok){const i=await n.json().catch(()=>({error:n.statusText}));throw new se(n.status,i.error??n.statusText)}return n.json()}function ue(){return T("/api/workspace")}function rt(){return T("/api/repos")}function le(t,r,e){return T("/api/repos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:t,description:r,...e?{private:!0}:{}})})}function fe(t,r){return T(`/api/repos/${encodeURIComponent(t)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:r})})}function ce(t){return T(`/api/repos/${encodeURIComponent(t)}`,{method:"DELETE"})}function de(){return T("/api/apps")}function pe(t){return T(`/api/repos/${encodeURIComponent(t)}/entities?summary=true`)}function $e(t,r,e){return T(`/api/repos/${encodeURIComponent(t)}/entities/${encodeURIComponent(r)}/${encodeURIComponent(e)}`)}function ge(t,r,e){return T(`/api/repos/${encodeURIComponent(t)}/entities/${encodeURIComponent(r)}/${encodeURIComponent(e)}/contents`)}function Re(t,r,e,n){return fetch(`/api/repos/${encodeURIComponent(t)}/entities/${encodeURIComponent(r)}/${encodeURIComponent(e)}/contents/${n}`).then(i=>{if(!i.ok)throw new Error(`Failed to load ${n}`);return i.text()})}function Le(t,r,e,n,i){return T(`/api/repos/${encodeURIComponent(t)}/entities`,{method:"POST",body:JSON.stringify({entityType:r,entityId:e,data:n,content:i})})}function Oe(t,r,e){return T(`/api/repos/${encodeURIComponent(t)}/entities/${encodeURIComponent(r)}/${encodeURIComponent(e)}`,{method:"DELETE"})}function Ue(t,r,e,n){return T(`/api/repos/${encodeURIComponent(t)}/entities/${encodeURIComponent(r)}/${encodeURIComponent(e)}`,{method:"PUT",body:JSON.stringify(n)})}function ke(t,r,e,n,i){return T(`/api/repos/${encodeURIComponent(t)}/entities/${encodeURIComponent(r)}/${encodeURIComponent(e)}/contents/${n}`,{method:"PUT",body:JSON.stringify({content:i})})}function he(t){return t.replace(/-/g," ").replace(/\b\w/g,r=>r.toUpperCase())}function ye(){let t=E(""),r=E(!1),e=E(j([])),n=E(j([])),i=E(!1),f=E(null),d=E(j({})),y=j({}),v=j({}),b=j({}),A=E(0),C=E(null),l=E(""),O=null,_=E(0),U=E(0),k=E("alpha");async function I(){p(i,!0),p(f,null);try{const[o,s,u]=await Promise.all([rt(),de().catch(()=>[]),ue().catch(()=>({name:""}))]);p(n,s,!0),p(t,u.name,!0),p(r,!0),p(e,o.map(c=>({name:c.name,type:c.type,private:c.private,count:null,entities:[],loading:!1,loaded:!1})),!0),await Promise.all(a(e).map(c=>m(c.name)))}catch(o){p(f,o.message,!0)}finally{p(i,!1)}}async function M(o){a(e).find(u=>u.name===o)&&await m(o,!0)}async function S(){p(_,0),p(U,0),await Promise.all(a(e).map(o=>m(o.name,!0)))}async function m(o,s=!1){const u=a(e).find(c=>c.name===o);if(!(!u||u.loading)&&!(!s&&u.loaded)){s||(u.loading=!0);try{const c=await pe(o);let w=0,N=0;for(const $ of c)w+=$.document?.wikilinks?.length??0,N+=$.subContentCount??0;p(_,a(_)+w),p(U,a(U)+N),u.entities=c.filter($=>!$.id.toLowerCase().startsWith("readme")).map($=>({id:$.id,title:$.data?.name??he($.id),entityType:$.entityType,repo:o,hasSubContent:!!$.hasSubContent,wikilinks:$.document?.wikilinks??[],createdAt:$.data?.created_at??null,updatedAt:$.data?.updated_at??null})).sort(($,Ct)=>$.title.localeCompare(Ct.title)),u.count=u.entities.length,u.loaded=!0}catch(c){console.error(`Failed to load entities for ${o}:`,c)}finally{u.loading=!1}}}function B(o){a(d)[o]=!a(d)[o]}function h(o){return a(d)[o]??!1}function g(o,s,u){return`${o}/${s}/${u}`}function L(o,s,u){const c=g(o,s,u),w=y[c]??!1;y[c]=!w,!w&&!v[c]?.loaded&&Y(o,s,u)}function P(o,s,u){return y[g(o,s,u)]??!1}function R(o,s,u){return v[g(o,s,u)]??{entries:[],loading:!1,loaded:!1}}async function Y(o,s,u){const c=g(o,s,u);v[c]={entries:[],loading:!0,loaded:!1};try{const w=await ge(o,s,u);v[c]={entries:w,loading:!1,loaded:!0}}catch(w){console.error(`Failed to load contents for ${c}:`,w),v[c]={entries:[],loading:!1,loaded:!0}}}function D(o){const s=a(l).trim().toLowerCase();if(!s)return o;const u=[];for(const c of o){const w=c.entities.filter(N=>N.title.toLowerCase().includes(s)||N.id.toLowerCase().includes(s));w.length>0&&u.push({...c,entities:w,count:w.length})}return u}function pt(o){if(o&&!a(l)?O={...a(d)}:!o&&a(l)&&O&&(p(d,O,!0),O=null),p(l,o,!0),o){const s=o.trim().toLowerCase();for(const u of a(e)){const c=u.entities.some(w=>w.title.toLowerCase().includes(s)||w.id.toLowerCase().includes(s));a(d)[u.name]=c}}}function gt(o){const s=o.startsWith("type:");b[o]=!(b[o]??s)}function ht(o){return b[o]??!1}function yt(o){return b[o]===!1}const vt=ut(()=>a(e).reduce((o,s)=>o+(s.count??0),0));function bt(o){return a(n).find(s=>s.entityTypes.includes(o))}return{get name(){return a(t)},get nameLoaded(){return a(r)},get repos(){return a(e)},get apps(){return a(n)},get loading(){return a(i)},get error(){return a(f)},get totalEntities(){return a(vt)},get totalLinks(){return a(_)},get totalFiles(){return a(U)},get sortedRepos(){const o=[...a(e)].sort((s,u)=>s.name.localeCompare(u.name));return D(o)},get filteredIds(){const o=a(l).trim().toLowerCase();if(!o)return null;const s=new Set;for(const u of a(e))for(const c of u.entities)(c.title.toLowerCase().includes(o)||c.id.toLowerCase().includes(o))&&s.add(c.id);return s},get filterQuery(){return a(l)},setFilterQuery:pt,get sortMode(){return a(k)},set sortMode(o){p(k,o,!0)},get recentEntities(){const o=a(l).trim().toLowerCase();let s=[];for(const u of a(e))for(const c of u.entities)o&&!c.title.toLowerCase().includes(o)&&!c.id.toLowerCase().includes(o)||s.push(c);return s.sort((u,c)=>{const w=u.updatedAt??"";return(c.updatedAt??"").localeCompare(w)})},get sidebarScrollTop(){return a(A)},set sidebarScrollTop(o){p(A,o,!0)},get lastAutoExpandedFor(){return a(C)},set lastAutoExpandedFor(o){p(C,o,!0)},load:I,loadEntities:m,refreshEntities:M,refreshAll:S,toggleRepo:B,isExpanded:h,toggleEntity:L,isEntityExpanded:P,getEntityContents:R,toggleFolder:gt,isFolderExpanded:ht,isFolderCollapsed:yt,getAppForEntityType:bt,async renameCollectionTo(o,s){await fe(o,s);const u=a(e).find(c=>c.name===o);u&&(u.name=s,a(d)[o]&&(a(d)[s]=!0,delete a(d)[o]))},async removeCollection(o){await ce(o),p(e,a(e).filter(s=>s.name!==o),!0),delete a(d)[o]},async addCollection(o,s,u){await le(o,s,u);const c=await rt();p(e,c.map(w=>a(e).find($=>$.name===w.name)??{name:w.name,type:w.type,private:w.private,count:null,entities:[],loading:!1,loaded:!1}),!0),a(d)[o]=!0,await m(o)}}}const Pe=ye();function ve(){return T("/api/status")}function nt(t){return T("/api/commit",{method:"POST",body:JSON.stringify({message:t})})}function ot(){return T("/api/push",{method:"POST",body:"{}"})}function be(){return T("/api/pull",{method:"POST",body:"{}"})}function Ce(){return T("/api/revert",{method:"POST",body:"{}"})}function we(){return T("/api/sync-status")}function me(){let t=E(j([])),r=E(!1),e=E(!1),n=E(!1),i=E(!1),f=E(!1),d=E(0),y=E(0),v=E(0);const b=ut(()=>a(t).reduce((S,m)=>S+m.changes.length,0));async function A(){p(r,!0);try{p(t,await ve(),!0)}catch(S){console.error("Failed to fetch git status:",S)}finally{p(r,!1),O()}}async function C(){try{const S=await we();p(y,S.ahead,!0),p(v,S.behind,!0)}catch(S){console.error("Failed to fetch sync status:",S)}}async function l(){await Promise.all([A(),C()])}function O(){typeof window<"u"&&window.dispatchEvent(new CustomEvent("studiograph:git-refresh"))}async function _(S){p(e,!0);try{await nt(S),await l()}finally{p(e,!1)}}async function U(){p(n,!0);try{await ot(),await C()}finally{p(n,!1)}}async function k(S){p(e,!0);try{await nt(S)}finally{p(e,!1)}p(n,!0);try{await ot()}finally{p(n,!1)}await l()}async function I(){p(i,!0);try{await be(),await l()}finally{p(i,!1)}}async function M(){p(f,!0);try{const S=await Ce();return Nt(d),await l(),S}finally{p(f,!1)}}return{get repoStatuses(){return a(t)},get totalChanges(){return a(b)},get loading(){return a(r)},get committing(){return a(e)},get pushing(){return a(n)},get pulling(){return a(i)},get reverting(){return a(f)},get revertCount(){return a(d)},get ahead(){return a(y)},get behind(){return a(v)},refresh:A,refreshSyncStatus:C,refreshAll:l,commit:_,push:U,commitAndPush:k,pull:I,revert:M}}const Fe=me();export{H as a,Xt as b,Kt as c,Re as d,_e as e,$e as f,Fe as g,Ie as h,Zt as i,T as j,Oe as k,Le as l,Dt as m,ke as n,ne as r,Te as s,Ue as u,Pe as w};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as F,h as O,a as H,E as M,r as j,H as C,a5 as U,s as m,c as q,d as A,e as z,au as G,_ as $,B as L,a2 as Q,av as R,a3 as T,a0 as W,W as D,ad as g,aw as N,F as S,ax as _,ay as Y,az as x,aA as Z,Q as J,T as V,aB as X,aC as k,aD as ee,aE as re,aF as ne,aG as se,aH as ie,I as ae,aI as ue}from"./DEJSHbC3.js";import{B as te}from"./Bopa-Ask.js";function ve(e,r,s=!1){var n;O&&(n=z,H());var i=new te(e),a=s?M:0;function v(t,l){if(O){var o=j(n),f;if(o===C?f=0:o===U?f=!1:f=parseInt(o.substring(1)),t!==f){var h=m();q(h),i.anchor=h,A(!1),i.ensure(t,l),A(!0);return}}i.ensure(t,l)}F(()=>{var t=!1;r((l,o=0)=>{t=!0,v(o,l)}),t||v(!1,null)},a)}function B(e,r){return e===r||e?.[R]===r}function he(e={},r,s,n){return G(()=>{var i,a;return $(()=>{i=a,a=n?.()||[],L(()=>{e!==s(...a)&&(r(e,...a),i&&B(s(...i),e)&&r(null,...i))})}),()=>{Q(()=>{a&&B(s(...a),e)&&r(null,...a)})}}),e}let P=!1;function fe(e){var r=P;try{return P=!1,[e(),P]}finally{P=r}}const le={get(e,r){if(!e.exclude.includes(r))return e.props[r]},set(e,r){return!1},getOwnPropertyDescriptor(e,r){if(!e.exclude.includes(r)&&r in e.props)return{enumerable:!0,configurable:!0,value:e.props[r]}},has(e,r){return e.exclude.includes(r)?!1:r in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(r=>!e.exclude.includes(r))}};function be(e,r,s){return new Proxy({props:e,exclude:r},le)}const oe={get(e,r){if(!e.exclude.includes(r))return S(e.version),r in e.special?e.special[r]():e.props[r]},set(e,r,s){if(!(r in e.special)){var n=T;try{g(e.parent_effect),e.special[r]=pe({get[r](){return e.props[r]}},r,N)}finally{g(n)}}return e.special[r](s),D(e.version),!0},getOwnPropertyDescriptor(e,r){if(!e.exclude.includes(r)&&r in e.props)return{enumerable:!0,configurable:!0,value:e.props[r]}},deleteProperty(e,r){return e.exclude.includes(r)||(e.exclude.push(r),D(e.version)),!0},has(e,r){return e.exclude.includes(r)?!1:r in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(r=>!e.exclude.includes(r))}};function Pe(e,r){return new Proxy({props:e,exclude:r,special:{},version:W(0),parent_effect:T},oe)}const ce={get(e,r){let s=e.props.length;for(;s--;){let n=e.props[s];if(_(n)&&(n=n()),typeof n=="object"&&n!==null&&r in n)return n[r]}},set(e,r,s){let n=e.props.length;for(;n--;){let i=e.props[n];_(i)&&(i=i());const a=x(i,r);if(a&&a.set)return a.set(s),!0}return!1},getOwnPropertyDescriptor(e,r){let s=e.props.length;for(;s--;){let n=e.props[s];if(_(n)&&(n=n()),typeof n=="object"&&n!==null&&r in n){const i=x(n,r);return i&&!i.configurable&&(i.configurable=!0),i}}},has(e,r){if(r===R||r===Y)return!1;for(let s of e.props)if(_(s)&&(s=s()),s!=null&&r in s)return!0;return!1},ownKeys(e){const r=[];for(let s of e.props)if(_(s)&&(s=s()),!!s){for(const n in s)r.includes(n)||r.push(n);for(const n of Object.getOwnPropertySymbols(s))r.includes(n)||r.push(n)}return r}};function Se(...e){return new Proxy({props:e},ce)}function pe(e,r,s,n){var i=!ne||(s&se)!==0,a=(s&re)!==0,v=(s&ee)!==0,t=n,l=!0,o=()=>(l&&(l=!1,t=v?L(n):n),t),f;if(a){var h=R in e||Y in e;f=x(e,r)?.set??(h&&r in e?u=>e[r]=u:void 0)}var p,E=!1;a?[p,E]=fe(()=>e[r]):p=e[r],p===void 0&&n!==void 0&&(p=o(),f&&(i&&Z(),f(p)));var c;if(i?c=()=>{var u=e[r];return u===void 0?o():(l=!0,u)}:c=()=>{var u=e[r];return u!==void 0&&(t=void 0),u===void 0?t:u},i&&(s&N)===0)return c;if(f){var y=e.$$legacy;return(function(u,b){return arguments.length>0?((!i||!b||y||E)&&f(b?c():u),u):c()})}var w=!1,d=((s&ie)!==0?ae:ue)(()=>(w=!1,c()));a&&S(d);var K=T;return(function(u,b){if(arguments.length>0){const I=b?S(d):i&&a?J(u):u;return V(d,I),w=!0,t!==void 0&&(t=I),u}return X&&w||(K.f&k)!==0?d.v:S(d)})}export{he as b,ve as i,Pe as l,pe as p,be as r,Se as s};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Z as K,F as W,_ as Q,a0 as z,B as X,a1 as M,a2 as R,e as u,h as p,a3 as y,a4 as C,b as ee,a as te,a5 as se,a6 as H,j as c,i as J,a7 as F,p as O,m as re,a8 as B,a9 as ie,aa as L,ab as ne,ac as ae,ad as j,ae as q,af as $,ag as he,ah as fe,y as U,ai as oe,g as S,c as w,v as de,s as _e,aj as b,E as le,L as ce,ak as ue,al as pe,am as Y,O as ge,M as Z,H as ve,N as ye,an as k,d as E,ao as me,ap as be,aq as Ee,ar as Te,n as Re,as as we,at as De,q as Ne}from"./DEJSHbC3.js";import{b as Ae,r as P,h as V,i as Fe,c as Oe}from"./bSAC733J.js";function Se(i){let e=0,t=z(0),r;return()=>{K()&&(W(t),Q(()=>(e===0&&(r=X(()=>i(()=>M(t)))),e+=1,()=>{R(()=>{e-=1,e===0&&(r?.(),r=void 0,M(t))})})))}}var Ye=le|ce;function ke(i,e,t,r){new xe(i,e,t,r)}class xe{parent;is_pending=!1;transform_error;#t;#g=p?u:null;#i;#o;#e;#n=null;#s=null;#r=null;#a=null;#d=0;#f=0;#_=!1;#l=new Set;#c=new Set;#h=null;#m=Se(()=>(this.#h=z(this.#d),()=>{this.#h=null}));constructor(e,t,r,f){this.#t=e,this.#i=t,this.#o=s=>{var n=y;n.b=this,n.f|=C,r(s)},this.parent=y.b,this.transform_error=f??this.parent?.transform_error??(s=>s),this.#e=ee(()=>{if(p){const s=this.#g;te();const n=s.data===se;if(s.data.startsWith(H)){const a=JSON.parse(s.data.slice(H.length));this.#E(a)}else n?this.#T():this.#b()}else this.#v()},Ye),p&&(this.#t=u)}#b(){try{this.#n=c(()=>this.#o(this.#t))}catch(e){this.error(e)}}#E(e){const t=this.#i.failed;t&&(this.#r=c(()=>{t(this.#t,()=>e,()=>()=>{})}))}#T(){const e=this.#i.pending;e&&(this.is_pending=!0,this.#s=c(()=>e(this.#t)),R(()=>{var t=this.#a=document.createDocumentFragment(),r=J();t.append(r),this.#n=this.#p(()=>(F.ensure(),c(()=>this.#o(r)))),this.#f===0&&(this.#t.before(t),this.#a=null,O(this.#s,()=>{this.#s=null}),this.#u())}))}#v(){try{if(this.is_pending=this.has_pending_snippet(),this.#f=0,this.#d=0,this.#n=c(()=>{this.#o(this.#t)}),this.#f>0){var e=this.#a=document.createDocumentFragment();re(this.#n,e);const t=this.#i.pending;this.#s=c(()=>t(this.#t))}else this.#u()}catch(t){this.error(t)}}#u(){this.is_pending=!1;for(const e of this.#l)B(e,ie),L(e);for(const e of this.#c)B(e,ne),L(e);this.#l.clear(),this.#c.clear()}defer_effect(e){ae(e,this.#l,this.#c)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#i.pending}#p(e){var t=y,r=fe,f=U;j(this.#e),q(this.#e),$(this.#e.ctx);try{return e()}catch(s){return he(s),null}finally{j(t),q(r),$(f)}}#y(e){if(!this.has_pending_snippet()){this.parent&&this.parent.#y(e);return}this.#f+=e,this.#f===0&&(this.#u(),this.#s&&O(this.#s,()=>{this.#s=null}),this.#a&&(this.#t.before(this.#a),this.#a=null))}update_pending_count(e){this.#y(e),this.#d+=e,!(!this.#h||this.#_)&&(this.#_=!0,R(()=>{this.#_=!1,this.#h&&oe(this.#h,this.#d)}))}get_effect_pending(){return this.#m(),W(this.#h)}error(e){var t=this.#i.onerror;let r=this.#i.failed;if(!t&&!r)throw e;this.#n&&(S(this.#n),this.#n=null),this.#s&&(S(this.#s),this.#s=null),this.#r&&(S(this.#r),this.#r=null),p&&(w(this.#g),de(),w(_e()));var f=!1,s=!1;const n=()=>{if(f){pe();return}f=!0,s&&ue(),this.#r!==null&&O(this.#r,()=>{this.#r=null}),this.#p(()=>{F.ensure(),this.#v()})},l=a=>{try{s=!0,t?.(a,n),s=!1}catch(h){b(h,this.#e&&this.#e.parent)}r&&(this.#r=this.#p(()=>{F.ensure();try{return c(()=>{var h=y;h.b=this,h.f|=C,r(this.#t,()=>a,()=>n)})}catch(h){return b(h,this.#e.parent),null}}))};R(()=>{var a;try{a=this.transform_error(e)}catch(h){b(h,this.#e&&this.#e.parent);return}a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(l,h=>b(h,this.#e&&this.#e.parent)):l(a)})}}function He(i,e){var t=e==null?"":typeof e=="object"?`${e}`:e;t!==(i.__t??=i.nodeValue)&&(i.__t=t,i.nodeValue=`${t}`)}function Ie(i,e){return G(i,e)}function Be(i,e){Y(),e.intro=e.intro??!1;const t=e.target,r=p,f=u;try{for(var s=ge(t);s&&(s.nodeType!==Z||s.data!==ve);)s=ye(s);if(!s)throw k;E(!0),w(s);const n=G(i,{...e,anchor:s});return E(!1),n}catch(n){if(n instanceof Error&&n.message.split(`
|
|
2
|
+
`).some(l=>l.startsWith("https://svelte.dev/e/")))throw n;return n!==k&&console.warn("Failed to hydrate: ",n),e.recover===!1&&me(),Y(),be(t),E(!1),Ie(i,e)}finally{E(r),w(f)}}const T=new Map;function G(i,{target:e,anchor:t,props:r={},events:f,context:s,intro:n=!0,transformError:l}){Y();var a=void 0,h=Ee(()=>{var m=t??e.appendChild(J());ke(m,{pending:()=>{}},o=>{Re({});var d=U;if(s&&(d.c=s),f&&(r.$$events=f),p&&Oe(o,null),a=i(o,r)||{},p&&(y.nodes.end=u,u===null||u.nodeType!==Z||u.data!==we))throw De(),k;Ne()},l);var D=new Set,N=o=>{for(var d=0;d<o.length;d++){var _=o[d];if(!D.has(_)){D.add(_);var v=Fe(_);for(const A of[e,document]){var g=T.get(A);g===void 0&&(g=new Map,T.set(A,g));var I=g.get(_);I===void 0?(A.addEventListener(_,V,{passive:v}),g.set(_,1)):g.set(_,I+1)}}}};return N(Te(Ae)),P.add(N),()=>{for(var o of D)for(const v of[e,document]){var d=T.get(v),_=d.get(o);--_==0?(v.removeEventListener(o,V),d.delete(o),d.size===0&&T.delete(v)):d.set(o,_)}P.delete(N),m!==t&&m.parentNode?.removeChild(m)}});return x.set(a,h),a}let x=new WeakMap;function Le(i,e){const t=x.get(i);return t?(x.delete(i),t(e)):Promise.resolve()}export{Se as c,Be as h,Ie as m,He as s,Le as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{aN as x,a2 as A,aO as P,aK as C,ae as b,ad as y,ah as I,a3 as g,aP as R,i as m,O as p,aQ as V,aR as D,aS as W,h as d,e as i,aT as $,a as M,M as B,aU as H,c as U,aV as j}from"./DEJSHbC3.js";function re(e){return e.endsWith("capture")&&e!=="gotpointercapture"&&e!=="lostpointercapture"}const q=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function ae(e){return q.includes(e)}const F={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function ne(e){return e=e.toLowerCase(),F[e]??e}const G=["touchstart","touchmove"];function oe(e){return G.includes(e)}const X=["textarea","script","style","title"];function se(e){return X.includes(e)}const f=Symbol("events"),z=new Set,K=new Set;function L(e,t,r,o={}){function n(a){if(o.capture||Q.call(t,a),!a.cancelBubble)return P(()=>r?.call(this,a))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?A(()=>{t.addEventListener(e,n,o)}):t.addEventListener(e,n,o),n}function ie(e,t,r,o={}){var n=L(t,e,r,o);return()=>{e.removeEventListener(t,n,o)}}function ue(e,t,r,o,n){var a={capture:o,passive:n},s=L(e,t,r,a);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&x(()=>{t.removeEventListener(e,s,a)})}function le(e,t,r){(t[f]??={})[e]=r}function ce(e){for(var t=0;t<e.length;t++)z.add(e[t]);for(var r of K)r(e)}let N=null;function Q(e){var t=this,r=t.ownerDocument,o=e.type,n=e.composedPath?.()||[],a=n[0]||e.target;N=e;var s=0,c=N===e&&e[f];if(c){var u=n.indexOf(c);if(u!==-1&&(t===document||t===window)){e[f]=t;return}var w=n.indexOf(t);if(w===-1)return;u<=w&&(s=u)}if(a=n[s]||e.target,a!==t){C(e,"currentTarget",{configurable:!0,get(){return a||r}});var O=I,k=g;b(null),y(null);try{for(var _,E=[];a!==null;){var h=a.assignedSlot||a.parentNode||a.host||null;try{var T=a[f]?.[o];T!=null&&(!a.disabled||e.target===a)&&T.call(a,e)}catch(v){_?E.push(v):_=v}if(e.cancelBubble||h===t||h===null)break;a=h}if(_){for(let v of E)queueMicrotask(()=>{throw v});throw _}}finally{e[f]=t,delete e.currentTarget,b(O),y(k)}}}const J=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function Y(e){return J?.createHTML(e)??e}function S(e){var t=R("template");return t.innerHTML=Y(e.replaceAll("<!>","<!---->")),t.content}function l(e,t){var r=g;r.nodes===null&&(r.nodes={start:e,end:t,a:null,t:null})}function de(e,t){var r=(t&D)!==0,o=(t&W)!==0,n,a=!e.startsWith("<!>");return()=>{if(d)return l(i,null),i;n===void 0&&(n=S(a?e:"<!>"+e),r||(n=p(n)));var s=o||V?document.importNode(n,!0):n.cloneNode(!0);if(r){var c=p(s),u=s.lastChild;l(c,u)}else l(s,s);return s}}function Z(e,t,r="svg"){var o=!e.startsWith("<!>"),n=`<${r}>${o?e:"<!>"+e}</${r}>`,a;return()=>{if(d)return l(i,null),i;if(!a){var s=S(n),c=p(s);a=p(c)}var u=a.cloneNode(!0);return l(u,u),u}}function fe(e,t){return Z(e,t,"svg")}function _e(e=""){if(!d){var t=m(e+"");return l(t,t),t}var r=i;return r.nodeType!==H?(r.before(r=m()),U(r)):j(r),l(r,r),r}function ve(){if(d)return l(i,null),i;var e=document.createDocumentFragment(),t=document.createComment(""),r=m();return e.append(t,r),l(t,r),e}function pe(e,t){if(d){var r=g;((r.f&$)===0||r.nodes.end===null)&&(r.nodes.end=i),M();return}e!==null&&e.before(t)}function he(){if(d&&i&&i.nodeType===B&&i.textContent?.startsWith("$")){const e=i.textContent.substring(1);return M(),e}return(window.__svelte??={}).uid??=1,`c${window.__svelte.uid++}`}const ee="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(ee);export{pe as a,z as b,l as c,ve as d,ue as e,de as f,ce as g,Q as h,oe as i,le as j,re as k,L as l,ae as m,ne as n,se as o,fe as p,ie as q,K as r,he as s,_e as t};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.DfbCOBhn.js","../chunks/PPVm8Dsz.js","../chunks/bSAC733J.js","../chunks/DEJSHbC3.js","../chunks/Dml-u95b.js","../chunks/Bopa-Ask.js","../assets/0.CDbX4Cwz.css","../nodes/1.vtxUGpe6.js","../chunks/COwytaCP.js","../chunks/MbiSz-iW.js","../chunks/479TgXB4.js","../nodes/2.Cq29oW4h.js","../chunks/DvKVaE7M.js","../chunks/DNywhIex.js","../assets/AppShell.D0rmbdqF.css","../chunks/BFb0g4TQ.js","../assets/ChatPanel.RFD5GGYI.css","../assets/2.DRHi7ABa.css","../nodes/3.SquslPZy.js","../chunks/DThXpa0U.js","../chunks/DTUXhwEY.js","../assets/editor.CPAf2SRV.css","../assets/3.BJy7pVXi.css","../nodes/4.COV8FR8b.js","../chunks/CqkleIqs.js","../assets/4.Ad16uh9o.css","../nodes/5.BBpmYkAu.js","../assets/5.BhKgiXd2.css","../nodes/6.BBbh6z9I.js","../assets/6.Bm2i7O0j.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as l}from"../chunks/PPVm8Dsz.js";import{T as E,ay as F,F as m,aJ as G,aK as J,aL as K,n as B,z as H,A as N,S as Q,aM as U,V as y,u as W,q as X,P as b,t as Z,w as $,x as tt,Y as p}from"../chunks/DEJSHbC3.js";import{h as et,m as rt,u as at,s as st}from"../chunks/MbiSz-iW.js";import{a as h,d as P,f as w,t as ot}from"../chunks/bSAC733J.js";import{p as O,i as R,b as x}from"../chunks/DvKVaE7M.js";import{c as A}from"../chunks/DTUXhwEY.js";function nt(s){return class extends it{constructor(t){super({component:s,...t})}}}class it{#e;#t;constructor(t){var a=new Map,n=(e,r)=>{var c=K(r,!1,!1);return a.set(e,c),c};const i=new Proxy({...t.props||{},$$events:{}},{get(e,r){return m(a.get(r)??n(r,Reflect.get(e,r)))},has(e,r){return r===F?!0:(m(a.get(r)??n(r,Reflect.get(e,r))),Reflect.has(e,r))},set(e,r,c){return E(a.get(r)??n(r,c),c),Reflect.set(e,r,c)}});this.#t=(t.hydrate?et:rt)(t.component,{target:t.target,anchor:t.anchor,props:i,context:t.context,intro:t.intro??!1,recover:t.recover,transformError:t.transformError}),(!t?.props?.$$host||t.sync===!1)&&G(),this.#e=i.$$events;for(const e of Object.keys(this.#t))e==="$set"||e==="$destroy"||e==="$on"||J(this,e,{get(){return this.#t[e]},set(r){this.#t[e]=r},enumerable:!0});this.#t.$set=e=>{Object.assign(i,e)},this.#t.$destroy=()=>{at(this.#t)}}$set(t){this.#t.$set(t)}$on(t,a){this.#e[t]=this.#e[t]||[];const n=(...i)=>a.call(this,...i);return this.#e[t].push(n),()=>{this.#e[t]=this.#e[t].filter(i=>i!==n)}}$destroy(){this.#t.$destroy()}}const Et={};var ct=w('<div id="svelte-announcer" aria-live="assertive" aria-atomic="true" style="position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"><!></div>'),mt=w("<!> <!>",1);function ut(s,t){B(t,!0);let a=O(t,"components",23,()=>[]),n=O(t,"data_0",3,null),i=O(t,"data_1",3,null);H(()=>t.stores.page.set(t.page)),N(()=>{t.stores,t.page,t.constructors,a(),t.form,n(),i(),t.stores.page.notify()});let e=b(!1),r=b(!1),c=b(null);Q(()=>{const o=t.stores.page.subscribe(()=>{m(e)&&(E(r,!0),U().then(()=>{E(c,document.title||"untitled page",!0)}))});return E(e,!0),o});const I=p(()=>t.constructors[1]);var L=mt(),T=y(L);{var j=o=>{const u=p(()=>t.constructors[0]);var d=P(),v=y(d);A(v,()=>m(u),(_,f)=>{x(f(_,{get data(){return n()},get form(){return t.form},get params(){return t.page.params},children:(g,_t)=>{var V=P(),M=y(V);A(M,()=>m(I),(Y,q)=>{x(q(Y,{get data(){return i()},get form(){return t.form},get params(){return t.page.params}}),z=>a()[1]=z,()=>a()?.[1])}),h(g,V)},$$slots:{default:!0}}),g=>a()[0]=g,()=>a()?.[0])}),h(o,d)},k=o=>{const u=p(()=>t.constructors[0]);var d=P(),v=y(d);A(v,()=>m(u),(_,f)=>{x(f(_,{get data(){return n()},get form(){return t.form},get params(){return t.page.params}}),g=>a()[0]=g,()=>a()?.[0])}),h(o,d)};R(T,o=>{t.constructors[1]?o(j):o(k,!1)})}var C=W(T,2);{var S=o=>{var u=ct(),d=Z(u);{var v=_=>{var f=ot();tt(()=>st(f,m(c))),h(_,f)};R(d,_=>{m(r)&&_(v)})}$(u),h(o,u)};R(C,o=>{m(e)&&o(S)})}h(s,L),X()}const bt=nt(ut),pt=[()=>l(()=>import("../nodes/0.DfbCOBhn.js"),__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url),()=>l(()=>import("../nodes/1.vtxUGpe6.js"),__vite__mapDeps([7,2,3,8,9,10]),import.meta.url),()=>l(()=>import("../nodes/2.Cq29oW4h.js"),__vite__mapDeps([11,2,3,8,9,12,5,13,4,10,14,15,16,17]),import.meta.url),()=>l(()=>import("../nodes/3.SquslPZy.js"),__vite__mapDeps([18,4,3,5,2,9,12,13,10,8,14,15,16,19,20,1,21,22]),import.meta.url),()=>l(()=>import("../nodes/4.COV8FR8b.js"),__vite__mapDeps([23,4,3,5,2,9,12,13,10,8,14,15,16,19,20,1,21,24,25]),import.meta.url),()=>l(()=>import("../nodes/5.BBpmYkAu.js"),__vite__mapDeps([26,4,3,5,2,9,12,13,10,8,14,27]),import.meta.url),()=>l(()=>import("../nodes/6.BBbh6z9I.js"),__vite__mapDeps([28,2,3,12,5,13,4,10,9,8,14,15,16,1,29]),import.meta.url)],Pt=[],Ot={"/":[2],"/graph":[6],"/[repo]/[type]/[id]":[3],"/[repo]/[type]/[id]/edit":[5],"/[repo]/[type]/[id]/[...path]":[4]},D={handleError:(({error:s})=>{console.error(s)}),reroute:(()=>{}),transport:{}},dt=Object.fromEntries(Object.entries(D.transport).map(([s,t])=>[s,t.decode])),Rt=Object.fromEntries(Object.entries(D.transport).map(([s,t])=>[s,t.encode])),xt=!1,At=(s,t)=>dt[s](t);export{At as decode,dt as decoders,Ot as dictionary,Rt as encoders,xt as hash,D as hooks,Et as matchers,pt as nodes,bt as root,Pt as server_loads};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{l as o,a as r}from"../chunks/479TgXB4.js";export{o as load_css,r as start};
|
|
@@ -0,0 +1,2 @@
|
|
|
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{_ as v}from"../chunks/PPVm8Dsz.js";import{a as E,f as S}from"../chunks/bSAC733J.js";import{i as O,b as w,K as x,L as C,h as m,M as I,N as u,d as g,c as h,e as T,O as b,n as k,P as f,Q as A,R as p,A as F,F as a,S as D,x as M,q as P,T as n,U as R,t as L,w as N,$ as V}from"../chunks/DEJSHbC3.js";import{s as q,w as _,g as $,a as H}from"../chunks/Dml-u95b.js";function K(i,o){let r=null,t=m;var d;if(m){r=T;for(var e=b(document.head);e!==null&&(e.nodeType!==I||e.data!==i);)e=u(e);if(e===null)g(!1);else{var s=u(e);e.remove(),h(s)}}m||(d=document.head.appendChild(O()));try{w(()=>o(d),x|C)}finally{t&&(g(!0),h(r))}}var Q=S('<div style="display: contents;"><!></div>');function J(i,o){k(o,!0);const r=typeof localStorage<"u"?localStorage.getItem("theme"):null;let t=f(A(r==="light"?"light":"dark"));p("theme",{get current(){return a(t)},toggle(){n(t,a(t)==="dark"?"light":"dark",!0),localStorage.setItem("theme",a(t))}});const e=typeof localStorage<"u"?localStorage.getItem("chatOpen"):null;let s=f(e==="true");p("chat",{get open(){return a(s)},toggle(){n(s,!a(s)),localStorage.setItem("chatOpen",String(a(s)))},close(){n(s,!1),localStorage.setItem("chatOpen","false")}}),F(()=>{document.documentElement.setAttribute("data-theme",a(t))}),D(()=>{_.load(),$.refreshAll(),v(()=>import("../chunks/BB_5th5W.js"),__vite__mapDeps([0,1,2]),import.meta.url).catch(()=>{}),window.addEventListener("sg-theme-change",c=>{n(t,c.detail,!0)})});var l=Q();K("12qhfyh",c=>{R(()=>{V.title=(_.name||"Studiograph")??""})});var y=L(l);q(y,()=>o.children),N(l),M(()=>H(l,"data-theme",a(t))),E(i,l),P()}export{J as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as u,f as h}from"../chunks/bSAC733J.js";import{i as g}from"../chunks/COwytaCP.js";import{n as l,V as v,x as d,q as x,t as a,w as e,u as _}from"../chunks/DEJSHbC3.js";import{s as o}from"../chunks/MbiSz-iW.js";import{s as $,p}from"../chunks/479TgXB4.js";const k={get error(){return p.error},get status(){return p.status}};$.updated.check;const m=k;var b=h("<h1> </h1> <p> </p>",1);function y(i,f){l(f,!1),g();var t=b(),r=v(t),n=a(r,!0);e(r);var s=_(r,2),c=a(s,!0);e(s),d(()=>{o(n,m.status),o(c,m.error?.message)}),u(i,t),x()}export{y as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as v,f as d}from"../chunks/bSAC733J.js";import{i as b}from"../chunks/COwytaCP.js";import{n as y,o as C,q as S,t,u as l,v as V,w as e,x as k}from"../chunks/DEJSHbC3.js";import{s as A}from"../chunks/MbiSz-iW.js";import{i as m}from"../chunks/DvKVaE7M.js";import{n as P,A as q}from"../chunks/DNywhIex.js";import{V as E,C as L}from"../chunks/BFb0g4TQ.js";import{w as p}from"../chunks/Dml-u95b.js";var T=d('<h2 class="svelte-1uha8ag"> </h2>'),W=d('<div class="content-row svelte-1uha8ag"><div class="entity-area svelte-1uha8ag"><!> <div class="welcome svelte-1uha8ag"><!> <p class="svelte-1uha8ag">Select an entity from the sidebar to get started.</p></div></div> <!></div>');function K(c,f){y(f,!1);const h=C("chat");P.showEntity(),b(),q(c,{children:(g,j)=>{var o=W(),s=t(o),i=t(s);E(i,{activeView:"entity"});var n=l(i,2),u=t(n);{var _=a=>{var r=T(),$=t(r);e(r),k(()=>A($,`Welcome to ${(p.name||"Studiograph")??""}`)),v(a,r)};m(u,a=>{p.nameLoaded&&a(_)})}V(2),e(n),e(s);var w=l(s,2);{var x=a=>{L(a,{})};m(w,a=>{h.open&&a(x)})}e(o),v(g,o)},$$slots:{default:!0}}),S()}export{K as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{f as lt,g as vt,w as z,c as ut,b as ft,a as yt}from"../chunks/Dml-u95b.js";import{e as mt,a as y,f as _}from"../chunks/bSAC733J.js";import{n as _t,o as ht,P as m,Q as gt,A as Q,F as a,T as c,W as pt,q as bt,X as xt,t as v,u,Y as E,V as Ct,w as l,x as K}from"../chunks/DEJSHbC3.js";import{s as M}from"../chunks/MbiSz-iW.js";import{i as w}from"../chunks/DvKVaE7M.js";import{n as I,A as kt,e as wt,i as St}from"../chunks/DNywhIex.js";import{g as X}from"../chunks/479TgXB4.js";import{c as At,V as Pt,C as Tt}from"../chunks/BFb0g4TQ.js";import{e as o,I as Et,C as Kt,t as Mt}from"../chunks/DThXpa0U.js";const It=async({params:S,fetch:t})=>{const{repo:C,type:h,id:g}=S,p=await lt(C,h,g);return{repo:C,type:h,id:g,entity:p}},Gt=Object.freeze(Object.defineProperty({__proto__:null,load:It},Symbol.toStringTag,{value:"Module"}));var Ot=_('<span class="bc-sep svelte-1dc9loe">/</span>'),Vt=_("<!><span> </span>",1),Ft=_('<span class="status-text saving svelte-1dc9loe">Saving...</span>'),Rt=_('<span class="status-text error svelte-1dc9loe"> </span>'),jt=_('<a class="action-btn open-app svelte-1dc9loe"> </a>'),Dt=_('<div class="content-row svelte-1dc9loe"><div class="entity-area svelte-1dc9loe"><!> <div class="editor-bar svelte-1dc9loe"><div class="breadcrumb-path svelte-1dc9loe"></div> <div class="editor-actions svelte-1dc9loe"><!> <!></div></div> <div class="document-scroll svelte-1dc9loe"><!> <!></div></div> <!></div>');function Jt(S,t){_t(t,!0);const C=ht("chat"),h=E(()=>z.getAppForEntityType(t.data.entity.document?.frontmatter?.entity_type??t.data.type)),g=E(()=>()=>{const e=t.data.entity.path;if(e){const r=e.lastIndexOf(`/${t.data.repo}/`);if(r>=0)return e.substring(r+1).split("/")}return[t.data.repo,t.data.id,"main.md"]});let p=m(""),d=m(gt({})),O=m(0);const Y=E(()=>Mt(a(d)));let k=m(""),V=m(0),F=m(0);Q(()=>{const e=`${t.data.repo}/${t.data.type}/${t.data.id}`,r=vt.revertCount,i=At.mutationCount;(e!==a(k)||r!==a(V)||i!==a(F))&&(a(k)&&e!==a(k)&&o.flush(),c(k,e),c(V,r,!0),c(F,i,!0),c(p,(t.data.entity.document?.content??"").trim(),!0),c(d,{...t.data.entity.document?.frontmatter??t.data.entity.data??{}},!0),pt(O),o.reset())}),Q(()=>{I.select(t.data.repo,t.data.type,t.data.id),I.showEntity()});function B(e){c(p,e,!0),o.scheduleAutoSave(t.data.repo,t.data.type,t.data.id,{content:e})}function G(e,r){c(d,{...a(d),[e]:r},!0),o.scheduleAutoSave(t.data.repo,t.data.type,t.data.id,{data:a(d)})}function J(e){const{[e]:r,...i}=a(d);c(d,i,!0),o.scheduleAutoSave(t.data.repo,t.data.type,t.data.id,{data:a(d)})}function N(e,r){c(d,{...a(d),[e]:r},!0),o.scheduleAutoSave(t.data.repo,t.data.type,t.data.id,{data:a(d)})}function U(e,r){o.scheduleAutoSave(t.data.repo,t.data.type,t.data.id,{data:a(d)})}function Z(e){for(const r of z.repos){const i=r.entities.find(b=>b.id===e);if(i){X(`/${r.name}/${i.entityType}/${i.id}`);return}}}function $(e){(e.metaKey||e.ctrlKey)&&e.key==="s"&&(e.preventDefault(),o.flush()),e.key==="Escape"&&!(e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement)&&(o.flush(),I.deselect(),X("/"))}mt("keydown",xt,$),kt(S,{children:(e,r)=>{var i=Dt(),b=v(i),R=v(b);Pt(R,{activeView:"entity"});var A=u(R,2),P=v(A);wt(P,21,()=>a(g)(),St,(n,s,f)=>{var W=Vt(),q=Ct(W);{var it=x=>{var ct=Ot();y(x,ct)};w(q,x=>{f>0&&x(it)})}var T=u(q),st=v(T,!0);l(T),K(x=>{ft(T,1,x,"svelte-1dc9loe"),M(st,a(s))},[()=>ut(f===a(g)().length-1?"bc-current":"bc-segment")]),y(n,W)}),l(P);var j=u(P,2),D=v(j);{var tt=n=>{var s=Ft();y(n,s)},et=n=>{var s=Rt(),f=v(s,!0);l(s),K(()=>M(f,o.error)),y(n,s)};w(D,n=>{o.saving?n(tt):o.error&&n(et,1)})}var at=u(D,2);{var nt=n=>{var s=jt(),f=v(s);l(s),K(()=>{yt(s,"href",`/${t.data.repo??""}/${t.data.type??""}/${t.data.id??""}/edit`),M(f,`Open in ${a(h).name??""} →`)}),y(n,s)};w(at,n=>{a(h)&&n(nt)})}l(j),l(A);var H=u(A,2),L=v(H);Et(L,{get properties(){return a(Y)},editable:!0,onedit:G,onremove:J,onadd:N,ontypechange:U});var rt=u(L,2);Kt(rt,{get content(){return a(p)},readonly:!1,onchange:B,onsave:()=>o.flush(),onwikilinkclick:Z,get resetKey(){return a(O)}}),l(H),l(b);var ot=u(b,2);{var dt=n=>{Tt(n,{})};w(ot,n=>{C.open&&n(dt)})}l(i),y(e,i)},$$slots:{default:!0}}),bt()}export{Jt as component,Gt as universal};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import{d as Qt,r as jt,e as zt,b as Jt,c as Zt,w as Vt}from"../chunks/Dml-u95b.js";import{g as Yt,j as ht,a as nt,f as it,e as Xt}from"../chunks/bSAC733J.js";import{n as Nt,P as yt,Q as Dt,A as Ft,t as U,u as X,F as l,w as z,x as At,T as N,v as Gt,q as Bt,o as $t,W as te,Y as Rt,X as ee,V as re}from"../chunks/DEJSHbC3.js";import{s as Mt}from"../chunks/MbiSz-iW.js";import{i as Et,b as ne}from"../chunks/DvKVaE7M.js";import{e as St,X as qt,i as Ot,P as Kt,n as It,A as ie}from"../chunks/DNywhIex.js";import{g as se}from"../chunks/479TgXB4.js";import{V as ae,C as oe}from"../chunks/BFb0g4TQ.js";import{e as ft,I as le,C as ue,t as he}from"../chunks/DThXpa0U.js";import{g as fe}from"../chunks/CqkleIqs.js";const de=async({params:O})=>{const{repo:v,type:w,id:a,path:F}=O,W=await Qt(v,w,a,F);return{repo:v,type:w,id:a,filePath:F,fileName:F.split("/").pop()??F,content:W}},Ie=Object.freeze(Object.defineProperty({__proto__:null,load:de},Symbol.toStringTag,{value:"Module"}));var xt={exports:{}};var ce=xt.exports,Wt;function pe(){return Wt||(Wt=1,(function(O,v){((w,a)=>{O.exports=a()})(ce,function w(){var a=typeof self<"u"?self:typeof window<"u"?window:a!==void 0?a:{},F,W=!a.document&&!!a.postMessage,H=a.IS_PAPA_WORKER||!1,J={},dt=0,d={};function Z(t){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},(function(e){var r=lt(e);r.chunkSize=parseInt(r.chunkSize),e.step||e.chunk||(r.chunkSize=null),this._handle=new vt(r),(this._handle.streamer=this)._config=r}).call(this,t),this.parseChunk=function(e,r){var s=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0<s){let y=this._config.newline;y||(i=this._config.quoteChar||'"',y=this._handle.guessLineEndings(e,i)),e=[...e.split(y).slice(s)].join(y)}this.isFirstChunk&&m(this._config.beforeFirstChunk)&&(i=this._config.beforeFirstChunk(e))!==void 0&&(e=i),this.isFirstChunk=!1,this._halted=!1;var s=this._partialLine+e,i=(this._partialLine="",this._handle.parse(s,this._baseIndex,!this._finished));if(!this._handle.paused()&&!this._handle.aborted()){if(e=i.meta.cursor,s=(this._finished||(this._partialLine=s.substring(e-this._baseIndex),this._baseIndex=e),i&&i.data&&(this._rowCount+=i.data.length),this._finished||this._config.preview&&this._rowCount>=this._config.preview),H)a.postMessage({results:i,workerId:d.WORKER_ID,finished:s});else if(m(this._config.chunk)&&!r){if(this._config.chunk(i,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=i=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(i.data),this._completeResults.errors=this._completeResults.errors.concat(i.errors),this._completeResults.meta=i.meta),this._completed||!s||!m(this._config.complete)||i&&i.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),s||i&&i.meta.paused||this._nextChunk(),i}this._halted=!0},this._sendError=function(e){m(this._config.error)?this._config.error(e):H&&this._config.error&&a.postMessage({workerId:d.WORKER_ID,error:e,finished:!1})}}function $(t){var e;(t=t||{}).chunkSize||(t.chunkSize=d.RemoteChunkSize),Z.call(this,t),this._nextChunk=W?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(r){this._input=r,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(e=new XMLHttpRequest,this._config.withCredentials&&(e.withCredentials=this._config.withCredentials),W||(e.onload=b(this._chunkLoaded,this),e.onerror=b(this._chunkError,this)),e.open(this._config.downloadRequestBody?"POST":"GET",this._input,!W),this._config.downloadRequestHeaders){var r,s=this._config.downloadRequestHeaders;for(r in s)e.setRequestHeader(r,s[r])}var i;this._config.chunkSize&&(i=this._start+this._config.chunkSize-1,e.setRequestHeader("Range","bytes="+this._start+"-"+i));try{e.send(this._config.downloadRequestBody)}catch(y){this._chunkError(y.message)}W&&e.status===0&&this._chunkError()}},this._chunkLoaded=function(){e.readyState===4&&(e.status<200||400<=e.status?this._chunkError():(this._start+=this._config.chunkSize||e.responseText.length,this._finished=!this._config.chunkSize||this._start>=(r=>(r=r.getResponseHeader("Content-Range"))!==null?parseInt(r.substring(r.lastIndexOf("/")+1)):-1)(e),this.parseChunk(e.responseText)))},this._chunkError=function(r){r=e.statusText||r,this._sendError(new Error(r))}}function st(t){(t=t||{}).chunkSize||(t.chunkSize=d.LocalChunkSize),Z.call(this,t);var e,r,s=typeof FileReader<"u";this.stream=function(i){this._input=i,r=i.slice||i.webkitSlice||i.mozSlice,s?((e=new FileReader).onload=b(this._chunkLoaded,this),e.onerror=b(this._chunkError,this)):e=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var i=this._input,y=(this._config.chunkSize&&(y=Math.min(this._start+this._config.chunkSize,this._input.size),i=r.call(i,this._start,y)),e.readAsText(i,this._config.encoding));s||this._chunkLoaded({target:{result:y}})},this._chunkLoaded=function(i){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(i.target.result)},this._chunkError=function(){this._sendError(e.error)}}function at(t){var e;Z.call(this,t=t||{}),this.stream=function(r){return e=r,this._nextChunk()},this._nextChunk=function(){var r,s;if(!this._finished)return r=this._config.chunkSize,e=r?(s=e.substring(0,r),e.substring(r)):(s=e,""),this._finished=!e,this.parseChunk(s)}}function L(t){Z.call(this,t=t||{});var e=[],r=!0,s=!1;this.pause=function(){Z.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){Z.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(i){this._input=i,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){s&&e.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),e.length?this.parseChunk(e.shift()):r=!0},this._streamData=b(function(i){try{e.push(typeof i=="string"?i:i.toString(this._config.encoding)),r&&(r=!1,this._checkIsFinished(),this.parseChunk(e.shift()))}catch(y){this._streamError(y)}},this),this._streamError=b(function(i){this._streamCleanUp(),this._sendError(i)},this),this._streamEnd=b(function(){this._streamCleanUp(),s=!0,this._streamData("")},this),this._streamCleanUp=b(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function vt(t){var e,r,s,i,y=Math.pow(2,53),M=-y,u=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,h=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,n=this,R=0,f=0,q=!1,_=!1,c=[],o={data:[],errors:[],meta:{}};function D(k){return t.skipEmptyLines==="greedy"?k.join("").trim()==="":k.length===1&&k[0].length===0}function g(){if(o&&s&&(B("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+d.DefaultDelimiter+"'"),s=!1),t.skipEmptyLines&&(o.data=o.data.filter(function(p){return!D(p)})),A()){let p=function(j,K){m(t.transformHeader)&&(j=t.transformHeader(j,K)),c.push(j)};if(o)if(Array.isArray(o.data[0])){for(var k=0;A()&&k<o.data.length;k++)o.data[k].forEach(p);o.data.splice(0,1)}else o.data.forEach(p)}function C(p,j){for(var K=t.header?{}:[],x=0;x<p.length;x++){var T=x,S=p[x],S=((G,E)=>(I=>(t.dynamicTypingFunction&&t.dynamicTyping[I]===void 0&&(t.dynamicTyping[I]=t.dynamicTypingFunction(I)),(t.dynamicTyping[I]||t.dynamicTyping)===!0))(G)?E==="true"||E==="TRUE"||E!=="false"&&E!=="FALSE"&&((I=>{if(u.test(I)&&(I=parseFloat(I),M<I&&I<y))return 1})(E)?parseFloat(E):h.test(E)?new Date(E):E===""?null:E):E)(T=t.header?x>=c.length?"__parsed_extra":c[x]:T,S=t.transform?t.transform(S,T):S);T==="__parsed_extra"?(K[T]=K[T]||[],K[T].push(S)):K[T]=S}return t.header&&(x>c.length?B("FieldMismatch","TooManyFields","Too many fields: expected "+c.length+" fields but parsed "+x,f+j):x<c.length&&B("FieldMismatch","TooFewFields","Too few fields: expected "+c.length+" fields but parsed "+x,f+j)),K}var P;o&&(t.header||t.dynamicTyping||t.transform)&&(P=1,!o.data.length||Array.isArray(o.data[0])?(o.data=o.data.map(C),P=o.data.length):o.data=C(o.data,0),t.header&&o.meta&&(o.meta.fields=c),f+=P)}function A(){return t.header&&c.length===0}function B(k,C,P,p){k={type:k,code:C,message:P},p!==void 0&&(k.row=p),o.errors.push(k)}m(t.step)&&(i=t.step,t.step=function(k){o=k,A()?g():(g(),o.data.length!==0&&(R+=k.data.length,t.preview&&R>t.preview?r.abort():(o.data=o.data[0],i(o,n))))}),this.parse=function(k,C,P){var p=t.quoteChar||'"',p=(t.newline||(t.newline=this.guessLineEndings(k,p)),s=!1,t.delimiter?m(t.delimiter)&&(t.delimiter=t.delimiter(k),o.meta.delimiter=t.delimiter):((p=((j,K,x,T,S)=>{var G,E,I,gt;S=S||[","," ","|",";",d.RECORD_SEP,d.UNIT_SEP];for(var kt=0;kt<S.length;kt++){for(var tt,wt=S[kt],V=0,et=0,Q=0,Y=(I=void 0,new mt({comments:T,delimiter:wt,newline:K,preview:10}).parse(j)),ut=0;ut<Y.data.length;ut++)x&&D(Y.data[ut])?Q++:(tt=Y.data[ut].length,et+=tt,I===void 0?I=tt:0<tt&&(V+=Math.abs(tt-I),I=tt));0<Y.data.length&&(et/=Y.data.length-Q),(E===void 0||V<=E)&&(gt===void 0||gt<et)&&1.99<et&&(E=V,G=wt,gt=et)}return{successful:!!(t.delimiter=G),bestDelimiter:G}})(k,t.newline,t.skipEmptyLines,t.comments,t.delimitersToGuess)).successful?t.delimiter=p.bestDelimiter:(s=!0,t.delimiter=d.DefaultDelimiter),o.meta.delimiter=t.delimiter),lt(t));return t.preview&&t.header&&p.preview++,e=k,r=new mt(p),o=r.parse(e,C,P),g(),q?{meta:{paused:!0}}:o||{meta:{paused:!1}}},this.paused=function(){return q},this.pause=function(){q=!0,r.abort(),e=m(t.chunk)?"":e.substring(r.getCharIndex())},this.resume=function(){n.streamer._halted?(q=!1,n.streamer.parseChunk(e,!0)):setTimeout(n.resume,3)},this.aborted=function(){return _},this.abort=function(){_=!0,r.abort(),o.meta.aborted=!0,m(t.complete)&&t.complete(o),e=""},this.guessLineEndings=function(j,p){j=j.substring(0,1048576);var p=new RegExp(ot(p)+"([^]*?)"+ot(p),"gm"),P=(j=j.replace(p,"")).split("\r"),p=j.split(`
|
|
2
|
+
`),j=1<p.length&&p[0].length<P[0].length;if(P.length===1||j)return`
|
|
3
|
+
`;for(var K=0,x=0;x<P.length;x++)P[x][0]===`
|
|
4
|
+
`&&K++;return K>=P.length/2?`\r
|
|
5
|
+
`:"\r"}}function ot(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function mt(t){var e=(t=t||{}).delimiter,r=t.newline,s=t.comments,i=t.step,y=t.preview,M=t.fastMode,u=null,h=!1,n=t.quoteChar==null?'"':t.quoteChar,R=n;if(t.escapeChar!==void 0&&(R=t.escapeChar),(typeof e!="string"||-1<d.BAD_DELIMITERS.indexOf(e))&&(e=","),s===e)throw new Error("Comment character same as delimiter");s===!0?s="#":(typeof s!="string"||-1<d.BAD_DELIMITERS.indexOf(s))&&(s=!1),r!==`
|
|
6
|
+
`&&r!=="\r"&&r!==`\r
|
|
7
|
+
`&&(r=`
|
|
8
|
+
`);var f=0,q=!1;this.parse=function(_,c,o){if(typeof _!="string")throw new Error("Input must be a string");var D=_.length,g=e.length,A=r.length,B=s.length,k=m(i),C=[],P=[],p=[],j=f=0;if(!_)return V();if(M||M!==!1&&_.indexOf(n)===-1){for(var K=_.split(r),x=0;x<K.length;x++){if(p=K[x],f+=p.length,x!==K.length-1)f+=r.length;else if(o)return V();if(!s||p.substring(0,B)!==s){if(k){if(C=[],gt(p.split(e)),et(),q)return V()}else gt(p.split(e));if(y&&y<=x)return C=C.slice(0,y),V(!0)}}return V()}for(var T=_.indexOf(e,f),S=_.indexOf(r,f),G=new RegExp(ot(R)+ot(n),"g"),E=_.indexOf(n,f);;)if(_[f]===n)for(E=f,f++;;){if((E=_.indexOf(n,E+1))===-1)return o||P.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:C.length,index:f}),tt();if(E===D-1)return tt(_.substring(f,E).replace(G,n));if(n===R&&_[E+1]===R)E++;else if(n===R||E===0||_[E-1]!==R){T!==-1&&T<E+1&&(T=_.indexOf(e,E+1));var I=kt((S=S!==-1&&S<E+1?_.indexOf(r,E+1):S)===-1?T:Math.min(T,S));if(_.substr(E+1+I,g)===e){p.push(_.substring(f,E).replace(G,n)),_[f=E+1+I+g]!==n&&(E=_.indexOf(n,f)),T=_.indexOf(e,f),S=_.indexOf(r,f);break}if(I=kt(S),_.substring(E+1+I,E+1+I+A)===r){if(p.push(_.substring(f,E).replace(G,n)),wt(E+1+I+A),T=_.indexOf(e,f),E=_.indexOf(n,f),k&&(et(),q))return V();if(y&&C.length>=y)return V(!0);break}P.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:C.length,index:f}),E++}}else if(s&&p.length===0&&_.substring(f,f+B)===s){if(S===-1)return V();f=S+A,S=_.indexOf(r,f),T=_.indexOf(e,f)}else if(T!==-1&&(T<S||S===-1))p.push(_.substring(f,T)),f=T+g,T=_.indexOf(e,f);else{if(S===-1)break;if(p.push(_.substring(f,S)),wt(S+A),k&&(et(),q))return V();if(y&&C.length>=y)return V(!0)}return tt();function gt(Q){C.push(Q),j=f}function kt(Q){var Y=0;return Y=Q!==-1&&(Q=_.substring(E+1,Q))&&Q.trim()===""?Q.length:Y}function tt(Q){return o||(Q===void 0&&(Q=_.substring(f)),p.push(Q),f=D,gt(p),k&&et()),V()}function wt(Q){f=Q,gt(p),p=[],S=_.indexOf(r,f)}function V(Q){if(t.header&&!c&&C.length&&!h){var Y=C[0],ut=Object.create(null),Tt=new Set(Y);let Lt=!1;for(let bt=0;bt<Y.length;bt++){let rt=Y[bt];if(ut[rt=m(t.transformHeader)?t.transformHeader(rt,bt):rt]){let Ct,Pt=ut[rt];for(;Ct=rt+"_"+Pt,Pt++,Tt.has(Ct););Tt.add(Ct),Y[bt]=Ct,ut[rt]++,Lt=!0,(u=u===null?{}:u)[Ct]=rt}else ut[rt]=1,Y[bt]=rt;Tt.add(rt)}Lt&&console.warn("Duplicate headers found and renamed."),h=!0}return{data:C,errors:P,meta:{delimiter:e,linebreak:r,aborted:q,truncated:!!Q,cursor:j+(c||0),renamedHeaders:u}}}function et(){i(V()),C=[],P=[]}},this.abort=function(){q=!0},this.getCharIndex=function(){return f}}function ct(t){var e=t.data,r=J[e.workerId],s=!1;if(e.error)r.userError(e.error,e.file);else if(e.results&&e.results.data){var i={abort:function(){s=!0,pt(e.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:_t,resume:_t};if(m(r.userStep)){for(var y=0;y<e.results.data.length&&(r.userStep({data:e.results.data[y],errors:e.results.errors,meta:e.results.meta},i),!s);y++);delete e.results}else m(r.userChunk)&&(r.userChunk(e.results,i,e.file),delete e.results)}e.finished&&!s&&pt(e.workerId,e.results)}function pt(t,e){var r=J[t];m(r.userComplete)&&r.userComplete(e),r.terminate(),delete J[t]}function _t(){throw new Error("Not implemented.")}function lt(t){if(typeof t!="object"||t===null)return t;var e,r=Array.isArray(t)?[]:{};for(e in t)r[e]=lt(t[e]);return r}function b(t,e){return function(){t.apply(e,arguments)}}function m(t){return typeof t=="function"}return d.parse=function(t,e){var r=(e=e||{}).dynamicTyping||!1;if(m(r)&&(e.dynamicTypingFunction=r,r={}),e.dynamicTyping=r,e.transform=!!m(e.transform)&&e.transform,!e.worker||!d.WORKERS_SUPPORTED)return r=null,d.NODE_STREAM_INPUT,typeof t=="string"?(t=(s=>s.charCodeAt(0)!==65279?s:s.slice(1))(t),r=new(e.download?$:at)(e)):t.readable===!0&&m(t.read)&&m(t.on)?r=new L(e):(a.File&&t instanceof File||t instanceof Object)&&(r=new st(e)),r.stream(t);(r=(()=>{var s;return!!d.WORKERS_SUPPORTED&&(s=(()=>{var i=a.URL||a.webkitURL||null,y=w.toString();return d.BLOB_URL||(d.BLOB_URL=i.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",y,")();"],{type:"text/javascript"})))})(),(s=new a.Worker(s)).onmessage=ct,s.id=dt++,J[s.id]=s)})()).userStep=e.step,r.userChunk=e.chunk,r.userComplete=e.complete,r.userError=e.error,e.step=m(e.step),e.chunk=m(e.chunk),e.complete=m(e.complete),e.error=m(e.error),delete e.worker,r.postMessage({input:t,config:e,workerId:r.id})},d.unparse=function(t,e){var r=!1,s=!0,i=",",y=`\r
|
|
9
|
+
`,M='"',u=M+M,h=!1,n=null,R=!1,f=((()=>{if(typeof e=="object"){if(typeof e.delimiter!="string"||d.BAD_DELIMITERS.filter(function(c){return e.delimiter.indexOf(c)!==-1}).length||(i=e.delimiter),typeof e.quotes!="boolean"&&typeof e.quotes!="function"&&!Array.isArray(e.quotes)||(r=e.quotes),typeof e.skipEmptyLines!="boolean"&&typeof e.skipEmptyLines!="string"||(h=e.skipEmptyLines),typeof e.newline=="string"&&(y=e.newline),typeof e.quoteChar=="string"&&(M=e.quoteChar),typeof e.header=="boolean"&&(s=e.header),Array.isArray(e.columns)){if(e.columns.length===0)throw new Error("Option columns is empty");n=e.columns}e.escapeChar!==void 0&&(u=e.escapeChar+M),e.escapeFormulae instanceof RegExp?R=e.escapeFormulae:typeof e.escapeFormulae=="boolean"&&e.escapeFormulae&&(R=/^[=+\-@\t\r].*$/)}})(),new RegExp(ot(M),"g"));if(typeof t=="string"&&(t=JSON.parse(t)),Array.isArray(t)){if(!t.length||Array.isArray(t[0]))return q(null,t,h);if(typeof t[0]=="object")return q(n||Object.keys(t[0]),t,h)}else if(typeof t=="object")return typeof t.data=="string"&&(t.data=JSON.parse(t.data)),Array.isArray(t.data)&&(t.fields||(t.fields=t.meta&&t.meta.fields||n),t.fields||(t.fields=Array.isArray(t.data[0])?t.fields:typeof t.data[0]=="object"?Object.keys(t.data[0]):[]),Array.isArray(t.data[0])||typeof t.data[0]=="object"||(t.data=[t.data])),q(t.fields||[],t.data||[],h);throw new Error("Unable to serialize unrecognized input");function q(c,o,D){var g="",A=(typeof c=="string"&&(c=JSON.parse(c)),typeof o=="string"&&(o=JSON.parse(o)),Array.isArray(c)&&0<c.length),B=!Array.isArray(o[0]);if(A&&s){for(var k=0;k<c.length;k++)0<k&&(g+=i),g+=_(c[k],k);0<o.length&&(g+=y)}for(var C=0;C<o.length;C++){var P=(A?c:o[C]).length,p=!1,j=A?Object.keys(o[C]).length===0:o[C].length===0;if(D&&!A&&(p=D==="greedy"?o[C].join("").trim()==="":o[C].length===1&&o[C][0].length===0),D==="greedy"&&A){for(var K=[],x=0;x<P;x++){var T=B?c[x]:x;K.push(o[C][T])}p=K.join("").trim()===""}if(!p){for(var S=0;S<P;S++){0<S&&!j&&(g+=i);var G=A&&B?c[S]:S;g+=_(o[C][G],S)}C<o.length-1&&(!D||0<P&&!j)&&(g+=y)}}return g}function _(c,o){var D,g;return c==null?"":c.constructor===Date?JSON.stringify(c).slice(1,25):(g=!1,R&&typeof c=="string"&&R.test(c)&&(c="'"+c,g=!0),D=c.toString().replace(f,u),(g=g||r===!0||typeof r=="function"&&r(c,o)||Array.isArray(r)&&r[o]||((A,B)=>{for(var k=0;k<B.length;k++)if(-1<A.indexOf(B[k]))return!0;return!1})(D,d.BAD_DELIMITERS)||-1<D.indexOf(i)||D.charAt(0)===" "||D.charAt(D.length-1)===" ")?M+D+M:D)}},d.RECORD_SEP="",d.UNIT_SEP="",d.BYTE_ORDER_MARK="\uFEFF",d.BAD_DELIMITERS=["\r",`
|
|
10
|
+
`,'"',d.BYTE_ORDER_MARK],d.WORKERS_SUPPORTED=!W&&!!a.Worker,d.NODE_STREAM_INPUT=1,d.LocalChunkSize=10485760,d.RemoteChunkSize=5242880,d.DefaultDelimiter=",",d.Parser=mt,d.ParserHandle=vt,d.NetworkStreamer=$,d.FileStreamer=st,d.StringStreamer=at,d.ReadableStreamStreamer=L,a.jQuery&&((F=a.jQuery).fn.parse=function(t){var e=t.config||{},r=[];return this.each(function(y){if(!(F(this).prop("tagName").toUpperCase()==="INPUT"&&F(this).attr("type").toLowerCase()==="file"&&a.FileReader)||!this.files||this.files.length===0)return!0;for(var M=0;M<this.files.length;M++)r.push({file:this.files[M],inputElem:this,instanceConfig:F.extend({},e)})}),s(),this;function s(){if(r.length===0)m(t.complete)&&t.complete();else{var y,M,u,h,n=r[0];if(m(t.before)){var R=t.before(n.file,n.inputElem);if(typeof R=="object"){if(R.action==="abort")return y="AbortError",M=n.file,u=n.inputElem,h=R.reason,void(m(t.error)&&t.error({name:y},M,u,h));if(R.action==="skip")return void i();typeof R.config=="object"&&(n.instanceConfig=F.extend(n.instanceConfig,R.config))}else if(R==="skip")return void i()}var f=n.instanceConfig.complete;n.instanceConfig.complete=function(q){m(f)&&f(q,n.file,n.inputElem),i()},d.parse(n.file,n.instanceConfig)}}function i(){r.splice(0,1),s()}}),H&&(a.onmessage=function(t){t=t.data,d.WORKER_ID===void 0&&t&&(d.WORKER_ID=t.workerId),typeof t.input=="string"?a.postMessage({workerId:d.WORKER_ID,results:d.parse(t.input,t.config),finished:!0}):(a.File&&t.input instanceof File||t.input instanceof Object)&&(t=d.parse(t.input,t.config))&&a.postMessage({workerId:d.WORKER_ID,results:t,finished:!0})}),($.prototype=Object.create(Z.prototype)).constructor=$,(st.prototype=Object.create(Z.prototype)).constructor=st,(at.prototype=Object.create(at.prototype)).constructor=at,(L.prototype=Object.create(Z.prototype)).constructor=L,d})})(xt)),xt.exports}var _e=pe();const Ut=fe(_e);var ge=it('<button class="col-delete-btn svelte-63hltt" title="Delete column"><!></button>'),ve=it('<th class="svelte-63hltt"><input class="cell-input header-input svelte-63hltt"/> <!></th>'),me=it('<td class="svelte-63hltt"><input class="cell-input svelte-63hltt"/></td>'),ye=it('<tr class="svelte-63hltt"><td class="row-num svelte-63hltt"></td><!><td class="actions svelte-63hltt"><button class="delete-btn svelte-63hltt" title="Delete row"><!></button></td></tr>'),ke=it('<div class="csv-editor svelte-63hltt"><div class="table-scroll svelte-63hltt"><table class="svelte-63hltt"><thead><tr><th class="row-num svelte-63hltt"></th><!><th class="col-add svelte-63hltt"><button class="col-add-btn svelte-63hltt" title="Add column"><!></button></th></tr></thead><tbody></tbody></table></div> <div class="csv-footer svelte-63hltt"><button class="add-row-btn svelte-63hltt"><!> <span>Add row</span></button></div></div>');function be(O,v){Nt(v,!0);let w=yt(Dt([])),a=yt(Dt([])),F=yt(void 0);function W(u){const h=Ut.parse(u.trim(),{header:!1,skipEmptyLines:!0});h.data.length>0?(N(w,h.data[0],!0),N(a,h.data.slice(1),!0)):(N(w,[],!0),N(a,[],!0))}W(v.content),Ft(()=>{W(v.content)});function H(){return Ut.unparse([l(w),...l(a)])}function J(){v.onchange?.(H())}function dt(u,h,n){l(a)[u][h]=n,N(a,[...l(a)],!0),J()}function d(u,h){l(w)[u]=h,N(w,[...l(w)],!0),J()}function Z(){N(a,[...l(a),l(w).map(()=>"")],!0),J(),L(l(a).length-1,0)}function $(u){N(a,l(a).filter((h,n)=>n!==u),!0),J()}function st(){const u=`col${l(w).length+1}`;N(w,[...l(w),u],!0),N(a,l(a).map(h=>[...h,""]),!0),J(),requestAnimationFrame(()=>{const h=l(F)?.querySelector(`thead th:nth-child(${l(w).length+1}) input`);h&&(h.focus(),h.select())})}function at(u){l(w).length<=1||(N(w,l(w).filter((h,n)=>n!==u),!0),N(a,l(a).map(h=>h.filter((n,R)=>R!==u)),!0),J())}function L(u,h){requestAnimationFrame(()=>{if(!l(F))return;let n=null;u<0?n=l(F).querySelector(`thead th:nth-child(${h+2}) input`):n=l(F).querySelector(`tbody tr:nth-child(${u+1}) td:nth-child(${h+2}) input`),n&&(n.focus(),n.select())})}function vt(u,h,n){if(u.key==="Tab"){u.preventDefault(),u.shiftKey?n>0?L(h,n-1):h>0?L(h-1,l(w).length-1):h===0&&L(-1,l(w).length-1):n<l(w).length-1?L(h,n+1):h<l(a).length-1?L(h+1,0):h===l(a).length-1&&Z();return}if(u.key==="Enter"){u.preventDefault(),u.shiftKey?h>0?L(h-1,n):L(-1,n):h<l(a).length-1?L(h+1,n):Z();return}if(u.key==="Escape"){u.target.blur();return}}function ot(u,h){if(u.key==="Tab"){u.preventDefault(),u.shiftKey?h>0&&L(-1,h-1):h<l(w).length-1?L(-1,h+1):l(a).length>0&&L(0,0);return}if(u.key==="Enter"){u.preventDefault(),l(a).length>0?L(0,h):Z();return}if(u.key==="Escape"){u.target.blur();return}}function mt(u){(u.metaKey||u.ctrlKey)&&u.key==="s"&&(u.preventDefault(),v.onsave?.())}var ct=ke(),pt=U(ct),_t=U(pt),lt=U(_t),b=U(lt),m=X(U(b));St(m,17,()=>l(w),Ot,(u,h,n)=>{var R=ve(),f=U(R);jt(f);var q=X(f,2);{var _=c=>{var o=ge(),D=U(o);qt(D,{size:12}),z(o),ht("click",o,()=>at(n)),nt(c,o)};Et(q,c=>{l(w).length>1&&c(_)})}z(R),At(()=>zt(f,l(h))),ht("input",f,c=>d(n,c.currentTarget.value)),ht("keydown",f,c=>ot(c,n)),nt(u,R)});var t=X(m),e=U(t),r=U(e);Kt(r,{size:14}),z(e),z(t),z(b),z(lt);var s=X(lt);St(s,21,()=>l(a),Ot,(u,h,n)=>{var R=ye(),f=U(R);f.textContent=n+1;var q=X(f);St(q,17,()=>l(h),Ot,(D,g,A)=>{var B=me(),k=U(B);jt(k),z(B),At(()=>zt(k,l(g))),ht("input",k,C=>dt(n,A,C.currentTarget.value)),ht("keydown",k,C=>vt(C,n,A)),nt(D,B)});var _=X(q),c=U(_),o=U(c);qt(o,{size:12}),z(c),z(_),z(R),ht("click",c,()=>$(n)),nt(u,R)}),z(s),z(_t),ne(_t,u=>N(F,u),()=>l(F)),z(pt);var i=X(pt,2),y=U(i),M=U(y);Kt(M,{size:14}),Gt(2),z(y),z(i),z(ct),ht("keydown",ct,mt),ht("click",e,st),ht("click",y,Z),nt(O,ct),Bt()}Yt(["keydown","input","click"]);function Ee(O){if(!O.startsWith("---"))return{frontmatter:{},content:O};const v=O.indexOf(`
|
|
11
|
+
---`,3);if(v===-1)return{frontmatter:{},content:O};const w=O.slice(4,v),a=O.slice(v+4).replace(/^\n/,"");try{return{frontmatter:we(w),content:a}}catch{return{frontmatter:{},content:O}}}function we(O){const v={},w=O.split(`
|
|
12
|
+
`);let a=0;for(;a<w.length;){const F=w[a];if(!F.trim()||F.trim().startsWith("#")){a++;continue}const W=F.match(/^([a-zA-Z_][a-zA-Z0-9_-]*):\s*(.*)/);if(!W){a++;continue}const H=W[1],J=W[2].trim();if(!J&&a+1<w.length&&w[a+1]?.match(/^\s+-\s/)){const dt=[];for(a++;a<w.length&&w[a].match(/^\s+-\s/);){const d=w[a].match(/^\s+-\s+(.*)/);d&&dt.push(Ht(d[1].trim())),a++}v[H]=dt;continue}v[H]=Ce(J),a++}return v}function Ht(O){return O.startsWith("'")&&O.endsWith("'")||O.startsWith('"')&&O.endsWith('"')?O.slice(1,-1):O}function Ce(O){if(!O)return"";const v=Ht(O);return v==="true"?!0:v==="false"?!1:v==="null"||v==="~"?null:O===v&&/^-?\d+(\.\d+)?$/.test(O)?Number(O):v}var Re=it('<span class="bc-sep svelte-xtfs5g">/</span>'),Se=it("<!><span> </span>",1),Oe=it('<span class="status-text saving svelte-xtfs5g">Saving...</span>'),xe=it('<span class="status-text error svelte-xtfs5g"> </span>'),Ae=it('<div class="content-row svelte-xtfs5g"><div class="entity-area svelte-xtfs5g"><!> <div class="editor-bar svelte-xtfs5g"><div class="breadcrumb-path svelte-xtfs5g"></div> <div class="editor-actions svelte-xtfs5g"><!></div></div> <div class="document-scroll svelte-xtfs5g"><!> <!></div></div> <!></div>');function We(O,v){Nt(v,!0);const w=$t("chat"),a=Rt(()=>v.data.fileName.endsWith(".csv")),F=Rt(()=>v.data.fileName.endsWith(".md"));let W=yt(""),H=yt(Dt({})),J=yt(0);const dt=Rt(()=>he(l(H))),d=Rt(()=>Object.keys(l(H)).length>0),Z=Rt(()=>[v.data.repo,v.data.id,...v.data.filePath.split("/")]);let $=yt("");Ft(()=>{const b=`${v.data.repo}/${v.data.type}/${v.data.id}/${v.data.filePath}`;if(b!==l($)){if(l($)&&ft.flush(),N($,b),l(F)||l(a)){const m=Ee(v.data.content);N(H,{...m.frontmatter},!0),N(W,m.content,!0)}else N(H,{},!0),N(W,v.data.content,!0);te(J),ft.reset()}}),Ft(()=>{It.select(v.data.repo,v.data.type,v.data.id,v.data.filePath),It.showEntity()});function st(b){return/[\[\]{}'":,#|>&*!?]/.test(b)||/^\s|\s$/.test(b)}function at(){if(l(d)){const b=[];for(const[m,t]of Object.entries(l(H)))if(Array.isArray(t)){b.push(`${m}:`);for(const e of t){const r=String(e);b.push(` - ${st(r)?`'${r}'`:r}`)}}else{const e=String(t??"");b.push(`${m}: ${st(e)?`'${e}'`:e}`)}return`---
|
|
13
|
+
${b.join(`
|
|
14
|
+
`)}
|
|
15
|
+
---
|
|
16
|
+
${l(W)}`}return l(W)}function L(){const b=at();ft.scheduleContentFileSave(v.data.repo,v.data.type,v.data.id,v.data.filePath,b)}function vt(b){N(W,b,!0),L()}function ot(b,m){N(H,{...l(H),[b]:m},!0),L()}function mt(b){const{[b]:m,...t}=l(H);N(H,t,!0),L()}function ct(b,m){N(H,{...l(H),[b]:m},!0),L()}function pt(b,m){L()}function _t(b){for(const m of Vt.repos){const t=m.entities.find(e=>e.id===b);if(t){se(`/${m.name}/${t.entityType}/${t.id}`);return}}}function lt(b){(b.metaKey||b.ctrlKey)&&b.key==="s"&&(b.preventDefault(),ft.flush())}Xt("keydown",ee,lt),ie(O,{children:(b,m)=>{var t=Ae(),e=U(t),r=U(e);ae(r,{activeView:"entity"});var s=X(r,2),i=U(s);St(i,21,()=>l(Z),Ot,(g,A,B)=>{var k=Se(),C=re(k);{var P=K=>{var x=Re();nt(K,x)};Et(C,K=>{B>0&&K(P)})}var p=X(C),j=U(p,!0);z(p),At(()=>{Jt(p,1,Zt(B===l(Z).length-1?"bc-current":"bc-segment"),"svelte-xtfs5g"),Mt(j,l(A))}),nt(g,k)}),z(i);var y=X(i,2),M=U(y);{var u=g=>{var A=Oe();nt(g,A)},h=g=>{var A=xe(),B=U(A,!0);z(A),At(()=>Mt(B,ft.error)),nt(g,A)};Et(M,g=>{ft.saving?g(u):ft.error&&g(h,1)})}z(y),z(s);var n=X(s,2),R=U(n);{var f=g=>{le(g,{get properties(){return l(dt)},editable:!0,onedit:ot,onremove:mt,onadd:ct,ontypechange:pt})};Et(R,g=>{l(d)&&g(f)})}var q=X(R,2);{var _=g=>{be(g,{get content(){return l(W)},onchange:vt,onsave:()=>ft.flush()})},c=g=>{ue(g,{get content(){return l(W)},readonly:!1,onchange:vt,onsave:()=>ft.flush(),onwikilinkclick:_t,get resetKey(){return l(J)}})};Et(q,g=>{l(a)?g(_):g(c,!1)})}z(n),z(e);var o=X(e,2);{var D=g=>{oe(g,{})};Et(o,g=>{w.open&&g(D)})}z(t),nt(b,t)},$$slots:{default:!0}}),Bt()}export{We as component,Ie as universal};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{f as dt,b as G,w as ut}from"../chunks/Dml-u95b.js";import{a as k,f as M,d as ft}from"../chunks/bSAC733J.js";import{n as Z,A as $,S as mt,t as H,u as T,F as v,w as F,x as I,q as tt,P as J,T as S,V as ht,Y as vt}from"../chunks/DEJSHbC3.js";import{s as et}from"../chunks/MbiSz-iW.js";import{b as Q,i as O}from"../chunks/DvKVaE7M.js";import{n as X,A as yt}from"../chunks/DNywhIex.js";import{g as pt}from"../chunks/479TgXB4.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){Z(o,!0);let l,c,f=J(!0),m=J(null),p=[],b=[],w=[],d={},y=[],h=null,_=null,A=0;function j(){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 q(){const e=++A;S(f,!0),S(m,null),j();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
|
+
body.sg-chrome-active { height: auto !important; }
|
|
3
|
+
body.sg-chrome-active > :not(.sg-chrome-header):not(.sg-chrome-footer) { overflow: visible !important; }
|
|
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"),R=[],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}`),R.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 N=Y=>{Y.preventDefault(),Y.stopPropagation(),pt(`/${o.repo}/${o.entityType}/${o.entityId}`)};a.addEventListener("click",N,!0),_={el:a,handler:N}}}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 R){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="";$(()=>{const e=`${o.appMountPath}|${o.repo}|${o.entityId}`;x&&x!==e&&c&&q(),x=e}),mt(()=>(q(),j));var C=_t();let V;var B=H(C);Q(B,e=>l=e,()=>l);var W=T(B,2);{var nt=e=>{var i=gt();k(e,i)};O(W,e=>{v(f)&&e(nt)})}var U=T(W,2);{var rt=e=>{var i=wt(),r=H(i,!0);F(i),I(()=>et(r,v(m))),k(e,i)};O(U,e=>{v(m)&&e(rt)})}var D=T(U,2);let z;Q(D,e=>c=e,()=>c),F(C),I(()=>{V=G(C,1,"editor-frame svelte-1fltv0h",null,V,{loading:v(f)}),z=G(D,1,"editor-container svelte-1fltv0h",null,z,{hidden:v(f)||!!v(m)})}),k(g,C),tt()}var St=M('<div class="no-editor svelte-bzivfp"> </div>');function Ft(g,o){Z(o,!0);const l=vt(()=>ut.getAppForEntityType(o.data.type));$(()=>{X.select(o.data.repo,o.data.type,o.data.id),X.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);F(y),I(()=>et(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}}),tt()}export{Ft as component,Ht as universal};
|
|
@@ -0,0 +1,2 @@
|
|
|
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{g as Me,j as wt,a as vt,f as Ct,e as ee,d as Te}from"../chunks/bSAC733J.js";import{n as se,o as Ie,A as At,F as p,Y as q,S as Ce,bc as Ve,x as zt,q as le,t as ct,u as dt,w as tt,T as rt,P as mt,V as De,bd as $e}from"../chunks/DEJSHbC3.js";import{p as Bt,b as Ne,l as Ae,s as ze,i as ne}from"../chunks/DvKVaE7M.js";import{c as Tt,e as ie,i as re,I as Se,s as Pe,n as te,A as Ke}from"../chunks/DNywhIex.js";import{V as Qe,c as Je,C as Ze}from"../chunks/BFb0g4TQ.js";import{_ as qe}from"../chunks/PPVm8Dsz.js";import{s as Xt}from"../chunks/MbiSz-iW.js";import{b as tn,i as St,a as en,w as Wt}from"../chunks/Dml-u95b.js";import{g as nn}from"../chunks/479TgXB4.js";import"../chunks/COwytaCP.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,x,f,y,u,l,g,_;if(!s)return t._root=c,t;for(;s.length;)if((u=e>=(C=(o+a)/2))?o=C:a=C,(l=n>=(x=(h+d)/2))?h=x:d=x,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>=(x=(h+d)/2))?h=x:d=x;while((g=l<<1|u)===(_=(y>=x)<<1|f>=C));return r[_]=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 ot(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,x=[],f=this._root,y,u;for(f&&x.push(new ot(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=x.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;x.push(new ot(f[3],l,g,h,a),new ot(f[2],c,g,l,a),new ot(f[1],l,o,h,g),new ot(f[0],c,o,l,g)),(u=(e>=g)<<1|t>=l)&&(y=x[x.length-1],x[x.length-1]=x[x.length-1-u],x[x.length-1-u]=y)}else{var _=t-+this._x.call(null,f.data),D=e-+this._y.call(null,f.data),m=_*_+D*D;if(m<n){var z=Math.sqrt(n=m);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,x,f,y,u,l,g;if(!n)return this;if(n.length)for(;;){if((y=d>=(x=(c+h)/2))?c=x:h=x,(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 ot(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 ot(r,a,d,o,h)),(r=i[2])&&e.push(new ot(r,s,d,a,h)),(r=i[1])&&e.push(new ot(r,a,c,o,d)),(r=i[0])&&e.push(new ot(r,s,c,a,d))}return this}function vn(t){var e=[],n=[],i;for(this._root&&e.push(new ot(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 ot(s,c,o,d,C)),(s=r[1])&&e.push(new ot(s,d,o,h,C)),(s=r[2])&&e.push(new ot(s,c,C,d,a)),(s=r[3])&&e.push(new ot(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 xn(t){return t[1]}function mn(t){return arguments.length?(this._y=t,this):this._y}function ce(t,e,n){var i=new fe(e??pn,n??xn,NaN,NaN,NaN,NaN);return t==null?i:i.addAll(t)}function fe(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 he(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var st=ce.prototype=fe.prototype;st.copy=function(){var t=new fe(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=he(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]=he(i));return t};st.add=rn;st.addAll=on;st.cover=an;st.data=sn;st.extent=ln;st.find=cn;st.remove=fn;st.removeAll=un;st.root=hn;st.size=dn;st.visit=gn;st.visitAfter=vn;st.x=yn;st.y=mn;function at(t){return function(){return t}}function _t(t){return(t()-.5)*1e-6}function wn(t){return t.x+t.vx}function _n(t){return t.y+t.vy}function de(t){var e,n,i,r=1,s=1;typeof t!="function"&&(t=at(t==null?1:+t));function c(){for(var a,d=e.length,C,x,f,y,u,l,g=0;g<s;++g)for(C=ce(e,wn,_n).visitAfter(o),a=0;a<d;++a)x=e[a],u=n[x.index],l=u*u,f=x.x+x.vx,y=x.y+x.vy,C.visit(_);function _(D,m,z,k,j){var U=D.data,et=D.r,H=u+et;if(U){if(U.index>x.index){var Q=f-U.x-U.vx,$=y-U.y-U.vy,nt=Q*Q+$*$;nt<H*H&&(Q===0&&(Q=_t(i),nt+=Q*Q),$===0&&($=_t(i),nt+=$*$),nt=(H-(nt=Math.sqrt(nt)))/nt*r,x.vx+=(Q*=nt)*(H=(et*=et)/(l+et)),x.vy+=($*=nt)*H,U.vx-=Q*(H=1-H),U.vy-=$*H)}return}return m>f+H||k<f-H||z>y+H||j<y-H}}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:at(+a),h(),c):t},c}function bn(t){return t.index}function ge(t,e){var n=t.get(e);if(!n)throw new Error("node not found: "+e);return n}function ve(t){var e=bn,n=C,i,r=at(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 x(l){for(var g=0,_=t.length;g<d;++g)for(var D=0,m,z,k,j,U,et,H;D<_;++D)m=t[D],z=m.source,k=m.target,j=k.x+k.vx-z.x-z.vx||_t(a),U=k.y+k.vy-z.y-z.vy||_t(a),et=Math.sqrt(j*j+U*U),et=(et-s[D])/et*l*i[D],j*=et,U*=et,k.vx-=j*(H=h[D]),k.vy-=U*H,z.vx+=j*(H=1-H),z.vy+=U*H}function f(){if(c){var l,g=c.length,_=t.length,D=new Map(c.map((z,k)=>[e(z,k,c),z])),m;for(l=0,o=new Array(g);l<_;++l)m=t[l],m.index=l,typeof m.source!="object"&&(m.source=ge(D,m.source)),typeof m.target!="object"&&(m.target=ge(D,m.target)),o[m.source.index]=(o[m.source.index]||0)+1,o[m.target.index]=(o[m.target.index]||0)+1;for(l=0,h=new Array(_);l<_;++l)m=t[l],h[l]=o[m.source.index]/(o[m.source.index]+o[m.target.index]);i=new Array(_),y(),s=new Array(_),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 x.initialize=function(l,g){c=l,a=g,f()},x.links=function(l){return arguments.length?(t=l,f(),x):t},x.id=function(l){return arguments.length?(e=l,x):e},x.iterations=function(l){return arguments.length?(d=+l,x):d},x.strength=function(l){return arguments.length?(n=typeof l=="function"?l:at(+l),y(),x):n},x.distance=function(l){return arguments.length?(r=typeof l=="function"?l:at(+l),u(),x):r},x}var Mn={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 Ut(n)}function Ut(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}})}Ut.prototype=Ee.prototype={constructor:Ut,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]=pe(n[r],t.name,e);else if(e==null)for(r in n)n[r]=pe(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 Ut(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 pe(t,e,n){for(var i=0,r=t.length;i<r;++i)if(t[i].name===e){t[i]=Mn,t=t.slice(0,i).concat(t.slice(i+1));break}return n!=null&&t.push({name:e,value:n}),t}var Pt=0,Rt=0,Et=0,Re=1e3,Ht,Lt,Vt=0,It=0,$t=0,Ft=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 It||(Le(Cn),It=Ft.now()+$t)}function Cn(){It=0}function oe(){this._call=this._time=this._next=null}oe.prototype=Fe.prototype={constructor:oe,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&&Lt!==this&&(Lt?Lt._next=this:Ht=this,Lt=this),this._call=t,this._time=n,ae()},stop:function(){this._call&&(this._call=null,this._time=1/0,ae())}};function Fe(t,e,n){var i=new oe;return i.restart(t,e,n),i}function Dn(){Xe(),++Pt;for(var t=Ht,e;t;)(e=It-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Pt}function ye(){It=(Vt=Ft.now())+$t,Pt=Rt=0;try{Dn()}finally{Pt=0,An(),It=0}}function Nn(){var t=Ft.now(),e=t-Vt;e>Re&&($t-=e,Vt=t)}function An(){for(var t,e=Ht,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:Ht=n);Lt=t,ae(i)}function ae(t){if(!Pt){Rt&&(Rt=clearTimeout(Rt));var e=t-It;e>24?(t<1/0&&(Rt=setTimeout(ye,t-Ft.now()-$t)),Et&&(Et=clearInterval(Et))):(Et||(Vt=Ft.now(),Et=setInterval(Nn,Re)),Pt=1,Le(ye))}}const zn=1664525,Sn=1013904223,xe=4294967296;function Pn(){let t=1;return()=>(t=(zn*t+Sn)%xe)/xe}function kn(t){return t.x}function En(t){return t.y}var Rn=10,Ln=Math.PI*(3-Math.sqrt(5));function me(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=Pn();t==null&&(t=[]);function C(){x(),a.call("tick",e),n<i&&(h.stop(),a.call("end",e))}function x(u){var l,g=t.length,_;u===void 0&&(u=1);for(var D=0;D<u;++D)for(n+=(s-n)*r,o.forEach(function(m){m(n)}),l=0;l<g;++l)_=t[l],_.fx==null?_.x+=_.vx*=c:(_.x=_.fx,_.vx=0),_.fy==null?_.y+=_.vy*=c:(_.y=_.fy,_.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 _=Rn*Math.sqrt(.5+u),D=u*Ln;g.x=_*Math.cos(D),g.y=_*Math.sin(D)}(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:x,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 _=0,D=t.length,m,z,k,j,U;for(g==null?g=1/0:g*=g,_=0;_<D;++_)j=t[_],m=u-j.x,z=l-j.y,k=m*m+z*z,k<g&&(U=j,g=k);return U},on:function(u,l){return arguments.length>1?(a.on(u,l),e):a.on(u)}}}function we(){var t,e,n,i,r=at(-30),s,c=1,o=1/0,h=.81;function a(f){var y,u=t.length,l=ce(t,kn,En).visitAfter(C);for(i=f,y=0;y<u;++y)e=t[y],l.visit(x)}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,_,D,m;if(f.length){for(_=D=m=0;m<4;++m)(u=f[m])&&(l=Math.abs(u.value))&&(y+=u.value,g+=l,_+=l*u.x,D+=l*u.y);f.x=_/g,f.y=D/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 x(f,y,u,l){if(!f.value)return!0;var g=f.x-e.x,_=f.y-e.y,D=l-y,m=g*g+_*_;if(D*D/h<m)return m<o&&(g===0&&(g=_t(n),m+=g*g),_===0&&(_=_t(n),m+=_*_),m<c&&(m=Math.sqrt(c*m)),e.vx+=g*f.value*i/m,e.vy+=_*f.value*i/m),!0;if(f.length||m>=o)return;(f.data!==e||f.next)&&(g===0&&(g=_t(n),m+=g*g),_===0&&(_=_t(n),m+=_*_),m<c&&(m=Math.sqrt(c*m)));do f.data!==e&&(D=s[f.data.index]*i/m,e.vx+=g*D,e.vy+=_*D);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:at(+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 _e(t){var e=at(.1),n,i,r;typeof t!="function"&&(t=at(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:at(+o),c(),s):e},s.x=function(o){return arguments.length?(t=typeof o=="function"?o:at(+o),c(),s):t},s}function be(t){var e=at(.1),n,i,r;typeof t!="function"&&(t=at(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:at(+o),c(),s):e},s.y=function(o){return arguments.length?(t=typeof o=="function"?o:at(+o),c(),s):t},s}var Xn=Ct('<div><span class="legend-dot svelte-1i33fky"></span> <span class="legend-label svelte-1i33fky"> </span> <span class="legend-count svelte-1i33fky"> </span></div>'),Fn=Ct('<div class="graph-view svelte-1i33fky"><div class="canvas-wrap svelte-1i33fky"><div class="legend-panel svelte-1i33fky"></div></div></div>');function On(t,e){se(e,!0);let n=Bt(e,"selectedEntityId",3,null),i=Bt(e,"filteredIds",3,null),r=Bt(e,"sidebarHoveredId",3,null),s=Bt(e,"highlightedIds",3,null);function c(v){return e.nameMap?.get(v)??v.replace(/-/g," ").replace(/\b\w/g,b=>b.toUpperCase())}const o=Ie("theme"),h=q(()=>o.current==="light"?{default:14211288,dim:15263976,conn:12632256,labelText:1710623}:{default:2763306,dim:1315860,conn:4210752,labelText:15592943}),a=q(()=>o.current==="light"?16316666:592139),d=.75;At(()=>{o.current,P&&(P.style.fill=p(h).labelText);const v=p(jt);for(const b of y)Tt(b.type)===Dt&&(b.color=v);J()}),At(()=>{i(),J()}),At(()=>{s(),J()}),At(()=>{n(),J()});let C=!1;At(()=>{const v=e.graphData;if(!F||!w||!A)return;if(!C){C=!0;return}const b=new Map;for(const T of v.edges)b.set(T.source,(b.get(T.source)??0)+1),b.set(T.target,(b.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,B=Math.sqrt(G),O=v.nodes.map(T=>{const W=b.get(T.id)??0,ht=M.get(T.id);return{id:T.id,type:T.type,repo:T.repo,color:Tt(T.type)===Dt?p(jt):Tt(T.type),weight:W,x:ht?.x??(Math.random()-.5)*B,y:ht?.y??(Math.random()-.5)*B,vx:0,vy:0,r:ft(W)}}),V=new Map;for(const T of O)V.set(T.id,T);const Z=new Set(S.keys()),ut=new Set(v.nodes.map(T=>T.id));for(const T of Z)if(!ut.has(T)){const W=S.get(T);W&&(A.removeChild(W),W.destroy()),S.delete(T)}let X=null;if(S.size>0&&(X=S.values().next().value?.texture),!X){const T=document.createElement("canvas");T.width=100,T.height=100;const W=T.getContext("2d");W.beginPath(),W.arc(50,50,48,0,Math.PI*2),W.fillStyle="#ffffff",W.fill(),X=F.Texture.from(T)}for(const T of O){let W=S.get(T.id);W||(W=new F.Sprite(X),W.anchor.set(.5),A.addChild(W),S.set(T.id,W)),W.tint=Yt(T.color)}y=O,f?.stop();const xt=v.edges.map(T=>({source:T.source,target:T.target})),L=ve(xt).id(T=>T.id).distance(250);f=me(y).force("link",L).force("charge",we().strength(-1e3).distanceMin(30)).force("x",_e(0).strength(.1)).force("y",be(0).strength(.1)).force("collide",de().radius(60).strength(.5)).velocityDecay(.4).alpha(.3).on("tick",()=>{nt||Kt(),J()}),u=L.links(),z=null,yt(),J()}),At(()=>{const v=r();if(v){const b=y.find(M=>M.id===v)??null;z=b,yt(),it=b?1:0}else k||(it=0);J()});let x,f=null,y=[],u=[],l=!1,g=0,_=0,D=0,m=1,z=null,k=null,j=mt(!1),U=0,et=0,H=0,Q=0,$=new Set,nt=!1,pt=mt(null),lt=0,it=0;const Ot=4;let w=null,I=null,E=null,A=null,S=new Map,Y=null,P=null,F=null;function ft(v){return Math.max(3,Math.min(Math.sqrt(v+1)+2,10))}function gt(v,b){const M=x.getBoundingClientRect();return{x:(v-M.left-_)/m,y:(b-M.top-D)/m}}function kt(v,b){for(let M=y.length-1;M>=0;M--){const R=y[M],G=v-R.x,B=b-R.y,O=(R.r*1.5+4)/m;if(G*G+B*B<=O*O)return R}return null}function yt(){const v=z??null;if($.clear(),!!v){$.add(v.id);for(const b of u)b.source.id===v.id&&$.add(b.target.id),b.target.id===v.id&&$.add(b.source.id);if(A){const b=S.get(v.id);b&&A.setChildIndex(b,A.children.length-1)}}}function Kt(){if(y.length===0||!x)return;let v=1/0,b=-1/0,M=1/0,R=-1/0,G=0;for(const X of y)X.x<v&&(v=X.x),X.x>b&&(b=X.x),X.y<M&&(M=X.y),X.y>R&&(R=X.y),X.r>G&&(G=X.r);const B=x.clientWidth,O=x.clientHeight,V=b-v,Z=R-M;if(V===0||Z===0)return;const ut=(60+G)*2;m=Math.min((B-ut)/V,(O-ut)/Z,3),_=B/2-(v+b)/2*m,D=O/2-(M+R)/2*m,J()}function J(){l=!0,g=0}function Yt(v){return parseInt(v.replace("#",""),16)}function bt(v,b,M){const R=(v>>16&255)+M*((b>>16&255)-(v>>16&255)),G=(v>>8&255)+M*((b>>8&255)-(v>>8&255)),B=(v&255)+M*((b&255)-(v&255));return Math.round(R)<<16|Math.round(G)<<8|Math.round(B)}function Oe(){if(!F||!I||!E)return;I.clear(),E.clear();const b=z!==null,M=lt,R=p(pt),G=s(),B=i(),O=p(h).default,V=p(h).dim,Z=p(h).conn;for(let ut=0;ut<u.length;ut++){const X=u[ut],xt=X.source.x*m+_,L=X.source.y*m+D,T=X.target.x*m+_,W=X.target.y*m+D,ht=b&&M>.01&&$.has(X.source.id)&&$.has(X.target.id);let N=O;b&&M>.01?N=ht?bt(O,Z,M):bt(O,V,M):(R!==null||G!==null||B!==null)&&(N=V);const K=ht?E:I,Nt=ht?1:.2;K.setStrokeStyle({width:1,color:N,alpha:Nt}),K.moveTo(xt,L),K.lineTo(T,W),K.stroke()}}function Ye(){if(!F)return;const v=z,b=v!==null,M=lt,R=p(pt),G=s(),B=i(),O=!v&&n()?y.find(L=>L.id===n())??null:null,V=new Set;if(O){V.add(O.id);for(const L of u)L.source.id===O.id&&V.add(L.target.id),L.target.id===O.id&&V.add(L.source.id)}for(const L of y){const T=S.get(L.id);if(!T)continue;const W=L.x*m+_,ht=L.y*m+D;T.position.set(W,ht),T.scale.set(L.r/50),T.alpha=1;const N=Yt(L.color);if(O&&!v){const K=V.has(L.id);T.tint=K?N:bt(N,p(a),d)}else{const K=L===v,Nt=b&&$.has(L.id),Ue=R!==null&&(R==="other"?Tt(L.type)===Dt:L.type===R);if(K&&M>.01)T.tint=N,T.scale.set(L.r*(1+M*.4)/50);else if(Nt)T.tint=N;else if(R!==null)T.tint=Ue?N:bt(N,p(a),d);else if(G!==null){const qt=G.has(L.id)?M*d:d;T.tint=bt(N,p(a),qt)}else if(B!==null){const qt=B.has(L.id)?M*d:d;T.tint=bt(N,p(a),qt)}else T.tint=bt(N,p(a),M*d)}}const Z=v??O,ut=v?M>.01:!!O;if(Z&&ut&&Y){Y.visible=!0;const L=Z.x*m+_,T=Z.y*m+D;Y.position.set(L,T),Y.scale.set(Z.r*5/64),Y.alpha=v?M*.25:.25,Y.tint=Yt(Z.color)}else Y&&(Y.visible=!1);const X=v??O,xt=v?M>.01:!!O;if(X&&xt&&P){const L=X.x*m+_,T=X.y*m+D;P.text=c(X.id),P.style.fontSize=12,P.position.set(L,T+X.r+8),P.alpha=v?M:1,P.visible=!0}else P&&(P.visible=!1)}let Gt=!1;function Ge(v){if(v.button!==0)return;Gt=!1;const b=gt(v.clientX,v.clientY),M=kt(b.x,b.y);M?(k=M,nt=!0,M.fx=M.x,M.fy=M.y,f?.alphaTarget(.3).restart(),J()):(rt(j,!0),U=v.clientX,et=v.clientY,H=_,Q=D),x.setPointerCapture(v.pointerId),window.addEventListener("pointerup",Qt,{once:!0})}function je(v){if(k){Gt=!0;const b=gt(v.clientX,v.clientY);k.fx=b.x,k.fy=b.y,J()}else if(p(j))Gt=!0,_=H+(v.clientX-U),D=Q+(v.clientY-et),J();else{const b=gt(v.clientX,v.clientY),M=kt(b.x,b.y);M?M!==z?(z&&(lt=.15),z=M,yt(),it=1,x.style.cursor="pointer",J()):it!==1&&(it=1,x.style.cursor="pointer",J()):it!==0&&(it=0,x.style.cursor="grab",J())}}function Qt(v){if(!k&&!p(j))return;window.removeEventListener("pointerup",Qt);const b=Gt;if(k){const M=k;k.fx=null,k.fy=null,f?.alphaTarget(0),k=null,it=0,J(),b||nn(`/${M.repo}/${M.type}/${M.id}`)}else p(j)&&rt(j,!1);try{x.releasePointerCapture(v.pointerId)}catch{}}const Dt="#5c5c66",Be="#b0b0b8",jt=q(()=>o.current==="light"?Be:Dt),We=q(()=>{const v=new Map;for(const R of e.graphData.nodes)v.set(R.type,(v.get(R.type)??0)+1);const b=[];let M=0;for(const[R,G]of v){const B=Tt(R);B===Dt?M+=G:b.push({name:R,color:B,count:G})}return b.sort((R,G)=>G.count-R.count),M>0&&b.push({name:"other",color:p(jt),count:M}),b});Ce(async()=>{F=await qe(()=>import("../chunks/BB_5th5W.js"),__vite__mapDeps([0,1,2]),import.meta.url),w=new F.Application,await w.init({antialias:!0,resolution:window.devicePixelRatio||1,autoDensity:!0,backgroundAlpha:0,resizeTo:x}),x.insertBefore(w.canvas,x.firstChild),w.canvas.style.position="absolute",w.canvas.style.inset="0",I=new F.Graphics,w.stage.addChild(I),E=new F.Graphics,w.stage.addChild(E),A=new F.Container,w.stage.addChild(A);const v=document.createElement("canvas");v.width=128,v.height=128;const b=v.getContext("2d"),M=b.createRadialGradient(64,64,0,64,64,64);M.addColorStop(0,"rgba(255,255,255,0.5)"),M.addColorStop(1,"rgba(255,255,255,0)"),b.fillStyle=M,b.fillRect(0,0,128,128);const R=F.Texture.from(v);Y=new F.Sprite(R),Y.anchor.set(.5),Y.visible=!1,w.stage.addChild(Y);const G=document.createElement("canvas");G.width=100,G.height=100;const B=G.getContext("2d");B.beginPath(),B.arc(50,50,48,0,Math.PI*2),B.fillStyle="#ffffff",B.fill();const O=F.Texture.from(G),V=new Map;for(const N of e.graphData.edges)V.set(N.source,(V.get(N.source)??0)+1),V.set(N.target,(V.get(N.target)??0)+1);const Z=new Map,X=3600*e.graphData.nodes.length,xt=Math.sqrt(X);y=e.graphData.nodes.map(N=>{const K=V.get(N.id)??0,Nt={id:N.id,type:N.type,repo:N.repo,color:Tt(N.type)===Dt?p(jt):Tt(N.type),weight:K,x:(Math.random()-.5)*xt,y:(Math.random()-.5)*xt,vx:0,vy:0,r:ft(K)};return Z.set(N.id,Nt),Nt});for(const N of y){const K=new F.Sprite(O);K.anchor.set(.5),K.tint=Yt(N.color),A.addChild(K),S.set(N.id,K)}P=new F.Text({text:"",style:{fontFamily:"Inter, system-ui, sans-serif",fontWeight:"500",fontSize:12,fill:p(h).labelText,align:"center"}}),P.anchor.set(.5,0),P.visible=!1,w.stage.addChild(P);const L=e.graphData.edges.map(N=>({source:N.source,target:N.target})),T=ve(L).id(N=>N.id).distance(250);f=me(y).force("link",T).force("charge",we().strength(-1e3).distanceMin(30)).force("x",_e(0).strength(.1)).force("y",be(0).strength(.1)).force("collide",de().radius(60).strength(.5)).velocityDecay(.4).alpha(1).on("tick",()=>{nt||Kt(),J()}),u=T.links();let W=0;w.ticker.add(()=>{const N=performance.now(),K=W?Math.min((N-W)/1e3,.05):.016;W=N,lt<it?(lt=Math.min(it,lt+Ot*K),l=!0):lt>it&&(lt=Math.max(it,lt-Ot*K),l=!0),lt===0&&it===0&&z&&!k&&(z=null,yt(),l=!0),(l||g<120)&&(Oe(),Ye(),l=!1,g++)});const ht=new ResizeObserver(()=>{w.renderer.resize(x.clientWidth,x.clientHeight),Kt()});return ht.observe(x),()=>{ht.disconnect()}}),Ve(()=>{f?.stop(),w&&(w.destroy(!0,{children:!0}),w=null)});var Jt=Fn(),Mt=ct(Jt);let ue;var Zt=ct(Mt);ie(Zt,21,()=>p(We),re,(v,b)=>{var M=Xn();let R;var G=ct(M);let B;var O=dt(G,2),V=ct(O,!0);tt(O);var Z=dt(O,2),ut=ct(Z,!0);tt(Z),tt(M),zt(()=>{R=tn(M,1,"legend-item svelte-1i33fky",null,R,{"legend-item-active":p(pt)===p(b).name}),B=St(G,"",B,{background:p(b).color}),Xt(V,p(b).name),Xt(ut,p(b).count)}),ee("mouseenter",M,()=>{rt(pt,p(b).name,!0),J()}),ee("mouseleave",M,()=>{rt(pt,null),J()}),vt(v,M)}),tt(Zt),tt(Mt),Ne(Mt,v=>x=v,()=>x),tt(Jt),zt(()=>ue=St(Mt,"",ue,{cursor:p(j)?"grabbing":"grab"})),wt("pointerdown",Mt,Ge),wt("pointermove",Mt,je),wt("pointerup",Mt,Qt),wt("pointerdown",Zt,v=>v.stopPropagation()),vt(t,Jt),le()}Me(["pointerdown","pointermove","pointerup"]);function Yn(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"}]];Se(t,ze({name:"play"},()=>n,{get iconNode(){return i},children:(r,s)=>{var c=Te(),o=De(c);Pe(o,e,"default",{}),vt(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"}]];Se(t,ze({name:"pause"},()=>n,{get iconNode(){return i},children:(r,s)=>{var c=Te(),o=De(c);Pe(o,e,"default",{}),vt(r,c)},$$slots:{default:!0}}))}var jn=Ct('<div class="density-bar svelte-lzvab"></div>'),Bn=Ct('<span class="date-label svelte-lzvab"> </span>'),Wn=Ct('<div class="timeline-tooltip svelte-lzvab"><div class="tooltip-date svelte-lzvab"> </div> <div class="tooltip-count svelte-lzvab"> </div></div>'),Un=Ct('<div class="timeline-bar svelte-lzvab"><button class="play-btn svelte-lzvab"><!></button> <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 Hn(t,e){se(e,!0);let n=mt(null),i=mt(0),r=mt(!1),s=mt(!1),c=mt(null),o=null;const h=q(()=>{let w=1/0,I=-1/0;for(const E of e.entities){const A=E.createdAt?new Date(E.createdAt).getTime():0;A>0&&A<w&&(w=A),A>I&&(I=A)}return w===1/0&&(w=Date.now()),I===-1/0&&(I=Date.now()),{min:w,max:I}}),a=q(()=>{let{min:w,max:I}=p(h);return I-w<864e5&&(w-=864e5*15,I+=864e5*15),{min:new Date(w),max:new Date(I)}}),d=q(()=>{const I=p(a).min.getTime(),E=p(a).max.getTime(),A=new Map;for(const S of e.entities){const Y=S.createdAt?new Date(S.createdAt).getTime():0;if(Y<=0)continue;const P=Math.floor((Y-I)/864e5),F=I+P*864e5,ft=A.get(F)??[];ft.push(S),A.set(F,ft)}return{map:A,minTime:I,maxTime:E,dayMs:864e5}}),C=q(()=>{let w=0;for(const I of p(d).map.values())I.length>w&&(w=I.length);return Math.max(1,w)}),x=q(()=>{const{minTime:w,maxTime:I}=p(d),E=I-w,A=[],S=Math.max(4,Math.min(8,Math.floor(p(i)/100))),Y=E/S;for(let P=0;P<=S;P++){const F=w+P*Y,gt=new Date(F).toLocaleDateString("en-US",{month:"short",day:"numeric"});A.push({label:gt,x:P/S})}return A}),f=q(()=>{const{minTime:w,maxTime:I}=p(d),E=I-w;if(E<=0)return .5;const A=e.currentDate?e.currentDate.getTime():p(h).max,S=Math.max(p(h).min,Math.min(p(h).max,A));return Math.max(0,Math.min(1,(S-w)/E))});function y(w){if(!p(n))return new Date;const I=p(n).getBoundingClientRect(),E=40,S=I.width-E-12,Y=Math.max(0,Math.min(1,(w-I.left-E)/S)),{minTime:P,maxTime:F}=p(d),ft=P+Y*(F-P);return new Date(Math.max(p(h).min,Math.min(p(h).max,ft)))}function u(w){rt(r,!0),z();const I=y(w.clientX);e.onDateChange(I),w.target.setPointerCapture(w.pointerId)}function l(w){if(p(r)&&e.onDateChange(y(w.clientX)),!p(n))return;const I=p(n).getBoundingClientRect(),E=40,S=I.width-E-12,Y=(w.clientX-I.left-E)/S;if(Y<0||Y>1){rt(c,null);return}const{minTime:P,dayMs:F,map:ft}=p(d),gt=P+Y*(p(d).maxTime-P),kt=P+Math.floor((gt-P)/F)*F,yt=ft.get(kt);yt&&yt.length>0?rt(c,{date:new Date(kt),count:yt.length,x:w.clientX-I.left},!0):rt(c,null)}function g(){rt(r,!1)}function _(){rt(c,null)}function D(){p(s)?z():m()}function m(){rt(s,!0);const{min:w,max:I}=p(h),A=(I-w)/200;let S=e.currentDate?.getTime()??w;S>=I&&(S=w),o=setInterval(()=>{if(S+=A,S>=I){e.onDateChange(null),z();return}e.onDateChange(new Date(S))},50)}function z(){rt(s,!1),o&&(clearInterval(o),o=null)}Ce(()=>{if(p(n)){const w=new ResizeObserver(I=>{rt(i,I[0]?.contentRect.width??0,!0)});return w.observe(p(n)),()=>w.disconnect()}});var k=Un(),j=ct(k),U=ct(j);{var et=w=>{Gn(w,{size:14})},H=w=>{Yn(w,{size:14})};ne(U,w=>{p(s)?w(et):w(H,!1)})}tt(j);var Q=dt(j,2),$=dt(ct(Q),2);ie($,21,()=>Array.from(p(d).map.entries()),re,(w,I)=>{var E=q(()=>$e(p(I),2));let A=()=>p(E)[0],S=()=>p(E)[1];const Y=q(()=>(A()-p(d).minTime)/(p(d).maxTime-p(d).minTime)),P=q(()=>S().length/p(C)),F=q(()=>.05+.95*p(P)*p(P));var ft=jn();let gt;zt(()=>gt=St(ft,"",gt,{left:`${p(Y)*100}%`,opacity:p(F)})),vt(w,ft)}),tt($);var nt=dt($,2);let pt;var lt=dt(nt,2);ie(lt,21,()=>p(x),re,(w,I)=>{var E=Bn();let A;var S=ct(E,!0);tt(E),zt(()=>{A=St(E,"",A,{left:`${p(I).x*100}%`}),Xt(S,p(I).label)}),vt(w,E)}),tt(lt);var it=dt(lt,2);{var Ot=w=>{var I=Wn();let E;var A=ct(I),S=ct(A,!0);tt(A);var Y=dt(A,2),P=ct(Y);tt(Y),tt(I),zt(F=>{E=St(I,"",E,{left:`${p(c).x??""}px`}),Xt(S,F),Xt(P,`${p(c).count??""} ${p(c).count===1?"entity":"entities"}`)},[()=>p(c).date.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})]),vt(w,I)};ne(it,w=>{p(c)&&!p(r)&&w(Ot)})}tt(Q),tt(k),Ne(k,w=>rt(n,w),()=>p(n)),zt(()=>{en(j,"title",p(s)?"Pause":"Play"),pt=St(nt,"",pt,{left:`${p(f)*100}%`})}),wt("click",j,D),wt("pointerdown",Q,u),wt("pointermove",Q,l),wt("pointerup",Q,g),ee("pointerleave",Q,_),vt(t,k),le()}Me(["click","pointerdown","pointermove","pointerup"]);var Vn=Ct('<div class="content-row svelte-315y67"><div class="graph-area svelte-315y67"><!> <!> <!></div> <!></div>');function ri(t,e){se(e,!0);const n=Ie("chat");te.showGraph();let i=mt(null);const r=q(()=>{const o=new Map;for(const h of Wt.repos)for(const a of h.entities)o.set(a.id,a.title);return o}),s=q(()=>{const o=[];for(const h of Wt.repos)for(const a of h.entities)a.id.toLowerCase().startsWith("readme")||o.push(a);return o}),c=q(()=>{const o=[],h=[],a=new Set,d=new Set,C=p(i)?.getTime()??1/0;for(const f of Wt.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 _=y.id<g?`${y.id}|${g}`:`${g}|${y.id}`;!d.has(_)&&y.id!==g&&(d.add(_),h.push({source:y.id,target:g}))}}const x=h.filter(f=>a.has(f.source)&&a.has(f.target));return{nodes:o,edges:x}});Ke(t,{children:(o,h)=>{var a=Vn(),d=ct(a),C=ct(d);Qe(C,{activeView:"graph"});var x=dt(C,2);On(x,{get graphData(){return p(c)},get selectedEntityId(){return te.selectedId},get nameMap(){return p(r)},get filteredIds(){return Wt.filteredIds},get sidebarHoveredId(){return te.hoveredEntityId},get highlightedIds(){return Je.highlightedIds}});var f=dt(x,2);Hn(f,{get entities(){return p(s)},get currentDate(){return p(i)},onDateChange:l=>{rt(i,l,!0)}}),tt(d);var y=dt(d,2);{var u=l=>{Ze(l,{})};ne(y,l=>{n.open&&l(u)})}tt(a),vt(o,a)},$$slots:{default:!0}}),le()}export{ri as component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"
|
|
1
|
+
{"version":"1773326894256"}
|
package/dist/web/index.html
CHANGED
|
@@ -7,33 +7,31 @@
|
|
|
7
7
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
8
8
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet" />
|
|
9
9
|
<link rel="stylesheet" href="/api/chrome/chrome.css">
|
|
10
|
-
<link href="/_app/immutable/entry/start.
|
|
11
|
-
<link href="/_app/immutable/chunks/
|
|
12
|
-
<link href="/_app/immutable/chunks/
|
|
13
|
-
<link href="/_app/immutable/entry/app.
|
|
10
|
+
<link href="/_app/immutable/entry/start.Bkui3Kyw.js" rel="modulepreload">
|
|
11
|
+
<link href="/_app/immutable/chunks/479TgXB4.js" rel="modulepreload">
|
|
12
|
+
<link href="/_app/immutable/chunks/DEJSHbC3.js" rel="modulepreload">
|
|
13
|
+
<link href="/_app/immutable/entry/app.BvodXQQ0.js" rel="modulepreload">
|
|
14
14
|
<link href="/_app/immutable/chunks/PPVm8Dsz.js" rel="modulepreload">
|
|
15
|
-
<link href="/_app/immutable/chunks/
|
|
16
|
-
<link href="/_app/immutable/chunks/
|
|
17
|
-
<link href="/_app/immutable/chunks/
|
|
18
|
-
<link href="/_app/immutable/chunks/
|
|
19
|
-
<link href="/_app/immutable/chunks/
|
|
20
|
-
<link href="/_app/immutable/chunks/D4CY2rxN.js" rel="modulepreload">
|
|
21
|
-
<link href="/_app/immutable/chunks/B53wS7kY.js" rel="modulepreload">
|
|
15
|
+
<link href="/_app/immutable/chunks/MbiSz-iW.js" rel="modulepreload">
|
|
16
|
+
<link href="/_app/immutable/chunks/bSAC733J.js" rel="modulepreload">
|
|
17
|
+
<link href="/_app/immutable/chunks/DvKVaE7M.js" rel="modulepreload">
|
|
18
|
+
<link href="/_app/immutable/chunks/Bopa-Ask.js" rel="modulepreload">
|
|
19
|
+
<link href="/_app/immutable/chunks/DTUXhwEY.js" rel="modulepreload">
|
|
22
20
|
|
|
23
21
|
</head>
|
|
24
22
|
<body data-sveltekit-preload-data="hover" data-sg-workspace="true">
|
|
25
23
|
<div style="display: contents">
|
|
26
24
|
<script>
|
|
27
25
|
{
|
|
28
|
-
|
|
26
|
+
__sveltekit_5pqdo4 = {
|
|
29
27
|
base: ""
|
|
30
28
|
};
|
|
31
29
|
|
|
32
30
|
const element = document.currentScript.parentElement;
|
|
33
31
|
|
|
34
32
|
Promise.all([
|
|
35
|
-
import("/_app/immutable/entry/start.
|
|
36
|
-
import("/_app/immutable/entry/app.
|
|
33
|
+
import("/_app/immutable/entry/start.Bkui3Kyw.js"),
|
|
34
|
+
import("/_app/immutable/entry/app.BvodXQQ0.js")
|
|
37
35
|
]).then(([kit, app]) => {
|
|
38
36
|
kit.start(app, element);
|
|
39
37
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "studiograph",
|
|
3
|
-
"version": "1.3.3
|
|
3
|
+
"version": "1.3.3",
|
|
4
4
|
"description": "Team-based AI agent platform with Git-backed knowledge graphs",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -56,8 +56,6 @@
|
|
|
56
56
|
"@modelcontextprotocol/sdk": "^1.26.0",
|
|
57
57
|
"@octokit/rest": "^20.0.0",
|
|
58
58
|
"ai": "^6.0.97",
|
|
59
|
-
"bcryptjs": "^3.0.3",
|
|
60
|
-
"better-sqlite3": "^12.6.2",
|
|
61
59
|
"chalk": "^5.6.2",
|
|
62
60
|
"cli-highlight": "^2.1.11",
|
|
63
61
|
"commander": "^11.1.0",
|
|
@@ -69,7 +67,6 @@
|
|
|
69
67
|
"graphology": "^0.26.0",
|
|
70
68
|
"graphology-types": "^0.24.8",
|
|
71
69
|
"gray-matter": "^4.0.3",
|
|
72
|
-
"jsonwebtoken": "^9.0.3",
|
|
73
70
|
"ora": "^9.3.0",
|
|
74
71
|
"picocolors": "^1.1.1",
|
|
75
72
|
"zod": "^3.22.4"
|
|
@@ -78,9 +75,6 @@
|
|
|
78
75
|
"playwright": "^1.58.2"
|
|
79
76
|
},
|
|
80
77
|
"devDependencies": {
|
|
81
|
-
"@types/bcryptjs": "^2.4.6",
|
|
82
|
-
"@types/better-sqlite3": "^7.6.13",
|
|
83
|
-
"@types/jsonwebtoken": "^9.0.10",
|
|
84
78
|
"@types/node": "^20.11.0",
|
|
85
79
|
"@typescript-eslint/eslint-plugin": "^6.19.0",
|
|
86
80
|
"@typescript-eslint/parser": "^6.19.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.login-page.svelte-1x05zx6{width:100vw;height:100vh;display:flex;align-items:center;justify-content:center;background:var(--color-bg)}.login-card.svelte-1x05zx6{width:100%;max-width:360px;padding:40px 32px}.logo.svelte-1x05zx6{display:flex;align-items:center;gap:12px;margin-bottom:36px;justify-content:center}.logo-icon.svelte-1x05zx6{width:32px;height:32px;border-radius:50%;background:var(--color-accent, #6e6ee8);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:14px}.logo-text.svelte-1x05zx6{font-size:18px;font-weight:600;color:var(--color-text-primary)}form.svelte-1x05zx6{display:flex;flex-direction:column;gap:20px}.field.svelte-1x05zx6{display:flex;flex-direction:column;gap:6px}.field-label.svelte-1x05zx6{font-size:13px;font-weight:500;color:var(--color-text-secondary)}.field.svelte-1x05zx6 input:where(.svelte-1x05zx6){width:100%;height:40px;padding:0 12px;border:1px solid var(--color-border);border-radius:8px;background:var(--color-bg-surface);color:var(--color-text-primary);font-size:14px;font-family:inherit;outline:none;box-sizing:border-box}.field.svelte-1x05zx6 input:where(.svelte-1x05zx6):focus{border-color:var(--color-accent, #6e6ee8);box-shadow:0 0 0 2px color-mix(in srgb,var(--color-accent, #6e6ee8) 20%,transparent)}.error-msg.svelte-1x05zx6{margin:0;font-size:13px;color:#e55;text-align:center}.submit-btn.svelte-1x05zx6{height:40px;border:none;border-radius:8px;background:var(--color-accent, #6e6ee8);color:#fff;font-size:14px;font-weight:600;font-family:inherit;cursor:pointer;margin-top:4px}.submit-btn.svelte-1x05zx6:hover:not(:disabled){background:var(--color-accent-hover, #5c5cd6)}.submit-btn.svelte-1x05zx6:disabled{opacity:.6;cursor:not-allowed}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.settings-page.svelte-1gtvb1r{width:100vw;height:100vh;display:flex;justify-content:center;background:var(--color-bg);overflow-y:auto;padding:60px 24px;box-sizing:border-box}.settings-container.svelte-1gtvb1r{width:100%;max-width:720px}.back-btn.svelte-1gtvb1r{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border:none;background:transparent;color:var(--color-text-secondary);font-size:13px;font-family:inherit;cursor:pointer;border-radius:6px;margin-bottom:20px}.back-btn.svelte-1gtvb1r:hover{color:var(--color-text-primary);background:var(--color-bg-hover)}.page-title.svelte-1gtvb1r{font-size:20px;font-weight:600;color:var(--color-text-primary);margin:0 0 24px}.add-user-form.svelte-1gtvb1r{background:var(--color-bg-surface);border:1px solid var(--color-border);border-radius:10px;padding:20px;margin-bottom:24px}.form-row.svelte-1gtvb1r{display:flex;gap:12px;align-items:flex-end}.field.svelte-1gtvb1r{display:flex;flex-direction:column;gap:6px;flex:1}.field-role.svelte-1gtvb1r{flex:0 0 110px}.field-label.svelte-1gtvb1r{font-size:12px;font-weight:500;color:var(--color-text-secondary)}.field.svelte-1gtvb1r input:where(.svelte-1gtvb1r),.field.svelte-1gtvb1r select:where(.svelte-1gtvb1r){height:36px;padding:0 10px;border:1px solid var(--color-border);border-radius:6px;background:var(--color-bg);color:var(--color-text-primary);font-size:13px;font-family:inherit;outline:none;box-sizing:border-box}.field.svelte-1gtvb1r input:where(.svelte-1gtvb1r):focus,.field.svelte-1gtvb1r select:where(.svelte-1gtvb1r):focus{border-color:var(--color-accent, #6e6ee8);box-shadow:0 0 0 2px color-mix(in srgb,var(--color-accent, #6e6ee8) 20%,transparent)}.add-btn.svelte-1gtvb1r{height:36px;padding:0 16px;border:none;border-radius:6px;background:var(--color-accent, #6e6ee8);color:#fff;font-size:13px;font-weight:500;font-family:inherit;cursor:pointer;white-space:nowrap;flex-shrink:0}.add-btn.svelte-1gtvb1r:hover:not(:disabled){background:var(--color-accent-hover, #5c5cd6)}.add-btn.svelte-1gtvb1r:disabled{opacity:.6;cursor:not-allowed}.error-msg.svelte-1gtvb1r{margin:8px 0 0;font-size:13px;color:var(--color-error, #e55)}.loading-text.svelte-1gtvb1r{font-size:13px;color:var(--color-text-secondary)}.user-table.svelte-1gtvb1r{border:1px solid var(--color-border);border-radius:10px;overflow:hidden}.table-header.svelte-1gtvb1r{display:flex;align-items:center;height:36px;padding:0 16px;background:var(--color-bg-surface);border-bottom:1px solid var(--color-border);font-size:11px;font-weight:600;color:var(--color-text-tertiary);text-transform:uppercase;letter-spacing:.05em}.table-row.svelte-1gtvb1r{display:flex;align-items:center;height:44px;padding:0 16px;border-bottom:1px solid var(--color-border);font-size:13px;color:var(--color-text-primary)}.table-row.svelte-1gtvb1r:last-child{border-bottom:none}.table-row.svelte-1gtvb1r:hover{background:var(--color-bg-hover)}.col-name.svelte-1gtvb1r{flex:1.5;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.col-email.svelte-1gtvb1r{flex:2;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--color-text-secondary)}.col-role.svelte-1gtvb1r{flex:0 0 80px}.col-date.svelte-1gtvb1r{flex:0 0 110px;color:var(--color-text-secondary);font-size:12px}.col-action.svelte-1gtvb1r{flex:0 0 40px;display:flex;justify-content:center}.role-badge.svelte-1gtvb1r{display:inline-block;padding:2px 8px;border-radius:4px;font-size:11px;font-weight:500;background:var(--color-bg-hover);color:var(--color-text-secondary)}.role-badge.admin.svelte-1gtvb1r{background:color-mix(in srgb,var(--color-accent, #6e6ee8) 15%,transparent);color:var(--color-accent, #6e6ee8)}.delete-btn.svelte-1gtvb1r{display:flex;align-items:center;justify-content:center;width:28px;height:28px;border:none;background:transparent;color:var(--color-text-tertiary);cursor:pointer;border-radius:6px;padding:0}.delete-btn.svelte-1gtvb1r:hover{color:var(--color-error, #e55);background:var(--color-bg-hover)}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.setup-page.svelte-g40i6i{width:100vw;height:100vh;display:flex;align-items:center;justify-content:center;background:var(--color-bg)}.setup-card.svelte-g40i6i{width:100%;max-width:360px;padding:40px 32px}.logo.svelte-g40i6i{display:flex;align-items:center;gap:12px;margin-bottom:12px;justify-content:center}.logo-icon.svelte-g40i6i{width:32px;height:32px;border-radius:50%;background:var(--color-accent, #6e6ee8);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:14px}.logo-text.svelte-g40i6i{font-size:18px;font-weight:600;color:var(--color-text-primary)}.subtitle.svelte-g40i6i{text-align:center;color:var(--color-text-secondary);font-size:14px;margin:0 0 28px}form.svelte-g40i6i{display:flex;flex-direction:column;gap:20px}.field.svelte-g40i6i{display:flex;flex-direction:column;gap:6px}.field-label.svelte-g40i6i{font-size:13px;font-weight:500;color:var(--color-text-secondary)}.field-hint.svelte-g40i6i{font-size:12px;color:var(--color-text-tertiary, var(--color-text-secondary));opacity:.7}.field.svelte-g40i6i input:where(.svelte-g40i6i){width:100%;height:40px;padding:0 12px;border:1px solid var(--color-border);border-radius:8px;background:var(--color-bg-surface);color:var(--color-text-primary);font-size:14px;font-family:inherit;outline:none;box-sizing:border-box}.field.svelte-g40i6i input:where(.svelte-g40i6i):focus{border-color:var(--color-accent, #6e6ee8);box-shadow:0 0 0 2px color-mix(in srgb,var(--color-accent, #6e6ee8) 20%,transparent)}.error-msg.svelte-g40i6i{margin:0;font-size:13px;color:#e55;text-align:center}.submit-btn.svelte-g40i6i{height:40px;border:none;border-radius:8px;background:var(--color-accent, #6e6ee8);color:#fff;font-size:14px;font-weight:600;font-family:inherit;cursor:pointer;margin-top:4px}.submit-btn.svelte-g40i6i:hover:not(:disabled){background:var(--color-accent-hover, #5c5cd6)}.submit-btn.svelte-g40i6i:disabled{opacity:.6;cursor:not-allowed}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.entity-dialog-backdrop.svelte-ak7t5k{position:fixed;inset:0;z-index:1000;display:flex;align-items:flex-start;justify-content:center;padding-top:80px}[data-theme=dark] .entity-dialog-backdrop.svelte-ak7t5k{background:#0009}[data-theme=light] .entity-dialog-backdrop.svelte-ak7t5k{background:#00000040}.entity-dialog.svelte-ak7t5k{width:560px;max-height:520px;display:flex;flex-direction:column;background:var(--color-bg-elevated);border:1px solid var(--color-border-strong);border-radius:12px;overflow:hidden;box-shadow:0 24px 80px #00000080}.entity-dialog-header.svelte-ak7t5k{display:flex;align-items:center;justify-content:space-between;padding:16px 14px 16px 24px;flex-shrink:0}.entity-dialog-title.svelte-ak7t5k{font-size:16px;font-weight:500;color:var(--color-text-primary)}.dialog-close.svelte-ak7t5k{width:28px;height:28px;display:flex;align-items:center;justify-content:center;border:none;background:transparent;color:var(--color-text-tertiary);font-size:18px;cursor:pointer;border-radius:6px;line-height:1}.dialog-close.svelte-ak7t5k:hover{background:var(--color-bg-hover);color:var(--color-text-primary)}.entity-dialog-body.svelte-ak7t5k{padding:16px 24px 24px;display:flex;flex-direction:column;gap:20px;overflow-y:auto}.type-section.svelte-ak7t5k{display:flex;flex-direction:column;gap:8px}.type-section-label.svelte-ak7t5k{font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:var(--color-text-tertiary)}.type-grid.svelte-ak7t5k{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.type-card.svelte-ak7t5k{display:flex;flex-direction:column;gap:10px;padding:12px;border:1px solid var(--color-border);background:transparent;color:var(--color-text-secondary);font-family:inherit;cursor:pointer;border-radius:8px;text-align:left;transition:background .12s,color .12s,border-color .12s}.type-card.svelte-ak7t5k:hover{background:var(--color-bg-hover);border-color:var(--color-border-strong)}.type-card.svelte-ak7t5k:hover .type-name:where(.svelte-ak7t5k){color:var(--color-text-primary)}.type-dot.svelte-ak7t5k{width:8px;height:8px;border-radius:50%}.type-info.svelte-ak7t5k{display:flex;flex-direction:column;gap:2px}.type-name.svelte-ak7t5k{font-size:13px;font-weight:500;color:var(--color-text-secondary)}.type-desc.svelte-ak7t5k{font-size:11px;color:var(--color-text-tertiary);line-height:1.3}.perm-backdrop.svelte-1qsmvmm{position:fixed;inset:0;z-index:1000;display:flex;align-items:flex-start;justify-content:center;padding-top:80px}[data-theme=dark] .perm-backdrop.svelte-1qsmvmm{background:#0009}[data-theme=light] .perm-backdrop.svelte-1qsmvmm{background:#00000040}.perm-modal.svelte-1qsmvmm{width:600px;max-height:calc(100vh - 120px);display:flex;flex-direction:column;background:var(--color-bg-elevated);border:1px solid var(--color-border-strong);border-radius:12px;overflow:hidden;box-shadow:0 24px 80px #00000080}.perm-header.svelte-1qsmvmm{display:flex;align-items:center;justify-content:space-between;padding:20px 24px 0}.perm-title.svelte-1qsmvmm{font-size:16px;font-weight:500;color:var(--color-text-primary)}.close-btn.svelte-1qsmvmm{display:flex;align-items:center;justify-content:center;width:28px;height:28px;border:none;background:transparent;color:var(--color-text-tertiary);cursor:pointer;border-radius:6px}.close-btn.svelte-1qsmvmm:hover{background:var(--color-bg-hover);color:var(--color-text-primary)}.tab-bar.svelte-1qsmvmm{display:flex;gap:0;padding:16px 24px 0;border-bottom:1px solid var(--color-border)}.tab-btn.svelte-1qsmvmm{font-family:inherit;font-size:13px;font-weight:500;color:var(--color-text-tertiary);background:none;border:none;border-bottom:2px solid transparent;padding:8px 14px;cursor:pointer;margin-bottom:-1px}.tab-btn.svelte-1qsmvmm:hover{color:var(--color-text-secondary)}.tab-btn.active.svelte-1qsmvmm{color:var(--color-text-primary);border-bottom-color:var(--color-accent)}.perm-body.svelte-1qsmvmm{flex:1;overflow-y:auto;padding:16px 24px 24px}.add-trigger.svelte-1qsmvmm{display:flex;align-items:center;gap:8px;width:100%;height:36px;padding:0;border:none;background:transparent;cursor:pointer;border-radius:6px;font-family:inherit;font-size:13px;color:var(--color-text-tertiary)}.add-trigger.svelte-1qsmvmm:hover{color:var(--color-text-secondary)}.add-trigger-icon.svelte-1qsmvmm{display:flex;align-items:center;justify-content:center;width:22px;height:22px;flex-shrink:0}.inline-input-row.svelte-1qsmvmm{display:flex;align-items:center;height:36px}.inline-input-row.svelte-1qsmvmm input:where(.svelte-1qsmvmm){flex:1;height:100%;padding:0 0 0 30px;border:none;background:transparent;color:var(--color-text-primary);font-size:13px;font-family:inherit;outline:none}.inline-input-row.svelte-1qsmvmm input:where(.svelte-1qsmvmm)::placeholder{color:var(--color-text-tertiary)}.inline-input-clear.svelte-1qsmvmm{display:flex;align-items:center;justify-content:center;width:20px;height:20px;border:none;background:transparent;color:var(--color-text-tertiary);cursor:pointer;border-radius:3px;flex-shrink:0;padding:0}.inline-input-clear.svelte-1qsmvmm:hover{color:var(--color-text-primary)}.status-msg.svelte-1qsmvmm{font-size:13px;color:var(--color-error, #e55);padding:0;background:none}.loading-text.svelte-1qsmvmm{font-size:13px;color:var(--color-text-tertiary);padding:20px 0;text-align:center}.avatar.svelte-1qsmvmm{width:22px;height:22px;border-radius:50%;flex-shrink:0;object-fit:cover}.avatar.placeholder.svelte-1qsmvmm{background:var(--color-bg-surface);border:1px solid var(--color-border);display:flex;align-items:center;justify-content:center;font-size:10px;font-weight:600;color:var(--color-text-secondary)}.icon-btn.svelte-1qsmvmm{display:flex;align-items:center;justify-content:center;width:24px;height:24px;border:none;background:transparent;cursor:pointer;border-radius:4px;flex-shrink:0;padding:0;margin-left:auto}.icon-btn.danger.svelte-1qsmvmm{color:var(--color-text-tertiary)}.icon-btn.danger.svelte-1qsmvmm:hover{color:var(--color-error, #e55)}.collection-list.svelte-1qsmvmm{display:flex;flex-direction:column;gap:16px}.collection-section.svelte-1qsmvmm{display:flex;flex-direction:column;gap:2px}.collection-header.svelte-1qsmvmm{display:flex;align-items:center;gap:8px;width:100%;padding:6px 0;border:none;background:transparent;cursor:pointer;border-radius:6px;font-family:inherit;text-align:left}.collection-header.svelte-1qsmvmm:hover{background:var(--color-bg-hover)}.collection-chevron.svelte-1qsmvmm{display:flex;align-items:center;justify-content:center;width:22px;height:22px;color:var(--color-text-tertiary);flex-shrink:0}.collection-text.svelte-1qsmvmm{display:flex;align-items:baseline}.collection-name.svelte-1qsmvmm{font-size:13px;font-weight:500;color:var(--color-text-primary)}.collection-count.svelte-1qsmvmm{font-size:11px;color:var(--color-text-tertiary);margin-left:8px}.access-row.svelte-1qsmvmm{display:flex;align-items:center;gap:8px;height:36px;padding:0;font-size:13px}.access-row.svelte-1qsmvmm .avatar:where(.svelte-1qsmvmm){flex-shrink:0}.icon-spacer.svelte-1qsmvmm{width:24px;flex-shrink:0;margin-left:auto}.access-text.svelte-1qsmvmm{display:flex;align-items:baseline;gap:0;min-width:0}.access-label.svelte-1qsmvmm{color:var(--color-text-primary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.access-label.team-label.svelte-1qsmvmm{color:var(--color-text-secondary)}.perm-badge.svelte-1qsmvmm{font-size:11px;color:var(--color-text-tertiary);flex-shrink:0;text-transform:capitalize;margin-left:8px}.perm-badge.pending.svelte-1qsmvmm{color:var(--color-accent)}.inline-status.svelte-1qsmvmm{margin:0;padding:0 0 0 30px;height:36px;display:flex;align-items:center}.confirm-row.svelte-1qsmvmm{background:#e5555514;border-radius:6px;padding:0 10px}.confirm-text.svelte-1qsmvmm{flex:1;font-size:13px;color:var(--color-text-primary)}.confirm-btn.svelte-1qsmvmm{font-family:inherit;font-size:12px;font-weight:500;padding:4px 10px;border-radius:4px;border:none;cursor:pointer;flex-shrink:0}.confirm-btn.svelte-1qsmvmm:disabled{opacity:.5;cursor:not-allowed}.confirm-btn.cancel.svelte-1qsmvmm{color:var(--color-text-secondary);background:transparent}.confirm-btn.cancel.svelte-1qsmvmm:hover{color:var(--color-text-primary)}.confirm-btn.revoke.svelte-1qsmvmm{color:#fff;background:var(--color-error, #e55)}.confirm-btn.revoke.svelte-1qsmvmm:hover:not(:disabled){background:color-mix(in srgb,var(--color-error, #e55) 85%,black)}.sidebar.svelte-6dohdz{width:340px;min-width:340px;display:flex;flex-direction:column;overflow:hidden;background:var(--color-bg);border-right:1px solid var(--color-border)}.sidebar-header.svelte-6dohdz{height:40px;display:flex;align-items:center;gap:11px;padding:0 12px 0 19px;border-bottom:1px solid var(--color-border);flex-shrink:0}.settings-btn.svelte-6dohdz{display:flex;align-items:center;justify-content:center;width:28px;height:28px;border:none;background:transparent;color:var(--color-text-tertiary);cursor:pointer;border-radius:6px;margin-left:auto;padding:0}.settings-btn.svelte-6dohdz:hover{color:var(--color-text-secondary);background:var(--color-bg-hover)}.home-btn.svelte-6dohdz{display:flex;align-items:center;gap:11px;border:none;background:transparent;padding:0;cursor:pointer;min-width:0;flex:1;text-align:left}.home-btn.svelte-6dohdz:hover .workspace-icon:where(.svelte-6dohdz){opacity:.8}.home-btn.svelte-6dohdz:hover .workspace-name:where(.svelte-6dohdz){color:var(--color-text-secondary)}.workspace-icon.svelte-6dohdz{width:22px;height:22px;border-radius:50%;background:var(--color-accent, #6e6ee8);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:600;font-size:10px;flex-shrink:0}.workspace-name.svelte-6dohdz{flex:1;font-size:13px;font-weight:600;color:var(--color-text-primary)}.filter-bar.svelte-6dohdz{position:relative;display:flex;align-items:center;height:40px;padding:0 12px 0 52px;border-bottom:1px solid var(--color-border);flex-shrink:0}.filter-icon.svelte-6dohdz{position:absolute;left:22px;top:50%;transform:translateY(-50%);display:flex;align-items:center;justify-content:center;width:16px;color:var(--color-text-tertiary)}.filter-input.svelte-6dohdz{flex:1;background:transparent;border:none;outline:none;padding:0;margin:0;font-size:13px;line-height:1.4;font-family:inherit;color:var(--color-text-primary)}.filter-input.svelte-6dohdz::placeholder{color:var(--color-text-tertiary)}.filter-clear.svelte-6dohdz{display:flex;align-items:center;justify-content:center;width:20px;height:20px;border:none;background:transparent;border-radius:3px;cursor:pointer;color:var(--color-text-tertiary);flex-shrink:0;padding:0}.filter-clear.svelte-6dohdz:hover{color:var(--color-text-primary)}.sort-toggle.svelte-6dohdz{display:flex;align-items:center;justify-content:center;width:28px;height:28px;border:none;background:transparent;border-radius:6px;cursor:pointer;color:var(--color-text-tertiary);flex-shrink:0;padding:0;margin-right:0;margin-left:4px}.sort-toggle.svelte-6dohdz:hover{color:var(--color-text-secondary);background:var(--color-bg-hover)}.sort-toggle.active.svelte-6dohdz{color:var(--color-accent, #6e6ee8)}.repo-type-icon.svelte-6dohdz{display:inline-flex;align-items:center;color:var(--color-text-tertiary);margin-right:6px;flex-shrink:0;align-self:center}.tree.svelte-6dohdz{flex:1;overflow-y:auto;padding-top:0}.tree-group.svelte-6dohdz{display:flex;flex-direction:column}.tree-group.svelte-6dohdz+.tree-group:where(.svelte-6dohdz){margin-top:0}.repo-row.svelte-6dohdz{display:flex;align-items:baseline;height:32px;line-height:32px;width:100%;padding:0 12px 0 20px;border:none;background:transparent;cursor:pointer;font-family:inherit;text-align:left;border-left:2px solid transparent}.repo-row.svelte-6dohdz:hover,.repo-row.focused.svelte-6dohdz{background:var(--color-bg-hover)}.repo-row.repo-active.svelte-6dohdz{border-left-color:var(--active-color)}.repo-name.svelte-6dohdz{font-size:13px;color:var(--color-text-secondary)}.repo-row.repo-active.svelte-6dohdz .repo-name:where(.svelte-6dohdz),.repo-row.repo-active.svelte-6dohdz .repo-type-icon:where(.svelte-6dohdz){font-weight:600;color:var(--color-text-primary)}.tree-row.svelte-6dohdz{display:flex;align-items:baseline;height:32px;line-height:32px;padding-right:40px;color:var(--color-text-secondary);font-size:13px;cursor:pointer;border:none;background:transparent;font-family:inherit;text-align:left;width:100%;border-left:2px solid transparent}.tree-row.svelte-6dohdz:hover,.tree-row.focused.svelte-6dohdz{background:var(--color-bg-hover)}.tree-row.selected.svelte-6dohdz{background:var(--color-bg-selected);border-left-color:var(--active-color);color:var(--color-text-primary);font-weight:600}.row-chevron.svelte-6dohdz{display:inline-flex;align-items:center;justify-content:center;width:16px;height:32px;flex-shrink:0;margin-right:14px;color:var(--color-text-tertiary);align-self:center}.row-label.svelte-6dohdz{flex:1;overflow:hidden;white-space:nowrap;mask-image:linear-gradient(to right,black calc(100% - 16px),transparent 100%);-webkit-mask-image:linear-gradient(to right,black calc(100% - 16px),transparent 100%)}.item-count.svelte-6dohdz{font-size:11px;color:var(--color-text-tertiary);margin-left:8px;flex-shrink:0}.dirty-dot.svelte-6dohdz{width:6px;height:6px;border-radius:3px;flex-shrink:0;margin-left:auto;display:none;align-self:center;background:var(--color-text-tertiary)}.tree-row.dirty.svelte-6dohdz .dirty-dot:where(.svelte-6dohdz){display:block}.repo-dirty-dot.svelte-6dohdz{width:20px;height:20px;flex-shrink:0;margin-left:auto;margin-right:4px;align-self:center;display:flex;align-items:center;justify-content:center;background:transparent}.repo-dirty-dot.svelte-6dohdz:after{content:"";width:6px;height:6px;border-radius:3px;background:var(--color-text-tertiary)}.repo-row.svelte-6dohdz:hover .repo-dirty-dot:where(.svelte-6dohdz){display:none}.indent-group.svelte-6dohdz{position:relative}.indent-group.svelte-6dohdz:before{content:"";position:absolute;left:var(--guide-left);top:0;bottom:0;width:1px;background:var(--color-border);pointer-events:none}.loading-row.svelte-6dohdz{height:32px;display:flex;align-items:center;font-size:13px;color:var(--color-text-tertiary)}.type-header-row.svelte-6dohdz{color:var(--color-text-secondary);border-left:2px solid transparent}.type-header-row.type-active.svelte-6dohdz{color:var(--color-text-primary);font-weight:600}.type-header-row.svelte-6dohdz .row-label:where(.svelte-6dohdz){flex:none;mask-image:none;-webkit-mask-image:none}.new-entity-row.svelte-6dohdz{color:var(--color-text-tertiary);align-items:center}.new-entity-row.svelte-6dohdz:hover{color:var(--color-text-secondary)}.entity-row-wrapper.svelte-6dohdz{position:relative;display:flex;align-items:center}.entity-row-wrapper.svelte-6dohdz .tree-row:where(.svelte-6dohdz){flex:1;min-width:0}.entity-delete-btn.svelte-6dohdz{display:none;align-items:center;justify-content:center;width:20px;height:20px;border:none;background:transparent;color:var(--color-text-tertiary);cursor:pointer;border-radius:3px;position:absolute;right:16px;flex-shrink:0;padding:0}.entity-delete-btn.svelte-6dohdz:hover{color:var(--color-error, #e55)}.entity-row-wrapper.svelte-6dohdz:hover .tree-row:where(.svelte-6dohdz){background:var(--color-bg-hover)}.entity-row-wrapper.svelte-6dohdz:hover .entity-delete-btn:where(.svelte-6dohdz){display:flex}.entity-row-wrapper.svelte-6dohdz:hover .dirty-dot:where(.svelte-6dohdz){display:none!important}.entity-type-dot.svelte-6dohdz{width:6px;height:6px;border-radius:50%;flex-shrink:0;margin-right:19px;align-self:center}.recent-time.svelte-6dohdz{font-size:11px;color:var(--color-text-tertiary);position:absolute;right:26px;top:50%;transform:translate(50%,-50%);white-space:nowrap}.entity-row-wrapper.svelte-6dohdz:hover .recent-time:where(.svelte-6dohdz){display:none}.filter-match.svelte-6dohdz{background:color-mix(in srgb,var(--color-accent, #6e6ee8) 25%,transparent);color:inherit;border-radius:2px;padding:0}.no-results.svelte-6dohdz{padding:24px 16px;font-size:13px;color:var(--color-text-tertiary);text-align:center}.repo-rename-input.svelte-6dohdz{flex:1;min-width:0;height:100%;padding:0 6px;margin:0;border:1px solid var(--color-accent, #6e6ee8);border-radius:3px;background:var(--color-bg-primary);color:var(--color-text-primary);font-size:13px;font-weight:600;font-family:inherit;outline:none;box-sizing:border-box}.repo-row-wrapper.svelte-6dohdz{position:relative;display:flex;align-items:center}.repo-row-wrapper.svelte-6dohdz .repo-row:where(.svelte-6dohdz){flex:1;min-width:0}.repo-delete-btn.svelte-6dohdz{display:none;align-items:center;justify-content:center;width:20px;height:20px;border:none;background:transparent;color:var(--color-text-tertiary);cursor:pointer;border-radius:3px;position:absolute;right:16px;flex-shrink:0;padding:0}.repo-delete-btn.svelte-6dohdz:hover{color:var(--color-error, #e55)}.repo-row-wrapper.svelte-6dohdz:hover .repo-row:where(.svelte-6dohdz){background:var(--color-bg-hover)}.repo-row-wrapper.svelte-6dohdz:hover .repo-delete-btn:where(.svelte-6dohdz){display:flex}.new-collection-btn.svelte-6dohdz,.new-collection-btn.svelte-6dohdz .repo-name:where(.svelte-6dohdz){color:var(--color-text-tertiary)}.new-collection-btn.svelte-6dohdz .row-chevron:where(.svelte-6dohdz){color:var(--color-text-tertiary)}.new-collection-btn.svelte-6dohdz:hover,.new-collection-btn.svelte-6dohdz:hover .repo-name:where(.svelte-6dohdz){color:var(--color-text-secondary)}.new-collection-row.svelte-6dohdz{display:flex;align-items:center;height:32px;padding:0 12px 0 20px;border-left:2px solid transparent}.new-collection-row.svelte-6dohdz input:where(.svelte-6dohdz){flex:1;height:100%;padding:0 0 0 30px;border:none;background:transparent;color:var(--color-text-primary);font-size:13px;font-family:inherit;outline:none}.new-collection-clear.svelte-6dohdz{display:flex;align-items:center;justify-content:center;width:20px;height:20px;border:none;background:transparent;color:var(--color-text-tertiary);cursor:pointer;border-radius:3px;flex-shrink:0;padding:0;margin-right:4px}.new-collection-clear.svelte-6dohdz:hover{color:var(--color-text-primary)}.private-toggle.svelte-6dohdz{display:flex;align-items:center;justify-content:center;width:20px;height:20px;border:none;background:transparent;color:var(--color-text-secondary);cursor:pointer;border-radius:3px;margin-left:auto;margin-right:4px;flex-shrink:0;padding:0}.private-toggle.svelte-6dohdz:hover{color:var(--color-text-primary)}.private-toggle.active.svelte-6dohdz{color:var(--color-accent, #6e6ee8)}@keyframes svelte-6dohdz-shake{0%,to{transform:translate(0)}20%{transform:translate(-4px)}40%{transform:translate(4px)}60%{transform:translate(-3px)}80%{transform:translate(2px)}}.new-collection-row.svelte-6dohdz input:where(.svelte-6dohdz).shake{animation:svelte-6dohdz-shake .3s ease-in-out}.sidebar-footer.svelte-6dohdz{display:flex;align-items:center;height:40px;padding:0 12px 0 19px;border-top:1px solid var(--color-border);flex-shrink:0;gap:8px}.user-email.svelte-6dohdz{flex:1;font-size:12px;color:var(--color-text-tertiary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.footer-icon-btn.svelte-6dohdz{display:flex;align-items:center;justify-content:center;width:28px;height:28px;border:none;background:transparent;color:var(--color-text-tertiary);cursor:pointer;border-radius:6px;padding:0}.footer-icon-btn.svelte-6dohdz:hover{color:var(--color-text-secondary);background:var(--color-bg-hover)}.search-backdrop.svelte-1xems06{position:fixed;inset:0;z-index:1000;display:flex;align-items:flex-start;justify-content:center;padding-top:80px}[data-theme=dark] .search-backdrop.svelte-1xems06{background:#0009}[data-theme=light] .search-backdrop.svelte-1xems06{background:#00000040}.search-modal.svelte-1xems06{width:680px;max-height:560px;display:flex;flex-direction:column;background:var(--color-bg-elevated);border:1px solid var(--color-border-strong);border-radius:12px;overflow:hidden;box-shadow:0 24px 48px #0006}.search-header.svelte-1xems06{display:flex;align-items:center;height:52px;padding:0 16px;gap:10px;border-bottom:1px solid var(--color-border)}.search-header.svelte-1xems06 svg{color:var(--color-text-tertiary);flex-shrink:0}.search-input.svelte-1xems06{flex:1;font-size:15px;color:var(--color-text-primary);line-height:20px;background:transparent;border:none;outline:none;font-family:inherit}.search-input.svelte-1xems06::placeholder{color:var(--color-text-tertiary)}.esc-badge.svelte-1xems06{font-family:var(--font-sans);font-size:11px;line-height:1;padding:3px 6px;border-radius:4px;background:var(--color-bg-surface);border:1px solid var(--color-border);color:var(--color-text-tertiary)}.results-list.svelte-1xems06{flex:1;overflow-y:auto;min-height:0}.empty-results.svelte-1xems06{padding:24px 16px;text-align:center;font-size:13px;color:var(--color-text-tertiary)}.result-row.svelte-1xems06{display:flex;align-items:flex-start;padding:10px 16px;cursor:pointer;border:none;background:transparent;width:100%;text-align:left;font-family:inherit}.result-row.svelte-1xems06:hover,.result-row.selected.svelte-1xems06{background:var(--color-bg-hover)}.result-body.svelte-1xems06{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.result-title-row.svelte-1xems06{display:flex;align-items:center;gap:8px}.result-title.svelte-1xems06{font-size:13px;font-weight:500;color:var(--color-text-primary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.entity-tag.svelte-1xems06{flex-shrink:0;font-size:10px;font-weight:500;letter-spacing:.04em;text-transform:uppercase;padding:1px 6px;border-radius:3px;background:var(--color-badge-bg);color:var(--color-badge-text)}.result-meta.svelte-1xems06{font-size:12px;color:var(--color-text-tertiary)}.search-footer.svelte-1xems06{display:flex;align-items:center;height:39px;padding:0 16px;gap:16px;border-top:1px solid var(--color-border)}.shortcut-group.svelte-1xems06{display:flex;align-items:center;gap:4px}.shortcut-key.svelte-1xems06{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 4px;border-radius:4px;background:var(--color-bg-surface);border:1px solid var(--color-border);color:var(--color-text-tertiary)}.shortcut-label.svelte-1xems06{font-size:11px;color:var(--color-text-tertiary);margin-left:2px}.app-frame.svelte-vr1z90{width:100vw;height:100vh;display:flex;flex-direction:column;overflow:hidden;background:var(--color-bg)}.app-body.svelte-vr1z90{flex:1;display:flex;min-height:0;overflow:hidden}.main-content.svelte-vr1z90{flex:1;display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden}#sg-chrome-footer{flex-shrink:0}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.confirm-backdrop.svelte-193t4hn{position:fixed;inset:0;z-index:1000;display:flex;align-items:flex-start;justify-content:center;padding-top:140px}[data-theme=dark] .confirm-backdrop.svelte-193t4hn{background:#0009}[data-theme=light] .confirm-backdrop.svelte-193t4hn{background:#00000040}.confirm-modal.svelte-193t4hn{width:420px;display:flex;flex-direction:column;background:var(--color-bg-elevated);border:1px solid var(--color-border-strong);border-radius:12px;overflow:hidden;box-shadow:0 24px 80px #00000080}.confirm-header.svelte-193t4hn{padding:20px 24px 0}.confirm-title.svelte-193t4hn{font-size:16px;font-weight:500;color:var(--color-text-primary)}.confirm-body.svelte-193t4hn{padding:12px 24px 20px}.confirm-message.svelte-193t4hn{font-size:13px;color:var(--color-text-secondary);line-height:1.5}.confirm-footer.svelte-193t4hn{display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:16px 24px;border-top:1px solid var(--color-border)}.footer-btn.svelte-193t4hn{font-family:inherit;font-size:13px;font-weight:500;padding:6px 12px;border-radius:6px;border:none;cursor:pointer}.footer-btn.ghost.svelte-193t4hn{color:var(--color-text-secondary);background:none}.footer-btn.ghost.svelte-193t4hn:hover{color:var(--color-text-primary);background:var(--color-bg-hover)}.footer-btn.accent.svelte-193t4hn{color:#fff;background:var(--color-accent)}.footer-btn.accent.svelte-193t4hn:hover{background:var(--color-accent-hover)}.footer-btn.destructive.svelte-193t4hn{color:#fff;background:var(--color-error, #e55)}.footer-btn.destructive.svelte-193t4hn:hover{background:color-mix(in srgb,var(--color-error, #e55) 85%,black)}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{w as l,x as o,y as u,i as n,z as d,o as m,h as p,e as _,A as v,B as k}from"./D3JV20PL.js";class w{anchor;#t=new Map;#s=new Map;#e=new Map;#i=new Set;#a=!0;constructor(t,s=!0){this.anchor=t,this.#a=s}#f=t=>{if(this.#t.has(t)){var s=this.#t.get(t),e=this.#s.get(s);if(e)l(e),this.#i.delete(s);else{var a=this.#e.get(s);a&&(this.#s.set(s,a.effect),this.#e.delete(s),a.fragment.lastChild.remove(),this.anchor.before(a.fragment),e=a.effect)}for(const[i,f]of this.#t){if(this.#t.delete(i),i===t)break;const r=this.#e.get(f);r&&(o(r.effect),this.#e.delete(f))}for(const[i,f]of this.#s){if(i===s||this.#i.has(i))continue;const r=()=>{if(Array.from(this.#t.values()).includes(i)){var c=document.createDocumentFragment();v(f,c),c.append(n()),this.#e.set(i,{effect:f,fragment:c})}else o(f);this.#i.delete(i),this.#s.delete(i)};this.#a||!e?(this.#i.add(i),u(f,r,!1)):r()}}};#r=t=>{this.#t.delete(t);const s=Array.from(this.#t.values());for(const[e,a]of this.#e)s.includes(e)||(o(a.effect),this.#e.delete(e))};ensure(t,s){var e=m,a=k();if(s&&!this.#s.has(t)&&!this.#e.has(t))if(a){var i=document.createDocumentFragment(),f=n();i.append(f),this.#e.set(t,{effect:d(()=>s(f)),fragment:i})}else this.#s.set(t,d(()=>s(this.anchor)));if(this.#t.set(e,t),a){for(const[r,h]of this.#s)r===t?e.unskip_effect(h):e.skip_effect(h);for(const[r,h]of this.#e)r===t?e.unskip_effect(h.effect):e.skip_effect(h.effect);e.oncommit(this.#f),e.ondiscard(this.#r)}else p&&(this.anchor=_),this.#f(e)}}export{w as B};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Y as h,Z as L,_ as m,K as v,G as T,O as Y,a0 as B,a1 as S,a2 as j,a3 as M,a4 as N,u as U,a5 as G,a6 as Z,a7 as $,a8 as q,a9 as z,aa as I,ab as R,ac as p,S as D,ad as E,ae as C}from"./D3JV20PL.js";let _=!1;function F(e){var r=_;try{return _=!1,[e(),_]}finally{_=r}}const H={get(e,r){if(!e.exclude.includes(r))return e.props[r]},set(e,r){return!1},getOwnPropertyDescriptor(e,r){if(!e.exclude.includes(r)&&r in e.props)return{enumerable:!0,configurable:!0,value:e.props[r]}},has(e,r){return e.exclude.includes(r)?!1:r in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(r=>!e.exclude.includes(r))}};function X(e,r,i){return new Proxy({props:e,exclude:r},H)}const J={get(e,r){if(!e.exclude.includes(r))return v(e.version),r in e.special?e.special[r]():e.props[r]},set(e,r,i){if(!(r in e.special)){var n=S;try{R(e.parent_effect),e.special[r]=V({get[r](){return e.props[r]}},r,m)}finally{R(n)}}return e.special[r](i),I(e.version),!0},getOwnPropertyDescriptor(e,r){if(!e.exclude.includes(r)&&r in e.props)return{enumerable:!0,configurable:!0,value:e.props[r]}},deleteProperty(e,r){return e.exclude.includes(r)||(e.exclude.push(r),I(e.version)),!0},has(e,r){return e.exclude.includes(r)?!1:r in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(r=>!e.exclude.includes(r))}};function k(e,r){return new Proxy({props:e,exclude:r,special:{},version:M(0),parent_effect:S},J)}const Q={get(e,r){let i=e.props.length;for(;i--;){let n=e.props[i];if(p(n)&&(n=n()),typeof n=="object"&&n!==null&&r in n)return n[r]}},set(e,r,i){let n=e.props.length;for(;n--;){let s=e.props[n];p(s)&&(s=s());const t=h(s,r);if(t&&t.set)return t.set(i),!0}return!1},getOwnPropertyDescriptor(e,r){let i=e.props.length;for(;i--;){let n=e.props[i];if(p(n)&&(n=n()),typeof n=="object"&&n!==null&&r in n){const s=h(n,r);return s&&!s.configurable&&(s.configurable=!0),s}}},has(e,r){if(r===D||r===E)return!1;for(let i of e.props)if(p(i)&&(i=i()),i!=null&&r in i)return!0;return!1},ownKeys(e){const r=[];for(let i of e.props)if(p(i)&&(i=i()),!!i){for(const n in i)r.includes(n)||r.push(n);for(const n of Object.getOwnPropertySymbols(i))r.includes(n)||r.push(n)}return r}};function ee(...e){return new Proxy({props:e},Q)}function V(e,r,i,n){var s=!G||(i&Z)!==0,t=(i&N)!==0,A=(i&C)!==0,f=n,P=!0,w=()=>(P&&(P=!1,f=A?U(n):n),f),l;if(t){var g=D in e||E in e;l=h(e,r)?.set??(g&&r in e?u=>e[r]=u:void 0)}var o,x=!1;t?[o,x]=F(()=>e[r]):o=e[r],o===void 0&&n!==void 0&&(o=w(),l&&(s&&L(),l(o)));var a;if(s?a=()=>{var u=e[r];return u===void 0?w():(P=!0,u)}:a=()=>{var u=e[r];return u!==void 0&&(f=void 0),u===void 0?f:u},s&&(i&m)===0)return a;if(l){var y=e.$$legacy;return(function(u,d){return arguments.length>0?((!s||!d||y||x)&&l(d?a():u),u):a()})}var b=!1,c=((i&$)!==0?q:z)(()=>(b=!1,a()));t&&v(c);var K=S;return(function(u,d){if(arguments.length>0){const O=d?v(c):s&&t?T(u):u;return Y(c,O),b=!0,f!==void 0&&(f=O),u}return B&&b||(K.f&j)!==0?c.v:v(c)})}export{k as l,V as p,X as r,ee as s};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{an as Q,K as P,g as X,u as Z,ao as C,q as R,a3 as W,e as u,h as p,a1 as y,ap as H,b as ee,a as te,v as se,aq as M,z as c,i as J,ar as F,y as S,A as re,as as B,at as ie,au as L,av as ne,aw as ae,ab as q,ax as z,ay as V,az as he,aA as fe,af as K,aB as oe,x,c as D,V as de,s as _e,aC as b,E as le,k as ce,aD as ue,aE as pe,aF as O,m as ge,C as G,H as ve,l as ye,aG as I,d as E,aH as me,aI as be,aJ as Ee,aK as Te,D as Re,aL as De,aM as we,N as Ae}from"./D3JV20PL.js";import{g as Ne,r as $,h as j,i as Fe,j as Se}from"./DhDqSWbJ.js";function xe(i){let e=0,t=W(0),r;return()=>{Q()&&(P(t),X(()=>(e===0&&(r=Z(()=>i(()=>C(t)))),e+=1,()=>{R(()=>{e-=1,e===0&&(r?.(),r=void 0,C(t))})})))}}var Oe=le|ce;function Ie(i,e,t,r){new Ye(i,e,t,r)}class Ye{parent;is_pending=!1;transform_error;#t;#g=p?u:null;#i;#o;#e;#n=null;#s=null;#r=null;#a=null;#d=0;#f=0;#_=!1;#l=new Set;#c=new Set;#h=null;#m=xe(()=>(this.#h=W(this.#d),()=>{this.#h=null}));constructor(e,t,r,f){this.#t=e,this.#i=t,this.#o=s=>{var n=y;n.b=this,n.f|=H,r(s)},this.parent=y.b,this.transform_error=f??this.parent?.transform_error??(s=>s),this.#e=ee(()=>{if(p){const s=this.#g;te();const n=s.data===se;if(s.data.startsWith(M)){const a=JSON.parse(s.data.slice(M.length));this.#E(a)}else n?this.#T():this.#b()}else this.#v()},Oe),p&&(this.#t=u)}#b(){try{this.#n=c(()=>this.#o(this.#t))}catch(e){this.error(e)}}#E(e){const t=this.#i.failed;t&&(this.#r=c(()=>{t(this.#t,()=>e,()=>()=>{})}))}#T(){const e=this.#i.pending;e&&(this.is_pending=!0,this.#s=c(()=>e(this.#t)),R(()=>{var t=this.#a=document.createDocumentFragment(),r=J();t.append(r),this.#n=this.#p(()=>(F.ensure(),c(()=>this.#o(r)))),this.#f===0&&(this.#t.before(t),this.#a=null,S(this.#s,()=>{this.#s=null}),this.#u())}))}#v(){try{if(this.is_pending=this.has_pending_snippet(),this.#f=0,this.#d=0,this.#n=c(()=>{this.#o(this.#t)}),this.#f>0){var e=this.#a=document.createDocumentFragment();re(this.#n,e);const t=this.#i.pending;this.#s=c(()=>t(this.#t))}else this.#u()}catch(t){this.error(t)}}#u(){this.is_pending=!1;for(const e of this.#l)B(e,ie),L(e);for(const e of this.#c)B(e,ne),L(e);this.#l.clear(),this.#c.clear()}defer_effect(e){ae(e,this.#l,this.#c)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#i.pending}#p(e){var t=y,r=fe,f=K;q(this.#e),z(this.#e),V(this.#e.ctx);try{return e()}catch(s){return he(s),null}finally{q(t),z(r),V(f)}}#y(e){if(!this.has_pending_snippet()){this.parent&&this.parent.#y(e);return}this.#f+=e,this.#f===0&&(this.#u(),this.#s&&S(this.#s,()=>{this.#s=null}),this.#a&&(this.#t.before(this.#a),this.#a=null))}update_pending_count(e){this.#y(e),this.#d+=e,!(!this.#h||this.#_)&&(this.#_=!0,R(()=>{this.#_=!1,this.#h&&oe(this.#h,this.#d)}))}get_effect_pending(){return this.#m(),P(this.#h)}error(e){var t=this.#i.onerror;let r=this.#i.failed;if(!t&&!r)throw e;this.#n&&(x(this.#n),this.#n=null),this.#s&&(x(this.#s),this.#s=null),this.#r&&(x(this.#r),this.#r=null),p&&(D(this.#g),de(),D(_e()));var f=!1,s=!1;const n=()=>{if(f){pe();return}f=!0,s&&ue(),this.#r!==null&&S(this.#r,()=>{this.#r=null}),this.#p(()=>{F.ensure(),this.#v()})},l=a=>{try{s=!0,t?.(a,n),s=!1}catch(h){b(h,this.#e&&this.#e.parent)}r&&(this.#r=this.#p(()=>{F.ensure();try{return c(()=>{var h=y;h.b=this,h.f|=H,r(this.#t,()=>a,()=>n)})}catch(h){return b(h,this.#e.parent),null}}))};R(()=>{var a;try{a=this.transform_error(e)}catch(h){b(h,this.#e&&this.#e.parent);return}a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(l,h=>b(h,this.#e&&this.#e.parent)):l(a)})}}function Me(i,e){var t=e==null?"":typeof e=="object"?`${e}`:e;t!==(i.__t??=i.nodeValue)&&(i.__t=t,i.nodeValue=`${t}`)}function ke(i,e){return U(i,e)}function Be(i,e){O(),e.intro=e.intro??!1;const t=e.target,r=p,f=u;try{for(var s=ge(t);s&&(s.nodeType!==G||s.data!==ve);)s=ye(s);if(!s)throw I;E(!0),D(s);const n=U(i,{...e,anchor:s});return E(!1),n}catch(n){if(n instanceof Error&&n.message.split(`
|
|
2
|
-
`).some(l=>l.startsWith("https://svelte.dev/e/")))throw n;return n!==I&&console.warn("Failed to hydrate: ",n),e.recover===!1&&me(),O(),be(t),E(!1),ke(i,e)}finally{E(r),D(f)}}const T=new Map;function U(i,{target:e,anchor:t,props:r={},events:f,context:s,intro:n=!0,transformError:l}){O();var a=void 0,h=Ee(()=>{var m=t??e.appendChild(J());Ie(m,{pending:()=>{}},o=>{Re({});var d=K;if(s&&(d.c=s),f&&(r.$$events=f),p&&Se(o,null),a=i(o,r)||{},p&&(y.nodes.end=u,u===null||u.nodeType!==G||u.data!==De))throw we(),I;Ae()},l);var w=new Set,A=o=>{for(var d=0;d<o.length;d++){var _=o[d];if(!w.has(_)){w.add(_);var v=Fe(_);for(const N of[e,document]){var g=T.get(N);g===void 0&&(g=new Map,T.set(N,g));var k=g.get(_);k===void 0?(N.addEventListener(_,j,{passive:v}),g.set(_,1)):g.set(_,k+1)}}}};return A(Te(Ne)),$.add(A),()=>{for(var o of w)for(const v of[e,document]){var d=T.get(v),_=d.get(o);--_==0?(v.removeEventListener(o,j),d.delete(o),d.size===0&&T.delete(v)):d.set(o,_)}$.delete(A),m!==t&&m.parentNode?.removeChild(m)}});return Y.set(a,h),a}let Y=new WeakMap;function Le(i,e){const t=Y.get(i);return t?(Y.delete(i),t(e)):Promise.resolve()}export{xe as c,Be as h,ke as m,Me as s,Le as u};
|