@undefineds.co/xpod 0.4.12 → 0.4.14

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 (272) hide show
  1. package/config/components-ignore.json +11 -7
  2. package/dist/acceptance/QleverSemanticConformance.js +7 -0
  3. package/dist/api/ai-gateway/providers/OfferingAuthorization.d.ts +6 -1
  4. package/dist/api/ai-gateway/providers/OfferingAuthorization.js +0 -3
  5. package/dist/api/ai-gateway/providers/ProviderRegistry.js +1 -1
  6. package/dist/api/container/index.js +1 -0
  7. package/dist/api/container/local.js +30 -12
  8. package/dist/api/container/routes.js +2 -0
  9. package/dist/api/container/types.d.ts +2 -0
  10. package/dist/api/handlers/AdminHandler.d.ts +17 -1
  11. package/dist/api/handlers/AdminHandler.js +40 -3
  12. package/dist/api/handlers/EdgeNodeSignalHandler.js +10 -2
  13. package/dist/api/handlers/NetworkSettingsHandler.d.ts +37 -5
  14. package/dist/api/handlers/NetworkSettingsHandler.js +39 -11
  15. package/dist/api/handlers/ProvisionHandler.d.ts +6 -1
  16. package/dist/api/handlers/ProvisionHandler.js +7 -2
  17. package/dist/api/handlers/ReachabilityHandler.d.ts +6 -0
  18. package/dist/api/handlers/ReachabilityHandler.js +22 -5
  19. package/dist/api/network/NetworkEnvironmentConfigurationStore.d.ts +6 -1
  20. package/dist/api/network/NetworkEnvironmentConfigurationStore.js +72 -16
  21. package/dist/api/runtime.d.ts +9 -0
  22. package/dist/api/runtime.js +15 -2
  23. package/dist/cli/commands/start.d.ts +19 -1
  24. package/dist/cli/commands/start.js +71 -5
  25. package/dist/components/context.jsonld +30 -0
  26. package/dist/edge/EdgeNodeAgent.d.ts +6 -0
  27. package/dist/edge/EdgeNodeAgent.js +1 -1
  28. package/dist/edge/EdgeNodeAgentInitializer.d.ts +2 -0
  29. package/dist/edge/EdgeNodeAgentInitializer.js +1 -0
  30. package/dist/edge/EdgeNodeAgentInitializer.jsonld +19 -0
  31. package/dist/edge/EdgeNodeDnsCoordinator.d.ts +11 -1
  32. package/dist/edge/EdgeNodeDnsCoordinator.js +12 -2
  33. package/dist/edge/EdgeNodeHealthProbeService.d.ts +15 -0
  34. package/dist/edge/EdgeNodeHealthProbeService.js +44 -12
  35. package/dist/edge/EdgeNodeHealthProbeService.jsonld +77 -0
  36. package/dist/edge/ProbeTargetGuard.d.ts +35 -0
  37. package/dist/edge/ProbeTargetGuard.js +142 -0
  38. package/dist/edge/reachability/NodeAccessResolver.d.ts +16 -0
  39. package/dist/edge/reachability/NodeAccessResolver.js +30 -0
  40. package/dist/index.d.ts +3 -1
  41. package/dist/index.js +9 -3
  42. package/dist/main.js +7 -0
  43. package/dist/runtime/Proxy.d.ts +22 -0
  44. package/dist/runtime/Proxy.js +34 -7
  45. package/dist/runtime/bootstrap.d.ts +11 -0
  46. package/dist/runtime/bootstrap.js +21 -1
  47. package/dist/runtime/css-process.d.ts +1 -0
  48. package/dist/runtime/css-process.js +1 -0
  49. package/dist/runtime/host/node/NodeRuntimeHost.js +4 -1
  50. package/dist/runtime/host/types.d.ts +6 -0
  51. package/dist/runtime/index.d.ts +1 -1
  52. package/dist/runtime/index.js +5 -1
  53. package/dist/runtime/lifecycle.js +1 -0
  54. package/dist/runtime/port-finder.d.ts +30 -0
  55. package/dist/runtime/port-finder.js +83 -0
  56. package/dist/runtime/runner/node/NodeGatewayRuntimeRunner.js +1 -0
  57. package/dist/runtime/runner/types.d.ts +5 -0
  58. package/dist/runtime/runtime-types.d.ts +1 -0
  59. package/dist/storage/rdf/PostgresRdfEngine.js +10 -4
  60. package/dist/storage/rdf/RdfAccessScope.js +15 -1
  61. package/dist/storage/rdf/RdfEngineRdfJsSource.js +10 -2
  62. package/dist/test-utils/local-managed-client-p2p-e2e-smoke.js +1 -1
  63. package/dist/tunnel/LocalTunnelProvider.d.ts +15 -0
  64. package/dist/tunnel/LocalTunnelProvider.js +87 -18
  65. package/dist/tunnel/LocalTunnelProvider.jsonld +27 -0
  66. package/dist/tunnel/NgrokTunnelProvider.d.ts +4 -0
  67. package/dist/tunnel/NgrokTunnelProvider.js +117 -43
  68. package/dist/tunnel/NgrokTunnelProvider.jsonld +4 -0
  69. package/dist/tunnel/SakuraFrpTunnelProvider.d.ts +65 -3
  70. package/dist/tunnel/SakuraFrpTunnelProvider.js +268 -25
  71. package/dist/tunnel/TunnelLifecycle.d.ts +14 -0
  72. package/dist/tunnel/TunnelLifecycle.js +34 -0
  73. package/dist/tunnel/TunnelProfiles.d.ts +33 -3
  74. package/dist/tunnel/TunnelProfiles.js +105 -78
  75. package/dist/tunnel/TunnelProvider.d.ts +15 -2
  76. package/dist/tunnel/TunnelProvider.jsonld +8 -0
  77. package/dist/tunnel/TunnelProviderCatalog.d.ts +62 -0
  78. package/dist/tunnel/TunnelProviderCatalog.js +130 -0
  79. package/node_modules/@undefineds.co/ai-connections/dist/AiApiKeyPool.d.ts +1 -1
  80. package/node_modules/@undefineds.co/ai-connections/dist/AiApiKeyPool.js +1 -1
  81. package/node_modules/@undefineds.co/ai-connections/dist/AiAuthorizationActions.d.ts +1 -1
  82. package/node_modules/@undefineds.co/ai-connections/dist/AiClientConfigurationSection.d.ts +1 -1
  83. package/node_modules/@undefineds.co/ai-connections/dist/AiClientConfigurationSection.js +3 -3
  84. package/node_modules/@undefineds.co/ai-connections/dist/AiConnectDialog.d.ts +1 -1
  85. package/node_modules/@undefineds.co/ai-connections/dist/AiConnectionsPanel.d.ts +1 -1
  86. package/node_modules/@undefineds.co/ai-connections/dist/AiConnectionsPanel.js +2 -2
  87. package/node_modules/@undefineds.co/ai-connections/dist/AiCredentialPoolSection.d.ts +1 -1
  88. package/node_modules/@undefineds.co/ai-connections/dist/AiCredentialRow.d.ts +1 -1
  89. package/node_modules/@undefineds.co/ai-connections/dist/AiCustomProviderDialog.d.ts +1 -1
  90. package/node_modules/@undefineds.co/ai-connections/dist/AiGatewayKeyRow.d.ts +1 -1
  91. package/node_modules/@undefineds.co/ai-connections/dist/AiGatewayKeysSection.d.ts +1 -1
  92. package/node_modules/@undefineds.co/ai-connections/dist/AiGatewayModelsSection.d.ts +1 -1
  93. package/node_modules/@undefineds.co/ai-connections/dist/AiOfferingDetails.d.ts +1 -1
  94. package/node_modules/@undefineds.co/ai-connections/dist/AiProviderCard.d.ts +1 -1
  95. package/node_modules/@undefineds.co/ai-connections/dist/AiQuotaCard.d.ts +1 -1
  96. package/node_modules/@undefineds.co/ai-connections/dist/AiSortableCredentialList.d.ts +1 -1
  97. package/node_modules/@undefineds.co/ai-connections/dist/authorization-methods.d.ts +13 -11
  98. package/node_modules/@undefineds.co/ai-connections/dist/authorization-methods.js +16 -13
  99. package/node_modules/@undefineds.co/ai-connections/dist/collection-runtime.d.ts +1 -1
  100. package/node_modules/@undefineds.co/ai-connections/dist/collection-runtime.js +3 -3
  101. package/node_modules/@undefineds.co/ai-connections/dist/collections.d.ts +1 -1
  102. package/node_modules/@undefineds.co/ai-connections/dist/collections.js +3 -3
  103. package/node_modules/@undefineds.co/ai-connections/dist/{ai-connections-client.d.ts → contract/ai-connections-client.d.ts} +4 -2
  104. package/node_modules/@undefineds.co/ai-connections/dist/{ai-connections-client.js → contract/ai-connections-client.js} +4 -2
  105. package/node_modules/@undefineds.co/ai-connections/dist/{client → contract/client}/normalize.d.ts +17 -7
  106. package/node_modules/@undefineds.co/ai-connections/dist/{client → contract/client}/normalize.js +18 -213
  107. package/node_modules/@undefineds.co/ai-connections/dist/{client → contract/client}/request.js +3 -3
  108. package/node_modules/@undefineds.co/ai-connections/dist/{client → contract/client}/types.d.ts +11 -2
  109. package/node_modules/@undefineds.co/ai-connections/dist/{client-config → contract/client-config}/index.cjs +8 -8
  110. package/node_modules/@undefineds.co/ai-connections/dist/contract/index.d.ts +9 -0
  111. package/node_modules/@undefineds.co/ai-connections/dist/contract/index.js +9 -0
  112. package/node_modules/@undefineds.co/ai-connections/dist/{provider-catalog.cjs → contract/provider-catalog.cjs} +5 -28
  113. package/node_modules/@undefineds.co/ai-connections/dist/{provider-catalog.d.ts → contract/provider-catalog.d.ts} +9 -8
  114. package/node_modules/@undefineds.co/ai-connections/dist/{provider-catalog.js → contract/provider-catalog.js} +11 -31
  115. package/node_modules/@undefineds.co/ai-connections/dist/controller.d.ts +1 -1
  116. package/node_modules/@undefineds.co/ai-connections/dist/controller.js +3 -2
  117. package/node_modules/@undefineds.co/ai-connections/dist/credential-labels.d.ts +1 -1
  118. package/node_modules/@undefineds.co/ai-connections/dist/display-wording.d.ts +20 -0
  119. package/node_modules/@undefineds.co/ai-connections/dist/display-wording.js +73 -0
  120. package/node_modules/@undefineds.co/ai-connections/dist/error-wording.d.ts +24 -0
  121. package/node_modules/@undefineds.co/ai-connections/dist/error-wording.js +253 -0
  122. package/node_modules/@undefineds.co/ai-connections/dist/gateway-endpoints.js +1 -1
  123. package/node_modules/@undefineds.co/ai-connections/dist/index.d.ts +2 -3
  124. package/node_modules/@undefineds.co/ai-connections/dist/index.js +2 -3
  125. package/node_modules/@undefineds.co/ai-connections/dist/offering-endpoints.d.ts +1 -1
  126. package/node_modules/@undefineds.co/ai-connections/dist/offering-label.d.ts +1 -1
  127. package/node_modules/@undefineds.co/ai-connections/dist/provider-visuals.d.ts +1 -1
  128. package/node_modules/@undefineds.co/ai-connections/dist/service-access.js +1 -1
  129. package/node_modules/@undefineds.co/ai-connections/dist/useAiConnectDialog.d.ts +1 -1
  130. package/node_modules/@undefineds.co/ai-connections/package.json +25 -18
  131. package/node_modules/@undefineds.co/shared-ui/dist/index.d.ts +4 -2
  132. package/node_modules/@undefineds.co/shared-ui/dist/index.js +4 -2
  133. package/node_modules/@undefineds.co/shared-ui/dist/login/LoginModal.d.ts +4 -1
  134. package/node_modules/@undefineds.co/shared-ui/dist/login/LoginModal.js +12 -6
  135. package/node_modules/@undefineds.co/shared-ui/dist/login/LoginView.d.ts +1 -1
  136. package/node_modules/@undefineds.co/shared-ui/dist/login/host-types.d.ts +7 -1
  137. package/node_modules/@undefineds.co/shared-ui/dist/login/login-branding.d.ts +6 -0
  138. package/node_modules/@undefineds.co/shared-ui/dist/login/login-branding.js +18 -0
  139. package/node_modules/@undefineds.co/shared-ui/dist/user-facing-errors.d.ts +14 -2
  140. package/node_modules/@undefineds.co/shared-ui/dist/user-facing-errors.js +26 -17
  141. package/node_modules/@undefineds.co/solid-sdk/dist/login-store.d.ts +3 -3
  142. package/node_modules/@undefineds.co/solid-sdk/dist/login-store.js +3 -3
  143. package/package.json +4 -3
  144. package/static/auth-callback/assets/{AiConfigContext-DnQs1ZpW.js → AiConfigContext-DCXpjzpj.js} +1 -1
  145. package/static/auth-callback/assets/{AiConfigPage-DOtvlxH0.js → AiConfigPage-fe-xMIXa.js} +1 -1
  146. package/static/auth-callback/assets/{DocumentProcessingPanel-BS2voQgL.js → DocumentProcessingPanel-BGnkfMuU.js} +1 -1
  147. package/static/auth-callback/assets/{IndexLifecyclePanel-Cvt0cJtN.js → IndexLifecyclePanel-42Jups0j.js} +1 -1
  148. package/static/auth-callback/assets/{IndexSubjectPanel-Dhf01GqF.js → IndexSubjectPanel-CYyLOlQU.js} +1 -1
  149. package/static/auth-callback/assets/{ModelAssignmentsPanel-BJutWaAF.js → ModelAssignmentsPanel-BOvUH4yr.js} +1 -1
  150. package/static/auth-callback/assets/{ModelsPage-BRS0sje3.js → ModelsPage-DwyITxt7.js} +6 -6
  151. package/static/auth-callback/assets/NetworkPage-CG9RelJA.js +2 -0
  152. package/static/auth-callback/assets/{PaneListHeader-QQeJGTp4.js → PaneListHeader-yvd5ohs6.js} +1 -1
  153. package/static/auth-callback/assets/{SearchIndexingPanel-MyNUSEwT.js → SearchIndexingPanel-2_a6ezzj.js} +1 -1
  154. package/static/auth-callback/assets/{StatusSubjectPanel-DQkEVsFs.js → StatusSubjectPanel-8qtVxnzC.js} +1 -1
  155. package/static/auth-callback/assets/{StatusWorkspace-Dkv63Uwk.js → StatusWorkspace-CBdRahCF.js} +1 -1
  156. package/static/auth-callback/assets/{SystemSettingsPage-TIsUfX5d.js → SystemSettingsPage-BZJ6vWkg.js} +1 -1
  157. package/static/auth-callback/assets/{SystemSettingsSubjectPanel-BJWEt2-7.js → SystemSettingsSubjectPanel-xm08UhXP.js} +1 -1
  158. package/static/auth-callback/assets/XpodAiConnectionsPodStore-V6vgGfuw.js +3 -0
  159. package/static/auth-callback/assets/{activity-5hNeNKnL.js → activity-CeM7xly8.js} +1 -1
  160. package/static/auth-callback/assets/ai-connections-C6yaE6WQ.js +1 -0
  161. package/static/auth-callback/assets/{auth-callback-CAFZ3R0B.js → auth-callback-DTG8cSj7.js} +3 -3
  162. package/static/auth-callback/assets/{badge-CAIPI0CB.js → badge-qJo2Zr4d.js} +1 -1
  163. package/static/auth-callback/assets/{collection-runtime-D9s7h9YA.js → collection-runtime-Bztsz31a.js} +1 -1
  164. package/static/auth-callback/assets/{dialog-BjA109aX.js → dialog-D-h6x5x0.js} +1 -1
  165. package/static/auth-callback/assets/{download-B3Up5W2G.js → download-C2ir4lmR.js} +1 -1
  166. package/static/auth-callback/assets/{external-link-BTXgSPzB.js → external-link-THLDL4On.js} +1 -1
  167. package/static/auth-callback/assets/{index-CirW4CJf.js → index-BRpv4yO3.js} +1 -1
  168. package/static/auth-callback/assets/{index-BppXlxcp.js → index-BlVZb9A7.js} +1 -1
  169. package/static/auth-callback/assets/index-D983R1FV.js +4 -0
  170. package/static/auth-callback/assets/{index-browser-DtU38ni3.js → index-browser-3FvR0aaf.js} +1 -1
  171. package/static/auth-callback/assets/{key-round-CQCOrZ7x.js → key-round-C9U5j1Ly.js} +1 -1
  172. package/static/auth-callback/assets/{rotate-ccw-C1zM2KtS.js → rotate-ccw-DP45cD4o.js} +1 -1
  173. package/static/auth-callback/assets/{skeleton-Cqp7_M9-.js → skeleton-Dn4EiSCS.js} +1 -1
  174. package/static/auth-callback/assets/{waypoints-Bj6gAUSQ.js → waypoints-uqFQ3uEG.js} +1 -1
  175. package/static/auth-callback/assets/{workspace-layout-DK8mDzrY.js → workspace-layout-DLYK0Wwu.js} +1 -1
  176. package/static/auth-callback/auth-callback.html +1 -1
  177. package/static/dashboard/assets/{AiConfigContext-BsE7MqX8.js → AiConfigContext-DJcMECNw.js} +1 -1
  178. package/static/dashboard/assets/{AiConfigPage-DvM-lRXa.js → AiConfigPage-BvE7dOTy.js} +1 -1
  179. package/static/dashboard/assets/{DocumentProcessingPanel-BPfdlfuf.js → DocumentProcessingPanel-D9780krf.js} +1 -1
  180. package/static/dashboard/assets/{IndexLifecyclePanel--m0AGxvh.js → IndexLifecyclePanel-SjsUcnbM.js} +1 -1
  181. package/static/dashboard/assets/{IndexSubjectPanel-Bb7m1k3d.js → IndexSubjectPanel-C-ym2Tqi.js} +1 -1
  182. package/static/dashboard/assets/{ModelAssignmentsPanel-BLi_zbMa.js → ModelAssignmentsPanel-BRjZ-arB.js} +1 -1
  183. package/static/dashboard/assets/{ModelsPage-CxdpgnfR.js → ModelsPage-BtTU6du3.js} +6 -6
  184. package/static/dashboard/assets/NetworkPage-CV9qpkDg.js +2 -0
  185. package/static/dashboard/assets/{PaneListHeader-BBCMei0r.js → PaneListHeader-KyPTTBsv.js} +1 -1
  186. package/static/dashboard/assets/{SearchIndexingPanel-Ck4Y-xjR.js → SearchIndexingPanel-DolHGawg.js} +1 -1
  187. package/static/dashboard/assets/{StatusSubjectPanel-D1KWfAXE.js → StatusSubjectPanel-_YZvKiYi.js} +1 -1
  188. package/static/dashboard/assets/{StatusWorkspace-JbA5gzXx.js → StatusWorkspace-Dlbh_G40.js} +1 -1
  189. package/static/dashboard/assets/{SystemSettingsPage-BbwQWsSR.js → SystemSettingsPage-Be7QSIoz.js} +1 -1
  190. package/static/dashboard/assets/{SystemSettingsSubjectPanel-N117nMt5.js → SystemSettingsSubjectPanel-DBp0gja7.js} +1 -1
  191. package/static/dashboard/assets/{XpodAiConnectionsPodStore-CdDOb4SV.js → XpodAiConnectionsPodStore-ClpSjzpP.js} +7 -7
  192. package/static/dashboard/assets/{activity-DX1I96o_.js → activity-lsNbTXJu.js} +1 -1
  193. package/static/dashboard/assets/ai-connections-CXp5gd1J.js +1 -0
  194. package/static/dashboard/assets/{badge-k2vhtDqH.js → badge-CVatKjaG.js} +1 -1
  195. package/static/dashboard/assets/{collection-runtime-BFQ8teQJ.js → collection-runtime-Ec4UnY28.js} +1 -1
  196. package/static/dashboard/assets/{dashboard-DWZ-fmCT.js → dashboard-BEzsRsvF.js} +2 -2
  197. package/static/dashboard/assets/{dialog-1CCw-iHT.js → dialog-BuyelQ4V.js} +1 -1
  198. package/static/dashboard/assets/{download-C6-SNY1q.js → download-B4Nf678F.js} +1 -1
  199. package/static/dashboard/assets/{external-link-BgPcZ_j2.js → external-link-PYv9CvKL.js} +1 -1
  200. package/static/dashboard/assets/index-C9XPE-mI.js +4 -0
  201. package/static/dashboard/assets/{index-D7A8U6Pt.js → index-Cx69bTNh.js} +1 -1
  202. package/static/dashboard/assets/{index-6LcIUIYO.js → index-awr7ulur.js} +1 -1
  203. package/static/dashboard/assets/{key-round-BOd7Jo0Q.js → key-round-VsY80U1Z.js} +1 -1
  204. package/static/dashboard/assets/{rotate-ccw-CCgJqsvx.js → rotate-ccw-Cz1K4vE9.js} +1 -1
  205. package/static/dashboard/assets/{skeleton-Bc7abAn5.js → skeleton-BhNv_8tO.js} +1 -1
  206. package/static/dashboard/assets/{waypoints-s-opmJxx.js → waypoints-DYS9XFYV.js} +1 -1
  207. package/static/dashboard/assets/{workspace-layout-DqIQeTBV.js → workspace-layout-OZJAFx5V.js} +1 -1
  208. package/static/dashboard/dashboard.html +1 -1
  209. package/static/settings/assets/{AiConfigContext-BB9KZySa.js → AiConfigContext-B8JS3MXF.js} +1 -1
  210. package/static/settings/assets/{AiConfigPage-DGSXUkLs.js → AiConfigPage-C3Zl8LUl.js} +1 -1
  211. package/static/settings/assets/{DocumentProcessingPanel-Da2Re6Rg.js → DocumentProcessingPanel-DpDZAQvf.js} +1 -1
  212. package/static/settings/assets/{IndexLifecyclePanel-BSZuIzgr.js → IndexLifecyclePanel-Ec1XF88t.js} +1 -1
  213. package/static/settings/assets/{IndexSubjectPanel-CFd0ay-r.js → IndexSubjectPanel-BulT9BmO.js} +1 -1
  214. package/static/settings/assets/{ModelAssignmentsPanel-CSAryvWJ.js → ModelAssignmentsPanel-BcGSmYjb.js} +1 -1
  215. package/static/settings/assets/{ModelsPage-BQwCwLHU.js → ModelsPage-CvTCKy1T.js} +6 -6
  216. package/static/settings/assets/NetworkPage-DQF5u9Bn.js +2 -0
  217. package/static/settings/assets/{PaneListHeader-Bjh3hRdQ.js → PaneListHeader-D40hqcVl.js} +1 -1
  218. package/static/settings/assets/{SearchIndexingPanel-MjKL5QLU.js → SearchIndexingPanel-iCUPOx_0.js} +1 -1
  219. package/static/settings/assets/{StatusSubjectPanel-Bvl6K4mx.js → StatusSubjectPanel-E--ZHSql.js} +1 -1
  220. package/static/settings/assets/{StatusWorkspace-B0NzrP--.js → StatusWorkspace-YjDAx1II.js} +1 -1
  221. package/static/settings/assets/{SystemSettingsPage-D2z6Z4FE.js → SystemSettingsPage-CDdV3mC9.js} +1 -1
  222. package/static/settings/assets/{SystemSettingsSubjectPanel-4sxma4X4.js → SystemSettingsSubjectPanel-Br8WazDq.js} +1 -1
  223. package/static/settings/assets/XpodAiConnectionsPodStore-CLr38P_Z.js +3 -0
  224. package/static/settings/assets/{activity-CgJJGpjx.js → activity-C5DAHHTE.js} +1 -1
  225. package/static/settings/assets/ai-connections-C6yaE6WQ.js +1 -0
  226. package/static/settings/assets/{badge-C4NypVyT.js → badge-D8eIyxKt.js} +1 -1
  227. package/static/settings/assets/{collection-runtime-CTLCDxAi.js → collection-runtime-DLc9zil8.js} +1 -1
  228. package/static/settings/assets/{dialog-Csq0vWUi.js → dialog-CyuR7Va4.js} +1 -1
  229. package/static/settings/assets/{download-DaLJJ-Wp.js → download-c0oxZrCz.js} +1 -1
  230. package/static/settings/assets/{external-link--w_iW5Au.js → external-link-D3Z34fP_.js} +1 -1
  231. package/static/settings/assets/{index-BukHiu4y.js → index-CKGbRFlc.js} +1 -1
  232. package/static/settings/assets/index-CSr3-2Cj.js +4 -0
  233. package/static/settings/assets/{index-COmVnZi2.js → index-ComidxAm.js} +1 -1
  234. package/static/settings/assets/{index-browser-BGpvHwD0.js → index-browser-CAscEbae.js} +1 -1
  235. package/static/settings/assets/{key-round-Bk4YRjBu.js → key-round-DyjLmXuB.js} +1 -1
  236. package/static/settings/assets/{rotate-ccw-TCabbqsr.js → rotate-ccw-679HF_ec.js} +1 -1
  237. package/static/settings/assets/{settings-CJWpdbNC.js → settings-DKknqu4C.js} +3 -3
  238. package/static/settings/assets/{skeleton-JDHYVe7t.js → skeleton-CkopNkPB.js} +1 -1
  239. package/static/settings/assets/{waypoints-DDvEl-MU.js → waypoints-CrqfAftE.js} +1 -1
  240. package/static/settings/assets/{workspace-layout-DV5QU30U.js → workspace-layout-UN6c4qTG.js} +1 -1
  241. package/static/settings/settings.html +1 -1
  242. package/static/auth-callback/assets/NetworkPage-B3qBfANA.js +0 -2
  243. package/static/auth-callback/assets/XpodAiConnectionsPodStore-BJiXm-PF.js +0 -3
  244. package/static/auth-callback/assets/ai-connections-CryuHGKW.js +0 -1
  245. package/static/auth-callback/assets/index-DlLYWOhw.js +0 -4
  246. package/static/dashboard/assets/NetworkPage-BAIPw-D_.js +0 -2
  247. package/static/dashboard/assets/ai-connections-DwCRqOQa.js +0 -1
  248. package/static/dashboard/assets/index-UD6QOE7H.js +0 -4
  249. package/static/settings/assets/NetworkPage-BKymvsQc.js +0 -2
  250. package/static/settings/assets/XpodAiConnectionsPodStore-BkNQ8fZx.js +0 -3
  251. package/static/settings/assets/ai-connections-CryuHGKW.js +0 -1
  252. package/static/settings/assets/index-B0mQa59b.js +0 -4
  253. /package/node_modules/@undefineds.co/ai-connections/dist/{client → contract/client}/request.d.ts +0 -0
  254. /package/node_modules/@undefineds.co/ai-connections/dist/{client → contract/client}/types.js +0 -0
  255. /package/node_modules/@undefineds.co/ai-connections/dist/{client-config → contract/client-config}/base-adapter.d.ts +0 -0
  256. /package/node_modules/@undefineds.co/ai-connections/dist/{client-config → contract/client-config}/base-adapter.js +0 -0
  257. /package/node_modules/@undefineds.co/ai-connections/dist/{client-config → contract/client-config}/codex.d.ts +0 -0
  258. /package/node_modules/@undefineds.co/ai-connections/dist/{client-config → contract/client-config}/codex.js +0 -0
  259. /package/node_modules/@undefineds.co/ai-connections/dist/{client-config → contract/client-config}/index.d.ts +0 -0
  260. /package/node_modules/@undefineds.co/ai-connections/dist/{client-config → contract/client-config}/index.js +0 -0
  261. /package/node_modules/@undefineds.co/ai-connections/dist/{client-config → contract/client-config}/json-env-adapter.d.ts +0 -0
  262. /package/node_modules/@undefineds.co/ai-connections/dist/{client-config → contract/client-config}/json-env-adapter.js +0 -0
  263. /package/node_modules/@undefineds.co/ai-connections/dist/{client-config → contract/client-config}/pi.d.ts +0 -0
  264. /package/node_modules/@undefineds.co/ai-connections/dist/{client-config → contract/client-config}/pi.js +0 -0
  265. /package/node_modules/@undefineds.co/ai-connections/dist/{client-config → contract/client-config}/transaction.d.ts +0 -0
  266. /package/node_modules/@undefineds.co/ai-connections/dist/{client-config → contract/client-config}/transaction.js +0 -0
  267. /package/node_modules/@undefineds.co/ai-connections/dist/{client-config → contract/client-config}/types.d.ts +0 -0
  268. /package/node_modules/@undefineds.co/ai-connections/dist/{client-config → contract/client-config}/types.js +0 -0
  269. /package/node_modules/@undefineds.co/ai-connections/dist/{credential-storage.d.ts → contract/credential-storage.d.ts} +0 -0
  270. /package/node_modules/@undefineds.co/ai-connections/dist/{credential-storage.js → contract/credential-storage.js} +0 -0
  271. /package/node_modules/@undefineds.co/ai-connections/dist/{endpoint-urls.d.ts → contract/endpoint-urls.d.ts} +0 -0
  272. /package/node_modules/@undefineds.co/ai-connections/dist/{endpoint-urls.js → contract/endpoint-urls.js} +0 -0
