@undefineds.co/xpod 0.4.3 → 0.4.5

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 (223) hide show
  1. package/config/cloud.json +1 -1
  2. package/config/main.json +36 -2
  3. package/dist/api/ai-gateway/auth/GatewayApiKeyAuthenticator.d.ts +3 -0
  4. package/dist/api/ai-gateway/auth/GatewayApiKeyAuthenticator.js +1 -1
  5. package/dist/api/ai-gateway/auth/PodGatewayAccessKeyRepository.d.ts +2 -1
  6. package/dist/api/ai-gateway/auth/PodGatewayAccessKeyRepository.js +101 -32
  7. package/dist/api/ai-gateway/connect/DeviceCodeProtocol.d.ts +80 -0
  8. package/dist/api/ai-gateway/connect/DeviceCodeProtocol.js +3 -0
  9. package/dist/api/ai-gateway/connect/FileSessionImportAdapter.d.ts +38 -0
  10. package/dist/api/ai-gateway/connect/FileSessionImportAdapter.js +63 -0
  11. package/dist/api/ai-gateway/connect/LoopbackAuthorizationCallbackReceiver.d.ts +24 -0
  12. package/dist/api/ai-gateway/connect/LoopbackAuthorizationCallbackReceiver.js +136 -0
  13. package/dist/api/ai-gateway/connect/OAuthConnectAdapter.d.ts +2 -0
  14. package/dist/api/ai-gateway/connect/OAuthConnectAdapter.js +2 -1
  15. package/dist/api/ai-gateway/connect/OAuthIntegrationRegistry.d.ts +17 -13
  16. package/dist/api/ai-gateway/connect/OAuthIntegrationRegistry.js +52 -19
  17. package/dist/api/ai-gateway/connect/OpenAiSubscriptionSessionImportAdapter.d.ts +4 -28
  18. package/dist/api/ai-gateway/connect/OpenAiSubscriptionSessionImportAdapter.js +7 -58
  19. package/dist/api/ai-gateway/connect/ProviderAuthorizationProfiles.d.ts +4 -0
  20. package/dist/api/ai-gateway/connect/ProviderAuthorizationProfiles.js +116 -0
  21. package/dist/api/ai-gateway/connect/SessionImportProfiles.d.ts +10 -0
  22. package/dist/api/ai-gateway/connect/SessionImportProfiles.js +112 -0
  23. package/dist/api/ai-gateway/connect/index.d.ts +125 -23
  24. package/dist/api/ai-gateway/connect/index.js +1277 -260
  25. package/dist/api/ai-gateway/models/PodModelSelectionRepository.d.ts +4 -1
  26. package/dist/api/ai-gateway/models/PodModelSelectionRepository.js +154 -19
  27. package/dist/api/ai-gateway/providers/DeepSeekRuntimeAdapter.js +10 -6
  28. package/dist/api/ai-gateway/providers/ModelsDevCatalog.d.ts +7 -0
  29. package/dist/api/ai-gateway/providers/ModelsDevCatalog.js +25 -1
  30. package/dist/api/ai-gateway/providers/OfferingAuthorization.d.ts +24 -0
  31. package/dist/api/ai-gateway/providers/OfferingAuthorization.js +37 -0
  32. package/dist/api/ai-gateway/providers/OpenAiRuntimeAdapter.d.ts +1 -1
  33. package/dist/api/ai-gateway/providers/OpenAiRuntimeAdapter.js +5 -3
  34. package/dist/api/ai-gateway/providers/ProviderRegistry.d.ts +6 -3
  35. package/dist/api/ai-gateway/providers/ProviderRegistry.js +55 -16
  36. package/dist/api/ai-gateway/providers/ProviderRuntimeAdapter.d.ts +2 -0
  37. package/dist/api/ai-gateway/providers/ProviderRuntimeAdapter.js +37 -4
  38. package/dist/api/ai-gateway/providers/ProviderRuntimeRegistry.js +7 -0
  39. package/dist/api/ai-gateway/quota/SubscriptionQuotaAdapters.js +2 -1
  40. package/dist/api/ai-gateway/routing/ModelRouter.js +3 -1
  41. package/dist/api/container/common.js +30 -40
  42. package/dist/api/container/index.js +6 -2
  43. package/dist/api/container/routes.js +5 -22
  44. package/dist/api/handlers/AiClientConfigurationHandler.js +39 -1
  45. package/dist/api/handlers/AiGatewayManagementHandler.d.ts +3 -0
  46. package/dist/api/handlers/AiGatewayManagementHandler.js +173 -58
  47. package/dist/api/service/AiClientConfigurationService.d.ts +4 -15
  48. package/dist/api/service/AiClientConfigurationService.js +17 -64
  49. package/dist/cli/commands/start.js +2 -0
  50. package/dist/components/components.jsonld +1 -0
  51. package/dist/components/context.jsonld +80 -0
  52. package/dist/http/InternalPodDataHttpHandler.d.ts +3 -0
  53. package/dist/http/InternalPodDataHttpHandler.js +13 -2
  54. package/dist/http/InternalPodDataHttpHandler.jsonld +12 -0
  55. package/dist/identity/oidc/RememberedClientPromptFactory.d.ts +1 -1
  56. package/dist/identity/oidc/RememberedClientPromptFactory.js +5 -2
  57. package/dist/identity/oidc/RememberedConsentHandler.js +1 -1
  58. package/dist/identity/oidc/ScopedPickWebIdHandler.d.ts +1 -0
  59. package/dist/identity/oidc/ScopedPickWebIdHandler.js +26 -0
  60. package/dist/identity/oidc/ScopedPickWebIdHandler.jsonld +4 -0
  61. package/dist/identity/oidc/SessionBoundIdentityProviderFactory.d.ts +10 -0
  62. package/dist/identity/oidc/SessionBoundIdentityProviderFactory.js +21 -0
  63. package/dist/identity/oidc/SessionBoundIdentityProviderFactory.jsonld +172 -0
  64. package/dist/index.d.ts +2 -1
  65. package/dist/index.js +4 -2
  66. package/dist/runtime/component-parameter-keys.js +18 -2
  67. package/dist/storage/accessors/MixDataAccessor.js +6 -2
  68. package/dist/storage/rdf/PostgresRdfEngine.js +10 -2
  69. package/dist/storage/rdf/RdfContentTypes.js +4 -0
  70. package/node_modules/@undefineds.co/ai-connections/dist/AiClientConfigurationSection.d.ts +3 -0
  71. package/node_modules/@undefineds.co/ai-connections/dist/AiClientConfigurationSection.js +13 -16
  72. package/node_modules/@undefineds.co/ai-connections/dist/AiConnectionsList.js +1 -3
  73. package/node_modules/@undefineds.co/ai-connections/dist/AiConnectionsMain.d.ts +2 -1
  74. package/node_modules/@undefineds.co/ai-connections/dist/AiConnectionsMain.js +2 -2
  75. package/node_modules/@undefineds.co/ai-connections/dist/AiConnectionsPanel.d.ts +4 -1
  76. package/node_modules/@undefineds.co/ai-connections/dist/AiConnectionsPanel.js +127 -57
  77. package/node_modules/@undefineds.co/ai-connections/dist/AiCredentialPoolSection.d.ts +6 -4
  78. package/node_modules/@undefineds.co/ai-connections/dist/AiCredentialPoolSection.js +436 -83
  79. package/node_modules/@undefineds.co/ai-connections/dist/AiGatewayKeysSection.d.ts +3 -2
  80. package/node_modules/@undefineds.co/ai-connections/dist/AiGatewayKeysSection.js +212 -76
  81. package/node_modules/@undefineds.co/ai-connections/dist/AiProviderCard.d.ts +6 -4
  82. package/node_modules/@undefineds.co/ai-connections/dist/AiProviderCard.js +58 -41
  83. package/node_modules/@undefineds.co/ai-connections/dist/AiQuotaCard.d.ts +4 -1
  84. package/node_modules/@undefineds.co/ai-connections/dist/AiQuotaCard.js +63 -4
  85. package/node_modules/@undefineds.co/ai-connections/dist/ai-connections-client.d.ts +46 -6
  86. package/node_modules/@undefineds.co/ai-connections/dist/ai-connections-client.js +143 -14
  87. package/node_modules/@undefineds.co/ai-connections/dist/client-config/base-adapter.d.ts +19 -3
  88. package/node_modules/@undefineds.co/ai-connections/dist/client-config/base-adapter.js +45 -7
  89. package/node_modules/@undefineds.co/ai-connections/dist/client-config/codex.d.ts +7 -1
  90. package/node_modules/@undefineds.co/ai-connections/dist/client-config/codex.js +305 -40
  91. package/node_modules/@undefineds.co/ai-connections/dist/client-config/index.cjs +383 -50
  92. package/node_modules/@undefineds.co/ai-connections/dist/client-config/json-env-adapter.js +3 -2
  93. package/node_modules/@undefineds.co/ai-connections/dist/client-config/pi.js +12 -3
  94. package/node_modules/@undefineds.co/ai-connections/dist/client-config/transaction.d.ts +2 -0
  95. package/node_modules/@undefineds.co/ai-connections/dist/client-config/transaction.js +39 -4
  96. package/node_modules/@undefineds.co/ai-connections/dist/client-config/types.d.ts +8 -1
  97. package/node_modules/@undefineds.co/ai-connections/dist/client-visuals.d.ts +2 -0
  98. package/node_modules/@undefineds.co/ai-connections/dist/client-visuals.js +14 -0
  99. package/node_modules/@undefineds.co/ai-connections/dist/controller.d.ts +2 -2
  100. package/node_modules/@undefineds.co/ai-connections/dist/controller.js +216 -57
  101. package/node_modules/@undefineds.co/ai-connections/dist/index.d.ts +3 -1
  102. package/node_modules/@undefineds.co/ai-connections/dist/index.js +16 -2
  103. package/node_modules/@undefineds.co/ai-connections/dist/provider-visuals.js +6 -1
  104. package/node_modules/@undefineds.co/drizzle-solid/dist/core/execution/ldp-executor.js +27 -6
  105. package/node_modules/@undefineds.co/drizzle-solid/dist/core/pod-database.js +1 -1
  106. package/node_modules/@undefineds.co/drizzle-solid/dist/core/query-builders/select-query-builder.js +2 -2
  107. package/node_modules/@undefineds.co/drizzle-solid/dist/core/sparql/builder/update-builder.js +12 -1
  108. package/node_modules/@undefineds.co/drizzle-solid/dist/core/triple/builder.js +1 -1
  109. package/node_modules/@undefineds.co/drizzle-solid/dist/core/triple/handlers/array.js +8 -0
  110. package/node_modules/@undefineds.co/drizzle-solid/dist/core/triple/handlers/default.js +9 -1
  111. package/node_modules/@undefineds.co/drizzle-solid/dist/core/triple/handlers/inline.js +3 -3
  112. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/execution/ldp-executor.js +27 -6
  113. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/pod-database.js +1 -1
  114. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/query-builders/select-query-builder.js +2 -2
  115. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/sparql/builder/update-builder.js +12 -1
  116. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/triple/builder.js +1 -1
  117. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/triple/handlers/array.js +8 -0
  118. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/triple/handlers/default.js +9 -1
  119. package/node_modules/@undefineds.co/drizzle-solid/dist/esm/core/triple/handlers/inline.js +3 -3
  120. package/node_modules/@undefineds.co/extension-sdk/dist/web.d.ts +31 -0
  121. package/package.json +2 -2
  122. package/static/app/assets/{index-BikOyGPu.js → index-BCZVzMpj.js} +44 -44
  123. package/static/app/assets/inrupt-smoke.js +2 -2
  124. package/static/app/assets/main.css +1 -1
  125. package/static/app/assets/main.js +10 -10
  126. package/static/auth-callback/assets/{AiConfigContext-DrCH6ckh.js → AiConfigContext-DVkh8Kg2.js} +1 -1
  127. package/static/auth-callback/assets/{AiConfigPage-DVrlSSdA.js → AiConfigPage-HWVWpe-P.js} +1 -1
  128. package/static/auth-callback/assets/{DocumentProcessingPanel-_Md-v2R2.js → DocumentProcessingPanel-DDq-mH17.js} +1 -1
  129. package/static/auth-callback/assets/{IndexLifecyclePanel-BbWwe23H.js → IndexLifecyclePanel-Cx4cjrdP.js} +1 -1
  130. package/static/auth-callback/assets/{IndexSubjectPanel-upH9MjU-.js → IndexSubjectPanel-DzSw8M9j.js} +1 -1
  131. package/static/auth-callback/assets/{ModelAssignmentsPanel-CVGH4t4g.js → ModelAssignmentsPanel-BsRxGc2p.js} +1 -1
  132. package/static/auth-callback/assets/ModelsPage-DEe1lo6Q.js +10 -0
  133. package/static/auth-callback/assets/{NetworkPage-Dcbrb1fd.js → NetworkPage-DBiEh1Oz.js} +1 -1
  134. package/static/auth-callback/assets/{PaneListHeader-DrY-1wBq.js → PaneListHeader-lEEgjyN9.js} +1 -1
  135. package/static/auth-callback/assets/{SearchIndexingPanel-Dw25y53v.js → SearchIndexingPanel-CZCUUGt6.js} +1 -1
  136. package/static/auth-callback/assets/{StatusSubjectPanel-BHlz9rNF.js → StatusSubjectPanel-21qdueMr.js} +1 -1
  137. package/static/auth-callback/assets/{StatusWorkspace-BH7exQP5.js → StatusWorkspace-R8RKsqVz.js} +1 -1
  138. package/static/auth-callback/assets/{SystemSettingsPage-BYLKnM9f.js → SystemSettingsPage-BQ4e-4Wy.js} +1 -1
  139. package/static/auth-callback/assets/{SystemSettingsSubjectPanel-DT34LKku.js → SystemSettingsSubjectPanel-BopXD7SE.js} +1 -1
  140. package/static/auth-callback/assets/{activity-DdULRcSI.js → activity-DSfmTGfY.js} +1 -1
  141. package/static/auth-callback/assets/ai-connections-C03UWyPh.js +1 -0
  142. package/static/auth-callback/assets/{auth-callback-D7l2P25I.js → auth-callback-DleaitAS.js} +91 -91
  143. package/static/auth-callback/assets/auth-callback-vPSC2d2F.css +1 -0
  144. package/static/auth-callback/assets/{badge-j4zjFnmg.js → badge-B0aLu1sl.js} +1 -1
  145. package/static/auth-callback/assets/{download-DGXoks01.js → download-D_bFwdYJ.js} +1 -1
  146. package/static/auth-callback/assets/{external-link-CvbgXXaI.js → external-link-DRfjTaQu.js} +1 -1
  147. package/static/auth-callback/assets/{index-LRWvKJ2i.js → index-CG23cLYQ.js} +1 -1
  148. package/static/auth-callback/assets/{index-BOK3j1dz.js → index-CyV9ejwx.js} +1 -1
  149. package/static/auth-callback/assets/{index-browser-C1Qpe0g4.js → index-browser-D70paxIg.js} +1 -1
  150. package/static/auth-callback/assets/{key-round-CmgS5UdQ.js → key-round-BjV_mVYH.js} +1 -1
  151. package/static/auth-callback/assets/{rotate-ccw-c4CSG6Rq.js → rotate-ccw-CKoOAfse.js} +1 -1
  152. package/static/auth-callback/assets/{skeleton-ZPMTiRSM.js → skeleton-BZNjZaHx.js} +1 -1
  153. package/static/auth-callback/assets/{waypoints-xjyBflU5.js → waypoints-DoaJVzZv.js} +1 -1
  154. package/static/auth-callback/assets/{workspace-layout-B9nj6F5J.js → workspace-layout-CaP46_ZR.js} +1 -1
  155. package/static/auth-callback/auth-callback.html +2 -2
  156. package/static/dashboard/assets/{AiConfigContext-BWOOSYNr.js → AiConfigContext-BSrR27yD.js} +1 -1
  157. package/static/dashboard/assets/{AiConfigPage-CG2kQ9Wy.js → AiConfigPage-D65Z2LET.js} +1 -1
  158. package/static/dashboard/assets/{DocumentProcessingPanel-B4VXajfj.js → DocumentProcessingPanel-DyTe7Nei.js} +1 -1
  159. package/static/dashboard/assets/{IndexLifecyclePanel-CWCy0CC8.js → IndexLifecyclePanel-fK8ZGlrL.js} +1 -1
  160. package/static/dashboard/assets/{IndexSubjectPanel-CSgyQnG_.js → IndexSubjectPanel-CZPGor7v.js} +1 -1
  161. package/static/dashboard/assets/{ModelAssignmentsPanel-CdGIGidT.js → ModelAssignmentsPanel-CfYn5LMQ.js} +1 -1
  162. package/static/dashboard/assets/ModelsPage-djlJsghe.js +25 -0
  163. package/static/dashboard/assets/{NetworkPage-COia9NCH.js → NetworkPage-Coj6GnPl.js} +1 -1
  164. package/static/dashboard/assets/{PaneListHeader-SZWyr602.js → PaneListHeader-CUuFNSsZ.js} +1 -1
  165. package/static/dashboard/assets/{SearchIndexingPanel-D6PZtG6k.js → SearchIndexingPanel-CyJLioXS.js} +1 -1
  166. package/static/dashboard/assets/{StatusSubjectPanel-CxRD4kv0.js → StatusSubjectPanel-Cv26GSVC.js} +1 -1
  167. package/static/dashboard/assets/{StatusWorkspace-D3PfmY9-.js → StatusWorkspace-CDjFrsmB.js} +1 -1
  168. package/static/dashboard/assets/{SystemSettingsPage-COg1MmMj.js → SystemSettingsPage-BuNOyNoa.js} +1 -1
  169. package/static/dashboard/assets/{SystemSettingsSubjectPanel-BSVVB9Ol.js → SystemSettingsSubjectPanel-B2dasdez.js} +1 -1
  170. package/static/dashboard/assets/{activity-BJJx5cN-.js → activity-D1d2j_4Z.js} +1 -1
  171. package/static/dashboard/assets/ai-connections-C03UWyPh.js +1 -0
  172. package/static/dashboard/assets/{badge-elmrFSCj.js → badge-BeAAv6sp.js} +1 -1
  173. package/static/dashboard/assets/{dashboard-IvQrNmru.js → dashboard-BnGrUGv8.js} +68 -68
  174. package/static/dashboard/assets/dashboard-vPSC2d2F.css +1 -0
  175. package/static/dashboard/assets/{download-C3FH2KzG.js → download-DfFGiZRn.js} +1 -1
  176. package/static/dashboard/assets/{external-link-Bx7F0uKb.js → external-link-IsjU_LC9.js} +1 -1
  177. package/static/dashboard/assets/{index-liRoRIP1.js → index-BWQTucPe.js} +1 -1
  178. package/static/dashboard/assets/{index-M4-kWiGz.js → index-Dj75OjnW.js} +1 -1
  179. package/static/dashboard/assets/{key-round-CXg0bKAj.js → key-round-BJ_9wmQ_.js} +1 -1
  180. package/static/dashboard/assets/{rotate-ccw-yxJKOBrX.js → rotate-ccw-D3JGiFbR.js} +1 -1
  181. package/static/dashboard/assets/{skeleton-x9jNGrQT.js → skeleton-CC4nc-z-.js} +1 -1
  182. package/static/dashboard/assets/{waypoints-CTKeRsGp.js → waypoints-h7sqFqiG.js} +1 -1
  183. package/static/dashboard/assets/{workspace-layout--YkgkS38.js → workspace-layout-ZAPTOHhs.js} +1 -1
  184. package/static/dashboard/dashboard.html +2 -2
  185. package/static/settings/assets/{AiConfigContext-CelxXFcQ.js → AiConfigContext-lGkWpvKP.js} +1 -1
  186. package/static/settings/assets/{AiConfigPage-BaP-EovM.js → AiConfigPage-BbZWIBZq.js} +1 -1
  187. package/static/settings/assets/{DocumentProcessingPanel-DzLZluFv.js → DocumentProcessingPanel-DvYdjT-V.js} +1 -1
  188. package/static/settings/assets/{IndexLifecyclePanel-Bzj1-_oI.js → IndexLifecyclePanel-W5OGQZj7.js} +1 -1
  189. package/static/settings/assets/{IndexSubjectPanel-B263QLUh.js → IndexSubjectPanel-g_Aa5soq.js} +1 -1
  190. package/static/settings/assets/{ModelAssignmentsPanel-BAdT4UR0.js → ModelAssignmentsPanel-COlMBKXj.js} +1 -1
  191. package/static/settings/assets/ModelsPage-mApKi-aw.js +10 -0
  192. package/static/settings/assets/{NetworkPage-BK6a7l4g.js → NetworkPage-BDT05JUq.js} +1 -1
  193. package/static/settings/assets/{PaneListHeader-BAS2ICPq.js → PaneListHeader-CByhNpMG.js} +1 -1
  194. package/static/settings/assets/{SearchIndexingPanel-Cb_p-NgW.js → SearchIndexingPanel-BFAyzXls.js} +1 -1
  195. package/static/settings/assets/{StatusSubjectPanel-CcjqUua6.js → StatusSubjectPanel-Bz_XZ3VU.js} +1 -1
  196. package/static/settings/assets/{StatusWorkspace-7Ibty3_k.js → StatusWorkspace-CeVypHcW.js} +1 -1
  197. package/static/settings/assets/{SystemSettingsPage-DPSz4dg4.js → SystemSettingsPage-Dh7cQIfx.js} +1 -1
  198. package/static/settings/assets/{SystemSettingsSubjectPanel-Cb4HkKT5.js → SystemSettingsSubjectPanel-CSnpciO0.js} +1 -1
  199. package/static/settings/assets/{activity-Qhsr5Pxu.js → activity-DXz3EfFN.js} +1 -1
  200. package/static/settings/assets/ai-connections-C03UWyPh.js +1 -0
  201. package/static/settings/assets/{badge-B1vf2qCl.js → badge-1ZA144i4.js} +1 -1
  202. package/static/settings/assets/{download-CYNt0aZ-.js → download-CUHimlYa.js} +1 -1
  203. package/static/settings/assets/{external-link-ClKb39NT.js → external-link-BYHSVj2Z.js} +1 -1
  204. package/static/settings/assets/{index-y8ew3MLM.js → index-DKPDMdW5.js} +1 -1
  205. package/static/settings/assets/{index-browser-DJhvgpNI.js → index-browser-BaEFz0e0.js} +1 -1
  206. package/static/settings/assets/{index-BgiIDSch.js → index-viSgSvbO.js} +1 -1
  207. package/static/settings/assets/{key-round-5d-DrJz-.js → key-round-COByPOg8.js} +1 -1
  208. package/static/settings/assets/{rotate-ccw-CHZY7kS5.js → rotate-ccw-BC2EN6cE.js} +1 -1
  209. package/static/settings/assets/{settings-D5VRWyx6.js → settings-DLH9XUoT.js} +86 -86
  210. package/static/settings/assets/settings-vPSC2d2F.css +1 -0
  211. package/static/settings/assets/{skeleton-FNabNxNE.js → skeleton-B0-FOhKL.js} +1 -1
  212. package/static/settings/assets/{waypoints-BnL_8ljo.js → waypoints-DGMsvqWo.js} +1 -1
  213. package/static/settings/assets/{workspace-layout-D5q3F59S.js → workspace-layout-B0SVrJIu.js} +1 -1
  214. package/static/settings/settings.html +2 -2
  215. package/static/auth-callback/assets/ModelsPage-BpkVFKbf.js +0 -10
  216. package/static/auth-callback/assets/ai-connections-Bm52UO7Y.js +0 -1
  217. package/static/auth-callback/assets/auth-callback-01yz-UDU.css +0 -1
  218. package/static/dashboard/assets/ModelsPage-Chd5UK0D.js +0 -25
  219. package/static/dashboard/assets/ai-connections-Bm52UO7Y.js +0 -1
  220. package/static/dashboard/assets/dashboard-01yz-UDU.css +0 -1
  221. package/static/settings/assets/ModelsPage-C0NFa1zq.js +0 -10
  222. package/static/settings/assets/ai-connections-Bm52UO7Y.js +0 -1
  223. package/static/settings/assets/settings-01yz-UDU.css +0 -1
@@ -1,25 +0,0 @@
1
- import{j as m,r as te,P as yi,o as Is,q as go,x as md,z as pp,X as yp,f as Je,i as bp,E as gp,F as wd,H as Rs,I as Cs,J as _d,K as Ad,M as ot,Q as Jr,T as zl,U as Ms,V as yt,W as mo,Y as Ae,Z as ti,_ as Vr,$ as os,a0 as io,a1 as fn,a2 as nr,a3 as mp,a4 as wp,a5 as Ct,a6 as dr,a7 as vd,a8 as _p,a9 as Ps,aa as Yt,ab as Br,ac as wo,ad as Sd,ae as Ed,af as xd,B as Me,ag as Ap,ah as vp,ai as ft,aj as rr,t as Rt,ak as Sp,al as Id,am as lr,an as xt,ao as Xt,ap as It,aq as Rd,ar as Pe,as as ke,at as wt,au as Ep,av as xp,u as Ip}from"./dashboard-IvQrNmru.js";import{A as Cd,a as Rp,n as Md,b as Cp,d as Mp}from"./ai-connections-Bm52UO7Y.js";import{W as Pp,T as Tp}from"./workspace-layout--YkgkS38.js";import{a as _o,P as Op,c as Qt,h as kp,g as Dp,R as Np,d as jp,F as Fp,D as Pd,e as Td,u as ro,C as Lp,i as Up,b as Od,f as Bp,A as qp}from"./index-liRoRIP1.js";import{B as Jn}from"./badge-elmrFSCj.js";import{QueryEngine as Kp}from"@comunica/query-sparql-solid";var Wp=Object.defineProperty,Ut=(e,t)=>Wp(e,"name",{value:t,configurable:!0}),Ts="Dialog",[kd,PA]=md(Ts),[zp,$t]=kd(Ts),Hp=Ut(e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:i,onOpenChange:o,modal:a=!0}=e,s=te.useRef(null),u=te.useRef(null),[c,h]=Td({prop:n,defaultProp:i??!1,onChange:o,caller:Ts}),[g,A]=te.useState(0),[I,k]=te.useState(0);return m.jsx(zp,{scope:t,triggerRef:s,contentRef:u,contentId:ro(),titleId:ro(),descriptionId:ro(),titlePresent:g>0,descriptionPresent:I>0,setTitleCount:A,setDescriptionCount:k,open:c,onOpenChange:h,onOpenToggle:te.useCallback(()=>h(S=>!S),[h]),modal:a,children:r})},"Dialog"),Dd="DialogPortal",[Vp,Nd]=kd(Dd,{forceMount:void 0}),Qp=Ut(e=>{const{__scopeDialog:t,forceMount:r,children:n,container:i}=e,o=$t(Dd,t);return m.jsx(Vp,{scope:t,forceMount:r,children:te.Children.map(n,a=>m.jsx(_o,{present:r||o.open,children:m.jsx(Op,{asChild:!0,container:i,children:a})}))})},"DialogPortal"),as="DialogOverlay",jd=te.forwardRef(Ut(function(t,r){const n=Nd(as,t.__scopeDialog),{forceMount:i=n.forceMount,...o}=t,a=$t(as,t.__scopeDialog);return a.modal?m.jsx(_o,{present:i||a.open,children:m.jsx(Gp,{...o,ref:r})}):null},"DialogOverlay")),Jp=pp("DialogOverlay.RemoveScroll"),Gp=te.forwardRef(Ut(function(t,r){const{__scopeDialog:n,...i}=t,o=$t(as,n),a=Dp(),s=go(r,a);return m.jsx(Np,{as:Jp,allowPinchZoom:!0,shards:[o.contentRef],children:m.jsx(yi.div,{"data-state":Os(o.open),...i,ref:s,style:{pointerEvents:"auto",...i.style}})})},"DialogOverlayImpl")),ai="DialogContent",Fd=te.forwardRef(Ut(function(t,r){const n=Nd(ai,t.__scopeDialog),{forceMount:i=n.forceMount,...o}=t,a=$t(ai,t.__scopeDialog);return m.jsx(_o,{present:i||a.open,children:a.modal?m.jsx(Yp,{...o,ref:r}):m.jsx(Xp,{...o,ref:r})})},"DialogContent")),Yp=te.forwardRef(Ut(function(t,r){const n=$t(ai,t.__scopeDialog),i=te.useRef(null),o=go(r,n.contentRef,i);return te.useEffect(()=>{const a=i.current;if(a)return kp(a)},[]),m.jsx(Ld,{...t,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:Qt(t.onCloseAutoFocus,a=>{a.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Qt(t.onPointerDownOutside,a=>{const s=a.detail.originalEvent,u=s.button===0&&s.ctrlKey===!0;(s.button===2||u)&&a.preventDefault()}),onFocusOutside:Qt(t.onFocusOutside,a=>a.preventDefault())})},"DialogContentModal")),Xp=te.forwardRef(Ut(function(t,r){const n=$t(ai,t.__scopeDialog),i=te.useRef(!1),o=te.useRef(!1);return m.jsx(Ld,{...t,ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{t.onCloseAutoFocus?.(a),a.defaultPrevented||(i.current||n.triggerRef.current?.focus(),a.preventDefault()),i.current=!1,o.current=!1},onInteractOutside:a=>{t.onInteractOutside?.(a),a.defaultPrevented||(i.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=a.target;n.triggerRef.current?.contains(s)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})},"DialogContentNonModal")),Ld=te.forwardRef(Ut(function(t,r){const{__scopeDialog:n,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:a,...s}=t,u=$t(ai,n);return jp(),m.jsx(m.Fragment,{children:m.jsx(Fp,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:o,onUnmountAutoFocus:a,children:m.jsx(Pd,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionPresent?u.descriptionId:void 0,"aria-labelledby":u.titlePresent?u.titleId:void 0,"data-state":Os(u.open),...s,ref:r,deferPointerDownOutside:!0,onDismiss:()=>u.onOpenChange(!1)})})})},"DialogContentImpl")),Zp="DialogTitle",Ud=te.forwardRef(Ut(function(t,r){const{__scopeDialog:n,...i}=t,o=$t(Zp,n),{setTitleCount:a}=o;return Is(()=>(a(s=>s+1),()=>a(s=>s-1)),[a]),m.jsx(yi.h2,{id:o.titleId,...i,ref:r})},"DialogTitle")),$p="DialogDescription",Bd=te.forwardRef(Ut(function(t,r){const{__scopeDialog:n,...i}=t,o=$t($p,n),{setDescriptionCount:a}=o;return Is(()=>(a(s=>s+1),()=>a(s=>s-1)),[a]),m.jsx(yi.p,{id:o.descriptionId,...i,ref:r})},"DialogDescription")),ey="DialogClose",ty=te.forwardRef(Ut(function(t,r){const{__scopeDialog:n,...i}=t,o=$t(ey,n);return m.jsx(yi.button,{type:"button",...i,ref:r,onClick:Qt(t.onClick,()=>o.onOpenChange(!1))})},"DialogClose"));function Os(e){return e?"open":"closed"}Ut(Os,"getState");const qd=Hp,ry=Qp,Kd=te.forwardRef(({className:e,...t},r)=>m.jsx(jd,{ref:r,className:Je("fixed inset-0 z-50 bg-black/40","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));Kd.displayName=jd.displayName;const ks=te.forwardRef(({className:e,children:t,variant:r="center",...n},i)=>m.jsxs(ry,{children:[m.jsx(Kd,{}),m.jsxs(Fd,{ref:i,className:Je(r==="sheet-left"?"fixed inset-y-0 left-0 z-50 flex h-dvh w-[min(88vw,320px)] flex-col border-r bg-background p-0 shadow-[16px_0_30px_rgba(15,23,42,0.08)] duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:slide-out-to-left-full data-[state=open]:slide-in-from-left-full rounded-none":r==="sheet-right"?"fixed inset-y-0 right-0 z-50 flex h-dvh w-full max-w-4xl flex-col border-l bg-background p-0 shadow-[-16px_0_30px_rgba(15,23,42,0.08)] duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-right-full rounded-none":"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] rounded-lg",e),...n,children:[t,m.jsxs(ty,{className:Je("absolute right-4 top-4 rounded-xl opacity-70 transition-all hover:opacity-100 hover:bg-muted/50 p-1 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",bp),children:[m.jsx(yp,{className:"h-4 w-4"}),m.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));ks.displayName=Fd.displayName;const Ds=({className:e,...t})=>m.jsx("div",{className:Je("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Ds.displayName="DialogHeader";const Ns=({className:e,...t})=>m.jsx("div",{className:Je("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Ns.displayName="DialogFooter";const js=te.forwardRef(({className:e,...t},r)=>m.jsx(Ud,{ref:r,className:Je("text-lg font-semibold leading-none tracking-tight",e),...t}));js.displayName=Ud.displayName;const ny=te.forwardRef(({className:e,...t},r)=>m.jsx(Bd,{ref:r,className:Je("text-sm text-muted-foreground",e),...t}));ny.displayName=Bd.displayName;var iy=Object.defineProperty,rt=(e,t)=>iy(e,"name",{value:t,configurable:!0}),[Fs,TA]=md("Tooltip",[Od]),Ls=Od(),oy="TooltipProvider",ay=700,ss="tooltip.open",[sy,Us]=Fs(oy),ly=rt(e=>{const{__scopeTooltip:t,delayDuration:r=ay,skipDelayDuration:n=300,disableHoverableContent:i=!1,children:o}=e,a=te.useRef(!0),s=te.useRef(!1),u=te.useRef(0);return te.useEffect(()=>{const c=u.current;return()=>window.clearTimeout(c)},[]),m.jsx(sy,{scope:t,isOpenDelayedRef:a,delayDuration:r,onOpen:te.useCallback(()=>{n<=0||(window.clearTimeout(u.current),a.current=!1)},[n]),onClose:te.useCallback(()=>{n<=0||(window.clearTimeout(u.current),u.current=window.setTimeout(()=>a.current=!0,n))},[n]),isPointerInTransitRef:s,onPointerInTransitChange:te.useCallback(c=>{s.current=c},[]),disableHoverableContent:i,children:o})},"TooltipProvider"),ls="Tooltip",[uy,Ao]=Fs(ls),cy=rt(e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:i,onOpenChange:o,disableHoverableContent:a,delayDuration:s}=e,u=Us(ls,e.__scopeTooltip),c=Ls(t),[h,g]=te.useState(null),[A,I]=te.useState(void 0),k=ro(),S=te.useRef(0),_=a??u.disableHoverableContent,R=s??u.delayDuration,E=te.useRef(!1),[v,V]=Td({prop:n,defaultProp:i??!1,onChange:rt(C=>{C?(u.onOpen(),document.dispatchEvent(new CustomEvent(ss))):u.onClose(),o?.(C)},"onChange"),caller:ls}),G=te.useMemo(()=>v?E.current?"delayed-open":"instant-open":"closed",[v]),ue=te.useCallback(()=>{window.clearTimeout(S.current),S.current=0,E.current=!1,V(!0)},[V]),ce=te.useCallback(()=>{window.clearTimeout(S.current),S.current=0,V(!1)},[V]),z=te.useCallback(()=>{window.clearTimeout(S.current),S.current=window.setTimeout(()=>{E.current=!0,V(!0),S.current=0},R)},[R,V]);te.useEffect(()=>()=>{S.current&&(window.clearTimeout(S.current),S.current=0)},[]);const se=A??k;return m.jsx(Bp,{...c,children:m.jsx(uy,{scope:t,contentId:se,setContentId:I,open:v,stateAttribute:G,trigger:h,onTriggerChange:g,onTriggerEnter:te.useCallback(()=>{u.isOpenDelayedRef.current?z():ue()},[u.isOpenDelayedRef,z,ue]),onTriggerLeave:te.useCallback(()=>{_?ce():(window.clearTimeout(S.current),S.current=0)},[ce,_]),onOpen:ue,onClose:ce,disableHoverableContent:_,children:r})})},"Tooltip"),Hl="TooltipTrigger",dy=te.forwardRef(rt(function(t,r){const{__scopeTooltip:n,...i}=t,o=Ao(Hl,n),a=Us(Hl,n),s=Ls(n),u=te.useRef(null),c=go(r,u,o.onTriggerChange),h=te.useRef(!1),g=te.useRef(!1),A=te.useCallback(()=>h.current=!1,[]);return te.useEffect(()=>()=>document.removeEventListener("pointerup",A),[A]),m.jsx(qp,{asChild:!0,...s,children:m.jsx(yi.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...i,ref:c,onPointerMove:Qt(t.onPointerMove,I=>{I.pointerType!=="touch"&&!g.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),g.current=!0)}),onPointerLeave:Qt(t.onPointerLeave,()=>{o.onTriggerLeave(),g.current=!1}),onPointerDown:Qt(t.onPointerDown,()=>{o.open&&o.onClose(),h.current=!0,document.addEventListener("pointerup",A,{once:!0})}),onFocus:Qt(t.onFocus,()=>{h.current||o.onOpen()}),onBlur:Qt(t.onBlur,o.onClose),onClick:Qt(t.onClick,o.onClose)})})},"TooltipTrigger")),fy="TooltipPortal",[OA,hy]=Fs(fy,{forceMount:void 0}),si="TooltipContent",py=te.forwardRef(rt(function(t,r){const n=hy(si,t.__scopeTooltip),{forceMount:i=n.forceMount,side:o="top",...a}=t,s=Ao(si,t.__scopeTooltip);return m.jsx(_o,{present:i||s.open,children:s.disableHoverableContent?m.jsx(Wd,{side:o,...a,ref:r}):m.jsx(yy,{side:o,...a,ref:r})})},"TooltipContent")),yy=te.forwardRef(rt(function(t,r){const n=Ao(si,t.__scopeTooltip),i=Us(si,t.__scopeTooltip),o=te.useRef(null),a=go(r,o),[s,u]=te.useState(null),{trigger:c,onClose:h}=n,g=o.current,{onPointerInTransitChange:A}=i,I=te.useCallback(()=>{u(null),A(!1)},[A]),k=te.useCallback((S,_)=>{const R=S.currentTarget,E={x:S.clientX,y:S.clientY},v=zd(E,R.getBoundingClientRect()),V=Hd(E,v),G=Vd(_.getBoundingClientRect()),ue=Jd([...V,...G]);u(ue),A(!0)},[A]);return te.useEffect(()=>()=>I(),[I]),te.useEffect(()=>{if(c&&g){const S=rt(R=>k(R,g),"handleTriggerLeave"),_=rt(R=>k(R,c),"handleContentLeave");return c.addEventListener("pointerleave",S),g.addEventListener("pointerleave",_),()=>{c.removeEventListener("pointerleave",S),g.removeEventListener("pointerleave",_)}}},[c,g,k,I]),te.useEffect(()=>{if(s){const S=rt(_=>{const R=_.target,E={x:_.clientX,y:_.clientY},v=c?.contains(R)||g?.contains(R),V=!Qd(E,s);v?I():V&&(I(),h())},"handleTrackPointerGrace");return document.addEventListener("pointermove",S),()=>document.removeEventListener("pointermove",S)}},[c,g,s,h,I]),m.jsx(Wd,{...t,ref:a})},"TooltipContentHoverable")),by=gp("TooltipContent"),Wd=te.forwardRef(rt(function(t,r){const{__scopeTooltip:n,children:i,"aria-label":o,id:a,onEscapeKeyDown:s,onPointerDownOutside:u,...c}=t,h=Ao(si,n),g=Ls(n),{onClose:A}=h;te.useEffect(()=>(document.addEventListener(ss,A),()=>document.removeEventListener(ss,A)),[A]),te.useEffect(()=>{if(h.trigger){const k=rt(S=>{S.target instanceof Node&&S.target.contains(h.trigger)&&A()},"handleScroll");return window.addEventListener("scroll",k,{capture:!0}),()=>window.removeEventListener("scroll",k,{capture:!0})}},[h.trigger,A]);const{setContentId:I}=h;return Is(()=>(I(a),()=>{I(void 0)}),[a,I]),m.jsx(Pd,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:u,onFocusOutside:k=>k.preventDefault(),onDismiss:A,children:m.jsxs(Lp,{"data-state":h.stateAttribute,role:o?void 0:"tooltip",id:o?void 0:h.contentId,...g,...c,ref:r,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[m.jsx(by,{children:i}),o?m.jsx(Up,{id:h.contentId,role:"tooltip",children:o}):null]})})},"TooltipContentImpl"));function zd(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(r,n,i,o)){case o:return"left";case i:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}rt(zd,"getExitSideFromRect");function Hd(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}rt(Hd,"getPaddedExitPoints");function Vd(e){const{top:t,right:r,bottom:n,left:i}=e;return[{x:i,y:t},{x:r,y:t},{x:r,y:n},{x:i,y:n}]}rt(Vd,"getPointsFromRect");function Qd(e,t){const{x:r,y:n}=e;let i=!1;for(let o=0,a=t.length-1;o<t.length;a=o++){const s=t[o],u=t[a],c=s.x,h=s.y,g=u.x,A=u.y;h>n!=A>n&&r<(g-c)*(n-h)/(A-h)+c&&(i=!i)}return i}rt(Qd,"isPointInPolygon");function Jd(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),Gd(t)}rt(Jd,"getHull");function Gd(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const i=e[n];for(;t.length>=2;){const o=t[t.length-1],a=t[t.length-2];if((o.x-a.x)*(i.y-a.y)>=(o.y-a.y)*(i.x-a.x))t.pop();else break}t.push(i)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const i=e[n];for(;r.length>=2;){const o=r[r.length-1],a=r[r.length-2];if((o.x-a.x)*(i.y-a.y)>=(o.y-a.y)*(i.x-a.x))r.pop();else break}r.push(i)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}rt(Gd,"getHullPresorted");var gy=ly,my=cy,wy=dy,Yd=py;const Xd=gy,vo=my,So=wy,bi=te.forwardRef(({className:e,sideOffset:t=4,...r},n)=>m.jsx(Yd,{ref:n,sideOffset:t,className:Je("z-50 overflow-hidden rounded-md border border-border/50 bg-popover","px-2 py-1 text-xs text-popover-foreground shadow-md","animate-in fade-in-0 zoom-in-95","data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95","data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2","data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r}));bi.displayName=Yd.displayName;function _y(e){const t=wd(e).type;return Array.isArray(t)&&t.includes(Rs.AccessControlResource)}async function Eo(e,t){if(!vi(e))return{resourceAcl:null,fallbackAcl:null};try{const r=await Zd(e,t);return r===null?{resourceAcl:null,fallbackAcl:await $d(e,t)}:{resourceAcl:r,fallbackAcl:null}}catch(r){if(r instanceof us)return{resourceAcl:null,fallbackAcl:null};throw r}}async function Zd(e,t){if(!vi(e))return null;try{const r=await _d(e.internal_resourceInfo.aclUrl,t);if(_y(r))throw new us(e,r);return Ad({...r,internal_accessTo:ot(e)})}catch(r){if(r instanceof us)throw r;return null}}async function $d(e,t){const r=new URL(ot(e)),n=r.pathname;if(n==="/")return null;const i=Ay(n),o=new URL(i,r.origin).href,a=await Jr(o,t);if(!vi(a))return null;const s=await Zd(a,t);return s===null?$d(a,t):s}function Ay(e){const t=e.substring(e.length-1)==="/"?e.substring(0,e.length-1):e;return`${e.substring(0,t.lastIndexOf("/"))}/`}function vr(e){return Ms(e).filter(vy)}function vy(e){return yt(e,mo.type).includes(Ae.Authorization)}function Bs(e,t){return e.filter(r=>Sy(r,t))}function Sy(e,t){return yt(e,Ae.accessTo).includes(t)}function xo(e,t){return e.filter(r=>Ey(r,t))}function Ey(e,t){return yt(e,Ae.default).includes(t)||yt(e,Ae.defaultForNew).includes(t)}function gi(e){const t=yt(e,Ae.mode);return t.includes(Ht.write)?{read:t.includes(Ht.read),append:!0,write:!0,control:t.includes(Ht.control)}:{read:t.includes(Ht.read),append:t.includes(Ht.append),write:!1,control:t.includes(Ht.control)}}function mi(e){return e.reduce((t,r)=>t.write||r.write?{read:t.read||r.read,append:!0,write:!0,control:t.control||r.control}:{read:t.read||r.read,append:t.append||r.append,write:!1,control:t.control||r.control},{read:!1,append:!1,write:!1,control:!1})}function xy(e){return vr(e).filter(Iy).reduce(mp,e)}function Iy(e){return wp(e.predicates,Ct.namedNode(e.url),Ct.defaultGraph()).some(t=>!Ry(t))?!1:dr(e,Ae.accessTo)===null&&dr(e,Ae.default)===null&&dr(e,Ae.defaultForNew)===null||dr(e,Ae.mode)===null||dr(e,Ae.agent)===null&&dr(e,Ae.agentGroup)===null&&dr(e,Ae.agentClass)===null}function Ry(e){const{predicate:t}=e,{object:r}=e;return!!(t.equals(Ct.namedNode(mo.type))&&r.equals(Ct.namedNode(Ae.Authorization))||t.equals(Ct.namedNode(Ae.accessTo))||t.equals(Ct.namedNode(Ae.default))||t.equals(Ct.namedNode(Ae.defaultForNew))||t.equals(Ct.namedNode(Ae.mode))&&Object.values(Ht).some(n=>r.equals(Ct.namedNode(n)))||t.equals(Ct.namedNode(Ae.agent))||t.equals(Ct.namedNode(Ae.agentGroup))||t.equals(Ct.namedNode(Ae.agentClass))||t.equals(Ct.namedNode(Ae.origin)))}const Ht={read:"http://www.w3.org/ns/auth/acl#Read",append:"http://www.w3.org/ns/auth/acl#Append",write:"http://www.w3.org/ns/auth/acl#Write",control:"http://www.w3.org/ns/auth/acl#Control"};function Cy(e,t,r){return e.filter(n=>yt(n,r).includes(t))}function My(e,t){const r={};return e.forEach(n=>{const i=yt(n,t),o=gi(n);i.forEach(a=>{r[a]=typeof r[a]>"u"?o:mi([r[a],o])})}),r}function ef(e){let t=fn();return t=Vr(t,mo.type,Ae.Authorization),e.read&&(t=nr(t,Ae.mode,Ht.read)),e.append&&!e.write&&(t=nr(t,Ae.mode,Ht.append)),e.write&&(t=nr(t,Ae.mode,Ht.write)),e.control&&(t=nr(t,Ae.mode,Ht.control)),t}function Py(e){let t=fn();t=Vr(t,mo.type,Ae.Authorization);function r(n,i,o){return yt(n,o).reduce((a,s)=>nr(a,o,s),i)}return t=r(e,t,Ae.accessTo),t=r(e,t,Ae.default),t=r(e,t,Ae.defaultForNew),t=r(e,t,Ae.agent),t=r(e,t,Ae.agentGroup),t=r(e,t,Ae.agentClass),t=r(e,t,Ae.origin),t=r(e,t,Ae.mode),t}function wi(e,t){return Object.assign(Cs(e),{internal_acl:t})}const Ty=[Ae.agent,Ae.agentClass,Ae.agentGroup,Ae.origin];function Oy(e,t,r,n,i){if(!yt(e,r).includes(t)){const s=ef({read:!1,append:!1,write:!1,control:!1});return[e,s]}const o=os(e,r,t);let a=Py(e);return a=os(a,Ae.accessTo,n),a=Vr(a,r,t),Ty.filter(s=>s!==r).forEach(s=>{a=io(a,s)}),[o,a]}function tf(e,t,r,n,i){let o=e;Ms(e).forEach(u=>{const[c,h]=Oy(u,i,r,e.internal_accessTo);o=ti(o,c),o=ti(o,h)});let a=ef(t);a=Vr(a,Ae.accessTo,e.internal_accessTo),a=Vr(a,r,i);const s=ti(o,a);return xy(s)}function rf(e,t){return wi(e,{resourceAcl:t,fallbackAcl:null})}function ky(e){return e.internal_acl.resourceAcl}class us extends Error{constructor(t,r){super(`[${zl(t)}] is governed by Access Control Policies in [${zl(r)}] rather than by Web Access Control.`)}}function _i(e){return e.internal_acl.resourceAcl!==null&&ot(e)===e.internal_acl.resourceAcl.internal_accessTo&&e.internal_resourceInfo.aclUrl===ot(e.internal_acl.resourceAcl)}function qs(e){return _i(e)?e.internal_acl.resourceAcl:null}function Ai(e){return e.internal_acl.fallbackAcl!==null}function Dy(e){return Ai(e)?e.internal_acl.fallbackAcl:null}function Ny(e){return Ad({..._p(),internal_accessTo:ot(e),internal_resourceInfo:{sourceIri:e.internal_resourceInfo.aclUrl,isRawData:!1,linkedResources:{}}})}function jy(e){const t=Ny(e),r=vr(e.internal_acl.fallbackAcl);return xo(r,e.internal_acl.fallbackAcl.internal_accessTo).map(a=>(a=io(a,Ae.default),a=io(a,Ae.defaultForNew),a=Vr(a,Ae.accessTo,ot(e)),a=Vr(a,Ae.default,ot(e)),a)).reduce(ti,t)}async function Fy(e,t,r){if(!vi(e))throw new Error(`Could not determine the location of the ACL for the Resource at [${ot(e)}]; possibly the current user does not have Control access to that Resource. Try calling \`hasAccessibleAcl()\` before calling \`saveAclFor()\`.`);return{...await vd(e.internal_resourceInfo.aclUrl,t,r),internal_accessTo:ot(e)}}function vi(e){return typeof e.internal_resourceInfo.aclUrl=="string"}function nf(e,t){return _i(e)?Uy(e.internal_acl.resourceAcl,t):Ai(e)?Ky(e.internal_acl.fallbackAcl,t):null}function Ly(e){if(_i(e)){const t=qs(e);return By(t)}if(Ai(e)){const t=Dy(e);return Wy(t)}return null}function Uy(e,t){const r=vr(e),n=Bs(r,e.internal_accessTo),o=of(n,t).map(gi);return mi(o)}function By(e){const t=vr(e),r=Bs(t,e.internal_accessTo),n=af(r);return sf(n)}function qy(e,t,r){return tf(e,r,Ae.agent,"resource",t)}function Ky(e,t){const r=vr(e),n=xo(r,e.internal_accessTo),o=of(n,t).map(gi);return mi(o)}function Wy(e){const t=vr(e),r=xo(t,e.internal_accessTo),n=af(r);return sf(n)}function of(e,t){return Cy(e,t,Ae.agent)}function af(e){return e.filter(zy)}function zy(e){return dr(e,Ae.agent)!==null}function sf(e){return My(e,Ae.agent)}function lf(e){return _i(e)?Hy(e.internal_acl.resourceAcl):Ai(e)?Vy(e.internal_acl.fallbackAcl):null}function Hy(e){const t=vr(e),r=Bs(t,e.internal_accessTo),i=uf(r,Ps.Agent).map(gi);return mi(i)}function Vy(e){const t=vr(e),r=xo(t,e.internal_accessTo),i=uf(r,Ps.Agent).map(gi);return mi(i)}function Qy(e,t){return tf(e,t,Ae.agentClass,"resource",Ps.Agent)}function uf(e,t){return e.filter(r=>Jy(r,t))}function Jy(e,t){return yt(e,Ae.agentClass).includes(t)}async function cf(e,t){if(typeof e.internal_resourceInfo.aclUrl!="string")return null;try{return await Jr(e.internal_resourceInfo.aclUrl,t)}catch{return null}}const jt="http://www.w3.org/ns/solid/acp#",Ve={AccessControlResource:jt.concat("AccessControlResource"),PublicAgent:jt.concat("PublicAgent"),access:jt.concat("access"),accessControl:jt.concat("accessControl"),agent:jt.concat("agent"),allOf:jt.concat("allOf"),allow:jt.concat("allow"),anyOf:jt.concat("anyOf"),apply:jt.concat("apply"),deny:jt.concat("deny"),memberAccessControl:jt.concat("memberAccessControl"),noneOf:jt.concat("noneOf")},Ho="http://www.w3.org/ns/auth/acl#",tn={Append:Ho.concat("Append"),Read:Ho.concat("Read"),Write:Ho.concat("Write")};async function df(e,t){const r=_t(e),n=await vd(ot(r),r,t);return Yy(e,n)}function Gy(e){return typeof e.internal_acp=="object"&&e.internal_acp!==null&&typeof e.internal_acp.acr=="object"&&e.internal_acp.acr!==null}function _t(e){if(!Gy(e))throw new Error(`An Access Control Resource for [${ot(e)}] is not available. This could be because the current user is not allowed to see it, or because their Pod Server does not support Access Control Resources.`);return e.internal_acp.acr}function Yy(e,t){return Object.assign(Cs(e),{internal_acp:{...e.internal_acp,acr:t}})}function ff(e){const t=_t(e),r=ot(t);return Yt(t,r)}function hf(e){const t=ff(e);return t===null?[]:yt(t,Ve.accessControl)}function pf(e,t,r){const n=_t(e);return Array.from(new Set(t.map(i=>{const o=Yt(n,i);return o!==null?yt(o,r):[]}).reduce((i,o)=>i.concat(o),[])))}function Xy(e){return pf(e,hf(e),Ve.apply)}function Zy(e){return pf(e,hf(e),Ve.access)}function yf(e,t){const r=yt(e,t);return{read:r.includes(tn.Read),append:r.includes(tn.Append),write:r.includes(tn.Write),controlRead:!1,controlWrite:!1}}function $y(e){return yf(e,Ve.allow)}function eb(e){return yf(e,Ve.deny)}function Vl(e,t,r){const n=Br(t,Ve.allOf).map(c=>Yt(_t(e),c)).filter(c=>c!==null),i=n.every(c=>Br(c,Ve.agent).includes(r)),o=Br(t,Ve.anyOf).map(c=>Yt(_t(e),c)).filter(c=>c!==null),a=o.some(c=>Br(c,Ve.agent).includes(r)),s=Br(t,Ve.noneOf).map(c=>Yt(_t(e),c)).filter(c=>c!==null),u=s.some(c=>Br(c,Ve.agent).includes(r));return n.length+o.length>0&&(n.length===0||i)&&(o.length===0||a)&&(s.length===0||!u)}function Ql(e,t,r){const n=$y(e),i=eb(e);return r==="control"?{read:t.read,append:t.append,write:t.write,controlRead:(t.controlRead||n.read)&&!i.read,controlWrite:(t.controlWrite||n.write)&&!i.write}:{read:(t.read||n.read)&&!i.read,append:(t.append||n.append)&&!i.append,write:(t.write||n.write)&&!i.write,controlRead:t.controlRead,controlWrite:t.controlWrite}}async function Io(e,t){let r={read:!1,append:!1,write:!1,controlRead:!1,controlWrite:!1};return Xy(e).map(o=>Yt(_t(e),o)).filter(o=>o!==null).forEach(o=>{Vl(e,o,t)&&(r=Ql(o,r,"resource"))}),Zy(e).map(o=>Yt(_t(e),o)).filter(o=>o!==null).forEach(o=>{Vl(e,o,t)&&(r=Ql(o,r,"control"))}),r}function bf(e,t){var r,n,i,o;if(e.controlRead!==e.controlWrite)throw new Error("For Pods using Web Access Control, controlRead and controlWrite must be equal.");return{read:(r=e.read)!==null&&r!==void 0?r:t.read,append:(n=e.append)!==null&&n!==void 0?n:t.append,write:(i=e.write)!==null&&i!==void 0?i:t.write,control:(o=e.controlRead)!==null&&o!==void 0?o:t.control}}function Ks(e){return{read:e.read,write:e.write,append:e.append,controlRead:e.control,controlWrite:e.control}}async function tb(e,t,r,n){const i=await Eo(e,n),o=r(wi(e,i),t);return o===null?null:Ks(o)}async function rb(e,t,r){const n=await Eo(e,r),i=t(wi(e,n));return i===null?null:Ks(i)}async function nb(e,t,r){const n=await Eo(e,r),i=t(wi(e,n));if(i===null)return null;const o={};for(const[a,s]of Object.entries(i))o[a]=Ks(s);return o}function gf(e,t,r){return tb(e,t,nf,r)}function mf(e,t){return rb(e,lf,t)}function ib(e,t){return nb(e,Ly,t)}async function wf(e,t){if(!vi(e))return null;const r=await Eo(e,t),n=wi(e,r);let i;if(_i(n))i=ky(n);else if(Ai(n))i=jy(n);else return null;return rf(n,i)}async function _f(e,t,r){let n=null;try{return n=await Fy(e,t,r),rf(e,n)}catch{return null}}async function ob(e,t,r,n,i){const o=await wf(e,i);if(o===null)return null;const a=qs(o),s=r(o),u=bf(t,s),c=n(a,u);return _f(o,c,i)}async function ab(e,t,r,n,i,o){const a=await wf(e,o);if(a===null)return null;const s=n(a,t),u=qs(a),c=bf(r,s),h=i(u,t,c);return _f(a,h,o)}async function sb(e,t,r,n){return ab(e,t,r,nf,qy,n)}async function lb(e,t,r){return ob(e,t,lf,Qy,r)}async function ub(e,t){const r=await cf(e,t);if(r===null)return null;const n=wd(r).type;return Array.isArray(n)&&n.includes(Ve.AccessControlResource)?ot(r):null}async function Si(e,t){const r=await ub(e,t);if(r===null)return null;let n;try{n=await _d(r,t)}catch{return null}return{...e,internal_acp:{acr:{...n,accessTo:ot(e)}}}}async function Af(e,t,r){const n=await Jr(e,r),i=await Si(n,r);return i===null?gf(n,t,r):Io(i,t)}function cb(e){return Array.from(new Set(Ms(_t(e)).map(t=>Br(t,Ve.agent)).reduce((t,r)=>t.concat(r),[])))}async function db(e){return(await Promise.all(cb(e).map(async t=>({[t]:await Io(e,t)})))).reduce((t,r)=>({...t,...r}),{})}async function fb(e,t){const r=await Jr(e,t),n=await Si(r,t);return n===null?ib(r,t):db(n)}async function hb(e){return Io(e,Ve.PublicAgent)}async function vf(e,t){const r=await Jr(e,t),n=await Si(r,t);return n===null?mf(r,t):hb(n)}function Ei(e,t){return Object.assign(Cs(e),{internal_acp:{...e.internal_acp,acr:ti(e.internal_acp.acr,t)}})}const ri="defaultAccessControl",oo="defaultAcrAccessControl";function Ws(e,t){const r=_t(e);return ot(r).concat("#").concat(t)}function zs(e,t,r){return Ws(e,t).concat("AgentMatcher").concat(r.charAt(0).toUpperCase()+r.slice(1)).concat("Policy")}function Sf(e,t){const r=_t(e),n=Ws(e,t),i=Yt(r,n);return i===null||typeof i>"u"?fn({url:n}):i}function Jl(e){return e.includes("Member")?Ve.memberAccessControl:Ve.accessControl}function Ef(e,t){const r=Ws(e,t),n=_t(e);let i=ff(e);return(i===null||typeof i>"u")&&(i=fn({url:ot(n)})),yt(i,Jl(t)).includes(r)?e:(i=wo(i).addUrl(Jl(t),r).build(),Ei(e,i))}function pb(e,t){const r=Ef(e,oo),n=Sf(r,oo);return Ei(r,wo(n).addUrl(Ve.access,t).build())}function yb(e,t){const r=Ef(e,ri),n=Sf(r,ri);return Ei(r,wo(n).addUrl(Ve.apply,t).build())}function bb(e,t,r){const n=zs(e,t,r);return n.includes("Acr")?pb(e,n):yb(e,n)}function xf(e,t,r){return zs(e,t,r).concat("Matcher")}function gb(e,t,r){let n=io(e,r);return(t.read||t.controlRead)&&(n=nr(n,r,tn.Read)),t.append&&(n=nr(n,r,tn.Append)),(t.write||t.controlWrite)&&(n=nr(n,r,tn.Write)),n}const Gl=Ve.anyOf;function mb(e,t,r){const n=zs(e,t,r),i=xf(e,t,r);let o=Yt(_t(e),n);return o||(e=bb(e,t,r),o=fn({url:n}),o=gb(o,{[r]:!0},Ve.allow)),yt(o,Gl).includes(i)?e:(o=wo(o).addUrl(Gl,i).build(),Ei(e,o))}function wb(e,t){return nr(e,Rs.agent,t)}function _b(e,t){return os(e,Rs.agent,t)}function Cn(e,t,r,n,i){var o;const a=xf(e,r,n),s=mb(e,r,n),u=(o=Yt(_t(s),a))!==null&&o!==void 0?o:fn({url:a});return Ei(s,i==="add"?wb(u,t):_b(u,t))}async function If(e,t,r){const n=await Io(e,t);return typeof r.read=="boolean"&&n.read!==r.read&&(e=Cn(e,t,ri,"read",r.read?"add":"remove")),typeof r.append=="boolean"&&n.append!==r.append&&(e=Cn(e,t,ri,"append",r.append?"add":"remove")),typeof r.write=="boolean"&&n.write!==r.write&&(e=Cn(e,t,ri,"write",r.write?"add":"remove")),typeof r.controlRead=="boolean"&&n.controlRead!==r.controlRead&&(e=Cn(e,t,oo,"controlRead",r.controlRead?"add":"remove")),typeof r.controlWrite=="boolean"&&n.controlWrite!==r.controlWrite&&(e=Cn(e,t,oo,"controlWrite",r.controlWrite?"add":"remove")),e}async function Ab(e,t,r,n){const i=await Jr(e,n),o=await Si(i,n);if(o===null)return await sb(i,t,r,n),gf(i,t,n);try{return await df(await If(o,t,r),n),await Af(e,t,n)}catch{return null}}async function vb(e,t){return If(e,Ve.PublicAgent,t)}async function Sb(e,t,r){const n=await Jr(e,r),i=await Si(n,r);if(i===null)return await lb(n,t,r),mf(n,r);try{return await df(await vb(i,t),r),await vf(e,r)}catch{return null}}const Eb=Object.freeze(Object.defineProperty({__proto__:null,getAclServerResourceInfo:cf,getAgentAccess:Af,getAgentAccessAll:fb,getPublicAccess:vf,setAgentAccess:Ab,setPublicAccess:Sb},Symbol.toStringTag,{value:"Module"}));function xb(e){if(!Rf(e))throw new Error("Applet layout descriptor must be an object");if(typeof e.type!="string")throw new Error("Applet layout descriptor type must be a string");switch(e.type){case"single-pane":case"two-pane":return Yl(e.context),e;case"three-pane":return Yl(e.context),e;default:throw new Error(`Unsupported applet layout type: ${e.type}`)}}function Rf(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Yl(e){if(e!==void 0){if(!Rf(e))throw new Error("Applet layout descriptor context must be an object");if("collapsible"in e&&typeof e.collapsible!="boolean")throw new Error("Applet layout descriptor context.collapsible must be a boolean");if("initiallyCollapsed"in e&&typeof e.initiallyCollapsed!="boolean")throw new Error("Applet layout descriptor context.initiallyCollapsed must be a boolean")}}function Ib(e){const t=e.access??Eb;return{inspectAgentAccess:r=>Rb(r,e.fetch,t),ensureAgentAccess:async r=>{try{for(const n of r.resources){await Cb(n.url,n.mediaType,e.fetch);const i=await t.setAgentAccess(n.url,r.service.webId,Pb(n.access),{fetch:e.fetch});if(!i||!Cf(i,n.access))return tr("permissionDenied",r,"Pod did not grant the requested service access.")}return tr("granted",r)}catch(n){return tr("permissionDenied",r,cs(n))}},revokeAgentAccess:async r=>{try{for(const n of r.resources)if(!await t.setAgentAccess(n.url,r.service.webId,{read:!1,append:!1,write:!1,controlRead:!1,controlWrite:!1},{fetch:e.fetch}))return tr("permissionDenied",r,"Pod did not revoke the service access.");return tr("missing",r)}catch(n){return tr("permissionDenied",r,cs(n))}}}}async function Rb(e,t,r){try{for(const n of e.resources){const i=await r.getAgentAccess(n.url,e.service.webId,{fetch:t});if(!i||!Cf(i,n.access))return tr("missing",e)}return tr("granted",e)}catch(n){return tr("permissionDenied",e,cs(n))}}async function Cb(e,t,r){const n=await r(e,{method:"HEAD"});if(n.ok)return;if(n.status!==404)throw new Error(`Unable to inspect Pod resource (${n.status}).`);await Mb(e,r);const i=await r(e,{method:"PUT",headers:{"content-type":t},body:`# Created by the Xpod applet permission broker.
2
- `});if(!i.ok)throw new Error(`Unable to create Pod resource (${i.status}).`)}async function Mb(e,t){const r=new URL(e),n=[];let i=new URL("./",r);for(;i.pathname!=="/";){const o=await t(i.href,{method:"HEAD"});if(o.ok)break;if(o.status!==404)throw new Error(`Unable to inspect Pod container (${o.status}).`);n.push(i.href),i=new URL("../",i)}for(const o of n.reverse()){const a=await t(o,{method:"PUT",headers:{"content-type":"text/turtle",link:'<http://www.w3.org/ns/ldp#BasicContainer>; rel="type"'},body:""});if(!a.ok&&a.status!==409)throw new Error(`Unable to create Pod container (${a.status}).`)}}function Pb(e){return{read:e.read===!0,append:e.append===!0,write:e.write===!0,controlRead:!1,controlWrite:!1}}function Cf(e,t){return(!t.read||e.read===!0)&&(!t.append||e.append===!0)&&(!t.write||e.write===!0)}function tr(e,t,r){return{status:e,resources:t.resources,...r?{message:r}:{}}}function cs(e){return e instanceof Error?e.message:"Unable to update Pod service access."}const Tb=xb;function Ob(e,t){return kb(e,t)}function kb(e,t){const r=Db(e),n=e.createController(t);return r.type==="single-pane"?{layout:"single-pane",controller:n,element:te.createElement(r.render,{controller:n,host:t})}:r.type==="two-pane"?{layout:"two-pane",controller:n,slots:{listHeader:te.createElement(r.slots.listHeader,{controller:n,host:t}),list:te.createElement(r.slots.list,{controller:n,host:t}),mainHeader:te.createElement(r.slots.mainHeader,{controller:n,host:t}),main:te.createElement(r.slots.main,{controller:n,host:t})}}:{layout:"three-pane",controller:n,contextConfig:r.contextConfig,slots:{listHeader:te.createElement(r.slots.listHeader,{controller:n,host:t}),list:te.createElement(r.slots.list,{controller:n,host:t}),mainHeader:te.createElement(r.slots.mainHeader,{controller:n,host:t}),main:te.createElement(r.slots.main,{controller:n,host:t}),context:te.createElement(r.slots.context,{controller:n,host:t})}}}function Db(e){if("layout"in e){const t=Fb(e.layout),r=Tb(t.descriptor),n=r.type;if(e.manifest.layout!==n)throw new Error(`Applet manifest layout ${e.manifest.layout} does not match descriptor layout ${n}`);if(n==="single-pane"){if(!("render"in t))throw new Error("Applet descriptor single-pane render must be a function");return Wr(t.render,"Applet descriptor single-pane render"),{type:"single-pane",render:t.render}}if(!("slots"in t))throw new Error(`Applet descriptor declares ${n} but no slots were provided`);return n==="two-pane"?(ds(t.slots,"Applet descriptor two-pane"),{type:"two-pane",slots:t.slots}):(Nb(t.slots,"Applet descriptor three-pane"),{type:"three-pane",contextConfig:r.context,slots:t.slots})}if(e.manifest.layout==="single-pane"){if(!("render"in e))throw new Error("Applet manifest declares single-pane but no single-pane renderer was provided");return Wr(e.render,"Applet single-pane render"),{type:"single-pane",render:e.render}}if(e.manifest.layout==="two-pane"&&"slots"in e)return ds(e.slots,"Applet two-pane"),{type:"two-pane",slots:e.slots};throw new Error(`Applet manifest declares ${e.manifest.layout} but no supported applet layout was provided`)}function ds(e,t){jb(e,t),Wr(e.listHeader,`${t} slot listHeader`),Wr(e.list,`${t} slot list`),Wr(e.mainHeader,`${t} slot mainHeader`),Wr(e.main,`${t} slot main`)}function Nb(e,t){ds(e,t),Wr(e.context,`${t} slot context`)}function jb(e,t){if(typeof e!="object"||e===null)throw new Error(`${t} slots must be an object`)}function Wr(e,t){if(typeof e!="function")throw new Error(`${t} must be a function`)}function Fb(e){if(typeof e!="object"||e===null||Array.isArray(e))throw new Error("Applet descriptor layout must be an object");if(!("descriptor"in e)||e.descriptor===void 0)throw new Error("Applet descriptor required");return e}const Lb=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Mf=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();var Ub={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Bb=te.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:i="",children:o,iconNode:a,...s},u)=>te.createElement("svg",{ref:u,...Ub,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:Mf("lucide",i),...s},[...a.map(([c,h])=>te.createElement(c,h)),...Array.isArray(o)?o:[o]]));const Te=(e,t)=>{const r=te.forwardRef(({className:n,...i},o)=>te.createElement(Bb,{ref:o,iconNode:t,className:Mf(`lucide-${Lb(e)}`,n),...i}));return r.displayName=`${e}`,r};const qb=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],Kb=Te("ArrowDown",qb);const Wb=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],zb=Te("ArrowUp",Wb);const Hb=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],Vb=Te("Bot",Hb);const Qb=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],ao=Te("Box",Qb);const Jb=[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]],Pf=Te("Brain",Jb);const Gb=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Vo=Te("Check",Gb);const Yb=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],Xb=Te("CodeXml",Yb);const Zb=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Tf=Te("Copy",Zb);const $b=[["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"}]],Hs=Te("ExternalLink",$b);const eg=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],tg=Te("EyeOff",eg);const rg=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],ng=Te("Eye",rg);const ig=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],Of=Te("Globe",ig);const og=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],kf=Te("Image",og);const ag=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],sg=Te("Info",ag);const lg=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],so=Te("KeyRound",lg);const ug=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],br=Te("LoaderCircle",ug);const cg=[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]],dg=Te("LogOut",cg);const fg=[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]],hg=Te("Pause",fg);const pg=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],Df=Te("Pencil",pg);const yg=[["line",{x1:"9",x2:"9",y1:"4",y2:"20",key:"ovs5a5"}],["path",{d:"M4 7c0-1.7 1.3-3 3-3h13",key:"10pag4"}],["path",{d:"M18 20c-1.7 0-3-1.3-3-3V4",key:"1gaosr"}]],bg=Te("Pi",yg);const gg=[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]],Nf=Te("Play",gg);const mg=[["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m18 3-4 4h6l-4 4",key:"16psg9"}]],wg=Te("PlugZap",mg);const _g=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Ro=Te("Plus",_g);const Ag=[["path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"14sxne"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16",key:"1hlbsb"}],["path",{d:"M16 16h5v5",key:"ccwih5"}]],vg=Te("RefreshCcw",Ag);const Sg=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],fs=Te("RotateCw",Sg);const Eg=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],jf=Te("Search",Eg);const xg=[["path",{d:"M20 7h-9",key:"3s1dr2"}],["path",{d:"M14 17H5",key:"gfn3mx"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],Ig=Te("Settings2",xg);const Rg=[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]],Cg=Te("SquareTerminal",Rg);const Mg=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Pg=Te("Square",Mg);const Tg=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]],Vs=Te("Trash2",Tg);const Og=[["path",{d:"M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1",key:"18etb6"}],["path",{d:"M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4",key:"xoc0q4"}]],kg=Te("Wallet",Og),Dg="data:image/png;base64,iVBORw0KGgoAAAANSUhEUg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gU5Un0RfXz81c7ocUZDjx6swNMSb5wQAGzZ8jFUrP6BmBlpCQgL27N5FzZyatM7i8Xjod9aHhl7iuEMW644oSFEx/yOVffSyXay4J8KeUJmb46Vfylrxd2I6bC9IS8s3uHXrNjVzVlQU/VRZu3z22S4kxMdTMzs6vkfd+XpaXlzcXKSmptDyAODWrdtoafmGmjkdthfEin3JVozMtEt4eDhycg/Qc/m7DfmfdE7Ys25rQQYGBlBVxTuEcorbF+e/ZMVfvro67qT17du3YunSJbQ8AKiqqqGe4jsdthakorKaejISAKxYsRyJiRupmXZbvnwZ/f+JPWnd4/HQx5QODg6iorKamvmmbC2IFTNarVjUOoEV9xvYk9Zzc730Y7TtnuNr25bbzs5OLFy0AAsXLaDm5mRzp5E7RXraXpw5U0s/OqC9/T5WrFhOyYqPn4cvvvhH3Lr1LSVvSmdnJxISEqiZr8vT29Ph3JESIjaz/VssESdTQUQMVBARAxVExEAFETFQQUQMVBARAxVExEAFETFQQUQMVBARAxVExEAFETFQQUQMVBARAxVExEAFETFQQUQMVBARAxVExEAFETFQQUQMVBARAxVExEAFETFQQUQMVBARAxVExEAFETFQQUQMVBARAxVExEAFETFQQUQMVBARAxVExEAFETFQQUQMVBARAxVExEAFETFQQUQMVBARAxVExEAFETFQQUQMVBARAxVExEAFETFQQUQMVBARg/8H+vaH9zU+MiYAAAAASUVORK5CYII=",jg="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAABf4UlEQVR4nO2dCXwURfb4q2cmIZAgIKfc942CgOItwqJyeCG4uKugsIt4oIgiq66gizcgcq14/rw51PUWXQXBVURAFAQ5REREFBJBjgSSmen/51v0m3+lnZlMkplczPt8OjPp6a6urnr3e/XKUkkoDFhKKY/zaSulAhGuq6qUqqeUaqiUauJ8NlJK1XaOY5VSGUqpKkqpNKVUqlLK57QNBJVSfqVUrlLqkFIqWyl1QCn1m1IqUyn1q1Jqu1Jqh1Jqm/Odc/sj9Mdr9DnofCYhBmDQk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NGqW/k581YsQIuVbjfvv27bfYtp0vHtLCUK2SNkicCCQccUg0O15AX8sCcagYCah69er5+sf/xxxzTKjfJrFEegeJxEsOGUfVqlVDgU6Jf5jzduWVV4ba5hN1TKLvTZo0kf5p3O/QoUNehw4doIkQ9HMaKhdLa8sDgZSE5DCJg0BjWSYOy0Fit7SAmwvXb9mypZ67gtqCEEBsd5KluXLQJBCe2bFjx3xRdYz5CGtXRIOCJkJQ7g30skQgJS05Jk2aVOrEkRpDLlW01YYg67HHHluoMTbf9YILLgils8vYSyJm48aNQ//zecUVV+hkTTxsQkxG21JY7jZtVzkE0jEmyyoJhTLIZ82apYtoYzSKQRgPwAClfQzye++9V915552hAFxpFdo+5phjCtxuIVogki2cf/tNNuosGMz3bN68uTruuOPUgQMHdD+IfwCMB+N+ySWXaONctoTAKP/qq690EJP/3UFLp2324AzBZw71JFWsYkgQU3LMnj074WrVhAkTQpy5LKpVqojzV9jru3fvbrdq1UpLgrPOOstu3ry5Po8KhlqHpDDdwrVr17avuuqqSM/0O+c+EwmSoZRq6BBKMsUkDpLj8ccfV6NGjUqIK1ckB9sQ3H333fo758rDFg0FQVHegXFnWwa2OEASUJG/T58++rdu3brpyDqSQtqvUaOGOuWUU/T1kZp02oUmMpi945wapaEfk1A4EL+8EMff/vY3rTIkSq2qiMRRFIAhSU7bCSecoGMeb7/9tjrrrLN0HhipJ5zbvXu3ztFirDj/6aefqh9//PEP+VhmThb77iil6psFGsqte7c0VSzTyGMhUkmqVaU93qqUD9NThRr117/+Nd/qSIx2cAGPF78TowlXhNu1NsRMOdGFHIaW9wBhaRGISRwUP0i0t6qi2RzKQWTJ1yrKvUWtmeX+30UwQgtDPc7mOMo5kYRCqlXovS+88IL6y1/+klC1asKECSG1ykylKO9g27beaBMobEazeKVQsxh3vp944omqZ88jFXyipbKEA/kNZuScakQLDQrVqySUOHHcfvvt6p577gkRR0UC27b12AEY0LGm3cscyHdpi/ytjIyMiATCNW7mIv+HYTraefV6RXDxlpSKJWKd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KmzPZXwe3PWB5YU35J+sKSdkLxGXYQLj8PMM5s6BbZemZXrGomFT1R+HR5+CBP9tOEUUqNJ1GICD+ycB+UoB36WJx6v0MgQaBG1atOwxPvwSPv2DZvb/Qo+o8dCqBtKZ/X5g/XU77jR56cr7gjKHPEDBGolGt7w3Z9CasWmd55uX8z7Ao+dNpBeISjcCIwTBvmmSvRw+VUm835+C2E/J7h4lEWgThPivjSMnIzhpp9rB2k2Xdls4Tri5GOr1AWhOJQL8+MHUsjB0u1ysM6Ccn7s7UILv1TtNGrg1jzpzgS6Wl1urQEakertlv2bJdzq0frC9ek6+zoQLxIBqB7t2kZGNwNVT3leLIvr3kqyIu5pDrQLuFgo7TEgRIpaUk48hRyVfUHrQcOCyHj2pq5bCWhlqLl7LLg/hJxpFMcn2DNHJrvU9EI5BIiEgScRFJvHmXSaZEHMmUtBtKpXVHKFVUIHmSccREOt5U6JEoQVJUvXkVpdhQgSiKByoQRfFABaIoHqhAFMUDFYiieKACURQPVCCK4oEKRFE8UIEoigcqEEXxQAWiKB6oQBTFAxWIonigAlEUD1QgiuKBCkRRPFCBKIoHKhBF8UAFoigeqEAUxQMViKJ4oAJRFA9UIIrigQpEUTxQgSiKB7FYtP0fUpRyIpfrJGJ694SitI2aWIrigQpEUTxQgSiKByoQRfFABaIoHqhAFMUDFYiieKACURQPVCCK4oEKRFE8+F/HlmZaTNWRSgAAAABJRU5ErkJggg==",Lg="data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Crect width='200' height='200' fill='%23FF6A00'/%3E%3Ctext x='100' y='122' font-family='Arial,Helvetica,sans-serif' font-size='76' font-weight='700' fill='%23FFFFFF' text-anchor='middle'%3EAli%3C/text%3E%3C/svg%3E",Ug={openai:Dg,anthropic:Ng,kimi:jg,bailian:Lg,deepseek:Fg},Bg={kimi:"#000000"};function Ff(e){return Ug[e]}function lo(e){return Bg[e]}const dt=[{id:"openai",name:"OpenAI",browserMode:"browserAssistedApiKey",browserLabel:"登录",description:"OpenAI 模型与编码能力",homeUrl:"https://openai.com",apiKeyUrl:"https://platform.openai.com/api-keys",apiKeyPlaceholder:"sk-...",defaultBaseUrl:"https://api.openai.com/v1"},{id:"anthropic",name:"Anthropic",browserMode:"browserAssistedApiKey",browserLabel:"登录",description:"Claude 模型与编码能力",homeUrl:"https://www.anthropic.com",apiKeyUrl:"https://console.anthropic.com/settings/keys",apiKeyPlaceholder:"sk-ant-...",defaultBaseUrl:"https://api.anthropic.com"},{id:"kimi",name:"Kimi",browserMode:"browserAssistedApiKey",browserLabel:"登录",description:"Moonshot AI 模型服务",homeUrl:"https://www.moonshot.cn",apiKeyUrl:"https://platform.moonshot.cn/console/api-keys",apiKeyPlaceholder:"sk-...",defaultBaseUrl:"https://api.moonshot.cn/v1"},{id:"bailian",name:"百炼",browserMode:"browserAssistedApiKey",browserLabel:"登录",description:"阿里云百炼模型服务",homeUrl:"https://www.aliyun.com/product/bailian",apiKeyUrl:"https://bailian.console.aliyun.com/#/api-key",apiKeyPlaceholder:"sk-...",defaultBaseUrl:"https://dashscope.aliyuncs.com/compatible-mode/v1"},{id:"deepseek",name:"DeepSeek",browserMode:"connectUnsupported",browserLabel:"不支持登录",description:"DeepSeek 模型服务",homeUrl:"https://www.deepseek.com",apiKeyUrl:"https://platform.deepseek.com/api_keys",apiKeyPlaceholder:"sk-...",defaultBaseUrl:"https://api.deepseek.com/v1"},{id:"zhipu",name:"智谱 AI",browserMode:"browserAssistedApiKey",browserLabel:"登录",description:"智谱 AI / GLM 模型服务",homeUrl:"https://open.bigmodel.cn",apiKeyUrl:"https://open.bigmodel.cn/usercenter/apikeys",apiKeyPlaceholder:"id.secret-...",defaultBaseUrl:"https://open.bigmodel.cn/api/paas/v4"},{id:"ollama",name:"Ollama",browserMode:"connectUnsupported",browserLabel:"本地服务",description:"本地 Ollama 模型服务",homeUrl:"https://ollama.com",defaultBaseUrl:"http://localhost:11434/v1"},{id:"custom",name:"Custom",browserMode:"browserAssistedApiKey",browserLabel:"配置",description:"OpenAI / Anthropic 兼容的自定义模型服务",homeUrl:"https://undefineds.co",apiKeyPlaceholder:"sk-...",defaultBaseUrl:"https://example.com/v1"}],Qs=[{id:"keys",label:"API Keys",title:"API KEYS"}];if(dt.map(e=>e.id).join(",")!==Cd.join(","))throw new Error("AI Connection provider UI is out of sync with the client catalog");function qg(e){const t=e.solid.session.getSnapshot(),r=e.solid.pod,n=r?.status==="ready"?r:void 0,o=t.status==="authenticated"&&n!==void 0?Kg(Rp({webId:t.webId,podBaseUrl:n.current.podUrl,authenticatedFetch:e.solid.session.fetch}),e.capabilities.aiConnectionsPodStore):null;let a="keys",s="openai",u,c="",h={},g={},A,I=0,k;const S=new Set,_=()=>S.forEach(E=>E()),R={client:o,openExternal:e.navigation.openExternal,clientConfigurationBridge:e.capabilities.aiClientConfiguration,get selectedSection(){return a},get selectedProvider(){return s},get selectedCredentialId(){return u},get searchQuery(){return c},get providerStates(){return h},get providerSummaries(){return g},get providerLoadError(){return A},selectSection(E){a!==E&&(a=E,_())},selectProvider(E,v){const V=E==="custom"?v:void 0;a==="provider"&&s===E&&u===V||(a="provider",s=E,u=V,_())},selectFirstUnconfiguredProvider(){const E=dt.findIndex(G=>G.id===s),V=(E<0?dt:[...dt.slice(E+1),...dt.slice(0,E+1)]).find(G=>h[G.id]==="unconfigured"&&G.id!==s)??dt.find(G=>h[G.id]==="unconfigured")??dt[0];V&&R.selectProvider(V.id)},setSearchQuery(E){c!==E&&(c=E,_())},setProviderState(E,v){if(h[E]===v)return;I+=1,h={...h,[E]:v};const V=Jg(E,v);V&&(g={...g,[E]:V}),_()},async loadProviders(){if(o)return k||(k=(async()=>{const E=I+1;I=E,A=void 0,_();try{const v=await o.listProviders();if(E!==I)return;g=Object.fromEntries(v.map(V=>[V.id,V])),h=Object.fromEntries(dt.map(V=>[V.id,Hg(g[V.id])])),_()}catch(v){if(E!==I)return;A=Gg(v),_()}finally{k=void 0}})(),k)},subscribe(E){return S.add(E),()=>S.delete(E)}};return R}function Kg(e,t){return t?{...e,listProviders:async()=>t.listProviders(),listModels:t.listModels?async()=>t.listModels():e.listModels,createApiKeyCredential:t.createApiKeyCredential?async(r,n)=>t.createApiKeyCredential(r,n):e.createApiKeyCredential,createLocalCredential:t.createLocalCredential?async(r,n)=>n.offeringId==="official-subscription"?e.createLocalCredential(r,n):t.createLocalCredential(r,n):e.createLocalCredential,updateProviderCredential:t.updateProviderCredential?async(r,n,i)=>t.updateProviderCredential(r,n,i):e.updateProviderCredential,deleteProviderCredential:t.deleteProviderCredential?async(r,n)=>t.deleteProviderCredential(r,n):e.deleteProviderCredential,pollDevice:t.saveOAuthCredential?async(r,n)=>{const i=await e.pollDevice(r,n);if(i.status!=="completed"||!i.oauthCredential)return i;const o=await t.saveOAuthCredential(r,i.oauthCredential),{oauthCredential:a,...s}=i;return{...s,credentialId:o?.id??i.credentialId}}:e.pollDevice,refreshOAuthCredential:t.readCredentialSecret&&t.updateOAuthCredential?async(r,n,i,o)=>{const s=(await t.listProviders()).find(I=>I.id===r)?.credentials.find(I=>I.id===n);if(!s)throw new Error("oauth_credential_not_found");const u=await t.readCredentialSecret(r,n),c=typeof u.refreshToken=="string"?u.refreshToken:void 0;if(!c)throw new Error("oauth_refresh_token_required");const h=await e.refreshOAuthCredential(r,n,c,s.version);if(h.status!=="completed"||!h.oauthCredential)return h;await t.updateOAuthCredential(r,n,s.version,h.oauthCredential);const{oauthCredential:g,...A}=h;return A}:e.refreshOAuthCredential,quota:t.readCredentialSecret?async(r,n=!1,i)=>{const a=(await t.listProviders()).find(g=>g.id===r)?.credentials??[],s=i?.credentialId??i?.credentialIri,u=s?a.find(g=>g.id===s):a.find(g=>g.enabled&&(!i?.offeringId||g.offeringId===i.offeringId));if(!u)throw new Error("quota_credential_not_found");const c=await t.readCredentialSecret(r,u.id),h=Jo(c,u.authMode);if(!h)throw new Error("credential_secret_unavailable");return e.quotaFromSecret(r,{credentialId:u.id,credentialIri:u.id,authMode:u.authMode==="deviceCode"||u.authMode==="oauth"?"deviceCodeOAuth":"apiKey",offeringId:u.offeringId,baseUrl:u.baseUrl,proxyUrl:u.proxyUrl,compatibility:u.compatibility,secret:h})}:e.quota,disconnect:async(r,n)=>!n||!t.deleteProviderCredential?e.disconnect(r,n):await t.deleteProviderCredential(r,n),testProviderCredential:t.readCredentialSecret?async(r,n)=>{const o=(await t.listProviders()).find(h=>h.id===r)?.credentials.find(h=>h.id===n.credentialId);if(!o)throw new Error("test_credential_not_found");const a=await t.readCredentialSecret(r,o.id),s=Jo(a,o.authMode);if(!s)throw new Error("test_secret_missing");let u;try{u=await e.discoverModels(r,{credentialId:o.id,offeringId:o.offeringId,authMode:o.authMode==="deviceCode"||o.authMode==="oauth"?"deviceCodeOAuth":o.authMode==="local"?"local":"apiKey",secret:s,baseUrl:o.baseUrl,proxyUrl:o.proxyUrl,compatibility:o.compatibility})}catch(h){throw await t.markCredentialHealth?.(r,o.id,"invalid",o.version).catch(()=>{}),h}const c=await t.markCredentialHealth?.(r,o.id,"healthy",o.version);return{ok:!0,credentialId:o.id,...c?{credential:c}:{},modelCount:u.models.length,observedAt:u.observedAt}}:e.testProviderCredential,discoverModels:t.readCredentialSecret?async(r,n)=>{const a=(await t.listProviders()).find(h=>h.id===r)?.credentials.filter(h=>h.enabled&&(!n?.offeringId||h.offeringId===n.offeringId)&&(!n?.credentialId||h.id===n.credentialId))??[];if(a.length===0)throw new Error("models_credential_not_found");const s=await Promise.allSettled(a.map(async h=>{const g=await t.readCredentialSecret(r,h.id),A=Jo(g,h.authMode);if(!A)throw new Error("models_secret_missing");const I=await e.discoverModels(r,{credentialId:h.id,offeringId:h.offeringId,authMode:h.authMode==="deviceCode"||h.authMode==="oauth"?"deviceCodeOAuth":h.authMode==="local"?"local":"apiKey",secret:A,baseUrl:h.baseUrl,proxyUrl:h.proxyUrl,compatibility:n?.compatibility??h.compatibility});return{...I,models:I.models.map(k=>({...k,offeringId:h.offeringId,...r==="custom"?{credentialId:h.id}:{}}))}})),u=s.flatMap(h=>h.status==="fulfilled"?[h.value]:[]);if(u.length===0)throw s[0].reason;t.saveDiscoveredModels&&await Promise.all(u.map(h=>t.saveDiscoveredModels(r,h.credential,h.models)));const c=[...new Map(u.flatMap(h=>h.models).map(h=>[`${("offeringId"in h?h.offeringId:void 0)??""}\0${("resourceId"in h?h.resourceId:void 0)??h.id}`,h])).values()];return{...u[0],models:c}}:e.discoverModels,saveModelSelection:t.saveModelSelection?async(r,n,i)=>t.saveModelSelection(r,n,i):e.saveModelSelection}:e}function Js(e){return te.useSyncExternalStore(e.subscribe,()=>e.selectedSection??"provider",()=>e.selectedSection??"provider")}function Gs(e){return te.useSyncExternalStore(e.subscribe,()=>e.selectedProvider,()=>e.selectedProvider)}function Lf(e){return te.useSyncExternalStore(e.subscribe,()=>e.selectedCredentialId,()=>e.selectedCredentialId)}function Uf(e){return te.useSyncExternalStore(e.subscribe,()=>e.searchQuery,()=>e.searchQuery)}function Wg(e){return te.useSyncExternalStore(e.subscribe,()=>e.providerStates,()=>e.providerStates)}function zg(e){return te.useSyncExternalStore(e.subscribe,()=>Zl(e.providerSummaries),()=>Zl(e.providerSummaries))}function Ys(e){return te.useSyncExternalStore(e.subscribe,()=>e.providerSummaries,()=>e.providerSummaries)}function Bf(e){return te.useSyncExternalStore(e.subscribe,()=>e.providerLoadError,()=>e.providerLoadError)}function Hg(e){if(!e||e.status==="unconfigured"||e.status==="unavailable")return"unconfigured";if(e.status==="configured")return"configured";if(e.status==="attention")return"attention";const t=qf(e);return t?.authMode==="oauth"||t?.authMode==="deviceCode"?"connected":"configured"}const Xl=new WeakMap;function Zl(e){const t=Xl.get(e);if(t)return t;const r=Object.fromEntries(Object.values(e).filter(Kf).map(n=>[n.id,Vg(n)]));return Xl.set(e,r),r}function Vg(e){const t=qf(e),r=e.status==="available"?"connected":e.status==="attention"?"reauthRequired":"disconnected",n=t?.authMode;return{provider:e.id,status:r,authMode:n==="oauth"||n==="deviceCode"?"deviceCodeOAuth":n?"browserAssistedApiKey":void 0,accountLabel:t?.label,expiresAt:t?.expiresAt,reauthRequired:r==="reauthRequired"?!0:void 0,credentialIri:t?.id,version:t?.version,connect:{modes:Qg(e),configured:e.status!=="unavailable"}}}function Qg(e){const t=[...e.offerings.flatMap(r=>r.authModes??[]),...e.credentials.map(r=>r.authMode)].map(r=>r==="oauth"||r==="deviceCode"?"deviceCodeOAuth":r==="apiKey"||r==="local"?"browserAssistedApiKey":void 0).filter(Kf);return t.length>0?[...new Set(t)]:["browserAssistedApiKey"]}function qf(e){return e.credentials.find(t=>t.enabled)??e.credentials[0]}function Jg(e,t){if(t==="configured")return{id:e,name:Qo(e),offerings:[],credentials:[$l(e,"apiKey")],selectedModels:[],status:"available"};if(t==="connected")return{id:e,name:Qo(e),offerings:[],credentials:[$l(e,"deviceCode")],selectedModels:[],status:"available"};if(t!=="attention"&&t!=="loading")return{id:e,name:Qo(e),offerings:[],credentials:[],selectedModels:[],status:"unconfigured"}}function $l(e,t){return{id:`${e}:current`,offeringId:t==="deviceCode"||t==="oauth"?"official-subscription":"api-platform",authMode:t,enabled:!0,priority:0,health:"healthy",version:0}}function Qo(e){return dt.find(t=>t.id===e)?.name??e}function Jo(e,t){if(t==="deviceCode"||t==="oauth"){const n=typeof e.accessToken=="string"&&e.accessToken.trim()?e.accessToken:void 0;return n?{type:"oauth",accessToken:n}:void 0}if(t==="local")return{type:"local"};const r=typeof e.apiKey=="string"&&e.apiKey.trim()?e.apiKey:void 0;return r?{type:"apiKey",apiKey:r}:void 0}function Kf(e){return e!==void 0}function Gg(e){return Md(e)}function Yg({controller:e}){const t=te.useContext(Pp),r=Js(e),n=Gs(e),i=Lf(e),o=Uf(e).trim().toLocaleLowerCase(),a=Wg(e),s=Ys(e),u=Bf(e),c=dt.reduce((S,_)=>{if(_.id!=="custom")return[...S,{..._}];const R=s.custom?.credentials??[];return[...S,...R.length>0?R.map(E=>({..._,name:E.label||_.name,credentialId:E.id})):[{..._}]]},[]),h=o?c.filter(S=>Go(S,s).toLocaleLowerCase().includes(o)):c,g=[...Qs.map(S=>({kind:"section",id:S.id,label:S.label})),...h.map(S=>({kind:"provider",provider:S}))],A=te.useRef([]),I=g.findIndex(S=>S.kind==="section"?r===S.id:r==="provider"&&S.provider.id===n&&S.provider.credentialId===i),k=S=>{S.kind==="section"?e.selectSection(S.id):e.selectProvider(S.provider.id,S.provider.credentialId),t?.mode==="stack"&&t.openMain()};return m.jsxs("div",{role:"listbox","aria-label":"AI 服务","aria-orientation":"vertical",className:"py-2",children:[m.jsx("section",{className:"mb-3","aria-label":"API Keys",children:g.filter(S=>S.kind==="section").map(S=>{const _=g.indexOf(S);return m.jsxs(eu,{index:_,selected:r===S.id,tabbable:I===_||I<0&&_===0,label:S.label,optionRefs:A,onActivate:()=>k(S),onMove:R=>tu(g,R,e,A),children:[m.jsx(Xg,{section:S.id}),m.jsx("span",{className:Je("min-w-0 flex-1 truncate text-sm font-medium",r===S.id?"text-foreground":"text-foreground/80"),children:S.label})]},S.id)})}),m.jsxs("section",{children:[m.jsx("h2",{className:"px-5 py-1 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground",children:"Provider"}),h.map(S=>{const _=g.findIndex(v=>v.kind==="provider"&&v.provider.id===S.id&&v.provider.credentialId===S.credentialId),R=r==="provider"&&n===S.id&&S.credentialId===i,E=a[S.id]??"loading";return m.jsxs(eu,{index:_,selected:R,tabbable:R||I<0&&_===0,label:Go(S,s),describedBy:`ai-connections-provider-${S.id}-${S.credentialId??"default"}-status`,optionRefs:A,onActivate:()=>k({kind:"provider",provider:S}),onMove:v=>tu(g,v,e,A),children:[m.jsxs(Sd,{className:"h-9 w-9 shrink-0 rounded-md border border-border/20",style:lo(S.id)?{backgroundColor:lo(S.id)}:void 0,children:[m.jsx(Ed,{src:Ff(S.id),className:"object-cover"}),m.jsx(xd,{className:"rounded-md bg-muted text-[10px] font-bold uppercase text-muted-foreground",children:$g(S.id)})]}),m.jsx("span",{className:Je("min-w-0 flex-1 truncate text-sm font-medium",R?"text-foreground":"text-foreground/80"),children:Go(S,s)}),m.jsx(Zg,{state:E,statusId:`ai-connections-provider-${S.id}-${S.credentialId??"default"}-status`})]},`${S.id}:${S.credentialId??"default"}`)}),h.length===0?m.jsx("p",{className:"p-8 text-center text-xs text-muted-foreground",children:"无结果"}):null]}),u?m.jsxs("p",{className:"px-4 py-2 text-xs text-destructive",children:["Provider 状态读取失败:",u]}):null]})}function eu({index:e,selected:t,tabbable:r,label:n,describedBy:i,statusId:o,optionRefs:a,onActivate:s,onMove:u,children:c}){const h=g=>{if(g.key==="ArrowDown")u(e+1);else if(g.key==="ArrowUp")u(e-1);else if(g.key==="Home")u(0);else if(g.key==="End")u(Number.POSITIVE_INFINITY);else if(g.key==="Enter"||g.key===" "){g.preventDefault(),s();return}else return;g.preventDefault()};return m.jsx("button",{ref:g=>{a.current[e]=g},type:"button",role:"option","aria-selected":t,"aria-label":n,"aria-describedby":i??o,tabIndex:r?0:-1,onClick:s,onKeyDown:h,className:Je("group flex w-full items-center gap-3 border-l-[3px] border-transparent px-4 py-3 text-left transition-colors",t?"border-l-primary bg-accent/80":"hover:bg-muted/40"),children:c})}function tu(e,t,r,n){const i=Math.min(Math.max(t,0),e.length-1),o=e[i];o&&(o.kind==="section"?r.selectSection(o.id):r.selectProvider(o.provider.id,o.provider.credentialId),n.current[i]?.focus())}function Xg({section:e}){return m.jsx("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-md border border-border/20 bg-muted text-muted-foreground",children:m.jsx(so,{className:"h-4 w-4","aria-hidden":"true"})})}function Zg({state:e,statusId:t}){const r=e==="configured"||e==="connected";return m.jsxs("span",{id:t,role:"status","aria-live":"polite",className:"flex shrink-0 items-center gap-1.5",children:[r?m.jsx("span",{className:"h-2 w-2 rounded-full bg-primary","aria-hidden":"true"}):null,m.jsx("span",{className:"text-[11px] font-normal text-muted-foreground",children:em(e)})]})}function $g(e){switch(e){case"openai":return"OA";case"anthropic":return"A";case"kimi":return"K";case"bailian":return"百";case"deepseek":return"DS";case"zhipu":return"智";case"ollama":return"O";case"custom":return"C"}}function Go(e,t){return e.name||t[e.id]?.name||e.id}function em(e){switch(e){case"unconfigured":return"未设置";case"configured":return"已配置";case"connected":return"已连接";case"attention":return"需处理";default:return"读取中"}}const tm={"official-subscription":"账号订阅","subscription-key":"Token 套餐","api-platform":"API 平台","pay-as-you-go":"按量付费","token-plan":"Token 套餐","token-plan-team":"Token 套餐(团队版)","coding-plan":"Coding 套餐",local:"本地服务","openai-compatible":"OpenAI 兼容","anthropic-compatible":"Anthropic 兼容"},rm=/[一-鿿]/u;function uo(e){const t=e.label?.trim();return t&&rm.test(t)?t:tm[e.id]??t??nm(e)}function nm(e){return e.kind==="oauth-subscription"?"账号订阅":e.kind==="api-platform"?"API 平台":e.kind==="token-plan"?"Token 套餐":e.label?e.label:e.authModes?.some(t=>t==="oauth"||t==="deviceCode")?"账号登录":e.authModes?.some(t=>t==="apiKey")?"API Key":e.id}function im({providerName:e,offeringName:t,quota:r,busy:n,disabled:i=!1,credentialLabel:o,error:a,onRefresh:s}){return m.jsxs("div",{className:"space-y-3 border-t border-border/40 pt-3",children:[m.jsxs("div",{className:"flex items-center justify-between gap-2",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(kg,{className:"h-4 w-4 text-primary"}),m.jsx("div",{className:"text-sm font-medium text-foreground/90",children:"剩余额度"})]}),m.jsxs(Me,{variant:"ghost",size:"sm","aria-label":`刷新 ${e} ${t}额度`,disabled:n||i,onClick:s,children:[m.jsx(vg,{className:"mr-2 h-3.5 w-3.5"}),"刷新"]})]}),o?m.jsxs("p",{className:"text-xs text-muted-foreground",children:["凭证:",o]}):null,a?m.jsx("p",{className:"text-sm text-destructive",children:a}):r?r.status==="unsupported"?m.jsxs(m.Fragment,{children:[m.jsx("p",{className:"text-sm",children:"官方额度接口不支持"}),m.jsxs("p",{className:"text-xs text-muted-foreground",children:["来源:",r.source]})]}):r.status==="error"?m.jsx("p",{className:"text-sm text-destructive",children:"额度查询失败"}):m.jsxs("div",{className:"space-y-3 text-sm",children:[typeof r.balance=="number"?m.jsxs("div",{children:["余额:",r.balance]}):null,r.windows.map((u,c)=>m.jsxs("div",{className:"space-y-1.5",children:[m.jsxs("div",{className:"flex items-center justify-between gap-3",children:[m.jsx("span",{className:"font-medium text-foreground",children:ru(u.name)}),m.jsx("span",{className:"text-muted-foreground",children:om(u)})]}),Gn(u)!==void 0?m.jsx("div",{"aria-label":`${ru(u.name)}剩余 ${String(Gn(u))}%`,className:"h-1.5 overflow-hidden rounded-full bg-muted",role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Gn(u),children:m.jsx("div",{className:"h-full rounded-full bg-primary",style:{width:`${String(Gn(u))}%`}})}):null,u.resetsAt?m.jsxs("p",{className:"text-xs text-muted-foreground",children:["重置:",nu(u.resetsAt)]}):null]},`${String(u.name)}-${c}`)),m.jsxs("p",{className:"text-xs text-muted-foreground",children:["更新:",nu(r.observedAt)]}),m.jsxs("p",{className:"text-xs text-muted-foreground",children:["来源:",r.source,r.stale?" · 数据可能已过期":""]})]}):m.jsx("p",{className:"text-xs text-muted-foreground",children:o?"尚未检查":"连接后可查询"})]})}function ru(e){switch(e){case"five-hour":return"5 小时限制";case"weekly":return"周限制";case"monthly":return"月限制";case"weekly-opus":return"Opus 周限制";case"weekly-sonnet":return"Sonnet 周限制";case"available_balance":return"可用余额";case"voucher_balance":return"赠送余额";case"cash_balance":return"现金余额";default:return typeof e=="string"&&e?e:"额度"}}function Gn(e){if(!(typeof e.remaining!="number"||typeof e.limit!="number"||e.limit<=0))return Math.max(0,Math.min(100,Math.round(e.remaining/e.limit*1e4)/100))}function om(e){const t=Gn(e);if(t!==void 0)return`剩余 ${String(t)}%`;if(typeof e.remaining=="number"){const r=typeof e.currency=="string"?` ${e.currency}`:"";return`剩余 ${String(e.remaining)}${r}`}return"官方数据可用"}function nu(e){const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString()}function am({definition:e,product:t,status:r,accountLabel:n,attempt:i,attemptOfferingId:o,apiKey:a,baseUrl:s="",busy:u,disabled:c=!1,error:h,suppressError:g=!1,quotas:A={},onApiKeyChange:I,onBaseUrlChange:k,onBeginApiKey:S,onBeginOffering:_,onBeginBrowser:R,onSaveApiKey:E,onDisconnect:v,onCreateApiKeyCredential:V,onCreateLocalCredential:G,onUpdateCredential:ue,onDeleteCredential:ce,onTestCredential:z,onReorderCredentials:se,onRefreshQuota:C,onDismissError:M}){const K=[{id:"api-platform",label:"API Key",kind:"api-platform",authModes:["apiKey"]}],x=t?.credentials??[],$=t?.offerings.length?t.offerings:K;return m.jsx(Xd,{children:m.jsxs("section",{className:"space-y-4","aria-label":"当前连接",children:[m.jsxs("div",{className:"flex items-center gap-2 border-b border-border/40 pb-2",children:[m.jsx(Ig,{className:"h-4 w-4 text-primary"}),m.jsx("h3",{className:"text-sm font-medium text-foreground/90",children:"当前连接"})]}),m.jsxs("div",{className:"space-y-3",children:[$.map(J=>{const re=gm(J,e),de=o===J.id?i:void 0,F=x.filter(ee=>ee.offeringId===J.id).sort((ee,ie)=>ee.priority-ie.priority),ne=h?.offeringId===J.id?h.message:void 0,y=F.find(ee=>ee.enabled)??F[0],B=A[J.id],Z=y&&B?.credentialId===y.id?B:void 0,D=m.jsx(im,{providerName:e.name,offeringName:uo(J),quota:Z?.quota,busy:Z?.busy??!1,disabled:c||!!t&&!y,credentialLabel:y?zr(y):void 0,error:Z?.error,onRefresh:()=>C?.(J,y)});if(J.lifecycle==="unavailable")return m.jsx(Or,{offering:J,children:m.jsx("p",{className:"text-sm text-muted-foreground",children:J.kind==="oauth-subscription"?"暂不可用:账号订阅需在 Xpod 桌面版中导入本机客户端(如 Codex CLI)的登录态,浏览器中无法完成。":"暂不可用:该 Offering 尚未提供可用的连接流程。"})},J.id);if(ne&&de?.status==="unsupported"&&re==="deviceCodeOAuth")return m.jsxs(Or,{offering:J,children:[m.jsxs("div",{className:"rounded-md border border-border/60 bg-muted/30 px-3 py-3",children:[m.jsx("p",{className:"text-sm font-medium text-foreground",children:"当前部署未启用账号授权"}),m.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:"仍可使用其他已提供的接入方式。"})]}),D]},J.id);if(ne&&re==="deviceCodeOAuth")return m.jsxs(Or,{offering:J,children:[m.jsx(Ap,{title:"登录未完成",description:ne,primaryLabel:"重试登录",onPrimary:()=>_?.(J,re),secondaryLabel:"关闭",onSecondary:M??(()=>{})}),D]},J.id);if(mm(de)&&re==="deviceCodeOAuth")return m.jsxs(Or,{offering:J,children:[m.jsx(vp,{title:"正在连接",detail:de?.userCode?`验证码:${de.userCode}`:"请在打开的页面完成授权。",providerLabel:uo(J),providerHost:e.name}),D]},J.id);if(re==="deviceCodeOAuth")return m.jsxs(Or,{offering:J,children:[m.jsx("div",{className:"space-y-2",children:F.map(ee=>m.jsx(hs,{credential:ee,label:ee.label?ps(ee.label):zr(ee),busy:u,disabled:c,onToggle:ue,onTest:z,onDelete:()=>v(ee),deleteAriaLabel:`${ee.label?ps(ee.label):zr(ee)} 移除`},ee.id))}),m.jsx("div",{className:"flex flex-wrap gap-2",children:m.jsxs(Me,{size:"sm",disabled:u||c,onClick:()=>_?.(J,re),children:[u?m.jsx(br,{className:"mr-2 h-4 w-4 animate-spin"}):m.jsx(Hs,{className:"mr-2 h-4 w-4"}),F.length?"添加账号":"登录"]})}),D]},J.id);if(J.authModes?.includes("local")){const ee=e.id==="openai"&&J.id==="official-subscription";return m.jsx(Or,{offering:J,children:m.jsxs("div",{className:"space-y-2",children:[F.map(ie=>m.jsx(hs,{credential:ie,label:ie.label??"本地 Ollama",busy:u,disabled:c,onToggle:ue,onTest:z,onDelete:()=>ce?.(ie),deleteAriaLabel:`删除 ${ie.label??"本地 Ollama"}`},ie.id)),F.length===0?m.jsxs("div",{className:"space-y-2",children:[ee?m.jsx("p",{className:"text-xs text-muted-foreground",children:"从当前设备已有的 OpenAI 登录导入,不会发起新的浏览器授权。"}):null,m.jsxs(Me,{variant:"outline",size:"sm",disabled:u||c||!G,onClick:()=>{G?.(J)},children:[u?m.jsx(br,{className:"mr-2 h-4 w-4 animate-spin"}):m.jsx(Ro,{className:"mr-2 h-4 w-4"}),hm(J)]})]}):null]})},J.id)}return m.jsxs(Or,{offering:J,children:[m.jsx(pm,{definition:e,offering:J,status:r,accountLabel:n,credentials:F,attempt:i,apiKey:a,baseUrl:s,busy:u,disabled:c,error:ne,onApiKeyChange:I,onBaseUrlChange:k,onBeginApiKey:S,onBeginBrowser:R,onSaveApiKey:E,onDisconnect:v,onCreateApiKeyCredential:V?ee=>V(J,ee):void 0,onUpdateCredential:ue,onDeleteCredential:ce,onTestCredential:z,onMoveCredential:(ee,ie)=>se?.(J,F,ee,ie)}),D]},J.id)}),h&&!h.offeringId&&!g?m.jsx("p",{className:"rounded-md border border-destructive/30 px-3 py-2 text-sm text-destructive",children:h.message}):null]})]})})}function Or({offering:e,children:t}){const r=e.endpoints??[],n=uo(e),i=e.kind?cm(e.kind):void 0,o=i&&i!==n?[i]:[];return m.jsxs("section",{className:"space-y-3 rounded-lg border border-border/50 bg-card p-3","aria-labelledby":`offering-${e.id}`,children:[m.jsxs("div",{className:"flex items-start justify-between gap-3",children:[m.jsxs("div",{children:[m.jsx("h4",{id:`offering-${e.id}`,className:"text-sm font-medium text-foreground",children:n}),o.length?m.jsx("div",{className:"mt-1 flex items-center gap-2 text-xs text-muted-foreground",children:o.map(a=>m.jsx("span",{children:a},a))}):null]}),m.jsxs("div",{className:"flex flex-wrap items-center justify-end gap-x-3 gap-y-1 text-xs",children:[m.jsx("span",{className:"text-muted-foreground",children:dm(e)}),e.consoleUrl?m.jsx(Ui,{href:e.consoleUrl,label:"控制台"}):null,e.subscriptionUrl?m.jsx(Ui,{href:e.subscriptionUrl,label:"订阅与账单"}):null,e.quota?.url?m.jsx(Ui,{href:e.quota.url,label:"额度与用量"}):null,e.usagePolicyUrl?m.jsx(Ui,{href:e.usagePolicyUrl,label:"使用政策"}):null]})]}),r.length?m.jsx("dl",{className:"space-y-1 text-[11px] text-muted-foreground",children:r.map(a=>m.jsxs("div",{className:"flex min-w-0 items-baseline gap-2",children:[m.jsx("dt",{className:"shrink-0 text-foreground/70",children:um(a.protocol)}),m.jsx("dd",{className:"min-w-0 truncate font-mono",title:a.baseUrl,children:lm(a.baseUrl)})]},`${a.protocol}:${a.baseUrl}`))}):null,t]})}function Ui({href:e,label:t}){return m.jsx("a",{href:e,target:"_blank",rel:"noreferrer",className:"text-primary hover:underline",children:t})}function sm(e){const t=e.modelDiscovery?.endpointProtocol;return e.endpoints?.find(r=>r.protocol===t)?.baseUrl??e.endpoints?.[0]?.baseUrl}function lm(e){try{const t=new URL(e);return`${t.host}${t.pathname.replace(/\/$/u,"")}`}catch{return e}}function um(e){return e==="responses"?"Responses API":e==="chatCompletions"?"Chat API":e==="anthropic"?"Anthropic API":e}function cm(e){return e==="oauth-subscription"?"账号订阅":e==="api-platform"?"API 平台":e==="token-plan"?"Token 套餐":e}function dm(e){const t=(e.authModes??[]).map(r=>r==="local"?fm(e):r==="oauth"||r==="deviceCode"?"账号授权":"API Key");return[...new Set(t)].join(" / ")}function fm(e){return e.id==="official-subscription"&&e.productLabel==="OpenAI"?"本地会话":"本地服务"}function hm(e){return e.id==="official-subscription"&&e.productLabel==="OpenAI"?"导入本机 OpenAI 登录":"连接本地 Ollama"}function pm({definition:e,offering:t,status:r,accountLabel:n,credentials:i,attempt:o,apiKey:a,baseUrl:s,busy:u,disabled:c,error:h,onApiKeyChange:g,onBaseUrlChange:A,onBeginApiKey:I,onBeginBrowser:k,onSaveApiKey:S,onDisconnect:_,onCreateApiKeyCredential:R,onUpdateCredential:E,onDeleteCredential:v,onTestCredential:V,onMoveCredential:G}){const ue=o?.mode==="browserAssistedApiKey"&&o.status==="pending",ce=r==="configured",z=r==="connected",se=!!R,[C,M]=te.useState(!1),[K,x]=te.useState(),[$,J]=te.useState(),[re,de]=te.useState(""),[F,ne]=te.useState(""),[y,B]=te.useState(""),[Z,D]=te.useState(""),[ee,ie]=te.useState(),[fe,ae]=te.useState(!1),P=()=>{x("create"),J(void 0),de(""),ne(""),B(""),D(""),ie(void 0),ae(!1)},N=U=>{x("edit"),J(U),de(U.label??""),ne(""),B(U.baseUrl??""),D(U.proxyUrl??""),ie(void 0),ae(!1)},Q=()=>{x(void 0),J(void 0),de(""),ne(""),B(""),D(""),ie(void 0),ae(!1)},le=async()=>{let U;try{U=Cp(Z)}catch{ie("Proxy URL 格式无效(支持 http、https)");return}if(ie(void 0),K==="create"){const l=F.trim();if(!l||!R)return;try{await R({apiKey:l,label:re.trim()||void 0,baseUrl:y.trim()||void 0,proxyUrl:U,priority:wm(i)}),Q()}catch(d){ie(d instanceof Error?d.message:"保存失败,请重试")}return}if(K==="edit"&&$&&E){const l=Z.trim()!==($.proxyUrl??"").trim();try{await E($,{label:re.trim()||void 0,baseUrl:y.trim()||void 0,...l?{proxyUrl:U}:{}}),Q()}catch(d){ie(d instanceof Error?d.message:"保存失败,请重试")}}};return m.jsxs("div",{className:"space-y-4",children:[m.jsx("div",{children:i.length>0?m.jsx("div",{className:"space-y-2",children:i.map((U,l)=>m.jsx(hs,{credential:U,label:zr(U),busy:u,disabled:c,onToggle:E,onTest:V,onEdit:()=>N(U),onDelete:()=>v?.(U),deleteAriaLabel:`删除 ${zr(U)}`,beforeActions:m.jsxs(m.Fragment,{children:[m.jsx(Me,{variant:"ghost",size:"icon",className:"h-7 w-7","aria-label":`上移 ${zr(U)}`,disabled:l===0||c||u,onClick:()=>G?.(l,l-1),children:m.jsx(zb,{"aria-hidden":"true",className:"h-3.5 w-3.5"})}),m.jsx(Me,{variant:"ghost",size:"icon",className:"h-7 w-7","aria-label":`下移 ${zr(U)}`,disabled:l===i.length-1||c||u,onClick:()=>G?.(l,l+1),children:m.jsx(Kb,{"aria-hidden":"true",className:"h-3.5 w-3.5"})})]})},U.id))}):n?m.jsx("p",{className:"text-xs text-muted-foreground",children:ps(n)}):m.jsx("p",{className:"text-xs text-muted-foreground",children:"Provider 凭证保存在当前 Pod,由 Pod 权限保护。"})}),o?.userCode?m.jsxs("div",{className:"border-l-2 border-primary bg-muted/30 px-3 py-2 text-sm",children:["验证码:",m.jsx("strong",{className:"font-mono",children:o.userCode})]}):null,m.jsxs("div",{className:"flex flex-wrap gap-2",children:[R?m.jsxs(Me,{variant:"outline",size:"sm",disabled:u||c,onClick:P,children:[m.jsx(Ro,{className:"mr-2 h-4 w-4"}),"添加 API Key"]}):null,se?null:z?m.jsxs(m.Fragment,{children:[m.jsxs(Me,{variant:"outline",size:"sm",disabled:u||c,onClick:k,children:[u?m.jsx(br,{className:"mr-2 h-4 w-4 animate-spin"}):m.jsx(fs,{className:"mr-2 h-4 w-4"}),"重新连接"]}),m.jsxs(Me,{variant:"ghost",size:"sm",disabled:u||c,onClick:_,children:[m.jsx(dg,{className:"mr-2 h-4 w-4"}),"断开连接"]})]}):ce?m.jsxs(m.Fragment,{children:[m.jsxs(Me,{variant:"outline",size:"sm","aria-label":"更新 API Key",disabled:u||c,onClick:I,children:[m.jsx(so,{className:"mr-2 h-4 w-4"}),"更新 API Key"]}),m.jsx(Me,{variant:"ghost",size:"sm",disabled:u||c,onClick:_,children:"移除配置"})]}):m.jsxs(m.Fragment,{children:[m.jsxs(Me,{variant:"outline",size:"sm",disabled:u||c||e.browserMode==="connectUnsupported",onClick:k,children:[u?m.jsx(br,{className:"mr-2 h-4 w-4 animate-spin"}):m.jsx(Hs,{className:"mr-2 h-4 w-4"}),e.browserLabel]}),m.jsxs(Me,{variant:"outline",size:"sm","aria-label":`${e.name} API Key`,disabled:u||c,onClick:I,children:[m.jsx(so,{className:"mr-2 h-4 w-4"}),"配置 API Key"]})]})]}),K?m.jsxs("div",{className:"space-y-2 rounded-lg border border-border/50 bg-muted/10 p-3",children:[K==="edit"?m.jsx(ft,{autoComplete:"off","aria-label":`${e.name} API Key 标签`,placeholder:"名称,例如 Work key",value:re,onChange:U=>de(U.target.value)}):null,K==="create"?m.jsx(ft,{type:C?"text":"password",autoComplete:"new-password","data-lpignore":"true","data-1p-ignore":!0,"aria-label":`${e.name} API Key 输入`,placeholder:e.apiKeyPlaceholder||"从官方控制台复制 API Key",value:F,onChange:U=>ne(U.target.value),className:"font-mono"}):null,K==="edit"||fe?m.jsxs(m.Fragment,{children:[m.jsx(ft,{autoComplete:"off","data-lpignore":"true","data-1p-ignore":!0,"aria-label":`${e.name} Base URL 输入`,placeholder:sm(t)||e.defaultBaseUrl||"默认服务地址",value:y,onChange:U=>B(U.target.value),className:"font-mono text-xs"}),m.jsx(ft,{autoComplete:"off","data-lpignore":"true","data-1p-ignore":!0,"aria-label":`${e.name} Proxy URL 输入`,placeholder:"http://127.0.0.1:7890",value:Z,onChange:U=>D(U.target.value),className:"font-mono text-xs"})]}):null,ee?m.jsx("p",{className:"text-xs text-destructive",children:ee}):null,m.jsxs("div",{className:"flex flex-wrap gap-2",children:[m.jsx(Me,{size:"sm","aria-label":K==="create"?`保存 ${e.name} API Key`:"保存凭证",disabled:u||c||K==="create"&&!F.trim(),onClick:le,children:K==="create"?"保存 API Key":"保存凭证"}),m.jsx(Me,{variant:"ghost",size:"sm",onClick:Q,children:"取消"}),K==="create"?m.jsx(Me,{variant:"ghost",size:"sm",onClick:()=>ae(U=>!U),children:fe?"收起高级设置":"高级设置"}):null]})]}):null,ue?m.jsxs("div",{className:"space-y-2",children:[m.jsxs("div",{className:"flex items-center justify-between",children:[m.jsx("span",{className:"text-sm font-medium",children:"API Key"}),e.apiKeyUrl?m.jsx("a",{href:e.apiKeyUrl,target:"_blank",rel:"noreferrer",className:"text-xs text-primary hover:underline",children:"获取 API Key"}):null]}),m.jsxs("div",{className:"group relative",children:[m.jsx(ft,{type:C?"text":"password",autoComplete:"new-password","data-lpignore":"true","data-1p-ignore":!0,"aria-label":`${e.name} API Key 输入`,placeholder:e.apiKeyPlaceholder||"从官方控制台复制 API Key",value:a,onChange:U=>g(U.target.value),className:"border-border/60 bg-muted/20 pr-10 font-mono transition-colors focus:border-primary/50 focus:bg-background"}),m.jsx("div",{className:"absolute bottom-1 right-1 top-1 flex items-center",children:m.jsx(Me,{variant:"ghost",size:"icon",className:"h-full w-8 rounded hover:bg-muted",onClick:()=>M(U=>!U),"aria-label":C?"隐藏 API Key":"显示 API Key",children:C?m.jsx(tg,{className:"h-4 w-4 text-muted-foreground"}):m.jsx(ng,{className:"h-4 w-4 text-muted-foreground"})})})]}),A?m.jsxs("div",{className:"space-y-1.5",children:[m.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Base URL(选填)"}),m.jsx(ft,{autoComplete:"off","data-lpignore":"true","data-1p-ignore":!0,"aria-label":`${e.name} Base URL 输入`,placeholder:e.defaultBaseUrl||"默认服务地址",value:s,onChange:U=>A(U.target.value),className:"border-border/60 bg-muted/20 font-mono text-xs transition-colors focus:border-primary/50 focus:bg-background"}),m.jsxs("p",{className:"break-all font-mono text-[11px] text-muted-foreground opacity-80",children:[m.jsx("span",{className:"mr-1 select-none opacity-50",children:"预览:"}),(s.trim()||e.defaultBaseUrl||"").replace(/\/+$/,""),"/chat/completions"]})]}):null,m.jsx(Me,{size:"sm","aria-label":`保存 ${e.name} API Key`,disabled:!a.trim()||u||c,onClick:S,children:"保存 API Key"})]}):null,h?m.jsx("p",{className:"text-sm text-destructive",children:h}):null]})}function hs({credential:e,label:t,busy:r,disabled:n,beforeActions:i,onToggle:o,onTest:a,onEdit:s,onDelete:u,deleteAriaLabel:c}){const h=n||r,g=bm(e.health),A=`${e.enabled?"已启用":"已停用"} · ${ym(e.health)}`;return m.jsxs("div",{"data-credential-state":e.enabled?"enabled":"disabled",className:Je("flex items-center gap-3 rounded-lg border p-3 transition-colors",e.enabled?g.row:"border-border/50 bg-muted/40 opacity-70"),children:[m.jsxs(vo,{children:[m.jsx(So,{asChild:!0,children:m.jsx("span",{"aria-label":A,className:Je("h-2 w-2 shrink-0 rounded-full",e.enabled?g.dot:"bg-muted-foreground/40")})}),m.jsx(bi,{className:"text-xs",children:A})]}),m.jsxs("div",{className:"min-w-0 flex-1",children:[m.jsx("p",{className:"truncate text-sm font-medium text-foreground",children:t}),e.maskedHint?m.jsx("p",{className:"mt-1 truncate font-mono text-xs text-muted-foreground",children:e.maskedHint}):null]}),m.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[i,a?m.jsx(Bi,{label:`测试连接 ${t}`,disabled:h,onClick:()=>a(e),children:m.jsx(wg,{"aria-hidden":"true",className:"h-3.5 w-3.5"})}):null,s?m.jsx(Bi,{label:`编辑 ${t}`,disabled:h,onClick:s,children:m.jsx(Df,{"aria-hidden":"true",className:"h-3.5 w-3.5"})}):null,o?m.jsx(Bi,{label:`${e.enabled?"停用":"启用"} ${t}`,disabled:h,onClick:()=>o(e,{enabled:!e.enabled}),children:e.enabled?m.jsx(hg,{"aria-hidden":"true",className:"h-3.5 w-3.5"}):m.jsx(Nf,{"aria-hidden":"true",className:"h-3.5 w-3.5"})}):null,u?m.jsx(Bi,{label:c??`删除 ${t}`,disabled:h,onClick:u,children:m.jsx(Vs,{"aria-hidden":"true",className:"h-3.5 w-3.5"})}):null]})]})}function Bi({label:e,disabled:t,onClick:r,children:n}){return m.jsxs(vo,{children:[m.jsx(So,{asChild:!0,children:m.jsx(Me,{variant:"ghost",size:"icon",className:"h-7 w-7","aria-label":e,disabled:t,onClick:r,children:n})}),m.jsx(bi,{className:"text-xs",children:e})]})}function ym(e){return e==="healthy"?"有效":e==="unknown"?"未验证":e==="expired"?"已过期":"错误"}function bm(e){return e==="healthy"?{row:"border-emerald-500/40 bg-emerald-500/5",dot:"bg-emerald-500"}:e==="unknown"?{row:"border-border/50 bg-background",dot:"bg-muted-foreground/50"}:{row:"border-destructive/40 bg-destructive/5",dot:"bg-destructive"}}function gm(e,t){const r=e.authModes??[];return r.some(n=>n==="oauth"||n==="deviceCode")?"deviceCodeOAuth":r.some(n=>n==="apiKey"||n==="local")||t.browserMode==="connectUnsupported"?"browserAssistedApiKey":t.browserMode}function mm(e){return e?.status==="pending"||e?.status==="authorization_pending"||e?.status==="slow_down"}function wm(e){return e.length===0?10:Math.max(...e.map(t=>t.priority))+10}function zr(e){return e.label?.trim()?e.label:e.maskedHint?`API Key · ${e.maskedHint}`:e.authMode==="oauth"||e.authMode==="deviceCode"?"已授权账号":"API Key"}function ps(e){const t=e.indexOf("@");if(t>0){const r=e.slice(0,t);return`${r.length>1?`${r[0]}***${r[r.length-1]}`:`${r[0]}***`}${e.slice(t)}`}return e.length<=2?`${e[0]??""}***`:`${e[0]}***${e[e.length-1]}`}function _m({definition:e,product:t,status:r,accountLabel:n,attempt:i,attemptOfferingId:o,apiKey:a,baseUrl:s="",busy:u,disabled:c=!1,error:h,quotas:g,models:A,verifyPending:I=!1,onApiKeyChange:k,onBaseUrlChange:S,onBeginApiKey:_,onBeginOffering:R,onBeginBrowser:E,onSaveApiKey:v,onDisconnect:V,onCreateApiKeyCredential:G,onCreateLocalCredential:ue,onUpdateCredential:ce,onDeleteCredential:z,onTestCredential:se,onReorderCredentials:C,onRefreshQuota:M,onVerify:K,onAddModel:x,onEditModel:$,onDeleteModel:J,selectedModelIds:re,onModelSelectionChange:de,onDismissError:F}){const ne=r==="configured",y=r==="connected",B=A.length===0&&h?.message&&!h.offeringId?h.message:void 0,[Z,D]=te.useState(""),[ee,ie]=te.useState(),[fe,ae]=te.useState(re??[]),P=re??fe,N=te.useMemo(()=>new Map(t?.offerings.map(b=>[b.id,{id:b.id,label:uo(b)}])??[]),[t?.offerings]),Q=te.useMemo(()=>{const b=Z.trim().toLocaleLowerCase();return b?A.filter(T=>Sm(T,N).includes(b)):A},[A,Z,N]),le=Q.filter(b=>b.availability!=="unavailable"),U=le.filter(b=>P.includes(Yo(b))).length,l=le.length>0&&U===le.length,d=U>0&&!l,w=A.filter(b=>b.availability==="unavailable").length,j=async b=>{try{await navigator.clipboard.writeText(b),ie(b),setTimeout(()=>ie(T=>T===b?void 0:T),1500)}catch{ie(void 0)}},q=b=>{const T=new Set(P);T.has(b)?T.delete(b):T.add(b);const H=[...T];re===void 0&&ae(H),de?.(e.id,H)},W=()=>{const b=new Set(P);for(const H of le){const L=Yo(H);l?b.delete(L):b.add(L)}const T=[...b];re===void 0&&ae(T),de?.(e.id,T)};return m.jsx(Xd,{children:m.jsxs("div",{className:"space-y-8",children:[m.jsxs("header",{className:"flex items-start justify-between gap-4",children:[m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsxs(Sd,{className:"h-9 w-9 shrink-0 rounded-lg border border-border/50 bg-muted/50 shadow-sm",style:lo(e.id)?{backgroundColor:lo(e.id)}:void 0,children:[m.jsx(Ed,{src:Ff(e.id),className:"object-cover"}),m.jsx(xd,{className:"rounded-lg bg-transparent text-sm font-bold uppercase text-muted-foreground",children:vm(e.id)})]}),m.jsxs("div",{className:"flex flex-col justify-center gap-0.5",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("h2",{className:"text-base font-semibold leading-none tracking-tight text-foreground",children:e.name}),m.jsxs(vo,{children:[m.jsx(So,{asChild:!0,children:m.jsx("button",{type:"button","aria-label":"提供商说明",className:"cursor-help rounded-sm text-muted-foreground/50 focus:outline-none focus-visible:text-foreground",children:m.jsx(sg,{"aria-hidden":"true",className:"h-3.5 w-3.5"})})}),m.jsx(bi,{className:"max-w-xs text-xs",children:e.description})]})]}),m.jsxs("a",{href:e.homeUrl,target:"_blank",rel:"noreferrer",className:"flex items-center gap-0.5 text-[10px] leading-none text-muted-foreground transition-colors hover:text-primary",children:["访问官网 ",m.jsx(Hs,{"aria-hidden":"true",className:"h-2.5 w-2.5"})]})]})]}),m.jsx(Jn,{variant:y||ne?"default":"secondary",children:Em(r)})]}),m.jsx(am,{definition:e,product:t,status:r,accountLabel:n,attempt:i,attemptOfferingId:o,apiKey:a,baseUrl:s,busy:u,disabled:c,error:h,suppressError:!!B,quotas:g,onApiKeyChange:k,onBaseUrlChange:S,onBeginApiKey:_,onBeginOffering:R,onBeginBrowser:E,onSaveApiKey:v,onDisconnect:V,onCreateApiKeyCredential:t?.offerings.length?G:void 0,onCreateLocalCredential:t?.offerings.length?ue:void 0,onUpdateCredential:ce,onDeleteCredential:z,onTestCredential:se,onReorderCredentials:C,onRefreshQuota:M,onDismissError:F}),m.jsxs("section",{className:"space-y-4",children:[m.jsxs("div",{"data-testid":"provider-models-header",className:"flex flex-col gap-3 border-b border-border/40 pb-4 sm:flex-row sm:items-center sm:justify-between",children:[m.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1",children:[m.jsx(ao,{className:"h-4 w-4 shrink-0 text-primary"}),m.jsx("h3",{className:"shrink-0 text-sm font-medium text-foreground/90",children:"可用模型"}),m.jsxs("span",{className:"text-xs text-muted-foreground",children:["共 ",A.length," · 已加入 ",P.length," · 已失效 ",w]})]}),m.jsxs("div",{"data-testid":"provider-models-actions",className:"flex w-full flex-wrap items-center gap-2 sm:w-auto sm:flex-nowrap sm:justify-end",children:[(ne||y)&&(K||x)?m.jsxs(m.Fragment,{children:[x?m.jsxs(Me,{variant:"outline",size:"sm",className:"h-8 gap-1.5 text-xs",disabled:c||u,onClick:x,children:[m.jsx(Ro,{"aria-hidden":"true",className:"h-3.5 w-3.5"}),"添加模型"]}):null,K&&A.length>0?m.jsxs(Me,{variant:"outline",size:"sm",className:"h-8 gap-1.5 text-xs",disabled:c||u||I,onClick:K,children:[I?m.jsx(br,{"aria-hidden":"true",className:"h-3.5 w-3.5 animate-spin"}):m.jsx(fs,{"aria-hidden":"true",className:"h-3.5 w-3.5"}),I?"同步中...":"刷新模型"]}):K?m.jsxs(Me,{variant:"outline",size:"sm",className:"h-8 gap-1.5 text-xs",disabled:c||u||I,onClick:K,children:[I?m.jsx(br,{"aria-hidden":"true",className:"h-3.5 w-3.5 animate-spin"}):m.jsx(fs,{"aria-hidden":"true",className:"h-3.5 w-3.5"}),I?"同步中...":"同步模型"]}):null]}):null,m.jsxs("div",{className:"relative w-full sm:w-auto",children:[m.jsx(jf,{className:"absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground"}),m.jsx(ft,{value:Z,onChange:b=>D(b.target.value),placeholder:"搜索模型...",className:"h-8 w-full bg-background pl-8 text-xs sm:w-[232px]",autoComplete:"off","data-lpignore":"true","data-1p-ignore":!0})]})]})]}),A.length===0?m.jsx("div",{className:"rounded-lg border border-dashed border-border/50 bg-muted/5 py-12 text-center text-sm text-muted-foreground",children:B?m.jsx("p",{className:"text-destructive",children:B}):"暂无可用模型"}):Q.length===0?m.jsx("div",{className:"rounded-lg border border-dashed border-border/50 bg-muted/5 py-12 text-center text-sm text-muted-foreground",children:"未找到匹配的模型"}):m.jsxs("div",{className:"grid gap-2",children:[m.jsx("div",{className:"flex items-center justify-between px-1 py-1",children:m.jsxs("button",{type:"button",role:"checkbox","aria-label":"全选当前结果","aria-checked":d?"mixed":l,disabled:c||u||le.length===0,onClick:W,className:"flex items-center gap-2 text-xs text-muted-foreground disabled:opacity-50",children:[m.jsx("span",{className:Je("flex h-4 w-4 items-center justify-center rounded border",l||d?"border-primary bg-primary text-primary-foreground":"border-border"),children:d?m.jsx("span",{"aria-hidden":"true",children:"−"}):m.jsx(Vo,{"aria-hidden":"true",className:Je("h-3 w-3",!l&&"invisible")})}),"全选当前结果"]})}),Q.map(b=>{const T=Yo(b),H=P.includes(T),L=b.availability==="unavailable",ge=b.displayName??b.id,Se=Wf(b,N),me=[...(b.inputModalities??[]).filter(xe=>xe!=="text"),...b.capabilities??[]];return m.jsxs("div",{className:Je("group flex items-center gap-3 rounded-lg border bg-card p-3 transition-all duration-200 hover:border-border/60 hover:bg-accent/30",H?"border-primary/40 bg-primary/[0.03]":"border-border/40",L&&"opacity-75"),children:[m.jsx("button",{type:"button",role:"checkbox","aria-checked":H,"aria-label":`${H?"取消选择":"选择"} ${ge}`,className:Je("flex h-5 w-5 shrink-0 items-center justify-center rounded border transition-colors focus:outline-none focus-visible:border-ring",H?"border-primary bg-primary text-primary-foreground":"border-border text-transparent hover:border-primary/60"),disabled:c||u||L&&!H,onClick:()=>q(T),children:m.jsx(Vo,{"aria-hidden":"true",className:"h-3.5 w-3.5"})}),m.jsx("div",{className:"shrink-0 rounded bg-muted/50 p-2 text-muted-foreground transition-colors group-hover:text-primary",children:m.jsx(ao,{className:"h-4 w-4"})}),m.jsxs("div",{className:"min-w-0 flex-1",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("span",{className:"truncate text-sm font-medium text-foreground/90",children:ge}),m.jsx("div",{className:"flex items-center gap-1",children:me.map(xe=>m.jsx(Am,{type:xe},xe))}),Se?m.jsx(Jn,{variant:"outline",className:"shrink-0 text-[10px] font-normal","aria-label":`模型来源:${Se.label}`,title:Se.id,children:Se.label}):null,b.custom?m.jsx(Jn,{variant:"outline",className:"shrink-0 text-[10px] font-normal",children:"手工"}):null,L?m.jsx(Jn,{variant:"destructive",className:"shrink-0 text-[10px] font-normal",children:"已失效"}):null]}),b.displayName?m.jsxs("div",{className:"mt-0.5 flex items-center gap-1.5",children:[m.jsx("code",{className:"max-w-[300px] truncate font-mono text-[10px] text-muted-foreground opacity-70",children:b.id}),m.jsx("button",{type:"button",onClick:()=>{j(b.id)},className:"rounded p-0.5 text-muted-foreground opacity-0 transition-opacity hover:bg-muted hover:text-foreground group-hover:opacity-100 group-focus-within:opacity-100 focus:opacity-100","aria-label":`复制 ${b.displayName} ID`,title:"复制 ID",children:ee===b.id?m.jsx(Vo,{"aria-hidden":"true",className:"h-3 w-3 text-primary"}):m.jsx(Tf,{"aria-hidden":"true",className:"h-3 w-3"})})]}):null]}),b.custom&&($||J)?m.jsxs("div",{className:"flex shrink-0 items-center gap-1 opacity-0 transition-opacity group-hover:opacity-100 group-focus-within:opacity-100 focus-within:opacity-100",children:[$?m.jsx(Me,{variant:"ghost",size:"icon",className:"h-7 w-7","aria-label":`编辑 ${b.displayName??b.id}`,onClick:()=>$(b),children:m.jsx(Df,{"aria-hidden":"true",className:"h-3.5 w-3.5 text-muted-foreground"})}):null,J?m.jsx(Me,{variant:"ghost",size:"icon",className:"h-7 w-7","aria-label":`删除 ${b.displayName??b.id}`,onClick:()=>J(b),children:m.jsx(Vs,{"aria-hidden":"true",className:"h-3.5 w-3.5 text-muted-foreground"})}):null]}):null]},T)})]})]})]})})}function Am({type:e}){const t={image:{icon:kf,label:"视觉识别",className:"text-green-500"},web:{icon:Of,label:"联网搜索",className:"text-blue-500"},tool_call:{icon:ao,label:"函数调用",className:"text-orange-500"},reasoning:{icon:Pf,label:"推理",className:"text-purple-500"}}[e];if(!t)return null;const r=t.icon;return m.jsxs(vo,{children:[m.jsx(So,{asChild:!0,children:m.jsx("button",{type:"button","aria-label":t.label,className:"flex cursor-help items-center justify-center rounded-sm opacity-80 transition-opacity hover:opacity-100 focus:outline-none focus-visible:opacity-100",children:m.jsx(r,{"aria-hidden":"true",className:Je("h-3.5 w-3.5",t.className)})})}),m.jsx(bi,{children:t.label})]})}function vm(e){switch(e){case"openai":return"OA";case"anthropic":return"A";case"kimi":return"K";case"bailian":return"百";case"deepseek":return"DS";case"zhipu":return"智";case"ollama":return"O";case"custom":return"C"}}function Yo(e){return e.resourceId??(e.offeringId?`${e.offeringId}:${e.id}`:e.id)}function Sm(e,t){const r=Wf(e,t);return[e.id,e.displayName,r?.label,r?.id].filter(Boolean).join(`
3
- `).toLocaleLowerCase()}function Wf(e,t){if(e.offeringId)return t.get(e.offeringId)??{id:e.offeringId,label:e.offeringId}}function Em(e){switch(e){case"pending":return"连接中";case"configured":return"已配置";case"connected":return"已连接";case"disconnected":return"未设置";case"reauthRequired":return"需要重新登录";case"failed":return"连接失败";default:return"未检查"}}const xm=[{id:"image",label:"视觉识别",icon:kf}],Im=[{id:"tool_call",label:"函数调用",icon:ao},{id:"reasoning",label:"推理",icon:Pf},{id:"web",label:"联网搜索",icon:Of}];function Rm({open:e,providerName:t,initialValue:r,error:n,saving:i=!1,onOpenChange:o,onSave:a}){const s=!!r,[u,c]=te.useState(""),[h,g]=te.useState(""),[A,I]=te.useState([]),[k,S]=te.useState([]);te.useEffect(()=>{e&&(c(r?.id??""),g(r?.name??""),I(r?.inputModalities??[]),S(r?.capabilities??[]))},[r,e]);const _=u.trim(),R=!!_&&!i,E=(V,G,ue)=>{G(V.includes(ue)?V.filter(ce=>ce!==ue):[...V,ue])},v=(V,G,ue)=>{const ce=G.includes(V.id),z=V.icon;return m.jsxs("button",{type:"button","aria-pressed":ce,disabled:i,onClick:()=>E(G,ue,V.id),className:Je("flex items-center gap-1.5 rounded-md border px-2.5 py-1.5 text-xs transition-colors",ce?"border-primary/50 bg-primary/10 text-primary":"border-border/60 text-muted-foreground hover:border-border hover:text-foreground"),children:[m.jsx(z,{"aria-hidden":"true",className:"h-3.5 w-3.5"}),V.label]},V.id)};return m.jsx(qd,{open:e,onOpenChange:o,children:m.jsxs(ks,{className:"max-w-md",children:[m.jsx(Ds,{children:m.jsxs(js,{children:[s?"编辑模型":"添加模型"," · ",t]})}),m.jsxs("div",{className:"flex flex-col gap-4 py-2",children:[m.jsxs("div",{className:"flex flex-col gap-2",children:[m.jsx(rr,{htmlFor:"ai-model-id",children:"模型 ID"}),m.jsx(ft,{id:"ai-model-id",value:u,disabled:s||i,placeholder:"例如 gpt-4o-mini",onChange:V=>c(V.target.value)})]}),m.jsxs("div",{className:"flex flex-col gap-2",children:[m.jsx(rr,{htmlFor:"ai-model-name",children:"显示名称"}),m.jsx(ft,{id:"ai-model-name",value:h,disabled:i,placeholder:"留空则使用模型 ID",onChange:V=>g(V.target.value)})]}),m.jsxs("div",{className:"flex flex-col gap-2",children:[m.jsx(rr,{children:"输入模态"}),m.jsx("div",{className:"flex flex-wrap gap-2",children:xm.map(V=>v(V,A,I))})]}),m.jsxs("div",{className:"flex flex-col gap-2",children:[m.jsx(rr,{children:"能力标记"}),m.jsx("div",{className:"flex flex-wrap gap-2",children:Im.map(V=>v(V,k,S))})]}),n?m.jsx("p",{className:"text-xs text-destructive",role:"alert",children:n}):null]}),m.jsxs(Ns,{children:[m.jsx(Me,{variant:"outline",disabled:i,onClick:()=>o(!1),children:"取消"}),m.jsx(Me,{disabled:!R,onClick:()=>a({id:_,name:h.trim(),inputModalities:A,capabilities:k}),children:i?"保存中...":"保存"})]})]})})}const zf=["codex","claude-code","pi","codebuddy"],Mn={codex:"Codex","claude-code":"Claude Code",pi:"Pi",codebuddy:"CodeBuddy"};function Cm({client:e,className:t="h-4 w-4"}){switch(e){case"claude-code":return m.jsx(Vb,{className:t,"aria-hidden":"true"});case"pi":return m.jsx(bg,{className:t,"aria-hidden":"true"});case"codebuddy":return m.jsx(Xb,{className:t,"aria-hidden":"true"});default:return m.jsx(Cg,{className:t,"aria-hidden":"true"})}}function Mm(e,t,r){const n=r??"<粘贴 Xpod API Key>",i=t.trim().replace(/\/+$/,""),o=i.endsWith("/v1")?i:`${i}/v1`,a=i.replace(/\/v1$/,"");switch(e){case"codex":return["# ~/.codex/config.toml",'model_provider = "xpod"',"","[model_providers.xpod]",'name = "Xpod AI Connection"',`base_url = ${JSON.stringify(o)}`,'wire_api = "responses"',"requires_openai_auth = true","","# ~/.codex/auth.json(合并到现有 JSON)",JSON.stringify({OPENAI_API_KEY:n},null,2)].join(`
4
- `);case"claude-code":return["# ~/.claude/settings.json(合并 env 到现有 JSON)",JSON.stringify({env:{ANTHROPIC_BASE_URL:a,ANTHROPIC_AUTH_TOKEN:n}},null,2)].join(`
5
- `);case"pi":return["# ~/.pi/agent/settings.json(合并到现有 JSON,并将 <model-id> 替换为实际模型)",JSON.stringify({defaultProvider:"xpod",defaultModel:"<model-id>"},null,2),"","# ~/.pi/agent/models.json(合并 providers.xpod 到现有 JSON)",JSON.stringify({providers:{xpod:{baseUrl:o,apiKey:n,authHeader:!0,api:"openai-responses",models:[{id:"<model-id>",name:"<model-id>"}]}}},null,2)].join(`
6
- `);case"codebuddy":return["# ~/.codebuddy/settings.json(合并 env 到现有 JSON)",JSON.stringify({env:{CODEBUDDY_BASE_URL:o,CODEBUDDY_API_KEY:n}},null,2)].join(`
7
- `)}}const iu="我的 API Key";function Pm({client:e,clientConfigurationBridge:t}){const[r,n]=te.useState([]),[i,o]=te.useState(!0),[a,s]=te.useState(iu),[u,c]=te.useState(""),[h,g]=te.useState(!1),[A,I]=te.useState(),[k,S]=te.useState(),[_,R]=te.useState();te.useEffect(()=>{let z=!0;return o(!0),R(void 0),e.listGatewayKeys().then(se=>{z&&n(se.filter(C=>!C.revokedAt))}).catch(se=>{z&&R(Pn(se))}).finally(()=>{z&&o(!1)}),()=>{z=!1}},[e]);const E=async(z,se=u)=>{const C=se?Mm(se,e.apiBase,z):Tm(e.apiBase,z);if(!navigator.clipboard?.writeText)throw new Error("当前浏览器无法访问剪贴板,请从下方复制新创建的 API Key。");await navigator.clipboard.writeText(C)},v=async(z,se)=>{if(!t){await E(z,se);return}const C=await t.plan({client:se,endpoint:e.apiBase});if(C.confirmation?.required)throw await E(z,se),new Error(`${Mn[se]} 需要确认后才能写入;配置已复制。`);await t.apply({client:se,planId:C.planId,apiKey:z});const M=await t.verify({client:se,planId:C.planId});if(M.status!=="configured")throw new Error(M.message??`${Mn[se]} 配置验证失败。`)},V=async()=>{const z=a.trim();if(!z){R("请填写 API Key 名称。");return}g(!0),R(void 0),S(void 0);try{const se=await e.createGatewayKey({name:z,...u?{appliedClient:u}:{}});n(C=>[se.record,...C.filter(M=>M.id!==se.record.id)]),S(se.plaintext),s(iu),u?await v(se.plaintext,u):await E(se.plaintext)}catch(se){R(Pn(se))}finally{g(!1)}},G=async(z,se)=>{I(z.id),R(void 0);try{const C=await e.updateGatewayKey(z.id,{enabled:se});n(M=>M.map(K=>K.id===z.id?C:K))}catch(C){R(Pn(C))}finally{I(void 0)}},ue=async z=>{I(z.id),R(void 0);try{const se=await e.revealGatewayKey(z.id),C=ou(z.appliedClients?.[0])??u;await E(se,C)}catch(se){R(Pn(se))}finally{I(void 0)}},ce=async z=>{I(z.id),R(void 0);try{await e.deleteGatewayKey(z.id),n(se=>se.filter(C=>C.id!==z.id))}catch(se){R(Pn(se))}finally{I(void 0)}};return m.jsxs("section",{className:"space-y-6","aria-label":"API Keys",children:[m.jsx("p",{className:"max-w-3xl text-sm text-muted-foreground",children:"API Key 用于访问 Xpod Gateway。Provider 密钥不会写入客户端;客户端只获得 Xpod 地址和这里创建的 Key。"}),m.jsxs("div",{className:"rounded-xl border border-border/70 p-4",children:[m.jsxs("div",{className:"grid gap-3 lg:grid-cols-[minmax(14rem,1fr)_minmax(12rem,20rem)_auto] lg:items-end",children:[m.jsxs("label",{className:"space-y-1.5",children:[m.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"名称"}),m.jsx(ft,{"aria-label":"API Key 名称",value:a,onChange:z=>s(z.target.value)})]}),m.jsxs("label",{className:"space-y-1.5",children:[m.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"应用到(可选)"}),m.jsxs("select",{"aria-label":"应用到客户端",value:u,onChange:z=>c(z.target.value),className:"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm outline-none focus-visible:border-ring",children:[m.jsx("option",{value:"",children:"仅复制通用配置"}),zf.map(z=>m.jsx("option",{value:z,children:Mn[z]},z))]})]}),m.jsxs(Me,{"aria-label":"创建 API Key",className:"w-full whitespace-nowrap lg:w-auto",disabled:h||!a.trim(),onClick:()=>{V()},children:[h?m.jsx(br,{className:"mr-2 h-4 w-4 animate-spin"}):m.jsx(so,{className:"mr-2 h-4 w-4"}),u&&t?"创建并应用配置":"创建并复制配置"]})]}),u&&!t?m.jsxs("p",{className:"mt-3 text-xs text-muted-foreground",children:["当前 Web 环境不支持自动写入,将复制 ",Mn[u]," 配置。"]}):null]}),k?m.jsxs("div",{"aria-label":"新创建的 API Key",className:"rounded-lg border border-primary/25 bg-primary/5 p-4",children:[m.jsx("p",{className:"text-sm font-medium",children:"API Key 已创建,配置已复制"}),m.jsx("code",{className:"mt-2 block overflow-x-auto text-xs text-muted-foreground",children:k})]}):null,_?m.jsx("p",{role:"alert",className:"rounded-md border border-destructive/30 px-3 py-2 text-sm text-destructive",children:_}):null,m.jsxs("div",{className:"space-y-2",children:[m.jsxs("div",{className:"flex items-center justify-between gap-3 border-b border-border/60 pb-2",children:[m.jsx("h2",{className:"text-sm font-medium",children:"已创建"}),m.jsxs("span",{className:"text-xs text-muted-foreground",children:[r.length," 个 API Key"]})]}),i?m.jsxs("div",{className:"flex items-center gap-2 py-6 text-sm text-muted-foreground",children:[m.jsx(br,{className:"h-4 w-4 animate-spin"}),"正在读取 API Keys"]}):r.length===0?m.jsx("p",{className:"py-8 text-center text-sm text-muted-foreground",children:"尚未创建 API Key。"}):m.jsx("div",{className:"overflow-hidden rounded-xl border border-border/70",children:r.map(z=>{const se=!!z.disabledAt,C=z.name||"未命名 API Key",M=A===z.id;return m.jsxs("div",{"data-key-state":se?"disabled":"active",className:Je("grid min-h-16 grid-cols-[minmax(0,1fr)_auto] items-center gap-4 border-b border-border/60 px-4 py-3 last:border-b-0 md:grid-cols-[minmax(0,1.4fr)_minmax(10rem,.8fr)_auto]",se?"bg-muted/30 text-muted-foreground":"bg-emerald-500/[0.035]"),children:[m.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[m.jsx("span",{className:"truncate text-sm font-medium",children:C}),m.jsx("code",{className:"shrink-0 text-xs text-muted-foreground",children:z.maskedHint??Om(z.id)}),m.jsx(Jn,{variant:"secondary",children:se?"已停用":"已启用"})]}),m.jsx("div",{className:"hidden min-w-0 text-xs text-muted-foreground md:block",children:z.lastUsedAt?`最后使用 ${km(z.lastUsedAt)}`:"暂无调用记录 · 尚未使用"}),m.jsxs("div",{className:"flex items-center justify-end gap-1",children:[(z.appliedClients??[]).map(ou).filter(Dm).map(K=>m.jsx("span",{title:Mn[K],className:"flex h-8 w-8 items-center justify-center text-muted-foreground",children:m.jsx(Cm,{client:K})},K)),m.jsx(Me,{variant:"ghost",size:"icon","aria-label":`${se?"启用":"停用"} ${C}`,title:`${se?"启用":"停用"} ${C}`,disabled:M,onClick:()=>{G(z,se)},children:se?m.jsx(Nf,{className:"h-4 w-4"}):m.jsx(Pg,{className:"h-4 w-4"})}),m.jsx(Me,{variant:"ghost",size:"icon","aria-label":`复制 ${C} 配置`,title:`复制 ${C} 配置`,disabled:M,onClick:()=>{ue(z)},children:m.jsx(Tf,{className:"h-4 w-4"})}),m.jsx(Me,{variant:"ghost",size:"icon","aria-label":`删除 ${C}`,title:`删除 ${C}`,disabled:M,onClick:()=>{ce(z)},children:m.jsx(Vs,{className:"h-4 w-4"})})]})]},z.id)})})]})]})}function ou(e){return e&&zf.includes(e)?e:void 0}function Tm(e,t){return[`XPOD_BASE_URL=${e.replace(/\/+$/u,"")}/v1`,`XPOD_API_KEY=${t}`].join(`
8
- `)}function Om(e){return`••••••••${e.slice(-8)}`}function km(e){const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString()}function Pn(e){return e instanceof Error&&e.message?e.message:"API Key 操作失败,请重试。"}function Dm(e){return e!==void 0}const Nm={};function jm({client:e,openExternal:t=Wm,clientConfigurationBridge:r,selectedSection:n="provider",selectedProvider:i,selectedCredentialId:o,providerSummaries:a=Nm,providerProducts:s={},providerLoadError:u,onProviderStateChange:c,onModelSelectionChange:h}){const[g,A]=te.useState({}),[I,k]=te.useState([]),[S,_]=te.useState({}),[R,E]=te.useState({}),[v,V]=te.useState({}),[G,ue]=te.useState({}),[ce,z]=te.useState({}),[se,C]=te.useState({}),[M,K]=te.useState({}),[x,$]=te.useState({}),[J,re]=te.useState({}),[de,F]=te.useState(),[ne,y]=te.useState(),[B,Z]=te.useState(!1),[D,ee]=te.useState({}),ie=te.useRef(0),fe=te.useRef({}),ae={...s,...D},P=te.useCallback((O,he)=>{A(be=>({...be,[O]:he})),c?.(O,Bm(he))},[c]);te.useEffect(()=>{A(Object.fromEntries(Object.values(a).filter(du).map(O=>[O.provider,O.status==="connected"&&O.authMode==="browserAssistedApiKey"?"configured":O.status]))),z(Object.fromEntries(Object.values(a).filter(du).map(O=>[O.provider,O.baseUrl??""])))},[a]),te.useEffect(()=>{_(O=>{const he={...O};let be=!1;for(const[ye,pe]of Object.entries(s)){if(!pe)continue;const _e=pe.selectedModels.map(hr),We=O[ye];(!We||We.join("\0")!==_e.join("\0"))&&(he[ye]=_e,be=!0)}return be?he:O})},[s]),te.useEffect(()=>{let O=!0;return e.listModels().then(he=>{O&&k(he)}).catch(()=>{}),()=>{O=!1,ie.current+=1}},[e]);const N=(O,he)=>{C(be=>({...be,[O]:he}))},Q=(O,he,be)=>{K(ye=>({...ye,[O]:he?{message:he,offeringId:be}:void 0}))},le=te.useCallback(async O=>{const he=O.verificationUriComplete??O.authorizationUrl??O.verificationUri;he&&await t(he)},[t]),U=async O=>{N(O,!0),Q(O),V(he=>({...he,[O]:void 0}));try{const he=await e.beginConnect(O,"browserAssistedApiKey");E(ye=>({...ye,[O]:he}));const be=ys(he.status);if(P(O,be?"pending":he.status==="completed"?"configured":"failed"),!be&&he.status!=="completed"){Q(O,he.message??au(he.status));return}await le(he)}catch(he){P(O,"failed"),Q(O,it(he))}finally{N(O,!1)}},l=async O=>{if(O.browserMode!=="connectUnsupported"){if(O.browserMode==="browserAssistedApiKey"){await U(O.id);return}await w(O.id,O.browserMode)}},d=async(O,he,be)=>{if(be==="browserAssistedApiKey"){await U(O);return}await w(O,be,he.id)},w=async(O,he,be)=>{if(he==="connectUnsupported")return;N(O,!0),Q(O),V(pe=>({...pe,[O]:be}));const ye=ie.current+1;ie.current=ye;try{const pe=await e.beginConnect(O,he);if(E(_e=>({..._e,[O]:pe})),!ys(pe.status)){const _e=pe.status==="completed";P(O,_e?"connected":"failed"),_e||Q(O,pe.status==="unsupported"?"当前部署未启用账号授权":pe.message??au(pe.status),be),N(O,!1);return}P(O,"pending"),await le(pe),Um(e,O,pe,ye,ie,{onAttempt:_e=>E(We=>({...We,[O]:_e})),onConnected:()=>P(O,"connected"),onFailed:_e=>{P(O,"failed"),Q(O,_e,be)},onFinished:()=>N(O,!1)})}catch(pe){P(O,"failed"),Q(O,it(pe),be),N(O,!1)}},j=async O=>{const he=G[O.id]?.trim(),be=ce[O.id]??a[O.id]?.baseUrl??"",ye=R[O.id];if(!(!he||!ye)){N(O.id,!0),Q(O.id);try{const pe=await e.completeApiKey(O.id,ye,he,void 0,be.trim());E(_e=>({..._e,[O.id]:pe})),ue(_e=>({..._e,[O.id]:""})),P(O.id,"configured"),Rt({description:"API Key 已保存"})}catch(pe){Q(O.id,it(pe)),P(O.id,"failed")}finally{N(O.id,!1)}}},q=async(O,he)=>{const be=he?ae[O]?.credentials.find(ye=>ye.id===he)?.offeringId:void 0;N(O,!0),Q(O);try{await e.disconnect(O,he),E(ye=>({...ye,[O]:void 0})),V(ye=>({...ye,[O]:void 0})),$(ye=>({...ye,[O]:be?{...ye[O],[be]:void 0}:void 0})),he?(ee(ye=>({...ye,[O]:lu(ae[O],O,he)})),Rt({description:"已从当前 Pod 移除账号"})):(P(O,"disconnected"),Rt({description:"已断开连接"}))}catch(ye){Q(O,it(ye),be)}finally{N(O,!1)}},W=(O,he)=>{ee(be=>({...be,[O]:su(ae[O],O,he)})),P(O,he.authMode==="apiKey"||he.authMode==="local"?"configured":"connected")},b=async(O,he,be=!1)=>{re(ye=>({...ye,[O]:!0})),Q(O);try{const ye=he?await e.discoverModels(O,he):await e.discoverModels(O),pe=ae[O]?.selectedModels??[],_e=Hm(O,he);try{const Ue=(await e.listModels()).filter(Ze=>Ze.provider===O);k(Ze=>{const Dt=Xo(Ze,O,Ue,_e),Nt=Xo(Dt,O,ye.models,_e);return cu(Nt,O,pe,ye.models,_e)})}catch{k(We=>cu(Xo(We,O,ye.models,_e),O,pe,ye.models,_e))}try{const Ue=(await e.listProviders()).find(Ze=>Ze.id===O);Ue&&ee(Ze=>({...Ze,[O]:Ue}))}catch{}return be&&Rt({variant:ye.models.length>0?"success":"default",description:ye.models.length>0?`连接成功,已同步 ${ye.models.length} 个模型`:"连接成功,但服务商未返回任何模型。请确认该服务支持 /models 接口,或使用「添加模型」手工录入。"}),!0}catch(ye){const pe=it(ye);return Q(O,pe,he?.offeringId),!1}finally{re(ye=>({...ye,[O]:!1}))}},T=async(O,he,be)=>{N(O,!0),Q(O);try{const ye=await e.createApiKeyCredential(O,{offeringId:he.id,apiKey:be.apiKey,label:be.label,baseUrl:be.baseUrl,proxyUrl:be.proxyUrl,priority:be.priority});W(O,ye),Rt({description:"API Key 已添加"}),await b(O,{offeringId:ye.offeringId,credentialId:ye.id})}catch(ye){const pe=it(ye);throw Q(O,pe,he.id),new Error(pe)}finally{N(O,!1)}},H=async(O,he)=>{N(O,!0),Q(O);try{const be=O==="openai"&&he.id==="official-subscription",ye=await e.createLocalCredential(O,{offeringId:he.id,label:be?"OpenAI Subscription":"Local Ollama",...be?{}:{baseUrl:he.endpoints?.[0]?.baseUrl},priority:10});W(O,ye),Rt({description:be?"本机 OpenAI 登录已导入":"本地 Ollama 已连接"}),he.modelDiscovery?.strategy!=="unsupported"&&await b(O,{offeringId:ye.offeringId,credentialId:ye.id})}catch(be){const ye=it(be);throw Q(O,ye,he.id),new Error(ye)}finally{N(O,!1)}},L=async(O,he,be)=>{N(O,!0),Q(O);try{const ye=await e.updateProviderCredential(O,he.id,{expectedVersion:he.version,...be});W(O,ye),Rt({description:"凭证已更新"}),ye.enabled&&await b(O,{offeringId:ye.offeringId,credentialId:ye.id})}catch(ye){const pe=it(ye);throw Q(O,pe,he.offeringId),new Error(pe)}finally{N(O,!1)}},ge=async(O,he)=>{N(O,!0),Q(O);try{await e.deleteProviderCredential(O,he.id),ee(be=>({...be,[O]:lu(ae[O],O,he.id)})),Rt({description:"凭证已删除"})}catch(be){Q(O,it(be),he.offeringId)}finally{N(O,!1)}},Se=async(O,he)=>{N(O,!0),Q(O);try{const be=await e.testProviderCredential(O,{credentialId:he.id}),ye=qm(be);ee(pe=>({...pe,[O]:ye?su(ae[O],O,ye):uu(ae[O],O,he.id,"healthy")})),Rt({variant:"success",description:"测试通过"})}catch(be){const ye=(await e.listProviders().catch(()=>[])).find(pe=>pe.id===O);ee(pe=>({...pe,[O]:ye??uu(ae[O],O,he.id,"invalid")})),Q(O,it(be),he.offeringId)}finally{N(O,!1)}},me=async(O,he,be,ye,pe)=>{if(pe<0||pe>=be.length)return;const _e=[...be],[We]=_e.splice(ye,1);if(We){_e.splice(pe,0,We),N(O,!0),Q(O);try{const Ue=[];for(const[Ze,Dt]of _e.entries()){const Nt=(Ze+1)*10;if(Dt.priority===Nt){Ue.push(Dt);continue}Ue.push(await e.updateProviderCredential(O,Dt.id,{expectedVersion:Dt.version,priority:Nt}))}ee(Ze=>({...Ze,[O]:Km(ae[O],O,he,Ue)})),Rt({description:"顺序已保存"})}catch(Ue){Q(O,it(Ue),he.id)}finally{N(O,!1)}}},xe=async(O,he,be)=>{const ye=pe=>{$(_e=>({..._e,[O]:{..._e[O],[he.id]:{busy:!1,..._e[O]?.[he.id],...pe}}}))};ye({busy:!0,error:void 0,credentialId:be?.id});try{const pe=await e.quota(O,!0,{offeringId:he.id,...be?{credentialId:be.id,credentialIri:be.id}:{}});ye({quota:pe,busy:!1,error:void 0,credentialId:be?.id})}catch(pe){ye({busy:!1,error:it(pe),credentialId:be?.id})}},Ee=async O=>{await b(O,O==="custom"&&o?{credentialId:o}:void 0,!0)},je=te.useCallback(async()=>{try{k(await e.listModels())}catch{}},[e]),Qe=(O,he)=>{y(void 0),F({provider:O,model:he})},Wt=async O=>{if(!de)return;const he=!!de.model;Z(!0),y(void 0);try{await e.saveProviderModel(de.provider,{id:O.id,displayName:O.name||void 0,inputModalities:O.inputModalities.length>0?O.inputModalities:void 0,capabilities:O.capabilities.length>0?O.capabilities:void 0}),F(void 0),Rt({description:he?"模型已更新":"模型已添加"}),await je()}catch(be){y(it(be))}finally{Z(!1)}},Oe=async(O,he)=>{Q(O);try{await e.deleteProviderModel(O,he.id),k(be=>be.filter(ye=>!(ye.provider===O&&ye.id===he.id))),Rt({description:"模型已移除"}),je()}catch(be){Q(O,it(be))}},An=te.useCallback((O,he)=>{const be=[...new Set(he)],ye=S[O]??ae[O]?.selectedModels.map(hr)??[],pe=(fe.current[O]??0)+1;fe.current[O]=pe,_(_e=>({..._e,[O]:be})),(async()=>{try{const _e=[...I.filter(Ue=>Ue.provider===O),...ae[O]?.selectedModels??[]],We=be.map(Ue=>{const Ze=_e.find(Dt=>hr(Dt)===Ue);return Ze?Qm(Ze):{id:Ue}});O==="custom"?await e.saveModelSelection?.(O,We,o):await e.saveModelSelection?.(O,We),fe.current[O]===pe&&h?.(O,be)}catch(_e){if(fe.current[O]!==pe)return;_(We=>({...We,[O]:ye})),h?.(O,ye),Rt({variant:"destructive",description:it(_e)})}})()},[e,ae,fe,I,h,o,S]),vn=m.jsxs("section",{children:[u?m.jsxs("p",{className:"mb-4 rounded-md border border-destructive/30 px-3 py-2 text-sm text-destructive",children:["Provider 状态读取失败:",u]}):null,dt.filter(O=>O.id===(i??"openai")).map(O=>{const he=ae[O.id],be=Vm(I.filter(pe=>pe.provider===O.id&&(O.id!=="custom"||!o||pe.credentialId===o)),he?.selectedModels??[]),ye=S[O.id]??he?.selectedModels.map(hr)??[];return m.jsx(_m,{definition:O,product:he,status:Lm(g[O.id],he),accountLabel:a[O.id]?.accountLabel,attempt:R[O.id],attemptOfferingId:v[O.id],apiKey:G[O.id]??"",baseUrl:ce[O.id]??a[O.id]?.baseUrl??"",busy:!!se[O.id],error:M[O.id],quotas:x[O.id],models:be,selectedModelIds:ye,onApiKeyChange:pe=>ue(_e=>({..._e,[O.id]:pe})),onBaseUrlChange:pe=>z(_e=>({..._e,[O.id]:pe})),onBeginApiKey:()=>{U(O.id)},onBeginOffering:(pe,_e)=>{d(O.id,pe,_e)},onBeginBrowser:()=>{l(O)},onSaveApiKey:()=>{j(O)},onDisconnect:pe=>{q(O.id,pe?.id)},onCreateApiKeyCredential:(pe,_e)=>T(O.id,pe,_e),onCreateLocalCredential:pe=>H(O.id,pe),onUpdateCredential:(pe,_e)=>L(O.id,pe,_e),onDeleteCredential:pe=>{ge(O.id,pe)},onTestCredential:pe=>{Se(O.id,pe)},onReorderCredentials:(pe,_e,We,Ue)=>{me(O.id,pe,_e,We,Ue)},onRefreshQuota:(pe,_e)=>{xe(O.id,pe,_e)},verifyPending:!!J[O.id],onVerify:()=>{Ee(O.id)},onAddModel:()=>Qe(O.id),onEditModel:pe=>Qe(O.id,pe),onDeleteModel:pe=>{Oe(O.id,pe)},onModelSelectionChange:An,onDismissError:()=>Q(O.id)},O.id)})]}),Cr=m.jsx(Pm,{client:e,clientConfigurationBridge:r});return m.jsxs("div",{"data-testid":"ai-connections-panel",className:"mx-auto w-full max-w-5xl space-y-10 px-4 py-6 sm:px-8 sm:py-8",children:[m.jsx(Sp,{}),n==="keys"?Cr:null,n==="provider"?vn:null,n==="provider"&&de?m.jsx(Rm,{open:!0,providerName:dt.find(O=>O.id===de.provider)?.name??de.provider,initialValue:de.model?{id:de.model.id,name:de.model.displayName??"",inputModalities:de.model.inputModalities??[],capabilities:de.model.capabilities??[]}:void 0,error:ne,saving:B,onOpenChange:O=>{O||F(void 0)},onSave:O=>{Wt(O)}}):null]})}function Fm(e){if(!e||e.status==="unconfigured"||e.status==="unavailable")return"disconnected";if(e.status==="configured")return"configured";if(e.status==="attention")return"reauthRequired";const t=e.credentials.find(r=>r.enabled)??e.credentials[0];return t?.authMode==="oauth"||t?.authMode==="deviceCode"?"connected":"configured"}function Lm(e,t){return e==="pending"||e==="failed"?e:t?Fm(t):e??"unknown"}async function Um(e,t,r,n,i,o){let a=r;try{for(;i.current===n&&ys(a.status);){if(await zm(Math.max(1,a.intervalSeconds??2)*1e3),i.current!==n)return;a=await e.pollDevice(t,a),o.onAttempt(a)}a.status==="completed"?o.onConnected():i.current===n&&o.onFailed(a.message||`连接${a.status==="expired"?"已过期":"失败"}`)}catch(s){i.current===n&&o.onFailed(it(s))}finally{i.current===n&&o.onFinished()}}function ys(e){return e==="pending"||e==="authorization_pending"||e==="slow_down"}function au(e){return e==="expired"?"连接已过期,请重新开始":e==="cancelled"?"连接已取消":e==="unsupported"?"当前 Provider 不支持此连接方式":"连接失败"}function Bm(e){return e==="configured"?"configured":e==="connected"?"connected":e==="failed"||e==="reauthRequired"?"attention":e==="pending"?"loading":"unconfigured"}function su(e,t,r){const n=e??Co(t),i=Hf([...n.credentials.filter(o=>o.id!==r.id),r]);return{...n,credentials:i,status:Xs(i)}}function lu(e,t,r){const n=e??Co(t),i=n.credentials.filter(o=>o.id!==r);return{...n,credentials:i,status:Xs(i)}}function uu(e,t,r,n){const i=e??Co(t),o=i.credentials.map(a=>a.id===r?{...a,health:n}:a);return{...i,credentials:o,status:o.some(a=>a.enabled&&a.health==="invalid")?"attention":Xs(o)}}function qm(e){const t=e.credential;if(!t||typeof t!="object")return;const r=t;return typeof r.id=="string"&&typeof r.offeringId=="string"&&(r.authMode==="oauth"||r.authMode==="deviceCode"||r.authMode==="apiKey"||r.authMode==="local")&&typeof r.version=="number"?r:void 0}function Xs(e){if(e.length===0)return"unconfigured";const t=e.filter(r=>r.enabled);return t.length===0?"configured":t.some(r=>r.health==="expired"||r.health==="invalid")?"attention":"available"}function Km(e,t,r,n){const i=e??Co(t),o=new Set(n.map(a=>a.id));return{...i,offerings:i.offerings.some(a=>a.id===r.id)?i.offerings:[...i.offerings,r],credentials:Hf([...i.credentials.filter(a=>a.offeringId!==r.id||!o.has(a.id)),...n])}}function Co(e){return{id:e,name:dt.find(t=>t.id===e)?.name??e,offerings:[],credentials:[],selectedModels:[],status:"unconfigured"}}function Hf(e){return[...e].sort((t,r)=>t.priority-r.priority)}function Wm(e){window.open(e,"_blank","noopener,noreferrer")}function zm(e){return new Promise(t=>window.setTimeout(t,e))}function it(e){const t=Md(e);return t==="AI Connection request failed. Please try again."?"请求未完成。请确认 Xpod 正在运行且登录仍有效,然后重试。":t}function Hm(e,t){return e==="custom"?t?.credentialId?{markMissing:!0,credentialId:t.credentialId}:{markMissing:!t}:t?.offeringId?{markMissing:!0,offeringId:t.offeringId}:{markMissing:!t}}function Xo(e,t,r,n={markMissing:!1}){const i=new Set(r.map(a=>a.id)),o=e.map(a=>n.markMissing&&a.provider===t&&!a.custom&&!i.has(a.id)&&(n.offeringId===void 0||a.offeringId===n.offeringId)&&(n.credentialId===void 0||a.credentialId===n.credentialId)?rn({...a,availability:"unavailable"}):a);for(const a of r){const s=a,u="provider"in a,c=s.offeringId??(u?void 0:n.offeringId),h=s.credentialId??(u?void 0:n.credentialId),g=o.findIndex(A=>A.provider!==t?!1:s.resourceId&&A.resourceId?s.resourceId===A.resourceId:h!==void 0?A.id===s.id&&A.credentialId===h:c!==void 0?A.id===s.id&&A.offeringId===c:A.id===s.id&&A.offeringId===void 0);g===-1?o.push(rn({...s,id:s.id,provider:t,availability:s.availability??"available",...c?{offeringId:c}:{},...h?{credentialId:h}:{}})):o[g]=rn({...o[g],...s,provider:t,displayName:s.displayName??o[g].displayName,availability:s.availability??"available",...c?{offeringId:c}:{},...h?{credentialId:h}:{}})}return o}function cu(e,t,r,n,i){if(!i.markMissing||r.length===0)return e;const o=new Set(n.map(s=>s.id)),a=[...e];for(const s of r.filter(u=>u.provider===t)){if(s.custom||i.offeringId!==void 0&&s.offeringId!==i.offeringId||i.credentialId!==void 0&&s.credentialId!==i.credentialId||o.has(s.id))continue;const u=hr(s),c=a.findIndex(g=>g.provider===t&&hr(g)===u),h=rn({...s,availability:"unavailable"});c===-1?a.push(h):a[c]=rn({...a[c],...h,displayName:a[c].displayName??h.displayName})}return a}function Vm(e,t){const r=[...e];for(const n of t){const i=r.findIndex(o=>hr(o)===hr(n));if(i===-1){r.push(n);continue}r[i]=rn({...r[i],...n,displayName:r[i].displayName??n.displayName,availability:r[i].availability==="unavailable"?"unavailable":n.availability})}return r}function rn(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0))}function hr(e){return e.resourceId??(e.offeringId?`${e.offeringId}:${e.id}`:e.id)}function Qm(e){return{id:e.id,...e.offeringId?{offeringId:e.offeringId}:{},...e.resourceId?{resourceId:e.resourceId}:{}}}function du(e){return e!==void 0}function Jm({controller:e}){const t=Js(e),r=Gs(e),n=Lf(e),i=zg(e),o=Ys(e),a=Bf(e),s=dt.find(I=>I.id===r),u=r==="custom"?o.custom?.credentials.find(I=>I.id===n):void 0,c=Qs.find(I=>I.id===t)?.title,h=u?.label??o[r]?.name??s?.name??r,g=c??`${h} 详情`,A=r==="custom"&&n&&o.custom?{...o,custom:{...o.custom,name:h,offerings:Gm(o.custom,u),credentials:o.custom.credentials.filter(I=>I.id===n),selectedModels:o.custom.selectedModels.filter(I=>I.credentialId===n)}}:o;return te.useEffect(()=>{e.client&&e.loadProviders()},[e]),e.client?m.jsx("section",{role:"region","aria-label":g,children:m.jsx(jm,{client:e.client,clientConfigurationBridge:e.clientConfigurationBridge,selectedSection:t,selectedProvider:r,selectedCredentialId:n,openExternal:e.openExternal,providerSummaries:i,providerProducts:A,providerLoadError:a,onProviderStateChange:e.setProviderState})}):m.jsxs("section",{role:"alert","aria-label":"AI Connections unavailable",children:[m.jsx("h2",{children:"AI Connections 尚未就绪"}),m.jsx("p",{children:"宿主需要先提供已登录的 WebID 和可用的 Pod。"})]})}function Gm(e,t){if(!t)return e.offerings;const r=t.compatibility??(t.offeringId==="anthropic-compatible"?"anthropic":"openai"),n=e.offerings.find(i=>i.id===t.offeringId)??e.offerings[0];return n?[{...n,id:t.offeringId,label:r==="auto"?"自动探测":r==="anthropic"?"Anthropic 兼容":"OpenAI 兼容",endpoints:t.baseUrl?[{protocol:r==="anthropic"?"anthropic":"chatCompletions",baseUrl:t.baseUrl}]:n.endpoints,modelDiscovery:r==="anthropic"?{strategy:"anthropic",path:"/models",endpointProtocol:"anthropic"}:r==="auto"?{strategy:"auto",path:"/models",endpointProtocol:"auto"}:{strategy:"openaiCompatible",path:"/models",endpointProtocol:"chatCompletions"}}]:[]}function Ym({open:e,saving:t=!1,error:r,onOpenChange:n,onSave:i}){const[o,a]=te.useState(""),[s,u]=te.useState("auto"),[c,h]=te.useState(""),[g,A]=te.useState(""),[I,k]=te.useState(""),[S,_]=te.useState();te.useEffect(()=>{e&&(a(""),u("auto"),h(""),A(""),k(""),_(void 0))},[e]);const R=()=>{_(void 0);let E;try{E=Xm(c)}catch{_("Base URL 必须是有效的 http(s) 地址。");return}const v=o.trim(),V=g.trim();if(!v){_("请输入 Provider 名称。");return}if(!V){_("请输入 API Key。");return}i({offeringId:Zm(s),apiKey:V,label:v,baseUrl:E,priority:10,compatibility:s,...I.trim()?{proxyUrl:I.trim()}:{}})};return m.jsx(qd,{open:e,onOpenChange:n,children:m.jsxs(ks,{className:"max-w-md",style:{maxHeight:"calc(100vh - 2rem)",overflowY:"auto"},"aria-describedby":"ai-custom-provider-description",children:[m.jsx(Ds,{children:m.jsx(js,{children:"添加自定义 Provider"})}),m.jsx("p",{id:"ai-custom-provider-description",className:"text-sm text-muted-foreground",children:"用 OpenAI/Anthropic 兼容协议接入第三方模型服务。Xpod 会把真实 API Key 存进当前 Pod。"}),m.jsxs("div",{className:"flex flex-col gap-4 py-2",children:[m.jsxs("div",{className:"flex flex-col gap-2",children:[m.jsx(rr,{htmlFor:"ai-custom-provider-name",children:"Provider 名称"}),m.jsx(ft,{id:"ai-custom-provider-name",value:o,disabled:t,placeholder:"例如 OpenRouter",onChange:E=>a(E.target.value)})]}),m.jsxs("div",{className:"flex flex-col gap-2",children:[m.jsx(rr,{htmlFor:"ai-custom-provider-compatibility",children:"兼容协议"}),m.jsxs("select",{id:"ai-custom-provider-compatibility",value:s,disabled:t,"aria-label":"兼容协议",className:"h-9 rounded-md border border-input bg-background px-3 text-sm",onChange:E=>u(E.target.value),children:[m.jsx("option",{value:"auto",children:"自动探测"}),m.jsx("option",{value:"openai",children:"OpenAI 兼容优先"}),m.jsx("option",{value:"anthropic",children:"Anthropic 兼容优先"})]})]}),m.jsxs("div",{className:"flex flex-col gap-2",children:[m.jsx(rr,{htmlFor:"ai-custom-provider-base-url",children:"Base URL"}),m.jsx(ft,{id:"ai-custom-provider-base-url",value:c,disabled:t,placeholder:"https://openrouter.ai/api 或 https://openrouter.ai/api/v1",onChange:E=>h(E.target.value)}),m.jsx("p",{className:"text-xs text-muted-foreground",children:"裸域名会自动补齐为 /v1。"})]}),m.jsxs("div",{className:"flex flex-col gap-2",children:[m.jsx(rr,{htmlFor:"ai-custom-provider-api-key",children:"API Key"}),m.jsx(ft,{id:"ai-custom-provider-api-key",type:"password",value:g,disabled:t,autoComplete:"new-password","data-lpignore":"true",onChange:E=>A(E.target.value)})]}),m.jsxs("div",{className:"flex flex-col gap-2",children:[m.jsx(rr,{htmlFor:"ai-custom-provider-proxy-url",children:"Proxy URL(可选)"}),m.jsx(ft,{id:"ai-custom-provider-proxy-url",value:I,disabled:t,placeholder:"http://127.0.0.1:7890",onChange:E=>k(E.target.value)})]}),S||r?m.jsx("p",{className:"text-sm text-destructive",children:S??r}):null]}),m.jsxs(Ns,{children:[m.jsx(Me,{type:"button",variant:"outline",disabled:t,onClick:()=>n(!1),children:"取消"}),m.jsx(Me,{type:"button",disabled:t,onClick:R,children:"保存自定义 Provider"})]})]})})}function Xm(e){const t=e.trim(),r=new URL(t);if(r.protocol!=="http:"&&r.protocol!=="https:")throw new Error("invalid_custom_base_url");r.hash="";const n=r.pathname.replace(/\/+$/u,"");return!n||n===""?r.pathname="/v1":r.pathname=n,r.href.replace(/\/$/u,"")}function Zm(e){return e==="anthropic"?"anthropic-compatible":"openai-compatible"}function $m({controller:e}){const t=Uf(e),[r,n]=te.useState(!1),[i,o]=te.useState(!1),[a,s]=te.useState(),u=async c=>{if(!e.client){s("请先登录后再添加自定义 Provider。");return}o(!0),s(void 0);let h;try{const g=await e.client.createApiKeyCredential("custom",c);h=g.id,await e.client.discoverModels("custom",{offeringId:g.offeringId,credentialId:g.id,compatibility:c.compatibility}),e.selectProvider("custom",g.id),await e.loadProviders(),n(!1)}catch(g){h&&await e.client.deleteProviderCredential("custom",h).catch(()=>{}),s(g instanceof Error?g.message:"AI Connection request failed. Please try again.")}finally{o(!1)}};return m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:"flex h-full min-w-0 items-center gap-2 px-3",children:[m.jsxs("div",{className:"relative min-w-0 flex-1",children:[m.jsx(jf,{"aria-hidden":"true",className:"pointer-events-none absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground"}),m.jsx(ft,{type:"search","aria-label":"搜索 Provider",placeholder:"搜索 Provider",value:t,onChange:c=>e.setSearchQuery(c.target.value),className:"h-8 border-transparent bg-muted/50 pl-8 text-xs focus-visible:bg-background"})]}),m.jsx(Me,{type:"button",variant:"ghost",size:"icon",className:"h-8 w-8 shrink-0","aria-label":"添加 AI Connection",title:"添加 AI Connection",onClick:()=>n(!0),children:m.jsx(Ro,{className:"h-4 w-4","aria-hidden":"true"})})]}),m.jsx(Ym,{open:r,saving:i,error:a,onOpenChange:n,onSave:c=>{u(c)}})]})}function ew({controller:e}){const t=Js(e),r=Gs(e),n=Ys(e),i=dt.find(a=>a.id===r),o=Qs.find(a=>a.id===t)?.title??n[r]?.name??i?.name??r;return m.jsx("div",{className:"flex h-full min-w-0 items-center px-4",children:m.jsx("h1",{className:"truncate text-sm font-medium text-foreground",children:o})})}const tw=["navigation.openExternal","aiClientConfiguration"];function rw(e){const t=Zo(e,"Extension manifest");fu(t.extensionId,"extensionId"),en(t.name,"name"),en(t.version,"version"),en(t.sdkVersion,"sdkVersion");const r=Zo(t.contributes,"contributes");if(!Array.isArray(r.applets)||r.applets.length===0)throw new Error("Extension manifest must contribute at least one Applet");const n=new Set;for(const i of r.applets){const o=Zo(i,"Applet manifest"),a=fu(o.appId,"appId");if(n.has(a))throw new Error(`Extension manifest has duplicate appId: ${a}`);if(n.add(a),en(o.name,"Applet name"),en(o.entry,"Applet entry"),!Array.isArray(o.commands))throw new Error("Applet commands must be an array");if(o.layout!=="single-pane"&&o.layout!=="two-pane")throw new Error("Applet layout must be single-pane or two-pane")}if(!Array.isArray(t.dataModels))throw new Error("Extension dataModels must be an array");if(!Array.isArray(t.hostCapabilities))throw new Error("Extension hostCapabilities must be an array");for(const i of t.hostCapabilities)if(!tw.includes(i))throw new Error(`Extension manifest requested unknown Host capability: ${String(i)}`);return e}function Zo(e,t){if(!e||typeof e!="object"||Array.isArray(e))throw new Error(`${t} must be an object`);return e}function en(e,t){if(typeof e!="string"||e.trim().length===0)throw new Error(`${t} must be a non-empty string`);return e}function fu(e,t){const r=en(e,t);let n;try{n=new URL(r)}catch{throw new Error(`${t} must be a valid HTTPS URL`)}if(n.protocol!=="https:")throw new Error(`${t} must be a valid HTTPS URL`);return r}const Vf=rw({extensionId:"https://undefineds.co/extensions/ai-connections",name:"AI Connection",version:"0.1.0",sdkVersion:"1",contributes:{applets:[{appId:"https://undefineds.co/applets/ai-connections",name:"AI Connection",entry:".",commands:[],layout:"two-pane"}]},dataModels:[],hostCapabilities:["navigation.openExternal","aiClientConfiguration"]}),Qf=Vf.contributes.applets[0],nw={manifest:Qf,createController:qg,activate(e){e.loadProviders()},slots:{listHeader:$m,list:Yg,mainHeader:ew,main:Jm}},iw={manifest:Vf,applets:{[Qf.appId]:nw}};function ow(){return iw}var kr={},Tn={},Dr={},Nr={};var co="@@__IMMUTABLE_INDEXED__@@";function St(e){return!!(e&&e[co])}var fo="@@__IMMUTABLE_KEYED__@@";function Fe(e){return!!(e&&e[fo])}function Mo(e){return Fe(e)||St(e)}var Jf="@@__IMMUTABLE_ITERABLE__@@";function Et(e){return!!(e&&e[Jf])}var et=function(t){return Et(t)?t:st(t)},Bt=(function(e){function t(r){return Fe(r)?r:Er(r)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t})(et),Gr=(function(e){function t(r){return St(r)?r:Kt(r)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t})(et),hn=(function(e){function t(r){return Et(r)&&!Mo(r)?r:gn(r)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t})(et);et.Keyed=Bt;et.Indexed=Gr;et.Set=hn;var pn=0,Ot=1,kt=2,bs=typeof Symbol=="function"&&Symbol.iterator,Gf="@@iterator",Po=bs||Gf,Ie=function(t){this.next=t};Ie.prototype.toString=function(){return"[Iterator]"};Ie.KEYS=pn;Ie.VALUES=Ot;Ie.ENTRIES=kt;Ie.prototype.inspect=Ie.prototype.toSource=function(){return this.toString()};Ie.prototype[Po]=function(){return this};function qe(e,t,r,n){var i=e===pn?t:e===Ot?r:[t,r];return n?n.value=i:n={value:i,done:!1},n}function at(){return{value:void 0,done:!0}}function Zs(e){return Array.isArray(e)?!0:!!To(e)}function hu(e){return!!(e&&typeof e.next=="function")}function gs(e){var t=To(e);return t&&t.call(e)}function To(e){var t=e&&(bs&&e[bs]||e[Gf]);if(typeof t=="function")return t}function aw(e){var t=To(e);return t&&t===e.entries}function sw(e){var t=To(e);return t&&t===e.keys}var xi="delete",Ne=5,Tt=1<<Ne,pt=Tt-1,ve={};function ms(){return{value:!1}}function Lt(e){e&&(e.value=!0)}function $s(){}function nn(e){return e.size===void 0&&(e.size=e.__iterate(Yf)),e.size}function gr(e,t){if(typeof t!="number"){var r=t>>>0;if(""+r!==t||r===4294967295)return NaN;t=r}return t<0?nn(e)+t:t}function Yf(){return!0}function Ii(e,t,r){return(e===0&&!Zf(e)||r!==void 0&&e<=-r)&&(t===void 0||r!==void 0&&t>=r)}function yn(e,t){return Xf(e,t,0)}function Ri(e,t){return Xf(e,t,t)}function Xf(e,t,r){return e===void 0?r:Zf(e)?t===1/0?t:Math.max(0,t+e)|0:t===void 0||t===e?e:Math.min(t,e)|0}function Zf(e){return e<0||e===0&&1/e===-1/0}var $f="@@__IMMUTABLE_RECORD__@@";function Sr(e){return!!(e&&e[$f])}function qt(e){return Et(e)||Sr(e)}var mr="@@__IMMUTABLE_ORDERED__@@";function Vt(e){return!!(e&&e[mr])}var eh="@@__IMMUTABLE_SEQ__@@";function Oo(e){return!!(e&&e[eh])}var bn=Object.prototype.hasOwnProperty;function el(e){return Array.isArray(e)||typeof e=="string"?!0:e&&typeof e=="object"&&Number.isInteger(e.length)&&e.length>=0&&(e.length===0?Object.keys(e).length===1:e.hasOwnProperty(e.length-1))}var st=(function(e){function t(r){return r==null?rl():qt(r)?r.toSeq():uw(r)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toSeq=function(){return this},t.prototype.toString=function(){return this.__toString("Seq {","}")},t.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},t.prototype.__iterate=function(n,i){var o=this._cache;if(o){for(var a=o.length,s=0;s!==a;){var u=o[i?a-++s:s++];if(n(u[1],u[0],this)===!1)break}return s}return this.__iterateUncached(n,i)},t.prototype.__iterator=function(n,i){var o=this._cache;if(o){var a=o.length,s=0;return new Ie(function(){if(s===a)return at();var u=o[i?a-++s:s++];return qe(n,u[0],u[1])})}return this.__iteratorUncached(n,i)},t})(et),Er=(function(e){function t(r){return r==null?rl().toKeyedSeq():Et(r)?Fe(r)?r.toSeq():r.fromEntrySeq():Sr(r)?r.toSeq():nl(r)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toKeyedSeq=function(){return this},t})(st),Kt=(function(e){function t(r){return r==null?rl():Et(r)?Fe(r)?r.entrySeq():r.toIndexedSeq():Sr(r)?r.toSeq().entrySeq():th(r)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return t(arguments)},t.prototype.toIndexedSeq=function(){return this},t.prototype.toString=function(){return this.__toString("Seq [","]")},t})(st),gn=(function(e){function t(r){return(Et(r)&&!Mo(r)?r:Kt(r)).toSetSeq()}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return t(arguments)},t.prototype.toSetSeq=function(){return this},t})(st);st.isSeq=Oo;st.Keyed=Er;st.Set=gn;st.Indexed=Kt;st.prototype[eh]=!0;var on=(function(e){function t(r){this._array=r,this.size=r.length}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(n,i){return this.has(n)?this._array[gr(this,n)]:i},t.prototype.__iterate=function(n,i){for(var o=this._array,a=o.length,s=0;s!==a;){var u=i?a-++s:s++;if(n(o[u],u,this)===!1)break}return s},t.prototype.__iterator=function(n,i){var o=this._array,a=o.length,s=0;return new Ie(function(){if(s===a)return at();var u=i?a-++s:s++;return qe(n,u,o[u])})},t})(Kt),tl=(function(e){function t(r){var n=Object.keys(r).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(r):[]);this._object=r,this._keys=n,this.size=n.length}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(n,i){return i!==void 0&&!this.has(n)?i:this._object[n]},t.prototype.has=function(n){return bn.call(this._object,n)},t.prototype.__iterate=function(n,i){for(var o=this._object,a=this._keys,s=a.length,u=0;u!==s;){var c=a[i?s-++u:u++];if(n(o[c],c,this)===!1)break}return u},t.prototype.__iterator=function(n,i){var o=this._object,a=this._keys,s=a.length,u=0;return new Ie(function(){if(u===s)return at();var c=a[i?s-++u:u++];return qe(n,c,o[c])})},t})(Er);tl.prototype[mr]=!0;var lw=(function(e){function t(r){this._collection=r,this.size=r.length||r.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.__iterateUncached=function(n,i){if(i)return this.cacheResult().__iterate(n,i);var o=this._collection,a=gs(o),s=0;if(hu(a))for(var u;!(u=a.next()).done&&n(u.value,s++,this)!==!1;);return s},t.prototype.__iteratorUncached=function(n,i){if(i)return this.cacheResult().__iterator(n,i);var o=this._collection,a=gs(o);if(!hu(a))return new Ie(at);var s=0;return new Ie(function(){var u=a.next();return u.done?u:qe(n,s++,u.value)})},t})(Kt),pu;function rl(){return pu||(pu=new on([]))}function nl(e){var t=il(e);if(t)return t.fromEntrySeq();if(typeof e=="object")return new tl(e);throw new TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+e)}function th(e){var t=il(e);if(t)return t;throw new TypeError("Expected Array or collection object of values: "+e)}function uw(e){var t=il(e);if(t)return aw(e)?t.fromEntrySeq():sw(e)?t.toSetSeq():t;if(typeof e=="object")return new tl(e);throw new TypeError("Expected Array or collection object of values, or keyed object: "+e)}function il(e){return el(e)?new on(e):Zs(e)?new lw(e):void 0}function Ci(){return this.__ensureOwner()}function Mi(){return this.__ownerID?this:this.__ensureOwner(new $s)}var On=typeof Math.imul=="function"&&Math.imul(4294967295,2)===-2?Math.imul:function(t,r){t|=0,r|=0;var n=t&65535,i=r&65535;return n*i+((t>>>16)*i+n*(r>>>16)<<16>>>0)|0};function ko(e){return e>>>1&1073741824|e&3221225471}var cw=Object.prototype.valueOf;function ht(e){if(e==null)return yu(e);if(typeof e.hashCode=="function")return ko(e.hashCode(e));var t=gw(e);if(t==null)return yu(t);switch(typeof t){case"boolean":return t?1108378657:1108378656;case"number":return dw(t);case"string":return t.length>mw?fw(t):ws(t);case"object":case"function":return yw(t);case"symbol":return pw(t);default:if(typeof t.toString=="function")return ws(t.toString());throw new Error("Value type "+typeof t+" cannot be hashed.")}}function yu(e){return e===null?1108378658:1108378659}function dw(e){if(e!==e||e===1/0)return 0;var t=e|0;for(t!==e&&(t^=e*4294967295);e>4294967295;)e/=4294967295,t^=e;return ko(t)}function fw(e){var t=ta[e];return t===void 0&&(t=ws(e),ea===ww&&(ea=0,ta={}),ea++,ta[e]=t),t}function ws(e){for(var t=0,r=0;r<e.length;r++)t=31*t+e.charCodeAt(r)|0;return ko(t)}var hw=(Math.random()*1048576|1)%1048576||40503;function ol(e){if(typeof e!="string")return ht(e);for(var t=0,r=0;r<e.length;r++)t=hw*t+e.charCodeAt(r)|0;return t}function pw(e){var t=mu[e];return t!==void 0||(t=rh(),mu[e]=t),t}function yw(e){var t;if(_s&&(t=As.get(e),t!==void 0)||(t=e[Kr],t!==void 0)||!gu&&(t=e.propertyIsEnumerable&&e.propertyIsEnumerable[Kr],t!==void 0||(t=bw(e),t!==void 0)))return t;if(t=rh(),_s)As.set(e,t);else{if(bu!==void 0&&bu(e)===!1)throw new Error("Non-extensible objects are not allowed as keys.");if(gu)Object.defineProperty(e,Kr,{enumerable:!1,configurable:!1,writable:!1,value:t});else if(e.propertyIsEnumerable!==void 0&&e.propertyIsEnumerable===e.constructor.prototype.propertyIsEnumerable)e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},e.propertyIsEnumerable[Kr]=t;else if(e.nodeType!==void 0)e[Kr]=t;else throw new Error("Unable to set a non-enumerable property on object.")}return t}var bu=Object.isExtensible,gu=(function(){try{return Object.defineProperty({},"@",{}),!0}catch{return!1}})();function bw(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}function gw(e){return e.valueOf!==cw&&typeof e.valueOf=="function"?e.valueOf(e):e}function rh(){var e=++$o;return $o&1073741824&&($o=0),e}var _s=typeof WeakMap=="function",As;_s&&(As=new WeakMap);var mu=Object.create(null),$o=0,Kr="__immutablehash__";typeof Symbol=="function"&&(Kr=Symbol(Kr));var mw=16,ww=255,ea=0,ta={},Do=(function(e){function t(r,n){this._iter=r,this._useKeys=n,this.size=r.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(n,i){return this._iter.get(n,i)},t.prototype.has=function(n){return this._iter.has(n)},t.prototype.valueSeq=function(){return this._iter.valueSeq()},t.prototype.reverse=function(){var n=this,i=al(this,!0);return this._useKeys||(i.valueSeq=function(){return n._iter.toSeq().reverse()}),i},t.prototype.map=function(n,i){var o=this,a=sh(this,n,i);return this._useKeys||(a.valueSeq=function(){return o._iter.toSeq().map(n,i)}),a},t.prototype.__iterate=function(n,i){var o=this;return this._iter.__iterate(function(a,s){return n(a,s,o)},i)},t.prototype.__iterator=function(n,i){return this._iter.__iterator(n,i)},t})(Er);Do.prototype[mr]=!0;var nh=(function(e){function t(r){this._iter=r,this.size=r.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.includes=function(n){return this._iter.includes(n)},t.prototype.__iterate=function(n,i){var o=this,a=0;return i&&nn(this),this._iter.__iterate(function(s){return n(s,i?o.size-++a:a++,o)},i)},t.prototype.__iterator=function(n,i){var o=this,a=this._iter.__iterator(Ot,i),s=0;return i&&nn(this),new Ie(function(){var u=a.next();return u.done?u:qe(n,i?o.size-++s:s++,u.value,u)})},t})(Kt),ih=(function(e){function t(r){this._iter=r,this.size=r.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.has=function(n){return this._iter.includes(n)},t.prototype.__iterate=function(n,i){var o=this;return this._iter.__iterate(function(a){return n(a,a,o)},i)},t.prototype.__iterator=function(n,i){var o=this._iter.__iterator(Ot,i);return new Ie(function(){var a=o.next();return a.done?a:qe(n,a.value,a.value,a)})},t})(gn),oh=(function(e){function t(r){this._iter=r,this.size=r.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.entrySeq=function(){return this._iter.toSeq()},t.prototype.__iterate=function(n,i){var o=this;return this._iter.__iterate(function(a){if(a){_u(a);var s=Et(a);return n(s?a.get(1):a[1],s?a.get(0):a[0],o)}},i)},t.prototype.__iterator=function(n,i){var o=this._iter.__iterator(Ot,i);return new Ie(function(){for(;;){var a=o.next();if(a.done)return a;var s=a.value;if(s){_u(s);var u=Et(s);return qe(n,u?s.get(0):s[0],u?s.get(1):s[1],a)}}})},t})(Er);nh.prototype.cacheResult=Do.prototype.cacheResult=ih.prototype.cacheResult=oh.prototype.cacheResult=ul;function ah(e){var t=er(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var r=e.reverse.apply(this);return r.flip=function(){return e.reverse()},r},t.has=function(r){return e.includes(r)},t.includes=function(r){return e.has(r)},t.cacheResult=ul,t.__iterateUncached=function(r,n){var i=this;return e.__iterate(function(o,a){return r(a,o,i)!==!1},n)},t.__iteratorUncached=function(r,n){if(r===kt){var i=e.__iterator(r,n);return new Ie(function(){var o=i.next();if(!o.done){var a=o.value[0];o.value[0]=o.value[1],o.value[1]=a}return o})}return e.__iterator(r===Ot?pn:Ot,n)},t}function sh(e,t,r){var n=er(e);return n.size=e.size,n.has=function(i){return e.has(i)},n.get=function(i,o){var a=e.get(i,ve);return a===ve?o:t.call(r,a,i,e)},n.__iterateUncached=function(i,o){var a=this;return e.__iterate(function(s,u,c){return i(t.call(r,s,u,c),u,a)!==!1},o)},n.__iteratorUncached=function(i,o){var a=e.__iterator(kt,o);return new Ie(function(){var s=a.next();if(s.done)return s;var u=s.value,c=u[0];return qe(i,c,t.call(r,u[1],c,e),s)})},n}function al(e,t){var r=er(e);return r._iter=e,r.size=e.size,r.reverse=function(){return e},e.flip&&(r.flip=function(){var n=ah(e);return n.reverse=function(){return e.flip()},n}),r.get=function(n,i){return e.get(t?n:-1-n,i)},r.has=function(n){return e.has(t?n:-1-n)},r.includes=function(n){return e.includes(n)},r.cacheResult=ul,r.__iterate=function(n,i){var o=this,a=0;return i&&nn(e),e.__iterate(function(s,u){return n(s,t?u:i?o.size-++a:a++,o)},!i)},r.__iterator=function(n,i){var o=0;i&&nn(e);var a=e.__iterator(kt,!i);return new Ie(function(){var s=a.next();if(s.done)return s;var u=s.value;return qe(n,t?u[0]:i?r.size-++o:o++,u[1],s)})},r}function lh(e,t,r,n){var i=er(e);return n&&(i.has=function(o){var a=e.get(o,ve);return a!==ve&&!!t.call(r,a,o,e)},i.get=function(o,a){var s=e.get(o,ve);return s!==ve&&t.call(r,s,o,e)?s:a}),i.__iterateUncached=function(o,a){var s=this,u=0;return e.__iterate(function(c,h,g){if(t.call(r,c,h,g))return u++,o(c,n?h:u-1,s)},a),u},i.__iteratorUncached=function(o,a){var s=e.__iterator(kt,a),u=0;return new Ie(function(){for(;;){var c=s.next();if(c.done)return c;var h=c.value,g=h[0],A=h[1];if(t.call(r,A,g,e))return qe(o,n?g:u++,A,c)}})},i}function _w(e,t,r){var n=Yr().asMutable();return e.__iterate(function(i,o){n.update(t.call(r,i,o,e),0,function(a){return a+1})}),n.asImmutable()}function Aw(e,t,r){var n=Fe(e),i=(Vt(e)?Zt():Yr()).asMutable();e.__iterate(function(a,s){i.update(t.call(r,a,s,e),function(u){return u=u||[],u.push(n?[s,a]:a),u})});var o=ll(e);return i.map(function(a){return De(e,o(a))}).asImmutable()}function vw(e,t,r){var n=Fe(e),i=[[],[]];e.__iterate(function(a,s){i[t.call(r,a,s,e)?1:0].push(n?[s,a]:a)});var o=ll(e);return i.map(function(a){return De(e,o(a))})}function sl(e,t,r,n){var i=e.size;if(Ii(t,r,i))return e;if(typeof i>"u"&&(t<0||r<0))return sl(e.toSeq().cacheResult(),t,r,n);var o=yn(t,i),a=Ri(r,i),s=a-o,u;s===s&&(u=s<0?0:s);var c=er(e);return c.size=u===0?u:e.size&&u||void 0,!n&&Oo(e)&&u>=0&&(c.get=function(h,g){return h=gr(this,h),h>=0&&h<u?e.get(h+o,g):g}),c.__iterateUncached=function(h,g){var A=this;if(u===0)return 0;if(g)return this.cacheResult().__iterate(h,g);var I=0,k=!0,S=0;return e.__iterate(function(_,R){if(!(k&&(k=I++<o)))return S++,h(_,n?R:S-1,A)!==!1&&S!==u}),S},c.__iteratorUncached=function(h,g){if(u!==0&&g)return this.cacheResult().__iterator(h,g);if(u===0)return new Ie(at);var A=e.__iterator(h,g),I=0,k=0;return new Ie(function(){for(;I++<o;)A.next();if(++k>u)return at();var S=A.next();return n||h===Ot||S.done?S:h===pn?qe(h,k-1,void 0,S):qe(h,k-1,S.value[1],S)})},c}function Sw(e,t,r){var n=er(e);return n.__iterateUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterate(i,o);var s=0;return e.__iterate(function(u,c,h){return t.call(r,u,c,h)&&++s&&i(u,c,a)}),s},n.__iteratorUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterator(i,o);var s=e.__iterator(kt,o),u=!0;return new Ie(function(){if(!u)return at();var c=s.next();if(c.done)return c;var h=c.value,g=h[0],A=h[1];return t.call(r,A,g,a)?i===kt?c:qe(i,g,A,c):(u=!1,at())})},n}function uh(e,t,r,n){var i=er(e);return i.__iterateUncached=function(o,a){var s=this;if(a)return this.cacheResult().__iterate(o,a);var u=!0,c=0;return e.__iterate(function(h,g,A){if(!(u&&(u=t.call(r,h,g,A))))return c++,o(h,n?g:c-1,s)}),c},i.__iteratorUncached=function(o,a){var s=this;if(a)return this.cacheResult().__iterator(o,a);var u=e.__iterator(kt,a),c=!0,h=0;return new Ie(function(){var g,A,I;do{if(g=u.next(),g.done)return n||o===Ot?g:o===pn?qe(o,h++,void 0,g):qe(o,h++,g.value[1],g);var k=g.value;A=k[0],I=k[1],c&&(c=t.call(r,I,A,s))}while(c);return o===kt?g:qe(o,A,I,g)})},i}var Ew=(function(e){function t(r){this._wrappedIterables=r.flatMap(function(n){return n._wrappedIterables?n._wrappedIterables:[n]}),this.size=this._wrappedIterables.reduce(function(n,i){if(n!==void 0){var o=i.size;if(o!==void 0)return n+o}},0),this[fo]=this._wrappedIterables[0][fo],this[co]=this._wrappedIterables[0][co],this[mr]=this._wrappedIterables[0][mr]}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.__iterateUncached=function(n,i){if(this._wrappedIterables.length!==0){if(i)return this.cacheResult().__iterate(n,i);for(var o=0,a=Fe(this),s=a?kt:Ot,u=this._wrappedIterables[o].__iterator(s,i),c=!0,h=0;c;){for(var g=u.next();g.done;){if(o++,o===this._wrappedIterables.length)return h;u=this._wrappedIterables[o].__iterator(s,i),g=u.next()}var A=a?n(g.value[1],g.value[0],this):n(g.value,h,this);c=A!==!1,h++}return h}},t.prototype.__iteratorUncached=function(n,i){var o=this;if(this._wrappedIterables.length===0)return new Ie(at);if(i)return this.cacheResult().__iterator(n,i);var a=0,s=this._wrappedIterables[a].__iterator(n,i);return new Ie(function(){for(var u=s.next();u.done;){if(a++,a===o._wrappedIterables.length)return u;s=o._wrappedIterables[a].__iterator(n,i),u=s.next()}return u})},t})(st);function xw(e,t){var r=Fe(e),n=[e].concat(t).map(function(o){return Et(o)?r&&(o=Bt(o)):o=r?nl(o):th(Array.isArray(o)?o:[o]),o}).filter(function(o){return o.size!==0});if(n.length===0)return e;if(n.length===1){var i=n[0];if(i===e||r&&Fe(i)||St(e)&&St(i))return i}return new Ew(n)}function ch(e,t,r){var n=er(e);return n.__iterateUncached=function(i,o){if(o)return this.cacheResult().__iterate(i,o);var a=0,s=!1;function u(c,h){c.__iterate(function(g,A){return(!t||h<t)&&Et(g)?u(g,h+1):(a++,i(g,r?A:a-1,n)===!1&&(s=!0)),!s},o)}return u(e,0),a},n.__iteratorUncached=function(i,o){if(o)return this.cacheResult().__iterator(i,o);var a=e.__iterator(i,o),s=[],u=0;return new Ie(function(){for(;a;){var c=a.next();if(c.done!==!1){a=s.pop();continue}var h=c.value;if(i===kt&&(h=h[1]),(!t||s.length<t)&&Et(h))s.push(a),a=h.__iterator(i,o);else return r?c:qe(i,u++,h,c)}return at()})},n}function Iw(e,t,r){var n=ll(e);return e.toSeq().map(function(i,o){return n(t.call(r,i,o,e))}).flatten(!0)}function Rw(e,t){var r=er(e);return r.size=e.size&&e.size*2-1,r.__iterateUncached=function(n,i){var o=this,a=0;return e.__iterate(function(s){return(!a||n(t,a++,o)!==!1)&&n(s,a++,o)!==!1},i),a},r.__iteratorUncached=function(n,i){var o=e.__iterator(Ot,i),a=0,s;return new Ie(function(){return(!s||a%2)&&(s=o.next(),s.done)?s:a%2?qe(n,a++,t):qe(n,a++,s.value,s)})},r}function an(e,t,r){t||(t=dh);var n=Fe(e),i=0,o=e.toSeq().map(function(a,s){return[s,a,i++,r?r(a,s,e):a]}).valueSeq().toArray();return o.sort(function(a,s){return t(a[3],s[3])||a[2]-s[2]}).forEach(n?function(a,s){o[s].length=2}:function(a,s){o[s]=a[1]}),n?Er(o):St(e)?Kt(o):gn(o)}function qi(e,t,r){if(t||(t=dh),r){var n=e.toSeq().map(function(i,o){return[i,r(i,o,e)]}).reduce(function(i,o){return wu(t,i[1],o[1])?o:i});return n&&n[0]}return e.reduce(function(i,o){return wu(t,i,o)?o:i})}function wu(e,t,r){var n=e(r,t);return n===0&&r!==t&&(r==null||r!==r)||n>0}function Ki(e,t,r,n){var i=er(e),o=new on(r).map(function(a){return a.size});return i.size=n?o.max():o.min(),i.__iterate=function(a,s){for(var u=this.__iterator(Ot,s),c,h=0;!(c=u.next()).done&&a(c.value,h++,this)!==!1;);return h},i.__iteratorUncached=function(a,s){var u=r.map(function(g){return g=et(g),gs(s?g.reverse():g)}),c=0,h=!1;return new Ie(function(){var g;return h||(g=u.map(function(A){return A.next()}),h=n?g.every(function(A){return A.done}):g.some(function(A){return A.done})),h?at():qe(a,c++,t.apply(null,g.map(function(A){return A.value})))})},i}function De(e,t){return e===t?e:Oo(e)?t:e.constructor(t)}function _u(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function ll(e){return Fe(e)?Bt:St(e)?Gr:hn}function er(e){return Object.create((Fe(e)?Er:St(e)?Kt:gn).prototype)}function ul(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):st.prototype.cacheResult.call(this)}function dh(e,t){return e===void 0&&t===void 0?0:e===void 0?1:t===void 0?-1:e>t?1:e<t?-1:0}function vs(e){return!!(e&&typeof e.equals=="function"&&typeof e.hashCode=="function")}function $e(e,t){if(e===t||e!==e&&t!==t)return!0;if(!e||!t)return!1;if(typeof e.valueOf=="function"&&typeof t.valueOf=="function"){if(e=e.valueOf(),t=t.valueOf(),e===t||e!==e&&t!==t)return!0;if(!e||!t)return!1}return!!(vs(e)&&vs(t)&&e.equals(t))}function cl(e,t,r,n){return Xr(e,[t],r,n)}function fh(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return ph(this,e)}function hh(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];if(typeof e!="function")throw new TypeError("Invalid merger function: "+e);return ph(this,t,e)}function ph(e,t,r){for(var n=[],i=0;i<t.length;i++){var o=Bt(t[i]);o.size!==0&&n.push(o)}return n.length===0?e:e.toSeq().size===0&&!e.__ownerID&&n.length===1?Sr(e)?e:e.constructor(n[0]):e.withMutations(function(a){for(var s=r?function(c,h){cl(a,h,ve,function(g){return g===ve?c:r(g,c,h)})}:function(c,h){a.set(h,c)},u=0;u<n.length;u++)n[u].forEach(s)})}var Cw=Object.prototype.toString;function dl(e){if(!e||typeof e!="object"||Cw.call(e)!=="[object Object]")return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var r=t,n=Object.getPrototypeOf(t);n!==null;)r=n,n=Object.getPrototypeOf(r);return r===t}function wr(e){return typeof e=="object"&&(qt(e)||Array.isArray(e)||dl(e))}function Pi(e){return typeof e=="string"&&(e==="__proto__"||e==="constructor")}function Jt(e,t){t=t||0;for(var r=Math.max(0,e.length-t),n=new Array(r),i=0;i<r;i++)n[i]=e[i+t];return n}function ho(e){if(Array.isArray(e))return Jt(e);var t={};for(var r in e)Pi(r)||bn.call(e,r)&&(t[r]=e[r]);return t}function Mw(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];return Oi(e,t)}function Pw(e,t){for(var r=[],n=arguments.length-2;n-- >0;)r[n]=arguments[n+2];return Oi(t,r,e)}function Tw(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];return Ti(e,t)}function Ow(e,t){for(var r=[],n=arguments.length-2;n-- >0;)r[n]=arguments[n+2];return Ti(t,r,e)}function Ti(e,t,r){return Oi(e,t,kw(r))}function Oi(e,t,r){if(!wr(e))throw new TypeError("Cannot merge into non-data-structure value: "+e);if(qt(e))return typeof r=="function"&&e.mergeWith?e.mergeWith.apply(e,[r].concat(t)):e.merge?e.merge.apply(e,t):e.concat.apply(e,t);for(var n=Array.isArray(e),i=e,o=n?Gr:Bt,a=n?function(u){i===e&&(i=ho(i)),i.push(u)}:function(u,c){if(!Pi(c)){var h=bn.call(i,c),g=h&&r?r(i[c],u,c):u;(!h||g!==i[c])&&(i===e&&(i=ho(i)),i[c]=g)}},s=0;s<t.length;s++)o(t[s]).forEach(a);return i}function kw(e){function t(r,n,i){return wr(r)&&wr(n)&&Dw(r,n)?Oi(r,[n],t):e?e(r,n,i):n}return t}function Dw(e,t){var r=st(e),n=st(t);return St(r)===St(n)&&Fe(r)===Fe(n)}function yh(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return Ti(this,e)}function bh(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];return Ti(this,t,e)}function fl(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];return Xr(this,e,Gt(),function(n){return Ti(n,t)})}function hl(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];return Xr(this,e,Gt(),function(n){return Oi(n,t)})}function gh(e,t,r){return Xr(e,t,ve,function(){return r})}function pl(e,t){return gh(this,e,t)}function yl(e,t,r){return arguments.length===1?e(this):cl(this,e,t,r)}function bl(e,t,r){return Xr(this,e,t,r)}function gl(){return this.__altered}function ki(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this}var mh="@@__IMMUTABLE_MAP__@@";function No(e){return!!(e&&e[mh])}function ni(e,t){if(!e)throw new Error(t)}function Pt(e){ni(e!==1/0,"Cannot perform this action with an infinite size.")}var Yr=(function(e){function t(r){return r==null?Gt():No(r)&&!Vt(r)?r:Gt().withMutations(function(n){var i=e(r);Pt(i.size),i.forEach(function(o,a){return n.set(a,o)})})}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return this.__toString("Map {","}")},t.prototype.get=function(n,i){return this._root?this._root.get(0,void 0,n,i):i},t.prototype.set=function(n,i){return Su(this,n,i)},t.prototype.remove=function(n){return Su(this,n,ve)},t.prototype.deleteAll=function(n){var i=et(n);return i.size===0?this:this.withMutations(function(o){i.forEach(function(a){return o.remove(a)})})},t.prototype.clear=function(){return this.size===0?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):Gt()},t.prototype.sort=function(n){return Zt(an(this,n))},t.prototype.sortBy=function(n,i){return Zt(an(this,i,n))},t.prototype.map=function(n,i){var o=this;return this.withMutations(function(a){a.forEach(function(s,u){a.set(u,n.call(i,s,u,o))})})},t.prototype.__iterator=function(n,i){return new Nw(this,n,i)},t.prototype.__iterate=function(n,i){var o=this,a=0;return this._root&&this._root.iterate(function(s){return a++,n(s[1],s[0],o)},i),a},t.prototype.__ensureOwner=function(n){return n===this.__ownerID?this:n?ml(this.size,this._root,n,this.__hash):this.size===0?Gt():(this.__ownerID=n,this.__altered=!1,this)},t})(Bt);Yr.isMap=No;var Ke=Yr.prototype;Ke[mh]=!0;Ke[xi]=Ke.remove;Ke.removeAll=Ke.deleteAll;Ke.setIn=pl;Ke.removeIn=Ke.deleteIn=vl;Ke.update=yl;Ke.updateIn=bl;Ke.merge=Ke.concat=fh;Ke.mergeWith=hh;Ke.mergeDeep=yh;Ke.mergeDeepWith=bh;Ke.mergeIn=hl;Ke.mergeDeepIn=fl;Ke.withMutations=ki;Ke.wasAltered=gl;Ke.asImmutable=Ci;Ke["@@transducer/init"]=Ke.asMutable=Mi;Ke["@@transducer/step"]=function(e,t){return e.set(t[0],t[1])};Ke["@@transducer/result"]=function(e){return e.asImmutable()};var li=function(t,r){this.ownerID=t,this.entries=r};li.prototype.get=function(t,r,n,i){for(var o=this.entries,a=0,s=o.length;a<s;a++)if($e(n,o[a][0]))return o[a][1];return i};li.prototype.update=function(t,r,n,i,o,a,s){for(var u=o===ve,c=this.entries,h=0,g=c.length;h<g&&!$e(i,c[h][0]);h++);var A=h<g;if(A?c[h][1]===o:u)return this;if(Lt(s),(u||!A)&&Lt(a),!(u&&c.length===1)){if(!A&&!u&&c.length>=qw)return jw(t,c,i,o);var I=t&&t===this.ownerID,k=I?c:Jt(c);return A?u?h===g-1?k.pop():k[h]=k.pop():k[h]=[i,o]:k.push([i,o]),I?(this.entries=k,this):new li(t,k)}};var sn=function(t,r,n){this.ownerID=t,this.bitmap=r,this.nodes=n};sn.prototype.get=function(t,r,n,i){r===void 0&&(r=ht(n));var o=1<<((t===0?r:r>>>t)&pt),a=this.bitmap;return(a&o)===0?i:this.nodes[wh(a&o-1)].get(t+Ne,r,n,i)};sn.prototype.update=function(t,r,n,i,o,a,s){n===void 0&&(n=ht(i));var u=(r===0?n:n>>>r)&pt,c=1<<u,h=this.bitmap,g=(h&c)!==0;if(!g&&o===ve)return this;var A=wh(h&c-1),I=this.nodes,k=g?I[A]:void 0,S=wl(k,t,r+Ne,n,i,o,a,s);if(S===k)return this;if(!g&&S&&I.length>=Kw)return Lw(t,I,h,u,S);if(g&&!S&&I.length===2&&Eu(I[A^1]))return I[A^1];if(g&&S&&I.length===1&&Eu(S))return S;var _=t&&t===this.ownerID,R=g?S?h:h^c:h|c,E=g?S?_h(I,A,S,_):Bw(I,A,_):Uw(I,A,S,_);return _?(this.bitmap=R,this.nodes=E,this):new sn(t,R,E)};var ui=function(t,r,n){this.ownerID=t,this.count=r,this.nodes=n};ui.prototype.get=function(t,r,n,i){r===void 0&&(r=ht(n));var o=(t===0?r:r>>>t)&pt,a=this.nodes[o];return a?a.get(t+Ne,r,n,i):i};ui.prototype.update=function(t,r,n,i,o,a,s){n===void 0&&(n=ht(i));var u=(r===0?n:n>>>r)&pt,c=o===ve,h=this.nodes,g=h[u];if(c&&!g)return this;var A=wl(g,t,r+Ne,n,i,o,a,s);if(A===g)return this;var I=this.count;if(!g)I++;else if(!A&&(I--,I<Ww))return Fw(t,h,I,u);var k=t&&t===this.ownerID,S=_h(h,u,A,k);return k?(this.count=I,this.nodes=S,this):new ui(t,I,S)};var _r=function(t,r,n){this.ownerID=t,this.keyHash=r,this.entries=n,this._index=void 0};_r.prototype._positionOf=function(t,r){var n=this.entries,i=this._index;if(i===void 0&&r&&n.length>=zw&&(i=this._buildIndex()),i!==void 0){var o=i[ol(t)];if(o!==void 0)for(var a=0;a<o.length;a++){var s=o[a];if($e(t,n[s][0]))return s}return-1}for(var u=0,c=n.length;u<c;u++)if($e(t,n[u][0]))return u;return-1};_r.prototype._buildIndex=function(){for(var t=Object.create(null),r=this.entries,n=0,i=r.length;n<i;n++){var o=ol(r[n][0]),a=t[o];a!==void 0?a.push(n):t[o]=[n]}return this._index=t,t};_r.prototype.get=function(t,r,n,i){var o=this._positionOf(n,!0);return o===-1?i:this.entries[o][1]};_r.prototype.update=function(t,r,n,i,o,a,s){n===void 0&&(n=ht(i));var u=o===ve;if(n!==this.keyHash)return u?this:(Lt(s),Lt(a),_l(this,t,r,n,[i,o]));var c=this.entries,h=c.length,g=t&&t===this.ownerID,A=this._positionOf(i,g),I=A===-1?h:A,k=A!==-1;if(k?c[I][1]===o:u)return this;if(Lt(s),(u||!k)&&Lt(a),u&&h===2)return new or(t,this.keyHash,c[I^1]);var S=g?c:Jt(c);if(k)u?(I===h-1?S.pop():S[I]=S.pop(),g&&(this._index=void 0)):S[I]=[i,o];else if(S.push([i,o]),g&&this._index!==void 0){var _=ol(i),R=this._index[_];R!==void 0?R.push(h):this._index[_]=[h]}return g?(this.entries=S,this):new _r(t,this.keyHash,S)};var or=function(t,r,n){this.ownerID=t,this.keyHash=r,this.entry=n};or.prototype.get=function(t,r,n,i){return $e(n,this.entry[0])?this.entry[1]:i};or.prototype.update=function(t,r,n,i,o,a,s){var u=o===ve,c=$e(i,this.entry[0]);if(c?o===this.entry[1]:u)return this;if(Lt(s),u){Lt(a);return}return c?t&&t===this.ownerID?(this.entry[1]=o,this):new or(t,this.keyHash,[i,o]):(Lt(a),_l(this,t,r,ht(i),[i,o]))};li.prototype.iterate=_r.prototype.iterate=function(e,t){for(var r=this.entries,n=0,i=r.length-1;n<=i;n++)if(e(r[t?i-n:n])===!1)return!1};sn.prototype.iterate=ui.prototype.iterate=function(e,t){for(var r=this.nodes,n=0,i=r.length-1;n<=i;n++){var o=r[t?i-n:n];if(o&&o.iterate(e,t)===!1)return!1}};or.prototype.iterate=function(e,t){return e(this.entry)};var Nw=(function(e){function t(r,n,i){this._type=n,this._reverse=i,this._stack=r._root&&Au(r._root)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.next=function(){for(var n=this._type,i=this._stack;i;){var o=i.node,a=i.index++,s=void 0;if(o.entry){if(a===0)return ra(n,o.entry)}else if(o.entries){if(s=o.entries.length-1,a<=s)return ra(n,o.entries[this._reverse?s-a:a])}else if(s=o.nodes.length-1,a<=s){var u=o.nodes[this._reverse?s-a:a];if(u){if(u.entry)return ra(n,u.entry);i=this._stack=Au(u,i)}continue}i=this._stack=this._stack.__prev}return at()},t})(Ie);function ra(e,t){return qe(e,t[0],t[1])}function Au(e,t){return{node:e,index:0,__prev:t}}function ml(e,t,r,n){var i=Object.create(Ke);return i.size=e,i._root=t,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}var vu;function Gt(){return vu||(vu=ml(0))}function Su(e,t,r){var n,i;if(e._root){var o=ms(),a=ms();if(n=wl(e._root,e.__ownerID,0,void 0,t,r,o,a),!a.value)return e;i=e.size+(o.value?r===ve?-1:1:0)}else{if(r===ve)return e;i=1,n=new li(e.__ownerID,[[t,r]])}return e.__ownerID?(e.size=i,e._root=n,e.__hash=void 0,e.__altered=!0,e):n?ml(i,n):Gt()}function wl(e,t,r,n,i,o,a,s){return e?e.update(t,r,n,i,o,a,s):o===ve?e:(Lt(s),Lt(a),new or(t,n,[i,o]))}function Eu(e){return e.constructor===or||e.constructor===_r}function _l(e,t,r,n,i){if(e.keyHash===n)return new _r(t,n,[e.entry,i]);var o=(r===0?e.keyHash:e.keyHash>>>r)&pt,a=(r===0?n:n>>>r)&pt,s,u=o===a?[_l(e,t,r+Ne,n,i)]:(s=new or(t,n,i),o<a?[e,s]:[s,e]);return new sn(t,1<<o|1<<a,u)}function jw(e,t,r,n){e||(e=new $s);for(var i=new or(e,ht(r),[r,n]),o=0;o<t.length;o++){var a=t[o];i=i.update(e,0,void 0,a[0],a[1])}return i}function Fw(e,t,r,n){for(var i=0,o=0,a=new Array(r),s=0,u=1,c=t.length;s<c;s++,u<<=1){var h=t[s];h!==void 0&&s!==n&&(i|=u,a[o++]=h)}return new sn(e,i,a)}function Lw(e,t,r,n,i){for(var o=0,a=new Array(Tt),s=0;r!==0;s++,r>>>=1)a[s]=r&1?t[o++]:void 0;return a[n]=i,new ui(e,o+1,a)}function wh(e){return e-=e>>1&1431655765,e=(e&858993459)+(e>>2&858993459),e=e+(e>>4)&252645135,e+=e>>8,e+=e>>16,e&127}function _h(e,t,r,n){var i=n?e:Jt(e);return i[t]=r,i}function Uw(e,t,r,n){var i=e.length+1;if(n&&t+1===i)return e[t]=r,e;for(var o=new Array(i),a=0,s=0;s<i;s++)s===t?(o[s]=r,a=-1):o[s]=e[s+a];return o}function Bw(e,t,r){var n=e.length-1;if(r&&t===n)return e.pop(),e;for(var i=new Array(n),o=0,a=0;a<n;a++)a===t&&(o=1),i[a]=e[a+o];return i}var qw=Tt/4,Kw=Tt/2,Ww=Tt/4,zw=16;function Ah(e){if(el(e)&&typeof e!="string")return e;if(Vt(e))return e.toArray();throw new TypeError("Invalid keyPath: expected Ordered Collection or Array: "+e)}function ci(e){try{return typeof e=="string"?JSON.stringify(e):String(e)}catch{return JSON.stringify(e)}}function vh(e,t){return qt(e)?e.has(t):wr(e)&&bn.call(e,t)}function Al(e,t,r){return qt(e)?e.get(t,r):vh(e,t)?typeof e.get=="function"?e.get(t):e[t]:r}function Sh(e,t){if(!wr(e))throw new TypeError("Cannot update non-data-structure value: "+e);if(qt(e)){if(!e.remove)throw new TypeError("Cannot update immutable value without .remove() method: "+e);return e.remove(t)}if(!bn.call(e,t))return e;var r=ho(e);return Array.isArray(r)?r.splice(t,1):delete r[t],r}function Eh(e,t,r){if(Pi(t))return e;if(!wr(e))throw new TypeError("Cannot update non-data-structure value: "+e);if(qt(e)){if(!e.set)throw new TypeError("Cannot update immutable value without .set() method: "+e);return e.set(t,r)}if(bn.call(e,t)&&r===e[t])return e;var n=ho(e);return n[t]=r,n}function Xr(e,t,r,n){n||(n=r,r=void 0);var i=xh(qt(e),e,Ah(t),0,r,n);return i===ve?r:i}function xh(e,t,r,n,i,o){var a=t===ve;if(n===r.length){var s=a?i:t,u=o(s);return u===s?t:u}if(!a&&!wr(t))throw new TypeError("Cannot update within non-data-structure value in path ["+Array.from(r).slice(0,n).map(ci)+"]: "+t);var c=r[n],h=a?ve:Al(t,c,ve),g=xh(h===ve?e:qt(h),h,r,n+1,i,o);return g===h?t:g===ve?Sh(t,c):Eh(a?e?Gt():{}:t,c,g)}function Ih(e,t){return Xr(e,t,function(){return ve})}function vl(e){return Ih(this,e)}var Rh="@@__IMMUTABLE_LIST__@@";function Sl(e){return!!(e&&e[Rh])}var Di=(function(e){function t(r){var n=no();if(r==null)return n;if(Sl(r))return r;var i=e(r),o=i.size;return o===0?n:(Pt(o),o>0&&o<Tt?di(0,o,Ne,void 0,new yr(i.toArray())):n.withMutations(function(a){a.setSize(o),i.forEach(function(s,u){return a.set(u,s)})}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("List [","]")},t.prototype.get=function(n,i){if(n=gr(this,n),n>=0&&n<this.size){n+=this._origin;var o=Ch(this,n);return o&&o.array[n&pt]}return i},t.prototype.set=function(n,i){return Hw(this,n,i)},t.prototype.remove=function(n){return this.has(n)?n===0?this.shift():n===this.size-1?this.pop():this.splice(n,1):this},t.prototype.insert=function(n,i){return this.splice(n,0,i)},t.prototype.clear=function(){return this.size===0?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=Ne,this._root=this._tail=this.__hash=void 0,this.__altered=!0,this):no()},t.prototype.push=function(){var n=arguments,i=this.size;return this.withMutations(function(o){fr(o,0,i+n.length);for(var a=0;a<n.length;a++)o.set(i+a,n[a])})},t.prototype.pop=function(){return fr(this,0,-1)},t.prototype.unshift=function(){var n=arguments;return this.withMutations(function(i){fr(i,-n.length);for(var o=0;o<n.length;o++)i.set(o,n[o])})},t.prototype.shift=function(){return fr(this,1)},t.prototype.shuffle=function(n){return n===void 0&&(n=Math.random),this.withMutations(function(i){for(var o=i.size,a,s;o;)a=Math.floor(n()*o--),s=i.get(a),i.set(a,i.get(o)),i.set(o,s)})},t.prototype.concat=function(){for(var n=arguments,i=[],o=0;o<arguments.length;o++){var a=n[o],s=e(typeof a!="string"&&Zs(a)?a:[a]);s.size!==0&&i.push(s)}return i.length===0?this:this.size===0&&!this.__ownerID&&i.length===1?this.constructor(i[0]):this.withMutations(function(u){i.forEach(function(c){return c.forEach(function(h){return u.push(h)})})})},t.prototype.setSize=function(n){return fr(this,0,n)},t.prototype.map=function(n,i){var o=this;return this.withMutations(function(a){for(var s=0;s<o.size;s++)a.set(s,n.call(i,a.get(s),s,o))})},t.prototype.slice=function(n,i){var o=this.size;return Ii(n,i,o)?this:fr(this,yn(n,o),Ri(i,o))},t.prototype.__iterator=function(n,i){var o=i?this.size:0,a=xu(this,i);return new Ie(function(){var s=a();return s===ii?at():qe(n,i?--o:o++,s)})},t.prototype.__iterate=function(n,i){for(var o=i?this.size:0,a=xu(this,i),s;(s=a())!==ii&&n(s,i?--o:o++,this)!==!1;);return o},t.prototype.__ensureOwner=function(n){return n===this.__ownerID?this:n?di(this._origin,this._capacity,this._level,this._root,this._tail,n,this.__hash):this.size===0?no():(this.__ownerID=n,this.__altered=!1,this)},t})(Gr);Di.isList=Sl;var Ge=Di.prototype;Ge[Rh]=!0;Ge[xi]=Ge.remove;Ge.merge=Ge.concat;Ge.setIn=pl;Ge.deleteIn=Ge.removeIn=vl;Ge.update=yl;Ge.updateIn=bl;Ge.mergeIn=hl;Ge.mergeDeepIn=fl;Ge.withMutations=ki;Ge.wasAltered=gl;Ge.asImmutable=Ci;Ge["@@transducer/init"]=Ge.asMutable=Mi;Ge["@@transducer/step"]=function(e,t){return e.push(t)};Ge["@@transducer/result"]=function(e){return e.asImmutable()};var yr=function(t,r){this.array=t,this.ownerID=r};yr.prototype.removeBefore=function(t,r,n){if((n&(1<<r+Ne)-1)===0||this.array.length===0)return this;var i=n>>>r&pt;if(i>=this.array.length)return new yr([],t);var o=i===0,a;if(r>0){var s=this.array[i];if(a=s&&s.removeBefore(t,r-Ne,n),a===s&&o)return this}if(o&&!a)return this;var u=ln(this,t);if(!o)for(var c=0;c<i;c++)u.array[c]=void 0;return a&&(u.array[i]=a),u};yr.prototype.removeAfter=function(t,r,n){if(n===(r?1<<r+Ne:Tt)||this.array.length===0)return this;var i=n-1>>>r&pt;if(i>=this.array.length)return this;var o;if(r>0){var a=this.array[i];if(o=a&&a.removeAfter(t,r-Ne,n),o===a&&i===this.array.length-1)return this}var s=ln(this,t);return s.array.splice(i+1),o&&(s.array[i]=o),s};var ii={};function xu(e,t){var r=e._origin,n=e._capacity,i=fi(n),o=e._tail;return a(e._root,e._level,0);function a(c,h,g){return h===0?s(c,g):u(c,h,g)}function s(c,h){var g=h===i?o&&o.array:c&&c.array,A=h>r?0:r-h,I=n-h;return I>Tt&&(I=Tt),function(){if(A===I)return ii;var k=t?--I:A++;return g&&g[k]}}function u(c,h,g){var A,I=c&&c.array,k=g>r?0:r-g>>h,S=(n-g>>h)+1;return S>Tt&&(S=Tt),function(){for(;;){if(A){var _=A();if(_!==ii)return _;A=null}if(k===S)return ii;var R=t?--S:k++;A=a(I&&I[R],h-Ne,g+(R<<h))}}}}function di(e,t,r,n,i,o,a){var s=Object.create(Ge);return s.size=t-e,s._origin=e,s._capacity=t,s._level=r,s._root=n,s._tail=i,s.__ownerID=o,s.__hash=a,s.__altered=!1,s}function no(){return di(0,0,Ne)}function Hw(e,t,r){if(t=gr(e,t),t!==t)return e;if(t>=e.size||t<0)return e.withMutations(function(a){t<0?fr(a,t).set(0,r):fr(a,0,t+1).set(t,r)});t+=e._origin;var n=e._tail,i=e._root,o=ms();return t>=fi(e._capacity)?n=Ss(n,e.__ownerID,0,t,r,o):i=Ss(i,e.__ownerID,e._level,t,r,o),o.value?e.__ownerID?(e._root=i,e._tail=n,e.__hash=void 0,e.__altered=!0,e):di(e._origin,e._capacity,e._level,i,n):e}function Ss(e,t,r,n,i,o){var a=n>>>r&pt,s=e&&a<e.array.length;if(!s&&i===void 0)return e;var u;if(r>0){var c=e&&e.array[a],h=Ss(c,t,r-Ne,n,i,o);return h===c?e:(u=ln(e,t),u.array[a]=h,u)}return s&&e.array[a]===i?e:(o&&Lt(o),u=ln(e,t),i===void 0&&a===u.array.length-1?u.array.pop():u.array[a]=i,u)}function ln(e,t){return t&&e&&t===e.ownerID?e:new yr(e?e.array.slice():[],t)}function Ch(e,t){if(t>=fi(e._capacity))return e._tail;if(t<1<<e._level+Ne){for(var r=e._root,n=e._level;r&&n>0;)r=r.array[t>>>n&pt],n-=Ne;return r}}function Vw(e,t,r){var n=e._origin+(t===void 0?0:t),i=r===void 0?e._capacity:r<0?e._capacity+r:e._origin+r;if(Number.isFinite(i)&&i>Wi||Number.isFinite(n)&&n<-Wi||Number.isFinite(i)&&Number.isFinite(n)&&i-n>Wi)throw new RangeError("Invalid List size: a List cannot hold more than "+Wi+" (2 ** 30) values.")}function fr(e,t,r){Vw(e,t,r),t!==void 0&&(t|=0),r!==void 0&&(r|=0);var n=e.__ownerID||new $s,i=e._origin,o=e._capacity,a=i+t,s=r===void 0?o:r<0?o+r:i+r;if(a===i&&s===o)return e;if(a>=s)return e.clear();for(var u=e._level,c=e._root,h=0;a+h<0;)c=new yr(c&&c.array.length?[void 0,c]:[],n),u+=Ne,h+=Iu(u);h&&(a+=h,i+=h,s+=h,o+=h);for(var g=fi(o),A=fi(s);A>=Iu(u+Ne);)c=new yr(c&&c.array.length?[c]:[],n),u+=Ne;var I=e._tail,k=A<g?Ch(e,s-1):A>g?new yr([],n):I;if(I&&A>g&&a<o&&I.array.length){c=ln(c,n);for(var S=c,_=u;_>Ne;_-=Ne){var R=g>>>_&pt;S=S.array[R]=ln(S.array[R],n)}S.array[g>>>Ne&pt]=I}if(s<o&&(k=k&&k.removeAfter(n,0,s)),a>=A)a-=A,s-=A,u=Ne,c=void 0,k=k&&k.removeBefore(n,0,a);else if(a>i||A<g){for(h=0;c;){var E=a>>>u&pt;if(E!==A>>>u&pt)break;E&&(h+=(1<<u)*E),u-=Ne,c=c.array[E]}c&&a>i&&(c=c.removeBefore(n,u,a-h)),c&&A<g&&(c=c.removeAfter(n,u,A-h)),h&&(a-=h,s-=h)}return e.__ownerID?(e.size=s-a,e._origin=a,e._capacity=s,e._level=u,e._root=c,e._tail=k,e.__hash=void 0,e.__altered=!0,e):di(a,s,u,c,k)}function fi(e){return e<Tt?0:e-1>>>Ne<<Ne}var Wi=Math.pow(2,30);function Iu(e){return e<31?1<<e:Math.pow(2,e)}function El(e){return No(e)&&Vt(e)}var Zt=(function(e){function t(r){return r==null?Yn():El(r)?r:Yn().withMutations(function(n){var i=Bt(r);Pt(i.size),i.forEach(function(o,a){return n.set(a,o)})})}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("OrderedMap {","}")},t.prototype.get=function(n,i){var o=this._map.get(n);return o!==void 0?this._list.get(o)[1]:i},t.prototype.clear=function(){return this.size===0?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this.__altered=!0,this):Yn()},t.prototype.set=function(n,i){return Cu(this,n,i)},t.prototype.remove=function(n){return Cu(this,n,ve)},t.prototype.__iterate=function(n,i){var o=this;return this._list.__iterate(function(a){return a&&n(a[1],a[0],o)},i)},t.prototype.__iterator=function(n,i){return this._list.fromEntrySeq().__iterator(n,i)},t.prototype.__ensureOwner=function(n){if(n===this.__ownerID)return this;var i=this._map.__ensureOwner(n),o=this._list.__ensureOwner(n);return n?xl(i,o,n,this.__hash):this.size===0?Yn():(this.__ownerID=n,this.__altered=!1,this._map=i,this._list=o,this)},t})(Yr);Zt.isOrderedMap=El;Zt.prototype[mr]=!0;Zt.prototype[xi]=Zt.prototype.remove;function xl(e,t,r,n){var i=Object.create(Zt.prototype);return i.size=e?e.size:0,i._map=e,i._list=t,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}var Ru;function Yn(){return Ru||(Ru=xl(Gt(),no()))}function Cu(e,t,r){var n=e._map,i=e._list,o=n.get(t),a=o!==void 0,s,u;if(r===ve){if(!a)return e;i.size>=Tt&&i.size>=n.size*2?(u=i.filter(function(c,h){return c!==void 0&&o!==h}),s=u.toKeyedSeq().map(function(c){return c[0]}).flip().toMap(),e.__ownerID&&(s.__ownerID=u.__ownerID=e.__ownerID)):(s=n.remove(t),u=o===i.size-1?i.pop():i.set(o,void 0))}else if(a){if(r===i.get(o)[1])return e;s=n,u=i.set(o,[t,r])}else s=n.set(t,i.size),u=i.set(i.size,[t,r]);return e.__ownerID?(e.size=s.size,e._map=s,e._list=u,e.__hash=void 0,e.__altered=!0,e):xl(s,u)}var Mh="@@__IMMUTABLE_STACK__@@";function po(e){return!!(e&&e[Mh])}var jo=(function(e){function t(r){return r==null?zi():po(r)?r:zi().pushAll(r)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("Stack [","]")},t.prototype.get=function(n,i){var o=this._head;for(n=gr(this,n);o&&n--;)o=o.next;return o?o.value:i},t.prototype.peek=function(){return this._head&&this._head.value},t.prototype.push=function(){var n=arguments;if(arguments.length===0)return this;for(var i=this.size+arguments.length,o=this._head,a=arguments.length-1;a>=0;a--)o={value:n[a],next:o};return this.__ownerID?(this.size=i,this._head=o,this.__hash=void 0,this.__altered=!0,this):Xn(i,o)},t.prototype.pushAll=function(n){if(n=e(n),n.size===0)return this;if(this.size===0&&po(n))return n;Pt(n.size);var i=this.size,o=this._head;return n.__iterate(function(a){i++,o={value:a,next:o}},!0),this.__ownerID?(this.size=i,this._head=o,this.__hash=void 0,this.__altered=!0,this):Xn(i,o)},t.prototype.pop=function(){return this.slice(1)},t.prototype.clear=function(){return this.size===0?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):zi()},t.prototype.slice=function(n,i){if(Ii(n,i,this.size))return this;var o=yn(n,this.size),a=Ri(i,this.size);if(a!==this.size)return e.prototype.slice.call(this,n,i);for(var s=this.size-o,u=this._head;o--;)u=u.next;return this.__ownerID?(this.size=s,this._head=u,this.__hash=void 0,this.__altered=!0,this):Xn(s,u)},t.prototype.__ensureOwner=function(n){return n===this.__ownerID?this:n?Xn(this.size,this._head,n,this.__hash):this.size===0?zi():(this.__ownerID=n,this.__altered=!1,this)},t.prototype.__iterate=function(n,i){var o=this;if(i)return new on(this.toArray()).__iterate(function(u,c){return n(u,c,o)},i);for(var a=0,s=this._head;s&&n(s.value,a++,this)!==!1;)s=s.next;return a},t.prototype.__iterator=function(n,i){if(i)return new on(this.toArray()).__iterator(n,i);var o=0,a=this._head;return new Ie(function(){if(a){var s=a.value;return a=a.next,qe(n,o++,s)}return at()})},t})(Gr);jo.isStack=po;var bt=jo.prototype;bt[Mh]=!0;bt.shift=bt.pop;bt.unshift=bt.push;bt.unshiftAll=bt.pushAll;bt.withMutations=ki;bt.wasAltered=gl;bt.asImmutable=Ci;bt["@@transducer/init"]=bt.asMutable=Mi;bt["@@transducer/step"]=function(e,t){return e.unshift(t)};bt["@@transducer/result"]=function(e){return e.asImmutable()};function Xn(e,t,r,n){var i=Object.create(bt);return i.size=e,i._head=t,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}var Mu;function zi(){return Mu||(Mu=Xn(0))}function Pu(e,t,r,n,i,o){return Pt(e.size),e.__iterate(function(a,s,u){i?(i=!1,r=a):r=t.call(n,r,a,s,u)},o),r}function Qw(e,t){return t}function Jw(e,t){return[t,e]}function na(e){return function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];return!e.apply(this,t)}}function Tu(e){return function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];return-e.apply(this,t)}}function Ou(e,t){return e<t?1:e>t?-1:0}function Il(e,t){if(e===t)return!0;if(!Et(t)||e.size!==void 0&&t.size!==void 0&&e.size!==t.size||e.__hash!==void 0&&t.__hash!==void 0&&e.__hash!==t.__hash||Fe(e)!==Fe(t)||St(e)!==St(t)||Vt(e)!==Vt(t))return!1;if(e.size===0&&t.size===0)return!0;var r=!Mo(e);if(Vt(e)){var n=e.entries();return t.every(function(u,c){var h=n.next().value;return h&&$e(h[1],u)&&(r||$e(h[0],c))})&&n.next().done}var i=!1;if(e.size===void 0)if(t.size===void 0)typeof e.cacheResult=="function"&&e.cacheResult();else{i=!0;var o=e;e=t,t=o}var a=!0,s=t.__iterate(function(u,c){if(r?!e.has(u):i?!$e(u,e.get(c,ve)):!$e(e.get(c,ve),u))return a=!1,!1});return a&&e.size===s}var Ph=(function(e){function t(r,n,i){if(i===void 0&&(i=1),!(this instanceof t))return new t(r,n,i);if(ni(i!==0,"Cannot step a Range by 0"),ni(r!==void 0,"You must define a start value when using Range"),ni(n!==void 0,"You must define an end value when using Range"),i=Math.abs(i),n<r&&(i=-i),this._start=r,this._end=n,this._step=i,this.size=Math.max(0,Math.ceil((n-r)/i-1)+1),this.size===0){if(ia)return ia;ia=this}}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return this.size===0?"Range []":"Range [ "+this._start+"..."+this._end+(this._step!==1?" by "+this._step:"")+" ]"},t.prototype.get=function(n,i){return this.has(n)?this._start+gr(this,n)*this._step:i},t.prototype.includes=function(n){var i=(n-this._start)/this._step;return i>=0&&i<this.size&&i===Math.floor(i)},t.prototype.slice=function(n,i){return Ii(n,i,this.size)?this:(n=yn(n,this.size),i=Ri(i,this.size),i<=n?new t(0,0):new t(this.get(n,this._end),this.get(i,this._end),this._step))},t.prototype.indexOf=function(n){var i=n-this._start;if(i%this._step===0){var o=i/this._step;if(o>=0&&o<this.size)return o}return-1},t.prototype.lastIndexOf=function(n){return this.indexOf(n)},t.prototype.__iterate=function(n,i){for(var o=this.size,a=this._step,s=i?this._start+(o-1)*a:this._start,u=0;u!==o&&n(s,i?o-++u:u++,this)!==!1;)s+=i?-a:a;return u},t.prototype.__iterator=function(n,i){var o=this.size,a=this._step,s=i?this._start+(o-1)*a:this._start,u=0;return new Ie(function(){if(u===o)return at();var c=s;return s+=i?-a:a,qe(n,i?o-++u:u++,c)})},t.prototype.equals=function(n){return n instanceof t?this._start===n._start&&this._end===n._end&&this._step===n._step:Il(this,n)},t})(Kt),ia,Th="@@__IMMUTABLE_SET__@@";function Fo(e){return!!(e&&e[Th])}var Ni=(function(e){function t(r){return r==null?Zn():Fo(r)&&!Vt(r)?r:Zn().withMutations(function(n){var i=e(r);Pt(i.size),i.forEach(function(o){return n.add(o)})})}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.fromKeys=function(n){return this(Bt(n).keySeq())},t.intersect=function(n){return n=et(n).toArray(),n.length?nt.intersect.apply(t(n.pop()),n):Zn()},t.union=function(n){return n=et(n).toArray(),n.length?nt.union.apply(t(n.pop()),n):Zn()},t.prototype.toString=function(){return this.__toString("Set {","}")},t.prototype.has=function(n){return this._map.has(n)},t.prototype.add=function(n){return Hi(this,this._map.set(n,n))},t.prototype.remove=function(n){return Hi(this,this._map.remove(n))},t.prototype.clear=function(){return Hi(this,this._map.clear())},t.prototype.map=function(n,i){var o=this,a=!1,s=Hi(this,this._map.mapEntries(function(u){var c=u[1],h=n.call(i,c,c,o);return h!==c&&(a=!0),[h,h]},i));return a?s:this},t.prototype.union=function(){for(var n=[],i=arguments.length;i--;)n[i]=arguments[i];return n=n.filter(function(o){return o.size!==0}),n.length===0?this:this.size===0&&!this.__ownerID&&n.length===1?this.constructor(n[0]):this.withMutations(function(o){for(var a=0;a<n.length;a++)typeof n[a]=="string"?o.add(n[a]):e(n[a]).forEach(function(s){return o.add(s)})})},t.prototype.intersect=function(){for(var n=[],i=arguments.length;i--;)n[i]=arguments[i];if(n.length===0)return this;n=n.map(function(a){return e(a)});var o=[];return this.forEach(function(a){n.every(function(s){return s.includes(a)})||o.push(a)}),this.withMutations(function(a){o.forEach(function(s){a.remove(s)})})},t.prototype.subtract=function(){for(var n=[],i=arguments.length;i--;)n[i]=arguments[i];if(n.length===0)return this;n=n.map(function(a){return e(a)});var o=[];return this.forEach(function(a){n.some(function(s){return s.includes(a)})&&o.push(a)}),this.withMutations(function(a){o.forEach(function(s){a.remove(s)})})},t.prototype.sort=function(n){return cn(an(this,n))},t.prototype.sortBy=function(n,i){return cn(an(this,i,n))},t.prototype.wasAltered=function(){return this._map.wasAltered()},t.prototype.__iterate=function(n,i){var o=this;return this._map.__iterate(function(a){return n(a,a,o)},i)},t.prototype.__iterator=function(n,i){return this._map.__iterator(n,i)},t.prototype.__ensureOwner=function(n){if(n===this.__ownerID)return this;var i=this._map.__ensureOwner(n);return n?this.__make(i,n):this.size===0?this.__empty():(this.__ownerID=n,this._map=i,this)},t})(hn);Ni.isSet=Fo;var nt=Ni.prototype;nt[Th]=!0;nt[xi]=nt.remove;nt.merge=nt.concat=nt.union;nt.withMutations=ki;nt.asImmutable=Ci;nt["@@transducer/init"]=nt.asMutable=Mi;nt["@@transducer/step"]=function(e,t){return e.add(t)};nt["@@transducer/result"]=function(e){return e.asImmutable()};nt.__empty=Zn;nt.__make=Oh;function Hi(e,t){return e.__ownerID?(e.size=t.size,e._map=t,e):t===e._map?e:t.size===0?e.__empty():e.__make(t)}function Oh(e,t){var r=Object.create(nt);return r.size=e?e.size:0,r._map=e,r.__ownerID=t,r}var ku;function Zn(){return ku||(ku=Oh(Gt()))}function Rl(e,t,r){for(var n=Ah(t),i=0;i!==n.length;)if(e=Al(e,n[i++],ve),e===ve)return r;return e}function kh(e,t){return Rl(this,e,t)}function Dh(e,t){return Rl(e,t,ve)!==ve}function Gw(e){return Dh(this,e)}function Nh(){Pt(this.size);var e={};return this.__iterate(function(t,r){Pi(r)||(e[r]=t)}),e}function yo(e){if(!e||typeof e!="object")return e;if(!Et(e)){if(!wr(e))return e;e=st(e)}if(Fe(e)){var t={};return e.__iterate(function(n,i){Pi(i)||(t[i]=yo(n))}),t}var r=[];return e.__iterate(function(n){r.push(yo(n))}),r}function Yw(e){if(e.size===1/0)return 0;var t=Vt(e),r=Fe(e),n=t?1:0;return e.__iterate(r?t?function(i,o){n=31*n+Du(ht(i),ht(o))|0}:function(i,o){n=n+Du(ht(i),ht(o))|0}:t?function(i){n=31*n+ht(i)|0}:function(i){n=n+ht(i)|0}),Xw(e.size,n)}function Xw(e,t){return t=On(t,3432918353),t=On(t<<15|t>>>-15,461845907),t=On(t<<13|t>>>-13,5),t=(t+3864292196|0)^e,t=On(t^t>>>16,2246822507),t=On(t^t>>>13,3266489909),t=ko(t^t>>>16),t}function Du(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}function Zr(e,t){var r=function(n){e.prototype[n]=t[n]};return Object.keys(t).forEach(r),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(r),e}et.Iterator=Ie;Zr(et,{toArray:function(){Pt(this.size);var t=new Array(this.size||0),r=Fe(this),n=0;return this.__iterate(function(i,o){t[n++]=r?[o,i]:i}),t},toIndexedSeq:function(){return new nh(this)},toJS:function(){return yo(this)},toKeyedSeq:function(){return new Do(this,!0)},toMap:function(){return Yr(this.toKeyedSeq())},toObject:Nh,toOrderedMap:function(){return Zt(this.toKeyedSeq())},toOrderedSet:function(){return cn(Fe(this)?this.valueSeq():this)},toSet:function(){return Ni(Fe(this)?this.valueSeq():this)},toSetSeq:function(){return new ih(this)},toSeq:function(){return St(this)?this.toIndexedSeq():Fe(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return jo(Fe(this)?this.valueSeq():this)},toList:function(){return Di(Fe(this)?this.valueSeq():this)},toString:function(){return"[Collection]"},__toString:function(t,r){return this.size===0?t+r:t+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+r},concat:function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];return De(this,xw(this,t))},includes:function(t){return this.some(function(r){return $e(r,t)})},entries:function(){return this.__iterator(kt)},every:function(t,r){Pt(this.size);var n=!0;return this.__iterate(function(i,o,a){if(!t.call(r,i,o,a))return n=!1,!1}),n},filter:function(t,r){return De(this,lh(this,t,r,!0))},partition:function(t,r){return vw(this,t,r)},find:function(t,r,n){var i=this.findEntry(t,r);return i?i[1]:n},forEach:function(t,r){return Pt(this.size),this.__iterate(r?t.bind(r):t)},join:function(t){Pt(this.size),t=t!==void 0?""+t:",";var r="",n=!0;return this.__iterate(function(i){n?n=!1:r+=t,r+=i!=null?i.toString():""}),r},keys:function(){return this.__iterator(pn)},map:function(t,r){return De(this,sh(this,t,r))},reduce:function(t,r,n){return Pu(this,t,r,n,arguments.length<2,!1)},reduceRight:function(t,r,n){return Pu(this,t,r,n,arguments.length<2,!0)},reverse:function(){return De(this,al(this,!0))},slice:function(t,r){return De(this,sl(this,t,r,!0))},some:function(t,r){Pt(this.size);var n=!1;return this.__iterate(function(i,o,a){if(t.call(r,i,o,a))return n=!0,!1}),n},sort:function(t){return De(this,an(this,t))},values:function(){return this.__iterator(Ot)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return this.size!==void 0?this.size===0:!this.some(function(){return!0})},count:function(t,r){return nn(t?this.toSeq().filter(t,r):this)},countBy:function(t,r){return _w(this,t,r)},equals:function(t){return Il(this,t)},entrySeq:function(){var t=this;if(t._cache)return new on(t._cache);var r=t.toSeq().map(Jw).toIndexedSeq();return r.fromEntrySeq=function(){return t.toSeq()},r},filterNot:function(t,r){return this.filter(na(t),r)},findEntry:function(t,r,n){var i=n;return this.__iterate(function(o,a,s){if(t.call(r,o,a,s))return i=[a,o],!1}),i},findKey:function(t,r){var n=this.findEntry(t,r);return n&&n[0]},findLast:function(t,r,n){return this.toKeyedSeq().reverse().find(t,r,n)},findLastEntry:function(t,r,n){return this.toKeyedSeq().reverse().findEntry(t,r,n)},findLastKey:function(t,r){return this.toKeyedSeq().reverse().findKey(t,r)},first:function(t){return this.find(Yf,null,t)},flatMap:function(t,r){return De(this,Iw(this,t,r))},flatten:function(t){return De(this,ch(this,t,!0))},fromEntrySeq:function(){return new oh(this)},get:function(t,r){return this.find(function(n,i){return $e(i,t)},void 0,r)},getIn:kh,groupBy:function(t,r){return Aw(this,t,r)},has:function(t){return this.get(t,ve)!==ve},hasIn:Gw,isSubset:function(t){return t=typeof t.includes=="function"?t:et(t),this.every(function(r){return t.includes(r)})},isSuperset:function(t){return t=typeof t.isSubset=="function"?t:et(t),t.isSubset(this)},keyOf:function(t){return this.findKey(function(r){return $e(r,t)})},keySeq:function(){return this.toSeq().map(Qw).toIndexedSeq()},last:function(t){return this.toSeq().reverse().first(t)},lastKeyOf:function(t){return this.toKeyedSeq().reverse().keyOf(t)},max:function(t){return qi(this,t)},maxBy:function(t,r){return qi(this,r,t)},min:function(t){return qi(this,t?Tu(t):Ou)},minBy:function(t,r){return qi(this,r?Tu(r):Ou,t)},rest:function(){return this.slice(1)},skip:function(t){return t===0?this:this.slice(Math.max(0,t))},skipLast:function(t){return t===0?this:this.slice(0,-Math.max(0,t))},skipWhile:function(t,r){return De(this,uh(this,t,r,!0))},skipUntil:function(t,r){return this.skipWhile(na(t),r)},sortBy:function(t,r){return De(this,an(this,r,t))},take:function(t){return this.slice(0,Math.max(0,t))},takeLast:function(t){return this.slice(-Math.max(0,t))},takeWhile:function(t,r){return De(this,Sw(this,t,r))},takeUntil:function(t,r){return this.takeWhile(na(t),r)},update:function(t){return t(this)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=Yw(this))}});var lt=et.prototype;lt[Jf]=!0;lt[Po]=lt.values;lt.toJSON=lt.toArray;lt.__toStringMapper=ci;lt.inspect=lt.toSource=function(){return this.toString()};lt.chain=lt.flatMap;lt.contains=lt.includes;Zr(Bt,{flip:function(){return De(this,ah(this))},mapEntries:function(t,r){var n=this,i=0;return De(this,this.toSeq().map(function(o,a){return t.call(r,[a,o],i++,n)}).fromEntrySeq())},mapKeys:function(t,r){var n=this;return De(this,this.toSeq().flip().map(function(i,o){return t.call(r,i,o,n)}).flip())}});var ji=Bt.prototype;ji[fo]=!0;ji[Po]=lt.entries;ji.toJSON=Nh;ji.__toStringMapper=function(e,t){return ci(t)+": "+ci(e)};Zr(Gr,{toKeyedSeq:function(){return new Do(this,!1)},filter:function(t,r){return De(this,lh(this,t,r,!1))},findIndex:function(t,r){var n=this.findEntry(t,r);return n?n[0]:-1},indexOf:function(t){var r=this.keyOf(t);return r===void 0?-1:r},lastIndexOf:function(t){var r=this.lastKeyOf(t);return r===void 0?-1:r},reverse:function(){return De(this,al(this,!1))},slice:function(t,r){return De(this,sl(this,t,r,!1))},splice:function(t,r){var n=arguments.length;if(r=Math.max(r||0,0),n===0||n===2&&!r)return this;t=yn(t,t<0?this.count():this.size);var i=this.slice(0,t);return De(this,n===1?i:i.concat(Jt(arguments,2),this.slice(t+r)))},findLastIndex:function(t,r){var n=this.findLastEntry(t,r);return n?n[0]:-1},first:function(t){return this.get(0,t)},flatten:function(t){return De(this,ch(this,t,!1))},get:function(t,r){return t=gr(this,t),t<0||this.size===1/0||this.size!==void 0&&t>this.size?r:this.find(function(n,i){return i===t},void 0,r)},has:function(t){return t=gr(this,t),t>=0&&(this.size!==void 0?this.size===1/0||t<this.size:this.find(function(r,n){return n===t},void 0,ve)!==ve)},interpose:function(t){return De(this,Rw(this,t))},interleave:function(){var t=[this].concat(Jt(arguments)),r=Ki(this.toSeq(),Kt.of,t),n=r.flatten(!0);return r.size&&(n.size=r.size*t.length),De(this,n)},keySeq:function(){return Ph(0,this.size)},last:function(t){return this.get(-1,t)},skipWhile:function(t,r){return De(this,uh(this,t,r,!1))},zip:function(){var t=[this].concat(Jt(arguments));return De(this,Ki(this,Nu,t))},zipAll:function(){var t=[this].concat(Jt(arguments));return De(this,Ki(this,Nu,t,!0))},zipWith:function(t){var r=Jt(arguments);return r[0]=this,De(this,Ki(this,t,r))}});var mn=Gr.prototype;mn[co]=!0;mn[mr]=!0;Zr(hn,{get:function(t,r){return this.has(t)?t:r},includes:function(t){return this.has(t)},keySeq:function(){return this.valueSeq()}});var un=hn.prototype;un.has=lt.includes;un.contains=un.includes;un.keys=un.values;Zr(Er,ji);Zr(Kt,mn);Zr(gn,un);function Nu(){return Jt(arguments)}function Cl(e){return Fo(e)&&Vt(e)}var cn=(function(e){function t(r){return r==null?Es():Cl(r)?r:Es().withMutations(function(n){var i=hn(r);Pt(i.size),i.forEach(function(o){return n.add(o)})})}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.fromKeys=function(n){return this(Bt(n).keySeq())},t.prototype.toString=function(){return this.__toString("OrderedSet {","}")},t})(Ni);cn.isOrderedSet=Cl;var $r=cn.prototype;$r[mr]=!0;$r.zip=mn.zip;$r.zipWith=mn.zipWith;$r.zipAll=mn.zipAll;$r.__empty=Es;$r.__make=jh;function jh(e,t){var r=Object.create($r);return r.size=e?e.size:0,r._map=e,r.__ownerID=t,r}var ju;function Es(){return ju||(ju=jh(Yn()))}var Zw={LeftThenRight:-1,RightThenLeft:1};function $w(e){if(Sr(e))throw new Error("Can not call `Record` with an immutable Record as default values. Use a plain javascript object instead.");if(qt(e))throw new Error("Can not call `Record` with an immutable Collection as default values. Use a plain javascript object instead.");if(e===null||typeof e!="object")throw new Error("Can not call `Record` with a non-object as default values. Use a plain javascript object instead.")}var Xe=function(t,r){var n;$w(t);var i=function(s){var u=this;if(s instanceof i)return s;if(!(this instanceof i))return new i(s);if(!n){n=!0;var c=Object.keys(t),h=o._indices={};o._name=r,o._keys=c,o._defaultValues=t;for(var g=0;g<c.length;g++){var A=c[g];h[A]=g,o[A]?typeof console=="object"&&console.warn&&console.warn("Cannot define "+Pl(this)+' with property "'+A+'" since that property name is part of the Record API.'):e_(o,A)}}return this.__ownerID=void 0,this._values=Di().withMutations(function(I){I.setSize(u._keys.length),Bt(s).forEach(function(k,S){I.set(u._indices[S],k===u._defaultValues[S]?void 0:k)})}),this},o=i.prototype=Object.create(Le);return o.constructor=i,r&&(i.displayName=r),i};Xe.prototype.toString=function(){for(var t=Pl(this)+" { ",r=this._keys,n,i=0,o=r.length;i!==o;i++)n=r[i],t+=(i?", ":"")+n+": "+ci(this.get(n));return t+" }"};Xe.prototype.equals=function(t){return this===t||Sr(t)&&dn(this).equals(dn(t))};Xe.prototype.hashCode=function(){return dn(this).hashCode()};Xe.prototype.has=function(t){return this._indices.hasOwnProperty(t)};Xe.prototype.get=function(t,r){if(!this.has(t))return r;var n=this._indices[t],i=this._values.get(n);return i===void 0?this._defaultValues[t]:i};Xe.prototype.set=function(t,r){if(this.has(t)){var n=this._values.set(this._indices[t],r===this._defaultValues[t]?void 0:r);if(n!==this._values&&!this.__ownerID)return Ml(this,n)}return this};Xe.prototype.remove=function(t){return this.set(t)};Xe.prototype.clear=function(){var t=this._values.clear().setSize(this._keys.length);return this.__ownerID?this:Ml(this,t)};Xe.prototype.wasAltered=function(){return this._values.wasAltered()};Xe.prototype.toSeq=function(){return dn(this)};Xe.prototype.toJS=function(){return yo(this)};Xe.prototype.entries=function(){return this.__iterator(kt)};Xe.prototype.__iterator=function(t,r){return dn(this).__iterator(t,r)};Xe.prototype.__iterate=function(t,r){return dn(this).__iterate(t,r)};Xe.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var r=this._values.__ensureOwner(t);return t?Ml(this,r,t):(this.__ownerID=t,this._values=r,this)};Xe.isRecord=Sr;Xe.getDescriptiveName=Pl;var Le=Xe.prototype;Le[$f]=!0;Le[xi]=Le.remove;Le.deleteIn=Le.removeIn=vl;Le.getIn=kh;Le.hasIn=lt.hasIn;Le.merge=fh;Le.mergeWith=hh;Le.mergeIn=hl;Le.mergeDeep=yh;Le.mergeDeepWith=bh;Le.mergeDeepIn=fl;Le.setIn=pl;Le.update=yl;Le.updateIn=bl;Le.withMutations=ki;Le.asMutable=Mi;Le.asImmutable=Ci;Le[Po]=Le.entries;Le.toJSON=Le.toObject=lt.toObject;Le.inspect=Le.toSource=function(){return this.toString()};function Ml(e,t,r){var n=Object.create(Object.getPrototypeOf(e));return n._values=t,n.__ownerID=r,n}function Pl(e){return e.constructor.displayName||e.constructor.name||"Record"}function dn(e){return nl(e._keys.map(function(t){return[t,e.get(t)]}))}function e_(e,t){try{Object.defineProperty(e,t,{get:function(){return this.get(t)},set:function(r){ni(this.__ownerID,"Cannot set on an immutable record."),this.set(t,r)}})}catch{}}var t_=(function(e){function t(r,n){if(!(this instanceof t))return new t(r,n);if(this._value=r,this.size=n===void 0?1/0:Math.max(0,n),this.size===0){if(oa)return oa;oa=this}}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return this.size===0?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},t.prototype.get=function(n,i){return this.has(n)?this._value:i},t.prototype.includes=function(n){return $e(this._value,n)},t.prototype.slice=function(n,i){var o=this.size;return Ii(n,i,o)?this:new t(this._value,Ri(i,o)-yn(n,o))},t.prototype.reverse=function(){return this},t.prototype.indexOf=function(n){return this.size!==0&&$e(this._value,n)?0:-1},t.prototype.lastIndexOf=function(n){return this.size!==0&&$e(this._value,n)?this.size-1:-1},t.prototype.__iterate=function(n,i){for(var o=this.size,a=0;a!==o&&n(this._value,i?o-++a:a++,this)!==!1;);return a},t.prototype.__iterator=function(n,i){var o=this,a=this.size,s=0;return new Ie(function(){return s===a?at():qe(n,i?a-++s:s++,o._value)})},t.prototype.equals=function(n){return n instanceof t?$e(this._value,n._value):Il(this,n)},t})(Kt),oa;function r_(e,t){return Fh([],t||n_,e,"",t&&t.length>2?[]:void 0,{"":e})}function Fh(e,t,r,n,i,o){if(typeof r!="string"&&!qt(r)&&(el(r)||Zs(r)||dl(r))){if(~e.indexOf(r))throw new TypeError("Cannot convert circular structure to Immutable");e.push(r),i&&n!==""&&i.push(n);var a=t.call(o,n,st(r).map(function(s,u){return Fh(e,t,s,u,i,r)}),i&&i.slice());return e.pop(),i&&i.pop(),a}return r}function n_(e,t){return St(t)?t.toList():Fe(t)?t.toMap():t.toSet()}var i_="5.1.9",o_=et;const a_=Object.freeze(Object.defineProperty({__proto__:null,Collection:et,Iterable:o_,List:Di,Map:Yr,OrderedMap:Zt,OrderedSet:cn,PairSorting:Zw,Range:Ph,Record:Xe,Repeat:t_,Seq:st,Set:Ni,Stack:jo,fromJS:r_,get:Al,getIn:Rl,has:vh,hasIn:Dh,hash:ht,is:$e,isAssociative:Mo,isCollection:Et,isImmutable:qt,isIndexed:St,isKeyed:Fe,isList:Sl,isMap:No,isOrdered:Vt,isOrderedMap:El,isOrderedSet:Cl,isPlainObject:dl,isRecord:Sr,isSeq:Oo,isSet:Fo,isStack:po,isValueObject:vs,merge:Mw,mergeDeep:Tw,mergeDeepWith:Ow,mergeWith:Pw,remove:Sh,removeIn:Ih,set:Eh,setIn:gh,update:cl,updateIn:Xr,version:i_},Symbol.toStringTag,{value:"Module"})),s_=Id(a_);var Fu;function Lh(){if(Fu)return Nr;Fu=1,Object.defineProperty(Nr,"__esModule",{value:!0}),Nr.ActionContextKey=Nr.ActionContext=void 0;const e=s_;let t=class $n{constructor(i={}){this.map=(0,e.Map)(i)}setDefault(i,o){return this.has(i)?this:this.set(i,o)}set(i,o){return this.setRaw(i.name,o)}setRaw(i,o){return new $n(this.map.set(i,o))}delete(i){return new $n(this.map.delete(i.name))}get(i){return this.getRaw(i.name)}getRaw(i){return this.map.get(i)}getSafe(i){if(!this.has(i))throw new Error(`Context entry ${i.name} is required but not available`);return this.get(i)}has(i){return this.hasRaw(i.name)}hasRaw(i){return this.map.has(i)}merge(...i){let o=this;for(const a of i)for(const s of a.keys())o=o.set(s,a.get(s));return o}keys(){return[...this.map.keys()].map(i=>new r(i))}toJS(){return this.map.toJS()}toString(){return`ActionContext(${JSON.stringify(this.map.toJS())})`}[Symbol.for("nodejs.util.inspect.custom")](){return`ActionContext(${JSON.stringify(this.map.toJS(),null," ")})`}static ensureActionContext(i){return i instanceof $n?i:new $n((0,e.Map)(i??{}))}};Nr.ActionContext=t;class r{constructor(i){this.name=i}}return Nr.ActionContextKey=r,Nr}var kn={},Lu;function Uh(){if(Lu)return kn;Lu=1,Object.defineProperty(kn,"__esModule",{value:!0}),kn.Bus=void 0;let e=class{constructor(r){this.actors=[],this.observers=[],this.dependencyLinks=new Map,Object.assign(this,r),this.failMessage=`All actors over bus ${this.name} failed to handle an action`}subscribe(r){this.actors.push(r),this.reorderForDependencies()}subscribeObserver(r){this.observers.push(r)}unsubscribe(r){const n=this.actors.indexOf(r);return n>=0?(this.actors.splice(n,1),!0):!1}unsubscribeObserver(r){const n=this.observers.indexOf(r);return n>=0?(this.observers.splice(n,1),!0):!1}publish(r){return this.actors.map(n=>({actor:n,reply:n.test(r)}))}onRun(r,n,i){for(const o of this.observers)o.onRun(r,n,i)}addDependencies(r,n){for(const i of n){let o=this.dependencyLinks.get(i);o||(o=[],this.dependencyLinks.set(i,o)),o.push(r)}this.reorderForDependencies()}reorderForDependencies(){if(this.dependencyLinks.size>0){const r=[];for(const n of this.dependencyLinks.keys()){const i=this.actors.indexOf(n);i>=0&&(this.actors.splice(i,1),r.push(n))}for(;r.length>0;){let n=-1;for(let o=0;o<r.length;o++){let a=!0;for(const s of this.dependencyLinks.get(r[o]))if(!this.actors.includes(s)&&r.includes(s)){a=!1;break}if(a){n=o;break}}if(n<0)throw new Error(`Cyclic dependency links detected in bus ${this.name}`);const i=r.splice(n,1)[0];this.actors.push(i)}}}};return kn.Bus=e,kn}var Dn={},Uu;function l_(){if(Uu)return Dn;Uu=1,Object.defineProperty(Dn,"__esModule",{value:!0}),Dn.BusIndexed=void 0;const e=Uh();let t=class extends e.Bus{constructor(n){super(n),this.actorsIndex={}}subscribe(n){const i=this.getActorIdentifiers(n)??["_undefined_"];for(const o of i){let a=this.actorsIndex[o];a||(a=this.actorsIndex[o]=[]),a.push(n),super.subscribe(n)}}unsubscribe(n){const i=this.getActorIdentifiers(n)??["_undefined_"];let o=!1;for(const a of i){const s=this.actorsIndex[a];if(s){const u=s.indexOf(n);u>=0&&s.splice(u,1),s.length===0&&delete this.actorsIndex[a]}o=o||super.unsubscribe(n)}return o}publish(n){const i=this.getActionIdentifier(n);return i?[...this.actorsIndex[i]||[],...this.actorsIndex._undefined_||[]].map(a=>({actor:a,reply:a.test(n)})):super.publish(n)}getActorIdentifiers(n){const i=this.actorIdentifierFields.reduce((o,a)=>o[a],n);if(i)return Array.isArray(i)?i:[i]}getActionIdentifier(n){return this.actionIdentifierFields.reduce((i,o)=>i[o],n)}};return Dn.BusIndexed=t,Dn}var Nn={},Bu;function Bh(){if(Bu)return Nn;Bu=1,Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.CONTEXT_KEY_LOGGER=void 0;const e=Lh();return Nn.CONTEXT_KEY_LOGGER=new e.ActionContextKey("@comunica/core:log"),Nn}var jn={},qu;function u_(){if(qu)return jn;qu=1,Object.defineProperty(jn,"__esModule",{value:!0}),jn.ActionObserver=void 0;let e=class{constructor(r){Object.assign(this,r)}};return jn.ActionObserver=e,jn}var Fn={},Ku;function c_(){if(Ku)return Fn;Ku=1,Object.defineProperty(Fn,"__esModule",{value:!0}),Fn.Actor=void 0;const e=Bh();let t=class qr{constructor(n){this.beforeActors=[],Object.assign(this,n),this.bus.subscribe(this),this.beforeActors.length>0&&this.bus.addDependencies(this,this.beforeActors),n.busFailMessage&&(this.bus.failMessage=n.busFailMessage)}static getContextLogger(n){return n.get(e.CONTEXT_KEY_LOGGER)}runObservable(n,i){const o=this.run(n,i);return this.bus.onRun(this,n,o),o}getDefaultLogData(n,i){const o=i?i():{};return o.actor=this.name,o}logTrace(n,i,o){const a=qr.getContextLogger(n);a&&a.trace(i,this.getDefaultLogData(n,o))}logDebug(n,i,o){const a=qr.getContextLogger(n);a&&a.debug(i,this.getDefaultLogData(n,o))}logInfo(n,i,o){const a=qr.getContextLogger(n);a&&a.info(i,this.getDefaultLogData(n,o))}logWarn(n,i,o){const a=qr.getContextLogger(n);a&&a.warn(i,this.getDefaultLogData(n,o))}logError(n,i,o){const a=qr.getContextLogger(n);a&&a.error(i,this.getDefaultLogData(n,o))}logFatal(n,i,o){const a=qr.getContextLogger(n);a&&a.fatal(i,this.getDefaultLogData(n,o))}};return Fn.Actor=t,Fn}var Ln={},Wu;function d_(){if(Wu)return Ln;Wu=1,Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.Mediator=void 0;let e=class xs{constructor(r){Object.assign(this,r)}publish(r){const n=this.bus.publish(r);if(n.length===0)throw new Error(`No actors are able to reply to a message in the bus ${this.bus.name}`);return n}async mediateActor(r){return await this.mediateWith(r,this.publish(r))}async mediateTestable(r){return(await this.mediateActor(r)).mapAsync((i,o)=>i.runObservable(r,o))}async mediate(r){return(await this.mediateTestable(r)).getOrThrow()}constructFailureMessage(r,n){const i=`
9
- `;return`${this.bus.failMessage.replaceAll(/\$\{(.*?)\}/gu,(a,s)=>xs.getObjectValue({action:r},s.split("."))||a)}
10
- Error messages of failing actors:${i}${n.join(i)}`}static getObjectValue(r,n){if(n.length===0)return r;if(r)return xs.getObjectValue(r[n[0]],n.slice(1))}};return Ln.Mediator=e,Ln}var tt={},zu;function f_(){if(zu)return tt;zu=1,Object.defineProperty(tt,"__esModule",{value:!0}),tt.TestResultFailed=tt.TestResultPassed=tt.failTest=tt.passTestVoidWithSideData=tt.passTestWithSideData=tt.passTestVoid=tt.passTest=void 0;function e(s){return new o(s,void 0)}tt.passTest=e;function t(){return new o(!0,void 0)}tt.passTestVoid=t;function r(s,u){return new o(s,u)}tt.passTestWithSideData=r;function n(s){return new o(!0,s)}tt.passTestVoidWithSideData=n;function i(s){return new a(s)}tt.failTest=i;class o{constructor(u,c){this.value=u,this.sideData=c}isPassed(){return!0}isFailed(){return!1}get(){return this.value}getOrThrow(){return this.value}getSideData(){return this.sideData}getFailMessage(){}map(u){return new o(u(this.value,this.sideData),this.sideData)}async mapAsync(u){return new o(await u(this.value,this.sideData),this.sideData)}}tt.TestResultPassed=o;class a{constructor(u){this.failMessage=u}isPassed(){return!1}isFailed(){return!0}get(){}getOrThrow(){throw new Error(this.getFailMessage())}getSideData(){throw new Error(this.getFailMessage())}getFailMessage(){return this.failMessage}map(){return this}async mapAsync(){return this}}return tt.TestResultFailed=a,tt}var Hu;function xr(){return Hu||(Hu=1,(function(e){var t=Dr&&Dr.__createBinding||(Object.create?(function(n,i,o,a){a===void 0&&(a=o);var s=Object.getOwnPropertyDescriptor(i,o);(!s||("get"in s?!i.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(n,a,s)}):(function(n,i,o,a){a===void 0&&(a=o),n[a]=i[o]})),r=Dr&&Dr.__exportStar||function(n,i){for(var o in n)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&t(i,n,o)};Object.defineProperty(e,"__esModule",{value:!0}),r(Lh(),e),r(Uh(),e),r(l_(),e),r(Bh(),e),r(u_(),e),r(c_(),e),r(d_(),e),r(f_(),e)})(Dr)),Dr}var Vu;function h_(){if(Vu)return Tn;Vu=1,Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.ActionObserverHttp=void 0;const e=xr();class t extends e.ActionObserver{constructor(n){super(n),this.requests=0,this.bus.subscribeObserver(this),this.httpInvalidator.addInvalidateListener(()=>{this.requests=0})}onRun(n,i,o){this.observedActors.includes(n.name)&&this.requests++}}return Tn.ActionObserverHttp=t,Tn}var Un={},jr={},Bn={},Fr={},qn={},Qu;function qh(){if(Qu)return qn;Qu=1,Object.defineProperty(qn,"__esModule",{value:!0}),qn.ActorAbstractMediaTyped=void 0;const e=xr();let t=class extends e.Actor{constructor(n){super(n)}async run(n){if("handle"in n){const i=n;return{handle:await this.runHandle(i.handle,i.handleMediaType,n.context)}}if("mediaTypes"in n)return{mediaTypes:await this.getMediaTypes(n.context)};if("mediaTypeFormats"in n)return{mediaTypeFormats:await this.getMediaTypeFormats(n.context)};throw new Error("Either a handle, mediaTypes or mediaTypeFormats action needs to be provided")}async test(n){if("handle"in n){const i=n;return(await this.testHandle(i.handle,i.handleMediaType,n.context)).map(o=>({handle:o}))}return"mediaTypes"in n?(await this.testMediaType(n.context)).map(i=>({mediaTypes:i})):"mediaTypeFormats"in n?(await this.testMediaTypeFormats(n.context)).map(i=>({mediaTypeFormats:i})):(0,e.failTest)("Either a handle, mediaTypes or mediaTypeFormats action needs to be provided")}};return qn.ActorAbstractMediaTyped=t,qn}var Kn={},Ju;function p_(){if(Ju)return Kn;Ju=1,Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.ActorAbstractMediaTypedFixed=void 0;const e=xr(),t=qh();let r=class extends t.ActorAbstractMediaTyped{constructor(i){super(i);const o=this.priorityScale||this.priorityScale===0?this.priorityScale:1;if(this.mediaTypePriorities)for(const[a,[s,u]]of Object.entries(this.mediaTypePriorities).entries())this.mediaTypePriorities[s]=o*u;this.mediaTypePriorities=Object.freeze(this.mediaTypePriorities),this.mediaTypeFormats=Object.freeze(this.mediaTypeFormats)}async testHandle(i,o,a){return!o||!(o in this.mediaTypePriorities)?(0,e.failTest)(`Unrecognized media type: ${o}`):await this.testHandleChecked(i,a)}async testMediaType(i){return(0,e.passTestVoid)()}async getMediaTypes(i){return this.mediaTypePriorities}async testMediaTypeFormats(i){return(0,e.passTestVoid)()}async getMediaTypeFormats(i){return this.mediaTypeFormats}};return Kn.ActorAbstractMediaTypedFixed=r,Kn}var Gu;function Kh(){return Gu||(Gu=1,(function(e){var t=Fr&&Fr.__createBinding||(Object.create?(function(n,i,o,a){a===void 0&&(a=o);var s=Object.getOwnPropertyDescriptor(i,o);(!s||("get"in s?!i.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(n,a,s)}):(function(n,i,o,a){a===void 0&&(a=o),n[a]=i[o]})),r=Fr&&Fr.__exportStar||function(n,i){for(var o in n)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&t(i,n,o)};Object.defineProperty(e,"__esModule",{value:!0}),r(qh(),e),r(p_(),e)})(Fr)),Fr}var Yu;function y_(){if(Yu)return Bn;Yu=1,Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.ActorQueryResultSerialize=void 0;const e=Kh();let t=class extends e.ActorAbstractMediaTyped{constructor(n){super(n)}};return Bn.ActorQueryResultSerialize=t,Bn}var Wn={},Xu;function b_(){if(Xu)return Wn;Xu=1,Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.ActorQueryResultSerializeFixedMediaTypes=void 0;const e=Kh(),t=xr();let r=class extends e.ActorAbstractMediaTypedFixed{constructor(i){super(i)}async testHandleChecked(i,o){return(0,t.passTestVoid)()}};return Wn.ActorQueryResultSerializeFixedMediaTypes=r,Wn}var Zu;function Wh(){return Zu||(Zu=1,(function(e){var t=jr&&jr.__createBinding||(Object.create?(function(n,i,o,a){a===void 0&&(a=o);var s=Object.getOwnPropertyDescriptor(i,o);(!s||("get"in s?!i.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(n,a,s)}):(function(n,i,o,a){a===void 0&&(a=o),n[a]=i[o]})),r=jr&&jr.__exportStar||function(n,i){for(var o in n)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&t(i,n,o)};Object.defineProperty(e,"__esModule",{value:!0}),r(y_(),e),r(b_(),e)})(jr)),jr}var Lr={},Ce={},$u;function g_(){if($u)return Ce;$u=1,Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.KeysStatistics=Ce.KeysRdfJoin=Ce.KeysMergeBindingsContext=Ce.KeysRdfUpdateQuads=Ce.KeysQuerySourceIdentify=Ce.KeysRdfParseHtmlScript=Ce.KeysRdfParseJsonLd=Ce.KeysQueryOperation=Ce.KeysExpressionEvaluator=Ce.KeysInitQuery=Ce.KeysHttpProxy=Ce.KeysHttpMemento=Ce.KeysHttpWayback=Ce.KeysHttp=Ce.KeysCore=void 0;const e=xr();return Ce.KeysCore={log:e.CONTEXT_KEY_LOGGER},Ce.KeysHttp={includeCredentials:new e.ActionContextKey("@comunica/bus-http:include-credentials"),auth:new e.ActionContextKey("@comunica/bus-http:auth"),fetch:new e.ActionContextKey("@comunica/bus-http:fetch"),httpTimeout:new e.ActionContextKey("@comunica/bus-http:http-timeout"),httpBodyTimeout:new e.ActionContextKey("@comunica/bus-http:http-body-timeout"),httpRetryCount:new e.ActionContextKey("@comunica/bus-http:http-retry-count"),httpRetryDelayFallback:new e.ActionContextKey("@comunica/bus-http:http-retry-delay-fallback"),httpRetryDelayLimit:new e.ActionContextKey("@comunica/bus-http:http-retry-delay-limit"),httpRetryStatusCodes:new e.ActionContextKey("@comunica/bus-http:http-retry-status-codes")},Ce.KeysHttpWayback={recoverBrokenLinks:new e.ActionContextKey("@comunica/bus-http:recover-broken-links")},Ce.KeysHttpMemento={datetime:new e.ActionContextKey("@comunica/actor-http-memento:datetime")},Ce.KeysHttpProxy={httpProxyHandler:new e.ActionContextKey("@comunica/actor-http-proxy:httpProxyHandler")},Ce.KeysInitQuery={querySourcesUnidentified:new e.ActionContextKey("@comunica/actor-init-query:querySourcesUnidentified"),initialBindings:new e.ActionContextKey("@comunica/actor-init-query:initialBindings"),queryFormat:new e.ActionContextKey("@comunica/actor-init-query:queryFormat"),graphqlSingularizeVariables:new e.ActionContextKey("@comunica/actor-init-query:singularizeVariables"),lenient:new e.ActionContextKey("@comunica/actor-init-query:lenient"),queryString:new e.ActionContextKey("@comunica/actor-init-query:queryString"),query:new e.ActionContextKey("@comunica/actor-init-query:query"),baseIRI:new e.ActionContextKey("@comunica/actor-init-query:baseIRI"),fileBaseIRI:new e.ActionContextKey("@comunica/actor-init-query:fileBaseIRI"),functionArgumentsCache:new e.ActionContextKey("@comunica/actor-init-query:functionArgumentsCache"),queryTimestamp:new e.ActionContextKey("@comunica/actor-init-query:queryTimestamp"),queryTimestampHighResolution:new e.ActionContextKey("@comunica/actor-init-query:queryTimestampHighResolution"),extensionFunctionCreator:new e.ActionContextKey("@comunica/actor-init-query:extensionFunctionCreator"),extensionFunctions:new e.ActionContextKey("@comunica/actor-init-query:extensionFunctions"),extensionFunctionsAlwaysPushdown:new e.ActionContextKey("@comunica/actor-init-query:extensionFunctionsAlwaysPushdown"),cliArgsHandlers:new e.ActionContextKey("@comunica/actor-init-query:cliArgsHandlers"),explain:new e.ActionContextKey("@comunica/actor-init-query:explain"),physicalQueryPlanLogger:new e.ActionContextKey("@comunica/actor-init-query:physicalQueryPlanLogger"),physicalQueryPlanNode:new e.ActionContextKey("@comunica/actor-init-query:physicalQueryPlanNode"),jsonLdContext:new e.ActionContextKey("@context"),invalidateCache:new e.ActionContextKey("@comunica/actor-init-query:invalidateCache"),dataFactory:new e.ActionContextKey("@comunica/actor-init-query:dataFactory"),distinctConstruct:new e.ActionContextKey("@comunica/actor-init-query:distinctConstruct")},Ce.KeysExpressionEvaluator={extensionFunctionCreator:new e.ActionContextKey("@comunica/utils-expression-evaluator:extensionFunctionCreator"),superTypeProvider:new e.ActionContextKey("@comunica/utils-expression-evaluator:superTypeProvider"),defaultTimeZone:new e.ActionContextKey("@comunica/utils-expression-evaluator:defaultTimeZone"),actionContext:new e.ActionContextKey("@comunica/utils-expression-evaluator:actionContext")},Ce.KeysQueryOperation={operation:new e.ActionContextKey("@comunica/bus-query-operation:operation"),joinLeftMetadata:new e.ActionContextKey("@comunica/bus-query-operation:joinLeftMetadata"),joinRightMetadatas:new e.ActionContextKey("@comunica/bus-query-operation:joinRightMetadatas"),joinBindings:new e.ActionContextKey("@comunica/bus-query-operation:joinBindings"),readOnly:new e.ActionContextKey("@comunica/bus-query-operation:readOnly"),isPathArbitraryLengthDistinctKey:new e.ActionContextKey("@comunica/bus-query-operation:isPathArbitraryLengthDistinct"),limitIndicator:new e.ActionContextKey("@comunica/bus-query-operation:limitIndicator"),unionDefaultGraph:new e.ActionContextKey("@comunica/bus-query-operation:unionDefaultGraph"),querySources:new e.ActionContextKey("@comunica/bus-query-operation:querySources")},Ce.KeysRdfParseJsonLd={documentLoader:new e.ActionContextKey("@comunica/actor-rdf-parse-jsonld:documentLoader"),strictValues:new e.ActionContextKey("@comunica/actor-rdf-parse-jsonld:strictValues"),parserOptions:new e.ActionContextKey("@comunica/actor-rdf-parse-jsonld:parserOptions")},Ce.KeysRdfParseHtmlScript={processingHtmlScript:new e.ActionContextKey("@comunica/actor-rdf-parse-html-script:processingHtmlScript"),extractAllScripts:new e.ActionContextKey("extractAllScripts")},Ce.KeysQuerySourceIdentify={sourceIds:new e.ActionContextKey("@comunica/bus-query-source-identify:sourceIds"),hypermediaSourcesAggregatedStores:new e.ActionContextKey("@comunica/bus-query-source-identify:hypermediaSourcesAggregatedStores"),traverse:new e.ActionContextKey("@comunica/bus-query-source-identify:traverse")},Ce.KeysRdfUpdateQuads={destination:new e.ActionContextKey("@comunica/bus-rdf-update-quads:destination")},Ce.KeysMergeBindingsContext={sourcesBinding:new e.ActionContextKey("@comunica/bus-merge-bindings-context:sourcesBinding")},Ce.KeysRdfJoin={lastPhysicalJoin:new e.ActionContextKey("@comunica/bus-rdf-join:lastPhysicalJoin")},Ce.KeysStatistics={discoveredLinks:new e.ActionContextKey("@comunica/statistic:discoveredLinks"),dereferencedLinks:new e.ActionContextKey("@comunica/statistic:dereferencedLinks"),intermediateResults:new e.ActionContextKey("@comunica/statistic:intermediateResults")},Ce}var ec;function m_(){return ec||(ec=1,(function(e){var t=Lr&&Lr.__createBinding||(Object.create?(function(n,i,o,a){a===void 0&&(a=o);var s=Object.getOwnPropertyDescriptor(i,o);(!s||("get"in s?!i.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(n,a,s)}):(function(n,i,o,a){a===void 0&&(a=o),n[a]=i[o]})),r=Lr&&Lr.__exportStar||function(n,i){for(var o in n)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&t(i,n,o)};Object.defineProperty(e,"__esModule",{value:!0}),r(g_(),e)})(Lr)),Lr}var aa={},zn={},tc;function w_(){if(tc)return zn;tc=1,Object.defineProperty(zn,"__esModule",{value:!0}),zn.LinkedList=void 0;class e{constructor(){this._length=0,this._head=null,this._tail=null}get length(){return this._length}get first(){var r;return(r=this._head)===null||r===void 0?void 0:r.value}get last(){var r;return(r=this._tail)===null||r===void 0?void 0:r.value}get empty(){return this._head===null}push(r){const n={value:r,next:null};this._tail===null?this._head=this._tail=n:this._tail.next=this._tail=n,this._length++}shift(){if(this._head===null)return;const{value:r,next:n}=this._head;return this._head=n,n===null&&(this._tail=null),this._length--,r}clear(){this._length=0,this._head=this._tail=null}}return zn.LinkedList=e,zn}var Hn={};let sa=1;const Tl=new Map;let la=!1,Ol,zh=(e,...t)=>(Tl.set(sa,[e,t]),Ol(sa),sa++),kl=e=>{Tl.delete(e)};function Dl(e){if(la)setTimeout(Dl,0,e);else{const t=Tl.get(e);if(t){la=!0;try{t[0](...t[1])}finally{kl(e),la=!1}}}}function __(){const e=new MessageChannel;e.port1.onmessage=t=>{Dl(t.data)},Ol=t=>{e.port2.postMessage(t)}}function A_(){const e=`setImmediate$${Math.random()}$`;window.addEventListener("message",t=>{typeof t.data=="string"&&t.data.startsWith(e)&&Dl(+t.data.slice(e.length))}),Ol=t=>{window.postMessage(e+t,"*")}}const Vi=typeof self>"u"?typeof global>"u"?void 0:global:self;Vi.setImmediate?(zh=Vi.setImmediate,kl=Vi.clearImmediate):Vi.importScripts?__():A_();const v_=Object.freeze(Object.defineProperty({__proto__:null,get clearImmediate(){return kl},get setImmediate(){return zh}},Symbol.toStringTag,{value:"Module"})),S_=Id(v_);var rc;function E_(){if(rc)return Hn;rc=1,Object.defineProperty(Hn,"__esModule",{value:!0}),Hn.createTaskScheduler=void 0;const e=S_,t=Promise.resolve(void 0);function r(n=e.setImmediate){const i=typeof queueMicrotask=="function"?queueMicrotask:s=>t.then(s);let o=0,a=null;return s=>{a!==null?a.push(s):++o<100?i(s):(a=[s],n(()=>{for(const u of a)i(u);a=null,o=0}))}}return Hn.createTaskScheduler=r,Hn}var nc;function Hh(){return nc||(nc=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isIterator=e.isIterable=e.isSourceExpression=e.isPromise=e.isEventEmitter=e.isFunction=e.range=e.union=e.fromIterable=e.fromIterator=e.fromArray=e.single=e.empty=e.wrap=e.WrappingIterator=e.ClonedIterator=e.UnionIterator=e.MultiTransformIterator=e.SimpleTransformIterator=e.TransformIterator=e.BufferedIterator=e.MappingIterator=e.DESTINATION=e.identity=e.IntegerIterator=e.ArrayIterator=e.SingletonIterator=e.EmptyIterator=e.AsyncIterator=e.DESTROYED=e.ENDED=e.CLOSED=e.CLOSING=e.OPEN=e.INIT=e.setTaskScheduler=e.getTaskScheduler=e.scheduleTask=e.LinkedList=void 0;const t=lr(),r=w_();Object.defineProperty(e,"LinkedList",{enumerable:!0,get:function(){return r.LinkedList}});let i=E_().createTaskScheduler();function o(U){i(U)}e.scheduleTask=o;function a(){return i}e.getTaskScheduler=a;function s(U){i=U}e.setTaskScheduler=s,e.INIT=1,e.OPEN=2,e.CLOSING=4,e.CLOSED=8,e.ENDED=16,e.DESTROYED=32;class u extends t.EventEmitter{constructor(l=e.OPEN){super(),this._readable=!1,this._state=l,this.on("newListener",c)}_changeState(l,d=!1){const w=l>this._state&&this._state<e.ENDED;return w&&(this._state=l,l===e.ENDED&&(d?i(()=>this.emit("end")):this.emit("end"))),w}read(){return null}forEach(l,d){this.on("data",ie(l,d))}close(){this._changeState(e.CLOSED)&&this._endAsync()}destroy(l){this.done||this._destroy(l,d=>{l=l||d,l&&this.emit("error",l),this._end(!0)})}_destroy(l,d){d()}_end(l=!1){this._changeState(l?e.DESTROYED:e.ENDED)&&(this._readable=!1,this.removeAllListeners("readable"),this.removeAllListeners("data"),this.removeAllListeners("end"))}_endAsync(){i(()=>this._end())}get readable(){return this._readable}set readable(l){l=!!l&&!this.done,this._readable!==l&&(this._readable=l,l&&i(()=>this.emit("readable")))}get closed(){return this._state>=e.CLOSING}get ended(){return this._state===e.ENDED}get destroyed(){return this._state===e.DESTROYED}get done(){return this._state>=e.ENDED}toString(){const l=this._toStringDetails();return`[${this.constructor.name}${l?` ${l}`:""}]`}_toStringDetails(){return""}toArray(l){const d=[],w=typeof l?.limit=="number"?l.limit:1/0;return this.ended||w<=0?Promise.resolve(d):new Promise((j,q)=>{const W=()=>j(d),b=T=>{d.push(T),d.length>=w&&(this.removeListener("error",q),this.removeListener("data",b),this.removeListener("end",W),j(d))};this.on("error",q),this.on("data",b),this.on("end",W)})}getProperty(l,d){const w=this._properties;if(!d)return w&&w[l];if(w&&l in w)i(()=>d(w[l]));else{let j;(j=this._propertyCallbacks)||(this._propertyCallbacks=j=Object.create(null)),l in j?j[l].push(d):j[l]=[d]}}setProperty(l,d){const w=this._properties||(this._properties=Object.create(null));w[l]=d;const j=this._propertyCallbacks||{},q=j[l];if(q){delete j[l],i(()=>{for(const W of q)W(d)});for(l in j)return;delete this._propertyCallbacks}}getProperties(){const l=this._properties,d={};for(const w in l)d[w]=l[w];return d}setProperties(l){for(const d in l)this.setProperty(d,l[d])}copyProperties(l,d){for(const w of d)l.getProperty(w,j=>this.setProperty(w,j))}transform(l){return new C(this,l)}map(l,d){return new R(this,ie(l,d))}filter(l,d){return this.map(function(w){return l.call(d||this,w)?w:null})}uniq(l=_){const d=new Set;return this.filter(function(w){const j=l.call(this,w);return d.has(j)?!1:(d.add(j),!0)})}prepend(l){return this.transform({prepend:l})}append(l){return this.transform({append:l})}surround(l,d){return this.transform({prepend:l,append:d})}skip(l){return this.map(d=>l-- >0?null:d)}take(l){return this.transform({limit:l})}range(l,d){return this.transform({offset:l,limit:Math.max(d-l+1,0)})}clone(){return new $(this)}[Symbol.asyncIterator](){const l=this;let d=null,w=null,j=null;l.addListener("readable",q),l.addListener("end",q),l.addListener("error",W);function q(){if(d!==null)if(j!==null)W(j);else if(l.done)d({done:!0,value:void 0}),d=w=null,b();else{const T=l.read();T!==null&&(d({done:!1,value:T}),d=w=null)}}function W(T){w!==null?(w(T),d=w=j=null,b()):j===null&&(j=T)}function b(){l.removeListener("readable",q),l.removeListener("end",q),l.removeListener("error",W)}return{next(){return new Promise((T,H)=>{d=T,w=H,q()})}}}}e.AsyncIterator=u;function c(U){U==="data"&&(this.removeListener("newListener",c),g(this,"readable",h),this.readable&&i(()=>h.call(this)))}function h(){let U;for(;this.listenerCount("data")!==0&&(U=this.read())!==null;)this.emit("data",U);this.listenerCount("data")===0&&!this.done&&(this.removeListener("readable",h),g(this,"newListener",c))}function g(U,l,d){U.listeners(l).includes(d)||U.on(l,d)}class A extends u{constructor(){super(),this._changeState(e.ENDED,!0)}}e.EmptyIterator=A;class I extends u{constructor(l){super(),this._item=l,l===null?this.close():this.readable=!0}read(){const l=this._item;return this._item=null,this.close(),l}_toStringDetails(){return this._item===null?"":`(${this._item})`}}e.SingletonIterator=I;class k extends u{constructor(l=[],{autoStart:d=!0,preserve:w=!0}={}){super();const j=w||!Array.isArray(l)?[...l]:l;this._index=0,this._sourceStarted=d!==!1,this._truncateThreshold=w?-1:64,this._sourceStarted&&j.length===0?this.close():this._buffer=j,this.readable=!0}read(){this._sourceStarted||(this._sourceStarted=!0);let l=null;return this._buffer&&(this._index<this._buffer.length&&(l=this._buffer[this._index++]),this._index===this._buffer.length?(delete this._buffer,this.close()):this._index===this._truncateThreshold&&(this._buffer.splice(0,this._truncateThreshold),this._index=0)),l}_toStringDetails(){return`(${this._buffer?this._buffer.length-this._index:0})`}_destroy(l,d){delete this._buffer,d()}toArray(l={}){if(!this._buffer)return Promise.resolve([]);const{length:d}=this._buffer,w=this._index,j=typeof l.limit!="number"?d:w+l.limit,q=this._buffer.slice(w,j);return this._index=j,j>=d&&this.close(),Promise.resolve(q)}}e.ArrayIterator=k;class S extends u{constructor({start:l=0,step:d=1,end:w}={}){super(),Number.isFinite(l)&&(l=Math.trunc(l)),this._next=l,Number.isFinite(d)&&(d=Math.trunc(d)),this._step=d;const j=d>=0,q=j?1/0:-1/0;Number.isFinite(w)?w=Math.trunc(w):w!==-q&&(w=q),this._last=w,!Number.isFinite(l)||(j?l>w:l<w)?this.close():this.readable=!0}read(){if(this.closed)return null;const l=this._next,d=this._step,w=this._last,j=this._next+=d;return(d>=0?j>w:j<w)&&this.close(),l}_toStringDetails(){return`(${this._next}...${this._last})`}}e.IntegerIterator=S;function _(U){return U}e.identity=_,e.DESTINATION=Symbol("destination");class R extends u{constructor(l,d=_,w={}){super(),this._map=d,this._source=E(l),this._destroySource=w.destroySource!==!1,l.done?this.close():(this._source[e.DESTINATION]=this,this._source.on("end",ce),this._source.on("error",ue),this._source.on("readable",G),this.readable=this._source.readable)}read(){if(!this.done){if(this._source.readable){let l,d;for(;(l=this._source.read())!==null;)if((d=this._map(l))!==null)return d}this.readable=!1,this._source.done&&this.close()}return null}_end(l){this._source.removeListener("end",ce),this._source.removeListener("error",ue),this._source.removeListener("readable",G),delete this._source[e.DESTINATION],this._destroySource&&this._source.destroy(),super._end(l)}}e.MappingIterator=R;function E(U,l=!1){if(!U||!fe(U.read)||!fe(U.on))throw new TypeError(`Invalid source: ${U}`);if(!l&&U[e.DESTINATION])throw new Error("The source already has a destination");return U}class v extends u{constructor({maxBufferSize:l=4,autoStart:d=!0}={}){super(e.INIT),this._buffer=new r.LinkedList,this._maxBufferSize=4,this._reading=!0,this._pushedCount=0,this.maxBufferSize=l,i(()=>this._init(d)),this._sourceStarted=d!==!1}get maxBufferSize(){return this._maxBufferSize}set maxBufferSize(l){l!==1/0&&(l=Number.isFinite(l)?Math.max(Math.trunc(l),1):4),this._maxBufferSize!==l&&(this._maxBufferSize=l,this._state===e.OPEN&&this._fillBuffer())}_init(l){let d=!1;this._reading=!0,this._begin(()=>{if(d)throw new Error("done callback called multiple times");d=!0,this._reading=!1,this._changeState(e.OPEN),l?this._fillBufferAsync():this.readable=!0})}_begin(l){l()}read(){if(this.done)return null;this._sourceStarted||(this._sourceStarted=!0);const l=this._buffer;let d;return l.empty?(d=null,this.readable=!1):d=l.shift(),!this._reading&&l.length<this._maxBufferSize&&(this.closed?l.empty&&this._endAsync():this._fillBufferAsync()),d}_read(l,d){d()}_push(l){this.done||(this._pushedCount++,this._buffer.push(l),this.readable=!0)}_fillBuffer(){let l;this._reading||(this.closed?this._completeClose():(l=Math.min(this._maxBufferSize-this._buffer.length,128))>0&&(this._pushedCount=0,this._reading=!0,this._read(l,()=>{if(!l)throw new Error("done callback called multiple times");l=0,this._reading=!1,this.closed?this._completeClose():this._pushedCount&&(this.readable=!0,this._buffer.length<this._maxBufferSize/2&&this._fillBufferAsync())})))}_fillBufferAsync(){this._reading||(this._reading=!0,i(()=>{this._reading=!1,this._fillBuffer()}))}close(){this._reading?this._changeState(e.CLOSING):this._completeClose()}_completeClose(){this._changeState(e.CLOSED)&&(this._reading=!0,this._flush(()=>{if(!this._reading)throw new Error("done callback called multiple times");this._reading=!1,this._buffer.empty&&this._endAsync()}))}_destroy(l,d){this._buffer.clear(),d()}_flush(l){l()}_toStringDetails(){const l=this._buffer;return`{${l.empty?"":`next: ${l.first}, `}buffer: ${l.length}}`}}e.BufferedIterator=v;class V extends v{constructor(l,d=l||{}){super(d),this._boundPush=w=>this._push(w),N(l)||(l=d.source),ae(l)?this.source=l:l&&(this._createSource=P(l)?()=>l:l,this._sourceStarted&&this._loadSourceAsync()),this._optional=!!d.optional,this._destroySource=d.destroySource!==!1}get source(){return fe(this._createSource)&&this._loadSourceAsync(),this._source}set source(l){const d=this._source=this._validateSource(l);d[e.DESTINATION]=this,this.done?this._destroySource&&d.destroy():d.done?this.close():(d.on("end",z),d.on("readable",se),d.on("error",ue))}_loadSourceAsync(){fe(this._createSource)&&(Promise.resolve(this._createSource()).then(l=>{delete this._createSource,this.source=l,this._fillBuffer()},l=>this.emit("error",l)),this._createSource=null)}_validateSource(l,d=!1){if(this._source||typeof this._createSource<"u")throw new Error("The source cannot be changed after it has been set");return E(l,d)}_read(l,d){const w=()=>{this._pushedCount<l&&!this.closed?i(()=>this._readAndTransform(w,d)):d()};this._readAndTransform(w,d)}_readAndTransform(l,d){let w;const j=this.source;!j||j.done||(w=j.read())===null?d():this._optional?this._optionalTransform(w,l):this._transform(w,l,this._boundPush)}_optionalTransform(l,d){const w=this._pushedCount;this._transform(l,()=>{w===this._pushedCount&&this._push(l),d()},this._boundPush)}_transform(l,d,w){w(l),d()}_closeWhenDone(){this.close()}_end(l){const d=this._source;d&&(d.removeListener("end",z),d.removeListener("error",ue),d.removeListener("readable",se),delete d[e.DESTINATION],this._destroySource&&d.destroy()),super._end(l)}}e.TransformIterator=V;function G(){this[e.DESTINATION].readable=!0}function ue(U){this[e.DESTINATION].emit("error",U)}function ce(){this[e.DESTINATION].close()}function z(){this[e.DESTINATION]._closeWhenDone()}function se(){this[e.DESTINATION]._sourceStarted!==!1&&this[e.DESTINATION]._fillBuffer()}class C extends V{constructor(l,d){if(super(l,d),this._offset=0,this._limit=1/0,this._filter=w=>!0,d=d||(N(l)?null:l),d){const w=fe(d)?d:d.transform,{limit:j,offset:q,filter:W,map:b,prepend:T,append:H}=d;q===1/0||j===-1/0?this._limit=0:(Number.isFinite(q)&&(this._offset=Math.max(Math.trunc(q),0)),Number.isFinite(j)&&(this._limit=Math.max(Math.trunc(j),0)),fe(W)&&(this._filter=W),fe(b)&&(this._map=b),this._transform=fe(w)?w:null),T&&(this._prepender=ae(T)?T:y(T)),H&&(this._appender=ae(H)?H:y(H))}}_read(l,d){const w=()=>this._readAndTransformSimple(l,j,d);this._readAndTransformSimple(l,j,d);function j(){i(w)}}_readAndTransformSimple(l,d,w){let j;const{source:q}=this;if(!q||q.done){w();return}for(this._limit===0&&this.close();!this.closed&&this._pushedCount<l&&(j=q.read())!==null;){if(!this._filter(j)||this._offset!==0&&this._offset--)continue;const W=typeof this._map>"u"?j:this._map(j);if(W===null)this._optional&&this._push(j);else if(!fe(this._transform))this._push(W);else{this._optional?this._optionalTransform(W,d):this._transform(W,d,this._boundPush);return}--this._limit===0&&this.close()}w()}_begin(l){this._insert(this._prepender,l),delete this._prepender}_flush(l){this._insert(this._appender,l),delete this._appender}_insert(l,d){const w=q=>this._push(q);!l||l.done?d():(l.on("data",w),l.on("end",j));function j(){l.removeListener("data",w),l.removeListener("end",j),d()}}}e.SimpleTransformIterator=C;class M extends V{constructor(l,d){if(super(l,d),this._transformerQueue=[],d){const w=fe(d)?d:d.multiTransform;w&&(this._createTransformer=w)}}_read(l,d){const w=this._transformerQueue,j=this._optional;let q,W;for(;(q=w[0])&&q.transformer.done;){j&&q.item!==null&&(l--,this._push(q.item)),w.shift();const{transformer:T}=q;T.removeListener("end",se),T.removeListener("readable",se),T.removeListener("error",ue)}const{source:b}=this;for(;b&&!b.done&&w.length<this.maxBufferSize&&(W=b.read(),W!==null);){const T=this._createTransformer(W)||new A;T[e.DESTINATION]=this,T.on("end",se),T.on("readable",se),T.on("error",ue),w.push({transformer:T,item:W})}if(q=w[0],q){const{transformer:T}=q;for(;l-- >0&&(W=T.read())!==null;)this._push(W),j&&(q.item=null)}else b&&b.done&&this.close();d()}_createTransformer(l){return new I(l)}_closeWhenDone(){this._transformerQueue.length||this.close()}_end(l){if(super._end(l),this._destroySource)for(const d of this._transformerQueue)d.transformer.destroy()}}e.MultiTransformIterator=M;class K extends v{constructor(l,d={}){super(d),this._sources=[],this._currentSource=-1;const w=d.autoStart!==!1;if(ae(l))l.on("error",j=>this.emit("error",j)),this._pending={loading:!1,sources:l},w&&this._loadSources();else if(Array.isArray(l)&&l.length>0)for(const j of l)this._addSource(j);else w&&this.close();this._destroySources=d.destroySources!==!1}_loadSources(){const l=this._pending.sources;this._pending.loading=!0,l.done?(delete this._pending,this.close()):(l.on("data",d=>{this._addSource(d),this._fillBufferAsync()}),l.on("end",()=>{delete this._pending,this._fillBuffer()}))}_addSource(l){P(l)&&(l=de(l)),l.done||(this._sources.push(l),l[e.DESTINATION]=this,l.on("error",ue),l.on("readable",se),l.on("end",x))}_removeEmptySources(){this._sources=this._sources.filter((l,d)=>(l.done&&d<=this._currentSource&&this._currentSource--,!l.done)),this._fillBuffer()}_read(l,d){var w;((w=this._pending)===null||w===void 0?void 0:w.loading)===!1&&this._loadSources();let j=0,q;for(;j!==(j=l);)for(let W=0;W<this._sources.length&&l>0;W++)this._currentSource=(this._currentSource+1)%this._sources.length,(q=this._sources[this._currentSource].read())!==null&&(l--,this._push(q));!this._pending&&this._sources.length===0&&this.close(),d()}_end(l=!1){if(super._end(l),this._destroySources){for(const d of this._sources)d.destroy();this._pending&&(this._pending.sources.destroy(),delete this._pending)}}}e.UnionIterator=K;function x(){this[e.DESTINATION]._removeEmptySources()}class $ extends V{constructor(l){super(l,{autoStart:!1}),this._readPosition=0,this._reading=!1,l&&(this.readable=!0)}_init(){}close(){u.prototype.close.call(this)}get source(){return super.source}set source(l){const d=this._source=this._validateSource(l),w=d&&d[e.DESTINATION]||(d[e.DESTINATION]=new J(d));this.done?this._destroySource&&d.destroy():w.endsAt(0)?this.close():(w.register(this),(d._sourceStarted===!1||w.readAt(0)!==null)&&(this.readable=!0));const j=this._propertyCallbacks;for(const q in j){const W=j[q];for(const b of W)this._getSourceProperty(q,b)}}_validateSource(l,d=!1){const w=l&&l[e.DESTINATION];return super._validateSource(l,!w||w instanceof J)}getProperty(l,d){const{source:w}=this,j=this._properties,q=j&&l in j;if(!d)return q?j&&j[l]:w&&w.getProperty(l);super.getProperty(l,d),w&&!q&&this._getSourceProperty(l,d)}_getSourceProperty(l,d){this.source.getProperty(l,w=>{(!this._properties||!(l in this._properties))&&d(w)})}getProperties(){const l=this.source?this.source.getProperties():{},d=this._properties;for(const w in d)l[w]=d[w];return l}_toStringDetails(){return`{source: ${this.source?this.source.toString():"none"}}`}read(){this._sourceStarted||(this._sourceStarted=!0);const l=this.source;let d=null;if(!this.done&&l){const w=l[e.DESTINATION];(d=w.readAt(this._readPosition))!==null?this._readPosition++:this.readable=!1,w.endsAt(this._readPosition)&&this.close()}return d}_end(l){const d=this.source,w=d?.[e.DESTINATION];w&&w.unregister(this),v.prototype._end.call(this,l)}}e.ClonedIterator=$;class J{constructor(l){if(this._history=[],this._trackers=new Set,this._source=l,!l.done){const d=()=>{for(const q of this._trackers)q.readable=!0},w=q=>{for(const W of this._trackers)W.emit("error",q)},j=()=>{for(const q of this._trackers)q._sourceStarted!==!1&&q._readPosition===this._history.length&&q.close();this._trackers.clear(),l.removeListener("end",j),l.removeListener("error",w),l.removeListener("readable",d)};l.on("end",j),l.on("error",w),l.on("readable",d)}}register(l){this._source.done||this._trackers.add(l)}unregister(l){this._trackers.delete(l)}readAt(l){let d=null;return l<this._history.length?d=this._history[l]:!this._source.done&&(d=this._source.read())!==null&&(this._history[l]=d),d}endsAt(l){return this._source.done&&this._history.length===l}}class re extends u{constructor(l,d){super(),this._source=null,this._destroySource=d?.destroySource!==!1,P(l)?(this._source=new u,l.then(w=>{this._source=null,this.source=w}).catch(w=>this.emit("error",w))):l&&(this.source=l)}set source(l){let d=l;if(this._source!==null)throw new Error("The source cannot be changed after it has been set");if(Q(d)&&(d=d[Symbol.iterator]()),le(d)){let w=d;d=new t.EventEmitter,d.read=()=>{if(w!==null){let j;for(;!(j=w.next()).done;)if(j.value!==null)return j.value;w=null,this.close()}return null}}else d=E(d);if(this.done){this._destroySource&&fe(d.destroy)&&d.destroy();return}d[e.DESTINATION]=this,d.on("end",ce),d.on("error",ue),d.on("readable",G),this._source=d,this.readable=d.readable!==!1}read(){if(this._source!==null&&this._source.readable!==!1){const l=this._source.read();if(l!==null)return l;this.readable=!1}return null}_end(l=!1){this._source!==null&&(this._source.removeListener("end",ce),this._source.removeListener("error",ue),this._source.removeListener("readable",G),delete this._source[e.DESTINATION],this._destroySource&&fe(this._source.destroy)&&this._source.destroy(),this._source=null),super._end(l)}}e.WrappingIterator=re;function de(U,l){if(l&&("autoStart"in l||"optional"in l||"source"in l||"maxBufferSize"in l))return U&&!ae(U)&&(U=new re(U)),new V(U,l);if(!U)return F();if(P(U))return new re(U,l);if(U instanceof u)return U;if(Array.isArray(U))return y(U);if(Q(U)||le(U)||ae(U))return new re(U,l);throw new TypeError(`Invalid source: ${U}`)}e.wrap=de;function F(){return new A}e.empty=F;function ne(U){return new I(U)}e.single=ne;function y(U){return new k(U)}e.fromArray=y;function B(U){return new re(U)}e.fromIterator=B;function Z(U){return new re(U)}e.fromIterable=Z;function D(U){return new K(U)}e.union=D;function ee(U,l,d){return new S({start:U,end:l,step:d})}e.range=ee;function ie(U,l){return l?U.bind(l):U}function fe(U){return typeof U=="function"}e.isFunction=fe;function ae(U){return fe(U?.on)}e.isEventEmitter=ae;function P(U){return fe(U?.then)}e.isPromise=P;function N(U){return U&&(ae(U)||P(U)||fe(U))}e.isSourceExpression=N;function Q(U){return U&&Symbol.iterator in U}e.isIterable=Q;function le(U){return fe(U?.next)}e.isIterator=le})(aa)),aa}var ua={exports:{}},ca={exports:{}},da,ic;function ze(){if(ic)return da;ic=1;class e extends Error{constructor(r){if(!Array.isArray(r))throw new TypeError(`Expected input to be an Array, got ${typeof r}`);let n="";for(let i=0;i<r.length;i++)n+=` ${r[i].stack}
11
- `;super(n),this.name="AggregateError",this.errors=r}}return da={AggregateError:e,ArrayIsArray(t){return Array.isArray(t)},ArrayPrototypeIncludes(t,r){return t.includes(r)},ArrayPrototypeIndexOf(t,r){return t.indexOf(r)},ArrayPrototypeJoin(t,r){return t.join(r)},ArrayPrototypeMap(t,r){return t.map(r)},ArrayPrototypePop(t,r){return t.pop(r)},ArrayPrototypePush(t,r){return t.push(r)},ArrayPrototypeSlice(t,r,n){return t.slice(r,n)},Error,FunctionPrototypeCall(t,r,...n){return t.call(r,...n)},FunctionPrototypeSymbolHasInstance(t,r){return Function.prototype[Symbol.hasInstance].call(t,r)},MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties(t,r){return Object.defineProperties(t,r)},ObjectDefineProperty(t,r,n){return Object.defineProperty(t,r,n)},ObjectGetOwnPropertyDescriptor(t,r){return Object.getOwnPropertyDescriptor(t,r)},ObjectKeys(t){return Object.keys(t)},ObjectSetPrototypeOf(t,r){return Object.setPrototypeOf(t,r)},Promise,PromisePrototypeCatch(t,r){return t.catch(r)},PromisePrototypeThen(t,r,n){return t.then(r,n)},PromiseReject(t){return Promise.reject(t)},PromiseResolve(t){return Promise.resolve(t)},ReflectApply:Reflect.apply,RegExpPrototypeTest(t,r){return t.test(r)},SafeSet:Set,String,StringPrototypeSlice(t,r,n){return t.slice(r,n)},StringPrototypeToLowerCase(t){return t.toLowerCase()},StringPrototypeToUpperCase(t){return t.toUpperCase()},StringPrototypeTrim(t){return t.trim()},Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet(t,r,n){return t.set(r,n)},Boolean,Uint8Array},da}var fa={exports:{}},ha,oc;function Vh(){return oc||(oc=1,ha={format(e,...t){return e.replace(/%([sdifj])/g,function(...[r,n]){const i=t.shift();return n==="f"?i.toFixed(6):n==="j"?JSON.stringify(i):n==="s"&&typeof i=="object"?`${i.constructor!==Object?i.constructor.name:""} {}`.trim():i.toString()})},inspect(e){switch(typeof e){case"string":if(e.includes("'"))if(e.includes('"')){if(!e.includes("`")&&!e.includes("${"))return`\`${e}\``}else return`"${e}"`;return`'${e}'`;case"number":return isNaN(e)?"NaN":Object.is(e,-0)?String(e):e;case"bigint":return`${String(e)}n`;case"boolean":case"undefined":return String(e);case"object":return"{}"}}}),ha}var pa,ac;function gt(){if(ac)return pa;ac=1;const{format:e,inspect:t}=Vh(),{AggregateError:r}=ze(),n=globalThis.AggregateError||r,i=Symbol("kIsNodeError"),o=["string","function","number","object","Function","Object","boolean","bigint","symbol"],a=/^([A-Z][a-z0-9]*)+$/,s="__node_internal_",u={};function c(_,R){if(!_)throw new u.ERR_INTERNAL_ASSERTION(R)}function h(_){let R="",E=_.length;const v=_[0]==="-"?1:0;for(;E>=v+4;E-=3)R=`_${_.slice(E-3,E)}${R}`;return`${_.slice(0,E)}${R}`}function g(_,R,E){if(typeof R=="function")return c(R.length<=E.length,`Code: ${_}; The provided arguments length (${E.length}) does not match the required ones (${R.length}).`),R(...E);const v=(R.match(/%[dfijoOs]/g)||[]).length;return c(v===E.length,`Code: ${_}; The provided arguments length (${E.length}) does not match the required ones (${v}).`),E.length===0?R:e(R,...E)}function A(_,R,E){E||(E=Error);class v extends E{constructor(...G){super(g(_,R,G))}toString(){return`${this.name} [${_}]: ${this.message}`}}Object.defineProperties(v.prototype,{name:{value:E.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${_}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),v.prototype.code=_,v.prototype[i]=!0,u[_]=v}function I(_){const R=s+_.name;return Object.defineProperty(_,"name",{value:R}),_}function k(_,R){if(_&&R&&_!==R){if(Array.isArray(R.errors))return R.errors.push(_),R;const E=new n([R,_],R.message);return E.code=R.code,E}return _||R}class S extends Error{constructor(R="The operation was aborted",E=void 0){if(E!==void 0&&typeof E!="object")throw new u.ERR_INVALID_ARG_TYPE("options","Object",E);super(R,E),this.code="ABORT_ERR",this.name="AbortError"}}return A("ERR_ASSERTION","%s",Error),A("ERR_INVALID_ARG_TYPE",(_,R,E)=>{c(typeof _=="string","'name' must be a string"),Array.isArray(R)||(R=[R]);let v="The ";_.endsWith(" argument")?v+=`${_} `:v+=`"${_}" ${_.includes(".")?"property":"argument"} `,v+="must be ";const V=[],G=[],ue=[];for(const z of R)c(typeof z=="string","All expected entries have to be of type string"),o.includes(z)?V.push(z.toLowerCase()):a.test(z)?G.push(z):(c(z!=="object",'The value "object" should be written as "Object"'),ue.push(z));if(G.length>0){const z=V.indexOf("object");z!==-1&&(V.splice(V,z,1),G.push("Object"))}if(V.length>0){switch(V.length){case 1:v+=`of type ${V[0]}`;break;case 2:v+=`one of type ${V[0]} or ${V[1]}`;break;default:{const z=V.pop();v+=`one of type ${V.join(", ")}, or ${z}`}}(G.length>0||ue.length>0)&&(v+=" or ")}if(G.length>0){switch(G.length){case 1:v+=`an instance of ${G[0]}`;break;case 2:v+=`an instance of ${G[0]} or ${G[1]}`;break;default:{const z=G.pop();v+=`an instance of ${G.join(", ")}, or ${z}`}}ue.length>0&&(v+=" or ")}switch(ue.length){case 0:break;case 1:ue[0].toLowerCase()!==ue[0]&&(v+="an "),v+=`${ue[0]}`;break;case 2:v+=`one of ${ue[0]} or ${ue[1]}`;break;default:{const z=ue.pop();v+=`one of ${ue.join(", ")}, or ${z}`}}if(E==null)v+=`. Received ${E}`;else if(typeof E=="function"&&E.name)v+=`. Received function ${E.name}`;else if(typeof E=="object"){var ce;if((ce=E.constructor)!==null&&ce!==void 0&&ce.name)v+=`. Received an instance of ${E.constructor.name}`;else{const z=t(E,{depth:-1});v+=`. Received ${z}`}}else{let z=t(E,{colors:!1});z.length>25&&(z=`${z.slice(0,25)}...`),v+=`. Received type ${typeof E} (${z})`}return v},TypeError),A("ERR_INVALID_ARG_VALUE",(_,R,E="is invalid")=>{let v=t(R);return v.length>128&&(v=v.slice(0,128)+"..."),`The ${_.includes(".")?"property":"argument"} '${_}' ${E}. Received ${v}`},TypeError),A("ERR_INVALID_RETURN_VALUE",(_,R,E)=>{var v;const V=E!=null&&(v=E.constructor)!==null&&v!==void 0&&v.name?`instance of ${E.constructor.name}`:`type ${typeof E}`;return`Expected ${_} to be returned from the "${R}" function but got ${V}.`},TypeError),A("ERR_MISSING_ARGS",(..._)=>{c(_.length>0,"At least one arg needs to be specified");let R;const E=_.length;switch(_=(Array.isArray(_)?_:[_]).map(v=>`"${v}"`).join(" or "),E){case 1:R+=`The ${_[0]} argument`;break;case 2:R+=`The ${_[0]} and ${_[1]} arguments`;break;default:{const v=_.pop();R+=`The ${_.join(", ")}, and ${v} arguments`}break}return`${R} must be specified`},TypeError),A("ERR_OUT_OF_RANGE",(_,R,E)=>{c(R,'Missing "range" argument');let v;if(Number.isInteger(E)&&Math.abs(E)>2**32)v=h(String(E));else if(typeof E=="bigint"){v=String(E);const V=BigInt(2)**BigInt(32);(E>V||E<-V)&&(v=h(v)),v+="n"}else v=t(E);return`The value of "${_}" is out of range. It must be ${R}. Received ${v}`},RangeError),A("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),A("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),A("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),A("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),A("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),A("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),A("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),A("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),A("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),A("ERR_STREAM_WRITE_AFTER_END","write after end",Error),A("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),pa={AbortError:S,aggregateTwoErrors:I(k),hideStackFrames:I,codes:u},pa}var sc;function At(){return sc||(sc=1,(function(e){const t=xt(),{format:r,inspect:n}=Vh(),{codes:{ERR_INVALID_ARG_TYPE:i}}=gt(),{kResistStopPropagation:o,AggregateError:a,SymbolDispose:s}=ze(),u=globalThis.AbortSignal||Xt().AbortSignal,c=globalThis.AbortController||Xt().AbortController,h=Object.getPrototypeOf(async function(){}).constructor,g=globalThis.Blob||t.Blob,A=typeof g<"u"?function(_){return _ instanceof g}:function(_){return!1},I=(S,_)=>{if(S!==void 0&&(S===null||typeof S!="object"||!("aborted"in S)))throw new i(_,"AbortSignal",S)},k=(S,_)=>{if(typeof S!="function")throw new i(_,"Function",S)};e.exports={AggregateError:a,kEmptyObject:Object.freeze({}),once(S){let _=!1;return function(...R){_||(_=!0,S.apply(this,R))}},createDeferredPromise:function(){let S,_;return{promise:new Promise((E,v)=>{S=E,_=v}),resolve:S,reject:_}},promisify(S){return new Promise((_,R)=>{S((E,...v)=>E?R(E):_(...v))})},debuglog(){return function(){}},format:r,inspect:n,types:{isAsyncFunction(S){return S instanceof h},isArrayBufferView(S){return ArrayBuffer.isView(S)}},isBlob:A,deprecate(S,_){return S},addAbortListener:lr().addAbortListener||function(_,R){if(_===void 0)throw new i("signal","AbortSignal",_);I(_,"signal"),k(R,"listener");let E;return _.aborted?queueMicrotask(()=>R()):(_.addEventListener("abort",R,{__proto__:null,once:!0,[o]:!0}),E=()=>{_.removeEventListener("abort",R)}),{__proto__:null,[s](){var v;(v=E)===null||v===void 0||v()}}},AbortSignalAny:u.any||function(_){if(_.length===1)return _[0];const R=new c,E=()=>R.abort();return _.forEach(v=>{I(v,"signals"),v.addEventListener("abort",E,{once:!0})}),R.signal.addEventListener("abort",()=>{_.forEach(v=>v.removeEventListener("abort",E))},{once:!0}),R.signal}},e.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")})(fa)),fa.exports}var Qi={},ya,lc;function Fi(){if(lc)return ya;lc=1;const{ArrayIsArray:e,ArrayPrototypeIncludes:t,ArrayPrototypeJoin:r,ArrayPrototypeMap:n,NumberIsInteger:i,NumberIsNaN:o,NumberMAX_SAFE_INTEGER:a,NumberMIN_SAFE_INTEGER:s,NumberParseInt:u,ObjectPrototypeHasOwnProperty:c,RegExpPrototypeExec:h,String:g,StringPrototypeToUpperCase:A,StringPrototypeTrim:I}=ze(),{hideStackFrames:k,codes:{ERR_SOCKET_BAD_PORT:S,ERR_INVALID_ARG_TYPE:_,ERR_INVALID_ARG_VALUE:R,ERR_OUT_OF_RANGE:E,ERR_UNKNOWN_SIGNAL:v}}=gt(),{normalizeEncoding:V}=At(),{isAsyncFunction:G,isArrayBufferView:ue}=At().types,ce={};function z(b){return b===(b|0)}function se(b){return b===b>>>0}const C=/^[0-7]+$/,M="must be a 32-bit unsigned integer or an octal string";function K(b,T,H){if(typeof b>"u"&&(b=H),typeof b=="string"){if(h(C,b)===null)throw new R(T,b,M);b=u(b,8)}return J(b,T),b}const x=k((b,T,H=s,L=a)=>{if(typeof b!="number")throw new _(T,"number",b);if(!i(b))throw new E(T,"an integer",b);if(b<H||b>L)throw new E(T,`>= ${H} && <= ${L}`,b)}),$=k((b,T,H=-2147483648,L=2147483647)=>{if(typeof b!="number")throw new _(T,"number",b);if(!i(b))throw new E(T,"an integer",b);if(b<H||b>L)throw new E(T,`>= ${H} && <= ${L}`,b)}),J=k((b,T,H=!1)=>{if(typeof b!="number")throw new _(T,"number",b);if(!i(b))throw new E(T,"an integer",b);const L=H?1:0,ge=4294967295;if(b<L||b>ge)throw new E(T,`>= ${L} && <= ${ge}`,b)});function re(b,T){if(typeof b!="string")throw new _(T,"string",b)}function de(b,T,H=void 0,L){if(typeof b!="number")throw new _(T,"number",b);if(H!=null&&b<H||L!=null&&b>L||(H!=null||L!=null)&&o(b))throw new E(T,`${H!=null?`>= ${H}`:""}${H!=null&&L!=null?" && ":""}${L!=null?`<= ${L}`:""}`,b)}const F=k((b,T,H)=>{if(!t(H,b)){const ge="must be one of: "+r(n(H,Se=>typeof Se=="string"?`'${Se}'`:g(Se)),", ");throw new R(T,b,ge)}});function ne(b,T){if(typeof b!="boolean")throw new _(T,"boolean",b)}function y(b,T,H){return b==null||!c(b,T)?H:b[T]}const B=k((b,T,H=null)=>{const L=y(H,"allowArray",!1),ge=y(H,"allowFunction",!1);if(!y(H,"nullable",!1)&&b===null||!L&&e(b)||typeof b!="object"&&(!ge||typeof b!="function"))throw new _(T,"Object",b)}),Z=k((b,T)=>{if(b!=null&&typeof b!="object"&&typeof b!="function")throw new _(T,"a dictionary",b)}),D=k((b,T,H=0)=>{if(!e(b))throw new _(T,"Array",b);if(b.length<H){const L=`must be longer than ${H}`;throw new R(T,b,L)}});function ee(b,T){D(b,T);for(let H=0;H<b.length;H++)re(b[H],`${T}[${H}]`)}function ie(b,T){D(b,T);for(let H=0;H<b.length;H++)ne(b[H],`${T}[${H}]`)}function fe(b,T){D(b,T);for(let H=0;H<b.length;H++){const L=b[H],ge=`${T}[${H}]`;if(L==null)throw new _(ge,"AbortSignal",L);le(L,ge)}}function ae(b,T="signal"){if(re(b,T),ce[b]===void 0)throw ce[A(b)]!==void 0?new v(b+" (signals must use all capital letters)"):new v(b)}const P=k((b,T="buffer")=>{if(!ue(b))throw new _(T,["Buffer","TypedArray","DataView"],b)});function N(b,T){const H=V(T),L=b.length;if(H==="hex"&&L%2!==0)throw new R("encoding",T,`is invalid for data of length ${L}`)}function Q(b,T="Port",H=!0){if(typeof b!="number"&&typeof b!="string"||typeof b=="string"&&I(b).length===0||+b!==+b>>>0||b>65535||b===0&&!H)throw new S(T,b,H);return b|0}const le=k((b,T)=>{if(b!==void 0&&(b===null||typeof b!="object"||!("aborted"in b)))throw new _(T,"AbortSignal",b)}),U=k((b,T)=>{if(typeof b!="function")throw new _(T,"Function",b)}),l=k((b,T)=>{if(typeof b!="function"||G(b))throw new _(T,"Function",b)}),d=k((b,T)=>{if(b!==void 0)throw new _(T,"undefined",b)});function w(b,T,H){if(!t(H,b))throw new _(T,`('${r(H,"|")}')`,b)}const j=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function q(b,T){if(typeof b>"u"||!h(j,b))throw new R(T,b,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}function W(b){if(typeof b=="string")return q(b,"hints"),b;if(e(b)){const T=b.length;let H="";if(T===0)return H;for(let L=0;L<T;L++){const ge=b[L];q(ge,"hints"),H+=ge,L!==T-1&&(H+=", ")}return H}throw new R("hints",b,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}return ya={isInt32:z,isUint32:se,parseFileMode:K,validateArray:D,validateStringArray:ee,validateBooleanArray:ie,validateAbortSignalArray:fe,validateBoolean:ne,validateBuffer:P,validateDictionary:Z,validateEncoding:N,validateFunction:U,validateInt32:$,validateInteger:x,validateNumber:de,validateObject:B,validateOneOf:F,validatePlainFunction:l,validatePort:Q,validateSignalName:ae,validateString:re,validateUint32:J,validateUndefined:d,validateUnion:w,validateAbortSignal:le,validateLinkHeaderValue:W},ya}var Ji={exports:{}},ba,uc;function ur(){if(uc)return ba;uc=1;const{SymbolAsyncIterator:e,SymbolIterator:t,SymbolFor:r}=ze(),n=r("nodejs.stream.destroyed"),i=r("nodejs.stream.errored"),o=r("nodejs.stream.readable"),a=r("nodejs.stream.writable"),s=r("nodejs.stream.disturbed"),u=r("nodejs.webstream.isClosedPromise"),c=r("nodejs.webstream.controllerErrorFunction");function h(y,B=!1){var Z;return!!(y&&typeof y.pipe=="function"&&typeof y.on=="function"&&(!B||typeof y.pause=="function"&&typeof y.resume=="function")&&(!y._writableState||((Z=y._readableState)===null||Z===void 0?void 0:Z.readable)!==!1)&&(!y._writableState||y._readableState))}function g(y){var B;return!!(y&&typeof y.write=="function"&&typeof y.on=="function"&&(!y._readableState||((B=y._writableState)===null||B===void 0?void 0:B.writable)!==!1))}function A(y){return!!(y&&typeof y.pipe=="function"&&y._readableState&&typeof y.on=="function"&&typeof y.write=="function")}function I(y){return y&&(y._readableState||y._writableState||typeof y.write=="function"&&typeof y.on=="function"||typeof y.pipe=="function"&&typeof y.on=="function")}function k(y){return!!(y&&!I(y)&&typeof y.pipeThrough=="function"&&typeof y.getReader=="function"&&typeof y.cancel=="function")}function S(y){return!!(y&&!I(y)&&typeof y.getWriter=="function"&&typeof y.abort=="function")}function _(y){return!!(y&&!I(y)&&typeof y.readable=="object"&&typeof y.writable=="object")}function R(y){return k(y)||S(y)||_(y)}function E(y,B){return y==null?!1:B===!0?typeof y[e]=="function":B===!1?typeof y[t]=="function":typeof y[e]=="function"||typeof y[t]=="function"}function v(y){if(!I(y))return null;const B=y._writableState,Z=y._readableState,D=B||Z;return!!(y.destroyed||y[n]||D!=null&&D.destroyed)}function V(y){if(!g(y))return null;if(y.writableEnded===!0)return!0;const B=y._writableState;return B!=null&&B.errored?!1:typeof B?.ended!="boolean"?null:B.ended}function G(y,B){if(!g(y))return null;if(y.writableFinished===!0)return!0;const Z=y._writableState;return Z!=null&&Z.errored?!1:typeof Z?.finished!="boolean"?null:!!(Z.finished||B===!1&&Z.ended===!0&&Z.length===0)}function ue(y){if(!h(y))return null;if(y.readableEnded===!0)return!0;const B=y._readableState;return!B||B.errored?!1:typeof B?.ended!="boolean"?null:B.ended}function ce(y,B){if(!h(y))return null;const Z=y._readableState;return Z!=null&&Z.errored?!1:typeof Z?.endEmitted!="boolean"?null:!!(Z.endEmitted||B===!1&&Z.ended===!0&&Z.length===0)}function z(y){return y&&y[o]!=null?y[o]:typeof y?.readable!="boolean"?null:v(y)?!1:h(y)&&y.readable&&!ce(y)}function se(y){return y&&y[a]!=null?y[a]:typeof y?.writable!="boolean"?null:v(y)?!1:g(y)&&y.writable&&!V(y)}function C(y,B){return I(y)?v(y)?!0:!(B?.readable!==!1&&z(y)||B?.writable!==!1&&se(y)):null}function M(y){var B,Z;return I(y)?y.writableErrored?y.writableErrored:(B=(Z=y._writableState)===null||Z===void 0?void 0:Z.errored)!==null&&B!==void 0?B:null:null}function K(y){var B,Z;return I(y)?y.readableErrored?y.readableErrored:(B=(Z=y._readableState)===null||Z===void 0?void 0:Z.errored)!==null&&B!==void 0?B:null:null}function x(y){if(!I(y))return null;if(typeof y.closed=="boolean")return y.closed;const B=y._writableState,Z=y._readableState;return typeof B?.closed=="boolean"||typeof Z?.closed=="boolean"?B?.closed||Z?.closed:typeof y._closed=="boolean"&&$(y)?y._closed:null}function $(y){return typeof y._closed=="boolean"&&typeof y._defaultKeepAlive=="boolean"&&typeof y._removedConnection=="boolean"&&typeof y._removedContLen=="boolean"}function J(y){return typeof y._sent100=="boolean"&&$(y)}function re(y){var B;return typeof y._consuming=="boolean"&&typeof y._dumped=="boolean"&&((B=y.req)===null||B===void 0?void 0:B.upgradeOrConnect)===void 0}function de(y){if(!I(y))return null;const B=y._writableState,Z=y._readableState,D=B||Z;return!D&&J(y)||!!(D&&D.autoDestroy&&D.emitClose&&D.closed===!1)}function F(y){var B;return!!(y&&((B=y[s])!==null&&B!==void 0?B:y.readableDidRead||y.readableAborted))}function ne(y){var B,Z,D,ee,ie,fe,ae,P,N,Q;return!!(y&&((B=(Z=(D=(ee=(ie=(fe=y[i])!==null&&fe!==void 0?fe:y.readableErrored)!==null&&ie!==void 0?ie:y.writableErrored)!==null&&ee!==void 0?ee:(ae=y._readableState)===null||ae===void 0?void 0:ae.errorEmitted)!==null&&D!==void 0?D:(P=y._writableState)===null||P===void 0?void 0:P.errorEmitted)!==null&&Z!==void 0?Z:(N=y._readableState)===null||N===void 0?void 0:N.errored)!==null&&B!==void 0?B:!((Q=y._writableState)===null||Q===void 0)&&Q.errored))}return ba={isDestroyed:v,kIsDestroyed:n,isDisturbed:F,kIsDisturbed:s,isErrored:ne,kIsErrored:i,isReadable:z,kIsReadable:o,kIsClosedPromise:u,kControllerErrorFunction:c,kIsWritable:a,isClosed:x,isDuplexNodeStream:A,isFinished:C,isIterable:E,isReadableNodeStream:h,isReadableStream:k,isReadableEnded:ue,isReadableFinished:ce,isReadableErrored:K,isNodeStream:I,isWebStream:R,isWritable:se,isWritableNodeStream:g,isWritableStream:S,isWritableEnded:V,isWritableFinished:G,isWritableErrored:M,isServerRequest:re,isServerResponse:J,willEmitClose:de,isTransformStream:_},ba}var cc;function Ir(){if(cc)return Ji.exports;cc=1;const e=It(),{AbortError:t,codes:r}=gt(),{ERR_INVALID_ARG_TYPE:n,ERR_STREAM_PREMATURE_CLOSE:i}=r,{kEmptyObject:o,once:a}=At(),{validateAbortSignal:s,validateFunction:u,validateObject:c,validateBoolean:h}=Fi(),{Promise:g,PromisePrototypeThen:A,SymbolDispose:I}=ze(),{isClosed:k,isReadable:S,isReadableNodeStream:_,isReadableStream:R,isReadableFinished:E,isReadableErrored:v,isWritable:V,isWritableNodeStream:G,isWritableStream:ue,isWritableFinished:ce,isWritableErrored:z,isNodeStream:se,willEmitClose:C,kIsClosedPromise:M}=ur();let K;function x(F){return F.setHeader&&typeof F.abort=="function"}const $=()=>{};function J(F,ne,y){var B,Z;if(arguments.length===2?(y=ne,ne=o):ne==null?ne=o:c(ne,"options"),u(y,"callback"),s(ne.signal,"options.signal"),y=a(y),R(F)||ue(F))return re(F,ne,y);if(!se(F))throw new n("stream",["ReadableStream","WritableStream","Stream"],F);const D=(B=ne.readable)!==null&&B!==void 0?B:_(F),ee=(Z=ne.writable)!==null&&Z!==void 0?Z:G(F),ie=F._writableState,fe=F._readableState,ae=()=>{F.writable||Q()};let P=C(F)&&_(F)===D&&G(F)===ee,N=ce(F,!1);const Q=()=>{N=!0,F.destroyed&&(P=!1),!(P&&(!F.readable||D))&&(!D||le)&&y.call(F)};let le=E(F,!1);const U=()=>{le=!0,F.destroyed&&(P=!1),!(P&&(!F.writable||ee))&&(!ee||N)&&y.call(F)},l=b=>{y.call(F,b)};let d=k(F);const w=()=>{d=!0;const b=z(F)||v(F);if(b&&typeof b!="boolean")return y.call(F,b);if(D&&!le&&_(F,!0)&&!E(F,!1))return y.call(F,new i);if(ee&&!N&&!ce(F,!1))return y.call(F,new i);y.call(F)},j=()=>{d=!0;const b=z(F)||v(F);if(b&&typeof b!="boolean")return y.call(F,b);y.call(F)},q=()=>{F.req.on("finish",Q)};x(F)?(F.on("complete",Q),P||F.on("abort",w),F.req?q():F.on("request",q)):ee&&!ie&&(F.on("end",ae),F.on("close",ae)),!P&&typeof F.aborted=="boolean"&&F.on("aborted",w),F.on("end",U),F.on("finish",Q),ne.error!==!1&&F.on("error",l),F.on("close",w),d?e.nextTick(w):ie!=null&&ie.errorEmitted||fe!=null&&fe.errorEmitted?P||e.nextTick(j):(!D&&(!P||S(F))&&(N||V(F)===!1)||!ee&&(!P||V(F))&&(le||S(F)===!1)||fe&&F.req&&F.aborted)&&e.nextTick(j);const W=()=>{y=$,F.removeListener("aborted",w),F.removeListener("complete",Q),F.removeListener("abort",w),F.removeListener("request",q),F.req&&F.req.removeListener("finish",Q),F.removeListener("end",ae),F.removeListener("close",ae),F.removeListener("finish",Q),F.removeListener("end",U),F.removeListener("error",l),F.removeListener("close",w)};if(ne.signal&&!d){const b=()=>{const T=y;W(),T.call(F,new t(void 0,{cause:ne.signal.reason}))};if(ne.signal.aborted)e.nextTick(b);else{K=K||At().addAbortListener;const T=K(ne.signal,b),H=y;y=a((...L)=>{T[I](),H.apply(F,L)})}}return W}function re(F,ne,y){let B=!1,Z=$;if(ne.signal)if(Z=()=>{B=!0,y.call(F,new t(void 0,{cause:ne.signal.reason}))},ne.signal.aborted)e.nextTick(Z);else{K=K||At().addAbortListener;const ee=K(ne.signal,Z),ie=y;y=a((...fe)=>{ee[I](),ie.apply(F,fe)})}const D=(...ee)=>{B||e.nextTick(()=>y.apply(F,ee))};return A(F[M].promise,D,D),$}function de(F,ne){var y;let B=!1;return ne===null&&(ne=o),(y=ne)!==null&&y!==void 0&&y.cleanup&&(h(ne.cleanup,"cleanup"),B=ne.cleanup),new g((Z,D)=>{const ee=J(F,ne,ie=>{B&&ee(),ie?D(ie):Z()})})}return Ji.exports=J,Ji.exports.finished=de,Ji.exports}var ga,dc;function wn(){if(dc)return ga;dc=1;const e=It(),{aggregateTwoErrors:t,codes:{ERR_MULTIPLE_CALLBACK:r},AbortError:n}=gt(),{Symbol:i}=ze(),{kIsDestroyed:o,isDestroyed:a,isFinished:s,isServerRequest:u}=ur(),c=i("kDestroy"),h=i("kConstruct");function g(C,M,K){C&&(C.stack,M&&!M.errored&&(M.errored=C),K&&!K.errored&&(K.errored=C))}function A(C,M){const K=this._readableState,x=this._writableState,$=x||K;return x!=null&&x.destroyed||K!=null&&K.destroyed?(typeof M=="function"&&M(),this):(g(C,x,K),x&&(x.destroyed=!0),K&&(K.destroyed=!0),$.constructed?I(this,C,M):this.once(c,function(J){I(this,t(J,C),M)}),this)}function I(C,M,K){let x=!1;function $(J){if(x)return;x=!0;const re=C._readableState,de=C._writableState;g(J,de,re),de&&(de.closed=!0),re&&(re.closed=!0),typeof K=="function"&&K(J),J?e.nextTick(k,C,J):e.nextTick(S,C)}try{C._destroy(M||null,$)}catch(J){$(J)}}function k(C,M){_(C,M),S(C)}function S(C){const M=C._readableState,K=C._writableState;K&&(K.closeEmitted=!0),M&&(M.closeEmitted=!0),(K!=null&&K.emitClose||M!=null&&M.emitClose)&&C.emit("close")}function _(C,M){const K=C._readableState,x=C._writableState;x!=null&&x.errorEmitted||K!=null&&K.errorEmitted||(x&&(x.errorEmitted=!0),K&&(K.errorEmitted=!0),C.emit("error",M))}function R(){const C=this._readableState,M=this._writableState;C&&(C.constructed=!0,C.closed=!1,C.closeEmitted=!1,C.destroyed=!1,C.errored=null,C.errorEmitted=!1,C.reading=!1,C.ended=C.readable===!1,C.endEmitted=C.readable===!1),M&&(M.constructed=!0,M.destroyed=!1,M.closed=!1,M.closeEmitted=!1,M.errored=null,M.errorEmitted=!1,M.finalCalled=!1,M.prefinished=!1,M.ended=M.writable===!1,M.ending=M.writable===!1,M.finished=M.writable===!1)}function E(C,M,K){const x=C._readableState,$=C._writableState;if($!=null&&$.destroyed||x!=null&&x.destroyed)return this;x!=null&&x.autoDestroy||$!=null&&$.autoDestroy?C.destroy(M):M&&(M.stack,$&&!$.errored&&($.errored=M),x&&!x.errored&&(x.errored=M),K?e.nextTick(_,C,M):_(C,M))}function v(C,M){if(typeof C._construct!="function")return;const K=C._readableState,x=C._writableState;K&&(K.constructed=!1),x&&(x.constructed=!1),C.once(h,M),!(C.listenerCount(h)>1)&&e.nextTick(V,C)}function V(C){let M=!1;function K(x){if(M){E(C,x??new r);return}M=!0;const $=C._readableState,J=C._writableState,re=J||$;$&&($.constructed=!0),J&&(J.constructed=!0),re.destroyed?C.emit(c,x):x?E(C,x,!0):e.nextTick(G,C)}try{C._construct(x=>{e.nextTick(K,x)})}catch(x){e.nextTick(K,x)}}function G(C){C.emit(h)}function ue(C){return C?.setHeader&&typeof C.abort=="function"}function ce(C){C.emit("close")}function z(C,M){C.emit("error",M),e.nextTick(ce,C)}function se(C,M){!C||a(C)||(!M&&!s(C)&&(M=new n),u(C)?(C.socket=null,C.destroy(M)):ue(C)?C.abort():ue(C.req)?C.req.abort():typeof C.destroy=="function"?C.destroy(M):typeof C.close=="function"?C.close():M?e.nextTick(z,C,M):e.nextTick(ce,C),C.destroyed||(C[o]=!0))}return ga={construct:v,destroyer:se,destroy:A,undestroy:R,errorOrDestroy:E},ga}var ma,fc;function Nl(){if(fc)return ma;fc=1;const{ArrayIsArray:e,ObjectSetPrototypeOf:t}=ze(),{EventEmitter:r}=lr();function n(o){r.call(this,o)}t(n.prototype,r.prototype),t(n,r),n.prototype.pipe=function(o,a){const s=this;function u(S){o.writable&&o.write(S)===!1&&s.pause&&s.pause()}s.on("data",u);function c(){s.readable&&s.resume&&s.resume()}o.on("drain",c),!o._isStdio&&(!a||a.end!==!1)&&(s.on("end",g),s.on("close",A));let h=!1;function g(){h||(h=!0,o.end())}function A(){h||(h=!0,typeof o.destroy=="function"&&o.destroy())}function I(S){k(),r.listenerCount(this,"error")===0&&this.emit("error",S)}i(s,"error",I),i(o,"error",I);function k(){s.removeListener("data",u),o.removeListener("drain",c),s.removeListener("end",g),s.removeListener("close",A),s.removeListener("error",I),o.removeListener("error",I),s.removeListener("end",k),s.removeListener("close",k),o.removeListener("close",k)}return s.on("end",k),s.on("close",k),o.on("close",k),o.emit("pipe",s),o};function i(o,a,s){if(typeof o.prependListener=="function")return o.prependListener(a,s);!o._events||!o._events[a]?o.on(a,s):e(o._events[a])?o._events[a].unshift(s):o._events[a]=[s,o._events[a]]}return ma={Stream:n,prependListener:i},ma}var wa={exports:{}},hc;function Lo(){return hc||(hc=1,(function(e){const{SymbolDispose:t}=ze(),{AbortError:r,codes:n}=gt(),{isNodeStream:i,isWebStream:o,kControllerErrorFunction:a}=ur(),s=Ir(),{ERR_INVALID_ARG_TYPE:u}=n;let c;const h=(g,A)=>{if(typeof g!="object"||!("aborted"in g))throw new u(A,"AbortSignal",g)};e.exports.addAbortSignal=function(A,I){if(h(A,"signal"),!i(I)&&!o(I))throw new u("stream",["ReadableStream","WritableStream","Stream"],I);return e.exports.addAbortSignalNoValidate(A,I)},e.exports.addAbortSignalNoValidate=function(g,A){if(typeof g!="object"||!("aborted"in g))return A;const I=i(A)?()=>{A.destroy(new r(void 0,{cause:g.reason}))}:()=>{A[a](new r(void 0,{cause:g.reason}))};if(g.aborted)I();else{c=c||At().addAbortListener;const k=c(g,I);s(A,k[t])}return A}})(wa)),wa.exports}var _a,pc;function x_(){if(pc)return _a;pc=1;const{StringPrototypeSlice:e,SymbolIterator:t,TypedArrayPrototypeSet:r,Uint8Array:n}=ze(),{Buffer:i}=xt(),{inspect:o}=At();return _a=class{constructor(){this.head=null,this.tail=null,this.length=0}push(s){const u={data:s,next:null};this.length>0?this.tail.next=u:this.head=u,this.tail=u,++this.length}unshift(s){const u={data:s,next:this.head};this.length===0&&(this.tail=u),this.head=u,++this.length}shift(){if(this.length===0)return;const s=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,s}clear(){this.head=this.tail=null,this.length=0}join(s){if(this.length===0)return"";let u=this.head,c=""+u.data;for(;(u=u.next)!==null;)c+=s+u.data;return c}concat(s){if(this.length===0)return i.alloc(0);const u=i.allocUnsafe(s>>>0);let c=this.head,h=0;for(;c;)r(u,c.data,h),h+=c.data.length,c=c.next;return u}consume(s,u){const c=this.head.data;if(s<c.length){const h=c.slice(0,s);return this.head.data=c.slice(s),h}return s===c.length?this.shift():u?this._getString(s):this._getBuffer(s)}first(){return this.head.data}*[t](){for(let s=this.head;s;s=s.next)yield s.data}_getString(s){let u="",c=this.head,h=0;do{const g=c.data;if(s>g.length)u+=g,s-=g.length;else{s===g.length?(u+=g,++h,c.next?this.head=c.next:this.head=this.tail=null):(u+=e(g,0,s),this.head=c,c.data=e(g,s));break}++h}while((c=c.next)!==null);return this.length-=h,u}_getBuffer(s){const u=i.allocUnsafe(s),c=s;let h=this.head,g=0;do{const A=h.data;if(s>A.length)r(u,A,c-s),s-=A.length;else{s===A.length?(r(u,A,c-s),++g,h.next?this.head=h.next:this.head=this.tail=null):(r(u,new n(A.buffer,A.byteOffset,s),c-s),this.head=h,h.data=A.slice(s));break}++g}while((h=h.next)!==null);return this.length-=g,u}[Symbol.for("nodejs.util.inspect.custom")](s,u){return o(this,{...u,depth:0,customInspect:!1})}},_a}var Aa,yc;function Uo(){if(yc)return Aa;yc=1;const{MathFloor:e,NumberIsInteger:t}=ze(),{validateInteger:r}=Fi(),{ERR_INVALID_ARG_VALUE:n}=gt().codes;let i=16*1024,o=16;function a(h,g,A){return h.highWaterMark!=null?h.highWaterMark:g?h[A]:null}function s(h){return h?o:i}function u(h,g){r(g,"value",0),h?o=g:i=g}function c(h,g,A,I){const k=a(g,I,A);if(k!=null){if(!t(k)||k<0){const S=I?`options.${A}`:"options.highWaterMark";throw new n(S,k)}return e(k)}return s(h.objectMode)}return Aa={getHighWaterMark:c,getDefaultHighWaterMark:s,setDefaultHighWaterMark:u},Aa}var va,bc;function Qh(){if(bc)return va;bc=1;const e=It(),{PromisePrototypeThen:t,SymbolAsyncIterator:r,SymbolIterator:n}=ze(),{Buffer:i}=xt(),{ERR_INVALID_ARG_TYPE:o,ERR_STREAM_NULL_VALUES:a}=gt().codes;function s(u,c,h){let g;if(typeof c=="string"||c instanceof i)return new u({objectMode:!0,...h,read(){this.push(c),this.push(null)}});let A;if(c&&c[r])A=!0,g=c[r]();else if(c&&c[n])A=!1,g=c[n]();else throw new o("iterable",["Iterable"],c);const I=new u({objectMode:!0,highWaterMark:1,...h});let k=!1;I._read=function(){k||(k=!0,_())},I._destroy=function(R,E){t(S(R),()=>e.nextTick(E,R),v=>e.nextTick(E,v||R))};async function S(R){const E=R!=null,v=typeof g.throw=="function";if(E&&v){const{value:V,done:G}=await g.throw(R);if(await V,G)return}if(typeof g.return=="function"){const{value:V}=await g.return();await V}}async function _(){for(;;){try{const{value:R,done:E}=A?await g.next():g.next();if(E)I.push(null);else{const v=R&&typeof R.then=="function"?await R:R;if(v===null)throw k=!1,new a;if(I.push(v))continue;k=!1}}catch(R){I.destroy(R)}break}}return I}return va=s,va}var Sa,gc;function Bo(){if(gc)return Sa;gc=1;const e=It(),{ArrayPrototypeIndexOf:t,NumberIsInteger:r,NumberIsNaN:n,NumberParseInt:i,ObjectDefineProperties:o,ObjectKeys:a,ObjectSetPrototypeOf:s,Promise:u,SafeSet:c,SymbolAsyncDispose:h,SymbolAsyncIterator:g,Symbol:A}=ze();Sa=L,L.ReadableState=H;const{EventEmitter:I}=lr(),{Stream:k,prependListener:S}=Nl(),{Buffer:_}=xt(),{addAbortSignal:R}=Lo(),E=Ir();let v=At().debuglog("stream",f=>{v=f});const V=x_(),G=wn(),{getHighWaterMark:ue,getDefaultHighWaterMark:ce}=Uo(),{aggregateTwoErrors:z,codes:{ERR_INVALID_ARG_TYPE:se,ERR_METHOD_NOT_IMPLEMENTED:C,ERR_OUT_OF_RANGE:M,ERR_STREAM_PUSH_AFTER_EOF:K,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:x},AbortError:$}=gt(),{validateObject:J}=Fi(),re=A("kPaused"),{StringDecoder:de}=Rd(),F=Qh();s(L.prototype,k.prototype),s(L,k);const ne=()=>{},{errorOrDestroy:y}=G,B=1,Z=2,D=4,ee=8,ie=16,fe=32,ae=64,P=128,N=256,Q=512,le=1024,U=2048,l=4096,d=8192,w=16384,j=32768,q=65536,W=1<<17,b=1<<18;function T(f){return{enumerable:!1,get(){return(this.state&f)!==0},set(p){p?this.state|=f:this.state&=~f}}}o(H.prototype,{objectMode:T(B),ended:T(Z),endEmitted:T(D),reading:T(ee),constructed:T(ie),sync:T(fe),needReadable:T(ae),emittedReadable:T(P),readableListening:T(N),resumeScheduled:T(Q),errorEmitted:T(le),emitClose:T(U),autoDestroy:T(l),destroyed:T(d),closed:T(w),closeEmitted:T(j),multiAwaitDrain:T(q),readingMore:T(W),dataEmitted:T(b)});function H(f,p,Y){typeof Y!="boolean"&&(Y=p instanceof ar()),this.state=U|l|ie|fe,f&&f.objectMode&&(this.state|=B),Y&&f&&f.readableObjectMode&&(this.state|=B),this.highWaterMark=f?ue(this,f,"readableHighWaterMark",Y):ce(!1),this.buffer=new V,this.length=0,this.pipes=[],this.flowing=null,this[re]=null,f&&f.emitClose===!1&&(this.state&=~U),f&&f.autoDestroy===!1&&(this.state&=~l),this.errored=null,this.defaultEncoding=f&&f.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,f&&f.encoding&&(this.decoder=new de(f.encoding),this.encoding=f.encoding)}function L(f){if(!(this instanceof L))return new L(f);const p=this instanceof ar();this._readableState=new H(f,this,p),f&&(typeof f.read=="function"&&(this._read=f.read),typeof f.destroy=="function"&&(this._destroy=f.destroy),typeof f.construct=="function"&&(this._construct=f.construct),f.signal&&!p&&R(f.signal,this)),k.call(this,f),G.construct(this,()=>{this._readableState.needReadable&&Oe(this,this._readableState)})}L.prototype.destroy=G.destroy,L.prototype._undestroy=G.undestroy,L.prototype._destroy=function(f,p){p(f)},L.prototype[I.captureRejectionSymbol]=function(f){this.destroy(f)},L.prototype[h]=function(){let f;return this.destroyed||(f=this.readableEnded?null:new $,this.destroy(f)),new u((p,Y)=>E(this,X=>X&&X!==f?Y(X):p(null)))},L.prototype.push=function(f,p){return ge(this,f,p,!1)},L.prototype.unshift=function(f,p){return ge(this,f,p,!0)};function ge(f,p,Y,X){v("readableAddChunk",p);const oe=f._readableState;let Re;if((oe.state&B)===0&&(typeof p=="string"?(Y=Y||oe.defaultEncoding,oe.encoding!==Y&&(X&&oe.encoding?p=_.from(p,Y).toString(oe.encoding):(p=_.from(p,Y),Y=""))):p instanceof _?Y="":k._isUint8Array(p)?(p=k._uint8ArrayToBuffer(p),Y=""):p!=null&&(Re=new se("chunk",["string","Buffer","Uint8Array"],p))),Re)y(f,Re);else if(p===null)oe.state&=~ee,je(f,oe);else if((oe.state&B)!==0||p&&p.length>0)if(X)if((oe.state&D)!==0)y(f,new x);else{if(oe.destroyed||oe.errored)return!1;Se(f,oe,p,!0)}else if(oe.ended)y(f,new K);else{if(oe.destroyed||oe.errored)return!1;oe.state&=~ee,oe.decoder&&!Y?(p=oe.decoder.write(p),oe.objectMode||p.length!==0?Se(f,oe,p,!1):Oe(f,oe)):Se(f,oe,p,!1)}else X||(oe.state&=~ee,Oe(f,oe));return!oe.ended&&(oe.length<oe.highWaterMark||oe.length===0)}function Se(f,p,Y,X){p.flowing&&p.length===0&&!p.sync&&f.listenerCount("data")>0?((p.state&q)!==0?p.awaitDrainWriters.clear():p.awaitDrainWriters=null,p.dataEmitted=!0,f.emit("data",Y)):(p.length+=p.objectMode?1:Y.length,X?p.buffer.unshift(Y):p.buffer.push(Y),(p.state&ae)!==0&&Qe(f)),Oe(f,p)}L.prototype.isPaused=function(){const f=this._readableState;return f[re]===!0||f.flowing===!1},L.prototype.setEncoding=function(f){const p=new de(f);this._readableState.decoder=p,this._readableState.encoding=this._readableState.decoder.encoding;const Y=this._readableState.buffer;let X="";for(const oe of Y)X+=p.write(oe);return Y.clear(),X!==""&&Y.push(X),this._readableState.length=X.length,this};const me=1073741824;function xe(f){if(f>me)throw new M("size","<= 1GiB",f);return f--,f|=f>>>1,f|=f>>>2,f|=f>>>4,f|=f>>>8,f|=f>>>16,f++,f}function Ee(f,p){return f<=0||p.length===0&&p.ended?0:(p.state&B)!==0?1:n(f)?p.flowing&&p.length?p.buffer.first().length:p.length:f<=p.length?f:p.ended?p.length:0}L.prototype.read=function(f){v("read",f),f===void 0?f=NaN:r(f)||(f=i(f,10));const p=this._readableState,Y=f;if(f>p.highWaterMark&&(p.highWaterMark=xe(f)),f!==0&&(p.state&=~P),f===0&&p.needReadable&&((p.highWaterMark!==0?p.length>=p.highWaterMark:p.length>0)||p.ended))return v("read: emitReadable",p.length,p.ended),p.length===0&&p.ended?Ue(this):Qe(this),null;if(f=Ee(f,p),f===0&&p.ended)return p.length===0&&Ue(this),null;let X=(p.state&ae)!==0;if(v("need readable",X),(p.length===0||p.length-f<p.highWaterMark)&&(X=!0,v("length less than watermark",X)),p.ended||p.reading||p.destroyed||p.errored||!p.constructed)X=!1,v("reading, ended or constructing",X);else if(X){v("do read"),p.state|=ee|fe,p.length===0&&(p.state|=ae);try{this._read(p.highWaterMark)}catch(Re){y(this,Re)}p.state&=~fe,p.reading||(f=Ee(Y,p))}let oe;return f>0?oe=We(f,p):oe=null,oe===null?(p.needReadable=p.length<=p.highWaterMark,f=0):(p.length-=f,p.multiAwaitDrain?p.awaitDrainWriters.clear():p.awaitDrainWriters=null),p.length===0&&(p.ended||(p.needReadable=!0),Y!==f&&p.ended&&Ue(this)),oe!==null&&!p.errorEmitted&&!p.closeEmitted&&(p.dataEmitted=!0,this.emit("data",oe)),oe};function je(f,p){if(v("onEofChunk"),!p.ended){if(p.decoder){const Y=p.decoder.end();Y&&Y.length&&(p.buffer.push(Y),p.length+=p.objectMode?1:Y.length)}p.ended=!0,p.sync?Qe(f):(p.needReadable=!1,p.emittedReadable=!0,Wt(f))}}function Qe(f){const p=f._readableState;v("emitReadable",p.needReadable,p.emittedReadable),p.needReadable=!1,p.emittedReadable||(v("emitReadable",p.flowing),p.emittedReadable=!0,e.nextTick(Wt,f))}function Wt(f){const p=f._readableState;v("emitReadable_",p.destroyed,p.length,p.ended),!p.destroyed&&!p.errored&&(p.length||p.ended)&&(f.emit("readable"),p.emittedReadable=!1),p.needReadable=!p.flowing&&!p.ended&&p.length<=p.highWaterMark,ye(f)}function Oe(f,p){!p.readingMore&&p.constructed&&(p.readingMore=!0,e.nextTick(An,f,p))}function An(f,p){for(;!p.reading&&!p.ended&&(p.length<p.highWaterMark||p.flowing&&p.length===0);){const Y=p.length;if(v("maybeReadMore read 0"),f.read(0),Y===p.length)break}p.readingMore=!1}L.prototype._read=function(f){throw new C("_read()")},L.prototype.pipe=function(f,p){const Y=this,X=this._readableState;X.pipes.length===1&&(X.multiAwaitDrain||(X.multiAwaitDrain=!0,X.awaitDrainWriters=new c(X.awaitDrainWriters?[X.awaitDrainWriters]:[]))),X.pipes.push(f),v("pipe count=%d opts=%j",X.pipes.length,p);const Re=(!p||p.end!==!1)&&f!==e.stdout&&f!==e.stderr?En:zt;X.endEmitted?e.nextTick(Re):Y.once("end",Re),f.on("unpipe",Be);function Be(ct,Ye){v("onunpipe"),ct===Y&&Ye&&Ye.hasUnpiped===!1&&(Ye.hasUnpiped=!0,zo())}function En(){v("onend"),f.end()}let ut,xn=!1;function zo(){v("cleanup"),f.removeListener("close",Pr),f.removeListener("finish",Tr),ut&&f.removeListener("drain",ut),f.removeListener("error",Mr),f.removeListener("unpipe",Be),Y.removeListener("end",En),Y.removeListener("end",zt),Y.removeListener("data",Rn),xn=!0,ut&&X.awaitDrainWriters&&(!f._writableState||f._writableState.needDrain)&&ut()}function In(){xn||(X.pipes.length===1&&X.pipes[0]===f?(v("false write response, pause",0),X.awaitDrainWriters=f,X.multiAwaitDrain=!1):X.pipes.length>1&&X.pipes.includes(f)&&(v("false write response, pause",X.awaitDrainWriters.size),X.awaitDrainWriters.add(f)),Y.pause()),ut||(ut=vn(Y,f),f.on("drain",ut))}Y.on("data",Rn);function Rn(ct){v("ondata");const Ye=f.write(ct);v("dest.write",Ye),Ye===!1&&In()}function Mr(ct){if(v("onerror",ct),zt(),f.removeListener("error",Mr),f.listenerCount("error")===0){const Ye=f._writableState||f._readableState;Ye&&!Ye.errorEmitted?y(f,ct):f.emit("error",ct)}}S(f,"error",Mr);function Pr(){f.removeListener("finish",Tr),zt()}f.once("close",Pr);function Tr(){v("onfinish"),f.removeListener("close",Pr),zt()}f.once("finish",Tr);function zt(){v("unpipe"),Y.unpipe(f)}return f.emit("pipe",Y),f.writableNeedDrain===!0?In():X.flowing||(v("pipe resume"),Y.resume()),f};function vn(f,p){return function(){const X=f._readableState;X.awaitDrainWriters===p?(v("pipeOnDrain",1),X.awaitDrainWriters=null):X.multiAwaitDrain&&(v("pipeOnDrain",X.awaitDrainWriters.size),X.awaitDrainWriters.delete(p)),(!X.awaitDrainWriters||X.awaitDrainWriters.size===0)&&f.listenerCount("data")&&f.resume()}}L.prototype.unpipe=function(f){const p=this._readableState,Y={hasUnpiped:!1};if(p.pipes.length===0)return this;if(!f){const oe=p.pipes;p.pipes=[],this.pause();for(let Re=0;Re<oe.length;Re++)oe[Re].emit("unpipe",this,{hasUnpiped:!1});return this}const X=t(p.pipes,f);return X===-1?this:(p.pipes.splice(X,1),p.pipes.length===0&&this.pause(),f.emit("unpipe",this,Y),this)},L.prototype.on=function(f,p){const Y=k.prototype.on.call(this,f,p),X=this._readableState;return f==="data"?(X.readableListening=this.listenerCount("readable")>0,X.flowing!==!1&&this.resume()):f==="readable"&&!X.endEmitted&&!X.readableListening&&(X.readableListening=X.needReadable=!0,X.flowing=!1,X.emittedReadable=!1,v("on readable",X.length,X.reading),X.length?Qe(this):X.reading||e.nextTick(O,this)),Y},L.prototype.addListener=L.prototype.on,L.prototype.removeListener=function(f,p){const Y=k.prototype.removeListener.call(this,f,p);return f==="readable"&&e.nextTick(Cr,this),Y},L.prototype.off=L.prototype.removeListener,L.prototype.removeAllListeners=function(f){const p=k.prototype.removeAllListeners.apply(this,arguments);return(f==="readable"||f===void 0)&&e.nextTick(Cr,this),p};function Cr(f){const p=f._readableState;p.readableListening=f.listenerCount("readable")>0,p.resumeScheduled&&p[re]===!1?p.flowing=!0:f.listenerCount("data")>0?f.resume():p.readableListening||(p.flowing=null)}function O(f){v("readable nexttick read 0"),f.read(0)}L.prototype.resume=function(){const f=this._readableState;return f.flowing||(v("resume"),f.flowing=!f.readableListening,he(this,f)),f[re]=!1,this};function he(f,p){p.resumeScheduled||(p.resumeScheduled=!0,e.nextTick(be,f,p))}function be(f,p){v("resume",p.reading),p.reading||f.read(0),p.resumeScheduled=!1,f.emit("resume"),ye(f),p.flowing&&!p.reading&&f.read(0)}L.prototype.pause=function(){return v("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(v("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[re]=!0,this};function ye(f){const p=f._readableState;for(v("flow",p.flowing);p.flowing&&f.read()!==null;);}L.prototype.wrap=function(f){let p=!1;f.on("data",X=>{!this.push(X)&&f.pause&&(p=!0,f.pause())}),f.on("end",()=>{this.push(null)}),f.on("error",X=>{y(this,X)}),f.on("close",()=>{this.destroy()}),f.on("destroy",()=>{this.destroy()}),this._read=()=>{p&&f.resume&&(p=!1,f.resume())};const Y=a(f);for(let X=1;X<Y.length;X++){const oe=Y[X];this[oe]===void 0&&typeof f[oe]=="function"&&(this[oe]=f[oe].bind(f))}return this},L.prototype[g]=function(){return pe(this)},L.prototype.iterator=function(f){return f!==void 0&&J(f,"options"),pe(this,f)};function pe(f,p){typeof f.read!="function"&&(f=L.wrap(f,{objectMode:!0}));const Y=_e(f,p);return Y.stream=f,Y}async function*_e(f,p){let Y=ne;function X(Be){this===f?(Y(),Y=ne):Y=Be}f.on("readable",X);let oe;const Re=E(f,{writable:!1},Be=>{oe=Be?z(oe,Be):null,Y(),Y=ne});try{for(;;){const Be=f.destroyed?null:f.read();if(Be!==null)yield Be;else{if(oe)throw oe;if(oe===null)return;await new u(X)}}}catch(Be){throw oe=z(oe,Be),oe}finally{(oe||p?.destroyOnReturn!==!1)&&(oe===void 0||f._readableState.autoDestroy)?G.destroyer(f,null):(f.off("readable",X),Re())}}o(L.prototype,{readable:{__proto__:null,get(){const f=this._readableState;return!!f&&f.readable!==!1&&!f.destroyed&&!f.errorEmitted&&!f.endEmitted},set(f){this._readableState&&(this._readableState.readable=!!f)}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._readableState.readable!==!1&&(this._readableState.destroyed||this._readableState.errored)&&!this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(f){this._readableState&&(this._readableState.flowing=f)}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.objectMode:!1}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return this._readableState?this._readableState.closed:!1}},destroyed:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.destroyed:!1},set(f){this._readableState&&(this._readableState.destroyed=f)}},readableEnded:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}}),o(H.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return this[re]!==!1},set(f){this[re]=!!f}}}),L._fromList=We;function We(f,p){if(p.length===0)return null;let Y;return p.objectMode?Y=p.buffer.shift():!f||f>=p.length?(p.decoder?Y=p.buffer.join(""):p.buffer.length===1?Y=p.buffer.first():Y=p.buffer.concat(p.length),p.buffer.clear()):Y=p.buffer.consume(f,p.decoder),Y}function Ue(f){const p=f._readableState;v("endReadable",p.endEmitted),p.endEmitted||(p.ended=!0,e.nextTick(Ze,p,f))}function Ze(f,p){if(v("endReadableNT",f.endEmitted,f.length),!f.errored&&!f.closeEmitted&&!f.endEmitted&&f.length===0){if(f.endEmitted=!0,p.emit("end"),p.writable&&p.allowHalfOpen===!1)e.nextTick(Dt,p);else if(f.autoDestroy){const Y=p._writableState;(!Y||Y.autoDestroy&&(Y.finished||Y.writable===!1))&&p.destroy()}}}function Dt(f){f.writable&&!f.writableEnded&&!f.destroyed&&f.end()}L.from=function(f,p){return F(L,f,p)};let Nt;function Sn(){return Nt===void 0&&(Nt={}),Nt}return L.fromWeb=function(f,p){return Sn().newStreamReadableFromReadableStream(f,p)},L.toWeb=function(f,p){return Sn().newReadableStreamFromStreamReadable(f,p)},L.wrap=function(f,p){var Y,X;return new L({objectMode:(Y=(X=f.readableObjectMode)!==null&&X!==void 0?X:f.objectMode)!==null&&Y!==void 0?Y:!0,...p,destroy(oe,Re){G.destroyer(f,oe),Re(oe)}}).wrap(f)},Sa}var Ea,mc;function jl(){if(mc)return Ea;mc=1;const e=It(),{ArrayPrototypeSlice:t,Error:r,FunctionPrototypeSymbolHasInstance:n,ObjectDefineProperty:i,ObjectDefineProperties:o,ObjectSetPrototypeOf:a,StringPrototypeToLowerCase:s,Symbol:u,SymbolHasInstance:c}=ze();Ea=J,J.WritableState=x;const{EventEmitter:h}=lr(),g=Nl().Stream,{Buffer:A}=xt(),I=wn(),{addAbortSignal:k}=Lo(),{getHighWaterMark:S,getDefaultHighWaterMark:_}=Uo(),{ERR_INVALID_ARG_TYPE:R,ERR_METHOD_NOT_IMPLEMENTED:E,ERR_MULTIPLE_CALLBACK:v,ERR_STREAM_CANNOT_PIPE:V,ERR_STREAM_DESTROYED:G,ERR_STREAM_ALREADY_FINISHED:ue,ERR_STREAM_NULL_VALUES:ce,ERR_STREAM_WRITE_AFTER_END:z,ERR_UNKNOWN_ENCODING:se}=gt().codes,{errorOrDestroy:C}=I;a(J.prototype,g.prototype),a(J,g);function M(){}const K=u("kOnFinished");function x(l,d,w){typeof w!="boolean"&&(w=d instanceof ar()),this.objectMode=!!(l&&l.objectMode),w&&(this.objectMode=this.objectMode||!!(l&&l.writableObjectMode)),this.highWaterMark=l?S(this,l,"writableHighWaterMark",w):_(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;const j=!!(l&&l.decodeStrings===!1);this.decodeStrings=!j,this.defaultEncoding=l&&l.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=y.bind(void 0,d),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,$(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!l||l.emitClose!==!1,this.autoDestroy=!l||l.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[K]=[]}function $(l){l.buffered=[],l.bufferedIndex=0,l.allBuffers=!0,l.allNoop=!0}x.prototype.getBuffer=function(){return t(this.buffered,this.bufferedIndex)},i(x.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}});function J(l){const d=this instanceof ar();if(!d&&!n(J,this))return new J(l);this._writableState=new x(l,this,d),l&&(typeof l.write=="function"&&(this._write=l.write),typeof l.writev=="function"&&(this._writev=l.writev),typeof l.destroy=="function"&&(this._destroy=l.destroy),typeof l.final=="function"&&(this._final=l.final),typeof l.construct=="function"&&(this._construct=l.construct),l.signal&&k(l.signal,this)),g.call(this,l),I.construct(this,()=>{const w=this._writableState;w.writing||ee(this,w),P(this,w)})}i(J,c,{__proto__:null,value:function(l){return n(this,l)?!0:this!==J?!1:l&&l._writableState instanceof x}}),J.prototype.pipe=function(){C(this,new V)};function re(l,d,w,j){const q=l._writableState;if(typeof w=="function")j=w,w=q.defaultEncoding;else{if(!w)w=q.defaultEncoding;else if(w!=="buffer"&&!A.isEncoding(w))throw new se(w);typeof j!="function"&&(j=M)}if(d===null)throw new ce;if(!q.objectMode)if(typeof d=="string")q.decodeStrings!==!1&&(d=A.from(d,w),w="buffer");else if(d instanceof A)w="buffer";else if(g._isUint8Array(d))d=g._uint8ArrayToBuffer(d),w="buffer";else throw new R("chunk",["string","Buffer","Uint8Array"],d);let W;return q.ending?W=new z:q.destroyed&&(W=new G("write")),W?(e.nextTick(j,W),C(l,W,!0),W):(q.pendingcb++,de(l,q,d,w,j))}J.prototype.write=function(l,d,w){return re(this,l,d,w)===!0},J.prototype.cork=function(){this._writableState.corked++},J.prototype.uncork=function(){const l=this._writableState;l.corked&&(l.corked--,l.writing||ee(this,l))},J.prototype.setDefaultEncoding=function(d){if(typeof d=="string"&&(d=s(d)),!A.isEncoding(d))throw new se(d);return this._writableState.defaultEncoding=d,this};function de(l,d,w,j,q){const W=d.objectMode?1:w.length;d.length+=W;const b=d.length<d.highWaterMark;return b||(d.needDrain=!0),d.writing||d.corked||d.errored||!d.constructed?(d.buffered.push({chunk:w,encoding:j,callback:q}),d.allBuffers&&j!=="buffer"&&(d.allBuffers=!1),d.allNoop&&q!==M&&(d.allNoop=!1)):(d.writelen=W,d.writecb=q,d.writing=!0,d.sync=!0,l._write(w,j,d.onwrite),d.sync=!1),b&&!d.errored&&!d.destroyed}function F(l,d,w,j,q,W,b){d.writelen=j,d.writecb=b,d.writing=!0,d.sync=!0,d.destroyed?d.onwrite(new G("write")):w?l._writev(q,d.onwrite):l._write(q,W,d.onwrite),d.sync=!1}function ne(l,d,w,j){--d.pendingcb,j(w),D(d),C(l,w)}function y(l,d){const w=l._writableState,j=w.sync,q=w.writecb;if(typeof q!="function"){C(l,new v);return}w.writing=!1,w.writecb=null,w.length-=w.writelen,w.writelen=0,d?(d.stack,w.errored||(w.errored=d),l._readableState&&!l._readableState.errored&&(l._readableState.errored=d),j?e.nextTick(ne,l,w,d,q):ne(l,w,d,q)):(w.buffered.length>w.bufferedIndex&&ee(l,w),j?w.afterWriteTickInfo!==null&&w.afterWriteTickInfo.cb===q?w.afterWriteTickInfo.count++:(w.afterWriteTickInfo={count:1,cb:q,stream:l,state:w},e.nextTick(B,w.afterWriteTickInfo)):Z(l,w,1,q))}function B({stream:l,state:d,count:w,cb:j}){return d.afterWriteTickInfo=null,Z(l,d,w,j)}function Z(l,d,w,j){for(!d.ending&&!l.destroyed&&d.length===0&&d.needDrain&&(d.needDrain=!1,l.emit("drain"));w-- >0;)d.pendingcb--,j();d.destroyed&&D(d),P(l,d)}function D(l){if(l.writing)return;for(let q=l.bufferedIndex;q<l.buffered.length;++q){var d;const{chunk:W,callback:b}=l.buffered[q],T=l.objectMode?1:W.length;l.length-=T,b((d=l.errored)!==null&&d!==void 0?d:new G("write"))}const w=l[K].splice(0);for(let q=0;q<w.length;q++){var j;w[q]((j=l.errored)!==null&&j!==void 0?j:new G("end"))}$(l)}function ee(l,d){if(d.corked||d.bufferProcessing||d.destroyed||!d.constructed)return;const{buffered:w,bufferedIndex:j,objectMode:q}=d,W=w.length-j;if(!W)return;let b=j;if(d.bufferProcessing=!0,W>1&&l._writev){d.pendingcb-=W-1;const T=d.allNoop?M:L=>{for(let ge=b;ge<w.length;++ge)w[ge].callback(L)},H=d.allNoop&&b===0?w:t(w,b);H.allBuffers=d.allBuffers,F(l,d,!0,d.length,H,"",T),$(d)}else{do{const{chunk:T,encoding:H,callback:L}=w[b];w[b++]=null;const ge=q?1:T.length;F(l,d,!1,ge,T,H,L)}while(b<w.length&&!d.writing);b===w.length?$(d):b>256?(w.splice(0,b),d.bufferedIndex=0):d.bufferedIndex=b}d.bufferProcessing=!1}J.prototype._write=function(l,d,w){if(this._writev)this._writev([{chunk:l,encoding:d}],w);else throw new E("_write()")},J.prototype._writev=null,J.prototype.end=function(l,d,w){const j=this._writableState;typeof l=="function"?(w=l,l=null,d=null):typeof d=="function"&&(w=d,d=null);let q;if(l!=null){const W=re(this,l,d);W instanceof r&&(q=W)}return j.corked&&(j.corked=1,this.uncork()),q||(!j.errored&&!j.ending?(j.ending=!0,P(this,j,!0),j.ended=!0):j.finished?q=new ue("end"):j.destroyed&&(q=new G("end"))),typeof w=="function"&&(q||j.finished?e.nextTick(w,q):j[K].push(w)),this};function ie(l){return l.ending&&!l.destroyed&&l.constructed&&l.length===0&&!l.errored&&l.buffered.length===0&&!l.finished&&!l.writing&&!l.errorEmitted&&!l.closeEmitted}function fe(l,d){let w=!1;function j(q){if(w){C(l,q??v());return}if(w=!0,d.pendingcb--,q){const W=d[K].splice(0);for(let b=0;b<W.length;b++)W[b](q);C(l,q,d.sync)}else ie(d)&&(d.prefinished=!0,l.emit("prefinish"),d.pendingcb++,e.nextTick(N,l,d))}d.sync=!0,d.pendingcb++;try{l._final(j)}catch(q){j(q)}d.sync=!1}function ae(l,d){!d.prefinished&&!d.finalCalled&&(typeof l._final=="function"&&!d.destroyed?(d.finalCalled=!0,fe(l,d)):(d.prefinished=!0,l.emit("prefinish")))}function P(l,d,w){ie(d)&&(ae(l,d),d.pendingcb===0&&(w?(d.pendingcb++,e.nextTick((j,q)=>{ie(q)?N(j,q):q.pendingcb--},l,d)):ie(d)&&(d.pendingcb++,N(l,d))))}function N(l,d){d.pendingcb--,d.finished=!0;const w=d[K].splice(0);for(let j=0;j<w.length;j++)w[j]();if(l.emit("finish"),d.autoDestroy){const j=l._readableState;(!j||j.autoDestroy&&(j.endEmitted||j.readable===!1))&&l.destroy()}}o(J.prototype,{closed:{__proto__:null,get(){return this._writableState?this._writableState.closed:!1}},destroyed:{__proto__:null,get(){return this._writableState?this._writableState.destroyed:!1},set(l){this._writableState&&(this._writableState.destroyed=l)}},writable:{__proto__:null,get(){const l=this._writableState;return!!l&&l.writable!==!1&&!l.destroyed&&!l.errored&&!l.ending&&!l.ended},set(l){this._writableState&&(this._writableState.writable=!!l)}},writableFinished:{__proto__:null,get(){return this._writableState?this._writableState.finished:!1}},writableObjectMode:{__proto__:null,get(){return this._writableState?this._writableState.objectMode:!1}},writableBuffer:{__proto__:null,get(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{__proto__:null,get(){return this._writableState?this._writableState.ending:!1}},writableNeedDrain:{__proto__:null,get(){const l=this._writableState;return l?!l.destroyed&&!l.ending&&l.needDrain:!1}},writableHighWaterMark:{__proto__:null,get(){return this._writableState&&this._writableState.highWaterMark}},writableCorked:{__proto__:null,get(){return this._writableState?this._writableState.corked:0}},writableLength:{__proto__:null,get(){return this._writableState&&this._writableState.length}},errored:{__proto__:null,enumerable:!1,get(){return this._writableState?this._writableState.errored:null}},writableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._writableState.writable!==!1&&(this._writableState.destroyed||this._writableState.errored)&&!this._writableState.finished)}}});const Q=I.destroy;J.prototype.destroy=function(l,d){const w=this._writableState;return!w.destroyed&&(w.bufferedIndex<w.buffered.length||w[K].length)&&e.nextTick(D,w),Q.call(this,l,d),this},J.prototype._undestroy=I.undestroy,J.prototype._destroy=function(l,d){d(l)},J.prototype[h.captureRejectionSymbol]=function(l){this.destroy(l)};let le;function U(){return le===void 0&&(le={}),le}return J.fromWeb=function(l,d){return U().newStreamWritableFromWritableStream(l,d)},J.toWeb=function(l){return U().newWritableStreamFromStreamWritable(l)},Ea}var xa,wc;function I_(){if(wc)return xa;wc=1;const e=It(),t=xt(),{isReadable:r,isWritable:n,isIterable:i,isNodeStream:o,isReadableNodeStream:a,isWritableNodeStream:s,isDuplexNodeStream:u,isReadableStream:c,isWritableStream:h}=ur(),g=Ir(),{AbortError:A,codes:{ERR_INVALID_ARG_TYPE:I,ERR_INVALID_RETURN_VALUE:k}}=gt(),{destroyer:S}=wn(),_=ar(),R=Bo(),E=jl(),{createDeferredPromise:v}=At(),V=Qh(),G=globalThis.Blob||t.Blob,ue=typeof G<"u"?function(x){return x instanceof G}:function(x){return!1},ce=globalThis.AbortController||Xt().AbortController,{FunctionPrototypeCall:z}=ze();class se extends _{constructor(x){super(x),x?.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),x?.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}}xa=function K(x,$){if(u(x))return x;if(a(x))return M({readable:x});if(s(x))return M({writable:x});if(o(x))return M({writable:!1,readable:!1});if(c(x))return M({readable:R.fromWeb(x)});if(h(x))return M({writable:E.fromWeb(x)});if(typeof x=="function"){const{value:re,write:de,final:F,destroy:ne}=C(x);if(i(re))return V(se,re,{objectMode:!0,write:de,final:F,destroy:ne});const y=re?.then;if(typeof y=="function"){let B;const Z=z(y,re,D=>{if(D!=null)throw new k("nully","body",D)},D=>{S(B,D)});return B=new se({objectMode:!0,readable:!1,write:de,final(D){F(async()=>{try{await Z,e.nextTick(D,null)}catch(ee){e.nextTick(D,ee)}})},destroy:ne})}throw new k("Iterable, AsyncIterable or AsyncFunction",$,re)}if(ue(x))return K(x.arrayBuffer());if(i(x))return V(se,x,{objectMode:!0,writable:!1});if(c(x?.readable)&&h(x?.writable))return se.fromWeb(x);if(typeof x?.writable=="object"||typeof x?.readable=="object"){const re=x!=null&&x.readable?a(x?.readable)?x?.readable:K(x.readable):void 0,de=x!=null&&x.writable?s(x?.writable)?x?.writable:K(x.writable):void 0;return M({readable:re,writable:de})}const J=x?.then;if(typeof J=="function"){let re;return z(J,x,de=>{de!=null&&re.push(de),re.push(null)},de=>{S(re,de)}),re=new se({objectMode:!0,writable:!1,read(){}})}throw new I($,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],x)};function C(K){let{promise:x,resolve:$}=v();const J=new ce,re=J.signal;return{value:K((async function*(){for(;;){const F=x;x=null;const{chunk:ne,done:y,cb:B}=await F;if(e.nextTick(B),y)return;if(re.aborted)throw new A(void 0,{cause:re.reason});({promise:x,resolve:$}=v()),yield ne}})(),{signal:re}),write(F,ne,y){const B=$;$=null,B({chunk:F,done:!1,cb:y})},final(F){const ne=$;$=null,ne({done:!0,cb:F})},destroy(F,ne){J.abort(),ne(F)}}}function M(K){const x=K.readable&&typeof K.readable.read!="function"?R.wrap(K.readable):K.readable,$=K.writable;let J=!!r(x),re=!!n($),de,F,ne,y,B;function Z(D){const ee=y;y=null,ee?ee(D):D&&B.destroy(D)}return B=new se({readableObjectMode:!!(x!=null&&x.readableObjectMode),writableObjectMode:!!($!=null&&$.writableObjectMode),readable:J,writable:re}),re&&(g($,D=>{re=!1,D&&S(x,D),Z(D)}),B._write=function(D,ee,ie){$.write(D,ee)?ie():de=ie},B._final=function(D){$.end(),F=D},$.on("drain",function(){if(de){const D=de;de=null,D()}}),$.on("finish",function(){if(F){const D=F;F=null,D()}})),J&&(g(x,D=>{J=!1,D&&S(x,D),Z(D)}),x.on("readable",function(){if(ne){const D=ne;ne=null,D()}}),x.on("end",function(){B.push(null)}),B._read=function(){for(;;){const D=x.read();if(D===null){ne=B._read;return}if(!B.push(D))return}}),B._destroy=function(D,ee){!D&&y!==null&&(D=new A),ne=null,de=null,F=null,y===null?ee(D):(y=ee,S($,D),S(x,D))},B}return xa}var Ia,_c;function ar(){if(_c)return Ia;_c=1;const{ObjectDefineProperties:e,ObjectGetOwnPropertyDescriptor:t,ObjectKeys:r,ObjectSetPrototypeOf:n}=ze();Ia=a;const i=Bo(),o=jl();n(a.prototype,i.prototype),n(a,i);{const h=r(o.prototype);for(let g=0;g<h.length;g++){const A=h[g];a.prototype[A]||(a.prototype[A]=o.prototype[A])}}function a(h){if(!(this instanceof a))return new a(h);i.call(this,h),o.call(this,h),h?(this.allowHalfOpen=h.allowHalfOpen!==!1,h.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),h.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)):this.allowHalfOpen=!0}e(a.prototype,{writable:{__proto__:null,...t(o.prototype,"writable")},writableHighWaterMark:{__proto__:null,...t(o.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...t(o.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...t(o.prototype,"writableBuffer")},writableLength:{__proto__:null,...t(o.prototype,"writableLength")},writableFinished:{__proto__:null,...t(o.prototype,"writableFinished")},writableCorked:{__proto__:null,...t(o.prototype,"writableCorked")},writableEnded:{__proto__:null,...t(o.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...t(o.prototype,"writableNeedDrain")},destroyed:{__proto__:null,get(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set(h){this._readableState&&this._writableState&&(this._readableState.destroyed=h,this._writableState.destroyed=h)}}});let s;function u(){return s===void 0&&(s={}),s}a.fromWeb=function(h,g){return u().newStreamDuplexFromReadableWritablePair(h,g)},a.toWeb=function(h){return u().newReadableWritablePairFromDuplex(h)};let c;return a.from=function(h){return c||(c=I_()),c(h,"body")},Ia}var Ra,Ac;function Jh(){if(Ac)return Ra;Ac=1;const{ObjectSetPrototypeOf:e,Symbol:t}=ze();Ra=a;const{ERR_METHOD_NOT_IMPLEMENTED:r}=gt().codes,n=ar(),{getHighWaterMark:i}=Uo();e(a.prototype,n.prototype),e(a,n);const o=t("kCallback");function a(c){if(!(this instanceof a))return new a(c);const h=c?i(this,c,"readableHighWaterMark",!0):null;h===0&&(c={...c,highWaterMark:null,readableHighWaterMark:h,writableHighWaterMark:c.writableHighWaterMark||0}),n.call(this,c),this._readableState.sync=!1,this[o]=null,c&&(typeof c.transform=="function"&&(this._transform=c.transform),typeof c.flush=="function"&&(this._flush=c.flush)),this.on("prefinish",u)}function s(c){typeof this._flush=="function"&&!this.destroyed?this._flush((h,g)=>{if(h){c?c(h):this.destroy(h);return}g!=null&&this.push(g),this.push(null),c&&c()}):(this.push(null),c&&c())}function u(){this._final!==s&&s.call(this)}return a.prototype._final=s,a.prototype._transform=function(c,h,g){throw new r("_transform()")},a.prototype._write=function(c,h,g){const A=this._readableState,I=this._writableState,k=A.length;this._transform(c,h,(S,_)=>{if(S){g(S);return}_!=null&&this.push(_),I.ended||k===A.length||A.length<A.highWaterMark?g():this[o]=g})},a.prototype._read=function(){if(this[o]){const c=this[o];this[o]=null,c()}},Ra}var Ca,vc;function Gh(){if(vc)return Ca;vc=1;const{ObjectSetPrototypeOf:e}=ze();Ca=r;const t=Jh();e(r.prototype,t.prototype),e(r,t);function r(n){if(!(this instanceof r))return new r(n);t.call(this,n)}return r.prototype._transform=function(n,i,o){o(null,n)},Ca}var Ma,Sc;function Fl(){if(Sc)return Ma;Sc=1;const e=It(),{ArrayIsArray:t,Promise:r,SymbolAsyncIterator:n,SymbolDispose:i}=ze(),o=Ir(),{once:a}=At(),s=wn(),u=ar(),{aggregateTwoErrors:c,codes:{ERR_INVALID_ARG_TYPE:h,ERR_INVALID_RETURN_VALUE:g,ERR_MISSING_ARGS:A,ERR_STREAM_DESTROYED:I,ERR_STREAM_PREMATURE_CLOSE:k},AbortError:S}=gt(),{validateFunction:_,validateAbortSignal:R}=Fi(),{isIterable:E,isReadable:v,isReadableNodeStream:V,isNodeStream:G,isTransformStream:ue,isWebStream:ce,isReadableStream:z,isReadableFinished:se}=ur(),C=globalThis.AbortController||Xt().AbortController;let M,K,x;function $(D,ee,ie){let fe=!1;D.on("close",()=>{fe=!0});const ae=o(D,{readable:ee,writable:ie},P=>{fe=!P});return{destroy:P=>{fe||(fe=!0,s.destroyer(D,P||new I("pipe")))},cleanup:ae}}function J(D){return _(D[D.length-1],"streams[stream.length - 1]"),D.pop()}function re(D){if(E(D))return D;if(V(D))return de(D);throw new h("val",["Readable","Iterable","AsyncIterable"],D)}async function*de(D){K||(K=Bo()),yield*K.prototype[n].call(D)}async function F(D,ee,ie,{end:fe}){let ae,P=null;const N=U=>{if(U&&(ae=U),P){const l=P;P=null,l()}},Q=()=>new r((U,l)=>{ae?l(ae):P=()=>{ae?l(ae):U()}});ee.on("drain",N);const le=o(ee,{readable:!1},N);try{ee.writableNeedDrain&&await Q();for await(const U of D)ee.write(U)||await Q();fe&&(ee.end(),await Q()),ie()}catch(U){ie(ae!==U?c(ae,U):U)}finally{le(),ee.off("drain",N)}}async function ne(D,ee,ie,{end:fe}){ue(ee)&&(ee=ee.writable);const ae=ee.getWriter();try{for await(const P of D)await ae.ready,ae.write(P).catch(()=>{});await ae.ready,fe&&await ae.close(),ie()}catch(P){try{await ae.abort(P),ie(P)}catch(N){ie(N)}}}function y(...D){return B(D,a(J(D)))}function B(D,ee,ie){if(D.length===1&&t(D[0])&&(D=D[0]),D.length<2)throw new A("streams");const fe=new C,ae=fe.signal,P=ie?.signal,N=[];R(P,"options.signal");function Q(){q(new S)}x=x||At().addAbortListener;let le;P&&(le=x(P,Q));let U,l;const d=[];let w=0;function j(H){q(H,--w===0)}function q(H,L){var ge;if(H&&(!U||U.code==="ERR_STREAM_PREMATURE_CLOSE")&&(U=H),!(!U&&!L)){for(;d.length;)d.shift()(U);(ge=le)===null||ge===void 0||ge[i](),fe.abort(),L&&(U||N.forEach(Se=>Se()),e.nextTick(ee,U,l))}}let W;for(let H=0;H<D.length;H++){const L=D[H],ge=H<D.length-1,Se=H>0,me=ge||ie?.end!==!1,xe=H===D.length-1;if(G(L)){let Ee=function(je){je&&je.name!=="AbortError"&&je.code!=="ERR_STREAM_PREMATURE_CLOSE"&&j(je)};if(me){const{destroy:je,cleanup:Qe}=$(L,ge,Se);d.push(je),v(L)&&xe&&N.push(Qe)}L.on("error",Ee),v(L)&&xe&&N.push(()=>{L.removeListener("error",Ee)})}if(H===0)if(typeof L=="function"){if(W=L({signal:ae}),!E(W))throw new g("Iterable, AsyncIterable or Stream","source",W)}else E(L)||V(L)||ue(L)?W=L:W=u.from(L);else if(typeof L=="function"){if(ue(W)){var b;W=re((b=W)===null||b===void 0?void 0:b.readable)}else W=re(W);if(W=L(W,{signal:ae}),ge){if(!E(W,!0))throw new g("AsyncIterable",`transform[${H-1}]`,W)}else{var T;M||(M=Gh());const Ee=new M({objectMode:!0}),je=(T=W)===null||T===void 0?void 0:T.then;if(typeof je=="function")w++,je.call(W,Oe=>{l=Oe,Oe!=null&&Ee.write(Oe),me&&Ee.end(),e.nextTick(j)},Oe=>{Ee.destroy(Oe),e.nextTick(j,Oe)});else if(E(W,!0))w++,F(W,Ee,j,{end:me});else if(z(W)||ue(W)){const Oe=W.readable||W;w++,F(Oe,Ee,j,{end:me})}else throw new g("AsyncIterable or Promise","destination",W);W=Ee;const{destroy:Qe,cleanup:Wt}=$(W,!1,!0);d.push(Qe),xe&&N.push(Wt)}}else if(G(L)){if(V(W)){w+=2;const Ee=Z(W,L,j,{end:me});v(L)&&xe&&N.push(Ee)}else if(ue(W)||z(W)){const Ee=W.readable||W;w++,F(Ee,L,j,{end:me})}else if(E(W))w++,F(W,L,j,{end:me});else throw new h("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],W);W=L}else if(ce(L)){if(V(W))w++,ne(re(W),L,j,{end:me});else if(z(W)||E(W))w++,ne(W,L,j,{end:me});else if(ue(W))w++,ne(W.readable,L,j,{end:me});else throw new h("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],W);W=L}else W=u.from(L)}return(ae!=null&&ae.aborted||P!=null&&P.aborted)&&e.nextTick(Q),W}function Z(D,ee,ie,{end:fe}){let ae=!1;if(ee.on("close",()=>{ae||ie(new k)}),D.pipe(ee,{end:!1}),fe){let P=function(){ae=!0,ee.end()};se(D)?e.nextTick(P):D.once("end",P)}else ie();return o(D,{readable:!0,writable:!1},P=>{const N=D._readableState;P&&P.code==="ERR_STREAM_PREMATURE_CLOSE"&&N&&N.ended&&!N.errored&&!N.errorEmitted?D.once("end",ie).once("error",ie):ie(P)}),o(ee,{readable:!1,writable:!0},ie)}return Ma={pipelineImpl:B,pipeline:y},Ma}var Pa,Ec;function Yh(){if(Ec)return Pa;Ec=1;const{pipeline:e}=Fl(),t=ar(),{destroyer:r}=wn(),{isNodeStream:n,isReadable:i,isWritable:o,isWebStream:a,isTransformStream:s,isWritableStream:u,isReadableStream:c}=ur(),{AbortError:h,codes:{ERR_INVALID_ARG_VALUE:g,ERR_MISSING_ARGS:A}}=gt(),I=Ir();return Pa=function(...S){if(S.length===0)throw new A("streams");if(S.length===1)return t.from(S[0]);const _=[...S];if(typeof S[0]=="function"&&(S[0]=t.from(S[0])),typeof S[S.length-1]=="function"){const M=S.length-1;S[M]=t.from(S[M])}for(let M=0;M<S.length;++M)if(!(!n(S[M])&&!a(S[M]))){if(M<S.length-1&&!(i(S[M])||c(S[M])||s(S[M])))throw new g(`streams[${M}]`,_[M],"must be readable");if(M>0&&!(o(S[M])||u(S[M])||s(S[M])))throw new g(`streams[${M}]`,_[M],"must be writable")}let R,E,v,V,G;function ue(M){const K=V;V=null,K?K(M):M?G.destroy(M):!C&&!se&&G.destroy()}const ce=S[0],z=e(S,ue),se=!!(o(ce)||u(ce)||s(ce)),C=!!(i(z)||c(z)||s(z));if(G=new t({writableObjectMode:!!(ce!=null&&ce.writableObjectMode),readableObjectMode:!!(z!=null&&z.readableObjectMode),writable:se,readable:C}),se){if(n(ce))G._write=function(K,x,$){ce.write(K,x)?$():R=$},G._final=function(K){ce.end(),E=K},ce.on("drain",function(){if(R){const K=R;R=null,K()}});else if(a(ce)){const x=(s(ce)?ce.writable:ce).getWriter();G._write=async function($,J,re){try{await x.ready,x.write($).catch(()=>{}),re()}catch(de){re(de)}},G._final=async function($){try{await x.ready,x.close().catch(()=>{}),E=$}catch(J){$(J)}}}const M=s(z)?z.readable:z;I(M,()=>{if(E){const K=E;E=null,K()}})}if(C){if(n(z))z.on("readable",function(){if(v){const M=v;v=null,M()}}),z.on("end",function(){G.push(null)}),G._read=function(){for(;;){const M=z.read();if(M===null){v=G._read;return}if(!G.push(M))return}};else if(a(z)){const K=(s(z)?z.readable:z).getReader();G._read=async function(){for(;;)try{const{value:x,done:$}=await K.read();if(!G.push(x))return;if($){G.push(null);return}}catch{return}}}}return G._destroy=function(M,K){!M&&V!==null&&(M=new h),v=null,R=null,E=null,V===null?K(M):(V=K,n(z)&&r(z,M))},G},Pa}var xc;function R_(){if(xc)return Qi;xc=1;const e=globalThis.AbortController||Xt().AbortController,{codes:{ERR_INVALID_ARG_VALUE:t,ERR_INVALID_ARG_TYPE:r,ERR_MISSING_ARGS:n,ERR_OUT_OF_RANGE:i},AbortError:o}=gt(),{validateAbortSignal:a,validateInteger:s,validateObject:u}=Fi(),c=ze().Symbol("kWeak"),h=ze().Symbol("kResistStopPropagation"),{finished:g}=Ir(),A=Yh(),{addAbortSignalNoValidate:I}=Lo(),{isWritable:k,isNodeStream:S}=ur(),{deprecate:_}=At(),{ArrayPrototypePush:R,Boolean:E,MathFloor:v,Number:V,NumberIsNaN:G,Promise:ue,PromiseReject:ce,PromiseResolve:z,PromisePrototypeThen:se,Symbol:C}=ze(),M=C("kEmpty"),K=C("kEof");function x(P,N){if(N!=null&&u(N,"options"),N?.signal!=null&&a(N.signal,"options.signal"),S(P)&&!k(P))throw new t("stream",P,"must be writable");const Q=A(this,P);return N!=null&&N.signal&&I(N.signal,Q),Q}function $(P,N){if(typeof P!="function")throw new r("fn",["Function","AsyncFunction"],P);N!=null&&u(N,"options"),N?.signal!=null&&a(N.signal,"options.signal");let Q=1;N?.concurrency!=null&&(Q=v(N.concurrency));let le=Q-1;return N?.highWaterMark!=null&&(le=v(N.highWaterMark)),s(Q,"options.concurrency",1),s(le,"options.highWaterMark",0),le+=Q,(async function*(){const l=At().AbortSignalAny([N?.signal].filter(E)),d=this,w=[],j={signal:l};let q,W,b=!1,T=0;function H(){b=!0,L()}function L(){T-=1,ge()}function ge(){W&&!b&&T<Q&&w.length<le&&(W(),W=null)}async function Se(){try{for await(let me of d){if(b)return;if(l.aborted)throw new o;try{if(me=P(me,j),me===M)continue;me=z(me)}catch(xe){me=ce(xe)}T+=1,se(me,L,H),w.push(me),q&&(q(),q=null),!b&&(w.length>=le||T>=Q)&&await new ue(xe=>{W=xe})}w.push(K)}catch(me){const xe=ce(me);se(xe,L,H),w.push(xe)}finally{b=!0,q&&(q(),q=null)}}Se();try{for(;;){for(;w.length>0;){const me=await w[0];if(me===K)return;if(l.aborted)throw new o;me!==M&&(yield me),w.shift(),ge()}await new ue(me=>{q=me})}}finally{b=!0,W&&(W(),W=null)}}).call(this)}function J(P=void 0){return P!=null&&u(P,"options"),P?.signal!=null&&a(P.signal,"options.signal"),(async function*(){let Q=0;for await(const U of this){var le;if(P!=null&&(le=P.signal)!==null&&le!==void 0&&le.aborted)throw new o({cause:P.signal.reason});yield[Q++,U]}}).call(this)}async function re(P,N=void 0){for await(const Q of y.call(this,P,N))return!0;return!1}async function de(P,N=void 0){if(typeof P!="function")throw new r("fn",["Function","AsyncFunction"],P);return!await re.call(this,async(...Q)=>!await P(...Q),N)}async function F(P,N){for await(const Q of y.call(this,P,N))return Q}async function ne(P,N){if(typeof P!="function")throw new r("fn",["Function","AsyncFunction"],P);async function Q(le,U){return await P(le,U),M}for await(const le of $.call(this,Q,N));}function y(P,N){if(typeof P!="function")throw new r("fn",["Function","AsyncFunction"],P);async function Q(le,U){return await P(le,U)?le:M}return $.call(this,Q,N)}class B extends n{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}}async function Z(P,N,Q){var le;if(typeof P!="function")throw new r("reducer",["Function","AsyncFunction"],P);Q!=null&&u(Q,"options"),Q?.signal!=null&&a(Q.signal,"options.signal");let U=arguments.length>1;if(Q!=null&&(le=Q.signal)!==null&&le!==void 0&&le.aborted){const q=new o(void 0,{cause:Q.signal.reason});throw this.once("error",()=>{}),await g(this.destroy(q)),q}const l=new e,d=l.signal;if(Q!=null&&Q.signal){const q={once:!0,[c]:this,[h]:!0};Q.signal.addEventListener("abort",()=>l.abort(),q)}let w=!1;try{for await(const q of this){var j;if(w=!0,Q!=null&&(j=Q.signal)!==null&&j!==void 0&&j.aborted)throw new o;U?N=await P(N,q,{signal:d}):(N=q,U=!0)}if(!w&&!U)throw new B}finally{l.abort()}return N}async function D(P){P!=null&&u(P,"options"),P?.signal!=null&&a(P.signal,"options.signal");const N=[];for await(const le of this){var Q;if(P!=null&&(Q=P.signal)!==null&&Q!==void 0&&Q.aborted)throw new o(void 0,{cause:P.signal.reason});R(N,le)}return N}function ee(P,N){const Q=$.call(this,P,N);return(async function*(){for await(const U of Q)yield*U}).call(this)}function ie(P){if(P=V(P),G(P))return 0;if(P<0)throw new i("number",">= 0",P);return P}function fe(P,N=void 0){return N!=null&&u(N,"options"),N?.signal!=null&&a(N.signal,"options.signal"),P=ie(P),(async function*(){var le;if(N!=null&&(le=N.signal)!==null&&le!==void 0&&le.aborted)throw new o;for await(const l of this){var U;if(N!=null&&(U=N.signal)!==null&&U!==void 0&&U.aborted)throw new o;P--<=0&&(yield l)}}).call(this)}function ae(P,N=void 0){return N!=null&&u(N,"options"),N?.signal!=null&&a(N.signal,"options.signal"),P=ie(P),(async function*(){var le;if(N!=null&&(le=N.signal)!==null&&le!==void 0&&le.aborted)throw new o;for await(const l of this){var U;if(N!=null&&(U=N.signal)!==null&&U!==void 0&&U.aborted)throw new o;if(P-- >0&&(yield l),P<=0)return}}).call(this)}return Qi.streamReturningOperators={asIndexedPairs:_(J,"readable.asIndexedPairs will be removed in a future version."),drop:fe,filter:y,flatMap:ee,map:$,take:ae,compose:x},Qi.promiseReturningOperators={every:de,forEach:ne,reduce:Z,toArray:D,some:re,find:F},Qi}var Ta,Ic;function Xh(){if(Ic)return Ta;Ic=1;const{ArrayPrototypePop:e,Promise:t}=ze(),{isIterable:r,isNodeStream:n,isWebStream:i}=ur(),{pipelineImpl:o}=Fl(),{finished:a}=Ir();Zh();function s(...u){return new t((c,h)=>{let g,A;const I=u[u.length-1];if(I&&typeof I=="object"&&!n(I)&&!r(I)&&!i(I)){const k=e(u);g=k.signal,A=k.end}o(u,(k,S)=>{k?h(k):c(S)},{signal:g,end:A})})}return Ta={finished:a,pipeline:s},Ta}var Rc;function Zh(){if(Rc)return ca.exports;Rc=1;const{Buffer:e}=xt(),{ObjectDefineProperty:t,ObjectKeys:r,ReflectApply:n}=ze(),{promisify:{custom:i}}=At(),{streamReturningOperators:o,promiseReturningOperators:a}=R_(),{codes:{ERR_ILLEGAL_CONSTRUCTOR:s}}=gt(),u=Yh(),{setDefaultHighWaterMark:c,getDefaultHighWaterMark:h}=Uo(),{pipeline:g}=Fl(),{destroyer:A}=wn(),I=Ir(),k=Xh(),S=ur(),_=ca.exports=Nl().Stream;_.isDestroyed=S.isDestroyed,_.isDisturbed=S.isDisturbed,_.isErrored=S.isErrored,_.isReadable=S.isReadable,_.isWritable=S.isWritable,_.Readable=Bo();for(const E of r(o)){let V=function(...G){if(new.target)throw s();return _.Readable.from(n(v,this,G))};const v=o[E];t(V,"name",{__proto__:null,value:v.name}),t(V,"length",{__proto__:null,value:v.length}),t(_.Readable.prototype,E,{__proto__:null,value:V,enumerable:!1,configurable:!0,writable:!0})}for(const E of r(a)){let V=function(...G){if(new.target)throw s();return n(v,this,G)};const v=a[E];t(V,"name",{__proto__:null,value:v.name}),t(V,"length",{__proto__:null,value:v.length}),t(_.Readable.prototype,E,{__proto__:null,value:V,enumerable:!1,configurable:!0,writable:!0})}_.Writable=jl(),_.Duplex=ar(),_.Transform=Jh(),_.PassThrough=Gh(),_.pipeline=g;const{addAbortSignal:R}=Lo();return _.addAbortSignal=R,_.finished=I,_.destroy=A,_.compose=u,_.setDefaultHighWaterMark=c,_.getDefaultHighWaterMark=h,t(_,"promises",{__proto__:null,configurable:!0,enumerable:!0,get(){return k}}),t(g,i,{__proto__:null,enumerable:!0,get(){return k.pipeline}}),t(I,i,{__proto__:null,enumerable:!0,get(){return k.finished}}),_.Stream=_,_._isUint8Array=function(v){return v instanceof Uint8Array},_._uint8ArrayToBuffer=function(v){return e.from(v.buffer,v.byteOffset,v.byteLength)},ca.exports}var Cc;function C_(){return Cc||(Cc=1,(function(e){const t=Zh(),r=Xh(),n=t.Readable.destroy;e.exports=t.Readable,e.exports._uint8ArrayToBuffer=t._uint8ArrayToBuffer,e.exports._isUint8Array=t._isUint8Array,e.exports.isDisturbed=t.isDisturbed,e.exports.isErrored=t.isErrored,e.exports.isReadable=t.isReadable,e.exports.Readable=t.Readable,e.exports.Writable=t.Writable,e.exports.Duplex=t.Duplex,e.exports.Transform=t.Transform,e.exports.PassThrough=t.PassThrough,e.exports.addAbortSignal=t.addAbortSignal,e.exports.finished=t.finished,e.exports.destroy=t.destroy,e.exports.destroy=n,e.exports.pipeline=t.pipeline,e.exports.compose=t.compose,Object.defineProperty(t,"promises",{configurable:!0,enumerable:!0,get(){return r}}),e.exports.Stream=t.Stream,e.exports.default=e.exports})(ua)),ua.exports}var Mc;function M_(){if(Mc)return Un;Mc=1,Object.defineProperty(Un,"__esModule",{value:!0}),Un.ActorQueryResultSerializeStats=void 0;const e=Wh(),t=m_(),r=xr(),n=Hh(),i=C_();let o=class extends e.ActorQueryResultSerializeFixedMediaTypes{constructor(s){super(s)}async testHandleChecked(s,u){return["bindings","quads"].includes(s.type)?(0,r.passTestVoid)():(0,r.failTest)("This actor can only handle bindings streams or quad streams.")}pushHeader(s){const u=["Result","Delay (ms)","HTTP requests"].join(",");s.push(`${u}
12
- `)}createStat(s,u){return`${[u,this.delay(s),this.httpObserver.requests].join(",")}
13
- `}createSpecialLine(s,u){return`${[s,this.delay(u),this.httpObserver.requests].join(",")}
14
- `}async runHandle(s,u,c){const h=new i.Readable,g=s.type==="bindings"?s.bindingsStream:s.quadStream,A=s.context.getSafe(t.KeysInitQuery.queryTimestampHighResolution);let I=1;function*k(_){yield _()}const S=(0,n.wrap)(g).map(()=>this.createStat(A,I++)).prepend([this.createSpecialLine("PLANNING",A)]).append((0,n.wrap)(k(()=>this.createSpecialLine("TOTAL",A))));return this.pushHeader(h),h.wrap(S),{data:h}}now(){return performance.now()}delay(s){return this.now()-s}};return Un.ActorQueryResultSerializeStats=o,Un}var Pc;function P_(){return Pc||(Pc=1,(function(e){var t=kr&&kr.__createBinding||(Object.create?(function(n,i,o,a){a===void 0&&(a=o);var s=Object.getOwnPropertyDescriptor(i,o);(!s||("get"in s?!i.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(n,a,s)}):(function(n,i,o,a){a===void 0&&(a=o),n[a]=i[o]})),r=kr&&kr.__exportStar||function(n,i){for(var o in n)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&t(i,n,o)};Object.defineProperty(e,"__esModule",{value:!0}),r(h_(),e),r(M_(),e)})(kr)),kr}var T_=P_(),Ur={},Vn={},Tc;function O_(){if(Tc)return Vn;Tc=1,Object.defineProperty(Vn,"__esModule",{value:!0}),Vn.ActionObserverHttp=void 0;const e=xr();let t=class extends e.ActionObserver{constructor(n){super(n),this.requests=0,this.bus.subscribeObserver(this),this.httpInvalidator.addInvalidateListener(()=>{this.requests=0})}onRun(n,i,o){this.observedActors.includes(n.name)&&this.requests++}};return Vn.ActionObserverHttp=t,Vn}var Qn={},Oa={exports:{}},ka={exports:{}},Da,Oc;function He(){if(Oc)return Da;Oc=1;class e extends Error{constructor(r){if(!Array.isArray(r))throw new TypeError(`Expected input to be an Array, got ${typeof r}`);let n="";for(let i=0;i<r.length;i++)n+=` ${r[i].stack}
15
- `;super(n),this.name="AggregateError",this.errors=r}}return Da={AggregateError:e,ArrayIsArray(t){return Array.isArray(t)},ArrayPrototypeIncludes(t,r){return t.includes(r)},ArrayPrototypeIndexOf(t,r){return t.indexOf(r)},ArrayPrototypeJoin(t,r){return t.join(r)},ArrayPrototypeMap(t,r){return t.map(r)},ArrayPrototypePop(t,r){return t.pop(r)},ArrayPrototypePush(t,r){return t.push(r)},ArrayPrototypeSlice(t,r,n){return t.slice(r,n)},Error,FunctionPrototypeCall(t,r,...n){return t.call(r,...n)},FunctionPrototypeSymbolHasInstance(t,r){return Function.prototype[Symbol.hasInstance].call(t,r)},MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties(t,r){return Object.defineProperties(t,r)},ObjectDefineProperty(t,r,n){return Object.defineProperty(t,r,n)},ObjectGetOwnPropertyDescriptor(t,r){return Object.getOwnPropertyDescriptor(t,r)},ObjectKeys(t){return Object.keys(t)},ObjectSetPrototypeOf(t,r){return Object.setPrototypeOf(t,r)},Promise,PromisePrototypeCatch(t,r){return t.catch(r)},PromisePrototypeThen(t,r,n){return t.then(r,n)},PromiseReject(t){return Promise.reject(t)},PromiseResolve(t){return Promise.resolve(t)},ReflectApply:Reflect.apply,RegExpPrototypeTest(t,r){return t.test(r)},SafeSet:Set,String,StringPrototypeSlice(t,r,n){return t.slice(r,n)},StringPrototypeToLowerCase(t){return t.toLowerCase()},StringPrototypeToUpperCase(t){return t.toUpperCase()},StringPrototypeTrim(t){return t.trim()},Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet(t,r,n){return t.set(r,n)},Boolean,Uint8Array},Da}var Na={exports:{}},ja,kc;function $h(){return kc||(kc=1,ja={format(e,...t){return e.replace(/%([sdifj])/g,function(...[r,n]){const i=t.shift();return n==="f"?i.toFixed(6):n==="j"?JSON.stringify(i):n==="s"&&typeof i=="object"?`${i.constructor!==Object?i.constructor.name:""} {}`.trim():i.toString()})},inspect(e){switch(typeof e){case"string":if(e.includes("'"))if(e.includes('"')){if(!e.includes("`")&&!e.includes("${"))return`\`${e}\``}else return`"${e}"`;return`'${e}'`;case"number":return isNaN(e)?"NaN":Object.is(e,-0)?String(e):e;case"bigint":return`${String(e)}n`;case"boolean":case"undefined":return String(e);case"object":return"{}"}}}),ja}var Fa,Dc;function mt(){if(Dc)return Fa;Dc=1;const{format:e,inspect:t}=$h(),{AggregateError:r}=He(),n=globalThis.AggregateError||r,i=Symbol("kIsNodeError"),o=["string","function","number","object","Function","Object","boolean","bigint","symbol"],a=/^([A-Z][a-z0-9]*)+$/,s="__node_internal_",u={};function c(_,R){if(!_)throw new u.ERR_INTERNAL_ASSERTION(R)}function h(_){let R="",E=_.length;const v=_[0]==="-"?1:0;for(;E>=v+4;E-=3)R=`_${_.slice(E-3,E)}${R}`;return`${_.slice(0,E)}${R}`}function g(_,R,E){if(typeof R=="function")return c(R.length<=E.length,`Code: ${_}; The provided arguments length (${E.length}) does not match the required ones (${R.length}).`),R(...E);const v=(R.match(/%[dfijoOs]/g)||[]).length;return c(v===E.length,`Code: ${_}; The provided arguments length (${E.length}) does not match the required ones (${v}).`),E.length===0?R:e(R,...E)}function A(_,R,E){E||(E=Error);class v extends E{constructor(...G){super(g(_,R,G))}toString(){return`${this.name} [${_}]: ${this.message}`}}Object.defineProperties(v.prototype,{name:{value:E.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${_}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),v.prototype.code=_,v.prototype[i]=!0,u[_]=v}function I(_){const R=s+_.name;return Object.defineProperty(_,"name",{value:R}),_}function k(_,R){if(_&&R&&_!==R){if(Array.isArray(R.errors))return R.errors.push(_),R;const E=new n([R,_],R.message);return E.code=R.code,E}return _||R}class S extends Error{constructor(R="The operation was aborted",E=void 0){if(E!==void 0&&typeof E!="object")throw new u.ERR_INVALID_ARG_TYPE("options","Object",E);super(R,E),this.code="ABORT_ERR",this.name="AbortError"}}return A("ERR_ASSERTION","%s",Error),A("ERR_INVALID_ARG_TYPE",(_,R,E)=>{c(typeof _=="string","'name' must be a string"),Array.isArray(R)||(R=[R]);let v="The ";_.endsWith(" argument")?v+=`${_} `:v+=`"${_}" ${_.includes(".")?"property":"argument"} `,v+="must be ";const V=[],G=[],ue=[];for(const z of R)c(typeof z=="string","All expected entries have to be of type string"),o.includes(z)?V.push(z.toLowerCase()):a.test(z)?G.push(z):(c(z!=="object",'The value "object" should be written as "Object"'),ue.push(z));if(G.length>0){const z=V.indexOf("object");z!==-1&&(V.splice(V,z,1),G.push("Object"))}if(V.length>0){switch(V.length){case 1:v+=`of type ${V[0]}`;break;case 2:v+=`one of type ${V[0]} or ${V[1]}`;break;default:{const z=V.pop();v+=`one of type ${V.join(", ")}, or ${z}`}}(G.length>0||ue.length>0)&&(v+=" or ")}if(G.length>0){switch(G.length){case 1:v+=`an instance of ${G[0]}`;break;case 2:v+=`an instance of ${G[0]} or ${G[1]}`;break;default:{const z=G.pop();v+=`an instance of ${G.join(", ")}, or ${z}`}}ue.length>0&&(v+=" or ")}switch(ue.length){case 0:break;case 1:ue[0].toLowerCase()!==ue[0]&&(v+="an "),v+=`${ue[0]}`;break;case 2:v+=`one of ${ue[0]} or ${ue[1]}`;break;default:{const z=ue.pop();v+=`one of ${ue.join(", ")}, or ${z}`}}if(E==null)v+=`. Received ${E}`;else if(typeof E=="function"&&E.name)v+=`. Received function ${E.name}`;else if(typeof E=="object"){var ce;if((ce=E.constructor)!==null&&ce!==void 0&&ce.name)v+=`. Received an instance of ${E.constructor.name}`;else{const z=t(E,{depth:-1});v+=`. Received ${z}`}}else{let z=t(E,{colors:!1});z.length>25&&(z=`${z.slice(0,25)}...`),v+=`. Received type ${typeof E} (${z})`}return v},TypeError),A("ERR_INVALID_ARG_VALUE",(_,R,E="is invalid")=>{let v=t(R);return v.length>128&&(v=v.slice(0,128)+"..."),`The ${_.includes(".")?"property":"argument"} '${_}' ${E}. Received ${v}`},TypeError),A("ERR_INVALID_RETURN_VALUE",(_,R,E)=>{var v;const V=E!=null&&(v=E.constructor)!==null&&v!==void 0&&v.name?`instance of ${E.constructor.name}`:`type ${typeof E}`;return`Expected ${_} to be returned from the "${R}" function but got ${V}.`},TypeError),A("ERR_MISSING_ARGS",(..._)=>{c(_.length>0,"At least one arg needs to be specified");let R;const E=_.length;switch(_=(Array.isArray(_)?_:[_]).map(v=>`"${v}"`).join(" or "),E){case 1:R+=`The ${_[0]} argument`;break;case 2:R+=`The ${_[0]} and ${_[1]} arguments`;break;default:{const v=_.pop();R+=`The ${_.join(", ")}, and ${v} arguments`}break}return`${R} must be specified`},TypeError),A("ERR_OUT_OF_RANGE",(_,R,E)=>{c(R,'Missing "range" argument');let v;if(Number.isInteger(E)&&Math.abs(E)>2**32)v=h(String(E));else if(typeof E=="bigint"){v=String(E);const V=BigInt(2)**BigInt(32);(E>V||E<-V)&&(v=h(v)),v+="n"}else v=t(E);return`The value of "${_}" is out of range. It must be ${R}. Received ${v}`},RangeError),A("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),A("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),A("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),A("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),A("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),A("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),A("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),A("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),A("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),A("ERR_STREAM_WRITE_AFTER_END","write after end",Error),A("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),Fa={AbortError:S,aggregateTwoErrors:I(k),hideStackFrames:I,codes:u},Fa}var Nc;function vt(){return Nc||(Nc=1,(function(e){const t=xt(),{format:r,inspect:n}=$h(),{codes:{ERR_INVALID_ARG_TYPE:i}}=mt(),{kResistStopPropagation:o,AggregateError:a,SymbolDispose:s}=He(),u=globalThis.AbortSignal||Xt().AbortSignal,c=globalThis.AbortController||Xt().AbortController,h=Object.getPrototypeOf(async function(){}).constructor,g=globalThis.Blob||t.Blob,A=typeof g<"u"?function(_){return _ instanceof g}:function(_){return!1},I=(S,_)=>{if(S!==void 0&&(S===null||typeof S!="object"||!("aborted"in S)))throw new i(_,"AbortSignal",S)},k=(S,_)=>{if(typeof S!="function")throw new i(_,"Function",S)};e.exports={AggregateError:a,kEmptyObject:Object.freeze({}),once(S){let _=!1;return function(...R){_||(_=!0,S.apply(this,R))}},createDeferredPromise:function(){let S,_;return{promise:new Promise((E,v)=>{S=E,_=v}),resolve:S,reject:_}},promisify(S){return new Promise((_,R)=>{S((E,...v)=>E?R(E):_(...v))})},debuglog(){return function(){}},format:r,inspect:n,types:{isAsyncFunction(S){return S instanceof h},isArrayBufferView(S){return ArrayBuffer.isView(S)}},isBlob:A,deprecate(S,_){return S},addAbortListener:lr().addAbortListener||function(_,R){if(_===void 0)throw new i("signal","AbortSignal",_);I(_,"signal"),k(R,"listener");let E;return _.aborted?queueMicrotask(()=>R()):(_.addEventListener("abort",R,{__proto__:null,once:!0,[o]:!0}),E=()=>{_.removeEventListener("abort",R)}),{__proto__:null,[s](){var v;(v=E)===null||v===void 0||v()}}},AbortSignalAny:u.any||function(_){if(_.length===1)return _[0];const R=new c,E=()=>R.abort();return _.forEach(v=>{I(v,"signals"),v.addEventListener("abort",E,{once:!0})}),R.signal.addEventListener("abort",()=>{_.forEach(v=>v.removeEventListener("abort",E))},{once:!0}),R.signal}},e.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")})(Na)),Na.exports}var Gi={},La,jc;function Li(){if(jc)return La;jc=1;const{ArrayIsArray:e,ArrayPrototypeIncludes:t,ArrayPrototypeJoin:r,ArrayPrototypeMap:n,NumberIsInteger:i,NumberIsNaN:o,NumberMAX_SAFE_INTEGER:a,NumberMIN_SAFE_INTEGER:s,NumberParseInt:u,ObjectPrototypeHasOwnProperty:c,RegExpPrototypeExec:h,String:g,StringPrototypeToUpperCase:A,StringPrototypeTrim:I}=He(),{hideStackFrames:k,codes:{ERR_SOCKET_BAD_PORT:S,ERR_INVALID_ARG_TYPE:_,ERR_INVALID_ARG_VALUE:R,ERR_OUT_OF_RANGE:E,ERR_UNKNOWN_SIGNAL:v}}=mt(),{normalizeEncoding:V}=vt(),{isAsyncFunction:G,isArrayBufferView:ue}=vt().types,ce={};function z(b){return b===(b|0)}function se(b){return b===b>>>0}const C=/^[0-7]+$/,M="must be a 32-bit unsigned integer or an octal string";function K(b,T,H){if(typeof b>"u"&&(b=H),typeof b=="string"){if(h(C,b)===null)throw new R(T,b,M);b=u(b,8)}return J(b,T),b}const x=k((b,T,H=s,L=a)=>{if(typeof b!="number")throw new _(T,"number",b);if(!i(b))throw new E(T,"an integer",b);if(b<H||b>L)throw new E(T,`>= ${H} && <= ${L}`,b)}),$=k((b,T,H=-2147483648,L=2147483647)=>{if(typeof b!="number")throw new _(T,"number",b);if(!i(b))throw new E(T,"an integer",b);if(b<H||b>L)throw new E(T,`>= ${H} && <= ${L}`,b)}),J=k((b,T,H=!1)=>{if(typeof b!="number")throw new _(T,"number",b);if(!i(b))throw new E(T,"an integer",b);const L=H?1:0,ge=4294967295;if(b<L||b>ge)throw new E(T,`>= ${L} && <= ${ge}`,b)});function re(b,T){if(typeof b!="string")throw new _(T,"string",b)}function de(b,T,H=void 0,L){if(typeof b!="number")throw new _(T,"number",b);if(H!=null&&b<H||L!=null&&b>L||(H!=null||L!=null)&&o(b))throw new E(T,`${H!=null?`>= ${H}`:""}${H!=null&&L!=null?" && ":""}${L!=null?`<= ${L}`:""}`,b)}const F=k((b,T,H)=>{if(!t(H,b)){const ge="must be one of: "+r(n(H,Se=>typeof Se=="string"?`'${Se}'`:g(Se)),", ");throw new R(T,b,ge)}});function ne(b,T){if(typeof b!="boolean")throw new _(T,"boolean",b)}function y(b,T,H){return b==null||!c(b,T)?H:b[T]}const B=k((b,T,H=null)=>{const L=y(H,"allowArray",!1),ge=y(H,"allowFunction",!1);if(!y(H,"nullable",!1)&&b===null||!L&&e(b)||typeof b!="object"&&(!ge||typeof b!="function"))throw new _(T,"Object",b)}),Z=k((b,T)=>{if(b!=null&&typeof b!="object"&&typeof b!="function")throw new _(T,"a dictionary",b)}),D=k((b,T,H=0)=>{if(!e(b))throw new _(T,"Array",b);if(b.length<H){const L=`must be longer than ${H}`;throw new R(T,b,L)}});function ee(b,T){D(b,T);for(let H=0;H<b.length;H++)re(b[H],`${T}[${H}]`)}function ie(b,T){D(b,T);for(let H=0;H<b.length;H++)ne(b[H],`${T}[${H}]`)}function fe(b,T){D(b,T);for(let H=0;H<b.length;H++){const L=b[H],ge=`${T}[${H}]`;if(L==null)throw new _(ge,"AbortSignal",L);le(L,ge)}}function ae(b,T="signal"){if(re(b,T),ce[b]===void 0)throw ce[A(b)]!==void 0?new v(b+" (signals must use all capital letters)"):new v(b)}const P=k((b,T="buffer")=>{if(!ue(b))throw new _(T,["Buffer","TypedArray","DataView"],b)});function N(b,T){const H=V(T),L=b.length;if(H==="hex"&&L%2!==0)throw new R("encoding",T,`is invalid for data of length ${L}`)}function Q(b,T="Port",H=!0){if(typeof b!="number"&&typeof b!="string"||typeof b=="string"&&I(b).length===0||+b!==+b>>>0||b>65535||b===0&&!H)throw new S(T,b,H);return b|0}const le=k((b,T)=>{if(b!==void 0&&(b===null||typeof b!="object"||!("aborted"in b)))throw new _(T,"AbortSignal",b)}),U=k((b,T)=>{if(typeof b!="function")throw new _(T,"Function",b)}),l=k((b,T)=>{if(typeof b!="function"||G(b))throw new _(T,"Function",b)}),d=k((b,T)=>{if(b!==void 0)throw new _(T,"undefined",b)});function w(b,T,H){if(!t(H,b))throw new _(T,`('${r(H,"|")}')`,b)}const j=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function q(b,T){if(typeof b>"u"||!h(j,b))throw new R(T,b,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}function W(b){if(typeof b=="string")return q(b,"hints"),b;if(e(b)){const T=b.length;let H="";if(T===0)return H;for(let L=0;L<T;L++){const ge=b[L];q(ge,"hints"),H+=ge,L!==T-1&&(H+=", ")}return H}throw new R("hints",b,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}return La={isInt32:z,isUint32:se,parseFileMode:K,validateArray:D,validateStringArray:ee,validateBooleanArray:ie,validateAbortSignalArray:fe,validateBoolean:ne,validateBuffer:P,validateDictionary:Z,validateEncoding:N,validateFunction:U,validateInt32:$,validateInteger:x,validateNumber:de,validateObject:B,validateOneOf:F,validatePlainFunction:l,validatePort:Q,validateSignalName:ae,validateString:re,validateUint32:J,validateUndefined:d,validateUnion:w,validateAbortSignal:le,validateLinkHeaderValue:W},La}var Yi={exports:{}},Ua,Fc;function cr(){if(Fc)return Ua;Fc=1;const{SymbolAsyncIterator:e,SymbolIterator:t,SymbolFor:r}=He(),n=r("nodejs.stream.destroyed"),i=r("nodejs.stream.errored"),o=r("nodejs.stream.readable"),a=r("nodejs.stream.writable"),s=r("nodejs.stream.disturbed"),u=r("nodejs.webstream.isClosedPromise"),c=r("nodejs.webstream.controllerErrorFunction");function h(y,B=!1){var Z;return!!(y&&typeof y.pipe=="function"&&typeof y.on=="function"&&(!B||typeof y.pause=="function"&&typeof y.resume=="function")&&(!y._writableState||((Z=y._readableState)===null||Z===void 0?void 0:Z.readable)!==!1)&&(!y._writableState||y._readableState))}function g(y){var B;return!!(y&&typeof y.write=="function"&&typeof y.on=="function"&&(!y._readableState||((B=y._writableState)===null||B===void 0?void 0:B.writable)!==!1))}function A(y){return!!(y&&typeof y.pipe=="function"&&y._readableState&&typeof y.on=="function"&&typeof y.write=="function")}function I(y){return y&&(y._readableState||y._writableState||typeof y.write=="function"&&typeof y.on=="function"||typeof y.pipe=="function"&&typeof y.on=="function")}function k(y){return!!(y&&!I(y)&&typeof y.pipeThrough=="function"&&typeof y.getReader=="function"&&typeof y.cancel=="function")}function S(y){return!!(y&&!I(y)&&typeof y.getWriter=="function"&&typeof y.abort=="function")}function _(y){return!!(y&&!I(y)&&typeof y.readable=="object"&&typeof y.writable=="object")}function R(y){return k(y)||S(y)||_(y)}function E(y,B){return y==null?!1:B===!0?typeof y[e]=="function":B===!1?typeof y[t]=="function":typeof y[e]=="function"||typeof y[t]=="function"}function v(y){if(!I(y))return null;const B=y._writableState,Z=y._readableState,D=B||Z;return!!(y.destroyed||y[n]||D!=null&&D.destroyed)}function V(y){if(!g(y))return null;if(y.writableEnded===!0)return!0;const B=y._writableState;return B!=null&&B.errored?!1:typeof B?.ended!="boolean"?null:B.ended}function G(y,B){if(!g(y))return null;if(y.writableFinished===!0)return!0;const Z=y._writableState;return Z!=null&&Z.errored?!1:typeof Z?.finished!="boolean"?null:!!(Z.finished||B===!1&&Z.ended===!0&&Z.length===0)}function ue(y){if(!h(y))return null;if(y.readableEnded===!0)return!0;const B=y._readableState;return!B||B.errored?!1:typeof B?.ended!="boolean"?null:B.ended}function ce(y,B){if(!h(y))return null;const Z=y._readableState;return Z!=null&&Z.errored?!1:typeof Z?.endEmitted!="boolean"?null:!!(Z.endEmitted||B===!1&&Z.ended===!0&&Z.length===0)}function z(y){return y&&y[o]!=null?y[o]:typeof y?.readable!="boolean"?null:v(y)?!1:h(y)&&y.readable&&!ce(y)}function se(y){return y&&y[a]!=null?y[a]:typeof y?.writable!="boolean"?null:v(y)?!1:g(y)&&y.writable&&!V(y)}function C(y,B){return I(y)?v(y)?!0:!(B?.readable!==!1&&z(y)||B?.writable!==!1&&se(y)):null}function M(y){var B,Z;return I(y)?y.writableErrored?y.writableErrored:(B=(Z=y._writableState)===null||Z===void 0?void 0:Z.errored)!==null&&B!==void 0?B:null:null}function K(y){var B,Z;return I(y)?y.readableErrored?y.readableErrored:(B=(Z=y._readableState)===null||Z===void 0?void 0:Z.errored)!==null&&B!==void 0?B:null:null}function x(y){if(!I(y))return null;if(typeof y.closed=="boolean")return y.closed;const B=y._writableState,Z=y._readableState;return typeof B?.closed=="boolean"||typeof Z?.closed=="boolean"?B?.closed||Z?.closed:typeof y._closed=="boolean"&&$(y)?y._closed:null}function $(y){return typeof y._closed=="boolean"&&typeof y._defaultKeepAlive=="boolean"&&typeof y._removedConnection=="boolean"&&typeof y._removedContLen=="boolean"}function J(y){return typeof y._sent100=="boolean"&&$(y)}function re(y){var B;return typeof y._consuming=="boolean"&&typeof y._dumped=="boolean"&&((B=y.req)===null||B===void 0?void 0:B.upgradeOrConnect)===void 0}function de(y){if(!I(y))return null;const B=y._writableState,Z=y._readableState,D=B||Z;return!D&&J(y)||!!(D&&D.autoDestroy&&D.emitClose&&D.closed===!1)}function F(y){var B;return!!(y&&((B=y[s])!==null&&B!==void 0?B:y.readableDidRead||y.readableAborted))}function ne(y){var B,Z,D,ee,ie,fe,ae,P,N,Q;return!!(y&&((B=(Z=(D=(ee=(ie=(fe=y[i])!==null&&fe!==void 0?fe:y.readableErrored)!==null&&ie!==void 0?ie:y.writableErrored)!==null&&ee!==void 0?ee:(ae=y._readableState)===null||ae===void 0?void 0:ae.errorEmitted)!==null&&D!==void 0?D:(P=y._writableState)===null||P===void 0?void 0:P.errorEmitted)!==null&&Z!==void 0?Z:(N=y._readableState)===null||N===void 0?void 0:N.errored)!==null&&B!==void 0?B:!((Q=y._writableState)===null||Q===void 0)&&Q.errored))}return Ua={isDestroyed:v,kIsDestroyed:n,isDisturbed:F,kIsDisturbed:s,isErrored:ne,kIsErrored:i,isReadable:z,kIsReadable:o,kIsClosedPromise:u,kControllerErrorFunction:c,kIsWritable:a,isClosed:x,isDuplexNodeStream:A,isFinished:C,isIterable:E,isReadableNodeStream:h,isReadableStream:k,isReadableEnded:ue,isReadableFinished:ce,isReadableErrored:K,isNodeStream:I,isWebStream:R,isWritable:se,isWritableNodeStream:g,isWritableStream:S,isWritableEnded:V,isWritableFinished:G,isWritableErrored:M,isServerRequest:re,isServerResponse:J,willEmitClose:de,isTransformStream:_},Ua}var Lc;function Rr(){if(Lc)return Yi.exports;Lc=1;const e=It(),{AbortError:t,codes:r}=mt(),{ERR_INVALID_ARG_TYPE:n,ERR_STREAM_PREMATURE_CLOSE:i}=r,{kEmptyObject:o,once:a}=vt(),{validateAbortSignal:s,validateFunction:u,validateObject:c,validateBoolean:h}=Li(),{Promise:g,PromisePrototypeThen:A,SymbolDispose:I}=He(),{isClosed:k,isReadable:S,isReadableNodeStream:_,isReadableStream:R,isReadableFinished:E,isReadableErrored:v,isWritable:V,isWritableNodeStream:G,isWritableStream:ue,isWritableFinished:ce,isWritableErrored:z,isNodeStream:se,willEmitClose:C,kIsClosedPromise:M}=cr();let K;function x(F){return F.setHeader&&typeof F.abort=="function"}const $=()=>{};function J(F,ne,y){var B,Z;if(arguments.length===2?(y=ne,ne=o):ne==null?ne=o:c(ne,"options"),u(y,"callback"),s(ne.signal,"options.signal"),y=a(y),R(F)||ue(F))return re(F,ne,y);if(!se(F))throw new n("stream",["ReadableStream","WritableStream","Stream"],F);const D=(B=ne.readable)!==null&&B!==void 0?B:_(F),ee=(Z=ne.writable)!==null&&Z!==void 0?Z:G(F),ie=F._writableState,fe=F._readableState,ae=()=>{F.writable||Q()};let P=C(F)&&_(F)===D&&G(F)===ee,N=ce(F,!1);const Q=()=>{N=!0,F.destroyed&&(P=!1),!(P&&(!F.readable||D))&&(!D||le)&&y.call(F)};let le=E(F,!1);const U=()=>{le=!0,F.destroyed&&(P=!1),!(P&&(!F.writable||ee))&&(!ee||N)&&y.call(F)},l=b=>{y.call(F,b)};let d=k(F);const w=()=>{d=!0;const b=z(F)||v(F);if(b&&typeof b!="boolean")return y.call(F,b);if(D&&!le&&_(F,!0)&&!E(F,!1))return y.call(F,new i);if(ee&&!N&&!ce(F,!1))return y.call(F,new i);y.call(F)},j=()=>{d=!0;const b=z(F)||v(F);if(b&&typeof b!="boolean")return y.call(F,b);y.call(F)},q=()=>{F.req.on("finish",Q)};x(F)?(F.on("complete",Q),P||F.on("abort",w),F.req?q():F.on("request",q)):ee&&!ie&&(F.on("end",ae),F.on("close",ae)),!P&&typeof F.aborted=="boolean"&&F.on("aborted",w),F.on("end",U),F.on("finish",Q),ne.error!==!1&&F.on("error",l),F.on("close",w),d?e.nextTick(w):ie!=null&&ie.errorEmitted||fe!=null&&fe.errorEmitted?P||e.nextTick(j):(!D&&(!P||S(F))&&(N||V(F)===!1)||!ee&&(!P||V(F))&&(le||S(F)===!1)||fe&&F.req&&F.aborted)&&e.nextTick(j);const W=()=>{y=$,F.removeListener("aborted",w),F.removeListener("complete",Q),F.removeListener("abort",w),F.removeListener("request",q),F.req&&F.req.removeListener("finish",Q),F.removeListener("end",ae),F.removeListener("close",ae),F.removeListener("finish",Q),F.removeListener("end",U),F.removeListener("error",l),F.removeListener("close",w)};if(ne.signal&&!d){const b=()=>{const T=y;W(),T.call(F,new t(void 0,{cause:ne.signal.reason}))};if(ne.signal.aborted)e.nextTick(b);else{K=K||vt().addAbortListener;const T=K(ne.signal,b),H=y;y=a((...L)=>{T[I](),H.apply(F,L)})}}return W}function re(F,ne,y){let B=!1,Z=$;if(ne.signal)if(Z=()=>{B=!0,y.call(F,new t(void 0,{cause:ne.signal.reason}))},ne.signal.aborted)e.nextTick(Z);else{K=K||vt().addAbortListener;const ee=K(ne.signal,Z),ie=y;y=a((...fe)=>{ee[I](),ie.apply(F,fe)})}const D=(...ee)=>{B||e.nextTick(()=>y.apply(F,ee))};return A(F[M].promise,D,D),$}function de(F,ne){var y;let B=!1;return ne===null&&(ne=o),(y=ne)!==null&&y!==void 0&&y.cleanup&&(h(ne.cleanup,"cleanup"),B=ne.cleanup),new g((Z,D)=>{const ee=J(F,ne,ie=>{B&&ee(),ie?D(ie):Z()})})}return Yi.exports=J,Yi.exports.finished=de,Yi.exports}var Ba,Uc;function _n(){if(Uc)return Ba;Uc=1;const e=It(),{aggregateTwoErrors:t,codes:{ERR_MULTIPLE_CALLBACK:r},AbortError:n}=mt(),{Symbol:i}=He(),{kIsDestroyed:o,isDestroyed:a,isFinished:s,isServerRequest:u}=cr(),c=i("kDestroy"),h=i("kConstruct");function g(C,M,K){C&&(C.stack,M&&!M.errored&&(M.errored=C),K&&!K.errored&&(K.errored=C))}function A(C,M){const K=this._readableState,x=this._writableState,$=x||K;return x!=null&&x.destroyed||K!=null&&K.destroyed?(typeof M=="function"&&M(),this):(g(C,x,K),x&&(x.destroyed=!0),K&&(K.destroyed=!0),$.constructed?I(this,C,M):this.once(c,function(J){I(this,t(J,C),M)}),this)}function I(C,M,K){let x=!1;function $(J){if(x)return;x=!0;const re=C._readableState,de=C._writableState;g(J,de,re),de&&(de.closed=!0),re&&(re.closed=!0),typeof K=="function"&&K(J),J?e.nextTick(k,C,J):e.nextTick(S,C)}try{C._destroy(M||null,$)}catch(J){$(J)}}function k(C,M){_(C,M),S(C)}function S(C){const M=C._readableState,K=C._writableState;K&&(K.closeEmitted=!0),M&&(M.closeEmitted=!0),(K!=null&&K.emitClose||M!=null&&M.emitClose)&&C.emit("close")}function _(C,M){const K=C._readableState,x=C._writableState;x!=null&&x.errorEmitted||K!=null&&K.errorEmitted||(x&&(x.errorEmitted=!0),K&&(K.errorEmitted=!0),C.emit("error",M))}function R(){const C=this._readableState,M=this._writableState;C&&(C.constructed=!0,C.closed=!1,C.closeEmitted=!1,C.destroyed=!1,C.errored=null,C.errorEmitted=!1,C.reading=!1,C.ended=C.readable===!1,C.endEmitted=C.readable===!1),M&&(M.constructed=!0,M.destroyed=!1,M.closed=!1,M.closeEmitted=!1,M.errored=null,M.errorEmitted=!1,M.finalCalled=!1,M.prefinished=!1,M.ended=M.writable===!1,M.ending=M.writable===!1,M.finished=M.writable===!1)}function E(C,M,K){const x=C._readableState,$=C._writableState;if($!=null&&$.destroyed||x!=null&&x.destroyed)return this;x!=null&&x.autoDestroy||$!=null&&$.autoDestroy?C.destroy(M):M&&(M.stack,$&&!$.errored&&($.errored=M),x&&!x.errored&&(x.errored=M),K?e.nextTick(_,C,M):_(C,M))}function v(C,M){if(typeof C._construct!="function")return;const K=C._readableState,x=C._writableState;K&&(K.constructed=!1),x&&(x.constructed=!1),C.once(h,M),!(C.listenerCount(h)>1)&&e.nextTick(V,C)}function V(C){let M=!1;function K(x){if(M){E(C,x??new r);return}M=!0;const $=C._readableState,J=C._writableState,re=J||$;$&&($.constructed=!0),J&&(J.constructed=!0),re.destroyed?C.emit(c,x):x?E(C,x,!0):e.nextTick(G,C)}try{C._construct(x=>{e.nextTick(K,x)})}catch(x){e.nextTick(K,x)}}function G(C){C.emit(h)}function ue(C){return C?.setHeader&&typeof C.abort=="function"}function ce(C){C.emit("close")}function z(C,M){C.emit("error",M),e.nextTick(ce,C)}function se(C,M){!C||a(C)||(!M&&!s(C)&&(M=new n),u(C)?(C.socket=null,C.destroy(M)):ue(C)?C.abort():ue(C.req)?C.req.abort():typeof C.destroy=="function"?C.destroy(M):typeof C.close=="function"?C.close():M?e.nextTick(z,C,M):e.nextTick(ce,C),C.destroyed||(C[o]=!0))}return Ba={construct:v,destroyer:se,destroy:A,undestroy:R,errorOrDestroy:E},Ba}var qa,Bc;function Ll(){if(Bc)return qa;Bc=1;const{ArrayIsArray:e,ObjectSetPrototypeOf:t}=He(),{EventEmitter:r}=lr();function n(o){r.call(this,o)}t(n.prototype,r.prototype),t(n,r),n.prototype.pipe=function(o,a){const s=this;function u(S){o.writable&&o.write(S)===!1&&s.pause&&s.pause()}s.on("data",u);function c(){s.readable&&s.resume&&s.resume()}o.on("drain",c),!o._isStdio&&(!a||a.end!==!1)&&(s.on("end",g),s.on("close",A));let h=!1;function g(){h||(h=!0,o.end())}function A(){h||(h=!0,typeof o.destroy=="function"&&o.destroy())}function I(S){k(),r.listenerCount(this,"error")===0&&this.emit("error",S)}i(s,"error",I),i(o,"error",I);function k(){s.removeListener("data",u),o.removeListener("drain",c),s.removeListener("end",g),s.removeListener("close",A),s.removeListener("error",I),o.removeListener("error",I),s.removeListener("end",k),s.removeListener("close",k),o.removeListener("close",k)}return s.on("end",k),s.on("close",k),o.on("close",k),o.emit("pipe",s),o};function i(o,a,s){if(typeof o.prependListener=="function")return o.prependListener(a,s);!o._events||!o._events[a]?o.on(a,s):e(o._events[a])?o._events[a].unshift(s):o._events[a]=[s,o._events[a]]}return qa={Stream:n,prependListener:i},qa}var Ka={exports:{}},qc;function qo(){return qc||(qc=1,(function(e){const{SymbolDispose:t}=He(),{AbortError:r,codes:n}=mt(),{isNodeStream:i,isWebStream:o,kControllerErrorFunction:a}=cr(),s=Rr(),{ERR_INVALID_ARG_TYPE:u}=n;let c;const h=(g,A)=>{if(typeof g!="object"||!("aborted"in g))throw new u(A,"AbortSignal",g)};e.exports.addAbortSignal=function(A,I){if(h(A,"signal"),!i(I)&&!o(I))throw new u("stream",["ReadableStream","WritableStream","Stream"],I);return e.exports.addAbortSignalNoValidate(A,I)},e.exports.addAbortSignalNoValidate=function(g,A){if(typeof g!="object"||!("aborted"in g))return A;const I=i(A)?()=>{A.destroy(new r(void 0,{cause:g.reason}))}:()=>{A[a](new r(void 0,{cause:g.reason}))};if(g.aborted)I();else{c=c||vt().addAbortListener;const k=c(g,I);s(A,k[t])}return A}})(Ka)),Ka.exports}var Wa,Kc;function k_(){if(Kc)return Wa;Kc=1;const{StringPrototypeSlice:e,SymbolIterator:t,TypedArrayPrototypeSet:r,Uint8Array:n}=He(),{Buffer:i}=xt(),{inspect:o}=vt();return Wa=class{constructor(){this.head=null,this.tail=null,this.length=0}push(s){const u={data:s,next:null};this.length>0?this.tail.next=u:this.head=u,this.tail=u,++this.length}unshift(s){const u={data:s,next:this.head};this.length===0&&(this.tail=u),this.head=u,++this.length}shift(){if(this.length===0)return;const s=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,s}clear(){this.head=this.tail=null,this.length=0}join(s){if(this.length===0)return"";let u=this.head,c=""+u.data;for(;(u=u.next)!==null;)c+=s+u.data;return c}concat(s){if(this.length===0)return i.alloc(0);const u=i.allocUnsafe(s>>>0);let c=this.head,h=0;for(;c;)r(u,c.data,h),h+=c.data.length,c=c.next;return u}consume(s,u){const c=this.head.data;if(s<c.length){const h=c.slice(0,s);return this.head.data=c.slice(s),h}return s===c.length?this.shift():u?this._getString(s):this._getBuffer(s)}first(){return this.head.data}*[t](){for(let s=this.head;s;s=s.next)yield s.data}_getString(s){let u="",c=this.head,h=0;do{const g=c.data;if(s>g.length)u+=g,s-=g.length;else{s===g.length?(u+=g,++h,c.next?this.head=c.next:this.head=this.tail=null):(u+=e(g,0,s),this.head=c,c.data=e(g,s));break}++h}while((c=c.next)!==null);return this.length-=h,u}_getBuffer(s){const u=i.allocUnsafe(s),c=s;let h=this.head,g=0;do{const A=h.data;if(s>A.length)r(u,A,c-s),s-=A.length;else{s===A.length?(r(u,A,c-s),++g,h.next?this.head=h.next:this.head=this.tail=null):(r(u,new n(A.buffer,A.byteOffset,s),c-s),this.head=h,h.data=A.slice(s));break}++g}while((h=h.next)!==null);return this.length-=g,u}[Symbol.for("nodejs.util.inspect.custom")](s,u){return o(this,{...u,depth:0,customInspect:!1})}},Wa}var za,Wc;function Ko(){if(Wc)return za;Wc=1;const{MathFloor:e,NumberIsInteger:t}=He(),{validateInteger:r}=Li(),{ERR_INVALID_ARG_VALUE:n}=mt().codes;let i=16*1024,o=16;function a(h,g,A){return h.highWaterMark!=null?h.highWaterMark:g?h[A]:null}function s(h){return h?o:i}function u(h,g){r(g,"value",0),h?o=g:i=g}function c(h,g,A,I){const k=a(g,I,A);if(k!=null){if(!t(k)||k<0){const S=I?`options.${A}`:"options.highWaterMark";throw new n(S,k)}return e(k)}return s(h.objectMode)}return za={getHighWaterMark:c,getDefaultHighWaterMark:s,setDefaultHighWaterMark:u},za}var Ha,zc;function ep(){if(zc)return Ha;zc=1;const e=It(),{PromisePrototypeThen:t,SymbolAsyncIterator:r,SymbolIterator:n}=He(),{Buffer:i}=xt(),{ERR_INVALID_ARG_TYPE:o,ERR_STREAM_NULL_VALUES:a}=mt().codes;function s(u,c,h){let g;if(typeof c=="string"||c instanceof i)return new u({objectMode:!0,...h,read(){this.push(c),this.push(null)}});let A;if(c&&c[r])A=!0,g=c[r]();else if(c&&c[n])A=!1,g=c[n]();else throw new o("iterable",["Iterable"],c);const I=new u({objectMode:!0,highWaterMark:1,...h});let k=!1;I._read=function(){k||(k=!0,_())},I._destroy=function(R,E){t(S(R),()=>e.nextTick(E,R),v=>e.nextTick(E,v||R))};async function S(R){const E=R!=null,v=typeof g.throw=="function";if(E&&v){const{value:V,done:G}=await g.throw(R);if(await V,G)return}if(typeof g.return=="function"){const{value:V}=await g.return();await V}}async function _(){for(;;){try{const{value:R,done:E}=A?await g.next():g.next();if(E)I.push(null);else{const v=R&&typeof R.then=="function"?await R:R;if(v===null)throw k=!1,new a;if(I.push(v))continue;k=!1}}catch(R){I.destroy(R)}break}}return I}return Ha=s,Ha}var Va,Hc;function Wo(){if(Hc)return Va;Hc=1;const e=It(),{ArrayPrototypeIndexOf:t,NumberIsInteger:r,NumberIsNaN:n,NumberParseInt:i,ObjectDefineProperties:o,ObjectKeys:a,ObjectSetPrototypeOf:s,Promise:u,SafeSet:c,SymbolAsyncDispose:h,SymbolAsyncIterator:g,Symbol:A}=He();Va=L,L.ReadableState=H;const{EventEmitter:I}=lr(),{Stream:k,prependListener:S}=Ll(),{Buffer:_}=xt(),{addAbortSignal:R}=qo(),E=Rr();let v=vt().debuglog("stream",f=>{v=f});const V=k_(),G=_n(),{getHighWaterMark:ue,getDefaultHighWaterMark:ce}=Ko(),{aggregateTwoErrors:z,codes:{ERR_INVALID_ARG_TYPE:se,ERR_METHOD_NOT_IMPLEMENTED:C,ERR_OUT_OF_RANGE:M,ERR_STREAM_PUSH_AFTER_EOF:K,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:x},AbortError:$}=mt(),{validateObject:J}=Li(),re=A("kPaused"),{StringDecoder:de}=Rd(),F=ep();s(L.prototype,k.prototype),s(L,k);const ne=()=>{},{errorOrDestroy:y}=G,B=1,Z=2,D=4,ee=8,ie=16,fe=32,ae=64,P=128,N=256,Q=512,le=1024,U=2048,l=4096,d=8192,w=16384,j=32768,q=65536,W=1<<17,b=1<<18;function T(f){return{enumerable:!1,get(){return(this.state&f)!==0},set(p){p?this.state|=f:this.state&=~f}}}o(H.prototype,{objectMode:T(B),ended:T(Z),endEmitted:T(D),reading:T(ee),constructed:T(ie),sync:T(fe),needReadable:T(ae),emittedReadable:T(P),readableListening:T(N),resumeScheduled:T(Q),errorEmitted:T(le),emitClose:T(U),autoDestroy:T(l),destroyed:T(d),closed:T(w),closeEmitted:T(j),multiAwaitDrain:T(q),readingMore:T(W),dataEmitted:T(b)});function H(f,p,Y){typeof Y!="boolean"&&(Y=p instanceof sr()),this.state=U|l|ie|fe,f&&f.objectMode&&(this.state|=B),Y&&f&&f.readableObjectMode&&(this.state|=B),this.highWaterMark=f?ue(this,f,"readableHighWaterMark",Y):ce(!1),this.buffer=new V,this.length=0,this.pipes=[],this.flowing=null,this[re]=null,f&&f.emitClose===!1&&(this.state&=~U),f&&f.autoDestroy===!1&&(this.state&=~l),this.errored=null,this.defaultEncoding=f&&f.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,f&&f.encoding&&(this.decoder=new de(f.encoding),this.encoding=f.encoding)}function L(f){if(!(this instanceof L))return new L(f);const p=this instanceof sr();this._readableState=new H(f,this,p),f&&(typeof f.read=="function"&&(this._read=f.read),typeof f.destroy=="function"&&(this._destroy=f.destroy),typeof f.construct=="function"&&(this._construct=f.construct),f.signal&&!p&&R(f.signal,this)),k.call(this,f),G.construct(this,()=>{this._readableState.needReadable&&Oe(this,this._readableState)})}L.prototype.destroy=G.destroy,L.prototype._undestroy=G.undestroy,L.prototype._destroy=function(f,p){p(f)},L.prototype[I.captureRejectionSymbol]=function(f){this.destroy(f)},L.prototype[h]=function(){let f;return this.destroyed||(f=this.readableEnded?null:new $,this.destroy(f)),new u((p,Y)=>E(this,X=>X&&X!==f?Y(X):p(null)))},L.prototype.push=function(f,p){return ge(this,f,p,!1)},L.prototype.unshift=function(f,p){return ge(this,f,p,!0)};function ge(f,p,Y,X){v("readableAddChunk",p);const oe=f._readableState;let Re;if((oe.state&B)===0&&(typeof p=="string"?(Y=Y||oe.defaultEncoding,oe.encoding!==Y&&(X&&oe.encoding?p=_.from(p,Y).toString(oe.encoding):(p=_.from(p,Y),Y=""))):p instanceof _?Y="":k._isUint8Array(p)?(p=k._uint8ArrayToBuffer(p),Y=""):p!=null&&(Re=new se("chunk",["string","Buffer","Uint8Array"],p))),Re)y(f,Re);else if(p===null)oe.state&=~ee,je(f,oe);else if((oe.state&B)!==0||p&&p.length>0)if(X)if((oe.state&D)!==0)y(f,new x);else{if(oe.destroyed||oe.errored)return!1;Se(f,oe,p,!0)}else if(oe.ended)y(f,new K);else{if(oe.destroyed||oe.errored)return!1;oe.state&=~ee,oe.decoder&&!Y?(p=oe.decoder.write(p),oe.objectMode||p.length!==0?Se(f,oe,p,!1):Oe(f,oe)):Se(f,oe,p,!1)}else X||(oe.state&=~ee,Oe(f,oe));return!oe.ended&&(oe.length<oe.highWaterMark||oe.length===0)}function Se(f,p,Y,X){p.flowing&&p.length===0&&!p.sync&&f.listenerCount("data")>0?((p.state&q)!==0?p.awaitDrainWriters.clear():p.awaitDrainWriters=null,p.dataEmitted=!0,f.emit("data",Y)):(p.length+=p.objectMode?1:Y.length,X?p.buffer.unshift(Y):p.buffer.push(Y),(p.state&ae)!==0&&Qe(f)),Oe(f,p)}L.prototype.isPaused=function(){const f=this._readableState;return f[re]===!0||f.flowing===!1},L.prototype.setEncoding=function(f){const p=new de(f);this._readableState.decoder=p,this._readableState.encoding=this._readableState.decoder.encoding;const Y=this._readableState.buffer;let X="";for(const oe of Y)X+=p.write(oe);return Y.clear(),X!==""&&Y.push(X),this._readableState.length=X.length,this};const me=1073741824;function xe(f){if(f>me)throw new M("size","<= 1GiB",f);return f--,f|=f>>>1,f|=f>>>2,f|=f>>>4,f|=f>>>8,f|=f>>>16,f++,f}function Ee(f,p){return f<=0||p.length===0&&p.ended?0:(p.state&B)!==0?1:n(f)?p.flowing&&p.length?p.buffer.first().length:p.length:f<=p.length?f:p.ended?p.length:0}L.prototype.read=function(f){v("read",f),f===void 0?f=NaN:r(f)||(f=i(f,10));const p=this._readableState,Y=f;if(f>p.highWaterMark&&(p.highWaterMark=xe(f)),f!==0&&(p.state&=~P),f===0&&p.needReadable&&((p.highWaterMark!==0?p.length>=p.highWaterMark:p.length>0)||p.ended))return v("read: emitReadable",p.length,p.ended),p.length===0&&p.ended?Ue(this):Qe(this),null;if(f=Ee(f,p),f===0&&p.ended)return p.length===0&&Ue(this),null;let X=(p.state&ae)!==0;if(v("need readable",X),(p.length===0||p.length-f<p.highWaterMark)&&(X=!0,v("length less than watermark",X)),p.ended||p.reading||p.destroyed||p.errored||!p.constructed)X=!1,v("reading, ended or constructing",X);else if(X){v("do read"),p.state|=ee|fe,p.length===0&&(p.state|=ae);try{this._read(p.highWaterMark)}catch(Re){y(this,Re)}p.state&=~fe,p.reading||(f=Ee(Y,p))}let oe;return f>0?oe=We(f,p):oe=null,oe===null?(p.needReadable=p.length<=p.highWaterMark,f=0):(p.length-=f,p.multiAwaitDrain?p.awaitDrainWriters.clear():p.awaitDrainWriters=null),p.length===0&&(p.ended||(p.needReadable=!0),Y!==f&&p.ended&&Ue(this)),oe!==null&&!p.errorEmitted&&!p.closeEmitted&&(p.dataEmitted=!0,this.emit("data",oe)),oe};function je(f,p){if(v("onEofChunk"),!p.ended){if(p.decoder){const Y=p.decoder.end();Y&&Y.length&&(p.buffer.push(Y),p.length+=p.objectMode?1:Y.length)}p.ended=!0,p.sync?Qe(f):(p.needReadable=!1,p.emittedReadable=!0,Wt(f))}}function Qe(f){const p=f._readableState;v("emitReadable",p.needReadable,p.emittedReadable),p.needReadable=!1,p.emittedReadable||(v("emitReadable",p.flowing),p.emittedReadable=!0,e.nextTick(Wt,f))}function Wt(f){const p=f._readableState;v("emitReadable_",p.destroyed,p.length,p.ended),!p.destroyed&&!p.errored&&(p.length||p.ended)&&(f.emit("readable"),p.emittedReadable=!1),p.needReadable=!p.flowing&&!p.ended&&p.length<=p.highWaterMark,ye(f)}function Oe(f,p){!p.readingMore&&p.constructed&&(p.readingMore=!0,e.nextTick(An,f,p))}function An(f,p){for(;!p.reading&&!p.ended&&(p.length<p.highWaterMark||p.flowing&&p.length===0);){const Y=p.length;if(v("maybeReadMore read 0"),f.read(0),Y===p.length)break}p.readingMore=!1}L.prototype._read=function(f){throw new C("_read()")},L.prototype.pipe=function(f,p){const Y=this,X=this._readableState;X.pipes.length===1&&(X.multiAwaitDrain||(X.multiAwaitDrain=!0,X.awaitDrainWriters=new c(X.awaitDrainWriters?[X.awaitDrainWriters]:[]))),X.pipes.push(f),v("pipe count=%d opts=%j",X.pipes.length,p);const Re=(!p||p.end!==!1)&&f!==e.stdout&&f!==e.stderr?En:zt;X.endEmitted?e.nextTick(Re):Y.once("end",Re),f.on("unpipe",Be);function Be(ct,Ye){v("onunpipe"),ct===Y&&Ye&&Ye.hasUnpiped===!1&&(Ye.hasUnpiped=!0,zo())}function En(){v("onend"),f.end()}let ut,xn=!1;function zo(){v("cleanup"),f.removeListener("close",Pr),f.removeListener("finish",Tr),ut&&f.removeListener("drain",ut),f.removeListener("error",Mr),f.removeListener("unpipe",Be),Y.removeListener("end",En),Y.removeListener("end",zt),Y.removeListener("data",Rn),xn=!0,ut&&X.awaitDrainWriters&&(!f._writableState||f._writableState.needDrain)&&ut()}function In(){xn||(X.pipes.length===1&&X.pipes[0]===f?(v("false write response, pause",0),X.awaitDrainWriters=f,X.multiAwaitDrain=!1):X.pipes.length>1&&X.pipes.includes(f)&&(v("false write response, pause",X.awaitDrainWriters.size),X.awaitDrainWriters.add(f)),Y.pause()),ut||(ut=vn(Y,f),f.on("drain",ut))}Y.on("data",Rn);function Rn(ct){v("ondata");const Ye=f.write(ct);v("dest.write",Ye),Ye===!1&&In()}function Mr(ct){if(v("onerror",ct),zt(),f.removeListener("error",Mr),f.listenerCount("error")===0){const Ye=f._writableState||f._readableState;Ye&&!Ye.errorEmitted?y(f,ct):f.emit("error",ct)}}S(f,"error",Mr);function Pr(){f.removeListener("finish",Tr),zt()}f.once("close",Pr);function Tr(){v("onfinish"),f.removeListener("close",Pr),zt()}f.once("finish",Tr);function zt(){v("unpipe"),Y.unpipe(f)}return f.emit("pipe",Y),f.writableNeedDrain===!0?In():X.flowing||(v("pipe resume"),Y.resume()),f};function vn(f,p){return function(){const X=f._readableState;X.awaitDrainWriters===p?(v("pipeOnDrain",1),X.awaitDrainWriters=null):X.multiAwaitDrain&&(v("pipeOnDrain",X.awaitDrainWriters.size),X.awaitDrainWriters.delete(p)),(!X.awaitDrainWriters||X.awaitDrainWriters.size===0)&&f.listenerCount("data")&&f.resume()}}L.prototype.unpipe=function(f){const p=this._readableState,Y={hasUnpiped:!1};if(p.pipes.length===0)return this;if(!f){const oe=p.pipes;p.pipes=[],this.pause();for(let Re=0;Re<oe.length;Re++)oe[Re].emit("unpipe",this,{hasUnpiped:!1});return this}const X=t(p.pipes,f);return X===-1?this:(p.pipes.splice(X,1),p.pipes.length===0&&this.pause(),f.emit("unpipe",this,Y),this)},L.prototype.on=function(f,p){const Y=k.prototype.on.call(this,f,p),X=this._readableState;return f==="data"?(X.readableListening=this.listenerCount("readable")>0,X.flowing!==!1&&this.resume()):f==="readable"&&!X.endEmitted&&!X.readableListening&&(X.readableListening=X.needReadable=!0,X.flowing=!1,X.emittedReadable=!1,v("on readable",X.length,X.reading),X.length?Qe(this):X.reading||e.nextTick(O,this)),Y},L.prototype.addListener=L.prototype.on,L.prototype.removeListener=function(f,p){const Y=k.prototype.removeListener.call(this,f,p);return f==="readable"&&e.nextTick(Cr,this),Y},L.prototype.off=L.prototype.removeListener,L.prototype.removeAllListeners=function(f){const p=k.prototype.removeAllListeners.apply(this,arguments);return(f==="readable"||f===void 0)&&e.nextTick(Cr,this),p};function Cr(f){const p=f._readableState;p.readableListening=f.listenerCount("readable")>0,p.resumeScheduled&&p[re]===!1?p.flowing=!0:f.listenerCount("data")>0?f.resume():p.readableListening||(p.flowing=null)}function O(f){v("readable nexttick read 0"),f.read(0)}L.prototype.resume=function(){const f=this._readableState;return f.flowing||(v("resume"),f.flowing=!f.readableListening,he(this,f)),f[re]=!1,this};function he(f,p){p.resumeScheduled||(p.resumeScheduled=!0,e.nextTick(be,f,p))}function be(f,p){v("resume",p.reading),p.reading||f.read(0),p.resumeScheduled=!1,f.emit("resume"),ye(f),p.flowing&&!p.reading&&f.read(0)}L.prototype.pause=function(){return v("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(v("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[re]=!0,this};function ye(f){const p=f._readableState;for(v("flow",p.flowing);p.flowing&&f.read()!==null;);}L.prototype.wrap=function(f){let p=!1;f.on("data",X=>{!this.push(X)&&f.pause&&(p=!0,f.pause())}),f.on("end",()=>{this.push(null)}),f.on("error",X=>{y(this,X)}),f.on("close",()=>{this.destroy()}),f.on("destroy",()=>{this.destroy()}),this._read=()=>{p&&f.resume&&(p=!1,f.resume())};const Y=a(f);for(let X=1;X<Y.length;X++){const oe=Y[X];this[oe]===void 0&&typeof f[oe]=="function"&&(this[oe]=f[oe].bind(f))}return this},L.prototype[g]=function(){return pe(this)},L.prototype.iterator=function(f){return f!==void 0&&J(f,"options"),pe(this,f)};function pe(f,p){typeof f.read!="function"&&(f=L.wrap(f,{objectMode:!0}));const Y=_e(f,p);return Y.stream=f,Y}async function*_e(f,p){let Y=ne;function X(Be){this===f?(Y(),Y=ne):Y=Be}f.on("readable",X);let oe;const Re=E(f,{writable:!1},Be=>{oe=Be?z(oe,Be):null,Y(),Y=ne});try{for(;;){const Be=f.destroyed?null:f.read();if(Be!==null)yield Be;else{if(oe)throw oe;if(oe===null)return;await new u(X)}}}catch(Be){throw oe=z(oe,Be),oe}finally{(oe||p?.destroyOnReturn!==!1)&&(oe===void 0||f._readableState.autoDestroy)?G.destroyer(f,null):(f.off("readable",X),Re())}}o(L.prototype,{readable:{__proto__:null,get(){const f=this._readableState;return!!f&&f.readable!==!1&&!f.destroyed&&!f.errorEmitted&&!f.endEmitted},set(f){this._readableState&&(this._readableState.readable=!!f)}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._readableState.readable!==!1&&(this._readableState.destroyed||this._readableState.errored)&&!this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(f){this._readableState&&(this._readableState.flowing=f)}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.objectMode:!1}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return this._readableState?this._readableState.closed:!1}},destroyed:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.destroyed:!1},set(f){this._readableState&&(this._readableState.destroyed=f)}},readableEnded:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}}),o(H.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return this[re]!==!1},set(f){this[re]=!!f}}}),L._fromList=We;function We(f,p){if(p.length===0)return null;let Y;return p.objectMode?Y=p.buffer.shift():!f||f>=p.length?(p.decoder?Y=p.buffer.join(""):p.buffer.length===1?Y=p.buffer.first():Y=p.buffer.concat(p.length),p.buffer.clear()):Y=p.buffer.consume(f,p.decoder),Y}function Ue(f){const p=f._readableState;v("endReadable",p.endEmitted),p.endEmitted||(p.ended=!0,e.nextTick(Ze,p,f))}function Ze(f,p){if(v("endReadableNT",f.endEmitted,f.length),!f.errored&&!f.closeEmitted&&!f.endEmitted&&f.length===0){if(f.endEmitted=!0,p.emit("end"),p.writable&&p.allowHalfOpen===!1)e.nextTick(Dt,p);else if(f.autoDestroy){const Y=p._writableState;(!Y||Y.autoDestroy&&(Y.finished||Y.writable===!1))&&p.destroy()}}}function Dt(f){f.writable&&!f.writableEnded&&!f.destroyed&&f.end()}L.from=function(f,p){return F(L,f,p)};let Nt;function Sn(){return Nt===void 0&&(Nt={}),Nt}return L.fromWeb=function(f,p){return Sn().newStreamReadableFromReadableStream(f,p)},L.toWeb=function(f,p){return Sn().newReadableStreamFromStreamReadable(f,p)},L.wrap=function(f,p){var Y,X;return new L({objectMode:(Y=(X=f.readableObjectMode)!==null&&X!==void 0?X:f.objectMode)!==null&&Y!==void 0?Y:!0,...p,destroy(oe,Re){G.destroyer(f,oe),Re(oe)}}).wrap(f)},Va}var Qa,Vc;function Ul(){if(Vc)return Qa;Vc=1;const e=It(),{ArrayPrototypeSlice:t,Error:r,FunctionPrototypeSymbolHasInstance:n,ObjectDefineProperty:i,ObjectDefineProperties:o,ObjectSetPrototypeOf:a,StringPrototypeToLowerCase:s,Symbol:u,SymbolHasInstance:c}=He();Qa=J,J.WritableState=x;const{EventEmitter:h}=lr(),g=Ll().Stream,{Buffer:A}=xt(),I=_n(),{addAbortSignal:k}=qo(),{getHighWaterMark:S,getDefaultHighWaterMark:_}=Ko(),{ERR_INVALID_ARG_TYPE:R,ERR_METHOD_NOT_IMPLEMENTED:E,ERR_MULTIPLE_CALLBACK:v,ERR_STREAM_CANNOT_PIPE:V,ERR_STREAM_DESTROYED:G,ERR_STREAM_ALREADY_FINISHED:ue,ERR_STREAM_NULL_VALUES:ce,ERR_STREAM_WRITE_AFTER_END:z,ERR_UNKNOWN_ENCODING:se}=mt().codes,{errorOrDestroy:C}=I;a(J.prototype,g.prototype),a(J,g);function M(){}const K=u("kOnFinished");function x(l,d,w){typeof w!="boolean"&&(w=d instanceof sr()),this.objectMode=!!(l&&l.objectMode),w&&(this.objectMode=this.objectMode||!!(l&&l.writableObjectMode)),this.highWaterMark=l?S(this,l,"writableHighWaterMark",w):_(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;const j=!!(l&&l.decodeStrings===!1);this.decodeStrings=!j,this.defaultEncoding=l&&l.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=y.bind(void 0,d),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,$(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!l||l.emitClose!==!1,this.autoDestroy=!l||l.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[K]=[]}function $(l){l.buffered=[],l.bufferedIndex=0,l.allBuffers=!0,l.allNoop=!0}x.prototype.getBuffer=function(){return t(this.buffered,this.bufferedIndex)},i(x.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}});function J(l){const d=this instanceof sr();if(!d&&!n(J,this))return new J(l);this._writableState=new x(l,this,d),l&&(typeof l.write=="function"&&(this._write=l.write),typeof l.writev=="function"&&(this._writev=l.writev),typeof l.destroy=="function"&&(this._destroy=l.destroy),typeof l.final=="function"&&(this._final=l.final),typeof l.construct=="function"&&(this._construct=l.construct),l.signal&&k(l.signal,this)),g.call(this,l),I.construct(this,()=>{const w=this._writableState;w.writing||ee(this,w),P(this,w)})}i(J,c,{__proto__:null,value:function(l){return n(this,l)?!0:this!==J?!1:l&&l._writableState instanceof x}}),J.prototype.pipe=function(){C(this,new V)};function re(l,d,w,j){const q=l._writableState;if(typeof w=="function")j=w,w=q.defaultEncoding;else{if(!w)w=q.defaultEncoding;else if(w!=="buffer"&&!A.isEncoding(w))throw new se(w);typeof j!="function"&&(j=M)}if(d===null)throw new ce;if(!q.objectMode)if(typeof d=="string")q.decodeStrings!==!1&&(d=A.from(d,w),w="buffer");else if(d instanceof A)w="buffer";else if(g._isUint8Array(d))d=g._uint8ArrayToBuffer(d),w="buffer";else throw new R("chunk",["string","Buffer","Uint8Array"],d);let W;return q.ending?W=new z:q.destroyed&&(W=new G("write")),W?(e.nextTick(j,W),C(l,W,!0),W):(q.pendingcb++,de(l,q,d,w,j))}J.prototype.write=function(l,d,w){return re(this,l,d,w)===!0},J.prototype.cork=function(){this._writableState.corked++},J.prototype.uncork=function(){const l=this._writableState;l.corked&&(l.corked--,l.writing||ee(this,l))},J.prototype.setDefaultEncoding=function(d){if(typeof d=="string"&&(d=s(d)),!A.isEncoding(d))throw new se(d);return this._writableState.defaultEncoding=d,this};function de(l,d,w,j,q){const W=d.objectMode?1:w.length;d.length+=W;const b=d.length<d.highWaterMark;return b||(d.needDrain=!0),d.writing||d.corked||d.errored||!d.constructed?(d.buffered.push({chunk:w,encoding:j,callback:q}),d.allBuffers&&j!=="buffer"&&(d.allBuffers=!1),d.allNoop&&q!==M&&(d.allNoop=!1)):(d.writelen=W,d.writecb=q,d.writing=!0,d.sync=!0,l._write(w,j,d.onwrite),d.sync=!1),b&&!d.errored&&!d.destroyed}function F(l,d,w,j,q,W,b){d.writelen=j,d.writecb=b,d.writing=!0,d.sync=!0,d.destroyed?d.onwrite(new G("write")):w?l._writev(q,d.onwrite):l._write(q,W,d.onwrite),d.sync=!1}function ne(l,d,w,j){--d.pendingcb,j(w),D(d),C(l,w)}function y(l,d){const w=l._writableState,j=w.sync,q=w.writecb;if(typeof q!="function"){C(l,new v);return}w.writing=!1,w.writecb=null,w.length-=w.writelen,w.writelen=0,d?(d.stack,w.errored||(w.errored=d),l._readableState&&!l._readableState.errored&&(l._readableState.errored=d),j?e.nextTick(ne,l,w,d,q):ne(l,w,d,q)):(w.buffered.length>w.bufferedIndex&&ee(l,w),j?w.afterWriteTickInfo!==null&&w.afterWriteTickInfo.cb===q?w.afterWriteTickInfo.count++:(w.afterWriteTickInfo={count:1,cb:q,stream:l,state:w},e.nextTick(B,w.afterWriteTickInfo)):Z(l,w,1,q))}function B({stream:l,state:d,count:w,cb:j}){return d.afterWriteTickInfo=null,Z(l,d,w,j)}function Z(l,d,w,j){for(!d.ending&&!l.destroyed&&d.length===0&&d.needDrain&&(d.needDrain=!1,l.emit("drain"));w-- >0;)d.pendingcb--,j();d.destroyed&&D(d),P(l,d)}function D(l){if(l.writing)return;for(let q=l.bufferedIndex;q<l.buffered.length;++q){var d;const{chunk:W,callback:b}=l.buffered[q],T=l.objectMode?1:W.length;l.length-=T,b((d=l.errored)!==null&&d!==void 0?d:new G("write"))}const w=l[K].splice(0);for(let q=0;q<w.length;q++){var j;w[q]((j=l.errored)!==null&&j!==void 0?j:new G("end"))}$(l)}function ee(l,d){if(d.corked||d.bufferProcessing||d.destroyed||!d.constructed)return;const{buffered:w,bufferedIndex:j,objectMode:q}=d,W=w.length-j;if(!W)return;let b=j;if(d.bufferProcessing=!0,W>1&&l._writev){d.pendingcb-=W-1;const T=d.allNoop?M:L=>{for(let ge=b;ge<w.length;++ge)w[ge].callback(L)},H=d.allNoop&&b===0?w:t(w,b);H.allBuffers=d.allBuffers,F(l,d,!0,d.length,H,"",T),$(d)}else{do{const{chunk:T,encoding:H,callback:L}=w[b];w[b++]=null;const ge=q?1:T.length;F(l,d,!1,ge,T,H,L)}while(b<w.length&&!d.writing);b===w.length?$(d):b>256?(w.splice(0,b),d.bufferedIndex=0):d.bufferedIndex=b}d.bufferProcessing=!1}J.prototype._write=function(l,d,w){if(this._writev)this._writev([{chunk:l,encoding:d}],w);else throw new E("_write()")},J.prototype._writev=null,J.prototype.end=function(l,d,w){const j=this._writableState;typeof l=="function"?(w=l,l=null,d=null):typeof d=="function"&&(w=d,d=null);let q;if(l!=null){const W=re(this,l,d);W instanceof r&&(q=W)}return j.corked&&(j.corked=1,this.uncork()),q||(!j.errored&&!j.ending?(j.ending=!0,P(this,j,!0),j.ended=!0):j.finished?q=new ue("end"):j.destroyed&&(q=new G("end"))),typeof w=="function"&&(q||j.finished?e.nextTick(w,q):j[K].push(w)),this};function ie(l){return l.ending&&!l.destroyed&&l.constructed&&l.length===0&&!l.errored&&l.buffered.length===0&&!l.finished&&!l.writing&&!l.errorEmitted&&!l.closeEmitted}function fe(l,d){let w=!1;function j(q){if(w){C(l,q??v());return}if(w=!0,d.pendingcb--,q){const W=d[K].splice(0);for(let b=0;b<W.length;b++)W[b](q);C(l,q,d.sync)}else ie(d)&&(d.prefinished=!0,l.emit("prefinish"),d.pendingcb++,e.nextTick(N,l,d))}d.sync=!0,d.pendingcb++;try{l._final(j)}catch(q){j(q)}d.sync=!1}function ae(l,d){!d.prefinished&&!d.finalCalled&&(typeof l._final=="function"&&!d.destroyed?(d.finalCalled=!0,fe(l,d)):(d.prefinished=!0,l.emit("prefinish")))}function P(l,d,w){ie(d)&&(ae(l,d),d.pendingcb===0&&(w?(d.pendingcb++,e.nextTick((j,q)=>{ie(q)?N(j,q):q.pendingcb--},l,d)):ie(d)&&(d.pendingcb++,N(l,d))))}function N(l,d){d.pendingcb--,d.finished=!0;const w=d[K].splice(0);for(let j=0;j<w.length;j++)w[j]();if(l.emit("finish"),d.autoDestroy){const j=l._readableState;(!j||j.autoDestroy&&(j.endEmitted||j.readable===!1))&&l.destroy()}}o(J.prototype,{closed:{__proto__:null,get(){return this._writableState?this._writableState.closed:!1}},destroyed:{__proto__:null,get(){return this._writableState?this._writableState.destroyed:!1},set(l){this._writableState&&(this._writableState.destroyed=l)}},writable:{__proto__:null,get(){const l=this._writableState;return!!l&&l.writable!==!1&&!l.destroyed&&!l.errored&&!l.ending&&!l.ended},set(l){this._writableState&&(this._writableState.writable=!!l)}},writableFinished:{__proto__:null,get(){return this._writableState?this._writableState.finished:!1}},writableObjectMode:{__proto__:null,get(){return this._writableState?this._writableState.objectMode:!1}},writableBuffer:{__proto__:null,get(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{__proto__:null,get(){return this._writableState?this._writableState.ending:!1}},writableNeedDrain:{__proto__:null,get(){const l=this._writableState;return l?!l.destroyed&&!l.ending&&l.needDrain:!1}},writableHighWaterMark:{__proto__:null,get(){return this._writableState&&this._writableState.highWaterMark}},writableCorked:{__proto__:null,get(){return this._writableState?this._writableState.corked:0}},writableLength:{__proto__:null,get(){return this._writableState&&this._writableState.length}},errored:{__proto__:null,enumerable:!1,get(){return this._writableState?this._writableState.errored:null}},writableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._writableState.writable!==!1&&(this._writableState.destroyed||this._writableState.errored)&&!this._writableState.finished)}}});const Q=I.destroy;J.prototype.destroy=function(l,d){const w=this._writableState;return!w.destroyed&&(w.bufferedIndex<w.buffered.length||w[K].length)&&e.nextTick(D,w),Q.call(this,l,d),this},J.prototype._undestroy=I.undestroy,J.prototype._destroy=function(l,d){d(l)},J.prototype[h.captureRejectionSymbol]=function(l){this.destroy(l)};let le;function U(){return le===void 0&&(le={}),le}return J.fromWeb=function(l,d){return U().newStreamWritableFromWritableStream(l,d)},J.toWeb=function(l){return U().newWritableStreamFromStreamWritable(l)},Qa}var Ja,Qc;function D_(){if(Qc)return Ja;Qc=1;const e=It(),t=xt(),{isReadable:r,isWritable:n,isIterable:i,isNodeStream:o,isReadableNodeStream:a,isWritableNodeStream:s,isDuplexNodeStream:u,isReadableStream:c,isWritableStream:h}=cr(),g=Rr(),{AbortError:A,codes:{ERR_INVALID_ARG_TYPE:I,ERR_INVALID_RETURN_VALUE:k}}=mt(),{destroyer:S}=_n(),_=sr(),R=Wo(),E=Ul(),{createDeferredPromise:v}=vt(),V=ep(),G=globalThis.Blob||t.Blob,ue=typeof G<"u"?function(x){return x instanceof G}:function(x){return!1},ce=globalThis.AbortController||Xt().AbortController,{FunctionPrototypeCall:z}=He();class se extends _{constructor(x){super(x),x?.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),x?.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}}Ja=function K(x,$){if(u(x))return x;if(a(x))return M({readable:x});if(s(x))return M({writable:x});if(o(x))return M({writable:!1,readable:!1});if(c(x))return M({readable:R.fromWeb(x)});if(h(x))return M({writable:E.fromWeb(x)});if(typeof x=="function"){const{value:re,write:de,final:F,destroy:ne}=C(x);if(i(re))return V(se,re,{objectMode:!0,write:de,final:F,destroy:ne});const y=re?.then;if(typeof y=="function"){let B;const Z=z(y,re,D=>{if(D!=null)throw new k("nully","body",D)},D=>{S(B,D)});return B=new se({objectMode:!0,readable:!1,write:de,final(D){F(async()=>{try{await Z,e.nextTick(D,null)}catch(ee){e.nextTick(D,ee)}})},destroy:ne})}throw new k("Iterable, AsyncIterable or AsyncFunction",$,re)}if(ue(x))return K(x.arrayBuffer());if(i(x))return V(se,x,{objectMode:!0,writable:!1});if(c(x?.readable)&&h(x?.writable))return se.fromWeb(x);if(typeof x?.writable=="object"||typeof x?.readable=="object"){const re=x!=null&&x.readable?a(x?.readable)?x?.readable:K(x.readable):void 0,de=x!=null&&x.writable?s(x?.writable)?x?.writable:K(x.writable):void 0;return M({readable:re,writable:de})}const J=x?.then;if(typeof J=="function"){let re;return z(J,x,de=>{de!=null&&re.push(de),re.push(null)},de=>{S(re,de)}),re=new se({objectMode:!0,writable:!1,read(){}})}throw new I($,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],x)};function C(K){let{promise:x,resolve:$}=v();const J=new ce,re=J.signal;return{value:K((async function*(){for(;;){const F=x;x=null;const{chunk:ne,done:y,cb:B}=await F;if(e.nextTick(B),y)return;if(re.aborted)throw new A(void 0,{cause:re.reason});({promise:x,resolve:$}=v()),yield ne}})(),{signal:re}),write(F,ne,y){const B=$;$=null,B({chunk:F,done:!1,cb:y})},final(F){const ne=$;$=null,ne({done:!0,cb:F})},destroy(F,ne){J.abort(),ne(F)}}}function M(K){const x=K.readable&&typeof K.readable.read!="function"?R.wrap(K.readable):K.readable,$=K.writable;let J=!!r(x),re=!!n($),de,F,ne,y,B;function Z(D){const ee=y;y=null,ee?ee(D):D&&B.destroy(D)}return B=new se({readableObjectMode:!!(x!=null&&x.readableObjectMode),writableObjectMode:!!($!=null&&$.writableObjectMode),readable:J,writable:re}),re&&(g($,D=>{re=!1,D&&S(x,D),Z(D)}),B._write=function(D,ee,ie){$.write(D,ee)?ie():de=ie},B._final=function(D){$.end(),F=D},$.on("drain",function(){if(de){const D=de;de=null,D()}}),$.on("finish",function(){if(F){const D=F;F=null,D()}})),J&&(g(x,D=>{J=!1,D&&S(x,D),Z(D)}),x.on("readable",function(){if(ne){const D=ne;ne=null,D()}}),x.on("end",function(){B.push(null)}),B._read=function(){for(;;){const D=x.read();if(D===null){ne=B._read;return}if(!B.push(D))return}}),B._destroy=function(D,ee){!D&&y!==null&&(D=new A),ne=null,de=null,F=null,y===null?ee(D):(y=ee,S($,D),S(x,D))},B}return Ja}var Ga,Jc;function sr(){if(Jc)return Ga;Jc=1;const{ObjectDefineProperties:e,ObjectGetOwnPropertyDescriptor:t,ObjectKeys:r,ObjectSetPrototypeOf:n}=He();Ga=a;const i=Wo(),o=Ul();n(a.prototype,i.prototype),n(a,i);{const h=r(o.prototype);for(let g=0;g<h.length;g++){const A=h[g];a.prototype[A]||(a.prototype[A]=o.prototype[A])}}function a(h){if(!(this instanceof a))return new a(h);i.call(this,h),o.call(this,h),h?(this.allowHalfOpen=h.allowHalfOpen!==!1,h.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),h.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)):this.allowHalfOpen=!0}e(a.prototype,{writable:{__proto__:null,...t(o.prototype,"writable")},writableHighWaterMark:{__proto__:null,...t(o.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...t(o.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...t(o.prototype,"writableBuffer")},writableLength:{__proto__:null,...t(o.prototype,"writableLength")},writableFinished:{__proto__:null,...t(o.prototype,"writableFinished")},writableCorked:{__proto__:null,...t(o.prototype,"writableCorked")},writableEnded:{__proto__:null,...t(o.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...t(o.prototype,"writableNeedDrain")},destroyed:{__proto__:null,get(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set(h){this._readableState&&this._writableState&&(this._readableState.destroyed=h,this._writableState.destroyed=h)}}});let s;function u(){return s===void 0&&(s={}),s}a.fromWeb=function(h,g){return u().newStreamDuplexFromReadableWritablePair(h,g)},a.toWeb=function(h){return u().newReadableWritablePairFromDuplex(h)};let c;return a.from=function(h){return c||(c=D_()),c(h,"body")},Ga}var Ya,Gc;function tp(){if(Gc)return Ya;Gc=1;const{ObjectSetPrototypeOf:e,Symbol:t}=He();Ya=a;const{ERR_METHOD_NOT_IMPLEMENTED:r}=mt().codes,n=sr(),{getHighWaterMark:i}=Ko();e(a.prototype,n.prototype),e(a,n);const o=t("kCallback");function a(c){if(!(this instanceof a))return new a(c);const h=c?i(this,c,"readableHighWaterMark",!0):null;h===0&&(c={...c,highWaterMark:null,readableHighWaterMark:h,writableHighWaterMark:c.writableHighWaterMark||0}),n.call(this,c),this._readableState.sync=!1,this[o]=null,c&&(typeof c.transform=="function"&&(this._transform=c.transform),typeof c.flush=="function"&&(this._flush=c.flush)),this.on("prefinish",u)}function s(c){typeof this._flush=="function"&&!this.destroyed?this._flush((h,g)=>{if(h){c?c(h):this.destroy(h);return}g!=null&&this.push(g),this.push(null),c&&c()}):(this.push(null),c&&c())}function u(){this._final!==s&&s.call(this)}return a.prototype._final=s,a.prototype._transform=function(c,h,g){throw new r("_transform()")},a.prototype._write=function(c,h,g){const A=this._readableState,I=this._writableState,k=A.length;this._transform(c,h,(S,_)=>{if(S){g(S);return}_!=null&&this.push(_),I.ended||k===A.length||A.length<A.highWaterMark?g():this[o]=g})},a.prototype._read=function(){if(this[o]){const c=this[o];this[o]=null,c()}},Ya}var Xa,Yc;function rp(){if(Yc)return Xa;Yc=1;const{ObjectSetPrototypeOf:e}=He();Xa=r;const t=tp();e(r.prototype,t.prototype),e(r,t);function r(n){if(!(this instanceof r))return new r(n);t.call(this,n)}return r.prototype._transform=function(n,i,o){o(null,n)},Xa}var Za,Xc;function Bl(){if(Xc)return Za;Xc=1;const e=It(),{ArrayIsArray:t,Promise:r,SymbolAsyncIterator:n,SymbolDispose:i}=He(),o=Rr(),{once:a}=vt(),s=_n(),u=sr(),{aggregateTwoErrors:c,codes:{ERR_INVALID_ARG_TYPE:h,ERR_INVALID_RETURN_VALUE:g,ERR_MISSING_ARGS:A,ERR_STREAM_DESTROYED:I,ERR_STREAM_PREMATURE_CLOSE:k},AbortError:S}=mt(),{validateFunction:_,validateAbortSignal:R}=Li(),{isIterable:E,isReadable:v,isReadableNodeStream:V,isNodeStream:G,isTransformStream:ue,isWebStream:ce,isReadableStream:z,isReadableFinished:se}=cr(),C=globalThis.AbortController||Xt().AbortController;let M,K,x;function $(D,ee,ie){let fe=!1;D.on("close",()=>{fe=!0});const ae=o(D,{readable:ee,writable:ie},P=>{fe=!P});return{destroy:P=>{fe||(fe=!0,s.destroyer(D,P||new I("pipe")))},cleanup:ae}}function J(D){return _(D[D.length-1],"streams[stream.length - 1]"),D.pop()}function re(D){if(E(D))return D;if(V(D))return de(D);throw new h("val",["Readable","Iterable","AsyncIterable"],D)}async function*de(D){K||(K=Wo()),yield*K.prototype[n].call(D)}async function F(D,ee,ie,{end:fe}){let ae,P=null;const N=U=>{if(U&&(ae=U),P){const l=P;P=null,l()}},Q=()=>new r((U,l)=>{ae?l(ae):P=()=>{ae?l(ae):U()}});ee.on("drain",N);const le=o(ee,{readable:!1},N);try{ee.writableNeedDrain&&await Q();for await(const U of D)ee.write(U)||await Q();fe&&(ee.end(),await Q()),ie()}catch(U){ie(ae!==U?c(ae,U):U)}finally{le(),ee.off("drain",N)}}async function ne(D,ee,ie,{end:fe}){ue(ee)&&(ee=ee.writable);const ae=ee.getWriter();try{for await(const P of D)await ae.ready,ae.write(P).catch(()=>{});await ae.ready,fe&&await ae.close(),ie()}catch(P){try{await ae.abort(P),ie(P)}catch(N){ie(N)}}}function y(...D){return B(D,a(J(D)))}function B(D,ee,ie){if(D.length===1&&t(D[0])&&(D=D[0]),D.length<2)throw new A("streams");const fe=new C,ae=fe.signal,P=ie?.signal,N=[];R(P,"options.signal");function Q(){q(new S)}x=x||vt().addAbortListener;let le;P&&(le=x(P,Q));let U,l;const d=[];let w=0;function j(H){q(H,--w===0)}function q(H,L){var ge;if(H&&(!U||U.code==="ERR_STREAM_PREMATURE_CLOSE")&&(U=H),!(!U&&!L)){for(;d.length;)d.shift()(U);(ge=le)===null||ge===void 0||ge[i](),fe.abort(),L&&(U||N.forEach(Se=>Se()),e.nextTick(ee,U,l))}}let W;for(let H=0;H<D.length;H++){const L=D[H],ge=H<D.length-1,Se=H>0,me=ge||ie?.end!==!1,xe=H===D.length-1;if(G(L)){let Ee=function(je){je&&je.name!=="AbortError"&&je.code!=="ERR_STREAM_PREMATURE_CLOSE"&&j(je)};if(me){const{destroy:je,cleanup:Qe}=$(L,ge,Se);d.push(je),v(L)&&xe&&N.push(Qe)}L.on("error",Ee),v(L)&&xe&&N.push(()=>{L.removeListener("error",Ee)})}if(H===0)if(typeof L=="function"){if(W=L({signal:ae}),!E(W))throw new g("Iterable, AsyncIterable or Stream","source",W)}else E(L)||V(L)||ue(L)?W=L:W=u.from(L);else if(typeof L=="function"){if(ue(W)){var b;W=re((b=W)===null||b===void 0?void 0:b.readable)}else W=re(W);if(W=L(W,{signal:ae}),ge){if(!E(W,!0))throw new g("AsyncIterable",`transform[${H-1}]`,W)}else{var T;M||(M=rp());const Ee=new M({objectMode:!0}),je=(T=W)===null||T===void 0?void 0:T.then;if(typeof je=="function")w++,je.call(W,Oe=>{l=Oe,Oe!=null&&Ee.write(Oe),me&&Ee.end(),e.nextTick(j)},Oe=>{Ee.destroy(Oe),e.nextTick(j,Oe)});else if(E(W,!0))w++,F(W,Ee,j,{end:me});else if(z(W)||ue(W)){const Oe=W.readable||W;w++,F(Oe,Ee,j,{end:me})}else throw new g("AsyncIterable or Promise","destination",W);W=Ee;const{destroy:Qe,cleanup:Wt}=$(W,!1,!0);d.push(Qe),xe&&N.push(Wt)}}else if(G(L)){if(V(W)){w+=2;const Ee=Z(W,L,j,{end:me});v(L)&&xe&&N.push(Ee)}else if(ue(W)||z(W)){const Ee=W.readable||W;w++,F(Ee,L,j,{end:me})}else if(E(W))w++,F(W,L,j,{end:me});else throw new h("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],W);W=L}else if(ce(L)){if(V(W))w++,ne(re(W),L,j,{end:me});else if(z(W)||E(W))w++,ne(W,L,j,{end:me});else if(ue(W))w++,ne(W.readable,L,j,{end:me});else throw new h("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],W);W=L}else W=u.from(L)}return(ae!=null&&ae.aborted||P!=null&&P.aborted)&&e.nextTick(Q),W}function Z(D,ee,ie,{end:fe}){let ae=!1;if(ee.on("close",()=>{ae||ie(new k)}),D.pipe(ee,{end:!1}),fe){let P=function(){ae=!0,ee.end()};se(D)?e.nextTick(P):D.once("end",P)}else ie();return o(D,{readable:!0,writable:!1},P=>{const N=D._readableState;P&&P.code==="ERR_STREAM_PREMATURE_CLOSE"&&N&&N.ended&&!N.errored&&!N.errorEmitted?D.once("end",ie).once("error",ie):ie(P)}),o(ee,{readable:!1,writable:!0},ie)}return Za={pipelineImpl:B,pipeline:y},Za}var $a,Zc;function np(){if(Zc)return $a;Zc=1;const{pipeline:e}=Bl(),t=sr(),{destroyer:r}=_n(),{isNodeStream:n,isReadable:i,isWritable:o,isWebStream:a,isTransformStream:s,isWritableStream:u,isReadableStream:c}=cr(),{AbortError:h,codes:{ERR_INVALID_ARG_VALUE:g,ERR_MISSING_ARGS:A}}=mt(),I=Rr();return $a=function(...S){if(S.length===0)throw new A("streams");if(S.length===1)return t.from(S[0]);const _=[...S];if(typeof S[0]=="function"&&(S[0]=t.from(S[0])),typeof S[S.length-1]=="function"){const M=S.length-1;S[M]=t.from(S[M])}for(let M=0;M<S.length;++M)if(!(!n(S[M])&&!a(S[M]))){if(M<S.length-1&&!(i(S[M])||c(S[M])||s(S[M])))throw new g(`streams[${M}]`,_[M],"must be readable");if(M>0&&!(o(S[M])||u(S[M])||s(S[M])))throw new g(`streams[${M}]`,_[M],"must be writable")}let R,E,v,V,G;function ue(M){const K=V;V=null,K?K(M):M?G.destroy(M):!C&&!se&&G.destroy()}const ce=S[0],z=e(S,ue),se=!!(o(ce)||u(ce)||s(ce)),C=!!(i(z)||c(z)||s(z));if(G=new t({writableObjectMode:!!(ce!=null&&ce.writableObjectMode),readableObjectMode:!!(z!=null&&z.readableObjectMode),writable:se,readable:C}),se){if(n(ce))G._write=function(K,x,$){ce.write(K,x)?$():R=$},G._final=function(K){ce.end(),E=K},ce.on("drain",function(){if(R){const K=R;R=null,K()}});else if(a(ce)){const x=(s(ce)?ce.writable:ce).getWriter();G._write=async function($,J,re){try{await x.ready,x.write($).catch(()=>{}),re()}catch(de){re(de)}},G._final=async function($){try{await x.ready,x.close().catch(()=>{}),E=$}catch(J){$(J)}}}const M=s(z)?z.readable:z;I(M,()=>{if(E){const K=E;E=null,K()}})}if(C){if(n(z))z.on("readable",function(){if(v){const M=v;v=null,M()}}),z.on("end",function(){G.push(null)}),G._read=function(){for(;;){const M=z.read();if(M===null){v=G._read;return}if(!G.push(M))return}};else if(a(z)){const K=(s(z)?z.readable:z).getReader();G._read=async function(){for(;;)try{const{value:x,done:$}=await K.read();if(!G.push(x))return;if($){G.push(null);return}}catch{return}}}}return G._destroy=function(M,K){!M&&V!==null&&(M=new h),v=null,R=null,E=null,V===null?K(M):(V=K,n(z)&&r(z,M))},G},$a}var $c;function N_(){if($c)return Gi;$c=1;const e=globalThis.AbortController||Xt().AbortController,{codes:{ERR_INVALID_ARG_VALUE:t,ERR_INVALID_ARG_TYPE:r,ERR_MISSING_ARGS:n,ERR_OUT_OF_RANGE:i},AbortError:o}=mt(),{validateAbortSignal:a,validateInteger:s,validateObject:u}=Li(),c=He().Symbol("kWeak"),h=He().Symbol("kResistStopPropagation"),{finished:g}=Rr(),A=np(),{addAbortSignalNoValidate:I}=qo(),{isWritable:k,isNodeStream:S}=cr(),{deprecate:_}=vt(),{ArrayPrototypePush:R,Boolean:E,MathFloor:v,Number:V,NumberIsNaN:G,Promise:ue,PromiseReject:ce,PromiseResolve:z,PromisePrototypeThen:se,Symbol:C}=He(),M=C("kEmpty"),K=C("kEof");function x(P,N){if(N!=null&&u(N,"options"),N?.signal!=null&&a(N.signal,"options.signal"),S(P)&&!k(P))throw new t("stream",P,"must be writable");const Q=A(this,P);return N!=null&&N.signal&&I(N.signal,Q),Q}function $(P,N){if(typeof P!="function")throw new r("fn",["Function","AsyncFunction"],P);N!=null&&u(N,"options"),N?.signal!=null&&a(N.signal,"options.signal");let Q=1;N?.concurrency!=null&&(Q=v(N.concurrency));let le=Q-1;return N?.highWaterMark!=null&&(le=v(N.highWaterMark)),s(Q,"options.concurrency",1),s(le,"options.highWaterMark",0),le+=Q,(async function*(){const l=vt().AbortSignalAny([N?.signal].filter(E)),d=this,w=[],j={signal:l};let q,W,b=!1,T=0;function H(){b=!0,L()}function L(){T-=1,ge()}function ge(){W&&!b&&T<Q&&w.length<le&&(W(),W=null)}async function Se(){try{for await(let me of d){if(b)return;if(l.aborted)throw new o;try{if(me=P(me,j),me===M)continue;me=z(me)}catch(xe){me=ce(xe)}T+=1,se(me,L,H),w.push(me),q&&(q(),q=null),!b&&(w.length>=le||T>=Q)&&await new ue(xe=>{W=xe})}w.push(K)}catch(me){const xe=ce(me);se(xe,L,H),w.push(xe)}finally{b=!0,q&&(q(),q=null)}}Se();try{for(;;){for(;w.length>0;){const me=await w[0];if(me===K)return;if(l.aborted)throw new o;me!==M&&(yield me),w.shift(),ge()}await new ue(me=>{q=me})}}finally{b=!0,W&&(W(),W=null)}}).call(this)}function J(P=void 0){return P!=null&&u(P,"options"),P?.signal!=null&&a(P.signal,"options.signal"),(async function*(){let Q=0;for await(const U of this){var le;if(P!=null&&(le=P.signal)!==null&&le!==void 0&&le.aborted)throw new o({cause:P.signal.reason});yield[Q++,U]}}).call(this)}async function re(P,N=void 0){for await(const Q of y.call(this,P,N))return!0;return!1}async function de(P,N=void 0){if(typeof P!="function")throw new r("fn",["Function","AsyncFunction"],P);return!await re.call(this,async(...Q)=>!await P(...Q),N)}async function F(P,N){for await(const Q of y.call(this,P,N))return Q}async function ne(P,N){if(typeof P!="function")throw new r("fn",["Function","AsyncFunction"],P);async function Q(le,U){return await P(le,U),M}for await(const le of $.call(this,Q,N));}function y(P,N){if(typeof P!="function")throw new r("fn",["Function","AsyncFunction"],P);async function Q(le,U){return await P(le,U)?le:M}return $.call(this,Q,N)}class B extends n{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}}async function Z(P,N,Q){var le;if(typeof P!="function")throw new r("reducer",["Function","AsyncFunction"],P);Q!=null&&u(Q,"options"),Q?.signal!=null&&a(Q.signal,"options.signal");let U=arguments.length>1;if(Q!=null&&(le=Q.signal)!==null&&le!==void 0&&le.aborted){const q=new o(void 0,{cause:Q.signal.reason});throw this.once("error",()=>{}),await g(this.destroy(q)),q}const l=new e,d=l.signal;if(Q!=null&&Q.signal){const q={once:!0,[c]:this,[h]:!0};Q.signal.addEventListener("abort",()=>l.abort(),q)}let w=!1;try{for await(const q of this){var j;if(w=!0,Q!=null&&(j=Q.signal)!==null&&j!==void 0&&j.aborted)throw new o;U?N=await P(N,q,{signal:d}):(N=q,U=!0)}if(!w&&!U)throw new B}finally{l.abort()}return N}async function D(P){P!=null&&u(P,"options"),P?.signal!=null&&a(P.signal,"options.signal");const N=[];for await(const le of this){var Q;if(P!=null&&(Q=P.signal)!==null&&Q!==void 0&&Q.aborted)throw new o(void 0,{cause:P.signal.reason});R(N,le)}return N}function ee(P,N){const Q=$.call(this,P,N);return(async function*(){for await(const U of Q)yield*U}).call(this)}function ie(P){if(P=V(P),G(P))return 0;if(P<0)throw new i("number",">= 0",P);return P}function fe(P,N=void 0){return N!=null&&u(N,"options"),N?.signal!=null&&a(N.signal,"options.signal"),P=ie(P),(async function*(){var le;if(N!=null&&(le=N.signal)!==null&&le!==void 0&&le.aborted)throw new o;for await(const l of this){var U;if(N!=null&&(U=N.signal)!==null&&U!==void 0&&U.aborted)throw new o;P--<=0&&(yield l)}}).call(this)}function ae(P,N=void 0){return N!=null&&u(N,"options"),N?.signal!=null&&a(N.signal,"options.signal"),P=ie(P),(async function*(){var le;if(N!=null&&(le=N.signal)!==null&&le!==void 0&&le.aborted)throw new o;for await(const l of this){var U;if(N!=null&&(U=N.signal)!==null&&U!==void 0&&U.aborted)throw new o;if(P-- >0&&(yield l),P<=0)return}}).call(this)}return Gi.streamReturningOperators={asIndexedPairs:_(J,"readable.asIndexedPairs will be removed in a future version."),drop:fe,filter:y,flatMap:ee,map:$,take:ae,compose:x},Gi.promiseReturningOperators={every:de,forEach:ne,reduce:Z,toArray:D,some:re,find:F},Gi}var es,ed;function ip(){if(ed)return es;ed=1;const{ArrayPrototypePop:e,Promise:t}=He(),{isIterable:r,isNodeStream:n,isWebStream:i}=cr(),{pipelineImpl:o}=Bl(),{finished:a}=Rr();op();function s(...u){return new t((c,h)=>{let g,A;const I=u[u.length-1];if(I&&typeof I=="object"&&!n(I)&&!r(I)&&!i(I)){const k=e(u);g=k.signal,A=k.end}o(u,(k,S)=>{k?h(k):c(S)},{signal:g,end:A})})}return es={finished:a,pipeline:s},es}var td;function op(){if(td)return ka.exports;td=1;const{Buffer:e}=xt(),{ObjectDefineProperty:t,ObjectKeys:r,ReflectApply:n}=He(),{promisify:{custom:i}}=vt(),{streamReturningOperators:o,promiseReturningOperators:a}=N_(),{codes:{ERR_ILLEGAL_CONSTRUCTOR:s}}=mt(),u=np(),{setDefaultHighWaterMark:c,getDefaultHighWaterMark:h}=Ko(),{pipeline:g}=Bl(),{destroyer:A}=_n(),I=Rr(),k=ip(),S=cr(),_=ka.exports=Ll().Stream;_.isDestroyed=S.isDestroyed,_.isDisturbed=S.isDisturbed,_.isErrored=S.isErrored,_.isReadable=S.isReadable,_.isWritable=S.isWritable,_.Readable=Wo();for(const E of r(o)){let V=function(...G){if(new.target)throw s();return _.Readable.from(n(v,this,G))};const v=o[E];t(V,"name",{__proto__:null,value:v.name}),t(V,"length",{__proto__:null,value:v.length}),t(_.Readable.prototype,E,{__proto__:null,value:V,enumerable:!1,configurable:!0,writable:!0})}for(const E of r(a)){let V=function(...G){if(new.target)throw s();return n(v,this,G)};const v=a[E];t(V,"name",{__proto__:null,value:v.name}),t(V,"length",{__proto__:null,value:v.length}),t(_.Readable.prototype,E,{__proto__:null,value:V,enumerable:!1,configurable:!0,writable:!0})}_.Writable=Ul(),_.Duplex=sr(),_.Transform=tp(),_.PassThrough=rp(),_.pipeline=g;const{addAbortSignal:R}=qo();return _.addAbortSignal=R,_.finished=I,_.destroy=A,_.compose=u,_.setDefaultHighWaterMark=c,_.getDefaultHighWaterMark=h,t(_,"promises",{__proto__:null,configurable:!0,enumerable:!0,get(){return k}}),t(g,i,{__proto__:null,enumerable:!0,get(){return k.pipeline}}),t(I,i,{__proto__:null,enumerable:!0,get(){return k.finished}}),_.Stream=_,_._isUint8Array=function(v){return v instanceof Uint8Array},_._uint8ArrayToBuffer=function(v){return e.from(v.buffer,v.byteOffset,v.byteLength)},ka.exports}var rd;function j_(){return rd||(rd=1,(function(e){const t=op(),r=ip(),n=t.Readable.destroy;e.exports=t.Readable,e.exports._uint8ArrayToBuffer=t._uint8ArrayToBuffer,e.exports._isUint8Array=t._isUint8Array,e.exports.isDisturbed=t.isDisturbed,e.exports.isErrored=t.isErrored,e.exports.isReadable=t.isReadable,e.exports.Readable=t.Readable,e.exports.Writable=t.Writable,e.exports.Duplex=t.Duplex,e.exports.Transform=t.Transform,e.exports.PassThrough=t.PassThrough,e.exports.addAbortSignal=t.addAbortSignal,e.exports.finished=t.finished,e.exports.destroy=t.destroy,e.exports.destroy=n,e.exports.pipeline=t.pipeline,e.exports.compose=t.compose,Object.defineProperty(t,"promises",{configurable:!0,enumerable:!0,get(){return r}}),e.exports.Stream=t.Stream,e.exports.default=e.exports})(Oa)),Oa.exports}var nd;function F_(){if(nd)return Qn;nd=1,Object.defineProperty(Qn,"__esModule",{value:!0}),Qn.ActorQueryResultSerializeSparqlJson=void 0;const e=Wh(),t=xr(),r=Hh(),n=j_();let i=class ei extends e.ActorQueryResultSerializeFixedMediaTypes{constructor(a){super(a)}static bindingToJsonBindings(a){if(a.termType==="Literal"){const s=a,u={value:s.value,type:"literal"},{language:c,datatype:h}=s;return c?u["xml:lang"]=c:h&&h.value!=="http://www.w3.org/2001/XMLSchema#string"&&(u.datatype=h.value),u}return a.termType==="BlankNode"?{value:a.value,type:"bnode"}:a.termType==="Quad"?{value:{subject:ei.bindingToJsonBindings(a.subject),predicate:ei.bindingToJsonBindings(a.predicate),object:ei.bindingToJsonBindings(a.object)},type:"triple"}:{value:a.value,type:"uri"}}async testHandleChecked(a,s){return["bindings","boolean"].includes(a.type)?(0,t.passTestVoid)():(0,t.failTest)("This actor can only handle bindings streams or booleans.")}async runHandle(a,s,u){const c=new n.Readable,h={};if(a.type==="bindings"){const g=await a.metadata();g.variables.length>0&&(h.vars=g.variables.map(A=>A.variable.value))}if(c.push(`{"head": ${JSON.stringify(h)},
16
- `),a.type==="bindings"){const g=a.bindingsStream;c.push(`"results": { "bindings": [
17
- `);let A=!0;function*I(k){yield k()}c.wrap((0,r.wrap)(g).map(k=>{const S=`${A?"":`,
18
- `}${JSON.stringify(Object.fromEntries([...k].map(([_,R])=>[_.value,ei.bindingToJsonBindings(R)])))}`;return A=!1,S}).append((0,r.wrap)(I(()=>`
19
- ]}${this.emitMetadata?`,
20
- "metadata": { "httpRequests": ${this.httpObserver.requests} }`:""}}
21
- `))))}else c.wrap((0,r.wrap)(a.execute().then(g=>[`"boolean":${g}
22
- }
23
- `])));return{data:c}}};return Qn.ActorQueryResultSerializeSparqlJson=i,Qn}var id;function L_(){return id||(id=1,(function(e){var t=Ur&&Ur.__createBinding||(Object.create?(function(n,i,o,a){a===void 0&&(a=o);var s=Object.getOwnPropertyDescriptor(i,o);(!s||("get"in s?!i.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(n,a,s)}):(function(n,i,o,a){a===void 0&&(a=o),n[a]=i[o]})),r=Ur&&Ur.__exportStar||function(n,i){for(var o in n)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&t(i,n,o)};Object.defineProperty(e,"__esModule",{value:!0}),r(O_(),e),r(F_(),e)})(Ur)),Ur}var U_=L_();const hi=Array.from(new Set([...Cd,"zhipu","ollama","custom"]));function B_(e){W_(),Ep({createQueryEngine:async()=>new Kp});const t=new URL("settings/-/sparql",e.podUrl).toString();return Pe.setSparqlEndpoint(t),ke.setSparqlEndpoint(t),wt.setSparqlEndpoint(t),{async listModels(){return await e.database.init?.(wt),(await e.database.select().from(wt).execute()).map(J_).filter(oi)},async listProviders(){await e.database.init?.(Pe,ke,wt);const r=await e.database.select().from(Pe).execute(),n=await e.database.select().from(ke).execute(),i=await e.database.select().from(wt).execute();return z_(e,r,n,i)},async createApiKeyCredential(r,n){const i=Ft(r);if(!i)throw new Error("unsupported_provider");await e.database.init?.(Pe,ke);const o=Pe.buildId({id:`${i}-${crypto.randomUUID()}`}),a=1,s=n.offeringId??bo(i,"apiKey"),u=n.baseUrl??hd(i,s),c=is(n.proxyUrl),h={id:o,provider:i==="custom"?Y_(o):rs(i,s),service:"ai",authMode:"apiKey",status:"active",accountLabel:n.label,label:n.label,baseUrl:u,proxyUrl:c,keyVersion:String(a),reauthRequired:!1,encryptedSecret:Xi(e,i,o,{type:"apiKey",apiKey:n.apiKey}),encryptionAlgorithm:"PLAINTEXT",metadata:{offeringId:s,priority:n.priority??100,enabled:!0,health:"unknown",baseUrl:u,...n.compatibility?{compatibility:n.compatibility}:{}}};return await e.database.insert(Pe).values(h).execute(),Mt(e,i,h)},async createLocalCredential(r,n){const i=Ft(r);if(!i)throw new Error("unsupported_provider");await e.database.init?.(Pe,ke);const o=Pe.buildId({id:`${i}-local-${crypto.randomUUID()}`}),a=n.offeringId??bo(i,"local"),s=n.baseUrl??hd(i,a),u={id:o,provider:rs(i,a),service:"ai",authMode:"local",status:"active",accountLabel:n.label??"Local",label:n.label??"Local",baseUrl:s,keyVersion:"1",reauthRequired:!1,encryptedSecret:Xi(e,i,o,{type:"local"}),encryptionAlgorithm:"PLAINTEXT",metadata:{offeringId:a,priority:n.priority??100,enabled:!0,health:"unknown",baseUrl:s}};return await e.database.insert(Pe).values(u).execute(),Mt(e,i,u)},async saveOAuthCredential(r,n){const i=Ft(r);if(!i)throw new Error("unsupported_provider");await e.database.init?.(Pe,ke);const o=Pe.buildId({id:`${i}-oauth-${crypto.randomUUID()}`}),a={id:o,provider:rs(i,"official-subscription"),service:"ai",authMode:"deviceCodeOAuth",status:"active",accountLabel:"OAuth",label:"OAuth",expiresAt:n.expiresAt,scopes:n.scope?n.scope.split(/\s+/u).filter(Boolean):void 0,keyVersion:"1",reauthRequired:!1,encryptedSecret:Xi(e,i,o,{type:"deviceCodeOAuth",accessToken:n.accessToken,refreshToken:n.refreshToken,expiresAt:n.expiresAt,scope:n.scope,idToken:n.idToken}),encryptionAlgorithm:"PLAINTEXT",metadata:{offeringId:"official-subscription",priority:100,enabled:!0,health:"healthy",authoritativeSubject:n.accountSubject}};return await e.database.insert(Pe).values(a).execute(),Mt(e,i,a)},async updateOAuthCredential(r,n,i,o){const a=Ft(r);if(!a)throw new Error("unsupported_provider");await e.database.init?.(Pe,ke);const s=await e.database.findById(Pe,n),u=s&&Mt(e,a,s);if(!s||!u||u.authMode!=="deviceCode")throw new Error("oauth_credential_not_found");if(u.version!==i)throw new Error("credential_version_conflict");const c={expiresAt:o.expiresAt,scopes:o.scope?o.scope.split(/\s+/u).filter(Boolean):void 0,keyVersion:String(i+1),reauthRequired:!1,status:"active",encryptedSecret:Xi(e,a,n,{type:"deviceCodeOAuth",accessToken:o.accessToken,refreshToken:o.refreshToken,expiresAt:o.expiresAt,scope:o.scope,idToken:o.idToken}),metadata:{...ir(s.metadata),enabled:!0,health:"healthy",authoritativeSubject:o.accountSubject??we(ir(s.metadata)?.authoritativeSubject)}},h=await e.database.updateById(Pe,n,c);if(!h)throw new Error("credential_version_conflict");return Mt(e,a,h)},async updateProviderCredential(r,n,i){const o=Ft(r);if(!o)throw new Error("unsupported_provider");await e.database.init?.(Pe,ke);const a=await e.database.findById(Pe,n),s=a&&Mt(e,o,a);if(!a||!s)throw new Error("credential_not_found");if(s.version!==i.expectedVersion)throw new Error("credential_version_conflict");const u={...ir(a.metadata),...i.priority===void 0?{}:{priority:i.priority},...i.enabled===void 0?{}:{enabled:i.enabled},...i.baseUrl===void 0?{}:{baseUrl:i.baseUrl},...i.proxyUrl===void 0?{}:{proxyUrl:is(i.proxyUrl)}},c={...i.label===void 0?{}:{accountLabel:i.label,label:i.label},...i.baseUrl===void 0?{}:{baseUrl:i.baseUrl},...i.proxyUrl===void 0?{}:{proxyUrl:is(i.proxyUrl)},...i.enabled===void 0?{}:{status:i.enabled?"active":"disabled"},keyVersion:String(s.version+1),metadata:u},h=await e.database.updateById(Pe,n,c);if(!h)throw new Error("credential_update_failed");const g=Mt(e,o,h);if(!g)throw new Error("credential_update_failed");return g},async markCredentialHealth(r,n,i,o){const a=Ft(r);if(!a)throw new Error("unsupported_provider");await e.database.init?.(Pe);const s=await e.database.findById(Pe,n),u=s&&Mt(e,a,s);if(!s||!u)throw new Error("credential_not_found");if(u.version!==o)throw new Error("credential_version_conflict");const c=await e.database.updateById(Pe,n,{keyVersion:String(u.version+1),metadata:{...ir(s.metadata),health:i}});if(!c)throw new Error("credential_update_failed");const h=Mt(e,a,c);if(!h)throw new Error("credential_update_failed");return h},async deleteProviderCredential(r,n){const i=Ft(r);if(!i)throw new Error("unsupported_provider");await e.database.init?.(Pe,ke);const o=await e.database.findById(Pe,n),a=o&&Mt(e,i,o);if(a)return await e.database.deleteById(Pe,n),a},async readCredentialSecret(r,n){const i=Ft(r);if(!i)throw new Error("unsupported_provider");const o=await e.database.findById(Pe,n);if(!o||!Mt(e,i,o))throw new Error("credential_not_found");const a=dp(e,i,n,o.encryptedSecret);if(!a)throw new Error("credential_secret_unavailable");return a},async saveDiscoveredModels(r,n,i){const o=Ft(r);if(!o)throw new Error("unsupported_provider");await e.database.init?.(Pe,ke,wt),await Z_(e.database,o);const a=await od(e,n),s=sd(o,a);await ld(e.database,s,pi(o));const u=await e.database.select().from(wt).execute(),c=new Set(u.map(A=>we(A.id)).filter(oi)),h=i.map(G_).filter(oi),g=new Set(h.map(A=>A.id));for(const A of u.filter(I=>pr(we(I.isProvidedBy),s))){const I=Hr(we(A.id),s);I&&!g.has(I)&&we(A.status)!=="unavailable"&&await e.database.updateById(wt,String(A.id),{status:"unavailable"})}for(const A of h)await $_(e.database,s,A,c)},async saveModelSelection(r,n,i){const o=Ft(r);if(!o)throw new Error("unsupported_provider");await e.database.init?.(ke,wt);const a=o==="custom"&&i?await od(e,i):null;if(o==="custom"&&i&&!a)throw new Error("credential_not_found");const s=a?sd(o,a):ke.buildId({id:o});await ld(e.database,s,pi(o));const c=(await e.database.select().from(ke).execute()).find(S=>pr(we(S.id),s)),h=we(c?.id)??s,g=lp(c?.hasModel),A=await e.database.select().from(wt).execute(),I=[...new Set(n.map(S=>eA(o,S,A,a?s:void 0)))];if(!await e.database.updateById(ke,h,{hasModel:I}))throw new Error("provider_model_selection_update_failed");e.authenticatedFetch&&await K_(e,h,g,I)}}}const q_="https://undefineds.co/ns#hasModel";async function K_(e,t,r,n){const i=ts(ke,e.podUrl,t),o=r.map(h=>ts(wt,e.podUrl,h)),a=n.map(h=>ts(wt,e.podUrl,h)),s=h=>h.map(g=>`<${i}> <${q_}> <${g}> .`).join(`
24
- `),u=[o.length>0?`DELETE DATA { ${s(o)} }`:void 0,a.length>0?`INSERT DATA { ${s(a)} }`:void 0].filter(h=>!!h);if(u.length===0)return;const c=await e.authenticatedFetch(i.split("#",1)[0],{method:"PATCH",headers:{"content-type":"application/sparql-update"},body:u.join(`;
25
- `)});if(!c.ok)throw new Error(`provider_model_selection_persist_failed:${c.status}`)}function ts(e,t,r){return/^https?:\/\//u.test(r)?r:e.buildIri(t,{id:r})}async function od(e,t){const r=await e.database.findById(Pe,t);return r||((await e.database.select().from(Pe).execute()).find(i=>{const o=we(i.id);return o===t||(o?Pe.buildIri(e.podUrl,{id:o})===t:!1)})??null)}function W_(){ad(T_.ActionObserverHttp.prototype),ad(U_.ActionObserverHttp.prototype)}function ad(e){const t=e;if(t.__xpodObservedActorsPatch)return;const r=t.onRun;t.onRun=function(n,i,o){return Array.isArray(this.observedActors)||(this.observedActors=[]),r.call(this,n,i,o)},t.__xpodObservedActorsPatch=!0}function z_(e,t,r,n){const i=t.filter(o=>we(o.service)==="ai").filter(o=>we(o.status)!=="revoked");return hi.map(o=>{const a=i.map(h=>Mt(e,o,h)).filter(oi).sort((h,g)=>h.priority-g.priority||h.id.localeCompare(g.id)),s=r.find(h=>Qr(we(h.id))===o),c=lp(s?.hasModel).map(h=>Q_(o,h,n));return{id:o,name:o==="custom"?a.find(h=>h.label)?.label??pi(o):pi(o),offerings:o==="custom"?tA(i.filter(h=>Mt(e,o,h))):up(o,e.openAiSubscriptionImportAvailable===!0),credentials:a,selectedModels:c,status:hA(a)}})}function Xi(e,t,r,n){return JSON.stringify({algorithm:"PLAINTEXT",encoding:"base64",ciphertext:H_(n),webId:e.webId,credentialIri:Pe.buildIri(e.podUrl,{id:r}),provider:t})}function H_(e){const t=new TextEncoder().encode(JSON.stringify(e));let r="";for(const n of t)r+=String.fromCharCode(n);return btoa(r)}function Mt(e,t,r){const n=we(r.id);if(!n)return;const i=Kl(we(r.provider))??bA(n);if(i!==t)return;const o=ir(r.metadata),a=mA(r.authMode);if(a)return{id:n,provider:i,offeringId:we(o?.offeringId)??Wl(we(r.provider))??bo(i,a),authMode:a,label:we(r.accountLabel)??we(r.label),enabled:yd(o?.enabled)??we(r.status)==="active",priority:pd(o?.priority)??100,health:wA(o?.health)??(yd(r.reauthRequired)?"expired":"healthy"),maskedHint:pA(e,i,n,r.encryptedSecret),baseUrl:we(r.baseUrl),proxyUrl:gA(we(r.proxyUrl)??we(o?.proxyUrl)),compatibility:V_(o?.compatibility),expiresAt:_A(r.expiresAt),version:pd(r.keyVersion)??0}}function V_(e){return e==="auto"||e==="openai"||e==="anthropic"?e:void 0}function Q_(e,t,r){const n=r.find(s=>Ar(we(s.id))===Ar(t)),i=we(n?.isProvidedBy),o=n?Hr(t,i??e)??t:Hr(t,e)??t,a=n??r.find(s=>{const u=we(s.id),c=we(s.isProvidedBy);return u===t||Hr(u,e)===o||Kl(c)===e&&Hr(u,c??e)===o});return{id:o,provider:e,offeringId:Wl(we(a?.isProvidedBy)),credentialId:ap(i),resourceId:we(a?.id)??t,displayName:we(a?.displayName),availability:we(a?.status)==="unavailable"||!a?"unavailable":"available"}}function J_(e){const t=we(e.isProvidedBy),r=Kl(t),n=r&&Hr(we(e.id),t??r);if(!(!r||!n))return{id:n,provider:r,offeringId:Wl(t),credentialId:ap(t),resourceId:we(e.id),displayName:we(e.displayName),availability:we(e.status)==="unavailable"?"unavailable":"available"}}function G_(e){const t=ir(e),r=we(t?.id);if(r)return{id:r,displayName:we(t?.displayName)}}function sd(e,t){const r=we(t?.provider),n=Ar(r),i=Qr(r);if(n&&i&&i!==e&&n.includes("#"))return ke.buildId({id:n});const o=we(ir(t?.metadata)?.offeringId),a=ql(e,o??X_(e,i));return a?ke.buildId({id:`${e}-${a}.ttl#this`}):ke.buildId({id:e})}function rs(e,t){const r=ql(e,t)??t;return ke.buildId({id:`${e}-${r}.ttl#this`})}function Y_(e){return ke.buildId({id:`custom-instance-${encodeURIComponent(e)}.ttl#this`})}function ap(e){const t=Qr(e),r=t?.startsWith("custom-instance-")?t.slice(16):void 0;if(r)try{return decodeURIComponent(r)}catch{return}}function ql(e,t){if(!t)return;const r=t.trim().toLowerCase();if(e==="bailian"){if(r==="token-plan")return"token-plan-personal";if(r==="coding-plan")return"coding-plan-pro";if(r==="payg")return"pay-as-you-go"}return r}function X_(e,t){if(!(!t||t===e)&&e==="bailian"){if(t==="bailian-token-plan")return"token-plan-personal";if(t==="bailian-coding-plan")return"coding-plan-pro"}}function pr(e,t){const r=Ar(e),n=Ar(t);return r!==void 0&&r===n}async function Z_(e,t){const r=ke.buildId({id:t});(await e.select().from(ke).execute()).some(i=>pr(we(i.id),r))||await e.insert(ke).values({id:r,displayName:pi(t)}).execute()}async function ld(e,t,r){(await e.select().from(ke).execute()).some(i=>pr(we(i.id),t))||await e.insert(ke).values({id:t,displayName:r}).execute()}async function $_(e,t,r,n){const i=sp(t,r.id),o={displayName:r.displayName??r.id,isProvidedBy:t,status:"active"};if(n.has(i)){await e.updateById(wt,i,o);return}await e.insert(wt).values({id:i,...o}).execute(),n.add(i)}function sp(e,t){const r=Ar(e)??`${e}.ttl`;return`${r.split("#",1)[0]??r}#${encodeURIComponent(t)}`}function eA(e,t,r,n){const i=we(t.resourceId),o=ql(e,we(t.offeringId)),a=n??(o?ke.buildId({id:`${e}-${o}.ttl#this`}):ke.buildId({id:e})),s=we(t.id),u=s?r.filter(h=>{const g=we(h.isProvidedBy),A=Qr(g);return(n?pr(g,n):A===e||A?.startsWith(`${e}-`)===!0)&&Hr(we(h.id),g??a)===s}):[],c=n?u[0]:o?u.find(h=>pr(we(h.isProvidedBy),a)):u.length===1?u[0]:void 0;if(i){const h=r.find(S=>we(S.id)===i);if(!h&&c)return String(c.id);const g=we(h?.isProvidedBy),A=Qr(g),I=n?pr(g,n):A===e||A?.startsWith(`${e}-`)===!0,k=!!n||!o||pr(g,a);if(!h||!I||!k)throw new Error("invalid_model_selection_resource");return i}if(!s)throw new Error("invalid_model_selection_resource");return we(c?.id)??sp(a,s)}function Hr(e,t){if(!e)return;const n=Ar(t)?.split("#",1)[0]??t,i=n.endsWith(".ttl")?`${n}#`:`${n}.ttl#`,o=e.lastIndexOf(i);if(!(o<0))try{return decodeURIComponent(e.slice(o+i.length))}catch{return e.slice(o+i.length)}}function lp(e){if(Array.isArray(e))return e.map(we).filter(oi);const t=we(e);return t?[t]:[]}function up(e,t=!1){return(fA[e]??nA).map(r=>e==="openai"&&r.id==="official-subscription"&&t?{...r,lifecycle:"active",authModes:["local"]}:{...r})}function tA(e){const t=new Map;for(const r of e){const n=ir(r.metadata),i=we(n?.offeringId)??"openai-compatible",o=rA(n?.compatibility,i),a=we(r.baseUrl)??we(n?.baseUrl),s=Zi.find(u=>u.id===i)??Zi.find(u=>u.id===`${o}-compatible`)??Zi[0];t.set(i,{...s,id:i,endpoints:a?[{protocol:o==="anthropic"?"anthropic":"chatCompletions",baseUrl:a}]:s.endpoints,modelDiscovery:o==="anthropic"?{strategy:"anthropic",path:"/models",endpointProtocol:"anthropic"}:{strategy:"openaiCompatible",path:"/models",endpointProtocol:"chatCompletions"}})}return t.size>0?[...t.values()]:Zi}function rA(e,t){return e==="anthropic"||t==="anthropic-compatible"?"anthropic":"openai"}const nA=[{id:"api-platform",label:"API 平台",kind:"api-platform",lifecycle:"active",authModes:["apiKey"]}],Zi=[{id:"openai-compatible",label:"OpenAI 兼容",kind:"api-platform",lifecycle:"active",authModes:["apiKey"],runtimeProviderIds:["custom"],endpoints:[],modelDiscovery:{strategy:"openaiCompatible",path:"/models",endpointProtocol:"chatCompletions"},quota:{strategy:"openaiCompatible",url:"/usage"}},{id:"anthropic-compatible",label:"Anthropic 兼容",kind:"api-platform",lifecycle:"active",authModes:["apiKey"],runtimeProviderIds:["custom"],endpoints:[],modelDiscovery:{strategy:"anthropic",path:"/models",endpointProtocol:"anthropic"},quota:{strategy:"console",url:""}}],ns="https://www.kimi.com/code",iA="https://www.kimi.com/user/agreement",oA="https://api.kimi.com/coding/v1",aA="https://api.kimi.com/coding/",sA="https://platform.moonshot.cn/console/api-keys",ud="https://platform.moonshot.cn/console/account",lA="https://platform.moonshot.cn/docs/intro",uA="https://api.moonshot.ai/v1",$i="https://bailian.console.aliyun.com/",eo="https://help.aliyun.com/zh/model-studio/",cd="https://open.bigmodel.cn/usercenter/apikeys",dd="https://open.bigmodel.cn/",cA="https://open.bigmodel.cn/api/paas/v4",dA="https://open.bigmodel.cn/api/coding/paas/v4",fA={openai:[{id:"official-subscription",label:"OpenAI Subscription",kind:"oauth-subscription",lifecycle:"unavailable",authModes:["oauth"],productLabel:"OpenAI",runtimeProviderIds:["openai"],credentialPrefixHints:[],consoleUrl:"https://chatgpt.com/codex",subscriptionUrl:"https://chatgpt.com/codex",endpoints:[],modelDiscovery:{strategy:"unsupported",path:"/models",endpointProtocol:"responses"},quota:{strategy:"subscription",url:"https://chatgpt.com/codex"},usagePolicyUrl:"https://openai.com/policies/usage-policies/",region:"global"},{id:"api-platform",label:"API 平台",kind:"api-platform",lifecycle:"active",authModes:["apiKey"],productLabel:"OpenAI",runtimeProviderIds:["openai"],credentialPrefixHints:["sk-"],consoleUrl:"https://platform.openai.com/api-keys",subscriptionUrl:"https://platform.openai.com/settings/organization/billing/overview",endpoints:[{protocol:"responses",baseUrl:"https://api.openai.com/v1"},{protocol:"chatCompletions",baseUrl:"https://api.openai.com/v1"}],modelDiscovery:{strategy:"openaiCompatible",path:"/models",endpointProtocol:"responses"},quota:{strategy:"providerApi",url:"https://platform.openai.com/usage"},usagePolicyUrl:"https://openai.com/policies/usage-policies/",region:"global"}],anthropic:[{id:"official-subscription",label:"Claude Code 订阅",kind:"oauth-subscription",lifecycle:"unavailable",authModes:["oauth"],productLabel:"Anthropic",runtimeProviderIds:["anthropic"],credentialPrefixHints:[],consoleUrl:"https://claude.ai/",subscriptionUrl:"https://claude.ai/settings/billing",endpoints:[],modelDiscovery:{strategy:"unsupported",path:"/models",endpointProtocol:"anthropic"},quota:{strategy:"subscription",url:"https://claude.ai/settings/usage"},usagePolicyUrl:"https://www.anthropic.com/legal/aup",region:"global"},{id:"api-platform",label:"API 平台",kind:"api-platform",lifecycle:"active",authModes:["apiKey"],productLabel:"Anthropic",runtimeProviderIds:["anthropic"],credentialPrefixHints:["sk-ant-"],consoleUrl:"https://console.anthropic.com/settings/keys",subscriptionUrl:"https://console.anthropic.com/settings/plans",endpoints:[{protocol:"anthropic",baseUrl:"https://api.anthropic.com/v1"}],modelDiscovery:{strategy:"anthropic",path:"/models",endpointProtocol:"anthropic"},quota:{strategy:"console",url:"https://console.anthropic.com/settings/limits"},usagePolicyUrl:"https://www.anthropic.com/legal/aup",region:"global"}],kimi:[fd({id:"subscription-key",label:"Token 套餐",kind:"token-plan",authModes:["apiKey"],productLabel:"Kimi Coding",runtimeProviderIds:["kimi"],credentialPrefixHints:["sk-kimi-"],baseUrl:oA,anthropicBaseUrl:aA,quotaStrategy:"subscription",quotaUrl:ns,consoleUrl:ns,subscriptionUrl:ns,usagePolicyUrl:iA}),fd({id:"api-platform",label:"API 平台",kind:"api-platform",authModes:["apiKey"],productLabel:"Moonshot AI",runtimeProviderIds:["kimi"],credentialPrefixHints:["sk-"],baseUrl:uA,quotaStrategy:"console",quotaUrl:ud,consoleUrl:sA,subscriptionUrl:ud,usagePolicyUrl:lA})],bailian:[to({id:"pay-as-you-go",label:"Pay as You Go",kind:"api-platform",runtimeProviderIds:["bailian"],credentialPrefixHints:["sk-"],region:"cn",baseUrl:"https://dashscope.aliyuncs.com/compatible-mode/v1",anthropicBaseUrl:"https://dashscope.aliyuncs.com/apps/anthropic",quotaStrategy:"console",consoleUrl:$i,usagePolicyUrl:eo}),to({id:"token-plan",label:"Token Plan Personal",kind:"token-plan",runtimeProviderIds:["bailian-token-plan"],credentialPrefixHints:["sk-"],region:"cn-beijing",baseUrl:"https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1",anthropicBaseUrl:"https://token-plan.cn-beijing.maas.aliyuncs.com/apps/anthropic",quotaStrategy:"subscription",consoleUrl:$i,usagePolicyUrl:eo}),to({id:"token-plan-team",label:"Token Plan Team",kind:"token-plan",runtimeProviderIds:["bailian-token-plan"],credentialPrefixHints:["sk-"],region:"cn-beijing",baseUrl:"https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1",anthropicBaseUrl:"https://token-plan.cn-beijing.maas.aliyuncs.com/apps/anthropic",quotaStrategy:"subscription",consoleUrl:$i,usagePolicyUrl:eo}),to({id:"coding-plan",label:"Coding Plan Pro",kind:"token-plan",runtimeProviderIds:["bailian-coding-plan"],credentialPrefixHints:["sk-sp-"],region:"cn",baseUrl:"https://coding.dashscope.aliyuncs.com/v1",anthropicBaseUrl:"https://coding.dashscope.aliyuncs.com/apps/anthropic",quotaStrategy:"subscription",consoleUrl:$i,usagePolicyUrl:eo})],deepseek:[{id:"api-platform",label:"API 平台",kind:"api-platform",lifecycle:"active",authModes:["apiKey"],productLabel:"DeepSeek",runtimeProviderIds:["deepseek"],credentialPrefixHints:["sk-"],consoleUrl:"https://platform.deepseek.com/api_keys",subscriptionUrl:"https://platform.deepseek.com/usage",endpoints:[{protocol:"chatCompletions",baseUrl:"https://api.deepseek.com/v1"}],modelDiscovery:{strategy:"openaiCompatible",path:"/models",endpointProtocol:"chatCompletions"},quota:{strategy:"console",url:"https://platform.deepseek.com/usage"},usagePolicyUrl:"https://cdn.deepseek.com/policies/en-US/deepseek-open-platform-terms-of-use.html",region:"global"}],zhipu:[{id:"api-platform",label:"API 平台",kind:"api-platform",lifecycle:"active",authModes:["apiKey"],productLabel:"智谱 AI",runtimeProviderIds:["zhipu"],credentialPrefixHints:["id."],consoleUrl:cd,subscriptionUrl:"https://open.bigmodel.cn/finance-center/expense-manage",endpoints:[{protocol:"chatCompletions",baseUrl:cA,region:"cn"}],modelDiscovery:{strategy:"openaiCompatible",path:"/models",endpointProtocol:"chatCompletions"},quota:{strategy:"console",url:"https://open.bigmodel.cn/finance-center/expense-manage"},usagePolicyUrl:dd,region:"cn"},{id:"coding-plan",label:"GLM Coding Plan",kind:"token-plan",lifecycle:"active",authModes:["apiKey"],productLabel:"智谱 AI",runtimeProviderIds:["zhipu"],credentialPrefixHints:["id."],consoleUrl:cd,subscriptionUrl:"https://bigmodel.cn/glm-coding",endpoints:[{protocol:"chatCompletions",baseUrl:dA,region:"cn"}],modelDiscovery:{strategy:"openaiCompatible",path:"/models",endpointProtocol:"chatCompletions"},quota:{strategy:"subscription",url:"https://bigmodel.cn/glm-coding"},usagePolicyUrl:dd,region:"cn"}]};function fd(e){return{id:e.id,label:e.label,kind:e.kind,lifecycle:"active",authModes:e.authModes,productLabel:e.productLabel,runtimeProviderIds:e.runtimeProviderIds,credentialPrefixHints:e.credentialPrefixHints,consoleUrl:e.consoleUrl,subscriptionUrl:e.subscriptionUrl,endpoints:cp(e.baseUrl,e.anthropicBaseUrl,"cn"),modelDiscovery:{strategy:"openaiCompatible",path:"/models",endpointProtocol:"chatCompletions"},quota:{strategy:e.quotaStrategy,url:e.quotaUrl},usagePolicyUrl:e.usagePolicyUrl,region:"cn"}}function to(e){return{id:e.id,label:e.label,lifecycle:"active",productLabel:"Alibaba Bailian",kind:e.kind,authModes:["apiKey"],runtimeProviderIds:e.runtimeProviderIds,credentialPrefixHints:e.credentialPrefixHints,consoleUrl:e.consoleUrl,subscriptionUrl:e.consoleUrl,endpoints:cp(e.baseUrl,e.anthropicBaseUrl,e.region),modelDiscovery:{strategy:"openaiCompatible",path:"/models",endpointProtocol:"chatCompletions"},quota:{strategy:e.quotaStrategy,url:e.consoleUrl},usagePolicyUrl:e.usagePolicyUrl,region:e.region}}function cp(e,t,r){return[{protocol:"chatCompletions",baseUrl:e,region:r},...t?[{protocol:"anthropic",baseUrl:t,region:r}]:[]]}function hA(e){return e.some(t=>t.health==="expired"||t.health==="invalid")?"attention":e.some(t=>t.enabled)?"available":e.length>0?"configured":"unconfigured"}function pi(e){switch(e){case"openai":return"OpenAI";case"anthropic":return"Anthropic";case"kimi":return"Kimi";case"bailian":return"百炼";case"deepseek":return"DeepSeek";case"zhipu":return"智谱 AI";case"ollama":return"Ollama";case"custom":return"Custom"}}function bo(e,t){return e==="openai"&&(t==="local"||t==="oauth"||t==="deviceCode")||e==="kimi"&&(t==="oauth"||t==="deviceCode")?"official-subscription":e==="bailian"?"pay-as-you-go":e==="custom"?"openai-compatible":"api-platform"}function hd(e,t){const r=up(e).find(i=>i.id===(t??bo(e,"apiKey")));if(!r)return;const n=r.modelDiscovery?.endpointProtocol;return r.endpoints?.find(i=>i.protocol===n)?.baseUrl??r.endpoints?.[0]?.baseUrl}function pA(e,t,r,n){const i=dp(e,t,r,n),o=we(i?.apiKey);if(o)return o.length<=8?`${o.slice(0,2)}…`:`${o.slice(0,3)}...${o.slice(-4)}`}function dp(e,t,r,n){if(!(typeof n!="string"||!n.trim()))try{const i=JSON.parse(n);if(i.algorithm!=="PLAINTEXT"||i.webId!==e.webId||i.provider!==t)return;const o=Pe.buildIri(e.podUrl,{id:r});if(i.credentialIri!==o)return;const a=i.encoding==="base64"?yA(String(i.ciphertext)):JSON.parse(String(i.ciphertext));return ir(a)}catch{return}}function yA(e){const t=atob(e),r=Uint8Array.from(t,n=>n.charCodeAt(0));return JSON.parse(new TextDecoder().decode(r))}function Kl(e){const t=Qr(e),r=Ft(t);return r||hi.find(n=>t?.startsWith(`${n}-`))}function Wl(e){const t=Qr(e);if(t&&!t.startsWith("custom-instance-")){if(t==="bailian-token-plan-personal")return"token-plan";if(t==="bailian-token-plan-team")return"token-plan-team";if(t==="bailian-coding-plan-pro")return"coding-plan";if(t==="bailian-pay-as-you-go")return"pay-as-you-go";for(const r of hi)if(t.startsWith(`${r}-`))return t.slice(r.length+1)}}function bA(e){const t=/\/([^/#]+)\.ttl#/u.exec(e);return Ft(t?.[1])}function Ft(e){if(typeof e!="string"||!e.trim())return;const t=e.trim().toLowerCase();if(t==="zhipu"||t.startsWith("zhipu-"))return"zhipu";if(hi.includes(t))return t;for(const r of hi)if(t.startsWith(`${r}-`)||r==="bailian"&&(t==="bailian-token-plan"||t==="bailian-coding-plan"))return r}function is(e){if(e==null||!e.trim())return;let t;try{t=new URL(e.trim())}catch{throw new Error("invalid_proxy_url")}if(!["http:","https:"].includes(t.protocol)||t.username||t.password||t.hash||!t.hostname)throw new Error("invalid_proxy_url");return t.toString().replace(/\/$/u,"")}function gA(e){if(e==null||!e.trim())return;let t;try{t=new URL(e.trim())}catch{return}if(!(!["http:","https:"].includes(t.protocol)||!t.hostname))return t.username="",t.password="",t.search="",t.hash="",t.toString().replace(/\/$/u,"")}function Ar(e){if(!e)return;const t=e.split("#",1)[0]??e,r=t.split("/").filter(Boolean).at(-1)??t;if(!r)return;const n=r.endsWith(".ttl")?r:`${r}.ttl`,i=e.indexOf("#");return i<0?n:`${n}${e.slice(i)}`}function Qr(e){const t=Ar(e);if(t)return(t.split("#",1)[0]??t).replace(/\.ttl$/u,"")}function mA(e){if(e==="oauth"||e==="deviceCode"||e==="apiKey"||e==="local")return e;if(e==="deviceCodeOAuth")return"deviceCode"}function wA(e){if(e==="healthy"||e==="expired"||e==="invalid"||e==="unknown")return e;if(e==="reauthRequired")return"expired";if(e==="disabled")return"unknown"}function ir(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:void 0}function we(e){return typeof e=="string"&&e.trim()?e:void 0}function pd(e){if(typeof e=="number"&&Number.isFinite(e))return e;if(typeof e=="string"&&e.trim()){const t=Number(e);return Number.isFinite(t)?t:void 0}}function yd(e){if(typeof e=="boolean")return e;if(e==="true")return!0;if(e==="false")return!1}function _A(e){return e instanceof Date?e.toISOString():we(e)}function oi(e){return e!==void 0}const fp=ow(),bd=fp.manifest.contributes.applets[0]?.appId,hp=bd?fp.applets[bd]:void 0;if(!hp)throw new Error("AI Connection extension did not contribute an applet");const AA=hp;function gd(e){switch(e.state.status){case"loading":return{status:"initializing"};case"anonymous":return{status:"anonymous"};case"authenticated":return{status:"authenticated",webId:e.state.webId};case"expired":return e.state.webId?{status:"expired",webId:e.state.webId}:{status:"expired"};case"error":return e.state.webId?{status:"error",webId:e.state.webId,error:e.state.error}:{status:"error",error:e.state.error}}}function vA(e){const t=xp({runtime:e}),r=e.currentPod?.podUrl??e.selectedStorage?.storageUrl??e.podUrl,n=e.currentPod?{status:"ready",current:e.currentPod}:e.podError?{status:"error",error:e.podError.error}:e.state.status==="authenticated"?{status:"opening"}:e.state.status==="error"?{status:"error",error:e.state.error}:{status:"unavailable"},i=window.fetch.bind(window);return{solid:{session:{getSnapshot:()=>gd(e),subscribe:o=>e.session.subscribe(()=>{o(gd(e))}),fetch:e.fetch},pod:n,permissions:{...Ib({fetch:e.fetch})},requireLogin:async()=>{await t.startLogin()}},navigation:{openExternal:async o=>{window.open(o,"_blank","noopener,noreferrer")}},capabilities:{aiConnectionsPodStore:e.currentPod?B_({database:e.currentPod.database,authenticatedFetch:e.fetch,podUrl:e.currentPod.podUrl,webId:e.currentPod.webId,openAiSubscriptionImportAvailable:globalThis.xpodDesktop!==void 0}):void 0,aiClientConfiguration:r&&(globalThis.xpodDesktop!==void 0||e.aiClientConfiguration?.available===!0&&e.aiClientConfiguration.authority==="local-filesystem")?Mp({podUrl:r,authenticatedFetch:e.fetch,invocationFetch:i}):void 0}}}function SA(e){const t=te.useMemo(()=>vA(e),[e]);return te.useMemo(()=>{const r=Ob(AA,t);if(r.layout!=="two-pane")throw new Error("AI Connection applet must use a two-pane layout");return r},[t])}function zA(){const e=Ip(),t=SA(e);return m.jsx(Tp,{listHeader:t.slots.listHeader,list:t.slots.list,mainHeader:t.slots.mainHeader,main:t.slots.main,mode:"auto"})}export{zA as default};