@origintrail-official/dkg-node-ui 10.0.15 → 10.0.16

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.
Files changed (36) hide show
  1. package/dist-ui/assets/{3d-force-graph-CnBoK4hA.js → 3d-force-graph-bUKbeTGZ.js} +1 -1
  2. package/dist-ui/assets/ActivityFeed-CC5S_gk9.js +100 -0
  3. package/dist-ui/assets/{AgentHub-BOUZTvCO.js → AgentHub-4c4sH_Jd.js} +1 -1
  4. package/dist-ui/assets/AgentProfilePage-ClhUeZxy.js +1 -0
  5. package/dist-ui/assets/{ApproveWalletsModal-CYQqAWZs.js → ApproveWalletsModal-CBKp6zQB.js} +18 -18
  6. package/dist-ui/assets/ContextGraphPrimitives-Bwc2i7EX.js +1 -0
  7. package/dist-ui/assets/ConvictionDetailView-a3v7xwcm.js +2 -0
  8. package/dist-ui/assets/MemoryLayerView-DxL2MjyA.js +2 -0
  9. package/dist-ui/assets/MemoryStackView-BLhA3bn0.js +1 -0
  10. package/dist-ui/assets/Network-BNhbBzOD.js +1 -0
  11. package/dist-ui/assets/OnChainProvenanceCard-DKyfVEjF.js +1 -0
  12. package/dist-ui/assets/{Operations-Cmt3YpaX.js → Operations-mCPe0E-j.js} +18 -18
  13. package/dist-ui/assets/ProjectView-jrGPu5ON.js +290 -0
  14. package/dist-ui/assets/PublishingConviction-BGi128uo.js +2 -0
  15. package/dist-ui/assets/Settings-D1oxLo1Y.js +1 -0
  16. package/dist-ui/assets/{ccip-m-rmKwvf.js → ccip-WHHgwjp-.js} +1 -1
  17. package/dist-ui/assets/index-RLb1kuzE.js +1174 -0
  18. package/dist-ui/assets/{index-UAg6wmCv.js → index-UvxrSkC_.js} +4 -4
  19. package/dist-ui/assets/{jsonld-32FQRO67-iGNyLix6.js → jsonld-32FQRO67-Dl6_9Lk9.js} +2 -2
  20. package/dist-ui/assets/{jsonld-CDhTpz6H.js → jsonld-Dj4KMENF.js} +1 -1
  21. package/dist-ui/assets/{renderer-3d-2EVDZII7-BdEgi2VZ.js → renderer-3d-2EVDZII7-DfnhcMkF.js} +2 -2
  22. package/dist-ui/assets/{shikiHighlighter-Dhz3-Gg5.js → shikiHighlighter-ByXDJnWi.js} +1 -1
  23. package/dist-ui/assets/string-DtUow4KV.js +1 -0
  24. package/dist-ui/assets/truncate-BaiMkAOo.js +1 -0
  25. package/dist-ui/assets/useEntityOnChainReceipt-BRK_O_sb.js +85 -0
  26. package/dist-ui/assets/useProjectActivity-OdoQs9mK.js +1 -0
  27. package/dist-ui/index.html +1 -1
  28. package/package.json +4 -4
  29. package/dist-ui/assets/AgentProfilePage-DpF722ai.js +0 -1
  30. package/dist-ui/assets/ConvictionDetailView-DYsWNc9M.js +0 -2
  31. package/dist-ui/assets/Network-JVFsFYhR.js +0 -1
  32. package/dist-ui/assets/OnChainProvenanceCard-DISbYKx1.js +0 -1
  33. package/dist-ui/assets/PublishingConviction-L-wHlnRP.js +0 -2
  34. package/dist-ui/assets/Settings-CvBKeoTW.js +0 -1
  35. package/dist-ui/assets/index-BfrYentv.js +0 -1645
  36. package/dist-ui/assets/ordinal-DhEzRPdO.js +0 -1
