@reddb-io/ui 0.3.0 → 0.3.1
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.DgbuWrJy.css +1 -0
- package/build/_app/immutable/assets/AnalyticsView.BLAJezw4.css +1 -0
- package/build/_app/immutable/assets/{Workspace.CvP5De7i.css → Workspace.DM2E1WiF.css} +1 -1
- package/build/_app/immutable/chunks/85-Fh5Zp.js +404 -0
- package/build/_app/immutable/chunks/{C9rXzYLu.js → 8zg2gJwV.js} +1 -1
- package/build/_app/immutable/chunks/B5euRbKa.js +1 -0
- package/build/_app/immutable/chunks/BRIMmWzq.js +1 -0
- package/build/_app/immutable/chunks/BgOTHNR5.js +1 -0
- package/build/_app/immutable/chunks/Bq4DTWK2.js +2 -0
- package/build/_app/immutable/chunks/Btd6PFkC.js +1 -0
- package/build/_app/immutable/chunks/CGFL56WJ.js +1 -0
- package/build/_app/immutable/chunks/CJFJ501n.js +18 -0
- package/build/_app/immutable/chunks/CLBx21Hz.js +2 -0
- package/build/_app/immutable/chunks/CnD4hwxC.js +1106 -0
- package/build/_app/immutable/chunks/DCJ0QyYH.js +1 -0
- package/build/_app/immutable/chunks/DQCYUNtS.js +1 -0
- package/build/_app/immutable/chunks/DRlh90Cv.js +1 -0
- package/build/_app/immutable/chunks/{C278awGv.js → DV9PDoM3.js} +1 -1
- package/build/_app/immutable/entry/app.BDog2y0J.js +2 -0
- package/build/_app/immutable/entry/start.D1J45dq5.js +1 -0
- package/build/_app/immutable/nodes/0.BTrC4th2.js +1 -0
- package/build/_app/immutable/nodes/1.Ds1Tbjsm.js +1 -0
- package/build/_app/immutable/nodes/10.D_FCLs0Z.js +96 -0
- package/build/_app/immutable/nodes/12.DPE6v6Zf.js +3 -0
- package/build/_app/immutable/nodes/14.CAG5_cGP.js +1 -0
- package/build/_app/immutable/nodes/15.CcJlZGxa.js +60 -0
- package/build/_app/immutable/nodes/8.CAG5_cGP.js +1 -0
- package/build/_app/version.json +1 -1
- package/build/index.html +18 -15
- package/dist/embed/AnalyticsView-D8z1Nsed.js +23337 -0
- package/dist/embed/AnalyticsView-D8z1Nsed.js.map +1 -0
- package/dist/embed/RedUiEmbedRoot-CtqTd_FG.js +31302 -0
- package/dist/embed/RedUiEmbedRoot-CtqTd_FG.js.map +1 -0
- package/dist/embed/index-0hA141D2.js +85 -0
- package/dist/embed/index-0hA141D2.js.map +1 -0
- package/dist/embed/index-client-BeiP-va5.js +3303 -0
- package/dist/embed/index-client-BeiP-va5.js.map +1 -0
- package/dist/embed/index-w1Qo_uW0.js +677 -0
- package/dist/embed/index-w1Qo_uW0.js.map +1 -0
- package/dist/embed/index.js +1 -1
- package/dist/embed/{sigma.esm-D5yoExsH.js → sigma.esm-qqKBpvin.js} +2 -2
- package/dist/embed/{sigma.esm-D5yoExsH.js.map → sigma.esm-qqKBpvin.js.map} +1 -1
- package/package.json +5 -3
- package/src/app.css +86 -20
- package/src/lib/AnalyticsView.svelte +209 -0
- package/src/lib/AskView.svelte +255 -0
- package/src/lib/ClusterView.svelte +415 -95
- package/src/lib/CommandPalette.svelte +2 -0
- package/src/lib/GlobalProgressBar.svelte +9 -0
- package/src/lib/MetricChart.svelte +85 -0
- package/src/lib/QueryEditor.svelte +48 -7
- package/src/lib/ResultsPane.svelte +76 -8
- package/src/lib/SchemaTree.svelte +25 -1
- package/src/lib/SecurityView.svelte +176 -65
- package/src/lib/SettingsView.svelte +1111 -254
- package/src/lib/Topbar.svelte +29 -1
- package/src/lib/Workspace.svelte +18 -3
- package/src/lib/activity.svelte.ts +44 -35
- package/src/lib/collection-preview.ts +14 -0
- package/src/lib/connections.svelte.ts +73 -4
- package/src/lib/index.ts +3 -0
- package/src/lib/permission-gate.ts +120 -0
- package/src/lib/policies.ts +136 -0
- package/src/lib/query-tabs.svelte.ts +132 -53
- package/src/lib/reddb/analytics.ts +208 -0
- package/src/lib/reddb/ask.ts +123 -0
- package/src/lib/reddb/client.ts +159 -58
- package/src/lib/reddb/cluster-status.ts +306 -0
- package/src/lib/reddb/index.ts +3 -0
- package/src/lib/reddb/local-url-provider.ts +32 -1
- package/src/lib/reddb/redwire-ws-spike.ts +590 -0
- package/src/lib/router.svelte.ts +12 -0
- package/src/lib/settings-authoring-client.ts +336 -0
- package/src/lib/settings-sections.ts +292 -196
- package/build/_app/immutable/assets/0.DQDLkSdR.css +0 -1
- package/build/_app/immutable/chunks/65XjEwaF.js +0 -367
- package/build/_app/immutable/chunks/BGcIe2ep.js +0 -2
- package/build/_app/immutable/chunks/BjFADNkA.js +0 -992
- package/build/_app/immutable/chunks/BrvvOVaJ.js +0 -1
- package/build/_app/immutable/chunks/D9CTkMjK.js +0 -1
- package/build/_app/immutable/chunks/oiO4RLqp.js +0 -1
- package/build/_app/immutable/chunks/pDJnDxXM.js +0 -1
- package/build/_app/immutable/entry/app.DdaMXHAv.js +0 -2
- package/build/_app/immutable/entry/start.-MLBtQXB.js +0 -1
- package/build/_app/immutable/nodes/0.Ysoz3Y3h.js +0 -1
- package/build/_app/immutable/nodes/1.C2jbGTOJ.js +0 -1
- package/build/_app/immutable/nodes/12.DQG5zpEx.js +0 -60
- package/build/_app/immutable/nodes/8.CrHI4F9p.js +0 -134
- package/dist/embed/RedUiEmbedRoot-BwFUA5X-.js +0 -28624
- package/dist/embed/RedUiEmbedRoot-BwFUA5X-.js.map +0 -1
- package/dist/embed/index-DGhgtnaK.js +0 -577
- package/dist/embed/index-DGhgtnaK.js.map +0 -1
- package/dist/embed/index-client-ItCEU64C.js +0 -3087
- package/dist/embed/index-client-ItCEU64C.js.map +0 -1
- /package/build/_app/immutable/assets/{12.Dblyk0Kr.css → 15.Dblyk0Kr.css} +0 -0
- /package/build/_app/immutable/nodes/{10.CAG5_cGP.js → 13.CAG5_cGP.js} +0 -0
|
@@ -1,367 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./C278awGv.js","./DqvWKbSc.js","./CXNPJgv1.js","./CDKIdLnm.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
var Du=Object.defineProperty;var go=r=>{throw TypeError(r)};var Iu=(r,e,t)=>e in r?Du(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var We=(r,e,t)=>Iu(r,typeof e!="symbol"?e+"":e,t),Gu=(r,e,t)=>e.has(r)||go("Cannot "+t);var Ne=(r,e,t)=>(Gu(r,e,"read from private field"),t?t.call(r):e.get(r)),yt=(r,e,t)=>e.has(r)?go("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(r):e.set(r,t);import"./Bzak7iHL.js";import"./69_IOA4Y.js";import{a5 as wn,Z as $i,h as Ss,ay as qe,be as br,ar as $s,aw as Sn,am as c,a$ as Tu,r as Ou,bj as po,bf as sr,ax as or,e as Ru,o as Nu,aD as vo,a6 as Ht,k as Wt,_ as Fr,ad as Uu,bh as Pu,ab as Mu,aG as As,X as Ai,j as zu,i as Wu,aP as ju,bk as yo,E as Bu,D as Fu,b4 as Cs,aV as Ls,I as Yn,a_ as Ds,c as Ku,g as Hu,a1 as qu,aO as Vu,ac as $n,as as Yu,m as Is,n as Xu,a4 as Ju,w as Zu,Q as Qu,bo as Gs,aM as Ts,ae as Ci,C as mo,J as bo,b8 as ec,aF as tc,aL as Li,ak as rc,u as nc,b as ic,N as oc,at as sc,A as ac,aq as uc,t as an,Y as cc,U as lc,F as dc,W as fc,bq as hc,bs as zt,b2 as Os,a2 as gc,bx as pc,bw as Mt,b5 as vc,b6 as wo,a7 as mr,aa as yc,bl as we,b9 as M,aY as qt,aZ as Rs,aW as Ns,a0 as T,aj as Ie,bi as U,b3 as I,bv as re,br as _n,aT as mc,aU as bc,aQ as Ut,bp as fe,b1 as wc}from"./oiO4RLqp.js";import{b as _c,n as xc,m as Ec,h as $e,g as Us,f as kc,p as Sc,c as $c,a as z,k as kt,d as Ve,j as le,s as ue,i as Xn,t as Jn}from"./BGcIe2ep.js";import{B as Ps,_ as jr,l as rt,p as pr,s as at,i as ve,b as Ac,c as Cc}from"./D9CTkMjK.js";function xn(r,e){return e}function Lc(r,e,t){for(var n=[],i=e.length,o,s=e.length,a=0;a<i;a++){let f=e[a];Ls(f,()=>{if(o){if(o.pending.delete(f),o.done.add(f),o.pending.size===0){var h=r.outrogroups;ki(r,Ai(o.done)),h.delete(o),h.size===0&&(r.outrogroups=null)}}else s-=1},!1)}if(s===0){var u=n.length===0&&t!==null;if(u){var l=t,d=l.parentNode;qu(d),d.append(l),r.items.clear()}ki(r,e,!u)}else o={pending:new Set(e),done:new Set},(r.outrogroups??(r.outrogroups=new Set)).add(o)}function ki(r,e,t=!0){var n;if(r.pending.size>0){n=new Set;for(const s of r.pending.values())for(const a of s)n.add(r.items.get(a).e)}for(var i=0;i<e.length;i++){var o=e[i];if(n!=null&&n.has(o)){o.f|=Wt;const s=document.createDocumentFragment();Vu(o,s)}else $n(e[i],t)}}var _o;function mt(r,e,t,n,i,o=null){var s=r,a=new Map,u=(e&Ss)!==0;if(u){var l=r;s=qe?br($s(l)):l.appendChild(wn())}qe&&Sn();var d=null,f=Mu(()=>{var w=t();return As(w)?w:w==null?[]:Ai(w)}),h,p=new Map,y=!0;function S(w){(A.effect.f&Fu)===0&&(A.pending.delete(w),A.fallback=d,Dc(A,h,s,e,n),d!==null&&(h.length===0?(d.f&Wt)===0?Cs(d):(d.f^=Wt,Wr(d,null,s)):Ls(d,()=>{d=null})))}function m(w){A.pending.delete(w)}var v=$i(()=>{h=c(f);var w=h.length;let g=!1;if(qe){var $=Tu(s)===Ou;$!==(w===0)&&(s=po(),br(s),sr(!1),g=!0)}for(var E=new Set,k=Ht,C=Pu(),D=0;D<w;D+=1){qe&&or.nodeType===Ru&&or.data===Nu&&(s=or,g=!0,sr(!1));var L=h[D],q=n(L,D),N=y?null:a.get(q);N?(N.v&&vo(N.v,L),N.i&&vo(N.i,D),C&&k.unskip_effect(N.e)):(N=Ic(a,y?s:_o??(_o=wn()),L,q,D,i,e,t),y||(N.e.f|=Wt),a.set(q,N)),E.add(q)}if(w===0&&o&&!d&&(y?d=Fr(()=>o(s)):(d=Fr(()=>o(_o??(_o=wn()))),d.f|=Wt)),w>E.size&&Uu(),qe&&w>0&&br(po()),!y)if(p.set(k,E),C){for(const[b,Ce]of a)E.has(b)||k.skip_effect(Ce.e);k.oncommit(S),k.ondiscard(m)}else S(k);g&&sr(!0),c(f)}),A={effect:v,items:a,pending:p,outrogroups:null,fallback:d};y=!1,qe&&(s=or)}function Tr(r){for(;r!==null&&(r.f&Ku)===0;)r=r.next;return r}function Dc(r,e,t,n,i){var L,q,N,b,Ce,Ge,R,x,K;var o=(n&Hu)!==0,s=e.length,a=r.items,u=Tr(r.effect.first),l,d=null,f,h=[],p=[],y,S,m,v;if(o)for(v=0;v<s;v+=1)y=e[v],S=i(y,v),m=a.get(S).e,(m.f&Wt)===0&&((q=(L=m.nodes)==null?void 0:L.a)==null||q.measure(),(f??(f=new Set)).add(m));for(v=0;v<s;v+=1){if(y=e[v],S=i(y,v),m=a.get(S).e,r.outrogroups!==null)for(const ee of r.outrogroups)ee.pending.delete(m),ee.done.delete(m);if((m.f&Yn)!==0&&(Cs(m),o&&((b=(N=m.nodes)==null?void 0:N.a)==null||b.unfix(),(f??(f=new Set)).delete(m))),(m.f&Wt)!==0)if(m.f^=Wt,m===u)Wr(m,null,t);else{var A=d?d.next:u;m===r.effect.last&&(r.effect.last=m.prev),m.prev&&(m.prev.next=m.next),m.next&&(m.next.prev=m.prev),er(r,d,m),er(r,m,A),Wr(m,A,t),d=m,h=[],p=[],u=Tr(d.next);continue}if(m!==u){if(l!==void 0&&l.has(m)){if(h.length<p.length){var w=p[0],g;d=w.prev;var $=h[0],E=h[h.length-1];for(g=0;g<h.length;g+=1)Wr(h[g],w,t);for(g=0;g<p.length;g+=1)l.delete(p[g]);er(r,$.prev,E.next),er(r,d,$),er(r,E,w),u=w,d=E,v-=1,h=[],p=[]}else l.delete(m),Wr(m,u,t),er(r,m.prev,m.next),er(r,m,d===null?r.effect.first:d.next),er(r,d,m),d=m;continue}for(h=[],p=[];u!==null&&u!==m;)(l??(l=new Set)).add(u),p.push(u),u=Tr(u.next);if(u===null)continue}(m.f&Wt)===0&&h.push(m),d=m,u=Tr(m.next)}if(r.outrogroups!==null){for(const ee of r.outrogroups)ee.pending.size===0&&(ki(r,Ai(ee.done)),(Ce=r.outrogroups)==null||Ce.delete(ee));r.outrogroups.size===0&&(r.outrogroups=null)}if(u!==null||l!==void 0){var k=[];if(l!==void 0)for(m of l)(m.f&Yn)===0&&k.push(m);for(;u!==null;)(u.f&Yn)===0&&u!==r.fallback&&k.push(u),u=Tr(u.next);var C=k.length;if(C>0){var D=(n&Ss)!==0&&s===0?t:null;if(o){for(v=0;v<C;v+=1)(R=(Ge=k[v].nodes)==null?void 0:Ge.a)==null||R.measure();for(v=0;v<C;v+=1)(K=(x=k[v].nodes)==null?void 0:x.a)==null||K.fix()}Lc(r,k,D)}}o&&Ds(()=>{var ee,ne;if(f!==void 0)for(m of f)(ne=(ee=m.nodes)==null?void 0:ee.a)==null||ne.apply()})}function Ic(r,e,t,n,i,o,s,a){var u=(s&zu)!==0?(s&Wu)===0?ju(t,!1,!1):yo(t):null,l=(s&Bu)!==0?yo(i):null;return{v:u,i:l,e:Fr(()=>(o(e,u??t,l??i,a),()=>{r.delete(n)}))}}function Wr(r,e,t){if(r.nodes)for(var n=r.nodes.start,i=r.nodes.end,o=e&&(e.f&Wt)===0?e.nodes.start:t;n!==null;){var s=Yu(n);if(o.before(n),n===i)return;n=s}}function er(r,e,t){e===null?r.effect.first=t:e.next=t,t===null?r.effect.last=e:t.prev=e}function it(r,e,t,n,i){var a;qe&&Sn();var o=(a=e.$$slots)==null?void 0:a[t],s=!1;o===!0&&(o=e.children,s=!0),o===void 0||o(r,s?()=>n:n)}function Gc(r,e,...t){var n=new Ps(r);$i(()=>{const i=e()??null;n.ensure(i,i&&(o=>i(o,...t)))},Is)}function Tc(r,e,t,n,i,o){let s=qe;qe&&Sn();var a=null;qe&&or.nodeType===Xu&&(a=or,Sn());var u=qe?or:r,l=new Ps(u,!1);$i(()=>{const d=e()||null;var f=Zu;if(d===null){l.ensure(null,null);return}return l.ensure(d,h=>{if(d){if(a=qe?a:Ju(d,f),_c(a,a),n){qe&&xc(d)&&a.append(document.createComment(""));var p=qe?$s(a):a.appendChild(wn());qe&&(p===null?sr(!1):br(p)),n(a,p)}Qu.nodes.end=a,h.before(a)}qe&&br(h)}),()=>{}},Is),Gs(()=>{}),s&&(sr(!0),br(u))}function Oc(r,e){var t=void 0,n;Ts(()=>{t!==(t=e())&&(n&&($n(n),n=null),t&&(n=Fr(()=>{Ci(()=>t(r))})))})}function Ms(r){var e,t,n="";if(typeof r=="string"||typeof r=="number")n+=r;else if(typeof r=="object")if(Array.isArray(r)){var i=r.length;for(e=0;e<i;e++)r[e]&&(t=Ms(r[e]))&&(n&&(n+=" "),n+=t)}else for(t in r)r[t]&&(n&&(n+=" "),n+=t);return n}function Rc(){for(var r,e,t=0,n="",i=arguments.length;t<i;t++)(r=arguments[t])&&(e=Ms(r))&&(n&&(n+=" "),n+=e);return n}function Pt(r){return typeof r=="object"?Rc(r):r??""}const xo=[...`
|
|
3
|
-
\r\f \v\uFEFF`];function Nc(r,e,t){var n=r==null?"":""+r;if(e&&(n=n?n+" "+e:e),t){for(var i of Object.keys(t))if(t[i])n=n?n+" "+i:i;else if(n.length)for(var o=i.length,s=0;(s=n.indexOf(i,s))>=0;){var a=s+o;(s===0||xo.includes(n[s-1]))&&(a===n.length||xo.includes(n[a]))?n=(s===0?"":n.substring(0,s))+n.substring(a+1):s=a}}return n===""?null:n}function Eo(r,e=!1){var t=e?" !important;":";",n="";for(var i of Object.keys(r)){var o=r[i];o!=null&&o!==""&&(n+=" "+i+": "+o+t)}return n}function Zn(r){return r[0]!=="-"||r[1]!=="-"?r.toLowerCase():r}function Uc(r,e){if(e){var t="",n,i;if(Array.isArray(e)?(n=e[0],i=e[1]):n=e,r){r=String(r).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var o=!1,s=0,a=!1,u=[];n&&u.push(...Object.keys(n).map(Zn)),i&&u.push(...Object.keys(i).map(Zn));var l=0,d=-1;const S=r.length;for(var f=0;f<S;f++){var h=r[f];if(a?h==="/"&&r[f-1]==="*"&&(a=!1):o?o===h&&(o=!1):h==="/"&&r[f+1]==="*"?a=!0:h==='"'||h==="'"?o=h:h==="("?s++:h===")"&&s--,!a&&o===!1&&s===0){if(h===":"&&d===-1)d=f;else if(h===";"||f===S-1){if(d!==-1){var p=Zn(r.substring(l,d).trim());if(!u.includes(p)){h!==";"&&f++;var y=r.substring(l,f).trim();t+=" "+y+";"}}l=f+1,d=-1}}}}return n&&(t+=Eo(n)),i&&(t+=Eo(i,!0)),t=t.trim(),t===""?null:t}return r==null?null:String(r)}function Rt(r,e,t,n,i,o){var s=r[mo];if(qe||s!==t||s===void 0){var a=Nc(t,n,o);(!qe||a!==r.getAttribute("class"))&&(a==null?r.removeAttribute("class"):e?r.className=a:r.setAttribute("class",a)),r[mo]=t}else if(o&&i!==o)for(var u in o){var l=!!o[u];(i==null||l!==!!i[u])&&r.classList.toggle(u,l)}return o}function Qn(r,e={},t,n){for(var i in t){var o=t[i];e[i]!==o&&(t[i]==null?r.style.removeProperty(i):r.style.setProperty(i,o,n))}}function zs(r,e,t,n){var i=r[bo];if(qe||i!==e){var o=Uc(e,n);(!qe||o!==r.getAttribute("style"))&&(o==null?r.removeAttribute("style"):r.style.cssText=o),r[bo]=e}else n&&(Array.isArray(n)?(Qn(r,t==null?void 0:t[0],n[0]),Qn(r,t==null?void 0:t[1],n[1],"important")):Qn(r,t,n));return n}function Kr(r,e,t=!1){if(r.multiple){if(e==null)return;if(!As(e))return ec();for(var n of r.options)n.selected=e.includes(Br(n));return}for(n of r.options){var i=Br(n);if(tc(i,e)){n.selected=!0;return}}(!t||e!==void 0)&&(r.selectedIndex=-1)}function Di(r){var e=new MutationObserver(()=>{Kr(r,r.__value)});e.observe(r,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Gs(()=>{e.disconnect()})}function Ug(r,e,t=e){var n=new WeakSet,i=!0;Li(r,"change",o=>{var s=o?"[selected]":":checked",a;if(r.multiple)a=[].map.call(r.querySelectorAll(s),Br);else{var u=r.querySelector(s)??r.querySelector("option:not([disabled])");a=u&&Br(u)}t(a),r.__value=a,Ht!==null&&n.add(Ht)}),Ci(()=>{var o=e();if(r===document.activeElement){var s=Ht;if(n.has(s))return}if(Kr(r,o,i),i&&o===void 0){var a=r.querySelector(":checked");a!==null&&(o=Br(a),t(o))}r.__value=o,i=!1}),Di(r)}function Br(r){return"__value"in r?r.__value:r.value}const Or=Symbol("class"),Rr=Symbol("style"),Ws=Symbol("is custom element"),js=Symbol("is html"),Pc=an?"link":"LINK",Mc=an?"input":"INPUT",zc=an?"option":"OPTION",Wc=an?"select":"SELECT",jc=an?"progress":"PROGRESS";function En(r){if(qe){var e=!1,t=()=>{if(!e){if(e=!0,r.hasAttribute("value")){var n=r.value;F(r,"value",null),r.value=n}if(r.hasAttribute("checked")){var i=r.checked;F(r,"checked",null),r.checked=i}}};r[dc]=t,Ds(t),fc()}}function Pg(r,e){var t=Ln(r);t.value===(t.value=e??void 0)||r.value===e&&(e!==0||r.nodeName!==jc)||(r.value=e??"")}function Mg(r,e){var t=Ln(r);t.checked!==(t.checked=e??void 0)&&(r.checked=e)}function Bc(r,e){e?r.hasAttribute("selected")||r.setAttribute("selected",""):r.removeAttribute("selected")}function F(r,e,t,n){var i=Ln(r);qe&&(i[e]=r.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&r.nodeName===Pc)||i[e]!==(i[e]=t)&&(e==="loading"&&(r[nc]=t),t==null?r.removeAttribute(e):typeof t!="string"&&Bs(r).includes(e)?r[e]=t:r.setAttribute(e,t))}function Fc(r,e,t,n,i=!1,o=!1){if(qe&&i&&r.nodeName===Mc){var s=r,a=s.type==="checkbox"?"defaultChecked":"defaultValue";a in t||En(s)}var u=Ln(r),l=u[Ws],d=!u[js];let f=qe&&l;f&&sr(!1);var h=e||{},p=r.nodeName===zc;for(var y in e)y in t||(t[y]=null);t.class?t.class=Pt(t.class):(n||t[Or])&&(t.class=null),t[Rr]&&(t.style??(t.style=null));var S=Bs(r);for(const E in t){let k=t[E];if(p&&E==="value"&&k==null){r.value=r.__value="",h[E]=k;continue}if(E==="class"){var m=r.namespaceURI==="http://www.w3.org/1999/xhtml";Rt(r,m,k,n,e==null?void 0:e[Or],t[Or]),h[E]=k,h[Or]=t[Or];continue}if(E==="style"){zs(r,k,e==null?void 0:e[Rr],t[Rr]),h[E]=k,h[Rr]=t[Rr];continue}var v=h[E];if(!(k===v&&!(k===void 0&&r.hasAttribute(E)))){h[E]=k;var A=E[0]+E[1];if(A!=="$$")if(A==="on"){const C={},D="$$"+E;let L=E.slice(2);var w=$c(L);if(Ec(L)&&(L=L.slice(0,-7),C.capture=!0),!w&&v){if(k!=null)continue;r.removeEventListener(L,h[D],C),h[D]=null}if(w)$e(L,r,k),Us([L]);else if(k!=null){let q=function(N){h[E].call(this,N)};h[D]=kc(L,r,q,C)}}else if(E==="style")F(r,E,k);else if(E==="autofocus")cc(r,!!k);else if(!l&&(E==="__value"||E==="value"&&k!=null))r.value=r.__value=k;else if(E==="selected"&&p)Bc(r,k);else{var g=E;d||(g=Sc(g));var $=g==="defaultValue"||g==="defaultChecked";if(k==null&&!l&&!$)if(u[E]=null,g==="value"||g==="checked"){let C=r;const D=e===void 0;if(g==="value"){let L=C.defaultValue;C.removeAttribute(g),C.defaultValue=L,C.value=C.__value=D?L:null}else{let L=C.defaultChecked;C.removeAttribute(g),C.defaultChecked=L,C.checked=D?L:!1}}else r.removeAttribute(E);else $||S.includes(g)&&(l||typeof k!="string")?(r[g]=k,g in u&&(u[g]=lc)):typeof k!="function"&&F(r,g,k)}}}return f&&sr(!0),h}function ko(r,e,t=[],n=[],i=[],o,s=!1,a=!1){rc(i,t,n,u=>{var l=void 0,d={},f=r.nodeName===Wc,h=!1;if(Ts(()=>{var y=e(...u.map(c)),S=Fc(r,l,y,o,s,a);h&&f&&"value"in y&&Kr(r,y.value);for(let v of Object.getOwnPropertySymbols(d))y[v]||$n(d[v]);for(let v of Object.getOwnPropertySymbols(y)){var m=y[v];v.description===ac&&(!l||m!==l[v])&&(d[v]&&$n(d[v]),d[v]=Fr(()=>Oc(r,()=>m))),S[v]=m}l=S}),f){var p=r;Ci(()=>{Kr(p,l.value,!0),Di(p)})}h=!0})}function Ln(r){var e;return r[e=ic]??(r[e]={[Ws]:r.nodeName.includes("-"),[js]:r.namespaceURI===oc})}var So=new Map;function Bs(r){var e=r.getAttribute("is")||r.nodeName,t=So.get(e);if(t)return t;So.set(e,t=[]);for(var n,i=r,o=Element.prototype;o!==i;){n=uc(i);for(var s in n)n[s].set&&s!=="innerHTML"&&s!=="textContent"&&s!=="innerText"&&t.push(s);i=sc(i)}return t}function gn(r,e,t=e){var n=new WeakSet;Li(r,"input",async i=>{var o=i?r.defaultValue:r.value;if(o=ei(r)?ti(o):o,t(o),Ht!==null&&n.add(Ht),await hc(),o!==(o=e())){var s=r.selectionStart,a=r.selectionEnd,u=r.value.length;if(r.value=o??"",a!==null){var l=r.value.length;s===a&&a===u&&l>u?(r.selectionStart=l,r.selectionEnd=l):(r.selectionStart=s,r.selectionEnd=Math.min(a,l))}}}),(qe&&r.defaultValue!==r.value||zt(e)==null&&r.value)&&(t(ei(r)?ti(r.value):r.value),Ht!==null&&n.add(Ht)),Os(()=>{var i=e();if(r===document.activeElement){var o=Ht;if(n.has(o))return}ei(r)&&i===ti(r.value)||r.type==="date"&&!i&&!r.value||i!==r.value&&(r.value=i??"")})}function zg(r,e,t=e){Li(r,"change",n=>{var i=n?r.defaultChecked:r.checked;t(i)}),(qe&&r.defaultChecked!==r.checked||zt(e)==null)&&t(r.checked),Os(()=>{var n=e();r.checked=!!n})}function ei(r){var e=r.type;return e==="number"||e==="range"}function ti(r){return r===""?null:+r}function Kc(r=!1){const e=gc,t=e.l.u;if(!t)return;let n=()=>mr(e.s);if(r){let i=0,o={};const s=yc(()=>{let a=!1;const u=e.s;for(const l in u)u[l]!==o[l]&&(o[l]=u[l],a=!0);return a&&i++,i});n=()=>c(s)}t.b.length&&pc(()=>{$o(e,n),wo(t.b)}),Mt(()=>{const i=zt(()=>t.m.map(vc));return()=>{for(const o of i)typeof o=="function"&&o()}}),t.a.length&&Mt(()=>{$o(e,n),wo(t.a)})}function $o(r,e){if(r.l.s)for(const t of r.l.s)c(t);e()}const wr=Object.freeze({vcs:!1,clusterStatus:!1,collectionMetadata:!1,cdcStream:!1}),Ao={vcs:"vcs",versioning:"vcs",version_control:"vcs",cluster:"clusterStatus",cluster_status:"clusterStatus",collection_metadata:"collectionMetadata",collections_metadata:"collectionMetadata",cdc:"cdcStream",changes_stream:"cdcStream",cdc_stream:"cdcStream"};function Hc(r){var t;const e={...wr};for(const n of r.features??[]){const i=Ao[((t=n==null?void 0:n.toLowerCase)==null?void 0:t.call(n))??""];i&&(e[i]=!0)}for(const[n,i]of Object.entries(r.capabilities??{})){const o=Ao[n.toLowerCase()];o&&(e[o]=i===!0)}return e}const Co=new Set,ri=new Map;function qc(r){return(r instanceof Error?r.message:String(r)).includes("route not found: GET /collections/")}function Vc(r){const e=r instanceof Error?r.message:String(r);return/ → 404\b/.test(e)||e.includes("route not found")}function Lo(r){return new Error(`GET /collections/:name unsupported by this reddb server (${r})`)}async function*Yc(r){const e=r.getReader(),t=new TextDecoder;let n="";try{for(;;){const{done:o,value:s}=await e.read();if(o)break;n+=t.decode(s,{stream:!0});let a;for(;(a=n.indexOf(`
|
|
4
|
-
`))!==-1;){const u=n.slice(0,a).trim();n=n.slice(a+1),u&&(yield JSON.parse(u))}}const i=n.trim();i&&(yield JSON.parse(i))}finally{e.releaseLock()}}const Xc=/^\s*select\b/i;async function Wg(r,e,t={}){if(!Xc.test(e))return r.query(e);try{const n=await r.queryStreamCollect(e,t);return{ok:!0,query:e,record_count:n.rowCount,result:{columns:n.columns,records:n.rows.map(i=>({values:i}))},streamed:!0,truncated:n.truncated}}catch{return r.query(e)}}class Jc{constructor(e,t={}){We(this,"baseUrl");We(this,"headers");We(this,"fetcher");this.baseUrl=e.replace(/\/$/,""),this.headers=t.headers,this.fetcher=t.fetch??fetch}async json(e,t){const n=`${this.baseUrl}${e}`,i={"Content-Type":"application/json"};Object.assign(i,this.headers),Object.assign(i,t==null?void 0:t.headers);const o=await this.fetcher(n,{...t,headers:i});if(!o.ok){const s=await o.text().catch(()=>"");throw new Error(`${(t==null?void 0:t.method)??"GET"} ${e} → ${o.status} ${s.slice(0,200)}`)}return o.json()}async stats(){return this.json("/stats")}async clusterStatus(){return this.json("/cluster/status")}async ping(){const e=performance.now();try{return await this.json("/stats"),{ok:!0,rtt_ms:Math.round(performance.now()-e)}}catch(t){return{ok:!1,error:t.message}}}async capabilities(){try{const n=await this.json("/capabilities");return Hc(n)}catch(n){if(!Vc(n))return{...wr}}const[e,t]=await Promise.all([this.probeGet("/repo/commits?limit=1"),this.probeGet("/cluster/status")]);return{...wr,vcs:e,clusterStatus:t}}async probeGet(e){try{return await this.json(e),!0}catch{return!1}}async collections(){return(await this.json("/collections")).collections}async collection(e){if(Co.has(this.baseUrl))throw Lo(this.baseUrl);const t=`/collections/${encodeURIComponent(e)}`,n=ri.get(this.baseUrl);if(n){if(!await n)throw Lo(this.baseUrl);return this.json(t)}let i;const o=new Promise(s=>{i=s});ri.set(this.baseUrl,o);try{const s=await this.json(t);return i(!0),s}catch(s){throw qc(s)?(Co.add(this.baseUrl),i(!1)):i(!0),s}finally{ri.delete(this.baseUrl)}}async createCollection(e){await this.json("/collections",{method:"POST",body:JSON.stringify({name:e})})}async insertDocument(e,t){return this.json(`/collections/${encodeURIComponent(e)}/documents`,{method:"POST",body:JSON.stringify(t)})}async query(e){return this.json("/query",{method:"POST",body:JSON.stringify({query:e})})}async queryStreamCollect(e,t={}){const n=t.maxRows??1e4,i={"Content-Type":"application/json",Accept:"application/x-ndjson"};Object.assign(i,this.headers);const o=await this.fetcher(`${this.baseUrl}/query/stream`,{method:"POST",headers:i,body:JSON.stringify({query:e}),signal:t.signal});if(!o.ok||!o.body){const a=o.body?await o.text().catch(()=>""):"";throw new Error(`POST /query/stream → ${o.status} ${a.slice(0,200)}`)}const s={columns:[],rows:[],rowCount:0,truncated:!1};for await(const a of Yc(o.body))if("descriptor"in a)s.columns=a.descriptor.columns??[],s.schemaFingerprint=a.descriptor.schema_fingerprint;else if("cursor"in a)s.cursor=a.cursor.token;else if("row"in a){if(s.rows.length>=n){s.truncated=!0;break}s.rows.push(a.row),s.rowCount=s.rows.length}else if("end"in a||"cancelled"in a)break;return s.truncated&&s.cursor&&await this.cancelQueryStream(s.cursor).catch(()=>{}),s}async cancelQueryStream(e){await this.json("/query/stream/cancel",{method:"POST",body:JSON.stringify({cursor:e})}).catch(()=>{})}async collectionVcs(e){return(await this.json(`/collections/${encodeURIComponent(e)}/vcs`)).result}async setCollectionVcs(e,t){return(await this.json(`/collections/${encodeURIComponent(e)}/vcs`,{method:"PUT",body:JSON.stringify({versioned:t})})).result}async commits(e={}){const t=new URLSearchParams;e.from&&t.set("from",e.from),e.to&&t.set("to",e.to),e.branch&&t.set("branch",e.branch),e.limit!==void 0&&t.set("limit",String(e.limit)),e.skip!==void 0&&t.set("skip",String(e.skip)),e.noMerges!==void 0&&t.set("no_merges",String(e.noMerges));const n=t.toString()?`?${t}`:"";return(await this.json(`/repo/commits${n}`)).result}async commitDiff(e,t,n={}){const i=new URLSearchParams;n.collection&&i.set("collection",n.collection),n.summary!==void 0&&i.set("summary",String(n.summary));const o=i.toString()?`?${i}`:"";return(await this.json(`/repo/commits/${encodeURIComponent(e)}/diff/${encodeURIComponent(t)}${o}`)).result}async replication(){return this.json("/replication/status").catch(()=>({ok:!1,role:"standalone"}))}async whoami(){return this.json("/auth/whoami")}async users(){return(await this.json("/auth/users")).users}async tenants(){return(await this.json("/auth/tenants")).tenants??[]}async policies(){return(await this.json("/auth/policies")).policies??[]}async changes(e,t={}){const n=new URLSearchParams;e!==void 0&&n.set("since_lsn",String(e)),t.limit!==void 0&&n.set("limit",String(t.limit));const i=n.toString()?`?${n}`:"",s=(await this.json("/changes"+i)).events??[];return t.collection?s.filter(a=>a.collection===t.collection):s}async rows(e){return(await this.query(e)).result.records.map(n=>n.values)}}class Zc extends Error{constructor(e){super(`Unknown connection: ${e}`),this.id=e,this.name="UnknownConnectionError"}}class Qc extends Error{constructor(){super("No active connection — call connect() first"),this.name="NotConnectedError"}}class el extends Error{constructor(e,t){super(`Connection ${e} unreachable: ${t}`),this.id=e,this.reason=t,this.name="UnreachableConnectionError"}}const tl={http:"http",https:"https",red:"http","red+tcp":"http","red+wire":"http",reds:"https","red+tls":"https","red+http":"http","red+https":"https","red+unix":"unix",file:"unix",unix:"unix"};function rl(r){const e=r.trim();if(!e)return null;const t=e.match(/^([a-z+]+):\/\//i);return t?tl[t[1].toLowerCase()]??null:"http"}const Ii=["http","https"],nl=["http","https","unix"];function il(r,e){const t=rl(r);return t!==null&&e.includes(t)}const ol=["endpoint","connection","red_url","red"],sl="view",Fs="cs",Ks="to",al="token",Hs=/(token|secret|password|passwd|auth|credential|api[-_]?key|bearer)/i;class rr extends Error{constructor(e,t){super(t),this.code=e,this.name="OpenContractError"}}function ul(r,e=""){if(r instanceof URL)return{search:r.search,hash:r.hash};const t=r??"";if(/^[a-z][a-z0-9+.-]*:\/\//i.test(t)){const s=new URL(t);return{search:s.search,hash:s.hash}}const n=t.indexOf("#"),i=n>=0?t.slice(0,n):t,o=n>=0?t.slice(n):e;return{search:i,hash:o}}function cl(r){return/^file:/i.test(r)||/^~(?:\/|\\|$)/.test(r)||/^(?:\.{1,2})(?:\/|\\|$)/.test(r)||/^(?:\/|\\)/.test(r)||/^[a-z]:[\\/]/i.test(r)||r.includes("\\")}function qs(r){const e=r.trim().replace(/\/$/,"");if(!e)throw new rr("EMPTY_CS","Open Contract cs is empty");if(cl(e))throw new rr("FILESYSTEM_PATH","Open Contract cs must be a browser-reachable URL, not a filesystem path");let t;try{t=new URL(e)}catch{throw new rr("MALFORMED_URL","Open Contract cs is not a valid URL")}if(t.protocol!=="http:"&&t.protocol!=="https:")throw new rr("UNSUPPORTED_SCHEME","Open Contract cs must use http:// or https://");for(const n of t.searchParams.keys())if(Hs.test(n))throw new rr("SECRET_IN_CS","Open Contract secrets must be carried in the app URL hash, not inside cs");return e}function Vs(r){const e=r.trim();if(!e)throw new rr("MALFORMED_ROUTE","Open Contract to is empty");if(/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("//")||e.includes("\\"))throw new rr("MALFORMED_ROUTE","Open Contract to must be an app route");const t=e.startsWith("/")?e:`/${e}`;if(t==="/query"||t==="/collections"||t==="/cluster"||t==="/security"||t.startsWith("/c/"))return t;throw new rr("MALFORMED_ROUTE","Open Contract to must target a known red-ui route")}function Ys(r,e=""){const{search:t,hash:n}=ul(r,e),i=new URLSearchParams(t),o=new URLSearchParams(n.startsWith("#")?n.slice(1):n),s={},a=i.get(Fs);a!==null&&(s.cs=qs(a));const u=i.get(Ks);u!==null&&(s.to=Vs(u));const l=o.get(al);return l&&(s.token=l),s}function ll(r,e=""){const t=new URLSearchParams(r??""),n={},i=t.get(Fs);if(i!==null)try{n.endpoint=qs(i)}catch{}const o=t.get(Ks);if(o!==null)try{n.to=Vs(o)}catch{}for(const a of ol){if(n.endpoint)break;const u=t.get(a);if(u&&!Hs.test(a)){n.endpoint=u;break}}const s=t.get(sl);s&&(n.view=s);try{Ys(r,e).token}catch{}return n}function dl(r){return typeof r.endpoint=="string"&&r.endpoint.trim().length>0}function fl(r){return typeof r.to=="string"&&r.to.trim().length>0}const hl=8;function gl(){let r=[];return{load:()=>r.slice(),save:e=>{r=e.slice()}}}class pl{constructor(e={}){We(this,"presets");We(this,"history");We(this,"clientFactory");We(this,"historyMax");We(this,"supportedTransports");We(this,"boot");We(this,"handoffTokens",new Map);We(this,"active",null);var t,n;this.presets=((t=e.presets)==null?void 0:t.slice())??[],this.history=e.history??gl(),this.historyMax=e.historyMax??hl,this.clientFactory=e.clientFactory??((i,o)=>new Jc(i,o)),this.supportedTransports=((n=e.transports)==null?void 0:n.slice())??[...Ii],this.boot=e.bootParams&&(dl(e.bootParams)||fl(e.bootParams))?{...e.bootParams}:null}transports(){return this.supportedTransports.slice()}bootParams(){return this.boot?{...this.boot}:null}useHandoffToken(e,t){const n=t.trim();n&&this.handoffTokens.set(this.handoffKey(e),n)}async list(){const e=new Set,t=[];for(const n of this.presets)e.has(n.url)||(e.add(n.url),t.push(n));for(const n of this.history.load())e.has(n.url)||(e.add(n.url),t.push({id:n.url,label:n.label,url:n.url,role:"primary"}));return t}async connect(e){const t=this.resolve(e);if(!t)throw new Zc(e);const n=this.consumeHandoffToken(t.url),i=this.clientFactory(t.url,n?{headers:{Authorization:`Bearer ${n}`}}:void 0),o=await i.ping();if(!o.ok)throw new el(t.id,o.error);const s={connection:t,client:i,rtt_ms:o.rtt_ms};return this.active=s,this.record(t,o.rtt_ms),s}async whoami(){if(!this.active)throw new Qc;const e=await this.active.client.whoami();return{authenticated:e.authenticated,username:e.username,role:e.role}}forget(e){const t=this.history.load().filter(n=>n.url!==e);this.history.save(t)}resolve(e){const t=this.presets.find(i=>i.id===e);if(t)return t;const n=this.history.load().find(i=>i.url===e);if(n)return{id:n.url,label:n.label,url:n.url,role:"primary"};if(/^[a-z+]+:\/\//i.test(e)){let i=e;try{i=new URL(e).host||e}catch{}return{id:e,label:i,url:e,role:"primary",description:"Ad-hoc URL."}}return null}handoffKey(e){return e.replace(/\/$/,"")}consumeHandoffToken(e){const t=this.handoffKey(e),n=this.handoffTokens.get(t)??null;return this.handoffTokens.delete(t),n}record(e,t){const n=this.history.load().filter(o=>o.url!==e.url),i=[{url:e.url,label:e.label,last_used:Date.now(),rtt_ms:t},...n].slice(0,this.historyMax);this.history.save(i)}}const Xs="red-ui:connection",vl=["__RED_BOOTSTRAP__","__RED_UI_CONNECTION_BOOTSTRAP__","__RED_UI_BOOTSTRAP__"];function kn(r){return typeof r=="string"&&r.trim()?r.trim():void 0}function yl(r){if(!r||typeof r!="object")return null;const e=kn(r.target),t=kn(r.token),n=kn(r.route);return!e&&!t&&!n?null:{target:e??null,...t?{token:t}:{},...n?{route:n}:{}}}async function ml(r){for(const e of r){let t;try{t=yl(await e())}catch{t=null}if(t)return t}return null}async function bl(){if(typeof window>"u"||!("__TAURI_INTERNALS__"in window||"__TAURI__"in window))return null;try{return(await jr(()=>import("./DhEqZVGG.js"),[],import.meta.url)).invoke}catch{return null}}async function wl(r){const e=r??await bl();if(!e)return null;try{return await e("connection_bootstrap")}catch{return null}}async function _l(r=globalThis){if(!r||typeof r!="object")return null;const e=r;for(const t of vl){const n=e[t];if(n)try{return typeof n=="function"?await n():n}finally{try{delete e[t]}catch{e[t]=void 0}}}return null}function xl(){return{consume:!0,location:typeof location>"u"?void 0:{pathname:location.pathname,search:location.search,hash:location.hash},history:typeof history>"u"?void 0:{state:history.state,replaceState:(r,e,t)=>history.replaceState(r,e,t)}}}function El(r){if(!r.consume||!r.location||!r.history)return;const e=r.location.hash;if(!e)return;const t=new URLSearchParams(e.startsWith("#")?e.slice(1):e);if(!t.has("token"))return;t.delete("token");const n=t.toString(),i=`${r.location.pathname}${r.location.search}${n?`#${n}`:""}`;try{r.history.replaceState(r.history.state,"",i)}catch{}}function Do(r=typeof location>"u"?"":location.search,e=typeof location>"u"?"":location.hash,t=xl()){try{const n=Ys(r,e);return n.token&&El(t),!n.cs&&!n.to&&!n.token?null:{target:n.cs,token:n.token,route:n.to}}catch{return null}}function kl(){try{return typeof localStorage>"u"?void 0:localStorage}catch{return}}function Sl(r=kl(),e=Xs){if(!r)return null;try{const t=r.getItem(e);if(!t)return null;const n=JSON.parse(t),i=kn(n==null?void 0:n.url);return i?{target:i}:null}catch{return null}}async function $l(r={}){const e=r.readUrl??(()=>Do()),t=await ml([r.readTauri??wl,r.readInjectedGlobal??_l,e,r.readPersisted??(()=>Sl())]);if(t&&!r.readUrl)try{Do()}catch{}return t??{target:null}}class bt extends Error{constructor(t,n){super(n);We(this,"code");this.name="SecureStoreError",this.code=t}}const Al=2e5,Cl=16,Ll=12;function pn(r){let e="";for(const t of r)e+=String.fromCharCode(t);return btoa(e)}function ni(r){const e=atob(r),t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}function vr(r){const e=new ArrayBuffer(r.byteLength);return new Uint8Array(e).set(r),e}class Dl{constructor(e,t={}){We(this,"storage");We(this,"namespace");We(this,"iterations");We(this,"subtle");We(this,"password");We(this,"keyCache",new Map);var o;if(typeof e!="string"||e.length===0)throw new bt("LOCKED","master password required");const n=t.storage??(typeof globalThis<"u"?globalThis.localStorage:void 0);if(!n)throw new bt("BACKEND_FAILURE","no Storage backend available");const i=t.subtle??(typeof globalThis<"u"?(o=globalThis.crypto)==null?void 0:o.subtle:void 0);if(!i)throw new bt("BACKEND_FAILURE","Web Crypto SubtleCrypto unavailable");this.password=e,this.storage=n,this.namespace=t.namespace??"red-ui:secure",this.iterations=t.iterations??Al,this.subtle=i}storageKey(e){return`${this.namespace}:${e}`}async deriveKey(e){const t=pn(e),n=this.keyCache.get(t);if(n)return n;const i=new TextEncoder().encode(this.password),o=await this.subtle.importKey("raw",vr(i),"PBKDF2",!1,["deriveKey"]),s=await this.subtle.deriveKey({name:"PBKDF2",salt:vr(e),iterations:this.iterations,hash:"SHA-256"},o,{name:"AES-GCM",length:256},!1,["encrypt","decrypt"]);return this.keyCache.set(t,s),s}randomBytes(e){const t=new Uint8Array(e),n=globalThis.crypto;if(!n)throw new bt("BACKEND_FAILURE","crypto.getRandomValues unavailable");return n.getRandomValues(t),t}async put(e,t){const n=this.randomBytes(Cl),i=this.randomBytes(Ll),o=await this.deriveKey(n),s=new TextEncoder().encode(t);let a;try{a=await this.subtle.encrypt({name:"AES-GCM",iv:vr(i)},o,vr(s))}catch(l){throw new bt("BACKEND_FAILURE",`encrypt failed: ${l.message}`)}const u={v:1,salt:pn(n),nonce:pn(i),ciphertext:pn(new Uint8Array(a))};try{this.storage.setItem(this.storageKey(e),JSON.stringify(u))}catch(l){throw new bt("BACKEND_FAILURE",`storage write failed: ${l.message}`)}}async get(e){const t=this.storage.getItem(this.storageKey(e));if(!t)return null;let n;try{n=JSON.parse(t)}catch{throw new bt("CORRUPT_ENVELOPE",`key ${e}: not valid JSON`)}if(!n||n.v!==1||typeof n.salt!="string"||typeof n.nonce!="string"||typeof n.ciphertext!="string")throw new bt("CORRUPT_ENVELOPE",`key ${e}: missing envelope fields`);let i,o,s;try{i=ni(n.salt),o=ni(n.nonce),s=ni(n.ciphertext)}catch{throw new bt("CORRUPT_ENVELOPE",`key ${e}: base64 decode failed`)}const a=await this.deriveKey(i);let u;try{u=await this.subtle.decrypt({name:"AES-GCM",iv:vr(o)},a,vr(s))}catch{throw new bt("DECRYPT_FAILED",`key ${e}: decryption failed (wrong password or tampered payload)`)}return new TextDecoder().decode(u)}async delete(e){try{this.storage.removeItem(this.storageKey(e))}catch(t){throw new bt("BACKEND_FAILURE",`storage delete failed: ${t.message}`)}}}class Il{constructor(e){We(this,"invoke");We(this,"service");if(!e.invoke)throw new bt("BACKEND_FAILURE","tauri invoke fn not provided");this.invoke=e.invoke,this.service=e.service??"io.reddb.red-ui"}async put(e,t){try{await this.invoke("keychain_set",{service:this.service,key:e,value:t})}catch(n){throw new bt("BACKEND_FAILURE",`keychain_set failed: ${ii(n)}`)}}async get(e){try{return await this.invoke("keychain_get",{service:this.service,key:e})??null}catch(t){throw new bt("BACKEND_FAILURE",`keychain_get failed: ${ii(t)}`)}}async delete(e){try{await this.invoke("keychain_delete",{service:this.service,key:e})}catch(t){throw new bt("BACKEND_FAILURE",`keychain_delete failed: ${ii(t)}`)}}}function ii(r){if(r instanceof Error)return r.message;if(typeof r=="string")return r;try{return JSON.stringify(r)}catch{return String(r)}}const Gl="red-ui:history",Tl="history:";function Js(r,e=!1){switch(r){case"embedded":return"none";case"standalone":return"vault";case"web":return e?"none":"labels-only"}}function Ol(r){if(r.url)try{const t=new URL(r.url).host;if(t)return t}catch{}const e=(r.label??r.url??"").trim();if(!e)return"";try{const t=new URL(e).host;if(t)return t}catch{}return e.includes("@")?e.slice(e.lastIndexOf("@")+1):e}function Rl(){return typeof localStorage>"u"?void 0:localStorage}function Io(r){return`label:${encodeURIComponent(r)}`}function Nl(){return typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():Math.random().toString(36).slice(2)+Date.now().toString(36)}function Nr(r,e){if(!r)return[];try{const t=r.getItem(e);if(!t)return[];const n=JSON.parse(t);return Array.isArray(n)?n.filter(i=>i&&typeof i.id=="string"&&typeof i.label=="string").map(i=>({id:i.id,label:i.label,last_used:i.last_used,rtt_ms:i.rtt_ms})):[]}catch{return[]}}function Go(r,e,t){if(r)try{r.setItem(e,JSON.stringify(t))}catch{}}class Ul{constructor(e){We(this,"surface");We(this,"secureStore");We(this,"managedWebTarget");We(this,"storage");We(this,"historyKey");We(this,"urlPrefix");We(this,"idByUrl",new Map);We(this,"urlById",new Map);We(this,"onChange");this.surface=e.surface,this.secureStore=e.secureStore,this.managedWebTarget=e.managedWebTarget??(()=>!1),this.storage=e.storage??Rl(),this.historyKey=e.historyKey??Gl,this.urlPrefix=e.urlPrefix??Tl}setOnChange(e){this.onChange=e}persistence(){return Js(this.surface(),this.managedWebTarget())}load(){return this.persistence()==="none"?[]:Nr(this.storage,this.historyKey).map(e=>({url:this.urlById.get(e.id)??"",label:e.label,last_used:e.last_used,rtt_ms:e.rtt_ms}))}save(e){var u,l,d;const t=this.persistence();if(t==="none"){(u=this.onChange)==null||u.call(this);return}const n=Nr(this.storage,this.historyKey),i=new Map(n.map(f=>[f.label,f])),o=[],s=new Set,a=new Set;for(const f of e){const h=Ol(f);if(!h)continue;let p;f.url?(p=t==="labels-only"?Io(h):this.idByUrl.get(f.url)??Nl(),this.idByUrl.set(f.url,p),this.urlById.set(p,f.url)):p=((l=i.get(h))==null?void 0:l.id)??Io(h),!(s.has(p)||!f.url&&a.has(h))&&(s.add(p),a.add(h),o.push({id:p,label:h,last_used:typeof f.last_used=="number"?f.last_used:Date.now(),rtt_ms:f.rtt_ms}))}if(Go(this.storage,this.historyKey,o),t==="vault"){const f=this.secureStore();if(f)for(const h of o){const p=this.urlById.get(h.id);p&&f.put(this.urlPrefix+h.id,p).catch(()=>{})}}(d=this.onChange)==null||d.call(this)}uiEntries(){return this.persistence()==="none"?[]:Nr(this.storage,this.historyKey).map(e=>({id:e.id,label:e.label,last_used:e.last_used,rtt_ms:e.rtt_ms,url:this.urlById.get(e.id)}))}async hydrate(){var i;if(this.persistence()!=="vault")return;const e=this.secureStore();if(!e)return;const t=Nr(this.storage,this.historyKey);let n=!1;for(const o of t)if(!this.urlById.has(o.id))try{const s=await e.get(this.urlPrefix+o.id);s&&(this.urlById.set(o.id,s),this.idByUrl.set(s,o.id),n=!0)}catch{}n&&((i=this.onChange)==null||i.call(this))}async forgetById(e){var o,s;if(this.persistence()==="none"){(o=this.onChange)==null||o.call(this);return}const t=Nr(this.storage,this.historyKey).filter(a=>a.id!==e);Go(this.storage,this.historyKey,t);const n=this.urlById.get(e);n&&(this.urlById.delete(e),this.idByUrl.delete(n));const i=this.persistence()==="vault"?this.secureStore():null;if(i)try{await i.delete(this.urlPrefix+e)}catch{}(s=this.onChange)==null||s.call(this)}async forgetByUrl(e){const t=this.idByUrl.get(e);t&&await this.forgetById(t)}}function Pl({tauri:r,inFrame:e,mcp:t,embedLib:n}){return r?"standalone":e||t||n?"embedded":"web"}function Ml(){if(typeof window>"u")return"web";const r="__TAURI_INTERNALS__"in window||"__TAURI__"in window;let e=!1;try{e=window.self!==window.top}catch{e=!0}const t=typeof location<"u"&&new URLSearchParams(location.search).has("mcp"),n=window.__RED_UI_EMBED_SURFACE__===!0;return Pl({tauri:r,inFrame:e,mcp:t,embedLib:n})}function oi(r,e){switch(r){case"embedded":return!1;case"standalone":return!0;case"web":return!1}}const Si="red-ui:secure",To="__probe__",Oo="ok";function Ro(){if(typeof localStorage>"u")return!1;for(let r=0;r<localStorage.length;r++){const e=localStorage.key(r);if(e&&e.startsWith(Si+":"))return!0}return!1}var Vr,Yr,Xr,Jr,Zr,Qr;class zl{constructor(){yt(this,Vr,we(null));yt(this,Yr,we(!0));yt(this,Xr,we(!1));yt(this,Jr,we("unknown"));yt(this,Zr,we("web"));yt(this,Qr,we(null));if(typeof window>"u"){this.backend="unknown";return}if(this.surface=Ml(),this.surface==="standalone"){this.backend="tauri",this.bindTauri();return}this.backend="web",Ro(),this.needsSetup=!1,this.locked=oi(this.surface)}get store(){return c(Ne(this,Vr))}set store(e){M(Ne(this,Vr),e,!0)}get locked(){return c(Ne(this,Yr))}set locked(e){M(Ne(this,Yr),e,!0)}get needsSetup(){return c(Ne(this,Xr))}set needsSetup(e){M(Ne(this,Xr),e,!0)}get backend(){return c(Ne(this,Jr))}set backend(e){M(Ne(this,Jr),e,!0)}get surface(){return c(Ne(this,Zr))}set surface(e){M(Ne(this,Zr),e,!0)}get error(){return c(Ne(this,Qr))}set error(e){M(Ne(this,Qr),e,!0)}async bindTauri(){try{const e=await jr(()=>import("./DhEqZVGG.js"),[],import.meta.url);this.store=new Il({invoke:e.invoke}),this.locked=!1}catch(e){this.error=`Tauri keychain bridge unavailable: ${e.message}`}}async unlock(e){if(this.error=null,this.backend!=="web")return!0;let t;try{t=new Dl(e,{namespace:Si})}catch(n){return this.error=n.message,!1}try{const n=await t.get(To);if(n===null)await t.put(To,Oo);else if(n!==Oo)return this.error="Wrong password",!1}catch(n){return n instanceof bt&&n.code==="DECRYPT_FAILED"?(this.error="Wrong password",!1):(this.error=n.message,!1)}return this.store=t,this.locked=!1,this.needsSetup=!1,!0}lock(){this.store=null,this.backend==="web"&&(this.locked=oi(this.surface,Ro()))}wipe(){if(typeof localStorage>"u")return;const e=[];for(let t=0;t<localStorage.length;t++){const n=localStorage.key(t);n&&(n.startsWith(Si+":")||n.startsWith("red-ui:"))&&e.push(n)}for(const t of e)localStorage.removeItem(t);this.store=null,this.backend==="web"&&(this.locked=oi(this.surface),this.needsSetup=!1),this.error=null}}Vr=new WeakMap,Yr=new WeakMap,Xr=new WeakMap,Jr=new WeakMap,Zr=new WeakMap,Qr=new WeakMap;const Hr=new zl,Wl=20;var en,tn;class jl{constructor(){yt(this,en,we(0));yt(this,tn,we(qt([])));We(this,"nextId",1)}get inflight(){return c(Ne(this,en))}set inflight(e){M(Ne(this,en),e,!0)}get log(){return c(Ne(this,tn))}set log(e){M(Ne(this,tn),e,!0)}async track(e,t){const n=this.nextId++,i={id:n,label:e,startedAt:Date.now(),durationMs:null,status:"pending"};zt(()=>{this.log=[i,...this.log].slice(0,Wl),this.inflight+=1});try{const o=await t();return zt(()=>this.update(n,{durationMs:Date.now()-i.startedAt,status:"ok"})),o}catch(o){throw zt(()=>this.update(n,{durationMs:Date.now()-i.startedAt,status:"error",error:o.message})),o}finally{zt(()=>{this.inflight=Math.max(0,this.inflight-1)})}}update(e,t){this.log=this.log.map(n=>n.id===e?{...n,...t}:n)}reset(){zt(()=>{this.log=this.log.map(e=>e.status==="pending"?{...e,status:"error",error:"reset by user",durationMs:Date.now()-e.startedAt}:e),this.inflight=0})}}en=new WeakMap,tn=new WeakMap;const tr=new jl,Zs=[{id:"embedded",label:"Embedded",url:"http://localhost:5055",role:"embedded",description:"Local file via ./scripts/embedded.sh."},{id:"docker-primary",label:"Docker primary",url:"http://localhost:15055",role:"primary",description:"Docker compose primary (./docker/compose.yml)."},{id:"docker-replica",label:"Docker replica",url:"http://localhost:25055",role:"replica",description:"Read-only mirror of docker primary."}],No=Xs;function Uo(r){if(typeof localStorage>"u")return;if(Kl()!=="vault"){try{localStorage.removeItem(No)}catch{}return}try{localStorage.setItem(No,JSON.stringify(r))}catch{}}const Bl=/(handoff|token|secret|password|passwd|auth|credential|api[-_]?key|bearer)/i;let Gi=!1;function Fl(){Hr.surface==="web"&&(Gi=!0)}function Qs(){if(Gi)return!0;if(Hr.surface!=="web"||typeof location>"u")return!1;for(const r of[location.search,location.hash]){const e=new URLSearchParams(r.startsWith("#")?r.slice(1):r);for(const t of e.keys())if(Bl.test(t))return!0}return!1}function Kl(){return Js(Hr.surface,Qs())}const ir=new Ul({surface:()=>Hr.surface,secureStore:()=>Hr.store,managedWebTarget:Qs});function Hl(r){let e=r.trim().replace(/\/$/,"");if(!e)return e;/:\/\//.test(e)||(e="http://"+e);const t=e.match(/^([a-z+]+):\/\/(.+)$/i);if(!t)return e;const[,n,i]=t,o=n.toLowerCase();if(o==="red"||o==="red+tcp"||o==="red+wire"){const[s]=i.split("/")[0].split(":");return`http://${s}:5055${i.includes("/")?"/"+i.split("/").slice(1).join("/"):""}`}if(o==="reds"||o==="red+tls"){const[s]=i.split("/")[0].split(":");return`https://${s}:5055`}return e}function Po(r){const e=Hl(r);let t=e;try{t=new URL(e).host}catch{}return{id:e,label:t||e,url:e,role:"primary",description:"User-provided connection string."}}function ql(){return[...typeof window<"u"&&("__TAURI_INTERNALS__"in window||"__TAURI__"in window)?nl:Ii]}function Vl(r){return typeof r.useHandoffToken=="function"}const Yl=new pl({presets:Zs,history:ir,transports:ql(),bootParams:ll(typeof location<"u"?location.search:"",typeof location<"u"?location.hash:"")});let ea=Yl;function Ur(){return ea}function jg(r){ea=r}var rn,nn,on,sn,_r,xr,Er;class Xl{constructor(){yt(this,rn,we(!1));yt(this,nn,we(qt(Zs[1])));yt(this,on,we(qt({reachable:!1})));yt(this,sn,we(qt([])));yt(this,_r,we(null));yt(this,xr,we(qt({...wr})));yt(this,Er,we(!1));this.history=ir.uiEntries(),ir.setOnChange(()=>{this.history=ir.uiEntries()})}get connected(){return c(Ne(this,rn))}set connected(e){M(Ne(this,rn),e,!0)}get active(){return c(Ne(this,nn))}set active(e){M(Ne(this,nn),e,!0)}get probe(){return c(Ne(this,on))}set probe(e){M(Ne(this,on),e,!0)}get history(){return c(Ne(this,sn))}set history(e){M(Ne(this,sn),e,!0)}get targetResolved(){return c(Ne(this,Er))}get client(){return c(Ne(this,_r))}get readOnly(){var e;return this.connected&&((e=this.probe.stats)==null?void 0:e.read_only)===!0}get readOnlyReason(){var e;return(e=this.probe.stats)==null?void 0:e.read_only_reason}get capabilities(){return c(Ne(this,xr))}get supportedTransports(){var e,t;return((t=(e=Ur()).transports)==null?void 0:t.call(e))??[...Ii]}canReach(e){return il(e,this.supportedTransports)}async forget(e){await ir.forgetByUrl(e)}async forgetById(e){await ir.forgetById(e)}async hydrateUrls(){await ir.hydrate()}async bootstrap(e=$l){const t=await e(),n=t.route??null;if(!t.target)return n;const i=Po(t.target);if(t.token){Fl();const o=Ur();Vl(o)&&o.useHandoffToken(i.url,t.token)}return await this.tryConnect(i),n}async switch(e){this.active=e,Uo(e),await this.tryConnect(e)}async tryConnect(e){M(Ne(this,Er),!0);try{const t=await tr.track(`connect · ${e.label}`,()=>Ur().connect(e.id));M(Ne(this,_r),t.client,!0),this.active={...e,...t.connection,description:e.description},Uo(this.active);const[n,i,o]=await Promise.all([tr.track(`connect · ${e.label} stats`,()=>t.client.stats()).catch(()=>{}),tr.track(`connect · ${e.label} replication`,()=>t.client.replication()).catch(()=>{}),tr.track(`connect · ${e.label} capabilities`,()=>t.client.capabilities()).catch(()=>({...wr}))]);return this.probe={reachable:!0,rtt_ms:t.rtt_ms,stats:n,replication:i},M(Ne(this,xr),o,!0),this.connected=!0,!0}catch(t){return this.probe={reachable:!1,error:t.message},!1}}async adoptInjected(){const[e]=await Ur().list();if(!e)return!1;const t={...e,description:e.description??"Injected by the embedding host."};return this.tryConnect(t)}async connectFromBootParams(){var n,i;const e=(i=(n=Ur()).bootParams)==null?void 0:i.call(n);if(!e)return null;const t=e.to??e.view??null;return e.endpoint&&await this.tryConnect(Po(e.endpoint)),t}async refresh(){const e=this.client;if(!e){await this.tryConnect(this.active);return}try{const t=await tr.track(`heartbeat · ${this.active.label}`,()=>e.ping());if(!t.ok){this.probe={reachable:!1,error:t.error};return}const[n,i]=await Promise.all([tr.track("heartbeat · stats",()=>e.stats()).catch(()=>{}),tr.track("heartbeat · replication",()=>e.replication()).catch(()=>{})]);this.probe={reachable:!0,rtt_ms:t.rtt_ms,stats:n,replication:i},this.connected=!0}catch(t){this.probe={reachable:!1,error:t.message}}}disconnect(){this.connected=!1,this.probe={reachable:!1},M(Ne(this,_r),null),M(Ne(this,xr),{...wr},!0),M(Ne(this,Er),!1),Gi=!1}}rn=new WeakMap,nn=new WeakMap,on=new WeakMap,sn=new WeakMap,_r=new WeakMap,xr=new WeakMap,Er=new WeakMap;const Jl=new Xl;/**
|
|
5
|
-
* @license lucide-svelte v0.475.0 - ISC
|
|
6
|
-
*
|
|
7
|
-
* ISC License
|
|
8
|
-
*
|
|
9
|
-
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
|
|
10
|
-
*
|
|
11
|
-
* Permission to use, copy, modify, and/or distribute this software for any
|
|
12
|
-
* purpose with or without fee is hereby granted, provided that the above
|
|
13
|
-
* copyright notice and this permission notice appear in all copies.
|
|
14
|
-
*
|
|
15
|
-
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
16
|
-
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
17
|
-
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
18
|
-
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
19
|
-
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
20
|
-
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
21
|
-
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
22
|
-
*
|
|
23
|
-
*/const Zl={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};var Ql=kt("<svg><!><!></svg>");function ut(r,e){const t=rt(e,["children","$$slots","$$events","$$legacy"]),n=rt(t,["name","color","size","strokeWidth","absoluteStrokeWidth","iconNode"]);Rs(e,!1);let i=pr(e,"name",8,void 0),o=pr(e,"color",8,"currentColor"),s=pr(e,"size",8,24),a=pr(e,"strokeWidth",8,2),u=pr(e,"absoluteStrokeWidth",8,!1),l=pr(e,"iconNode",24,()=>[]);const d=(...y)=>y.filter((S,m,v)=>!!S&&v.indexOf(S)===m).join(" ");Kc();var f=Ql();ko(f,(y,S)=>({...Zl,...n,width:s(),height:s(),stroke:o(),"stroke-width":y,class:S}),[()=>(mr(u()),mr(a()),mr(s()),zt(()=>u()?Number(a())*24/Number(s()):a())),()=>(mr(i()),mr(t),zt(()=>d("lucide-icon","lucide",i()?`lucide-${i()}`:"",t.class)))]);var h=T(f);mt(h,1,l,xn,(y,S)=>{var m=re(()=>_n(c(S),2));let v=()=>c(m)[0],A=()=>c(m)[1];var w=Ve(),g=Ie(w);Tc(g,v,!0,($,E)=>{ko($,()=>({...A()}))}),z(y,w)});var p=U(h);it(p,e,"default",{}),I(f),z(r,f),Ns()}function Mo(r,e){const t=rt(e,["children","$$slots","$$events","$$legacy"]);/**
|
|
24
|
-
* @license lucide-svelte v0.475.0 - ISC
|
|
25
|
-
*
|
|
26
|
-
* ISC License
|
|
27
|
-
*
|
|
28
|
-
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
|
|
29
|
-
*
|
|
30
|
-
* Permission to use, copy, modify, and/or distribute this software for any
|
|
31
|
-
* purpose with or without fee is hereby granted, provided that the above
|
|
32
|
-
* copyright notice and this permission notice appear in all copies.
|
|
33
|
-
*
|
|
34
|
-
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
35
|
-
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
36
|
-
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
37
|
-
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
38
|
-
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
39
|
-
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
40
|
-
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
41
|
-
*
|
|
42
|
-
*/const n=[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z"}],["path",{d:"m7 16.5-4.74-2.85"}],["path",{d:"m7 16.5 5-3"}],["path",{d:"M7 16.5v5.17"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z"}],["path",{d:"m17 16.5-5-3"}],["path",{d:"m17 16.5 4.74-2.85"}],["path",{d:"M17 16.5v5.17"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z"}],["path",{d:"M12 8 7.26 5.15"}],["path",{d:"m12 8 4.74-2.85"}],["path",{d:"M12 13.5V8"}]];ut(r,at({name:"boxes"},()=>t,{get iconNode(){return n},children:(i,o)=>{var s=Ve(),a=Ie(s);it(a,e,"default",{}),z(i,s)},$$slots:{default:!0}}))}function ed(r,e){const t=rt(e,["children","$$slots","$$events","$$legacy"]);/**
|
|
43
|
-
* @license lucide-svelte v0.475.0 - ISC
|
|
44
|
-
*
|
|
45
|
-
* ISC License
|
|
46
|
-
*
|
|
47
|
-
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
|
|
48
|
-
*
|
|
49
|
-
* Permission to use, copy, modify, and/or distribute this software for any
|
|
50
|
-
* purpose with or without fee is hereby granted, provided that the above
|
|
51
|
-
* copyright notice and this permission notice appear in all copies.
|
|
52
|
-
*
|
|
53
|
-
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
54
|
-
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
55
|
-
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
56
|
-
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
57
|
-
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
58
|
-
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
59
|
-
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
60
|
-
*
|
|
61
|
-
*/const n=[["path",{d:"m18 16 4-4-4-4"}],["path",{d:"m6 8-4 4 4 4"}],["path",{d:"m14.5 4-5 16"}]];ut(r,at({name:"code-xml"},()=>t,{get iconNode(){return n},children:(i,o)=>{var s=Ve(),a=Ie(s);it(a,e,"default",{}),z(i,s)},$$slots:{default:!0}}))}function zo(r,e){const t=rt(e,["children","$$slots","$$events","$$legacy"]);/**
|
|
62
|
-
* @license lucide-svelte v0.475.0 - ISC
|
|
63
|
-
*
|
|
64
|
-
* ISC License
|
|
65
|
-
*
|
|
66
|
-
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
|
|
67
|
-
*
|
|
68
|
-
* Permission to use, copy, modify, and/or distribute this software for any
|
|
69
|
-
* purpose with or without fee is hereby granted, provided that the above
|
|
70
|
-
* copyright notice and this permission notice appear in all copies.
|
|
71
|
-
*
|
|
72
|
-
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
73
|
-
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
74
|
-
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
75
|
-
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
76
|
-
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
77
|
-
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
78
|
-
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
79
|
-
*
|
|
80
|
-
*/const n=[["path",{d:"M3 7V5c0-1.1.9-2 2-2h2"}],["path",{d:"M17 3h2c1.1 0 2 .9 2 2v2"}],["path",{d:"M21 17v2c0 1.1-.9 2-2 2h-2"}],["path",{d:"M7 21H5c-1.1 0-2-.9-2-2v-2"}],["rect",{width:"7",height:"5",x:"7",y:"7",rx:"1"}],["rect",{width:"7",height:"5",x:"10",y:"12",rx:"1"}]];ut(r,at({name:"group"},()=>t,{get iconNode(){return n},children:(i,o)=>{var s=Ve(),a=Ie(s);it(a,e,"default",{}),z(i,s)},$$slots:{default:!0}}))}function td(r,e){const t=rt(e,["children","$$slots","$$events","$$legacy"]);/**
|
|
81
|
-
* @license lucide-svelte v0.475.0 - ISC
|
|
82
|
-
*
|
|
83
|
-
* ISC License
|
|
84
|
-
*
|
|
85
|
-
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
|
|
86
|
-
*
|
|
87
|
-
* Permission to use, copy, modify, and/or distribute this software for any
|
|
88
|
-
* purpose with or without fee is hereby granted, provided that the above
|
|
89
|
-
* copyright notice and this permission notice appear in all copies.
|
|
90
|
-
*
|
|
91
|
-
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
92
|
-
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
93
|
-
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
94
|
-
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
95
|
-
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
96
|
-
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
97
|
-
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
98
|
-
*
|
|
99
|
-
*/const n=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 16v-4"}],["path",{d:"M12 8h.01"}]];ut(r,at({name:"info"},()=>t,{get iconNode(){return n},children:(i,o)=>{var s=Ve(),a=Ie(s);it(a,e,"default",{}),z(i,s)},$$slots:{default:!0}}))}function Bg(r,e){const t=rt(e,["children","$$slots","$$events","$$legacy"]);/**
|
|
100
|
-
* @license lucide-svelte v0.475.0 - ISC
|
|
101
|
-
*
|
|
102
|
-
* ISC License
|
|
103
|
-
*
|
|
104
|
-
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
|
|
105
|
-
*
|
|
106
|
-
* Permission to use, copy, modify, and/or distribute this software for any
|
|
107
|
-
* purpose with or without fee is hereby granted, provided that the above
|
|
108
|
-
* copyright notice and this permission notice appear in all copies.
|
|
109
|
-
*
|
|
110
|
-
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
111
|
-
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
112
|
-
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
113
|
-
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
114
|
-
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
115
|
-
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
116
|
-
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
117
|
-
*
|
|
118
|
-
*/const n=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17"}]];ut(r,at({name:"layers"},()=>t,{get iconNode(){return n},children:(i,o)=>{var s=Ve(),a=Ie(s);it(a,e,"default",{}),z(i,s)},$$slots:{default:!0}}))}function rd(r,e){const t=rt(e,["children","$$slots","$$events","$$legacy"]);/**
|
|
119
|
-
* @license lucide-svelte v0.475.0 - ISC
|
|
120
|
-
*
|
|
121
|
-
* ISC License
|
|
122
|
-
*
|
|
123
|
-
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
|
|
124
|
-
*
|
|
125
|
-
* Permission to use, copy, modify, and/or distribute this software for any
|
|
126
|
-
* purpose with or without fee is hereby granted, provided that the above
|
|
127
|
-
* copyright notice and this permission notice appear in all copies.
|
|
128
|
-
*
|
|
129
|
-
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
130
|
-
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
131
|
-
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
132
|
-
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
133
|
-
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
134
|
-
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
135
|
-
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
136
|
-
*
|
|
137
|
-
*/const n=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56"}]];ut(r,at({name:"loader-circle"},()=>t,{get iconNode(){return n},children:(i,o)=>{var s=Ve(),a=Ie(s);it(a,e,"default",{}),z(i,s)},$$slots:{default:!0}}))}function nd(r,e){const t=rt(e,["children","$$slots","$$events","$$legacy"]);/**
|
|
138
|
-
* @license lucide-svelte v0.475.0 - ISC
|
|
139
|
-
*
|
|
140
|
-
* ISC License
|
|
141
|
-
*
|
|
142
|
-
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
|
|
143
|
-
*
|
|
144
|
-
* Permission to use, copy, modify, and/or distribute this software for any
|
|
145
|
-
* purpose with or without fee is hereby granted, provided that the above
|
|
146
|
-
* copyright notice and this permission notice appear in all copies.
|
|
147
|
-
*
|
|
148
|
-
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
149
|
-
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
150
|
-
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
151
|
-
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
152
|
-
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
153
|
-
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
154
|
-
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
155
|
-
*
|
|
156
|
-
*/const n=[["polyline",{points:"15 3 21 3 21 9"}],["polyline",{points:"9 21 3 21 3 15"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14"}]];ut(r,at({name:"maximize-2"},()=>t,{get iconNode(){return n},children:(i,o)=>{var s=Ve(),a=Ie(s);it(a,e,"default",{}),z(i,s)},$$slots:{default:!0}}))}function Wo(r,e){const t=rt(e,["children","$$slots","$$events","$$legacy"]);/**
|
|
157
|
-
* @license lucide-svelte v0.475.0 - ISC
|
|
158
|
-
*
|
|
159
|
-
* ISC License
|
|
160
|
-
*
|
|
161
|
-
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
|
|
162
|
-
*
|
|
163
|
-
* Permission to use, copy, modify, and/or distribute this software for any
|
|
164
|
-
* purpose with or without fee is hereby granted, provided that the above
|
|
165
|
-
* copyright notice and this permission notice appear in all copies.
|
|
166
|
-
*
|
|
167
|
-
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
168
|
-
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
169
|
-
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
170
|
-
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
171
|
-
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
172
|
-
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
173
|
-
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
174
|
-
*
|
|
175
|
-
*/const n=[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3"}],["path",{d:"M12 12V8"}]];ut(r,at({name:"network"},()=>t,{get iconNode(){return n},children:(i,o)=>{var s=Ve(),a=Ie(s);it(a,e,"default",{}),z(i,s)},$$slots:{default:!0}}))}function id(r,e){const t=rt(e,["children","$$slots","$$events","$$legacy"]);/**
|
|
176
|
-
* @license lucide-svelte v0.475.0 - ISC
|
|
177
|
-
*
|
|
178
|
-
* ISC License
|
|
179
|
-
*
|
|
180
|
-
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
|
|
181
|
-
*
|
|
182
|
-
* Permission to use, copy, modify, and/or distribute this software for any
|
|
183
|
-
* purpose with or without fee is hereby granted, provided that the above
|
|
184
|
-
* copyright notice and this permission notice appear in all copies.
|
|
185
|
-
*
|
|
186
|
-
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
187
|
-
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
188
|
-
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
189
|
-
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
190
|
-
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
191
|
-
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
192
|
-
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
193
|
-
*
|
|
194
|
-
*/const n=[["polygon",{points:"6 3 20 12 6 21 6 3"}]];ut(r,at({name:"play"},()=>t,{get iconNode(){return n},children:(i,o)=>{var s=Ve(),a=Ie(s);it(a,e,"default",{}),z(i,s)},$$slots:{default:!0}}))}function od(r,e){const t=rt(e,["children","$$slots","$$events","$$legacy"]);/**
|
|
195
|
-
* @license lucide-svelte v0.475.0 - ISC
|
|
196
|
-
*
|
|
197
|
-
* ISC License
|
|
198
|
-
*
|
|
199
|
-
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
|
|
200
|
-
*
|
|
201
|
-
* Permission to use, copy, modify, and/or distribute this software for any
|
|
202
|
-
* purpose with or without fee is hereby granted, provided that the above
|
|
203
|
-
* copyright notice and this permission notice appear in all copies.
|
|
204
|
-
*
|
|
205
|
-
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
206
|
-
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
207
|
-
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
208
|
-
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
209
|
-
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
210
|
-
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
211
|
-
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
212
|
-
*
|
|
213
|
-
*/const n=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8"}],["path",{d:"M21 3v5h-5"}]];ut(r,at({name:"rotate-cw"},()=>t,{get iconNode(){return n},children:(i,o)=>{var s=Ve(),a=Ie(s);it(a,e,"default",{}),z(i,s)},$$slots:{default:!0}}))}function sd(r,e){const t=rt(e,["children","$$slots","$$events","$$legacy"]);/**
|
|
214
|
-
* @license lucide-svelte v0.475.0 - ISC
|
|
215
|
-
*
|
|
216
|
-
* ISC License
|
|
217
|
-
*
|
|
218
|
-
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
|
|
219
|
-
*
|
|
220
|
-
* Permission to use, copy, modify, and/or distribute this software for any
|
|
221
|
-
* purpose with or without fee is hereby granted, provided that the above
|
|
222
|
-
* copyright notice and this permission notice appear in all copies.
|
|
223
|
-
*
|
|
224
|
-
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
225
|
-
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
226
|
-
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
227
|
-
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
228
|
-
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
229
|
-
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
230
|
-
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
231
|
-
*
|
|
232
|
-
*/const n=[["circle",{cx:"6",cy:"19",r:"3"}],["path",{d:"M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15"}],["circle",{cx:"18",cy:"5",r:"3"}]];ut(r,at({name:"route"},()=>t,{get iconNode(){return n},children:(i,o)=>{var s=Ve(),a=Ie(s);it(a,e,"default",{}),z(i,s)},$$slots:{default:!0}}))}function ad(r,e){const t=rt(e,["children","$$slots","$$events","$$legacy"]);/**
|
|
233
|
-
* @license lucide-svelte v0.475.0 - ISC
|
|
234
|
-
*
|
|
235
|
-
* ISC License
|
|
236
|
-
*
|
|
237
|
-
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
|
|
238
|
-
*
|
|
239
|
-
* Permission to use, copy, modify, and/or distribute this software for any
|
|
240
|
-
* purpose with or without fee is hereby granted, provided that the above
|
|
241
|
-
* copyright notice and this permission notice appear in all copies.
|
|
242
|
-
*
|
|
243
|
-
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
244
|
-
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
245
|
-
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
246
|
-
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
247
|
-
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
248
|
-
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
249
|
-
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
250
|
-
*
|
|
251
|
-
*/const n=[["circle",{cx:"11",cy:"11",r:"8"}],["path",{d:"m21 21-4.3-4.3"}]];ut(r,at({name:"search"},()=>t,{get iconNode(){return n},children:(i,o)=>{var s=Ve(),a=Ie(s);it(a,e,"default",{}),z(i,s)},$$slots:{default:!0}}))}function ud(r,e){const t=rt(e,["children","$$slots","$$events","$$legacy"]);/**
|
|
252
|
-
* @license lucide-svelte v0.475.0 - ISC
|
|
253
|
-
*
|
|
254
|
-
* ISC License
|
|
255
|
-
*
|
|
256
|
-
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
|
|
257
|
-
*
|
|
258
|
-
* Permission to use, copy, modify, and/or distribute this software for any
|
|
259
|
-
* purpose with or without fee is hereby granted, provided that the above
|
|
260
|
-
* copyright notice and this permission notice appear in all copies.
|
|
261
|
-
*
|
|
262
|
-
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
263
|
-
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
264
|
-
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
265
|
-
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
266
|
-
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
267
|
-
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
268
|
-
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
269
|
-
*
|
|
270
|
-
*/const n=[["circle",{cx:"19",cy:"5",r:"2"}],["circle",{cx:"5",cy:"19",r:"2"}],["path",{d:"M5 17A12 12 0 0 1 17 5"}]];ut(r,at({name:"spline"},()=>t,{get iconNode(){return n},children:(i,o)=>{var s=Ve(),a=Ie(s);it(a,e,"default",{}),z(i,s)},$$slots:{default:!0}}))}function cd(r,e){const t=rt(e,["children","$$slots","$$events","$$legacy"]);/**
|
|
271
|
-
* @license lucide-svelte v0.475.0 - ISC
|
|
272
|
-
*
|
|
273
|
-
* ISC License
|
|
274
|
-
*
|
|
275
|
-
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
|
|
276
|
-
*
|
|
277
|
-
* Permission to use, copy, modify, and/or distribute this software for any
|
|
278
|
-
* purpose with or without fee is hereby granted, provided that the above
|
|
279
|
-
* copyright notice and this permission notice appear in all copies.
|
|
280
|
-
*
|
|
281
|
-
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
282
|
-
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
283
|
-
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
284
|
-
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
285
|
-
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
286
|
-
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
287
|
-
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
288
|
-
*
|
|
289
|
-
*/const n=[["path",{d:"M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18"}]];ut(r,at({name:"table-2"},()=>t,{get iconNode(){return n},children:(i,o)=>{var s=Ve(),a=Ie(s);it(a,e,"default",{}),z(i,s)},$$slots:{default:!0}}))}function jo(r,e){const t=rt(e,["children","$$slots","$$events","$$legacy"]);/**
|
|
290
|
-
* @license lucide-svelte v0.475.0 - ISC
|
|
291
|
-
*
|
|
292
|
-
* ISC License
|
|
293
|
-
*
|
|
294
|
-
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
|
|
295
|
-
*
|
|
296
|
-
* Permission to use, copy, modify, and/or distribute this software for any
|
|
297
|
-
* purpose with or without fee is hereby granted, provided that the above
|
|
298
|
-
* copyright notice and this permission notice appear in all copies.
|
|
299
|
-
*
|
|
300
|
-
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
301
|
-
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
302
|
-
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
303
|
-
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
304
|
-
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
305
|
-
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
306
|
-
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
307
|
-
*
|
|
308
|
-
*/const n=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"}],["path",{d:"M12 9v4"}],["path",{d:"M12 17h.01"}]];ut(r,at({name:"triangle-alert"},()=>t,{get iconNode(){return n},children:(i,o)=>{var s=Ve(),a=Ie(s);it(a,e,"default",{}),z(i,s)},$$slots:{default:!0}}))}function Bo(r,e){const t=rt(e,["children","$$slots","$$events","$$legacy"]);/**
|
|
309
|
-
* @license lucide-svelte v0.475.0 - ISC
|
|
310
|
-
*
|
|
311
|
-
* ISC License
|
|
312
|
-
*
|
|
313
|
-
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
|
|
314
|
-
*
|
|
315
|
-
* Permission to use, copy, modify, and/or distribute this software for any
|
|
316
|
-
* purpose with or without fee is hereby granted, provided that the above
|
|
317
|
-
* copyright notice and this permission notice appear in all copies.
|
|
318
|
-
*
|
|
319
|
-
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
320
|
-
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
321
|
-
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
322
|
-
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
323
|
-
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
324
|
-
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
325
|
-
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
326
|
-
*
|
|
327
|
-
*/const n=[["path",{d:"M18 6 6 18"}],["path",{d:"m6 6 12 12"}]];ut(r,at({name:"x"},()=>t,{get iconNode(){return n},children:(i,o)=>{var s=Ve(),a=Ie(s);it(a,e,"default",{}),z(i,s)},$$slots:{default:!0}}))}function ld(r,e){const t=rt(e,["children","$$slots","$$events","$$legacy"]);/**
|
|
328
|
-
* @license lucide-svelte v0.475.0 - ISC
|
|
329
|
-
*
|
|
330
|
-
* ISC License
|
|
331
|
-
*
|
|
332
|
-
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
|
|
333
|
-
*
|
|
334
|
-
* Permission to use, copy, modify, and/or distribute this software for any
|
|
335
|
-
* purpose with or without fee is hereby granted, provided that the above
|
|
336
|
-
* copyright notice and this permission notice appear in all copies.
|
|
337
|
-
*
|
|
338
|
-
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
339
|
-
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
340
|
-
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
341
|
-
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
342
|
-
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
343
|
-
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
344
|
-
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
345
|
-
*
|
|
346
|
-
*/const n=[["circle",{cx:"11",cy:"11",r:"8"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11"}]];ut(r,at({name:"zoom-in"},()=>t,{get iconNode(){return n},children:(i,o)=>{var s=Ve(),a=Ie(s);it(a,e,"default",{}),z(i,s)},$$slots:{default:!0}}))}function dd(r,e){const t=rt(e,["children","$$slots","$$events","$$legacy"]);/**
|
|
347
|
-
* @license lucide-svelte v0.475.0 - ISC
|
|
348
|
-
*
|
|
349
|
-
* ISC License
|
|
350
|
-
*
|
|
351
|
-
* Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
|
|
352
|
-
*
|
|
353
|
-
* Permission to use, copy, modify, and/or distribute this software for any
|
|
354
|
-
* purpose with or without fee is hereby granted, provided that the above
|
|
355
|
-
* copyright notice and this permission notice appear in all copies.
|
|
356
|
-
*
|
|
357
|
-
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
358
|
-
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
359
|
-
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
360
|
-
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
361
|
-
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
362
|
-
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
363
|
-
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
364
|
-
*
|
|
365
|
-
*/const n=[["circle",{cx:"11",cy:"11",r:"8"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11"}]];ut(r,at({name:"zoom-out"},()=>t,{get iconNode(){return n},children:(i,o)=>{var s=Ve(),a=Ie(s);it(a,e,"default",{}),z(i,s)},$$slots:{default:!0}}))}function Fg(r){return r?r==="graph"?"graph":r:"table"}function Kg(r,e){switch(r){case"graph":case"svg":return"graph";case"table":return"table";case"json":return"json";case"hypertable":case"kv":case"vector":case"queue":case"stats":case"diff":case"document":return r;default:return e}}function si(r,e){return`/c/${encodeURIComponent(r)}/p/${encodeURIComponent(e)}`}function Ti(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var vn={exports:{}},Fo;function fd(){if(Fo)return vn.exports;Fo=1;var r=typeof Reflect=="object"?Reflect:null,e=r&&typeof r.apply=="function"?r.apply:function($,E,k){return Function.prototype.apply.call($,E,k)},t;r&&typeof r.ownKeys=="function"?t=r.ownKeys:Object.getOwnPropertySymbols?t=function($){return Object.getOwnPropertyNames($).concat(Object.getOwnPropertySymbols($))}:t=function($){return Object.getOwnPropertyNames($)};function n(g){console&&console.warn&&console.warn(g)}var i=Number.isNaN||function($){return $!==$};function o(){o.init.call(this)}vn.exports=o,vn.exports.once=v,o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(g){if(typeof g!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof g)}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(g){if(typeof g!="number"||g<0||i(g))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+g+".");s=g}}),o.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function($){if(typeof $!="number"||$<0||i($))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+$+".");return this._maxListeners=$,this};function u(g){return g._maxListeners===void 0?o.defaultMaxListeners:g._maxListeners}o.prototype.getMaxListeners=function(){return u(this)},o.prototype.emit=function($){for(var E=[],k=1;k<arguments.length;k++)E.push(arguments[k]);var C=$==="error",D=this._events;if(D!==void 0)C=C&&D.error===void 0;else if(!C)return!1;if(C){var L;if(E.length>0&&(L=E[0]),L instanceof Error)throw L;var q=new Error("Unhandled error."+(L?" ("+L.message+")":""));throw q.context=L,q}var N=D[$];if(N===void 0)return!1;if(typeof N=="function")e(N,this,E);else for(var b=N.length,Ce=y(N,b),k=0;k<b;++k)e(Ce[k],this,E);return!0};function l(g,$,E,k){var C,D,L;if(a(E),D=g._events,D===void 0?(D=g._events=Object.create(null),g._eventsCount=0):(D.newListener!==void 0&&(g.emit("newListener",$,E.listener?E.listener:E),D=g._events),L=D[$]),L===void 0)L=D[$]=E,++g._eventsCount;else if(typeof L=="function"?L=D[$]=k?[E,L]:[L,E]:k?L.unshift(E):L.push(E),C=u(g),C>0&&L.length>C&&!L.warned){L.warned=!0;var q=new Error("Possible EventEmitter memory leak detected. "+L.length+" "+String($)+" listeners added. Use emitter.setMaxListeners() to increase limit");q.name="MaxListenersExceededWarning",q.emitter=g,q.type=$,q.count=L.length,n(q)}return g}o.prototype.addListener=function($,E){return l(this,$,E,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function($,E){return l(this,$,E,!0)};function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(g,$,E){var k={fired:!1,wrapFn:void 0,target:g,type:$,listener:E},C=d.bind(k);return C.listener=E,k.wrapFn=C,C}o.prototype.once=function($,E){return a(E),this.on($,f(this,$,E)),this},o.prototype.prependOnceListener=function($,E){return a(E),this.prependListener($,f(this,$,E)),this},o.prototype.removeListener=function($,E){var k,C,D,L,q;if(a(E),C=this._events,C===void 0)return this;if(k=C[$],k===void 0)return this;if(k===E||k.listener===E)--this._eventsCount===0?this._events=Object.create(null):(delete C[$],C.removeListener&&this.emit("removeListener",$,k.listener||E));else if(typeof k!="function"){for(D=-1,L=k.length-1;L>=0;L--)if(k[L]===E||k[L].listener===E){q=k[L].listener,D=L;break}if(D<0)return this;D===0?k.shift():S(k,D),k.length===1&&(C[$]=k[0]),C.removeListener!==void 0&&this.emit("removeListener",$,q||E)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function($){var E,k,C;if(k=this._events,k===void 0)return this;if(k.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):k[$]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete k[$]),this;if(arguments.length===0){var D=Object.keys(k),L;for(C=0;C<D.length;++C)L=D[C],L!=="removeListener"&&this.removeAllListeners(L);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(E=k[$],typeof E=="function")this.removeListener($,E);else if(E!==void 0)for(C=E.length-1;C>=0;C--)this.removeListener($,E[C]);return this};function h(g,$,E){var k=g._events;if(k===void 0)return[];var C=k[$];return C===void 0?[]:typeof C=="function"?E?[C.listener||C]:[C]:E?m(C):y(C,C.length)}o.prototype.listeners=function($){return h(this,$,!0)},o.prototype.rawListeners=function($){return h(this,$,!1)},o.listenerCount=function(g,$){return typeof g.listenerCount=="function"?g.listenerCount($):p.call(g,$)},o.prototype.listenerCount=p;function p(g){var $=this._events;if($!==void 0){var E=$[g];if(typeof E=="function")return 1;if(E!==void 0)return E.length}return 0}o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]};function y(g,$){for(var E=new Array($),k=0;k<$;++k)E[k]=g[k];return E}function S(g,$){for(;$+1<g.length;$++)g[$]=g[$+1];g.pop()}function m(g){for(var $=new Array(g.length),E=0;E<$.length;++E)$[E]=g[E].listener||g[E];return $}function v(g,$){return new Promise(function(E,k){function C(L){g.removeListener($,D),k(L)}function D(){typeof g.removeListener=="function"&&g.removeListener("error",C),E([].slice.call(arguments))}w(g,$,D,{once:!0}),$!=="error"&&A(g,C,{once:!0})})}function A(g,$,E){typeof g.on=="function"&&w(g,"error",$,E)}function w(g,$,E,k){if(typeof g.on=="function")k.once?g.once($,E):g.on($,E);else if(typeof g.addEventListener=="function")g.addEventListener($,function C(D){k.once&&g.removeEventListener($,C),E(D)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof g)}return vn.exports}var hd=fd();function gd(){const r=arguments[0];for(let e=1,t=arguments.length;e<t;e++)if(arguments[e])for(const n in arguments[e])r[n]=arguments[e][n];return r}let nt=gd;typeof Object.assign=="function"&&(nt=Object.assign);function It(r,e,t,n){const i=r._nodes.get(e);let o=null;return i&&(n==="mixed"?o=i.out&&i.out[t]||i.undirected&&i.undirected[t]:n==="directed"?o=i.out&&i.out[t]:o=i.undirected&&i.undirected[t]),o}function gt(r){return typeof r=="object"&&r!==null}function ta(r){let e;for(e in r)return!1;return!0}function Dt(r,e,t){Object.defineProperty(r,e,{enumerable:!1,configurable:!1,writable:!0,value:t})}function Ot(r,e,t){const n={enumerable:!0,configurable:!0};typeof t=="function"?n.get=t:(n.value=t,n.writable=!1),Object.defineProperty(r,e,n)}function Ko(r){return!(!gt(r)||r.attributes&&!Array.isArray(r.attributes))}function pd(){let r=Math.floor(Math.random()*256)&255;return()=>r++}function Vt(){const r=arguments;let e=null,t=-1;return{[Symbol.iterator](){return this},next(){let n=null;do{if(e===null){if(t++,t>=r.length)return{done:!0};e=r[t][Symbol.iterator]()}if(n=e.next(),n.done){e=null;continue}break}while(!0);return n}}}function $r(){return{[Symbol.iterator](){return this},next(){return{done:!0}}}}class Oi extends Error{constructor(e){super(),this.name="GraphError",this.message=e}}class H extends Oi{constructor(e){super(e),this.name="InvalidArgumentsGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,H.prototype.constructor)}}class j extends Oi{constructor(e){super(e),this.name="NotFoundGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,j.prototype.constructor)}}class se extends Oi{constructor(e){super(e),this.name="UsageGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,se.prototype.constructor)}}function ra(r,e){this.key=r,this.attributes=e,this.clear()}ra.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.undirectedDegree=0,this.undirectedLoops=0,this.directedLoops=0,this.in={},this.out={},this.undirected={}};function na(r,e){this.key=r,this.attributes=e,this.clear()}na.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.directedLoops=0,this.in={},this.out={}};function ia(r,e){this.key=r,this.attributes=e,this.clear()}ia.prototype.clear=function(){this.undirectedDegree=0,this.undirectedLoops=0,this.undirected={}};function Ar(r,e,t,n,i){this.key=e,this.attributes=i,this.undirected=r,this.source=t,this.target=n}Ar.prototype.attach=function(){let r="out",e="in";this.undirected&&(r=e="undirected");const t=this.source.key,n=this.target.key;this.source[r][n]=this,!(this.undirected&&t===n)&&(this.target[e][t]=this)};Ar.prototype.attachMulti=function(){let r="out",e="in";const t=this.source.key,n=this.target.key;this.undirected&&(r=e="undirected");const i=this.source[r],o=i[n];if(typeof o>"u"){i[n]=this,this.undirected&&t===n||(this.target[e][t]=this);return}o.previous=this,this.next=o,i[n]=this,this.target[e][t]=this};Ar.prototype.detach=function(){const r=this.source.key,e=this.target.key;let t="out",n="in";this.undirected&&(t=n="undirected"),delete this.source[t][e],delete this.target[n][r]};Ar.prototype.detachMulti=function(){const r=this.source.key,e=this.target.key;let t="out",n="in";this.undirected&&(t=n="undirected"),this.previous===void 0?this.next===void 0?(delete this.source[t][e],delete this.target[n][r]):(this.next.previous=void 0,this.source[t][e]=this.next,this.target[n][r]=this.next):(this.previous.next=this.next,this.next!==void 0&&(this.next.previous=this.previous))};const oa=0,sa=1,vd=2,aa=3;function Yt(r,e,t,n,i,o,s){let a,u,l,d;if(n=""+n,t===oa){if(a=r._nodes.get(n),!a)throw new j(`Graph.${e}: could not find the "${n}" node in the graph.`);l=i,d=o}else if(t===aa){if(i=""+i,u=r._edges.get(i),!u)throw new j(`Graph.${e}: could not find the "${i}" edge in the graph.`);const f=u.source.key,h=u.target.key;if(n===f)a=u.target;else if(n===h)a=u.source;else throw new j(`Graph.${e}: the "${n}" node is not attached to the "${i}" edge (${f}, ${h}).`);l=o,d=s}else{if(u=r._edges.get(n),!u)throw new j(`Graph.${e}: could not find the "${n}" edge in the graph.`);t===sa?a=u.source:a=u.target,l=i,d=o}return[a,l,d]}function yd(r,e,t){r.prototype[e]=function(n,i,o){const[s,a]=Yt(this,e,t,n,i,o);return s.attributes[a]}}function md(r,e,t){r.prototype[e]=function(n,i){const[o]=Yt(this,e,t,n,i);return o.attributes}}function bd(r,e,t){r.prototype[e]=function(n,i,o){const[s,a]=Yt(this,e,t,n,i,o);return s.attributes.hasOwnProperty(a)}}function wd(r,e,t){r.prototype[e]=function(n,i,o,s){const[a,u,l]=Yt(this,e,t,n,i,o,s);return a.attributes[u]=l,this.emit("nodeAttributesUpdated",{key:a.key,type:"set",attributes:a.attributes,name:u}),this}}function _d(r,e,t){r.prototype[e]=function(n,i,o,s){const[a,u,l]=Yt(this,e,t,n,i,o,s);if(typeof l!="function")throw new H(`Graph.${e}: updater should be a function.`);const d=a.attributes,f=l(d[u]);return d[u]=f,this.emit("nodeAttributesUpdated",{key:a.key,type:"set",attributes:a.attributes,name:u}),this}}function xd(r,e,t){r.prototype[e]=function(n,i,o){const[s,a]=Yt(this,e,t,n,i,o);return delete s.attributes[a],this.emit("nodeAttributesUpdated",{key:s.key,type:"remove",attributes:s.attributes,name:a}),this}}function Ed(r,e,t){r.prototype[e]=function(n,i,o){const[s,a]=Yt(this,e,t,n,i,o);if(!gt(a))throw new H(`Graph.${e}: provided attributes are not a plain object.`);return s.attributes=a,this.emit("nodeAttributesUpdated",{key:s.key,type:"replace",attributes:s.attributes}),this}}function kd(r,e,t){r.prototype[e]=function(n,i,o){const[s,a]=Yt(this,e,t,n,i,o);if(!gt(a))throw new H(`Graph.${e}: provided attributes are not a plain object.`);return nt(s.attributes,a),this.emit("nodeAttributesUpdated",{key:s.key,type:"merge",attributes:s.attributes,data:a}),this}}function Sd(r,e,t){r.prototype[e]=function(n,i,o){const[s,a]=Yt(this,e,t,n,i,o);if(typeof a!="function")throw new H(`Graph.${e}: provided updater is not a function.`);return s.attributes=a(s.attributes),this.emit("nodeAttributesUpdated",{key:s.key,type:"update",attributes:s.attributes}),this}}const $d=[{name:r=>`get${r}Attribute`,attacher:yd},{name:r=>`get${r}Attributes`,attacher:md},{name:r=>`has${r}Attribute`,attacher:bd},{name:r=>`set${r}Attribute`,attacher:wd},{name:r=>`update${r}Attribute`,attacher:_d},{name:r=>`remove${r}Attribute`,attacher:xd},{name:r=>`replace${r}Attributes`,attacher:Ed},{name:r=>`merge${r}Attributes`,attacher:kd},{name:r=>`update${r}Attributes`,attacher:Sd}];function Ad(r){$d.forEach(function({name:e,attacher:t}){t(r,e("Node"),oa),t(r,e("Source"),sa),t(r,e("Target"),vd),t(r,e("Opposite"),aa)})}function Cd(r,e,t){r.prototype[e]=function(n,i){let o;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new se(`Graph.${e}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new se(`Graph.${e}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const s=""+n,a=""+i;if(i=arguments[2],o=It(this,s,a,t),!o)throw new j(`Graph.${e}: could not find an edge for the given path ("${s}" - "${a}").`)}else{if(t!=="mixed")throw new se(`Graph.${e}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(n=""+n,o=this._edges.get(n),!o)throw new j(`Graph.${e}: could not find the "${n}" edge in the graph.`)}return o.attributes[i]}}function Ld(r,e,t){r.prototype[e]=function(n){let i;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new se(`Graph.${e}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>1){if(this.multi)throw new se(`Graph.${e}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const o=""+n,s=""+arguments[1];if(i=It(this,o,s,t),!i)throw new j(`Graph.${e}: could not find an edge for the given path ("${o}" - "${s}").`)}else{if(t!=="mixed")throw new se(`Graph.${e}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(n=""+n,i=this._edges.get(n),!i)throw new j(`Graph.${e}: could not find the "${n}" edge in the graph.`)}return i.attributes}}function Dd(r,e,t){r.prototype[e]=function(n,i){let o;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new se(`Graph.${e}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new se(`Graph.${e}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const s=""+n,a=""+i;if(i=arguments[2],o=It(this,s,a,t),!o)throw new j(`Graph.${e}: could not find an edge for the given path ("${s}" - "${a}").`)}else{if(t!=="mixed")throw new se(`Graph.${e}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(n=""+n,o=this._edges.get(n),!o)throw new j(`Graph.${e}: could not find the "${n}" edge in the graph.`)}return o.attributes.hasOwnProperty(i)}}function Id(r,e,t){r.prototype[e]=function(n,i,o){let s;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new se(`Graph.${e}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>3){if(this.multi)throw new se(`Graph.${e}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const a=""+n,u=""+i;if(i=arguments[2],o=arguments[3],s=It(this,a,u,t),!s)throw new j(`Graph.${e}: could not find an edge for the given path ("${a}" - "${u}").`)}else{if(t!=="mixed")throw new se(`Graph.${e}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(n=""+n,s=this._edges.get(n),!s)throw new j(`Graph.${e}: could not find the "${n}" edge in the graph.`)}return s.attributes[i]=o,this.emit("edgeAttributesUpdated",{key:s.key,type:"set",attributes:s.attributes,name:i}),this}}function Gd(r,e,t){r.prototype[e]=function(n,i,o){let s;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new se(`Graph.${e}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>3){if(this.multi)throw new se(`Graph.${e}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const a=""+n,u=""+i;if(i=arguments[2],o=arguments[3],s=It(this,a,u,t),!s)throw new j(`Graph.${e}: could not find an edge for the given path ("${a}" - "${u}").`)}else{if(t!=="mixed")throw new se(`Graph.${e}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(n=""+n,s=this._edges.get(n),!s)throw new j(`Graph.${e}: could not find the "${n}" edge in the graph.`)}if(typeof o!="function")throw new H(`Graph.${e}: updater should be a function.`);return s.attributes[i]=o(s.attributes[i]),this.emit("edgeAttributesUpdated",{key:s.key,type:"set",attributes:s.attributes,name:i}),this}}function Td(r,e,t){r.prototype[e]=function(n,i){let o;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new se(`Graph.${e}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new se(`Graph.${e}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const s=""+n,a=""+i;if(i=arguments[2],o=It(this,s,a,t),!o)throw new j(`Graph.${e}: could not find an edge for the given path ("${s}" - "${a}").`)}else{if(t!=="mixed")throw new se(`Graph.${e}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(n=""+n,o=this._edges.get(n),!o)throw new j(`Graph.${e}: could not find the "${n}" edge in the graph.`)}return delete o.attributes[i],this.emit("edgeAttributesUpdated",{key:o.key,type:"remove",attributes:o.attributes,name:i}),this}}function Od(r,e,t){r.prototype[e]=function(n,i){let o;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new se(`Graph.${e}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new se(`Graph.${e}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const s=""+n,a=""+i;if(i=arguments[2],o=It(this,s,a,t),!o)throw new j(`Graph.${e}: could not find an edge for the given path ("${s}" - "${a}").`)}else{if(t!=="mixed")throw new se(`Graph.${e}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(n=""+n,o=this._edges.get(n),!o)throw new j(`Graph.${e}: could not find the "${n}" edge in the graph.`)}if(!gt(i))throw new H(`Graph.${e}: provided attributes are not a plain object.`);return o.attributes=i,this.emit("edgeAttributesUpdated",{key:o.key,type:"replace",attributes:o.attributes}),this}}function Rd(r,e,t){r.prototype[e]=function(n,i){let o;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new se(`Graph.${e}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new se(`Graph.${e}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const s=""+n,a=""+i;if(i=arguments[2],o=It(this,s,a,t),!o)throw new j(`Graph.${e}: could not find an edge for the given path ("${s}" - "${a}").`)}else{if(t!=="mixed")throw new se(`Graph.${e}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(n=""+n,o=this._edges.get(n),!o)throw new j(`Graph.${e}: could not find the "${n}" edge in the graph.`)}if(!gt(i))throw new H(`Graph.${e}: provided attributes are not a plain object.`);return nt(o.attributes,i),this.emit("edgeAttributesUpdated",{key:o.key,type:"merge",attributes:o.attributes,data:i}),this}}function Nd(r,e,t){r.prototype[e]=function(n,i){let o;if(this.type!=="mixed"&&t!=="mixed"&&t!==this.type)throw new se(`Graph.${e}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new se(`Graph.${e}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const s=""+n,a=""+i;if(i=arguments[2],o=It(this,s,a,t),!o)throw new j(`Graph.${e}: could not find an edge for the given path ("${s}" - "${a}").`)}else{if(t!=="mixed")throw new se(`Graph.${e}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(n=""+n,o=this._edges.get(n),!o)throw new j(`Graph.${e}: could not find the "${n}" edge in the graph.`)}if(typeof i!="function")throw new H(`Graph.${e}: provided updater is not a function.`);return o.attributes=i(o.attributes),this.emit("edgeAttributesUpdated",{key:o.key,type:"update",attributes:o.attributes}),this}}const Ud=[{name:r=>`get${r}Attribute`,attacher:Cd},{name:r=>`get${r}Attributes`,attacher:Ld},{name:r=>`has${r}Attribute`,attacher:Dd},{name:r=>`set${r}Attribute`,attacher:Id},{name:r=>`update${r}Attribute`,attacher:Gd},{name:r=>`remove${r}Attribute`,attacher:Td},{name:r=>`replace${r}Attributes`,attacher:Od},{name:r=>`merge${r}Attributes`,attacher:Rd},{name:r=>`update${r}Attributes`,attacher:Nd}];function Pd(r){Ud.forEach(function({name:e,attacher:t}){t(r,e("Edge"),"mixed"),t(r,e("DirectedEdge"),"directed"),t(r,e("UndirectedEdge"),"undirected")})}const Md=[{name:"edges",type:"mixed"},{name:"inEdges",type:"directed",direction:"in"},{name:"outEdges",type:"directed",direction:"out"},{name:"inboundEdges",type:"mixed",direction:"in"},{name:"outboundEdges",type:"mixed",direction:"out"},{name:"directedEdges",type:"directed"},{name:"undirectedEdges",type:"undirected"}];function zd(r,e,t,n){let i=!1;for(const o in e){if(o===n)continue;const s=e[o];if(i=t(s.key,s.attributes,s.source.key,s.target.key,s.source.attributes,s.target.attributes,s.undirected),r&&i)return s.key}}function Wd(r,e,t,n){let i,o,s,a=!1;for(const u in e)if(u!==n){i=e[u];do{if(o=i.source,s=i.target,a=t(i.key,i.attributes,o.key,s.key,o.attributes,s.attributes,i.undirected),r&&a)return i.key;i=i.next}while(i!==void 0)}}function ai(r,e){const t=Object.keys(r),n=t.length;let i,o=0;return{[Symbol.iterator](){return this},next(){do if(i)i=i.next;else{if(o>=n)return{done:!0};const s=t[o++];if(s===e){i=void 0;continue}i=r[s]}while(!i);return{done:!1,value:{edge:i.key,attributes:i.attributes,source:i.source.key,target:i.target.key,sourceAttributes:i.source.attributes,targetAttributes:i.target.attributes,undirected:i.undirected}}}}}function jd(r,e,t,n){const i=e[t];if(!i)return;const o=i.source,s=i.target;if(n(i.key,i.attributes,o.key,s.key,o.attributes,s.attributes,i.undirected)&&r)return i.key}function Bd(r,e,t,n){let i=e[t];if(!i)return;let o=!1;do{if(o=n(i.key,i.attributes,i.source.key,i.target.key,i.source.attributes,i.target.attributes,i.undirected),r&&o)return i.key;i=i.next}while(i!==void 0)}function ui(r,e){let t=r[e];if(t.next!==void 0)return{[Symbol.iterator](){return this},next(){if(!t)return{done:!0};const i={edge:t.key,attributes:t.attributes,source:t.source.key,target:t.target.key,sourceAttributes:t.source.attributes,targetAttributes:t.target.attributes,undirected:t.undirected};return t=t.next,{done:!1,value:i}}};let n=!1;return{[Symbol.iterator](){return this},next(){return n===!0?{done:!0}:(n=!0,{done:!1,value:{edge:t.key,attributes:t.attributes,source:t.source.key,target:t.target.key,sourceAttributes:t.source.attributes,targetAttributes:t.target.attributes,undirected:t.undirected}})}}}function Fd(r,e){if(r.size===0)return[];if(e==="mixed"||e===r.type)return Array.from(r._edges.keys());const t=e==="undirected"?r.undirectedSize:r.directedSize,n=new Array(t),i=e==="undirected",o=r._edges.values();let s=0,a,u;for(;a=o.next(),a.done!==!0;)u=a.value,u.undirected===i&&(n[s++]=u.key);return n}function ua(r,e,t,n){if(e.size===0)return;const i=t!=="mixed"&&t!==e.type,o=t==="undirected";let s,a,u=!1;const l=e._edges.values();for(;s=l.next(),s.done!==!0;){if(a=s.value,i&&a.undirected!==o)continue;const{key:d,attributes:f,source:h,target:p}=a;if(u=n(d,f,h.key,p.key,h.attributes,p.attributes,a.undirected),r&&u)return d}}function Kd(r,e){if(r.size===0)return $r();const t=e!=="mixed"&&e!==r.type,n=e==="undirected",i=r._edges.values();return{[Symbol.iterator](){return this},next(){let o,s;for(;;){if(o=i.next(),o.done)return o;if(s=o.value,!(t&&s.undirected!==n))break}return{value:{edge:s.key,attributes:s.attributes,source:s.source.key,target:s.target.key,sourceAttributes:s.source.attributes,targetAttributes:s.target.attributes,undirected:s.undirected},done:!1}}}}function Ri(r,e,t,n,i,o){const s=e?Wd:zd;let a;if(t!=="undirected"&&(n!=="out"&&(a=s(r,i.in,o),r&&a)||n!=="in"&&(a=s(r,i.out,o,n?void 0:i.key),r&&a))||t!=="directed"&&(a=s(r,i.undirected,o),r&&a))return a}function Hd(r,e,t,n){const i=[];return Ri(!1,r,e,t,n,function(o){i.push(o)}),i}function qd(r,e,t){let n=$r();return r!=="undirected"&&(e!=="out"&&typeof t.in<"u"&&(n=Vt(n,ai(t.in))),e!=="in"&&typeof t.out<"u"&&(n=Vt(n,ai(t.out,e?void 0:t.key)))),r!=="directed"&&typeof t.undirected<"u"&&(n=Vt(n,ai(t.undirected))),n}function Ni(r,e,t,n,i,o,s){const a=t?Bd:jd;let u;if(e!=="undirected"&&(typeof i.in<"u"&&n!=="out"&&(u=a(r,i.in,o,s),r&&u)||typeof i.out<"u"&&n!=="in"&&(n||i.key!==o)&&(u=a(r,i.out,o,s),r&&u))||e!=="directed"&&typeof i.undirected<"u"&&(u=a(r,i.undirected,o,s),r&&u))return u}function Vd(r,e,t,n,i){const o=[];return Ni(!1,r,e,t,n,i,function(s){o.push(s)}),o}function Yd(r,e,t,n){let i=$r();return r!=="undirected"&&(typeof t.in<"u"&&e!=="out"&&n in t.in&&(i=Vt(i,ui(t.in,n))),typeof t.out<"u"&&e!=="in"&&n in t.out&&(e||t.key!==n)&&(i=Vt(i,ui(t.out,n)))),r!=="directed"&&typeof t.undirected<"u"&&n in t.undirected&&(i=Vt(i,ui(t.undirected,n))),i}function Xd(r,e){const{name:t,type:n,direction:i}=e;r.prototype[t]=function(o,s){if(n!=="mixed"&&this.type!=="mixed"&&n!==this.type)return[];if(!arguments.length)return Fd(this,n);if(arguments.length===1){o=""+o;const a=this._nodes.get(o);if(typeof a>"u")throw new j(`Graph.${t}: could not find the "${o}" node in the graph.`);return Hd(this.multi,n==="mixed"?this.type:n,i,a)}if(arguments.length===2){o=""+o,s=""+s;const a=this._nodes.get(o);if(!a)throw new j(`Graph.${t}: could not find the "${o}" source node in the graph.`);if(!this._nodes.has(s))throw new j(`Graph.${t}: could not find the "${s}" target node in the graph.`);return Vd(n,this.multi,i,a,s)}throw new H(`Graph.${t}: too many arguments (expecting 0, 1 or 2 and got ${arguments.length}).`)}}function Jd(r,e){const{name:t,type:n,direction:i}=e,o="forEach"+t[0].toUpperCase()+t.slice(1,-1);r.prototype[o]=function(l,d,f){if(!(n!=="mixed"&&this.type!=="mixed"&&n!==this.type)){if(arguments.length===1)return f=l,ua(!1,this,n,f);if(arguments.length===2){l=""+l,f=d;const h=this._nodes.get(l);if(typeof h>"u")throw new j(`Graph.${o}: could not find the "${l}" node in the graph.`);return Ri(!1,this.multi,n==="mixed"?this.type:n,i,h,f)}if(arguments.length===3){l=""+l,d=""+d;const h=this._nodes.get(l);if(!h)throw new j(`Graph.${o}: could not find the "${l}" source node in the graph.`);if(!this._nodes.has(d))throw new j(`Graph.${o}: could not find the "${d}" target node in the graph.`);return Ni(!1,n,this.multi,i,h,d,f)}throw new H(`Graph.${o}: too many arguments (expecting 1, 2 or 3 and got ${arguments.length}).`)}};const s="map"+t[0].toUpperCase()+t.slice(1);r.prototype[s]=function(){const l=Array.prototype.slice.call(arguments),d=l.pop();let f;if(l.length===0){let h=0;n!=="directed"&&(h+=this.undirectedSize),n!=="undirected"&&(h+=this.directedSize),f=new Array(h);let p=0;l.push((y,S,m,v,A,w,g)=>{f[p++]=d(y,S,m,v,A,w,g)})}else f=[],l.push((h,p,y,S,m,v,A)=>{f.push(d(h,p,y,S,m,v,A))});return this[o].apply(this,l),f};const a="filter"+t[0].toUpperCase()+t.slice(1);r.prototype[a]=function(){const l=Array.prototype.slice.call(arguments),d=l.pop(),f=[];return l.push((h,p,y,S,m,v,A)=>{d(h,p,y,S,m,v,A)&&f.push(h)}),this[o].apply(this,l),f};const u="reduce"+t[0].toUpperCase()+t.slice(1);r.prototype[u]=function(){let l=Array.prototype.slice.call(arguments);if(l.length<2||l.length>4)throw new H(`Graph.${u}: invalid number of arguments (expecting 2, 3 or 4 and got ${l.length}).`);if(typeof l[l.length-1]=="function"&&typeof l[l.length-2]!="function")throw new H(`Graph.${u}: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.`);let d,f;l.length===2?(d=l[0],f=l[1],l=[]):l.length===3?(d=l[1],f=l[2],l=[l[0]]):l.length===4&&(d=l[2],f=l[3],l=[l[0],l[1]]);let h=f;return l.push((p,y,S,m,v,A,w)=>{h=d(h,p,y,S,m,v,A,w)}),this[o].apply(this,l),h}}function Zd(r,e){const{name:t,type:n,direction:i}=e,o="find"+t[0].toUpperCase()+t.slice(1,-1);r.prototype[o]=function(u,l,d){if(n!=="mixed"&&this.type!=="mixed"&&n!==this.type)return!1;if(arguments.length===1)return d=u,ua(!0,this,n,d);if(arguments.length===2){u=""+u,d=l;const f=this._nodes.get(u);if(typeof f>"u")throw new j(`Graph.${o}: could not find the "${u}" node in the graph.`);return Ri(!0,this.multi,n==="mixed"?this.type:n,i,f,d)}if(arguments.length===3){u=""+u,l=""+l;const f=this._nodes.get(u);if(!f)throw new j(`Graph.${o}: could not find the "${u}" source node in the graph.`);if(!this._nodes.has(l))throw new j(`Graph.${o}: could not find the "${l}" target node in the graph.`);return Ni(!0,n,this.multi,i,f,l,d)}throw new H(`Graph.${o}: too many arguments (expecting 1, 2 or 3 and got ${arguments.length}).`)};const s="some"+t[0].toUpperCase()+t.slice(1,-1);r.prototype[s]=function(){const u=Array.prototype.slice.call(arguments),l=u.pop();return u.push((f,h,p,y,S,m,v)=>l(f,h,p,y,S,m,v)),!!this[o].apply(this,u)};const a="every"+t[0].toUpperCase()+t.slice(1,-1);r.prototype[a]=function(){const u=Array.prototype.slice.call(arguments),l=u.pop();return u.push((f,h,p,y,S,m,v)=>!l(f,h,p,y,S,m,v)),!this[o].apply(this,u)}}function Qd(r,e){const{name:t,type:n,direction:i}=e,o=t.slice(0,-1)+"Entries";r.prototype[o]=function(s,a){if(n!=="mixed"&&this.type!=="mixed"&&n!==this.type)return $r();if(!arguments.length)return Kd(this,n);if(arguments.length===1){s=""+s;const u=this._nodes.get(s);if(!u)throw new j(`Graph.${o}: could not find the "${s}" node in the graph.`);return qd(n,i,u)}if(arguments.length===2){s=""+s,a=""+a;const u=this._nodes.get(s);if(!u)throw new j(`Graph.${o}: could not find the "${s}" source node in the graph.`);if(!this._nodes.has(a))throw new j(`Graph.${o}: could not find the "${a}" target node in the graph.`);return Yd(n,i,u,a)}throw new H(`Graph.${o}: too many arguments (expecting 0, 1 or 2 and got ${arguments.length}).`)}}function ef(r){Md.forEach(e=>{Xd(r,e),Jd(r,e),Zd(r,e),Qd(r,e)})}const tf=[{name:"neighbors",type:"mixed"},{name:"inNeighbors",type:"directed",direction:"in"},{name:"outNeighbors",type:"directed",direction:"out"},{name:"inboundNeighbors",type:"mixed",direction:"in"},{name:"outboundNeighbors",type:"mixed",direction:"out"},{name:"directedNeighbors",type:"directed"},{name:"undirectedNeighbors",type:"undirected"}];function Dn(){this.A=null,this.B=null}Dn.prototype.wrap=function(r){this.A===null?this.A=r:this.B===null&&(this.B=r)};Dn.prototype.has=function(r){return this.A!==null&&r in this.A||this.B!==null&&r in this.B};function Pr(r,e,t,n,i){for(const o in n){const s=n[o],a=s.source,u=s.target,l=a===t?u:a;if(e&&e.has(l.key))continue;const d=i(l.key,l.attributes);if(r&&d)return l.key}}function Ui(r,e,t,n,i){if(e!=="mixed"){if(e==="undirected")return Pr(r,null,n,n.undirected,i);if(typeof t=="string")return Pr(r,null,n,n[t],i)}const o=new Dn;let s;if(e!=="undirected"){if(t!=="out"){if(s=Pr(r,null,n,n.in,i),r&&s)return s;o.wrap(n.in)}if(t!=="in"){if(s=Pr(r,o,n,n.out,i),r&&s)return s;o.wrap(n.out)}}if(e!=="directed"&&(s=Pr(r,o,n,n.undirected,i),r&&s))return s}function rf(r,e,t){if(r!=="mixed"){if(r==="undirected")return Object.keys(t.undirected);if(typeof e=="string")return Object.keys(t[e])}const n=[];return Ui(!1,r,e,t,function(i){n.push(i)}),n}function Mr(r,e,t){const n=Object.keys(t),i=n.length;let o=0;return{[Symbol.iterator](){return this},next(){let s=null;do{if(o>=i)return r&&r.wrap(t),{done:!0};const a=t[n[o++]],u=a.source,l=a.target;if(s=u===e?l:u,r&&r.has(s.key)){s=null;continue}}while(s===null);return{done:!1,value:{neighbor:s.key,attributes:s.attributes}}}}}function nf(r,e,t){if(r!=="mixed"){if(r==="undirected")return Mr(null,t,t.undirected);if(typeof e=="string")return Mr(null,t,t[e])}let n=$r();const i=new Dn;return r!=="undirected"&&(e!=="out"&&(n=Vt(n,Mr(i,t,t.in))),e!=="in"&&(n=Vt(n,Mr(i,t,t.out)))),r!=="directed"&&(n=Vt(n,Mr(i,t,t.undirected))),n}function of(r,e){const{name:t,type:n,direction:i}=e;r.prototype[t]=function(o){if(n!=="mixed"&&this.type!=="mixed"&&n!==this.type)return[];o=""+o;const s=this._nodes.get(o);if(typeof s>"u")throw new j(`Graph.${t}: could not find the "${o}" node in the graph.`);return rf(n==="mixed"?this.type:n,i,s)}}function sf(r,e){const{name:t,type:n,direction:i}=e,o="forEach"+t[0].toUpperCase()+t.slice(1,-1);r.prototype[o]=function(l,d){if(n!=="mixed"&&this.type!=="mixed"&&n!==this.type)return;l=""+l;const f=this._nodes.get(l);if(typeof f>"u")throw new j(`Graph.${o}: could not find the "${l}" node in the graph.`);Ui(!1,n==="mixed"?this.type:n,i,f,d)};const s="map"+t[0].toUpperCase()+t.slice(1);r.prototype[s]=function(l,d){const f=[];return this[o](l,(h,p)=>{f.push(d(h,p))}),f};const a="filter"+t[0].toUpperCase()+t.slice(1);r.prototype[a]=function(l,d){const f=[];return this[o](l,(h,p)=>{d(h,p)&&f.push(h)}),f};const u="reduce"+t[0].toUpperCase()+t.slice(1);r.prototype[u]=function(l,d,f){if(arguments.length<3)throw new H(`Graph.${u}: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.`);let h=f;return this[o](l,(p,y)=>{h=d(h,p,y)}),h}}function af(r,e){const{name:t,type:n,direction:i}=e,o=t[0].toUpperCase()+t.slice(1,-1),s="find"+o;r.prototype[s]=function(l,d){if(n!=="mixed"&&this.type!=="mixed"&&n!==this.type)return;l=""+l;const f=this._nodes.get(l);if(typeof f>"u")throw new j(`Graph.${s}: could not find the "${l}" node in the graph.`);return Ui(!0,n==="mixed"?this.type:n,i,f,d)};const a="some"+o;r.prototype[a]=function(l,d){return!!this[s](l,d)};const u="every"+o;r.prototype[u]=function(l,d){return!this[s](l,(h,p)=>!d(h,p))}}function uf(r,e){const{name:t,type:n,direction:i}=e,o=t.slice(0,-1)+"Entries";r.prototype[o]=function(s){if(n!=="mixed"&&this.type!=="mixed"&&n!==this.type)return $r();s=""+s;const a=this._nodes.get(s);if(typeof a>"u")throw new j(`Graph.${o}: could not find the "${s}" node in the graph.`);return nf(n==="mixed"?this.type:n,i,a)}}function cf(r){tf.forEach(e=>{of(r,e),sf(r,e),af(r,e),uf(r,e)})}function yn(r,e,t,n,i){const o=n._nodes.values(),s=n.type;let a,u,l,d,f,h;for(;a=o.next(),a.done!==!0;){let p=!1;if(u=a.value,s!=="undirected"){d=u.out;for(l in d){f=d[l];do h=f.target,p=!0,i(u.key,h.key,u.attributes,h.attributes,f.key,f.attributes,f.undirected),f=f.next;while(f)}}if(s!=="directed"){d=u.undirected;for(l in d)if(!(e&&u.key>l)){f=d[l];do h=f.target,h.key!==l&&(h=f.source),p=!0,i(u.key,h.key,u.attributes,h.attributes,f.key,f.attributes,f.undirected),f=f.next;while(f)}}t&&!p&&i(u.key,null,u.attributes,null,null,null,null)}}function lf(r,e){const t={key:r};return ta(e.attributes)||(t.attributes=nt({},e.attributes)),t}function df(r,e,t){const n={key:e,source:t.source.key,target:t.target.key};return ta(t.attributes)||(n.attributes=nt({},t.attributes)),r==="mixed"&&t.undirected&&(n.undirected=!0),n}function ff(r){if(!gt(r))throw new H('Graph.import: invalid serialized node. A serialized node should be a plain object with at least a "key" property.');if(!("key"in r))throw new H("Graph.import: serialized node is missing its key.");if("attributes"in r&&(!gt(r.attributes)||r.attributes===null))throw new H("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.")}function hf(r){if(!gt(r))throw new H('Graph.import: invalid serialized edge. A serialized edge should be a plain object with at least a "source" & "target" property.');if(!("source"in r))throw new H("Graph.import: serialized edge is missing its source.");if(!("target"in r))throw new H("Graph.import: serialized edge is missing its target.");if("attributes"in r&&(!gt(r.attributes)||r.attributes===null))throw new H("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.");if("undirected"in r&&typeof r.undirected!="boolean")throw new H("Graph.import: invalid undirectedness information. Undirected should be boolean or omitted.")}const gf=pd(),pf=new Set(["directed","undirected","mixed"]),Ho=new Set(["domain","_events","_eventsCount","_maxListeners"]),vf=[{name:r=>`${r}Edge`,generateKey:!0},{name:r=>`${r}DirectedEdge`,generateKey:!0,type:"directed"},{name:r=>`${r}UndirectedEdge`,generateKey:!0,type:"undirected"},{name:r=>`${r}EdgeWithKey`},{name:r=>`${r}DirectedEdgeWithKey`,type:"directed"},{name:r=>`${r}UndirectedEdgeWithKey`,type:"undirected"}],yf={allowSelfLoops:!0,multi:!1,type:"mixed"};function mf(r,e,t){if(t&&!gt(t))throw new H(`Graph.addNode: invalid attributes. Expecting an object but got "${t}"`);if(e=""+e,t=t||{},r._nodes.has(e))throw new se(`Graph.addNode: the "${e}" node already exist in the graph.`);const n=new r.NodeDataClass(e,t);return r._nodes.set(e,n),r.emit("nodeAdded",{key:e,attributes:t}),n}function qo(r,e,t){const n=new r.NodeDataClass(e,t);return r._nodes.set(e,n),r.emit("nodeAdded",{key:e,attributes:t}),n}function ca(r,e,t,n,i,o,s,a){if(!n&&r.type==="undirected")throw new se(`Graph.${e}: you cannot add a directed edge to an undirected graph. Use the #.addEdge or #.addUndirectedEdge instead.`);if(n&&r.type==="directed")throw new se(`Graph.${e}: you cannot add an undirected edge to a directed graph. Use the #.addEdge or #.addDirectedEdge instead.`);if(a&&!gt(a))throw new H(`Graph.${e}: invalid attributes. Expecting an object but got "${a}"`);if(o=""+o,s=""+s,a=a||{},!r.allowSelfLoops&&o===s)throw new se(`Graph.${e}: source & target are the same ("${o}"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false.`);const u=r._nodes.get(o),l=r._nodes.get(s);if(!u)throw new j(`Graph.${e}: source node "${o}" not found.`);if(!l)throw new j(`Graph.${e}: target node "${s}" not found.`);const d={key:null,undirected:n,source:o,target:s,attributes:a};if(t)i=r._edgeKeyGenerator();else if(i=""+i,r._edges.has(i))throw new se(`Graph.${e}: the "${i}" edge already exists in the graph.`);if(!r.multi&&(n?typeof u.undirected[s]<"u":typeof u.out[s]<"u"))throw new se(`Graph.${e}: an edge linking "${o}" to "${s}" already exists. If you really want to add multiple edges linking those nodes, you should create a multi graph by using the 'multi' option.`);const f=new Ar(n,i,u,l,a);r._edges.set(i,f);const h=o===s;return n?(u.undirectedDegree++,l.undirectedDegree++,h&&(u.undirectedLoops++,r._undirectedSelfLoopCount++)):(u.outDegree++,l.inDegree++,h&&(u.directedLoops++,r._directedSelfLoopCount++)),r.multi?f.attachMulti():f.attach(),n?r._undirectedSize++:r._directedSize++,d.key=i,r.emit("edgeAdded",d),i}function bf(r,e,t,n,i,o,s,a,u){if(!n&&r.type==="undirected")throw new se(`Graph.${e}: you cannot merge/update a directed edge to an undirected graph. Use the #.mergeEdge/#.updateEdge or #.addUndirectedEdge instead.`);if(n&&r.type==="directed")throw new se(`Graph.${e}: you cannot merge/update an undirected edge to a directed graph. Use the #.mergeEdge/#.updateEdge or #.addDirectedEdge instead.`);if(a){if(u){if(typeof a!="function")throw new H(`Graph.${e}: invalid updater function. Expecting a function but got "${a}"`)}else if(!gt(a))throw new H(`Graph.${e}: invalid attributes. Expecting an object but got "${a}"`)}o=""+o,s=""+s;let l;if(u&&(l=a,a=void 0),!r.allowSelfLoops&&o===s)throw new se(`Graph.${e}: source & target are the same ("${o}"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false.`);let d=r._nodes.get(o),f=r._nodes.get(s),h,p;if(!t&&(h=r._edges.get(i),h)){if((h.source.key!==o||h.target.key!==s)&&(!n||h.source.key!==s||h.target.key!==o))throw new se(`Graph.${e}: inconsistency detected when attempting to merge the "${i}" edge with "${o}" source & "${s}" target vs. ("${h.source.key}", "${h.target.key}").`);p=h}if(!p&&!r.multi&&d&&(p=n?d.undirected[s]:d.out[s]),p){const A=[p.key,!1,!1,!1];if(u?!l:!a)return A;if(u){const w=p.attributes;p.attributes=l(w),r.emit("edgeAttributesUpdated",{type:"replace",key:p.key,attributes:p.attributes})}else nt(p.attributes,a),r.emit("edgeAttributesUpdated",{type:"merge",key:p.key,attributes:p.attributes,data:a});return A}a=a||{},u&&l&&(a=l(a));const y={key:null,undirected:n,source:o,target:s,attributes:a};if(t)i=r._edgeKeyGenerator();else if(i=""+i,r._edges.has(i))throw new se(`Graph.${e}: the "${i}" edge already exists in the graph.`);let S=!1,m=!1;d||(d=qo(r,o,{}),S=!0,o===s&&(f=d,m=!0)),f||(f=qo(r,s,{}),m=!0),h=new Ar(n,i,d,f,a),r._edges.set(i,h);const v=o===s;return n?(d.undirectedDegree++,f.undirectedDegree++,v&&(d.undirectedLoops++,r._undirectedSelfLoopCount++)):(d.outDegree++,f.inDegree++,v&&(d.directedLoops++,r._directedSelfLoopCount++)),r.multi?h.attachMulti():h.attach(),n?r._undirectedSize++:r._directedSize++,y.key=i,r.emit("edgeAdded",y),[i,!0,S,m]}function yr(r,e){r._edges.delete(e.key);const{source:t,target:n,attributes:i}=e,o=e.undirected,s=t===n;o?(t.undirectedDegree--,n.undirectedDegree--,s&&(t.undirectedLoops--,r._undirectedSelfLoopCount--)):(t.outDegree--,n.inDegree--,s&&(t.directedLoops--,r._directedSelfLoopCount--)),r.multi?e.detachMulti():e.detach(),o?r._undirectedSize--:r._directedSize--,r.emit("edgeDropped",{key:e.key,attributes:i,source:t.key,target:n.key,undirected:o})}class Fe extends hd.EventEmitter{constructor(e){if(super(),e=nt({},yf,e),typeof e.multi!="boolean")throw new H(`Graph.constructor: invalid 'multi' option. Expecting a boolean but got "${e.multi}".`);if(!pf.has(e.type))throw new H(`Graph.constructor: invalid 'type' option. Should be one of "mixed", "directed" or "undirected" but got "${e.type}".`);if(typeof e.allowSelfLoops!="boolean")throw new H(`Graph.constructor: invalid 'allowSelfLoops' option. Expecting a boolean but got "${e.allowSelfLoops}".`);const t=e.type==="mixed"?ra:e.type==="directed"?na:ia;Dt(this,"NodeDataClass",t);const n="geid_"+gf()+"_";let i=0;const o=()=>{let s;do s=n+i++;while(this._edges.has(s));return s};Dt(this,"_attributes",{}),Dt(this,"_nodes",new Map),Dt(this,"_edges",new Map),Dt(this,"_directedSize",0),Dt(this,"_undirectedSize",0),Dt(this,"_directedSelfLoopCount",0),Dt(this,"_undirectedSelfLoopCount",0),Dt(this,"_edgeKeyGenerator",o),Dt(this,"_options",e),Ho.forEach(s=>Dt(this,s,this[s])),Ot(this,"order",()=>this._nodes.size),Ot(this,"size",()=>this._edges.size),Ot(this,"directedSize",()=>this._directedSize),Ot(this,"undirectedSize",()=>this._undirectedSize),Ot(this,"selfLoopCount",()=>this._directedSelfLoopCount+this._undirectedSelfLoopCount),Ot(this,"directedSelfLoopCount",()=>this._directedSelfLoopCount),Ot(this,"undirectedSelfLoopCount",()=>this._undirectedSelfLoopCount),Ot(this,"multi",this._options.multi),Ot(this,"type",this._options.type),Ot(this,"allowSelfLoops",this._options.allowSelfLoops),Ot(this,"implementation",()=>"graphology")}_resetInstanceCounters(){this._directedSize=0,this._undirectedSize=0,this._directedSelfLoopCount=0,this._undirectedSelfLoopCount=0}hasNode(e){return this._nodes.has(""+e)}hasDirectedEdge(e,t){if(this.type==="undirected")return!1;if(arguments.length===1){const n=""+e,i=this._edges.get(n);return!!i&&!i.undirected}else if(arguments.length===2){e=""+e,t=""+t;const n=this._nodes.get(e);return n?n.out.hasOwnProperty(t):!1}throw new H(`Graph.hasDirectedEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}hasUndirectedEdge(e,t){if(this.type==="directed")return!1;if(arguments.length===1){const n=""+e,i=this._edges.get(n);return!!i&&i.undirected}else if(arguments.length===2){e=""+e,t=""+t;const n=this._nodes.get(e);return n?n.undirected.hasOwnProperty(t):!1}throw new H(`Graph.hasDirectedEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}hasEdge(e,t){if(arguments.length===1){const n=""+e;return this._edges.has(n)}else if(arguments.length===2){e=""+e,t=""+t;const n=this._nodes.get(e);return n?typeof n.out<"u"&&n.out.hasOwnProperty(t)||typeof n.undirected<"u"&&n.undirected.hasOwnProperty(t):!1}throw new H(`Graph.hasEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}directedEdge(e,t){if(this.type==="undirected")return;if(e=""+e,t=""+t,this.multi)throw new se("Graph.directedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.directedEdges instead.");const n=this._nodes.get(e);if(!n)throw new j(`Graph.directedEdge: could not find the "${e}" source node in the graph.`);if(!this._nodes.has(t))throw new j(`Graph.directedEdge: could not find the "${t}" target node in the graph.`);const i=n.out&&n.out[t]||void 0;if(i)return i.key}undirectedEdge(e,t){if(this.type==="directed")return;if(e=""+e,t=""+t,this.multi)throw new se("Graph.undirectedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.undirectedEdges instead.");const n=this._nodes.get(e);if(!n)throw new j(`Graph.undirectedEdge: could not find the "${e}" source node in the graph.`);if(!this._nodes.has(t))throw new j(`Graph.undirectedEdge: could not find the "${t}" target node in the graph.`);const i=n.undirected&&n.undirected[t]||void 0;if(i)return i.key}edge(e,t){if(this.multi)throw new se("Graph.edge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.edges instead.");e=""+e,t=""+t;const n=this._nodes.get(e);if(!n)throw new j(`Graph.edge: could not find the "${e}" source node in the graph.`);if(!this._nodes.has(t))throw new j(`Graph.edge: could not find the "${t}" target node in the graph.`);const i=n.out&&n.out[t]||n.undirected&&n.undirected[t]||void 0;if(i)return i.key}areDirectedNeighbors(e,t){e=""+e,t=""+t;const n=this._nodes.get(e);if(!n)throw new j(`Graph.areDirectedNeighbors: could not find the "${e}" node in the graph.`);return this.type==="undirected"?!1:t in n.in||t in n.out}areOutNeighbors(e,t){e=""+e,t=""+t;const n=this._nodes.get(e);if(!n)throw new j(`Graph.areOutNeighbors: could not find the "${e}" node in the graph.`);return this.type==="undirected"?!1:t in n.out}areInNeighbors(e,t){e=""+e,t=""+t;const n=this._nodes.get(e);if(!n)throw new j(`Graph.areInNeighbors: could not find the "${e}" node in the graph.`);return this.type==="undirected"?!1:t in n.in}areUndirectedNeighbors(e,t){e=""+e,t=""+t;const n=this._nodes.get(e);if(!n)throw new j(`Graph.areUndirectedNeighbors: could not find the "${e}" node in the graph.`);return this.type==="directed"?!1:t in n.undirected}areNeighbors(e,t){e=""+e,t=""+t;const n=this._nodes.get(e);if(!n)throw new j(`Graph.areNeighbors: could not find the "${e}" node in the graph.`);return this.type!=="undirected"&&(t in n.in||t in n.out)||this.type!=="directed"&&t in n.undirected}areInboundNeighbors(e,t){e=""+e,t=""+t;const n=this._nodes.get(e);if(!n)throw new j(`Graph.areInboundNeighbors: could not find the "${e}" node in the graph.`);return this.type!=="undirected"&&t in n.in||this.type!=="directed"&&t in n.undirected}areOutboundNeighbors(e,t){e=""+e,t=""+t;const n=this._nodes.get(e);if(!n)throw new j(`Graph.areOutboundNeighbors: could not find the "${e}" node in the graph.`);return this.type!=="undirected"&&t in n.out||this.type!=="directed"&&t in n.undirected}inDegree(e){e=""+e;const t=this._nodes.get(e);if(!t)throw new j(`Graph.inDegree: could not find the "${e}" node in the graph.`);return this.type==="undirected"?0:t.inDegree}outDegree(e){e=""+e;const t=this._nodes.get(e);if(!t)throw new j(`Graph.outDegree: could not find the "${e}" node in the graph.`);return this.type==="undirected"?0:t.outDegree}directedDegree(e){e=""+e;const t=this._nodes.get(e);if(!t)throw new j(`Graph.directedDegree: could not find the "${e}" node in the graph.`);return this.type==="undirected"?0:t.inDegree+t.outDegree}undirectedDegree(e){e=""+e;const t=this._nodes.get(e);if(!t)throw new j(`Graph.undirectedDegree: could not find the "${e}" node in the graph.`);return this.type==="directed"?0:t.undirectedDegree}inboundDegree(e){e=""+e;const t=this._nodes.get(e);if(!t)throw new j(`Graph.inboundDegree: could not find the "${e}" node in the graph.`);let n=0;return this.type!=="directed"&&(n+=t.undirectedDegree),this.type!=="undirected"&&(n+=t.inDegree),n}outboundDegree(e){e=""+e;const t=this._nodes.get(e);if(!t)throw new j(`Graph.outboundDegree: could not find the "${e}" node in the graph.`);let n=0;return this.type!=="directed"&&(n+=t.undirectedDegree),this.type!=="undirected"&&(n+=t.outDegree),n}degree(e){e=""+e;const t=this._nodes.get(e);if(!t)throw new j(`Graph.degree: could not find the "${e}" node in the graph.`);let n=0;return this.type!=="directed"&&(n+=t.undirectedDegree),this.type!=="undirected"&&(n+=t.inDegree+t.outDegree),n}inDegreeWithoutSelfLoops(e){e=""+e;const t=this._nodes.get(e);if(!t)throw new j(`Graph.inDegreeWithoutSelfLoops: could not find the "${e}" node in the graph.`);return this.type==="undirected"?0:t.inDegree-t.directedLoops}outDegreeWithoutSelfLoops(e){e=""+e;const t=this._nodes.get(e);if(!t)throw new j(`Graph.outDegreeWithoutSelfLoops: could not find the "${e}" node in the graph.`);return this.type==="undirected"?0:t.outDegree-t.directedLoops}directedDegreeWithoutSelfLoops(e){e=""+e;const t=this._nodes.get(e);if(!t)throw new j(`Graph.directedDegreeWithoutSelfLoops: could not find the "${e}" node in the graph.`);return this.type==="undirected"?0:t.inDegree+t.outDegree-t.directedLoops*2}undirectedDegreeWithoutSelfLoops(e){e=""+e;const t=this._nodes.get(e);if(!t)throw new j(`Graph.undirectedDegreeWithoutSelfLoops: could not find the "${e}" node in the graph.`);return this.type==="directed"?0:t.undirectedDegree-t.undirectedLoops*2}inboundDegreeWithoutSelfLoops(e){e=""+e;const t=this._nodes.get(e);if(!t)throw new j(`Graph.inboundDegreeWithoutSelfLoops: could not find the "${e}" node in the graph.`);let n=0,i=0;return this.type!=="directed"&&(n+=t.undirectedDegree,i+=t.undirectedLoops*2),this.type!=="undirected"&&(n+=t.inDegree,i+=t.directedLoops),n-i}outboundDegreeWithoutSelfLoops(e){e=""+e;const t=this._nodes.get(e);if(!t)throw new j(`Graph.outboundDegreeWithoutSelfLoops: could not find the "${e}" node in the graph.`);let n=0,i=0;return this.type!=="directed"&&(n+=t.undirectedDegree,i+=t.undirectedLoops*2),this.type!=="undirected"&&(n+=t.outDegree,i+=t.directedLoops),n-i}degreeWithoutSelfLoops(e){e=""+e;const t=this._nodes.get(e);if(!t)throw new j(`Graph.degreeWithoutSelfLoops: could not find the "${e}" node in the graph.`);let n=0,i=0;return this.type!=="directed"&&(n+=t.undirectedDegree,i+=t.undirectedLoops*2),this.type!=="undirected"&&(n+=t.inDegree+t.outDegree,i+=t.directedLoops*2),n-i}source(e){e=""+e;const t=this._edges.get(e);if(!t)throw new j(`Graph.source: could not find the "${e}" edge in the graph.`);return t.source.key}target(e){e=""+e;const t=this._edges.get(e);if(!t)throw new j(`Graph.target: could not find the "${e}" edge in the graph.`);return t.target.key}extremities(e){e=""+e;const t=this._edges.get(e);if(!t)throw new j(`Graph.extremities: could not find the "${e}" edge in the graph.`);return[t.source.key,t.target.key]}opposite(e,t){e=""+e,t=""+t;const n=this._edges.get(t);if(!n)throw new j(`Graph.opposite: could not find the "${t}" edge in the graph.`);const i=n.source.key,o=n.target.key;if(e===i)return o;if(e===o)return i;throw new j(`Graph.opposite: the "${e}" node is not attached to the "${t}" edge (${i}, ${o}).`)}hasExtremity(e,t){e=""+e,t=""+t;const n=this._edges.get(e);if(!n)throw new j(`Graph.hasExtremity: could not find the "${e}" edge in the graph.`);return n.source.key===t||n.target.key===t}isUndirected(e){e=""+e;const t=this._edges.get(e);if(!t)throw new j(`Graph.isUndirected: could not find the "${e}" edge in the graph.`);return t.undirected}isDirected(e){e=""+e;const t=this._edges.get(e);if(!t)throw new j(`Graph.isDirected: could not find the "${e}" edge in the graph.`);return!t.undirected}isSelfLoop(e){e=""+e;const t=this._edges.get(e);if(!t)throw new j(`Graph.isSelfLoop: could not find the "${e}" edge in the graph.`);return t.source===t.target}addNode(e,t){return mf(this,e,t).key}mergeNode(e,t){if(t&&!gt(t))throw new H(`Graph.mergeNode: invalid attributes. Expecting an object but got "${t}"`);e=""+e,t=t||{};let n=this._nodes.get(e);return n?(t&&(nt(n.attributes,t),this.emit("nodeAttributesUpdated",{type:"merge",key:e,attributes:n.attributes,data:t})),[e,!1]):(n=new this.NodeDataClass(e,t),this._nodes.set(e,n),this.emit("nodeAdded",{key:e,attributes:t}),[e,!0])}updateNode(e,t){if(t&&typeof t!="function")throw new H(`Graph.updateNode: invalid updater function. Expecting a function but got "${t}"`);e=""+e;let n=this._nodes.get(e);if(n){if(t){const o=n.attributes;n.attributes=t(o),this.emit("nodeAttributesUpdated",{type:"replace",key:e,attributes:n.attributes})}return[e,!1]}const i=t?t({}):{};return n=new this.NodeDataClass(e,i),this._nodes.set(e,n),this.emit("nodeAdded",{key:e,attributes:i}),[e,!0]}dropNode(e){e=""+e;const t=this._nodes.get(e);if(!t)throw new j(`Graph.dropNode: could not find the "${e}" node in the graph.`);let n;if(this.type!=="undirected"){for(const i in t.out){n=t.out[i];do yr(this,n),n=n.next;while(n)}for(const i in t.in){n=t.in[i];do yr(this,n),n=n.next;while(n)}}if(this.type!=="directed")for(const i in t.undirected){n=t.undirected[i];do yr(this,n),n=n.next;while(n)}this._nodes.delete(e),this.emit("nodeDropped",{key:e,attributes:t.attributes})}dropEdge(e){let t;if(arguments.length>1){const n=""+arguments[0],i=""+arguments[1];if(t=It(this,n,i,this.type),!t)throw new j(`Graph.dropEdge: could not find the "${n}" -> "${i}" edge in the graph.`)}else if(e=""+e,t=this._edges.get(e),!t)throw new j(`Graph.dropEdge: could not find the "${e}" edge in the graph.`);return yr(this,t),this}dropDirectedEdge(e,t){if(arguments.length<2)throw new se("Graph.dropDirectedEdge: it does not make sense to try and drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.");if(this.multi)throw new se("Graph.dropDirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.");e=""+e,t=""+t;const n=It(this,e,t,"directed");if(!n)throw new j(`Graph.dropDirectedEdge: could not find a "${e}" -> "${t}" edge in the graph.`);return yr(this,n),this}dropUndirectedEdge(e,t){if(arguments.length<2)throw new se("Graph.dropUndirectedEdge: it does not make sense to drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.");if(this.multi)throw new se("Graph.dropUndirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.");const n=It(this,e,t,"undirected");if(!n)throw new j(`Graph.dropUndirectedEdge: could not find a "${e}" -> "${t}" edge in the graph.`);return yr(this,n),this}clear(){this._edges.clear(),this._nodes.clear(),this._resetInstanceCounters(),this.emit("cleared")}clearEdges(){const e=this._nodes.values();let t;for(;t=e.next(),t.done!==!0;)t.value.clear();this._edges.clear(),this._resetInstanceCounters(),this.emit("edgesCleared")}getAttribute(e){return this._attributes[e]}getAttributes(){return this._attributes}hasAttribute(e){return this._attributes.hasOwnProperty(e)}setAttribute(e,t){return this._attributes[e]=t,this.emit("attributesUpdated",{type:"set",attributes:this._attributes,name:e}),this}updateAttribute(e,t){if(typeof t!="function")throw new H("Graph.updateAttribute: updater should be a function.");const n=this._attributes[e];return this._attributes[e]=t(n),this.emit("attributesUpdated",{type:"set",attributes:this._attributes,name:e}),this}removeAttribute(e){return delete this._attributes[e],this.emit("attributesUpdated",{type:"remove",attributes:this._attributes,name:e}),this}replaceAttributes(e){if(!gt(e))throw new H("Graph.replaceAttributes: provided attributes are not a plain object.");return this._attributes=e,this.emit("attributesUpdated",{type:"replace",attributes:this._attributes}),this}mergeAttributes(e){if(!gt(e))throw new H("Graph.mergeAttributes: provided attributes are not a plain object.");return nt(this._attributes,e),this.emit("attributesUpdated",{type:"merge",attributes:this._attributes,data:e}),this}updateAttributes(e){if(typeof e!="function")throw new H("Graph.updateAttributes: provided updater is not a function.");return this._attributes=e(this._attributes),this.emit("attributesUpdated",{type:"update",attributes:this._attributes}),this}updateEachNodeAttributes(e,t){if(typeof e!="function")throw new H("Graph.updateEachNodeAttributes: expecting an updater function.");if(t&&!Ko(t))throw new H("Graph.updateEachNodeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");const n=this._nodes.values();let i,o;for(;i=n.next(),i.done!==!0;)o=i.value,o.attributes=e(o.key,o.attributes);this.emit("eachNodeAttributesUpdated",{hints:t||null})}updateEachEdgeAttributes(e,t){if(typeof e!="function")throw new H("Graph.updateEachEdgeAttributes: expecting an updater function.");if(t&&!Ko(t))throw new H("Graph.updateEachEdgeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");const n=this._edges.values();let i,o,s,a;for(;i=n.next(),i.done!==!0;)o=i.value,s=o.source,a=o.target,o.attributes=e(o.key,o.attributes,s.key,a.key,s.attributes,a.attributes,o.undirected);this.emit("eachEdgeAttributesUpdated",{hints:t||null})}forEachAdjacencyEntry(e){if(typeof e!="function")throw new H("Graph.forEachAdjacencyEntry: expecting a callback.");yn(!1,!1,!1,this,e)}forEachAdjacencyEntryWithOrphans(e){if(typeof e!="function")throw new H("Graph.forEachAdjacencyEntryWithOrphans: expecting a callback.");yn(!1,!1,!0,this,e)}forEachAssymetricAdjacencyEntry(e){if(typeof e!="function")throw new H("Graph.forEachAssymetricAdjacencyEntry: expecting a callback.");yn(!1,!0,!1,this,e)}forEachAssymetricAdjacencyEntryWithOrphans(e){if(typeof e!="function")throw new H("Graph.forEachAssymetricAdjacencyEntryWithOrphans: expecting a callback.");yn(!1,!0,!0,this,e)}nodes(){return Array.from(this._nodes.keys())}forEachNode(e){if(typeof e!="function")throw new H("Graph.forEachNode: expecting a callback.");const t=this._nodes.values();let n,i;for(;n=t.next(),n.done!==!0;)i=n.value,e(i.key,i.attributes)}findNode(e){if(typeof e!="function")throw new H("Graph.findNode: expecting a callback.");const t=this._nodes.values();let n,i;for(;n=t.next(),n.done!==!0;)if(i=n.value,e(i.key,i.attributes))return i.key}mapNodes(e){if(typeof e!="function")throw new H("Graph.mapNode: expecting a callback.");const t=this._nodes.values();let n,i;const o=new Array(this.order);let s=0;for(;n=t.next(),n.done!==!0;)i=n.value,o[s++]=e(i.key,i.attributes);return o}someNode(e){if(typeof e!="function")throw new H("Graph.someNode: expecting a callback.");const t=this._nodes.values();let n,i;for(;n=t.next(),n.done!==!0;)if(i=n.value,e(i.key,i.attributes))return!0;return!1}everyNode(e){if(typeof e!="function")throw new H("Graph.everyNode: expecting a callback.");const t=this._nodes.values();let n,i;for(;n=t.next(),n.done!==!0;)if(i=n.value,!e(i.key,i.attributes))return!1;return!0}filterNodes(e){if(typeof e!="function")throw new H("Graph.filterNodes: expecting a callback.");const t=this._nodes.values();let n,i;const o=[];for(;n=t.next(),n.done!==!0;)i=n.value,e(i.key,i.attributes)&&o.push(i.key);return o}reduceNodes(e,t){if(typeof e!="function")throw new H("Graph.reduceNodes: expecting a callback.");if(arguments.length<2)throw new H("Graph.reduceNodes: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.");let n=t;const i=this._nodes.values();let o,s;for(;o=i.next(),o.done!==!0;)s=o.value,n=e(n,s.key,s.attributes);return n}nodeEntries(){const e=this._nodes.values();return{[Symbol.iterator](){return this},next(){const t=e.next();if(t.done)return t;const n=t.value;return{value:{node:n.key,attributes:n.attributes},done:!1}}}}export(){const e=new Array(this._nodes.size);let t=0;this._nodes.forEach((i,o)=>{e[t++]=lf(o,i)});const n=new Array(this._edges.size);return t=0,this._edges.forEach((i,o)=>{n[t++]=df(this.type,o,i)}),{options:{type:this.type,multi:this.multi,allowSelfLoops:this.allowSelfLoops},attributes:this.getAttributes(),nodes:e,edges:n}}import(e,t=!1){if(e instanceof Fe)return e.forEachNode((u,l)=>{t?this.mergeNode(u,l):this.addNode(u,l)}),e.forEachEdge((u,l,d,f,h,p,y)=>{t?y?this.mergeUndirectedEdgeWithKey(u,d,f,l):this.mergeDirectedEdgeWithKey(u,d,f,l):y?this.addUndirectedEdgeWithKey(u,d,f,l):this.addDirectedEdgeWithKey(u,d,f,l)}),this;if(!gt(e))throw new H("Graph.import: invalid argument. Expecting a serialized graph or, alternatively, a Graph instance.");if(e.attributes){if(!gt(e.attributes))throw new H("Graph.import: invalid attributes. Expecting a plain object.");t?this.mergeAttributes(e.attributes):this.replaceAttributes(e.attributes)}let n,i,o,s,a;if(e.nodes){if(o=e.nodes,!Array.isArray(o))throw new H("Graph.import: invalid nodes. Expecting an array.");for(n=0,i=o.length;n<i;n++){s=o[n],ff(s);const{key:u,attributes:l}=s;t?this.mergeNode(u,l):this.addNode(u,l)}}if(e.edges){let u=!1;if(this.type==="undirected"&&(u=!0),o=e.edges,!Array.isArray(o))throw new H("Graph.import: invalid edges. Expecting an array.");for(n=0,i=o.length;n<i;n++){a=o[n],hf(a);const{source:l,target:d,attributes:f,undirected:h=u}=a;let p;"key"in a?(p=t?h?this.mergeUndirectedEdgeWithKey:this.mergeDirectedEdgeWithKey:h?this.addUndirectedEdgeWithKey:this.addDirectedEdgeWithKey,p.call(this,a.key,l,d,f)):(p=t?h?this.mergeUndirectedEdge:this.mergeDirectedEdge:h?this.addUndirectedEdge:this.addDirectedEdge,p.call(this,l,d,f))}}return this}nullCopy(e){const t=new Fe(nt({},this._options,e));return t.replaceAttributes(nt({},this.getAttributes())),t}emptyCopy(e){const t=this.nullCopy(e);return this._nodes.forEach((n,i)=>{const o=nt({},n.attributes);n=new t.NodeDataClass(i,o),t._nodes.set(i,n)}),t}copy(e){if(e=e||{},typeof e.type=="string"&&e.type!==this.type&&e.type!=="mixed")throw new se(`Graph.copy: cannot create an incompatible copy from "${this.type}" type to "${e.type}" because this would mean losing information about the current graph.`);if(typeof e.multi=="boolean"&&e.multi!==this.multi&&e.multi!==!0)throw new se("Graph.copy: cannot create an incompatible copy by downgrading a multi graph to a simple one because this would mean losing information about the current graph.");if(typeof e.allowSelfLoops=="boolean"&&e.allowSelfLoops!==this.allowSelfLoops&&e.allowSelfLoops!==!0)throw new se("Graph.copy: cannot create an incompatible copy from a graph allowing self loops to one that does not because this would mean losing information about the current graph.");const t=this.emptyCopy(e),n=this._edges.values();let i,o;for(;i=n.next(),i.done!==!0;)o=i.value,ca(t,"copy",!1,o.undirected,o.key,o.source.key,o.target.key,nt({},o.attributes));return t}toJSON(){return this.export()}toString(){return"[object Graph]"}inspect(){const e={};this._nodes.forEach((o,s)=>{e[s]=o.attributes});const t={},n={};this._edges.forEach((o,s)=>{const a=o.undirected?"--":"->";let u="",l=o.source.key,d=o.target.key,f;o.undirected&&l>d&&(f=l,l=d,d=f);const h=`(${l})${a}(${d})`;s.startsWith("geid_")?this.multi&&(typeof n[h]>"u"?n[h]=0:n[h]++,u+=`${n[h]}. `):u+=`[${s}]: `,u+=h,t[u]=o.attributes});const i={};for(const o in this)this.hasOwnProperty(o)&&!Ho.has(o)&&typeof this[o]!="function"&&typeof o!="symbol"&&(i[o]=this[o]);return i.attributes=this._attributes,i.nodes=e,i.edges=t,Dt(i,"constructor",this.constructor),i}}typeof Symbol<"u"&&(Fe.prototype[Symbol.for("nodejs.util.inspect.custom")]=Fe.prototype.inspect);vf.forEach(r=>{["add","merge","update"].forEach(e=>{const t=r.name(e),n=e==="add"?ca:bf;r.generateKey?Fe.prototype[t]=function(i,o,s){return n(this,t,!0,(r.type||this.type)==="undirected",null,i,o,s,e==="update")}:Fe.prototype[t]=function(i,o,s,a){return n(this,t,!1,(r.type||this.type)==="undirected",i,o,s,a,e==="update")}})});Ad(Fe);Pd(Fe);ef(Fe);cf(Fe);class la extends Fe{constructor(e){const t=nt({type:"directed"},e);if("multi"in t&&t.multi!==!1)throw new H("DirectedGraph.from: inconsistent indication that the graph should be multi in given options!");if(t.type!=="directed")throw new H('DirectedGraph.from: inconsistent "'+t.type+'" type in given options!');super(t)}}class da extends Fe{constructor(e){const t=nt({type:"undirected"},e);if("multi"in t&&t.multi!==!1)throw new H("UndirectedGraph.from: inconsistent indication that the graph should be multi in given options!");if(t.type!=="undirected")throw new H('UndirectedGraph.from: inconsistent "'+t.type+'" type in given options!');super(t)}}class fa extends Fe{constructor(e){const t=nt({multi:!0},e);if("multi"in t&&t.multi!==!0)throw new H("MultiGraph.from: inconsistent indication that the graph should be simple in given options!");super(t)}}class ha extends Fe{constructor(e){const t=nt({type:"directed",multi:!0},e);if("multi"in t&&t.multi!==!0)throw new H("MultiDirectedGraph.from: inconsistent indication that the graph should be simple in given options!");if(t.type!=="directed")throw new H('MultiDirectedGraph.from: inconsistent "'+t.type+'" type in given options!');super(t)}}class ga extends Fe{constructor(e){const t=nt({type:"undirected",multi:!0},e);if("multi"in t&&t.multi!==!0)throw new H("MultiUndirectedGraph.from: inconsistent indication that the graph should be simple in given options!");if(t.type!=="undirected")throw new H('MultiUndirectedGraph.from: inconsistent "'+t.type+'" type in given options!');super(t)}}function Cr(r){r.from=function(e,t){const n=nt({},e.options,t),i=new r(n);return i.import(e),i}}Cr(Fe);Cr(la);Cr(da);Cr(fa);Cr(ha);Cr(ga);Fe.Graph=Fe;Fe.DirectedGraph=la;Fe.UndirectedGraph=da;Fe.MultiGraph=fa;Fe.MultiDirectedGraph=ha;Fe.MultiUndirectedGraph=ga;Fe.InvalidArgumentsGraphError=H;Fe.NotFoundGraphError=j;Fe.UsageGraphError=se;var ci,Vo;function Pi(){if(Vo)return ci;Vo=1;function r(t){return!t||typeof t!="object"||typeof t=="function"||Array.isArray(t)||t instanceof Set||t instanceof Map||t instanceof RegExp||t instanceof Date}function e(t,n){t=t||{};var i={};for(var o in n){var s=t[o],a=n[o];if(!r(a)){i[o]=e(s,a);continue}s===void 0?i[o]=a:i[o]=s}return i}return ci=e,ci}var li,Yo;function In(){return Yo||(Yo=1,li=function(e){return e!==null&&typeof e=="object"&&typeof e.addUndirectedEdgeWithKey=="function"&&typeof e.dropNode=="function"&&typeof e.multi=="boolean"}),li}var di,Xo;function pa(){if(Xo)return di;Xo=1;var r=In();return di=function(t){if(!r(t))throw new Error("graphology-utils/infer-type: expecting a valid graphology instance.");var n=t.type;return n!=="mixed"?n:t.directedSize===0&&t.undirectedSize===0||t.directedSize>0&&t.undirectedSize>0?"mixed":t.directedSize>0?"directed":"undirected"},di}var fi,Jo;function va(){if(Jo)return fi;Jo=1;function r(e){if(typeof e!="function")throw new Error("obliterator/iterator: expecting a function!");this.next=e}return typeof Symbol<"u"&&(r.prototype[Symbol.iterator]=function(){return this}),r.of=function(){var e=arguments,t=e.length,n=0;return new r(function(){return n>=t?{done:!0}:{done:!1,value:e[n++]}})},r.empty=function(){var e=new r(function(){return{done:!0}});return e},r.fromSequence=function(e){var t=0,n=e.length;return new r(function(){return t>=n?{done:!0}:{done:!1,value:e[t++]}})},r.is=function(e){return e instanceof r?!0:typeof e=="object"&&e!==null&&typeof e.next=="function"},fi=r,fi}var hi={},Zo;function Mi(){return Zo||(Zo=1,(function(r){var e=Math.pow(2,8)-1,t=Math.pow(2,16)-1,n=Math.pow(2,32)-1,i=Math.pow(2,7)-1,o=Math.pow(2,15)-1,s=Math.pow(2,31)-1;r.getPointerArray=function(u){var l=u-1;if(l<=e)return Uint8Array;if(l<=t)return Uint16Array;if(l<=n)return Uint32Array;throw new Error("mnemonist: Pointer Array of size > 4294967295 is not supported.")},r.getSignedPointerArray=function(u){var l=u-1;return l<=i?Int8Array:l<=o?Int16Array:l<=s?Int32Array:Float64Array},r.getNumberType=function(u){return u===(u|0)?Math.sign(u)===-1?u<=127&&u>=-128?Int8Array:u<=32767&&u>=-32768?Int16Array:Int32Array:u<=255?Uint8Array:u<=65535?Uint16Array:Uint32Array:Float64Array};var a={Uint8Array:1,Int8Array:2,Uint16Array:3,Int16Array:4,Uint32Array:5,Int32Array:6,Float32Array:7,Float64Array:8};r.getMinimalRepresentation=function(u,l){var d=null,f=0,h,p,y,S,m;for(S=0,m=u.length;S<m;S++)y=l?l(u[S]):u[S],p=r.getNumberType(y),h=a[p.name],h>f&&(f=h,d=p);return d},r.isTypedArray=function(u){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView(u)},r.concat=function(){var u=0,l,d,f;for(l=0,f=arguments.length;l<f;l++)u+=arguments[l].length;var h=new arguments[0].constructor(u);for(l=0,d=0;l<f;l++)h.set(arguments[l],d),d+=arguments[l].length;return h},r.indices=function(u){for(var l=r.getPointerArray(u),d=new l(u),f=0;f<u;f++)d[f]=f;return d}})(hi)),hi}var gi,Qo;function zi(){if(Qo)return gi;Qo=1;var r=va(),e=Mi().getPointerArray;function t(n,i){arguments.length<2&&(i=n,n=Array);var o=e(i);this.size=0,this.length=i,this.dense=new o(i),this.sparse=new o(i),this.vals=new n(i)}return t.prototype.clear=function(){this.size=0},t.prototype.has=function(n){var i=this.sparse[n];return i<this.size&&this.dense[i]===n},t.prototype.get=function(n){var i=this.sparse[n];if(i<this.size&&this.dense[i]===n)return this.vals[i]},t.prototype.set=function(n,i){var o=this.sparse[n];return o<this.size&&this.dense[o]===n?(this.vals[o]=i,this):(this.dense[this.size]=n,this.sparse[n]=this.size,this.vals[this.size]=i,this.size++,this)},t.prototype.delete=function(n){var i=this.sparse[n];return i>=this.size||this.dense[i]!==n?!1:(i=this.dense[this.size-1],this.dense[this.sparse[n]]=i,this.sparse[i]=this.sparse[n],this.size--,!0)},t.prototype.forEach=function(n,i){i=arguments.length>1?i:this;for(var o=0;o<this.size;o++)n.call(i,this.vals[o],this.dense[o])},t.prototype.keys=function(){var n=this.size,i=this.dense,o=0;return new r(function(){if(o<n){var s=i[o];return o++,{value:s}}return{done:!0}})},t.prototype.values=function(){var n=this.size,i=this.vals,o=0;return new r(function(){if(o<n){var s=i[o];return o++,{value:s}}return{done:!0}})},t.prototype.entries=function(){var n=this.size,i=this.dense,o=this.vals,s=0;return new r(function(){if(s<n){var a=[i[s],o[s]];return s++,{value:a}}return{done:!0}})},typeof Symbol<"u"&&(t.prototype[Symbol.iterator]=t.prototype.entries),t.prototype.inspect=function(){for(var n=new Map,i=0;i<this.size;i++)n.set(this.dense[i],this.vals[i]);return Object.defineProperty(n,"constructor",{value:t,enumerable:!1}),n.length=this.length,this.vals.constructor!==Array&&(n.type=this.vals.constructor.name),n},typeof Symbol<"u"&&(t.prototype[Symbol.for("nodejs.util.inspect.custom")]=t.prototype.inspect),gi=t,gi}var pi,es;function ya(){if(es)return pi;es=1;var r=va(),e=Mi().getPointerArray;function t(n){var i=e(n);this.start=0,this.size=0,this.capacity=n,this.dense=new i(n),this.sparse=new i(n)}return t.prototype.clear=function(){this.start=0,this.size=0},t.prototype.has=function(n){if(this.size===0)return!1;var i=this.sparse[n],o=i<this.capacity&&i>=this.start&&i<this.start+this.size||i<(this.start+this.size)%this.capacity;return o&&this.dense[i]===n},t.prototype.enqueue=function(n){var i=this.sparse[n];if(this.size!==0){var o=i<this.capacity&&i>=this.start&&i<this.start+this.size||i<(this.start+this.size)%this.capacity;if(o&&this.dense[i]===n)return this}return i=(this.start+this.size)%this.capacity,this.dense[i]=n,this.sparse[n]=i,this.size++,this},t.prototype.dequeue=function(){if(this.size!==0){var n=this.start;this.size--,this.start++,this.start===this.capacity&&(this.start=0);var i=this.dense[n];return this.sparse[i]=this.capacity,i}},t.prototype.forEach=function(n,i){i=arguments.length>1?i:this;for(var o=this.capacity,s=this.size,a=this.start,u=0;u<s;)n.call(i,this.dense[a],u,this),a++,u++,a===o&&(a=0)},t.prototype.values=function(){var n=this.dense,i=this.capacity,o=this.size,s=this.start,a=0;return new r(function(){if(a>=o)return{done:!0};var u=n[s];return s++,a++,s===i&&(s=0),{value:u,done:!1}})},typeof Symbol<"u"&&(t.prototype[Symbol.iterator]=t.prototype.values),t.prototype.inspect=function(){var n=[];return this.forEach(function(i){n.push(i)}),Object.defineProperty(n,"constructor",{value:t,enumerable:!1}),n.capacity=this.capacity,n},typeof Symbol<"u"&&(t.prototype[Symbol.for("nodejs.util.inspect.custom")]=t.prototype.inspect),pi=t,pi}var vi,ts;function ma(){if(ts)return vi;ts=1;function r(t){return function(n){return typeof n!="number"&&(n=n.length),Math.floor(t()*n)}}var e=r(Math.random);return e.createRandomIndex=r,vi=e,vi}var mn={},yi,rs;function wf(){if(rs)return yi;rs=1;function r(t){return function(n,i){return n+Math.floor(t()*(i-n+1))}}var e=r(Math.random);return e.createRandom=r,yi=e,yi}var ns;function _f(){if(ns)return mn;ns=1;var r=zi(),e=wf().createRandom;function t(i,o,s){var a=i.get(o);typeof a>"u"&&(a=0),a+=s,i.set(o,a)}function n(i,o){o=o||{};var s=o.rng||Math.random,a="randomness"in o?o.randomness:.01;this.index=i,this.random=e(s),this.randomness=a,this.rng=s;var u=i.counts.constructor,l=i.weights.constructor,d=i.C;this.resolution=i.resolution,this.B=i.C,this.C=0,this.communitiesOffsets=new u(d),this.nodesSortedByCommunities=new u(d),this.communitiesBounds=new u(d+1),this.communityWeights=new l(d),this.degrees=new l(d),this.nonSingleton=new Uint8Array(d),this.externalEdgeWeightPerCommunity=new l(d),this.belongings=new u(d),this.neighboringCommunities=new r(l,d),this.cumulativeIncrement=new Float64Array(d),this.macroCommunities=null}return n.prototype.groupByCommunities=function(){var i=this.index,o,s,a,u,l;for(o=0,l=0,s=0;s<i.C;s++)a=i.counts[s],a!==0&&(this.communitiesBounds[l++]=o,o+=a,this.communitiesOffsets[s]=o);for(this.communitiesBounds[l]=o,l=0,s=0;s<i.C;s++)u=i.belongings[s],l=--this.communitiesOffsets[u],this.nodesSortedByCommunities[l]=s;this.B=i.C-i.U,this.C=i.C},n.prototype.communities=function(){var i=new Array(this.B),o,s,a,u,l;for(o=0;o<this.B;o++){for(u=this.communitiesBounds[o],l=this.communitiesBounds[o+1],a=[],s=u;s<l;s++)a.push(s);i[o]=a}return i},n.prototype.mergeNodesSubset=function(i,o){var s=this.index,a=s.belongings[this.nodesSortedByCommunities[i]],u=this.neighboringCommunities,l=0,d,f,h,p,y,S;for(f=i;f<o;f++)for(d=this.nodesSortedByCommunities[f],this.belongings[d]=d,this.nonSingleton[d]=0,this.degrees[d]=0,l+=s.loops[d]/2,this.communityWeights[d]=s.loops[d],this.externalEdgeWeightPerCommunity[d]=0,p=s.starts[d],y=s.starts[d+1];p<y;p++)S=s.neighborhood[p],h=s.weights[p],this.degrees[d]+=h,s.belongings[S]===a&&(l+=h,this.externalEdgeWeightPerCommunity[d]+=h,this.communityWeights[d]+=h);var m=this.externalEdgeWeightPerCommunity.slice(),v,A,w,g=o-i,$,E,k,C,D,L,q,N,b,Ce,Ge,R,x;for(A=this.random(i,o-1),v=i;v<o;v++,A++)if(f=i+A%g,d=this.nodesSortedByCommunities[f],this.nonSingleton[d]!==1&&!(this.externalEdgeWeightPerCommunity[d]<this.communityWeights[d]*(l/2-this.communityWeights[d])*this.resolution)){for(this.communityWeights[d]=0,this.externalEdgeWeightPerCommunity[d]=0,u.clear(),u.set(d,0),$=0,p=s.starts[d],y=s.starts[d+1];p<y;p++)S=s.neighborhood[p],s.belongings[S]===a&&(h=s.weights[p],$+=h,t(u,this.belongings[S],h));for(E=d,C=0,D=0,w=0;w<u.size;w++)L=u.dense[w],q=u.vals[w],N=this.communityWeights[L],this.externalEdgeWeightPerCommunity[L]>=N*(l/2-N)*this.resolution&&(k=q-($+s.loops[d])*N*this.resolution/l,k>C&&(E=L,C=k),k>=0&&(D+=Math.exp(k/this.randomness))),this.cumulativeIncrement[w]=D;if(D<Number.MAX_VALUE&&D<1/0){for(b=D*this.rng(),Ce=-1,Ge=u.size+1;Ce<Ge-1;)R=Ce+Ge>>>1,this.cumulativeIncrement[R]>=b?Ge=R:Ce=R;x=u.dense[Ge]}else x=E;for(this.communityWeights[x]+=$+s.loops[d],p=s.starts[d],y=s.starts[d+1];p<y;p++)S=s.neighborhood[p],s.belongings[S]===a&&(L=this.belongings[S],L===x?this.externalEdgeWeightPerCommunity[x]-=m[S]:this.externalEdgeWeightPerCommunity[x]+=m[S]);x!==d&&(this.belongings[d]=x,this.nonSingleton[x]=1,this.C--)}var K=this.neighboringCommunities;for(K.clear(),f=i;f<o;f++)d=this.nodesSortedByCommunities[f],K.set(this.belongings[d],1);return K.dense.slice(0,K.size)},n.prototype.refinePartition=function(){this.groupByCommunities(),this.macroCommunities=new Array(this.B);var i,o,s,a,u=this.communitiesBounds;for(i=0;i<this.B;i++)o=u[i],s=u[i+1],a=this.mergeNodesSubset(o,s),this.macroCommunities[i]=a},n.prototype.split=function(){var i=this.index,o=this.neighboringCommunities;o.clear();var s,a,u;for(s=0;s<i.C;s++)a=this.belongings[s],s===a&&(u=i.isolate(s,this.degrees[s]),o.set(a,u));for(s=0;s<i.C;s++)a=this.belongings[s],s!==a&&(u=o.get(a),i.move(s,this.degrees[s],u));var l,d;for(s=0;s<this.macroCommunities.length;s++)for(d=this.macroCommunities[s],l=0;l<d.length;l++)d[l]=o.get(d[l])},n.prototype.zoomOut=function(){var i=this.index;this.refinePartition(),this.split();var o=i.zoomOut(),s,a,u,l,d;for(l=0;l<this.macroCommunities.length;l++)for(s=this.macroCommunities[l],a=o[s[0]],d=1;d<s.length;d++)u=o[s[d]],i.expensiveMove(u,a)},n.prototype.onlySingletons=function(){var i=this.index,o;for(o=0;o<i.C;o++)if(i.counts[o]>1)return!1;return!0},mn.addWeightToCommunity=t,mn.UndirectedLeidenAddenda=n,mn}var bn={},zr={},is;function ba(){if(is)return zr;is=1;function r(n){return typeof n!="number"||isNaN(n)?1:n}function e(n,i){var o={},s=function(l){return typeof l>"u"?i:l};typeof i=="function"&&(s=i);var a=function(l){return s(l[n])},u=function(){return s(void 0)};return typeof n=="string"?(o.fromAttributes=a,o.fromGraph=function(l,d){return a(l.getNodeAttributes(d))},o.fromEntry=function(l,d){return a(d)}):typeof n=="function"?(o.fromAttributes=function(){throw new Error("graphology-utils/getters/createNodeValueGetter: irrelevant usage.")},o.fromGraph=function(l,d){return s(n(d,l.getNodeAttributes(d)))},o.fromEntry=function(l,d){return s(n(l,d))}):(o.fromAttributes=u,o.fromGraph=u,o.fromEntry=u),o}function t(n,i){var o={},s=function(l){return typeof l>"u"?i:l};typeof i=="function"&&(s=i);var a=function(l){return s(l[n])},u=function(){return s(void 0)};return typeof n=="string"?(o.fromAttributes=a,o.fromGraph=function(l,d){return a(l.getEdgeAttributes(d))},o.fromEntry=function(l,d){return a(d)},o.fromPartialEntry=o.fromEntry,o.fromMinimalEntry=o.fromEntry):typeof n=="function"?(o.fromAttributes=function(){throw new Error("graphology-utils/getters/createEdgeValueGetter: irrelevant usage.")},o.fromGraph=function(l,d){var f=l.extremities(d);return s(n(d,l.getEdgeAttributes(d),f[0],f[1],l.getNodeAttributes(f[0]),l.getNodeAttributes(f[1]),l.isUndirected(d)))},o.fromEntry=function(l,d,f,h,p,y,S){return s(n(l,d,f,h,p,y,S))},o.fromPartialEntry=function(l,d,f,h){return s(n(l,d,f,h))},o.fromMinimalEntry=function(l,d){return s(n(l,d))}):(o.fromAttributes=u,o.fromGraph=u,o.fromEntry=u,o.fromMinimalEntry=u),o}return zr.createNodeValueGetter=e,zr.createEdgeValueGetter=t,zr.createEdgeWeightGetter=function(n){return t(n,r)},zr}var os;function wa(){if(os)return bn;os=1;var r=Mi(),e=Pi(),t=ba().createEdgeWeightGetter,n=Symbol.for("nodejs.util.inspect.custom"),i={getEdgeWeight:"weight",keepDendrogram:!1,resolution:1};function o(a,u){u=e(u,i);var l=u.resolution,d=t(u.getEdgeWeight).fromEntry,f=(a.size-a.selfLoopCount)*2,h=r.getPointerArray(f),p=r.getPointerArray(a.order+1),y=u.getEdgeWeight?Float64Array:r.getPointerArray(a.size*2);this.C=a.order,this.M=0,this.E=f,this.U=0,this.resolution=l,this.level=0,this.graph=a,this.nodes=new Array(a.order),this.keepDendrogram=u.keepDendrogram,this.neighborhood=new p(f),this.weights=new y(f),this.loops=new y(a.order),this.starts=new h(a.order+1),this.belongings=new p(a.order),this.dendrogram=[],this.mapping=null,this.counts=new p(a.order),this.unused=new p(a.order),this.totalWeights=new y(a.order);var S={},m,v=0,A=0,w=this;a.forEachNode(function(g){w.nodes[v]=g,S[g]=v,A+=a.undirectedDegreeWithoutSelfLoops(g),w.starts[v]=A,w.belongings[v]=v,w.counts[v]=1,v++}),a.forEachEdge(function(g,$,E,k,C,D,L){if(m=d(g,$,E,k,C,D,L),E=S[E],k=S[k],w.M+=m,E===k)w.totalWeights[E]+=m*2,w.loops[E]=m*2;else{w.totalWeights[E]+=m,w.totalWeights[k]+=m;var q=--w.starts[E],N=--w.starts[k];w.neighborhood[q]=k,w.neighborhood[N]=E,w.weights[q]=m,w.weights[N]=m}}),this.starts[v]=this.E,this.keepDendrogram?this.dendrogram.push(this.belongings.slice()):this.mapping=this.belongings.slice()}o.prototype.isolate=function(a,u){var l=this.belongings[a];if(this.counts[l]===1)return l;var d=this.unused[--this.U],f=this.loops[a];return this.totalWeights[l]-=u+f,this.totalWeights[d]+=u+f,this.belongings[a]=d,this.counts[l]--,this.counts[d]++,d},o.prototype.move=function(a,u,l){var d=this.belongings[a],f=this.loops[a];this.totalWeights[d]-=u+f,this.totalWeights[l]+=u+f,this.belongings[a]=l;var h=this.counts[d]--===1;this.counts[l]++,h&&(this.unused[this.U++]=d)},o.prototype.computeNodeDegree=function(a){var u,l,d,f=0;for(u=this.starts[a],l=this.starts[a+1];u<l;u++)d=this.weights[u],f+=d;return f},o.prototype.expensiveIsolate=function(a){var u=this.computeNodeDegree(a);return this.isolate(a,u)},o.prototype.expensiveMove=function(a,u){var l=this.computeNodeDegree(a);this.move(a,l,u)},o.prototype.zoomOut=function(){var a=new Array(this.C-this.U),u={},l=this.nodes.length,d=0,f=0,h,p,y,S,m,v,A,w,g;for(h=0,y=this.C;h<y;h++)v=this.belongings[h],v in u||(u[v]=d,a[d]={adj:{},totalWeights:this.totalWeights[v],internalWeights:0},d++),this.belongings[h]=u[v];var $,E;if(this.keepDendrogram){for($=this.dendrogram[this.level],E=new(r.getPointerArray(d))(l),h=0;h<l;h++)E[h]=this.belongings[$[h]];this.dendrogram.push(E)}else for(h=0;h<l;h++)this.mapping[h]=this.belongings[this.mapping[h]];for(h=0,y=this.C;h<y;h++)for(v=this.belongings[h],w=a[v],g=w.adj,w.internalWeights+=this.loops[h],p=this.starts[h],S=this.starts[h+1];p<S;p++){if(m=this.neighborhood[p],A=this.belongings[m],v===A){w.internalWeights+=this.weights[p];continue}A in g||(g[A]=0),g[A]+=this.weights[p]}for(this.C=d,m=0,v=0;v<d;v++){w=a[v],g=w.adj,v=+v,this.totalWeights[v]=w.totalWeights,this.loops[v]=w.internalWeights,this.counts[v]=1,this.starts[v]=m,this.belongings[v]=v;for(A in g)this.neighborhood[m]=+A,this.weights[m]=g[A],f++,m++}return this.starts[d]=f,this.E=f,this.U=0,this.level++,u},o.prototype.modularity=function(){var a,u,l,d,f,h=0,p=this.M*2,y=new Float64Array(this.C);for(l=0;l<this.C;l++)for(a=this.belongings[l],y[a]+=this.loops[l],d=this.starts[l],f=this.starts[l+1];d<f;d++)u=this.belongings[this.neighborhood[d]],a===u&&(y[a]+=this.weights[d]);for(l=0;l<this.C;l++)h+=y[l]/p-Math.pow(this.totalWeights[l]/p,2)*this.resolution;return h},o.prototype.delta=function(a,u,l,d){var f=this.M,h=this.totalWeights[d];return u+=this.loops[a],l/f-h*u*this.resolution/(2*f*f)},o.prototype.deltaWithOwnCommunity=function(a,u,l,d){var f=this.M,h=this.totalWeights[d];return u+=this.loops[a],l/f-(h-u)*u*this.resolution/(2*f*f)},o.prototype.fastDelta=function(a,u,l,d){var f=this.M,h=this.totalWeights[d];return u+=this.loops[a],l-u*h*this.resolution/(2*f)},o.prototype.fastDeltaWithOwnCommunity=function(a,u,l,d){var f=this.M,h=this.totalWeights[d];return u+=this.loops[a],l-u*(h-u)*this.resolution/(2*f)},o.prototype.bounds=function(a){return[this.starts[a],this.starts[a+1]]},o.prototype.project=function(){var a=this,u={};return a.nodes.slice(0,this.C).forEach(function(l,d){u[l]=Array.from(a.neighborhood.slice(a.starts[d],a.starts[d+1])).map(function(f){return a.nodes[f]})}),u},o.prototype.collect=function(a){arguments.length<1&&(a=this.level);var u={},l=this.keepDendrogram?this.dendrogram[a]:this.mapping,d,f;for(d=0,f=l.length;d<f;d++)u[this.nodes[d]]=l[d];return u},o.prototype.assign=function(a,u){arguments.length<2&&(u=this.level);var l=this.keepDendrogram?this.dendrogram[u]:this.mapping,d,f;for(d=0,f=l.length;d<f;d++)this.graph.setNodeAttribute(this.nodes[d],a,l[d])},o.prototype[n]=function(){var a={};Object.defineProperty(a,"constructor",{value:o,enumerable:!1}),a.C=this.C,a.M=this.M,a.E=this.E,a.U=this.U,a.resolution=this.resolution,a.level=this.level,a.nodes=this.nodes,a.starts=this.starts.slice(0,a.C+1);var u=["neighborhood","weights"],l=["counts","loops","belongings","totalWeights"],d=this;return u.forEach(function(f){a[f]=d[f].slice(0,a.E)}),l.forEach(function(f){a[f]=d[f].slice(0,a.C)}),a.unused=this.unused.slice(0,this.U),this.keepDendrogram?a.dendrogram=this.dendrogram:a.mapping=this.mapping,a};function s(a,u){u=e(u,i);var l=u.resolution,d=t(u.getEdgeWeight).fromEntry,f=(a.size-a.selfLoopCount)*2,h=r.getPointerArray(f),p=r.getPointerArray(a.order+1),y=u.getEdgeWeight?Float64Array:r.getPointerArray(a.size*2);this.C=a.order,this.M=0,this.E=f,this.U=0,this.resolution=l,this.level=0,this.graph=a,this.nodes=new Array(a.order),this.keepDendrogram=u.keepDendrogram,this.neighborhood=new p(f),this.weights=new y(f),this.loops=new y(a.order),this.starts=new h(a.order+1),this.offsets=new h(a.order),this.belongings=new p(a.order),this.dendrogram=[],this.counts=new p(a.order),this.unused=new p(a.order),this.totalInWeights=new y(a.order),this.totalOutWeights=new y(a.order);var S={},m,v=0,A=0,w=this;a.forEachNode(function(g){w.nodes[v]=g,S[g]=v,A+=a.outDegreeWithoutSelfLoops(g),w.starts[v]=A,A+=a.inDegreeWithoutSelfLoops(g),w.offsets[v]=A,w.belongings[v]=v,w.counts[v]=1,v++}),a.forEachEdge(function(g,$,E,k,C,D,L){if(m=d(g,$,E,k,C,D,L),E=S[E],k=S[k],w.M+=m,E===k)w.loops[E]+=m,w.totalInWeights[E]+=m,w.totalOutWeights[E]+=m;else{w.totalOutWeights[E]+=m,w.totalInWeights[k]+=m;var q=--w.starts[E],N=--w.offsets[k];w.neighborhood[q]=k,w.neighborhood[N]=E,w.weights[q]=m,w.weights[N]=m}}),this.starts[v]=this.E,this.keepDendrogram?this.dendrogram.push(this.belongings.slice()):this.mapping=this.belongings.slice()}return s.prototype.bounds=o.prototype.bounds,s.prototype.inBounds=function(a){return[this.offsets[a],this.starts[a+1]]},s.prototype.outBounds=function(a){return[this.starts[a],this.offsets[a]]},s.prototype.project=o.prototype.project,s.prototype.projectIn=function(){var a=this,u={};return a.nodes.slice(0,this.C).forEach(function(l,d){u[l]=Array.from(a.neighborhood.slice(a.offsets[d],a.starts[d+1])).map(function(f){return a.nodes[f]})}),u},s.prototype.projectOut=function(){var a=this,u={};return a.nodes.slice(0,this.C).forEach(function(l,d){u[l]=Array.from(a.neighborhood.slice(a.starts[d],a.offsets[d])).map(function(f){return a.nodes[f]})}),u},s.prototype.isolate=function(a,u,l){var d=this.belongings[a];if(this.counts[d]===1)return d;var f=this.unused[--this.U],h=this.loops[a];return this.totalInWeights[d]-=u+h,this.totalInWeights[f]+=u+h,this.totalOutWeights[d]-=l+h,this.totalOutWeights[f]+=l+h,this.belongings[a]=f,this.counts[d]--,this.counts[f]++,f},s.prototype.move=function(a,u,l,d){var f=this.belongings[a],h=this.loops[a];this.totalInWeights[f]-=u+h,this.totalInWeights[d]+=u+h,this.totalOutWeights[f]-=l+h,this.totalOutWeights[d]+=l+h,this.belongings[a]=d;var p=this.counts[f]--===1;this.counts[d]++,p&&(this.unused[this.U++]=f)},s.prototype.computeNodeInDegree=function(a){var u,l,d,f=0;for(u=this.offsets[a],l=this.starts[a+1];u<l;u++)d=this.weights[u],f+=d;return f},s.prototype.computeNodeOutDegree=function(a){var u,l,d,f=0;for(u=this.starts[a],l=this.offsets[a];u<l;u++)d=this.weights[u],f+=d;return f},s.prototype.expensiveMove=function(a,u){var l=this.computeNodeInDegree(a),d=this.computeNodeOutDegree(a);this.move(a,l,d,u)},s.prototype.zoomOut=function(){var a=new Array(this.C-this.U),u={},l=this.nodes.length,d=0,f=0,h,p,y,S,m,v,A,w,g,$,E,k,C;for(h=0,y=this.C;h<y;h++)v=this.belongings[h],v in u||(u[v]=d,a[d]={inAdj:{},outAdj:{},totalInWeights:this.totalInWeights[v],totalOutWeights:this.totalOutWeights[v],internalWeights:0},d++),this.belongings[h]=u[v];var D,L;if(this.keepDendrogram){for(D=this.dendrogram[this.level],L=new(r.getPointerArray(d))(l),h=0;h<l;h++)L[h]=this.belongings[D[h]];this.dendrogram.push(L)}else for(h=0;h<l;h++)this.mapping[h]=this.belongings[this.mapping[h]];for(h=0,y=this.C;h<y;h++)for(v=this.belongings[h],g=this.offsets[h],w=a[v],k=w.inAdj,C=w.outAdj,w.internalWeights+=this.loops[h],p=this.starts[h],S=this.starts[h+1];p<S;p++){if(m=this.neighborhood[p],A=this.belongings[m],$=p<g,E=$?C:k,v===A){$&&(w.internalWeights+=this.weights[p]);continue}A in E||(E[A]=0),E[A]+=this.weights[p]}for(this.C=d,m=0,v=0;v<d;v++){w=a[v],k=w.inAdj,C=w.outAdj,v=+v,this.totalInWeights[v]=w.totalInWeights,this.totalOutWeights[v]=w.totalOutWeights,this.loops[v]=w.internalWeights,this.counts[v]=1,this.starts[v]=m,this.belongings[v]=v;for(A in C)this.neighborhood[m]=+A,this.weights[m]=C[A],f++,m++;this.offsets[v]=m;for(A in k)this.neighborhood[m]=+A,this.weights[m]=k[A],f++,m++}return this.starts[d]=f,this.E=f,this.U=0,this.level++,u},s.prototype.modularity=function(){var a,u,l,d,f,h=0,p=this.M,y=new Float64Array(this.C);for(l=0;l<this.C;l++)for(a=this.belongings[l],y[a]+=this.loops[l],d=this.starts[l],f=this.offsets[l];d<f;d++)u=this.belongings[this.neighborhood[d]],a===u&&(y[a]+=this.weights[d]);for(l=0;l<this.C;l++)h+=y[l]/p-this.totalInWeights[l]*this.totalOutWeights[l]/Math.pow(p,2)*this.resolution;return h},s.prototype.delta=function(a,u,l,d,f){var h=this.M,p=this.totalInWeights[f],y=this.totalOutWeights[f],S=this.loops[a];return u+=S,l+=S,d/h-(l*p+u*y)*this.resolution/(h*h)},s.prototype.deltaWithOwnCommunity=function(a,u,l,d,f){var h=this.M,p=this.totalInWeights[f],y=this.totalOutWeights[f],S=this.loops[a];return u+=S,l+=S,d/h-(l*(p-u)+u*(y-l))*this.resolution/(h*h)},s.prototype.collect=o.prototype.collect,s.prototype.assign=o.prototype.assign,s.prototype[n]=function(){var a={};Object.defineProperty(a,"constructor",{value:s,enumerable:!1}),a.C=this.C,a.M=this.M,a.E=this.E,a.U=this.U,a.resolution=this.resolution,a.level=this.level,a.nodes=this.nodes,a.starts=this.starts.slice(0,a.C+1);var u=["neighborhood","weights"],l=["counts","offsets","loops","belongings","totalInWeights","totalOutWeights"],d=this;return u.forEach(function(f){a[f]=d[f].slice(0,a.E)}),l.forEach(function(f){a[f]=d[f].slice(0,a.C)}),a.unused=this.unused.slice(0,this.U),this.keepDendrogram?a.dendrogram=this.dendrogram:a.mapping=this.mapping,a},bn.UndirectedLouvainIndex=o,bn.DirectedLouvainIndex=s,bn}var mi,ss;function xf(){if(ss)return mi;ss=1;var r=Pi(),e=In(),t=pa(),n=zi(),i=ya(),o=ma().createRandomIndex,s=_f(),a=wa(),u=s.addWeightToCommunity,l=a.UndirectedLouvainIndex,d=s.UndirectedLeidenAddenda,f={attributes:{community:"community",weight:"weight"},randomness:.01,randomWalk:!0,resolution:1,rng:Math.random,weighted:!1,maxIterations:0},h=1e-10;function p(v,A,w,g,$){return Math.abs(g-$)<h?v===A?!1:w>v:g>$}function y(v,A,w){for(var g=new l(A,{attributes:{weight:w.attributes.weight},keepDendrogram:v,resolution:w.resolution,weighted:w.weighted}),$=new d(g,{randomness:w.randomness,rng:w.rng}),E=o(w.rng),k,C,D=new n(Float64Array,g.C),L=new i(g.C),q,N,b,Ce,Ge,R,x,K,ee,ne,De,ce,W,_e,Ke,Be=0,Xe=0,ct=[],Je,pe=0;!(w.maxIterations>0&&pe>=w.maxIterations);){for(pe++,ee=g.C,Je=0,Ge=w.randomWalk?E(ee):0,R=0;R<ee;R++,Ge++)x=Ge%ee,L.enqueue(x);for(;L.size!==0;){for(x=L.dequeue(),Xe++,ne=0,D.clear(),k=g.belongings[x],q=g.starts[x],N=g.starts[x+1];q<N;q++)K=g.neighborhood[q],b=g.weights[q],C=g.belongings[K],ne+=b,u(D,C,b);W=g.fastDeltaWithOwnCommunity(x,ne,D.get(k)||0,k),ce=k;var V=[[k,W,"own",g.counts[k]===1]];for(Ce=0;Ce<D.size;Ce++)C=D.dense[Ce],C!==k&&(De=D.vals[Ce],Be++,Ke=g.fastDelta(x,ne,De,C),V.push([C,Ke,"other"]),_e=p(ce,k,C,Ke,W),_e&&(W=Ke,ce=C));if(W<0){if(ce=g.isolate(x,ne),ce===k)continue}else{if(ce===k)continue;g.move(x,ne,ce)}for(Je++,q=g.starts[x],N=g.starts[x+1];q<N;q++)K=g.neighborhood[q],C=g.belongings[K],C!==ce&&L.enqueue(K)}if(ct.push(Je),Je===0){g.zoomOut();break}if(!$.onlySingletons()){$.zoomOut();continue}break}var ye={index:g,deltaComputations:Be,nodesVisited:Xe,moves:ct};return ye}function S(v,A,w,g){if(!e(w))throw new Error("graphology-communities-leiden: the given graph is not a valid graphology instance.");var $=t(w);if($==="mixed")throw new Error("graphology-communities-leiden: cannot run the algorithm on a true mixed graph.");if($==="directed")throw new Error("graphology-communities-leiden: not yet implemented for directed graphs.");g=r(g,f);var E=0;if(w.size===0){if(v){w.forEachNode(function(N){w.setNodeAttribute(N,g.attributes.communities,E++)});return}var k={};return w.forEachNode(function(N){k[N]=E++}),A?{communities:k,count:w.order,deltaComputations:0,dendrogram:null,level:0,modularity:NaN,moves:null,nodesVisited:0,resolution:g.resolution}:k}var C=y,D=C(A,w,g),L=D.index;if(!A){if(v){L.assign(g.attributes.community);return}return L.collect()}var q={count:L.C,deltaComputations:D.deltaComputations,dendrogram:L.dendrogram,level:L.level,modularity:L.modularity(),moves:D.moves,nodesVisited:D.nodesVisited,resolution:g.resolution};return v?(L.assign(g.attributes.community),q):(q.communities=L.collect(),q)}var m=S.bind(null,!1,!1);return m.assign=S.bind(null,!0,!1),m.detailed=S.bind(null,!1,!0),m.defaults=f,mi=m,mi}var Ef=xf();const kf=Ti(Ef);var bi,as;function Sf(){if(as)return bi;as=1;var r=Pi(),e=In(),t=pa(),n=zi(),i=ya(),o=ma().createRandomIndex,s=wa(),a=s.UndirectedLouvainIndex,u=s.DirectedLouvainIndex,l={nodeCommunityAttribute:"community",getEdgeWeight:"weight",fastLocalMoves:!0,randomWalk:!0,resolution:1,rng:Math.random};function d(v,A,w){var g=v.get(A);typeof g>"u"&&(g=0),g+=w,v.set(A,g)}var f=1e-10;function h(v,A,w,g,$){return Math.abs(g-$)<f?v===A?!1:w>v:g>$}function p(v,A,w){var g=new a(A,{getEdgeWeight:w.getEdgeWeight,keepDendrogram:v,resolution:w.resolution}),$=o(w.rng),E=!0,k=!0,C,D,L=new n(Float64Array,g.C),q,N,b,Ce,Ge,R,x,K,ee,ne,De,ce,W,_e,Ke,Be,Xe=0,ct=0,Je=[],pe,V;for(w.fastLocalMoves&&(q=new i(g.C));E;){if(ne=g.C,E=!1,k=!0,w.fastLocalMoves){for(V=0,R=w.randomWalk?$(ne):0,x=0;x<ne;x++,R++)K=R%ne,q.enqueue(K);for(;q.size!==0;){for(K=q.dequeue(),ct++,De=0,L.clear(),C=g.belongings[K],N=g.starts[K],b=g.starts[K+1];N<b;N++)ee=g.neighborhood[N],Ce=g.weights[N],D=g.belongings[ee],De+=Ce,d(L,D,Ce);for(_e=g.fastDeltaWithOwnCommunity(K,De,L.get(C)||0,C),W=C,Ge=0;Ge<L.size;Ge++)D=L.dense[Ge],D!==C&&(ce=L.vals[Ge],Xe++,Be=g.fastDelta(K,De,ce,D),Ke=h(W,C,D,Be,_e),Ke&&(_e=Be,W=D));if(_e<0){if(W=g.isolate(K,De),W===C)continue}else{if(W===C)continue;g.move(K,De,W)}for(E=!0,V++,N=g.starts[K],b=g.starts[K+1];N<b;N++)ee=g.neighborhood[N],D=g.belongings[ee],D!==W&&q.enqueue(ee)}Je.push(V)}else for(pe=[],Je.push(pe);k;){for(k=!1,V=0,R=w.randomWalk?$(ne):0,x=0;x<ne;x++,R++){for(K=R%ne,ct++,De=0,L.clear(),C=g.belongings[K],N=g.starts[K],b=g.starts[K+1];N<b;N++)ee=g.neighborhood[N],Ce=g.weights[N],D=g.belongings[ee],De+=Ce,d(L,D,Ce);for(_e=g.fastDeltaWithOwnCommunity(K,De,L.get(C)||0,C),W=C,Ge=0;Ge<L.size;Ge++)D=L.dense[Ge],D!==C&&(ce=L.vals[Ge],Xe++,Be=g.fastDelta(K,De,ce,D),Ke=h(W,C,D,Be,_e),Ke&&(_e=Be,W=D));if(_e<0){if(W=g.isolate(K,De),W===C)continue}else{if(W===C)continue;g.move(K,De,W)}k=!0,V++}pe.push(V),E=k||E}E&&g.zoomOut()}var ye={index:g,deltaComputations:Xe,nodesVisited:ct,moves:Je};return ye}function y(v,A,w){var g=new u(A,{getEdgeWeight:w.getEdgeWeight,keepDendrogram:v,resolution:w.resolution}),$=o(w.rng),E=!0,k=!0,C,D,L=new n(Float64Array,g.C),q,N,b,Ce,Ge,R,x,K,ee,ne,De,ce,W,_e,Ke,Be,Xe,ct,Je,pe=0,V=0,ye=[],lt,Y;for(w.fastLocalMoves&&(q=new i(g.C));E;){if(ce=g.C,E=!1,k=!0,w.fastLocalMoves){for(Y=0,K=w.randomWalk?$(ce):0,ee=0;ee<ce;ee++,K++)ne=K%ce,q.enqueue(ne);for(;q.size!==0;){for(ne=q.dequeue(),V++,W=0,_e=0,L.clear(),C=g.belongings[ne],N=g.starts[ne],b=g.starts[ne+1],Ce=g.offsets[ne];N<b;N++)Ge=N<Ce,De=g.neighborhood[N],R=g.weights[N],D=g.belongings[De],Ge?_e+=R:W+=R,d(L,D,R);for(Xe=g.deltaWithOwnCommunity(ne,W,_e,L.get(C)||0,C),Be=C,x=0;x<L.size;x++)D=L.dense[x],D!==C&&(Ke=L.vals[x],pe++,Je=g.delta(ne,W,_e,Ke,D),ct=h(Be,C,D,Je,Xe),ct&&(Xe=Je,Be=D));if(Xe<0){if(Be=g.isolate(ne,W,_e),Be===C)continue}else{if(Be===C)continue;g.move(ne,W,_e,Be)}for(E=!0,Y++,N=g.starts[ne],b=g.starts[ne+1];N<b;N++)De=g.neighborhood[N],D=g.belongings[De],D!==Be&&q.enqueue(De)}ye.push(Y)}else for(lt=[],ye.push(lt);k;){for(k=!1,Y=0,K=w.randomWalk?$(ce):0,ee=0;ee<ce;ee++,K++){for(ne=K%ce,V++,W=0,_e=0,L.clear(),C=g.belongings[ne],N=g.starts[ne],b=g.starts[ne+1],Ce=g.offsets[ne];N<b;N++)Ge=N<Ce,De=g.neighborhood[N],R=g.weights[N],D=g.belongings[De],Ge?_e+=R:W+=R,d(L,D,R);for(Xe=g.deltaWithOwnCommunity(ne,W,_e,L.get(C)||0,C),Be=C,x=0;x<L.size;x++)D=L.dense[x],D!==C&&(Ke=L.vals[x],pe++,Je=g.delta(ne,W,_e,Ke,D),ct=h(Be,C,D,Je,Xe),ct&&(Xe=Je,Be=D));if(Xe<0){if(Be=g.isolate(ne,W,_e),Be===C)continue}else{if(Be===C)continue;g.move(ne,W,_e,Be)}k=!0,Y++}lt.push(Y),E=k||E}E&&g.zoomOut()}var Z={index:g,deltaComputations:pe,nodesVisited:V,moves:ye};return Z}function S(v,A,w,g){if(!e(w))throw new Error("graphology-communities-louvain: the given graph is not a valid graphology instance.");var $=t(w);if($==="mixed")throw new Error("graphology-communities-louvain: cannot run the algorithm on a true mixed graph.");g=r(g,l);var E=0;if(w.size===0){if(v){w.forEachNode(function(N){w.setNodeAttribute(N,g.nodeCommunityAttribute,E++)});return}var k={};return w.forEachNode(function(N){k[N]=E++}),A?{communities:k,count:w.order,deltaComputations:0,dendrogram:null,level:0,modularity:NaN,moves:null,nodesVisited:0,resolution:g.resolution}:k}var C=$==="undirected"?p:y,D=C(A,w,g),L=D.index;if(!A){if(v){L.assign(g.nodeCommunityAttribute);return}return L.collect()}var q={count:L.C,deltaComputations:D.deltaComputations,dendrogram:L.dendrogram,level:L.level,modularity:L.modularity(),moves:D.moves,nodesVisited:D.nodesVisited,resolution:g.resolution};return v?(L.assign(g.nodeCommunityAttribute),q):(q.communities=L.collect(),q)}var m=S.bind(null,!1,!1);return m.assign=S.bind(null,!0,!1),m.detailed=S.bind(null,!1,!0),m.defaults=l,bi=m,bi}var $f=Sf();const Af=Ti($f);var wi,us;function Cf(){if(us)return wi;us=1;var r=0,e=1,t=2,n=3,i=4,o=5,s=6,a=7,u=8,l=9,d=0,f=1,h=2,p=0,y=1,S=2,m=3,v=4,A=5,w=6,g=7,$=8,E=3,k=10,C=3,D=9,L=10;return wi=function(N,b,Ce){var Ge,R,x,K,ee,ne,De,ce,W,_e,Ke=b.length,Be=Ce.length,Xe=N.adjustSizes,ct=N.barnesHutTheta*N.barnesHutTheta,Je,pe,V,ye,lt,Y,Z,G=[];for(x=0;x<Ke;x+=k)b[x+i]=b[x+t],b[x+o]=b[x+n],b[x+t]=0,b[x+n]=0;if(N.outboundAttractionDistribution){for(Je=0,x=0;x<Ke;x+=k)Je+=b[x+s];Je/=Ke/k}if(N.barnesHutOptimize){var St=1/0,Ct=-1/0,Lt=1/0,jt=-1/0,Et,wt,Qe;for(x=0;x<Ke;x+=k)St=Math.min(St,b[x+r]),Ct=Math.max(Ct,b[x+r]),Lt=Math.min(Lt,b[x+e]),jt=Math.max(jt,b[x+e]);var Gt=Ct-St,Xt=jt-Lt;for(Gt>Xt?(Lt-=(Gt-Xt)/2,jt=Lt+Gt):(St-=(Xt-Gt)/2,Ct=St+Xt),G[0+p]=-1,G[0+y]=(St+Ct)/2,G[0+S]=(Lt+jt)/2,G[0+m]=Math.max(Ct-St,jt-Lt),G[0+v]=-1,G[0+A]=-1,G[0+w]=0,G[0+g]=0,G[0+$]=0,Ge=1,x=0;x<Ke;x+=k)for(R=0,Qe=E;;)if(G[R+A]>=0){b[x+r]<G[R+y]?b[x+e]<G[R+S]?Et=G[R+A]:Et=G[R+A]+D:b[x+e]<G[R+S]?Et=G[R+A]+D*2:Et=G[R+A]+D*3,G[R+g]=(G[R+g]*G[R+w]+b[x+r]*b[x+s])/(G[R+w]+b[x+s]),G[R+$]=(G[R+$]*G[R+w]+b[x+e]*b[x+s])/(G[R+w]+b[x+s]),G[R+w]+=b[x+s],R=Et;continue}else if(G[R+p]<0){G[R+p]=x;break}else{if(G[R+A]=Ge*D,ce=G[R+m]/2,W=G[R+A],G[W+p]=-1,G[W+y]=G[R+y]-ce,G[W+S]=G[R+S]-ce,G[W+m]=ce,G[W+v]=W+D,G[W+A]=-1,G[W+w]=0,G[W+g]=0,G[W+$]=0,W+=D,G[W+p]=-1,G[W+y]=G[R+y]-ce,G[W+S]=G[R+S]+ce,G[W+m]=ce,G[W+v]=W+D,G[W+A]=-1,G[W+w]=0,G[W+g]=0,G[W+$]=0,W+=D,G[W+p]=-1,G[W+y]=G[R+y]+ce,G[W+S]=G[R+S]-ce,G[W+m]=ce,G[W+v]=W+D,G[W+A]=-1,G[W+w]=0,G[W+g]=0,G[W+$]=0,W+=D,G[W+p]=-1,G[W+y]=G[R+y]+ce,G[W+S]=G[R+S]+ce,G[W+m]=ce,G[W+v]=G[R+v],G[W+A]=-1,G[W+w]=0,G[W+g]=0,G[W+$]=0,Ge+=4,b[G[R+p]+r]<G[R+y]?b[G[R+p]+e]<G[R+S]?Et=G[R+A]:Et=G[R+A]+D:b[G[R+p]+e]<G[R+S]?Et=G[R+A]+D*2:Et=G[R+A]+D*3,G[R+w]=b[G[R+p]+s],G[R+g]=b[G[R+p]+r],G[R+$]=b[G[R+p]+e],G[Et+p]=G[R+p],G[R+p]=-1,b[x+r]<G[R+y]?b[x+e]<G[R+S]?wt=G[R+A]:wt=G[R+A]+D:b[x+e]<G[R+S]?wt=G[R+A]+D*2:wt=G[R+A]+D*3,Et===wt)if(Qe--){R=Et;continue}else{Qe=E;break}G[wt+p]=x;break}}if(N.barnesHutOptimize)for(pe=N.scalingRatio,x=0;x<Ke;x+=k)for(R=0;;)if(G[R+A]>=0)if(Y=Math.pow(b[x+r]-G[R+g],2)+Math.pow(b[x+e]-G[R+$],2),_e=G[R+m],4*_e*_e/Y<ct){if(V=b[x+r]-G[R+g],ye=b[x+e]-G[R+$],Xe===!0?Y>0?(Z=pe*b[x+s]*G[R+w]/Y,b[x+t]+=V*Z,b[x+n]+=ye*Z):Y<0&&(Z=-pe*b[x+s]*G[R+w]/Math.sqrt(Y),b[x+t]+=V*Z,b[x+n]+=ye*Z):Y>0&&(Z=pe*b[x+s]*G[R+w]/Y,b[x+t]+=V*Z,b[x+n]+=ye*Z),R=G[R+v],R<0)break;continue}else{R=G[R+A];continue}else{if(ne=G[R+p],ne>=0&&ne!==x&&(V=b[x+r]-b[ne+r],ye=b[x+e]-b[ne+e],Y=V*V+ye*ye,Xe===!0?Y>0?(Z=pe*b[x+s]*b[ne+s]/Y,b[x+t]+=V*Z,b[x+n]+=ye*Z):Y<0&&(Z=-pe*b[x+s]*b[ne+s]/Math.sqrt(Y),b[x+t]+=V*Z,b[x+n]+=ye*Z):Y>0&&(Z=pe*b[x+s]*b[ne+s]/Y,b[x+t]+=V*Z,b[x+n]+=ye*Z)),R=G[R+v],R<0)break;continue}else for(pe=N.scalingRatio,K=0;K<Ke;K+=k)for(ee=0;ee<K;ee+=k)V=b[K+r]-b[ee+r],ye=b[K+e]-b[ee+e],Xe===!0?(Y=Math.sqrt(V*V+ye*ye)-b[K+u]-b[ee+u],Y>0?(Z=pe*b[K+s]*b[ee+s]/Y/Y,b[K+t]+=V*Z,b[K+n]+=ye*Z,b[ee+t]-=V*Z,b[ee+n]-=ye*Z):Y<0&&(Z=100*pe*b[K+s]*b[ee+s],b[K+t]+=V*Z,b[K+n]+=ye*Z,b[ee+t]-=V*Z,b[ee+n]-=ye*Z)):(Y=Math.sqrt(V*V+ye*ye),Y>0&&(Z=pe*b[K+s]*b[ee+s]/Y/Y,b[K+t]+=V*Z,b[K+n]+=ye*Z,b[ee+t]-=V*Z,b[ee+n]-=ye*Z));for(W=N.gravity/N.scalingRatio,pe=N.scalingRatio,x=0;x<Ke;x+=k)Z=0,V=b[x+r],ye=b[x+e],Y=Math.sqrt(Math.pow(V,2)+Math.pow(ye,2)),N.strongGravityMode?Y>0&&(Z=pe*b[x+s]*W):Y>0&&(Z=pe*b[x+s]*W/Y),b[x+t]-=V*Z,b[x+n]-=ye*Z;for(pe=1*(N.outboundAttractionDistribution?Je:1),De=0;De<Be;De+=C)K=Ce[De+d],ee=Ce[De+f],ce=Ce[De+h],lt=Math.pow(ce,N.edgeWeightInfluence),V=b[K+r]-b[ee+r],ye=b[K+e]-b[ee+e],Xe===!0?(Y=Math.sqrt(V*V+ye*ye)-b[K+u]-b[ee+u],N.linLogMode?N.outboundAttractionDistribution?Y>0&&(Z=-pe*lt*Math.log(1+Y)/Y/b[K+s]):Y>0&&(Z=-pe*lt*Math.log(1+Y)/Y):N.outboundAttractionDistribution?Y>0&&(Z=-pe*lt/b[K+s]):Y>0&&(Z=-pe*lt)):(Y=Math.sqrt(Math.pow(V,2)+Math.pow(ye,2)),N.linLogMode?N.outboundAttractionDistribution?Y>0&&(Z=-pe*lt*Math.log(1+Y)/Y/b[K+s]):Y>0&&(Z=-pe*lt*Math.log(1+Y)/Y):N.outboundAttractionDistribution?(Y=1,Z=-pe*lt/b[K+s]):(Y=1,Z=-pe*lt)),Y>0&&(b[K+t]+=V*Z,b[K+n]+=ye*Z,b[ee+t]-=V*Z,b[ee+n]-=ye*Z);var nr,Jt,ar,$t,ur,Zt;if(Xe===!0)for(x=0;x<Ke;x+=k)b[x+l]!==1&&(nr=Math.sqrt(Math.pow(b[x+t],2)+Math.pow(b[x+n],2)),nr>L&&(b[x+t]=b[x+t]*L/nr,b[x+n]=b[x+n]*L/nr),Jt=b[x+s]*Math.sqrt((b[x+i]-b[x+t])*(b[x+i]-b[x+t])+(b[x+o]-b[x+n])*(b[x+o]-b[x+n])),ar=Math.sqrt((b[x+i]+b[x+t])*(b[x+i]+b[x+t])+(b[x+o]+b[x+n])*(b[x+o]+b[x+n]))/2,$t=.1*Math.log(1+ar)/(1+Math.sqrt(Jt)),ur=b[x+r]+b[x+t]*($t/N.slowDown),b[x+r]=ur,Zt=b[x+e]+b[x+n]*($t/N.slowDown),b[x+e]=Zt);else for(x=0;x<Ke;x+=k)b[x+l]!==1&&(Jt=b[x+s]*Math.sqrt((b[x+i]-b[x+t])*(b[x+i]-b[x+t])+(b[x+o]-b[x+n])*(b[x+o]-b[x+n])),ar=Math.sqrt((b[x+i]+b[x+t])*(b[x+i]+b[x+t])+(b[x+o]+b[x+n])*(b[x+o]+b[x+n]))/2,$t=b[x+a]*Math.log(1+ar)/(1+Math.sqrt(Jt)),b[x+a]=Math.min(1,Math.sqrt($t*(Math.pow(b[x+t],2)+Math.pow(b[x+n],2))/(1+Math.sqrt(Jt)))),ur=b[x+r]+b[x+t]*($t/N.slowDown),b[x+r]=ur,Zt=b[x+e]+b[x+n]*($t/N.slowDown),b[x+e]=Zt);return{}},wi}var Kt={},cs;function Lf(){if(cs)return Kt;cs=1;var r=10,e=3;return Kt.assign=function(t){t=t||{};var n=Array.prototype.slice.call(arguments).slice(1),i,o,s;for(i=0,s=n.length;i<s;i++)if(n[i])for(o in n[i])t[o]=n[i][o];return t},Kt.validateSettings=function(t){return"linLogMode"in t&&typeof t.linLogMode!="boolean"?{message:"the `linLogMode` setting should be a boolean."}:"outboundAttractionDistribution"in t&&typeof t.outboundAttractionDistribution!="boolean"?{message:"the `outboundAttractionDistribution` setting should be a boolean."}:"adjustSizes"in t&&typeof t.adjustSizes!="boolean"?{message:"the `adjustSizes` setting should be a boolean."}:"edgeWeightInfluence"in t&&typeof t.edgeWeightInfluence!="number"?{message:"the `edgeWeightInfluence` setting should be a number."}:"scalingRatio"in t&&!(typeof t.scalingRatio=="number"&&t.scalingRatio>=0)?{message:"the `scalingRatio` setting should be a number >= 0."}:"strongGravityMode"in t&&typeof t.strongGravityMode!="boolean"?{message:"the `strongGravityMode` setting should be a boolean."}:"gravity"in t&&!(typeof t.gravity=="number"&&t.gravity>=0)?{message:"the `gravity` setting should be a number >= 0."}:"slowDown"in t&&!(typeof t.slowDown=="number"||t.slowDown>=0)?{message:"the `slowDown` setting should be a number >= 0."}:"barnesHutOptimize"in t&&typeof t.barnesHutOptimize!="boolean"?{message:"the `barnesHutOptimize` setting should be a boolean."}:"barnesHutTheta"in t&&!(typeof t.barnesHutTheta=="number"&&t.barnesHutTheta>=0)?{message:"the `barnesHutTheta` setting should be a number >= 0."}:null},Kt.graphToByteArrays=function(t,n){var i=t.order,o=t.size,s={},a,u=new Float32Array(i*r),l=new Float32Array(o*e);return a=0,t.forEachNode(function(d,f){s[d]=a,u[a]=f.x,u[a+1]=f.y,u[a+2]=0,u[a+3]=0,u[a+4]=0,u[a+5]=0,u[a+6]=1,u[a+7]=1,u[a+8]=f.size||1,u[a+9]=f.fixed?1:0,a+=r}),a=0,t.forEachEdge(function(d,f,h,p,y,S,m){var v=s[h],A=s[p],w=n(d,f,h,p,y,S,m);u[v+6]+=w,u[A+6]+=w,l[a]=v,l[a+1]=A,l[a+2]=w,a+=e}),{nodes:u,edges:l}},Kt.assignLayoutChanges=function(t,n,i){var o=0;t.updateEachNodeAttributes(function(s,a){return a.x=n[o],a.y=n[o+1],o+=r,i?i(s,a):a})},Kt.readGraphPositions=function(t,n){var i=0;t.forEachNode(function(o,s){n[i]=s.x,n[i+1]=s.y,i+=r})},Kt.collectLayoutChanges=function(t,n,i){for(var o=t.nodes(),s={},a=0,u=0,l=n.length;a<l;a+=r){if(i){var d=Object.assign({},t.getNodeAttributes(o[u]));d.x=n[a],d.y=n[a+1],d=i(o[u],d),s[o[u]]={x:d.x,y:d.y}}else s[o[u]]={x:n[a],y:n[a+1]};u++}return s},Kt.createWorker=function(n){var i=window.URL||window.webkitURL,o=n.toString(),s=i.createObjectURL(new Blob(["("+o+").call(this);"],{type:"text/javascript"})),a=new Worker(s);return i.revokeObjectURL(s),a},Kt}var _i,ls;function Df(){return ls||(ls=1,_i={linLogMode:!1,outboundAttractionDistribution:!1,adjustSizes:!1,edgeWeightInfluence:1,scalingRatio:1,strongGravityMode:!1,gravity:1,slowDown:1,barnesHutOptimize:!1,barnesHutTheta:.5}),_i}var xi,ds;function If(){if(ds)return xi;ds=1;var r=In(),e=ba().createEdgeWeightGetter,t=Cf(),n=Lf(),i=Df();function o(u,l,d){if(!r(l))throw new Error("graphology-layout-forceatlas2: the given graph is not a valid graphology instance.");typeof d=="number"&&(d={iterations:d});var f=d.iterations;if(typeof f!="number")throw new Error("graphology-layout-forceatlas2: invalid number of iterations.");if(f<=0)throw new Error("graphology-layout-forceatlas2: you should provide a positive number of iterations.");var h=e("getEdgeWeight"in d?d.getEdgeWeight:"weight").fromEntry,p=typeof d.outputReducer=="function"?d.outputReducer:null,y=n.assign({},i,d.settings),S=n.validateSettings(y);if(S)throw new Error("graphology-layout-forceatlas2: "+S.message);var m=n.graphToByteArrays(l,h),v;for(v=0;v<f;v++)t(y,m.nodes,m.edges);if(u){n.assignLayoutChanges(l,m.nodes,p);return}return n.collectLayoutChanges(l,m.nodes)}function s(u){var l=typeof u=="number"?u:u.order;return{barnesHutOptimize:l>2e3,strongGravityMode:!0,gravity:.05,scalingRatio:10,slowDown:1+Math.log(l)}}var a=o.bind(null,!1);return a.assign=o.bind(null,!0),a.inferSettings=s,xi=a,xi}var Gf=If();const fs=Ti(Gf),Tf=["centrality_score","centrality","pagerank","page_rank","betweenness","closeness","eigenvector","degree","score"];function Of(r){return r==null?"":String(r)}function Rf(r){const e=typeof r=="number"?r:typeof r=="string"&&r.trim()?Number(r):NaN;return Number.isFinite(e)?e:null}function hs(r){for(const e of Tf){const t=Rf(r.data[e]);if(t!==null)return t}return null}function gs(r,e){for(const t of e){const n=r[t];if(typeof n=="string"&&n.trim())return n}return null}function Wi(r,e){const t=r[e];return t&&typeof t=="object"&&!Array.isArray(t)?t:null}function ps(r){return Array.isArray(r)?r.filter(e=>typeof e=="string"||typeof e=="number").map(e=>String(e).trim()).filter(Boolean):[]}function Nf(r){const e=Wi(r.data,"metadata");return gs(r.data,["description","summary","content"])??(e?gs(e,["description","summary","content"]):null)}function Uf(r){const e=ps(r.data.exports);if(e.length>0)return e;const t=Wi(r.data,"metadata");return t?ps(t.exports):[]}function vs(r,e){for(const t of e){const n=r[t];if(typeof n=="boolean")return n;if(typeof n=="string"){const i=n.trim().toLowerCase();if(["true","yes","1"].includes(i))return!0;if(["false","no","0"].includes(i))return!1}}return null}function _a(r,e){var i;const t=Wi(r.data,"metadata"),n=vs(r.data,["orphan","is_orphan","isOrphan","dead_code","deadCode"])??(t?vs(t,["orphan","is_orphan","isOrphan","dead_code","deadCode"]):null);return n!==null?n:(((i=e==null?void 0:e.get(r.id))==null?void 0:i.inDegree)??1)===0}function Pf(r){var n,i;const e=((n=r.data)==null?void 0:n.kind)??((i=r.data)==null?void 0:i.type)??r.label,t=typeof e=="string"?e.toLowerCase():"";return t==="imports"||t==="import"||t==="imports_from"?"imports":t==="defines"||t==="defined_in"||t==="contains"?"defines":"references"}function Mf(r,e){return r==="imports"?e==="incoming"?"imported by":"imports":r==="defines"?e==="incoming"?"defined by":"defines":e==="incoming"?"referenced by":"references"}function zf(r,e,t,n){const i=new Map(e.map(l=>[l.id,l])),o=[];for(const l of t){const d=l.source===r.id?"outgoing":l.target===r.id?"incoming":null;if(!d)continue;const f=d==="outgoing"?l.target:l.source,h=i.get(f),p=Pf(l);o.push({id:l.id,kind:p,direction:d,label:Mf(p,d),edgeLabel:l.label,nodeId:f,nodeLabel:(h==null?void 0:h.label)??f})}const s=(l,d)=>l.kind.localeCompare(d.kind)||l.nodeLabel.localeCompare(d.nodeLabel)||l.nodeId.localeCompare(d.nodeId),a=o.filter(l=>l.direction==="incoming").sort(s),u=o.filter(l=>l.direction==="outgoing").sort(s);return{description:Nf(r),exports:Uf(r),orphan:_a(r,n),incoming:a,outgoing:u,whereUsed:a}}function Wf(r,e){const t=new Map;for(const n of r)t.set(n.id,{degree:0,inDegree:0,outDegree:0,score:hs(n)??0});for(const n of e){const i=t.get(n.source),o=t.get(n.target);i&&(i.outDegree+=1,i.degree+=1),o&&(o.inDegree+=1,o.degree+=1)}for(const n of r){const i=t.get(n.id);i&&(i.score=hs(n)??i.degree)}return t}function jf(r,e,t){const n=t.get(r.id),i=t.get(e.id),o=((i==null?void 0:i.score)??0)-((n==null?void 0:n.score)??0);if(o!==0)return o;const s=((i==null?void 0:i.degree)??0)-((n==null?void 0:n.degree)??0);if(s!==0)return s;const a=r.label.localeCompare(e.label);return a!==0?a:r.id.localeCompare(e.id)}function Bf(r,e){const t=r.map(o=>{var s;return((s=e.get(o.id))==null?void 0:s.inDegree)??0});return Math.max(0,...t)<=0?new Map(r.map(o=>[o.id,1])):[...new Set(t)].sort((o,s)=>o-s).length===1?new Map(r.map(o=>[o.id,1])):new Map(r.map(o=>{var u;const s=((u=e.get(o.id))==null?void 0:u.inDegree)??0;if(s<=0)return[o.id,1];const a=t.filter(l=>l<=s).length/t.length;return a>.95?[o.id,2]:a>.8?[o.id,1.5]:a>.5?[o.id,1.25]:[o.id,1]}))}function ys(r){const e=r.id??r.rid??r._id??r.uid;return e==null?null:String(e)}function ms(r,e){const t=r.label??r.name??r.title;return t!=null?String(t):e}function Ff(r){const e=r.source??r.from??r.src??r.start,t=r.target??r.to??r.dst??r.end;return e==null||t===null||t===void 0?null:{source:String(e),target:String(t)}}function Kf(r){const e=new Map,t=new Map;for(const n of r.result.records){if(n.nodes)for(const o of Object.values(n.nodes)){if(!o||typeof o!="object")continue;const s=o,a=ys(s);a&&(e.has(a)||e.set(a,{id:a,label:ms(s,a),data:s}))}if(n.edges)for(const o of Object.values(n.edges)){if(!o||typeof o!="object")continue;const s=o,a=Ff(s);if(!a)continue;const u=s.label??s.type??s.rel,l=`${a.source}->${a.target}:${Of(u)}`;t.has(l)||t.set(l,{id:l,source:a.source,target:a.target,label:u!==void 0?String(u):void 0,data:s})}const i=n.values;if(i&&typeof i=="object"){const o=i.kind;if(o==="node"){const s=ys(i);s&&!e.has(s)&&e.set(s,{id:s,label:ms(i,s),data:i})}else if(o==="edge"){const s=i.from_rid??i.from,a=i.to_rid??i.to;if(s!=null&&a!==void 0&&a!==null){const u=String(s),l=String(a),d=i.label??i.type??i.rel,h=`e:${i.rid??i.id??`${u}->${l}`}`;t.has(h)||t.set(h,{id:h,source:u,target:l,label:d!==void 0?String(d):void 0,data:i})}}}}return{nodes:[...e.values()],edges:[...t.values()]}}function Hg(r){var t;const e=(t=r.result)==null?void 0:t.records;return!e||e.length===0?!1:e.some(n=>{if(n.nodes&&Object.keys(n.nodes).length>0||n.edges&&Object.keys(n.edges).length>0)return!0;const i=n.values;return!!(i&&(i.kind==="node"||i.kind==="edge"))})}function Hf(r){let e=r>>>0;return()=>{e=e+1831565813>>>0;let t=e;return t=Math.imul(t^t>>>15,t|1),t^=t+Math.imul(t^t>>>7,t|61),((t^t>>>14)>>>0)/4294967296}}function qf(r,e,t=kf){try{if(!t||typeof t.assign!="function")throw new Error("Leiden community detection unavailable");return t.assign(r,{attributes:{community:"community"},rng:e}),"leiden"}catch{return Af.assign(r,{nodeCommunityAttribute:"community",rng:e}),"louvain"}}function Vf(r,e){const t=new Map;if(r.length===0)return t;if(r.length===1)return t.set(r[0].id,{x:50,y:50,community:0}),t;const n=new Fe({type:"undirected",multi:!1,allowSelfLoops:!0}),i=Hf(r.length*131+e.length),o=Math.PI*2;r.forEach((S,m)=>{const v=m/r.length*o+i()*.1;n.addNode(S.id,{x:Math.cos(v),y:Math.sin(v)})});for(const S of e)!n.hasNode(S.source)||!n.hasNode(S.target)||S.source!==S.target&&(n.hasEdge(S.source,S.target)||n.addEdge(S.source,S.target));if(n.size===0){const S=Math.ceil(Math.sqrt(r.length));return r.forEach((m,v)=>{const A=Math.floor(v/S),w=v%S;t.set(m.id,{x:10+w/Math.max(1,S-1)*80,y:10+A/Math.max(1,S-1)*80,community:v})}),t}qf(n,i);const s=fs.inferSettings(n);fs.assign(n,{iterations:r.length>200?120:200,settings:{...s,strongGravityMode:!0,gravity:1.2,scalingRatio:10,barnesHutOptimize:r.length>500}});let a=1/0,u=-1/0,l=1/0,d=-1/0;n.forEachNode((S,m)=>{m.x<a&&(a=m.x),m.x>u&&(u=m.x),m.y<l&&(l=m.y),m.y>d&&(d=m.y)});const f=u-a||1,h=d-l||1,p=5,y=100-p*2;return n.forEachNode((S,m)=>{t.set(S,{x:p+(m.x-a)/f*y,y:p+(m.y-l)/h*y,community:m.community??0})}),t}function ji(r,e=!0){const t=[200,25,145,290,50,175,320,95,0,260,220,130],n=r<t.length?t[r]:(t[0]+r*137.508)%360,i=e?62:58,o=e?60:48;return`hsl(${n.toFixed(0)} ${i}% ${o}%)`}function An(r){switch(r){case"tale":return"#ff2056";case"character":return"#7dd3fc";case"location":return"#a3e635";case"object":return"#fbbf24";case"archetype":return"#a78bfa";default:return"#94a3b8"}}function Yf(r){return r==="tale"?8:r==="character"?5:r==="location"||r==="object"?4:3}function xa(r,e){const t=Math.max(.35,Math.min(1.25,Yf(r)*.14));return Math.max(.35,Math.min(2.5,t*e))}const Ea=3.4;function Xf(r,e){return xa(r,e)*Ea}const Jf="#e2e8f0";function ka(r){return Math.min(7,2.2+Math.sqrt(Math.max(1,r))*.7)}function Zf(r){return ka(r)*Ea}function Qf(r,e,t){const n=e/100,i=t/100,o=(1-Math.abs(2*i-1))*n,s=(r%360+360)%360/60,a=o*(1-Math.abs(s%2-1));let u=0,l=0,d=0;s>=0&&s<1?[u,l,d]=[o,a,0]:s<2?[u,l,d]=[a,o,0]:s<3?[u,l,d]=[0,o,a]:s<4?[u,l,d]=[0,a,o]:s<5?[u,l,d]=[a,0,o]:[u,l,d]=[o,0,a];const f=i-o/2;return{r:Math.round((u+f)*255),g:Math.round((l+f)*255),b:Math.round((d+f)*255)}}function Sa(r){const e=r.match(/hsl\(\s*([\d.]+)\s*[, ]\s*([\d.]+)%\s*[, ]\s*([\d.]+)%/i);return e?Qf(Number(e[1]),Number(e[2]),Number(e[3])):null}function eh({r,g:e,b:t}){return`rgb(${r}, ${e}, ${t})`}function th(r,e=!0){const t=ji(r,e),n=Sa(t);return n?eh(n):t}function kr(r,e){const t=Math.max(0,Math.min(1,e)),n=r.startsWith("hsl")?Sa(r):null;if(n)return`rgba(${n.r}, ${n.g}, ${n.b}, ${t})`;const i=r.match(/rgb\(\s*([\d.]+)[, ]+([\d.]+)[, ]+([\d.]+)/i);if(i)return`rgba(${i[1]}, ${i[2]}, ${i[3]}, ${t})`;const o=r.replace("#","");if(/^[0-9a-f]{6}$/i.test(o)){const s=parseInt(o.slice(0,2),16),a=parseInt(o.slice(2,4),16),u=parseInt(o.slice(4,6),16);return`rgba(${s}, ${a}, ${u}, ${t})`}return r}const rh="#d6a72c",nh="#f4c84a";function ih(r){var d,f,h,p;const{nodes:e,edges:t,layout:n,sizeScales:i,orphanIds:o,dark:s=!0,edgeColor:a="#3a424d",bundledCurvatures:u}=r,l=new Fe({type:"directed",multi:!0,allowSelfLoops:!0});for(const y of e){if(l.hasNode(y.id))continue;const S=String(y.data.node_type??"node"),m=i.get(y.id)??1,v=n.get(y.id),A=y.data.__supernode===!0,w=typeof y.data.__memberCount=="number"?y.data.__memberCount:0,g=A?Zf(w):Xf(S,m),$=v?th(v.community,s):An(S);l.addNode(y.id,{x:(v==null?void 0:v.x)??50,y:-((v==null?void 0:v.y)??50),size:g,baseSize:g,color:$,mutedColor:kr($,.14),borderColor:A?Jf:An(S),label:y.label,nodeType:S,community:(v==null?void 0:v.community)??-1,orphan:o.has(y.id),isSupernode:A,memberCount:w,type:"border"})}for(const y of t){if(!l.hasNode(y.source)||!l.hasNode(y.target)||l.hasEdge(y.id))continue;const S=((d=n.get(y.source))==null?void 0:d.community)??-1,m=((f=n.get(y.target))==null?void 0:f.community)??-1,v=((h=y.data)==null?void 0:h.__aggregated)===!0,A=typeof((p=y.data)==null?void 0:p.weight)=="number"?y.data.weight:1;l.addEdgeWithKey(y.id,y.source,y.target,{size:v?Math.min(6,1+Math.log2(A+1)):1,color:kr(a,.34),edgeLabel:y.label??"",label:"",crossCommunity:S!==m,curvature:(u==null?void 0:u.get(y.id))??0,type:"line"})}return l}function oh(r,e,t={}){const{padding:n=2.5,dark:i=!0}=t,o=new Map;for(const s of r){const a=e.get(s.id);if(!a)continue;const u=o.get(a.community);u?(u.minX=Math.min(u.minX,a.x),u.minY=Math.min(u.minY,a.y),u.maxX=Math.max(u.maxX,a.x),u.maxY=Math.max(u.maxY,a.y),u.count+=1):o.set(a.community,{minX:a.x,minY:a.y,maxX:a.x,maxY:a.y,count:1})}return[...o.entries()].sort((s,a)=>s[0]-a[0]).map(([s,a])=>{const u=ji(s,i);return{community:s,count:a.count,tint:u,fill:kr(u,.08),stroke:kr(u,.5),minX:a.minX-n,minY:a.minY-n,maxX:a.maxX+n,maxY:a.maxY+n,cx:(a.minX+a.maxX)/2,cy:(a.minY+a.maxY)/2}})}function bs(r,e,t,n,i){const o=t-r,s=n-e;let a=1;return o>0?a=Math.min(a,(i.maxX-r)/o):o<0&&(a=Math.min(a,(i.minX-r)/o)),s>0?a=Math.min(a,(i.maxY-e)/s):s<0&&(a=Math.min(a,(i.minY-e)/s)),a=Math.max(0,Math.min(1,a)),{x:r+o*a,y:e+s*a}}function sh(r,e,t){const n=new Map(t.map(o=>[o.community,o])),i=[];for(const o of r){const s=e.get(o.source),a=e.get(o.target);if(!s||!a||s.community===a.community)continue;const u=n.get(s.community),l=n.get(a.community);if(!u||!l)continue;const d=bs(s.x,s.y,a.x,a.y,u),f=bs(a.x,a.y,s.x,s.y,l);i.push({id:o.id,source:o.source,target:o.target,label:o.label,sourceCommunity:s.community,targetCommunity:a.community,x1:d.x,y1:d.y,x2:f.x,y2:f.y})}return i}const ah=36,uh=28,ch=36;function lh(r,e,t){const{focus:n,focusId:i,selectedNodeId:o,pulse:s,colors:a}=t,u=i!==null,l=i===r,d=n.nodes.has(r),f=!u||d,h=u?l?2.2+s*.38:d?1.58:.9:1,p=l?a.focusNodeStroke:e.orphan?a.warn:o===r?a.selectedNodeStroke:e.borderColor,y=e.isSupernode||u&&(l||n.nodes.size<=ch&&d);return{size:e.baseSize*h,color:f?e.color:e.mutedColor,borderColor:p,label:y?e.label.slice(0,ah):"",forceLabel:y,zIndex:l?3:e.isSupernode||d?2:1,hidden:!1}}function dh(r,e,t){const{focus:n,focusId:i,colors:o,groupInBox:s,bundle:a}=t,u=i!==null,l=n.edges.has(r),d=e.curvature,f=a&&Math.abs(d)>1e-4?"curved":"line";return s&&e.crossCommunity&&!l?{size:e.size,color:e.color,label:"",forceLabel:!1,zIndex:0,hidden:!0,type:f,curvature:d}:u?l?{size:2.2,color:o.focusEdge,label:e.edgeLabel?e.edgeLabel.slice(0,uh):"",forceLabel:!!e.edgeLabel,zIndex:2,hidden:!1,type:f,curvature:d}:{size:e.size,color:kr(o.edge,.055),label:"",forceLabel:!1,zIndex:0,hidden:!1,type:f,curvature:d}:{size:e.size,color:kr(o.edge,.34),label:"",forceLabel:!1,zIndex:0,hidden:!1,type:f,curvature:d}}const fh={stiffness:.1,stepSize:.1,cycles:6,iterations:60,iterationRate:2/3,subdivisionRate:2,compatibilityThreshold:.6},Ei=1500,Sr=1e-6;function qr(r,e){return Math.hypot(r.x-e.x,r.y-e.y)}function Cn(r,e){return{x:(r.x+e.x)/2,y:(r.y+e.y)/2}}function ws(r,e){const t=e+2,n=[0];for(let a=1;a<r.length;a++)n.push(n[a-1]+qr(r[a],r[a-1]));const i=n[n.length-1];if(i<Sr)return Array.from({length:t},()=>({...r[0]}));const o=[];let s=1;for(let a=0;a<t;a++){const u=i*a/(t-1);for(;s<r.length-1&&n[s]<u;)s++;const l=n[s-1],d=n[s]-l||1,f=Math.max(0,Math.min(1,(u-l)/d));o.push({x:r[s-1].x+f*(r[s].x-r[s-1].x),y:r[s-1].y+f*(r[s].y-r[s-1].y)})}return o}function hh(r,e){const t=(r.t.x-r.s.x)*(e.t.x-e.s.x)+(r.t.y-r.s.y)*(e.t.y-e.s.y);return Math.abs(t/(r.len*e.len))}function gh(r,e){const t=(r.len+e.len)/2;return 2/(t/Math.min(r.len,e.len)+Math.max(r.len,e.len)/t)}function ph(r,e){const t=(r.len+e.len)/2;return t/(t+qr(Cn(r.s,r.t),Cn(e.s,e.t)))}function _s(r,e){const t=e.len*e.len,n=((e.s.y-r.y)*(e.s.y-e.t.y)-(e.s.x-r.x)*(e.t.x-e.s.x))/t;return{x:e.s.x+n*(e.t.x-e.s.x),y:e.s.y+n*(e.t.y-e.s.y)}}function xs(r,e){const t=_s(e.s,r),n=_s(e.t,r),i=Cn(t,n),o=qr(t,n);return o<Sr?0:Math.max(0,1-2*qr(i,Cn(e.s,e.t))/o)}function vh(r,e){return Math.min(xs(r,e),xs(e,r))}function yh(r,e){return hh(r,e)*gh(r,e)*ph(r,e)*vh(r,e)}function mh(r,e){const t=r.map(()=>[]);for(let n=0;n<r.length;n++)for(let i=n+1;i<r.length;i++)yh(r[n],r[i])>=e&&(t[n].push(i),t[i].push(n));return t}function bh(r,e,t={}){const n={...fh,...t},i=new Map(r.map(h=>[h.id,{x:h.x,y:h.y}])),o=new Map,s=[];for(const h of e){const p=i.get(h.source),y=i.get(h.target);if(!p||!y||(o.set(h.id,[{...p},{...y}]),h.source===h.target))continue;const S=qr(p,y);S<Sr||s.push({id:h.id,s:{...p},t:{...y},len:S})}if(s.length<2)return o;const a=s.map(h=>[{...h.s},{...h.t}]),u=mh(s,n.compatibilityThreshold);let l=1,d=n.stepSize,f=n.iterations;for(let h=0;h<a.length;h++)a[h]=ws(a[h],l);for(let h=0;h<n.cycles;h++){const p=Math.max(1,Math.round(f));for(let y=0;y<p;y++){const S=s.map((m,v)=>wh(v,a,u,s[v].len,l,d,n.stiffness));for(let m=0;m<s.length;m++)for(let v=1;v<=l;v++)a[m][v].x+=S[m][v].x,a[m][v].y+=S[m][v].y}d*=.5,l*=n.subdivisionRate,f*=n.iterationRate;for(let y=0;y<a.length;y++)a[y]=ws(a[y],l)}for(let h=0;h<s.length;h++)o.set(s[h].id,a[h].map(p=>({x:p.x,y:p.y})));return o}function wh(r,e,t,n,i,o,s){const a=s/(n*(i+1)),u=e[r],l=[{x:0,y:0}];for(let d=1;d<=i;d++){const f=u[d-1],h=u[d],p=u[d+1];let y=a*(f.x-2*h.x+p.x),S=a*(f.y-2*h.y+p.y);for(const m of t[r]){const v=e[m][d],A=v.x-h.x,w=v.y-h.y;if(Math.abs(A)>Sr||Math.abs(w)>Sr){const g=Math.hypot(A,w);y+=A/g,S+=w/g}}l.push({x:o*y,y:o*S})}return l.push({x:0,y:0}),l}function _h(r){if(r.length<3)return 0;const e=r[0],t=r[r.length-1],n=t.x-e.x,i=t.y-e.y,o=Math.hypot(n,i);if(o<Sr)return 0;let s=0;for(let u=1;u<r.length-1;u++){const l=r[u].x-e.x,d=r[u].y-e.y,f=(l*-i+d*n)/o;Math.abs(f)>Math.abs(s)&&(s=f)}const a=2*s/o;return Math.max(-1,Math.min(1,a))}const Bi="__cluster__:";function Es(r){return`${Bi}${r}`}function $a(r){return r.startsWith(Bi)}function xh(r){if(!$a(r))return null;const e=Number(r.slice(Bi.length));return Number.isFinite(e)?e:null}function Aa(r,e){const t=new Map;for(const n of r){const i=e.get(n.id);if(!i)continue;const o=t.get(i.community);o?o.push(n.id):t.set(i.community,[n.id])}return t}const ks=(r,e,t)=>({nodes:r,edges:e,layout:t,supernodes:new Map,collapsedMembers:new Map});function Eh(r,e,t,n){if(n.size===0)return ks(r,e,t);const i=Aa(r,t),o=new Set;for(const p of n){const y=i.get(p);y&&y.length>0&&o.add(p)}if(o.size===0)return ks(r,e,t);const s=new Map,a=new Map,u=[],l=new Map;for(const p of r){const y=t.get(p.id);if(y&&o.has(y.community)){s.set(p.id,Es(y.community));continue}u.push(p),y&&l.set(p.id,y)}for(const p of o){const y=i.get(p),S=Es(p);let m=0,v=0,A=0;for(const w of y){const g=t.get(w);g&&(m+=g.x,v+=g.y,A+=1)}a.set(S,{community:p,memberIds:y,size:y.length}),u.push({id:S,label:`cluster ${p} · ${y.length}`,data:{node_type:"cluster",__supernode:!0,__community:p,__memberCount:y.length}}),l.set(S,{x:A?m/A:50,y:A?v/A:50,community:p})}const d=p=>s.get(p)??p,f=[],h=new Map;for(const p of e){const y=d(p.source),S=d(p.target);if(!(y!==p.source||S!==p.target)){f.push(p);continue}if(y===S)continue;const v=`${y} ${S}`,A=h.get(v);A?(A.weight+=1,A.members.push(p.id)):h.set(v,{source:y,target:S,weight:1,members:[p.id]})}for(const[p,y]of h)f.push({id:`__agg__:${p}`,source:y.source,target:y.target,label:y.weight>1?`×${y.weight}`:void 0,data:{__aggregated:!0,weight:y.weight,members:y.members}});return{nodes:u,edges:f,layout:l,supernodes:a,collapsedMembers:s}}var kh=le('<div class="flex-1 grid place-items-center text-fg-3 text-[12px] font-mono p-6 svelte-gt9p7f">No graph shape in this result.</div>'),Sh=le('<button type="button" class="text-fg-3 hover:text-fg-1 cursor-pointer svelte-gt9p7f" aria-label="Clear filter"><!></button>'),$h=le('<div class="inline-flex items-center gap-1.5 border border-line-1 rounded px-2 py-1 bg-bg-0 svelte-gt9p7f"><!> <input type="text" placeholder="filter by label…" class="bg-transparent text-fg-1 text-[11px] outline-none w-[160px] placeholder:text-fg-3 svelte-gt9p7f"/> <!></div> <label class="inline-flex items-center gap-1.5 text-fg-3 svelte-gt9p7f"><!> <span class="svelte-gt9p7f">limit:</span> <select class="bg-bg-1 text-fg-1 border border-line-1 rounded px-1 py-0.5 svelte-gt9p7f"><option class="svelte-gt9p7f">500</option><option class="svelte-gt9p7f">1k</option><option class="svelte-gt9p7f">2k</option><option class="svelte-gt9p7f">5k</option><option class="svelte-gt9p7f">10k</option><option class="svelte-gt9p7f">25k</option><option class="svelte-gt9p7f">50k</option></select></label>',1),Ah=le('<div class="inline-flex items-center overflow-hidden rounded border border-line-1 bg-bg-0 svelte-gt9p7f"><button type="button" class="inline-flex h-6 w-7 items-center justify-center text-fg-3 hover:bg-bg-1 hover:text-fg-0 disabled:opacity-40 svelte-gt9p7f" title="Zoom out" aria-label="Zoom out"><!></button> <button type="button" class="inline-flex h-6 min-w-12 items-center justify-center border-x border-line-1 px-2 text-[10px] text-fg-3 hover:bg-bg-1 hover:text-fg-0 svelte-gt9p7f" title="Fit graph" aria-label="Fit graph"> </button> <button type="button" class="inline-flex h-6 w-7 items-center justify-center text-fg-3 hover:bg-bg-1 hover:text-fg-0 disabled:opacity-40 svelte-gt9p7f" title="Zoom in" aria-label="Zoom in"><!></button></div>'),Ch=le('<span class="text-warn svelte-gt9p7f"> </span>'),Lh=le('<button type="button"><!> </button>'),Dh=le('<button type="button" title="Group in a box — draw one tinted box per community and route inter-community edges at the borders"><!> groups</button> <button type="button" title="Force-directed edge bundling — collapse parallel edges onto shared trunks to untangle dense subgraphs"><!> bundle</button> <!> <!>',1),Ih=le('<button type="button" class="inline-flex items-center gap-1 h-6 px-2 rounded border border-line-1 text-fg-3 hover:text-fg-1 cursor-pointer svelte-gt9p7f" title="Discard graph query and show the original collection result"><!> reset</button>'),Gh=le('<span class="text-accent svelte-gt9p7f"> </span>'),Th=le('<span class="text-warn svelte-gt9p7f" title="More nodes match — raise the limit or narrow the filter to see them"> </span>'),Oh=le('<span class="text-fg-2 svelte-gt9p7f"> </span>'),Rh=le('<div class="mt-1.5 text-warn svelte-gt9p7f"> </div>'),Nh=le('<div class="border-b border-line-1 px-3 py-2 bg-bg-1/20 text-[11px] font-mono svelte-gt9p7f"><div class="flex items-center gap-2 mb-1.5 text-fg-3 svelte-gt9p7f"><span class="svelte-gt9p7f">quick:</span> <button type="button" class="px-1.5 py-0.5 rounded border border-line-1 hover:border-line-2 hover:text-fg-1 cursor-pointer disabled:opacity-40 disabled:cursor-not-allowed svelte-gt9p7f">neighborhood of selected</button> <button type="button" class="px-1.5 py-0.5 rounded border border-line-1 hover:border-line-2 hover:text-fg-1 cursor-pointer svelte-gt9p7f">top centrality</button> <button type="button" class="inline-flex items-center gap-1 px-1.5 py-0.5 rounded border border-line-1 hover:border-line-2 hover:text-fg-1 cursor-pointer disabled:opacity-40 disabled:cursor-not-allowed svelte-gt9p7f" title="Run shortest path in reddb"><!> shortest path</button></div> <div class="mb-1.5 grid grid-cols-[1fr_1fr_auto_auto] gap-2 svelte-gt9p7f"><input type="text" placeholder="from label…" class="h-6 rounded border border-line-1 bg-bg-0 px-2 text-[11px] text-fg-1 outline-none placeholder:text-fg-3 focus:border-accent svelte-gt9p7f"/> <input type="text" placeholder="to label…" class="h-6 rounded border border-line-1 bg-bg-0 px-2 text-[11px] text-fg-1 outline-none placeholder:text-fg-3 focus:border-accent svelte-gt9p7f"/> <button type="button" class="rounded border border-line-1 px-1.5 text-fg-3 hover:border-line-2 hover:text-fg-1 disabled:opacity-40 disabled:cursor-not-allowed svelte-gt9p7f">use as from</button> <button type="button" class="rounded border border-line-1 px-1.5 text-fg-3 hover:border-line-2 hover:text-fg-1 disabled:opacity-40 disabled:cursor-not-allowed svelte-gt9p7f">use as to</button></div> <div class="flex items-stretch gap-2 svelte-gt9p7f"><textarea spellcheck="false" rows="3" class="flex-1 bg-bg-0 text-fg-1 border border-line-1 rounded px-2 py-1 text-[12px] font-mono outline-none focus:border-accent placeholder:text-fg-3 resize-none svelte-gt9p7f"></textarea> <div class="flex flex-col gap-1.5 svelte-gt9p7f"><button type="button" class="inline-flex items-center gap-1.5 h-7 px-3 rounded bg-accent text-white cursor-pointer disabled:opacity-40 disabled:cursor-not-allowed hover:bg-[#ff3868] svelte-gt9p7f"><!> run <span class="text-[9px] opacity-70 svelte-gt9p7f">⌘↵</span></button></div></div> <!></div>'),Uh=le('<div class="border-b border-line-1 bg-warn/10 px-3 py-2 text-[11px] font-mono text-warn flex items-start gap-2 svelte-gt9p7f"><!> <div class="svelte-gt9p7f"><div class="svelte-gt9p7f">WebGL renderer unavailable. Switch to SVG or Table.</div> <div class="mt-0.5 break-words text-fg-3 svelte-gt9p7f"> </div></div></div>'),Ph=kt('<rect rx="6" stroke-width="1.5" class="svelte-gt9p7f"></rect>'),Mh=kt('<line stroke="var(--color-line-3)" stroke-width="1" stroke-dasharray="4 3" opacity="0.7" class="svelte-gt9p7f"></line>'),zh=kt('<svg class="pointer-events-none absolute inset-0 h-full w-full svelte-gt9p7f" aria-hidden="true"><!><!></svg>'),Wh=le('<div class="sigma-canvas absolute inset-0 h-full w-full bg-bg-0 svelte-gt9p7f" role="application" tabindex="0"></div> <!>',1),jh=kt('<rect rx="1.5" stroke-width="0.18" vector-effect="non-scaling-stroke" class="svelte-gt9p7f"></rect>'),Bh=kt('<line stroke="currentColor" stroke-width="0.12" stroke-dasharray="0.8 0.6" opacity="0.6" class="text-line-3 svelte-gt9p7f" vector-effect="non-scaling-stroke"></line>'),Fh=kt('<g class="pointer-events-none svelte-gt9p7f"><!><!></g>'),Kh=kt('<polyline fill="none" stroke-linejoin="round" class="text-line-3 cursor-pointer hover:text-accent svelte-gt9p7f" vector-effect="non-scaling-stroke" role="button" tabindex="0"><title class="svelte-gt9p7f"> </title></polyline>'),Hh=kt('<line class="text-line-3 cursor-pointer hover:text-accent svelte-gt9p7f" vector-effect="non-scaling-stroke" role="button" tabindex="0"><title class="svelte-gt9p7f"> </title></line>'),qh=kt('<text fill="#f6d36b" opacity="0.96" font-size="1" font-weight="700" font-family="JetBrains Mono Variable, monospace" paint-order="stroke" stroke="#020617" stroke-width="0.38" class="pointer-events-none select-none svelte-gt9p7f"> </text>'),Vh=kt("<!><!>",1),Yh=kt('<circle fill="none" stroke="var(--color-warn)" vector-effect="non-scaling-stroke" class="pointer-events-none svelte-gt9p7f"></circle>'),Xh=kt('<text font-family="JetBrains Mono Variable, monospace" paint-order="stroke" stroke="#020617" class="pointer-events-none select-none svelte-gt9p7f"> </text>'),Jh=kt('<!><circle vector-effect="non-scaling-stroke" role="button" tabindex="0"><title class="svelte-gt9p7f"> </title></circle><!>',1),Zh=le('<div class="absolute inset-0 overflow-hidden bg-bg-0 svelte-gt9p7f"><svg class="h-full w-full svelte-gt9p7f" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid meet" role="button" tabindex="0"><rect x="0" y="0" width="100" height="100" fill="transparent" class="svelte-gt9p7f"></rect><g class="svelte-gt9p7f"><!><g class="svelte-gt9p7f"></g><g class="svelte-gt9p7f"></g></g></svg></div>'),Qh=le('<span class="ml-2 text-warn svelte-gt9p7f">orphan</span>'),eg=le('<tr><td class="px-2 py-1 text-fg-3 svelte-gt9p7f">node</td><td class="px-2 py-1 text-accent font-semibold svelte-gt9p7f"> </td><td class="px-2 py-1 text-fg-0 svelte-gt9p7f"> </td><td class="px-2 py-1 text-fg-2 svelte-gt9p7f"> <!></td></tr>'),tg=le('<tr class="border-b border-line-1/60 hover:bg-bg-1/40 cursor-pointer svelte-gt9p7f"><td class="px-2 py-1 text-fg-3 svelte-gt9p7f">edge</td><td class="px-2 py-1 text-fg-2 svelte-gt9p7f"> </td><td class="px-2 py-1 text-fg-0 svelte-gt9p7f"> </td><td class="px-2 py-1 text-fg-2 svelte-gt9p7f"> </td></tr>'),rg=le('<div class="absolute inset-0 overflow-auto svelte-gt9p7f"><table class="w-full border-collapse text-[12px] font-mono svelte-gt9p7f"><thead class="sticky top-0 bg-bg-1 z-10 svelte-gt9p7f"><tr class="border-b border-line-1 text-fg-3 svelte-gt9p7f"><th class="px-2 py-1.5 text-left font-normal whitespace-nowrap svelte-gt9p7f">type</th><th class="px-2 py-1.5 text-left font-normal whitespace-nowrap svelte-gt9p7f">id / rid</th><th class="px-2 py-1.5 text-left font-normal whitespace-nowrap svelte-gt9p7f">label</th><th class="px-2 py-1.5 text-left font-normal whitespace-nowrap svelte-gt9p7f">node_type / endpoints</th></tr></thead><tbody class="svelte-gt9p7f"><!><!></tbody></table></div>'),ng=le('<span class="inline-flex shrink-0 items-center gap-1 rounded border border-warn/40 bg-warn/10 px-1.5 py-0.5 text-[10px] font-semibold uppercase tracking-wider text-warn svelte-gt9p7f"><!> orphan</span>'),ig=le(`<button type="button" class="mt-2 inline-flex items-center gap-1.5 rounded border border-line-2 bg-bg-0 px-2 py-1 text-[11px] text-fg-2 hover:border-accent hover:text-fg-0 cursor-pointer svelte-gt9p7f" title="Fold this node's community into a single supernode"><!> </button>`),og=le('<span class="max-w-full truncate rounded border border-line-1 bg-bg-0 px-1.5 py-0.5 text-[11px] text-fg-1 svelte-gt9p7f"> </span>'),sg=le('<div class="flex flex-wrap gap-1 svelte-gt9p7f"></div>'),ag=le('<div class="text-fg-3 svelte-gt9p7f">No exports recorded.</div>'),ug=le('<button type="button" class="grid w-full grid-cols-[82px_1fr] gap-2 rounded border border-line-1 bg-bg-0 px-2 py-1.5 text-left hover:border-line-2 hover:bg-bg-2 svelte-gt9p7f"><span class="text-[10px] uppercase tracking-wider text-fg-3 svelte-gt9p7f"> </span> <span class="min-w-0 svelte-gt9p7f"><span class="block truncate text-fg-0 svelte-gt9p7f"> </span> <span class="block truncate text-[10px] text-fg-3 svelte-gt9p7f"> </span></span></button>'),cg=le('<div class="space-y-1 svelte-gt9p7f"></div>'),lg=le('<div class="text-fg-3 svelte-gt9p7f">No inbound uses.</div>'),dg=le('<button type="button" class="w-full rounded border border-line-1 bg-bg-0 px-2 py-1 text-left hover:border-line-2 hover:bg-bg-2 svelte-gt9p7f"><span class="block truncate text-[10px] text-fg-3 svelte-gt9p7f"> </span> <span class="block truncate text-fg-1 svelte-gt9p7f"> </span></button>'),fg=le('<div class="rounded border border-line-1 px-2 py-1 text-fg-3 svelte-gt9p7f">none</div>'),hg=le('<button type="button" class="w-full rounded border border-line-1 bg-bg-0 px-2 py-1 text-left hover:border-line-2 hover:bg-bg-2 svelte-gt9p7f"><span class="block truncate text-[10px] text-fg-3 svelte-gt9p7f"> </span> <span class="block truncate text-fg-1 svelte-gt9p7f"> </span></button>'),gg=le('<div class="rounded border border-line-1 px-2 py-1 text-fg-3 svelte-gt9p7f">none</div>'),pg=le('<div class="mb-3 svelte-gt9p7f"><div class="flex items-start gap-2 svelte-gt9p7f"><div class="min-w-0 flex-1 svelte-gt9p7f"><div class="text-fg-3 text-[10px] uppercase tracking-wider svelte-gt9p7f">label</div> <div class="break-words text-[13px] font-semibold text-fg-0 svelte-gt9p7f"> </div></div> <!></div> <div class="mt-1 break-all text-accent svelte-gt9p7f"> </div> <!></div> <div class="mb-3 border-t border-line-1 pt-3 svelte-gt9p7f"><div class="mb-1 text-fg-3 text-[10px] uppercase tracking-wider svelte-gt9p7f">description</div> <div class="whitespace-pre-wrap break-words text-fg-1 svelte-gt9p7f"> </div></div> <div class="mb-3 border-t border-line-1 pt-3 svelte-gt9p7f"><div class="mb-1.5 flex items-center justify-between gap-2 svelte-gt9p7f"><div class="text-fg-3 text-[10px] uppercase tracking-wider svelte-gt9p7f">exports</div> <span class="text-[10px] text-fg-3 svelte-gt9p7f"> </span></div> <!></div> <div class="mb-3 border-t border-line-1 pt-3 svelte-gt9p7f"><div class="mb-1.5 flex items-center justify-between gap-2 svelte-gt9p7f"><div class="text-fg-3 text-[10px] uppercase tracking-wider svelte-gt9p7f">where used</div> <span class="text-[10px] text-fg-3 svelte-gt9p7f"> </span></div> <!></div> <div class="mb-3 border-t border-line-1 pt-3 svelte-gt9p7f"><div class="mb-1.5 grid grid-cols-2 gap-2 svelte-gt9p7f"><div class="svelte-gt9p7f"><div class="text-fg-3 text-[10px] uppercase tracking-wider svelte-gt9p7f">parents</div> <div class="text-[10px] text-fg-3 svelte-gt9p7f">incoming direction</div></div> <div class="svelte-gt9p7f"><div class="text-fg-3 text-[10px] uppercase tracking-wider svelte-gt9p7f">children</div> <div class="text-[10px] text-fg-3 svelte-gt9p7f">outgoing direction</div></div></div> <div class="grid grid-cols-2 gap-2 svelte-gt9p7f"><div class="space-y-1 svelte-gt9p7f"><!></div> <div class="space-y-1 svelte-gt9p7f"><!></div></div></div>',1),vg=le('<code class="svelte-gt9p7f"> </code>'),yg=le('<code class="svelte-gt9p7f"> </code>'),mg=le('<div class="mb-2 svelte-gt9p7f"><div class="text-fg-3 text-[10px] uppercase tracking-wider svelte-gt9p7f">label</div> <div class="text-fg-0 font-semibold svelte-gt9p7f"> </div></div> <div class="mb-2 grid grid-cols-[60px_1fr] gap-x-2 gap-y-1 svelte-gt9p7f"><div class="text-fg-3 text-[10px] uppercase tracking-wider svelte-gt9p7f">from</div> <div class="text-fg-1 svelte-gt9p7f"><!></div> <div class="text-fg-3 text-[10px] uppercase tracking-wider svelte-gt9p7f">to</div> <div class="text-fg-1 svelte-gt9p7f"><!></div></div>',1),bg=le('<pre class="whitespace-pre-wrap text-[11px] svelte-gt9p7f"> </pre>'),wg=le('<dt class="text-fg-3 truncate svelte-gt9p7f"> </dt> <dd class="text-fg-1 break-words svelte-gt9p7f"><!></dd>',1),_g=le('<aside class="absolute top-0 right-0 bottom-0 w-[340px] bg-bg-1 border-l border-line-2 shadow-2xl flex flex-col z-20 svelte-gt9p7f"><header class="flex items-center gap-2 px-3 py-2 border-b border-line-1 text-[11px] font-mono svelte-gt9p7f"><!> <span class="type-label svelte-gt9p7f"> </span> <span class="ml-auto svelte-gt9p7f"></span> <button type="button" aria-label="Close panel" class="text-fg-3 hover:text-fg-1 cursor-pointer svelte-gt9p7f"><!></button></header> <div class="flex-1 overflow-auto p-3 text-[12px] font-mono svelte-gt9p7f"><!> <div class="mt-3 mb-1 text-fg-3 text-[10px] uppercase tracking-wider svelte-gt9p7f">properties</div> <dl class="grid grid-cols-[110px_1fr] gap-x-2 gap-y-1 svelte-gt9p7f"></dl></div></aside>'),xg=le('<button type="button"><span class="svelte-gt9p7f">●</span> <span class="svelte-gt9p7f"> </span> <span class="text-fg-3 svelte-gt9p7f"> </span></button>'),Eg=le('<span class="text-fg-3 svelte-gt9p7f">types:</span> <!>',1),kg=le('<span class="svelte-gt9p7f"><span class="text-fg-2 svelte-gt9p7f"> </span> <span class="text-fg-3 svelte-gt9p7f">·</span> </span>'),Sg=le('<div class="border-b border-line-1 px-3 py-1.5 flex items-center gap-2 text-[11px] font-mono bg-bg-1/40 svelte-gt9p7f"><div class="inline-flex border border-line-2 rounded overflow-hidden svelte-gt9p7f"><a><!> Canvas</a> <a><!> SVG</a> <a><!> Table</a></div> <!> <!> <!> <button type="button" title="Run a graph query (GRAPH NEIGHBORHOOD / SHORTEST_PATH / MATCH …)"><!> query</button> <!> <div class="ml-auto flex items-center gap-3 text-fg-3 svelte-gt9p7f"><span class="svelte-gt9p7f"> </span> <!> <!> <!></div></div> <!> <!> <div class="flex-1 min-h-0 relative svelte-gt9p7f"><!> <!></div> <div class="border-t border-line-1 px-3 py-1.5 text-[10px] font-mono text-fg-3 flex items-center gap-2 flex-wrap svelte-gt9p7f"><!> <span class="ml-auto svelte-gt9p7f"></span> <!></div>',1),$g=le('<div class="flex h-full flex-col text-fg-1 svelte-gt9p7f"><!></div>');function qg(r,e){Rs(e,!0);let t=we(null);const n=re(()=>c(t)??e.result),i=re(()=>Kf(c(n))),o=re(()=>Wf(c(i).nodes,c(i).edges)),s=re(()=>Bf(c(i).nodes,c(o))),a=re(()=>new Set(c(i).nodes.filter(_=>_a(_,c(o))).map(_=>_.id)));let u=we("canvas"),l=we(25e3),d=we(""),f=we(null),h=we(null),p=we(null),y=we(350),S=we(1),m=we(!1),v=we(!1),A=we(qt(new Set));const w=re(()=>c(f)?zf(c(f),c(i).nodes,c(i).edges,c(o)):null);Mt(()=>{e.subpage==="svg"&&c(u)!=="svg"?M(u,"svg"):e.subpage==="graph"&&c(u)!=="canvas"&&M(u,"canvas")});let g=we(null),$=we(null),E=we(!1),k=we(""),C=we(!1),D=we(null),L=we(""),q=we("");async function N(_){const P=Jl.client;if(!(!P||!_.trim())){M(C,!0),M(D,null);try{const B=await tr.track(`${e.collection??"graph"} · query (${_.slice(0,40).replace(/\s+/g," ")}…)`,()=>P.query(_));if(!B.ok){M(D,B.error??"query failed",!0);return}M(t,B,!0),M(f,null),M(h,null),Qe()}catch(B){M(D,B.message,!0)}finally{M(C,!1)}}}function b(){M(t,null),M(k,""),M(D,null),M(f,null),M(h,null),Qe()}function Ce(){c(f)&&(M(k,`GRAPH NEIGHBORHOOD '${c(f).label}' DEPTH 1`),M(E,!0),N(c(k)))}function Ge(){M(k,"GRAPH CENTRALITY LIMIT 50"),M(E,!0),N(c(k))}function R(_){c(f)&&(_==="from"?M(L,c(f).label,!0):M(q,c(f).label,!0),M(E,!0))}function x(){!c(L).trim()||!c(q).trim()||(M(k,`GRAPH SHORTEST_PATH '${c(L).trim()}' TO '${c(q).trim()}'`),M(E,!0),N(c(k)))}const K=re(()=>{const _=new Map;for(const P of c(i).nodes){const B=String(P.data.node_type??"node");_.set(B,(_.get(B)??0)+1)}return[..._.entries()].sort((P,B)=>B[1]-P[1])});let ee=we(qt(new Set));const ne=re(()=>{const _=c(d).trim().toLowerCase();return c(i).nodes.filter(P=>{const B=String(P.data.node_type??"node");return c(ee).has(B)?!1:_?P.label.toLowerCase().includes(_)||P.id.toLowerCase().includes(_):!0}).sort((P,B)=>jf(P,B,c(o)))}),De=re(()=>Math.min(c(ne).length,c(l))),ce=re(()=>c(ne).slice(0,Math.min(c(De),c(y)))),W=re(()=>new Set(c(ce).map(_=>_.id))),_e=re(()=>c(i).edges.filter(_=>c(W).has(_.source)&&c(W).has(_.target))),Ke=re(()=>c(ce).length<c(De)),Be=re(()=>c(ne).length>c(l));Mt(()=>{const _=c(De),P=c(u)==="canvas"?1e3:350,B=Math.min(_,P);if(M(y,B,!0),B>=_)return;let ke=!1,ze=0,pt=B;const et=()=>{ke||(pt=Math.min(_,pt+P),M(y,pt,!0),pt<_&&(ze=requestAnimationFrame(et)))};return ze=requestAnimationFrame(et),()=>{ke=!0,cancelAnimationFrame(ze)}});function Xe(_){const P=new Set(c(ee));P.has(_)?P.delete(_):P.add(_),M(ee,P,!0)}const ct=rh,Je=nh;let pe=we(void 0),V=null,ye=null,lt=we(1),Y=we(0),Z=0,G=we(0),St=we(qt([])),Ct=we(qt([]));function Lt(_,P){const B=V;return B?B.graphToViewport({x:_,y:-P}):null}function jt(){if(!c(m)||!V||c(u)!=="canvas"){c(St).length&&M(St,[],!0),c(Ct).length&&M(Ct,[],!0);return}const _=[];for(const B of c(un)){const ke=Lt(B.minX,B.minY),ze=Lt(B.maxX,B.maxY);!ke||!ze||_.push({...B,vx:Math.min(ke.x,ze.x),vy:Math.min(ke.y,ze.y),vw:Math.abs(ze.x-ke.x),vh:Math.abs(ze.y-ke.y)})}const P=[];for(const B of c(cn)){const ke=Lt(B.x1,B.y1),ze=Lt(B.x2,B.y2);!ke||!ze||P.push({id:B.id,vx1:ke.x,vy1:ke.y,vx2:ze.x,vy2:ze.y})}M(St,_,!0),M(Ct,P,!0)}function Et(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}mc(()=>{cancelAnimationFrame(Z),V&&(V.kill(),V=null)}),bc(()=>{const _=new MutationObserver(()=>{M(G,c(G)+1)});return _.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]}),()=>_.disconnect()});function wt(){M(f,null),M(h,null)}function Qe(){M(g,null),M($,null)}function Gt(_){return c(i).nodes.find(P=>P.id===_)??null}function Xt(_){const P=Gt(_.nodeId);P&&(Jt(P),nr(P))}function nr(_){M(h,null),M(f,_,!0)}function Jt(_){M($,_.id,!0),M(g,_.id,!0)}function ar(_){if(c($)){Qe(),wt();return}Jt(_),nr(_)}function $t(_){M(f,null),M(h,_,!0)}function ur(_){return["id","rid","label","name","title","description","summary","content","exports","orphan","is_orphan","isOrphan","dead_code","deadCode"].includes(_)}function Zt(_,P){_.key!=="Enter"&&_.key!==" "||(_.preventDefault(),P())}function Fi(_){return Math.max(.5,Math.min(8,_))}const Ca=re(()=>c(u)==="canvas"?Math.round(100/(c(lt)||1)):Math.round(c(S)*100));function Ki(_){if(c(u)==="canvas"){const B=V==null?void 0:V.getCamera();if(!B)return;_==="in"?B.animatedZoom(1.4):B.animatedUnzoom(1.4);return}const P=_==="in"?1.25:.8;M(S,Fi(c(S)*P),!0)}function La(){if(c(u)==="canvas"){V==null||V.getCamera().animatedReset();return}M(S,1)}function Da(_){_.preventDefault();const P=_.deltaY<0?1.25:.8;M(S,Fi(c(S)*P),!0)}const Hi=re(()=>{const _=new Map;for(const P of c(i).edges)P.label&&_.set(P.label,(_.get(P.label)??0)+1);return[..._.entries()].sort((P,B)=>B[1]-P[1]).slice(0,4)}),cr=re(()=>Vf(c(ce),c(_e))),Ia=re(()=>(c(G),typeof document>"u"?!0:document.documentElement.dataset.theme!=="light")),un=re(()=>c(m)?oh(c(ce),c(cr),{dark:c(Ia)}):[]),cn=re(()=>c(m)?sh(c(_e),c(cr),c(un)):[]),Ga=re(()=>new Set(c(cn).map(_=>_.id))),Ta=re(()=>c(v)&&c(_e).length>Ei);function Oa(_){return _>800?{cycles:4,iterations:45}:_>300?{cycles:5,iterations:55}:{}}const Gn=re(()=>{if(!c(v)||c(u)==="table"||c(_e).length===0||c(_e).length>Ei)return null;const _=c(ce).map(P=>{const B=c(cr).get(P.id);return{id:P.id,x:(B==null?void 0:B.x)??50,y:(B==null?void 0:B.y)??50}});return bh(_,c(_e).map(P=>({id:P.id,source:P.source,target:P.target})),Oa(c(_e).length))}),Tn=re(()=>{if(!c(Gn))return null;const _=new Map;for(const[P,B]of c(Gn))_.set(P,-_h(B));return _}),ln=re(()=>Eh(c(ce),c(_e),c(cr),c(A))),On=re(()=>c(ln).nodes),dn=re(()=>c(ln).edges),Rn=re(()=>c(ln).layout),Nn=re(()=>{const _=Aa(c(ce),c(cr));return new Map([..._].map(([P,B])=>[P,B.length]))}),Un=re(()=>[...c(Nn)].filter(([,_])=>_>=2).map(([_])=>_)),lr=re(()=>c(A).size>0);function Ra(_){const P=new Set(c(A));P.add(_),M(A,P,!0),Qe()}function Na(_){const P=new Set(c(A));P.delete(_),M(A,P,!0),Qe()}function Ua(){M(A,c(lr)?new Set:new Set(c(Un)),!0),Qe(),wt()}const Lr=re(()=>{var _;return c(f)?((_=c(cr).get(c(f).id))==null?void 0:_.community)??null:null});Mt(()=>{c(f)&&c(ln).collapsedMembers.has(c(f).id)&&wt()});const qi=re(()=>c(On).map(_=>{const P=String(_.data.node_type??"node"),B=c(s).get(_.id)??1,ke=c(Rn).get(_.id),ze=_.data.__supernode===!0,pt=typeof _.data.__memberCount=="number"?_.data.__memberCount:0,et=ke?ji(ke.community):An(P);return{..._,x:(ke==null?void 0:ke.x)??50,y:(ke==null?void 0:ke.y)??50,r:ze?ka(pt):xa(P,B),color:et}})),Pn=re(()=>new Map(c(qi).map(_=>[_.id,_]))),Mn=re(()=>{var P;const _=[];for(const B of c(dn)){const ke=c(Pn).get(B.source),ze=c(Pn).get(B.target);if(!ke||!ze)continue;const pt=(P=c(Gn))==null?void 0:P.get(B.id);let et,Nt=(ke.x+ze.x)/2,Tt=(ke.y+ze.y)/2;if(pt&&pt.length>2){et=pt.map(Ir=>`${Ir.x},${Ir.y}`).join(" ");const hn=pt[Math.floor(pt.length/2)];Nt=hn.x,Tt=hn.y}_.push({...B,x1:ke.x,y1:ke.y,x2:ze.x,y2:ze.y,points:et,mx:Nt,my:Tt})}return _}),Pe=re(()=>c($)??c(g)),fn=re(()=>{const _=new Set;if(!c(Pe))return _;for(const P of c(Mn))(P.source===c(Pe)||P.target===c(Pe))&&_.add(P.id);return _}),Qt=re(()=>{const _=new Set;if(!c(Pe))return _;_.add(c(Pe));for(const P of c(Mn))P.source===c(Pe)&&_.add(P.target),P.target===c(Pe)&&_.add(P.source);return _});Mt(()=>{const _=c(Pe);if(!_){M(Y,0);return}if(!c(Pn).has(_)){Qe();return}Pa()});function Pa(){if(cancelAnimationFrame(Z),Et()){M(Y,0);return}const _=performance.now();M(Y,1);const P=()=>{const B=Math.max(0,1-(performance.now()-_)/170);M(Y,B,!0),B>0&&(Z=requestAnimationFrame(P))};Z=requestAnimationFrame(P)}const Ma=re(()=>`translate(50 50) scale(${c(S)}) translate(-50 -50)`);function Dr(_,P){return getComputedStyle(document.documentElement).getPropertyValue(_).trim()||P}function Vi(){const _=document.documentElement.dataset.theme!=="light";return{background:Dr("--color-bg-0",_?"#050607":"#ffffff"),edge:Dr("--color-line-3",_?"#3a424d":"#c9cbd1"),focusEdge:ct,focusNodeStroke:Je,selectedNodeStroke:_?"#0a0a0b":"#18181b",nodeStroke:_?"#ffffff":"#27272a",warn:Dr("--color-warn",_?"#fbbf24":"#b45309")}}function Yi(){var _;return{focusId:c(Pe),focus:{nodes:c(Qt),edges:c(fn)},selectedNodeId:((_=c(f))==null?void 0:_.id)??null,pulse:c(Y),colors:Vi(),groupInBox:c(m),bundle:c(v)&&c(Tn)!==null}}function Xi(){return ih({nodes:c(On),edges:c(dn),layout:c(Rn),sizeScales:c(s),orphanIds:c(a),dark:document.documentElement.dataset.theme!=="light",edgeColor:Vi().edge,bundledCurvatures:c(Tn)??void 0})}function za(_){return c(dn).find(P=>P.id===_)??null}function zn(_){if($a(_)){const B=xh(_);B!==null&&Na(B);return}const P=Gt(_);P&&ar(P)}function Wa(_){_.on("clickNode",({node:B})=>{zn(B)}),_.on("enterNode",({node:B})=>{c($)||M(g,B,!0),c(pe)&&(c(pe).style.cursor="pointer")}),_.on("leaveNode",()=>{c($)||M(g,null),c(pe)&&(c(pe).style.cursor="")}),_.on("clickEdge",({edge:B})=>{const ke=za(B);ke&&(Qe(),$t(ke))}),_.on("clickStage",()=>{Qe(),wt()});const P=_.getCamera();P.on("updated",()=>{M(lt,P.ratio,!0)}),_.on("afterRender",()=>jt())}Mt(()=>{if(c(u)!=="canvas")return;const _=c(pe);if(!_)return;let P=!1,B=null;return(async()=>{try{if(!ye){const[et,Nt,Tt]=await Promise.all([jr(()=>import("./C278awGv.js"),__vite__mapDeps([0,1]),import.meta.url),jr(()=>import("./CXNPJgv1.js"),__vite__mapDeps([2,1]),import.meta.url),jr(()=>import("./CDKIdLnm.js"),__vite__mapDeps([3,1]),import.meta.url)]);ye={Sigma:et.default,NodeBorderProgram:Nt.NodeBorderProgram,EdgeCurveProgram:Tt.default}}if(P||!c(pe))return;const{Sigma:ke,NodeBorderProgram:ze,EdgeCurveProgram:pt}=ye;B=new ke(Xi(),_,{allowInvalidContainer:!0,defaultNodeType:"border",nodeProgramClasses:{border:ze},edgeProgramClasses:{curved:pt},defaultEdgeType:"line",renderEdgeLabels:!0,labelFont:'"JetBrains Mono Variable", monospace',edgeLabelFont:'"JetBrains Mono Variable", monospace',labelSize:12,edgeLabelSize:10,labelWeight:"700",labelColor:{color:Dr("--color-fg-0","#ffffff")},edgeLabelColor:{color:"#f6d36b"},labelRenderedSizeThreshold:1/0,zIndex:!0,nodeReducer:(et,Nt)=>lh(et,Nt,Yi()),edgeReducer:(et,Nt)=>dh(et,Nt,Yi())}),Wa(B),V=B,M(lt,B.getCamera().ratio,!0),M(p,null)}catch(ke){M(p,ke.message,!0)}})(),()=>{P=!0,B&&B.kill(),V===B&&(V=null)}}),Mt(()=>{c(On),c(dn),c(Rn),c(s),c(a),c(G),c(Tn),c(v);const _=V;!_||c(u)!=="canvas"||(_.setSetting("labelColor",{color:Dr("--color-fg-0","#ffffff")}),_.setGraph(Xi()),_.refresh())}),Mt(()=>{c(Pe),c(Qt),c(fn),c(f),c(Y);const _=V;!_||c(u)!=="canvas"||_.refresh({skipIndexation:!0})}),Mt(()=>{c(m),c(un),c(cn);const _=V;!_||c(u)!=="canvas"||(_.refresh({skipIndexation:!0}),jt())});function ja(_){c($)||M(g,_.id,!0)}function Ba(_){!c($)&&c(g)===_.id&&M(g,null)}function Wn(_){return c(Pe)?c(Pe)===_.id?_.r*2.24:c(Qt).has(_.id)?_.r*1.6:_.r*.92:_.r*1.14}function Fa(_){return c(Pe)?c(Qt).has(_.id)?1:.12:1}function Ka(_){return _.data.__supernode===!0?!0:c(Pe)?c(Pe)===_.id?!0:c(Qt).size<=36&&c(Qt).has(_.id):!1}function Ha(_){return!!(c(Pe)&&c(fn).has(_.id)&&_.label)}var jn=$g(),qa=T(jn);{var Va=_=>{var P=kh();z(_,P)},Ya=_=>{var P=Sg(),B=Ie(P),ke=T(B),ze=T(ke),pt=T(ze);Wo(pt,{class:"size-3"}),Ut(),I(ze);var et=U(ze,2),Nt=T(et);Wo(Nt,{class:"size-3"}),Ut(),I(et);var Tt=U(et,2),hn=T(Tt);cd(hn,{class:"size-3"}),Ut(),I(Tt),I(ke);var Ir=U(ke,2);{var Xa=X=>{var Q=$h(),te=Ie(Q),Se=T(te);ad(Se,{class:"size-3 text-fg-3"});var me=U(Se,2);En(me);var Te=U(me,2);{var be=je=>{var Ze=Sh(),At=T(Ze);Bo(At,{class:"size-3"}),I(Ze),$e("click",Ze,()=>M(d,"")),z(je,Ze)};ve(Te,je=>{c(d)&&je(be)})}I(te);var Le=U(te,2),he=T(Le);nd(he,{class:"size-3"});var O=U(he,4),ie=T(O);ie.value=ie.__value=500;var J=U(ie);J.value=J.__value=1e3;var xe=U(J);xe.value=xe.__value=2e3;var oe=U(xe);oe.value=oe.__value=5e3;var de=U(oe);de.value=de.__value=1e4;var ae=U(de);ae.value=ae.__value=25e3;var Oe=U(ae);Oe.value=Oe.__value=5e4,I(O);var He;Di(O),I(Le),fe(()=>{He!==(He=c(l))&&(O.value=(O.__value=c(l))??"",Kr(O,c(l)))}),gn(me,()=>c(d),je=>M(d,je)),$e("change",O,je=>M(l,Number(je.currentTarget.value),!0)),z(X,Q)};ve(Ir,X=>{c(u)!=="table"&&X(Xa)})}var Ji=U(Ir,2);{var Ja=X=>{var Q=Ah(),te=T(Q),Se=T(te);dd(Se,{class:"size-3.5"}),I(te);var me=U(te,2),Te=T(me);I(me);var be=U(me,2),Le=T(be);ld(Le,{class:"size-3.5"}),I(be),I(Q),fe(()=>{te.disabled=c(u)==="svg"&&c(S)<=.5,ue(Te,`${c(Ca)??""}%`),be.disabled=c(u)==="svg"&&c(S)>=8}),$e("click",te,()=>Ki("out")),$e("click",me,La),$e("click",be,()=>Ki("in")),z(X,Q)};ve(Ji,X=>{c(u)!=="table"&&X(Ja)})}var Zi=U(Ji,2);{var Za=X=>{var Q=Dh(),te=Ie(Q),Se=T(te);zo(Se,{class:"size-3"}),Ut(),I(te);var me=U(te,2),Te=T(me);ud(Te,{class:"size-3"}),Ut(),I(me);var be=U(me,2);{var Le=ie=>{var J=Ch(),xe=T(J);I(J),fe((oe,de)=>{F(J,"title",oe),ue(xe,`bundling skipped (${de??""} edges)`)},[()=>`Bundling is skipped above ${Ei.toLocaleString()} drawn edges — narrow the filter or lower the limit`,()=>c(_e).length.toLocaleString()]),z(ie,J)};ve(be,ie=>{c(Ta)&&ie(Le)})}var he=U(be,2);{var O=ie=>{var J=Lh(),xe=T(J);{var oe=Oe=>{zo(Oe,{class:"size-3"})},de=Oe=>{Mo(Oe,{class:"size-3"})};ve(xe,Oe=>{c(lr)?Oe(oe):Oe(de,-1)})}var ae=U(xe);I(J),fe(Oe=>{Rt(J,1,Oe,"svelte-gt9p7f"),F(J,"aria-pressed",c(lr)),F(J,"title",c(lr)?"Expand all collapsed clusters back to their members":"Collapse each community into a single supernode"),ue(ae,` ${c(lr)?`expand (${c(A).size})`:`collapse ${c(Un).length} clusters`}`)},[()=>Pt(["inline-flex items-center gap-1 h-6 px-2 rounded border cursor-pointer transition-colors",c(lr)?"border-accent/40 bg-accent/10 text-accent":"border-line-1 text-fg-3 hover:text-fg-1 hover:border-line-2"].join(" "))]),$e("click",J,Ua),z(ie,J)};ve(he,ie=>{c(Un).length>0&&ie(O)})}fe((ie,J)=>{Rt(te,1,ie,"svelte-gt9p7f"),F(te,"aria-pressed",c(m)),Rt(me,1,J,"svelte-gt9p7f"),F(me,"aria-pressed",c(v))},[()=>Pt(["inline-flex items-center gap-1 h-6 px-2 rounded border cursor-pointer transition-colors",c(m)?"border-accent/40 bg-accent/10 text-accent":"border-line-1 text-fg-3 hover:text-fg-1 hover:border-line-2"].join(" ")),()=>Pt(["inline-flex items-center gap-1 h-6 px-2 rounded border cursor-pointer transition-colors",c(v)?"border-accent/40 bg-accent/10 text-accent":"border-line-1 text-fg-3 hover:text-fg-1 hover:border-line-2"].join(" "))]),$e("click",te,()=>M(m,!c(m))),$e("click",me,()=>M(v,!c(v))),z(X,Q)};ve(Zi,X=>{c(u)!=="table"&&X(Za)})}var dr=U(Zi,2),Qa=T(dr);ed(Qa,{class:"size-3"}),Ut(),I(dr);var Qi=U(dr,2);{var eu=X=>{var Q=Ih(),te=T(Q);od(te,{class:"size-3"}),Ut(),I(Q),$e("click",Q,b),z(X,Q)};ve(Qi,X=>{c(t)&&X(eu)})}var eo=U(Qi,2),Bn=T(eo),tu=T(Bn);I(Bn);var to=U(Bn,2);{var ru=X=>{var Q=Gh(),te=T(Q);I(Q),fe((Se,me)=>ue(te,`rendering ${Se??""} / ${me??""}`),[()=>c(ce).length.toLocaleString(),()=>c(De).toLocaleString()]),z(X,Q)};ve(to,X=>{c(u)!=="table"&&c(Ke)&&X(ru)})}var ro=U(to,2);{var nu=X=>{var Q=Th(),te=T(Q);I(Q),fe(Se=>ue(te,`drawing ${Se??""}`),[()=>c(ce).length.toLocaleString()]),z(X,Q)};ve(ro,X=>{c(u)!=="table"&&c(Be)&&X(nu)})}var iu=U(ro,2);{var ou=X=>{var Q=Oh(),te=T(Q,!0);I(Q),fe(()=>ue(te,e.collection)),z(X,Q)};ve(iu,X=>{e.collection&&X(ou)})}I(eo),I(B);var no=U(B,2);{var su=X=>{var Q=Nh(),te=T(Q),Se=U(T(te),2),me=U(Se,2),Te=U(me,2),be=T(Te);sd(be,{class:"size-3"}),Ut(),I(Te),I(te);var Le=U(te,2),he=T(Le);En(he);var O=U(he,2);En(O);var ie=U(O,2),J=U(ie,2);I(Le);var xe=U(Le,2),oe=T(xe);wc(oe);var de=U(oe,2),ae=T(de),Oe=T(ae);{var He=Ue=>{rd(Ue,{class:"size-3 animate-spin"})},je=Ue=>{id(Ue,{class:"size-3"})};ve(Oe,Ue=>{c(C)?Ue(He):Ue(je,-1)})}Ut(2),I(ae),I(de),I(xe);var Ze=U(xe,2);{var At=Ue=>{var Re=Rh(),Ee=T(Re,!0);I(Re),fe(()=>ue(Ee,c(D))),z(Ue,Re)};ve(Ze,Ue=>{c(D)&&Ue(At)})}I(Q),fe((Ue,Re)=>{Se.disabled=!c(f),F(Se,"title",c(f)?`neighborhood of ${c(f).label}`:"select a node first"),Te.disabled=Ue,ie.disabled=!c(f),F(ie,"title",c(f)?`Use ${c(f).label} as source`:"select a node first"),J.disabled=!c(f),F(J,"title",c(f)?`Use ${c(f).label} as target`:"select a node first"),F(oe,"placeholder",e.collection?`GRAPH NEIGHBORHOOD '<label>' DEPTH 2
|
|
366
|
-
GRAPH SHORTEST_PATH '<from>' TO '<to>'
|
|
367
|
-
MATCH (n)-[r]->(m) RETURN n, r, m LIMIT 100`:"GRAPH NEIGHBORHOOD … / GRAPH SHORTEST_PATH … / MATCH …"),ae.disabled=Re},[()=>!c(L).trim()||!c(q).trim(),()=>c(C)||!c(k).trim()]),$e("click",Se,Ce),$e("click",me,Ge),$e("click",Te,x),gn(he,()=>c(L),Ue=>M(L,Ue)),gn(O,()=>c(q),Ue=>M(q,Ue)),$e("click",ie,()=>R("from")),$e("click",J,()=>R("to")),$e("keydown",oe,Ue=>{Ue.key==="Enter"&&(Ue.metaKey||Ue.ctrlKey)&&(Ue.preventDefault(),N(c(k)))}),gn(oe,()=>c(k),Ue=>M(k,Ue)),$e("click",ae,()=>N(c(k))),z(X,Q)};ve(no,X=>{c(E)&&X(su)})}var io=U(no,2);{var au=X=>{var Q=Uh(),te=T(Q);jo(te,{class:"mt-0.5 size-3.5 shrink-0"});var Se=U(te,2),me=U(T(Se),2),Te=T(me,!0);I(me),I(Se),I(Q),fe(()=>ue(Te,c(p))),z(X,Q)};ve(io,X=>{c(p)&&X(au)})}var Fn=U(io,2),oo=T(Fn);{var uu=X=>{var Q=Wh(),te=Ie(Q);Ac(te,Te=>M(pe,Te),()=>c(pe));var Se=U(te,2);{var me=Te=>{var be=zh(),Le=T(be);mt(Le,17,()=>c(St),O=>O.community,(O,ie)=>{var J=Ph();fe(()=>{F(J,"x",c(ie).vx),F(J,"y",c(ie).vy),F(J,"width",c(ie).vw),F(J,"height",c(ie).vh),F(J,"fill",c(ie).fill),F(J,"stroke",c(ie).stroke)}),z(O,J)});var he=U(Le);mt(he,17,()=>c(Ct),O=>O.id,(O,ie)=>{var J=Mh();fe(()=>{F(J,"x1",c(ie).vx1),F(J,"y1",c(ie).vy1),F(J,"x2",c(ie).vx2),F(J,"y2",c(ie).vy2)}),z(O,J)}),I(be),z(Te,be)};ve(Se,Te=>{c(m)&&(c(St).length>0||c(Ct).length>0)&&Te(me)})}fe(()=>F(te,"aria-label",`${c(ce).length} graph nodes and ${c(_e).length} graph edges`)),$e("keydown",te,Te=>{Te.key==="Escape"&&(Qe(),wt())}),z(X,Q)},cu=X=>{var Q=Zh(),te=T(Q),Se=U(T(te)),me=T(Se);{var Te=he=>{var O=Fh(),ie=T(O);mt(ie,17,()=>c(un),xe=>xe.community,(xe,oe)=>{var de=jh();fe(()=>{F(de,"x",c(oe).minX),F(de,"y",c(oe).minY),F(de,"width",c(oe).maxX-c(oe).minX),F(de,"height",c(oe).maxY-c(oe).minY),F(de,"fill",c(oe).fill),F(de,"stroke",c(oe).stroke)}),z(xe,de)});var J=U(ie);mt(J,17,()=>c(cn),xe=>xe.id,(xe,oe)=>{var de=Bh();fe(()=>{F(de,"x1",c(oe).x1),F(de,"y1",c(oe).y1),F(de,"x2",c(oe).x2),F(de,"y2",c(oe).y2)}),z(xe,de)}),I(O),z(he,O)};ve(me,he=>{c(m)&&he(Te)})}var be=U(me);mt(be,21,()=>c(Mn),he=>he.id,(he,O)=>{var ie=Ve(),J=Ie(ie);{var xe=de=>{const ae=re(()=>c(fn).has(c(O).id));var Oe=Vh(),He=Ie(Oe);{var je=Ee=>{var ge=Kh(),tt=T(ge),dt=T(tt);I(tt),I(ge),fe(()=>{F(ge,"points",c(O).points),F(ge,"stroke",c(Pe)&&c(ae)?ct:"currentColor"),F(ge,"stroke-width",c(Pe)?c(ae)?"0.27":"0.055":"0.105"),F(ge,"opacity",c(Pe)?c(ae)?"0.98":"0.07":"0.4"),F(ge,"aria-label",`${c(O).label??"edge"} from ${c(O).source} to ${c(O).target}`),ue(dt,`${c(O).label??"edge"??""}: ${c(O).source??""} -> ${c(O).target??""}`)}),$e("click",ge,_t=>{_t.stopPropagation(),Qe(),$t(c(O))}),$e("keydown",ge,_t=>Zt(_t,()=>{Qe(),$t(c(O))})),z(Ee,ge)},Ze=Ee=>{var ge=Hh(),tt=T(ge),dt=T(tt);I(tt),I(ge),fe(()=>{F(ge,"x1",c(O).x1),F(ge,"y1",c(O).y1),F(ge,"x2",c(O).x2),F(ge,"y2",c(O).y2),F(ge,"stroke",c(Pe)&&c(ae)?ct:"currentColor"),F(ge,"stroke-width",c(Pe)?c(ae)?"0.27":"0.055":"0.105"),F(ge,"opacity",c(Pe)?c(ae)?"0.98":"0.055":"0.36"),F(ge,"aria-label",`${c(O).label??"edge"} from ${c(O).source} to ${c(O).target}`),ue(dt,`${c(O).label??"edge"??""}: ${c(O).source??""} -> ${c(O).target??""}`)}),$e("click",ge,_t=>{_t.stopPropagation(),Qe(),$t(c(O))}),$e("keydown",ge,_t=>Zt(_t,()=>{Qe(),$t(c(O))})),z(Ee,ge)};ve(He,Ee=>{c(O).points?Ee(je):Ee(Ze,-1)})}var At=U(He);{var Ue=Ee=>{var ge=qh(),tt=T(ge,!0);I(ge),fe(dt=>{F(ge,"x",c(O).mx+.45),F(ge,"y",c(O).my-.45),ue(tt,dt)},[()=>{var dt;return(dt=c(O).label)==null?void 0:dt.slice(0,28)}]),z(Ee,ge)},Re=re(()=>Ha(c(O)));ve(At,Ee=>{c(Re)&&Ee(Ue)})}z(de,Oe)},oe=re(()=>!(c(m)&&c(Ga).has(c(O).id)));ve(J,de=>{c(oe)&&de(xe)})}z(he,ie)}),I(be);var Le=U(be);mt(Le,21,()=>c(qi),he=>he.id,(he,O)=>{const ie=re(()=>c(a).has(c(O).id)),J=re(()=>c(O).data.__supernode===!0);var xe=Jh(),oe=Ie(xe);{var de=Re=>{var Ee=Yh();fe((ge,tt)=>{F(Ee,"cx",c(O).x),F(Ee,"cy",c(O).y),F(Ee,"r",ge),F(Ee,"stroke-width",c(Pe)===c(O).id?"0.38":"0.24"),F(Ee,"opacity",tt)},[()=>Wn(c(O))+.65,()=>c(Pe)&&!c(Qt).has(c(O).id)?"0.16":"0.72"]),z(Re,Ee)};ve(oe,Re=>{c(ie)&&Re(de)})}var ae=U(oe);let Oe;var He=T(ae),je=T(He,!0);I(He),I(ae);var Ze=U(ae);{var At=Re=>{var Ee=Xh(),ge=T(Ee,!0);I(Ee),fe((tt,dt)=>{F(Ee,"x",tt),F(Ee,"y",c(O).y+.15),F(Ee,"fill",c(Pe)===c(O).id?"#f8fafc":"#cbd5e1"),F(Ee,"opacity",c(Pe)===c(O).id?"1":"0.9"),F(Ee,"font-size",c(Pe)===c(O).id?"1.35":"1.15"),F(Ee,"font-weight",c(Pe)===c(O).id?"700":"600"),F(Ee,"stroke-width",c(Pe)===c(O).id?"0.48":"0.38"),ue(ge,dt)},[()=>c(O).x+Wn(c(O))+.85,()=>c(O).label.slice(0,36)]),z(Re,Ee)},Ue=re(()=>Ka(c(O)));ve(Ze,Re=>{c(Ue)&&Re(At)})}fe((Re,Ee,ge)=>{var tt;F(ae,"cx",c(O).x),F(ae,"cy",c(O).y),F(ae,"r",Re),F(ae,"fill",c(O).color),F(ae,"opacity",Ee),F(ae,"stroke",c(Pe)===c(O).id?Je:c(J)?"#e2e8f0":((tt=c(f))==null?void 0:tt.id)===c(O).id?"#0a0a0b":c(ie)?"var(--color-warn)":"#ffffff"),F(ae,"stroke-width",ge),Oe=Rt(ae,0,"cursor-pointer graph-node svelte-gt9p7f",null,Oe,{"focus-primary":c(Pe)===c(O).id}),F(ae,"aria-label",c(J)?`${c(O).label} — click to expand`:c(O).label),ue(je,c(J)?`${c(O).label} — click to expand`:c(O).label)},[()=>Wn(c(O)),()=>Fa(c(O)),()=>{var Re;return c(Pe)===c(O).id?"0.55":c(J)?"0.5":c(Qt).has(c(O).id)?"0.22":((Re=c(f))==null?void 0:Re.id)===c(O).id||c(ie)?"0.4":"0.14"}]),Xn("pointerenter",ae,()=>ja(c(O))),Xn("pointerleave",ae,()=>Ba(c(O))),$e("click",ae,Re=>{Re.stopPropagation(),zn(c(O).id)}),$e("keydown",ae,Re=>Zt(Re,()=>zn(c(O).id))),z(he,xe)}),I(Le),I(Se),I(te),I(Q),fe(()=>{F(te,"aria-label",`${c(ce).length} graph nodes and ${c(_e).length} graph edges`),F(Se,"transform",c(Ma))}),Xn("wheel",te,Da),$e("click",te,()=>{Qe(),wt()}),$e("keydown",te,he=>{he.key==="Escape"&&(Qe(),wt())}),z(X,Q)},lu=X=>{var Q=rg(),te=T(Q),Se=U(T(te)),me=T(Se);mt(me,17,()=>c(i).nodes,be=>be.id,(be,Le)=>{const he=re(()=>c(a).has(c(Le).id));var O=eg(),ie=U(T(O)),J=T(ie,!0);I(ie);var xe=U(ie),oe=T(xe,!0);I(xe);var de=U(xe),ae=T(de),Oe=U(ae);{var He=je=>{var Ze=Qh();z(je,Ze)};ve(Oe,je=>{c(he)&&je(He)})}I(de),I(O),fe((je,Ze)=>{Rt(O,1,je,"svelte-gt9p7f"),ue(J,c(Le).id),ue(oe,c(Le).label),ue(ae,`${Ze??""} `)},[()=>Pt(["border-b border-line-1/60 hover:bg-bg-1/40 cursor-pointer",c(he)?"bg-warn/10":""].join(" ")),()=>String(c(Le).data.node_type??"")]),$e("click",O,()=>{M(h,null),M(f,c(Le),!0)}),z(be,O)});var Te=U(me);mt(Te,17,()=>c(i).edges,be=>be.id,(be,Le)=>{var he=tg(),O=U(T(he)),ie=T(O,!0);I(O);var J=U(O),xe=T(J,!0);I(J);var oe=U(J),de=T(oe);I(oe),I(he),fe(()=>{ue(ie,c(Le).id),ue(xe,c(Le).label??""),ue(de,`${c(Le).source??""} → ${c(Le).target??""}`)}),$e("click",he,()=>{M(f,null),M(h,c(Le),!0)}),z(be,he)}),I(Se),I(te),I(Q),z(X,Q)};ve(oo,X=>{c(u)==="canvas"?X(uu):c(u)==="svg"?X(cu,1):X(lu,-1)})}var du=U(oo,2);{var fu=X=>{var Q=_g(),te=T(Q),Se=T(te);td(Se,{class:"size-3.5 text-accent"});var me=U(Se,2),Te=T(me,!0);I(me);var be=U(me,4),Le=T(be);Bo(Le,{class:"size-3.5"}),I(be),I(te);var he=U(te,2),O=T(he);{var ie=oe=>{var de=pg(),ae=Ie(de),Oe=T(ae),He=T(Oe),je=U(T(He),2),Ze=T(je,!0);I(je),I(He);var At=U(He,2);{var Ue=Ae=>{var Me=ng(),vt=T(Me);jo(vt,{class:"size-3"}),Ut(),I(Me),z(Ae,Me)};ve(At,Ae=>{c(w).orphan&&Ae(Ue)})}I(Oe);var Re=U(Oe,2),Ee=T(Re,!0);I(Re);var ge=U(Re,2);{var tt=Ae=>{var Me=ig(),vt=T(Me);Mo(vt,{class:"size-3"});var ht=U(vt);I(Me),fe(st=>ue(ht,` collapse cluster ${c(Lr)??""} · ${st??""} nodes`),[()=>c(Nn).get(c(Lr))]),$e("click",Me,()=>Ra(c(Lr))),z(Ae,Me)},dt=re(()=>c(Lr)!==null&&(c(Nn).get(c(Lr))??0)>=2);ve(ge,Ae=>{c(dt)&&Ae(tt)})}I(ae);var _t=U(ae,2),fr=U(T(_t),2),ft=T(fr,!0);I(fr),I(_t);var Ye=U(_t,2),ot=T(Ye),hr=U(T(ot),2),Kn=T(hr,!0);I(hr),I(ot);var vu=U(ot,2);{var yu=Ae=>{var Me=sg();mt(Me,21,()=>c(w).exports,xn,(vt,ht)=>{var st=og(),xt=T(st,!0);I(st),fe(()=>ue(xt,c(ht))),z(vt,st)}),I(Me),z(Ae,Me)},mu=Ae=>{var Me=ag();z(Ae,Me)};ve(vu,Ae=>{c(w).exports.length>0?Ae(yu):Ae(mu,-1)})}I(Ye);var Hn=U(Ye,2),qn=T(Hn),uo=U(T(qn),2),bu=T(uo);I(uo),I(qn);var wu=U(qn,2);{var _u=Ae=>{var Me=cg();mt(Me,21,()=>c(w).whereUsed,vt=>vt.id,(vt,ht)=>{var st=ug(),xt=T(st),Bt=T(xt,!0);I(xt);var gr=U(xt,2),Ft=T(gr),Gr=T(Ft,!0);I(Ft);var ho=U(Ft,2),Lu=T(ho,!0);I(ho),I(gr),I(st),fe(()=>{ue(Bt,c(ht).label),ue(Gr,c(ht).nodeLabel),ue(Lu,c(ht).edgeLabel??c(ht).kind)}),$e("click",st,()=>Xt(c(ht))),z(vt,st)}),I(Me),z(Ae,Me)},xu=Ae=>{var Me=lg();z(Ae,Me)};ve(wu,Ae=>{c(w).whereUsed.length>0?Ae(_u):Ae(xu,-1)})}I(Hn);var co=U(Hn,2),lo=U(T(co),2),Vn=T(lo),Eu=T(Vn);{var ku=Ae=>{var Me=Ve(),vt=Ie(Me);mt(vt,17,()=>c(w).incoming,ht=>ht.id,(ht,st)=>{var xt=dg(),Bt=T(xt),gr=T(Bt,!0);I(Bt);var Ft=U(Bt,2),Gr=T(Ft,!0);I(Ft),I(xt),fe(()=>{ue(gr,c(st).label),ue(Gr,c(st).nodeLabel)}),$e("click",xt,()=>Xt(c(st))),z(ht,xt)}),z(Ae,Me)},Su=Ae=>{var Me=fg();z(Ae,Me)};ve(Eu,Ae=>{c(w).incoming.length>0?Ae(ku):Ae(Su,-1)})}I(Vn);var fo=U(Vn,2),$u=T(fo);{var Au=Ae=>{var Me=Ve(),vt=Ie(Me);mt(vt,17,()=>c(w).outgoing,ht=>ht.id,(ht,st)=>{var xt=hg(),Bt=T(xt),gr=T(Bt,!0);I(Bt);var Ft=U(Bt,2),Gr=T(Ft,!0);I(Ft),I(xt),fe(()=>{ue(gr,c(st).label),ue(Gr,c(st).nodeLabel)}),$e("click",xt,()=>Xt(c(st))),z(ht,xt)}),z(Ae,Me)},Cu=Ae=>{var Me=gg();z(Ae,Me)};ve($u,Ae=>{c(w).outgoing.length>0?Ae(Au):Ae(Cu,-1)})}I(fo),I(lo),I(co),fe((Ae,Me,vt)=>{ue(Ze,c(f).label),ue(Ee,Ae),ue(ft,c(w).description??"No description in graph contract."),ue(Kn,Me),ue(bu,`${vt??""} inbound`)},[()=>String(c(f).data.rid??c(f).id),()=>c(w).exports.length.toLocaleString(),()=>c(w).whereUsed.length.toLocaleString()]),z(oe,de)},J=oe=>{var de=mg(),ae=Ie(de),Oe=U(T(ae),2),He=T(Oe,!0);I(Oe),I(ae);var je=U(ae,2),Ze=U(T(je),2),At=T(Ze);{var Ue=ft=>{var Ye=Jn();fe(ot=>ue(Ye,ot),[()=>Gt(c(h).source).label]),z(ft,Ye)},Re=re(()=>Gt(c(h).source)),Ee=ft=>{var Ye=vg(),ot=T(Ye,!0);I(Ye),fe(()=>ue(ot,c(h).source)),z(ft,Ye)};ve(At,ft=>{c(Re)?ft(Ue):ft(Ee,-1)})}I(Ze);var ge=U(Ze,4),tt=T(ge);{var dt=ft=>{var Ye=Jn();fe(ot=>ue(Ye,ot),[()=>Gt(c(h).target).label]),z(ft,Ye)},_t=re(()=>Gt(c(h).target)),fr=ft=>{var Ye=yg(),ot=T(Ye,!0);I(Ye),fe(()=>ue(ot,c(h).target)),z(ft,Ye)};ve(tt,ft=>{c(_t)?ft(dt):ft(fr,-1)})}I(ge),I(je),fe(()=>ue(He,c(h).label??"(unlabelled)")),z(oe,de)};ve(O,oe=>{c(f)&&c(w)?oe(ie):c(h)&&oe(J,1)})}var xe=U(O,4);mt(xe,21,()=>{var oe;return Object.entries((c(f)?c(f).data:(oe=c(h))==null?void 0:oe.data)??{})},xn,(oe,de)=>{var ae=re(()=>_n(c(de),2));let Oe=()=>c(ae)[0],He=()=>c(ae)[1];var je=Ve(),Ze=Ie(je);{var At=Re=>{var Ee=wg(),ge=Ie(Ee),tt=T(ge,!0);I(ge);var dt=U(ge,2),_t=T(dt);{var fr=Ye=>{var ot=bg(),hr=T(ot,!0);I(ot),fe(Kn=>ue(hr,Kn),[()=>JSON.stringify(He(),null,2)]),z(Ye,ot)},ft=Ye=>{var ot=Jn();fe(hr=>ue(ot,hr),[()=>String(He())]),z(Ye,ot)};ve(_t,Ye=>{typeof He()=="object"?Ye(fr):Ye(ft,-1)})}I(dt),fe(()=>ue(tt,Oe())),z(Re,Ee)},Ue=re(()=>He()!==null&&He()!==void 0&&!(c(f)&&ur(Oe()))&&!(c(h)&&Oe()==="label"));ve(Ze,Re=>{c(Ue)&&Re(At)})}z(oe,je)}),I(xe),I(he),I(Q),fe(()=>ue(Te,c(f)?"Node":"Edge")),$e("click",be,()=>{Qe(),wt()}),z(X,Q)};ve(du,X=>{(c(f)||c(h))&&X(fu)})}I(Fn);var so=U(Fn,2),ao=T(so);{var hu=X=>{var Q=Eg(),te=U(Ie(Q),2);mt(te,17,()=>c(K),([Se,me])=>Se,(Se,me)=>{var Te=re(()=>_n(c(me),2));let be=()=>c(Te)[0],Le=()=>c(Te)[1];const he=re(()=>c(ee).has(be()));var O=xg(),ie=T(O);let J;var xe=U(ie,2),oe=T(xe,!0);I(xe);var de=U(xe,2),ae=T(de,!0);I(de),I(O),fe((Oe,He,je)=>{F(O,"title",c(he)?`Show ${be()}`:`Hide ${be()}`),Rt(O,1,Oe,"svelte-gt9p7f"),J=zs(ie,"",J,He),ue(oe,be()),ue(ae,je)},[()=>Pt(["inline-flex items-center gap-1 px-1.5 py-0.5 rounded border transition-colors cursor-pointer",c(he)?"border-line-1 text-fg-3 line-through opacity-60":"border-line-2 text-fg-1 hover:border-accent"].join(" ")),()=>({color:c(he)?void 0:An(be())}),()=>Le().toLocaleString()]),$e("click",O,()=>Xe(be())),z(Se,O)}),z(X,Q)};ve(ao,X=>{c(K).length>1&&X(hu)})}var gu=U(ao,4);{var pu=X=>{var Q=Ve(),te=Ie(Q);mt(te,17,()=>c(Hi),xn,(Se,me)=>{var Te=re(()=>_n(c(me),2));let be=()=>c(Te)[0],Le=()=>c(Te)[1];var he=kg(),O=T(he),ie=T(O,!0);I(O);var J=U(O,3);I(he),fe(xe=>{ue(ie,be()),ue(J,` ${xe??""}`)},[()=>Le().toLocaleString()]),z(Se,he)}),z(X,Q)};ve(gu,X=>{c(Hi).length>0&&X(pu)})}I(so),fe((X,Q,te,Se,me,Te,be,Le,he)=>{F(ze,"href",X),Rt(ze,1,Q,"svelte-gt9p7f"),F(ze,"aria-current",c(u)==="canvas"?"page":void 0),F(et,"href",te),Rt(et,1,Se,"svelte-gt9p7f"),F(et,"aria-current",c(u)==="svg"?"page":void 0),F(Tt,"href",me),Rt(Tt,1,Te,"svelte-gt9p7f"),F(Tt,"aria-current",c(u)==="table"?"page":void 0),Rt(dr,1,be,"svelte-gt9p7f"),F(dr,"aria-pressed",c(E)),ue(tu,`${Le??""} nodes · ${he??""} edges`)},[()=>e.collection?si(e.collection,"graph"):void 0,()=>Pt(["inline-flex items-center gap-1 px-2 py-1 text-[11px] cursor-pointer transition-colors",c(u)==="canvas"?"bg-accent text-white":"bg-bg-1 text-fg-2 hover:text-fg-0"].join(" ")),()=>e.collection?si(e.collection,"svg"):void 0,()=>Pt(["inline-flex items-center gap-1 px-2 py-1 text-[11px] cursor-pointer transition-colors border-l border-line-2",c(u)==="svg"?"bg-accent text-white":"bg-bg-1 text-fg-2 hover:text-fg-0"].join(" ")),()=>e.collection?si(e.collection,"table"):void 0,()=>Pt(["inline-flex items-center gap-1 px-2 py-1 text-[11px] cursor-pointer transition-colors border-l border-line-2",c(u)==="table"?"bg-accent text-white":"bg-bg-1 text-fg-2 hover:text-fg-0"].join(" ")),()=>Pt(["inline-flex items-center gap-1 h-6 px-2 rounded border cursor-pointer transition-colors",c(E)?"border-accent/40 bg-accent/10 text-accent":"border-line-1 text-fg-3 hover:text-fg-1 hover:border-line-2"].join(" ")),()=>c(i).nodes.length.toLocaleString(),()=>c(i).edges.length.toLocaleString()]),$e("click",ze,()=>{e.collection||M(u,"canvas")}),$e("click",et,()=>{e.collection||M(u,"svg")}),$e("click",Tt,()=>{e.collection||M(u,"table")}),$e("click",dr,()=>M(E,!c(E))),z(_,P)};ve(qa,_=>{c(i).nodes.length===0&&c(i).edges.length===0?_(Va):_(Ya,-1)})}I(jn),z(r,jn),Ns()}Us(["click","change","keydown"]);var Ag=le('<p class="text-fg-2 text-[13px] m-0 max-w-md leading-relaxed"> </p>'),Cg=le('<code class="font-mono text-[11px] text-fg-3 mt-3 px-2 py-1 bg-bg-2 border border-line-1 rounded"> </code>'),Lg=le('<div class="flex items-center gap-2 mt-5"><!></div>'),Dg=le('<div class="flex flex-col items-center justify-center text-center py-16 px-6 min-h-[280px] bg-bg-1 border border-line-1 border-dashed rounded-lg"><!> <h2 class="type-h2 m-0 mb-2"> </h2> <!> <!> <!></div>');function Vg(r,e){var t=Dg(),n=T(t);{var i=p=>{var y=Ve(),S=Ie(y);Cc(S,()=>e.icon,(m,v)=>{v(m,{class:"size-9 text-fg-3 mb-4",strokeWidth:1.4})}),z(p,y)};ve(n,p=>{e.icon&&p(i)})}var o=U(n,2),s=T(o,!0);I(o);var a=U(o,2);{var u=p=>{var y=Ag(),S=T(y,!0);I(y),fe(()=>ue(S,e.message)),z(p,y)};ve(a,p=>{e.message&&p(u)})}var l=U(a,2);{var d=p=>{var y=Cg(),S=T(y,!0);I(y),fe(()=>ue(S,e.hint)),z(p,y)};ve(l,p=>{e.hint&&p(d)})}var f=U(l,2);{var h=p=>{var y=Lg(),S=T(y);Gc(S,()=>e.actions),I(y),z(p,y)};ve(f,p=>{e.actions&&p(h)})}I(t),fe(()=>ue(s,e.title)),z(r,t)}export{In as A,Wg as B,Or as C,Hr as D,Vg as E,Kr as F,qg as G,jg as H,ut as I,F as J,Mg as K,Bg as L,Rt as M,Wo as N,zs as O,Zs as P,Pg as Q,Jc as R,Rr as S,cd as T,it as U,Gc as V,Kg as W,Bo as X,td as a,rd as b,id as c,od as d,ad as e,jo as f,tr as g,ko as h,zg as i,Ug as j,gn as k,Pt as l,Rc as m,si as n,ji as o,Jl as p,Fg as q,mt as r,hd as s,Ti as t,Hg as u,xn as v,Kc as w,Di as x,Po as y,En as z};
|