@undefineds.co/xpod 0.3.70 → 0.3.71-rc.13

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 (172) hide show
  1. package/config/cloud.json +3 -0
  2. package/config/local.json +3 -0
  3. package/config/resolver.json +7 -0
  4. package/config/xpod.base.json +20 -0
  5. package/dist/agents/ClaudeExecutor.js +1 -1
  6. package/dist/agents/ClaudeExecutor.js.map +1 -1
  7. package/dist/agents/types.d.ts +5 -5
  8. package/dist/agents/types.js.map +1 -1
  9. package/dist/api/ai-gateway/AiGatewayService.d.ts +5 -16
  10. package/dist/api/ai-gateway/AiGatewayService.js +13 -35
  11. package/dist/api/ai-gateway/AiGatewayService.js.map +1 -1
  12. package/dist/api/ai-gateway/auth/AiConnectionInvocationKeyIssuer.d.ts +3 -2
  13. package/dist/api/ai-gateway/auth/AiConnectionInvocationKeyIssuer.js +37 -12
  14. package/dist/api/ai-gateway/auth/AiConnectionInvocationKeyIssuer.js.map +1 -1
  15. package/dist/api/ai-gateway/auth/GatewayPrincipal.d.ts +2 -16
  16. package/dist/api/ai-gateway/auth/GatewayPrincipal.js +3 -33
  17. package/dist/api/ai-gateway/auth/GatewayPrincipal.js.map +1 -1
  18. package/dist/api/ai-gateway/auth/InvocationTokenAuthenticator.d.ts +23 -0
  19. package/dist/api/ai-gateway/auth/InvocationTokenAuthenticator.js +81 -0
  20. package/dist/api/ai-gateway/auth/InvocationTokenAuthenticator.js.map +1 -0
  21. package/dist/api/ai-gateway/auth/InvocationTokenCodec.d.ts +7 -4
  22. package/dist/api/ai-gateway/auth/InvocationTokenCodec.js.map +1 -1
  23. package/dist/api/ai-gateway/connect/index.d.ts +7 -26
  24. package/dist/api/ai-gateway/connect/index.js +40 -67
  25. package/dist/api/ai-gateway/connect/index.js.map +1 -1
  26. package/dist/api/ai-gateway/credentials/PlaintextCredentialPayload.d.ts +17 -0
  27. package/dist/api/ai-gateway/credentials/PlaintextCredentialPayload.js +65 -0
  28. package/dist/api/ai-gateway/credentials/PlaintextCredentialPayload.js.map +1 -0
  29. package/dist/api/ai-gateway/pod/HostedPodDataAccess.d.ts +24 -0
  30. package/dist/api/ai-gateway/pod/HostedPodDataAccess.js +149 -0
  31. package/dist/api/ai-gateway/pod/HostedPodDataAccess.js.map +1 -0
  32. package/dist/api/ai-gateway/quota/ProviderQuotaAdapter.d.ts +13 -5
  33. package/dist/api/ai-gateway/quota/ProviderQuotaAdapter.js +16 -19
  34. package/dist/api/ai-gateway/quota/ProviderQuotaAdapter.js.map +1 -1
  35. package/dist/api/ai-gateway/service-access/AiConnectionServiceAccess.d.ts +1 -1
  36. package/dist/api/ai-gateway/service-access/AiConnectionServiceAccess.js +0 -2
  37. package/dist/api/ai-gateway/service-access/AiConnectionServiceAccess.js.map +1 -1
  38. package/dist/api/auth/AuthContext.d.ts +1 -12
  39. package/dist/api/auth/AuthContext.js +0 -11
  40. package/dist/api/auth/AuthContext.js.map +1 -1
  41. package/dist/api/auth/ClientCredentialsAuthenticator.js +4 -11
  42. package/dist/api/auth/ClientCredentialsAuthenticator.js.map +1 -1
  43. package/dist/api/chatkit/default-agent.d.ts +2 -2
  44. package/dist/api/chatkit/default-agent.js +4 -4
  45. package/dist/api/chatkit/default-agent.js.map +1 -1
  46. package/dist/api/chatkit/runtime/AcpAgentRuntime.js +1 -1
  47. package/dist/api/chatkit/runtime/AcpAgentRuntime.js.map +1 -1
  48. package/dist/api/container/common.js +28 -69
  49. package/dist/api/container/common.js.map +1 -1
  50. package/dist/api/container/index.js +5 -6
  51. package/dist/api/container/index.js.map +1 -1
  52. package/dist/api/container/routes.js +2 -5
  53. package/dist/api/container/routes.js.map +1 -1
  54. package/dist/api/container/types.d.ts +8 -10
  55. package/dist/api/container/types.js.map +1 -1
  56. package/dist/api/handlers/AiClientConfigurationHandler.js +3 -3
  57. package/dist/api/handlers/AiClientConfigurationHandler.js.map +1 -1
  58. package/dist/api/handlers/AiGatewayHandler.js +2 -2
  59. package/dist/api/handlers/AiGatewayHandler.js.map +1 -1
  60. package/dist/api/handlers/AiGatewayManagementHandler.d.ts +2 -10
  61. package/dist/api/handlers/AiGatewayManagementHandler.js +4 -154
  62. package/dist/api/handlers/AiGatewayManagementHandler.js.map +1 -1
  63. package/dist/api/handlers/NetworkSettingsHandler.js +0 -3
  64. package/dist/api/handlers/NetworkSettingsHandler.js.map +1 -1
  65. package/dist/api/handlers/PodSettingsHandler.d.ts +5 -2
  66. package/dist/api/handlers/PodSettingsHandler.js +3 -3
  67. package/dist/api/handlers/PodSettingsHandler.js.map +1 -1
  68. package/dist/api/runs/AgentRuntimeTypes.d.ts +3 -3
  69. package/dist/api/runs/AgentRuntimeTypes.js +10 -10
  70. package/dist/api/runs/AgentRuntimeTypes.js.map +1 -1
  71. package/dist/api/runs/InngestRunExecutionBackend.d.ts +15 -9
  72. package/dist/api/runs/InngestRunExecutionBackend.js +25 -10
  73. package/dist/api/runs/InngestRunExecutionBackend.js.map +1 -1
  74. package/dist/api/runs/PiAgentRuntimeDriver.js +2 -2
  75. package/dist/api/runs/PiAgentRuntimeDriver.js.map +1 -1
  76. package/dist/api/runs/RunStateCenter.js +1 -1
  77. package/dist/api/runs/RunStateCenter.js.map +1 -1
  78. package/dist/api/service/AiClientConfigurationService.d.ts +2 -2
  79. package/dist/api/service/AiClientConfigurationService.js +11 -11
  80. package/dist/api/service/AiClientConfigurationService.js.map +1 -1
  81. package/dist/api/tasks/InngestTaskScheduler.d.ts +16 -10
  82. package/dist/api/tasks/InngestTaskScheduler.js +24 -12
  83. package/dist/api/tasks/InngestTaskScheduler.js.map +1 -1
  84. package/dist/cli/commands/start.js +7 -7
  85. package/dist/cli/commands/start.js.map +1 -1
  86. package/dist/components/components.jsonld +1 -0
  87. package/dist/components/context.jsonld +36 -0
  88. package/dist/http/InternalPodDataHttpHandler.d.ts +32 -0
  89. package/dist/http/InternalPodDataHttpHandler.js +258 -0
  90. package/dist/http/InternalPodDataHttpHandler.js.map +1 -0
  91. package/dist/http/InternalPodDataHttpHandler.jsonld +201 -0
  92. package/dist/index.d.ts +2 -1
  93. package/dist/index.js +4 -2
  94. package/dist/index.js.map +1 -1
  95. package/dist/main.js +13 -13
  96. package/dist/main.js.map +1 -1
  97. package/dist/runtime/GatewayAdminProxyAuth.d.ts +15 -1
  98. package/dist/runtime/GatewayAdminProxyAuth.js +57 -2
  99. package/dist/runtime/GatewayAdminProxyAuth.js.map +1 -1
  100. package/dist/runtime/bootstrap.js +3 -0
  101. package/dist/runtime/bootstrap.js.map +1 -1
  102. package/dist/runtime/css-process.d.ts +1 -1
  103. package/dist/runtime/css-process.js +4 -1
  104. package/dist/runtime/css-process.js.map +1 -1
  105. package/dist/runtime/runner/node/CommunitySolidServerCssRunner.d.ts +2 -0
  106. package/dist/runtime/runner/node/CommunitySolidServerCssRunner.js +50 -0
  107. package/dist/runtime/runner/node/CommunitySolidServerCssRunner.js.map +1 -1
  108. package/node_modules/@undefineds.co/ai-connection/dist/AiClientConfigurationSection.d.ts +5 -5
  109. package/node_modules/@undefineds.co/ai-connection/dist/AiClientConfigurationSection.js +7 -7
  110. package/node_modules/@undefineds.co/ai-connection/dist/AiConnectionMain.js +1 -1
  111. package/node_modules/@undefineds.co/ai-connection/dist/AiConnectionPanel.d.ts +3 -1
  112. package/node_modules/@undefineds.co/ai-connection/dist/AiConnectionPanel.js +74 -60
  113. package/node_modules/@undefineds.co/ai-connection/dist/ai-connection-client.d.ts +0 -21
  114. package/node_modules/@undefineds.co/ai-connection/dist/ai-connection-client.js +0 -41
  115. package/node_modules/@undefineds.co/ai-connection/dist/client-config/base-adapter.d.ts +1 -0
  116. package/node_modules/@undefineds.co/ai-connection/dist/client-config/base-adapter.js +7 -2
  117. package/node_modules/@undefineds.co/ai-connection/dist/client-config/codex.js +3 -3
  118. package/node_modules/@undefineds.co/ai-connection/dist/client-config/index.cjs +15 -9
  119. package/node_modules/@undefineds.co/ai-connection/dist/client-config/json-env-adapter.js +4 -4
  120. package/node_modules/@undefineds.co/ai-connection/dist/client-config/pi.js +3 -3
  121. package/node_modules/@undefineds.co/ai-connection/dist/client-config/types.d.ts +1 -1
  122. package/node_modules/@undefineds.co/ai-connection/dist/controller.d.ts +2 -1
  123. package/node_modules/@undefineds.co/ai-connection/dist/controller.js +1 -0
  124. package/node_modules/@undefineds.co/ai-connection/dist/service-access.js +0 -1
  125. package/node_modules/@undefineds.co/extension-sdk/dist/web.d.ts +22 -1
  126. package/package.json +3 -3
  127. package/static/app/assets/main.js +7 -7
  128. package/static/dashboard/assets/NetworkPage-CXjiUMR1.js +2 -0
  129. package/static/dashboard/assets/{PaneListHeader-57nvMwH6.js → PaneListHeader-BSipfl0W.js} +1 -1
  130. package/static/dashboard/assets/PodPage-Bd3Xhmp-.js +2 -0
  131. package/static/dashboard/assets/ServicesPage-CI3jWZGe.js +1 -0
  132. package/static/dashboard/assets/{card-B9Zjf_2p.js → card-z5BV5hTo.js} +1 -1
  133. package/static/dashboard/assets/{dashboard-8C6o666W.js → dashboard-CSrqAv2L.js} +2 -2
  134. package/static/dashboard/assets/{database-DPh9wDY9.js → database-Ct5ZPe6L.js} +1 -1
  135. package/static/dashboard/assets/{external-link-VbMQvVMz.js → external-link-B7wD1hkm.js} +1 -1
  136. package/static/dashboard/assets/index-tOBaUnM1.js +44 -0
  137. package/static/dashboard/assets/{refresh-cw-BxVxNxNr.js → refresh-cw-CFDZPaE8.js} +1 -1
  138. package/static/dashboard/assets/{services-status-context-DKmJ7ISr.js → services-status-context-DN1Icg4A.js} +1 -1
  139. package/static/dashboard/dashboard.html +1 -1
  140. package/static/settings/assets/ModelsPage-03NPWzoX.js +1 -0
  141. package/static/settings/assets/{PaneListHeader-Bgaze006.js → PaneListHeader-DMD8OJef.js} +1 -1
  142. package/static/settings/assets/PodPage-DT4EMYhL.js +2 -0
  143. package/static/settings/assets/ServicesPage-CJ0ub6IH.js +1 -0
  144. package/static/settings/assets/SettingsPage-BkR7ZK18.js +41 -0
  145. package/static/settings/assets/{card-B_bXSIn-.js → card-Cjsia0_V.js} +1 -1
  146. package/static/settings/assets/{services-status-context-DiX-AbrP.js → services-status-context-CkuKmH5h.js} +1 -1
  147. package/static/settings/assets/{settings-B30oMfZq.js → settings-Cyyv6-SD.js} +2 -2
  148. package/static/settings/assets/{workspace-layout-Dv1Yn9Ci.js → workspace-layout-B47luv6r.js} +1 -1
  149. package/static/settings/settings.html +1 -1
  150. package/dist/api/ai-gateway/auth/ClientCredentialsInternalPodAccessTokenProvider.d.ts +0 -25
  151. package/dist/api/ai-gateway/auth/ClientCredentialsInternalPodAccessTokenProvider.js +0 -91
  152. package/dist/api/ai-gateway/auth/ClientCredentialsInternalPodAccessTokenProvider.js.map +0 -1
  153. package/dist/api/ai-gateway/auth/GatewayApiKey.d.ts +0 -28
  154. package/dist/api/ai-gateway/auth/GatewayApiKey.js +0 -162
  155. package/dist/api/ai-gateway/auth/GatewayApiKey.js.map +0 -1
  156. package/dist/api/ai-gateway/auth/GatewayApiKeyAuthenticator.d.ts +0 -56
  157. package/dist/api/ai-gateway/auth/GatewayApiKeyAuthenticator.js +0 -143
  158. package/dist/api/ai-gateway/auth/GatewayApiKeyAuthenticator.js.map +0 -1
  159. package/dist/api/ai-gateway/auth/GatewayKeyLocatorCodec.d.ts +0 -26
  160. package/dist/api/ai-gateway/auth/GatewayKeyLocatorCodec.js +0 -97
  161. package/dist/api/ai-gateway/auth/GatewayKeyLocatorCodec.js.map +0 -1
  162. package/dist/api/ai-gateway/auth/PodGatewayAccessKeyRepository.d.ts +0 -54
  163. package/dist/api/ai-gateway/auth/PodGatewayAccessKeyRepository.js +0 -152
  164. package/dist/api/ai-gateway/auth/PodGatewayAccessKeyRepository.js.map +0 -1
  165. package/static/dashboard/assets/NetworkPage-Brt79fuQ.js +0 -2
  166. package/static/dashboard/assets/PodPage-CM6do1vB.js +0 -2
  167. package/static/dashboard/assets/ServicesPage-BUNxGJRz.js +0 -1
  168. package/static/dashboard/assets/index-RfiFckzb.js +0 -51
  169. package/static/settings/assets/ModelsPage-D_IH7AH3.js +0 -1
  170. package/static/settings/assets/PodPage-Cy1VNObw.js +0 -2
  171. package/static/settings/assets/ServicesPage-BsFaxVWC.js +0 -1
  172. package/static/settings/assets/SettingsPage-UafNWE_p.js +0 -48