@@ -1,4 +1,4 @@
1
- import{v as Po,c8 as Lh,aG as Qe,cD as _n,cX as ce,br as bl,cY as V,aM as St,o as si,aO as kt,ct as _l,r as Dt,aQ as Uh,n as Yi,ax as cm,ae as Oh,K as Ih,l as kh,F as dm,bv as hm,ay as Gh,u as fm,cJ as pm,db as z,af as it,cm as xl,ba as cs,bo as Vh,co as Tl,dd as $h,dc as Oe,d6 as k,s as Ge,cd as Ss,aA as vt,bD as It,cZ as ze,a7 as gm,a6 as mm,B as ot,a5 as hs,T as xn,cW as Or,c_ as uo,cI as Zt,t as Ns,bt as ym,S as zh,c9 as bm,cv as vl,i as Wh,ag as _m,aw as xm,aE as Tm,cc as vm,C as Sm,A as Nm,d as Rm,b3 as wm,p as Ws,cO as ht,cr as js,cV as ds,al as st,cS as Ve,a3 as rt,e as jh,ca as Fo,cb as Do,P as Tn,Q as vn,c5 as Jt,c6 as Lo,b_ as Uo,b$ as qh,cT as Hh,cU as Xh,cQ as Sn,cR as Sl,cP as Nl,a0 as Oo,a4 as Kh,R as nn,bq as Hr,j as Em,bs as Am,aP as On,J as qs,a as pn,d3 as Un,bw as Js,d2 as Cm,_ as Rl,$ as wl,E as yu,W as lo,cn as ae,aL as ri,bn as El,aH as dc,bB as Io,d1 as Xr,d5 as Mm,d8 as co,aY as ko,q as Kr,ce as Go,aB as fs,aC as bu,b1 as Yr,b2 as Yh,b0 as xt,be as Qh,a8 as ho,aa as er,X as Zh,as as ii,aq as Al,f as Jh,b4 as ef,aF as hc,b8 as tr,d7 as Bm,cg as tf,cB as nf,bj as sf,bk as rf,bl as of,bm as af,U as uf,V as lf,cy as cf,cx as df,cz as hf,bi as ff,I as Pm,G as Fm,H as Dm,aI as pf,b7 as Nn,a_ as ks,cC as Gs,c as Vs,bb as gn,bf as gf,a9 as mf,ab as yf,Y as bf,at as _f,ar as xf,g as Tf,b5 as vf,bE as Cl,c4 as Qi,bX as Zi,bY as Ji,bZ as eo,c3 as fc,c2 as pc,bW as gc,bV as mc,c0 as _u,c1 as xu,bU as Tu,bx as vu,ci as Su,bC as fo,cl as Nu,bL as Ru,bM as wu,bN as Eu,bO as Au,bP as Cu,bQ as Mu,bR as Bu,bS as Pu,bG as Fu,bH as Du,bI as Lu,bF as Uu,bJ as Ou,bK as Iu,bT as ku,bA as Gu,ck as Vu,bz as po,cj as $u,M as Sf,aT as Lm,aV as Um,aU as Om,aW as Im,aS as km,aR as Gm,az as Vm,bu as $m,cw as zm,cq as Wm,by as jm,D as Vo,cF as Ml,cK as qm,cM as Hm,cL as Xm,a2 as go,bg as Km,ad as Ym,ac as Qm,Z as Zm,au as Jm,av as ey,h as ty,b6 as ny,O as sy,ai as ry,N as iy,ah as oy,ao as ay,cf as uy,d4 as ly,ap as cy,aN as dy,aX as hy,ch as Nf,a1 as Rf,b as fy,aZ as py,a$ as gy,aJ as mo,bd as wf,aK as Ef,m as Af,w as my,k as yy,x as by,cs as _y,bp as xy,y as yo,z as bo,cE as ia,b9 as oa,bc as Ty,bh as vy,aj as Sy,ak as Ny,L as Ry,cA as Bl,aD as wy,an as Ey,am as Ay,d9 as Cy,cu as yc,c7 as My,cp as bc,cN as By,c$ as Py,cH as Cf,cG as Fy,d0 as Dy}from"./three.module-BXIk8GZS.js";import{a3 as Ly}from"./index-BfrYentv.js";import{i as fe,s as Uy,e as Pl,c as Oy,d as Iy,a as ky,b as Gy,f as Vy,t as Mf,g as $y,G as zy,T as _c,E as xc}from"./index-UAg6wmCv.js";import{o as Wy,h as jy,m as qy}from"./ordinal-DhEzRPdO.js";const Hs=new bl,mn=new ce,Bf=new V,aa=new ce,to=new ce,_o=new V,zu=new V,Pf=new St,Ff=new V,Df=new V;let nt=null,qt=null;const yn=[],$n={NONE:-1,PAN:0,ROTATE:1};class Hy extends Po{constructor(e,t,n=null){super(t,n),this.objects=e,this.recursive=!0,this.transformGroup=!1,this.rotateSpeed=1,this.raycaster=new Lh,this.mouseButtons={LEFT:Qe.PAN,MIDDLE:Qe.PAN,RIGHT:Qe.ROTATE},this.touches={ONE:_n.PAN},this._onPointerMove=Xy.bind(this),this._onPointerDown=Ky.bind(this),this._onPointerCancel=Yy.bind(this),this._onContextMenu=Qy.bind(this),n!==null&&this.connect(n)}connect(e){super.connect(e),this.domElement.addEventListener("pointermove",this._onPointerMove),this.domElement.addEventListener("pointerdown",this._onPointerDown),this.domElement.addEventListener("pointerup",this._onPointerCancel),this.domElement.addEventListener("pointerleave",this._onPointerCancel),this.domElement.addEventListener("contextmenu",this._onContextMenu),this.domElement.style.touchAction="none"}disconnect(){this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerdown",this._onPointerDown),this.domElement.removeEventListener("pointerup",this._onPointerCancel),this.domElement.removeEventListener("pointerleave",this._onPointerCancel),this.domElement.removeEventListener("contextmenu",this._onContextMenu),this.domElement.style.touchAction="",this.domElement.style.cursor=""}dispose(){this.disconnect()}_updatePointer(e){const t=this.domElement.getBoundingClientRect();mn.x=(e.clientX-t.left)/t.width*2-1,mn.y=-(e.clientY-t.top)/t.height*2+1}_updateState(e){let t;if(e.pointerType==="touch")t=this.touches.ONE;else switch(e.button){case 0:t=this.mouseButtons.LEFT;break;case 1:t=this.mouseButtons.MIDDLE;break;case 2:t=this.mouseButtons.RIGHT;break;default:t=null}switch(t){case Qe.PAN:case _n.PAN:this.state=$n.PAN;break;case Qe.ROTATE:case _n.ROTATE:this.state=$n.ROTATE;break;default:this.state=$n.NONE}}}function Xy(i){const e=this.object,t=this.domElement,n=this.raycaster;if(this.enabled!==!1){if(this._updatePointer(i),n.setFromCamera(mn,e),nt)this.state===$n.PAN?n.ray.intersectPlane(Hs,_o)&&(nt.position.copy(_o.sub(Bf).applyMatrix4(Pf)),this.dispatchEvent({type:"drag",object:nt})):this.state===$n.ROTATE&&(aa.subVectors(mn,to).multiplyScalar(this.rotateSpeed),nt.rotateOnWorldAxis(Ff,aa.x),nt.rotateOnWorldAxis(Df.normalize(),-aa.y),this.dispatchEvent({type:"drag",object:nt})),to.copy(mn);else if(i.pointerType==="mouse"||i.pointerType==="pen")if(yn.length=0,n.setFromCamera(mn,e),n.intersectObjects(this.objects,this.recursive,yn),yn.length>0){const s=yn[0].object;Hs.setFromNormalAndCoplanarPoint(e.getWorldDirection(Hs.normal),zu.setFromMatrixPosition(s.matrixWorld)),qt!==s&&qt!==null&&(this.dispatchEvent({type:"hoveroff",object:qt}),t.style.cursor="auto",qt=null),qt!==s&&(this.dispatchEvent({type:"hoveron",object:s}),t.style.cursor="pointer",qt=s)}else qt!==null&&(this.dispatchEvent({type:"hoveroff",object:qt}),t.style.cursor="auto",qt=null);to.copy(mn)}}function Ky(i){const e=this.object,t=this.domElement,n=this.raycaster;this.enabled!==!1&&(this._updatePointer(i),this._updateState(i),yn.length=0,n.setFromCamera(mn,e),n.intersectObjects(this.objects,this.recursive,yn),yn.length>0&&(this.transformGroup===!0?nt=Lf(yn[0].object):nt=yn[0].object,Hs.setFromNormalAndCoplanarPoint(e.getWorldDirection(Hs.normal),zu.setFromMatrixPosition(nt.matrixWorld)),n.ray.intersectPlane(Hs,_o)&&(this.state===$n.PAN?(Pf.copy(nt.parent.matrixWorld).invert(),Bf.copy(_o).sub(zu.setFromMatrixPosition(nt.matrixWorld)),t.style.cursor="move",this.dispatchEvent({type:"dragstart",object:nt})):this.state===$n.ROTATE&&(Ff.set(0,1,0).applyQuaternion(e.quaternion).normalize(),Df.set(1,0,0).applyQuaternion(e.quaternion).normalize(),t.style.cursor="move",this.dispatchEvent({type:"dragstart",object:nt})))),to.copy(mn))}function Yy(){this.enabled!==!1&&(nt&&(this.dispatchEvent({type:"dragend",object:nt}),nt=null),this.domElement.style.cursor=qt?"pointer":"auto",this.state=$n.NONE)}function Qy(i){this.enabled!==!1&&i.preventDefault()}function Lf(i,e=null){return i.isGroup&&(e=i),i.parent===null?e:Lf(i.parent,e)}function Zy(i){eb(i);const e=Jy(i);return i.on=e.on,i.off=e.off,i.fire=e.fire,i}function Jy(i){let e=Object.create(null);return{on:function(t,n,s){if(typeof n!="function")throw new Error("callback is expected to be a function");let r=e[t];return r||(r=e[t]=[]),r.push({callback:n,ctx:s}),i},off:function(t,n){if(typeof t>"u")return e=Object.create(null),i;if(e[t])if(typeof n!="function")delete e[t];else{const o=e[t];for(let a=0;a<o.length;++a)o[a].callback===n&&o.splice(a,1)}return i},fire:function(t){const n=e[t];if(!n)return i;let s;arguments.length>1&&(s=Array.prototype.slice.call(arguments,1));for(let r=0;r<n.length;++r){const o=n[r];o.callback.apply(o.ctx,s)}return i}}}function eb(i){if(!i)throw new Error("Eventify cannot use falsy object as events subject");const e=["on","fire","off"];for(let t=0;t<e.length;++t)if(i.hasOwnProperty(e[t]))throw new Error("Subject cannot be eventified, since it already has property '"+e[t]+"'")}function tb(i){if(i=i||{},"uniqueLinkId"in i&&(console.warn("ngraph.graph: Starting from version 0.14 `uniqueLinkId` is deprecated.\nUse `multigraph` option instead\n",`
1
+ import{v as Po,c8 as Lh,aG as Qe,cD as _n,cX as ce,br as bl,cY as V,aM as St,o as si,aO as kt,ct as _l,r as Dt,aQ as Uh,n as Yi,ax as cm,ae as Oh,K as Ih,l as kh,F as dm,bv as hm,ay as Gh,u as fm,cJ as pm,db as z,af as it,cm as xl,ba as cs,bo as Vh,co as Tl,dd as $h,dc as Oe,d6 as k,s as Ge,cd as Ss,aA as vt,bD as It,cZ as ze,a7 as gm,a6 as mm,B as ot,a5 as hs,T as xn,cW as Or,c_ as uo,cI as Zt,t as Ns,bt as ym,S as zh,c9 as bm,cv as vl,i as Wh,ag as _m,aw as xm,aE as Tm,cc as vm,C as Sm,A as Nm,d as Rm,b3 as wm,p as Ws,cO as ht,cr as js,cV as ds,al as st,cS as Ve,a3 as rt,e as jh,ca as Fo,cb as Do,P as Tn,Q as vn,c5 as Jt,c6 as Lo,b_ as Uo,b$ as qh,cT as Hh,cU as Xh,cQ as Sn,cR as Sl,cP as Nl,a0 as Oo,a4 as Kh,R as nn,bq as Hr,j as Em,bs as Am,aP as On,J as qs,a as pn,d3 as Un,bw as Js,d2 as Cm,_ as Rl,$ as wl,E as yu,W as lo,cn as ae,aL as ri,bn as El,aH as dc,bB as Io,d1 as Xr,d5 as Mm,d8 as co,aY as ko,q as Kr,ce as Go,aB as fs,aC as bu,b1 as Yr,b2 as Yh,b0 as xt,be as Qh,a8 as ho,aa as er,X as Zh,as as ii,aq as Al,f as Jh,b4 as ef,aF as hc,b8 as tr,d7 as Bm,cg as tf,cB as nf,bj as sf,bk as rf,bl as of,bm as af,U as uf,V as lf,cy as cf,cx as df,cz as hf,bi as ff,I as Pm,G as Fm,H as Dm,aI as pf,b7 as Nn,a_ as ks,cC as Gs,c as Vs,bb as gn,bf as gf,a9 as mf,ab as yf,Y as bf,at as _f,ar as xf,g as Tf,b5 as vf,bE as Cl,c4 as Qi,bX as Zi,bY as Ji,bZ as eo,c3 as fc,c2 as pc,bW as gc,bV as mc,c0 as _u,c1 as xu,bU as Tu,bx as vu,ci as Su,bC as fo,cl as Nu,bL as Ru,bM as wu,bN as Eu,bO as Au,bP as Cu,bQ as Mu,bR as Bu,bS as Pu,bG as Fu,bH as Du,bI as Lu,bF as Uu,bJ as Ou,bK as Iu,bT as ku,bA as Gu,ck as Vu,bz as po,cj as $u,M as Sf,aT as Lm,aV as Um,aU as Om,aW as Im,aS as km,aR as Gm,az as Vm,bu as $m,cw as zm,cq as Wm,by as jm,D as Vo,cF as Ml,cK as qm,cM as Hm,cL as Xm,a2 as go,bg as Km,ad as Ym,ac as Qm,Z as Zm,au as Jm,av as ey,h as ty,b6 as ny,O as sy,ai as ry,N as iy,ah as oy,ao as ay,cf as uy,d4 as ly,ap as cy,aN as dy,aX as hy,ch as Nf,a1 as Rf,b as fy,aZ as py,a$ as gy,aJ as mo,bd as wf,aK as Ef,m as Af,w as my,k as yy,x as by,cs as _y,bp as xy,y as yo,z as bo,cE as ia,b9 as oa,bc as Ty,bh as vy,aj as Sy,ak as Ny,L as Ry,cA as Bl,aD as wy,an as Ey,am as Ay,d9 as Cy,cu as yc,c7 as My,cp as bc,cN as By,c$ as Py,cH as Cf,cG as Fy,d0 as Dy}from"./three.module-BXIk8GZS.js";import{ay as Ly}from"./index-RLb1kuzE.js";import{i as fe,s as Uy,e as Pl,c as Oy,d as Iy,a as ky,b as Gy,f as Vy,t as Mf,g as $y,G as zy,T as _c,E as xc}from"./index-UvxrSkC_.js";import{o as Wy,h as jy,m as qy}from"./string-DtUow4KV.js";const Hs=new bl,mn=new ce,Bf=new V,aa=new ce,to=new ce,_o=new V,zu=new V,Pf=new St,Ff=new V,Df=new V;let nt=null,qt=null;const yn=[],$n={NONE:-1,PAN:0,ROTATE:1};class Hy extends Po{constructor(e,t,n=null){super(t,n),this.objects=e,this.recursive=!0,this.transformGroup=!1,this.rotateSpeed=1,this.raycaster=new Lh,this.mouseButtons={LEFT:Qe.PAN,MIDDLE:Qe.PAN,RIGHT:Qe.ROTATE},this.touches={ONE:_n.PAN},this._onPointerMove=Xy.bind(this),this._onPointerDown=Ky.bind(this),this._onPointerCancel=Yy.bind(this),this._onContextMenu=Qy.bind(this),n!==null&&this.connect(n)}connect(e){super.connect(e),this.domElement.addEventListener("pointermove",this._onPointerMove),this.domElement.addEventListener("pointerdown",this._onPointerDown),this.domElement.addEventListener("pointerup",this._onPointerCancel),this.domElement.addEventListener("pointerleave",this._onPointerCancel),this.domElement.addEventListener("contextmenu",this._onContextMenu),this.domElement.style.touchAction="none"}disconnect(){this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerdown",this._onPointerDown),this.domElement.removeEventListener("pointerup",this._onPointerCancel),this.domElement.removeEventListener("pointerleave",this._onPointerCancel),this.domElement.removeEventListener("contextmenu",this._onContextMenu),this.domElement.style.touchAction="",this.domElement.style.cursor=""}dispose(){this.disconnect()}_updatePointer(e){const t=this.domElement.getBoundingClientRect();mn.x=(e.clientX-t.left)/t.width*2-1,mn.y=-(e.clientY-t.top)/t.height*2+1}_updateState(e){let t;if(e.pointerType==="touch")t=this.touches.ONE;else switch(e.button){case 0:t=this.mouseButtons.LEFT;break;case 1:t=this.mouseButtons.MIDDLE;break;case 2:t=this.mouseButtons.RIGHT;break;default:t=null}switch(t){case Qe.PAN:case _n.PAN:this.state=$n.PAN;break;case Qe.ROTATE:case _n.ROTATE:this.state=$n.ROTATE;break;default:this.state=$n.NONE}}}function Xy(i){const e=this.object,t=this.domElement,n=this.raycaster;if(this.enabled!==!1){if(this._updatePointer(i),n.setFromCamera(mn,e),nt)this.state===$n.PAN?n.ray.intersectPlane(Hs,_o)&&(nt.position.copy(_o.sub(Bf).applyMatrix4(Pf)),this.dispatchEvent({type:"drag",object:nt})):this.state===$n.ROTATE&&(aa.subVectors(mn,to).multiplyScalar(this.rotateSpeed),nt.rotateOnWorldAxis(Ff,aa.x),nt.rotateOnWorldAxis(Df.normalize(),-aa.y),this.dispatchEvent({type:"drag",object:nt})),to.copy(mn);else if(i.pointerType==="mouse"||i.pointerType==="pen")if(yn.length=0,n.setFromCamera(mn,e),n.intersectObjects(this.objects,this.recursive,yn),yn.length>0){const s=yn[0].object;Hs.setFromNormalAndCoplanarPoint(e.getWorldDirection(Hs.normal),zu.setFromMatrixPosition(s.matrixWorld)),qt!==s&&qt!==null&&(this.dispatchEvent({type:"hoveroff",object:qt}),t.style.cursor="auto",qt=null),qt!==s&&(this.dispatchEvent({type:"hoveron",object:s}),t.style.cursor="pointer",qt=s)}else qt!==null&&(this.dispatchEvent({type:"hoveroff",object:qt}),t.style.cursor="auto",qt=null);to.copy(mn)}}function Ky(i){const e=this.object,t=this.domElement,n=this.raycaster;this.enabled!==!1&&(this._updatePointer(i),this._updateState(i),yn.length=0,n.setFromCamera(mn,e),n.intersectObjects(this.objects,this.recursive,yn),yn.length>0&&(this.transformGroup===!0?nt=Lf(yn[0].object):nt=yn[0].object,Hs.setFromNormalAndCoplanarPoint(e.getWorldDirection(Hs.normal),zu.setFromMatrixPosition(nt.matrixWorld)),n.ray.intersectPlane(Hs,_o)&&(this.state===$n.PAN?(Pf.copy(nt.parent.matrixWorld).invert(),Bf.copy(_o).sub(zu.setFromMatrixPosition(nt.matrixWorld)),t.style.cursor="move",this.dispatchEvent({type:"dragstart",object:nt})):this.state===$n.ROTATE&&(Ff.set(0,1,0).applyQuaternion(e.quaternion).normalize(),Df.set(1,0,0).applyQuaternion(e.quaternion).normalize(),t.style.cursor="move",this.dispatchEvent({type:"dragstart",object:nt})))),to.copy(mn))}function Yy(){this.enabled!==!1&&(nt&&(this.dispatchEvent({type:"dragend",object:nt}),nt=null),this.domElement.style.cursor=qt?"pointer":"auto",this.state=$n.NONE)}function Qy(i){this.enabled!==!1&&i.preventDefault()}function Lf(i,e=null){return i.isGroup&&(e=i),i.parent===null?e:Lf(i.parent,e)}function Zy(i){eb(i);const e=Jy(i);return i.on=e.on,i.off=e.off,i.fire=e.fire,i}function Jy(i){let e=Object.create(null);return{on:function(t,n,s){if(typeof n!="function")throw new Error("callback is expected to be a function");let r=e[t];return r||(r=e[t]=[]),r.push({callback:n,ctx:s}),i},off:function(t,n){if(typeof t>"u")return e=Object.create(null),i;if(e[t])if(typeof n!="function")delete e[t];else{const o=e[t];for(let a=0;a<o.length;++a)o[a].callback===n&&o.splice(a,1)}return i},fire:function(t){const n=e[t];if(!n)return i;let s;arguments.length>1&&(s=Array.prototype.slice.call(arguments,1));for(let r=0;r<n.length;++r){const o=n[r];o.callback.apply(o.ctx,s)}return i}}}function eb(i){if(!i)throw new Error("Eventify cannot use falsy object as events subject");const e=["on","fire","off"];for(let t=0;t<e.length;++t)if(i.hasOwnProperty(e[t]))throw new Error("Subject cannot be eventified, since it already has property '"+e[t]+"'")}function tb(i){if(i=i||{},"uniqueLinkId"in i&&(console.warn("ngraph.graph: Starting from version 0.14 `uniqueLinkId` is deprecated.\nUse `multigraph` option instead\n",`
2
2
  `,`Note: there is also change in default behavior: From now on each graph
3
3
  is considered to be not a multigraph by default (each edge is unique).`),i.multigraph=i.uniqueLinkId),i.multigraph===void 0&&(i.multigraph=!1),typeof Map!="function")throw new Error("ngraph.graph requires `Map` to be defined. Please polyfill it before using ngraph");var e=new Map,t=new Map,n={},s=0,r=i.multigraph?S:T,o=[],a=F,u=F,l=F,c=F,d={version:20,addNode:g,addLink:_,removeLink:P,removeNode:y,getNode:m,getNodeCount:N,getLinkCount:R,getEdgeCount:R,getLinksCount:R,getNodesCount:N,getLinks:v,forEachNode:ve,forEachLinkedNode:se,forEachLink:re,beginUpdate:l,endUpdate:c,clear:ee,hasLink:L,hasNode:m,getLink:L,getLinkById:j};return Zy(d),h(),d;function h(){var I=d.on;d.on=H;function H(){return d.beginUpdate=l=G,d.endUpdate=c=Q,a=f,u=p,d.on=I,I.apply(d,arguments)}}function f(I,H){o.push({link:I,changeType:H})}function p(I,H){o.push({node:I,changeType:H})}function g(I,H){if(I===void 0)throw new Error("Invalid node identifier");l();var le=m(I);return le?(le.data=H,u(le,"update")):(le=new nb(I,H),u(le,"add")),e.set(I,le),c(),le}function m(I){return e.get(I)}function y(I){var H=m(I);if(!H)return!1;l();var le=H.links;return le&&(le.forEach(D),H.links=null),e.delete(I),u(H,"remove"),c(),!0}function _(I,H,le){l();var Ce=m(I)||g(I),B=m(H)||g(H),U=r(I,H,le),K=t.has(U.id);return t.set(U.id,U),Tc(Ce,U),I!==H&&Tc(B,U),a(U,K?"update":"add"),c(),U}function T(I,H,le){var Ce=hi(I,H),B=t.get(Ce);return B?(B.data=le,B):new vc(I,H,le,Ce)}function S(I,H,le){var Ce=hi(I,H),B=n.hasOwnProperty(Ce);if(B||L(I,H)){B||(n[Ce]=0);var U="@"+ ++n[Ce];Ce=hi(I+U,H+U)}return new vc(I,H,le,Ce)}function N(){return e.size}function R(){return t.size}function v(I){var H=m(I);return H?H.links:null}function P(I,H){return H!==void 0&&(I=L(I,H)),D(I)}function D(I){if(!I||!t.get(I.id))return!1;l(),t.delete(I.id);var H=m(I.fromId),le=m(I.toId);return H&&H.links.delete(I),le&&le.links.delete(I),a(I,"remove"),c(),!0}function L(I,H){if(!(I===void 0||H===void 0))return t.get(hi(I,H))}function j(I){if(I!==void 0)return t.get(I)}function ee(){l(),ve(function(I){y(I.id)}),c()}function re(I){if(typeof I=="function")for(var H=t.values(),le=H.next();!le.done;){if(I(le.value))return!0;le=H.next()}}function se(I,H,le){var Ce=m(I);if(Ce&&Ce.links&&typeof H=="function")return le?oe(Ce.links,I,H):Z(Ce.links,I,H)}function Z(I,H,le){for(var Ce,B=I.values(),U=B.next();!U.done;){var K=U.value,me=K.fromId===H?K.toId:K.fromId;if(Ce=le(e.get(me),K),Ce)return!0;U=B.next()}}function oe(I,H,le){for(var Ce,B=I.values(),U=B.next();!U.done;){var K=U.value;if(K.fromId===H&&(Ce=le(e.get(K.toId),K),Ce))return!0;U=B.next()}}function F(){}function G(){s+=1}function Q(){s-=1,s===0&&o.length>0&&(d.fire("changed",o),o.length=0)}function ve(I){if(typeof I!="function")throw new Error("Function is expected to iterate over graph nodes. You passed "+I);for(var H=e.values(),le=H.next();!le.done;){if(I(le.value))return!0;le=H.next()}}}function nb(i,e){this.id=i,this.links=null,this.data=e}function Tc(i,e){i.links?i.links.add(e):i.links=new Set([e])}function vc(i,e,t,n){this.fromId=i,this.toId=e,this.data=t,this.id=n}function hi(i,e){return i.toString()+"👉 "+e.toString()}var fi={exports:{}},Cs={exports:{}},ua,Sc;function Uf(){return Sc||(Sc=1,ua=function(e){return e===0?"x":e===1?"y":e===2?"z":"c"+(e+1)}),ua}var la,Nc;function ar(){if(Nc)return la;Nc=1;const i=Uf();return la=function(t){return n;function n(s,r){let o=r&&r.indent||0,a=r&&r.join!==void 0?r.join:`
4
4
  `,u=Array(o+1).join(" "),l=[];for(let c=0;c<t;++c){let d=i(c),h=c===0?"":u;l.push(h+s.replace(/{var}/g,d))}return l.join(a)}},la}var Rc;function sb(){if(Rc)return Cs.exports;Rc=1;const i=ar();Cs.exports=e,Cs.exports.generateCreateBodyFunctionBody=t,Cs.exports.getVectorCode=s,Cs.exports.getBodyCode=n;function e(r,o){let a=t(r,o),{Body:u}=new Function(a)();return u}function t(r,o){return`
@@ -0,0 +1,100 @@
1
+ var Ze=Object.defineProperty;var Je=(e,r,t)=>r in e?Ze(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t;var w=(e,r,t)=>Je(e,typeof r!="symbol"?r+"":r,t);import{aK as et,bj as ke,ba as f,R as K,O as Ie,bb as tt,aN as d}from"./index-RLb1kuzE.js";import{u as rt,b as at,r as nt}from"./useProjectActivity-OdoQs9mK.js";function st(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"&&"BYTES_PER_ELEMENT"in e&&e.BYTES_PER_ELEMENT===1}function le(e,r,t=""){const o=st(e),a=e==null?void 0:e.length;if(!o||r!==void 0){const i=t&&`"${t}" `,s="",u=o?`length=${a}`:`type=${typeof e}`,p=i+"expected Uint8Array"+s+", got "+u;throw o?new RangeError(p):new TypeError(p)}return e}function be(e,r=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(r&&e.finished)throw new Error("Hash#digest() has already been called")}function ot(e,r){le(e,void 0,"digestInto() output");const t=r.outputLen;if(e.length<t)throw new RangeError('"digestInto() output" expected to be of length >='+t)}function ce(...e){for(let r=0;r<e.length;r++)e[r].fill(0)}function se(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function x(e,r){return e<<32-r|e>>>r}const it=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",ct=Array.from({length:256},(e,r)=>r.toString(16).padStart(2,"0"));function lt(e){if(le(e),it)return e.toHex();let r="";for(let t=0;t<e.length;t++)r+=ct[e[t]];return r}function ut(e){if(typeof e!="string")throw new TypeError("string expected");return new Uint8Array(new TextEncoder().encode(e))}function pt(e,r={}){const t=(a,n)=>e(n).update(a).digest(),o=e(void 0);return t.outputLen=o.outputLen,t.blockLen=o.blockLen,t.canXOF=o.canXOF,t.create=a=>e(a),Object.assign(t,r),Object.freeze(t)}const dt=e=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,e])});function ft(e,r,t){return e&r^~e&t}function ht(e,r,t){return e&r^e&t^r&t}class mt{constructor(r,t,o,a){w(this,"blockLen");w(this,"outputLen");w(this,"canXOF",!1);w(this,"padOffset");w(this,"isLE");w(this,"buffer");w(this,"view");w(this,"finished",!1);w(this,"length",0);w(this,"pos",0);w(this,"destroyed",!1);this.blockLen=r,this.outputLen=t,this.padOffset=o,this.isLE=a,this.buffer=new Uint8Array(r),this.view=se(this.buffer)}update(r){be(this),le(r);const{view:t,buffer:o,blockLen:a}=this,n=r.length;for(let i=0;i<n;){const s=Math.min(a-this.pos,n-i);if(s===a){const u=se(r);for(;a<=n-i;i+=a)this.process(u,i);continue}o.set(r.subarray(i,i+s),this.pos),this.pos+=s,i+=s,this.pos===a&&(this.process(t,0),this.pos=0)}return this.length+=r.length,this.roundClean(),this}digestInto(r){be(this),ot(r,this),this.finished=!0;const{buffer:t,view:o,blockLen:a,isLE:n}=this;let{pos:i}=this;t[i++]=128,ce(this.buffer.subarray(i)),this.padOffset>a-i&&(this.process(o,0),i=0);for(let l=i;l<a;l++)t[l]=0;o.setBigUint64(a-8,BigInt(this.length*8),n),this.process(o,0);const s=se(r),u=this.outputLen;if(u%4)throw new Error("_sha2: outputLen must be aligned to 32bit");const p=u/4,h=this.get();if(p>h.length)throw new Error("_sha2: outputLen bigger than state");for(let l=0;l<p;l++)s.setUint32(4*l,h[l],n)}digest(){const{buffer:r,outputLen:t}=this;this.digestInto(r);const o=r.slice(0,t);return this.destroy(),o}_cloneInto(r){r||(r=new this.constructor),r.set(...this.get());const{blockLen:t,buffer:o,length:a,finished:n,destroyed:i,pos:s}=this;return r.destroyed=i,r.finished=n,r.length=a,r.pos=s,a%t&&r.buffer.set(o),r}clone(){return this._cloneInto()}}const $=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),gt=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),L=new Uint32Array(64);class bt extends mt{constructor(r){super(64,r,8,!1)}get(){const{A:r,B:t,C:o,D:a,E:n,F:i,G:s,H:u}=this;return[r,t,o,a,n,i,s,u]}set(r,t,o,a,n,i,s,u){this.A=r|0,this.B=t|0,this.C=o|0,this.D=a|0,this.E=n|0,this.F=i|0,this.G=s|0,this.H=u|0}process(r,t){for(let l=0;l<16;l++,t+=4)L[l]=r.getUint32(t,!1);for(let l=16;l<64;l++){const b=L[l-15],g=L[l-2],S=x(b,7)^x(b,18)^b>>>3,v=x(g,17)^x(g,19)^g>>>10;L[l]=v+L[l-7]+S+L[l-16]|0}let{A:o,B:a,C:n,D:i,E:s,F:u,G:p,H:h}=this;for(let l=0;l<64;l++){const b=x(s,6)^x(s,11)^x(s,25),g=h+b+ft(s,u,p)+gt[l]+L[l]|0,v=(x(o,2)^x(o,13)^x(o,22))+ht(o,a,n)|0;h=p,p=u,u=s,s=i+g|0,i=n,n=a,a=o,o=g+v|0}o=o+this.A|0,a=a+this.B|0,n=n+this.C|0,i=i+this.D|0,s=s+this.E|0,u=u+this.F|0,p=p+this.G|0,h=h+this.H|0,this.set(o,a,n,i,s,u,p,h)}roundClean(){ce(L)}destroy(){this.destroyed=!0,this.set(0,0,0,0,0,0,0,0),ce(this.buffer)}}class yt extends bt{constructor(){super(32);w(this,"A",$[0]|0);w(this,"B",$[1]|0);w(this,"C",$[2]|0);w(this,"D",$[3]|0);w(this,"E",$[4]|0);w(this,"F",$[5]|0);w(this,"G",$[6]|0);w(this,"H",$[7]|0)}}const wt=pt(()=>new yt,dt(1));var A;(function(e){e.WorkingMemory="WM",e.SharedWorkingMemory="SWM",e.VerifiableMemory="VM"})(A||(A={}));function oe(e){switch(e){case A.WorkingMemory:return"_working_memory";case A.SharedWorkingMemory:return"_shared_memory";case A.VerifiableMemory:return"_verifiable_memory"}}var ye;(function(e){e[e.SelfAttested=0]="SelfAttested",e[e.Endorsed=1]="Endorsed",e[e.PartiallyVerified=2]="PartiallyVerified",e[e.ConsensusVerified=3]="ConsensusVerified"})(ye||(ye={}));var we;(function(e){e.CREATE="CREATE",e.UPDATE="UPDATE"})(we||(we={}));A.WorkingMemory,A.SharedWorkingMemory,A.VerifiableMemory,A.VerifiableMemory;A.WorkingMemory,A.SharedWorkingMemory,A.SharedWorkingMemory,A.VerifiableMemory;const vt=["working-memory","shared-working-memory","verifiable-memory"],At=(1n<<72n)-1n;At.toString();oe(A.WorkingMemory),A.WorkingMemory,oe(A.SharedWorkingMemory),A.SharedWorkingMemory,oe(A.VerifiableMemory),A.VerifiableMemory;function Oe(e,r){return`did:dkg:context-graph:${e}/${r}`}function $e(e){return!e||e.length===0?{valid:!1,reason:"Sub-graph name cannot be empty"}:e.startsWith("_")?{valid:!1,reason:'Sub-graph names starting with "_" are reserved for protocol graphs'}:e.includes("/")?{valid:!1,reason:'Sub-graph names cannot contain "/"'}:/[<>"{}|^`\\\s]/.test(e)?{valid:!1,reason:"Sub-graph name contains characters unsafe for IRIs"}:e==="context"||e==="assertion"||e==="draft"?{valid:!1,reason:`"${e}" is a reserved path segment`}:{valid:!0}}const St=["string","integer","number","boolean","iri"],Et=/^[A-Za-z][A-Za-z0-9_]*$/,Ct=/^[+-]?\d+$/,xt=/^[+-]?(?:(?:\d+(?:\.\d*)?)|(?:\.\d+))(?:[eE][+-]?\d+)?$/;function F(e){if(e==null||e==="")return[];if(!Array.isArray(e))throw new Error("Query parameters must be an array.");const r=new Set;return e.map((t,o)=>{if(!t||typeof t!="object"||Array.isArray(t))throw new Error(`Query parameter at index ${o} must be an object.`);const a=t,n=typeof a.name=="string"?a.name.trim():"";if(!Et.test(n))throw new Error(`Query parameter at index ${o} has an invalid name: ${n||"<empty>"}.`);if(r.has(n))throw new Error(`Duplicate query parameter: ${n}.`);r.add(n);const i=a.type;if(typeof i!="string"||!St.includes(i))throw new Error(`Query parameter ${n} has an unsupported type: ${String(i)}.`);const s={name:n,type:i};typeof a.label=="string"&&a.label.trim()&&(s.label=a.label.trim()),typeof a.description=="string"&&a.description.trim()&&(s.description=a.description.trim());let u;if(a.required!==void 0){if(typeof a.required!="boolean")throw new Error(`Query parameter ${n} required must be a boolean.`);u=a.required}const p=a.defaultValue!==void 0;if(p){if(!je(a.defaultValue))throw new Error(`Query parameter ${n} has an invalid defaultValue.`);Te(s,a.defaultValue),s.defaultValue=a.defaultValue}if(u===!0&&p)throw new Error(`Required query parameter ${n} cannot declare a defaultValue.`);if(u===!1&&!p)throw new Error(`Optional query parameter ${n} must declare a defaultValue.`);return s})}function fr(e){return e.defaultValue===void 0}function Nt(e){return JSON.stringify(F(e))}function Pt(e){const r=[];for(const t of _e(e))r.includes(t.name)||r.push(t.name);return r}function Le(e,r){const t=F(r),o=new Set(t.map(n=>n.name)),a=new Set(Pt(e));for(const n of a)if(!o.has(n))throw new Error(`SPARQL template uses undeclared query parameter: ${n}.`);for(const n of t)if(!a.has(n.name))throw new Error(`Query parameter ${n.name} is not used by the SPARQL template.`)}function Rt(e,r,t){const o=F(r);Le(e,o);const a=new Set(o.map(p=>p.name));for(const p of Object.keys(t))if(!a.has(p))throw new Error(`Unknown query parameter: ${p}.`);const n=new Map;for(const p of o){const h=t[p.name],l=ve(h)?p.defaultValue:h;if(ve(l))throw new Error(`Missing required query parameter: ${p.name}.`);if(!je(l))throw new Error(`Query parameter ${p.name} must be a string, number, or boolean.`);n.set(p.name,Te(p,l))}const i=_e(e);let s="",u=0;for(const p of i)s+=e.slice(u,p.start),s+=n.get(p.name),u=p.end;return s+e.slice(u)}function Te(e,r){switch(e.type){case"string":return ke(String(r));case"integer":{const t=String(r).trim();if(!Ct.test(t))throw new Error(`Query parameter ${e.name} must be an integer.`);return t}case"number":{const t=String(r).trim();if(!xt.test(t))throw new Error(`Query parameter ${e.name} must be a number.`);return t}case"boolean":{if(r===!0||r==="true")return"true";if(r===!1||r==="false")return"false";throw new Error(`Query parameter ${e.name} must be true or false.`)}case"iri":{const t=String(r).trim();if(!et(t))throw new Error(`Query parameter ${e.name} must be a safe absolute IRI.`);return`<${t}>`}}}function je(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function ve(e){return e==null}function _e(e){const r=[];let t=0,o,a=!1,n=!1;for(;t<e.length;){const i=e[t];if(a){(i===`
2
+ `||i==="\r")&&(a=!1),t+=1;continue}if(o){if(i==="\\"){t+=2;continue}e.startsWith(o,t)?(t+=o.length,o=void 0):t+=1;continue}if(n){if(i==="\\"){t+=2;continue}i===">"&&(n=!1),t+=1;continue}if(i==="#"){a=!0,t+=1;continue}if(e.startsWith("'''",t)||e.startsWith('"""',t)){o=e.slice(t,t+3),t+=3;continue}if(i==="'"||i==='"'){o=i,t+=1;continue}if(i==="<"&&e[t+1]!=="="&&e[t+1]!=="{"&&!/\s/.test(e[t+1]??"")){n=!0,t+=1;continue}if(e.startsWith("{{",t)){const s=e.slice(t).match(/^\{\{([A-Za-z][A-Za-z0-9_]*)\}\}/);if(s){const u=t+s[0].length,p=e[t-1],h=e[u];if(p&&/[A-Za-z0-9_?:.%~-]/.test(p)||h&&/[A-Za-z0-9_?:.%~-]/.test(h))throw new Error(`Query parameter ${s[1]} must occupy a complete SPARQL term position.`);r.push({name:s[1],start:t,end:u}),t=u;continue}}t+=1}return r}const kt=2,ue="__context_graph",hr="ui-saved-queries",mr="Saved queries",E="http://dkg.io/ontology/profile/",Ae="http://schema.org/",Se="http://www.w3.org/1999/02/22-rdf-syntax-ns#type",It="http://www.w3.org/2001/XMLSchema#integer";class k extends Error{constructor(t="Incompatible query-catalog daemon contract. Upgrade the daemon and retry."){super(t);w(this,"code","QUERY_CATALOG_CONTRACT_INCOMPATIBLE");this.name="QueryCatalogContractError"}}function Ot(e,r){if(r===ue)return`did:dkg:context-graph:${e}`;const t=$e(r);if(!t.valid)throw new Error(`Invalid query-catalog subgraph "${r}": ${t.reason}`);return Oe(e,r)}function $t(e,r){const t=`did:dkg:context-graph:${e}`;if(r===t)return ue;const o=`${t}/`;if(!r.startsWith(o))throw new Error(`Query-catalog scope graph <${r}> is outside context graph "${e}".`);const a=r.slice(o.length),n=$e(a);if(!n.valid)throw new Error(`Invalid query-catalog scope graph <${r}>: ${n.reason}`);if(Oe(e,a)!==r)throw new Error(`Query-catalog scope graph <${r}> is not a canonical subgraph IRI.`);return a}function gr(e,r={}){return{sparql:Rt(e.sparql,e.parameters,r),...e.view?{view:e.view}:{},...e.subGraph&&e.subGraph!==ue?{subGraphName:e.subGraph}:{}}}function Lt(e){return vt.includes(e)?e:void 0}function Tt(e){if(!e||typeof e!="object"||Array.isArray(e))throw new k;const r=e,t=r.capabilities;if(r.schemaVersion!==kt||(t==null?void 0:t.canonicalItems)!==!0||(t==null?void 0:t.queryParameters)!==!0||(t==null?void 0:t.executionView)!==!0||(t==null?void 0:t.graphScopeIri)!==!0||!Array.isArray(r.items))throw new k;return r.items.map((o,a)=>{if(!o||typeof o!="object"||Array.isArray(o))throw new k(`Invalid query-catalog item at index ${a}.`);const n=o,i=["queryIri","catalogIri","slug","name","sparql","catalogSlug","catalogName","subGraph","scopeGraph"];for(const l of i)if(typeof n[l]!="string")throw new k(`Invalid query-catalog item ${a}: ${l} must be a string.`);if(typeof n.rank!="number"||!Number.isFinite(n.rank)||typeof n.catalogRank!="number"||!Number.isFinite(n.catalogRank))throw new k(`Invalid query-catalog item ${a}: ranks must be finite numbers.`);const s=n.view===void 0?void 0:Lt(String(n.view));if(n.view!==void 0&&s===void 0)throw new k(`Invalid query-catalog item ${a}: unsupported execution view.`);const u=n.scopeGraph,p=typeof r.contextGraphId=="string"?r.contextGraphId:void 0;if(!p)throw new k("Invalid query-catalog response: contextGraphId must be a string.");let h;try{h=$t(p,u)}catch(l){throw new k(`Invalid query-catalog item ${a}: ${l instanceof Error?l.message:String(l)}`)}if(h!==n.subGraph)throw new k(`Invalid query-catalog item ${a}: scopeGraph and subGraph do not match.`);return{queryIri:n.queryIri,catalogIri:n.catalogIri,slug:n.slug,name:n.name,...typeof n.description=="string"?{description:n.description}:{},sparql:n.sparql,...typeof n.resultColumn=="string"?{resultColumn:n.resultColumn}:{},rank:n.rank,catalogSlug:n.catalogSlug,catalogName:n.catalogName,...typeof n.catalogDescription=="string"?{catalogDescription:n.catalogDescription}:{},catalogRank:n.catalogRank,subGraph:n.subGraph,scopeGraph:u,parameters:F(n.parameters),...s?{view:s}:{}}})}function jt(e){const r=new Map;for(const t of e){const o=`${t.subGraph}|${t.catalogSlug}`,a=r.get(o);if(a){if(a.name!==t.catalogName||a.description!==t.catalogDescription||a.rank!==t.catalogRank)throw new Error(`Query catalog ${t.catalogSlug} has conflicting metadata.`);a.queries.push(t);continue}r.set(o,{slug:t.catalogSlug,subGraph:t.subGraph,name:t.catalogName,description:t.catalogDescription,rank:t.catalogRank,queries:[t]})}return[...r.values()].map(t=>({...t,queries:[...t.queries].sort((o,a)=>o.rank-a.rank||o.name.localeCompare(a.name))})).sort((t,o)=>t.subGraph.localeCompare(o.subGraph)||t.rank-o.rank||t.name.localeCompare(o.name))}function _t(e){return e.trim().toLowerCase().normalize("NFKD").replace(/[\u0300-\u036f]/g,"").replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,48)||"saved-query"}function Ee(e,r,t){return`urn:dkg:profile:${encodeURIComponent(e)}:${r}:${encodeURIComponent(t)}`}function Mt(e){return lt(wt(ut(e)))}function N(e){return JSON.stringify(e)}function Ce(e){return`"${e}"^^<${It}>`}function br(e){const r=F(e.parameters),t=JSON.stringify({subGraph:e.subGraph,catalogSlug:e.catalogSlug,name:e.name,description:e.description,sparql:e.sparql,resultColumn:e.resultColumn,rank:e.rank,parameters:r,view:e.view}),o=`${_t(e.name)}-${Mt(t)}`,a=Ee(e.contextGraphId,"catalog",e.catalogSlug),n=Ee(e.contextGraphId,"query",o),i=Ot(e.contextGraphId,e.subGraph);Le(e.sparql,r);const s=[{subject:a,predicate:Se,object:`${E}QueryCatalog`,graph:""},{subject:a,predicate:`${E}scopeGraph`,object:i,graph:""},{subject:a,predicate:`${E}forSubGraph`,object:N(e.subGraph),graph:""},{subject:a,predicate:`${E}displayName`,object:N(e.catalogName),graph:""},{subject:a,predicate:`${E}rank`,object:Ce(e.catalogRank),graph:""},{subject:n,predicate:Se,object:`${E}SavedQuery`,graph:""},{subject:n,predicate:`${E}scopeGraph`,object:i,graph:""},{subject:n,predicate:`${E}forSubGraph`,object:N(e.subGraph),graph:""},{subject:n,predicate:`${E}inCatalog`,object:a,graph:""},{subject:n,predicate:`${E}displayName`,object:N(e.name),graph:""},{subject:n,predicate:`${E}sparqlQuery`,object:N(e.sparql),graph:""},{subject:n,predicate:`${E}rank`,object:Ce(e.rank),graph:""}];return e.catalogDescription&&s.push({subject:a,predicate:`${Ae}description`,object:N(e.catalogDescription),graph:""}),e.description&&s.push({subject:n,predicate:`${Ae}description`,object:N(e.description),graph:""}),e.resultColumn&&s.push({subject:n,predicate:`${E}resultColumn`,object:N(e.resultColumn),graph:""}),r.length>0&&s.push({subject:n,predicate:`${E}queryParameters`,object:N(Nt(r)),graph:""}),e.view&&s.push({subject:n,predicate:`${E}executionView`,object:N(e.view),graph:""}),{savedQuery:{queryIri:n,catalogIri:a,slug:o,name:e.name,description:e.description,sparql:e.sparql,resultColumn:e.resultColumn,rank:e.rank,catalogSlug:e.catalogSlug,catalogName:e.catalogName,catalogDescription:e.catalogDescription,catalogRank:e.catalogRank,subGraph:e.subGraph,scopeGraph:i,parameters:r,view:e.view,queryUri:n,catalogUri:a},quads:s}}const Gt=new Set(["meta"]),Me="__root__";function yr(e){return!Gt.has(e.name)}function G(e){const r=`did:dkg:context-graph:${e}/meta`;return`FILTER(strstarts(str(?g), ${ke(r)}))`}async function H(e,r){var o;const t=await Ie(e,{contextGraphId:r});return((o=t==null?void 0:t.result)==null?void 0:o.bindings)??[]}async function Ut(e){const r=await tt(e);return Tt(r)}const P={displayName:"Project",primaryColor:"#a855f7",accentColor:"#22c55e"},xe=e=>({slug:e,displayName:e,icon:"•",color:"#64748b",rank:99}),Qt={slug:Me,displayName:"Root",description:"Entities not in any subgraph (Context Graph root)",icon:"⊘",rank:99},Ne=e=>({typeIri:e,label:e.split(/[/#]/).pop()||e,color:"#64748b"}),B="http://dkg.io/ontology/profile/";function Ge(e){if(e==null)return"";if(typeof e=="string")return e;if(typeof e=="object"&&"value"in e){const r=e.value;return r==null?"":String(r)}return String(e)}function m(e){const r=Ge(e);if(!r)return"";const t=r.match(/^"((?:[^"\\]|\\.)*)"(?:@[\w-]+|\^\^<[^>]+>)?$/);return t?t[1].replace(/\\"/g,'"').replace(/\\n/g,`
3
+ `).replace(/\\\\/g,"\\"):r}function qt(e){const r=m(e),t=parseInt(r,10);return Number.isFinite(t)?t:0}function Ht(e){return`PREFIX prof: <${B}>
4
+ PREFIX schema: <http://schema.org/>
5
+ SELECT ?profile ?name ?description ?primary ?accent
6
+ WHERE {
7
+ GRAPH ?g {
8
+ ?profile a prof:Profile .
9
+ OPTIONAL { ?profile prof:displayName ?name }
10
+ OPTIONAL { ?profile schema:description ?description }
11
+ OPTIONAL { ?profile prof:primaryColor ?primary }
12
+ OPTIONAL { ?profile prof:accentColor ?accent }
13
+ }
14
+ ${G(e)}
15
+ } LIMIT 1`}function Ft(e){return`PREFIX prof: <${B}>
16
+ PREFIX schema: <http://schema.org/>
17
+ SELECT ?slug ?displayName ?description ?icon ?color ?rank ?timelinePredicate ?sourceAssertion
18
+ WHERE {
19
+ GRAPH ?g {
20
+ ?b a prof:SubGraphBinding ;
21
+ prof:forSubGraph ?slug .
22
+ OPTIONAL { ?b prof:displayName ?displayName }
23
+ OPTIONAL { ?b schema:description ?description }
24
+ OPTIONAL { ?b prof:icon ?icon }
25
+ OPTIONAL { ?b prof:color ?color }
26
+ OPTIONAL { ?b prof:rank ?rank }
27
+ OPTIONAL { ?b prof:timelinePredicate ?timelinePredicate }
28
+ OPTIONAL { ?b prof:sourceAssertion ?sourceAssertion }
29
+ }
30
+ ${G(e)}
31
+ }`}function Bt(e){return`PREFIX prof: <${B}>
32
+ SELECT ?chip ?subGraph ?type ?predicate ?label
33
+ (GROUP_CONCAT(DISTINCT ?v; separator="|") AS ?values)
34
+ WHERE {
35
+ GRAPH ?g {
36
+ ?chip a prof:FilterChip ;
37
+ prof:forSubGraph ?subGraph ;
38
+ prof:forType ?type ;
39
+ prof:onPredicate ?predicate ;
40
+ prof:chipValue ?v .
41
+ OPTIONAL { ?chip prof:label ?label }
42
+ }
43
+ ${G(e)}
44
+ }
45
+ GROUP BY ?chip ?subGraph ?type ?predicate ?label`}function Vt(e){const r=e.map(s=>s.catalogIri?s:{...s,catalogSlug:`default:${s.subGraph}`}),t=r.map(s=>({slug:s.slug,subGraph:s.subGraph,catalogSlug:s.catalogSlug,catalogName:s.catalogName,catalogDescription:s.catalogDescription,catalogRank:s.catalogRank,name:s.name,description:s.description,sparql:s.sparql,resultColumn:s.resultColumn??"",rank:s.rank,view:s.view,parameters:s.parameters})),o=new Map(r.map((s,u)=>[s.queryIri,t[u]])),a=jt(r).map(s=>({slug:s.slug,subGraph:s.subGraph,name:s.name,description:s.description,rank:s.rank,queries:s.queries.map(u=>o.get(u.queryIri)).filter(u=>!!u)})),n=new Map,i=new Map;for(const s of a){const u=n.get(s.subGraph)??[];u.push(s),n.set(s.subGraph,u);const p=i.get(s.subGraph)??[];p.push(...s.queries),i.set(s.subGraph,p)}return{queryCatalogs:a,savedQueries:t,catalogsBySubGraph:n,queriesBySubGraph:i}}function Dt(e){return`PREFIX prof: <${B}>
46
+ SELECT ?type ?label ?icon ?color ?detailHint
47
+ ?promoteLabel ?promoteHint ?publishLabel ?publishHint
48
+ WHERE {
49
+ GRAPH ?g {
50
+ ?b a prof:EntityTypeBinding ;
51
+ prof:forType ?type .
52
+ OPTIONAL { ?b prof:label ?label }
53
+ OPTIONAL { ?b prof:icon ?icon }
54
+ OPTIONAL { ?b prof:color ?color }
55
+ OPTIONAL { ?b prof:detailHint ?detailHint }
56
+ OPTIONAL { ?b prof:promoteLabel ?promoteLabel }
57
+ OPTIONAL { ?b prof:promoteHint ?promoteHint }
58
+ OPTIONAL { ?b prof:publishLabel ?publishLabel }
59
+ OPTIONAL { ?b prof:publishHint ?publishHint }
60
+ }
61
+ ${G(e)}
62
+ }`}function Wt(e){return`PREFIX prof: <${B}>
63
+ PREFIX schema: <http://schema.org/>
64
+ SELECT ?view ?name ?description ?nodeSize
65
+ (GROUP_CONCAT(DISTINCT ?incType; separator="|") AS ?includeTypes)
66
+ (GROUP_CONCAT(DISTINCT ?empPred; separator="|") AS ?emphasizePredicates)
67
+ WHERE {
68
+ GRAPH ?g {
69
+ ?view a prof:ViewConfig .
70
+ OPTIONAL { ?view prof:displayName ?name }
71
+ OPTIONAL { ?view schema:description ?description }
72
+ OPTIONAL { ?view prof:nodeSize ?nodeSize }
73
+ OPTIONAL { ?view prof:includeType ?incType }
74
+ OPTIONAL { ?view prof:emphasizePredicate ?empPred }
75
+ }
76
+ ${G(e)}
77
+ }
78
+ GROUP BY ?view ?name ?description ?nodeSize`}function T(e){const r=Ge(e);if(!r)return"";const t=r.trim();return t.startsWith("<")&&t.endsWith(">")?t.slice(1,-1):t}function wr(e){const[r,t]=f.useState(!0),[o,a]=f.useState(),[n,i]=f.useState(P.displayName),[s,u]=f.useState(),[p,h]=f.useState(P.primaryColor),[l,b]=f.useState(P.accentColor),[g,S]=f.useState([]),[v,I]=f.useState([]),[U,V]=f.useState([]),[pe,D]=f.useState([]),[W,Q]=f.useState([]),[z,j]=f.useState([]),M=f.useRef(new Map),Z=f.useRef(new Map),J=f.useRef(new Map),ee=f.useRef(new Map),te=f.useRef(new Map),re=f.useRef(new Map),O=f.useRef();f.useEffect(()=>{if(O.current=void 0,i(e??P.displayName),u(void 0),h(P.primaryColor),b(P.accentColor),S([]),I([]),V([]),D([]),Q([]),j([]),M.current=new Map,Z.current=new Map,J.current=new Map,ee.current=new Map,te.current=new Map,re.current=new Map,a(void 0),!e){t(!1);return}let y=!1;return(async()=>{t(!0);try{const[_,We,ze,Xe,Ye,ae]=await Promise.all([H(Ht(e),e).catch(()=>[]),H(Ft(e),e).catch(()=>[]),H(Dt(e),e).catch(()=>[]),H(Wt(e),e).catch(()=>[]),H(Bt(e),e).catch(()=>[]),Ut(e).then(c=>({rows:c,error:void 0})).catch(c=>({rows:[],error:c instanceof Error?c.message:String(c)}))]);if(y)return;const de=e;if(_[0]){const c=_[0];i(m(c.name)||de),u(m(c.description)||void 0),h(m(c.primary)||P.primaryColor),b(m(c.accent)||P.accentColor)}else i(de),u(void 0),h(P.primaryColor),b(P.accentColor);const fe=We.map(c=>({slug:m(c.slug),displayName:m(c.displayName)||m(c.slug),description:m(c.description)||void 0,icon:m(c.icon)||void 0,color:m(c.color)||void 0,rank:qt(c.rank)||99,timelinePredicate:T(c.timelinePredicate)||void 0,sourceAssertion:m(c.sourceAssertion)||void 0})).filter(c=>c.slug).sort((c,C)=>c.rank-C.rank);S(fe),Z.current=new Map(fe.map(c=>[c.slug,c]));const he=ze.map(c=>({typeIri:T(c.type),label:m(c.label)||void 0,icon:m(c.icon)||void 0,color:m(c.color)||void 0,detailHint:m(c.detailHint)||void 0,promoteLabel:m(c.promoteLabel)||void 0,promoteHint:m(c.promoteHint)||void 0,publishLabel:m(c.publishLabel)||void 0,publishHint:m(c.publishHint)||void 0})).filter(c=>c.typeIri);I(he),M.current=new Map(he.map(c=>[c.typeIri,c]));const me=Xe.map(c=>{const C=T(c.view),Y=C.split(":view:").pop()??C;return{slug:Y,name:m(c.name)||Y,description:m(c.description)||void 0,nodeSize:m(c.nodeSize)||void 0,includeTypes:m(c.includeTypes).split("|").map(q=>T(q.trim())).filter(Boolean),emphasizePredicates:m(c.emphasizePredicates).split("|").map(q=>T(q.trim())).filter(Boolean)}});V(me),J.current=new Map(me.map(c=>[c.slug,c]));const ge=Ye.map(c=>{const C=T(c.chip),Y=C.split(":chip:").pop()??C,q=m(c.values).split("|").map(Ke=>m(Ke.trim())).filter(Boolean);return{slug:Y,subGraph:m(c.subGraph),typeIri:T(c.type),predicate:T(c.predicate),label:m(c.label)||"Filter",values:q}}).filter(c=>c.subGraph&&c.predicate&&c.values.length>0);D(ge);const ne=new Map;for(const c of ge){const C=ne.get(c.subGraph)??[];C.push(c),ne.set(c.subGraph,C)}ee.current=ne;const X=Vt(ae.rows);Q(X.queryCatalogs),j(X.savedQueries),te.current=X.catalogsBySubGraph,re.current=X.queriesBySubGraph,O.current=e,ae.error&&a(ae.error)}catch(_){y||a((_==null?void 0:_.message)??String(_))}finally{y||t(!1)}})(),()=>{y=!0}},[e]);const qe=f.useCallback(y=>y===Me?Qt:O.current!==e?xe(y):Z.current.get(y)??xe(y),[e]),He=f.useCallback(y=>O.current===e?M.current.get(y)??Ne(y):Ne(y),[e]),Fe=f.useCallback(y=>O.current===e?J.current.get(y):void 0,[e]),Be=f.useCallback(y=>O.current===e?ee.current.get(y)??[]:[],[e]),Ve=f.useCallback(y=>O.current===e?te.current.get(y)??[]:[],[e]),De=f.useCallback(y=>O.current===e?re.current.get(y)??[]:[],[e]);return{contextGraphId:e??"",displayName:n,description:s,primaryColor:p,accentColor:l,subGraphs:g,typeBindings:v,views:U,filterChips:pe,queryCatalogs:W,savedQueries:z,loading:r,error:o,forSubGraph:qe,forType:He,view:Fe,chipsFor:Be,savedQueryCatalogsFor:Ve,savedQueriesFor:De}}const zt=K.createContext(null);function Xt(){return f.useContext(zt)}const Yt="http://dkg.io/ontology/agent/";function Kt(e){return`PREFIX ag: <${Yt}>
79
+ PREFIX schema: <http://schema.org/>
80
+ PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
81
+ SELECT ?a ?kind ?name ?label ?fw ?op ?wallet ?peerId ?avatar ?reputation
82
+ WHERE {
83
+ GRAPH ?g {
84
+ ?a a ag:Agent .
85
+ OPTIONAL { ?a a ag:HumanAgent . BIND("human" AS ?kind) }
86
+ OPTIONAL { ?a a ag:AIAgent . BIND("ai" AS ?kindAi) }
87
+ OPTIONAL { ?a schema:name ?name }
88
+ OPTIONAL { ?a rdfs:label ?label }
89
+ OPTIONAL { ?a ag:framework ?fw }
90
+ OPTIONAL { ?a ag:operator ?op }
91
+ OPTIONAL { ?a ag:walletAddress ?wallet }
92
+ OPTIONAL { ?a ag:peerId ?peerId }
93
+ OPTIONAL { ?a ag:avatar ?avatar }
94
+ OPTIONAL { ?a ag:reputation ?reputation }
95
+ }
96
+ ${G(e)}
97
+ }`}function Ue(e){if(e==null)return"";if(typeof e=="string")return e;if(typeof e=="object"&&"value"in e){const r=e.value;return r==null?"":String(r)}return String(e)}function R(e){const r=Ue(e);if(!r)return"";const t=r.match(/^"((?:[^"\\]|\\.)*)"(?:@[\w-]+|\^\^<[^>]+>)?$/);return t?t[1].replace(/\\"/g,'"').replace(/\\n/g,`
98
+ `).replace(/\\\\/g,"\\"):r}function Pe(e){const r=Ue(e);if(!r)return"";const t=r.trim();return t.startsWith("<")&&t.endsWith(">")?t.slice(1,-1):t}function Zt(e){let r=0;for(let a=0;a<e.length;a++)r=r*31+e.charCodeAt(a)|0;return`hsl(${((r%360+360)%360+25)%360}, 55%, 58%)`}function Jt(e){const r=new Map;for(const t of e){const o=Pe(t.a);if(!o)continue;const a=r.get(o),n=R(t.kindAi)==="ai"||R(t.kind)==="ai"?"ai":R(t.kind)==="human"?"human":(a==null?void 0:a.kind)??"ai",i={uri:o,name:R(t.name)||R(t.label)||o.split(":").pop()||o,kind:n,framework:R(t.fw)||(a==null?void 0:a.framework),operatorUri:Pe(t.op)||(a==null?void 0:a.operatorUri),walletAddress:R(t.wallet)||(a==null?void 0:a.walletAddress),peerId:R(t.peerId)||(a==null?void 0:a.peerId),avatar:R(t.avatar)||(a==null?void 0:a.avatar),reputation:R(t.reputation)||(a==null?void 0:a.reputation),color:Zt(o)};i.kind==="human"&&!i.framework&&(i.framework="human"),r.set(o,i)}for(const t of r.values())if(t.operatorUri){const o=r.get(t.operatorUri);o&&(t.operatorName=o.name)}return r}function vr(e){const[r,t]=f.useState(()=>new Map),[o,a]=f.useState(!0),[n,i]=f.useState(),s=f.useRef(new Map);f.useEffect(()=>{if(!e){a(!1);return}let l=!1;return(async()=>{var b;a(!0),i(void 0);try{const g=await Ie(Kt(e),{contextGraphId:e});if(l)return;const S=((b=g==null?void 0:g.result)==null?void 0:b.bindings)??[],v=Jt(S);t(v),s.current=v}catch(g){l||i((g==null?void 0:g.message)??String(g))}finally{l||a(!1)}})(),()=>{l=!0}},[e]);const u=f.useCallback(l=>s.current.get(l),[]),p=K.useMemo(()=>[...r.values()].sort((l,b)=>l.name.localeCompare(b.name)),[r]),h=f.useCallback(l=>{},[]);return{agents:r,list:p,loading:o,error:n,get:u,openAgent:h}}const er=K.createContext(null);function Qe(){return f.useContext(er)}const Re={"claude-code":"⦿",openclaw:"◈",hermes:"⬡",gemini:"✧",human:"👤"};function tr(e,r){return e&&Re[e]?Re[e]:r==="human"?"👤":"◉"}function rr(e){const r=e.trim();if(!r)return"?";const t=r.split(/[\s_-]+/).filter(Boolean);return t.length===1?t[0].slice(0,2).toUpperCase():(t[0][0]+(t[1][0]??"")).toUpperCase()}function ar(e){const r=e.trim();return r.length<=11?r:`${r.slice(0,6)}…${r.slice(-4)}`}const nr=({agent:e,fallbackUri:r,size:t="sm",showOperator:o=!1,onOpenAgent:a,className:n=""})=>{const i=Qe();if(!e&&!r)return null;const s=a??(i==null?void 0:i.openAgent),u=(e==null?void 0:e.uri)??r,p=(e==null?void 0:e.name)??(r?ar(r.split(":").pop()??r):"unknown"),h=(e==null?void 0:e.kind)??"ai",l=e==null?void 0:e.framework,b=tr(l,h),g=(e==null?void 0:e.color)??"hsl(0, 0%, 55%)",S=[p,l?`framework: ${l}`:null,e!=null&&e.operatorName?`operator: ${e.operatorName}`:null,e!=null&&e.walletAddress?`wallet: ${e.walletAddress}`:null,e!=null&&e.peerId?`peer: ${e.peerId.slice(0,20)}…`:null,e!=null&&e.reputation?`— ${e.reputation}`:null,u].filter(Boolean).join(`
99
+ `),v=s?()=>s(u):void 0,I=!!v;return d.jsxs("span",{className:`v10-agent-chip v10-agent-chip-${t}${I?" interactive":""} ${n}`,style:{"--agent-color":g},onClick:v?U=>{U.stopPropagation(),v()}:void 0,title:S,role:I?"button":void 0,tabIndex:I?0:void 0,children:[d.jsxs("span",{className:"v10-agent-chip-avatar",style:{background:g},children:[d.jsx("span",{className:"v10-agent-chip-initials",children:rr(p)}),d.jsx("span",{className:"v10-agent-chip-glyph",title:l??h,children:b})]}),d.jsxs("span",{className:"v10-agent-chip-body",children:[d.jsx("span",{className:"v10-agent-chip-name",children:p}),t==="lg"&&((e==null?void 0:e.operatorName)||l)&&d.jsxs("span",{className:"v10-agent-chip-sub",children:[l&&h==="ai"&&d.jsx("span",{className:"v10-agent-chip-fw",children:l}),(e==null?void 0:e.operatorName)&&h==="ai"&&d.jsxs(d.Fragment,{children:[l&&d.jsx("span",{className:"v10-agent-chip-sep",children:"·"}),d.jsxs("span",{className:"v10-agent-chip-op",children:["driven by ",e.operatorName]})]}),h==="human"&&d.jsx("span",{className:"v10-agent-chip-fw",children:"human"})]}),t==="md"&&o&&(e==null?void 0:e.operatorName)&&h==="ai"&&d.jsx("span",{className:"v10-agent-chip-sub",children:d.jsxs("span",{className:"v10-agent-chip-op",children:["· ",e.operatorName]})})]})]})},ie={working:"#64748b",shared:"#f59e0b",verified:"#22c55e"},sr={working:"◇",shared:"◈",verified:"◉"},or=200,Ar=({entities:e,agentUri:r,typeIri:t,subGraph:o,limit:a,includeUndated:n=!0,swmEvents:i,lifecycleEvents:s,lifecycleError:u,title:p,onSelectEntity:h,onOpenAgent:l,emptyHint:b,className:g=""})=>{const{items:S,hasMore:v}=rt(e,{agentUri:r,typeIri:t,subGraph:o,limit:a,includeUndated:n,swmEvents:i,lifecycleEvents:s}),I=K.useMemo(()=>at(S),[S]),U=Qe(),V=Xt(),D=v?`${a??or}+`:String(S.length),W=u!=null&&S.length===0,Q=p?d.jsxs("div",{className:"v10-activity-feed-title",children:[d.jsx("span",{className:"v10-activity-feed-title-label",children:p}),d.jsx("span",{className:"v10-activity-feed-title-count","data-state":W?"error":void 0,children:W?"—":D})]}):null,z=u?d.jsx("div",{className:"v10-activity-feed-error",role:"status","aria-live":"polite",title:u,children:"Couldn't load recent activity."}):null;return S.length===0?d.jsxs("div",{className:`v10-activity-feed v10-activity-feed-empty ${g}`,children:[Q,z??d.jsx("div",{className:"v10-activity-feed-empty-hint",children:b??"No activity with a timestamp yet."})]}):d.jsxs("div",{className:`v10-activity-feed ${g}`,children:[Q,z,I.map(j=>d.jsxs("div",{className:"v10-activity-feed-bucket",children:[d.jsxs("div",{className:"v10-activity-feed-bucket-head",children:[d.jsx("span",{className:"v10-activity-feed-bucket-label",children:j.label}),d.jsx("span",{className:"v10-activity-feed-bucket-count",children:j.items.length})]}),d.jsx("div",{className:"v10-activity-feed-items",children:j.items.map(M=>d.jsx(ir,{item:M,agents:U,profile:V,onSelectEntity:h,onOpenAgent:l},M.id))})]},j.key))]})};function ir({item:e,agents:r,profile:t,onSelectEntity:o,onOpenAgent:a}){const n=e.authorUri?r==null?void 0:r.get(e.authorUri):null,i=e.event==="typed",s=i&&e.kindUri?t==null?void 0:t.forType(e.kindUri):null,u=e.event==="added"?"Added":e.event==="promoted"?e.entityCount!=null&&e.entityCount>0?`Promoted to SWM · ${e.entityCount} ${e.entityCount===1?"entity":"entities"}`:"Promoted to SWM":e.event==="published"?"Published to VM":(s==null?void 0:s.label)??(e.kindUri?e.kindUri.split(/[#/]/).pop():null)??"Entity",p=e.event==="added"?"+":e.event==="promoted"?"⇡":e.event==="published"?"◉":(s==null?void 0:s.icon)??"◆",h=e.event==="promoted"?ie.shared:e.event==="published"?ie.verified:e.event==="added"?"#64748b":(s==null?void 0:s.color)??"#a855f7",l=ie[e.layer],b=i?cr(e.entity):null,g=(()=>{const v=[];return e.event!=="typed"&&v.push(u),v.push(e.entity.label),e.at&&v.push(e.at.toISOString()),v.join(`
100
+ `)})(),S=d.jsxs(d.Fragment,{children:[d.jsx("span",{className:"v10-activity-feed-layer",style:{color:l},title:`${e.layer} memory`,children:sr[e.layer]}),d.jsxs("span",{className:"v10-activity-feed-type",style:{"--type-color":h},children:[d.jsx("span",{className:"v10-activity-feed-type-icon",children:p}),d.jsx("span",{className:"v10-activity-feed-type-label",children:u})]}),d.jsx("span",{className:"v10-activity-feed-title-text",children:e.entity.label}),b&&d.jsx("span",{className:`v10-activity-feed-status status-${lr(b)}`,children:b}),(n||e.authorUri)&&d.jsx("span",{className:"v10-activity-feed-author",children:d.jsx(nr,{agent:n??void 0,fallbackUri:e.authorUri??void 0,size:"sm",onOpenAgent:a})}),d.jsx("span",{className:"v10-activity-feed-time",title:e.at?e.at.toLocaleString():"no timestamp",children:nt(e.at)})]});return e.clickable?d.jsx("button",{type:"button",className:"v10-activity-feed-row",onClick:()=>o(e.entity.uri),title:g,children:S}):d.jsx("div",{className:"v10-activity-feed-row v10-activity-feed-row-static",title:g,"aria-disabled":"true",children:S})}function cr(e){var t;const r=["http://dkg.io/ontology/decisions/status","http://dkg.io/ontology/tasks/status","http://dkg.io/ontology/github/state"];for(const o of r){const a=(t=e.properties.get(o))==null?void 0:t[0];if(a)return a}return null}function lr(e){switch(e){case"accepted":case"done":case"merged":return"good";case"proposed":case"in_progress":case"open":return"warn";case"rejected":case"superseded":case"blocked":case"cancelled":return"bad";default:return"neutral"}}export{Ar as A,ue as C,zt as P,Me as R,mr as U,nr as a,er as b,hr as c,br as d,yr as e,Qe as f,wr as g,Xt as h,fr as i,gr as p,_t as q,vr as u};
@@ -1 +1 @@
1
- import{ad as e,P as t}from"./index-BfrYentv.js";function n(){return e.jsxs("div",{className:"page-section",style:{display:"flex",flexDirection:"column",height:"100%",padding:0},children:[e.jsxs("div",{style:{marginBottom:20},children:[e.jsx("h1",{className:"page-title",style:{marginBottom:0},children:"Agent Hub"}),e.jsx("p",{style:{fontSize:12,color:"var(--text-muted)",marginTop:4},children:"Bring your own agent into the node. OpenClaw chat, network peers, and integrated-agent session history live here."})]}),e.jsx("div",{style:{flex:1,minHeight:0,border:"1px solid var(--border)",borderRadius:12,overflow:"hidden",background:"var(--bg)"},children:e.jsx(t,{})})]})}export{n as AgentHubPage};
1
+ import{aN as e,j as t}from"./index-RLb1kuzE.js";function n(){return e.jsxs("div",{className:"page-section",style:{display:"flex",flexDirection:"column",height:"100%",padding:0},children:[e.jsxs("div",{style:{marginBottom:20},children:[e.jsx("h1",{className:"page-title",style:{marginBottom:0},children:"Agent Hub"}),e.jsx("p",{style:{fontSize:12,color:"var(--text-muted)",marginTop:4},children:"Bring your own agent into the node. OpenClaw chat, network peers, and integrated-agent session history live here."})]}),e.jsx("div",{style:{flex:1,minHeight:0,border:"1px solid var(--border)",borderRadius:12,overflow:"hidden",background:"var(--bg)"},children:e.jsx(t,{})})]})}export{n as AgentHubPage};
@@ -0,0 +1 @@
1
+ import{ba as x,aN as e,bB as w,bJ as P,bI as A,R as b}from"./index-RLb1kuzE.js";import{f as C,h as T,a as N,A as R,g as E,u as $,P as B,b as D}from"./ActivityFeed-CC5S_gk9.js";import"./useProjectActivity-OdoQs9mK.js";const M="http://www.w3.org/ns/prov#wasAttributedTo",k=[{iri:"http://dkg.io/ontology/decisions/Decision",label:"Decisions"},{iri:"http://dkg.io/ontology/tasks/Task",label:"Tasks"},{iri:"http://dkg.io/ontology/github/PullRequest",label:"Pull Requests"},{iri:"http://dkg.io/ontology/github/Issue",label:"Issues"},{iri:"http://dkg.io/ontology/github/Commit",label:"Commits"}],S=({agentUri:a,entityList:d,onSelectEntity:u,onOpenAgent:r,onBack:j})=>{const o=C(),c=T(),s=(o==null?void 0:o.get(a))??null,p=x.useMemo(()=>{const t=new Map;for(const l of d){if(!l.connections.some(f=>f.predicate===M&&f.targetUri===a))continue;const n=k.find(f=>l.types.includes(f.iri));if(!n)continue;const y=t.get(n.iri)??[];y.push(l),t.set(n.iri,y)}return t},[d,a]),g=x.useMemo(()=>{let t=0;for(const l of p.values())t+=l.length;return t},[p]),m=s!=null&&s.operatorUri?(o==null?void 0:o.get(s.operatorUri))??null:null,[v,h]=x.useState(null);return e.jsxs("div",{className:"v10-agent-profile",children:[e.jsxs("div",{className:"v10-agent-profile-header",children:[e.jsx("button",{type:"button",className:"v10-ka-back",onClick:j,children:"← Back"}),e.jsxs("div",{className:"v10-agent-profile-head",children:[e.jsx(N,{agent:s??void 0,fallbackUri:a,size:"lg",showOperator:!0}),(s==null?void 0:s.reputation)&&e.jsx("div",{className:"v10-agent-profile-reputation",children:s.reputation})]}),e.jsxs("div",{className:"v10-agent-profile-meta",children:[(s==null?void 0:s.walletAddress)&&e.jsxs("div",{className:"v10-agent-profile-meta-row",children:[e.jsx("span",{className:"v10-agent-profile-meta-lbl",children:"Wallet"}),e.jsxs("span",{className:"v10-agent-profile-meta-val mono v10-agent-profile-wallet",title:s.walletAddress,children:[s.walletAddress,e.jsx("button",{type:"button",className:"v10-agent-profile-copy",onClick:t=>{var l;t.stopPropagation(),(l=navigator.clipboard)==null||l.writeText(s.walletAddress).catch(()=>{})},title:"Copy wallet address",children:"⎘"})]})]}),e.jsxs("div",{className:"v10-agent-profile-meta-row",children:[e.jsx("span",{className:"v10-agent-profile-meta-lbl",children:"URI"}),e.jsx("span",{className:"v10-agent-profile-meta-val mono",children:a})]}),(s==null?void 0:s.peerId)&&e.jsxs("div",{className:"v10-agent-profile-meta-row",children:[e.jsx("span",{className:"v10-agent-profile-meta-lbl",children:"Peer ID"}),e.jsx("span",{className:"v10-agent-profile-meta-val mono",children:s.peerId})]}),m&&e.jsxs("div",{className:"v10-agent-profile-meta-row",children:[e.jsx("span",{className:"v10-agent-profile-meta-lbl",children:"Driven by"}),e.jsx("span",{className:"v10-agent-profile-meta-val",children:e.jsx(N,{agent:m,size:"sm",onOpenAgent:r})})]}),(s==null?void 0:s.framework)&&e.jsxs("div",{className:"v10-agent-profile-meta-row",children:[e.jsx("span",{className:"v10-agent-profile-meta-lbl",children:"Framework"}),e.jsx("span",{className:"v10-agent-profile-meta-val mono",children:s.framework})]})]})]}),e.jsxs("div",{className:"v10-agent-profile-stats",children:[e.jsxs("button",{type:"button",className:`v10-agent-profile-stat${v===null?" active":""}`,onClick:()=>h(null),children:[e.jsx("span",{className:"v10-agent-profile-stat-val",children:g}),e.jsx("span",{className:"v10-agent-profile-stat-lbl",children:"All activity"})]}),k.map(t=>{const l=p.get(t.iri)??[];if(l.length===0)return null;const i=c==null?void 0:c.forType(t.iri),n=(i==null?void 0:i.color)??"#a855f7";return e.jsxs("button",{type:"button",className:`v10-agent-profile-stat${v===t.iri?" active":""}`,style:{"--stat-color":n},onClick:()=>h(t.iri),children:[e.jsx("span",{className:"v10-agent-profile-stat-val",children:l.length}),e.jsx("span",{className:"v10-agent-profile-stat-lbl",children:i!=null&&i.label?i.label:t.label})]},t.iri)})]}),e.jsx(R,{entities:d,agentUri:a,typeIri:v??void 0,onSelectEntity:u,onOpenAgent:r,title:e.jsxs(e.Fragment,{children:["All activity",s&&e.jsxs("span",{className:"v10-agent-profile-feed-sub",children:[" · authored by ",s.name]})]}),emptyHint:g===0?`${(s==null?void 0:s.name)??a} hasn't authored anything in this project yet.`:"No entries match the current filter."})]})},V=({contextGraphId:a,agentUri:d})=>{const u=E(a),r=$(a),j=w(a),{openTab:o,closeTab:c,activeTabId:s}=P(),{setActiveProject:p}=A(),g=b.useCallback(t=>{p(a),o({id:`project:${a}`,label:u.displayName||a.slice(0,16),closable:!0}),window.dispatchEvent(new CustomEvent("v10:open-entity",{detail:{contextGraphId:a,entityUri:t}}))},[a,o,u.displayName,p]),m=b.useCallback(t=>{var n;const l=t.startsWith("urn:dkg:agent:")?t.slice(14):t,i=((n=r.get(t))==null?void 0:n.name)??l;o({id:`agent:${a}|${l}`,label:`@ ${i}`,closable:!0})},[a,r,o]),v=b.useCallback(()=>{s&&c(s)},[s,c]),h=b.useMemo(()=>({...r,openAgent:m}),[r,m]);return e.jsx(B.Provider,{value:u,children:e.jsx(D.Provider,{value:h,children:e.jsx(S,{agentUri:d,entityList:j.entityList,onSelectEntity:g,onOpenAgent:m,onBack:v})})})};export{V as AgentProfilePage};