import{rasdB,gasyB,aasDB}from"./react.js";(function(){conste=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(constoofdocument.querySelectorAll('link[rel="modulepreload"]'))c(o);newMutationObserver(o=>{for(constEofo)if(E.type==="childList")for(constDofE.addedNodes)D.tagName==="LINK"&&D.rel==="modulepreload"&&c(D)}).observe(document,{childList:!0,subtree:!0});functionQ(o){constE={};returno.integrity&&(E.integrity=o.integrity),o.referrerPolicy&&(E.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?E.credentials="include":o.crossOrigin==="anonymous"?E.credentials="omit":E.credentials="same-origin",E}functionc(o){if(o.ep)return;o.ep=!0;constE=Q(o);fetch(o.href,E)}})();varXe={exports:{}},li={};varOu;functionXo(){if(Ou)returnli;Ou=1;vara=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");functionQ(c,o,E){varD=null;if(E!==void0&&(D=""+E),o.key!==void0&&(D=""+o.key),"key"ino){E={};for(varNino)N!=="key"&&(E[N]=o[N])}elseE=o;returno=E.ref,{$$typeof:a,type:c,key:D,ref:o!==void0?o:null,props:E}}returnli.Fragment=e,li.jsx=Q,li.jsxs=Q,li}varVu;functionqo(){returnVu||(Vu=1,Xe.exports=Xo()),Xe.exports}varf=qo(),eA=dB();constwA=yB(eA);varHo=DB(),qe={exports:{}},ii={},He={exports:{}},Ze={};varju;functionZo(){returnju||(ju=1,(function(a){functione(m,U){varq=m.length;m.push(U);A:for(;0<q;){varnA=q-1>>>1,QA=m[nA];if(0<o(QA,U))m[nA]=U,m[q]=QA,q=nA;elsebreakA}}functionQ(m){returnm.length===0?null:m[0]}functionc(m){if(m.length===0)returnnull;varU=m[0],q=m.pop();if(q!==U){m[0]=q;A:for(varnA=0,QA=m.length,FA=QA>>>1;nA<FA;){vardA=2*(nA+1)-1,IA=m[dA],T=dA+1,ng=m[T];if(0>o(IA,q))T<QA&&0>o(ng,IA)?(m[nA]=ng,m[T]=q,nA=T):(m[nA]=IA,m[dA]=q,nA=dA);elseif(T<QA&&0>o(ng,q))m[nA]=ng,m[T]=q,nA=T;elsebreakA}}returnU}functiono(m,U){varq=m.sortIndex-U.sortIndex;returnq!==0?q:m.id-U.id}if(a.unstable_now=void0,typeofperformance=="object"&&typeofperformance.now=="function"){varE=performance;a.unstable_now=function(){returnE.now()}}else{varD=Date,N=D.now();a.unstable_now=function(){returnD.now()-N}}varG=[],J=[],b=1,w=null,p=3,V=!1,F=!1,O=!1,EA=!1,v=typeofsetTimeout=="function"?setTimeout:null,W=typeofclearTimeout=="function"?clearTimeout:null,H=typeofsetImmediate<"u"?setImmediate:null;functionL(m){for(varU=Q(J);U!==null;){if(U.callback===null)c(J);elseif(U.startTime<=m)c(J),U.sortIndex=U.expirationTime,e(G,U);elsebreak;U=Q(J)}}functioniA(m){if(O=!1,L(m),!F)if(Q(G)!==null)F=!0,gA||(gA=!0,KA());else{varU=Q(J);U!==null&&eg(iA,U.startTime-m)}}vargA=!1,mA=-1,TA=5,Cg=-1;functionX(){returnEA?!0:!(a.unstable_now()-Cg<TA)}functionIg(){if(EA=!1,gA){varm=a.unstable_now();Cg=m;varU=!0;try{A:{F=!1,O&&(O=!1,W(mA),mA=-1),V=!0;varq=p;try{g:{for(L(m),w=Q(G);w!==null&&!(w.expirationTime>m&&X());){varnA=w.callback;if(typeofnA=="function"){w.callback=null,p=w.priorityLevel;varQA=nA(w.expirationTime<=m);if(m=a.unstable_now(),typeofQA=="function"){w.callback=QA,L(m),U=!0;breakg}w===Q(G)&&c(G),L(m)}elsec(G);w=Q(G)}if(w!==null)U=!0;else{varFA=Q(J);FA!==null&&eg(iA,FA.startTime-m),U=!1}}breakA}finally{w=null,p=q,V=!1}U=void0}}finally{U?KA():gA=!1}}}varKA;if(typeofH=="function")KA=function(){H(Ig)};elseif(typeofMessageChannel<"u"){varaA=newMessageChannel,cA=aA.port2;aA.port1.onmessage=Ig,KA=function(){cA.postMessage(null)}}elseKA=function(){v(Ig,0)};functioneg(m,U){mA=v(function(){m(a.unstable_now())},U)}a.unstable_IdlePriority=5,a.unstable_ImmediatePriority=1,a.unstable_LowPriority=4,a.unstable_NormalPriority=3,a.unstable_Profiling=null,a.unstable_UserBlockingPriority=2,a.unstable_cancelCallback=function(m){m.callback=null},a.unstable_forceFrameRate=function(m){0>m||125<m?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):TA=0<m?Math.floor(1e3/m):5},a.unstable_getCurrentPriorityLevel=function(){returnp},a.unstable_next=function(m){switch(p){case1:case2:case3:varU=3;break;default:U=p}varq=p;p=U;try{returnm()}finally{p=
`,b.stack]}):a?f.jsx("main",{className:"gamecult-epiphany-graph-app",children:f.jsx(Ef,{children:f.jsx(ys,{state:a,title:_e().title??"GameCult Knowledge Graph",selection:o,viewportTarget:D,onViewportTargetComplete:W,onSelectionChange:E,overlayPanels:!0,className:"gamecult-graph-shell",showSidebar:!1,focusSelection:!0,selectionFocusMode:"article",onExpandedNodeClick:H,nodeArticle:{className:"gamecult-expanded-article-node",ariaLabel:L=>`${L.title}articlenode`,content:L=>f.jsx(Gf,{node:L,articleCache:G,contentIndex:Q,ensureArticle:EA,onSelectNote:v,onArticleLinkClick:H})},graphLabels:{architecture:"Notes",dataflow:"Sections"},graphDescriptions:{architecture:_e().architectureDescription??"Notes are individual vault pages from the gamecult knowledge base. Their edges are Quartz wiki links, with incoming backlinks counted into each node.",dataflow:"Sections are folder-level clusters. Their edges summarize how links and backlinks move between regions of the vault."},layoutMode:{architecture:"combined-force",dataflow:"combined-force"}})})}):f.jsx("main",{className:"gamecult-epiphany-graph-app",children:f.jsx("div",{className:"gamecult-graph-loading",children:"Loading Quartz backlink graph..."})})}function Gf({node:a,articleCache:e,contentIndex:Q,ensureArticle:c,onSelectNote:o,onArticleLinkClick:E}){const D=a.graphKey==="architecture"?a.id:null,N=a.graphKey==="dataflow"?a.id.replace(/^section:/,""):null;return wA.useEffect(()=>{D&&c(D)},[c,D]),f.jsx(mf,{articleState:D?e[D]??{status:"idle",html:null}:{status:"idle",html:null},contentIndex:Q,noteSlug:D,section:N,onSelectNote:o,onArticleLinkClick:E})}function mf({articleState:a,contentIndex:e,noteSlug:Q,section:c,onSelectNote:o,onArticleLinkClick:E}){const D=Q&&e?e[Q]:null,N=wA.useMemo(()=>!c||!e?[]:Object.entries(e).map(([G,J])=>[Og(J.slug||G),J]).filter(([G])=>dI(G)===c).sort(([G,J],[b,w])=>VI(G,J).localeCompare(VI(b,w))),[e,c]);return c?f.jsxs("article",{className:"gamecult-spa-panel",children:[f.jsxs("header",{className:"gamecult-spa-article-header",children:[f.jsx("span",{className:"gamecult-spa-node-badge","aria-hidden":"true",children:hB(c)}),f.jsxs("span",{className:"gamecult-spa-title-cluster",children:[f.jsx("p",{className:"gamecult-spa-kicker",children:"Section Cluster"}),f.jsx("h1",{children:c})]})]}),f.jsxs("p",{className:"gamecult-spa-summary",children:[N.length," notes live in this section. Pick one and the graph becomes the table of contents it was clearly auditioning to be."]}),f.jsx("div",{className:"gamecult-spa-note-list",children:N.map(([G,J])=>f.jsxs("button",{type:"button",onClick:()=>o(G),children:[f.jsx("strong",{children:VI(G,J)}),f.jsx("span",{children:JB(J)})]},G))})]}):!Q||!D?f.jsxs("article",{className:"gamecult-spa-panel",children:[f.jsxs("header",{className:"gamecult-spa-article-header",children:[f.jsx("span",{className:"gamecult-spa-node-badge","aria-hidden":"true",children:"GC"}),f.jsxs("span",{className:"gamecult-spa-title-cluster",children:[f.jsx("p",{className:"gamecult-spa-kicker",children:"Graph Atlas"}),f.jsx("h1",{children:"gamecult"})]})]}),f.jsx("p",{className:"gamecult-spa-summary",children:"Select a note to read it here. The graph is the site map now, which is probably what it was trying to confess."})]}):f.jsxs("article",{className:"gamecult-spa-panel",children:[f.jsxs("header",{className:"gamecult-spa-article-header",children:[f.jsx("span",{className:"gamecult-spa-node-badge","aria-hidden":"true",children:hB(VI(Q,D))}),f.jsxs("span",{className:"gamecult-spa-title-cluster",children:[f.jsx("p",{className:"gamecult-spa-kicker",children:dI(Q)}),f.jsx("h1",{children:VI(Q,D)})]})]}),a.status==="loading"&&f.jsx("div",{className:"gamecult-spa-status",children:"Loading article..."}),a.status==="error"&&f.jsx("div",{className:"gamecult-spa-status gamecult-spa-status-error",children:a.message}),a.status==="ready"&&f.jsx("div",{className:"gamecult-spa-article","data-epiphany-article-content":!0,onClick:E,dangerouslySetInnerHTML:{__html:a.html}}),a.status!=="ready"&&a.html&&f.jsx("div",{className:"gamecult-spa-article","data-epiphany-article-con