@@ -0,0 +1,2 @@
1
+ import{c as D,u as $,r as a,j as e,f as K,A as F,B as P}from"./dashboard-CSrqAv2L.js";import{T as O,P as V}from"./PaneListHeader-BSipfl0W.js";import{C as N,a as v,b as k,c as C,d as R,S as G,B as M}from"./card-z5BV5hTo.js";import{R as J}from"./refresh-cw-CFDZPaE8.js";const W=[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54",key:"1djwo0"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17",key:"1tzkfa"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05",key:"14pb5j"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],X=D("earth",W);const Q=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],Y=D("rotate-ccw",Q);const Z=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]],ee=D("wifi",Z);async function te({podUrl:t,authenticatedFetch:s}){return q(s,new URL("/api/network/settings/status",t).toString(),{method:"GET",credentials:"include",headers:{accept:"application/json"}})}async function se({podUrl:t,authenticatedFetch:s}){return q(s,new URL("/api/network/settings/diagnose",t).toString(),{method:"POST",credentials:"include",headers:{accept:"application/json"}})}async function re({podUrl:t,authenticatedFetch:s}){await q(s,new URL("/api/network/settings/certificate/renew",t).toString(),{method:"POST",credentials:"include",headers:{accept:"application/json"}})}async function q(t,s,c){const i=await t(s,c);if(!i.ok)throw await i.arrayBuffer(),new Error("Network settings request failed. Please try again.");if(!i.headers.get("content-type")?.includes("application/json"))throw await i.arrayBuffer(),new Error("Network settings request failed. Please try again.");return await i.json()}function he(){const t=$(),[s,c]=a.useState(),[i,p]=a.useState([]),[g,d]=a.useState(),[S,U]=a.useState(!1),[T,L]=a.useState(!1),[B,A]=a.useState(!1),u=a.useRef(0),f=a.useRef(0),x=a.useRef(0),j=a.useRef(void 0),m=a.useRef(!0),l=t.state.status==="authenticated"&&!!(t.webId&&t.podUrl)?`${t.webId}
2
+ ${t.podUrl}`:void 0;a.useEffect(()=>(m.current=!0,()=>{m.current=!1,u.current+=1,f.current+=1,x.current+=1}),[]);const y=a.useCallback((n,r)=>m.current&&u.current===n&&j.current===r,[]),w=a.useCallback((n,r)=>m.current&&f.current===n&&j.current===r,[]),b=a.useCallback((n,r)=>m.current&&x.current===n&&j.current===r,[]),h=a.useCallback(async()=>{const n=t.podUrl,r=l;if(!n||!r)return;const o=u.current+1;u.current=o,U(!0),d(void 0);try{const I=await te({podUrl:n,authenticatedFetch:t.fetch});y(o,r)&&c(I)}catch{y(o,r)&&d("Network settings request failed. Please try again.")}finally{y(o,r)&&U(!1)}},[l,y,t.fetch,t.podUrl]);a.useEffect(()=>{let n=!1;return j.current=l,u.current+=1,f.current+=1,x.current+=1,queueMicrotask(()=>{n||(c(void 0),p([]),d(void 0),U(!1),L(!1),A(!1),l&&h())}),()=>{n=!0}},[l,h]);const H=a.useCallback(async()=>{const n=t.podUrl,r=l;if(!n||!r)return;const o=f.current+1;f.current=o,L(!0),d(void 0);try{const I=await se({podUrl:n,authenticatedFetch:t.fetch});w(o,r)&&p(I.checks)}catch{w(o,r)&&d("Network diagnostics failed. Please try again.")}finally{w(o,r)&&L(!1)}},[l,w,t.fetch,t.podUrl]),z=a.useCallback(async()=>{const n=t.podUrl,r=l;if(!n||!r)return;const o=x.current+1;x.current=o,A(!0),d(void 0);try{await re({podUrl:n,authenticatedFetch:t.fetch}),b(o,r)&&await h()}catch{b(o,r)&&d("Certificate renewal failed. Please try again.")}finally{b(o,r)&&A(!1)}},[l,b,h,t.fetch,t.podUrl]),_=a.useMemo(()=>[{key:"local",title:"Local",values:s?.addresses.local??[]},{key:"lan",title:"LAN",values:s?.addresses.lan??[]},{key:"public",title:"Public",values:s?.addresses.public??[]}],[s]);return e.jsx(O,{mode:"auto",listHeader:e.jsx(V,{title:"Network"}),list:e.jsxs("aside",{className:"flex h-full flex-col gap-3 border-r border-border bg-muted/30 p-4",children:[e.jsx(ne,{endpoint:s?.endpoint,loading:S&&!s}),e.jsx(ie,{sections:_,loading:S&&!s})]}),mainHeader:e.jsx(ae,{loading:S,onRefresh:h}),main:e.jsxs("section",{className:"flex min-h-full flex-col gap-4 bg-background p-6",children:[g?e.jsx("div",{role:"alert",className:"rounded-md border border-destructive/30 bg-destructive/10 px-4 py-3 text-sm text-destructive",children:g}):null,e.jsx(ce,{status:s}),e.jsx(de,{status:s,diagnostics:i,diagnosing:T,renewing:B,onDiagnose:H,onRenewCertificate:z})]}),className:"min-h-full"})}function ae({loading:t,onRefresh:s}){return e.jsxs("div",{className:"flex h-full min-w-0 items-center justify-between gap-4 px-4",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"text-sm font-semibold text-foreground",children:"Network"}),e.jsx("div",{className:"truncate text-xs text-muted-foreground",children:"Endpoint, DNS, TLS, tunnel, and connectivity diagnostics"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("a",{className:"inline-flex h-9 items-center justify-center rounded-md border border-input bg-background px-3 text-sm font-medium text-foreground hover:bg-accent",href:"/settings/network",children:"Configure"}),e.jsxs(P,{type:"button",size:"sm",variant:"outline",onClick:s,disabled:t,children:[e.jsx(J,{className:"mr-2 h-4 w-4","aria-hidden":"true"}),"Refresh"]})]})]})}function ne({endpoint:t,loading:s}){return e.jsxs(N,{children:[e.jsxs(v,{children:[e.jsxs(k,{className:"flex items-center gap-2 text-base",children:[e.jsx(X,{className:"h-4 w-4","aria-hidden":"true"}),"Endpoint"]}),e.jsx(C,{children:s?"Resolving endpoint":"Current reachable API origin"})]}),e.jsx(R,{children:e.jsx("div",{className:"break-words text-sm text-foreground",children:t||"Unsupported"})})]})}function ie({sections:t,loading:s}){return e.jsxs(N,{children:[e.jsxs(v,{children:[e.jsxs(k,{className:"flex items-center gap-2 text-base",children:[e.jsx(ee,{className:"h-4 w-4","aria-hidden":"true"}),"Addresses"]}),e.jsx(C,{children:s?"Refreshing addresses":"Reported by runtime network capability"})]}),e.jsx(R,{className:"space-y-4",children:t.map(c=>e.jsxs("div",{children:[e.jsx("div",{className:"text-xs font-medium text-muted-foreground",children:c.title}),c.values.length>0?e.jsx("div",{className:"mt-1 space-y-1",children:c.values.map(i=>e.jsx("div",{className:"break-words text-sm text-foreground",children:i},i))}):e.jsx("div",{className:"mt-1 text-sm text-muted-foreground",children:"Unsupported"})]},c.key))})]})}function ce({status:t}){return e.jsxs(N,{children:[e.jsxs(v,{children:[e.jsxs(k,{className:"flex items-center gap-2 text-base",children:[e.jsx(K,{className:"h-4 w-4","aria-hidden":"true"}),"Capabilities"]}),e.jsx(C,{children:"Server-declared network support"})]}),e.jsxs(R,{className:"grid gap-3 text-sm",children:[e.jsx(E,{label:"TLS",capability:t?.tls,extra:t?.tls.expiresAt?`Expires ${oe(t.tls.expiresAt)}`:void 0}),e.jsx(E,{label:"DNS",capability:t?.dns}),e.jsx(E,{label:"Tunnel",capability:t?.tunnel})]})]})}function de({status:t,diagnostics:s,diagnosing:c,renewing:i,onDiagnose:p,onRenewCertificate:g}){return e.jsxs(N,{children:[e.jsxs(v,{children:[e.jsxs(k,{className:"flex items-center gap-2 text-base",children:[e.jsx(F,{className:"h-4 w-4","aria-hidden":"true"}),"Actions"]}),e.jsx(C,{children:"Only actions allowed by the Network capability are shown"})]}),e.jsxs(R,{className:"space-y-4",children:[e.jsxs("div",{className:"flex flex-wrap gap-2",children:[t?.actions.diagnose?e.jsxs(P,{type:"button",size:"sm",variant:"outline",onClick:p,disabled:c,children:[e.jsx(G,{className:"mr-2 h-4 w-4","aria-hidden":"true"}),"Diagnose"]}):null,t?.actions.renewCertificate?e.jsxs(P,{type:"button",size:"sm",variant:"subtle",onClick:g,disabled:i,children:[e.jsx(Y,{className:"mr-2 h-4 w-4","aria-hidden":"true"}),"Renew certificate"]}):null]}),s.length>0?e.jsx("div",{className:"space-y-2",children:s.map(d=>e.jsxs("div",{className:"rounded-md border border-border bg-muted/30 p-3",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx("div",{className:"text-sm font-medium text-foreground",children:d.label}),e.jsx(M,{variant:d.status==="ok"?"secondary":"outline",children:d.status})]}),d.detail?e.jsx("div",{className:"mt-1 break-words text-xs text-muted-foreground",children:d.detail}):null]},d.id))}):e.jsx("div",{className:"text-sm text-muted-foreground",children:"No diagnostics run yet."})]})]})}function E({label:t,capability:s,extra:c}){const i=s?.supported===!0;return e.jsxs("div",{className:"rounded-md border border-border bg-muted/30 p-3",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-sm font-medium text-foreground",children:i?t:`${t} unsupported`}),e.jsx("div",{className:"text-xs text-muted-foreground",children:s?.status??"loading"})]}),e.jsx(M,{variant:i?"secondary":"outline",children:i?"Supported":"Unsupported"})]}),c?e.jsx("div",{className:"mt-2 text-xs text-muted-foreground",children:c}):null]})}function oe(t){if(!t)return"Not observed";const s=new Date(t);return Number.isNaN(s.getTime())?"Not observed":s.toLocaleString()}export{he as default};
@@ -1 +1 @@
1
- import{r as n,j as s,a as k}from"./dashboard-8C6o666W.js";const y=n.createContext(null);function E(){const e=n.useContext(y);if(!e)throw new Error("useWorkspaceLayout must be used inside TwoPaneLayout");return e}const g="(max-width: 767px)",v={gridTemplateColumns:"210px minmax(0, 1fr)"};function j(e){return e==="context"?"main":e}function C(e){if(typeof window>"u"||typeof window.matchMedia!="function")return()=>{};const a=window.matchMedia(g);return a.addEventListener("change",e),()=>a.removeEventListener("change",e)}function L(){return typeof window>"u"||typeof window.matchMedia!="function"?"split":window.matchMedia(g).matches?"stack":"split"}function R(){return"split"}function M(e){const a=n.useSyncExternalStore(C,L,R);return e==="auto"?a:e}function N({resolvedMode:e,history:a,resolvePane:l}){const[f,m]=n.useState("list"),c=n.useRef(null),h=n.useRef(null),r=n.useRef(null),i=n.useRef(null),u=n.useMemo(()=>({list:h,main:r,context:i}),[]),o=n.useCallback((t,b={})=>{const d=l?.(t)??t;m(d),e==="stack"&&(c.current=d,b.fromHistory||a?.push(d))},[a,l,e]),x=n.useCallback(()=>o("list"),[o]),p=n.useCallback(()=>o("main"),[o]),w=n.useCallback(()=>o("context"),[o]);return n.useLayoutEffect(()=>{if(e!=="stack"){c.current=null;return}const t=c.current;t&&(c.current=null,u[t].current?.focus())},[f,u,e]),n.useLayoutEffect(()=>{if(!(e!=="stack"||!a))return a.subscribe(t=>{o(t,{fromHistory:!0})})},[a,o,e]),{activePane:f,paneRefs:u,openList:x,openMain:p,openContext:w}}function S({listHeader:e,list:a,mainHeader:l,main:f,mode:m="auto",history:c,className:h}){const r=M(m),{activePane:i,paneRefs:u,openList:o,openMain:x,openContext:p}=N({resolvedMode:r,history:c,resolvePane:j}),w=n.useMemo(()=>({mode:r,activePane:i,openList:o,openMain:x,openContext:p}),[i,p,o,x,r]),t=r==="stack",b=t&&i!=="list",d=t&&i!=="main";return s.jsx(y.Provider,{value:w,children:s.jsx("section",{className:k("flex min-h-0 flex-1 flex-col bg-background",h),"data-workspace-layout":"two-pane","data-workspace-mode":r,children:s.jsxs("div",{className:k("grid min-h-0 flex-1",t?"grid-cols-1":null),style:t?void 0:v,"data-workspace-layout-mode":m,"data-workspace-active-pane":i,children:[s.jsxs("aside",{ref:u.list,className:k("flex min-h-0 flex-col overflow-hidden bg-layout-list-item @container",t?"border-r-0":"border-r border-border"),"data-testid":"workspace-list-pane","data-workspace-pane":"list",hidden:b,tabIndex:t?-1:void 0,children:[s.jsx("header",{className:"h-12 shrink-0 border-b border-border bg-layout-list-header","data-workspace-list-header":"true",children:e}),s.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:a})]}),s.jsxs("main",{ref:u.main,className:"flex min-h-0 flex-col overflow-hidden bg-layout-content @container","data-testid":"workspace-main-pane","data-workspace-pane":"main",hidden:d,tabIndex:t?-1:void 0,children:[s.jsx("header",{className:"h-12 shrink-0 border-b border-border bg-layout-content","data-workspace-main-header":"true",children:l}),s.jsxs("div",{className:"min-h-0 flex-1 overflow-y-auto",children:[t?s.jsx("button",{type:"button",className:"inline-flex items-center px-4 py-3 text-sm text-muted-foreground hover:text-foreground",onClick:o,children:"返回列表"}):null,f]})]})]})})})}function T({title:e}){return s.jsx("div",{className:"flex h-full items-center px-4 text-sm font-semibold text-foreground",children:e})}export{T as P,S as T,E as u};
1
+ import{r as n,j as s,a as k}from"./dashboard-CSrqAv2L.js";const y=n.createContext(null);function E(){const e=n.useContext(y);if(!e)throw new Error("useWorkspaceLayout must be used inside TwoPaneLayout");return e}const g="(max-width: 767px)",v={gridTemplateColumns:"210px minmax(0, 1fr)"};function j(e){return e==="context"?"main":e}function C(e){if(typeof window>"u"||typeof window.matchMedia!="function")return()=>{};const a=window.matchMedia(g);return a.addEventListener("change",e),()=>a.removeEventListener("change",e)}function L(){return typeof window>"u"||typeof window.matchMedia!="function"?"split":window.matchMedia(g).matches?"stack":"split"}function R(){return"split"}function M(e){const a=n.useSyncExternalStore(C,L,R);return e==="auto"?a:e}function N({resolvedMode:e,history:a,resolvePane:l}){const[f,m]=n.useState("list"),c=n.useRef(null),h=n.useRef(null),r=n.useRef(null),i=n.useRef(null),u=n.useMemo(()=>({list:h,main:r,context:i}),[]),o=n.useCallback((t,b={})=>{const d=l?.(t)??t;m(d),e==="stack"&&(c.current=d,b.fromHistory||a?.push(d))},[a,l,e]),x=n.useCallback(()=>o("list"),[o]),p=n.useCallback(()=>o("main"),[o]),w=n.useCallback(()=>o("context"),[o]);return n.useLayoutEffect(()=>{if(e!=="stack"){c.current=null;return}const t=c.current;t&&(c.current=null,u[t].current?.focus())},[f,u,e]),n.useLayoutEffect(()=>{if(!(e!=="stack"||!a))return a.subscribe(t=>{o(t,{fromHistory:!0})})},[a,o,e]),{activePane:f,paneRefs:u,openList:x,openMain:p,openContext:w}}function S({listHeader:e,list:a,mainHeader:l,main:f,mode:m="auto",history:c,className:h}){const r=M(m),{activePane:i,paneRefs:u,openList:o,openMain:x,openContext:p}=N({resolvedMode:r,history:c,resolvePane:j}),w=n.useMemo(()=>({mode:r,activePane:i,openList:o,openMain:x,openContext:p}),[i,p,o,x,r]),t=r==="stack",b=t&&i!=="list",d=t&&i!=="main";return s.jsx(y.Provider,{value:w,children:s.jsx("section",{className:k("flex min-h-0 flex-1 flex-col bg-background",h),"data-workspace-layout":"two-pane","data-workspace-mode":r,children:s.jsxs("div",{className:k("grid min-h-0 flex-1",t?"grid-cols-1":null),style:t?void 0:v,"data-workspace-layout-mode":m,"data-workspace-active-pane":i,children:[s.jsxs("aside",{ref:u.list,className:k("flex min-h-0 flex-col overflow-hidden bg-layout-list-item @container",t?"border-r-0":"border-r border-border"),"data-testid":"workspace-list-pane","data-workspace-pane":"list",hidden:b,tabIndex:t?-1:void 0,children:[s.jsx("header",{className:"h-12 shrink-0 border-b border-border bg-layout-list-header","data-workspace-list-header":"true",children:e}),s.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:a})]}),s.jsxs("main",{ref:u.main,className:"flex min-h-0 flex-col overflow-hidden bg-layout-content @container","data-testid":"workspace-main-pane","data-workspace-pane":"main",hidden:d,tabIndex:t?-1:void 0,children:[s.jsx("header",{className:"h-12 shrink-0 border-b border-border bg-layout-content","data-workspace-main-header":"true",children:l}),s.jsxs("div",{className:"min-h-0 flex-1 overflow-y-auto",children:[t?s.jsx("button",{type:"button",className:"inline-flex items-center px-4 py-3 text-sm text-muted-foreground hover:text-foreground",onClick:o,children:"返回列表"}):null,f]})]})]})})})}function T({title:e}){return s.jsx("div",{className:"flex h-full items-center px-4 text-sm font-semibold text-foreground",children:e})}export{T as P,S as T,E as u};
@@ -0,0 +1,2 @@
1
+ import{c as S,u as M,r as d,j as e,B as f}from"./dashboard-CSrqAv2L.js";import{T as $,P as q}from"./PaneListHeader-BSipfl0W.js";import{C as b,a as j,b as p,S as D,c as v,d as y,B as H}from"./card-z5BV5hTo.js";import{E as T}from"./external-link-B7wD1hkm.js";import{D as _}from"./database-Ct5ZPe6L.js";import{R as z}from"./refresh-cw-CFDZPaE8.js";const K=[["path",{d:"m10 17 5-5-5-5",key:"1bsop3"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}]],F=S("log-in",K);const O=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],V=S("log-out",O);async function G({webId:t,podUrl:s,authenticatedFetch:a}){const n=new URL("/",s).origin,i=await a(`${n}/api/pod/settings/status`,{method:"GET",credentials:"include",headers:{accept:"application/json"}});if(!i.ok)throw await i.arrayBuffer(),new Error("Pod settings request failed. Please try again.");if(!i.headers.get("content-type")?.includes("application/json"))throw await i.arrayBuffer(),new Error("Pod settings request failed. Please try again.");const o=await i.json();if(o.identity?.webId!==t)throw new Error("Pod settings response does not match the current Solid session.");return o}function ne({view:t="combined"}){const s=M(),[a,n]=d.useState(),[i,o]=d.useState(),[l,u]=d.useState(!1),c=d.useRef(0),P=d.useRef(void 0),N=d.useRef(!0),m=s.state.status==="authenticated"&&!!(s.webId&&s.podUrl)?`${s.webId}
2
+ ${s.podUrl}`:void 0;d.useEffect(()=>(N.current=!0,()=>{N.current=!1,c.current+=1}),[]);const w=d.useCallback(async()=>{const h=s.webId,B=s.podUrl,k=m;if(!h||!B||!k)return;const L=c.current+1;c.current=L;const I=()=>N.current&&c.current===L&&P.current===k;u(!0),o(void 0);try{const A=await G({webId:h,podUrl:B,authenticatedFetch:s.fetch});I()&&n(A)}catch{I()&&o("Pod settings request failed. Please try again.")}finally{I()&&u(!1)}},[m,s.fetch,s.podUrl,s.webId]);d.useEffect(()=>{let h=!1;return P.current=m,c.current+=1,queueMicrotask(()=>{h||(n(void 0),o(void 0),u(!1),m&&w())}),()=>{h=!0}},[m,w]);const x=d.useMemo(()=>({webId:s.webId??a?.identity.webId,podUrl:s.podUrl??a?.identity.podUrl,issuer:s.issuer}),[s.issuer,s.podUrl,s.webId,a]),R=()=>{x.podUrl&&window.open(x.podUrl,"_blank","noopener,noreferrer")},E=()=>{s.issuer&&s.login(s.issuer)};return e.jsx($,{mode:"auto",listHeader:e.jsx(q,{title:t==="usage"?"Usage":"Pod"}),list:e.jsxs("aside",{className:"flex h-full flex-col gap-3 border-r border-border bg-muted/30 p-4",children:[t!=="usage"?e.jsx(W,{webId:x.webId,podUrl:x.podUrl,issuer:x.issuer,sessionStatus:s.state.status,onOpenPod:R,onLogout:()=>{s.logout()},onLoginAgain:E,canLoginAgain:!!s.issuer}):null,t!=="settings"?e.jsx(X,{storage:a?.storage,loading:l&&!a}):null]}),mainHeader:e.jsx(Q,{title:t==="usage"?"Usage":"Pod",loading:l,onRefresh:w}),main:e.jsxs("section",{className:"flex min-h-full flex-col gap-4 bg-background p-6",children:[i?e.jsx("div",{role:"alert",className:"rounded-md border border-destructive/30 bg-destructive/10 px-4 py-3 text-sm text-destructive",children:i}):null,e.jsx(J,{aiConnection:a?.aiConnection,loading:l&&!a}),e.jsxs(b,{children:[e.jsxs(j,{children:[e.jsxs(p,{className:"flex items-center gap-2 text-base",children:[e.jsx(D,{className:"h-4 w-4","aria-hidden":"true"}),"Access boundary"]}),e.jsx(v,{children:"This page reads the authenticated Solid session and current Pod only."})]}),e.jsxs(y,{className:"grid gap-3 text-sm text-muted-foreground",children:[e.jsx(r,{label:"Session",value:s.state.status}),e.jsx(r,{label:"Status generated",value:C(a?.generatedAt)})]})]})]}),className:"min-h-full"})}function W({webId:t,podUrl:s,issuer:a,sessionStatus:n,onOpenPod:i,onLogout:o,onLoginAgain:l,canLoginAgain:u}){return e.jsxs(b,{children:[e.jsxs(j,{children:[e.jsx(p,{className:"text-base",children:"Identity"}),e.jsx(v,{children:"Current Solid session"})]}),e.jsxs(y,{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-3 text-sm",children:[e.jsx(r,{label:"WebID",value:t??"Not signed in"}),e.jsx(r,{label:"Pod",value:s??"Discovering"}),e.jsx(r,{label:"Issuer",value:a??"Unknown"}),e.jsx(r,{label:"Status",value:n})]}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsxs(f,{type:"button",size:"sm",variant:"outline",onClick:i,disabled:!s,children:[e.jsx(T,{className:"mr-2 h-4 w-4","aria-hidden":"true"}),"Open Pod"]}),e.jsxs(f,{type:"button",size:"sm",variant:"subtle",onClick:o,children:[e.jsx(V,{className:"mr-2 h-4 w-4","aria-hidden":"true"}),"Logout"]}),e.jsxs(f,{type:"button",size:"sm",variant:"ghost",onClick:l,disabled:!u,children:[e.jsx(F,{className:"mr-2 h-4 w-4","aria-hidden":"true"}),"Login again"]})]})]})]})}function X({storage:t,loading:s}){const a=t?.status==="available",n=a&&t.limits.storageLimitBytes?Math.min(100,Math.round(t.usage.storageBytes/t.limits.storageLimitBytes*100)):void 0;return e.jsxs(b,{children:[e.jsxs(j,{children:[e.jsxs(p,{className:"flex items-center gap-2 text-base",children:[e.jsx(_,{className:"h-4 w-4","aria-hidden":"true"}),"Storage usage"]}),e.jsx(v,{children:s?"Refreshing usage":"Current Pod quota view"})]}),e.jsx(y,{className:"space-y-4",children:a?e.jsxs(e.Fragment,{children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-2xl font-semibold text-foreground",children:g(t.usage.storageBytes)}),e.jsx("div",{className:"text-sm text-muted-foreground",children:t.limits.storageLimitBytes==null?"No storage limit":`${g(t.limits.storageLimitBytes)} limit`})]}),e.jsx("div",{className:"h-2 overflow-hidden rounded-full bg-muted","aria-label":"Storage usage meter",children:e.jsx("div",{className:"h-full bg-primary",style:{width:`${n??0}%`}})}),e.jsxs("div",{className:"grid gap-2 text-sm text-muted-foreground",children:[e.jsx(r,{label:"Ingress",value:g(t.usage.ingressBytes)}),e.jsx(r,{label:"Egress",value:g(t.usage.egressBytes)}),e.jsx(r,{label:"Bandwidth",value:t.limits.bandwidthLimitBps==null?"No limit":`${g(t.limits.bandwidthLimitBps)}/s`})]})]}):e.jsx(U,{title:t?.status==="error"?"Usage unavailable":"Usage unsupported",detail:t?.reason??"usage_not_available"})})]})}function J({aiConnection:t,loading:s}){const a=t?.status==="available";return e.jsxs(b,{children:[e.jsx(j,{children:e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx(p,{className:"text-base",children:"AI Connection"}),e.jsx(v,{children:"Pod-backed provider configuration status"})]}),e.jsx(H,{variant:a?"secondary":"outline",children:a?"Available":s?"Loading":"Partial"})]})}),e.jsx(y,{className:"space-y-4",children:a?e.jsxs("div",{className:"grid gap-3 text-sm",children:[e.jsx(r,{label:"Providers",value:`${t.configuredProviders} providers`}),e.jsx(r,{label:"Data container",value:t.containerUrl??"Not declared"}),e.jsx(r,{label:"Last sync",value:C(t.lastSyncAt)}),e.jsx(r,{label:"Source",value:t.source??"drizzle-solid"})]}):e.jsx(U,{title:t?.status==="error"?"AI Connection unavailable":"AI Connection unsupported",detail:t?.reason??"not_configured"})})]})}function Q({title:t,loading:s,onRefresh:a}){return e.jsxs("div",{className:"flex h-full min-w-0 items-center justify-between gap-4 px-4",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"text-sm font-semibold text-foreground",children:t}),e.jsx("div",{className:"truncate text-xs text-muted-foreground",children:"Identity, storage, and applet data status"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("a",{className:"inline-flex h-9 items-center justify-center rounded-md border border-input bg-background px-3 text-sm font-medium text-foreground hover:bg-accent",href:t==="Usage"?"/settings/pod":"/dashboard/usage",children:t==="Usage"?"Configure Pod":"View usage"}),e.jsxs(f,{type:"button",size:"sm",variant:"outline",onClick:a,disabled:s,children:[e.jsx(z,{className:"mr-2 h-4 w-4","aria-hidden":"true"}),"Refresh"]})]})]})}function r({label:t,value:s}){return e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"text-xs font-medium text-muted-foreground",children:t}),e.jsx("div",{className:"break-words text-sm text-foreground",children:s??"Unknown"})]})}function U({title:t,detail:s}){return e.jsxs("div",{className:"rounded-md border border-border bg-muted/40 p-3",children:[e.jsx("div",{className:"text-sm font-medium text-foreground",children:t}),e.jsx("div",{className:"mt-1 text-xs text-muted-foreground",children:s})]})}function g(t){if(!Number.isFinite(t))return"Unknown";const s=["B","KB","MB","GB","TB"];let a=Math.max(0,t),n=0;for(;a>=1024&&n<s.length-1;)a/=1024,n+=1;return`${Number.isInteger(a)?a:a.toFixed(a>=10?1:2)} ${s[n]}`}function C(t){if(!t)return"Not observed";const s=new Date(t);return Number.isNaN(s.getTime())?"Not observed":s.toLocaleString()}export{W as IdentityCard,X as PodUsageCard,ne as default};
@@ -0,0 +1 @@
1
+ import{c as S,A as R,S as C,r as n,j as e,O as L,d as w,e as y,N as I}from"./dashboard-CSrqAv2L.js";import{f as P,S as D}from"./services-status-context-DN1Icg4A.js";import{D as q}from"./database-Ct5ZPe6L.js";import{T as A,P as E,u as k}from"./PaneListHeader-BSipfl0W.js";import{R as M}from"./refresh-cw-CFDZPaE8.js";const _=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],z=S("server",_);const H=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],$=S("settings",H),F=[{id:"runtime",label:"Runtime",path:"/services/runtime",description:"Xpod runtime, Solid server, AI Gateway, storage, and worker health.",icon:R},{id:"logs",label:"Logs",path:"/services/logs",description:"Runtime logs and sanitized diagnostics export.",icon:C},{id:"rdf",label:"RDF",path:"/services/rdf",description:"RDF indexing, storage stats, cache health, and slow query evidence.",icon:q},{id:"configuration",label:"Configuration",path:"/services/configuration",description:"Advanced local runtime configuration and restart-controlled changes.",icon:$}],N={supported:!1,reason:"capability_not_reported"};function K({mode:a="auto",product:s="legacy"}){const[r,i]=n.useState(null),[c,l]=n.useState(!0),[f,x]=n.useState(!1),[t,p]=n.useState(),o=n.useRef(0),d=n.useRef(null),u=n.useRef(!1),h=n.useCallback(async(m=!1)=>{const b=o.current+1;o.current=b,d.current?.abort();const g=new AbortController;d.current=g,m?l(!0):x(!0),p(void 0);try{const v=await P({signal:g.signal});u.current&&o.current===b&&!g.signal.aborted&&i(v)}catch(v){u.current&&o.current===b&&!g.signal.aborted&&!(v instanceof DOMException&&v.name==="AbortError")&&p("Services status request failed. Please try again.")}finally{u.current&&o.current===b&&!g.signal.aborted&&(l(!1),x(!1))}},[]);n.useEffect(()=>{u.current=!0,queueMicrotask(()=>{u.current&&h(!0)});const m=setInterval(()=>{h(!1)},1e4);return()=>{u.current=!1,o.current+=1,d.current?.abort(),d.current=null,clearInterval(m)}},[h]);const j=n.useMemo(()=>{const m=r?.adminData?.capabilities?.services;return{snapshot:r,loading:c,refreshing:f,error:t,refresh:()=>{h(!1)},restartCapability:m?.lifecycle?.restart??N,configurationWriteCapability:m?.configuration?.write??N}},[t,h,c,f,r]);return e.jsx(D.Provider,{value:j,children:e.jsx(A,{mode:a,listHeader:e.jsx(E,{title:"Services"}),list:e.jsx(W,{snapshot:r,loading:c&&!r,showSections:s==="legacy"}),mainHeader:e.jsx(T,{product:s,loading:c||f,onRefresh:j.refresh}),main:e.jsxs("section",{className:"min-h-full min-w-0 bg-background",children:[e.jsx(O,{}),t?e.jsx("div",{role:"alert",className:"mx-6 mt-6 rounded-md border border-destructive/30 bg-destructive/10 px-4 py-3 text-sm text-destructive",children:t}):null,e.jsx(L,{})]}),className:"min-h-full"})})}function O(){const a=w(),s=k(),r=n.useRef(null),i=a.pathname.replace(/\/+$/,"")||"/services";return n.useEffect(()=>{if(r.current!==i){if(r.current=i,i==="/services"){s.openList();return}s.openMain()}},[i,s]),null}function T({product:a,loading:s,onRefresh:r}){return e.jsxs("div",{className:"flex h-full min-w-0 items-center justify-between gap-4 px-4",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"text-sm font-semibold text-foreground",children:"Services"}),e.jsx("div",{className:"truncate text-xs text-muted-foreground",children:"Runtime health, logs, RDF indexing, and configuration"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[a!=="legacy"?e.jsx("a",{className:"inline-flex h-9 items-center justify-center rounded-md border border-input bg-background px-3 text-sm font-medium text-foreground hover:bg-accent",href:a==="dashboard"?"/settings/services":"/dashboard/runtime",children:a==="dashboard"?"Configure":"View runtime"}):null,e.jsxs("button",{type:"button",onClick:r,disabled:s,className:"inline-flex h-9 items-center justify-center rounded-md border border-input bg-background px-3 text-sm font-medium text-foreground transition-colors hover:bg-accent disabled:pointer-events-none disabled:opacity-50",children:[e.jsx(M,{className:y("mr-2 h-4 w-4",s&&"animate-spin"),"aria-hidden":"true"}),"Refresh"]})]})]})}function W({snapshot:a,loading:s,showSections:r}){const i=w(),c=k(),l=a?.servicesData??[],f=l.filter(t=>t.status==="running").length,x=l.length;return e.jsxs("aside",{className:"flex h-full flex-col gap-4 border-r border-border bg-muted/30 p-4",children:[e.jsxs("div",{className:"rounded-md border border-border bg-card",children:[e.jsxs("div",{className:"px-4 pt-4",children:[e.jsxs("div",{className:"flex items-center gap-2 text-base font-semibold text-foreground",children:[e.jsx(z,{className:"h-4 w-4","aria-hidden":"true"}),"Service health"]}),e.jsx("div",{className:"mt-1 text-sm text-muted-foreground",children:s?"Loading runtime status":`${f}/${x||0} services running`})]}),e.jsx("div",{className:"space-y-2 px-4 pb-4 pt-3",children:x>0?l.map(t=>e.jsxs("div",{className:"flex items-center justify-between gap-3 text-sm",children:[e.jsx("span",{className:"font-medium text-foreground",children:t.name}),e.jsx("span",{className:y("rounded-md px-2 py-0.5 text-xs font-medium",t.status==="running"?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground"),children:t.status})]},t.name)):e.jsx("div",{className:"text-sm text-muted-foreground",children:s?"Waiting for status":"No service status reported"})})]}),r?e.jsx("nav",{"aria-label":"Services sections",className:"space-y-1",children:F.map(t=>{const p=t.icon,o=t.id==="runtime"&&i.pathname==="/services";return e.jsxs(I,{to:t.path,onClick:()=>c.openMain(),className:({isActive:d})=>y("flex gap-3 rounded-md px-3 py-2 text-sm transition-colors","focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",d||o?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:[e.jsx(p,{className:"mt-0.5 h-4 w-4 shrink-0","aria-hidden":"true"}),e.jsxs("span",{className:"min-w-0",children:[e.jsx("span",{className:"block font-medium",children:t.label}),e.jsx("span",{className:"mt-0.5 block text-xs opacity-80",children:t.description})]})]},t.id)})}):null]})}export{K as default};
@@ -1 +1 @@
1
- import{c as o,j as t,a as s,b as n,r as d}from"./dashboard-8C6o666W.js";const i=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],g=o("shield-check",i),c=n("inline-flex items-center rounded-lg border px-2.5 py-0.5 text-xs font-semibold transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-ring/50 focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow-sm shadow-primary/20 hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow-sm shadow-destructive/20 hover:bg-destructive/90",outline:"border-border/40 text-foreground bg-muted/30 backdrop-blur-sm"}},defaultVariants:{variant:"default"}});function y({className:r,variant:e,...a}){return t.jsx("div",{className:s(c({variant:e}),r),...a})}const l=d.forwardRef(({className:r,...e},a)=>t.jsx("div",{ref:a,className:s("rounded-2xl border border-border/50 bg-card shadow-lg shadow-black/5 transition-all duration-200",r),...e}));l.displayName="Card";const f=d.forwardRef(({className:r,...e},a)=>t.jsx("div",{ref:a,className:s("flex flex-col gap-1 p-6",r),...e}));f.displayName="CardHeader";const m=d.forwardRef(({className:r,...e},a)=>t.jsx("h3",{ref:a,className:s("text-2xl font-semibold tracking-tight",r),...e}));m.displayName="CardTitle";const p=d.forwardRef(({className:r,...e},a)=>t.jsx("p",{ref:a,className:s("text-sm text-muted-foreground",r),...e}));p.displayName="CardDescription";const u=d.forwardRef(({className:r,...e},a)=>t.jsx("div",{ref:a,className:s("p-6 pt-0",r),...e}));u.displayName="CardContent";const x=d.forwardRef(({className:r,...e},a)=>t.jsx("div",{ref:a,className:s("flex items-center p-6 pt-0",r),...e}));x.displayName="CardFooter";export{y as B,l as C,g as S,f as a,m as b,p as c,u as d};
1
+ import{c as o,j as t,a as s,b as n,r as d}from"./dashboard-CSrqAv2L.js";const i=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],g=o("shield-check",i),c=n("inline-flex items-center rounded-lg border px-2.5 py-0.5 text-xs font-semibold transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-ring/50 focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow-sm shadow-primary/20 hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow-sm shadow-destructive/20 hover:bg-destructive/90",outline:"border-border/40 text-foreground bg-muted/30 backdrop-blur-sm"}},defaultVariants:{variant:"default"}});function y({className:r,variant:e,...a}){return t.jsx("div",{className:s(c({variant:e}),r),...a})}const l=d.forwardRef(({className:r,...e},a)=>t.jsx("div",{ref:a,className:s("rounded-2xl border border-border/50 bg-card shadow-lg shadow-black/5 transition-all duration-200",r),...e}));l.displayName="Card";const f=d.forwardRef(({className:r,...e},a)=>t.jsx("div",{ref:a,className:s("flex flex-col gap-1 p-6",r),...e}));f.displayName="CardHeader";const m=d.forwardRef(({className:r,...e},a)=>t.jsx("h3",{ref:a,className:s("text-2xl font-semibold tracking-tight",r),...e}));m.displayName="CardTitle";const p=d.forwardRef(({className:r,...e},a)=>t.jsx("p",{ref:a,className:s("text-sm text-muted-foreground",r),...e}));p.displayName="CardDescription";const u=d.forwardRef(({className:r,...e},a)=>t.jsx("div",{ref:a,className:s("p-6 pt-0",r),...e}));u.displayName="CardContent";const x=d.forwardRef(({className:r,...e},a)=>t.jsx("div",{ref:a,className:s("flex items-center p-6 pt-0",r),...e}));x.displayName="CardFooter";export{y as B,l as C,g as S,f as a,m as b,p as c,u as d};
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-RfiFckzb.js","assets/services-status-context-DKmJ7ISr.js","assets/refresh-cw-BxVxNxNr.js","assets/database-DPh9wDY9.js","assets/external-link-VbMQvVMz.js","assets/PodPage-CM6do1vB.js","assets/PaneListHeader-57nvMwH6.js","assets/card-B9Zjf_2p.js","assets/NetworkPage-Brt79fuQ.js","assets/ServicesPage-BUNxGJRz.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-tOBaUnM1.js","assets/services-status-context-DN1Icg4A.js","assets/refresh-cw-CFDZPaE8.js","assets/database-Ct5ZPe6L.js","assets/external-link-B7wD1hkm.js","assets/PodPage-Bd3Xhmp-.js","assets/PaneListHeader-BSipfl0W.js","assets/card-z5BV5hTo.js","assets/NetworkPage-CXjiUMR1.js","assets/ServicesPage-CI3jWZGe.js"])))=>i.map(i=>d[i]);
2
2
  function _mergeNamespaces(i,e){for(var t=0;t<e.length;t++){const n=e[t];if(typeof n!="string"&&!Array.isArray(n)){for(const s in n)if(s!=="default"&&!(s in i)){const a=Object.getOwnPropertyDescriptor(n,s);a&&Object.defineProperty(i,s,a.get?a:{enumerable:!0,get:()=>n[s]})}}}return Object.freeze(Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))n(s);new MutationObserver(s=>{for(const a of s)if(a.type==="childList")for(const u of a.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&n(u)}).observe(document,{childList:!0,subtree:!0});function t(s){const a={};return s.integrity&&(a.integrity=s.integrity),s.referrerPolicy&&(a.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?a.credentials="include":s.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(s){if(s.ep)return;s.ep=!0;const a=t(s);fetch(s.href,a)}})();function getDefaultExportFromCjs(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var jsxRuntime={exports:{}},reactJsxRuntime_production={};var hasRequiredReactJsxRuntime_production;function requireReactJsxRuntime_production(){if(hasRequiredReactJsxRuntime_production)return reactJsxRuntime_production;hasRequiredReactJsxRuntime_production=1;var i=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function t(n,s,a){var u=null;if(a!==void 0&&(u=""+a),s.key!==void 0&&(u=""+s.key),"key"in s){a={};for(var c in s)c!=="key"&&(a[c]=s[c])}else a=s;return s=a.ref,{$$typeof:i,type:n,key:u,ref:s!==void 0?s:null,props:a}}return reactJsxRuntime_production.Fragment=e,reactJsxRuntime_production.jsx=t,reactJsxRuntime_production.jsxs=t,reactJsxRuntime_production}var hasRequiredJsxRuntime;function requireJsxRuntime(){return hasRequiredJsxRuntime||(hasRequiredJsxRuntime=1,jsxRuntime.exports=requireReactJsxRuntime_production()),jsxRuntime.exports}var jsxRuntimeExports=requireJsxRuntime(),react={exports:{}},react_production={};var hasRequiredReact_production;function requireReact_production(){if(hasRequiredReact_production)return react_production;hasRequiredReact_production=1;var i=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),u=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),y=Symbol.iterator;function S(G){return G===null||typeof G!="object"?null:(G=y&&G[y]||G["@@iterator"],typeof G=="function"?G:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},R=Object.assign,T={};function A(G,ce,oe){this.props=G,this.context=ce,this.refs=T,this.updater=oe||w}A.prototype.isReactComponent={},A.prototype.setState=function(G,ce){if(typeof G!="object"&&typeof G!="function"&&G!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,G,ce,"setState")},A.prototype.forceUpdate=function(G){this.updater.enqueueForceUpdate(this,G,"forceUpdate")};function F(){}F.prototype=A.prototype;function x(G,ce,oe){this.props=G,this.context=ce,this.refs=T,this.updater=oe||w}var D=x.prototype=new F;D.constructor=x,R(D,A.prototype),D.isPureReactComponent=!0;var O=Array.isArray;function K(){}var z={H:null,A:null,T:null,S:null},X=Object.prototype.hasOwnProperty;function Ee(G,ce,oe){var Fe=oe.ref;return{$$typeof:i,type:G,key:ce,ref:Fe!==void 0?Fe:null,props:oe}}function q(G,ce){return Ee(G.type,ce,G.props)}function Y(G){return typeof G=="object"&&G!==null&&G.$$typeof===i}function Te(G){var ce={"=":"=0",":":"=2"};return"$"+G.replace(/[=:]/g,function(oe){return ce[oe]})}var re=/\/+/g;function $e(G,ce){return typeof G=="object"&&G!==null&&G.key!=null?Te(""+G.key):ce.toString(36)}function ze(G){switch(G.status){case"fulfilled":return G.value;case"rejected":throw G.reason;default:switch(typeof G.status=="string"?G.then(K,K):(G.status="pending",G.then(function(ce){G.status==="pending"&&(G.status="fulfilled",G.value=ce)},function(ce){G.status==="pending"&&(G.status="rejected",G.reason=ce)})),G.status){case"fulfilled":return G.value;case"rejected":throw G.reason}}throw G}function ye(G,ce,oe,Fe,Ue){var Je=typeof G;(Je==="undefined"||Je==="boolean")&&(G=null);var He=!1;if(G===null)He=!0;else switch(Je){case"bigint":case"string":case"number":He=!0;break;case"object":switch(G.$$typeof){case i:case e:He=!0;break;case p:return He=G._init,ye(He(G._payload),ce,oe,Fe,Ue)}}if(He)return Ue=Ue(G),He=Fe===""?"."+$e(G,0):Fe,O(Ue)?(oe="",He!=null&&(oe=He.replace(re,"$&/")+"/"),ye(Ue,ce,oe,"",function(Oe){return Oe})):Ue!=null&&(Y(Ue)&&(Ue=q(Ue,oe+(Ue.key==null||G&&G.key===Ue.key?"":(""+Ue.key).replace(re,"$&/")+"/")+He)),ce.push(Ue)),1;He=0;var he=Fe===""?".":Fe+":";if(O(G))for(var fe=0;fe<G.length;fe++)Fe=G[fe],Je=he+$e(Fe,fe),He+=ye(Fe,ce,oe,Je,Ue);else if(fe=S(G),typeof fe=="function")for(G=fe.call(G),fe=0;!(Fe=G.next()).done;)Fe=Fe.value,Je=he+$e(Fe,fe++),He+=ye(Fe,ce,oe,Je,Ue);else if(Je==="object"){if(typeof G.then=="function")return ye(ze(G),ce,oe,Fe,Ue);throw ce=String(G),Error("Objects are not valid as a React child (found: "+(ce==="[object Object]"?"object with keys {"+Object.keys(G).join(", ")+"}":ce)+"). If you meant to render a collection of children, use an array instead.")}return He}function Ve(G,ce,oe){if(G==null)return G;var Fe=[],Ue=0;return ye(G,Fe,"","",function(Je){return ce.call(oe,Je,Ue++)}),Fe}function pe(G){if(G._status===-1){var ce=G._result;ce=ce(),ce.then(function(oe){(G._status===0||G._status===-1)&&(G._status=1,G._result=oe)},function(oe){(G._status===0||G._status===-1)&&(G._status=2,G._result=oe)}),G._status===-1&&(G._status=0,G._result=ce)}if(G._status===1)return G._result.default;throw G._result}var De=typeof reportError=="function"?reportError:function(G){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var ce=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof G=="object"&&G!==null&&typeof G.message=="string"?String(G.message):String(G),error:G});if(!window.dispatchEvent(ce))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",G);return}console.error(G)},$={map:Ve,forEach:function(G,ce,oe){Ve(G,function(){ce.apply(this,arguments)},oe)},count:function(G){var ce=0;return Ve(G,function(){ce++}),ce},toArray:function(G){return Ve(G,function(ce){return ce})||[]},only:function(G){if(!Y(G))throw Error("React.Children.only expected to receive a single React element child.");return G}};return react_production.Activity=g,react_production.Children=$,react_production.Component=A,react_production.Fragment=t,react_production.Profiler=s,react_production.PureComponent=x,react_production.StrictMode=n,react_production.Suspense=h,react_production.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=z,react_production.__COMPILER_RUNTIME={__proto__:null,c:function(G){return z.H.useMemoCache(G)}},react_production.cache=function(G){return function(){return G.apply(null,arguments)}},react_production.cacheSignal=function(){return null},react_production.cloneElement=function(G,ce,oe){if(G==null)throw Error("The argument must be a React element, but you passed "+G+".");var Fe=R({},G.props),Ue=G.key;if(ce!=null)for(Je in ce.key!==void 0&&(Ue=""+ce.key),ce)!X.call(ce,Je)||Je==="key"||Je==="__self"||Je==="__source"||Je==="ref"&&ce.ref===void 0||(Fe[Je]=ce[Je]);var Je=arguments.length-2;if(Je===1)Fe.children=oe;else if(1<Je){for(var He=Array(Je),he=0;he<Je;he++)He[he]=arguments[he+2];Fe.children=He}return Ee(G.type,Ue,Fe)},react_production.createContext=function(G){return G={$$typeof:u,_currentValue:G,_currentValue2:G,_threadCount:0,Provider:null,Consumer:null},G.Provider=G,G.Consumer={$$typeof:a,_context:G},G},react_production.createElement=function(G,ce,oe){var Fe,Ue={},Je=null;if(ce!=null)for(Fe in ce.key!==void 0&&(Je=""+ce.key),ce)X.call(ce,Fe)&&Fe!=="key"&&Fe!=="__self"&&Fe!=="__source"&&(Ue[Fe]=ce[Fe]);var He=arguments.length-2;if(He===1)Ue.children=oe;else if(1<He){for(var he=Array(He),fe=0;fe<He;fe++)he[fe]=arguments[fe+2];Ue.children=he}if(G&&G.defaultProps)for(Fe in He=G.defaultProps,He)Ue[Fe]===void 0&&(Ue[Fe]=He[Fe]);return Ee(G,Je,Ue)},react_production.createRef=function(){return{current:null}},react_production.forwardRef=function(G){return{$$typeof:c,render:G}},react_production.isValidElement=Y,react_production.lazy=function(G){return{$$typeof:p,_payload:{_status:-1,_result:G},_init:pe}},react_production.memo=function(G,ce){return{$$typeof:f,type:G,compare:ce===void 0?null:ce}},react_production.startTransition=function(G){var ce=z.T,oe={};z.T=oe;try{var Fe=G(),Ue=z.S;Ue!==null&&Ue(oe,Fe),typeof Fe=="object"&&Fe!==null&&typeof Fe.then=="function"&&Fe.then(K,De)}catch(Je){De(Je)}finally{ce!==null&&oe.types!==null&&(ce.types=oe.types),z.T=ce}},react_production.unstable_useCacheRefresh=function(){return z.H.useCacheRefresh()},react_production.use=function(G){return z.H.use(G)},react_production.useActionState=function(G,ce,oe){return z.H.useActionState(G,ce,oe)},react_production.useCallback=function(G,ce){return z.H.useCallback(G,ce)},react_production.useContext=function(G){return z.H.useContext(G)},react_production.useDebugValue=function(){},react_production.useDeferredValue=function(G,ce){return z.H.useDeferredValue(G,ce)},react_production.useEffect=function(G,ce){return z.H.useEffect(G,ce)},react_production.useEffectEvent=function(G){return z.H.useEffectEvent(G)},react_production.useId=function(){return z.H.useId()},react_production.useImperativeHandle=function(G,ce,oe){return z.H.useImperativeHandle(G,ce,oe)},react_production.useInsertionEffect=function(G,ce){return z.H.useInsertionEffect(G,ce)},react_production.useLayoutEffect=function(G,ce){return z.H.useLayoutEffect(G,ce)},react_production.useMemo=function(G,ce){return z.H.useMemo(G,ce)},react_production.useOptimistic=function(G,ce){return z.H.useOptimistic(G,ce)},react_production.useReducer=function(G,ce,oe){return z.H.useReducer(G,ce,oe)},react_production.useRef=function(G){return z.H.useRef(G)},react_production.useState=function(G){return z.H.useState(G)},react_production.useSyncExternalStore=function(G,ce,oe){return z.H.useSyncExternalStore(G,ce,oe)},react_production.useTransition=function(){return z.H.useTransition()},react_production.version="19.2.8",react_production}var hasRequiredReact;function requireReact(){return hasRequiredReact||(hasRequiredReact=1,react.exports=requireReact_production()),react.exports}var reactExports=requireReact();const React3=getDefaultExportFromCjs(reactExports),React=_mergeNamespaces({__proto__:null,default:React3},[reactExports]);var client={exports:{}},reactDomClient_production={},scheduler={exports:{}},scheduler_production={};var hasRequiredScheduler_production;function requireScheduler_production(){return hasRequiredScheduler_production||(hasRequiredScheduler_production=1,(function(i){function e(ye,Ve){var pe=ye.length;ye.push(Ve);e:for(;0<pe;){var De=pe-1>>>1,$=ye[De];if(0<s($,Ve))ye[De]=Ve,ye[pe]=$,pe=De;else break e}}function t(ye){return ye.length===0?null:ye[0]}function n(ye){if(ye.length===0)return null;var Ve=ye[0],pe=ye.pop();if(pe!==Ve){ye[0]=pe;e:for(var De=0,$=ye.length,G=$>>>1;De<G;){var ce=2*(De+1)-1,oe=ye[ce],Fe=ce+1,Ue=ye[Fe];if(0>s(oe,pe))Fe<$&&0>s(Ue,oe)?(ye[De]=Ue,ye[Fe]=pe,De=Fe):(ye[De]=oe,ye[ce]=pe,De=ce);else if(Fe<$&&0>s(Ue,pe))ye[De]=Ue,ye[Fe]=pe,De=Fe;else break e}}return Ve}function s(ye,Ve){var pe=ye.sortIndex-Ve.sortIndex;return pe!==0?pe:ye.id-Ve.id}if(i.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var a=performance;i.unstable_now=function(){return a.now()}}else{var u=Date,c=u.now();i.unstable_now=function(){return u.now()-c}}var h=[],f=[],p=1,g=null,y=3,S=!1,w=!1,R=!1,T=!1,A=typeof setTimeout=="function"?setTimeout:null,F=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;function D(ye){for(var Ve=t(f);Ve!==null;){if(Ve.callback===null)n(f);else if(Ve.startTime<=ye)n(f),Ve.sortIndex=Ve.expirationTime,e(h,Ve);else break;Ve=t(f)}}function O(ye){if(R=!1,D(ye),!w)if(t(h)!==null)w=!0,K||(K=!0,Te());else{var Ve=t(f);Ve!==null&&ze(O,Ve.startTime-ye)}}var K=!1,z=-1,X=5,Ee=-1;function q(){return T?!0:!(i.unstable_now()-Ee<X)}function Y(){if(T=!1,K){var ye=i.unstable_now();Ee=ye;var Ve=!0;try{e:{w=!1,R&&(R=!1,F(z),z=-1),S=!0;var pe=y;try{t:{for(D(ye),g=t(h);g!==null&&!(g.expirationTime>ye&&q());){var De=g.callback;if(typeof De=="function"){g.callback=null,y=g.priorityLevel;var $=De(g.expirationTime<=ye);if(ye=i.unstable_now(),typeof $=="function"){g.callback=$,D(ye),Ve=!0;break t}g===t(h)&&n(h),D(ye)}else n(h);g=t(h)}if(g!==null)Ve=!0;else{var G=t(f);G!==null&&ze(O,G.startTime-ye),Ve=!1}}break e}finally{g=null,y=pe,S=!1}Ve=void 0}}finally{Ve?Te():K=!1}}}var Te;if(typeof x=="function")Te=function(){x(Y)};else if(typeof MessageChannel<"u"){var re=new MessageChannel,$e=re.port2;re.port1.onmessage=Y,Te=function(){$e.postMessage(null)}}else Te=function(){A(Y,0)};function ze(ye,Ve){z=A(function(){ye(i.unstable_now())},Ve)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(ye){ye.callback=null},i.unstable_forceFrameRate=function(ye){0>ye||125<ye?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):X=0<ye?Math.floor(1e3/ye):5},i.unstable_getCurrentPriorityLevel=function(){return y},i.unstable_next=function(ye){switch(y){case 1:case 2:case 3:var Ve=3;break;default:Ve=y}var pe=y;y=Ve;try{return ye()}finally{y=pe}},i.unstable_requestPaint=function(){T=!0},i.unstable_runWithPriority=function(ye,Ve){switch(ye){case 1:case 2:case 3:case 4:case 5:break;default:ye=3}var pe=y;y=ye;try{return Ve()}finally{y=pe}},i.unstable_scheduleCallback=function(ye,Ve,pe){var De=i.unstable_now();switch(typeof pe=="object"&&pe!==null?(pe=pe.delay,pe=typeof pe=="number"&&0<pe?De+pe:De):pe=De,ye){case 1:var $=-1;break;case 2:$=250;break;case 5:$=1073741823;break;case 4:$=1e4;break;default:$=5e3}return $=pe+$,ye={id:p++,callback:Ve,priorityLevel:ye,startTime:pe,expirationTime:$,sortIndex:-1},pe>De?(ye.sortIndex=pe,e(f,ye),t(h)===null&&ye===t(f)&&(R?(F(z),z=-1):R=!0,ze(O,pe-De))):(ye.sortIndex=$,e(h,ye),w||S||(w=!0,K||(K=!0,Te()))),ye},i.unstable_shouldYield=q,i.unstable_wrapCallback=function(ye){var Ve=y;return function(){var pe=y;y=Ve;try{return ye.apply(this,arguments)}finally{y=pe}}}})(scheduler_production)),scheduler_production}var hasRequiredScheduler;function requireScheduler(){return hasRequiredScheduler||(hasRequiredScheduler=1,scheduler.exports=requireScheduler_production()),scheduler.exports}var reactDom={exports:{}},reactDom_production={};var hasRequiredReactDom_production;function requireReactDom_production(){if(hasRequiredReactDom_production)return reactDom_production;hasRequiredReactDom_production=1;var i=requireReact();function e(h){var f="https://react.dev/errors/"+h;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)f+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+h+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function t(){}var n={d:{f:t,r:function(){throw Error(e(522))},D:t,C:t,L:t,m:t,X:t,S:t,M:t},p:0,findDOMNode:null},s=Symbol.for("react.portal");function a(h,f,p){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:g==null?null:""+g,children:h,containerInfo:f,implementation:p}}var u=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(h,f){if(h==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return reactDom_production.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=n,reactDom_production.createPortal=function(h,f){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(e(299));return a(h,f,null,p)},reactDom_production.flushSync=function(h){var f=u.T,p=n.p;try{if(u.T=null,n.p=2,h)return h()}finally{u.T=f,n.p=p,n.d.f()}},reactDom_production.preconnect=function(h,f){typeof h=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,n.d.C(h,f))},reactDom_production.prefetchDNS=function(h){typeof h=="string"&&n.d.D(h)},reactDom_production.preinit=function(h,f){if(typeof h=="string"&&f&&typeof f.as=="string"){var p=f.as,g=c(p,f.crossOrigin),y=typeof f.integrity=="string"?f.integrity:void 0,S=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;p==="style"?n.d.S(h,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:g,integrity:y,fetchPriority:S}):p==="script"&&n.d.X(h,{crossOrigin:g,integrity:y,fetchPriority:S,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},reactDom_production.preinitModule=function(h,f){if(typeof h=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var p=c(f.as,f.crossOrigin);n.d.M(h,{crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&n.d.M(h)},reactDom_production.preload=function(h,f){if(typeof h=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var p=f.as,g=c(p,f.crossOrigin);n.d.L(h,p,{crossOrigin:g,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},reactDom_production.preloadModule=function(h,f){if(typeof h=="string")if(f){var p=c(f.as,f.crossOrigin);n.d.m(h,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else n.d.m(h)},reactDom_production.requestFormReset=function(h){n.d.r(h)},reactDom_production.unstable_batchedUpdates=function(h,f){return h(f)},reactDom_production.useFormState=function(h,f,p){return u.H.useFormState(h,f,p)},reactDom_production.useFormStatus=function(){return u.H.useHostTransitionStatus()},reactDom_production.version="19.2.8",reactDom_production}var hasRequiredReactDom;function requireReactDom(){if(hasRequiredReactDom)return reactDom.exports;hasRequiredReactDom=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(e){console.error(e)}}return i(),reactDom.exports=requireReactDom_production(),reactDom.exports}var hasRequiredReactDomClient_production;function requireReactDomClient_production(){if(hasRequiredReactDomClient_production)return reactDomClient_production;hasRequiredReactDomClient_production=1;var i=requireScheduler(),e=requireReact(),t=requireReactDom();function n(o){var l="https://react.dev/errors/"+o;if(1<arguments.length){l+="?args[]="+encodeURIComponent(arguments[1]);for(var d=2;d<arguments.length;d++)l+="&args[]="+encodeURIComponent(arguments[d])}return"Minified React error #"+o+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11)}function a(o){var l=o,d=o;if(o.alternate)for(;l.return;)l=l.return;else{o=l;do l=o,(l.flags&4098)!==0&&(d=l.return),o=l.return;while(o)}return l.tag===3?d:null}function u(o){if(o.tag===13){var l=o.memoizedState;if(l===null&&(o=o.alternate,o!==null&&(l=o.memoizedState)),l!==null)return l.dehydrated}return null}function c(o){if(o.tag===31){var l=o.memoizedState;if(l===null&&(o=o.alternate,o!==null&&(l=o.memoizedState)),l!==null)return l.dehydrated}return null}function h(o){if(a(o)!==o)throw Error(n(188))}function f(o){var l=o.alternate;if(!l){if(l=a(o),l===null)throw Error(n(188));return l!==o?null:o}for(var d=o,m=l;;){var E=d.return;if(E===null)break;var C=E.alternate;if(C===null){if(m=E.return,m!==null){d=m;continue}break}if(E.child===C.child){for(C=E.child;C;){if(C===d)return h(E),o;if(C===m)return h(E),l;C=C.sibling}throw Error(n(188))}if(d.return!==m.return)d=E,m=C;else{for(var W=!1,le=E.child;le;){if(le===d){W=!0,d=E,m=C;break}if(le===m){W=!0,m=E,d=C;break}le=le.sibling}if(!W){for(le=C.child;le;){if(le===d){W=!0,d=C,m=E;break}if(le===m){W=!0,m=C,d=E;break}le=le.sibling}if(!W)throw Error(n(189))}}if(d.alternate!==m)throw Error(n(190))}if(d.tag!==3)throw Error(n(188));return d.stateNode.current===d?o:l}function p(o){var l=o.tag;if(l===5||l===26||l===27||l===6)return o;for(o=o.child;o!==null;){if(l=p(o),l!==null)return l;o=o.sibling}return null}var g=Object.assign,y=Symbol.for("react.element"),S=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),R=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),F=Symbol.for("react.consumer"),x=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),K=Symbol.for("react.suspense_list"),z=Symbol.for("react.memo"),X=Symbol.for("react.lazy"),Ee=Symbol.for("react.activity"),q=Symbol.for("react.memo_cache_sentinel"),Y=Symbol.iterator;function Te(o){return o===null||typeof o!="object"?null:(o=Y&&o[Y]||o["@@iterator"],typeof o=="function"?o:null)}var re=Symbol.for("react.client.reference");function $e(o){if(o==null)return null;if(typeof o=="function")return o.$$typeof===re?null:o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case R:return"Fragment";case A:return"Profiler";case T:return"StrictMode";case O:return"Suspense";case K:return"SuspenseList";case Ee:return"Activity"}if(typeof o=="object")switch(o.$$typeof){case w:return"Portal";case x:return o.displayName||"Context";case F:return(o._context.displayName||"Context")+".Consumer";case D:var l=o.render;return o=o.displayName,o||(o=l.displayName||l.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case z:return l=o.displayName||null,l!==null?l:$e(o.type)||"Memo";case X:l=o._payload,o=o._init;try{return $e(o(l))}catch{}}return null}var ze=Array.isArray,ye=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ve=t.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,pe={pending:!1,data:null,method:null,action:null},De=[],$=-1;function G(o){return{current:o}}function ce(o){0>$||(o.current=De[$],De[$]=null,$--)}function oe(o,l){$++,De[$]=o.current,o.current=l}var Fe=G(null),Ue=G(null),Je=G(null),He=G(null);function he(o,l){switch(oe(Je,l),oe(Ue,o),oe(Fe,null),l.nodeType){case 9:case 11:o=(o=l.documentElement)&&(o=o.namespaceURI)?Of(o):0;break;default:if(o=l.tagName,l=l.namespaceURI)l=Of(l),o=$f(l,o);else switch(o){case"svg":o=1;break;case"math":o=2;break;default:o=0}}ce(Fe),oe(Fe,o)}function fe(){ce(Fe),ce(Ue),ce(Je)}function Oe(o){o.memoizedState!==null&&oe(He,o);var l=Fe.current,d=$f(l,o.type);l!==d&&(oe(Ue,o),oe(Fe,d))}function ie(o){Ue.current===o&&(ce(Fe),ce(Ue)),He.current===o&&(ce(He),ia._currentValue=pe)}var j,N;function L(o){if(j===void 0)try{throw Error()}catch(d){var l=d.stack.trim().match(/\n( *(at )?)/);j=l&&l[1]||"",N=-1<d.stack.indexOf(`
3
3
  at`)?" (<anonymous>)":-1<d.stack.indexOf("@")?"@unknown:0:0":""}return`
4
4
  `+j+o+N}var V=!1;function ee(o,l){if(!o||V)return"";V=!0;var d=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var m={DetermineComponentFrameRoot:function(){try{if(l){var dt=function(){throw Error()};if(Object.defineProperty(dt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(dt,[])}catch(it){var tt=it}Reflect.construct(o,[],dt)}else{try{dt.call()}catch(it){tt=it}o.call(dt.prototype)}}else{try{throw Error()}catch(it){tt=it}(dt=o())&&typeof dt.catch=="function"&&dt.catch(function(){})}}catch(it){if(it&&tt&&typeof it.stack=="string")return[it.stack,tt.stack]}return[null,null]}};m.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var E=Object.getOwnPropertyDescriptor(m.DetermineComponentFrameRoot,"name");E&&E.configurable&&Object.defineProperty(m.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var C=m.DetermineComponentFrameRoot(),W=C[0],le=C[1];if(W&&le){var ke=W.split(`
@@ -302,4 +302,4 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
302
302
  SELECT ?resource WHERE {
303
303
  <${t}> ldp:contains ?resource .
304
304
  }
305
- `,prefixes:{ldp:"http://www.w3.org/ns/ldp#"}},a=await this.sparqlExecutor.queryContainer(t,s);for(const u of a){const c=u.resource;if(c){const h=hasStringValue(c)?c.value:String(c);n.push(h)}}}catch(s){console.warn("[listContainerResources] SPARQL query failed:",s)}return n}}_a=entityKind;PodDialect[_a]="PodDialect";function drizzle(i,e){if(!i||!i.info.isLoggedIn)throw new Error("需要有效的已认证Session");const t={session:i,preferredChannels:e?.notifications?.preferredChannels,createQueryEngine:e?.sparql?.createQueryEngine,disableInteropDiscovery:e?.disableInteropDiscovery,podUrl:e?.podUrl??i.info.podUrl,resourcePreparation:e?.resourcePreparation,storageTTL:e?.storageTTL,debug:e?.debug??e?.logger},n=new PodDialect(t);e?.schema&&n.setSchema(e.schema);const s=new PodAsyncSession(n);return new PodDatabase(n,s,e?.schema)}const SOLID_STORAGE_KEYS=new Set(["solid:storage","http://www.w3.org/ns/solid/terms#storage","pim:storage","http://www.w3.org/ns/pim/space#storage"]);async function fetchProfileStorageUrls(i,e){const t=await i(e,{headers:{Accept:"text/turtle, application/ld+json, application/json"},credentials:"include"}).catch(()=>{});if(!t?.ok)return[];const n=t.headers?.get?.("content-type")??"",s=await t.text().catch(()=>"");if(!s)return[];if(n.includes("json"))try{return uniqueNormalizedStorageUrls(extractStorageUrlsFromJson(JSON.parse(s)))}catch{return[]}return uniqueNormalizedStorageUrls(extractStorageUrlsFromTurtle(s))}function extractStorageUrlsFromTurtle(i){return Array.from(i.matchAll(/(?:solid:storage|pim:storage|<http:\/\/www\.w3\.org\/ns\/solid\/terms#storage>|<http:\/\/www\.w3\.org\/ns\/pim\/space#storage>)\s+<([^>]+)>/giu)).map(e=>e[1]).filter(e=>typeof e=="string"&&e.length>0)}function extractStorageUrlsFromJson(i){const e=new Set,t=new WeakSet,n=(s,a=!1)=>{if(typeof s=="string"){a&&e.add(s);return}if(!(!s||typeof s!="object")&&!t.has(s)){if(t.add(s),Array.isArray(s)){for(const u of s)n(u,a);return}for(const[u,c]of Object.entries(s)){const h=SOLID_STORAGE_KEYS.has(u);if(a&&u==="@id"){n(c,!0);continue}n(c,a||h)}}};return n(i),Array.from(e)}function normalizeStorageUrl(i){try{return ensureTrailingSlash(new URL(i).toString())}catch{return}}function uniqueNormalizedStorageUrls(i){const e=new Set;for(const t of i){const n=normalizeStorageUrl(t);n&&e.add(n)}return Array.from(e)}function ensureTrailingSlash(i){return i.replace(/\/+$/u,"")+"/"}const XPOD_LAST_OIDC_ISSUER_STORAGE_KEY="xpod.solid.lastOidcIssuer",XpodSolidRuntimeContext=reactExports.createContext(null),initializedRuntimes=new WeakSet;function snapshotToState(i,e,t){return i.status==="initializing"?{status:"loading",issuer:t}:i.status==="anonymous"?{status:"anonymous",issuer:t}:i.status==="error"?{status:"error",webId:i.webId,error:i.error,podUrl:e?.podUrl,issuer:t}:{status:"authenticated",webId:i.webId,podUrl:e?.podUrl,issuer:t}}async function discoverPodUrlFromWebId({webId:i,fetch:e}){const n=(await fetchProfileStorageUrls(e,i))[0];if(!n)throw new Error("WebID profile does not declare a Solid storage URL");return ensureTrailingSlash(new URL(n).toString())}function createXpodSolidRuntimeValue(i={}){const e=i.sessionFactory?.()??new Session;let t=readIssuerFromSessionInfo(e.info)??readStoredOidcIssuer();const n=createSolidSessionRuntime({session:e}),s={get info(){return e.info},fetch:e.fetch},a=createPodRuntime({adapter:{discoverPod:({webId:u,fetch:c})=>discoverPodUrlFromWebId({webId:u,fetch:c}),openDatabase:({podUrl:u})=>drizzle(s,{podUrl:u,resourcePreparation:"off"}),hydrateCollections:()=>{}}});return{session:n,pod:a,getIssuer:()=>readIssuerFromSessionInfo(e.info)??t??readStoredOidcIssuer(),setIssuer:u=>{const c=normalizeXpodOidcIssuer(u);t=c,c&&writeStoredOidcIssuer(c)}}}let defaultRuntime;function getXpodSolidRuntimeValue(){return defaultRuntime??=createXpodSolidRuntimeValue(),defaultRuntime}function safeAuthError(i){return i.message==="Solid session expired"?i:new Error("Solid login failed. Please reconnect your Pod.")}function useXpodSolidRuntimeContext(){const i=reactExports.useContext(XpodSolidRuntimeContext);if(!i)throw new Error("useXpodSolidRuntime must be used within XpodSolidRuntimeProvider");return i}function readIssuerFromSessionInfo(i){const e=i.issuer??i.oidcIssuer;return normalizeXpodOidcIssuer(e)}function normalizeXpodOidcIssuer(i){if(!(typeof i!="string"||!i.trim()))try{const e=new URL(i.trim());return e.protocol!=="https:"&&e.protocol!=="http:"||e.username||e.password||e.search||e.hash?void 0:e.toString()}catch{return}}function readStoredOidcIssuer(){try{return normalizeXpodOidcIssuer(globalThis.window?.sessionStorage.getItem(XPOD_LAST_OIDC_ISSUER_STORAGE_KEY))}catch{return}}function writeStoredOidcIssuer(i){try{globalThis.window?.sessionStorage.setItem(XPOD_LAST_OIDC_ISSUER_STORAGE_KEY,i)}catch{}}const useXpodSolidRuntime=useXpodSolidRuntimeContext;function SettingsAuthBoundary({children:i,product:e="Settings"}){const t=useXpodSolidRuntime(),n=t.state.status==="loading"?{status:"loading"}:t.state.status==="authenticated"?{status:"authenticated"}:t.state.status==="error"?{status:"error",message:t.state.error.message}:{status:"anonymous"};return jsxRuntimeExports.jsx(AuthBoundary,{state:n,login:t.login,loginView:{title:`Connect Xpod ${e}`,description:e==="Dashboard"?"Use your Solid identity to inspect Xpod status, runtime, logs, RDF, network, and usage.":"Use your Solid identity to manage model, Pod, network, and service settings.",defaultIssuer:window.location.origin},children:i})}const LogsPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-RfiFckzb.js"),__vite__mapDeps([0,1,2,3,4])).then(i=>({default:i.LogsPage}))),RdfPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-RfiFckzb.js"),__vite__mapDeps([0,1,2,3,4])).then(i=>({default:i.RdfPage}))),StatusPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-RfiFckzb.js"),__vite__mapDeps([0,1,2,3,4])).then(i=>({default:i.StatusPage}))),PodPage=reactExports.lazy(()=>__vitePreload(()=>import("./PodPage-CM6do1vB.js"),__vite__mapDeps([5,6,7,4,3,2]))),NetworkPage=reactExports.lazy(()=>__vitePreload(()=>import("./NetworkPage-Brt79fuQ.js"),__vite__mapDeps([8,6,7,2]))),ServicesPage=reactExports.lazy(()=>__vitePreload(()=>import("./ServicesPage-BUNxGJRz.js"),__vite__mapDeps([9,1,3,6,2])));function lazyRoute(i){return jsxRuntimeExports.jsx(reactExports.Suspense,{fallback:jsxRuntimeExports.jsx("div",{className:"p-6 text-sm text-muted-foreground",children:"Loading settings..."}),children:i})}function guardedRoute(i){return jsxRuntimeExports.jsx(SettingsAuthBoundary,{product:"Dashboard",children:i})}const dashboardRoutes=[{element:jsxRuntimeExports.jsx(XpodDashboardLayout,{}),children:[{index:!0,element:jsxRuntimeExports.jsx(Navigate,{to:"/overview",replace:!0})},{path:"overview",element:guardedRoute(lazyRoute(jsxRuntimeExports.jsx(ServicesPage,{product:"dashboard"}))),children:[{index:!0,element:lazyRoute(jsxRuntimeExports.jsx(StatusPage,{}))}]},{path:"runtime",element:guardedRoute(lazyRoute(jsxRuntimeExports.jsx(ServicesPage,{product:"dashboard"}))),children:[{index:!0,element:lazyRoute(jsxRuntimeExports.jsx(StatusPage,{}))}]},{path:"logs",element:guardedRoute(lazyRoute(jsxRuntimeExports.jsx(LogsPage,{})))},{path:"rdf",element:guardedRoute(lazyRoute(jsxRuntimeExports.jsx(RdfPage,{})))},{path:"network",element:guardedRoute(lazyRoute(jsxRuntimeExports.jsx(NetworkPage,{})))},{path:"usage",element:guardedRoute(lazyRoute(jsxRuntimeExports.jsx(PodPage,{view:"usage"})))},{path:"status",element:jsxRuntimeExports.jsx(Navigate,{to:"/overview",replace:!0})},{path:"*",element:jsxRuntimeExports.jsx(Navigate,{to:"/overview",replace:!0})}]}];function XpodSolidRuntimeProvider({children:i,value:e}){const t=e??getXpodSolidRuntimeValue(),[n,s]=reactExports.useState(()=>t.session.getSnapshot()),[a,u]=reactExports.useState(()=>t.getIssuer()),[c,h]=reactExports.useState(),[f,p]=reactExports.useState(),[g,y]=reactExports.useState();reactExports.useEffect(()=>t.session.subscribe(R=>{s(R),u(t.getIssuer()),R.status!=="authenticated"?(h(void 0),p(void 0),t.pod.clear()):R.webId!==n.webId&&y(void 0)}),[t,n.webId]),reactExports.useEffect(()=>{initializedRuntimes.has(t)||(initializedRuntimes.add(t),t.session.initialize({restorePreviousSession:!0}).then(R=>{s(R),u(t.getIssuer())}))},[t]),reactExports.useEffect(()=>{if(n.status!=="authenticated")return;let R=!1;return t.pod.open({webId:n.webId,fetch:t.session.fetch}).then(T=>{R||(h(T),p(void 0))},T=>{R||p({webId:n.webId,error:T instanceof Error?T:new Error(String(T))})}),()=>{R=!0}},[t,n]);const S=n.status==="authenticated"?n.webId:void 0;reactExports.useEffect(()=>{if(!S)return;let R=!1;return discoverAiClientConfigurationCapability(t.session.fetch).then(T=>{!R&&t.session.getSnapshot().status==="authenticated"&&t.session.getSnapshot().webId===S&&y(T)}),()=>{R=!0}},[S,t]);const w=reactExports.useMemo(()=>{const R=a??t.getIssuer(),T=n.status==="authenticated"&&f?.webId===n.webId?f.error:void 0,A=T?{status:"error",webId:n.webId,podUrl:c?.podUrl,issuer:R,error:T}:snapshotToState(n,c,R);return{session:t.session,pod:t.pod,fetch:t.session.fetch,state:A.status==="error"?{...A,error:safeAuthError(A.error)}:A,webId:A.webId,podUrl:A.podUrl,issuer:A.issuer,currentPod:c,aiClientConfiguration:g,login:async F=>{const x=normalizeXpodOidcIssuer(F);x&&(t.setIssuer(x),u(x),await t.session.login({oidcIssuer:x,redirectUrl:window.location.href}))},logout:async()=>{t.pod.clear(),h(void 0),await t.session.logout()}}},[g,c,a,f,t,n]);return jsxRuntimeExports.jsx(SolidRuntimeProvider,{value:{session:t.session,pod:t.pod,currentPod:c},children:jsxRuntimeExports.jsx(XpodSolidRuntimeContext.Provider,{value:w,children:i})})}async function discoverAiClientConfigurationCapability(i){try{const e=await i("/api/ai/client-configuration/capability",{method:"GET",credentials:"include",headers:{accept:"application/json"}});if(!e.ok||!e.headers.get("content-type")?.includes("application/json"))return await e.arrayBuffer().catch(()=>{}),manualAiClientConfigurationCapability();const t=await e.json();if(isRecord(t)&&t.available===!0&&t.authority==="local-filesystem")return{available:!0,authority:"local-filesystem",manualInstructions:typeof t.manualInstructions=="string"?t.manualInstructions:manualAiClientConfigurationCapability().manualInstructions}}catch{}return manualAiClientConfigurationCapability()}function manualAiClientConfigurationCapability(){return{available:!1,manualInstructions:"manual client setup is available"}}function isRecord(i){return!!(i&&typeof i=="object"&&!Array.isArray(i))}function DashboardRoutes(){return useRoutes(dashboardRoutes)}function DashboardApp(){return jsxRuntimeExports.jsx(XpodSolidRuntimeProvider,{children:jsxRuntimeExports.jsx(BrowserRouter,{basename:"/dashboard",children:jsxRuntimeExports.jsx(DashboardRoutes,{})})})}clientExports.createRoot(document.getElementById("root")).render(jsxRuntimeExports.jsx(reactExports.StrictMode,{children:jsxRuntimeExports.jsx(DashboardApp,{})}));export{Activity as A,Button as B,Gauge as G,Link as L,NavLink as N,Outlet as O,React as R,ScrollText as S,cn as a,cva as b,createLucideIcon as c,useLocation as d,clsx as e,Network as f,requireReact as g,useComposedRefs as h,createSlot as i,jsxRuntimeExports as j,getDefaultExportFromCjs as k,reactExports as r,useXpodSolidRuntime as u};
305
+ `,prefixes:{ldp:"http://www.w3.org/ns/ldp#"}},a=await this.sparqlExecutor.queryContainer(t,s);for(const u of a){const c=u.resource;if(c){const h=hasStringValue(c)?c.value:String(c);n.push(h)}}}catch(s){console.warn("[listContainerResources] SPARQL query failed:",s)}return n}}_a=entityKind;PodDialect[_a]="PodDialect";function drizzle(i,e){if(!i||!i.info.isLoggedIn)throw new Error("需要有效的已认证Session");const t={session:i,preferredChannels:e?.notifications?.preferredChannels,createQueryEngine:e?.sparql?.createQueryEngine,disableInteropDiscovery:e?.disableInteropDiscovery,podUrl:e?.podUrl??i.info.podUrl,resourcePreparation:e?.resourcePreparation,storageTTL:e?.storageTTL,debug:e?.debug??e?.logger},n=new PodDialect(t);e?.schema&&n.setSchema(e.schema);const s=new PodAsyncSession(n);return new PodDatabase(n,s,e?.schema)}const SOLID_STORAGE_KEYS=new Set(["solid:storage","http://www.w3.org/ns/solid/terms#storage","pim:storage","http://www.w3.org/ns/pim/space#storage"]);async function fetchProfileStorageUrls(i,e){const t=await i(e,{headers:{Accept:"text/turtle, application/ld+json, application/json"},credentials:"include"}).catch(()=>{});if(!t?.ok)return[];const n=t.headers?.get?.("content-type")??"",s=await t.text().catch(()=>"");if(!s)return[];if(n.includes("json"))try{return uniqueNormalizedStorageUrls(extractStorageUrlsFromJson(JSON.parse(s)))}catch{return[]}return uniqueNormalizedStorageUrls(extractStorageUrlsFromTurtle(s))}function extractStorageUrlsFromTurtle(i){return Array.from(i.matchAll(/(?:solid:storage|pim:storage|<http:\/\/www\.w3\.org\/ns\/solid\/terms#storage>|<http:\/\/www\.w3\.org\/ns\/pim\/space#storage>)\s+<([^>]+)>/giu)).map(e=>e[1]).filter(e=>typeof e=="string"&&e.length>0)}function extractStorageUrlsFromJson(i){const e=new Set,t=new WeakSet,n=(s,a=!1)=>{if(typeof s=="string"){a&&e.add(s);return}if(!(!s||typeof s!="object")&&!t.has(s)){if(t.add(s),Array.isArray(s)){for(const u of s)n(u,a);return}for(const[u,c]of Object.entries(s)){const h=SOLID_STORAGE_KEYS.has(u);if(a&&u==="@id"){n(c,!0);continue}n(c,a||h)}}};return n(i),Array.from(e)}function normalizeStorageUrl(i){try{return ensureTrailingSlash(new URL(i).toString())}catch{return}}function uniqueNormalizedStorageUrls(i){const e=new Set;for(const t of i){const n=normalizeStorageUrl(t);n&&e.add(n)}return Array.from(e)}function ensureTrailingSlash(i){return i.replace(/\/+$/u,"")+"/"}const XPOD_LAST_OIDC_ISSUER_STORAGE_KEY="xpod.solid.lastOidcIssuer",XpodSolidRuntimeContext=reactExports.createContext(null),initializedRuntimes=new WeakSet;function snapshotToState(i,e,t){return i.status==="initializing"?{status:"loading",issuer:t}:i.status==="anonymous"?{status:"anonymous",issuer:t}:i.status==="error"?{status:"error",webId:i.webId,error:i.error,podUrl:e?.podUrl,issuer:t}:{status:"authenticated",webId:i.webId,podUrl:e?.podUrl,issuer:t}}async function discoverPodUrlFromWebId({webId:i,fetch:e}){const n=(await fetchProfileStorageUrls(e,i))[0];if(!n)throw new Error("WebID profile does not declare a Solid storage URL");return ensureTrailingSlash(new URL(n).toString())}function createXpodSolidRuntimeValue(i={}){const e=i.sessionFactory?.()??new Session;let t=readIssuerFromSessionInfo(e.info)??readStoredOidcIssuer();const n=createSolidSessionRuntime({session:e}),s={get info(){return e.info},fetch:e.fetch},a=createPodRuntime({adapter:{discoverPod:({webId:u,fetch:c})=>discoverPodUrlFromWebId({webId:u,fetch:c}),openDatabase:({podUrl:u})=>drizzle(s,{podUrl:u,resourcePreparation:"off"}),hydrateCollections:()=>{}}});return{session:n,pod:a,getIssuer:()=>readIssuerFromSessionInfo(e.info)??t??readStoredOidcIssuer(),setIssuer:u=>{const c=normalizeXpodOidcIssuer(u);t=c,c&&writeStoredOidcIssuer(c)}}}let defaultRuntime;function getXpodSolidRuntimeValue(){return defaultRuntime??=createXpodSolidRuntimeValue(),defaultRuntime}function safeAuthError(i){return i.message==="Solid session expired"?i:new Error("Solid login failed. Please reconnect your Pod.")}function useXpodSolidRuntimeContext(){const i=reactExports.useContext(XpodSolidRuntimeContext);if(!i)throw new Error("useXpodSolidRuntime must be used within XpodSolidRuntimeProvider");return i}function readIssuerFromSessionInfo(i){const e=i.issuer??i.oidcIssuer;return normalizeXpodOidcIssuer(e)}function normalizeXpodOidcIssuer(i){if(!(typeof i!="string"||!i.trim()))try{const e=new URL(i.trim());return e.protocol!=="https:"&&e.protocol!=="http:"||e.username||e.password||e.search||e.hash?void 0:e.toString()}catch{return}}function readStoredOidcIssuer(){try{return normalizeXpodOidcIssuer(globalThis.window?.sessionStorage.getItem(XPOD_LAST_OIDC_ISSUER_STORAGE_KEY))}catch{return}}function writeStoredOidcIssuer(i){try{globalThis.window?.sessionStorage.setItem(XPOD_LAST_OIDC_ISSUER_STORAGE_KEY,i)}catch{}}const useXpodSolidRuntime=useXpodSolidRuntimeContext;function SettingsAuthBoundary({children:i,product:e="Settings"}){const t=useXpodSolidRuntime(),n=t.state.status==="loading"?{status:"loading"}:t.state.status==="authenticated"?{status:"authenticated"}:t.state.status==="error"?{status:"error",message:t.state.error.message}:{status:"anonymous"};return jsxRuntimeExports.jsx(AuthBoundary,{state:n,login:t.login,loginView:{title:`Connect Xpod ${e}`,description:e==="Dashboard"?"Use your Solid identity to inspect Xpod status, runtime, logs, RDF, network, and usage.":"Use your Solid identity to manage model, Pod, network, and service settings.",defaultIssuer:window.location.origin},children:i})}const LogsPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-tOBaUnM1.js"),__vite__mapDeps([0,1,2,3,4])).then(i=>({default:i.LogsPage}))),RdfPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-tOBaUnM1.js"),__vite__mapDeps([0,1,2,3,4])).then(i=>({default:i.RdfPage}))),StatusPage=reactExports.lazy(()=>__vitePreload(()=>import("./index-tOBaUnM1.js"),__vite__mapDeps([0,1,2,3,4])).then(i=>({default:i.StatusPage}))),PodPage=reactExports.lazy(()=>__vitePreload(()=>import("./PodPage-Bd3Xhmp-.js"),__vite__mapDeps([5,6,7,4,3,2]))),NetworkPage=reactExports.lazy(()=>__vitePreload(()=>import("./NetworkPage-CXjiUMR1.js"),__vite__mapDeps([8,6,7,2]))),ServicesPage=reactExports.lazy(()=>__vitePreload(()=>import("./ServicesPage-CI3jWZGe.js"),__vite__mapDeps([9,1,3,6,2])));function lazyRoute(i){return jsxRuntimeExports.jsx(reactExports.Suspense,{fallback:jsxRuntimeExports.jsx("div",{className:"p-6 text-sm text-muted-foreground",children:"Loading settings..."}),children:i})}function guardedRoute(i){return jsxRuntimeExports.jsx(SettingsAuthBoundary,{product:"Dashboard",children:i})}const dashboardRoutes=[{element:jsxRuntimeExports.jsx(XpodDashboardLayout,{}),children:[{index:!0,element:jsxRuntimeExports.jsx(Navigate,{to:"/overview",replace:!0})},{path:"overview",element:guardedRoute(lazyRoute(jsxRuntimeExports.jsx(ServicesPage,{product:"dashboard"}))),children:[{index:!0,element:lazyRoute(jsxRuntimeExports.jsx(StatusPage,{}))}]},{path:"runtime",element:guardedRoute(lazyRoute(jsxRuntimeExports.jsx(ServicesPage,{product:"dashboard"}))),children:[{index:!0,element:lazyRoute(jsxRuntimeExports.jsx(StatusPage,{}))}]},{path:"logs",element:guardedRoute(lazyRoute(jsxRuntimeExports.jsx(LogsPage,{})))},{path:"rdf",element:guardedRoute(lazyRoute(jsxRuntimeExports.jsx(RdfPage,{})))},{path:"network",element:guardedRoute(lazyRoute(jsxRuntimeExports.jsx(NetworkPage,{})))},{path:"usage",element:guardedRoute(lazyRoute(jsxRuntimeExports.jsx(PodPage,{view:"usage"})))},{path:"status",element:jsxRuntimeExports.jsx(Navigate,{to:"/overview",replace:!0})},{path:"*",element:jsxRuntimeExports.jsx(Navigate,{to:"/overview",replace:!0})}]}];function XpodSolidRuntimeProvider({children:i,value:e}){const t=e??getXpodSolidRuntimeValue(),[n,s]=reactExports.useState(()=>t.session.getSnapshot()),[a,u]=reactExports.useState(()=>t.getIssuer()),[c,h]=reactExports.useState(),[f,p]=reactExports.useState(),[g,y]=reactExports.useState();reactExports.useEffect(()=>t.session.subscribe(R=>{s(R),u(t.getIssuer()),R.status!=="authenticated"?(h(void 0),p(void 0),t.pod.clear()):R.webId!==n.webId&&y(void 0)}),[t,n.webId]),reactExports.useEffect(()=>{initializedRuntimes.has(t)||(initializedRuntimes.add(t),t.session.initialize({restorePreviousSession:!0}).then(R=>{s(R),u(t.getIssuer())}))},[t]),reactExports.useEffect(()=>{if(n.status!=="authenticated")return;let R=!1;return t.pod.open({webId:n.webId,fetch:t.session.fetch}).then(T=>{R||(h(T),p(void 0))},T=>{R||p({webId:n.webId,error:T instanceof Error?T:new Error(String(T))})}),()=>{R=!0}},[t,n]);const S=n.status==="authenticated"?n.webId:void 0;reactExports.useEffect(()=>{if(!S)return;let R=!1;return discoverAiClientConfigurationCapability(t.session.fetch).then(T=>{!R&&t.session.getSnapshot().status==="authenticated"&&t.session.getSnapshot().webId===S&&y(T)}),()=>{R=!0}},[S,t]);const w=reactExports.useMemo(()=>{const R=a??t.getIssuer(),T=n.status==="authenticated"&&f?.webId===n.webId?f.error:void 0,A=T?{status:"error",webId:n.webId,podUrl:c?.podUrl,issuer:R,error:T}:snapshotToState(n,c,R);return{session:t.session,pod:t.pod,fetch:t.session.fetch,state:A.status==="error"?{...A,error:safeAuthError(A.error)}:A,webId:A.webId,podUrl:A.podUrl,issuer:A.issuer,currentPod:c,aiClientConfiguration:g,login:async F=>{const x=normalizeXpodOidcIssuer(F);x&&(t.setIssuer(x),u(x),await t.session.login({oidcIssuer:x,redirectUrl:window.location.href}))},logout:async()=>{t.pod.clear(),h(void 0),await t.session.logout()}}},[g,c,a,f,t,n]);return jsxRuntimeExports.jsx(SolidRuntimeProvider,{value:{session:t.session,pod:t.pod,currentPod:c},children:jsxRuntimeExports.jsx(XpodSolidRuntimeContext.Provider,{value:w,children:i})})}async function discoverAiClientConfigurationCapability(i){try{const e=await i("/api/ai/client-configuration/capability",{method:"GET",credentials:"include",headers:{accept:"application/json"}});if(!e.ok||!e.headers.get("content-type")?.includes("application/json"))return await e.arrayBuffer().catch(()=>{}),manualAiClientConfigurationCapability();const t=await e.json();if(isRecord(t)&&t.available===!0&&t.authority==="local-filesystem")return{available:!0,authority:"local-filesystem",manualInstructions:typeof t.manualInstructions=="string"?t.manualInstructions:manualAiClientConfigurationCapability().manualInstructions}}catch{}return manualAiClientConfigurationCapability()}function manualAiClientConfigurationCapability(){return{available:!1,manualInstructions:"manual client setup is available"}}function isRecord(i){return!!(i&&typeof i=="object"&&!Array.isArray(i))}function DashboardRoutes(){return useRoutes(dashboardRoutes)}function DashboardApp(){return jsxRuntimeExports.jsx(XpodSolidRuntimeProvider,{children:jsxRuntimeExports.jsx(BrowserRouter,{basename:"/dashboard",children:jsxRuntimeExports.jsx(DashboardRoutes,{})})})}clientExports.createRoot(document.getElementById("root")).render(jsxRuntimeExports.jsx(reactExports.StrictMode,{children:jsxRuntimeExports.jsx(DashboardApp,{})}));export{Activity as A,Button as B,Gauge as G,Link as L,NavLink as N,Outlet as O,React as R,ScrollText as S,cn as a,cva as b,createLucideIcon as c,useLocation as d,clsx as e,Network as f,requireReactDom as g,useComposedRefs as h,createSlot as i,jsxRuntimeExports as j,getDefaultExportFromCjs as k,reactExports as r,useXpodSolidRuntime as u};
@@ -1 +1 @@
1
- import{c as e}from"./dashboard-8C6o666W.js";const a=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],s=e("database",a);export{s as D};
1
+ import{c as e}from"./dashboard-CSrqAv2L.js";const a=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],s=e("database",a);export{s as D};
@@ -1 +1 @@
1
- import{c as a}from"./dashboard-8C6o666W.js";const e=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],n=a("external-link",e);export{n as E};
1
+ import{c as a}from"./dashboard-CSrqAv2L.js";const e=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],n=a("external-link",e);export{n as E};