@@ -1 +1 @@
1
- import{r as P,l as ct,V as ye,n as ve,m as Yt,W as be,j as Q,P as Pt}from"./settings-CJWpdbNC.js";var Ae=Object.defineProperty,Re=(t,e)=>Ae(t,"name",{value:e,configurable:!0});function qt(t){const[e,n]=P.useState(void 0);return ct(()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const s=r[0];let i,c;if("borderBoxSize"in s){const l=s.borderBoxSize,a=Array.isArray(l)?l[0]:l;i=a.inlineSize,c=a.blockSize}else i=t.offsetWidth,c=t.offsetHeight;n({width:i,height:c})});return o.observe(t,{box:"border-box"}),()=>o.unobserve(t)}else n(void 0)},[t]),e}Re(qt,"useSize");const Oe=["top","right","bottom","left"],q=Math.min,B=Math.max,at=Math.round,st=Math.floor,j=t=>({x:t,y:t}),Pe={left:"right",right:"left",bottom:"top",top:"bottom"};function Ut(t,e,n){return B(t,q(e,n))}function I(t,e){return typeof t=="function"?t(e):t}function U(t){return t.split("-")[0]}function et(t){return t.split("-")[1]}function Ct(t){return t==="x"?"y":"x"}function St(t){return t==="y"?"height":"width"}function z(t){const e=t[0];return e==="t"||e==="b"?"y":"x"}function Et(t){return Ct(z(t))}function Ce(t,e,n){n===void 0&&(n=!1);const o=et(t),r=Et(t),s=St(r);let i=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(i=ft(i)),[i,ft(i)]}function Se(t){const e=ft(t);return[Rt(t),e,Rt(e)]}function Rt(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const Ft=["left","right"],Ht=["right","left"],Ee=["top","bottom"],Le=["bottom","top"];function De(t,e,n){switch(t){case"top":case"bottom":return n?e?Ht:Ft:e?Ft:Ht;case"left":case"right":return e?Ee:Le;default:return[]}}function Te(t,e,n,o){const r=et(t);let s=De(U(t),n==="start",o);return r&&(s=s.map(i=>i+"-"+r),e&&(s=s.concat(s.map(Rt)))),s}function ft(t){const e=U(t);return Pe[e]+t.slice(e.length)}function $e(t){var e,n,o,r;return{top:(e=t.top)!=null?e:0,right:(n=t.right)!=null?n:0,bottom:(o=t.bottom)!=null?o:0,left:(r=t.left)!=null?r:0}}function Kt(t){return typeof t!="number"?$e(t):{top:t,right:t,bottom:t,left:t}}function ut(t){const{x:e,y:n,width:o,height:r}=t;return{width:o,height:r,top:n,left:e,right:e+o,bottom:n+r,x:e,y:n}}function kt(t,e,n){let{reference:o,floating:r}=t;const s=z(e),i=Et(e),c=St(i),l=U(e),a=s==="y",d=o.x+o.width/2-r.width/2,u=o.y+o.height/2-r.height/2,m=o[c]/2-r[c]/2;let f;switch(l){case"top":f={x:d,y:o.y-r.height};break;case"bottom":f={x:d,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:u};break;case"left":f={x:o.x-r.width,y:u};break;default:f={x:o.x,y:o.y}}const p=et(e);return p&&(f[i]+=m*(p==="end"?1:-1)*(n&&a?-1:1)),f}async function _e(t,e){var n;e===void 0&&(e={});const{x:o,y:r,platform:s,rects:i,elements:c,strategy:l}=t,{boundary:a="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:m=!1,padding:f=0}=I(e,t),p=Kt(f),w=c[m?u==="floating"?"reference":"floating":u],g=ut(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(w)))==null||n?w:w.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:a,rootBoundary:d,strategy:l})),x=u==="floating"?{x:o,y:r,width:i.floating.width,height:i.floating.height}:i.reference,b=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),v=await(s.isElement==null?void 0:s.isElement(b))&&await(s.getScale==null?void 0:s.getScale(b))||{x:1,y:1},A=ut(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:x,offsetParent:b,strategy:l}):x);return{top:(g.top-A.top+p.top)/v.y,bottom:(A.bottom-g.bottom+p.bottom)/v.y,left:(g.left-A.left+p.left)/v.x,right:(A.right-g.right+p.right)/v.x}}const Me=50,We=async(t,e,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:s=[],platform:i}=n,c=i.detectOverflow?i:{...i,detectOverflow:_e},l=await(i.isRTL==null?void 0:i.isRTL(e));let a=await i.getElementRects({reference:t,floating:e,strategy:r}),{x:d,y:u}=kt(a,o,l),m=o,f=0;const p={};for(let h=0;h<s.length;h++){const w=s[h];if(!w)continue;const{name:g,fn:x}=w,{x:b,y:v,data:A,reset:y}=await x({x:d,y:u,initialPlacement:o,placement:m,strategy:r,middlewareData:p,rects:a,platform:c,elements:{reference:t,floating:e}});d=b??d,u=v??u,p[g]={...p[g],...A},y&&f<Me&&(f++,typeof y=="object"&&(y.placement&&(m=y.placement),y.rects&&(a=y.rects===!0?await i.getElementRects({reference:t,floating:e,strategy:r}):y.rects),{x:d,y:u}=kt(a,m,l)),h=-1)}return{x:d,y:u,placement:m,strategy:r,middlewareData:p}},Fe=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:o,placement:r,rects:s,platform:i,elements:c,middlewareData:l}=e,{element:a,padding:d=0}=I(t,e)||{};if(a==null)return{};const u=Kt(d),m={x:n,y:o},f=Et(r),p=St(f),h=await i.getDimensions(a),w=f==="y",g=w?"top":"left",x=w?"bottom":"right",b=w?"clientHeight":"clientWidth",v=s.reference[p]+s.reference[f]-m[f]-s.floating[p],A=m[f]-s.reference[f],y=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a));let O=y?y[b]:0;(!O||!await(i.isElement==null?void 0:i.isElement(y)))&&(O=c.floating[b]||s.floating[p]);const S=v/2-A/2,$=O/2-h[p]/2-1,C=q(u[g],$),H=q(u[x],$),k=O-h[p]-H,T=O/2-h[p]/2+S,E=Ut(C,T,k),W=!l.arrow&&et(r)!=null&&T!==E&&s.reference[p]/2-(T<C?C:H)-h[p]/2<0,L=W?T<C?T-C:T-k:0;return{[f]:m[f]+L,data:{[f]:E,centerOffset:T-E-L,...W&&{alignmentOffset:L}},reset:W}}}),He=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:r,middlewareData:s,rects:i,initialPlacement:c,platform:l,elements:a}=e,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:m,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:h=!0,...w}=I(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const g=U(r),x=z(c),b=U(c)===c,v=await(l.isRTL==null?void 0:l.isRTL(a.floating)),A=m||(b||!h?[ft(c)]:Se(c)),y=p!=="none";!m&&y&&A.push(...Te(c,h,p,v));const O=[c,...A],S=await l.detectOverflow(e,w),$=[];let C=((o=s.flip)==null?void 0:o.overflows)||[];if(d&&$.push(S[g]),u){const E=Ce(r,i,v);$.push(S[E[0]],S[E[1]])}if(C=[...C,{placement:r,overflows:$}],!$.every(E=>E<=0)){var H,k;const E=(((H=s.flip)==null?void 0:H.index)||0)+1,W=O[E];if(W&&(!(u==="alignment"?x!==z(W):!1)||C.every(R=>z(R.placement)===x?R.overflows[0]>0:!0)))return{data:{index:E,overflows:C},reset:{placement:W}};let L=(k=C.filter(_=>_.overflows[0]<=0).sort((_,R)=>_.overflows[1]-R.overflows[1])[0])==null?void 0:k.placement;if(!L)switch(f){case"bestFit":{var T;const _=(T=C.filter(R=>{if(y){const D=z(R.placement);return D===x||D==="y"}return!0}).map(R=>[R.placement,R.overflows.filter(D=>D>0).reduce((D,F)=>D+F,0)]).sort((R,D)=>R[1]-D[1])[0])==null?void 0:T[0];_&&(L=_);break}case"initialPlacement":L=c;break}if(r!==L)return{reset:{placement:L}}}return{}}}};function zt(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Nt(t){return Oe.some(e=>t[e]>=0)}const ke=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n,platform:o}=e,{strategy:r="referenceHidden",...s}=I(t,e);switch(r){case"referenceHidden":{const i=await o.detectOverflow(e,{...s,elementContext:"reference"}),c=zt(i,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:Nt(c)}}}case"escaped":{const i=await o.detectOverflow(e,{...s,altBoundary:!0}),c=zt(i,n.floating);return{data:{escapedOffsets:c,escaped:Nt(c)}}}default:return{}}}}},Zt=new Set(["left","top"]);async function ze(t,e){const{placement:n,platform:o,elements:r}=t,s=await(o.isRTL==null?void 0:o.isRTL(r.floating)),i=U(n),c=et(n),l=z(n)==="y",a=Zt.has(i)?-1:1,d=s&&l?-1:1,u=I(e,t);let{mainAxis:m,crossAxis:f,alignmentAxis:p}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return c&&typeof p=="number"&&(f=c==="end"?p*-1:p),l?{x:f*d,y:m*a}:{x:m*a,y:f*d}}const Ne=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:r,y:s,placement:i,middlewareData:c}=e,l=await ze(e,t);return i===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:r+l.x,y:s+l.y,data:{...l,placement:i}}}}},Ve=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:r,platform:s}=e,{mainAxis:i=!0,crossAxis:c=!1,limiter:l={fn:x=>{let{x:b,y:v}=x;return{x:b,y:v}}},...a}=I(t,e),d={x:n,y:o},u=await s.detectOverflow(e,a),m=z(r),f=Ct(m);let p=d[f],h=d[m];const w=(x,b)=>Ut(b+u[x==="y"?"top":"left"],b,b-u[x==="y"?"bottom":"right"]);i&&(p=w(f,p)),c&&(h=w(m,h));const g=l.fn({...e,[f]:p,[m]:h});return{...g,data:{x:g.x-n,y:g.y-o,enabled:{[f]:i,[m]:c}}}}}},Be=function(t){return t===void 0&&(t={}),{options:t,fn(e){var n,o;const{x:r,y:s,placement:i,rects:c,middlewareData:l}=e,{offset:a=0,mainAxis:d=!0,crossAxis:u=!0}=I(t,e),m={x:r,y:s},f=z(i),p=Ct(f);let h=m[p],w=m[f];const g=I(a,e),x=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:(n=g.mainAxis)!=null?n:0,crossAxis:(o=g.crossAxis)!=null?o:0};if(d){const A=p==="y"?"height":"width",y=c.reference[p]-c.floating[A]+x.mainAxis,O=c.reference[p]+c.reference[A]-x.mainAxis;h<y?h=y:h>O&&(h=O)}if(u){var b,v;const A=p==="y"?"width":"height",y=Zt.has(U(i)),O=c.reference[f]-c.floating[A]+(y&&((b=l.offset)==null?void 0:b[f])||0)+(y?0:x.crossAxis),S=c.reference[f]+c.reference[A]+(y?0:((v=l.offset)==null?void 0:v[f])||0)-(y?x.crossAxis:0);w<O?w=O:w>S&&(w=S)}return{[p]:h,[f]:w}}}},je=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:n,rects:o,platform:r,elements:s}=e,{apply:i=()=>{},...c}=I(t,e),l=await r.detectOverflow(e,c),a=U(n),d=et(n),u=z(n)==="y",{width:m,height:f}=o.floating;let p,h;a==="top"||a==="bottom"?(p=a,h=d===(await(r.isRTL==null?void 0:r.isRTL(s.floating))?"start":"end")?"left":"right"):(h=a,p=d==="end"?"top":"bottom");const w=f-l.top-l.bottom,g=m-l.left-l.right,x=q(f-l[p],w),b=q(m-l[h],g),v=e.middlewareData.shift,A=!v;let y=x,O=b;v!=null&&v.enabled.x&&(O=g),v!=null&&v.enabled.y&&(y=w),A&&!d&&(u?O=m-2*B(l.left,l.right):y=f-2*B(l.top,l.bottom)),await i({...e,availableWidth:O,availableHeight:y});const S=await r.getDimensions(s.floating);return m!==S.width||f!==S.height?{reset:{rects:!0}}:{}}}};function pt(){return typeof window<"u"}function nt(t){return Gt(t)?(t.nodeName||"").toLowerCase():"#document"}function M(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function X(t){var e;return(e=(Gt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Gt(t){return pt()?t instanceof Node||t instanceof M(t).Node:!1}function N(t){return pt()?t instanceof Element||t instanceof M(t).Element:!1}function K(t){return pt()?t instanceof HTMLElement||t instanceof M(t).HTMLElement:!1}function Vt(t){return!pt()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof M(t).ShadowRoot}function mt(t){const{overflow:e,overflowX:n,overflowY:o,display:r}=V(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&r!=="inline"&&r!=="contents"}function Ie(t){return/^(table|td|th)$/.test(nt(t))}function ht(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}const Xe=/transform|translate|scale|rotate|perspective|filter/,Ye=/paint|layout|strict|content/,Z=t=>!!t&&t!=="none";let vt;function Lt(t){const e=N(t)?V(t):t;return Z(e.transform)||Z(e.translate)||Z(e.scale)||Z(e.rotate)||Z(e.perspective)||!Dt()&&(Z(e.backdropFilter)||Z(e.filter))||Xe.test(e.willChange||"")||Ye.test(e.contain||"")}function qe(t){let e=G(t);for(;K(e)&&!ot(e);){if(Lt(e))return e;if(ht(e))return null;e=G(e)}return null}function Dt(){return vt==null&&(vt=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),vt}function ot(t){return/^(html|body|#document)$/.test(nt(t))}function V(t){return M(t).getComputedStyle(t)}function gt(t){return N(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function G(t){if(nt(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Vt(t)&&t.host||X(t);return Vt(e)?e.host:e}function Jt(t){const e=G(t);return ot(e)?(t.ownerDocument||t).body:K(e)&&mt(e)?e:Jt(e)}function rt(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const r=Jt(t),s=r===((o=t.ownerDocument)==null?void 0:o.body),i=M(r);if(s){const c=Ot(i);return e.concat(i,i.visualViewport||[],mt(r)?r:[],c&&n?rt(c):[])}else return e.concat(r,rt(r,[],n))}function Ot(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Qt(t){const e=V(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const r=K(t),s=r?t.offsetWidth:n,i=r?t.offsetHeight:o,c=at(n)!==s||at(o)!==i;return c&&(n=s,o=i),{width:n,height:o,$:c}}function Tt(t){return N(t)?t:t.contextElement}function tt(t){const e=Tt(t);if(!K(e))return j(1);const n=e.getBoundingClientRect(),{width:o,height:r,$:s}=Qt(e);let i=(s?at(n.width):n.width)/o,c=(s?at(n.height):n.height)/r;return(!i||!Number.isFinite(i))&&(i=1),(!c||!Number.isFinite(c))&&(c=1),{x:i,y:c}}const Ue=j(0);function te(t){const e=M(t);return!Dt()||!e.visualViewport?Ue:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Ke(t,e,n){return e===void 0&&(e=!1),!!n&&e&&n===M(t)}function J(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const r=t.getBoundingClientRect(),s=Tt(t);let i=j(1);e&&(o?N(o)&&(i=tt(o)):i=tt(t));const c=Ke(s,n,o)?te(s):j(0);let l=(r.left+c.x)/i.x,a=(r.top+c.y)/i.y,d=r.width/i.x,u=r.height/i.y;if(s&&o){const m=M(s),f=N(o)?M(o):o;let p=m,h=Ot(p);for(;h&&f!==p;){const w=tt(h),g=h.getBoundingClientRect(),x=V(h),b=g.left+(h.clientLeft+parseFloat(x.paddingLeft))*w.x,v=g.top+(h.clientTop+parseFloat(x.paddingTop))*w.y;l*=w.x,a*=w.y,d*=w.x,u*=w.y,l+=b,a+=v,p=M(h),h=Ot(p)}}return ut({width:d,height:u,x:l,y:a})}function wt(t,e){const n=gt(t).scrollLeft;return e?e.left+n:J(X(t)).left+n}function ee(t,e){const n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-wt(t,n),r=n.top+e.scrollTop;return{x:o,y:r}}function Ze(t){let{elements:e,rect:n,offsetParent:o,strategy:r}=t;const s=r==="fixed",i=X(o),c=e?ht(e.floating):!1;if(o===i||c&&s)return n;let l={scrollLeft:0,scrollTop:0},a=j(1);const d=j(0),u=K(o);if((u||!s)&&((nt(o)!=="body"||mt(i))&&(l=gt(o)),u)){const f=J(o);a=tt(o),d.x=f.x+o.clientLeft,d.y=f.y+o.clientTop}const m=i&&!u&&!s?ee(i,l):j(0);return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-l.scrollLeft*a.x+d.x+m.x,y:n.y*a.y-l.scrollTop*a.y+d.y+m.y}}function Ge(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function Je(t){const e=gt(t),n=t.ownerDocument.body,o=B(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),r=B(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-e.scrollLeft+wt(t);const i=-e.scrollTop;return V(n).direction==="rtl"&&(s+=B(t.clientWidth,n.clientWidth)-o),{width:o,height:r,x:s,y:i}}const Qe=25;function tn(t,e,n){n===void 0&&(n="viewport");const o=n==="layoutViewport",r=M(t),s=X(t),i=r.visualViewport;let c=s.clientWidth,l=s.clientHeight,a=0,d=0;if(i){const m=!Dt()||e==="fixed";o?m||(a=-i.offsetLeft,d=-i.offsetTop):(c=i.width,l=i.height,m&&(a=i.offsetLeft,d=i.offsetTop))}if(wt(s)<=0){const m=s.ownerDocument,f=m.body,p=getComputedStyle(f),h=m.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,w=Math.abs(s.clientWidth-f.clientWidth-h),g=getComputedStyle(s).scrollbarGutter==="stable both-edges"?w/2:w;g<=Qe&&(c-=g)}return{width:c,height:l,x:a,y:d}}function en(t,e){const n=J(t,!0,e==="fixed"),o=n.top+t.clientTop,r=n.left+t.clientLeft,s=tt(t),i=t.clientWidth*s.x,c=t.clientHeight*s.y,l=r*s.x,a=o*s.y;return{width:i,height:c,x:l,y:a}}function Bt(t,e,n){let o;if(e==="viewport"||e==="layoutViewport")o=tn(t,n,e);else if(e==="document")o=Je(X(t));else if(N(e))o=en(e,n);else{const r=te(t);o={x:e.x-r.x,y:e.y-r.y,width:e.width,height:e.height}}return ut(o)}function nn(t,e){const n=e.get(t);if(n)return n;let o=rt(t,[],!1).filter(c=>N(c)&&nt(c)!=="body"),r=null;const s=V(t).position==="fixed";let i=s?G(t):t;for(;N(i)&&!ot(i);){const c=V(i),l=Lt(i),a=r?r.position:s?"fixed":"";!l&&(a==="fixed"||a==="absolute"&&c.position==="static")?o=o.filter(u=>u!==i):r=c,i=G(i)}return e.set(t,o),o}function on(t){let{element:e,boundary:n,rootBoundary:o,strategy:r}=t;const i=[...n==="clippingAncestors"?ht(e)?[]:nn(e,this._c):[].concat(n),o],c=Bt(e,i[0],r);let l=c.top,a=c.right,d=c.bottom,u=c.left;for(let m=1;m<i.length;m++){const f=Bt(e,i[m],r);l=B(f.top,l),a=q(f.right,a),d=q(f.bottom,d),u=B(f.left,u)}return{width:a-u,height:d-l,x:u,y:l}}function rn(t){const{width:e,height:n}=Qt(t);return{width:e,height:n}}function sn(t,e,n){const o=K(e),r=X(e),s=n==="fixed",i=J(t,!0,s,e);let c={scrollLeft:0,scrollTop:0};const l=j(0);if((o||!s)&&((nt(e)!=="body"||mt(r))&&(c=gt(e)),o)){const m=J(e,!0,s,e);l.x=m.x+e.clientLeft,l.y=m.y+e.clientTop}!o&&r&&(l.x=wt(r));const a=r&&!o&&!s?ee(r,c):j(0),d=i.left+c.scrollLeft-l.x-a.x,u=i.top+c.scrollTop-l.y-a.y;return{x:d,y:u,width:i.width,height:i.height}}function bt(t){return V(t).position==="static"}function jt(t,e){if(!K(t)||V(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return X(t)===n&&(n=n.ownerDocument.body),n}function ne(t,e){const n=M(t);if(ht(t))return n;if(!K(t)){let r=G(t);for(;r&&!ot(r);){if(N(r)&&!bt(r))return r;r=G(r)}return n}let o=jt(t,e);for(;o&&Ie(o)&&bt(o);)o=jt(o,e);return o&&ot(o)&&bt(o)&&!Lt(o)?n:o||qe(t)||n}const cn=async function(t){const e=this.getOffsetParent||ne,n=this.getDimensions,o=await n(t.floating);return{reference:sn(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function ln(t){return V(t).direction==="rtl"}const an={convertOffsetParentRelativeRectToViewportRelativeRect:Ze,getDocumentElement:X,getClippingRect:on,getOffsetParent:ne,getElementRects:cn,getClientRects:Ge,getDimensions:rn,getScale:tt,isElement:N,isRTL:ln};function oe(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function fn(t,e,n){let o=null,r;const s=X(t);function i(){var d;clearTimeout(r),(d=o)==null||d.disconnect(),o=null}function c(d,u){d===void 0&&(d=!1),u===void 0&&(u=1),i();const m=t.getBoundingClientRect(),{left:f,top:p,width:h,height:w}=m;if(d||e(),!h||!w)return;const g=st(p),x=st(s.clientWidth-(f+h)),b=st(s.clientHeight-(p+w)),v=st(f),y={rootMargin:-g+"px "+-x+"px "+-b+"px "+-v+"px",threshold:B(0,q(1,u))||1};let O=!0;function S($){const C=$[0].intersectionRatio;if(!oe(m,t.getBoundingClientRect()))return c();if(C!==u){if(!O)return c();C?c(!1,C):r=setTimeout(()=>{c(!1,1e-7)},1e3)}O=!1}try{o=new IntersectionObserver(S,{...y,root:s.ownerDocument})}catch{o=new IntersectionObserver(S,y)}o.observe(t)}const l=M(t),a=()=>c(n);return l.addEventListener("resize",a),c(!0),()=>{l.removeEventListener("resize",a),i()}}function un(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,a=Tt(t),d=r||s?[...a?rt(a):[],...e?rt(e):[]]:[];d.forEach(g=>{r&&g.addEventListener("scroll",n),s&&g.addEventListener("resize",n)});const u=a&&c?fn(a,n,s):null;let m=-1,f=null;i&&(f=new ResizeObserver(g=>{let[x]=g;x&&x.target===a&&f&&e&&(f.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var b;(b=f)==null||b.observe(e)})),n()}),a&&!l&&f.observe(a),e&&f.observe(e));let p,h=l?J(t):null;l&&w();function w(){const g=J(t);h&&!oe(h,g)&&n(),h=g,p=requestAnimationFrame(w)}return n(),()=>{var g;d.forEach(x=>{r&&x.removeEventListener("scroll",n),s&&x.removeEventListener("resize",n)}),u?.(),(g=f)==null||g.disconnect(),f=null,l&&cancelAnimationFrame(p)}}const dn=Ne,pn=Ve,mn=He,hn=je,gn=ke,It=Fe,wn=Be,xn=(t,e,n)=>{const o=new Map,r=n??{},s={...an,...r.platform,_c:o};return We(t,e,{...r,platform:s})};var yn=typeof document<"u",vn=function(){},lt=yn?P.useLayoutEffect:vn;function dt(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,o,r;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(o=n;o--!==0;)if(!dt(t[o],e[o]))return!1;return!0}if(r=Object.keys(t),n=r.length,n!==Object.keys(e).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(e,r[o]))return!1;for(o=n;o--!==0;){const s=r[o];if(!(s==="_owner"&&t.$$typeof)&&!dt(t[s],e[s]))return!1}return!0}return t!==t&&e!==e}function re(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Xt(t,e){const n=re(t);return Math.round(e*n)/n}function At(t){const e=P.useRef(t);return lt(()=>{e.current=t}),e}function bn(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:s,floating:i}={},transform:c=!0,whileElementsMounted:l,open:a}=t,[d,u]=P.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[m,f]=P.useState(o);dt(m,o)||f(o);const[p,h]=P.useState(null),[w,g]=P.useState(null),x=P.useCallback(R=>{R!==y.current&&(y.current=R,h(R))},[]),b=P.useCallback(R=>{R!==O.current&&(O.current=R,g(R))},[]),v=s||p,A=i||w,y=P.useRef(null),O=P.useRef(null),S=P.useRef(d),$=l!=null,C=At(l),H=At(r),k=At(a),T=P.useCallback(()=>{if(!y.current||!O.current)return;const R={placement:e,strategy:n,middleware:m};H.current&&(R.platform=H.current),xn(y.current,O.current,R).then(D=>{const F={...D,isPositioned:k.current!==!1};E.current&&!dt(S.current,F)&&(S.current=F,ye.flushSync(()=>{u(F)}))})},[m,e,n,H,k]);lt(()=>{a===!1&&S.current.isPositioned&&(S.current.isPositioned=!1,u(R=>({...R,isPositioned:!1})))},[a]);const E=P.useRef(!1);lt(()=>(E.current=!0,()=>{E.current=!1}),[]),lt(()=>{if(v&&(y.current=v),A&&(O.current=A),v&&A){if(C.current)return C.current(v,A,T);T()}},[v,A,T,C,$]);const W=P.useMemo(()=>({reference:y,floating:O,setReference:x,setFloating:b}),[x,b]),L=P.useMemo(()=>({reference:v,floating:A}),[v,A]),_=P.useMemo(()=>{const R={position:n,left:0,top:0};if(!L.floating)return R;const D=Xt(L.floating,d.x),F=Xt(L.floating,d.y);return c?{...R,transform:"translate("+D+"px, "+F+"px)",...re(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:D,top:F}},[n,c,L.floating,d.x,d.y]);return P.useMemo(()=>({...d,update:T,refs:W,elements:L,floatingStyles:_}),[d,T,W,L,_])}const An=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:o,padding:r}=typeof t=="function"?t(n):t;return o&&e(o)?o.current!=null?It({element:o.current,padding:r}).fn(n):{}:o?It({element:o,padding:r}).fn(n):{}}}},Rn=(t,e)=>{const n=dn(t);return{name:n.name,fn:n.fn,options:[t,e]}},On=(t,e)=>{const n=pn(t);return{name:n.name,fn:n.fn,options:[t,e]}},Pn=(t,e)=>({fn:wn(t).fn,options:[t,e]}),Cn=(t,e)=>{const n=mn(t);return{name:n.name,fn:n.fn,options:[t,e]}},Sn=(t,e)=>{const n=hn(t);return{name:n.name,fn:n.fn,options:[t,e]}},En=(t,e)=>{const n=gn(t);return{name:n.name,fn:n.fn,options:[t,e]}},Ln=(t,e)=>{const n=An(t);return{name:n.name,fn:n.fn,options:[t,e]}};var Dn=Object.defineProperty,Y=(t,e)=>Dn(t,"name",{value:e,configurable:!0}),ie="Popper",[se,jn]=ve(ie),[Tn,ce]=se(ie),$n=Y(t=>{const{__scopePopper:e,children:n}=t,[o,r]=P.useState(null),[s,i]=P.useState(void 0);return Q.jsx(Tn,{scope:e,anchor:o,onAnchorChange:r,placementState:s,setPlacementState:i,children:n})},"Popper"),_n="PopperAnchor",Mn=P.forwardRef(Y(function(e,n){const{__scopePopper:o,virtualRef:r,...s}=e,i=ce(_n,o),c=P.useRef(null),l=i.onAnchorChange,a=P.useCallback(h=>{c.current=h,h&&l(h)},[l]),d=Yt(n,a),u=P.useRef(null);P.useEffect(()=>{if(!r)return;const h=u.current;u.current=r.current,h!==u.current&&l(u.current)});const m=i.placementState&&xt(i.placementState),f=m?.[0],p=m?.[1];return r?null:Q.jsx(Pt.div,{"data-radix-popper-side":f,"data-radix-popper-align":p,...s,ref:d})},"PopperAnchor")),le="PopperContent",[Wn,In]=se(le),Fn=P.forwardRef(Y(function(e,n){const{__scopePopper:o,side:r="bottom",sideOffset:s=0,align:i="center",alignOffset:c=0,arrowPadding:l=0,avoidCollisions:a=!0,collisionBoundary:d=[],collisionPadding:u=0,sticky:m="partial",hideWhenDetached:f=!1,updatePositionStrategy:p="optimized",onPlaced:h,...w}=e,g=ce(le,o),[x,b]=P.useState(null),v=Yt(n,b),[A,y]=P.useState(null),O=qt(A),S=O?.width??0,$=O?.height??0,C=r+(i!=="center"?"-"+i:""),H=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},k=Array.isArray(d)?d:[d],T=k.length>0,E={padding:H,boundary:k.filter(ae),altBoundary:T},{refs:W,floatingStyles:L,placement:_,isPositioned:R,middlewareData:D}=bn({strategy:"fixed",placement:C,whileElementsMounted:Y((...yt)=>un(...yt,{animationFrame:p==="always"}),"whileElementsMounted"),elements:{reference:g.anchor},middleware:[Rn({mainAxis:s+$,alignmentAxis:c}),a&&On({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?Pn():void 0,...E}),a&&Cn({...E}),Sn({...E,apply:Y(({elements:yt,rects:Wt,availableWidth:he,availableHeight:ge})=>{const{width:we,height:xe}=Wt.reference,it=yt.floating.style;it.setProperty("--radix-popper-available-width",`${he}px`),it.setProperty("--radix-popper-available-height",`${ge}px`),it.setProperty("--radix-popper-anchor-width",`${we}px`),it.setProperty("--radix-popper-anchor-height",`${xe}px`)},"apply")}),A&&Ln({element:A,padding:l}),Hn({arrowWidth:S,arrowHeight:$}),f&&En({strategy:"referenceHidden",...E,boundary:T?E.boundary:void 0})]}),F=g.setPlacementState;ct(()=>(F(_),()=>{F(void 0)}),[_,F]);const[$t,_t]=xt(_),Mt=be(h);ct(()=>{R&&Mt?.()},[R,Mt]);const fe=D.arrow?.x,ue=D.arrow?.y,de=D.arrow?.centerOffset!==0,[pe,me]=P.useState();return ct(()=>{x&&me(window.getComputedStyle(x).zIndex)},[x]),Q.jsx("div",{ref:W.setFloating,"data-radix-popper-content-wrapper":"",style:{...L,transform:R?L.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:pe,"--radix-popper-transform-origin":[D.transformOrigin?.x,D.transformOrigin?.y].join(" "),...D.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:Q.jsx(Wn,{scope:o,placedSide:$t,placedAlign:_t,onArrowChange:y,arrowX:fe,arrowY:ue,shouldHideArrow:de,children:Q.jsx(Pt.div,{"data-side":$t,"data-align":_t,...w,ref:v,style:{...w.style,animation:R?w.style?.animation:"none"}})})})},"PopperContent"));function ae(t){return t!==null}Y(ae,"isNotNull");var Hn=Y(t=>({name:"transformOrigin",options:t,fn(e){const{placement:n,rects:o,middlewareData:r}=e,i=r.arrow?.centerOffset!==0,c=i?0:t.arrowWidth,l=i?0:t.arrowHeight,[a,d]=xt(n),u={start:"0%",center:"50%",end:"100%"}[d],m=(r.arrow?.x??0)+c/2,f=(r.arrow?.y??0)+l/2;let p="",h="";return a==="bottom"?(p=i?u:`${m}px`,h=`${-l}px`):a==="top"?(p=i?u:`${m}px`,h=`${o.floating.height+l}px`):a==="right"?(p=`${-l}px`,h=i?u:`${f}px`):a==="left"&&(p=`${o.floating.width+l}px`,h=i?u:`${f}px`),{data:{x:p,y:h}}}}),"transformOrigin");function xt(t){const[e,n="center"]=t.split("-");return[e,n]}Y(xt,"getSideAndAlignFromPlacement");var Xn=$n,Yn=Mn,qn=Fn,kn=Object.defineProperty,zn=(t,e)=>kn(t,"name",{value:e,configurable:!0}),Nn=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Vn=P.forwardRef(zn(function(e,n){return Q.jsx(Pt.span,{...e,ref:n,style:{...Nn,...e.style}})},"VisuallyHidden")),Un=Vn;export{Yn as A,qn as C,Xn as R,Nn as V,Un as a,jn as c};
1
+ import{r as P,l as ct,V as ye,n as ve,m as Yt,W as be,j as Q,P as Pt}from"./settings-DKknqu4C.js";var Ae=Object.defineProperty,Re=(t,e)=>Ae(t,"name",{value:e,configurable:!0});function qt(t){const[e,n]=P.useState(void 0);return ct(()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const s=r[0];let i,c;if("borderBoxSize"in s){const l=s.borderBoxSize,a=Array.isArray(l)?l[0]:l;i=a.inlineSize,c=a.blockSize}else i=t.offsetWidth,c=t.offsetHeight;n({width:i,height:c})});return o.observe(t,{box:"border-box"}),()=>o.unobserve(t)}else n(void 0)},[t]),e}Re(qt,"useSize");const Oe=["top","right","bottom","left"],q=Math.min,B=Math.max,at=Math.round,st=Math.floor,j=t=>({x:t,y:t}),Pe={left:"right",right:"left",bottom:"top",top:"bottom"};function Ut(t,e,n){return B(t,q(e,n))}function I(t,e){return typeof t=="function"?t(e):t}function U(t){return t.split("-")[0]}function et(t){return t.split("-")[1]}function Ct(t){return t==="x"?"y":"x"}function St(t){return t==="y"?"height":"width"}function z(t){const e=t[0];return e==="t"||e==="b"?"y":"x"}function Et(t){return Ct(z(t))}function Ce(t,e,n){n===void 0&&(n=!1);const o=et(t),r=Et(t),s=St(r);let i=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(i=ft(i)),[i,ft(i)]}function Se(t){const e=ft(t);return[Rt(t),e,Rt(e)]}function Rt(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const Ft=["left","right"],Ht=["right","left"],Ee=["top","bottom"],Le=["bottom","top"];function De(t,e,n){switch(t){case"top":case"bottom":return n?e?Ht:Ft:e?Ft:Ht;case"left":case"right":return e?Ee:Le;default:return[]}}function Te(t,e,n,o){const r=et(t);let s=De(U(t),n==="start",o);return r&&(s=s.map(i=>i+"-"+r),e&&(s=s.concat(s.map(Rt)))),s}function ft(t){const e=U(t);return Pe[e]+t.slice(e.length)}function $e(t){var e,n,o,r;return{top:(e=t.top)!=null?e:0,right:(n=t.right)!=null?n:0,bottom:(o=t.bottom)!=null?o:0,left:(r=t.left)!=null?r:0}}function Kt(t){return typeof t!="number"?$e(t):{top:t,right:t,bottom:t,left:t}}function ut(t){const{x:e,y:n,width:o,height:r}=t;return{width:o,height:r,top:n,left:e,right:e+o,bottom:n+r,x:e,y:n}}function kt(t,e,n){let{reference:o,floating:r}=t;const s=z(e),i=Et(e),c=St(i),l=U(e),a=s==="y",d=o.x+o.width/2-r.width/2,u=o.y+o.height/2-r.height/2,m=o[c]/2-r[c]/2;let f;switch(l){case"top":f={x:d,y:o.y-r.height};break;case"bottom":f={x:d,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:u};break;case"left":f={x:o.x-r.width,y:u};break;default:f={x:o.x,y:o.y}}const p=et(e);return p&&(f[i]+=m*(p==="end"?1:-1)*(n&&a?-1:1)),f}async function _e(t,e){var n;e===void 0&&(e={});const{x:o,y:r,platform:s,rects:i,elements:c,strategy:l}=t,{boundary:a="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:m=!1,padding:f=0}=I(e,t),p=Kt(f),w=c[m?u==="floating"?"reference":"floating":u],g=ut(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(w)))==null||n?w:w.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:a,rootBoundary:d,strategy:l})),x=u==="floating"?{x:o,y:r,width:i.floating.width,height:i.floating.height}:i.reference,b=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),v=await(s.isElement==null?void 0:s.isElement(b))&&await(s.getScale==null?void 0:s.getScale(b))||{x:1,y:1},A=ut(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:x,offsetParent:b,strategy:l}):x);return{top:(g.top-A.top+p.top)/v.y,bottom:(A.bottom-g.bottom+p.bottom)/v.y,left:(g.left-A.left+p.left)/v.x,right:(A.right-g.right+p.right)/v.x}}const Me=50,We=async(t,e,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:s=[],platform:i}=n,c=i.detectOverflow?i:{...i,detectOverflow:_e},l=await(i.isRTL==null?void 0:i.isRTL(e));let a=await i.getElementRects({reference:t,floating:e,strategy:r}),{x:d,y:u}=kt(a,o,l),m=o,f=0;const p={};for(let h=0;h<s.length;h++){const w=s[h];if(!w)continue;const{name:g,fn:x}=w,{x:b,y:v,data:A,reset:y}=await x({x:d,y:u,initialPlacement:o,placement:m,strategy:r,middlewareData:p,rects:a,platform:c,elements:{reference:t,floating:e}});d=b??d,u=v??u,p[g]={...p[g],...A},y&&f<Me&&(f++,typeof y=="object"&&(y.placement&&(m=y.placement),y.rects&&(a=y.rects===!0?await i.getElementRects({reference:t,floating:e,strategy:r}):y.rects),{x:d,y:u}=kt(a,m,l)),h=-1)}return{x:d,y:u,placement:m,strategy:r,middlewareData:p}},Fe=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:o,placement:r,rects:s,platform:i,elements:c,middlewareData:l}=e,{element:a,padding:d=0}=I(t,e)||{};if(a==null)return{};const u=Kt(d),m={x:n,y:o},f=Et(r),p=St(f),h=await i.getDimensions(a),w=f==="y",g=w?"top":"left",x=w?"bottom":"right",b=w?"clientHeight":"clientWidth",v=s.reference[p]+s.reference[f]-m[f]-s.floating[p],A=m[f]-s.reference[f],y=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a));let O=y?y[b]:0;(!O||!await(i.isElement==null?void 0:i.isElement(y)))&&(O=c.floating[b]||s.floating[p]);const S=v/2-A/2,$=O/2-h[p]/2-1,C=q(u[g],$),H=q(u[x],$),k=O-h[p]-H,T=O/2-h[p]/2+S,E=Ut(C,T,k),W=!l.arrow&&et(r)!=null&&T!==E&&s.reference[p]/2-(T<C?C:H)-h[p]/2<0,L=W?T<C?T-C:T-k:0;return{[f]:m[f]+L,data:{[f]:E,centerOffset:T-E-L,...W&&{alignmentOffset:L}},reset:W}}}),He=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:r,middlewareData:s,rects:i,initialPlacement:c,platform:l,elements:a}=e,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:m,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:h=!0,...w}=I(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const g=U(r),x=z(c),b=U(c)===c,v=await(l.isRTL==null?void 0:l.isRTL(a.floating)),A=m||(b||!h?[ft(c)]:Se(c)),y=p!=="none";!m&&y&&A.push(...Te(c,h,p,v));const O=[c,...A],S=await l.detectOverflow(e,w),$=[];let C=((o=s.flip)==null?void 0:o.overflows)||[];if(d&&$.push(S[g]),u){const E=Ce(r,i,v);$.push(S[E[0]],S[E[1]])}if(C=[...C,{placement:r,overflows:$}],!$.every(E=>E<=0)){var H,k;const E=(((H=s.flip)==null?void 0:H.index)||0)+1,W=O[E];if(W&&(!(u==="alignment"?x!==z(W):!1)||C.every(R=>z(R.placement)===x?R.overflows[0]>0:!0)))return{data:{index:E,overflows:C},reset:{placement:W}};let L=(k=C.filter(_=>_.overflows[0]<=0).sort((_,R)=>_.overflows[1]-R.overflows[1])[0])==null?void 0:k.placement;if(!L)switch(f){case"bestFit":{var T;const _=(T=C.filter(R=>{if(y){const D=z(R.placement);return D===x||D==="y"}return!0}).map(R=>[R.placement,R.overflows.filter(D=>D>0).reduce((D,F)=>D+F,0)]).sort((R,D)=>R[1]-D[1])[0])==null?void 0:T[0];_&&(L=_);break}case"initialPlacement":L=c;break}if(r!==L)return{reset:{placement:L}}}return{}}}};function zt(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Nt(t){return Oe.some(e=>t[e]>=0)}const ke=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n,platform:o}=e,{strategy:r="referenceHidden",...s}=I(t,e);switch(r){case"referenceHidden":{const i=await o.detectOverflow(e,{...s,elementContext:"reference"}),c=zt(i,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:Nt(c)}}}case"escaped":{const i=await o.detectOverflow(e,{...s,altBoundary:!0}),c=zt(i,n.floating);return{data:{escapedOffsets:c,escaped:Nt(c)}}}default:return{}}}}},Zt=new Set(["left","top"]);async function ze(t,e){const{placement:n,platform:o,elements:r}=t,s=await(o.isRTL==null?void 0:o.isRTL(r.floating)),i=U(n),c=et(n),l=z(n)==="y",a=Zt.has(i)?-1:1,d=s&&l?-1:1,u=I(e,t);let{mainAxis:m,crossAxis:f,alignmentAxis:p}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return c&&typeof p=="number"&&(f=c==="end"?p*-1:p),l?{x:f*d,y:m*a}:{x:m*a,y:f*d}}const Ne=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:r,y:s,placement:i,middlewareData:c}=e,l=await ze(e,t);return i===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:r+l.x,y:s+l.y,data:{...l,placement:i}}}}},Ve=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:r,platform:s}=e,{mainAxis:i=!0,crossAxis:c=!1,limiter:l={fn:x=>{let{x:b,y:v}=x;return{x:b,y:v}}},...a}=I(t,e),d={x:n,y:o},u=await s.detectOverflow(e,a),m=z(r),f=Ct(m);let p=d[f],h=d[m];const w=(x,b)=>Ut(b+u[x==="y"?"top":"left"],b,b-u[x==="y"?"bottom":"right"]);i&&(p=w(f,p)),c&&(h=w(m,h));const g=l.fn({...e,[f]:p,[m]:h});return{...g,data:{x:g.x-n,y:g.y-o,enabled:{[f]:i,[m]:c}}}}}},Be=function(t){return t===void 0&&(t={}),{options:t,fn(e){var n,o;const{x:r,y:s,placement:i,rects:c,middlewareData:l}=e,{offset:a=0,mainAxis:d=!0,crossAxis:u=!0}=I(t,e),m={x:r,y:s},f=z(i),p=Ct(f);let h=m[p],w=m[f];const g=I(a,e),x=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:(n=g.mainAxis)!=null?n:0,crossAxis:(o=g.crossAxis)!=null?o:0};if(d){const A=p==="y"?"height":"width",y=c.reference[p]-c.floating[A]+x.mainAxis,O=c.reference[p]+c.reference[A]-x.mainAxis;h<y?h=y:h>O&&(h=O)}if(u){var b,v;const A=p==="y"?"width":"height",y=Zt.has(U(i)),O=c.reference[f]-c.floating[A]+(y&&((b=l.offset)==null?void 0:b[f])||0)+(y?0:x.crossAxis),S=c.reference[f]+c.reference[A]+(y?0:((v=l.offset)==null?void 0:v[f])||0)-(y?x.crossAxis:0);w<O?w=O:w>S&&(w=S)}return{[p]:h,[f]:w}}}},je=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:n,rects:o,platform:r,elements:s}=e,{apply:i=()=>{},...c}=I(t,e),l=await r.detectOverflow(e,c),a=U(n),d=et(n),u=z(n)==="y",{width:m,height:f}=o.floating;let p,h;a==="top"||a==="bottom"?(p=a,h=d===(await(r.isRTL==null?void 0:r.isRTL(s.floating))?"start":"end")?"left":"right"):(h=a,p=d==="end"?"top":"bottom");const w=f-l.top-l.bottom,g=m-l.left-l.right,x=q(f-l[p],w),b=q(m-l[h],g),v=e.middlewareData.shift,A=!v;let y=x,O=b;v!=null&&v.enabled.x&&(O=g),v!=null&&v.enabled.y&&(y=w),A&&!d&&(u?O=m-2*B(l.left,l.right):y=f-2*B(l.top,l.bottom)),await i({...e,availableWidth:O,availableHeight:y});const S=await r.getDimensions(s.floating);return m!==S.width||f!==S.height?{reset:{rects:!0}}:{}}}};function pt(){return typeof window<"u"}function nt(t){return Gt(t)?(t.nodeName||"").toLowerCase():"#document"}function M(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function X(t){var e;return(e=(Gt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Gt(t){return pt()?t instanceof Node||t instanceof M(t).Node:!1}function N(t){return pt()?t instanceof Element||t instanceof M(t).Element:!1}function K(t){return pt()?t instanceof HTMLElement||t instanceof M(t).HTMLElement:!1}function Vt(t){return!pt()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof M(t).ShadowRoot}function mt(t){const{overflow:e,overflowX:n,overflowY:o,display:r}=V(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&r!=="inline"&&r!=="contents"}function Ie(t){return/^(table|td|th)$/.test(nt(t))}function ht(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}const Xe=/transform|translate|scale|rotate|perspective|filter/,Ye=/paint|layout|strict|content/,Z=t=>!!t&&t!=="none";let vt;function Lt(t){const e=N(t)?V(t):t;return Z(e.transform)||Z(e.translate)||Z(e.scale)||Z(e.rotate)||Z(e.perspective)||!Dt()&&(Z(e.backdropFilter)||Z(e.filter))||Xe.test(e.willChange||"")||Ye.test(e.contain||"")}function qe(t){let e=G(t);for(;K(e)&&!ot(e);){if(Lt(e))return e;if(ht(e))return null;e=G(e)}return null}function Dt(){return vt==null&&(vt=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),vt}function ot(t){return/^(html|body|#document)$/.test(nt(t))}function V(t){return M(t).getComputedStyle(t)}function gt(t){return N(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function G(t){if(nt(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Vt(t)&&t.host||X(t);return Vt(e)?e.host:e}function Jt(t){const e=G(t);return ot(e)?(t.ownerDocument||t).body:K(e)&&mt(e)?e:Jt(e)}function rt(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const r=Jt(t),s=r===((o=t.ownerDocument)==null?void 0:o.body),i=M(r);if(s){const c=Ot(i);return e.concat(i,i.visualViewport||[],mt(r)?r:[],c&&n?rt(c):[])}else return e.concat(r,rt(r,[],n))}function Ot(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Qt(t){const e=V(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const r=K(t),s=r?t.offsetWidth:n,i=r?t.offsetHeight:o,c=at(n)!==s||at(o)!==i;return c&&(n=s,o=i),{width:n,height:o,$:c}}function Tt(t){return N(t)?t:t.contextElement}function tt(t){const e=Tt(t);if(!K(e))return j(1);const n=e.getBoundingClientRect(),{width:o,height:r,$:s}=Qt(e);let i=(s?at(n.width):n.width)/o,c=(s?at(n.height):n.height)/r;return(!i||!Number.isFinite(i))&&(i=1),(!c||!Number.isFinite(c))&&(c=1),{x:i,y:c}}const Ue=j(0);function te(t){const e=M(t);return!Dt()||!e.visualViewport?Ue:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Ke(t,e,n){return e===void 0&&(e=!1),!!n&&e&&n===M(t)}function J(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const r=t.getBoundingClientRect(),s=Tt(t);let i=j(1);e&&(o?N(o)&&(i=tt(o)):i=tt(t));const c=Ke(s,n,o)?te(s):j(0);let l=(r.left+c.x)/i.x,a=(r.top+c.y)/i.y,d=r.width/i.x,u=r.height/i.y;if(s&&o){const m=M(s),f=N(o)?M(o):o;let p=m,h=Ot(p);for(;h&&f!==p;){const w=tt(h),g=h.getBoundingClientRect(),x=V(h),b=g.left+(h.clientLeft+parseFloat(x.paddingLeft))*w.x,v=g.top+(h.clientTop+parseFloat(x.paddingTop))*w.y;l*=w.x,a*=w.y,d*=w.x,u*=w.y,l+=b,a+=v,p=M(h),h=Ot(p)}}return ut({width:d,height:u,x:l,y:a})}function wt(t,e){const n=gt(t).scrollLeft;return e?e.left+n:J(X(t)).left+n}function ee(t,e){const n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-wt(t,n),r=n.top+e.scrollTop;return{x:o,y:r}}function Ze(t){let{elements:e,rect:n,offsetParent:o,strategy:r}=t;const s=r==="fixed",i=X(o),c=e?ht(e.floating):!1;if(o===i||c&&s)return n;let l={scrollLeft:0,scrollTop:0},a=j(1);const d=j(0),u=K(o);if((u||!s)&&((nt(o)!=="body"||mt(i))&&(l=gt(o)),u)){const f=J(o);a=tt(o),d.x=f.x+o.clientLeft,d.y=f.y+o.clientTop}const m=i&&!u&&!s?ee(i,l):j(0);return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-l.scrollLeft*a.x+d.x+m.x,y:n.y*a.y-l.scrollTop*a.y+d.y+m.y}}function Ge(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function Je(t){const e=gt(t),n=t.ownerDocument.body,o=B(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),r=B(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-e.scrollLeft+wt(t);const i=-e.scrollTop;return V(n).direction==="rtl"&&(s+=B(t.clientWidth,n.clientWidth)-o),{width:o,height:r,x:s,y:i}}const Qe=25;function tn(t,e,n){n===void 0&&(n="viewport");const o=n==="layoutViewport",r=M(t),s=X(t),i=r.visualViewport;let c=s.clientWidth,l=s.clientHeight,a=0,d=0;if(i){const m=!Dt()||e==="fixed";o?m||(a=-i.offsetLeft,d=-i.offsetTop):(c=i.width,l=i.height,m&&(a=i.offsetLeft,d=i.offsetTop))}if(wt(s)<=0){const m=s.ownerDocument,f=m.body,p=getComputedStyle(f),h=m.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,w=Math.abs(s.clientWidth-f.clientWidth-h),g=getComputedStyle(s).scrollbarGutter==="stable both-edges"?w/2:w;g<=Qe&&(c-=g)}return{width:c,height:l,x:a,y:d}}function en(t,e){const n=J(t,!0,e==="fixed"),o=n.top+t.clientTop,r=n.left+t.clientLeft,s=tt(t),i=t.clientWidth*s.x,c=t.clientHeight*s.y,l=r*s.x,a=o*s.y;return{width:i,height:c,x:l,y:a}}function Bt(t,e,n){let o;if(e==="viewport"||e==="layoutViewport")o=tn(t,n,e);else if(e==="document")o=Je(X(t));else if(N(e))o=en(e,n);else{const r=te(t);o={x:e.x-r.x,y:e.y-r.y,width:e.width,height:e.height}}return ut(o)}function nn(t,e){const n=e.get(t);if(n)return n;let o=rt(t,[],!1).filter(c=>N(c)&&nt(c)!=="body"),r=null;const s=V(t).position==="fixed";let i=s?G(t):t;for(;N(i)&&!ot(i);){const c=V(i),l=Lt(i),a=r?r.position:s?"fixed":"";!l&&(a==="fixed"||a==="absolute"&&c.position==="static")?o=o.filter(u=>u!==i):r=c,i=G(i)}return e.set(t,o),o}function on(t){let{element:e,boundary:n,rootBoundary:o,strategy:r}=t;const i=[...n==="clippingAncestors"?ht(e)?[]:nn(e,this._c):[].concat(n),o],c=Bt(e,i[0],r);let l=c.top,a=c.right,d=c.bottom,u=c.left;for(let m=1;m<i.length;m++){const f=Bt(e,i[m],r);l=B(f.top,l),a=q(f.right,a),d=q(f.bottom,d),u=B(f.left,u)}return{width:a-u,height:d-l,x:u,y:l}}function rn(t){const{width:e,height:n}=Qt(t);return{width:e,height:n}}function sn(t,e,n){const o=K(e),r=X(e),s=n==="fixed",i=J(t,!0,s,e);let c={scrollLeft:0,scrollTop:0};const l=j(0);if((o||!s)&&((nt(e)!=="body"||mt(r))&&(c=gt(e)),o)){const m=J(e,!0,s,e);l.x=m.x+e.clientLeft,l.y=m.y+e.clientTop}!o&&r&&(l.x=wt(r));const a=r&&!o&&!s?ee(r,c):j(0),d=i.left+c.scrollLeft-l.x-a.x,u=i.top+c.scrollTop-l.y-a.y;return{x:d,y:u,width:i.width,height:i.height}}function bt(t){return V(t).position==="static"}function jt(t,e){if(!K(t)||V(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return X(t)===n&&(n=n.ownerDocument.body),n}function ne(t,e){const n=M(t);if(ht(t))return n;if(!K(t)){let r=G(t);for(;r&&!ot(r);){if(N(r)&&!bt(r))return r;r=G(r)}return n}let o=jt(t,e);for(;o&&Ie(o)&&bt(o);)o=jt(o,e);return o&&ot(o)&&bt(o)&&!Lt(o)?n:o||qe(t)||n}const cn=async function(t){const e=this.getOffsetParent||ne,n=this.getDimensions,o=await n(t.floating);return{reference:sn(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function ln(t){return V(t).direction==="rtl"}const an={convertOffsetParentRelativeRectToViewportRelativeRect:Ze,getDocumentElement:X,getClippingRect:on,getOffsetParent:ne,getElementRects:cn,getClientRects:Ge,getDimensions:rn,getScale:tt,isElement:N,isRTL:ln};function oe(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function fn(t,e,n){let o=null,r;const s=X(t);function i(){var d;clearTimeout(r),(d=o)==null||d.disconnect(),o=null}function c(d,u){d===void 0&&(d=!1),u===void 0&&(u=1),i();const m=t.getBoundingClientRect(),{left:f,top:p,width:h,height:w}=m;if(d||e(),!h||!w)return;const g=st(p),x=st(s.clientWidth-(f+h)),b=st(s.clientHeight-(p+w)),v=st(f),y={rootMargin:-g+"px "+-x+"px "+-b+"px "+-v+"px",threshold:B(0,q(1,u))||1};let O=!0;function S($){const C=$[0].intersectionRatio;if(!oe(m,t.getBoundingClientRect()))return c();if(C!==u){if(!O)return c();C?c(!1,C):r=setTimeout(()=>{c(!1,1e-7)},1e3)}O=!1}try{o=new IntersectionObserver(S,{...y,root:s.ownerDocument})}catch{o=new IntersectionObserver(S,y)}o.observe(t)}const l=M(t),a=()=>c(n);return l.addEventListener("resize",a),c(!0),()=>{l.removeEventListener("resize",a),i()}}function un(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,a=Tt(t),d=r||s?[...a?rt(a):[],...e?rt(e):[]]:[];d.forEach(g=>{r&&g.addEventListener("scroll",n),s&&g.addEventListener("resize",n)});const u=a&&c?fn(a,n,s):null;let m=-1,f=null;i&&(f=new ResizeObserver(g=>{let[x]=g;x&&x.target===a&&f&&e&&(f.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var b;(b=f)==null||b.observe(e)})),n()}),a&&!l&&f.observe(a),e&&f.observe(e));let p,h=l?J(t):null;l&&w();function w(){const g=J(t);h&&!oe(h,g)&&n(),h=g,p=requestAnimationFrame(w)}return n(),()=>{var g;d.forEach(x=>{r&&x.removeEventListener("scroll",n),s&&x.removeEventListener("resize",n)}),u?.(),(g=f)==null||g.disconnect(),f=null,l&&cancelAnimationFrame(p)}}const dn=Ne,pn=Ve,mn=He,hn=je,gn=ke,It=Fe,wn=Be,xn=(t,e,n)=>{const o=new Map,r=n??{},s={...an,...r.platform,_c:o};return We(t,e,{...r,platform:s})};var yn=typeof document<"u",vn=function(){},lt=yn?P.useLayoutEffect:vn;function dt(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,o,r;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(o=n;o--!==0;)if(!dt(t[o],e[o]))return!1;return!0}if(r=Object.keys(t),n=r.length,n!==Object.keys(e).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(e,r[o]))return!1;for(o=n;o--!==0;){const s=r[o];if(!(s==="_owner"&&t.$$typeof)&&!dt(t[s],e[s]))return!1}return!0}return t!==t&&e!==e}function re(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Xt(t,e){const n=re(t);return Math.round(e*n)/n}function At(t){const e=P.useRef(t);return lt(()=>{e.current=t}),e}function bn(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:s,floating:i}={},transform:c=!0,whileElementsMounted:l,open:a}=t,[d,u]=P.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[m,f]=P.useState(o);dt(m,o)||f(o);const[p,h]=P.useState(null),[w,g]=P.useState(null),x=P.useCallback(R=>{R!==y.current&&(y.current=R,h(R))},[]),b=P.useCallback(R=>{R!==O.current&&(O.current=R,g(R))},[]),v=s||p,A=i||w,y=P.useRef(null),O=P.useRef(null),S=P.useRef(d),$=l!=null,C=At(l),H=At(r),k=At(a),T=P.useCallback(()=>{if(!y.current||!O.current)return;const R={placement:e,strategy:n,middleware:m};H.current&&(R.platform=H.current),xn(y.current,O.current,R).then(D=>{const F={...D,isPositioned:k.current!==!1};E.current&&!dt(S.current,F)&&(S.current=F,ye.flushSync(()=>{u(F)}))})},[m,e,n,H,k]);lt(()=>{a===!1&&S.current.isPositioned&&(S.current.isPositioned=!1,u(R=>({...R,isPositioned:!1})))},[a]);const E=P.useRef(!1);lt(()=>(E.current=!0,()=>{E.current=!1}),[]),lt(()=>{if(v&&(y.current=v),A&&(O.current=A),v&&A){if(C.current)return C.current(v,A,T);T()}},[v,A,T,C,$]);const W=P.useMemo(()=>({reference:y,floating:O,setReference:x,setFloating:b}),[x,b]),L=P.useMemo(()=>({reference:v,floating:A}),[v,A]),_=P.useMemo(()=>{const R={position:n,left:0,top:0};if(!L.floating)return R;const D=Xt(L.floating,d.x),F=Xt(L.floating,d.y);return c?{...R,transform:"translate("+D+"px, "+F+"px)",...re(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:D,top:F}},[n,c,L.floating,d.x,d.y]);return P.useMemo(()=>({...d,update:T,refs:W,elements:L,floatingStyles:_}),[d,T,W,L,_])}const An=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:o,padding:r}=typeof t=="function"?t(n):t;return o&&e(o)?o.current!=null?It({element:o.current,padding:r}).fn(n):{}:o?It({element:o,padding:r}).fn(n):{}}}},Rn=(t,e)=>{const n=dn(t);return{name:n.name,fn:n.fn,options:[t,e]}},On=(t,e)=>{const n=pn(t);return{name:n.name,fn:n.fn,options:[t,e]}},Pn=(t,e)=>({fn:wn(t).fn,options:[t,e]}),Cn=(t,e)=>{const n=mn(t);return{name:n.name,fn:n.fn,options:[t,e]}},Sn=(t,e)=>{const n=hn(t);return{name:n.name,fn:n.fn,options:[t,e]}},En=(t,e)=>{const n=gn(t);return{name:n.name,fn:n.fn,options:[t,e]}},Ln=(t,e)=>{const n=An(t);return{name:n.name,fn:n.fn,options:[t,e]}};var Dn=Object.defineProperty,Y=(t,e)=>Dn(t,"name",{value:e,configurable:!0}),ie="Popper",[se,jn]=ve(ie),[Tn,ce]=se(ie),$n=Y(t=>{const{__scopePopper:e,children:n}=t,[o,r]=P.useState(null),[s,i]=P.useState(void 0);return Q.jsx(Tn,{scope:e,anchor:o,onAnchorChange:r,placementState:s,setPlacementState:i,children:n})},"Popper"),_n="PopperAnchor",Mn=P.forwardRef(Y(function(e,n){const{__scopePopper:o,virtualRef:r,...s}=e,i=ce(_n,o),c=P.useRef(null),l=i.onAnchorChange,a=P.useCallback(h=>{c.current=h,h&&l(h)},[l]),d=Yt(n,a),u=P.useRef(null);P.useEffect(()=>{if(!r)return;const h=u.current;u.current=r.current,h!==u.current&&l(u.current)});const m=i.placementState&&xt(i.placementState),f=m?.[0],p=m?.[1];return r?null:Q.jsx(Pt.div,{"data-radix-popper-side":f,"data-radix-popper-align":p,...s,ref:d})},"PopperAnchor")),le="PopperContent",[Wn,In]=se(le),Fn=P.forwardRef(Y(function(e,n){const{__scopePopper:o,side:r="bottom",sideOffset:s=0,align:i="center",alignOffset:c=0,arrowPadding:l=0,avoidCollisions:a=!0,collisionBoundary:d=[],collisionPadding:u=0,sticky:m="partial",hideWhenDetached:f=!1,updatePositionStrategy:p="optimized",onPlaced:h,...w}=e,g=ce(le,o),[x,b]=P.useState(null),v=Yt(n,b),[A,y]=P.useState(null),O=qt(A),S=O?.width??0,$=O?.height??0,C=r+(i!=="center"?"-"+i:""),H=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},k=Array.isArray(d)?d:[d],T=k.length>0,E={padding:H,boundary:k.filter(ae),altBoundary:T},{refs:W,floatingStyles:L,placement:_,isPositioned:R,middlewareData:D}=bn({strategy:"fixed",placement:C,whileElementsMounted:Y((...yt)=>un(...yt,{animationFrame:p==="always"}),"whileElementsMounted"),elements:{reference:g.anchor},middleware:[Rn({mainAxis:s+$,alignmentAxis:c}),a&&On({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?Pn():void 0,...E}),a&&Cn({...E}),Sn({...E,apply:Y(({elements:yt,rects:Wt,availableWidth:he,availableHeight:ge})=>{const{width:we,height:xe}=Wt.reference,it=yt.floating.style;it.setProperty("--radix-popper-available-width",`${he}px`),it.setProperty("--radix-popper-available-height",`${ge}px`),it.setProperty("--radix-popper-anchor-width",`${we}px`),it.setProperty("--radix-popper-anchor-height",`${xe}px`)},"apply")}),A&&Ln({element:A,padding:l}),Hn({arrowWidth:S,arrowHeight:$}),f&&En({strategy:"referenceHidden",...E,boundary:T?E.boundary:void 0})]}),F=g.setPlacementState;ct(()=>(F(_),()=>{F(void 0)}),[_,F]);const[$t,_t]=xt(_),Mt=be(h);ct(()=>{R&&Mt?.()},[R,Mt]);const fe=D.arrow?.x,ue=D.arrow?.y,de=D.arrow?.centerOffset!==0,[pe,me]=P.useState();return ct(()=>{x&&me(window.getComputedStyle(x).zIndex)},[x]),Q.jsx("div",{ref:W.setFloating,"data-radix-popper-content-wrapper":"",style:{...L,transform:R?L.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:pe,"--radix-popper-transform-origin":[D.transformOrigin?.x,D.transformOrigin?.y].join(" "),...D.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:Q.jsx(Wn,{scope:o,placedSide:$t,placedAlign:_t,onArrowChange:y,arrowX:fe,arrowY:ue,shouldHideArrow:de,children:Q.jsx(Pt.div,{"data-side":$t,"data-align":_t,...w,ref:v,style:{...w.style,animation:R?w.style?.animation:"none"}})})})},"PopperContent"));function ae(t){return t!==null}Y(ae,"isNotNull");var Hn=Y(t=>({name:"transformOrigin",options:t,fn(e){const{placement:n,rects:o,middlewareData:r}=e,i=r.arrow?.centerOffset!==0,c=i?0:t.arrowWidth,l=i?0:t.arrowHeight,[a,d]=xt(n),u={start:"0%",center:"50%",end:"100%"}[d],m=(r.arrow?.x??0)+c/2,f=(r.arrow?.y??0)+l/2;let p="",h="";return a==="bottom"?(p=i?u:`${m}px`,h=`${-l}px`):a==="top"?(p=i?u:`${m}px`,h=`${o.floating.height+l}px`):a==="right"?(p=`${-l}px`,h=i?u:`${f}px`):a==="left"&&(p=`${o.floating.width+l}px`,h=i?u:`${f}px`),{data:{x:p,y:h}}}}),"transformOrigin");function xt(t){const[e,n="center"]=t.split("-");return[e,n]}Y(xt,"getSideAndAlignFromPlacement");var Xn=$n,Yn=Mn,qn=Fn,kn=Object.defineProperty,zn=(t,e)=>kn(t,"name",{value:e,configurable:!0}),Nn=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Vn=P.forwardRef(zn(function(e,n){return Q.jsx(Pt.span,{...e,ref:n,style:{...Nn,...e.style}})},"VisuallyHidden")),Un=Vn;export{Yn as A,qn as C,Xn as R,Nn as V,Un as a,jn as c};