@reddb-io/ui 0.3.1 → 0.3.2
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/build/_app/immutable/assets/0.BWZTMKZW.css +1 -0
- package/build/_app/immutable/chunks/{8zg2gJwV.js → B-yl15ta.js} +1 -1
- package/build/_app/immutable/chunks/{CJFJ501n.js → Bgb6fHGb.js} +1 -1
- package/build/_app/immutable/chunks/C-kqMbRi.js +1 -0
- package/build/_app/immutable/chunks/{CLBx21Hz.js → C3SGj6Qd.js} +2 -2
- package/build/_app/immutable/chunks/{DV9PDoM3.js → C7kf23SQ.js} +1 -1
- package/build/_app/immutable/chunks/CHvQYbpl.js +1 -0
- package/build/_app/immutable/chunks/CO7K4bD2.js +1164 -0
- package/build/_app/immutable/chunks/CP65IkJc.js +1 -0
- package/build/_app/immutable/chunks/CxnvJShw.js +404 -0
- package/build/_app/immutable/chunks/D02PB2u7.js +1 -0
- package/build/_app/immutable/chunks/{Bq4DTWK2.js → DN7v3Tar.js} +1 -1
- package/build/_app/immutable/entry/{app.BDog2y0J.js → app.BeX4Tmu5.js} +2 -2
- package/build/_app/immutable/entry/start.D7y1MZex.js +1 -0
- package/build/_app/immutable/nodes/0.C0e5KQVb.js +2 -0
- package/build/_app/immutable/nodes/1.ceiVuZbB.js +1 -0
- package/build/_app/immutable/nodes/{10.D_FCLs0Z.js → 10.DeFqKRR2.js} +2 -2
- package/build/_app/immutable/nodes/{12.DPE6v6Zf.js → 12.CzMvqoYS.js} +2 -2
- package/build/_app/immutable/nodes/{15.CcJlZGxa.js → 15.CRDBqbiH.js} +1 -1
- package/build/_app/version.json +1 -1
- package/build/index.html +13 -13
- package/dist/embed/{AnalyticsView-D8z1Nsed.js → AnalyticsView-SKyGxeAx.js} +849 -849
- package/dist/embed/{AnalyticsView-D8z1Nsed.js.map → AnalyticsView-SKyGxeAx.js.map} +1 -1
- package/dist/embed/{RedUiEmbedRoot-CtqTd_FG.js → RedUiEmbedRoot-BzVzGAFK.js} +13945 -13287
- package/dist/embed/RedUiEmbedRoot-BzVzGAFK.js.map +1 -0
- package/dist/embed/event-BvRbkLjD.js +46 -0
- package/dist/embed/event-BvRbkLjD.js.map +1 -0
- package/dist/embed/index-BVxMkfHe.js +8 -0
- package/dist/embed/index-BVxMkfHe.js.map +1 -0
- package/dist/embed/index-BY6fc1oQ.js +856 -0
- package/dist/embed/index-BY6fc1oQ.js.map +1 -0
- package/dist/embed/{index-client-BeiP-va5.js → index-client-BHUUkI8H.js} +121 -120
- package/dist/embed/{index-client-BeiP-va5.js.map → index-client-BHUUkI8H.js.map} +1 -1
- package/dist/embed/index.js +1 -1
- package/dist/embed/{sigma.esm-qqKBpvin.js → sigma.esm-BawyGZ3s.js} +2 -2
- package/dist/embed/{sigma.esm-qqKBpvin.js.map → sigma.esm-BawyGZ3s.js.map} +1 -1
- package/dist/embed/window-ZR8_mM8o.js +1889 -0
- package/dist/embed/window-ZR8_mM8o.js.map +1 -0
- package/package.json +5 -3
- package/src/lib/ConnectDropdown.svelte +60 -3
- package/src/lib/DevConsole.svelte +155 -0
- package/src/lib/ErrorBoundary.fixture.svelte +11 -0
- package/src/lib/ErrorBoundary.fixtures.svelte.ts +5 -0
- package/src/lib/ErrorBoundary.svelte +78 -0
- package/src/lib/ErrorBoundaryCrashChild.fixture.svelte +9 -0
- package/src/lib/LoadingOverlay.svelte +109 -0
- package/src/lib/StatusBar.svelte +19 -1
- package/src/lib/Workspace.svelte +118 -2
- package/src/lib/connections.svelte.ts +95 -1
- package/src/lib/embed/RedUiEmbedRoot.svelte +13 -8
- package/src/lib/embed/index.ts +34 -1
- package/src/lib/index.ts +7 -0
- package/src/lib/loading.svelte.ts +142 -0
- package/src/lib/reddb/client.ts +133 -15
- package/src/lib/reddb/desktop-error.ts +89 -0
- package/src/lib/reddb/dev-console.ts +186 -0
- package/src/lib/reddb/index.ts +2 -0
- package/src/lib/reddb/local-url-provider.ts +4 -8
- package/src/lib/reddb/tauri-encrypted-store.ts +4 -9
- package/src/lib/tabs.svelte.ts +5 -0
- package/src/lib/workspace-session.ts +81 -0
- package/build/_app/immutable/assets/0.DgbuWrJy.css +0 -1
- package/build/_app/immutable/chunks/85-Fh5Zp.js +0 -404
- package/build/_app/immutable/chunks/CnD4hwxC.js +0 -1106
- package/build/_app/immutable/chunks/DQCYUNtS.js +0 -1
- package/build/_app/immutable/entry/start.D1J45dq5.js +0 -1
- package/build/_app/immutable/nodes/0.BTrC4th2.js +0 -1
- package/build/_app/immutable/nodes/1.Ds1Tbjsm.js +0 -1
- package/dist/embed/RedUiEmbedRoot-CtqTd_FG.js.map +0 -1
- package/dist/embed/index-w1Qo_uW0.js +0 -677
- package/dist/embed/index-w1Qo_uW0.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{SERIALIZE_TO_IPC_FN as a,Resource as O,invoke as i}from"./DhEqZVGG.js";import{listen as S,once as L,emit as P,emitTo as k,TauriEvent as o}from"./CHvQYbpl.js";class x{constructor(...e){this.type="Logical",e.length===1?"Logical"in e[0]?(this.width=e[0].Logical.width,this.height=e[0].Logical.height):(this.width=e[0].width,this.height=e[0].height):(this.width=e[0],this.height=e[1])}toPhysical(e){return new c(this.width*e,this.height*e)}[a](){return{width:this.width,height:this.height}}toJSON(){return this[a]()}}class c{constructor(...e){this.type="Physical",e.length===1?"Physical"in e[0]?(this.width=e[0].Physical.width,this.height=e[0].Physical.height):(this.width=e[0].width,this.height=e[0].height):(this.width=e[0],this.height=e[1])}toLogical(e){return new x(this.width/e,this.height/e)}[a](){return{width:this.width,height:this.height}}toJSON(){return this[a]()}}class h{constructor(e){this.size=e}toLogical(e){return this.size instanceof x?this.size:this.size.toLogical(e)}toPhysical(e){return this.size instanceof c?this.size:this.size.toPhysical(e)}[a](){return{[`${this.size.type}`]:{width:this.size.width,height:this.size.height}}}toJSON(){return this[a]()}}class D{constructor(...e){this.type="Logical",e.length===1?"Logical"in e[0]?(this.x=e[0].Logical.x,this.y=e[0].Logical.y):(this.x=e[0].x,this.y=e[0].y):(this.x=e[0],this.y=e[1])}toPhysical(e){return new u(this.x*e,this.y*e)}[a](){return{x:this.x,y:this.y}}toJSON(){return this[a]()}}class u{constructor(...e){this.type="Physical",e.length===1?"Physical"in e[0]?(this.x=e[0].Physical.x,this.y=e[0].Physical.y):(this.x=e[0].x,this.y=e[0].y):(this.x=e[0],this.y=e[1])}toLogical(e){return new D(this.x/e,this.y/e)}[a](){return{x:this.x,y:this.y}}toJSON(){return this[a]()}}class w{constructor(e){this.position=e}toLogical(e){return this.position instanceof D?this.position:this.position.toLogical(e)}toPhysical(e){return this.position instanceof u?this.position:this.position.toPhysical(e)}[a](){return{[`${this.position.type}`]:{x:this.position.x,y:this.position.y}}}toJSON(){return this[a]()}}class d extends O{constructor(e){super(e)}static async new(e,n,l){return i("plugin:image|new",{rgba:b(e),width:n,height:l}).then(r=>new d(r))}static async fromBytes(e){return i("plugin:image|from_bytes",{bytes:b(e)}).then(n=>new d(n))}static async fromPath(e){return i("plugin:image|from_path",{path:e}).then(n=>new d(n))}async rgba(){return i("plugin:image|rgba",{rid:this.rid}).then(e=>new Uint8Array(e))}async size(){return i("plugin:image|size",{rid:this.rid})}}function b(t){return t==null?null:typeof t=="string"?t:t instanceof d?t.rid:t}var g;(function(t){t[t.Critical=1]="Critical",t[t.Informational=2]="Informational"})(g||(g={}));class I{constructor(e){this._preventDefault=!1,this.event=e.event,this.id=e.id}preventDefault(){this._preventDefault=!0}isPreventDefault(){return this._preventDefault}}var _;(function(t){t.None="none",t.Normal="normal",t.Indeterminate="indeterminate",t.Paused="paused",t.Error="error"})(_||(_={}));function T(){return new W(window.__TAURI_INTERNALS__.metadata.currentWindow.label,{skip:!0})}async function y(){return i("plugin:window|get_all_windows").then(t=>t.map(e=>new W(e,{skip:!0})))}const p=["tauri://created","tauri://error"];class W{constructor(e,n={}){var l;this.label=e,this.listeners=Object.create(null),n!=null&&n.skip||i("plugin:window|create",{options:{...n,parent:typeof n.parent=="string"?n.parent:(l=n.parent)===null||l===void 0?void 0:l.label,label:e}}).then(async()=>this.emit("tauri://created")).catch(async r=>this.emit("tauri://error",r))}static async getByLabel(e){var n;return(n=(await y()).find(l=>l.label===e))!==null&&n!==void 0?n:null}static getCurrent(){return T()}static async getAll(){return y()}static async getFocusedWindow(){for(const e of await y())if(await e.isFocused())return e;return null}async listen(e,n){return this._handleTauriEvent(e,n)?()=>{const l=this.listeners[e];l.splice(l.indexOf(n),1)}:S(e,n,{target:{kind:"Window",label:this.label}})}async once(e,n){return this._handleTauriEvent(e,n)?()=>{const l=this.listeners[e];l.splice(l.indexOf(n),1)}:L(e,n,{target:{kind:"Window",label:this.label}})}async emit(e,n){if(p.includes(e)){for(const l of this.listeners[e]||[])l({event:e,id:-1,payload:n});return}return P(e,n)}async emitTo(e,n,l){if(p.includes(n)){for(const r of this.listeners[n]||[])r({event:n,id:-1,payload:l});return}return k(e,n,l)}_handleTauriEvent(e,n){return p.includes(e)?(e in this.listeners?this.listeners[e].push(n):this.listeners[e]=[n],!0):!1}async scaleFactor(){return i("plugin:window|scale_factor",{label:this.label})}async innerPosition(){return i("plugin:window|inner_position",{label:this.label}).then(e=>new u(e))}async outerPosition(){return i("plugin:window|outer_position",{label:this.label}).then(e=>new u(e))}async innerSize(){return i("plugin:window|inner_size",{label:this.label}).then(e=>new c(e))}async outerSize(){return i("plugin:window|outer_size",{label:this.label}).then(e=>new c(e))}async isFullscreen(){return i("plugin:window|is_fullscreen",{label:this.label})}async isMinimized(){return i("plugin:window|is_minimized",{label:this.label})}async isMaximized(){return i("plugin:window|is_maximized",{label:this.label})}async isFocused(){return i("plugin:window|is_focused",{label:this.label})}async isDecorated(){return i("plugin:window|is_decorated",{label:this.label})}async isResizable(){return i("plugin:window|is_resizable",{label:this.label})}async isMaximizable(){return i("plugin:window|is_maximizable",{label:this.label})}async isMinimizable(){return i("plugin:window|is_minimizable",{label:this.label})}async isClosable(){return i("plugin:window|is_closable",{label:this.label})}async isVisible(){return i("plugin:window|is_visible",{label:this.label})}async title(){return i("plugin:window|title",{label:this.label})}async theme(){return i("plugin:window|theme",{label:this.label})}async isAlwaysOnTop(){return i("plugin:window|is_always_on_top",{label:this.label})}async activityName(){return i("plugin:window|activity_name",{label:this.label})}async sceneIdentifier(){return i("plugin:window|scene_identifier",{label:this.label})}async center(){return i("plugin:window|center",{label:this.label})}async requestUserAttention(e){let n=null;return e&&(e===g.Critical?n={type:"Critical"}:n={type:"Informational"}),i("plugin:window|request_user_attention",{label:this.label,value:n})}async setResizable(e){return i("plugin:window|set_resizable",{label:this.label,value:e})}async setEnabled(e){return i("plugin:window|set_enabled",{label:this.label,value:e})}async isEnabled(){return i("plugin:window|is_enabled",{label:this.label})}async setMaximizable(e){return i("plugin:window|set_maximizable",{label:this.label,value:e})}async setMinimizable(e){return i("plugin:window|set_minimizable",{label:this.label,value:e})}async setClosable(e){return i("plugin:window|set_closable",{label:this.label,value:e})}async setTitle(e){return i("plugin:window|set_title",{label:this.label,value:e})}async maximize(){return i("plugin:window|maximize",{label:this.label})}async unmaximize(){return i("plugin:window|unmaximize",{label:this.label})}async toggleMaximize(){return i("plugin:window|toggle_maximize",{label:this.label})}async minimize(){return i("plugin:window|minimize",{label:this.label})}async unminimize(){return i("plugin:window|unminimize",{label:this.label})}async show(){return i("plugin:window|show",{label:this.label})}async hide(){return i("plugin:window|hide",{label:this.label})}async close(){return i("plugin:window|close",{label:this.label})}async destroy(){return i("plugin:window|destroy",{label:this.label})}async setDecorations(e){return i("plugin:window|set_decorations",{label:this.label,value:e})}async setShadow(e){return i("plugin:window|set_shadow",{label:this.label,value:e})}async setEffects(e){return i("plugin:window|set_effects",{label:this.label,value:e})}async clearEffects(){return i("plugin:window|set_effects",{label:this.label,value:null})}async setAlwaysOnTop(e){return i("plugin:window|set_always_on_top",{label:this.label,value:e})}async setAlwaysOnBottom(e){return i("plugin:window|set_always_on_bottom",{label:this.label,value:e})}async setContentProtected(e){return i("plugin:window|set_content_protected",{label:this.label,value:e})}async setSize(e){return i("plugin:window|set_size",{label:this.label,value:e instanceof h?e:new h(e)})}async setMinSize(e){return i("plugin:window|set_min_size",{label:this.label,value:e instanceof h?e:e?new h(e):null})}async setMaxSize(e){return i("plugin:window|set_max_size",{label:this.label,value:e instanceof h?e:e?new h(e):null})}async setSizeConstraints(e){function n(l){return l?{Logical:l}:null}return i("plugin:window|set_size_constraints",{label:this.label,value:{minWidth:n(e==null?void 0:e.minWidth),minHeight:n(e==null?void 0:e.minHeight),maxWidth:n(e==null?void 0:e.maxWidth),maxHeight:n(e==null?void 0:e.maxHeight)}})}async setPosition(e){return i("plugin:window|set_position",{label:this.label,value:e instanceof w?e:new w(e)})}async setFullscreen(e){return i("plugin:window|set_fullscreen",{label:this.label,value:e})}async setSimpleFullscreen(e){return i("plugin:window|set_simple_fullscreen",{label:this.label,value:e})}async setFocus(){return i("plugin:window|set_focus",{label:this.label})}async setFocusable(e){return i("plugin:window|set_focusable",{label:this.label,value:e})}async setIcon(e){return i("plugin:window|set_icon",{label:this.label,value:b(e)})}async setSkipTaskbar(e){return i("plugin:window|set_skip_taskbar",{label:this.label,value:e})}async setCursorGrab(e){return i("plugin:window|set_cursor_grab",{label:this.label,value:e})}async setCursorVisible(e){return i("plugin:window|set_cursor_visible",{label:this.label,value:e})}async setCursorIcon(e){return i("plugin:window|set_cursor_icon",{label:this.label,value:e})}async setBackgroundColor(e){return i("plugin:window|set_background_color",{color:e})}async setCursorPosition(e){return i("plugin:window|set_cursor_position",{label:this.label,value:e instanceof w?e:new w(e)})}async setIgnoreCursorEvents(e){return i("plugin:window|set_ignore_cursor_events",{label:this.label,value:e})}async startDragging(){return i("plugin:window|start_dragging",{label:this.label})}async startResizeDragging(e){return i("plugin:window|start_resize_dragging",{label:this.label,value:e})}async setBadgeCount(e){return i("plugin:window|set_badge_count",{label:this.label,value:e})}async setBadgeLabel(e){return i("plugin:window|set_badge_label",{label:this.label,value:e})}async setOverlayIcon(e){return i("plugin:window|set_overlay_icon",{label:this.label,value:e?b(e):void 0})}async setProgressBar(e){return i("plugin:window|set_progress_bar",{label:this.label,value:e})}async setVisibleOnAllWorkspaces(e){return i("plugin:window|set_visible_on_all_workspaces",{label:this.label,value:e})}async setTitleBarStyle(e){return i("plugin:window|set_title_bar_style",{label:this.label,value:e})}async setTheme(e){return i("plugin:window|set_theme",{label:this.label,value:e})}async onResized(e){return this.listen(o.WINDOW_RESIZED,n=>{n.payload=new c(n.payload),e(n)})}async onMoved(e){return this.listen(o.WINDOW_MOVED,n=>{n.payload=new u(n.payload),e(n)})}async onCloseRequested(e){return this.listen(o.WINDOW_CLOSE_REQUESTED,async n=>{const l=new I(n);await e(l),l.isPreventDefault()||await this.destroy()})}async onDragDropEvent(e){const n=await this.listen(o.DRAG_ENTER,s=>{e({...s,payload:{type:"enter",paths:s.payload.paths,position:new u(s.payload.position)}})}),l=await this.listen(o.DRAG_OVER,s=>{e({...s,payload:{type:"over",position:new u(s.payload.position)}})}),r=await this.listen(o.DRAG_DROP,s=>{e({...s,payload:{type:"drop",paths:s.payload.paths,position:new u(s.payload.position)}})}),C=await this.listen(o.DRAG_LEAVE,s=>{e({...s,payload:{type:"leave"}})});return()=>{n(),r(),l(),C()}}async onFocusChanged(e){const n=await this.listen(o.WINDOW_FOCUS,r=>{e({...r,payload:!0})}),l=await this.listen(o.WINDOW_BLUR,r=>{e({...r,payload:!1})});return()=>{n(),l()}}async onScaleChanged(e){return this.listen(o.WINDOW_SCALE_FACTOR_CHANGED,e)}async onThemeChanged(e){return this.listen(o.WINDOW_THEME_CHANGED,e)}}var m;(function(t){t.Disabled="disabled",t.Throttle="throttle",t.Suspend="suspend"})(m||(m={}));var v;(function(t){t.Default="default",t.FluentOverlay="fluentOverlay"})(v||(v={}));var z;(function(t){t.AppearanceBased="appearanceBased",t.Light="light",t.Dark="dark",t.MediumLight="mediumLight",t.UltraDark="ultraDark",t.Titlebar="titlebar",t.Selection="selection",t.Menu="menu",t.Popover="popover",t.Sidebar="sidebar",t.HeaderView="headerView",t.Sheet="sheet",t.WindowBackground="windowBackground",t.HudWindow="hudWindow",t.FullScreenUI="fullScreenUI",t.Tooltip="tooltip",t.ContentBackground="contentBackground",t.UnderWindowBackground="underWindowBackground",t.UnderPageBackground="underPageBackground",t.Mica="mica",t.Blur="blur",t.Acrylic="acrylic",t.Tabbed="tabbed",t.TabbedDark="tabbedDark",t.TabbedLight="tabbedLight"})(z||(z={}));var f;(function(t){t.FollowsWindowActiveState="followsWindowActiveState",t.Active="active",t.Inactive="inactive"})(f||(f={}));export{I as CloseRequestedEvent,z as Effect,f as EffectState,D as LogicalPosition,x as LogicalSize,u as PhysicalPosition,c as PhysicalSize,_ as ProgressBarStatus,g as UserAttentionType,W as Window,y as getAllWindows,T as getCurrentWindow};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
var Ve=Object.defineProperty;var Ee=t=>{throw TypeError(t)};var Be=(t,e,r)=>e in t?Ve(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var X=(t,e,r)=>Be(t,typeof e!="symbol"?e+"":e,r),ae=(t,e,r)=>e.has(t)||Ee("Cannot "+r);var s=(t,e,r)=>(ae(t,e,"read from private field"),r?r.call(t):e.get(t)),_=(t,e,r)=>e.has(t)?Ee("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),f=(t,e,r,n)=>(ae(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),p=(t,e,r)=>(ae(t,e,"access private method"),r);import{an as Ye,at as De,bf as je,bK as qe,aI as Te,ba as j,by as Me,aE as d,aF as N,Y as F,c as we,a2 as ze,aD as be,s as Ge,t as Ne,a3 as H,ab as q,b5 as oe,ac as W,a$ as Qe,ae as Ue,bo as re,bp as se,bq as Ae,e as Xe,aB as Je,Z as Oe,a8 as Le,aK as Ke,aj as fe,br as z,b2 as Ze,bx as et,aM as J,n as tt,m as rt,bE as st,bD as nt,af as it,bQ as at,bF as ot,aa as ft,ay as L,aQ as ut,T as Ce,M as lt,R as ct,f as ye,Q as dt,a_ as ht,O as Re,aJ as le,r as _t,az as pt,q as ce,bs as K,aG as vt,a7 as gt,a9 as mt,a0 as bt,b9 as yt,p as Et,aH as Tt,b6 as wt}from"./CGFL56WJ.js";function Nt(t){let e=0,r=Me(0),n;return()=>{Ye()&&(De(r),je(()=>(e===0&&(n=qe(()=>t(()=>Te(r)))),e+=1,()=>{j(()=>{e-=1,e===0&&(n==null||n(),n=void 0,Te(r))})})))}}var At=tt|rt;function Rt(t,e,r,n){new kt(t,e,r,n)}var T,G,A,V,m,R,v,w,S,B,C,Y,Q,U,D,ne,u,Fe,xe,Ie,de,ee,te,he,_e;class kt{constructor(e,r,n,o){_(this,u);X(this,"parent");X(this,"is_pending",!1);X(this,"transform_error");_(this,T);_(this,G,N?d:null);_(this,A);_(this,V);_(this,m);_(this,R,null);_(this,v,null);_(this,w,null);_(this,S,null);_(this,B,0);_(this,C,0);_(this,Y,!1);_(this,Q,new Set);_(this,U,new Set);_(this,D,null);_(this,ne,Nt(()=>(f(this,D,Me(s(this,B))),()=>{f(this,D,null)})));var i;f(this,T,e),f(this,A,r),f(this,V,a=>{var h=F;h.b=this,h.f|=we,n(a)}),this.parent=F.b,this.transform_error=o??((i=this.parent)==null?void 0:i.transform_error)??(a=>a),f(this,m,ze(()=>{if(N){const a=s(this,G);be();const h=a.data===Ge;if(a.data.startsWith(Ne)){const c=JSON.parse(a.data.slice(Ne.length));p(this,u,xe).call(this,c)}else h?p(this,u,Ie).call(this):p(this,u,Fe).call(this)}else p(this,u,de).call(this)},At)),N&&f(this,T,d)}defer_effect(e){Ue(e,s(this,Q),s(this,U))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!s(this,A).pending}update_pending_count(e,r){p(this,u,he).call(this,e,r),f(this,B,s(this,B)+e),!(!s(this,D)||s(this,Y))&&(f(this,Y,!0),j(()=>{f(this,Y,!1),s(this,D)&&Ke(s(this,D),s(this,B))}))}get_effect_pending(){return s(this,ne).call(this),De(s(this,D))}error(e){var r;if(!s(this,A).onerror&&!s(this,A).failed)throw e;(r=W)!=null&&r.is_fork?(s(this,R)&&W.skip_effect(s(this,R)),s(this,v)&&W.skip_effect(s(this,v)),s(this,w)&&W.skip_effect(s(this,w)),W.on_fork_commit(()=>{p(this,u,_e).call(this,e)})):p(this,u,_e).call(this,e)}}T=new WeakMap,G=new WeakMap,A=new WeakMap,V=new WeakMap,m=new WeakMap,R=new WeakMap,v=new WeakMap,w=new WeakMap,S=new WeakMap,B=new WeakMap,C=new WeakMap,Y=new WeakMap,Q=new WeakMap,U=new WeakMap,D=new WeakMap,ne=new WeakMap,u=new WeakSet,Fe=function(){try{f(this,R,H(()=>s(this,V).call(this,s(this,T))))}catch(e){this.error(e)}},xe=function(e){const r=s(this,A).failed;r&&f(this,w,H(()=>{r(s(this,T),()=>e,()=>()=>{})}))},Ie=function(){const e=s(this,A).pending;e&&(this.is_pending=!0,f(this,v,H(()=>e(s(this,T)))),j(()=>{var r=f(this,S,document.createDocumentFragment()),n=q();r.append(n),f(this,R,p(this,u,te).call(this,()=>H(()=>s(this,V).call(this,n)))),s(this,C)===0&&(s(this,T).before(r),f(this,S,null),oe(s(this,v),()=>{f(this,v,null)}),p(this,u,ee).call(this,W))}))},de=function(){try{if(this.is_pending=this.has_pending_snippet(),f(this,C,0),f(this,B,0),f(this,R,H(()=>{s(this,V).call(this,s(this,T))})),s(this,C)>0){var e=f(this,S,document.createDocumentFragment());Qe(s(this,R),e);const r=s(this,A).pending;f(this,v,H(()=>r(s(this,T))))}else p(this,u,ee).call(this,W)}catch(r){this.error(r)}},ee=function(e){this.is_pending=!1,e.transfer_effects(s(this,Q),s(this,U))},te=function(e){var r=F,n=Oe,o=Le;re(s(this,m)),se(s(this,m)),Ae(s(this,m).ctx);try{return Xe.ensure(),e()}catch(i){return Je(i),null}finally{re(r),se(n),Ae(o)}},he=function(e,r){var n;if(!this.has_pending_snippet()){this.parent&&p(n=this.parent,u,he).call(n,e,r);return}f(this,C,s(this,C)+e),s(this,C)===0&&(p(this,u,ee).call(this,r),s(this,v)&&oe(s(this,v),()=>{f(this,v,null)}),s(this,S)&&(s(this,T).before(s(this,S)),f(this,S,null)))},_e=function(e){s(this,R)&&(fe(s(this,R)),f(this,R,null)),s(this,v)&&(fe(s(this,v)),f(this,v,null)),s(this,w)&&(fe(s(this,w)),f(this,w,null)),N&&(z(s(this,G)),Ze(),z(et()));var r=s(this,A).onerror;let n=s(this,A).failed;var o=!1,i=!1;const a=()=>{if(o){nt();return}o=!0,i&&st(),s(this,w)!==null&&oe(s(this,w),()=>{f(this,w,null)}),p(this,u,te).call(this,()=>{p(this,u,de).call(this)})},h=l=>{try{i=!0,r==null||r(l,a),i=!1}catch(c){J(c,s(this,m)&&s(this,m).parent)}n&&f(this,w,p(this,u,te).call(this,()=>{try{return H(()=>{var c=F;c.b=this,c.f|=we,n(s(this,T),()=>l,()=>a)})}catch(c){return J(c,s(this,m).parent),null}}))};j(()=>{var l;try{l=this.transform_error(e)}catch(c){J(c,s(this,m)&&s(this,m).parent);return}l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(h,c=>J(c,s(this,m)&&s(this,m).parent)):h(l)})};function Ht(t){return t.endsWith("capture")&&t!=="gotpointercapture"&&t!=="lostpointercapture"}const St=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function Wt(t){return St.includes(t)}const Dt={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 $t(t){return t=t.toLowerCase(),Dt[t]??t}const Mt=["touchstart","touchmove"];function Ot(t){return Mt.includes(t)}const Lt=["textarea","script","style","title"];function Vt(t){return Lt.includes(t)}const $=Symbol("events"),Pe=new Set,pe=new Set;function He(t,e,r,n={}){function o(i){if(n.capture||ve.call(e,i),!i.cancelBubble)return at(()=>r==null?void 0:r.call(this,i))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?j(()=>{e.addEventListener(t,o,n)}):e.addEventListener(t,o,n),o}function Bt(t,e,r,n={}){var o=He(e,t,r,n);return()=>{t.removeEventListener(e,o,n)}}function Yt(t,e,r,n,o){var i={capture:n,passive:o},a=He(t,e,r,i);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&ot(()=>{e.removeEventListener(t,a,i)})}function jt(t,e,r){(e[$]??(e[$]={}))[t]=r}function qt(t){for(var e=0;e<t.length;e++)Pe.add(t[e]);for(var r of pe)r(t)}let ke=null;function ve(t){var I,E;var e=this,r=e.ownerDocument,n=t.type,o=((I=t.composedPath)==null?void 0:I.call(t))||[],i=o[0]||t.target;ke=t;var a=0,h=ke===t&&t[$];if(h){var l=o.indexOf(h);if(l!==-1&&(e===document||e===window)){t[$]=e;return}var c=o.indexOf(e);if(c===-1)return;l<=c&&(a=l)}if(i=o[a]||t.target,i!==e){it(t,"currentTarget",{configurable:!0,get(){return i||r}});var M=Oe,x=F;se(null),re(null);try{for(var O,b=[];i!==null;){var g=i.assignedSlot||i.parentNode||i.host||null;try{var y=(E=i[$])==null?void 0:E[n];y!=null&&(!i.disabled||t.target===i)&&y.call(i,t)}catch(P){O?b.push(P):O=P}if(t.cancelBubble||g===e||g===null)break;i=g}if(O){for(let P of b)queueMicrotask(()=>{throw P});throw O}}finally{t[$]=e,delete t.currentTarget,se(M),re(x)}}}var Se;const ue=((Se=globalThis==null?void 0:globalThis.window)==null?void 0:Se.trustedTypes)&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:t=>t});function Ct(t){return(ue==null?void 0:ue.createHTML(t))??t}function We(t){var e=ft("template");return e.innerHTML=Ct(t.replaceAll("<!>","<!---->")),e.content}function k(t,e){var r=F;r.nodes===null&&(r.nodes={start:t,end:e,a:null,t:null})}function zt(t,e){var r=(e&Ce)!==0,n=(e<)!==0,o,i=!t.startsWith("<!>");return()=>{if(N)return k(d,null),d;o===void 0&&(o=We(i?t:"<!>"+t),r||(o=L(o)));var a=n||ut?document.importNode(o,!0):o.cloneNode(!0);if(r){var h=L(a),l=a.lastChild;k(h,l)}else k(a,a);return a}}function Ft(t,e,r="svg"){var n=!t.startsWith("<!>"),o=(e&Ce)!==0,i=`<${r}>${n?t:"<!>"+t}</${r}>`,a;return()=>{if(N)return k(d,null),d;if(!a){var h=We(i),l=L(h);if(o)for(a=document.createDocumentFragment();L(l);)a.appendChild(L(l));else a=L(l)}var c=a.cloneNode(!0);if(o){var M=L(c),x=c.lastChild;k(M,x)}else k(c,c);return c}}function Gt(t,e){return Ft(t,e,"svg")}function Qt(t=""){if(!N){var e=q(t+"");return k(e,e),e}var r=d;return r.nodeType!==dt?(r.before(r=q()),z(r)):ht(r),k(r,r),r}function Ut(){if(N)return k(d,null),d;var t=document.createDocumentFragment(),e=document.createComment(""),r=q();return t.append(e,r),k(e,r),t}function Xt(t,e){if(N){var r=F;((r.f&ct)===0||r.nodes.end===null)&&(r.nodes.end=d),be();return}t!==null&&t.before(e)}function Jt(){var t,e;if(N&&d&&d.nodeType===ye&&((t=d.textContent)!=null&&t.startsWith("$"))){const r=d.textContent.substring(1);return be(),r}return(e=window.__svelte??(window.__svelte={})).uid??(e.uid=1),`c${window.__svelte.uid++}`}let ge=!0;function Kt(t){ge=t}function Zt(t,e){var n;var r=e==null?"":typeof e=="object"?`${e}`:e;r!==(t[n=Re]??(t[n]=t.nodeValue))&&(t[Re]=r,t.nodeValue=`${r}`)}function xt(t,e){return $e(t,e)}function er(t,e){le(),e.intro=e.intro??!1;const r=e.target,n=N,o=d;try{for(var i=L(r);i&&(i.nodeType!==ye||i.data!==_t);)i=pt(i);if(!i)throw ce;K(!0),z(i);const a=$e(t,{...e,anchor:i});return K(!1),a}catch(a){if(a instanceof Error&&a.message.split(`
|
|
2
|
-
`).some(h=>h.startsWith("https://svelte.dev/e/")))throw a;return a!==ce&&console.warn("Failed to hydrate: ",a),e.recover===!1&&vt(),le(),gt(r),K(!1),xt(t,e)}finally{K(n),z(o)}}const Z=new Map;function $e(t,{target:e,anchor:r,props:n={},events:o,context:i,intro:a=!0,transformError:h}){le();var l=void 0,c=mt(()=>{var M=r??e.appendChild(q());Rt(M,{pending:()=>{}},b=>{yt({});var g=Le;if(i&&(g.c=i),o&&(n.$$events=o),N&&k(b,null),ge=a,l=t(b,n)||{},ge=!0,N&&(F.nodes.end=d,d===null||d.nodeType!==ye||d.data!==Et))throw Tt(),ce;wt()},h);var x=new Set,O=b=>{for(var g=0;g<b.length;g++){var y=b[g];if(!x.has(y)){x.add(y);var I=Ot(y);for(const ie of[e,document]){var E=Z.get(ie);E===void 0&&(E=new Map,Z.set(ie,E));var P=E.get(y);P===void 0?(ie.addEventListener(y,ve,{passive:I}),E.set(y,1)):E.set(y,P+1)}}}};return O(bt(Pe)),pe.add(O),()=>{var I;for(var b of x)for(const E of[e,document]){var g=Z.get(E),y=g.get(b);--y==0?(E.removeEventListener(b,ve),g.delete(b),g.size===0&&Z.delete(E)):g.set(b,y)}pe.delete(O),M!==r&&((I=M.parentNode)==null||I.removeChild(M))}});return me.set(l,c),l}let me=new WeakMap;function tr(t,e){const r=me.get(t);return r?(me.delete(t),r(e)):Promise.resolve()}export{Xt as a,k as b,
|
|
2
|
+
`).some(h=>h.startsWith("https://svelte.dev/e/")))throw a;return a!==ce&&console.warn("Failed to hydrate: ",a),e.recover===!1&&vt(),le(),gt(r),K(!1),xt(t,e)}finally{K(n),z(o)}}const Z=new Map;function $e(t,{target:e,anchor:r,props:n={},events:o,context:i,intro:a=!0,transformError:h}){le();var l=void 0,c=mt(()=>{var M=r??e.appendChild(q());Rt(M,{pending:()=>{}},b=>{yt({});var g=Le;if(i&&(g.c=i),o&&(n.$$events=o),N&&k(b,null),ge=a,l=t(b,n)||{},ge=!0,N&&(F.nodes.end=d,d===null||d.nodeType!==ye||d.data!==Et))throw Tt(),ce;wt()},h);var x=new Set,O=b=>{for(var g=0;g<b.length;g++){var y=b[g];if(!x.has(y)){x.add(y);var I=Ot(y);for(const ie of[e,document]){var E=Z.get(ie);E===void 0&&(E=new Map,Z.set(ie,E));var P=E.get(y);P===void 0?(ie.addEventListener(y,ve,{passive:I}),E.set(y,1)):E.set(y,P+1)}}}};return O(bt(Pe)),pe.add(O),()=>{var I;for(var b of x)for(const E of[e,document]){var g=Z.get(E),y=g.get(b);--y==0?(E.removeEventListener(b,ve),g.delete(b),g.size===0&&Z.delete(E)):g.set(b,y)}pe.delete(O),M!==r&&((I=M.parentNode)==null||I.removeChild(M))}});return me.set(l,c),l}let me=new WeakMap;function tr(t,e){const r=me.get(t);return r?(me.delete(t),r(e)):Promise.resolve()}export{Xt as a,k as b,Rt as c,Wt as d,Ut as e,Nt as f,He as g,qt as h,jt as i,Yt as j,zt as k,Gt as l,er as m,Ht as n,Vt as o,xt as p,$t as q,Bt as r,Jt as s,Kt as t,Zt as u,ge as v,Qt as w,tr as x};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.
|
|
2
|
-
var q=e=>{throw TypeError(e)};var G=(e,t,r)=>t.has(e)||q("Cannot "+r);var i=(e,t,r)=>(G(e,t,"read from private field"),r?r.call(e):t.get(e)),L=(e,t,r)=>t.has(e)?q("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),A=(e,t,r,n)=>(G(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r);import{p as D,c as I,b as T,_ as o}from"../chunks/BRIMmWzq.js";import{bm as y,L as Q,at as l,as as U,af as W,b0 as X,b9 as Z,bP as $,bO as tt,bH as et,aq as R,bw as rt,b6 as at,bz as V,a6 as st,bg as ot,bG as it,bN as w}from"../chunks/CGFL56WJ.js";import{
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.C0e5KQVb.js","../chunks/Bzak7iHL.js","../chunks/CGFL56WJ.js","../chunks/DIeogL5L.js","../chunks/DN7v3Tar.js","../chunks/CxnvJShw.js","../chunks/69_IOA4Y.js","../chunks/BRIMmWzq.js","../chunks/DCJ0QyYH.js","../chunks/Btd6PFkC.js","../chunks/C3SGj6Qd.js","../assets/EmptyState.RXcH7ryE.css","../chunks/CP65IkJc.js","../chunks/B-yl15ta.js","../chunks/CO7K4bD2.js","../assets/Workspace.DM2E1WiF.css","../assets/0.BWZTMKZW.css","../nodes/1.ceiVuZbB.js","../nodes/2.CAG5_cGP.js","../nodes/3.CAG5_cGP.js","../nodes/4.CAG5_cGP.js","../nodes/5.CAG5_cGP.js","../nodes/6.CAG5_cGP.js","../nodes/7.CAG5_cGP.js","../nodes/8.CAG5_cGP.js","../nodes/9.CAG5_cGP.js","../nodes/10.DeFqKRR2.js","../chunks/DRlh90Cv.js","../chunks/BgOTHNR5.js","../nodes/11.CAG5_cGP.js","../nodes/12.CzMvqoYS.js","../nodes/13.CAG5_cGP.js","../nodes/14.CAG5_cGP.js","../nodes/15.CRDBqbiH.js","../assets/15.Dblyk0Kr.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
var q=e=>{throw TypeError(e)};var G=(e,t,r)=>t.has(e)||q("Cannot "+r);var i=(e,t,r)=>(G(e,t,"read from private field"),r?r.call(e):t.get(e)),L=(e,t,r)=>t.has(e)?q("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),A=(e,t,r,n)=>(G(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r);import{p as D,c as I,b as T,_ as o}from"../chunks/BRIMmWzq.js";import{bm as y,L as Q,at as l,as as U,af as W,b0 as X,b9 as Z,bP as $,bO as tt,bH as et,aq as R,bw as rt,b6 as at,bz as V,a6 as st,bg as ot,bG as it,bN as w}from"../chunks/CGFL56WJ.js";import{m as nt,p as _t,x as mt,a as b,e as x,k as M,w as ct,u as ut}from"../chunks/DN7v3Tar.js";import"../chunks/Bzak7iHL.js";import{a as lt}from"../chunks/Btd6PFkC.js";import{i as k}from"../chunks/DCJ0QyYH.js";function dt(e){return class extends ft{constructor(t){super({component:e,...t})}}}var d,m;class ft{constructor(t){L(this,d);L(this,m);var E;var r=new Map,n=(a,s)=>{var f=X(s,!1,!1);return r.set(a,f),f};const u=new Proxy({...t.props||{},$$events:{}},{get(a,s){return l(r.get(s)??n(s,Reflect.get(a,s)))},has(a,s){return s===Q?!0:(l(r.get(s)??n(s,Reflect.get(a,s))),Reflect.has(a,s))},set(a,s,f){return y(r.get(s)??n(s,f),f),Reflect.set(a,s,f)}});A(this,m,(t.hydrate?nt:_t)(t.component,{target:t.target,anchor:t.anchor,props:u,context:t.context,intro:t.intro??!1,recover:t.recover,transformError:t.transformError})),(!((E=t==null?void 0:t.props)!=null&&E.$$host)||t.sync===!1)&&U(),A(this,d,u.$$events);for(const a of Object.keys(i(this,m)))a==="$set"||a==="$destroy"||a==="$on"||W(this,a,{get(){return i(this,m)[a]},set(s){i(this,m)[a]=s},enumerable:!0});i(this,m).$set=a=>{Object.assign(u,a)},i(this,m).$destroy=()=>{mt(i(this,m))}}$set(t){i(this,m).$set(t)}$on(t,r){i(this,d)[t]=i(this,d)[t]||[];const n=(...u)=>r.call(this,...u);return i(this,d)[t].push(n),()=>{i(this,d)[t]=i(this,d)[t].filter(u=>u!==n)}}$destroy(){i(this,m).$destroy()}}d=new WeakMap,m=new WeakMap;const Dt={};var vt=M('<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>'),ht=M("<!> <!>",1);function gt(e,t){Z(t,!0);let r=D(t,"components",23,()=>[]),n=D(t,"data_0",3,null),u=D(t,"data_1",3,null);$(()=>t.stores.page.set(t.page)),tt(()=>{t.stores,t.page,t.constructors,r(),t.form,n(),u(),t.stores.page.notify()});let E=V(!1),a=V(!1),s=V(null);lt(()=>{const _=t.stores.page.subscribe(()=>{l(E)&&(y(a,!0),et().then(()=>{y(s,document.title||"untitled page",!0)}))});return y(E,!0),_});const f=w(()=>t.constructors[1]);var j=ht(),C=R(j);{var H=_=>{const v=w(()=>t.constructors[0]);var h=x(),P=R(h);I(P,()=>l(v),(g,p)=>{T(p(g,{get data(){return n()},get form(){return t.form},get params(){return t.page.params},children:(c,pt)=>{var S=x(),F=R(S);I(F,()=>l(f),(J,K)=>{T(K(J,{get data(){return u()},get form(){return t.form},get params(){return t.page.params}}),O=>r()[1]=O,()=>{var O;return(O=r())==null?void 0:O[1]})}),b(c,S)},$$slots:{default:!0}}),c=>r()[0]=c,()=>{var c;return(c=r())==null?void 0:c[0]})}),b(_,h)},N=_=>{const v=w(()=>t.constructors[0]);var h=x(),P=R(h);I(P,()=>l(v),(g,p)=>{T(p(g,{get data(){return n()},get form(){return t.form},get params(){return t.page.params}}),c=>r()[0]=c,()=>{var c;return(c=r())==null?void 0:c[0]})}),b(_,h)};k(C,_=>{t.constructors[1]?_(H):_(N,-1)})}var Y=rt(C,2);{var B=_=>{var v=vt(),h=st(v);{var P=g=>{var p=ct();it(()=>ut(p,l(s))),b(g,p)};k(h,g=>{l(a)&&g(P)})}ot(v),b(_,v)};k(Y,_=>{l(E)&&_(B)})}b(e,j),at()}const It=dt(gt),Tt=[()=>o(()=>import("../nodes/0.C0e5KQVb.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]),import.meta.url),()=>o(()=>import("../nodes/1.ceiVuZbB.js"),__vite__mapDeps([17,1,2,3,4,13,12,9]),import.meta.url),()=>o(()=>import("../nodes/2.CAG5_cGP.js"),__vite__mapDeps([18,1,6,3]),import.meta.url),()=>o(()=>import("../nodes/3.CAG5_cGP.js"),__vite__mapDeps([19,1,6,3]),import.meta.url),()=>o(()=>import("../nodes/4.CAG5_cGP.js"),__vite__mapDeps([20,1,6,3]),import.meta.url),()=>o(()=>import("../nodes/5.CAG5_cGP.js"),__vite__mapDeps([21,1,6,3]),import.meta.url),()=>o(()=>import("../nodes/6.CAG5_cGP.js"),__vite__mapDeps([22,1,6,3]),import.meta.url),()=>o(()=>import("../nodes/7.CAG5_cGP.js"),__vite__mapDeps([23,1,6,3]),import.meta.url),()=>o(()=>import("../nodes/8.CAG5_cGP.js"),__vite__mapDeps([24,1,6,3]),import.meta.url),()=>o(()=>import("../nodes/9.CAG5_cGP.js"),__vite__mapDeps([25,1,6,3]),import.meta.url),()=>o(()=>import("../nodes/10.DeFqKRR2.js"),__vite__mapDeps([26,1,9,2,3,4,8,27,5,6,7,10,11,28,13,12]),import.meta.url),()=>o(()=>import("../nodes/11.CAG5_cGP.js"),__vite__mapDeps([29,1,6,3]),import.meta.url),()=>o(()=>import("../nodes/12.CzMvqoYS.js"),__vite__mapDeps([30,1,2,3,4,8,28,10]),import.meta.url),()=>o(()=>import("../nodes/13.CAG5_cGP.js"),__vite__mapDeps([31,1,6,3]),import.meta.url),()=>o(()=>import("../nodes/14.CAG5_cGP.js"),__vite__mapDeps([32,1,6,3]),import.meta.url),()=>o(()=>import("../nodes/15.CRDBqbiH.js"),__vite__mapDeps([33,1,6,3,9,2,4,28,7,8,5,10,11,14,15,27,34]),import.meta.url)],Vt=[],wt={"/":[2],"/analytics":[3],"/appearance":[4],"/ask":[5],"/cluster":[8],"/collections":[9],"/c/[collection]":[6],"/c/[collection]/p/[subpage]":[7],"/graph":[10],"/query":[11],"/redwire-ws-spike":[12],"/security":[13],"/settings":[14],"/shadow-dom-spike":[15]},z={handleError:(({error:e})=>{console.error(e)}),reroute:(()=>{}),transport:{}},Et=Object.fromEntries(Object.entries(z.transport).map(([e,t])=>[e,t.decode])),xt=Object.fromEntries(Object.entries(z.transport).map(([e,t])=>[e,t.encode])),kt=!1,jt=(e,t)=>Et[e](t);export{jt as decode,Et as decoders,wt as dictionary,xt as encoders,kt as hash,z as hooks,Dt as matchers,Tt as nodes,It as root,Vt as server_loads};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{l as o,s as r}from"../chunks/CP65IkJc.js";export{o as load_css,r as start};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import"../chunks/Bzak7iHL.js";import{aq as w,b3 as T,a6 as c,b2 as K,bg as d,bw as x,at as s,bG as j,bN as _,b9 as Q,b6 as U}from"../chunks/CGFL56WJ.js";import{h as V,e as y,c as X,a as p,u as C,i as M,k as B}from"../chunks/DN7v3Tar.js";import{C as D,e as P}from"../chunks/CxnvJShw.js";import{i as G}from"../chunks/DCJ0QyYH.js";import{g as Z,b as v}from"../chunks/CP65IkJc.js";import{p as z}from"../chunks/B-yl15ta.js";import{R as $,t as q,p as ee,W as te}from"../chunks/CO7K4bD2.js";const ae=!1,re=!1,oe="never",xe=Object.freeze(Object.defineProperty({__proto__:null,prerender:ae,ssr:re,trailingSlash:oe},Symbol.toStringTag,{value:"Module"}));var ne=B('<pre class="m-0 max-h-52 w-full max-w-2xl overflow-auto rounded-lg border border-line-1 bg-bg-1 p-3 text-left font-mono text-[11px] leading-relaxed text-fg-3"> </pre>'),se=B(`<div role="alert" class="flex h-full w-full flex-col items-center justify-center gap-5 overflow-auto bg-bg-0 px-6 py-10 text-center"><div class="flex flex-col items-center gap-2"><!> <h1 class="type-h2 m-0 text-fg-0">Something crashed while rendering</h1> <p class="m-0 max-w-lg text-[13px] leading-relaxed text-fg-2">The workspace hit an unexpected error. Your connection is untouched —
|
|
2
|
+
retry the render, or reload the window to start clean.</p></div> <p class="m-0 max-w-lg break-words font-mono text-[12px] text-accent"> </p> <!> <div class="flex items-center gap-2"><button type="button" class="inline-flex h-9 items-center gap-1.5 rounded-lg bg-accent px-3 text-[12px] font-medium text-white hover:bg-accent/90"><!> Retry render</button> <button type="button" class="inline-flex h-9 items-center gap-1.5 rounded-lg border border-line-1 bg-bg-1 px-3 text-[12px] font-medium text-fg-1 hover:bg-bg-2"><!> Reload window</button></div></div>`);function ie(e,r){function o(){typeof window<"u"&&window.location.reload()}function i(a){return a instanceof Error?a.message||a.name:String(a)}function h(a){return a instanceof Error&&a.stack?a.stack:null}var g=y(),k=w(g);X(k,{failed:(m,t=T,n=T)=>{var f=se(),R=c(f),H=c(R);P(H,{class:"size-8 text-fg-3",strokeWidth:1.4}),K(4),d(R);var S=x(R,2),L=c(S,!0);d(S);var E=x(S,2);{var N=l=>{var u=ne(),I=c(u,!0);d(u),j(J=>C(I,J),[()=>h(t())]),p(l,u)},Y=_(()=>h(t()));G(E,l=>{s(Y)&&l(N)})}var O=x(E,2),b=c(O),A=c(b);P(A,{class:"size-3.5",strokeWidth:2}),K(),d(b);var W=x(b,2),F=c(W);$(F,{class:"size-3.5",strokeWidth:2}),K(),d(W),d(O),d(f),j(l=>C(L,l),[()=>i(t())]),M("click",b,function(...l){var u;(u=n())==null||u.apply(this,l)}),M("click",W,o),p(m,f)}},m=>{var t=y(),n=w(t);D(n,()=>r.children),p(m,t)}),p(e,g)}V(["click"]);function le(e){return e instanceof MouseEvent?e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey:!1}function ce(){const e=_(()=>ee(z.url.pathname.slice(v.length)||"/"));return{get view(){return s(e).view},get collection(){return s(e).collection},get subpage(){return s(e).subpage},get path(){return z.url.pathname},href:r=>v+q(r),go:(r,o,i)=>{le(o)||(o==null||o.preventDefault(),Z(v+q(r),{replaceState:i??!1}))}}}function ve(e,r){Q(r,!0);const o=ce(),i=_(()=>z.url.pathname.slice(v.length)||"/"),h=_(()=>s(i)==="/graph"||s(i)==="/shadow-dom-spike"||s(i)==="/redwire-ws-spike");var g=y(),k=w(g);{var a=t=>{var n=y(),f=w(n);D(f,()=>r.children),p(t,n)},m=t=>{ie(t,{children:(n,f)=>{te(n,{get router(){return o}})}})};G(k,t=>{s(h)?t(a):t(m,-1)})}p(e,g),U()}export{ve as component,xe as universal};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../chunks/Bzak7iHL.js";import{b9 as u,aq as b,bw as v,bG as c,b6 as g,a6 as s,bg as o}from"../chunks/CGFL56WJ.js";import{a as l,k as _,u as p}from"../chunks/DN7v3Tar.js";import{p as m}from"../chunks/B-yl15ta.js";var x=_("<h1> </h1> <p> </p>",1);function E(i,f){u(f,!0);var a=x(),r=b(a),h=s(r,!0);o(r);var t=v(r,2),n=s(t,!0);o(t),c(()=>{var e;p(h,m.status),p(n,(e=m.error)==null?void 0:e.message)}),l(i,a),g()}export{E as component};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"../chunks/Bzak7iHL.js";import{a as Lt}from"../chunks/Btd6PFkC.js";import{aq as j,b9 as Nt,b6 as zt,bm as g,al as It,$ as jt,a6 as i,at as n,bg as s,bz as V,bw as m,b2 as Ve,bG as I,bN as re}from"../chunks/CGFL56WJ.js";import{
|
|
1
|
+
import"../chunks/Bzak7iHL.js";import{a as Lt}from"../chunks/Btd6PFkC.js";import{aq as j,b9 as Nt,b6 as zt,bm as g,al as It,$ as jt,a6 as i,at as n,bg as s,bz as V,bw as m,b2 as Ve,bG as I,bN as re}from"../chunks/CGFL56WJ.js";import{e as ae,a as x,h as Et,k as S,u as y,i as Y,j as Gt,w as Le}from"../chunks/DN7v3Tar.js";import{i as T}from"../chunks/DCJ0QyYH.js";import{k as At}from"../chunks/DRlh90Cv.js";import{I as he,B as _e,i as Ft,F as Ye,e as Mt,E as Rt,b as Tt,L as Pt,G as Ot,m as Pe,r as Oe}from"../chunks/CxnvJShw.js";import{h as Dt}from"../chunks/BgOTHNR5.js";import{e as Ke,j as Qe,r as Ut,d as qt,k as Bt}from"../chunks/C3SGj6Qd.js";import{l as ye,s as $e,b as Jt}from"../chunks/BRIMmWzq.js";import{p as Ht}from"../chunks/B-yl15ta.js";import"../chunks/69_IOA4Y.js";function Vt(e,t){const o=ye(t,["children","$$slots","$$events","$$legacy"]);/**
|
|
2
2
|
* @license lucide-svelte v0.475.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* ISC License
|
|
@@ -93,4 +93,4 @@ import"../chunks/Bzak7iHL.js";import{a as Lt}from"../chunks/Btd6PFkC.js";import{
|
|
|
93
93
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
94
94
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
95
95
|
*
|
|
96
|
-
*/const r=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}],["polyline",{points:"17 8 12 3 7 8"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15"}]];he(e,$e({name:"upload"},()=>o,{get iconNode(){return r},children:(a,u)=>{var l=ae(),f=j(l);_e(f,t,"default",{},null),x(a,l)},$$slots:{default:!0}}))}const ze=1;class $ extends Error{constructor(t){super(t),this.name="GraphContractError"}}function ee(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function K(e,t){for(const o of t){const r=e[o];if(r!=null&&r!=="")return r}}function Zt(e){const t=K(e,["version","schema_version","schemaVersion"]);if(typeof t!="string"||t.trim()==="")throw new $(`Graph export is missing a "version" string. This viewer supports the version ${ze}.x contract.`);const o=Number.parseInt(t.split(".")[0]??"",10);if(!Number.isFinite(o))throw new $(`Graph export declares an unparseable version "${t}". This viewer supports version ${ze}.x.`);if(o!==ze)throw new $(`Unsupported graph export version "${t}". This viewer supports version ${ze}.x.`);return t}function Wt(e,t){if(!ee(e))throw new $(`Graph node at index ${t} is not an object.`);const o=K(e,["id","rid","_id","uid"]);if(o===void 0)throw new $(`Graph node at index ${t} is missing the required "id" field.`);const r=String(o),a=K(e,["label","name","title"]),u=K(e,["type","node_type","kind"]),l=e.community;return{id:r,label:a!==void 0?String(a):r,type:u!==void 0?String(u):void 0,community:typeof l=="number"?l:void 0,data:e}}function Xt(e,t){if(!ee(e))throw new $(`Graph edge at index ${t} is not an object.`);const o=K(e,["source","from","src","start","from_rid"]);if(o===void 0)throw new $(`Graph edge at index ${t} is missing the required "source" field.`);const r=K(e,["target","to","dst","end","to_rid"]);if(r===void 0)throw new $(`Graph edge at index ${t} is missing the required "target" field.`);const a=K(e,["kind","type","label","rel"]),u=String(o),l=String(r),f=K(e,["id","rid"]);return{id:f!==void 0?String(f):`${u}->${l}:${a??""}#${t}`,source:u,target:l,type:a!==void 0?String(a):void 0,data:e}}function en(e){if(e==null)return[];if(!Array.isArray(e))throw new $('Graph export "communities" must be an array when present.');return e.map((t,o)=>{if(!ee(t))throw new $(`Community at index ${o} is not an object.`);if(typeof t.id!="number")throw new $(`Community at index ${o} is missing a numeric "id".`);const r=t.id;return{id:r,label:typeof t.label=="string"?t.label:`Community ${r}`,color:typeof t.color=="string"?t.color:Ft(r),size:typeof t.size=="number"?t.size:0}})}function tn(e,t){const o={};for(const a of e)o[a.id]={...a.data,id:a.id,label:a.label,...a.type!==void 0?{node_type:a.type}:{}};const r={};for(const a of t)r[a.id]={...a.data,source:a.source,target:a.target,...a.type!==void 0?{type:a.type}:{}};return{ok:!0,query:"",capability:"graph",record_count:e.length+t.length,result:{columns:["nodes","edges"],records:[{values:{},nodes:o,edges:r}]}}}function nn(e){if(!ee(e))throw new $('Graph export must be a JSON object with "version" and graph data.');const t=ee(e.contract)?e.contract:null,o=Zt(t??e),r=t??(ee(e.graph)?e.graph:e),a=r.nodes,u=r.edges;if(!Array.isArray(a))throw new $('Graph export "nodes" must be an array.');if(!Array.isArray(u))throw new $('Graph export "edges" must be an array.');const l=a.map(Wt),f=u.map(Xt),p=en(e.communities??r.communities);return{version:o,model:{nodes:l,edges:f,communities:p},result:tn(l,f),meta:ee(e.meta)?e.meta:{}}}function Xe(e){let t;try{t=JSON.parse(e)}catch(o){const r=o instanceof Error?o.message:String(o);throw new $(`Graph export is not valid JSON: ${r}`)}return nn(t)}async function on(e,t={}){const o=t.fetch??globalThis.fetch;if(typeof o!="function")throw new $("No fetch implementation available to load the graph.");let r;try{r=await o(e)}catch(u){const l=u instanceof Error?u.message:String(u);throw new $(`Failed to fetch graph from "${e}": ${l}`)}if(!r.ok)throw new $(`Failed to load graph from "${e}": HTTP ${r.status} ${r.statusText}`.trim());const a=await r.text();return Xe(a)}const rn=["layer","layer_name","layerName","layer_id","layerId","domain","namespace"],an=["community","community_name","communityName","community_id","communityId"],sn=["component","component_name","componentName","component_id","componentId","package","module","service","collection","file","path"],et={id:"unassigned",label:"Unassigned",color:"#94a3b8"},ln=/^(#[0-9a-f]{3,8}|rgba?\([\d\s.,%+-]+\)|hsla?\([\d\s.,%+-]+\)|oklch\([\d\s.%+-]+(?:\/\s*[\d.]+%?)?\))$/i;function cn(e){const t=e.trim();return ln.test(t)?t:et.color}function xe(e,t){for(const o of t){const r=e[o];if(!(r==null||r==="")&&(typeof r=="string"||typeof r=="number"))return String(r)}return null}function Ie(e,t){return`${e}:${t.toLowerCase().replace(/[^a-z0-9._:/-]+/g,"-")}`}function dn(e){return new Map(e.communities.map(t=>[t.id,{label:t.label,color:cn(t.color)}]))}function un(e,t){const o=xe(e.data,rn);if(o)return{id:Ie("layer",o),label:o,color:"#94a3b8"};if(typeof e.community=="number"){const a=t.get(e.community);return{id:`community:${e.community}`,label:(a==null?void 0:a.label)??`Community ${e.community}`,color:(a==null?void 0:a.color)??"#94a3b8"}}const r=xe(e.data,an);return r?{id:Ie("community",r),label:r,color:"#94a3b8"}:et}function pn(e){const t=xe(e.data,sn);if(t)return{id:Ie("component",t),label:t};const o=e.type??xe(e.data,["node_type","kind"]);return o?{id:Ie("type",o),label:`${o} nodes`}:{id:"component:unassigned",label:"Unassigned"}}function Ze(e,t){let o=0,r=0,a=0;for(const u of t){const l=e.has(u.source),f=e.has(u.target);!l&&!f||(o+=1,l&&f?r+=1:a+=1)}return{connectionCount:o,internalConnectionCount:r,externalConnectionCount:a}}function fn(e,t){let o=0,r=0;for(const a of t)a.source===e.id&&(r+=1),a.target===e.id&&(o+=1);return{id:e.id,label:e.label,type:e.type??xe(e.data,["node_type","kind"])??"node",degree:o+r,incoming:o,outgoing:r}}function We(e,t){const o=t.nodeCount-e.nodeCount;if(o!==0)return o;const r=t.connectionCount-e.connectionCount;if(r!==0)return r;const a=e.label.localeCompare(t.label);return a!==0?a:e.id.localeCompare(t.id)}function vn(e){const t=dn(e),o=new Map;for(const a of e.nodes){const u=un(a,t),l=o.get(u.id);l?l.nodes.push(a):o.set(u.id,{...u,nodes:[a]})}return{layers:[...o.values()].map(a=>{const u=a.nodes.map(w=>w.id),l=new Set(u),f=Ze(l,e.edges),p=new Map;for(const w of a.nodes){const _=pn(w),C=p.get(_.id);C?C.nodes.push(w):p.set(_.id,{..._,nodes:[w]})}const D=[...p.values()].map(w=>{const _=w.nodes.map(U=>U.id),C=Ze(new Set(_),e.edges);return{id:w.id,label:w.label,nodeCount:w.nodes.length,nodeIds:_,nodes:w.nodes.map(U=>fn(U,e.edges)).sort((U,se)=>se.degree-U.degree||U.label.localeCompare(se.label)),...C}}).sort(We);return{id:a.id,label:a.label,color:a.color,nodeCount:a.nodes.length,componentCount:D.length,nodeIds:u,components:D,...f}}).sort(We)}}function mn(e,t){const o=t===null?null:new Set(t),r=o?e.nodes.filter(p=>o.has(p.id)):e.nodes,a=new Set(r.map(p=>p.id)),u=e.edges.filter(p=>a.has(p.source)&&a.has(p.target)),l={};for(const p of r)l[p.id]={...p.data,id:p.id,label:p.label,...p.type!==void 0?{node_type:p.type}:{}};const f={};for(const p of u)f[p.id]={...p.data,source:p.source,target:p.target,...p.type!==void 0?{type:p.type}:{}};return{ok:!0,query:"",capability:"graph",record_count:r.length+u.length,result:{columns:["nodes","edges"],records:[{values:{},nodes:l,edges:f}]}}}var gn=S('<button type="button" aria-label="Back" class="inline-flex size-6 items-center justify-center rounded border border-line-1 text-fg-3 hover:border-line-2 hover:text-fg-1"><!></button>'),bn=S('<span class="inline-flex size-6 items-center justify-center rounded border border-line-1 text-fg-3"><!></span>'),xn=S('<!> <button type="button"> </button>',1),hn=S('<!> <span class="truncate rounded bg-bg-2 px-1.5 py-0.5 text-fg-0"> </span>',1),_n=S('<button type="button" class="w-full px-3 py-2.5 text-left hover:bg-bg-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/40"><div class="flex items-start gap-2.5"><span class="mt-1.5 size-2 rounded-full shrink-0"></span> <span class="min-w-0 flex-1"><span class="flex items-center gap-2"><span class="truncate text-[13px] font-medium text-fg-0"> </span> <span class="font-mono text-[10px] text-fg-3"> </span></span> <span class="mt-1 block font-mono text-[11px] text-fg-3"> </span></span> <!></div></button>'),yn=S('<div class="px-3 py-2 text-[11px] font-mono text-fg-3 border-b border-line-1"> </div> <div class="divide-y divide-line-1"></div>',1),$n=S('<button type="button" class="w-full px-3 py-2.5 text-left hover:bg-bg-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/40"><div class="flex items-start gap-2.5"><span class="mt-1 text-fg-3"><!></span> <span class="min-w-0 flex-1"><span class="block truncate text-[13px] font-medium text-fg-0"> </span> <span class="mt-1 block font-mono text-[11px] text-fg-3"> </span></span> <!></div></button>'),wn=S('<div class="px-3 py-2 text-[11px] font-mono text-fg-3 border-b border-line-1"> </div> <div class="divide-y divide-line-1"></div>',1),Cn=S('<div class="px-3 py-2.5"><div class="flex items-start gap-2.5"><span class="mt-1 text-fg-3"><!></span> <span class="min-w-0 flex-1"><span class="block truncate text-[13px] font-medium text-fg-0"> </span> <span class="mt-1 block truncate font-mono text-[11px] text-fg-3"> </span></span></div></div>'),kn=S('<div class="px-3 py-2 text-[11px] font-mono text-fg-3 border-b border-line-1"> </div> <div class="divide-y divide-line-1"></div>',1),Sn=S('<div class="flex-1 min-h-0 overflow-auto"><!></div>'),Ln=S('<div class="flex items-center justify-between gap-4 px-3 py-2 border-b border-line-1 bg-bg-1 shrink-0"><span class="flex items-center gap-2 min-w-0 text-fg-2 text-[13px]"><!> <span class="font-mono text-fg-1 truncate max-w-[38vw]"> </span> <span class="text-fg-3 whitespace-nowrap"> <!></span></span> <button type="button" class="flex items-center gap-1.5 px-3 py-1.5 rounded-md border border-line-1 text-fg-2 text-[12px] hover:border-fg-3 hover:text-fg-1"><!> Load another</button></div> <div class="flex-1 min-h-0 flex"><aside class="w-[min(320px,48vw)] shrink-0 border-r border-line-1 bg-bg-1/80 flex flex-col min-h-0"><div class="px-3 py-2 border-b border-line-1"><div class="flex items-center gap-2 text-fg-1"><!> <div class="min-w-0"><div class="type-label"><!></div> <div class="truncate text-[12px] font-medium text-fg-0"> </div></div></div> <nav class="mt-2 flex min-w-0 items-center gap-1 text-[11px] font-mono text-fg-3"><button type="button">overview</button> <!> <!></nav></div> <!></aside> <div class="flex-1 min-w-0"><!></div></div>',1),Nn=S('<p class="m-0 px-3 py-2 rounded-md text-accent text-[12px] leading-relaxed border border-accent/35 bg-accent/10"> </p>'),zn=S('<div class="flex flex-col gap-3 w-[min(34rem,90vw)] text-left"><form class="flex gap-2"><div class="relative flex-1 flex items-center"><!> <input class="w-full pl-8 pr-2.5 py-2 bg-bg-2 border border-line-1 rounded-md text-fg-1 text-[13px] font-mono focus:outline-none focus:border-accent" type="text" placeholder="https://host/graph.json or /exports/memory.json" spellcheck="false" autocapitalize="off" autocorrect="off"/></div> <button class="px-4 py-2 bg-accent text-white rounded-md text-[13px] font-medium whitespace-nowrap disabled:opacity-50" type="submit"> </button></form> <div class="flex items-center gap-2 text-fg-3 text-[11px] uppercase tracking-wide"><span class="flex-1 h-px bg-line-1"></span> or <span class="flex-1 h-px bg-line-1"></span></div> <button type="button" class="flex items-center justify-center gap-2 px-3 py-2 bg-bg-2 border border-line-1 rounded-md text-fg-1 text-[13px] hover:border-fg-3 disabled:opacity-50"><!> Choose a local graph.json</button> <input type="file" accept="application/json,.json" class="hidden"/> <!></div>'),In=S('<div class="flex items-center justify-center h-full w-full p-8"><!></div>'),jn=S('<div class="flex h-screen w-full flex-col"><!></div>');function Bn(e,t){Nt(t,!0);let o=V(null),r=V(!1),a=V(null),u=V(null),l=V(null),f=V(null),p=V(""),D=V(null);const w=re(()=>n(o)?vn(n(o).model):null),_=re(()=>{var d;return n(l)?(d=n(w))==null?void 0:d.layers.find(b=>b.id===n(l)):void 0}),C=re(()=>{var d;return n(f)?(d=n(_))==null?void 0:d.components.find(b=>b.id===n(f)):void 0}),U=re(()=>n(C)?n(C).nodeIds:n(_)?n(_).nodeIds:null),se=re(()=>n(o)?mn(n(o).model,n(U)):null),tt=re(()=>`${n(u)??"graph"}:${n(l)??"overview"}:${n(f)??"all"}`);async function De(d){const b=d.trim();if(b){g(r,!0),g(a,null);try{g(o,await on(b,{fetch}),!0),g(u,b,!0),we()}catch(z){g(o,null),g(a,z instanceof Error?z.message:String(z),!0)}finally{g(r,!1)}}}async function nt(d){g(r,!0),g(a,null);try{g(o,Xe(await d.text()),!0),g(u,d.name,!0),we()}catch(b){g(o,null),g(a,b instanceof Error?b.message:String(b),!0)}finally{g(r,!1)}}function ot(d){d.preventDefault(),De(n(p))}function rt(d){var z;const b=(z=d.target.files)==null?void 0:z[0];b&&nt(b)}function at(){g(o,null),g(a,null),g(u,null),g(p,""),we(),n(D)&&(n(D).value="")}function we(){g(l,null),g(f,null)}function st(d){g(l,d.id,!0),g(f,null)}function it(d){g(f,d.id,!0)}function lt(){if(n(f)){g(f,null);return}g(l,null)}function P(d,b){return`${d.toLocaleString()} ${b}${d===1?"":"s"}`}function je(d){const b=P(d.connectionCount,"connection");return d.externalConnectionCount===0?b:`${b} · ${d.externalConnectionCount.toLocaleString()} external`}Lt(()=>{const d=Ht.url.searchParams.get("src");d&&(g(p,d,!0),De(d))});var Ee=jn();Dt("315y67",d=>{It(()=>{jt.title="Load graph · red-ui"})});var ct=i(Ee);{var dt=d=>{var b=Ln(),z=j(b),Ce=i(z),ke=i(Ce);Ye(ke,{size:14});var Q=m(ke,2),te=i(Q,!0);s(Q);var ne=m(Q,2),ie=i(ne),le=m(ie);{var ce=c=>{var v=Le();I(()=>y(v,`· ${n(o).model.communities.length??""} communities`)),x(c,v)};T(le,c=>{n(o).model.communities.length&&c(ce)})}s(ne),s(Ce);var de=m(Ce,2),Z=i(de);Mt(Z,{size:13}),Ve(),s(de),s(z);var Se=m(z,2),W=i(Se),ue=i(W),pe=i(ue),L=i(pe);{var fe=c=>{var v=gn(),k=i(v);Vt(k,{size:13}),s(v),Y("click",v,lt),x(c,v)},Ge=c=>{var v=bn(),k=i(v);Pt(k,{size:13}),s(v),x(c,v)};T(L,c=>{n(_)?c(fe):c(Ge,-1)})}var Ue=m(L,2),Ae=i(Ue),pt=i(Ae);{var ft=c=>{var v=Le("nodes");x(c,v)},vt=c=>{var v=Le("components");x(c,v)},mt=c=>{var v=Le("overview");x(c,v)};T(pt,c=>{n(C)?c(ft):n(_)?c(vt,1):c(mt,-1)})}s(Ae);var qe=m(Ae,2),gt=i(qe,!0);s(qe),s(Ue),s(pe);var Be=m(pe,2),Fe=i(Be),Je=m(Fe,2);{var bt=c=>{var v=xn(),k=j(v);Ne(k,{size:12,class:"shrink-0"});var E=m(k,2),ve=i(E,!0);s(E),I(Me=>{Qe(E,1,Me),y(ve,n(_).label)},[()=>Ke(["truncate rounded px-1.5 py-0.5 hover:bg-bg-2 hover:text-fg-1",n(_)&&!n(C)?"text-fg-0 bg-bg-2":""].join(" "))]),Y("click",E,()=>g(f,null)),x(c,v)};T(Je,c=>{n(_)&&c(bt)})}var xt=m(Je,2);{var ht=c=>{var v=hn(),k=j(v);Ne(k,{size:12,class:"shrink-0"});var E=m(k,2),ve=i(E,!0);s(E),I(()=>y(ve,n(C).label)),x(c,v)};T(xt,c=>{n(C)&&c(ht)})}s(Be),s(ue);var _t=m(ue,2);{var yt=c=>{var v=Sn(),k=i(v);{var E=O=>{var q=yn(),G=j(q),me=i(G);s(G);var B=m(G,2);Pe(B,21,()=>n(w).layers,Oe,(A,h)=>{var N=_n(),J=i(N),M=i(J),X=m(M,2),R=i(X),F=i(R),ge=i(F,!0);s(F);var H=m(F,2),be=i(H,!0);s(H),s(R);var oe=m(R,2),Re=i(oe);s(oe),s(X);var Te=m(X,2);Ne(Te,{size:14,class:"mt-1 shrink-0 text-fg-3"}),s(J),s(N),I((Ct,kt,St)=>{Bt(M,`background:${n(h).color};box-shadow:0 0 8px ${n(h).color}`),y(ge,n(h).label),y(be,Ct),y(Re,`${kt??""} · ${St??""}`)},[()=>P(n(h).componentCount,"component"),()=>P(n(h).nodeCount,"node"),()=>je(n(h))]),Y("click",N,()=>st(n(h))),x(A,N)}),s(B),I((A,h)=>y(me,`${A??""} · ${h??""}`),[()=>P(n(w).layers.length,"group"),()=>P(n(o).model.nodes.length,"node")]),x(O,q)},ve=O=>{var q=wn(),G=j(q),me=i(G);s(G);var B=m(G,2);Pe(B,21,()=>n(_).components,Oe,(A,h)=>{var N=$n(),J=i(N),M=i(J),X=i(M);Yt(X,{size:14}),s(M);var R=m(M,2),F=i(R),ge=i(F,!0);s(F);var H=m(F,2),be=i(H);s(H),s(R);var oe=m(R,2);Ne(oe,{size:14,class:"mt-1 shrink-0 text-fg-3"}),s(J),s(N),I((Re,Te)=>{y(ge,n(h).label),y(be,`${Re??""} · ${Te??""}`)},[()=>P(n(h).nodeCount,"node"),()=>je(n(h))]),Y("click",N,()=>it(n(h))),x(A,N)}),s(B),I((A,h)=>y(me,`${A??""} · ${h??""}`),[()=>P(n(_).components.length,"component"),()=>P(n(_).nodeCount,"node")]),x(O,q)},Me=O=>{var q=kn(),G=j(q),me=i(G);s(G);var B=m(G,2);Pe(B,21,()=>n(C).nodes,Oe,(A,h)=>{var N=Cn(),J=i(N),M=i(J),X=i(M);Kt(X,{size:13}),s(M);var R=m(M,2),F=i(R),ge=i(F,!0);s(F);var H=m(F,2),be=i(H);s(H),s(R),s(J),s(N),I(oe=>{y(ge,n(h).label),y(be,`${n(h).type??""} · degree ${oe??""} · ${n(h).id??""}`)},[()=>n(h).degree.toLocaleString()]),x(A,N)}),s(B),I((A,h)=>y(me,`${A??""} · ${h??""}`),[()=>P(n(C).nodes.length,"node"),()=>je(n(C))]),x(O,q)};T(k,O=>{n(_)?n(C)?O(Me,-1):O(ve,1):O(E)})}s(v),x(c,v)};T(_t,c=>{n(w)&&c(yt)})}s(W);var He=m(W,2),$t=i(He);{var wt=c=>{var v=ae(),k=j(v);At(k,()=>n(tt),E=>{Ot(E,{get result(){return n(se)}})}),x(c,v)};T($t,c=>{n(se)&&c(wt)})}s(He),s(Se),I(c=>{var v,k;y(te,n(u)),y(ie,`${n(o).model.nodes.length??""} nodes · ${n(o).model.edges.length??""} edges`),y(gt,((v=n(C))==null?void 0:v.label)??((k=n(_))==null?void 0:k.label)??"Layers and communities"),Qe(Fe,1,c)},[()=>Ke(["truncate rounded px-1.5 py-0.5 hover:bg-bg-2 hover:text-fg-1",n(_)?"":"text-fg-0 bg-bg-2"].join(" "))]),Y("click",de,at),Y("click",Fe,we),x(d,b)},ut=d=>{var b=In(),z=i(b);Rt(z,{title:"Load a graph",message:"Render any contract-conformant graph.json — memory exports, codebase graphs, or graphify output — from a URL, a path, or a local file. No connection required.",get icon(){return Ye},actions:ke=>{var Q=zn(),te=i(Q),ne=i(te),ie=i(ne);Tt(ie,{size:15,class:"absolute left-2.5 text-fg-3 pointer-events-none"});var le=m(ie,2);Ut(le),s(ne);var ce=m(ne,2),de=i(ce,!0);s(ce),s(te);var Z=m(te,4),Se=i(Z);Qt(Se,{size:15}),Ve(),s(Z);var W=m(Z,2);Jt(W,L=>g(D,L),()=>n(D));var ue=m(W,2);{var pe=L=>{var fe=Nn(),Ge=i(fe,!0);s(fe),I(()=>y(Ge,n(a))),x(L,fe)};T(ue,L=>{n(a)&&L(pe)})}s(Q),I(L=>{le.disabled=n(r),ce.disabled=L,y(de,n(r)?"Loading…":"Load"),Z.disabled=n(r)},[()=>n(r)||!n(p).trim()]),Gt("submit",te,ot),qt(le,()=>n(p),L=>g(p,L)),Y("click",Z,()=>{var L;return(L=n(D))==null?void 0:L.click()}),Y("change",W,rt),x(ke,Q)}}),s(b),x(d,b)};T(ct,d=>{n(o)?d(dt):d(ut,-1)})}s(Ee),x(e,Ee),zt()}Et(["click","change"]);export{Bn as component};
|
|
96
|
+
*/const r=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}],["polyline",{points:"17 8 12 3 7 8"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15"}]];he(e,$e({name:"upload"},()=>o,{get iconNode(){return r},children:(a,u)=>{var l=ae(),f=j(l);_e(f,t,"default",{},null),x(a,l)},$$slots:{default:!0}}))}const ze=1;class $ extends Error{constructor(t){super(t),this.name="GraphContractError"}}function ee(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function K(e,t){for(const o of t){const r=e[o];if(r!=null&&r!=="")return r}}function Zt(e){const t=K(e,["version","schema_version","schemaVersion"]);if(typeof t!="string"||t.trim()==="")throw new $(`Graph export is missing a "version" string. This viewer supports the version ${ze}.x contract.`);const o=Number.parseInt(t.split(".")[0]??"",10);if(!Number.isFinite(o))throw new $(`Graph export declares an unparseable version "${t}". This viewer supports version ${ze}.x.`);if(o!==ze)throw new $(`Unsupported graph export version "${t}". This viewer supports version ${ze}.x.`);return t}function Wt(e,t){if(!ee(e))throw new $(`Graph node at index ${t} is not an object.`);const o=K(e,["id","rid","_id","uid"]);if(o===void 0)throw new $(`Graph node at index ${t} is missing the required "id" field.`);const r=String(o),a=K(e,["label","name","title"]),u=K(e,["type","node_type","kind"]),l=e.community;return{id:r,label:a!==void 0?String(a):r,type:u!==void 0?String(u):void 0,community:typeof l=="number"?l:void 0,data:e}}function Xt(e,t){if(!ee(e))throw new $(`Graph edge at index ${t} is not an object.`);const o=K(e,["source","from","src","start","from_rid"]);if(o===void 0)throw new $(`Graph edge at index ${t} is missing the required "source" field.`);const r=K(e,["target","to","dst","end","to_rid"]);if(r===void 0)throw new $(`Graph edge at index ${t} is missing the required "target" field.`);const a=K(e,["kind","type","label","rel"]),u=String(o),l=String(r),f=K(e,["id","rid"]);return{id:f!==void 0?String(f):`${u}->${l}:${a??""}#${t}`,source:u,target:l,type:a!==void 0?String(a):void 0,data:e}}function en(e){if(e==null)return[];if(!Array.isArray(e))throw new $('Graph export "communities" must be an array when present.');return e.map((t,o)=>{if(!ee(t))throw new $(`Community at index ${o} is not an object.`);if(typeof t.id!="number")throw new $(`Community at index ${o} is missing a numeric "id".`);const r=t.id;return{id:r,label:typeof t.label=="string"?t.label:`Community ${r}`,color:typeof t.color=="string"?t.color:Ft(r),size:typeof t.size=="number"?t.size:0}})}function tn(e,t){const o={};for(const a of e)o[a.id]={...a.data,id:a.id,label:a.label,...a.type!==void 0?{node_type:a.type}:{}};const r={};for(const a of t)r[a.id]={...a.data,source:a.source,target:a.target,...a.type!==void 0?{type:a.type}:{}};return{ok:!0,query:"",capability:"graph",record_count:e.length+t.length,result:{columns:["nodes","edges"],records:[{values:{},nodes:o,edges:r}]}}}function nn(e){if(!ee(e))throw new $('Graph export must be a JSON object with "version" and graph data.');const t=ee(e.contract)?e.contract:null,o=Zt(t??e),r=t??(ee(e.graph)?e.graph:e),a=r.nodes,u=r.edges;if(!Array.isArray(a))throw new $('Graph export "nodes" must be an array.');if(!Array.isArray(u))throw new $('Graph export "edges" must be an array.');const l=a.map(Wt),f=u.map(Xt),p=en(e.communities??r.communities);return{version:o,model:{nodes:l,edges:f,communities:p},result:tn(l,f),meta:ee(e.meta)?e.meta:{}}}function Xe(e){let t;try{t=JSON.parse(e)}catch(o){const r=o instanceof Error?o.message:String(o);throw new $(`Graph export is not valid JSON: ${r}`)}return nn(t)}async function on(e,t={}){const o=t.fetch??globalThis.fetch;if(typeof o!="function")throw new $("No fetch implementation available to load the graph.");let r;try{r=await o(e)}catch(u){const l=u instanceof Error?u.message:String(u);throw new $(`Failed to fetch graph from "${e}": ${l}`)}if(!r.ok)throw new $(`Failed to load graph from "${e}": HTTP ${r.status} ${r.statusText}`.trim());const a=await r.text();return Xe(a)}const rn=["layer","layer_name","layerName","layer_id","layerId","domain","namespace"],an=["community","community_name","communityName","community_id","communityId"],sn=["component","component_name","componentName","component_id","componentId","package","module","service","collection","file","path"],et={id:"unassigned",label:"Unassigned",color:"#94a3b8"},ln=/^(#[0-9a-f]{3,8}|rgba?\([\d\s.,%+-]+\)|hsla?\([\d\s.,%+-]+\)|oklch\([\d\s.%+-]+(?:\/\s*[\d.]+%?)?\))$/i;function cn(e){const t=e.trim();return ln.test(t)?t:et.color}function xe(e,t){for(const o of t){const r=e[o];if(!(r==null||r==="")&&(typeof r=="string"||typeof r=="number"))return String(r)}return null}function Ie(e,t){return`${e}:${t.toLowerCase().replace(/[^a-z0-9._:/-]+/g,"-")}`}function dn(e){return new Map(e.communities.map(t=>[t.id,{label:t.label,color:cn(t.color)}]))}function un(e,t){const o=xe(e.data,rn);if(o)return{id:Ie("layer",o),label:o,color:"#94a3b8"};if(typeof e.community=="number"){const a=t.get(e.community);return{id:`community:${e.community}`,label:(a==null?void 0:a.label)??`Community ${e.community}`,color:(a==null?void 0:a.color)??"#94a3b8"}}const r=xe(e.data,an);return r?{id:Ie("community",r),label:r,color:"#94a3b8"}:et}function pn(e){const t=xe(e.data,sn);if(t)return{id:Ie("component",t),label:t};const o=e.type??xe(e.data,["node_type","kind"]);return o?{id:Ie("type",o),label:`${o} nodes`}:{id:"component:unassigned",label:"Unassigned"}}function Ze(e,t){let o=0,r=0,a=0;for(const u of t){const l=e.has(u.source),f=e.has(u.target);!l&&!f||(o+=1,l&&f?r+=1:a+=1)}return{connectionCount:o,internalConnectionCount:r,externalConnectionCount:a}}function fn(e,t){let o=0,r=0;for(const a of t)a.source===e.id&&(r+=1),a.target===e.id&&(o+=1);return{id:e.id,label:e.label,type:e.type??xe(e.data,["node_type","kind"])??"node",degree:o+r,incoming:o,outgoing:r}}function We(e,t){const o=t.nodeCount-e.nodeCount;if(o!==0)return o;const r=t.connectionCount-e.connectionCount;if(r!==0)return r;const a=e.label.localeCompare(t.label);return a!==0?a:e.id.localeCompare(t.id)}function vn(e){const t=dn(e),o=new Map;for(const a of e.nodes){const u=un(a,t),l=o.get(u.id);l?l.nodes.push(a):o.set(u.id,{...u,nodes:[a]})}return{layers:[...o.values()].map(a=>{const u=a.nodes.map(w=>w.id),l=new Set(u),f=Ze(l,e.edges),p=new Map;for(const w of a.nodes){const _=pn(w),k=p.get(_.id);k?k.nodes.push(w):p.set(_.id,{..._,nodes:[w]})}const D=[...p.values()].map(w=>{const _=w.nodes.map(U=>U.id),k=Ze(new Set(_),e.edges);return{id:w.id,label:w.label,nodeCount:w.nodes.length,nodeIds:_,nodes:w.nodes.map(U=>fn(U,e.edges)).sort((U,se)=>se.degree-U.degree||U.label.localeCompare(se.label)),...k}}).sort(We);return{id:a.id,label:a.label,color:a.color,nodeCount:a.nodes.length,componentCount:D.length,nodeIds:u,components:D,...f}}).sort(We)}}function mn(e,t){const o=t===null?null:new Set(t),r=o?e.nodes.filter(p=>o.has(p.id)):e.nodes,a=new Set(r.map(p=>p.id)),u=e.edges.filter(p=>a.has(p.source)&&a.has(p.target)),l={};for(const p of r)l[p.id]={...p.data,id:p.id,label:p.label,...p.type!==void 0?{node_type:p.type}:{}};const f={};for(const p of u)f[p.id]={...p.data,source:p.source,target:p.target,...p.type!==void 0?{type:p.type}:{}};return{ok:!0,query:"",capability:"graph",record_count:r.length+u.length,result:{columns:["nodes","edges"],records:[{values:{},nodes:l,edges:f}]}}}var gn=S('<button type="button" aria-label="Back" class="inline-flex size-6 items-center justify-center rounded border border-line-1 text-fg-3 hover:border-line-2 hover:text-fg-1"><!></button>'),bn=S('<span class="inline-flex size-6 items-center justify-center rounded border border-line-1 text-fg-3"><!></span>'),xn=S('<!> <button type="button"> </button>',1),hn=S('<!> <span class="truncate rounded bg-bg-2 px-1.5 py-0.5 text-fg-0"> </span>',1),_n=S('<button type="button" class="w-full px-3 py-2.5 text-left hover:bg-bg-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/40"><div class="flex items-start gap-2.5"><span class="mt-1.5 size-2 rounded-full shrink-0"></span> <span class="min-w-0 flex-1"><span class="flex items-center gap-2"><span class="truncate text-[13px] font-medium text-fg-0"> </span> <span class="font-mono text-[10px] text-fg-3"> </span></span> <span class="mt-1 block font-mono text-[11px] text-fg-3"> </span></span> <!></div></button>'),yn=S('<div class="px-3 py-2 text-[11px] font-mono text-fg-3 border-b border-line-1"> </div> <div class="divide-y divide-line-1"></div>',1),$n=S('<button type="button" class="w-full px-3 py-2.5 text-left hover:bg-bg-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/40"><div class="flex items-start gap-2.5"><span class="mt-1 text-fg-3"><!></span> <span class="min-w-0 flex-1"><span class="block truncate text-[13px] font-medium text-fg-0"> </span> <span class="mt-1 block font-mono text-[11px] text-fg-3"> </span></span> <!></div></button>'),wn=S('<div class="px-3 py-2 text-[11px] font-mono text-fg-3 border-b border-line-1"> </div> <div class="divide-y divide-line-1"></div>',1),kn=S('<div class="px-3 py-2.5"><div class="flex items-start gap-2.5"><span class="mt-1 text-fg-3"><!></span> <span class="min-w-0 flex-1"><span class="block truncate text-[13px] font-medium text-fg-0"> </span> <span class="mt-1 block truncate font-mono text-[11px] text-fg-3"> </span></span></div></div>'),Cn=S('<div class="px-3 py-2 text-[11px] font-mono text-fg-3 border-b border-line-1"> </div> <div class="divide-y divide-line-1"></div>',1),Sn=S('<div class="flex-1 min-h-0 overflow-auto"><!></div>'),Ln=S('<div class="flex items-center justify-between gap-4 px-3 py-2 border-b border-line-1 bg-bg-1 shrink-0"><span class="flex items-center gap-2 min-w-0 text-fg-2 text-[13px]"><!> <span class="font-mono text-fg-1 truncate max-w-[38vw]"> </span> <span class="text-fg-3 whitespace-nowrap"> <!></span></span> <button type="button" class="flex items-center gap-1.5 px-3 py-1.5 rounded-md border border-line-1 text-fg-2 text-[12px] hover:border-fg-3 hover:text-fg-1"><!> Load another</button></div> <div class="flex-1 min-h-0 flex"><aside class="w-[min(320px,48vw)] shrink-0 border-r border-line-1 bg-bg-1/80 flex flex-col min-h-0"><div class="px-3 py-2 border-b border-line-1"><div class="flex items-center gap-2 text-fg-1"><!> <div class="min-w-0"><div class="type-label"><!></div> <div class="truncate text-[12px] font-medium text-fg-0"> </div></div></div> <nav class="mt-2 flex min-w-0 items-center gap-1 text-[11px] font-mono text-fg-3"><button type="button">overview</button> <!> <!></nav></div> <!></aside> <div class="flex-1 min-w-0"><!></div></div>',1),Nn=S('<p class="m-0 px-3 py-2 rounded-md text-accent text-[12px] leading-relaxed border border-accent/35 bg-accent/10"> </p>'),zn=S('<div class="flex flex-col gap-3 w-[min(34rem,90vw)] text-left"><form class="flex gap-2"><div class="relative flex-1 flex items-center"><!> <input class="w-full pl-8 pr-2.5 py-2 bg-bg-2 border border-line-1 rounded-md text-fg-1 text-[13px] font-mono focus:outline-none focus:border-accent" type="text" placeholder="https://host/graph.json or /exports/memory.json" spellcheck="false" autocapitalize="off" autocorrect="off"/></div> <button class="px-4 py-2 bg-accent text-white rounded-md text-[13px] font-medium whitespace-nowrap disabled:opacity-50" type="submit"> </button></form> <div class="flex items-center gap-2 text-fg-3 text-[11px] uppercase tracking-wide"><span class="flex-1 h-px bg-line-1"></span> or <span class="flex-1 h-px bg-line-1"></span></div> <button type="button" class="flex items-center justify-center gap-2 px-3 py-2 bg-bg-2 border border-line-1 rounded-md text-fg-1 text-[13px] hover:border-fg-3 disabled:opacity-50"><!> Choose a local graph.json</button> <input type="file" accept="application/json,.json" class="hidden"/> <!></div>'),In=S('<div class="flex items-center justify-center h-full w-full p-8"><!></div>'),jn=S('<div class="flex h-screen w-full flex-col"><!></div>');function Bn(e,t){Nt(t,!0);let o=V(null),r=V(!1),a=V(null),u=V(null),l=V(null),f=V(null),p=V(""),D=V(null);const w=re(()=>n(o)?vn(n(o).model):null),_=re(()=>{var d;return n(l)?(d=n(w))==null?void 0:d.layers.find(b=>b.id===n(l)):void 0}),k=re(()=>{var d;return n(f)?(d=n(_))==null?void 0:d.components.find(b=>b.id===n(f)):void 0}),U=re(()=>n(k)?n(k).nodeIds:n(_)?n(_).nodeIds:null),se=re(()=>n(o)?mn(n(o).model,n(U)):null),tt=re(()=>`${n(u)??"graph"}:${n(l)??"overview"}:${n(f)??"all"}`);async function De(d){const b=d.trim();if(b){g(r,!0),g(a,null);try{g(o,await on(b,{fetch}),!0),g(u,b,!0),we()}catch(z){g(o,null),g(a,z instanceof Error?z.message:String(z),!0)}finally{g(r,!1)}}}async function nt(d){g(r,!0),g(a,null);try{g(o,Xe(await d.text()),!0),g(u,d.name,!0),we()}catch(b){g(o,null),g(a,b instanceof Error?b.message:String(b),!0)}finally{g(r,!1)}}function ot(d){d.preventDefault(),De(n(p))}function rt(d){var z;const b=(z=d.target.files)==null?void 0:z[0];b&&nt(b)}function at(){g(o,null),g(a,null),g(u,null),g(p,""),we(),n(D)&&(n(D).value="")}function we(){g(l,null),g(f,null)}function st(d){g(l,d.id,!0),g(f,null)}function it(d){g(f,d.id,!0)}function lt(){if(n(f)){g(f,null);return}g(l,null)}function P(d,b){return`${d.toLocaleString()} ${b}${d===1?"":"s"}`}function je(d){const b=P(d.connectionCount,"connection");return d.externalConnectionCount===0?b:`${b} · ${d.externalConnectionCount.toLocaleString()} external`}Lt(()=>{const d=Ht.url.searchParams.get("src");d&&(g(p,d,!0),De(d))});var Ee=jn();Dt("315y67",d=>{It(()=>{jt.title="Load graph · red-ui"})});var ct=i(Ee);{var dt=d=>{var b=Ln(),z=j(b),ke=i(z),Ce=i(ke);Ye(Ce,{size:14});var Q=m(Ce,2),te=i(Q,!0);s(Q);var ne=m(Q,2),ie=i(ne),le=m(ie);{var ce=c=>{var v=Le();I(()=>y(v,`· ${n(o).model.communities.length??""} communities`)),x(c,v)};T(le,c=>{n(o).model.communities.length&&c(ce)})}s(ne),s(ke);var de=m(ke,2),Z=i(de);Mt(Z,{size:13}),Ve(),s(de),s(z);var Se=m(z,2),W=i(Se),ue=i(W),pe=i(ue),L=i(pe);{var fe=c=>{var v=gn(),C=i(v);Vt(C,{size:13}),s(v),Y("click",v,lt),x(c,v)},Ge=c=>{var v=bn(),C=i(v);Pt(C,{size:13}),s(v),x(c,v)};T(L,c=>{n(_)?c(fe):c(Ge,-1)})}var Ue=m(L,2),Ae=i(Ue),pt=i(Ae);{var ft=c=>{var v=Le("nodes");x(c,v)},vt=c=>{var v=Le("components");x(c,v)},mt=c=>{var v=Le("overview");x(c,v)};T(pt,c=>{n(k)?c(ft):n(_)?c(vt,1):c(mt,-1)})}s(Ae);var qe=m(Ae,2),gt=i(qe,!0);s(qe),s(Ue),s(pe);var Be=m(pe,2),Fe=i(Be),Je=m(Fe,2);{var bt=c=>{var v=xn(),C=j(v);Ne(C,{size:12,class:"shrink-0"});var E=m(C,2),ve=i(E,!0);s(E),I(Me=>{Qe(E,1,Me),y(ve,n(_).label)},[()=>Ke(["truncate rounded px-1.5 py-0.5 hover:bg-bg-2 hover:text-fg-1",n(_)&&!n(k)?"text-fg-0 bg-bg-2":""].join(" "))]),Y("click",E,()=>g(f,null)),x(c,v)};T(Je,c=>{n(_)&&c(bt)})}var xt=m(Je,2);{var ht=c=>{var v=hn(),C=j(v);Ne(C,{size:12,class:"shrink-0"});var E=m(C,2),ve=i(E,!0);s(E),I(()=>y(ve,n(k).label)),x(c,v)};T(xt,c=>{n(k)&&c(ht)})}s(Be),s(ue);var _t=m(ue,2);{var yt=c=>{var v=Sn(),C=i(v);{var E=O=>{var q=yn(),G=j(q),me=i(G);s(G);var B=m(G,2);Pe(B,21,()=>n(w).layers,Oe,(A,h)=>{var N=_n(),J=i(N),M=i(J),X=m(M,2),R=i(X),F=i(R),ge=i(F,!0);s(F);var H=m(F,2),be=i(H,!0);s(H),s(R);var oe=m(R,2),Re=i(oe);s(oe),s(X);var Te=m(X,2);Ne(Te,{size:14,class:"mt-1 shrink-0 text-fg-3"}),s(J),s(N),I((kt,Ct,St)=>{Bt(M,`background:${n(h).color};box-shadow:0 0 8px ${n(h).color}`),y(ge,n(h).label),y(be,kt),y(Re,`${Ct??""} · ${St??""}`)},[()=>P(n(h).componentCount,"component"),()=>P(n(h).nodeCount,"node"),()=>je(n(h))]),Y("click",N,()=>st(n(h))),x(A,N)}),s(B),I((A,h)=>y(me,`${A??""} · ${h??""}`),[()=>P(n(w).layers.length,"group"),()=>P(n(o).model.nodes.length,"node")]),x(O,q)},ve=O=>{var q=wn(),G=j(q),me=i(G);s(G);var B=m(G,2);Pe(B,21,()=>n(_).components,Oe,(A,h)=>{var N=$n(),J=i(N),M=i(J),X=i(M);Yt(X,{size:14}),s(M);var R=m(M,2),F=i(R),ge=i(F,!0);s(F);var H=m(F,2),be=i(H);s(H),s(R);var oe=m(R,2);Ne(oe,{size:14,class:"mt-1 shrink-0 text-fg-3"}),s(J),s(N),I((Re,Te)=>{y(ge,n(h).label),y(be,`${Re??""} · ${Te??""}`)},[()=>P(n(h).nodeCount,"node"),()=>je(n(h))]),Y("click",N,()=>it(n(h))),x(A,N)}),s(B),I((A,h)=>y(me,`${A??""} · ${h??""}`),[()=>P(n(_).components.length,"component"),()=>P(n(_).nodeCount,"node")]),x(O,q)},Me=O=>{var q=Cn(),G=j(q),me=i(G);s(G);var B=m(G,2);Pe(B,21,()=>n(k).nodes,Oe,(A,h)=>{var N=kn(),J=i(N),M=i(J),X=i(M);Kt(X,{size:13}),s(M);var R=m(M,2),F=i(R),ge=i(F,!0);s(F);var H=m(F,2),be=i(H);s(H),s(R),s(J),s(N),I(oe=>{y(ge,n(h).label),y(be,`${n(h).type??""} · degree ${oe??""} · ${n(h).id??""}`)},[()=>n(h).degree.toLocaleString()]),x(A,N)}),s(B),I((A,h)=>y(me,`${A??""} · ${h??""}`),[()=>P(n(k).nodes.length,"node"),()=>je(n(k))]),x(O,q)};T(C,O=>{n(_)?n(k)?O(Me,-1):O(ve,1):O(E)})}s(v),x(c,v)};T(_t,c=>{n(w)&&c(yt)})}s(W);var He=m(W,2),$t=i(He);{var wt=c=>{var v=ae(),C=j(v);At(C,()=>n(tt),E=>{Ot(E,{get result(){return n(se)}})}),x(c,v)};T($t,c=>{n(se)&&c(wt)})}s(He),s(Se),I(c=>{var v,C;y(te,n(u)),y(ie,`${n(o).model.nodes.length??""} nodes · ${n(o).model.edges.length??""} edges`),y(gt,((v=n(k))==null?void 0:v.label)??((C=n(_))==null?void 0:C.label)??"Layers and communities"),Qe(Fe,1,c)},[()=>Ke(["truncate rounded px-1.5 py-0.5 hover:bg-bg-2 hover:text-fg-1",n(_)?"":"text-fg-0 bg-bg-2"].join(" "))]),Y("click",de,at),Y("click",Fe,we),x(d,b)},ut=d=>{var b=In(),z=i(b);Rt(z,{title:"Load a graph",message:"Render any contract-conformant graph.json — memory exports, codebase graphs, or graphify output — from a URL, a path, or a local file. No connection required.",get icon(){return Ye},actions:Ce=>{var Q=zn(),te=i(Q),ne=i(te),ie=i(ne);Tt(ie,{size:15,class:"absolute left-2.5 text-fg-3 pointer-events-none"});var le=m(ie,2);Ut(le),s(ne);var ce=m(ne,2),de=i(ce,!0);s(ce),s(te);var Z=m(te,4),Se=i(Z);Qt(Se,{size:15}),Ve(),s(Z);var W=m(Z,2);Jt(W,L=>g(D,L),()=>n(D));var ue=m(W,2);{var pe=L=>{var fe=Nn(),Ge=i(fe,!0);s(fe),I(()=>y(Ge,n(a))),x(L,fe)};T(ue,L=>{n(a)&&L(pe)})}s(Q),I(L=>{le.disabled=n(r),ce.disabled=L,y(de,n(r)?"Loading…":"Load"),Z.disabled=n(r)},[()=>n(r)||!n(p).trim()]),Gt("submit",te,ot),qt(le,()=>n(p),L=>g(p,L)),Y("click",Z,()=>{var L;return(L=n(D))==null?void 0:L.click()}),Y("change",W,rt),x(Ce,Q)}}),s(b),x(d,b)};T(ct,d=>{n(o)?d(dt):d(ut,-1)})}s(Ee),x(e,Ee),zt()}Et(["click","change"]);export{Bn as component};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import"../chunks/Bzak7iHL.js";import{b9 as J,bw as o,a6 as r,bG as R,at as s,bm as
|
|
1
|
+
import"../chunks/Bzak7iHL.js";import{b9 as J,bw as o,a6 as r,bG as R,at as s,bm as k,b6 as V,bz as l,bN as X,al as Y,$ as Z,bg as a,be as ee}from"../chunks/CGFL56WJ.js";import{h as te,u as b,i as re,a as x,k as u}from"../chunks/DN7v3Tar.js";import{i as W}from"../chunks/DCJ0QyYH.js";import{h as ae}from"../chunks/BgOTHNR5.js";import{d as E,r as Q}from"../chunks/C3SGj6Qd.js";const oe="/redwire",se={Query:1,Result:2,Error:3,QueryBinary:7,Hello:16,HelloAck:17,AuthResponse:19,AuthOk:20,AuthFail:21,Bye:22};new Map(Object.entries(se).map(([i,t])=>[t,i]));function ne(i){const t=new URL(i);return t.protocol==="wss:"||(t.protocol==="https:"?t.protocol="wss:":t.protocol==="http:"&&(t.protocol="ws:"),(t.pathname==="/"||t.pathname==="")&&(t.pathname=oe)),t.toString()}var le=u('<section class="rounded border border-line-1 bg-bg-1 p-4 text-[12px] text-fg-3">Enable with <span class="text-fg-1">VITE_REDWIRE_WS_SPIKE=1</span> or run in dev mode.</section>'),ie=u('<section class="rounded border border-danger/50 bg-bg-1 p-4 text-[12px] text-danger"><pre class="m-0 whitespace-pre-wrap"> </pre></section>'),de=u('<section class="rounded border border-line-1 bg-bg-1 p-4"><div class="mb-2 text-[12px] font-semibold text-fg-2">Decoded result</div> <pre class="m-0 max-h-[520px] overflow-auto text-[11px] leading-5 text-fg-2"> </pre></section>'),pe=u(`<main class="min-h-screen bg-bg-0 text-fg-1"><div class="mx-auto flex max-w-5xl flex-col gap-5 px-5 py-6 font-mono"><header class="flex flex-col gap-2 border-b border-line-1 pb-4"><div class="text-[11px] uppercase tracking-wide text-fg-3">Dev spike</div> <h1 class="text-xl font-semibold">RedWire over WebSocket</h1> <p class="max-w-3xl text-[12px] leading-5 text-fg-3">Opens a WSS RedWire endpoint, negotiates the versioned subprotocol, completes bearer auth,
|
|
2
2
|
sends one binary framed query, and decodes the result. This route is isolated from the
|
|
3
|
-
production transport path.</p></header> <!> <section class="grid gap-4 md:grid-cols-[1fr_1fr]"><label class="flex flex-col gap-1 text-[12px] text-fg-2">Endpoint origin or WSS URL <input class="h-9 rounded border border-line-2 bg-bg-1 px-2 text-fg-1 outline-none focus:border-accent"/></label> <label class="flex flex-col gap-1 text-[12px] text-fg-2">Bearer token <input class="h-9 rounded border border-line-2 bg-bg-1 px-2 text-fg-1 outline-none focus:border-accent" type="password"/></label></section> <label class="flex flex-col gap-1 text-[12px] text-fg-2">Query <textarea class="min-h-28 rounded border border-line-2 bg-bg-1 p-2 text-fg-1 outline-none focus:border-accent"></textarea></label> <div class="flex flex-wrap items-center gap-3"><button type="button" class="h-9 rounded border border-accent bg-accent px-3 text-[12px] font-semibold text-bg-0 disabled:cursor-not-allowed disabled:opacity-50"> </button> <div class="text-[11px] text-fg-3">Resolved endpoint: <span class="text-fg-2"> </span></div></div> <!> <!></div></main>`);function ve(i,t){J(t,!0);let c=l("https://localhost:5055"),A=l(""),D=l("SELECT 1"),U=l(!1),H=l(null),I=l(null);const
|
|
3
|
+
production transport path.</p></header> <!> <section class="grid gap-4 md:grid-cols-[1fr_1fr]"><label class="flex flex-col gap-1 text-[12px] text-fg-2">Endpoint origin or WSS URL <input class="h-9 rounded border border-line-2 bg-bg-1 px-2 text-fg-1 outline-none focus:border-accent"/></label> <label class="flex flex-col gap-1 text-[12px] text-fg-2">Bearer token <input class="h-9 rounded border border-line-2 bg-bg-1 px-2 text-fg-1 outline-none focus:border-accent" type="password"/></label></section> <label class="flex flex-col gap-1 text-[12px] text-fg-2">Query <textarea class="min-h-28 rounded border border-line-2 bg-bg-1 p-2 text-fg-1 outline-none focus:border-accent"></textarea></label> <div class="flex flex-wrap items-center gap-3"><button type="button" class="h-9 rounded border border-accent bg-accent px-3 text-[12px] font-semibold text-bg-0 disabled:cursor-not-allowed disabled:opacity-50"> </button> <div class="text-[11px] text-fg-3">Resolved endpoint: <span class="text-fg-2"> </span></div></div> <!> <!></div></main>`);function ve(i,t){J(t,!0);let c=l("https://localhost:5055"),A=l(""),D=l("SELECT 1"),U=l(!1),H=l(null),I=l(null);const F=X(()=>s(c).trim()?ne(s(c).trim()):"");async function K(){}var f=pe();ae("1ot6nxx",e=>{Y(()=>{Z.title="RedWire WS spike"})});var O=r(f),T=o(r(O),2);{var M=e=>{var n=le();x(e,n)};W(T,e=>{e(M)})}var g=o(T,2),v=r(g),m=o(r(v));Q(m),a(v);var $=o(v,2),h=o(r($));Q(h),a($),a(g);var _=o(g,2),w=o(r(_));ee(w),a(_);var S=o(_,2),d=r(S),N=r(d,!0);a(d);var q=o(d,2),B=o(r(q)),P=r(B,!0);a(B),a(q),a(S);var L=o(S,2);{var j=e=>{var n=ie(),p=r(n),y=r(p,!0);a(p),a(n),R(()=>b(y,s(I))),x(e,n)};W(L,e=>{s(I)&&e(j)})}var z=o(L,2);{var C=e=>{var n=de(),p=o(r(n),2),y=r(p,!0);a(p),a(n),R(G=>b(y,G),[()=>JSON.stringify(s(H),null,2)]),x(e,n)};W(z,e=>{s(H)&&e(C)})}a(O),a(f),R(e=>{m.disabled=!0,h.disabled=!0,w.disabled=!0,d.disabled=e,b(N,s(U)?"Running":"Run WSS query"),b(P,s(F)||"n/a")},[()=>!0]),E(m,()=>s(c),e=>k(c,e)),E(h,()=>s(A),e=>k(A,e)),E(w,()=>s(D),e=>k(D,e)),re("click",d,K),x(i,f),V()}te(["click"]);export{ve as component};
|